passenger-4.0.37/000755 000765 000024 00000000000 12233035540 014214 5ustar00honglistaff000000 000000 passenger-4.0.37/.gitignore000644 000765 000024 00000002042 12233035540 016202 0ustar00honglistaff000000 000000 .cache .DS_Store .rbx .vagrant autom4te.cache *.o *.so *.bundle *.pyc *.a *.lo *.la *.slo *.dSYM *.gch *.swp *~.nib *.pbxuser *.perspective *.perspectivev3 *.mode1v3 *.mode2v3 xcuserdata /config.rb /buildout build/cache ext/common/libboost_oxt ext/common/libpassenger_common ext/apache2/module_libboost_oxt ext/apache2/module_libpassenger_common ext/libev/Makefile ext/libev/config.h ext/libev/config.log ext/libev/config.status ext/libev/libtool ext/libev/stamp-h1 ext/libev/ev.3 ext/libev/ev.pod ext/libev/.libs ext/libeio/Makefile ext/libeio/config.h ext/libeio/config.log ext/libeio/config.status ext/libeio/eio.3 ext/libeio/eio.pod ext/ruby/*/Makefile ext/ruby/*/mkmf.log ext/*.a doc/rdoc doc/cxxapi doc/*.html helper-scripts/download_binaries/Makefile test/.gdbinit test/test.log test/apache2.log test/config.yml test/config.json test/coverage test/cxx/CxxTestMain test/oxt/oxt_test_main test/stub/apache2/*.log test/stub/apache2/*.pid test/stub/apache2/httpd.conf test/stub/zsfa/mycook test/stub/zsfa/foo test/support/allocate_memory pkg node_modules passenger-4.0.37/.travis.yml000644 000765 000024 00000000673 12233035540 016333 0ustar00honglistaff000000 000000 language: ruby env: - TEST_CXX=1 TEST_NODE=1 - TEST_CXX=1 SUDO=1 - TEST_RUBY=1 TEST_RUBY_VERSION=1.8.7 TEST_CLASSIC_RAILS=0 TEST_RUBYGEMS_VERSION=1.8.25 - TEST_RUBY=1 TEST_RUBY_VERSION=1.9.3 TEST_CLASSIC_RAILS=0 - TEST_NGINX=1 TEST_STANDALONE=1 TEST_RUBYGEMS_VERSION=1.8.25 - TEST_APACHE2=1 TEST_RUBYGEMS_VERSION=1.8.25 - TEST_SOURCE_PACKAGING=1 TEST_DEBIAN_PACKAGING=1 TEST_RUBYGEMS_VERSION=1.8.25 script: ./dev/run_travis.sh passenger-4.0.37/bin/000755 000765 000024 00000000000 12233035540 014764 5ustar00honglistaff000000 000000 passenger-4.0.37/build/000755 000765 000024 00000000000 12233035540 015313 5ustar00honglistaff000000 000000 passenger-4.0.37/configure000755 000765 000024 00000000437 12233035540 016127 0ustar00honglistaff000000 000000 #!/bin/sh echo "This is not how you install Phusion Passenger! Please run one of:" echo echo " ./bin/passenger-install-apache2-module" echo " ./bin/passenger-install-nginx-module" echo echo "When unsure, please consult the manual (see 'doc' directory)." echo echo "*** ABORTED" exit 1 passenger-4.0.37/CONTRIBUTING.md000644 000765 000024 00000034544 12233035540 016457 0ustar00honglistaff000000 000000 # Contributing to Phusion Passenger Thank you for your interest in Phusion Passenger. Phusion Passenger is open source so your contributions are very welcome. Although we also provide a [commercial version](https://www.phusionpassenger.com/enterprise) and [commercial support](https://www.phusionpassenger.com/commercial_support), the core remains open source and we remain committed to keep it that way. This guide gives you an overview of the ways with which you can contribute, as well as contribution guidelines. You can contribute in one of the following areas: * Documentation (user documentation, developer documentation, contributor documentation). * Bug triage. * Community support. * Code. We require contributors to sign our [contributor agreement](http://www.phusion.nl/forms/contributor_agreement) before we can merge their patches. Please submit patches in the form of a Github pull request or as a patch on the [bug tracker](http://code.google.com/p/phusion-passenger/issues/list). Pull requests are preferred and generally get more attention because Github has better email notifications and better discussion capabilities. You should also install required developer tools. The following command will install everything you need: rake test:install_deps If your system requires gems to be installed with root privileges, run: rake test:install_deps SUDO=1 ## Contributing documentation All good software should have good documentation, and we take this very seriously. However writing and maintaing quality documentation is not an easy task. If you are not skilled in C++ or programming, then writing documentation is the easiest way to contribute. Most documentation can be located in the `doc` directory, and are either written in Markdown or in Asciidoc format. They can be compiled to HTML with `rake doc`. You need [Mizuho](https://github.com/FooBarWidget/mizuho) to compile Asciidoc and [BlueCloth](http://deveiate.org/projects/BlueCloth) to compile Markdown. Both gems are automatically installed as part of the Phusion Passenger developer tools. ## Contributing by bug triaging Users [fill bug reports](http://code.google.com/p/phusion-passenger/issues/list) on a regular basis, but not all bug reports are legit, not all bug reports are equally important, etc. By helping with bug triaging you make the lives of the core developers a lot easier. To start contributing, please submit a comment on any bug report that needs triaging. This comment should contain triaging instructions, e.g. whether a report should be considered duplicate. If you contribute regularly we'll give you moderator access to the bug tracker so that you can apply triaging labels directly. Here are some of the things that you should look for: * Some reports are duplicates of each other, i.e. they report the same issue. You should mark them as duplicate and note the ID of the original report. * Some reported problems are caused by the reporter's machine or the reporter's application. You should explain to them what the problem actually is, that it's not caused by Phusion Passenger, and then close the report. * Some reports need more information. At the very least, we need specific instructions on how to reproduce the problem. You should ask the reporter to provide more information. Some reporters reply slowly or not at all. If some time has passed, you should remind the reporter about the request for more information. But if too much time has passed and the issue cannot be reproduced, you should close the report and mark it as "Stale". * Some bug reports seem to be limited to one reporter, and it does not seem that other people suffer from the same problem. These are reports that need _confirmation_. You can help by trying to reproduce the problem and confirming the existance of the problem. * Some reports are important, but have been neglected for too long. Although the core developers try to minimize the number of times this happens, sometimes it happens anyway because they're so busy. You should actively ping the core developers and remind them about it. Or better: try to actively find contributors who can help solving the issue. **Always be polite to bug reporters.** Not all reporters are fluent in English, and not everybody may be tech-savvy. But we ask you for your patience and tolerance on this. We want to stimulate a positive and ejoyable environment. ## Contributing community support You can contribute by answering support questions on the [community discussion forum](http://groups.google.com/group/phusion-passenger) or on [Stack Overflow](http://stackoverflow.com/search?q=passenger). ## Contributing code Phusion Passenger is mostly written in C++, but the build system and various small helper scripts are in Ruby. The loaders for each supported language is written in the respective language. The source code is filled with inline comments, so look there if you want to understand how things work. We also have dedicated documents on some topics and for some subsystems. Some interesting documents are: * ext/common/ApplicationPool2/README.md - If you're interesting in the ApplicationPool and Spawner subsystems. * doc/DebuggingAndStressTesting.md ### Compilation and build system `passenger-install-apache2-module` and `passenger-install-nginx-module` are actually user-friendly wrappers around the build system. The build system is written in Rake, and most of it can be found in the `build/` directory. Run the following command to compile everything: rake apache2 rake nginx It is recommended that you install ccache and set the `USE_CCACHE=1` environment variable. The build system will then automatically wrap all compiler calls in ccache, significantly improving recompilation times. ### Running the unit tests The tests depend on the Phusion Passenger developer tools. Make sure they're installed: rake test:install_deps You also need to setup the file `test/config.json`. You can find an example in `test/config.json.example`. Run all tests: rake test Run only the unit tests for the C++ components: rake test:cxx rake test:oxt The `test:cxx` unit test suite contains many different test groups. You can run a specific one by setting the environment variable `GROUPS` to a comma-delimited list of group names, e.g.: rake test:cxx GROUPS='ApplicationPool2_PoolTest,UtilsTest' You can also run just a single test within a suite. Pass the relevant test number like this: rake test:cxx GROUPS='ApplicationPool2_PoolTest:82' You can also run the C++ tests in GDB or Valgrind. We have a useful GDB config file in `test/gdbinit.example`. You should copy it to `test/.gdbinit` and edit it. rake test:cxx GDB=1 rake test:cxx VALGRIND=1 Run just the unit tests for the Ruby components: rake test:ruby Run just the integration tests: rake test:integration # All integration tests. rake test:integration:apache2 # Just integration tests for Apache 2. rake test:integration:nginx # Just integration tests for Nginx. Note that some tests, such as the ones that test privilege lowering, require root privileges. Those will only be run if Rake is run as root. ### Directory structure The most important directories are: * `lib/phusion_passenger`
The source code for Ruby parts of Phusion Passenger. * `ext/ruby`
Native extension for Ruby. Phusion Passenger uses the functions in this extension for optimizing certain operations, but Phusion Passenger can also function without this extension. * `ext/apache2`
Apache 2-specific source code. * `ext/nginx`
Nginx-specific source code. * `ext/common`
Source code shared by the Apache and Nginx modules. * `ext/common/agents`
Source code of the Phusion agent executables, i.e. PassengerWatchdog, PassengerHelperAgent and PassengerLoggingAgent. * PassengerWatchdog is is the main Phusion Passenger control process, starts PassengerHelperAgent and PassengerLoggingAgent, and restarts them when they crash. It also cleans everything up upon shut down. * PassengerHelperAgent performs most of the heavy lifting. It parses requests, spawns application processes, forwards requests to the correct process and forwards application responses back to the web server. * PassengerLoggingAgent processes Union Station data and sends them to the Union Station server. * `bin`
User executables. * `helper-scripts`
Scripts used during runtime, but not directly executed by the user. All the loaders - applications which are responsible for loading an application written in a certain language and hooking it up to Phusion Passenger - are in this directory. * `doc`
Various documentation. * `test`
Unit tests and integration tests. * `test/support`
Support/utility code, used in the tests. * `test/stub`
Stubbing and mocking code, used in the tests. Less important directories: * `ext/boost`
A stripped-down and customized version of the [Boost C++ library](http://www.boost.org). * `ext/oxt`
The "OS eXtensions for boosT" library, which provides various important functionality necessary for writing robust server software. It provides things like support for interruptable system calls and portable backtraces for C++. Boost was modified to make use of the functionality provided by OXT. * `dev`
Tools for Phusion Passenger developers. Not used during production. * `resources`
Various non-executable resource files, used during production. * `debian`
Debian packaging files. * `rpm`
RPM packaging files. * `man`
Man pages. * `build`
Source code of the build system. ### C++ coding style * Use 4-space tabs for indentation. * Wrap at approximately 80 characters. This is a recommendation, not a hard guideline. You can exceed it if you think it makes things more readable, but try to minimize it. * Use camelCasing for function names, variables, class/struct members and parameters: void frobnicate(); void deleteFile(const char *filename, bool syncHardDisk); int fooBar; Use PascalCasing for classes, structs and namespaces: class ApplicationPool { struct HashFunction { namespace Passenger { * `if` and `while` statements must always have their body enclosed by brackets: if (foo) { ... } Not: if (foo) ... * When it comes to `if`, `while`, `class` and other keywords, put a space before and after the opening and closing parentheses: if (foo) { while (foo) { case (foo) { Not: if(foo){ while (foo) { * You should generally put brackets on the same line as the statement: if (foo) { ... } while (bar) { ... } However, if the main statement is so long that it does not fit on a single line, then the bracket should start at the next line: if (very very long expression && another very very long expression) { ... } * Do not put a space before the opening parenthesis when calling functions. foo(1, 2, 3); Not: foo (1, 2, 3); * Seperate arguments and parts of expressions by spaces: foo(1, 2, foo == bar, 5 + 6); if (foo && bar) { Not: foo(1,2, foo==bar,5+6); if (foo&&bar) { * When declaring functions, puts as much on the same line as possible: void foo(int x, int y); When the declaration becomes too long, wrap at the beginning of an argument and indent with a tab: void aLongMethod(double longArgument, double longArgument2, double longArgument3); If the declaration already starts at a large indentation level (e.g. in a class) and the function has many arguments, or if the names are all very long, then it may be a good idea to wrap at each argument to make the declaration more readable: class Foo { void aLongLongLongLongMethod(shared_ptr sharedFooInstance, shared_ptr myBarFactory, GenerationDir::Entry directoryEntry); * When defining functions outside class declarations, put the return type and any function attributes on a different line than the function name. Put the opening bracket on the same line as the function name. static __attribute__((visibility("hidden"))) void foo() { ... } void Group::onSessionClose() { ... } But don't do that if the function is part of a class declarations: class Foo { void foo() { ... } }; Other than the aforementioned rules, function definitions follow the same rules as function declarations. ### Ruby coding style The usual Ruby coding style applies, with some exceptions: * Use 4-space tabs for indentation. * Return values explicitly with `return`. ### Prefer shared_ptrs You should prefer `shared_ptr`s over raw pointers because they make memory leaks and memory errors less likely. There are only very limited cases in which raw pointers are justified, e.g. optimizations in very hot code paths. ### Event loop callbacks Be careful with event loop callbacks, they are more tricky than one would expect. * If your event loop callback ever calls user-defined functions, either explicitly or implicitly, you should obtain a `shared_ptr` to your `this` object. This is because the user-defined function could call something that would free your object. Your class should derive from `boost::enable_shared_from_this` to make it easy for you to obtain a `shared_ptr` to yourself. void callback(ev::io &io, int revents) { shared_ptr self = shared_from_this(); ... } * Event loop callbacks should catch expected exceptions. Letting an exception pass will crash the program. When system call failure simulation is turned on, the code can throw arbitrary SystemExceptions, so beware of those. ### Thread interruption and RAII destructors When using thread interruption, make sure that RAII destructors are non-interruptable. If your code is interrupted and then a `thread_interrupted` is thrown, make sure that RAII destructors don't check for the interruption flag and then throw `thread_interrupted` again. This not only fails to clean things up properly, but also confuses the exception system, resulting in strange errors such as "terminate called without an active exception". passenger-4.0.37/CONTRIBUTORS000644 000765 000024 00000001727 12233035540 016103 0ustar00honglistaff000000 000000 _why Adam Duke Alex Osborne Alex Tomlins Aman Gupta Andre Ferraz Andre Nathan Andy Allan Benjamin Fleischer Bernd Ahlers Chad Fowler Christoffer Sawicki Damien Le Berrigaud Dan Peterson Danial Pearce Dave Parfitt David Keller David Sissitka Dirk Mueller Dmitry Galinsky Dylan Vaughn Erik Ogan Evan Phoenix Gaspard Bucher Goffert van Gool (Phusion) Gokulnath Manakkattil Gregory Potamianos Hongli Lai (Phusion) Ian Ehlert isaac Isaac Reuben J.W. Koelewijn Jacob Harris James Miller Jan Berkel Jason Cannon jastix Jay Freeman (saurik) John Dewey John Leach Joshua Lund jpatterson Jude Nagurney Luuk Hendriks (Phusion) Magnus Holm Michal Papis MichaƂ Pokrywka Mike Mike Boone Morton Jonuschat Nathaniel Bibler Neil Wilson Ninh Bui (Phusion) Pat Downey Paul Kmiec Perry Smith Philip M. Gollucci Redmar Kerkhoff remi Robin Bowes Ryan Schwartz Ryo Onodera Saimon Moore Sam Pohlenz Sebastian Delmont Slippy Douglas Tim Carey-Smith Tinco Andringa (Phusion) W. Andrew Loe III Weyert de Boer passenger-4.0.37/debian.template/000755 000765 000024 00000000000 12233035540 017250 5ustar00honglistaff000000 000000 passenger-4.0.37/dev/000755 000765 000024 00000000000 12233035540 014772 5ustar00honglistaff000000 000000 passenger-4.0.37/doc/000755 000765 000024 00000000000 12233035540 014761 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/000755 000765 000024 00000000000 12233035540 015014 5ustar00honglistaff000000 000000 passenger-4.0.37/helper-scripts/000755 000765 000024 00000000000 12233035540 017160 5ustar00honglistaff000000 000000 passenger-4.0.37/INSTALL.md000644 000765 000024 00000000553 12233035540 015647 0ustar00honglistaff000000 000000 # Installing Phusion Passenger Please read README.md for installation instructions. If you're having trouble installing Phusion Passenger, please refer to [the manual](http://www.modrails.com/documentation/Users%20guide.html). Documentation and support resources are also available on [the website](https://www.phusionpassenger.com/documentation_and_support). passenger-4.0.37/lib/000755 000765 000024 00000000000 12233035540 014762 5ustar00honglistaff000000 000000 passenger-4.0.37/LICENSE000644 000765 000024 00000002040 12233035540 015215 0ustar00honglistaff000000 000000 Copyright (c) 2010-2013 Phusion Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. passenger-4.0.37/man/000755 000765 000024 00000000000 12233035540 014767 5ustar00honglistaff000000 000000 passenger-4.0.37/NEWS000644 000765 000024 00000214002 12233035540 014712 0ustar00honglistaff000000 000000 Release 4.0.37 -------------- * Improved Node.js compatibility. Calling on() on the request object now returns the request object itself. This fixes some issues with Express, Connect and Formidable. Furthermore, some WebSocket-related issues have been fixed. * Improved Meteor support. Meteor application processes are now shut down quicker. Previously, they linger around for 5 seconds while waiting for all connections to terminate, but that didn't work well because WebSocket connections were kept open indefinitely. Also, some WebSocket-related issues have been fixed. * Introduced a new tool `passenger-config detach-process` for gracefully detaching an application process from the process pool. Has a similar effect to killing the application process directly with `kill `, but killing directly may cause the HTTP client to see an error, while using this command guarantees that clients see no errors. * Fixed a crash occurs when an application fails to spawn, but the HTTP client disconnects before the error page is generated. Fixes issue #1028. * Fixed a symlink-related security vulnerability. Urgency: low Scope: local exploit Summary: writing files to arbitrary directory by hijacking temp directories Affected versions: 4.0.5 and later Fixed versions: 4.0.37 Description: Phusion Passenger creates a "server instance directory" in /tmp during startup, which is a temporary directory that Phusion Passenger uses to store working files. This directory is deleted after Phusion Passenger exits. For various technical reasons, this directory must have a semi-predictable filename. If a local attacker can predict this filename, and precreates a symlink with the same filename that points to an arbitrary directory with mode 755, owner root and group root, then the attacker will succeed in making Phusion Passenger write files and create subdirectories inside that target directory. The following files/subdirectories are created: * control_process.pid * generation-X, where X is a number. If you happen to have a file inside the target directory called `control_process.pid`, then that file's contents are overwritten. These files and directories are deleted during Phusion Passenger exit. The target directory itself is not deleted, nor are any other contents inside the target directory, although the symlink is. Thanks go to Jakub Wilk for discovering this issue. Release 4.0.36 -------------- * [Enterprise] Fixed some Mass Deployment bugs. * [Enterprise] Fixed a bug that causes an application group to be put into Deployment Error Resistance Mode if rolling restarting fails while deployment error resistance is off. Deployment Error Resistance Mode is now only activated if it's explicitly turned on. * Passenger Standalone now gzips JSON responses. * Fixed some cases in which Passenger Standalone does not to properly cleanup its temporary files. Release 4.0.35 -------------- * Fixed some unit tests. Release 4.0.34 -------------- * The Node.js loader code now sets the `isApplicationLoader` attribute on the bootstrapping module. This provides a way for apps and frameworks that check for `module.parent` to check whether the current file is loaded by Phusion Passenger, or by other software that work in a similar way. This change has been introduced to solve a compatibility issue with CompoundJS. CompoundJS users should modify their server.js, and change the following: if (!module.parent) { to: if (!module.parent || module.parent.isApplicationLoader) { * Improved support for Meteor in development mode. Terminating Phusion Passenger now leaves less garbage Meteor processes behind. * It is now possible to disable the usage of the Ruby native extension by setting the environment variable `PASSENGER_USE_RUBY_NATIVE_SUPPORT=0`. * Fixed incorrect detection of the Apache MPM on Ubuntu 13.10. * When using RVM, if you set PassengerRuby/passenger_ruby to the raw Ruby binary instead of the wrapper script, Phusion Passenger will now print an error. * Added support for RVM >= 1.25 wrapper scripts. * Fixed loading passenger_native_support on Ruby 1.9.2. * The Union Station analytics code now works even without native_support. * Fixed `passenger-install-apache2-module` and `passenger-install-nginx-module` in Homebrew. * Binaries are now downloaded from an Amazon S3 mirror if the main binary server is unavailable. * And finally, although this isn't really a change in 4.0.34, it should be noted. In version 4.0.33 we changed the way Phusion Passenger's own Ruby source files are loaded, in order to fix some Debian and RPM packaging issues. The following doesn't work anymore: require 'phusion_passenger/foo' Instead, it should become: PhusionPassenger.require_passenger_lib 'foo' However, we overlooked the fact that this change breaks Ruby apps which use our Out-of-Band GC feature, because such apps had to call `require 'phusion_passenger/rack/out_of_band_gc'`. Unfortunately we're not able to maintain compatibility without reintroducing the Debian and RPM packaging issues. Users should modify the following: require 'phusion_passenger/rack/out_of_band_gc' to: if PhusionPassenger.respond_to?(:require_passenger_lib) # Phusion Passenger >= 4.0.33 PhusionPassenger.require_passenger_lib 'rack/out_of_band_gc' else # Phusion Passenger < 4.0.33 require 'phusion_passenger/rack/out_of_band_gc' end Release 4.0.33 -------------- * Fixed a compatibility problem in passenger-install-apache2-module with Ruby 1.8. The language selection menu didn't work properly. Release 4.0.32 -------------- * Fixed compatibility problems with old Ruby versions that didn't include RubyGems. Release 4.0.31 -------------- * Introduced a new tool: `passenger-config restart-app`. With this command you can initiate an application restart without touching restart.txt. Unlike touching restart.txt, this tool initiates the restart immediately instead of on the next request. * Fixed some problems in process spawning and request handling. * Fixed some problems with the handling of HTTP chunked transfer encoding bodies. These problems only occurred in Ruby. * Fixed the HelperAgent, upon shutdown, not correctly waiting 5 seconds until all clients have disconnected. Fixes issue #884. * Fixed compilation problems on FreeBSD. * Fixed some C++ strict aliasing problems. * Fixed some problems with spawning applications that print messages without newline during startup. Fixes issue #1039. * Fixed potential hangs on JRuby when Ctrl-C is used to shutdown the server. Fixes issue #1035. * When Phusion Passenger is installed through the Debian package, passenger-install-apache2-module now checks whether the Apache module package (libapache2-mod-passenger) is properly installed, and installs it using apt-get if it's not installed. Fixes issue #1031. * The `passenger-status --show=xml` command no longer prints the non-XML preamble, such as the version number and the time. Fixes issue #1037. * The Ruby native extension check whether it's loaded against the right Ruby version, to prevent problems when people upgrade Ruby without recompiling their native extensions. * Various other minor Debian packaging improvements. Release 4.0.30 -------------- * Fixed wrong autogeneration of HTTP Date header. If the web app does not supply a Date header, then Passenger will add one. Unfortunately due to the use of the wrong format string, December 30 2013 is formatted as December 30 2014. As a result, cookies that expire before 2014 would expire on December 30 2013 and December 31 2013. Details can be found at [Github pull request 93](https://github.com/phusion/passenger/pull/93). This issue only affects Phusion Passenger for Nginx and Phusion Passenger Standalone, and does not affect Phusion Passenger for Apache. You can work around this problem in your application by setting a Date header. For example, in Rails you can do: before_filter { response.date = Time.now.utc } Many thanks to Jeff Michael Dean (zilkey) and many others for bringing this to our attention and for providing workarounds and feedback. Release 4.0.29 -------------- * Fixed a compilation problem on OS X Mavericks. Release 4.0.28 -------------- * Introduced a workaround for a GCC 4.6 bug. This bug could cause Phusion Passsenger to crash during startup. Affected operating systems include Ubuntu 12.04 and Amazon Linux 2013.09.01, though not every machine with this OS installed exhibits the problem. See issue #902. * Improved Node.js support: the Sails framework is now supported. * Improved Node.js support: the streams2 API is now supported. * Introduced support for hooks, allowing users to easily extend Phusion Passenger's behavior. * Fixed a bug in the `passenger start -R` option. It was broken because of a change introduced in 4.0.25. * Fixed a bug in PassengerMaxInstancesPerApp. Fixes issue #1016. * Fixed compilation problems on Solaris. * Fixed an encoding problem in the Apache autodetection code. Fixes issue #1026. * The Debian packages no longer depend on libruby. * Application stdout and stderr are now printed without normal Phusion Passenger debugging information, making them easier to read. Release 4.0.27 -------------- * [Apache] Fixed a bug in the Apache module which could lock up the Apache process or thread. This is a regression introduced in version 4.0.24. * Node.js application processes now have friendly process titles. Release 4.0.26 -------------- * Introduced the `PassengerBufferUpload` option for Apache. This option allows one to disable upload buffering, e.g. in order to be able to track upload progress. * [Nginx] The `HTTPS` variable is now set correctly for HTTPS connections, even without setting `ssl on`. Fixes issue #401. * [Standalone] It is now possible to listen on both a normal HTTP and an HTTPS port. * [Enterprise] The `passenger-status` tool now displays rolling restart status. Release 4.0.25 -------------- * The `PassengerAppEnv`/`passenger_app_env`/`--environment` option now also sets NODE_ENV, so that Node.js frameworks like Connect can properly respond to the environment. * Fixed a bug in our Debian/Ubuntu packages causing `passenger-install-nginx-module` not to be able to compile Nginx. * Arbitrary Node.js application structures are now supported. * [Nginx] Introduced the `passenger_restart_dir` option. * [Nginx] Upgraded preferred Nginx version to 1.4.4 because of CVE-2013-4547. Release 4.0.24 -------------- * Introduced the `PassengerNodejs` (Apache) and `passenger_nodejs` (Nginx) configuration options. * [Apache] Introduced the `PassengerErrorOverride` option, so that HTTP error responses generated by applications can be intercepted by Apache and customized using the `ErrorDocument` directive. * [Standalone] It is now possible to specify some configuration options in a configuration file `passenger-standalone.json`. When Passenger Standalone is used in Mass Deployment mode, this configuration file can be used to customize settings on a per-application basis. * [Enterprise] Fixed a potential crash when a rolling restart is triggered while a process is already shutting down. * [Enterprise] Fixed Mass Deployment support for Node.js and Meteor. Release 4.0.23 -------------- * Fixed compilation problems on GCC 4.8.2 (e.g. Arch Linux 2013-10-27). * Fixed a compatibility problem with Solaris /usr/ccs/bin/make: issue #999. * Support for the Meteor Javascript framework has been open sourced. Release 4.0.22 -------------- * [Enterprised] Fixed compilation problems on OS X Mavericks. Release 4.0.21 -------------- * [Nginx] Upgraded the preferred Nginx version to 1.4.3. * Node.js support has been open sourced. * Prelimenary OS X Mavericks support. * Work around an Apache packaging bug in CentOS 5. * Various user friendliness improvements in the documentation and the installers. * Fixed a bug in the always_restart.txt support. Phusion Passenger was looking for it in the wrong directory. * Many Solaris and Sun Studio compatibility fixes. Special thanks to "mark" for his extensive assistance. * [Standalone] The --temp-dir command line option has been introduced. Release 4.0.20 -------------- * Fixed a bug in Phusion Passenger Standalone's daemon mode. When in daemon mode, the Nginx temporary directory was deleted prematurely, causing some POST requests to fail. This was a regression that was introduced in 4.0.15 as part of an optimization. * Fixed compilation problems on Solaris 10 with Sun Studio 12.3. * Improved detection of RVM problems. * It is now possible to log the request method to Union Station. * Introduced a new option, `PassengerLoadShellEnvvars` (Apache) and `passenger_load_shell_envvars` (Nginx). This allows enabling or disabling the loading of bashrc before spawning the application. * [Enterprise] Fixed a packaging problem which caused the flying-passenger executable not to be properly included in the bin path. * [Enterprise] Fixed a race condition which sometimes causes the Flying Passenger socket to be deleted after a restart. Fixes issue #939. * [Enterprise] The `byebug` gem is now supported for debugging on Ruby 2.0. The byebug gem requires a patch before this works: https://github.com/deivid-rodriguez/byebug/pull/29 Release 4.0.19 -------------- * Fixed a problem with response buffering. Application processes are now properly marked available for request processing immediately after they're done sending the response, instead of after having sent the entire response to the client. * The "processed" counter in `passenger-status` is now bumped after the process has handled a request, not at the beginning. * [Enterprise] Fixed an off-by-one bug in the `passenger_max_processes` setting. Release 4.0.18 -------------- * The Enterprise variant of Phusion Passenger Standalone now supports customizing the concurrency model and thread count from the command line. * On Nginx, the Enterprise license is now only checked if Phusion Passenger is enabled in Nginx. This allows you to deploy Nginx binaries, that have Phusion Passenger Enterprise compiled in, to servers that are not actually running Phusion Passenger Enterprise. * Fixed a performance bug in the Union Station support code. In certain cases where a lot of data must be sent to Union Station, the code is now over 100 times faster. * `passenger-status --show=union_station` now displays all clients that are connected to the LoggingAgent. * Added a workaround for Heroku so that exited processes are properly detected as such. * When using Phusion Passenger Standalone with Foreman, pressing Ctrl-C in Foreman no longer results in runaway Nginx processes. * Fixed backtraces in the Apache module. Release 4.0.17 -------------- * Fixed compilation problems on GCC 4.8 systems, such as Arch Linux 2013.04. Fixes issue #941. * Fixed some deprecation warnings when compiling the Ruby native extension on Ruby 2.0.0. * Fixed some Union Station-related stability issues. Release 4.0.16 -------------- * Allow Phusion Passenger to work properly on systems where the user's GID does not have a proper entry in /etc/group, such as Heroku. Release 4.0.15 -------------- * Out-of-band work has been much improved. The number of processes which may perform out-of-band work concurrently has been limited to 1. Furthermore, processes which are performing out-of-band work are now included in the max pool size constraint calculation. However, this means that in order to use out-of-band work, you need to have at least 2 application processes running. Out-of-band work will never be triggered if you just have 1 process. Partially fixes issue #892. * Phusion Passenger now displays an error message to clients if too many requests are queued up. By default, "too many" is 100. You may customize this with `PassengerMaxRequestQueueSize` (Apache) or `passenger_max_request_queue_size` (Nginx). * A new configuration option, `PassengerStartTimeout` (Apache) and `passenger_start_timeout` (Nginx), has been added. This option allows you to specify a timeout for application startup. The startup timeout has exited since version 4.0.0, but before version 4.0.15 it was hardcoded at a value of 90 seconds. Now it is customizable. Fixes issue #936. * [Enterprise] The `PassengerMaxRequestTime`/`passenger_max_request_time` feature is now available for Python and Node.js as well, and is no longer limited to just Ruby. Fixes issue #938. * [Nginx] Introduced a configuration option `passenger_intercept_errors`, which decides if Nginx will intercept responses with HTTP status codes of 400 and higher. Its effect is similar to `proxy_intercept_errors`. * [Standalone] Memory usage optimization: when `passenger start` is run with `--daemonize`, the frontend exits after starting the Nginx core. This saves ~20 MB of memory per `passenger start` instance. * [Standalone] Phusion Passenger Standalone is now also packaged in the Debian packages. * [Standalone] Fix a problem with the `passenger stop` command on Ruby 1.8.7. The 'thread' library was not properly required, causing a crash. * [Standalone] There is now builtin support for SSL. * Fix a crash when multiple `passenger_pass_header` directives are set. Fixes issue #934. * Permissions on the server instance directory are now explicitly set with chmod, so that permissions are correct on systems with a non-default umask. Fixes issue #928. * Fix permission problems when running `passenger start` with `--user`. * `passenger-config --detect-apache2` now correctly detects the eror log filename on Amazon Linux. Fixes issue #933. * An environment variable `PASSENGER_THREAD_LOCAL_STORAGE` has been added to the build system for forcefully disabling the use of thread-local storage within the Phusion Passenger codebase. This flag useful on systems that have broken support for thread-local storage, despite passing our build system's check for proper thread-local storage support. At the time of writing, one user has reported that Ubuntu 12.04 32-bit has broken thread-local storage report although neither the reporter nor us were able to reproduce the problem on any other systems running Ubuntu 12.04 32-bit. Note that this flag has no effect on non-Phusion Passenger code. Fixes issue #937. * It is now possible to preprocess events before they are sent to Union Station. This is useful for removing confidential data as demonstrated in this example `config/initializers/passenger.rb` file: if defined?(PhusionPassenger) event_preprocessor = lambda do |e| e.payload[:sql].gsub!("secret","PASSWORD") if e.payload[:sql] end PhusionPassenger.install_framework_extensions!(:event_preprocessor => event_preprocessor) end Release 4.0.14 -------------- * Fixed a bug in Passenger Standalone's source compiler, for the specific case when the downloaded Nginx binary doesn't work, and compilation of the Nginx binary did not succeed the first time (e.g. because of missing dependencies). * Precompiled Ruby native extensions are now automatically downloaded. Release 4.0.13 -------------- * Updated preferred Nginx version to 1.4.2. * Worked around the fact that FreeBSD 9.1 has a broken C++ runtime. Patch contributed by David Keller. * Autogenerated HTTP Date headers are now in UTC instead of local time. This could cause cookies to have the wrong expiration time. Fixes issue #913. * Fixed compatibility problems with Ruby 1.8.6 (issue #924). * Introduced a tool, `passenger-config --detect-apache2`, which autodetects all Apache installations on the system along with their parameters (which apachectl command to run, which log file to read, which config file to edit). The tool advises users about how to use that specific Apache installation. Useful if the user has multiple Apache installations but don't know about it, or when the user doesn't know how to work with multiple Apache installations. * Added an API for better Rack socket hijacking support. * Added a hidden configuration option for customizing the application start timeout. A proper configuration option will be introduced in the future. * Added autodetection support for Amazon Linux. * Fixed process metrics collection on some operating systems. Some systems' 'ps' command expect no space between -p and the list of PIDs. Release 4.0.10 -------------- * Fixed a crash in PassengerWatchdog which occurs on some OS X systems. * Fixed exception reporting to Union Station. * Improved documentation. Release 4.0.9 ------------- * [Enterprise] Fixed a problem with passenger-irb. Release 4.0.8 ------------- * Fixed a problem with graceful web server restarts. When you gracefully restart the web server, it would cause Phusion Passenger internal sockets to be deleted, thus causing Phusion Passenger to go down. This problem was introduced in 4.0.6 during the attempt to fix issue #910. * The PassengerRestartDir/passenger_restart_dir now accepts relative filenames again, just like in Phusion Passenger 3.x. Patch contributed by Ryan Schwartz. * Documentation updates contributed by Gokulnath Manakkattil. * [Enterprise] Fixed a license key checking issue on some operating systems, such as CentOS 6. Release 4.0.7 ------------- * There was a regression in 4.0.6 that sometimes prevents PassengerLoggingAgent from starting up. Unfortunately this slipped our release testing. This regression has been fixed and we've updated our test suite to check for these kinds of regressions. Release 4.0.6 ------------- * Fixed a potential 100% CPU lock up in the crash handler, which only occurs on OS X. Fixes issue #908. * Fixed a crash in request handling, when certain events are trigger after the client has already disconnected. Fixes issue #889. * Phusion Passenger will no longer crash when the Phusion Passenger native_support Ruby extension cannot be compiled, e.g. because the Ruby development headers are not installed or because the current user has no permission to save the native extension file. Fixes issue #890. * Fixed OS X 10.9 support. Fixes issue #906. * Removed dependency on bash, so that Phusion Passenger works out of the box on BSD platforms without installing/configuring bash. Fixes issue #911. * Fix 'PassengerPoolIdleTime 0' not being respected correctly. Issue #904. * Admin tools improvement: it is now possible to see all currently running requests by invoking `passenger-status --show=requests`. * A new feature called Flying Passenger allows you to decouple the life time of Phusion Passenger from the web server, so that both can be restarted indepedently from each other. Please refer to http://blog.phusion.nl/2013/07/03/technology-preview-introducing-flying-passenger/ for an introduction. * [Apache] Fixed compatibility with Apache pipe logging. Previously this would cause Phusion Passenger to lock up with 100% CPU during Apache restart. * [Nginx] The Nginx configure script now checks whether 'ruby' is in $PATH. Previously, if 'ruby' is not in $PATH, then the compilation process fails with an obscure error. * [Nginx] passenger-install-nginx-module now works properly even when Phusion Passenger is installed through the Debian packages. Before, the installer would tell you to install Phusion Passenger through the gem or tarball instead. * [Enterprise] Added pretty printing helpers to the Live IRB Console. * Fixed permissions on a subdirectory in the server instance directory. The server instance directory is a temporary directory that Phusion Passenger uses to store working files, and is deleted after Phusion Passenger exits. A subdirectory inside it is world-writable (but not world-readable) and is used for storing Unix domain sockets created by different apps, which may run as different users. These sockets had long random filenames to prevent them from being guessed. However because of a typo, this subdirectory was created with the setuid bit, when it should have sticky bit (to prevent existing files from being deleted or renamed by a user that doesn't own the file). This has now been fixed. * If the server instance directory already exists, it will now be removed first in order get correct directory permissions. If the directory still exists after removal, Phusion Passenger aborts to avoid writing to a directory with unexpected permissions. Fixes issue #910. * The installer now checks whether the system has enough virtual memory, and prints a helpful warning if it doesn't. * Linux/AArch64 compatibility fixes. Patch contributed by Dirk Mueller. * Improved documentation. Release 4.0.5 ------------- * [Standalone] Fixed a regression that prevented Passenger Standalone from starting. Fixes issue #899. * Fixed security vulnerability CVE-2013-2119. Urgency: low Scope: local exploit Summary: denial of service and arbitrary code execution by hijacking temp files Affected versions: all versions Fixed versions: 3.0.21 and 4.0.5 Description: Phusion Passenger's code did not always create temporary files and directories in a secure manner. Temporary files and directories were sometimes created with a predictable filename. A local attacker can pre-create temporary files, resulting in a denial of service. In addition, this vulnerability allows a local attacker to run arbitrary code as another user, by hijacking temporary files. By pre-creating certain temporary files with certain permissions, attackers can prevent Passenger Standalone from starting (denial of service). By pre-creating certain temporary files with certain other permissions, attackers can trick `passenger start` and the build system (which is invoked by `passenger-install-apache2-module`/`passenger-install-nginx-module`) to run arbitrary code. The user that the code is run as, is equal to the user that ran `passenger start` or the build system. Attacks of this nature have to be timed exactly right. The attacker must overwrite the file contents right after Phusion Passenger has created the file contents, but right before the file is used. In the context of `passenger start`, the vulnerable window begins right after Passenger Standalone has created the Nginx config file, and ends when Nginx has read the config file. Once Nginx has started and initialized, the system is no longer vulnerable. `passenger stop` and other Passenger Standalone commands besides `start` are not vulnerable. In the context of the build system, the vulnerable window begins when `passenger-install-apache2-module`/`passenger-install-nginx-module` prints its first dependency checking message, and ends when it prints the first compiler command. Only the `passenger start` command, the `passenger-install-apache2-module` command and the `passenger-install-nginx-module` commands are vulnerable. Phusion Passenger for Apache and Phusion Passenger for Nginx (once they are installed) are not vulnerable. Fixed versions: 3.0.21 and 4.0.5 have been released to address this issue. Workaround: You can use this workaround if you are unable to upgrade. Before invoking any Phusion Passenger command, set the `TMPDIR` environment variable to a directory that is not world-writable. Special care must be taken when you use sudo: sudo resets all environment variables, so you should either invoke sudo with `-E`, or you must set the environment variable after gaining root privileges with sudo. Release 4.0.4 ------------- * Fixed autodetection of noexec-mount /tmp directory. Fixes issue #850 and issue #625. * Fixed a WSGI bug. wsgi.input was a file object opened in text mode, but should be opened in binary mode. Fixes issue #881. * Fixed a potential crash in Out-of-Band Work. Fixes issue #894. * Fixed a potential crash in rolling restarting, which only occurs if a process was also being spawned at the same time. Fixes issue #896. * [Apache] The RailsBaseURI and RackBaseURI directives have been unified. For a long time, RailsBaseURI told Phusion Passenger that the given sub-URI belongs to a **Rails 2** application. Attempt to use this directive with Rails 3 or with Rack applications would result in an error. Because this confused users, RailsBaseURI and RackBaseURI have now been unified and can now be used interchangably. Phusion Passenger will automatically detect what kind of application it is. The Nginx version already worked like this. Fixes issue #882. * [Standalone] The Passenger Standalone temp directory and PassengerWatchdog server instance directory have been unified. PassengerWatchdog already automatically updates the timestamps of all files in its server instance directory every 6 hours to prevent /tmp cleaners from deleting the directory. Therefore this unification prevents the Passenger Standalone temp directory to be deleted by /tmp cleaners as well. Fixes issue #654. * [Standalone] types_hash_max_size has been increased from 1024 to 2048. This solves a problem that causes Nginx not to start on some platforms. Contributed by Jan-Willem Koelewijn. Release 4.0.3 ------------- * Better protection is now provided against application processes that are stuck and refuse to shut down cleanly. Since version 4.0.0, Phusion Passenger already forcefully shuts down all processes during web server shutdown. In addition to this, 4.0.3 now also forcefully shuts down processes that take more than 1 minute to shut down, even outside the context of web server shutdowns. This feature does not, however, protect against requests that take too long. Use PassengerMaxRequestTime (Apache) or passenger_max_request_time (Nginx) for that. * Fixed a crash in the HelperAgent which results in frequent process restarts in some traffic patterns. Fixes issue #862. * Fixed a problem that prevents processes from being spawned correctly if the user's bashrc changes working directory. Fixes issue #851. * passenger-status now also displays CPU usage. * The installer now checks for checksums when automatically downloading PCRE and Nginx. Contributed by Joshua Lund. * An error is now printed when trying to daemonize Phusion Passenger Standalone on Ruby implementations that don't support forking. Contributed by Benjamin Fleischer. * Although Phusion Passenger already supported JRuby, *installing* Phusion Passenger with JRuby was not possible. This has been fixed. * Various other minor bug fixes. Release 4.0.2 ------------- * Bumped the preferred Nginx version to 1.4.1 because of a critical Nginx security vulnerability, CVE-2013-2028. Users are advised to upgrade immediately. Release 4.0.1 ------------- * Fixed a crasher bug in the Deployment Error Resistance feature. * Fixed a bug in PassengerDefaultUser and PassengerDefaultGroup. * Fixed a bug which could cause application processes to exit before they've finished their request. * Fixed some small file descriptor leaks. * Bumped the preferred Nginx version to 1.4.0. * Editing the Phusion Passenger Standalone Nginx config template is no longer discouraged. * Improved documentation. Release 4.0.0 release candidate 6 --------------------------------- * WebSocket support on Nginx. Requires Nginx >= 1.3.15. * Improved RVM support. * Performance optimizations. * Various bug fixes. Release 4.0.0 release candidate 5 --------------------------------- * The default config snippet for Apache has changed! It must now contain a `PassengerDefaultRuby` option. The installer has been updated to output this option. The `PassengerRuby` option still exists, but it's only used for configuring different Ruby interpreters in different contexts. Please refer to the manual for more information. * We now provide GPG digital signatures for all file releases by Phusion. More information can be found in the manual. * `passenger-status` now displays process memory usage and time when it was last used. The latter fixes issue #853. * Exceptions in Rack application objects are now caught to prevent application processes from exiting. * The `passenger-config` tool now supports the `--ruby-command` argument, which helps the user with figuring out the correct Ruby command to use in case s/he wants to use multiple Ruby interpreters. The manual has also been updated to mention this tool. * Fixed streaming responses on Apache. * Worked around an OS X Unix domain socket bug. Fixes issue #854. * Out-of-Band Garbage Collection now works properly when the application has disabled garbage collection. Fixes issue #859. * Fixed support for /usr/bin/python on OS X. Fixes issue #855. * Fixed looping-without-sleeping in the ApplicationPool garbage collector if PassengerPoolIdleTime is set to 0. Fixes issue #858. * Fixed some process memory usage measurement bugs. * Fixed process memory usage measurement on NetBSD. Fixes issue #736. * Fixed a file descriptor leak in the Out-of-Band Work feature. Fixes issue #864. * The PassengerPreStart helper script now uses the default Ruby interpreter specified in the web server configuration, and no longer requires a `ruby` command to be in `$PATH`. * Updated preferred PCRE version to 8.32. * Worked around some RVM bugs. * The ngx_http_stub_status_module is now enabled by default. * Performance optimizations. Release 4.0.0 release candidate 4 --------------------------------- * Fixed compilation on systems where /tmp is mounted noexec. * Fixed some memory corruption bugs. * Improved debugging messages. * Phusion Passenger Standalone now sets underscores_in_headers. Fixes issue #708. * Fixed some process spawning compatibility problems, as reported in issue #842. * The Python WSGI loader now correctly shuts down client sockets even when there are child processes that keep the socket open. * A new configuration option PassengerPython (Apache) and passenger_python (Nginx) has been added so that users can customize the Python interpreter on a per-application basis. Fixes issue #852. * The Apache module now supports file uploads larger than 2 GB when on 32-bit systems. Fixes issue #838. * The Nginx version now supports the `passenger_temp_dir` option. * Environment variables set in the Nginx configuration file (through the `env` config option) are now correctly passed to all application processes. Fixes issue #371. * Fixed support for RVM mixed mode installations. Fixes issue #828. * Phusion Passenger now outputs the Date HTTP header in case the application didn't already do that (and was violating the HTTP spec). Fixes issue #485. * Phusion Passenger now checks whether /dev/urandom isn't broken. Fixes issue #516. Release 3.9.5 (4.0.0 release candidate 3) ----------------------------------------- * Fixed Rake autodetection. Release 3.9.4 (4.0.0 release candidate 2) ----------------------------------------- * More bug fixes. * More documentation updates. * Better crash diagnostics. Release 3.9.3 (4.0.0 release candidate 1) ----------------------------------------- * The Nginx version now supports the `passenger_app_root` configuration option. * The Enterprise memory limiting feature has been extended to work with non-Ruby applications as well. * Application processes that have been killed are now automatically detected within 5 seconds. Previously Phusion Passenger needed to send a request to the process before detecting that it's gone. This change means that when you kill a process by sending it a signal, Phusion Passenger will automatically respawn it within 5 seconds (provided that the process limit settings allow respawning). * Phusion Passenger Standalone's HTTP client body limit has been raised from 50 MB to 1 GB. * Python 3 support has been added. * The build system has been made compatible with JRuby and Ruby 2.0. * The installers now print a lot more information about detected system settings so that the user can see whether something has been wrongly detected. * Some performance optimizations. These involve further extending the zero-copy architecture, and the use of hash table maps instead of binary tree maps. * Many potential crasher and freezer bugs have been fixed. * Error diagnostics have been further improved. * Many documentation improvements. Release 3.9.2 (4.0.0 beta 2) ---------------------------- * New feature: JRuby and Rubinius support. * New feature: Out of Band Work. * Sending SIGBART to a Ruby process will now trigger the same behavior as SIGQUIT - that is, it will print a backtrace. This is necessary for proper JRuby support because JRuby cannot catch SIGQUIT. * Rolling restarts and depoyment error resistance are now also available in Phusion Passenger Standalone in the Enterprise version. * System call failure simulation framework. * Improved crash reporting. * Many documentation improvements. * Many bug fixes. Release 3.9.1 (4.0.0 beta 1) ---------------------------- This is the first beta of Phusion Passenger 4. The changes are numerous. * Support for multiple Ruby versions. * The internals now use evented I/O. * Real-time response buffering. * Improved zero-copy architecture. * Rewritten ApplicationPool and process spawning subsystem. * Multithreading within Ruby apps (Phusion Passenger Enterprise only). * Python WSGI support lifted to "beta" status. * More protection against stuck processes. * Automatically picks up environment variables from your bashrc. * Allows setting environment variables directly in Apache. * Automatic asset pipeline support in Standalone. * Deleting restart.txt no longer triggers a restart. * More stable Union Station support. * Many internal robustness improvements. * Better relocatability without wasting space. Release 3.0.21 -------------- * Rebootstrapped the libev configure to fix compilation problems on Solaris 11. * Fixed support for RVM mixed mode installations. Fixes issue #828. * Fixed encoding problems in Phusion Passenger Standalone. * Changed preferred Nginx version to 1.2.9. * Catch exceptions raised by Rack application objects. * Fix for CVE-2013-2119. Details can be found in the announcement for version 4.0.5. * Version 3.0.20 was pulled because its fixes were incomplete. Release 3.0.19 -------------- * Nginx security fix: do not display Nginx version when server_tokens are off. * Fixed compilation problems on some systems. * Fixed some Union Station-related bugs. Release 3.0.18 -------------- * Fixed compilation problems on Fedora 17. * Fixed Union Station compatibility with Rails 3.2. * Phusion Passenger Enterprise Standalone now supports rolling restarts and deployment error resistance. Release 3.0.17 -------------- * Fixed a Ruby 1.9 encoding-related bug in the memory measurer. (Phusion Passenger Enterprise) * Fixed OOM adjustment bugs on Linux. * Fixed compilation problems on Fedora 18 and 19. * Fixed compilation problems on SunOS. * Fixed compilation problems on AIX. Contribution by Perry Smith. * Fixed various compilation warnings. * Upgraded preferred Nginx version to 1.2.3. 3.0.16 was an unofficial hotfix release, and so its announcement had been skipped. Release 3.0.15 -------------- * Updated documentation. * Updated website links. Release 3.0.14 -------------- * [Apache] Fixed a long-standing mod_rewrite-related problem. Some mod_rewrite rules would not work, but it depends on the exact mod_rewrite configuration so it would work for some people but not for others. Issue #563. Thanks a lot to cedricmaion for providing information on the nature of the bug and to peter.nash55 for providing a VM that allowed us to reproduce the problem. * [Nginx] Preferred Nginx version to 1.2.2. The previously preferred version was 1.2.1. * Cleared some confusing terminology in the documentation. * Fixed some Ruby 1.9 encoding problems. Release 3.0.13 -------------- * [Nginx] Preferred Nginx version upgraded to 1.2.1. * Fixed compilation problems on FreeBSD 6.4. Fixes issue #766. * Fixed compilation problems on GCC >= 4.6. * Fixed compilation problems on OpenIndiana and Solaris 11. Fixes issue #742. * Union Station-related bug fixes. * Sending the soft termination signal twice to application processes no longer makes them crash. Patch contributed by Ian Ehlert. Release 3.0.12 -------------- * [Apache] Support Apache 2.4. The event MPM is now also supported. * [Nginx] Preferred Nginx version upgraded to 1.0.15. * [Nginx] Preferred PCRE version upgraded to 8.30. * [Nginx] Fixed compatibility with Nginx < 1.0.10. * [Nginx] Nginx is now installed with http_gzip_static_module by default. * [Nginx] Fixed a memory disclosure security problem. The issue is documented at http://www.nginx.org/en/security_advisories.html and affects more modules than just Phusion Passenger. Users are advised to upgrade as soon as possible. Patch submitted by Gregory Potamianos. * [Nginx] passenger_show_version_in_header now hides the Phusion Passenger version number from the 'Server:' header too. Patch submitted by Gregory Potamianos. * Fixed a /proc deprecation warning on Linux kernel >= 3.0. Release 3.0.11 -------------- * Fixed a compilation problem on platforms without alloca.h, such as FreeBSD 7. * Improved performance and solved some warnings on Xen systems by compiling with `-mno-tls-direct-seg-refs`. Patch contributed by MichaƂ Pokrywka. Release 3.0.10 -------------- * [Nginx] Dropped support for Nginx versions older than 1.0.0 * [Nginx] Fixed support for Nginx 1.1.4+ * [Nginx, Standalone] Upgraded default Nginx version to 1.0.10 The previously default version was 1.0.5. * [Nginx] New option passenger_max_requests This is equivalent to the PassengerMaxRequests option in the Apache version: Phusion Passenger will automatically shutdown a worker process once it has processed the specified number of requests. Contributed by Paul Kmiec. * [Apache] New option PassengerBufferResponse The Apache version did not buffer responses. This could block the Ruby worker process in case of slow clients. We now enable response buffering by default. It can be turned off through this option. Feature contributed by Ryo Onodera. * Fixed remaining Ruby 1.9.3 compatibility problems We already supported Ruby 1.9.3 since 3.0.8, but due to bugs in Ruby 1.9.3's build system Phusion Passenger would fail to detect Ruby 1.9.3 features on some systems. Fixes issue #714. * Fixed a bug in PassengerPreStart A regression was introduced in 3.0.8, causing the prespawn script to connect to the host name instead of to 127.0.0.1. Fix contributed by Andy Allan. * Fixed compatibility with GCC 4.6 Affected systems include Ubuntu 11.10. * Fixed various compilation problems. * Fixed some Ruby 1.9 encoding problems. * Fixed some Ruby 1.9.3 deprecation warnings. Release 3.0.9 ------------- * [Nginx] Fixed a NULL pointer crash that occurs on HTTP/1.0 requests when the Host header isn't given. * Fixed deprecation warnings on RubyGems >= 1.6. * Improved Union Station support stability. Release 3.0.8 ------------- * [Nginx] Upgraded preferred Nginx version to 1.0.5. * [Nginx] Fixed various compilation problems on various platforms. * [Nginx] We now ensure that SERVER_NAME is equal to HTTP_HOST without the port part. This is needed for Rack compliance. By default Nginx sets SERVER_NAME to whatever is specified in the server_name directive, but that's not necessarily the correct value. This fixes, for example, the use of the 'map' statement in config.ru. * [Nginx] Added the options passenger_buffer_size, passenger_buffers and passenger_busy_buffers_size. These options are similar to proxy_module's similarly named options. You can use these to e.g. increase the maximum header size limit. * [Nginx] passenger_pre_start now supports virtual hosts that listen on Unix domain sockets. * [Apache] Fixed the pcre.h compilation problem. * [Standalone] Fixed 'passenger stop'. It didn't work properly because it kept waiting for 'tail' to exit. We now properly terminate 'tail' as well. * Fixed compatibility with Rake 0.9. * Fixed various Ruby 1.9 compatibility issues. * Various documentation improvements. * New Union Station filter language features. It now supports status codes and response times. Please refer to https://engage.unionstationapp.com/help#filtering for more information. Release 3.0.7 ------------- * Fixed a bug passenger-install-apache2-module. It could crash on some systems due to a typo in the code. * Upgraded preferred Nginx version to 1.0.0. * Phusion Passenger Standalone now pre-starts application processes at startup instead of doing that at the first request. * When sending data to Union Station, the HTTP status code is now also logged. * Various Union Station-related stability improvements. * The Linux OOM killer was previously erroneously disabled for all Phusion Passenger processes, including application processes. The intention was to only disable it for the Watchdog. This has been fixed, and the Watchdog is now the only process for which the OOM killer is disabled. * Fixed some compilation problems on OpenBSD. * Due to a typo, the dependency on file-tail was not entirely removed in 3.0.6. This has now been fixed. Release 3.0.6 ------------- * Fixed various compilation problems such as XCode 4 support and OpenBSD support. * Fixed various Union Station-related stability issues. * Fixed an issue with host name detection on certain platforms. * Improved error logging in various parts. * The dependency on the file-tail library has been removed. * During installation, check whether /tmp is mounted with 'noexec'. Phusion Passenger's installer relies on /tmp *not* being mounted with 'noexec'. If it is then the installer will now show a helpful error message instead of bailing out in a confusing manner. Users can now tell the installer to use a different directory for storing temporary files by customizing the $TMPDIR environment variable. * Phusion Passenger Standalone can now run Rackup files that are not named 'config.ru'. The filename can be passed through the command line using the -R option. Release 3.0.5 ------------- * [Apache] Fixed Union Station process statistics collection Union Station users that are using Apache may notice that no process information show up in Union Station. This is because of a bug in Phusion Passenger's Apache version, which has now been fixed. * [Apache] PassengerAnalytics has been renamed to UnionStationSupport This option has been renamed for consistency reasons. * [Nginx] passenger_analytics has been renamed to union_station_support This option has been renamed for consistency reasons. * Fixed Union Station data sending on older libcurl versions Some Union Station users have reported that their data don't show up. Upon investigation this turned out to be a compatibility with older libcurl versions. Affected systems include all RHEL 5 based systems, such as RHEL 5.5 and CentOS 5.5. We've now fixed compatibility with older libcurl versions. * Added support for the Union Station filter language This language can be used to limit the kind of data that's sent to Union Station. Please read https://engage.unionstationapp.com/help#filtering for details. * Fixed a PassengerMaxPoolSize/passenger_max_pool_size violation bug People who host a lot of different applications on Phusion Passenger may notice that it sometimes spawns more processes than is allowed by PassengerMaxPoolSize/passenger_max_pool_size. This has been fixed. Release 3.0.4 ------------- * [Apache] Changed mod_dir workaround hook priority Phusion Passenger temporarily disables mod_dir on all Phusion Passenger-handled requests in order to avoid conflicts. In order to do this it registers some Apache hooks with the APR_HOOK_MIDDLE priority, but it turned out that this breaks some other modules like mod_python. The hook priority has been changed to APR_HOOK_LAST to match mod_dir's hook priorities. Issue reported by Jay Freeman. * Added support for Union Station: http://www.unionstationapp.com/ * Some error messages have been improved. Release 3.0.3 ------------- * [Nginx] Preferred Nginx version upgraded to 0.8.54 The previous preferred version was 0.8.53. * PATH_INFO and REQUEST_URI now contain the original escaped URI Phusion Passenger passes the URI, as reported by Apache/Nginx, to application processes through the PATH_INFO and REQUEST_URI variables. These variables are supposed to contain the original, unescaped URI, e.g. /clubs/%C3%BC. Both Apache and Nginx thought that it would be a good idea to unescape the URI before passing it to modules like Phusion Passenger, thereby causing PATH_INFO and REQUEST_URI to contain the unescaped URI, e.g. /clubs/ĂŒ. This causes all sorts of encoding problems. We now manually re-escape the URI when setting PATH_INFO and REQUEST_URI. Issue #404. * The installer no longer detects directories as potential commands Previously the installer would look in $PATH for everything that's executable, including directories. If one has /usr/lib in $PATH and a directory /usr/lib/gcc exists then the installer would recognize /usr/lib/gcc as the compiler. We now explicitly check whether the item is also a file. * PseudoIO now responds to #to_io Phusion Passenger sets STDERR to a PseudoIO object in order to capture anything written to STDERR during application startup. This breaks some libraries which expect STDERR to respond to #to_io. This has now been fixed. Issue #607. * Fixed various other minor bugs See the git commit log for details. Release 3.0.2 ------------- * [Nginx] Fixed compilation problems The Nginx compilation process was broken due to not correctly reverting the working directory of the Nginx configure script. This has been fixed: issue #595. * [Nginx] Fixed crash if passenger_root refers to a nonexistant directory Issue #599. * Fixed compilation problems on NetBSD There was a typo in a NetBSD-specific fcntl() call. It also turns out that NetBSD doesn't support some ISO C99 math functions like llroundl(); this has been worked around by using other functions. Issue #593. * Fixed file descriptor closing issues on FreeBSD Phusion Passenger child processes didn't correct close file descriptors on FreeBSD because it queries /dev/fd to do that. On FreeBSD /dev/fd only returns meaningful results if fdescfs is mounted, which it isn't by default. Issue #597. Release 3.0.1 ------------- * MUCH faster compilation We've applied code aggregation techniques, allowing Phusion Passenger to be compiled much quicker now. For example, compiling the Nginx component (not Nginx itself) on a MacBook Pro now takes only 29 seconds instead of 51 seconds, an improvement of 75%! Compiling the Apache module on a slower Dell Inspiron now takes 39 seconds instead of 1 minute 22 seconds, or 110% faster! * Fixed malfunction after web server restart On Linux systems that have a non-standard filesystem on /tmp, Phusion Passenger could malfunction after restarting the web server because of a bug that's only triggered on certain filesystems. Issue #569. * Boost upgraded to version 1.44.0. We were on 1.42.0. * Much improved startup error messages Phusion Passenger performs many extensive checks during startup to ensure integrity. However the error message in some situation could be vague. These startup error messages have now been improved dramatically, so that if something goes wrong during startup you will now more likely know why. * Curl < 7.12.1 is now supported The previous version fails to compile with Curl versions earlier than 7.12.1. Issue #556. * passenger-make-enterprisey fixed This is the command that people can run after donating. It allows people to slightly modify Phusion Passenger's display name as a joke. In 3.0.0 it was broken because of a typo. This has been fixed. * Removed passenger-stress-test This tool was used during the early life of Phusion Passenger for stress testing websites. Its performance has never been very good and there are much better tools for stress testing, so this tool has now been removed. * [Apache] RailsEnv and RackEnv configuration options are now equivalent In previous versions, RailsEnv only had effect on Rails 1 and Rails 2 apps while RackEnv only had effect on Rack apps. Because Rails 3 apps are considered Rack apps, setting RailsEnv had no effect on Rails 3 apps. Because this is confusing to users, we've now made RailsEnv and RackEnv equivalent. Issue #579. * [Nginx] Fixed compilation problems on systems with unpowerful shells Most notably Solaris. Its default shell does not support some basic constructs that we used in the Nginx configure script. * [Nginx] Upgraded default Nginx version to to 0.8.53 The previous default was 0.8.52. * [Nginx] passenger_enabled now only accepts 'on' or 'off' values Previously it would recognize any value not equal to 'on' as meaning 'off'. This caused confusion among users who thought they could also specify 'true', so we now throw a proper error if the value is unrecognized. Fixes issue #583. Release 3.0.0 ------------- This is a major release with many changes. Please read our blog for details. Release 2.2.15 -------------- * [Apache] Fixed incorrect temp dir cleanup by passenger-status On some systems, running passenger-status could print the following message: *** Cleaning stale folder /tmp/passenger.1234 ...after which Phusion Passenger breaks because that directory is necessary for it to function properly. The cause of this problem has been found and has been fixed. * [Apache] Fixed some upload handling problems Previous versions of Phusion Passenger check whether the size of the received upload data matches the contents of the Content-Length header as received by the client. It turns out that there could be a mismatch e.g. because of mod_deflate input compression, so we can't trust Content-Length anyway and we're being too strict. The check has now been removed. * [Nginx] Fixed compilation issues with Nginx >= 0.7.66 Thanks to Potamianos Gregory for reporting this issue. Issue #500. * [Nginx] Default Nginx version changed to 0.7.67 The previous default version was 0.7.65. * Fixed more Bundler problems Previous versions of Phusion Passenger would preload some popular libraries such as mysql and sqlite3 in order to utilize copy-on-write optimizations better. However this behavior conflicts with Bundler so we've removed it. Release 2.2.14 -------------- * Added support for Rubinius Patch contributed by Evan Phoenix. * Fixed a mistake in the SIGQUIT backtrace message. Patch contributed by Christoffer Sawicki. * [Nginx] Fix a localtime() crash on FreeBSD This was caused by insufficient stack space for threads. Issue #499. Release 2.2.13 -------------- * Fixed some Rails 3 compatibility issues that were recently introduced. * Fixed a typo that causes config/setup_load_paths.rb not to be loaded correctly. Release 2.2.12 -------------- * Improved Bundler support. Previous versions might not be able to correctly load gems bundled by Bundler. We've also documented how our Bundler support works and how to override our support if you need special behavior. Please refer to the Phusion Passenger Users Guide, section "Bundler support". * Worked around some user account handling bugs in Ruby. Issue #192. * Fixed some Ruby 1.9 tempfile.rb compatibility problems. * Fixed some compilation problems on some ARM Linux platforms. * [Apache] Suppress bogus mod_xsendfile-related error messages. When mod_xsendfile is being used, Phusion Passenger might print bogus error messages like "EPIPE" or "Apache stopped forwarding the backend's response" to the log file. These messages are normal, are harmless and can be safely ignored, but they pollute the log file. So in this release we've added code to suppress these messages when mod_xsendfile is being used. Issue #474. * [Nginx] Fixed "passenger_user_switching off" permission problems If Nginx is running as root and passenger_user_switching is turned off, then Phusion Passenger would fail to initialize because of a permission problem. This has been fixed. Issue #458. * [Nginx] Nginx >= 0.8.38 is now supported. Thanks to Sergey A. Osokin for reporting the problem. * [Nginx] passenger-install-nginx-module upgraded It now defaults to installing Nginx 0.7.65 instead of 0.7.64. Release 2.2.11 -------------- * This release fixes a regression that appeared in 2.2.10 which only affects Apache. When under high load, Apache might freeze and stop responding to requests. It is caused by a race condition which is why it escaped our last release testing. This problem does not affect Nginx; you only have to upgrade if you're using Apache. http://groups.google.com/group/phusion-passenger/t/d5bb2f17c8446ea0 Release 2.2.10 -------------- * Fixed some Bundler compatibility problems. * Fixed some file descriptor passing problems, which previously could lead to mysterious crashes. * Fixed some compilation problems on newer GCC versions. Issue #430. * Support #size method in rack.input. Release 2.2.9 ------------- * Fixed compatibility with Rails 3. Actually, previous Phusion Passenger releases were already compatible with Rails 3, depending on the spawn method that would be invoked. Here's the story: Since Phusion Passenger 2.2.8, when the file config.ru exists, Phusion Passenger will treat the app as a Rack app, not as a Rails app. This is in contrast to earlier versions which gave Rails detection more priority than Rack detection. Phusion Passenger loads Rack apps and Rails apps in different ways. The Rails loader was not compatible with Rails 3, which is what we've fixed in this release. That said, a Rails 3 app would have worked out-of-the-box on Phusion Passenger 2.2.8 as well because Rails 3 apps include a config.ru file by default, causing Phusion Passenger 2.2.8 to use the Rack loader. Earlier versions of Phusion Passenger would just completely bail out because they'd use the Rails loader. That said, with 2.2.9 there are still some caveats: - Smart spawning (the mechanism with which REE's 33% memory reduction is implemented) is *not* supported for Rack apps. This means that if you want to utilize smart spawning with Rails 3, then you should remove your config.ru file. - Rails 3 depends on Rack 1.1.0. You must have Rack 1.1.0 installed as a gem, even if you've bundled it with the gem bundler. This is because Phusion Passenger itself depends on Rack. Both of these caveats are temporary. We have plans to solve both of these properly in the future. * What's up with the Gem Bundler? There has been some reports that Phusion Passenger is not compatible with Yehuda Katz's gem bundler (http://github.com/wycats/bundler). This might have been true for an earlier version of the gem bundler, but the latest version seems to work fine. Please note that you need to insert the following snippet in config/preinitializer.rb, as instructed by the gem bundler's README: require "#{RAILS_ROOT}/vendor/gems/environment" The Rails::Boot monkey patching code as posted at http://yehudakatz.com/2009/11/03/using-the-new-gem-bundler-today/ does not seem to be required anymore. * Fixed support for ActiveRecord subclasses that connect to another database. ActiveRecord subclasses that connect to a database other than the default one did not have their connection correctly cleared after forking. This can result in weird errors along the lines of "Lost connection to MySQL server during query". Issue #429. * [Nginx] Fixed PCRE URL. passenger-install-nginx-module downloads PCRE 7.8 if PCRE is not already installed. However PCRE 7.8 has been removed from their FTP server, so we've updated the URL to point to the latest version, 8.0. Release 2.2.8 ------------- * [Nginx] Fixed some signal handling problems. Restarting Nginx on OS X with SIGHUP can sometimes take a long time or even fail completely. This is because of some signal handling problems, which have now been fixed. * [Nginx] Added OpenSSL as dependency. OpenSSL is required in order to install Nginx, but this was not checked by passenger-install-nginx-module. As a result, passenger-install-nginx-module fails on e.g. out-of-the-box Ubuntu installations until the user manually installs OpenSSL. Issue #422. * [Nginx] Fixed support for internal redirects and subrequests. It is now possible to, for example, point X-Accel-Redirects to Phusion Passenger-served URLs. Patch contributed by W. Andrew Loe III: issue #433. * [Apache] Fixed a GnuTLS compatibility issue. mod_gnutls can cause Phusion Passenger to crash because of an unchecked NULL pointer. This problem has now been fixed: issue #391. * Fixed thread creation issue on Intel Itanium platforms. This fixes issue #427. * Fixed compilation problems on Linux running on the Renesas SH4 CPU. Patch contributed by iwamatsu: issue #428. * The Rack library has been unvendored. The original reason for vendoring was to work around broken Rails applications that explicitly specify Rack as a gem dependency. We've found a better workaround that does not require vendoring Rack. This also fixes a compatibility problem with Rails 3, because Rails 3 depends on a newer Rack version than the one we had vendored. Issue #432. * Fixed compatibility with Ruby 1.9.1 patchlevel >= 152 Ruby 1.9.1 patchlevel >= 152 has a bug in its tempfile library. If you've seen an error message along the lines of *** Exception IOError in Passenger RequestHandler (closed stream) then this is a Ruby bug at work. This bug has been fixed in Ruby 1.9.2, but Ruby 1.9.1 still contains this bug. We've added a workaround so that the bug is not triggered with this Ruby version. Issue #432. Release 2.2.7 ------------- * Removed forgotten debugging code in passenger-install-apache2-module, which caused it not to compile anything. Release 2.2.6 ------------- * Some /tmp cleaner programs such as tmpwatch try to remove subdirectories in /tmp/passenger.xxx after a while because they think those subdirectories are unused. This could cause Phusion Passenger to malfunction, requiring a web server restart. Measures have now been taken to prevent those tmp cleaner programs from removing anything in /tmp/passenger.xxx. Issue #365. * When autodetecting the application type, Rack is now given more priority than Rails. This allows one to drop a config.ru file in a Rails directory and have it detected as a Rack application instead of a Rails application. Patch contributed by Sam Pohlenz: issue #338. * The default socket backlog has been increased from 'SOMAXCONN' (which is 128 on most platforms) to 1024. This should fix most 'helper_server.sock failed: Resource temporarily unavailable' errors. * Fixed compilation problems on Solaris. Issue #369 and issue #379. * Fixed crashes on PowerPC. * Some Ruby 1.9 compatibility fixes. Issue #398. * The installer now displays correct dependency installation instructions for Mandriva Linux. * [Apache] The location of the 'apxs' and 'apr-config' commands can now also be passed to the installer through the --apxs-path and --apr-config-path parameters, in addition to the $APXS2 and $APR_CONFIG environment variables. Issue #3. * [Nginx] Various problems that only occur on 64-bit platforms have been fixed. * [Nginx] The installer now installs Nginx 0.7.64 by default. Release 2.2.5 ------------- * [Apache] Small file uploads are now buffered; fixes potential DoS attack Phusion Passenger buffers large file uploads to temp files so that it doesn't block applications while an upload is in progress, but it sent small uploads directly to the application without buffering it. This could result in a potential DoS attack: the client can send many small, incomplete file uploads to the server, and this would block all application processes until a timeout occurs. In order to solve this problem, Phusion Passenger now buffers small file uploads in memory. Bug #356. * [Apache] Fixed support for mod_rewrite passthrough rules Mod_rewrite passthrough rules were not properly supported because of a bug fix for supporting encoded slashes (%2f) in URLs. Unfortunately, due to bugs/limitations in Apache, we can support either encoded slashes or mod_rewrite passthrough rules, but not both; supporting one will break the other. Support for mod_rewrite passthrough rules is now enabled by default; that is, support for encoded slashes is disabled by default. A new configuration option, "PassengerAllowEncodedSlashes", has been added. Turning this option on will enable support for encoded slashes and disable support for mod_rewrite passthrough rules. Issue #113 and issue #230. * [Apache] Added a configuration option for resolving symlinks in the document root path Phusion Passenger 2.2.0 and higher no longer resolves symlinks in the document root path in order to properly support Capistrano-style directory structures. The exact behavior is documented in the Users Guide, section "How Phusion Passenger detects whether a virtual host is a web application". However, some people relied on the old behavior. A new configuration option, PassengerResolveSymlinksInDocumentRoot, has been added to allow reverting back to the old behavior. Patch contributed by Locaweb (http://www.locaweb.com.br/). * [Apache] mod_env variables are now also passed through CGI environment headers Prior to version 2.2.3, environment variables set by mod_env are passed to the application as CGI environment headers, not through Ruby's ENV variable. In the last release we introduced support for setting ENV environment variables with mod_env, and got rid of the code for setting CGI environment headers. It turns out that some people relied on the old behavior, we so now environment variables set with mod_env are set in both ENV and in the CGI environment. Fixes bug #335. * [Apache] Fixed compilation problems on some Linux systems with older versions of Apache If you used to see compilation errors like this: ext/apache2/Configuration.cpp:554: error: expected primary-expression before '.' token then this version should compile properly. * [Apache] Fixed I/O timeouts for communication with backend processes Got rid of the code for enforcing I/O timeouts when reading from or writing to a backend process. This caused more problems than it solved. * [Nginx] Support for streaming responses (e.g. Comet or HTTP push) Buffering of backend responses is now disabled. This fixes support for streaming responses, something which the Apache version has supported for a while now. One can generate streaming responses in Ruby on Rails like this: render :text => lambda { |response, output| 10_000.times do |i| output.write("hello #{i}!\n") end } * [Nginx] Installer now installs Nginx 0.7.61 by default Previously it installed 0.6.37 by default. * [Nginx] Fixed the installer's --extra-configure-flags flag when combined with --auto-download Arguments passed to --extra-configure-flags were not being passed to the Nginx configure script when --auto-download is given. This has been fixed: bug #349. * [Nginx] Fixed unnecessary download of PCRE The installer now checks whether PCRE is installed in /opt/local (e.g. MacPorts) as well before concluding that it isn't installed and going ahead with downloading PCRE. * Fixed STDERR capturing While spawning an application, Phusion Passenger captures any output written to STDERR so that it can show them later if the application failed to start. This turns out to be much more difficult than expected, with all kinds of corner cases that can mess up this feature. For example, if the Rails log file is not writable, then this can cause Rails to crash with a bizarre and unhelpful error message whenever it tries to write to STDERR: /!\ FAILSAFE /!\ Thu Aug 20 14:58:39 +1000 2009 Status: 500 Internal Server Error undefined method `[]' for nil:NilClass Some applications reopen STDERR to a log file. This didn't work. Of all of these problems have been fixed now. (Bug #332) * Fixed some bugs in application sources preloading Rails >= 2.2 already preloads the application sources, in which case Phusion Passenger wasn't supposed to perform it's own preloading, but the Rails >= 2.2 detection code was bugged. This has been fixed. Rails < 2.2 doesn't preload the application sources by itself, but there should be a certain order with which the sources are preloaded, otherwise preloading could fail in some applications. We now enforce a specific load order: first models, then controllers, then helpers. Bug #359. * Fixed a few bugs in WSGI compliance PATH_INFO is supposed to be set to the request URI, but without the query string and without the base URI. This has been fixed: bug #360. * Fixed some Ruby 1.9-specific crashes caused by encoding issues. Bug #354. * Fixed loading of config/environment.rb on Ruby 1.9.2, because Ruby 1.9.2 no longer has "." in the default load path. Patch by metaljastix, issue #368. * The Users Guide for Apache now mentions something about correct permissions for application directories. * Fixed compilation problems on IA-64 (bug #118). We also reduced the stack sizes for the threads by half, so Phusion Passenger should use even less virtual memory now. * Fixed compilation problems on Linux systems with ARM CPU. * Fixed a few compatibility problems with 64-bit OpenBSD. * Fixed a few typos and minor bugs. Older releases -------------- Please consult the blog posts on http://blog.phusion.nl/ for the information about older releases. passenger-4.0.37/node_lib/000755 000765 000024 00000000000 12233035540 015767 5ustar00honglistaff000000 000000 passenger-4.0.37/passenger.gemspec000644 000765 000024 00000002333 12233035540 017551 0ustar00honglistaff000000 000000 source_root = File.expand_path(File.dirname(__FILE__)) $LOAD_PATH.unshift("#{source_root}/lib") require 'phusion_passenger' PhusionPassenger.locate_directories require 'phusion_passenger/packaging' Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY s.homepage = "https://www.phusionpassenger.com/" s.summary = "A fast and robust web server and application server for Ruby, Python and Node.js" s.name = PhusionPassenger::PACKAGE_NAME s.version = PhusionPassenger::VERSION_STRING s.rubyforge_project = "passenger" s.author = "Phusion - http://www.phusion.nl/" s.email = "software-signing@phusion.nl" s.require_paths = ["lib"] s.add_dependency 'rake', '>= 0.8.1' s.add_dependency 'daemon_controller', '>= 1.1.0' s.add_dependency 'rack' s.files = Dir[*PhusionPassenger::Packaging::GLOB] - Dir[*PhusionPassenger::Packaging::EXCLUDE_GLOB] s.executables = PhusionPassenger::Packaging::USER_EXECUTABLES + PhusionPassenger::Packaging::SUPER_USER_EXECUTABLES s.description = "A modern web server and application server for Ruby, Python and Node.js, " + "optimized for performance, low memory usage and ease of use." if ENV['OFFICIAL_RELEASE'] s.extensions = ["helper-scripts/download_binaries/extconf.rb"] end end passenger-4.0.37/Rakefile000644 000765 000024 00000003426 12233035540 015666 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (C) 2008-2013 Phusion # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. source_root = File.expand_path(File.dirname(__FILE__)) $LOAD_PATH.unshift(source_root) $LOAD_PATH.unshift("#{source_root}/lib") require "#{source_root}/config" if File.exist?("#{source_root}/config.rb") require 'build/basics' if boolean_option('ONLY_RUBY') require 'build/ruby_extension' else require 'build/ruby_extension' require 'build/common_library' require 'build/agents' require 'build/apache2' require 'build/nginx' require 'build/documentation' require 'build/packaging' require 'build/test_basics' require 'build/oxt_tests' require 'build/cxx_tests' require 'build/ruby_tests' require 'build/node_tests' require 'build/integration_tests' require 'build/misc' require 'build/debian' require 'build/rpm' end #### Default tasks task :default do abort "Please type one of:\n" + " rake apache2\n" + " rake nginx" end desc "Remove compiled files" task :clean => 'clean:cache' task 'common:clean' => 'clean:cache' task 'clean:cache' do sh "rm -rf #{OUTPUT_DIR}cache" end desc "Remove all generated files" task :clobber passenger-4.0.37/README.md000644 000765 000024 00000005463 12233035540 015503 0ustar00honglistaff000000 000000 # Phusion Passenger: a fast and robust web server and application server for Ruby, Python and Node.js [Phusion Passengerℱ](https://www.phusionpassenger.com/) is a web server and application server, designed to be fast, robust and lightweight. It takes a lot of complexity out of deploying web apps, adds powerful enterprise-grade features that are useful in production, and makes administration much easier and less complex. Phusion Passenger supports Ruby, Python, Node.js and Meteor, and is being used by high-profile companies such as **Apple, Pixar, New York Times, AirBnB, Juniper** etc as well as [over 350.000 websites](http://trends.builtwith.com/Web-Server/Phusion-Passenger). What makes it so fast and reliable is its **C++** core, its **zero-copy** architecture, its **watchdog** system and its **hybrid** evented, multi-threaded and multi-process design.
Phusion Passenger used in Game of Thrones Ascention **Learn more:** [Website](https://www.phusionpassenger.com/) | [Documentation](https://www.phusionpassenger.com/documentation_and_support) | [Support resources](https://www.phusionpassenger.com/documentation_and_support) | [Github](https://github.com/phusion/passenger) | [Twitter](https://twitter.com/phusion_nl) | [Blog](http://blog.phusion.nl/)
Phusion Passenger
## Installation Please follow [the installation instructions on the website](https://www.phusionpassenger.com/download). ### Installing the source directly from git If you mean to install the latest version of Passenger directly from this git repository, then you should run one of the following commands. Installing from the git repository is basically the same as the tarball installation method, as [described in the manual](http://modrails.com/documentation/Users%20guide.html#installation). ./bin/passenger-install-apache2-module -OR- ./bin/passenger-install-nginx-module -OR- # From your application directory ~/path-to-passenger/bin/passenger start For troubleshooting, configuration and tips, please also refer to the above documentation. For further support, please refer to [the Phusion Passenger support page](https://www.phusionpassenger.com/support). Ruby users can also build a gem from the Git repository and install the gem. gem build passenger.gemspec gem install passenger-x.x.x.gem ## Further reading * The `doc/` directory. * CONTRIBUTING.md. * https://www.phusionpassenger.com/support ## Legal Phusion Passenger is a trademark of Hongli Lai & Ninh Bui. passenger-4.0.37/resources/000755 000765 000024 00000000000 12233035540 016226 5ustar00honglistaff000000 000000 passenger-4.0.37/rpm/000755 000765 000024 00000000000 12233035540 015012 5ustar00honglistaff000000 000000 passenger-4.0.37/test/000755 000765 000024 00000000000 12233035540 015173 5ustar00honglistaff000000 000000 passenger-4.0.37/test/.rspec000644 000765 000024 00000000070 12233035540 016305 0ustar00honglistaff000000 000000 --colour --format d --pattern 'dont_auto_load_anything' passenger-4.0.37/test/config.json.example000644 000765 000024 00000002770 12233035540 020773 0ustar00honglistaff000000 000000 { //// This file contains system-specific configuration options that the test suite needs. //// Please customize it for your system. // These are the usernames and group names of normal, non-administrator // users and groups. Preferably, these are user and group accounts that // are normally not used. // // These users and groups MUST be able to access this 'test' directory, // otherwise the tests will fail. //// Good values for OS X: "normal_user_1": "_www", "normal_user_2": "daemon", // Must not be "nobody". "default_user": "_sandbox", // Must not be normal_user_1's primary group. "normal_group_1": "daemon", // Must not be normal_user_2's primary group. "normal_group_2": "_sandbox", // Must not be default_user's primary group. Must not be "nobody". "default_group": "_www", ///// Good values for Linux and FreeBSD. Same restrictions apply. //"normal_user_1": "games", //"normal_user_2": "daemon", //"default_user": "man", //"normal_group_1": "daemon", //"normal_group_2": "man", //"default_group": "games", // A nonexistant username, group name, user ID and group ID. "nonexistant_user": "xxxxxxxxxxxxxxxxxxx", "nonexistant_group": "xxxxxxxxxxxxxxxxxxx", "nonexistant_uid": 9999, "nonexistant_gid": 9999, // If you want to run the Nginx integration tests, then set the following // config option to the full path of the Nginx binary. This Nginx binary *must* // be compiled with Phusion Passenger support! "nginx": "/usr/local/sbin/nginx" } passenger-4.0.37/test/config.json.rpm-automation000644 000765 000024 00000000547 12233035540 022314 0ustar00honglistaff000000 000000 { "normal_user_1": "games", "normal_user_2": "daemon", "default_user": "gopher", "normal_group_1": "daemon", "normal_group_2": "gopher", "default_group": "games", "nonexistant_user": "xxxxxxxxxxxxxxxxxxx", "nonexistant_group": "xxxxxxxxxxxxxxxxxxx", "nonexistant_uid": 9999, "nonexistant_gid": 9999, "nginx": "/tmp/nginx/sbin/nginx" } passenger-4.0.37/test/config.json.travis000644 000765 000024 00000000541 12233035540 020642 0ustar00honglistaff000000 000000 { "normal_user_1": "games", "normal_user_2": "daemon", "default_user": "man", "normal_group_1": "daemon", "normal_group_2": "man", "default_group": "games", "nonexistant_user": "xxxxxxxxxxxxxxxxxxx", "nonexistant_group": "xxxxxxxxxxxxxxxxxxx", "nonexistant_uid": 9999, "nonexistant_gid": 9999, "nginx": "/tmp/nginx/sbin/nginx" } passenger-4.0.37/test/cxx/000755 000765 000024 00000000000 12233035540 015775 5ustar00honglistaff000000 000000 passenger-4.0.37/test/gdbinit.example000644 000765 000024 00000001601 12233035540 020166 0ustar00honglistaff000000 000000 # This is a sample .gdbinit file that can aid you in debugging # Phusion Passenger with GDB. Modify it to your liking and copy # it to test/.gdbinit. See also CONTRIBUTING.md. # Ignore some signals. handle SIGUSR1 noprint pass handle SIGPIPE noprint pass # Convenience command. define rake shell rake $arg0 end # Break on breakpoint() function. break Passenger::breakpoint # Linux-only. Comment out when not on Linux. set print thread-events off # On OS X, you may sometimes want to enable memory debugger libraries. #set env DYLD_INSERT_LIBRARIES /usr/lib/libgmalloc.dylib #set env MALLOC_FILL_SPACE YES #set env MALLOC_PROTECT_BEFORE YES #set env MallocStackLogging YES #set env MallocGuardEdges YES #set env MallocScribble YES #set env MallocPreScribble YES #set env MallocCheckHeapStart 10 #set env MallocCheckHeapEach 1 #set env MallocCheckHeapAbort YES #set env MallocBadFreeAbort YES passenger-4.0.37/test/integration_tests/000755 000765 000024 00000000000 12233035540 020740 5ustar00honglistaff000000 000000 passenger-4.0.37/test/node/000755 000765 000024 00000000000 12233035540 016120 5ustar00honglistaff000000 000000 passenger-4.0.37/test/oxt/000755 000765 000024 00000000000 12233035540 016005 5ustar00honglistaff000000 000000 passenger-4.0.37/test/ruby/000755 000765 000024 00000000000 12233035540 016154 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/000755 000765 000024 00000000000 12233035540 016150 5ustar00honglistaff000000 000000 passenger-4.0.37/test/support/000755 000765 000024 00000000000 12233035540 016707 5ustar00honglistaff000000 000000 passenger-4.0.37/test/tut/000755 000765 000024 00000000000 12233035540 016007 5ustar00honglistaff000000 000000 passenger-4.0.37/test/valgrind-osx.supp000644 000765 000024 00000000200 12233035540 020511 0ustar00honglistaff000000 000000 { wait4() uninitialized bytes on OS X Memcheck:Param wait4(pid) fun:wait4 fun:_ZN9Passenger13removeDirTreeERKSs }passenger-4.0.37/test/tut/tut.h000644 000765 000024 00000071563 12233035540 017010 0ustar00honglistaff000000 000000 /** * TUT unit testing framework. * http://tut-framework.sourceforge.net/ * * Copyright 2002-2006 Vladimir Dyuzhev. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Slightly modified for use in this software package. #ifndef TUT_H_GUARD #define TUT_H_GUARD #include #include #include #include #include #include #if defined(TUT_USE_SEH) #include #include #endif #ifdef __SOLARIS9__ // Solaris 9 only has putenv, not setenv. static int setenv(const char *name, const char *value, int override) { int ret; char *s = (char*)malloc(strlen(name) + strlen(value) + 2); s[0] = 0; strcpy(s, name); strcpy(s, "="); strcpy(s, value); ret = putenv(s); free(s); return ret; } #endif #define DEFINE_TEST_GROUP(name) \ using namespace tut; \ typedef test_group factory; \ typedef factory::object object; \ factory name## _group(#name) #define DEFINE_TEST_GROUP_WITH_LIMIT(name, limit) \ using namespace tut; \ typedef test_group factory; \ typedef factory::object object; \ factory name## _group(#name) #define TEST_METHOD(i) \ template<> template<> \ void object::test() #ifdef __GNUC__ #define TUT_UNUSED __attribute__((unused)) #else #define TUT_UNUSED #endif /** * Template Unit Tests Framework for C++. * http://tut.dozen.ru * * @author Vladimir Dyuzhev, Vladimir.Dyuzhev@gmail.com */ namespace tut { /** * The base for all TUT exceptions. */ struct tut_error : public std::exception { tut_error(const std::string& msg) : err_msg(msg) { } ~tut_error() throw() { } const char* what() const throw() { return err_msg.c_str(); } private: std::string err_msg; }; /** * Exception to be throwed when attempted to execute * missed test by number. */ struct no_such_test : public tut_error { no_such_test() : tut_error("no such test") { } ~no_such_test() throw() { } }; /** * No such test and passed test number is higher than * any test number in current group. Used in one-by-one * test running when upper bound is not known. */ struct beyond_last_test : public no_such_test { beyond_last_test() { } ~beyond_last_test() throw() { } }; /** * Group not found exception. */ struct no_such_group : public tut_error { no_such_group(const std::string& grp) : tut_error(grp) { } ~no_such_group() throw() { } }; /** * Internal exception to be throwed when * no more tests left in group or journal. */ struct no_more_tests { no_more_tests() { } ~no_more_tests() throw() { } }; /** * Internal exception to be throwed when * test constructor has failed. */ struct bad_ctor : public tut_error { bad_ctor(const std::string& msg) : tut_error(msg) { } ~bad_ctor() throw() { } }; /** * Exception to be throwed when ensure() fails or fail() called. */ struct failure : public tut_error { failure(const std::string& msg) : tut_error(msg) { } ~failure() throw() { } }; /** * Exception to be throwed when test desctructor throwed an exception. */ struct warning : public tut_error { warning(const std::string& msg) : tut_error(msg) { } ~warning() throw() { } }; /** * Exception to be throwed when test issued SEH (Win32) */ struct seh : public tut_error { seh(const std::string& msg) : tut_error(msg) { } ~seh() throw() { } }; /** * Return type of runned test/test group. * * For test: contains result of test and, possible, message * for failure or exception. */ struct test_result { /** * Test group name. */ std::string group; /** * Test number in group. */ int test; /** * Test name (optional) */ std::string name; /** * ok - test finished successfully * fail - test failed with ensure() or fail() methods * ex - test throwed an exceptions * warn - test finished successfully, but test destructor throwed * term - test forced test application to terminate abnormally */ enum result_type { ok, fail, ex, warn, term, ex_ctor }; result_type result; /** * Exception message for failed test. */ std::string message; std::string exception_typeid; /** * Default constructor. */ test_result() : test(0), result(ok) { } /** * Constructor. */ test_result(const std::string& grp, int pos, const std::string& test_name, result_type res) : group(grp), test(pos), name(test_name), result(res) { } /** * Constructor with exception. */ test_result(const std::string& grp,int pos, const std::string& test_name, result_type res, const std::exception& ex) : group(grp), test(pos), name(test_name), result(res), message(ex.what()), exception_typeid(typeid(ex).name()) { } }; /** * Interface. * Test group operations. */ struct group_base { virtual ~group_base() { } // execute tests iteratively virtual void rewind() = 0; virtual test_result run_next() = 0; // execute one test virtual test_result run_test(int n) = 0; }; /** * Test runner callback interface. * Can be implemented by caller to update * tests results in real-time. User can implement * any of callback methods, and leave unused * in default implementation. */ struct callback { /** * Virtual destructor is a must for subclassed types. */ virtual ~callback() { } /** * Called when new test run started. */ virtual void run_started() { } /** * Called when a group started * @param name Name of the group */ virtual void group_started(const std::string& /*name*/) { } /** * Called when a test finished. * @param tr Test results. */ virtual void test_completed(const test_result& /*tr*/) { } /** * Called when a group is completed * @param name Name of the group */ virtual void group_completed(const std::string& /*name*/) { } /** * Called when all tests in run completed. */ virtual void run_completed() { } }; /** * Typedef for runner::list_groups() */ typedef std::vector groupnames; /** * Test runner. */ class test_runner { public: /** * Constructor */ test_runner() : callback_(&default_callback_) { } /** * Stores another group for getting by name. */ void register_group(const std::string& name, group_base* gr) { if (gr == 0) { throw tut_error("group shall be non-null"); } // TODO: inline variable groups::iterator found = groups_.find(name); if (found != groups_.end()) { std::string msg("attempt to add already existent group " + name); // this exception terminates application so we use cerr also // TODO: should this message appear in stream? std::cerr << msg << std::endl; throw tut_error(msg); } groups_[name] = gr; } /** * Stores callback object. */ void set_callback(callback* cb) { callback_ = cb == 0 ? &default_callback_ : cb; } /** * Returns callback object. */ callback& get_callback() const { return *callback_; } /** * Returns list of known test groups. */ const groupnames list_groups() const { groupnames ret; const_iterator i = groups_.begin(); const_iterator e = groups_.end(); while (i != e) { ret.push_back(i->first); ++i; } return ret; } /** * Runs all tests in all groups. * @param callback Callback object if exists; null otherwise */ void run_tests() const { callback_->run_started(); const_iterator i = groups_.begin(); const_iterator e = groups_.end(); while (i != e) { callback_->group_started(i->first); try { run_all_tests_in_group_(i); } catch (const no_more_tests&) { callback_->group_completed(i->first); } ++i; } callback_->run_completed(); } /** * Runs all tests in specified group. */ void run_tests(const std::string& group_name) const { callback_->run_started(); const_iterator i = groups_.find(group_name); if (i == groups_.end()) { callback_->run_completed(); throw no_such_group(group_name); } callback_->group_started(group_name); try { run_all_tests_in_group_(i); } catch (const no_more_tests&) { // ok } callback_->group_completed(group_name); callback_->run_completed(); } /** * Runs one test in specified group. */ test_result run_test(const std::string& group_name, int n) const { callback_->run_started(); const_iterator i = groups_.find(group_name); if (i == groups_.end()) { callback_->run_completed(); throw no_such_group(group_name); } callback_->group_started(group_name); try { test_result tr = i->second->run_test(n); callback_->test_completed(tr); callback_->group_completed(group_name); callback_->run_completed(); return tr; } catch (const beyond_last_test&) { callback_->group_completed(group_name); callback_->run_completed(); throw; } catch (const no_such_test&) { callback_->group_completed(group_name); callback_->run_completed(); throw; } } /** * Runs specified tests in specified groups. */ void run_tests(const std::map< std::string, std::vector >& groups_and_tests) const { callback_->run_started(); std::map< std::string, std::vector >::const_iterator g_it; for (g_it = groups_and_tests.begin(); g_it != groups_and_tests.end(); g_it++) { const std::string &group_name = g_it->first; const std::vector &test_numbers = g_it->second; const_iterator i = groups_.find(group_name); if (i == groups_.end()) { callback_->run_completed(); throw no_such_group(group_name); } callback_->group_started(group_name); try { if (test_numbers.empty()) { run_all_tests_in_group_(i); } else { std::vector::const_iterator n_it; for (n_it = test_numbers.begin(); n_it != test_numbers.end(); n_it++) { int n = *n_it; test_result tr = i->second->run_test(n); callback_->test_completed(tr); } } } catch (const no_more_tests&) { // ok } catch (const beyond_last_test&) { callback_->group_completed(group_name); callback_->run_completed(); throw; } catch (const no_such_test&) { callback_->group_completed(group_name); callback_->run_completed(); throw; } callback_->group_completed(group_name); } callback_->run_completed(); } protected: typedef std::map groups; typedef groups::iterator iterator; typedef groups::const_iterator const_iterator; groups groups_; callback default_callback_; callback* callback_; private: void run_all_tests_in_group_(const_iterator i) const { i->second->rewind(); for ( ;; ) { test_result tr = i->second->run_next(); callback_->test_completed(tr); if (tr.result == test_result::ex_ctor) { throw no_more_tests(); } } } }; /** * Singleton for test_runner implementation. * Instance with name runner_singleton shall be implemented * by user. */ class test_runner_singleton { public: static test_runner& get() { static test_runner tr; return tr; } }; extern test_runner_singleton runner; /** * Test object. Contains data test run upon and default test method * implementation. Inherited from Data to allow tests to * access test data as members. */ template class test_object : public Data { public: /** * Default constructor */ test_object() { } void set_test_name(const std::string& current_test_name) { current_test_name_ = current_test_name; } const std::string& get_test_name() const { return current_test_name_; } /** * Default do-nothing test. */ template void test() { called_method_was_a_dummy_test_ = true; } /** * The flag is set to true by default (dummy) test. * Used to detect usused test numbers and avoid unnecessary * test object creation which may be time-consuming depending * on operations described in Data::Data() and Data::~Data(). * TODO: replace with throwing special exception from default test. */ bool called_method_was_a_dummy_test_; private: std::string current_test_name_; }; namespace { /** * Tests provided condition. * Throws if false. */ TUT_UNUSED void ensure(bool cond) { if (!cond) { // TODO: default ctor? throw failure(""); } } /** * Tests provided condition. * Throws if true. */ TUT_UNUSED void ensure_not(bool cond) { ensure(!cond); } /** * Tests provided condition. * Throws if false. */ template void ensure(const T msg, bool cond) { if (!cond) { throw failure(msg); } } /** * Tests provided condition. * Throws if true. */ template void ensure_not(const T msg, bool cond) { ensure(msg, !cond); } /** * Tests two objects for being equal. * Throws if false. * * NB: both T and Q must have operator << defined somewhere, or * client code will not compile at all! */ template void ensure_equals(const char* msg, const Q& actual, const T& expected) { if (expected != actual) { std::stringstream ss; ss << (msg ? msg : "") << (msg ? ":" : "") << " expected '" << expected << "' actual '" << actual << '\''; throw failure(ss.str().c_str()); } } template void ensure_equals(const Q& actual, const T& expected) { ensure_equals<>(0, actual, expected); } /** * Tests two objects for being at most in given distance one from another. * Borders are excluded. * Throws if false. * * NB: T must have operator << defined somewhere, or * client code will not compile at all! Also, T shall have * operators + and -, and be comparable. */ template void ensure_distance(const char* msg, const T& actual, const T& expected, const T& distance) { if (expected-distance >= actual || expected+distance <= actual) { std::stringstream ss; ss << (msg ? msg : "") << (msg? ":" : "") << " expected (" << expected-distance << " - " << expected+distance << ") actual '" << actual << '\''; throw failure(ss.str().c_str()); } } template void ensure_distance(const T& actual, const T& expected, const T& distance) { ensure_distance<>(0, actual, expected, distance); } /** * Unconditionally fails with message. */ TUT_UNUSED void fail(const char* msg = "") { throw failure(msg); } } // end of namespace /** * Walks through test tree and stores address of each * test method in group. Instantiation stops at 0. */ template struct tests_registerer { static void reg(Group& group) { group.reg(n, &Test::template test); tests_registerer::reg(group); } }; template struct tests_registerer { static void reg(Group&) { } }; /** * Test group; used to recreate test object instance for * each new test since we have to have reinitialized * Data base class. */ template class test_group : public group_base { const char* name_; typedef void (test_object::*testmethod)(); typedef std::map tests; typedef typename tests::iterator tests_iterator; typedef typename tests::const_iterator tests_const_iterator; typedef typename tests::const_reverse_iterator tests_const_reverse_iterator; typedef typename tests::size_type size_type; tests tests_; tests_iterator current_test_; /** * Exception-in-destructor-safe smart-pointer class. */ template class safe_holder { T* p_; bool permit_throw_in_dtor; safe_holder(const safe_holder&); safe_holder& operator=(const safe_holder&); public: safe_holder() : p_(0), permit_throw_in_dtor(false) { } ~safe_holder() { release(); } T* operator->() const { return p_; } T* get() const { return p_; } /** * Tell ptr it can throw from destructor. Right way is to * use std::uncaught_exception(), but some compilers lack * correct implementation of the function. */ void permit_throw() { permit_throw_in_dtor = true; } /** * Specially treats exceptions in test object destructor; * if test itself failed, exceptions in destructor * are ignored; if test was successful and destructor failed, * warning exception throwed. */ void release() { try { if (delete_obj() == false) { throw warning("destructor of test object raised" " an SEH exception"); } } catch (const std::exception& ex) { if (permit_throw_in_dtor) { std::string msg = "destructor of test object raised" " exception: "; msg += ex.what(); throw warning(msg); } } catch( ... ) { if (permit_throw_in_dtor) { throw warning("destructor of test object raised an" " exception"); } } } /** * Re-init holder to get brand new object. */ void reset() { release(); permit_throw_in_dtor = false; p_ = new T(); } bool delete_obj() { #if defined(TUT_USE_SEH) __try { #endif T* p = p_; p_ = 0; delete p; #if defined(TUT_USE_SEH) } __except(handle_seh_(::GetExceptionCode())) { if (permit_throw_in_dtor) { return false; } } #endif return true; } }; public: typedef test_object object; /** * Creates and registers test group with specified name. */ test_group(const char* name) : name_(name) { // register itself runner.get().register_group(name_,this); // register all tests tests_registerer::reg(*this); } /** * This constructor is used in self-test run only. */ test_group(const char* name, test_runner& another_runner) : name_(name) { // register itself another_runner.register_group(name_, this); // register all tests tests_registerer, test_group, MaxTestsInGroup>::reg(*this); }; /** * Registers test method under given number. */ void reg(int n, testmethod tm) { tests_[n] = tm; } /** * Reset test position before first test. */ void rewind() { current_test_ = tests_.begin(); } /** * Runs next test. */ test_result run_next() { if (current_test_ == tests_.end()) { throw no_more_tests(); } // find next user-specialized test safe_holder obj; while (current_test_ != tests_.end()) { try { return run_test_(current_test_++, obj); } catch (const no_such_test&) { continue; } } throw no_more_tests(); } /** * Runs one test by position. */ test_result run_test(int n) { // beyond tests is special case to discover upper limit if (tests_.rbegin() == tests_.rend()) { throw beyond_last_test(); } if (tests_.rbegin()->first < n) { throw beyond_last_test(); } // withing scope; check if given test exists tests_iterator ti = tests_.find(n); if (ti == tests_.end()) { throw no_such_test(); } safe_holder obj; return run_test_(ti, obj); } private: /** * VC allows only one exception handling type per function, * so I have to split the method. * * TODO: refactoring needed! */ test_result run_test_(const tests_iterator& ti, safe_holder& obj) { std::string current_test_name; int number = ti->first; // In a variable so we can easily inspect wih gdb. try { if (run_test_seh_(ti->second,obj, current_test_name) == false) { throw seh("seh"); } } catch (const no_such_test&) { throw; } catch (const warning& ex) { // test ok, but destructor failed if (obj.get()) { current_test_name = obj->get_test_name(); } test_result tr(name_,ti->first, current_test_name, test_result::warn, ex); return tr; } catch (const failure& ex) { // test failed because of ensure() or similar method if (obj.get()) { current_test_name = obj->get_test_name(); } test_result tr(name_,ti->first, current_test_name, test_result::fail, ex); return tr; } catch (const seh& ex) { // test failed with sigsegv, divide by zero, etc if (obj.get()) { current_test_name = obj->get_test_name(); } test_result tr(name_, ti->first, current_test_name, test_result::term, ex); return tr; } catch (const bad_ctor& ex) { // test failed because test ctor failed; stop the whole group if (obj.get()) { current_test_name = obj->get_test_name(); } test_result tr(name_, ti->first, current_test_name, test_result::ex_ctor, ex); return tr; } /* catch (const std::exception& ex) { // test failed with std::exception if (obj.get()) { current_test_name = obj->get_test_name(); } test_result tr(name_, ti->first, current_test_name, test_result::ex, ex); return tr; } catch (...) { // test failed with unknown exception if (obj.get()) { current_test_name = obj->get_test_name(); } test_result tr(name_, ti->first, current_test_name, test_result::ex); return tr; } */ // test passed test_result tr(name_,number, current_test_name, test_result::ok); return tr; } /** * Runs one under SEH if platform supports it. */ bool run_test_seh_(testmethod tm, safe_holder& obj, std::string& current_test_name) { #if defined(TUT_USE_SEH) __try { #endif if (obj.get() == 0) { reset_holder_(obj); } obj->called_method_was_a_dummy_test_ = false; #if defined(TUT_USE_SEH) __try { #endif (obj.get()->*tm)(); #if defined(TUT_USE_SEH) } __except(handle_seh_(::GetExceptionCode())) { // throw seh("SEH"); current_test_name = obj->get_test_name(); return false; } #endif if (obj->called_method_was_a_dummy_test_) { // do not call obj.release(); reuse object throw no_such_test(); } current_test_name = obj->get_test_name(); obj.permit_throw(); obj.release(); #if defined(TUT_USE_SEH) } __except(handle_seh_(::GetExceptionCode())) { return false; } #endif return true; } void reset_holder_(safe_holder& obj) { try { obj.reset(); } catch (const std::exception& ex) { throw bad_ctor(ex.what()); } catch (...) { throw bad_ctor("test constructor has generated an exception;" " group execution is terminated"); } } }; #if defined(TUT_USE_SEH) /** * Decides should we execute handler or ignore SE. */ inline int handle_seh_(DWORD excode) { switch(excode) { case EXCEPTION_ACCESS_VIOLATION: case EXCEPTION_DATATYPE_MISALIGNMENT: case EXCEPTION_BREAKPOINT: case EXCEPTION_SINGLE_STEP: case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: case EXCEPTION_FLT_DENORMAL_OPERAND: case EXCEPTION_FLT_DIVIDE_BY_ZERO: case EXCEPTION_FLT_INEXACT_RESULT: case EXCEPTION_FLT_INVALID_OPERATION: case EXCEPTION_FLT_OVERFLOW: case EXCEPTION_FLT_STACK_CHECK: case EXCEPTION_FLT_UNDERFLOW: case EXCEPTION_INT_DIVIDE_BY_ZERO: case EXCEPTION_INT_OVERFLOW: case EXCEPTION_PRIV_INSTRUCTION: case EXCEPTION_IN_PAGE_ERROR: case EXCEPTION_ILLEGAL_INSTRUCTION: case EXCEPTION_NONCONTINUABLE_EXCEPTION: case EXCEPTION_STACK_OVERFLOW: case EXCEPTION_INVALID_DISPOSITION: case EXCEPTION_GUARD_PAGE: case EXCEPTION_INVALID_HANDLE: return EXCEPTION_EXECUTE_HANDLER; }; return EXCEPTION_CONTINUE_SEARCH; } #endif } #endif passenger-4.0.37/test/tut/tut_reporter.h000644 000765 000024 00000015051 12233035540 020720 0ustar00honglistaff000000 000000 /** * TUT unit testing framework. * http://tut-framework.sourceforge.net/ * * Copyright 2002-2006 Vladimir Dyuzhev. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Slightly modified for use in this software package. #ifndef TUT_REPORTER #define TUT_REPORTER #include "tut.h" /** * Template Unit Tests Framework for C++. * http://tut.dozen.ru * * @author Vladimir Dyuzhev, Vladimir.Dyuzhev@gmail.com */ namespace { std::ostream& operator<<(std::ostream& os, const tut::test_result& tr) { switch(tr.result) { case tut::test_result::ok: os << '.'; break; case tut::test_result::fail: os << '[' << tr.test << "=F]"; break; case tut::test_result::ex_ctor: os << '[' << tr.test << "=C]"; break; case tut::test_result::ex: os << '[' << tr.test << "=X]"; break; case tut::test_result::warn: os << '[' << tr.test << "=W]"; break; case tut::test_result::term: os << '[' << tr.test << "=T]"; break; } return os; } } // end of namespace namespace tut { /** * Default TUT callback handler. */ class reporter : public tut::callback { std::string current_group; typedef std::vector not_passed_list; not_passed_list not_passed; std::ostream& os; public: int ok_count; int exceptions_count; int failures_count; int terminations_count; int warnings_count; reporter() : os(std::cout) { init(); } reporter(std::ostream& out) : os(out) { init(); } void run_started() { init(); } void test_completed(const tut::test_result& tr) { if (tr.group != current_group) { os << std::endl << tr.group << ": " << std::flush; current_group = tr.group; } os << tr << std::flush; if (tr.result == tut::test_result::ok) { ok_count++; } else if (tr.result == tut::test_result::ex) { exceptions_count++; } else if (tr.result == tut::test_result::ex_ctor) { exceptions_count++; } else if (tr.result == tut::test_result::fail) { failures_count++; } else if (tr.result == tut::test_result::warn) { warnings_count++; } else { terminations_count++; } if (tr.result != tut::test_result::ok) { not_passed.push_back(tr); } } void run_completed() { os << std::endl; if (not_passed.size() > 0) { not_passed_list::const_iterator i = not_passed.begin(); while (i != not_passed.end()) { tut::test_result tr = *i; os << std::endl; os << "---> " << "group: " << tr.group << ", test: test<" << tr.test << ">" << (!tr.name.empty() ? (std::string(" : ") + tr.name) : std::string()) << std::endl; os << " problem: "; switch(tr.result) { case test_result::fail: os << "assertion failed" << std::endl; break; case test_result::ex: case test_result::ex_ctor: os << "unexpected exception" << std::endl; if( tr.exception_typeid != "" ) { os << " exception typeid: " << tr.exception_typeid << std::endl; } break; case test_result::term: os << "would be terminated" << std::endl; break; case test_result::warn: os << "test passed, but cleanup code (destructor) raised" " an exception" << std::endl; break; default: break; } if (!tr.message.empty()) { if (tr.result == test_result::fail) { os << " failed assertion: \"" << tr.message << "\"" << std::endl; } else { os << " message: \"" << tr.message << "\"" << std::endl; } } ++i; } } os << std::endl; os << "tests summary:"; if (terminations_count > 0) { os << " terminations:" << terminations_count; } if (exceptions_count > 0) { os << " exceptions:" << exceptions_count; } if (failures_count > 0) { os << " failures:" << failures_count; } if (warnings_count > 0) { os << " warnings:" << warnings_count; } os << " ok:" << ok_count; os << std::endl; } bool all_ok() const { return not_passed.empty(); } private: void init() { ok_count = 0; exceptions_count = 0; failures_count = 0; terminations_count = 0; warnings_count = 0; not_passed.clear(); } }; } #endif passenger-4.0.37/test/support/allocate_memory.c000644 000765 000024 00000000377 12233035540 022236 0ustar00honglistaff000000 000000 #include #include #include #include int main(int argc, char *argv[]) { long size = atol(argv[1]) * 1024 * 1024; char *memory = (char *) malloc(size); memset(memory, 0, size); sleep(999999999); return 0; } passenger-4.0.37/test/support/apache2_controller.rb000644 000765 000024 00000015237 12233035540 023012 0ustar00honglistaff000000 000000 require 'erb' require 'fileutils' PhusionPassenger.require_passenger_lib 'platform_info/apache' PhusionPassenger.require_passenger_lib 'platform_info/ruby' # A class for starting, stopping and restarting Apache, and for manipulating # its configuration file. This is used by the integration tests. # # Before a test begins, the test instructs Apache2Controller to create an Apache # configuration folder, which contains an Apache configuration file and other # configuration resources that Apache needs. The Apache configuration file is # created from a template (see Apache2Controller::STUB_DIR). # The test can define configuration customizations. For example, it can tell # Apache2Controller to add configuration options, virtual host definitions, etc. # # After the configuration folder has been created, Apache2Controller will start # Apache. After Apache has been started, the test will be run. Apache2Controller # will stop Apache after the test is done. # # Apache2Controller ensures that starting, stopping and restarting are not prone # to race conditions. For example, it ensures that when #start returns, Apache # really is listening on its server socket instead of still initializing. # # == Usage # # Suppose that you want to test a hypothetical "AlwaysPrintHelloWorld" # Apache configuration option. Then you can write the following test: # # apache = Apache2Controller.new # # # Add a configuration option to the configuration file. # apache << "AlwaysPrintHelloWorld on" # # # Write configuration file and start Apache with that configuration file. # apache.start # # begin # response_body = http_get("http://localhost:#{apache.port}/some/url") # response_body.should == "hello world!" # ensure # apache.stop # end class Apache2Controller include PhusionPassenger STUB_DIR = File.expand_path(File.dirname(__FILE__) + "/../stub/apache2") class VHost attr_accessor :domain attr_accessor :document_root attr_accessor :additional_configs def initialize(domain, document_root) @domain = domain @document_root = document_root @additional_configs = [] end def <<(config) @additional_configs << config end end attr_accessor :port attr_accessor :vhosts attr_reader :server_root def initialize(options = nil) set(options) if options @port = 64506 @vhosts = [] @extra = [] @server_root = File.expand_path('tmp.apache2') @passenger_root = File.expand_path(PhusionPassenger.source_root) @mod_passenger = PhusionPassenger.apache2_module_path end def set(options) options.each_pair do |key, value| instance_variable_set("@#{key}", value) end end # Create an Apache configuration folder and start Apache on that # configuration folder. This method does not return until Apache # has done initializing. # # If Apache is already started, this this method will stop Apache first. def start if running? stop else File.unlink("#{@server_root}/httpd.pid") rescue nil end if File.exist?(@server_root) FileUtils.rm_r(@server_root) end FileUtils.mkdir_p(@server_root) write_config_file FileUtils.cp("#{STUB_DIR}/mime.types", @server_root) if !system(PlatformInfo.httpd, "-f", "#{@server_root}/httpd.conf", "-k", "start") raise "Could not start an Apache server." end begin # Wait until the PID file has been created. Timeout::timeout(20) do while !File.exist?("#{@server_root}/httpd.pid") sleep(0.1) end end # Wait until Apache is listening on the server port. Timeout::timeout(7) do done = false while !done begin socket = TCPSocket.new('localhost', @port) socket.close done = true rescue Errno::ECONNREFUSED sleep(0.1) end end end rescue Timeout::Error raise "Could not start an Apache server." end Dir["#{@server_root}/*"].each do |filename| if File.file?(filename) File.chmod(0666, filename) end end end def graceful_restart write_config_file if !system(PlatformInfo.httpd, "-f", "#{@server_root}/httpd.conf", "-k", "graceful") raise "Cannot restart Apache." end end # Stop Apache and delete its configuration folder. This method waits # until Apache is done with its shutdown procedure. # # This method does nothing if Apache is already stopped. def stop pid_file = "#{@server_root}/httpd.pid" if File.exist?(pid_file) begin pid = File.read(pid_file).strip.to_i Process.kill('SIGTERM', pid) rescue Errno::ESRCH # Looks like a stale pid file. FileUtils.rm_r(@server_root) return end end begin # Wait until the PID file is removed. Timeout::timeout(17) do while File.exist?(pid_file) sleep(0.1) end end # Wait until the server socket is closed. Timeout::timeout(7) do done = false while !done begin socket = TCPSocket.new('localhost', @port) socket.close sleep(0.1) rescue SystemCallError done = true end end end rescue Timeout::Error raise "Unable to stop Apache." end if File.exist?(@server_root) FileUtils.chmod_R(0777, @server_root) FileUtils.rm_r(@server_root) end end # Define a virtual host configuration block for the Apache configuration # file. If there was already a vhost definition with the same domain name, # then it will be overwritten. # # The given document root will be created if it doesn't exist. def set_vhost(domain, document_root) FileUtils.mkdir_p(document_root) vhost = VHost.new(domain, document_root) if block_given? yield vhost end vhosts.reject! {|host| host.domain == domain} vhosts << vhost end # Checks whether this Apache instance is running. def running? if File.exist?("#{@server_root}/httpd.pid") pid = File.read("#{@server_root}/httpd.pid").strip begin Process.kill(0, pid.to_i) return true rescue Errno::ESRCH return false rescue SystemCallError return true end else return false end end # Defines a configuration snippet to be added to the Apache configuration file. def <<(line) @extra << line end private def get_binding return binding end def write_config_file template = ERB.new(File.read("#{STUB_DIR}/httpd.conf.erb")) File.open("#{@server_root}/httpd.conf", 'w') do |f| f.write(template.result(get_binding)) end end def modules_dir @@modules_dir ||= `#{PlatformInfo.apxs2} -q LIBEXECDIR`.strip end def builtin_modules @@builtin_modules ||= `#{PlatformInfo.httpd} -l`.split("\n").grep(/\.c$/).map do |line| line.strip end end def has_builtin_module?(name) return builtin_modules.include?(name) end def has_module?(name) return File.exist?("#{modules_dir}/#{name}") end def we_are_root? return Process.uid == 0 end end passenger-4.0.37/test/support/multipart.rb000644 000765 000024 00000003756 12233035540 021270 0ustar00honglistaff000000 000000 module Multipart # From: http://deftcode.com/code/flickr_upload/multipartpost.rb ## Helper class to prepare an HTTP POST request with a file upload ## Mostly taken from #http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/113774 ### WAS: ## Anything that's broken and wrong probably the fault of Bill Stilwell ##(bill@marginalia.org) ### NOW: ## Everything wrong is due to keith@oreilly.com require 'rubygems' require 'mime/types' require 'net/http' require 'cgi' class Param attr_accessor :k, :v def initialize( k, v ) @k = k @v = v end def to_multipart #return "Content-Disposition: form-data; name=\"#{CGI::escape(k)}\"\r\n\r\n#{v}\r\n" # Don't escape mine... return "Content-Disposition: form-data; name=\"#{k}\"\r\n\r\n#{v}\r\n" end end class FileParam attr_accessor :k, :filename, :content def initialize( k, filename, content ) @k = k @filename = filename @content = content end def to_multipart #return "Content-Disposition: form-data; name=\"#{CGI::escape(k)}\"; filename=\"#{filename}\"\r\n" + "Content-Transfer-Encoding: binary\r\n" + "Content-Type: #{MIME::Types.type_for(@filename)}\r\n\r\n" + content + "\r\n " # Don't escape mine return "Content-Disposition: form-data; name=\"#{k}\"; filename=\"#{filename}\"\r\n" + "Content-Transfer-Encoding: binary\r\n" + "Content-Type: #{MIME::Types.type_for(@filename)}\r\n\r\n" + content + "\r\n" end end class MultipartPost BOUNDARY = 'tarsiers-rule0000' HEADER = {"Content-type" => "multipart/form-data, boundary=" + BOUNDARY + " "} def prepare_query (params) fp = [] params.each {|k,v| if v.respond_to?(:read) fp.push(FileParam.new(k, v.path, v.read)) else fp.push(Param.new(k,v)) end } query = fp.collect {|p| "--" + BOUNDARY + "\r\n" + p.to_multipart }.join("") + "--" + BOUNDARY + "--" return query, HEADER end end end passenger-4.0.37/test/support/nginx_controller.rb000644 000765 000024 00000004362 12233035540 022627 0ustar00honglistaff000000 000000 require 'erb' begin require 'daemon_controller' rescue LoadError STDERR.puts "*** ERROR: daemon_controller is not installed. Please install with: " STDERR.puts STDERR.puts " gem install daemon_controller" STDERR.puts exit!(1) end PhusionPassenger.require_passenger_lib 'platform_info/ruby' class NginxController PlatformInfo = PhusionPassenger::PlatformInfo TEMPLATE_DIR = File.expand_path(File.dirname(__FILE__) + "/../stub/nginx") PORT = 64507 def initialize(root_dir) root_dir = File.expand_path(root_dir) @passenger_root = PhusionPassenger.source_root @nginx_root = root_dir @port = PORT @config_file = "#{root_dir}/nginx.conf" @pid_file = "#{root_dir}/nginx.pid" @log_file = "#{root_dir}/error.log" @controller = DaemonController.new( :identifier => 'Nginx', :start_command => "#{CONFIG['nginx']} -c '#{@config_file}'", :ping_command => [:tcp, '127.0.0.1', PORT], :pid_file => @pid_file, :log_file => @log_file, :timeout => 25, :before_start => method(:write_nginx_config_files) ) @servers = [] @max_pool_size = 1 end def set(options) options.each_pair do |key, value| instance_variable_set("@#{key}", value) end end def start stop @controller.start end def stop @controller.stop # On OS X, the Nginx server socket may linger around for a while # after Nginx shutdown, despite Nginx setting SO_REUSEADDR. sockaddr = Socket.pack_sockaddr_in(PORT, '127.0.0.1') eventually(30) do !@controller.send(:ping_socket, Socket::Constants::AF_INET, sockaddr) end end def running? return @controller.running? end def port return @port end def add_server server = Server.new yield server @servers << server end private class Server attr_accessor :values attr_accessor :extra def initialize @values = { :passenger_enabled => "on" } end def [](key) return @values[key] end def []=(key, value) @values[key] = value end def <<(text) @extra = text end end def write_nginx_config_files template = ERB.new(File.read("#{TEMPLATE_DIR}/nginx.conf.erb")) File.write(@config_file, template.result(get_binding)) end def get_binding return binding end end passenger-4.0.37/test/support/placebo-preloader.rb000644 000765 000024 00000004044 12233035540 022616 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # An application preloader which doesn't actually preload anything # and executes the requested start command. DIR = File.expand_path(File.dirname(__FILE__)) require File.expand_path("#{DIR}/../../lib/phusion_passenger") PhusionPassenger.locate_directories PhusionPassenger.require_passenger_lib 'native_support' require 'socket' STDOUT.sync = true STDERR.sync = true puts "!> I have control 1.0" abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n" options = {} while (line = STDIN.readline) != "\n" name, value = line.strip.split(/: */, 2) options[name] = value end socket_filename = "/tmp/placebo-preloader.sock.#{Process.pid}" server = UNIXServer.new(socket_filename) puts "!> Ready" puts "!> socket: unix:#{socket_filename}" puts "!> " def process_client_command(server, client, command) if command == "spawn\n" options = {} while (line = client.readline) != "\n" name, value = line.strip.split(/: */, 2) options[name] = value end command = options["start_command"].split("\t") process_title = options["process_title"] process_title = command[0] if !process_title || process_title.empty? command[0] = [command[0], process_title] pid = fork do begin STDIN.reopen(client) STDOUT.reopen(client) STDOUT.sync = true server.close client.close puts "OK" puts Process.pid exec(*command) rescue Exception => e STDERR.puts "*** ERROR: #{e}\n#{e.backtrace.join("\n")}" ensure STDERR.flush exit!(1) end end Process.detach(pid) elsif command == "pid\n" client.write("#{Process.pid}\n") else client.write("unknown request\n") end end begin exit if ARGV[0] == "exit-immediately" while true ios = select([server, STDIN])[0] if ios.include?(server) client = server.accept begin process_client_command(server, client, client.readline) ensure client.close end end if ios.include?(STDIN) begin STDIN.readline rescue EOFError exit end end end ensure File.unlink(socket_filename) rescue nil end passenger-4.0.37/test/support/test_helper.rb000644 000765 000024 00000026174 12233035540 021564 0ustar00honglistaff000000 000000 require 'fileutils' require 'resolv' require 'net/http' require 'uri' require 'support/multipart' PhusionPassenger.require_passenger_lib 'debug_logging' PhusionPassenger.require_passenger_lib 'platform_info/ruby' # Module containing helper methods, to be included in unit tests. module TestHelper ######## Stub helpers ######## class Stub attr_reader :app_root attr_reader :full_app_root def self.use(name, app_root = nil) stub = new(name, app_root) begin yield stub ensure stub.destroy end end def initialize(name, app_root = nil) @name = name if !File.exist?(stub_source_dir) raise Errno::ENOENT, "Stub '#{name}' not found." end if app_root @app_root = app_root else identifier = name.gsub('/', '-') @app_root = "tmp.#{identifier}.#{object_id}" end @full_app_root = File.expand_path(@app_root) remove_dir_tree(@full_app_root) FileUtils.mkdir_p(@full_app_root) copy_stub_contents system("chmod", "-R", "a+rw", @full_app_root) end def reset # Empty directory without removing the directory itself, # allowing processes with this directory as current working # directory to continue to function properly. files = Dir["#{@full_app_root}/*"] files |= Dir["#{@full_app_root}/.*"] files.delete("#{@full_app_root}/.") files.delete("#{@full_app_root}/..") FileUtils.chmod_R(0777, files) FileUtils.rm_rf(files) copy_stub_contents system("chmod", "-R", "a+rw", @full_app_root) end def move(new_app_root) File.rename(@full_app_root, new_app_root) @app_root = new_app_root @full_app_root = File.expand_path(new_app_root) end def destroy remove_dir_tree(@full_app_root) end def full_app_root return File.expand_path(@app_root) end def public_file(name) return File.binread("#{@full_app_root}/public/#{name}") end private def stub_source_dir return "stub/#{@name}" end def copy_stub_contents FileUtils.cp_r("#{stub_source_dir}/.", @full_app_root) end end class ClassicRailsStub < Stub def self.use(name, app_root = nil) stub = new(name, app_root) begin yield stub ensure stub.destroy end end def startup_file return environment_rb end def environment_rb return "#{@full_app_root}/config/environment.rb" end private def copy_stub_contents super FileUtils.mkdir_p("#{@full_app_root}/log") end end class RackStub < Stub def startup_file return "#{@full_app_root}/config.ru" end end class PythonStub < Stub def startup_file return "#{@full_app_root}/passenger_wsgi.py" end end class NodejsStub < Stub def startup_file return "#{@full_app_root}/app.js" end end def describe_rails_versions(matcher, &block) if ENV['ONLY_RAILS_VERSION'] && !ENV['ONLY_RAILS_VERSION'].empty? found_versions = [ENV['ONLY_RAILS_VERSION']] else found_versions = Dir.entries("stub/rails_apps").grep(/^\d+\.\d+$/) if RUBY_VERSION >= '1.9.0' # Only Rails >= 2.3 is compatible with Ruby 1.9. found_versions.reject! do |version| version < '2.3' end elsif RUBY_VERSION <= '1.8.6' # Rails >= 3 dropped support for 1.8.6 and older. found_versions.reject! do |version| version >= '3.0' end end end case matcher when /^<= (.+)$/ max_version = $1 found_versions.reject! do |version| version > max_version end when /^>= (.+)$/ min_version = $1 found_versions.reject! do |version| version < min_version end when /^= (.+)$/ exact_version = $1 found_versions.reject! do |version| version != exact_version end else raise ArgumentError, "Unknown matcher string '#{matcher}'" end found_versions.sort.each do |version| klass = describe("Rails #{version}", &block) klass.send(:define_method, :rails_version) do version end end end ######## HTTP helpers ######## # Before using these methods, one must set the '@server' instance variable # and implement the start_web_server_if_necessary method. def get(uri) if @server.nil? raise "You must set the '@server' instance variable before get() can be used. For example, @server = 'http://mydomain.test/'" end start_web_server_if_necessary return Net::HTTP.get(URI.parse("#{@server}#{uri}")) end def get_response(uri) if @server.nil? raise "You must set the '@server' instance variable before get() can be used. For example, @server = 'http://mydomain.test/'" end start_web_server_if_necessary return Net::HTTP.get_response(URI.parse("#{@server}#{uri}")) end def post(uri, params = {}) if @server.nil? raise "You must set the '@server' instance variable before get() can be used. For example, @server = 'http://mydomain.test/'" end start_web_server_if_necessary url = URI.parse("#{@server}#{uri}") if params.values.any? { |x| x.respond_to?(:read) } mp = Multipart::MultipartPost.new query, headers = mp.prepare_query(params) Net::HTTP.start(url.host, url.port) do |http| return http.post(url.path, query, headers).body end else return Net::HTTP.post_form(url, params).body end end def check_hosts_configuration begin ok = Resolv.getaddress("passenger.test") == "127.0.0.1" ok = ok && Resolv.getaddress("1.passenger.test") == "127.0.0.1" rescue Resolv::ResolvError, ArgumentError # There's a bug in Ruby 1.8.6-p287's resolv.rb library, which causes # an ArgumentError to be raised instead of ResolvError when resolving # failed. ok = false end if !ok message = "To run the integration test, you must update " << "your hosts file.\n" << "Please add these to your /etc/hosts:\n\n" << "127.0.0.1 passenger.test\n" << "127.0.0.1 mycook.passenger.test\n" << "127.0.0.1 zsfa.passenger.test\n" << "127.0.0.1 norails.passenger.test\n" << "127.0.0.1 1.passenger.test 2.passenger.test 3.passenger.test\n" << "127.0.0.1 4.passenger.test 5.passenger.test 6.passenger.test\n" << "127.0.0.1 7.passenger.test 8.passenger.test 9.passenger.test\n" if RUBY_PLATFORM =~ /darwin/ message << "\n\nThen run:\n\n" << " dscacheutil -flushcache" end STDERR.puts "---------------------------" STDERR.puts message exit! end end ######## Other helpers ######## def when_user_switching_possible if Process.euid == 0 yield end end alias when_running_as_root when_user_switching_possible def when_not_running_as_root if Process.euid != 0 yield end end def eventually(deadline_duration = 2, check_interval = 0.05) deadline = Time.now + deadline_duration while Time.now < deadline if yield return else sleep(check_interval) end end raise "Time limit exceeded" end def should_never_happen(deadline_duration = 1, check_interval = 0.05) deadline = Time.now + deadline_duration while Time.now < deadline if yield raise "That which shouldn't happen happened anyway" else sleep(check_interval) end end end def remove_dir_tree(dir) # FileUtils.chmod_R is susceptible to race conditions: # if another thread/process deletes a file just before # chmod_R has chmodded it, then chmod_R will raise an error. # Keep trying until a real error has been reached or until # chmod_R is done. done = false while !done begin FileUtils.chmod_R(0777, dir) done = true rescue Errno::ENOENT done = !File.exist?(dir) end end FileUtils.rm_rf(dir) end def spawn_process(*args) args.map! do |arg| arg.to_s end if Process.respond_to?(:spawn) return Process.spawn(*args) else return fork do exec(*args) end end end # Run a script in a Ruby subprocess. *args are program arguments to # pass to the script. Returns the script's stdout output. def run_script(code, *args) stdin_child, stdin_parent = IO.pipe stdout_parent, stdout_child = IO.pipe program_args = [PhusionPassenger::PlatformInfo.ruby_command, "-e", "eval(STDIN.read, binding, '(script)', 0)", PhusionPassenger::LIBDIR, *args] if Process.respond_to?(:spawn) program_args << { STDIN => stdin_child, STDOUT => stdout_child, STDERR => STDERR, :close_others => true } pid = Process.spawn(*program_args) else pid = fork do stdin_parent.close stdout_parent.close STDIN.reopen(stdin_child) STDOUT.reopen(stdout_child) stdin_child.close stdout_child.close exec(*program_args) end end stdin_child.close stdout_child.close stdin_parent.write( %Q[require(ARGV.shift + "/phusion_passenger") #{code}]) stdin_parent.close result = stdout_parent.read stdout_parent.close Process.waitpid(pid) return result rescue Exception Process.kill('SIGKILL', pid) if pid raise ensure [stdin_child, stdout_child, stdin_parent, stdout_parent].each do |io| io.close if io && !io.closed? end begin Process.waitpid(pid) if pid rescue Errno::ECHILD, Errno::ESRCH end end def spawn_logging_agent(dump_file, password) passenger_tmpdir = PhusionPassenger::Utils.passenger_tmpdir socket_filename = "#{passenger_tmpdir}/logging.socket" pid = spawn_process("#{PhusionPassenger.agents_dir}/PassengerLoggingAgent", "passenger_root", PhusionPassenger.source_root, "log_level", PhusionPassenger::DebugLogging.log_level, "analytics_dump_file", dump_file, "analytics_log_user", CONFIG['normal_user_1'], "analytics_log_group", CONFIG['normal_group_1'], "analytics_log_permissions", "u=rwx,g=rwx,o=rwx", "logging_agent_address", "unix:#{socket_filename}", "logging_agent_password", password, "logging_agent_admin_address", "unix:#{socket_filename}_admin", "admin_tool_status_password", password) eventually do File.exist?(socket_filename) end return [pid, socket_filename, "unix:#{socket_filename}"] rescue Exception => e if pid Process.kill('KILL', pid) Process.waitpid(pid) end raise e end def flush_logging_agent(password, socket_address) PhusionPassenger.require_passenger_lib 'message_client' if !defined?(PhusionPassenger::MessageClient) client = PhusionPassenger::MessageClient.new("logging", password, socket_address) begin client.write("flush") client.read ensure client.close end end def inspect_server(name) instance = PhusionPassenger::AdminTools::ServerInstance.list.first if name instance.connect(:passenger_status) do return instance.send(name) end else return instance end end if "".respond_to?(:force_encoding) def binary_string(str) return str.force_encoding("binary") end else def binary_string(str) return str end end end File.class_eval do def self.prepend(filename, data) original_content = File.read(filename) File.open(filename, 'w') do |f| f.write(data) f.write(original_content) end end def self.append(filename, data) File.open(filename, 'a') do |f| f.write(data) end end def self.write(filename, content = nil) if block_given? content = yield File.read(filename) end File.open(filename, 'w') do |f| f.write(content) end end def self.touch(filename, timestamp = nil) File.open(filename, 'w').close File.utime(timestamp, timestamp, filename) if timestamp end def self.binread(filename) return File.read(filename) end if !respond_to?(:binread) end passenger-4.0.37/test/support/valgrind.h000644 000765 000024 00000436561 12233035540 020705 0ustar00honglistaff000000 000000 /* -*- c -*- ---------------------------------------------------------------- Notice that the following BSD-style license applies to this one file (valgrind.h) only. The rest of Valgrind is licensed under the terms of the GNU General Public License, version 2, unless otherwise indicated. See the COPYING file in the source distribution for details. ---------------------------------------------------------------- This file is part of Valgrind, a dynamic binary instrumentation framework. Copyright (C) 2000-2007 Julian Seward. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---------------------------------------------------------------- Notice that the above BSD-style license applies to this one file (valgrind.h) only. The entire rest of Valgrind is licensed under the terms of the GNU General Public License, version 2. See the COPYING file in the source distribution for details. ---------------------------------------------------------------- */ /* This file is for inclusion into client (your!) code. You can use these macros to manipulate and query Valgrind's execution inside your own programs. The resulting executables will still run without Valgrind, just a little bit more slowly than they otherwise would, but otherwise unchanged. When not running on valgrind, each client request consumes very few (eg. 7) instructions, so the resulting performance loss is negligible unless you plan to execute client requests millions of times per second. Nevertheless, if that is still a problem, you can compile with the NVALGRIND symbol defined (gcc -DNVALGRIND) so that client requests are not even compiled in. */ #ifndef __VALGRIND_H #define __VALGRIND_H #include /* Nb: this file might be included in a file compiled with -ansi. So we can't use C++ style "//" comments nor the "asm" keyword (instead use "__asm__"). */ /* Derive some tags indicating what the target architecture is. Note that in this file we're using the compiler's CPP symbols for identifying architectures, which are different to the ones we use within the rest of Valgrind. Note, __powerpc__ is active for both 32 and 64-bit PPC, whereas __powerpc64__ is only active for the latter. */ #undef ARCH_x86 #undef ARCH_amd64 #undef ARCH_ppc32 #undef ARCH_ppc64 #if defined(__i386__) # define ARCH_x86 1 #elif defined(__x86_64__) # define ARCH_amd64 1 #elif defined(__powerpc__) && !defined(__powerpc64__) # define ARCH_ppc32 1 #elif defined(__powerpc__) && defined(__powerpc64__) # define ARCH_ppc64 1 #endif /* If we're not compiling for our target architecture, don't generate any inline asms. */ #if !defined(ARCH_x86) && !defined(ARCH_amd64) \ && !defined(ARCH_ppc32) && !defined(ARCH_ppc64) # if !defined(NVALGRIND) # define NVALGRIND 1 # endif #endif /* ------------------------------------------------------------------ */ /* ARCHITECTURE SPECIFICS for SPECIAL INSTRUCTIONS. There is nothing */ /* in here of use to end-users -- skip to the next section. */ /* ------------------------------------------------------------------ */ #if defined(NVALGRIND) /* Define NVALGRIND to completely remove the Valgrind magic sequence from the compiled code (analogous to NDEBUG's effects on assert()) */ #define VALGRIND_DO_CLIENT_REQUEST( \ _zzq_rlval, _zzq_default, _zzq_request, \ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ { \ (_zzq_rlval) = (_zzq_default); \ } #else /* ! NVALGRIND */ /* The following defines the magic code sequences which the JITter spots and handles magically. Don't look too closely at them as they will rot your brain. The assembly code sequences for all architectures is in this one file. This is because this file must be stand-alone, and we don't want to have multiple files. For VALGRIND_DO_CLIENT_REQUEST, we must ensure that the default value gets put in the return slot, so that everything works when this is executed not under Valgrind. Args are passed in a memory block, and so there's no intrinsic limit to the number that could be passed, but it's currently five. The macro args are: _zzq_rlval result lvalue _zzq_default default value (result returned when running on real CPU) _zzq_request request code _zzq_arg1..5 request params The other two macros are used to support function wrapping, and are a lot simpler. VALGRIND_GET_NR_CONTEXT returns the value of the guest's NRADDR pseudo-register and whatever other information is needed to safely run the call original from the wrapper: on ppc64-linux, the R2 value at the divert point is also needed. This information is abstracted into a user-visible type, OrigFn. VALGRIND_CALL_NOREDIR_* behaves the same as the following on the guest, but guarantees that the branch instruction will not be redirected: x86: call *%eax, amd64: call *%rax, ppc32/ppc64: branch-and-link-to-r11. VALGRIND_CALL_NOREDIR is just text, not a complete inline asm, since it needs to be combined with more magic inline asm stuff to be useful. */ /* ---------------------------- x86 ---------------------------- */ #if defined(ARCH_x86) typedef struct { unsigned int nraddr; /* where's the code? */ } OrigFn; #define __SPECIAL_INSTRUCTION_PREAMBLE \ "roll $3, %%edi ; roll $13, %%edi\n\t" \ "roll $29, %%edi ; roll $19, %%edi\n\t" #define VALGRIND_DO_CLIENT_REQUEST( \ _zzq_rlval, _zzq_default, _zzq_request, \ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ { volatile unsigned int _zzq_args[6]; \ volatile unsigned int _zzq_result; \ _zzq_args[0] = (unsigned int)(_zzq_request); \ _zzq_args[1] = (unsigned int)(_zzq_arg1); \ _zzq_args[2] = (unsigned int)(_zzq_arg2); \ _zzq_args[3] = (unsigned int)(_zzq_arg3); \ _zzq_args[4] = (unsigned int)(_zzq_arg4); \ _zzq_args[5] = (unsigned int)(_zzq_arg5); \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %EDX = client_request ( %EAX ) */ \ "xchgl %%ebx,%%ebx" \ : "=d" (_zzq_result) \ : "a" (&_zzq_args[0]), "0" (_zzq_default) \ : "cc", "memory" \ ); \ _zzq_rlval = _zzq_result; \ } #define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ volatile unsigned int __addr; \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %EAX = guest_NRADDR */ \ "xchgl %%ecx,%%ecx" \ : "=a" (__addr) \ : \ : "cc", "memory" \ ); \ _zzq_orig->nraddr = __addr; \ } #define VALGRIND_CALL_NOREDIR_EAX \ __SPECIAL_INSTRUCTION_PREAMBLE \ /* call-noredir *%EAX */ \ "xchgl %%edx,%%edx\n\t" #endif /* ARCH_x86 */ /* --------------------------- amd64 --------------------------- */ #if defined(ARCH_amd64) typedef struct { unsigned long long int nraddr; /* where's the code? */ } OrigFn; #define __SPECIAL_INSTRUCTION_PREAMBLE \ "rolq $3, %%rdi ; rolq $13, %%rdi\n\t" \ "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" #define VALGRIND_DO_CLIENT_REQUEST( \ _zzq_rlval, _zzq_default, _zzq_request, \ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ { volatile unsigned long long int _zzq_args[6]; \ volatile unsigned long long int _zzq_result; \ _zzq_args[0] = (unsigned long long int)(_zzq_request); \ _zzq_args[1] = (unsigned long long int)(_zzq_arg1); \ _zzq_args[2] = (unsigned long long int)(_zzq_arg2); \ _zzq_args[3] = (unsigned long long int)(_zzq_arg3); \ _zzq_args[4] = (unsigned long long int)(_zzq_arg4); \ _zzq_args[5] = (unsigned long long int)(_zzq_arg5); \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %RDX = client_request ( %RAX ) */ \ "xchgq %%rbx,%%rbx" \ : "=d" (_zzq_result) \ : "a" (&_zzq_args[0]), "0" (_zzq_default) \ : "cc", "memory" \ ); \ _zzq_rlval = _zzq_result; \ } #define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ volatile unsigned long long int __addr; \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %RAX = guest_NRADDR */ \ "xchgq %%rcx,%%rcx" \ : "=a" (__addr) \ : \ : "cc", "memory" \ ); \ _zzq_orig->nraddr = __addr; \ } #define VALGRIND_CALL_NOREDIR_RAX \ __SPECIAL_INSTRUCTION_PREAMBLE \ /* call-noredir *%RAX */ \ "xchgq %%rdx,%%rdx\n\t" #endif /* ARCH_amd64 */ /* --------------------------- ppc32 --------------------------- */ #if defined(ARCH_ppc32) typedef struct { unsigned int nraddr; /* where's the code? */ } OrigFn; #define __SPECIAL_INSTRUCTION_PREAMBLE \ "rlwinm 0,0,3,0,0 ; rlwinm 0,0,13,0,0\n\t" \ "rlwinm 0,0,29,0,0 ; rlwinm 0,0,19,0,0\n\t" #define VALGRIND_DO_CLIENT_REQUEST( \ _zzq_rlval, _zzq_default, _zzq_request, \ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ \ { unsigned int _zzq_args[6]; \ register unsigned int _zzq_result __asm__("r3"); \ register unsigned int* _zzq_ptr __asm__("r4"); \ _zzq_args[0] = (unsigned int)(_zzq_request); \ _zzq_args[1] = (unsigned int)(_zzq_arg1); \ _zzq_args[2] = (unsigned int)(_zzq_arg2); \ _zzq_args[3] = (unsigned int)(_zzq_arg3); \ _zzq_args[4] = (unsigned int)(_zzq_arg4); \ _zzq_args[5] = (unsigned int)(_zzq_arg5); \ _zzq_ptr = _zzq_args; \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %R3 = client_request ( %R4 ) */ \ "or 1,1,1" \ : "=r" (_zzq_result) \ : "0" (_zzq_default), "r" (_zzq_ptr) \ : "cc", "memory"); \ _zzq_rlval = _zzq_result; \ } #define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ register unsigned int __addr __asm__("r3"); \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %R3 = guest_NRADDR */ \ "or 2,2,2" \ : "=r" (__addr) \ : \ : "cc", "memory" \ ); \ _zzq_orig->nraddr = __addr; \ } #define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ __SPECIAL_INSTRUCTION_PREAMBLE \ /* branch-and-link-to-noredir *%R11 */ \ "or 3,3,3\n\t" #endif /* ARCH_ppc32 */ /* --------------------------- ppc64 --------------------------- */ #if defined(ARCH_ppc64) typedef struct { unsigned long long int nraddr; /* where's the code? */ unsigned long long int r2; /* what tocptr do we need? */ } OrigFn; #define __SPECIAL_INSTRUCTION_PREAMBLE \ "rotldi 0,0,3 ; rotldi 0,0,13\n\t" \ "rotldi 0,0,61 ; rotldi 0,0,51\n\t" #define VALGRIND_DO_CLIENT_REQUEST( \ _zzq_rlval, _zzq_default, _zzq_request, \ _zzq_arg1, _zzq_arg2, _zzq_arg3, _zzq_arg4, _zzq_arg5) \ \ { unsigned long long int _zzq_args[6]; \ register unsigned long long int _zzq_result __asm__("r3"); \ register unsigned long long int* _zzq_ptr __asm__("r4"); \ _zzq_args[0] = (unsigned long long int)(_zzq_request); \ _zzq_args[1] = (unsigned long long int)(_zzq_arg1); \ _zzq_args[2] = (unsigned long long int)(_zzq_arg2); \ _zzq_args[3] = (unsigned long long int)(_zzq_arg3); \ _zzq_args[4] = (unsigned long long int)(_zzq_arg4); \ _zzq_args[5] = (unsigned long long int)(_zzq_arg5); \ _zzq_ptr = _zzq_args; \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %R3 = client_request ( %R4 ) */ \ "or 1,1,1" \ : "=r" (_zzq_result) \ : "0" (_zzq_default), "r" (_zzq_ptr) \ : "cc", "memory"); \ _zzq_rlval = _zzq_result; \ } #define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) \ { volatile OrigFn* _zzq_orig = &(_zzq_rlval); \ register unsigned long long int __addr __asm__("r3"); \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %R3 = guest_NRADDR */ \ "or 2,2,2" \ : "=r" (__addr) \ : \ : "cc", "memory" \ ); \ _zzq_orig->nraddr = __addr; \ __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE \ /* %R3 = guest_NRADDR_GPR2 */ \ "or 4,4,4" \ : "=r" (__addr) \ : \ : "cc", "memory" \ ); \ _zzq_orig->r2 = __addr; \ } #define VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ __SPECIAL_INSTRUCTION_PREAMBLE \ /* branch-and-link-to-noredir *%R11 */ \ "or 3,3,3\n\t" #endif /* ARCH_ppc64 */ /* Insert assembly code for other architectures here... */ #endif /* NVALGRIND */ /* ------------------------------------------------------------------ */ /* ARCHITECTURE SPECIFICS for FUNCTION WRAPPING. This is all very */ /* ugly. It's the least-worst tradeoff I can think of. */ /* ------------------------------------------------------------------ */ /* This section defines magic (a.k.a appalling-hack) macros for doing guaranteed-no-redirection macros, so as to get from function wrappers to the functions they are wrapping. The whole point is to construct standard call sequences, but to do the call itself with a special no-redirect call pseudo-instruction that the JIT understands and handles specially. This section is long and repetitious, and I can't see a way to make it shorter. The naming scheme is as follows: CALL_FN_{W,v}_{v,W,WW,WWW,WWWW,5W,6W,7W,etc} 'W' stands for "word" and 'v' for "void". Hence there are different macros for calling arity 0, 1, 2, 3, 4, etc, functions, and for each, the possibility of returning a word-typed result, or no result. */ /* Use these to write the name of your wrapper. NOTE: duplicates VG_WRAP_FUNCTION_Z{U,Z} in pub_tool_redir.h. */ #define I_WRAP_SONAME_FNNAME_ZU(soname,fnname) \ _vgwZU_##soname##_##fnname #define I_WRAP_SONAME_FNNAME_ZZ(soname,fnname) \ _vgwZZ_##soname##_##fnname /* Use this macro from within a wrapper function to collect the context (address and possibly other info) of the original function. Once you have that you can then use it in one of the CALL_FN_ macros. The type of the argument _lval is OrigFn. */ #define VALGRIND_GET_ORIG_FN(_lval) VALGRIND_GET_NR_CONTEXT(_lval) /* Derivatives of the main macros below, for calling functions returning void. */ #define CALL_FN_v_v(fnptr) \ do { volatile unsigned long _junk; \ CALL_FN_W_v(_junk,fnptr); } while (0) #define CALL_FN_v_W(fnptr, arg1) \ do { volatile unsigned long _junk; \ CALL_FN_W_W(_junk,fnptr,arg1); } while (0) #define CALL_FN_v_WW(fnptr, arg1,arg2) \ do { volatile unsigned long _junk; \ CALL_FN_W_WW(_junk,fnptr,arg1,arg2); } while (0) #define CALL_FN_v_WWW(fnptr, arg1,arg2,arg3) \ do { volatile unsigned long _junk; \ CALL_FN_W_WWW(_junk,fnptr,arg1,arg2,arg3); } while (0) /* ---------------------------- x86 ---------------------------- */ #if defined(ARCH_x86) /* These regs are trashed by the hidden call. No need to mention eax as gcc can already see that, plus causes gcc to bomb. */ #define __CALLER_SAVED_REGS /*"eax"*/ "ecx", "edx" /* These CALL_FN_ macros assume that on x86-linux, sizeof(unsigned long) == 4. */ #define CALL_FN_W_v(lval, orig) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[1]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ __asm__ volatile( \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_W(lval, orig, arg1) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[2]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ __asm__ volatile( \ "pushl 4(%%eax)\n\t" \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ "addl $4, %%esp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_WW(lval, orig, arg1,arg2) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ __asm__ volatile( \ "pushl 8(%%eax)\n\t" \ "pushl 4(%%eax)\n\t" \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ "addl $8, %%esp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[4]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ __asm__ volatile( \ "pushl 12(%%eax)\n\t" \ "pushl 8(%%eax)\n\t" \ "pushl 4(%%eax)\n\t" \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ "addl $12, %%esp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[5]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ __asm__ volatile( \ "pushl 16(%%eax)\n\t" \ "pushl 12(%%eax)\n\t" \ "pushl 8(%%eax)\n\t" \ "pushl 4(%%eax)\n\t" \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ "addl $16, %%esp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[6]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ __asm__ volatile( \ "pushl 20(%%eax)\n\t" \ "pushl 16(%%eax)\n\t" \ "pushl 12(%%eax)\n\t" \ "pushl 8(%%eax)\n\t" \ "pushl 4(%%eax)\n\t" \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ "addl $20, %%esp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[7]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ __asm__ volatile( \ "pushl 24(%%eax)\n\t" \ "pushl 20(%%eax)\n\t" \ "pushl 16(%%eax)\n\t" \ "pushl 12(%%eax)\n\t" \ "pushl 8(%%eax)\n\t" \ "pushl 4(%%eax)\n\t" \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ "addl $24, %%esp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[8]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ _argvec[7] = (unsigned long)(arg7); \ __asm__ volatile( \ "pushl 28(%%eax)\n\t" \ "pushl 24(%%eax)\n\t" \ "pushl 20(%%eax)\n\t" \ "pushl 16(%%eax)\n\t" \ "pushl 12(%%eax)\n\t" \ "pushl 8(%%eax)\n\t" \ "pushl 4(%%eax)\n\t" \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ "addl $28, %%esp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[9]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ _argvec[7] = (unsigned long)(arg7); \ _argvec[8] = (unsigned long)(arg8); \ __asm__ volatile( \ "pushl 32(%%eax)\n\t" \ "pushl 28(%%eax)\n\t" \ "pushl 24(%%eax)\n\t" \ "pushl 20(%%eax)\n\t" \ "pushl 16(%%eax)\n\t" \ "pushl 12(%%eax)\n\t" \ "pushl 8(%%eax)\n\t" \ "pushl 4(%%eax)\n\t" \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ "addl $32, %%esp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[10]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ _argvec[7] = (unsigned long)(arg7); \ _argvec[8] = (unsigned long)(arg8); \ _argvec[9] = (unsigned long)(arg9); \ __asm__ volatile( \ "pushl 36(%%eax)\n\t" \ "pushl 32(%%eax)\n\t" \ "pushl 28(%%eax)\n\t" \ "pushl 24(%%eax)\n\t" \ "pushl 20(%%eax)\n\t" \ "pushl 16(%%eax)\n\t" \ "pushl 12(%%eax)\n\t" \ "pushl 8(%%eax)\n\t" \ "pushl 4(%%eax)\n\t" \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ "addl $36, %%esp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9,arg10) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[11]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ _argvec[7] = (unsigned long)(arg7); \ _argvec[8] = (unsigned long)(arg8); \ _argvec[9] = (unsigned long)(arg9); \ _argvec[10] = (unsigned long)(arg10); \ __asm__ volatile( \ "pushl 40(%%eax)\n\t" \ "pushl 36(%%eax)\n\t" \ "pushl 32(%%eax)\n\t" \ "pushl 28(%%eax)\n\t" \ "pushl 24(%%eax)\n\t" \ "pushl 20(%%eax)\n\t" \ "pushl 16(%%eax)\n\t" \ "pushl 12(%%eax)\n\t" \ "pushl 8(%%eax)\n\t" \ "pushl 4(%%eax)\n\t" \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ "addl $40, %%esp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ arg6,arg7,arg8,arg9,arg10, \ arg11) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[12]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ _argvec[7] = (unsigned long)(arg7); \ _argvec[8] = (unsigned long)(arg8); \ _argvec[9] = (unsigned long)(arg9); \ _argvec[10] = (unsigned long)(arg10); \ _argvec[11] = (unsigned long)(arg11); \ __asm__ volatile( \ "pushl 44(%%eax)\n\t" \ "pushl 40(%%eax)\n\t" \ "pushl 36(%%eax)\n\t" \ "pushl 32(%%eax)\n\t" \ "pushl 28(%%eax)\n\t" \ "pushl 24(%%eax)\n\t" \ "pushl 20(%%eax)\n\t" \ "pushl 16(%%eax)\n\t" \ "pushl 12(%%eax)\n\t" \ "pushl 8(%%eax)\n\t" \ "pushl 4(%%eax)\n\t" \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ "addl $44, %%esp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5, \ arg6,arg7,arg8,arg9,arg10, \ arg11,arg12) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[13]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ _argvec[7] = (unsigned long)(arg7); \ _argvec[8] = (unsigned long)(arg8); \ _argvec[9] = (unsigned long)(arg9); \ _argvec[10] = (unsigned long)(arg10); \ _argvec[11] = (unsigned long)(arg11); \ _argvec[12] = (unsigned long)(arg12); \ __asm__ volatile( \ "pushl 48(%%eax)\n\t" \ "pushl 44(%%eax)\n\t" \ "pushl 40(%%eax)\n\t" \ "pushl 36(%%eax)\n\t" \ "pushl 32(%%eax)\n\t" \ "pushl 28(%%eax)\n\t" \ "pushl 24(%%eax)\n\t" \ "pushl 20(%%eax)\n\t" \ "pushl 16(%%eax)\n\t" \ "pushl 12(%%eax)\n\t" \ "pushl 8(%%eax)\n\t" \ "pushl 4(%%eax)\n\t" \ "movl (%%eax), %%eax\n\t" /* target->%eax */ \ VALGRIND_CALL_NOREDIR_EAX \ "addl $48, %%esp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #endif /* ARCH_x86 */ /* --------------------------- amd64 --------------------------- */ #if defined(ARCH_amd64) /* ARGREGS: rdi rsi rdx rcx r8 r9 (the rest on stack in R-to-L order) */ /* These regs are trashed by the hidden call. */ #define __CALLER_SAVED_REGS /*"rax",*/ "rcx", "rdx", "rsi", \ "rdi", "r8", "r9", "r10", "r11" /* These CALL_FN_ macros assume that on amd64-linux, sizeof(unsigned long) == 8. */ #define CALL_FN_W_v(lval, orig) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[1]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ __asm__ volatile( \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_W(lval, orig, arg1) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[2]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ __asm__ volatile( \ "movq 8(%%rax), %%rdi\n\t" \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_WW(lval, orig, arg1,arg2) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ __asm__ volatile( \ "movq 16(%%rax), %%rsi\n\t" \ "movq 8(%%rax), %%rdi\n\t" \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[4]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ __asm__ volatile( \ "movq 24(%%rax), %%rdx\n\t" \ "movq 16(%%rax), %%rsi\n\t" \ "movq 8(%%rax), %%rdi\n\t" \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[5]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ __asm__ volatile( \ "movq 32(%%rax), %%rcx\n\t" \ "movq 24(%%rax), %%rdx\n\t" \ "movq 16(%%rax), %%rsi\n\t" \ "movq 8(%%rax), %%rdi\n\t" \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[6]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ __asm__ volatile( \ "movq 40(%%rax), %%r8\n\t" \ "movq 32(%%rax), %%rcx\n\t" \ "movq 24(%%rax), %%rdx\n\t" \ "movq 16(%%rax), %%rsi\n\t" \ "movq 8(%%rax), %%rdi\n\t" \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[7]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ __asm__ volatile( \ "movq 48(%%rax), %%r9\n\t" \ "movq 40(%%rax), %%r8\n\t" \ "movq 32(%%rax), %%rcx\n\t" \ "movq 24(%%rax), %%rdx\n\t" \ "movq 16(%%rax), %%rsi\n\t" \ "movq 8(%%rax), %%rdi\n\t" \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[8]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ _argvec[7] = (unsigned long)(arg7); \ __asm__ volatile( \ "pushq 56(%%rax)\n\t" \ "movq 48(%%rax), %%r9\n\t" \ "movq 40(%%rax), %%r8\n\t" \ "movq 32(%%rax), %%rcx\n\t" \ "movq 24(%%rax), %%rdx\n\t" \ "movq 16(%%rax), %%rsi\n\t" \ "movq 8(%%rax), %%rdi\n\t" \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ "addq $8, %%rsp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[9]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ _argvec[7] = (unsigned long)(arg7); \ _argvec[8] = (unsigned long)(arg8); \ __asm__ volatile( \ "pushq 64(%%rax)\n\t" \ "pushq 56(%%rax)\n\t" \ "movq 48(%%rax), %%r9\n\t" \ "movq 40(%%rax), %%r8\n\t" \ "movq 32(%%rax), %%rcx\n\t" \ "movq 24(%%rax), %%rdx\n\t" \ "movq 16(%%rax), %%rsi\n\t" \ "movq 8(%%rax), %%rdi\n\t" \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ "addq $16, %%rsp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[10]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ _argvec[7] = (unsigned long)(arg7); \ _argvec[8] = (unsigned long)(arg8); \ _argvec[9] = (unsigned long)(arg9); \ __asm__ volatile( \ "pushq 72(%%rax)\n\t" \ "pushq 64(%%rax)\n\t" \ "pushq 56(%%rax)\n\t" \ "movq 48(%%rax), %%r9\n\t" \ "movq 40(%%rax), %%r8\n\t" \ "movq 32(%%rax), %%rcx\n\t" \ "movq 24(%%rax), %%rdx\n\t" \ "movq 16(%%rax), %%rsi\n\t" \ "movq 8(%%rax), %%rdi\n\t" \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ "addq $24, %%rsp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9,arg10) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[11]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ _argvec[7] = (unsigned long)(arg7); \ _argvec[8] = (unsigned long)(arg8); \ _argvec[9] = (unsigned long)(arg9); \ _argvec[10] = (unsigned long)(arg10); \ __asm__ volatile( \ "pushq 80(%%rax)\n\t" \ "pushq 72(%%rax)\n\t" \ "pushq 64(%%rax)\n\t" \ "pushq 56(%%rax)\n\t" \ "movq 48(%%rax), %%r9\n\t" \ "movq 40(%%rax), %%r8\n\t" \ "movq 32(%%rax), %%rcx\n\t" \ "movq 24(%%rax), %%rdx\n\t" \ "movq 16(%%rax), %%rsi\n\t" \ "movq 8(%%rax), %%rdi\n\t" \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ "addq $32, %%rsp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9,arg10,arg11) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[12]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ _argvec[7] = (unsigned long)(arg7); \ _argvec[8] = (unsigned long)(arg8); \ _argvec[9] = (unsigned long)(arg9); \ _argvec[10] = (unsigned long)(arg10); \ _argvec[11] = (unsigned long)(arg11); \ __asm__ volatile( \ "pushq 88(%%rax)\n\t" \ "pushq 80(%%rax)\n\t" \ "pushq 72(%%rax)\n\t" \ "pushq 64(%%rax)\n\t" \ "pushq 56(%%rax)\n\t" \ "movq 48(%%rax), %%r9\n\t" \ "movq 40(%%rax), %%r8\n\t" \ "movq 32(%%rax), %%rcx\n\t" \ "movq 24(%%rax), %%rdx\n\t" \ "movq 16(%%rax), %%rsi\n\t" \ "movq 8(%%rax), %%rdi\n\t" \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ "addq $40, %%rsp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9,arg10,arg11,arg12) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[13]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)(arg1); \ _argvec[2] = (unsigned long)(arg2); \ _argvec[3] = (unsigned long)(arg3); \ _argvec[4] = (unsigned long)(arg4); \ _argvec[5] = (unsigned long)(arg5); \ _argvec[6] = (unsigned long)(arg6); \ _argvec[7] = (unsigned long)(arg7); \ _argvec[8] = (unsigned long)(arg8); \ _argvec[9] = (unsigned long)(arg9); \ _argvec[10] = (unsigned long)(arg10); \ _argvec[11] = (unsigned long)(arg11); \ _argvec[12] = (unsigned long)(arg12); \ __asm__ volatile( \ "pushq 96(%%rax)\n\t" \ "pushq 88(%%rax)\n\t" \ "pushq 80(%%rax)\n\t" \ "pushq 72(%%rax)\n\t" \ "pushq 64(%%rax)\n\t" \ "pushq 56(%%rax)\n\t" \ "movq 48(%%rax), %%r9\n\t" \ "movq 40(%%rax), %%r8\n\t" \ "movq 32(%%rax), %%rcx\n\t" \ "movq 24(%%rax), %%rdx\n\t" \ "movq 16(%%rax), %%rsi\n\t" \ "movq 8(%%rax), %%rdi\n\t" \ "movq (%%rax), %%rax\n\t" /* target->%rax */ \ VALGRIND_CALL_NOREDIR_RAX \ "addq $48, %%rsp\n" \ : /*out*/ "=a" (_res) \ : /*in*/ "a" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #endif /* ARCH_amd64 */ /* --------------------------- ppc32 --------------------------- */ #if defined(ARCH_ppc32) /* This is useful for finding out about the on-stack stuff: extern int f9 ( int,int,int,int,int,int,int,int,int ); extern int f10 ( int,int,int,int,int,int,int,int,int,int ); extern int f11 ( int,int,int,int,int,int,int,int,int,int,int ); extern int f12 ( int,int,int,int,int,int,int,int,int,int,int,int ); int g9 ( void ) { return f9(11,22,33,44,55,66,77,88,99); } int g10 ( void ) { return f10(11,22,33,44,55,66,77,88,99,110); } int g11 ( void ) { return f11(11,22,33,44,55,66,77,88,99,110,121); } int g12 ( void ) { return f12(11,22,33,44,55,66,77,88,99,110,121,132); } */ /* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */ /* These regs are trashed by the hidden call. */ #define __CALLER_SAVED_REGS \ "lr", "ctr", "xer", \ "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \ "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \ "r11", "r12", "r13" /* These CALL_FN_ macros assume that on ppc32-linux, sizeof(unsigned long) == 4. */ #define CALL_FN_W_v(lval, orig) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[1]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_W(lval, orig, arg1) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[2]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "lwz 3,4(11)\n\t" /* arg1->r3 */ \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_WW(lval, orig, arg1,arg2) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ _argvec[2] = (unsigned long)arg2; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "lwz 3,4(11)\n\t" /* arg1->r3 */ \ "lwz 4,8(11)\n\t" \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[4]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ _argvec[2] = (unsigned long)arg2; \ _argvec[3] = (unsigned long)arg3; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "lwz 3,4(11)\n\t" /* arg1->r3 */ \ "lwz 4,8(11)\n\t" \ "lwz 5,12(11)\n\t" \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[5]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ _argvec[2] = (unsigned long)arg2; \ _argvec[3] = (unsigned long)arg3; \ _argvec[4] = (unsigned long)arg4; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "lwz 3,4(11)\n\t" /* arg1->r3 */ \ "lwz 4,8(11)\n\t" \ "lwz 5,12(11)\n\t" \ "lwz 6,16(11)\n\t" /* arg4->r6 */ \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[6]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ _argvec[2] = (unsigned long)arg2; \ _argvec[3] = (unsigned long)arg3; \ _argvec[4] = (unsigned long)arg4; \ _argvec[5] = (unsigned long)arg5; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "lwz 3,4(11)\n\t" /* arg1->r3 */ \ "lwz 4,8(11)\n\t" \ "lwz 5,12(11)\n\t" \ "lwz 6,16(11)\n\t" /* arg4->r6 */ \ "lwz 7,20(11)\n\t" \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[7]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ _argvec[2] = (unsigned long)arg2; \ _argvec[3] = (unsigned long)arg3; \ _argvec[4] = (unsigned long)arg4; \ _argvec[5] = (unsigned long)arg5; \ _argvec[6] = (unsigned long)arg6; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "lwz 3,4(11)\n\t" /* arg1->r3 */ \ "lwz 4,8(11)\n\t" \ "lwz 5,12(11)\n\t" \ "lwz 6,16(11)\n\t" /* arg4->r6 */ \ "lwz 7,20(11)\n\t" \ "lwz 8,24(11)\n\t" \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[8]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ _argvec[2] = (unsigned long)arg2; \ _argvec[3] = (unsigned long)arg3; \ _argvec[4] = (unsigned long)arg4; \ _argvec[5] = (unsigned long)arg5; \ _argvec[6] = (unsigned long)arg6; \ _argvec[7] = (unsigned long)arg7; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "lwz 3,4(11)\n\t" /* arg1->r3 */ \ "lwz 4,8(11)\n\t" \ "lwz 5,12(11)\n\t" \ "lwz 6,16(11)\n\t" /* arg4->r6 */ \ "lwz 7,20(11)\n\t" \ "lwz 8,24(11)\n\t" \ "lwz 9,28(11)\n\t" \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[9]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ _argvec[2] = (unsigned long)arg2; \ _argvec[3] = (unsigned long)arg3; \ _argvec[4] = (unsigned long)arg4; \ _argvec[5] = (unsigned long)arg5; \ _argvec[6] = (unsigned long)arg6; \ _argvec[7] = (unsigned long)arg7; \ _argvec[8] = (unsigned long)arg8; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "lwz 3,4(11)\n\t" /* arg1->r3 */ \ "lwz 4,8(11)\n\t" \ "lwz 5,12(11)\n\t" \ "lwz 6,16(11)\n\t" /* arg4->r6 */ \ "lwz 7,20(11)\n\t" \ "lwz 8,24(11)\n\t" \ "lwz 9,28(11)\n\t" \ "lwz 10,32(11)\n\t" /* arg8->r10 */ \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[10]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ _argvec[2] = (unsigned long)arg2; \ _argvec[3] = (unsigned long)arg3; \ _argvec[4] = (unsigned long)arg4; \ _argvec[5] = (unsigned long)arg5; \ _argvec[6] = (unsigned long)arg6; \ _argvec[7] = (unsigned long)arg7; \ _argvec[8] = (unsigned long)arg8; \ _argvec[9] = (unsigned long)arg9; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "addi 1,1,-16\n\t" \ /* arg9 */ \ "lwz 3,36(11)\n\t" \ "stw 3,8(1)\n\t" \ /* args1-8 */ \ "lwz 3,4(11)\n\t" /* arg1->r3 */ \ "lwz 4,8(11)\n\t" \ "lwz 5,12(11)\n\t" \ "lwz 6,16(11)\n\t" /* arg4->r6 */ \ "lwz 7,20(11)\n\t" \ "lwz 8,24(11)\n\t" \ "lwz 9,28(11)\n\t" \ "lwz 10,32(11)\n\t" /* arg8->r10 */ \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "addi 1,1,16\n\t" \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9,arg10) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[11]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ _argvec[2] = (unsigned long)arg2; \ _argvec[3] = (unsigned long)arg3; \ _argvec[4] = (unsigned long)arg4; \ _argvec[5] = (unsigned long)arg5; \ _argvec[6] = (unsigned long)arg6; \ _argvec[7] = (unsigned long)arg7; \ _argvec[8] = (unsigned long)arg8; \ _argvec[9] = (unsigned long)arg9; \ _argvec[10] = (unsigned long)arg10; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "addi 1,1,-16\n\t" \ /* arg10 */ \ "lwz 3,40(11)\n\t" \ "stw 3,12(1)\n\t" \ /* arg9 */ \ "lwz 3,36(11)\n\t" \ "stw 3,8(1)\n\t" \ /* args1-8 */ \ "lwz 3,4(11)\n\t" /* arg1->r3 */ \ "lwz 4,8(11)\n\t" \ "lwz 5,12(11)\n\t" \ "lwz 6,16(11)\n\t" /* arg4->r6 */ \ "lwz 7,20(11)\n\t" \ "lwz 8,24(11)\n\t" \ "lwz 9,28(11)\n\t" \ "lwz 10,32(11)\n\t" /* arg8->r10 */ \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "addi 1,1,16\n\t" \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9,arg10,arg11) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[12]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ _argvec[2] = (unsigned long)arg2; \ _argvec[3] = (unsigned long)arg3; \ _argvec[4] = (unsigned long)arg4; \ _argvec[5] = (unsigned long)arg5; \ _argvec[6] = (unsigned long)arg6; \ _argvec[7] = (unsigned long)arg7; \ _argvec[8] = (unsigned long)arg8; \ _argvec[9] = (unsigned long)arg9; \ _argvec[10] = (unsigned long)arg10; \ _argvec[11] = (unsigned long)arg11; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "addi 1,1,-32\n\t" \ /* arg11 */ \ "lwz 3,44(11)\n\t" \ "stw 3,16(1)\n\t" \ /* arg10 */ \ "lwz 3,40(11)\n\t" \ "stw 3,12(1)\n\t" \ /* arg9 */ \ "lwz 3,36(11)\n\t" \ "stw 3,8(1)\n\t" \ /* args1-8 */ \ "lwz 3,4(11)\n\t" /* arg1->r3 */ \ "lwz 4,8(11)\n\t" \ "lwz 5,12(11)\n\t" \ "lwz 6,16(11)\n\t" /* arg4->r6 */ \ "lwz 7,20(11)\n\t" \ "lwz 8,24(11)\n\t" \ "lwz 9,28(11)\n\t" \ "lwz 10,32(11)\n\t" /* arg8->r10 */ \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "addi 1,1,32\n\t" \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9,arg10,arg11,arg12) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[13]; \ volatile unsigned long _res; \ _argvec[0] = (unsigned long)_orig.nraddr; \ _argvec[1] = (unsigned long)arg1; \ _argvec[2] = (unsigned long)arg2; \ _argvec[3] = (unsigned long)arg3; \ _argvec[4] = (unsigned long)arg4; \ _argvec[5] = (unsigned long)arg5; \ _argvec[6] = (unsigned long)arg6; \ _argvec[7] = (unsigned long)arg7; \ _argvec[8] = (unsigned long)arg8; \ _argvec[9] = (unsigned long)arg9; \ _argvec[10] = (unsigned long)arg10; \ _argvec[11] = (unsigned long)arg11; \ _argvec[12] = (unsigned long)arg12; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "addi 1,1,-32\n\t" \ /* arg12 */ \ "lwz 3,48(11)\n\t" \ "stw 3,20(1)\n\t" \ /* arg11 */ \ "lwz 3,44(11)\n\t" \ "stw 3,16(1)\n\t" \ /* arg10 */ \ "lwz 3,40(11)\n\t" \ "stw 3,12(1)\n\t" \ /* arg9 */ \ "lwz 3,36(11)\n\t" \ "stw 3,8(1)\n\t" \ /* args1-8 */ \ "lwz 3,4(11)\n\t" /* arg1->r3 */ \ "lwz 4,8(11)\n\t" \ "lwz 5,12(11)\n\t" \ "lwz 6,16(11)\n\t" /* arg4->r6 */ \ "lwz 7,20(11)\n\t" \ "lwz 8,24(11)\n\t" \ "lwz 9,28(11)\n\t" \ "lwz 10,32(11)\n\t" /* arg8->r10 */ \ "lwz 11,0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "addi 1,1,32\n\t" \ "mr %0,3" \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[0]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #endif /* ARCH_ppc32 */ /* --------------------------- ppc64 --------------------------- */ #if defined(ARCH_ppc64) /* ARGREGS: r3 r4 r5 r6 r7 r8 r9 r10 (the rest on stack somewhere) */ /* These regs are trashed by the hidden call. */ #define __CALLER_SAVED_REGS \ "lr", "ctr", "xer", \ "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \ "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \ "r11", "r12", "r13" /* These CALL_FN_ macros assume that on ppc64-linux, sizeof(unsigned long) == 8. */ #define CALL_FN_W_v(lval, orig) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+0]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)" /* restore tocptr */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_W(lval, orig, arg1) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+1]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ _argvec[2+1] = (unsigned long)arg1; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "ld 3, 8(11)\n\t" /* arg1->r3 */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)" /* restore tocptr */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_WW(lval, orig, arg1,arg2) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+2]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ _argvec[2+1] = (unsigned long)arg1; \ _argvec[2+2] = (unsigned long)arg2; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "ld 3, 8(11)\n\t" /* arg1->r3 */ \ "ld 4, 16(11)\n\t" /* arg2->r4 */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)" /* restore tocptr */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_WWW(lval, orig, arg1,arg2,arg3) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+3]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ _argvec[2+1] = (unsigned long)arg1; \ _argvec[2+2] = (unsigned long)arg2; \ _argvec[2+3] = (unsigned long)arg3; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "ld 3, 8(11)\n\t" /* arg1->r3 */ \ "ld 4, 16(11)\n\t" /* arg2->r4 */ \ "ld 5, 24(11)\n\t" /* arg3->r5 */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)" /* restore tocptr */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_WWWW(lval, orig, arg1,arg2,arg3,arg4) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+4]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ _argvec[2+1] = (unsigned long)arg1; \ _argvec[2+2] = (unsigned long)arg2; \ _argvec[2+3] = (unsigned long)arg3; \ _argvec[2+4] = (unsigned long)arg4; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "ld 3, 8(11)\n\t" /* arg1->r3 */ \ "ld 4, 16(11)\n\t" /* arg2->r4 */ \ "ld 5, 24(11)\n\t" /* arg3->r5 */ \ "ld 6, 32(11)\n\t" /* arg4->r6 */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)" /* restore tocptr */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_5W(lval, orig, arg1,arg2,arg3,arg4,arg5) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+5]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ _argvec[2+1] = (unsigned long)arg1; \ _argvec[2+2] = (unsigned long)arg2; \ _argvec[2+3] = (unsigned long)arg3; \ _argvec[2+4] = (unsigned long)arg4; \ _argvec[2+5] = (unsigned long)arg5; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "ld 3, 8(11)\n\t" /* arg1->r3 */ \ "ld 4, 16(11)\n\t" /* arg2->r4 */ \ "ld 5, 24(11)\n\t" /* arg3->r5 */ \ "ld 6, 32(11)\n\t" /* arg4->r6 */ \ "ld 7, 40(11)\n\t" /* arg5->r7 */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)" /* restore tocptr */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_6W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+6]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ _argvec[2+1] = (unsigned long)arg1; \ _argvec[2+2] = (unsigned long)arg2; \ _argvec[2+3] = (unsigned long)arg3; \ _argvec[2+4] = (unsigned long)arg4; \ _argvec[2+5] = (unsigned long)arg5; \ _argvec[2+6] = (unsigned long)arg6; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "ld 3, 8(11)\n\t" /* arg1->r3 */ \ "ld 4, 16(11)\n\t" /* arg2->r4 */ \ "ld 5, 24(11)\n\t" /* arg3->r5 */ \ "ld 6, 32(11)\n\t" /* arg4->r6 */ \ "ld 7, 40(11)\n\t" /* arg5->r7 */ \ "ld 8, 48(11)\n\t" /* arg6->r8 */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)" /* restore tocptr */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_7W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+7]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ _argvec[2+1] = (unsigned long)arg1; \ _argvec[2+2] = (unsigned long)arg2; \ _argvec[2+3] = (unsigned long)arg3; \ _argvec[2+4] = (unsigned long)arg4; \ _argvec[2+5] = (unsigned long)arg5; \ _argvec[2+6] = (unsigned long)arg6; \ _argvec[2+7] = (unsigned long)arg7; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "ld 3, 8(11)\n\t" /* arg1->r3 */ \ "ld 4, 16(11)\n\t" /* arg2->r4 */ \ "ld 5, 24(11)\n\t" /* arg3->r5 */ \ "ld 6, 32(11)\n\t" /* arg4->r6 */ \ "ld 7, 40(11)\n\t" /* arg5->r7 */ \ "ld 8, 48(11)\n\t" /* arg6->r8 */ \ "ld 9, 56(11)\n\t" /* arg7->r9 */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)" /* restore tocptr */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_8W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+8]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ _argvec[2+1] = (unsigned long)arg1; \ _argvec[2+2] = (unsigned long)arg2; \ _argvec[2+3] = (unsigned long)arg3; \ _argvec[2+4] = (unsigned long)arg4; \ _argvec[2+5] = (unsigned long)arg5; \ _argvec[2+6] = (unsigned long)arg6; \ _argvec[2+7] = (unsigned long)arg7; \ _argvec[2+8] = (unsigned long)arg8; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "ld 3, 8(11)\n\t" /* arg1->r3 */ \ "ld 4, 16(11)\n\t" /* arg2->r4 */ \ "ld 5, 24(11)\n\t" /* arg3->r5 */ \ "ld 6, 32(11)\n\t" /* arg4->r6 */ \ "ld 7, 40(11)\n\t" /* arg5->r7 */ \ "ld 8, 48(11)\n\t" /* arg6->r8 */ \ "ld 9, 56(11)\n\t" /* arg7->r9 */ \ "ld 10, 64(11)\n\t" /* arg8->r10 */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)" /* restore tocptr */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_9W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+9]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ _argvec[2+1] = (unsigned long)arg1; \ _argvec[2+2] = (unsigned long)arg2; \ _argvec[2+3] = (unsigned long)arg3; \ _argvec[2+4] = (unsigned long)arg4; \ _argvec[2+5] = (unsigned long)arg5; \ _argvec[2+6] = (unsigned long)arg6; \ _argvec[2+7] = (unsigned long)arg7; \ _argvec[2+8] = (unsigned long)arg8; \ _argvec[2+9] = (unsigned long)arg9; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "addi 1,1,-128\n\t" /* expand stack frame */ \ /* arg9 */ \ "ld 3,72(11)\n\t" \ "std 3,112(1)\n\t" \ /* args1-8 */ \ "ld 3, 8(11)\n\t" /* arg1->r3 */ \ "ld 4, 16(11)\n\t" /* arg2->r4 */ \ "ld 5, 24(11)\n\t" /* arg3->r5 */ \ "ld 6, 32(11)\n\t" /* arg4->r6 */ \ "ld 7, 40(11)\n\t" /* arg5->r7 */ \ "ld 8, 48(11)\n\t" /* arg6->r8 */ \ "ld 9, 56(11)\n\t" /* arg7->r9 */ \ "ld 10, 64(11)\n\t" /* arg8->r10 */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)\n\t" /* restore tocptr */ \ "addi 1,1,128" /* restore frame */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_10W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9,arg10) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+10]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ _argvec[2+1] = (unsigned long)arg1; \ _argvec[2+2] = (unsigned long)arg2; \ _argvec[2+3] = (unsigned long)arg3; \ _argvec[2+4] = (unsigned long)arg4; \ _argvec[2+5] = (unsigned long)arg5; \ _argvec[2+6] = (unsigned long)arg6; \ _argvec[2+7] = (unsigned long)arg7; \ _argvec[2+8] = (unsigned long)arg8; \ _argvec[2+9] = (unsigned long)arg9; \ _argvec[2+10] = (unsigned long)arg10; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "addi 1,1,-128\n\t" /* expand stack frame */ \ /* arg10 */ \ "ld 3,80(11)\n\t" \ "std 3,120(1)\n\t" \ /* arg9 */ \ "ld 3,72(11)\n\t" \ "std 3,112(1)\n\t" \ /* args1-8 */ \ "ld 3, 8(11)\n\t" /* arg1->r3 */ \ "ld 4, 16(11)\n\t" /* arg2->r4 */ \ "ld 5, 24(11)\n\t" /* arg3->r5 */ \ "ld 6, 32(11)\n\t" /* arg4->r6 */ \ "ld 7, 40(11)\n\t" /* arg5->r7 */ \ "ld 8, 48(11)\n\t" /* arg6->r8 */ \ "ld 9, 56(11)\n\t" /* arg7->r9 */ \ "ld 10, 64(11)\n\t" /* arg8->r10 */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)\n\t" /* restore tocptr */ \ "addi 1,1,128" /* restore frame */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_11W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9,arg10,arg11) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+11]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ _argvec[2+1] = (unsigned long)arg1; \ _argvec[2+2] = (unsigned long)arg2; \ _argvec[2+3] = (unsigned long)arg3; \ _argvec[2+4] = (unsigned long)arg4; \ _argvec[2+5] = (unsigned long)arg5; \ _argvec[2+6] = (unsigned long)arg6; \ _argvec[2+7] = (unsigned long)arg7; \ _argvec[2+8] = (unsigned long)arg8; \ _argvec[2+9] = (unsigned long)arg9; \ _argvec[2+10] = (unsigned long)arg10; \ _argvec[2+11] = (unsigned long)arg11; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "addi 1,1,-144\n\t" /* expand stack frame */ \ /* arg11 */ \ "ld 3,88(11)\n\t" \ "std 3,128(1)\n\t" \ /* arg10 */ \ "ld 3,80(11)\n\t" \ "std 3,120(1)\n\t" \ /* arg9 */ \ "ld 3,72(11)\n\t" \ "std 3,112(1)\n\t" \ /* args1-8 */ \ "ld 3, 8(11)\n\t" /* arg1->r3 */ \ "ld 4, 16(11)\n\t" /* arg2->r4 */ \ "ld 5, 24(11)\n\t" /* arg3->r5 */ \ "ld 6, 32(11)\n\t" /* arg4->r6 */ \ "ld 7, 40(11)\n\t" /* arg5->r7 */ \ "ld 8, 48(11)\n\t" /* arg6->r8 */ \ "ld 9, 56(11)\n\t" /* arg7->r9 */ \ "ld 10, 64(11)\n\t" /* arg8->r10 */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)\n\t" /* restore tocptr */ \ "addi 1,1,144" /* restore frame */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #define CALL_FN_W_12W(lval, orig, arg1,arg2,arg3,arg4,arg5,arg6, \ arg7,arg8,arg9,arg10,arg11,arg12) \ do { \ volatile OrigFn _orig = (orig); \ volatile unsigned long _argvec[3+12]; \ volatile unsigned long _res; \ /* _argvec[0] holds current r2 across the call */ \ _argvec[1] = (unsigned long)_orig.r2; \ _argvec[2] = (unsigned long)_orig.nraddr; \ _argvec[2+1] = (unsigned long)arg1; \ _argvec[2+2] = (unsigned long)arg2; \ _argvec[2+3] = (unsigned long)arg3; \ _argvec[2+4] = (unsigned long)arg4; \ _argvec[2+5] = (unsigned long)arg5; \ _argvec[2+6] = (unsigned long)arg6; \ _argvec[2+7] = (unsigned long)arg7; \ _argvec[2+8] = (unsigned long)arg8; \ _argvec[2+9] = (unsigned long)arg9; \ _argvec[2+10] = (unsigned long)arg10; \ _argvec[2+11] = (unsigned long)arg11; \ _argvec[2+12] = (unsigned long)arg12; \ __asm__ volatile( \ "mr 11,%1\n\t" \ "std 2,-16(11)\n\t" /* save tocptr */ \ "ld 2,-8(11)\n\t" /* use nraddr's tocptr */ \ "addi 1,1,-144\n\t" /* expand stack frame */ \ /* arg12 */ \ "ld 3,96(11)\n\t" \ "std 3,136(1)\n\t" \ /* arg11 */ \ "ld 3,88(11)\n\t" \ "std 3,128(1)\n\t" \ /* arg10 */ \ "ld 3,80(11)\n\t" \ "std 3,120(1)\n\t" \ /* arg9 */ \ "ld 3,72(11)\n\t" \ "std 3,112(1)\n\t" \ /* args1-8 */ \ "ld 3, 8(11)\n\t" /* arg1->r3 */ \ "ld 4, 16(11)\n\t" /* arg2->r4 */ \ "ld 5, 24(11)\n\t" /* arg3->r5 */ \ "ld 6, 32(11)\n\t" /* arg4->r6 */ \ "ld 7, 40(11)\n\t" /* arg5->r7 */ \ "ld 8, 48(11)\n\t" /* arg6->r8 */ \ "ld 9, 56(11)\n\t" /* arg7->r9 */ \ "ld 10, 64(11)\n\t" /* arg8->r10 */ \ "ld 11, 0(11)\n\t" /* target->r11 */ \ VALGRIND_BRANCH_AND_LINK_TO_NOREDIR_R11 \ "mr 11,%1\n\t" \ "mr %0,3\n\t" \ "ld 2,-16(11)\n\t" /* restore tocptr */ \ "addi 1,1,144" /* restore frame */ \ : /*out*/ "=r" (_res) \ : /*in*/ "r" (&_argvec[2]) \ : /*trash*/ "cc", "memory", __CALLER_SAVED_REGS \ ); \ lval = (__typeof__(lval)) _res; \ } while (0) #endif /* ARCH_ppc64 */ /* ------------------------------------------------------------------ */ /* ARCHITECTURE INDEPENDENT MACROS for CLIENT REQUESTS. */ /* */ /* ------------------------------------------------------------------ */ /* Some request codes. There are many more of these, but most are not exposed to end-user view. These are the public ones, all of the form 0x1000 + small_number. Core ones are in the range 0x00000000--0x0000ffff. The non-public ones start at 0x2000. */ /* These macros are used by tools -- they must be public, but don't embed them into other programs. */ #define VG_USERREQ_TOOL_BASE(a,b) \ ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16)) #define VG_IS_TOOL_USERREQ(a, b, v) \ (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000)) /* !! ABIWARNING !! ABIWARNING !! ABIWARNING !! ABIWARNING !! This enum comprises an ABI exported by Valgrind to programs which use client requests. DO NOT CHANGE THE ORDER OF THESE ENTRIES, NOR DELETE ANY -- add new ones at the end. */ typedef enum { VG_USERREQ__RUNNING_ON_VALGRIND = 0x1001, VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002, /* These allow any function to be called from the simulated CPU but run on the real CPU. Nb: the first arg passed to the function is always the ThreadId of the running thread! So CLIENT_CALL0 actually requires a 1 arg function, etc. */ VG_USERREQ__CLIENT_CALL0 = 0x1101, VG_USERREQ__CLIENT_CALL1 = 0x1102, VG_USERREQ__CLIENT_CALL2 = 0x1103, VG_USERREQ__CLIENT_CALL3 = 0x1104, /* Can be useful in regression testing suites -- eg. can send Valgrind's output to /dev/null and still count errors. */ VG_USERREQ__COUNT_ERRORS = 0x1201, /* These are useful and can be interpreted by any tool that tracks malloc() et al, by using vg_replace_malloc.c. */ VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301, VG_USERREQ__FREELIKE_BLOCK = 0x1302, /* Memory pool support. */ VG_USERREQ__CREATE_MEMPOOL = 0x1303, VG_USERREQ__DESTROY_MEMPOOL = 0x1304, VG_USERREQ__MEMPOOL_ALLOC = 0x1305, VG_USERREQ__MEMPOOL_FREE = 0x1306, /* Allow printfs to valgrind log. */ VG_USERREQ__PRINTF = 0x1401, VG_USERREQ__PRINTF_BACKTRACE = 0x1402, /* Stack support. */ VG_USERREQ__STACK_REGISTER = 0x1501, VG_USERREQ__STACK_DEREGISTER = 0x1502, VG_USERREQ__STACK_CHANGE = 0x1503 } Vg_ClientRequest; #if !defined(__GNUC__) # define __extension__ /* */ #endif /* Returns the number of Valgrinds this code is running under. That is, 0 if running natively, 1 if running under Valgrind, 2 if running under Valgrind which is running under another Valgrind, etc. */ #define RUNNING_ON_VALGRIND __extension__ \ ({unsigned int _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0 /* if not */, \ VG_USERREQ__RUNNING_ON_VALGRIND, \ 0, 0, 0, 0, 0); \ _qzz_res; \ }) /* Discard translation of code in the range [_qzz_addr .. _qzz_addr + _qzz_len - 1]. Useful if you are debugging a JITter or some such, since it provides a way to make sure valgrind will retranslate the invalidated area. Returns no value. */ #define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr,_qzz_len) \ {unsigned int _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ VG_USERREQ__DISCARD_TRANSLATIONS, \ _qzz_addr, _qzz_len, 0, 0, 0); \ } /* These requests are for getting Valgrind itself to print something. Possibly with a backtrace. This is a really ugly hack. */ #if defined(NVALGRIND) # define VALGRIND_PRINTF(...) # define VALGRIND_PRINTF_BACKTRACE(...) #else /* NVALGRIND */ /* Modern GCC will optimize the static routine out if unused, and unused attribute will shut down warnings about it. */ static int VALGRIND_PRINTF(const char *format, ...) __attribute__((format(__printf__, 1, 2), __unused__)); static int VALGRIND_PRINTF(const char *format, ...) { unsigned long _qzz_res; va_list vargs; va_start(vargs, format); VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, VG_USERREQ__PRINTF, (unsigned long)format, (unsigned long)vargs, 0, 0, 0); va_end(vargs); return (int)_qzz_res; } static int VALGRIND_PRINTF_BACKTRACE(const char *format, ...) __attribute__((format(__printf__, 1, 2), __unused__)); static int VALGRIND_PRINTF_BACKTRACE(const char *format, ...) { unsigned long _qzz_res; va_list vargs; va_start(vargs, format); VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, VG_USERREQ__PRINTF_BACKTRACE, (unsigned long)format, (unsigned long)vargs, 0, 0, 0); va_end(vargs); return (int)_qzz_res; } #endif /* NVALGRIND */ /* These requests allow control to move from the simulated CPU to the real CPU, calling an arbitary function */ #define VALGRIND_NON_SIMD_CALL0(_qyy_fn) \ __extension__ \ ({unsigned long _qyy_res; \ VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */, \ VG_USERREQ__CLIENT_CALL0, \ _qyy_fn, \ 0, 0, 0, 0); \ _qyy_res; \ }) #define VALGRIND_NON_SIMD_CALL1(_qyy_fn, _qyy_arg1) \ __extension__ \ ({unsigned long _qyy_res; \ VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */, \ VG_USERREQ__CLIENT_CALL1, \ _qyy_fn, \ _qyy_arg1, 0, 0, 0); \ _qyy_res; \ }) #define VALGRIND_NON_SIMD_CALL2(_qyy_fn, _qyy_arg1, _qyy_arg2) \ __extension__ \ ({unsigned long _qyy_res; \ VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */, \ VG_USERREQ__CLIENT_CALL2, \ _qyy_fn, \ _qyy_arg1, _qyy_arg2, 0, 0); \ _qyy_res; \ }) #define VALGRIND_NON_SIMD_CALL3(_qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3) \ __extension__ \ ({unsigned long _qyy_res; \ VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */, \ VG_USERREQ__CLIENT_CALL3, \ _qyy_fn, \ _qyy_arg1, _qyy_arg2, \ _qyy_arg3, 0); \ _qyy_res; \ }) /* Counts the number of errors that have been recorded by a tool. Nb: the tool must record the errors with VG_(maybe_record_error)() or VG_(unique_error)() for them to be counted. */ #define VALGRIND_COUNT_ERRORS \ __extension__ \ ({unsigned int _qyy_res; \ VALGRIND_DO_CLIENT_REQUEST(_qyy_res, 0 /* default return */, \ VG_USERREQ__COUNT_ERRORS, \ 0, 0, 0, 0, 0); \ _qyy_res; \ }) /* Mark a block of memory as having been allocated by a malloc()-like function. `addr' is the start of the usable block (ie. after any redzone) `rzB' is redzone size if the allocator can apply redzones; use '0' if not. Adding redzones makes it more likely Valgrind will spot block overruns. `is_zeroed' indicates if the memory is zeroed, as it is for calloc(). Put it immediately after the point where a block is allocated. If you're allocating memory via superblocks, and then handing out small chunks of each superblock, if you don't have redzones on your small blocks, it's worth marking the superblock with VALGRIND_MAKE_MEM_NOACCESS when it's created, so that block overruns are detected. But if you can put redzones on, it's probably better to not do this, so that messages for small overruns are described in terms of the small block rather than the superblock (but if you have a big overrun that skips over a redzone, you could miss an error this way). See memcheck/tests/custom_alloc.c for an example. WARNING: if your allocator uses malloc() or 'new' to allocate superblocks, rather than mmap() or brk(), this will not work properly -- you'll likely get assertion failures during leak detection. This is because Valgrind doesn't like seeing overlapping heap blocks. Sorry. Nb: block must be freed via a free()-like function specified with VALGRIND_FREELIKE_BLOCK or mismatch errors will occur. */ #define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed) \ {unsigned int _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ VG_USERREQ__MALLOCLIKE_BLOCK, \ addr, sizeB, rzB, is_zeroed, 0); \ } /* Mark a block of memory as having been freed by a free()-like function. `rzB' is redzone size; it must match that given to VALGRIND_MALLOCLIKE_BLOCK. Memory not freed will be detected by the leak checker. Put it immediately after the point where the block is freed. */ #define VALGRIND_FREELIKE_BLOCK(addr, rzB) \ {unsigned int _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ VG_USERREQ__FREELIKE_BLOCK, \ addr, rzB, 0, 0, 0); \ } /* Create a memory pool. */ #define VALGRIND_CREATE_MEMPOOL(pool, rzB, is_zeroed) \ {unsigned int _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ VG_USERREQ__CREATE_MEMPOOL, \ pool, rzB, is_zeroed, 0, 0); \ } /* Destroy a memory pool. */ #define VALGRIND_DESTROY_MEMPOOL(pool) \ {unsigned int _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ VG_USERREQ__DESTROY_MEMPOOL, \ pool, 0, 0, 0, 0); \ } /* Associate a piece of memory with a memory pool. */ #define VALGRIND_MEMPOOL_ALLOC(pool, addr, size) \ {unsigned int _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ VG_USERREQ__MEMPOOL_ALLOC, \ pool, addr, size, 0, 0); \ } /* Disassociate a piece of memory from a memory pool. */ #define VALGRIND_MEMPOOL_FREE(pool, addr) \ {unsigned int _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ VG_USERREQ__MEMPOOL_FREE, \ pool, addr, 0, 0, 0); \ } /* Mark a piece of memory as being a stack. Returns a stack id. */ #define VALGRIND_STACK_REGISTER(start, end) \ ({unsigned int _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ VG_USERREQ__STACK_REGISTER, \ start, end, 0, 0, 0); \ _qzz_res; \ }) /* Unmark the piece of memory associated with a stack id as being a stack. */ #define VALGRIND_STACK_DEREGISTER(id) \ {unsigned int _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ VG_USERREQ__STACK_DEREGISTER, \ id, 0, 0, 0, 0); \ } /* Change the start and end address of the stack id. */ #define VALGRIND_STACK_CHANGE(id, start, end) \ {unsigned int _qzz_res; \ VALGRIND_DO_CLIENT_REQUEST(_qzz_res, 0, \ VG_USERREQ__STACK_CHANGE, \ id, start, end, 0, 0); \ } #undef ARCH_x86 #undef ARCH_amd64 #undef ARCH_ppc32 #undef ARCH_ppc64 #endif /* __VALGRIND_H */ passenger-4.0.37/test/stub/.DS_Store000644 000765 000024 00000014004 12233035540 017632 0ustar00honglistaff000000 000000 Bud1%  @€ @€ @€ @ E%DSDB`€ @€ @€ @passenger-4.0.37/test/stub/apache2/000755 000765 000024 00000000000 12233035540 017453 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/garbage1.dat000644 000765 000024 00000010000 12233035540 020302 0ustar00honglistaff000000 000000 …}ˆ—©ŁXhK,âN.vùOŃȚà‡+\UęĄûvŸ-ПQI“3g Ë{š¶büI1™ż \ŠłÍł B/a]&[‰JęÓórčPáH]eŒ€(ț[iÉOl<»bŰÓ75|ÂJ%ŠŻź›żÇt[gœn+r œ 7\ ÛíUŠl[=9G]ÖăŸČt^«·Ńæș; gÔé x"‚ŃÏ9ü2ԇ˜Cƒ°Nâ!©ń5+ąÚd2 ݱțő ¶ć§țâĂÊśŁ˜ÎĘčSlżXč !†c˜Ævp~ĐìĄêĐQÚkÚd·]"$ECôÇnc—ÖÉv,pÙO•óĄGŸŒíÿ­ő}«‚ 8ZC©"$éÒđïÜőÉÍȚeőç[Ü]«=Łś)%­_đÈțșL]V†żQç”é(ó8ÎăŹĂSáæȘꎉę±éćÏDț/GftgÚÌÊôiSžÔmŃŐxž0ïéœuX”Qt>uâ8§ŠÉĄÉȚőRè™NăQțCB1Úżqîš6{3UŸ§è8€-œr4r@ȔÙˆéêG6YkÍ(w!űNÇO|gšETčF+ò©ô#Ă+¶jKƒ\Î%ق8Čžo+”čôjàÎûëPvv1tIĄ kÿY5˜šš§ê2ò>ïĆHÙÿZçdÁIțehÂéŃæ" uFç5f ûݟŸ;Ö°n(AęŒm}bșE‰"Ò]ĘvmI01c‚/™űțq’ìfm€­45!GEą žȚu%*€OWæÛ”Ź»IkąáŠl櫟Ț+wێÙÖWčîÊműjő‘P4ăúdȚïNéyő` Ű› țwPùȕ›ÁÀiŠˆ~Œ $X[‹ȘÒM»žy‰eŐ]Ó>bšbđÖă@ÎkËüóă^–Aç€çxnìŰm‚eêŸì(”~‹šźgŚćJ ’SĄš‹âšËŃ|ű|O î“û‰í‘łÎ,bđ ˜‘‹#Y­ąÄ{9ƒ24…€RFÍOśAËŃÿ€óÁZʄćŸčéí4Żń‡ô2ÊôhŽĐ6í”OÄ_:«†mčq©É-P%úT*ÈJ—GOńé­°ż“ç úoÓæŽFŽ@§fÇă~ƅÙ$^l™eÎèšZ‘ʐsÉÿâl˜5êR–0„°™§F'ńŰ)§ŐuÍÄ6+€™Ű±l.~ï) =oˆ¶”tkŒŚ6‹JBŁ iŻś1uŽfoÙafGčț•c„čsîúđDȘ,ą‘Ÿ.Žć%‡Hêä§pu(Ÿc¶Ő’:TŠj»–Ù葻$>?—KT§L »•OúÉĘY!&3\ƒ\DźG]ž?ĂŁs^B{à?`Äë›?ŁüBjX©ì»ŻŐ;’»?>ŐIšșzȋ?·Ž^đM„AąvPS«©őàHÜńv*cóÁZò(­>ëYÊ­·}$­(ĄfÿŒ~ș*àű“öŠò›o9Èr8Čò–Bű§IÁŸluŽTŒ‘ż GŠőWËi’E ɧëǕŚJ'„śh™Lkét4€z ÂY|űlxPû°íșXêÂæ!ƒìźD€üÙRz%[[«zFùßț„"{Y“’ÚÚ $ŽÄÉ;h!ÒŽ2"ő•} ŽOC>)ę[š”€2ŚöżÔŐ°ÙŒ%æžÔ‹‰2öRôó-:Śą¶ÌŐùÁ ŽĆŁ“ńě "”ć\܊m|æd?Áö/DJą „$5Æ\ûŁ»]]ŠeQ šXpôŒWúĐ„Nâm„enÖźJc7a Ź­.p„\oeŸAä”ĘšiÒíÍûc?;G1„ôRäzGÄșÀqٝb,ÎKÛHU±đ@\Ș^2lH\ txkÿÊ©vșJŒĘùZ‚ÀĐMÒa_‹çR7R‰țmŹVŒ$ì>!YY€^’üŰbż.j-Í=+â…ț«9ëGéVÎôœÁ0Û«Eß8JsȘQ€Že”ú#«ȘšB' zg°p"_Ć+ïÈęűˆÊ‘['„G‰Ž`xĆĂ{śàê.:àW =ă1Q”5$ąôč ‡”'ŁöL<&©VAšÒ\ŃîXôïpső ÿłűłÛ-ûÆû%Ìă[Ò¶Uî$ÁY“âŸul á‚Xșƒ‚śe0$ŸòùšÚÓTüŃyŃÌIœ?”\<â͆À-Œ—><ÏoIç"ìâećd©mêôֱۏ=.ŃGÌF5,ÎM»Șj{͛}f·1)LÎŰAkWU‘0Äó`0Bn-Ê?0lN*D,yùÁùob7`P§ë°ÿU ˜NhŠeżŃ—xí"ꞝâQ‹Ž mUÂ.bŁ'^—|@:0O§ći}țȚár&{YèTúšeČF9*üGov.©ÒËą/±êÉi8y^ÒĐ!ˆ:N”ŽYășOçÆW]˜ÒDq·É`™lôń œ3ænŒ»5L*­­_`đlŽ?N:ČFśÌË{ŒA˜k —fžaǎ$ó‘Św§țžĐDÈx|ĐèÊś&őùì$u€‰NʐzĄÁ­zČJÒ§”EŒG‹Űݛ߀RŻÜ#bËçQ~KŸHwgcđ5—ł©š›—žąÔûâBŻ;š‰żz{FŽŹ›âbé-·Ê§"țˆ»Șœșœò*^"±ș6*ŽŰJ*îWöX)[X dŹȚ†}6ŸÓ‘j‘!~ŐÀ4qhŒ ą‚ŹÁƙmŽșm/6°‰Ł$!û2›’Óž%È_œƒ`!ĂûÏ/ÄÄŐçŒ@ÍLȘd€­‹m|Ő0&5QúĄ~kΧíÉŸ m©LÄśÄț”P0!!}ț§}­Č4NbüâȘs *Œ•æi#òuÏžàę†ò čmAŒƒČsŰ<ˆ-űŒŐ§uć·ÔvèSkȘs̀•—{1ï. c¶ô Í«—\łS…Ă(Ą7©Ăf˜â€.N:—Ç}wș@ÿê=úóŸ5BÍűQòH§íÛ'x–W”€b©°azŒâ úݰj${2ȚžpŽÀìÍWæC Ăï’j„4êu…Ë%+Sˆ2tv« SĆĘ7$ƒ0 Q=Ę«0H© ”Ț„]^ż#\€ˆsí•”_éG%“,Ó ŸĐ"U“K1ô@yŹž„—śZó“ÿíÒ$ bۓĘ-ÛìÒšú…)pgqÚ!ĄŃȚą‚4_ś LNó˜ßŽZ&#Ògć9NQŐ2™°HSą4¶’Ț;Xüàœ§|-N5ÛY­“šŽxâákDt“as R€űXL2·!ÁÂŽGCŚóŻćgžÚD!ŽIŒ?Ò*F|ŒÂÈԚ1Ž˜Ž\ąPú”ˏE‡ŒX©GUƝ?RÈÄæ°Ł ­Ő@źE€çŽ1ŻŚ‡ x ò±/ ïs6O+’˜lÀЏyCnțșűÒBSCo°áûZDšLŒćŸćçháÿê æÌĄłÊÖ‚df!ƒČt ĆŒŻwF.Ÿc ˜!mĄjmčV Iu'Œąźű’Úv$ÛČÔŚżwëžä’‘ńr”sŸép}cHì)'}Žê|ÿćčqÎûVË ”WułLÁ~ÍĄm zhćÔž·šW œÙń4Ë簆àÿŁY †ò*0aÒöŃŸ„Òèrç5Š<.Ő0Î]śä¶üȒ.v»gőjçYO}C䘅n’j•”Ă]ÀÚe‘˜š$tĂÜQ€-ŠÿÙȘ-fB݌Ą?~ööș±Ń}ő…ę©-őŚńZȘŒF䟭Cbțû° nŽ8Ă4éŠ@‘T¶ (ú‚Ż©|C ކqÏl 2Aæl»6-ìŒy?żÇâőÎnSĂ/ę_D9ź”:éˆW܃‘VzÂȓ]âŠg„ƒOI4ôëòb|~KgłkôFYà|D4˜ ì"Îžßæ"{}r±(~}/;hgż[MO<œQSŚ Qšæ±ÍÚíČÇ=ÓdŸê}v2 ź y5kù™dàD-Ÿ&:&œZ$W°EeÈékè $Of,Í^bG  yŸFI ÈI»ÊűÜŁFçs|3-Xûÿ »Ÿ @¶&0Ü+T#šÓ ™pÎŁ2eUr{$ #IžČhŹRŐćűolgeę?4țŃì_œ‘"ïla‡LŁ?M5ÿ˜Oț4»‡ nv/ą „)KńOĐ?„›„YAô…űW 2žÀY>È”Ô-Ž4Z_$ü’Yz5œâŃ·'` oDuû”πGő>☊¶Ó€ȚÆ>źAB „‘O[>ĆkzZiç[ùŒ(‘g0oLŒŹĘțMśÓŸ“JÀOžcVvqœÈ%Ł ÈˆđŒâsŒ‚Yœe Ń"AoŐő_€e”âö‚GS€œ“"śP8”x°HÁ`FŒ%=S Œ€èrž‘QŸ~čaIcÉ8ÀáȘÊ 2!Hì‘e^Gj2ÜW]gNEÿ:“ćü”W˜f7­Ș9húYŠA­u/É ú8–û˜ëZŒș>aę–ț6#hĂÏc…QÚÆÆ„}Ù©Ê3ùDbD‹`ń”èÆ6ü[…ú\‰&.9Ö ‡bűÚQ óБxŚę˜G8yțƗƒƒ‰ËJ2Rčæű`„ Ò†…ÙôZœÿ‹űlșp71Xy†&Ȱ1Æ ÈŸÔŽE*LÈÍÄ^ä.!ÏÂÉN—lêIO\ڞVZÚC?ï1/û…„ÙUßM9Œ°òρä>hëœFxˆ ’|äh4đ€lUGúâ±k©œĘă°?w–*t|”·!>–vÒtőÇú§XHŽI*•©ń#Í«P‰„^ig„8"łF$‰†Hö–•tE*3śÏ±Ûőtű[舳ÄÜ5Ź\t+ÿßè{S)ž.±o6ïbȘïȚö™Ôzín­ˆ>_L”LKh!»p|Ê šę Sٌù5Ëuń~<88†@ÍSŠE2„(êÈ.fˆDf±†śì„ń}_(Ž…źŰŹ 8 ékÚüńęd„ĄÉ6s~bțiëQ êż@I ŰHő6ÌŰÛxü3çM6§1i‚W¶Kæí*ye2.šŸ(—àá–ŐGmŽV¶ĘŻFŹàč°–ĄAYcŽæÊ*Ô¶/”§Ú°k…% §ڝxČڃ”ÍïĆ$䉶»è«MAKJÄŹçgoGĄą,›Șòć”/S—ÿ+—J}F Œ5#Źânä+¶ÓyAŸ†șpß­í&Çđ0 Ă"R… đi5K(Ç2­”MTKŸBÒĐßqèfZ|ŐUśuxbGŠ]uÛÛ(:Žœpassenger-4.0.37/test/stub/garbage2.dat000644 000765 000024 00000100000 12233035540 020303 0ustar00honglistaff000000 000000 ÆÌ\•%MöŸl@ !ąZâˆÔđ)",đțtšÍsÈk€ő°ÒvčúL&œˆ6Én LĐ E ]_.9;e‡îü?>ŸŹĘYLI,mŒŐńI%·»C/D?yÈÂÛÆÛ[GYs¶ŠŐę:ą—UZyÛëF&IÌpt ‡mäŻÈž—­ŸŐGY|žĄŒaHí'‰Țʶž ɛc$]^sŽƒi0†wK„lùtüÚdOđâż êś àObIèŸäJ§ÔUÊáżùßXÒFƒr1<ŹăŸșŹ8ô Ç«$@1-ùwë ]^ç{mŒ€––GArt)€q*Ÿâ"BC/eśXvìV‡”Œ,œj«^ùZ”±äL“ϞÿèËíË}ƒOçœ!|YŒ@čòĄÚT·ŻdŰ"ÉDêB—°xÎT ?hö•ù 0œ Ôśw@ÖȉnjôŁ&LYMrŹJf]ŠĐîâ7|ì; kMlűL·—rj0łæőĆthÔ»Űrç>$ĄNÆòœș*«—§2€ShHöéÜ­CQű\hÓ攜nő!Ušúőœ‹”­Ç äD6żò>H#akšgCLÓn›óR•V ÖŸrHŸX`UL†RÔ#tŰŁŠŒîÍăÌVÁçÚL—'bæ9NÀööț^MÎčc–ìLZš2—}ug^úĄi’őĘ>ƒ6ŸfYk…—é[Úà•‚M›¶À?—o„ű~ÛćR%Ądšq=/Nï ó…tQšȐ|ŻÂ™Öi‚JÔńÍ Ÿ™ùűög…œeóŰÔ*±+·9ełÖ4«[àÍû‰Ú Ö `Üc• .Łè§Fë`Č7 NëÛŸżR˜âŽK·_ŒĄá m–äČPÔ7^5k»MzÈÁç?BFg[>Aű‡°â̈́vˆ ‘‡Ë‡ö‘ű2ûŸ?ź‹CéÊ7„Ąê 5'œ5ĂȚđ&˜ÜŸś’ßóúœ ?ș\Łwí­A)î:bS0č&AHű"Ą„}ńÌ,ÌÊ:Ií _ËAț|OŽàÜčߓőìÓY±+q&BYŻ>Ò{Ó!”‚‰Î\áè2[‰@fj§•QfOç?íЉ–Śi¶@ *ĐČŒû”ńˆò;șŽa ‹۱@GÚ)î”ùÂŚÄ ę )ÇąÄćäX?fPܔ7‚%Ÿ•P[€B:i4=ÎY·oÓ= 0 ‰ÛTśOæç+`_!—m cBgZĐu:qlžł_€àŁV’AzÀ&j­{Ù pM*kzc©FOùń)±łÌ^”–I‰ÊFÌ\CŽ?)cDŻ ûĐ<"ńč0ˆ%Îq„C2ûÒ‘­d‚S<“!9?+Èk;Çúa?$őčŸàÚő•â†ÓÙ! >o\nčjКŠ‡€€f™É éłżő蕖bę`,BìÉŚ[NșÙÙÖ8VB§òênmPp]Í.Ž6jŰś‘§žj(`l\R>ÔëûèšłiÓ>ÿSÒŁžčqŒí€Ü-^úhPĄd Æîœ.eŐS„GàR3lpa„Ö˃Ó;,FŸŰbŐ;Ük_Î|êĘÇPÉ[š·"”xÙ#8údd N,ŃIنÁç™iÂ@Žà…r胂X1Łś"§-z2_OïSPźÊÉȘ矞##NĐAÿ0%É”ä!€Äśűț€±1ü„냆’Üù™9[ÿŚj€F‡±Û?ȚżoúHó ć[­ĂšûŸË_uaX©ÂwRĐężKúX_I€Qooue!·@dl=ËŰéOàòW˅é1nkŹz›%7‡Î#éÛATJóĐ Qóù%]ІO—ï©#ä”űzkțŽöđ)MĐjó•ÏÏ#ž„pêŰ}!H†Tà2„gìh4Á™‰æB–ä »ï6Â"<ț©8͟KÁ?ŒŽűÀ_ĘŁǑ}7óŹÙ?Ś =î^òŁž đݰăbčçËțśz€FînŚÖX ""*eÌ\Ț>lQÓ G1?Œn—óÿÛÙrčțìÛTš.9ÒA‡PšÌŒÊîl°pć€-š‹ź"#ä©Ö\W~ ÈŰilôÂJÌa4š|ÆnIł*Hnžh,wśźŃŸ}7äL€FT©Źæ5û{œüa îƒe€á)’’šÏk€"òî`;8j‰G{ÂX•Ç^Ă«Ÿs‰O·Ë`žFScDŸ1ádò ڂW„â,*‘œż$”K’YV ‚”29±}4.Žë"ïàֆ”ŒéAXŽzđĐ#QŻüĐZˆ!èŹJqO2p úĂăeűI;ß[R]d$č—NŒläŠ#č? eżÁÒŸzp ¶žÆĄ ŒRÌí$ 4șÄP €am,öŚźà°STDuęàǟđ»ÒÁXÀG/€j.y€ê{SWałižz_Aéw@Vź |% #ŽÀž”j3łNA}żuâìLOЋœòBJi:ß.;^§c âšnŸ7Ëb ïsőŃÈû…ôb”D(șÎéeM?Oąè{ ŒŐ·FgȚHħ-NòŸăjÉÔŠœČIeÖŠűŒn#§?MŸÓ¶x*VìžwijÿcA€2żp‰ínèxg€PlÉUžBq^ˆđŽÉ Çxńà̚ljG|ŠrMF("ü”0 Á?Űűr”7ÏBĄbæó˜C!Ő +°—ŁûQš~ÔQk"9žWKaܜÄĂ è™lcWł6ł‰%ž9ššóÙÚC¶èÎ|gŸ{Æ·ÔÁđÌO)ò3êŚ(ćJèPsá‘ëZöČï<ljŸ '…ĆR{łp™Ą .g“iYœë2Ž NZu‡ßæ =€Á©ęӞ 3,π†lÔ'íœù‡Ìź˜Á‚#}ì7[GĆtŠÌ‚â6ê•mš€1xuúĘâńđtçl6“țšƒŃ|FœțđQőöár1öő+äGEĆ)Œ·ąˆîбM13™ÜĄŠęï­Mÿ2 !öœ<­žƒç`k|m^ E=^MŽ2đT"g>RĆöȚĐë"u!2<î1©Ś"ŹžáĐAœ0!EÜžôŽŹ(ùȚŁűLȘ=Ö yȘŠ~âò<œôjè ^űúöY„\/‰PZûûS‹îï0E?ŃeÊń\Q’wН4Ż Æ]©', ČŽá 4óq«Öςô&ȘoŒȘMuźącÉ6h#‘¶…i]ÈV@éuDwž;ó™‹W’”ű.mІûß&ÇsG»);S;Ł5kƒŰâY·RæN<‡ùșW°(ó„HPäw!`“—0Q ȚiUïSflÎÁtù2Șê`r ç%}Ÿ_xńoÿ-XS§vĂìgĆ );ć5ăúQWźăÄC‘.~5Ä[Ždž„ fxù¶>ó0Ô/Ç3ő#j ,ۏt ™4,±ö\71ïkqҞ‰ÈÈŒîFá: È„„ŽÉ‰đᾑÂúaąßw;Ź %C†B‚ŚLć€Ü‰¶ÿș@•ç‡ÆÌc}Ç<‰ÇN©M=P‹.‚ȚÜœÓÀ„CÆ(~9ęŁVŽ&n9œăȚ›}žê“ăr·k’RŒ­àڋ/û© Ù'l–âó2r^›ŒŸQ›ÓŻy5àŠšĆĐêbđ Đ3-I=¶â1°àzmŐ Šj:ż"Ą=ʔ–@^Łìj@eÍ|ĄÚ5ßűĄj»?èà_ž sÌ{Îđqä?«kŽL”\ĐÀb…Vźš.JÿdŃXOXŽò Άś^ÎvKjšmôœVcê@ČŚ6žç€žșÈ3Œ,&ÿŠ·š*ĂńՊCí‘;.sŽűôśü҃–ÓÎjśĂèi“ßš}/eErÎ8ëÖÊ_s‘meáŸĐßț+©ƒUőĆąN»Òm-èŹâđH2X&e2űȚq\đŃ>îö󰝀ô‡€ą)ŚJXK6^z—hyśôYêEÉĄú-„»­KÒŁÈOț~"ßč[ÛîŚĘZł_}ŚćÇ0ššlCaŃméă-©šÓű”ü8öm]Ę>?<ÜP”șDòĐéG œ>ȘűgJp„•jÙîpû&"™ŻtjÎĐü^y·ÚűŻő^p:æĘϧbÃđ…ÿOtíj +Ë*j·ăŒșGihBû"tĂL› J’öę{füTšÖ±œMd–jHÜçO~ÉùÓUÒs/Œë;)9‹IyÍ2MŒTx† Á d”ŒąŐ ·íÆĂÀ/2ua#°ööŰnh—ŁÛÌĂźęą%Ÿ>Ë5żh€ž5lɏŠRaŸ^żńȆ·—E”1„fDï”ĂĐI&ÔőÍPۙ­b­œaîn†/ʟÊ$„y§„ț§êm[9DŁêÒ;Ąž*[CË/Žr5}ŚSś;%nT3‹d3)Ł €\C••X^˜lJxÇz—•c?ùÀ)w€\ĘžTM—Æ›ûTÏrŠéæCnDȘÆBhò! ÆĘŒÈ‰th7sm1șÇ|đ5‰aËŠŠ0^òƒßҙŚ@°x¶k'F9äŽ&Š_ž3ÌúKAÔ”e+Š}tżL+&„€iÌÁ?lĄŃ{‚ÂÄîҍC"Xû=Â3=. e8ŠŠ „'{—‡€€û,§č€Śmèd©ńÂÉáÔGĄÌÙ”Àvï2ę1Ï5Ä3 k Q›€>v&ێÎÆÖŠ”zxƒĂy ș3†š$ÍlëŁéghÙ뚅â”ëőŁŒÉéÛv éïWuBPȘ)áß-.Œ^@dˆæÜí’Ÿ9ôjdd™Ü·ÍÂ„ęh±$ë ;ááś”hlU$)"ą—pÿ(Î#·Ž€ąç1çȚ3ŹSQUˆg "źŚQWžLí34ˆÜ~‰.ꆾ·ÀY,vWĐthûY™R§Y1 êš. ˜2h‚’é ©ț/„–ă=HžŃxȚxĂ"bÇ»>PrĄÊc úPűÍ'‡ 7™AU‹yùśTT:űcÆJíŰl=Lù1Ä3ei† @[Î.8CJàcóúv20ĂÚ(óžVÚ±BÂ]w„Á$},ùûŠâ+íŒt"ê&ƒŽ€Í„tLÛ·Œy|ÀŽ ă đ*0Á ZoȘú†ÖîÊ^ŒŽçú;”6„çÓTԐ+<¶(GUɇȘ•|i$„(ۋ`ö)ÀTcó”ËáĂž§ŠïÉÏŹȚD%ëDÄ °o©ÎÌhÆf)«șyÓŰ$”d8œÿŠ/-ŹÁ !7j>8TÊNŸÄ 7 Ê”ț6€@I[Ršč°q„ăA«š(˟A:7íűŃæ™Ë ]{v—ê^”l2Ÿ2˜źxÛŽgF)ü;hęęU@>‚±‰UƒÊîÄ>fźă mìĘXșHZíš+ûłFû%ÓÈóÛÇ,1ž9”•ôßÍß»2(?ćöńadb%N+Æ=€-ß(wò&>Uč-űhsű([âűæÌÜæ5%čPzŸńIÖ±=Œn:ЈîśŚ:zšk]ÊgËgæ ì&îőȘƈ·L4ž\F+…]jgš+wę·Šs ^żp‡ëÿJ°k€ŚŠčS'P6X§Et&*żŐ“'Ćh9‹I»€ç'Â2Bo^?$‰ńÉŸÿäV*…”SȘŒ2DàÇĂ>ùđ (SŸÄÜę9çIœùZŒŽ‘îöž;ûRԂÌʓì+=qđő0êpÔńhó”#–ÇO«* p—Ä^AhfžR.•“€’0bŁ•+D“žô »űŰŒ‹VŃăï«ÿԎ€-WăA$Ïʉż‚üË/6éÏSŁÛš†%aCÍs°]0I†Ææ<á ‡%S–ČŠČ_c·a%Ö,àFŠu•VÈ©áŒÜ—ÐoÛS֘QœČâ+”*BˆĄ 2žešĆM܎ÒvŁ.”…íÏčïÉŽ~yŠH G%•€PÓʁpï§ÓMqŠË˜ć Š\#i竈ŠŽŰU™Fț·ę›à;ŒôùwÇuhK0í— Œ/™ š Żâ4M m(ăÆzü'ĆÜ[š@óß\úÆsÍÏCs‘Ë„ÒÄLŃ_û3,b`"ñž„ĘWz‰ńŸŽچò«ÄJùéd/œow,ü]:$©űSĆDِaxĄîcÚaq%z•žS«ô%~VOmű»=pćńČïÚ­I„€ŚCW·O’ŸüPê*›^ômŻĐG¶@Co=)ä*aÙ^UeѶ~f|ČópŸ’$Î _k±ęĄE*ËŹ{=©çv*BH›Æœ8ŸŽLP’e‚ȘÒl5]íi€‚4Š"ć—$Ë”[㌠X*~–a™$H]ƒH}5ű8gcÛ~òVße3îG—Æéö"@̟r<ECÇ5@ș„ŚÉăyŠmučÂÚÖgb ŒŐ]-ejBœćQʜ­öm!KœżÈĄ{ŻŠŽț/9vÌîFàÒsa~…șx#%Š{ÿà:èš°T i‡ g$©œá"‰òz‚í’1‰MêŸ;~'ž˜äEŽ7€Ò>úšmï27ì]őš&ÆŰ=#p`>ê\ŁĆžĐ-~Ï»K0Q”ÄùččïăŽW„bTńˆÀ cRúڐÀ%ȘÉ|dê€`^^W—é ù`ruC*ăZ?ńuy–óăűó]SŠ{ †źû8òÓ9aّʁăÄ#Ęą»6hTsțEƎcN!™ŸF$ ڇrI%LŁŃ>ŰòֈÉ™_BĂĘ­yËÍK1›pšÂđo}“ƒvĄ,š”¶È­g§K•qÓóçNjęńiÏ0aâ—"{ éȚŸ1äaWmV)}ÿeÊÀRæí,3‹ šĆ6QxDŸ@E¶’'ĂìŰ  •eSX2wˆ{MæR-‹æT^ŽXUYŃÜ|a{’Vq3 •Œ·_ö8r Nźÿ ó_üI,ć\ù‡'x`1Łôh‡Ł~„î%Û6žÎqSVÜ:9oïmâáŽe! RCâEȘĄkVöśmmœP őP©lș9wlÀ@%ƒőŚ5ŃĆ) ȚŰcw‡S©Č‘ypύ’XŠjÂ°hË:,ÙŰ€Z†OȚ”R‘N/Á.4ŽÇVŸ%ZúxÏË™;ă”Ù'XÇbłüvBË·żJ„îhš­wêRužÊڶ3­űnę …$—`9šbŠ!§°<…„‹&ˆŒ‘ÛŠt‘Čr Ö3ÜÀ~}{č;ƒbq~-!H’eĆÚߐr`1°·UÂ0,úŒš,úóŠlé©ńÊžăÜ3ßú>’«b±•WȱæAm`y7îzcî­”»ű(ŻMMb€.EìI˜Äb-@ ÍQ+8‰<¶'PŰœÄU;f ïŒ6iźÛ€`™t±Ăö‹M€~łbtnȘۚ‡miÚÓțwź§ž„ζŐșۉqńóІÖȚ„OgŠfyÁ,ŻÂ/p)Żđ€đé-|ÁÈż1éÆÏ„gÙ5Q(ł‹’7łžš#ü<ą-'5ÂÙvÏ 7ï Ç 1Ț©ț~üGĉ“BŽZ›líčêąŻŠƒzì"­,öî6F‘XźË D˜ôù$śŐälDęÀ}æâ3_ôÒś>§=đ;ŽéÊI‘üŸ•Æ)™Ž6ÖE˜ĄyêȚłső!Ÿ{“úĐë˜pőÁ˜eŒ¶ùŰC{eÓóÚ&șXŰòuîȚ:Æ“iësÊÒàŸ CÙŠ›•šÄ+ì# rè"M|KŐËȚ€ÜâaÜș}*&U7…I·ł]d[%ú  $ HüȘłôb™đžFĂSŚŁÿ»-Œ Ú:î$čzW œ=KÎA9ŐSö4N0·­e€ĘŐ œ¶ò|ő-*č ©e„ kÓKV«|,ńŽRg6í_ËĂàfŠéÊô‹ 4ïxvsÁ=%uDY/SL@žÌ@ïË%…eIf«@ÜVÊqÓ{Yäw-ZYĂ5 Ÿ6;đž!~Ùaű^ÊmkÛ3ƒáFR}q2'DqČÏ2 ĘF§~@*6]0z\ĘKә‹äžŒÏR?Ą]čyœțFÍÏ)Țgź^ÿž x6ÿášÒçò‰°2ž–êŰ@Ąkԅ­Ú„"ÖjXæPv?ŒąÎrBŸ§ßm@Ă RbÏżźJ_mśG &ó”Fá ‘ ch°Wr™ă„N`\ááqÁlE r€)l‚$“t,–#q˜€Ś^‡u\Ÿ Ž—æaÍKæ­^ë"đ]RKĐL±†·ÄȘŐRyÖá rD k«`}ȚWœ Ój[Uî"`Ín™ÛìÿÆő¶ęžŻÙĘ€ÜWdw ÊĄźSú%ĆW*ߛLIżks^‡ä§mÀŚđĐ)‘PŠ6ßúƒ‡uâ ÉÌ1ò0ŁÜqĄhełÈŸšbĘß©ghB”ôÈæćßíIœV•cáž±W -€<-xéí›t-€ÍEaڔĘ1`ïžßĄ9C{šß‘ŃŰ·™ȚĄx^Ș*Œ n•9¶›lûăuĐ( ‰žé“ đ/öˆRčŠćŽšFæzmÄŻ‚­ùśŸïęnŽa”TÒU:Ù}+mÖŃ"›Eò8э]ÚR ’Æ:€$ÊÎ}…À`—~jbÂ{”Ò+z#]oDîâ3ŸÜp ÒN™ȚNlűáug±™§hRÚÎO–ŚÖ˜ž˜-3è­ÏȂŒ˜čo(Oçțđmł~Ê<ςé€ćđW=YĂ`m<Àî4̜Ț< LŚ«yëćhűśYQcl—g{ĐÊ9Ś}ŠŚ*—A]ó2– őÈÎŐíühŠŐS*˜űbšÙ,Ï^æ!8ŰȧCûœ_·ÌŠÖŰ҅,҃R;€ÈíÚŚ™Ś Ÿg!êœỨ›ŒŸ5šs1ßWióì™[€©ísŸŽ;€ò±ÁĂ[ŸŒ@c„ДUÒ wî44«úką)SÂHȗ%lV!šÌ±”\ő:7 ă°îăƒfŐ=Îęá{§ÂäÍÁEÀsî·č’3 …ś-kÇäÚ5ްŃP5 “(ӏLkïź|Ô(”ŒÊÊ&ö`ÈN™đêi)†Ê^fXŚWjWzÈl+ÿ|.àe"ŻG".ÒtçæÀFțŠLôú˜ €őËû"š:ïtä(öȘçĐJ]ƒ:ő–j†ž[âÊĘ=ŃșÙQY{jÏȚ€lOxŠóŚú*Ł„f#™ĄÂ–ÊPK:Ć~Lq8wé¶C`–À™ÉXB‘Dä“*±Un%jêŽù^\ìwèhâ' ŻŰäæőWòêXž4a†gæˆUzÚ'KžÁű&·ge„Ï<ûžê›kÈŐà ŰŁĐfí6ÓjK=úç—8ŠčäĆüZŸz”Äk\*‘†¶]}ĆÒ”„ső~ç<ôĘč ŐyIr‘4L¶Is/ÿÁeéUŁ<«~ ș†ĆƧèRđ9á ú™.t•ÁÏ©&ż‚tó+J[HY々·Š©ÿ2ĆhȘŃá ś ^lž{s_…sMLfUWäUÂÛ2Xm)7Ò5Ą,•ïúçăšÉç$F b";xˆÁșB RŚ`JÏDĄőΚ ćf”`·Ú:êž>\üÿéűš¶ȘȚfF]ÇDĐSAśuŠ}Yç-hł}Æ­8lÎîîR»_UèòÓî?yLÌ]ü쁉Žçê.3í œfBBZNđS=3-·g”äIÿy‹ϕš:Òö!Ú]îăx"äŁ3èhóak »>•KȘ8»[üńÂ6wPúæé±U(…ôŸ[Ahy"ˆ3VȘŠ‚ČWIś”+j­SêïègyÍsDá„Z'nÔ#Z\ÈiŽûû  –Š}ru#ï7…§ăS­ˆ€ff9€łôaœŒMÈ$”Ś»Æ'XĄžVŸpEJ#™rʰ|%Æ67‹Nđì5°0U씌ôŠ62œTډ;i»TŚææŠ—p):OŠŐšé €7°”ڧDÆÆ". ËQ­v›Ù1Ăźm5ù\Zx(`ÜèꕭĆm›tźŒ7›Eh<a4ȚN%Z+KvŐ0úłĆ!Ó|äxĐÇ<Üà#Ú:Ńżś{}'N±dˆK Cž1^țąûiŒÜ<|­2'`-Ć֟ŽGĘ(ő»3ĂâHő› Ÿ^ŽèCkkBlp]rąĄPÄ$ähń«kdBߐŠë8^ț,TH¶Ș[XùÛA/Y˜‚ ‰¶1:őÔÁétb¶žII"ŽïЏ•™14fÌ=.đ0o,…ÂmÏ =·żv$Ź*bB'űQŁ­/^‡”YP> à·œČˆ@k[&ٚ™ČÖŻŽN/ț,ąz5žv]qŃÔÖÏf†]Ż™úÏ©?çwXÛû7K°tƒ*yS Ol[hNڇó”:ÇÜű…h“ú5Áț ‰7 Ÿ“Ș‘Ö1ăoeGĂz  ‚7óR™șk~3@ÁòXĄ=`Ô"Ç+Đ«˜ű’țPł-O €‚ Àę@L ÖéaGk{%0šJš€_`°ż‹Łˆé9̝űôbŃ`Ł·Ué RÂêű(ŃJJ>ĘaÍ-3©šg9ȚÉŽì.Ž(ÏnI’­«ŠíY@4ą·"óńÊm«:z(fR&ć¶·Á\‹łÌÄ śWŠÀ{"șp‹ëÌđ)À_ÆwھӒ„É[ő;ȚééžىGŽÂ;Ÿű[…P©Ź›”Uűq VȘÛ\dxŰóȘÍË VméHˆu0ȚwT>üŐKšÒ{š&HŃÙ,»€$8łš|N-ż€·Eûț±łèÙč•ÄŚúàö\ꃑRŠ›ÄIȔI€í@‚‚óC“'Ń8xđâ*s™ôtAĄ^2ŁămWqT¶Eƒß…qUöêsŃ/„Đ`'ˆ[ŽŽ5Ɉ&†.šÔ’ù߀4ćz†BĆCEÚ,Ö(I6 瀕ćçń—äLgžœîbz“ÉtæsBq ‹*Gho[ł`K%ŃČB]˜ˆŠ Ùn ;kTK”ő TZœä”WŃÛ „”“WçÆQÒnÁ»à)^«XSLA<Ț ÙŠŁ”f„ő;ŐÄJŻ;ÖæŃ eÌòJ#>ŐśÒw1{áRwÀ_ ÁHÙ6^@gžĘ«ï ÛNŃû!/,éŐż„;œ§;VšÁi)ń%úÛĆŽő±ŸœčoÊ·–IŃ" 2 1‹ŁS„pźe„ŻȚbżžö>»„a[(ÒtPbÿֈćj–cÖ#'ŁŒśęK)BÇâòbÚ: PAI‹Ò±ZœČ˜>r©)$ ŒH:Ò 1­žˆjËțjGó;’áȘ+öă»›'šjxÙùÂzńœÒžz ˜“TÏ]ïęöòŸ\üÿĄš/ëÄxčlĂ2{ívƒŠŹ+Ăë4;qj9ÿOđ·ÓêÜ/&‹Ü„qÚß7OźÎA‹ crŰ8â r=ÂTdIă°U=ȚIÀ*A&pűțgz Ț@fŰï&ŸâŻH:žM˜>LDì=źžŒS˜nżY”Ś ±{Òű„ÿś=s4]‚ZżO]#ï“ MžRŰV§Æ7Ìà4ńÚÏ1TœË‚štŚÿ8ż:BìZ Lb[ű› ~âtúp^CțôŚ)(öŻ“Őćár€‡ßÊ.üuˆYÖGăÙ+ꔏPgBvHOśŸ'Ž›ÊsÆCXAÊĂoŠQôœT&Ș틟žț“î.r†wÉìGWsxÎ űȚ5GKăæ(9)έ}Röą”ÿm ˗ż{Va/[ÓùúaLØ9đŠp‘ 푄Ddߑÿl€ć֟I›8ižÒ(ŚA0Ê>À]§8ŒŠ/QUru9?ÍĂéĄî1€ùߎ@ÁHŚ…ż3‰6jD‰Û±˜TzŒrw|Ú^Ż(ț” \&CoÖüéiæÜÿÒ#Šô¶čÌ e̓*ĐKTÿmQBŽ\ïŽBi«*ì ·ùŻxAÊn#^$qĆ東{ ¶Śˆ„ÔVś˜<Ą:cČ͕6:=Lș-&6ÏÇębö.ѓshe–ü„Ûł+’țŽĂźlŐ&ëÆÎ—ŒöíŁĄnŒąkő˜ùÖLĄÉuïŸgjŰńÎÏíÄš‚dIaÉGT•2EsVG75úŸPĆÀ­©1dśc>őûa"ƒÖYŒ§69ë7æđ„'Š;MUŻŠ4D HđŠŠ»A„é˜qސÇIyń…eŸá„kÂÖ'à`èSÀk ûÎ.Â5U[`]ê.’òț™ˆÍk…(û/[TÆIół3€,v[ÈFß.ž‚ é4ł&é]~Ąˆ&V7„,Ѷené6:ÍfÎYòEt‚IÂ;«pș“ä‡}j2H°$âN’tƋFë c$u; iŁà—˜~OÔ{b€*Ű;ČҗΈț9ÛîSÖ(–òwGí7üčlÁd‰S# eP€ÂŠŒ Ż°êŠœïńŚűőœĘa”L=DF‚VŃPIź•ofjuä ©6AEtTçCÇÂôŸ‘ŰŠauâČ*ùŽK]ûXđ„#()Zjà?’•œ]DŁÊ ŻĆ4âc“oiqš›?Hz›%[æyHˆŚùł©ŽĄV†»dK ]ZHê/èD9NŠa‡,mğŒĐ± ;Ê)DęćHX0<Èlï/ÉęoșŐŃŹHŽĆöî}Œű«G’€î5i^śek°^\É3,X˜S// ˜ÀąASüĆèN•Ó?œęÖâ™Ńg^V"ż{ș@lšì”ÈxKÓêĘÛ•hÊĆ:}^êžÍú ŸœäțßN†źà ¶Ł"4čTÔĆՔc“Q+€Ș/«])TYh{ÂÍŸV,žČ#‡ »ëXçm|lôٱž:€ûƒX§#†nź­k/Wn“êŠ7J+șđ/}‡hƒ`_€ü ŒI’Çç7˜ű·"„ü‹°2‹\ž°‘‘ŠAY ČűÎŰőđ!àÜëÂ_4š~ÓçEŸ$î«ïSâ8g6™ßXêŚ-Ò„$éûéêĘHvgç?”„m"Ń0+W­^ĆnȚ5oŐÇ0 ‰©$v€PTœßI šœ{\áÆ2Sl†SCžÁCč‘ă!dւȘ‚śšg󁁍iæ6/ĘœŰÌ(B5F„ …öńb»ȘSšÁŻ0ĂKJáQ ŃMŚs#śìç;dOÌTÉGqé󀣌ùFù†]SęŸââ'ăZ·™Ï±T]ρRU˜îôOíV·îž|Û”KEuæp’źąplđK*r}Œ|žșÜȘűï{|Oíübűęż;Ž-+è‰ăüśž„}ćtFS&.Šf§\Úę|‚­țŃ}΀aÀ„ä51ź‰b4ĄJz ­ź=  "$9 K2Șú—»ș ̧~“ÿ»żÿdÔś€vĐ·ćăĆ?UœÁ6Y¶˜v‘ߏ»ïżE:di!\Àʉ›„›ȘwBpüUƒźxPKhŽÖ LÍz2Ś 5òŰșȚŚè–Ęy…‹IzH§MĆæPÇ8~’b­`/ÀӃüVò.Msÿčn©™†6!Șû G·Ö^†ü‹Ê˜Ÿ"pœ›hZ#†Hè=đ· L…ńT“±MŻupđބДȘŐÚ€g|Ü|Æ!ćóÚNëß~‰aw@śŸ`7ÿŃńs šZąŐđ|ꈘ˜Țr€;łçŰۜOä8蕥y{”ŐT}_C‹žÍÏö ŸȘ|SR&ï\á-oŽ„ #ŠHÎ(`»TżX—ƒ† xrü}ÓèC5SWžöĂ5=ÍȚT°Äԉ™ƒțü풙a~0ę'ˉ’,ȚG<ȱwt†ÒxŻ,kțÍY? `Ż(;ș;œƒV4Ûïv»a­±Y OŻ|1ÉÙPÙ œ—,òŒę&ű$wpÿżú^żő5œżŸèˆdái»s1AŃŁ ŒĄ)Y”òáòŒÆŒÓÌéÉá =ĄCžu“Œălâ°:Ń©gđ/zŠbG·ÛÚżöD~Ÿ»-3>ŠcȚkìŐt)Mœ_ùp˜:Äă—8śžœ4ôÓô\Ù)ăŻùș[”-ć @ĄœGșyÿCiÆ./æ_ èł&à\$€#Fdž^Ã2ЛșŒƒĄgçé™OȚ­~“!qVRŽä6X%ČHzä,Ô0ÇY‹— EuJł[«cêL,VöÊZÈeÚŒB` Ò fsy<3ÓO*Ÿßżđ+>j.XÏ:NGngÊsćjž˜’ŽbNźąž2C”/Oúü*{+Ü„đOX8tŠ3©JRëüŐŰÖ2ŠwżÛ@lÚG6_ÊŠÎE*8ƒ/ñÎ&Űè™ 2}ê1iOœ‘ށzś"_gÄĂŁšd’È'ĆüyŽêd?OU>+q†RÍ% Ò^ߌMÆ*“ă8žì.$¶čV%ČÉsËÛßÚC oÓŸ*~šŃLçK#pó->y%ƒő’k€+•áőíæ©âŒ9Č. č`„™Ï,Ûúh1ê>âj…– ¶X“hL”wăq0§<æ4Ę%č€f Æ=+đ„qł—ú@á˜ĐRćĄ6Fžu:ÀäæR }_ÀVx&ÉЍ*CäKž]sj—{đi·òáűcék‰6g8ÌO œËóŁ„'ÏióĄ JŒț~ÎŹP:#NvȘJÚYœ{ ú’òHVĄ[|€źżÔÆm #‡3I€/`rŚńTjń#—‡QąeüšW°û-Œ@ÆVśT Ô+ü! ÿ:űAvrę>Nˆl‡-:ž„áçY¶h±Zb9–©QŠüf˜Ò?Šż@tüŃéAP—àÈN·Î0źÀŒąșGïž IĘyìAőÏž·ŚÎŐșȚeț™`ÚGš`š7Ț«qaÌß"±œ=Uàf"êgBBă˜JúÒő&Hë„-IUŒÚ>?śŠçËŻ'ž+ŽÖ?r©Üó\r‚žÛ'Ž<•à±T pőÓÒ ç[KĘLéțÇÉüöÍ·Ÿ;D|ûCFÓŐđ4ö”„»R*ĄöP°EtŰeÏțŃB•ü°F„iqÂôáeïČOéEșW›ăó”ąđBȘŠŁ‚6Ű3ÌÍKńŚ«ś°‡›È CȚ?ĐZ~ĐĘćńăŻóڅâar‡`QâÿŠMí~äùæU’é§•č( RžcNû;>ÆłEZL-ÍCLJ›Ű(Ò „ ż ĐyŰ_Sæ¶J!N—@ùP.wêÈíŚh“ żt­ë«í…źtc|%˜”훎Rá ź\3jă±.ډ@ŹœöÛ¶ŰŸ Ûč:o–șBPŒ‡ŻoKâ€2ŸAQx“ÚÄ#.züőœújÂPą]żŽ« • ĄĘÇčÖQ}•|«=.8NDń7rәïDèÁ{ž†‰ŽÂ>,iÒ©űĘ~—?©5šI€ò,Ò<9KŸ ¶9Ìp QĐzú$ó4sŹiö;ҌsÁ!!Sƒç€Ă&­~)ßĆ/óĄ‰Ê ±@™ÔłÈH™éűău8ëQ2|ÍŁÔbđ}җ<6wöEH(ńvč‘?ߙ””Â3cI#š9n§ŸfèłÆ 9oĘ7"śè¶ï€[”ô8G†9tzì i}5ĂùÌygfźîáșră—ÏŁÈÓ@™:ž„ùóm&ö„EgBŸۋĄÄaąmYćäŰŹ4măÚڟŰŚ(Đđ”ÿ” uÄOźixܞ@ƒ.@‘!čŁÆP©WŁü„eçź.śĆD˜íËDg;/Di© Űx€˜ŽæcźUIiP è§läh: D})EłˆììbÏ‹€5ùYMóĂÜű»#윇nOÆ ßŚrPí€\OGÀU›™~=›«J-0æ8$ő(äăYŻ>aŚGĆź§èvaé/SšŻl7Ç—à㔋tBi„ŽZÇ+p:§i€nk2Ż?‚€­#Ł@+lÌSŽw6ÎÓJoł n!I)ŁȚr‡ækÈúČÏž€hȚ~p™«‚W©ÎŐ ­ŒĘærß'ÈĂo ŹocrȚVęçÍ,)lșà§žIÊ>-XfÏ(‘HQÁYêZÄ_H3“ś¶śJĄ”Źđ­ GĄ@)ÌÓuȘtŽĂĄdÛ^[t‹\rMęJæÍíŻâ}ș7EÀ°„Č Á7Tc䔈ϱM‹Ó=iÿPVÀșÊ p«ÖÉ/Ÿ“ZH8—™&Ü6tFșÒ 1À6țÓ©zWă^g§?BËj!è«Ąæ9(Ž„˜uè$À''°ŚîV^íȘ~|iiWsqŻÒhàŒEéĆŠW–œÈ„§ő~ Ń.ž+YDű–È7Ržx(v7Ƈy{ûŹŐƒŁ0őȘ/\ôÓÜà 4î­@JjĂökgjŹ«nëϒ\a‡»È&а@…ÜŁ Ô9ïÊòÙ̘7‰Œ8©çȚ~ÄÆŰj‘șőʀêȚQê2”Ăł\)æ.ÀDł±pÈêŁŸ†.Żì{äÍóss)P|ôw>N,늅;GłŐ,Ó]ž<ë™\ÎàƜúT^šlü߀$è^š*I™–§șűȚ1íÂm:8Ț«ƒy†Áâxàć Àő; ©ÿ"}‹…¶rß°Źșÿ˜ho,ŐK°îń'ìæïàt>‡bÀ7VÖ[.hÜx”$qYŒ1Ô鉀ńŽșç”kĄsc‹_©â0Ÿ`W„:iXVŃNŻÒ«Š6c,٧Rn}đMÄ&ŒŚà—lŸșșQŰU ł”`łâ6ęO‰í”k§‹?çúMoaë!Âû{œ3ć#ÖŰĆtĐqł;ő[őO'às< ù˱€%6ÆŃB,™íÉw!j2vV Ì2Zæeżÿ–wÿÖQ=GKÁ“i<_3|„€bèÄ!AœVšYŸ”7cóń.-’ ]>ò'–Wì»4i–%Q)€«·jf^Ÿ§1GOŰœŒÈ‡GśőpźqæÓSʶì~bQym~òá \ă3Uj„BćKC đsÛQNš}Ć|cÏiK&Ă.$Ë]Y7źČ_!œúńčp”ôtwŠÜ}Ž!ː]E‹‘ÈêŠoËÀ&‡—YáuG(Nź6ć[gÚ° ő8™nÏĄąÊž”đČő·"ž8/~ÿŐșá‡|­4vÆ„*ń©ÒR?핎ÔÒŻuŁkPŸŒËçÂ[ÄÒĐÆFɛłŒ™đ·§JÊêá’Gs«ùÿÍșŒHÿvBÂU8‘çcna[’yDĆáŃà汁ÍÖ#*lKŸL0NÔáCqzP–ÿőtä>–yŁĐ š­@|­U5B––­ëvÿZń%ÔCá/,3{ùÊłœščs žűZŽ~Y?y”G$ff Š;Tłì>ky*€#ŰĐWÀ–ț PGNśa%źuŒ$ȜvCŁæRç6?Pź jöÎk[ćbEáWà˜ĄĆì°95ÈĘ*lècuĐk.ȘșĐpăä°ê‰Ž6 CL«¶œÜ֓y8$‰ƒœÿśùÎQ€iłÜ$|=łUE‰·Ńe‘/Z|§Mˆ¶`WtŃx—(*•ÔÇTˆŻèíQšKćzj0&’WÍVsÌWv’w_ȘČä%Š|oŰ3Y·ÛàŻYl1s~/ÿY$”š·Iš„Œ™„(!”"èŸÎúżu;Åì-Ǔ!żiŠšíïÆrČ*†+?T”dnz,68j‡«ču ź`„èPËŃâ„ûâÖ!V[ÍôÚ­€#Cö]‚òŒGÊÏ”bIZR썄Ț„‚„}ÒőęSef$ŠË­ć 6F­ĄČ^±–|„ÎŰ'9źhŻčS‹è0/ŸMćȘȏï`p"űŰrÖÔîÆô©7ç[††ú/șű”x-I9u˜§ŠpFÓ?d WÆO3á€û­ke áqÒÁی]aȘ€=WtC A”͖V܁՟B|ŁÏJ[È­4ÿ[±Óąt*3ą|æŠ:©GÇV˜V,S‰†,#ïSÉ6›|ń‹łŐ~2ɉÙiÌ·Œœ\|őK ȘÒŁPùnÎ.星dŸŽăÛä1±ąŒÇ‘śȘÔŠŒS„F¶ ž˜Ć-X ń‹ȚĆśŸCĐoÔăRĂĘæ‹«ët˜JL¶%Ő.łłìBŒc‡ÇÄöâéœÏ’NZ{†€“ś'‘;6ŽTÖ°u…Ą8é+,|ś;ڎeLÖP(Üź6ĆYBé˜+&̀7ÂDű3Ûùsd çÉaiMÓńŒŒȚZ1{͒aŽ,ن« w œą»=ć?ó¶B™w]<•ÄGOÇŃÄvNt M’’(š@·ăe›Mđˆ[ƒ4,”xjŚ('·\†UCcćLEaȚ2ŽN(ËDĘĆDïáôĂŒ#àl›–‹>ÊùăÀ¶{©n˜'3œĄČ„ÔĘńăŸ„ûd‡φ,ïęÛ šÿŠ I0țŸ 528œF‚ÈkÍÿ5;~€[7óF—K%ČpxÏcóžmÈ·ZˆG0hÿÍžąișҖčć”JvaŸ+=Jć€Zęâź-°Um⏊XkŃ.“lAŸ”čiŻq7Ë4nžä=RD!9ešËȎ Ö0Žć§â•ŽV›>@¶&w’q‡ûIËòÄÁ”Ąźìž,Ț ±&€k­#vŻ#ûŠ«Êțc’°A€öŃò‘ËŒ‚”/y”è’œlf‘Čpwzšăűf+‹u|ńĆ[vçŹÙ«;œß9š:4QŁ62fŚzÿ èąHgežÔYńÌ)YE LnŐ7zÓÏąHe'łŸMK{€À5%c—,3»ïÜÉGęȘˆ&4]»Qw tŽ"Țbêr ]wÍ ÈĐ~€ÖNăŐ­Ä .eĐ~ÜîÁŒKm¶JȚz|“š-ÚB†Z„díV€âÆčŐáwm+Ò ÿ’-E ŐÔ€9äD2O=5UòŹűŠ;·òÍż,”śwß_Òă!(_ÎŹ„Níż%±=€üÊnE2aʖ,Ræ.œ|Ęk“èÈۘ(đćk2]OÍ (đ#„eƝőĄć UŃ<%ú C”~ś‚wÂòWÜłÌg(gŁ6%†È;'šWÛQš:ô—ÿLż†‘oĘÈzî+Ž"äEJ‹f9ŃȚÓ„ˆtä@üI_…@őŒűŽ~1ê=ȚÈÜ4ŠEy?#ę0ŚYE+·ccJ/üárwÏEà'‡€{śűŸŚÔ,kžÈìDÊŐșć/‰kwI¶Ź-œŠÛ.è•٠›`Źđú9œț"ę&]u^Șw’]o» +LœMÌAżÔ[§16IíZüyÙŹ«ZátŁA”ÁçÏÖq"EŠ˜é8@AgͧVô<țšÙ 1ozdûZH€˜L˜ż-h­č=]l7.âZ?‹zX· Ž+̑Ò@eUô+ł!őčăV™>ÜźÖ9äBàŒsÌ"3 ±\Ęoœă2H­ĄÂ2UBĐXëY2À2(çwćąéÓ}Ú!”… 2‹’{€YŃSíǓebˆ`ÒcČ!7—UĐv;ÌME‰ĂvWÛm.ÁßíqF6™+/¶sÀ-Æd•ŸŸ»PŸ2TŚ}(ü­țÉŠ}€cr’LâF}òä cęEŒžkŸ–<«‘vò`$ęšîoÏ†‘[ëÿ~ÉçŹ Ÿ/\·}Ču7ËÀš`NčsÉŹîŹàȘ™ÓîtnI\Ô?.Ó{ő‹Š4NA$‚w”DÔаŠÔŒ4Őłœ° Vœdò%J:8«~éXèWúÚf1ᔑ!? Ć|«!Lςțùс[7Ź›·’|ôæÎžÂçkń„:I„ŐVŻŁYƒÂ˜æé[SʆĘț]ŽąÌŹéækphàĐî>3KeŁÖOj֌”Gmcšû“PŽôȘè(@}x8Ęđ}e‰¶ćŠEvzĘđÜìˆé‹·jÜNöa—~,ÒreFśŃË`kEÖ E’€€uŰgSç(H%Ű'ed!șb‰8±í[èé”Foc}2: kođ‹+ŸÙź*C+ÉÀąˆ}zż\ûKz»‰ÇŹč$Ő5”;uđgßl„X„nŚ~œȚîÜ:x@%ˆƒnìČíŠ0čì„ąg‡œŒ-Ev#j©ż88WX,†œȘ¶Șïn^wÆ[N{/ è‚șû°“:]&$[Ÿ‰T—>ŚwĆŠKÄ0ËKr8»ăŸőêYžZ| útűyáÒ^Ûô©á z5‘1—BWDZÀgé&œ ?™4ÍH)c°Î0èÇžÓ‹”ž€©™ò˜\бæŰdr,€àUöÆLÊ3XÊęœ ·+ąo}<ôYț˜aÒ'•cæÒŽ.7\ŠL^uGÔI?0ąęÔö™ś>ì¶poGÙܐÆGD‹W‡Æ z`ûb’Ę2èű Io™îáŒ,ŚsrW"<€mșڔ±UžÊ ‹ȚS›\îțÖ]݌«›ùßEö—ęš•a^üb’zÒ•ÚŽtäùă@ßh&èrWƒ\p Ä Ș4ęèR7@\RBnłČks̒ÆVUŽ0§"UłŒÄÒŸÛBÉćpǑȘ+ę4'SWWL„]}IđkHUÏv„ †C—•瞀h$l ùO©™śBRłxĂśM (éż'` À]­ÔŒÎœb‚Œì+»¶éx‰š jèj(óĘʛlȘ% ƒƒ&[clžÌœOJœŒ šçbÛ@țŒ]Ż$ËY] ™«ÁB—žEÙá§Ű`Ć2ûm©ȚN I:G šÄšÁÄč ­ÒIêŰpüNYÙ:ȘCȟŠ•ßyÂ)ć8ÀŚí·„Zs4»ò æ¶szy'|nîWĆâ5ȁŐRČ6ĆŐœűPîJ4Æ+yhœüÎ∀ÈXÿ€żsÇ$Șr€ ›2ô”§òăüæƒ]ŠÊ5đ{/”s$ÚFä3”w“Žè9“mQŒÁêtßȘŚĘ>ęžâfgÁ«–†Ü)őÖ¶;Dˆˆ9PéŋNٜRLŸÒDź©Ț†‘ĘrO7ƒŸĆ 3 űrn»;qZÆ<úsˆècŽ"§Č*Èǝ”iíäž^Ț&šâXüÖ9·Ä3ìDAfHJʅƒ7Šî#€}Ö /·ș„Ąe4-š r­û?±D·Ż…>ϕ@&:đx'Œ?Ž~°Q0ÎË#ő™Ádj B+U°#VœŽ™lƒXsZöü–Üèg”ĘŽ­»äY§ęK+ćÄ Ž8I†c”źŻOsٚÍûš^F‰Š#†›”" UôÂÒmŁˆśÁ€sR‡]YæûêZlùĄ>šlÈwžŁ œ[Úb– zÍ féčC8sđïCáŃŠ‚XćꇝŐ\ᔣÎ.l^©”͏%*EfŠƒŸ,žCQ^QŐÛÏœ0ńł“s6 q„5LÌŁCož†ÁșC?D[”4i“Ü.놬ÿŽN7_ ]Ońü°·ĘJ*)[†ôDŚYëË1š›âæomOtŰ»pÍôś‡ĘOę2śênwÛF”w&ƒ+ e#+ǓȘm H*vʜă~ăZt·\”•‚}ÊâŐ'ÍÊĐ7šJ.úÚ)ĆȚ1!‹ÙM*­•é4^Oh8Łx:0éŽRlg˜9áZŠÌŚÿR^ Ă”~•6"9cTæGl șŰ^Š}jÍF…”wfŠÇoî©41©ûêżÔXÔB‡ Ô©Ԇ,"©KèČąN6;źŸö#Áô…@KÉ;^*ƒ±J‰śq\8p“@PfÂm$°0:Ìšäâš2Žđ–ŽgScă•ïFœ{șÍîúqàŠH„Ïgűù2*ŐÍ')Ûœt/ŠŚ$+/‘; çÌŐÜf–Ênx­ EmWšô™ ‹2o Ü]ÖH_,“DDX@dQ/‘«q`ŠkG©ńšh ż|h%é\őFóCuž1Ä8Ïż+™đo‰ŚĘîN°mß?=—očˆ”*+űÖ\yO…TôŽˆȘœ·!:ŠLŽ3:ŻÄ*~&Ô)±¶›3‰Z …ś *Ȱd.ő]ÂčQ“ß·ŰU™Ł­Šú]Wêîk«KĘŽü!ÓŹÙM'%vȚŸSŽŽŃەgÁXcÆęRż1i€û”ĘđO'qŠčwWEkֈ.Ò”êőXÔĘŃőŠVTr%ÙLCŃš/Öłxj”F[LQ$F㫯Óç‚)ŚZŸÜŒ™ÏÀ\„#äRÇł18iæŃà*ŚSï:ŐtàÊÜ_Qč:ÚŻ*„Č.Ûž’öŚÈŒïŁävĐ€žŸkJ%/;† )u-"#4Źß •@?Œlc ¶À5nYҜstIhßá7wÉEl{s}ÂŹìŽ•ï͚łá"ùŐű )L ą‡. Bb:ÚÍìIúô—±|ç KÔÆHČ FùOŸš„Ёöă]ęW‡r êœś#^ë-ęÌÿdGÄùŻ{éšÿŚ'ĆGűü݌œÉÉË%őGŸ@Ă2[>SőȚ“ćś 5“ß;ŐÂM$DDîŠÿ©ÛŠL”Çș°ôÀ©ŒDÓűŚœ16}6Y7ŽŽšà}-`“ŹùŻhę^àÖ ÓT,&«2ùa},%}bő!oŸ}G.ŻŃś i »Ă@țJƃ,0ZzúI@|ÄĘ«$đ…0dŠ3{–•!›†Çč‡űLÒU7/܌“Ń ܀&éă–€ÊțÁ%Ÿnźšy`Ă…Cÿ°2üłTR)93>QŻoÍàÍŠÍšvńˆ=V?‡Tćâ4n΄€(Łč±äœ9żÖ96•OQäcW‡.Úv‹T[V$­ŹŒŸEqą@t•!šeŹæÏ.ÌçXŰvȚê†?ńo;B€ȘghŹJ›"d)wESv·’žźìÁ•?,’k̃ëèëóśùoÇ Ią0mPĐfđ8ĘJïÔĘG€%e’lä æ±=Š©'ŚÊ•đì| (M™2ǀôöxW”rű‹ƒĂż:›Ô“%gaŽšžŰ%UĂĘÚ J%l›)úƶ_›oàjqcäûgn–Űé]æè„üxÈ5Ìo‹6ŽÜ"eÏËOŸV—Hæm˜4„ĘY*}"díÿ'\'ŒĘìÉOĄńĄeŚ< `yáSÖNŃ˃:žo–ӆPŸŰK/X?|†äwà,Äńó%úł‚U=jąęA‘ț0śËJyƒ†‘±7›°ríòż¶Ż6YB#–N<Âź(ČLy/ŁÀ›v˜ÒN’±œ?ő+r•ÄĘșœą™tÀwoWmîwVż?/m°2ë ~Ì·žÌo06Üá-8Œ3qæîVK&•ČZíœÜNŸk$ űŸb+êbSŠő'É=càìç~7đ±È,91LÓò‘ÛûùlՖJöÓśCuÁò\ UÀ<Œ=/K`ŹăłŽÚˆȘÁxíńJ‚@ÆKr–ê‘–ùź/±Š”)‰ ‰+Fa„źCà+ÌÁÀȚƒÁgÈ I"ńʰő\%4S»–F Š«g°(rsᎍk?1E•ûûȘăC6ăäI|XłŒÛѕU°Vf?‚n6Ș[5iáY’^čC9Ân»{Ț\lAS¶_șqæLąąjC$59˞Ïwn\Wź€àńAsŸ2Vo{›ČzôW“„{é }”êčŰHʙ-Š08[ßZŠùæ?ĘZ_hnbÉśă«jHFĂGßO|őêTăo­ž”w 4?èc}J&MCÛcÙŰÎDüöʛܜèSîű4ź ˆÎRP”kˆĂ39;4>D€G‹ ńȚ<Ä&É{”Çû(spPLT<ÁÜÀ]†Ô>T9SCKmăí^™Ö +UЌY5á#ž ѧČńÌbǗ8ä1òÔ›Ï:6ÈČòŁ ĆCsźM·’@ĐR9Àc{čŰŸ%7¶k„n]°>)€pžŹžÌfŸŠČçW!!ELFƘ¶U>6]±öÒS.ÇE…39+'țŰ0'Ôș⣃lŽ·ăëĘŠȘ' Œ#œÓ`Ż’·ĄI4ń[çcšźKŐÈŃìż7[{-öŠa?ešSÓ2^[I=0a=;śG–őQ”¶Țß7f)À“ánÀì—6—ęŰ=ÀĐTŽŠrț~ękŻń4,äƈÒÂ$xóêśOTŽÙ9cˆÆuë~íM)+űœthƒ|J[̕Há8̰©ÁăÏW\íÊCùä Ő­%öÌYM˜}è”aI-Ôh5ȘłÜ •NWŚ”ÆU;NÏóČúÓŸĄÚ¶Ö ć+“_ĂćŠĘőŃêÆÚÁ»7șcg·ç}îÛ2őw· xĄ<˜#\Ž.ŃߘąWŃŠ.ŐT™bűœšŒă?Ń •^Ïđç’Ùä[Ù„6–ő'JÙŹűÛhìyBg¶””Zè^éĐćcąĄ*g4~.aÏá8ÛHÏli-PëÌż©Ćj đüi|1VM^»Sđê%FtGçsV”ÆYU l¶Äw9mF1VÛÛúMmÏ^2šŒ&DȘŻŰtLĄQș oȘ–Üq›‚pFƒyŁÎZ4˜Un7#Y#iŽíőïK +ïÊkó?íĘ8E<òšÏ+:”•ŸìÊN_Ș/ÿŃÏą”}XFšĄoàȘz”/㇁òsL°Ș…ĂȘR”Xlƒ€au;71ęiQ&{6/Š ›Ž“+˜ŃRŚRTHV–H=…IĆE\g4‰Č&Đkp{ë@”éÄ/3ăæûíńù3%=Û€JÂqâĂ+óÀC5ßÈÇCP°ö<]’gś`—‚ź$fÊŁ„TsÖÀrætU0PÊ0ž.-±BŸaƒ[#Í ±^1Ț2áXoźkaY·ő l$éGU ÙÆȚel‚ŚÓĘ V‘WUł—y+^ĐêòÓ<3û,gSF”| Ł“ÄÚ9^h6íàž+v‚YùûÚ@ĂŻąłçțą…39U‘àaő ]!S“˘Uïk sŐĄž&€Wű¶t(_fŒ%yüJ9Ïí珝CśKX·íČÒÍÁYZč Ć4ÔŰÁŚïÉl•o$ƒPÙNŽ{Ț[YÀ•°°ȚÁIƒń Âwˆ*Wź čxjûĄ,j©»Û%éjáąaéńEÀ±ê„ŚÇ1:ș˜Pbƒ‚;ó;…ž†” )yĂ^é*|D/'pRńVżËŸZŽÀg\žL„DĐžśjĚ%@· ÆŃïp7±X]ź$Œ±*b„€Ú „kš«ÂDGŸ©Fç©Ç u!.çą5,…ł3G„ ÓKy“§É0qÂń‹ê»‹ă¶}»V“Žș‘țŁm'6Ął&É%yBȘĆȘHmœÛ4°4珘€Cą€—ûö€0sŒ“‰ݟDI9P?‡fâąÍ@MX Rj•ˆzÂ3=ÿ?èżöHÜÂű+ŸlŠbŃ}Pb @ü™ÄüßiI)Ű(Yo"GŒT7ËZŁ*BD;ŠaŒ ÖŃă‚æńN1ŸÔˆ@'đH<ł̗žšč§"§êÙIúȃ·}ß»€”=„ó‰ZFĆëÀ!Ç;ê°ùDęm<.žĂW:ɋ— @ïH‡‹`qoĆbœûŽŸIŒ5=âúóáÔżĐû–Ovçh  ?g›?ă˜Mwćyì[<±Ÿë‹˜híߥ^KŃńŐ B,7ŸYH¶“¶âźO°wvżq„ç’襕o>2=ÉaBő3~?oÖ°aT™žI„ÿŁéPžŁ§v#ôàĂ”_HŒłàHčŸÆšŒWö ’D€ÆE™‘ ŒR&uĆÚś”1 E*d}ZËyŽDáÿœp?ËI“©#űz°bęZäû./śš E\Ÿ]ÏÒqŻ“|điXRŸÜĄ  `Ò9"Ą8‡-2aW4‹6–$ôĆÉ@<ˆ0«•Zžù Âïšą+م€sĐ&zșŽRGê<%'lMKÇ łĂ/Cs~ûw_ï™üÙ#X—”~ X.ƃ„(ÿÙt>p,Dæ(|eˆ7ĂÔNŹW΄rDž;Ύđfćâę€Öœ’ȏ1šŽ(—ÌJÓÀ+ c”0žLz—Œ!Ù"©ZpSyÉÒ ÒâȰ|rĄ<‰8Qp ™„–>.P…ˆx«ć‚Lˆ `†OS»‚żJ>덅UȚ_ÂkíRSŒÌ8%ŸG•ÎmՔˆ…;öô]~ńôŽÛ0ÂÄłhp[†M h}úòœTa‘Ą+_ š>ŠčœłtîèŠ&.w' ©bȑq>^#ß>·Ÿ• "gÈj$”$›ÒEœÙ DASliqkű,àŸE0!«ĂÿE9“«úœU2b"ÓłĄŐoÄŠżÔŁ?ÐÀ’†š`ĆJ”‡ńŁc¶‘V”čŐÉà“«’Ó>ł7đÎö“6ùtÿßYŠm3d–»7íĂ –Tn]d9‡Żp1Ž<”0ŽÜkș?ÓR ‘GÌ2Xï"ŸM$zɃqȘEŒȘWA„Ì“țć<0€€7ŚÄÉt2A|ą$d?țil.p„śPtżê„Ž™èÎRašd œ.ò,=„‡ńôŽTÖŁŃŽ­ăo_ŹNŹh C„\Ț”ܱˆfˆđ>@‘`ŒÙ&u6y”î/J .ąk˜`Čî'üŐŁÛâ°ZësëZ„Ü&^Í5mŽ büńKJű±PàÄĂxÜV †ź•+űśč1 ]P șłßÓ§e¶Ž0}ÿ“o›™\Bh5żC¶/źÒ††§Œí5IĆgó‘,}qÇv*źŸ7ŚFą›‡˜ÎÙŐ8‰­q*ímÛó/EćâUĘÿ_EÜŠŁŹC JP§!ąâ«ƒ%™»}ôž8Îú ©öŸŸë„ČfŸNIuŸ‹Ê˜ƒ}Gh°hĘύü7hhV­ ęÒfm€7łô?üM°ĐNœ @#¶¶Ù† §ăÊoóę„7*2žűbKPĘŒR5Ÿ ÍP"ÉêG0ÙAÜẲÇFĆE˜•ÜTÓpCï>ŠÎVBú/HăYž*b]12ad4ùˆN‘đ Ń;ŽtN˜±ȚMqHa;V&ۗS-Cžd6ö+M‰é‹vkÈ~‡ŁO°rgëšò©Y€ĐšĘ jÆž•Lt"™ŽŽ2 nÔCÉ-ò|‹ŃÎ<+›HÚĄń‰F=ynȚ]Q›źuœđV¶œńÜѰMÔJż’/B“Ș'Ë)ÇśéÆÿœèđx«_·śę©0śțWn_ûț.¶ț7Ż~˜]LÁvő˜wœ'ƒŒÊÌ#%SȄiûąĄÁJčüfčoau}p $»%+€u|VˆYÆ4„đęl.VËWN^žä ˰FăԈTX Ű.:Ű\Kh€…F~áăž Œçă}ë†/;‹ôĘÉB°ČŠMŒôăĄÓ&łłŠŒrŃYŐDè2ő$Î\mȚm ӱڒxdűUól2Vä+Ÿ„:ôĘę,žÍëÌ&ŸËК€cČîöšÜäą°ZuòJ.=w`à»îJB„Áa„őÌĄB䦝¶5Š7KçO9:„æ}M{փà™ĐϘ̄đăf*ò:ŐNœ !€ ÀÆŐ–tHxäÓâæïƒ±{·”s8@Œő‡5ܘžć75Û2Šƒßw[*‚‰șŠï‚昊Zj‘=í3„őqՂWŰ-u”")GdŒƒ,> S^ǧ’ŠČ!^h0Îź"^ŻăYkÓż‰oŰiúűȘé”$öÄjvb·đœê9‹4Š09)@zőKâ±1Ő)}ü'_ПóÏöŸˆ?΁ eû8ÿŐJŁȘ©cŸ•á©XF‚Ä(wäł8Ç:ĂŹÖ§MzdDüÏx–4N/#­É†˜ađhqT¶•uą•È[už¶1m&ßŚÎhÉ8)C=Ő`șŁ™,t±È)%)I)-Üéžz!ô’"tAïÌÎŚČűÔ:íŠüA|&ÿê C#ž?šł„Ÿ-Sm2M8rĐŃcgwSn6JhÌSî6GⓌ™$ç::TzGùÿIő"yI±2Ć<îÙ瀆^żEŻ7†çB“>ŚEšș+"8‰ś`X3°Ż…ö|đ€”=m-RÊè J€…ek‘Œ/KśHJÍŚ FYGÈ”ęÚTˆàŰŁ§zŽûąFEÀŸöUYyÎuN+MÍ%ŐFnÖTkłoâ84š|§BäŽL™é;^vúTÙ0Ćí˜âÙÌLœTN/^”EƒgÊsòÂuæCŒò:ȘhÍWűDąŠls~ՑÄZ[›.ӇÏq᚞;Ÿ$mûf“°€ ù·»tŻÿ~ÛŒV4eeÇ –,°\ƒæ%·ę9á}ë%%MûĆšÍ/•ńˆÓ^}r"yžU‰źˆœ˜ŠEž<{l_Òh$Ua«ș(©ŃĂï H^ÄȘ±Žł; {GŚúùJŒŰŰÏ|ìVŠwA3ŐèĂ.~^êÀ%!áUÇ@9—·TŹ1æœȘ'#VÀC*Ńÿ@Öú|ˈ‡0òńźżÌ/&(č;ˆĘÊÀ„’„Àw{,~äÍ·“”ZÌFzśÊź…L9€»œ"_ì°Iï„âDŠw jąL€łÚ~iî–â>ȝJœć·ț:>ÏŸd7Êà­Ńźö_y+zÙÆAâÍúNĆă !™T§l%ÇwŰq`îÁŁSèÉĘv3șkí(ë•ó;§âȚ›Ș°$‘Ú«BA5šQoÄdĐ?]yC”@ƒúŠn4TđÄ2x5~ƒÈż|‹YpûeĄà&=Á„ÍȚăȚŹæ`x.’€òóčmtbËSŒ ÍńOșÔĂ8„.%|öK:łȘÌT”PŻqtÙąÔ?À»cŸŽ ¶”úżm‡Q‹žèSčƒßŽ ­ŸÒś*T^Ęă;ŒĐÄ?ÿŠ)ĘrŠśWŠLQ»ęćŒŽúnewšGDòőï„" Æ`gwĆc=T0<%N… ÁžÍęĄ œ(©Uä%őèߐŚòxg]¶É,°îĐ\DmbÁfÂû% Ÿ!ʉĆùà^/2­VŽŸˆOęíű„L-)bJM“ïł;șőƒèÂ#ú‰f’É*}@öšüŒźłÁÈNûż‚‚•Û"ŽŸElöGƏ¶ŃdĄÍ«<ćœ ÖaN,ąïAv zôdé… ^čŚJ€fyY gXŸà[űĂËF/Đ}–šć?Վƒ țä»F‹I%ÛŻŒżuą°­hÖí^1Ïö*œŰ0Ú1Źődyî~„Ö6§Ì:bÄ_/›”nâDűș ĆÎÌ[ç;ąÜËÆ\çZ Ęa:1.W‡o@ż4ép:lˑ)ïy&$¶ˆÛ±ŚÖć3NK+EÄtÌ6:ȚÏb°xüîÛ ą•ëvdś Ùőû5F G Xśî š&,Zëą+kƒXŸB2ŠvqDr(T@„çšł\Đ d•’łrŽ„G»™OŽ©ÒZRźśŠčYí ű±çą ÀűĄt€W}%ƍBÓZÀ›Ś26‚R=È‹.§śȘź:Û(Ó~蜝ê–QdŐ§9Úd‰ă]0#:]ˆV”„òHó•âŻčtäŽ}Ű3ÚegÈș‹É•ö ŒŸ|ț¶8rÈÚûțČüȋ„'‰ŁÖúDń[[NkéÂô·ŚOù]2‡JŸ» `—”Ì7X$ËovˆÀ#©Gnłd€ŽçìŚœœ #ÁŃê œ|łŸHÆșL2ł"@ޘD蟐ARź^šáŒ`?ac„țźQ#Z_iPÀeËLîlăĄ|`æ&kö/=RY-Ń~À3ès]*ï8٘ÆÁX-•;ZÀƒč-CëÄû9<™žœÛ5Żvą­ômĄśÛș™Íryă&=!êX8 )‚jûžJ~kwM1ĂőÀ<>=á|IŒágn"łîZGˆ<°vôæ#K\’Ąï^ÿ…ßspDúÌÿ‘đ$ìȘYŒ_ŒrÍâ-܋žî=G§ße3‹ÉÒ<‡Æ,X„˜ÉÆœ«ÔY$â jXڟÎČ^QșˆlBë-0^Z ooۏža':Ä„™PÓÖòDÊÍćc«-ž«gU‡Ö;‹ X„™Ÿš.Ÿ+č(óèAKđúVžżŒ.)Ëé‘Á=ÈώvŠqȘ™ČkaËÄg$Ћ9‹ ű7j)ĐÙÍæâ&\Ńż­‘ÀČnF_ ăśĘßÌ]ŐÎvéZ #+ämAțę7$9ęxöÛÂfĄęŽ+Sq@#ĄEŐäă’DóÆ§Ą†™OšFÈÏ~Ű*t?ÚÀnN/ù'2Épassenger-4.0.37/test/stub/garbage3.dat000644 000765 000024 00000016000 12233035540 020312 0ustar00honglistaff000000 000000 «żș„ŒÔ9AÈ€ƒljxÄQżĆ4„ېS“%;—g݈ö̜ę}éíN\NŒȚŚY0g‚ʈ„v}ŒëÈËB]Iź9ÉhFúIéGéÉëóż0Ftd‰ŻŐLLDŻüÄż\‚Em,ŐÔQdZ%§>bŽîΟP j[ŹF›\ŹêNAŽ.CjQá\,VL™E7’UsÌMzšlŸŽA­¶\òáùšƒr\©8Ô^UMfŐ›ËÊŸ“HzÛc™|ò # vÔæÜ©‚ÓôPùĆȚ‹Ê{ŒÍ —hÂźĄńïá­RO;—ÓûA‰à·ą•uóÉvèÔ-ß]ihÂ:őzß] đ źËŁ r„+u›G<śĘà°Çà@Ÿò9LȘĘd1mA*Döó6ôš”Â}Vć#ȘAț1’ŸÚvè@ò+:m}ŚQŠ7Òqž?i *űË5FČŚŒ5yˉä99îôaDß —?wČr»Æ~ș§2śtM“©ŠŒXzj~«…7p*ŹjTúdhi ©‹YŒ0Á€éÈx۞) ÂuŒQîÓé –Ëà“»|R”Á’o΀ Ń)ŹŐ{•Q‹°»ËiŰ żàïç)âòĆŒ|H“­ełŃąŐźőWîĐÉëń‘ÈȘĄ{€5ĂgwĂ "$gúN3pŸMᆠÓùûŰŃĄŠ'°&ćȘ©ń_>sÏțŠšàĐüœí3$“}Żî#@^Nçt±âáùAńp† ±ś*śŸbl ŸA¶ÇRčÓR#viș‘xałŚüoüëŒV{ç˜Dž1›Ăö1ïc_čâ}:.+mOĐÁ‡RŐŐ€+UÄŁw»ÚQHæèùŃö‹Ț@ś‚:łÆÁfüŸŹ­Ą5©ÄXÓQꋻ«n&#[⑙ˋIpșąr±]ŸÂG”ÛF’Ű5©ƒIpJŻyvE•Ôl­ÊRîrSCÁ$ž—Y‰ˆ›Č@#Ș$ˆ#aźÓž(ŽJčúdí±á*ë|Żr+æNč"…ĄŃBąáLÊj|à…ž NPóĄ/’Ÿvń迒àîâZ_;‘M Æ~Q Çbg¶kŃ_›tȚM_šÂBY飯èç6ˆ­±fpĆMôŐYé?Ș‡=·íëˆXGŹX˜a[z »Š‡ȘUjR)EÜĄŠ˜TëÚȃÖçjÆ{C1ÁTG!Y©«öŠFžìŠćÓć*|(Űoêُo­żĄ6æìőòmŻ;óńûÒc‘°żÔ+“Đ_ ŃșS;Ł1|žòÊÖŐôè֎9A¶+(żćIëô,·„úUçVmżÙ˜ó+ÉČ\=dŠl^Zxƒ\€pÓDśF+ù•–@&Zˆ&Ÿć]ʁ}Æ/:eäF \m„ W”ŠłU­(œ _nȚèËź.Ç9ÀvûȚ2¶dÛÉ#˜XÒÁhŠ›'œ'2ŃHç—ÏJ»Òғ–ÄìőÍ5Í^=id±•WncžáÆ<ś…ĘQŽ1èÎYËŠÄOÎXődŹŽ*KÜîŸćÒ1wÜB»p`ęQ ­pŐÔ&8-șźôȘóÖżÉAB ›n\”‰©â'ŽĄžSćLé (ƒ©írm8–q%Ìdù?"~ąÇïđJxïHx…SD…í~]iUęS;Z[°š{\lí C§ò‚j"ž”§œŁBš(>.sóœÈ|*Iÿ <oóÁúôqŠÇ}œżBü–cž`ߑXBˆ[šOöœ‹öjlđêđzĐāZsű{Ś3`î…cabÁ”;œûyGüusxžÍpàofČjˆ™šX'ó2˜›iÆ$† jÀŁ(ÛMP"äó7Íż%Ç)đ AŚÉ"Źš†~Ÿš]Q|ú3ŻdúŚŠË•û6DźÁ_çMÀú»șëLiÍțVxŚJVČô«Hoîű9Ț0Ô»‡ș»—üò¶t|‘„Vœ—Ôn4Ćs‹Čö/˜ò„ ûEńê.ïÊ{r ­ˆ±g<îș( #ÔöŠ‹ăŻfDî­§]”fZń‹|căô`ZydaRÁ;K‰«mirJŃYRęđ±g@HÛAë‚Đhâ`ĐÌ#3–C”ĂŐłÊh 8ÌÇ„Uû!K›”W[ŚÁPx4ÏíP‡[đŒê–ÙlôéDÆ|iż ęă•\ŚF… lż=Q(-ő§ dÂśӜĆ)çĘ7îûIk‘SÖԎ_ì,«ÄŒőûÄyŐBűęńúxAÈy»ËŽ;ÆX?âđ)čç|2aÍçfŒLk~̑ÏbȘ%ŒBÂ=źôÒ#Șhë=ƒčvmžäŰS„ ˜©ŒïIözvNЌ•Ăé-!Őę4nSÊÂË ~Žo™Ï‰Ć”ZÌâ‹^žâŠ6Ú zÚénȚő8DCńbÎț‚ž‘Ő+IĄÚEŁv‘d‹Êê qŐ_/yŁő–ïdče(”Ș+"ô)óHëć &:íłÙŚ„+—Üű6Ï|Éóé–țtXRŁt~Ł)B­ő‘Š‘EŐé'ą3‡ƒ9d=fȚÏ&‡ŻE%â…g#  NÇ pQ|$W6\ j»äzt&xÁEiégv·eĖ$9űąúâ3Ą:ő Ï:'}ü’%GÄ•ő@'u]Nž]œ è92>.8lVĂûęì^Û1żEä3̜đœčŰú—KâéTKËĆ }c'a{73'Ÿ’X%9žȚžúêÿ@R9‘_æ €œ…S…ă鏗 ƒÓБń»]s+Sa”\rh'»ą.ê* ”֏1ćZTòQ”3Ö:­!ĆA»OW..7óčá\©ŃN2üœ(”$ÒœK„»KÔ?Z˜ȚŠŚ}ÀëôRìœ9żúhśÜB·?Țƒè]ìÎÂce‰±—é7ÂŁKűDB.¶æ«N·.ߝp]|!r“FNèsOÿđoČŸŒ‚ÒM«œëü€š«úúМîÊAÀJĘ)Žë<©ĄôȘÇńìçüĘú;$Œ'·4_űybFç{‚”Ș9{Sw_»Ę 6pX~¶Ó·á3št‘Š ’ˆłV+őH &–.:Ž€hŃ{eç,{sĘ.§¶Źă‹čc”Erɶ•çšô™ôóąx=žƒZ"ܘŻ1يșßÒùÆxHB4ŚG(AHŸ€eÄw >ÚŽa¶ŚÜ5Ső{HœEđ{ DÁž†ńä/·­[ę9IJ5ÆĐ’yŁQÜŒ€›*őá&«6¶‡E'ȚZ?5ë~Šß]ŠbTo2öîńCÄUÏȚ\\ ,±ĆȘĘ\HŻë>1Àq7©áŒR.RN̓Bˆ $żgT–·T]Ąß°ìÓț`Ü{đû4Ȋ]Tőƒśï“4  f*Mù[î}<6쏔ëÖòÂÊbƒG-”û6 ­šfüïXMÆ@1ˆ#(tŸèvӀhŸŽX@æêïKÁĆm#Ćtç31§+“­Șćtò<őâùüöŃ[­ôœŃˆ,-ÂśfÓ áÇûŠžœŐÙCíÆSńeƒđÚ[~Ă€—Ó-ińŽđ«œ"ęȘÇSځ*ŸșzÆŻGÁÆï€i­Bo+†ç}€A ”â'XęĂ)§ù0sì&`‹śËêçŁ$šŒŻąFQSŽ«áCÍLˆ[nGœi”cżòy,Ț—™^„„BûÍ( óčŠu%ÈrqÙ.šëó(N•è•ûÇÙ7§E·ÂjĐ`#xłq kmz UÿïDŁd|űÀmÆȘaŹŸ%”ÌÚ!Ő|Tfț@|Œ^ż=ê‘-̆Q8wżÒSòŒÆX’EhÁÛíÁ7p­»pĆGÊΐQj”Ú}ùJŒź4·Wn‡o „1…ăBÂuià°œ?ă2œĂL*†Đy/»àN€3{iä§O}„çżä\űkéÓĘŚmęŐêÿ:lpäÙ$śpJâ%<Ę(w85ÄśW9}m+MćńęJČöJW˜A [Âóßg* s)|„»6”QoìȚ†+üæN=—­KáùWà-VGąy0#¶Æ.vgÏ Ź ÚÌôEOÓôDÂrńà&'ヿ"’öj놆{$täÇȘv§[Y„.ß}œMȚƒ)NœuP»fčÁ€öâvŃœ–[ńk_ï]/VNô]ËW ‡(á$™„ć”M°IùŐ/*¶‰ß*qx,&–GÚ«»śűȘîŁÁk™'W .Űsœ!(î¶Èç’ęš ÙB{`(=DÍ Âÿh`o”<ÛCűS&!QAQ9uĘO,[Œ[lYÜ=Ć1TQæíb(œaÖՍk"eÀǟŁŰ(Š#ޱÂÁòę:‰UïĆȚUt=é @ Œ/'€„;=ü’ż›){Jń”áżÛ8I”“ÿ˜ĆˆŒhw{€đë“+Œv~‘Lé †Èç/N‘yLhEŐv“,[ăéĐ튕A|ÌŻÉœ?ŒŰFțÓW\ŸœxÊ¶ź”Š- lžëNoÂf‘ÓĄśRò· c ÒGuîű…VNvr°R^šOĐ șű1ŒÆá§x„|űD$ovÓńț–“{€ëÒH8Ttds€Űèă[ÈÈłb(Ö4ÛȚraj~ú©!fćŒ Òțn)KŸć5 ëqżsńł ȚęŽg9ÿśżśșOžîO%3›gÒî;‘ÁSC?.­ű(żȚ'JœȘVX§Ú±`žŠÌç2FšyŁ ANÔțæ©«‘Ó“Oꀐ±€7+#ĂÎ;žđțC„5Ößdy‘6Æ] “ʶ6ž€©ß˜‚ën‰xB@mI’9ŁtLFjUŻŽŚšžÜƒŹ42š6èœæ7œŽóÚNÊGQ#eHš>{rĆÂçegĘŁ€ć[[8ZȚ2Bˆv›ì˜ź­Ó ;ô Śb™đ"wGœń(qEëàúș&±‚Ç"7íĘëmbÙżâBž zw^ +Ž8ÎdŸ~őBY9Ï'ś ©OŃcI†œBșAŒș­¶ïąú8ÜN©òT­@1śŰŐćôPÈÏWÒęĘßz2Ž~T\w}/4ÒLEȚ>íżčęê@]y~WëvęgßBŽčžôő^à1!JÁŸÈKÌá$ę•ûweˆbđùS-XÓœö#ÜKĐÒUËć;qu.hü°Ź1»„©Ö,gPÔNä „!ú,4NI_aܔÆ@nۏąûP3Őł—#Ê4…"KBÀ… '¶Ò·ôęKœÇ@ÿ2ȚKàÿÓôf› ÌXćfƒŚHg™!Ż,†ĄÁ©k…c=Z™čœ”đ“švüêšò‰ŃfTzëyBgŽK7ŰŻ M%yYöjšD ‚ÌeOűTNHLVT-žđ9ìf›m™ó{ô1»ŠÓ(>wœlùR© &+ê*@@ ?Dš «§Ò‹ÊLł«$đr']ÒA=Íw#žN?Í"v8ĄeÍXŽ[„ ifšn9"%1à4ț9" ”í–éÉĄQíK– ąÎŒ›»ŽĘ>ëÈ7“€N uWPˆőDË6ÌâŰ:ÄڀkÏ Șk»3;ÆUPn±țŻš7›°ÛÒ|CîkŸn çŒêÔCűńoTĆgIčűêȘrôWŽŠ™Żłn-ÓvŻT“M‰xß{{”DàßcV*˝Ž] -lŃŸlÿ~݃<6#g]ÇÉŽNV|a\­K?fh֍Ű9 Û vb3ƒű{ћaäìTù6ö€ˆ“`Čïș€Ndc&śÆtź‹ HhPđCƒł ärus…uŒ?ܶ ‹ gŒ–úfŠźÀ&‰ÎûŚ#@t">ž1rD*Œt°ÔpôÌŒæW_Öp‰sZ?bíqhÜ8­TĄż~ûx‰6ŸyœÈùa&ïu6€‹O!È+|’ÆÈęńŽw‹í’ƒòzܜ.ˆŽÆV›Ó’‹xê?`SĆ@ ßăTÄ9”©2EŚYR œS*+‚I%e”gÿiùEŠŽŽïÄž§ŒÄ)“KԞƒ̈HÌLE„pÂe”‘š·Î31pčŠ0ș{bö̶Évț?`đ ôžìșU  Zu•L“y ”â”FŸö*żT.hFè䀔ÛrŽȘv#‘Ò)'$|”ęz$‘©ˆ ĂæôŚÊß r·č1ß©ÉÊOŠAt„6ĘN\vÒùąw“}kĆu–S4ÚIÈjčGæ>áZêù1\&śOč˜č•7„ßÉ?U ±mŽSÙ?`Qž:’5sÄæ±ąëćTœÙ%ÊCŒiA`y=‘Ö”aÔf(–=Ƨ ÍPé(ŹČęB ÀkZ{5ˆhC9\ühŰőÔI–HŸ€ŒÍWY+›qÿ‰HÒŒˆȘCȚZ‡†eŹűy îÙŻûȘ\Ì„kűc“Ń­ÛÈàOύU<0ԞűPoÓćć% L#jăčŸșĐ\„›Q‡öÚvî)ˆwk‹”=K)†ùș°ăȘp]fOÄc©<ŁK }őuğ@ą- ópłÀü~ck&ƒò°G«v†Lč6M»&XfP3“ć đZîŃ[üi9aĄ|óĂăÿùŐŃB˜hˆr5Q™6ö†íÿ„VȘĂoّÛ?N)ŒƒoiìćC«*4{ƒ“^ś°–Ń/C Čüč«WË ŸžÈ -î&:ú]àI‡m=áJFÍ€›?whMł; c‚QBÛÀg‰5ì Ă ű”Î3U:ĘâP~{wí†Âőc„#«ÙOÎè˜g±à—Ś3™«=ÈbèŒSmÏŰ;”ț(†mjŽ›V6 -xŃ~ewÌđ€łÎô·ŰˆN€<LâșŐæYu‡jV|ÍWțÁ3»q7qțâGjțWCˆ%mc%FZŁ<ŽđRD@Švp\æł€œ4i"©;™—Ęà.oÙŸźWá!m€Œ‡âŸôVQ(Œ4Ęcj(qr\€n$Qź~Űó. ßÿ}!OX/ îś@ÔŽ„»hŠ_Áx?ŒŸBòŰò:ś[ ȘÁ㙄źáU:Êê•ź­ïúĘmcšáĂÚnx‘—=e Ę„ôœ™ńqBç N±h#.‹űž±‰Òîh\Ń­€Üq°„Y±PȘÂă'Ă &vŠ™ÖÏ5•‘gjńڃ’oCúșŻT‘V^ì ÉŹË#æ~çĄó`ț †ÇŚűĆȚ ÚA„ń)Ű.&Ä&@ć«•á‚ă üöô˜‚˜$<ž•ÁW»­J4ä$DۆW9Ít *‹Ki3 Ȝ2ûKD8áȚ4€GëmN°Vk˜€Ű*ÏŁ·3&rnœłaĄ5ŽÓ„·—CšÉWsź0Ąˆ&gw…ߌ»z&cŰ»œæß\~†Ž?5u~â]xRŽ«ę&ù¶Kwę §4ü˜Î‰Â %űXnçȚŠ»mȚdôÏiżŸ…k›mQúáń äÀÒ*?w­ÙŠu  Cÿ:jÄx Ibź8žx@çpÉŻÆaê†.Gu§ęÿ 6šœïîïż š7[T?]Zÿ\ŽŹˆt9Ś`””†ŹÛ~œ€8ûVâ‰`LUœ ”6žš,à.òöÒàČŽȚâĆ4pŒˆOŻcmssC Zc/ś?i{eœŸ‹|€p4ŒïÚń&~ŒĂ€ëiîûóI)[pęg烝7ÿȚ„üÜ1h)ń}XQR}žŰ•™2ÙíĐŰJÉ/"űWÒN ö'=Ÿę»uŒ ±ŐlÀđËà°Î3rì*©ACšw O3Ś;n—öô€•‘ÆjŹeakžÏA:5zlfû§;úkÔ~ĔŃR»]„F;$_”đ:6dŸdÌŁúméȘ}ymFŁvšûœpÏ™­˜Xć[çŸjŠ3Y Lò'_Ł”ÂhXg€ć!ŠHÒ8ą)RsÌ#šÎșP2źiHb;Ń)'Kœüwä/șUXFjă«„3'ĘńČ9€K(æ}JÆCă(!ŠV-­ ^È ÖpMÛo€ˆ›1ȚŸŁ//}·†.§űț%eÎêN> \šħËFÏòHŻĘh;ŠĆó'ńŚf§9v'ŚŃcLœ>3„n8ës%“Úy'Q@7‹ÊÏ>7XĄKa'ÙŸG#•)8DčBÏÀțdĘöŸőž òQ»„i„d§±’Ÿ»ÁțČęWä c‡"†$V€) “hź'ÍŽŻ4јC9áöF,łƒuÎ)ä́Í|TZ:ömĆ}ahI­gą€ÔЊ©Š ŠòűUëLŚ7mżcq6OŁÊ7oé/ώ”ŰĆpassenger-4.0.37/test/stub/http_request.yml000644 000765 000024 00000001555 12233035540 021430 0ustar00honglistaff000000 000000 --- SERVER_NAME: rails.test HTTP_ACCEPT_ENCODING: gzip,deflate HTTP_USER_AGENT: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b3pre) Gecko/2008020507 Firefox/3.0b3pre HTTP_CACHE_CONTROL: max-age=0 HTTP_IF_NONE_MATCH: "\"4b3ecee644e12a7a2203be7484eaecfc\"" HTTP_ACCEPT_LANGUAGE: en-us,en;q=0.5 HTTP_HOST: rails.test SERVER_ADDR: 127.0.0.1 SERVER_PROTOCOL: HTTP/1.1 HTTP_KEEP_ALIVE: "300" REMOTE_ADDR: 127.0.0.1 SERVER_SOFTWARE: Apache/2.2.4 (Ubuntu) mod_fastcgi/2.4.2 PHP/5.2.3-1ubuntu6.3 mod_ssl/2.2.4 OpenSSL/0.9.8e Phusion_Passenger/0.9.6 HTTP_ACCEPT_CHARSET: ISO-8859-1,utf-8;q=0.7,*;q=0.7 DOCUMENT_ROOT: /var/www/projects/app1-foobar/public REQUEST_URI: / SERVER_PORT: "80" QUERY_STRING: "" REMOTE_PORT: "36128" SERVER_ADMIN: "[no address given]" HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_CONNECTION: keep-alive REQUEST_METHOD: GET passenger-4.0.37/test/stub/index.html000644 000765 000024 00000000033 12233035540 020141 0ustar00honglistaff000000 000000 This is the stub directory.passenger-4.0.37/test/stub/nginx/000755 000765 000024 00000000000 12233035540 017273 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/node/000755 000765 000024 00000000000 12233035540 017075 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rack/000755 000765 000024 00000000000 12233035540 017070 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/000755 000765 000024 00000000000 12233035540 017505 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/000755 000765 000024 00000000000 12233035540 021004 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/000755 000765 000024 00000000000 12233035540 017503 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/000755 000765 000024 00000000000 12233035540 017504 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/000755 000765 000024 00000000000 12233035540 017505 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/000755 000765 000024 00000000000 12233035540 017504 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/start_error.pl000644 000765 000024 00000000777 12233035540 021066 0ustar00honglistaff000000 000000 #!/usr/bin/env perl use strict; use IO::Handle; STDOUT->autoflush(1); STDERR->autoflush(1); print("!> I have control 1.0\n"); die("Invalid initialization header") if ( ne "You have control 1.0\n"); my %options = {}; while ((my $line = ) ne "\n") { $line =~ s/\n//; my ($name, $value) = split(/: */, $line, 2); $options{$name} = $value; } print("!> Error\n"); print("!> \n"); if ($ARGV[0] eq 'freeze') { sleep(1000); } else { print("He's dead, Jim!\n"); print("Relax, I'm a doctor.\n"); } passenger-4.0.37/test/stub/upload_data.txt000644 000765 000024 00000041362 12233035540 021174 0ustar00honglistaff000000 000000 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9b3pre) Gecko/2008020507 Firefox/3.0b3pre Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Connection: close Content-Type: multipart/form-data; boundary=---------------------------26241117115281305981065436208 Content-Length: 16817 -----------------------------26241117115281305981065436208 Content-Disposition: form-data; name="uploaded_data"; filename="calendar_entries_controller.php" Content-Type: application/x-php before_filter(array('reject_anonymous_user'), array('only' => array('new_calendar_entry', 'create', 'edit', 'update', 'destroy', 'update_time', 'participate', 'unparticipate')) ); $this->before_filter('set_section'); } public function index() { $this->redirect_to("/calendar_entries/show_by_week"); } public function new_calendar_entry() { } public function create() { if (!isset($this->params['calendar_entry'])) { return; } $this->variables->calendar_entry = $calendar_entry = new CalendarEntry(); $calendar_entry->user_id = $this->current_user->id; $calendar_entry->assign($this->params['calendar_entry']); if($calendar_entry->is_valid()) { $calendar_entry->convert_to_database_types(); $calendar_entry->save(); if (isset($this->params['attending']) && $this->params['attending'] == 'yes') { $event = new Event(); $event->calendar_entry_id = $calendar_entry->id; $event->user_id = $this->current_user->id; $event->date = $calendar_entry->starting_date; $event->save(); } $this->redirect_to("/calendar_entries"); } else { $this->render(array('action' => 'new_calendar_entry')); } } public function show_by_week() { if (!isset($this->params['year']) || !isset($this->params['week'])) { $year = strftime("%Y"); $week = strftime("%V"); } else { $year = (int)$this->params['year']; $week = (int)$this->params['week']; } if ($week < 0 || $week > 52) { die("Invalid date."); } $personal = (isset($this->params['personal']) && $this->params['personal']) ? true : false; $start_date = strtotime("+" . ($week - 1) . " weeks", mktime(0, 0, 0, 1, 1, $year)); $CalendarEntry = $this->CalendarEntry; if ($personal && !is_null($this->current_user)) { $conditions = array('DATE(ending_date) >= ? AND DATE(starting_date) < ? AND user_id = ?', strftime("%Y-%m-%d", $start_date), strftime("%Y-%m-%d", $start_date + 7 * 60 * 60 * 24), $this->current_user->id ); } else { $conditions = array('DATE(ending_date) >= ? AND DATE(starting_date) < ?', strftime("%Y-%m-%d", $start_date), strftime("%Y-%m-%d", $start_date + 7 * 60 * 60 * 24) ); } if (is_null($this->current_user)) { $conditions[0] .= ' AND public'; } else { $conditions[0] .= ' AND (public OR user_id = ?)'; $conditions[] = $this->current_user->id; } $calendar_entries = $CalendarEntry->find('all', array('conditions' => $conditions, 'order' => 'starting_date ASC' ) ); $this->variables->today = $start_date; $this->variables->year = $year; $this->variables->week = $week; $this->variables->calendar_entries = $calendar_entries; if ($week == 52) { $next_week = 1; $next_week_url = "/calendar_entries/show_by_week?year=" . ($year + 1) . "&week=1"; } else { $next_week = $week + 1; $next_week_url = "/calendar_entries/show_by_week?year=$year&week=" . $next_week; } if ($week == 1) { $last_week = 52; $last_week_url = "/calendar_entries/show_by_week?year=" . ($year - 1) . "&week=52"; } else { $last_week = $week - 1; $last_week_url = "/calendar_entries/show_by_week?year=$year&week=" . $last_week; } $next_week_url .= "&personal=$personal"; $last_week_url .= "&personal=$personal"; $args = strftime("year=%Y&month=%m&day=%e&personal=$personal", $start_date); $day_view_url = "/calendar_entries/show_by_date?$args"; $personal_or_shared_calendar = $personal ? "View shared calendar" : "View personal calendar"; $personal_or_shared_calendar_url = "/calendar_entries/show_by_week?year=$year&week=$week&personal=" . (!$personal); $this->variables->week_start = $start_date; $this->variables->next_week = $next_week; $this->variables->next_week_url = $next_week_url; $this->variables->last_week = $last_week; $this->variables->last_week_url = $last_week_url; $this->variables->day_view_url = $day_view_url; $this->variables->personal = $personal; $this->variables->personal_or_shared_calendar = $personal_or_shared_calendar; $this->variables->personal_or_shared_calendar_url = $personal_or_shared_calendar_url; } public function show_by_date() { $year = (int)$this->params['year']; $month = (int)$this->params['month']; $day = (int)$this->params['day']; $personal = (isset($this->params['personal']) && $this->params['personal']) ? true : false; if(checkdate($month, $day, $year)) { $date = mktime(0, 0, 0, $month, $day, $year); $CalendarEntry = $this->CalendarEntry; if ($personal && !is_null($this->current_user)) { $conditions = array( '? BETWEEN DATE(starting_date) AND DATE(ending_date) AND user_id = ?', strftime("%Y-%m-%d", $date), $this->current_user->id ); } else { $conditions = array( '? BETWEEN DATE(starting_date) AND DATE(ending_date)', strftime("%Y-%m-%d", $date) ); } if (is_null($this->current_user)) { $conditions[0] .= ' AND public'; } else { $conditions[0] .= ' AND (public OR user_id = ?)'; $conditions[] = $this->current_user->id; } $this->variables->calendar_entries = $CalendarEntry->find('all', array('conditions' => $conditions, 'order' => 'starting_date ASC' ) ); $this->variables->date = $date; $prev_timestamp = $date - 60 * 60 * 24; $prev_date = getdate($prev_timestamp); $this->variables->prev_timestamp = $prev_timestamp; $this->variables->prev_url = sprintf('/calendar_entries/show_by_date?year=%d&month=%d&day=%d&personal=%s', $prev_date['year'], $prev_date['mon'], $prev_date['mday'], $personal); $next_timestamp = $date + 60 * 60 * 24; $next_date = getdate($next_timestamp); $this->variables->next_timestamp = $next_timestamp; $this->variables->next_url = sprintf('/calendar_entries/show_by_date?year=%d&month=%d&day=%d&personal=%s', $next_date['year'], $next_date['mon'], $next_date['mday'], $personal); $year = strftime("%Y", $date); $week = strftime("%V", $date); $week_view_url = "/calendar_entries/show_by_week?year=$year&week=$week&personal=$personal"; $this->variables->year = $year; $this->variables->week = $week; $this->variables->week_view_url = $week_view_url; $personal_or_shared_calendar = $personal ? "View shared calendar" : "View personal calendar"; $personal_or_shared_calendar_url = "/calendar_entries/show_by_date?year=$year&month=$month&day=$day&personal=" . (!$personal); $this->variables->personal = $personal; $this->variables->personal_or_shared_calendar = $personal_or_shared_calendar; $this->variables->personal_or_shared_calendar_url = $personal_or_shared_calendar_url; } else { die("Invalid date"); } } public function show() { $id = (int)$this->params['id']; $CalendarEntry = $this->CalendarEntry; $calendar_entry = $CalendarEntry->find_by_id($id); if (!$calendar_entry->may_be_viewed_by($this->current_user)) { die("You have no permission to view this page."); } $this->variables->calendar_entry = $calendar_entry; if (!is_null($calendar_entry)) { $this->variables->participants = $calendar_entry->get_participants(); } } public function edit() { $id = (int)$this->params['id']; $CalendarEntry = $this->CalendarEntry; $calendar_entry = $CalendarEntry->find_by_id($id); if (is_null($calendar_entry)) { die("Calendar entry #" . htmlspecialchars($id) . " not found!"); } if ($calendar_entry->user_id != $this->current_user->id) { die("You are not allowed to edit this calendar entry."); } $calendar_entry->convert_from_database_types(); if ($calendar_entry->has_started()) { die("Cannot edit an event that has already started."); } $this->variables->calendar_entry = $calendar_entry; } public function update() { if (!isset($this->params['calendar_entry'])) { return; } $id = (int)$this->params['id']; $CalendarEntry = $this->CalendarEntry; $calendar_entry = $CalendarEntry->find_by_id($id); if (is_null($calendar_entry)) { die("Calendar entry #" . htmlspecialchars($id) . " not found!"); } if ($calendar_entry->user_id != $this->current_user->id) { die("You are not allowed to edit this calendar entry."); } if ($calendar_entry->has_started()) { die("Cannot edit an event that has already started."); } $calendar_entry->assign($this->params['calendar_entry']); if (!isset($this->params['calendar_entry']['public'])) { $calendar_entry->public = false; } if ($calendar_entry->is_valid()) { $calendar_entry->convert_to_database_types(); $calendar_entry->save(); $this->redirect_to('/calendar_entries'); } else { $this->variables->calendar_entry = $calendar_entry; $this->render(array('action' => 'edit')); } } public function update_time() { $id = (int)$this->params['id']; $CalendarEntry = $this->CalendarEntry; $calendar_entry = $CalendarEntry->find_by_id($id); if (is_null($calendar_entry)) { die("Calendar entry #" . htmlspecialchars($id) . " not found!"); } if ($calendar_entry->user_id != $this->current_user->id) { die("You are not allowed to edit this calendar entry."); } if ($calendar_entry->has_started()) { die("Cannot edit an event that has already started."); } $calendar_entry->convert_from_database_types(); if ($this->params['type'] == 'start') { $calendar_entry->starting_time['hour'] = $this->params['value']; } else { $calendar_entry->ending_time['hour'] = $this->params['value']; } if ($calendar_entry->is_valid()) { $calendar_entry->convert_to_database_types(); $calendar_entry->save(); require_once($_ENV['PHOTON_ROOT'] . "/app/helpers/application_helper.php"); if ($this->params['type'] == 'start') { echo 'ok ' . human_datetime($calendar_entry->starting_date); } else { echo 'ok ' . human_datetime($calendar_entry->ending_date); } exit; } else { $this->variables->calendar_entry = $calendar_entry; echo 'error'; } } public function update_date() { $id = (int)$this->params['id']; $CalendarEntry = $this->CalendarEntry; $calendar_entry = $CalendarEntry->find_by_id($id); if (is_null($calendar_entry)) { die("Calendar entry #" . htmlspecialchars($id) . " not found!"); } if ($calendar_entry->user_id != $this->current_user->id) { die("You are not allowed to edit this calendar entry."); } if ($calendar_entry->has_started()) { die("Cannot edit an event that has already started."); } $calendar_entry->convert_from_database_types(); if ($this->params['type'] == 'start') { $calendar_entry->starting_date = $this->params['value']; } else { $calendar_entry->ending_date = $this->params['value']; } if ($calendar_entry->is_valid()) { $calendar_entry->convert_to_database_types(); $calendar_entry->save(); require_once($_ENV['PHOTON_ROOT'] . "/app/helpers/application_helper.php"); if ($this->params['type'] == 'start') { echo 'ok ' . strftime("%B %e, %Y", $calendar_entry->starting_date); } else { echo 'ok ' . strftime("%B %e, %Y", $calendar_entry->ending_date); } exit; } else { $this->variables->calendar_entry = $calendar_entry; echo 'error'; } } public function destroy() { $id = (int)$this->params['id']; $CalendarEntry = $this->CalendarEntry; $calendar_entry = $CalendarEntry->find_by_id($id); if (is_null($calendar_entry)) { die("Calendar entry #" . htmlspecialchars($id) . " not found!"); } if ($calendar_entry->user_id != $this->current_user->id) { die("You are not allowed to delete this calendar entry."); } if ($calendar_entry->has_started()) { die("Cannot delete an event that has already started."); } $calendar_entry->delete(); $this->redirect_to('/calendar_entries'); } public function participate() { $id = (int)$this->params['id']; $day = (int)$this->params['day']; $CalendarEntry = $this->CalendarEntry; $calendar_entry = $CalendarEntry->find_by_id($id); if (is_null($calendar_entry)) { die("Calendar entry #" . htmlspecialchars($id) . " not found!"); } if ($calendar_entry->has_started()) { die("Cannot participate in an event that has already started."); } if (!$calendar_entry->may_be_viewed_by($this->current_user)) { die("You have no permission to view this page."); } if (!$calendar_entry->is_attended_by($this->current_user, $day)) { $event = new Event(); $event->user_id = $this->current_user->id; $event->calendar_entry_id = $id; $event->date = $day; $event->save(); } $this->redirect_to("/calendar_entries/show/$id"); } public function unparticipate() { $id = (int)$this->params['id']; $CalendarEntry = $this->CalendarEntry; $calendar_entry = $CalendarEntry->find_by_id($id); if (is_null($calendar_entry)) { die("Calendar entry #" . htmlspecialchars($id) . " not found!"); } if ($calendar_entry->has_started()) { die("Cannot participate in an event that has already started."); } if (!$calendar_entry->may_be_viewed_by($this->current_user)) { die("You have no permission to view this page."); } if (isset($this->params['day'])) { $day = (int)$this->params['day']; if ($calendar_entry->is_attended_by($this->current_user, $day)) { $event = $this->Event->find('first', array( 'conditions' => array('user_id' => $this->current_user->id, 'calendar_entry_id' => $id, 'date' => $day) )); if (!is_null($event)) { $event->delete(); } } } else { $events = $this->Event->find('all', array( 'conditions' => array('user_id' => $this->current_user->id, 'calendar_entry_id' => $id) )); foreach ($events as $event) { $event->delete(); } } $this->redirect_to("/calendar_entries/show/$id"); } protected function set_section() { $this->variables->section = 'events'; } public function export_xml() { $calendar_entries = $this->CalendarEntry->find('all', array( 'conditions' => array('ending_date > NOW() AND public'), 'order' => 'starting_date DESC', 'limit' => 10 ) ); header("Content-Type: application/xml"); $xml = new XMLWriter(); $xml->openMemory(); $xml->startDocument("1.0", "UTF-8"); $xml->startElement('CALENDARFEED'); $xml->startElement('FEEDDESCRIPTION'); $xml->startElement('FEEDTITLE'); $xml->startAttribute('UPDATE'); $xml->text($calendar_entries[0]->xml_starting_time() . " " . $calendar_entries[0]->xml_starting_date()); $xml->endAttribute(); $xml->text('iVent Beta: Upcoming Public Events'); $xml->endElement(); $xml->startElement('TAGLINE'); $xml->text('Calendaring Made Easy'); $xml->endElement(); $xml->startElement('FEEDOWNER'); $xml->text('Hongli Lai and Ninh Bui'); $xml->endElement(); $xml->startElement('URL'); $xml->text('http://www.ivent.beta/exportxml.php'); $xml->endElement(); $xml->endElement(); foreach ($calendar_entries as $event) { $xml->startElement('EVENT'); $xml->startElement('EVENTTITLE'); $xml->text($event->title); $xml->endElement(); if ($event->description !== "") { $xml->startElement('EVENTDESCRIPTION'); $xml->text($event->description); $xml->endElement(); } $xml->startElement('LOCATION'); $xml->text($event->location); $xml->endElement(); $xml->startElement('EVENTOWNER'); $xml->text($event->get_owner()->username); $xml->endElement(); $xml->startElement('DATEINFO'); $xml->startElement('STARTDATE'); $xml->text($event->xml_starting_date()); $xml->endElement(); $xml->startElement('STARTTIME'); $xml->text($event->xml_starting_time()); $xml->endElement(); $xml->startElement('ENDDATE'); $xml->text($event->xml_ending_date()); $xml->endElement(); $xml->startElement('ENDTIME'); $xml->text($event->xml_ending_time()); $xml->endElement(); $xml->endElement(); $attendees = $event->get_participants(); if (!empty($attendees)) { $xml->startElement('ATTENDEES'); foreach($attendees as $attendee) { $xml->startElement('ATTENDEE'); $xml->text($attendee->username); $xml->endElement(); } $xml->endElement(); } /* $xml->startElement(''); $xml->text(); $xml->endElement(); */ $xml->endElement(); } $xml->endElement(); $xml->endDocument(); echo $xml->flush(); exit; } } ?> -----------------------------26241117115281305981065436208-- passenger-4.0.37/test/stub/vendor_rails/000755 000765 000024 00000000000 12233035540 020637 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/wsgi/000755 000765 000024 00000000000 12233035540 017121 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/zsfa/000755 000765 000024 00000000000 12233035540 017113 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/zsfa/header.png000644 000765 000024 00000112656 12233035540 021064 0ustar00honglistaff000000 000000 ‰PNG  IHDRąȈúŸ pHYs  šœ OiCCPPhotoshop ICC profilexڝSgTSé=śȚôBKˆ€”KoR RB‹€‘&*! Jˆ!ĄÙQÁEEÈ ˆŽŽ€ŒQ, Š Űä!ąŽƒŁˆŠÊûá{ŁkÖŒśæÍț”Ś>çŹółÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $płd!sę#ű~<<+"ÀŸxÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽBŠ@F€˜&S `ËcbăP-`'æÓ€ű™{[”! ‘ eˆDh;ŹÏVŠEX0fKÄ9Ű-0IWfH°·ÀÎ Č 0Qˆ…){`È##x„™FòW<ń+źç*x™Č<č$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóęxÎźÎÎ6޶_-êżÿ"bbățćÏ«p@át~Ńț,/ł€;€mțą%îh^  uś‹fČ@” éÚWópű~<ß5°j>{‘-š]cöK'XtÀâśò»oÁÔ(€hƒáÏwÿï?ęG %€fI’q^D$.TÊł?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)Ź‚B(†Í°*`/Ô@4ÀQh†“p.ÂUž=púažÁ(Œ AÈa!ڈbŠX#Ž™…ű!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fș‘;È2‚ü†ŒG1”ČQ=Ô ”Cčš7„Fą Đdt1š ›ĐrŽ=Œ6ĄçĐ«hڏ>CÇ0Àè3Äl0.ÆĂB±8, “c˱"Ź «Æ°VŹ»‰őcϱwEÀ 6wB aAHXLXNŰHš $4Ú 7 „QÂ'"“šKŽ&șùÄb21‡XH,#֏/{ˆCÄ7$‰C2'čI±€TÒÒFÒnR#é,©›4H#“ÉÚdkČ9”, +ȅääĂä3ää!ò[ b@q€űSâ(RÊjJćć4će˜2AUٚRĘšĄT5ZB­Ą¶RŻQ‡š4uš9̓IK„­ą•ÓhhśiŻètșʕN—ĐWÒËéGè—èôw †ƒÇˆg(›gwݘLŠӋÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ȘŠȘȚȘ UóUËT©^S}źFU3Să© Ô–«UȘPëSSg©;š‡ȘgšoT?€~Yę‰YĂLĂOC€Q ±_ăŒÆ cłx,!k «†u5Ä&±ÍÙ|v*»˜ę»‹=Ș©Ą9C3J3WłRó”f?ă˜qűœtN ç(§—ó~ŠȚï)â)Š4Lč1e\kȘ–—–X«H«Q«Gëœ6źí§ŠœE»YûAÇJ'\'GgÎçSÙSʧ §M=:őź.Șk„Ą»Dwżn§î˜žŸ^€žLo§Țyœçú}/ęTęmú§őG Xł $Û Î<Ć5qo</ÇÛńQC]Ă@C„a•a—á„‘čŃ<ŁŐFFŒiÆ\ă$ămÆmÆŁ&&!&KMêMîšRMčŠ)Š;L;LÇÍÌÍąÍ֙5›=1Ś2ç›ç›Ś›ß·`ZxZ,¶š¶žeIČäZŠYî¶Œn…Z9Y„XUZ]łF­­%Ö»­»§§čN“N«žÖgðń¶É¶©·°ćŰÛź¶m¶}agbg·ĆźĂ“}ș}ę= ‡Ù«Z~sŽr:V:ȚšÎœî?}Ćô–é/gXÏÏŰ3ă¶Ë)ÄiS›ÓGggčsƒóˆ‹‰K‚Ë.—>.›ÆĘÈœäJtőq]ázÒő›ł›ÂíšÛŻî6îiî‡ÜŸÌ4Ÿ)žY3sĐĂÈCàQćŃ? Ÿ•0kߏ~OCOg”ç#/c/‘W­Ś°·„wȘśaï>ö>rŸă>ă<7Ț2ȚY_Ì7À·È·ËOĂož_…ßC#ÿdÿzÿѧ€%g‰A[ûűz|!żŽ?:ÛeöČÙíAŒ čAA‚­‚ćÁ­!hÈ쐭!śç˜Î‘Îi…P~èÖĐaæa‹Ă~ '…‡…W†?ŽpˆXŃ1—5wŃÜCsßDúD–DȚ›g1O9Ż-J5*>Ș.j<Ú7ș4ș?Æ.fYÌŐXXIlK9.*ź6nlŸßüíó‡ââ ă{˜/È]pyĄÎÂô…§©.,:–@LˆN8”đA*šŒ%òw%Ž yÂÂg"/Ń6шŰC\*NòH*Mz’쑌5y$Ć3„,ćč„'©ŒL Lʛ:žšv m2=:œ1ƒ’‘qBȘ!M“¶gêgæfvËŹe…ČțĆn‹·/•ÉkłŹY- ¶BŠèTZ(Ś*ČgeWfżÍ‰Ê9–«ž+ÍíÌłÊې7œïŸÿíÂᒶ„†KW-XæœŹj9Č‰ŠźÛ—Ű(Üxć‡oÊż™Ü”Ž©«ÄčdÏfÒféæȚ-ž[–Ș—æ—n ÙÚŽ ßVŽíőöEÛ/—Í(Û»ƒ¶C裿<žŒe§ÉÎÍ;?T€TôTúT6îÒĘ”aŚűnŃî{Œö4ìŐÛ[Œśę>ÉŸÛUUMŐfŐeûIûłś?ź‰Șéű–ûm]­NmqíÇÒę#¶ŚčÔŐÒ=TRÖ+ëGÇŸțïw- 6 UœÆâ#pDyäéś ßś :ÚvŒ{ŹáÓvg/jBšòšF›Sšû[b[șOÌ>ŃÖêȚzüGÛœ499â?ręéü§CÏdÏ&žțąțËź/~űŐëŚÎјѥ—ò—“żm|„ęêÀëŻÛÆÂÆŸÉx31^ôVûíÁwÜwïŁßOä| (ÿhù±őSЧû“““ÿ˜óüc3-Û cHRMz%€ƒùÿ€éu0ê`:˜o’_ĆFPLTEÿÿÿGGGÿśÿü ''&ÿùÿöçȚțöüôûóđéÿöùńöîÒËŸžôíÿśîçâÛèá§Ą‘€|ÇÁ ÜÖ a^ŚŃplÒÌ! ÿśÊÄŸžČ­„ "š–&‰†)wu3_^:ÿôÿńőçB?țóÿó 1/RO ÿö)ÿś;?=ÿöiXV&jh9CB1ML9VUAÿíúéőâÿìóáÿîÿńGÿôXîä^ëádÿű€ÿù«ÿùłđêšûöŽçâšÜŚ „`ŸŽÿúœ:9+qoTśóŸßÛ«ÊÇ›ŻŹˆÿûÇÿüÒÿüÛÿęăÿțđÿćÿéÿæțè ÿè$ÿë5žTÿńzÿ󇐊Rÿö—óí±–“tìçždbOwu`ûűÙÿęéÿâÿȚÿáÿăÿìjÿïrúí‡NMEÿÚéĆÿÚÿÛ ÿȚÿß,ÿćSÿçXÿé]ÿêbÿÖűĐÿÔÿßCÿâLÿŃÿÍÿÍÿÓÿÔ ÿÙ9ÿÛ=ÿÉÿÊÿËÿÏ*ÿÒ-ÿŐ3ÿĆÿÂÿĆÿĂÿĆÿË%ÿŸÿ»ÿŸ ÿÂÿÇ!ÿ¶ÿčÿ¶ÿžÿŸÿČÿźÿ±ÿŻÿŽ ÿłÿčÿ©ÿ­ ÿźJIGÿąÿ„ÿ„ÿ©ÿš ÿ« ÿÿŸÿąÿ„ ÿ™ÿšÿžDB?ÿ•ÿ’ÿ’ÿ”ÿŽÿŽÿ…ÿ‰ÿÿÿ‚ÿxÿ}ÿ{ÿyÿzÿ|ÿsÿvÿtÿwÿpÿlÿdÿ[ÿSÿLÿHÿCÿ?ÿ7ÿ;ÿ3ÿ/ÿ*ÿ$ÿ!ÿÿÿÿÿÿÿ ÿGEE322/..+**<;;766DCC`__FFFEEECCCAAA>>>:::""" ÿÿÿS!·ˆtRNSÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSś%†ÁIDATxÚìęy|Ś}à‹~Ouwu7îÆF$@báÉąžŠäE6%ْ„86ćxL>;‰ǚ\R/“pȈ =R–Ą=sMȚÏ”“XqìM'ŽŚÄČ-oIQ€DË HHlœoŐ]uîŐKuŁ»Rʍ_ž ”HT:uÎïœßŸĄđ:^óőšȘûH‘±æüƒ9ŁA±™ˆê㗦/Ż_šËțúuòă¶čt™aźQd:ßyTóŰlŠĄÇlżÄ_^ÿ~‘ ’ŒÇì2“lÊuȘGšˆ[ƒPÀ˜w‹Æ_‚ü—Śż_$hŠËŠ[Sp€Ę.êP€ ¶æ_Âû—Śżg$iölŠü@Ò °àRìÙŹZ ù đ_^ÿ‘ äBJÚOž%wË«ű襞l6 …ŒžmQÿKpÿòúEŒÄk¶Će}X4EŠŠ5˜wbȘ0ÒB °Fê—đËëśzíRĂNZM:0rwÒ@±Ûł+Š­ž3±H"ńKˆÿòúwÈ "jŒȚŠ$ꁐ=á7Հ`wŠĐmz=Ś‘‰–ÿwæ”a.èő:í/ȚŠČ: űč”w_Ï>~yęÿ ÄT‘ï$P5ĘôЁžlˆ;ì ùeTz…śșÓh V_yÇ.”c6MGToKn« Yì/úéšNšżÒ|òæöï…wouż}ŒÎWOÒ=șdŁĘŁQ-à”q cȚ-Ÿłi:^ŻÓ”žȚ[©y2Ù°ÜŹPl»ùĆ@‚ˆĘeù-kŚmæżt#nw8Á֋ŹÖUœdĄ]W4ˎčPĄÉ‰Ă—2ä·?•›/„Ąjßß›âù#KôûdÖqŸôVxçE.z&ăŒ5ś=ŻwòfarË}œ8œ E=Ț+7śč‡g‚ÖßUoÏbŽïƒ–íʆ‚ «ÎWîȘy+œ…ă|ĆA*żr4śËƑÜÍ?ŸąčŚäaì‹›;pyÛËÇsâ/ȘÍž° žźĐæ¶=rô Bé@e“žÍ(Șą`dDŒ¶‹,Œuüû&ăüő€ ę +Ț:țíÛł— ŚÈ\$ŻŚIÉ2…w^üäÎ=ûț°)wïóïÍïDg9&4Dqt•~íîóÁïo(ŒË[¶›Ć‚[êăÄál$–%ŽŹŒ™Ïí>”ű^ÀO)„đEÎ꜁–†HLŚ€†0Đw1æipœ‡Cÿ”5›î~Y›°‡f €Ÿë/T HdűíB»ąŠÎoêïżŁ5‡œa?S3čĄv?š«s/FŽzêŽkțŻ asu>œyžț‰ÿ;1dŸÊšĆkSÎÿÂq‚€Đ ĂYț ­’Š™Źw șču<żefƒœ{GW9ç wÏżÚTűm6瞰PŹæ?Ę[ȚSé54ašjf ^=őÉÍś·Ì”4mę䣄Źn“»Ÿáæ$Ș›ïcś\2š"ßV;ăÏ xÛČéűČBÏŐÿőFëï™?¶P ^›ęEÿ†+Gü·TïZțòÈÆS>ZŁ)TÍí ȘśÓ{ oXzšŸŚîW=țrÙšuöÛŐæŠk|ò‰ő§}°áŠöR]o`Üö_ùŃ©§~Û:ûŸż ƒwę‡ț2zŸ’WÏ=Ń4W*Žyÿt/°! Ò2á­ăŸy0·ŠŁPW:Eóà/ÜhŽĄ1Ő{c‘Æ›EQ ”čÖ%p@Ù4uÎúò+v–I’áNíûSÇbIì:$XobA€gւ+šŸ>„ș¶°ąźhçĘlŽą\ÛôŸčË60*ZÀÿòČŁžn¶ éh ŸYŚîHțĂ!GèX„{§^j+ży0„A@]{făôś7üüæ•ínȚ˜Đ}»OíûŰU~ŸéyțÈÆSŸÈș`ü.äh^Ż3‡ áUÉ17łÁ·ßïkçË>v_~CČ[UHu«/æ¶­u0P`0Đ4żïha»GËıЯl(šj°o`ęi_hęÜÏEš{•·.ÏÆŚ ^Łł,f·A6Û+Čć]Ù E7ŒY"HYCiT)­;†qpđšÀTŃ.pjއírћ^/0 —û.~€K8·•Žb3!…Č€ùú\|kö™üæéÔŸïć›.üçźŒTÚu…?pɒwœ“ÉkŚß n]¶Bps}윊Ą}aćJ/ \hÿÚę·ÍZŽVąÔ/Îz€őBłŒ5‹FŁÄőółž‘m<ìZÏdòÆ:àŻUAdGp_ciOë'/g୍‚«?Üç’47›/žÆ!ÂÉۃGŚK/Ź„ŃËČ­/üË “w„‡ÍöCłái·ruąo>ȘÁĘÛŰtq +Ă;çŽú‹œčÖ3ÉüÂőśÏń‹‚QƆaDšMŸçÒ`€ĄëQ;—4jLž”Òßßô ț  Șà›jŒâ<ƒȘÖxÇÏŁXD/‰dŃæp0țqđÚìè ]˜Un:üÍÚšœë^ż~rțŽH€ay@Yž™>NŠ>ő¶æ2đŒixö±/†—Ă}vEśŐ8=WÄń“(–/?W’ŽžŚÉśiCdùÈąŚŚ™[7z^ü/GPæx87„uyR=+íóO= ŠčĂÏ}ž.ÎȘZÎüʑŠù|‹–هîÈO3ŒK;ȘŹ»<4đ_ ˜F\œŻŒƒŠ&Á„»Ù-' °e‚J3@ԖŸbĐ3_Ż(6@JŒà›2lju,M)ÙŹĘŚ€Đ<đâ!â“ŐGńÀ5ƈ? źăš\bÄ+~0úÁ êźđˆŚ7Ÿ âf€œ«§uTì!ôšby0靿™>pt݃J/ÜĆÄ]Ëh3yȘZńš;:À†Țš=[d„ń# ?J9‰Ń\ž•BIčŃT­§úz˜NéI’”ĆFi­!æÙ6Ć œ=H“@­”_:Ҁȷx硉»N˜©ĐĘíûw˜,1uÈ=(vLj^ܙúƒ·p DžFÿȘÁk$h°gŁs{§MÍXŚc+ Ź$Ò†Ę BĂ€jXfËìț*”Ìïșÿü‹ÇQ{ Ęp-ôčŁ&m«učș»Żšç-ِöÀw@òް ùpĆ…n§ćą\]Ÿč>6ŒđìUzòóÁ…„?V’Ź­wÒâúQv†ȚâœëAÊÁSdéŰEȘ/xš–Ę~îę.Bİ4Z@°}ŒW =Íœ… /ŻłôŒűúńĄ†îŸY¶ÿ›.˜Ž>,’IëTfń@ˆ}úhçsáűƒÁàż='PĐíæ2…œfAVo‚nŁ!š•E SȘò‚Šù}›Qó3?{ìcɱüìAšæ[eáźúO€ƒG; żÒßò’Áî—yÁ]±ƒoŃüó”sŹàú»oȘž‹|óöȘCî!Œs9zțêłn|ö19-0Źm^tč%lăhńV’șlęő5À—ę8«_2ŰÙï)¶șRï|äßkÌ߉ÜIëË$PȘwyœw:uŽžä=ûûsÓ„SčâRŰ1{š±J_Ldÿ€żï”ł‚ŚdŠ+È©ò›««őRÔűšˆ0ôŒT,Äjœ*XFÏdÍkôAVÈ%źđńY„šMr9WêŻ5LńPń‡șÓJd”ÏŻźüÂŻìŸ»=›ZHnȘ”c|ï¶êĂt~O[ˆ,) íŒìŻ«1Ś7‘jj{8ji;€ÎI—Sg{±Ő8^ö(ښꏿć'1‘ÎrżćæŚłëÆÏvșțsWśeZœębÔúmçoŠTšÊŚYGˆȚƒêü7‡bŠ –7•Șz°•aKëkȚĐ=­ș“@]Ϗ%"ÒpĘY™”Ż6&̍gŐ„|vo Pwa•æXRGÿŽżÉà{†Œđ6êț 6EŸš6śïőGùî2žÌ¶›écő/ŚÌ3Z»żǒêx–ûkMÚęĂ7Û&ow[ÚÌá™Êzèr5)UčQÌ'ŸuŚòF0»a4ćJ°źűZŽża$}è­ùńÏöwœŒôe©Ń‘{ÿ›XŸÍÚCG·…} u‹ćvŽżákśDśŚ‚PèWëYÿkG‚{olJ&l=€Ą”öŽńźÆ+ hàJÿtęE‰ˆÄÒj%,·óc—^sËn…úcń>śPŒŽuú2pà/ú;ŽĐĄźBÓsŹÿ‘€Ź¶ßVžw-Ybß |țƒ!#»Žčręòû8ôč)^őÖŻíC_ŒË„T‚]: Ïđč~öłòîđû¶ÛüˆJy śČę ßùV¶6˜ëÎmIĘ=(b4é• ćȘöëùgżvŽs,Ó8”íćÿo­Ž6«¶,K ÛûކȚ aąÚz‰ŸaKŠ>TŁ«ìçYó/ŻCÒșę–q Ș8l™ŒI§ÂN@F'$l±5w‹ŽèRbőœoź{L"î;èzaSêțbÓoÓâN!òfz€è=yȚ“łßBYÚBŸ‰>vv~ÿŐ-1Żž'ŽîXJ7ÖI–Ì:o?É”ż«iDł|I2đô^B»Gž±î„ŐzO_ˆ•5‡ÓđÜC—Á2è$cœ+ün;Ä{6òƒH†‹îՋt-æßŸ‡PĐòm ùSO†}ˆ,­–Û—+ú&öwÖÓŽ«éő(ÜpËâМĘnËDsŻëŠ Đt=’”ÇŒ\Œù7Ô#€có`_êź“ <1e1Û~`Ž_© ùôßöwŽ?ăšŃ&1 €ïè!őöb;ęƒìËÏu[8è6z.ÖŐ%Šx„śâÒp3S.БSrČí^ž†”Ü>†ą‡~Óč$nÿ‡ŁKd`ˆ”wú>‹Dp5św‡“\ŒMß }țsî◼áß ț ê.«„ÓÚüœ"kxߘçKŁá9o•öśżì„ëèŃƀÏG§|5†őÛobâź° VbZęvŠyZęRFÊ»ûçÿ-­CóőŽL^^s*€‘őGŁNĄű<ácÛí9Źęò{łR X}}‘@ȚŽu}*č8Ú©š;‹Mą3_BôăęVz"”UƆq:í@6äÛ]ĆÛWßJÏEvLòÿ’ßĂŠÖäïé_aŽÍ­Hęèp5n†%S€ĆöÙćö±qâ™GmKâŸgžÜV›žŽ>bÙ:ĂÜ=pBŠ-sĂjÙçŠY!«YŰëŠ-[,­ÆîŻô±źÁ XC’ÏY`ûę]Š–ziÓ ŹLƒÙxÒ}s“]ZkwŸŰ•bgrże&Éț¶ùÉśYGź_6ÿ^W`îĐÿ ‘`źȚ–12ą'@r-ì„wÙÂÇŽv»ęŰÁuRŽ/R „ƒńÌΕu@vN?čÿJtȘ~rÍ{ÿȚș·K¶=mn“Á(ÿ#EȘÄ ö?Ę »#|ÙČN—îgÇț–ś*.}ši•BیoÎ|?LÚ7óÜŃ Ś…”úŠ“ț„L€a1Ï2ûoOm*§q‰ë& /Y’‡ŸÔ–űìŻDö»dQžŹ%țąÀd‰;È~(Đ<„(ŸĆ4ąï…ę–X‡Äę‹ ÊyJ$–‡îČÀöÉ5ï19@̆VD,ß}2pÒ –€Ûśśïz!Ë}–ÛSž íƒV ].GÌgvbû·@‚%[•6"źÄMAllŒÍf>óV—Ćą(ïèœÔqE"<1„”š†Ćûf‚O‚úżŒY3äêP œ;ŰÜńŁ©gŠśbęN€ô„Éó/ÀÏó=ž_mÍdț:Ê^`rțs[,ęœ—çá+sÇ {3ś«ÍƒÀîéśuÚ”ŒBò*ĐeŻÿíߟ0ûĄ ŰČÁ·$#˜ßżÌ> v”săü\_‰:șżÿ5YAjž]éQő.,^3,)IŐ?ĄĘ#Ï—>ęÍ%Ęđ}z.æÿ]0!?sÖŸŠöÿz±“™ûU‰ ‰Ő)ä#û-‹™tùsę”~;· ?đEÝbćÖišƒLwYî|Ț40dCyٓžțM łĐqHw}QE€±Đ ë/đÉ-] ù\_ȚŹlž€ >ê)53 ÆÂą+%‚ïu”ę"§KTƋïuwÿîa+}‰ «TaÊPWJI‹H™ütÛIüôŒ=}wńí|ŰĘńôȚĐ;~Ê[ò7“włî€ˆ§~łTŹÚ“A+Ç2ž üțÿœęĐHQœîï°,@ß ĄĘ†r’Śn!œig™ČBó »ą})» p«€Æ+żj"ŻQűÏ+‰…M ‹NS0>=”șŐßĘ©^äÇ>«'䯃tœÜÓċĆ[­_ĘOfbââˆk7lŰ*YìàAQh8‡?»§y€űò>ÜtÇù=űg“_pçn„ÿ;Ę#~`ĂÜÁZžą•=΀ȥÚÒĐ&mč}ˆ»ŻĐZ|’ę߉[Žž‹.\žĐÈße-/Í©njšf“ZÊâI 1&Ìkín`!™‹gčĂÒáś”ӚĘPž•<Űü€bŁż#P1€Őo”ô5sš°^ÙżŁ{Ä€ő†«Ț˜ŒÇeJ]·ű»Š:Rîû°æ”3cő±Ćđïô’*Țù!źĘkEțzĄkĂ.C9ćśÿp5’‘ZƒĂȄ ió^èÍ_œĂÆÏęNƕ”H_•2sŚÏ5[Eê6œù7©›Šw7pű0Ś#|ç D‡ûd †zG±á%Íæ‡™ÄÔâœÓs2ägӕę·ćnŐß5 pèoSżŸ„/ÌÍô;źŻŹŃàéŰòûۑæ¶bۋ‡“—?.tÛcI ș€ÙüԒ‡ÜQ,aE[ÒĄ€ïOŐä,k- ú;MźÙ`˜ï(ë 7źëšÂô‰b_Æo9 ż í̧Ű á©lÌ1ÛTl{5śĘÝjcQ`É]êôȧ…&Űę›Fö; wR‡ŚŒŹ(<ßßžî ę[ °)ÒmŚ3‰Äv =ŰZÜŰź Ùűș•'‘e~1éLOÆÛÂB’žgœŻv”»§g?†vG™<°j‡iÜ»M9TćN­”Đ0û}šGŰteÿŠïŠhûgü„¶€Ț—gâÏë4učŻÌ}ÒłÄÌmÏ>6WËŁŸ#șì>Äe>_t‚§ĄĂaÉKÌ`oČ 6KÀò”#AÈš•,ĆĐ…€ˆĘzh…ù›ƒhƈЖß:îČE|aé±k1ŃvíW&8±ŸHŽ‹ü°żë"@–•é늏œŸï5"& ÒI|…†ńțÎAˆ§>h Y áöwMÌèô-«ŽæÜYo^2(ą‡šA“ĆüČû? pg±íŚÔöbr•?Œ}ìk…tDępà$5ÄȚđOČÜ[ń«Ă©­Q!ąŰ‹-țBUL›šć­żI5û{žżȘŸëÈáRD)!kBüSGÿVű\ô՚ïè#ŒížH_‘ °ȚÌßó…„K0±ŠŒ‡­}/vXÖO }űźéŸźÂÌcM­ÖQ+ëmą„ÒƧλ М«/J–Ż-T@ÿ| cłz6¶ÂB T ’żacjM„ڜO|xgR,ąhŸ°‘âÚ[&’Ÿï”ŰӞ=c&Íê«áWڋÀ_XžÂłôvX?zpćŐYàĐßòȚÜÍËtć Ûšź­Ÿß¶„~ÔDôź“5ìŁMńeś1™ž.Űgg;·ü »ŠoeÛęmŃK`üOŐmÔKv¶°="Vđ^e—”§|eä-Ëo?qŹ­˜ŠœČUȱęîȚ€E/>Źóń»Ć]À7ŰăȘ1WșŻŠ8Ô,<9mܱúŸehčhPIrT'h!X)ĂȘĐÒùßœß^wì_Óü&à#ŒPEßŐä§¶[,_>ÖiÏ9<ç\ûEՙŸßˆA!}à‹)ZŸoìE œc”_·Ÿ9ŽüăÜŃf‰Ą@đAÖæ7őËŠ?ȗ7Ֆ?őxŠúâĆ­Ëì#üÎ9î-:ʟÁS àZˆ+amŁ,"źĘżÔ6TOúP]›ÛЊ™2'ŽcîïpȘ­ps7ÿ+bćÈ`gnG—|úÄ^_$čÙ\ák_>ĘuĄœEŠžeOO–DÔe+Ćglìì+†WQCïx5čĄèțŸȘŁoÄ2jÓb©’°i€ś fJë"_;ìT€”ËÔ*­jC”WC N#X_xu8Lцy’'Á¶è=ú1߁H)ćŸ/aì™N}“ĆXpâȚś^ÈíO=”șȘœćŐśș7üH˜Òx›Ö—7ĆȚƆS»ÎÍÊŃ;{šùa%Ő=ŻŸzÛ_I©ęëŸ.lœÙŐ-Œś#S5#°W“$\Ę`Ïrû“‰ŁźÂ—»Îp 乗a”hžùéæ;‘ŠZZ—_§`!– @ę/OúŸč>{ĄŐ—tjgĄŃÿpW:Mè'€Y*ŹFìHë{ż Ńdˆ—cxw"ț€ę…_Ž#kN2›űœRűĶÁ5'ŻÏÊ^ú’u| |Ÿ1—Òêhz7—ïBˆĐëo"Íș «G„ì. ›+ΰƒ(úąšÿŁđĘTN+XùôPä©wXŠöœ#k:ŽæÉPZ­ŠóïÇžŽ:/Ő‹Ńń=l»j|ækäù[ …‡ŠvnęàU€ț7§Ś\Ű›Ś‚àÂÄÊÀàC_ŠÔŰÀëH~LÖ°ü,»(}…Æ_©yÛaüRJŸ¶Pxș@Šæ:*}Ú)U?ÖśLâ›cEÆńš€eŽ_+àqwóЉ…ûòé•'«}ÓmTB‚ș§ź}”vÒXűđ@±Vž'ÙWiȝŠi%WU§ÿ™(wæÜEÏ™ĘŚž»*đäì1‹éÎ"s9V–‰7…«œ`őő°Óhk$ŸÍeT\šT„ˆ(iÇąaúTô)+%9őûM« ZVß”Us żMșnȘ@_Žî"©QŸpiûs– ]ęÄûYìlpŚiđÇ}CńËĆr|ȘŐqäîŻjđüöç^!(E<üZuț*—ĘÇźàąő`hpőżdCŰí\/<}ŹïR­<ă°ÔiŻŽ—â‘/p-„€ŚIM5íêÍüïBŁ țohZÿÒZA–>‘cęTZ>'œIëEyȚ_\u™ćŚ*ŽöábvțÍÎWąÏ6çÿąçą?É”r[Ù˛­v<=ę H ęuæĄ„#Av>WK9œ h„ŐEmF܋j‰đèąœ\ÿlüÀ»-€áć+–*‚Vš”ŰęôòS‘7ć-É Œò㦞úż,ùjáß9ČfăiSúßqęzg=Ï ôvąMÖqiÈ+s]ÍOnńÄïkßç^)ÿȚÆ~+čü>RŒłűû ćÂG­đTyČvˆ˜HâŻÁwźjÏ$ާ .Ä©ürÿ‹:X UW°żăú¶Íù_ÏĐö/•1}/bOU\‡ËÍYËÂMá(v)fi«Œš~ çxúP(ő–Â4Žw\dĂÌoś.ÎR+àáÔțFŁxĄÜăž  áX+ž ?-mӃ.ÜZÚ jIY­4óÇŠ]ʘìžyÒ!Ҏ2mćŽùżnqĆ_û kí?ç[„”nVWêîbÜô~=ż>Ç~ç)Œä›d>g-ńóò‡èzϓæ^S^‘Œ°æ8őuÿXȃcń¶0üôżțăäcŹYÌFg?ˆúÛ;7Y-æ#Ű«‡’.·—mì@тvíxÇI™œ§ïŽąąńà!b1:*?žÏ<ŽÍsĆWÉU±z»…LżêhœKțfțWę1WĆóEśaątUüŰ;§ëƅnŒÿMóˆuËùȘyâòKőïùăčgòÉò[žèI=Rț‚ĄYˆeIaƒvgFd]ùș"]L]1?ZKÙlÙGš>]©œăÙÇôçÁ- ąݟí{Ÿ„°Öé8iqJÄYœUń”ĂśĂŃ5ùÆîLÁ!ûžZQ|K~ę0=ó!îb äŐŸ©öï{,=ăsr[܃òŸÿËęÁÀÉWę!ÿ&#=qü ÖŃŸòdóĂç«áÀòûÈXƒ%Ïâ*ëqž ƒúßŃ=R‹ïŒô-NJN‡rE*;œJvź4.šuzÂb=ïłÜ|ÓßR0Ă|ƒ¶ê‰BŁ­âŠZ}àűŠóćzqĄéìiK"°HEÉRëJć°š‹šĂż¶łęÊńÎææ?Ù*«a Ąíl)Ûp1<ń˜m9Őn Ò.ŽŽC&d4Ł,ß꛻âc}mś=äÛyZH!„•˜Ț1Ûś^Ëò}ˆő#Öč=yš@ _ù-à·wpőc`ƒ*çwçq@ŒMʙŸoìĐ{-čè§š›Š+””qÚ"ƒÄ<–ߥs ÔȚÆ{êùj뉜ț?ôŽÉk}ÿ͊ÏĂą©FIžeśq„ŻÈ+ç?Ö\Vhyû|ß‹ęÿ:ȚY»œșĄȚ]òû+\ꘙRÖၓW`”șŠètđ^òșáȘ/xzfđÿÓÜÓ ĆńŒgń7eDóID©’ń»­Ä(R–ŠSšu—ői‡ò uáÌțŠœ}‘f.ìËŃű+ԐżùŸÈI?ŸŒ»€hEž• Ț€¶I·Ô—a&]6DJ6ž"‘h IOˆtÂa][|ڀĄTź=j„?ƒX}ÍfÉ*X{ÿZ cÿúa()ƒ,ąmæ?Ӏă 6tŸ4«t†ü'1·r˜`ìù–î}•é§Ö:-šÂO*;ÙÆ5/ĘEqûŸO;ÍÍmlčD8‘?wÍÏzÄżJűęlŹYy™}h©ß(òèÍ_șçűű;GŚŒ·V%Æ0Q‹Oá„‘Ł€ȘŃá̓WrŸ‡©bIÄkȘê°kÉXÁč0=Ͷüo/”6dC#.&wŸ„Z_ńâöŸ3–`ÁCêÎBÓżB)ìİuIÏmœŻBgSƒƒkùŐ|«“ƒ§| væ7}”e Żì>őLyEègž| €œöe”GXźbJÙŃ]łB”ÏȘ΀ËdÇÊl›LU!ö»Iƒ+șVĐVz&ŽçZdÎș+ż~žyęÆKYŁ5ÿÔ82žqęúÎ_ϓ?À‚1Væ[Ú ="Ÿû Ö}©ˆ!TĂYo»'łnٰ ŚȚóŁÏŒêmŒÇ™(=æ~Àké(úÇtŚÄeöŃ4Ț·­xg5ĄCÖš ßǶćŸțđPSGíj€"[„OôĂGĄc}çïË+FM)žĐ&Ÿ’ ÀŠ;{ĂE`}VU&ö”ćaü-R»-‹ŸĄkmă•ń úßÿs„Ofy·e6֟ËïL͗èĆßs Žćž…ŚXÔ!P‹+zè„ MáÜ4ŃŚ“oőžËéÆröŃV¶„ê(Ȑ[•Ò ŻC‹lŠeÈCËćv—MoŠń†Gäù»±8cśčź/T‹rŹŸûD}LäeȚž1ŸÜœŸ{êï?ĘÒUfĄQZóÏÇ Źq^(ʋĄœqH] Ï𗏕žvà',NW €aHWĘwÚ>Ò°ęćł3H§ę›{ZÇűrWIW_ìȘ-™,ł—¶ ^k/Üiúđ?ʐ‡çÆ8űź–|Ó3Ę=”‹êÒűò]%éžÂ(Žƒș„đęŃÌlĄàšEî^ätłŠŸ-ßDüƏ%7R'ŐȘ<ÛÒÎwR„Ù–`E~±~Ÿ­dfŽĂîü>ß=g°łùk’É.óÙ(N cmá~ž DÉgUESł0Чg ŽÛ˜Ę€rąèJ:/g…¶±fuwBÛ”eiÆËEĆN¶)*ҎŠó0ŒPÈ?_źϧ>VW­ ő“śM‚mŚrœkĂŸP°6hÿéæö“„œŰź,pč\â5Ö:Kz? RÉ Æí«ĐV~HІp"eÂBxŁ—ï€mÛF^8 nŽ'ö=(yíÇÖŒ§&U^nț źGŸWŒÿV.m2éäڏÄ2|Ąhjüéctœ\B Ęé+èdÓj%Ÿa‘ÇïŰ7T5öœ~YsO팜ĐÄóí‡,$ęŃ·ŃȚđŠtĆ [mä±g·Y?Ó~ìàŒ/ìvżŒ›‹nçsȘČ©È ,CŸcÅś~»ŒŠp°íác–1ĘÍ€ÀÄG”]™îł>¶ŒJ Șúb—”éȚ{ʐ`FUˆĆl6O2Ł•HCB+_„ĄïRÊI.6\Ӟ-ŽêŸÖŠæD@ĐV8Z+,ąl)LąęŒyómź Zê°œè3ę””Ïś•Çè~)7ŸőšZ8ôÊg?XF*¶i\»`ęúw>2ËS–È’óŸh^œDôćöń⎫ÿ時-ÀęìăÚź †>Çvo?ÄÆóKD€‰,^ÈVJFŽvÓ^h±uëŻòVP]Smr»uœoûB<ś/ł%lxI’JQoä_{ì ëKD€}Š…iT{f%GHæ?=ÆE5 rËjČ~(Đ<ž~ôÈS©R+ű8îŁkĂúê;vŰù›ÀčcĐś°eŽč TțV–“Šż<$ˆ921»]1?ŹŁ%”Fhˆhj9šèŹÚK“+Œ^›çș!‡Ç”gï,LŠÿXwçŽV‡¶ÚœÓ…&9˜ûÎü, \˜uQŚïì_üÏ“zôޱț‚č‹6&FÁőd5L}`tž‚+Žé}cÜYŽM«ŠćÄᙠ^»ÛîPŠG-»?ʃÿPÌxĂŁčceű¶•­Țx?=rSíłêÂ"N!T ú7eúĘŰƞÙ>ë\mw–śńM­9qlûí–;ë+|é*ŽUv0 ʓíęϞłd2Ű~u`òf-ÖûlÜi1éÏÂc0ĆêISò„ê œCŒß*ùŰ9—•ÁbwđíÎí-+ŹnĆ<ŒwóÉEæÓQóôŒŚÏDH‚đځŹ4"NĂÈQšòzT‘LW—Á\ÿóń«Źű©Sk„‡G8VthÙęŚ óżȘyÛWCʑ»%sœÁôÏóÀß n“:yÛà«VÙőgÛŒ&Ț”ŒÀÁw=ž©6°Ńyží)jJÏ҈~ùŰ,‘sÿeˆT5n—â±ÙĆÈÒ}ô\̝<óžÏÛRxlÿÈÛÌ-qW‰Aáe…G[ĘȘ"ȘŁ‚†/żÈÿ0ŰU9lș͌}±œæ.˜lûĘĂ|èKœšŐuđh[DȚ€äočđüș„ɱƒ3!!'Žò$zÿV8 óśEĂ>Ć!`çĄŃyx›Xńc“<󷖅o(nł7ÈJÓ9qX]dąIkț‘dyŚČ äT̖z]Æš ŻÖț”êOśŒp7)‰œšà™{*ó‹O€”L2Ïqż‹52›šžôƒ-§$žâ„[üćÇèzϓ»gFŰśđ±G;Û4ČïŁŐsÂâśi°oÀÂà2<ę ĄÔœŒ$“D5—pÎ/ŃÇOi<őë3Żčʱyç=ń©`ìÈ,À‡Șp‘Š’'ŒóÇÚȚă›û?|ć>€rk$î={»/}ïWjoÏ{ÏlÿőxtnUÁuޱA&,ïmí;łëŽ’bc HZ„}Ö!Skč0úAB©žt—` ȘîÔŻÔô*›DÀdE{Śk]ćéwł7Ž,$đçŠjfƒłž%ÌŽTÊYőńwgćOeÊüSò©·kUš9ÍČŚ·}ÉŁŐű^öOÒ4. 8đšfŸ;’soÖNŃû{·Ą1JŁš˜V:šȚgŻî&ĘwŚfŚ@ŃléĄ]Łźźà@:žÇçƒÇšĘGàęOèt 5QsV9 4Â;Óńé…Ű‘K‡+·éă #ŚŃšê>șXÒ‚Ú_ș„ę;ŒçoŽßŸÄh~7ź9ó–úuR!EóőíEïwśȚŰȘÇ{ŚTț ŁwèźSaËŻ v †¶§Ú5êê,n/æEčÇ»ôÎÌ üșșèt‘ č“»^ݰ‰žC*ÏlmE-LÖ­ŽÚăNśžŒĄCd'Á„€5ǚvxg­V‘ûpč†c6 éąhùۜ“űÄMF9¶UpU©]"Dwæï«v ˆă›MRŒă_(L2ÆșbO.Wc;°/áRg”€WGïĐ ĐÉ©Û4GĆĄˆŽłlŃ\ź&š?”­ŒŒ†¶"ßϰbŻ437c5˜9xx/w}mîù7Ôt”Ž>ÎŹ#țl$žž96ǓőE·Bû3GŠ í·«-۞q,CžĆ‰żŐ ʜ§éT&Â4ç}Ë8+ïđzmŃŃ8Ÿćąy0€íV š,uù.šÉ†Ì/1._ÔngÖ[,9Túc8\ŚĄ-€gۏíYčÄŰÄRzïà1ÏD·!‘2E~gęôĂtÚôőÈÌăsĘćÎí]G¶b IXˆŻ=|țXàĄj_iFpGŃ ”<à^ÌĄŐfšȘ 6qnšŁ`эŰbȚû© xi!Žń*!$çXhŻ«B” żŁBÇÚ*Vàișú€öPuê6Œÿ(|\ԂsläÇšż]ÊD}>ȚÀțđ|üyu{æ|êS0œčZO+’†bX†|\UŰxá@æŹ6ÓÌíËĐhł9Č;|°œü$Nû„dÊH:o‰Ű,°ŒdČ Bq™81–amòNÿŒË òșëĆüè€\ŒșČȘș‡d9ƒç=óĘ?5KżąíËy(ž{Æs œ)ÿ‘$©j”úìCGxšÆ‡>‹R5аH‹E»”ÚČęôĂ0ў/•+„ę†Ôăû~­|úiĘșœ±€°©w(èȘ«o°—{Ź‹!€ž+šSż¶#t€ń•1sìCžZÙè©5ôT›ű™ácĐæ»H‹Čeńù8ÿÄ'·›6z7Ść­•źFâ)gqÈç‡:Núłź* \ÚȘsŐ<ą=ätv,Òű”€Ęi܊łlNɄü!„!&2hȘ;ÏM Č}É2ŰÒŐàűÊĂUï4 œt€ =ű䛫43ÌM+±/%ÒEîúrJÚ%Ÿ0ăźÍi€èÀûWùVö€ËMș (Őbc?\o;âxKu7ÉPÇp.>#ŹÄhOƒ.° łÆ8E$đ,çSĆ0K “Ę遁ٻËä[±HÜM"mđ–·/_üËÙYŒž Vœ8…37œŸbÿN„ÿJÚ}ąüC9bŚùö!oó…T’Ç9ČčBÄzpòÇĐâuœŒ­0ć$Òș*ÁŁ<ț™Àü†-]SșƁx»ŃëNŒ—ŸhêŠ@ `\ĄűÁa CœèÈrGùKcŰćò‚ HNۄH ™Rìz¶ŸšaëaŚrN0M~œs0S5lٚßu€ì…ÔÓՔ‘§z~ŚŰ+NçM *+TĄK€Ž„š&ßOÇÄœʶ“ â$©xˆ/"mSòâúôǞÙM*çs1dA”&q.fę±=yÀBI–N­qJŻ·• ,NWœKbUèĐŸ_]QJb °őWŻĘűìP”ÆbšŠèÓæÖÇ88żŰ€Žá Ń +Eo:(u± l{;E9Ž±Ë±ț ï¶fÆĐüa€śù Œcjż»0ć\¶–Ž#á§À‡?ŚEtšmȘ¶ŠzìÍlŠíKÙ “dĂ»OĘ(”Î ohjŒ@.ŒòĄ—w.Șț†‹ÂđMșŒŹr“H2œÂ]X}«Faž3ËA)銦'#UŰiTÒHs+Ú3jOŽ'{ș3€Če^›~—Ă!šđ“Cź€”S7źÒjŚ*ygûŸś\\?ùäŸÜűˏoÈJȊ È Ă!àEł3ÌâdŒzEw|†Ü@ˉKò„ŚȘÒ6Ÿˆ”qÓ=‰Ł» @ÎÊ*d+ŚBíêzcäÊĐ_Ê0Q”GMż‘ËȘQŚîыĐû•m%Ä++ Â¶7~ž”6`Kï+ÆAŒ…?=tš¶óWBűéa§€ČԑŒbƒ7}~â0úšiŠöŚf,@éä&BGŐFh§Ú#ź}ˆÏ}ˆő#0w‹ «óÒż1ù›ćÚoČ Ű|7‡ᎌiXÇPČB7ôË¶čÎWoš Hł\čŒ;Ț»Òjó‹‘żÿżĄZ Łn>ș8t4w‚g«›TŒÉݧáb/uY Fé`ÏÂ4țç+ZÛ7o ÛȚđjÜsq}ű°Ș<ô. " z›6Č$úÛŸ"„aJCQÖgAê”Ívù‘æ†~ˆ!p §ÇíÜńőĆâ.ŠU©CœŸtTŸ5șĄhb]ï|J/T7Bó}±ŽĘquqȚMCŃę}-Í֞…U©è@f<Ț4đèN€ÌđŐŁšüŽæABæ)șÉÊS–@GÇsWțÇûOLĂ[ł LR™Í㼂„†{öĄDdđx#țn­őúûáCŽ^šȚïr@91áô96ûO𓹷œ€,܌JP‚Ž:†‚Ą`†áNfȐlšuYà‹ÚœÓ#ë«2 ù Ÿ(Íï|‹üŹÜ±ŠÂ`Ò&àĄ‡Œ…lp!4ĘÏC)êŻÿÉh îą>A3 Ă1rĘősš"lšŠô2ôÈW㞋oŸȘ¶ }§ó%C€’…)Ü+#čԉ™ęu”Ôš=R“5?ôP&<;ăž„ŒȚ5_o‹Èé­éPțÄd«ög ˜ˆ`üăqwáü›żŐDűàł_’ż°q„żȘXÙ«^jÊZłș6îïo9ôô=cńƒNć$ț‘|áĄĘ§*NÙ0{pô<4Ž·șJ›æÿìÒÜÆuu.LWË^üjÚùł–Șę.”Sÿ{P›èòŻOL<”(—qôfT+,Űl ë†{Μ'màĆ„êуîev'?,ˆŐ*K"!©ÀOŒÓKžt8!=Ń- ł,ÁË4Y*Íb„€wMëęÙAš=çćNö I!űBŠ­œűĂK™?w)hÏÆ=?DÜyJÖl ìÎčly”Z‰„vŠ’ìÖ„/›"8ZZ`ïl8víh4|ŚdC˜łŃÖökŸ\KLÚ%èÿxŒaÓśŒ|òŠxá¶ĄfûeŁëúct•Æ\‡vLđÌ=2·é ]TźjŸe( ÜڟY={ Ćëxűhi&őèé%ș“@ű‡ZÖ>/čû)…—ÓϕrčߛàÙ€L¶¶Ć=‹€ŒąÀ[§&ńŠĆő;Ăœêmź6ćŒH/Źû+À­@2uŠmÆîț.†Ÿ©Ű|țVA~‚‡Í seĆ Ì#aJ].Źș •À‚!—‚næÍp ’NŰlZ,a%áEœ–qßwÿáȘJwC$ŁVùôe”xVUÜcȘ1ˊŽë„.ŁÚ—nȘ_Nl!Í. ă“C­ÓAłtăб„­Ńök'öӟLȘłxKŁŽ U e}êÚ¶Ä—Ž”d“]‡KEwń© > Ă2Ž4.łV€Žçj„^ûËAŚߐxÒۆűœzےs¶éò6ęAÖ]$1Ò>ć û ÜPF['űL§ÎČa)8xŹ{Œșe(–BLš5Šl—ŰšÏ.ìÒĄȘ3ŐŠXńW‘ĘT ČMœUP>ǗU‹æÁąT–ŻX@·Ą/Ź(u»©.;™x^í˜oŽ)IÁŠÚš±NÆ.dĆ4mŚU$vĘFH êfeUsyuIÉ1Ô)$Ÿ)Ă.łÔeæaęjŃćqę-xWëoƱ›ì€Ÿ ęHtg6J*A*À— jgۖąŁ*É«} œĐ_9DKçWʆÄ9{ȘHXٖĄTÁś5ONï-așźŰdlbŚ›ˆ™·„ö]œíę“Vm™\ՐȚ|,öÖçńZrĂRű|„EJ«1e:1§șn)š>‰}tÙÀ€Ž»tÂʂv‹ ŒqüĐír é1.ńMșdVč)$©œtGU‡žőä`ÆKXmZFŸš»J:¶ Ûš3Œ”¶É8 )HZsÁ§ì·@ "r&•:ÒQ­Đ-TÉ)`Ąˆmîy޶B}}áÓę|$†Íűłżp­űŁ?ì]ł =¶"9tÌ|œÿK9 qÛüț>@Z­čZ$9FdČi'ìÚßżțb ˜]ŠÔ9a+xv{?ÖÈäČA)ë ńéĂŚăH9Ś żo9S6‹óëÁĐ35Ö(­‰°#3)mÒiĄSrË Q·/UńÌí4Ïț›B‚ŽGĄ€”uÈnsd5Sê9CłKw)]učÈțlŒĄČTą!ìæùe*D% ””Žë7ËrT2BœY»Kâá`ŻĐKíŹR7ŐČÜ”}Ÿś¶EŒÛ­ûˆÜ“éőéË€7Šˆf7„Ąlö8]‡ÌÏŃf;oÒ%Ù1Á»„EAM:ízùÒŰÌ]€ƒxWÿš„ĕ/Ź«T\y$Űt!žïŚÜ:dÓbكÔ5ÜŃ;tÏ .d€!,EQŰ]jÊ:ÌC·Jušèp|ÄDÒièű‰Ü:(żŠőČDêđ»Ž,xęO°Źâìy$ˆ9l.CBúçÒ.՘_Q4a[&ZÍ7ÿt˜ƒżUöš™4à‰z|a!œ !*M±#NÒn"*0ƒÒa›!aΔÈ€K[Dh›Ì;Ç&ùœąk)ÖBR1>d,Cš7ày3[XhŽzúæq ç"uD…‘±ÏńÉ& ]|Ù-ćW ‹*vz]Ÿ$žî@ŃőÔ<ŰÉRDVÆeDڗăw©îĐŸș‡8™†đ֗ò:ćÀgï:‰đÄă#ä+„a”}±–ż,}ł`âHÙT/„A XȁߕæÍ€)iă©ăqXO€ÄNÉ)+"ŁȗbŰR—'íL;Óù|<ïŸ|l(ż“< èŃÒŻ]}\88ŚÂšyÈ?üòĐæê„BOüáOïĐ"7‡ŸD6ì=˜X$›ˆ ‡XRU‹>] ,và:WŹ{ë Ô>ÙŚ„\â$»ęŸÛÎ*öìÒX`ˆÚí6È.ä|` .Čł îB}JwC8cŽ,sšźŻìˆ?țíUȑöOß}[éĂȚŰu@©ožV_vžˆi«łŸi Ń0àù$\APóg­r¶‰±<Ȅ;9Z—…˜(>êÂÆ!{ƹ۳pȘI!6•w^CİۀAì(|©áO>6Ô3 ^OŹĄÔ8ą 8oÊbÇwŚ»'·:UiŃçXOŃ›cZ…žŸÁmeŒhÉ)ç6ńæš`ɂVšáő@9ÊŻ-ï{ćᣓûûûÒ‘"6›ÍDsú_4ćQ‹š‰°hX>8ćt#çì?fƒt0Ú[úì Ä6‘1OÉéŒbkrŸûf'–«`;tgđSꆔnä,€á;‚}·™ &í]ÓlëyҀì@`Ä* %ôRzly«fnô9© A©dšnű“śm°Íź^m+qVÚì<ÚŽqNÎ}™ČSÀĐ@Ś‹UaĐ:ΧÖٔ~óLÚŰ:\~îR„)/ŸžrC¶j',KsŒuP~…»—éh:vđ'±zeiéÂNÙív€lV,4s ŁŸÔnć» hJûäCĄCȘÖđfS-*ÂìʖZ —ÍÊKÊ ȔšhőY8cr‚đ]|$ Jpńû/đ©Ö,$‹ïÖeaȐ]|]Éj‡ÈąXuś:W!ș+ï‰pYT%MòS'‘jŸțÎvĆŻùłp ß`§ËŽ‹í›šu„Ê1Č­łœżŚ’R‰[!#6Źț豆ÒȚOeOy1űŐÍYUÛžłVŸèkćäà3Ë dc{}öٟ¶9—ˆìȘŚÄ>cÁ-!ÚXŸĐĂ˰…Vő–Á+Û.%ëzđáIț|Wéă·ź^ë>‚ú˜"-”ŠcŹâ7kB4č}fƒ“O șÛ`ÎB:ÇS Rá; >”0,Bș«»ŰM˜5@ÂòČŚ”ÄűLl Yż·o`Ó)„žæŰ^bŠò*ÀWŠÎi|ÀæÆBdÜ @ÈïU$ž»/ÌöțĄÈŠ+مê=ș…çdłúąFZ«Û —dĄ…•]eSźpęQ]Í6‰zèbtśI« x« äËöûž9rRa_ê»#‡uŠź“y•Ž-«;o@șbY‚––ăż,Śhpß~Àš„ßű]%ńƒv{9€€‡ŽzJŽ‚ŸDi-›ò"b3Șn“Ő€ÀӇ§KTÀ[„ȘhYțfÜȰFd]Kz ìŠu†u^ËeP͆)Š•Łû„DZț«ÿüŚŽD6\@€b9č)NŻVź&ydAQQFPŚÊ—.”ÛŠšći ™{àÄoòÛRËWs7MGZ‰‚ôh`›”ŒéÔ`¶è.[“ûìŠU—uhđĂïäŠïäê(ÔçDÀŸƒ\ZyIȘ›íƔ*ĆćôSu%#uhpÖ:„"Ä©`śè|_pˆ±VŻĘz^|„ ·ò©cŠ’‹ÌłXœQŐrHÆl l'űnë^ęí€Ô°UmĐ@{ÊźćNžź|eR lbąTŒ5P&gïŒ œ±ùÀńż‘rJ±©ĄhvE3 hZĂkB([w=&$v)Š:”°?'äÿsŒ§ă±ôÚ+ÒzrSX‰Č(ÙâÇb;ȘjĄĆvêâ…Ë,ułh à†i!ęœèŐäb+Ëߌ©RÙ2Útœè.aîR–AtÈcšŠbVHƒ-SŽĂ‚méȚn@+ĐB‡ÙŐžD_KńŒŹŒÛż:<¶MŻUí§Ș/LX@ÆÆdĆ%©”ô]7W~'Ôö§ŽL†-ŐșĂtÉL-'èŽZ¶ÎpČ™ő5ČŐÌ©Śg[–e"șłńÚêk.±„V`7Ę 3ŸŐ4ՙIی°“Śvù Ù $Bkˆ_Yüő_ęĂáÎËR €rlHlöՃ(áș•Ïłr–IȘ€˜j·˜”„TuN@"`szŒw‹€l°’Ÿ!CcčÔe—đ‹4Æ QšŠ \%_s+·+sK«¶V;]ÀRŰçŠàŒnÇńeB,h7äÙÁd’(‡vCęæÍÜžz, kVڟAê•8PaŽrÁéy2a„ĘÛ+Yóž}ìȘ„ŁŠ•4,ą©•‹ À‘Ńă%6ÂmôÀ[B—r…›òÆĄíȔD᭔ű>Ę'7ÏÎïż_̀Œ‹R­ Ű}jŠ,żÙ›ëEw1iuSÆ€X.C†Ű`ÛÈMĂçÄăŒ ÂZŠòz«•Ž9ž€5S+°}{ìêXb–f…sR9YČdj+°e@ûvÿšúölžxüU\/ŚŻ2Àqu€űYáëKç\.Cčdł”kjÊ ÌX5ß[eDë‘0wšùrĘWXŠùŒ{pUÛ”„ŽïË#žÜ)njË0gȞÈkŐ GZ±PùÜÛív˜'YèDûêëîTmÀ·Űˆ!‘˜€ÁAő“Ô@«¶éÀhÿšQÒówš@2\Ž9ûÛ*ÊòŃt;œ/(Ź8Ž0„ûL#ž7ŠÚç€Iòù·Č;çö­ Ü?>ëw,æđQŸ7nÖoȚ|ß”ÇæŁ=‹°@äÊr–ÀÆSű%ț7ƒàBŚĐŰfőńĆŠž +Żä=aA‚à­áyž!)e‰Èf˜"/9œPî>uÈ œqÙ§k}qđńOőpÙpl)y(żÆ™€ștƒ„0b¶Ś‚!!DV3ÄCŚÜQčEobŠR`Ÿàn­lÖĄqŁÌ`x#X‡Vš:ŒÔ`Æ]0qĆiŐŹčźv42‡ń°ùRïv4p„+đ@ÇŻ•x‹1ìZËyK_ÓeȚß`Źö9a„ôŰ, ^âŽEт!@Ǝƒ|”€íFÆÇhtä|Àąœ{û”'*íłxYR” ÂLÜ™O u:­RTëű‘Oy .^Ÿ4æQ-F۔z4jș0…¶dâŠMƒ,àčEP†¶łX8äčŽh¶„DçqÏă? °æà±{żŸ”VȘŚtžïȘ;󉡼±’Ö'ŚȚz]©nŒBËƗäEń ITâéŚBQ5ÈXȘ},”Íž šđĐ ¶§©_Âæ9Jœăێ;胫KgœGç| €M4ńÚźĄ("ŠŹ GÄJ=łŠŠćÌÛ3ŽéTX䩔æ»±ĐűÚPÀfOg݈ˆ ‘đĄíŐ~àÏłù=(&Ű#AFÊŹ“çđî-•#š$dJ,Č-Oç·Z”: …žbžàgś9$ÊÂ"’–« °ûÔ~YZù€^‘pÜZÔ*ÂĘK›éŽü2Ú}ŸvîÏÆçƒóÉdPŸŰäq;íăžĂƚ)›˜č VĄi蠜5EŻCQšÙ|ž]ÀĘő‰Z}3G›,»ŽíŰ’œûȧ]šÁ ìí%–MۗÄ}eÈjșđ DLzguízẽ')æ.Yäz2Ïćæ2K,€v ,`ź^ßË#KűäAöc•ìÀ‚[ŽéœIWÔÙ"8‚4RR7ÇéfèŽçւŽ›çÍ.«`kśùàțll!1uvX Nśe<ęúöùŸvnMƈ€W ąw,WŒßç€Ô\d^!tPWÌ^;śœûAkž+Ć<îâ^Ńnn-ńŹtΕձ Áíą 9SB© `ŽDžIP”Ń;Ç1?„Ž8ÆMŚkUF:ŹÚ%+§ÿüÙ:`Ë3ÿí'"ćŹ@TÜó ZÚu6Œ60V‡…“1~«Żœ†Fć' dՐŸ]AeÒú Üî4éšá”€Đ#ÔgÊ""<4çOŸ;„̘‰ő9âiƒłz€M#œL©Àe1e:­„Cš7 x„€f~”Ær;.ó8UŐ.KÍï±hxêì°üЉR,p/đ ‰n·7ź„lpàxæT kÙ1żčŁÔ2,ęoZ9Æp©Ba›}’uÚ@ï °‰RCæ ë^”Op_҅ìU1Ëä:«*„.WÀ“.·ž„锂2źíŁ„krŐtŰW%ŻL{Q[\7ôâ[Ț˜Č?ü՚^c+áWł!Ś-ă@HYÍXŽˆĘŚ”8OÜŸŸö!3ŠH'@d8€­5`@͙m { '„F§ Äg ä+I'=%<Ć òÏ~G) -»’4”p™•hțÓâȚFŸŹP 삔K:œ­ÄŚ.=ž•ï Ż üqiû‚œ+L/h"~ó`Öm°‚đKäĄ[Ná^e€űŹÚXÉgí‹8ăŸpg€ÿśe y¶ßU‹ .Ć Źaéő@0`†ùTæïčŠŒ„Ń:vĂËPn ”Ÿz—CÈ̀:Ž”ŸôjyeWúę'Avğűv«ąńÙÇźŠ”łFrM‰ôcŚłń[ò’ Bqśdv§;z–š}ä!œuˆąÔ+é°0Ô1b!_D]Q<@žLšêŒ`őö‹çÙ% N‹ó$+E©È\zMpOőz Sè»IŠÒœ·hèLiw ĐSüT€HG—ÓîŐJ#‚ÓȚæÓÖ +ŸÓ1ôü€ĂçIÎȚ,€cMÈ&ôw|Ăüfi*^ƒœ/@fEOÊúI_dőđB#8 svÚ!>ê.‘†V±<Žž€‰FpÎW\‹L8VAƒeb ŹA·ʅĄ§6!č2^'€©-Őë7Ÿêö"á›wÄ?ÿ;n$Û|zË+.„z5șRÀ†vcĆ­pEĔ5‘ˆžûú4›ok=ËÈfĘà]Qš€9aĆx„Tó ‹·Ó[nȘ†]ĆÓÄ\9. ,f‰4n2Ń*dçȘđŠb‘ |@ìïÙpȄ…·5ÓiÀéŽăŽ™Łšț­ß.5LˆÖìÀÀŸ»<€Ęëˆß\60‘:·Pś ÌYˆšžÄdçE ŽÒz)§•A_XŰ&;ăœ@€đRŃŒĆPò—źČĐ š˜Väœn`áϞXUf§fJVó–@ù íŃœH雬nŠń\—çȚŰżùA€wțeú‘ŻÚœUuăr=XՓzęÍă@\Y‰ˆ ÉûîéqËšûŐ;Žq;țHFۇ†nqv6™ŠÖÒۛ ÛÊ=ji\NJ읚%űÁĄÁ ê‰Çé@ł–łșz5J“fÙ űËĄ.‹…VŒ€^ƒÈÒSÓ4ÀhS€ùĂŽ «-',R?j[8ž@ńÖÏß\"QÆ›ÉCäĂÌČ^+©›ŚäÖà+ôäpxAÊČŐ7\1]{T+Q.U nXöCX‰ÒFĄNȘWŃàï}UURĄÁg”:­4úŃ„AÊ"fĘ"(èÉÚłOzF€)ĂY{ß+Ô#„oRrǍ'Wl±gí-Ïș*„š*-2ÙÈÎșŒ7”.†=Ÿ&’ńäÁ͛!»œą 5â».Ă"ÂfJțž,\5ó ­ŒR]E™^lŠü'Ëmț$@ńdjœs•Œà@›ís€žŚ›u08Ô9fŐh‡ę€±LOș^ÀQ~\  +oș·ôć7sAĄŸâ źrÀuzÒźÁ„Á5y"b+Wô|aY§±”6űźŐč#Ó[ŻÁŹÍČUæ‡Ű_ȘN[űČB-ŁòRÀY-đAù1yÈr’F!„oÒnC’­űc•)Ăîú̃/űÛČÜ{àű›~èŐx‡œÒ­ÌL]Öżl+é5:ő˜ńŃíko {Š\:"†˜+jłYà딄ˆŹVhŃR©IŁĆ’ Š3ŐjŸÍ `%ëŠ€È•Ő mț”Èä_[ Äú›%sLĐmmłŸËŚĐzy‘„ÁśE~(6$†Çz] àZGa„džž‰fbKtĘšà°ÊC‰„Ó[iƒÌŚń”Ű„JŻ$ś« ő6È Š*Kí’ù~ĘÀ·òòL…«ˆ3M­Ö<çU„€êAéb“€ËG}€)Ă%*söe“v)ć7ßxńkï­Țrü–źŻVˆ*șY#5ȘŠŚGÈšĆ§!ĄtÆ2|tûș›@€oÔ/ „T¶'ûDĆ4oæ‡;2ëAR*çD2Œš±űÁrŠ·X1Ì3 țÈPŒcèpfz›2Ő4Ó €M›lÔ:€ |„Žź(jŠz–gč•$ ÌaËz(é4JL3Ò6Ù‘èT†țì}›œn{ęôúŹa€ÍÏÊLtĄŠ<€@OQŠŒ!±ß™‹źÚ˜„ŃáÎó5:yc#ę„éß&pꖘÿšș"c±˜y3Ź~~D‡aÀWgŠÄéăÉ@ŽXđA©zRi8Żș‘ű&íI…Ù*Á B•Rú&]Rșď¶_q/°êÄȚűKwx›ŸȘä·›Čèźź7ܕ성”t(nʈgü9…@{ű’ó†úG›WĘb֐Rą«ÛÊ€ĄTŒć“ń\€ž]ë0P)ćÄ rÆÀÌńŚæ­âĐ0š¶HԈöUw:!“OŹËß)ćDbgtł—ÒŰgj{_揰á™Ć„DJi›Œyà’{ăB?ûîtNJÂfÓŸ?źÄȘ2„čVh,ÊCï˜c`} $đ\-*đőödÚiKśR,LcÚ1Łœ^Ó"Ï)$ŸC(lÀèàškć ÌRźŚÊ”śŚCò°çÈ)Ă%…;^E§XĐTĔ‘tJ©ÔßőăĂÏŒ XęՑsęӁ]Íß /źÒkgѱ„9qÛÈDÔźêBú ù ù$”zá @ÖËú!dŰzٞ|jsë’GŽ€ŹŻN|Ś„6-(!*>Z!aÓÓ„Óæv>;É$˜!Ś,}ŽK˜§ Ò4œŽIˆÒ1G»„òŒLkÚĘl!Ëś†;†Ë|jÛ$$BËZ8Ÿ]û"kb!}a§Hgămaáüțtš€[BŒœIBÖI§Ï]W4Cxê  …·'ö{%ÌGÖ!áÚpÇùš–9ê“1ôÂkîVXÉXápLb=?†Äú›Ő©h=Ô_[äüŹ“;†‡ę’eËŽźÒ-6Iű‰.íR6^ŒșŁò+34›e©Û•Ï<˜|òó=@só]śOŽmu=ržœŰÏ\¶‚T€€Ńˆa gÛÒ7ÖŽ$6g±ĘÈÆCMgžÚš2K$Ò·ŽzgńÁ€Ă.Œï,}'êŻIšș@Læ%‡b„Ępč„*…€3Tސ†±Gś©œ\Ćç†Ëű‚eÛÆJÏW+ÚšŸ[ążŰ©ßś­Ákë/VÂĄJq-ȚÿaáŚ/ß|_·9ïáŸm9L¶ÓАѩРC›+kÊCbU€,¶[#€Xą€IÖN°|…ɌƒúCG§s…QŠY"Ï)|u áË’ĆKŻvà›tĂűÎRF!3E•ÿÖ@yZaU–tę*€ŒK—!ŸQíÔx˜§Ô(Y‡ë«oŸđÁݚ{~Ęșç†^àăÿh{€”ŰAs5ÏèùA–X7Íj\Š„P „DĄWÈÌŽ†lâöكwUä™éóß:đHî·ŃŁ-GS^Ê8äTR±ÓȂfMiï">§­”™Ț°k°`91AbŁIƒ|d”Ô Šöh5M4 OŐPźçZŹŹÓĐú-J„@üÚòŒé2Àfh;ßœíűh—sq°ȘžR“qOXüŁęÁ™ááȚ‡Zaæ(-ƒƒš;··æĐ­”xco\źÂIx[°·Őjʅz bƒk–ÊŃÒYh·–ÁŻÔ uß@Nvw&ûT e<Ś`U ŽŻ#CF«pÂèJEƒ«ƒkFŚłœl™ÊW‰ô­€ò3H…‡[OJÀ.ÉțsÏPÚ]]‚’ț”ő?Üră?–“ ĘÛ·<0öĆa>țe‡bÁ;HpfKś}‰T1B`(ćF2áŰŹ5–'΄łZ\»–:ŽßiȘ COp䟁éÖÁ`˜Òl.lšfAÖK©­ÄO&çˉčYXàZo=P+ò‘íXÀ BűK Žb‡ìUA™ŹȚÇÆŹ#o”-È%O}qžíD%‘ˆ°â©˜h‹đŐÖMÉĄĄŸ»§èčž{!=1xZÛŒ­Íg†ˆhvûșr,ˆù ÔȚĄĘ9Fđ OcK1i7\„…:Yoƒ;_ʱ‚ˆ •<=Ńí0DËpó_>V0HY–Ó'!=VŽw‹=‘[ć¶AvîIV!$^»4Ò;;_耶Q^(V*7ûč­MwšvtôM_úÒ%Œ;Ü/æńÀD_,łšîșQÜóRTÂP Ï[ Ç:,Ü12uőčČżŁy†àJ`bä(^ÚfțbúÀ}ç%НgżV^yé àQÁ)s%9sŠÊ+ùđi YÜń@’:­hšHëpöh`SƒŽZ“ÊŒ,|C-‡1¶jeŠŽ†@:Q°VÉ ™ ^Ęś­ÁÕEĘ0ŠSÄ&co"ÙŽqapïȘgöž„OêÉáaèĘÚæŻlżkOB9FàŚJŒ1 dč§q‘”ŃOmÖJ‚P òbgX‰•@„ÓА^›šš€qK țžîóhčd€’'­Hłć<·JUŻČò”@Ű$BAŹ.îŠÒëà±uăyM%€ÛÜőÒ±cû7w·æ¶°șví[ź^>alkęgÂvSÎź/ D‹x‚a EeÚŹ8çŸê)Ń©C@‹‡°ùO^òŹĆŸ…SGpź;-źćÏùžq;Ađ\0kÆ””§èĆLiÔ0ÏGś‡)[É뀠Ո#0pa[žăĂ›W±jŒEłÁ:Êu„šÊĄ–i",5­çú ÔŐAł6gZ”žÊ.3% —YnțŸ»ą©ÙGXO:o Ś9żÿÇY»mx/˜eH7ÙèèômoÈ2úӓ†›ŸȚò+!öu—‹M: /ò4.șæ“ûˆ©DőVűûĄÎá°ĝÉ^+T:Ü y›–Ê"á †]Œyr•&ÔąÖŠq  Œò"âKlpäŽè’UŚŻśVœÚ[ț*țæ° ëŸŃ·dûƒ=«œŠ€i[·îž]Ÿ^ŰuZʐ{NpÖU‰u0C E©rą\CìĐ]9"úŸa`śBzbp]+ČÌ~œ^fèȚ‹?Œ}~s«,ńŹĐ%œ]Â>ŠÜ§G–xmWΏźqą‡}œ ±Ç_±Śïäz­èvÍߜÀ!K*Ś$=’`áDoüáĐ­€ČNĂő}WdąÊÂ|úTq§4ÿ·C}“,ÎŽ<·zÇ”TÆŹwżUڙvŠ{¶|âԑôŽ3†Ân:^ńE2%»Ü°0ĆÂJQaőőę»Íqÿt`:œ'gNìüčbéN;Àê3/H…Æ+ßœ/śâ š…p8őüčșYȒŒ©+YgK0c;œùÁ/!5K†LvŰp€>‘›—‘AòĘ2w”Èu\űVîö’í0SŁùu©KąŠÓđû9Ç”ŠŠwđX»=]"6ćAĐ7•¶Ï‘/ÀtđĘo9vđòö3) ČYCTZ „Öœž3)AËH!òí¶ă­ævùŃQZ/äùyázúśúi9Țö}GÆ-ŸçȈâBȚyPÙdźÜtéŽȘvBW@$ŚÙN`Šę°Ő(Ïazč•«č_w᥶#{XDÙ h…QîÂS.KHBű žȚ»P Q ‘d…Š~őÜô9 y2Öč öHR™‘žúMłóœùÛ +lÚm@æKZŚÈ^àîy”ˆ[Ü^‹pž‚ĂxŽnëŹy“0sœ¶ÆïtœˆŸÉƒșŹŚTÙz”3t\á0}@Âòx-0Ä? ’ ·ÊMŽn)eܰ9 ;żyźZ*đőI‘ÍeTúCJ},¶:,Ánsk_:öæÆÛ?ó'¶:±“ÚöFŁi ‚*(R d€ÌúźÛ}!?%1_ŻŰà2Oû5€ńŁžÍ?0ôĆ$o/AÚ<‘(žxFæőÓ8·?™n$Ă”[ÀRÀPIâT\[—)ÊŁŸ83%dfm9șęèM†Ą(?*Ì;ӔÙȚDJ+ Œ˜ÈęÒ Sò%șGós.1›,,âr)ZsG˜rêš 5§6À‚RŸÊ’hĄo1­dÀ+ Ÿ4Ô9–3†œÏ‘q¶*à&cÉÄšziŃędP „7Ț”ŸfĂùÜfÍjÛ38ê,f7€K "eˆœ[ÍÀs9‹TŠŚd H‡ßb œPnXÈ4éžzùŠú&íNĂ Š”k‰*Êî!Vڔ܋œY€Oj]yäy(„2ڊ…ZaÛ°Yâîl7e±k2#`ažc :!ă‘d±V,'œPn>ÏĄMÒŚ>—;ĄÛVŐP”C{ÿibő5™;ĂÒíŠ|8Üč%Î48œYê†vÈ%Ąę3ŸFŰ-\PąV1Hq[ÔőšÜ”X}AšMÔmżÈ=æË±çb{ŒEAëæu2äŸÂÉf oh8w€vŚțțŐÓ*ő‘:ćVOi*Í$“"•1č°ć”€^ĄąÒ[^ùۇV ZYȄű?è2ErA­#·T»CHÛùeŽ9|ìč{ú‹óŃÆÆ?ßkU§p kűź™ úۍ¶Ò„ú{ČÀBżwőÉ=遲ôYa”k/‘ŃœűĂSôŐA*/ŽőȘ@âZgĄ*Ćl°ŻŽ`‚ ĐV5äí.ßÁčCó,™ČYjĆU:|+ ”źÜ OÿÁ·΄GG«šÂŸ"ÆZ!DźÎÊn#›žŐŽŒŸÏôÛ”o1‘đéś^ßc/Æț‡ZbŽrfC­ŽDFbł©©|uÆX€đ”~0·„/ ·ț„ąUĐLÔđE\)ÙčplEŽwŒőì„URž7*őęVrÎÛć'a=$UŰrlĆĐ0öźä»ßlO€™tYí2p¶ŒÛ‡Eœm‰œ­ÚŽĆGŹfż“Uú 6Û"Ò ŸnJ°ê‰©łĂÁ­öž§<Öyûœ{œ ÀęBÉP7G€ôqV ùŸ¶'@”șoŻŻM°mžæyMŸcÿȘš9&ÓŠ űÆĐ§Ef)°+Sy“YąìŒ™ÍÂôpç Ó˜°D0šUĘÏZ2jČ·J™ dś¶Ó–‚6I}”üƶg?>Ÿć—0BoÔłÓă )ö””:}XűÈœë>ttÁ")ŃE'è&0ƕ2ČvGÌ à(iîŽvn7Mhé/ČÊŁŚN€YĐŠ°=·ûćțß3™IęúĕՓk8æä—6ÙjœÜ^xxÍ ûk-0î¶ä…JőZLÔí@ê}€ęŐ<=ÉBÚIvuUoeo҃ć!"Jc‰ÓyȚgiȘè #@äü‹¶Ć±üaEńÎO”A[Û¶—‡Žú/” Žcômwö™Òqö: Hšî“°ÌÍś9);ûź#mœCë«șÊvόgzś8eÆ|±œI^ČT+Ę|^uY'Œ+ œ5Ín‹Ż»Rțąù@Ï9lJXÓš„ÒDò&@Yž‚˜rO‡včé_ lUßXuđɖGŸùđ\|ÊEêÀŠUŽæêö•ș ±9o) TR­EŻ8Ìê¶ÜùM ž’|_źőKă­gu0tĆ­ŰAŒŽjűùûÍ·êÿăWV»!ӝł°ęôűŠó$Ą ˜œCĂéT1`a­'­Æ” 8™Û»É(pFë|Ń,*{Úu`ś©^J’ÚÂp9ϜĂ)oÈ^”‹FŸń¶Ü?ëê€Moùí«Ă'Hl« ć7ïÈűȝXW3n{ 4)äŽAVÉç}'Ê)T·gÄìvŒ­?ëë’@æ§ÇX}YLì]ì gë êÆóśžàmæWí;Ô9ڌíFÖ5o«œ’ÓȘ[«ő5‚ïFŽŠŽKX(5èi”/,è 7`q%ŁŸ‹”PUzć68[2q€„âá‹Q0ÏÖÚ,ÌŁr\ĐłÊò‹žÖ%‚px"@`ÏöłC ZÚÇè};"jÉR«‚ g‡)ìÈžĘöâ Û j=yéG› Ű9˜Ź( œ/€ą¶+yhì/-.“Q{€ÉIMFhÀ Ș/ï0(Wð0èÍUÌ «C…§Wœäƒ&"¶DłX[”‹FŁ§Ì”áÙŽiӍ›—€ò2+hńÙ­áY6xr»YŻ[p“i4”ôŒĘźÙy“$~<àé9kê UëvùÇdcŽ<ïđ ˆ{M,h}æÉۂäcŸeډwuQ5°d8_.H”û‘í9:ł:hĄ1'ČˆXmS )Ô;B°0ÊđhHV1çÜ.a–1‹– ÊžÄæF°s‹ä†bčç}^ïj§‚M°ÄŸˆ3­pöíđJsèźšxû֗‡ææšŻ±? 9­ÛC8{Z[łÚRZĂ>ćÙtu°3 ErćT ۶0\Šo||ŽŸmčUNäƙ! l(a~Im+È٘Œk%ŒŒIêń·Î.4B*ż<Ț0đ2-芙Ći±aƒ4!?xpŃueiPNˆ€7uòô^`ś©ękƒqóf^§ë:.;–C^%è…ćä"îȚ8Żă4PÈȚìkÏ@đIÍç?›#¶XՂE>" y,Èl9ŚÏ.ÓčâÀq_à[Ÿ»SÌÚŰ46fGtæj[Oˆ3vàÇ«JłöBЁXÀ"Đ_[3Ÿ”7ćlĘáËŒŹA$öÛf@ wœÌkžŸ^€mæKŸp!"KY?œCùS»<*ZÜš…5\l…Ę„éőŁ[iŒcÊ?ÂêSeÛșőòéyő}ržȚTąŽÌ­XxyTëÊ]5]qFÖ%úśKžÍQôu\ògaûpp=Ű@ $Ąmr ët!uÜw _ą§€țîS* (3č}>~Ûbԛiî@,@G+/cy*a«ŃŠa†9éϙüW–Ê`À-SŠ7ł…ăûțUźŽŃfÇ"ÉJ,ƒotQù!—i‚Ì„/Ë=ÀŐ?ÓZÛ N{‡ö…­FëLŁfб<ïč/ÒgnÖ-ûû#eă|‹{Źú͝Ț)«č%ì(«ië›d(°8ÁÒÎüæŰu òz§„€ÚÙÎA,˜ À{Ìz©k†·KX¶Êź­[A0A*$jæŃA±˜jNüń–ëœX˜n&©ż|ÛÀșu—ŚI@q”TQ­Z”\>­55”r)ăžËʱ/ŸOČ`OđÆi˂ìšÏs :8…șsp8FŠćŒ _Ôș.–`ë=ÀdŽčÔ;àlÁèÎ+ié€đ]ÎjíĂyłXĆMß:ź˜śuù“›ËÿŠ80vÌă}Án9ÎRńæ6–’YŹNH őt‰G;à•ăl8Łž Rą3-Äây5A~łjT hì—oËi|'VßxۓŚb««ș…M)ÉÜ[Ÿ\HšŒZłöd†NYVêžPŸșá’É”M˜Ż­Xû0èFsZҌ”gÎn…ńpudÜŁ›ęŰ\œc&ßjʃ­'(Î Ù[4Xnz<–R{·I€uqł·æTśžčX>ÇŽżD^•xyˆÎUƒekQ‹{Æ:æŸű(d[ S’ńÙU°5`’Ű1 & w+-bÊêVXÎjćGx$Ù&óŁ3á|yšùÏöš;Κ2YáœpaÉlïrT=Ù€łs[@XˆÆæą„C:œÛsÒn­lëim”¶Ö–˜Í?kLžó.«_9‡Ăa¶É âN˜jù Ì/șG\b"@„ ŚÚs3ŽDÂ,DbłôŚ\f«^`\ë(~Ęiɝlż$`|žùÏrfœˆčÚVçÇÒùÌžät0xÓ 4j7äżÊ•9}”Š+a·š~3.”4ùŽÛâú„@đ"œ\ìś­û‘!@_†Ú"±7,çÚnœ3ËG9öÈĐî{"&ȚűÂ(JĐdĄńWź±t3ă@ÎRĐ~žÎ )șè ÒŽ€uĂúŠßż”r\»@ËźúóÀp yD_D‹Zgä8íÉjŸŒź$Èí?ĆÛQ~„wpTëxÁŸmê@Ę) őœ$Ő<çZdœœ’ą­{ŽÈbGá°íDzÒÙăెÄ=úąVuëdÙűS«.Ò4±^Ç6ăń(V§s]B\RÓVÊ `ŒĂNăߋ¶X=Á/î€s|2hÀEè6 vg`§zs ì„YÈàÈŒî?Ùçû==/)€Ę’äjIĂÈOŚndbe%I% ]gŸ7óĘúu'%éœŃÌrĐ d[1ŐŰ/ÍÄ̞3c »Ęqă/ŚP”t Žk›;ÇYŸËĐü©Ê8(èùŸĆ:Dç8W[*ŒíœÖ9Îțœ(HÀ[)„î2ăÁò‰Œ„TÀž«„ÖE€x·IŃN2IÛ.vŽwŽsZcĆž,ęŽÉѝtŽŻźP—ÜŻÚ·v€tÏé”R3‘źsÜ]òj‚ŐŸús\Ń:Ç;Ç;'c«§Ê:śÎÌÁžÄnîo=ŚĘŽ—7“-BĄșlçxPë)᎝ăăÁQ­7@ç8g”Ž‹č‘Iaʚ>œs-eú’ăŒÓČW&{Z§Ę(gŰáúq?śfxœƒęŸ-Ï+ÒŽőŰcŠ›¶é c!ŸOq:ŽR2#ä[f{wÁÖŰe‰Ïn˜„·oțZçÈÙ/¶kó_»/c(bÔ\§„ĘFy uÆó‰b挀q‚ĂÍBÆ+'hŒ3êrT*Ąd!Ź«=!!@ wcc7g|aPńo™Č‡—WkƒÁqÆ]3:šK+_Í„€źëșź—ëh’9`œòșœJtș»;•J­h϶Ïxą+șËeÛ±! ŽYęDRJ&MÍĐTn糌3Z47ÎÙÓCšwh08ŁV6qIőkA 5ÒZÇ!X(«'„”·JMz<ꯈŚûJ ~Ń·ćy“ (ŠL‰…ÈŰÀ źą|ăšłŃPé茙䀌ł/Ü%'e֏OÏȚ,H8kšG"RJ)»ûæúČŽ:TWăHU^͋ A+Ù5iW©yÎbIÿ^ÊXȚâZÎ-4jȚŠ#šȚuu§0<=ìôϟ”źź2±šŃ žYN/ž„j‘Ë{Í-:2SĘÒŰžžJŐŹš“ŐșÊBíL ±Ëœ ,h]ç-_w ƒ§‡4ÿ]«»: jÏžJ.™{''›œbŠŐŻ”ÙŒĘ{ü<Żí*'ÔŚżßÇì@,é„ólkËšmÙTÁ|J ČÁ•ŹĐPŐmƒéҁúe Derö¶sđśûT@œ{0š’1„p]_YšȚAە »AaĘêç$Í$ù$0Üüg{aX*|ærä␠€{Oj±wÜÄü‚łÀțž•Q)˜X53d– YòH ùùŒèì]šQèUËiȘÁžeOKÈașGKĐKìxY%È ÓĐŹao #hŒ: «”Ëó+Ű=3>!&!*ïu-©s  ›MčêÓGôŸ˜żqŒôęácŽNçqpŰC! »ŁA±ÆòjOŠêśŠfcÓf7Œ_ĄŻŽŰwYÏ5uȚÂi€ŚÙŹ}SSAk훝ƒVUmQsLżäÊQ(STšÈ œÖȘmš pńF]če·. ŒíxŻÄ40FK%Š» ©°dòzɰ›ëőXÊ„(„šn5ŁeźßšĘEbôš‰ŁC”*š<ßʐ©§Fæ—9șúÙ$Àè0Êèq3ßÜ40Jë°(ò„-+ę+ŻM(v8yicOÏÆóŐ+1_p)Ż”Û!YŚp|0vË(0xűžçž…Sj?>FûtQčÊ% © 슔,.4ił«‡#9sc>ečÀ6 ]òĘÈŚ|ÔoȚ±‚uđ›Q€» BÆpțŁŁÁ›Šä9iÖ€^‘7ÀNÿädÙŸH-gÇë@RÉ3ĘH­ŁR`»˜łlŒć] N@hŃŰK™Ă \­Ő…û’é­’CZsO­œ“év§6$=5=șŹŃȚäšÖ|ŚH™œ”=ăi(ž?/%Šg'g'óÌôüƋ竚?L™PKYŰő-rxWJȘ.gÿĄá[Đ3óCÇś7·{Ő…{ó9ĐŒćČ,Úóí†v CIŚÛ€°!À(UÓ@—ŠŽ™æN Ÿ9H“/ìÊùŒ1q“‡€o;§"»ŻòNțŸÁÙZmą6tÆș!Ԕ#“ĘŒY„MÙ ŁĘČ.váVhŁŃŽăĄ"AÊrî'ÆȘPÜHhlZjNsAVs9, öżî±ketR ˜^53Œˆv5Œrg€’„$}æB{ȚiŰőžŁ5ËȚ_î §‡Őn Ùî\ôĂ&IŠÓYŽóą#źJpżrg€…Ä«Ę0–3€–à@ž bó”?•@sÍpQZ=· ÊËvi§_™>Ö·œ§ÖŽ„™im(țæ/ŸÖÀï™Űń2­ùv§hĘôŒőkv°Ï;p˜ŠgŁ"éĂ0íú%,ÁÜqŠŠ©Nűæ /°Ël,·ëă7‡”dÚÇOÿ‘ ÛO‡Z0RK ˆőwć왔Q”KMéä°J7H§î*ecZÇ3{u€”6Ö WŻșmw†[‹ź&-o.,»J”œĆŚŐT‡śG™ đ/šĘ–GĘĂăl•±@í†ŰOáÇÉ·/R[ŻÆNŃŒĄŃ©ž?Z[»âë"a 2?źï©œĂfÆyäłò"œ[’ü8y_l€ÆòВńE6‡-]B8îę!€#ùr2ÙœnÍŒ•Ê>·Êu\ÛyÚeӍ©ÁÁŸ»ŚTÙé~€Ÿ»Śhég –nżWč4żí‡Œ&á}sĐÓxI©ڐMŰíȘĄ ‡Œ5›œpF€š`IlŒ?Íđ€Ïćös =[DH5Ę4†ŐœÖź~ŽŸuÆŚb;)kÈŸbőuäÿçUăŐMĆx4wÇy §eÇžÉćÀ¶mòćèë‚ûï Š©;tûőÜ74•¶–źœ:hW*!ÁösšpûĘeŽ*Äjy%Ä« ášzÆ»ÖyI_d …U–3M”„ûvȚĘ_°h4›łZŒ@†ły&7um[\Í©j2•őȘóSčź7Tèùmgâùa”œ­ß žÒÊĆÿ4ßò3TxĂ4Ç~ë/èŻ”ÎŽQ—P…œőj„śmȘrȘä‹ÍY\É\l^sVU`UæÀœgâûr‡SĂ·îlÙ°sé-)EŐ3‡š—qEŒ.·ž~ĄČ-Ț —i?g#*Š’B‚Œ)`Ûč‚ŃJ;v`ÛeËÉÚ4 4à•W3ü”ú@òé’:|/Ń拆4€Ë—m·Ž9ó„ÔŽÜRzlĆïrùČѓŻ[Șž*í6ŃL=Bkžžż Čöœ.”©źÙg*ĐnŠŚLŚúŽȚl‘ÎÜ#Żæ{󶚑iúŹ…É]WçÌϞ-oáÈeŰÚ-ç5wŸ\ÜłèˆÀsù+@ç"°îYÙy Ȝ-gŚ·J53îLčlúêï;օú9Tààg·č|9”ŸđŹ> tÄC‡sćY ”œ)öȚsńę[Ìyœ2 ŠÊž“bT%t„tEŠR•ù™€•md=çpä,s¶[š#*J2ățò ߊȚĄčeYzÍ bJ”Š+Ò2ÒKëŠ&èłŽla~ù”«Áêț;“‹Ó˜{ Đ\ŃK`î uòUƒ3àÈöŒÉڗŽt8_vUܶȘßâ~9ËÎ|žÇ|ö{ùí@§sxiȉ­ŠúđO/Ui)ûrêÀąŽă% đÚă7­Y·JMEÚSbĆY'Ü;ră蟜uä•uú¶­p’À6g>ŒÀ”ùî=—ì3Ł5Óßôlxi1îæ7y6Źą8íiFVËÊlv\ˆh óÏłt•§šÒ#·, ô>ÊÂńfÏXÍWšBe–”L>NĘ:ÀU!ͱxt|"/bەP@–”êŒT‘˜cÍV9éłlwćö>vE(f”^Y„éÒŠqd ĂžŁč 0Æ^Čç{\S7Râ*d ‘mKjb9æÇ Ő {*ăÈMÇQ $ŐDZćgčdò]ŽÌèŻ (ż%ÒÔ耎Iöo‡=át:©ŃÄăŻR±äȚŸ†úȚ)n|Zóù/UŰ·ùŃ·.„$§ĆɊxÛI­Ż±/\Ÿ4dÎŰŚ>#3:ÖĘŰśą-ł<ûqŸćTJ ÀĄ±ž—kŻ…êȘ›çR™8‹ÚU™@ —ȘƒŒš(Â’„ê KÁ„źUӚ܌Ìaœć7Ržż{%M‹ËF3°ÿ|ŸoŒš@̍wCeECŹË”MÊëŒĆ6É»šŸy=@†á M…‰mŁę}ï öqv ¶ÌÌ ájp_ÊmHQHŽ„{s8pÌŐ:œPiÛædÓt(zM+„X„őʍ`űp@ŽáÈ"Ąuî„;Šqhę\Ûă.,ÙśÌAÌVA̘X3mgźżU#!‹6„Ă /x±ŽÆ‘P„nțYICûąkłÛl4 .,˜6æ’KŻnÓiK5Żì˘rÁgïćù»Vòł|2, d¶ÄŻ-)ąć•w­ŠqÁí\s5L$-Ă7Ć ŒĂœA—=3NŠlÇß:(ę2êĘHg»ìƒìqÀ*-Œćç`gă… )K$œŽ3ńŸ=Hà|?M•·mQæŸS —«6óÆG©łƒŹœ| 8€h $ÎÖË€¶ŸGŰ3œ15@{ , qö țMóș VdŐ¶ÍeÒ$­UŹ^Í܄çúF„H)‹ (Z„LÙ”lÁ^šH\9gSŻ)Ái›âڰEB§zț&ۀ”GœnmrȘž„ò»ÛjæöŸŹÖłXw=țΗX}ČùŚȚäV_wd±ghœ›”è,͟**nŻ(śž ś>ê€áB•‡òM›[ćŽô}{çû=ț*8`A=­éM”ć±jŠ7ÂÓxù”àąí†#ƒßw ’ž”©>ÚÄü—”ś„ȘhC aćÜŹ`3©TÎä›5êÙ’șŽj+ńì›-RÛ)ÁwŹžàw–TjqÛl(B /oŠúr|&ĘʗŠX`ÏĐžp (PĐ Čő·<.ْry.+ æ’ž‹79±úș#kÏĐ~!ćNæi««íu„àȚsɞG±~Oó„J„[™žžê}»)œxzÎVÛÙÖŒűŹ?fSjŠ9o;†fwçóŒ6$Űò3X9 dU6\td%œ{`țKšgĂKUz–-!GÆí\{vꔿRæ'”š·òÓEtÚœ)YąIuŹ:YyĆćÖk!üš Ÿ„Ê©,oś/Ƃ sčqKȗ”Đo°€^—čŐŃ șÌ-„œaԑ•kźr H@†Őš«Ò·^/P ȚäGÀw[§+ 8ś^0B6:s(ÀÂqn?W]Â)če‰Ęę¶ Ź8û5@nk>Șcś)„ĂïÛò»CjcAKl;Ÿv¶^†`Sí„4g”qքŁÍH:–±5DțÀ’ùB|CŐb{7/żI7pcMÇ„œ–ÔÙz’[Ɓ|—YÏ­aha3Ìęđń9ê7; ±ćgĐĐęRțä—H„Lűu„ íÆŸžD]‚ŁŽ„š(Ù]uˆG›œu‰șu‰ô§”Ő5$œêžÊfć5›†Ź_Mz kV.ôŒ ęèU€íBžÁ‚5—ÒÂ/jpŒŒ««g9H•ëë°őiûY›Jæ óܜYŽÖìSuŻADĘÁ‰'CÎËł+nZ"Û2gł*h)?· Oê_”‚ŠĐ>Vyżóy]źțÎ7FęÓ5¶l‰čÊ0–r|ÂP^;X0Ngźńź©¶—VŒn € Ô0œ±Â)í’5zű’’$ÎúȘ€5 ȘVtŃ«Ú]ÌËóșîęâ Ű8ž«!äU/ŸöŽ%\fO-ŻLp~ź&\ÿCB(űn~ ç0l2őŻJAŚ•Í. ęVLŐh˜Ăé!_-("ĄR_: NJ]€x­»_©˜Â©}ûrÌcŸ—jä]dìÔÜÜYu©uÈ5,ˆčŻÏȚ/ÿÀOôüŸŐ_;i{±ŚÍŸ șn·q“qÿșQäż(Ó4Ёï ù6NUáh ±y~€u ”öK±hD,çmÓ„që°±BŁ4[œ‰Cf}(OdˆsÓËQ•fæ ŚúRÄUŸț›żä ș#óŻ‚c·rÙn‘ĘKQûĆŚ”ąŹÎ ù¶<_ùc!KÖőËŹ<[łCćfĄcw8^Ÿu/û§Čd”=)„|7Ÿ”ÒY)œBĂĘM'[:Cÿ…À·(òʊEÛ^oPvÄ{„”§ń?_čÁœš…òBóCÍjOFùĆ8†BP!Ôűœüÿă%% șő_ŹężűȚÍ0‚{ÓlÎj­ŁUvśƄëËȘíyűEG€”Ê*s:Ę”ÊFÿ;Gƒęęóïápaź7iUȘx€ĂŸ›‚Ž-ÁŐìż(sËÆ/~č~yŐșșæŰ¶bÈô5Uș" ÂÂ61äń.Ńá/ Èÿ§œłkm"ˆÂđ3‰N „žXĄ1•fÁ‚«ÿ? z/šT… J ÄNÛ/vWìÇÌä‹Yzž»ÀȰ9ûîžwöÌ99Őt+Q‚ŹœqÀ˜¶ï ?űL·?›šwÀ˜Ę‘k@:0«7W]J”…Œ>VJ)Çs_ÂT@SJ©3ąőàɈ€kk€+ łÊæW„éȆú”#»œYì”Éx‚ąWŽŠŃv(ÂΞîJë͆ČOPæźzóŰ·ĘdȚ-U/-”Zđk@ăÎá0°ęù·~”•čӝ“è=žN:ôŚ h!À!SàÜXoܛΘȘ5¶±ä:­”.Ï9çĐČ<$„a1Æy ïp} .4ôưQ"˜Âae‚pïI @‡©ŚÏțÌF@AȚÁó=Z1f»R Ä8Ë`»ŸUŸ8Újșš-ZA«˖Y‘­ìžö-9ćpïOu=‚#ZٟŒ\^},~v4—8 –ƒĘĐ^†2ŠŻőœű«ĂI§PG\. ûäőHj‡„àrËxxYÎìÓusDÇ7§Ń‹Ś€bÿ[ÙpÉòpCŠTE°‰Âá~Oű‡Ž8X•ę…ł%M) ûg:ŻÄXˆĘ,ŃœŽ/ʰó–æx‚Țr‚đÿS ÙÁ"
Zed, you rock!
Our integration tests like you. passenger-4.0.37/test/stub/zsfa/zsfa.png000644 000765 000024 00000141555 12233035540 020577 0ustar00honglistaff000000 000000 ‰PNG  IHDRć\žîHsRGBźÎé pHYs!›ò3tIMEŰ’ctEXtCommentCreated with GIMPW IDATxÚì}yXWöö­źȘȚwšî†nèFp5‚ŽŃÄD!‰f™I\3Ù#˜D“ű…˜e2Ł3“}“™É2Ád2IÆ=łĆ%FŃÀPÙihè”z_Ș«êûăj„mDĆ|菏¶eSË[çŸçœśœƒÜzë­ Ț A€ŸŚ…–P(”ÉdWŃ ûüț–ææîîîD”: 9Ž˜ÁuŚ]‡ăžĂáP*•CûÓżúê«KùŸz}ŸV‡ŁR©’’’ärùH{ü~żßápP4u”àU$Ž;V&“u›ÍœÁ MŐńcÇ\·Ïëi'Ćüą)á …B#ë‹Ć8Ž2 …lV›H,‹DWdqŃuTúš€?`2™Âá0Àjł‰ÄbE†Ad„â5žĘnšŠGÚęeh ‡œïÈDMÓ·;Èd2űjđ%WÈ;;;៧N*†IJNțáèŃ@ hkk‹Ćrč\„R 6†°Ž@°Œ^ŻÙlvŰí$IŽd$iłÙàóéŽ[ dɕĘa "‰&Mš€Q« Ăx<žÓ§O{<ž‡ŚŸœ«!\AŒpÈz}Ÿ`0ÈțŐÒĘ ‡áŸe2YƘ1”šËĆĄ„èéé9ìœ9«ÛíțgC ّ쁉EąäääIٓ ‰uD{[[ôżNÊΞ_ô¶ “ËRRRéêìȘŻ« ;–H„</ü3|/v{‹A8ˆÏçƒ`U*•„3òÏA EJ„Çíîèè°Y­бéŠE‡ƒą(‘dv>űàĐÄ<.W$r0ôg^Ô “$ćœœoŃĄÍ«ă}‰ŠM›6iÒ$ ĂŁ·~ĆôzœD" ‡ĂíW܏<݇Ăb±Đêg^^Ïߑ|>ën{<‡Ă GțUh”ÚTCj86wu1 ó#Íćó3ƌAQÔát655EÿÓÆ+MÓ?;^œqŽP(T(*•J"‘œęC$I:ìö`( ‡œ^o(rź«âąŐ”Új”Æp…BźŐj)Šêêêr{=#Ż?݁Ôj”L&ăóűŃÙ,!ÿG& †0 ćńxÎ^ŚĆărՍÇă1™L>ż?šèt:.— è4™‚Ą`0›ÍFÓtfVæ |ÊKô·°Ÿń7@ƒÊž8 ‡ą ȘÍf‹ń±Pz”š^â.ĆŠNJıcÇș:»RRRŰëÒ&i„łÛlšŐjÖżü™ŒŒ'‡ă<O,«5j™LÆăráóűŃÏI™ ‹JĆOéÂARR—ËíîîŽöźpŚ%'s螌ëœRą‚ŸńÚw”G"V*•‰€CÂăr% ŸÇÿ‰];ES­Æëő†ÏÉd2Ɔ±žÛX~ÆëHYd˜üÿùòiЇĂÇjkÙŰĂ0 Ă ue‚ž#Žżr8E‡U7É(ÀŸLéçW[[[$ (Š:ކ†>G„F«ŐšŐ \©žçˆĂ«P(‹ĆYiÖ1Æ3r ˆh©„éìF Çć?Í9qF=èïW(ìöÍărm6[_ïF(‚‰Öÿßđj0Æ4ŁÓá<}út·Ù,‘HR ©*•Êép"Â0 ڇ&Ö§ _ündá5#5žèŽÆ #ép%ÈՋ4šDœŸ!–€»ÎÁƞkÎ5_ x§:»Ńošœžr.‡íʓ$ُ!'IÒbłJĆ.‹rĐ`( †„BáUQ>pé ć *•Êëójh0a’ ‚IIIæź.«Í†râ3Éö¶vőpFHG ^•òĐÒ{;tZ*uÌ ­ńžp ŸÊđw™*`ÈbéìéŰÌćżqGîéÿVȘŽZšŠœ/TNAŸś’?:BĆÈŰQ ‹Á+I’”sE‚;—a钓»:;ëêêFíőyƒÁ`‚Jeí»†C1>Ÿ7ŒoŃHÈ̘B<»ŹCźčoÚ-»Ú;1<AžGÿÿ€ H•SČrVˆÄj.šș.»­źQèĘ#IÒçóù|Ÿp(4ˆT8CÓBáșÁ@ àp8|> >śÓĂ+Šąb±Űd2ù|>>ŸŸ RùŒ^»ĘÎăńôz}ïくÇÇúΏ „>ëJuùC]Écț4íŠ2Œ«ŒFç…ßțô„ ΌûëUŽ)ć—$ƒäp8 Ł’$í/łőș~Żï**韚ĆçóF#†aÍÍÍ6›M©T ‚ âւû|>:Œ șÂö‚UžúçäQĆ˜Ò<†Ń„Í%M“2Ôԋheă~O8ˆĆ„išÍfaæš0€9…Ÿ^qOHHĐh”n·ÛÜŐ "‘Śë”Ùl6›M§ÓE,\n(j úéŰW„<ÁȘK_:èÇ ”yőśțúöÎK9ŸÆhBĄP4{c5.~ŻŻ»»Ûét++șò… Ë3fŒL&łÚl=Ęʀp8LÓtÌźBĂ©‘œ’x]őH›H]€K_:$7tòȘ5ÚS.©ÊW.—«5j‰T* yçVo;A^ŸaŻÏçÒ1‚Á A‹ĆăńüÄP+“Éƍ'‘HŰë""ŠLM&—Y-—ËER‘‘Ć8Êăò"‘AžÖŒ)Ĭ됌)ÿEŠÒEeR>nÛÿęàƒB‘Çp.—Ëç󡮊Ïçûü~žăGŻp(äőzûrÚ† ‡Ă~żĂÏ&„~‹Çă)pƒEü~żZ­fh„#‘É‚Ą· żb|@È\J7«‚»ÍšQ/aÆá ÙăÔ„/ćò“/ĆÄ:ìvłÙl6›çÖ„\Đ4ít8݊ö_"Ą0##cRN6ŸÏ8Žșúúèk‹D\ĂÓ!`đx …B—"5òÖÇÂ5}æ3Ç8.ę{BçÖ„'ŻŹ ˜–T,aÍg·ÙÜŐŐMș»»y8wdá•$Iÿ`ûŚĘ>Ë`źWZ“Č(%92B*‡Ăáóù2©4úCŠŠFxW„.H1 ӹՍŠöŽè(ŚçYxœ”5)Ó­ÒÌwă*C”~ÂhËHxą|Ą@ĄPD« ]·„ÇbłÙÇŐîAțš”œ”““šRÁö,JP&ütđša$šÛ‡éËő†&Žčê!† ĆąóoîyˆŚçcw€P(d±YŻjÈBŠ[ćLžLQTSSŒÌP(4LEíW2ž5|€a&Q&ő”Z­X<ĐN-<îy€Lô‰ĆÈèe·ÛŻV2@S‘l6‹íŽrșĄa„ ĂeźÀ>BSBțYęÊp,…ævčŒÓEG(‹Íêőzx°Óá<ïJÉ™tÜÆș$IŽšn•_8ŠAțÊăò é‘+äŸßŸ0œębŻ^‡UÊÄÚlšJp)ĘCBçął°Œ6î1~żä°†aš‚ ©ŒaqÏm)ƒŃëőęț{Vó“Âëpßńł62ÚWčĘî`(WÂČÀ‘đąz€śÍă:^ćă©0. ‡U|ê SbWœbùę~§ĂÙŚïőÊAxß|çBŃÒmr 2œęŹź^yÜ˱ę]]ź·ËćșșNÒE‡U=Bü- ;†ăËá ’ ŠđU„’$ívûUqÂA˜:M]]]„BÙӎ„I‡jüDđzû, ÀD|îÚa2«\Azk—aéœWó†ćb#_l ‘JÈ0 H5Ä"K!0.ž1ztCCCôUP45„JöËŠŚ—V^4oÔ?Jë^Ś™aČŻÆAő„‹s9),[Às‰±‚ ÌfłË5rûąTŸš"Š °8Šé’“u:Lœ„:„ËÒcč*ńš–™0mCú”'Ÿ©ÊęÛßÍĂŽę!ćÜÿęemÇ>$Ść¶€`84’«kpS«ŐÛ ‡ÛÛÚŰH$ŃétáPˆ+ËäČčúđ:c ŠÈ17œ %"‘:1±Çbiiiq8^Ż·źŸź«ł‹ąš'N`Öm6'$(ő:ę™Ó§'eg•mș|xí±KüADNï–Ë— †Ö–cZÚpG!.kš…Ăáóù<>Żwû7©Têóû}~_ÿÙČȚÿʎù”H„1â„+»AvNNKK Ԛ!ÒqNOär…©ÓÔÓӐIe©äÒÇU_>ŒÒ4ęő·Š[xuéKii•••ĂŠŚ‹ZrčüRÆ;òù|PĐO—B8êšIÖ;á Ht*ˆą©p(ܗÌÀa· Ć"©X2Bò M:uŠŠèôôtÈà‰1 ŁÓé:;;ł2łŽŐ֍ÆnŒ‘ƒr<.·Çăčône—ŐßÚy@!@Ă?8çÆ^DÆÈçóq8ƒčBĄP­QLj\/àTqčđWLȚ栁@­Vóúè»áśú,6ktśƒ+ž Ïë“Éd(Šffe) †aà=ŽZ­(Šv˜:ŠüâÉÉÉ C‡‚Ąîžn»ÍV[{©AÌËZ gwrAß)žpLo;ńńƍe7 †ŒÜ܇/ÄśWVV:ŽÓ5ő©IÇ‘Ćq|8Fq#ąT*ᏊŒÄŒòŁ#Ôć7ŽĄp˜ƒ ț`†Û„BĄ*Qe”XÛ};##ăűńă0ì‡ÉÊʂŠŁœƒS•Ćłț  tĆœŚ3gÎ̞4iûöí‹óóÓÒÒ>Țžńąbyyyÿűì3š9Bž†śș„BĄJ„>aŸÇ—I€J„2))I­QËćòhŁëśúì—kT9ESÇjk=OG[»Ăá0›Í§N2›Í.‚+䏌/•I“’’ŰÇÊçóÙĄsC8ŸáRŸ+Žă5_.äô•)0Š„•””8ÎććÙÙًóóónș©ČČČƒZTT”–––““SYYÙÒÜŒiÓ&crێ=ša+û0.Âr뉣ïRž_}§b"É+Wź4AädggOšśúÚÚZŁÁđÔȘU쑃!;;[.—çææÎ›7Żąą ›Œ&1WÖŃÁq\©T*à}…B‹eX°Ț/CôžFZ=sæLűg˜ô(är›Ę~ŹŠfèOæškź‰{SJĆà H’t8}…Çxń4Í àóÒú±3z`Ož”Ƙ (ĄMKKs:ìyyyÛ¶mcC Ăží•ÿĘô«WßÏúđ*†ȘU‰#§Ă0^Ż—­Ő‹Ćì˜E–À‘n·Țzëț\’$Ï4žŃVE§M›Æț\łÙ|ìŰ1hż‚Á`_o.‰őîG$‹” Ć őù(ŠòxŒŸNżăDÜêh0Ęj4ă~V«5FŁö,ŸȘȘ ~HNJÊ/(èééčí¶Û %š=ôbMMÛńÓąĄ‡ĂQ*”#jì‚ <ÏçĂ!†fÂá0I’|>ŸœđÎÎNűn[,–P(äp8ÚÛÚ<^/—Ëć ¶U-ESímíđኄ„9sF"‘tvv:Ÿßçq{ œÓ&ię>ołU\\Ê㩜„ŠŒńö[ÉÉÉÓŠO‡‡M›>}Ǘ_Ț}śĘ›7oŸ:đ ïWBB‚ĆbaF!Ÿá ’ĂT„ ˆËÌúڝ]¶ «éó ì'~Ż6ÔÂçóŚK[qŚ$Ș5‰jÇCÓ4EQ2čL.—ŚÔÔ@hÆ\ûICCDí.?E]lț Ă0©TjHKłY-4EŁ(‡3àpAáožvÄ3O­ZžhŃkoŸÁț—Ś­ÛČy󄳂˧€JŽł1/ à‹Æ.^ŒžŒŒŒÿÿŰÚÒÂ2àysçÆęŒbڟO4HÄyaŻŚËF¶č<î X>’$§}9™LŠT*Q /0Ź Ă .ä)ärč6))©ă'Œżùæ›3łČښNű܇ÆìNûwÌ«©> 1*•JĘçś+ÎÌÊbł W^ĄU€üæÜè 0ŚBç©¶¶¶/í)A„„„EO=EœËDKfii5554élú‹üçŸÿKèę`\Ä٘Lp+.J7(\ƃ·c íÀWzzúÔ©SgΜ9){Rt; ‰D23w–^§gŠ­©^(H2@FÀ”)ŚŸüÒK,4§MŸŸąpeÌŚÆ@ÿ*À+j–Łûż–””Ź[·..XóòòŠŠŠ¶oߞ6jTAAAMT~ ˆuëÖ †p ißźąČM©áH'—ŠéèN«<.—Í>°‹ÏçÇôÁdƒWŚÔB„R|t&ɐf„;aOwÄŐšŐS§]‹ŁĄÂ$IR’ błožőæ›ëžśŸ'—.«Ż«ÛșyË{~™•ó”Çj‡ ‚ÿr‚€Ûìÿ á%—ËćryïŠźŒŒŒh€–———CĘÖâƆÔÔÿđ‡šššÖÖÖčł=máŠʉÿxhš¶ÛíȘsMóx|^LHĂ0‰DBGš‚;LL‡uÊH·Ûí—Űóđàï4MOOËku:l‘ÙŃVo±Žóy țxމ‚·ßțóăO< p»Ęn·ûÒőœ-+`ÛÖ­CÒșŁK0 ‹é§čvíÚùóçGăuĘșuŹ%%%óæÎĘŸcÇȚœ{·oß^SS€òț=àâ~öŸ,Đo€¶­„ŸŸÇçp8ŃyB˜‚á  áx œę$’ŠôVEišÆqŒąhŠą0 Óh4‰5àTęy.›nÀ0,##Nìtv¶«”F›Ł5Äp ŒśÁ†æŠ–úșșÌŹŹ…‹efeșʞȚ–•$ÉßęțśCCr†V 15kjûì<Ć/n:ęaMM͎;Öź] ÿœ““ÁZXXóš;~\&“íĘ»·âëíÿÿ­ 1nV_K­QĂę$IúÜ^éśùâÆ ärùÇkcc#»YśOUŁCcƌŃj”@ zä{ŐRóCu4ŻP(Ÿ€ŻŃjq …ü2$+jȘżĆQÇküńćwè]ŸaĂŽéÓó—ÔŚŐŐŚŐGÇŰőÀœś}öĆçÌ„±”K”ŻśÜz拝Łń'Žn gbȘbČłłwìŰY€łčyy1`Ì_°J`kkk]°ÿ{ù­3šțńßńĂ<~_s[—ېìüóșȚ f<1ˆWX~ u„#ßžŒô`ŠȘŸ#Yˆ`†ĄÂA E(Æ0f¶4‰ê™3gZ,‰D"‘Iqc&L’†ą”ą©Óőû)F ŐèÒ3țknżăîśȚÿP.—oÛșҀ­›·èôúü%g՞ÿțŚ—5”Őٓrš›Z>űë‡ uÌ”Œ}}yŐQCČ«­KV{BúM•ȚJ ôćŚN˜ș.)mIïÉ[óçÏ/yûíŽQŁŐŐŐ0őșnĘșÒÒÒÂÂÂk&N/`wÚEBđüïßÀ8xfVæì9sȚ)]ïv»§MŸV_WŸ™•É2úșș)SÆ‚}èˆĐôÄQ¶‡vŽ[gęțè@đÁą6??ćŠqœ”––ź[·.zG3đËćryEEEŒ°a˜œ{śnÜžQ(úțÌÌqŁ3F·”·łٟ5ÿvìÚleĆŃA¶y đ<{„ Xz,P—pyÜ~ŻŻ„„%11QÜd«I IDAT­Őđy|żÏçp8BáPĐ@q\*‘đù|Çœ>Ç#IČ««+šȘF#U©PHe28W›$IÀ ǂÁ ÎĆ%b Ï3w™Ífs$Á0,‰œă@*€©SgęćœČêêê?Żs»Ęÿúï¶lȚâq»,Zc«Śź‘H€€'–.û[ه$9Œ=ê.Żę8" ñtYŐĄCЂ.XްŸźŸÓdÒéőÛ6oŸvút– ÆgN·ÓôYŒZmsŃń,6žwșŸàuO+>ÖÜÊyëƒLGćççĂp)<ŠČąbE šU=ĘĘÏ>ó,ÖË„‹Ï”œhmm-..†ځ Ö˜–CïżïŸ|öYȚîĘʝ˜\ž[XŰ^KJJŸ9űțő9ßLö„.)’ęű†q:(ŽÉ$ҁƒĂáđü„“èîîŽȚßč\œÇăCAÓŽßï€Ńh”8†«T*.głÚÆfŽS«{zzX°b–’’"SœwY‚ëőùú97ŻŚőÀƒŠMŸ¶{Ś.“ÉŽú…5[7oŹ(\ùÇÿăY,X+++›ÛéáŸÚ‹őfą6» V%F"‘~fL!źŸB/|4ĄćÛäryNNNÜÍwò”)«ŠŠȚ*)ùă9ŐYôê]ăKÄEĄ–]&Ó?>û Đż? PHÈ „!P4Ϝ9ăńxbȘ+Db1Îćb `(Æn·‘‘ÈèŒŃ†Ń młÛ„‰&QÚÚÚX&0a„*GÏ{ÄŹÍƒęàU,–Ż=vę 7˜LoŒęVG{GŐĄȘÌŹL^żeó–ü%™YYŃș–őëŚ_ +zqbîšĘn§#œ›ÚOÛ žž{ÜČæÈŃă̶mÛäry^^^o° ‚7ܰv͚ù ,}ôŃQŁF üä jŰû-BmïżÿÏ_ęJäó‰ąKˆ¶Ÿœ<ƒÁP^^Îđ^Y;áUćNźȘÛ* …B!ÇĂPÌfó±ÚZ—Ë Vč\>zÌ•:Q,óž\”ƒąA@ZZ| șL]v›--#=455±›ĄV«U«Ő1`%I’} t€ż±-.ꥊșêĐ!ÀĄïN›> f€R©T*ÙșyKÁ#яiçWÛ©Ž6üąń ‡Ífł„Ç–XŃȘ°Ÿ[|êłí‘O·FJJJ Xă2Fóú+ŻÌž3pßęś/_țÄƞ"A°ś[ëùWžl»w·œÿțńšP(N?ńD‚ÍH?}Ä0"MKŒFctšëęònM•\?4n‚@Ù?2’АT€««ëô™3'OœôzœìĂærqŁŃ8~Â>/¶n™ŠPț@@ĄTTÄd2y|žôô ĄPŰÔÔgbÁĘ8ăGf|ŸČ§ŸA„8ÎsfH,Zžuó–N“iEáJöI”mțđÏïP4ž<ƒ™1…ŒőAdæŹŒüüüœœœŸhźĘnśOïŒF^aŰí·ĘńŃßÊêêë.ö'VVTäLžüÆÚ”ӎéțÇ?ú:ÌźR%’c99ŚTWó#@ŽPЛ~lÜž±æüîN.ŰČŁaŃŻP«=ę‰ìW—©Óépž=á‡`EQT(&%%éőzŠŠąŽà8Îăńl6Šą(mil ƒ‰„‹ă'Ožìîî†@iĐÛćű‘„B}%ŸNłÍêžqÖAlĘŒ…e0&ÀÖÂï|śÏïáË4PòÜđú‹Lš?śžćoÿ lPöŃG°Ł`_Gz<žÏżŰôë{KÆèŃ„„%q›v ÄĐ>VTôőÔ©Úûïï똛ïń,í'Ož}*1-ÒŒÆšx­ÈŽgÛDSÆ{î»ĂáèììŽXÏ'‘HT ©†TGŃy>òD"‘D"A8„R G$''˕ŠÚššźź.˜©‚c±mmmœ…°1ʏû fńyXOëĐwerčÛíŽaA|Œqăë/œűÇ?ź{űĄ,v;}čæŰ`,sœ(ăÚÖÉ|Č92oȚ<šïç`@ “Ë]nŚżÿęïŹńY‰ô–Ùłó›ß<śÜsŹ3ŚÚÚZRRârč o=-횉PóÚÖÖŸź[[<ÿțû{[YłNW1{6À'Í8ç;żûŁßšk&Mê3¶ő™ûÙÿÓd©…Ú—/†a, à ęw.b†fhłÙÜȚ֍'.—›œœŹŃhXűâ8ŽrPżßφœalU„R”¶Ž455ét:@C]=;{6!!A›œT[]†‡ÎÉÉaóœ{CĆU!R4ŐȚVwĘŽ»L&À3O­ìĘÿ-ÌLżțșgW-ÿì󿳯’?pY'.a拟öYp·ùăM4àá‡ZÿÎ;q#ۉ$9)9ûškŠMŸž™•9zôèU$=‚<úèŁ\ÿĘïßÙىaŰÆûÚM ȚćËę«ŒŒÜh4Λ7ï…5k>țäăŒy?ü`oltj4v• ZÖĂŚ_o°Žlą‡oč*+óJJŸüŚżbÜžžÇ†ÙŽŁç±ĐDy`à I€Śë„iĐÀćrEÇ;cs ^”Çâv»Y°BŸN§KNN†&ŠiĄPœ+F ‡ĂĄÎ=ûˆEąp(Äö&ƒßŁT*€69I&‘^7ăúšȘG$9räˆŃh•‘ŽŁXotÆœçĘŠ EÒ=ś?ê"ˆȘCU€Ùsæ”m([°hášŐÏ>Œ/L‚0‰Âđêć”~Iü•AuZs’–Ëćó,XòÈ#œ1 Ï<œjÖŹ\}Š^"‘Čdx‹ƒÁ€©Ă€T*ŠN:6sÜì›o9qâħŸ~śÇA ìíZ^^^ZZZZZșnmqȘÁ [čČêęś›ÆŒQùìmêT‘Ï牗;çüźÜÓ„‚˜ï„oB\VĐÜÎTdrŻûnàá-ŠŠŰŸ–$IBui 2zzzș:;­6[t: EŃD”Z©P`K~ÎîF‡u)šŠ( "•Ë技€h“’Â)K8ŠM:•UͶ¶šLŠ„R"• ي]ă.KO;à7ÿŽgŚî[æÌžs›Üív7ÔŐefe=œêńăÇk}‰(A7ĄärăE±ˆÚ˜ÊÍËa[ŽF/„RyóÍ7ßyç]:œP_Wwäȑ€€$ŻŚûŸÿüG­Vč\Ț_îࠜ~żúö;îĐéőU‡9räôéÓęC– (KX»ź8g{ö†òČpŚAŐQ“ŹÓÔ©€kȘ«›ÆŒ™SY™tŸxYôőŸhtÖÖÖÖÔÔ@ÍWܟžç[=Q5pV—ˆò2‡Q—` à*žŚłńQ‰DąT*ĆâłĐü±“ˆPŰ;ółÿ­­­fł" YŐj­†ÇćÆÌ”›0aŸÏ‡ÚÂH$Òc±ôX,ЙăóxĂqۧÓéőžUJêž{–îÙ”ÊŻżùÆłO?łaß;;Ïpy*•ZÖÔÔ#—ßž‚Ÿúś›Ć!wÿœQ5,..–ÉdœŐO”zq~țkŻœÿúĘțę-[œWè%@Œzőê‡~Ú!šŽìŰțeńșu°Ûm_áҒ’’èąYč\ŸpÁ‚1Ł űŠ­$őŃê “Ë›Öź}ìÜ©fggçææVVVΛ7ŻŻv€*%X” ;zòÆÄ Ű$çY–ĂQ%Șü>?á$ÂdŰE.·+Úm‡”~ƒðȚ/|ï†_tww›Ífz.—›˜˜8z̘țe‹ÍæŽÛX1«R‚‰s~łb”X,Țłkśô믋ĆU‡Șnș)ïŸûnO5dq’Ső Đl_©AĄqúśżźŸìŃšüć_PsçÎuč\œçaűęțÆ3gh†‰Ä&%559)黃M&Stb©°°EŃ֖–-[·j5Ú©Ś^ëp8öïÿ–ąèŸŹl(*++ûàƒ`1 ÖTWÛŹŽ§^,VïÜƋ=kș‚ÁkçÍûhß>˜ĘéîîŸí¶Û>ÿüóčsçöôôÀw)ö*@*áLœŠœ„+­‘!Œ:…ĂaŰ&Ì PȘÛÜĘm6GšˆĆbńùęäùŐMzzșH$ÂqçâáP˜}ü •J€çŸ6béé±Ùl«„ÓÔi±XàùĂàźV«í?í~?Ôz“$ÙÓ!™$ȘäŻŒúÁŸÊœjFŸ’r軃Ù996«męú—) á`ąc””P†v§Úž‚dggWîĘŚeé±XÖŹyaéÒ„Û·m‹D"ó,űęï~ĘȚăûȘĂ]Âćzûí·ß|ë­H$Č`țüńû3ö„„„_îŰQQQÁ>'€êăÇfć/9Œl™ńwżëçÿvź_ÿÈùT»€€D©PŒ°fM_ÿeûWáU©ćmœăüçyZž›ČĂì @$éôz™T„ўšR©Ôj4"ĄŸ|_­VK€R±X,—Ë5‰g›öÀŒŚ©S§NŸ>ĘŃȚc&PL(“ÉÔjuÜŃoQŽć†ąȘű›†©”ò2.ëÆçž~fÁą…‡Ÿ;x軃+ W–o(óz{Î4ž±XÜGŽńx<—!ƒ5Äö”«]ő˜ęőżĐùùù{śîí+òJQTWWWŐáĂBìž±99“„qCĂ)§Ó)›šR ©S§^«R©|>ßgŸ}æśû3337oÚǍö‰ĄíÛïœśȚ믻.Z_ wîÜّđÀʕźèxőÙ€Í6ù±üŸüśÙìCećΝ;+++§š°Ó š1'že†łËšŽáêêêâp86«U&“EϚąC†IšŠ!E„ƒpž\źÍfs»]Ń;†X,NJJK%üšŽì‚ÀÂ)–ŃŰŰèv»aM•L&S%ȘÒÓÓć čŚăMNNNJNőë==ĘïśóÍ7€ìɓ_yé„TCÊÍ7ßâśû«ȘȘbcÚĘĘ===ïœśȚΝ;{{K;wîl“Ë,*êÍ ŠÜzkùŃȏććĘĘĘrčŒŻ9€4 ș­ÁysÈïŃdĐ4íóù\AÓ4_ÀgćW0ȚDD{[̎F —ËŐét*• O’$ÂápčÜ`(h·Û‚pčÜźźź–ææ¶¶6ÂI„Ăa.—k04jMôPA0śû|lŹŻełÚNŸ9}„‰*•ÁhŒÖ‹1 ăv¶\3qȘ6Éđ«;őÙ§ÿ?aüžÌÌȘCU˞xü”ŚVź0ë(^­ö•ą©WŸi:сę,č\ž““=iÒ€‰—<ú(EQ”””K}tĂßț–ęĘțꇿÿĂĐnžVnÛșőî_ÿđüoûÂÚ”ÌńĐęüûqÚp—””äææÆŐ…!2)'ûœćËè7J}Q@4nÜ_§Og;Ζ””ÔÖ֖———””ô_–žđŽĄĐőÉæHŽl^.—ëô:œN ‡~żÍfs:1š@ž]h”ÚŸŽZP'àt8N'ŹÊ …r…\—ŹŠE1‚@Öá‹û9»z·Ï€áˆXsîk<ôđSP ÓëśìÚ -›6•?^ëòô™ »őÖ[œ^ïź>p;Њüækïžžy»rč|ȚŒyŸ|òÉČ„ËJŚ—öNČżÿȚ_žxryΔ)Ÿ~üqfV–Çă¶Ûì°Éë3Ï>óőžŻ{oIN‡cÁ…}ęÄő„„ŻŸ Ù¶’ˆĘX^ŸmûvÈ( ąŸI,[œzüdçțñ†SŻŚÓ4 mjÜą?@`0XÊ ÓBĐ3ŁhŠp===‘H&fŐj”J„ž>=îŠÙ+t:Ęűńăc6ąH˜ ‘—^ùđÒőÓŠO—J„P1űÇÿ0zÜè·^¶ÛÊ0Ìٗ3æÎĂigpŁűúëŻGz<ëXoT*?v@”JÙÙÙùùùĆĆƅ……FŁqUaі-›a Œ &S§ÉTSSłÿÀw‰dé#K`S†C=ÿüs555ÙÙÙoŒțFæž8Ć«óçÏÏÉÉék«""??żń·żÖs%m‚l,/ŻšŹdș}ûöYłfős4 6íhża*";Ÿ7†Ăá¶¶¶ÖÖV¶Ä/fA! ûrr0T­VËŠł!RÀj”F"E …Z­†Q­!|ÀrčÉÜu+öÉæHLäźOçEĆbqôF,—ÉáqčBĄĐïśûŒ^˜Őj”2© Ă1†a.±núŹçȚ<==$ÉàùÒl2ĐiHËÎË»čŸź~śźĘ0Ôșuó–ÌŹŹçû€ßï †Ț4€EêčŹ[\ö5ûŠ È[{Qő[j_ńÍ7­mmóçÏOKKCąÖ‚… 6û[oœ”zőêǟxąŒŒ|Śź]'OœÌÊÊúżÿ[Î Śo»íö{ïč{óæÍ/~űÙgžnkmŒ7î–Ù·D‡“jjj ÊÊÊúšË ëù|heĂcZïĄ -­­4l;+©ÌqŁG„ާ—ˍÖjá8Ó§M‰%b·Ûíöx†‘Ëć òs…‘5žgÉ0L0dgž)•ÊéÓŻë8ŁI‹2!ń•WÿČuó–ÙsfoÛŒyÏźĘïÿőÀW_m;ŐPăöıb1`eŠČąòȘÉoÙ]ü“§9ȚڟynmiÉÎΎ ŁÓ§OC¶Ç& ”II«žz*3+‹­È5Š„œùæÛ3gÎìhïXÿλ/œü2MÓŻŒôRù†Čëg̈I"Ź[·nÛÖ­ęîŁ  dMù‹‘Žš©Ü»·wŽȚëÓM§g\;Păąęq’$†±Űl–Kă™FŰÀšËćJ€’è†áĐ`ìV °X,.âŹVŁVO:”wWP„  šWŸ: 6z§t}‡Ét˜Ùe•ć/)hjŹușêÜęaëŒ±ÍÂ$ źÄ$^†Y[j|ú‰țLlÎäÉ댯_čreKK Ă0ŐŐŐçVKssET”@ (XüĐC? 8pà@AAÁÇ7z5{mń«»ŸÚč⩹ŻwíÚșyËê”kÊ7”„€Šœ9őƒÛ‹À €•?àż:òŃëż{_~Æi'À±șț*i[[[kjj*+++++ćrùsÏ>Ë–,YÂFX"‘ˆŐjòć—ÛÿśżŻ>ŸŻșșúĐá*§ĂY]]=qâÄő„„‰‰‰Ź]LIMćqčûö틖}ńĆÏ=ś\Œș &û”wߟߌőÊu§z n»í¶ŸČŃËjgß­Ș©óE(nJJŠBĄĐétj”:!!ąšp8ę€I’ üN‡Óăń„Ăa˜žED"‘èt:‰XÒ[ő|ÁyïŠÂ2„Țÿ€Qk æU§Ó±oŸÏçòxăàòx>ű›ßîæčg·lÚ|˜Ù5Ő5MMÍżșóWE+JR(šăv»cD-Ś^{mïÒćr-_ŸüjČŻŒöŸș€ča`”ꀀ€ŹŹlăǧ„„Ć$ëę~ÿßțö·­ÛvDo^5?Tżțúë~żÿ·Ï=ÇȘż+++áĘŒïțûŸ{îY.¶èyyyŚLšŽ±t ‡cĂæĆĘúÛÚÚb*ûr7ÿó”ęÆiŰÔkŻ5Š„=ZŁŃš5ꔔ”‰ŚLLII‰ńKzʊĆâôŃ} ŹžŒ cP(œŽăxܔ‚ †z\͆” ƒŃăV°čЊ•_ïÚ”ö…ÿ ‡ƒjMjÖűŹȚ_+‘IăßÊ«‹ÀuàšüŸÿâ=™Ï»àžcÁpiïŒEQ‡Ł·T€Ëć.[¶,7/ĐP__XTtßęśòńÇđń,]șlæŹYŃ öŽœkî܍}M,Y_W YS[·łgo7üè1jì( ‰Xč4Œ@ńyü±cÇöz˜›•I„ô`ăgً\Ö+©ÁikkŒŸ0>dNËIĄHę ·îÙ”[*•J„RȶnȚRđŰŁgN搜2Óf1L ÿ\ÚU†WÀûŸÒi©§—]àȘ`ŠjàĘaĄVű›˗? ăí&“©ú‡șÍæ-[¶@ÄËćòÉ9“cLʟ™9sf_%"nG­šêêÜ~ł?:ăAàò''Êâ_‹T*틒rč\VŁŃjx\Țà:BgËÒcáqyIIIIIIjZ™ ‘JEbqCC‚ z>deîń IDAT.głD&}é•wïÚ„ÓëË7”efe˜À‚E ßxí·jmwVđuAćŚYN‚cW Ż‚ 8. ጔAdPțúĆŽÇÆZtkÈÍͅńâââÜŒŒță†=űàƒÏŻțœD"…AőéŚMjŐȘQŁFËÌDQÀăqŚÔÔôŽŰŚÔÔäLž|Í€I[·lxșˆè·ÙVl,öë‰(Ÿbß{Ÿï ć­Ú€$‰DąLHPÈ|Až{:€aè~Ę\'4ÌlD vßf=Ă0ќžŽÈ@ă”Sï„éÖN“ °gŚn(yóĆp8(SüŰ$jâĉò{†ąmè`đ Ó-2©t”ÁĆfR™ŒÇăőö4ă.ĄX$,Nț?ț•öèęh?žÊŠŠŽŽŽu/ŸžîĆsïșkÛ¶mŐŐŐ0Oۛr …Bąœïöï_œzuMMD"]ŸüÉśß{/ńb˜V۶uÛÁƒû_^^ b`Ș‹]­&F*‡ƒ–) My}>łÙl6›†árčJ„R.—«5ZMB‚ ‰XłÊN(ŽȚĐĄŐè/8pŽE`œ ÓhŒZz~Pi'ç/)0™:„RifÖÙŽ6Œ 9òdꄼ†k_Ô”w™.K†Ą4E)9(j±X|>”ÉőÚ@9(Ź†Û¶SlLF{íG·ŐÚÚ ù@ôvœ›—·źž8Ő`€đbŸœÇă)Û°! ;~â›oŸ©šš(}ûí‰“ź­žßíßÿú›oôSIGÅ ‹‹‹««« .8șœlŚù •hĐŰD*Eí]ŒBĄÀ0ÔEžœN'Ź€‚hPh·ÙXz y›ž †‚1 W⎂‰»âζí]Ąćr6cšdŐÓ/—o([QžòÁ{ï—•”`ŃÂ=»v^XœŻŚa·Ûìv€P8 …Ćb1„rÿq8Ûí°Ûœ^o(zőęŒûæaS&^܀ʊŠȚuŐp‹·ÙíëßyŠb9rïśÿqĘ‚`Æăq—Ź_òÄÉ ~qqqNNNIIÉÆà”rïȚăƒGI‚ …Nœ8ÙŐŐŐÙÙéśûÁšŒtč\Îăr• JeB‚P,â`šR©DŁ&Ńù}±!́ô ‹ĆBĄPOí ‘I•Jezz:ìéZpŽăÆÜ»_~ń·Ì™œeó–qYYœ^ŻÓëÛZOąšW™8n č’ő†‰D,i4eB‚*!^*IS‚šärč2!ę„P*Äbq_baAŸ;ÊYô«‹ÖjnŒŚ13&ŰŃȚ±g_%át"Čgśž={ö đûĄvŚÜčœ&ö~yf Ìćtő0"qbú(­Ń`Pʰó:”șz\n8€Ïăóž\™DȘITkޚ€šąËh!6ëKCÁž?+Có)‘Hą«Çbù©S§BsÈĐ€Ă~&}ô”K—.—•UŸĄ űŚßzú[GŽ|%‘eĆ1@šüŸRÍ2œèYë1[ ÊAì/ńy|œ‹{ûÈĆ! óáç)śÍĂT9rB.—·¶”]˜»`ŰŒ;ïÒéő&Óû|0À±,dç/XGÏőż.(Ԋ^M$—©minFPD"‘šT*„R) CĄĂnw:Ńïl1œûÇ!$çŃ/­ĂápŰíAôX-Ą^!żžËioÒ&}ö·oÂéR©ŽêĐĄÌŹLxțÙüUȘHʈ˜żu…âN§óâr'ź+ÆăńÄb1Ó54Ë^'`+A©œ0~<Žă[6oéĘśàÂîżÓ9XAuMÍ@Čє@„N„†ÇńÄÄDÖöƒÁ~^*Ǖ ±7“ƒĐçÇh†fyĄàkĐŸpĐBSá{ï}rśźĘùK àŒwœ^ż{Śn·Ûęț_^ôx ŐŰœQêÄóśšÉ …B|eÙŐ$ȘU*KT*URR’R©”H$8ŽU™ôđƜ‹"8ćććčłf]%ț@à”Ś__łzőÇÿ$|1眛—·±Œz]çżëûp°M›”öŰă/mÙŒÍ2™LlvàÒW‚A‹J{͐†ă8—ËĆ0,¶G'M<”‰Ș„gžùÓM·Ü8\Uőđƒ·çdçJ„Rœ^g2™ HÈd2•o(»ïÁ>|•B5eÈì‚à<î•Ák0*Œ0çpMê/on?pűąu™]Êçńvû0=*šŠ!ŻWÊ'ąÁ xzŐȘß{Ӗ-ßWÿPTXôé矜Sș^ŻŚŚKëÄăjNLș~n–?è Ż<>ï2ăőG· ös›JàrșÉă `Á—U&ąššhĐ`Á­ššŰ·o_o?lûöí‹ăMČí‡H…v—;@ĘƐ,öu"âŃGIP©vę”Á`Xłf̈́‰—<òÌÌ̝őÍ7Ÿ"œD‡Ăe6›Ź„`šȘúè}o€èĂk°ßț œŁ*ęűC.—Ëír}ńĂĘwbĄËh4VTTì۱#n—íAP©à Ă0—M-Šèÿ°æžżòîKš3gÎÁß%%%QXX˜››[XX8}úô„=šż€ hćœ2ÀÁÏöá …B°–Æíő\úiŒ;öÊàR‚Kœ‰á°Ćf…|«¶ž› §^Mz™Ì\3qb_ŃVH űm TąÂ‡ Èć L¶ux>űSщÚÏŠd]öűăÿùïJJJZ[Zà`œ•+VœŹkXőԓ֞F7NêŐïő 0ôÓò6ÚćÂ.ݚûŒęúÿ±śȚqQÜùÿű{f¶ŚÙ„ĂR„XÀÄ jĔSMÏE0čô$g.ÉÙ5ćbr@~śMû\dI1ÍBbš ČÆš°,*H‘Ț¶Ìö6óûc`]·±Ë.EsŻGy(îłłÏyÍó՞/”jűCA(U˜lP°`űŚ*ÆœKÆ©‡­©©IKK;wț|ÁżÿĘÔŰžuëV»ê—W” O6]öù°:>«Ę“WÒ)JăąP@IJLˆˆÌ˜1û œ‰RqL2ïŽyT —öÄÄÆźÉZ}­ù‹-bs9N+ț „Â1șr|ّr—­3Œj”ZÓ°æÊu:]O_ŻV­čáæ#ˆï‡,_ Æ­‘ŃXl\\ÎăÇÆÄÈćò±ŰŠZo)AŻœÍŠ«<™Ÿ"-, =AÔ>!BĐĐĐ(P"°É-+3ń#ĂéO=_đËᆷȚùBŁ…šTîÚ”k.\HvGçOșŰü—òtÊçòçgÈTš@=lhŒ~JÔ±óŻäíEvEÉd2OèN§ëîíQ(N§‘:{ـyă•Xìi$‡Œ›ššŹ Á+JPù»ZÀëö€°.D Ó&JÓèÌ;kćçđÌ+rCyč)ŒOÎç0z܀5œ2}F柃—ęë €ÛwBïEEE¶m:[¶lÉyüq…BÁćò^ùg„·u”Ÿ4h; ÂIˆąV«mżhWQő/żüâôçÔ1äÆțț~…BaȘavóôWk4nj}ÙčKŽy3 p3XssóÚììUYYĆĆĆdłŹW” ­Ă$Đa+QáԭΚŠ\•òüÆ—ĘœńÿMOX0ĄŸrŠ€jJÓ%[FŻd­yŸè?{ɟŒWX””œŒæțû‰ä1›óDQŽàßÿ^••ŐÜÔôè__űőtߖm%ń±a€ètšP*”¶”“rÏb»"GŻäV7ŁÙ$DŽč:r6H.—wuu©0lÈ O‚ŽŸ Œc&Ü(U7 dÉÙŻŠŠ RvÓóÂAĂU“ŁbĐ` âx3‡ŽÏ˜1}ć_^2|Újłü6 >ž·ë°ù/ ÛìaˆŻÄOęUàˆäjTt$9ž€Raï•—•;q|çöoż»ëź»îvlíEQŽžžX"‘lÛș'Ä |”/—9é Ć0Ìv}||Œ«NBûàot )äD(ÊçŒF#—ÇĂ-”Zm6› ‚0|ŐLŽàT”Æę~žž‰ŒŹČ\.wQzș«MˆvV}AvÏ€M%ź1ìèJʶ›š)(:mÿ~SXŰïçZ­ZŁ:=à†"YúąEŃ11V0EˆD7ozôÁ‡^ÛŒ©ű“b7ARzz:©cwêÄ łIG§ŃQu|nà8źV«­ÇńŹŐAƒgNŁÓ™L&9Z4Œ Èîó\M­”9·żŸ·€›ÊʐőŒ}»ńQ-FÒE灷 $uŽŃšás‰»ÿČ9đkëkƧ|ó ;))??ÿZ›Ëdbș&HyY™ Ă"DąYłgŚIë—•syŒ€€€ĄÏ­©šBe’ƒÇ0‚(”ö‡Z­f±YŒž ­œòZFÒÒÒȘ««GŻ#ž †/\â%OÔŸòœț›ƒ–Æk7„—-‹=t±‡Ž\%‰»5Č Á22îÚòP> ú ÛóÓӅKŐÔÔžo뱎”©T˜xw1†a·lÚčmÇżȚÙőżoš“Jq0„/P©°#ć?ÓhևxHP°N§ÓëőAXÊÔ*uooŻ·Wi4C.˜ì{'+R#aA\Œ*PbŹ©)Žû—#àfł!5č\=UŹÖű;^Ț‰Î˜qeęz»—Ćœö Sò_|ŃęŃŹÂŽ/żŽ!)9yiFƊ»ï%]ČŚćˆD".uÖ93„ŐŐÇíŠaI…Û–V«mqŃxé*i0Ê›L&ZĘĘĘĘ9h~ÿ”uŽ=?„ü$‰Œ{É͇W;Ècč@^^ža6íÚ„čQ‘˜žtéčïžoö”&€Ć»w'%'óxŒÈšÈp‘ˆÜŸMŽ»žƒÏŚžcĐđđčN“YŁŃÚ‰a˜ÓC°(țíŚt•ŐTK)š3e;ÿƒŠŠ §”\Šą«R§ÒĂÂÚȚßČČúÊˋ%żș?‰Ś:©tßȚ}ímmÇNO›2틯Ÿï.ź“Jë€Òőyč-­­î™«™`»ê$Ž•óž ńhÎvjpÇaSnF°Z!›––vź¶¶©©Éꜙ­­ÎÊ gqšví2;@œ š©­u„đPzۅ?Ä»‹g͞œnƊ»ï=vâ8č$ƒÇăaF:ZW¶sûßßyû5€R©t%np=äÒh†á\Gł$;ȘxUkÌà&·”ÙÙùùùöï/((’@ôÄ3Ń3+€=a ÆmdÍç‚ß+ÿûÄ 3č-”æìoYkVïûvo֚Ő\ŻȘČr $”””mÙžVŁjVê’!‚€©Á&"ÈD™ˆ@<hĆqŒŻŻLò^>Șș:_#3Êx…a˜„đFă°ÙV±œ{oŻ…LAx+nì‰sU*•#J[=±Ži©ú°7dÀ ÙöąąoßnśsEŸyö™%âĘĆuÒșÙsf)+‰Dolß±4#ĂTś=pg{”ÎìŁl›BĄËćŽ«È†ó°•Aƒ!đÊăńÜ?ńu:Ęđöò@ÔĐLs»Ÿ tffŠŰ›BÿYumÍ ›vž!¶uöŹmsFKM™Lîw‰Dmmm/żŽA‰aćeeŻmȚŽpȚü„Kś|¶‚Q#öęTÔțXźIÄô‘—Ó‚ŠNu§ț% pߐ+“ɆĘ#{śÂžiIŰĂÏúłŐÆóFȘ‘¶G&%źœì©ßâ§§óvœòÍ•<”_Uy*%yJTš”œŒ4ciGGGÙ/‡"D"‘(‚|ń»ïüćöjŒ-žO‰O nŃiu---Ž c­æUç@__ßożę6~ă- nń„Ą»Ÿ‰Çeă~$(Š6˜Œ·OÛŒŃêQJ$­3mëùÍ[Pž@$ŠXŸ—[UY‰aXć©Óoż»kÿȚœŠÂ0U`P €o2X"}+c‘H„ŃhŁ<†5Rxuż ÊičÙskjCb#Í~LÉŠŠ„9]\8ú¶0=ęwœĄ“:b^{mâP‹T$đÉ'«*+ù(șïŸ=_ùÆöIÉI;·í8űӏöîü§èEWLŸ7zœȚd2)•J>ŸŸ˜˜˜à#xU«ÔźÂF‚ ôZ/żÛlĄhőł°é ֌VŁ»{7_üÉ'ÿ©<ęù‚;ê\ł©Đ‡Nxęő觟Ž{óMò'ûx(†aÇNßûÍ·"QćéJÀŸœûćeeoœłëxĆwÀÒŹ1Nôń &“J„2›Lt:”†e°˜NÓź”]Æ)^M&SOOJ„rźQ«Ő>ö"’74ƒæ· -ŸÏóÌ š°0&6EŃČĂÇêÖȚ‚ï|\6năÆûś——•E=őEOđ™œ;—b&œ(5{6Ç}æÉ§”Æăńž<^UeUooJuN«GMžO‘8AĘ]]Z­Ö‚ăœAŒČYÎŐœe•3w9Č1Ç+l’őśwvvvśöÈćr”FŁ7èęTêôp`€ßRJ„rÌÁZ"ÛJŒÿѧüÍÛżrPpg'&ȓ’fΜ™œœ AèÙg|[RròúŒÜG|(çń2?xû]* KJN~ûu…&W‰\zÏărكčsÄE«qÂńè_í±k¶èőz†9 †”w! ±à–1;°’–——7ż°à?¶?ŒÈÍDˆD"Aÿ5›9<ž ĂÊËÊżűêˇxhÖìYäPáËßpgÆÒê?± Nń‘eFČČĆfłĂ#"Ź?ÇÔȘĐĐPçÏX)ûhgìóÿł!Á A SÖæäl;|Ű Y ŠF<ű ő5»wż°q󊑚N*‰Dímmïíß»LÁŸWXÔÙv 1*ŃǓlii!ÇqȚ.7[( ©ndg*%vłúŚÿ™««șșú1ŚÊE„ŠŠZ!+zöYkN œ­í·Ș3j «“JÛÛÚ6nȚŽpȚ|ČðÛwŹÏË5/BŃŁ@} íèèĐëőfł9""ÂïÒŰAœű^o°zžœ„lÉ€ÄŰ Ź?Üč}G[[[Ɖă%»‹“’“Ș*+7nȚDÙ„K1 Ë{î1`iîQLŽ K:’Œ@ ƕ+WÈ`4,,ÌUŁÓlșuá­'Ńó­ŒW‚jëxÉ™ț: û^ґ°ÔÔÔŠŠ&Ï5 §M›öćŒ^t}â Ă0‘HôżoX».ĂTćeć«ï[ĂăńȘ*«ÚÚÚłŚć9áUÔjuSSÓ„K—Z[[ F‹uúĐ7őőőŸàŐnÙï-ˆWòăĄ|ż‘tŻä/ę֊Š ŻF "Ć/È}ądkăæMg*+ÉżÖI„ ï˜ÿö;»x<^Túț „6ÂÛsłX,---*•Êb±Â[ĄĄĄźvUkŽÎ5(Œêô|ßMÌJżƒWò—>Zfffuuő0æm ÚČeKIII{[Ûțœû>üűŁćśÜûęÏ?ÖIëȘ*+ɜÀÓO>•”fuL,“Wś(ŒźšŐê˗/[…ˆQ„Ńh(Šș+Àš7űîzț,ń–żæŚI~6B3[væčš–SËÍÍœûž{ÖçćJ„Ò„ßsyŒ›7©1lăæMÉÉÉï]>·wL ŻŻŻ±±Ńb±à8Ž HBB”)SnżęvÛUöŽŠŐé|Œ #(i5~ű@kˆ 7ûQČă»ïżś|[±/6€nÀ\bɒ%†.+ÿŚ;»ÊËÊx<^ŽníșœćśÜ›œn`/ł zuŰÖÖ֎ށć 4-..ŽÉdBÄ`0lËW0 “ûÔB0 ÀŐPž‡äpäȑ[?ȚșPéÏûRRQ±bùòu±BŽD,^ȄÈĂw±ëŚ?đàƒ·lzݰèíwvaÖÖÖXŸ—ûì“OaoaP „W`•ËŻŚqÈĐJ.—śőőá8Ă0‹Ć!!!ä>uA§ŃŽ=êê˜žà• ˆŃqź·f>kûŽŽzÓ~€­żœțæB.ï‹}ä–á3ŠŰŰ%K–œŻ=EŠÚÛÚČŚćĘ-­mmw=":ßAŁê=!†4€› .NˆTD„BA„Bahhh@@éVAQ488˜Ï绗«·5ϛ_GÇčŽ^Y,–+Šï~Ê0ŸÔ55|>ßG~éh(Š–ˆĆo''ł'L`O˜peŐȘÆÏ>ó±œfćʕÏ?ÿÂúŒÜÛvlÜŒépYùÛïìȘȘŹ:vâűÜ9s&u(WO*ŻÉ Ž­ZŒđàÏ {^.ž‡FF†€€€DDDêțä8Spp0I /ćżÿLăƒ\* ‹Úrś€€—7~ÔțHNóŁÙ#˜'"ŰÈ^làvčœăqԖÆă2»œpŠœCoȜ8uăû?\ÎϟTP0aëV ŠÂ0FómłÀž*k]ÿuîç·üb\\VŻTav;ć{ „“ûŸ­Ł(șe˖üü|Łű^x:>2Ž)]|öY§J-ÿ (ihv„§P(¶mÛÖÓÙEÆF|üŃő ‘BqfΜ†Š+őKcN)șUș@‚@Q5 QÌáGʙœ~çż?nܶ-*7—‚ąr‰äć^ź­WńĐŠ7k[œ À/\žĐÈșż‰ę«i°Ś›AgŒ”âÀG›——WțöÛSæ,K$§’“]É ­ÆśŻY9äÉŰ1]knEѶ¶¶ìu9"QyY™Ju=Żó8Óöí‹dòüĐű T3—ŁÎ‘OgËîR`;&,ßòaYúæ·ŻFćæŸ/.Ùżw/Ek/ęV]Ûàí'uWé|ÎÈȚŹx5âu”wßĆ’«O>‰Î˜Q›•ŐüÆn^fČüćx„{"[SSc7e^òé§Ö?Ož<ù§Ÿæńx_|őećéJńîĘŚCŐ€I3Ž€§ÇÈÀšö‹ÓŚn]śïžéHûû?{KK/çç‡ggSPt}^îŠ;ïlèmŃê@ZZĆ˝XN‡Μ93ä•*ìÄ+ŽăźËę>ÂeçՆńź)ÓŠÙœûá•+ûŽ;«ń@K"ÉhŒđÇ17éŰôôt7ł . Ìșçžëșqń›űÁ»yxęúÜââb7.ÖÍòórIœÁőyŽÀ6mRA«·›Š«ò¶{ƑŃiÖ°].— :>$‚=/bĘ@óL&0ê6JùÇÁ(vE\GImmLlŹç`-ûmFgmV–ç`yí”觟æpžNś°Y­ŽŽÔŐż^kiEFùò1U55żÔep⃃_H°úHaĘÛšŐÆ&ŸĐëőŽÙ»ꍒŠ śÛWli@éSOÉ%’êŒ ÇzRìÄÄű;ÉĆʕ+mhMḾęû­ÍÌÌüț»ïœ€șŠÆ—6HUMÍgG?ÿr˜‡ÆY=ŸŹ ažšƒu5ŒE…ÇF_c4đ Ă0NwrBÔʋ$ÛđŚ1ŒŸ:uêÁ§ŸŸòÌ3îC+G›¶ż5™ššzÌF­CĄPŒśŸÿŰ:oÛëú%‘űÒí`V(~űćóÏî ăÔ/ű˜…ușăpđ§ÇŻ#Î_ ŠąäÚo§O(•æs +X_…rșvqXì#MÍÍ|>ż„„E"‘Œh#0ŠąŸmßz%3ËÛ7†>ü0ÛfŠ#hkm•H$€"ń/żü2=mú§%%¶c^………---ź‰éöûÁŻÊÎepŠ3Y\;Ád2©TȘçĘ7…,^Y,–uF…7v$é %Lvi,KGvŒ ëôà܅óŻlË`‡11éééùyy2čŒšššy䱊 ŐŻŒ6Œ7ÆmÜèțoÿë_%%%äzï@đùçŸË\”jêŽiM„„„.\xîčç|iÍ9óهGšÏ4·XìH;° šŸČ‡żüò‹»ćÁ(ń[°’F§;©Ÿ¶tpű šT ŠąEEE/æćïùú˶¶¶GzxíÚ”ĘĘ]9kłB7bđCҀ_żüà» eŸìț–ΊŽ?76Û[°șOŒ!@GÏż:ksŽČă‚ÏțʗuÜĐL­Źfÿí™^:sæÌŽŽŽ/Ÿű–’Kłłł+**JJJ|Śy… èËïêzüéaŒ7(Ë ˆŽŠzÿęśÙl6ŠąÍÍÍ­m{ì«<]9wΩ'ĐÙŃÁ 3šź6e­Y-Țœ{ÖìÙd&Ë«ëhʱżśś‹—Íęr0É_֐)-«—[ìÂä.›‘0ŁĂŁßiWݧö+č3è?áÊ,·O3Ô·'ȘŐjW]Eb±˜ÜˆY"gû&őșvíZö‘_ęű‘Weeœûî;ǎ}âńÇΟÿś—7—•/ÍÈ ;wnßńö»»ê€uäžâòČrïj+R{—]őmŃû› ű€~č?żŻ!SZżüò˘;Z čW\ŁŃŒBúŚht.OÒȚ…LM4îúXPžčQ§‡n&ăH+-----M_ŽšD,źź©‹ĆĂšf­œ2”ë„ęűU*Źš ({Ę:©TÚÖ֞œnĘ?țŸaă–Mćee֎ÁâOŠłŚć>ő‹ŻŸôœÈŽ;%“ț|üÛÆ&95CmGČ+ŁÊ_™Lf`` Šą#çkzƒȚ©ž!AÙŻ@țö@kjčx™ȚđdSž€ąbmvviié–-[ ŒšÜârčiŹáKèE~€æúŒÜś ‹–f,-/+»3c)É–fdÔIëHńJ/ ĄȘ­mUèę’·šÛ˜}€ź螞žQs±ăŻVŒąšżÖ-oÌ^é\ˆĆB€Äàö.äöi†/~Ì`Ѓ„±j”úêŐ«CțŠììl.—ÛÜܜŸŸO¶lĘș•üżûśȚvûín6i}?ędV(l+*vžŹ<7?śß°qó&r–Đ– ŁZ9çxő‹Ú‹Ć+Ëżí?ńăÏ?Œ9<·Č&łÏŸ?ïj|Š ˆ1©šŽ^ŒĆd2 ŠV96Șúê_ő.—C[pjmO(ęÁLÕɼ54 Ę'ëŒ”J„¶$!55”«»»k(śœŸpĄŠ°pŰÇŹP4íÚn»­N*ï.NJNȘ“ÖmÜČ©­” Ă0'Ț]œœ.GŒ{·àrœ Źœ?țh±˜^:úë…fˆzC:ŠWłÙ|æÌ™ŽŽ4»˜Éb±(•JƒÁàyș >>Ț“+?ŽòYńčŒÀÀÀáÍQ85ƒqaœú&“. èčëŽ#a=d·{ŁŃhŁ199Ù±˜9ÓłE%fߊŻÚȚ>—Kê]–—•cÆćòȕÄûöîËžk`Ÿ À0lÖìٞ_sù2VUőéï{Ž_ž(G`͝;—lP©T§OŸ¶#‹OÛ%nŒæ©\Ï/ôvżŐ‚fLQô*"W-)èԝÒșș!)  ăp8!!!¶?żzőȘ0 À“Eœ>šYĄÈ{aęê5«“““ÉŽÔąyółÖŹÆ”Çăp8dëćżo mnŸÍžAt””œ‡'ݜ%$—<--::`2™jjjŒ’ĂŸ„đJ‡Í tšçśÊšTȘ]0Ă0‡Ă!]ű/^NHàE…¶|țăŠÓ” †iŚź]ó䰝ŽmĆ*•Šä #}íêh4î‚|Ęč}GÎă9K3–†‹D;·ï°%©€Eńnï˜ÀCȚŻœtI°hŃ©łçțƉ‰‰dÇ ANƒTŻvżűńĄ:x 0" ‡‡Ù4Ê ‚ÍápčÜÀÀÀ°°°ŰHóáÓł?ÿqĆŁś~żx–€čńŽŃ8Ž0/‡Í KKKsü§k­­źÔąęFÇ)ń€Ä‘hË/UUV.?,Ț]üĆW_&''K„RL‰íß»o}^îțœûȚ~gŚ‘Č2«ìŠ'öćWßô;vüäOçtĘ8rŠ/<<܎ԂAqL†œÂ+é­obŒZă°àà`Ż kŚ+h7€Ádôa,œqM«‡R„F#óș)Ž,­9ŚíÉń»»»ÉČBkk«#·‹ŠŠșcȚ<7oW(ìÄÄa_žR&kÓÖ-äì †a;¶n“J„uRi„HDjg­Yę^aŃúŒÜÛwŒőÎźÄÄÄòČ22àxŽȘÊÊȘÊÊîç ~í:JAèCv]ș©NĘbę.^à‚ >ê7Urę,ASšș{‘˜đŽÔDi ‹ïČλϞźX±‚Ăáœ9sƚà”B!YnpŽŐœę;}ű’}4êKïŽÆO†ŐI„<űĐŹÙł0 Ë^·Ž\UUY9kö,€xwńÛwTUVJ/JĆ»wÛĄÖNŸJSW§ hčvžÊ˜ańf)€#ȇ±Ăg|*e àŐ«* :cÈʓWAPH…Ç%„üț–ŽĐ ŽuzÒy.kèÍ3S§M#ÿàÈS­1‡ûKròoțüaŸy ŃTüIqUeeäàž•”ûśîËÍÏMLN.Ù]LVčf͞ęŻwvqxŒŽŽŽYłgŻŸo văR»Ș,=,ììȚÏŽzŸŃł]֏/·ŒŹ|àQ ‘|ڶ*f5ÛÔŹYĄèéÖÀ‘'§ŃȚȚî^+àV*qQ8l¶L&ƒ H xțèïïw!ȘËfEkÜÖ«`fO97=éüuSš;Âï˜~ŃęoOMMMII1™LNçBCBž\nrRҐëmżÿțû­Żż~ć™g|ìW'N€yó0©Ô–ƒ’n”ȘČ2k͚”É)äßÿűŁG|ˆŹ,ìùú†N©Tjă6+:Æ %< •âăăăăă=OÔxëb-žĆzˍ‹xkH$dʜǞYĂguÏAȔI±ß+™3=é|D Žź)ĆÍ1CĂÂRRRÈQ…łgÏ:M“ńVTT”|šäč\./Śë)Ÿ‰Ć>šÂПȘˆ‰Ô6köìH‘ÈJF#Dąę{ś* ’$%'ÿqźvăæMúŃ.›œœl›žűí—~üŽ}ôŻŒ,ZŒxáU xî\m!+DžgžlkƒÖŒà‹9ç::YLˆȘtz˜JCX@î,€ŃhK/źŻŻïìì”őś»ą§Váóźźź!ŁéŚ‹ŠDÏ>ëăEœ§Ô-žđ; Ł­­”­„&ÇÛóő—K320LeېćŽ9‹Ü7pĄ:;;Ż]Òêü69ŒûŹ_N§ŃæÌ™s“ćłœșÉaš‰À„1˜/òûëÛeʀà =“7w„+ŐT&ï—;ù¶ÈzXBBB```…kU@†Ôj”'ĆÉæææcAAŸőžç)u«Îž!É=†aÉÉÉ€œ3cé™?ÔÔŐ €WUV ÄOmm”gÏqXèèË5ž1—sÓ㕄ŹçăÈ0 ¶ i±Äm)W=œŒĂ§â“b/ȚuÇ›eÏ%fΜčxđ©TUUć&ö7ő ž‹’úĆĆ’ŒÆœ3§ÉȉËăEˆD*öÆöő”YY›ŒayYYUe%čœÛúCČ?fà#àWÔԏR•žÔ ‡d^í6§x0™L§ZÄ4‡ź‡kû{60. é“6tA]SÊû_ȚÙŃMۅÉÉÉÇd2}ńĆźȚž\î#<víZːÉ,[{€Eś%QpŠ˜,y—.Ș—WUVȘTŰÎm;V=fČh.]:3ű<­“Jß+,‰D«nœ[••…ăfM]:cFŻP`ĐĘÛ3~ąûńĐZàŸÖl‡;ä‡veĂ)q}äŽz ­bÒć<æ„g:ôbk·MűȚ·Č­;0}f«őAăÆżÎ˜9S0P “ÖI‡w&·MąDŒżńʏ^§sL[BĄPĂ՗§^íH7z>™7! (,z/cÏÓ'Ÿ éhÍ …R"±ĘąÈNL”>őԓ/z±MIŁ0qčÜ1췂 hÙČeó|ĐÉ_xUk4}}}¶%gŸe șN'Ç55w„OO‘[›9\ùŚ;æÍ Ž=š©©^k é\Ż4'8 ]őD[L&‚0mÀŃłÓ/\Ÿ7zć9ÊČt$<jnnŸk͚ő!„ûù/Ś }űá†W^yòĆœjIŃépeìwnAÄał—-[v+àŐh0˜L&ëCŸg…)ˆSAĘąĘŃóÒΑ%.dPŒÈŃyĐhŽĆ‹'ÄÇKëêÒŠ„Ö74 »);e%bH Š“QOÇ-žĆ)ß č …B‘)è?O’œ…s[ƒüu eúdpĄ¶bZfÖ11ÜO>Œyí57œłìÄĉ|PÄ`ŹÍÎö¶JźW€ńa9U6żÉűë j$@IVê*[ßÊ|8/ùÁЉqŠâUkőĐo”ôöÄ:Ҁšš(ÀŒyóêNž81ÌK Àô)cA0•A§șÈY ™œșÁĆâ*L}H«gžœbb”áÎt Âû.7‚ł§?‹ĆSŠLybËÖ(OéïÓ77ëeàsçöOˆ:ÔÚUűê«^iîŽ[3Œ·^őz=‰W:Nz&“ÉDú-*•j%Žd ^v"đÎč•_ü˜X”€ü“i—.\Š4ÂÜeËBM&Ó”kŚÂ7űV@ltśbÚśOĄÀAt:ĘiMź±»ÇLFƒÎ ŃéÀÊ0€ÚșŰj]@`­yb\ăĆËàüùóčùy0 ,Œc Bä.Š’O[ÚÛ|čȘęr"Pá!”†°#aÜrQzńÖÁ«·ă‡€ŻČÒSÇ^wŁŃráRä]wéUD9.žÖĆž'œă¶Žn|ĄPHŽpFg]îYŚÖń(0r=+ä€W‚ÀlÛN˜ƒÌżRô ˆQ@K7kÎdbȚL„L  ÉÉțôgŠĄó}7PœÁ8eÖŹŽ•ÂæHMJšUj>ŸO„RI7fœd4ș}JŁ~őK|°@ô·Șąæă€Ă§ź«™V©vhekB0wębQpàûŠQšZGžj41è 6‹e‡W’k"0âèzIC ÚoăÒg4ŻÈ=ùĘÎa IDATÈÆ.]ïĄ.Źő†Ž6ôűˆ—öx”^#­VË`2é4š@ À Üzɱ}Nq8Rś„_mÿ`Aà“"ëçÏhùæzżŹ_!WűëÒÜœ˜ÒÒjDl$iïÛ`‚Ćbi”ŚńlÜ#À Ń”f­“ëHĄš4Źön0û6äd€ùt:œÍm”xÏr„4-Đűk°mèyòäÉ[$Ÿe[ÿ ]Avś·UVƒĆbY'·pÀ À0Ą\mOŒ1‘+•Ïw/Š}wä†HŽt–źȚž1Ąaő©ź±RiTˆ jŻ$'Ăžš‘ʏ’) dnßï"mc«„û~·)•JëdĐÖÚd29~bĐ\O XË`¶–>łő·Z?QÏŁŽŽuF{E7ftÍ)š]œ…üàAÔ_‹™–‚ŒĐ·…©ŻWe=I91 ‹·ž›ïêÇc‰Wœ^ŻŐj6IÛź„Ÿ8l¶­üAŁŃ6qëÏOƒ„ ‡NN pÜÎÙž_Đe MëMH‚ÀéëÙA=ꎈPâ¶)#âb5Z Ńzńz›íśŠ?Aż‰ńJÎČÙ>#8l¶S9X„L'—Ë»șșdęę}}}űŒ Ż\FÈNź2#v§jۓo»@Ôè,”Ûș:›ÍápAżp5>yÂńIžüÎ<}"“Ęgț=żpTńJ§Ń †ËásyĄĄĄÂ€ÇÍc€+%B§Óuww+ [Źk՚) M§Śû1HXș€ńĘá’±8>Ëű\žmmÖ¶ő‚ĄâHX;úìÒs\.784„ÎŒĄŃŰ·MV WÜÜ6¶ÚcžËW\‹Śu­„v?Žà–žžYOOÀ#Vi`>—đG"ÇZzúi€#t:‚Ççó­â”8Žë śAopĆž\.—Ç8m•"ârË€ÔÀ•ö:pƘK dG”ęV«Ń’Çq†xûïÓl6G„ZNÿæŽB̛ż"ŽàTś±ÂÀŁ€Ă‚Pk4Ö|‹Ă¶KqP©T›M§Ń "{|­ÌÛ`4öśśk4*4%Éÿ.¶_Nh4㱋`ÖŹYŁÿKÇFY †a:î8“HĄP˜ ŒłÇ?ż%y25…öæ|«32™Lźê™,6k g¶8.B"ËuŽ?Ôéô­7[Ôj5LAN ȚÔóW‚ȚȚ{©ôÉüyé4:ÀfžŽŒÜ╠œ^o6›!&Ÿ§Çl6Ă„Ăf›ÍfÇBQÒuw/ÒŃíŸȘśąč ¶ŽGAÌVÿ lz\»ËԄV­ŃȘ5T*†a„JÁÍ‚ Lûó·û+AĘèmSț-ł\Tą‡Æż[‰GĐӍs'ą§§GĄPšŐj†‘‰X’ìòč<FœŠîIo=$ńXăą č3èeǶ`u•b#Âę&08yŠUkôzœÁ`p3l”Ëmá#Q>'°cƒW…bDÈŠVْEOű…š!>ÆôÓÿWȻƏ€”ËćäT™ZŁQ©TJ„ȧǻ”At:Ćb Yê„0ćƒÎžqÔ;ÚxŐëőֈۏf·ÛQv`?/=Țòé·8©pæŁńč`î úĄăĄNÿUŻŚ“^_…aj”Z«ŐzUł)ˆP(äóùAN!KźĆăp8uô°8lÿ»ŰqrM~@©Púœ°äèź 7ȘZmŠÖżȚq›B„?țÂ?§±bEĄ©Ô‡5ٌÀÏa‹€ÍbCÄćra† šGí_«ŃàÏj0™ćÁ”ĂáCÜćȚGć˜Se1źÇ=9śu~{Đś­‘Îőțć”O„yâ5afqŰ^51‘ńùg§ĄóÆÒVG+"”úŻșÎę'Ć+ùˆô–ŒÆžî§-TzkrÓAO?Ôxä8qàgÿ蓭XFčp‰§Ő3ț«] P(äsyBĄĐ••Jeq۶ïÒëőVA;ÇOJ„RÉ̗· $› ŒłMŒś›‹%{o„­^ă æÉœžË†œŹæádÙf 0Ț>Íđù~ÿx Òč~w„ïôłÀÄvq ‹ĆČNé…Âà`.g…&‹Ć   äsyvl§§§G©Â” ûI,ö`%ÌȘʆÀH}[Dj đWçÉÀĂûțÔxĆÍŻrnäC0ÌSvÁápÈ0KzÙoÌ””ƒąÖ3œșÜl±mW°krE`„Ăf“€c0|>ßZ#pôŁ8ŽkŐNj Ńh‚°àœö†^J“ë7«ÓáƒúOWòIçùȘR7ÀN‰ŁSUòô™­­”OŸŽűƻΛ‰Üżœòí/ đà@( sőŹwȘšJ’hœ^o ȘUž‚ƒÔU*”¶ L—01îOùś«Q]#…Bń€)Ę:ûê4ˆq„ŹUÊF&“™,æÀ€”iY±žț„í„Îù4>Ü»úIÜ'3[«Éh"pÂŐy:őÁză€Ë”őśĂ„ŠPŒąÂ̓C5ÓsA€Đ?ćYœ€šÿ„x…]ŁL&ó„È’=Jlg JŽpg±X¶àÀÍ­FûÄCu~Fű«\ùŚ5ŸÇ8ńßö©Őj…Bá*Qàű1íÔpłĆ/Șiä)Ńhì ÿP sèŒI‚vú4śpÇEûșß‚aŰv2™ZŸ°A&Ç>üÌ_`„̝AÿżŻ#œz—ŃÁïjő#”čĘd2ÌĄ>đ%0˜(c›Ò“…K•VŻÖf8PŐ@Ìăńl››˜LæÔ$tùRYÉ7żH쓎őăŻ"ÍŠWŃ.…G„]äGłà­–`łq“#f|ńż@–ɘ:„aX 8&ŐŚŻ=í/&@Ł ĐÖ~9ÍÛïOŻŐÙ~@”Z=rĂtŁQÀëîëśÏńőF˜>Öüulű€›Òΰ!‹ÀćŁ(ì8îóÀČú#ljÿû‡ <ùÂç1*«ÙĂp68ŽcƒYg•J„V`†ˆÌŁÉę$œ%àUn5>ìf Ÿ„ì0d˜t“ÉtüHI1=AțȘŹș›Č,úÁžXÇ>,M«ŐvuuuvvŽ(XÉĐÍhÔŽuùáƒ3`<ŰŰűW‚„šÀ}  “ÉüÒĂ„êžxàüîŻÌuő~pź·MÖ=H)ț6ꊠq ąöŠk„_$‚!6óț1ËP©Tś«]p—Ë<Ę”éÆ^yêÔçû@éÏfßY"–.@.\âŐ·ĐÇ?XY ‹„ŒÔà  J̘߄æ±Î Żžˆ h՚žŸ^Ăp]ÄkOI–ƒ·țŸÙ/w擏 SSh{DßQmBT“ôČĆ/•‚ž(‚Q óe‹ę^ƒxőln¶Èúû•Júe-žĆș&?»öÔYË«oú'€]–Ž,K§–|7ßb62€Qk€ŽȚś) ƒđP˜ĆŸz$Äx†4Š5Ö#뫞$tŽZ­^Żg°˜°łä7•F„ÓèfłY&“á8N„R[ȚR}źïʏü֔IÈkë)%őôőy2D5:æJ˜ĆĐ%D5Wœ~©9Lj 6% €?mÂőțĄp ŁŰ`4*ärśÀ%»“\»6p6=¶Œ„»śÚȚ,țk^~'tê,_REàű8Ú7(“É슷8 Râ{Nÿ†_ŒìŸŽ@B Ó&ă`\À•ÀÇG=–NŁÙ6‰'wƒășï/@oèÙûƒćśóțùlÏç SShż§Ž­JžÓ`ÙȘ jęÉŹÉŚ.7šęőÙăąĄŠÊgăŻ&“Éșś0tûűáćM{èüő…‘Ù֟ŽĘ>9«Z­¶ëò ÖÊäšßÏù)'‰ÂAœm}fh|àŐ/™ó9ÓúóÖŐmÚe&őüęò…ćę 9r*©Gΰ]ń5~đ*—ËíhkíE‹_h+âąa@M…țô ŽNô]|P&bZ’ńOślÚețlŻÙ_wrÖ=đĆËԓPLŠžńFìźˆÛSk.żÌŠb6p űӛóńyŸ°AŻ<}őMț+àčdY:őĂ/ă Ăű«­MuÔ7?>XÆWxEùš/G|ę„+ˁżÚYHÚzßrÊ»ŸDßÌ,†.,DQß蟛êLÀŁüŠČS !A„ZIïrßrÚG_d úMń„Äśű Œ‡jÖűćŻ`pÀ“qÙ©‰†WžŸÚŻ@0ôőŃŻ<}őĂÏ?*H>¶Q(á ő7‡‹ĄcÒŐțÊ ÄE 0ÿ9WwțŐ Yź3±;ȘúÀœ-ŸïÿĘcéíÏążŸs%…ÿ‚żNîù䎙o§\FÙÜvŃÎčú%'( q㚠ĐüœÉĂ'Œr<‹NwŸ ˆ4W_$>ßk^śbăí}ś­ĘퟔeéI[‡ĘÛ::ÆaA“zT*5Hහkt˜ńœà ćÎFŻ>ÊâÛbS4ځJ€Ù ”Jć°éŻ­wYčŒùS… _NăÛzćl>¶à¶‹©“Ș/úg6=e%BdÂxțàN”ĂÆŻäú́—°Ęz §»ä۱Ԏ4O뉇((ÿItSP·óۏŸerčqgRPPššê#miÌ țG[=·lÁdZ7[h4š'čO…\îăö|rśäù-Æÿć#Bg`NŠŸìQÖ^šeŁ(š™™™Ÿ—'“Ëkkk%IssłçäsAx(Ź5Oƒ`ê8ÿìż KűŻ6›Ăf;Ç#€Ę ]MMMffæ°OhȚLä±ûà·?œTfídđŒĘqÔ̂[LF“AgbÒč(]ZZ*‹©©©ÙÙÙ±11Ő55b±Ű“|K| äßR–·È F„Ț4œAï~/A”z<âu €Ółóă°-/[Čłł§M›–ŸŸ?à$űüᆜàȚ%ĐáSń˜ąÓšŽ€rڑN§ …B‚ zúzÇOÏ+#Đè|‚P ČłłI°’·nMM &&Šš°đ@iiii©›†‡@Q"Di˜FőëI œNßčÄĐh29sfÜńW«9ŐqA` }Ńąââb„ÒŁÊ/ț29‘"9I> ! đdwëò5śt_o&ù€Ę˚››ŚfgŁ(šíæhSŠNPĄ–ńO„ŒțiAŒg«© @H**š›šrss­iá„țș†’u/Ž© Ń6Î 5bŻłÚűJ@Ä€«/]xĐçççZRR\\\2èbmM,ŻXŸÜŐĄČłłïșçŃȘ?,,Z y'˜LŠq‹WłÙ|óáuòDZƒ@”óűă(Š8p`Ű)‚y3‘ÖAoœ‹ăž‘çp8Ö͝«ŻMˆۜ ‹6â”kłł?-)ylíÚêêjǛöÓÏ>K_ŽÈń8$Ü­n'pă°đj0•Ș‘ĘvDDUUŐxÇ+“ÉŽƒ‰Q^jDAH**òóóÓÓÓÉë^S]ŸpĄWçqïèÈqÁćf*N·sąùś1d6›ć čïǙ êjžjȘ”ÙÙ999111v•H$vWEт‚‚cǎ‘Ź7(ˆ C|‚ał<]dšŃj”ƒÂœ­ÖbÙšÔǎÓQÂ+ÀVŠŠ (ƒc………………yyy©©© …«kŐʔɉ”=?„ 0â4 mețz A0äáH°{ hïwúè_ŽhQjjȘd ElLŒő'é‹–””Xă°ű(șÚăíi°Y,ÖàuąšĐçzÍ.|ŒÈ+đv'—ËŐêud„Ž›-sg(>ręQžmÛ¶ŒŒŒ‚‚‚EÎy¶áHLL ŸÏW*•\.›Co‹űZÈïŸw»òtm€«Ș A†ùëÎF`„Ćòi +AS&öp RŐćô555ùùù[¶l±>èčyy[¶l‚êšš”6Ÿ pB9țûČÇ0«-[¶Ì[z$ëđ(ßÿߕG_0Ù6&—ˆĆ­]›žžnÍæX}IÎÚ”2čŒ€€Äúóy3‘߂– ''b!A–śÄqœÊÇ ąVŁ”Ț'ț Tj•À­“ÛĆăg™”Ü„!+**ÒÓÓccc=©̟,jËíăŹA:tèæđŻd„ÎćńÈm«¶ć|… jȘ« ƁÒÒÇÖźMOO—H$™™™$.QÍËË#]‹mÎĆ€ËÍ8ȚßßïT7ŰÍeąP(~©#žt”ÙŃétj'n8%!ŻśüĆvǃ8p --|€TWWggg—~ś' ‘T=~ƒsőńÁ‚P(ź>ŠZŁ!?&A&Ë@+àó=IoĂcȘÖAȚÛ^}țü7é\0Zź]+--•H$Őüq`ÿ~08˜ ‹‹ srr EvvvAAŠąÍMM‰D+«ŒlÒêĄŰȁ‹„ŐC.Ej”C8T­VëcœäÆT*•Ț` Ńhvw1A‡aŰVҞ$çëÌÖ¶[ËyüqIEyŻ775 ù«§MæèŽ}ęČHTp}ìǂ[š`˜„Yv)yÒ'—8A. Ć àpńRœAA°ˆ,æâŐëx °pÆ”ûÿbHœŚh6ƒ­[·æææ.ZŽšŠŠ&55”șș°hńbIE…őőÙÙÙäŚF~‘}òn,ƒŃőæG Èh¶P(ˆÙ‚S ‚°ęȘȋ>>cް MjČæ_ÿŸ“Ì€\.ÿț»ïÈšEŃƟ|Č*+ „FęđêĐú&șÁ̧R©v»íž0ŸWű F# ACźŹ2™Lr„’BĄ8fÇLó‘òĂcrć‘űxŻeĆ_{șæőśŒżŚÀ`7V^^ȚĄC‡jjjZZZ0„Ȱ°Đ6-@ÖœÄ%%Ę]]t#>Șś©G±Œ! ˆ »oSR)TŻ6“_†VŁĄP)°•0­V‹Ć”ű’Áh4›L‡ëô€úłŐÚkíN“ÉÌÍÍU*••••zœțëoŸ èZK‹D"qEČçÏ Qä]òp‚q‡`Ű鹉J­6™ÍLŸ™AìôŠ4Z­NŻcÜ8K‚ ƒAg3YΜ7üŸÿüç‰'žïț• ˆïj˜6»-ŁŒ„bbccąŁ‹‹‹%‰ÓŽ+ŠąMMM¶9óߎȚqűp×?†zűÜŚëő …BĄžy±ZŁ  Ă0 n±ÛHăæăàŽÀˆ·8ŸȚl6Ëärî8űqÏ|é§{-ĘΔ‚‚‚ŒŒ<‰D’ŸŸo›ŃsNaó żæ"ˈ’w,ƒÁ”Fc4™Źî͂[`‰&nčR ĂŸËsŒ])Ä镔ËćcR’őÎ{AŽ"ŁugEŃęûö555U=J‚uÛöíNßąP(A-ZŒž°°0aêÎ%óćîĆlIȘŃh”ÉćvHȆ_€Ê,é<O€ ܃Ղ,„'˞ƒȚà4Œă°Ùv*n!j àÀÎn—矟Ÿżhńb’żyIï˜ “kŒ ŰÁ_ •JćÚì-C`d„&|Ÿ#X1”J‰azgWƂ[ÆȘÀ»xëo\•œ‰>đsC‰ž06.Ύ§șČęûö­ÊÊȘ©©Q( ‘WêÏmÔéaĂÀ3ę žƒ3j&8( .)ŠŃ<]fD:c›m{KŰĆp€'Ă Üil7AÔŐŚïRœ/33sá…™+W¶mÛæțd˜ #R^hH€ žż• ƒȘšL& nČ{ŐȍN§±œ•ǰqÌ;ŒŠÏlYö]TTä X«ČČòóóQœk~sǕ/.\ŠüàË© ÚđËĐ,Ë Ú ù<`Û@h”ŒŒŒ+WŠ„„ ÉYíœëőTƒáyß0A4*‚ “Ćl2šHGÈałG#èÇŹ«ÓÓ_ Q»æIw šÄbqLLLLLŒ'ïʶ}{^^Ț‡ïNW«UM­,”NëôÙ Ăđ0€æÌfsOoŻ\!Ç0Ì“Ò Ù–ć4Śj”äĄÜĐßi“újçùŠÜőësrr<+é\՚çJ.‚$‰ŸçŸÌIQ Ë”K¶–ühcŰ5ï)^“bz„ż\ś+ß{V¶!ÁęiIɝw(țï« ;Ö6âĄPèA5߂[0 ł‹Šè4:‹ĆąQ‡Îź3™Lîè_Íf3·™Lf …B&wÈŠ0ò6 Bź yœ'«ząȘô»ï¶lÙ⥃$ksg9%ït€_Ìb6“©†!hœNç9+„R©é‹ÒÇ5^ÿșșőĂOͶ8«H<ŸÛȚ-.Š@ç.ŃÿÿöŸ<ÈČłșï[ïw··vOfIŁŃ‚VĐIH†‘ †`rHÊ.ƒm©R•W„ŒìJ%NQžÊćȘŰU‰$Êkœƒś’8ۉ3ca€ŰZf†a¶î~Ë}wÿ¶üqúĘčęȚëŚ=‹Ôm·ôÇšûő}w9ßùÎùßù„1&IÓÉ%+çœsN9ïúsfLS!œel“aÇEYŠiŠ1ž)L‚ žHò–ví2ÖäEĄÇÁnłÙ }üòq3sœ=üđÃÁž‚[qźiÚj4w---5KLüŁxtȚìÖ;TWžÚèMalkm”†„”›JAșÂ}ÇśœcçÚëŐ{‡żț[çÄțęûßûžślșśșÿțO>țű+/żüűŻÜ}nőŒ &iČѶe­Ą„L ˜›!l%úœč‹ÍÉÌ(ĄĘN‡sŃpm)ĄK»vÁ_aŒ~ÙjąS#Y=ôЃ>ži˜ä8hÿŸaȘo9Čô"Žfžș%YZćŒŸYç{Ț Šâ$‰“€?źô{›Ž+ږêă–ìőá~íč…(^{Ȁ,țôÏü̜îäv»ęÉÇô‘GŸ~äÈÇ~éęÉčG?ôs·Tż5JÇÉ:Șü!Ôn”›Í&ŒEÏó*"KšŠ[é`±Ö^D‚6Z)ôBΙ6Æqœií°[ź;śâńyƒ•;ö±}l~,BèŠB„PZ $MŁxtș¶R«™öÔn”ü‹’ ‚^1á8Žžv­XÀțŚexŹ<đÀ'>ń dÍù«Û|òđáƒ>öŰcï:túSș(‹u"‰ă‰kEœ^o0\Kéò<FU sÓlÍòŽÖÎ~WJśú}0t)U‘çB̐›ĘŐIŽ<·ÉPÒÇ{ì}ï{ß&ÁÀèčá‹ČLÒ4ϋjm}['ŃhZɋŒ,JžìȚ`Đß Ă^june„zűRJ©•pœN«Ć9oaàû‹îÎ$olŸ±.uò0П;Œö(ìGôțûïߊT dśĘMśí^ùßOß21ÿƃŠìj‘­Ł]PnĘ Pu±‚pœ……óo(/ ÆX=xPJQJ[Môâ±M|áíÎ8źÂe™XŒĐ Q_ë»A–ć„” ۔ŒÒi”Šé­JéŹÈ7u8g€-œČ„ĆE°Ôą,Ó,ĂWšăàUcÀœöúÁțț/ŸæIˆ>óÙÏnĆXÁ^1ÆyxŚÓÏÆ˜{QĘ,ng8cÀçTŽÁȘ”RDž­ÎÙl4ąŃhb ź6ŠJ„ĐpŽIŒțè#Ìi_Ăœćž’t‰Öm·+êB^äi–1ÆÌÂmô(IČŒèŽZqÎĂ đÆłæç±€xeá c|qùÀv-šżűüÚ.Óît¶hŹï{ï{?őÔ·ą țűóoȚœk©ŃlN”|ßït;așź+„˜Îa…źp—––Àß(„Ò4)ò"‚jițV3HmtĐ?·Œÿá,v0ZßFQ °żO7lI)!…GcÎ!Tćő+ÇOžI)„±vيż1VkïhΕçE>Ÿyž7ÿO¶Á^!fS;Qmd©>ű tÂüì#Ś?~î7û&˜ÓKâòdyVŸ[4œsx”ÇŽ[­~żßn·«ĂnF›4ÏÀ vïZš CŽF14…Ώ{ÂŁ­VçSđÂüK/ÁtÏ=śÜ~ÛuIÿś–O$ùD^3ÿlQ<‚Ș$țÜáY|Š?b‚=ákȘ2Űù”Śó¶žÂÍò Ê\”’m1ÖMìc|őȚá‘óăzМűìöƒ«¶­;o9ùŻ>òƌ‘Kż§iĐÆ‡óńbœgE^Ob(ĄÆZߝś&8eFHœ¶”Čą“G‘pœ„Nr`ßÉvž‚ńśĘęæŚÏwŸGĘäzÿ?ÿÁČ,ČŹ°û~*Ëâł'~/YnÌŚȘۖ”6Ž“ÎÜő0э(ĄŒąȘ5ÔàŠíő€ĆV Vx=oÛqxVœl5mŹžÛă^nàŸœtŃŚT/ …~à֠ЅngzïfŒZc'tG8eŐÇ Ős:4âțpžÜ[ŐFFQ’ŠœqÉ·Őh^čt掏tș·)ś§”žaSâUƚÛíö=śÜłÿțŸÿùŸÏŒ{8ŒČŹ@aÚqÜ=K{îőÙŃą,„”É,ƃ‰#đę9Æ źt‚]…1攑1‰‡sȚé\Ș§ŹÛn/t;ÀÉŽÖ>ôĐC;+~ ę‹úB­í]ț_Äżÿčë/ôjȘF­ÖòYŒq3lŸń%tÚI€]fy±QVA(‘R*„©C–_2š`L0i†ą,êą…·\ûvîWüm[L+ƒÁțęûƒÁ<đŠ7ʁŸ –z>"ÏOW9{œŐ8œÏDű„VdÜdVY'” &r©™N ]èv†ŃHJ™eߚ“„sîp>3ź­.F™mæg›‚Y«}…Đ…2žùŠ>yöŠzç?\šÉmE”LV°&ÍFŰÛÚŹ]©Ț‰ÄzŒÀGńÈ뎑öê}J ‡°Öfy6jĘïAúȚʇ>ôŸï‡ŃpžN1xśîĘœȚjQ”+göÏțyš¶Â„Æ5fMD{ŁrT'ž+ Á‚őbŸ…‚‚”r0ŠÚ&èÈæEȚÂMCćΕR„”J)îł9îvÙëœóŸçȚSgâ~ì‘Û?ńÉÇo~ęK{źèv»{ö쩐ŒRÊÓ§O—EqòÛß>vüxX„~áŃćOÿ2żP{­ȚÄÄ|’QƒÊƒÔjæcjŽûH7‚ «8·Čâș‚ȘŽȘśp`„ZZ\Ìòw eűź»îj¶ZŸïcŒ“$‰ÆG’$cÆy·Û=pàÀÿۏĘqÇ{–v’űȚ»‹].xyüÔϊ‘RæEQ—opžŁŽRZc„§[YŹ”ęá / !œù2ï G8œ»BÔ?9ˆ"„cÌs]ÎyàûźŁŃhŚbjڰ„ĐÂâÂ+ŻŒČČČ2óÌ>űàŸ}û–§~ûŁû‡üGU!ZkŽgwgWûâò„%ÄŽ'Ű\=e\HĘê”èÙȘ~„ŽFŁ$K}ڃ3 ą(N“ĐBY‘E)•ÊČ<Ïs‡óJ)#É2c %ÄśŒQçEÔÊR"Œ8gižĆIȆđÁ~đ”¶Ś7ßùș«ŻèŻ Ööٟ~èoŸőùCOțÍ»—{BJé-6ČFQ„1Ț”{éGߏßuïŚąÄâ‹W„ù+@QJ'ŽF€w‡,2ÖL?;cM’fÖZŚu)!°ÓÁëÙê.ØRc\WO‰ČEŽÏ4Ë`ČEQ|ŚwĘćûÁ /Œ0ć}à?2ę”Z­æg>ûÙ éXvęțN;|>)€§”öęŒ(€’îéÖ Ë(«Jbƒ(Â1ƊČLČŹ„yQXkÙÈò<ÏsdQšeaH„êÊyRÉê+‡LÂ0 ˜žBÇ©L™3†1n„ĄĂ‡;ž»†™ÄI2ŒGuƗŚȚ^ńÇ9°wOŠșó¶U„Đ+gïú›çïZìBcföQxžX\8_üüÖɓŰŐ^Ÿśæ_ę™_úȚ-^DQ–q/tșłĘ­VęțùÈ”ÓiWûZ”‘AXæ€äuąòUEYŁ8 U°žČșzó5§o»a;śKv/Æ ‚Ńăǎüöš8áM7ĘŰí.œ={vú)=ùŚOțżű_3Âü˰y镳o†űäÜÊ &ž6֕3jwQ„ÿęá0đę”[&˜­ŃHÒ4IçU—ă$)ʂJ)©—©êĄĆÌűdZÔì駟Nç~Ęć_KÛŸîÄđ©Ïüć•oŒ5Òô0VŽNh„?vbĐë:w!4èś+A»Ę†Q0{—v/íčâÚk ‡Ń`Đ ƒ ƕRsșí&V2~Ÿi–QJ)%5žéÿę„FŒ)Šăƒ#„Òßș暯ÿĘ+ç§]čoߏoÜà1 &T3ȚțŽ·?üß{A1ź“ÁŐrBđŽæ#€VőŚÏF›NÚ0Ɣ’ą(Qc˜œ8łŰjź~ôŁs?ùĄŸŒéæ‡ĂhśîĘț'ș‘±VÇçžx靶/,-<ó­sŚ*»TJ)„ŹŒÔ ŠIi–qÆÖLĐŰșZ Ò nD™\áj­;ĘQW:B”’Àśƒ=E–eՇ­±àž—7ŸĄpm<—Á^?ÿìŸ7ȚúÍï~ăgBíđ[ŚìțjœĐ}WœțëŻŒGkíybϞ=tÆ=­ĂWwÇ š™=\pî„UU詔xž—€)Űw§Ő‚Bg|:ąlâçĂQTeàûšȘhSJêAHàû`"°ńž_5áÚj†C<Űû”_ÿ5ÀÛąì BèsOźž ßsŚ0K_:±r+Ș ±Vmƒ•YPJ*Òș”ÒóÜșĆ0ÊȘ‹“È”WžÓŻŒźÄíûŒ2cLVäçEQ·Ækțb„áÙòÀûčGï^3Ž1üÛÿćóőWź±vĐï9òï¶~ș?úűuwȚrò±ß„6S<ĘêőZ=ß0ĄH8•Ò>p à-æEnŒ…llŁáUźpĄŻ`Œ &„BŹLƒ*&Òi”8cĐ”<ÜË”OlêOŽ;vAÓžB/Ÿ°'Nyó W-~#Í[ˆßYĆ')ÁŸëAj%„ű x\‡sJšR jΔPJIe…đÆX^äȚž( ÈŽïûW€é)±êž ƒ IÓ•Óń+€° Aê𓇷•ë œP„ĐÙo?5SugÎŃj ;o9ù‘Gî^\6&%ÆžĘjEQ€”!”ÂŻ”ŃcżzŹ[ћŽ#œź”2NÓêčË©èَłÎčïyi–őz=„ĐȚĘxN3śEJĄ/|yu±‹Țv2ö‰ŽŒZâęÚèȘ§j"Ú©@YŰ€”ٱŸ{ʃEI)!d Ž.„ <żjȚb”čM—Źg#YkáoûĂáB·tá8PŚ…e0J`3ąí8f€ÿ`Ÿ ±=Ąßęłæű7_Œ” Š“dbœ$§lͰÆ2cĘv{&"˜ùV†L€y&„Ìò¶č$K'^[·ĘźÜ34rù?ˆßśî+_œ7±ÒCòœ/<«ŽűS.țF™Ÿ«î ÿá(Ș üœ1æ{n}‹Żÿ[)-KÙ šaCȘóBï Ç©ÇńՐDƘïy°ï Çń=Ż˜ˆ <ßZ[lӈĂÙèúńS­ûîș˜ĘügÿÓ觟u~đèEăžçNÇŁ›žMJÙ ąQ<Ęć\—ápÎĂ0€ŽĘjqÊê|km”fàFŁűÉ/íiù§ȚtÛVË;ßńŠ œwkíJ}îÉŐÿù„J3Ô N âŻQù5l΀œ” î7IS„ÔFȚNk“f™”Önpz&m8ŒâŃjż§Ž‚Æ m4ŹR)%Ôù’4ĆŸú æ»-öÊ.{Țś;šęÆ/æ}?3ĆH ŽŽ• Ź ôÊÚ6ȘÄ@CÄ»źpë+Đû9çđo„POZÍF•^HKțțűń/#€ÿïsvScœ~ߑç.6~(Kô…/ŻBˆő†[ï­,5^D ӁżˆÆÀ•ÁÍ?Xłë ­’Ăđ=OkM ­Œžs«4Í3 6űž'\?„Bź”ćN±Wœ8Àžp7‚NcœA_k+žQ[¶Ș5ëAÈUÏ*81† Țh)Öó¶ŃPJm • ń„“>BȚń֗ß~hń™g—O10Áç»Èá!ä tęŸ#ƒäșśœ;ûőOœž”g2Ą/|y#DZZÀ·ĘÜCĆËz‹ăxițŠGžB8ušÔPä6ЙSĘŠ”2ŠG Ź6:ÏsŁQìp΃˜ĄÌ‹bŻôÒ\ęsÏë0ž€9Æ ÖOł(JÆÎkAk[i…ZíőĂ š\lšŠŸëÁ9…ă@úRyè(ŸO •RJà‡i–ŐűL3l€#”Ÿrșqüì­WïNożeùŸ»&ÁĘȘ#+Âsƒ«ÛÁž‹ČKŽô,BJĄSgíésœûŸ«kÍ…x{#FI2aȀym„IEč"{Ęv;ϋ‰ČcL8ą”Òą(Ë:ŰŠM˜ìșĆFĆ ÿĂ*ê¶ÛV«œȚXë1źë °BŰŃŠï+Í34Ö:í úEY8œ/t;œČ4ËÁ ĘN3lŽ[-L0„‚]4K Âś<‡sá8‚`Â+p°Ęh~kő»=‘ęÈûŻxÓműÀUxïnŒw7ŸD­_kísßì©üƍb*2Uí«rŻ9mj€­&Yšfđ8eÂqáH­â4]sȚ”m„!â_üzčŠíV«’J€Ó=}Ô3-Î98Ć$M±†Ú(„*ŻCj•-Š©6ZJépî X#ąQL(Ą†@lG©okĐ9vkmőEjF =čzÏBxôæŚÏžbÇ †Š3tòÔ!”e&Š-BHÊyÂGI:ï„Y–ç&xșX5_č‘ XŐ˜˜€iE'‚Ûß:ńíAüŠZ†o»ëÄS_œêҍ>ËČ‘Òže %ÇjèHEÌ!ș3ÆÒ4e”)­ea$Yj(ŐŃ$/òRJ‡óÊôă$1ÆRBe,SJꐙ6žc˜` Ąœ_?ź—æYQ–§z7eĄ”Y™™v˜v›!z«7^ÛF;œ2>‹đaàä©A–„Űôlï;&XcĄ’·EuŃÆX‹tkʋ•WźPXBÉČŚKwË«—­SąąbH­ŠČ Úíœs„”ÒjŽŹĂ9Á˜PB‰?Ž>MšeœAżÙlrÊŽŃEQBÔ«”©Ź*đę4[+đ–R2Æ ·ÄuxPVKŠÊąŹșG żf”ćEȚ Zë äp†QŽSü+»¶YŠ.•Ż5Ö0ÊŠČ€”Ž›MŒ1ì_Œ1Æš”Äú*ûźo…q’űŸÏUJŒ—a§« k­š%€ÊÓF—Rk‡QßdEŰŹáB:KŠ™Œ1mtâFŁžĘlv:m šU9RÊś<á8N›Z”W‹Ü)%íV îśŐ{àPyÉó€Fp *° RÛa„iȃìőLOŒ”ÙDhí˜#Ï „ Àz”Ò”xyPI§”k čüÖź……RJÀŠąź'„đÜWû=WžUQwfm\ PĄQ­j1æŒE9JâfŰX›„IČ8o6Z8N”f”V %H]«y* (ށÀ•WW‚1ö„ Ń6Á„1êp>sÓžŠúvĄ”Æc­±“]ĘÏó wl R–f#ìŽZ˜`3>a^°Ź”À“Ș&e™9|ûòêjžžçΏÚ/ń€J {aŽ[­,ËΫRź8Ž·k8ś†țc|üTëÓżÊ~áŃć瞦Űő}wOąßęáù‘ȘĄgŸąĘŚżPü”.`‘čpD#«Òèü€A)  äòy‘C•d)„cÒăČ(c™@äšçE§ŐȘPÈîÎ %p%„š€WßB¶hLzČÆŸ đùzzÇ)ă>‹“ÄáŒÒVéá8RJ(‚Ï&˜dEЧóôî?ŒFöU›7äșÂ0%š°gBp# ȒRV”ć3Ï<łÛì†ńëÏțç;țőżüg_öÁˆÀńßęłæ/|ùÔY Žk$&[-„ôŒqÜŽ€V! g š^îÌŁ?_źÓje诌)KkŹđÜ4ˊrM]Ki5fn JIeV2y‘F$XFŒ1gçÙ±ÂÖZetŠYÈFà$ŚĐÍ[Ą]Շ…p„ăDŁ ș™Č”ùÌÜX^­làFFńâihtĂ7œF•‰ZkG۔fmnŻĄßüĘ«țÛï_ë0)èyWh\*n Pu8ìŒÖڛŻY~ŚĄÓ_üŒX† qŒucE 8\›ˆ‰ÇÖU'–ïy+ęȚŽŻm6ÂQ’xÂ͊œQ†ÆCWàWœÁŸhkmáÔ Ë U•…*f­Ÿ„’ì1)ŰÙ­”k53„ôžŃźĂčÖÖ@™Jè΄€ß9çU›MEȚƒž¶Ù…#’4 ‡ÛRíŽÆö}WžočÂő[^]é(_ûÚŚvšœbŒæĄRńRM/G^/†aŒŸ?¶ôÒ§;ÖžoyÓ+‡îców șŽMUsgŠDœóRJ‚1žIid^äœs€ș&b G8ÈۙÄ%WžÎ˜OŰY’ŠJ+c,Ž!€ckĂƒËt„Óï Œ"°Új@LB(áˆA)ÁáŽ*:Ę*ńČÆFŁxiqQjKe#6à«}­ÂĘʚZ‡6z”Ś;sêÔ¶§Ę—Ï+GH?őŐ«žúêUÖZ„.C?7ôcčÂ]›ŒSÛs]W@rP`gZŰÜ %őŃ+ƒáp±ÓŠ9† ße^kmźÆ_1%çRJđß`ÊͰÁ)ĂK„Ź”ÖX!œúˆ6€NaB†ïzŁ$ |?ŠGĐïZ]Ź„#t#ȚÓLòÊ«‘i•ăQćՆ`Ž)Ëò̔†ÍNÁ. zzY(ZPÄŻ¶€ő`Ÿè Y‘{Âÿ·Öq?N}V{ęĐś߯ȘäYžWpƆhíh\«‡‰Ł$±Ö†Ÿp,xAZ”-PfŒì ì©RJ]ćVŁű>"X)”Ü[Íóą”RŚ4:›Í&J–çe–Ż’Ó„5Ú „šÛ8çB8ӏh9YŻ…œ^źš‰Áńőb-i–YcóŒš IcÇì$kă†ÁÀś»ívłb‚ă$‘„œĐ‰Ïò"N’™Á1DYžű ÖJÁ špÆÒ,Ø@…Œ2æ ·ŻĆ#ÀA#»ź™Ë…n‡RB)a„źÊÚűç”{ś„Vv 5p«`Ą1“dč·ÚőΘƒŒÓ1–RÊTVŃj=$0FCŻfĆIƒłÆJ„ÆÙŹÈź‚RV4Š„’ͰQ§±VU}”VÜrˆ:]„tp›Æ‡ŸÏ)‹â\ĄÖFëZ0ÆB8@M; „B•VË««Z$źœôks(­€ô”óhW @"J)mt»Ń,„ŒGú;țu&„aPm[RJOžà™À’ߟ(© áìZXšČïZőDTł±•ŃF›ŒÈá[@Ìœ+Pg`Àb^äĐGčÆW$žĘhk %Z)@$.ûŻúáȘęíüX„)†HEÙ6iîP{u]$À $Bcf Ô `©xŸȘ#çŒ(Ëą, ž?J’ú†+§ÎŃźÚWŒ”àŒAžČŸƒeŒ§+)ć˜>VÇ ÈeB8Đ VĆcÂ(ĐW0ÁźJ«á(j5šđ©TœŠÆh(ÉA0†"ӅŠ]8`ítn" Đe ć ŰĐm·=Śł ó{]ŸwŻ·¶J$f4ŠŚš$[ÛĂ €=€}Áÿ1F­5Ő€ˆ úó!çcĐ7UF·ÍȘ8Y!_Àï)„„ Ói§y6ŒFP&ƒPk aź±¶ßޚMƒ\áŒál^g ‰h\æ­|ìU2Ö”"œB­f& ”ÁI:đ}ˆY‹ČšÜ±ÖśŒíêÙډöjŽIłŹ>­ú·ÔkŹț­ÇpJ+­M8ô=ŻÚ‹+;†œB̉pțj­TQ”Úèș@ZĆW‚?ÆÖh[c•Q0ą–Ê ÀJǃÒ,SJ‰†Smë՗Ÿ ĘÊnæóčšlÄlt]á ·‚ې@œÁ@8ąș*wü[k-çÒ/OžÛ5{úűÿSŰLń‡NIENDźB`‚passenger-4.0.37/test/stub/wsgi/passenger_wsgi.py000644 000765 000024 00000011402 12233035540 022511 0ustar00honglistaff000000 000000 import os, sys, time, cgi def file_exist(filename): try: os.stat(filename) return True except OSError: return False if sys.version_info[0] >= 3: def bytes_to_str(b): return b.decode() def str_to_bytes(s): return s.encode('latin-1') else: def bytes_to_str(b): return b def str_to_bytes(s): return s def application(env, start_response): status = '200 OK' body = None method = env.get('REQUEST_METHOD') if method == 'OOBW': time.sleep(1) start_response(status, [('Content-Type', 'text/html')]) return [str('oobw ok')] filename = env.get('HTTP_X_WAIT_FOR_FILE') if filename is not None: while not file_exist(filename): time.sleep(0.01) path = env['PATH_INFO'] if path == '/': if file_exist("front_page.txt"): with file("front_page.txt", "r") as f: body = f.read() else: body = "front page" elif path == '/parameters': method = env['REQUEST_METHOD'] params = cgi.parse(env['wsgi.input'], env) first = params['first'][0] second = params['second'][0] body = "Method: %s\nFirst: %s\nSecond: %s\n" % (method, first, second) elif path == '/chunked': chunks = [str("7\r\nchunk1\n\r\n"), str("7\r\nchunk2\n\r\n"), str("7\r\nchunk3\n\r\n"), str("0\r\n\r\n")] start_response(status, [('Content-Type', 'text/html'), ('Transfer-Encoding', 'chunked')]) return chunks elif path == '/pid': body = os.getpid() elif path.startswith('/env'): body = '' for pair in env.iteritems(): body += pair[0] + ' = ' + str(pair[1]) + "\n" body = body elif path == '/touch_file': params = cgi.parse(env['wsgi.input'], env) filename = params["file"][0] file(filename, 'w').close() body = "ok" elif path == '/extra_header': start_response(status, [('Content-Type', 'text/html'), ('X-Foo', 'Bar')]) return ["ok"] elif path == '/cached': body = "This is the uncached version of /cached" elif path == '/upload_with_params': params = cgi.FieldStorage(fp = env['wsgi.input'], environ = env) name1 = params["name1"].value name2 = params["name2"].value data = params["data"].value format = \ b"name 1 = %s\n" + \ b"name 2 = %s\n" + \ b"data = %s" body = format % (name1, name2, data) elif path == '/raw_upload_to_file': sleep_time = float(env.get('HTTP_X_SLEEP', 0)) f = open(env['HTTP_X_OUTPUT'], 'w') try: line = env['wsgi.input'].readline() while line != "": f.write(line) f.flush() line = env['wsgi.input'].readline() if sleep_time > 0: time.sleep(sleep_time) finally: f.close() body = 'ok' elif path == '/custom_status': status = env['HTTP_X_CUSTOM_STATUS'] body = 'ok' elif path == '/stream': sleep_time = float(env.get('HTTP_X_SLEEP', 0.1)) def body(): i = 0 while True: data = ' ' * 32 + str(i) + "\n" yield("%x\r\n" % len(data)) yield(data) yield("\r\n") time.sleep(sleep_time) i += 1 start_response(status, [('Content-Type', 'text/html'), ('Transfer-Encoding', 'chunked')]) return body() elif path == '/chunked_stream': sleep_time = float(env.get('HTTP_X_SLEEP', 0.05)) count = float(env.get('HTTP_X_COUNT', 3)) def body(): i = 0 while i < count: data = "Counter: " + str(i) + "\n" yield("%x\r\n" % len(data)) yield(data) yield("\r\n") time.sleep(sleep_time) i += 1 yield("0\r\n\r\n") time.sleep(2) start_response(status, [('Content-Type', 'text/html'), ('Transfer-Encoding', 'chunked')]) return body() elif path == '/sleep': sleep_time = float(env.get('HTTP_X_SLEEP', 5)) time.sleep(sleep_time) status = 200 body = 'ok' elif path == '/blob': size = int(env.get('HTTP_X_SIZE', 1024 * 1024 * 10)) def body(): written = 0 while written < size: data = 'x' * min(1024 * 8, size - written) yield(data) written += len(data) start_response(status, [('Content-Type', 'text/plain')]) return body() elif path == '/oobw': start_response(status, [('Content-Type', 'text/plain'), ('X-Passenger-Request-OOB-Work', 'true')]) return [str(os.getpid())] elif path == '/switch_protocol': if env['HTTP_UPGRADE'] != 'raw' or env['HTTP_CONNECTION'].lower() != 'upgrade': status = '500 Internal Server Error' body = str('Invalid headers') start_response(status, [('Content-Type', 'text/plain'), ('Content-Length', len(body))]) return [body] socket = env['passenger.hijack']() io = socket.makefile() socket.close() try: io.write( b"HTTP/1.1 101 Switching Protocols\r\n" + b"Upgrade: raw\r\n" + b"Connection: Upgrade\r\n" + b"\r\n") io.flush() line = io.readline() while line != "": io.write("Echo: " + line) io.flush() line = io.readline() finally: io.close() else: status = "404 Not Found" body = "Unknown URI" body = str(body) start_response(status, [('Content-Type', 'text/plain'), ('Content-Length', len(body))]) return [body] passenger-4.0.37/test/stub/wsgi/public/000755 000765 000024 00000000000 12233035540 020377 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/wsgi/tmp/000755 000765 000024 00000000000 12233035540 017721 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/wsgi/tmp/.gitignore000644 000765 000024 00000000000 12233035540 021677 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/wsgi/public/.gitignore000644 000765 000024 00000000000 12233035540 022355 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/000755 000765 000024 00000000000 12233035540 022265 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/actionmailer/000755 000765 000024 00000000000 12233035540 024734 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/actionpack/000755 000765 000024 00000000000 12233035540 024401 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/activerecord/000755 000765 000024 00000000000 12233035540 024737 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/activeresource/000755 000765 000024 00000000000 12233035540 025310 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/activesupport/000755 000765 000024 00000000000 12233035540 025175 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/railties/000755 000765 000024 00000000000 12233035540 024101 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/README000644 000765 000024 00000000053 12233035540 023143 0ustar00honglistaff000000 000000 A minimalist simulation a Rails framework. passenger-4.0.37/test/stub/vendor_rails/minimal/railties/lib/000755 000765 000024 00000000000 12233035540 024647 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/railties/lib/dispatcher.rb000644 000765 000024 00000000000 12233035540 027310 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/railties/lib/initializer.rb000644 000765 000024 00000002060 12233035540 027515 0ustar00honglistaff000000 000000 RAILS_FRAMEWORK_ROOT = File.expand_path("#{File.dirname(__FILE__)}/../..") module Rails class Initializer attr_accessor :configuration def self.run(action = :boot) inst = self.new if inst.respond_to?(action) inst.send(action) end end def initialize @configuration = Configuration.new end def boot set_load_path load_environment end def load_environment require "#{RAILS_FRAMEWORK_ROOT}/activesupport/lib/active_support" require "#{RAILS_FRAMEWORK_ROOT}/actionpack/lib/action_controller" end def set_load_path if defined?(RAILS_ROOT) $LOAD_PATH << "#{RAILS_ROOT}/app/controllers" end $LOAD_PATH << "#{RAILS_FRAMEWORK_ROOT}/railties/lib" end protected class Configuration attr_accessor :log_path attr_accessor :default_log_path def initialize @log_path = @default_log_path = 'foo.log' end end end class GemDependency def self.add_frozen_gem_path end end module VERSION MAJOR = 2 MINOR = 3 TINY = 4 STRING = [MAJOR, MINOR, TINY].join('.') end end passenger-4.0.37/test/stub/vendor_rails/minimal/railties/lib/ruby_version_check.rb000644 000765 000024 00000000001 12233035540 031046 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/activesupport/lib/000755 000765 000024 00000000000 12233035540 025743 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/activesupport/lib/active_support/000755 000765 000024 00000000000 12233035540 031012 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/activesupport/lib/active_support.rb000644 000765 000024 00000000260 12233035540 031335 0ustar00honglistaff000000 000000 class Object def require_dependency(name) require(name) end end class NilClass def blank? return true end end class String def blank? return strip.empty? end end passenger-4.0.37/test/stub/vendor_rails/minimal/activesupport/lib/active_support/whiny_nil.rb000644 000765 000024 00000000000 12233035540 033325 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/activeresource/lib/000755 000765 000024 00000000000 12233035540 026056 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/activeresource/lib/active_resource.rb000644 000765 000024 00000000000 12233035540 031553 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/activerecord/lib/000755 000765 000024 00000000000 12233035540 025505 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/activerecord/lib/active_record.rb000644 000765 000024 00000000124 12233035540 030640 0ustar00honglistaff000000 000000 class ActiveRecord class Base def self.connected? return false end end end passenger-4.0.37/test/stub/vendor_rails/minimal/actionpack/lib/000755 000765 000024 00000000000 12233035540 025147 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/actionpack/lib/action_controller.rb000644 000765 000024 00000000440 12233035540 031212 0ustar00honglistaff000000 000000 module ActionController class Base def self.page_cache_directory nil end def self.page_cache_directory=(dir) end def self.helper(*whatever) end def self.protect_from_forgery(*whatever) end def self.session(*whatever) end end class Dispatcher end end passenger-4.0.37/test/stub/vendor_rails/minimal/actionpack/lib/action_pack.rb000644 000765 000024 00000000000 12233035540 027735 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/actionpack/lib/action_view.rb000644 000765 000024 00000000000 12233035540 027771 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/actionmailer/lib/000755 000765 000024 00000000000 12233035540 025502 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/vendor_rails/minimal/actionmailer/lib/action_mailer.rb000644 000765 000024 00000000000 12233035540 030623 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/.gitignore000644 000765 000024 00000000707 12233035540 021500 0ustar00honglistaff000000 000000 # See http://help.github.com/ignore-files/ for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile '~/.gitignore_global' # Ignore bundler config. /.bundle # Ignore the default SQLite database. /db/*.sqlite3 /db/*.sqlite3-journal # Ignore all logfiles and tempfiles. /log/*.log /tmp passenger-4.0.37/test/stub/rails4.0/app/000755 000765 000024 00000000000 12233035540 020264 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/bin/000755 000765 000024 00000000000 12233035540 020254 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/config/000755 000765 000024 00000000000 12233035540 020751 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/config.ru000644 000765 000024 00000000232 12233035540 021316 0ustar00honglistaff000000 000000 # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run Rails.application passenger-4.0.37/test/stub/rails4.0/db/000755 000765 000024 00000000000 12233035540 020071 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/Gemfile000644 000765 000024 00000002226 12233035540 021001 0ustar00honglistaff000000 000000 source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.0.0' # Use sqlite3 as the database for Active Record gem 'sqlite3' # Use SCSS for stylesheets gem 'sass-rails', '~> 4.0.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # Use CoffeeScript for .js.coffee assets and views gem 'coffee-rails', '~> 4.0.0' # See https://github.com/sstephenson/execjs#readme for more supported runtimes gem 'therubyracer', platforms: :ruby # Use jquery as the JavaScript library gem 'jquery-rails' # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks gem 'turbolinks' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 1.2' group :doc do # bundle exec rake doc:rails generates the API under doc/api. gem 'sdoc', require: false end # Use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' # Use unicorn as the app server # gem 'unicorn' # Use Capistrano for deployment # gem 'capistrano', group: :development # Use debugger # gem 'debugger', group: [:development, :test] passenger-4.0.37/test/stub/rails4.0/Gemfile.lock000644 000765 000024 00000005501 12233035540 021727 0ustar00honglistaff000000 000000 GEM remote: https://rubygems.org/ specs: actionmailer (4.0.0) actionpack (= 4.0.0) mail (~> 2.5.3) actionpack (4.0.0) activesupport (= 4.0.0) builder (~> 3.1.0) erubis (~> 2.7.0) rack (~> 1.5.2) rack-test (~> 0.6.2) activemodel (4.0.0) activesupport (= 4.0.0) builder (~> 3.1.0) activerecord (4.0.0) activemodel (= 4.0.0) activerecord-deprecated_finders (~> 1.0.2) activesupport (= 4.0.0) arel (~> 4.0.0) activerecord-deprecated_finders (1.0.3) activesupport (4.0.0) i18n (~> 0.6, >= 0.6.4) minitest (~> 4.2) multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) arel (4.0.0) atomic (1.1.12) builder (3.1.4) coffee-rails (4.0.0) coffee-script (>= 2.2.0) railties (>= 4.0.0.beta, < 5.0) coffee-script (2.2.0) coffee-script-source execjs coffee-script-source (1.6.3) erubis (2.7.0) execjs (1.4.0) multi_json (~> 1.0) hike (1.2.3) i18n (0.6.4) jbuilder (1.5.0) activesupport (>= 3.0.0) multi_json (>= 1.2.0) jquery-rails (3.0.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) json (1.8.0) libv8 (3.11.8.17) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.23) minitest (4.7.5) multi_json (1.7.9) polyglot (0.3.3) rack (1.5.2) rack-test (0.6.2) rack (>= 1.0) rails (4.0.0) actionmailer (= 4.0.0) actionpack (= 4.0.0) activerecord (= 4.0.0) activesupport (= 4.0.0) bundler (>= 1.3.0, < 2.0) railties (= 4.0.0) sprockets-rails (~> 2.0.0) railties (4.0.0) actionpack (= 4.0.0) activesupport (= 4.0.0) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (10.1.0) rdoc (3.12.2) json (~> 1.4) ref (1.0.5) sass (3.2.10) sass-rails (4.0.0) railties (>= 4.0.0.beta, < 5.0) sass (>= 3.1.10) sprockets-rails (~> 2.0.0) sdoc (0.3.20) json (>= 1.1.3) rdoc (~> 3.10) sprockets (2.10.0) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) sprockets-rails (2.0.0) actionpack (>= 3.0) activesupport (>= 3.0) sprockets (~> 2.8) sqlite3 (1.3.7) therubyracer (0.11.4) libv8 (~> 3.11.8.12) ref thor (0.18.1) thread_safe (0.1.2) atomic tilt (1.4.1) treetop (1.4.14) polyglot polyglot (>= 0.3.1) turbolinks (1.3.0) coffee-rails tzinfo (0.3.37) uglifier (2.1.2) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) PLATFORMS ruby DEPENDENCIES coffee-rails (~> 4.0.0) jbuilder (~> 1.2) jquery-rails rails (= 4.0.0) sass-rails (~> 4.0.0) sdoc sqlite3 therubyracer turbolinks uglifier (>= 1.3.0) passenger-4.0.37/test/stub/rails4.0/lib/000755 000765 000024 00000000000 12233035540 020252 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/log/000755 000765 000024 00000000000 12233035540 020265 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/public/000755 000765 000024 00000000000 12233035540 020762 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/Rakefile000644 000765 000024 00000000374 12233035540 021155 0ustar00honglistaff000000 000000 # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('../config/application', __FILE__) Rails40::Application.load_tasks passenger-4.0.37/test/stub/rails4.0/README.rdoc000644 000765 000024 00000000736 12233035540 021320 0ustar00honglistaff000000 000000 == README This README would normally document whatever steps are necessary to get the application up and running. Things you may want to cover: * Ruby version * System dependencies * Configuration * Database creation * Database initialization * How to run the test suite * Services (job queues, cache servers, search engines, etc.) * Deployment instructions * ... Please feel free to use a different markup language if you do not plan to run rake doc:app. passenger-4.0.37/test/stub/rails4.0/test/000755 000765 000024 00000000000 12233035540 020463 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/vendor/000755 000765 000024 00000000000 12233035540 021001 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/vendor/assets/000755 000765 000024 00000000000 12233035540 022303 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/vendor/assets/javascripts/000755 000765 000024 00000000000 12233035540 024634 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/vendor/assets/stylesheets/000755 000765 000024 00000000000 12233035540 024657 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/vendor/assets/stylesheets/.keep000644 000765 000024 00000000000 12233035540 025572 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/vendor/assets/javascripts/.keep000644 000765 000024 00000000000 12233035540 025547 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/test/controllers/000755 000765 000024 00000000000 12233035540 023031 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/test/fixtures/000755 000765 000024 00000000000 12233035540 022334 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/test/helpers/000755 000765 000024 00000000000 12233035540 022125 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/test/integration/000755 000765 000024 00000000000 12233035540 023006 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/test/mailers/000755 000765 000024 00000000000 12233035540 022117 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/test/models/000755 000765 000024 00000000000 12233035540 021746 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/test/test_helper.rb000644 000765 000024 00000000754 12233035540 023334 0ustar00honglistaff000000 000000 ENV["RAILS_ENV"] ||= "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' class ActiveSupport::TestCase ActiveRecord::Migration.check_pending! # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. # # Note: You'll currently still have to declare fixtures explicitly in integration tests # -- they do not yet inherit this setting fixtures :all # Add more helper methods to be used by all tests here... end passenger-4.0.37/test/stub/rails4.0/test/models/.keep000644 000765 000024 00000000000 12233035540 022661 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/test/mailers/.keep000644 000765 000024 00000000000 12233035540 023032 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/test/integration/.keep000644 000765 000024 00000000000 12233035540 023721 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/test/helpers/.keep000644 000765 000024 00000000000 12233035540 023040 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/test/fixtures/.keep000644 000765 000024 00000000000 12233035540 023247 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/test/controllers/.keep000644 000765 000024 00000000000 12233035540 023744 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/public/404.html000644 000765 000024 00000002507 12233035540 022163 0ustar00honglistaff000000 000000 The page you were looking for doesn't exist (404)

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

If you are the application owner check the logs for more information.

passenger-4.0.37/test/stub/rails4.0/public/422.html000644 000765 000024 00000002466 12233035540 022167 0ustar00honglistaff000000 000000 The change you wanted was rejected (422)

The change you wanted was rejected.

Maybe you tried to change something you didn't have access to.

If you are the application owner check the logs for more information.

passenger-4.0.37/test/stub/rails4.0/public/500.html000644 000765 000024 00000002362 12233035540 022157 0ustar00honglistaff000000 000000 We're sorry, but something went wrong (500)

We're sorry, but something went wrong.

If you are the application owner check the logs for more information.

passenger-4.0.37/test/stub/rails4.0/public/favicon.ico000644 000765 000024 00000000000 12233035540 023071 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/public/robots.txt000644 000765 000024 00000000314 12233035540 023031 0ustar00honglistaff000000 000000 # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file # # To ban all spiders from the entire site uncomment the next two lines: # User-agent: * # Disallow: / passenger-4.0.37/test/stub/rails4.0/log/.keep000644 000765 000024 00000000000 12233035540 021200 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/lib/assets/000755 000765 000024 00000000000 12233035540 021554 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/lib/tasks/000755 000765 000024 00000000000 12233035540 021377 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/lib/tasks/.keep000644 000765 000024 00000000000 12233035540 022312 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/lib/assets/.keep000644 000765 000024 00000000000 12233035540 022467 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/db/seeds.rb000644 000765 000024 00000000527 12233035540 021525 0ustar00honglistaff000000 000000 # This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) # Mayor.create(name: 'Emanuel', city: cities.first) passenger-4.0.37/test/stub/rails4.0/config/application.rb000644 000765 000024 00000001730 12233035540 023602 0ustar00honglistaff000000 000000 require File.expand_path('../boot', __FILE__) require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(:default, Rails.env) module Rails40 class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # config.time_zone = 'Central Time (US & Canada)' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de end end passenger-4.0.37/test/stub/rails4.0/config/boot.rb000644 000765 000024 00000000253 12233035540 022241 0ustar00honglistaff000000 000000 # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) passenger-4.0.37/test/stub/rails4.0/config/database.yml000644 000765 000024 00000001100 12233035540 023230 0ustar00honglistaff000000 000000 # SQLite version 3.x # gem install sqlite3 # # Ensure the SQLite 3 gem is defined in your Gemfile # gem 'sqlite3' development: adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: sqlite3 database: db/production.sqlite3 pool: 5 timeout: 5000 passenger-4.0.37/test/stub/rails4.0/config/environment.rb000644 000765 000024 00000000231 12233035540 023636 0ustar00honglistaff000000 000000 # Load the Rails application. require File.expand_path('../application', __FILE__) # Initialize the Rails application. Rails40::Application.initialize! passenger-4.0.37/test/stub/rails4.0/config/environments/000755 000765 000024 00000000000 12233035540 023500 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/config/initializers/000755 000765 000024 00000000000 12233035540 023457 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/config/locales/000755 000765 000024 00000000000 12233035540 022373 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/config/routes.rb000644 000765 000024 00000003215 12233035540 022620 0ustar00honglistaff000000 000000 Rails40::Application.routes.draw do # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". # You can have the root of your site routed with "root" # root 'welcome#index' # Example of regular route: # get 'products/:id' => 'catalog#view' # Example of named route that can be invoked with purchase_url(id: product.id) # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase # Example resource route (maps HTTP verbs to controller actions automatically): # resources :products # Example resource route with options: # resources :products do # member do # get 'short' # post 'toggle' # end # # collection do # get 'sold' # end # end # Example resource route with sub-resources: # resources :products do # resources :comments, :sales # resource :seller # end # Example resource route with more complex sub-resources: # resources :products do # resources :comments # resources :sales do # get 'recent', on: :collection # end # end # Example resource route with concerns: # concern :toggleable do # post 'toggle' # end # resources :posts, concerns: :toggleable # resources :photos, concerns: :toggleable # Example resource route within a namespace: # namespace :admin do # # Directs /admin/products/* to Admin::ProductsController # # (app/controllers/admin/products_controller.rb) # resources :products # end match ':controller(/:action(/:id))(.:format)', :via => [:get, :post] end passenger-4.0.37/test/stub/rails4.0/config/locales/en.yml000644 000765 000024 00000001172 12233035540 023521 0ustar00honglistaff000000 000000 # Files in the config/locales directory are used for internationalization # and are automatically loaded by Rails. If you want to use locales other # than English, add the necessary files in this directory. # # To use the locales, use `I18n.t`: # # I18n.t 'hello' # # In views, this is aliased to just `t`: # # <%= t('hello') %> # # To use a different locale, set it with `I18n.locale`: # # I18n.locale = :es # # This would use the information in config/locales/es.yml. # # To learn more, please read the Rails Internationalization guide # available at http://guides.rubyonrails.org/i18n.html. en: hello: "Hello world" passenger-4.0.37/test/stub/rails4.0/config/initializers/backtrace_silencers.rb000644 000765 000024 00000000624 12233035540 027774 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. # Rails.backtrace_cleaner.remove_silencers! passenger-4.0.37/test/stub/rails4.0/config/initializers/filter_parameter_logging.rb000644 000765 000024 00000000302 12233035540 031032 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [:password] passenger-4.0.37/test/stub/rails4.0/config/initializers/inflections.rb000644 000765 000024 00000001207 12233035540 026321 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym 'RESTful' # end passenger-4.0.37/test/stub/rails4.0/config/initializers/mime_types.rb000644 000765 000024 00000000315 12233035540 026156 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone passenger-4.0.37/test/stub/rails4.0/config/initializers/passenger.rb000644 000765 000024 00000000263 12233035540 025774 0ustar00honglistaff000000 000000 if defined?(PhusionPassenger) PhusionPassenger.install_framework_extensions!( event_preprocessor: ->(e) { e.payload[:sql].gsub!("secret","PASSWORD") if e.payload[:sql] } ) endpassenger-4.0.37/test/stub/rails4.0/config/initializers/secret_token.rb000644 000765 000024 00000001225 12233035540 026471 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Your secret key is used for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. # You can use `rake secret` to generate a secure secret key. # Make sure your secret_key_base is kept private # if you're sharing your code publicly. Rails40::Application.config.secret_key_base = '75263cb18194603bd540bff34d48571735ea9eac6c38565aef6423eb2add685ba3333b81568f7eb57caecf3918b780542e7350fdeed9fe8ca9e9e43ca1f7caf8' passenger-4.0.37/test/stub/rails4.0/config/initializers/session_store.rb000644 000765 000024 00000000217 12233035540 026703 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. Rails40::Application.config.session_store :cookie_store, key: '_rails4_0_session' passenger-4.0.37/test/stub/rails4.0/config/initializers/wrap_parameters.rb000644 000765 000024 00000001005 12233035540 027174 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] if respond_to?(:wrap_parameters) end # To enable root element in JSON for ActiveRecord objects. # ActiveSupport.on_load(:active_record) do # self.include_root_in_json = true # end passenger-4.0.37/test/stub/rails4.0/config/environments/development.rb000644 000765 000024 00000002133 12233035540 026346 0ustar00honglistaff000000 000000 Rails40::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise an error on page load if there are pending migrations config.active_record.migration_error = :page_load # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true end passenger-4.0.37/test/stub/rails4.0/config/environments/production.rb000644 000765 000024 00000006263 12233035540 026222 0ustar00honglistaff000000 000000 Rails40::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both thread web servers # and those relying on copy on write to perform better. # Rake tasks automatically ignore this option for performance. config.eager_load = true # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true # Enable Rack::Cache to put a simple HTTP cache in front of your application # Add `rack-cache` to your Gemfile before enabling this. # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. # config.action_dispatch.rack_cache = true # Disable Rails's static asset server (Apache or nginx will already do this). config.serve_static_assets = false # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false # Generate digests for assets URLs. config.assets.digest = true # Version of your assets, change this if you want to expire all your assets. config.assets.version = '1.0' # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true # Set to :debug to see everything in the log. config.log_level = :info # Prepend all log lines with the following tags. # config.log_tags = [ :subdomain, :uuid ] # Use a different logger for distributed setups. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # Use a different cache store in production. # config.cache_store = :mem_cache_store # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = "http://assets.example.com" # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # config.assets.precompile += %w( search.js ) # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation can not be found). config.i18n.fallbacks = true # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify # Disable automatic flushing of the log to improve performance. # config.autoflush_log = false # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new end passenger-4.0.37/test/stub/rails4.0/config/environments/test.rb000644 000765 000024 00000003031 12233035540 025001 0ustar00honglistaff000000 000000 Rails40::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! config.cache_classes = true # Do not eager load code on boot. This avoids loading your whole application # just for the purpose of running a single test. If you are using a tool that # preloads Rails for running tests, you may have to set it to true. config.eager_load = false # Configure static asset server for tests with Cache-Control for performance. config.serve_static_assets = true config.static_cache_control = "public, max-age=3600" # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr end passenger-4.0.37/test/stub/rails4.0/bin/bundle000755 000765 000024 00000000206 12233035540 021451 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby1.9.1 ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) load Gem.bin_path('bundler', 'bundle') passenger-4.0.37/test/stub/rails4.0/bin/rails000755 000765 000024 00000000227 12233035540 021315 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby1.9.1 APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' require 'rails/commands' passenger-4.0.37/test/stub/rails4.0/bin/rake000755 000765 000024 00000000137 12233035540 021125 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby1.9.1 require_relative '../config/boot' require 'rake' Rake.application.run passenger-4.0.37/test/stub/rails4.0/app/assets/000755 000765 000024 00000000000 12233035540 021566 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/controllers/000755 000765 000024 00000000000 12233035540 022632 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/helpers/000755 000765 000024 00000000000 12233035540 021726 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/mailers/000755 000765 000024 00000000000 12233035540 021720 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/models/000755 000765 000024 00000000000 12233035540 021547 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/views/000755 000765 000024 00000000000 12233035540 021421 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/views/layouts/000755 000765 000024 00000000000 12233035540 023121 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/views/layouts/application.html.erb000644 000765 000024 00000000451 12233035540 027061 0ustar00honglistaff000000 000000 Rails40 <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> <%= javascript_include_tag "application", "data-turbolinks-track" => true %> <%= csrf_meta_tags %> <%= yield %> passenger-4.0.37/test/stub/rails4.0/app/models/.keep000644 000765 000024 00000000000 12233035540 022462 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/models/concerns/000755 000765 000024 00000000000 12233035540 023361 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/models/concerns/.keep000644 000765 000024 00000000000 12233035540 024274 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/mailers/.keep000644 000765 000024 00000000000 12233035540 022633 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/helpers/application_helper.rb000644 000765 000024 00000000035 12233035540 026113 0ustar00honglistaff000000 000000 module ApplicationHelper end passenger-4.0.37/test/stub/rails4.0/app/controllers/application_controller.rb000644 000765 000024 00000000314 12233035540 027723 0ustar00honglistaff000000 000000 class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception end passenger-4.0.37/test/stub/rails4.0/app/controllers/concerns/000755 000765 000024 00000000000 12233035540 024444 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/controllers/concerns/.keep000644 000765 000024 00000000000 12233035540 025357 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/assets/images/000755 000765 000024 00000000000 12233035540 023033 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/assets/javascripts/000755 000765 000024 00000000000 12233035540 024117 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/assets/stylesheets/000755 000765 000024 00000000000 12233035540 024142 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails4.0/app/assets/stylesheets/application.css000644 000765 000024 00000001042 12233035540 027154 0ustar00honglistaff000000 000000 /* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * *= require_self *= require_tree . */ passenger-4.0.37/test/stub/rails4.0/app/assets/javascripts/application.js000644 000765 000024 00000001230 12233035540 026754 0ustar00honglistaff000000 000000 // This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // compiled file. // // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details // about supported directives. // //= require jquery //= require jquery_ujs //= require turbolinks //= require_tree . passenger-4.0.37/test/stub/rails4.0/app/assets/images/.keep000644 000765 000024 00000000000 12233035540 023746 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/.gitignore000644 000765 000024 00000000656 12233035540 021504 0ustar00honglistaff000000 000000 # See http://help.github.com/ignore-files/ for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile ~/.gitignore_global # Ignore bundler config /.bundle # Ignore the default SQLite database. /db/*.sqlite3 # Ignore all logfiles and tempfiles. /log/*.log /tmp passenger-4.0.37/test/stub/rails3.2/app/000755 000765 000024 00000000000 12233035540 020265 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/config/000755 000765 000024 00000000000 12233035540 020752 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/config.ru000644 000765 000024 00000000233 12233035540 021320 0ustar00honglistaff000000 000000 # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run Empty::Application passenger-4.0.37/test/stub/rails3.2/db/000755 000765 000024 00000000000 12233035540 020072 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/doc/000755 000765 000024 00000000000 12233035540 020252 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/Gemfile000644 000765 000024 00000001416 12233035540 021002 0ustar00honglistaff000000 000000 source 'https://rubygems.org' gem 'rails', '~> 3.2.11' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'sqlite3' gem 'json' # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer', :platforms => :ruby gem 'uglifier', '>= 1.0.3' end gem 'jquery-rails' # To use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' # To use Jbuilder templates for JSON # gem 'jbuilder' # Use unicorn as the app server # gem 'unicorn' # Deploy with Capistrano # gem 'capistrano' # To use debugger # gem 'ruby-debug' passenger-4.0.37/test/stub/rails3.2/Gemfile.lock000644 000765 000024 00000004751 12233035540 021736 0ustar00honglistaff000000 000000 GEM remote: https://rubygems.org/ specs: actionmailer (3.2.11) actionpack (= 3.2.11) mail (~> 2.4.4) actionpack (3.2.11) activemodel (= 3.2.11) activesupport (= 3.2.11) builder (~> 3.0.0) erubis (~> 2.7.0) journey (~> 1.0.4) rack (~> 1.4.0) rack-cache (~> 1.2) rack-test (~> 0.6.1) sprockets (~> 2.2.1) activemodel (3.2.11) activesupport (= 3.2.11) builder (~> 3.0.0) activerecord (3.2.11) activemodel (= 3.2.11) activesupport (= 3.2.11) arel (~> 3.0.2) tzinfo (~> 0.3.29) activeresource (3.2.11) activemodel (= 3.2.11) activesupport (= 3.2.11) activesupport (3.2.11) i18n (~> 0.6) multi_json (~> 1.0) arel (3.0.2) builder (3.0.4) coffee-rails (3.2.2) coffee-script (>= 2.2.0) railties (~> 3.2.0) coffee-script (2.2.0) coffee-script-source execjs coffee-script-source (1.4.0) erubis (2.7.0) execjs (1.4.0) multi_json (~> 1.0) hike (1.2.1) i18n (0.6.1) journey (1.0.4) jquery-rails (2.1.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) json (1.7.6) mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.20.1) multi_json (1.5.0) polyglot (0.3.3) rack (1.4.4) rack-cache (1.2) rack (>= 0.4) rack-ssl (1.3.3) rack rack-test (0.6.2) rack (>= 1.0) rails (3.2.11) actionmailer (= 3.2.11) actionpack (= 3.2.11) activerecord (= 3.2.11) activeresource (= 3.2.11) activesupport (= 3.2.11) bundler (~> 1.0) railties (= 3.2.11) railties (3.2.11) actionpack (= 3.2.11) activesupport (= 3.2.11) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (>= 0.14.6, < 2.0) rake (10.0.3) rdoc (3.12) json (~> 1.4) sass (3.2.5) sass-rails (3.2.6) railties (~> 3.2.0) sass (>= 3.1.10) tilt (~> 1.3) sprockets (2.2.2) hike (~> 1.2) multi_json (~> 1.0) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) sqlite3 (1.3.7) thor (0.17.0) tilt (1.3.3) treetop (1.4.12) polyglot polyglot (>= 0.3.1) tzinfo (0.3.35) uglifier (1.3.0) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) PLATFORMS ruby DEPENDENCIES coffee-rails (~> 3.2.1) jquery-rails json rails (~> 3.2.11) sass-rails (~> 3.2.3) sqlite3 uglifier (>= 1.0.3) passenger-4.0.37/test/stub/rails3.2/lib/000755 000765 000024 00000000000 12233035540 020253 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/log/000755 000765 000024 00000000000 12233035540 020266 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/public/000755 000765 000024 00000000000 12233035540 020763 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/Rakefile000644 000765 000024 00000000416 12233035540 021153 0ustar00honglistaff000000 000000 #!/usr/bin/env rake # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('../config/application', __FILE__) Empty::Application.load_tasks passenger-4.0.37/test/stub/rails3.2/script/000755 000765 000024 00000000000 12233035540 021011 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/test/000755 000765 000024 00000000000 12233035540 020464 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/tmp/000755 000765 000024 00000000000 12233035540 020305 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/vendor/000755 000765 000024 00000000000 12233035540 021002 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/vendor/assets/000755 000765 000024 00000000000 12233035540 022304 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/vendor/plugins/000755 000765 000024 00000000000 12233035540 022463 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/vendor/plugins/.gitkeep000644 000765 000024 00000000000 12233035540 024102 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/vendor/assets/stylesheets/000755 000765 000024 00000000000 12233035540 024660 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/vendor/assets/stylesheets/.gitkeep000644 000765 000024 00000000000 12233035540 026277 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/tmp/cache/000755 000765 000024 00000000000 12233035540 021350 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/tmp/cache/assets/000755 000765 000024 00000000000 12233035540 022652 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/test/fixtures/000755 000765 000024 00000000000 12233035540 022335 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/test/functional/000755 000765 000024 00000000000 12233035540 022626 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/test/integration/000755 000765 000024 00000000000 12233035540 023007 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/test/performance/000755 000765 000024 00000000000 12233035540 022765 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/test/test_helper.rb000644 000765 000024 00000000706 12233035540 023332 0ustar00honglistaff000000 000000 ENV["RAILS_ENV"] = "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. # # Note: You'll currently still have to declare fixtures explicitly in integration tests # -- they do not yet inherit this setting fixtures :all # Add more helper methods to be used by all tests here... end passenger-4.0.37/test/stub/rails3.2/test/unit/000755 000765 000024 00000000000 12233035540 021443 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/test/unit/.gitkeep000644 000765 000024 00000000000 12233035540 023062 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/test/performance/browsing_test.rb000644 000765 000024 00000000562 12233035540 026206 0ustar00honglistaff000000 000000 require 'test_helper' require 'rails/performance_test_help' class BrowsingTest < ActionDispatch::PerformanceTest # Refer to the documentation for all available options # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory] # :output => 'tmp/performance', :formats => [:flat] } def test_homepage get '/' end end passenger-4.0.37/test/stub/rails3.2/test/integration/.gitkeep000644 000765 000024 00000000000 12233035540 024426 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/test/functional/.gitkeep000644 000765 000024 00000000000 12233035540 024245 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/test/fixtures/.gitkeep000644 000765 000024 00000000000 12233035540 023754 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/script/rails000755 000765 000024 00000000447 12233035540 022056 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. APP_PATH = File.expand_path('../../config/application', __FILE__) require File.expand_path('../../config/boot', __FILE__) require 'rails/commands' passenger-4.0.37/test/stub/rails3.2/public/404.html000644 000765 000024 00000001330 12233035540 022155 0ustar00honglistaff000000 000000 The page you were looking for doesn't exist (404)

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

passenger-4.0.37/test/stub/rails3.2/public/422.html000644 000765 000024 00000001307 12233035540 022161 0ustar00honglistaff000000 000000 The change you wanted was rejected (422)

The change you wanted was rejected.

Maybe you tried to change something you didn't have access to.

passenger-4.0.37/test/stub/rails3.2/public/500.html000644 000765 000024 00000001203 12233035540 022151 0ustar00honglistaff000000 000000 We're sorry, but something went wrong (500)

We're sorry, but something went wrong.

passenger-4.0.37/test/stub/rails3.2/public/favicon.ico000644 000765 000024 00000000000 12233035540 023072 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/public/index.html000644 000765 000024 00000013422 12233035540 022762 0ustar00honglistaff000000 000000 Ruby on Rails: Welcome aboard

Getting started

Here’s how to get rolling:

  1. Use rails generate to create your models and controllers

    To see all available options, run it without parameters.

  2. Set up a default route and remove public/index.html

    Routes are set up in config/routes.rb.

  3. Create your database

    Run rake db:create to create your database. If you're not using SQLite (the default), edit config/database.yml with your username and password.

passenger-4.0.37/test/stub/rails3.2/public/robots.txt000644 000765 000024 00000000314 12233035540 023032 0ustar00honglistaff000000 000000 # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file # # To ban all spiders from the entire site uncomment the next two lines: # User-Agent: * # Disallow: / passenger-4.0.37/test/stub/rails3.2/log/.gitkeep000644 000765 000024 00000000000 12233035540 021705 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/lib/assets/000755 000765 000024 00000000000 12233035540 021555 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/lib/tasks/000755 000765 000024 00000000000 12233035540 021400 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/lib/tasks/.gitkeep000644 000765 000024 00000000000 12233035540 023017 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/lib/assets/.gitkeep000644 000765 000024 00000000000 12233035540 023174 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/doc/README_FOR_APP000644 000765 000024 00000000323 12233035540 022336 0ustar00honglistaff000000 000000 Use this README file to introduce your application and point to useful places in the API for learning more. Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. passenger-4.0.37/test/stub/rails3.2/db/seeds.rb000644 000765 000024 00000000543 12233035540 021524 0ustar00honglistaff000000 000000 # This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) # Mayor.create(:name => 'Emanuel', :city => cities.first) passenger-4.0.37/test/stub/rails3.2/config/application.rb000644 000765 000024 00000005372 12233035540 023611 0ustar00honglistaff000000 000000 require File.expand_path('../boot', __FILE__) require 'rails/all' if defined?(Bundler) # If you precompile assets before deploying to production, use this line Bundler.require(*Rails.groups(:assets => %w(development test))) # If you want your assets lazily compiled in production, use this line # Bundler.require(:default, :assets, Rails.env) end module Empty class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # Custom directories with classes and modules you want to be autoloadable. # config.autoload_paths += %W(#{config.root}/extras) # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named. # config.plugins = [ :exception_notification, :ssl_requirement, :all ] # Activate observers that should always be running. # config.active_record.observers = :cacher, :garbage_collector, :forum_observer # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # config.time_zone = 'Central Time (US & Canada)' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] # Enable escaping HTML in JSON. config.active_support.escape_html_entities_in_json = true # Use SQL instead of Active Record's schema dumper when creating the database. # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql # Enforce whitelist mode for mass assignment. # This will create an empty whitelist of attributes available for mass-assignment for all models # in your app. As such, your models will need to explicitly whitelist or blacklist accessible # parameters by using an attr_accessible or attr_protected declaration. config.active_record.whitelist_attributes = true # Enable the asset pipeline config.assets.enabled = true # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' end end passenger-4.0.37/test/stub/rails3.2/config/boot.rb000644 000765 000024 00000000277 12233035540 022250 0ustar00honglistaff000000 000000 require 'rubygems' # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) passenger-4.0.37/test/stub/rails3.2/config/database.yml000644 000765 000024 00000001100 12233035540 023231 0ustar00honglistaff000000 000000 # SQLite version 3.x # gem install sqlite3 # # Ensure the SQLite 3 gem is defined in your Gemfile # gem 'sqlite3' development: adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: sqlite3 database: db/production.sqlite3 pool: 5 timeout: 5000 passenger-4.0.37/test/stub/rails3.2/config/environment.rb000644 000765 000024 00000000225 12233035540 023642 0ustar00honglistaff000000 000000 # Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Empty::Application.initialize! passenger-4.0.37/test/stub/rails3.2/config/environments/000755 000765 000024 00000000000 12233035540 023501 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/config/initializers/000755 000765 000024 00000000000 12233035540 023460 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/config/locales/000755 000765 000024 00000000000 12233035540 022374 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/config/routes.rb000644 000765 000024 00000003372 12233035540 022625 0ustar00honglistaff000000 000000 Empty::Application.routes.draw do # The priority is based upon order of creation: # first created -> highest priority. # Sample of regular route: # match 'products/:id' => 'catalog#view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase # This route can be invoked with purchase_url(:id => product.id) # Sample resource route (maps HTTP verbs to controller actions automatically): # resources :products # Sample resource route with options: # resources :products do # member do # get 'short' # post 'toggle' # end # # collection do # get 'sold' # end # end # Sample resource route with sub-resources: # resources :products do # resources :comments, :sales # resource :seller # end # Sample resource route with more complex sub-resources # resources :products do # resources :comments # resources :sales do # get 'recent', :on => :collection # end # end # Sample resource route within a namespace: # namespace :admin do # # Directs /admin/products/* to Admin::ProductsController # # (app/controllers/admin/products_controller.rb) # resources :products # end # You can have the root of your site routed with "root" # just remember to delete public/index.html. # root :to => 'welcome#index' # See how all your routes lay out with "rake routes" # This is a legacy wild controller route that's not recommended for RESTful applications. # Note: This route will make all actions in every controller accessible via GET requests. match ':controller(/:action(/:id))(.:format)' end passenger-4.0.37/test/stub/rails3.2/config/locales/en.yml000644 000765 000024 00000000326 12233035540 023522 0ustar00honglistaff000000 000000 # Sample localization file for English. Add more files in this directory for other locales. # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. en: hello: "Hello world" passenger-4.0.37/test/stub/rails3.2/config/initializers/backtrace_silencers.rb000644 000765 000024 00000000624 12233035540 027775 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. # Rails.backtrace_cleaner.remove_silencers! passenger-4.0.37/test/stub/rails3.2/config/initializers/inflections.rb000644 000765 000024 00000001025 12233035540 026320 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format # (all these examples are active by default): # ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end # # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections do |inflect| # inflect.acronym 'RESTful' # end passenger-4.0.37/test/stub/rails3.2/config/initializers/mime_types.rb000644 000765 000024 00000000315 12233035540 026157 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone passenger-4.0.37/test/stub/rails3.2/config/initializers/passenger.rb000644 000765 000024 00000000333 12233035540 025773 0ustar00honglistaff000000 000000 event_preprocessor = lambda { |e| e.payload[:sql].gsub!("secret","PASSWORD") if e.payload[:sql] } PhusionPassenger.install_framework_extensions!(:event_preprocessor => event_preprocessor ) if defined?(PhusionPassenger) passenger-4.0.37/test/stub/rails3.2/config/initializers/secret_token.rb000644 000765 000024 00000000760 12233035540 026475 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. Empty::Application.config.secret_token = 'c1bf73ce471c1810edbe8992aa5aceee3c5537db37c582a87db360b62c1378d4ce56858530fda4e00f3cfb8e73e906cf1c0627fa8178984bdb9529cd1ff0dbc3' passenger-4.0.37/test/stub/rails3.2/config/initializers/session_store.rb000644 000765 000024 00000000632 12233035540 026705 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. Empty::Application.config.session_store :cookie_store, :key => '_empty_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "rails generate session_migration") # Empty::Application.config.session_store :active_record_store passenger-4.0.37/test/stub/rails3.2/config/initializers/wrap_parameters.rb000644 000765 000024 00000000724 12233035540 027204 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters :format => [:json] end # Disable root element in JSON by default. ActiveSupport.on_load(:active_record) do self.include_root_in_json = false end passenger-4.0.37/test/stub/rails3.2/config/environments/development.rb000644 000765 000024 00000002534 12233035540 026354 0ustar00honglistaff000000 000000 Empty::Application.configure do # Settings specified here will take precedence over those in config/application.rb # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Log error messages when you accidentally call methods on nil. config.whiny_nils = true # Show full error reports and disable caching config.consider_all_requests_local = true config.action_controller.perform_caching = false # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false # Print deprecation notices to the Rails logger config.active_support.deprecation = :log # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin # Raise exception on mass assignment protection for Active Record models config.active_record.mass_assignment_sanitizer = :strict # Log the query plan for queries taking more than this (works # with SQLite, MySQL, and PostgreSQL) config.active_record.auto_explain_threshold_in_seconds = 0.5 # Do not compress assets config.assets.compress = false # Expands the lines which load the assets config.assets.debug = true end passenger-4.0.37/test/stub/rails3.2/config/environments/production.rb000644 000765 000024 00000004653 12233035540 026224 0ustar00honglistaff000000 000000 Empty::Application.configure do # Settings specified here will take precedence over those in config/application.rb # Code is not reloaded between requests config.cache_classes = true # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false config.action_controller.perform_caching = true # Disable Rails's static asset server (Apache or nginx will already do this) config.serve_static_assets = false # Compress JavaScripts and CSS config.assets.compress = true # Don't fallback to assets pipeline if a precompiled asset is missed config.assets.compile = false # Generate digests for assets URLs config.assets.digest = true # Defaults to nil and saved in location specified by config.assets.prefix # config.assets.manifest = YOUR_PATH # Specifies the header that your server uses for sending files # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true # See everything in the log (default is :info) config.log_level = :debug # Prepend all log lines with the following tags # config.log_tags = [ :subdomain, :uuid ] # Use a different logger for distributed setups # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # Use a different cache store in production # config.cache_store = :mem_cache_store # Enable serving of images, stylesheets, and JavaScripts from an asset server # config.action_controller.asset_host = "http://assets.example.com" # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) # config.assets.precompile += %w( search.js ) # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false # Enable threaded mode config.threadsafe! # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation can not be found) config.i18n.fallbacks = true # Send deprecation notices to registered listeners config.active_support.deprecation = :notify # Log the query plan for queries taking more than this (works # with SQLite, MySQL, and PostgreSQL) # config.active_record.auto_explain_threshold_in_seconds = 0.5 end passenger-4.0.37/test/stub/rails3.2/config/environments/test.rb000644 000765 000024 00000002765 12233035540 025017 0ustar00honglistaff000000 000000 Empty::Application.configure do # Settings specified here will take precedence over those in config/application.rb # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! config.cache_classes = true # Configure static asset server for tests with Cache-Control for performance config.serve_static_assets = true config.static_cache_control = "public, max-age=3600" # Log error messages when you accidentally call methods on nil config.whiny_nils = true # Show full error reports and disable caching config.consider_all_requests_local = true config.action_controller.perform_caching = false # Raise exceptions instead of rendering exception templates config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment config.action_controller.allow_forgery_protection = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test # Raise exception on mass assignment protection for Active Record models config.active_record.mass_assignment_sanitizer = :strict # Print deprecation notices to the stderr config.active_support.deprecation = :stderr end passenger-4.0.37/test/stub/rails3.2/app/assets/000755 000765 000024 00000000000 12233035540 021567 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/app/controllers/000755 000765 000024 00000000000 12233035540 022633 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/app/helpers/000755 000765 000024 00000000000 12233035540 021727 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/app/mailers/000755 000765 000024 00000000000 12233035540 021721 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/app/models/000755 000765 000024 00000000000 12233035540 021550 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/app/views/000755 000765 000024 00000000000 12233035540 021422 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/app/views/layouts/000755 000765 000024 00000000000 12233035540 023122 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/app/views/layouts/application.html.erb000644 000765 000024 00000000350 12233035540 027060 0ustar00honglistaff000000 000000 Empty <%= stylesheet_link_tag "application", :media => "all" %> <%= javascript_include_tag "application" %> <%= csrf_meta_tags %> <%= yield %> passenger-4.0.37/test/stub/rails3.2/app/models/.gitkeep000644 000765 000024 00000000000 12233035540 023167 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/app/mailers/.gitkeep000644 000765 000024 00000000000 12233035540 023340 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/app/helpers/application_helper.rb000644 000765 000024 00000000035 12233035540 026114 0ustar00honglistaff000000 000000 module ApplicationHelper end passenger-4.0.37/test/stub/rails3.2/app/controllers/application_controller.rb000644 000765 000024 00000000120 12233035540 027717 0ustar00honglistaff000000 000000 class ApplicationController < ActionController::Base protect_from_forgery end passenger-4.0.37/test/stub/rails3.2/app/assets/images/000755 000765 000024 00000000000 12233035540 023034 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/app/assets/stylesheets/000755 000765 000024 00000000000 12233035540 024143 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.2/app/assets/stylesheets/application.css000644 000765 000024 00000001042 12233035540 027155 0ustar00honglistaff000000 000000 /* * This is a manifest file that'll be compiled into application.css, which will include all the files * listed below. * * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. * * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. * *= require_self *= require_tree . */ passenger-4.0.37/test/stub/rails3.2/app/assets/images/rails.png000644 000765 000024 00000014766 12233035540 024672 0ustar00honglistaff000000 000000 ‰PNG  IHDR2@XŐ${tEXtSoftwareAdobe ImageReadyqÉe<˜IDATxÚŹ[ ”\e•țȚRŻÖźź^Ș;IwgßĂ‚aŚÈ@`ÄńÈÉÇíèšgÆăœGgDgtÜqDFqFń ąDÄqFÈ’@ÒéNșÓûRU]Ë«śȚ|śÿ_-Q˜ÇyéȘś^ęïȚÿȚïȚïȚÿÇž.ʋđ0‚WÀ_6€Íkšùbđf̻ܞù‡Ł6À«<4 Æw5ÿæ~*rŽÛá—?Àż9–ńîöˆmŽŰ&"ŠŰăMßśù7@vm'Ú· {Œ_żS)VûŹÿi\“ĂWôG?šËžŐ«jM‹dÜ@ lDLXéžșW-TàÍUá+@ȚEPào\&*RŽčą§áûnn‰˜č,á fšđDÀWrX|žÊ3žMŁ=Û§\‚ĘƒŠ«śEçłJˆșB–[dö”6Aššș'Ÿ=‘tŹx^©„ÊÔ$Çòa86̈„źò{, ϱP”©ŒepNűž*_ìW©ˆ_3ąoóŸ·;†ńȚ„ń(•0àòEŸ:ĄŹàńƒÏÙiïËÒ6ȘeÎÌXnĄŒhGf"ƒÂúL|S+(+.gĐ€Ÿ–­g=šY‡c—Êh=m#V_û·ʊ#ÿû}èń‚ÇȘòĘÎ|±ŒÀâtR ńŸȚD8VÙՄ‰M~xg!ni%DyŸ(Ą”Ą‰î âé…ő•ÛB,{(äàNÎÁŽăpÒˆ$3°ăi۱$ìh›.@ße[a'ăœeșJԂłyšŒĆì‹Ï 4>ŒH*ƒöMçÂéHQ(Jgt-ƒÖą»QI ^·‚đž©dĐ„@áçsÓÔÒ-Ą'-Ž 51€{ł'Ò0ő ŐÙ|În4ۉh{Vœ@Ü©çâw"»éBŸËTŠ =rŸzqP­pBè‘Hăȃ?ąĆˆƒâ ]-ĂqópgsPiŠSÓȘź…ög`jŚnžù)˜‰šÊőжm ćŸĄB2L†.„ûx!žjŠÔúJĄÀśP! Kˆ/\€ ÊźRBŽŽ[0”ç9Trӈu. Țąuć©Höź$Ž …Á™DDQÒ+ä:ˆÜÁĘ˜Ù» 3/ŸŒçnÁò«Țÿú%äöőSjŽm‰2Đć!&D/ü[„EÚHw·Wț ‘ßA-RR!ê•æP eŠu„•HÁimÇè“"”tÚ6lFČgčČĐ«-ËO.žć™1Œ?śƞúÒksX~őVìúêtmZJđR1êŠÔ1èéŠNśÌôuÁ&Đ<Ïő âœ©,T™šbÈ,`đçwąóÌ °đWP„x-GŽ5‹ž Żä—ăèĂ`ű±•ŐŽ/5pbêđÔÁ­ŹAà©ötšÄIVJç_«]§›0/ŽČ‰Ÿœ‰DiòH=ż–ĂŽ#è»ű*œö77 ç-3‚Ńń țVuQŰ0ê.…šÍpÛʔŽÓ%ĐyÀw Ú ÂhљWđâč0ă),șô2$—ôbúà6&ČŒÄI/@báj$ČËöűIź–‹(Žfx'𠿐J…nËÉO”"±`©ÂŰŸű<-Œ/ßúŸLŽźŃź%^ÏÈ«œÍ¶ȚnÄ2œȘwҗùć2}}Xüö­úŐœÈŒL€'QžŁÙ-,żümˆ/ꀋÂ4#0“­ŽŠ‹òôQ”&0›È0€ŻàčNK—rŻ<‡éęÏböđ^ąkN#_wzU7hg'C{ -œk=ç"Źyś‡Q"śȚ~šjëŒhúï[#V\\Í€“tŻêÓźÌ'K„3ÌJQ…Î5čžŸ{ÚOۄ±~ŒęțEä Xöź+ŃuÖTÂ3ˆ/Ád}j€Ź"ÉQ„.M 8öÜâæŽ #wh/ïیfg0çTàp’ü9-cÉïƒC«ìûȚ8öŰŁÊ‹&Ÿ{łƒĂʕK6Âä'fńi•Ìâ.D˜ O°FšX•„ś’+°àŒKPš"…0ĐuțE8pÇŻ±ê=WĄśÒ‹àćs€Nt7_¶©Ât˜ê»q;* eȘŰőíÛ0üÈdÖ.Æêk¶ąóŒ éŠÓšLŽšI°ąqĆ*ÿô{t· Z%‚čá~ìț捐cÆ%šČHÊ6â>sA,›AŚČ…ÚŚæ)ĄŁƒaIäEčC(ÒERK{8‚çÿé«ÈŹ[Ž”y?iI5$ʆ%ê·fű{}ŠuŹšƒ—îú úïȚF äûÇ1¶ăÌ~ă;v1l'‰Š˜@ćç€F…æĄŒ 'IF'mń!K€7ă…Đ"Œ&­]ÒÍw 1ó5š#4V§iò‘ĆŸnÇÔö[Ô—ávă Ç8̝…Ű)>Cá=LŽBވ“Àào~‹éœ/űž3%ș wŽ‚·ÿFę4֓ÁÊż8™Ț>bWX@‡bÆÉb@ŒÙIzP9ĐI±vÁFfQÉL‹Ê!2cŁEP(se4~Š5RhƒAŽ90‚‘_?‡ æcóMŸEą§teVč”OaOr ĘÓśBŠȘ]ËpȱÆŰ“»±ń“"EyïxˆÏ:ü­ NJ)‹–ŽÌblŚ‹hYâÀu…ÖÄTŽ™dâÔ«æÈíwš=Űą„M€gw“VPè™OFΒâ2¶æ5-TD—[ŠćZ2Ă>–]ęV,xӛIOŠČÆ…)œJ”ńÍș[)?cn28pÿ#(çmkÇÒ+.ÂèŁ/ phœÊźŚQ6?łwć7‘îÇHăIoÄSj)“ĆÉ1<±€ÙÈ#íŹ-œŁšNæ9ûO1ͰŰŃéȚkÂIäòKŽŹéÁÊśż—r:ŒÇ(Ɨ‹;rș“R&<9€Ș3Švż@Áw(w:ű“Đ~æ:TŠóÊFSȚ’"Šö ŁçŒŐŠ’TádźÌŹT‚ă9ˆæęPIb“3•…˜JŰzæóT’QŚ„„BŐP23ŽÆ”ïąéW’­Î*|@^€ŹĄ)QłŒüwćĂ?IŹéžq ȚûŽ=ü,Œ™Š<@Đ B8)“;ŽąûŹ50ùŒéHˆ-=ęTÁ í”SAș@Œ”Œ@č„f‚5Țšr”é[ƒÊT%#c|…őĂZ&Äw(B)tDč•Q%Êvű™yCțš‘(â,Ɵ|ï‰ÁƒŠÊ°¶ÆÉi‰‰čä&ć—<#u:ÍëȘ3E­HkÍzŐĐŽ)nd¶ŰF>1Vä2ÀČkźFŒœGYL KáMQÀlR&TBțÚ,igvżˆòè8]Cœ8S±f#ą4æQĄŠÚŹŐ'ž?Ìçą,ÈÊ= „ËaVŐ9WEXłöłYr§rà‡Ș*Ô!âcÍőÄÆŻ~­Ś)Đú,=Ûűyџ]Șj–lGeíšEÌș5Žr_2ńԎ}dŚ"œa‰Ș]Œ0ßM9·ŠPˆZ¶…ÙĘG17ž‡ÍÌnE"ÊRąˆÇrÛó\ńY‡Q‰)!|5U(dŹ·=—^‰Ć—żoŒăÇ8őłŚ+ĐöŒő2ÀNU“6jB[ĄàëˆB5ĆèV.]šĆČ­Wăô/^Ż”‘䩏Đôßń ފ;Y"Vúi‘$±’€2¶ŠœŐÙČș_§ń”c‚‰Æ«(F^Eçùg“qö©{–C°ńŒśPč‹/ #K8ă–ĘôY+QÈ ĘMđ1>ÜžAÌìߏźÍçąëÂÍ,gĘyźtČȚ•n,˜˜zŸŸĆE$‘VÀśŠ.ńÉävßÌæÌâ.†ŽPyLaèpóâÈÏîGç9TnŃÒ:uiàÀšçRZ! z‹I0?ЏÒá1<ÿ‰/`àû˜7ÈÓ$)XÆqűhŰŠvštŻčÓ,}‡˜ÓäjITòeuÓ°Ìùąr0šëłh§%” ‰ŁÿęKŒüîQ’ ˜3VŁ0<ˆ%WżëÄ&ą„V‚< ÎÄ5%ÔJ2”Sű™IE ĂJÒÊX;>u#­$Ź6ȘɱŻóGM™ÀhŰF…d˜td|Û~dÏ\O9Ijç**záDۍb)PBÌÒœŠh•…-qű qîl‘%ë/€{ïGzÍ*d7ŸóŠ=QS]:‡ˆRș©QbÂUàMPᒯ‚†ò$%œæš du] őˆXefïQzÈ$Ÿ«(Ÿ„'И‘Z‹HŠ«#äÇAÜRÂXŹíDB Ű~öÈÿ`‹Ś0.F|XŒXKì)æêé™wŹFoÊlzyÈhÔߚ»ŐÜKzłŒ>±“‚.&n EjÍ„™U,2'•ƒś &iwöŹóțè[’d­À[ ™ÓV)ö*ŠQ§a†vŠ†›úl …êQÌDitž[VŠIžQ‰ÚhRÄ@œ$)Éy~mÆ|ÒűäŠ>șÖú?­cJ+VČH'6țË?ă 7 iÖ.ûX‹H8ÌFȚš)d†AYűUÂBjE»"—Š.ń4w-?lÍÚÔ2ĂYœ™.Á•úÎRj€WŹDą«ś”ö@BÜŰŹ.߆sță[H-gA—S™Fš3ÿÚFęj™ĆÒ]úŰąœŽ„ÊèBP떬…_—>M%bt —©?_rŐŹ -h]·ö”·rœ_ĆŸ[nÂȶ‡˜›Q‘Șăą+GÔ­_û\Ê ±țžZÙŠfÜeŃÖĐÏótŒ(|șU(‡Ü'.g źVFĂENÇë9’œœüé}Ll»4ÎTĆ&nto¹Ӓ œX ÉFß éˆ"ș€…_‰ŐfYzÇF˜~y& Gu]$›§æO[Èöv#ž]đș‰.è@$VA`â±§T°ąŃ°őZ[2šș–”uĘ+ˆ/mUÁCò‡_ Tœn‡y€Ń  —|l\ «ł čțÌMÌ"G[Œž±ŽìëR$”d™Š|:—Ä›ș“FœIi„reÚ"Ù”łát· Êä“ú,Œ+ی­1ÜìZ1Ú1ÉÈÒuŃ‘dt*çKš2é ÜsŒd; [êő)Čx„ȀW.Ąčz2jćTh#DźVŒß\NO &eó…_±v’U2ŸŚĘBè^”š%ă¶0FÛÓHöôČ(/ԘI§2>‰’•Àë=œLńĆ]șŃdv UUëpk"ìijBœź$’,O-0y<}~źĂ*TșöŁ5LÄùErE4ĘBßłXŠÆX‚NŁ:<†9šČŒ>Eìd -ËV*‹űžź«»êu„B…LÍĘÒs»”N*Š*­á…JxćȘRÈÍUÁôÄ蟖,ôÈìTÊ(ìÛ ƒ•ÈûËGuÔ ÿŸ@śâĆŻYƒ{ëÚu|ùCïJFŻ(OL°bœÔ±–Ńín‚ŐŽiKhp‹đÒŚ·’F»tx8ł#”žȘ9Fs±FŸÚ‹èłûœźDT‘šA”n1vđeFŻ^M ^kfĐÈ.ƏʠVšÊ“ǰę3ŸÄűăÏÀJÆËaăY@n&»Șj”‚Llű:Š€MôʉcӚđê…Æà—<ÿNđÁ#Ć ŽNä062KkYˆ”€QÆ,yÎë9Ú6lBțp?r‡(ÚëX„eW_.KuJR'‚-Ž^xą"^ž‘j’n5RE0&Š`iÎP\Ź”4^ș'j-!ő杒*Žš`4†Łü]Ô-"ńâ>ŽvuŚËË?9—Žw!–íÂÎ/~­ëŚ#ÚÚÉh…“í ›MȘÄÛÈò”ƒ ڛ °óźÌŽnMA}m W,)(ìĂź….”ŠN ŹyÛ%$æÇàł*ËóȚț={P9Šîő§ącé D“zHî>ÿBlÿäu˜ȚŸK78˜x-Ö>V,ąó‰'”JU»Ś \LŻč]Èl„é>W*ȘrĄžÙ-h«XóȘf~oI† “Z3f玱î>v‰öNŽ3 uŻZ‡Tgg}śŐŽö363:.g /-ÒHž+"P‰ÎÏKۉSZô4Ž„òZŐ_ŚòŠGlXMŸc7¶é"§Ê;Òż ‹ŁòĐ(ŽĘś5f‚MÄđUCݶOF6Ü ±ÎßCNfłtč>$S1V†aéêëR·&œ4)æŽ ĄÊÈâÍéٗ†a y]‘ä%íW ·AÍ*|g©XĐ{Q€Ÿc>iTX1‚F‡‰ ź M`|à!Ó[$‚±ŠPŠ4šȘʊąĐ$涟#,d«ÉŒƒ(?KTŹJR„ÛžSŒû%C7ôjûHšÖb攃j+ÊáN$©,ł[.@Ëč›ĐсŸÿț_ ÈÏà?™.3ëÖúÄ”ÂH"U$âĐZ¶^Ș ńX0É2!KÚc© Čù„8Ćqè.N«Ź‰ˆMI6–N&3”Šśn8Ž€eë€ëöÁx„oéÈWŠfP˜™ÄČËȚB<pđ—żR·ÿ±EAìź€dŃšo$*ÎäÈmł)e9„D© «5‚X[…·T$©LΠ:]†C$n#m›±C±ëÖ[P~ˆYŰtè*dÏ?§\śqŽź^WÇÁôęŰùő›XsìÄ!ÓEæü-űű­·2#—°ûË_ÆàmwŁćŒő8û;·2!váàwà…ü:™DČŸ”á›UônœËßó$)GàiG–nÎ3_ÿÆoțŒń EŐZE3Űkœ-™™–îEHv.œOĂ»zĐEŠòű>€™ç"֛ÁŠÏ}í§lžś\Œł‰/-À·nĆ۱QôÄăHŠÛÔœaâb*â#KŚ‹¶eIÊÆłd#Gš et\ž§æóêț ,:•‚MëÛŽĂœÇICł}òm úÙœƒO?¶e«°bË%€űːٰSÛöČtíB|Aznôéßazÿ*”ÏFlQ/ŹKà ƒűużuę*1’wËDÖvÖżE„ŚÛÖŻSJTKžę;(Œ4 k–ÆŁ;v2P9ș—`Ìk‰Œ©ê»{ïż?~ß_ă‰[ŸÙhŹÊąŽ^9ŚŃ„ÇĄ;„m|îđĘ]oÒ9<#Òjz…\“èwÄDœ,8éVĐ]ä]©%K9e­êr懇0ńônș¶©Û^FcIÂ>é`ĄU–ŸùbŒí+ČkօO1|NO©šæ]‘t+,Ȑl©_łËź6« ĒDœŒb§rzß^•pe7^ßćïšß[ńȚaûŸĂŸoÜÎçąș jNˆÆ+xŚÒs·šáNÓCśß…ÉÇwĐÌÎŒç7|üzŹțà‡a2ő,•€ô omî”rb©ÆZˆ‰~ž„›,pN>¶;?śY,ĘzÚïșĄ[u◿ăjüîÌŸȘq 4aÄęôúqîæ±Ú¶Nu6Zى»iŽd‡śêàîè@âÜőh!•ćçâÁ!”F9òđ#˜Üț,#UŒŰr±áșOaŃ—0=DĂ„„ ,,›,bĄ±E·#ÏÿôÇÈźXƒŸ3ÎÂȘ‹ÿśȚê¶=ÌaÖ<Ó =ÿ&_~ Ù”ëŃœacj˜Áń«’†ÂLsÎXuéXŸćB è(wzòŁEÀ»ék_QIف*4'ŃŁ«SÙlŁ–Êç{’.,ŹpÛ”ÒĐ2ëĄ`jpÜđšÌć^ۇ‹núZÎXĄöPÉò—Ćș^Ž]wȚ‰Ÿ]ûaìÿĆÏĂQ-”àoIÆ5íș’O“3a–]š _Źwb Ć­LŹ]êș$ÁÖ§"œ|sÔ©ÈŹ= ĘVˆŃïȚLIUȘbYY‘æź­ÍąIą$˜Òtżœùf$2í|r;ÿ~'îúèG°òôˆSűXk©á‡ŠđÔ­ßF4Áôž—‘b‘4úì xúßo[,ą04Fž•ÀìĄ~<}Û­ȘßĂRš%mybšŚŸĆ\mlO—‚Ž.4}t”E\€œ7}M)ŻêtՉô1țì3˜x”îFś [Ÿ-»2Æ6ăștï䱄Ę&üšèEŃ"9Œ€;Âٜ±rq âe)ÍßK!Ç:bŠæwYĄ }„g;JŚš”Ő)5D$!KÉ€9źÊß«-Kń˜Ú$ë$ąì »óè±h–l™…ȚDÚŰÖUFF ȘĄJ{s2źR‰Ë6rCśŐ&đŒ&æ0;ûá@>›ç]›/€Z’3±E,k;( 2^‹źć0ÚÔ9<”jCE“őíSő{Đ}à錍6NFŽâ)ü6/”Ș}.‚KZâ%Ùđ|ŸŚïSĐđš6W6ïëmR=ŽÒ* íđż'MO‡R…Û8P«Áë«5~ÓçFŁĄț]w„0êXhq©H°…u89cŽÄ€« űđúÇjQkȘżP±Pß üʇ,Éáű?'ț?ŽàäËŐRƒI!ÿ4#ßmŒśłÚŁÿ'ÀŸ˜œ-볞IENDźB`‚passenger-4.0.37/test/stub/rails3.1/.gitignore000644 000765 000024 00000000656 12233035540 021503 0ustar00honglistaff000000 000000 # See http://help.github.com/ignore-files/ for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile ~/.gitignore_global # Ignore bundler config /.bundle # Ignore the default SQLite database. /db/*.sqlite3 # Ignore all logfiles and tempfiles. /log/*.log /tmp passenger-4.0.37/test/stub/rails3.1/app/000755 000765 000024 00000000000 12233035540 020264 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/config/000755 000765 000024 00000000000 12233035540 020751 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/config.ru000644 000765 000024 00000000233 12233035540 021317 0ustar00honglistaff000000 000000 # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run Empty::Application passenger-4.0.37/test/stub/rails3.1/db/000755 000765 000024 00000000000 12233035540 020071 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/doc/000755 000765 000024 00000000000 12233035540 020251 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/Gemfile000644 000765 000024 00000001307 12233035540 021000 0ustar00honglistaff000000 000000 source 'https://rubygems.org' gem 'rails', '~> 3.1.10' # Bundle edge Rails instead: # gem 'rails', :git => 'git://github.com/rails/rails.git' gem 'sqlite3' gem 'json' # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails', '~> 3.1.5' gem 'coffee-rails', '~> 3.1.1' # See https://github.com/sstephenson/execjs#readme for more supported runtimes # gem 'therubyracer' gem 'uglifier', '>= 1.0.3' end gem 'jquery-rails' # To use ActiveModel has_secure_password # gem 'bcrypt-ruby', '~> 3.0.0' # Use unicorn as the web server # gem 'unicorn' # Deploy with Capistrano # gem 'capistrano' # To use debugger # gem 'ruby-debug' passenger-4.0.37/test/stub/rails3.1/Gemfile.lock000644 000765 000024 00000005035 12233035540 021731 0ustar00honglistaff000000 000000 GEM remote: https://rubygems.org/ specs: actionmailer (3.1.10) actionpack (= 3.1.10) mail (~> 2.3.3) actionpack (3.1.10) activemodel (= 3.1.10) activesupport (= 3.1.10) builder (~> 3.0.0) erubis (~> 2.7.0) i18n (~> 0.6) rack (~> 1.3.6) rack-cache (~> 1.2) rack-mount (~> 0.8.2) rack-test (~> 0.6.1) sprockets (~> 2.0.4) activemodel (3.1.10) activesupport (= 3.1.10) builder (~> 3.0.0) i18n (~> 0.6) activerecord (3.1.10) activemodel (= 3.1.10) activesupport (= 3.1.10) arel (~> 2.2.3) tzinfo (~> 0.3.29) activeresource (3.1.10) activemodel (= 3.1.10) activesupport (= 3.1.10) activesupport (3.1.10) multi_json (>= 1.0, < 1.3) arel (2.2.3) builder (3.0.4) coffee-rails (3.1.1) coffee-script (>= 2.2.0) railties (~> 3.1.0) coffee-script (2.2.0) coffee-script-source execjs coffee-script-source (1.4.0) erubis (2.7.0) execjs (1.4.0) multi_json (~> 1.0) hike (1.2.1) i18n (0.6.1) jquery-rails (2.1.4) railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) json (1.7.6) mail (2.3.3) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.20.1) multi_json (1.2.0) polyglot (0.3.3) rack (1.3.9) rack-cache (1.2) rack (>= 0.4) rack-mount (0.8.3) rack (>= 1.0.0) rack-ssl (1.3.3) rack rack-test (0.6.2) rack (>= 1.0) rails (3.1.10) actionmailer (= 3.1.10) actionpack (= 3.1.10) activerecord (= 3.1.10) activeresource (= 3.1.10) activesupport (= 3.1.10) bundler (~> 1.0) railties (= 3.1.10) railties (3.1.10) actionpack (= 3.1.10) activesupport (= 3.1.10) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (~> 0.14.6) rake (10.0.3) rdoc (3.12) json (~> 1.4) sass (3.2.5) sass-rails (3.1.6) actionpack (~> 3.1.0) railties (~> 3.1.0) sass (>= 3.1.10) tilt (~> 1.3.2) sprockets (2.0.4) hike (~> 1.2) rack (~> 1.0) tilt (~> 1.1, != 1.3.0) sqlite3 (1.3.7) thor (0.14.6) tilt (1.3.3) treetop (1.4.12) polyglot polyglot (>= 0.3.1) tzinfo (0.3.35) uglifier (1.3.0) execjs (>= 0.3.0) multi_json (~> 1.0, >= 1.0.2) PLATFORMS ruby DEPENDENCIES coffee-rails (~> 3.1.1) jquery-rails json rails (~> 3.1.10) sass-rails (~> 3.1.5) sqlite3 uglifier (>= 1.0.3) passenger-4.0.37/test/stub/rails3.1/lib/000755 000765 000024 00000000000 12233035540 020252 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/log/000755 000765 000024 00000000000 12233035540 020265 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/public/000755 000765 000024 00000000000 12233035540 020762 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/Rakefile000644 000765 000024 00000000416 12233035540 021152 0ustar00honglistaff000000 000000 #!/usr/bin/env rake # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('../config/application', __FILE__) Empty::Application.load_tasks passenger-4.0.37/test/stub/rails3.1/README000644 000765 000024 00000021770 12233035540 020373 0ustar00honglistaff000000 000000 == Welcome to Rails Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Control pattern. This pattern splits the view (also called the presentation) into "dumb" templates that are primarily responsible for inserting pre-built data in between HTML tags. The model contains the "smart" domain objects (such as Account, Product, Person, Post) that holds all the business logic and knows how to persist themselves to a database. The controller handles the incoming requests (such as Save New Account, Update Product, Show Post) by manipulating the model and directing data to the view. In Rails, the model is handled by what's called an object-relational mapping layer entitled Active Record. This layer allows you to present the data from database rows as objects and embellish these data objects with business logic methods. You can read more about Active Record in link:files/vendor/rails/activerecord/README.html. The controller and view are handled by the Action Pack, which handles both layers by its two parts: Action View and Action Controller. These two layers are bundled in a single package due to their heavy interdependence. This is unlike the relationship between the Active Record and Action Pack that is much more separate. Each of these packages can be used independently outside of Rails. You can read more about Action Pack in link:files/vendor/rails/actionpack/README.html. == Getting Started 1. At the command prompt, create a new Rails application: rails new myapp (where myapp is the application name) 2. Change directory to myapp and start the web server: cd myapp; rails server (run with --help for options) 3. Go to http://localhost:3000/ and you'll see: "Welcome aboard: You're riding Ruby on Rails!" 4. Follow the guidelines to start developing your application. You can find the following resources handy: * The Getting Started Guide: http://guides.rubyonrails.org/getting_started.html * Ruby on Rails Tutorial Book: http://www.railstutorial.org/ == Debugging Rails Sometimes your application goes wrong. Fortunately there are a lot of tools that will help you debug it and get it back on the rails. First area to check is the application log files. Have "tail -f" commands running on the server.log and development.log. Rails will automatically display debugging and runtime information to these files. Debugging info will also be shown in the browser on requests from 127.0.0.1. You can also log your own messages directly into the log file from your code using the Ruby logger class from inside your controllers. Example: class WeblogController < ActionController::Base def destroy @weblog = Weblog.find(params[:id]) @weblog.destroy logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!") end end The result will be a message in your log file along the lines of: Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1! More information on how to use the logger is at http://www.ruby-doc.org/core/ Also, Ruby documentation can be found at http://www.ruby-lang.org/. There are several books available online as well: * Programming Ruby: http://www.ruby-doc.org/docs/ProgrammingRuby/ (Pickaxe) * Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide) These two books will bring you up to speed on the Ruby language and also on programming in general. == Debugger Debugger support is available through the debugger command when you start your Mongrel or WEBrick server with --debugger. This means that you can break out of execution at any point in the code, investigate and change the model, and then, resume execution! You need to install ruby-debug to run the server in debugging mode. With gems, use sudo gem install ruby-debug. Example: class WeblogController < ActionController::Base def index @posts = Post.all debugger end end So the controller will accept the action, run the first line, then present you with a IRB prompt in the server window. Here you can do things like: >> @posts.inspect => "[#nil, "body"=>nil, "id"=>"1"}>, #"Rails", "body"=>"Only ten..", "id"=>"2"}>]" >> @posts.first.title = "hello from a debugger" => "hello from a debugger" ...and even better, you can examine how your runtime objects actually work: >> f = @posts.first => #nil, "body"=>nil, "id"=>"1"}> >> f. Display all 152 possibilities? (y or n) Finally, when you're ready to resume execution, you can enter "cont". == Console The console is a Ruby shell, which allows you to interact with your application's domain model. Here you'll have all parts of the application configured, just like it is when the application is running. You can inspect domain models, change values, and save to the database. Starting the script without arguments will launch it in the development environment. To start the console, run rails console from the application directory. Options: * Passing the -s, --sandbox argument will rollback any modifications made to the database. * Passing an environment name as an argument will load the corresponding environment. Example: rails console production. To reload your controllers and models after launching the console run reload! More information about irb can be found at: link:http://www.rubycentral.org/pickaxe/irb.html == dbconsole You can go to the command line of your database directly through rails dbconsole. You would be connected to the database with the credentials defined in database.yml. Starting the script without arguments will connect you to the development database. Passing an argument will connect you to a different database, like rails dbconsole production. Currently works for MySQL, PostgreSQL and SQLite 3. == Description of Contents The default directory structure of a generated Ruby on Rails application: |-- app | |-- assets | |-- images | |-- javascripts | `-- stylesheets | |-- controllers | |-- helpers | |-- mailers | |-- models | `-- views | `-- layouts |-- config | |-- environments | |-- initializers | `-- locales |-- db |-- doc |-- lib | `-- tasks |-- log |-- public |-- script |-- test | |-- fixtures | |-- functional | |-- integration | |-- performance | `-- unit |-- tmp | |-- cache | |-- pids | |-- sessions | `-- sockets `-- vendor |-- assets `-- stylesheets `-- plugins app Holds all the code that's specific to this particular application. app/assets Contains subdirectories for images, stylesheets, and JavaScript files. app/controllers Holds controllers that should be named like weblogs_controller.rb for automated URL mapping. All controllers should descend from ApplicationController which itself descends from ActionController::Base. app/models Holds models that should be named like post.rb. Models descend from ActiveRecord::Base by default. app/views Holds the template files for the view that should be named like weblogs/index.html.erb for the WeblogsController#index action. All views use eRuby syntax by default. app/views/layouts Holds the template files for layouts to be used with views. This models the common header/footer method of wrapping views. In your views, define a layout using the layout :default and create a file named default.html.erb. Inside default.html.erb, call <% yield %> to render the view using this layout. app/helpers Holds view helpers that should be named like weblogs_helper.rb. These are generated for you automatically when using generators for controllers. Helpers can be used to wrap functionality for your views into methods. config Configuration files for the Rails environment, the routing map, the database, and other dependencies. db Contains the database schema in schema.rb. db/migrate contains all the sequence of Migrations for your schema. doc This directory is where your application documentation will be stored when generated using rake doc:app lib Application specific libraries. Basically, any kind of custom code that doesn't belong under controllers, models, or helpers. This directory is in the load path. public The directory available for the web server. Also contains the dispatchers and the default HTML files. This should be set as the DOCUMENT_ROOT of your web server. script Helper scripts for automation and generation. test Unit and functional tests along with fixtures. When using the rails generate command, template test files will be generated for you and placed in this directory. vendor External libraries that the application depends on. Also includes the plugins subdirectory. If the app has frozen rails, those gems also go here, under vendor/rails/. This directory is in the load path. passenger-4.0.37/test/stub/rails3.1/script/000755 000765 000024 00000000000 12233035540 021010 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/test/000755 000765 000024 00000000000 12233035540 020463 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/tmp/000755 000765 000024 00000000000 12233035540 020304 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/vendor/000755 000765 000024 00000000000 12233035540 021001 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/vendor/assets/000755 000765 000024 00000000000 12233035540 022303 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/vendor/plugins/000755 000765 000024 00000000000 12233035540 022462 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/vendor/plugins/.gitkeep000644 000765 000024 00000000000 12233035540 024101 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/vendor/assets/stylesheets/000755 000765 000024 00000000000 12233035540 024657 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/vendor/assets/stylesheets/.gitkeep000644 000765 000024 00000000000 12233035540 026276 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/tmp/cache/000755 000765 000024 00000000000 12233035540 021347 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/tmp/cache/assets/000755 000765 000024 00000000000 12233035540 022651 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/test/fixtures/000755 000765 000024 00000000000 12233035540 022334 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/test/functional/000755 000765 000024 00000000000 12233035540 022625 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/test/integration/000755 000765 000024 00000000000 12233035540 023006 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/test/performance/000755 000765 000024 00000000000 12233035540 022764 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/test/test_helper.rb000644 000765 000024 00000000706 12233035540 023331 0ustar00honglistaff000000 000000 ENV["RAILS_ENV"] = "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. # # Note: You'll currently still have to declare fixtures explicitly in integration tests # -- they do not yet inherit this setting fixtures :all # Add more helper methods to be used by all tests here... end passenger-4.0.37/test/stub/rails3.1/test/unit/000755 000765 000024 00000000000 12233035540 021442 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/test/unit/.gitkeep000644 000765 000024 00000000000 12233035540 023061 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/test/performance/browsing_test.rb000644 000765 000024 00000000562 12233035540 026205 0ustar00honglistaff000000 000000 require 'test_helper' require 'rails/performance_test_help' class BrowsingTest < ActionDispatch::PerformanceTest # Refer to the documentation for all available options # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory] # :output => 'tmp/performance', :formats => [:flat] } def test_homepage get '/' end end passenger-4.0.37/test/stub/rails3.1/test/integration/.gitkeep000644 000765 000024 00000000000 12233035540 024425 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/test/functional/.gitkeep000644 000765 000024 00000000000 12233035540 024244 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/test/fixtures/.gitkeep000644 000765 000024 00000000000 12233035540 023753 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/script/rails000755 000765 000024 00000000447 12233035540 022055 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. APP_PATH = File.expand_path('../../config/application', __FILE__) require File.expand_path('../../config/boot', __FILE__) require 'rails/commands' passenger-4.0.37/test/stub/rails3.1/public/404.html000644 000765 000024 00000001330 12233035540 022154 0ustar00honglistaff000000 000000 The page you were looking for doesn't exist (404)

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

passenger-4.0.37/test/stub/rails3.1/public/422.html000644 000765 000024 00000001307 12233035540 022160 0ustar00honglistaff000000 000000 The change you wanted was rejected (422)

The change you wanted was rejected.

Maybe you tried to change something you didn't have access to.

passenger-4.0.37/test/stub/rails3.1/public/500.html000644 000765 000024 00000001330 12233035540 022151 0ustar00honglistaff000000 000000 We're sorry, but something went wrong (500)

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

passenger-4.0.37/test/stub/rails3.1/public/favicon.ico000644 000765 000024 00000000000 12233035540 023071 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/public/index.html000644 000765 000024 00000013423 12233035540 022762 0ustar00honglistaff000000 000000 Ruby on Rails: Welcome aboard

Getting started

Here’s how to get rolling:

  1. Use rails generate to create your models and controllers

    To see all available options, run it without parameters.

  2. Set up a default route and remove public/index.html

    Routes are set up in config/routes.rb.

  3. Create your database

    Run rake db:create to create your database. If you're not using SQLite (the default), edit config/database.yml with your username and password.

passenger-4.0.37/test/stub/rails3.1/public/robots.txt000644 000765 000024 00000000314 12233035540 023031 0ustar00honglistaff000000 000000 # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file # # To ban all spiders from the entire site uncomment the next two lines: # User-Agent: * # Disallow: / passenger-4.0.37/test/stub/rails3.1/log/.gitkeep000644 000765 000024 00000000000 12233035540 021704 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/lib/assets/000755 000765 000024 00000000000 12233035540 021554 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/lib/tasks/000755 000765 000024 00000000000 12233035540 021377 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/lib/tasks/.gitkeep000644 000765 000024 00000000000 12233035540 023016 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/lib/assets/.gitkeep000644 000765 000024 00000000000 12233035540 023173 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/doc/README_FOR_APP000644 000765 000024 00000000323 12233035540 022335 0ustar00honglistaff000000 000000 Use this README file to introduce your application and point to useful places in the API for learning more. Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. passenger-4.0.37/test/stub/rails3.1/db/seeds.rb000644 000765 000024 00000000543 12233035540 021523 0ustar00honglistaff000000 000000 # This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) # Mayor.create(:name => 'Emanuel', :city => cities.first) passenger-4.0.37/test/stub/rails3.1/config/application.rb000644 000765 000024 00000003773 12233035540 023613 0ustar00honglistaff000000 000000 require File.expand_path('../boot', __FILE__) require 'rails/all' if defined?(Bundler) # If you precompile assets before deploying to production, use this line Bundler.require(*Rails.groups(:assets => %w(development test))) # If you want your assets lazily compiled in production, use this line # Bundler.require(:default, :assets, Rails.env) end module Empty class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # Custom directories with classes and modules you want to be autoloadable. # config.autoload_paths += %W(#{config.root}/extras) # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named. # config.plugins = [ :exception_notification, :ssl_requirement, :all ] # Activate observers that should always be running. # config.active_record.observers = :cacher, :garbage_collector, :forum_observer # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # config.time_zone = 'Central Time (US & Canada)' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] # Enable the asset pipeline config.assets.enabled = true # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' end end passenger-4.0.37/test/stub/rails3.1/config/boot.rb000644 000765 000024 00000000277 12233035540 022247 0ustar00honglistaff000000 000000 require 'rubygems' # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) passenger-4.0.37/test/stub/rails3.1/config/database.yml000644 000765 000024 00000001100 12233035540 023230 0ustar00honglistaff000000 000000 # SQLite version 3.x # gem install sqlite3 # # Ensure the SQLite 3 gem is defined in your Gemfile # gem 'sqlite3' development: adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: sqlite3 database: db/production.sqlite3 pool: 5 timeout: 5000 passenger-4.0.37/test/stub/rails3.1/config/environment.rb000644 000765 000024 00000000225 12233035540 023641 0ustar00honglistaff000000 000000 # Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Empty::Application.initialize! passenger-4.0.37/test/stub/rails3.1/config/environments/000755 000765 000024 00000000000 12233035540 023500 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/config/initializers/000755 000765 000024 00000000000 12233035540 023457 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/config/locales/000755 000765 000024 00000000000 12233035540 022373 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/config/routes.rb000644 000765 000024 00000003372 12233035540 022624 0ustar00honglistaff000000 000000 Empty::Application.routes.draw do # The priority is based upon order of creation: # first created -> highest priority. # Sample of regular route: # match 'products/:id' => 'catalog#view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase # This route can be invoked with purchase_url(:id => product.id) # Sample resource route (maps HTTP verbs to controller actions automatically): # resources :products # Sample resource route with options: # resources :products do # member do # get 'short' # post 'toggle' # end # # collection do # get 'sold' # end # end # Sample resource route with sub-resources: # resources :products do # resources :comments, :sales # resource :seller # end # Sample resource route with more complex sub-resources # resources :products do # resources :comments # resources :sales do # get 'recent', :on => :collection # end # end # Sample resource route within a namespace: # namespace :admin do # # Directs /admin/products/* to Admin::ProductsController # # (app/controllers/admin/products_controller.rb) # resources :products # end # You can have the root of your site routed with "root" # just remember to delete public/index.html. # root :to => 'welcome#index' # See how all your routes lay out with "rake routes" # This is a legacy wild controller route that's not recommended for RESTful applications. # Note: This route will make all actions in every controller accessible via GET requests. match ':controller(/:action(/:id(.:format)))' end passenger-4.0.37/test/stub/rails3.1/config/locales/en.yml000644 000765 000024 00000000326 12233035540 023521 0ustar00honglistaff000000 000000 # Sample localization file for English. Add more files in this directory for other locales. # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. en: hello: "Hello world" passenger-4.0.37/test/stub/rails3.1/config/initializers/backtrace_silencers.rb000644 000765 000024 00000000624 12233035540 027774 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. # Rails.backtrace_cleaner.remove_silencers! passenger-4.0.37/test/stub/rails3.1/config/initializers/inflections.rb000644 000765 000024 00000000570 12233035540 026323 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format # (all these examples are active by default): # ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end passenger-4.0.37/test/stub/rails3.1/config/initializers/mime_types.rb000644 000765 000024 00000000315 12233035540 026156 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone passenger-4.0.37/test/stub/rails3.1/config/initializers/passenger.rb000644 000765 000024 00000000333 12233035540 025772 0ustar00honglistaff000000 000000 event_preprocessor = lambda { |e| e.payload[:sql].gsub!("secret","PASSWORD") if e.payload[:sql] } PhusionPassenger.install_framework_extensions!(:event_preprocessor => event_preprocessor ) if defined?(PhusionPassenger) passenger-4.0.37/test/stub/rails3.1/config/initializers/secret_token.rb000644 000765 000024 00000000760 12233035540 026474 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. Empty::Application.config.secret_token = '0c64bf93db915cd615abffa56b5e29dd520a5afc5d6960f5962e8c2f2d566dbc01bae2f1dc43656a4867bd6905e04838278ab2771aa6809e11676a8189edb016' passenger-4.0.37/test/stub/rails3.1/config/initializers/session_store.rb000644 000765 000024 00000000632 12233035540 026704 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. Empty::Application.config.session_store :cookie_store, :key => '_empty_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "rails generate session_migration") # Empty::Application.config.session_store :active_record_store passenger-4.0.37/test/stub/rails3.1/config/initializers/wrap_parameters.rb000644 000765 000024 00000000724 12233035540 027203 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters :format => [:json] end # Disable root element in JSON by default. ActiveSupport.on_load(:active_record) do self.include_root_in_json = false end passenger-4.0.37/test/stub/rails3.1/config/environments/development.rb000644 000765 000024 00000002056 12233035540 026352 0ustar00honglistaff000000 000000 Empty::Application.configure do # Settings specified here will take precedence over those in config/application.rb # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Log error messages when you accidentally call methods on nil. config.whiny_nils = true # Show full error reports and disable caching config.consider_all_requests_local = true config.action_controller.perform_caching = false # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false # Print deprecation notices to the Rails logger config.active_support.deprecation = :log # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin # Do not compress assets config.assets.compress = false # Expands the lines which load the assets config.assets.debug = true end passenger-4.0.37/test/stub/rails3.1/config/environments/production.rb000644 000765 000024 00000004145 12233035540 026217 0ustar00honglistaff000000 000000 Empty::Application.configure do # Settings specified here will take precedence over those in config/application.rb # Code is not reloaded between requests config.cache_classes = true # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false config.action_controller.perform_caching = true # Disable Rails's static asset server (Apache or nginx will already do this) config.serve_static_assets = false # Compress JavaScripts and CSS config.assets.compress = true # Don't fallback to assets pipeline if a precompiled asset is missed config.assets.compile = false # Generate digests for assets URLs config.assets.digest = true # Defaults to Rails.root.join("public/assets") # config.assets.manifest = YOUR_PATH # Specifies the header that your server uses for sending files # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true # See everything in the log (default is :info) config.log_level = :debug # Use a different logger for distributed setups # config.logger = SyslogLogger.new # Use a different cache store in production # config.cache_store = :mem_cache_store # Enable serving of images, stylesheets, and JavaScripts from an asset server # config.action_controller.asset_host = "http://assets.example.com" # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) # config.assets.precompile += %w( search.js ) # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false # Enable threaded mode config.threadsafe! # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation can not be found) config.i18n.fallbacks = true # Send deprecation notices to registered listeners config.active_support.deprecation = :notify end passenger-4.0.37/test/stub/rails3.1/config/environments/test.rb000644 000765 000024 00000003217 12233035540 025007 0ustar00honglistaff000000 000000 Empty::Application.configure do # Settings specified here will take precedence over those in config/application.rb # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! config.cache_classes = true # Configure static asset server for tests with Cache-Control for performance config.serve_static_assets = true config.static_cache_control = "public, max-age=3600" # Log error messages when you accidentally call methods on nil config.whiny_nils = true # Show full error reports and disable caching config.consider_all_requests_local = true config.action_controller.perform_caching = false # Raise exceptions instead of rendering exception templates config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment config.action_controller.allow_forgery_protection = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test # Use SQL instead of Active Record's schema dumper when creating the test database. # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql # Print deprecation notices to the stderr config.active_support.deprecation = :stderr end passenger-4.0.37/test/stub/rails3.1/app/assets/000755 000765 000024 00000000000 12233035540 021566 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/app/controllers/000755 000765 000024 00000000000 12233035540 022632 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/app/helpers/000755 000765 000024 00000000000 12233035540 021726 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/app/mailers/000755 000765 000024 00000000000 12233035540 021720 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/app/models/000755 000765 000024 00000000000 12233035540 021547 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/app/views/000755 000765 000024 00000000000 12233035540 021421 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/app/views/layouts/000755 000765 000024 00000000000 12233035540 023121 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/app/views/layouts/application.html.erb000644 000765 000024 00000000327 12233035540 027063 0ustar00honglistaff000000 000000 Empty <%= stylesheet_link_tag "application" %> <%= javascript_include_tag "application" %> <%= csrf_meta_tags %> <%= yield %> passenger-4.0.37/test/stub/rails3.1/app/models/.gitkeep000644 000765 000024 00000000000 12233035540 023166 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/app/mailers/.gitkeep000644 000765 000024 00000000000 12233035540 023337 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/app/helpers/application_helper.rb000644 000765 000024 00000000035 12233035540 026113 0ustar00honglistaff000000 000000 module ApplicationHelper end passenger-4.0.37/test/stub/rails3.1/app/controllers/application_controller.rb000644 000765 000024 00000000120 12233035540 027716 0ustar00honglistaff000000 000000 class ApplicationController < ActionController::Base protect_from_forgery end passenger-4.0.37/test/stub/rails3.1/app/assets/images/000755 000765 000024 00000000000 12233035540 023033 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/app/assets/stylesheets/000755 000765 000024 00000000000 12233035540 024142 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.1/app/assets/stylesheets/application.css000644 000765 000024 00000000536 12233035540 027163 0ustar00honglistaff000000 000000 /* * This is a manifest file that'll automatically include all the stylesheets available in this directory * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at * the top of the compiled file, but it's generally better to create a new file per style scope. *= require_self *= require_tree . */passenger-4.0.37/test/stub/rails3.1/app/assets/images/rails.png000644 000765 000024 00000014766 12233035540 024671 0ustar00honglistaff000000 000000 ‰PNG  IHDR2@XŐ${tEXtSoftwareAdobe ImageReadyqÉe<˜IDATxÚŹ[ ”\e•țȚRŻÖźź^Ș;IwgßĂ‚aŚÈ@`ÄńÈÉÇíèšgÆăœGgDgtÜqDFqFń ąDÄqFÈ’@ÒéNșÓûRU]Ë«śȚ|śÿ_-Q˜ÇyéȘś^ęïȚÿȚïȚïȚÿÇž.ʋđ0‚WÀ_6€Íkšùbđf̻ܞù‡Ł6À«<4 Æw5ÿæ~*rŽÛá—?Àż9–ńîöˆmŽŰ&"ŠŰăMßśù7@vm'Ú· {Œ_żS)VûŹÿi\“ĂWôG?šËžŐ«jM‹dÜ@ lDLXéžșW-TàÍUá+@ȚEPào\&*RŽčą§áûnn‰˜č,á fšđDÀWrX|žÊ3žMŁ=Û§\‚ĘƒŠ«śEçłJˆșB–[dö”6Aššș'Ÿ=‘tŹx^©„ÊÔ$Çòa86̈„źò{, ϱP”©ŒepNűž*_ìW©ˆ_3ąoóŸ·;†ńȚ„ń(•0àòEŸ:ĄŹàńƒÏÙiïËÒ6ȘeÎÌXnĄŒhGf"ƒÂúL|S+(+.gĐ€Ÿ–­g=šY‡c—Êh=m#V_û·ʊ#ÿû}èń‚ÇȘòĘÎ|±ŒÀâtR ńŸȚD8VÙՄ‰M~xg!ni%DyŸ(Ą”Ą‰î âé…ő•ÛB,{(äàNÎÁŽăpÒˆ$3°ăi۱$ìh›.@ße[a'ăœeșJԂłyšŒĆì‹Ï 4>ŒH*ƒöMçÂéHQ(Jgt-ƒÖą»QI ^·‚đž©dĐ„@áçsÓÔÒ-Ą'-Ž 51€{ł'Ò0ő ŐÙ|În4ۉh{Vœ@Ü©çâw"»éBŸËTŠ =rŸzqP­pBè‘Hăȃ?ąĆˆƒâ ]-ĂqópgsPiŠSÓȘź…ög`jŚnžù)˜‰šÊőжm ćŸĄB2L†.„ûx!žjŠÔúJĄÀśP! Kˆ/\€ ÊźRBŽŽ[0”ç9Trӈu. Țąuć©Höź$Ž …Á™DDQÒ+ä:ˆÜÁĘ˜Ù» 3/ŸŒçnÁò«Țÿú%äöőSjŽm‰2Đć!&D/ü[„EÚHw·Wț ‘ßA-RR!ê•æP eŠu„•HÁimÇè“"”tÚ6lFČgčČĐ«-ËO.žć™1Œ?śƞúÒksX~őVìúêtmZJđR1êŠÔ1èéŠNśÌôuÁ&Đ<Ïő âœ©,T™šbÈ,`đçwąóÌ °đWP„x-GŽ5‹ž Żä—ăèĂ`ű±•ŐŽ/5pbêđÔÁ­ŹAà©ötšÄIVJç_«]§›0/ŽČ‰Ÿœ‰DiòH=ż–ĂŽ#è»ű*œö77 ç-3‚Ńń țVuQŰ0ê.…šÍpÛʔŽÓ%ĐyÀw Ú ÂhљWđâč0ă),șô2$—ôbúà6&ČŒÄI/@báj$ČËöűIź–‹(Žfx'𠿐J…nËÉO”"±`©ÂŰŸű<-Œ/ßúŸLŽźŃź%^ÏÈ«œÍ¶ȚnÄ2œȘwҗùć2}}Xüö­úŐœÈŒL€'QžŁÙ-,żümˆ/ꀋÂ4#0“­ŽŠ‹òôQ”&0›È0€ŻàčNK—rŻ<‡éęÏböđ^ąkN#_wzU7hg'C{ -œk=ç"Źyś‡Q"śȚ~šjëŒhúï[#V\\Í€“tŻêÓźÌ'K„3ÌJQ…Î5čžŸ{ÚOۄ±~ŒęțEä Xöź+ŃuÖTÂ3ˆ/Ád}j€Ź"ÉQ„.M 8öÜâæŽ #wh/ïیfg0çTàp’ü9-cÉïƒC«ìûȚ8öŰŁÊ‹&Ÿ{łƒĂʕK6Âä'fńi•Ìâ.D˜ O°FšX•„ś’+°àŒKPš"…0ĐuțE8pÇŻ±ê=WĄśÒ‹àćs€Nt7_¶©Ât˜ê»q;* eȘŰőíÛ0üÈdÖ.Æêk¶ąóŒ éŠÓšLŽšI°ąqĆ*ÿô{t· Z%‚čá~ìț捐cÆ%šČHÊ6â>sA,›AŚČ…ÚŚæ)ĄŁƒaIäEčC(ÒERK{8‚çÿé«ÈŹ[Ž”y?iI5$ʆ%ê·fű{}ŠuŹšƒ—îú úïȚF äûÇ1¶ăÌ~ă;v1l'‰Š˜@ćç€F…æĄŒ 'IF'mń!K€7ă…Đ"Œ&­]ÒÍw 1ó5š#4V§iò‘ĆŸnÇÔö[Ô—ávă Ç8̝…Ű)>Cá=LŽBވ“Àào~‹éœ/űž3%ș wŽ‚·ÿFę4֓ÁÊż8™Ț>bWX@‡bÆÉb@ŒÙIzP9ĐI±vÁFfQÉL‹Ê!2cŁEP(se4~Š5RhƒAŽ90‚‘_?‡ æcóMŸEą§teVč”OaOr ĘÓśBŠȘ]ËpȱÆŰ“»±ń“"EyïxˆÏ:ü­ NJ)‹–ŽÌblŚ‹hYâÀu…ÖÄTŽ™dâÔ«æÈíwš=Űą„M€gw“VPè™OFΒâ2¶æ5-TD—[ŠćZ2Ă>–]ęV,xӛIOŠČÆ…)œJ”ńÍș[)?cn28pÿ#(çmkÇÒ+.ÂèŁ/ phœÊźŚQ6?łwć7‘îÇHăIoÄSj)“ĆÉ1<±€ÙÈ#íŹ-œŁšNæ9ûO1ͰŰŃéȚkÂIäòKŽŹéÁÊśż—r:ŒÇ(Ɨ‹;rș“R&<9€Ș3Švż@Áw(w:ű“Đ~æ:TŠóÊFSȚ’"Šö ŁçŒŐŠ’TádźÌŹT‚ă9ˆæęPIb“3•…˜JŰzæóT’QŚ„„BŐP23ŽÆ”ïąéW’­Î*|@^€ŹĄ)QłŒüwćĂ?IŹéžq ȚûŽ=ü,Œ™Š<@Đ B8)“;ŽąûŹ50ùŒéHˆ-=ęTÁ í”SAș@Œ”Œ@č„f‚5Țšr”é[ƒÊT%#c|…őĂZ&Äw(B)tDč•Q%Êvű™yCțš‘(â,Ɵ|ï‰ÁƒŠÊ°¶ÆÉi‰‰čä&ć—<#u:ÍëȘ3E­HkÍzŐĐŽ)nd¶ŰF>1Vä2ÀČkźFŒœGYL KáMQÀlR&TBțÚ,igvżˆòè8]Cœ8S±f#ą4æQĄŠÚŹŐ'ž?Ìçą,ÈÊ= „ËaVŐ9WEXłöłYr§rà‡Ș*Ô!âcÍőÄÆŻ~­Ś)Đú,=Ûűyџ]Șj–lGeíšEÌș5Žr_2ńԎ}dŚ"œa‰Ș]Œ0ßM9·ŠPˆZ¶…ÙĘG17ž‡ÍÌnE"ÊRąˆÇrÛó\ńY‡Q‰)!|5U(dŹ·=—^‰Ć—żoŒăÇ8őłŚ+ĐöŒő2ÀNU“6jB[ĄàëˆB5ĆèV.]šĆČ­Wăô/^Ż”‘䩏Đôßń ފ;Y"Vúi‘$±’€2¶ŠœŐÙČș_§ń”c‚‰Æ«(F^Eçùg“qö©{–C°ńŒśPč‹/ #K8ă–ĘôY+QÈ ĘMđ1>ÜžAÌìߏźÍçąëÂÍ,gĘyźtČȚ•n,˜˜zŸŸĆE$‘VÀśŠ.ńÉävßÌæÌâ.†ŽPyLaèpóâÈÏîGç9TnŃÒ:uiàÀšçRZ! z‹I0?ЏÒá1<ÿ‰/`àû˜7ÈÓ$)XÆqűhŰŠvštŻčÓ,}‡˜ÓäjITòeuÓ°Ìùąr0šëłh§%” ‰ŁÿęKŒüîQ’ ˜3VŁ0<ˆ%WżëÄ&ą„V‚< ÎÄ5%ÔJ2”Sű™IE ĂJÒÊX;>u#­$Ź6ȘɱŻóGM™ÀhŰF…d˜td|Û~dÏ\O9Ijç**záDۍb)PBÌÒœŠh•…-qű qîl‘%ë/€{ïGzÍ*d7ŸóŠ=QS]:‡ˆRș©QbÂUàMPᒯ‚†ò$%œæš du] őˆXefïQzÈ$Ÿ«(Ÿ„'И‘Z‹HŠ«#äÇAÜRÂXŹíDB Ű~öÈÿ`‹Ś0.F|XŒXKì)æêé™wŹFoÊlzyÈhÔߚ»ŐÜKzłŒ>±“‚.&n EjÍ„™U,2'•ƒś &iwöŹóțè[’d­À[ ™ÓV)ö*ŠQ§a†vŠ†›úl …êQÌDitž[VŠIžQ‰ÚhRÄ@œ$)Éy~mÆ|ÒűäŠ>șÖú?­cJ+VČH'6țË?ă 7 iÖ.ûX‹H8ÌFȚš)d†AYűUÂBjE»"—Š.ń4w-?lÍÚÔ2ĂYœ™.Á•úÎRj€WŹDą«ś”ö@BÜŰŹ.߆sță[H-gA—S™Fš3ÿÚFęj™ĆÒ]úŰąœŽ„ÊèBP떬…_—>M%bt —©?_rŐŹ -h]·ö”·rœ_ĆŸ[nÂȶ‡˜›Q‘Șăą+GÔ­_û\Ê ±țžZÙŠfÜeŃÖĐÏótŒ(|șU(‡Ü'.g źVFĂENÇë9’œœüé}Ll»4ÎTĆ&nto¹Ӓ œX ÉFß éˆ"ș€…_‰ŐfYzÇF˜~y& Gu]$›§æO[Èöv#ž]đș‰.è@$VA`â±§T°ąŃ°őZ[2šș–”uĘ+ˆ/mUÁCò‡_ Tœn‡y€Ń  —|l\ «ł čțÌMÌ"G[Œž±ŽìëR$”d™Š|:—Ä›ș“FœIi„reÚ"Ù”łát· Êä“ú,Œ+ی­1ÜìZ1Ú1ÉÈÒuŃ‘dt*çKš2é ÜsŒd; [êő)Čx„ȀW.Ąčz2jćTh#DźVŒß\NO &eó…_±v’U2ŸŚĘBè^”š%ă¶0FÛÓHöôČ(/ԘI§2>‰’•Àë=œLńĆ]șŃdv UUëpk"ìijBœź$’,O-0y<}~źĂ*TșöŁ5LÄùErE4ĘBßłXŠÆX‚NŁ:<†9šČŒ>Eìd -ËV*‹űžź«»êu„B…LÍĘÒs»”N*Š*­á…JxćȘRÈÍUÁôÄ蟖,ôÈìTÊ(ìÛ ƒ•ÈûËGuÔ ÿŸ@śâĆŻYƒ{ëÚu|ùCïJFŻ(OL°bœÔ±–Ńín‚ŐŽiKhp‹đÒŚ·’F»tx8ł#”žȘ9Fs±FŸÚ‹èłûœźDT‘šA”n1vđeFŻ^M ^kfĐÈ.ƏʠVšÊ“ǰę3ŸÄűăÏÀJÆËaăY@n&»Șj”‚Llű:Š€MôʉcӚđê…Æà—<ÿNđÁ#Ć ŽNä062KkYˆ”€QÆ,yÎë9Ú6lBțp?r‡(ÚëX„eW_.KuJR'‚-Ž^xą"^ž‘j’n5RE0&Š`iÎP\Ź”4^ș'j-!ő杒*Žš`4†Łü]Ô-"ńâ>ŽvuŚËË?9—Žw!–íÂÎ/~­ëŚ#ÚÚÉh…“í ›MȘÄÛÈò”ƒ ڛ °óźÌŽnMA}m W,)(ìĂź….”ŠN ŹyÛ%$æÇàł*ËóȚț={P9Šîő§ącé D“zHî>ÿBlÿäu˜ȚŸK78˜x-Ö>V,ąó‰'”JU»Ś \LŻč]Èl„é>W*ȘrĄžÙ-h«XóȘf~oI† “Z3f玱î>v‰öNŽ3 uŻZ‡Tgg}śŐŽö363:.g /-ÒHž+"P‰ÎÏKۉSZô4Ž„òZŐ_ŚòŠGlXMŸc7¶é"§Ê;Òż ‹ŁòĐ(ŽĘś5f‚MÄđUCݶOF6Ü ±ÎßCNfłtč>$S1V†aéêëR·&œ4)æŽ ĄÊÈâÍéٗ†a y]‘ä%íW ·AÍ*|g©XĐ{Q€Ÿc>iTX1‚F‡‰ ź M`|à!Ó[$‚±ŠPŠ4šȘʊąĐ$涟#,d«ÉŒƒ(?KTŹJR„ÛžSŒû%C7ôjûHšÖb攃j+ÊáN$©,ł[.@Ëč›ĐсŸÿț_ ÈÏà?™.3ëÖúÄ”ÂH"U$âĐZ¶^Ș ńX0É2!KÚc© Čù„8Ćqè.N«Ź‰ˆMI6–N&3”Šśn8Ž€eë€ëöÁx„oéÈWŠfP˜™ÄČËȚB<pđ—żR·ÿ±EAìź€dŃšo$*ÎäÈmł)e9„D© «5‚X[…·T$©LΠ:]†C$n#m›±C±ëÖ[P~ˆYŰtè*dÏ?§\śqŽź^WÇÁôęŰùő›XsìÄ!ÓEæü-űű­·2#—°ûË_ÆàmwŁćŒő8û;·2!váàwà…ü:™DČŸ”á›UônœËßó$)GàiG–nÎ3_ÿÆoțŒń EŐZE3Űkœ-™™–îEHv.œOĂ»zĐEŠòű>€™ç"֛ÁŠÏ}í§lžś\Œł‰/-À·nĆ۱QôÄăHŠÛÔœaâb*â#KŚ‹¶eIÊÆłd#Gš et\ž§æóêț ,:•‚MëÛŽĂœÇICł}òm úÙœƒO?¶e«°bË%€űːٰSÛöČtíB|Aznôéßazÿ*”ÏFlQ/ŹKà ƒűużuę*1’wËDÖvÖżE„ŚÛÖŻSJTKžę;(Œ4 k–ÆŁ;v2P9ș—`Ìk‰Œ©ê»{ïż?~ß_ă‰[ŸÙhŹÊąŽ^9ŚŃ„ÇĄ;„m|îđĘ]oÒ9<#Òjz…\“èwÄDœ,8éVĐ]ä]©%K9e­êr懇0ńônș¶©Û^FcIÂ>é`ĄU–ŸùbŒí+ČkօO1|NO©šæ]‘t+,Ȑl©_łËź6« ĒDœŒb§rzß^•pe7^ßćïšß[ńȚaûŸĂŸoÜÎçąș jNˆÆ+xŚÒs·šáNÓCśß…ÉÇwĐÌÎŒç7|üzŹțà‡a2ő,•€ô omî”rb©ÆZˆ‰~ž„›,pN>¶;?śY,ĘzÚïșĄ[u◿ăjüîÌŸȘq 4aÄęôúqîæ±Ú¶Nu6Zى»iŽd‡śêàîè@âÜőh!•ćçâÁ!”F9òđ#˜Üț,#UŒŰr±áșOaŃ—0=DĂ„„ ,,›,bĄ±E·#ÏÿôÇÈźXƒŸ3ÎÂȘ‹ÿśȚê¶=ÌaÖ<Ó =ÿ&_~ Ù”ëŃœacj˜Áń«’†ÂLsÎXuéXŸćB è(wzòŁEÀ»ék_QIف*4'ŃŁ«SÙlŁ–Êç{’.,ŹpÛ”ÒĐ2ëĄ`jpÜđšÌć^ۇ‹núZÎXĄöPÉò—Ćș^Ž]wȚ‰Ÿ]ûaìÿĆÏĂQ-”àoIÆ5íș’O“3a–]š _Źwb Ć­LŹ]êș$ÁÖ§"œ|sÔ©ÈŹ= ĘVˆŃïȚLIUȘbYY‘æź­ÍąIą$˜Òtżœùf$2í|r;ÿ~'îúèG°òôˆSűXk©á‡ŠđÔ­ßF4Áôž—‘b‘4úì xúßo[,ą04Fž•ÀìĄ~<}Û­ȘßĂRš%mybšŚŸĆ\mlO—‚Ž.4}t”E\€œ7}M)ŻêtՉô1țì3˜x”îFś [Ÿ-»2Æ6ăștï䱄Ę&üšèEŃ"9Œ€;Âٜ±rq âe)ÍßK!Ç:bŠæwYĄ }„g;JŚš”Ő)5D$!KÉ€9źÊß«-Kń˜Ú$ë$ąì »óè±h–l™…ȚDÚŰÖUFF ȘĄJ{s2źR‰Ë6rCśŐ&đŒ&æ0;ûá@>›ç]›/€Z’3±E,k;( 2^‹źć0ÚÔ9<”jCE“őíSő{Đ}à錍6NFŽâ)ü6/”Ș}.‚KZâ%Ùđ|ŸŚïSĐđš6W6ïëmR=ŽÒ* íđż'MO‡R…Û8P«Áë«5~ÓçFŁĄț]w„0êXhq©H°…u89cŽÄ€« űđúÇjQkȘżP±Pß üʇ,Éáű?'ț?ŽàäËŐRƒI!ÿ4#ßmŒśłÚŁÿ'ÀŸ˜œ-볞IENDźB`‚passenger-4.0.37/test/stub/rails3.0/.gitignore000644 000765 000024 00000000050 12233035540 021466 0ustar00honglistaff000000 000000 .bundle db/*.sqlite3 log/*.log tmp/**/* passenger-4.0.37/test/stub/rails3.0/app/000755 000765 000024 00000000000 12233035540 020263 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/config/000755 000765 000024 00000000000 12233035540 020750 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/config.ru000644 000765 000024 00000000233 12233035540 021316 0ustar00honglistaff000000 000000 # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run Empty::Application passenger-4.0.37/test/stub/rails3.0/db/000755 000765 000024 00000000000 12233035540 020070 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/doc/000755 000765 000024 00000000000 12233035540 020250 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/Gemfile000644 000765 000024 00000000677 12233035540 021010 0ustar00honglistaff000000 000000 source 'https://rubygems.org' gem 'rails', '~> 3.0.0' gem 'sqlite3-ruby', :require => 'sqlite3' # Use unicorn as the web server # gem 'unicorn' # Deploy with Capistrano # gem 'capistrano' # Bundle the extra gems: # gem 'bj' # gem 'nokogiri', '1.4.1' # gem 'sqlite3-ruby', :require => 'sqlite3' # gem 'aws-s3', :require => 'aws/s3' # Bundle gems for certain environments: # gem 'rspec', :group => :test # group :test do # gem 'webrat' # end passenger-4.0.37/test/stub/rails3.0/Gemfile.lock000644 000765 000024 00000003406 12233035540 021730 0ustar00honglistaff000000 000000 GEM remote: https://rubygems.org/ specs: abstract (1.0.0) actionmailer (3.0.20) actionpack (= 3.0.20) mail (~> 2.2.19) actionpack (3.0.20) activemodel (= 3.0.20) activesupport (= 3.0.20) builder (~> 2.1.2) erubis (~> 2.6.6) i18n (~> 0.5.0) rack (~> 1.2.5) rack-mount (~> 0.6.14) rack-test (~> 0.5.7) tzinfo (~> 0.3.23) activemodel (3.0.20) activesupport (= 3.0.20) builder (~> 2.1.2) i18n (~> 0.5.0) activerecord (3.0.20) activemodel (= 3.0.20) activesupport (= 3.0.20) arel (~> 2.0.10) tzinfo (~> 0.3.23) activeresource (3.0.20) activemodel (= 3.0.20) activesupport (= 3.0.20) activesupport (3.0.20) arel (2.0.10) builder (2.1.2) erubis (2.6.6) abstract (>= 1.0.0) i18n (0.5.0) json (1.7.6) mail (2.2.19) activesupport (>= 2.3.6) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.20.1) polyglot (0.3.3) rack (1.2.7) rack-mount (0.6.14) rack (>= 1.0.0) rack-test (0.5.7) rack (>= 1.0) rails (3.0.20) actionmailer (= 3.0.20) actionpack (= 3.0.20) activerecord (= 3.0.20) activeresource (= 3.0.20) activesupport (= 3.0.20) bundler (~> 1.0) railties (= 3.0.20) railties (3.0.20) actionpack (= 3.0.20) activesupport (= 3.0.20) rake (>= 0.8.7) rdoc (~> 3.4) thor (~> 0.14.4) rake (10.0.3) rdoc (3.12) json (~> 1.4) sqlite3 (1.3.6) sqlite3-ruby (1.3.3) sqlite3 (>= 1.3.3) thor (0.14.6) treetop (1.4.12) polyglot polyglot (>= 0.3.1) tzinfo (0.3.35) PLATFORMS ruby DEPENDENCIES rails (~> 3.0.0) sqlite3-ruby passenger-4.0.37/test/stub/rails3.0/lib/000755 000765 000024 00000000000 12233035540 020251 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/log/000755 000765 000024 00000000000 12233035540 020264 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/public/000755 000765 000024 00000000000 12233035540 020761 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/Rakefile000644 000765 000024 00000000472 12233035540 021153 0ustar00honglistaff000000 000000 # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require File.expand_path('../config/application', __FILE__) require 'rake' require 'rake/testtask' require 'rake/rdoctask' Rails::Application.load_tasks passenger-4.0.37/test/stub/rails3.0/script/000755 000765 000024 00000000000 12233035540 021007 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/test/000755 000765 000024 00000000000 12233035540 020462 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/tmp/000755 000765 000024 00000000000 12233035540 020303 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/vendor/000755 000765 000024 00000000000 12233035540 021000 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/vendor/plugins/000755 000765 000024 00000000000 12233035540 022461 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/vendor/plugins/.gitkeep000644 000765 000024 00000000000 12233035540 024100 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/tmp/cache/000755 000765 000024 00000000000 12233035540 021346 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/tmp/pids/000755 000765 000024 00000000000 12233035540 021242 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/tmp/pids/.gitignore000644 000765 000024 00000000000 12233035540 023220 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/tmp/cache/.gitignore000644 000765 000024 00000000000 12233035540 023324 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/test/fixtures/000755 000765 000024 00000000000 12233035540 022333 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/test/functional/000755 000765 000024 00000000000 12233035540 022624 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/test/integration/000755 000765 000024 00000000000 12233035540 023005 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/test/performance/000755 000765 000024 00000000000 12233035540 022763 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/test/test_helper.rb000644 000765 000024 00000000706 12233035540 023330 0ustar00honglistaff000000 000000 ENV["RAILS_ENV"] = "test" require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help' class ActiveSupport::TestCase # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. # # Note: You'll currently still have to declare fixtures explicitly in integration tests # -- they do not yet inherit this setting fixtures :all # Add more helper methods to be used by all tests here... end passenger-4.0.37/test/stub/rails3.0/test/unit/000755 000765 000024 00000000000 12233035540 021441 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/test/performance/browsing_test.rb000644 000765 000024 00000000345 12233035540 026203 0ustar00honglistaff000000 000000 require 'test_helper' require 'rails/performance_test_help' # Profiling results for each test method are written to tmp/performance. class BrowsingTest < ActionDispatch::PerformanceTest def test_homepage get '/' end end passenger-4.0.37/test/stub/rails3.0/script/rails000755 000765 000024 00000000603 12233035540 022046 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. ENV_PATH = File.expand_path('../../config/environment', __FILE__) BOOT_PATH = File.expand_path('../../config/boot', __FILE__) APP_PATH = File.expand_path('../../config/application', __FILE__) require BOOT_PATH require 'rails/commands' passenger-4.0.37/test/stub/rails3.0/public/404.html000644 000765 000024 00000001330 12233035540 022153 0ustar00honglistaff000000 000000 The page you were looking for doesn't exist (404)

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

passenger-4.0.37/test/stub/rails3.0/public/422.html000644 000765 000024 00000001307 12233035540 022157 0ustar00honglistaff000000 000000 The change you wanted was rejected (422)

The change you wanted was rejected.

Maybe you tried to change something you didn't have access to.

passenger-4.0.37/test/stub/rails3.0/public/500.html000644 000765 000024 00000001330 12233035540 022150 0ustar00honglistaff000000 000000 We're sorry, but something went wrong (500)

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

passenger-4.0.37/test/stub/rails3.0/public/favicon.ico000644 000765 000024 00000000000 12233035540 023070 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/public/index.html000644 000765 000024 00000015563 12233035540 022770 0ustar00honglistaff000000 000000 Ruby on Rails: Welcome aboard

Getting started

Here’s how to get rolling:

  1. Use rails generate to create your models and controllers

    To see all available options, run it without parameters.

  2. Set up a default route and remove or rename this file

    Routes are set up in config/routes.rb.

  3. Create your database

    Run rake db:migrate to create your database. If you're not using SQLite (the default), edit config/database.yml with your username and password.

passenger-4.0.37/test/stub/rails3.0/public/robots.txt000644 000765 000024 00000000314 12233035540 023030 0ustar00honglistaff000000 000000 # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file # # To ban all spiders from the entire site uncomment the next two lines: # User-Agent: * # Disallow: / passenger-4.0.37/test/stub/rails3.0/public/stylesheets/000755 000765 000024 00000000000 12233035540 023335 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/public/stylesheets/.gitkeep000644 000765 000024 00000000000 12233035540 024754 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/log/.gitignore000644 000765 000024 00000000000 12233035540 022242 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/lib/tasks/000755 000765 000024 00000000000 12233035540 021376 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/lib/tasks/.gitkeep000644 000765 000024 00000000000 12233035540 023015 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/doc/README_FOR_APP000644 000765 000024 00000000323 12233035540 022334 0ustar00honglistaff000000 000000 Use this README file to introduce your application and point to useful places in the API for learning more. Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. passenger-4.0.37/test/stub/rails3.0/db/seeds.rb000644 000765 000024 00000000541 12233035540 021520 0ustar00honglistaff000000 000000 # This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) # Mayor.create(:name => 'Daley', :city => cities.first) passenger-4.0.37/test/stub/rails3.0/config/application.rb000644 000765 000024 00000004015 12233035540 023600 0ustar00honglistaff000000 000000 require File.expand_path('../boot', __FILE__) require 'rails/all' # If you have a Gemfile, require the gems listed there, including any gems # you've limited to :test, :development, or :production. Bundler.require(:default, Rails.env) if defined?(Bundler) module Empty class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # Add additional load paths for your own custom dirs # config.load_paths += %W( #{config.root}/extras ) # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named # config.plugins = [ :exception_notification, :ssl_requirement, :all ] # Activate observers that should always be running # config.active_record.observers = :cacher, :garbage_collector, :forum_observer # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. # config.time_zone = 'Central Time (US & Canada)' # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # config.i18n.default_locale = :de # Configure generators values. Many other options are available, be sure to check the documentation. # config.generators do |g| # g.orm :active_record # g.template_engine :erb # g.test_framework :test_unit, :fixture => true # end # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" # Configure sensitive parameters which will be filtered from the log file. config.filter_parameters += [:password] config.active_support.deprecation = :log end end passenger-4.0.37/test/stub/rails3.0/config/boot.rb000644 000765 000024 00000000506 12233035540 022241 0ustar00honglistaff000000 000000 require 'rubygems' # Set up gems listed in the Gemfile. gemfile = File.expand_path('../../Gemfile', __FILE__) begin ENV['BUNDLE_GEMFILE'] = gemfile require 'bundler' Bundler.setup rescue Bundler::GemNotFound => e STDERR.puts e.message STDERR.puts "Try running `bundle install`." exit! end if File.exist?(gemfile) passenger-4.0.37/test/stub/rails3.0/config/database.yml000644 000765 000024 00000001032 12233035540 023233 0ustar00honglistaff000000 000000 # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: sqlite3 database: db/development.sqlite3 pool: 5 timeout: 5000 # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 pool: 5 timeout: 5000 production: adapter: sqlite3 database: db/production.sqlite3 pool: 5 timeout: 5000 passenger-4.0.37/test/stub/rails3.0/config/environment.rb000644 000765 000024 00000000225 12233035540 023640 0ustar00honglistaff000000 000000 # Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Empty::Application.initialize! passenger-4.0.37/test/stub/rails3.0/config/environments/000755 000765 000024 00000000000 12233035540 023477 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/config/initializers/000755 000765 000024 00000000000 12233035540 023456 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/config/locales/000755 000765 000024 00000000000 12233035540 022372 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/config/routes.rb000644 000765 000024 00000003374 12233035540 022625 0ustar00honglistaff000000 000000 Empty::Application.routes.draw do |map| # The priority is based upon order of creation: # first created -> highest priority. # Sample of regular route: # match 'products/:id' => 'catalog#view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase # This route can be invoked with purchase_url(:id => product.id) # Sample resource route (maps HTTP verbs to controller actions automatically): # resources :products # Sample resource route with options: # resources :products do # member do # get :short # post :toggle # end # # collection do # get :sold # end # end # Sample resource route with sub-resources: # resources :products do # resources :comments, :sales # resource :seller # end # Sample resource route with more complex sub-resources # resources :products do # resources :comments # resources :sales do # get :recent, :on => :collection # end # end # Sample resource route within a namespace: # namespace :admin do # # Directs /admin/products/* to Admin::ProductsController # # (app/controllers/admin/products_controller.rb) # resources :products # end # You can have the root of your site routed with "root" # just remember to delete public/index.html. # root :to => "welcome#index" # See how all your routes lay out with "rake routes" # This is a legacy wild controller route that's not recommended for RESTful applications. # Note: This route will make all actions in every controller accessible via GET requests. match ':controller(/:action(/:id(.:format)))' end passenger-4.0.37/test/stub/rails3.0/config/locales/en.yml000644 000765 000024 00000000325 12233035540 023517 0ustar00honglistaff000000 000000 # Sample localization file for English. Add more files in this directory for other locales. # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. en: hello: "Hello world" passenger-4.0.37/test/stub/rails3.0/config/initializers/backtrace_silencers.rb000644 000765 000024 00000000624 12233035540 027773 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. # Rails.backtrace_cleaner.remove_silencers! passenger-4.0.37/test/stub/rails3.0/config/initializers/inflections.rb000644 000765 000024 00000000571 12233035540 026323 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format # (all these examples are active by default): # ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end passenger-4.0.37/test/stub/rails3.0/config/initializers/mime_types.rb000644 000765 000024 00000000315 12233035540 026155 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone passenger-4.0.37/test/stub/rails3.0/config/initializers/passenger.rb000644 000765 000024 00000000333 12233035540 025771 0ustar00honglistaff000000 000000 event_preprocessor = lambda { |e| e.payload[:sql].gsub!("secret","PASSWORD") if e.payload[:sql] } PhusionPassenger.install_framework_extensions!(:event_preprocessor => event_preprocessor ) if defined?(PhusionPassenger) passenger-4.0.37/test/stub/rails3.0/config/initializers/secret_token.rb000644 000765 000024 00000000760 12233035540 026473 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Your secret key for verifying the integrity of signed cookies. # If you change this key, all old signed cookies will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. Rails.application.config.secret_token = '7a885cba0cf0fdb940bb23fedeac02049f21c8f69589dcc5d07797045dc65915cb92cb5970a26480cfc194491264522920ecce34541d10b4292188efb377681c' passenger-4.0.37/test/stub/rails3.0/config/initializers/session_store.rb000644 000765 000024 00000000617 12233035540 026706 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, :key => '_empty_session' # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with "rake db:sessions:create") # Rails.application.config.session_store :active_record_store passenger-4.0.37/test/stub/rails3.0/config/environments/development.rb000644 000765 000024 00000001406 12233035540 026347 0ustar00honglistaff000000 000000 Empty::Application.configure do # Settings specified here will take precedence over those in config/environment.rb # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the webserver when you make code changes. config.cache_classes = false # Log error messages when you accidentally call methods on nil. config.whiny_nils = true # Show full error reports and disable caching config.consider_all_requests_local = true config.action_view.debug_rjs = true config.action_controller.perform_caching = false # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false end passenger-4.0.37/test/stub/rails3.0/config/environments/production.rb000644 000765 000024 00000003245 12233035540 026216 0ustar00honglistaff000000 000000 Empty::Application.configure do # Settings specified here will take precedence over those in config/environment.rb # The production environment is meant for finished, "live" apps. # Code is not reloaded between requests config.cache_classes = true # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false config.action_controller.perform_caching = true # Specifies the header that your server uses for sending files config.action_dispatch.x_sendfile_header = "X-Sendfile" # For nginx: # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # If you have no front-end server that supports something like X-Sendfile, # just comment this out and Rails will serve the files # See everything in the log (default is :info) # config.log_level = :debug # Use a different logger for distributed setups # config.logger = SyslogLogger.new # Use a different cache store in production # config.cache_store = :mem_cache_store # Disable Rails's static asset server # In production, Apache or nginx will already do this config.serve_static_assets = false # Enable serving of images, stylesheets, and javascripts from an asset server # config.action_controller.asset_host = "http://assets.example.com" # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false # Enable threaded mode config.threadsafe! # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation can not be found) config.i18n.fallbacks = true config.active_support.deprecation = :notify end passenger-4.0.37/test/stub/rails3.0/config/environments/test.rb000644 000765 000024 00000002612 12233035540 025004 0ustar00honglistaff000000 000000 Empty::Application.configure do # Settings specified here will take precedence over those in config/environment.rb # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! config.cache_classes = true # Log error messages when you accidentally call methods on nil. config.whiny_nils = true # Show full error reports and disable caching config.consider_all_requests_local = true config.action_controller.perform_caching = false # Raise exceptions instead of rendering exception templates config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment config.action_controller.allow_forgery_protection = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test # Use SQL instead of Active Record's schema dumper when creating the test database. # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql end passenger-4.0.37/test/stub/rails3.0/app/controllers/000755 000765 000024 00000000000 12233035540 022631 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/app/helpers/000755 000765 000024 00000000000 12233035540 021725 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/app/models/000755 000765 000024 00000000000 12233035540 021546 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/app/views/000755 000765 000024 00000000000 12233035540 021420 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/app/views/layouts/000755 000765 000024 00000000000 12233035540 023120 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails3.0/app/views/layouts/application.html.erb000644 000765 000024 00000000306 12233035540 027057 0ustar00honglistaff000000 000000 Empty <%= stylesheet_link_tag :all %> <%= javascript_include_tag :defaults %> <%= csrf_meta_tag %> <%= yield %> passenger-4.0.37/test/stub/rails3.0/app/helpers/application_helper.rb000644 000765 000024 00000000035 12233035540 026112 0ustar00honglistaff000000 000000 module ApplicationHelper end passenger-4.0.37/test/stub/rails3.0/app/controllers/application_controller.rb000644 000765 000024 00000000147 12233035540 027726 0ustar00honglistaff000000 000000 class ApplicationController < ActionController::Base protect_from_forgery layout 'application' end passenger-4.0.37/test/stub/rails2.3-mycook/app/000755 000765 000024 00000000000 12233035540 021564 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/config/000755 000765 000024 00000000000 12233035540 022251 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/log/000755 000765 000024 00000000000 12233035540 021565 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/public/000755 000765 000024 00000000000 12233035540 022262 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/Rakefile000644 000765 000024 00000000463 12233035540 022454 0ustar00honglistaff000000 000000 # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require(File.join(File.dirname(__FILE__), 'config', 'boot')) require 'rake' require 'rake/testtask' require 'rake/rdoctask' require 'tasks/rails' passenger-4.0.37/test/stub/rails2.3-mycook/script/000755 000765 000024 00000000000 12233035540 022310 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/sites/000755 000765 000024 00000000000 12233035540 022133 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/tmp/000755 000765 000024 00000000000 12233035540 021604 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/tmp/cache/000755 000765 000024 00000000000 12233035540 022647 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/tmp/pids/000755 000765 000024 00000000000 12233035540 022543 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/tmp/sessions/000755 000765 000024 00000000000 12233035540 023452 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/tmp/sockets/000755 000765 000024 00000000000 12233035540 023257 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/tmp/sockets/useless.txt000644 000765 000024 00000000075 12233035540 025505 0ustar00honglistaff000000 000000 This useless file prevents git from removing this directory. passenger-4.0.37/test/stub/rails2.3-mycook/tmp/sessions/useless.txt000644 000765 000024 00000000075 12233035540 025700 0ustar00honglistaff000000 000000 This useless file prevents git from removing this directory. passenger-4.0.37/test/stub/rails2.3-mycook/tmp/pids/useless.txt000644 000765 000024 00000000075 12233035540 024771 0ustar00honglistaff000000 000000 This useless file prevents git from removing this directory. passenger-4.0.37/test/stub/rails2.3-mycook/tmp/cache/useless.txt000644 000765 000024 00000000075 12233035540 025075 0ustar00honglistaff000000 000000 This useless file prevents git from removing this directory. passenger-4.0.37/test/stub/rails2.3-mycook/sites/some.site/000755 000765 000024 00000000000 12233035540 024041 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/sites/some.site/public/000755 000765 000024 00000000000 12233035540 025317 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/sites/some.site/public/uploads.html000644 000765 000024 00000000736 12233035540 027662 0ustar00honglistaff000000 000000 MyCook™ beta
This is the cached version of some.site/public/uploads.
passenger-4.0.37/test/stub/rails2.3-mycook/sites/some.site/public/welcome/000755 000765 000024 00000000000 12233035540 026752 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/sites/some.site/public/welcome/cached.html000644 000765 000024 00000000745 12233035540 031055 0ustar00honglistaff000000 000000 MyCook™ beta
This is the cached version of some.site/public/welcome/cached.
passenger-4.0.37/test/stub/rails2.3-mycook/script/about000755 000765 000024 00000000140 12233035540 023343 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/about' passenger-4.0.37/test/stub/rails2.3-mycook/script/console000755 000765 000024 00000000142 12233035540 023675 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/console' passenger-4.0.37/test/stub/rails2.3-mycook/script/dbconsole000755 000765 000024 00000000144 12233035540 024205 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/dbconsole' passenger-4.0.37/test/stub/rails2.3-mycook/script/destroy000755 000765 000024 00000000142 12233035540 023724 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/destroy' passenger-4.0.37/test/stub/rails2.3-mycook/script/generate000755 000765 000024 00000000143 12233035540 024026 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/generate' passenger-4.0.37/test/stub/rails2.3-mycook/script/performance/000755 000765 000024 00000000000 12233035540 024611 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/script/plugin000755 000765 000024 00000000141 12233035540 023530 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/plugin' passenger-4.0.37/test/stub/rails2.3-mycook/script/process/000755 000765 000024 00000000000 12233035540 023766 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/script/runner000755 000765 000024 00000000141 12233035540 023543 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/runner' passenger-4.0.37/test/stub/rails2.3-mycook/script/server000755 000765 000024 00000000141 12233035540 023540 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/server' passenger-4.0.37/test/stub/rails2.3-mycook/script/process/inspector000755 000765 000024 00000000157 12233035540 025725 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/inspector' passenger-4.0.37/test/stub/rails2.3-mycook/script/process/reaper000755 000765 000024 00000000154 12233035540 025172 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/reaper' passenger-4.0.37/test/stub/rails2.3-mycook/script/process/spawner000755 000765 000024 00000000155 12233035540 025374 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/spawner' passenger-4.0.37/test/stub/rails2.3-mycook/script/performance/benchmarker000755 000765 000024 00000000165 12233035540 027022 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/benchmarker' passenger-4.0.37/test/stub/rails2.3-mycook/script/performance/profiler000755 000765 000024 00000000162 12233035540 026360 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/profiler' passenger-4.0.37/test/stub/rails2.3-mycook/script/performance/request000755 000765 000024 00000000161 12233035540 026225 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/request' passenger-4.0.37/test/stub/rails2.3-mycook/public/.htaccess000644 000765 000024 00000002411 12233035540 024056 0ustar00honglistaff000000 000000 # General Apache options AddHandler fastcgi-script .fcgi AddHandler cgi-script .cgi Options +FollowSymLinks +ExecCGI # If you don't want Rails to look in certain directories, # use the following rewrite rules so that Apache won't rewrite certain requests # # Example: # RewriteCond %{REQUEST_URI} ^/notrails.* # RewriteRule .* - [L] # Redirect all requests not available on the filesystem to Rails # By default the cgi dispatcher is used which is very slow # # For better performance replace the dispatcher with the fastcgi one # # Example: # RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] RewriteEngine On # If your Rails application is accessed via an Alias directive, # then you MUST also set the RewriteBase in this htaccess file. # # Example: # Alias /myrailsapp /path/to/myrailsapp/public # RewriteBase /myrailsapp RewriteRule ^$ index.html [QSA] #RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.cgi [QSA,L] # In case Rails experiences terminal errors # Instead of displaying this message you can supply a file here which will be rendered instead # # Example: # ErrorDocument 500 /500.html ErrorDocument 500 "

Application error

Rails application failed to start properly" passenger-4.0.37/test/stub/rails2.3-mycook/public/404.html000644 000765 000024 00000001663 12233035540 023465 0ustar00honglistaff000000 000000 The page you were looking for doesn't exist (404)

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

passenger-4.0.37/test/stub/rails2.3-mycook/public/422.html000644 000765 000024 00000001642 12233035540 023462 0ustar00honglistaff000000 000000 The change you wanted was rejected (422)

The change you wanted was rejected.

Maybe you tried to change something you didn't have access to.

passenger-4.0.37/test/stub/rails2.3-mycook/public/500.html000644 000765 000024 00000001663 12233035540 023462 0ustar00honglistaff000000 000000 We're sorry, but something went wrong (500)

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

passenger-4.0.37/test/stub/rails2.3-mycook/public/dispatch.cgi000755 000765 000024 00000000736 12233035540 024556 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired require "dispatcher" ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) Dispatcher.dispatch passenger-4.0.37/test/stub/rails2.3-mycook/public/dispatch.fcgi000755 000765 000024 00000001533 12233035540 024720 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # # You may specify the path to the FastCGI crash log (a log of unhandled # exceptions which forced the FastCGI instance to exit, great for debugging) # and the number of requests to process before running garbage collection. # # By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log # and the GC period is nil (turned off). A reasonable number of requests # could range from 10-100 depending on the memory footprint of your app. # # Example: # # Default log path, normal GC behavior. # RailsFCGIHandler.process! # # # Default log path, 50 requests between GC. # RailsFCGIHandler.process! nil, 50 # # # Custom log path, normal GC behavior. # RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log' # require File.dirname(__FILE__) + "/../config/environment" require 'fcgi_handler' RailsFCGIHandler.process! passenger-4.0.37/test/stub/rails2.3-mycook/public/dispatch.rb000755 000765 000024 00000000736 12233035540 024417 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: # "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired require "dispatcher" ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) Dispatcher.dispatch passenger-4.0.37/test/stub/rails2.3-mycook/public/favicon.ico000644 000765 000024 00000000000 12233035540 024371 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/public/images/000755 000765 000024 00000000000 12233035540 023527 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/public/robots.txt000644 000765 000024 00000000314 12233035540 024331 0ustar00honglistaff000000 000000 # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file # # To ban all spiders from the entire site uncomment the next two lines: # User-Agent: * # Disallow: / passenger-4.0.37/test/stub/rails2.3-mycook/public/uploads/000755 000765 000024 00000000000 12233035540 023731 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/public/uploads.html000644 000765 000024 00000000716 12233035540 024623 0ustar00honglistaff000000 000000 MyCook™ beta
This is the cached version of /uploads.
passenger-4.0.37/test/stub/rails2.3-mycook/public/welcome/000755 000765 000024 00000000000 12233035540 023715 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/public/welcome/cached.html000644 000765 000024 00000000725 12233035540 026016 0ustar00honglistaff000000 000000 MyCook™ beta
This is the cached version of /welcome/cached.
passenger-4.0.37/test/stub/rails2.3-mycook/public/uploads/.gitignore000644 000765 000024 00000000000 12233035540 025707 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/public/images/angrywizard.gif000644 000765 000024 00000030105 12233035540 026556 0ustar00honglistaff000000 000000 GIF89abUśûûûaààà ,723EKEncS껌ŸŸŸ©‰h±·œ€%„8uLœÆÏA% Ąž}Šșîîî•‚ ÿ    ·    ­ÿă  !ÿ NETSCAPE2.0!ù ,bUțH° Áƒ*\ȰĄĂ‡#JœH±ąĆ‹3jÜȱŁÇ CŠIȀɓ(SȘ\ÉȄ˗0cʜIłŠÍ–ži2'ž% đèȜŠ 9 @Ò„!‘€P§O«v”:UkÇ«X•zÍ۫α `uJ-F°fĘbT»¶«ÜŠpăȚ„H·nÛœóš ž€…}ëf5hà0;o(Ș@ÁÂȊí,Pùqç› 8`à@äƒÔêÄÌV)dϖK0làôË8‹v Úđh†,0žm  ,%XȘč }W%Č 0@ÙZzëpP À@] Œš(„:šhzŸRŠ@š€šžëL‰95 ‚Ú–˜šŽ‡"Š,Č”Œ°b&:ë±ÂzJà+hbU “K)Æ©ù€ ú Ș ™|ò™*SÉ>ˆl·@źœ&ĂȆ7gÈÍŃTòzŠú;ń݇ì4Ă%zj±Jűők‡Ś4Ć<śœŁò75J àêÓ!/ ÁÖhśÜ"u8±Àú¶­¶č ZŠ7țČ_sz–L‚9™ÀȚ[ d· ą êËpĂ$7"+ș·á.kŒ(ÛOS:vJr“čÚk[* „ž&áA7úiȚłÔ9ä$bî4šŁ«Ęôą;„V€“æÉÔy°Çî4èk+>ÛdÀH/L}ʋÌ ŽŸví?S àńÊ 9›@Ê„SóűÊÀ-TË”óe1àüZè+ž@]p+Śąú›“—ûŠ ”»Đz_]ł=ä€uœĂ ÿ2Ößù%!ùsĘZÈÀ źćQhiđhÁ bĐ+Rá;èÁȚl‚N! 3óÁzá+…ä ÿâBІ+ÌAÀCŁ9pƒÁ TawĆĂÎä‡@ĄH”Ù€9lÉžPžAÊĐ/ÆqVo‚Ä q‰t– {rĂZTÌł˜Fł8 95čŠ}e€6ČĐ8nd#fšx“œ@à€ŹVNôŰĒáń‚p4 ùGä<ńŒ€ŹcYˆ’œ,ê*șY’a*Sî<§Z€œ`óíÀÉHÀQ„ ó·Qú15È gŸŽ“jŐałÙ^@ÉÈEț„—œ„À(u”œä€É˜\ßH!ù ,bUțH° Áƒ*\ȰĄĂ‡#JœH±ąĆ‹3jÜȱŁÇ CŠIȀɓ(SȘ\ÉȄ˗0cʜIłŠÍ›8AP 'ɝűčSèА;=ú1éŠ đjÇR§.”š1éÔȘ\5fŐV#©_·–„x-Ő”Ç~…k±­[°t#bu;7ï@Úœ«°@kèé@‚†rŃMhàÀb–kbvÀÀㅃùȘ%èč@ćĆ„_ à ÀæÓŠ9ŒLŰ`ÏҎ/ČČžPü@â‚NœJîyx5ÏáĂ ž6łÀă­1ś]°@‚Šțßt5 p_7N=æôÊŚçX‚ Ÿ/ O^ș f:v|gÚq,PÜzëę& °@PűÀ…ŠU˜_z< @‹pĄ|Śa–`KÀù—à‹ń dą}P`pńĆ·ÀH đißj,Băz%đ Ž%(€c 8ŠÀd™ć  €t*ǜK%"žf˜ö@ à—Á Yâg߆BÈ Lź…ùŠR;f™@”€A_”rȘ%ˆ”éăM­MśâjX8"fjW™ȚíűÀ§\˜ŸŁNvÓtœ`À ,0A~țœčšgßÙŚ*’UN@Ąe@š5^x_«À%ž~XŒÉZ#ș j†æuè$ZŠê€} …nyW)–#Š—æpȚ«ț7Șa>Iź[jKą˜•ćWÀlűÀ@lŰæŽcòÀŒh1đ+°’~‰- hËe›=ZH*‘#<Űü!`śaXg…öiiČ iæÚTőiûßÉ€ÒHòɋl0_8ș„w‹’Ș-° *Ęyç•x^M+ €Z’Üq–b鯖Zzò…Íź”t…ĄFLó“ä~-vÀ=V˜uJ+€_ùĘçŽŰŸțì1jC/V”{äĘuĄț܆mòH·ÜbƒÆŐEòŰMKàwÀbśX—6ż†^.A¶ 8ź(Í­ÙSÊ3EíˆËĘêȂŚ9-ă#Vn9ÎŰźž§JЀç­âzĆ&# ;KŽ1@”¶ƒĂĘùò‹’h·œŰ.p6Jv!|zš«Óœ{à„7mÚŃ€9ăđh'ìVЀßȚùíÚ9ùŻű­ÆœPő‘O}V hŹ$ìMÀrwˆžmÀGбä/!b\4Šä Šrt‰HôXèS*Îș%Łž Ž ö;‰\žAȘ䭄iAÈô$ž±ƒQ…%4•UŒr@Âđ†2dÊ`æeĂą0‡ÜC‰ űBâ%ˆ(ŹáƊĂ:‹6 Ëß}èȚ8àŠ5b„èB&ò„<æ!ϱ8“œ$q‰Kôą ù3òÜD‹8ăb©8žÒÄ)߃À ăžA6îQ2y#QČëŒèKì#éÇ6’i€€$'Y,ˏçÂÙ"ÇD›Lò“’äy‚òÉ.e%(Dccю‚*$Ç(ŃáÔ'‰ÂŁ æKVʔŒTä˜ÒđÄ/‡‰äy,ɓ/„Ź’Ò`ìVKŠT” €4? ́œ‹h< 6%™Í!ù ,bUțH° Áƒ*\ȰĄĂ‡#JœH±ąĆ‹3jÜȱŁÇ CŠIȀɓ(SȘ\ÉȄ˗0cʜIłŠÍ›8sê|X€@# 4€PąE?À4éGĄ8ő8 @Ô©«ZEŠ5ŁÖ«]œZĘ#±Q薝x퀟k)~”*5.€ „çe†>.pêWC ĆâKŠ–ŠźéŁ—ł*À 0ȘžR8bU À7-LèŽćh†èhç@0ß<€ÀčÚiŠUéźS»cnE.ŰÓwÚî›-Ż„ˆ—NÖ"Ǎș ™m ő nł ź—ș–Áh1àh¶("¶ï€L łœö*îŠ8ioIàš ìZsÆ„îšȘM:«™±—JšŸ5ÂZt©§êGÓqc-kç©MŸêeŃâmă‚ÉŃf¶À)am•Í»JIȘłÎú˜ńŁuXŽŸ ÊŽ”țŰ8òÔm.8à:9ąȚLč”áÖOo-śà„yáÙKĄmÒȚÛù vł‚K Ü€B.éd–›4Ś ùŸŻ~7Ż–~ÒbAc ùœ€çŸ ¶‰òYĘÒb+í»©ęšš»ë„›LlAÒ(€çDëè9è ÿ°ïCÎÄßépáÎæš=Ü­Ï#m_# {PŹfM”łƒ[ß»à^Ó^ Ÿ¶V ßÚJ…»òíŽwڃÁ„"EMțC æv&ÀێyèYöŚ„Ń äDúc«*8ÀŐ=Ë3ńù‹ABű’čđ=L Ô6‚ô)o‰àìFAŸèCé>Œq€@đœ0ˆHÜÎû`Ò1‰HŹaRăDî ŠïqŠÎzXE,*1)«â[űD,.Ń%[€àŐèE%èL:\Éư*ZŃ@"]€™š€1ed,#wÆ Ž/őJń˜GŰńL5Ù[uÔcŠ?æq;TdZ➥@à“ ,€œ2 GŹé“RÌ (WùÉ3Ńf(«Źdl̖GŽĆ2GÂKjr›F­ÒlœÔÉ|‚“šà€0€"æR‚čOÒf”ÎńÉ] PjHšv™&+YùÀmź2›ń9 gs¶OŽ$!ù ,bUțH° Áƒ*\ȰĄĂ‡#JœH±ąĆ‹3jÜȱŁÇ CŠIȀɓ(SȘ\ÉR€ƒ–0 Fhł&ŸtHÓŠÄ=ì,ŰSàP™E}>ÌiôèÀąBFpȘÔ Đš0˜ô©ŃźO‹R­JèÍ­Y2Ëu§YČ Ąș=ˆÓ[­vÙÂŽ›đ%ÖŹWâ%h7çX›yNœ‰śïۄôŒ@Y/ܰ4ó.~|°À€2[ŸŹĐÎż#Èê—tEÎ=X•oiŚR!€«âĂ^Ë·©72o\yŐ:șfqȚłƒ3| e Ù<9BŰț(°v€éŰ*PÀ§AĐg§o‹pœűőBQ4 t§‚/pÀ|„=_|«ù–ĐzŚ ˆS’$”ü瀀0[m]‚ú „œ Tš€V x’hHą”( †qœt ‚¶uVbŒ1Áá™T€ žűŸ€`xűáh3VxÀ-*Iچ5€€’ÿ)IąŠ ĘˆàB ă,ĐÀxÀßb!Ù%SÖi&–8ù!C.à'‘,ą™3áiQŚiEd—Jˆh„‰‰`w)đ€h‚gèE(€@š J„3@€j8„燔&TŠțSNž)EŠiȚœ.🇟FЁ«Đê|ă!:ŁSúXGvíäl J§™ Ì¶Ę°Šž*©|ÈeëYŻX§©†hȚWN­lŠw] mœöZ,h`œŸÍVdȄ1wÒL” T!©x8" 'À<@Â,€@ÄïË0|€7Ł­…–H`yA|Œ†ÀĂ °ÀŒ ép›? €Œă-`@ʧ~f{]%ô{’Ą<›‚&01O螙ƒ¶|óÊ °°ŒôÒÈûéĆÀŚ8:œ€@ S ïz$‚·€.7ÜŠqĐ1à@~ÍșQa0€àțuLÓë­A™ |\$6ł­űNê=wZȚĄT—yǝ7rV3xČuą ­ŐŠ đnæ DF)uvcÔ|zçę5đ>à§ÎJÂúbŐ3 zìŠìë@[q=SŹóö:ì LŒŰŻ:-šÚ+^ú­óL˜[Íq˜˜`3`@ÄÀ0ÛŚ0űL ”ŰRËöžt‹URe€Ęűúq‚öœöÍž žP_è$öżïC2WœŽ"”V7}3€ôÀs*€wlcß25¶Elg’ŽIÀÖœ/>Śa›Ő^u$« |‰ŚÊäU5Sç+’ŁJ‚‡eđțˆjx‡€}ÍLj.Kœìw±¶ío‹Œăą€—œ$ĆMFә3X5ĘœŃbT#bŻ•»†č)4©ËÈy ą'ŠIŹ‹$'9I ŒGŒ"ž“pł,ȘńŠŃŁd-ÆŒń ôZ–yž¶IŠÁ13|ăA•ŠQZ b‚rS“€I;v„•đeèPKanQv:ëÉ"S2ČMb̘ÄLœËˆ 1HêìQЊ"L 6=Y1˜|@1§)Mcș,_ cQ엷 șLÇdÛ쐙+s‚ČŽvț„œx,wÆŠsN(8Đ|ù€JD©ít/q +ç$ÿ”ŠˆIóyĘaÄBv’ÉÌCĘ Ę8ŻűÏ9I—û›Țxđ(źÄYƌ› /Š«jZ3Ž«9ŐŒtÆÒH±ŽM>i\ő>IÉÒMj Š*€Œò»˜8Ôu ć(żhŽŽȘ[@ GU·î=ĐZlj“j°HmŐ&Ü3ȚWÇÊÖÙpôŹ5ѓ żșÖ¶F7á!TçjW”YŻ"ÒëńÔÚŚűÀ.zuĘęîWX«K5+%‹ÆWĆÚ”^ęòĘeÆ2¶°Ÿ aUŒƒ/@ ł”5#fWźÏv%ČayĄ™ÆÙz}h”ŒŠ,Y"Țú¶@fMYUÔúń­r{ëڞ™Ö·Žć™¶ê„SÀJ‰QŚYOF‹T"ćjKĄ€-ˆŸž‹¶ÎŹKh+QSĂ«›àš62ʗ» Đ&ú¶)©ì%ÓrśÛ­ę*7żaʖ¶Ț:àȚžŠ$!ù ,bUțH° Áƒ :ˆà ĄĂ‡#Jœ1BŠ3jÜh°ÁƉ 8†äH2b„‘?&D‰‘aɗUŠ|È@ƒšOÂ$é aΚ8 ČŒYqçK | ôšt)́Dê4 éÀ©Pƒ t€R+A—Y©’Œ ,Ԙ#eæÈիۉ2=†yQmA‹7±Ÿ%èv­Â“dzÔËśc_±(êU<óîá»*ăĘ+ńfTč C~T+7ŁÊ“M)o |ÒąÏÀ?‹Í”ŽÈ‘šW#6‹‘ìcÙ"íVîzÛ)nœ…J֝0ôÙ߉GŒ]čŁEäčŽĘš–0ôČ țU©őëÊț0`ûƅWE€Èüáxź8ÿkü•I'Îw  >Â̍WȚqĐúgSCáÖ[4äÀ,Ś @ăè%T…(pÀzÌ7wÊ'bO (€ qÉ=4@ °T_PűaVXօiU@ìè€ đĄTÎH#| PbŒH€ˆ<7]t"F8ĄHòwŒ_•!<ˆa‹ ©€WR˜ąHMx@’UÊčbE5à$ù=ôáˆH`šŽČ—qȚih‹†ú˜ŃŸ5NTe‹"j@(Űwś 4䑎:ąFĐšȘ–šJĄĄțH0˜s“}jŃGüœ©«ó ©‚ù©*šćhè Ä*AÚaÇw)I˜©«J)`KPȘĂVȘ_žÈFú,_”ĘúQ‰8°€©"*°*yÚÄm·ŹÊ§Ęœ9Nëé\6”[h„Yôè›äĄŻ@”źšĐ™Ș6jš”ę QkVĘ۝šú:9™ôu«pBä…<€źw.j] ő”čj&Ăيç1šűçn*PsŒFĘjPÂȘî\°3è„ U­$ѶÔI0@ïÁ܆<”ŒŽÔJ „%\æź|‘Qw ACŁJYd )„ÇćĄ["œZ{Ìőrœ%jțX~2 őȘ\ <`@ Ȕ $°éËűˆnÂwó —T>ő­Șß#Nx€țÀ `À°ĘöélZbäćQ*uœ‚áÄr~Ș€9~ÿMc‰ł €ă`BjŒ îžv(~-çŒÓ“C­ÊŻöî{ÀđšżźD*Àùç?`űŒś>ŹŃÿ…Ê‘LŰo=ïŽ?|ù-Nđ›‡;éۖž3ioX]óMżx’…8逛#€0đ”Èu»œ@‡Ÿó%`FèŠÚęè,ù05™‘ö¶Ç€LY„ĂÔÀ4H(Â- ƒËaă„ő7éÙ'=țÔYŰæÊ¶9Ä  p‘{ŐĄt†$Ży„CĂĐDDoEŒ%@ò‹ÍfŠ*#"`xȘËù €Æ…Nu;\ÁžšĄé]Zjšb· pÄ/î|ЃL'.}7œ ŃžèĂè`‘caZđ„aYç+ŠäœáĘpt©KcäÜVlÌI ÙÍsœFœny/tœÎ\v€¶}u„ȐșÂ=ÀZă "W F„lŠ€c`ŹHĘL ˜€2ÏšC¶™bˍLG"Àƒ€ÛTT‡ŸL6źƒà, …ąŻ©š]DćŰAĂy†'-sّ]iQöț@ÂRwÍ2Ż›Û|úÎŰÁÔùêWÖ"!)”(‰$l€ “ŚMdÁ} Óá(:жu­3qËmVÆ2öSž”§JÁiŃÖ}4‹ŃtèûJJKä “']iIÇI|ùI[_+IoÖșv6ïŽà|@Ź,Q†>ÍJŽő@BąŠT§”@<±zDBÓ >éJŠ”č«JèèŽŠŹŠvÔ $ș§MÄڑàÌKjšLÜÛ™ŹˆÆÊ­\àŠéKLŐ ô›@ÿűځJ l”hK“š8ŽźX*™“gòIŸì1@z dŐ'ÏŃ% ’‘L(ăn˜Ą%ê°Ôț«g ŠÖ±Kœí<ᎷĄRR…„«c&";©ôŽŐjcz80]ÓpRê-|œ(4áò’žŒ!ÔŰźCR2ššèăZȘua”ôS•Jn5››¶ąJ —Ô"ó"âępvUć±±FÚĘ{—ž•dĘúÛęȚ4Bmœ…-‰adÄFÎ)x{ÿ„Y9Ą%ŚÉqX\p†ÛXΝÀŠ/ ¶ŸûÜ7b”<%úÍk•âìjW„†›ÈnVÈ· Ć-Æ1ïD<â‚Aű:bŸé5Ú­h;Ö1ûà‡ä&qïQt2!­†Š;č<=©2~ Ç2ïq’^†ńfÛè„eOYÌ1łœaŹò˜ÙkŒ[Cö+8S€QÓ2]‹üŠț˜ù^ôôs€šˆ©<• Ab,ôOm”ńL’Éă1oMuZ›1Š4L çRÇԄ.łš+Đ{!_z€Żh!ù ,bUțH° Áƒ*\ȰĄĂ‡#JœH±ąĆ‹3jÜȱŁÇ CŠIȀɓ(SȘ\ÉR€ƒ–0 Fhł&ŸtHÓŠÄ=ì,ŰSàP™E}>ÌiôèÀąBFpȘÔ Đš0˜ô©ŃźO‹R­JèÍ­Y2Ëu§YČ Ąș=ˆÓ[­vÙÂŽ›đ%ÖŹWâ%h7çX›yNœ‰śïۄôŒ@Y/ܰ4ó.~|°À€2[ŸŹĐÎż#Èê—tEÎ=X•oiŚR!€«âĂ^Ë·©72o\yŐ:șfqȚłƒ3| e Ù<9BŰț(°v€éŰ*PÀ§AĐg§o‹pœűőBQ4 t§‚/pÀ|„=_|«ù–ĐzŚ ˆS’$”ü瀀0[m]‚ú „œ Tš€V x’hHą”( †qœt ‚¶uVbŒ1Áá™T€ žűŸ€`xűáh3VxÀ-*Iچ5€€’ÿ)IąŠ ĘˆàB ă,ĐÀxÀßb!Ù%SÖi&–8ù!C.à'‘,ą™3áiQŚiEd—Jˆh„‰‰`w)đ€h‚gèE(€@š J„3@€j8„燔&TŠțSNž)EŠiȚœ.🇟FЁ«Đê|ă!:ŁSúXGvíäl J§™ Ì¶Ę°Šž*©|ÈeëYŻX§©†hȚWN­lŠw] mœöZ,h`œŸÍVdȄ1wÒL” T!©x8" 'À<@Â,€@ÄïË0|€7Ł­…–H`yA|Œ†ÀĂ °ÀŒ ép›? €Œă-`@ʧ~f{]%ô{’Ą<›‚&01O螙ƒ¶|óÊ °°ŒôÒÈûéĆÀŚ8:œ€@ S ïz$‚·€.7ÜŠqĐ1à@~ÍșQa0€àțuLÓë­A™ |\$6ł­űNê=wZȚĄT—yǝ7rV3xČuą ­ŐŠ đnæ DF)uvcÔ|zçę5đ>à§ÎJÂúbŐ3 zìŠìë@[q=SŹóö:ì LŒŰŻ:-šÚ+^ú­óL˜[Íq˜˜`3`@ÄÀ0ÛŚ0űL ”ŰRËöžt‹URe€Ęűúq‚öœöÍž žP_è$öżïC2WœŽ"”V7}3€ôÀs*€wlcß25¶Elg’ŽIÀÖœ/>Śa›Ő^u$« |‰ŚÊäU5Sç+’ŁJ‚‡eđțˆjx‡€}ÍLj.Kœìw±¶ío‹Œăą€—œ$ĆMFә3X5ĘœŃbT#bŻ•»†č)4©ËÈy ą'ŠIŹ‹$'9I ŒGŒ"ž“pł,ȘńŠŃŁd-ÆŒń ôZ–yž¶IŠÁ13|ăA•ŠQZ b‚rS“€I;v„•đeèPKanQv:ëÉ"S2ČMb̘ÄLœËˆ 1HêìQЊ"L 6=Y1˜|@1§)Mcș,_ cQ엷 șLÇdÛ쐙+s‚ČŽvț„œx,wÆŠsN(8Đ|ù€JD©ít/q +ç$ÿ”ŠˆIóyĘaÄBv’ÉÌCĘ Ę8ŻűÏ9I—û›Țxđ(źÄYƌ› /Š«jZ3Ž«9ŐŒtÆÒH±ŽM>i\ő>IÉÒMj Š*€Œò»˜8Ôu ć(żhŽŽȘ[@ GU·î=ĐZlj“j°HmŐ&Ü3ȚWÇÊÖÙpôŹ5ѓ żșÖ¶F7á!TçjW”YŻ"ÒëńÔÚŚűÀ.zuĘęîWX«K5+%‹ÆWĆÚ”^ęòĘeÆ2¶°Ÿ aUŒƒ/@ ł”5#fWźÏv%ČayĄ™ÆÙz}h”ŒŠ,Y"Țú¶@fMYUÔúń­r{ëڞ™Ö·Žć™¶ê„SÀJ‰QŚYOF‹T"ćjKĄ€-ˆŸž‹¶ÎŹKh+QSĂ«›àš62ʗ» Đ&ú¶)©ì%ÓrśÛ­ę*7żaʖ¶Ț:àȚžŠ$!ù ,bUțH° Áƒ*\ȰĄĂ‡#JœH±ąĆ‹3jÜȱŁÇ CŠIȀɓ(SȘ\ÉȄ˗0cʜIłŠÍ›8sê|X€@# 4€PąE?À4éGĄ8ő8 @Ô©«ZEŠ5ŁÖ«]œZĘ#±Q薝x퀟k)~”*5.€ „çe†>.pêWC ĆâKŠ–ŠźéŁ—ł*À 0ȘžR8bU À7-LèŽćh†èhç@0ß<€ÀčÚiŠUéźS»cnE.ŰÓwÚî›-Ż„ˆ—NÖ"Ǎș ™m ő nł ź—ș–Áh1àh¶("¶ï€L łœö*îŠ8ioIàš ìZsÆ„îšȘM:«™±—JšŸ5ÂZt©§êGÓqc-kç©MŸêeŃâmă‚ÉŃf¶À)am•Í»JIȘłÎú˜ńŁuXŽŸ ÊŽ”țŰ8òÔm.8à:9ąȚLč”áÖOo-śà„yáÙKĄmÒȚÛù vł‚K Ü€B.éd–›4Ś ùŸŻ~7Ż–~ÒbAc ùœ€çŸ ¶‰òYĘÒb+í»©ęšš»ë„›LlAÒ(€çDëè9è ÿ°ïCÎÄßépáÎæš=Ü­Ï#m_# {PŹfM”łƒ[ß»à^Ó^ Ÿ¶V ßÚJ…»òíŽwڃÁ„"EMțC æv&ÀێyèYöŚ„Ń äDúc«*8ÀŐ=Ë3ńù‹ABű’čđ=L Ô6‚ô)o‰àìFAŸèCé>Œq€@đœ0ˆHÜÎû`Ò1‰HŹaRăDî ŠïqŠÎzXE,*1)«â[űD,.Ń%[€àŐèE%èL:\Éư*ZŃ@"]€™š€1ed,#wÆ Ž/őJń˜GŰńL5Ù[uÔcŠ?æq;TdZ➥@à“ ,€œ2 GŹé“RÌ (WùÉ3Ńf(«Źdl̖GŽĆ2GÂKjr›F­ÒlœÔÉ|‚“šà€0€"æR‚čOÒf”ÎńÉ] PjHšv™&+YùÀmź2›ń9 gs¶OŽ$!ù ,bUțH° Áƒ*\ȰĄĂ‡#JœH±ąĆ‹3jÜȱŁÇ CŠIȀɓ(SȘ\ÉȄ˗0cʜIłŠÍ›8AP 'ɝűčSèА;=ú1éŠ đjÇR§.”š1éÔȘ\5fŐV#©_·–„x-Ő”Ç~…k±­[°t#bu;7ï@Úœ«°@kèé@‚†rŃMhàÀb–kbvÀÀㅃùȘ%èč@ćĆ„_ à ÀæÓŠ9ŒLŰ`ÏҎ/ČČžPü@â‚NœJîyx5ÏáĂ ž6łÀă­1ś]°@‚Šțßt5 p_7N=æôÊŚçX‚ Ÿ/ O^ș f:v|gÚq,PÜzëę& °@PűÀ…ŠU˜_z< @‹pĄ|Śa–`KÀù—à‹ń dą}P`pńĆ·ÀH đißj,Băz%đ Ž%(€c 8ŠÀd™ć  €t*ǜK%"žf˜ö@ à—Á Yâg߆BÈ Lź…ùŠR;f™@”€A_”rȘ%ˆ”éăM­MśâjX8"fjW™ȚíűÀ§\˜ŸŁNvÓtœ`À ,0A~țœčšgßÙŚ*’UN@Ąe@š5^x_«À%ž~XŒÉZ#ș j†æuè$ZŠê€} …nyW)–#Š—æpȚ«ț7Șa>Iź[jKą˜•ćWÀlűÀ@lŰæŽcòÀŒh1đ+°’~‰- hËe›=ZH*‘#<Űü!`śaXg…öiiČ iæÚTőiûßÉ€ÒHòɋl0_8ș„w‹’Ș-° *Ęyç•x^M+ €Z’Üq–b鯖Zzò…Íź”t…ĄFLó“ä~-vÀ=V˜uJ+€_ùĘçŽŰŸțì1jC/V”{äĘuĄț܆mòH·ÜbƒÆŐEòŰMKàwÀbśX—6ż†^.A¶ 8ź(Í­ÙSÊ3EíˆËĘêȂŚ9-ă#Vn9ÎŰźž§JЀç­âzĆ&# ;KŽ1@”¶ƒĂĘùò‹’h·œŰ.p6Jv!|zš«Óœ{à„7mÚŃ€9ăđh'ìVЀßȚùíÚ9ùŻű­ÆœPő‘O}V hŹ$ìMÀrwˆžmÀGбä/!b\4Šä Šrt‰HôXèS*Îș%Łž Ž ö;‰\žAȘ䭄iAÈô$ž±ƒQ…%4•UŒr@Âđ†2dÊ`æeĂą0‡ÜC‰ űBâ%ˆ(ŹáƊĂ:‹6 Ëß}èȚ8àŠ5b„èB&ò„<æ!ϱ8“œ$q‰Kôą ù3òÜD‹8ăb©8žÒÄ)߃À ăžA6îQ2y#QČëŒèKì#éÇ6’i€€$'Y,ˏçÂÙ"ÇD›Lò“’äy‚òÉ.e%(Dccю‚*$Ç(ŃáÔ'‰ÂŁ æKVʔŒTä˜ÒđÄ/‡‰äy,ɓ/„Ź’Ò`ìVKŠT” €4? ́œ‹h< 6%™Í;passenger-4.0.37/test/stub/rails2.3-mycook/public/images/cookbook.gif000644 000765 000024 00000020076 12233035540 026031 0ustar00honglistaff000000 000000 GIF89aqmśÌŠ™ÓííÙłÙëĆžÿ™MÿżżÿÙÿÙćÿćÙÿòÌÿÿÿ!ù,qmțH° Áƒ*\ȰĄĂ‡#JœH±ąĆ‹3jÜȱŁÇ CŠIȀɓ(SȘ\É%€—0ޜIłŠÍ›85ƌ™ł§ÏŸ@ƒ†ÜčSšŃŁH“%ZT©Ó§PŁ~dJTȘŐ«Xł€ÊT«ŚŻ`W65È”jŰłhÓêK°ŹY”păÊEHŽY·<çêĘ«¶îVȘżćKž°Őșvr l`°áǐ…2-XàbÁŽ#kȚLs2eĆLcÎËčŽé”ž_fœùŽëŚS¶»z4iŰžsW”ę°hÛ/u țwÚŹÙ_ÎÜrÌÙł‘ȚŒ:ńĐ)KŸnœ{áÖ ațf?îûwcćȚÓś5ęùűòæ»ȘŸŸ6ő{ńÙ·'żMżżVûùáŚ|ńĄç߁R€ †fȚ~ü!(ĄS jÇ …D=(š|všT…䜠ƒrçá‰GQu߅úmŠ0ր⊌˜a‰ÓÉŽU1F6ă€"čŽ.F˜^Fö(Ś ÖŰäDæx’0)I“:™%”QrxUp $@e’VN‰„{[Æ„”_ÂИcVYf\\Ù($—]Ÿ˜bLoöég˜\Íù“œÉ`‹žçN6Ú§—‚vŠ(Du6y§škž7©dD9ê)œ›FŠZš Șeˆxź éą|~êéȘțąš„Ș:Rdê„/e !ĄIuêê§°ÆJÒŹŽÚ àĄ$f,PŸț ŹžÂ‚Dl±1‰ìșòˆTłÎ>KjŽĄ™fDۉ!źèș+uŹĐ(Ęú©-ž%M;nqϝzmȘȘB{· Ÿï›ËÒ둜ŽČ»ÂûbȘîŒÌ2*ŻÄńBl°H û»@Ææ&›mÁ6ÌÔÀ€j|1F'\«BöąéńÇß¶$2QÀ;°Ć'O%î“ Ó”sˆ<§«îș=ç4óN5Û\±É9ï–2È=t‘dJÚ*Á4'M2ÎMÇösš+ÔrÇŰN ČÌ SÒ5“ŹvŃ]oÄŰ,ï,àË0ÇìRțÚT±­ôÒLÇMnÊ*Śmîč`OM5Żÿò5Ûnż¶àk}M·ÏŚ‚-ŽâšV-Vڒûę7àzSŽŻć…‹-.~šűHż-zä%—nzC Š~ŚáŹăęđëƒÎÔìŽs}»ÓšëȚÖêN¶>Žń*œ6ń‘CüDs­úĘ":ÿ<đÒ ŽßŽcmûő†ŁŽ3±âyÿ;ű‹őߍŸCÙkț—{íûțęù:»šìèW=û”‰qÉÊÂ6+Œpî7֓•ăæGŸò™ÏsQÁËfò§żđôŻ,\G5ÁéA΂”ĂàSÆ€Ê9ùrKE·“Œ,…/ĘèêżAĆÉGț.œWœr5ĂMno{œÖPxÁfpˆGÜ èA*‘hQŹW sXA&Jî0Pìᑂ((^шhàűNèĆ/&ˆ+ ˆcØƯL1Pf<ă Ł·E2р>ĄŠ©:ÖqŒ„ šL†xF,~ź]l# Iąò’†„Ëy§FńT#Ù(I1O—L%&鞣äQ±“žìœ ĂĆ­5.±8% ĘąÊ^ʑ•ő™âaéÉ=J’€,%Ç$_:“TZ‰Š)ŰmҐ›k€1”ˆÌ[âr’§„ă3ÇéËmŠ„šèŹæP„‰Ílj3‚ŽìfÛp™K] •äțÌg9Á)‘túSëL€"­K4Ú°–Łôæ7—é5ŠèóĄûdèBțIQ€†òBă&’ úɃÊs‡^ägûań:«Æęn„O̔`ŻQ–ČțJLàí Ëò-2„èJ20㔾OvfYÌlæ1ç˜(jÆjvÛŹ9ÆdçÀrƟüșÚü6vÉžă%jčÂçđvÒL tPÙÌbűB)ŁĘMt©=ăw)YËۓŽo)ÍçŻČcÂìfË­7Ò,c)ŚïNìŸn¶cÛêêgÜ}śŸÉ]î•rڐіša©êćöÚŚo’w=[ïWĂߕnž*©ÒoŸĘËđșÙMđ-üàö”Âțu;kPu'xČÎïŠW±Ż­ŃŚŽ/Ś¶\ì—”ê›KÜȚ(OyžęŹçL»üćLŽùƒ4îÎbÚŒŠà Ż—EÎsa§OßN&ŠĐ‡ț’qĂäèWtÌ_Šn\oÒ7”úÔÿ€ĂŃm{w?/zĐ·Žő^RìkŸúŰùukś]1”xŽșCȚ§¶żûÎ7Ž»ÜŸő|7èFÇ;EőŸśœé"âl»«”ĆkŻ=L:ŹïŒ=KtL3Ÿńu_%Ź%tWȚò3·Čg4żù9ă<ĄŸO@èŁNrÌąYëGöăí~wÖOȚő{_:†5 çł/ÙÞíîyÿö‚ łÄȚž;ĘWțȚÓÈÿŸP{”dÿ#Ú?ĘÚm·iÛ?^}ŠŠsČ1 Ÿă»N|ïÿŸŻ‡=ŽÊn/óŰÚŃG=ëÇ~VçW+ő~Yò—z…T|ś—NùŚtkb\j6:”~H·‡xĄV˜€§·}„—fś‡Æ] Vsžh ”Ó'zčT•‚Šśò'|ô§z«ś€À‚(sź#„ăa;ƒ'ƒIƒ \7ˆ}9;Xw\„Aè˜w\EXêæ>€žèŚ…ƒ9žƒ
žl'š…)hvW)o„a!x$æ„1È„Đ‡WÖg]h8njˆuWÈzHȅțDXPËWhÎgJiWOLۄzh†€(…iX…úVˆ`wˆq(1”ˆ ä‚IˆĂÇbH‰ÂˆÊІkűxšŰoT‰([‹èwHU{ŁŠ‡cÈ6žp q†–hzŹŰŠH‹±ˆˆžx`vT·HpJXŠűŒ1S‰ÁžŠŹFÌ6&Č(‡/ö䧂çŒbž‡’(łŒŐXlĂHŒ&eÚžúŚąQ‡ÌیûeŽtô'„ŽŠtëE='ôXòˆˆC†„a֋í4V&ÏÜeëȎHÇˆŒòš+qx`˜ű8&ŽČù<őcbYíÔw0u‘iTĐgžHyŒWțOeń* ’„—}TH’x±Ztôvš’b„à’â;2i”ŸÈ넊ûŠƒĂž“Ź5DËèb@č‚tŰ|ą(F\AOI9QKɀ^甦8‘&ɉ> ŽUI$ْDéˆTÁ• éé8qßö”öǓ^ž|T™–ÿs•[ȑˆ|4űG5)—LÙ}ś6ˆ?(\ 8?ɗjé—i˜~8lœhAL`CÄrÚ§˜-g]™‚9‡Ùƒ–ïtoyS•i€¶™•˜cù™Áš/5š§ùZù@/čk—Y@çèŽcRu qIŒŚŐ˜{i›g€—č©›E™šć—jF%tčgÄ9D Éœ)ț©œ±€\šGç˜Y˜šÖLˆÉjű†Ù‰’ɝœs–ńètŁž•<äDȘćr•wĆxœŽi‹îYDìišò)lxQŸ«Éš·w$H–Ź…ŒÉűŸĘ荈žâé6䉟c|wÙ ˆĄ)šJVș5Ó(yЉ/`ČèĄ™‘!*ąJ:e|'ȘĄČčZÙ!Čô ,ÊYžæ$YV^#ê,™ù}‡ą)šŠ_=Ș’‰•Y˜Ś›‰Sˆnž™€Q9‹M*ï„Qz bGŸżRąWÚNH JÊ„]ږpxhnjŸ‰GŠȚ"ŠXˆ„ è†e) mА Š€Y€á‡țúű›gŠMiȘŠÁ՜}Žòö(„0Ék…*§q§xjŁ7…€Úš˜Y|z‡Ő·11ʐ–Š ‡JG‰*—žš–ȚÙ©Î)š‚I©Mô‹Xx}Șš§›ș§ÜŰȘ/öȘœz›§*f„Ș6¶z«ž EiȘ™°ê«Š ÍȘ8=çsĐlŠŹî'Ëú•ŃêŹ­Á*ŹyE§8tŹŰŠHČ­ÜźȚú‰ęÉźzLäjšçșVĆ©ŸZš… ZQÚźZ`¶[—©Bő XśŠŻÉZyțú«˜7”òUZÒŁ”ûWÀ‡z-<ș°Ë9P`: {4;± x°é€±«±±j„țśț±‰Č"Tk±&{ČšČÓ&”›łOstșš1;Č${lDFkł ‹łŽ*™éš|ôł ŽW›)WŽGkŽŻ§ŽŠ%lčŽOûł^)”@E”űúW{¶g‹MZ;pŚ$ź_ûˆ‡$¶2K¶àf”h{·x‹·Ąș¶ï ŠęȘ,’š‡3ù&a+·üJ·D»y»žŒ‹ŽđÊ·ä·›'+žŐZž† èY”vÛžž{”{ čCS‹“™•KŹWƒč™«ŻÖY¶0ńč°{ŽĄ+ș+y–*ŠTFƒ ±ș ‹źûș± »łK»™Ÿ·ÛłwčÈ»Ź[yÁŒĂKŒDźńi•Èț›ŒŸâDŒ‹ČÏ œ„+œăڰÇ;ƒk$™‹ČFĘëœß Ÿ%ȅ;+Ș§kčÙ;Br‹Ÿi;DëûŒŃëŸb\ۗžÛ^”eŸb[y'ûËżęëżȚűRlœVSżEsżìč\±ÀĘËšœ(~9CÓj{Ł|Á±Ûč,ŒíÛÁæVò;Ź€·\ü!”n±ÁŠ›ÂìÛ­,ŒEż]8ÀíuAł&œĂf‹Ă'ÜÀ,Ì”p*­Č*fB|©DœÁë‹ÂHÜžŒÄìTœ%Â",ĂŒŽEÌÀ5{ߛĆ;|y>)ÀŚ›]” …ő:Æd ŒfŒÁJœÆ’ûœ^|:Ÿ…ȘŰ*Çțs|Ä)\ƌ‹ÆxLșz<żg­~|«5ŹÁVÈpÆwŒĂˆ­{üƂG(ûȐ|Ă6Ì”\É|ɏ+B8} ĐɀÊtœÄTlÇ+œÆjLs€«ÈĄÊqÜÊź,ÈŁÌËhkȇüź\ŒÊ©Ź€ó'犿8Éw«żČ<ËŽLÌĆÌ&Ç,–ó·ÊÈÊÌÍ ÊzKGż|ÊŽŹ| Jč0ŒÈV·UČ͞ŒÄΌqŃŹĂă{FuËçlB§§©Ju잟ìÏT2üŒĆÂlɄ•ČŁjùŒ«›ÈÍWl”t4=Đ-ÍiŹęòĈĆčùjˆęĐ'Ń"-ĐÎÌíżOšțŃžœË#šrĘĐíÜÏè6Ò#MыëŸóÌĂÓbÎśLokąHÒÏékH4]Ô$íÍ7}Ò(ęŠMû =§9)tÓ MÔFmÔąÏâœÓ;ú5Š»ÒüŐÒà†wTRÇ3}ŐhŐZČ\mhȚÙƙÌÇŰ qúџŃhŚ"­Ö…ŹÔ„<•Dűt,ʙNùuÓ EUFzœŰ{]Ò&mŃĂLœf4„]ۋI±íäÎxÍۜ}Ԅܦ€üŚÆK4=Q—(Đ(KՒНĘڍęÙIÚąM̝uÍŠ”©mڰ'źĘÛ5íŰù Ù-Ù06ÁíœÛ6ęÍ ŸĘÜżÔ±-Üłțy”mÛâÜč­Â“üÍeáÜȚęܰĘ[ĘÖôlËĆMŸT’ÏŒ±9œÀLńĘđ ȚŻ\Ńò<ÏÔ<Ù3“î=vU<ßC ńàòœĘá<Ț\MÛűú]àAœÀĐ}¶áŻȚû]ßăLĘ .jó&B­Ùÿ|·.á|MßÙuAO=Ű1&>È~”!á#Nâ՜Ó‰âqMżÒâțâ/ă2܏-Ęà{Œ8źŃCU;êÍăœLàŰ ä>ăâmàŽl–ń+ŰŽ„6LÈÜ àPßR>ć5>ÏL}ć)źânæ[ŸȚțÚ_æBŽĘ%îÀyÙ”]ĘÆ•æjŸæț ȚïęæȚœç]Nćdn7f‡ćź%“|.Țƒță€îÜ‚ÎæD+ˆŽYŽćä‹ȚçmЏè‘.ç„~áđ™ăô»ÉqȚâîéŸé©Îé“Žäôux/Ÿćțç­îÛĄ.êc~àÔKë”nëÎä«N»î꫟ÜsÎÂÁ.ìÎö'Í[ìȘžë;‘ì͝ÜkÍÖmMÍŠźăÒźíÆ^ìȎíŒțêÿĘìÓ}Đ@œFąŚà|îăŚnîœĘëŸÎíÀțŁĐíGčìfmíóNï­mï°źî<„ßî’#î2 đ1!đźMđénđK Eœ’DäËŐȚéșńœ-ńž-ÛÒkE—žțè84MßđïèßÙ Úż~ŃUòJŐDÔÄđÎńßòŒęòíYć±Eóeó7ÿòáÜèÀó.î?êZ|»YÓ~AšËôÚęá!ÿđJßóVŸő±N»đő41ő)äO8żżï\î[żŰFÓä ŚgŸ(5ú<ś]?ćHżößő?ÿö-œvOƒ›zö’,é^źślò}ïśwȚî,űïnŰfśnű,űzMű–ïôm-ö3Qôt/ù“OùMŻé^ù˜ŸŚŠïöŒßűJŃ»DźF?ńyŸú‰ŸòțőtśûTžłĐ”oû·Ì0ï/ô áûeŻRÆțôĂOü™Ÿ­#žoœ ^ úšïëŃ/ęȘŸ”ŐïÔÊÙûÙúü„ÿęàțÉ7ț-Œç_ő‘/úÀŻțaȚńí_üèÿGÖ±@à@‚ D(PÀB†:L1ÁC -^lHQ#E=zÜèđăǐLžD™RćJ–-]Ÿ„Č$J™lȚęSçNž=}țTh΍ Eš4)F'>Ä5ŁL#;†Ž r#Lź]œ~ë’êPČe͞E‹SéZ¶m‘2m‘ąTșšȚ•™őêÖ°}ęțí[3í`…ËșEœŰ-\Š5Ö„‹WČHœ3_Ɯـ`Ý=țvhSńhÒ „Æ} òéÉwő"°ŹYölݜ?ßÆí“ąÒœ}/`ęĐńÜՑ[c­Ź‘öræbCæ†ĘfŃßŐ‡8ÜańșÇ7ŸæÛ\üűçÒÍwi]=bìÙSoçȚĘûkŰÊÇßgnûü~Č2Śÿg«=ރ/>ÈZŁ/<üÔŹ<țÜi2'\J@+20C»ŸÏ>?ŒÌA Ó( )DŃ4ㄓ‹8 ăC.9Š@€0GìFœ$K±G„äkìœ_\-ÆŹŹ1ÉźtÄŃŹ»ˆâŃG) ’E!‰äÎȑbSČ˗6jŽ'§ĂkJ3ȘҜǰ|žÇÏŽ|ĄNTż~ŐWwżnű5KLQëàđˆ—ż‡ìïp˜ƒęțh?öQ„€1 Úh.. |ÈhŽAi~Žàœ7©â)fƒ\PÿìÂȘ*NI ƇÂyX,lĄ _8ÀĜ†äQ!OZ“C"îđ{%DŒ(î‡DaÙb薙g‰L "žžĆ đˆ=ìUőwEź4q‹\ŒąÜŠx1¶ŃïŁĄψFb| xcőŻȘ0Ot„ąžGB’ź{ÒYÄûґœŒèÜžH: ’—Ä$ž˜&FJ2“n<@(E9JR–ò“xY;čÈG–Ò•Ż„e,eËLJlˆ«€dgčK^öÒ—Ł„dŽț…K4¶ń—ÇDf2wYÈŠM’˜u”Œ2„9MjÒò$ä3߆—jvӛß$e±yImÚ*$àDg:ÓiE žrćĘ@Ô9OzÖó—sg­àÉșâŐS™ö2À:)"JțćóûLâCü Đóxst#BÙšĐn2Ôą8áćî :L‰*e ŸŒhHƒ2Ë$mT•EÊGw)R– –Ÿ‘I9‰RŁhd–-Ćéœ(jJ˜QŠÎ€éDwêʜő.Ż,`~~šÍ äœálbQĂԚ—BP6K5(J7âÊ0J”tȚ‘eRÁ‚UČR…˜[ćȘœŠ=1ÎRŹ+)k\1™F,ӐkM 1í*țWŸnšCć%&êÈ^öŐ°~ćZ•éÎóœò—‡…l>«ŰjFv©ÈŽlfÉùŒ§ Tł—\ìgEËÔàu֞Ł}#5Q»Z ÒN&țä)kZYÙÖ–Ł„„,lśYuÚÖ·ŠDiu«ZˆÂö·Ç5ë_2\æ6wšÈ…źéê\êVw·wdKt—ÊÈÜZŚ»Öm?ÛÔìvś»çîíț#Zò&ÔŒè…ï<Ő[;ȶ·4o~ŃùÎQIÖŸÓ{Ż~,Íù*̐ÿ”ÎkŒ`↦q'EđúđË` ¶ÀÆ0'\a#•żÆ0U:çŹółÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $płd!sę#ű~<<+"ÀŸxÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽBŠ@F€˜&S `ËcbăP-`'æÓ€ű™{[”! ‘ eˆDh;ŹÏVŠEX0fKÄ9Ű-0IWfH°·ÀÎ Č 0Qˆ…){`È##x„™FòW<ń+źç*x™Č<č$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóęxÎźÎÎ6޶_-êżÿ"bbățćÏ«p@át~Ńț,/ł€;€mțą%îh^  uś‹fČ@” éÚWópű~<ß5°j>{‘-š]cöK'XtÀâśò»oÁÔ(€hƒáÏwÿï?ęG %€fI’q^D$.TÊł?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)Ź‚B(†Í°*`/Ô@4ÀQh†“p.ÂUž=púažÁ(Œ AÈa!ڈbŠX#Ž™…ű!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fș‘;È2‚ü†ŒG1”ČQ=Ô ”Cčš7„Fą Đdt1š ›ĐrŽ=Œ6ĄçĐ«hڏ>CÇ0Àè3Äl0.ÆĂB±8, “c˱"Ź «Æ°VŹ»‰őcϱwEÀ 6wB aAHXLXNŰHš $4Ú 7 „QÂ'"“šKŽ&șùÄb21‡XH,#֏/{ˆCÄ7$‰C2'čI±€TÒÒFÒnR#é,©›4H#“ÉÚdkČ9”, +ȅääĂä3ää!ò[ b@q€űSâ(RÊjJćć4će˜2AUٚRĘšĄT5ZB­Ą¶RŻQ‡š4uš9̓IK„­ą•ÓhhśiŻètșʕN—ĐWÒËéGè—èôw †ƒÇˆg(›gwݘLŠӋÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ȘŠȘȚȘ UóUËT©^S}źFU3Să© Ô–«UȘPëSSg©;š‡ȘgšoT?€~Yę‰YĂLĂOC€Q ±_ăŒÆ cłx,!k «†u5Ä&±ÍÙ|v*»˜ę»‹=Ș©Ą9C3J3WłRó”f?ă˜qűœtN ç(§—ó~ŠȚï)â)Š4Lč1e\kȘ–—–X«H«Q«Gëœ6źí§ŠœE»YûAÇJ'\'GgÎçSÙSʧ §M=:őź.Șk„Ą»Dwżn§î˜žŸ^€žLo§Țyœçú}/ęTęmú§őG Xł $Û Î<Ć5qo</ÇÛńQC]Ă@C„a•a—á„‘čŃ<ŁŐFFŒiÆ\ă$ămÆmÆŁ&&!&KMêMîšRMčŠ)Š;L;LÇÍÌÍąÍ֙5›=1Ś2ç›ç›Ś›ß·`ZxZ,¶š¶žeIČäZŠYî¶Œn…Z9Y„XUZ]łF­­%Ö»­»§§čN“N«žÖgðń¶É¶©·°ćŰÛź¶m¶}agbg·ĆźĂ“}ș}ę= ‡Ù«Z~sŽr:V:ȚšÎœî?}Ćô–é/gXÏÏŰ3ă¶Ë)ÄiS›ÓGggčsƒóˆ‹‰K‚Ë.—>.›ÆĘÈœäJtőq]ázÒő›ł›ÂíšÛŻî6îiî‡ÜŸÌ4Ÿ)žY3sĐĂÈCàQćŃ? Ÿ•0kߏ~OCOg”ç#/c/‘W­Ś°·„wȘśaï>ö>rŸă>ă<7Ț2ȚY_Ì7À·È·ËOĂož_…ßC#ÿdÿzÿѧ€%g‰A[ûűz|!żŽ?:ÛeöČÙíAŒ čAA‚­‚ćÁ­!hÈ쐭!śç˜Î‘Îi…P~èÖĐaæa‹Ă~ '…‡…W†?ŽpˆXŃ1—5wŃÜCsßDúD–DȚ›g1O9Ż-J5*>Ș.j<Ú7ș4ș?Æ.fYÌŐXXIlK9.*ź6nlŸßüíó‡ââ ă{˜/È]pyĄÎÂô…§©.,:–@LˆN8”đA*šŒ%òw%Ž yÂÂg"/Ń6шŰC\*NòH*Mz’쑌5y$Ć3„,ćč„'©ŒL Lʛ:žšv m2=:œ1ƒ’‘qBȘ!M“¶gêgæfvËŹe…ČțĆn‹·/•ÉkłŹY- ¶BŠèTZ(Ś*ČgeWfżÍ‰Ê9–«ž+ÍíÌłÊې7œïŸÿíÂᒶ„†KW-XæœŹj9Č‰ŠźÛ—Ű(Üxć‡oÊż™Ü”Ž©«ÄčdÏfÒféæȚ-ž[–Ș—æ—n ÙÚŽ ßVŽíőöEÛ/—Í(Û»ƒ¶C裿<žŒe§ÉÎÍ;?T€TôTúT6îÒĘ”aŚűnŃî{Œö4ìŐÛ[Œśę>ÉŸÛUUMŐfŐeûIûłś?ź‰Șéű–ûm]­NmqíÇÒę#¶ŚčÔŐÒ=TRÖ+ëGÇŸțïw- 6 UœÆâ#pDyäéś ßś :ÚvŒ{ŹáÓvg/jBšòšF›Sšû[b[șOÌ>ŃÖêȚzüGÛœ499â?ręéü§CÏdÏ&žțąțËź/~űŐëŚÎјѥ—ò—“żm|„ęêÀëŻÛÆÂÆŸÉx31^ôVûíÁwÜwïŁßOä| (ÿhù±őSЧû“““ÿ˜óüc3-Û cHRMz%€ƒùÿ€éu0ê`:˜o’_ĆFPLTEÿÿÿGGGÿśÿü ''&ÿùÿöçȚțöüôûóđéÿöùńöîÒËŸžôíÿśîçâÛèá§Ą‘€|ÇÁ ÜÖ a^ŚŃplÒÌ! ÿśÊÄŸžČ­„ "š–&‰†)wu3_^:ÿôÿńőçB?țóÿó 1/RO ÿö)ÿś;?=ÿöiXV&jh9CB1ML9VUAÿíúéőâÿìóáÿîÿńGÿôXîä^ëádÿű€ÿù«ÿùłđêšûöŽçâšÜŚ „`ŸŽÿúœ:9+qoTśóŸßÛ«ÊÇ›ŻŹˆÿûÇÿüÒÿüÛÿęăÿțđÿćÿéÿæțè ÿè$ÿë5žTÿńzÿ󇐊Rÿö—óí±–“tìçždbOwu`ûűÙÿęéÿâÿȚÿáÿăÿìjÿïrúí‡NMEÿÚéĆÿÚÿÛ ÿȚÿß,ÿćSÿçXÿé]ÿêbÿÖűĐÿÔÿßCÿâLÿŃÿÍÿÍÿÓÿÔ ÿÙ9ÿÛ=ÿÉÿÊÿËÿÏ*ÿÒ-ÿŐ3ÿĆÿÂÿĆÿĂÿĆÿË%ÿŸÿ»ÿŸ ÿÂÿÇ!ÿ¶ÿčÿ¶ÿžÿŸÿČÿźÿ±ÿŻÿŽ ÿłÿčÿ©ÿ­ ÿźJIGÿąÿ„ÿ„ÿ©ÿš ÿ« ÿÿŸÿąÿ„ ÿ™ÿšÿžDB?ÿ•ÿ’ÿ’ÿ”ÿŽÿŽÿ…ÿ‰ÿÿÿ‚ÿxÿ}ÿ{ÿyÿzÿ|ÿsÿvÿtÿwÿpÿlÿdÿ[ÿSÿLÿHÿCÿ?ÿ7ÿ;ÿ3ÿ/ÿ*ÿ$ÿ!ÿÿÿÿÿÿÿ ÿGEE322/..+**<;;766DCC`__FFFEEECCCAAA>>>:::""" ÿÿÿS!·ˆtRNSÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿSś%†ÁIDATxÚìęy|Ś}à‹~Ouwu7îÆF$@báÉąžŠäE6%ْ„86ćxL>;‰ǚ\R/“pȈ =R–Ą=sMȚÏ”“XqìM'ŽŚÄČ-oIQ€DË HHlœoŐ]uîŐKuŁ»Rʍ_ž ”HT:uÎïœßŸĄđ:^óőšȘûH‘±æüƒ9ŁA±™ˆê㗦/Ż_šËțúuòă¶čt™aźQd:ßyTóŰlŠĄÇlżÄ_^ÿ~‘ ’ŒÇì2“lÊuȘGšˆ[ƒPÀ˜w‹Æ_‚ü—Śż_$hŠËŠ[Sp€Ę.êP€ ¶æ_Âû—Śżg$iölŠü@Ò °àRìÙŹZ ù đ_^ÿ‘ äBJÚOž%wË«ű襞l6 …ŒžmQÿKpÿòúEŒÄk¶Će}X4EŠŠ5˜wbȘ0ÒB °Fê—đËëśzíRĂNZM:0rwÒ@±Ûł+Š­ž3±H"ńKˆÿòúwÈ "jŒȚŠ$ꁐ=á7Հ`wŠĐmz=Ś‘‰–ÿwæ”a.èő:í/ȚŠČ: űč”w_Ï>~yęÿ ÄT‘ï$P5ĘôЁžlˆ;ì ùeTz…śșÓh V_yÇ.”c6MGToKn« Yì/úéšNšżÒ|òæöï…wouż}ŒÎWOÒ=șdŁĘŁQ-à”q cȚ-Ÿłi:^ŻÓ”žȚ[©y2Ù°ÜŹPl»ùĆ@‚ˆĘeù-kŚmæżt#nw8Á֋ŹÖUœdĄ]W4ˎčPĄÉ‰Ă—2ä·?•›/„Ąjßß›âù#KôûdÖqŸôVxçE.z&ăŒ5ś=ŻwòfarË}œ8œ E=Ț+7śč‡g‚ÖßUoÏbŽïƒ–íʆ‚ «ÎWîȘy+œ…ă|ĆA*żr4śËƑÜÍ?ŸąčŚäaì‹›;pyÛËÇsâ/ȘÍž° žźĐæ¶=rô Bé@e“žÍ(Șą`dDŒ¶‹,Œuüû&ăüő€ ę +Ț:țíÛł— ŚÈ\$ŻŚIÉ2…w^üäÎ=ûț°)wïóïÍïDg9&4Dqt•~íîóÁïo(ŒË[¶›Ć‚[êăÄál$–%ŽŹŒ™Ïí>”ű^ÀO)„đEÎ꜁–†HLŚ€†0Đw1æipœ‡Cÿ”5›î~Y›°‡f €Ÿë/T HdűíB»ąŠÎoêïżŁ5‡œa?S3čĄv?š«s/FŽzêŽkțŻ asu>œyžț‰ÿ;1dŸÊšĆkSÎÿÂq‚€Đ ĂYț ­’Š™Źw șču<żefƒœ{GW9ç wÏżÚTűm6瞰PŹæ?Ę[ȚSé54ašjf ^=őÉÍś·Ì”4mę䣄Źn“»Ÿáæ$Ș›ïcś\2š"ßV;ăÏ xÛČéűČBÏŐÿőFëï™?¶P ^›ęEÿ†+Gü·TïZțòÈÆS>ZŁ)TÍí ȘśÓ{ oXzšŸŚîW=țrÙšuöÛŐæŠk|ò‰ő§}°áŠöR]o`Üö_ùŃ©§~Û:ûŸż ƒwę‡ț2zŸ’WÏ=Ń4W*Žyÿt/°! Ò2á­ăŸy0·ŠŁPW:Eóà/ÜhŽĄ1Ő{c‘Æ›EQ ”čÖ%p@Ù4uÎúò+v–I’áNíûSÇbIì:$XobA€gւ+šŸ>„ș¶°ąźhçĘlŽą\ÛôŸčË60*ZÀÿòČŁžn¶ éh ŸYŚîHțĂ!GèX„{§^j+ży0„A@]{făôś7üüæ•ínȚ˜Đ}»OíûŰU~ŸéyțÈÆSŸÈș`ü.äh^Ż3‡ áUÉ17łÁ·ßïkçË>v_~CČ[UHu«/æ¶­u0P`0Đ4żïha»GËıЯl(šj°o`ęi_hęÜÏEš{•·.ÏÆŚ ^Łł,f·A6Û+Čć]Ù E7ŒY"HYCiT)­;†qpđšÀTŃ.pjއírћ^/0 —û.~€K8·•Žb3!…Č€ùú\|kö™üæéÔŸïć›.üçźŒTÚu…?pɒwœ“ÉkŚß n]¶Bps}윊Ą}aćJ/ \hÿÚę·ÍZŽVąÔ/Îz€őBłŒ5‹FŁÄőółž‘m<ìZÏdòÆ:àŻUAdGp_ciOë'/g୍‚«?Üç’47›/žÆ!ÂÉۃGŚK/Ź„ŃËČ­/üË “w„‡ÍöCłái·ruąo>ȘÁĘÛŰtq +Ă;çŽú‹œčÖ3ÉüÂőśÏń‹‚QƆaDšMŸçÒ`€ĄëQ;—4jLž”Òßßô ț  Șà›jŒâ<ƒȘÖxÇÏŁXD/‰dŃæp0țqđÚìè ]˜Un:üÍÚšœë^ż~rțŽH€ay@Yž™>NŠ>ő¶æ2đŒixö±/†—Ă}vEśŐ8=WÄń“(–/?W’ŽžŚÉśiCdùÈąŚŚ™[7z^ü/GPæx87„uyR=+íóO= ŠčĂÏ}ž.ÎȘZÎüʑŠù|‹–هîÈO3ŒK;ȘŹ»<4đ_ ˜F\œŻŒƒŠ&Á„»Ù-' °e‚J3@ԖŸbĐ3_Ż(6@JŒà›2lju,M)ÙŹĘŚ€Đ<đâ!â“ŐGńÀ5ƈ? źăš\bÄ+~0úÁ êźđˆŚ7Ÿ âf€œ«§uTì!ôšby0靿™>pt݃J/ÜĆÄ]Ëh3yȘZńš;:À†Țš=[d„ń# ?J9‰Ń\ž•BIčŃT­§úz˜NéI’”ĆFi­!æÙ6Ć œ=H“@­”_:Ҁȷx硉»N˜©ĐĘíûw˜,1uÈ=(vLj^ܙúƒ·p DžFÿȘÁk$h°gŁs{§MÍXŚc+ Ź$Ò†Ę BĂ€jXfËìț*”Ìïșÿü‹ÇQ{ Ęp-ôčŁ&m«učș»Żšç-ِöÀw@òް ùpĆ…n§ćą\]Ÿč>6ŒđìUzòóÁ…„?V’Ź­wÒâúQv†ȚâœëAÊÁSdéŰEȘ/xš–Ę~îę.Bİ4Z@°}ŒW =Íœ… /ŻłôŒűúńĄ†îŸY¶ÿ›.˜Ž>,’IëTfń@ˆ}úhçsáűƒÁàż='PĐíæ2…œfAVo‚nŁ!š•E SȘò‚Šù}›Qó3?{ìcɱüìAšæ[eáźúO€ƒG; żÒßò’Áî—yÁ]±ƒoŃüó”sŹàú»oȘž‹|óöȘCî!Œs9zțêłn|ö19-0Źm^tč%lăhńV’șlęő5À—ę8«_2ŰÙï)¶șRï|äßkÌ߉ÜIëË$PȘwyœw:uŽžä=ûûsÓ„SčâRŰ1{š±J_Ldÿ€żï”ł‚ŚdŠ+È©ò›««őRÔűšˆ0ôŒT,Äjœ*XFÏdÍkôAVÈ%źđńY„šMr9WêŻ5LńPń‡șÓJd”ÏŻźüÂŻìŸ»=›ZHnȘ”c|ï¶êĂt~O[ˆ,) íŒìŻ«1Ś7‘jj{8ji;€ÎI—Sg{±Ő8^ö(ښꏿć'1‘ÎrżćæŚłëÆÏvșțsWśeZœębÔúmçoŠTšÊŚYGˆȚƒêü7‡bŠ –7•Șz°•aKëkȚĐ=­ș“@]Ϗ%"ÒpĘY™”Ż6&̍gŐ„|vo Pwa•æXRGÿŽżÉà{†Œđ6êț 6EŸš6śïőGùî2žÌ¶›écő/ŚÌ3Z»żǒêx–ûkMÚęĂ7Û&ow[ÚÌá™Êzèr5)UčQÌ'ŸuŚòF0»a4ćJ°źűZŽża$}è­ùńÏöwœŒôe©Ń‘{ÿ›XŸÍÚCG·…} u‹ćvŽżákśDśŚ‚PèWëYÿkG‚{olJ&l=€Ą”öŽńźÆ+ hàJÿtęE‰ˆÄÒj%,·óc—^sËn…úcń>śPŒŽuú2pà/ú;ŽĐĄźBÓsŹÿ‘€Ź¶ßVžw-Ybß |țƒ!#»Žčręòû8ôč)^őÖŻíC_ŒË„T‚]: Ïđč~öłòîđû¶ÛüˆJy śČę ßùV¶6˜ëÎmIĘ=(b4é• ćȘöëùgżvŽs,Ó8”íćÿo­Ž6«¶,K ÛûކȚ aąÚz‰ŸaKŠ>TŁ«ìçYó/ŻCÒșę–q Ș8l™ŒI§ÂN@F'$l±5w‹ŽèRbőœoź{L"î;èzaSêțbÓoÓâN!òfz€è=yȚ“łßBYÚBŸ‰>vv~ÿŐ-1Żž'ŽîXJ7ÖI–Ì:o?É”ż«iDł|I2đô^B»Gž±î„ŐzO_ˆ•5‡ÓđÜC—Á2è$cœ+ün;Ä{6òƒH†‹îՋt-æßŸ‡PĐòm ùSO†}ˆ,­–Û—+ú&öwÖÓŽ«éő(ÜpËâМĘnËDsŻëŠ Đt=’”ÇŒ\Œù7Ô#€có`_êź“ <1e1Û~`Ž_© ùôßöwŽ?ăšŃ&1 €ïè!őöb;ęƒìËÏu[8è6z.ÖŐ%Šx„śâÒp3S.БSrČí^ž†”Ü>†ą‡~Óč$nÿ‡ŁKd`ˆ”wú>‹Dp5św‡“\ŒMß }țsî◼áß ț ê.«„ÓÚüœ"kxߘçKŁá9o•öśżì„ëèŃƀÏG§|5†őÛobâź° VbZęvŠyZęRFÊ»ûçÿ-­CóőŽL^^s*€‘őGŁNĄű<ácÛí9Źęò{łR X}}‘@ȚŽu}*č8Ú©š;‹Mą3_BôăęVz"”UƆq:í@6äÛ]ĆÛWßJÏEvLòÿ’ßĂŠÖäïé_aŽÍ­Hęèp5n†%S€ĆöÙćö±qâ™GmKâŸgžÜV›žŽ>bÙ:ĂÜ=pBŠ-sĂjÙçŠY!«YŰëŠ-[,­ÆîŻô±źÁ XC’ÏY`ûę]Š–ziÓ ŹLƒÙxÒ}s“]ZkwŸŰ•bgrże&Éț¶ùÉśYGź_6ÿ^W`îĐÿ ‘`źȚ–12ą'@r-ì„wÙÂÇŽv»ęŰÁuRŽ/R „ƒńÌΕu@vN?čÿJtȘ~rÍ{ÿȚș·K¶=mn“Á(ÿ#EȘÄ ö?Ę »#|ÙČN—îgÇț–ś*.}ši•BیoÎ|?LÚ7óÜŃ Ś…”úŠ“ț„L€a1Ï2ûoOm*§q‰ë& /Y’‡ŸÔ–űìŻDö»dQžŹ%țąÀd‰;È~(Đ<„(ŸĆ4ąï…ę–X‡Äę‹ ÊyJ$–‡îČÀöÉ5ï19@̆VD,ß}2pÒ –€Ûśśïz!Ë}–ÛSž íƒV ].GÌgvbû·@‚%[•6"źÄMAllŒÍf>óV—Ćą(ïèœÔqE"<1„”š†Ćûf‚O‚úżŒY3äêP œ;ŰÜńŁ©gŠśbęN€ô„Éó/ÀÏó=ž_mÍdț:Ê^`rțs[,ęœ—çá+sÇ {3ś«ÍƒÀîéśuÚ”ŒBò*ĐeŻÿíߟ0ûĄ ŰČÁ·$#˜ßżÌ> v”săü\_‰:șżÿ5YAjž]éQő.,^3,)IŐ?ĄĘ#Ï—>ęÍ%Ęđ}z.æÿ]0!?sÖŸŠöÿz±“™ûU‰ ‰Ő)ä#û-‹™tùsę”~;· ?đEÝbćÖišƒLwYî|Ț40dCyٓžțM łĐqHw}QE€±Đ ë/đÉ-] ù\_ȚŹlž€ >ê)53 ÆÂą+%‚ïu”ę"§KTƋïuwÿîa+}‰ «TaÊPWJI‹H™ütÛIüôŒ=}wńí|ŰĘńôȚĐ;~Ê[ò7“włî€ˆ§~łTŹÚ“A+Ç2ž üțÿœęĐHQœîï°,@ß ĄĘ†r’Śn!œig™ČBó »ą})» p«€Æ+żj"ŻQűÏ+‰…M ‹NS0>=”șŐßĘ©^äÇ>«'䯃tœÜÓċĆ[­_ĘOfbââˆk7lŰ*YìàAQh8‡?»§y€űò>ÜtÇù=űg“_pçn„ÿ;Ę#~`ĂÜÁZžą•=΀ȥÚÒĐ&mč}ˆ»ŻĐZ|’ę߉[Žž‹.\žĐÈße-/Í©njšf“ZÊâI 1&Ìkín`!™‹gčĂÒáś”ӚĘPž•<Űü€bŁż#P1€Őo”ô5sš°^ÙżŁ{Ä€ő†«Ț˜ŒÇeJ]·ű»Š:Rîû°æ”3cő±Ćđïô’*Țù!źĘkEțzĄkĂ.C9ćśÿp5’‘ZƒĂȄ ió^èÍ_œĂÆÏęNƕ”H_•2sŚÏ5[Eê6œù7©›Šw7pű0Ś#|ç D‡ûd †zG±á%Íæ‡™ÄÔâœÓs2ägӕę·ćnŐß5 pèoSżŸ„/ÌÍô;źŻŹŃàéŰòûۑæ¶bۋ‡“—?.tÛcI ș€ÙüԒ‡ÜQ,aE[ÒĄ€ïOŐä,k- ú;MźÙ`˜ï(ë 7źëšÂô‰b_Æo9 ż í̧Ű á©lÌ1ÛTl{5śĘÝjcQ`É]êôȧ…&Űę›Fö; wR‡ŚŒŹ(<ßßžî ę[ °)ÒmŚ3‰Äv =ŰZÜŰź Ùűș•'‘e~1éLOÆÛÂB’žgœŻv”»§g?†vG™<°j‡iÜ»M9TćN­”Đ0û}šGŰteÿŠïŠhûgü„¶€Ț—gâÏë4učŻÌ}ÒłÄÌmÏ>6WËŁŸ#șì>Äe>_t‚§ĄĂaÉKÌ`oČ 6KÀò”#AÈš•,ĆĐ…€ˆĘzh…ù›ƒhƈЖß:îČE|aé±k1ŃvíW&8±ŸHŽ‹ü°żë"@–•é늏œŸï5"& ÒI|…†ńțÎAˆ§>h Y áöwMÌèô-«ŽæÜYo^2(ą‡šA“ĆüČû? pg±íŚÔöbr•?Œ}ìk…tDępà$5ÄȚđOČÜ[ń«Ă©­Q!ąŰ‹-țBUL›šć­żI5û{žżȘŸëÈáRD)!kBüSGÿVű\ô՚ïè#ŒížH_‘ °ȚÌßó…„K0±ŠŒ‡­}/vXÖO }űźéŸźÂÌcM­ÖQ+ëmą„ÒƧλ М«/J–Ż-T@ÿ| cłz6¶ÂB T ’żacjM„ڜO|xgR,ąhŸ°‘âÚ[&’Ÿï”ŰӞ=c&Íê«áWڋÀ_XžÂłôvX?zpćŐYàĐßòȚÜÍËtć Ûšź­Ÿß¶„~ÔDôź“5ìŁMńeś1™ž.Űgg;·ü »ŠoeÛęmŃK`üOŐmÔKv¶°="Vđ^e—”§|eä-Ëo?qŹ­˜ŠœČUȱęîȚ€E/>Źóń»Ć]À7ŰăȘ1WșŻŠ8Ô,<9mܱúŸehčhPIrT'h!X)ĂȘĐÒùßœß^wì_Óü&à#ŒPEßŐä§¶[,_>ÖiÏ9<ç\ûEՙŸßˆA!}à‹)ZŸoìE œc”_·Ÿ9ŽüăÜŃf‰Ą@đAÖæ7őËŠ?ȗ7Ֆ?őxŠúâĆ­Ëì#üÎ9î-:ʟÁS àZˆ+amŁ,"źĘżÔ6TOúP]›ÛЊ™2'ŽcîïpȘ­ps7ÿ+bćÈ`gnG—|úÄ^_$čÙ\ák_>ĘuĄœEŠžeOO–DÔe+Ćglìì+†WQCïx5čĄèțŸȘŁoÄ2jÓb©’°i€ś fJë"_;ìT€”ËÔ*­jC”WC N#X_xu8Lцy’'Á¶è=ú1߁H)ćŸ/aì™N}“ĆXpâȚś^ÈíO=”șȘœćŐśș7üH˜Òx›Ö—7ĆȚƆS»ÎÍÊŃ;{šùa%Ő=ŻŸzÛ_I©ęëŸ.lœÙŐ-Œś#S5#°W“$\Ę`Ïrû“‰ŁźÂ—»Îp 乗a”hžùéæ;‘ŠZZ—_§`!– @ę/OúŸč>{ĄŐ—tjgĄŃÿpW:Mè'€Y*ŹFìHë{ż Ńdˆ—cxw"ț€ę…_Ž#kN2›űœRűĶÁ5'ŻÏÊ^ú’u| |Ÿ1—Òêhz7—ïBˆĐëo"Íș «G„ì. ›+ΰƒ(úąšÿŁđĘTN+XùôPä©wXŠöœ#k:ŽæÉPZ­ŠóïÇžŽ:/Ő‹Ńń=l»j|ækäù[ …‡ŠvnęàU€ț7§Ś\Ű›Ś‚àÂÄÊÀàC_ŠÔŰÀëH~LÖ°ü,»(}…Æ_©yÛaüRJŸ¶Pxș@Šæ:*}Ú)U?ÖśLâ›cEÆńš€eŽ_+àqwóЉ…ûòé•'«}ÓmTB‚ș§ź}”vÒXűđ@±Vž'ÙWiȝŠi%WU§ÿ™(wæÜEÏ™ĘŚž»*đäì1‹éÎ"s9V–‰7…«œ`őő°Óhk$ŸÍeT\šT„ˆ(iÇąaúTô)+%9őûM« ZVß”Us żMșnȘ@_Žî"©QŸpiûs– ]ęÄûYìlpŚiđÇ}CńËĆr|ȘŐqäîŻjđüöç^!(E<üZuț*—ĘÇźàąő`hpőżdCŰí\/<}ŹïR­<ă°ÔiŻŽ—â‘/p-„€ŚIM5íêÍüïBŁ țohZÿÒZA–>‘cęTZ>'œIëEyȚ_\u™ćŚ*ŽöábvțÍÎWąÏ6çÿąçą?É”r[Ù˛­v<=ę H ęuæĄ„#Av>WK9œ h„ŐEmF܋j‰đèąœ\ÿlüÀ»-€áć+–*‚Vš”ŰęôòS‘7ć-É Œò㦞úż,ùjáß9ČfăiSúßqęzg=Ï ôvąMÖqiÈ+s]ÍOnńÄïkßç^)ÿȚÆ~+čü>RŒłűû ćÂG­đTyČvˆ˜HâŻÁwźjÏ$ާ .Ä©ürÿ‹:X UW°żăú¶Íù_ÏĐö/•1}/bOU\‡ËÍYËÂMá(v)fi«Œš~ çxúP(ő–Â4Žw\dĂÌoś.ÎR+àáÔțFŁxĄÜăž  áX+ž ?-mӃ.ÜZÚ jIY­4óÇŠ]ʘìžyÒ!Ҏ2mćŽùżnqĆ_û kí?ç[„”nVWêîbÜô~=ż>Ç~ç)Œä›d>g-ńóò‡èzϓæ^S^‘Œ°æ8őuÿXȃcń¶0üôżțăäcŹYÌFg?ˆúÛ;7Y-æ#Ű«‡’.·—mì@тvíxÇI™œ§ïŽąąńà!b1:*?žÏ<ŽÍsĆWÉU±z»…LżêhœKțfțWę1WĆóEśaątUüŰ;§ëƅnŒÿMóˆuËùȘyâòKőïùăčgòÉò[žèI=Rț‚ĄYˆeIaƒvgFd]ùș"]L]1?ZKÙlÙGš>]©œăÙÇôçÁ- ąݟí{Ÿ„°Öé8iqJÄYœUń”ĂśĂŃ5ùÆîLÁ!ûžZQ|K~ę0=ó!îb äŐŸ©öï{,=ăsr[܃òŸÿËęÁÀÉWę!ÿ&#=qü ÖŃŸòdóĂç«áÀòûÈXƒ%Ïâ*ëqž ƒúßŃ=R‹ïŒô-NJN‡rE*;œJvź4.šuzÂb=ïłÜ|ÓßR0Ă|ƒ¶ê‰BŁ­âŠZ}àűŠóćzqĄéìiK"°HEÉRëJć°š‹šĂż¶łęÊńÎææ?Ù*«a Ąíl)Ûp1<ń˜m9Őn Ò.ŽŽC&d4Ł,ß꛻âc}mś=äÛyZH!„•˜Ț1Ûś^Ëò}ˆő#Öč=yš@ _ù-à·wpőc`ƒ*çwçq@ŒMʙŸoìĐ{-čè§š›Š+””qÚ"ƒÄ<–ߥs ÔȚÆ{êùj뉜ț?ôŽÉk}ÿ͊ÏĂą©FIžeśq„ŻÈ+ç?Ö\Vhyû|ß‹ęÿ:ȚY»œșĄȚ]òû+\ꘙRÖၓW`”șŠètđ^òșáȘ/xzfđÿÓÜÓ ĆńŒgń7eDóID©’ń»­Ä(R–ŠSšu—ői‡ò uáÌțŠœ}‘f.ìËŃű+ԐżùŸÈI?ŸŒ»€hEž• Ț€¶I·Ô—a&]6DJ6ž"‘h IOˆtÂa][|ڀĄTź=j„?ƒX}ÍfÉ*X{ÿZ cÿúa()ƒ,ąmæ?Ӏă 6tŸ4«t†ü'1·r˜`ìù–î}•é§Ö:-šÂO*;ÙÆ5/ĘEqûŸO;ÍÍmlčD8‘?wÍÏzÄżJűęlŹYy™}h©ß(òèÍ_șçűű;GŚŒ·V%Æ0Q‹Oá„‘Ł€ȘŃá̓WrŸ‡©bIÄkȘê°kÉXÁč0=Ͷüo/”6dC#.&wŸ„Z_ńâöŸ3–`ÁCêÎBÓżB)ìİuIÏmœŻBgSƒƒkùŐ|«“ƒ§| væ7}”e Żì>őLyEègž| €œöe”GXźbJÙŃ]łB”ÏȘ΀ËdÇÊl›LU!ö»Iƒ+șVĐVz&ŽçZdÎș+ż~žyęÆKYŁ5ÿÔ82žqęúÎ_ϓ?À‚1Væ[Ú ="Ÿû Ö}©ˆ!TĂYo»'łnٰ ŚȚóŁÏŒêmŒÇ™(=æ~Àké(úÇtŚÄeöŃ4Ț·­xg5ĄCÖš ßǶćŸțđPSGíj€"[„OôĂGĄc}çïË+FM)žĐ&Ÿ’ ÀŠ;{ĂE`}VU&ö”ćaü-R»-‹ŸĄkmă•ń úßÿs„Ofy·e6֟ËïL͗èĆßs Žćž…ŚXÔ!P‹+zè„ MáÜ4ŃŚ“oőžËéÆröŃV¶„ê(Ȑ[•Ò ŻC‹lŠeÈCËćv—MoŠń†Gäù»±8cśčź/T‹rŹŸûD}LäeȚž1ŸÜœŸ{êï?ĘÒUfĄQZóÏÇ Źq^(ʋĄœqH] Ï𗏕žvà',NW €aHWĘwÚ>Ò°ęćł3H§ę›{ZÇűrWIW_ìȘ-™,ł—¶ ^k/Üiúđ?ʐ‡çÆ8űź–|Ó3Ę=”‹êÒűò]%éžÂ(Žƒș„đęŃÌlĄàšEî^ätłŠŸ-ßDüƏ%7R'ŐȘ<ÛÒÎwR„Ù–`E~±~Ÿ­dfŽĂîü>ß=g°łùk’É.óÙ(N cmá~ž DÉgUESł0Чg ŽÛ˜Ę€rąèJ:/g…¶±fuwBÛ”eiÆËEĆN¶)*ҎŠó0ŒPÈ?_źϧ>VW­ ő“śM‚mŚrœkĂŸP°6hÿéæö“„œŰź,pč\â5Ö:Kz? RÉ Æí«ĐV~HІp"eÂBxŁ—ï€mÛF^8 nŽ'ö=(yíÇÖŒ§&U^nț źGŸWŒÿV.m2éäڏÄ2|Ąhjüéctœ\B Ęé+èdÓj%Ÿa‘ÇïŰ7T5öœ~YsO팜ĐÄóí‡,$ęŃ·ŃȚđŠtĆ [mä±g·Y?Ó~ìàŒ/ìvżŒ›‹nçsȘČ©È ,CŸcÅś~»ŒŠp°íác–1ĘÍ€ÀÄG”]™îł>¶ŒJ Șúb—”éȚ{ʐ`FUˆĆl6O2Ł•HCB+_„ĄïRÊI.6\Ӟ-ŽêŸÖŠæD@ĐV8Z+,ąl)LąęŒyómź Zê°œè3ę””Ïś•Çè~)7ŸőšZ8ôÊg?XF*¶i\»`ęúw>2ËS–È’óŸh^œDôćöń⎫ÿ時-ÀęìăÚź †>Çvo?ÄÆóKD€‰,^ÈVJFŽvÓ^h±uëŻòVP]Smr»uœoûB<ś/ł%lxI’JQoä_{ì ëKD€}Š…iT{f%GHæ?=ÆE5 rËjČ~(Đ<ž~ôÈS©R+ű8îŁkĂúê;vŰù›ÀčcĐś°eŽč TțV–“Šż<$ˆ921»]1?ŹŁ%”Fhˆhj9šèŹÚK“+Œ^›çș!‡Ç”gï,LŠÿXwçŽV‡¶ÚœÓ…&9˜ûÎü, \˜uQŚïì_üÏ“zôޱț‚č‹6&FÁőd5L}`tž‚+Žé}cÜYŽM«ŠćÄᙠ^»ÛîPŠG-»?ʃÿPÌxĂŁčceű¶•­Țx?=rSíłêÂ"N!T ú7eúĘŰƞÙ>ë\mw–śńM­9qlûí–;ë+|é*ŽUv0 ʓíęϞłd2Ű~u`òf-ÖûlÜi1éÏÂc0ĆêISò„ê œCŒß*ùŰ9—•ÁbwđíÎí-+ŹnĆ<ŒwóÉEæÓQóôŒŚÏDH‚đځŹ4"NĂÈQšòzT‘LW—Á\ÿóń«Źű©Sk„‡G8VthÙęŚ óżȘyÛWCʑ»%sœÁôÏóÀß n“:yÛà«VÙőgÛŒ&Ț”ŒÀÁw=ž©6°Ńyží)jJÏ҈~ùŰ,‘sÿeˆT5n—â±ÙĆÈÒ}ô\̝<óžÏÛRxlÿÈÛÌ-qW‰Aáe…G[ĘȘ"ȘŁ‚†/żÈÿ0ŰU9lș͌}±œæ.˜lûĘĂ|èKœšŐuđh[DȚ€äočđüș„ɱƒ3!!'Žò$zÿV8 óśEĂ>Ć!`çĄŃyx›Xńc“<󷖅o(nł7ÈJÓ9qX]dąIkț‘dyŚČ äT̖z]Æš ŻÖț”êOśŒp7)‰œšà™{*ó‹O€”L2Ïqż‹52›šžôƒ-§$žâ„[üćÇèzϓ»gFŰśđ±G;Û4ČïŁŐsÂâśi°oÀÂà2<ę ĄÔœŒ$“D5—pÎ/ŃÇOi<őë3Żčʱyç=ń©`ìÈ,À‡Șp‘Š’'ŒóÇÚȚă›û?|ć>€rk$î={»/}ïWjoÏ{ÏlÿőxtnUÁuޱA&,ïmí;łëŽ’bc HZ„}Ö!Skč0úAB©žt—` ȘîÔŻÔô*›DÀdE{Śk]ćéwł7Ž,$đçŠjfƒłž%ÌŽTÊYőńwgćOeÊüSò©·kUš9ÍČŚ·}ÉŁŐű^öOÒ4. 8đšfŸ;’soÖNŃû{·Ą1JŁš˜V:šȚgŻî&ĘwŚfŚ@ŃléĄ]Łźźà@:žÇçƒÇšĘGàęOèt 5QsV9 4Â;Óńé…Ű‘K‡+·éă #ŚŃšê>șXÒ‚Ú_ș„ę;ŒçoŽßŸÄh~7ź9ó–úuR!EóőíEïwśȚŰȘÇ{ŚTț ŁwèźSaËŻ v †¶§Ú5êê,n/æEčÇ»ôÎÌ üșșèt‘ č“»^ݰ‰žC*ÏlmE-LÖ­ŽÚăNśžŒĄCd'Á„€5ǚvxg­V‘ûpč†c6 éąhùۜ“űÄMF9¶UpU©]"Dwæï«v ˆă›MRŒă_(L2ÆșbO.Wc;°/áRg”€WGïĐ ĐÉ©Û4GĆĄˆŽłlŃ\ź&š?”­ŒŒ†¶"ßϰbŻ437c5˜9xx/w}mîù7Ôt”Ž>ÎŹ#țl$žž96ǓőE·Bû3GŠ í·«-۞q,CžĆ‰żŐ ʜ§éT&Â4ç}Ë8+ïđzmŃŃ8Ÿćąy0€íV š,uù.šÉ†Ì/1._ÔngÖ[,9Túc8\ŚĄ-€gۏíYčÄŰÄRzïà1ÏD·!‘2E~gęôĂtÚôőÈÌăsĘćÎí]G¶b IXˆŻ=|țXàĄj_iFpGŃ ”<à^ÌĄŐfšȘ 6qnšŁ`эŰbȚû© xi!Žń*!$çXhŻ«B” żŁBÇÚ*Vàișú€öPuê6Œÿ(|\ԂsläÇšż]ÊD}>ȚÀțđ|üyu{æ|êS0œčZO+’†bX†|\UŰxá@æŹ6ÓÌíËĐhł9Č;|°œü$Nû„dÊH:o‰Ű,°ŒdČ Bq™81–amòNÿŒË òșëĆüè€\ŒșČȘș‡d9ƒç=óĘ?5KżąíËy(ž{Æs œ)ÿ‘$©j”úìCGxšÆ‡>‹R5аH‹E»”ÚČęôĂ0ў/•+„ę†Ôăû~­|úiĘșœ±€°©w(èȘ«o°—{Ź‹!€ž+šSż¶#t€ń•1sìCžZÙè©5ôT›ű™ácĐæ»H‹Čeńù8ÿÄ'·›6z7Ść­•źFâ)gqÈç‡:Núłź* \ÚȘsŐ<ą=ätv,Òű”€Ęi܊łlNɄü!„!&2hȘ;ÏM Č}É2ŰÒŐàűÊĂUï4 œt€ =ű䛫43ÌM+±/%ÒEîúrJÚ%Ÿ0ăźÍi€èÀûWùVö€ËMș (Őbc?\o;âxKu7ÉPÇp.>#ŹÄhOƒ.° łÆ8E$đ,çSĆ0K “Ę遁ٻËä[±HÜM"mđ–·/_üËÙYŒž Vœ8…37œŸbÿN„ÿJÚ}ąüC9bŚùö!oó…T’Ç9ČčBÄzpòÇĐâuœŒ­0ć$Òș*ÁŁ<ț™Àü†-]SșƁx»ŃëNŒ—ŸhêŠ@ `\ĄűÁa CœèÈrGùKcŰćò‚ HNۄH ™Rìz¶ŸšaëaŚrN0M~œs0S5lٚßu€ì…ÔÓՔ‘§z~ŚŰ+NçM *+TĄK€Ž„š&ßOÇÄœʶ“ â$©xˆ/"mSòâúôǞÙM*çs1dA”&q.fę±=yÀBI–N­qJŻ·• ,NWœKbUèĐŸ_]QJb °őWŻĘűìP”ÆbšŠèÓæÖÇ88żŰ€Žá Ń +Eo:(u± l{;E9Ž±Ë±ț ï¶fÆĐüa€śù Œcjż»0ć\¶–Ž#á§À‡?ŚEtšmȘ¶ŠzìÍlŠíKÙ “dĂ»OĘ(”Î ohjŒ@.ŒòĄ—w.Șț†‹ÂđMșŒŹr“H2œÂ]X}«Faž3ËA)銦'#UŰiTÒHs+Ú3jOŽ'{ș3€Če^›~—Ă!šđ“Cź€”S7źÒjŚ*ygûŸś\\?ùäŸÜűˏoÈJȊ È Ă!àEł3ÌâdŒzEw|†Ü@ˉKò„ŚȘÒ6Ÿˆ”qÓ=‰Ł» @ÎÊ*d+ŚBíêzcäÊĐ_Ê0Q”GMż‘ËȘQŚîыĐû•m%Ä++ Â¶7~ž”6`Kï+ÆAŒ…?=tš¶óWBűéa§€ČԑŒbƒ7}~â0úšiŠöŚf,@éä&BGŐFh§Ú#ź}ˆÏ}ˆő#0w‹ «óÒż1ù›ćÚoČ Ű|7‡ᎌiXÇPČB7ôË¶čÎWoš Hł\čŒ;Ț»Òjó‹‘żÿżĄZ Łn>ș8t4w‚g«›TŒÉݧáb/uY Fé`ÏÂ4țç+ZÛ7o ÛȚđjÜsq}ű°Ș<ô. " z›6Č$úÛŸ"„aJCQÖgAê”Ívù‘æ†~ˆ!p §ÇíÜńőĆâ.ŠU©CœŸtTŸ5șĄhb]ï|J/T7Bó}±ŽĘquqȚMCŃę}-Í֞…U©è@f<Ț4đèN€ÌđŐŁšüŽæABæ)șÉÊS–@GÇsWțÇûOLĂ[ł LR™Í㼂„†{öĄDdđx#țn­őúûáCŽ^šȚïr@91áô96ûO𓹷œ€,܌JP‚Ž:†‚Ą`†áNfȐlšuYà‹ÚœÓ#ë«2 ù Ÿ(Íï|‹üŹÜ±ŠÂ`Ò&àĄ‡Œ…lp!4ĘÏC)êŻÿÉh îą>A3 Ă1rĘősš"lšŠô2ôÈW㞋oŸȘ¶ }§ó%C€’…)Ü+#čԉ™ęu”Ôš=R“5?ôP&<;ăž„ŒȚ5_o‹Èé­éPțÄd«ög ˜ˆ`üăqwáü›żŐDűàł_’ż°q„żȘXÙ«^jÊZłș6îïo9ôô=cńƒNć$ț‘|áĄĘ§*NÙ0{pô<4Ž·șJ›æÿìÒÜÆuu.LWË^üjÚùł–Șę.”Sÿ{P›èòŻOL<”(—qôfT+,Űl ë†{Μ'màĆ„êуîev'?,ˆŐ*K"!©ÀOŒÓKžt8!=Ń- ł,ÁË4Y*Íb„€wMëęÙAš=çćNö I!űBŠ­œűĂK™?w)hÏÆ=?DÜyJÖl ìÎčly”Z‰„vŠ’ìÖ„/›"8ZZ`ïl8víh4|ŚdC˜łŃÖökŸ\KLÚ%èÿxŒaÓśŒ|òŠxá¶ĄfûeŁëúct•Æ\‡vLđÌ=2·é ]TźjŸe( ÜڟY={ Ćëxűhi&őèé%ș“@ű‡ZÖ>/čû)…—ÓϕrčߛàÙ€L¶¶Ć=‹€ŒąÀ[§&ńŠĆő;Ăœêmź6ćŒH/Źû+À­@2uŠmÆîț.†Ÿ©Ű|țVA~‚‡Í seĆ Ì#aJ].Źș •À‚!—‚næÍp ’NŰlZ,a%áEœ–qßwÿáȘJwC$ŁVùôe”xVUÜcȘ1ˊŽë„.ŁÚ—nȘ_Nl!Í. ă“C­ÓAłtăб„­Ńök'öӟLȘłxKŁŽ U e}êÚ¶Ä—Ž”d“]‡KEwń© > Ă2Ž4.łV€Žçj„^ûËAŚߐxÒۆűœzےs¶éò6ęAÖ]$1Ò>ć û ÜPF['űL§ÎČa)8xŹ{Œșe(–BLš5Šl—ŰšÏ.ìÒĄȘ3ŐŠXńW‘ĘT ČMœUP>ǗU‹æÁąT–ŻX@·Ą/Ź(u»©.;™x^í˜oŽ)IÁŠÚš±NÆ.dĆ4mŚU$vĘFH êfeUsyuIÉ1Ô)$Ÿ)Ă.łÔeæaęjŃćqę-xWëoƱ›ì€Ÿ ęHtg6J*A*À— jgۖąŁ*É«} œĐ_9DKçWʆÄ9{ȘHXٖĄTÁś5ONï-așźŰdlbŚ›ˆ™·„ö]œíę“Vm™\ՐȚ|,öÖçńZrĂRű|„EJ«1e:1§șn)š>‰}tÙÀ€Ž»tÂʂv‹ ŒqüĐír é1.ńMșdVč)$©œtGU‡žőä`ÆKXmZFŸš»J:¶ Ûš3Œ”¶É8 )HZsÁ§ì·@ "r&•:ÒQ­Đ-TÉ)`Ąˆmîy޶B}}áÓę|$†Íűłżp­űŁ?ì]ł =¶"9tÌ|œÿK9 qÛüț>@Z­čZ$9FdČi'ìÚßżțb ˜]ŠÔ9a+xv{?ÖÈäČA)ë ńéĂŚăH9Ś żo9S6‹óëÁĐ35Ö(­‰°#3)mÒiĄSrË Q·/UńÌí4Ïț›B‚ŽGĄ€”uÈnsd5Sê9CłKw)]učÈțlŒĄČTą!ìæùe*D% ””Žë7ËrT2BœY»Kâá`ŻĐKíŹR7ŐČÜ”}Ÿś¶EŒÛ­ûˆÜ“éőéË€7Šˆf7„Ąlö8]‡ÌÏŃf;oÒ%Ù1Á»„EAM:ízùÒŰÌ]€ƒxWÿš„ĕ/Ź«T\y$Űt!žïŚÜ:dÓbكÔ5ÜŃ;tÏ .d€!,EQŰ]jÊ:ÌC·Jušèp|ÄDÒièű‰Ü:(żŠőČDêđ»Ž,xęO°Źâìy$ˆ9l.CBúçÒ.՘_Q4a[&ZÍ7ÿt˜ƒżUöš™4à‰z|a!œ !*M±#NÒn"*0ƒÒa›!aΔÈ€K[Dh›Ì;Ç&ùœąk)ÖBR1>d,Cš7ày3[XhŽzúæq ç"uD…‘±ÏńÉ& ]|Ù-ćW ‹*vz]Ÿ$žî@ŃőÔ<ŰÉRDVÆeDڗăw©îĐŸș‡8™†đ֗ò:ćÀgï:‰đÄă#ä+„a”}±–ż,}ł`âHÙT/„A XȁߕæÍ€)iă©ăqXO€ÄNÉ)+"ŁȗbŰR—'íL;Óù|<ïŸ|l(ż“< èŃÒŻ]}\88ŚÂšyÈ?üòĐæê„BOüáOïĐ"7‡ŸD6ì=˜X$›ˆ ‡XRU‹>] ,và:WŹ{ë Ô>ÙŚ„\â$»ęŸÛÎ*öìÒX`ˆÚí6È.ä|` .Čł îB}JwC8cŽ,sšźŻìˆ?țíUȑöOß}[éĂȚŰu@©ožV_vžˆi«łŸi Ń0àù$\APóg­r¶‰±<Ȅ;9Z—…˜(>êÂÆ!{ƹ۳pȘI!6•w^CİۀAì(|©áO>6Ô3 ^OŹĄÔ8ą 8oÊbÇwŚ»'·:UiŃçXOŃ›cZ…žŸÁmeŒhÉ)ç6ńæš`ɂVšáő@9ÊŻ-ï{ćᣓûûûÒ‘"6›ÍDsú_4ćQ‹š‰°hX>8ćt#çì?fƒt0Ú[úì Ä6‘1OÉéŒbkrŸûf'–«`;tgđSꆔnä,€á;‚}·™ &í]ÓlëyҀì@`Ä* %ôRzly«fnô9© A©dšnű“śm°Íź^m+qVÚì<ÚŽqNÎ}™ČSÀĐ@Ś‹UaĐ:ΧÖٔ~óLÚŰ:\~îR„)/ŸžrC¶j',KsŒuP~…»—éh:vđ'±zeiéÂNÙív€lV,4s ŁŸÔnć» hJûäCĄCȘÖđfS-*ÂìʖZ —ÍÊKÊ ȔšhőY8cr‚đ]|$ Jpńû/đ©Ö,$‹ïÖeaȐ]|]Éj‡ÈąXuś:W!ș+ï‰pYT%MòS'‘jŸțÎvĆŻùłp ß`§ËŽ‹í›šu„Ê1Č­łœżŚ’R‰[!#6Źț豆ÒȚOeOy1űŐÍYUÛžłVŸèkćäà3Ë dc{}öٟ¶9—ˆìȘŚÄ>cÁ-!ÚXŸĐĂ˰…Vő–Á+Û.%ëzđáIț|Wéă·ź^ë>‚ú˜"-”ŠcŹâ7kB4č}fƒ“O șÛ`ÎB:ÇS Rá; >”0,Bș«»ŰM˜5@ÂòČŚ”ÄűLl Yż·o`Ó)„žæŰ^bŠò*ÀWŠÎi|ÀæÆBdÜ @ÈïU$ž»/ÌöțĄÈŠ+مê=ș…çdłúąFZ«Û —dĄ…•]eSźpęQ]Í6‰zèbtśI« x« äËöûž9rRa_ê»#‡uŠź“y•Ž-«;o@șbY‚––ăż,Śhpß~Àš„ßű]%ńƒv{9€€‡ŽzJŽ‚ŸDi-›ò"b3Șn“Ő€ÀӇ§KTÀ[„ȘhYțfÜȰFd]Kz ìŠu†u^ËeP͆)Š•Łû„DZț«ÿüŚŽD6\@€b9č)NŻVź&ydAQQFPŚÊ—.”ÛŠšći ™{àÄoòÛRËWs7MGZ‰‚ôh`›”ŒéÔ`¶è.[“ûìŠU—uhđĂïäŠïäê(ÔçDÀŸƒ\ZyIȘ›íƔ*ĆćôSu%#uhpÖ:„"Ä©`śè|_pˆ±VŻĘz^|„ ·ò©cŠ’‹ÌłXœQŐrHÆl l'űnë^ęí€Ô°UmĐ@{ÊźćNžź|eR lbąTŒ5P&gïŒ œ±ùÀńż‘rJ±©ĄhvE3 hZĂkB([w=&$v)Š:”°?'äÿsŒ§ă±ôÚ+ÒzrSX‰Č(ÙâÇb;ȘjĄĆvêâ…Ë,ułh à†i!ęœèŐäb+Ëߌ©RÙ2Útœè.aîR–AtÈcšŠbVHƒ-SŽĂ‚méȚn@+ĐB‡ÙŐžD_KńŒŹŒÛż:<¶MŻUí§Ș/LX@ÆÆdĆ%©”ô]7W~'Ôö§ŽL†-ŐșĂtÉL-'èŽZ¶ÎpČ™ő5ČŐÌ©Śg[–e"șłńÚêk.±„V`7Ę 3ŸŐ4ՙIی°“Śvù Ù $Bkˆ_Yüő_ęĂáÎËR €rlHlöՃ(áș•Ïłr–IȘ€˜j·˜”„TuN@"`szŒw‹€l°’Ÿ!CcčÔe—đ‹4Æ QšŠ \%_s+·+sK«¶V;]ÀRŰçŠàŒnÇńeB,h7äÙÁd’(‡vCęæÍÜžz, kVڟAê•8PaŽrÁéy2a„ĘÛ+Yóž}ìȘ„ŁŠ•4,ą©•‹ À‘Ńă%6ÂmôÀ[B—r…›òÆĄíȔD᭔ű>Ę'7ÏÎïż_̀Œ‹R­ Ű}jŠ,żÙ›ëEw1iuSÆ€X.C†Ű`ÛÈMĂçÄăŒ ÂZŠòz«•Ž9ž€5S+°}{ìêXb–f…sR9YČdj+°e@ûvÿšúölžxüU\/ŚŻ2Àqu€űYáëKç\.Cčdł”kjÊ ÌX5ß[eDë‘0wšùrĘWXŠùŒ{pUÛ”„ŽïË#žÜ)njË0gȞÈkŐ GZ±PùÜÛív˜'YèDûêëîTmÀ·Űˆ!‘˜€ÁAő“Ô@«¶éÀhÿšQÒówš@2\Ž9ûÛ*ÊòŃt;œ/(Ź8Ž0„ûL#ž7ŠÚç€Iòù·Č;çö­ Ü?>ëw,æđQŸ7nÖoȚ|ß”ÇæŁ=‹°@äÊr–ÀÆSű%ț7ƒàBŚĐŰfőńĆŠž +Żä=aA‚à­áyž!)e‰Èf˜"/9œPî>uÈ œqÙ§k}qđńOőpÙpl)y(żÆ™€ștƒ„0b¶Ś‚!!DV3ÄCŚÜQčEobŠR`Ÿàn­lÖĄqŁÌ`x#X‡Vš:ŒÔ`Æ]0qĆiŐŹčźv42‡ń°ùRïv4p„+đ@ÇŻ•x‹1ìZËyK_ÓeȚß`Źö9a„ôŰ, ^âŽEт!@Ǝƒ|”€íFÆÇhtä|Àąœ{û”'*íłxYR” ÂLÜ™O u:­RTëű‘Oy .^Ÿ4æQ-F۔z4jș0…¶dâŠMƒ,àčEP†¶łX8äčŽh¶„DçqÏă? °æà±{żŸ”VȘŚtžïȘ;󉡼±’Ö'ŚȚz]©nŒBËƗäEń ITâéŚBQ5ÈXȘ},”Íž šđĐ ¶§©_Âæ9Jœăێ;胫KgœGç| €M4ńÚźĄ("ŠŹ GÄJ=łŠŠćÌÛ3ŽéTX䩔æ»±ĐűÚPÀfOg݈ˆ ‘đĄíŐ~àÏłù=(&Ű#AFÊŹ“çđî-•#š$dJ,Č-Oç·Z”: …žbžàgś9$ÊÂ"’–« °ûÔ~YZù€^‘pÜZÔ*ÂĘK›éŽü2Ú}ŸvîÏÆçƒóÉdPŸŰäq;íăžĂƚ)›˜č VĄi蠜5EŻCQšÙ|ž]ÀĘő‰Z}3G›,»ŽíŰ’œûȧ]šÁ ìí%–MۗÄ}eÈjșđ DLzguízẽ')æ.Yäz2Ïćæ2K,€v ,`ź^ßË#KűäAöc•ìÀ‚[ŽéœIWÔÙ"8‚4RR7ÇéfèŽçւŽ›çÍ.«`kśùàțll!1uvX Nśe<ęúöùŸvnMƈ€W ąw,WŒßç€Ô\d^!tPWÌ^;śœûAkž+Ć<îâ^Ńnn-ńŹtΕձ Áíą 9SB© `ŽDžIP”Ń;Ç1?„Ž8ÆMŚkUF:ŹÚ%+§ÿüÙ:`Ë3ÿí'"ćŹ@TÜó ZÚu6Œ60V‡…“1~«Żœ†Fć' dՐŸ]AeÒú Üî4éšá”€Đ#ÔgÊ""<4çOŸ;„̘‰ő9âiƒłz€M#œL©Àe1e:­„Cš7 x„€f~”Ær;.ó8UŐ.KÍï±hxêì°üЉR,p/đ ‰n·7ź„lpàxæT kÙ1żčŁÔ2,ęoZ9Æp©Ba›}’uÚ@ï °‰RCæ ë^”Op_҅ìU1Ëä:«*„.WÀ“.·ž„锂2źíŁ„krŐtŰW%ŻL{Q[\7ôâ[Ț˜Č?ü՚^c+áWł!Ś-ă@HYÍXŽˆĘŚ”8OÜŸŸö!3ŠH'@d8€­5`@͙m { '„F§ Äg ä+I'=%<Ć òÏ~G) -»’4”p™•hțÓâȚFŸŹP 삔K:œ­ÄŚ.=ž•ï Ż üqiû‚œ+L/h"~ó`Öm°‚đKäĄ[Ná^e€űŹÚXÉgí‹8ăŸpg€ÿśe y¶ßU‹ .Ć Źaéő@0`†ùTæïčŠŒ„Ń:vĂËPn ”Ÿz—CÈ̀:Ž”ŸôjyeWúę'Avğűv«ąńÙÇźŠ”łFrM‰ôcŚłń[ò’ Bqśdv§;z–š}ä!œuˆąÔ+é°0Ô1b!_D]Q<@žLšêŒ`őö‹çÙ% N‹ó$+E©È\zMpOőz Sè»IŠÒœ·hèLiw ĐSüT€HG—ÓîŐJ#‚ÓȚæÓÖ +ŸÓ1ôü€ĂçIÎȚ,€cMÈ&ôw|Ăüfi*^ƒœ/@fEOÊúI_dőđB#8 svÚ!>ê.‘†V±<Žž€‰FpÎW\‹L8VAƒeb ŹA·ʅĄ§6!č2^'€©-Őë7Ÿêö"á›wÄ?ÿ;n$Û|zË+.„z5șRÀ†vcĆ­pEĔ5‘ˆžûú4›ok=ËÈfĘà]Qš€9aĆx„Tó ‹·Ó[nȘ†]ĆÓÄ\9. ,f‰4n2Ń*dçȘđŠb‘ |@ìïÙpȄ…·5ÓiÀéŽăŽ™Łšț­ß.5LˆÖìÀÀŸ»<€Ęëˆß\60‘:·Pś ÌYˆšžÄdçE ŽÒz)§•A_XŰ&;ăœ@€đRŃŒĆPò—źČĐ š˜Väœn`áϞXUf§fJVó–@ù íŃœH雬nŠń\—çȚŰżùA€wțeú‘ŻÚœUuăr=XՓzęÍă@\Y‰ˆ ÉûîéqËšûŐ;Žq;țHFۇ†nqv6™ŠÖÒۛ ÛÊ=ji\NJ읚%űÁĄÁ ê‰Çé@ł–łșz5J“fÙ űËĄ.‹…VŒ€^ƒÈÒSÓ4ÀhS€ùĂŽ «-',R?j[8ž@ńÖÏß\"QÆ›ÉCäĂÌČ^+©›ŚäÖà+ôäpxAÊČŐ7\1]{T+Q.U nXöCX‰ÒFĄNȘWŃàï}UURĄÁg”:­4úŃ„AÊ"fĘ"(èÉÚłOzF€)ĂY{ß+Ô#„oRrǍ'Wl±gí-Ïș*„š*-2ÙÈÎșŒ7”.†=Ÿ&’ńäÁ͛!»œą 5â».Ă"ÂfJțž,\5ó ­ŒR]E™^lŠü'Ëmț$@ńdjœs•Œà@›ís€žŚ›u08Ô9fŐh‡ę€±LOș^ÀQ~\  +oș·ôć7sAĄŸâ źrÀuzÒźÁ„Á5y"b+Wô|aY§±”6űźŐč#Ó[ŻÁŹÍČUæ‡Ű_ȘN[űČB-ŁòRÀY-đAù1yÈr’F!„oÒnC’­űc•)Ăîú̃/űÛČÜ{àű›~èŐx‡œÒ­ÌL]Öżl+é5:ő˜ńŃíko {Š\:"†˜+jłYà딄ˆŹVhŃR©IŁĆ’ Š3ŐjŸÍ `%ëŠ€È•Ő mț”Èä_[ Äú›%sLĐmmłŸËŚĐzy‘„ÁśE~(6$†Çz] àZGa„džž‰fbKtĘšà°ÊC‰„Ó[iƒÌŚń”Ű„JŻ$ś« ő6È Š*Kí’ù~ĘÀ·òòL…«ˆ3M­Ö<çU„€êAéb“€ËG}€)Ă%*söe“v)ć7ßxńkï­Țrü–źŻVˆ*șY#5ȘŠŚGÈšĆ§!ĄtÆ2|tûș›@€oÔ/ „T¶'ûDĆ4oæ‡;2ëAR*çD2Œš±űÁrŠ·X1Ì3 țÈPŒcèpfz›2Ő4Ó €M›lÔ:€ |„Žź(jŠz–gč•$ ÌaËz(é4JL3Ò6Ù‘èT†țì}›œn{ęôúŹa€ÍÏÊLtĄŠ<€@OQŠŒ!±ß™‹źÚ˜„ŃáÎó5:yc#ę„éß&pꖘÿšș"c±˜y3Ź~~D‡aÀWgŠÄéăÉ@ŽXđA©zRi8Żș‘ű&íI…Ù*Á B•Rú&]Rșď¶_q/°êÄȚűKwx›ŸȘä·›Čèźź7ܕ성”t(nʈgü9…@{ű’ó†úG›WĘb֐Rą«ÛÊ€ĄTŒć“ń\€ž]ë0P)ćÄ rÆÀÌńŚæ­âĐ0š¶HԈöUw:!“OŹËß)ćDbgtł—ÒŰgj{_揰á™Ć„DJi›Œyà’{ăB?ûîtNJÂfÓŸ?źÄȘ2„čVh,ÊCï˜c`} $đ\-*đőödÚiKśR,LcÚ1Łœ^Ó"Ï)$ŸC(lÀèàškć ÌRźŚÊ”śŚCò°çÈ)Ă%…;^E§XĐTĔ‘tJ©ÔßőăĂÏŒ XęՑsęӁ]Íß /źÒkgѱ„9qÛÈDÔźêBú ù ù$”zá @ÖËú!dŰzٞ|jsë’GŽ€ŹŻN|Ś„6-(!*>Z!aÓÓ„Óæv>;É$˜!Ś,}ŽK˜§ Ò4œŽIˆÒ1G»„òŒLkÚĘl!Ëś†;†Ë|jÛ$$BËZ8Ÿ]û"kb!}a§Hgămaáüțtš€[BŒœIBÖI§Ï]W4Cxê  …·'ö{%ÌGÖ!áÚpÇùš–9ê“1ôÂkîVXÉXápLb=?†Äú›Ő©h=Ô_[äüŹ“;†‡ę’eËŽźÒ-6Iű‰.íR6^ŒșŁò+34›e©Û•Ï<˜|òó=@só]śOŽmu=ržœŰÏ\¶‚T€€Ńˆa gÛÒ7ÖŽ$6g±ĘÈÆCMgžÚš2K$Ò·ŽzgńÁ€Ă.Œï,}'êŻIšș@Læ%‡b„Ępč„*…€3Tސ†±Gś©œ\Ćç†Ëű‚eÛÆJÏW+ÚšŸ[ążŰ©ßś­Ákë/VÂĄJq-ȚÿaáŚ/ß|_·9ïáŸm9L¶ÓАѩРC›+kÊCbU€,¶[#€Xą€IÖN°|…ɌƒúCG§s…QŠY"Ï)|u áË’ĆKŻvà›tĂűÎRF!3E•ÿÖ@yZaU–tę*€ŒK—!ŸQíÔx˜§Ô(Y‡ë«oŸđÁݚ{~Ęșç†^àăÿh{€”ŰAs5ÏèùA–X7Íj\Š„P „DĄWÈÌŽ†lâöكwUä™éóß:đHî·ŃŁ-GS^Ê8äTR±ÓȂfMiï">§­”™Ț°k°`91AbŁIƒ|d”Ô Šöh5M4 OŐPźçZŹŹÓĐú-J„@üÚòŒé2Àfh;ßœíűh—sq°ȘžR“qOXüŁęÁ™ááȚ‡Zaæ(-ƒƒš;··æĐ­”xco\źÂIx[°·Őjʅz bƒk–ÊŃÒYh·–ÁŻÔ uß@Nvw&ûT e<Ś`U ŽŻ#CF«pÂèJEƒ«ƒkFŚłœl™ÊW‰ô­€ò3H…‡[OJÀ.ÉțsÏPÚ]]‚’ț”ő?Üră?–“ ĘÛ·<0öĆa>țe‡bÁ;HpfKś}‰T1B`(ćF2áŰŹ5–'΄łZ\»–:ŽßiȘ COp䟁éÖÁ`˜Òl.lšfAÖK©­ÄO&çˉčYXàZo=P+ò‘íXÀ BűK Žb‡ìUA™ŹȚÇÆŹ#o”-È%O}qžíD%‘ˆ°â©˜h‹đŐÖMÉĄĄŸ»§èčž{!=1xZÛŒ­Íg†ˆhvûșr,ˆù ÔȚĄĘ9Fđ OcK1i7\„…:Yoƒ;_ʱ‚ˆ •<=Ńí0DËpó_>V0HY–Ó'!=VŽw‹=‘[ć¶AvîIV!$^»4Ò;;_耶Q^(V*7ûč­MwšvtôM_úÒ%Œ;Ü/æńÀD_,łšîșQÜóRTÂP Ï[ Ç:,Ü12uőčČżŁy†àJ`bä(^ÚfțbúÀ}ç%НgżV^yé àQÁ)s%9sŠÊ+ùđi YÜń@’:­hšHëpöh`SƒŽZ“ÊŒ,|C-‡1¶jeŠŽ†@:Q°VÉ ™ ^Ęś­ÁÕEĘ0ŠSÄ&co"ÙŽqapïȘgöž„OêÉáaèĘÚæŻlżkOB9FàŚJŒ1 dč§q‘”ŃOmÖJ‚P òbgX‰•@„ÓА^›šš€qK țžîóhčd€’'­Hłć<·JUŻČò”@Ű$BAŹ.îŠÒëà±uăyM%€ÛÜőÒ±cû7w·æ¶°șví[ź^>alkęgÂvSÎź/ D‹x‚a EeÚŹ8çŸê)Ń©C@‹‡°ùO^òŹĆŸ…SGpź;-źćÏùžq;Ađ\0kÆ””§èĆLiÔ0ÏGś‡)[É뀠Ո#0pa[žăĂ›W±jŒEłÁ:Êu„šÊĄ–i",5­çú ÔŐAł6gZ”žÊ.3% —YnțŸ»ą©ÙGXO:o Ś9żÿÇY»mx/˜eH7ÙèèômoÈ2úӓ†›ŸȚò+!öu—‹M: /ò4.șæ“ûˆ©DőVűûĄÎá°ĝÉ^+T:Ü y›–Ê"á †]Œyr•&ÔąÖŠq  Œò"âKlpäŽè’UŚŻśVœÚ[ț*țæ° ëŸŃ·dûƒ=«œŠ€i[·îž]Ÿ^ŰuZʐ{NpÖU‰u0C E©rą\CìĐ]9"úŸa`śBzbp]+ČÌ~œ^fèȚ‹?Œ}~s«,ńŹĐ%œ]Â>ŠÜ§G–xmWΏźqą‡}œ ±Ç_±Śïäz­èvÍߜÀ!K*Ś$=’`áDoüáĐ­€ČNĂő}WdąÊÂ|úTq§4ÿ·C}“,ÎŽ<·zÇ”TÆŹwżUڙvŠ{¶|âԑôŽ3†Ân:^ńE2%»Ü°0ĆÂJQaőőę»Íqÿt`:œ'gNìüčbéN;Àê3/H…Æ+ßœ/śâ š…p8őüčșYȒŒ©+YgK0c;œùÁ/!5K†LvŰp€>‘›—‘AòĘ2w”Èu\űVîö’í0SŁùu©KąŠÓđû9Ç”ŠŠwđX»=]"6ćAĐ7•¶Ï‘/ÀtđĘo9vđòö3) ČYCTZ „Öœž3)AËH!òí¶ă­ævùŃQZ/äùyázúśúi9Țö}GÆ-ŸçȈâBȚyPÙdźÜtéŽȘvBW@$ŚÙN`Šę°Ő(Ïazč•«č_w᥶#{XDÙ h…QîÂS.KHBű žȚ»P Q ‘d…Š~őÜô9 y2Öč öHR™‘žúMłóœùÛ +lÚm@æKZŚÈ^àîy”ˆ[Ü^‹pž‚ĂxŽnëŹy“0sœ¶ÆïtœˆŸÉƒșŹŚTÙz”3t\á0}@Âòx-0Ä? ’ ·ÊMŽn)eܰ9 ;żyźZ*đőI‘ÍeTúCJ},¶:,Ánsk_:öæÆÛ?ó'¶:±“ÚöFŁi ‚*(R d€ÌúźÛ}!?%1_ŻŰà2Oû5€ńŁžÍ?0ôĆ$o/AÚ<‘(žxFæőÓ8·?™n$Ă”[ÀRÀPIâT\[—)ÊŁŸ83%dfm9șęèM†Ą(?*Ì;ӔÙȚDJ+ Œ˜ÈęÒ Sò%șGós.1›,,âr)ZsG˜rêš 5§6À‚RŸÊ’hĄo1­dÀ+ Ÿ4Ô9–3†œÏ‘q¶*à&cÉÄšziŃędP „7Ț”ŸfĂùÜfÍjÛ38ê,f7€K "eˆœ[ÍÀs9‹TŠŚd H‡ßb œPnXÈ4éžzùŠú&íNĂ Š”k‰*Êî!Vڔ܋œY€Oj]yäy(„2ڊ…ZaÛ°Yâîl7e±k2#`ažc :!ă‘d±V,'œPn>ÏĄMÒŚ>—;ĄÛVŐP”C{ÿibő5™;ĂÒíŠ|8Üč%Î48œYê†vÈ%Ąę3ŸFŰ-\PąV1Hq[ÔőšÜ”X}AšMÔmżÈ=æË±çb{ŒEAëæu2äŸÂÉf oh8w€vŚțțŐÓ*ő‘:ćVOi*Í$“"•1č°ć”€^ĄąÒ[^ùۇV ZYȄű?è2ErA­#·T»CHÛùeŽ9|ìč{ú‹óŃÆÆ?ßkU§p kűź™ úۍ¶Ò„ú{ČÀBżwőÉ=遲ôYa”k/‘ŃœűĂSôŐA*/ŽőȘ@âZgĄ*Ćl°ŻŽ`‚ ĐV5äí.ßÁčCó,™ČYjĆU:|+ ”źÜ OÿÁ·΄GG«šÂŸ"ÆZ!DźÎÊn#›žŐŽŒŸÏôÛ”o1‘đéś^ßc/Æț‡ZbŽrfC­ŽDFbł©©|uÆX€đ”~0·„/ ·ț„ąUĐLÔđE\)ÙčplEŽwŒőì„URž7*őęVrÎÛć'a=$UŰrlĆĐ0öźä»ßlO€™tYí2p¶ŒÛ‡Eœm‰œ­ÚŽĆGŹfż“Uú 6Û"Ò ŸnJ°ê‰©łĂÁ­öž§<Öyûœ{œ ÀęBÉP7G€ôqV ùŸ¶'@”șoŻŻM°mžæyMŸcÿȘš9&ÓŠ űÆĐ§Ef)°+Sy“YąìŒ™ÍÂôpç Ó˜°D0šUĘÏZ2jČ·J™ dś¶Ó–‚6I}”üƶg?>Ÿć—0BoÔłÓă )ö””:}XűÈœë>ttÁ")ŃE'è&0ƕ2ČvGÌ à(iîŽvn7Mhé/ČÊŁŚN€YĐŠ°=·ûćțß3™IęúĕՓk8æä—6ÙjœÜ^xxÍ ûk-0î¶ä…JőZLÔí@ê}€ęŐ<=ÉBÚIvuUoeo҃ć!"Jc‰ÓyȚgiȘè #@äü‹¶Ć±üaEńÎO”A[Û¶—‡Žú/” Žcômwö™Òqö: Hšî“°ÌÍś9);ûź#mœCë«șÊvόgzś8eÆ|±œI^ČT+Ę|^uY'Œ+ œ5Ín‹Ż»Rțąù@Ï9lJXÓš„ÒDò&@Yž‚˜rO‡včé_ lUßXuđɖGŸùđ\|ÊEêÀŠUŽæêö•ș ±9o) TR­EŻ8Ìê¶ÜùM ž’|_źőKă­gu0tĆ­ŰAŒŽjűùûÍ·êÿăWV»!ӝł°ęôűŠó$Ą ˜œCĂéT1`a­'­Æ” 8™Û»É(pFë|Ń,*{Úu`ś©^J’ÚÂp9ϜĂ)oÈ^”‹FŸń¶Ü?ëê€Moùí«Ă'Hl« ć7ïÈűȝXW3n{ 4)äŽAVÉç}'Ê)T·gÄìvŒ­?ëë’@æ§ÇX}YLì]ì gë êÆóśžàmæWí;Ô9ڌíFÖ5o«œ’ÓȘ[«ő5‚ïFŽŠŽKX(5èi”/,è 7`q%ŁŸ‹”PUzć68[2q€„âá‹Q0ÏÖÚ,ÌŁr\ĐłÊò‹žÖ%‚px"@`ÏöłC ZÚÇè};"jÉR«‚ g‡)ìÈžĘöâ Û j=yéG› Ű9˜Ź( œ/€ą¶+yhì/-.“Q{€ÉIMFhÀ Ș/ï0(Wð0èÍUÌ «C…§Wœäƒ&"¶DłX[”‹FŁ§Ì”áÙŽiӍ›—€ò2+hńÙ­áY6xr»YŻ[p“i4”ôŒĘźÙy“$~<àé9kê UëvùÇdcŽ<ïđ ˆ{M,h}æÉۂäcŸeډwuQ5°d8_.H”û‘í9:ł:hĄ1'ČˆXmS )Ô;B°0ÊđhHV1çÜ.a–1‹– ÊžÄæF°s‹ä†bčç}^ïj§‚M°ÄŸˆ3­pöíđJsèźšxû֗‡ææšŻ±? 9­ÛC8{Z[łÚRZĂ>ćÙtu°3 ErćT ۶0\Šo||ŽŸmčUNäƙ! l(a~Im+È٘Œk%ŒŒIêń·Î.4B*ż<Ț0đ2-芙Ći±aƒ4!?xpŃueiPNˆ€7uòô^`ś©ękƒqóf^§ë:.;–C^%è…ćä"îȚ8Żă4PÈȚìkÏ@đIÍç?›#¶XՂE>" y,Èl9ŚÏ.ÓčâÀq_à[Ÿ»SÌÚŰ46fGtæj[Oˆ3vàÇ«JłöBЁXÀ"Đ_[3Ÿ”7ćlĘáËŒŹA$öÛf@ wœÌkžŸ^€mæKŸp!"KY?œCùS»<*ZÜš…5\l…Ę„éőŁ[iŒcÊ?ÂêSeÛșőòéyő}ržȚTąŽÌ­XxyTëÊ]5]qFÖ%úśKžÍQôu\ògaûpp=Ű@ $Ąmr ët!uÜw _ą§€țîS* (3č}>~Ûbԛiî@,@G+/cy*a«ŃŠa†9éϙüW–Ê`À-SŠ7ł…ăûțUźŽŃfÇ"ÉJ,ƒotQù!—i‚Ì„/Ë=ÀŐ?ÓZÛ N{‡ö…­FëLŁfб<ïč/ÒgnÖ-ûû#eă|‹{Źú͝Ț)«č%ì(«ië›d(°8ÁÒÎüæŰu òz§„€ÚÙÎA,˜ À{Ìz©k†·KX¶Êź­[A0A*$jæŃA±˜jNüń–ëœX˜n&©ż|ÛÀșu—ŚI@q”TQ­Z”\>­55”r)ăžËʱ/ŸOČ`OđÆi˂ìšÏs :8…șsp8FŠćŒ _Ôș.–`ë=ÀdŽčÔ;àlÁèÎ+ié€đ]ÎjíĂyłXĆMß:ź˜śuù“›ËÿŠ80vÌă}Án9ÎRńæ6–’YŹNH őt‰G;à•ăl8Łž Rą3-Äây5A~łjT hì—oËi|'VßxۓŚb««ș…M)ÉÜ[Ÿ\HšŒZłöd†NYVêžPŸșá’É”M˜Ż­Xû0èFsZҌ”gÎn…ńpudÜŁ›ęŰ\œc&ßjʃ­'(Î Ù[4Xnz<–R{·I€uqł·æTśžčX>ÇŽżD^•xyˆÎUƒekQ‹{Æ:æŸű(d[ S’ńÙU°5`’Ű1 & w+-bÊêVXÎjćGx$Ù&óŁ3á|yšùÏöš;Κ2YáœpaÉlïrT=Ù€łs[@XˆÆæą„C:œÛsÒn­lëim”¶Ö–˜Í?kLžó.«_9‡Ăa¶É âN˜jù Ì/șG\b"@„ ŚÚs3ŽDÂ,DbłôŚ\f«^`\ë(~Ęiɝlż$`|žùÏrfœˆčÚVçÇÒùÌžät0xÓ 4j7äżÊ•9}”Š+a·š~3.”4ùŽÛâú„@đ"œ\ìś­û‘!@_†Ú"±7,çÚnœ3ËG9öÈĐî{"&ȚűÂ(JĐdĄńWź±t3ă@ÎRĐ~žÎ )șè ÒŽ€uĂúŠßż”r\»@ËźúóÀp yD_D‹Zgä8íÉjŸŒź$Èí?ĆÛQ~„wpTëxÁŸmê@Ę) őœ$Ő<çZdœœ’ą­{ŽÈbGá°íDzÒÙăెÄ=úąVuëdÙűS«.Ò4±^Ç6ăń(V§s]B\RÓVÊ `ŒĂNăߋ¶X=Á/î€s|2hÀEè6 vg`§zs ì„YÈàÈŒî?Ùçû==/)€Ę’äjIĂÈOŚndbe%I% ]gŸ7óĘúu'%éœŃÌrĐ d[1ŐŰ/ÍÄ̞3c »Ęqă/ŚP”t Žk›;ÇYŸËĐü©Ê8(èùŸĆ:Dç8W[*ŒíœÖ9Îțœ(HÀ[)„î2ăÁò‰Œ„TÀž«„ÖE€x·IŃN2IÛ.vŽwŽsZcĆž,ęŽÉѝtŽŻźP—ÜŻÚ·v€tÏé”R3‘źsÜ]òj‚ŐŸús\Ń:Ç;Ç;'c«§Ê:śÎÌÁžÄnîo=ŚĘŽ—7“-BĄșlçxPë)᎝ăăÁQ­7@ç8g”Ž‹č‘Iaʚ>œs-eú’ăŒÓČW&{Z§Ę(gŰáúq?śfxœƒęŸ-Ï+ÒŽőŰcŠ›¶é c!ŸOq:ŽR2#ä[f{wÁÖŰe‰Ïn˜„·oțZçÈÙ/¶kó_»/c(bÔ\§„ĘFy uÆó‰b挀q‚ĂÍBÆ+'hŒ3êrT*Ąd!Ź«=!!@ wcc7g|aPńo™Č‡—WkƒÁqÆ]3:šK+_Í„€źëșź—ëh’9`œòșœJtș»;•J­h϶Ïxą+șËeÛ±! ŽYęDRJ&MÍĐTn糌3Z47ÎÙÓCšwh08ŁV6qIőkA 5ÒZÇ!X(«'„”·JMz<ꯈŚûJ ~Ń·ćy“ (ŠL‰…ÈŰÀ źą|ăšłŃPé茙䀌ł/Ü%'e֏OÏȚ,H8kšG"RJ)»ûæúČŽ:TWăHU^͋ A+Ù5iW©yÎbIÿ^ÊXȚâZÎ-4jȚŠ#šȚuu§0<=ìôϟ”źź2±šŃ žYN/ž„j‘Ë{Í-:2SĘÒŰžžJŐŹš“ŐșÊBíL ±Ëœ ,h]ç-_w ƒ§‡4ÿ]«»: jÏžJ.™{''›œbŠŐŻ”ÙŒĘ{ü<Żí*'ÔŚżßÇì@,é„ólkËšmÙTÁ|J ČÁ•ŹĐPŐmƒéҁúe Derö¶sđśûT@œ{0š’1„p]_YšȚAە »AaĘêç$Í$ù$0Üüg{aX*|ærä␠€{Oj±wÜÄü‚łÀțž•Q)˜X53d– YòH ùùŒèì]šQèUËiȘÁžeOKÈașGKĐKìxY%È ÓĐŹao #hŒ: «”Ëó+Ű=3>!&!*ïu-©s  ›MčêÓGôŸ˜żqŒôęácŽNçqpŰC! »ŁA±ÆòjOŠêśŠfcÓf7Œ_ĄŻŽŰwYÏ5uȚÂi€ŚÙŹ}SSAk훝ƒVUmQsLżäÊQ(STšÈ œÖȘmš pńF]če·. ŒíxŻÄ40FK%Š» ©°dòzɰ›ëőXÊ„(„šn5ŁeźßšĘEbôš‰ŁC”*š<ßʐ©§Fæ—9șúÙ$Àè0Êèq3ßÜ40Jë°(ò„-+ę+ŻM(v8yicOÏÆóŐ+1_p)Ż”Û!YŚp|0vË(0xűžçž…Sj?>FûtQčÊ% © 슔,.4ił«‡#9sc>ečÀ6 ]òĘÈŚ|ÔoȚ±‚uđ›Q€» BÆpțŁŁÁ›Šä9iÖ€^‘7ÀNÿädÙŸH-gÇë@RÉ3ĘH­ŁR`»˜łlŒć] N@hŃŰK™Ă \­Ő…û’é­’CZsO­œ“év§6$=5=șŹŃȚäšÖ|ŚH™œ”=ăi(ž?/%Šg'g'óÌôüƋ竚?L™PKYŰő-rxWJȘ.gÿĄá[Đ3óCÇś7·{Ő…{ó9ĐŒćČ,Úóí†v CIŚÛ€°!À(UÓ@—ŠŽ™æN Ÿ9H“/ìÊùŒ1q“‡€o;§"»ŻòNțŸÁÙZmą6tÆș!Ԕ#“ĘŒY„MÙ ŁĘČ.váVhŁŃŽăĄ"AÊrî'ÆȘPÜHhlZjNsAVs9, öżî±ketR ˜^53Œˆv5Œrg€’„$}æB{ȚiŰőžŁ5ËȚ_î §‡Őn Ùî\ôĂ&IŠÓYŽóą#źJpżrg€…Ä«Ę0–3€–à@ž bó”?•@sÍpQZ=· ÊËvi§_™>Ö·œ§ÖŽ„™im(țæ/ŸÖÀï™Űń2­ùv§hĘôŒőkv°Ï;p˜ŠgŁ"éĂ0íú%,ÁÜqŠŠ©Nűæ /°Ël,·ëă7‡”dÚÇOÿ‘ ÛO‡Z0RK ˆőwć왔Q”KMéä°J7H§î*ecZÇ3{u€”6Ö WŻșmw†[‹ź&-o.,»J”œĆŚŐT‡śG™ đ/šĘ–GĘĂăl•±@í†ŰOáÇÉ·/R[ŻÆNŃŒĄŃ©ž?Z[»âë"a 2?źï©œĂfÆyäłò"œ[’ü8y_l€ÆòВńE6‡-]B8îę!€#ùr2ÙœnÍŒ•Ê>·Êu\ÛyÚeӍ©ÁÁŸ»ŚTÙé~€Ÿ»Śhég –nżWč4żí‡Œ&á}sĐÓxI©ڐMŰíȘĄ ‡Œ5›œpF€š`IlŒ?Íđ€Ïćös =[DH5Ę4†ŐœÖź~ŽŸuÆŚb;)kÈŸbőuäÿçUăŐMĆx4wÇy §eÇžÉćÀ¶mòćèë‚ûï Š©;tûőÜ74•¶–źœ:hW*!ÁösšpûĘeŽ*Äjy%Ä« ášzÆ»ÖyI_d …U–3M”„ûvȚĘ_°h4›łZŒ@†ły&7um[\Í©j2•őȘóSčź7Tèùmgâùa”œ­ß žÒÊĆÿ4ßò3TxĂ4Ç~ë/èŻ”ÎŽQ—P…œőj„śmȘrȘä‹ÍY\É\l^sVU`UæÀœgâûr‡SĂ·îlÙ°sé-)EŐ3‡š—qEŒ.·ž~ĄČ-Ț —i?g#*Š’B‚Œ)`Ûč‚ŃJ;v`ÛeËÉÚ4 4à•W3ü”ú@òé’:|/Ń拆4€Ë—m·Ž9ó„ÔŽÜRzlĆïrùČѓŻ[Șž*í6ŃL=Bkžžż Čöœ.”©źÙg*ĐnŠŚLŚúŽȚl‘ÎÜ#Żæ{󶚑iúŹ…É]WçÌϞ-oáÈeŰÚ-ç5wŸ\ÜłèˆÀsù+@ç"°îYÙy Ȝ-gŚ·J53îLčlúêï;օú9Tààg·č|9”ŸđŹ> tÄC‡sćY ”œ)öȚsńę[Ìyœ2 ŠÊž“bT%t„tEŠR•ù™€•md=çpä,s¶[š#*J2ățò ߊȚĄčeYzÍ bJ”Š+Ò2ÒKëŠ&èłŽla~ù”«Áêț;“‹Ó˜{ Đ\ŃK`î uòUƒ3àÈöŒÉڗŽt8_vUܶȘßâ~9ËÎ|žÇ|ö{ùí@§sxiȉ­ŠúđO/Ui)ûrêÀąŽă% đÚă7­Y·JMEÚSbĆY'Ü;ră蟜uä•uú¶­p’À6g>ŒÀ”ùî=—ì3Ł5Óßôlxi1îæ7y6Źą8íiFVËÊlv\ˆh óÏłt•§šÒ#·, ô>ÊÂńfÏXÍWšBe–”L>NĘ:ÀU!ͱxt|"/bەP@–”êŒT‘˜cÍV9éłlwćö>vE(f”^Y„éÒŠqd ĂžŁč 0Æ^Čç{\S7Râ*d ‘mKjb9æÇ Ő {*ăÈMÇQ $ŐDZćgčdò]ŽÌèŻ (ż%ÒÔ耎Iöo‡=át:©ŃÄăŻR±äȚŸ†úȚ)n|Zóù/UŰ·ùŃ·.„$§ĆɊxÛI­Ż±/\Ÿ4dÎŰŚ>#3:ÖĘŰśą-ł<ûqŸćTJ ÀĄ±ž—kŻ…êȘ›çR™8‹ÚU™@ —ȘƒŒš(Â’„ê KÁ„źUӚ܌Ìaœć7Ržż{%M‹ËF3°ÿ|ŸoŒš@̍wCeECŹË”MÊëŒĆ6É»šŸy=@†á M…‰mŁę}ï öqv ¶ÌÌ ájp_ÊmHQHŽ„{s8pÌŐ:œPiÛædÓt(zM+„X„őʍ`űp@ŽáÈ"Ąuî„;Šqhę\Ûă.,ÙśÌAÌVA̘X3mgźżU#!‹6„Ă /x±ŽÆ‘P„nțYICûąkłÛl4 .,˜6æ’KŻnÓiK5Żì˘rÁgïćù»Vòł|2, d¶ÄŻ-)ąć•w­ŠqÁí\s5L$-Ă7Ć ŒĂœA—=3NŠlÇß:(ę2êĘHg»ìƒìqÀ*-Œćç`gă… )K$œŽ3ńŸ=Hà|?M•·mQæŸS —«6óÆG©łƒŹœ| 8€h $ÎÖË€¶ŸGŰ3œ15@{ , qö țMóș VdŐ¶ÍeÒ$­UŹ^Í܄çúF„H)‹ (Z„LÙ”lÁ^šH\9gSŻ)Ái›âڰEB§zț&ۀ”GœnmrȘž„ò»ÛjæöŸŹÖłXw=țΗX}ČùŚȚäV_wd±ghœ›”è,͟**nŻ(śž ś>ê€áB•‡òM›[ćŽô}{çû=ț*8`A=­éM”ć±jŠ7ÂÓxù”àąí†#ƒßw ’ž”©>ÚÄü—”ś„ȘhC aćÜŹ`3©TÎä›5êÙ’șŽj+ńì›-RÛ)ÁwŹžàw–TjqÛl(B /oŠúr|&ĘʗŠX`ÏĐžp (PĐ Čő·<.ْry.+ æ’ž‹79±úș#kÏĐ~!ćNæi««íu„àȚsɞG±~Oó„J„[™žžê}»)œxzÎVÛÙÖŒűŹ?fSjŠ9o;†fwçóŒ6$Űò3X9 dU6\td%œ{`țKšgĂKUz–-!GÆí\{vꔿRæ'”š·òÓEtÚœ)YąIuŹ:YyĆćÖk!üš Ÿ„Ê©,oś/Ƃ sčqKȗ”Đo°€^—čŐŃ șÌ-„œaԑ•kźr H@†Őš«Ò·^/P ȚäGÀw[§+ 8ś^0B6:s(ÀÂqn?W]Â)če‰Ęę¶ Ź8û5@nk>Șcś)„ĂïÛò»CjcAKl;Ÿv¶^†`Sí„4g”qքŁÍH:–±5DțÀ’ùB|CŐb{7/żI7pcMÇ„œ–ÔÙz’[Ɓ|—YÏ­aha3Ìęđń9ê7; ±ćgĐĐęRțä—H„Lűu„ íÆŸžD]‚ŁŽ„š(Ù]uˆG›œu‰șu‰ô§”Ő5$œêžÊfć5›†Ź_Mz kV.ôŒ ęèU€íBžÁ‚5—ÒÂ/jpŒŒ««g9H•ëë°őiûY›Jæ óܜYŽÖìSuŻADĘÁ‰'CÎËł+nZ"Û2gł*h)?· Oê_”‚ŠĐ>Vyżóy]źțÎ7FęÓ5¶l‰čÊ0–r|ÂP^;X0Ngźńź©¶—VŒn € Ô0œ±Â)í’5zű’’$ÎúȘ€5 ȘVtŃ«Ú]ÌËóșîęâ Ű8ž«!äU/ŸöŽ%\fO-ŻLp~ź&\ÿCB(űn~ ç0l2őŻJAŚ•Í. ęVLŐh˜Ăé!_-("ĄR_: NJ]€x­»_©˜Â©}ûrÌcŸ—jä]dìÔÜÜYu©uÈ5,ˆčŻÏȚ/ÿÀOôüŸŐ_;i{±ŚÍŸ șn·q“qÿșQäż(Ó4Ёï ù6NUáh ±y~€u ”öK±hD,çmÓ„që°±BŁ4[œ‰Cf}(OdˆsÓËQ•fæ ŚúRÄUŸț›żä ș#óŻ‚c·rÙn‘ĘKQûĆŚ”ąŹÎ ù¶<_ùc!KÖőËŹ<[łCćfĄcw8^Ÿu/û§Čd”=)„|7Ÿ”ÒY)œBĂĘM'[:Cÿ…À·(òʊEÛ^oPvÄ{„”§ń?_čÁœš…òBóCÍjOFùĆ8†BP!Ôűœüÿă%% șő_ŹężűȚÍ0‚{ÓlÎj­ŁUvśƄëËȘíyűEG€”Ê*s:Ę”ÊFÿ;Gƒęęóïápaź7iUȘx€ĂŸ›‚Ž-ÁŐìż(sËÆ/~č~yŐșșæŰ¶bÈô5Uș" ÂÂ61äń.Ńá/ Èÿ§œłkm"ˆÂđ3‰N „žXĄ1•fÁ‚«ÿ? z/šT… J ÄNÛ/vWìÇÌä‹Yzž»ÀȰ9ûîžwöÌ99Őt+Q‚ŹœqÀ˜¶ï ?űL·?›šwÀ˜Ę‘k@:0«7W]J”…Œ>VJ)Çs_ÂT@SJ©3ąőàɈ€kk€+ łÊæW„éȆú”#»œYì”Éx‚ąWŽŠŃv(ÂΞîJë͆ČOPæźzóŰ·ĘdȚ-U/-”Zđk@ăÎá0°ęù·~”•čӝ“è=žN:ôŚ h!À!SàÜXoܛΘȘ5¶±ä:­”.Ï9çĐČ<$„a1Æy ïp} .4ôưQ"˜Âae‚pïI @‡©ŚÏțÌF@AȚÁó=Z1f»R Ä8Ë`»ŸUŸ8Újșš-ZA«˖Y‘­ìžö-9ćpïOu=‚#ZٟŒ\^},~v4—8 –ƒĘĐ^†2ŠŻőœű«ĂI§PG\. ûäőHj‡„àrËxxYÎìÓusDÇ7§Ń‹Ś€bÿ[ÙpÉòpCŠTE°‰Âá~Oű‡Ž8X•ę…ł%M) ûg:ŻÄXˆĘ,ŃœŽ/ʰó–æx‚Țr‚đÿS ÙÁ"æĂșțęüœ00ź%,ęúśÚñeiûűúŸPKùóđĆae†"­ ™/pÁIDATxڔŚ[cąJ `ź–«xEEDETȘą`=„đÿÿŐIf@©ûŽypw-_33„„(„Ûៈ…@éPt]UU]7?üŽU'đ_č.I’* T CŐ•ŹżaŃçqæ‘eűÙ?+‚ćÙ¶$ _L@ő Ùy3ú­d-5ϛț€‘OWâ$W” ą?ÂŰ,M.G%ÀoAƒ€@R©<$a$;–ËćéNc”›Ńܜßę~–‚+"6d„(°0$ç !!„%óŽŐŽ©–öbÒźWVÆ ]y‘sD¶Ó §ôZl\}X#íȞ¶œ!ń–ŸĆÔ1`eO’+żČôûŠŠíȚ M x’CKNâń)>Ÿ ›ŠiȘM(œÉAÁ‰»R8Îf?ƒ{göNqÜKïpĘ6ž/eȔÍđF ÏâêJKź4Yśz :ÓđšÆsS&Úűl\ Ìâ>“(ĄÓ/G$̜NŁàâÓăÜ4eyÙÏ!@òLą39MgłăxÌ  ž!II@ˆ AàŽf 94Â*€dO‚^І#ŸĂ–†Œúga…„pdYgE’˜ƒă‘@±Œ$Ù|>'KHƒ€‚ëńj/đ Æ@KÓí­ȚÉâiæs(=XÚHn6DáaŰÖq qs}ű ±ÇˆŽA•Șà!Û<©ÍÉ G©‘ŰE ÁπX< #nKÏ+ąA9mLšŽńr‰ę̒›»/mۑCËéŽAš™Hö3$%fK[=Im:3ϛ•śIYą40H”Œˆ7‡șYnAS[șs “Țï» 7ƒă>íYŻ<ÒÓ°s]ŰMB ^} JśvßíXąé5đƊ!͙QąQș7°Đo,Q9˜Ià_ș»!ń|ÔŽK Ÿò§MÊ;©áHŠąs§ùŠY˜(JÖËćN[‰nFć€ŃÛ|WŹ,ˆ@~=Ȁî?”çy]“ì—Ż,"+ì>ç·É>òì_H€(-YA[›M~ő†É~ëÏX=ŃêČ%ź.–ńÖOö!FĆ ÙÖòE`V@獗ëÍ(ŻEöȘČ!8]rA߈\{û‹4Æ+Öàł'Q­Ź|#&ÔiÀ‚çHCÔĂçJύÛ +:ŠSgtf•,ɎóńMȚÛ©fœ ÇÔyĂIà@äò;Ù]v‡“á$„ö‹rąűŽ#«Ăś…Q‚[i…Ł3ƒ^Tá|‰ˆ,ŐĄöNLCȚÏÚDŽjlÁűˆ‰ìŠ($ù띄°œ©ÁWg1ĘNG"Vt.;ÓśtÄ!+ż@È`șZëőÚmHU‰>>țJC.D6f ÁC⍠äĂÙțž\W¶}L⭛P;dD–ŻîêÊÌ6ííFżsrČĆ^Bì†T'xúbńńŚ‹AšŰíŁż^łbî<47aEêYž »~ö ț˜I/‚Ś‹ĐĐÙ(aHÊső aÀś-Ńó\Ï+lèIśșH$©úł‚Ąc5[IÖxpž*”DßbCĘ>;čà_·—€ú†žœDڀő˚hđőÔH^ä?^șQČđșÏĆOxtŁ•$łæÖvHICÙ§ô'kźrHïßâç Ț;N “È?û=Ì@öŠÄÉĐ]1r§{h黆,^äêû8i;dëC·˜!!” €BR”$â…$']‚[‘k$ć ì‡§r ĂM‹.îž6ŠòœŁN4›­á°#ËRwˆóEËK‚Ä~uÉ b6És§ĄÍȚ`E·uX柒Ną$ÂŁ…‡EÂwÆyúûR+FȘÏυžxüD”śxŹÔĂă‘ë«Çă€Áúƒ [ś[_%òBKj(;WŐńíT‡O,#yÁêëMżŰ+\c$[m‚_ۉöpĆ!ćSŹIŁvŁâÁóèì+žpH©°ű—ÿˆ ńMű Ț¶3ŐeIENDźB`‚passenger-4.0.37/test/stub/rails2.3-mycook/log/useless.txt000644 000765 000024 00000000075 12233035540 024013 0ustar00honglistaff000000 000000 This useless file prevents git from removing this directory. passenger-4.0.37/test/stub/rails2.3-mycook/config/boot.rb000644 000765 000024 00000005353 12233035540 023547 0ustar00honglistaff000000 000000 # Don't change this file! # Configure your app in config/environment.rb and config/environments/*.rb RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) module Rails class << self def boot! unless booted? preinitialize pick_boot.run end end def booted? defined? Rails::Initializer end def pick_boot (vendor_rails? ? VendorBoot : GemBoot).new end def vendor_rails? File.exist?("#{RAILS_ROOT}/vendor/rails") end def preinitialize load(preinitializer_path) if File.exist?(preinitializer_path) end def preinitializer_path "#{RAILS_ROOT}/config/preinitializer.rb" end end class Boot def run load_initializer Rails::Initializer.run(:set_load_path) end end class VendorBoot < Boot def load_initializer require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" Rails::Initializer.run(:install_gem_spec_stubs) Rails::GemDependency.add_frozen_gem_path end end class GemBoot < Boot def load_initializer self.class.load_rubygems load_rails_gem require 'initializer' end def load_rails_gem if version = self.class.gem_version gem 'rails', version else gem 'rails' end rescue Gem::LoadError => load_error $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.) exit 1 end class << self def rubygems_version Gem::RubyGemsVersion rescue nil end def gem_version if defined? RAILS_GEM_VERSION RAILS_GEM_VERSION elsif ENV.include?('RAILS_GEM_VERSION') ENV['RAILS_GEM_VERSION'] else parse_gem_version(read_environment_rb) end end def load_rubygems require 'rubygems' min_version = '1.3.1' unless rubygems_version >= min_version $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.) exit 1 end rescue LoadError $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org) exit 1 end def parse_gem_version(text) $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/ end private def read_environment_rb File.read("#{RAILS_ROOT}/config/environment.rb") end end end end # All that for this: Rails.boot! passenger-4.0.37/test/stub/rails2.3-mycook/config/database.yml000644 000765 000024 00000000774 12233035540 024550 0ustar00honglistaff000000 000000 # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: sqlite3 database: db/development.sqlite3 timeout: 5000 # Warning: The database defined as 'test' will be erased and # re-generated from your development database when you run 'rake'. # Do not set this db to the same as development or production. test: adapter: sqlite3 database: db/test.sqlite3 timeout: 5000 production: adapter: sqlite3 database: db/production.sqlite3 timeout: 5000 passenger-4.0.37/test/stub/rails2.3-mycook/config/environment.rb000644 000765 000024 00000005521 12233035540 025145 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file # Uncomment below to force Rails into production mode when # you don't control web/app server and can't set it the proper way # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '~> 2.3.0' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') Rails::Initializer.run do |config| # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # See Rails::Configuration for more options. # Skip frameworks you're not going to use (only works if using vendor/rails). # To use Rails without a database, you must remove the Active Record framework config.frameworks -= [ :active_record, :active_resource, :action_mailer ] # Only load the plugins named here, in the order given. By default, all plugins # in vendor/plugins are loaded in alphabetical order. # :all can be used as a placeholder for all plugins not explicitly named # config.plugins = [ :exception_notification, :ssl_requirement, :all ] # Add additional load paths for your own custom dirs # config.load_paths += %W( #{RAILS_ROOT}/extras ) # Force all environments to use the same logger level # (by default production uses :info, the others :debug) # config.log_level = :debug # Your secret key for verifying cookie session data integrity. # If you change this key, all old sessions will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. if Rails::VERSION::MAJOR >= 2 config.action_controller.session = { :session_key => '_mycook_session', :secret => '521658a0b264d04bff739ca593bce63c45180efc4edc74df011fa876229ec19a9c182e389d4cc746229b24a9a6a93b9c0616a3cc5209c526bf78f0d6ef72ba78' } end # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with 'rake db:sessions:create') # config.action_controller.session_store = :active_record_store # Use SQL instead of Active Record's schema dumper when creating the test database. # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql # Activate observers that should always be running # config.active_record.observers = :cacher, :garbage_collector # Make Active Record use UTC-base instead of local time # config.active_record.default_timezone = :utc end passenger-4.0.37/test/stub/rails2.3-mycook/config/environments/000755 000765 000024 00000000000 12233035540 025000 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/config/initializers/000755 000765 000024 00000000000 12233035540 024757 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/config/routes.rb000644 000765 000024 00000003054 12233035540 024121 0ustar00honglistaff000000 000000 ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect 'products/:id', :controller => 'catalog', :action => 'view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' # This route can be invoked with purchase_url(:id => product.id) # Sample resource route (maps HTTP verbs to controller actions automatically): # map.resources :products # Sample resource route with options: # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get } # Sample resource route with sub-resources: # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller # Sample resource route within a namespace: # map.namespace :admin do |admin| # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb) # admin.resources :products # end map.resources :recipes map.resources :uploads, :collection => { :single => :post } # You can have the root of your site routed with map.root -- just remember to delete public/index.html. map.root :controller => "welcome" # See how all your routes lay out with "rake routes" # Install the default routes as the lowest priority. map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end passenger-4.0.37/test/stub/rails2.3-mycook/config/initializers/inflections.rb000644 000765 000024 00000000552 12233035540 027623 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format # (all these examples are active by default): # Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end passenger-4.0.37/test/stub/rails2.3-mycook/config/initializers/mime_types.rb000644 000765 000024 00000000315 12233035540 027456 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone passenger-4.0.37/test/stub/rails2.3-mycook/config/environments/development.rb000644 000765 000024 00000001451 12233035540 027650 0ustar00honglistaff000000 000000 # Settings specified here will take precedence over those in config/environment.rb # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the webserver when you make code changes. config.cache_classes = false # Log error messages when you accidentally call methods on nil. config.whiny_nils = true # Show full error reports and disable caching config.action_controller.consider_all_requests_local = true config.action_view.debug_rjs = true config.action_controller.perform_caching = false config.action_view.cache_template_extensions = false # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false passenger-4.0.37/test/stub/rails2.3-mycook/config/environments/production.rb000644 000765 000024 00000001467 12233035540 027523 0ustar00honglistaff000000 000000 # Settings specified here will take precedence over those in config/environment.rb # The production environment is meant for finished, "live" apps. # Code is not reloaded between requests config.cache_classes = true # Use a different logger for distributed setups # config.logger = SyslogLogger.new # Full error reports are disabled and caching is turned on config.action_controller.consider_all_requests_local = false config.action_controller.perform_caching = true config.action_view.cache_template_loading = true # Enable serving of images, stylesheets, and javascripts from an asset server # config.action_controller.asset_host = "http://assets.example.com" # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false passenger-4.0.37/test/stub/rails2.3-mycook/app/controllers/000755 000765 000024 00000000000 12233035540 024132 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/app/helpers/000755 000765 000024 00000000000 12233035540 023226 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/app/views/000755 000765 000024 00000000000 12233035540 022721 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/app/views/layouts/000755 000765 000024 00000000000 12233035540 024421 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/app/views/recipes/000755 000765 000024 00000000000 12233035540 024353 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/app/views/uploads/000755 000765 000024 00000000000 12233035540 024370 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/app/views/welcome/000755 000765 000024 00000000000 12233035540 024354 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3-mycook/app/views/welcome/cached.rhtml000644 000765 000024 00000000100 12233035540 026622 0ustar00honglistaff000000 000000 This content should never be displayed because of page caching. passenger-4.0.37/test/stub/rails2.3-mycook/app/views/welcome/index.rhtml000644 000765 000024 00000001306 12233035540 026533 0ustar00honglistaff000000 000000

Welcome to MyCook™

Your personal online cookbook

<%= image_tag('angrywizard.gif', :style => 'float: right') %>

We're currently in alpha beta. These are the things you can currently do:

  • <%= link_to 'Create a new recipe', new_recipe_url %>
  • <%= link_to 'See all recipes', recipes_url %>
  • <%= link_to 'Upload something useless', new_upload_url %>

Oh and you know what?

We love Zed! He is our hero!
<%= image_tag('header.png') %>
passenger-4.0.37/test/stub/rails2.3-mycook/app/views/uploads/index.rhtml000644 000765 000024 00000000072 12233035540 026546 0ustar00honglistaff000000 000000 This content should not be shown because of page caching. passenger-4.0.37/test/stub/rails2.3-mycook/app/views/uploads/new.html.erb000644 000765 000024 00000000460 12233035540 026616 0ustar00honglistaff000000 000000

Upload something useless

<% form_tag(uploads_path, { :method => :post, :multipart => true }) do %>

Name 1:
<%= text_field :upload, :name1 %>

Name 2:
<%= text_field :upload, :name2 %>

File:
<%= file_field :upload, :data %>

<%= submit_tag 'Upload!' %> <% end %> passenger-4.0.37/test/stub/rails2.3-mycook/app/views/recipes/create.rhtml000644 000765 000024 00000000550 12233035540 026666 0ustar00honglistaff000000 000000

Uh oh...

Have we already told you that MyCook™ is currently in beta? We haven't implemented saving of recipes yet! But for your information, this is what you submitted:

  • HTTP method: <%=h request.method %>
  • Name: <%=h params[:recipe][:name] %>
  • Instructions: <%=h params[:recipe][:instructions] %>
passenger-4.0.37/test/stub/rails2.3-mycook/app/views/recipes/index.rhtml000644 000765 000024 00000000062 12233035540 026530 0ustar00honglistaff000000 000000

All recipes

Not implemented yet. Sorry. passenger-4.0.37/test/stub/rails2.3-mycook/app/views/recipes/new.rhtml000644 000765 000024 00000000416 12233035540 026215 0ustar00honglistaff000000 000000

Create a new recipe

<% form_tag(recipes_url, :method => :post) do %>

Name:
<%= text_field :recipe, :name %>

Instructions:
<%= text_area :recipe, :instructions, :rows => 15, :cols => 60 %>

<%= submit_tag('Submit') %>

<% end %> passenger-4.0.37/test/stub/rails2.3-mycook/app/views/layouts/default.rhtml000644 000765 000024 00000000665 12233035540 027124 0ustar00honglistaff000000 000000 MyCook™ beta
<%= yield %>
passenger-4.0.37/test/stub/rails2.3-mycook/app/helpers/application_helper.rb000644 000765 000024 00000000163 12233035540 027415 0ustar00honglistaff000000 000000 # Methods added to this helper will be available to all templates in the application. module ApplicationHelper end passenger-4.0.37/test/stub/rails2.3-mycook/app/helpers/recipes_helper.rb000644 000765 000024 00000000031 12233035540 026536 0ustar00honglistaff000000 000000 module RecipesHelper end passenger-4.0.37/test/stub/rails2.3-mycook/app/helpers/test_helper.rb000644 000765 000024 00000000026 12233035540 026067 0ustar00honglistaff000000 000000 module TestHelper end passenger-4.0.37/test/stub/rails2.3-mycook/app/helpers/uploads_helper.rb000644 000765 000024 00000000031 12233035540 026553 0ustar00honglistaff000000 000000 module UploadsHelper end passenger-4.0.37/test/stub/rails2.3-mycook/app/helpers/welcome_helper.rb000644 000765 000024 00000000031 12233035540 026537 0ustar00honglistaff000000 000000 module WelcomeHelper end passenger-4.0.37/test/stub/rails2.3-mycook/app/controllers/application_controller.rb000644 000765 000024 00000000752 12233035540 031231 0ustar00honglistaff000000 000000 # Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base helper :all # include all helpers, all the time # See ActionController::RequestForgeryProtection for details # Uncomment the :secret if you're not using the cookie session store #protect_from_forgery # :secret => '7eb64d7b9c847975d50f1923a12e4896' layout 'default' end passenger-4.0.37/test/stub/rails2.3-mycook/app/controllers/recipes_controller.rb000644 000765 000024 00000000110 12233035540 030344 0ustar00honglistaff000000 000000 class RecipesController < ApplicationController def create end end passenger-4.0.37/test/stub/rails2.3-mycook/app/controllers/uploads_controller.rb000644 000765 000024 00000000527 12233035540 030375 0ustar00honglistaff000000 000000 class UploadsController < ApplicationController caches_page :index def create headers["Content-Type"] = "text/plain" render :text => "name 1 = " + params[:upload][:name1] + "\n" + "name 2 = " + params[:upload][:name2] + "\n" + "data = " + params[:upload][:data].read end def single render :text => params[:foo] end end passenger-4.0.37/test/stub/rails2.3-mycook/app/controllers/welcome_controller.rb000644 000765 000024 00000002323 12233035540 030355 0ustar00honglistaff000000 000000 class WelcomeController < ApplicationController caches_page :cached def parameters_test headers["Content-Type"] = "text/plain" render :text => params.to_xml end def headers_test headers["X-Foo"] = "Bar" render :nothing => true end def touch File.unlink('public/touch.txt') rescue nil File.open('public/touch.txt', 'w') do end render :nothing => true end def in_passenger render :text => !!defined?(PhusionPassenger) end def rails_env render :text => RAILS_ENV end def backtrace render :text => caller.join("\n") end def passenger_name render :text => Passenger.new.name end def terminate exit! end def show_id render :text => params[:id] end def environment text = "" ENV.each_pair do |key, value| text << "#{key} = #{value}\n" end render :text => text end def cgi_environment text = "" request.headers.each_pair do |key, value| text << "#{key} = #{value}\n" end render :text => text end def request_uri render :text => request.request_uri end def sleep_until_exists File.open("#{RAILS_ROOT}/waiting_#{params[:name]}", 'w') while !File.exist?("#{RAILS_ROOT}/#{params[:name]}") sleep 0.1 end render :nothing => true end end passenger-4.0.37/test/stub/rails2.3/app/000755 000765 000024 00000000000 12233035540 020265 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/config/000755 000765 000024 00000000000 12233035540 020752 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/log/000755 000765 000024 00000000000 12233035540 020266 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/public/000755 000765 000024 00000000000 12233035540 020763 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/Rakefile000644 000765 000024 00000000463 12233035540 021155 0ustar00honglistaff000000 000000 # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require(File.join(File.dirname(__FILE__), 'config', 'boot')) require 'rake' require 'rake/testtask' require 'rake/rdoctask' require 'tasks/rails' passenger-4.0.37/test/stub/rails2.3/script/000755 000765 000024 00000000000 12233035540 021011 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/tmp/000755 000765 000024 00000000000 12233035540 020305 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/tmp/cache/000755 000765 000024 00000000000 12233035540 021350 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/tmp/pids/000755 000765 000024 00000000000 12233035540 021244 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/tmp/sessions/000755 000765 000024 00000000000 12233035540 022153 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/tmp/sockets/000755 000765 000024 00000000000 12233035540 021760 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/tmp/sockets/.gitignore000644 000765 000024 00000000075 12233035540 023752 0ustar00honglistaff000000 000000 This useless file prevents git from removing this directory. passenger-4.0.37/test/stub/rails2.3/tmp/sessions/.gitignore000644 000765 000024 00000000075 12233035540 024145 0ustar00honglistaff000000 000000 This useless file prevents git from removing this directory. passenger-4.0.37/test/stub/rails2.3/tmp/pids/.gitignore000644 000765 000024 00000000075 12233035540 023236 0ustar00honglistaff000000 000000 This useless file prevents git from removing this directory. passenger-4.0.37/test/stub/rails2.3/tmp/cache/.gitignore000644 000765 000024 00000000075 12233035540 023342 0ustar00honglistaff000000 000000 This useless file prevents git from removing this directory. passenger-4.0.37/test/stub/rails2.3/script/about000755 000765 000024 00000000140 12233035540 022044 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/about' passenger-4.0.37/test/stub/rails2.3/script/console000755 000765 000024 00000000142 12233035540 022376 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/console' passenger-4.0.37/test/stub/rails2.3/script/dbconsole000755 000765 000024 00000000144 12233035540 022706 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/dbconsole' passenger-4.0.37/test/stub/rails2.3/script/destroy000755 000765 000024 00000000142 12233035540 022425 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/destroy' passenger-4.0.37/test/stub/rails2.3/script/generate000755 000765 000024 00000000143 12233035540 022527 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/generate' passenger-4.0.37/test/stub/rails2.3/script/performance/000755 000765 000024 00000000000 12233035540 023312 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/script/plugin000755 000765 000024 00000000141 12233035540 022231 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/plugin' passenger-4.0.37/test/stub/rails2.3/script/process/000755 000765 000024 00000000000 12233035540 022467 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/script/runner000755 000765 000024 00000000141 12233035540 022244 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/runner' passenger-4.0.37/test/stub/rails2.3/script/server000755 000765 000024 00000000141 12233035540 022241 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/server' passenger-4.0.37/test/stub/rails2.3/script/process/inspector000755 000765 000024 00000000157 12233035540 024426 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/inspector' passenger-4.0.37/test/stub/rails2.3/script/process/reaper000755 000765 000024 00000000154 12233035540 023673 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/reaper' passenger-4.0.37/test/stub/rails2.3/script/process/spawner000755 000765 000024 00000000155 12233035540 024075 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/spawner' passenger-4.0.37/test/stub/rails2.3/script/performance/benchmarker000755 000765 000024 00000000165 12233035540 025523 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/benchmarker' passenger-4.0.37/test/stub/rails2.3/script/performance/profiler000755 000765 000024 00000000162 12233035540 025061 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/profiler' passenger-4.0.37/test/stub/rails2.3/script/performance/request000755 000765 000024 00000000161 12233035540 024726 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/request' passenger-4.0.37/test/stub/rails2.3/public/.gitignore000644 000765 000024 00000000075 12233035540 022755 0ustar00honglistaff000000 000000 This useless file prevents git from removing this directory. passenger-4.0.37/test/stub/rails2.3/log/.gitignore000644 000765 000024 00000000075 12233035540 022260 0ustar00honglistaff000000 000000 This useless file prevents git from removing this directory. passenger-4.0.37/test/stub/rails2.3/config/boot.rb000644 000765 000024 00000005353 12233035540 022250 0ustar00honglistaff000000 000000 # Don't change this file! # Configure your app in config/environment.rb and config/environments/*.rb RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) module Rails class << self def boot! unless booted? preinitialize pick_boot.run end end def booted? defined? Rails::Initializer end def pick_boot (vendor_rails? ? VendorBoot : GemBoot).new end def vendor_rails? File.exist?("#{RAILS_ROOT}/vendor/rails") end def preinitialize load(preinitializer_path) if File.exist?(preinitializer_path) end def preinitializer_path "#{RAILS_ROOT}/config/preinitializer.rb" end end class Boot def run load_initializer Rails::Initializer.run(:set_load_path) end end class VendorBoot < Boot def load_initializer require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" Rails::Initializer.run(:install_gem_spec_stubs) Rails::GemDependency.add_frozen_gem_path end end class GemBoot < Boot def load_initializer self.class.load_rubygems load_rails_gem require 'initializer' end def load_rails_gem if version = self.class.gem_version gem 'rails', version else gem 'rails' end rescue Gem::LoadError => load_error $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.) exit 1 end class << self def rubygems_version Gem::RubyGemsVersion rescue nil end def gem_version if defined? RAILS_GEM_VERSION RAILS_GEM_VERSION elsif ENV.include?('RAILS_GEM_VERSION') ENV['RAILS_GEM_VERSION'] else parse_gem_version(read_environment_rb) end end def load_rubygems require 'rubygems' min_version = '1.3.1' unless rubygems_version >= min_version $stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.) exit 1 end rescue LoadError $stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org) exit 1 end def parse_gem_version(text) $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/ end private def read_environment_rb File.read("#{RAILS_ROOT}/config/environment.rb") end end end end # All that for this: Rails.boot! passenger-4.0.37/test/stub/rails2.3/config/database.yml000644 000765 000024 00000000763 12233035540 023247 0ustar00honglistaff000000 000000 # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: sqlite3 database: development.sqlite3 timeout: 5000 # Warning: The database defined as 'test' will be erased and # re-generated from your development database when you run 'rake'. # Do not set this db to the same as development or production. test: adapter: sqlite3 database: test.sqlite3 timeout: 5000 production: adapter: sqlite3 database: production.sqlite3 timeout: 5000 passenger-4.0.37/test/stub/rails2.3/config/environment.rb000644 000765 000024 00000005632 12233035540 023651 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file # Uncomment below to force Rails into production mode when # you don't control web/app server and can't set it the proper way # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '~> 2.3.0' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') Rails::Initializer.run do |config| # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # See Rails::Configuration for more options. # Skip frameworks you're not going to use (only works if using vendor/rails). # To use Rails without a database, you must remove the Active Record framework config.frameworks -= [ :action_mailer, :active_resource ] if defined?(PhusionPassenger) && !PhusionPassenger::App.options["active_record"] config.frameworks -= [ :active_record ] end # Only load the plugins named here, in the order given. By default, all plugins # in vendor/plugins are loaded in alphabetical order. # :all can be used as a placeholder for all plugins not explicitly named # config.plugins = [ :exception_notification, :ssl_requirement, :all ] # Add additional load paths for your own custom dirs # config.load_paths += %W( #{RAILS_ROOT}/extras ) # Force all environments to use the same logger level # (by default production uses :info, the others :debug) # config.log_level = :debug # Your secret key for verifying cookie session data integrity. # If you change this key, all old sessions will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'll be exposed to dictionary attacks. config.action_controller.session = { :key => '_railsapp_session', :secret => '3b50a6869d4e48696e5d407cab7b390124b3d815b4a8ab3e452a6ae1972ce1dc9615db09977915b6715944170fec0d46847b5b8fbdb1a4634d5d7247e4db32c8' } # Use the database for sessions instead of the cookie-based default, # which shouldn't be used to store highly confidential information # (create the session table with 'rake db:sessions:create') # config.action_controller.session_store = :active_record_store # Use SQL instead of Active Record's schema dumper when creating the test database. # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql # Activate observers that should always be running # config.active_record.observers = :cacher, :garbage_collector # Make Active Record use UTC-base instead of local time # config.active_record.default_timezone = :utc end passenger-4.0.37/test/stub/rails2.3/config/environments/000755 000765 000024 00000000000 12233035540 023501 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/config/initializers/000755 000765 000024 00000000000 12233035540 023460 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/config/routes.rb000644 000765 000024 00000002740 12233035540 022623 0ustar00honglistaff000000 000000 ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect 'products/:id', :controller => 'catalog', :action => 'view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' # This route can be invoked with purchase_url(:id => product.id) # Sample resource route (maps HTTP verbs to controller actions automatically): # map.resources :products # Sample resource route with options: # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get } # Sample resource route with sub-resources: # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller # Sample resource route within a namespace: # map.namespace :admin do |admin| # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb) # admin.resources :products # end # You can have the root of your site routed with map.root -- just remember to delete public/index.html. map.root :controller => 'foo', :action => 'new' # See how all your routes lay out with "rake routes" # Install the default routes as the lowest priority. map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end passenger-4.0.37/test/stub/rails2.3/config/initializers/inflections.rb000644 000765 000024 00000000552 12233035540 026324 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format # (all these examples are active by default): # Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end passenger-4.0.37/test/stub/rails2.3/config/initializers/mime_types.rb000644 000765 000024 00000000315 12233035540 026157 0ustar00honglistaff000000 000000 # Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone passenger-4.0.37/test/stub/rails2.3/config/environments/development.rb000644 000765 000024 00000001354 12233035540 026353 0ustar00honglistaff000000 000000 # Settings specified here will take precedence over those in config/environment.rb # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the webserver when you make code changes. config.cache_classes = false # Log error messages when you accidentally call methods on nil. config.whiny_nils = true # Show full error reports and disable caching config.action_controller.consider_all_requests_local = true config.action_view.debug_rjs = true config.action_controller.perform_caching = false # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false passenger-4.0.37/test/stub/rails2.3/config/environments/production.rb000644 000765 000024 00000001373 12233035540 026220 0ustar00honglistaff000000 000000 # Settings specified here will take precedence over those in config/environment.rb # The production environment is meant for finished, "live" apps. # Code is not reloaded between requests config.cache_classes = true # Use a different logger for distributed setups # config.logger = SyslogLogger.new # Full error reports are disabled and caching is turned on config.action_controller.consider_all_requests_local = false config.action_controller.perform_caching = true # Enable serving of images, stylesheets, and javascripts from an asset server # config.action_controller.asset_host = "http://assets.example.com" # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false passenger-4.0.37/test/stub/rails2.3/config/environments/staging.rb000644 000765 000024 00000001373 12233035540 025466 0ustar00honglistaff000000 000000 # Settings specified here will take precedence over those in config/environment.rb # The production environment is meant for finished, "live" apps. # Code is not reloaded between requests config.cache_classes = true # Use a different logger for distributed setups # config.logger = SyslogLogger.new # Full error reports are disabled and caching is turned on config.action_controller.consider_all_requests_local = false config.action_controller.perform_caching = true # Enable serving of images, stylesheets, and javascripts from an asset server # config.action_controller.asset_host = "http://assets.example.com" # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false passenger-4.0.37/test/stub/rails2.3/app/controllers/000755 000765 000024 00000000000 12233035540 022633 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/app/helpers/000755 000765 000024 00000000000 12233035540 021727 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rails2.3/app/helpers/application_helper.rb000644 000765 000024 00000000163 12233035540 026116 0ustar00honglistaff000000 000000 # Methods added to this helper will be available to all templates in the application. module ApplicationHelper end passenger-4.0.37/test/stub/rails2.3/app/helpers/bar_helper.rb000644 000765 000024 00000000025 12233035540 024354 0ustar00honglistaff000000 000000 module BarHelper end passenger-4.0.37/test/stub/rails2.3/app/helpers/foo_helper.rb000644 000765 000024 00000000025 12233035540 024373 0ustar00honglistaff000000 000000 module FooHelper end passenger-4.0.37/test/stub/rails2.3/app/controllers/application_controller.rb000644 000765 000024 00000000723 12233035540 027730 0ustar00honglistaff000000 000000 # Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base helper :all # include all helpers, all the time # See ActionController::RequestForgeryProtection for details # Uncomment the :secret if you're not using the cookie session store protect_from_forgery # :secret => 'cd5f8fbe429e4b3cca1f5bc1ee91d179' end passenger-4.0.37/test/stub/rails2.3/app/controllers/bar_controller_1.rb000644 000765 000024 00000000133 12233035540 026404 0ustar00honglistaff000000 000000 class BarController < ApplicationController def index render :text => 'bar 1!' end end passenger-4.0.37/test/stub/rails2.3/app/controllers/bar_controller_2.rb000644 000765 000024 00000000133 12233035540 026405 0ustar00honglistaff000000 000000 class BarController < ApplicationController def index render :text => 'bar 1!' end end passenger-4.0.37/test/stub/rails2.3/app/controllers/foo_controller.rb000644 000765 000024 00000000610 12233035540 026203 0ustar00honglistaff000000 000000 class FooController < ActionController::Base def new render :text => 'front page' end def rails_env render :text => RAILS_ENV end def backtrace render :text => caller.join("\n") end def sleep_until_exists File.open("#{RAILS_ROOT}/waiting_#{params[:name]}", 'w') while !File.exist?("#{RAILS_ROOT}/#{params[:name]}") sleep 0.1 end render :nothing => true end end passenger-4.0.37/test/stub/rack/config.ru000644 000765 000024 00000005233 12233035540 020710 0ustar00honglistaff000000 000000 # encoding: binary def text_response(body) body = binary_string(body.to_s) return [200, { "Content-Type" => "text/plain", "Content-Length" => body.size.to_s }, [body]] end if "".respond_to?(:force_encoding) def binary_string(str) return str.force_encoding("binary") end else def binary_string(str) return str end end app = lambda do |env| case env['PATH_INFO'] when '/' if File.exist?("front_page.txt") text_response(File.read("front_page.txt")) else text_response("front page") end when '/parameters' req = Rack::Request.new(env) method = env["REQUEST_METHOD"] first = req.params["first"] second = req.params["second"] text_response("Method: #{method}\nFirst: #{first}\nSecond: #{second}\n") when '/chunked' chunks = ["7\r\nchunk1\n\r\n", "7\r\nchunk2\n\r\n", "7\r\nchunk3\n\r\n", "0\r\n\r\n"] [200, { "Content-Type" => "text/html", "Transfer-Encoding" => "chunked" }, chunks] when '/pid' text_response(Process.pid) when /^\/env/ body = '' env.sort.each do |key, value| body << "#{key} = #{value}\n" end text_response(body) when '/touch_file' req = Rack::Request.new(env) filename = req.params["file"] File.open(filename, "w").close text_response("ok") when '/extra_header' [200, { "Content-Type" => "text/html", "X-Foo" => "Bar" }, ["ok"]] when '/cached' text_response("This is the uncached version of /cached") when '/upload_with_params' req = Rack::Request.new(env) name1 = binary_string(req.params["name1"]) name2 = binary_string(req.params["name2"]) file = req.params["data"][:tempfile] file.binmode text_response( "name 1 = #{name1}\n" << "name 2 = #{name2}\n" << "data = #{file.read}") when '/raw_upload_to_file' File.open(env['HTTP_X_OUTPUT'], 'w') do |f| while line = env['rack.input'].gets f.write(line) f.flush end end text_response("ok") when '/print_stderr' STDERR.puts "hello world!" text_response("ok") when '/print_stdout_and_stderr' STDOUT.puts "hello stdout!" sleep 0.1 # Give HelperAgent the time to process stdout first. STDERR.puts "hello stderr!" text_response("ok") when '/switch_protocol' if env['HTTP_UPGRADE'] != 'raw' || env['HTTP_CONNECTION'].downcase != 'upgrade' return [500, { "Content-Type" => "text/plain" }, ["Invalid headers"]] end env['rack.hijack'].call io = env['rack.hijack_io'] begin io.write("Status: 101 Switching Protocols\r\n") io.write("Upgrade: raw\r\n") io.write("Connection: Upgrade\r\n") io.write("\r\n") while !io.eof? line = io.readline io.write("Echo: #{line}") io.flush end ensure io.close end else [404, { "Content-Type" => "text/plain" }, ["Unknown URI"]] end end run app passenger-4.0.37/test/stub/rack/public/000755 000765 000024 00000000000 12233035540 020346 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rack/start.rb000755 000765 000024 00000002123 12233035540 020553 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require 'socket' STDOUT.sync = true STDERR.sync = true puts "!> I have control 1.0" abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n" options = {} while (line = STDIN.readline) != "\n" name, value = line.strip.split(/: */, 2) options[name] = value end if ARGV[0] == "--execself" # Used for testing https://code.google.com/p/phusion-passenger/issues/detail?id=842#c19 exec("ruby", $0) end server = TCPServer.new('127.0.0.1', 0) puts "!> Ready" puts "!> socket: main;tcp://127.0.0.1:#{server.addr[1]};session;1" puts "!> " while true ios = select([server, STDIN])[0] if ios.include?(server) client = server.accept line = client.readline if line == "ping\n" client.write("pong\n") elsif line == "pid\n" client.write("#{Process.pid}\n") elsif line == "envvars\n" str = "" ENV.each_pair do |key, value| str << "#{key} = #{value}\n" end client.write(str) else client.write("unknown request\n") end client.close end if ios.include?(STDIN) begin STDIN.readline rescue EOFError exit end end end passenger-4.0.37/test/stub/rack/tmp/000755 000765 000024 00000000000 12233035540 017670 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rack/tmp/.gitignore000644 000765 000024 00000000000 12233035540 021646 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/rack/public/.gitignore000644 000765 000024 00000000000 12233035540 022324 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/node/app.js000644 000765 000024 00000005703 12233035540 020220 0ustar00honglistaff000000 000000 var fs = require('fs'); var url = require('url'); var express = require('express'); var app = express(); var bodyParser = express.bodyParser(); function textResponse(res, content) { content = String(content); res.setHeader("Content-Type", "text/plain"); res.setHeader("Content-Length", content.length); res.end(content); } function fileExists(filename) { try { fs.statSync(filename); return true; } catch (e) { return false; } } if (process.env.PASSENGER_BASE_URI) { app.use(process.env.PASSENGER_BASE_URI, app.router); } app.all('/', function(req, res) { if (fileExists("front_page.txt")) { textResponse(res, fs.readFileSync("front_page.txt")); } else { textResponse(res, "front page"); } }); app.all('/parameters', function(req, res) { bodyParser(req, res, function() { var first = req.query.first || req.body.first; var second = req.query.second || req.body.second; textResponse(res, "Method: " + req.method + "\n" + "First: " + first + "\n" + "Second: " + second + "\n") }); }); app.all('/chunked', function(req, res) { res.setHeader("Content-Type", "text/plain"); res.setHeader("Transfer-Encoding", "chunked"); res.write("chunk1\n"); res.write("chunk2\n"); res.write("chunk3\n"); res.end(); }); app.all('/pid', function(req, res) { textResponse(res, process.pid); }); app.all(/^\/env/, function(req, res) { var body = ''; var keys = []; for (var key in req.cgiHeaders) { keys.push(key); } keys.sort(); for (var i = 0; i < keys.length; i++) { var val = req.cgiHeaders[keys[i]]; if (val === undefined) { val = ''; } body += keys[i] + " = " + val + "\n"; } textResponse(res, body); }); app.all('/touch_file', function(req, res) { bodyParser(req, res, function() { var filename = req.query.file || req.body.file; fs.writeFileSync(filename, ""); textResponse(res, "ok") }); }); app.all('/extra_header', function(req, res) { res.setHeader("Content-Type", "text/html"); res.setHeader("Content-Length", "2"); res.setHeader("X-Foo", "Bar"); res.end("ok"); }); app.all('/cached', function(req, res) { textResponse(res, "This is the uncached version of /cached"); }); app.all('/upload_with_params', function(req, res) { bodyParser(req, res, function() { var name1 = req.query.name1 || req.body.name1; var name2 = req.query.name2 || req.body.name2; var data = fs.readFileSync(req.files.data.path); var body = "name 1 = " + name1 + "\n" + "name 2 = " + name2 + "\n" + "data = "; var bodyBuffer = new Buffer(body); res.setHeader("Content-Type", "text/plain"); res.setHeader("Content-Length", bodyBuffer.length + data.length); res.write(bodyBuffer); res.write(data); res.end(); }); }); app.all('/raw_upload_to_file', function(req, res) { var filename = req.headers['x-output']; var stream = fs.createWriteStream(filename); req.on('data', function(data) { stream.write(data); }); req.on('end', function() { stream.end(function() { textResponse(res, "ok"); }); }); }); app.listen(3000); passenger-4.0.37/test/stub/node/public/000755 000765 000024 00000000000 12233035540 020353 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/node/tmp/000755 000765 000024 00000000000 12233035540 017675 5ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/node/tmp/.gitignore000644 000765 000024 00000000000 12233035540 021653 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/node/public/.gitignore000644 000765 000024 00000000000 12233035540 022331 0ustar00honglistaff000000 000000 passenger-4.0.37/test/stub/nginx/koi-utf000644 000765 000024 00000005425 12233035540 020602 0ustar00honglistaff000000 000000 # This map is not a full koi8-r <> utf8 map: it does not contain # box-drawing and some other characters. Besides this map contains # several koi8-u and Byelorussian letters which are not in koi8-r. # If you need a full and standard map, use contrib/unicode2nginx/koi-utf # map instead. charset_map koi8-r utf-8 { 80 E282AC ; # euro 95 E280A2 ; # bullet 9A C2A0 ; #   9E C2B7 ; # · A3 D191 ; # small yo A4 D194 ; # small Ukrainian ye A6 D196 ; # small Ukrainian i A7 D197 ; # small Ukrainian yi AD D291 ; # small Ukrainian soft g AE D19E ; # small Byelorussian short u B0 C2B0 ; # ° B3 D081 ; # capital YO B4 D084 ; # capital Ukrainian YE B6 D086 ; # capital Ukrainian I B7 D087 ; # capital Ukrainian YI B9 E28496 ; # numero sign BD D290 ; # capital Ukrainian soft G BE D18E ; # capital Byelorussian short U BF C2A9 ; # (C) C0 D18E ; # small yu C1 D0B0 ; # small a C2 D0B1 ; # small b C3 D186 ; # small ts C4 D0B4 ; # small d C5 D0B5 ; # small ye C6 D184 ; # small f C7 D0B3 ; # small g C8 D185 ; # small kh C9 D0B8 ; # small i CA D0B9 ; # small j CB D0BA ; # small k CC D0BB ; # small l CD D0BC ; # small m CE D0BD ; # small n CF D0BE ; # small o D0 D0BF ; # small p D1 D18F ; # small ya D2 D180 ; # small r D3 D181 ; # small s D4 D182 ; # small t D5 D183 ; # small u D6 D0B6 ; # small zh D7 D0B2 ; # small v D8 D18C ; # small soft sign D9 D18B ; # small y DA D0B7 ; # small z DB D188 ; # small sh DC D18D ; # small e DD D189 ; # small shch DE D187 ; # small ch DF D18A ; # small hard sign E0 D0AE ; # capital YU E1 D090 ; # capital A E2 D091 ; # capital B E3 D0A6 ; # capital TS E4 D094 ; # capital D E5 D095 ; # capital YE E6 D0A4 ; # capital F E7 D093 ; # capital G E8 D0A5 ; # capital KH E9 D098 ; # capital I EA D099 ; # capital J EB D09A ; # capital K EC D09B ; # capital L ED D09C ; # capital M EE D09D ; # capital N EF D09E ; # capital O F0 D09F ; # capital P F1 D0AF ; # capital YA F2 D0A0 ; # capital R F3 D0A1 ; # capital S F4 D0A2 ; # capital T F5 D0A3 ; # capital U F6 D096 ; # capital ZH F7 D092 ; # capital V F8 D0AC ; # capital soft sign F9 D0AB ; # capital Y FA D097 ; # capital Z FB D0A8 ; # capital SH FC D0AD ; # capital E FD D0A9 ; # capital SHCH FE D0A7 ; # capital CH FF D0AA ; # capital hard sign } passenger-4.0.37/test/stub/nginx/koi-win000644 000765 000024 00000004257 12233035540 020603 0ustar00honglistaff000000 000000 charset_map koi8-r windows-1251 { 80 88 ; # euro 95 95 ; # bullet 9A A0 ; #   9E B7 ; # · A3 B8 ; # small yo A4 BA ; # small Ukrainian ye A6 B3 ; # small Ukrainian i A7 BF ; # small Ukrainian yi AD B4 ; # small Ukrainian soft g AE A2 ; # small Byelorussian short u B0 B0 ; # ° B3 A8 ; # capital YO B4 AA ; # capital Ukrainian YE B6 B2 ; # capital Ukrainian I B7 AF ; # capital Ukrainian YI B9 B9 ; # numero sign BD A5 ; # capital Ukrainian soft G BE A1 ; # capital Byelorussian short U BF A9 ; # (C) C0 FE ; # small yu C1 E0 ; # small a C2 E1 ; # small b C3 F6 ; # small ts C4 E4 ; # small d C5 E5 ; # small ye C6 F4 ; # small f C7 E3 ; # small g C8 F5 ; # small kh C9 E8 ; # small i CA E9 ; # small j CB EA ; # small k CC EB ; # small l CD EC ; # small m CE ED ; # small n CF EE ; # small o D0 EF ; # small p D1 FF ; # small ya D2 F0 ; # small r D3 F1 ; # small s D4 F2 ; # small t D5 F3 ; # small u D6 E6 ; # small zh D7 E2 ; # small v D8 FC ; # small soft sign D9 FB ; # small y DA E7 ; # small z DB F8 ; # small sh DC FD ; # small e DD F9 ; # small shch DE F7 ; # small ch DF FA ; # small hard sign E0 DE ; # capital YU E1 C0 ; # capital A E2 C1 ; # capital B E3 D6 ; # capital TS E4 C4 ; # capital D E5 C5 ; # capital YE E6 D4 ; # capital F E7 C3 ; # capital G E8 D5 ; # capital KH E9 C8 ; # capital I EA C9 ; # capital J EB CA ; # capital K EC CB ; # capital L ED CC ; # capital M EE CD ; # capital N EF CE ; # capital O F0 CF ; # capital P F1 DF ; # capital YA F2 D0 ; # capital R F3 D1 ; # capital S F4 D2 ; # capital T F5 D3 ; # capital U F6 C6 ; # capital ZH F7 C2 ; # capital V F8 DC ; # capital soft sign F9 DB ; # capital Y FA C7 ; # capital Z FB D8 ; # capital SH FC DD ; # capital E FD D9 ; # capital SHCH FE D7 ; # capital CH FF DA ; # capital hard sign } passenger-4.0.37/test/stub/nginx/mime.types000644 000765 000024 00000005657 12233035540 021325 0ustar00honglistaff000000 000000 types { text/html html htm shtml; text/css css; text/xml xml rss; image/gif gif; image/jpeg jpeg jpg; application/x-javascript js; application/atom+xml atom; text/mathml mml; text/plain txt; text/vnd.sun.j2me.app-descriptor jad; text/vnd.wap.wml wml; text/x-component htc; image/png png; image/tiff tif tiff; image/vnd.wap.wbmp wbmp; image/x-icon ico; image/x-jng jng; image/x-ms-bmp bmp; image/svg+xml svg; application/java-archive jar war ear; application/mac-binhex40 hqx; application/msword doc; application/pdf pdf; application/postscript ps eps ai; application/rtf rtf; application/vnd.ms-excel xls; application/vnd.ms-powerpoint ppt; application/vnd.wap.wmlc wmlc; application/vnd.wap.xhtml+xml xhtml; application/x-cocoa cco; application/x-java-archive-diff jardiff; application/x-java-jnlp-file jnlp; application/x-makeself run; application/x-perl pl pm; application/x-pilot prc pdb; application/x-rar-compressed rar; application/x-redhat-package-manager rpm; application/x-sea sea; application/x-shockwave-flash swf; application/x-stuffit sit; application/x-tcl tcl tk; application/x-x509-ca-cert der pem crt; application/x-xpinstall xpi; application/zip zip; application/octet-stream bin exe dll; application/octet-stream deb; application/octet-stream dmg; application/octet-stream eot; application/octet-stream iso img; application/octet-stream msi msp msm; audio/midi mid midi kar; audio/mpeg mp3; audio/x-realaudio ra; video/3gpp 3gpp 3gp; video/mpeg mpeg mpg; video/quicktime mov; video/x-flv flv; video/x-mng mng; video/x-ms-asf asx asf; video/x-ms-wmv wmv; video/x-msvideo avi; } passenger-4.0.37/test/stub/nginx/nginx.conf.erb000644 000765 000024 00000003262 12233035540 022037 0ustar00honglistaff000000 000000 worker_processes 2; error_log <%= @passenger_root %>/test/test.log; pid <%= @nginx_root %>/nginx.pid; events { worker_connections 1024; } http { include <%= TEMPLATE_DIR %>/mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server_names_hash_bucket_size 64; log_format main '$remote_addr - $remote_user [$time_local] $request ' '"$status" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log <%= @nginx_root %>/access.log main; passenger_root <%= @passenger_root %>; passenger_ruby <%= PlatformInfo.ruby_command %>; passenger_default_user <%= CONFIG['default_user'] %>; passenger_default_group <%= CONFIG['default_group'] %>; passenger_max_pool_size <%= @max_pool_size %>; passenger_log_level 3; <% for server in @servers %> server { listen <%= @port %>; <% server.values.each_pair do |key, value| %> <%= key %> <%= value %>; <% end %> <%= server.extra %> } <% end %> # HTTPS server # #server { # listen 443; # server_name localhost; # ssl on; # ssl_certificate cert.pem; # ssl_certificate_key cert.key; # ssl_session_timeout 5m; # ssl_protocols SSLv2 SSLv3 TLSv1; # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; # ssl_prefer_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} } passenger-4.0.37/test/stub/nginx/win-utf000644 000765 000024 00000007032 12233035540 020611 0ustar00honglistaff000000 000000 # This map is not a full windows-1251 <> utf8 map: it does not # contain Serbian and Macedonian letters. If you need a full map, # use contrib/unicode2nginx/win-utf map instead. charset_map windows-1251 utf-8 { 82 E2809A ; # single low-9 quotation mark 84 E2809E ; # double low-9 quotation mark 85 E280A6 ; # ellipsis 86 E280A0 ; # dagger 87 E280A1 ; # double dagger 88 E282AC ; # euro 89 E280B0 ; # per mille 91 E28098 ; # left single quotation mark 92 E28099 ; # right single quotation mark 93 E2809C ; # left double quotation mark 94 E2809D ; # right double quotation mark 95 E280A2 ; # bullet 96 E28093 ; # en dash 97 E28094 ; # em dash 99 E284A2 ; # trade mark sign A0 C2A0 ; #   A1 D18E ; # capital Byelorussian short U A2 D19E ; # small Byelorussian short u A4 C2A4 ; # currency sign A5 D290 ; # capital Ukrainian soft G A6 C2A6 ; # borken bar A7 C2A7 ; # section sign A8 D081 ; # capital YO A9 C2A9 ; # (C) AA D084 ; # capital Ukrainian YE AB C2AB ; # left-pointing double angle quotation mark AC C2AC ; # not sign AD C2AD ; # soft hypen AE C2AE ; # (R) AF D087 ; # capital Ukrainian YI B0 C2B0 ; # ° B1 C2B1 ; # plus-minus sign B2 D086 ; # capital Ukrainian I B3 D196 ; # small Ukrainian i B4 D291 ; # small Ukrainian soft g B5 C2B5 ; # micro sign B6 C2B6 ; # pilcrow sign B7 C2B7 ; # · B8 D191 ; # small yo B9 E28496 ; # numero sign BA D194 ; # small Ukrainian ye BB C2BB ; # right-pointing double angle quotation mark BF D197 ; # small Ukrainian yi C0 D090 ; # capital A C1 D091 ; # capital B C2 D092 ; # capital V C3 D093 ; # capital G C4 D094 ; # capital D C5 D095 ; # capital YE C6 D096 ; # capital ZH C7 D097 ; # capital Z C8 D098 ; # capital I C9 D099 ; # capital J CA D09A ; # capital K CB D09B ; # capital L CC D09C ; # capital M CD D09D ; # capital N CE D09E ; # capital O CF D09F ; # capital P D0 D0A0 ; # capital R D1 D0A1 ; # capital S D2 D0A2 ; # capital T D3 D0A3 ; # capital U D4 D0A4 ; # capital F D5 D0A5 ; # capital KH D6 D0A6 ; # capital TS D7 D0A7 ; # capital CH D8 D0A8 ; # capital SH D9 D0A9 ; # capital SHCH DA D0AA ; # capital hard sign DB D0AB ; # capital Y DC D0AC ; # capital soft sign DD D0AD ; # capital E DE D0AE ; # capital YU DF D0AF ; # capital YA E0 D0B0 ; # small a E1 D0B1 ; # small b E2 D0B2 ; # small v E3 D0B3 ; # small g E4 D0B4 ; # small d E5 D0B5 ; # small ye E6 D0B6 ; # small zh E7 D0B7 ; # small z E8 D0B8 ; # small i E9 D0B9 ; # small j EA D0BA ; # small k EB D0BB ; # small l EC D0BC ; # small m ED D0BD ; # small n EE D0BE ; # small o EF D0BF ; # small p F0 D180 ; # small r F1 D181 ; # small s F2 D182 ; # small t F3 D183 ; # small u F4 D184 ; # small f F5 D185 ; # small kh F6 D186 ; # small ts F7 D187 ; # small ch F8 D188 ; # small sh F9 D189 ; # small shch FA D18A ; # small hard sign FB D18B ; # small y FC D18C ; # small soft sign FD D18D ; # small e FE D18E ; # small yu FF D18F ; # small ya } passenger-4.0.37/test/stub/apache2/httpd.conf.erb000644 000765 000024 00000006761 12233035540 022226 0ustar00honglistaff000000 000000 ServerRoot "<%= @server_root %>" Listen 127.0.0.1:<%= @port %> <% if PhusionPassenger::PlatformInfo.os_name =~ /freebsd/ %> Mutex default:/tmp AcceptFilter http none AcceptFilter https none <% end %> <% if @www_user %> User <%= @www_user %> <% end %> <% if @www_group %> Group <%= @www_group %> <% end %> <% if !has_builtin_module?('mod_log_config.c') %> LoadModule log_config_module "<%= modules_dir %>/mod_log_config.so" <% end %> <% if !has_builtin_module?('mod_mime.c') %> LoadModule mime_module "<%= modules_dir %>/mod_mime.so" <% end %> <% if !has_builtin_module?('mod_autoindex.c') %> LoadModule autoindex_module "<%= modules_dir %>/mod_autoindex.so" <% end %> <% if !has_builtin_module?('mod_dir.c') %> LoadModule dir_module "<%= modules_dir %>/mod_dir.so" <% end %> <% if !has_builtin_module?('mod_alias.c') %> LoadModule alias_module "<%= modules_dir %>/mod_alias.so" <% end %> <% if !has_builtin_module?('mod_rewrite.c') %> LoadModule rewrite_module "<%= modules_dir %>/mod_rewrite.so" <% end %> <% if !has_builtin_module?('mod_env.c') %> LoadModule env_module "<%= modules_dir %>/mod_env.so" <% end %> <% if PlatformInfo.httpd_version >= '2.4.0' %> LoadModule authz_core_module "<%= modules_dir %>/mod_authz_core.so" <% if !has_builtin_module?('mod_unixd.c') %> LoadModule unixd_module "<%= modules_dir %>/mod_unixd.so" <% end %> <% end %> <% if !has_builtin_module?('prefork.c') && !has_builtin_module?('worker.c') && !has_builtin_module?('event.c') %> <% if has_module?('mod_mpm_event.so') %> LoadModule mpm_event_module "<%= modules_dir %>/mod_mpm_event.so" <% elsif has_module?('mod_mpm_worker.so') %> LoadModule mpm_worker_module "<%= modules_dir %>/mod_mpm_worker.so" <% elsif has_module?('mod_mpm_prefork.so') %> LoadModule mpm_prefork_module "<%= modules_dir %>/mod_mpm_event.so" <% else %> <% raise "Could not find any mpm module in: #{Dir.entries(modules_dir).inspect}" %> <% end %> <% end %> LoadModule passenger_module "<%= @mod_passenger %>" PassengerRoot "<%= @passenger_root %>" PassengerDefaultRuby "<%= PlatformInfo.ruby_command %>" PassengerDefaultUser <%= CONFIG['default_user'] %> PassengerDefaultGroup <%= CONFIG['default_group'] %> PassengerTempDir "<%= @passenger_temp_dir %>" RailsEnv production RackEnv production PassengerLogLevel 1 <% for line in @extra %> <%= line %> <% end %> TypesConfig "<%= @server_root %>/mime.types" StartServers 1 ServerLimit 10 MaxRequestsPerChild 50 MaxClients 10 MinSpareServers 1 MaxSpareServers 1 MinSpareThreads 1 MaxSpareThreads 1 ThreadsPerChild 2 MinSpareThreads 1 MaxSpareThreads 1 ThreadsPerChild 2 AllowOverride all ServerAdmin admin@passenger.test ServerName passenger.test DocumentRoot "<%= @server_root %>" <% if PlatformInfo.httpd_version < '2.4.0' %> LockFile <%= @server_root %>/httpd.lock <% end %> PidFile <%= @server_root %>/httpd.pid ErrorLog <%= @server_root %>/../test.log CustomLog <%= @server_root %>/access.log combined <% if !vhosts.empty? && PlatformInfo.httpd_version < '2.4.0' %> NameVirtualHost *:<%= @port %> <% end %> <% for vhost in vhosts %> > ServerName <%= vhost.domain %> DocumentRoot "<%= vhost.document_root %>" AllowEncodedSlashes On <% for line in vhost.additional_configs %> <%= line %> <% end %> <% end %> passenger-4.0.37/test/stub/apache2/mime.types000644 000765 000024 00000050557 12233035540 021504 0ustar00honglistaff000000 000000 ############################################################################### # # MIME-TYPES and the extensions that represent them # # This file is part of the "mime-support" package. Please send email (not a # bug report) to mime-support@packages.debian.org if you would like new types # and/or extensions to be added. # # The reason that all types are managed by the mime-support package instead # allowing individual packages to install types in much the same way as they # add entries in to the mailcap file is so these types can be referenced by # other programs (such as a web server) even if the specific support package # for that type is not installed. # # Users can add their own types if they wish by creating a ".mime.types" # file in their home directory. Definitions included there will take # precedence over those listed here. # # Note: Compression schemes like "gzip", "bzip", and "compress" are not # actually "mime-types". They are "encodings" and hence must _not_ have # entries in this file to map their extensions. The "mime-type" of an # encoded file refers to the type of data that has been encoded, not the # type of encoding. # ############################################################################### application/activemessage application/andrew-inset ez application/applefile application/atom atom application/atomcat+xml atomcat application/atomserv+xml atomsrv application/atomicmail application/batch-SMTP application/beep+xml application/cals-1840 application/cap cap pcap application/commonground application/cu-seeme cu application/cybercash application/dca-rft application/dec-dx application/docbook+xml application/dsptype tsp application/dvcs application/edi-consent application/edi-x12 application/edifact application/eshop application/font-tdpfr application/futuresplash spl application/ghostview application/hta hta application/http application/hyperstudio application/iges application/index application/index.cmd application/index.obj application/index.response application/index.vnd application/iotp application/ipp application/isup application/java-archive jar application/java-serialized-object ser application/java-vm class application/mac-binhex40 hqx application/mac-compactpro cpt application/macwriteii application/marc application/mathematica nb application/mathematica-old application/ms-tnef application/msaccess mdb application/msword doc dot application/news-message-id application/news-transmission application/ocsp-request application/ocsp-response application/octet-stream bin application/oda oda application/ogg ogg application/parityfec application/pdf pdf application/pgp-encrypted application/pgp-keys key application/pgp-signature pgp application/pics-rules prf application/pkcs10 application/pkcs7-mime application/pkcs7-signature application/pkix-cert application/pkix-crl application/pkixcmp application/postscript ps ai eps application/prs.alvestrand.titrax-sheet application/prs.cww application/prs.nprend application/qsig application/rar rar application/rdf+xml rdf application/remote-printing application/riscos application/rss+xml rss application/rtf rtf application/sdp application/set-payment application/set-payment-initiation application/set-registration application/set-registration-initiation application/sgml application/sgml-open-catalog application/sieve application/slate application/smil smi smil application/timestamp-query application/timestamp-reply application/vemmi application/whoispp-query application/whoispp-response application/wita application/wordperfect wpd application/wordperfect5.1 wp5 application/x400-bp application/xhtml+xml xhtml xht application/xml xml xsl application/xml-dtd application/xml-external-parsed-entity application/zip zip application/vnd.3M.Post-it-Notes application/vnd.accpac.simply.aso application/vnd.accpac.simply.imp application/vnd.acucobol application/vnd.aether.imp application/vnd.anser-web-certificate-issue-initiation application/vnd.anser-web-funds-transfer-initiation application/vnd.audiograph application/vnd.bmi application/vnd.businessobjects application/vnd.canon-cpdl application/vnd.canon-lips application/vnd.cinderella cdy application/vnd.claymore application/vnd.commerce-battelle application/vnd.commonspace application/vnd.comsocaller application/vnd.contact.cmsg application/vnd.cosmocaller application/vnd.ctc-posml application/vnd.cups-postscript application/vnd.cups-raster application/vnd.cups-raw application/vnd.cybank application/vnd.dna application/vnd.dpgraph application/vnd.dxr application/vnd.ecdis-update application/vnd.ecowin.chart application/vnd.ecowin.filerequest application/vnd.ecowin.fileupdate application/vnd.ecowin.series application/vnd.ecowin.seriesrequest application/vnd.ecowin.seriesupdate application/vnd.enliven application/vnd.epson.esf application/vnd.epson.msf application/vnd.epson.quickanime application/vnd.epson.salt application/vnd.epson.ssf application/vnd.ericsson.quickcall application/vnd.eudora.data application/vnd.fdf application/vnd.ffsns application/vnd.flographit application/vnd.framemaker application/vnd.fsc.weblaunch application/vnd.fujitsu.oasys application/vnd.fujitsu.oasys2 application/vnd.fujitsu.oasys3 application/vnd.fujitsu.oasysgp application/vnd.fujitsu.oasysprs application/vnd.fujixerox.ddd application/vnd.fujixerox.docuworks application/vnd.fujixerox.docuworks.binder application/vnd.fut-misnet application/vnd.google-earth.kml+xml kml application/vnd.google-earth.kmz kmz application/vnd.grafeq application/vnd.groove-account application/vnd.groove-identity-message application/vnd.groove-injector application/vnd.groove-tool-message application/vnd.groove-tool-template application/vnd.groove-vcard application/vnd.hhe.lesson-player application/vnd.hp-HPGL application/vnd.hp-PCL application/vnd.hp-PCLXL application/vnd.hp-hpid application/vnd.hp-hps application/vnd.httphone application/vnd.hzn-3d-crossword application/vnd.ibm.MiniPay application/vnd.ibm.afplinedata application/vnd.ibm.modcap application/vnd.informix-visionary application/vnd.intercon.formnet application/vnd.intertrust.digibox application/vnd.intertrust.nncp application/vnd.intu.qbo application/vnd.intu.qfx application/vnd.irepository.package+xml application/vnd.is-xpr application/vnd.japannet-directory-service application/vnd.japannet-jpnstore-wakeup application/vnd.japannet-payment-wakeup application/vnd.japannet-registration application/vnd.japannet-registration-wakeup application/vnd.japannet-setstore-wakeup application/vnd.japannet-verification application/vnd.japannet-verification-wakeup application/vnd.koan application/vnd.lotus-1-2-3 application/vnd.lotus-approach application/vnd.lotus-freelance application/vnd.lotus-notes application/vnd.lotus-organizer application/vnd.lotus-screencam application/vnd.lotus-wordpro application/vnd.mcd application/vnd.mediastation.cdkey application/vnd.meridian-slingshot application/vnd.mif application/vnd.minisoft-hp3000-save application/vnd.mitsubishi.misty-guard.trustweb application/vnd.mobius.daf application/vnd.mobius.dis application/vnd.mobius.msl application/vnd.mobius.plc application/vnd.mobius.txf application/vnd.motorola.flexsuite application/vnd.motorola.flexsuite.adsi application/vnd.motorola.flexsuite.fis application/vnd.motorola.flexsuite.gotap application/vnd.motorola.flexsuite.kmr application/vnd.motorola.flexsuite.ttc application/vnd.motorola.flexsuite.wem application/vnd.mozilla.xul+xml xul application/vnd.ms-artgalry application/vnd.ms-asf application/vnd.ms-excel xls xlb xlt application/vnd.ms-lrm application/vnd.ms-pki.seccat cat application/vnd.ms-pki.stl stl application/vnd.ms-powerpoint ppt pps application/vnd.ms-project application/vnd.ms-tnef application/vnd.ms-works application/vnd.mseq application/vnd.msign application/vnd.music-niff application/vnd.musician application/vnd.netfpx application/vnd.noblenet-directory application/vnd.noblenet-sealer application/vnd.noblenet-web application/vnd.novadigm.EDM application/vnd.novadigm.EDX application/vnd.novadigm.EXT application/vnd.oasis.opendocument.chart odc application/vnd.oasis.opendocument.database odb application/vnd.oasis.opendocument.formula odf application/vnd.oasis.opendocument.graphics odg application/vnd.oasis.opendocument.graphics-template otg application/vnd.oasis.opendocument.image odi application/vnd.oasis.opendocument.presentation odp application/vnd.oasis.opendocument.presentation-template otp application/vnd.oasis.opendocument.spreadsheet ods application/vnd.oasis.opendocument.spreadsheet-template ots application/vnd.oasis.opendocument.text odt application/vnd.oasis.opendocument.text-master odm application/vnd.oasis.opendocument.text-template ott application/vnd.oasis.opendocument.text-web oth application/vnd.osa.netdeploy application/vnd.palm application/vnd.pg.format application/vnd.pg.osasli application/vnd.powerbuilder6 application/vnd.powerbuilder6-s application/vnd.powerbuilder7 application/vnd.powerbuilder7-s application/vnd.powerbuilder75 application/vnd.powerbuilder75-s application/vnd.previewsystems.box application/vnd.publishare-delta-tree application/vnd.pvi.ptid1 application/vnd.pwg-xhtml-print+xml application/vnd.rapid application/vnd.rim.cod cod application/vnd.s3sms application/vnd.seemail application/vnd.shana.informed.formdata application/vnd.shana.informed.formtemplate application/vnd.shana.informed.interchange application/vnd.shana.informed.package application/vnd.smaf mmf application/vnd.sss-cod application/vnd.sss-dtf application/vnd.sss-ntf application/vnd.stardivision.calc sdc application/vnd.stardivision.chart sds application/vnd.stardivision.draw sda application/vnd.stardivision.impress sdd application/vnd.stardivision.math sdf application/vnd.stardivision.writer sdw application/vnd.stardivision.writer-global sgl application/vnd.street-stream application/vnd.sun.xml.calc sxc application/vnd.sun.xml.calc.template stc application/vnd.sun.xml.draw sxd application/vnd.sun.xml.draw.template std application/vnd.sun.xml.impress sxi application/vnd.sun.xml.impress.template sti application/vnd.sun.xml.math sxm application/vnd.sun.xml.writer sxw application/vnd.sun.xml.writer.global sxg application/vnd.sun.xml.writer.template stw application/vnd.svd application/vnd.swiftview-ics application/vnd.symbian.install sis application/vnd.triscape.mxs application/vnd.trueapp application/vnd.truedoc application/vnd.tve-trigger application/vnd.ufdl application/vnd.uplanet.alert application/vnd.uplanet.alert-wbxml application/vnd.uplanet.bearer-choice application/vnd.uplanet.bearer-choice-wbxml application/vnd.uplanet.cacheop application/vnd.uplanet.cacheop-wbxml application/vnd.uplanet.channel application/vnd.uplanet.channel-wbxml application/vnd.uplanet.list application/vnd.uplanet.list-wbxml application/vnd.uplanet.listcmd application/vnd.uplanet.listcmd-wbxml application/vnd.uplanet.signal application/vnd.vcx application/vnd.vectorworks application/vnd.vidsoft.vidconference application/vnd.visio vsd application/vnd.vividence.scriptfile application/vnd.wap.sic application/vnd.wap.slc application/vnd.wap.wbxml wbxml application/vnd.wap.wmlc wmlc application/vnd.wap.wmlscriptc wmlsc application/vnd.webturbo application/vnd.wrq-hp3000-labelled application/vnd.wt.stf application/vnd.xara application/vnd.xfdl application/vnd.yellowriver-custom-menu application/x-123 wk application/x-7z-compressed 7z application/x-abiword abw application/x-apple-diskimage dmg application/x-bcpio bcpio application/x-bittorrent torrent application/x-cab cab application/x-cbr cbr application/x-cbz cbz application/x-cdf cdf application/x-cdlink vcd application/x-chess-pgn pgn application/x-core application/x-cpio cpio application/x-csh csh application/x-debian-package deb udeb application/x-director dcr dir dxr application/x-dms dms application/x-doom wad application/x-dvi dvi application/x-httpd-eruby rhtml application/x-executable application/x-flac flac application/x-font pfa pfb gsf pcf pcf.Z application/x-freemind mm application/x-futuresplash spl application/x-gnumeric gnumeric application/x-go-sgf sgf application/x-graphing-calculator gcf application/x-gtar gtar tgz taz application/x-hdf hdf application/x-httpd-php phtml pht php application/x-httpd-php-source phps application/x-httpd-php3 php3 application/x-httpd-php3-preprocessed php3p application/x-httpd-php4 php4 application/x-ica ica application/x-internet-signup ins isp application/x-iphone iii application/x-iso9660-image iso application/x-java-applet application/x-java-bean application/x-java-jnlp-file jnlp application/x-javascript js application/x-jmol jmz application/x-kchart chrt application/x-kdelnk application/x-killustrator kil application/x-koan skp skd skt skm application/x-kpresenter kpr kpt application/x-kspread ksp application/x-kword kwd kwt application/x-latex latex application/x-lha lha application/x-lyx lyx application/x-lzh lzh application/x-lzx lzx application/x-maker frm maker frame fm fb book fbdoc application/x-mif mif application/x-ms-wmd wmd application/x-ms-wmz wmz application/x-msdos-program com exe bat dll application/x-msi msi application/x-netcdf nc application/x-ns-proxy-autoconfig pac application/x-nwc nwc application/x-object o application/x-oz-application oza application/x-pkcs7-certreqresp p7r application/x-pkcs7-crl crl application/x-python-code pyc pyo application/x-quicktimeplayer qtl application/x-redhat-package-manager rpm application/x-rx application/x-sh sh application/x-shar shar application/x-shellscript application/x-shockwave-flash swf swfl application/x-stuffit sit sitx application/x-sv4cpio sv4cpio application/x-sv4crc sv4crc application/x-tar tar application/x-tcl tcl application/x-tex-gf gf application/x-tex-pk pk application/x-texinfo texinfo texi application/x-trash ~ % bak old sik application/x-troff t tr roff application/x-troff-man man application/x-troff-me me application/x-troff-ms ms application/x-ustar ustar application/x-videolan application/x-wais-source src application/x-wingz wz application/x-x509-ca-cert crt application/x-xcf xcf application/x-xfig fig application/x-xpinstall xpi audio/32kadpcm audio/3gpp audio/basic au snd audio/g.722.1 audio/l16 audio/midi mid midi kar audio/mp4a-latm audio/mpa-robust audio/mpeg mpga mpega mp2 mp3 m4a audio/mpegurl m3u audio/parityfec audio/prs.sid sid audio/telephone-event audio/tone audio/vnd.cisco.nse audio/vnd.cns.anp1 audio/vnd.cns.inf1 audio/vnd.digital-winds audio/vnd.everad.plj audio/vnd.lucent.voice audio/vnd.nortel.vbk audio/vnd.nuera.ecelp4800 audio/vnd.nuera.ecelp7470 audio/vnd.nuera.ecelp9600 audio/vnd.octel.sbc audio/vnd.qcelp audio/vnd.rhetorex.32kadpcm audio/vnd.vmx.cvsd audio/x-aiff aif aiff aifc audio/x-gsm gsm audio/x-mpegurl m3u audio/x-ms-wma wma audio/x-ms-wax wax audio/x-pn-realaudio-plugin audio/x-pn-realaudio ra rm ram audio/x-realaudio ra audio/x-scpls pls audio/x-sd2 sd2 audio/x-wav wav chemical/x-alchemy alc chemical/x-cache cac cache chemical/x-cache-csf csf chemical/x-cactvs-binary cbin cascii ctab chemical/x-cdx cdx chemical/x-cerius cer chemical/x-chem3d c3d chemical/x-chemdraw chm chemical/x-cif cif chemical/x-cmdf cmdf chemical/x-cml cml chemical/x-compass cpa chemical/x-crossfire bsd chemical/x-csml csml csm chemical/x-ctx ctx chemical/x-cxf cxf cef #chemical/x-daylight-smiles smi chemical/x-embl-dl-nucleotide emb embl chemical/x-galactic-spc spc chemical/x-gamess-input inp gam gamin chemical/x-gaussian-checkpoint fch fchk chemical/x-gaussian-cube cub chemical/x-gaussian-input gau gjc gjf chemical/x-gaussian-log gal chemical/x-gcg8-sequence gcg chemical/x-genbank gen chemical/x-hin hin chemical/x-isostar istr ist chemical/x-jcamp-dx jdx dx chemical/x-kinemage kin chemical/x-macmolecule mcm chemical/x-macromodel-input mmd mmod chemical/x-mdl-molfile mol chemical/x-mdl-rdfile rd chemical/x-mdl-rxnfile rxn chemical/x-mdl-sdfile sd sdf chemical/x-mdl-tgf tgf #chemical/x-mif mif chemical/x-mmcif mcif chemical/x-mol2 mol2 chemical/x-molconn-Z b chemical/x-mopac-graph gpt chemical/x-mopac-input mop mopcrt mpc dat zmt chemical/x-mopac-out moo chemical/x-mopac-vib mvb chemical/x-ncbi-asn1 asn chemical/x-ncbi-asn1-ascii prt ent chemical/x-ncbi-asn1-binary val aso chemical/x-ncbi-asn1-spec asn chemical/x-pdb pdb ent chemical/x-rosdal ros chemical/x-swissprot sw chemical/x-vamas-iso14976 vms chemical/x-vmd vmd chemical/x-xtel xtel chemical/x-xyz xyz image/cgm image/g3fax image/gif gif image/ief ief image/jpeg jpeg jpg jpe image/naplps image/pcx pcx image/png png image/prs.btif image/prs.pti image/svg+xml svg svgz image/tiff tiff tif image/vnd.cns.inf2 image/vnd.djvu djvu djv image/vnd.dwg image/vnd.dxf image/vnd.fastbidsheet image/vnd.fpx image/vnd.fst image/vnd.fujixerox.edmics-mmr image/vnd.fujixerox.edmics-rlc image/vnd.mix image/vnd.net-fpx image/vnd.svf image/vnd.wap.wbmp wbmp image/vnd.xiff image/x-cmu-raster ras image/x-coreldraw cdr image/x-coreldrawpattern pat image/x-coreldrawtemplate cdt image/x-corelphotopaint cpt image/x-icon ico image/x-jg art image/x-jng jng image/x-ms-bmp bmp image/x-photoshop psd image/x-portable-anymap pnm image/x-portable-bitmap pbm image/x-portable-graymap pgm image/x-portable-pixmap ppm image/x-rgb rgb image/x-xbitmap xbm image/x-xpixmap xpm image/x-xwindowdump xwd inode/chardevice inode/blockdevice inode/directory-locked inode/directory inode/fifo inode/socket message/delivery-status message/disposition-notification message/external-body message/http message/s-http message/news message/partial message/rfc822 eml model/iges igs iges model/mesh msh mesh silo model/vnd.dwf model/vnd.flatland.3dml model/vnd.gdl model/vnd.gs-gdl model/vnd.gtw model/vnd.mts model/vnd.vtu model/vrml wrl vrml multipart/alternative multipart/appledouble multipart/byteranges multipart/digest multipart/encrypted multipart/form-data multipart/header-set multipart/mixed multipart/parallel multipart/related multipart/report multipart/signed multipart/voice-message text/calendar ics icz text/css css text/csv csv text/directory text/english text/enriched text/h323 323 text/html html htm shtml text/iuls uls text/mathml mml text/parityfec text/plain asc txt text pot text/prs.lines.tag text/rfc822-headers text/richtext rtx text/rtf text/scriptlet sct wsc text/t140 text/texmacs tm ts text/tab-separated-values tsv text/uri-list text/vnd.abc text/vnd.curl text/vnd.DMClientScript text/vnd.flatland.3dml text/vnd.fly text/vnd.fmi.flexstor text/vnd.in3d.3dml text/vnd.in3d.spot text/vnd.IPTC.NewsML text/vnd.IPTC.NITF text/vnd.latex-z text/vnd.motorola.reflex text/vnd.ms-mediapackage text/vnd.sun.j2me.app-descriptor jad text/vnd.wap.si text/vnd.wap.sl text/vnd.wap.wml wml text/vnd.wap.wmlscript wmls text/x-bibtex bib text/x-boo boo text/x-c++hdr h++ hpp hxx hh text/x-c++src c++ cpp cxx cc text/x-chdr h text/x-component htc text/x-crontab text/x-csh csh text/x-csrc c text/x-dsrc d text/x-diff diff patch text/x-haskell hs text/x-java java text/x-literate-haskell lhs text/x-makefile text/x-moc moc text/x-pascal p pas text/x-pcs-gcd gcd text/x-perl pl pm text/x-python py text/x-server-parsed-html text/x-setext etx text/x-sh sh text/x-tcl tcl tk text/x-tex tex ltx sty cls text/x-vcalendar vcs text/x-vcard vcf video/3gpp 3gp video/dl dl video/dv dif dv video/fli fli video/gl gl video/mpeg mpeg mpg mpe video/mp4 mp4 video/quicktime qt mov video/mp4v-es video/parityfec video/pointer video/vnd.fvt video/vnd.motorola.video video/vnd.motorola.videop video/vnd.mpegurl mxu video/vnd.mts video/vnd.nokia.interleaved-multimedia video/vnd.vivo video/x-la-asf lsf lsx video/x-mng mng video/x-ms-asf asf asx video/x-ms-wm wm video/x-ms-wmv wmv video/x-ms-wmx wmx video/x-ms-wvx wvx video/x-msvideo avi video/x-sgi-movie movie x-conference/x-cooltalk ice x-epoc/x-sisx-app sisx x-world/x-vrml vrm vrml wrl passenger-4.0.37/test/ruby/admin_tools_spec.rb000644 000765 000024 00000031250 12233035540 022024 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'fileutils' PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'utils' PhusionPassenger.require_passenger_lib 'admin_tools' PhusionPassenger.require_passenger_lib 'admin_tools/server_instance' module PhusionPassenger describe AdminTools do include Utils before :each do Dir.mkdir("#{passenger_tmpdir}/master") end end describe AdminTools::ServerInstance do include Utils before :each do File.chmod(0700, passenger_tmpdir) end after :each do if @process1 Process.kill('KILL', @process1.pid) @process1.close end if @process2 Process.kill('KILL', @process2.pid) @process2.close end if @process3 Process.kill('KILL', @process3.pid) @process3.close end end def spawn_process IO.popen("sleep 999") end def create_instance_dir(pid, major = PhusionPassenger::SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION, minor = PhusionPassenger::SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION) dir = "#{passenger_tmpdir}/passenger.#{major}.#{minor}.#{pid}" Dir.mkdir(dir) return dir end def create_generation(dir, number = 0, major = PhusionPassenger::SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION, minor = PhusionPassenger::SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION) dir = "#{dir}/generation-#{number}" Dir.mkdir(dir) File.write("#{dir}/structure_version.txt", "#{major}.#{minor}") return dir end describe ".list" do before :each do AdminTools.should_receive(:tmpdir).and_return(passenger_tmpdir) AdminTools::ServerInstance.stub(:current_time). and_return(Time.now + AdminTools::ServerInstance::STALE_TIME_THRESHOLD + 1) end it "returns a list of ServerInstances representing the running Phusion Passenger instances" do @process1 = spawn_process @process2 = spawn_process processes = [@process1, @process2].sort { |a, b| a.pid <=> b.pid } dir1 = create_instance_dir(@process1.pid) create_generation(dir1) dir2 = create_instance_dir(@process2.pid) create_generation(dir2) instances = AdminTools::ServerInstance.list.sort { |a, b| a.pid <=> b.pid } instances.should have(2).items instances[0].pid.should == processes[0].pid instances[1].pid.should == processes[1].pid end it "doesn't list directories that don't look like Phusion Passenger server instance directories" do @process1 = spawn_process dir = create_instance_dir(@process1.pid) create_generation(dir) Dir.mkdir("#{passenger_tmpdir}/foo.123") create_generation("#{passenger_tmpdir}/foo.123") instances = AdminTools::ServerInstance.list instances.should have(1).item instances[0].pid.should == @process1.pid end it "doesn't list server instance directories that have a different major structure version" do @process1 = spawn_process @process2 = spawn_process dir1 = create_instance_dir(@process1.pid, 0) create_generation(dir1) dir2 = create_instance_dir(@process2.pid) create_generation(dir2) instances = AdminTools::ServerInstance.list instances.should have(1).item instances[0].pid.should == @process2.pid end it "doesn't list server instance directories that have the same major structure version but a larger minor structure version" do @process1 = spawn_process @process2 = spawn_process dir1 = create_instance_dir(@process1.pid, SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION, SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION + 1) create_generation(dir1) dir2 = create_instance_dir(@process2.pid) create_generation(dir2) instances = AdminTools::ServerInstance.list instances.should have(1).item instances[0].pid.should == @process2.pid end it "doesn't list server instance directories with no generations" do @process1 = spawn_process create_instance_dir(@process1.pid) AdminTools::ServerInstance.list.should be_empty end it "doesn't list server instance directories for which the newest generation has a different major version" do @process1 = spawn_process @process2 = spawn_process dir1 = create_instance_dir(@process1.pid) create_generation(dir1, 0, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION) create_generation(dir1, 1, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION + 1) dir2 = create_instance_dir(@process2.pid) create_generation(dir2) instances = AdminTools::ServerInstance.list instances.should have(1).item instances[0].pid.should == @process2.pid end it "doesn't list server instance directories for which the newest generation has the same major version but a larger minor version" do @process1 = spawn_process @process2 = spawn_process dir1 = create_instance_dir(@process1.pid) create_generation(dir1, 0, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION) create_generation(dir1, 1, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION + 1, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION + 1) dir2 = create_instance_dir(@process2.pid) create_generation(dir2) instances = AdminTools::ServerInstance.list instances.should have(1).item instances[0].pid.should == @process2.pid end it "cleans up server instance directories for which its PID doesn't exist" do @process1 = spawn_process process2 = spawn_process process2_pid = process2.pid process3 = spawn_process process3_pid = process3.pid dir1 = create_instance_dir(@process1.pid) create_generation(dir1) dir2 = create_instance_dir(process2_pid) create_generation(dir2) dir3 = create_instance_dir(process3_pid + 1) create_generation(dir3) File.write("#{dir3}/control_process.pid", process3_pid) Process.kill('KILL', process2_pid) rescue nil process2.close Process.kill('KILL', process3_pid) rescue nil process3.close AdminTools::ServerInstance.should_receive(:log_cleaning_action).twice instances = AdminTools::ServerInstance.list instances.should have(1).item instances[0].pid.should == @process1.pid File.exist?(dir2).should be_false File.exist?(dir3).should be_false end it "doesn't clean up server instance directories for which the major structure version is different" do process1 = spawn_process dir1 = create_instance_dir(process1.pid, SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION + 1) create_generation(dir1) Process.kill('KILL', process1.pid) rescue nil process1.close AdminTools::ServerInstance.should_not_receive(:log_cleaning_action) instances = AdminTools::ServerInstance.list instances.should be_empty File.exist?(dir1).should be_true end it "doesn't clean up server instance directories for which the major structure version is the same but the minor structure version is larger" do process1 = spawn_process dir1 = create_instance_dir(process1.pid, SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION, SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION + 1) create_generation(dir1) Process.kill('KILL', process1.pid) rescue nil process1.close AdminTools::ServerInstance.should_not_receive(:log_cleaning_action) instances = AdminTools::ServerInstance.list instances.should be_empty File.exist?(dir1).should be_true end it "doesn't clean up server instance directories for which the latest generation has a different major version" do process1 = spawn_process dir1 = create_instance_dir(process1.pid) create_generation(dir1, 0, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION + 1) Process.kill('KILL', process1.pid) rescue nil process1.close AdminTools::ServerInstance.should_not_receive(:log_cleaning_action) instances = AdminTools::ServerInstance.list instances.should be_empty File.exist?(dir1).should be_true end it "doesn't clean up server instance directories for which the latest generation has the same major version but a larger minor version" do process1 = spawn_process dir1 = create_instance_dir(process1.pid) create_generation(dir1, 0, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION, SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION + 1) Process.kill('KILL', process1.pid) rescue nil process1.close AdminTools::ServerInstance.should_not_receive(:log_cleaning_action) instances = AdminTools::ServerInstance.list instances.should be_empty File.exist?(dir1).should be_true end it "cleans up server instance directories that contain a corrupted control_process.pid" do @process1 = spawn_process @process2 = spawn_process dir1 = create_instance_dir(@process1.pid) create_generation(dir1) dir2 = create_instance_dir(@process2.pid) create_generation(dir2) File.write("#{dir2}/control_process.pid", "") AdminTools::ServerInstance.should_receive(:log_cleaning_action) instances = AdminTools::ServerInstance.list instances.should have(1).item instances[0].pid.should == @process1.pid File.exist?(dir2).should be_false end it "cleans up server instance directories for which the latest generation has a corrupted structure_version.txt" do @process1 = spawn_process @process2 = spawn_process @process3 = spawn_process dir1 = create_instance_dir(@process1.pid) create_generation(dir1) dir2 = create_instance_dir(@process2.pid) generation2 = create_generation(dir2) File.write("#{generation2}/structure_version.txt", "") dir3 = create_instance_dir(@process3.pid) generation3 = create_generation(dir3) File.write("#{generation3}/structure_version.txt", "1.x") AdminTools::ServerInstance.should_receive(:log_cleaning_action).twice instances = AdminTools::ServerInstance.list instances.should have(1).item instances[0].pid.should == @process1.pid File.exist?(dir2).should be_false File.exist?(dir3).should be_false end it "cleans up server instance directories for which the latest generation doesn't have a structure_version.txt" do @process1 = spawn_process @process2 = spawn_process dir1 = create_instance_dir(@process1.pid) create_generation(dir1) dir2 = create_instance_dir(@process2.pid) generation2 = create_generation(dir2) File.unlink("#{generation2}/structure_version.txt") AdminTools::ServerInstance.should_receive(:log_cleaning_action) instances = AdminTools::ServerInstance.list instances.should have(1).item instances[0].pid.should == @process1.pid File.exist?(dir2).should be_false end it "only cleans up an instance directory if it was modified more than STALE_TIME_THRESHOLD seconds ago" do @process1 = spawn_process @process2 = spawn_process creation_time = Time.now list_time = Time.now + AdminTools::ServerInstance::STALE_TIME_THRESHOLD + 1 # This directory was created more than STALE_TIME_THRESHOLD secs ago, but # modified just now. dir1 = create_instance_dir(@process1.pid) generation1 = create_generation(dir1) File.unlink("#{generation1}/structure_version.txt") File.utime(creation_time, list_time, dir1) # This directory was created and modified more than STALE_TIME_THRESHOLD # secs ago. dir2 = create_instance_dir(@process2.pid) generation2 = create_generation(dir2) File.unlink("#{generation2}/structure_version.txt") File.utime(creation_time, creation_time, dir2) AdminTools::ServerInstance.should_receive(:log_cleaning_action) AdminTools::ServerInstance.should_receive(:current_time).and_return(list_time) instances = AdminTools::ServerInstance.list instances.should have(0).items File.exist?(dir1).should be_true File.exist?(dir2).should be_false end it "does not clean up instance directories if clean_stale_or_corrupted is false" do @process1 = spawn_process @process2 = spawn_process dir1 = create_instance_dir(@process1.pid) create_generation(dir1) dir2 = create_instance_dir(@process2.pid) create_generation(dir2) File.write("#{dir2}/control_process.pid", "") AdminTools::ServerInstance.should_not_receive(:log_cleaning_action) instances = AdminTools::ServerInstance.list(:clean_stale_or_corrupted => false) instances.should have(1).item instances[0].pid.should == @process1.pid File.exist?(dir2).should be_true end end describe "#pid" do before :each do @process1 = spawn_process end it "returns the PID in the directory filename if instance.pid doesn't exist" do dir = create_instance_dir(@process1.pid) create_generation(dir) AdminTools::ServerInstance.new(dir).pid.should == @process1.pid end it "returns the PID in control_process.pid if it exists" do dir = create_instance_dir(@process1.pid + 1) create_generation(dir) File.write("#{dir}/control_process.pid", @process1.pid) AdminTools::ServerInstance.new(dir).pid.should == @process1.pid end end end end # module PhusionPassenger passenger-4.0.37/test/ruby/analytics_logger_spec.rb000644 000765 000024 00000015706 12233035540 023052 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'stringio' PhusionPassenger.require_passenger_lib 'analytics_logger' module PhusionPassenger describe AnalyticsLogger do YESTERDAY = Time.utc(2010, 4, 11, 11, 56, 02) TODAY = Time.utc(2010, 4, 11, 12, 56, 02) TOMORROW = Time.utc(2010, 4, 11, 13, 56, 02) before :each do @username = "logging" @password = "1234" @dump_file = Utils.passenger_tmpdir + "/log.txt" start_agent @logger = AnalyticsLogger.new(@socket_address, @username, @password, "localhost") @logger2 = AnalyticsLogger.new(@socket_address, @username, @password, "localhost") end after :each do @logger.close @logger2.close if @agent_pid Process.kill('KILL', @agent_pid) Process.waitpid(@agent_pid) end end def mock_time(time) AnalyticsLogger.stub(:current_time).and_return(time) end def start_agent @agent_pid, @socket_filename, @socket_address = spawn_logging_agent(@dump_file, @password) end def kill_agent if @agent_pid Process.kill('KILL', @agent_pid) Process.waitpid(@agent_pid) File.unlink(@socket_filename) @agent_pid = nil end end specify "logging with #new_transaction works" do mock_time(TODAY) log = @logger.new_transaction("foobar") log.should_not be_null begin log.message("hello") ensure log.close(true) end File.read(@dump_file).should =~ /hello/ log = @logger.new_transaction("foobar", :processes) log.should_not be_null begin log.message("world") ensure log.close(true) end File.read(@dump_file).should =~ /world/ end specify "#new_transaction reestablishes the connection if disconnected" do mock_time(TODAY) @logger.new_transaction("foobar").close(true) connection = @logger.instance_variable_get(:"@connection") connection.synchronize do connection.channel.close connection.channel = nil end log = @logger.new_transaction("foobar") begin log.message("hello") ensure log.close(true) end File.read(@dump_file).should =~ /hello/ end specify "#new_transaction does not reconnect to the server for a short period of time if connecting failed" do @logger.reconnect_timeout = 60 @logger.max_connect_tries = 1 mock_time(TODAY) kill_agent @logger.new_transaction("foobar").should be_null mock_time(TODAY + 30) start_agent @logger.new_transaction("foobar").should be_null mock_time(TODAY + 61) @logger.new_transaction("foobar").should_not be_null end specify "logging with #continue_transaction works" do mock_time(TODAY) log = @logger.new_transaction("foobar", :processes) begin log.message("hello") log2 = @logger2.continue_transaction(log.txn_id, "foobar", :processes) log2.should_not be_null log2.txn_id.should == log.txn_id begin log2.message("world") ensure log2.close(true) end ensure log.close(true) end File.read(@dump_file).should =~ /#{Regexp.escape log.txn_id} .* hello$/ File.read(@dump_file).should =~ /#{Regexp.escape log.txn_id} .* world$/ end specify "#continue_transaction reestablishes the connection if disconnected" do mock_time(TODAY) log = @logger.new_transaction("foobar") log.close(true) log2 = @logger2.continue_transaction(log.txn_id, "foobar") log2.close(true) connection = @logger2.instance_variable_get(:"@connection") connection.synchronize do connection.channel.close connection.channel = nil end log2 = @logger2.continue_transaction(log.txn_id, "foobar") begin log2.message("hello") ensure log2.close(true) end File.read(@dump_file).should =~ /hello/ end specify "#new_transaction and #continue_transaction eventually reestablish the connection to the logging server if the logging server crashed and was restarted" do mock_time(TODAY) log = @logger.new_transaction("foobar") @logger2.continue_transaction(log.txn_id, "foobar").close kill_agent start_agent log = @logger.new_transaction("foobar") log.should be_null log2 = @logger2.continue_transaction("1234-abcd", "foobar") log2.should be_null mock_time(TODAY + 60) log = @logger.new_transaction("foobar") log2 = @logger2.continue_transaction(log.txn_id, "foobar") begin log2.message("hello") ensure log2.close(true) end log.close(true) File.read(@dump_file).should =~ /hello/ end specify "#continue_transaction does not reconnect to the server for a short period of time if connecting failed" do @logger.reconnect_timeout = 60 @logger.max_connect_tries = 1 @logger2.reconnect_timeout = 60 @logger2.max_connect_tries = 1 mock_time(TODAY) log = @logger.new_transaction("foobar") @logger2.continue_transaction(log.txn_id, "foobar") kill_agent @logger2.continue_transaction(log.txn_id, "foobar").should be_null mock_time(TODAY + 30) start_agent @logger2.continue_transaction(log.txn_id, "foobar").should be_null mock_time(TODAY + 61) @logger2.continue_transaction(log.txn_id, "foobar").should_not be_null end specify "AnalyticsLogger only creates null Log objects if no server address is given" do logger = AnalyticsLogger.new(nil, nil, nil, nil) begin logger.new_transaction("foobar").should be_null ensure logger.close end end specify "#clear_connection closes the connection" do @logger.new_transaction("foobar").close @logger.clear_connection connection = @logger.instance_variable_get(:"@connection") connection.synchronize do connection.channel.should be_nil end end describe "Log objects" do it "becomes null once it is closed" do log = @logger.new_transaction("foobar") log.close log.should be_null end it "does nothing if it's null" do logger = AnalyticsLogger.new(nil, nil, nil, nil) begin log = logger.new_transaction("foobar") log.message("hello") log.close(true) ensure logger.close end File.exist?("#{@log_dir}/1").should be_false end describe "#begin_measure" do it "sends a BEGIN message" do log = @logger.new_transaction("foobar") begin log.should_receive(:message).with(/^BEGIN: hello \(.+?,.+?,.+?\) $/) log.begin_measure("hello") ensure log.close end end it "adds extra information as base64" do log = @logger.new_transaction("foobar") begin log.should_receive(:message).with(/^BEGIN: hello \(.+?,.+?,.+?\) YWJjZA==$/) log.begin_measure("hello", "abcd") ensure log.close end end end describe "#end_measure" do it "sends an END message if error_countered=false" do log = @logger.new_transaction("foobar") begin log.should_receive(:message).with(/^END: hello \(.+?,.+?,.+?\)$/) log.end_measure("hello") ensure log.close end end it "sends a FAIL message if error_countered=true" do log = @logger.new_transaction("foobar") begin log.should_receive(:message).with(/^FAIL: hello \(.+?,.+?,.+?\)$/) log.end_measure("hello", true) ensure log.close end end end end end end # module PhusionPassenger passenger-4.0.37/test/ruby/classic_rails/000755 000765 000024 00000000000 12233035540 020767 5ustar00honglistaff000000 000000 passenger-4.0.37/test/ruby/debug_logging_spec.rb000644 000765 000024 00000007226 12233035540 022316 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/spec_helper') PhusionPassenger.require_passenger_lib 'debug_logging' PhusionPassenger.require_passenger_lib 'utils/tmpdir' require 'stringio' module PhusionPassenger describe DebugLogging do after :each do DebugLogging.log_level = 0 DebugLogging.log_file = nil DebugLogging.stderr_evaluator = nil end class MyClass include DebugLogging end def use_log_file! @log_file = PhusionPassenger::Utils.passenger_tmpdir + "/debug.log" DebugLogging.log_file = @log_file end describe "#debug" do it "doesn't print the message if log level is 0" do use_log_file! DebugLogging.debug("hello") File.exist?(@log_file).should be_false end it "prints the message if log level is 1" do use_log_file! DebugLogging.log_level = 1 DebugLogging.debug("hello") File.exist?(@log_file).should be_true end it "prints the message if log level is greater than 1" do use_log_file! DebugLogging.log_level = 2 DebugLogging.debug("hello") File.exist?(@log_file).should be_true end it "prints the location of the calling function" do use_log_file! DebugLogging.log_level = 1 DebugLogging.debug("hello") File.read(@log_file).should include("debug_logging_spec.rb") end it "prints to STDERR by default" do io = StringIO.new DebugLogging.log_level = 1 DebugLogging.stderr_evaluator = lambda { io } DebugLogging.debug("hello") io.string.should include("hello") end it "reopens the log file handle if it has been closed" do use_log_file! DebugLogging.log_level = 1 DebugLogging.debug("hello") DebugLogging._log_device.close DebugLogging.debug("world") File.read(@log_file).should include("world") end it "also works as included method" do use_log_file! DebugLogging.log_level = 1 MyClass.new.send(:debug, "hello") File.read(@log_file).should include("hello") end it "is private when included" do MyClass.private_method_defined?(:debug) end end describe "#trace" do specify "#trace(x, ...) doesn't print the message if the log level is lower than x" do use_log_file! DebugLogging.log_level = 1 DebugLogging.trace(2, "hello") File.exist?(@log_file).should be_false end specify "#trace(x, ...) prints the message if the log level equals x" do use_log_file! DebugLogging.log_level = 2 DebugLogging.trace(2, "hello") File.exist?(@log_file).should be_true end specify "#trace(x, ...) prints the message if the log level is greater than x" do use_log_file! DebugLogging.log_level = 3 DebugLogging.trace(2, "hello") File.exist?(@log_file).should be_true end specify "#trace prints the location of the calling function" do io = StringIO.new DebugLogging.log_level = 1 DebugLogging.stderr_evaluator = lambda { io } DebugLogging.trace(1, "hello") io.string.should include("hello") end it "prints to STDERR by default" do io = StringIO.new DebugLogging.log_level = 1 DebugLogging.stderr_evaluator = lambda { io } DebugLogging.trace(1, "hello") io.string.should include("hello") end it "reopens the log file handle if it has been closed" do use_log_file! DebugLogging.log_level = 1 DebugLogging.trace(1, "hello") DebugLogging._log_device.close DebugLogging.trace(1, "world") File.read(@log_file).should include("world") end it "also works as included method" do use_log_file! DebugLogging.log_level = 1 MyClass.new.send(:trace, 1, "hello") File.read(@log_file).should include("hello") end it "is private when included" do MyClass.private_method_defined?(:trace) end end end end # module PhusionPassenger passenger-4.0.37/test/ruby/message_channel_spec.rb000644 000765 000024 00000012375 12233035540 022637 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'socket' PhusionPassenger.require_passenger_lib 'message_channel' module PhusionPassenger describe MessageChannel do describe "scenarios with a single channel" do before :each do @reader_pipe, @writer_pipe = IO.pipe @reader = MessageChannel.new(@reader_pipe) @writer = MessageChannel.new(@writer_pipe) end after :each do @reader_pipe.close unless @reader_pipe.closed? @writer_pipe.close unless @writer_pipe.closed? end it "can read a single written array message" do @writer.write("hello") @reader.read.should == ["hello"] end it "can handle array messages that contain spaces" do @writer.write("hello world", "! ") @reader.read.should == ["hello world", "! "] end it "can handle array messages that have only a single empty string" do @writer.write("") @reader.read.should == [""] end it "can handle array messages with empty arguments" do @writer.write("hello", "", "world") @reader.read.should == ["hello", "", "world"] @writer.write("") @reader.read.should == [""] @writer.write(nil, "foo") @reader.read.should == ["", "foo"] end it "properly detects end-of-file when reading an array message" do @writer.close @reader.read.should be_nil end specify "#read_hash works" do @writer.write("hello", "world") @reader.read_hash.should == { "hello" => "world" } @writer.write("hello", "world", "foo", "bar", "", "...") @reader.read_hash.should == { "hello" => "world", "foo" => "bar", "" => "..." } end specify "#read_hash throws an exception if the array message doesn't have an even number of items" do @writer.write("foo") lambda { @reader.read_hash }.should raise_error(MessageChannel::InvalidHashError) @writer.write("foo", "bar", "baz") lambda { @reader.read_hash }.should raise_error(MessageChannel::InvalidHashError) end it "can read a single written scalar message" do @writer.write_scalar("hello world") @reader.read_scalar.should == "hello world" end it "can handle empty scalar messages" do @writer.write_scalar("") @reader.read_scalar.should == "" end it "properly detects end-of-file when reading a scalar message" do @writer.close @reader.read_scalar.should be_nil end it "puts the data into the given buffer" do buffer = '' @writer.write_scalar("x" * 100) result = @reader.read_scalar(buffer) result.object_id.should == buffer.object_id buffer.should == "x" * 100 end it "raises SecurityError when a received scalar message's size is larger than a specified maximum" do @writer.write_scalar(" " * 100) lambda { @reader.read_scalar('', 99) }.should raise_error(SecurityError) end end describe "scenarios with 2 channels and 2 concurrent processes" do after :each do @parent_socket.close Process.waitpid(@pid) rescue nil end def spawn_process @parent_socket, @child_socket = UNIXSocket.pair @pid = fork do @parent_socket.close @channel = MessageChannel.new(@child_socket) begin yield rescue Exception => e print_exception("child", e) ensure @child_socket.close exit! end end @child_socket.close @channel = MessageChannel.new(@parent_socket) end it "both processes can read and write a single array message" do spawn_process do x = @channel.read @channel.write("#{x[0]}!") end @channel.write("hello") @channel.read.should == ["hello!"] end it "can handle scalar messages with arbitrary binary data" do garbage_files = ["garbage1.dat", "garbage2.dat", "garbage3.dat"] spawn_process do garbage_files.each do |name| data = File.binread("stub/#{name}") @channel.write_scalar(data) end end garbage_files.each do |name| data = File.binread("stub/#{name}") @channel.read_scalar.should == data end end it "supports IO object (file descriptor) passing" do spawn_process do writer = @channel.recv_io writer.write("it works") writer.close end reader, writer = IO.pipe @channel.send_io(writer) writer.close reader.read.should == "it works" reader.close end it "supports large amounts of data" do iterations = 1000 blob = "123" * 1024 spawn_process do iterations.times do |i| @channel.write(blob) end end iterations.times do @channel.read.should == [blob] end end it "has stream properties" do garbage = File.binread("stub/garbage1.dat") spawn_process do @channel.write("hello", "world") @channel.write_scalar(garbage) @channel.send_io(STDIN) @channel.write_scalar(":-)") a = @channel.read_scalar b = @channel.read b << a @channel.write(*b) end @channel.read.should == ["hello", "world"] @channel.read_scalar.should == garbage @channel.recv_io.close @channel.read_scalar.should == ":-)" @channel.write_scalar("TASTE MY WRATH! ULTIMATE SWORD TECHNIQUE!! DRAGON'S BREATH SL--") @channel.write("Uhm, watch your step.", "WAAHH?!", "Calm down, Motoko!!") @channel.read.should == ["Uhm, watch your step.", "WAAHH?!", "Calm down, Motoko!!", "TASTE MY WRATH! ULTIMATE SWORD TECHNIQUE!! DRAGON'S BREATH SL--"] end end end end # module PhusionPassenger passenger-4.0.37/test/ruby/rack/000755 000765 000024 00000000000 12233035540 017074 5ustar00honglistaff000000 000000 passenger-4.0.37/test/ruby/rails3.0/000755 000765 000024 00000000000 12233035540 017507 5ustar00honglistaff000000 000000 passenger-4.0.37/test/ruby/rails3.1/000755 000765 000024 00000000000 12233035540 017510 5ustar00honglistaff000000 000000 passenger-4.0.37/test/ruby/rails3.2/000755 000765 000024 00000000000 12233035540 017511 5ustar00honglistaff000000 000000 passenger-4.0.37/test/ruby/rails4.0/000755 000765 000024 00000000000 12233035540 017510 5ustar00honglistaff000000 000000 passenger-4.0.37/test/ruby/request_handler_spec.rb000644 000765 000024 00000051434 12233035540 022707 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/spec_helper') PhusionPassenger.require_passenger_lib 'request_handler' PhusionPassenger.require_passenger_lib 'request_handler/thread_handler' PhusionPassenger.require_passenger_lib 'rack/thread_handler_extension' PhusionPassenger.require_passenger_lib 'analytics_logger' PhusionPassenger.require_passenger_lib 'utils' require 'fileutils' module PhusionPassenger describe RequestHandler do class DummyThreadHandler < RequestHandler::ThreadHandler def process_request(*args) # Do nothing. end end before :each do preinitialize if respond_to?(:preinitialize) @old_passenger_tmpdir = Utils.passenger_tmpdir Utils.passenger_tmpdir = "request_handler_spec.tmp" @owner_pipe = IO.pipe @options ||= {} @thread_handler = Class.new(DummyThreadHandler) @options = { "app_group_name" => "foobar", "thread_handler" => @thread_handler }.merge(@options) @request_handler = RequestHandler.new(@owner_pipe[1], @options) end after :each do stop_request_handler Utils.passenger_tmpdir = @old_passenger_tmpdir FileUtils.chmod_R(0777, "request_handler_spec.tmp") FileUtils.rm_rf("request_handler_spec.tmp") end def stop_request_handler if @request_handler @request_handler.cleanup @owner_pipe[0].close rescue nil @request_handler = nil end end def connect(socket_name = :main) address = @request_handler.server_sockets[socket_name][:address] return Utils.connect_to_server(address) end def send_binary_request(socket, env) channel = MessageChannel.new(socket) data = "" env.each_pair do |key, value| data << key << "\0" data << value << "\0" end channel.write_scalar(data) end it "exits if the owner pipe is closed" do @request_handler.start_main_loop_thread @owner_pipe[0].close eventually do !@request_handler.main_loop_running? end end it "creates a socket file in the Phusion Passenger temp folder, unless when using TCP sockets" do if @request_handler.server_sockets[:main][1] == "unix" File.chmod(0700, "request_handler_spec.tmp/backends") Dir["request_handler_spec.tmp/backends/*"].should_not be_empty end end specify "the main socket rejects headers that are too large" do stderr = StringIO.new DebugLogging.log_level = 0 DebugLogging.stderr_evaluator = lambda { stderr } @request_handler.start_main_loop_thread begin client = connect client.sync = true block = lambda do data = "REQUEST_METHOD\0/" data << "x" * (RequestHandler::ThreadHandler::MAX_HEADER_SIZE * 2) data << "\0" MessageChannel.new(client).write_scalar(data) end block.should raise_error(Errno::EPIPE) stderr.string.should_not be_empty ensure client.close rescue nil end end specify "the main socket rejects unauthenticated connections, if a connect password is supplied" do @request_handler.connect_password = "1234" @request_handler.start_main_loop_thread begin client = connect channel = MessageChannel.new(client) channel.write_scalar("REQUEST_METHOD\0PING\0") client.read.should == "" ensure client.close rescue nil end begin client = connect channel = MessageChannel.new(client) channel.write_scalar("REQUEST_METHOD\0PING\0PASSENGER_CONNECT_PASSWORD\0001234\0") client.read.should == "pong" ensure client.close rescue nil end end it "accepts pings on the main server socket" do @request_handler.start_main_loop_thread client = connect begin channel = MessageChannel.new(client) channel.write_scalar("REQUEST_METHOD\0PING\0") client.read.should == "pong" ensure client.close end end it "accepts pings on the HTTP server socket" do @request_handler.start_main_loop_thread client = connect(:http) begin client.write("PING / HTTP/1.1\r\n") client.write("Host: foo.com\r\n\r\n") client.close_write client.read.should == "pong" ensure client.close end end specify "the HTTP socket rejects headers that are too large" do stderr = StringIO.new DebugLogging.log_level = 0 DebugLogging.stderr_evaluator = lambda { stderr } @request_handler.start_main_loop_thread begin client = connect(:http) client.sync = true block = lambda do client.write("GET /") client.write("x" * RequestHandler::ThreadHandler::MAX_HEADER_SIZE) sleep 0.01 # Context switch client.write("x" * RequestHandler::ThreadHandler::MAX_HEADER_SIZE) client.write(" HTTP/1.1\r\n") end block.should raise_error(SystemCallError) stderr.string.should_not be_empty ensure client.close rescue nil end end specify "the HTTP socket rejects unauthenticated connections, if a connect password is supplied" do DebugLogging.log_level = -1 @request_handler.connect_password = "1234" @request_handler.start_main_loop_thread begin client = connect(:http) client.write("PING / HTTP/1.1\r\n") client.write("\r\n") client.read.should == "" ensure client.close rescue nil end begin client = connect(:http) client.write("PING / HTTP/1.1\r\n") client.write("X-Passenger-Connect-Password: 1234\r\n") client.write("\r\n") client.read.should == "pong" ensure client.close rescue nil end end it "catches exceptions generated by the Rack application object" do @options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do include Rack::ThreadHandlerExtension end lambda_called = false # Here we test that the exception is not propagated to outside the request handler. DebugLogging.log_level = -2 @options["app"] = lambda do |env| lambda_called = true raise "an error" end @request_handler = RequestHandler.new(@owner_pipe[1], @options) @request_handler.start_main_loop_thread client = connect begin send_binary_request(client, "REQUEST_METHOD" => "GET", "PATH_INFO" => "/") client.read ensure client.close end lambda_called.should == true end it "catches exceptions generated by the Rack body object" do @options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do include Rack::ThreadHandlerExtension end lambda_called = false # Here we test that the exception is not propagated to outside the request handler. DebugLogging.log_level = -2 @options["app"] = lambda do |env| lambda_called = true body = Object.new def body.each raise "an error" end [200, { "Content-Type" => "text/plain" }, body] end @request_handler = RequestHandler.new(@owner_pipe[1], @options) @request_handler.start_main_loop_thread client = connect begin send_binary_request(client, "REQUEST_METHOD" => "GET", "PATH_INFO" => "/") client.read ensure client.close end lambda_called.should == true end it "allows the application to take over the socket completely through the full hijack API" do @options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do include Rack::ThreadHandlerExtension end lambda_called = false @options["app"] = lambda do |env| lambda_called = true env['rack.hijack?'].should be_true env['rack.hijack_io'].should be_nil env['rack.hijack'].call Thread.new do Thread.current.abort_on_exception = true sleep 0.1 env['rack.hijack_io'].write("Hijacked response!") env['rack.hijack_io'].close end end @request_handler = RequestHandler.new(@owner_pipe[1], @options) @request_handler.start_main_loop_thread client = connect begin send_binary_request(client, "REQUEST_METHOD" => "GET", "PATH_INFO" => "/") sleep 0.1 # Give it some time to handle the request. stop_request_handler client.read.should == "Hijacked response!" ensure client.close end lambda_called.should == true end it "allows the application to take over the socket after sending headers through the partial hijack API" do @options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do include Rack::ThreadHandlerExtension end lambda_called = false hijack_callback_called = false @options["app"] = lambda do |env| lambda_called = true env['rack.hijack?'].should be_true env['rack.hijack_io'].should be_nil hijack_callback = lambda do |socket| hijack_callback_called = true env['rack.hijack_io'].should_not be_nil env['rack.hijack_io'].should == socket socket.write("Hijacked partial response!") socket.close end [200, { 'Content-Type' => 'text/html', 'rack.hijack' => hijack_callback }] end @request_handler = RequestHandler.new(@owner_pipe[1], @options) @request_handler.start_main_loop_thread client = connect begin send_binary_request(client, "REQUEST_METHOD" => "GET", "PATH_INFO" => "/") client.read.should == "Status: 200\r\n" + "Content-Type: text/html\r\n" + "\r\n" + "Hijacked partial response!" ensure client.close end lambda_called.should == true hijack_callback_called.should == true end specify "GET requests with Content-Length are assumed to have a request body" do @options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do include Rack::ThreadHandlerExtension end lambda_called = false @options["app"] = lambda do |env| lambda_called = true env['rack.input'].read(3).should == "abc" [200, {}, ["ok"]] end @request_handler = RequestHandler.new(@owner_pipe[1], @options) @request_handler.start_main_loop_thread client = connect begin send_binary_request(client, "REQUEST_METHOD" => "GET", "PATH_INFO" => "/", "CONTENT_LENGTH" => "3") client.write("abc") client.close_write client.read.should == "Status: 200\r\n" + "\r\n" + "ok" ensure client.close end lambda_called.should be_true end specify "GET requests with Transfer-Encoding are assumed to have a request body" do @options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do include Rack::ThreadHandlerExtension end lambda_called = false @options["app"] = lambda do |env| lambda_called = true env['rack.input'].read(13).should == "3\r\n" + "abc\r\n" + "0\r\n\r\n" [200, {}, ["ok"]] end @request_handler = RequestHandler.new(@owner_pipe[1], @options) @request_handler.start_main_loop_thread client = connect begin send_binary_request(client, "REQUEST_METHOD" => "GET", "PATH_INFO" => "/", "HTTP_TRANSFER_ENCODING" => "chunked") client.write( "3\r\n" + "abc\r\n" + "0\r\n\r\n") client.close_write client.read.should == "Status: 200\r\n" + "\r\n" + "ok" ensure client.close end lambda_called.should be_true end specify "GET requests with neither Content-Length nor Transfer-Encoding are assumed to have no request body" do @options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do include Rack::ThreadHandlerExtension end lambda_called = false @options["app"] = lambda do |env| lambda_called = true env['rack.input'].read(1).should be_nil env['rack.input'].gets.should be_nil [200, {}, ["ok"]] end @request_handler = RequestHandler.new(@owner_pipe[1], @options) @request_handler.start_main_loop_thread client = connect begin send_binary_request(client, "REQUEST_METHOD" => "GET", "PATH_INFO" => "/") client.close_write client.read.should == "Status: 200\r\n" + "\r\n" + "ok" ensure client.close end lambda_called.should be_true end specify "GET requests with Content-Length 0 are assumed to have no request body" do @options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do include Rack::ThreadHandlerExtension end lambda_called = false @options["app"] = lambda do |env| lambda_called = true env['rack.input'].read(1).should be_nil env['rack.input'].gets.should be_nil [200, {}, ["ok"]] end @request_handler = RequestHandler.new(@owner_pipe[1], @options) @request_handler.start_main_loop_thread client = connect begin send_binary_request(client, "REQUEST_METHOD" => "GET", "PATH_INFO" => "/", "CONTENT_LENGTH" => "0") client.close_write client.read.should == "Status: 200\r\n" + "\r\n" + "ok" ensure client.close end lambda_called.should be_true end specify "non-GET requests are assumed to have a request body, even those without Content-Length and Transfer-Encoding" do @options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do include Rack::ThreadHandlerExtension end lambda_called = false @options["app"] = lambda do |env| lambda_called = true env['rack.input'].read(3).should == "abc" [200, {}, ["ok"]] end @request_handler = RequestHandler.new(@owner_pipe[1], @options) @request_handler.start_main_loop_thread client = connect begin send_binary_request(client, "REQUEST_METHOD" => "POST", "PATH_INFO" => "/") client.write("abc") client.close_write client.read.should == "Status: 200\r\n" + "\r\n" + "ok" ensure client.close end lambda_called.should be_true end describe "on GET requests that are not supposed to have a body" do before :each do @options["thread_handler"] = Class.new(RequestHandler::ThreadHandler) do include Rack::ThreadHandlerExtension end end it "allows reading from the client socket once the socket has been fully hijacked" do lambda_called = false @options["app"] = lambda do |env| lambda_called = true env['rack.hijack'].call io = env['rack.hijack_io'] begin io.read.should == "hi" io.write("ok") ensure io.close end end @request_handler = RequestHandler.new(@owner_pipe[1], @options) @request_handler.start_main_loop_thread client = connect begin send_binary_request(client, "REQUEST_METHOD" => "GET", "PATH_INFO" => "/") client.write("hi") client.close_write client.read.should == "ok" ensure client.close end lambda_called.should be_true end it "allows reading from the client socket once the socket has been partially hijacked" do lambda_called = false @options["app"] = lambda do |env| block = lambda do |io| lambda_called = true begin io.read.should == "hi" io.write("ok") ensure io.close end end headers = { 'rack.hijack' => block } [200, headers, []] end @request_handler = RequestHandler.new(@owner_pipe[1], @options) @request_handler.start_main_loop_thread client = connect begin send_binary_request(client, "REQUEST_METHOD" => "GET", "PATH_INFO" => "/") client.write("hi") client.close_write client.read.should == "Status: 200\r\n" + "\r\n" + "ok" ensure client.close end lambda_called.should be_true end end describe "if analytics logger is given" do def preinitialize if @agent_pid Process.kill('KILL', @agent_pid) Process.waitpid(@agent_pid) end @dump_file = "#{Utils.passenger_tmpdir}/log.txt" @logging_agent_password = "1234" @agent_pid, @socket_filename, @socket_address = spawn_logging_agent(@dump_file, @logging_agent_password) @logger = AnalyticsLogger.new(@socket_address, "logging", "1234", "localhost") @options = { "analytics_logger" => @logger } end after :each do if @agent_pid Process.kill('KILL', @agent_pid) Process.waitpid(@agent_pid) end end def base64(data) return [data].pack('m').gsub("\n", "") end it "makes the analytics log object available through the request env and a thread-local variable" do header_value = nil thread_value = nil @thread_handler.any_instance.should_receive(:process_request).and_return do |headers, connection, full_http_response| header_value = headers[PASSENGER_ANALYTICS_WEB_LOG] thread_value = Thread.current[PASSENGER_ANALYTICS_WEB_LOG] end @request_handler.start_main_loop_thread client = connect begin send_binary_request(client, "REQUEST_METHOD" => "GET", "PASSENGER_TXN_ID" => "1234-abcd", "PASSENGER_GROUP_NAME" => "foobar") client.read ensure client.close end header_value.should be_kind_of(AnalyticsLogger::Log) thread_value.should be_kind_of(AnalyticsLogger::Log) header_value.should == thread_value end it "logs uncaught exceptions for requests that have a transaction ID" do reraised = false @thread_handler.any_instance.should_receive(:process_request).and_return do |headers, connection, full_http_response| raise "something went wrong" end @thread_handler.any_instance.stub(:should_reraise_error?).and_return do |e| reraised = true e.message != "something went wrong" end @request_handler.start_main_loop_thread client = connect begin DebugLogging.log_level = -2 send_binary_request(client, "REQUEST_METHOD" => "GET", "PASSENGER_TXN_ID" => "1234-abcd") ensure client.close end eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) if File.exist?(@dump_file) log_data = File.read(@dump_file) else log_data = "" end log_data.include?("Request transaction ID: 1234-abcd\n") && log_data.include?("Message: " + base64("something went wrong")) && log_data.include?("Class: RuntimeError") && log_data.include?("Backtrace: ") end reraised.should be_true end end describe "HTTP parsing" do before :each do @request_handler.start_main_loop_thread @client = connect(:http) @client.sync = true end after :each do @client.close if @client end it "correctly parses HTTP requests without query string" do @thread_handler.any_instance.should_receive(:process_request).and_return do |headers, connection, full_http_response| headers["REQUEST_METHOD"].should == "POST" headers["SERVER_PROTOCOL"].should == "HTTP/1.1" headers["HTTP_HOST"].should == "foo.com" headers["HTTP_X_FOO_BAR"].should == "baz" headers["PATH_INFO"].should == "/foo/bar" headers["SCRIPT_NAME"].should == "" headers["QUERY_STRING"].should == "" headers["REQUEST_URI"].should == "/foo/bar" headers["HTTP_CONTENT_LENGTH"].should be_nil headers["HTTP_CONTENT_TYPE"].should be_nil headers["CONTENT_LENGTH"].should == "10" headers["CONTENT_TYPE"].should == "text/plain" end @client.write("POST /foo/bar HTTP/1.1\r\n") @client.write("Host: foo.com\r\n") @client.write("X-Foo-Bar: baz\r\n") @client.write("Content-Length: 10\r\n") @client.write("Content-Type: text/plain\r\n") @client.write("\r\n") @client.close_write @client.read end it "correctly parses HTTP requests with query string" do @thread_handler.any_instance.should_receive(:process_request).and_return do |headers, connection, full_http_response| headers["REQUEST_METHOD"].should == "POST" headers["SERVER_PROTOCOL"].should == "HTTP/1.1" headers["HTTP_HOST"].should == "foo.com" headers["HTTP_X_FOO_BAR"].should == "baz" headers["PATH_INFO"].should == "/foo/bar" headers["SCRIPT_NAME"].should == "" headers["QUERY_STRING"].should == "hello=world&a=b+c" headers["REQUEST_URI"].should == "/foo/bar?hello=world&a=b+c" headers["HTTP_CONTENT_LENGTH"].should be_nil headers["HTTP_CONTENT_TYPE"].should be_nil headers["CONTENT_LENGTH"].should == "10" headers["CONTENT_TYPE"].should == "text/plain" end @client.write("POST /foo/bar?hello=world&a=b+c HTTP/1.1\r\n") @client.write("Host: foo.com\r\n") @client.write("X-Foo-Bar: baz\r\n") @client.write("Content-Length: 10\r\n") @client.write("Content-Type: text/plain\r\n") @client.write("\r\n") @client.close_write @client.read end it "correct parses HTTP requests that come in arbitrary chunks" do @thread_handler.any_instance.should_receive(:process_request).and_return do |headers, connection, full_http_response| headers["REQUEST_METHOD"].should == "POST" headers["SERVER_PROTOCOL"].should == "HTTP/1.1" headers["HTTP_HOST"].should == "foo.com" headers["HTTP_X_FOO_BAR"].should == "baz" headers["PATH_INFO"].should == "/foo/bar" headers["SCRIPT_NAME"].should == "" headers["QUERY_STRING"].should == "hello=world&a=b+c" headers["REQUEST_URI"].should == "/foo/bar?hello=world&a=b+c" headers["HTTP_CONTENT_LENGTH"].should be_nil headers["HTTP_CONTENT_TYPE"].should be_nil headers["CONTENT_LENGTH"].should == "10" headers["CONTENT_TYPE"].should == "text/plain" headers["HTTP_PLUS_SOME"].should be_nil end @client.write("POST /fo") sleep 0.001 @client.write("o/bar?hello=world&a=b+c HT") sleep 0.001 @client.write("TP/1.1\r") sleep 0.001 @client.write("\nHost: foo.com") sleep 0.001 @client.write("\r\n") sleep 0.001 @client.write("X-Foo-Bar: baz\r\n") sleep 0.001 @client.write("Content-Len") sleep 0.001 @client.write("gth: 10\r\nContent-Type: text/pla") sleep 0.001 @client.write("in\r\n\r") sleep 0.001 @client.write("\nPlus-Some: garbage data that should be ignored.") @client.close_write @client.read end end ############################ end end # module PhusionPassenger passenger-4.0.37/test/ruby/shared/000755 000765 000024 00000000000 12233035540 017422 5ustar00honglistaff000000 000000 passenger-4.0.37/test/ruby/spec_helper.rb000644 000765 000024 00000005601 12233035540 020774 0ustar00honglistaff000000 000000 if GC.respond_to?(:copy_on_write_friendly?) && !GC.copy_on_write_friendly? GC.copy_on_write_friendly = true end RUBY_VERSION_INT = RUBY_VERSION.split('.')[0..2].join.to_i source_root = File.expand_path(File.dirname(__FILE__) + "/../..") Dir.chdir("#{source_root}/test") require 'rubygems' require 'json' begin CONFIG = JSON.load(File.read('config.json')) rescue Errno::ENOENT STDERR.puts "*** You do not have the file test/config.json. " << "Please copy test/config.json.example to " << "test/config.json, and edit it." exit 1 end def boolean_option(name, default_value = false) value = ENV[name] if value.nil? || value.empty? return default_value else return value == "yes" || value == "on" || value == "true" || value == "1" end end DEBUG = boolean_option('DEBUG') TEST_CLASSIC_RAILS = boolean_option('TEST_CLASSIC_RAILS', Gem::VERSION <= '1.9') ENV.delete('PASSENGER_DEBUG') $LOAD_PATH.unshift("#{source_root}/lib") $LOAD_PATH.unshift("#{source_root}/test") require 'thread' require 'timeout' require 'fileutils' require 'phusion_passenger' PhusionPassenger.locate_directories PhusionPassenger.require_passenger_lib 'debug_logging' PhusionPassenger.require_passenger_lib 'utils' PhusionPassenger.require_passenger_lib 'utils/tmpdir' require 'support/test_helper' include TestHelper # Seed the pseudo-random number generator here # so that it doesn't happen in the child processes. srand trap "QUIT" do STDERR.puts PhusionPassenger::Utils.global_backtrace_report end class DeadlineTimer def initialize(main_thread, deadline) @mutex = Mutex.new @cond = ConditionVariable.new @iteration = 0 @pipe = IO.pipe @thread = Thread.new do Thread.current.abort_on_exception = true expected_iteration = 1 ios = [@pipe[0]] while true @mutex.synchronize do while @iteration != expected_iteration @cond.wait(@mutex) end end if !select(ios, nil, nil, deadline) STDERR.puts "*** Test timed out (#{deadline} seconds)" STDERR.puts PhusionPassenger::Utils.global_backtrace_report main_thread.raise(Timeout::Error, "Test timed out") expected_iteration += 1 elsif @pipe[0].read(1).nil? break else expected_iteration += 1 end end end end def start @mutex.synchronize do @iteration += 1 @cond.signal end end def stop @pipe[1].write('x') end end DEADLINE_TIMER = DeadlineTimer.new(Thread.current, 30) RSpec.configure do |config| config.before(:each) do # Suppress warning messages. PhusionPassenger::DebugLogging.log_level = -1 PhusionPassenger::DebugLogging.log_file = nil PhusionPassenger::DebugLogging.stderr_evaluator = nil # Create the temp directory. PhusionPassenger::Utils.passenger_tmpdir DEADLINE_TIMER.start end config.after(:each) do tmpdir = PhusionPassenger::Utils.passenger_tmpdir(false) if File.exist?(tmpdir) remove_dir_tree(tmpdir) end DEADLINE_TIMER.stop end end passenger-4.0.37/test/ruby/standalone/000755 000765 000024 00000000000 12233035540 020304 5ustar00honglistaff000000 000000 passenger-4.0.37/test/ruby/utils/000755 000765 000024 00000000000 12233035540 017314 5ustar00honglistaff000000 000000 passenger-4.0.37/test/ruby/utils_spec.rb000644 000765 000024 00000004736 12233035540 020665 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'tmpdir' require 'fileutils' require 'stringio' require 'etc' PhusionPassenger.require_passenger_lib 'message_channel' PhusionPassenger.require_passenger_lib 'platform_info/ruby' PhusionPassenger.require_passenger_lib 'loader_shared_helpers' PhusionPassenger.require_passenger_lib 'utils' PhusionPassenger.require_passenger_lib 'utils/native_support_utils' module PhusionPassenger describe Utils do include Utils include Utils::NativeSupportUtils specify "#to_boolean works" do LoaderSharedHelpers.to_boolean(nil).should be_false LoaderSharedHelpers.to_boolean(false).should be_false LoaderSharedHelpers.to_boolean(true).should be_true LoaderSharedHelpers.to_boolean(1).should be_true LoaderSharedHelpers.to_boolean(0).should be_true LoaderSharedHelpers.to_boolean("").should be_true LoaderSharedHelpers.to_boolean("true").should be_true LoaderSharedHelpers.to_boolean("false").should be_false LoaderSharedHelpers.to_boolean("bla bla").should be_true end specify "#split_by_null_into_hash works" do split_by_null_into_hash("").should == {} split_by_null_into_hash("foo\0bar\0").should == { "foo" => "bar" } split_by_null_into_hash("foo\0\0bar\0baz\0").should == { "foo" => "", "bar" => "baz" } split_by_null_into_hash("foo\0bar\0baz\0\0").should == { "foo" => "bar", "baz" => "" } split_by_null_into_hash("\0\0").should == { "" => "" } end describe "#passenger_tmpdir" do before :each do @old_passenger_tmpdir = Utils.passenger_tmpdir Utils.passenger_tmpdir = nil end after :each do Utils.passenger_tmpdir = @old_passenger_tmpdir end it "returns a directory under /tmp if Utils.passenger_tmpdir is nil" do File.dirname(passenger_tmpdir(false)).should == "/tmp" end it "returns a directory under /tmp if Utils.passenger_tmpdir is an empty string" do Utils.passenger_tmpdir = '' File.dirname(passenger_tmpdir(false)).should == "/tmp" end it "returns Utils.passenger_tmpdir if it's set" do Utils.passenger_tmpdir = '/foo' passenger_tmpdir(false).should == '/foo' end it "creates the directory if it doesn't exist, if the 'create' argument is true" do Utils.passenger_tmpdir = 'utils_spec.tmp' passenger_tmpdir begin File.directory?('utils_spec.tmp').should be_true ensure FileUtils.chmod_R(0777, 'utils_spec.tmp') FileUtils.rm_rf('utils_spec.tmp') end end end ###################### end end # module PhusionPassenger passenger-4.0.37/test/ruby/utils/file_system_watcher_spec.rb000644 000765 000024 00000013701 12233035540 024715 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') PhusionPassenger.require_passenger_lib 'utils/file_system_watcher' module PhusionPassenger describe Utils::FileSystemWatcher do before :each do @tmpdir = "tmp.fs_watcher" @tmpdir2 = "tmp.fs_watcher2" @tmpdir3 = "tmp.fs_watcher3" @term_pipe = IO.pipe [@tmpdir, @tmpdir2, @tmpdir3].each do |dir| remove_dir_tree(dir) Dir.mkdir(dir) end end after :each do if @thread @term_pipe[1].write("x") @thread.join end @watcher.close if @watcher @term_pipe[0].close @term_pipe[1].close [@tmpdir, @tmpdir2, @tmpdir3].each do |dir| remove_dir_tree(dir) end end def create(*args) @watcher = Utils::FileSystemWatcher.new(*args) @watcher.poll_interval = 0.1 if @watcher.respond_to?(:poll_interval=) return @watcher end describe "#wait_for_change blocks until" do def test_block(filenames) create(filenames, @term_pipe[0]) result = nil thread = Thread.new do result = @watcher.wait_for_change end yield if block_given? eventually do !thread.alive? end return result ensure if thread @term_pipe[1].write("x") thread.join end @watcher.close end specify "a subdirectory has been created in one of the watched directories" do result = test_block([@tmpdir, @tmpdir2]) do Dir.mkdir("#{@tmpdir}/foo") end result.should be_true end specify "a subdirectory has been removed in one of the watched directories" do Dir.mkdir("#{@tmpdir2}/foo") result = test_block([@tmpdir, @tmpdir2]) do Dir.rmdir("#{@tmpdir2}/foo") end result.should be_true end specify "a subdirectory has been renamed in one of the watched directories" do Dir.mkdir("#{@tmpdir}/foo") result = test_block([@tmpdir, @tmpdir2]) do File.rename("#{@tmpdir}/foo", "#{@tmpdir3}/bar") end result.should be_true end specify "a file has been created in one of the watched directories" do result = test_block([@tmpdir, @tmpdir2]) do File.touch("#{@tmpdir}/foo") end result.should be_true end specify "a file has been removed in one of the watched directories" do File.touch("#{@tmpdir2}/foo") result = test_block([@tmpdir, @tmpdir2]) do File.unlink("#{@tmpdir2}/foo") end result.should be_true end specify "a file has been renamed in one of the watched directories" do File.touch("#{@tmpdir}/foo") result = test_block([@tmpdir, @tmpdir2]) do File.rename("#{@tmpdir}/foo", "#{@tmpdir3}/bar") end result.should be_true end specify "a watched file has been written to" do File.touch("#{@tmpdir}/foo") result = test_block(["#{@tmpdir}/foo"]) do File.write("#{@tmpdir}/foo", "bar") end end specify "a watched file has been truncated" do File.write("#{@tmpdir}/foo", "contents") result = test_block(["#{@tmpdir}/foo"]) do if RUBY_PLATFORM =~ /darwin/ # OS X kernel bug in kqueue... sigh... File.open("#{@tmpdir}/foo", "w") do |f| f.write("a") f.truncate(0) end else File.open("#{@tmpdir}/foo", "w").close end end end specify "a watched file has been removed" do File.touch("#{@tmpdir}/foo") result = test_block(["#{@tmpdir}/foo"]) do File.unlink("#{@tmpdir}/foo") end end specify "a watched file has been renamed" do File.touch("#{@tmpdir}/foo") result = test_block(["#{@tmpdir}/foo"]) do File.rename("#{@tmpdir}/foo", "#{@tmpdir}/bar") end end specify "the termination pipe became readable" do result = test_block([@tmpdir]) do @term_pipe[1].write("x") end result.should be_nil end specify "one of the watched files or directories could not be statted while constructing the object" do test_block([@tmpdir, "#{@tmpdir}/foo"]).should be_false when_not_running_as_root do Dir.mkdir("#{@tmpdir}/foo") File.touch("#{@tmpdir}/foo/file") Dir.mkdir("#{@tmpdir}/foo/dir") File.chmod(0000, "#{@tmpdir}/foo") test_block([@tmpdir, "#{@tmpdir}/foo/file"]).should be_false test_block([@tmpdir, "#{@tmpdir}/foo/dir"]).should be_false end end if Utils::FileSystemWatcher.opens_files? when_not_running_as_root do specify "one of the watched files or directories could not be opened while constructing the object" do File.touch("#{@tmpdir}/file") File.chmod(0000, "#{@tmpdir}/file") test_block([@tmpdir, "#{@tmpdir}/file"]).should be_false Dir.mkdir("#{@tmpdir}/dir") File.chmod(0000, "#{@tmpdir}/dir") test_block([@tmpdir, "#{@tmpdir}/dir"]).should be_false end end end # if end describe "#wait_for_change does not return if" do def test_block(filenames) create(filenames, @term_pipe[0]) @thread = Thread.new do @watcher.wait_for_change end yield should_never_happen(0.4) do !@thread.alive? end end specify "nothing happened in one of its watched files or directories" do test_block([@tmpdir, @tmpdir2]) do File.touch("#{@tmpdir3}/file") Dir.mkdir("#{@tmpdir3}/dir") end end specify "something happened in a subdirectory that isn't on the watch list" do # In other words it does not watch subdirectories recursively. Dir.mkdir("#{@tmpdir}/subdir") test_block([@tmpdir, @tmpdir2]) do File.touch("#{@tmpdir}/subdir/file") end end specify "a file in a watched directory is merely modified" do File.touch("#{@tmpdir}/hello", 10) test_block([@tmpdir, @tmpdir2]) do File.touch("#{@tmpdir}/hello", 4567) File.write("#{@tmpdir}/hello", "foobar") end end end specify "#wait_for_change notices events that have occurred after object construction but before #wait_for_change has been called" do create([@tmpdir, @tmpdir2], @term_pipe[0]) @thread = Thread.new do @watcher.wait_for_change end File.touch("#{@tmpdir}/foo", Time.now - 10) eventually do !@thread.alive? end end it "can be closed multiple times" do create([@tmpdir]) @watcher.close @watcher.close end end end # module PhusionPassenger passenger-4.0.37/test/ruby/utils/hosts_file_parser.rb000644 000765 000024 00000015665 12233035540 023371 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') PhusionPassenger.require_passenger_lib 'utils/hosts_file_parser' require 'stringio' module PhusionPassenger describe Utils::HostsFileParser do before :each do @io = StringIO.new end def create @io.rewind @parser = Utils::HostsFileParser.new(@io) end describe "parsing" do it "ignores comments" do @io.puts("# 127.0.0.1 foo.com") create @parser.ip_count.should == 0 @parser.host_count.should == 0 end it "ignores comments that come after leading spaces" do @io.puts(" # 127.0.0.1 foo.com") create @parser.ip_count.should == 0 @parser.host_count.should == 0 end it "ignores comments that come after leading tabs" do @io.puts("\t# 127.0.0.1 foo.com") create @parser.ip_count.should == 0 @parser.host_count.should == 0 end it "ignores empty lines" do @io.puts("127.0.0.1 foo.com") @io.puts @io.puts("127.0.0.1 bar.com") @io.puts("127.0.0.2 baz.com") create @parser.ip_count.should == 2 @parser.host_count.should == 3 end it "ignores leading and trailing spaces" do @io.puts(" 127.0.0.1 foo.com") @io.puts @io.puts(" 127.0.0.1 bar.com ") @io.puts("127.0.0.2 baz.com ") create @parser.ip_count.should == 2 @parser.host_count.should == 3 @parser.resolve("foo.com").should == "127.0.0.1" @parser.resolve("bar.com").should == "127.0.0.1" @parser.resolve("baz.com").should == "127.0.0.2" end it "ignores leading and trailing tabs" do @io.puts("\t\t127.0.0.1 foo.com") @io.puts @io.puts("\t127.0.0.1 bar.com\t") @io.puts("127.0.0.2 baz.com\t\t") create @parser.ip_count.should == 2 @parser.host_count.should == 3 @parser.resolve("foo.com").should == "127.0.0.1" @parser.resolve("bar.com").should == "127.0.0.1" @parser.resolve("baz.com").should == "127.0.0.2" end it "correctly handles spaces as seperators" do @io.puts("127.0.0.1 foo.com bar.com baz.com") create @parser.ip_count.should == 1 @parser.host_count.should == 3 @parser.resolve("foo.com").should == "127.0.0.1" @parser.resolve("bar.com").should == "127.0.0.1" @parser.resolve("baz.com").should == "127.0.0.1" end it "correctly handles tabs as seperators" do @io.puts("127.0.0.1\tfoo.com\t\tbar.com baz.com") create @parser.ip_count.should == 1 @parser.host_count.should == 3 @parser.resolve("foo.com").should == "127.0.0.1" @parser.resolve("bar.com").should == "127.0.0.1" @parser.resolve("baz.com").should == "127.0.0.1" end end describe "#resolve" do it "returns nil if the host name is not in the file" do @io.puts("127.0.0.1 foo.com") create @parser.resolve("bar.com").should be_nil end it "returns the IP address associated with the host name if it exists" do @io.puts("255.255.255.255 foo.com") create @parser.resolve("foo.com").should == "255.255.255.255" end it "is case-insensitive" do @io.puts("255.255.255.255 fOO.com") create @parser.resolve("foo.COM").should == "255.255.255.255" end it "correctly handles lines that contain multiple host names" do @io.puts("255.255.255.255 foo.com bar.com") create @parser.resolve("foo.com").should == "255.255.255.255" @parser.resolve("bar.com").should == "255.255.255.255" @parser.resolve("baz.com").should be_nil end it "always returns 127.0.0.1 for localhost" do create @parser.resolve("localhost").should == "127.0.0.1" @parser.resolve("localHOST").should == "127.0.0.1" end end describe "#resolves_to_localhost?" do before :each do @io.puts "127.0.0.1 kotori" @io.puts "192.168.0.1 kanako" @io.puts "::1 ageha" @io.puts "::2 sawako" @io.puts "0.0.0.0 mizusawa" create end it "returns true if the host name resolves to 127.0.0.1" do @parser.resolves_to_localhost?("kotori").should be_true end it "returns true if the host name resolves to ::1" do @parser.resolves_to_localhost?("ageha").should be_true end it "returns true if the host name resolves to 0.0.0.0" do @parser.resolves_to_localhost?("mizusawa").should be_true end it "returns false if the host name resolves to something else" do @parser.resolves_to_localhost?("sawako").should be_false @parser.resolves_to_localhost?("kanako").should be_false end it "returns false if the host name does not resolve" do @parser.resolves_to_localhost?("foo.com").should be_false end end describe "#add_group_data" do before :each do @standard_entries = "127.0.0.1 kotori hazuki\n" + " 192.168.0.1 kanako\n\n" + "\t::1 ageha sawako\n" + "0.0.0.0 mizusawa naru\n" @target = StringIO.new end it "adds the group data if it doesn't exist" do @io.puts @standard_entries create @parser.add_group_data("some marker", "# a comment\n" + "127.0.0.1 foo\n") @parser.write(@target) @target.string.should == @standard_entries + "###### BEGIN some marker ######\n" + "# a comment\n" + "127.0.0.1 foo\n" + "###### END some marker ######\n" end it "replaces the existing group data if it does exist" do @io.puts "###### BEGIN some marker ######\n" + "# another comment\n" + "127.0.0.1 bar\n" + "###### END some marker ######\n" + "\n" + @standard_entries + "###### BEGIN some other marker ######\n" + "# another comment\n" + "127.0.0.1 bar\n" + "###### END some other marker ######\n" create @parser.add_group_data("some marker", "127.0.0.1 foo\n") @parser.write(@target) @target.string.should == "###### BEGIN some marker ######\n" + "127.0.0.1 foo\n" + "###### END some marker ######\n" + "\n" + @standard_entries + "###### BEGIN some other marker ######\n" + "# another comment\n" + "127.0.0.1 bar\n" + "###### END some other marker ######\n" end it "correctly handles the lack of a terminating newline in the group data" do @io.puts @standard_entries create @parser.add_group_data("some marker", "# a comment\n" + "127.0.0.1 foo") @parser.write(@target) @target.string.should == @standard_entries + "###### BEGIN some marker ######\n" + "# a comment\n" + "127.0.0.1 foo\n" + "###### END some marker ######\n" end it "ensures that the group data starts at a new line" do @io.write "127.0.0.1 foo.com" create @parser.add_group_data("some marker", "127.0.0.1 bar.com") @parser.write(@target) @target.string.should == "127.0.0.1 foo.com\n" + "###### BEGIN some marker ######\n" + "127.0.0.1 bar.com\n" + "###### END some marker ######\n" end end describe "#write" do it "preserves all comments and leading and trailing whitespaces" do @io.puts "127.0.0.1 foo.com " @io.puts "# a comment" @io.puts "\t127.0.0.1 bar.com\t" create original_data = @io.string target = StringIO.new @parser.write(target) target.string.should == original_data end end end end # module PhusionPassenger passenger-4.0.37/test/ruby/utils/unseekable_socket_spec.rb000644 000765 000024 00000003344 12233035540 024345 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') PhusionPassenger.require_passenger_lib 'utils/unseekable_socket' module PhusionPassenger describe Utils::UnseekableSocket do class MyException < StandardError end class MySocket def write(data) end def gets end def sync=(value) end end before :each do @socket = MySocket.new @wrapper = Utils::UnseekableSocket.wrap(@socket) end def catch_exception yield return nil rescue MyException => e return e end it "delegates method calls to the wrapped socket" do @socket.should_receive(:write).with("some data") @socket.should_receive(:gets) @wrapper.write("some data") @wrapper.gets end it "annotates exceptions so that we can identify its source" do @wrapper.source_of_exception?(MyException.new("foo")).should be_false @socket.should_receive(:write).at_least(:once).and_raise(MyException.new("an error")) @wrapper2 = Utils::UnseekableSocket.wrap(@socket) e1 = catch_exception { @wrapper.write("hello") } @wrapper.source_of_exception?(e1).should be_true @wrapper2.source_of_exception?(e1).should be_true @socket2 = MySocket.new @socket2.should_receive(:write).at_least(:once).and_raise(MyException.new("an error")) @wrapper.wrap(@socket2) @wrapper2.wrap(@socket2) e2 = catch_exception { @wrapper.write("hello") } @wrapper.source_of_exception?(e1).should be_false @wrapper2.source_of_exception?(e1).should be_false @wrapper.source_of_exception?(e2).should be_true @wrapper2.source_of_exception?(e2).should be_true Utils::UnseekableSocket.new.source_of_exception?(e1).should be_false Utils::UnseekableSocket.new.source_of_exception?(e2).should be_false end end end # module PhusionPassenger passenger-4.0.37/test/ruby/standalone/runtime_installer_spec.rb000644 000765 000024 00000030711 12233035540 025405 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') PhusionPassenger.require_passenger_lib 'standalone/runtime_installer' require 'tmpdir' require 'fileutils' require 'stringio' module PhusionPassenger module Standalone describe RuntimeInstaller do before :each do @temp_dir = Dir.mktmpdir Dir.mkdir("#{@temp_dir}/support") Dir.mkdir("#{@temp_dir}/nginx") @logs = StringIO.new PhusionPassenger.stub(:installed_from_release_package?).and_return(true) end after :each do FileUtils.remove_entry_secure(@temp_dir) end let(:binaries_url_root) { "http://somewhere" } let(:version) { PhusionPassenger::VERSION_STRING } let(:nginx_version) { PhusionPassenger::PREFERRED_NGINX_VERSION } let(:cxx_compat_id) { PlatformInfo.cxx_binary_compatibility_id } let(:support_binaries_url) { "#{binaries_url_root}/#{version}/support-#{cxx_compat_id}.tar.gz" } let(:nginx_binary_url) { "#{binaries_url_root}/#{version}/webhelper-#{nginx_version}-#{cxx_compat_id}.tar.gz" } let(:nginx_source_url) { "http://nginx.org/download/nginx-#{nginx_version}.tar.gz" } def create_installer(options = {}) options = { :binaries_url_root => binaries_url_root, :stdout => @logs, :stderr => @logs }.merge(options) @installer = RuntimeInstaller.new(options) end def create_tarball(filename, contents = nil) Dir.mktmpdir("tarball-", @temp_dir) do |tarball_dir| Dir.chdir(tarball_dir) do if block_given? yield else contents.each do |content_name| File.open(content_name, "w").close end end sh "tar", "-czf", filename, "." end end end def create_dummy_support_binaries Dir.mkdir("agents") ["PassengerWatchdog", "PassengerHelperAgent", "PassengerLoggingAgent"].each do |exe| File.open("agents/#{exe}", "w") do |f| f.puts "#!/bin/bash" f.puts "echo PASS" end File.chmod(0755, "agents/#{exe}") end end def create_dummy_nginx_binary File.open("PassengerWebHelper", "w") do |f| f.puts "#!/bin/bash" f.puts "echo nginx version: 1.0.0" end File.chmod(0755, "PassengerWebHelper") end def create_dummy_nginx_source Dir.mkdir("nginx-#{nginx_version}") File.open("nginx-#{nginx_version}/configure", "w") do |f| f.puts %Q{echo "$@" > '#{@temp_dir}/configure.txt'} end File.chmod(0700, "nginx-#{nginx_version}/configure") File.open("nginx-#{nginx_version}/Makefile", "w") do |f| f.puts("all:") f.puts(" mkdir objs") f.puts(" echo ok > objs/nginx") end end def create_file(filename) File.open(filename, "w").close end def sh(*command) if !system(*command) raise "Command failed: #{command.join(' ')}" end end def test_download_nginx_binary create_installer(:targets => [:nginx], :nginx_dir => "#{@temp_dir}/nginx", :lib_dir => PhusionPassenger.lib_dir) @installer.should_receive(:download). and_return do |url, output, options| url.should == nginx_binary_url options[:use_cache].should be_true create_tarball(output) do create_dummy_nginx_binary end true end @installer.should_receive(:check_for_download_tool) @installer.should_not_receive(:check_depdendencies) @installer.should_not_receive(:compile_support_binaries) @installer.should_not_receive(:download_and_extract_nginx_sources) @installer.should_not_receive(:compile_nginx) @installer.run File.exist?("#{@temp_dir}/nginx/PassengerWebHelper").should be_true end def test_building_nginx_binary create_installer(:targets => [:nginx], :nginx_dir => "#{@temp_dir}/nginx", :lib_dir => PhusionPassenger.lib_dir) @installer.should_receive(:download).twice.and_return do |url, output| if url == nginx_binary_url false elsif url == nginx_source_url create_tarball(output) do create_dummy_nginx_source end true else raise "Unexpected download URL: #{url}" end end @installer.should_receive(:check_for_download_tool) @installer.should_receive(:check_dependencies).and_return(true) @installer.should_not_receive(:compile_support_binaries) @installer.should_receive(:strip_binary). with(an_instance_of(String)). and_return(true) @installer.run File.read("#{@temp_dir}/nginx/PassengerWebHelper").should == "ok\n" File.read("#{@temp_dir}/configure.txt").should include( "--add-module=#{PhusionPassenger.nginx_module_source_dir}") end context "when originally packaged" do before :each do PhusionPassenger.stub(:originally_packaged?).and_return(true) PhusionPassenger.stub(:natively_packaged?).and_return(false) end it "downloads the support binaries from the Internet if :support_binaries is specified as target" do create_installer(:targets => [:support_binaries], :support_dir => "#{@temp_dir}/support") @installer.should_receive(:download). and_return do |url, output, options| url.should == "#{binaries_url_root}/#{version}/support-#{cxx_compat_id}.tar.gz" options[:use_cache].should be_true create_tarball(output) do create_dummy_support_binaries end true end @installer.should_receive(:check_for_download_tool) @installer.should_not_receive(:check_depdendencies) @installer.should_not_receive(:compile_support_binaries) @installer.should_not_receive(:download_and_extract_nginx_sources) @installer.should_not_receive(:compile_nginx) @installer.run File.exist?("#{@temp_dir}/support/agents/PassengerWatchdog").should be_true end it "downloads the Nginx binary from the Internet if :nginx is specified as target" do test_download_nginx_binary end it "downloads everything if :support_binaries and :nginx are both specified as target" do create_installer(:targets => [:support_binaries, :nginx], :support_dir => "#{@temp_dir}/support", :nginx_dir => "#{@temp_dir}/nginx", :lib_dir => PhusionPassenger.lib_dir) @installer.should_receive(:download). twice. and_return do |url, output, options| if url == support_binaries_url create_tarball(output) do create_dummy_support_binaries end elsif url == nginx_binary_url create_tarball(output) do create_dummy_nginx_binary end else raise "Unexpected download URL: #{url}" end options[:use_cache].should be_true true end @installer.should_receive(:check_for_download_tool) @installer.should_not_receive(:check_depdendencies) @installer.should_not_receive(:compile_support_binaries) @installer.should_not_receive(:download_and_extract_nginx_sources) @installer.should_not_receive(:compile_nginx) @installer.run File.exist?("#{@temp_dir}/support/agents/PassengerWatchdog").should be_true File.exist?("#{@temp_dir}/nginx/PassengerWebHelper").should be_true end it "builds the support binaries if it cannot be downloaded" do create_installer(:targets => [:support_binaries], :support_dir => "#{@temp_dir}/support") nginx_libs = COMMON_LIBRARY. only(*NGINX_LIBS_SELECTOR). set_output_dir("#{@temp_dir}/support/libpassenger_common"). link_objects built_files = nil @installer.should_receive(:run_rake_task!).with( "nginx_without_native_support CACHING=false OUTPUT_DIR='#{@temp_dir}/support'"). and_return do FileUtils.mkdir_p("#{@temp_dir}/agents") create_file("#{@temp_dir}/agents/PassengerWatchdog") nginx_libs.each do |object_filename| dir = File.dirname(object_filename) FileUtils.mkdir_p(dir) create_file(object_filename) end built_files = `find '#{@temp_dir}/support'` end @installer.should_receive(:check_for_download_tool) @installer.should_receive(:download).and_return(false) @installer.should_receive(:check_dependencies).and_return(true) @installer.should_not_receive(:download_and_extract_nginx_sources) @installer.should_not_receive(:compile_nginx) @installer.run `find '#{@temp_dir}/support'`.should == built_files end it "builds the Nginx binary if it cannot be downloaded" do test_building_nginx_binary end it "aborts if the support binaries cannot be built" do create_installer(:targets => [:support_binaries], :support_dir => "#{@temp_dir}/support") @installer.should_receive(:run_rake_task!).with( "nginx_without_native_support CACHING=false OUTPUT_DIR='#{@temp_dir}/support'"). and_raise(RuntimeError, "Rake failed") @installer.should_receive(:check_for_download_tool) @installer.should_receive(:download).and_return(false) @installer.should_receive(:check_dependencies).and_return(true) @installer.should_not_receive(:download_and_extract_nginx_sources) @installer.should_not_receive(:compile_nginx) lambda { @installer.run }.should raise_error(SystemExit) @logs.string.should include("Rake failed") end end context "when natively packaged" do before :each do PhusionPassenger.stub(:source_root).and_return("/locations.ini") PhusionPassenger.stub(:originally_packaged?).and_return(false) PhusionPassenger.stub(:natively_packaged?).and_return(true) end it "refuses to accept :support_binaries as target" do block = lambda do create_installer(:targets => [:support_binaries], :support_dir => "#{@temp_dir}/support") end block.should raise_error(ArgumentError, /You cannot specify :support_binaries/) end it "downloads the Nginx binary from the Internet if :nginx is specified as target" do test_download_nginx_binary end it "builds the Nginx binary if it cannot be downloaded" do test_building_nginx_binary end end it "commits downloaded binaries after checking whether they're usable" do create_installer(:targets => [:support_binaries, :nginx], :support_dir => "#{@temp_dir}/support", :nginx_dir => "#{@temp_dir}/nginx", :lib_dir => PhusionPassenger.lib_dir) @installer.should_receive(:download). exactly(3).times. and_return do |url, output, options| if url == support_binaries_url options[:use_cache].should be_true create_tarball(output) do create_dummy_support_binaries end elsif url == nginx_binary_url options[:use_cache].should be_true create_tarball(output) do create_dummy_nginx_binary end elsif url == nginx_source_url create_tarball(output) do create_dummy_nginx_source end else raise "Unexpected download URL: #{url}" end true end @installer.should_receive(:check_for_download_tool) @installer.should_receive(:check_support_binaries).and_return(false) @installer.should_receive(:check_nginx_binary).and_return(false) @installer.should_receive(:check_dependencies).and_return(true) @installer.should_receive(:compile_support_binaries) @installer.should_receive(:compile_nginx) @installer.run Dir["#{@temp_dir}/nginx/*"].should be_empty Dir["#{@temp_dir}/support/*"].should be_empty end it "aborts if the Nginx source tarball cannot be extracted" do create_installer(:targets => [:nginx], :nginx_dir => "#{@temp_dir}/nginx", :lib_dir => PhusionPassenger.lib_dir) @installer.should_receive(:download).twice.and_return do |url, output, options| if url == nginx_binary_url false elsif url == nginx_source_url File.open(output, "w") do |f| f.write("garbage") end true else raise "Unexpected download URL: #{url}" end end @installer.should_receive(:check_for_download_tool) @installer.should_receive(:check_dependencies).and_return(true) @installer.should_not_receive(:compile_support_binaries) lambda { @installer.run }.should raise_error(SystemExit) @logs.string.should =~ %r{Unable to download or extract Nginx source tarball} end it "aborts if the Nginx binary cannot be built" do create_installer(:targets => [:nginx], :nginx_dir => "#{@temp_dir}/nginx", :lib_dir => PhusionPassenger.lib_dir) @installer.should_receive(:download).twice.and_return do |url, output, options| if url == nginx_binary_url false elsif url == nginx_source_url create_tarball(output) do Dir.mkdir("nginx-#{nginx_version}") File.open("nginx-#{nginx_version}/configure", "w") do |f| f.puts("#!/bin/bash") f.puts("echo error") f.puts("exit 1") end File.chmod(0700, "nginx-#{nginx_version}/configure") end true else raise "Unexpected download URL: #{url}" end end @installer.should_receive(:check_for_download_tool) @installer.should_receive(:check_dependencies).and_return(true) @installer.should_not_receive(:compile_support_binaries) lambda { @installer.run }.should raise_error(SystemExit) @logs.string.should =~ %r{command failed:.*./configure} end end end # module Standalone end # module PhusionPassenger passenger-4.0.37/test/ruby/standalone/runtime_locator_spec.rb000644 000765 000024 00000014322 12233035540 025053 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') PhusionPassenger.require_passenger_lib 'standalone/runtime_locator' require 'tmpdir' require 'fileutils' require 'json' module PhusionPassenger module Standalone describe RuntimeLocator do before :each do @temp_dir = Dir.mktmpdir @locator = RuntimeLocator.new(@temp_dir) end after :each do FileUtils.remove_entry_secure(@temp_dir) end def create_file(filename, contents = nil) File.open(filename, "w") do |f| f.write(contents) if contents end end def create_nginx(nginx_version) version = PhusionPassenger::VERSION_STRING cxx_compat_id = PlatformInfo.cxx_binary_compatibility_id nginx_dir = "#{@temp_dir}/#{version}/webhelper-#{nginx_version}-#{cxx_compat_id}" FileUtils.mkdir_p(nginx_dir) @nginx_filename = "#{nginx_dir}/PassengerWebHelper" create_file(@nginx_filename) File.chmod(0755, @nginx_filename) end context "when originally packaged" do before :each do PhusionPassenger.stub(:originally_packaged?).and_return(true) PhusionPassenger.stub(:natively_packaged?).and_return(false) end context "if PASSENGER_DEBUG is set" do before :each do ENV['PASSENGER_DEBUG'] = '1' end after :each do ENV.delete('PASSENGER_DEBUG') end it "returns SOURCE_ROOT/buildout as the support directory" do @locator.find_support_dir.should == "#{PhusionPassenger.source_root}/buildout" end end context "if no PASSENGER_DEBUG is set" do context "if there is a support directory in the home directory" do before :each do version = PhusionPassenger::VERSION_STRING cxx_compat_id = PlatformInfo.cxx_binary_compatibility_id @support_dir = "#{@temp_dir}/#{version}/support-#{cxx_compat_id}" FileUtils.mkdir_p("#{@support_dir}/agents") FileUtils.mkdir_p("#{@support_dir}/common/libpassenger_common/ApplicationPool2") create_file("#{@support_dir}/agents/PassengerWatchdog") create_file("#{@support_dir}/common/libboost_oxt.a") create_file("#{@support_dir}/common/libpassenger_common/ApplicationPool2/Implementation.o") end it "returns that directory" do @locator.find_support_dir.should == @support_dir end end context "if there is no support directory in the home directory" do it "returns nil" do @locator.find_support_dir.should be_nil end end end context "if a custom Nginx binary is specified in the Standalone config" do before :each do create_file("#{@temp_dir}/config.json", JSON.dump("nginx_binary" => "/somewhere/nginx")) end it "returns that binary" do @locator.find_nginx_binary.should == "/somewhere/nginx" end end context "if no custom Nginx binary is specified in the Standalone config" do context "if there is an Nginx binary with the requested version in the home directory" do before :each do create_nginx(PhusionPassenger::PREFERRED_NGINX_VERSION) end it "returns that binary" do @locator.find_nginx_binary.should == @nginx_filename end end it "returns nil if there is no Nginx binary with the requested version in the home directory" do @locator.find_nginx_binary.should be_nil end it "returns nil if there is only an Nginx binary with a different version in the home directory" do create_nginx("0.0.1") @locator.find_nginx_binary.should be_nil end end describe "#support_dir_install_destination" do it "returns a directory under the home dir" do @locator.support_dir_install_destination.start_with?("#{@temp_dir}/").should be_true end end describe "#nginx_binary_install_destionation" do it "returns a directory under the home dir" do @locator.nginx_binary_install_destination.start_with?("#{@temp_dir}/").should be_true end end end context "when natively packaged" do before :each do PhusionPassenger.stub(:source_root).and_return("/locations.ini") PhusionPassenger.stub(:originally_packaged?).and_return(false) PhusionPassenger.stub(:natively_packaged?).and_return(true) end shared_examples_for "when no PASSENGER_DEBUG is set" do it "returns the packaged lib dir" do @locator.find_support_dir.should == PhusionPassenger.lib_dir end end context "if PASSENGER_DEBUG is set" do before :each do ENV['PASSENGER_DEBUG'] = '1' end after :each do ENV.delete('PASSENGER_DEBUG') end it_behaves_like "when no PASSENGER_DEBUG is set" end context "if no PASSENGER_DEBUG is set" do it_behaves_like "when no PASSENGER_DEBUG is set" end context "if a custom Nginx binary is specified in the Standalone config" do before :each do create_file("#{@temp_dir}/config.json", JSON.dump("nginx_binary" => "/somewhere/nginx")) end it "returns that binary" do @locator.find_nginx_binary.should == "/somewhere/nginx" end end context "if no custom Nginx binary is specified in the Standalone config" do context "if the default Nginx version is requested" do it "returns the location of the packaged Nginx binary" do @locator.find_nginx_binary.should == "#{PhusionPassenger.lib_dir}/PassengerWebHelper" end end context "if a non-default Nginx version is requested" do before :each do @locator = RuntimeLocator.new(@temp_dir, "0.0.1") end context "if there is an Nginx binary with the requested version in the home directory" do before :each do create_nginx("0.0.1") end it "returns that binary" do @locator.find_nginx_binary.should == @nginx_filename end end it "returns nil if there is no Nginx binary with the requested version in the home directory" do @locator.find_nginx_binary.should be_nil end it "returns nil if there is only an Nginx binary with a different version in the home directory" do create_nginx("0.0.2") @locator.find_nginx_binary.should be_nil end end end describe "#support_dir_install_destination" do it "returns nil" do @locator.support_dir_install_destination.should be_nil end end describe "#nginx_binary_install_destionation" do it "returns a directory under the home dir" do @locator.nginx_binary_install_destination.start_with?("#{@temp_dir}/").should be_true end end end end end # module Standalone end # module PhusionPassenger passenger-4.0.37/test/ruby/shared/loader_sharedspec.rb000644 000765 000024 00000012502 12233035540 023416 0ustar00honglistaff000000 000000 require 'socket' PhusionPassenger.require_passenger_lib 'utils' PhusionPassenger.require_passenger_lib 'message_channel' module PhusionPassenger class Loader attr_reader :pid, :input, :output, :sockets def initialize(command, app_root) @app_root = app_root a, input = UNIXSocket.pair c, output = UNIXSocket.pair @pid = pid = fork do STDIN.reopen(a) STDOUT.reopen(c) input.close output.close Dir.chdir(app_root) ENV['RAILS_ENV'] = ENV['RACK_ENV'] = ENV['PASSENGER_ENV'] = 'production' exec(*command) end a.close c.close @input = input @output = output @sockets = {} end def self.new_with_sockets(input, output, app_root) result = allocate result.instance_variable_set(:@input, input) result.instance_variable_set(:@output, output) result.instance_variable_set(:@app_root, app_root) result.instance_variable_set(:@sockets, {}) return result end def close @input.close_write # Wait at most 100 msec for process to exit. select([@output], nil, nil, 0.1) @input.close if !@input.closed? @output.close if !@output.closed? if @pid begin Process.kill('TERM', @pid) rescue Errno::ESRCH end begin Process.waitpid(@pid) rescue Errno::ECHILD end end end def start(options = {}) init_message = read_response_line if init_message != "I have control 1.0\n" raise "Unknown response initialization message: #{init_message.inspect}" end write_request_line "You have control 1.0" write_start_request(options) return process_response end def connect_and_send_request(headers) socket = Utils.connect_to_server(sockets["main"][:address]) channel = MessageChannel.new(socket) data = "" headers["REQUEST_METHOD"] ||= "GET" headers["REQUEST_URI"] ||= headers["PATH_INFO"] headers["QUERY_STRING"] ||= "" headers["SCRIPT_NAME"] ||= "" headers.each_pair do |key, value| data << "#{key}\0#{value}\0" end channel.write_scalar(data) return socket end private def write_request_line(line = "") STDERR.puts "---> #{line}" if DEBUG @input.puts line end def read_response_line while true line = @output.readline STDERR.puts "<--- #{line.strip}" if DEBUG if line.start_with?("!> ") line.sub!(/^\!> /, '') return line end end end def write_start_request(options) write_request_line "passenger_root: #{PhusionPassenger.source_root}" write_request_line "ruby_libdir: #{PhusionPassenger.ruby_libdir}" write_request_line "generation_dir: #{Utils.passenger_tmpdir}" write_request_line "log_level: 3" if DEBUG options.each_pair do |key, value| write_request_line "#{key}: #{value}" end write_request_line end def process_response status = read_response_line headers = {} line = read_response_line while line != "\n" key, value = line.strip.split(/ *: */, 2) if key == "socket" process_socket(value) else headers[key] = value end line = read_response_line end if status == "Error\n" body = @output.read STDERR.puts "<--- #{body}" if DEBUG end return { :status => status.strip, :headers => headers, :body => body } end def process_socket(spec) name, address, protocol, concurrency = spec.split(';') @sockets[name] = { :address => address, :protocol => protocol, :concurrency => concurrency } end end class Preloader < Loader def spawn(options = {}) socket = Utils.connect_to_server(sockets["spawn"]) loader = Loader.new_with_sockets(socket, socket.dup, @app_root) begin loader.send(:write_request_line, "spawn") loader.send(:write_start_request, options) line = loader.output.readline puts "<--- #{line.strip}" if DEBUG if line != "OK\n" raise "Unexpected spawn response status #{line.inspect}" end line = loader.output.readline puts "<--- #{line.strip}" if DEBUG loader.instance_variable_set(:@pid, line.to_i) return loader rescue loader.close raise end end private def process_socket(spec) sockets["spawn"] = spec end end module LoaderSpecHelper def self.included(klass) klass.before(:each) do @stubs = [] end klass.after(:each) do begin @loader.close if @loader @preloader.close if @preloader ensure @stubs.each do |stub| stub.destroy end end end end def before_start(code) @before_start = code end def after_start(code) @after_start = code end def register_stub(stub) @stubs << stub File.prepend(stub.startup_file, "#{@before_start}\n") File.append(stub.startup_file, "\n#{@after_start}") return stub end def register_app(app) @apps << app return app end def start!(options = {}) result = start(options) if result[:status] != "Ready" raise "Loader failed to start; error page:\n#{result[:body]}" end end def perform_request(headers) socket = @loader.connect_and_send_request(headers) headers = {} line = socket.readline while line != "\r\n" key, value = line.strip.split(/ *: */, 2) headers[key] = value line = socket.readline end body = socket.read socket.close return [headers, body] end end shared_examples_for "a loader" do it "works" do result = start result[:status].should == "Ready" headers, body = perform_request( "REQUEST_METHOD" => "GET", "PATH_INFO" => "/", # For Rails 2 "REQUEST_URI" => "/" ) headers["Status"].should == "200" body.should == "front page" end end end # module PhusionPassenger passenger-4.0.37/test/ruby/shared/rails/000755 000765 000024 00000000000 12233035540 020534 5ustar00honglistaff000000 000000 passenger-4.0.37/test/ruby/shared/ruby_loader_sharedspec.rb000644 000765 000024 00000002731 12233035540 024462 0ustar00honglistaff000000 000000 module PhusionPassenger shared_examples_for "a Ruby loader" do it "prints an error page if the startup file fails to load" do File.write(@stub.startup_file, %q{ raise "oh no!" }) result = start result[:status].should == "Error" result[:body].should include("oh no!") end it "calls the starting_worker_process event after the startup file has been loaded" do File.prepend(@stub.startup_file, %q{ history_file = "history.txt" PhusionPassenger.on_event(:starting_worker_process) do |forked| ::File.open(history_file, 'a') do |f| f.puts "worker_process_started\n" end end ::File.open(history_file, 'a') do |f| f.puts "end of startup file\n" end }) result = start result[:status].should == "Ready" File.read("#{@stub.app_root}/history.txt").should == "end of startup file\n" + "worker_process_started\n" end it "calls the stopping_worker_process event on exit" do File.prepend(@stub.startup_file, %q{ history_file = "history.txt" PhusionPassenger.on_event(:stopping_worker_process) do ::File.open(history_file, 'a') do |f| f.puts "worker_process_stopped\n" end end ::File.open(history_file, 'a') do |f| f.puts "end of startup file\n" end }) result = start result[:status].should == "Ready" @loader.input.close_write eventually(3) do File.read("#{@stub.app_root}/history.txt") == "end of startup file\n" + "worker_process_stopped\n" end end end end # module PhusionPassenger passenger-4.0.37/test/ruby/shared/rails/analytics_logging_extensions_sharedspec.rb000644 000765 000024 00000024334 12233035540 031244 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') require 'socket' require 'fileutils' PhusionPassenger.require_passenger_lib 'analytics_logger' PhusionPassenger.require_passenger_lib 'utils/tmpdir' module PhusionPassenger shared_examples_for "analytics logging extensions for Rails" do before :each do @logging_agent_password = "1234" @dump_file = "#{Utils.passenger_tmpdir}/log.txt" @agent_pid, @socket_filename, @socket_address = spawn_logging_agent(@dump_file, @logging_agent_password) @options = { "analytics" => true, "logging_agent_address" => @socket_address, "logging_agent_username" => "logging", "logging_agent_password" => "1234", "node_name" => "localhost", "app_group_name" => "foobar" } end after :each do @connection.close if @connection && @connection.closed? Process.kill('KILL', @agent_pid) Process.waitpid(@agent_pid) end def send_request_to_app(headers) headers = { "PASSENGER_TXN_ID" => "1234-abcd" }.merge(headers) return perform_request(headers) end def read_log return File.read(@dump_file) end def base64(data) return [data].pack('m').gsub("\n", "") end it "doesn't install analytics logging extensions if analytics logging is turned off" do @options.delete("analytics") File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base def index File.open("out.txt", "w") do |f| f.write(request.env["PASSENGER_ANALYTICS_WEB_LOG"].class.to_s) end render :nothing => true end end }) start!(@options) send_request_to_app("PATH_INFO" => "/foo") eventually(5) do filename = "#{@stub.app_root}/out.txt" File.exist?(filename) && File.read(filename) == "NilClass" end end it "logs the controller and action name" do File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base def index render :nothing => true end end }) start!(@options) send_request_to_app("PATH_INFO" => "/foo") eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log.include?("Controller action: FooController#index\n") end end it "logs uncaught exceptions in controller actions" do File.write("#{@stub.app_root}/app/controllers/crash_controller.rb", %Q{ class CrashController < ActionController::Base def index raise "something went wrong" end end }) start!(@options) send_request_to_app("PATH_INFO" => "/crash") eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log.include?("Request transaction ID: 1234-abcd\n") && log.include?("Message: " + base64("something went wrong")) && log.include?("Class: RuntimeError") && log.include?("Backtrace: ") && log.include?("Controller action: CrashController#index") end end it "logs ActionController benchmarks" do File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base def index if respond_to?(:benchmark, true) benchmark("hello") do end else ActionController::Base.benchmark("hello") do end end render :nothing => true end end }) start!(@options) send_request_to_app("PATH_INFO" => "/foo") eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log.include?('BEGIN: BENCHMARK: hello') && log.include?('END: BENCHMARK: hello') end end it "logs ActionView benchmarks" do File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base end }) FileUtils.mkdir_p("#{@stub.app_root}/app/views/foo") File.write("#{@stub.app_root}/app/views/foo/index.html.erb", %Q{ <% benchmark("hello") do %> <% end %> }) start!(@options) send_request_to_app("PATH_INFO" => "/foo") eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log.include?('BEGIN: BENCHMARK: hello') && log.include?('END: BENCHMARK: hello') end end it "logs successful SQL queries" do File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base def index db = ActiveRecord::Base.connection db.execute("CREATE TABLE foobar (id INT)") db.execute("INSERT INTO foobar VALUES (1)") render :nothing => true end end }) start!(@options.merge("active_record" => true)) send_request_to_app("PATH_INFO" => "/foo") extra_info_regex = Regexp.escape(base64("SQL\nCREATE TABLE foobar (id INT)")) eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log =~ /BEGIN: DB BENCHMARK: .* \(.*\) #{extra_info_regex}$/ && log =~ /END: DB BENCHMARK: .* \(.*\)$/ end end it "applies event preprocessor to log events" do File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base def index db = ActiveRecord::Base.connection db.execute("CREATE TABLE foobar (id INT)--secret") db.execute("INSERT INTO foobar VALUES (1)") render :nothing => true end end }) start!(@options.merge("active_record" => true)) send_request_to_app("PATH_INFO" => "/foo") extra_info_regex = Regexp.escape(base64("SQL\nCREATE TABLE foobar (id INT)--PASSWORD")) eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log =~ /BEGIN: DB BENCHMARK: .* \(.*\) #{extra_info_regex}$/ && log =~ /END: DB BENCHMARK: .* \(.*\)$/ end end it "logs failed SQL queries" do File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base def index db = ActiveRecord::Base.connection db.execute("INVALID QUERY") render :nothing => true end end }) start!(@options.merge("active_record" => true)) send_request_to_app("PATH_INFO" => "/foo") extra_info_regex = Regexp.escape(base64("SQL\nINVALID QUERY")) if rails_version >= '3.0' pending do eventually(5) do log = read_log log =~ /BEGIN: DB BENCHMARK: .* \(.*\) #{extra_info_regex}$/ && log =~ /FAIL: DB BENCHMARK: .* \(.*\)$/ end end else eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log =~ /BEGIN: DB BENCHMARK: .* \(.*\) #{extra_info_regex}$/ && log =~ /FAIL: DB BENCHMARK: .* \(.*\)$/ end end end it "logs controller processing time of successful actions" do File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base def index render :nothing => true end end }) start!(@options) send_request_to_app("PATH_INFO" => "/foo") eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log.include?("BEGIN: framework request processing") && log.include?("END: framework request processing") end end it "logs controller processing time of failed actions" do File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base def index raise "crash" end end }) start!(@options) send_request_to_app("PATH_INFO" => "/foo") eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log.include?("BEGIN: framework request processing") && log.include?("FAIL: framework request processing") end end it "logs view rendering time of successful actions" do File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base def index end end }) FileUtils.mkdir_p("#{@stub.app_root}/app/views/foo") File.write("#{@stub.app_root}/app/views/foo/index.html.erb", %Q{ hello world }) start!(@options) send_request_to_app("PATH_INFO" => "/foo") eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log.include?("BEGIN: view rendering") && log.include?("END: view rendering") && log =~ /View rendering time: \d+$/ end end it "logs view rendering time of failed actions" do File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base def index end end }) FileUtils.mkdir_p("#{@stub.app_root}/app/views/foo") File.write("#{@stub.app_root}/app/views/foo/index.html.erb", %Q{ <% raise "crash!" %> }) start!(@options) send_request_to_app("PATH_INFO" => "/foo") eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log.include?("BEGIN: view rendering") && log.include?("FAIL: view rendering") end end it "logs cache hits" do if rails_version >= '2.1' File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base def index Rails.cache.write("key1", "foo") Rails.cache.write("key2", "foo") Rails.cache.write("key3", "foo") Rails.cache.read("key1") Rails.cache.fetch("key2") Rails.cache.fetch("key3") { "bar" } render :text => 'ok' end end }) start!(@options) send_request_to_app("PATH_INFO" => "/foo") eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log.include?("Cache hit: key1") && log.include?("Cache hit: key2") && log.include?("Cache hit: key3") end end end it "logs cache misses" do if rails_version >= '2.1' File.write("#{@stub.app_root}/app/controllers/foo_controller.rb", %Q{ class FooController < ActionController::Base def index Rails.cache.read("key1") Rails.cache.fetch("key2") Rails.cache.fetch("key3") { "bar" } render :text => 'ok' end end }) start!(@options) send_request_to_app("PATH_INFO" => "/foo") eventually(5) do flush_logging_agent(@logging_agent_password, @socket_address) log = read_log log.include?("Cache miss: key1") && log.include?("Cache miss: key2") && log =~ /Cache miss \(\d+\): key3/ end end end end end # module PhusionPassenger passenger-4.0.37/test/ruby/rails4.0/loader_spec.rb000644 000765 000024 00000001246 12233035540 022320 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ruby/shared/loader_sharedspec' require 'ruby/shared/rails/analytics_logging_extensions_sharedspec' if RUBY_VERSION_INT >= 190 module PhusionPassenger describe "Rack loader with Rails 4.0" do include LoaderSpecHelper before :each do @stub = register_stub(RackStub.new("rails4.0")) end def start(options = {}) @loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root) return @loader.start(options) end def rails_version return "4.0" end include_examples "analytics logging extensions for Rails" end end # module PhusionPassenger end passenger-4.0.37/test/ruby/rails4.0/preloader_spec.rb000644 000765 000024 00000001472 12233035540 023030 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ruby/shared/loader_sharedspec' require 'ruby/shared/rails/analytics_logging_extensions_sharedspec' if RUBY_VERSION_INT >= 190 module PhusionPassenger describe "Rack loader with Rails 4.0" do include LoaderSpecHelper before :each do @stub = register_stub(RackStub.new("rails4.0")) end def start(options = {}) @preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root) result = @preloader.start(options) if result[:status] == "Ready" @loader = @preloader.spawn(options) return @loader.start(options) else return result end end def rails_version return "4.0" end include_examples "analytics logging extensions for Rails" end end # module PhusionPassenger end passenger-4.0.37/test/ruby/rails3.2/loader_spec.rb000644 000765 000024 00000001207 12233035540 022316 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ruby/shared/loader_sharedspec' require 'ruby/shared/rails/analytics_logging_extensions_sharedspec' module PhusionPassenger describe "Rack loader with Rails 3.2" do include LoaderSpecHelper before :each do @stub = register_stub(RackStub.new("rails3.2")) end def start(options = {}) @loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root) return @loader.start(options) end def rails_version return "3.2" end include_examples "analytics logging extensions for Rails" end end # module PhusionPassenger passenger-4.0.37/test/ruby/rails3.2/preloader_spec.rb000644 000765 000024 00000001433 12233035540 023026 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ruby/shared/loader_sharedspec' require 'ruby/shared/rails/analytics_logging_extensions_sharedspec' module PhusionPassenger describe "Rack loader with Rails 3.2" do include LoaderSpecHelper before :each do @stub = register_stub(RackStub.new("rails3.2")) end def start(options = {}) @preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root) result = @preloader.start(options) if result[:status] == "Ready" @loader = @preloader.spawn(options) return @loader.start(options) else return result end end def rails_version return "3.2" end include_examples "analytics logging extensions for Rails" end end # module PhusionPassenger passenger-4.0.37/test/ruby/rails3.1/loader_spec.rb000644 000765 000024 00000001207 12233035540 022315 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ruby/shared/loader_sharedspec' require 'ruby/shared/rails/analytics_logging_extensions_sharedspec' module PhusionPassenger describe "Rack loader with Rails 3.1" do include LoaderSpecHelper before :each do @stub = register_stub(RackStub.new("rails3.1")) end def start(options = {}) @loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root) return @loader.start(options) end def rails_version return "3.1" end include_examples "analytics logging extensions for Rails" end end # module PhusionPassenger passenger-4.0.37/test/ruby/rails3.1/preloader_spec.rb000644 000765 000024 00000001433 12233035540 023025 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ruby/shared/loader_sharedspec' require 'ruby/shared/rails/analytics_logging_extensions_sharedspec' module PhusionPassenger describe "Rack loader with Rails 3.1" do include LoaderSpecHelper before :each do @stub = register_stub(RackStub.new("rails3.1")) end def start(options = {}) @preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root) result = @preloader.start(options) if result[:status] == "Ready" @loader = @preloader.spawn(options) return @loader.start(options) else return result end end def rails_version return "3.1" end include_examples "analytics logging extensions for Rails" end end # module PhusionPassenger passenger-4.0.37/test/ruby/rails3.0/loader_spec.rb000644 000765 000024 00000001207 12233035540 022314 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ruby/shared/loader_sharedspec' require 'ruby/shared/rails/analytics_logging_extensions_sharedspec' module PhusionPassenger describe "Rack loader with Rails 3.0" do include LoaderSpecHelper before :each do @stub = register_stub(RackStub.new("rails3.0")) end def start(options = {}) @loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root) return @loader.start(options) end def rails_version return "3.0" end include_examples "analytics logging extensions for Rails" end end # module PhusionPassenger passenger-4.0.37/test/ruby/rails3.0/preloader_spec.rb000644 000765 000024 00000001433 12233035540 023024 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ruby/shared/loader_sharedspec' require 'ruby/shared/rails/analytics_logging_extensions_sharedspec' module PhusionPassenger describe "Rack loader with Rails 3.0" do include LoaderSpecHelper before :each do @stub = register_stub(RackStub.new("rails3.0")) end def start(options = {}) @preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root) result = @preloader.start(options) if result[:status] == "Ready" @loader = @preloader.spawn(options) return @loader.start(options) else return result end end def rails_version return "3.0" end include_examples "analytics logging extensions for Rails" end end # module PhusionPassenger passenger-4.0.37/test/ruby/rack/loader_spec.rb000644 000765 000024 00000002225 12233035540 021702 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ruby/shared/loader_sharedspec' require 'ruby/shared/ruby_loader_sharedspec' module PhusionPassenger describe "Rack loader" do include LoaderSpecHelper before :each do @stub = register_stub(RackStub.new("rack")) end def start(options = {}) @loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root) return @loader.start(options) end it_should_behave_like "a loader" it_should_behave_like "a Ruby loader" it "calls the starting_worker_process event with forked=false" do File.prepend(@stub.startup_file, %q{ history_file = "history.txt" PhusionPassenger.on_event(:starting_worker_process) do |forked| ::File.open(history_file, 'a') do |f| f.puts "worker_process_started: forked=#{forked}\n" end end ::File.open(history_file, 'a') do |f| f.puts "end of startup file\n" end }) result = start result[:status].should == "Ready" File.read("#{@stub.app_root}/history.txt").should == "end of startup file\n" + "worker_process_started: forked=false\n" end end end # module PhusionPassenger passenger-4.0.37/test/ruby/rack/preloader_spec.rb000644 000765 000024 00000002452 12233035540 022413 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ruby/shared/loader_sharedspec' require 'ruby/shared/ruby_loader_sharedspec' module PhusionPassenger describe "Rack preloader" do include LoaderSpecHelper before :each do @stub = register_stub(RackStub.new("rack")) end def start(options = {}) @preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root) result = @preloader.start(options) if result[:status] == "Ready" @loader = @preloader.spawn(options) return @loader.start(options) else return result end end it_should_behave_like "a loader" it_should_behave_like "a Ruby loader" it "calls the starting_worker_process event with forked=true" do File.prepend(@stub.startup_file, %q{ history_file = "history.txt" PhusionPassenger.on_event(:starting_worker_process) do |forked| ::File.open(history_file, 'a') do |f| f.puts "worker_process_started: forked=#{forked}\n" end end ::File.open(history_file, 'a') do |f| f.puts "end of startup file\n" end }) result = start result[:status].should == "Ready" File.read("#{@stub.app_root}/history.txt").should == "end of startup file\n" + "worker_process_started: forked=true\n" end end end # module PhusionPassenger passenger-4.0.37/test/ruby/classic_rails/loader_spec.rb000644 000765 000024 00000002473 12233035540 023602 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ruby/shared/loader_sharedspec' require 'ruby/shared/ruby_loader_sharedspec' require 'ruby/shared/rails/analytics_logging_extensions_sharedspec' module PhusionPassenger describe "Classic Rails 2.3 loader" do include LoaderSpecHelper before :each do @stub = register_stub(ClassicRailsStub.new("rails2.3")) end def start(options = {}) @loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/classic-rails-loader.rb"], @stub.app_root) return @loader.start(options) end def rails_version return "2.3" end it_should_behave_like "a loader" it_should_behave_like "a Ruby loader" it "calls the starting_worker_process event with forked=false" do File.prepend(@stub.environment_rb, %q{ history_file = "history.txt" PhusionPassenger.on_event(:starting_worker_process) do |forked| ::File.open(history_file, 'a') do |f| f.puts "worker_process_started: forked=#{forked}\n" end end ::File.open(history_file, 'a') do |f| f.puts "end of startup file\n" end }) result = start result[:status].should == "Ready" File.read("#{@stub.app_root}/history.txt").should == "end of startup file\n" + "worker_process_started: forked=false\n" end end if TEST_CLASSIC_RAILS end # module PhusionPassenger passenger-4.0.37/test/ruby/classic_rails/preloader_spec.rb000644 000765 000024 00000002720 12233035540 024304 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') require 'ruby/shared/loader_sharedspec' require 'ruby/shared/ruby_loader_sharedspec' require 'ruby/shared/rails/analytics_logging_extensions_sharedspec' module PhusionPassenger describe "Classic Rails 2.3 preloader" do include LoaderSpecHelper before :each do @stub = register_stub(ClassicRailsStub.new("rails2.3")) end def start(options = {}) @preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/classic-rails-preloader.rb"], @stub.app_root) result = @preloader.start(options) if result[:status] == "Ready" @loader = @preloader.spawn(options) return @loader.start(options) else return result end end def rails_version return "2.3" end it_should_behave_like "a loader" it_should_behave_like "a Ruby loader" it "calls the starting_worker_process event with forked=true" do File.prepend(@stub.environment_rb, %q{ history_file = "history.txt" PhusionPassenger.on_event(:starting_worker_process) do |forked| ::File.open(history_file, 'a') do |f| f.puts "worker_process_started: forked=#{forked}\n" end end ::File.open(history_file, 'a') do |f| f.puts "end of startup file\n" end }) result = start result[:status].should == "Ready" File.read("#{@stub.app_root}/history.txt").should == "end of startup file\n" + "worker_process_started: forked=true\n" end end if TEST_CLASSIC_RAILS end # module PhusionPassenger passenger-4.0.37/test/oxt/backtrace_test.cpp000644 000765 000024 00000005015 12233035540 021470 0ustar00honglistaff000000 000000 #include "../tut/tut.h" #include "counter.hpp" #include #include #include using namespace oxt; using namespace std; namespace tut { struct backtrace_test { }; DEFINE_TEST_GROUP(backtrace_test); TEST_METHOD(1) { // Test TRACE_POINT() and tracable_exception. struct { void foo() { TRACE_POINT(); bar(); } void bar() { TRACE_POINT(); baz(); } void baz() { TRACE_POINT(); throw tracable_exception(); } } object; try { object.foo(); fail("tracable_exception expected."); } catch (const tracable_exception &e) { ensure("Backtrace contains foo()", e.backtrace().find("foo()") != string::npos); ensure("Backtrace contains bar()", e.backtrace().find("bar()") != string::npos); ensure("Backtrace contains baz()", e.backtrace().find("baz()") != string::npos); } } static void foo(CounterPtr parent_counter, CounterPtr child_counter) { TRACE_POINT(); child_counter->increment(); // Tell parent that we've created the trace point. parent_counter->wait_until(1); // Wait until parent thread says we can exit. } static void bar(CounterPtr parent_counter, CounterPtr child_counter) { TRACE_POINT(); child_counter->increment(); // Tell parent that we've created the trace point. parent_counter->wait_until(1); // Wait until parent thread says we can exit. } TEST_METHOD(2) { // Test whether oxt::thread's backtrace support works. CounterPtr parent_counter = Counter::create_ptr(); CounterPtr child_counter = Counter::create_ptr(); oxt::thread foo_thread(boost::bind(foo, parent_counter, child_counter)); oxt::thread bar_thread(boost::bind(bar, parent_counter, child_counter)); // Wait until all threads have created trace points. child_counter->wait_until(2); ensure("Foo thread's backtrace contains foo()", foo_thread.backtrace().find("foo") != string::npos); ensure("Foo thread's backtrace doesn't contain bar()", foo_thread.backtrace().find("bar") == string::npos); ensure("Bar thread's backtrace contains bar()", bar_thread.backtrace().find("bar") != string::npos); ensure("Bar thread's backtrace doesn't contain foo()", bar_thread.backtrace().find("foo") == string::npos); string all_backtraces(oxt::thread::all_backtraces()); ensure(all_backtraces.find("foo") != string::npos); ensure(all_backtraces.find("bar") != string::npos); parent_counter->increment(); // Tell threads to quit. foo_thread.join(); bar_thread.join(); } } passenger-4.0.37/test/oxt/counter.hpp000644 000765 000024 00000002541 12233035540 020177 0ustar00honglistaff000000 000000 #ifndef _COUNTER_HPP_ #define _COUNTER_HPP_ #include #include #include struct Counter; typedef boost::shared_ptr CounterPtr; /** * A synchronization mechanism with counter-like properties. * * To avoid memory corruption when unit tests fail, one should * never store Counter objects on the stack. Instead, one should * create them on the heap and use CounterPtr smart pointers. */ struct Counter { struct timeout_expired { }; unsigned int value; boost::mutex mutex; boost::condition_variable cond; static CounterPtr create_ptr() { return CounterPtr(new Counter()); } Counter() { value = 0; } /** * Wait until other threads have increment this counter to at least wanted_value. * If this doesn't happen within timeout miliseconds, then a timeout_expired * exception will be thrown. */ void wait_until(unsigned int wanted_value, unsigned int timeout = 1000) { boost::unique_lock l(mutex); while (value < wanted_value) { if (!cond.timed_wait(l, boost::get_system_time() + boost::posix_time::milliseconds(timeout))) { throw timeout_expired(); } } } /** Increment the counter by one. */ void increment() { boost::unique_lock l(mutex); value++; cond.notify_all(); } }; #endif /* _COUNTER_HPP_ */ passenger-4.0.37/test/oxt/dynamic_thread_group_test.cpp000644 000765 000024 00000007570 12233035540 023750 0ustar00honglistaff000000 000000 #include "../tut/tut.h" #include "counter.hpp" #include #include #include #include #include using namespace boost; using namespace oxt; namespace tut { struct dynamic_thread_group_test { dynamic_thread_group group; }; DEFINE_TEST_GROUP(dynamic_thread_group_test); TEST_METHOD(1) { // It has 0 threads in the beginning. ensure_equals(group.num_threads(), 0u); } static void wait_until_done(CounterPtr parent_counter, CounterPtr child_counter) { // Tell parent thread that this thread has started. parent_counter->increment(); // Wait until parent says that we can quit. child_counter->wait_until(1); } TEST_METHOD(2) { // Test whether newly created threads are added to the thread // group, and whether they are automatically removed from the // thread group upon termination. // Start 3 'f' threads. CounterPtr f_parent_counter = Counter::create_ptr(); CounterPtr f_child_counter = Counter::create_ptr(); boost::function f(boost::bind(wait_until_done, f_parent_counter, f_child_counter)); group.create_thread(f); group.create_thread(f); group.create_thread(f); // Start 1 'g' thread. CounterPtr g_parent_counter = Counter::create_ptr(); CounterPtr g_child_counter = Counter::create_ptr(); boost::function g(boost::bind(wait_until_done, g_parent_counter, g_child_counter)); group.create_thread(g); f_parent_counter->wait_until(3); // Wait until all 'f' threads have started. g_parent_counter->wait_until(1); // Wait until the 'g' thread has started. ensure_equals("There are 4 threads in the group", group.num_threads(), 4u); // Tell all 'f' threads that they can quit now. f_child_counter->increment(); usleep(25000); // Sleep time must be large enough for Valgrind. ensure_equals(group.num_threads(), 1u); // Tell the 'g' thread that it can quit now. g_child_counter->increment(); usleep(25000); // Sleep time must be large enough for Valgrind. ensure_equals(group.num_threads(), 0u); } static void sleep_and_set_true(CounterPtr counter, volatile bool *flag) { // Tell parent thread that this thread has started. counter->increment(); try { syscalls::usleep(5000000); } catch (thread_interrupted &) { *flag = true; } } TEST_METHOD(3) { // interrupt_and_join_all() works. // Create two threads. CounterPtr counter = Counter::create_ptr(); volatile bool flag1 = false; volatile bool flag2 = false; boost::function f(boost::bind(sleep_and_set_true, counter, &flag1)); boost::function g(boost::bind(sleep_and_set_true, counter, &flag2)); group.create_thread(f); group.create_thread(g); // Wait until both threads have started. counter->wait_until(2); // Now interrupt and join them. group.interrupt_and_join_all(); // Both threads should have received a thread interruption // request and terminated as a result. ensure_equals(flag1, true); ensure_equals(flag2, true); ensure_equals(group.num_threads(), 0u); } static void do_nothing(unsigned int max) { unsigned int i; for (i = 0; i < max; i++) { } } static void create_threads(dynamic_thread_group *group) { for (int i = 1000; i >= 0; i--) { boost::function f(boost::bind(do_nothing, i * 1000)); group->create_thread(f, "", 256 * 1024); } } static void interrupt_group(dynamic_thread_group *group) { for (int i = 0; i < 1000; i++) { group->interrupt_and_join_all(); } } TEST_METHOD(4) { // Stress test. oxt::thread thr1(boost::bind(create_threads, &group)); oxt::thread thr2(boost::bind(interrupt_group, &group)); thr1.join(); thr2.join(); group.interrupt_and_join_all(); ensure_equals(group.num_threads(), 0u); } TEST_METHOD(5) { // If the thread function crashes then it will still be correctly removed from the pool. } } passenger-4.0.37/test/oxt/oxt_test_main.cpp000644 000765 000024 00000001164 12233035540 021370 0ustar00honglistaff000000 000000 #include "../tut/tut.h" #include "../tut/tut_reporter.h" #include #include #include #include namespace tut { test_runner_singleton runner; } int main() { tut::reporter reporter; tut::runner.get().set_callback(&reporter); signal(SIGPIPE, SIG_IGN); setenv("RAILS_ENV", "production", 1); setenv("TESTING_PASSENGER", "1", 1); oxt::initialize(); oxt::setup_syscall_interruption_support(); try { tut::runner.get().run_tests(); } catch (const std::exception &ex) { std::cerr << "Exception raised: " << ex.what() << std::endl; return 1; } return 0; } passenger-4.0.37/test/oxt/spin_lock_test.cpp000644 000765 000024 00000002414 12233035540 021532 0ustar00honglistaff000000 000000 #include "../tut/tut.h" #include #include #include using namespace boost; using namespace oxt; namespace tut { struct spin_lock_test { boost::mutex continue_mutex; boost::condition_variable continue_cond; bool continue_ok; spin_lock lock; volatile unsigned int counter; spin_lock_test() { counter = 0; continue_ok = false; } void loop_increment(unsigned int inc) { { boost::mutex::scoped_lock l1(continue_mutex); while (!continue_ok) { continue_cond.wait(l1); } } for (unsigned int i = 0; i < inc; i++) { spin_lock::scoped_lock l2(lock); counter++; } } }; DEFINE_TEST_GROUP(spin_lock_test); TEST_METHOD(1) { boost::thread thr1(boost::bind(&spin_lock_test::loop_increment, this, 100000)); boost::thread thr2(boost::bind(&spin_lock_test::loop_increment, this, 100000)); boost::thread thr3(boost::bind(&spin_lock_test::loop_increment, this, 100000)); boost::thread thr4(boost::bind(&spin_lock_test::loop_increment, this, 100000)); { boost::mutex::scoped_lock l(continue_mutex); continue_ok = true; continue_cond.notify_all(); } thr1.join(); thr2.join(); thr3.join(); thr4.join(); ensure_equals(counter, 400000u); } } passenger-4.0.37/test/oxt/syscall_interruption_test.cpp000644 000765 000024 00000001316 12233035540 024045 0ustar00honglistaff000000 000000 #include "../tut/tut.h" #include #include #include #include #include using namespace oxt; using namespace std; using namespace boost; namespace tut { struct syscall_interruption_test { }; DEFINE_TEST_GROUP(syscall_interruption_test); struct SleepFunction { void operator()() { syscalls::usleep(6000000); } }; TEST_METHOD(1) { // System call interruption works. SleepFunction s; oxt::thread thr(s); usleep(20000); time_t begin, end, time_spent_in_thread; begin = time(NULL); thr.interrupt_and_join(); end = time(NULL); time_spent_in_thread = end - begin; ensure(time_spent_in_thread <= 2); } } passenger-4.0.37/test/node/httplib_emulation_spec.js000644 000765 000024 00000035446 12233035540 023227 0ustar00honglistaff000000 000000 var Helper = require('./spec_helper').Helper; var FakeStream = require('./spec_helper').FakeStream; var should = require('should'); var assert = require('assert'); var net = require('net'); var HttplibEmulation = require('phusion_passenger/httplib_emulation'); /* * Caveat: * According to the Node.js source code, when a stream is set to flowing mode, * it is supposed to set _readableState.flowing to true. Yet from empirical tests * with http.Server, this does not happen. Neither on the IncomingMessage object, * nor on the socket object. Therefore, in the flowing mode tests, we only check * the flowing mode flag on the request object, not the socket. */ describe('HttplibEmulation', function() { this.timeout(1000); beforeEach(function() { var state = this.state = {}; state.createSocket = function(callback) { if (state.server || state.client) { throw new Error('createSocket() may only be called once'); } var server = net.createServer(); function maybeDone() { if (state.serverSocket && state.client) { callback(state.serverSocket, state.client); } } server.listen(0, '127.0.0.1', function() { var client = new net.Socket(); client.once('connect', function() { state.client = client; maybeDone(); }); client.connect(server.address().port, '127.0.0.1'); }); server.once('connection', function(socket) { state.server = server; state.serverSocket = socket; maybeDone(); }); } }); afterEach(function(done) { var state = this.state; var events = 1; var counter = 0; function maybeDone() { counter++; if (counter == events) { done(); } } if (state.server) { events += 1; state.server.close(maybeDone); state.serverSocket.destroy(); } if (state.client) { state.client.destroy(); } maybeDone(); }); function createHeaders(object) { var key, keys = []; var result = { 'SERVER_PROTOCOL': 'HTTP/1.1', 'REMOTE_ADDR': '127.0.0.1', 'REMOTE_PORT': '3000', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/', 'PATH_INFO': '/' }; for (key in object) { result[key] = object[key]; } for (key in result) { keys.push(key); } result.keys = keys; return result; } describe('the request object', function() { beforeEach(function() { var state = this.state; state.setup = function(headers, callback) { if (!callback) { callback = headers; headers = {}; } state.headers = createHeaders(headers); state.createSocket(function(serverSocket, client) { state.req = HttplibEmulation.createIncomingMessage( state.headers, serverSocket, ""); callback(); }); } }); specify('.on() returns the request object', function(done) { var state = this.state; state.setup(function() { var result = state.req.on('foo', function() {}); assert.strictEqual(result, state.req); done(); }); }); it('sets no "upgrade" flag if there is no Upgrade header', function(done) { var state = this.state; state.setup(function() { assert.ok(!state.req.upgrade); done(); }); }); it('sets the "upgrade" flag if there is an Upgrade header', function(done) { var state = this.state; var headers = { 'HTTP_UPGRADE': 'WebSocket' }; state.setup(headers, function() { assert.ok(state.req.upgrade); done(); }); }); }); describe('if the request may have a request body', function() { beforeEach(function() { var state = this.state; state.setup = function(headers, callback) { if (!callback) { callback = headers; headers = { 'REQUEST_METHOD': 'POST' }; } state.headers = createHeaders(headers); state.createSocket(function(serverSocket, client) { state.req = HttplibEmulation.createIncomingMessage( state.headers, serverSocket, ""); callback(); }); } }); it("isn't in flowing mode by default", function(done) { var state = this.state; state.setup(function() { assert.strictEqual(state.req._flowing, undefined); done(); }); }); it("is set to flowing mode upon calling pause", function(done) { var state = this.state; state.setup(function() { state.req.pause(); assert.strictEqual(state.req._flowing, false); done(); }); }); it("is set to flowing mode upon calling resume", function(done) { var state = this.state; state.setup(function() { state.req.resume(); assert.strictEqual(state.req._flowing, true); done(); }); }); it("is set to flowing mode upon attaching a data event handler", function(done) { var state = this.state; state.setup(function() { var chunks = []; state.req.on('data', function(chunk) { chunks.push(chunk.toString('utf-8')); }); assert.strictEqual(state.req._flowing, true); state.client.write("hello"); Helper.eventually(100, function() { return chunks.length > 0; }, function() { chunks.should.eql(['hello']); done(); }); }); }); describe("when in flowing mode", function() { beforeEach(function(done) { var state = this.state; state.setup(function() { state.req.resume(); assert.ok(state.req._flowing); done(); }); }); specify("the request object emits data events as data is received", function(done) { var state = this.state; var chunks = []; state.req.on('data', function(chunk) { chunks.push(chunk.toString('utf-8')); }); state.client.write("hello"); Helper.eventually(100, function() { return chunks.length > 0; }, function() { chunks.should.eql(["hello"]); done(); }); }); specify("the request object emits the end event after the client closes the socket", function(done) { var state = this.state; var finished; function endReachedPrematurely() { assert.fail("end event received prematurely"); finished = true; done(); } state.req.once('end', endReachedPrematurely); setTimeout(function() { if (!finished) { state.req.removeListener('end', endReachedPrematurely); state.req.once('end', function() { done(); }); state.client.destroy(); } }, 50); }); }); describe("when in non-flowing mode", function() { beforeEach(function(done) { var state = this.state; state.setup(function() { assert.ok(!state.req._flowing); done(); }); }); specify("the request object emits readable events upon receiving data", function(done) { var state = this.state; var readable = 0; state.req.on('readable', function() { readable++; }); setTimeout(function() { state.client.write("hello"); Helper.eventually(100, function() { return readable == 1; }, done); }, 50); }); it("allows reading from the request object", function(done) { var state = this.state; state.client.write("hello"); setTimeout(function() { var chunk = state.req.read(5); assert.ok(!!chunk); chunk.toString('utf-8').should.eql('hello'); done(); }, 50); }); it("emits a readable event if data was already received before attaching the event listener", function(done) { var state = this.state; state.client.write("hello"); setTimeout(function() { var readable = 0; state.req.on('readable', function() { readable++; }); Helper.eventually(100, function() { return readable == 1; }, done); }, 50); }); it("pauses the socket data flow if the request buffer becomes too full", function(done) { var state = this.state; var i, buf; state.client.write("hello"); buf = new Buffer(1024); buf.fill("x"); for (i = 0; i < 1024; i++) { state.client.write(buf); } setTimeout(function() { var len = state.req._readableState.length; assert.ok(len > 0); buf = new Buffer(1024); buf.fill("y"); for (i = 0; i < 1024; i++) { state.client.write(buf); } setTimeout(function() { state.req._readableState.length.should.equal(len); var chunk = state.req.read(7); assert.ok(!!chunk); chunk.toString('utf-8').should.eql("helloxx"); done(); }, 100); }, 100); }); it("resumes the socket data flow if the request buffer's size drops to below the high water mark", function(done) { var state = this.state; var i, buf; buf = new Buffer(1024); buf.fill("x"); for (i = 0; i < 1024; i++) { state.client.write(buf); } var len = 0; var str = buf.slice(0, 512).toString('utf-8'); state.req.on('readable', function() { var chunk; while ((chunk = state.req.read(512)) !== null) { chunk.toString('utf-8').should.eql(str); len += chunk.length; } }); Helper.eventually(100, function() { return len == 1024 * 1024; }, done); }) it("doesn't emit the end event if the request was never read from", function(done) { var state = this.state; var finished; setTimeout(function() { if (!finished) { finished = true; done(); } }, 50); state.req.on('end', function() { if (!finished) { finished = true; assert.fail("unexpected end event"); } }); }); it("emits the end event upon reaching the end of the request body", function(done) { var state = this.state; var i, buf; state.client.write("hello"); buf = new Buffer(1024); buf.fill("x"); for (i = 0; i < 1024; i++) { state.client.write(buf); } state.client.end(); var len = 0; state.req.on('readable', function() { while ((buf = state.req.read(512)) !== null) { len += buf.length; } }); state.req.on('end', function() { len.should.equal(1024 * 1024); done(); }) }); it("emits the end event when read() encounters EOF", function(done) { var state = this.state; var finished; state.req.on('end', function() { if (!finished) { finished = true; done(); } }); state.client.end(); setTimeout(function() { state.req.read(10); }, 10); }); }); }); describe("if the request doesn't have a request body", function() { beforeEach(function() { var state = this.state; state.setup = function(headers, callback) { if (!callback) { callback = headers; headers = {}; } state.headers = createHeaders(headers); state.createSocket(function(serverSocket, client) { state.req = HttplibEmulation.createIncomingMessage( state.headers, serverSocket, ""); callback(); }); } }); it("isn't in flowing mode by default", function(done) { var state = this.state; state.setup(function() { assert.strictEqual(state.req._flowing, undefined); done(); }); }); it("is set to flowing mode upon calling pause", function(done) { var state = this.state; state.setup(function() { state.req.pause(); assert.strictEqual(state.req._flowing, false); done(); }); }); it("is set to flowing mode upon calling resume", function(done) { var state = this.state; state.setup(function() { state.req.resume(); assert.strictEqual(state.req._flowing, true); done(); }); }); it("is set to flowing mode upon attaching a data event handler", function(done) { var state = this.state; state.setup(function() { state.req.on('data', function(chunk) {}); assert.strictEqual(state.req._flowing, true); done(); }); }); describe("when in flowing mode", function() { beforeEach(function(done) { var state = this.state; state.setup(function() { state.req.resume(); assert.ok(state.req._flowing); done(); }); }); it("sends the end event immediately", function(done) { var state = this.state; var finished; setTimeout(function() { if (!finished) { finished = true; assert.fail("end event never sent"); } }, 50); state.req.on('end', function() { if (!finished) { finished = true; done(); } }); }); }); describe("when in non-flowing mode", function() { beforeEach(function(done) { var state = this.state; state.setup(function() { assert.ok(!state.req._flowing); done(); }); }); it("doesn't send the end event if the request was never read from", function(done) { var state = this.state; var finished; setTimeout(function() { if (!finished) { finished = true; done(); } }, 50); state.req.on('end', function() { if (!finished) { finished = true; assert.fail("unexpected end event"); } }); }); it("sends the end event when read() encounters EOF", function(done) { var state = this.state; var finished; state.req.on('end', function() { if (!finished) { finished = true; done(); } }); state.req.read(10); }); }); }); describe('requests with Upgrade header', function() { beforeEach(function() { var state = this.state; state.setup = function(headers, callback) { if (!callback) { callback = headers; headers = { 'HTTP_UPGRADE': 'websocket' }; } state.headers = createHeaders(headers); state.createSocket(function(serverSocket, client) { state.req = HttplibEmulation.createIncomingMessage( state.headers, serverSocket, ""); callback(); }); } }); specify('the request object emits no data events', function(done) { var state = this.state; state.setup(function() { var hasData = false; state.req.on('data', function(data) { hasData = true; }); state.client.write("hello"); Helper.shouldNeverHappen(50, function() { return hasData; }, done); }); }); specify('the request object ends immediately', function(done) { var state = this.state; state.setup(function() { var readable = false; var readData; var ended = false; state.req.on('readable', function() { readable = true; readData = state.req.read(100); }); state.req.on('end', function() { ended = true; }); Helper.eventually(50, function() { return readable && ended; }, function() { assert.strictEqual(readData, null); done(); }); }); }); specify('the socket emits data events as data is received', function(done) { var state = this.state; state.setup(function() { var hasData = false; state.req.socket.on('data', function(data) { hasData = true; }); state.client.write("hello"); Helper.eventually(50, function() { return hasData; }, done); }); }); it('allows reading from the socket', function(done) { var state = this.state; state.setup(function() { state.req.socket.on('readable', function() { var chunk = state.req.socket.read(5).toString('utf-8'); chunk.should.eql("hello"); done(); }); state.client.write("hello"); }); }); }); }); passenger-4.0.37/test/node/line_reader_spec.js000644 000765 000024 00000020507 12233035540 021745 0ustar00honglistaff000000 000000 var Helper = require('./spec_helper').Helper; var FakeStream = require('./spec_helper').FakeStream; var sinon = require('sinon'); var should = require('should'); var assert = require('assert'); var LineReader = require('phusion_passenger/line_reader').LineReader; describe('LineReader', function() { this.timeout(1000); beforeEach(function() { this.stream = new FakeStream(); this.reader = new LineReader(this.stream); }); it('does nothing when the stream is idle', function(done) { var finished; this.reader.readLine(function(line) { if (!finished) { finished = true; assert.fail(); } }); setTimeout(function() { if (!finished) { finished = true; done(); } }, 50); }); describe('when one partial line has been received', function() { beforeEach(function() { this.stream.emit('data', 'hello'); }); it('buffers the data', function() { this.reader.buffer.should.equal('hello'); }); it('resumes the stream', function() { this.stream.paused.should.be.false; this.reader.paused.should.be.false; }); describe('when the rest of the line is received later', function() { beforeEach(function() { this.stream.emit('data', " world\n"); }); it('memorizes a line', function() { this.reader.lines.should.eql(["hello world\n"]); }); it('empties the buffer', function() { this.reader.buffer.should.eql(''); }); it('pauses the stream', function() { this.stream.paused.should.be.true; this.reader.paused.should.be.true; }); }); describe('when the rest of the line, plus a partial line, is received later', function() { beforeEach(function() { this.stream.emit('data', " world\nhey"); }); it('memorizes a line', function() { this.reader.lines.should.eql(["hello world\n"]); }); it('buffers the partial line', function() { this.reader.buffer.should.eql('hey'); }); it('pauses the stream', function() { this.stream.paused.should.be.true; this.reader.paused.should.be.true; }); }); describe('when the rest of the line, plus a full line, is received later', function() { beforeEach(function() { this.stream.emit('data', " world\nhey\n"); }); it('memorizes two lines', function() { this.reader.lines.should.eql(["hello world\n", "hey\n"]); }); it('empties the buffer', function() { this.reader.buffer.should.eql(''); }); it('pauses the stream', function() { this.stream.paused.should.be.true; this.reader.paused.should.be.true; }); }); }); describe('when one full line has been received', function() { beforeEach(function() { this.stream.emit('data', "hello world\n"); }); it('memorizes the line', function() { this.reader.lines.should.eql(["hello world\n"]); }); it('empties the buffer', function() { this.reader.buffer.should.eql(''); }); it('pauses the stream', function() { this.stream.paused.should.be.true; this.reader.paused.should.be.true; }); }); describe('when multiple full lines have been received', function() { beforeEach(function() { this.stream.emit('data', "hello world\nhey\n"); }); it('memorizes all lines', function() { this.reader.lines.should.eql(["hello world\n", "hey\n"]); }); it('empties the buffer', function() { this.reader.buffer.should.eql(''); }); it('pauses the stream', function() { this.stream.paused.should.be.true; this.reader.paused.should.be.true; }); }); describe('when multiple full lines and one partial line have been received', function() { beforeEach(function() { this.stream.emit('data', "hello world\nhey\nfoo"); }); it('memorizes all full lines', function() { this.reader.lines.should.eql(["hello world\n", "hey\n"]); }); it('buffers the partial line', function() { this.reader.buffer.should.eql('foo'); }); it('pauses the stream', function() { this.stream.paused.should.be.true; this.reader.paused.should.be.true; }); }); describe('on EOF', function() { describe('if the buffer is non-empty', function() { beforeEach(function() { this.reader.buffer = 'hello'; this.stream.emit('end'); }); it('memorizes the buffer contents as a line', function() { this.reader.lines.should.eql(["hello"]); }); }); it('marks the reader as having reached EOF', function() { this.stream.emit('end'); this.reader.endReached().should.be.true; }); it('pauses the stream', function() { this.stream.emit('end'); this.stream.paused.should.be.true; this.reader.paused.should.be.true; }) }); describe('.readLine', function() { describe('if there is at least one line in memory', function() { beforeEach(function() { this.reader.lines = ["hello\n", "world\n"]; }); it('pops the first line in memory', function(done) { this.reader.readLine(function(line) { line.should.eql("hello\n"); done(); }); }); describe('if the line memory is non-empty after reading', function() { it('pauses the stream', function(done) { var self = this; this.reader.readLine(function(line) { line.should.eql("hello\n"); process.nextTick(function() { self.stream.paused.should.be.true; self.reader.paused.should.be.true; done(); }); }); }); }); describe('if the line memory is empty after reading', function() { beforeEach(function() { this.reader.lines = ["hello\n"]; }); it('resumes the stream', function(done) { var self = this; this.reader.readLine(function(line) { line.should.eql("hello\n"); process.nextTick(function() { self.stream.paused.should.be.false; self.reader.paused.should.be.false; done(); }); }); }); }); describe('if the stream had already reached EOF', function() { beforeEach(function() { this.reader.eof = true; this.reader.lines = ["hello\n"]; }); it('yields the line upon first call', function(done) { this.reader.readLine(function(line) { line.should.eql("hello\n"); done(); }); }); it('yields undefined once the line memory has become empty', function(done) { var self = this; this.reader.readLine(function(line) { line.should.eql("hello\n"); self.reader.readLine(function(line2) { should(line2).equal(undefined); self.reader.readLine(function(line3) { should(line3).equal(undefined); done(); }); }); }); }); }); describe('when calling readLine again in the callback', function() { beforeEach(function() { this.reader.lines = ["hello\n"]; }); it('waits until another line has been memorized', function(done) { var self = this; var finished; this.reader.readLine(function(line) { line.should.eql("hello\n"); self.reader.readLine(function(line2) { if (!finished) { finished = true; line2.should.eql("world\n"); done(); } }); setTimeout(function() { if (!finished) { finished = true; self.stream.emit('data', "world\n"); done(); } }, 50); }); }); it('resumes the stream', function(done) { var self = this; var finished; this.reader.readLine(function(line) { line.should.eql("hello\n"); self.reader.readLine(function(line2) { if (!finished) { finished = true; assert.fail("never reached"); } }); process.nextTick(function() { if (!finished) { finished = true; self.stream.paused.should.be.false; self.reader.paused.should.be.false; done(); } }); }); }); }); }); describe('if there is no line in memory', function() { it('waits until a line has been memorized', function(done) { var state = 'waiting'; var self = this; this.reader.readLine(function(line) { state.should.eql('line fed'); line.should.eql("hello\n"); done(); }); setTimeout(function() { state.should.eql('waiting'); state = 'line fed'; self.stream.emit('data', "hello\n"); }, 50); }); describe('if the stream had already reached EOF', function(done) { beforeEach(function() { this.reader.eof = true; }) it('yields undefined', function() { this.reader.readLine(function(line) { should(line).equal(undefined); }); }); }); }); }); }); passenger-4.0.37/test/node/spec_helper.js000644 000765 000024 00000002730 12233035540 020751 0ustar00honglistaff000000 000000 var util = require('util'); var EventEmitter = require('events').EventEmitter; var assert = require('assert'); require('should'); function FakeStream() { EventEmitter.call(this); this.paused = false; this.connection = {}; } util.inherits(FakeStream, EventEmitter); FakeStream.prototype.resume = function() { this.paused = false; this.flowing = true; } FakeStream.prototype.pause = function() { this.paused = true; this.flowing = false; } FakeStream.prototype.on = function(event, listener) { EventEmitter.prototype.on.call(this, event, listener); // If listening to data, and it has not explicitly been paused, // then call resume to start the flow of data. if (event == 'data' && this.flowing !== false) { this.resume(); } } exports.FakeStream = FakeStream; var Helper = { eventually: function(timeout, check, done) { var startTime = new Date(); var id = setInterval(function() { if (check()) { clearInterval(id); done(); } else if (new Date() - startTime > timeout) { clearInterval(id); assert.fail("Something which should eventually happen never happened"); } }, 10); }, shouldNeverHappen: function(timeout, check, done) { var startTime = new Date(); var id = setInterval(function() { if (check()) { clearInterval(id); assert.fail("Something which should never happen, happened anyway"); } else if (new Date() - startTime > timeout) { clearInterval(id); done(); } }, 10); } }; exports.Helper = Helper; passenger-4.0.37/test/integration_tests/apache2_tests.rb000644 000765 000024 00000036163 12233035540 024023 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + "/spec_helper") require 'socket' require 'fileutils' require 'support/apache2_controller' PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'admin_tools' PhusionPassenger.require_passenger_lib 'admin_tools/server_instance' require 'integration_tests/shared/example_webapp_tests' # TODO: test the 'PassengerUserSwitching' and 'PassengerDefaultUser' option. # TODO: test custom page caching directory describe "Apache 2 module" do before :all do check_hosts_configuration @passenger_temp_dir = "/tmp/passenger-test.#{$$}" Dir.mkdir(@passenger_temp_dir) ENV['PASSENGER_TEMP_DIR'] = @passenger_temp_dir end after :all do @apache2.stop if @apache2 FileUtils.chmod_R(0777, @passenger_temp_dir) FileUtils.rm_rf(@passenger_temp_dir) end before :each do File.open("test.log", "a") do |f| # Make sure that all Apache log output is prepended by the test description # so that we know which messages are associated with which tests. f.puts "\n#### #{Time.now}: #{example.full_description}" end end def create_apache2_controller @apache2 = Apache2Controller.new @apache2.set(:passenger_temp_dir => @passenger_temp_dir) if Process.uid == 0 @apache2.set( :www_user => CONFIG['normal_user_1'], :www_group => Etc.getgrgid(Etc.getpwnam(CONFIG['normal_user_1']).gid).name ) end end describe "a Ruby app running on the root URI" do before :all do create_apache2_controller @server = "http://1.passenger.test:#{@apache2.port}" @stub = RackStub.new('rack') @apache2 << "RailsMaxPoolSize 1" @apache2.set_vhost("1.passenger.test", "#{@stub.full_app_root}/public") @apache2.start end after :all do @stub.destroy @apache2.stop if @apache2 end before :each do @stub.reset end it_should_behave_like "an example web app" end describe "a Ruby app running in a sub-URI" do before :all do create_apache2_controller @server = "http://1.passenger.test:#{@apache2.port}/subapp" @stub = RackStub.new('rack') @apache2 << "RailsMaxPoolSize 1" @apache2.set_vhost("1.passenger.test", File.expand_path("stub")) do |vhost| vhost << %Q{ Alias /subapp #{@stub.full_app_root}/public PassengerBaseURI /subapp PassengerAppRoot #{@stub.full_app_root} } end @apache2.start end after :all do @stub.destroy @apache2.stop if @apache2 end before :each do @stub.reset end it_should_behave_like "an example web app" it "does not interfere with the root website" do @server = "http://1.passenger.test:#{@apache2.port}" get('/').should == "This is the stub directory." end end describe "a Python app running on the root URI" do before :all do create_apache2_controller @server = "http://1.passenger.test:#{@apache2.port}" @stub = PythonStub.new('wsgi') @apache2 << "RailsMaxPoolSize 1" @apache2.set_vhost("1.passenger.test", "#{@stub.full_app_root}/public") @apache2.start end after :all do @stub.destroy @apache2.stop if @apache2 end before :each do @stub.reset end it_should_behave_like "an example web app" end describe "a Python app running in a sub-URI" do before :all do create_apache2_controller @server = "http://1.passenger.test:#{@apache2.port}/subapp" @stub = PythonStub.new('wsgi') @apache2 << "RailsMaxPoolSize 1" @apache2.set_vhost("1.passenger.test", File.expand_path("stub")) do |vhost| vhost << %Q{ Alias /subapp #{@stub.full_app_root}/public PassengerBaseURI /subapp PassengerAppRoot #{@stub.full_app_root} } end @apache2.start end after :all do @stub.destroy @apache2.stop if @apache2 end before :each do @stub.reset end it_should_behave_like "an example web app" it "does not interfere with the root website" do @server = "http://1.passenger.test:#{@apache2.port}" get('/').should == "This is the stub directory." end end describe "a Node.js app running on the root URI" do before :all do create_apache2_controller @server = "http://1.passenger.test:#{@apache2.port}" @stub = NodejsStub.new('node') @apache2 << "RailsMaxPoolSize 1" @apache2.set_vhost("1.passenger.test", "#{@stub.full_app_root}/public") @apache2.start end after :all do @stub.destroy @apache2.stop if @apache2 end before :each do @stub.reset end it_should_behave_like "an example web app" end describe "a Node.js app running in a sub-URI" do before :all do create_apache2_controller @server = "http://1.passenger.test:#{@apache2.port}/subapp" @stub = NodejsStub.new('node') @apache2 << "RailsMaxPoolSize 1" @apache2.set_vhost("1.passenger.test", File.expand_path("stub")) do |vhost| vhost << %Q{ Alias /subapp #{@stub.full_app_root}/public PassengerBaseURI /subapp PassengerAppRoot #{@stub.full_app_root} } end @apache2.start end after :all do @stub.destroy @apache2.stop if @apache2 end before :each do @stub.reset end it_should_behave_like "an example web app" it "does not interfere with the root website" do @server = "http://1.passenger.test:#{@apache2.port}" get('/').should == "This is the stub directory." end end describe "compatibility with other modules" do before :all do create_apache2_controller @apache2 << "RailsMaxPoolSize 1" @stub = RackStub.new('rack') @server = "http://1.passenger.test:#{@apache2.port}" @apache2 << "RailsMaxPoolSize 1" @apache2.set_vhost("1.passenger.test", "#{@stub.full_app_root}/public") do |vhost| vhost << "RewriteEngine on" vhost << "RewriteRule ^/rewritten_frontpage$ / [PT,QSA,L]" vhost << "RewriteRule ^/rewritten_env$ /env [PT,QSA,L]" end @apache2.start end after :all do @stub.destroy @apache2.stop if @apache2 end before :each do @stub.reset end it "supports environment variable passing through mod_env" do File.write("#{@stub.app_root}/public/.htaccess", 'SetEnv FOO "Foo Bar!"') File.touch("#{@stub.app_root}/tmp/restart.txt", 2) # Activate ENV changes. get('/env').should =~ /^FOO = Foo Bar\!$/ end it "supports mod_rewrite in the virtual host block" do get('/rewritten_frontpage').should == "front page" cgi_envs = get('/rewritten_env?foo=bar+baz') cgi_envs.should include("REQUEST_URI = /env?foo=bar+baz\n") cgi_envs.should include("PATH_INFO = /env\n") end it "supports mod_rewrite in .htaccess" do File.write("#{@stub.app_root}/public/.htaccess", %Q{ RewriteEngine on RewriteRule ^htaccess_frontpage$ / [PT,QSA,L] RewriteRule ^htaccess_env$ env [PT,QSA,L] }) get('/htaccess_frontpage').should == "front page" cgi_envs = get('/htaccess_env?foo=bar+baz') cgi_envs.should include("REQUEST_URI = /env?foo=bar+baz\n") cgi_envs.should include("PATH_INFO = /env\n") end end describe "configuration options" do before :all do create_apache2_controller @apache2 << "PassengerMaxPoolSize 3" @mycook = ClassicRailsStub.new('rails2.3-mycook') @mycook_url_root = "http://1.passenger.test:#{@apache2.port}" @apache2.set_vhost('1.passenger.test', "#{@mycook.full_app_root}/public") do |vhost| vhost << "AllowEncodedSlashes on" end @foobar = ClassicRailsStub.new('rails2.3') @foobar_url_root = "http://3.passenger.test:#{@apache2.port}" @apache2.set_vhost('3.passenger.test', "#{@foobar.full_app_root}/public") do |vhost| vhost << "RailsEnv development" vhost << "PassengerSpawnMethod conservative" vhost << "PassengerRestartDir #{@foobar.full_app_root}/public" end @mycook2 = ClassicRailsStub.new('rails2.3-mycook') @mycook2_url_root = "http://4.passenger.test:#{@apache2.port}" @apache2.set_vhost('4.passenger.test', "#{@mycook2.full_app_root}/sites/some.site/public") do |vhost| vhost << "PassengerAppRoot #{@mycook2.full_app_root}" end @apache2.start end after :all do @mycook.destroy @foobar.destroy @mycook2.destroy @apache2.stop if @apache2 end before :each do @mycook.reset @foobar.reset @mycook2.reset end specify "RailsEnv is per-virtual host" do @server = @mycook_url_root get('/welcome/rails_env').should == "production" @server = @foobar_url_root get('/foo/rails_env').should == "development" end it "looks for restart.txt in the directory specified by PassengerRestartDir" do @server = @foobar_url_root controller = "#{@foobar.app_root}/app/controllers/bar_controller.rb" restart_file = "#{@foobar.app_root}/public/restart.txt" File.write(controller, %Q{ class BarController < ApplicationController def index render :text => 'hello world' end end }) now = Time.now File.touch(restart_file, now - 5) get('/bar').should == "hello world" File.write(controller, %Q{ class BarController < ApplicationController def index render :text => 'oh hai' end end }) File.touch(restart_file, now - 10) get('/bar').should == "oh hai" end describe "PassengerAppRoot" do before :each do @server = @mycook2_url_root end it "supports page caching on non-index URIs" do get('/welcome/cached.html').should =~ %r{This is the cached version of some.site/public/welcome/cached} end it "supports page caching on index URIs" do get('/uploads.html').should =~ %r{This is the cached version of some.site/public/uploads} end it "works as a rails application" do result = get('/welcome/parameters_test?hello=world&recipe[name]=Green+Bananas') result.should =~ %r{world} result.should =~ %r{} result.should =~ %r{Green Bananas} end end specify "it resolves symlinks in the document root if PassengerResolveSymlinksInDocumentRoot is set" do orig_mycook_app_root = @mycook.app_root @mycook.move(File.expand_path('tmp.mycook.symlinktest')) FileUtils.mkdir_p(orig_mycook_app_root) File.symlink("#{@mycook.app_root}/public", "#{orig_mycook_app_root}/public") begin File.write("#{@mycook.app_root}/public/.htaccess", "PassengerResolveSymlinksInDocumentRoot on") @server = @mycook_url_root get('/').should =~ /Welcome to MyCook/ ensure FileUtils.rm_rf(orig_mycook_app_root) @mycook.move(orig_mycook_app_root) end end it "supports encoded slashes in the URL if AllowEncodedSlashes is turned on" do @server = @mycook_url_root File.write("#{@mycook.app_root}/public/.htaccess", "PassengerAllowEncodedSlashes on") get('/welcome/show_id/foo%2fbar').should == 'foo/bar' end #################################### end describe "error handling" do before :all do create_apache2_controller FileUtils.rm_rf('tmp.webdir') FileUtils.mkdir_p('tmp.webdir') @webdir = File.expand_path('tmp.webdir') @apache2.set_vhost('1.passenger.test', @webdir) do |vhost| vhost << "RailsBaseURI /app-with-nonexistant-rails-version/public" vhost << "RailsBaseURI /app-that-crashes-during-startup/public" end @mycook = ClassicRailsStub.new('rails2.3-mycook') @mycook_url_root = "http://2.passenger.test:#{@apache2.port}" @apache2.set_vhost('2.passenger.test', "#{@mycook.full_app_root}/public") @apache2.start end after :all do FileUtils.rm_rf('tmp.webdir') @mycook.destroy @apache2.stop if @apache2 end before :each do @server = "http://1.passenger.test:#{@apache2.port}" @error_page_signature = // @mycook.reset end it "displays an error page if the Rails application requires a nonexistant Rails version" do ClassicRailsStub.use('rails2.3', "#{@webdir}/app-with-nonexistant-rails-version") do |stub| File.write(stub.environment_rb) do |content| content.sub(/^RAILS_GEM_VERSION = .*$/, "RAILS_GEM_VERSION = '1.9.1234'") end get("/app-with-nonexistant-rails-version/public").should =~ @error_page_signature end end it "displays an error page if the Rails application crashes during startup" do ClassicRailsStub.use('rails2.3', "#{@webdir}/app-that-crashes-during-startup") do |stub| File.prepend(stub.environment_rb, "raise 'app crash'") result = get("/app-that-crashes-during-startup/public") result.should =~ @error_page_signature result.should =~ /app crash/ end end it "displays an error if a filesystem permission error was encountered while autodetecting the application type" do @server = @mycook_url_root # This test used to fail because we were improperly blocking mod_autoindex, # resulting in it displaying a directory index before we could display an # error message. File.chmod(0000, "#{@mycook.app_root}/config") # Don't let mod_rewrite kick in so that mod_autoindex has a chance to run. File.unlink("#{@mycook.app_root}/public/.htaccess") get('/').should =~ /Please fix the relevant file permissions/ end it "doesn't display a Ruby spawn error page if PassengerFriendlyErrorPages is off" do ClassicRailsStub.use('rails2.3', "#{@webdir}/app-that-crashes-during-startup") do |stub| File.write("#{stub.app_root}/public/.htaccess", "PassengerFriendlyErrorPages off") File.prepend(stub.environment_rb, "raise 'app crash'") result = get("/app-that-crashes-during-startup/public") result.should_not =~ @error_page_signature result.should_not =~ /app crash/ end end end describe "HelperAgent" do AdminTools = PhusionPassenger::AdminTools before :all do create_apache2_controller @mycook = ClassicRailsStub.new('rails2.3-mycook') @mycook_url_root = "http://1.passenger.test:#{@apache2.port}" @apache2.set_vhost('1.passenger.test', "#{@mycook.full_app_root}/public") @apache2.start @server = "http://1.passenger.test:#{@apache2.port}" end after :all do @mycook.destroy @apache2.stop if @apache2 end before :each do @mycook.reset end it "is restarted if it crashes" do # Make sure that all Apache worker processes have connected to # the helper server. 10.times do get('/welcome').should =~ /Welcome to MyCook/ sleep 0.1 end # Now kill the helper server. instance = AdminTools::ServerInstance.list.first Process.kill('SIGKILL', instance.helper_agent_pid) sleep 0.02 # Give the signal a small amount of time to take effect. # Each worker process should detect that the old # helper server has died, and should reconnect. 10.times do get('/welcome').should =~ /Welcome to MyCook/ sleep 0.1 end end it "exposes the application pool for passenger-status" do File.touch("#{@mycook.app_root}/tmp/restart.txt", 1) # Get rid of all previous app processes. get('/welcome').should =~ /Welcome to MyCook/ instance = AdminTools::ServerInstance.list.first # Wait until the server has processed the session close event. sleep 0.1 processes = instance.connect(:role => :passenger_status) do |client| instance.processes(client) end processes.should have(1).item processes[0].group.name.should == @mycook.full_app_root + "#default" processes[0].processed.should == 1 end end ##### Helper methods ##### def start_web_server_if_necessary if !@apache2.running? @apache2.start end end end passenger-4.0.37/test/integration_tests/downloaded_binaries_tests.rb000644 000765 000024 00000012412 12233035540 026503 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # These tests are run by passenger_autobuilder, right after it has built binaries. # passenger_autobuilder populates the download_cache directory and runs this test script. source_root = File.expand_path("../..", File.dirname(__FILE__)) $LOAD_PATH.unshift("#{source_root}/lib") require 'phusion_passenger' PhusionPassenger.locate_directories PhusionPassenger.require_passenger_lib 'platform_info/operating_system' PhusionPassenger.require_passenger_lib 'platform_info/binary_compatibility' require 'tmpdir' require 'fileutils' require 'webrick' require 'open-uri' ENV['PATH'] = "#{PhusionPassenger.bin_dir}:#{ENV['PATH']}" # This environment variable changes Passenger Standalone's behavior, # so ensure that it's not set. ENV.delete('PASSENGER_DEBUG') module PhusionPassenger describe "Downloaded Phusion Passenger binaries" do before :each do @temp_dir = Dir.mktmpdir File.open("#{PhusionPassenger.resources_dir}/release.txt", "w").close end after :each do FileUtils.remove_entry_secure(@temp_dir) File.unlink("#{PhusionPassenger.resources_dir}/release.txt") end let(:version) { VERSION_STRING } let(:nginx_version) { PREFERRED_NGINX_VERSION } let(:compat_id) { PlatformInfo.cxx_binary_compatibility_id } def sh(*command) if !system(*command) abort "Command failed: #{command.join(' ')}" end end def start_server(document_root) server = WEBrick::HTTPServer.new(:BindAddress => '127.0.0.1', :Port => 0, :DocumentRoot => document_root, :Logger => WEBrick::Log.new("/dev/null"), :AccessLog => []) Thread.new do Thread.current.abort_on_exception = true server.start end [server, "http://127.0.0.1:#{server.config[:Port]}"] end specify "Passenger Standalone is able to use the binaries" do Dir.mkdir("#{@temp_dir}/#{version}") Dir.chdir("#{@temp_dir}/#{version}") do tarballs = Dir["#{PhusionPassenger.download_cache_dir}/*.tar.gz"] tarballs.should_not be_empty File.open("config.ru", "w") do |f| f.write(%Q{ app = lambda do |env| [200, { "Content-Type" => "text/plain" }, ["ok"]] end run app }) end Dir.mkdir("public") Dir.mkdir("tmp") Dir.mkdir("log") begin sh("passenger start " + "-p 4000 " + "-d " + "--no-compile-runtime " + "--binaries-url-root http://127.0.0.1:4001 " + "--runtime-dir '#{@temp_dir}' >log/start.log") rescue Exception system("cat log/start.log") raise end begin open("http://127.0.0.1:4000/") do |f| f.read.should == "ok" end rescue system("cat log/passenger.4000.log") raise ensure sh "passenger stop -p 4000" end end end specify "helper-scripts/download_binaries/extconf.rb succeeds in downloading all necessary binaries" do FileUtils.mkdir_p("server_root") server, url_root = start_server("server_root") File.rename("download_cache", "download_cache.old") begin FileUtils.cp_r("download_cache.old", "server_root/#{VERSION_STRING}") sh "cd #{PhusionPassenger.source_root} && " + "env BINARIES_URL_ROOT=#{url_root} " + "ruby helper-scripts/download_binaries/extconf.rb --abort-on-error" Dir["download_cache/*"].should_not be_empty ensure File.unlink("Makefile") rescue nil FileUtils.rm_rf("download_cache") FileUtils.rm_rf("server_root") File.rename("download_cache.old", "download_cache") server.stop end end if PlatformInfo.os_name == "linux" specify "helper-scripts/download_binaries/extconf.rb fails at downloading all necessary binaries if one of them does not exist" do FileUtils.mkdir_p("server_root") server, url_root = start_server("server_root") File.rename("download_cache", "download_cache.old") begin result = system "cd #{PhusionPassenger.source_root} && " + "env BINARIES_URL_ROOT=#{url_root} " + "ruby helper-scripts/download_binaries/extconf.rb --abort-on-error" result.should be_false ensure File.unlink("Makefile") rescue nil FileUtils.rm_rf("download_cache") FileUtils.rm_rf("server_root") File.rename("download_cache.old", "download_cache") server.stop end end end end # module PhusionPassenger passenger-4.0.37/test/integration_tests/native_packaging_spec.rb000644 000765 000024 00000026730 12233035540 025601 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. LOCATIONS_INI = ENV['LOCATIONS_INI'] abort "Please set the LOCATIONS_INI environment variable to the right locations.ini" if !LOCATIONS_INI NATIVE_PACKAGING_METHOD = ENV['NATIVE_PACKAGING_METHOD'] if !["deb", "rpm", "homebrew"].include?(NATIVE_PACKAGING_METHOD) abort "Please set NATIVE_PACKAGING_METHOD to either 'deb', 'rpm' or 'homebrew'" end source_root = File.expand_path("../..", File.dirname(__FILE__)) $LOAD_PATH.unshift("#{source_root}/lib") require 'phusion_passenger' PhusionPassenger.locate_directories PhusionPassenger.require_passenger_lib 'config/validate_install_command' require 'tmpdir' require 'fileutils' require 'open-uri' require 'pathname' # Ensure that the natively installed tools are in PATH. ENV['PATH'] = "/usr/bin:/usr/sbin:#{ENV['PATH']}" # Force Rake to redirect stderr to stdout so that we can capture all output. ENV['STDERR_TO_STDOUT'] = '1' module PhusionPassenger case NATIVE_PACKAGING_METHOD when "deb" BINDIR = "/usr/bin" SBINDIR = "/usr/sbin" INCLUDEDIR = "/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/include" NGINX_ADDON_DIR = "/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/ngx_http_passenger_module" DOCDIR = "/usr/share/doc/passenger" HELPER_SCRIPTS_DIR = "/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/helper-scripts" RUBY_EXTENSION_SOURCE_DIR = "/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/ruby_extension_source" AGENTS_DIR = "/usr/lib/#{GLOBAL_NAMESPACE_DIRNAME}/agents" APACHE2_MODULE_PATH = "/usr/lib/apache2/modules/mod_passenger.so" SUPPORTS_COMPILING_APACHE_MODULE = false APXS2 = "/usr/bin/apxs2" APACHE2 = "/usr/sbin/apache2" APACHE2CTL = "/usr/sbin/apache2ctl" APACHE_CONFIG_FILE = "/etc/apache2/apache2.conf" APACHE_ERROR_LOG = "/var/log/apache2/error.log" when "rpm" BINDIR = "/usr/bin" SBINDIR = "/usr/sbin" INCLUDEDIR = "/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/include" NGINX_ADDON_DIR = "/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/ngx_http_passenger_module" DOCDIR = "/usr/share/doc/passenger" HELPER_SCRIPTS_DIR = "/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/helper-scripts" RUBY_EXTENSION_SOURCE_DIR = "/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/ruby_extension_source" AGENTS_DIR = "/usr/lib64/#{GLOBAL_NAMESPACE_DIRNAME}/agents" APACHE2_MODULE_PATH = "/usr/lib64/httpd/modules/mod_passenger.so" SUPPORTS_COMPILING_APACHE_MODULE = false APXS2 = "/usr/sbin/apxs" APACHE2 = "/usr/sbin/httpd" APACHE2CTL = "/usr/sbin/apachectl" APACHE_CONFIG_FILE = "/etc/httpd/conf/httpd.conf" APACHE_ERROR_LOG = "/etc/httpd/logs/error_log" when "homebrew" # Ensure that the Homebrew-installed Phusion Passenger is the first in PATH. ENV['PATH'] = "/usr/local/bin:#{ENV['PATH']}" root = "/usr/local/Cellar/passenger/#{VERSION_STRING}/libexec" BINDIR = "#{root}/bin" SBINDIR = BINDIR INCLUDEDIR = "#{root}/ext" NGINX_ADDON_DIR = "#{root}/ext/nginx" DOCDIR = "#{root}/doc" HELPER_SCRIPTS_DIR = "#{root}/helper-scripts" RUBY_EXTENSION_SOURCE_DIR = "#{root}/ext/ruby" AGENTS_DIR = "#{root}/buildout/agents" APACHE2_MODULE_PATH = "#{root}/buildout/apache2/mod_passenger.so" SUPPORTS_COMPILING_APACHE_MODULE = true APXS2 = "/usr/sbin/apxs" APACHE2 = "/usr/sbin/httpd" APACHE2CTL = "/usr/sbin/apachectl" APACHE_CONFIG_FILE = "/private/etc/apache2/httpd.conf" APACHE_ERROR_LOG = "/private/var/log/apache2/error_log" end describe "A natively packaged Phusion Passenger" do def capture_output(command) output = `#{command}`.strip if $?.exitstatus == 0 return output else abort "Command #{command} exited with status #{$?.exitstatus}" end end def which(command) return capture_output("which #{command}") end def realpath(path) Pathname.new(path).realpath.to_s end def sh(*command) if !system(*command) abort "Command failed: #{command.join(' ')}" end end def install_apache2_module orig_mtime = File.stat(APACHE2_MODULE_PATH).mtime output = capture_output("passenger-install-apache2-module --auto 2>&1") output.should include("Almost there!") output.should include("LoadModule passenger_module #{APACHE2_MODULE_PATH}\n") output.should include("PassengerRoot #{LOCATIONS_INI}\n") File.stat(APACHE2_MODULE_PATH).mtime.should_not == orig_mtime end def install_nginx_module Dir.mktmpdir do |path| output = capture_output("passenger-install-nginx-module --auto --prefix=#{path} --auto-download 2>&1") output.should include("passenger_root #{LOCATIONS_INI};") File.exist?("#{path}/sbin/nginx").should be_true end end specify "locations.ini only refers to existent filesystem locations" do File.read(LOCATIONS_INI).split("\n").each do |line| if line =~ /=/ name, filename = line.split('=', 2) if filename =~ /^\// && !File.exist?(filename) raise "#{filename} does not exist" end end end end specify "locations.ini sets native_packaging_method to #{NATIVE_PACKAGING_METHOD}" do File.read(LOCATIONS_INI).should =~ /^native_packaging_method=#{NATIVE_PACKAGING_METHOD}$/ end specify "passenger-status is in #{SBINDIR}" do realpath(which("passenger-status")).should == "#{SBINDIR}/passenger-status" end specify "the Nginx runtime library headers exist" do File.directory?(INCLUDEDIR).should be_true Dir["#{INCLUDEDIR}/common/*.h"].should_not be_empty end specify "the Nginx addon directory exists" do File.directory?(NGINX_ADDON_DIR).should be_true File.file?("#{NGINX_ADDON_DIR}/ngx_http_passenger_module.c") end specify "the documentation directory exists" do File.directory?(DOCDIR).should be_true File.file?("#{DOCDIR}/Users guide Apache.html").should be_true end specify "the helper-scripts directory exists" do File.directory?(HELPER_SCRIPTS_DIR).should be_true File.file?("#{HELPER_SCRIPTS_DIR}/rack-loader.rb").should be_true end specify "the Ruby extension source directory exists" do File.directory?(RUBY_EXTENSION_SOURCE_DIR).should be_true File.file?("#{RUBY_EXTENSION_SOURCE_DIR}/extconf.rb").should be_true end specify "the agents directory exists" do File.directory?(AGENTS_DIR).should be_true File.file?("#{AGENTS_DIR}/PassengerWatchdog").should be_true File.executable?("#{AGENTS_DIR}/PassengerWatchdog").should be_true end specify "the Apache 2 module exists" do File.file?(APACHE2_MODULE_PATH).should be_true end describe "passenger-config" do it "passenger-config is in #{BINDIR}" do realpath(which("passenger-config")).should == "#{BINDIR}/passenger-config" end it "shows the path to locations.ini" do capture_output("passenger-config --root").should == LOCATIONS_INI end it "recognizes the runtime libraries as compiled" do system("passenger-config --compiled").should be_true end it "recognizes the install as natively packaged" do system("passenger-config --natively-packaged").should be_true end it "recognizes the install as coming from an official package" do system("passenger-config --installed-from-release-package").should be_true end it "recognizes the system's Apache" do output = capture_output("passenger-config --detect-apache2") output.gsub!(/.*Final autodetection results\n/m, '') output.scan(/\* Found Apache .*\!/).size.should == 1 output.should include("apxs2 : #{APXS2}\n") output.should include("Main executable: #{APACHE2}\n") output.should include("Control command: #{APACHE2CTL}\n") output.should include("Config file : #{APACHE_CONFIG_FILE}\n") output.should include("Error log file : #{APACHE_ERROR_LOG}\n") output.should include(%Q{ To start, stop or restart this specific Apache version: #{APACHE2CTL} start #{APACHE2CTL} stop #{APACHE2CTL} restart}) output.should include(%Q{ To troubleshoot, please read the logs in this file: #{APACHE_ERROR_LOG}}) end it "shows the directory to the runtime library headers" do capture_output("passenger-config --includedir").should == INCLUDEDIR end it "shows the directory to the Nginx addon" do capture_output("passenger-config --nginx-addon-dir").should == NGINX_ADDON_DIR end it "shows the Nginx runtime libraries" do libs = capture_output("passenger-config --nginx-libs").split(" ") libs.should_not be_empty libs.each do |lib| File.file?(lib).should be_true end end it "validates the install as working" do system("passenger-config validate-install >/dev/null 2>/dev/null") [0, Config::ValidateInstallCommand::WARN_EXIT_CODE].should include($?.exitstatus) end end describe "passenger-memory-stats" do it "is in #{SBINDIR}" do realpath(which("passenger-memory-stats")).should == "#{SBINDIR}/passenger-memory-stats" end it "works" do capture_output("passenger-memory-stats").should =~ /Passenger processes/ end end describe "passenger-install-apache2-module" do it "is in #{BINDIR}" do realpath(which("passenger-install-apache2-module")).should == "#{BINDIR}/passenger-install-apache2-module" end if SUPPORTS_COMPILING_APACHE_MODULE it "is able to compile the Apache module and doesn't break passenger-install-nginx-module" do install_apache2_module install_nginx_module end else it "checks whether the Apache module is installed" do output = capture_output("passenger-install-apache2-module --auto 2>&1") output.should =~ /Apache module is correctly installed/ end end end describe "passenger-install-nginx-module" do it "is in #{BINDIR}" do realpath(which("passenger-install-nginx-module")).should == "#{BINDIR}/passenger-install-nginx-module" end if SUPPORTS_COMPILING_APACHE_MODULE it "is able to compile Nginx and doesn't break passenger-install-apache2-module" do install_nginx_module install_apache2_module end else it "is able to compile Nginx" do install_nginx_module end end end describe "Passenger Standalone" do it "is in #{BINDIR}" do realpath(which("passenger")).should == "#{BINDIR}/passenger" end it "works" do Dir.mktmpdir do |dir| File.chmod(0755, dir) Dir.chdir(dir) do File.open("config.ru", "w") do |f| f.write(%Q{ app = lambda do |env| [200, { "Content-Type" => "text/plain" }, ["ok"]] end run app }) end Dir.mkdir("public") Dir.mkdir("tmp") sh("passenger start --no-compile-runtime -p 4000 -d >/dev/null") begin open("http://127.0.0.1:4000/") do |f| f.read.should == "ok" end ensure sh("passenger stop -p 4000") end end end end end end end # module PhusionPassenger passenger-4.0.37/test/integration_tests/nginx_tests.rb000644 000765 000024 00000023317 12233035540 023640 0ustar00honglistaff000000 000000 require File.expand_path(File.dirname(__FILE__) + "/spec_helper") require 'support/nginx_controller' require 'integration_tests/shared/example_webapp_tests' describe "Phusion Passenger for Nginx" do before :all do if !CONFIG['nginx'] STDERR.puts "*** ERROR: You must set the 'nginx' config option in test/config.json." exit!(1) end check_hosts_configuration FileUtils.mkdir_p("tmp.nginx") end after :all do begin @nginx.stop if @nginx ensure FileUtils.rm_rf("tmp.nginx") end end before :each do File.open("test.log", "a") do |f| # Make sure that all Nginx log output is prepended by the test description # so that we know which messages are associated with which tests. f.puts "\n#### #{Time.now}: #{example.full_description}" end end def create_nginx_controller(options = {}) @nginx = NginxController.new("tmp.nginx") if Process.uid == 0 @nginx.set({ :www_user => CONFIG['normal_user_1'], :www_group => Etc.getgrgid(Etc.getpwnam(CONFIG['normal_user_1']).gid).name }.merge(options)) end end describe "a Ruby app running on the root URI" do before :all do create_nginx_controller @server = "http://1.passenger.test:#{@nginx.port}" @stub = RackStub.new('rack') @nginx.add_server do |server| server[:server_name] = "1.passenger.test" server[:root] = "#{@stub.full_app_root}/public" end @nginx.start end after :all do @stub.destroy @nginx.stop if @nginx end before :each do @stub.reset end it_should_behave_like "an example web app" end describe "a Ruby app running in a sub-URI" do before :all do create_nginx_controller @server = "http://1.passenger.test:#{@nginx.port}/subapp" @stub = RackStub.new('rack') @nginx.add_server do |server| server[:server_name] = "1.passenger.test" server[:root] = "#{PhusionPassenger.source_root}/test/stub" server << %Q{ location ~ ^/subapp(/.*|$) { alias #{@stub.full_app_root}/public$1; passenger_base_uri /subapp; passenger_document_root #{@stub.full_app_root}/public; passenger_app_root #{@stub.full_app_root}; passenger_enabled on; } } end @nginx.start end after :all do @stub.destroy @nginx.stop if @nginx end before :each do @stub.reset end it_should_behave_like "an example web app" it "does not interfere with the root website" do @server = "http://1.passenger.test:#{@nginx.port}" get('/').should == "This is the stub directory." end end describe "a Python app running on the root URI" do before :all do create_nginx_controller @server = "http://1.passenger.test:#{@nginx.port}" @stub = PythonStub.new('wsgi') @nginx.add_server do |server| server[:server_name] = "1.passenger.test" server[:root] = "#{@stub.full_app_root}/public" end @nginx.start end after :all do @stub.destroy @nginx.stop if @nginx end before :each do @stub.reset end it_should_behave_like "an example web app" end describe "a Python app running in a sub-URI" do before :all do create_nginx_controller @server = "http://1.passenger.test:#{@nginx.port}/subapp" @stub = PythonStub.new('wsgi') @nginx.add_server do |server| server[:server_name] = "1.passenger.test" server[:root] = "#{PhusionPassenger.source_root}/test/stub" server << %Q{ location ~ ^/subapp(/.*|$) { alias #{@stub.full_app_root}/public$1; passenger_base_uri /subapp; passenger_app_root #{@stub.full_app_root}; passenger_document_root #{@stub.full_app_root}/public; passenger_enabled on; } } end @nginx.start end after :all do @stub.destroy @nginx.stop if @nginx end before :each do @stub.reset end it_should_behave_like "an example web app" it "does not interfere with the root website" do @server = "http://1.passenger.test:#{@nginx.port}" get('/').should == "This is the stub directory." end end describe "a Node.js app running on the root URI" do before :all do create_nginx_controller @server = "http://1.passenger.test:#{@nginx.port}" @stub = NodejsStub.new('node') @nginx.add_server do |server| server[:server_name] = "1.passenger.test" server[:root] = "#{@stub.full_app_root}/public" end @nginx.start end after :all do @stub.destroy @nginx.stop if @nginx end before :each do @stub.reset end it_should_behave_like "an example web app" end describe "a Node.js app running in a sub-URI" do before :all do create_nginx_controller @server = "http://1.passenger.test:#{@nginx.port}/subapp" @stub = NodejsStub.new('node') @nginx.add_server do |server| server[:server_name] = "1.passenger.test" server[:root] = "#{PhusionPassenger.source_root}/test/stub" server << %Q{ location ~ ^/subapp(/.*|$) { alias #{@stub.full_app_root}/public$1; passenger_base_uri /subapp; passenger_document_root #{@stub.full_app_root}/public; passenger_app_root #{@stub.full_app_root}; passenger_enabled on; } } end @nginx.start end after :all do @stub.destroy @nginx.stop if @nginx end before :each do @stub.reset end it_should_behave_like "an example web app" it "does not interfere with the root website" do @server = "http://1.passenger.test:#{@nginx.port}" get('/').should == "This is the stub directory." end end describe "various features" do before :all do create_nginx_controller @server = "http://1.passenger.test:#{@nginx.port}" @stub = RackStub.new('rack') @nginx.set(:passenger_load_shell_envvars => 'off') @nginx.add_server do |server| server[:server_name] = "1.passenger.test" server[:root] = "#{@stub.full_app_root}/public" server << %q{ location /crash_without_friendly_error_page { passenger_enabled on; passenger_friendly_error_pages off; } } end @nginx.add_server do |server| server[:server_name] = "2.passenger.test" server[:root] = "#{@stub.full_app_root}/public" server[:passenger_app_group_name] = "secondary" server[:passenger_show_version_in_header] = "off" end @nginx.add_server do |server| server[:server_name] = "3.passenger.test" server[:passenger_app_group_name] = "tertiary" server[:root] = "#{@stub.full_app_root}/public" server[:passenger_max_requests] = 3 end @nginx.start end after :all do @stub.destroy @nginx.stop if @nginx end before :each do @stub.reset @error_page_signature = // File.touch("#{@stub.app_root}/tmp/restart.txt", 1 + rand(100000)) end it "sets ENV['SERVER_SOFTWARE']" do File.write("#{@stub.app_root}/config.ru", %q{ server_software = ENV['SERVER_SOFTWARE'] app = lambda do |env| [200, { "Content-Type" => "text/plain" }, [server_software]] end run app }) get('/').should =~ /nginx/i end it "displays a friendly error page if the application fails to spawn" do File.write("#{@stub.app_root}/config.ru", %q{ raise "my error" }) data = get('/') data.should =~ /#{@error_page_signature}/ data.should =~ /my error/ end it "doesn't display a friendly error page if the application fails to spawn but passenger_friendly_error_pages is off" do File.write("#{@stub.app_root}/config.ru", %q{ raise "my error" }) data = get('/crash_without_friendly_error_page') data.should_not =~ /#{@error_page_signature}/ data.should_not =~ /my error/ end it "appends an X-Powered-By header containing the Phusion Passenger version number" do response = get_response('/') response["X-Powered-By"].should include("Phusion Passenger") response["X-Powered-By"].should include(PhusionPassenger::VERSION_STRING) end it "omits the version number in X-Powered-By when passenger_show_version_in_header is off" do @server = "http://2.passenger.test:#{@nginx.port}/" response = get_response('/') response["X-Powered-By"].should include("Phusion Passenger") response["X-Powered-By"].should_not include(PhusionPassenger::VERSION_STRING) end it "respawns the app after handling max_requests requests" do @server = "http://3.passenger.test:#{@nginx.port}/" pid = get("/pid") get("/pid").should == pid get("/pid").should == pid get("/pid").should_not == pid end end describe "oob work" do before :all do create_nginx_controller @server = "http://passenger.test:#{@nginx.port}" @stub = RackStub.new('rack') @nginx.set(:max_pool_size => 2) @nginx.add_server do |server| server[:server_name] = "passenger.test" server[:root] = "#{@stub.full_app_root}/public" end end after :all do @stub.destroy @nginx.stop if @nginx end before :each do @stub.reset File.write("#{@stub.app_root}/config.ru", <<-RUBY) PhusionPassenger.on_event(:oob_work) do f = File.open("#{@stub.full_app_root}/oob_work.\#{$$}", 'w') f.close sleep 1 end app = lambda do |env| if env['PATH_INFO'] == '/oobw' [200, { "Content-Type" => "text/html", "X-Passenger-Request-OOB-Work" => 'true' }, [$$]] else [200, { "Content-Type" => "text/html" }, [$$]] end end run app RUBY @nginx.start end it "invokes oobw when requested by the app process" do pid = get("/oobw") sleep 0.5 # wait for oobw callback to be invoked File.exists?("#{@stub.app_root}/oob_work.#{pid}").should == true end it "does not block client while invoking oob work" do get("/") # ensure there are spawned app processes t0 = Time.now get("/oobw") secs = Time.now - t0 secs.should <= 0.1 end end ##### Helper methods ##### def start_web_server_if_necessary if !@nginx.running? @nginx.start end end end passenger-4.0.37/test/integration_tests/shared/000755 000765 000024 00000000000 12233035540 022206 5ustar00honglistaff000000 000000 passenger-4.0.37/test/integration_tests/source_packaging_test.rb000644 000765 000024 00000013312 12233035540 025630 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. SOURCE_ROOT = File.expand_path("../..", File.dirname(__FILE__)) Dir.chdir(SOURCE_ROOT) $LOAD_PATH.unshift("#{SOURCE_ROOT}/lib") require 'phusion_passenger' PhusionPassenger.locate_directories PhusionPassenger.require_passenger_lib 'packaging' require 'rubygems' require 'tmpdir' require 'fileutils' require 'yaml' PACKAGE_NAME = PhusionPassenger::PACKAGE_NAME VERSION = PhusionPassenger::VERSION_STRING if RUBY_PLATFORM =~ /linux/ TAR = "tar --warning=none" else TAR = "tar" end def sh(*command) if !system(*command) abort "Command failed: #{command.join(' ')}" end end shared_examples_for "a proper package" do it "includes all files in the git repository" do git_files = `git ls-files`.split("\n") git_files.reject! { |filename| filename =~ /^Passenger.xcodeproj\// } git_files.delete("ext/libeio/eio.3") git_files.delete("ext/libeio/eio.pod") package_files = {} Dir.chdir(@pkg_contents_dir) do `find .`.split("\n").each do |filename| filename.sub!(/^.\//, '') if !File.directory?(filename) package_files[filename] = true end end end error = false git_files.each do |filename| if !package_files[filename] error = true puts "File \"#{filename}\" is not in the package" end end raise "Some files are not in the package" if error end it "includes documentation HTML files" do File.exist?("#{@pkg_contents_dir}/doc/Users guide Apache.html").should be_true File.exist?("#{@pkg_contents_dir}/doc/Users guide Nginx.html").should be_true File.exist?("#{@pkg_contents_dir}/doc/Users guide Standalone.html").should be_true end end shared_examples_for "a user-generated package" do it "isn't marked official" do File.exist?("#{@pkg_contents_dir}/resources/release.txt").should be_false end end shared_examples_for "an official package" do it "is marked official" do File.exist?("#{@pkg_contents_dir}/resources/release.txt").should be_true end end describe "A user-generated gem" do before :all do ENV['PKG_DIR'] = @temp_dir = Dir.mktmpdir basename = "#{PACKAGE_NAME}-#{VERSION}" @pkg_contents_dir = "#{@temp_dir}/#{basename}" Dir.chdir(SOURCE_ROOT) do sh "rake", *PhusionPassenger::Packaging::PREGENERATED_FILES sh "gem build #{PACKAGE_NAME}.gemspec" sh "mv #{PACKAGE_NAME}-#{VERSION}.gem #{@temp_dir}/" end Dir.chdir(@temp_dir) do sh "#{TAR} -xf #{basename}.gem" sh "mkdir #{basename}" sh "gunzip metadata.gz" Dir.chdir(basename) do sh "#{TAR} -xzf ../data.tar.gz" end end end after :all do ENV.delete('PKG_DIR') FileUtils.remove_entry_secure(@temp_dir) end it_behaves_like "a proper package" it_behaves_like "a user-generated package" it "doesn't invoke the binaries downloader upon gem installation" do spec = YAML.load_file("#{@temp_dir}/metadata") spec.extensions.should be_empty end end describe "A user-generated tarball" do before :all do ENV['PKG_DIR'] = @temp_dir = Dir.mktmpdir basename = "#{PACKAGE_NAME}-#{VERSION}" @pkg_contents_dir = "#{@temp_dir}/#{basename}" sh "rake package:tarball" Dir.chdir(@temp_dir) do sh "#{TAR} -xzf #{basename}.tar.gz" end end after :all do ENV.delete('PKG_DIR') FileUtils.remove_entry_secure(@temp_dir) end it_behaves_like "a proper package" it_behaves_like "a user-generated package" end describe "An officially-generated gem" do before :all do ENV['PKG_DIR'] = @temp_dir = Dir.mktmpdir basename = "#{PACKAGE_NAME}-#{VERSION}" @pkg_contents_dir = "#{@temp_dir}/#{basename}" Dir.chdir(SOURCE_ROOT) do sh "rake package:set_official package:gem SKIP_SIGNING=1" end Dir.chdir(@temp_dir) do sh "#{TAR} -xf #{basename}.gem" sh "mkdir #{basename}" sh "gunzip metadata.gz" Dir.chdir(basename) do sh "#{TAR} -xzf ../data.tar.gz" end end end after :all do ENV.delete('PKG_DIR') FileUtils.remove_entry_secure(@temp_dir) end it_behaves_like "a proper package" it_behaves_like "an official package" it "invokes the binaries downloader upon gem installation" do spec = YAML.load_file("#{@temp_dir}/metadata") spec.extensions.should_not be_empty end end describe "An officially-generated tarball" do before :all do ENV['PKG_DIR'] = @temp_dir = Dir.mktmpdir basename = "#{PACKAGE_NAME}-#{VERSION}" @pkg_contents_dir = "#{@temp_dir}/#{basename}" sh "rake package:set_official package:tarball" Dir.chdir(@temp_dir) do sh "#{TAR} -xzf #{basename}.tar.gz" end end after :all do ENV.delete('PKG_DIR') FileUtils.remove_entry_secure(@temp_dir) end it_behaves_like "a proper package" it_behaves_like "an official package" end passenger-4.0.37/test/integration_tests/spec_helper.rb000644 000765 000024 00000001067 12233035540 023562 0ustar00honglistaff000000 000000 source_root = File.expand_path(File.dirname(__FILE__) + "/../..") Dir.chdir("#{source_root}/test") require 'rubygems' require 'json' begin CONFIG = JSON.load(File.read('config.json')) rescue Errno::ENOENT STDERR.puts "*** You do not have the file test/config.json. " << "Please copy test/config.json.example to " << "test/config.json, and edit it." exit 1 end $LOAD_PATH.unshift("#{source_root}/lib") $LOAD_PATH.unshift("#{source_root}/test") require 'phusion_passenger' PhusionPassenger.locate_directories require 'support/test_helper' include TestHelper passenger-4.0.37/test/integration_tests/standalone_tests.rb000644 000765 000024 00000025531 12233035540 024645 0ustar00honglistaff000000 000000 source_root = File.expand_path("../..", File.dirname(__FILE__)) $LOAD_PATH.unshift("#{source_root}/lib") require 'phusion_passenger' PhusionPassenger.locate_directories PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'platform_info/binary_compatibility' require 'tmpdir' require 'fileutils' require 'webrick' require 'thread' require 'open-uri' ENV['PATH'] = "#{PhusionPassenger.bin_dir}:#{ENV['PATH']}" # This environment variable changes Passenger Standalone's behavior, # so ensure that it's not set. ENV.delete('PASSENGER_DEBUG') ENV['PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY'] = '0' ENV['PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY'] = '0' module PhusionPassenger describe "Passenger Standalone" do after :each do ENV.delete('PASSENGER_DEBUG') end let(:version) { PhusionPassenger::VERSION_STRING } let(:nginx_version) { PhusionPassenger::PREFERRED_NGINX_VERSION } let(:compat_id) { PhusionPassenger::PlatformInfo.cxx_binary_compatibility_id } def use_binaries_from_source_root! ENV['PASSENGER_DEBUG'] = '1' end def sh(*command) if !system(*command) abort "Command failed: #{command.join(' ')}" end end def capture_output(command) output = `#{command} 2>&1`.strip if $?.exitstatus == 0 return output else abort "Command #{command} exited with status #{$?.exitstatus}; output:\n#{output}" end end def start_server(document_root) server = WEBrick::HTTPServer.new(:BindAddress => '127.0.0.1', :Port => 0, :DocumentRoot => document_root, :Logger => WEBrick::Log.new("/dev/null"), :AccessLog => []) Thread.new do Thread.current.abort_on_exception = true server.start end [server, "http://127.0.0.1:#{server.config[:Port]}"] end def create_tarball(filename, contents = nil) filename = File.expand_path(filename) Dir.mktmpdir("tarball-") do |tarball_dir| Dir.chdir(tarball_dir) do if block_given? yield else contents.each do |content_name| create_file(content_name) end end sh "tar", "-czf", filename, "." end end end def create_dummy_support_binaries Dir.mkdir("agents") if !File.exist?("agents") ["PassengerWatchdog", "PassengerHelperAgent", "PassengerLoggingAgent"].each do |exe| File.open("agents/#{exe}", "w") do |f| f.puts "#!/bin/bash" f.puts "echo PASS" end File.chmod(0755, "agents/#{exe}") end end def create_dummy_nginx_binary File.open("PassengerWebHelper", "w") do |f| f.puts "#!/bin/bash" f.puts "echo nginx version: 1.0.0" end File.chmod(0755, "PassengerWebHelper") end def create_file(filename, contents = nil) File.open(filename, "wb") do |f| f.write(contents) if contents end end specify "invoking 'passenger' without an argument is equivalent to 'passenger help'" do output = capture_output("passenger") output.should == capture_output("passenger help") end specify "'passenger --help' is equivalent to 'passenger help'" do output = capture_output("passenger") output.should == capture_output("passenger help") end specify "'passenger --version' displays the version number" do output = capture_output("passenger --version") output.should include("version #{PhusionPassenger::VERSION_STRING}\n") end describe "start command" do SUPPORT_BINARIES_DOWNLOAD_MESSAGE = " --> Downloading #{PROGRAM_NAME} support binaries for your platform" NGINX_BINARY_DOWNLOAD_MESSAGE = "Downloading web helper for your platform" NGINX_SOURCE_DOWNLOAD_MESSAGE = "Downloading web helper source code..." COMPILING_MESSAGE = "Installing #{PROGRAM_NAME} Standalone..." def test_serving_application(passenger_command) Dir.chdir(@runtime_dir) do File.open("config.ru", "w") do |f| f.write(%Q{ app = lambda do |env| [200, { "Content-Type" => "text/plain" }, ["ok"]] end run app }) end Dir.mkdir("public") Dir.mkdir("tmp") sh("#{passenger_command} -p 4000 -d >/dev/null") begin open("http://127.0.0.1:4000/") do |f| f.read.should == "ok" end ensure sh("passenger stop -p 4000") end end end context "if the runtime is not installed" do before :each do @runtime_dir = Dir.mktmpdir @webroot = Dir.mktmpdir @server, @base_url = start_server(@webroot) Dir.mkdir("#{@webroot}/#{version}") Dir.chdir("#{@webroot}/#{version}") do create_tarball("webhelper-#{nginx_version}-#{compat_id}.tar.gz") do create_dummy_nginx_binary end create_tarball("support-#{compat_id}.tar.gz") do FileUtils.mkdir_p("agents") FileUtils.mkdir_p("common/libpassenger_common/ApplicationPool2") create_file("common/libboost_oxt.a") create_file("common/libpassenger_common/ApplicationPool2/Implementation.o") create_dummy_support_binaries end end create_file("#{PhusionPassenger.resources_dir}/release.txt") end after :each do @server.stop File.unlink("#{PhusionPassenger.resources_dir}/release.txt") FileUtils.remove_entry_secure(@webroot) FileUtils.remove_entry_secure(@runtime_dir) end context "when originally packaged" do it "downloads binaries from the Internet" do @output = capture_output("passenger start " + "--runtime-dir '#{@runtime_dir}' " + "--runtime-check-only " + "--binaries-url-root '#{@base_url}'") @output.should include(SUPPORT_BINARIES_DOWNLOAD_MESSAGE) @output.should include(NGINX_BINARY_DOWNLOAD_MESSAGE) @output.should_not include(NGINX_SOURCE_DOWNLOAD_MESSAGE) @output.should_not include(COMPILING_MESSAGE) end it "builds the runtime if downloading fails" do # Yes, we're testing the entire build system here. command = "passenger start " + "--runtime-dir '#{@runtime_dir}' " + "--binaries-url-root '#{@base_url}/wrong'" @output = capture_output("#{command} --runtime-check-only") @output.should include(SUPPORT_BINARIES_DOWNLOAD_MESSAGE) @output.should include(NGINX_BINARY_DOWNLOAD_MESSAGE) @output.should include(NGINX_SOURCE_DOWNLOAD_MESSAGE) @output.should include(COMPILING_MESSAGE) test_serving_application(command) end specify "if the downloaded support binaries work but the downloaded web helper binary doesn't, " + "and web helper compilation doesn't succeed the first time, then web helper compilation " + "succeeds the second time" do Dir.chdir("#{@webroot}/#{version}") do create_tarball("support-#{compat_id}.tar.gz") do FileUtils.cp_r(Dir["#{PhusionPassenger.source_root}/buildout/*"], ".") end create_tarball("webhelper-#{nginx_version}-#{compat_id}.tar.gz") do create_file("PassengerWebHelper", "#!/bin/sh\n" + "exit 1\n") end end # Temporarily make Passenger Standalone think our runtime is # not compiled. File.rename("#{PhusionPassenger.source_root}/buildout", "#{PhusionPassenger.source_root}/buildout.renamed") begin command = "passenger start " + "--runtime-dir '#{@runtime_dir}' " + "--binaries-url-root '#{@base_url}'" @output = `#{command} --runtime-check-only --no-compile-runtime 2>&1` $?.exitstatus.should_not == 0 @output.should include(SUPPORT_BINARIES_DOWNLOAD_MESSAGE) @output.should include("All good\n") @output.should include(NGINX_BINARY_DOWNLOAD_MESSAGE) @output.should include("Not usable, will compile from source") @output.should include("Refusing to compile the Phusion Passenger Standalone runtime") @output = capture_output("#{command} --runtime-check-only") @output.should include(NGINX_SOURCE_DOWNLOAD_MESSAGE) @output.should include(COMPILING_MESSAGE) File.exist?("#{PhusionPassenger.source_root}/buildout").should be_false test_serving_application("#{command} --no-compile-runtime") File.exist?("#{PhusionPassenger.source_root}/buildout").should be_false ensure FileUtils.rm_rf("#{PhusionPassenger.source_root}/buildout") File.rename("#{PhusionPassenger.source_root}/buildout.renamed", "#{PhusionPassenger.source_root}/buildout") end end it "starts a server which serves the application" do # The last test already tests this. This empty test here # is merely to show the intent of the tests, and to # speed up the test suite by preventing an unnecessary # compilation. end end context "when natively packaged" do before :each do sh "passenger-config --make-locations-ini --for-native-packaging-method=deb " + "> '#{@runtime_dir}/locations.ini'" ENV['PASSENGER_LOCATION_CONFIGURATION_FILE'] = "#{@runtime_dir}/locations.ini" create_file("#{PhusionPassenger.lib_dir}/PassengerWebHelper") end after :each do ENV.delete('PASSENGER_LOCATION_CONFIGURATION_FILE') File.unlink("#{PhusionPassenger.lib_dir}/PassengerWebHelper") end it "downloads only the Nginx binary from the Internet" do File.rename("#{@webroot}/#{version}/webhelper-#{nginx_version}-#{compat_id}.tar.gz", "#{@webroot}/#{version}/webhelper-0.0.1-#{compat_id}.tar.gz") @output = capture_output("passenger start " + "--runtime-dir '#{@runtime_dir}' " + "--runtime-check-only " + "--binaries-url-root '#{@base_url}' " + "--nginx-version 0.0.1") @output.should_not include(SUPPORT_BINARIES_DOWNLOAD_MESSAGE) @output.should include(NGINX_BINARY_DOWNLOAD_MESSAGE) @output.should_not include(NGINX_SOURCE_DOWNLOAD_MESSAGE) @output.should_not include(COMPILING_MESSAGE) end it "only builds Nginx if downloading fails" do # Yes, we're testing the build system here. command = "passenger start " + "--runtime-dir '#{@runtime_dir}' " + "--binaries-url-root '#{@base_url}' " + "--nginx-version 1.4.1" @output = capture_output("#{command} --runtime-check-only") @output.should_not include(SUPPORT_BINARIES_DOWNLOAD_MESSAGE) @output.should include(NGINX_BINARY_DOWNLOAD_MESSAGE) @output.should include(NGINX_SOURCE_DOWNLOAD_MESSAGE) @output.should include(COMPILING_MESSAGE) test_serving_application(command) end it "starts a server which serves the application" do # The last test already tests this. This empty test here # is merely to show the intent of the tests, and to # speed up the test suite by preventing an unnecessary # compilation. end end end context "if the runtime is installed" do it "doesn't download the runtime from the Internet" it "doesn't build the runtime" end it "daemonizes if -d is given" do # Earlier tests already test this. This empty test here # is merely to show the intent of the tests, and to # speed up the test suite by preventing an unnecessary # compilation. end end describe "help command" do it "displays the available commands" do capture_output("passenger help").should include("Available commands:") end end end end # module PhusionPassenger passenger-4.0.37/test/integration_tests/shared/example_webapp_tests.rb000644 000765 000024 00000016567 12233035540 026765 0ustar00honglistaff000000 000000 require 'socket' require 'fileutils' shared_examples_for "an example web app" do it "responds to GET requests for static asset" do FileUtils.cp('stub/garbage1.dat', @stub.full_app_root + "/public/garbage1.dat") get('/garbage1.dat').should == @stub.public_file('garbage1.dat') end it "supports page caching on file URIs" do File.write(@stub.full_app_root + "/public/cached.html", "This is the cached version of /cached") get('/cached').should == "This is the cached version of /cached" end it "supports page caching on directory URIs" do File.write(@stub.full_app_root + "/public/cached.html", "This is the cached version of /cached") Dir.mkdir(@stub.full_app_root + "/public/cached") get('/cached').should == "This is the cached version of /cached" end it "supports page caching on root/base URIs" do File.write(@stub.full_app_root + "/public/index.html", "This is index.html") get('/').should == "This is index.html" end it "doesn't use page caching if the HTTP request is not GET" do File.write(@stub.full_app_root + "/public/cached.html", "This is the cached version of /cached") post('/cached').should == "This is the uncached version of /cached" end it "responds to GET requests on dynamic pages" do get('/').should == "front page" end it "properly receives GET parameters" do result = get('/parameters?first=one&second=two') result.should == "Method: GET\n" + "First: one\n" + "Second: two\n" end it "responds to POST requests on dynamic pages" do result = post('/parameters', "first" => "one", "second" => "two" ) result.should == "Method: POST\n" + "First: one\n" + "Second: two\n" end it "properly handles file uploads" do static_file = File.open('stub/garbage1.dat', 'rb') params = { 'name1' => 'Kotonoha', 'name2' => 'Sekai', 'data' => static_file } begin # For some reason the WSGI stub app does not accept the multipart data generated by # post(), so we use curl instead. command = "curl --silent -F name1=Kotonoha -F name2=Sekai -F data=@stub/garbage1.dat #{@server}/upload_with_params" response = IO.popen(command, "rb") do |io| io.read end response.should == binary_string("name 1 = Kotonoha\n") << binary_string("name 2 = Sekai\n") << binary_string("data = ") << static_file.read ensure static_file.close end end it "properly handles POST requests with 'chunked' transfer encoding" do uri = URI.parse(@server) socket = TCPSocket.new(uri.host, uri.port) begin socket.write("POST #{base_uri}/raw_upload_to_file HTTP/1.1\r\n") socket.write("Host: #{uri.host}:#{uri.port}\r\n") socket.write("Transfer-Encoding: chunked\r\n") socket.write("Content-Type: text/plain\r\n") socket.write("Connection: close\r\n") socket.write("X-Output: output.txt\r\n") socket.write("\r\n") chunk = "foo=bar!" socket.write("%X\r\n%s\r\n" % [chunk.size, chunk]) socket.write("0\r\n\r\n") socket.flush socket.read.should =~ /\r\nok\Z/ ensure socket.close end File.read(@stub.full_app_root + "/output.txt").should == "foo=bar!" end it "supports responses with the 'chunked' transfer encoding" do get('/chunked').should == "chunk1\n" + "chunk2\n" + "chunk3\n" end it "supports custom headers in responses" do response = get_response('/extra_header') response["X-Foo"].should == "Bar" end it "sets the 'Status' header in responses" do response = get_response('/nonexistant') response["Status"].should == "404 Not Found" end specify "REQUEST_URI contains the request URI including query string" do cgi_envs = get('/env?foo=escaped%20string') cgi_envs.should include("REQUEST_URI = #{base_uri}/env?foo=escaped%20string\n") end specify "REQUEST_URI contains the original escaped URI" do cgi_envs = get('/env/%C3%BC?foo=escaped%20string') cgi_envs.downcase.should include("request_uri = #{base_uri}/env/%c3%bc?foo=escaped%20string\n") end specify "PATH_INFO contains the request URI without the base URI and without the query string" do cgi_envs = get('/env?foo=escaped%20string') cgi_envs.should include("PATH_INFO = /env\n") end specify "PATH_INFO contains the original escaped URI" do cgi_envs = get('/env/%C3%BC') cgi_envs.downcase.should include("path_info = /env/%c3%bc\n") end specify "QUERY_STRING contains the query string" do cgi_envs = get('/env?foo=escaped%20string') cgi_envs.should include("QUERY_STRING = foo=escaped%20string\n") end specify "QUERY_STRING must be present even when there's no query string" do cgi_envs = get('/env') cgi_envs.should include("QUERY_STRING = \n") end specify "SCRIPT_NAME contains the base URI, or the empty string if the app is deployed on the root URI" do cgi_envs = get('/env') cgi_envs.should include("SCRIPT_NAME = #{base_uri}\n") end it "appends an X-Powered-By header containing the Phusion Passenger version number" do response = get_response('/') response["X-Powered-By"].should include("Phusion Passenger") response["X-Powered-By"].should include(PhusionPassenger::VERSION_STRING) end it "buffers uploads" do get('/') # Force spawning so that the timeout below is enough. uri = URI.parse(@server) socket = TCPSocket.new(uri.host, uri.port) begin upload_data = File.read("stub/upload_data.txt") size_of_first_half = upload_data.size / 2 socket.write("POST #{base_uri}/ HTTP/1.1\r\n") socket.write("Host: #{uri.host}:#{uri.port}\r\n") socket.write("Content-Type: multipart/form-data\r\n") socket.write("Content-Length: #{upload_data.size}\r\n") socket.write("Connection: close\r\n") socket.write("\r\n") socket.write(upload_data[0 .. size_of_first_half - 1]) socket.flush Timeout.timeout(10) do get('/').should == "front page" end socket.write(upload_data[0 .. size_of_first_half]) socket.flush socket.read.should =~ /front page/ ensure socket.close rescue nil end end it "buffers any number of concurrent uploads" do get('/') # Force spawning so that the timeout below is enough. sockets = [] uri = URI.parse(@server) upload_data = File.read("stub/upload_data.txt") size_of_first_half = upload_data.size / 2 begin 5.times do |i| socket = TCPSocket.new(uri.host, uri.port) sockets << socket socket.write("POST #{base_uri}/ HTTP/1.1\r\n") socket.write("Host: #{uri.host}:#{uri.port}\r\n") socket.write("Content-Type: multipart/form-data\r\n") socket.write("Content-Length: #{upload_data.size}\r\n") socket.write("Connection: close\r\n") socket.write("\r\n") socket.write(upload_data[0 .. size_of_first_half - 1]) socket.flush end Timeout.timeout(10) do get('/').should == "front page" end sockets.each do |socket| socket.write(upload_data[size_of_first_half .. -1]) socket.flush socket.read.should =~ /front page/ end ensure sockets.each do |socket| socket.close rescue nil end end end it "supports restarting via restart.txt" do get('/').should == "front page" File.write(@stub.full_app_root + "/front_page.txt", "new front page") File.touch(@stub.full_app_root + "/tmp/restart.txt", 2) get('/').should == "new front page" end it "runs as an unprivileged user" do get('/touch_file?file=file.txt').should == "ok" stat = File.stat(@stub.full_app_root + "/file.txt") stat.uid.should_not == 0 stat.gid.should_not == 0 end ############ private def base_uri uri = URI.parse(@server) return uri.path.sub(%r(/$), '') end end passenger-4.0.37/test/cxx/ApplicationPool2/000755 000765 000024 00000000000 12233035540 021154 5ustar00honglistaff000000 000000 passenger-4.0.37/test/cxx/Base64Test.cpp000644 000765 000024 00000003604 12233035540 020370 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include "Utils/Base64.h" using namespace Passenger; using namespace std; namespace tut { struct Base64Test { }; DEFINE_TEST_GROUP(Base64Test); TEST_METHOD(1) { // Test encoding. ensure_equals(Base64::encode(""), ""); ensure_equals(Base64::encode("a"), "YQ=="); ensure_equals(Base64::encode("b"), "Yg=="); ensure_equals(Base64::encode("ab"), "YWI="); ensure_equals(Base64::encode("abc"), "YWJj"); ensure_equals(Base64::encode("abcd"), "YWJjZA=="); ensure_equals(Base64::encode("\1\2\3\4\5\6\7\255"), "AQIDBAUGB60="); ensure_equals(Base64::encode("The gamma-ray burst from April 23, a " "powerful explosion from a dying star, was detected by the " "Swift satellite using on-board gamma-ray and X-ray instruments."), "VGhlIGdhbW1hLXJheSBidXJzdCBmcm9tIEFwcmlsIDIzLCBhIHBvd2VyZnVs" "IGV4cGxvc2lvbiBmcm9tIGEgZHlpbmcgc3Rhciwgd2FzIGRldGVjdGVkIGJ5" "IHRoZSBTd2lmdCBzYXRlbGxpdGUgdXNpbmcgb24tYm9hcmQgZ2FtbWEtcmF5" "IGFuZCBYLXJheSBpbnN0cnVtZW50cy4="); ensure_equals(Base64::encodeForUrl("\003\340\177X"), "A-B_WA"); } TEST_METHOD(2) { // Test decoding. ensure_equals(Base64::decode(""), ""); ensure_equals(Base64::decode("YQ=="), "a"); ensure_equals(Base64::decode("Yg=="), "b"); ensure_equals(Base64::decode("YWI="), "ab"); ensure_equals(Base64::decode("YWJj"), "abc"); ensure_equals(Base64::decode("YWJjZA=="), "abcd"); ensure_equals(Base64::decode("AQIDBAUGB60="), "\1\2\3\4\5\6\7\255"); ensure_equals(Base64::decode("VGhlIGdhbW1hLXJheSBidXJzdCBmcm9tIEFwcmlsIDIzLCBhIHBvd2VyZnVs" "IGV4cGxvc2lvbiBmcm9tIGEgZHlpbmcgc3Rhciwgd2FzIGRldGVjdGVkIGJ5" "IHRoZSBTd2lmdCBzYXRlbGxpdGUgdXNpbmcgb24tYm9hcmQgZ2FtbWEtcmF5" "IGFuZCBYLXJheSBpbnN0cnVtZW50cy4="), "The gamma-ray burst from April 23, a " "powerful explosion from a dying star, was detected by the " "Swift satellite using on-board gamma-ray and X-ray instruments."); } } passenger-4.0.37/test/cxx/BufferedIOTest.cpp000644 000765 000024 00000026062 12233035540 021321 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include "Utils/BufferedIO.h" #include "Utils/Timer.h" #include "Utils/IOUtils.h" #include using namespace Passenger; using namespace std; namespace tut { struct BufferedIOTest { FileDescriptor reader, writer; BufferedIO io; string readData; unsigned int counter; char buf[100]; BufferedIO::AcceptFunction a_eof; BufferedIO::AcceptFunction a_twoBytesRead; BufferedIOTest() { Pipe p = createPipe(); reader = p.first; writer = p.second; io = BufferedIO(reader); counter = 0; memset(buf, 0, sizeof(buf)); a_eof = boost::bind(&BufferedIOTest::eof, this, _1, _2); a_twoBytesRead = boost::bind(&BufferedIOTest::twoBytesRead, this, _1, _2); } void write(const StaticString &data) { ::write(writer, data.c_str(), data.size()); } pair twoBytesRead(const char *data, unsigned int size) { if (counter == 2) { return make_pair(0, true); } else { unsigned int toRead = min(2u - counter, size); readData.append(data, toRead); counter += toRead; return make_pair(toRead, counter == 2); } } pair eof(const char *data, unsigned int size) { readData.append(data, size); return make_pair(size, false); } static void writeAfterSomeTime(int fd, int sleepTime, string data) { syscalls::usleep(sleepTime); writeExact(fd, data); } static void closeAfterSomeTime(FileDescriptor fd, int sleepTime) { syscalls::usleep(sleepTime); fd.close(); } }; DEFINE_TEST_GROUP(BufferedIOTest); /***** Test readUntil() *****/ TEST_METHOD(1) { // If the connection is already closed and the buffer is empty, then it returns 0. writer.close(); ensure_equals(io.readUntil(a_eof), 0u); ensure_equals(readData, ""); ensure_equals(io.getBuffer(), ""); } TEST_METHOD(2) { // If the connection is already closed and the buffer is non-empty, // then it reads from the buffer. writer.close(); io.unread("hello world"); ensure_equals(io.readUntil(a_twoBytesRead), 2u); ensure_equals(readData, "he"); ensure_equals(io.readUntil(a_eof), 9u); ensure_equals(readData, "hello world"); ensure_equals(io.getBuffer(), ""); } TEST_METHOD(3) { // If the buffer is empty then it reads from the connection. write("hello world"); writer.close(); ensure_equals("(1)", io.readUntil(a_twoBytesRead), 2u); ensure_equals("(2)", readData, "he"); ensure_equals("(5)", io.readUntil(a_eof), 9u); ensure_equals("(6)", readData, "hello world"); ensure_equals("(7)", io.readUntil(a_eof), 0u); ensure_equals("(8)", readData, "hello world"); ensure_equals(io.getBuffer(), ""); } TEST_METHOD(4) { // If the buffer is non-empty then it reads from the // buffer first, then from the connection. io.unread("hel"); write("lo world"); writer.close(); ensure_equals("(1)", io.readUntil(a_twoBytesRead), 2u); ensure_equals("(2)", readData, "he"); counter = 0; ensure_equals("(3)", io.readUntil(a_twoBytesRead), 2u); ensure_equals("(4)", readData, "hell"); ensure_equals("(5)", io.readUntil(a_eof), 7u); ensure_equals("(6)", readData, "hello world"); ensure_equals("(7)", io.readUntil(a_eof), 0u); ensure_equals("(8)", readData, "hello world"); ensure_equals(io.getBuffer(), ""); } TEST_METHOD(5) { // It blocks until the acceptor function says it's done or until EOF. TempThread thr1(boost::bind(writeAfterSomeTime, writer, 20000, "aa")); Timer timer1; ensure_equals(io.readUntil(a_twoBytesRead), 2u); ensure_equals(readData, "aa"); ensure("At least 18 msec elapsed", timer1.elapsed() >= 18); ensure("At most 90 msec elapsed", timer1.elapsed() <= 90); TempThread thr2(boost::bind(closeAfterSomeTime, writer, 20000)); Timer timer2; ensure_equals(io.readUntil(a_twoBytesRead), 0u); ensure_equals(readData, "aa"); ensure("At least 18 msec elapsed", timer2.elapsed() >= 18); ensure("At most 90 msec elapsed", timer2.elapsed() <= 90); } TEST_METHOD(6) { // It throws TimeoutException if it cannot read enough data // within the specified timeout. unsigned long long timeout = 50000; io.unread("he"); write("llo"); Timer timer; try { io.readUntil(a_eof, &timeout); fail("TimeoutException expected"); } catch (const TimeoutException &) { ensure("At least 45 msec elapsed", timer.elapsed() >= 45); ensure("At most 90 msec elapsed", timer.elapsed() < 90); ensure("It deducts the waited time from the timeout", timeout < 5000); ensure_equals(readData, "hello"); ensure_equals(io.getBuffer(), ""); } } /***** Test read() *****/ TEST_METHOD(10) { // If the connection is already closed and the buffer is empty, then it returns 0. writer.close(); ensure_equals(io.read(buf, sizeof(buf)), 0u); ensure_equals(io.getBuffer(), ""); } TEST_METHOD(11) { // If the connection is already closed and the buffer is non-empty // and >= N bytes, then it reads everything from the buffer. io.unread("hel"); write("lo world"); writer.close(); ensure_equals(io.read(buf, 5), 5u); ensure_equals(StaticString(buf), "hello"); ensure_equals(io.getBuffer(), " world"); } TEST_METHOD(12) { // If the connection is already closed and the buffer is non-empty // and < N bytes, then it reads N bytes from the buffer and the rest // from the connection. io.unread("hel"); write("lo world"); writer.close(); ensure_equals(io.read(buf, sizeof(buf)), 11u); ensure_equals(StaticString(buf), "hello world"); ensure_equals(io.getBuffer(), ""); } TEST_METHOD(13) { // If the buffer is empty then it reads from the connection. write("hello world"); ensure_equals(io.read(buf, 5), 5u); ensure_equals(StaticString(buf), "hello"); ensure_equals(io.getBuffer(), " world"); } TEST_METHOD(14) { // If the buffer is non-empty then it reads from the // buffer first, then from the connection. write("hello world"); ensure_equals(io.read(buf, 2), 2u); ensure_equals(StaticString(buf), "he"); ensure_equals(io.getBuffer(), "llo world"); ensure_equals(io.read(buf, 7), 7u); ensure_equals(StaticString(buf), "llo wor"); ensure_equals(io.getBuffer(), "ld"); } TEST_METHOD(15) { // It blocks until the given number of bytes are read or until EOF. TempThread thr1(boost::bind(writeAfterSomeTime, writer, 20000, "aa")); Timer timer1; ensure_equals(io.read(buf, 2), 2u); ensure_equals(StaticString(buf), "aa"); ensure("At least 18 msec elapsed", timer1.elapsed() >= 18); ensure("At most 90 msec elapsed", timer1.elapsed() <= 90); TempThread thr2(boost::bind(closeAfterSomeTime, writer, 20000)); Timer timer2; ensure_equals(io.read(buf, sizeof(buf)), 0u); ensure_equals(StaticString(buf), "aa"); ensure("At least 18 msec elapsed", timer2.elapsed() >= 18); ensure("At most 90 msec elapsed", timer2.elapsed() <= 90); } TEST_METHOD(16) { // It throws TimeoutException if it cannot read enough data // within the specified timeout. unsigned long long timeout = 50000; io.unread("he"); write("llo"); Timer timer; try { io.read(buf, sizeof(buf), &timeout); fail("TimeoutException expected"); } catch (const TimeoutException &) { ensure("At least 45 msec elapsed", timer.elapsed() >= 45); ensure("At most 95 msec elapsed", timer.elapsed() < 95); ensure("It deducts the waited time from the timeout", timeout < 5000); ensure_equals(io.getBuffer(), ""); } } /***** Test readAll() *****/ TEST_METHOD(20) { // It reads everything until EOF. TempThread thr1(boost::bind(writeAfterSomeTime, writer, 20000, "aa")); TempThread thr2(boost::bind(closeAfterSomeTime, writer, 40000)); Timer timer; ensure_equals(io.readAll(), "aa"); ensure_equals(io.getBuffer(), ""); ensure("At least 38 msec elapsed", timer.elapsed() >= 38); ensure("At most 95 msec elapsed", timer.elapsed() <= 95); } TEST_METHOD(21) { // It throws TimeoutException if it cannot read enough data // within the specified timeout. unsigned long long timeout = 50000; io.unread("he"); write("llo"); Timer timer; try { io.readAll(&timeout); fail("TimeoutException expected"); } catch (const TimeoutException &) { ensure("At least 45 msec elapsed", timer.elapsed() >= 45); ensure("At most 95 msec elapsed", timer.elapsed() < 95); ensure("It deducts the waited time from the timeout", timeout < 5000); ensure_equals(io.getBuffer(), ""); } } /***** Test readLine() *****/ TEST_METHOD(25) { // If the connection is already closed and the buffer is empty, // then it returns the empty string. writer.close(); ensure_equals(io.readLine(), ""); ensure_equals(io.getBuffer(), ""); } TEST_METHOD(26) { // If the connection is already closed and the buffer is non-empty, // then it returns the first line in the buffer. writer.close(); io.unread("hello\nworld\n."); ensure_equals(io.readLine(), "hello\n"); ensure_equals(io.getBuffer(), "world\n."); ensure_equals(io.readLine(), "world\n"); ensure_equals(io.getBuffer(), "."); ensure_equals(io.readLine(), "."); ensure_equals(io.getBuffer(), ""); } TEST_METHOD(27) { // If the buffer is empty then it reads from the connection. write("hello\nworld\n."); ensure_equals(io.readLine(), "hello\n"); ensure_equals(io.getBuffer(), "world\n."); } TEST_METHOD(28) { // If the buffer is non-empty then it reads from the // buffer first, then from the connection. io.unread("hello"); write("\nworld\n."); ensure_equals(io.readLine(), "hello\n"); ensure_equals(io.getBuffer(), "world\n."); ensure_equals(io.readLine(), "world\n"); ensure_equals(io.getBuffer(), "."); } TEST_METHOD(29) { // If the line is too long then it throws a SecurityException. write("abcd"); try { io.readLine(3); fail("SecurityException expected"); } catch (const SecurityException &) { // Pass. } } TEST_METHOD(30) { // It blocks until a line can be read or until EOF. TempThread thr1(boost::bind(writeAfterSomeTime, writer, 20000, "hello")); TempThread thr2(boost::bind(writeAfterSomeTime, writer, 35000, "\nworld\n.")); Timer timer1; ensure_equals(io.readLine(), "hello\n"); ensure_equals(io.getBuffer(), "world\n."); ensure("At least 33 msec elapsed", timer1.elapsed() >= 33); ensure("At most 95 msec elapsed", timer1.elapsed() <= 90); TempThread thr3(boost::bind(closeAfterSomeTime, writer, 20000)); Timer timer2; ensure_equals(io.readLine(), "world\n"); ensure_equals(io.getBuffer(), "."); ensure_equals(io.readLine(), "."); ensure_equals(io.getBuffer(), ""); ensure("At least 18 msec elapsed", timer2.elapsed() >= 18); ensure("At most 95 msec elapsed", timer2.elapsed() <= 95); } TEST_METHOD(31) { // It throws TimeoutException if it cannot read enough data // within the specified timeout. unsigned long long timeout = 30000; io.unread("he"); write("llo"); Timer timer; try { io.readLine(1024, &timeout); fail("TimeoutException expected"); } catch (const TimeoutException &) { ensure("At least 25 msec elapsed", timer.elapsed() >= 25); ensure("At most 90 msec elapsed", timer.elapsed() < 90); ensure("It deducts the waited time from the timeout", timeout < 5000); ensure_equals(io.getBuffer(), ""); } } } passenger-4.0.37/test/cxx/CachedFileStatTest.cpp000644 000765 000024 00000023733 12233035540 022154 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include "Utils/CachedFileStat.hpp" #include "Utils/SystemTime.h" #include #include using namespace std; using namespace Passenger; namespace tut { struct CachedFileStatTest { struct stat buf; ~CachedFileStatTest() { SystemTime::release(); unlink("test.txt"); unlink("test2.txt"); unlink("test3.txt"); unlink("test4.txt"); } }; DEFINE_TEST_GROUP(CachedFileStatTest); static void touch(const char *filename, time_t timestamp = 0) { FILE *f = fopen(filename, "w"); fprintf(f, "hi"); fclose(f); if (timestamp != 0) { struct utimbuf buf; buf.actime = timestamp; buf.modtime = timestamp; utime(filename, &buf); } } /************ Tests involving a single file ************/ TEST_METHOD(1) { // Statting a new file works. touch("test.txt"); CachedFileStat stat(1); ensure_equals(stat.stat("test.txt", &buf, 1), 0); ensure_equals((long) buf.st_size, (long) 2); } TEST_METHOD(2) { // It does not re-stat an existing file until the cache has expired. CachedFileStat stat(1); SystemTime::force(5); touch("test.txt", 1); ensure_equals("1st stat succceeded", stat.stat("test.txt", &buf, 1), 0); touch("test.txt", 1000); ensure_equals("2nd stat succceeded", stat.stat("test.txt", &buf, 1), 0); ensure_equals("Cached value was used", buf.st_mtime, (time_t) 1); SystemTime::force(6); ensure_equals("3rd stat succceeded", stat.stat("test.txt", &buf, 1), 0); ensure_equals("Cache has been invalidated", buf.st_mtime, (time_t) 1000); } TEST_METHOD(3) { // Statting a nonexistant file returns an error. CachedFileStat stat(1); ensure_equals(stat.stat("test.txt", &buf, 1), -1); ensure_equals("It sets errno appropriately", errno, ENOENT); } TEST_METHOD(4) { // It does not re-stat a previously nonexistant file until // the cache has expired. SystemTime::force(5); CachedFileStat stat(1); ensure_equals("1st stat failed", stat.stat("test.txt", &buf, 1), -1); ensure_equals("It sets errno appropriately", errno, ENOENT); errno = EEXIST; touch("test.txt", 1000); ensure_equals("2nd stat failed", stat.stat("test.txt", &buf, 1), -1); ensure_equals("It sets errno appropriately", errno, ENOENT); ensure_equals("Cached value was used", buf.st_mtime, (time_t) 0); SystemTime::force(6); ensure_equals("3rd stat succeeded", stat.stat("test.txt", &buf, 1), 0); ensure_equals("Cache has been invalidated", buf.st_mtime, (time_t) 1000); unlink("test.txt"); ensure_equals("4th stat succeeded even though file was unlinked", stat.stat("test.txt", &buf, 1), 0); ensure_equals("Cached value was used", buf.st_mtime, (time_t) 1000); } TEST_METHOD(5) { // If the throttling rate is 0 then the cache will be bypassed. SystemTime::force(5); CachedFileStat stat(2); ensure_equals("1st stat returns -1", stat.stat("test.txt", &buf, 0), -1); touch("test.txt"); ensure_equals("2nd stat did not go through the cache", stat.stat("test.txt", &buf, 0), 0); } /************ Tests involving multiple files ************/ TEST_METHOD(10) { // Throttling in combination with multiple files works. CachedFileStat stat(2); SystemTime::force(5); // Touch and stat test.txt. The next stat should return // the old info. touch("test.txt", 10); ensure_equals( stat.stat("test.txt", &buf, 1), 0); ensure_equals(buf.st_mtime, (time_t) 10); touch("test.txt", 20); ensure_equals( stat.stat("test.txt", &buf, 1), 0); ensure_equals(buf.st_mtime, (time_t) 10); // Touch and stat test2.txt. The next stat should return // the old info. touch("test2.txt", 30); ensure_equals( stat.stat("test2.txt", &buf, 1), 0); ensure_equals(buf.st_mtime, (time_t) 30); touch("test2.txt", 40); ensure_equals( stat.stat("test2.txt", &buf, 1), 0); ensure_equals(buf.st_mtime, (time_t) 30); // Forward timer, then stat both files again. The most recent // information should be returned. SystemTime::force(6); ensure_equals( stat.stat("test.txt", &buf, 1), 0); ensure_equals(buf.st_mtime, (time_t) 20); ensure_equals( stat.stat("test2.txt", &buf, 1), 0); ensure_equals(buf.st_mtime, (time_t) 40); } TEST_METHOD(11) { // Cache limiting works. CachedFileStat stat(3); SystemTime::force(5); // Create and stat test.txt, test2.txt and test3.txt. touch("test.txt", 1000); ensure_equals( stat.stat("test.txt", &buf, 1), 0); ensure_equals(buf.st_mtime, (time_t) 1000); touch("test2.txt", 1001); ensure_equals( stat.stat("test2.txt", &buf, 1), 0); ensure_equals(buf.st_mtime, (time_t) 1001); touch("test3.txt", 1003); ensure_equals( stat.stat("test3.txt", &buf, 1), 0); ensure_equals(buf.st_mtime, (time_t) 1003); // Stat test2.txt, then create and stat test4.txt, then touch test.txt. // test.txt should have been removed from the cache, and thus // upon statting it again its new timestamp should be returned. ensure_equals( stat.stat("test2.txt", &buf, 1), 0); touch("test4.txt", 1004); ensure_equals( stat.stat("test4.txt", &buf, 1), 0); touch("test.txt", 3000); ensure_equals( stat.stat("test.txt", &buf, 1), 0); ensure_equals(buf.st_mtime, (time_t) 3000); } TEST_METHOD(12) { // Increasing the cache size dynamically works. SystemTime::force(5); CachedFileStat stat(2); touch("test.txt", 1); touch("test2.txt", 2); touch("test3.txt", 3); ensure_equals("1st stat succeeded", stat.stat("test.txt", &buf, 1), 0); ensure_equals("2nd stat succeeded", stat.stat("test2.txt", &buf, 1), 0); ensure_equals("3rd stat succeeded", stat.stat("test3.txt", &buf, 1), 0); // test.txt should now be removed from the cache. touch("test.txt", 10); ensure_equals("4th stat succeeded", stat.stat("test.txt", &buf, 1), 0); ensure_equals(buf.st_mtime, (time_t) 10); // test2.txt should now be removed from the cache. // If we stat test2.txt now, test3.txt would normally // be removed from the cache. But if we increase the // cache size here then that won't happen: stat.setMaxSize(3); touch("test2.txt", 11); touch("test3.txt", 12); ensure_equals("5th stat succeeded", stat.stat("test2.txt", &buf, 1), 0); ensure_equals(buf.st_mtime, (time_t) 11); ensure_equals("6th stat succeeded", stat.stat("test3.txt", &buf, 1), 0); ensure_equals("test3.txt is still cached", buf.st_mtime, (time_t) 3); ensure_equals("7th stat succeeded", stat.stat("test.txt", &buf, 1), 0); ensure_equals("test.txt is still cached", buf.st_mtime, (time_t) 10); } TEST_METHOD(13) { // If we decrease the cache size dynamically, then // the oldest entries will be removed. SystemTime::force(5); CachedFileStat stat(3); touch("test.txt", 1); touch("test2.txt", 2); touch("test3.txt", 3); ensure_equals("1st stat succeeded", stat.stat("test.txt", &buf, 1), 0); ensure_equals("2nd stat succeeded", stat.stat("test2.txt", &buf, 1), 0); ensure_equals("3rd stat succeeded", stat.stat("test3.txt", &buf, 1), 0); // The following should remove test.txt and test2.txt from the cache. stat.setMaxSize(1); touch("test.txt", 10); touch("test2.txt", 11); touch("test3.txt", 12); ensure_equals("6th stat succeeded", stat.stat("test3.txt", &buf, 1), 0); ensure_equals("test3.txt is still in the cache", buf.st_mtime, (time_t) 3); ensure_equals("4th stat succeeded", stat.stat("test.txt", &buf, 1), 0); ensure_equals("test.txt is removed from the cache", buf.st_mtime, (time_t) 10); ensure_equals("5th stat succeeded", stat.stat("test2.txt", &buf, 1), 0); ensure_equals("test2.txt is removed from the cache", buf.st_mtime, (time_t) 11); } TEST_METHOD(14) { // An initial cache size of 0 means that the cache size is unlimited. SystemTime::force(1); CachedFileStat stat(0); touch("test.txt", 1); touch("test2.txt", 2); touch("test3.txt", 3); stat.stat("test.txt", &buf, 1); stat.stat("test2.txt", &buf, 1); stat.stat("test3.txt", &buf, 1); touch("test.txt", 11); touch("test2.txt", 12); touch("test3.txt", 13); stat.stat("test.txt", &buf, 1); ensure_equals(buf.st_mtime, (time_t) 1); stat.stat("test2.txt", &buf, 1); ensure_equals(buf.st_mtime, (time_t) 2); stat.stat("test3.txt", &buf, 1); ensure_equals(buf.st_mtime, (time_t) 3); } TEST_METHOD(15) { // Setting the cache size dynamically to 0 makes the cache size unlimited. SystemTime::force(1); CachedFileStat stat(2); touch("test.txt", 1); touch("test2.txt", 2); touch("test3.txt", 3); stat.stat("test.txt", &buf, 1); stat.stat("test2.txt", &buf, 1); stat.stat("test3.txt", &buf, 1); // test.txt is now no longer in the cache. stat.setMaxSize(0); touch("test.txt", 11); touch("test2.txt", 12); touch("test3.txt", 13); stat.stat("test.txt", &buf, 1); stat.stat("test2.txt", &buf, 1); stat.stat("test3.txt", &buf, 1); // test.txt should now have been re-statted while test2.txt // and test3.txt are still cached. stat.stat("test.txt", &buf, 1); ensure_equals("test.txt is re-statted", buf.st_mtime, (time_t) 11); stat.stat("test2.txt", &buf, 1); ensure_equals("test2.txt is still cached", buf.st_mtime, (time_t) 2); stat.stat("test3.txt", &buf, 1); ensure_equals("test3.txt is still cached", buf.st_mtime, (time_t) 3); } TEST_METHOD(16) { // Changing the cache size dynamically from 0 to non-0 works; // it removes the oldest entries, if necessary. CachedFileStat stat(0); stat.stat("test.txt", &buf, 1); stat.stat("test2.txt", &buf, 1); stat.stat("test3.txt", &buf, 1); stat.stat("test4.txt", &buf, 1); stat.stat("test5.txt", &buf, 1); stat.setMaxSize(2); ensure("(1)", !stat.knows("test.txt")); ensure("(2)", !stat.knows("test2.txt")); ensure("(3)", !stat.knows("test3.txt")); ensure("(4)", stat.knows("test4.txt")); ensure("(5)", stat.knows("test5.txt")); } } passenger-4.0.37/test/cxx/CxxTestMain.cpp000644 000765 000024 00000012672 12233035540 020720 0ustar00honglistaff000000 000000 #include #include "../tut/tut_reporter.h" #include "../support/valgrind.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; namespace tut { test_runner_singleton runner; } typedef tut::groupnames::const_iterator groupnames_iterator; /** All available groups. */ static tut::groupnames allGroups; /** Whether the user wants to run all test groups, or only the specified test groups. */ static enum { RUN_ALL_GROUPS, RUN_SPECIFIED_GROUPS } runMode = RUN_ALL_GROUPS; /** The test groups and test numbers that the user wants to run. * Only meaningful if runMode == RUN_SPECIFIED_GROUPS. */ static map< string, vector > groupsToRun; static void usage(int exitCode) { printf("Usage: ./Apache2ModuleTests [options]\n"); printf("Runs the unit tests for the Apache 2 module.\n\n"); printf("Options:\n"); printf(" -g GROUP_NAME Instead of running all unit tests, only run the test group\n"); printf(" named GROUP_NAME. You can specify -g multiple times, which\n"); printf(" will result in only the specified test groups being run.\n\n"); printf(" Available test groups:\n\n"); for (groupnames_iterator it = allGroups.begin(); it != allGroups.end(); it++) { printf(" %s\n", it->c_str()); } printf("\n"); printf(" -h Print this usage information.\n"); exit(exitCode); } static bool groupExists(const string &name) { for (groupnames_iterator it = allGroups.begin(); it != allGroups.end(); it++) { if (name == *it) { return true; } } return false; } static void parseGroupSpec(const char *spec, string &groupName, vector &testNumbers) { testNumbers.clear(); if (*spec == '\0') { groupName = ""; return; } vector components; split(spec, ':', components); groupName = components[0]; if (components.size() > 1) { string testNumbersSpec = components[1]; components.clear(); split(testNumbersSpec, ',', components); vector::const_iterator it; for (it = components.begin(); it != components.end(); it++) { testNumbers.push_back(atoi(*it)); } } } static void parseOptions(int argc, char *argv[]) { for (int i = 1; i < argc; i++) { if (strcmp(argv[i], "-h") == 0) { usage(0); } else if (strcmp(argv[i], "-g") == 0) { if (argv[i + 1] == NULL) { fprintf(stderr, "*** ERROR: A -g option must be followed by a test group name.\n"); exit(1); } string groupName; vector testNumbers; parseGroupSpec(argv[i + 1], groupName, testNumbers); if (!groupExists(groupName)) { fprintf(stderr, "*** ERROR: Invalid test group '%s'. Available test groups are:\n\n", argv[i + 1]); for (groupnames_iterator it = allGroups.begin(); it != allGroups.end(); it++) { printf("%s\n", it->c_str()); } exit(1); } else { runMode = RUN_SPECIFIED_GROUPS; groupsToRun[groupName] = testNumbers; i++; } } else { fprintf(stderr, "*** ERROR: Unknown option: %s\n", argv[i]); fprintf(stderr, "Please pass -h for a list of valid options.\n"); exit(1); } } } static int doNothing(eio_req *req) { return 0; } static void loadConfigFile() { Json::Reader reader; if (!reader.parse(readAll("config.json"), testConfig)) { fprintf(stderr, "Cannot parse config.json: %s\n", reader.getFormattedErrorMessages().c_str()); exit(1); } } static void abortHandler(int signo, siginfo_t *info, void *ctx) { // Stop itself so that we can attach it to gdb. static const char message[] = "Crash handler called!\n"; write(STDERR_FILENO, message, sizeof(message) - 1); raise(SIGSTOP); // Run default signal handler. raise(signo); } static void installAbortHandler() { const char *stopOnAbort = getenv("STOP_ON_ABORT"); if (stopOnAbort != NULL && *stopOnAbort != '\0' && *stopOnAbort != '0') { struct sigaction action; action.sa_sigaction = abortHandler; action.sa_flags = SA_RESETHAND | SA_SIGINFO; sigemptyset(&action.sa_mask); sigaction(SIGABRT, &action, NULL); sigaction(SIGSEGV, &action, NULL); sigaction(SIGBUS, &action, NULL); sigaction(SIGFPE, &action, NULL); } } int main(int argc, char *argv[]) { signal(SIGPIPE, SIG_IGN); setenv("RAILS_ENV", "production", 1); setenv("TESTING_PASSENGER", "1", 1); setenv("PYTHONDONTWRITEBYTECODE", "1", 1); unsetenv("PASSENGER_TMPDIR"); unsetenv("PASSENGER_TEMP_DIR"); oxt::initialize(); oxt::setup_syscall_interruption_support(); tut::reporter reporter; tut::runner.get().set_callback(&reporter); allGroups = tut::runner.get().list_groups(); parseOptions(argc, argv); char path[PATH_MAX + 1]; getcwd(path, PATH_MAX); resourceLocator = new ResourceLocator(extractDirName(path)); Passenger::MultiLibeio::init(); eio_set_idle_timeout(9999); // Never timeout. eio_set_min_parallel(1); eio_set_max_parallel(1); if (RUNNING_ON_VALGRIND) { // Start an EIO thread to warm up Valgrind. eio_nop(0, doNothing, NULL); } loadConfigFile(); installAbortHandler(); bool all_ok = true; if (runMode == RUN_ALL_GROUPS) { tut::runner.get().run_tests(); } else { tut::runner.get().run_tests(groupsToRun); } all_ok = reporter.all_ok(); Passenger::MultiLibeio::shutdown(); if (all_ok) { return 0; } else { return 1; } } passenger-4.0.37/test/cxx/DechunkerTest.cpp000644 000765 000024 00000014501 12233035540 021252 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include #include #include #include using namespace Passenger; using namespace std; namespace tut { struct DechunkerTest { Dechunker dechunker; string input; vector chunks; bool ended; DechunkerTest() { dechunker.onData = onData; dechunker.onEnd = onEnd; dechunker.userData = this; ended = false; } void addChunk(const string &data) { input.append(integerToHex(data.size())); input.append("\r\n"); input.append(data); input.append("\r\n"); } static void onData(const char *data, size_t len, void *userData) { DechunkerTest *self = (DechunkerTest *) userData; self->chunks.push_back(string(data, len)); } static void onEnd(void *userData) { DechunkerTest *self = (DechunkerTest *) userData; self->ended = true; } }; DEFINE_TEST_GROUP(DechunkerTest); TEST_METHOD(1) { // Test initial state. ensure(dechunker.acceptingInput()); ensure(!dechunker.hasError()); ensure(!ended); ensure_equals(dechunker.getErrorMessage(), (const char *) NULL); } TEST_METHOD(2) { // Test feeding a complete stream everything in one go. addChunk("hello"); addChunk("world"); addChunk(""); ensure_equals(dechunker.feed(input.data(), input.size()), input.size()); ensure(!dechunker.acceptingInput()); ensure(!dechunker.hasError()); ensure_equals(chunks.size(), 2u); ensure_equals(chunks[0], "hello"); ensure_equals(chunks[1], "world"); ensure(ended); } TEST_METHOD(3) { // Test feeding a complete stream byte by byte. addChunk("hel"); addChunk("lo"); addChunk(""); const char *pos = input.data(); const char *end = input.data() + input.size(); while (pos < end) { ensure(dechunker.acceptingInput()); ensure(!dechunker.hasError()); ensure_equals(dechunker.feed(pos, 1), 1u); pos++; } ensure(!dechunker.acceptingInput()); ensure(!dechunker.hasError()); ensure_equals(chunks.size(), 5u); ensure_equals(chunks[0], "h"); ensure_equals(chunks[1], "e"); ensure_equals(chunks[2], "l"); ensure_equals(chunks[3], "l"); ensure_equals(chunks[4], "o"); ensure(ended); } TEST_METHOD(4) { // Test feeding a complete stream in pieces of 2 bytes. addChunk("hello"); addChunk("world"); addChunk(""); const char *pos = input.data(); const char *end = input.data() + input.size(); while (pos < end) { ensure(dechunker.acceptingInput()); ensure(!dechunker.hasError()); size_t size = std::min(2, end - pos); ensure_equals(dechunker.feed(pos, size), size); pos += 2; } ensure(!dechunker.acceptingInput()); ensure(!dechunker.hasError()); ensure_equals(chunks.size(), 6u); ensure_equals(chunks[0], "h"); ensure_equals(chunks[1], "el"); ensure_equals(chunks[2], "lo"); ensure_equals(chunks[3], "w"); ensure_equals(chunks[4], "or"); ensure_equals(chunks[5], "ld"); ensure(ended); } TEST_METHOD(5) { // Test feeding a complete stream in pieces of 3 bytes. addChunk("hello"); addChunk("world"); addChunk(""); const char *pos = input.data(); const char *end = input.data() + input.size(); while (pos < end) { ensure(dechunker.acceptingInput()); ensure(!dechunker.hasError()); size_t size = std::min(3, end - pos); ensure_equals(dechunker.feed(pos, size), size); pos += 3; } ensure(!dechunker.acceptingInput()); ensure(!dechunker.hasError()); ensure_equals(chunks.size(), 4u); ensure_equals(chunks[0], "hel"); ensure_equals(chunks[1], "lo"); ensure_equals(chunks[2], "wo"); ensure_equals(chunks[3], "rld"); ensure(ended); } TEST_METHOD(6) { // Test support for chunk extensions. input = "2;foobar\r\n" "xy\r\n" "0\r\n" "\r\n"; ensure_equals(dechunker.feed(input.data(), input.size()), input.size()); ensure(!dechunker.acceptingInput()); ensure(!dechunker.hasError()); ensure_equals(chunks.size(), 1u); ensure_equals(chunks[0], "xy"); ensure(ended); } TEST_METHOD(20) { // It refuses to accept any more data after EOF until reset is called. addChunk("hello"); addChunk(""); dechunker.feed(input.data(), input.size()); ensure_equals(dechunker.feed(input.data(), input.size()), 0u); dechunker.reset(); ensure_equals(dechunker.feed(input.data(), input.size()), input.size()); ensure(!dechunker.acceptingInput()); ensure(!dechunker.hasError()); ensure_equals(chunks.size(), 2u); ensure_equals(chunks[0], "hello"); ensure_equals(chunks[1], "hello"); ensure(ended); } TEST_METHOD(21) { // Test invalid size string. input = "12x\r\n"; ensure_equals(dechunker.feed(input.data(), input.size()), 2u); ensure(!dechunker.acceptingInput()); ensure(dechunker.hasError()); ensure(!ended); } TEST_METHOD(22) { // Test invalid chunk header terminator. input = "12\r\t"; ensure_equals(dechunker.feed(input.data(), input.size()), 3u); ensure(!dechunker.acceptingInput()); ensure(dechunker.hasError()); ensure(!ended); } TEST_METHOD(23) { // Test invalid chunk header terminator when chunk extensions are involved. input = "12;foo\r\t"; ensure_equals(dechunker.feed(input.data(), input.size()), 7u); ensure(!dechunker.acceptingInput()); ensure(dechunker.hasError()); ensure(!ended); } TEST_METHOD(24) { // Test invalid chunk terminator. input = "2\r\n" "xyz"; ensure_equals(dechunker.feed(input.data(), input.size()), 5u); ensure(!dechunker.acceptingInput()); ensure(dechunker.hasError()); ensure(!ended); } TEST_METHOD(25) { // Test invalid terminating chunk terminator. input = "2\r\n" "xy\r\n" "0\r\n" "\rx"; ensure_equals(dechunker.feed(input.data(), input.size()), 11u); ensure(!dechunker.acceptingInput()); ensure(dechunker.hasError()); ensure(!ended); } TEST_METHOD(26) { // Test garbage. for (int i = 0; i < 256; i++) { input.append(1, (char) i); } dechunker.feed(input.data(), input.size()); ensure(!dechunker.acceptingInput()); ensure(dechunker.hasError()); ensure(!ended); } TEST_METHOD(27) { // Test feeding a partial stream. addChunk("hello"); addChunk("world"); ensure_equals(dechunker.feed(input.data(), input.size()), input.size()); ensure(dechunker.acceptingInput()); ensure(!dechunker.hasError()); ensure_equals(chunks.size(), 2u); ensure_equals(chunks[0], "hello"); ensure_equals(chunks[1], "world"); ensure(!ended); } } passenger-4.0.37/test/cxx/EventedBufferedInputTest.cpp000644 000765 000024 00000045351 12233035540 023426 0ustar00honglistaff000000 000000 #include #include #include #include #include #include #include using namespace Passenger; using namespace std; namespace tut { class MyEventedBufferedInput: public EventedBufferedInput<> { public: boost::mutex syncher; int readError; boost::function onAfterProcessingBuffer; MyEventedBufferedInput(SafeLibev *libev, const FileDescriptor &fd) : EventedBufferedInput<>(libev, fd) { readError = 0; } virtual ssize_t readSocket(void *buf, size_t n) { int readError; { boost::lock_guard l(syncher); readError = this->readError; } if (readError == 0) { return EventedBufferedInput<>::readSocket(buf, n); } else { errno = readError; return -1; } } void setReadError(int code) { boost::lock_guard l(syncher); readError = code; } virtual void afterProcessingBuffer() { boost::function onAfterProcessingBuffer; { boost::lock_guard l(syncher); onAfterProcessingBuffer = this->onAfterProcessingBuffer; } if (onAfterProcessingBuffer) { onAfterProcessingBuffer(); } } }; struct EventedBufferedInputTest { BackgroundEventLoop bg; Pipe p; boost::shared_ptr ebi; boost::mutex syncher; string log; ssize_t toConsume; unsigned int counter; EventedBufferedInputTest() { p = createPipe(); ebi = boost::make_shared(bg.safe.get(), p.first); ebi->onData = onData; ebi->onError = onError; ebi->userData = this; toConsume = -1; counter = 0; bg.start(); } ~EventedBufferedInputTest() { bg.stop(); setLogLevel(DEFAULT_LOG_LEVEL); } static size_t onData(const EventedBufferedInputPtr &input, const StaticString &data) { EventedBufferedInputTest *self = (EventedBufferedInputTest *) input->userData; boost::lock_guard l(self->syncher); self->counter++; if (data.empty()) { self->log.append("EOF\n"); } else { self->log.append("Data: " + cEscapeString(data) + "\n"); } if (self->toConsume == -1) { return data.size(); } else { return self->toConsume; } } static void onError(const EventedBufferedInputPtr &input, const char *message, int code) { EventedBufferedInputTest *self = (EventedBufferedInputTest *) input->userData; boost::lock_guard l(self->syncher); self->log.append("Error: " + toString(code) + "\n"); } unsigned int getCounter() { boost::lock_guard l(syncher); return counter; } void startEbi() { bg.safe->run(boost::bind(&EventedBufferedInputTest::realStartEbi, this)); } void realStartEbi() { ebi->start(); } bool ebiIsStarted() { bool result; bg.safe->run(boost::bind(&EventedBufferedInputTest::realEbiIsStarted, this, &result)); return result; } void realEbiIsStarted(bool *result) { *result = ebi->isStarted(); } void logEbiIsStarted() { boost::lock_guard l(syncher); log.append("isStarted: " + toString(ebi->isStarted()) + "\n"); log.append("isSocketStarted: " + toString(ebi->isSocketStarted()) + "\n"); } }; #define LOCK() boost::lock_guard l(syncher) #define DEFINE_ON_DATA_METHOD(name, code) \ static size_t name(const EventedBufferedInputPtr &input, const StaticString &data) { \ EventedBufferedInputTest *self = (EventedBufferedInputTest *) input->userData; \ boost::mutex &syncher = self->syncher; \ string &log = self->log; \ boost::shared_ptr &ebi = self->ebi; \ /* Shut up compiler warning */ \ (void) syncher; \ (void) log; \ (void) ebi; \ code \ } #define DEFINE_FINISH_METHOD(name, code) \ static void name(EventedBufferedInputTest *self) { \ boost::mutex &syncher = self->syncher; \ string &log = self->log; \ boost::shared_ptr &ebi = self->ebi; \ /* Shut up compiler warning */ \ (void) syncher; \ (void) log; \ (void) ebi; \ code \ } DEFINE_TEST_GROUP(EventedBufferedInputTest); TEST_METHOD(1) { set_test_name("It emits socket data events upon receiving data"); startEbi(); writeExact(p.second, "aaabbb"); EVENTUALLY(5, LOCK(); result = !log.empty(); ); LOCK(); ensure_equals(log, "Data: aaabbb\n"); } TEST_METHOD(2) { set_test_name("It emits socket end events upon receiving EOF"); startEbi(); p.second.close(); EVENTUALLY(5, LOCK(); result = !log.empty(); ); LOCK(); ensure_equals(log, "EOF\n"); } TEST_METHOD(3) { set_test_name("It emits socket end events after all data has been consumed"); startEbi(); writeExact(p.second, "aaabbb"); EVENTUALLY(5, LOCK(); result = !log.empty(); ); { LOCK(); ensure_equals(log, "Data: aaabbb\n"); } p.second.close(); EVENTUALLY(5, LOCK(); result = log.find("EOF") != string::npos; ); { LOCK(); ensure_equals(log, "Data: aaabbb\n" "EOF\n"); } } TEST_METHOD(4) { set_test_name("Considers ended sockets to be paused"); startEbi(); p.second.close(); EVENTUALLY(5, LOCK(); result = !log.empty(); ); ensure(!ebiIsStarted()); } TEST_METHOD(5) { set_test_name("It emits error events upon encountering a socket error"); startEbi(); ebi->setReadError(EIO); writeExact(p.second, "aaabbb"); EVENTUALLY(5, LOCK(); result = !log.empty(); ); LOCK(); ensure_equals(log, "Error: " + toString(EIO) + "\n"); } TEST_METHOD(6) { set_test_name("It emits error events after all data has been consumed"); startEbi(); writeExact(p.second, "aaabbb"); EVENTUALLY(5, LOCK(); result = !log.empty(); ); ebi->setReadError(EIO); writeExact(p.second, "x"); EVENTUALLY(5, LOCK(); result = log.find("Error") != string::npos; ); LOCK(); ensure_equals(log, "Data: aaabbb\n" "Error: " + toString(EIO) + "\n"); } TEST_METHOD(7) { set_test_name("Considers error'ed sockets to be paused"); startEbi(); ebi->setReadError(EIO); writeExact(p.second, "x"); EVENTUALLY(5, LOCK(); result = !log.empty(); ); LOCK(); ensure(!ebiIsStarted()); } DEFINE_ON_DATA_METHOD(on_data_8, input->stop(); self->bg.safe->runLater(boost::bind(&EventedBufferedInputTest::logEbiIsStarted, self)); return 3; ) TEST_METHOD(8) { set_test_name("If the onData callback consumes everything and pauses the " "EventedBufferedInput, then the EventedBufferedInput leaves the socket " "in the paused state"); ebi->onData = on_data_8; startEbi(); writeExact(p.second, "abc"); EVENTUALLY(5, LOCK(); result = !log.empty(); ); LOCK(); ensure_equals(log, "isStarted: 0\n" "isSocketStarted: 0\n"); } DEFINE_ON_DATA_METHOD(on_data_9, input->start(); self->bg.safe->runLater(boost::bind(&EventedBufferedInputTest::logEbiIsStarted, self)); return 3; ) TEST_METHOD(9) { set_test_name("if the onData callback consumes everything and resumes the " "EventedBufferedInput, then the EventedBufferedInput leaves the socket " "in the resumed state"); ebi->onData = on_data_9; startEbi(); writeExact(p.second, "abc"); EVENTUALLY(5, LOCK(); result = !log.empty(); ); LOCK(); ensure_equals(log, "isStarted: 1\n" "isSocketStarted: 1\n"); } DEFINE_ON_DATA_METHOD(on_data_10, input->stop(); self->bg.safe->runLater(boost::bind(&EventedBufferedInputTest::logEbiIsStarted, self)); return 1; ) TEST_METHOD(10) { set_test_name("If the onData callback consumes partially and pauses the " "EventedBufferedInput, then the EventedBufferedInput leaves the socket " "at the paused state"); ebi->onData = on_data_10; startEbi(); writeExact(p.second, "abc"); EVENTUALLY(5, LOCK(); result = !log.empty(); ); LOCK(); ensure_equals(log, "isStarted: 0\n" "isSocketStarted: 0\n"); } DEFINE_ON_DATA_METHOD(on_data_11, input->start(); self->bg.safe->runLater(boost::bind(&EventedBufferedInputTest::logEbiIsStarted, self)); return 1; ) TEST_METHOD(11) { set_test_name("If the onData callback consumes partially and resumes the " "EventedBufferedInput, then the EventedBufferedInput leaves the socket " "at the resumed state"); ebi->onData = on_data_11; startEbi(); writeExact(p.second, "ab"); EVENTUALLY(5, LOCK(); result = log == "isStarted: 1\n" "isSocketStarted: 0\n" "isStarted: 1\n" "isSocketStarted: 1\n"; ); } DEFINE_ON_DATA_METHOD(on_data_12, LOCK(); self->counter++; if (self->counter == 2) { input->stop(); self->bg.safe->runLater(boost::bind(&EventedBufferedInputTest::logEbiIsStarted, self)); } return 2; ) TEST_METHOD(12) { set_test_name("If the onData callback first consumes partially, then " "consumes everything and pauses the EventedBufferedInput, then the " "EventedBufferedInput leaves the socket in the paused state"); ebi->onData = on_data_12; startEbi(); writeExact(p.second, "aabb"); EVENTUALLY(5, LOCK(); result = !log.empty(); ); LOCK(); ensure_equals(log, "isStarted: 0\n" "isSocketStarted: 0\n"); } DEFINE_ON_DATA_METHOD(on_data_13, LOCK(); self->counter++; if (self->counter == 2) { input->start(); self->bg.safe->runLater(boost::bind(&EventedBufferedInputTest::logEbiIsStarted, self)); } return 2; ) TEST_METHOD(13) { set_test_name("If the onData callback first consumes partially, then " "consumes everything and resumes the EventedBufferedInput, then the " "EventedBufferedInput leaves the socket in the resumed state"); ebi->onData = on_data_13; startEbi(); writeExact(p.second, "aabb"); EVENTUALLY(5, LOCK(); result = !log.empty(); ); LOCK(); ensure_equals(log, "isStarted: 1\n" "isSocketStarted: 1\n"); } /*** If the onData callback didn't consume everything... ***/ DEFINE_ON_DATA_METHOD(on_data_20, LOCK(); self->counter++; self->log.append("onData called; isSocketStarted: " + toString(self->ebi->isSocketStarted()) + "\n"); self->log.append("Data: " + cEscapeString(data) + "\n"); if (self->counter == 1) { return 3; } else { return 1; } ) static void on_after_processing_buffer_20(EventedBufferedInputTest *self) { boost::lock_guard l(self->syncher); if (self->counter == 1) { self->log.append("Finished first onData; isSocketStarted: " + toString(self->ebi->isSocketStarted()) + "\n"); } } DEFINE_FINISH_METHOD(finish_20, LOCK(); log.append("Finished; isSocketStarted: " + toString(ebi->isSocketStarted()) + "\n"); ); TEST_METHOD(20) { set_test_name("It pauses the socket, re-emits the remaining data in the next tick, " "then resumes the socket when everything is consumed"); ebi->onData = on_data_20; ebi->onAfterProcessingBuffer = boost::bind(on_after_processing_buffer_20, this); startEbi(); writeExact(p.second, "aaabbb"); bg.safe->runAfterTS(10, boost::bind(finish_20, this)); EVENTUALLY(5, LOCK(); result = log.find("Finished;") != string::npos; ); LOCK(); ensure_equals(log, "onData called; isSocketStarted: 1\n" "Data: aaabbb\n" "Finished first onData; isSocketStarted: 0\n" "onData called; isSocketStarted: 0\n" "Data: bbb\n" "onData called; isSocketStarted: 0\n" "Data: bb\n" "onData called; isSocketStarted: 0\n" "Data: b\n" "Finished; isSocketStarted: 1\n"); } /*** If pause() is called after the data handler... ***/ static void on_after_processing_buffer_21(EventedBufferedInputTest *self) { if (self->getCounter() == 1) { self->ebi->stop(); boost::lock_guard l(self->syncher); self->log.append("isSocketStarted: " + toString(self->ebi->isSocketStarted()) + "\n"); } } TEST_METHOD(21) { set_test_name("It pauses the socket and doesn't re-emit remaining data events"); toConsume = 1; ebi->onAfterProcessingBuffer = boost::bind(on_after_processing_buffer_21, this); startEbi(); writeExact(p.second, "aaabbb"); EVENTUALLY(5, LOCK(); result = log.find("isSocketStarted") != string::npos; ); LOCK(); ensure_equals(log, "Data: aaabbb\n" "isSocketStarted: 0\n"); } static void on_after_processing_buffer_22(EventedBufferedInputTest *self) { if (self->getCounter() == 1) { self->ebi->stop(); { boost::lock_guard l(self->syncher); self->log.append("Paused; isSocketStarted: " + toString(self->ebi->isSocketStarted()) + "\n"); } self->ebi->start(); { boost::lock_guard l(self->syncher); self->log.append("Resumed; isSocketStarted: " + toString(self->ebi->isSocketStarted()) + "\n"); } } } DEFINE_FINISH_METHOD(finish_22, LOCK(); log.append("Done; isSocketStarted: " + toString(ebi->isStarted()) + "\n"); ); TEST_METHOD(22) { set_test_name("It resumes the socket and re-emits remaining " "data one tick after start() is called"); toConsume = 3; ebi->onAfterProcessingBuffer = boost::bind(on_after_processing_buffer_22, this); startEbi(); writeExact(p.second, "aaabbb"); bg.safe->runAfterTS(10, boost::bind(finish_22, this)); EVENTUALLY(5, LOCK(); result = log.find("Done") != string::npos; ); { LOCK(); ensure_equals(log, "Data: aaabbb\n" "Paused; isSocketStarted: 0\n" "Resumed; isSocketStarted: 0\n" "Data: bbb\n" "Done; isSocketStarted: 1\n"); } bg.safe->runAfterTS(10, boost::bind(finish_22, this)); startEbi(); EVENTUALLY(5, LOCK(); result = log.find("Done") != string::npos; ); } static void on_after_processing_buffer_23(EventedBufferedInputTest *self) { if (self->getCounter() == 1) { self->ebi->stop(); { boost::lock_guard l(self->syncher); self->log.append("Paused; isSocketStarted: " + toString(self->ebi->isSocketStarted()) + "\n"); } self->ebi->start(); { boost::lock_guard l(self->syncher); self->log.append("Resumed; isSocketStarted: " + toString(self->ebi->isSocketStarted()) + "\n"); } self->ebi->stop(); { boost::lock_guard l(self->syncher); self->log.append("Paused again; isSocketStarted: " + toString(self->ebi->isSocketStarted()) + "\n"); } } } DEFINE_FINISH_METHOD(finish_23, LOCK(); log.append("Timeout; isSocketStarted: " + toString(ebi->isStarted()) + "\n"); ); TEST_METHOD(23) { set_test_name("It doesn't re-emit remaining data if start() " "is called, then stop() again"); toConsume = 3; ebi->onAfterProcessingBuffer = boost::bind(on_after_processing_buffer_23, this); startEbi(); writeExact(p.second, "aaabbb"); bg.safe->runAfterTS(10, boost::bind(finish_23, this)); EVENTUALLY(5, LOCK(); result = log.find("Timeout") != string::npos; ); LOCK(); ensure_equals(log, "Data: aaabbb\n" "Paused; isSocketStarted: 0\n" "Resumed; isSocketStarted: 0\n" "Paused again; isSocketStarted: 0\n" "Timeout; isSocketStarted: 0\n"); } /*** If pause() is called during the handler ***/ DEFINE_ON_DATA_METHOD(on_data_24, { LOCK(); self->counter++; self->log.append("Data: " + cEscapeString(data) + "\n"); } if (self->getCounter() == 1) { input->stop(); } return 1; ) DEFINE_FINISH_METHOD(finish_24, LOCK(); log.append("Timeout; isSocketStarted: " + toString(ebi->isSocketStarted()) + "\n"); ); TEST_METHOD(24) { set_test_name("It pauses the socket and doesn't re-emit remaining data"); ebi->onData = on_data_24; startEbi(); writeExact(p.second, "aaabbb"); bg.safe->runAfterTS(10, boost::bind(finish_24, this)); EVENTUALLY(5, LOCK(); result = log.find("Timeout") != string::npos; ); LOCK(); ensure_equals(log, "Data: aaabbb\n" "Timeout; isSocketStarted: 0\n"); } DEFINE_ON_DATA_METHOD(on_data_25, { LOCK(); self->counter++; self->log.append("Data: " + cEscapeString(data) + "\n"); } if (self->getCounter() == 1) { input->stop(); input->start(); } return 3; ) static void on_after_processing_buffer_25(EventedBufferedInputTest *self) { boost::lock_guard l(self->syncher); if (self->counter == 1) { self->log.append("Handler done; isSocketStarted: " + toString(self->ebi->isSocketStarted()) + "\n"); } } DEFINE_FINISH_METHOD(finish_25, LOCK(); log.append("Timeout; isSocketStarted: " + toString(ebi->isStarted()) + "\n"); ); TEST_METHOD(25) { set_test_name("It re-emits remaining data one tick after start() is called"); ebi->onData = on_data_25; ebi->onAfterProcessingBuffer = boost::bind(on_after_processing_buffer_25, this); startEbi(); writeExact(p.second, "aaabbb"); bg.safe->runAfterTS(10, boost::bind(finish_25, this)); EVENTUALLY(5, LOCK(); result = log.find("Timeout") != string::npos; ); LOCK(); ensure_equals(log, "Data: aaabbb\n" "Handler done; isSocketStarted: 0\n" "Data: bbb\n" "Timeout; isSocketStarted: 1\n"); } DEFINE_ON_DATA_METHOD(on_data_26, { LOCK(); self->counter++; self->log.append("Data: " + cEscapeString(data) + "\n"); } if (self->getCounter() == 1) { input->stop(); input->start(); input->stop(); } return 3; ) static void on_after_processing_buffer_26(EventedBufferedInputTest *self) { boost::lock_guard l(self->syncher); if (self->counter == 1) { self->log.append("Handler done; isSocketStarted: " + toString(self->ebi->isSocketStarted()) + "\n"); } } DEFINE_FINISH_METHOD(finish_26, LOCK(); log.append("Timeout; isSocketStarted: " + toString(ebi->isSocketStarted()) + "\n"); ); TEST_METHOD(26) { set_test_name("It doesn't re-emit remaining data if start() is called, then stop() again"); ebi->onData = on_data_26; ebi->onAfterProcessingBuffer = boost::bind(on_after_processing_buffer_26, this); startEbi(); writeExact(p.second, "aaabbb"); bg.safe->runAfterTS(10, boost::bind(finish_26, this)); EVENTUALLY(5, LOCK(); result = log.find("Timeout") != string::npos; ); LOCK(); ensure_equals(log, "Data: aaabbb\n" "Handler done; isSocketStarted: 0\n" "Timeout; isSocketStarted: 0\n"); } /*** If the socket was disconnected ***/ TEST_METHOD(27) { set_test_name("It doesn't re-emit the remaining data"); // TODO } TEST_METHOD(30) { set_test_name("It pauses the underlying socket"); // TODO } TEST_METHOD(31) { set_test_name("It doesn't emit data events if it's paused, but re-emits " "previously unemitted data events after resume"); // TODO } } passenger-4.0.37/test/cxx/EventedClientTest.cpp000644 000765 000024 00000033777 12233035540 022113 0ustar00honglistaff000000 000000 #include #include #include #include #include using namespace Passenger; using namespace std; using namespace boost; using namespace oxt; namespace tut { struct EventedClientTest { FileDescriptor fd1, fd2; ev::dynamic_loop eventLoop; ev::async exitWatcher; oxt::thread *thr; string lastErrorMessage; int lastErrorCode; AtomicInt integer; string data; EventedClientTest() : exitWatcher(eventLoop) { SocketPair sockets = createUnixSocketPair(); fd1 = sockets.first; fd2 = sockets.second; setNonBlocking(fd2); exitWatcher.set(this); exitWatcher.start(); thr = NULL; lastErrorCode = -1; } ~EventedClientTest() { stopEventLoop(); } void startEventLoop() { thr = new oxt::thread( boost::bind(&EventedClientTest::runLoop, this) ); } void stopEventLoop() { if (thr != NULL) { exitWatcher.send(); waitUntilEventLoopExits(); } } void waitUntilEventLoopExits() { if (thr != NULL) { thr->join(); delete thr; thr = NULL; } } void runLoop() { eventLoop.loop(); } void unloop(ev::async &watcher, int revents) { eventLoop.unloop(); } static void setIntToOne(EventedClient *client) { EventedClientTest *test = (EventedClientTest *) client->userData; test->integer = 1; } static void setIntToTwo(EventedClient *client) { EventedClientTest *test = (EventedClientTest *) client->userData; test->integer = 2; } static void saveSystemError(EventedClient *client, const string &message, int code) { EventedClientTest *self = (EventedClientTest *) client->userData; self->lastErrorMessage = message; self->lastErrorCode = code; } static void exitEventLoop(EventedClient *client) { EventedClientTest *self = (EventedClientTest *) client->userData; self->eventLoop.unloop(); } static void readAndExitOnEof(EventedClient *client) { EventedClientTest *self = (EventedClientTest *) client->userData; char buf[1024]; ssize_t ret = read(client->fd, buf, sizeof(buf)); if (ret <= 0) { self->eventLoop.unloop(); } else { self->data.append(buf, ret); } } }; DEFINE_TEST_GROUP(EventedClientTest); #define EVENT_LOOP_GUARD ScopeGuard g(boost::bind(&EventedClientTest::stopEventLoop, this)) TEST_METHOD(1) { // It doesn't watch read events by default. EventedClient client(eventLoop, fd2); write(fd1, "x", 1); client.userData = this; client.onReadable = EventedClientTest::setIntToOne; EVENT_LOOP_GUARD; startEventLoop(); SHOULD_NEVER_HAPPEN(100, result = integer == 1; ); } TEST_METHOD(2) { // It watches read events after calling notifyReads(true). EventedClient client(eventLoop, fd2); write(fd1, "x", 1); client.userData = this; client.onReadable = EventedClientTest::setIntToOne; client.notifyReads(true); EVENT_LOOP_GUARD; startEventLoop(); EVENTUALLY(1, result = integer == 1; ); } TEST_METHOD(3) { // I/O is allowed in the initial state. EventedClient client(eventLoop, fd2); ensure(client.ioAllowed()); } TEST_METHOD(4) { // EventedClientTest.write() writes all data to the socket // immediately whenever possible. StaticString data[] = { "hello ", "world" }; EventedClient client(eventLoop, fd2); client.write(data, 2); ensure_equals(client.pendingWrites(), 0u); EVENT_LOOP_GUARD; startEventLoop(); char buf[100]; memset(buf, 0, sizeof(buf)); ensure(readExact(fd1, buf, strlen("hello world"))); ensure_equals(string(buf), "hello world"); } TEST_METHOD(5) { // If EventedClientTest.write() cannot write out all data immediately, // and the remaining data is within the outbox limit, then it ensures // that all pending data is written to the socket eventually. // readWatcher will be active in the mean time. string str(1024 * 256, '\1'); StaticString data = str; EventedClient client(eventLoop, fd2); client.setOutboxLimit(str.size() + 1); client.write(&data, 1); ensure(client.pendingWrites() > 0); client.userData = this; client.onReadable = EventedClientTest::setIntToOne; client.notifyReads(true); ensure(client.readWatcherActive()); EVENT_LOOP_GUARD; startEventLoop(); char buf[str.size()]; memset(buf, 0, sizeof(buf)); ensure(readExact(fd1, buf, str.size())); ensure(memcmp(buf, str.c_str(), str.size()) == 0); } TEST_METHOD(6) { // If EventedClientTest.write() cannot write out all data immediately, // and the remaining data is larger than the outbox limit, then it ensures // that all pending data is written to the socket eventually. // readWatcher will not be active in the mean time. string str(1024 * 256, '\1'); StaticString data = str; EventedClient client(eventLoop, fd2); client.setOutboxLimit(1); client.userData = this; client.onReadable = EventedClientTest::setIntToOne; client.notifyReads(true); client.write(&data, 1); ensure("(1)", client.pendingWrites() > 0); ensure("(2)", !client.readWatcherActive()); client.notifyReads(true); ensure("(3)", !client.readWatcherActive()); startEventLoop(); EVENT_LOOP_GUARD; char buf[str.size()]; memset(buf, 0, sizeof(buf)); ensure(readExact(fd1, buf, str.size())); ensure(memcmp(buf, str.c_str(), str.size()) == 0); // readWatcher will become active again after all pending data has been sent. stopEventLoop(); ensure(client.readWatcherActive()); } TEST_METHOD(7) { // disconnect() closes the connection and emits a disconnection event. EventedClient client(eventLoop, fd2); client.userData = this; client.onDisconnect = EventedClientTest::setIntToTwo; client.disconnect(); ensure(!client.ioAllowed()); char buf; ensure_equals(read(fd1, &buf, 1), (ssize_t) 0); ensure_equals(integer, 2); } TEST_METHOD(8) { // If there's pending outgoing data then disconnect(false) does // not disconnect immediately and does not discard pending // outgoing data. Pending outgoing data will eventually be sent out. // In the mean time readWatcher will be disabled. // Disconnection event will be emitted after all pending data // is sent out. string str(1024 * 256, '\1'); StaticString data = str; EventedClient client(eventLoop, fd2); client.setOutboxLimit(str.size() + 1); client.userData = this; client.onReadable = EventedClientTest::setIntToOne; client.notifyReads(true); client.onDisconnect = EventedClientTest::setIntToTwo; client.write(&data, 1); client.disconnect(); ensure(!client.ioAllowed()); ensure(!client.readWatcherActive()); char buf[str.size()]; ensure(!client.ioAllowed()); ensure_equals(read(fd1, buf, 1), (ssize_t) 1); ensure_equals(buf[0], '\1'); startEventLoop(); EVENT_LOOP_GUARD; // No disconnection event yet. SHOULD_NEVER_HAPPEN(100, result = integer == 2; ); memset(buf, 0, sizeof(buf)); ensure(readExact(fd1, buf, str.size() - 1)); ensure(memcmp(buf, str.c_str() + 1, str.size() - 1) == 0); ensure_equals(read(fd1, buf, 1), (ssize_t) 0); stopEventLoop(); // Disconnection event should now have fired. ensure_equals(integer, 2); } TEST_METHOD(9) { // If there's pending outgoing data then disconnect(true) // closes the connection immediately without sending out // pending data. Disconnection event is emitted immediately. string str(1024 * 256, '\1'); StaticString data = str; EventedClient client(eventLoop, fd2); client.userData = this; client.onDisconnect = EventedClientTest::setIntToTwo; client.setOutboxLimit(str.size() + 1); client.write(&data, 1); client.disconnect(true); ensure(!client.ioAllowed()); ensure(!client.readWatcherActive()); ensure(client.pendingWrites() > 0); ensure_equals(integer, 2); string result = readAll(fd1); ensure_equals(result.size(), str.size() - client.pendingWrites()); } TEST_METHOD(10) { // EventedClient.write() doesn't do anything if the client is // already disconnected. string str(1024 * 256, '\1'); StaticString data = str; EventedClient client(eventLoop, fd2); client.disconnect(); client.write(&data, 1); char buf; ensure_equals(read(fd1, &buf, 1), (ssize_t) 0); } TEST_METHOD(11) { // EventedClient.write() doesn't do anything if the client // is being disconnected after pending data is sent out. string str1(1024 * 256, '\1'); string str2(1024 * 256, '\2'); StaticString data; size_t pending; EventedClient client(eventLoop, fd2); client.setOutboxLimit(1); data = str1; client.write(&data, 1); pending = client.pendingWrites(); client.disconnect(); data = str2; client.write(&data, 1); ensure_equals(client.pendingWrites(), pending); startEventLoop(); EVENT_LOOP_GUARD; string result = readAll(fd1); ensure_equals(result, str1); } TEST_METHOD(12) { // EventedClient.detach() returns the original file descriptor // and makes I/O to the file descriptor via its own object // impossible. EventedClient client(eventLoop, fd2); FileDescriptor fd3 = client.detach(); ensure_equals(fd3, fd2); ensure_equals(client.fd, -1); ensure(!client.ioAllowed()); ensure(!client.readWatcherActive()); StaticString data = "hi"; client.write(&data, 1); char buf[2]; ssize_t ret; int e; setNonBlocking(fd1); ret = read(fd1, buf, 2); e = errno; ensure_equals(ret, -1); ensure_equals(e, EAGAIN); } TEST_METHOD(13) { // EventedClient.detach() emits a detach event. EventedClient client(eventLoop, fd2); client.userData = this; client.onDetach = &EventedClientTest::setIntToTwo; client.detach(); ensure_equals(integer, 2); } TEST_METHOD(14) { // Subsequent calls to EventedClient.detach() return -1 // and no longer emit detach events. EventedClient client(eventLoop, fd2); client.detach(); client.userData = this; client.onDetach = &EventedClientTest::setIntToTwo; ensure_equals(client.detach(), -1); ensure_equals(integer, 0); } TEST_METHOD(15) { // EventedClient.write() emits a pending data flushed event // if no outgoing data needs to be scheduled for later. EventedClient client(eventLoop, fd2); client.userData = this; client.onPendingDataFlushed = &EventedClientTest::setIntToTwo; client.write("hi"); ensure_equals(client.pendingWrites(), (size_t) 0); ensure_equals(integer, 2); } TEST_METHOD(16) { // EventedClient emits a pending data flushed event // after all pending outgoing data is flushed. string str(1024 * 256, '\1'); EventedClient client(eventLoop, fd2); client.userData = this; client.onPendingDataFlushed = &EventedClientTest::setIntToTwo; client.write(str); ensure(client.pendingWrites() > 0); ensure_equals(integer, 0); startEventLoop(); EVENT_LOOP_GUARD; char buf[str.size()]; readExact(fd1, buf, str.size()); EVENTUALLY(2, result = integer == 2; ); } TEST_METHOD(17) { // EventedClient.write() ensures that the given data is written // after what's already in the outbox. EventedClient client(eventLoop, fd2); string header(1024 * 4, 'x'); string body(1024 * 1024, 'y'); char buf[header.size() + body.size() + 1024]; client.write(header); client.write(body); ensure("(1)", client.pendingWrites() > 0); ensure_equals("(2)", readExact(fd1, buf, header.size()), (unsigned int) header.size()); ensure_equals("(3)", StaticString(buf, header.size()), header); client.write("hello world"); startEventLoop(); EVENT_LOOP_GUARD; unsigned int len = body.size() + strlen("hello world"); ensure_equals("(4)", readExact(fd1, buf, len), len); ensure_equals("(5)", StaticString(buf, len), body + "hello world"); } TEST_METHOD(18) { // If writeErrorAction is DISCONNECT_FULL then // EventedClient.write(), upon encountering a write error, // will forcefully disconnect the connection. EventedClient client(eventLoop, fd2); client.userData = this; client.writeErrorAction = EventedClient::DISCONNECT_FULL; client.onSystemError = saveSystemError; fd1.close(); client.write("hello"); ensure_equals(lastErrorCode, EPIPE); ensure_equals(client.fd, -1); } TEST_METHOD(19) { // If writeErrorAction is DISCONNECT_FULL then // the background writer disconnects the connection // on write error. EventedClient client(eventLoop, fd2); client.userData = this; client.writeErrorAction = EventedClient::DISCONNECT_FULL; client.onSystemError = saveSystemError; string str(1024 * 1024, 'x'); client.write(str); ensure("(1)", client.pendingWrites() > 0); fd1.close(); client.onDisconnect = exitEventLoop; startEventLoop(); waitUntilEventLoopExits(); ensure_equals("(2)", lastErrorCode, EPIPE); ensure_equals("(3)", client.fd, -1); } TEST_METHOD(20) { // If writeErrorAction is DISCONNECT_WRITE then // EventedClient.write(), upon encountering a write error, // will forcefully disconnect the writer side of the // connection but continue allowing reading. EventedClient client(eventLoop, fd2); client.userData = this; client.writeErrorAction = EventedClient::DISCONNECT_WRITE; client.onSystemError = saveSystemError; client.onReadable = readAndExitOnEof; client.notifyReads(true); writeExact(fd1, "world", 5); fd1.close(); client.write("hello"); startEventLoop(); waitUntilEventLoopExits(); ensure(client.fd != -1); ensure_equals(data, "world"); } TEST_METHOD(21) { // If writeErrorAction is DISCONNECT_WRITE then // the background writer, upon encountering a write error, // will forcefully disconnect the writer side of the // connection but continue allowing reading. EventedClient client(eventLoop, fd2); client.userData = this; client.writeErrorAction = EventedClient::DISCONNECT_WRITE; client.onSystemError = saveSystemError; client.onReadable = readAndExitOnEof; client.notifyReads(true); string str(1024 * 1024, 'x'); client.write(str); ensure("(1)", client.pendingWrites() > 0); writeExact(fd1, "world", 5); fd1.close(); startEventLoop(); waitUntilEventLoopExits(); ensure("(2)", client.fd != -1); ensure_equals("(3)", data, "world"); } } passenger-4.0.37/test/cxx/FileBackedPipeTest.cpp000644 000765 000024 00000037643 12233035540 022145 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include #include #include #include #include using namespace Passenger; using namespace std; using namespace boost; namespace tut { struct FileBackedPipeTest { TempDir tmpdir; BackgroundEventLoop bg; FileBackedPipePtr pipe; bool consumeImmediately; size_t toConsume; bool doneAfterConsuming; bool resetOnData; pthread_t consumeCallbackThread; AtomicInt consumeCallbackCount; string receivedData; bool ended; FileBackedPipe::ConsumeCallback consumedCallback; AtomicInt commitCount; FileBackedPipeTest() : tmpdir("tmp.pipe") { consumeImmediately = true; toConsume = 9999; doneAfterConsuming = false; resetOnData = false; consumeCallbackCount = 0; ended = false; pipe = boost::make_shared("tmp.pipe"); pipe->userData = this; pipe->onData = onData; pipe->onEnd = onEnd; pipe->onCommit = onCommit; } ~FileBackedPipeTest() { bg.stop(); pipe.reset(); } void init() { pipe->reset(bg.safe); bg.start(); } bool write(const StaticString &data) { bool result; bg.safe->run(boost::bind(&FileBackedPipeTest::real_write, this, data, &result)); return result; } void real_write(StaticString data, bool *result) { *result = pipe->write(data.data(), data.size()); } unsigned int getBufferSize() { unsigned int result; bg.safe->run(boost::bind(&FileBackedPipeTest::real_getBufferSize, this, &result)); return result; } void real_getBufferSize(unsigned int *result) { *result = pipe->getBufferSize(); } void startPipe() { bg.safe->run(boost::bind(&FileBackedPipe::start, pipe.get())); } void stopPipe() { bg.safe->run(boost::bind(&FileBackedPipe::stop, pipe.get())); } void endPipe() { bg.safe->run(boost::bind(&FileBackedPipe::end, pipe.get())); } void callConsumedCallback(size_t consumed, bool done) { bg.safe->run(boost::bind(consumedCallback.toFunction(), consumed, done)); } bool isStarted() { bool result; bg.safe->run(boost::bind(&FileBackedPipeTest::real_isStarted, this, &result)); return result; } void real_isStarted(bool *result) { *result = pipe->isStarted(); } bool reachedEnd() { bool result; bg.safe->run(boost::bind(&FileBackedPipeTest::real_reachedEnd, this, &result)); return result; } void real_reachedEnd(bool *result) { *result = pipe->reachedEnd(); } bool isCommittingToDisk() { bool result; bg.safe->run(boost::bind(&FileBackedPipeTest::real_isCommittingToDisk, this, &result)); return result; } void real_isCommittingToDisk(bool *result) { *result = pipe->isCommittingToDisk(); } FileBackedPipe::DataState getDataState() { FileBackedPipe::DataState result; bg.safe->run(boost::bind(&FileBackedPipeTest::real_getDataState, this, &result)); return result; } void real_getDataState(FileBackedPipe::DataState *result) { *result = pipe->getDataState(); } static void onData(const FileBackedPipePtr &source, const char *data, size_t size, const FileBackedPipe::ConsumeCallback &consumed) { FileBackedPipeTest *self = (FileBackedPipeTest *) source->userData; self->consumeCallbackThread = pthread_self(); if (!self->receivedData.empty()) { self->receivedData.append("\n"); } self->receivedData.append(data, size); self->consumeCallbackCount++; if (self->resetOnData) { source->reset(); } if (self->consumeImmediately) { consumed(std::min(self->toConsume, size), self->doneAfterConsuming); } else { self->consumedCallback = consumed; } } static void onEnd(const FileBackedPipePtr &source) { FileBackedPipeTest *self = (FileBackedPipeTest *) source->userData; self->ended = true; } static void onCommit(const FileBackedPipePtr &source) { FileBackedPipeTest *self = (FileBackedPipeTest *) source->userData; self->commitCount++; } }; DEFINE_TEST_GROUP(FileBackedPipeTest); TEST_METHOD(1) { // Test writing to an empty, started pipe and consuming all data immediately. init(); startPipe(); ensure("immediately consumed", write("hello")); ensure("callback called from event loop thread", pthread_equal(consumeCallbackThread, bg.safe->getCurrentThread())); ensure_equals(receivedData, "hello"); ensure_equals("nothing buffered", getBufferSize(), 0u); ensure("not committing to disk", !isCommittingToDisk()); } TEST_METHOD(2) { // Test writing to an empty, started pipe and not consuming immediately. init(); startPipe(); consumeImmediately = false; write("hello"); ensure_equals(receivedData, "hello"); ensure_equals("everything buffered", getBufferSize(), sizeof("hello") - 1); receivedData.clear(); callConsumedCallback(5, false); ensure_equals(getBufferSize(), 0u); ensure("not committing to disk", !isCommittingToDisk()); } TEST_METHOD(3) { // Test writing to an empty, stopped pipe and starting it later. init(); write("hello"); startPipe(); ensure_equals(consumeCallbackCount, 1); ensure_equals(receivedData, "hello"); ensure_equals(getBufferSize(), 0u); ensure("not committing to disk", !isCommittingToDisk()); } TEST_METHOD(4) { // When the consume callback is called with done=false, the pipe should be paused. init(); startPipe(); doneAfterConsuming = true; write("hello"); ensure(!isStarted()); ensure_equals(getBufferSize(), 0u); ensure("not committing to disk", !isCommittingToDisk()); } TEST_METHOD(5) { // After consuming some data, if the pipe is still in started mode then // it should emit any remaining data. init(); startPipe(); toConsume = 3; write("hello"); ensure_equals(getBufferSize(), 0u); ensure("not committing to disk", !isCommittingToDisk()); ensure_equals(receivedData, "hello\n" "lo"); ensure_equals(consumeCallbackCount, 2); } TEST_METHOD(6) { // Writing to a stopped pipe will cause the data to be buffered. // This buffer will be passed to the data callback when we // start the pipe again. If the data callback doesn't consume // everything at once then the pipe will try again until // everything's consumed. init(); toConsume = 3; write("hello"); ensure_equals(getBufferSize(), 5u); ensure("not committing to disk", !isCommittingToDisk()); ensure_equals(receivedData, ""); ensure_equals(consumeCallbackCount, 0); startPipe(); ensure_equals(getBufferSize(), 0u); ensure("not committing to disk", !isCommittingToDisk()); ensure_equals(consumeCallbackCount, 2); ensure_equals(receivedData, "hello\n" "lo"); } TEST_METHOD(7) { // Test writing to a pipe whose consume callback hasn't // been called yet and whose data state is IN_MEMORY. init(); startPipe(); consumeImmediately = false; write("hello"); write("world"); ensure_equals(getDataState(), FileBackedPipe::IN_MEMORY); ensure_equals(getBufferSize(), 10u); ensure("not committing to disk", !isCommittingToDisk()); ensure_equals(consumeCallbackCount, 1); ensure_equals(receivedData, "hello"); callConsumedCallback(4, false); ensure_equals(getBufferSize(), 6u); ensure("not committing to disk", !isCommittingToDisk()); ensure_equals(consumeCallbackCount, 2); ensure_equals(receivedData, "hello\n" "oworld"); callConsumedCallback(6, false); ensure_equals(getBufferSize(), 0u); ensure("not committing to disk", !isCommittingToDisk()); ensure_equals(consumeCallbackCount, 2); ensure_equals(receivedData, "hello\n" "oworld"); } TEST_METHOD(8) { // Test writing to a pipe whose consume callback hasn't // been called yet and whose data state is OPENING_FILE. pipe->setThreshold(3); pipe->openTimeout = 30; init(); startPipe(); consumeImmediately = false; write("hello"); write("world"); ensure_equals("(1)", getDataState(), FileBackedPipe::OPENING_FILE); ensure_equals("(2)", getBufferSize(), 10u); ensure("committing to disk", isCommittingToDisk()); ensure_equals("(3)", consumeCallbackCount, 1); ensure_equals("(4)", receivedData, "hello"); callConsumedCallback(4, false); ensure_equals("(5)", getDataState(), FileBackedPipe::OPENING_FILE); ensure_equals("(6)", getBufferSize(), 6u); ensure_equals("(7)", consumeCallbackCount, 2); ensure_equals("(8)", receivedData, "hello\n" "oworld"); callConsumedCallback(6, false); ensure_equals("(9)", getDataState(), FileBackedPipe::OPENING_FILE); ensure_equals("(10)", getBufferSize(), 0u); ensure_equals("(11)", consumeCallbackCount, 2); ensure_equals("(12)", receivedData, "hello\n" "oworld"); } TEST_METHOD(9) { // Test writing to a pipe whose consume callback hasn't // been called yet and whose data state is IN_FILE. pipe->setThreshold(3); init(); startPipe(); consumeImmediately = false; write("hello"); write("world"); EVENTUALLY(5, result = getDataState() == FileBackedPipe::IN_FILE && consumeCallbackCount == 1; ); ensure_equals("(2)", getBufferSize(), 10u); ensure_equals("(3)", receivedData, "hello"); callConsumedCallback(4, false); EVENTUALLY(5, result = consumeCallbackCount == 2; ); ensure_equals("(4)", getDataState(), FileBackedPipe::IN_FILE); ensure_equals("(5)", getBufferSize(), 6u); ensure_equals("(7)", receivedData, "hello\n" "oworld"); callConsumedCallback(6, false); ensure_equals("(8)", getDataState(), FileBackedPipe::IN_FILE); ensure_equals("(9)", getBufferSize(), 0u); ensure_equals("(10)", consumeCallbackCount, 2); ensure_equals("(11)", receivedData, "hello\n" "oworld"); } TEST_METHOD(10) { // When the data doesn't fit in the memory buffer it will // write to a file. Test whether writing to the file and // reading from the file works correctly. pipe->setThreshold(5); init(); write("hello"); ensure_equals(getBufferSize(), 5u); ensure_equals(getDataState(), FileBackedPipe::IN_MEMORY); write("world"); ensure_equals(getBufferSize(), 10u); EVENTUALLY(5, result = getBufferSize() == 10 && getDataState() == FileBackedPipe::IN_FILE; ); startPipe(); EVENTUALLY(5, result = getBufferSize() == 0 && receivedData == "helloworld"; ); } TEST_METHOD(11) { // Test end() on a started, empty pipe. init(); startPipe(); endPipe(); ensure_equals(consumeCallbackCount, 0); ensure(ended); } TEST_METHOD(12) { // Test end() on a started pipe after writing data to // it that's immediately consumed. init(); startPipe(); write("hello"); endPipe(); ensure_equals(consumeCallbackCount, 1); ensure_equals(receivedData, "hello"); ensure(ended); } TEST_METHOD(13) { // Test end() on a started pipe that has data buffered in memory. init(); consumeImmediately = false; startPipe(); write("hello"); endPipe(); ensure_equals(getDataState(), FileBackedPipe::IN_MEMORY); ensure(!ended); callConsumedCallback(3, false); ensure_equals(receivedData, "hello\n" "lo"); ensure(!ended); callConsumedCallback(2, false); ensure(ended); } TEST_METHOD(14) { // Test end() on a started pipe that has data buffered on disk. pipe->setThreshold(1); consumeImmediately = false; init(); startPipe(); write("hello"); endPipe(); EVENTUALLY(5, result = getDataState() == FileBackedPipe::IN_FILE && !ended; ); callConsumedCallback(3, false); EVENTUALLY(5, result = receivedData == "hello\n" "lo" && !ended; ); callConsumedCallback(2, false); ensure(ended); } TEST_METHOD(15) { // Test end() on an empty, stopped pipe. init(); endPipe(); startPipe(); ensure_equals(consumeCallbackCount, 0); ensure_equals(receivedData, ""); ensure(ended); } TEST_METHOD(16) { // Test end() on a non-empty, stopped pipe with dataState == IN_MEMORY. init(); write("hello"); endPipe(); startPipe(); EVENTUALLY(5, result = consumeCallbackCount == 1; ); ensure_equals(receivedData, "hello"); ensure(ended); } TEST_METHOD(17) { // Test end() on a non-empty, stopped pipe with dataState == IN_FILE. pipe->setThreshold(3); pipe->openTimeout = 30; init(); write("hello"); ensure_equals(getDataState(), FileBackedPipe::OPENING_FILE); endPipe(); startPipe(); EVENTUALLY(5, result = consumeCallbackCount == 1; ); ensure_equals(getDataState(), FileBackedPipe::OPENING_FILE); ensure_equals(receivedData, "hello"); ensure(ended); } TEST_METHOD(18) { // Test end() on a non-empty, stopped pipe with dataState == IN_FILE. pipe->setThreshold(3); init(); write("hello"); endPipe(); startPipe(); EVENTUALLY(5, result = getDataState() == FileBackedPipe::IN_FILE; ); EVENTUALLY(5, result = consumeCallbackCount == 1; ); ensure_equals(receivedData, "hello"); ensure(ended); } TEST_METHOD(20) { // Starting a pipe whose end has already been processed will have no effect. init(); startPipe(); write("hello"); endPipe(); ensure_equals(consumeCallbackCount, 1); ensure(ended); stopPipe(); ensure(reachedEnd()); ensure(!isStarted()); startPipe(); ensure_equals(consumeCallbackCount, 1); ensure(ended); ensure(reachedEnd()); ensure(!isStarted()); } TEST_METHOD(21) { // If the written data is immediately consumed, then write() returns true // and the commit callback is never called. init(); startPipe(); ensure(write("hello")); SHOULD_NEVER_HAPPEN(40, result = commitCount > 0; ); } TEST_METHOD(22) { // If the written data is not immediately consumed but fits // into the memory buffer, then write() returns true and the // commit callback is never called. consumeImmediately = false; init(); startPipe(); ensure(write("hello")); SHOULD_NEVER_HAPPEN(40, result = commitCount > 0; ); } TEST_METHOD(23) { // If the pipe is paused and the written data fits into the memory // buffer, then write() returns true and the commit callback is never called. init(); ensure(write("hello")); SHOULD_NEVER_HAPPEN(40, result = commitCount > 0; ); } TEST_METHOD(24) { // If the written data is not immediately consumed and must be written // to the disk, then write() returns false. onCommit is called after // the data has been written out to the disk. pipe->setThreshold(3); pipe->openTimeout = 20; init(); ensure(!write("hello")); ensure("committing to disk", isCommittingToDisk()); EVENTUALLY(1, result = commitCount == 1; ); ensure("not committing to disk", !isCommittingToDisk()); } TEST_METHOD(25) { // It may be reset inside the onData callback. resetOnData = true; consumeImmediately = false; init(); startPipe(); write("hello"); ensure(!isStarted()); ensure_equals(getBufferSize(), 0u); } TEST_METHOD(26) { // It may be reset inside the onData callback while there is data buffered in memory. consumeImmediately = false; init(); startPipe(); write("hello"); ensure_equals("(1)", getBufferSize(), 5u); resetOnData = true; callConsumedCallback(1, false); ensure("(2)", !isStarted()); ensure_equals("(3)", getBufferSize(), 0u); } TEST_METHOD(27) { // It may be reset inside the onData callback while there is data buffered in memory, // soon to be written on disk. pipe->setThreshold(3); pipe->openTimeout = 40; consumeImmediately = false; init(); startPipe(); write("hello"); ensure_equals("(1)", getBufferSize(), 5u); ensure("(2)", isCommittingToDisk()); usleep(20000); ensure("(3)", isCommittingToDisk()); resetOnData = true; callConsumedCallback(1, false); ensure("(4)", !isStarted()); ensure_equals("(5)", getBufferSize(), 0u); } TEST_METHOD(28) { // It may be reset inside the onData callback while there is data buffered on disk. pipe->setThreshold(3); consumeImmediately = false; init(); startPipe(); write("hello"); ensure_equals("(1)", getBufferSize(), 5u); usleep(20000); ensure("(2)", !isCommittingToDisk()); resetOnData = true; // The following call will trigger a libeio read operation on the buffer file. callConsumedCallback(1, false); EVENTUALLY(1, result = !isStarted(); ); ensure("(3)", !isStarted()); ensure_equals("(4)", getBufferSize(), 0u); } } passenger-4.0.37/test/cxx/FileChangeCheckerTest.cpp000644 000765 000024 00000022454 12233035540 022622 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include "Utils/FileChangeChecker.h" #include "Utils/SystemTime.h" #include using namespace Passenger; using namespace std; namespace tut { struct FileChangeCheckerTest { FileChangeCheckerTest() { } ~FileChangeCheckerTest() { unlink("test.txt"); unlink("test2.txt"); SystemTime::release(); } }; DEFINE_TEST_GROUP(FileChangeCheckerTest); TEST_METHOD(1) { // If a file is checked for the first time, then it // returns whether the file exists. FileChangeChecker checker(10); touchFile("test.txt"); ensure(checker.changed("test.txt")); ensure(!checker.changed("test2.txt")); } TEST_METHOD(2) { // If a file is checked for the first time, and its // directory is not accessible, then false is returned. if (geteuid() != 0) { // Root can read everything so no point in // testing if we're running as root. FileChangeChecker checker(10); TempDir d("test.tmp"); touchFile("test.tmp/test.txt"); runShellCommand("chmod a= test.tmp"); ensure(!checker.changed("test.tmp/test.txt")); // Should still be false. ensure(!checker.changed("test.tmp/test.txt")); // Now make it accessible again... runShellCommand("chmod u=rwx test.tmp"); ensure(checker.changed("test.tmp/test.txt")); } } TEST_METHOD(3) { // File is not changed if it didn't exist and // still doesn't exist. FileChangeChecker checker(10); checker.changed("test.txt"); ensure("test.txt not changed", !checker.changed("test.txt")); checker.changed("test2.txt"); ensure("test2.txt not changed", !checker.changed("test2.txt")); } TEST_METHOD(4) { // File is not changed if its ctime and mtime didn't change. FileChangeChecker checker(10); touchFile("test.txt"); checker.changed("test.txt"); ensure(!checker.changed("test.txt")); touchFile("test2.txt"); checker.changed("test2.txt"); ensure(!checker.changed("test2.txt")); } TEST_METHOD(5) { // File is changed if it didn't exist but has now been created. FileChangeChecker checker(10); checker.changed("test.txt"); checker.changed("test2.txt"); touchFile("test.txt"); touchFile("test2.txt"); ensure(checker.changed("test.txt")); ensure(checker.changed("test2.txt")); } TEST_METHOD(6) { // File is not changed if existed and has now been deleted. FileChangeChecker checker(10); touchFile("test.txt"); checker.changed("test.txt"); unlink("test.txt"); ensure("test.txt is not considered changed if it has been deleted", !checker.changed("test.txt")); touchFile("test2.txt"); checker.changed("test2.txt"); unlink("test2.txt"); ensure("test2.txt is not considered changed if it has been deleted", !checker.changed("test2.txt")); } TEST_METHOD(7) { // File is changed if its mtime changed. FileChangeChecker checker(1); touchFile("test.txt", 5); checker.changed("test.txt"); touchFile("test.txt", 10); ensure("First check: changed", checker.changed("test.txt")); ensure("Second check: unchanged", !checker.changed("test.txt")); touchFile("test2.txt", 5); checker.changed("test2.txt"); touchFile("test2.txt", 10); ensure("First check test2.txt: changed", checker.changed("test2.txt")); ensure("Second check test2.txt: unchanged", !checker.changed("test2.txt")); } TEST_METHOD(8) { // If a file is not checked for the first time and its // information is still in the cache, but the directory // in which the file lives is now suddenly inaccessible, // then false is returned. if (geteuid() != 0) { // Root can read everything so no point in // testing if we're running as root. FileChangeChecker checker(10); TempDir d("test.tmp"); touchFile("test.tmp/test.txt", 1); checker.changed("test.tmp/test.txt"); touchFile("test.tmp/test.txt", 2); runShellCommand("chmod a= test.tmp"); ensure("First check returns false", !checker.changed("test.tmp/test.txt")); // Now make it accessible again... runShellCommand("chmod u=rwx test.tmp"); ensure("Second check returns true", checker.changed("test.tmp/test.txt")); } } TEST_METHOD(9) { // Throttling works. SystemTime::force(5); FileChangeChecker checker(1); checker.changed("test.txt", 3); touchFile("test.txt"); ensure(!checker.changed("test.txt", 3)); SystemTime::force(6); ensure(!checker.changed("test.txt", 3)); SystemTime::force(8); ensure(checker.changed("test.txt", 3)); ensure(!checker.changed("test.txt", 3)); } TEST_METHOD(10) { // Test scenario involving multiple files. FileChangeChecker checker(10); checker.changed("test.txt"); checker.changed("test2.txt"); checker.changed("test3.txt"); touchFile("test2.txt", 1); ensure(!checker.changed("test.txt")); ensure(checker.changed("test2.txt")); ensure(!checker.changed("test3.txt")); touchFile("test.txt", 2); touchFile("test3.txt", 3); ensure(checker.changed("test.txt")); ensure(!checker.changed("test2.txt")); ensure(checker.changed("test3.txt")); } TEST_METHOD(11) { // Different filenames are treated as different files. FileChangeChecker checker(10); checker.changed("test.txt"); checker.changed("./test.txt"); touchFile("test.txt", 1); ensure(checker.changed("test.txt")); ensure(checker.changed("./test.txt")); } TEST_METHOD(12) { if (geteuid() != 0) { // Root can read everything so no point in // testing if we're running as root. FileChangeChecker checker(10); TempDir d("test.tmp"); touchFile("test.tmp/test.txt", 1); checker.changed("test.tmp/test.txt"); touchFile("test.tmp/test.txt", 2); runShellCommand("chmod a= test.tmp"); ensure("(1)", !checker.changed("test.tmp/test.txt")); runShellCommand("chmod u=rwx test.tmp"); ensure("(2)", checker.changed("test.tmp/test.txt")); } } TEST_METHOD(13) { // Size limitation works. FileChangeChecker checker(2); touchFile("test.txt", 1); touchFile("test2.txt", 2); touchFile("test3.txt", 3); checker.changed("test.txt"); checker.changed("test2.txt"); checker.changed("test3.txt"); // test.txt is now removed from the file list. unlink("test.txt"); unlink("test2.txt"); unlink("test3.txt"); ensure("test2.txt is still in the file list", checker.knows("test2.txt")); ensure("test2.txt is not considered changed", !checker.changed("test2.txt")); ensure("test3.txt is still in the file list", checker.knows("test3.txt")); ensure("test3.txt is not considered changed", !checker.changed("test3.txt")); ensure("test.txt is removed from the file list", !checker.knows("test.txt")); } TEST_METHOD(14) { // Increasing the file list size dynamically works. FileChangeChecker checker(2); touchFile("test.txt", 1); touchFile("test2.txt", 2); touchFile("test3.txt", 3); checker.changed("test.txt"); checker.changed("test2.txt"); checker.changed("test3.txt"); // test.txt is now removed from the file list. checker.setMaxSize(3); unlink("test.txt"); unlink("test2.txt"); unlink("test3.txt"); ensure("test.txt is removed from the file list", !checker.knows("test.txt")); // The above changed() call should not remove test2.txt from the file list. ensure("test2.txt is still in the file list", checker.knows("test2.txt")); ensure("test3.txt is still in the file list", checker.knows("test3.txt")); checker.changed("test.txt"); checker.changed("test4.txt"); ensure("test2.txt is removed from the file list, again", !checker.knows("test2.txt")); } TEST_METHOD(16) { // Decreasing the file list size dynamically works, and will // remove the oldest entries. FileChangeChecker checker(4); checker.changed("test.txt"); checker.changed("test2.txt"); checker.changed("test3.txt"); checker.changed("test4.txt"); checker.setMaxSize(2); ensure(!checker.knows("test.txt")); ensure(!checker.knows("test2.txt")); ensure(checker.knows("test3.txt")); ensure(checker.knows("test4.txt")); checker.changed("test.txt"); ensure(!checker.knows("test3.txt")); } TEST_METHOD(17) { // An initial maxSize of 0 makes the file list's size unlimited. FileChangeChecker checker(0); checker.changed("test.txt"); checker.changed("test2.txt"); checker.changed("test3.txt"); checker.changed("test4.txt"); ensure(checker.knows("test.txt")); ensure(checker.knows("test2.txt")); ensure(checker.knows("test3.txt")); ensure(checker.knows("test4.txt")); } TEST_METHOD(18) { // Dynamically setting the file list size to 0 makes // the file list's size unlimited. FileChangeChecker checker(2); checker.changed("test.txt"); checker.changed("test2.txt"); checker.setMaxSize(0); checker.changed("test3.txt"); checker.changed("test4.txt"); ensure(checker.knows("test.txt")); ensure(checker.knows("test2.txt")); ensure(checker.knows("test3.txt")); ensure(checker.knows("test4.txt")); } TEST_METHOD(19) { // Changing the file list size dynamically from 0 to non-0 works; // it removes the oldest entries, if necessary. FileChangeChecker checker(0); checker.changed("test.txt"); checker.changed("test2.txt"); checker.changed("test3.txt"); checker.changed("test4.txt"); checker.changed("test5.txt"); checker.setMaxSize(2); ensure(!checker.knows("test.txt")); ensure(!checker.knows("test2.txt")); ensure(!checker.knows("test3.txt")); ensure(checker.knows("test4.txt")); ensure(checker.knows("test5.txt")); } } passenger-4.0.37/test/cxx/FileDescriptorTest.cpp000644 000765 000024 00000002622 12233035540 022261 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include "FileDescriptor.h" #include using namespace Passenger; namespace tut { struct FileDescriptorTest { int pipes[2]; FileDescriptorTest() { pipe(pipes); } ~FileDescriptorTest() { if (pipes[0] != -1) { close(pipes[0]); } if (pipes[1] != -1) { close(pipes[1]); } } }; DEFINE_TEST_GROUP(FileDescriptorTest); TEST_METHOD(1) { // Test constructors. FileDescriptor f; ensure_equals("An empty FileDescriptor has value -1", f, -1); int fd = pipes[0]; pipes[0] = -1; f = FileDescriptor(fd); ensure_equals("FileDescriptor takes the value of its constructor argument", f, fd); } TEST_METHOD(2) { // It closes the underlying file descriptor when the last // instance is destroyed. int reader = pipes[0]; pipes[0] = -1; { FileDescriptor f(reader); { FileDescriptor f2(f); } ensure("File descriptor is not closed if there are still live copies", write(pipes[1], "x", 1) != -1); } ensure("File descriptor is closed if the last live copy is dead", write(pipes[1], "x", 1) == -1); } TEST_METHOD(3) { // Calling close() will close the underlying file descriptor for all instances. int reader = pipes[0]; pipes[0] = -1; FileDescriptor f(reader); FileDescriptor f2(f); f.close(); ensure_equals(f, -1); ensure_equals(f2, -1); ensure(write(pipes[1], "x", 1) == -1); } } passenger-4.0.37/test/cxx/FilterSupportTest.cpp000644 000765 000024 00000026217 12233035540 022173 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include "agents/LoggingAgent/FilterSupport.h" #include #include #include #include using namespace Passenger; using namespace Passenger::FilterSupport; using namespace std; using namespace oxt; namespace tut { struct FilterSupportTest { SimpleContext ctx; bool eval(const StaticString &source, bool debug = false) { return Filter(source, debug).run(ctx); } bool validate(const StaticString &source) { try { Filter f(source); return true; } catch (const SyntaxError &) { return false; } } }; DEFINE_TEST_GROUP_WITH_LIMIT(FilterSupportTest, 100); /******** Generic tests *******/ TEST_METHOD(1) { // Filter source cannot be blank. try { Filter f(""); fail("SyntaxError expected for empty filter source"); } catch (const SyntaxError &) { // Success. } try { Filter f(" "); fail("SyntaxError expected for blank filter source"); } catch (const SyntaxError &) { // Success. } } TEST_METHOD(2) { // Test support for various fields. ctx.uri = "foo"; ctx.controller = "bar"; ctx.responseTime = 800; ctx.status = "200 OK"; ctx.statusCode = 201; ctx.gcTime = 30; ensure(eval( "uri == 'foo' " " && response_time == 800" " && response_time_without_gc == 770" " && status == '200 OK'" " && status_code == 201" " && gc_time == 30" )); } /******** String and regexp tests *******/ TEST_METHOD(5) { // Test string comparison Filter f("uri == \"hello world\""); ctx.uri = "hello world"; ensure("(1)", f.run(ctx)); ctx.uri = "something else"; ensure("(2)", !f.run(ctx)); } TEST_METHOD(6) { // Test string negative comparison Filter f("uri != \"hello world\""); ctx.uri = "hello world"; ensure("(1)", !f.run(ctx)); ctx.uri = "something else"; ensure("(2)", f.run(ctx)); } TEST_METHOD(7) { // Test string regexp matching Filter f("uri =~ /hello world/"); ctx.uri = "hello world"; ensure("(1)", f.run(ctx)); ctx.uri = "hello"; ensure("(2)", !f.run(ctx)); } TEST_METHOD(8) { // Test advanced string regexp matching Filter f("uri =~ /(hello|world)\\nhi/"); ctx.uri = "hello\nhi"; ensure("(1)", f.run(ctx)); ctx.uri = "world\nhi"; ensure("(2)", f.run(ctx)); ctx.uri = "hello\n"; ensure("(3)", !f.run(ctx)); } TEST_METHOD(9) { // Regexp matching is case-sensitive by default. Filter f("uri =~ /Hello World/"); ctx.uri = "hello world"; ensure(!f.run(ctx)); } TEST_METHOD(10) { // Regexp matching can be made case-insensitive. Filter f("uri =~ /Hello World/i"); ctx.uri = "hello world"; ensure(f.run(ctx)); } TEST_METHOD(11) { // Left operand may be a literal. Filter f("\"hello\" == \"hello\""); ensure("(1)", f.run(ctx)); f = Filter("\"hello\" == \"world\""); ensure("(2)", !f.run(ctx)); } TEST_METHOD(12) { // Right operand may be a field. Filter f("\"hello\" == uri"); ctx.uri = "hello"; ensure("(1)", f.run(ctx)); f = Filter("\"hello\" == uri"); ctx.uri = "world"; ensure("(2)", !f.run(ctx)); } TEST_METHOD(13) { // String syntax supports \\, \n, \r, \t ctx.uri = "hello\r\n\tworld\\"; ensure(Filter("uri == \"hello\\r\\n\\tworld\\\\\"").run(ctx)); } TEST_METHOD(14) { // Strings can also start and end with single quote characters. ctx.uri = "hello world"; ensure(Filter("uri == 'hello world'").run(ctx)); } TEST_METHOD(15) { // String begin and end quote characters must match. try { (void) Filter("uri == 'hello world\""); fail("Syntax error expected"); } catch (const SyntaxError &) { // Pass. } try { (void) Filter("uri == \"hello world'"); fail("Syntax error expected"); } catch (const SyntaxError &) { // Pass. } } TEST_METHOD(16) { // Regular expressions can also start with %r{ and end with }. ctx.uri = "hello world"; ensure(Filter("uri =~ %r{hello}").run(ctx)); try { (void) Filter("uri =~ /hello}"); fail("Syntax error expected"); } catch (const SyntaxError &) { // Pass. } try { (void) Filter("uri =~ %r{hello/"); fail("Syntax error expected"); } catch (const SyntaxError &) { // Pass. } } /******** Integer tests *******/ TEST_METHOD(20) { // Test integer equality comparison Filter f("response_time == 10"); ctx.responseTime = 10; ensure("(1)", f.run(ctx)); ctx.responseTime = 11; ensure("(2)", !f.run(ctx)); } TEST_METHOD(21) { // Test integer inequality comparison Filter f("response_time != 10"); ctx.responseTime = 10; ensure("(1)", !f.run(ctx)); ctx.responseTime = 11; ensure("(2)", f.run(ctx)); } TEST_METHOD(22) { // Test integer larger than comparison Filter f("response_time > 10"); ctx.responseTime = 11; ensure("(1)", f.run(ctx)); ctx.responseTime = 10; ensure("(2)", !f.run(ctx)); } TEST_METHOD(23) { // Test integer larger than or equals comparison Filter f("response_time >= 10"); ctx.responseTime = 10; ensure("(1)", f.run(ctx)); ctx.responseTime = 9; ensure("(2)", !f.run(ctx)); } TEST_METHOD(24) { // Test integer smaller than comparison Filter f("response_time < 10"); ctx.responseTime = 9; ensure("(1)", f.run(ctx)); ctx.responseTime = 10; ensure("(2)", !f.run(ctx)); } TEST_METHOD(25) { // Test integer smaller than or equals comparison Filter f("response_time <= 10"); ctx.responseTime = 10; ensure("(1)", f.run(ctx)); ctx.responseTime = 11; ensure("(2)", !f.run(ctx)); } TEST_METHOD(26) { // Negative integers work ctx.responseTime = -23; ensure(Filter("response_time == -23").run(ctx)); } TEST_METHOD(27) { // Left operand may be a literal. ensure("(1)", Filter("2 == 2").run(ctx)); ensure("(2)", !Filter("2 != 2").run(ctx)); ensure("(3)", Filter("1 < 2").run(ctx)); ensure("(4)", !Filter("1 < 0").run(ctx)); ensure("(5)", Filter("1 <= 1").run(ctx)); ensure("(6)", !Filter("1 <= 0").run(ctx)); ensure("(7)", Filter("2 > 1").run(ctx)); ensure("(8)", !Filter("2 > 2").run(ctx)); ensure("(9)", Filter("2 >= 2").run(ctx)); ensure("(10)", !Filter("2 >= 3").run(ctx)); } TEST_METHOD(28) { // Right operand may be a field. ctx.responseTime = 2; ensure("(1)", Filter("2 == response_time").run(ctx)); ensure("(2)", !Filter("2 != 2").run(ctx)); ensure("(3)", Filter("1 < response_time").run(ctx)); ctx.responseTime = 0; ensure("(4)", !Filter("1 < response_time").run(ctx)); ctx.responseTime = 1; ensure("(5)", Filter("1 <= response_time").run(ctx)); ctx.responseTime = 0; ensure("(6)", !Filter("1 <= response_time").run(ctx)); ctx.responseTime = 1; ensure("(7)", Filter("2 > response_time").run(ctx)); ctx.responseTime = 2; ensure("(8)", !Filter("2 > response_time").run(ctx)); ensure("(9)", Filter("2 >= response_time").run(ctx)); ctx.responseTime = 3; ensure("(10)", !Filter("2 >= response_time").run(ctx)); } /******** Boolean and expression combination tests *******/ TEST_METHOD(30) { ensure("(1)", Filter("true").run(ctx)); ensure("(2)", !Filter("false").run(ctx)); ensure("(3)", Filter("true && 1 == 1").run(ctx)); ensure("(4)", Filter("true || 1 == 0").run(ctx)); ensure("(5)", !Filter("false && 1 == 1").run(ctx)); ensure("(6)", !Filter("false || 1 == 0").run(ctx)); ensure("(7)", Filter("false || 1 == 1").run(ctx)); } TEST_METHOD(31) { ensure(Filter("true == true").run(ctx)); ensure(!Filter("true == false").run(ctx)); ensure(Filter("true != false").run(ctx)); ensure(!Filter("true != true").run(ctx)); ensure(Filter("false == false").run(ctx)); ensure(!Filter("false == true").run(ctx)); ensure(Filter("false != true").run(ctx)); ensure(!Filter("false != false").run(ctx)); } TEST_METHOD(32) { ensure("(1)", eval("true && true && true")); ensure("(2)", !eval("true && true && false")); ensure("(3)", !eval("true && false && false")); ensure("(4)", !eval("false && false && false")); ensure("(5)", !eval("false && true && false")); ensure("(6)", !eval("false && false && true")); ensure("(7)", !eval("false && true && false")); ensure("(8)", eval("true || true || true")); ensure("(9)", eval("true || true || false")); ensure("(10)", eval("true || false || false")); ensure("(11)", !eval("false || false || false")); ensure("(12)", eval("false || true || false")); ensure("(13)", eval("false || false || true")); ensure("(14)", eval("false || true || false")); ensure("(15)", eval("false || true && true")); ensure("(16)", !eval("true || false && false")); ensure("(17)", eval("true || (false && false)")); ctx.uri = "foo"; ctx.responseTime = 10; ensure("(20)", eval("uri == 'foo' && (response_time == 1 || response_time == 10)")); ensure("(21)", eval("(uri == 'foo' && response_time == 1) || response_time == 10")); } /******** Error tests *******/ TEST_METHOD(40) { // < does not work if left operand is a string ensure(!validate("'' < 1")); // < does not work if right operand is a string ensure(!validate("1 < ''")); // <= does not work if left operand is a string ensure(!validate("'' <= 1")); // <= does not work if right operand is a string ensure(!validate("1 <= ''")); // > does not work if left operand is a string ensure(!validate("'' > 1")); // > does not work if right operand is a string ensure(!validate("1 > ''")); // >= does not work if left operand is a string ensure(!validate("'' >= 1")); // >= does not work if right operand is a string ensure(!validate("1 >= ''")); // =~ does not work if left operand is not a string ensure(!validate("1 =~ //")); ensure(!validate("// =~ //")); ensure(!validate("false =~ //")); // =~ does not work if right operand is not a regexp ensure(!validate("'' =~ ''")); ensure(!validate("'' =~ 1")); ensure(!validate("'' =~ false")); } TEST_METHOD(41) { // Source must evaluate to a boolean. ensure(!validate("1")); ensure(!validate("'hello'")); ensure(!validate("/abc/")); } /******** ContextFromLog tests *******/ TEST_METHOD(50) { // It extracts information from the logs ContextFromLog ctx( "1234-abcd 1234 0 BEGIN: request processing (1235, 10, 10)\n" "1234-abcd 1240 1 URI: /foo\n" "1234-abcd 1241 2 Controller action: HomeController#index\n" "1234-abcd 1242 3 Status: 200 OK\n" "1234-abcd 1243 4 Initial GC time: 1\n" "1234-abcd 1244 5 Final GC time: 10\n" "1234-abcd 2234 10 END: request processing (2234, 10, 10)\n" ); ensure_equals(ctx.getURI(), "/foo"); ensure_equals(ctx.getController(), "HomeController"); ensure_equals(ctx.getResponseTime(), 46655); ensure_equals(ctx.getStatus(), "200 OK"); ensure_equals(ctx.getStatusCode(), 200); ensure_equals(ctx.getGcTime(), 9); } TEST_METHOD(51) { // It ignores empty lines and invalid lines ContextFromLog ctx( "\n" "\n" " \n" "1234-abcd 1234 0 URI: /foo\n" "URI: /bar\n" "\n" ); ensure_equals(ctx.getURI(), "/foo"); } TEST_METHOD(52) { // If the begin or end "request processing" event is not available // then it derives the response time from the entire transaction. ContextFromLog ctx( "1234-abcd 1234 0 ATTACH\n" "1234-abcd 1235 1 BEGIN: request processing (1235, 10, 10)\n" "1234-abcd 1236 2 DETACH\n" ); ensure_equals(ctx.getResponseTime(), 2); } } passenger-4.0.37/test/cxx/HttpHeaderBuffererTest.cpp000644 000765 000024 00000013026 12233035540 023054 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include #include #include #include using namespace Passenger; using namespace std; namespace tut { struct HttpHeaderBuffererTest { HttpHeaderBufferer bufferer; string input; HttpHeaderBuffererTest() { input = "HTTP/1.1 200 OK\r\n" "Content-Type: text/plain\r\n" "Connection: close\r\n" "\r\n"; } }; DEFINE_TEST_GROUP(HttpHeaderBuffererTest); TEST_METHOD(1) { // Test initial state. ensure(bufferer.acceptingInput()); ensure(!bufferer.hasError()); } TEST_METHOD(2) { // Test feeding a complete stream everything in one go. ensure_equals(bufferer.feed(input.data(), input.size()), input.size()); ensure(!bufferer.acceptingInput()); ensure(!bufferer.hasError()); ensure_equals("It does not copy any data", bufferer.getData().data(), input.data()); ensure_equals(bufferer.getData().size(), input.size()); } TEST_METHOD(3) { // Test feeding a complete stream byte by byte. const char *pos = input.data(); const char *end = input.data() + input.size(); while (pos < end) { ensure(bufferer.acceptingInput()); ensure(!bufferer.hasError()); ensure_equals(bufferer.feed(pos, 1), 1u); pos++; } ensure(!bufferer.acceptingInput()); ensure(!bufferer.hasError()); ensure("It copies the fed data into an internal buffer", bufferer.getData().data() != input.data()); ensure_equals(bufferer.getData(), input); } TEST_METHOD(4) { // Test feeding a complete stream in pieces of 2 bytes. const char *pos = input.data(); const char *end = input.data() + input.size(); while (pos < end) { ensure("(1)", bufferer.acceptingInput()); ensure("(2)", !bufferer.hasError()); size_t size = std::min(2, end - pos); ensure_equals(bufferer.feed(pos, size), size); pos += 2; } ensure("(3)", !bufferer.acceptingInput()); ensure("(4)", !bufferer.hasError()); ensure("It copies the fed data into an internal buffer", bufferer.getData().data() != input.data()); ensure_equals(bufferer.getData(), input); } TEST_METHOD(5) { // Test feeding a complete stream in pieces of 3 bytes. const char *pos = input.data(); const char *end = input.data() + input.size(); while (pos < end) { ensure("(1)", bufferer.acceptingInput()); ensure("(2)", !bufferer.hasError()); size_t size = std::min(3, end - pos); ensure_equals(bufferer.feed(pos, size), size); pos += 3; } ensure("(3)", !bufferer.acceptingInput()); ensure("(4)", !bufferer.hasError()); ensure("It copies the fed data into an internal buffer", bufferer.getData().data() != input.data()); ensure_equals(bufferer.getData(), input); } TEST_METHOD(20) { // It refuses to accept any more data after the header terminator until reset is called. string input2 = input; input2.append("hello world"); ensure_equals(bufferer.feed(input2.data(), input2.size()), input.size()); ensure(!bufferer.acceptingInput()); ensure(!bufferer.hasError()); ensure_equals(bufferer.getData().data(), input2.data()); ensure_equals(bufferer.getData(), input); ensure_equals(bufferer.feed(input.data(), input.size()), 0u); bufferer.reset(); ensure_equals(bufferer.feed(input2.data(), input2.size()), input.size()); ensure(!bufferer.acceptingInput()); ensure(!bufferer.hasError()); ensure_equals(bufferer.getData().data(), input2.data()); ensure_equals(bufferer.getData(), input); } TEST_METHOD(21) { // Same test as above, except we feed byte-by-byte. string input2 = input; input2.append("hello world"); const char *pos; const char *end; pos = input2.data(); end = input2.data() + input.size(); while (pos < end) { ensure_equals("(1)", bufferer.feed(pos, 1), 1u); pos++; } ensure(!bufferer.acceptingInput()); ensure(!bufferer.hasError()); end = input2.data() + input2.size(); while (pos < end) { ensure_equals("(2)", bufferer.feed(pos, 1), 0u); pos++; } ensure(!bufferer.acceptingInput()); ensure(!bufferer.hasError()); ensure(bufferer.getData().data() != input2.data()); ensure_equals(bufferer.getData(), input); bufferer.reset(); pos = input2.data(); end = input2.data() + input.size(); while (pos < end) { ensure_equals("(3)", bufferer.feed(pos, 1), 1u); pos++; } ensure(!bufferer.acceptingInput()); ensure(!bufferer.hasError()); end = input2.data() + input2.size(); while (pos < end) { ensure_equals("(4)", bufferer.feed(pos, 1), 0u); pos++; } ensure(!bufferer.acceptingInput()); ensure(!bufferer.hasError()); ensure(bufferer.getData().data() != input2.data()); ensure_equals(bufferer.getData(), input); } TEST_METHOD(22) { // Test inputting data larger than the max size. input.assign(1024, '\0'); bufferer.setMax(512); ensure_equals(bufferer.feed(input.data(), input.size()), 512u); ensure(!bufferer.acceptingInput()); ensure(bufferer.hasError()); } TEST_METHOD(23) { // Some as above, except we feed byte-by-byte. unsigned int i; bufferer.setMax(512); for (i = 0; i < 512; i++) { ensure_equals(bufferer.feed("\0", 1), 1u); } ensure(!bufferer.acceptingInput()); ensure(bufferer.hasError()); for (i = 0; i < 512; i++) { ensure_equals(bufferer.feed("\0", 1), 0u); } ensure(!bufferer.acceptingInput()); ensure(bufferer.hasError()); } TEST_METHOD(24) { // Test garbage. input.clear(); for (int i = 0; i < 256; i++) { input.append(1, (char) i); } bufferer.feed(input.data(), input.size()); ensure(bufferer.acceptingInput()); ensure(!bufferer.hasError()); } } passenger-4.0.37/test/cxx/IOUtilsTest.cpp000644 000765 000024 00000065132 12233035540 020700 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include #include #include #include #include #include #include using namespace Passenger; using namespace std; using namespace boost; using namespace oxt; namespace tut { static ssize_t writevResult; static int writevErrno; static int writevCalled; static string writevData; static ssize_t writev_mock(int fildes, const struct iovec *iov, int iovcnt) { if (writevResult >= 0) { string data; for (int i = 0; i < iovcnt && data.size() < (size_t) writevResult; i++) { data.append( (const char *) iov[i].iov_base, iov[i].iov_len); } data.resize(writevResult); writevData.append(data); } writevCalled++; errno = writevErrno; return writevResult; } struct IOUtilsTest { string restBuffer; IOUtilsTest() { writevResult = 0; writevErrno = 0; writevCalled = 0; writevData.clear(); setWritevFunction(writev_mock); } ~IOUtilsTest() { setWritevFunction(NULL); } Pipe createNonBlockingPipe() { Pipe p = createPipe(); setNonBlocking(p.second); return p; } static void writeDataAfterSomeTime(int fd, unsigned int sleepTimeInUsec) { try { syscalls::usleep(sleepTimeInUsec); syscalls::write(fd, "hi", 2); } catch (const boost::thread_interrupted &) { // Do nothing. } } static void writeDataSlowly(int fd, unsigned int bytesToWrite, unsigned int bytesPerSec) { try { for (unsigned i = 0; i < bytesToWrite && !this_thread::interruption_requested(); i++) { syscalls::write(fd, "x", 1); syscalls::usleep(1000000 / bytesPerSec); } } catch (const boost::thread_interrupted &) { // Do nothing. } } static void readDataAfterSomeTime(int fd, unsigned int sleepTimeInUsec) { try { char buf[1024 * 8]; syscalls::usleep(sleepTimeInUsec); syscalls::read(fd, buf, sizeof(buf)); } catch (const boost::thread_interrupted &) { // Do nothing. } } static void readDataSlowly(int fd, int bytesToRead, int bytesPerSec) { try { unsigned long long start = SystemTime::getUsec(); unsigned long long deadline = start + (bytesToRead * 1000000.0 / bytesPerSec); int alreadyRead = 0; while (alreadyRead < bytesToRead && !this_thread::interruption_requested()) { unsigned long long elapsed = SystemTime::getUsec(); double progress = (elapsed - start) / (double) (deadline - start); int shouldHaveRead = progress * bytesToRead; int shouldNowRead = shouldHaveRead - alreadyRead; if (shouldNowRead > 0) { char *buf = new char[shouldNowRead]; ssize_t ret = syscalls::read(fd, buf, shouldNowRead); int e = errno; delete buf; if (ret == -1) { throw SystemException("read error", e); } else if (ret == 0) { break; } alreadyRead += ret; } syscalls::usleep(1000); } } catch (const boost::thread_interrupted &) { // Do nothing. } } }; DEFINE_TEST_GROUP_WITH_LIMIT(IOUtilsTest, 100); /***** Test gatheredWrite() with empty input rest buffer *****/ TEST_METHOD(1) { // Test complete write of a single data buffer. StaticString data = "hello world"; writevResult = data.size(); ensure_equals(gatheredWrite(0, &data, 1, restBuffer), writevResult); ensure_equals(writevData, "hello world"); ensure(restBuffer.empty()); } TEST_METHOD(2) { // Test complete write of multiple data buffers. StaticString data[] = { "hello ", "world", "!!!!!!" }; writevResult = strlen("hello world!!!!!!"); ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "hello world!!!!!!"); ensure(restBuffer.empty()); } TEST_METHOD(3) { // Test partial write of a single data buffer. StaticString data = "hello world"; writevResult = 3; ensure_equals(gatheredWrite(0, &data, 1, restBuffer), writevResult); ensure_equals(writevData, "hel"); ensure_equals(restBuffer, "lo world"); } TEST_METHOD(4) { // Test partial write of multiple data buffers: // first buffer is partially written. StaticString data[] = { "hello ", "world", "!!!!!!" }; writevResult = 2; ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "he"); ensure_equals(restBuffer, "llo world!!!!!!"); } TEST_METHOD(5) { // Test partial write of multiple data buffers: // first buffer is completely written. StaticString data[] = { "hello ", "world", "!!!!!!" }; writevResult = 6; ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "hello "); ensure_equals(restBuffer, "world!!!!!!"); } TEST_METHOD(6) { // Test partial write of multiple data buffers: // non-first buffer is partially written. StaticString data[] = { "hello ", "world", "!!!!!!" }; writevResult = 8; ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "hello wo"); ensure_equals(restBuffer, "rld!!!!!!"); } TEST_METHOD(7) { // Test partial write of multiple data buffers: // non-first buffer is completely written. StaticString data[] = { "hello ", "world", "!!!!!!" }; writevResult = 11; ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "hello world"); ensure_equals(restBuffer, "!!!!!!"); } TEST_METHOD(8) { // Test failed write of a single data buffer: blocking error. StaticString data = "hello world"; writevResult = -1; writevErrno = EAGAIN; ensure_equals(gatheredWrite(0, &data, 1, restBuffer), 0); ensure_equals(restBuffer, "hello world"); } TEST_METHOD(9) { // Test failed write of a single data buffer: other error. StaticString data = "hello world"; writevResult = -1; writevErrno = EBADF; ssize_t ret = gatheredWrite(0, &data, 1, restBuffer); int e = errno; ensure_equals(ret, -1); ensure_equals(e, EBADF); ensure_equals("Rest buffer remains untouched", restBuffer, ""); } TEST_METHOD(10) { // Test failed write of multiple data buffers: blocking error. StaticString data[] = { "hello ", "world", "!!!" }; writevResult = -1; writevErrno = EAGAIN; ensure_equals(gatheredWrite(0, data, 3, restBuffer), 0); ensure_equals(restBuffer, "hello world!!!"); } TEST_METHOD(11) { // Test failed write of multiple data buffers: other error. StaticString data[] = { "hello ", "world", "!!!" }; writevResult = -1; writevErrno = EBADF; ssize_t ret = gatheredWrite(0, data, 3, restBuffer); int e = errno; ensure_equals(ret, -1); ensure_equals(e, EBADF); ensure_equals("Rest buffer remains untouched", restBuffer, ""); } TEST_METHOD(12) { // Test writing nothing. StaticString data[] = { "", "", "" }; ssize_t ret = gatheredWrite(0, data, 3, restBuffer); int e = errno; ensure_equals(ret, 0); ensure_equals(e, 0); ensure_equals(writevCalled, 0); ensure_equals(restBuffer, ""); } TEST_METHOD(13) { // Test writing multiple buffers where some are empty. StaticString data[] = { "hello ", "", "world" }; writevResult = strlen("hello world"); ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "hello world"); ensure_equals(restBuffer, ""); } /***** Test gatheredWrite() with non-empty input rest buffer *****/ TEST_METHOD(15) { // Test complete write with a single data buffer. restBuffer = "oh "; StaticString data = "hello world"; writevResult = restBuffer.size() + data.size(); ensure_equals(gatheredWrite(0, &data, 1, restBuffer), writevResult); ensure_equals(writevData, "oh hello world"); ensure(restBuffer.empty()); } TEST_METHOD(16) { // Test complete write with multiple data buffers. restBuffer = "oh "; StaticString data[] = { "hello ", "world", "!!!" }; writevResult = strlen("oh hello world!!!"); ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "oh hello world!!!"); ensure(restBuffer.empty()); } TEST_METHOD(17) { // Test partial write of a single data buffer. StaticString data = "hello world"; writevResult = 3; ensure_equals(gatheredWrite(0, &data, 1, restBuffer), writevResult); ensure_equals(writevData, "hel"); ensure_equals(restBuffer, "lo world"); } TEST_METHOD(18) { // Test partial write of multiple data buffers: // rest buffer is partially written. restBuffer = "oh "; StaticString data[] = { "hello ", "world", "!!!" }; writevResult = 2; ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "oh"); ensure_equals(restBuffer, " hello world!!!"); } TEST_METHOD(19) { // Test partial write of multiple data buffers: // rest buffer is completely written. restBuffer = "oh "; StaticString data[] = { "hello ", "world", "!!!" }; writevResult = strlen("oh "); ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "oh "); ensure_equals(restBuffer, "hello world!!!"); } TEST_METHOD(20) { // Test partial write of multiple data buffers: // first buffer is partially written. restBuffer = "oh "; StaticString data[] = { "hello ", "world", "!!!" }; writevResult = strlen("oh h"); ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "oh h"); ensure_equals(restBuffer, "ello world!!!"); } TEST_METHOD(21) { // Test partial write of multiple data buffers: // first buffer is completely written. restBuffer = "oh "; StaticString data[] = { "hello ", "world", "!!!" }; writevResult = strlen("oh hello "); ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "oh hello "); ensure_equals(restBuffer, "world!!!"); } TEST_METHOD(22) { // Test partial write of multiple data buffers: // non-first buffer is partially written. restBuffer = "oh "; StaticString data[] = { "hello ", "world", "!!!" }; writevResult = strlen("oh hello wo"); ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "oh hello wo"); ensure_equals(restBuffer, "rld!!!"); } TEST_METHOD(23) { // Test partial write of multiple data buffers: // non-first buffer is completely written. restBuffer = "oh "; StaticString data[] = { "hello ", "world", "!!!" }; writevResult = strlen("oh hello world"); ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "oh hello world"); ensure_equals(restBuffer, "!!!"); } TEST_METHOD(24) { // Test failed write of a single data buffer: blocking error. restBuffer = "oh "; StaticString data = "hello world"; writevResult = -1; writevErrno = EAGAIN; ensure_equals(gatheredWrite(0, &data, 1, restBuffer), 0); ensure_equals(restBuffer, "oh hello world"); } TEST_METHOD(25) { // Test failed write of a single data buffer: other error. restBuffer = "oh "; StaticString data = "hello world"; writevResult = -1; writevErrno = EBADF; ssize_t ret = gatheredWrite(0, &data, 1, restBuffer); int e = errno; ensure_equals(ret, -1); ensure_equals(e, EBADF); ensure_equals("Rest buffer remains untouched", restBuffer, "oh "); } TEST_METHOD(26) { // Test failed write of multiple data buffers: blocking error. restBuffer = "oh "; StaticString data[] = { "hello ", "world", "!!!" }; writevResult = -1; writevErrno = EAGAIN; ensure_equals(gatheredWrite(0, data, 3, restBuffer), 0); ensure_equals(restBuffer, "oh hello world!!!"); } TEST_METHOD(27) { // Test failed write of multiple data buffers: other error. restBuffer = "oh "; StaticString data[] = { "hello ", "world", "!!!" }; writevResult = -1; writevErrno = EBADF; ssize_t ret = gatheredWrite(0, data, 3, restBuffer); int e = errno; ensure_equals(ret, -1); ensure_equals(e, EBADF); ensure_equals("Rest buffer remains untouched", restBuffer, "oh "); } TEST_METHOD(28) { // Test writing multiple buffers that are all empty. restBuffer = "oh "; StaticString data[] = { "", "", "" }; writevResult = 3; ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "oh "); ensure_equals(restBuffer, ""); } TEST_METHOD(29) { // Test writing multiple buffers where one is empty. restBuffer = "oh "; StaticString data[] = { "hello ", "", "world" }; writevResult = strlen("oh hello world"); ensure_equals(gatheredWrite(0, data, 3, restBuffer), writevResult); ensure_equals(writevData, "oh hello world"); ensure_equals(restBuffer, ""); } /***** Test gatheredWrite() blocking version *****/ TEST_METHOD(35) { // It doesn't call writev() if requested to send 0 bytes. StaticString data[2] = { "", "" }; gatheredWrite(0, data, 2); ensure_equals(writevCalled, 0); } TEST_METHOD(36) { // Test sending all data in a single writev() call. StaticString data[] = { "hello", "my", "world" }; writevResult = strlen("hellomyworld"); gatheredWrite(0, data, 3); ensure_equals(writevData, "hellomyworld"); ensure_equals(writevCalled, 1); } TEST_METHOD(42) { // Test writing byte-by-byte. StaticString data[] = { "hello", "my", "world", "!!" }; writevResult = 1; gatheredWrite(0, data, 4); ensure_equals(writevCalled, (int) strlen("hellomyworld!!")); ensure_equals(writevData, "hellomyworld!!"); } TEST_METHOD(43) { // Test writev() writing in chunks of 2 bytes. StaticString data[] = { "hello", "my", "world", "!!" }; writevResult = 2; gatheredWrite(0, data, 4); ensure_equals(writevCalled, (int) strlen("hellomyworld!!") / 2); ensure_equals(writevData, "hellomyworld!!"); } static ssize_t writev_mock_44(int fildes, const struct iovec *iov, int iovcnt) { if (writevCalled == 3) { // Have the last call return 2 instead of 4. writevResult = 2; } return writev_mock(fildes, iov, iovcnt); } TEST_METHOD(44) { // Test writev() writing in chunks of 4 bytes. setWritevFunction(writev_mock_44); StaticString data[] = { "hello", "my", "world", "!!" }; writevResult = 4; gatheredWrite(0, data, 4); ensure_equals(writevCalled, 4); ensure_equals(writevData, "hellomyworld!!"); } TEST_METHOD(45) { // Test writev() timeout support. setWritevFunction(NULL); Pipe p = createPipe(); unsigned long long startTime = SystemTime::getUsec(); unsigned long long timeout = 30000; char data1[1024], data2[1024]; StaticString data[] = { StaticString(data1, sizeof(data1) - 1), StaticString(data2, sizeof(data2) - 1) }; memset(data1, 'x', sizeof(data1)); memset(data2, 'y', sizeof(data2)); try { for (int i = 0; i < 1024; i++) { gatheredWrite(p[1], data, 2, &timeout); } fail("TimeoutException expected"); } catch (const TimeoutException &) { unsigned long long elapsed = SystemTime::getUsec() - startTime; ensure("At least 29 msec have passed", elapsed >= 29000); ensure("At most 95 msec have passed", elapsed <= 95000); ensure(timeout <= 2000); } } /***** Test waitUntilReadable() *****/ TEST_METHOD(50) { // waitUntilReadable() waits for the specified timeout if no data is readable. Pipe p = createPipe(); unsigned long long timeout = 25000; ensure("No data is available", !waitUntilReadable(p.first, &timeout)); ensure("The passed time is deducted from the timeout", timeout < 5000); } TEST_METHOD(51) { // waitUntilReadable() waits for less than the specified timeout if data // is not available immediately but still available before the timeout. Pipe p = createPipe(); TempThread thr(boost::bind(&writeDataAfterSomeTime, p.second, 35000)); unsigned long long timeout = 1000000; ensure("Data is available", waitUntilReadable(p.first, &timeout)); ensure("At least 35 msec passed.", timeout <= 1000000 - 35000); ensure("At most 70 msec passed.", timeout >= 1000000 - 70000); // depends on system scheduler though } TEST_METHOD(52) { // waitUntilReadable() returns immediately if timeout is 0. Pipe p = createPipe(); unsigned long long timeout = 0; ensure("No data is available", !waitUntilReadable(p.first, &timeout)); ensure_equals("Timeout is not modified", timeout, 0u); write(p.second, "hi", 2); ensure("Data is available", waitUntilReadable(p.first, &timeout)); ensure_equals("Timeout is not modified", timeout, 0u); } TEST_METHOD(53) { // waitUntilReadable() returns immediately if there's data immediately available. Pipe p = createPipe(); unsigned long long timeout = 100000; write(p.second, "hi", 2); ensure("Data is available", waitUntilReadable(p.first, &timeout)); ensure("Timeout is not modified", timeout >= 100000 - 5000); } /***** Test readExact() *****/ TEST_METHOD(54) { // readExact() throws TimeoutException if no data is received within the timeout. Pipe p = createPipe(); unsigned long long timeout = 50000; char buf; try { readExact(p.first, &buf, 1, &timeout); fail("No TimeoutException thrown."); } catch (const TimeoutException &) { ensure("The passed time is deducted from timeout", timeout < 5000); } } TEST_METHOD(55) { // readExact() throws TimeoutException if not enough data is received within the timeout. Pipe p = createPipe(); unsigned long long timeout = 20000; char buf[100]; TempThread thr(boost::bind(&writeDataSlowly, p.second, sizeof(buf), 1)); try { readExact(p.first, &buf, sizeof(buf), &timeout); fail("No TimeoutException thrown."); } catch (const TimeoutException &) { ensure("The passed time is deducted from timeout", timeout < 5000); } } TEST_METHOD(56) { // readExact() throws TimeoutException if timeout is 0 and no data is immediately available. Pipe p = createPipe(); unsigned long long timeout = 0; char buf; try { readExact(p.first, &buf, 1, &timeout); fail("No TimeoutException thrown."); } catch (const TimeoutException &) { ensure_equals("Timeout unchanged", timeout, 0u); } } TEST_METHOD(57) { // readExact() throws TimeoutException if timeout is 0 and not enough data is // immediately available. Pipe p = createPipe(); unsigned long long timeout = 0; write(p.second, "hi", 2); try { char buf[100]; readExact(p.first, &buf, sizeof(buf), &timeout); fail("No TimeoutException thrown."); } catch (const TimeoutException &) { ensure_equals("Timeout is unchanged", timeout, 0u); } } TEST_METHOD(58) { // readExact() deducts the amount of time spent on waiting from the timeout variable. Pipe p = createPipe(); unsigned long long timeout = 100000; char buf[3]; // Spawn a thread that writes 100 bytes per second, i.e. each byte takes 10 msec. TempThread thr(boost::bind(&writeDataSlowly, p.second, 1000, 100)); // We read 3 bytes. ensure_equals(readExact(p.first, &buf, sizeof(buf), &timeout), 3u); ensure("Should have taken at least 20 msec", timeout <= 100000 - 20000); #ifdef __FreeBSD__ // Stupid timer resolution on FreeBSD... ensure("Should have taken at most 95 msec", timeout >= 100000 - 95000); #else ensure("Should have taken at most 50 msec", timeout >= 100000 - 40000); #endif } TEST_METHOD(59) { // readExact() does not wait and does not modify the timeout variable if there's // immediately enough data available. Pipe p = createPipe(); unsigned long long timeout = 100000; char buf[2]; write(p.second, "hi", 2); ensure_equals(readExact(p.first, &buf, 2, &timeout), 2u); ensure("Timeout not modified", timeout >= 95000); } /***** Test waitUntilWritable() *****/ TEST_METHOD(60) { // waitUntilWritable() waits for the specified timeout if no data is writable. Pipe p = createNonBlockingPipe(); writeUntilFull(p.second); unsigned long long timeout = 25000; ensure("Socket did not become writable", !waitUntilWritable(p.second, &timeout)); ensure("The passed time is deducted from the timeout", timeout < 5000); } TEST_METHOD(61) { // waitUntilWritable() waits for less than the specified timeout if the fd // is not immediately writable but still writable before the timeout. Pipe p = createNonBlockingPipe(); writeUntilFull(p.second); TempThread thr(boost::bind(&readDataAfterSomeTime, p.first, 35000)); unsigned long long timeout = 1000000; ensure("Socket became writable", waitUntilWritable(p.second, &timeout)); ensure("At least 35 msec passed.", timeout <= 1000000 - 35000); ensure("At most 70 msec passed.", timeout >= 1000000 - 70000); // depends on system scheduler though } TEST_METHOD(62) { // waitUntilWritable() returns immediately if timeout is 0. Pipe p = createNonBlockingPipe(); writeUntilFull(p.second); unsigned long long timeout = 0; ensure("Socket is not writable", !waitUntilWritable(p.second, &timeout)); ensure_equals("Timeout is not modified", timeout, 0u); char buf[1024 * 8]; read(p.first, buf, sizeof(buf)); ensure("Socket became writable", waitUntilWritable(p.second, &timeout)); ensure_equals("Timeout is not modified", timeout, 0u); } TEST_METHOD(63) { // waitUntilWritable() returns immediately if the fd is immediately writable. Pipe p = createNonBlockingPipe(); writeUntilFull(p.second); unsigned long long timeout = 100000; char buf[1024 * 8]; read(p.first, buf, sizeof(buf)); ensure("Socket became writable", waitUntilWritable(p.second, &timeout)); ensure("Timeout is not modified", timeout >= 100000 - 5000); } /***** Test readExact() *****/ TEST_METHOD(64) { // writeExact() throws TimeoutException if fd does not become writable within the timeout. Pipe p = createNonBlockingPipe(); writeUntilFull(p.second); unsigned long long timeout = 50000; try { writeExact(p.second, "x", 1, &timeout); fail("No TimeoutException thrown."); } catch (const TimeoutException &) { ensure("The passed time is deducted from timeout", timeout < 5000); } } TEST_METHOD(65) { // writeExact() throws TimeoutException if not enough data is written within the timeout. Pipe p = createNonBlockingPipe(); writeUntilFull(p.second); unsigned long long timeout = 20000; char buf[1024 * 3]; TempThread thr(boost::bind(&readDataSlowly, p.first, sizeof(buf), 512)); try { writeExact(p.second, "x", 1, &timeout); fail("No TimeoutException thrown."); } catch (const TimeoutException &) { ensure("The passed time is deducted from timeout", timeout < 5000); } } TEST_METHOD(66) { // writeExact() throws TimeoutException if timeout is 0 and the fd is not immediately writable. Pipe p = createNonBlockingPipe(); writeUntilFull(p.second); unsigned long long timeout = 0; try { writeExact(p.second, "x", 1, &timeout); fail("No TimeoutException thrown."); } catch (const TimeoutException &) { ensure_equals("Timeout unchanged", timeout, 0u); } } TEST_METHOD(67) { // writeExact() throws TimeoutException if timeout is 0 not enough data could be written immediately. Pipe p = createNonBlockingPipe(); writeUntilFull(p.second); unsigned long long timeout = 0; char buf[1024]; read(p.first, buf, sizeof(buf)); char buf2[1024 * 8]; memset(buf2, 0, sizeof(buf2)); try { writeExact(p.second, buf2, sizeof(buf2), &timeout); fail("No TimeoutException thrown."); } catch (const TimeoutException &) { ensure_equals("Timeout is unchanged", timeout, 0u); } } TEST_METHOD(68) { // readExact() deducts the amount of time spent on waiting from the timeout variable. Pipe p = createNonBlockingPipe(); unsigned long long timeout = 100000; // Spawn a thread that reads 200000 bytes in 35 msec. TempThread thr(boost::bind(&readDataSlowly, p.first, 5714286, 5714286)); // We write 200000 bytes. char buf[200000]; writeExact(p.second, &buf, sizeof(buf), &timeout); ensure("Should have taken at least 20 msec", timeout <= 100000 - 20000); ensure("Should have taken at most 95 msec", timeout >= 100000 - 95000); } TEST_METHOD(69) { // writeExact() does not wait and does not modify the timeout variable if // all data can be written immediately. Pipe p = createNonBlockingPipe(); unsigned long long timeout = 100000; char buf[1024]; writeExact(p.second, buf, sizeof(buf), &timeout); ensure("Timeout not modified", timeout >= 95000); } /***** Test getSocketAddressType() *****/ TEST_METHOD(70) { ensure_equals(getSocketAddressType(""), SAT_UNKNOWN); ensure_equals(getSocketAddressType("/foo.socket"), SAT_UNKNOWN); ensure_equals(getSocketAddressType("unix:"), SAT_UNKNOWN); ensure_equals(getSocketAddressType("unix:/"), SAT_UNIX); ensure_equals(getSocketAddressType("unix:/foo.socket"), SAT_UNIX); ensure_equals(getSocketAddressType("tcp:"), SAT_UNKNOWN); ensure_equals(getSocketAddressType("tcp://"), SAT_UNKNOWN); // Doesn't check whether it contains port ensure_equals(getSocketAddressType("tcp://127.0.0.1"), SAT_TCP); ensure_equals(getSocketAddressType("tcp://127.0.0.1:80"), SAT_TCP); } TEST_METHOD(71) { ensure_equals(parseUnixSocketAddress("unix:/foo.socket"), "/foo.socket"); try { parseUnixSocketAddress("unix:"); fail("ArgumentException expected"); } catch (const ArgumentException &e) { // Pass. } } TEST_METHOD(72) { string host; unsigned short port; parseTcpSocketAddress("tcp://127.0.0.1:80", host, port); ensure_equals(host, "127.0.0.1"); ensure_equals(port, 80); try { parseTcpSocketAddress("tcp://", host, port); fail("ArgumentException expected"); } catch (const ArgumentException &e) { // Pass. } } /***** Test readFileDescriptor() and writeFileDescriptor() *****/ TEST_METHOD(80) { // Test whether it works. SocketPair sockets = createUnixSocketPair(); Pipe pipes = createPipe(); writeFileDescriptor(sockets[0], pipes[1]); FileDescriptor fd(readFileDescriptor(sockets[1])); writeExact(fd, "hello"); char buf[6]; ensure_equals(readExact(pipes[0], buf, 5), 5u); buf[5] = '\0'; ensure_equals(StaticString(buf), "hello"); } TEST_METHOD(81) { // Test whether timeout works. SocketPair sockets = createUnixSocketPair(); Pipe pipes = createPipe(); unsigned long long timeout = 30000; unsigned long long startTime = SystemTime::getUsec(); try { FileDescriptor fd(readFileDescriptor(sockets[0], &timeout)); fail("TimeoutException expected"); } catch (const TimeoutException &) { unsigned long long elapsed = SystemTime::getUsec() - startTime; ensure("readFileDescriptor() timed out after at least 29 msec", elapsed >= 29000); ensure("readFileDescriptor() timed out after at most 95 msec", elapsed <= 95000); ensure(timeout <= 2000); } writeUntilFull(sockets[0]); startTime = SystemTime::getUsec(); timeout = 30000; try { writeFileDescriptor(sockets[0], pipes[0], &timeout); fail("TimeoutException expected"); } catch (const TimeoutException &) { unsigned long long elapsed = SystemTime::getUsec() - startTime; ensure("writeFileDescriptor() timed out after 30 msec", elapsed >= 29000 && elapsed <= 95000); ensure(timeout <= 2000); } } } passenger-4.0.37/test/cxx/MessageIOTest.cpp000644 000765 000024 00000023076 12233035540 021165 0ustar00honglistaff000000 000000 #include #include #include #include using namespace Passenger; using namespace std; using namespace boost; namespace tut { struct MessageIOTest { Pipe pipes; MessageIOTest() { pipes = createPipe(); } }; DEFINE_TEST_GROUP(MessageIOTest); /***** Test readUint16() and writeUint16() *****/ TEST_METHOD(1) { // They work. writeUint16(pipes[1], 0x3F56); writeUint16(pipes[1], 0x3F57); writeUint16(pipes[1], 0x3F58); unsigned char buf[2]; ensure_equals(readExact(pipes[0], buf, 2), 2u); ensure_equals(buf[0], 0x3F); ensure_equals(buf[1], 0x56); ensure_equals(readUint16(pipes[0]), 0x3F57u); uint16_t out; ensure(readUint16(pipes[0], out)); ensure_equals(out, 0x3F58); } TEST_METHOD(2) { // readUint16() throws EOFException on premature EOF. writeExact(pipes[1], "x", 1); pipes[1].close(); try { readUint16(pipes[0]); fail("EOFException expected"); } catch (const EOFException &) { } } TEST_METHOD(3) { // readUint16(uint32_t &) returns false EOFException on premature EOF. writeExact(pipes[1], "x", 1); pipes[1].close(); uint16_t out; ensure(!readUint16(pipes[0], out)); } TEST_METHOD(4) { // Test timeout. unsigned long long timeout = 30000; unsigned long long startTime = SystemTime::getUsec(); try { readUint16(pipes[0], &timeout); fail("TimeoutException expected"); } catch (const TimeoutException &) { unsigned long long elapsed = SystemTime::getUsec() - startTime; ensure("About 30 ms elapsed (1)", elapsed >= 29000 && elapsed <= 95000); ensure("Time is correctly deducted from 'timeout' (1)", timeout <= 2000); } writeUntilFull(pipes[1]); timeout = 30000; startTime = SystemTime::getUsec(); try { writeUint16(pipes[1], 0x12, &timeout); fail("TimeoutException expected"); } catch (const TimeoutException &) { unsigned long long elapsed = SystemTime::getUsec() - startTime; ensure("About 30 ms elapsed (3)", elapsed >= 29000 && elapsed <= 95000); ensure("Time is correctly deducted from 'timeout' (4)", timeout <= 2000); } } /***** Test readUint32() and writeUint32() *****/ TEST_METHOD(10) { // They work. writeUint32(pipes[1], 0x12343F56); writeUint32(pipes[1], 0x12343F57); writeUint32(pipes[1], 0x12343F58); unsigned char buf[4]; ensure_equals(readExact(pipes[0], buf, 4), 4u); ensure_equals(buf[0], 0x12); ensure_equals(buf[1], 0x34); ensure_equals(buf[2], 0x3F); ensure_equals(buf[3], 0x56); ensure_equals(readUint32(pipes[0]), 0x12343F57u); uint32_t out; ensure(readUint32(pipes[0], out)); ensure_equals(out, 0x12343F58u); } TEST_METHOD(11) { // readUint32() throws EOFException on premature EOF. writeExact(pipes[1], "xyz", 3); pipes[1].close(); try { readUint32(pipes[0]); fail("EOFException expected"); } catch (const EOFException &) { } } TEST_METHOD(12) { // readUint16(uint32_t &) returns false EOFException on premature EOF. writeExact(pipes[1], "xyz", 3); pipes[1].close(); uint32_t out; ensure(!readUint32(pipes[0], out)); } TEST_METHOD(13) { // Test timeout. unsigned long long timeout = 30000; unsigned long long startTime = SystemTime::getUsec(); try { readUint32(pipes[0], &timeout); fail("TimeoutException expected"); } catch (const TimeoutException &) { unsigned long long elapsed = SystemTime::getUsec() - startTime; ensure(elapsed >= 29000 && elapsed <= 90000); ensure(timeout <= 2000); } writeUntilFull(pipes[1]); timeout = 30000; startTime = SystemTime::getUsec(); try { writeUint32(pipes[1], 0x1234, &timeout); fail("TimeoutException expected"); } catch (const TimeoutException &) { unsigned long long elapsed = SystemTime::getUsec() - startTime; ensure(elapsed >= 29000 && elapsed <= 90000); ensure(timeout <= 2000); } } /***** Test readArrayMessage() and writeArrayMessage() *****/ TEST_METHOD(20) { // Test <= 10 arguments. writeArrayMessage(pipes[1], "ab", "cd", "efg", NULL); writeArrayMessage(pipes[1], "ab", "cd", "efh", NULL); unsigned char buf[12]; readExact(pipes[0], buf, 12); ensure_equals(buf[0], 0u); ensure_equals(buf[1], 10u); ensure_equals(buf[2], 'a'); ensure_equals(buf[3], 'b'); ensure_equals(buf[4], '\0'); ensure_equals(buf[5], 'c'); ensure_equals(buf[6], 'd'); ensure_equals(buf[7], '\0'); ensure_equals(buf[8], 'e'); ensure_equals(buf[9], 'f'); ensure_equals(buf[10], 'g'); ensure_equals(buf[11], '\0'); vector args = readArrayMessage(pipes[0]); ensure_equals(args.size(), 3u); ensure_equals(args[0], "ab"); ensure_equals(args[1], "cd"); ensure_equals(args[2], "efh"); } TEST_METHOD(21) { // Test > 10 arguments. writeArrayMessage(pipes[1], "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", NULL); writeArrayMessage(pipes[1], "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", NULL); unsigned char buf[26]; readExact(pipes[0], buf, 26); ensure_equals(buf[0], 0u); ensure_equals(buf[1], 24u); ensure_equals(buf[2], '1'); ensure_equals(buf[3], '\0'); ensure_equals(buf[4], '2'); ensure_equals(buf[5], '\0'); ensure_equals(buf[6], '3'); ensure_equals(buf[7], '\0'); ensure_equals(buf[8], '4'); ensure_equals(buf[9], '\0'); ensure_equals(buf[10], '5'); ensure_equals(buf[11], '\0'); ensure_equals(buf[12], '6'); ensure_equals(buf[13], '\0'); ensure_equals(buf[14], '7'); ensure_equals(buf[15], '\0'); ensure_equals(buf[16], '8'); ensure_equals(buf[17], '\0'); ensure_equals(buf[18], '9'); ensure_equals(buf[19], '\0'); ensure_equals(buf[20], '0'); ensure_equals(buf[21], '\0'); ensure_equals(buf[22], 'a'); ensure_equals(buf[23], '\0'); ensure_equals(buf[24], 'b'); ensure_equals(buf[25], '\0'); vector args = readArrayMessage(pipes[0]); ensure_equals(args.size(), 12u); ensure_equals(args[0], "c"); ensure_equals(args[1], "d"); ensure_equals(args[2], "e"); ensure_equals(args[3], "f"); ensure_equals(args[4], "g"); ensure_equals(args[5], "h"); ensure_equals(args[6], "i"); ensure_equals(args[7], "j"); ensure_equals(args[8], "k"); ensure_equals(args[9], "l"); ensure_equals(args[10], "m"); ensure_equals(args[11], "n"); } TEST_METHOD(22) { // readArrayMessage() throws EOFException on premature EOF. writeExact(pipes[1], "\x00"); pipes[1].close(); try { readArrayMessage(pipes[0]); fail("EOFException expected (1)"); } catch (const EOFException &) { } pipes = createPipe(); writeExact(pipes[1], "\x00\x04a\x00b"); pipes[1].close(); try { readArrayMessage(pipes[0]); fail("EOFException expected (2)"); } catch (const EOFException &) { } } TEST_METHOD(23) { // Test timeout. unsigned long long timeout = 30000; unsigned long long startTime = SystemTime::getUsec(); try { readArrayMessage(pipes[0], &timeout); fail("TimeoutException expected (1)"); } catch (const TimeoutException &) { unsigned long long elapsed = SystemTime::getUsec() - startTime; ensure(elapsed >= 29000 && elapsed <= 90000); ensure(timeout <= 2000); } writeUntilFull(pipes[1]); timeout = 30000; startTime = SystemTime::getUsec(); try { writeArrayMessage(pipes[1], &timeout, "hi", "ho", NULL); fail("TimeoutException expected (2)"); } catch (const TimeoutException &) { unsigned long long elapsed = SystemTime::getUsec() - startTime; ensure(elapsed >= 29000 && elapsed <= 90000); ensure(timeout <= 2000); } } /***** Test readScalarMessage() and writeScalarMessage() *****/ TEST_METHOD(30) { // They work. writeScalarMessage(pipes[1], "hello"); writeScalarMessage(pipes[1], "world"); unsigned char buf[4 + 5]; readExact(pipes[0], buf, 4 + 5); ensure_equals(buf[0], 0u); ensure_equals(buf[1], 0u); ensure_equals(buf[2], 0u); ensure_equals(buf[3], 5u); ensure_equals(buf[4], 'h'); ensure_equals(buf[5], 'e'); ensure_equals(buf[6], 'l'); ensure_equals(buf[7], 'l'); ensure_equals(buf[8], 'o'); ensure_equals(readScalarMessage(pipes[0]), "world"); } TEST_METHOD(31) { // readScalarMessage() throws EOFException on premature EOF. writeExact(pipes[1], StaticString("\x00", 1)); pipes[1].close(); try { readScalarMessage(pipes[0]); fail("EOFException expected (1)"); } catch (const EOFException &) { } pipes = createPipe(); writeExact(pipes[1], StaticString("\x00\x00\x00\x04" "abc", 4 + 3)); pipes[1].close(); try { readScalarMessage(pipes[0]); fail("EOFException expected (2)"); } catch (const EOFException &) { } } TEST_METHOD(32) { // readScalarMessage() throws SecurityException if the // body larger than the limit writeExact(pipes[1], StaticString("\x00\x00\x00\x05", 4)); try { readScalarMessage(pipes[0], 4); fail("SecurityException expected (1)"); } catch (const SecurityException &) { } } TEST_METHOD(33) { // Test timeout. unsigned long long timeout = 30000; unsigned long long startTime = SystemTime::getUsec(); try { readScalarMessage(pipes[0], 0, &timeout); fail("TimeoutException expected (1)"); } catch (const TimeoutException &) { unsigned long long elapsed = SystemTime::getUsec() - startTime; ensure(elapsed >= 29000 && elapsed <= 90000); ensure(timeout <= 2000); } writeUntilFull(pipes[1]); timeout = 30000; startTime = SystemTime::getUsec(); try { writeScalarMessage(pipes[1], "hello", &timeout); fail("TimeoutException expected (2)"); } catch (const TimeoutException &) { unsigned long long elapsed = SystemTime::getUsec() - startTime; ensure(elapsed >= 29000 && elapsed <= 90000); ensure(timeout <= 2000); } } } passenger-4.0.37/test/cxx/MessagePassingTest.cpp000644 000765 000024 00000003772 12233035540 022263 0ustar00honglistaff000000 000000 #include #include #include #include using namespace Passenger; using namespace std; namespace tut { struct MessagePassingTest { MessageBoxPtr box; MessagePassingTest() { box = boost::make_shared(); } void sendMessagesLater() { syscalls::usleep(20000); box->send("hi"); syscalls::usleep(20000); box->send("ho"); } }; DEFINE_TEST_GROUP(MessagePassingTest); TEST_METHOD(1) { // Sending and receiving 1 message. box->send("hi"); ensure_equals(box->size(), 1u); ensure_equals(box->recv("hi")->name, "hi"); ensure_equals(box->size(), 0u); } TEST_METHOD(2) { // Sending and receiving multiple messages out of order. box->send("ho"); box->send("hi"); box->send("ha"); ensure_equals(box->size(), 3u); ensure_equals(box->recv("hi")->name, "hi"); ensure_equals(box->size(), 2u); ensure_equals(box->recv("ho")->name, "ho"); ensure_equals(box->size(), 1u); ensure_equals(box->recv("ha")->name, "ha"); ensure_equals(box->size(), 0u); } TEST_METHOD(3) { // Receive with zero timeout. unsigned long long timeout = 0; Timer timer; ensure_equals(box->recv("hi", &timeout), MessagePtr()); ensure(timer.elapsed() < 10); ensure_equals(timeout, 0ull); } TEST_METHOD(4) { // Receive with non-zero timeout. unsigned long long timeout = 20000; Timer timer; ensure_equals(box->recv("hi", &timeout), MessagePtr()); ensure("(1)", timer.elapsed() >= 19); ensure("(2)", timer.elapsed() < 95); ensure("(3)", timeout >= 19000ull); } TEST_METHOD(5) { // Test waiting with timeout. TempThread thr(boost::bind(&MessagePassingTest::sendMessagesLater, this)); unsigned long long timeout = 200000; Timer timer; ensure_equals(box->recv("ho", &timeout)->name, "ho"); ensure(timer.elapsed() >= 39); ensure(timer.elapsed() < 95); ensure_equals(box->size(), 1u); ensure_equals(box->recv("hi")->name, "hi"); ensure_equals(box->size(), 0u); ensure(timeout >= 140000); } } passenger-4.0.37/test/cxx/MessageReadersWritersTest.cpp000644 000765 000024 00000035032 12233035540 023616 0ustar00honglistaff000000 000000 #include #include #include using namespace Passenger; using namespace std; namespace tut { struct MessageReadersWritersTest { }; DEFINE_TEST_GROUP(MessageReadersWritersTest); /****** Test Uint16Message ******/ TEST_METHOD(1) { // Test initial state. Uint16Message m; ensure(!m.done()); ensure_equals((int) sizeof(uint16_t), (int) 2); } TEST_METHOD(2) { // Test feeding 0 bytes. Uint16Message m; for (int i = 0; i < 100; i++) { ensure_equals(m.feed("", 0), (size_t) 0); ensure(!m.done()); } } TEST_METHOD(3) { // Test feeding bytes one-by-one until complete. Uint16Message m; ensure_equals(m.feed("\xFF", 1), (size_t) 1); ensure(!m.done()); ensure_equals(m.feed("\xAB", 1), (size_t) 1); ensure(m.done()); ensure_equals(m.value(), 65451); } TEST_METHOD(4) { // Test feeding a complete uint16. Uint16Message m; ensure_equals(m.feed("\xAB\x0F", 2), (size_t) 2); ensure(m.done()); ensure_equals(m.value(), 43791); } TEST_METHOD(5) { // Test feeding a message and garbage in 1 feed command. Uint16Message m; ensure_equals(m.feed("\xAB\x0Fzzzzz", 7), (size_t) 2); ensure(m.done()); ensure_equals(m.value(), 43791); } TEST_METHOD(6) { // Test feeding garbage after having fed a complete uint16. Uint16Message m; m.feed("\xAB\x0F", 2); ensure_equals(m.feed("zzzzz", 5), (size_t) 0); ensure(m.done()); ensure_equals(m.value(), 43791); } TEST_METHOD(7) { // Test reset. Uint16Message m; m.feed("\xAB\x0F", 2); m.reset(); ensure_equals(m.feed("\x0F\xAB", 2), (size_t) 2); ensure(m.done()); ensure_equals(m.value(), 4011); } TEST_METHOD(8) { // Test generate. char buf[2]; Uint16Message::generate(buf, 12345); ensure(memcmp(buf, "\x30\x39", 2) == 0); } /****** Test Uint32Message ******/ TEST_METHOD(11) { // Test initial state. Uint32Message m; ensure(!m.done()); ensure_equals((int) sizeof(uint32_t), (int) 4); } TEST_METHOD(12) { // Test feeding 0 bytes. Uint32Message m; for (int i = 0; i < 100; i++) { ensure_equals(m.feed("", 0), (size_t) 0); ensure(!m.done()); } } TEST_METHOD(13) { // Test feeding bytes one-by-one until complete. Uint32Message m; ensure_equals(m.feed("\xFF", 1), (size_t) 1); ensure(!m.done()); ensure_equals(m.feed("\xAB", 1), (size_t) 1); ensure(!m.done()); ensure_equals(m.feed("\x99", 1), (size_t) 1); ensure(!m.done()); ensure_equals(m.feed("\xCC", 1), (size_t) 1); ensure(m.done()); ensure_equals(m.value(), 4289436108u); } TEST_METHOD(14) { // Test feeding a complete uint32. Uint32Message m; ensure_equals(m.feed("\xAB\x0F\x99\xCC", 4), (size_t) 4); ensure(m.done()); ensure_equals(m.value(), 2869926348u); } TEST_METHOD(15) { // Test feeding a message and garbage in 1 feed command. Uint32Message m; ensure_equals(m.feed("\xAB\x0F\x99\xCCzzzzz", 9), (size_t) 4); ensure(m.done()); ensure_equals(m.value(), 2869926348u); } TEST_METHOD(16) { // Test feeding garbage after having fed a complete uint32. Uint32Message m; m.feed("\xAB\x0F\x99\xCC", 4); ensure_equals(m.feed("zzzzz", 5), (size_t) 0); ensure(m.done()); ensure_equals(m.value(), 2869926348u); } TEST_METHOD(17) { // Test reset. Uint32Message m; m.feed("\xAB\x0F\x99\xCC", 2); m.reset(); ensure_equals(m.feed("\x00\x11\x22\x33", 4), (size_t) 4); ensure(m.done()); ensure_equals(m.value(), 1122867u); } TEST_METHOD(18) { // Test generate. char buf[4]; Uint32Message::generate(buf, 1234567890); ensure(memcmp(buf, "\x49\x96\x02\xD2", 4) == 0); } /****** Test ArrayMessage ******/ TEST_METHOD(21) { // Test initial state. ArrayMessage m; ensure(!m.done()); ensure(!m.hasError()); } TEST_METHOD(22) { // Test feeding 0 bytes. ArrayMessage m; for (int i = 0; i < 100; i++) { ensure_equals(m.feed("", 0), (size_t) 0); ensure(!m.done()); ensure(!m.hasError()); } } TEST_METHOD(23) { // Test feeding bytes one-by-one until complete. ArrayMessage m; ensure_equals(m.feed("\x00", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); ensure_equals(m.feed("\x07", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); ensure_equals(m.feed("a", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); ensure_equals(m.feed("b", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); ensure_equals(m.feed("\0", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); ensure_equals(m.feed("c", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); ensure_equals(m.feed("d", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); ensure_equals(m.feed("e", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); ensure_equals(m.feed("\0", 1), (size_t) 1); ensure(m.done()); ensure(!m.hasError()); const vector &value = m.value(); ensure_equals(value.size(), 2u); ensure(value[0] == "ab"); ensure(value[1] == "cde"); } TEST_METHOD(24) { // Test feeding a complete message. ArrayMessage m; const char *buf = "\x00\x07" "ab\0cde\0"; ensure_equals(m.feed(buf, 9), (size_t) 9); ensure(m.done()); ensure(!m.hasError()); const vector &value = m.value(); ensure_equals(value.size(), 2u); ensure(value[0] == "ab"); ensure(value[1] == "cde"); // Because we fed a complete message in 1 command, // the staticstrings will point to the original buffer. ensure_equals(value[0].data(), buf + 2); ensure_equals(value[1].data(), buf + 5); } TEST_METHOD(25) { // Test feeding a message and garbage in 1 feed command. ArrayMessage m; const char *buf = "\x00\x07" "ab\0cde\0" "zzzzz"; ensure_equals(m.feed(buf, 14), (size_t) 9); ensure(m.done()); ensure(!m.hasError()); const vector &value = m.value(); ensure_equals(value.size(), 2u); ensure(value[0] == "ab"); ensure(value[1] == "cde"); ensure_equals(value[0].data(), buf + 2); ensure_equals(value[1].data(), buf + 5); } TEST_METHOD(26) { // Test feeding garbage after having fed a complete message in 1 feed command. ArrayMessage m; const char *buf = "\x00\x07" "ab\0cde\0"; m.feed(buf, 9); ensure_equals(m.feed("zzzzz", 5), (size_t) 0); ensure(m.done()); ensure(!m.hasError()); const vector &value = m.value(); ensure_equals(value.size(), 2u); ensure(value[0] == "ab"); ensure(value[1] == "cde"); ensure_equals(value[0].data(), buf + 2); ensure_equals(value[1].data(), buf + 5); } TEST_METHOD(27) { // Test feeding garbage after having fed a complete message one-by-one byte. ArrayMessage m; m.feed("\x00", 1); m.feed("\x07", 1); m.feed("a", 1); m.feed("b", 1); m.feed("\0", 1); m.feed("c", 1); m.feed("d", 1); m.feed("e", 1); m.feed("\0", 1); ensure_equals(m.feed("zzzzz", 5), (size_t) 0); ensure(m.done()); ensure(!m.hasError()); const vector &value = m.value(); ensure_equals(value.size(), 2u); ensure(value[0] == "ab"); ensure(value[1] == "cde"); } TEST_METHOD(28) { // It should ignore the last entry if it's not null-terminated. ArrayMessage m; const char *buf = "\x00\x07" "ab\0cdef"; ensure_equals(m.feed(buf, 9), (size_t) 9); ensure(m.done()); ensure(!m.hasError()); const vector &value = m.value(); ensure_equals(value.size(), 1u); ensure(value[0] == "ab"); } TEST_METHOD(29) { // It enters an error state if the size is larger than the set maximum. ArrayMessage m; m.setMaxSize(7); const char *buf = "\x00\x07" "ab\0cde\0"; ensure_equals(m.feed(buf, 9), (size_t) 9); ensure(m.done()); ensure(!m.hasError()); const vector &value = m.value(); ensure_equals(value.size(), 2u); ensure(value[0] == "ab"); ensure(value[1] == "cde"); ensure_equals(value[0].data(), buf + 2); ensure_equals(value[1].data(), buf + 5); m.reset(); m.setMaxSize(6); ensure_equals(m.feed("\x00\x07", 2), (size_t) 2); ensure(m.done()); ensure(m.hasError()); ensure_equals(m.errorCode(), ArrayMessage::TOO_LARGE); } TEST_METHOD(30) { // Test parsing a message with no items. ArrayMessage m; ensure_equals(m.feed("\0\0", 2), (size_t) 2); ensure("(1)", m.done()); ensure("(2)", !m.hasError()); ensure_equals("(3)", m.value().size(), 0u); m.reset(); ensure_equals("(4)", m.feed("\0\1" "a", 3), (size_t) 3); ensure("(5)", m.done()); ensure("(6)", !m.hasError()); ensure_equals("(7)", m.value().size(), 0u); } TEST_METHOD(31) { // Test parsing a message with a single item. ArrayMessage m; ensure_equals(m.feed("\0\3" "ab\0", 5), (size_t) 5); ensure(m.done()); ensure(!m.hasError()); ensure_equals(m.value().size(), 1u); const vector &value = m.value(); ensure(value[0] == "ab"); } TEST_METHOD(32) { // Test parsing a message with three items. ArrayMessage m; ensure_equals(m.feed("\x00\x0C" "ab\0cde\0fghi\0", 2 + 12), (size_t) 2 + 12); ensure("(1)", m.done()); ensure("(2)", !m.hasError()); ensure_equals("(3)", m.value().size(), 3u); const vector &value = m.value(); ensure("(4)", value[0] == "ab"); ensure("(5)", value[1] == "cde"); ensure("(6)", value[2] == "fghi"); } TEST_METHOD(33) { // generate() complains if output array has less than the // expected number of items. StaticString args[] = { "hello", "world" }; char buf[sizeof(uint16_t)]; try { ArrayMessage::generate(args, 2, buf, NULL, ArrayMessage::outputSize(2) - 1); fail(); } catch (const ArgumentException &) { // Success. } } TEST_METHOD(34) { // generate() works. StaticString args[] = { "ab", "cde" }; vector out; out.resize(ArrayMessage::outputSize(2)); char buf[sizeof(uint16_t)]; ArrayMessage::generate(args, 2, buf, &out[0], ArrayMessage::outputSize(2)); string concat; for (unsigned int i = 0; i < ArrayMessage::outputSize(2); i++) { concat.append(out[i].data(), out[i].size()); } ensure_equals(concat, string("\x00\x07" "ab\0cde\0", 9)); } /****** Test ScalarMessage ******/ TEST_METHOD(41) { // Test initial state. ScalarMessage m; ensure(!m.done()); ensure(!m.hasError()); } TEST_METHOD(42) { // Test feeding 0 bytes. ScalarMessage m; for (int i = 0; i < 100; i++) { ensure_equals(m.feed("", 0), (size_t) 0); ensure(!m.done()); ensure(!m.hasError()); } } TEST_METHOD(43) { // Test feeding bytes one-by-one until complete. ScalarMessage m; ensure_equals(m.feed("\x00", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); ensure_equals(m.feed("\x01", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); ensure_equals(m.feed("\x02", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); ensure_equals(m.feed("\x03", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); for (int i = 0; i < 66050; i++) { ensure_equals(m.feed("x", 1), (size_t) 1); ensure(!m.done()); ensure(!m.hasError()); } ensure_equals(m.feed("x", 1), (size_t) 1); ensure(m.done()); ensure(!m.hasError()); const StaticString &value = m.value(); ensure_equals(value.size(), 66051u); for (string::size_type i = 0; i < value.size(); i++) { ensure_equals(value[i], 'x'); } } TEST_METHOD(44) { // Test feeding a complete message. ScalarMessage m; string buf; buf.append("\x00\x01\x02\x03", 4); buf.append(66051, 'x'); ensure_equals(m.feed(buf.data(), buf.size()), (size_t) buf.size()); ensure("(1)", m.done()); ensure("(2)", !m.hasError()); const StaticString &value = m.value(); ensure_equals("(3)", value.size(), 66051u); for (string::size_type i = 0; i < value.size(); i++) { ensure_equals("(4)", value[i], 'x'); } // Because we fed a complete message in 1 command, // the staticstrings will point to the original buffer. ensure_equals("(5)", value.data(), buf.data() + 4); } TEST_METHOD(45) { // Test feeding a message and garbage in 1 feed command. ScalarMessage m; string buf; buf.append("\x00\x01\x02\x03", 4); buf.append(66051, 'x'); buf.append("zzzzz"); ensure_equals("(1)", m.feed(buf.data(), buf.size()), (size_t) buf.size() - 5); ensure("(2)", m.done()); ensure("(3)", !m.hasError()); const StaticString &value = m.value(); ensure_equals("(4)", value.size(), 66051u); for (string::size_type i = 0; i < value.size(); i++) { ensure_equals("(5)", value[i], 'x'); } ensure_equals("(6)", value.data(), buf.data() + 4); } TEST_METHOD(46) { // Test feeding garbage after having fed a complete message in 1 feed command. ScalarMessage m; string buf; buf.append("\x00\x01\x02\x03", 4); buf.append(66051, 'x'); m.feed(buf.data(), buf.size()); ensure_equals("(1)", m.feed("zzzzz", 5), (size_t) 0); ensure("(2)", m.done()); ensure("(3)", !m.hasError()); const StaticString &value = m.value(); ensure_equals("(4)", value.size(), 66051u); for (string::size_type i = 0; i < value.size(); i++) { ensure_equals("(5)", value[i], 'x'); } ensure_equals("(6)", value.data(), buf.data() + 4); } TEST_METHOD(47) { // Test feeding garbage after having fed a complete message one-by-one byte. ScalarMessage m; m.feed("\x00", 1); m.feed("\x01", 1); m.feed("\x02", 1); m.feed("\x03", 1); for (int i = 0; i < 66051; i++) { m.feed("x", 1); } ensure_equals(m.feed("zzzzz", 5), (size_t) 0); ensure(m.done()); ensure(!m.hasError()); const StaticString &value = m.value(); ensure_equals("(4)", value.size(), 66051u); for (string::size_type i = 0; i < value.size(); i++) { ensure_equals("(5)", value[i], 'x'); } } TEST_METHOD(48) { // It enters an error state if the size is larger than the set maximum. ScalarMessage m; const char *buf = "\x00\x00\x00\x07" "1234567"; m.setMaxSize(7); ensure_equals(m.feed(buf, 11), (size_t) 11); ensure(m.done()); ensure(!m.hasError()); const StaticString &value = m.value(); ensure_equals(value.size(), 7u); ensure(value == "1234567"); ensure_equals(value.data(), buf + 4); m.reset(); m.setMaxSize(6); ensure_equals(m.feed("\x00\x00\x00\x07", 4), (size_t) 4); ensure(m.done()); ensure(m.hasError()); ensure_equals(m.errorCode(), ScalarMessage::TOO_LARGE); } TEST_METHOD(49) { // Test parsing message with no body. ScalarMessage m; ensure_equals(m.feed("\0\0\0\0", 4), (size_t) 4); ensure("(1)", m.done()); ensure("(2)", !m.hasError()); ensure_equals("(3)", m.value().size(), 0u); } TEST_METHOD(50) { // generate() works. char buf[sizeof(uint32_t)]; StaticString out[2]; ScalarMessage::generate("hello", buf, out); ensure(out[0] == StaticString("\x00\x00\x00\x05", 4)); ensure(out[1] == "hello"); } } passenger-4.0.37/test/cxx/MessageServerTest.cpp000644 000765 000024 00000027514 12233035540 022125 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include #include #include "MessageServer.h" #include "MessageClient.h" #include "Utils.h" #include #include #include #include using namespace Passenger; using namespace boost; using namespace std; namespace tut { struct MessageServerTest { ServerInstanceDirPtr serverInstanceDir; ServerInstanceDir::GenerationPtr generation; string socketFilename; string socketAddress; AccountsDatabasePtr accountsDatabase; AccountPtr clientAccount; boost::shared_ptr server; boost::shared_ptr serverThread; MessageServerTest() { createServerInstanceDirAndGeneration(serverInstanceDir, generation); socketFilename = generation->getPath() + "/socket"; socketAddress = "unix:" + socketFilename; accountsDatabase = ptr(new AccountsDatabase()); clientAccount = accountsDatabase->add("test", "12345", false); server = ptr(new MessageServer(socketFilename, accountsDatabase)); serverThread = ptr(new oxt::thread( boost::bind(&MessageServer::mainLoop, server.get()) )); } ~MessageServerTest() { if (serverThread != NULL) { serverThread->interrupt_and_join(); } Passenger::setLogLevel(0); } class SlowClient: public MessageClient { private: unsigned int timeToSendUsername; unsigned int timeToSendPassword; protected: virtual void sendUsername(int fd, const StaticString &username, unsigned long long *timeout) { if (timeToSendUsername > 0) { usleep(timeToSendUsername * 1000); } writeScalarMessage(fd, username); } virtual void sendPassword(int fd, const StaticString &userSuppliedPassword, unsigned long long *timeout) { if (timeToSendPassword > 0) { usleep(timeToSendPassword * 1000); } writeScalarMessage(fd, userSuppliedPassword); } public: SlowClient(unsigned int timeToSendUsername, unsigned int timeToSendPassword) : MessageClient() { this->timeToSendUsername = timeToSendUsername; this->timeToSendPassword = timeToSendPassword; } }; class CustomClient: public MessageClient { public: CustomClient *sendText(const string &text) { write(text.c_str(), NULL); return this; } }; class LoggingHandler: public MessageServer::Handler { public: struct SpecificContext: public MessageServer::ClientContext { int id; SpecificContext(int i) { id = i; } }; typedef boost::shared_ptr SpecificContextPtr; boost::mutex mutex; volatile int clientsAccepted; volatile int clientsDisconnected; string receivedData; volatile int id; volatile int returnValue; SpecificContextPtr latestContext; LoggingHandler() { clientsAccepted = 0; clientsDisconnected = 0; returnValue = true; } virtual MessageServer::ClientContextPtr newClient(MessageServer::CommonClientContext &context) { boost::lock_guard l(mutex); clientsAccepted++; return ptr(new SpecificContext(id)); } virtual void clientDisconnected(MessageServer::CommonClientContext &context, MessageServer::ClientContextPtr &handlerSpecificContext) { boost::lock_guard l(mutex); clientsDisconnected++; } virtual bool processMessage(MessageServer::CommonClientContext &commonContext, MessageServer::ClientContextPtr &handlerSpecificContext, const vector &args) { boost::lock_guard l(mutex); latestContext = static_pointer_cast(handlerSpecificContext); receivedData.append(args[0]); return returnValue; } }; typedef boost::shared_ptr LoggingHandlerPtr; class ProcessMessageReturnsFalseHandler: public MessageServer::Handler { public: virtual bool processMessage(MessageServer::CommonClientContext &commonContext, MessageServer::ClientContextPtr &handlerSpecificContext, const vector &args) { return false; } }; }; DEFINE_TEST_GROUP(MessageServerTest); TEST_METHOD(1) { // It rejects the connection if the an invalid username or password was sent. accountsDatabase->add("hashed_user", Account::createHash("67890"), true); try { MessageClient().connect(socketAddress, "testt", "12345"); fail("SecurityException expected when invalid username is given"); } catch (const SecurityException &) { // Pass. } try { MessageClient().connect(socketAddress, "test", "123456"); fail("SecurityException expected when invalid password is given for an account with plain text password"); } catch (const SecurityException &) { // Pass. } try { MessageClient().connect(socketAddress, "test", "678900"); fail("SecurityException expected when invalid password is given for an account with hashed password"); } catch (const SecurityException &) { // Pass. } } TEST_METHOD(2) { // It supports hashed passwords. accountsDatabase->add("hashed_user", Account::createHash("67890"), true); MessageClient().connect(socketAddress, "hashed_user", "67890"); // Should not throw exception. } TEST_METHOD(3) { // It disconnects the client if the client does not supply a username and // password within a time limit. Passenger::setLogLevel(-1); server->setLoginTimeout(30000); /* These can throw either an IOException or SystemException: * - An IOException is raised when connect() encounters EOF. * - But when connect() fails during the middle of a read() * or write() (e.g. because the server disconnects before * connect() is done writing), then SystemException is raised. */ try { // This client takes too much time on sending the username. SlowClient(50, 0).connect(socketAddress, "test", "12345"); fail("IOException or SystemException expected (1)."); } catch (const IOException &e) { // Pass. } catch (const SystemException &e) { // Pass. } try { // This client takes too much time on sending the password. SlowClient(0, 50).connect(socketAddress, "test", "12345"); fail("IOException or SystemException expected (2)."); } catch (const IOException &e) { // Pass. } catch (const SystemException &e) { // Pass. } try { // This client is fast enough at sending the username and // password individually, but the combined time is too long. SlowClient(25, 25).connect(socketAddress, "test", "12345"); fail("IOException or SystemException expected (3)."); } catch (const IOException &e) { // Pass. } catch (const SystemException &e) { // Pass. } } TEST_METHOD(4) { // It disconnects the client if it provides a username that's too large. char username[1024]; memset(username, 'x', sizeof(username)); username[sizeof(username) - 1] = '\0'; try { MessageClient().connect(socketAddress, username, "1234"); fail("SecurityException expected"); } catch (const SecurityException &e) { // Pass. } } TEST_METHOD(5) { // It disconnects the client if it provides a password that's too large. char password[1024]; memset(password, 'x', sizeof(password)); password[sizeof(password) - 1] = '\0'; try { MessageClient().connect(socketAddress, "test", password); fail("SecurityException expected"); } catch (const SecurityException &e) { // Pass. } } TEST_METHOD(6) { // It notifies all handlers when a new client has connected. LoggingHandlerPtr handler1(new LoggingHandler()); LoggingHandlerPtr handler2(new LoggingHandler()); server->addHandler(handler1); server->addHandler(handler2); MessageClient().connect(socketAddress, "test", "12345"); MessageClient().connect(socketAddress, "test", "12345"); usleep(10000); // Give the threads some time to do work. ensure_equals(handler1->clientsAccepted, 2); ensure_equals(handler2->clientsAccepted, 2); } TEST_METHOD(7) { // It notifies all handlers when a message is sent, but stops // at the first handler that returns true. LoggingHandlerPtr handler1(new LoggingHandler()); LoggingHandlerPtr handler2(new LoggingHandler()); LoggingHandlerPtr handler3(new LoggingHandler()); server->addHandler(handler1); server->addHandler(handler2); server->addHandler(handler3); handler1->returnValue = false; CustomClient c1, c2; c1.connect(socketAddress, "test", "12345"); c1.sendText("hello"); c1.sendText(" "); usleep(10000); // Give the thread some time to do work. c2.connect(socketAddress, "test", "12345"); c2.sendText("world"); usleep(10000); // Give the thread some time to do work. ensure_equals("(1)", handler1->receivedData, "hello world"); ensure_equals("(2)", handler2->receivedData, "hello world"); ensure_equals("(3)", handler3->receivedData, ""); } TEST_METHOD(8) { // It does not close the connection if some, but not all of the handlers' // processMessage() methods return false. MessageServer::HandlerPtr handler1(new LoggingHandler()); MessageServer::HandlerPtr handler2(new ProcessMessageReturnsFalseHandler()); server->addHandler(handler1); server->addHandler(handler2); CustomClient c; c.connect(socketAddress, "test", "12345"); c.sendText("hi"); usleep(10000); // Give the thread some time to do work. c.sendText("hi"); // Connection should still be valid. } TEST_METHOD(9) { // It closes the connection if all of the handlers' // processMessage() methods return false. MessageServer::HandlerPtr handler1(new ProcessMessageReturnsFalseHandler()); MessageServer::HandlerPtr handler2(new ProcessMessageReturnsFalseHandler()); server->addHandler(handler1); server->addHandler(handler2); CustomClient c; c.connect(socketAddress, "test", "12345"); c.sendText("hi"); usleep(10000); // Give the thread some time to do work. try { c.sendText("hi"); fail("SystemException expected."); } catch (const SystemException &e) { ensure_equals(e.code(), EPIPE); } } TEST_METHOD(10) { // The specific context as returned by the handler's newClient() // method is passed to processMessage(). LoggingHandlerPtr handler1(new LoggingHandler()); LoggingHandlerPtr handler2(new LoggingHandler()); LoggingHandlerPtr handler3(new LoggingHandler()); server->addHandler(handler1); server->addHandler(handler2); server->addHandler(handler3); handler1->returnValue = false; handler2->returnValue = false; CustomClient c1, c2; handler1->id = 100; handler2->id = 101; c1.connect(socketAddress, "test", "12345"); c1.sendText("hi"); usleep(10000); // Give the thread some time to do work. ensure_equals(handler1->latestContext->id, 100); ensure_equals(handler2->latestContext->id, 101); handler1->id = 200; handler2->id = 201; c2.connect(socketAddress, "test", "12345"); c2.sendText("hi"); usleep(10000); // Give the thread some time to do work. ensure_equals(handler1->latestContext->id, 200); ensure_equals(handler2->latestContext->id, 201); c1.sendText("hi"); usleep(10000); // Give the thread some time to do work. ensure_equals(handler1->latestContext->id, 100); ensure_equals(handler2->latestContext->id, 101); } TEST_METHOD(11) { // It notifies all handlers when a client is disconnected. LoggingHandlerPtr handler1(new LoggingHandler()); LoggingHandlerPtr handler2(new LoggingHandler()); server->addHandler(handler1); server->addHandler(handler2); { { MessageClient().connect(socketAddress, "test", "12345"); } usleep(10000); // Give the threads some time to do work. ensure_equals(handler1->clientsDisconnected, 1); ensure_equals(handler2->clientsDisconnected, 1); MessageClient().connect(socketAddress, "test", "12345"); } usleep(10000); // Give the threads some time to do work. ensure_equals(handler1->clientsDisconnected, 2); ensure_equals(handler2->clientsDisconnected, 2); } } passenger-4.0.37/test/cxx/ProcessMetricsCollectorTest.cpp000644 000765 000024 00000006724 12233035540 024166 0ustar00honglistaff000000 000000 #include #include #include #include #include #include "TestSupport.h" #include "Utils/StrIntUtils.h" #include "Utils/ProcessMetricsCollector.h" using namespace Passenger; namespace tut { struct ProcessMetricsCollectorTest { ProcessMetricsCollector collector; pid_t child; ProcessMetricsCollectorTest() { child = -1; } ~ProcessMetricsCollectorTest() { if (child != -1) { kill(child, SIGKILL); waitpid(child, NULL, 0); } } pid_t spawnChild(int memory) { string memoryStr = toString(memory); pid_t pid = fork(); if (pid == 0) { execlp("support/allocate_memory", "support/allocate_memory", memoryStr.c_str(), (char *) 0); int e = errno; fprintf(stderr, "Cannot execute support/allocate_memory: %s\n", strerror(e)); fflush(stderr); _exit(1); } else { return pid; } } }; DEFINE_TEST_GROUP(ProcessMetricsCollectorTest); TEST_METHOD(1) { // It collects the metrics for the given PIDs. collector.setPsOutput( " PID PPID %CPU RSS VSZ PGID UID COMMAND\n" " 1 0 0.0 1276 2456836 1 0 /sbin/launchd\n" "34678 1265 95.2 4128 2437812 34677 123 /bin/bash -li\n" ); vector pids; pids.push_back(1); pids.push_back(34678); ProcessMetricMap result = collector.collect(pids); ensure_equals(result.size(), 2u); ensure_equals(result[1].pid, (pid_t) 1); ensure_equals(result[1].ppid, (pid_t) 0); ensure_equals(result[1].cpu, 0u); ensure_equals(result[1].rss, 1276u); ensure_equals(result[1].processGroupId, (pid_t) 1); ensure_equals(result[1].uid, (uid_t) 0); ensure_equals(result[1].command, "/sbin/launchd"); ensure_equals(result[34678].pid, (pid_t) 34678); ensure_equals(result[34678].ppid, (pid_t) 1265); ensure_equals(result[34678].cpu, 95u); ensure_equals(result[34678].rss, 4128u); ensure_equals(result[34678].processGroupId, (pid_t) 34677); ensure_equals(result[34678].uid, (uid_t) 123); ensure_equals(result[34678].command, "/bin/bash -li"); } TEST_METHOD(2) { // It does not collect the metrics for PIDs that don't exist. collector.setPsOutput( " PID PPID %CPU RSS VSZ PGID COMMAND\n" " 1 0 0.0 1276 2456836 1 /sbin/launchd\n" ); vector pids; pids.push_back(1); pids.push_back(34678); ProcessMetricMap result = collector.collect(pids); ensure_equals(result.size(), 1u); ensure(result.find(1) != result.end()); ensure(result.find(34678) == result.end()); } TEST_METHOD(3) { // Measuring real memory usage works. ssize_t pss, privateDirty, swap; child = spawnChild(50); usleep(500000); collector.measureRealMemory(child, pss, privateDirty, swap); #ifdef __APPLE__ if (geteuid() == 0) { ensure(pss > 50000 && pss < 60000); ensure(privateDirty > 50000 && privateDirty < 60000); ensure_equals(swap, (ssize_t) -1); } else { ensure_equals(pss, (ssize_t) -1); ensure_equals(privateDirty, (ssize_t) -1); ensure_equals(swap, (ssize_t) -1); } #elif defined(__linux__) ensure("PSS is correct", (pss > 50000 && pss < 60000) || pss == -1); ensure("Private dirty is correct", privateDirty > 50000 && privateDirty < 60000); ensure("Swap is correct", swap < 10000); #else ensure((pss > 50000 && pss < 60000) || pss == -1); ensure((privateDirty > 50000 && privateDirty < 60000) || privateDirty == -1); ensure(swap < 10000 || swap == -1); #endif } } passenger-4.0.37/test/cxx/RequestHandlerTest.cpp000644 000765 000024 00000077665 12233035540 022314 0ustar00honglistaff000000 000000 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace boost; using namespace Passenger; using namespace Passenger::ApplicationPool2; namespace tut { struct RequestHandlerTest { ServerInstanceDirPtr serverInstanceDir; ServerInstanceDir::GenerationPtr generation; string serverFilename; FileDescriptor requestSocket; AgentOptions agentOptions; BackgroundEventLoop bg; SpawnerFactoryPtr spawnerFactory; PoolPtr pool; Pool::DebugSupportPtr debug; boost::shared_ptr handler; FileDescriptor connection; map defaultHeaders; string root; string rackAppPath, wsgiAppPath; RequestHandlerTest() { createServerInstanceDirAndGeneration(serverInstanceDir, generation); spawnerFactory = boost::make_shared(bg.safe, *resourceLocator, generation); pool = boost::make_shared(spawnerFactory); pool->initialize(); serverFilename = generation->getPath() + "/server"; requestSocket = createUnixServer(serverFilename); setNonBlocking(requestSocket); setLogLevel(LVL_ERROR); // TODO: set to LVL_WARN setPrintAppOutputAsDebuggingMessages(true); agentOptions.passengerRoot = resourceLocator->getRoot(); agentOptions.defaultRubyCommand = DEFAULT_RUBY; agentOptions.defaultUser = testConfig["default_user"].asString(); agentOptions.defaultGroup = testConfig["default_group"].asString(); root = resourceLocator->getRoot(); rackAppPath = root + "/test/stub/rack"; wsgiAppPath = root + "/test/stub/wsgi"; defaultHeaders["PASSENGER_LOAD_SHELL_ENVVARS"] = "false"; defaultHeaders["PASSENGER_APP_TYPE"] = "wsgi"; defaultHeaders["PASSENGER_SPAWN_METHOD"] = "direct"; defaultHeaders["REQUEST_METHOD"] = "GET"; } ~RequestHandlerTest() { setLogLevel(DEFAULT_LOG_LEVEL); setPrintAppOutputAsDebuggingMessages(false); if (bg.isStarted()) { bg.safe->runSync(boost::bind(&RequestHandlerTest::destroy, this)); } else { destroy(); } unlink(serverFilename.c_str()); } void init() { handler = boost::make_shared(bg.safe, requestSocket, pool, agentOptions); bg.start(); } void destroy() { handler.reset(); pool->destroy(); pool.reset(); ev_break(bg.loop, EVBREAK_ALL); } void initPoolDebugging() { pool->initDebugging(); debug = pool->debugSupport; } FileDescriptor &connect() { connection = connectToUnixServer(serverFilename); return connection; } void sendHeaders(const map &headers, ...) { va_list ap; const char *arg; map::const_iterator it; vector args; for (it = headers.begin(); it != headers.end(); it++) { args.push_back(StaticString(it->first.data(), it->first.size() + 1)); args.push_back(StaticString(it->second.data(), it->second.size() + 1)); } va_start(ap, headers); while ((arg = va_arg(ap, const char *)) != NULL) { args.push_back(StaticString(arg, strlen(arg) + 1)); } va_end(ap); shared_array args_array(new StaticString[args.size() + 2]); unsigned int totalSize = 0; for (unsigned int i = 0; i < args.size(); i++) { args_array[i + 1] = args[i]; totalSize += args[i].size(); } char totalSizeString[10]; snprintf(totalSizeString, sizeof(totalSizeString), "%u:", totalSize); args_array[0] = StaticString(totalSizeString); args_array[args.size() + 1] = ","; gatheredWrite(connection, args_array.get(), args.size() + 2, NULL); } string stripHeaders(const string &str) { string::size_type pos = str.find("\r\n\r\n"); if (pos == string::npos) { return str; } else { string result = str; result.erase(0, pos + 4); return result; } } string inspect() { string result; bg.safe->runSync(boost::bind(&RequestHandlerTest::real_inspect, this, &result)); return result; } void real_inspect(string *result) { stringstream stream; handler->inspect(stream); *result = stream.str(); } static void writeBody(FileDescriptor conn, string body) { try { writeExact(conn, body); } catch (const SystemException &e) { if (e.code() == EPIPE) { // Ignore. } else { throw; } } } }; DEFINE_TEST_GROUP_WITH_LIMIT(RequestHandlerTest, 80); TEST_METHOD(1) { // Test one normal request. init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/", NULL); string response = readAll(connection); string body = stripHeaders(response); ensure("Status line is correct", containsSubstring(response, "HTTP/1.1 200 OK\r\n")); ensure("Headers are correct", containsSubstring(response, "Content-Type: text/plain\r\n")); ensure("Contains a Status header", containsSubstring(response, "Status: 200 OK\r\n")); ensure_equals(body, "front page"); } TEST_METHOD(2) { // Test multiple normal requests. init(); for (int i = 0; i < 10; i++) { connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/", NULL); string response = readAll(connection); string body = stripHeaders(response); ensure("Status line is correct", containsSubstring(response, "HTTP/1.1 200 OK\r\n")); ensure("Headers are correct", containsSubstring(response, "Content-Type: text/plain\r\n")); ensure("Contains a Status header", containsSubstring(response, "Status: 200 OK\r\n")); ensure_equals(body, "front page"); } } TEST_METHOD(3) { // Test sending request data in pieces. defaultHeaders["PASSENGER_APP_ROOT"] = wsgiAppPath; defaultHeaders["PATH_INFO"] = "/"; string request; map::const_iterator it, end = defaultHeaders.end(); for (it = defaultHeaders.begin(); it != end; it++) { request.append(it->first); request.append(1, '\0'); request.append(it->second); request.append(1, '\0'); } request = toString(request.size()) + ":" + request; request.append(","); init(); connect(); string::size_type i = 0; while (i < request.size()) { const string piece = const_cast(request).substr(i, 5); writeExact(connection, piece); usleep(10000); i += piece.size(); } string response = readAll(connection); string body = stripHeaders(response); ensure("Status line is correct", containsSubstring(response, "HTTP/1.1 200 OK\r\n")); ensure("Headers are correct", containsSubstring(response, "Content-Type: text/plain\r\n")); ensure("Contains a Status header", containsSubstring(response, "Status: 200 OK\r\n")); ensure_equals(body, "front page"); } TEST_METHOD(4) { // It denies access if the connect password is wrong. agentOptions.requestSocketPassword = "hello world"; setLogLevel(-1); init(); connect(); writeExact(connection, "hello world"); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/", NULL ); ensure(containsSubstring(readAll(connection), "front page")); connect(); try { sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/", NULL ); } catch (const SystemException &e) { ensure_equals(e.code(), EPIPE); return; } string response; try { response = readAll(connection); } catch (const SystemException &e) { ensure_equals(e.code(), ECONNRESET); return; } ensure_equals(response, ""); } TEST_METHOD(5) { // It disconnects us if the connect password is not sent within a certain time. agentOptions.requestSocketPassword = "hello world"; setLogLevel(-1); handler = boost::make_shared(bg.safe, requestSocket, pool, agentOptions); handler->connectPasswordTimeout = 40; bg.start(); connect(); Timer timer; readAll(connection); timer.stop(); ensure(timer.elapsed() <= 60); } TEST_METHOD(6) { // It works correct if the connect password is sent in pieces. agentOptions.requestSocketPassword = "hello world"; init(); connect(); writeExact(connection, "hello"); usleep(10000); writeExact(connection, " world"); usleep(10000); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/", NULL ); ensure(containsSubstring(readAll(connection), "front page")); } TEST_METHOD(7) { // It closes the connection with the application if the client has closed the connection. init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/stream", NULL ); BufferedIO io(connection); ensure_equals(io.readLine(), "HTTP/1.1 200 OK\r\n"); ProcessPtr process; { LockGuard l(pool->syncher); ensure_equals(pool->getProcessCount(false), 1u); SuperGroupPtr superGroup = pool->superGroups.get(wsgiAppPath); process = superGroup->defaultGroup->enabledProcesses.front(); ensure_equals(process->sessions, 1); } connection.close(); EVENTUALLY(5, LockGuard l(pool->syncher); result = process->sessions == 0; ); } TEST_METHOD(10) { // If the app crashes at startup without an error page then it renders // a generic error page. TempDir tempdir("tmp.handler"); writeFile("tmp.handler/start.rb", "STDERR.puts 'I have failed'"); setLogLevel(-2); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", (root + "/test/tmp.handler").c_str(), "PASSENGER_APP_TYPE", "", "PASSENGER_START_COMMAND", ("ruby\t" + root + "/test/tmp.handler/start.rb").c_str(), "PATH_INFO", "/", NULL); string response = readAll(connection); ensure(containsSubstring(response, "HTTP/1.1 500 Internal Server Error\r\n")); ensure(containsSubstring(response, "Status: 500 Internal Server Error\r\n")); ensure(containsSubstring(response, "I have failed")); } TEST_METHOD(11) { // If the app crashes at startup with an error page then it renders // a friendly error page. TempDir tempdir("tmp.handler"); writeFile("tmp.handler/start.rb", "STDERR.puts 'Error'\n" "STDERR.puts\n" "STDERR.puts 'I have failed'\n"); setLogLevel(-2); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", (root + "/test/tmp.handler").c_str(), "PASSENGER_APP_TYPE", "", "PASSENGER_START_COMMAND", ("ruby\t" + root + "/test/tmp.handler/start.rb").c_str(), "PATH_INFO", "/", NULL); string response = readAll(connection); ensure(containsSubstring(response, "HTTP/1.1 500 Internal Server Error\r\n")); ensure(containsSubstring(response, "Status: 500 Internal Server Error\r\n")); ensure(containsSubstring(response, "Content-Type: text/html; charset=UTF-8\r\n")); ensure(containsSubstring(response, "")); ensure(containsSubstring(response, "I have failed")); } TEST_METHOD(12) { // If spawning fails because of an internal error then it reports the error appropriately. TempDir tempdir("tmp.handler"); writeFile("tmp.handler/start.rb", ""); setLogLevel(-2); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", (root + "/test/tmp.handler").c_str(), "PASSENGER_APP_TYPE", "", "PASSENGER_START_COMMAND", ("ruby\t" + root + "/test/tmp.handler/start.rb").c_str(), "PASSENGER_RAISE_INTERNAL_ERROR", "true", "PATH_INFO", "/", NULL); string response = readAll(connection); ensure("(1)", containsSubstring(response, "HTTP/1.1 500 Internal Server Error\r\n")); ensure("(2)", containsSubstring(response, "Status: 500 Internal Server Error\r\n")); ensure("(3)", containsSubstring(response, "Content-Type: text/html; charset=UTF-8\r\n")); ensure("(4)", containsSubstring(response, "")); ensure("(5)", containsSubstring(response, "An internal error occurred while trying to spawn the application.")); ensure("(6)", containsSubstring(response, "RuntimeException")); ensure("(7)", containsSubstring(response, "An internal error!")); ensure("(8)", containsSubstring(response, "Spawner.h")); } TEST_METHOD(13) { // Error pages respect the PASSENGER_STATUS_LINE option. TempDir tempdir("tmp.handler"); writeFile("tmp.handler/start.rb", "STDERR.puts 'I have failed'"); setLogLevel(-2); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", (root + "/test/tmp.handler").c_str(), "PASSENGER_APP_TYPE", "", "PASSENGER_START_COMMAND", ("ruby\t" + root + "/test/tmp.handler/start.rb").c_str(), "PASSENGER_STATUS_LINE", "false", "PATH_INFO", "/", NULL); string response = readAll(connection); ensure(!containsSubstring(response, "HTTP/1.1 ")); ensure(containsSubstring(response, "Status: 500 Internal Server Error\r\n")); ensure(containsSubstring(response, "I have failed")); } TEST_METHOD(14) { // If PASSENGER_FRIENDLY_ERROR_PAGES is false then it does not render // a friendly error page. TempDir tempdir("tmp.handler"); writeFile("tmp.handler/start.rb", "STDERR.puts 'Error'\n" "STDERR.puts\n" "STDERR.puts 'I have failed'\n"); setLogLevel(-2); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", (root + "/test/tmp.handler").c_str(), "PASSENGER_APP_TYPE", "", "PASSENGER_START_COMMAND", ("ruby\t" + root + "/test/tmp.handler/start.rb").c_str(), "PASSENGER_FRIENDLY_ERROR_PAGES", "false", "PATH_INFO", "/", NULL); string response = readAll(connection); ensure(containsSubstring(response, "HTTP/1.1 500 Internal Server Error\r\n")); ensure(containsSubstring(response, "Status: 500 Internal Server Error\r\n")); ensure(containsSubstring(response, "Content-Type: text/html; charset=UTF-8\r\n")); ensure(containsSubstring(response, "")); ensure(!containsSubstring(response, "I have failed")); ensure(containsSubstring(response, "We're sorry, but something went wrong")); } TEST_METHOD(20) { // It streams the request body to the application. DeleteFileEventually file("tmp.output"); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/raw_upload_to_file", "HTTP_X_OUTPUT", (root + "/test/tmp.output").c_str(), NULL); writeExact(connection, "hello\n"); EVENTUALLY(5, result = fileExists("tmp.output") && readAll("tmp.output") == "hello\n"; ); writeExact(connection, "world\n"); EVENTUALLY(3, result = readAll("tmp.output") == "hello\nworld\n"; ); shutdown(connection, SHUT_WR); ensure_equals(stripHeaders(readAll(connection)), "ok"); } TEST_METHOD(21) { // It buffers the request body if PASSENGER_BUFFERING is true. DeleteFileEventually file("tmp.output"); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PASSENGER_BUFFERING", "true", "PATH_INFO", "/raw_upload_to_file", "HTTP_X_OUTPUT", (root + "/test/tmp.output").c_str(), NULL); writeExact(connection, "hello\n"); SHOULD_NEVER_HAPPEN(200, result = fileExists("tmp.output"); ); writeExact(connection, "world\n"); SHOULD_NEVER_HAPPEN(200, result = fileExists("tmp.output"); ); shutdown(connection, SHUT_WR); ensure_equals(stripHeaders(readAll(connection)), "ok"); } TEST_METHOD(22) { set_test_name("Test buffering of large request bodies that fit in neither the socket " "buffer nor the FileBackedPipe memory buffer, and that the application " "cannot read quickly enough."); DeleteFileEventually d1("/tmp/wait.txt"); DeleteFileEventually d2("/tmp/output.txt"); // 2.6 MB of request body. Guaranteed not to fit in any socket buffer. string requestBody; for (int i = 0; i < 204800; i++) { requestBody.append("hello world!\n"); } init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/raw_upload_to_file", "PASSENGER_BUFFERING", "true", "HTTP_X_WAIT_FOR_FILE", "/tmp/wait.txt", "HTTP_X_OUTPUT", "/tmp/output.txt", NULL); // Should not block. writeExact(connection, requestBody); shutdown(connection, SHUT_WR); EVENTUALLY(5, result = containsSubstring(inspect(), "session initiated = true"); ); touchFile("/tmp/wait.txt"); string result = stripHeaders(readAll(connection)); ensure_equals(result, "ok"); struct stat buf; ensure(stat("/tmp/output.txt", &buf) == 0); ensure_equals(buf.st_size, (off_t) requestBody.size()); } TEST_METHOD(30) { // It replaces HTTP_CONTENT_LENGTH with CONTENT_LENGTH. init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/env", "HTTP_CONTENT_LENGTH", "5", NULL); writeExact(connection, "hello"); string response = readAll(connection); ensure(containsSubstring(response, "CONTENT_LENGTH = 5\n")); ensure(!containsSubstring(response, "HTTP_CONTENT_LENGTH")); } TEST_METHOD(31) { // It replaces HTTP_CONTENT_TYPE with CONTENT_TYPE. init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/env", "HTTP_CONTENT_TYPE", "application/json", NULL); string response = readAll(connection); ensure(containsSubstring(response, "CONTENT_TYPE = application/json\n")); ensure(!containsSubstring(response, "HTTP_CONTENT_TYPE")); } TEST_METHOD(35) { // The response doesn't contain an HTTP status line if PASSENGER_STATUS_LINE is false. init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PASSENGER_STATUS_LINE", "false", "PATH_INFO", "/", NULL); string response = readAll(connection); ensure(!containsSubstring(response, "HTTP/1.1 ")); ensure(containsSubstring(response, "Status: 200 OK\r\n")); } TEST_METHOD(36) { // If the application outputs a status line without a reason phrase, // then a reason phrase is automatically appended. init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/custom_status", "HTTP_X_CUSTOM_STATUS", "201", NULL); string response = readAll(connection); ensure(containsSubstring(response, "HTTP/1.1 201 Created\r\n")); ensure(containsSubstring(response, "Status: 201 Created\r\n")); } TEST_METHOD(37) { // If the application outputs a status line with a custom reason phrase, // then that reason phrase is used. init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/custom_status", "HTTP_X_CUSTOM_STATUS", "201 Bunnies Jump", NULL); string response = readAll(connection); ensure(containsSubstring(response, "HTTP/1.1 201 Bunnies Jump\r\n")); ensure(containsSubstring(response, "Status: 201 Bunnies Jump\r\n")); } TEST_METHOD(38) { // If the application doesn't output a status line then it rejects the application response. // TODO } TEST_METHOD(39) { // Test handling of slow clients that can't receive response data fast enough (response buffering). init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/blob", "HTTP_X_SIZE", "10485760", NULL); EVENTUALLY(10, result = containsSubstring(inspect(), "appInput reachedEnd = true"); ); string result = stripHeaders(readAll(connection)); ensure_equals(result.size(), 10485760u); const char *data = result.data(); const char *end = result.data() + result.size(); while (data < end) { ensure_equals(*data, 'x'); data++; } } TEST_METHOD(40) { set_test_name("Test that RequestHandler does not read more than CONTENT_LENGTH bytes " "from the client body (when buffering is on and request body is large)."); DeleteFileEventually d("/tmp/output.txt"); // 2.6 MB of request body. Guaranteed not to fit in any socket buffer. string requestBody; for (int i = 0; i < 204800; i++) { requestBody.append("hello world!\n"); } init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/raw_upload_to_file", "CONTENT_LENGTH", toString(requestBody.size()).c_str(), "PASSENGER_BUFFERING", "true", "HTTP_X_OUTPUT", "/tmp/output.txt", NULL); writeExact(connection, requestBody); string result = stripHeaders(readAll(connection)); ensure_equals(result, "ok"); struct stat buf; ensure(stat("/tmp/output.txt", &buf) == 0); ensure_equals(buf.st_size, (off_t) requestBody.size()); } TEST_METHOD(41) { set_test_name("Test that RequestHandler does not read more than CONTENT_LENGTH bytes " "from the client body (when buffering is on and request body is small)."); DeleteFileEventually d("/tmp/output.txt"); string requestBody = "hello world"; init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/raw_upload_to_file", "CONTENT_LENGTH", toString(requestBody.size()).c_str(), "PASSENGER_BUFFERING", "true", "HTTP_X_OUTPUT", "/tmp/output.txt", NULL); writeExact(connection, requestBody); string result = stripHeaders(readAll(connection)); ensure_equals(result, "ok"); struct stat buf; ensure(stat("/tmp/output.txt", &buf) == 0); ensure_equals(buf.st_size, (off_t) requestBody.size()); } TEST_METHOD(42) { set_test_name("Test that RequestHandler does not read more than CONTENT_LENGTH bytes " "from the client body (when buffering is off and request body is large)."); DeleteFileEventually d("/tmp/output.txt"); // 2 MB of request body. Guaranteed not to fit in any socket buffer. string requestBody; for (int i = 0; i < 102400; i++) { char buf[100]; snprintf(buf, sizeof(buf), "%06d: hello world!\n", i); requestBody.append(buf); } init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/raw_upload_to_file", "CONTENT_LENGTH", toString(requestBody.size()).c_str(), "HTTP_X_OUTPUT", "/tmp/output.txt", NULL); TempThread thr(boost::bind(RequestHandlerTest::writeBody, connection, requestBody)); string result = stripHeaders(readAll(connection)); ensure_equals(result, "ok"); struct stat buf; ensure(stat("/tmp/output.txt", &buf) == 0); ensure_equals(buf.st_size, (off_t) requestBody.size()); } TEST_METHOD(43) { set_test_name("Test that RequestHandler does not read more than CONTENT_LENGTH bytes " "from the client body (when buffering is off and request body is small)."); DeleteFileEventually d("/tmp/output.txt"); string requestBody = "hello world"; init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/raw_upload_to_file", "CONTENT_LENGTH", toString(requestBody.size()).c_str(), "HTTP_X_OUTPUT", "/tmp/output.txt", NULL); TempThread thr(boost::bind(RequestHandlerTest::writeBody, connection, requestBody)); string result = stripHeaders(readAll(connection)); ensure_equals(result, "ok"); struct stat buf; ensure(stat("/tmp/output.txt", &buf) == 0); ensure_equals(buf.st_size, (off_t) requestBody.size()); } TEST_METHOD(44) { set_test_name("Test that RequestHandler does not pass any client body data when CONTENT_LENGTH == 0 (when buffering is on)."); DeleteFileEventually d("/tmp/output.txt"); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/raw_upload_to_file", "CONTENT_LENGTH", "0", "PASSENGER_BUFFERING", "true", "HTTP_X_OUTPUT", "/tmp/output.txt", NULL); writeExact(connection, "hello world"); string result = stripHeaders(readAll(connection)); ensure_equals(result, "ok"); struct stat buf; ensure(stat("/tmp/output.txt", &buf) == 0); ensure_equals(buf.st_size, (off_t) 0); } TEST_METHOD(45) { set_test_name("Test that RequestHandler does not pass any client body data when CONTENT_LENGTH == 0 (when buffering is off)."); DeleteFileEventually d("/tmp/output.txt"); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/raw_upload_to_file", "CONTENT_LENGTH", "0", "HTTP_X_OUTPUT", "/tmp/output.txt", NULL); writeExact(connection, "hello world"); string result = stripHeaders(readAll(connection)); ensure_equals(result, "ok"); struct stat buf; ensure(stat("/tmp/output.txt", &buf) == 0); ensure_equals(buf.st_size, (off_t) 0); } TEST_METHOD(46) { // If the application outputs a request oobw header, handler should remove the header, mark // the process as oobw requested. The process should continue to process requests until the // spawner spawns another process (to avoid the group being empty). As soon as the new // process is spawned, the original process will make the oobw request. Afterwards, the // original process is re-enabled. init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/oobw", NULL); string response = readAll(connection); ensure("status is not 200", containsSubstring(response, "Status: 200 OK\r\n")); ensure("contains oowb header", !containsSubstring(response, "X-Passenger-Request-OOB-Work:")); pid_t origPid = atoi(stripHeaders(response)); // Get a reference to the orignal process and verify oobw has been requested. ProcessPtr origProcess; { LockGuard l(pool->syncher); origProcess = pool->superGroups.get(wsgiAppPath)->defaultGroup->disablingProcesses.front(); ensure("OOBW requested", origProcess->oobwStatus == Process::OOBW_IN_PROGRESS); } ensure("sanity check", origPid == origProcess->pid); // just a sanity check // Issue requests until the new process handles it. pid_t pid; EVENTUALLY(2, connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/pid", NULL); string response = readAll(connection); ensure("status is 200", containsSubstring(response, "Status: 200 OK\r\n")); pid = atoi(stripHeaders(response)); result = (pid != origPid); ); // Wait for the original process to finish oobw request. EVENTUALLY(2, boost::unique_lock lock(pool->syncher); result = origProcess->oobwStatus == Process::OOBW_NOT_ACTIVE; ); // Final asserts. { boost::unique_lock lock(pool->syncher); ensure_equals("2 enabled processes", pool->superGroups.get(wsgiAppPath)->defaultGroup->enabledProcesses.size(), 2u); ensure_equals("oobw is reset", origProcess->oobwStatus, Process::OOBW_NOT_ACTIVE); ensure_equals("process is enabled", origProcess->enabled, Process::ENABLED); } } TEST_METHOD(47) { set_test_name("The RequestHandler should append a Date header if the app doesn't output one."); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/pid", NULL); string result = readAll(connection); ensure(result.find("Date: ") != string::npos); } TEST_METHOD(48) { set_test_name("It should write an appropriate response if the request queue is overflown"); initPoolDebugging(); debug->restarting = false; debug->spawning = false; debug->testOverflowRequestQueue = true; init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/", NULL); string response = readAll(connection); ensure(response.find("Status: 503 Service Unavailable") != string::npos); ensure(response.find("This website is under heavy load") != string::npos); } TEST_METHOD(49) { set_test_name("It should use the status code dictated by PASSENGER_REQUEST_QUEUE_OVERFLOW_STATUS_CODE " "if the request queue is overflown"); initPoolDebugging(); debug->restarting = false; debug->spawning = false; debug->testOverflowRequestQueue = true; init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/", "PASSENGER_REQUEST_QUEUE_OVERFLOW_STATUS_CODE", "504", NULL); string response = readAll(connection); ensure(response.find("Status: 504 Gateway Timeout") != string::npos); ensure(response.find("This website is under heavy load") != string::npos); } TEST_METHOD(50) { set_test_name("PASSENGER_REQUEST_QUEUE_OVERFLOW_STATUS_CODE should work even if it is an unknown code"); initPoolDebugging(); debug->restarting = false; debug->spawning = false; debug->testOverflowRequestQueue = true; init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/", "PASSENGER_REQUEST_QUEUE_OVERFLOW_STATUS_CODE", "604", NULL); string response = readAll(connection); ensure(response.find("Status: 604 Unknown Reason-Phrase") != string::npos); ensure(response.find("This website is under heavy load") != string::npos); } TEST_METHOD(51) { set_test_name("It relieves the application process after having read its entire response data"); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/blob", NULL); vector processes; EVENTUALLY(5, processes = pool->getProcesses(); result = processes.size() == 1; ); EVENTUALLY(5, LockGuard l(pool->syncher); result = processes[0]->processed == 1; ); { LockGuard l(pool->syncher); ensure_equals("The session is closed before the client is done reading", processes[0]->sessions, 0); } } TEST_METHOD(52) { set_test_name("It supports responses in chunked transfer encoding"); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/chunked_stream", NULL ); char buf[1024 * 10]; unsigned long long timeout = 500000; unsigned int size; try { size = readExact(connection, buf, sizeof(buf), &timeout); } catch (const TimeoutException &) { fail("RequestHandler did not correctly handle chunked EOF!"); } string response(buf, size); string body = stripHeaders(response); ensure(containsSubstring(response, "Counter: 0\n")); ensure(containsSubstring(response, "Counter: 1\n")); ensure(containsSubstring(response, "Counter: 2\n")); } TEST_METHOD(53) { set_test_name("It supports switching protocols when communicating over application session sockets"); init(); connect(); sendHeaders(defaultHeaders, "PASSENGER_APP_ROOT", wsgiAppPath.c_str(), "PATH_INFO", "/switch_protocol", "HTTP_UPGRADE", "raw", "HTTP_CONNECTION", "Upgrade", NULL ); BufferedIO io(connection); string header; bool done = false; ensure_equals(io.readLine(), "HTTP/1.1 101 Switching Protocols\r\n"); do { string line = io.readLine(); done = line.empty() || line == "\r\n"; if (!done) { header.append(line); } } while (!done); ensure("(1)", containsSubstring(header, "Upgrade: raw\r\n")); ensure("(2)", containsSubstring(header, "Connection: Upgrade\r\n")); writeExact(connection, "hello\n"); ensure_equals(io.readLine(), "Echo: hello\n"); } TEST_METHOD(54) { set_test_name("It supports switching protocols when communication over application http_session sockets"); init(); connect(); sendHeaders(defaultHeaders, "_PASSENGER_FORCE_HTTP_SESSION", "true", "PASSENGER_APP_ROOT", rackAppPath.c_str(), "PASSENGER_APP_TYPE", "rack", "REQUEST_URI", "/switch_protocol", "PATH_INFO", "/switch_protocol", "HTTP_UPGRADE", "raw", "HTTP_CONNECTION", "Upgrade", NULL ); BufferedIO io(connection); string header; bool done = false; vector processes; ensure_equals(io.readLine(), "HTTP/1.1 101 Switching Protocols\r\n"); processes = pool->getProcesses(); { LockGuard l(pool->syncher); ProcessPtr process = processes[0]; ensure_equals(process->sessionSockets.top()->protocol, "http_session"); } do { string line = io.readLine(); done = line.empty() || line == "\r\n"; if (!done) { header.append(line); } } while (!done); ensure("(1)", containsSubstring(header, "Upgrade: raw\r\n")); ensure("(2)", containsSubstring(header, "Connection: Upgrade\r\n")); writeExact(connection, "hello\n"); ensure_equals(io.readLine(), "Echo: hello\n"); } // Test small response buffering. // Test large response buffering. } passenger-4.0.37/test/cxx/ScgiRequestParserTest.cpp000644 000765 000024 00000033124 12233035540 022757 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include "agents/HelperAgent/ScgiRequestParser.h" using namespace Passenger; using namespace std; namespace tut { struct ScgiRequestParserTest { ScgiRequestParser parser; }; DEFINE_TEST_GROUP(ScgiRequestParserTest); TEST_METHOD(1) { // It has an initial state of READING_LENGTH_STRING and does // not have anything in its header data buffer. ensure_equals(parser.getState(), ScgiRequestParser::READING_LENGTH_STRING); ensure(parser.getHeaderData().empty()); } /***** Test parsing a complete SCGI request in a single pass. *****/ TEST_METHOD(2) { // Parsing a request with a single header and no body. static const char data[] = "12:hello\0world\0,"; ensure_equals("It accepted all input.", parser.feed(data, sizeof(data) - 1), sizeof(data) - 1); ensure_equals("It is in the accepting state.", parser.getState(), ScgiRequestParser::DONE); ensure_equals("It parsed the header data.", parser.getHeaderData(), string("hello\0world\0", 12)); ensure(parser.getHeader("hello") == "world"); } TEST_METHOD(3) { // Parsing a request with a single header and a body. static const char data[] = "12:hello\0world\0,data"; ensure_equals("It accepted all input.", parser.feed(data, sizeof(data) - 1 - 4), sizeof(data) - 1 - 4); ensure_equals("It is in the accepting state.", parser.getState(), ScgiRequestParser::DONE); ensure_equals("It parsed the header data.", parser.getHeaderData(), string("hello\0world\0", 12)); ensure(parser.getHeader("hello") == "world"); } TEST_METHOD(4) { // Parsing a request with multiple headers and no body. static const char data[] = "19:hello\0world\0SCGI\0001\0,"; ensure_equals("It accepted all input.", parser.feed(data, sizeof(data) - 1), sizeof(data) - 1); ensure_equals("It is in the accepting state.", parser.getState(), ScgiRequestParser::DONE); ensure_equals("It parsed the header data.", parser.getHeaderData(), string("hello\0world\0SCGI\0001\0", 19)); ensure(parser.getHeader("hello") == "world"); ensure(parser.getHeader("SCGI") == "1"); } TEST_METHOD(5) { // Parsing a request with multiple headers and a body. static const char data[] = "19:hello\0world\0SCGI\0001\0,body"; ensure_equals("It accepted all input.", parser.feed(data, sizeof(data) - 1 - 4), sizeof(data) - 1 - 4); ensure_equals("It is in the accepting state.", parser.getState(), ScgiRequestParser::DONE); ensure_equals("It parsed the header data.", parser.getHeaderData(), string("hello\0world\0SCGI\0001\0", 19)); ensure(parser.getHeader("hello") == "world"); ensure(parser.getHeader("SCGI") == "1"); } TEST_METHOD(6) { // Parsing a request that's larger than the limit. parser = ScgiRequestParser(9); parser.feed("10:", 3); ensure_equals("It is in the error state", parser.getState(), ScgiRequestParser::ERROR); ensure_equals(parser.getErrorReason(), ScgiRequestParser::LIMIT_REACHED); } /***** Test parsing a complete SCGI request in multiple passes. *****/ TEST_METHOD(8) { // Parsing a request with multiple headers and a body. // 1 byte per pass. static const char data[] = "20:hello\0world\0foo\0bar\0,data"; for (unsigned int i = 0; i < sizeof(data) - 1 - 4; i++) { ensure_equals(parser.feed(&data[i], 1), 1u); } ensure_equals("It is in the accepting state.", parser.getState(), ScgiRequestParser::DONE); ensure_equals("It parsed the header data.", parser.getHeaderData(), string("hello\0world\0foo\0bar\0", 20)); ensure(parser.getHeader("hello") == "world"); ensure(parser.getHeader("foo") == "bar"); } TEST_METHOD(9) { // Parsing a request with multiple headers and a body. // Half element per pass. ensure_equals(parser.feed("2", 1), 1u); ensure_equals(parser.feed("0", 1), 1u); ensure_equals(parser.feed(":", 1), 1u); ensure_equals(parser.feed("hello\0world\0", 12), 12u); ensure_equals(parser.feed("foo\0bar\0", 8), 8u); ensure_equals(parser.feed(",", 1), 1u); ensure_equals(parser.feed("da", 2), 0u); ensure_equals(parser.feed("ta", 2), 0u); ensure_equals("It is in the accepting state.", parser.getState(), ScgiRequestParser::DONE); ensure_equals("It parsed the header data.", parser.getHeaderData(), string("hello\0world\0foo\0bar\0", 20)); ensure(parser.getHeader("hello") == "world"); ensure(parser.getHeader("foo") == "bar"); } TEST_METHOD(10) { // Parsing a request with multiple headers and a body. // 1 element per pass. ensure_equals(parser.feed("20", 2), 2u); ensure_equals(parser.feed(":", 1), 1u); ensure_equals(parser.feed("hello\0world\0foo\0bar\0", 20), 20u); ensure_equals(parser.feed(",", 1), 1u); ensure_equals(parser.feed("data", 4), 0u); ensure_equals("It is in the accepting state.", parser.getState(), ScgiRequestParser::DONE); ensure_equals("It parsed the header data.", parser.getHeaderData(), string("hello\0world\0foo\0bar\0", 20)); ensure(parser.getHeader("hello") == "world"); ensure(parser.getHeader("foo") == "bar"); } TEST_METHOD(11) { // Parsing a request with multiple headers and a body. // 2 elements per pass. ensure_equals(parser.feed("20:", 3), 3u); ensure_equals(parser.feed("hello\0world\0foo\0bar\0,", 21), 21u); ensure_equals(parser.feed("data", 4), 0u); ensure_equals("It is in the accepting state.", parser.getState(), ScgiRequestParser::DONE); ensure_equals("It parsed the header data.", parser.getHeaderData(), string("hello\0world\0foo\0bar\0", 20)); ensure(parser.getHeader("hello") == "world"); ensure(parser.getHeader("foo") == "bar"); } TEST_METHOD(12) { // Parsing a request with multiple headers and a body. // Variable number of elements per pass. ensure_equals(parser.feed("20:h", 4), 4u); ensure_equals(parser.feed("ello\0world\0foo\0bar", 18), 18u); ensure_equals(parser.feed("\0,data", 6), 2u); ensure_equals("It is in the accepting state.", parser.getState(), ScgiRequestParser::DONE); ensure_equals("It parsed the header data.", parser.getHeaderData(), string("hello\0world\0foo\0bar\0", 20)); ensure(parser.getHeader("hello") == "world"); ensure(parser.getHeader("foo") == "bar"); } TEST_METHOD(13) { // It makes an internal copy of the data. char data[] = "20:hello\0world\0foo\0bar\0,"; for (unsigned int i = 0; i < sizeof(data) - 1; i++) { ensure_equals(parser.feed(&data[i], 1), 1u); } memset(data, 0, sizeof(data)); ensure_equals(parser.getHeaderData(), string("hello\0world\0foo\0bar\0", 20)); ensure(parser.getHeader("hello") == "world"); ensure(parser.getHeader("foo") == "bar"); } /***** Test parsing invalid SCGI requests in one pass. *****/ TEST_METHOD(16) { // Invalid first character for length string. ensure_equals("Parser did not accept anything.", parser.feed("hello world!", 12), 0u); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(17) { // Invalid character inside length string. ensure_equals(parser.feed("12x:hello world!", 16), 2u); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(18) { // Invalid character in place of colon. ensure_equals(parser.feed("12#hello world!", 15), 2u); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(19) { // Invalid character in place of comma. ensure_equals(parser.feed("12:hello\0world\0!", 16), 15u); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(20) { // Only a header name, without even a null terminator. ensure_equals(parser.feed("5:hello,", 8), (size_t) 8); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(21) { // Only a header name, with a null terminator. ensure_equals(parser.feed("6:hello\0,", 9), (size_t) 9); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(22) { // A header name with its value not having a null terminator. ensure_equals(parser.feed("7:foo\0bar,", 10), (size_t) 10); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(23) { // A header name without corresponding value. ensure_equals(parser.feed("10:foo\0bar\0a\0,", 14), (size_t) 14); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(24) { // Length string is too large. static const char data[] = "999999999999999999999"; ensure(parser.feed(data, sizeof(data) - 1) < sizeof(data) - 1); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(25) { // An empty header name. ensure_equals(parser.feed("5:\0bar\0,", 8), (size_t) 8); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(26) { // An empty header. ensure_equals(parser.feed("0:,", 3), (size_t) 2); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } /***** Test parsing invalid SCGI requests in multiple passes. *****/ TEST_METHOD(27) { // Once the parser has entered the error state, it stays there. ensure_equals(parser.feed("hello world!", 12), 0u); ensure_equals(parser.feed("1", 1), 0u); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(28) { // Invalid character inside length string. ensure_equals(parser.feed("12", 2), 2u); ensure_equals(parser.feed("x:", 2), 0u); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(29) { // Invalid character in place of colon. ensure_equals(parser.feed("12", 2), 2u); ensure_equals(parser.feed("#", 1), 0u); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(30) { // Invalid character in place of comma. ensure_equals(parser.feed("12:hello\0world\0", 15), 15u); ensure_equals(parser.feed("!", 1), 0u); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(31) { // Only a header name, without even a null terminator. ensure_equals(parser.feed("5:hell", 6), (size_t) 6); ensure_equals(parser.feed("o,", 2), (size_t) 2); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(32) { // Only a header name, with a null terminator. ensure_equals(parser.feed("6:hello", 7), (size_t) 7); ensure_equals(parser.feed("\0,", 2), (size_t) 2); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(33) { // A header name with its value not having a null terminator. ensure_equals(parser.feed("7:foo\0ba", 8), (size_t) 8); ensure_equals(parser.feed("r,", 2), (size_t) 2); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(34) { // A header name without corresponding value. ensure_equals(parser.feed("10:foo\0bar\0a", 12), (size_t) 12); ensure_equals(parser.feed("\0,", 2), (size_t) 2); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(35) { // Length string is too large. static const char data[] = "999999999999999999999"; ensure_equals(parser.feed("99", 2), 2u); ensure(parser.feed(data, sizeof(data) - 1) < sizeof(data) - 1); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } TEST_METHOD(36) { // Parsing a request that's larger than the limit. parser = ScgiRequestParser(9); parser.feed("1", 1); parser.feed("0", 1); parser.feed(":", 1); ensure_equals("It is in the error state", parser.getState(), ScgiRequestParser::ERROR); ensure_equals(parser.getErrorReason(), ScgiRequestParser::LIMIT_REACHED); } TEST_METHOD(37) { // An empty header name. ensure_equals(parser.feed("5:\0", 3), (size_t) 3); ensure_equals(parser.feed("bar\0,", 5), (size_t) 5); ensure_equals("Parser is in the error state.", parser.getState(), ScgiRequestParser::ERROR); } /***** Test parsing incomplete SCGI requests. *****/ TEST_METHOD(40) { // Incomplete length string. ensure_equals(parser.feed("2", 1), 1u); ensure_equals("Parser is still waiting for length string input.", parser.getState(), ScgiRequestParser::READING_LENGTH_STRING); } TEST_METHOD(41) { // Incomplete header. ensure_equals(parser.feed("21:", 3), 3u); ensure_equals("Parser is waiting for header data input.", parser.getState(), ScgiRequestParser::READING_HEADER_DATA); } TEST_METHOD(42) { // Incomplete header. ensure_equals(parser.feed("20:hel", 6), 6u); ensure_equals("Parser is waiting for header data input.", parser.getState(), ScgiRequestParser::READING_HEADER_DATA); } TEST_METHOD(43) { // Complete header but no comma. ensure_equals(parser.feed("8:foo\0bar\0", 10), 10u); ensure_equals("Parser is waiting for comma.", parser.getState(), ScgiRequestParser::EXPECTING_COMMA); } TEST_METHOD(44) { // Parsing a request that's smaller than the limit. static const char data[] = "10:"; parser = ScgiRequestParser(11); parser.feed(data, sizeof(data) - 1); ensure_equals("It accepted the data (9)", parser.getState(), ScgiRequestParser::READING_HEADER_DATA); parser = ScgiRequestParser(10); parser.feed(data, sizeof(data) - 1); ensure_equals("It accepted the data (10)", parser.getState(), ScgiRequestParser::READING_HEADER_DATA); } } passenger-4.0.37/test/cxx/ServerInstanceDirTest.cpp000644 000765 000024 00000015165 12233035540 022743 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include "ServerInstanceDir.h" using namespace Passenger; using namespace std; namespace tut { struct ServerInstanceDirTest { string parentDir; TempDir tmpDir; string nobodyGroup; ServerInstanceDirTest(): tmpDir("server_instance_dir_test.tmp") { parentDir = "server_instance_dir_test.tmp"; nobodyGroup = getPrimaryGroupName("nobody"); } void createGenerationDir(const string &instanceDir, unsigned int number) { string command = "mkdir " + instanceDir + "/generation-" + toString(number); runShellCommand(command.c_str()); } }; DEFINE_TEST_GROUP(ServerInstanceDirTest); TEST_METHOD(2) { // The (string) constructor creates a ServerInstanceDir object that's // associated with the given directory, and creates the directory // if it doesn't exist. ServerInstanceDir dir(parentDir + "/passenger-test.1234"); ServerInstanceDir dir2(dir.getPath()); ServerInstanceDir dir3(parentDir + "/foo"); ensure_equals(dir2.getPath(), dir.getPath()); ensure_equals(dir3.getPath(), parentDir + "/foo"); ensure_equals(getFileType(dir3.getPath()), FT_DIRECTORY); } TEST_METHOD(3) { // A ServerInstanceDir object removes the server instance directory // upon destruction, but only if there are no more generations in it. { ServerInstanceDir dir(parentDir + "/passenger-test.1234"); } ensure_equals(listDir(parentDir).size(), 0u); { ServerInstanceDir dir(parentDir + "/passenger-test.1234"); createGenerationDir(dir.getPath(), 1); } ensure_equals(listDir(parentDir).size(), 1u); } TEST_METHOD(4) { // The destructor does not throw any exceptions if the server instance // directory doesn't exist anymore. ServerInstanceDir dir(parentDir + "/passenger-test.1234"); removeDirTree(dir.getPath()); } TEST_METHOD(5) { // The destructor doesn't remove the server instance directory if it // wasn't created with the ownership flag or if it's been detached. string path, path2; makeDirTree(parentDir + "/passenger-test.1234"); makeDirTree(parentDir + "/passenger-test.5678"); { ServerInstanceDir dir(parentDir + "/passenger-test.1234", false); ServerInstanceDir dir2(parentDir + "/passenger-test.5678", false); dir2.detach(); path = dir.getPath(); path2 = dir2.getPath(); } ensure_equals(getFileType(path), FT_DIRECTORY); ensure_equals(getFileType(path2), FT_DIRECTORY); } TEST_METHOD(6) { // If there are no existing generations, newGeneration() creates a new // generation directory with number 0. ServerInstanceDir dir(parentDir + "/passenger-test.1234"); unsigned int ncontents = listDir(dir.getPath()).size(); ServerInstanceDir::GenerationPtr generation = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); ensure_equals(generation->getNumber(), 0u); ensure_equals(getFileType(generation->getPath()), FT_DIRECTORY); ensure_equals(listDir(dir.getPath()).size(), ncontents + 1); } TEST_METHOD(7) { // A Generation object returned by newGeneration() deletes the associated // generation directory upon destruction. ServerInstanceDir dir(parentDir + "/passenger-test.1234"); ServerInstanceDir::GenerationPtr generation = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); string path = generation->getPath(); generation.reset(); ensure_equals(getFileType(path), FT_NONEXISTANT); } TEST_METHOD(8) { // getNewestGeneration() returns the newest generation. ServerInstanceDir dir(parentDir + "/passenger-test.1234"); ServerInstanceDir::GenerationPtr generation0 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); ServerInstanceDir::GenerationPtr generation1 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); ServerInstanceDir::GenerationPtr generation2 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); ServerInstanceDir::GenerationPtr generation3 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); generation2.reset(); ensure_equals(dir.getNewestGeneration()->getNumber(), 3u); generation3.reset(); ensure_equals(dir.getNewestGeneration()->getNumber(), 1u); } TEST_METHOD(9) { // getNewestGeneration returns null if there are no generations. ServerInstanceDir dir(parentDir + "/passenger-test.1234"); ensure(dir.getNewestGeneration() == NULL); } TEST_METHOD(10) { // A Generation object returned by getNewestGeneration() doesn't delete // the associated generation directory upon destruction. ServerInstanceDir dir(parentDir + "/passenger-test.1234"); ServerInstanceDir::GenerationPtr generation = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); ServerInstanceDir::GenerationPtr newestGeneration = dir.getNewestGeneration(); newestGeneration.reset(); ensure_equals(getFileType(generation->getPath()), FT_DIRECTORY); } TEST_METHOD(11) { // getGeneration() returns the given generation. ServerInstanceDir dir(parentDir + "/passenger-test.1234"); ServerInstanceDir::GenerationPtr generation0 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); ServerInstanceDir::GenerationPtr generation1 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); ServerInstanceDir::GenerationPtr generation2 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); ServerInstanceDir::GenerationPtr generation3 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); ensure_equals(dir.getGeneration(0)->getNumber(), 0u); ensure_equals(dir.getGeneration(3)->getNumber(), 3u); } TEST_METHOD(12) { // A Generation object returned by getGeneration() doesn't delete the // associated generation directory upon destruction. ServerInstanceDir dir(parentDir + "/passenger-test.1234"); ServerInstanceDir::GenerationPtr generation0 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); ServerInstanceDir::GenerationPtr generation1 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); dir.getGeneration(0).reset(); dir.getGeneration(1).reset(); ensure_equals(getFileType(generation0->getPath()), FT_DIRECTORY); ensure_equals(getFileType(generation1->getPath()), FT_DIRECTORY); } TEST_METHOD(13) { // A detached Generation doesn't delete the associated generation // directory upon destruction. ServerInstanceDir dir(parentDir + "/passenger-test.1234"); ServerInstanceDir::GenerationPtr generation = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); string path = generation->getPath(); generation->detach(); generation.reset(); ensure_equals(getFileType(path), FT_DIRECTORY); } TEST_METHOD(14) { // It's possible to have two ServerInstanceDir objects constructed // with the same (pid_t, string) constructor arguments. ServerInstanceDir dir(parentDir + "/passenger-test.1234"); ServerInstanceDir dir2(parentDir + "/passenger-test.1234"); } } passenger-4.0.37/test/cxx/StaticStringTest.cpp000644 000765 000024 00000012760 12233035540 021765 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include "StaticString.h" using namespace Passenger; using namespace std; namespace tut { struct StaticStringTest { }; DEFINE_TEST_GROUP(StaticStringTest); TEST_METHOD(1) { // Test == operator. ensure(StaticString("") == ""); ensure(StaticString("foo") == "foo"); ensure(!(StaticString("foo") == "bar")); ensure(!(StaticString("barr") == "bar")); ensure(!(StaticString("bar") == "barr")); ensure(StaticString("") == StaticString("")); ensure(StaticString("foo") == StaticString("foo")); ensure(!(StaticString("foo") == StaticString("bar"))); ensure(!(StaticString("barr") == StaticString("bar"))); ensure(!(StaticString("bar") == StaticString("barr"))); ensure(StaticString("") == string("")); ensure(StaticString("foo") == string("foo")); ensure(!(StaticString("foo") == string("bar"))); ensure(!(StaticString("barr") == string("bar"))); ensure(!(StaticString("bar") == string("barr"))); } TEST_METHOD(2) { // Test != operator ensure(!(StaticString("") != "")); ensure(!(StaticString("foo") != "foo")); ensure(StaticString("foo") != "bar"); ensure(StaticString("barr") != "bar"); ensure(StaticString("bar") != "barr"); ensure(!(StaticString("") != StaticString(""))); ensure(!(StaticString("foo") != StaticString("foo"))); ensure(StaticString("foo") != StaticString("bar")); ensure(StaticString("barr") != StaticString("bar")); ensure(StaticString("bar") != StaticString("barr")); ensure(!(StaticString("") != string(""))); ensure(!(StaticString("foo") != string("foo"))); ensure(StaticString("foo") != string("bar")); ensure(StaticString("barr") != string("bar")); ensure(StaticString("bar") != string("barr")); } TEST_METHOD(3) { // Test < operator. ensure_equals("Assertion 1", StaticString("") < "", string("") < string("") ); ensure_equals("Assertion 2", StaticString("abc") < "abc", string("abc") < string("abc") ); ensure_equals("Assertion 3", StaticString("foo") < "bar", string("foo") < string("bar") ); ensure_equals("Assertion 4", StaticString("foo") < "bar!", string("foo") < string("bar!") ); ensure_equals("Assertion 5", StaticString("bar!") < "foo", string("bar!") < string("foo") ); ensure_equals("Assertion 6", StaticString("hello") < "hello world", string("hello") < string("hello world") ); ensure_equals("Assertion 7", StaticString("hello world") < "hello", string("hello world") < string("hello") ); } TEST_METHOD(4) { // Test find(char) ensure_equals("Assertion 1", StaticString("").find('c'), string::npos ); ensure_equals("Assertion 2", StaticString("hello world").find('c'), string::npos ); ensure_equals("Assertion 3", StaticString("hello world").find('h'), (string::size_type) 0 ); ensure_equals("Assertion 4", StaticString("hello world").find('o'), (string::size_type) 4 ); ensure_equals("Assertion 5", StaticString("hello world").find('h', 1), string::npos ); ensure_equals("Assertion 6", StaticString("hello world").find('o', 1), (string::size_type) 4 ); ensure_equals("Assertion 7", StaticString("hello world").find('o', 5), (string::size_type) 7 ); ensure_equals("Assertion 8", StaticString("hello world").find('h', 12), string::npos ); ensure_equals("Assertion 9", StaticString("hello world").find('h', 20), string::npos ); } TEST_METHOD(5) { // Test find(str) ensure_equals("Assertion 1", StaticString("").find(""), (string::size_type) 0 ); ensure_equals("Assertion 2", StaticString("").find("c"), string::npos ); ensure_equals("Assertion 3", StaticString("hello world").find("c"), string::npos ); ensure_equals("Assertion 4", StaticString("hello world").find("h"), (string::size_type) 0 ); ensure_equals("Assertion 5", StaticString("hello world").find("o"), (string::size_type) 4 ); ensure_equals("Assertion 6", StaticString("hello world").find("ello"), (string::size_type) 1 ); ensure_equals("Assertion 7", StaticString("hello world").find("world"), (string::size_type) 6 ); ensure_equals("Assertion 8", StaticString("hello world").find("worldd"), string::npos ); ensure_equals("Assertion 9", StaticString("hello world").find(""), (string::size_type) 0 ); ensure_equals("Assertion 10", StaticString("hello world").find("h", 1), string::npos ); ensure_equals("Assertion 11", StaticString("hello hello").find("ll", 1), (string::size_type) 2 ); ensure_equals("Assertion 12", StaticString("hello hello").find("ll", 3), (string::size_type) 8 ); ensure_equals("Assertion 13", StaticString("hello world").find("he", 12), string::npos ); ensure_equals("Assertion 14", StaticString("hello world").find("he", 20), string::npos ); } TEST_METHOD(6) { // Test substr() ensure_equals("Assertion 1", StaticString("hello world").substr(), "hello world"); ensure_equals("Assertion 2", StaticString("hello world").substr(1), "ello world"); ensure_equals("Assertion 3", StaticString("hello world").substr(4), "o world"); ensure_equals("Assertion 4", StaticString("hello world").substr(11), ""); try { StaticString("hello world").substr(12); fail("out_of_range expected"); } catch (out_of_range &) { // Success. } ensure_equals("Assertion 5", StaticString("hello world").substr(2, 3), "llo"); ensure_equals("Assertion 6", StaticString("hello world").substr(6, 10), "world"); } } passenger-4.0.37/test/cxx/StringMapTest.cpp000644 000765 000024 00000005426 12233035540 021254 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include "Utils/StringMap.h" #include #include using namespace Passenger; using namespace std; namespace tut { struct StringMapTest { }; DEFINE_TEST_GROUP(StringMapTest); TEST_METHOD(1) { // get()ing a nonexistant key returns the default value. StringMap m; ensure_equals(m.get("hello"), ""); } TEST_METHOD(2) { // set() works. StringMap m; m.set("hello", "world"); m.set("foo", "bar"); ensure_equals(m.get("hello"), "world"); ensure_equals(m.get("foo"), "bar"); ensure_equals(m.get("something"), ""); } TEST_METHOD(3) { // set() overwrites old value. StringMap m; m.set("hello", "world"); m.set("foo", "bar"); m.set("hello", "new world"); ensure_equals(m.get("hello"), "new world"); ensure_equals(m.get("foo"), "bar"); } TEST_METHOD(4) { // The key is interned so changing the original has no effect. StringMap m; char key1[] = "hello"; char key2[] = "world"; m.set(key1, "xxx"); m.set(key2, "yyy"); key1[4] = 'p'; strcpy(key2, "zzzzz"); ensure_equals(m.get("hello"), "xxx"); ensure_equals(m.get("hellp"), ""); ensure_equals(m.get("world"), "yyy"); ensure_equals(m.get("zzzzz"), ""); } TEST_METHOD(5) { // remove() works. StringMap m; m.set("hello", "world"); m.set("foo", "bar"); ensure(m.remove("hello")); ensure_equals(m.get("hello"), ""); ensure_equals(m.get("foo"), "bar"); ensure(!m.remove("hello")); } TEST_METHOD(6) { // Test iterators. StringMap m; m.set("a", 1); m.set("b", 2); m.set("c", 3); m.set("d", 4); map m2, m3; StringMap::iterator it, end = m.end(); for (it = m.begin(); it != end; it++) { pair p = *it; m2[it->first] = it->second; m3[p.first] = p.second; } ensure_equals(m2.size(), 4u); ensure_equals(m2["a"], 1); ensure_equals(m2["b"], 2); ensure_equals(m2["c"], 3); ensure_equals(m2["d"], 4); ensure_equals(m3.size(), 4u); ensure_equals(m3["a"], 1); ensure_equals(m3["b"], 2); ensure_equals(m3["c"], 3); ensure_equals(m3["d"], 4); } TEST_METHOD(7) { // Test const_iterators. StringMap m; m.set("a", 1); m.set("b", 2); m.set("c", 3); m.set("d", 4); map m2, m3; StringMap::const_iterator it, end = m.end(); for (it = m.begin(); it != end; it++) { pair p = *it; m2[it->first] = it->second; m3[p.first] = p.second; } ensure_equals(m2.size(), 4u); ensure_equals(m2["a"], 1); ensure_equals(m2["b"], 2); ensure_equals(m2["c"], 3); ensure_equals(m2["d"], 4); ensure_equals(m3.size(), 4u); ensure_equals(m3["a"], 1); ensure_equals(m3["b"], 2); ensure_equals(m3["c"], 3); ensure_equals(m3["d"], 4); } } passenger-4.0.37/test/cxx/SystemTimeTest.cpp000644 000765 000024 00000001322 12233035540 021442 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include "Utils/SystemTime.h" using namespace Passenger; using namespace std; namespace tut { struct SystemTimeTest { ~SystemTimeTest() { SystemTime::release(); } }; DEFINE_TEST_GROUP(SystemTimeTest); TEST_METHOD(1) { time_t begin = SystemTime::get(); SystemTime::force(1); ensure_equals(SystemTime::get(), (time_t) 1); SystemTime::release(); time_t now = SystemTime::get(); ensure(now >= begin && now <= begin + 2); } TEST_METHOD(2) { time_t begin = SystemTime::get(); SystemTime::force(1); ensure_equals(SystemTime::get(), (time_t) 1); SystemTime::release(); time_t now = SystemTime::get(); ensure(now >= begin && now <= begin + 2); } } passenger-4.0.37/test/cxx/TemplateTest.cpp000644 000765 000024 00000005744 12233035540 021126 0ustar00honglistaff000000 000000 #include #include #include using namespace Passenger; namespace tut { struct TemplateTest { string apply(const StaticString &templateContent, ...) { va_list ap; const char *arg; StringMap params; va_start(ap, templateContent); while ((arg = va_arg(ap, const char *)) != NULL) { params.set(arg, va_arg(ap, const char *)); } string result = Template::apply(templateContent, params); va_end(ap); return result; } }; DEFINE_TEST_GROUP(TemplateTest); TEST_METHOD(1) { // Test 1 substitution. string result = apply("hello {{name}}", "name", "world", NULL); ensure_equals(result, "hello world"); } TEST_METHOD(2) { // Test multiple substitutions. string result = apply("hello {{name}} and {{name2}}", "name", "joe", "name2", "jane", NULL); ensure_equals(result, "hello joe and jane"); } TEST_METHOD(3) { // Test unspecified substitutions. string result = apply("hello {{name}} and {{name2}}!", "name", "joe", NULL); ensure_equals(result, "hello joe and !"); } TEST_METHOD(4) { // Test default values. string result = apply("hello {{name|default=joe}} and {{name2|default=jane}}", NULL); ensure_equals(result, "hello joe and jane"); } TEST_METHOD(5) { // Substitutions are HTML-escaped by default. string result = apply("hello {{name}}", "name", "", NULL); ensure_equals(result, "hello <joe>"); result = apply("hello {{name|default=}}", NULL); ensure_equals(result, "hello <joe>"); } TEST_METHOD(6) { // HTML escaping can be disabled with the 'raw' option. string result = apply("hello {{name|raw}}", "name", "", NULL); ensure_equals(result, "hello "); } TEST_METHOD(7) { // Test combining default values and the 'raw' option. string result = apply("hello {{name|raw,default=}}", NULL); ensure_equals(result, "hello "); } TEST_METHOD(8) { // Test 'if' statements. string result = apply("hello. {{if morning}}good morning. {{/if}}{{if evening}}good evening. {{/if}}", "morning", "true", NULL); ensure_equals(result, "hello. good morning. "); } TEST_METHOD(9) { // An 'if' condition is considered true when it is neither the empty string nor "false". string result = apply("hello. {{if morning}}good morning. {{/if}}" "{{if afternoon}}good afternoon. {{/if}" "{{if evening}}good evening. {{/if}}", "morning", "of course", "afternoon", "false", NULL); ensure_equals(result, "hello. good morning. "); } TEST_METHOD(10) { // Test nesting substitutions within 'if's. string result = apply("hello. {{if name}}good morning {{name}}.{{/if}}", "name", "joe", NULL); ensure_equals(result, "hello. good morning joe."); } TEST_METHOD(11) { // Test auto-breaking on certain characters. string result = apply("{{content}}", "content", "Hello, world: a=b;c=d", NULL); ensure_equals(result, "Hello, world: a=b;c=d"); } } passenger-4.0.37/test/cxx/TestSupport.cpp000644 000765 000024 00000007445 12233035540 021027 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include #include #include #include #include #include #include #include #include #include namespace TestSupport { ResourceLocator *resourceLocator = NULL; Json::Value testConfig; void createServerInstanceDirAndGeneration(ServerInstanceDirPtr &serverInstanceDir, ServerInstanceDir::GenerationPtr &generation) { string path = "/tmp/passenger-test." + toString(getpid()); serverInstanceDir.reset(new ServerInstanceDir(path)); generation = serverInstanceDir->newGeneration(geteuid() == 0, "nobody", getPrimaryGroupName("nobody"), geteuid(), getegid()); } void writeUntilFull(int fd) { int flags, ret; char buf[1024]; memset(buf, 0, sizeof(buf)); flags = fcntl(fd, F_GETFL); fcntl(fd, F_SETFL, flags | O_NONBLOCK); while (true) { ret = write(fd, buf, sizeof(buf)); if (ret == -1) { int e = errno; if (e == EAGAIN) { break; } else { throw SystemException("write() failed", e); } } } while (true) { ret = write(fd, buf, 50); if (ret == -1) { int e = errno; if (e == EAGAIN) { break; } else { throw SystemException("write() failed", e); } } } while (true) { ret = write(fd, buf, 1); if (ret == -1) { int e = errno; if (e == EAGAIN) { break; } else { throw SystemException("write() failed", e); } } } fcntl(fd, F_SETFL, flags); } void replaceStringInFile(const char *filename, const string &toFind, const string &replaceWith) { string content = readAll(filename); FILE *f = fopen(filename, "w"); if (f == NULL) { int e = errno; string message = "Cannot open file '"; message.append(filename); message.append("' for writing"); throw FileSystemException(message, e, filename); } else { StdioGuard guard(f); content = replaceString(content, toFind, replaceWith); fwrite(content.data(), 1, content.size(), f); } } bool containsSubstring(const StaticString &str, const StaticString &substr) { return str.find(substr) != string::npos; } void writeFile(const string &filename, const string &contents) { FILE *f = fopen(filename.c_str(), "w"); if (f == NULL) { int e = errno; string message = "Cannot open file '"; message.append(filename); message.append("' for writing"); throw FileSystemException(message, e, filename); } else { StdioGuard guard(f); fwrite(contents.data(), 1, contents.size(), f); } } void touchFile(const char *filename, time_t timestamp) { FILE *f = fopen(filename, "a"); if (f != NULL) { fclose(f); } else if (errno != EISDIR) { int e = errno; string message = "Cannot touch file '"; message.append(filename); message.append("'"); throw FileSystemException(message, e, filename); } if (timestamp != (time_t) -1) { struct utimbuf times; times.actime = timestamp; times.modtime = timestamp; utime(filename, ×); } } vector listDir(const string &path) { vector result; DIR *d = opendir(path.c_str()); struct dirent *ent; if (d == NULL) { int e = errno; throw FileSystemException("Cannot open directory " + path, e, path); } while ((ent = readdir(d)) != NULL) { if (strcmp(ent->d_name, ".") == 0 || strcmp(ent->d_name, "..") == 0) { continue; } result.push_back(ent->d_name); } return result; } string getPrimaryGroupName(const string &username) { struct passwd *user; struct group *group; user = getpwnam(username.c_str()); if (user == NULL) { throw RuntimeException(string("User '") + username + "' does not exist."); } group = getgrgid(user->pw_gid); if (group == NULL) { throw RuntimeException(string("Primary group for user '") + username + "' does not exist."); } return group->gr_name; } } // namespace TestSupport passenger-4.0.37/test/cxx/TestSupport.h000644 000765 000024 00000015140 12233035540 020463 0ustar00honglistaff000000 000000 #ifndef _TEST_SUPPORT_H_ #define _TEST_SUPPORT_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../tut/tut.h" #include #include #include #include #include #include #include extern "C" { struct ev_loop; struct ev_async; } namespace Passenger { class SafeLibev; } namespace TestSupport { using namespace std; using namespace Passenger; using namespace oxt; #define SHOW_EXCEPTION_BACKTRACE(code) \ do { \ try { \ code \ } catch (const tracable_exception &e) { \ cerr << e.what() << "\n" << e.backtrace(); \ throw; \ } \ } while (0) #define EVENTUALLY2(deadlineMsec, sleepTimeMsec, code) \ do { \ unsigned long long deadlineTime = SystemTime::getMsec(true) + deadlineMsec; \ bool result = false; \ while (!result && SystemTime::getMsec(true) < deadlineTime) { \ { \ code \ } \ if (!result) { \ usleep(sleepTimeMsec * 1000); \ } \ } \ if (!result) { \ fail("EVENTUALLY(" #code ") failed"); \ } \ } while (0) #define EVENTUALLY(deadlineSec, code) EVENTUALLY2(deadlineSec * 1000, 10, code) #define SHOULD_NEVER_HAPPEN(deadline, code) \ do { \ unsigned long long deadlineTime = SystemTime::getMsec(true) + deadline; \ bool result = false; \ while (!result && SystemTime::getMsec(true) < deadlineTime) { \ code \ if (!result) { \ usleep(10000); \ } \ } \ if (result) { \ fail("SHOULD_NEVER_HAPPEN(" #code ") failed"); \ } \ } while (0) extern ResourceLocator *resourceLocator; extern Json::Value testConfig; /** * Create a server instance directory and generation with default parameters, * suitable for unit testing. */ void createServerInstanceDirAndGeneration(ServerInstanceDirPtr &serverInstanceDir, ServerInstanceDir::GenerationPtr &generation); /** * Writes zeroes into the given file descriptor its buffer is full (i.e. * the next write will block). * * @throws SystemException */ void writeUntilFull(int fd); /** * Look for 'toFind' inside the given file, replace it with 'replaceWith' and write * the result back to the file. Only the first occurence of 'toFind' is replaced. * * @throws FileSystemException */ void replaceStringInFile(const char *filename, const string &toFind, const string &replaceWith); /** * Returns whether 'str' contains the given substring. */ bool containsSubstring(const StaticString &str, const StaticString &substr); /** * Writes the given data into the given file. * * @throws FileSystemException */ void writeFile(const string &filename, const string &contents); /** * Touch the given file: create the file if it doesn't exist, update its * timestamp if it does. If the timestamp argument is -1, then * the current system time will be used, otherwise the given timestamp * will be used. * * @throws FileSystemException */ void touchFile(const char *filename, time_t timestamp = (time_t) - 1); /** * Returns all filenames in the given directory. */ vector listDir(const string &path); /** * Returns the name of the primary group of the given user. */ string getPrimaryGroupName(const string &username); /** * Class which creates a temporary directory of the given name, and deletes * it upon destruction. */ class TempDir { private: string name; public: TempDir(const string &name) { this->name = name; if (mkdir(name.c_str(), S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) != 0 && errno != EEXIST) { int e = errno; string message = "Cannot create directory '"; message.append(name); message.append("'"); throw FileSystemException(message, e, name); } } ~TempDir() { removeDirTree(name); } }; /** * Creates a temporary copy of the given directory. This copy is deleted * upon object destruction. */ class TempDirCopy { private: string dir; public: TempDirCopy(const string &source, const string &dest) { dir = dest; removeDirTree(dest); char command[1024]; snprintf(command, sizeof(command), "cp -pR \"%s\" \"%s\"", source.c_str(), dest.c_str()); pid_t pid = fork(); if (pid == 0) { resetSignalHandlersAndMask(); disableMallocDebugging(); closeAllFileDescriptors(2); execlp("/bin/sh", "/bin/sh", "-c", command, (char * const) 0); _exit(1); } else if (pid == -1) { int e = errno; throw SystemException("Cannot fork()", e); } else { waitpid(pid, NULL, 0); } } ~TempDirCopy() { removeDirTree(dir); } }; /** * Class which deletes the given file upon destruction. */ class DeleteFileEventually { private: string filename; public: DeleteFileEventually(const string &filename, bool deleteNow = true) { this->filename = filename; if (deleteNow) { unlink(filename.c_str()); } } ~DeleteFileEventually() { unlink(filename.c_str()); } }; /** * Spawns a thread which will be interrupted and joined when this TempThread * object is destroyed. */ class TempThread { public: oxt::thread thread; TempThread(boost::function func) : thread(boost::bind(runAndPrintExceptions, func, true)) { } ~TempThread() { thread.interrupt_and_join(); } }; class AtomicInt { private: mutable boost::mutex lock; int val; public: AtomicInt() { val = 0; } AtomicInt(int value) { val = value; } AtomicInt(const AtomicInt &other) { val = other.val; } int get() const { boost::lock_guard l(lock); return val; } void set(int value) { boost::lock_guard l(lock); val = value; } AtomicInt &operator=(int value) { set(value); return *this; } AtomicInt &operator++() { boost::lock_guard l(lock); val++; return *this; } AtomicInt operator++(int) { boost::lock_guard l(lock); AtomicInt temp(*this); val++; return temp; } operator int() const { return get(); } }; } // namespace TestSupport using namespace TestSupport; #endif /* _TEST_SUPPORT_H_ */ passenger-4.0.37/test/cxx/UnionStationTest.cpp000644 000765 000024 00000053677 12233035540 022015 0ustar00honglistaff000000 000000 #include #include #include #include #include #include #include #include #include using namespace Passenger; using namespace Passenger::UnionStation; using namespace std; using namespace oxt; namespace tut { struct UnionStationTest { static const unsigned long long YESTERDAY = 1263299017000000ull; // January 12, 2009, 12:23:37 UTC static const unsigned long long TODAY = 1263385422000000ull; // January 13, 2009, 12:23:42 UTC static const unsigned long long TOMORROW = 1263471822000000ull; // January 14, 2009, 12:23:42 UTC #define TODAY_TXN_ID "cjb8n-abcd" #define TODAY_TIMESTAMP_STR "cftz90m3k0" ServerInstanceDirPtr serverInstanceDir; ServerInstanceDir::GenerationPtr generation; string socketFilename; string socketAddress; string dumpFile; AccountsDatabasePtr accountsDatabase; ev::dynamic_loop eventLoop; FileDescriptor serverFd; LoggingServerPtr server; boost::shared_ptr serverThread; LoggerFactoryPtr factory, factory2, factory3, factory4; UnionStationTest() { createServerInstanceDirAndGeneration(serverInstanceDir, generation); socketFilename = generation->getPath() + "/logging.socket"; socketAddress = "unix:" + socketFilename; dumpFile = generation->getPath() + "/log.txt"; accountsDatabase = ptr(new AccountsDatabase()); accountsDatabase->add("test", "1234", false); setLogLevel(-1); startLoggingServer(); factory = ptr(new LoggerFactory(socketAddress, "test", "1234", "localhost")); factory2 = ptr(new LoggerFactory(socketAddress, "test", "1234", "localhost")); factory3 = ptr(new LoggerFactory(socketAddress, "test", "1234", "localhost")); factory4 = ptr(new LoggerFactory(socketAddress, "test", "1234", "localhost")); } ~UnionStationTest() { stopLoggingServer(); SystemTime::releaseAll(); setLogLevel(0); } void startLoggingServer(const boost::function &initFunc = boost::function()) { VariantMap options; options.set("analytics_dump_file", dumpFile); serverFd = createUnixServer(socketFilename.c_str()); server = ptr(new LoggingServer(eventLoop, serverFd, accountsDatabase, options)); if (initFunc) { initFunc(); } serverThread = ptr(new oxt::thread( boost::bind(&UnionStationTest::runLoop, this) )); } void stopLoggingServer(bool destroy = true) { if (serverThread != NULL) { MessageClient client; client.connect(socketAddress, "test", "1234"); client.write("exit", "immediately", NULL); joinLoggingServer(destroy); } } void joinLoggingServer(bool destroy = true) { serverThread->join(); serverThread.reset(); if (destroy) { server.reset(); } unlink(socketFilename.c_str()); } void runLoop() { eventLoop.loop(); serverFd.close(); } string timestampString(unsigned long long timestamp) { char str[2 * sizeof(unsigned long long) + 1]; integerToHexatri(timestamp, str); return str; } MessageClient createConnection(bool sendInitCommand = true) { MessageClient client; vector args; client.connect(socketAddress, "test", "1234"); if (sendInitCommand) { client.write("init", "localhost", NULL); client.read(args); } return client; } string readDumpFile() { return readAll(dumpFile); } }; DEFINE_TEST_GROUP(UnionStationTest); /*********** Logging interface tests ***********/ TEST_METHOD(1) { // Test logging of new transaction. SystemTime::forceAll(YESTERDAY); LoggerPtr log = factory->newTransaction("foobar"); log->message("hello"); log->message("world"); log->flushToDiskAfterClose(true); ensure(!factory->isNull()); ensure(!log->isNull()); log.reset(); string data = readDumpFile(); ensure(data.find("hello\n") != string::npos); ensure(data.find("world\n") != string::npos); } TEST_METHOD(2) { // Test logging of existing transaction. SystemTime::forceAll(YESTERDAY); LoggerPtr log = factory->newTransaction("foobar"); log->message("message 1"); log->flushToDiskAfterClose(true); LoggerPtr log2 = factory2->continueTransaction(log->getTxnId(), log->getGroupName(), log->getCategory()); log2->message("message 2"); log2->flushToDiskAfterClose(true); log.reset(); log2.reset(); string data = readDumpFile(); ensure("(1)", data.find("message 1\n") != string::npos); ensure("(2)", data.find("message 2\n") != string::npos); } TEST_METHOD(3) { // Test logging with different points in time. SystemTime::forceAll(YESTERDAY); LoggerPtr log = factory->newTransaction("foobar"); log->message("message 1"); SystemTime::forceAll(TODAY); log->message("message 2"); log->flushToDiskAfterClose(true); SystemTime::forceAll(TOMORROW); LoggerPtr log2 = factory2->continueTransaction(log->getTxnId(), log->getGroupName(), log->getCategory()); log2->message("message 3"); log2->flushToDiskAfterClose(true); LoggerPtr log3 = factory3->newTransaction("foobar"); log3->message("message 4"); log3->flushToDiskAfterClose(true); log.reset(); log2.reset(); log3.reset(); string data = readDumpFile(); ensure("(1)", data.find(timestampString(YESTERDAY) + " 1 message 1\n") != string::npos); ensure("(2)", data.find(timestampString(TODAY) + " 2 message 2\n") != string::npos); ensure("(3)", data.find(timestampString(TOMORROW) + " 4 message 3\n") != string::npos); ensure("(4)", data.find(timestampString(TOMORROW) + " 1 message 4\n") != string::npos); } TEST_METHOD(4) { // newTransaction() and continueTransaction() write an ATTACH message // to the log file, while Logger writes a DETACH message upon // destruction. SystemTime::forceAll(YESTERDAY); LoggerPtr log = factory->newTransaction("foobar"); SystemTime::forceAll(TODAY); LoggerPtr log2 = factory2->continueTransaction(log->getTxnId(), log->getGroupName(), log->getCategory()); log2->flushToDiskAfterClose(true); log2.reset(); SystemTime::forceAll(TOMORROW); log->flushToDiskAfterClose(true); log.reset(); string data = readDumpFile(); ensure("(1)", data.find(timestampString(YESTERDAY) + " 0 ATTACH\n") != string::npos); ensure("(2)", data.find(timestampString(TODAY) + " 1 ATTACH\n") != string::npos); ensure("(3)", data.find(timestampString(TODAY) + " 2 DETACH\n") != string::npos); ensure("(4)", data.find(timestampString(TOMORROW) + " 3 DETACH\n") != string::npos); } TEST_METHOD(5) { // newTransaction() generates a new ID, while continueTransaction() // reuses the ID. LoggerPtr log = factory->newTransaction("foobar"); LoggerPtr log2 = factory2->newTransaction("foobar"); LoggerPtr log3 = factory3->continueTransaction(log->getTxnId(), log->getGroupName(), log->getCategory()); LoggerPtr log4 = factory4->continueTransaction(log2->getTxnId(), log2->getGroupName(), log2->getCategory()); ensure_equals(log->getTxnId(), log3->getTxnId()); ensure_equals(log2->getTxnId(), log4->getTxnId()); ensure(log->getTxnId() != log2->getTxnId()); } TEST_METHOD(6) { // An empty Logger doesn't do anything. Logger log; ensure(log.isNull()); log.message("hello world"); ensure_equals(getFileType(dumpFile), FT_NONEXISTANT); } TEST_METHOD(7) { // An empty LoggerFactory doesn't do anything. LoggerFactory factory; ensure(factory.isNull()); LoggerPtr log = factory.newTransaction("foo"); ensure(log->isNull()); log->message("hello world"); ensure_equals(getFileType(dumpFile), FT_NONEXISTANT); } TEST_METHOD(11) { // newTransaction() does not reconnect to the server for a short // period of time if connecting failed factory->setReconnectTimeout(60 * 1000000); factory->setMaxConnectTries(1); SystemTime::forceAll(TODAY); stopLoggingServer(); ensure(factory->newTransaction("foobar")->isNull()); SystemTime::forceAll(TODAY + 30 * 1000000); startLoggingServer(); ensure(factory->newTransaction("foobar")->isNull()); SystemTime::forceAll(TODAY + 61 * 1000000); ensure(!factory->newTransaction("foobar")->isNull()); } TEST_METHOD(12) { // If the logging server crashed and was restarted then // newTransaction() and continueTransaction() print a warning and return // a null log object. One of the next newTransaction()/continueTransaction() // calls will reestablish the connection when the connection timeout // has passed. SystemTime::forceAll(TODAY); LoggerPtr log, log2; log = factory->newTransaction("foobar"); factory2->continueTransaction(log->getTxnId(), "foobar"); log.reset(); // Check connection back into the pool. stopLoggingServer(); startLoggingServer(); log = factory->newTransaction("foobar"); ensure("(1)", log->isNull()); log2 = factory2->continueTransaction("some-id", "foobar"); ensure("(2)", log2->isNull()); SystemTime::forceAll(TODAY + 60000000); log = factory->newTransaction("foobar"); ensure("(3)", !log->isNull()); log2 = factory2->continueTransaction(log->getTxnId(), "foobar"); ensure("(4)", !log2->isNull()); log2->message("hello"); log2->flushToDiskAfterClose(true); log.reset(); log2.reset(); EVENTUALLY(3, result = readDumpFile().find("hello\n") != string::npos; ); } TEST_METHOD(13) { // continueTransaction() does not reconnect to the server for a short // period of time if connecting failed factory->setReconnectTimeout(60 * 1000000); factory->setMaxConnectTries(1); factory2->setReconnectTimeout(60 * 1000000); factory2->setMaxConnectTries(1); SystemTime::forceAll(TODAY); LoggerPtr log = factory->newTransaction("foobar"); factory2->continueTransaction(log->getTxnId(), "foobar"); stopLoggingServer(); ensure(factory2->continueTransaction(log->getTxnId(), "foobar")->isNull()); SystemTime::forceAll(TODAY + 30 * 1000000); startLoggingServer(); ensure(factory2->continueTransaction(log->getTxnId(), "foobar")->isNull()); SystemTime::forceAll(TODAY + 61 * 1000000); ensure(!factory2->continueTransaction(log->getTxnId(), "foobar")->isNull()); } TEST_METHOD(14) { // If a client disconnects from the logging server then all its // transactions that are no longer referenced and have crash protection enabled // will be closed and written to the sink. MessageClient client1 = createConnection(); MessageClient client2 = createConnection(); MessageClient client3 = createConnection(); vector args; SystemTime::forceAll(TODAY); client1.write("openTransaction", TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR, "-", "true", "true", NULL); client1.read(args); client2.write("openTransaction", TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR, "-", "true", NULL); client2.write("log", TODAY_TXN_ID, "1000", NULL); client2.writeScalar("hello world"); client2.write("flush", NULL); client2.read(args); client2.disconnect(); SHOULD_NEVER_HAPPEN(100, // Transaction still has references open, so should not yet be written to sink. result = readDumpFile().find("hello world") != string::npos; ); client1.disconnect(); client3.write("flush", NULL); client3.read(args); EVENTUALLY(5, result = readDumpFile().find("hello world") != string::npos; ); } TEST_METHOD(15) { // If a client disconnects from the logging server then all its // transactions that are no longer referenced and don't have crash // protection enabled will be closed and discarded. MessageClient client1 = createConnection(); MessageClient client2 = createConnection(); MessageClient client3 = createConnection(); vector args; SystemTime::forceAll(TODAY); client1.write("openTransaction", TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR, "-", "false", "true", NULL); client1.read(args); client2.write("openTransaction", TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR, "-", "false", NULL); client2.write("flush", NULL); client2.read(args); client2.disconnect(); client1.disconnect(); client3.write("flush", NULL); client3.read(args); SHOULD_NEVER_HAPPEN(500, result = fileExists(dumpFile) && !readDumpFile().empty(); ); } TEST_METHOD(16) { // Upon server shutdown, all transaction that have crash protection enabled // will be closed and written to to the sink. MessageClient client1 = createConnection(); MessageClient client2 = createConnection(); vector args; SystemTime::forceAll(TODAY); client1.write("openTransaction", TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR, "-", "true", "true", NULL); client1.read(args); client2.write("openTransaction", TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR, "-", "true", NULL); client2.write("flush", NULL); client2.read(args); stopLoggingServer(); EVENTUALLY(5, result = fileExists(dumpFile) && !readDumpFile().empty(); ); } TEST_METHOD(17) { // Upon server shutdown, all transaction that don't have crash protection // enabled will be discarded. MessageClient client1 = createConnection(); MessageClient client2 = createConnection(); vector args; SystemTime::forceAll(TODAY); client1.write("openTransaction", TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR, "-", "false", "true", NULL); client1.read(args); client2.write("openTransaction", TODAY_TXN_ID, "foobar", "", "requests", TODAY_TIMESTAMP_STR, "-", "false", NULL); client2.write("flush", NULL); client2.read(args); stopLoggingServer(); SHOULD_NEVER_HAPPEN(200, result = fileExists(dumpFile) && !readDumpFile().empty(); ); } TEST_METHOD(18) { // Test DataStoreId { // Empty construction. DataStoreId id; ensure_equals(id.getGroupName(), ""); ensure_equals(id.getNodeName(), ""); ensure_equals(id.getCategory(), ""); } { // Normal construction. DataStoreId id("ab", "cd", "ef"); ensure_equals(id.getGroupName(), "ab"); ensure_equals(id.getNodeName(), "cd"); ensure_equals(id.getCategory(), "ef"); } { // Copy constructor. DataStoreId id("ab", "cd", "ef"); DataStoreId id2(id); ensure_equals(id2.getGroupName(), "ab"); ensure_equals(id2.getNodeName(), "cd"); ensure_equals(id2.getCategory(), "ef"); } { // Assignment operator. DataStoreId id("ab", "cd", "ef"); DataStoreId id2; id2 = id; ensure_equals(id2.getGroupName(), "ab"); ensure_equals(id2.getNodeName(), "cd"); ensure_equals(id2.getCategory(), "ef"); DataStoreId id3("gh", "ij", "kl"); id3 = id; ensure_equals(id3.getGroupName(), "ab"); ensure_equals(id3.getNodeName(), "cd"); ensure_equals(id3.getCategory(), "ef"); } { // < operator DataStoreId id, id2; ensure(!(id < id2)); id = DataStoreId("ab", "cd", "ef"); id2 = DataStoreId("ab", "cd", "ef"); ensure(!(id < id2)); id = DataStoreId("ab", "cd", "ef"); id2 = DataStoreId("bb", "cd", "ef"); ensure(id < id2); id = DataStoreId("ab", "cd", "ef"); id2 = DataStoreId(); ensure(id2 < id); id = DataStoreId(); id2 = DataStoreId("ab", "cd", "ef"); ensure(id < id2); } { // == operator ensure(DataStoreId() == DataStoreId()); ensure(DataStoreId("ab", "cd", "ef") == DataStoreId("ab", "cd", "ef")); ensure(!(DataStoreId("ab", "cd", "ef") == DataStoreId())); ensure(!(DataStoreId("ab", "cd", "ef") == DataStoreId("ab", "cd", "e"))); ensure(!(DataStoreId("ab", "cd", "ef") == DataStoreId("ab", "c", "ef"))); ensure(!(DataStoreId("ab", "cd", "ef") == DataStoreId("a", "cd", "ef"))); } } TEST_METHOD(22) { // The destructor flushes all data. LoggerPtr log = factory->newTransaction("foobar"); log->message("hello world"); log.reset(); stopLoggingServer(); struct stat buf; ensure_equals(stat(dumpFile.c_str(), &buf), 0); ensure(buf.st_size > 0); } TEST_METHOD(23) { // The 'flush' command flushes all data. SystemTime::forceAll(YESTERDAY); LoggerPtr log = factory->newTransaction("foobar"); log->message("hello world"); log.reset(); ConnectionPtr connection = factory->checkoutConnection(); vector args; writeArrayMessage(connection->fd, "flush", NULL); ensure(readArrayMessage(connection->fd, args)); ensure_equals(args.size(), 1u); ensure_equals(args[0], "ok"); struct stat buf; ensure_equals(stat(dumpFile.c_str(), &buf), 0); ensure(buf.st_size > 0); } TEST_METHOD(24) { // A transaction's data is not written out by the server // until the transaction is fully closed. SystemTime::forceAll(YESTERDAY); vector args; LoggerPtr log = factory->newTransaction("foobar"); log->message("hello world"); LoggerPtr log2 = factory2->continueTransaction(log->getTxnId(), log->getGroupName(), log->getCategory()); log2->message("message 2"); log2.reset(); ConnectionPtr connection = factory->checkoutConnection(); writeArrayMessage(connection->fd, "flush", NULL); ensure(readArrayMessage(connection->fd, args)); connection = factory2->checkoutConnection(); writeArrayMessage(connection->fd, "flush", NULL); ensure(readArrayMessage(connection->fd, args)); struct stat buf; ensure_equals(stat(dumpFile.c_str(), &buf), 0); ensure_equals(buf.st_size, (off_t) 0); } TEST_METHOD(25) { // The 'exit' command causes the logging server to exit some time after // the last client has disconnected. New clients are still accepted // as long as the server hasn't exited. SystemTime::forceAll(YESTERDAY); vector args; MessageClient client = createConnection(); MessageClient client2 = createConnection(); client2.write("exit", NULL); ensure("(1)", client2.read(args)); ensure_equals(args.size(), 1u); ensure_equals(args[0], "Passed security"); ensure("(2)", client2.read(args)); ensure_equals(args.size(), 1u); ensure_equals(args[0], "exit command received"); client2.disconnect(); // Not exited yet: there is still a client. client2 = createConnection(); client2.write("ping", NULL); ensure("(3)", client2.read(args)); client2.disconnect(); client.disconnect(); setLogLevel(-2); usleep(25000); // Give server some time to process the connection closes. // No clients now, but we can still connect because the timeout // hasn't passed yet. SystemTime::forceAll(YESTERDAY + 1000000); SHOULD_NEVER_HAPPEN(250, try { close(connectToUnixServer(socketFilename)); result = false; } catch (const SystemException &) { result = true; } ); usleep(50000); // Give server some time to process the connection closes. // It'll be gone in a few seconds. SystemTime::forceAll(YESTERDAY + 1000000 + 5000000); usleep(100000); // Give server some time to run the timer. try { close(connectToUnixServer(socketFilename)); fail("(4)"); } catch (const SystemException &) { // Success } joinLoggingServer(); } TEST_METHOD(26) { // The 'exit semi-gracefully' command causes the logging server to // refuse new clients while exiting some time after the last client has // disconnected. SystemTime::forceAll(YESTERDAY); vector args; MessageClient client = createConnection(); MessageClient client2 = createConnection(); client2.write("exit", "semi-gracefully", NULL); client2.disconnect(); // New connections are refused. client2 = createConnection(); ensure("(1)", !client2.read(args)); client.disconnect(); setLogLevel(-2); usleep(50000); // Give server some time to process the connection closes. // It'll be gone in a few seconds. SystemTime::forceAll(YESTERDAY + 1000000 + 5000000); usleep(100000); // Give server some time to run the timer. try { close(connectToUnixServer(socketFilename)); fail("(2)"); } catch (const SystemException &) { // Success } joinLoggingServer(); } TEST_METHOD(27) { // The 'exit immediately' command causes the logging server to // immediately exit. Open transactions are not automatically // closed and written out, even those with crash protection // turned on. SystemTime::forceAll(YESTERDAY); LoggerPtr log = factory->newTransaction("foobar"); log->message("hello world"); log.reset(); MessageClient client = createConnection(); client.write("exit", "immediately", NULL); client.disconnect(); // Assertion: the following doesn't block. joinLoggingServer(); } TEST_METHOD(28) { // LoggerFactory treats a server that's semi-gracefully exiting as // one that's refusing connections. SystemTime::forceAll(YESTERDAY); MessageClient client = createConnection(); client.write("exit", "semi-gracefully", NULL); client.disconnect(); factory->setMaxConnectTries(1); LoggerPtr log = factory->newTransaction("foobar"); ensure(log->isNull()); } TEST_METHOD(29) { // One can supply a custom node name per openTransaction command. MessageClient client1 = createConnection(); vector args; SystemTime::forceAll(TODAY); client1.write("openTransaction", TODAY_TXN_ID, "foobar", "remote", "requests", TODAY_TIMESTAMP_STR, "-", "true", NULL); client1.write("closeTransaction", TODAY_TXN_ID, TODAY_TIMESTAMP_STR, NULL); client1.write("flush", NULL); client1.read(args); client1.disconnect(); ensure(fileExists(dumpFile)); } TEST_METHOD(30) { // A transaction is only written to the sink if it passes all given filters. // Test logging of new transaction. SystemTime::forceAll(YESTERDAY); LoggerPtr log = factory->newTransaction("foobar", "requests", "-", "uri == \"/foo\"" "\1" "uri != \"/bar\""); log->message("URI: /foo"); log->message("transaction 1"); log->flushToDiskAfterClose(true); log.reset(); log = factory->newTransaction("foobar", "requests", "-", "uri == \"/foo\"" "\1" "uri == \"/bar\""); log->message("URI: /foo"); log->message("transaction 2"); log->flushToDiskAfterClose(true); log.reset(); string data = readDumpFile(); ensure("(1)", data.find("transaction 1\n") != string::npos); ensure("(2)", data.find("transaction 2\n") == string::npos); } /************************************/ } passenger-4.0.37/test/cxx/UtilsTest.cpp000644 000765 000024 00000057110 12233035540 020445 0ustar00honglistaff000000 000000 #include #include #include #include #include #include #include #include #include #include using namespace Passenger; using namespace std; namespace tut { struct UtilsTest { vector output; string cwd; string oldPath; TempDir tempDir; UtilsTest(): tempDir("tmp.dir") { char buffer[PATH_MAX]; cwd = getcwd(buffer, sizeof(buffer)); oldPath = getenv("PATH"); unsetenv("PASSENGER_TEMP_DIR"); } ~UtilsTest() { setenv("PATH", oldPath.c_str(), 1); unsetenv("PASSENGER_TEMP_DIR"); chdir(cwd.c_str()); } void testMakeDirTreeMode(const char *name, const char *mode, mode_t expected) { TempDir td("tmp.dir2"); struct stat buf; mode_t allModes = S_IRWXU | S_ISUID | S_IRWXG | S_ISGID | S_IRWXO; makeDirTree("tmp.dir2/foo", mode); stat("tmp.dir2/foo", &buf); ensure_equals(name, buf.st_mode & allModes, expected); } }; DEFINE_TEST_GROUP_WITH_LIMIT(UtilsTest, 100); /***** Test split() *****/ TEST_METHOD(1) { split("", ':', output); ensure_equals(output.size(), 0u); splitIncludeSep("", ':', output); ensure_equals(output.size(), 0u); } TEST_METHOD(2) { split("hello world", ':', output); ensure_equals(output.size(), 1u); ensure_equals(output[0], "hello world"); splitIncludeSep("hello world", ':', output); ensure_equals(output.size(), 1u); ensure_equals(output[0], "hello world"); } TEST_METHOD(3) { split("hello world:foo bar", ':', output); ensure_equals(output.size(), 2u); ensure_equals(output[0], "hello world"); ensure_equals(output[1], "foo bar"); splitIncludeSep("hello world:foo bar", ':', output); ensure_equals(output.size(), 2u); ensure_equals(output[0], "hello world:"); ensure_equals(output[1], "foo bar"); } TEST_METHOD(4) { split("hello world:", ':', output); ensure_equals("(1)", output.size(), 2u); ensure_equals("(2)", output[0], "hello world"); ensure_equals("(3)", output[1], ""); splitIncludeSep("hello world:", ':', output); ensure_equals("(4)", output.size(), 1u); ensure_equals("(5)", output[0], "hello world:"); } TEST_METHOD(5) { split(":hello world", ':', output); ensure_equals(output.size(), 2u); ensure_equals(output[0], ""); ensure_equals(output[1], "hello world"); splitIncludeSep(":hello world", ':', output); ensure_equals(output.size(), 2u); ensure_equals(output[0], ":"); ensure_equals(output[1], "hello world"); } TEST_METHOD(6) { split("abc:def::ghi", ':', output); ensure_equals(output.size(), 4u); ensure_equals(output[0], "abc"); ensure_equals(output[1], "def"); ensure_equals(output[2], ""); ensure_equals(output[3], "ghi"); splitIncludeSep("abc:def::ghi", ':', output); ensure_equals(output.size(), 4u); ensure_equals(output[0], "abc:"); ensure_equals(output[1], "def:"); ensure_equals(output[2], ":"); ensure_equals(output[3], "ghi"); } TEST_METHOD(7) { split("abc:::def", ':', output); ensure_equals(output.size(), 4u); ensure_equals(output[0], "abc"); ensure_equals(output[1], ""); ensure_equals(output[2], ""); ensure_equals(output[3], "def"); splitIncludeSep("abc:::def", ':', output); ensure_equals(output.size(), 4u); ensure_equals(output[0], "abc:"); ensure_equals(output[1], ":"); ensure_equals(output[2], ":"); ensure_equals(output[3], "def"); } /***** Test getSystemTempDir() *****/ TEST_METHOD(11) { // It returns "/tmp" if the PASSENGER_TEMP_DIR environment is NULL. ensure_equals(string(getSystemTempDir()), "/tmp"); } TEST_METHOD(12) { // It returns "/tmp" if the PASSENGER_TEMP_DIR environment is an empty string. setenv("PASSENGER_TEMP_DIR", "", 1); ensure_equals(string(getSystemTempDir()), "/tmp"); } TEST_METHOD(13) { // It returns the value of the PASSENGER_TEMP_DIR environment if it is not NULL and not empty. setenv("PASSENGER_TEMP_DIR", "/foo", 1); ensure_equals(string(getSystemTempDir()), "/foo"); } /***** Test BufferedUpload *****/ TEST_METHOD(20) { // The resulting file handle is readable and writable. TempDir td("utils_test.tmp"); BufferedUpload t("utils_test.tmp"); char line[30]; fprintf(t.handle, "hello world!"); fflush(t.handle); fseek(t.handle, 0, SEEK_SET); memset(line, 0, sizeof(line)); fgets(line, sizeof(line), t.handle); ensure_equals(string(line), "hello world!"); } TEST_METHOD(21) { // It immediately unlinks the temp file. TempDir td("utils_test.tmp"); BufferedUpload t("utils_test.tmp"); ensure_equals(listDir("utils_test.tmp").size(), 0u); } /***** Test escapeForXml() *****/ TEST_METHOD(25) { ensure_equals(escapeForXml(""), ""); ensure_equals(escapeForXml("hello world"), "hello world"); ensure_equals(escapeForXml("./hello_world/foo.txt"), "./hello_world/foo.txt"); ensure_equals(escapeForXml("hello(0x0, buf), 1u); ensure("(1)", strcmp(buf, "0") == 0); ensure_equals("(2)", integerToHex(0x1, buf), 1u); ensure("(2)", strcmp(buf, "1") == 0); ensure_equals("(3)", integerToHex(0x9, buf), 1u); ensure("(3)", strcmp(buf, "9") == 0); ensure_equals("(4)", integerToHex(0xe, buf), 1u); ensure("(4)", strcmp(buf, "e") == 0); ensure_equals("(5)", integerToHex(0xdeadbeef, buf), 8u); ensure("(5)", strcmp(buf, "deadbeef") == 0); ensure_equals("(6)", integerToHex(0x1234f, buf), 5u); ensure("(6)", strcmp(buf, "1234f") == 0); ensure_equals("(7)", integerToHexatri(0x0, buf), 1u); ensure("(7)", strcmp(buf, "0") == 0); ensure_equals("(8)", integerToHexatri(0x1, buf), 1u); ensure("(8)", strcmp(buf, "1") == 0); ensure_equals("(9)", integerToHexatri(0x9, buf), 1u); ensure("(9)", strcmp(buf, "9") == 0); ensure_equals("(10)", integerToHexatri(0xe, buf), 1u); ensure("(10)", strcmp(buf, "e") == 0); ensure_equals("(11)", integerToHexatri(35, buf), 1u); ensure("(11)", strcmp(buf, "z") == 0); ensure_equals(integerToHexatri(0xdeadbeef, buf), 7u); ensure(strcmp(buf, "1ps9wxb") == 0); ensure_equals(integerToHexatri(0x1234f, buf), 4u); ensure(strcmp(buf, "1ljj") == 0); } /***** Test hexToULL(), hexToUint() and hexatriToULL() *****/ TEST_METHOD(49) { ensure_equals(hexToULL(""), 0ull); ensure_equals(hexToULL(" "), 0ull); ensure_equals(hexToULL("1"), 1ull); ensure_equals(hexToULL("9"), 9ull); ensure_equals(hexToULL("a"), 10ull); ensure_equals(hexToULL("B"), 11ull); ensure_equals(hexToULL("1234"), 4660ull); ensure_equals(hexToULL("1a6b"), 6763ull); ensure_equals(hexToULL("1A6B"), 6763ull); ensure_equals(hexToULL("1a6B"), 6763ull); ensure_equals(hexToULL("deadbeef"), 3735928559ull); ensure_equals(hexToULL("dEaDbEeF"), 3735928559ull); ensure_equals(hexToULL("09a2s89"), 2466ull); ensure_equals(hexToULL(" 9a2s89"), 0ull); ensure_equals(hexToUint(""), 0u); ensure_equals(hexToUint(" "), 0u); ensure_equals(hexToUint("1"), 1u); ensure_equals(hexToUint("9"), 9u); ensure_equals(hexToUint("a"), 10u); ensure_equals(hexToUint("B"), 11u); ensure_equals(hexToUint("1234"), 4660u); ensure_equals(hexToUint("1a6b"), 6763u); ensure_equals(hexToUint("1A6B"), 6763u); ensure_equals(hexToUint("1a6B"), 6763u); ensure_equals(hexToUint("deadbeef"), 3735928559u); ensure_equals(hexToUint("dEaDbEeF"), 3735928559u); ensure_equals(hexToUint("09a2s89"), 2466u); ensure_equals(hexToUint(" 9a2s89"), 0u); ensure_equals(hexatriToULL(""), 0ull); ensure_equals(hexatriToULL(" "), 0ull); ensure_equals(hexatriToULL("1"), 1ull); ensure_equals(hexatriToULL("9"), 9ull); ensure_equals(hexatriToULL("a"), 10ull); ensure_equals(hexatriToULL("B"), 11ull); ensure_equals(hexatriToULL("1234"), 49360ull); ensure_equals(hexatriToULL("1a6z"), 59867ull); ensure_equals(hexatriToULL("1A6Z"), 59867ull); ensure_equals(hexatriToULL("1a6Z"), 59867ull); ensure_equals(hexatriToULL("deadroof"), 1049836874415ull); ensure_equals(hexatriToULL("dEaDrOoF"), 1049836874415ull); ensure_equals(hexatriToULL("09a2s89"), 561121641ull); ensure_equals(hexatriToULL(" 9a2s89"), 0ull); } /***** Test stringToLL(), stringToInt() *****/ TEST_METHOD(50) { ensure_equals(stringToLL(""), 0ll); ensure_equals(stringToLL("bla"), 0ll); ensure_equals(stringToLL("0"), 0ll); ensure_equals(stringToLL("000"), 0ll); ensure_equals(stringToLL("1"), 1ll); ensure_equals(stringToLL("9"), 9ll); ensure_equals(stringToLL("010"), 10ll); ensure_equals(stringToLL("928"), 928ll); ensure_equals(stringToLL("2937104"), 2937104ll); ensure_equals(stringToLL("9223372036854775807"), 9223372036854775807ll); ensure_equals(stringToLL(" 5abcdef1234"), 5ll); ensure_equals(stringToLL("-0"), 0ll); ensure_equals(stringToLL("-1"), -1ll); ensure_equals(stringToLL("-010"), -10ll); ensure_equals(stringToLL("-9876"), -9876ll); ensure_equals(stringToLL("-9223372036854775807"), -9223372036854775807ll); ensure_equals(stringToLL(" -5abcdef1234"), -5ll); ensure_equals(stringToInt(""), 0); ensure_equals(stringToInt("bla"), 0); ensure_equals(stringToInt("0"), 0); ensure_equals(stringToInt("000"), 0); ensure_equals(stringToInt("1"), 1); ensure_equals(stringToInt("9"), 9); ensure_equals(stringToInt("010"), 10); ensure_equals(stringToInt("928"), 928); ensure_equals(stringToInt("2937104"), 2937104); ensure_equals(stringToInt(" 5abcdef1234"), 5); ensure_equals(stringToInt("-0"), 0ll); ensure_equals(stringToInt("-1"), -1ll); ensure_equals(stringToInt("-010"), -10ll); ensure_equals(stringToInt("-9876"), -9876); ensure_equals(stringToInt(" -5abcdef1234"), -5); } /***** Test cEscapeString() *****/ TEST_METHOD(51) { ensure_equals(cEscapeString(""), ""); ensure_equals(cEscapeString("abcdXYZ123!?"), "abcdXYZ123!?"); ensure_equals(cEscapeString("foo\n"), "foo\\n"); ensure_equals(cEscapeString("foo\r\nbar\e"), "foo\\r\\nbar\\e"); ensure_equals(cEscapeString(StaticString("\0\x1\x2\x3\x4\x5\x6\x7\x8\x9", 10)), "\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t"); ensure_equals(cEscapeString("\xFF\xFE\t\xD0"), "\\xFF\\xFE\\t\\xD0"); } /***** Test escapeHTML() *****/ TEST_METHOD(52) { const char weird[] = "Weird \x01\x00 characters?"; ensure_equals(escapeHTML(""), ""); ensure_equals(escapeHTML("hello\n\r\t WORLD!"), "hello\n\r\t WORLD!"); ensure_equals(escapeHTML("bold"), "<b>bold</b>"); ensure_equals(escapeHTML(StaticString(weird, sizeof(weird) - 1)), "Weird � characters?"); ensure_equals(escapeHTML("UTF-8: ☃ ☀; ☁ ☂\x01"), "UTF-8: ☃ ☀; ☁ ☂"); } /***** Test absolutizePath() *****/ TEST_METHOD(53) { ensure_equals(absolutizePath(""), cwd); ensure_equals(absolutizePath("."), cwd); ensure_equals(absolutizePath("foo"), cwd + "/foo"); ensure_equals(absolutizePath("foo/bar"), cwd + "/foo/bar"); ensure_equals(absolutizePath("foo//bar"), cwd + "/foo/bar"); ensure_equals(absolutizePath("foo/bar///baz"), cwd + "/foo/bar/baz"); ensure_equals(absolutizePath("foo/./bar"), cwd + "/foo/bar"); ensure_equals(absolutizePath("foo/bar/../baz"), cwd + "/foo/baz"); ensure_equals(absolutizePath("foo/bar/../.."), cwd); ensure_equals(absolutizePath("foo/.././bar"), cwd + "/bar"); ensure_equals(absolutizePath("foo/../bar/./baz"), cwd + "/bar/baz"); ensure_equals(absolutizePath("foo/"), cwd + "/foo"); ensure_equals(absolutizePath("foo//"), cwd + "/foo"); ensure_equals(absolutizePath("/"), "/"); ensure_equals(absolutizePath("////"), "/"); ensure_equals(absolutizePath("/."), "/"); ensure_equals(absolutizePath("/foo"), "/foo"); ensure_equals(absolutizePath("/foo/bar"), "/foo/bar"); ensure_equals(absolutizePath("/foo//bar"), "/foo/bar"); ensure_equals(absolutizePath("/foo/bar///baz"), "/foo/bar/baz"); ensure_equals(absolutizePath("/foo/./bar"), "/foo/bar"); ensure_equals(absolutizePath("/foo/bar/../baz"), "/foo/baz"); ensure_equals(absolutizePath("/foo/bar/../.."), "/"); ensure_equals(absolutizePath("/foo/.././bar"), "/bar"); ensure_equals(absolutizePath("/foo/../bar/./baz"), "/bar/baz"); ensure_equals(absolutizePath("/foo/"), "/foo"); ensure_equals(absolutizePath("/foo//"), "/foo"); ensure_equals(absolutizePath("//foo/bar"), "/foo/bar"); ensure_equals(absolutizePath("///foo//bar"), "/foo/bar"); ensure_equals(absolutizePath("/../.."), "/"); ensure_equals(absolutizePath("/../.././foo"), "/foo"); chdir("/usr/lib"); ensure_equals(absolutizePath(".."), "/usr"); ensure_equals(absolutizePath("."), "/usr/lib"); ensure_equals(absolutizePath("../.."), "/"); ensure_equals(absolutizePath("../../foo"), "/foo"); ensure_equals(absolutizePath("../.././foo/bar"), "/foo/bar"); ensure_equals(absolutizePath("..", "/usr/local/bin"), "/usr/local"); ensure_equals(absolutizePath(".", "/usr/local/bin"), "/usr/local/bin"); ensure_equals(absolutizePath("../..", "/usr/local/bin"), "/usr"); ensure_equals(absolutizePath("../../foo", "/usr/local/bin"), "/usr/foo"); ensure_equals(absolutizePath("../.././foo/bar", "/usr/local/bin"), "/usr/foo/bar"); } /***** Test constantTimeCompare() *****/ TEST_METHOD(54) { ensure("(1)", constantTimeCompare("", "")); ensure("(2)", constantTimeCompare("a", "a")); ensure("(3)", constantTimeCompare("aa", "aa")); ensure("(4)", constantTimeCompare("abc", "abc")); ensure("(5)", !constantTimeCompare("", "a")); ensure("(6)", !constantTimeCompare("", "abcd")); ensure("(7)", !constantTimeCompare("ab", "cd")); ensure("(8)", !constantTimeCompare("ab", "abc")); ensure("(9)", !constantTimeCompare("ab", "abcd")); ensure("(10)", !constantTimeCompare("a", "")); ensure("(11)", !constantTimeCompare("abcd", "")); ensure("(12)", !constantTimeCompare("cd", "ab")); ensure("(13)", !constantTimeCompare("abc", "ab")); ensure("(14)", !constantTimeCompare("abcd", "ab")); } /***** Test integerToOtherBase() *****/ TEST_METHOD(56) { char buf[20], smallbuf[4]; ensure_equals("(1)", integerToOtherBase(0, buf, sizeof(buf)), 1u); ensure_equals("(1.1)", buf[0], '0'); ensure_equals("(1.2)", buf[1], '\0'); ensure_equals("(2)", integerToOtherBase(1234, buf, sizeof(buf)), 4u); ensure_equals("(2.1)", buf[0], '1'); ensure_equals("(2.2)", buf[1], '2'); ensure_equals("(2.3)", buf[2], '3'); ensure_equals("(2.4)", buf[3], '4'); ensure_equals("(2.5)", buf[4], '\0'); ensure_equals("(3)", integerToOtherBase(123, smallbuf, sizeof(smallbuf)), 3u); ensure_equals("(3.1)", smallbuf[0], '1'); ensure_equals("(3.2)", smallbuf[1], '2'); ensure_equals("(3.3)", smallbuf[2], '3'); ensure_equals("(3.4)", smallbuf[3], '\0'); try { integerToOtherBase(1234, smallbuf, sizeof(smallbuf)); fail("Exception expected"); } catch (const std::length_error &) { // Pass. } } } passenger-4.0.37/test/cxx/VariantMapTest.cpp000644 000765 000024 00000012602 12233035540 021404 0ustar00honglistaff000000 000000 #include "TestSupport.h" #include "Utils/VariantMap.h" using namespace Passenger; namespace tut { struct VariantMapTest { VariantMap map; }; DEFINE_TEST_GROUP(VariantMapTest); TEST_METHOD(1) { // Test empty map. ensure_equals(map.size(), 0u); ensure(!map.has("hello")); ensure(!map.has("foo")); } TEST_METHOD(2) { // Test setting and getting string values. map.set("hello", "world"); map.set("abcd", "efgh"); map.set("", "bar"); ensure_equals("(1)", map.get("hello"), "world"); ensure_equals("(2)", map.get("abcd"), "efgh"); ensure_equals("(3)", map.get(""), "bar"); ensure_equals("(4)", map.size(), 3u); ensure("(5)", map.has("hello")); ensure("(6)", map.has("abcd")); ensure("(7)", map.has("")); ensure("(8)", !map.has("xyz")); } TEST_METHOD(3) { // Test setting and getting non-string values. map.set("str", "1234"); map.setInt("int", 5678); map.setULL("ull", 18446744073709551615ull); map.setPid("pid", 47326); map.setUid("uid", (uid_t) 500); map.setGid("gid", (gid_t) 510); map.setUid("negative_uid", (uid_t) -1); map.setGid("negative_gid", (gid_t) -2); map.setBool("true", true); map.setBool("false", false); ensure_equals(map.size(), 10u); ensure(map.has("str")); ensure(map.has("int")); ensure(map.has("ull")); ensure(map.has("pid")); ensure(map.has("uid")); ensure(map.has("gid")); ensure(map.has("negative_uid")); ensure(map.has("negative_gid")); ensure(map.has("true")); ensure(map.has("false")); ensure(!map.has("foo")); ensure_equals(map.get("str"), "1234"); ensure_equals(map.get("int"), "5678"); ensure_equals(map.get("ull"), "18446744073709551615"); ensure_equals(map.get("pid"), "47326"); ensure_equals(map.get("uid"), "500"); ensure_equals(map.get("gid"), "510"); // No idea how negative_uid and negative_gid are casted to string; // depends on whether the platform defines them as signed or unsigned. ensure_equals(map.get("true"), "true"); ensure_equals(map.get("false"), "false"); ensure_equals(map.getInt("str"), 1234); ensure_equals(map.getInt("int"), 5678); ensure_equals(map.getInt("pid"), 47326); ensure_equals(map.getInt("uid"), 500); ensure_equals(map.getInt("gid"), 510); if (sizeof(uid_t) == sizeof(int)) { ensure_equals(map.getInt("negative_uid"), -1); } if (sizeof(gid_t) == sizeof(int)) { ensure_equals(map.getInt("negative_gid"), -2); } ensure_equals(map.getULL("ull"), 18446744073709551615ull); ensure_equals(map.getPid("pid"), (pid_t) 47326); ensure_equals(map.getUid("uid"), (uid_t) 500); ensure_equals(map.getGid("gid"), (gid_t) 510); ensure_equals(map.getUid("negative_uid"), (uid_t) -1); ensure_equals(map.getGid("negative_gid"), (gid_t) -2); ensure_equals(map.getBool("true"), true); ensure_equals(map.getBool("false"), false); } TEST_METHOD(4) { // get() throws MissingKeyException if the key doesn't // exist and 'required' is true (which it is by default). try { map.get("str"); fail("MissingKeyException expected (str)"); } catch (const VariantMap::MissingKeyException &e) { ensure_equals(e.getKey(), "str"); } try { map.getInt("int"); fail("MissingKeyException expected (int)"); } catch (const VariantMap::MissingKeyException &e) { ensure_equals(e.getKey(), "int"); } try { map.getULL("ull"); fail("MissingKeyException expected (ull)"); } catch (const VariantMap::MissingKeyException &e) { ensure_equals(e.getKey(), "ull"); } try { map.getPid("pid"); fail("MissingKeyException expected (pid)"); } catch (const VariantMap::MissingKeyException &e) { ensure_equals(e.getKey(), "pid"); } try { map.getUid("uid"); fail("MissingKeyException expected (uid)"); } catch (const VariantMap::MissingKeyException &e) { ensure_equals(e.getKey(), "uid"); } try { map.getGid("gid"); fail("MissingKeyException expected (gid)"); } catch (const VariantMap::MissingKeyException &e) { ensure_equals(e.getKey(), "gid"); } try { map.getBool("bool"); fail("MissingKeyException expected (bool)"); } catch (const VariantMap::MissingKeyException &e) { ensure_equals(e.getKey(), "bool"); } } TEST_METHOD(5) { // get() returns the default value if 'required' is false. ensure_equals(map.get("foo", false, "1234"), "1234"); ensure_equals(map.getInt("foo", false, 1234), 1234); ensure_equals(map.getULL("foo", false, 18446744073709551615ull), 18446744073709551615ull); ensure_equals(map.getPid("foo", false, 1234), (pid_t) 1234); ensure_equals(map.getUid("foo", false, 1234), (gid_t) 1234); ensure_equals(map.getGid("foo", false, 1234), (uid_t) 1234); ensure_equals(map.getBool("foo", false, true), true); ensure_equals(map.getBool("foo", false, false), false); } TEST_METHOD(6) { // Test populating from array. const char *ary[] = { "foo", "1234", "bar", "5678" }; try { map.readFrom(ary, 3); fail("ArgumentException expected"); } catch (const ArgumentException &) { // Pass. } map.readFrom(ary, 4); ensure_equals(map.get("foo"), "1234"); ensure_equals(map.get("bar"), "5678"); } TEST_METHOD(7) { // Setting an empty value result in the deletion of the key. map.set("a", "a"); map.set("b", "b"); map.set("b", ""); try { map.get("b"); fail("MissingKeyException expected"); } catch (const VariantMap::MissingKeyException &e) { // Pass. } ensure(!map.has("foo")); ensure_equals(map.size(), 1u); } } passenger-4.0.37/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp000644 000765 000024 00000007533 12233035540 025302 0ustar00honglistaff000000 000000 #include #include #include #include using namespace Passenger; using namespace Passenger::ApplicationPool2; namespace tut { struct ApplicationPool2_DirectSpawnerTest { ServerInstanceDirPtr serverInstanceDir; ServerInstanceDir::GenerationPtr generation; BackgroundEventLoop bg; ProcessPtr process; PipeWatcher::DataCallback gatherOutput; string gatheredOutput; boost::mutex gatheredOutputSyncher; ApplicationPool2_DirectSpawnerTest() { createServerInstanceDirAndGeneration(serverInstanceDir, generation); bg.start(); PipeWatcher::onData = PipeWatcher::DataCallback(); gatherOutput = boost::bind(&ApplicationPool2_DirectSpawnerTest::_gatherOutput, this, _1, _2); setLogLevel(LVL_ERROR); // TODO: change to LVL_WARN setPrintAppOutputAsDebuggingMessages(true); } ~ApplicationPool2_DirectSpawnerTest() { setLogLevel(DEFAULT_LOG_LEVEL); setPrintAppOutputAsDebuggingMessages(false); unlink("stub/wsgi/passenger_wsgi.pyc"); PipeWatcher::onData = PipeWatcher::DataCallback(); } boost::shared_ptr createSpawner(const Options &options) { return boost::make_shared(bg.safe, *resourceLocator, generation); } Options createOptions() { Options options; options.spawnMethod = "direct"; options.loadShellEnvvars = false; return options; } void _gatherOutput(const char *data, unsigned int size) { boost::lock_guard l(gatheredOutputSyncher); gatheredOutput.append(data, size); } }; DEFINE_TEST_GROUP_WITH_LIMIT(ApplicationPool2_DirectSpawnerTest, 90); #include "SpawnerTestCases.cpp" TEST_METHOD(80) { // If the application didn't start within the timeout // then whatever was written to stderr is used as the // SpawnException error page. Options options = createOptions(); options.appRoot = "stub"; options.startCommand = "perl\t" "-e\t" "print STDERR \"hello world\\n\"; sleep(60)"; options.startupFile = "."; options.startTimeout = 300; DirectSpawner spawner(bg.safe, *resourceLocator, generation); try { process = spawner.spawn(options); process->requiresShutdown = false; fail("Timeout expected"); } catch (const SpawnException &e) { ensure_equals(e.getErrorKind(), SpawnException::APP_STARTUP_TIMEOUT); ensure(e.getErrorPage().find("hello world\n") != string::npos); } } TEST_METHOD(81) { // If the application crashed during startup without returning // a proper error response, then its stderr output is used // as error response instead. Options options = createOptions(); options.appRoot = "stub"; options.startCommand = "perl\t" "-e\t" "print STDERR \"hello world\\n\""; options.startupFile = "."; DirectSpawner spawner(bg.safe, *resourceLocator, generation); try { process = spawner.spawn(options); process->requiresShutdown = false; fail("SpawnException expected"); } catch (const SpawnException &e) { ensure_equals(e.getErrorKind(), SpawnException::APP_STARTUP_ERROR); ensure(e.getErrorPage().find("hello world\n") != string::npos); } } TEST_METHOD(82) { SHOW_EXCEPTION_BACKTRACE( // Test that everything works correctly if the app re-execs() itself. // https://code.google.com/p/phusion-passenger/issues/detail?id=842#c19 Options options = createOptions(); options.appRoot = "stub/rack"; options.startCommand = "ruby\t" "start.rb\t" "--execself"; options.startupFile = "start.rb"; SpawnerPtr spawner = createSpawner(options); process = spawner->spawn(options); process->requiresShutdown = false; ensure_equals(process->sockets->size(), 1u); Connection conn = process->sockets->front().checkoutConnection(); ScopeGuard guard(boost::bind(checkin, process, &conn)); writeExact(conn.fd, "ping\n"); ensure_equals(readAll(conn.fd), "pong\n"); ); } } passenger-4.0.37/test/cxx/ApplicationPool2/OptionsTest.cpp000644 000765 000024 00000002552 12233035540 024157 0ustar00honglistaff000000 000000 #include #include using namespace Passenger; using namespace Passenger::ApplicationPool2; using namespace std; namespace tut { struct ApplicationPool2_OptionsTest { ApplicationPool2_OptionsTest() { } }; DEFINE_TEST_GROUP(ApplicationPool2_OptionsTest); TEST_METHOD(1) { // Test persist(). char appRoot[] = "appRoot"; char processTitle[] = "processTitle"; char fooKey[] = "PASSENGER_FOO"; char fooValue[] = "foo"; char barKey[] = "PASSENGER_BAR"; char barValue[] = "bar"; Options options; options.appRoot = appRoot; options.processTitle = processTitle; options.environmentVariables.push_back(make_pair(fooKey, fooValue)); options.environmentVariables.push_back(make_pair(barKey, barValue)); Options options2 = options.copyAndPersist(); appRoot[0] = processTitle[0] = 'x'; fooKey[0] = fooValue[0] = 'x'; barKey[0] = barValue[0] = 'x'; ensure_equals(options2.appRoot, "appRoot"); ensure_equals(options2.processTitle, "processTitle"); ensure_equals(options2.environmentVariables.size(), 2u); ensure_equals(options2.environmentVariables[0].first, "PASSENGER_FOO"); ensure_equals(options2.environmentVariables[0].second, "foo"); ensure_equals(options2.environmentVariables[1].first, "PASSENGER_BAR"); ensure_equals(options2.environmentVariables[1].second, "bar"); } } passenger-4.0.37/test/cxx/ApplicationPool2/PoolTest.cpp000644 000765 000024 00000166533 12233035540 023447 0ustar00honglistaff000000 000000 #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Passenger; using namespace Passenger::ApplicationPool2; namespace tut { struct ApplicationPool2_PoolTest { ServerInstanceDirPtr serverInstanceDir; ServerInstanceDir::GenerationPtr generation; BackgroundEventLoop bg; SpawnerConfigPtr spawnerConfig; SpawnerFactoryPtr spawnerFactory; PoolPtr pool; Pool::DebugSupportPtr debug; Ticket ticket; GetCallback callback; SessionPtr currentSession; ExceptionPtr currentException; AtomicInt number; boost::mutex syncher; list sessions; bool retainSessions; ApplicationPool2_PoolTest() { createServerInstanceDirAndGeneration(serverInstanceDir, generation); retainSessions = false; spawnerConfig = boost::make_shared(); spawnerFactory = boost::make_shared(bg.safe, *resourceLocator, generation, spawnerConfig); pool = boost::make_shared(spawnerFactory); pool->initialize(); bg.start(); callback = boost::bind(&ApplicationPool2_PoolTest::_callback, this, _1, _2); setLogLevel(LVL_ERROR); // TODO: change to LVL_WARN setPrintAppOutputAsDebuggingMessages(true); } ~ApplicationPool2_PoolTest() { // Explicitly destroy these here because they can run // additional code that depend on other fields in this // class. TRACE_POINT(); clearAllSessions(); UPDATE_TRACE_POINT(); pool->destroy(); UPDATE_TRACE_POINT(); pool.reset(); setLogLevel(DEFAULT_LOG_LEVEL); setPrintAppOutputAsDebuggingMessages(false); SystemTime::releaseAll(); } void initPoolDebugging() { pool->initDebugging(); debug = pool->debugSupport; } void clearAllSessions() { SessionPtr myCurrentSession; list mySessions; { LockGuard l(syncher); myCurrentSession = currentSession; mySessions = sessions; currentSession.reset(); sessions.clear(); } myCurrentSession.reset(); mySessions.clear(); } Options createOptions() { Options options; options.spawnMethod = "dummy"; options.appRoot = "stub/rack"; options.startCommand = "ruby\t" "start.rb"; options.startupFile = "start.rb"; options.loadShellEnvvars = false; options.user = testConfig["normal_user_1"].asCString(); options.defaultUser = testConfig["default_user"].asCString(); options.defaultGroup = testConfig["default_group"].asCString(); return options; } void _callback(const SessionPtr &session, const ExceptionPtr &e) { SessionPtr oldSession; { LockGuard l(syncher); oldSession = currentSession; currentSession = session; currentException = e; number++; if (retainSessions && session != NULL) { sessions.push_back(session); } } // destroy old session object outside the lock. } void sendHeaders(int connection, ...) { va_list ap; const char *arg; vector args; va_start(ap, connection); while ((arg = va_arg(ap, const char *)) != NULL) { args.push_back(StaticString(arg, strlen(arg) + 1)); } va_end(ap); shared_array args_array(new StaticString[args.size() + 1]); unsigned int totalSize = 0; for (unsigned int i = 0; i < args.size(); i++) { args_array[i + 1] = args[i]; totalSize += args[i].size(); } char sizeHeader[sizeof(uint32_t)]; Uint32Message::generate(sizeHeader, totalSize); args_array[0] = StaticString(sizeHeader, sizeof(uint32_t)); gatheredWrite(connection, args_array.get(), args.size() + 1, NULL); } string stripHeaders(const string &str) { string::size_type pos = str.find("\r\n\r\n"); if (pos == string::npos) { return str; } else { string result = str; result.erase(0, pos + 4); return result; } } string sendRequest(const Options &options, const char *path) { int oldNumber = number; pool->asyncGet(options, callback); EVENTUALLY(5, result = number == oldNumber + 1; ); if (currentException != NULL) { P_ERROR("get() exception: " << currentException->what()); abort(); } currentSession->initiate(); sendHeaders(currentSession->fd(), "PATH_INFO", path, "REQUEST_METHOD", "GET", NULL); shutdown(currentSession->fd(), SHUT_WR); string body = stripHeaders(readAll(currentSession->fd())); ProcessPtr process = currentSession->getProcess(); currentSession.reset(); EVENTUALLY(5, result = process->busyness() == 0; ); return body; } // Ensure that n processes exist. Options ensureMinProcesses(unsigned int n) { Options options = createOptions(); options.minProcesses = n; pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); EVENTUALLY(5, result = pool->getProcessCount() == n; ); currentSession.reset(); return options; } void disableProcess(ProcessPtr process, AtomicInt *result) { *result = (int) pool->disableProcess(process->gupid); } }; DEFINE_TEST_GROUP_WITH_LIMIT(ApplicationPool2_PoolTest, 100); TEST_METHOD(1) { // Test initial state. ensure(!pool->atFullCapacity()); } /*********** Test asyncGet() behavior on a single SuperGroup and Group ***********/ TEST_METHOD(2) { // asyncGet() actions on empty pools cannot be immediately satisfied. // Instead a new process will be spawned. In the mean time get() // actions are put on a wait list which will be processed as soon // as the new process is done spawning. Options options = createOptions(); ScopedLock l(pool->syncher); pool->asyncGet(options, callback, false); ensure_equals(number, 0); ensure(pool->getWaitlist.empty()); ensure(!pool->superGroups.empty()); l.unlock(); EVENTUALLY(5, result = pool->getProcessCount() == 1; ); ensure_equals(number, 1); ensure(currentSession != NULL); ensure(currentException == NULL); } TEST_METHOD(3) { // If one matching process already exists and it's not at full // capacity then asyncGet() will immediately use it. Options options = createOptions(); // Spawn a process and opens a session with it. pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); // Close the session so that the process is now idle. ProcessPtr process = currentSession->getProcess(); currentSession.reset(); ensure_equals(process->busyness(), 0); ensure(!process->isTotallyBusy()); // Verify test assertion. ScopedLock l(pool->syncher); pool->asyncGet(options, callback, false); ensure_equals("callback is immediately called", number, 2); } TEST_METHOD(4) { // If one matching process already exists but it's at full capacity, // and the limits prevent spawning of a new process, // then asyncGet() will put the get action on the group's wait // queue. When the process is no longer at full capacity it will // process the request. // Spawn a process and verify that it's at full capacity. // Keep its session open. Options options = createOptions(); options.appGroupName = "test"; pool->setMax(1); pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); SessionPtr session1 = currentSession; ProcessPtr process = session1->getProcess(); currentSession.reset(); ensure_equals(process->sessions, 1); ensure(process->isTotallyBusy()); // Now call asyncGet() again. pool->asyncGet(options, callback); ensure_equals("callback is not yet called", number, 1); ensure_equals("the get action has been put on the wait list", pool->superGroups.get("test")->defaultGroup->getWaitlist.size(), 1u); session1.reset(); ensure_equals("callback is called after the process becomes idle", number, 2); ensure_equals("the get wait list has been processed", pool->superGroups.get("test")->defaultGroup->getWaitlist.size(), 0u); ensure_equals(process->sessions, 1); } TEST_METHOD(5) { // If one matching process already exists but it's at full utilization, // and the limits and pool capacity allow spawning of a new process, // then get() will put the get action on the group's wait // queue while spawning a process in the background. // Either the existing process or the newly spawned process // will process the action, whichever becomes first available. // Here we test the case in which the existing process becomes // available first. initPoolDebugging(); // Spawn a regular process and keep its session open. Options options = createOptions(); debug->messages->send("Proceed with spawn loop iteration 1"); SessionPtr session1 = pool->get(options, &ticket); ProcessPtr process1 = session1->getProcess(); // Now spawn a process that never finishes. pool->asyncGet(options, callback); // Release the session on the first process. session1.reset(); EVENTUALLY(1, result = number == 1; ); ensure_equals("The first process handled the second asyncGet() request", currentSession->getProcess(), process1); debug->messages->send("Proceed with spawn loop iteration 2"); EVENTUALLY(5, result = number == 1; ); } TEST_METHOD(6) { // Here we test the case in which the new process becomes // available first. // Spawn a regular process. Options options = createOptions(); pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); SessionPtr session1 = currentSession; ProcessPtr process1 = currentSession->getProcess(); currentSession.reset(); // As long as we don't release process1 the following get // action will be processed by the newly spawned process. pool->asyncGet(options, callback); EVENTUALLY(5, result = pool->getProcessCount() == 2; ); ensure_equals(number, 2); ensure(currentSession->getProcess() != process1); } TEST_METHOD(7) { // If multiple matching processes exist, and one of them is idle, // then asyncGet() will use that. // Spawn 3 processes and keep a session open with 1 of them. Options options = createOptions(); options.minProcesses = 3; pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); EVENTUALLY(5, result = pool->getProcessCount() == 3; ); SessionPtr session1 = currentSession; ProcessPtr process1 = currentSession->getProcess(); currentSession.reset(); // Now open another session. It should complete immediately // and should not use the first process. ScopedLock l(pool->syncher); pool->asyncGet(options, callback, false); ensure_equals("asyncGet() completed immediately", number, 2); SessionPtr session2 = currentSession; ProcessPtr process2 = currentSession->getProcess(); l.unlock(); currentSession.reset(); ensure(process2 != process1); // Now open yet another session. It should also complete immediately // and should not use the first or the second process. l.lock(); pool->asyncGet(options, callback, false); ensure_equals("asyncGet() completed immediately", number, 3); SessionPtr session3 = currentSession; ProcessPtr process3 = currentSession->getProcess(); l.unlock(); currentSession.reset(); ensure(process3 != process1); ensure(process3 != process2); } TEST_METHOD(8) { // If multiple matching processes exist, then asyncGet() will use // the one with the smallest utilization number. // Spawn 2 processes, each with a concurrency of 2. Options options = createOptions(); options.minProcesses = 2; pool->setMax(2); GroupPtr group = pool->findOrCreateGroup(options); spawnerConfig->concurrency = 2; { LockGuard l(pool->syncher); group->spawn(); } EVENTUALLY(5, result = pool->getProcessCount() == 2; ); // asyncGet() selects some process. pool->asyncGet(options, callback); ensure_equals(number, 1); SessionPtr session1 = currentSession; ProcessPtr process1 = currentSession->getProcess(); currentSession.reset(); // The first process now has 1 session, so next asyncGet() should // select the other process. pool->asyncGet(options, callback); ensure_equals(number, 2); SessionPtr session2 = currentSession; ProcessPtr process2 = currentSession->getProcess(); currentSession.reset(); ensure("(1)", process1 != process2); // Both processes now have an equal number of sessions. Next asyncGet() // can select either. pool->asyncGet(options, callback); ensure_equals(number, 3); SessionPtr session3 = currentSession; ProcessPtr process3 = currentSession->getProcess(); currentSession.reset(); // One process now has the lowest number of sessions. Next // asyncGet() should select that one. pool->asyncGet(options, callback); ensure_equals(number, 4); SessionPtr session4 = currentSession; ProcessPtr process4 = currentSession->getProcess(); currentSession.reset(); ensure(process3 != process4); } TEST_METHOD(9) { // If multiple matching processes exist, and all of them are at full capacity, // and no more processes may be spawned, // then asyncGet() will put the action on the group's wait queue. // The process that first becomes not at full capacity will process the action. // Spawn 2 processes and open 4 sessions. Options options = createOptions(); options.appGroupName = "test"; options.minProcesses = 2; pool->setMax(2); spawnerConfig->concurrency = 2; vector sessions; int expectedNumber = 1; for (int i = 0; i < 4; i++) { pool->asyncGet(options, callback); EVENTUALLY(5, result = number == expectedNumber; ); expectedNumber++; sessions.push_back(currentSession); currentSession.reset(); } EVENTUALLY(5, result = pool->getProcessCount() == 2; ); SuperGroupPtr superGroup = pool->superGroups.get("test"); ensure_equals(superGroup->groups[0]->getWaitlist.size(), 0u); ensure(pool->atFullCapacity()); // Now try to open another session. pool->asyncGet(options, callback); ensure_equals("The get request has been put on the wait list", pool->superGroups.get("test")->groups[0]->getWaitlist.size(), 1u); // Close an existing session so that one process is no // longer at full utilization. sessions[0].reset(); ensure_equals("The get request has been removed from the wait list", pool->superGroups.get("test")->groups[0]->getWaitlist.size(), 0u); ensure(pool->atFullCapacity()); } TEST_METHOD(10) { // If multiple matching processes exist, and all of them are at full utilization, // and a new process may be spawned, // then asyncGet() will put the action on the group's wait queue and spawn the // new process. // The process that first becomes not at full utilization // or the newly spawned process // will process the action, whichever is earlier. // Here we test the case where an existing process is earlier. // Spawn 2 processes and open 4 sessions. Options options = createOptions(); options.minProcesses = 2; pool->setMax(3); GroupPtr group = pool->findOrCreateGroup(options); spawnerConfig->concurrency = 2; vector sessions; int expectedNumber = 1; for (int i = 0; i < 4; i++) { pool->asyncGet(options, callback); EVENTUALLY(5, result = number == expectedNumber; ); expectedNumber++; sessions.push_back(currentSession); currentSession.reset(); } EVENTUALLY(5, result = pool->getProcessCount() == 2; ); // The next asyncGet() should spawn a new process and the action should be queued. ScopedLock l(pool->syncher); spawnerConfig->spawnTime = 5000000; pool->asyncGet(options, callback, false); ensure(group->spawning()); ensure_equals(group->getWaitlist.size(), 1u); l.unlock(); // Close one of the sessions. Now it will process the action. ProcessPtr process = sessions[0]->getProcess(); sessions[0].reset(); ensure_equals(number, 5); ensure_equals(currentSession->getProcess(), process); ensure_equals(group->getWaitlist.size(), 0u); ensure_equals(pool->getProcessCount(), 2u); } TEST_METHOD(11) { // Here we test the case where the newly spawned process is earlier. // Spawn 2 processes and open 4 sessions. Options options = createOptions(); options.minProcesses = 2; pool->setMax(3); GroupPtr group = pool->findOrCreateGroup(options); spawnerConfig->concurrency = 2; vector sessions; int expectedNumber = 1; for (int i = 0; i < 4; i++) { pool->asyncGet(options, callback); EVENTUALLY(5, result = number == expectedNumber; ); expectedNumber++; sessions.push_back(currentSession); currentSession.reset(); } EVENTUALLY(5, result = pool->getProcessCount() == 2; ); // The next asyncGet() should spawn a new process. After it's done // spawning it will process the action. pool->asyncGet(options, callback); EVENTUALLY(5, result = pool->getProcessCount() == 3; ); EVENTUALLY(5, result = number == 5; ); ensure_equals(currentSession->getProcess()->pid, 3); ensure_equals(group->getWaitlist.size(), 0u); } TEST_METHOD(12) { // Test shutting down. ensureMinProcesses(2); ensure(pool->detachSuperGroupByName("stub/rack")); ensure_equals(pool->getSuperGroupCount(), 0u); } TEST_METHOD(13) { // Test shutting down while Group is restarting. initPoolDebugging(); debug->messages->send("Proceed with spawn loop iteration 1"); ensureMinProcesses(1); ensure(pool->restartGroupByName("stub/rack#default")); debug->debugger->recv("About to end restarting"); ensure(pool->detachSuperGroupByName("stub/rack")); ensure_equals(pool->getSuperGroupCount(), 0u); } TEST_METHOD(14) { // Test shutting down while Group is spawning. initPoolDebugging(); Options options = createOptions(); pool->asyncGet(options, callback); debug->debugger->recv("Begin spawn loop iteration 1"); ensure(pool->detachSuperGroupByName("stub/rack")); ensure_equals(pool->getSuperGroupCount(), 0u); } TEST_METHOD(15) { // Test shutting down while SuperGroup is initializing. initPoolDebugging(); debug->spawning = false; debug->superGroup = true; Options options = createOptions(); pool->asyncGet(options, callback); debug->debugger->recv("About to finish SuperGroup initialization"); ensure(pool->detachSuperGroupByName("stub/rack")); ensure_equals(pool->getSuperGroupCount(), 0u); } TEST_METHOD(16) { // Test shutting down while SuperGroup is restarting. initPoolDebugging(); debug->spawning = false; debug->superGroup = true; debug->messages->send("Proceed with initializing SuperGroup"); ensureMinProcesses(1); ensure_equals(pool->restartSuperGroupsByAppRoot("stub/rack"), 1u); debug->debugger->recv("About to finish SuperGroup restart"); ensure(pool->detachSuperGroupByName("stub/rack")); ensure_equals(pool->getSuperGroupCount(), 0u); } TEST_METHOD(17) { // Test that restartGroupByName() spawns more processes to ensure // that minProcesses and other constraints are met. ensureMinProcesses(1); ensure(pool->restartGroupByName("stub/rack#default")); EVENTUALLY(5, result = pool->getProcessCount() == 1; ); } TEST_METHOD(18) { // Test getting from an app for which minProcesses is set to 0, // and restart.txt already existed. TempDirCopy dir("stub/wsgi", "tmp.wsgi"); Options options = createOptions(); options.appRoot = "tmp.wsgi"; options.appType = "wsgi"; options.spawnMethod = "direct"; options.minProcesses = 0; initPoolDebugging(); debug->spawning = false; touchFile("tmp.wsgi/tmp/restart.txt", 1); pool->asyncGet(options, callback, false); debug->debugger->recv("About to end restarting"); debug->messages->send("Finish restarting"); EVENTUALLY(5, result = number == 1; ); ensure_equals(pool->getProcessCount(), 1u); } /*********** Test asyncGet() behavior on multiple SuperGroups, each with a single Group ***********/ TEST_METHOD(20) { // If the pool is full, and one tries to asyncGet() from a nonexistant group, // then it will kill the oldest idle process and spawn a new process. Options options = createOptions(); pool->setMax(2); // Get from /foo and close its session immediately. options.appRoot = "/foo"; pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); ProcessPtr process1 = currentSession->getProcess(); GroupPtr group1 = process1->getGroup(); SuperGroupPtr superGroup1 = group1->getSuperGroup(); currentSession.reset(); // Get from /bar and keep its session open. options.appRoot = "/bar"; pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 2; ); SessionPtr session2 = currentSession; currentSession.reset(); // Get from /baz. The process for /foo should be killed now. options.appRoot = "/baz"; pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 3; ); ensure_equals(pool->getProcessCount(), 2u); ensure_equals(superGroup1->getProcessCount(), 0u); } TEST_METHOD(21) { // If the pool is full, and one tries to asyncGet() from a nonexistant group, // and all existing processes are non-idle, then it will // kill the oldest process and spawn a new process. Options options = createOptions(); pool->setMax(2); // Get from /foo and close its session immediately. options.appRoot = "/foo"; pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); ProcessPtr process1 = currentSession->getProcess(); GroupPtr group1 = process1->getGroup(); SuperGroupPtr superGroup1 = group1->getSuperGroup(); // Get from /bar and keep its session open. options.appRoot = "/bar"; pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 2; ); SessionPtr session2 = currentSession; currentSession.reset(); // Get from /baz. The process for /foo should be killed now. options.appRoot = "/baz"; pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 3; ); ensure_equals(pool->getProcessCount(), 2u); ensure_equals(superGroup1->getProcessCount(), 0u); } TEST_METHOD(22) { // Suppose the pool is at full capacity, and one tries to asyncGet() from an // existant group that does not have any processes. It should kill a process // from another group, and the request should succeed. Options options = createOptions(); SessionPtr session; pid_t pid1, pid2; pool->setMax(1); // Create a group /foo. options.appRoot = "/foo"; SystemTime::force(1); session = pool->get(options, &ticket); pid1 = session->getPid(); session.reset(); // Create a group /bar. options.appRoot = "/bar"; SystemTime::force(2); session = pool->get(options, &ticket); pid2 = session->getPid(); session.reset(); // Sleep for a short while to give Pool a chance to shutdown // the first process. usleep(300000); ensure_equals("(1)", pool->getProcessCount(), 1u); // Get from /foo. options.appRoot = "/foo"; SystemTime::force(3); session = pool->get(options, &ticket); ensure("(2)", session->getPid() != pid1); ensure("(3)", session->getPid() != pid2); ensure_equals("(4)", pool->getProcessCount(), 1u); } TEST_METHOD(23) { // Suppose the pool is at full capacity, and one tries to asyncGet() from an // existant group that does not have any processes, and that happens to need // restarting. It should kill a process from another group and the request // should succeed. Options options1 = createOptions(); Options options2 = createOptions(); TempDirCopy dir("stub/wsgi", "tmp.wsgi"); SessionPtr session; pid_t pid1, pid2; pool->setMax(1); // Create a group tmp.wsgi. options1.appRoot = "tmp.wsgi"; options1.appType = "wsgi"; options1.spawnMethod = "direct"; SystemTime::force(1); session = pool->get(options1, &ticket); pid1 = session->getPid(); session.reset(); // Create a group bar. options2.appRoot = "bar"; SystemTime::force(2); session = pool->get(options2, &ticket); pid2 = session->getPid(); session.reset(); // Sleep for a short while to give Pool a chance to shutdown // the first process. usleep(300000); ensure_equals("(1)", pool->getProcessCount(), 1u); // Get from tmp.wsgi. SystemTime::force(3); touchFile("tmp.wsgi/tmp/restart.txt", 4); session = pool->get(options1, &ticket); ensure("(2)", session->getPid() != pid1); ensure("(3)", session->getPid() != pid2); ensure_equals("(4)", pool->getProcessCount(), 1u); } TEST_METHOD(24) { // Suppose the pool is at full capacity, with two groups: // - one that is spawning a process. // - one with no processes. // When one tries to asyncGet() from the second group, there should // be no process to kill, but when the first group is done spawning // it should throw away that process immediately to allow the second // group to spawn. Options options1 = createOptions(); Options options2 = createOptions(); initPoolDebugging(); debug->restarting = false; pool->setMax(1); // Create a group foo. options1.appRoot = "foo"; options1.noop = true; SystemTime::force(1); pool->get(options1, &ticket); // Create a group bar, but don't let it finish spawning. options2.appRoot = "bar"; options2.noop = true; SystemTime::force(2); GroupPtr barGroup = pool->get(options2, &ticket)->getGroup(); { LockGuard l(pool->syncher); ensure_equals("(1)", barGroup->spawn(), SR_OK); } debug->debugger->recv("Begin spawn loop iteration 1"); // Now get from foo again and let the request be queued. options1.noop = false; SystemTime::force(3); pool->asyncGet(options1, callback); // Nothing should happen while bar is spawning. SHOULD_NEVER_HAPPEN(100, result = number > 0; ); ensure_equals("(2)", pool->getProcessCount(), 0u); // Now let bar finish spawning. Eventually there should // only be one process: the one for foo. debug->messages->send("Proceed with spawn loop iteration 1"); debug->debugger->recv("Spawn loop done"); debug->messages->send("Proceed with spawn loop iteration 2"); debug->debugger->recv("Spawn loop done"); EVENTUALLY(5, LockGuard l(pool->syncher); vector processes = pool->getProcesses(false); if (processes.size() == 1) { GroupPtr group = processes[0]->getGroup(); result = group->name == "foo#default"; } else { result = false; } ); } TEST_METHOD(25) { // Suppose the pool is at full capacity, with two groups: // - one that is spawning a process, and has a queued request. // - one with no processes. // When one tries to asyncGet() from the second group, there should // be no process to kill, but when the first group is done spawning // it should throw away that process immediately to allow the second // group to spawn. Options options1 = createOptions(); Options options2 = createOptions(); initPoolDebugging(); debug->restarting = false; pool->setMax(1); // Create a group foo. options1.appRoot = "foo"; options1.noop = true; SystemTime::force(1); pool->get(options1, &ticket); // Create a group bar with a queued request, but don't let it finish spawning. options2.appRoot = "bar"; SystemTime::force(2); pool->asyncGet(options2, callback); debug->debugger->recv("Begin spawn loop iteration 1"); // Now get from foo again and let the request be queued. options1.noop = false; SystemTime::force(3); pool->asyncGet(options1, callback); // Nothing should happen while bar is spawning. SHOULD_NEVER_HAPPEN(100, result = number > 0; ); ensure_equals("(1)", pool->getProcessCount(), 0u); // Now let bar finish spawning. The request for bar should be served. debug->messages->send("Proceed with spawn loop iteration 1"); debug->debugger->recv("Spawn loop done"); EVENTUALLY(5, result = number == 1; ); ensure_equals(currentSession->getGroup()->name, "bar#default"); // When that request is done, the process for bar should be killed, // and a process for foo should be spawned. currentSession.reset(); debug->messages->send("Proceed with spawn loop iteration 2"); debug->debugger->recv("Spawn loop done"); EVENTUALLY(5, LockGuard l(pool->syncher); vector processes = pool->getProcesses(false); if (processes.size() == 1) { GroupPtr group = processes[0]->getGroup(); result = group->name == "foo#default"; } else { result = false; } ); EVENTUALLY(5, result = number == 2; ); } /*********** Test detachProcess() ***********/ TEST_METHOD(30) { // detachProcess() detaches the process from the group. The pool // will restore the minimum number of processes afterwards. Options options = createOptions(); options.appGroupName = "test"; options.minProcesses = 2; pool->asyncGet(options, callback); EVENTUALLY(5, result = pool->getProcessCount() == 2; ); EVENTUALLY(5, result = number == 1; ); ProcessPtr process = currentSession->getProcess(); pool->detachProcess(currentSession->getProcess()); { LockGuard l(pool->syncher); ensure(process->enabled == Process::DETACHED); } EVENTUALLY(5, result = pool->getProcessCount() == 2; ); currentSession.reset(); EVENTUALLY(5, result = process->isDead(); ); } TEST_METHOD(31) { // If the containing group had waiters on it, and detachProcess() // detaches the only process in the group, then a new process // is automatically spawned to handle the waiters. Options options = createOptions(); options.appGroupName = "test"; pool->setMax(1); spawnerConfig->spawnTime = 1000000; pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); SessionPtr session1 = currentSession; currentSession.reset(); pool->asyncGet(options, callback); { LockGuard l(pool->syncher); ensure_equals(pool->superGroups.get("test")->defaultGroup->getWaitlist.size(), 1u); } pool->detachProcess(session1->getProcess()); { LockGuard l(pool->syncher); ensure(pool->superGroups.get("test")->defaultGroup->spawning()); ensure_equals(pool->superGroups.get("test")->defaultGroup->enabledCount, 0); ensure_equals(pool->superGroups.get("test")->defaultGroup->getWaitlist.size(), 1u); } EVENTUALLY(5, result = number == 2; ); } TEST_METHOD(32) { // If the pool had waiters on it then detachProcess() will // automatically create the SuperGroups that were requested // by the waiters. Options options = createOptions(); options.appGroupName = "test"; options.minProcesses = 0; pool->setMax(1); spawnerConfig->spawnTime = 30000; // Begin spawning a process. pool->asyncGet(options, callback); ensure(pool->atFullCapacity()); // asyncGet() on another group should now put it on the waiting list. Options options2 = createOptions(); options2.appGroupName = "test2"; options2.minProcesses = 0; spawnerConfig->spawnTime = 90000; pool->asyncGet(options2, callback); { LockGuard l(pool->syncher); ensure_equals(pool->getWaitlist.size(), 1u); } // Eventually the dummy process for "test" is now done spawning. // We then detach it. EVENTUALLY(5, result = number == 1; ); SessionPtr session1 = currentSession; currentSession.reset(); pool->detachProcess(session1->getProcess()); { LockGuard l(pool->syncher); ensure(pool->superGroups.get("test2") != NULL); ensure_equals(pool->getWaitlist.size(), 0u); } EVENTUALLY(5, result = number == 2; ); } TEST_METHOD(33) { // A SuperGroup does not become garbage collectable // after detaching all its processes. Options options = createOptions(); pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); ProcessPtr process = currentSession->getProcess(); currentSession.reset(); SuperGroupPtr superGroup = process->getSuperGroup(); pool->detachProcess(process); LockGuard l(pool->syncher); ensure_equals(pool->superGroups.size(), 1u); ensure(superGroup->isAlive()); ensure(!superGroup->garbageCollectable()); } TEST_METHOD(34) { // When detaching a process, it waits until all sessions have // finished before telling the process to shut down. Options options = createOptions(); options.spawnMethod = "direct"; options.minProcesses = 0; SessionPtr session = pool->get(options, &ticket); ProcessPtr process = session->getProcess(); ensure(pool->detachProcess(process)); { LockGuard l(pool->syncher); ensure_equals(process->enabled, Process::DETACHED); } SHOULD_NEVER_HAPPEN(100, LockGuard l(pool->syncher); result = !process->isAlive() || !process->osProcessExists(); ); session.reset(); EVENTUALLY(1, LockGuard l(pool->syncher); result = process->enabled == Process::DETACHED && !process->osProcessExists() && process->isDead(); ); } TEST_METHOD(35) { // When detaching a process, it waits until the OS processes // have exited before cleaning up the in-memory data structures. Options options = createOptions(); options.spawnMethod = "direct"; options.minProcesses = 0; ProcessPtr process = pool->get(options, &ticket)->getProcess(); ScopeGuard g(boost::bind(::kill, process->pid, SIGCONT)); kill(process->pid, SIGSTOP); ensure(pool->detachProcess(process)); { LockGuard l(pool->syncher); ensure_equals(process->enabled, Process::DETACHED); } EVENTUALLY(1, result = process->getLifeStatus() == Process::SHUTDOWN_TRIGGERED; ); SHOULD_NEVER_HAPPEN(100, LockGuard l(pool->syncher); result = process->isDead() || !process->osProcessExists(); ); kill(process->pid, SIGCONT); g.clear(); EVENTUALLY(1, LockGuard l(pool->syncher); result = process->enabled == Process::DETACHED && !process->osProcessExists() && process->isDead(); ); } /*********** Test disabling and enabling processes ***********/ TEST_METHOD(40) { // Disabling a process under idle conditions should succeed immediately. ensureMinProcesses(2); vector processes = pool->getProcesses(); ensure_equals("Disabling succeeds", pool->disableProcess(processes[0]->gupid), DR_SUCCESS); LockGuard l(pool->syncher); ensure(processes[0]->isAlive()); ensure_equals("Process is disabled", processes[0]->enabled, Process::DISABLED); ensure("Other processes are not affected", processes[1]->isAlive()); ensure_equals("Other processes are not affected", processes[1]->enabled, Process::ENABLED); } TEST_METHOD(41) { // Disabling the sole process in a group, in case the pool settings allow // spawning another process, should trigger a new process spawn. ensureMinProcesses(1); Options options = createOptions(); SessionPtr session = pool->get(options, &ticket); ensure_equals(pool->getProcessCount(), 1u); ensure(!pool->isSpawning()); spawnerConfig->spawnTime = 60000; AtomicInt code = -1; TempThread thr(boost::bind(&ApplicationPool2_PoolTest::disableProcess, this, session->getProcess(), &code)); EVENTUALLY2(100, 1, result = pool->isSpawning(); ); EVENTUALLY(1, result = pool->getProcessCount() == 2u; ); ensure_equals((int) code, -1); session.reset(); EVENTUALLY(1, result = code == (int) DR_SUCCESS; ); } TEST_METHOD(42) { // Disabling the sole process in a group, in case pool settings don't allow // spawning another process, should fail. pool->setMax(1); ensureMinProcesses(1); vector processes = pool->getProcesses(); ensure_equals("(1)", processes.size(), 1u); DisableResult result = pool->disableProcess(processes[0]->gupid); ensure_equals("(2)", result, DR_ERROR); ensure_equals("(3)", pool->getProcessCount(), 1u); } TEST_METHOD(43) { // If there are no enabled processes in the group, then disabling should // succeed after the new process has been spawned. initPoolDebugging(); debug->messages->send("Proceed with spawn loop iteration 1"); debug->messages->send("Proceed with spawn loop iteration 2"); Options options = createOptions(); SessionPtr session1 = pool->get(options, &ticket); SessionPtr session2 = pool->get(options, &ticket); ensure_equals(pool->getProcessCount(), 2u); GroupPtr group = session1->getGroup(); AtomicInt code1 = -1, code2 = -1; TempThread thr(boost::bind(&ApplicationPool2_PoolTest::disableProcess, this, session1->getProcess(), &code1)); TempThread thr2(boost::bind(&ApplicationPool2_PoolTest::disableProcess, this, session2->getProcess(), &code2)); EVENTUALLY(2, LockGuard l(pool->syncher); result = group->enabledCount == 0 && group->disablingCount == 2 && group->disabledCount == 0; ); session1.reset(); session2.reset(); SHOULD_NEVER_HAPPEN(20, result = code1 != -1 || code2 != -1; ); debug->messages->send("Proceed with spawn loop iteration 3"); EVENTUALLY(5, result = code1 == DR_SUCCESS; ); EVENTUALLY(5, result = code2 == DR_SUCCESS; ); { LockGuard l(pool->syncher); ensure_equals(group->enabledCount, 1); ensure_equals(group->disablingCount, 0); ensure_equals(group->disabledCount, 2); } } TEST_METHOD(44) { // Suppose that a previous disable command triggered a new process spawn, // and the spawn fails. Then any disabling processes should become enabled // again, and the callbacks for the previous disable commands should be called. initPoolDebugging(); debug->messages->send("Proceed with spawn loop iteration 1"); debug->messages->send("Proceed with spawn loop iteration 2"); Options options = createOptions(); options.minProcesses = 2; SessionPtr session1 = pool->get(options, &ticket); SessionPtr session2 = pool->get(options, &ticket); ensure_equals(pool->getProcessCount(), 2u); AtomicInt code1 = -1, code2 = -1; TempThread thr(boost::bind(&ApplicationPool2_PoolTest::disableProcess, this, session1->getProcess(), &code1)); TempThread thr2(boost::bind(&ApplicationPool2_PoolTest::disableProcess, this, session2->getProcess(), &code2)); EVENTUALLY(2, GroupPtr group = session1->getGroup(); LockGuard l(pool->syncher); result = group->enabledCount == 0 && group->disablingCount == 2 && group->disabledCount == 0; ); SHOULD_NEVER_HAPPEN(20, result = code1 != -1 || code2 != -1; ); setLogLevel(-2); debug->messages->send("Fail spawn loop iteration 3"); EVENTUALLY(5, result = code1 == DR_ERROR; ); EVENTUALLY(5, result = code2 == DR_ERROR; ); { GroupPtr group = session1->getGroup(); LockGuard l(pool->syncher); ensure_equals(group->enabledCount, 2); ensure_equals(group->disablingCount, 0); ensure_equals(group->disabledCount, 0); } } // TODO: asyncGet() should not select a disabling process if there are enabled processes. // TODO: asyncGet() should not select a disabling process when non-rolling restarting. // TODO: asyncGet() should select a disabling process if there are no enabled processes // in the group. If this happens then asyncGet() will also spawn a new process. // TODO: asyncGet() should not select a disabled process. // TODO: If there are no enabled processes and all disabling processes are at full // utilization, and the process that was being spawned becomes available // earlier than any of the disabling processes, then the newly spawned process // should handle the request. // TODO: A disabling process becomes disabled as soon as it's done with // all its request. TEST_METHOD(50) { // Disabling a process that's already being disabled should result in the // callback being called after disabling is done. ensureMinProcesses(2); Options options = createOptions(); SessionPtr session = pool->get(options, &ticket); AtomicInt code = -1; TempThread thr(boost::bind(&ApplicationPool2_PoolTest::disableProcess, this, session->getProcess(), &code)); SHOULD_NEVER_HAPPEN(100, result = code != -1; ); session.reset(); EVENTUALLY(1, result = code != -1; ); ensure_equals(code, (int) DR_SUCCESS); } // TODO: Enabling a process that's disabled succeeds immediately. // TODO: Enabling a process that's disabling succeeds immediately. The disable // callbacks will be called with DR_CANCELED. TEST_METHOD(51) { // If the number of processes is already at maximum, then disabling // a process will cause that process to be disabled, without spawning // a new process. pool->setMax(2); ensureMinProcesses(2); vector processes = pool->getProcesses(); ensure_equals(processes.size(), 2u); DisableResult result = pool->disableProcess(processes[0]->gupid); ensure_equals(result, DR_SUCCESS); { ScopedLock l(pool->syncher); GroupPtr group = processes[0]->getGroup(); ensure_equals(group->enabledCount, 1); ensure_equals(group->disablingCount, 0); ensure_equals(group->disabledCount, 1); } } /*********** Other tests ***********/ TEST_METHOD(60) { // The pool is considered to be at full capacity if and only // if all SuperGroups are at full capacity. Options options = createOptions(); Options options2 = createOptions(); options2.appGroupName = "test"; pool->setMax(2); pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); pool->asyncGet(options2, callback); EVENTUALLY(5, result = number == 2; ); ensure_equals(pool->getProcessCount(), 2u); ensure(pool->atFullCapacity()); clearAllSessions(); pool->detachSuperGroupByName("test"); ensure(!pool->atFullCapacity()); } TEST_METHOD(61) { // If the pool is at full capacity, then increasing 'max' will cause // new processes to be spawned. Any queued get requests are processed // as those new processes become available or as existing processes // become available. Options options = createOptions(); retainSessions = true; pool->setMax(1); pool->asyncGet(options, callback); pool->asyncGet(options, callback); pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); pool->setMax(4); EVENTUALLY(5, result = number == 3; ); ensure_equals(pool->getProcessCount(), 3u); } TEST_METHOD(62) { // Each spawned process has a GUPID, which can be looked up // through findProcessByGupid(). Options options = createOptions(); pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); string gupid = currentSession->getProcess()->gupid; ensure(!gupid.empty()); ensure_equals(currentSession->getProcess(), pool->findProcessByGupid(gupid)); } TEST_METHOD(63) { // findProcessByGupid() returns a NULL pointer if there is // no matching process. ensure(pool->findProcessByGupid("none") == NULL); } TEST_METHOD(64) { // Test process idle cleaning. Options options = createOptions(); pool->setMaxIdleTime(50000); SessionPtr session1 = pool->get(options, &ticket); SessionPtr session2 = pool->get(options, &ticket); ensure_equals(pool->getProcessCount(), 2u); session2.reset(); // One of the processes still has a session open and should // not be idle cleaned. EVENTUALLY(2, result = pool->getProcessCount() == 1; ); SHOULD_NEVER_HAPPEN(150, result = pool->getProcessCount() == 0; ); // It shouldn't clean more processes than minInstances allows. sessions.clear(); SHOULD_NEVER_HAPPEN(150, result = pool->getProcessCount() == 0; ); } TEST_METHOD(65) { // Test spawner idle cleaning. Options options = createOptions(); options.appGroupName = "test1"; Options options2 = createOptions(); options2.appGroupName = "test2"; retainSessions = true; pool->setMaxIdleTime(50000); pool->asyncGet(options, callback); pool->asyncGet(options2, callback); EVENTUALLY(2, result = number == 2; ); ensure_equals(pool->getProcessCount(), 2u); EVENTUALLY(2, SpawnerPtr spawner = pool->getSuperGroup("test1")->defaultGroup->spawner; result = static_pointer_cast(spawner)->cleanCount >= 1; ); EVENTUALLY(2, SpawnerPtr spawner = pool->getSuperGroup("test2")->defaultGroup->spawner; result = static_pointer_cast(spawner)->cleanCount >= 1; ); } TEST_METHOD(66) { // It should restart the app if restart.txt is created or updated. TempDirCopy dir("stub/wsgi", "tmp.wsgi"); Options options = createOptions(); options.appRoot = "tmp.wsgi"; options.appType = "wsgi"; options.spawnMethod = "direct"; pool->setMax(1); // Send normal request. ensure_equals(sendRequest(options, "/"), "front page"); // Modify application; it shouldn't have effect yet. writeFile("tmp.wsgi/passenger_wsgi.py", "def application(env, start_response):\n" " start_response('200 OK', [('Content-Type', 'text/html')])\n" " return ['restarted']\n"); ensure_equals(sendRequest(options, "/"), "front page"); // Create restart.txt and send request again. The change should now be activated. touchFile("tmp.wsgi/tmp/restart.txt", 1); ensure_equals(sendRequest(options, "/"), "restarted"); // Modify application again; it shouldn't have effect yet. writeFile("tmp.wsgi/passenger_wsgi.py", "def application(env, start_response):\n" " start_response('200 OK', [('Content-Type', 'text/html')])\n" " return ['restarted 2']\n"); ensure_equals(sendRequest(options, "/"), "restarted"); // Touch restart.txt and send request again. The change should now be activated. touchFile("tmp.wsgi/tmp/restart.txt", 2); ensure_equals(sendRequest(options, "/"), "restarted 2"); } TEST_METHOD(67) { // Test spawn exceptions. TempDirCopy dir("stub/wsgi", "tmp.wsgi"); Options options = createOptions(); options.appRoot = "tmp.wsgi"; options.appType = "wsgi"; options.spawnMethod = "direct"; writeFile("tmp.wsgi/passenger_wsgi.py", "import sys\n" "sys.stderr.write('Something went wrong!')\n" "exit(1)\n"); setLogLevel(-2); pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); ensure(currentException != NULL); boost::shared_ptr e = dynamic_pointer_cast(currentException); ensure(e->getErrorPage().find("Something went wrong!") != string::npos); } TEST_METHOD(68) { // If a process fails to spawn, then it stops trying to spawn minProcesses processes. TempDirCopy dir("stub/wsgi", "tmp.wsgi"); Options options = createOptions(); options.appRoot = "tmp.wsgi"; options.appType = "wsgi"; options.spawnMethod = "direct"; options.minProcesses = 4; writeFile("tmp.wsgi/counter", "0"); chmod("tmp.wsgi/counter", 0666); // Our application starts successfully the first two times, // and fails all the other times. writeFile("tmp.wsgi/passenger_wsgi.py", "import sys\n" "def application(env, start_response):\n" " pass\n" "counter = int(open('counter', 'r').read())\n" "f = open('counter', 'w')\n" "f.write(str(counter + 1))\n" "f.close()\n" "if counter >= 2:\n" " sys.stderr.write('Something went wrong!')\n" " exit(1)\n"); setLogLevel(-2); pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); EVENTUALLY(5, result = pool->getProcessCount() == 2; ); EVENTUALLY(5, result = !pool->isSpawning(); ); SHOULD_NEVER_HAPPEN(500, result = pool->getProcessCount() > 2; ); } TEST_METHOD(69) { // It removes the process from the pool if session->initiate() fails. Options options = createOptions(); options.appRoot = "stub/wsgi"; options.appType = "wsgi"; options.spawnMethod = "direct"; pool->asyncGet(options, callback); EVENTUALLY(5, result = number == 1; ); pid_t pid = currentSession->getPid(); kill(pid, SIGTERM); // Wait until process is gone. EVENTUALLY(5, result = kill(pid, 0) == -1 && (errno == ESRCH || errno == EPERM || errno == ECHILD); ); try { currentSession->initiate(); fail("Initiate is supposed to fail"); } catch (const SystemException &e) { ensure_equals(e.code(), ECONNREFUSED); } ensure_equals(pool->getProcessCount(), 0u); } TEST_METHOD(70) { // When a process has become idle, and there are waiters on the pool, // consider detaching it in order to satisfy a waiter. Options options1 = createOptions(); Options options2 = createOptions(); options2.appRoot = "stub/wsgi"; retainSessions = true; pool->setMax(2); pool->asyncGet(options1, callback); pool->asyncGet(options1, callback); EVENTUALLY(3, result = pool->getProcessCount() == 2; ); pool->asyncGet(options2, callback); ensure_equals(pool->getWaitlist.size(), 1u); ensure_equals(number, 2); currentSession.reset(); sessions.pop_front(); EVENTUALLY(3, result = number == 3; ); ensure_equals(pool->getProcessCount(), 2u); SuperGroupPtr superGroup1 = pool->superGroups.get("stub/rack"); SuperGroupPtr superGroup2 = pool->superGroups.get("stub/rack"); ensure_equals(superGroup1->defaultGroup->enabledCount, 1); ensure_equals(superGroup2->defaultGroup->enabledCount, 1); } TEST_METHOD(71) { // A process is detached after processing maxRequests sessions. Options options = createOptions(); options.minProcesses = 0; options.maxRequests = 5; pool->setMax(1); SessionPtr session = pool->get(options, &ticket); ensure_equals(pool->getProcessCount(), 1u); pid_t origPid = session->getPid(); session.reset(); for (int i = 0; i < 3; i++) { pool->get(options, &ticket).reset(); ensure_equals(pool->getProcessCount(), 1u); ensure_equals(pool->getProcesses()[0]->pid, origPid); } pool->get(options, &ticket).reset(); EVENTUALLY(2, result = pool->getProcessCount() == 0; ); } TEST_METHOD(72) { // If we restart while spawning is in progress, and the restart // finishes before the process is done spawning, then that // process will not be attached and the original spawn loop will // abort. A new spawn loop will start to ensure that resource // constraints are met. TempDirCopy dir("stub/wsgi", "tmp.wsgi"); initPoolDebugging(); Options options = createOptions(); options.appRoot = "tmp.wsgi"; options.minProcesses = 3; // Trigger spawn loop and freeze it at the point where it's spawning // the second process. pool->asyncGet(options, callback); debug->debugger->recv("Begin spawn loop iteration 1"); debug->messages->send("Proceed with spawn loop iteration 1"); debug->debugger->recv("Begin spawn loop iteration 2"); ensure_equals("(1)", pool->getProcessCount(), 1u); // Trigger restart, wait until it's finished. touchFile("tmp.wsgi/tmp/restart.txt", 1); pool->asyncGet(options, callback); debug->messages->send("Finish restarting"); debug->debugger->recv("Restarting done"); ensure_equals("(2)", pool->getProcessCount(), 0u); // The restarter should have created a new spawn loop and // instructed the old one to stop. debug->debugger->recv("Begin spawn loop iteration 3"); // We let the old spawn loop continue, which should drop // the second process and abort. debug->messages->send("Proceed with spawn loop iteration 2"); debug->debugger->recv("Spawn loop done"); ensure_equals("(3)", pool->getProcessCount(), 0u); // We let the new spawn loop continue. debug->messages->send("Proceed with spawn loop iteration 3"); debug->messages->send("Proceed with spawn loop iteration 4"); debug->messages->send("Proceed with spawn loop iteration 5"); debug->debugger->recv("Spawn loop done"); ensure_equals("(4)", pool->getProcessCount(), 3u); } TEST_METHOD(73) { // If a get() request comes in while the restart is in progress, then // that get() request will be put into the get waiters list, which will // be processed after spawning is done. // Spawn 2 processes. TempDirCopy dir("stub/wsgi", "tmp.wsgi"); Options options = createOptions(); options.appRoot = "tmp.wsgi"; options.minProcesses = 2; pool->asyncGet(options, callback); EVENTUALLY(2, result = pool->getProcessCount() == 2; ); // Trigger a restart. The creation of the new spawner should take a while. spawnerConfig->spawnerCreationSleepTime = 20000; touchFile("tmp.wsgi/tmp/restart.txt"); pool->asyncGet(options, callback); GroupPtr group = pool->findOrCreateGroup(options); ensure_equals(pool->getProcessCount(), 0u); ensure_equals(group->getWaitlist.size(), 1u); // Now that the restart is in progress, perform a get(). pool->asyncGet(options, callback); ensure_equals(group->getWaitlist.size(), 2u); EVENTUALLY(2, result = number == 3; ); ensure_equals("The restart function respects minProcesses", pool->getProcessCount(), 2u); } TEST_METHOD(74) { // If a process fails to spawn, it sends a SpawnException result to all get waiters. TempDirCopy dir("stub/wsgi", "tmp.wsgi"); chmod("tmp.wsgi", 0777); Options options = createOptions(); options.appRoot = "tmp.wsgi"; options.appType = "wsgi"; options.spawnMethod = "direct"; pool->setMax(1); writeFile("tmp.wsgi/passenger_wsgi.py", "import os, time, sys\n" "\n" "def file_exists(filename):\n" " try:\n" " os.stat(filename)\n" " return True\n" " except OSError:\n" " return False\n" "\n" "f = open('spawned.txt', 'w')\n" "f.write(str(os.getpid()))\n" "f.close()\n" "while not file_exists('continue.txt'):\n" " time.sleep(0.05)\n" "sys.stderr.write('Something went wrong!')\n" "exit(1)\n"); retainSessions = true; setLogLevel(-2); pool->asyncGet(options, callback); pool->asyncGet(options, callback); pool->asyncGet(options, callback); pool->asyncGet(options, callback); EVENTUALLY(5, result = fileExists("tmp.wsgi/spawned.txt"); ); usleep(20000); writeFile("tmp.wsgi/passenger_wsgi.py", readAll("stub/wsgi/passenger_wsgi.py")); pid_t pid = (pid_t) stringToLL(readAll("tmp.wsgi/spawned.txt")); kill(pid, SIGTERM); EVENTUALLY(5, result = number == 4; ); ensure_equals(pool->getProcessCount(), 0u); ensure(sessions.empty()); } TEST_METHOD(75) { // If a process fails to spawn, the existing processes // are kept alive. TempDirCopy dir("stub/wsgi", "tmp.wsgi"); Options options = createOptions(); options.appRoot = "tmp.wsgi"; options.appType = "wsgi"; options.spawnMethod = "direct"; options.minProcesses = 2; // Spawn 2 processes. retainSessions = true; pool->asyncGet(options, callback); pool->asyncGet(options, callback); EVENTUALLY(10, result = number == 2; ); ensure_equals(pool->getProcessCount(), 2u); // Mess up the application and spawn a new one. writeFile("tmp.wsgi/passenger_wsgi.py", "import sys\n" "sys.stderr.write('Something went wrong!')\n" "exit(1)\n"); try { setLogLevel(-2); currentSession = pool->get(options, &ticket); fail("SpawnException expected"); } catch (const SpawnException &) { ensure_equals(pool->getProcessCount(), 2u); } } TEST_METHOD(76) { // No more than maxOutOfBandWorkInstances process will be performing // out-of-band work at the same time. TempDirCopy dir("stub/wsgi", "tmp.wsgi"); Options options = createOptions(); options.appRoot = "tmp.wsgi"; options.appType = "wsgi"; options.spawnMethod = "direct"; options.maxOutOfBandWorkInstances = 2; initPoolDebugging(); debug->restarting = false; debug->spawning = false; debug->oobw = true; // Spawn 3 processes and initiate 2 OOBW requests. SessionPtr session1 = pool->get(options, &ticket); SessionPtr session2 = pool->get(options, &ticket); SessionPtr session3 = pool->get(options, &ticket); session1->requestOOBW(); session1.reset(); session2->requestOOBW(); session2.reset(); // 2 OOBW requests eventually start. debug->debugger->recv("OOBW request about to start"); debug->debugger->recv("OOBW request about to start"); // Request another OOBW, but this one is not initiated. session3->requestOOBW(); session3.reset(); SHOULD_NEVER_HAPPEN(100, result = debug->debugger->peek("OOBW request about to start") != NULL; ); // Let one OOBW request finish. The third one should eventually // start. debug->messages->send("Proceed with OOBW request"); debug->debugger->recv("OOBW request about to start"); debug->messages->send("Proceed with OOBW request"); debug->messages->send("Proceed with OOBW request"); debug->debugger->recv("OOBW request finished"); debug->debugger->recv("OOBW request finished"); debug->debugger->recv("OOBW request finished"); } TEST_METHOD(77) { // If the getWaitlist already has maxRequestQueueSize items, // then an exception is returned. Options options = createOptions(); options.appGroupName = "test1"; options.maxRequestQueueSize = 3; GroupPtr group = pool->findOrCreateGroup(options); spawnerConfig->concurrency = 3; initPoolDebugging(); pool->setMax(1); for (int i = 0; i < 3; i++) { pool->asyncGet(options, callback); } ensure_equals(number, 0); { LockGuard l(pool->syncher); ensure_equals(group->getWaitlist.size(), 3u); } try { pool->get(options, &ticket); fail("Expected RequestQueueFullException"); } catch (const RequestQueueFullException &e) { // OK } debug->messages->send("Proceed with spawn loop iteration 1"); debug->messages->send("Spawn loop done"); EVENTUALLY(5, result = number == 3; ); } TEST_METHOD(78) { // Test restarting while a previous restart was already being finalized. // The previous finalization should abort. Options options = createOptions(); initPoolDebugging(); debug->spawning = false; pool->get(options, &ticket); ensure_equals(pool->restartSuperGroupsByAppRoot(options.appRoot), 1u); debug->debugger->recv("About to end restarting"); ensure_equals(pool->restartSuperGroupsByAppRoot(options.appRoot), 1u); debug->debugger->recv("About to end restarting"); debug->messages->send("Finish restarting"); debug->messages->send("Finish restarting"); debug->debugger->recv("Restarting done"); debug->debugger->recv("Restarting aborted"); } TEST_METHOD(79) { // Test sticky sessions. // Spawn 2 processes and get their sticky session IDs and PIDs. ensureMinProcesses(2); Options options = createOptions(); SessionPtr session1 = pool->get(options, &ticket); SessionPtr session2 = pool->get(options, &ticket); int id1 = session1->getStickySessionId(); int id2 = session2->getStickySessionId(); pid_t pid1 = session1->getPid(); pid_t pid2 = session2->getPid(); session1.reset(); session2.reset(); // Make two requests with id1 as sticky session ID. They should // both go to process pid1. options.stickySessionId = id1; session1 = pool->get(options, &ticket); ensure_equals("Request 1.1 goes to process 1", session1->getPid(), pid1); // The second request should be queued, and should not finish until // the first request is finished. ensure_equals(number, 1); pool->asyncGet(options, callback); SHOULD_NEVER_HAPPEN(100, result = number > 1; ); session1.reset(); EVENTUALLY(1, result = number == 2; ); ensure_equals("Request 1.2 goes to process 1", currentSession->getPid(), pid1); currentSession.reset(); // Make two requests with id2 as sticky session ID. They should // both go to process pid2. options.stickySessionId = id2; session1 = pool->get(options, &ticket); ensure_equals("Request 2.1 goes to process 2", session1->getPid(), pid2); // The second request should be queued, and should not finish until // the first request is finished. pool->asyncGet(options, callback); SHOULD_NEVER_HAPPEN(100, result = number > 2; ); session1.reset(); EVENTUALLY(1, result = number == 3; ); ensure_equals("Request 2.2 goes to process 2", currentSession->getPid(), pid2); currentSession.reset(); } // TODO: Persistent connections. // TODO: If one closes the session before it has reached EOF, and process's maximum concurrency // has already been reached, then the pool should ping the process so that it can detect // when the session's connection has been released by the app. /*********** Test previously discovered bugs ***********/ TEST_METHOD(85) { // Test detaching, then restarting. This should not violate any invariants. TempDirCopy dir("stub/wsgi", "tmp.wsgi"); Options options = createOptions(); options.appRoot = "tmp.wsgi"; options.appType = "wsgi"; options.spawnMethod = "direct"; SessionPtr session = pool->get(options, &ticket); string gupid = session->getProcess()->gupid; session.reset(); pool->detachProcess(gupid); touchFile("tmp.wsgi/tmp/restart.txt", 1); pool->get(options, &ticket).reset(); } /*****************************/ } passenger-4.0.37/test/cxx/ApplicationPool2/ProcessTest.cpp000644 000765 000024 00000010736 12233035540 024145 0ustar00honglistaff000000 000000 #include #include #include using namespace Passenger; using namespace Passenger::ApplicationPool2; using namespace std; namespace tut { struct ApplicationPool2_ProcessTest { BackgroundEventLoop bg; SocketListPtr sockets; SocketPair adminSocket; Pipe errorPipe; FileDescriptor server1, server2, server3; ApplicationPool2_ProcessTest() { bg.start(); struct sockaddr_in addr; socklen_t len = sizeof(addr); sockets = boost::make_shared(); server1 = createTcpServer("127.0.0.1", 0); getsockname(server1, (struct sockaddr *) &addr, &len); sockets->add("main1", "tcp://127.0.0.1:" + toString(addr.sin_port), "session", 3); server2 = createTcpServer("127.0.0.1", 0); getsockname(server2, (struct sockaddr *) &addr, &len); sockets->add("main2", "tcp://127.0.0.1:" + toString(addr.sin_port), "session", 3); server3 = createTcpServer("127.0.0.1", 0); getsockname(server3, (struct sockaddr *) &addr, &len); sockets->add("main3", "tcp://127.0.0.1:" + toString(addr.sin_port), "session", 3); adminSocket = createUnixSocketPair(); errorPipe = createPipe(); } }; DEFINE_TEST_GROUP(ApplicationPool2_ProcessTest); TEST_METHOD(1) { // Test initial state. ProcessPtr process = boost::make_shared(bg.safe, 123, "", "", adminSocket[0], errorPipe[0], sockets, 0, 0); process->dummy = true; process->requiresShutdown = false; ensure_equals(process->busyness(), 0); ensure(!process->isTotallyBusy()); } TEST_METHOD(2) { // Test opening and closing sessions. ProcessPtr process = boost::make_shared(bg.safe, 123, "", "", adminSocket[0], errorPipe[0], sockets, 0, 0); process->dummy = true; process->requiresShutdown = false; SessionPtr session = process->newSession(); SessionPtr session2 = process->newSession(); ensure_equals(process->sessions, 2); process->sessionClosed(session.get()); ensure_equals(process->sessions, 1); process->sessionClosed(session2.get()); ensure_equals(process->sessions, 0); } TEST_METHOD(3) { // newSession() checks out the socket with the smallest busyness number // and sessionClosed() restores the session busyness statistics. ProcessPtr process = boost::make_shared(bg.safe, 123, "", "", adminSocket[0], errorPipe[0], sockets, 0, 0); process->dummy = true; process->requiresShutdown = false; // The first 3 newSession() commands check out an idle socket. SessionPtr session1 = process->newSession(); SessionPtr session2 = process->newSession(); SessionPtr session3 = process->newSession(); ensure(session1->getSocket()->name != session2->getSocket()->name); ensure(session1->getSocket()->name != session3->getSocket()->name); ensure(session2->getSocket()->name != session3->getSocket()->name); // The next 2 newSession() commands check out sockets with sessions == 1. SessionPtr session4 = process->newSession(); SessionPtr session5 = process->newSession(); ensure(session4->getSocket()->name != session5->getSocket()->name); // There should now be 1 process with 1 session // and 2 processes with 2 sessions. map sessionCount; SocketList::const_iterator it; for (it = process->sockets->begin(); it != process->sockets->end(); it++) { sessionCount[it->sessions]++; } ensure_equals(sessionCount.size(), 2u); ensure_equals(sessionCount[1], 1); ensure_equals(sessionCount[2], 2); // Closing the first 3 sessions will result in no processes having 1 session // and 1 process having 2 sessions. process->sessionClosed(session1.get()); process->sessionClosed(session2.get()); process->sessionClosed(session3.get()); sessionCount.clear(); for (it = process->sockets->begin(); it != process->sockets->end(); it++) { sessionCount[it->sessions]++; } ensure_equals(sessionCount[0], 1); ensure_equals(sessionCount[1], 2); } TEST_METHOD(4) { // If all sockets are at their full capacity then newSession() will fail. ProcessPtr process = boost::make_shared(bg.safe, 123, "", "", adminSocket[0], errorPipe[0], sockets, 0, 0); process->dummy = true; process->requiresShutdown = false; vector sessions; for (int i = 0; i < 9; i++) { ensure(!process->isTotallyBusy()); SessionPtr session = process->newSession(); ensure(session != NULL); sessions.push_back(session); } ensure(process->isTotallyBusy()); ensure(process->newSession() == NULL); } } passenger-4.0.37/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp000644 000765 000024 00000016210 12233035540 025146 0ustar00honglistaff000000 000000 #include #include #include #include #include #include #include #include using namespace std; using namespace Passenger; using namespace Passenger::ApplicationPool2; namespace tut { struct ApplicationPool2_SmartSpawnerTest { ServerInstanceDirPtr serverInstanceDir; ServerInstanceDir::GenerationPtr generation; BackgroundEventLoop bg; ProcessPtr process; PipeWatcher::DataCallback gatherOutput; string gatheredOutput; boost::mutex gatheredOutputSyncher; ApplicationPool2_SmartSpawnerTest() { createServerInstanceDirAndGeneration(serverInstanceDir, generation); bg.start(); PipeWatcher::onData = PipeWatcher::DataCallback(); gatherOutput = boost::bind(&ApplicationPool2_SmartSpawnerTest::_gatherOutput, this, _1, _2); setLogLevel(LVL_ERROR); // TODO: should be LVL_WARN setPrintAppOutputAsDebuggingMessages(true); } ~ApplicationPool2_SmartSpawnerTest() { setLogLevel(DEFAULT_LOG_LEVEL); setPrintAppOutputAsDebuggingMessages(false); unlink("stub/wsgi/passenger_wsgi.pyc"); PipeWatcher::onData = PipeWatcher::DataCallback(); } boost::shared_ptr createSpawner(const Options &options, bool exitImmediately = false) { char buf[PATH_MAX + 1]; getcwd(buf, PATH_MAX); vector command; command.push_back("ruby"); command.push_back(string(buf) + "/support/placebo-preloader.rb"); if (exitImmediately) { command.push_back("exit-immediately"); } return boost::make_shared(bg.safe, *resourceLocator, generation, command, options); } Options createOptions() { Options options; options.spawnMethod = "smart"; options.loadShellEnvvars = false; return options; } void _gatherOutput(const char *data, unsigned int size) { boost::lock_guard l(gatheredOutputSyncher); gatheredOutput.append(data, size); } }; DEFINE_TEST_GROUP_WITH_LIMIT(ApplicationPool2_SmartSpawnerTest, 90); #include "SpawnerTestCases.cpp" TEST_METHOD(80) { // If the preloader has crashed then SmartSpawner will // restart it and try again. Options options = createOptions(); options.appRoot = "stub/rack"; options.startCommand = "ruby\t" "start.rb"; options.startupFile = "start.rb"; boost::shared_ptr spawner = createSpawner(options); process = spawner->spawn(options); process->requiresShutdown = false; kill(spawner->getPreloaderPid(), SIGTERM); // Give it some time to exit. usleep(300000); // No exception at next spawn. setLogLevel(-1); process = spawner->spawn(options); process->requiresShutdown = false; } TEST_METHOD(81) { // If the preloader still crashes after the restart then // SmartSpawner will throw an exception. Options options = createOptions(); options.appRoot = "stub/rack"; options.startCommand = "ruby\t" "start.rb"; options.startupFile = "start.rb"; setLogLevel(-1); boost::shared_ptr spawner = createSpawner(options, true); try { process = spawner->spawn(options); process->requiresShutdown = false; fail("SpawnException expected"); } catch (const SpawnException &) { // Pass. } } TEST_METHOD(82) { // If the preloader didn't start within the timeout // then it's killed and an exception is thrown, with // whatever stderr output as error page. Options options = createOptions(); options.appRoot = "stub/rack"; options.startCommand = "ruby\t" "start.rb"; options.startupFile = "start.rb"; options.startTimeout = 300; vector preloaderCommand; preloaderCommand.push_back("bash"); preloaderCommand.push_back("-c"); preloaderCommand.push_back("echo hello world >&2; sleep 60"); SmartSpawner spawner(bg.safe, *resourceLocator, generation, preloaderCommand, options); try { process = spawner.spawn(options); process->requiresShutdown = false; fail("SpawnException expected"); } catch (const SpawnException &e) { ensure_equals(e.getErrorKind(), SpawnException::PRELOADER_STARTUP_TIMEOUT); ensure(e.getErrorPage().find("hello world\n") != string::npos); } } TEST_METHOD(83) { // If the preloader crashed during startup without returning // a proper error response, then its stderr output is used // as error response instead. Options options = createOptions(); options.appRoot = "stub/rack"; options.startCommand = "ruby\t" "start.rb"; options.startupFile = "start.rb"; vector preloaderCommand; preloaderCommand.push_back("bash"); preloaderCommand.push_back("-c"); preloaderCommand.push_back("echo hello world >&2"); SmartSpawner spawner(bg.safe, *resourceLocator, generation, preloaderCommand, options); try { process = spawner.spawn(options); process->requiresShutdown = false; fail("SpawnException expected"); } catch (const SpawnException &e) { ensure_equals(e.getErrorKind(), SpawnException::PRELOADER_STARTUP_ERROR); ensure(e.getErrorPage().find("hello world\n") != string::npos); } } TEST_METHOD(84) { // If the preloader encountered an error, then the resulting SpawnException // takes note of the process's environment variables. Options options = createOptions(); options.appRoot = "stub/rack"; options.startCommand = "ruby\t" "start.rb"; options.startupFile = "start.rb"; options.environmentVariables.push_back(make_pair("PASSENGER_FOO", "foo")); vector preloaderCommand; preloaderCommand.push_back("bash"); preloaderCommand.push_back("-c"); preloaderCommand.push_back("echo hello world >&2"); SmartSpawner spawner(bg.safe, *resourceLocator, generation, preloaderCommand, options); try { process = spawner.spawn(options); process->requiresShutdown = false; fail("SpawnException expected"); } catch (const SpawnException &e) { ensure(containsSubstring(e["envvars"], "PASSENGER_FOO=foo\n")); } } TEST_METHOD(85) { // Test that the spawned process can still write to its stderr // after the SmartSpawner has been destroyed. DeleteFileEventually d("tmp.output"); PipeWatcher::onData = gatherOutput; Options options = createOptions(); options.appRoot = "stub/rack"; { vector preloaderCommand; preloaderCommand.push_back("ruby"); preloaderCommand.push_back(resourceLocator->getHelperScriptsDir() + "/rack-preloader.rb"); SmartSpawner spawner(bg.safe, *resourceLocator, generation, preloaderCommand, options); process = spawner.spawn(options); process->requiresShutdown = false; } SessionPtr session = process->newSession(); session->initiate(); const char header[] = "REQUEST_METHOD\0GET\0" "PATH_INFO\0/print_stderr\0"; string data(header, sizeof(header) - 1); data.append("PASSENGER_CONNECT_PASSWORD"); data.append(1, '\0'); data.append(process->connectPassword); data.append(1, '\0'); writeScalarMessage(session->fd(), data); shutdown(session->fd(), SHUT_WR); readAll(session->fd()); EVENTUALLY(2, boost::lock_guard l(gatheredOutputSyncher); result = gatheredOutput.find("hello world!\n") != string::npos; ); } } passenger-4.0.37/test/cxx/ApplicationPool2/SpawnerTestCases.cpp000644 000765 000024 00000063347 12233035540 025133 0ustar00honglistaff000000 000000 // Included in DirectSpawnerTest.cpp and SmartSpawnerTest.cpp. #define SETUP_USER_SWITCHING_TEST(code) \ if (geteuid() != 0) { \ return; \ } \ TempDirCopy copy("stub/wsgi", "tmp.wsgi"); \ addUserSwitchingCode(); \ \ DeleteFileEventually info1("/tmp/info.txt"); \ DeleteFileEventually info2("/tmp/info2.txt"); \ \ SpawnerPtr spawner; \ Options options; \ options = createOptions(); \ options.appRoot = "tmp.wsgi"; \ options.appType = "wsgi"; \ options.defaultUser = testConfig["default_user"].asCString(); \ options.defaultGroup = testConfig["default_group"].asCString(); \ code \ spawner = createSpawner(options) #define RUN_USER_SWITCHING_TEST() \ process = spawner->spawn(options); \ process->requiresShutdown = false; \ BufferedIO io(FileDescriptor(open("/tmp/info.txt", O_RDONLY))); \ uid_t uid = (uid_t) atol(io.readLine().c_str()); \ gid_t gid = (gid_t) atol(io.readLine().c_str()); \ string groups = strip(io.readLine()); \ /* Avoid compiler warning. */ \ (void) uid; (void) gid; (void) groups typedef boost::shared_ptr SpawnerPtr; static void addUserSwitchingCode() { FILE *f = fopen("tmp.wsgi/passenger_wsgi.py", "a"); fputs( "\n" "import os\n" "f = open('/tmp/info.txt', 'w')\n" "f.write(str(os.getuid()) + '\\n')\n" "f.write(str(os.getgid()) + '\\n')\n" "f.write(os.popen('groups').read() + '\\n')\n" "f.close()\n", f); fclose(f); rename("tmp.wsgi/passenger_wsgi.py", "tmp.wsgi/passenger_wsgi.py.real"); symlink("passenger_wsgi.py.real", "tmp.wsgi/passenger_wsgi.py"); } static void checkin(ProcessPtr process, Connection *conn) { process->sockets->front().checkinConnection(*conn); } static string userNameForUid(uid_t uid) { return getpwuid(uid)->pw_name; } static string groupNameForGid(gid_t gid) { return getgrgid(gid)->gr_name; } static uid_t uidFor(const string &userName) { return getpwnam(userName.c_str())->pw_uid; } static gid_t gidFor(const string &groupName) { return getgrnam(groupName.c_str())->gr_gid; } static string primaryGroupFor(const string &userName) { gid_t gid = getpwnam(userName.c_str())->pw_gid; return getgrgid(gid)->gr_name; } TEST_METHOD(1) { // Basic spawning test. Options options = createOptions(); options.appRoot = "stub/rack"; options.startCommand = "ruby\t" "start.rb"; options.startupFile = "start.rb"; SpawnerPtr spawner = createSpawner(options); process = spawner->spawn(options); process->requiresShutdown = false; ensure_equals(process->sockets->size(), 1u); Connection conn = process->sockets->front().checkoutConnection(); ScopeGuard guard(boost::bind(checkin, process, &conn)); writeExact(conn.fd, "ping\n"); ensure_equals(readAll(conn.fd), "pong\n"); } TEST_METHOD(2) { // It enforces the given start timeout. Options options = createOptions(); options.appRoot = "stub"; options.startCommand = "sleep\t" "60"; options.startupFile = "."; options.startTimeout = 300; SpawnerPtr spawner = createSpawner(options); try { process = spawner->spawn(options); process->requiresShutdown = false; fail("Timeout expected"); } catch (const SpawnException &e) { ensure_equals(e.getErrorKind(), SpawnException::APP_STARTUP_TIMEOUT); } } TEST_METHOD(3) { // Any protocol errors during startup are caught and result // in exceptions. Options options = createOptions(); options.appRoot = "stub"; options.startCommand = "echo\t" "!> hello world"; options.startupFile = "."; SpawnerPtr spawner = createSpawner(options); try { process = spawner->spawn(options); process->requiresShutdown = false; fail("Exception expected"); } catch (const SpawnException &e) { ensure_equals(e.getErrorKind(), SpawnException::APP_STARTUP_PROTOCOL_ERROR); } } TEST_METHOD(4) { // The application may respond with a special Error response, // which will result in a SpawnException with the content. Options options = createOptions(); options.appRoot = "stub"; options.startCommand = "perl\t" "start_error.pl"; options.startupFile = "start_error.pl"; SpawnerPtr spawner = createSpawner(options); try { process = spawner->spawn(options); process->requiresShutdown = false; fail("SpawnException expected"); } catch (const SpawnException &e) { ensure_equals(e.getErrorKind(), SpawnException::APP_STARTUP_EXPLAINABLE_ERROR); ensure_equals(e.getErrorPage(), "He's dead, Jim!\n" "Relax, I'm a doctor.\n"); } } TEST_METHOD(5) { // The start timeout is enforced even while reading the error // response. Options options = createOptions(); options.appRoot = "stub"; options.startCommand = "perl\t" "start_error.pl\t" "freeze"; options.startupFile = "start_error.pl"; options.startTimeout = 300; SpawnerPtr spawner = createSpawner(options); try { process = spawner->spawn(options); process->requiresShutdown = false; fail("Timeout expected"); } catch (const SpawnException &e) { ensure_equals(e.getErrorKind(), SpawnException::APP_STARTUP_TIMEOUT); } } TEST_METHOD(6) { // The reported PID is correct. Options options = createOptions(); options.appRoot = "stub/rack"; options.startCommand = "ruby\t" "start.rb"; options.startupFile = "start.rb"; SpawnerPtr spawner = createSpawner(options); process = spawner->spawn(options); process->requiresShutdown = false; ensure_equals(process->sockets->size(), 1u); Connection conn = process->sockets->front().checkoutConnection(); ScopeGuard guard(boost::bind(checkin, process, &conn)); writeExact(conn.fd, "pid\n"); ensure_equals(readAll(conn.fd), toString(process->pid) + "\n"); } TEST_METHOD(7) { // Custom environment variables can be passed. Options options = createOptions(); options.appRoot = "stub/rack"; options.startCommand = "ruby\t" "start.rb"; options.startupFile = "start.rb"; options.environmentVariables.push_back(make_pair("PASSENGER_FOO", "foo")); options.environmentVariables.push_back(make_pair("PASSENGER_BAR", "bar")); SpawnerPtr spawner = createSpawner(options); process = spawner->spawn(options); process->requiresShutdown = false; ensure_equals(process->sockets->size(), 1u); Connection conn = process->sockets->front().checkoutConnection(); ScopeGuard guard(boost::bind(checkin, process, &conn)); writeExact(conn.fd, "envvars\n"); string envvars = readAll(conn.fd); ensure("(1)", envvars.find("PASSENGER_FOO = foo\n") != string::npos); ensure("(2)", envvars.find("PASSENGER_BAR = bar\n") != string::npos); } TEST_METHOD(8) { // Any raised SpawnExceptions take note of the process's environment variables. Options options = createOptions(); options.appRoot = "stub"; options.startCommand = "echo\t" "!> hello world"; options.startupFile = "."; options.environmentVariables.push_back(make_pair("PASSENGER_FOO", "foo")); SpawnerPtr spawner = createSpawner(options); try { process = spawner->spawn(options); process->requiresShutdown = false; fail("Exception expected"); } catch (const SpawnException &e) { ensure(containsSubstring(e["envvars"], "PASSENGER_FOO=foo\n")); } } TEST_METHOD(9) { // It raises an exception if the user does not have a access to one // of the app root's parent directories, or the app root itself. runShellCommand("mkdir -p tmp.check/a/b/c"); TempDirCopy dir("stub/rack", "tmp.check/a/b/c/d"); TempDir dir2("tmp.check"); char buffer[PATH_MAX]; string cwd = getcwd(buffer, sizeof(buffer)); Options options = createOptions(); options.appRoot = "tmp.check/a/b/c/d"; options.appType = "rack"; SpawnerPtr spawner = createSpawner(options); if (getuid() != 0) { // TODO: implement this test for root too runShellCommand("chmod 000 tmp.check/a/b/c/d"); runShellCommand("chmod 600 tmp.check/a/b/c"); runShellCommand("chmod 600 tmp.check/a"); try { process = spawner->spawn(options); process->requiresShutdown = false; fail("SpawnException expected"); } catch (const SpawnException &e) { ensure("(1)", containsSubstring(e.getErrorPage(), "the parent directory '" + cwd + "/tmp.check/a' has wrong permissions")); } runShellCommand("chmod 700 tmp.check/a"); try { process = spawner->spawn(options); process->requiresShutdown = false; fail("SpawnException expected"); } catch (const SpawnException &e) { ensure("(2)", containsSubstring(e.getErrorPage(), "the parent directory '" + cwd + "/tmp.check/a/b/c' has wrong permissions")); } runShellCommand("chmod 700 tmp.check/a/b/c"); try { process = spawner->spawn(options); process->requiresShutdown = false; fail("SpawnException expected"); } catch (const SpawnException &e) { ensure("(3)", containsSubstring(e.getErrorPage(), "However this directory is not accessible because it has wrong permissions.")); } runShellCommand("chmod 700 tmp.check/a/b/c/d"); process = spawner->spawn(options); // Should not throw. process->requiresShutdown = false; } } TEST_METHOD(10) { // It forwards all stdout and stderr output, even after the corresponding // Process object has been destroyed. DeleteFileEventually d("tmp.output"); PipeWatcher::onData = gatherOutput; Options options = createOptions(); options.appRoot = "stub/rack"; options.appType = "rack"; SpawnerPtr spawner = createSpawner(options); process = spawner->spawn(options); process->requiresShutdown = false; SessionPtr session = process->newSession(); session->initiate(); setLogLevel(LVL_ERROR); // TODO: should be LVL_WARN const char header[] = "REQUEST_METHOD\0GET\0" "PATH_INFO\0/print_stdout_and_stderr\0"; string data(header, sizeof(header) - 1); data.append("PASSENGER_CONNECT_PASSWORD"); data.append(1, '\0'); data.append(process->connectPassword); data.append(1, '\0'); writeScalarMessage(session->fd(), data); shutdown(session->fd(), SHUT_WR); readAll(session->fd()); session->close(true); session.reset(); process.reset(); EVENTUALLY(2, boost::lock_guard l(gatheredOutputSyncher); result = gatheredOutput.find("hello stdout!\n") != string::npos && gatheredOutput.find("hello stderr!\n") != string::npos; ); } // It raises an exception if getStartupCommand() is empty. /******* User switching tests *******/ // If 'user' is set // and 'user' is 'root' TEST_METHOD(20) { // It changes the user to the value of 'defaultUser'. SETUP_USER_SWITCHING_TEST( options.user = "root"; ); RUN_USER_SWITCHING_TEST(); ensure_equals(userNameForUid(uid), testConfig["default_user"]); } TEST_METHOD(21) { // If 'group' is given, it changes group to the given group name. SETUP_USER_SWITCHING_TEST( options.user = "root"; options.group = testConfig["normal_group_1"].asCString(); ); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString()); } TEST_METHOD(22) { // If 'group' is set to the root group, it changes group to defaultGroup. string rootGroup = groupNameForGid(0); SETUP_USER_SWITCHING_TEST( options.user = "root"; options.group = rootGroup.c_str(); ); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["default_group"].asString()); } // and 'group' is set to '!STARTUP_FILE!'" TEST_METHOD(23) { // It changes the group to the startup file's group. SETUP_USER_SWITCHING_TEST( options.user = "root"; options.group = "!STARTUP_FILE!"; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) -1, gidFor(testConfig["normal_group_1"].asString())); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString()); } TEST_METHOD(24) { // If the startup file is a symlink, then it uses the symlink's group, not the target's group SETUP_USER_SWITCHING_TEST( options.user = "root"; options.group = "!STARTUP_FILE!"; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) -1, gidFor(testConfig["normal_group_2"].asString())); chown("tmp.wsgi/passenger_wsgi.py.real", (uid_t) -1, gidFor(testConfig["normal_group_1"].asString())); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_2"].asString()); } TEST_METHOD(25) { // If 'group' is not given, it changes the group to defaultUser's primary group. SETUP_USER_SWITCHING_TEST( options.user = "root"; ); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), primaryGroupFor(testConfig["default_user"].asString())); } // and 'user' is not 'root' TEST_METHOD(29) { // It changes the user to the given username. SETUP_USER_SWITCHING_TEST( options.user = testConfig["normal_user_1"].asCString(); ); RUN_USER_SWITCHING_TEST(); ensure_equals(userNameForUid(uid), testConfig["normal_user_1"].asString()); } TEST_METHOD(30) { // If 'group' is given, it changes group to the given group name. // It changes the user to the given username. SETUP_USER_SWITCHING_TEST( options.user = testConfig["normal_user_1"].asCString(); options.group = testConfig["normal_group_1"].asCString(); ); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString()); } TEST_METHOD(31) { // If 'group' is set to the root group, it changes group to defaultGroup. // It changes the user to the given username. string rootGroup = groupNameForGid(0); SETUP_USER_SWITCHING_TEST( options.user = testConfig["normal_user_1"].asCString(); options.group = rootGroup.c_str(); ); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["default_group"].asString()); } // and 'group' is set to '!STARTUP_FILE!' TEST_METHOD(32) { // It changes the group to the startup file's group. SETUP_USER_SWITCHING_TEST( options.user = testConfig["normal_user_1"].asCString(); options.group = "!STARTUP_FILE!"; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) -1, gidFor(testConfig["normal_group_1"].asString())); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString()); } TEST_METHOD(33) { // If the startup file is a symlink, then it uses the // symlink's group, not the target's group. SETUP_USER_SWITCHING_TEST( options.user = testConfig["normal_user_1"].asCString(); options.group = "!STARTUP_FILE!"; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) -1, gidFor(testConfig["normal_group_2"].asString())); chown("tmp.wsgi/passenger_wsgi.py.real", (uid_t) -1, gidFor(testConfig["normal_group_1"].asString())); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_2"].asString()); } TEST_METHOD(34) { // If 'group' is not given, it changes the group to the user's primary group. SETUP_USER_SWITCHING_TEST( options.user = testConfig["normal_user_1"].asCString(); ); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), primaryGroupFor(testConfig["normal_user_1"].asString())); } // and the given username does not exist TEST_METHOD(38) { // It changes the user to the value of defaultUser. SETUP_USER_SWITCHING_TEST( options.user = testConfig["nonexistant_user"].asCString(); ); RUN_USER_SWITCHING_TEST(); ensure_equals(userNameForUid(uid), testConfig["default_user"].asString()); } TEST_METHOD(39) { // If 'group' is given, it changes group to the given group name. SETUP_USER_SWITCHING_TEST( options.user = testConfig["nonexistant_user"].asCString(); options.group = testConfig["normal_group_1"].asCString(); ); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString()); } TEST_METHOD(40) { // If 'group' is set to the root group, it changes group to defaultGroup. string rootGroup = groupNameForGid(0); SETUP_USER_SWITCHING_TEST( options.user = testConfig["nonexistant_user"].asCString(); options.group = rootGroup; ); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["default_group"].asString()); } // and 'group' is set to '!STARTUP_FILE!' TEST_METHOD(41) { // It changes the group to the startup file's group. SETUP_USER_SWITCHING_TEST( options.user = testConfig["nonexistant_user"].asCString(); options.group = "!STARTUP_FILE!"; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) -1, gidFor(testConfig["normal_group_1"].asString())); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString()); } TEST_METHOD(42) { // If the startup file is a symlink, then it uses the // symlink's group, not the target's group. SETUP_USER_SWITCHING_TEST( options.user = testConfig["nonexistant_user"].asCString(); options.group = "!STARTUP_FILE!"; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) -1, gidFor(testConfig["normal_group_2"].asString())); chown("tmp.wsgi/passenger_wsgi.py.real", (uid_t) -1, gidFor(testConfig["normal_group_1"].asString())); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_2"].asString()); } TEST_METHOD(43) { // If 'group' is not given, it changes the group to defaultUser's primary group. SETUP_USER_SWITCHING_TEST( options.user = testConfig["nonexistant_user"].asCString(); ); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), primaryGroupFor(testConfig["default_user"].asString())); } // If 'user' is not set // and the startup file's owner exists TEST_METHOD(47) { // It changes the user to the owner of the startup file. SETUP_USER_SWITCHING_TEST( (void) 0; ); lchown("tmp.wsgi/passenger_wsgi.py", uidFor(testConfig["normal_user_1"].asString()), (gid_t) -1); RUN_USER_SWITCHING_TEST(); ensure_equals(userNameForUid(uid), testConfig["normal_user_1"].asString()); } TEST_METHOD(48) { // If the startup file is a symlink, then it uses the symlink's owner, not the target's owner. SETUP_USER_SWITCHING_TEST( (void) 0; ); lchown("tmp.wsgi/passenger_wsgi.py", uidFor(testConfig["normal_user_2"].asString()), (gid_t) -1); chown("tmp.wsgi/passenger_wsgi.py.real", uidFor(testConfig["normal_user_1"].asString()), (gid_t) -1); RUN_USER_SWITCHING_TEST(); ensure_equals(userNameForUid(uid), testConfig["normal_user_2"].asString()); } TEST_METHOD(49) { // If 'group' is given, it changes group to the given group name. SETUP_USER_SWITCHING_TEST( options.group = testConfig["normal_group_1"].asCString(); ); lchown("tmp.wsgi/passenger_wsgi.py", uidFor(testConfig["normal_user_1"].asString()), (gid_t) -1); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString()); } TEST_METHOD(50) { // If 'group' is set to the root group, it changes group to defaultGroup. string rootGroup = groupNameForGid(0); SETUP_USER_SWITCHING_TEST( options.group = rootGroup; ); lchown("tmp.wsgi/passenger_wsgi.py", uidFor(testConfig["normal_user_1"].asString()), (gid_t) -1); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["default_group"].asString()); } // and 'group' is set to '!STARTUP_FILE!' TEST_METHOD(51) { // It changes the group to the startup file's group. SETUP_USER_SWITCHING_TEST( options.group = "!STARTUP_FILE!"; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) -1, gidFor(testConfig["normal_group_1"].asString())); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString()); } TEST_METHOD(52) { // If the startup file is a symlink, then it uses the symlink's // group, not the target's group. SETUP_USER_SWITCHING_TEST( options.group = "!STARTUP_FILE!"; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) -1, gidFor(testConfig["normal_group_2"].asString())); chown("tmp.wsgi/passenger_wsgi.py.real", (uid_t) -1, gidFor(testConfig["normal_group_1"].asString())); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_2"].asString()); } TEST_METHOD(53) { // If 'group' is not given, it changes the group to the startup file's owner's primary group. SETUP_USER_SWITCHING_TEST( (void) 0; ); lchown("tmp.wsgi/passenger_wsgi.py", uidFor(testConfig["normal_user_1"].asString()), (gid_t) -1); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), primaryGroupFor(testConfig["normal_user_1"].asString())); } // and the startup file's owner doesn't exist TEST_METHOD(57) { // It changes the user to the value of defaultUser. SETUP_USER_SWITCHING_TEST( (void) 0; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) testConfig["nonexistant_uid"].asInt64(), (gid_t) -1); RUN_USER_SWITCHING_TEST(); ensure_equals(userNameForUid(uid), testConfig["default_user"].asString()); } TEST_METHOD(58) { // If 'group' is given, it changes group to the given group name. SETUP_USER_SWITCHING_TEST( options.group = testConfig["normal_group_1"].asCString(); ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) testConfig["nonexistant_uid"].asInt64(), (gid_t) -1); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString()); } TEST_METHOD(59) { // If 'group' is set to the root group, it changes group to defaultGroup. string rootGroup = groupNameForGid(0); SETUP_USER_SWITCHING_TEST( options.group = rootGroup; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) testConfig["nonexistant_uid"].asInt64(), (gid_t) -1); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["default_group"].asString()); } // and 'group' is set to '!STARTUP_FILE!' // and the startup file's group doesn't exist TEST_METHOD(60) { // It changes the group to the value given by defaultGroup. SETUP_USER_SWITCHING_TEST( options.group = "!STARTUP_FILE!"; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) testConfig["nonexistant_uid"].asInt64(), (gid_t) testConfig["nonexistant_gid"].asInt64()); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["default_group"].asString()); } // and the startup file's group exists TEST_METHOD(61) { // It changes the group to the startup file's group. SETUP_USER_SWITCHING_TEST( options.group = "!STARTUP_FILE!"; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) testConfig["nonexistant_uid"].asInt64(), gidFor(testConfig["normal_group_1"].asString())); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_1"].asString()); } TEST_METHOD(62) { // If the startup file is a symlink, then it uses the symlink's group, not the target's group. SETUP_USER_SWITCHING_TEST( options.group = "!STARTUP_FILE!"; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) testConfig["nonexistant_uid"].asInt64(), gidFor(testConfig["normal_group_2"].asString())); chown("tmp.wsgi/passenger_wsgi.py.real", (uid_t) -1, gidFor(testConfig["normal_group_1"].asString())); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), testConfig["normal_group_2"].asString()); } TEST_METHOD(63) { // If 'group' is not given, it changes the group to defaultUser's primary group. SETUP_USER_SWITCHING_TEST( (void) 0; ); lchown("tmp.wsgi/passenger_wsgi.py", (uid_t) testConfig["nonexistant_uid"].asInt64(), (gid_t) -1); RUN_USER_SWITCHING_TEST(); ensure_equals(groupNameForGid(gid), primaryGroupFor(testConfig["default_user"].asString())); } TEST_METHOD(67) { // It raises an error if it tries to lower to 'defaultUser', // but that user doesn't exist. SETUP_USER_SWITCHING_TEST( options.user = "root"; options.defaultUser = testConfig["nonexistant_user"].asCString(); ); try { RUN_USER_SWITCHING_TEST(); fail(); } catch (const RuntimeException &e) { ensure(containsSubstring(e.what(), "Cannot determine a user to lower privilege to")); } } TEST_METHOD(68) { // It raises an error if it tries to lower to 'default_group', // but that group doesn't exist. SETUP_USER_SWITCHING_TEST( options.user = testConfig["normal_user_1"].asCString(); options.group = groupNameForGid(0); options.defaultGroup = testConfig["nonexistant_group"].asCString(); ); try { RUN_USER_SWITCHING_TEST(); fail(); } catch (const RuntimeException &e) { ensure(containsSubstring(e.what(), "Cannot determine a group to lower privilege to")); } } TEST_METHOD(69) { // Changes supplementary groups to the owner's default supplementary groups. SETUP_USER_SWITCHING_TEST( options.user = testConfig["normal_user_1"].asCString(); ); RUN_USER_SWITCHING_TEST(); runShellCommand(("groups " + testConfig["normal_user_1"].asString() + " > /tmp/info2.txt").c_str()); string defaultGroups = strip(readAll("/tmp/info2.txt")); // On Linux, the 'groups' output is prepended by the group name so // get rid of that. string::size_type pos = defaultGroups.find(':'); if (pos != string::npos) { pos++; while (pos < defaultGroups.size() && defaultGroups[pos] == ' ') { pos++; } defaultGroups.erase(0, pos); } ensure_equals(groups, defaultGroups); } passenger-4.0.37/rpm/apache-passenger.conf.in000644 000765 000024 00000001753 12233035540 021502 0ustar00honglistaff000000 000000 ### Begin automatically installed Phusion Passenger load snippet ### LoadModule passenger_module modules/mod_passenger.so ### End automatically installed Phusion Passenger load snippet ### ### Begin automatically installed Phusion Passenger config snippet ### PassengerRoot @PASSENGERROOT@ PassengerRuby /usr/bin/ruby ### End automatically installed Phusion Passenger config snippet ### # Deploying a web application: an example # Suppose you have a web application in /somewhere. Add a virtual host to # your Apache configuration file and set its DocumentRoot to /somewhere/public: # # # ServerName www.yourhost.com # # Be sure to point to 'public'! # DocumentRoot /somewhere/public # # # Relax Apache security settings # AllowOverride all # # <-- MultiViews must be turned off # Options -MultiViews # # passenger-4.0.37/rpm/config.json000644 000765 000024 00000002137 12233035540 017155 0ustar00honglistaff000000 000000 { //// This file contains system-specific configuration options that the test suite needs. //// Please customize it for your system. // These are the usernames and group names of normal, non-administrator // users and groups. Preferably, these are user and group accounts that // are normally not used. // // These users and groups MUST be able to access this 'test' directory, // otherwise the tests will fail. ///// Good values for Linux and FreeBSD. Same restrictions apply. "normal_user_1": "games", "normal_user_2": "daemon", "default_user": "man", "normal_group_1": "daemon", "normal_group_2": "man", "default_group": "games", // A nonexistant username, group name, user ID and group ID. "nonexistant_user": "xxxxxxxxxxxxxxxxxxx", "nonexistant_group": "xxxxxxxxxxxxxxxxxxx", "nonexistant_uid": 9999, "nonexistant_gid": 9999, // If you want to run the Nginx integration tests, then set the following // config option to the full path of the Nginx binary. This Nginx binary *must* // be compiled with Phusion Passenger support! "nginx": "/usr/local/sbin/nginx" } passenger-4.0.37/rpm/get_distro_id.py000755 000765 000024 00000000176 12233035540 020212 0ustar00honglistaff000000 000000 #!/usr/bin/env python vars = { 'config_opts': {} } execfile("/etc/mock/default.cfg", vars) print(vars['config_opts']['dist']) passenger-4.0.37/rpm/passenger.logrotate000644 000765 000024 00000000165 12233035540 020725 0ustar00honglistaff000000 000000 /var/log/passenger-analytics/*.log { missingok notifempty sharedscripts compress delaycompress } passenger-4.0.37/rpm/passenger.spec.template000644 000765 000024 00000037666 12233035540 021511 0ustar00honglistaff000000 000000 %global package_name <%= RPM_NAME %> %global namespace <%= GLOBAL_NAMESPACE_DIRNAME %> %global nginx_version <%= PREFERRED_NGINX_VERSION %> %global bundled_boost_version 1.54.0 %if 0%{?fc18} %global rubyabi 1.9.1 %endif %if 0%{?el6} %global rubyabi 1.8 %endif %if 0%{?fedora} >= 19 %global gem_extdir %{gem_extdir_mri} %endif %{!?gem_extdir: %global gem_extdir %{gem_instdir}/extdir} %{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn 2>/dev/null || echo missing-httpd-devel)}} %{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} # /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 %{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} %{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}} %global ruby_dir_version %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["ruby_version"]') %global ruby_arch_name %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["arch"]') %{!?ruby_sitelibdir: %global ruby_sitelibdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitelibdir"]')} %{!?ruby_sitearchdir: %global ruby_sitearchdir %(ruby -rrbconfig -e 'puts RbConfig::CONFIG["sitearchdir"]')} %global passenger_ruby_libdir %{ruby_sitelibdir} %global locations_ini %{passenger_ruby_libdir}/phusion_passenger/locations.ini Summary: Phusion Passenger application server Name: %{package_name} Version: 4.0.33 Release: 1%{?dist} Group: System Environment/Daemons # Passenger code uses MIT license. # Bundled(Boost) uses Boost Software License # BCrypt and Blowfish files use BSD license. # Documentation is CC-BY-SA # See: https://bugzilla.redhat.com/show_bug.cgi?id=470696#c146 License: Boost and BSD and BSD with advertising and MIT and zlib URL: https://www.phusionpassenger.com BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Source: http://s3.amazonaws.com/phusion-passenger/releases/passenger-%{version}.tar.gz Source1: http://nginx.org/download/nginx-%{nginx_version}.tar.gz Source10: passenger.logrotate Source11: apache-passenger.conf.in Source12: config.json # Include sys/types.h for GCC 4.7 Patch2: rubygem-passenger-4.0.18-gcc47-include-sys_types.patch # Make example config for tests ready for linux by default Patch4: passenger_tests_default_config_example.patch # Test tries to spawn 1000 threads with 256kb stacks. Default Linux settings # deny allocating so much, causing test to fail. Let's use 8kb stacks instead. Patch102: passenger_dynamic_thread_group.patch # https://bugzilla.redhat.com/show_bug.cgi?id=985634 Patch107: rubygem-passenger-4.0.18-GLIBC_HAVE_LONG_LONG.patch Requires: rubygems # XXX: Needed to run passenger standalone Requires: rubygem(daemon_controller) >= 1.1.0 Requires: rubygem(rack) Requires: rubygem(rake) %if 0%{?fedora} >= 19 Requires: ruby(release) %else Requires: ruby(abi) = %{rubyabi} %endif %if 0%{?rhel} >= 6 || 0%{?fedora} >= 15 BuildRequires: libcurl-devel %else BuildRequires: curl-devel %endif %if 0%{?rhel} < 6 && 0%{?fedora} <= 16 Requires: rubygem(fastthread) >= 1.0.1 BuildRequires: rubygem(fastthread) >= 1.0.1 %endif BuildRequires: httpd-devel BuildRequires: libev-devel >= 4.0.0 BuildRequires: ruby BuildRequires: ruby-devel BuildRequires: rubygems BuildRequires: rubygems-devel BuildRequires: rubygem(rake) >= 0.8.1 BuildRequires: rubygem(rack) BuildRequires: zlib-devel BuildRequires: pcre-devel BuildRequires: openssl-devel Provides: %{package_name} = %{version}-%{release} Provides: bundled(boost) = %{bundled_boost_version} Obsoletes: rubygem(passenger) < 4.0.33 Obsoletes: rubygem-passenger < 4.0.33 Obsoletes: rubygem-passenger%{_isa} < 4.0.33 Obsoletes: rubygem-passenger-native < 4.0.33 Obsoletes: rubygem-passenger-native%{?_isa} < 4.0.33 %description Phusion PassengerÂź is a web server and application server, designed to be fast, robust and lightweight. It takes a lot of complexity out of deploying web apps, adds powerful enterprise-grade features that are useful in production, and makes administration much easier and less complex. It supports Ruby, Python, Node.js and Meteor. %package -n mod_passenger Summary: Apache Module for Phusion Passenger Group: System Environment/Daemons BuildRequires: httpd-devel Requires: httpd-mmn = %{_httpd_mmn} Requires: %{package_name} = %{version}-%{release} License: Boost and BSD and BSD with advertising and MIT and zlib %description -n mod_passenger This package contains the pluggable Apache server module for Phusion PassengerÂź. %package devel Summary: Phusion Passenger development files Group: System Environment/Daemons Requires: %{package_name}%{?_isa} = %{version}-%{release} Provides: bundled(boost-devel) = %{bundled_boost_version} Obsoletes: rubygem-passenger-devel < 4.0.33 Obsoletes: rubygem-passenger-devel%{?_isa} < 4.0.33 License: Boost and BSD and BSD with advertising and GPL+ and MIT and zlib %description devel This package contains development files for Phusion PassengerÂź. Installing this package allows it to compile native extensions for non-standard Ruby interpreters, and allows Passenger Standalone to use a different Nginx core version. %package doc Summary: Phusion Passenger documentation Group: System Environment/Daemons Requires: %{package_name} = %{version}-%{release} Obsoletes: rubygem-passenger-doc < 4.0.33 BuildArch: noarch License: CC-BY-SA and MIT and (MIT or GPL+) %description doc This package contains documentation files for Phusion PassengerÂź. %package native-libs Summary: Phusion Passenger native extensions Group: System Environment/Daemons Requires: %{package_name}%{?_isa} = %{version}-%{release} Requires: ruby Obsoletes: rubygem-passenger-native-libs < 4.0.33 Obsoletes: rubygem-passenger-native-libs%{?_isa} < 4.0.33 License: Boost and BSD and BSD with advertising and MIT and zlib %description native-libs This package contains Phusion PassengerÂź native extensions for Ruby. It has been separated so that installing a new Ruby interpreter only necessitates rebuilding this package. %prep %setup -q -n %{package_name}-%{version} tar xzf %{SOURCE1} %patch2 -p1 -b .include-sys-types %patch4 -p1 -b .lindefault %patch102 -p1 -b .threadtest # fix passenger boost for glibc >= 2.18 %if 0%{?fedora} >= 20 %patch107 -p1 -b .glibc-long %endif # Don't use bundled libev %{__rm} -rf ext/libev %build export EXTRA_CFLAGS="${CFLAGS:-%optflags} -Wno-deprecated" export EXTRA_CXXFLAGS="${CXXFLAGS:-%optflags} -Wno-deprecated" # Reduce optimization level. Passenger has not been tested with -O2. export EXTRA_CFLAGS=`echo "$EXTRA_CFLAGS" | sed 's|-O2|-O|g'` export EXTRA_CXXFLAGS=`echo "$EXTRA_CXXFLAGS" | sed 's|-O2|-O|g'` export USE_VENDORED_LIBEV=false # Speed up ccache (reduce I/O) by lightly compressing things. # Always set these variables because pbuilder uses ccache transparently. export CCACHE_COMPRESS=1 export CCACHE_COMPRESS_LEVEL=3 # Build Passenger. rake fakeroot \ NATIVE_PACKAGING_METHOD=rpm \ FS_PREFIX=%{_prefix} \ FS_BINDIR=%{_bindir} \ FS_SBINDIR=%{_sbindir} \ FS_DATADIR=%{_datadir} \ FS_DOCDIR=%{_docdir} \ FS_LIBDIR=%{_libdir} \ RUBYLIBDIR=%{ruby_sitelibdir} \ RUBYARCHDIR=%{ruby_sitearchdir} \ APACHE2_MODULE_PATH=%{_httpd_moddir}/mod_passenger.so # Build Nginx core for Passenger Standalone. nginx_config_opts=`ruby -Ilib -rphusion_passenger -e 'PhusionPassenger.locate_directories; PhusionPassenger.require_passenger_lib "constants"; puts PhusionPassenger::STANDALONE_NGINX_CONFIGURE_OPTIONS'` pushd nginx-%{nginx_version} ./configure --prefix=/tmp $nginx_config_opts --add-module=`pwd`/../ext/nginx make popd %install %{__rm} -rf %{buildroot} %{__mkdir} %{buildroot} %{__cp} -a pkg/fakeroot/* %{buildroot}/ %{__cp} nginx-%{nginx_version}/objs/nginx %{buildroot}%{_libdir}/%{namespace}/PassengerWebHelper # Install bootstrapping code into the executables and the Nginx config script. ./dev/install_scripts_bootstrap_code.rb --ruby %{passenger_ruby_libdir} %{buildroot}%{_bindir}/* %{buildroot}%{_sbindir}/* ./dev/install_scripts_bootstrap_code.rb --nginx-module-config %{_bindir} %{buildroot}%{_datadir}/%{namespace}/ngx_http_passenger_module/config # Install Apache config. %{__mkdir_p} %{buildroot}%{_httpd_confdir} %{buildroot}%{_httpd_modconfdir} %{__sed} -e 's|@PASSENGERROOT@|%{passenger_ruby_libdir}/phusion_passenger/locations.ini|g' %{SOURCE11} > passenger.conf %if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" %{__sed} -n /^LoadModule/p passenger.conf > 10-passenger.conf %{__sed} -i /^LoadModule/d passenger.conf touch -r %{SOURCE11} 10-passenger.conf install -pm 0644 10-passenger.conf %{buildroot}%{_httpd_modconfdir}/passenger.conf %endif touch -r %{SOURCE11} passenger.conf install -pm 0644 passenger.conf %{buildroot}%{_httpd_confdir}/passenger.conf # Install man pages into the proper location. %{__mkdir_p} %{buildroot}%{_mandir}/man1 %{__mkdir_p} %{buildroot}%{_mandir}/man8 %{__cp} man/*.1 %{buildroot}%{_mandir}/man1 %{__cp} man/*.8 %{buildroot}%{_mandir}/man8 # Make our ghost log and run directories... %{__mkdir_p} %{buildroot}%{_localstatedir}/log/passenger-analytics # logrotate %{__mkdir_p} %{buildroot}%{_sysconfdir}/logrotate.d install -pm 0644 %{SOURCE10} %{buildroot}%{_sysconfdir}/logrotate.d/passenger %check export EXTRA_CFLAGS="${CFLAGS:-%optflags} -Wno-deprecated" export EXTRA_CXXFLAGS="${CXXFLAGS:-%optflags} -Wno-deprecated" export EXTRA_CFLAGS=`echo "$EXTRA_CFLAGS" | sed 's|-O2||g'` export EXTRA_CXXFLAGS=`echo "$EXTRA_CXXFLAGS" | sed 's|-O2||g'` export USE_VENDORED_LIBEV=false export CCACHE_COMPRESS=1 export CCACHE_COMPRESS_LEVEL=3 # Running the full test suite is not only slow, but also impossible # because not all requirements are packaged by Fedora. It's also not # too useful because Phusion Passenger is automatically tested by a CI # server on every commit. The C++ tests are the most likely to catch # any platform-specific bugs (e.g. bugs caused by wrong compiler options) # so we only run those. Note that the C++ tests are highly timing # sensitive, so sometimes they may fail even though nothing is really # wrong. We therefore do not make failures fatal, although the result # should still be checked. %{__cp} %{SOURCE12} test/config.json rake test:cxx || true %files %doc "%{_docdir}/%{namespace}/Users guide.html" %doc "%{_docdir}/%{namespace}/Users guide Nginx.html" %doc "%{_docdir}/%{namespace}/Users guide Apache.html" %doc "%{_docdir}/%{namespace}/Users guide Standalone.html" %{_bindir} %{_sbindir} %{_libdir}/%{namespace}/PassengerWebHelper %{_libdir}/%{namespace}/agents %{_datadir}/%{namespace}/helper-scripts %{_datadir}/%{namespace}/templates %{_datadir}/%{namespace}/standalone_default_root %{_datadir}/%{namespace}/node %{_datadir}/%{namespace}/*.types %{_datadir}/%{namespace}/*.crt %{_datadir}/%{namespace}/*.txt %dir %{_localstatedir}/log/passenger-analytics %{_sysconfdir}/logrotate.d/passenger %{_mandir} %{passenger_ruby_libdir} %files doc %doc %{_docdir}/%{namespace} %files devel %{_datadir}/%{namespace}/ngx_http_passenger_module %{_datadir}/%{namespace}/ruby_extension_source %{_datadir}/%{namespace}/include %{_libdir}/%{namespace}/common %files -n mod_passenger %config(noreplace) %{_httpd_modconfdir}/*.conf %if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" %config(noreplace) %{_httpd_confdir}/*.conf %endif %doc "%{_docdir}/%{namespace}/Users guide Apache.html" %{_httpd_moddir}/mod_passenger.so %files native-libs %{ruby_sitearchdir}/passenger_native_support.so %changelog * Thu Nov 14 2013 Jan Kaluza - 4.0.18-4 - load native library from proper path * Thu Oct 31 2013 Jan Kaluza - 4.0.18-3 - fix #1021940 - add locations.ini with proper Fedora locations * Wed Sep 25 2013 Troy Dawson - 4.0.18-2 - Cleanup spec file - Fix for bz#987879 * Tue Sep 24 2013 Troy Dawson - 4.0.18-1 - Update to 4.0.18 - Remove patches no longer needed - Update patches that need updating * Mon Sep 23 2013 Brett Lentz - 3.0.21-9 - finish fixing bz#999384 * Fri Sep 20 2013 Joe Orton - 3.0.21-8 - update packaging for httpd 2.4.x * Thu Sep 19 2013 Troy Dawson - 3.0.21-7 - Fix for F20 FTBFS (#993310) * Thu Aug 22 2013 Brett Lentz - 3.0.21-6 - bz#999384 * Sun Aug 04 2013 Fedora Release Engineering - 3.0.21-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Jul 18 2013 Troy Dawson - 3.0.21-4 - Fix for CVE-2013-4136 (#985634) * Fri Jun 21 2013 Troy Dawson - 3.0.21-3 - Putting the agents back to where they originally were * Fri Jun 21 2013 Troy Dawson - 3.0.21-2 - Remove Rakefile (only used for building) (#976843) * Thu May 30 2013 Troy Dawson - 3.0.21-1 - Update to version 3.0.21 - Fix for CVE-2013-2119 * Thu May 16 2013 Troy Dawson - 3.0.19-4 - Fix to make agents work on F19+ * Wed Mar 13 2013 Troy Dawson - 3.0.19-3 - Fix to make it build/install on F19+ - Added patch105 * Thu Feb 14 2013 Fedora Release Engineering - 3.0.19-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sun Jan 20 2013 Orion Poplawski - 3.0.19-1 - Update to 3.0.19 * Wed Sep 19 2012 Orion Poplawski - 3.0.17-3 - Drop dependency on rubygem(file-tail), no longer needed * Fri Sep 7 2012 Brett Lentz - 3.0.17-2 - Fix License * Thu Sep 6 2012 Brett Lentz - 3.0.17-1 - update to 3.0.17 * Wed Sep 5 2012 Brett Lentz - 3.0.14-15 - add support for tmpfiles.d * Tue Sep 4 2012 Brett Lentz - 3.0.14-14 - Fix License tag - Fix gem_extdir ownership issue * Wed Aug 29 2012 Brett Lentz - 3.0.14-13 - fix pathing issues - fix ruby abi requires * Wed Aug 29 2012 Brett Lentz - 3.0.14-12 - remove capability for running passenger standalone until daemon_controller is updated * Tue Aug 28 2012 Brett Lentz - 3.0.14-11 - fix issues with fastthread * Mon Aug 27 2012 Brett Lentz - 3.0.14-10 - get test suite sort of working - move agents to gem_extdir * Fri Aug 24 2012 Brett Lentz - 3.0.14-9 - stop using _bindir - fix native libs path - fix ownership on extdir - improve test output * Wed Aug 22 2012 Brett Lentz - 3.0.14-8 - removed policycoreutils requirement - moved native libs to gem_extdir * Wed Aug 22 2012 Brett Lentz - 3.0.14-7 - remove selinux policy module. it's in the base policy now. * Fri Aug 17 2012 Brett Lentz - 3.0.14-6 - put native-libs into ruby_vendorarchdir. * Thu Aug 16 2012 Brett Lentz - 3.0.14-5 - clean up packaging and file placement. - add logrotate file for /var/log/passenger-analytics * Wed Aug 15 2012 Brett Lentz - 3.0.14-4 - backported fix only needed on f18+ * Wed Aug 15 2012 Brett Lentz - 3.0.14-3 - backport fix from https://svn.boost.org/trac/boost/ticket/6940 * Mon Aug 13 2012 Brett Lentz - 3.0.14-2 - remove F15 conditional. F15 is EOL. * Fri Jul 27 2012 Troy Dawson - 3.0.14-1 - Updated to version 3.0.14 * Fri Jul 27 2012 Troy Dawson - 3.0.12-6 - Added patch20, spawn-ip - Changed selinux files to be more dynamic * Tue Jun 05 2012 Troy Dawson - 3.0.12-5 - Add all the selinux files * Tue Jun 05 2012 Troy Dawson - 3.0.12-4 - Added selinux configurations * Tue Jun 05 2012 Troy Dawson - 3.0.12-3 - Added native and native-libs rpms. * Mon Apr 16 2012 Brett Lentz - 3.0.12-2 - Add dist to release. - Shuffle around deprecated buildrequires and requires. * Mon Apr 16 2012 Brett Lentz - 3.0.12-1 - Update to 3.0.12 - Incorporate specfile changes from kanarip's version * Wed Apr 11 2012 Brett Lentz - 3.0.11-1 - Initial spec file passenger-4.0.37/rpm/passenger_dynamic_thread_group.patch000644 000765 000024 00000001054 12233035540 024271 0ustar00honglistaff000000 000000 diff --git a/test/oxt/dynamic_thread_group_test.cpp b/test/oxt/dynamic_thread_group_test.cpp index 003b7ef..5a90463 100644 --- a/test/oxt/dynamic_thread_group_test.cpp +++ b/test/oxt/dynamic_thread_group_test.cpp @@ -103,9 +103,9 @@ namespace tut { } static void create_threads(dynamic_thread_group *group) { - for (int i = 1000; i >= 0; i--) { + for (int i = 100; i >= 0; i--) { boost::function f(boost::bind(do_nothing, i * 1000)); - group->create_thread(f, "", 256 * 1024); + group->create_thread(f, "", 8 * 1024); } } passenger-4.0.37/rpm/passenger_tests_default_config_example.patch000644 000765 000024 00000003135 12233035540 026012 0ustar00honglistaff000000 000000 diff -up ./test/config.json.example.lindefault ./test/config.json.example --- ./test/config.json.example.lindefault 2013-05-30 16:04:41.206533618 +0200 +++ ./test/config.json.example 2013-05-30 16:04:34.070449358 +0200 @@ -10,24 +10,24 @@ // otherwise the tests will fail. //// Good values for OS X: - "normal_user_1": "_www", - "normal_user_2": "daemon", - // Must not be "nobody". - "default_user": "_sandbox", - // Must not be normal_user_1's primary group. - "normal_group_1": "daemon", - // Must not be normal_user_2's primary group. - "normal_group_2": "_sandbox", - // Must not be default_user's primary group. Must not be "nobody". - "default_group": "_www", - - ///// Good values for Linux and FreeBSD. Same restrictions apply. - //"normal_user_1": "games", + //"normal_user_1": "_www", //"normal_user_2": "daemon", - //"default_user": "man", + //// Must not be "nobody". + //"default_user": "_sandbox", + //// Must not be normal_user_1's primary group. //"normal_group_1": "daemon", - //"normal_group_2": "man", - //"default_group": "games", + //// Must not be normal_user_2's primary group. + //"normal_group_2": "_sandbox", + //// Must not be default_user's primary group. Must not be "nobody". + //"default_group": "_www", + + ///// Good values for Linux and FreeBSD. Same restrictions apply. + "normal_user_1": "games", + "normal_user_2": "daemon", + "default_user": "man", + "normal_group_1": "daemon", + "normal_group_2": "man", + "default_group": "games", // A nonexistant username, group name, user ID and group ID. "nonexistant_user": "xxxxxxxxxxxxxxxxxxx", passenger-4.0.37/rpm/rubygem-passenger-4.0.18-gcc47-include-sys_types.patch000644 000765 000024 00000003631 12233035540 026611 0ustar00honglistaff000000 000000 diff -urp passenger-release-4.0.18.orig/ext/common/EventedMessageServer.h passenger-release-4.0.18/ext/common/EventedMessageServer.h --- passenger-release-4.0.18.orig/ext/common/EventedMessageServer.h 2013-09-17 13:47:54.000000000 -0500 +++ passenger-release-4.0.18/ext/common/EventedMessageServer.h 2013-09-23 13:59:23.012484647 -0500 @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff -urp passenger-release-4.0.18.orig/ext/common/FileDescriptor.h passenger-release-4.0.18/ext/common/FileDescriptor.h --- passenger-release-4.0.18.orig/ext/common/FileDescriptor.h 2013-09-17 13:47:54.000000000 -0500 +++ passenger-release-4.0.18/ext/common/FileDescriptor.h 2013-09-23 13:59:23.013484647 -0500 @@ -30,6 +30,7 @@ #include #include +#include #include #include diff -urp passenger-release-4.0.18.orig/ext/common/Utils/BufferedIO.h passenger-release-4.0.18/ext/common/Utils/BufferedIO.h --- passenger-release-4.0.18.orig/ext/common/Utils/BufferedIO.h 2013-09-17 13:47:54.000000000 -0500 +++ passenger-release-4.0.18/ext/common/Utils/BufferedIO.h 2013-09-23 13:59:23.014484646 -0500 @@ -1,6 +1,7 @@ #ifndef _PASSENGER_BUFFERED_IO_H_ #define _PASSENGER_BUFFERED_IO_H_ +#include #include #include #include diff -urp passenger-release-4.0.18.orig/ext/common/Utils/StreamBoyerMooreHorspool.h passenger-release-4.0.18/ext/common/Utils/StreamBoyerMooreHorspool.h --- passenger-release-4.0.18.orig/ext/common/Utils/StreamBoyerMooreHorspool.h 2013-09-17 13:47:54.000000000 -0500 +++ passenger-release-4.0.18/ext/common/Utils/StreamBoyerMooreHorspool.h 2013-09-23 13:59:23.015484645 -0500 @@ -189,7 +189,7 @@ #endif #endif - +#include #include #include #include passenger-4.0.37/rpm/rubygem-passenger-4.0.18-GLIBC_HAVE_LONG_LONG.patch000644 000765 000024 00000002252 12233035540 025300 0ustar00honglistaff000000 000000 diff -urp passenger-release-4.0.18.orig/ext/boost/cstdint.hpp passenger-release-4.0.18/ext/boost/cstdint.hpp --- passenger-release-4.0.18.orig/ext/boost/cstdint.hpp 2013-09-17 13:47:54.000000000 -0500 +++ passenger-release-4.0.18/ext/boost/cstdint.hpp 2013-09-23 16:34:02.074450639 -0500 @@ -41,7 +41,15 @@ // so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG. // See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 // -#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG)) +// This define has been dropped altogether in GLIBC 2.17. As of then, +// support for long long is part of baseline requirements, and +// [u]int64_t is always defined. See here: +// http://sourceware.org/ml/libc-alpha/2013-01/msg00440.html +// +#if defined(BOOST_HAS_STDINT_H) \ + && (!defined(__GLIBC__) \ + || defined(__GLIBC_HAVE_LONG_LONG) \ + || (defined __GLIBC_PREREQ && __GLIBC_PREREQ(2,17))) // The following #include is an implementation artifact; not part of interface. # ifdef __hpux Only in passenger-release-4.0.18/ext/boost: cstdint.hpp.glibc-long passenger-4.0.37/rpm/Vagrantfile000644 000765 000024 00000002516 12233035540 017203 0ustar00honglistaff000000 000000 # -*- mode: ruby -*- # vi: set ft=ruby : # This Vagrantfile sets up a CentOS VM, for the purpose of RPM development. ROOT = File.expand_path(File.dirname(__FILE__) + "/..") # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "centos-6.4-x86_64" config.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130731.box" config.vm.synced_folder ROOT, "/vagrant" config.ssh.forward_agent = true config.vm.provider :vmware_fusion do |f, override| override.vm.box_url = "https://dl.dropbox.com/u/5721940/vagrant-boxes/vagrant-centos-6.4-x86_64-vmware_fusion.box" end pkg_cmd = %Q{ echo "exclude = kernel*" >> /etc/yum.conf rpm -Uvh http://mirror.overthewire.com.au/pub/epel/6/i386/epel-release-6-8.noarch.rpm && yum update -y && yum install -y @development-tools fedora-packager git sudo nano && yum install -y gcc gcc-c++ ccache curl-devel openssl-devel zlib-devel && yum install -y ruby ruby-devel rubygems rubygem-rake httpd httpd-devel apr-devel apr-util-devel && usermod -a -G mock vagrant && sed -i 's/Defaults requiretty//' /etc/sudoers && sudo -u vagrant -H rpmdev-setuptree } config.vm.provision :shell, :inline => pkg_cmd end passenger-4.0.37/resources/mime.types000644 000765 000024 00000006542 12233035540 020252 0ustar00honglistaff000000 000000 types { text/html html htm shtml; text/css css; text/xml xml; image/gif gif; image/jpeg jpeg jpg; application/x-javascript js; application/atom+xml atom; application/rss+xml rss; text/cache-manifest manifest appcache; text/mathml mml; text/plain txt; text/vnd.sun.j2me.app-descriptor jad; text/vnd.wap.wml wml; text/x-component htc; image/png png; image/tiff tif tiff; image/vnd.wap.wbmp wbmp; image/x-icon ico; image/x-jng jng; image/x-ms-bmp bmp; image/svg+xml svg; application/x-font-ttf ttf; font/opentype otf; font/x-woff woff; application/vnd.ms-fontobject eot; application/java-archive jar war ear; application/mac-binhex40 hqx; application/msword doc; application/pdf pdf; application/postscript ps eps ai; application/rtf rtf; application/vnd.ms-excel xls; application/vnd.ms-powerpoint ppt; application/vnd.wap.wmlc wmlc; application/vnd.wap.xhtml+xml xhtml; application/vnd.google-earth.kml+xml kml; application/vnd.google-earth.kmz kmz; application/x-cocoa cco; application/x-java-archive-diff jardiff; application/x-java-jnlp-file jnlp; application/x-makeself run; application/x-perl pl pm; application/x-pilot prc pdb; application/x-rar-compressed rar; application/x-redhat-package-manager rpm; application/x-sea sea; application/x-shockwave-flash swf; application/x-stuffit sit; application/x-tcl tcl tk; application/x-x509-ca-cert der pem crt; application/x-xpinstall xpi; application/zip zip; application/octet-stream bin exe dll; application/octet-stream deb; application/octet-stream dmg; application/octet-stream iso img; application/octet-stream msi msp msm; application/octet-stream gem; audio/midi mid midi kar; audio/mpeg mp3; audio/x-realaudio ra; audio/x-wav wav; video/3gpp 3gpp 3gp; video/mpeg mpeg mpg; video/quicktime mov; video/x-flv flv; video/x-mng mng; video/x-ms-asf asx asf; video/x-ms-wmv wmv; video/x-msvideo avi; } passenger-4.0.37/resources/oss-binaries.phusionpassenger.com.crt000644 000765 000024 00000012034 12233035540 025507 0ustar00honglistaff000000 000000 -----BEGIN CERTIFICATE----- MIIFODCCBCCgAwIBAgIRAMe+7E/+jr6mozf4AlIIrrMwDQYJKoZIhvcNAQEFBQAw czELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxGTAXBgNV BAMTEFBvc2l0aXZlU1NMIENBIDIwHhcNMTMwODA3MDAwMDAwWhcNMTgwODA2MjM1 OTU5WjBlMSEwHwYDVQQLExhEb21haW4gQ29udHJvbCBWYWxpZGF0ZWQxFDASBgNV BAsTC1Bvc2l0aXZlU1NMMSowKAYDVQQDEyFvc3MtYmluYXJpZXMucGh1c2lvbnBh c3Nlbmdlci5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVs5q/ Oqf/ccFRnky2/Po6MQ3OzVTiN+7AokVO0K360l/kVjCkCIUXByElCFXaCXSucFQi CbupymM+wLZ4/ENeDijwja9iHqapafdni+NS5dnBGzgNOiF+WUbzXUZ/JiLm0N6v KYSsoJ4ivTRFpV+DNUL64GM48RaHF9zpnbWrbjy8Q5k+ojzjIi0v2VISI33aOM5M HRd65xJwlqy0zxhHN7XlwQ5e7fZwMC8gnOSZ3SS/fPgTiDisoHnHiAndzy2bckUf t2NPd6Ncn7lFfoAb8IIl6h2ypFA40vpLF4Qreq3MTsQN7qL0opaN+OYAFtWb0CJB gX8YpbWluZMj48cfAgMBAAGjggHTMIIBzzAfBgNVHSMEGDAWgBSZ5EBfaxRePgXZ 3dNjVPxiuPcArDAdBgNVHQ4EFgQUiA1b6Kr+nhQZe5DEi+2jL5FrqDAwDgYDVR0P AQH/BAQDAgWgMAwGA1UdEwEB/wQCMAAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsG AQUFBwMCMFAGA1UdIARJMEcwOwYLKwYBBAGyMQECAgcwLDAqBggrBgEFBQcCARYe aHR0cDovL3d3dy5wb3NpdGl2ZXNzbC5jb20vQ1BTMAgGBmeBDAECATA7BgNVHR8E NDAyMDCgLqAshipodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9Qb3NpdGl2ZVNTTENB Mi5jcmwwbAYIKwYBBQUHAQEEYDBeMDYGCCsGAQUFBzAChipodHRwOi8vY3J0LmNv bW9kb2NhLmNvbS9Qb3NpdGl2ZVNTTENBMi5jcnQwJAYIKwYBBQUHMAGGGGh0dHA6 Ly9vY3NwLmNvbW9kb2NhLmNvbTBTBgNVHREETDBKgiFvc3MtYmluYXJpZXMucGh1 c2lvbnBhc3Nlbmdlci5jb22CJXd3dy5vc3MtYmluYXJpZXMucGh1c2lvbnBhc3Nl bmdlci5jb20wDQYJKoZIhvcNAQEFBQADggEBAJYqOIn6GzCIuUBktwQd90hkFPsP 2qrmvxTUSGM72FV2PFvun2Z7GeTkbYPvASNu8z/Z4JeMdYIf/PjOK7ZQQqzIKdHw PzulmdFhtV+ZZ6Z/ShL9hYY9x7d0EuALxSW+AeZiM2mWv8KOQXoplm4Hce5w+EIH Ds4zJJE73390z1VE33yHKpWU7QlV5zfr4iAUcD2LWNn79IQ5yZ0kea6VqRZYAIyT JHsr0QsK3jO3TVIf8sG53UWTG76mg1I4vTEi7V3cgCMcP5kvcWVqPYvAeizIPpel 0rH1pfk9APhdUUgairzM7mZJkIngZPtKBp/o/8DTliHW62NJVhtLaYsI5OU= -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIE5TCCA82gAwIBAgIQB28SRoFFnCjVSNaXxA4AGzANBgkqhkiG9w0BAQUFADBv MQswCQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFk ZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBF eHRlcm5hbCBDQSBSb290MB4XDTEyMDIxNjAwMDAwMFoXDTIwMDUzMDEwNDgzOFow czELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxGTAXBgNV BAMTEFBvc2l0aXZlU1NMIENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK AoIBAQDo6jnjIqaqucQA0OeqZztDB71Pkuu8vgGjQK3g70QotdA6voBUF4V6a4Rs NjbloyTi/igBkLzX3Q+5K05IdwVpr95XMLHo+xoD9jxbUx6hAUlocnPWMytDqTcy Ug+uJ1YxMGCtyb1zLDnukNh1sCUhYHsqfwL9goUfdE+SNHNcHQCgsMDqmOK+ARRY FygiinddUCXNmmym5QzlqyjDsiCJ8AckHpXCLsDl6ez2PRIHSD3SwyNWQezT3zVL yOf2hgVSEEOajBd8i6q8eODwRTusgFX+KJPhChFo9FJXb/5IC1tdGmpnc5mCtJ5D YD7HWyoSbhruyzmuwzWdqLxdsC/DAgMBAAGjggF3MIIBczAfBgNVHSMEGDAWgBSt vZh6NLQm9/rEJlTvA73gJMtUGjAdBgNVHQ4EFgQUmeRAX2sUXj4F2d3TY1T8Yrj3 AKwwDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQAwEQYDVR0gBAow CDAGBgRVHSAAMEQGA1UdHwQ9MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0 LmNvbS9BZGRUcnVzdEV4dGVybmFsQ0FSb290LmNybDCBswYIKwYBBQUHAQEEgaYw gaMwPwYIKwYBBQUHMAKGM2h0dHA6Ly9jcnQudXNlcnRydXN0LmNvbS9BZGRUcnVz dEV4dGVybmFsQ0FSb290LnA3YzA5BggrBgEFBQcwAoYtaHR0cDovL2NydC51c2Vy dHJ1c3QuY29tL0FkZFRydXN0VVROU0dDQ0EuY3J0MCUGCCsGAQUFBzABhhlodHRw Oi8vb2NzcC51c2VydHJ1c3QuY29tMA0GCSqGSIb3DQEBBQUAA4IBAQCcNuNOrvGK u2yXjI9LZ9Cf2ISqnyFfNaFbxCtjDei8d12nxDf9Sy2e6B1pocCEzNFti/OBy59L dLBJKjHoN0DrH9mXoxoR1Sanbg+61b4s/bSRZNy+OxlQDXqV8wQTqbtHD4tc0azC e3chUN1bq+70ptjUSlNrTa24yOfmUlhNQ0zCoiNPDsAgOa/fT0JbHtMJ9BgJWSrZ 6EoYvzL7+i1ki4fKWyvouAt+vhcSxwOCKa9Yr4WEXT0K3yNRw82vEL+AaXeRCk/l uuGtm87fM04wO+mPZn+C+mv626PAcwDj1hKvTfIPWhRRH224hoFiB85ccsJP81cq cdnUl4XmGFO3 -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEU MBIGA1UEChMLQWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFs IFRUUCBOZXR3b3JrMSIwIAYDVQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290 MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEwNDgzOFowbzELMAkGA1UEBhMCU0Ux FDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRUcnVzdCBFeHRlcm5h bCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0EgUm9v dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvt H7xsD821+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9 uMq/NzgtHj6RQa1wVsfwTz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzX mk6vBbOmcZSccbNQYArHE504B4YCqOmoaSYYkKtMsE8jqzpPhNjfzp/haW+710LX a0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy2xSoRcRdKn23tNbE7qzN E0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv77+ldU9U0 WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYD VR0PBAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0 Jvf6xCZU7wO94CTLVBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRU cnVzdCBBQjEmMCQGA1UECxMdQWRkVHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsx IjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENBIFJvb3SCAQEwDQYJKoZIhvcN AQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZlj7DYd7usQWxH YINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5 6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvC Nr4TDea9Y355e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEX c4g/VhsxOBi0cQ+azcgOno4uG+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5a mnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= -----END CERTIFICATE----- passenger-4.0.37/resources/release.txt000644 000765 000024 00000000000 12233035540 020375 0ustar00honglistaff000000 000000 passenger-4.0.37/resources/standalone_default_root/000755 000765 000024 00000000000 12233035540 023125 5ustar00honglistaff000000 000000 passenger-4.0.37/resources/templates/000755 000765 000024 00000000000 12233035540 020224 5ustar00honglistaff000000 000000 passenger-4.0.37/resources/union_station_gateway.crt000644 000765 000024 00000003630 12233035540 023354 0ustar00honglistaff000000 000000 -----BEGIN CERTIFICATE----- MIIFbjCCA1YCCQCd2BBmpGM9zDANBgkqhkiG9w0BAQUFADB5MQswCQYDVQQGEwJO TDESMBAGA1UECBMJTmVkZXJsYW5kMRAwDgYDVQQKEwdQaHVzaW9uMSQwIgYDVQQD ExtnYXRld2F5LnVuaW9uc3RhdGlvbmFwcC5jb20xHjAcBgkqhkiG9w0BCQEWD2lu Zm9AcGh1c2lvbi5ubDAeFw0xMDA4MDkwOTU2MzVaFw0zNzEyMjQwOTU2MzVaMHkx CzAJBgNVBAYTAk5MMRIwEAYDVQQIEwlOZWRlcmxhbmQxEDAOBgNVBAoTB1BodXNp b24xJDAiBgNVBAMTG2dhdGV3YXkudW5pb25zdGF0aW9uYXBwLmNvbTEeMBwGCSqG SIb3DQEJARYPaW5mb0BwaHVzaW9uLm5sMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A MIICCgKCAgEAvUjNLupLtz8IIQINJ1XaLmR+ttTOvrGx/Y++BggI3LqAHwMsWjG4 KIFhIpLfURViotthfbIYin3sPhC3WwvMfIoxezjAOnsXVcYB8ynxopu8WM4QSYLC 64uAKyYlaHckxmppqGCBHtA+hHBLEDM/GO8hyJUn+Tjf0LEoranpfTLnZex9eMEo Ggx08saKZ6A2JLQbMEPOf62DQciwI8ToK8eV1WSrg6O7fVuLe9YPXVeqT3hFGhYX UXEFBFQs8EZDtEZvNCGyD3W3wnanQL/IGTm5BAiVVJoXnvXZoHMgX8ar2xQk1+t6 Wvd0nMF/3tWVPW3mQTDYErRpXx7m+ySwYp72yidk7IlFkFW/OIJIiHLMUnwlu9fv PWlmNLVuubR5eu1/8Qb3hVPlqYFS/2nQRs4bYoO3r0enGY9V7deWtEeUuDlY5Y5C Bf/bSf0Kt6vSt0Y9obu2xQDIwl6OBnIXpuxSSVinh+31ECymolUFUbWEuEqkRKPY 6UYjyex6az2dIMnrr9WF1lfT+GTq4rZa4wmymT00sVofceI/TPFoglhkq93rnLix TdUMnrywk3JUpGj1fsOI+PzGReUaJfR+4Gbau5Kab3ZKURQnY6toCQafaSGYJnO8 rdpWbhJOTLO82K71W7+Dqw4bzpWyU2PJAiEO5w6mD3G/es+iAPrt64ECAwEAATAN BgkqhkiG9w0BAQUFAAOCAgEAQ2lkVAHv5SjCTeuKl93wSanxLL8zrvyh2DVYQc/b v/PSCL3Afoidlvjc1qVCB93WfIHTPGG/xOI0EVi8W96Zg9D6P8Kjc79Vfs6MM8h/ vuHh4pS/PFTzmFd9nRI26iWMZl2DMQnXflSNJbxqWr0AtGZTnT9w/MR+2Kxu74AD E0r3P11WoYpfWVc6SiEBJ9WnMlSoAT+xShIiXAsLuzoXQOMGfg5M3JIsXwQZtRGN n58bq+prHroI1cU96xbmCw0fRgLuJYhdoU3uWE7usSutYaW7LT4T2oGR5x2ZPzy/ vr7jX8AbUJDWK3FbZ0//Zpkt9ldF60NJ/l42U6F5frQ+FSCDTX1k32RcG1vRIfM5 TZgBgT0D3AJoNPbNaEGWsBrxG3wZGxxvnamPM0S01WmxwL2PNM1UnUKG+y/ALfoc JJeXyuY3HFt3DyYE4odyPOHye/fP1qLl1ZrJIzyAT0pUo38UB8uQ4HZUWD/LljJm V0fUFWKWk6OawwIM4sYc90WezYgDfAT1RUDy0TnvKlG4FC1Oodnnm2rQFu+zDOWH Fj0lBkzVUOlt2nWhLIW/uN3bjM9TsXaw8qUGWhvn4z3FHGHEdnLy3wMzwCSVq1tg QilKaQe+8Y4SePo110Tmkfls6vyEhcN6KpRWdpQSXUXmMY7IxjfNJnKTeGvWd1Y9 CaY= -----END CERTIFICATE----- passenger-4.0.37/resources/templates/apache2/000755 000765 000024 00000000000 12233035540 021527 5ustar00honglistaff000000 000000 passenger-4.0.37/resources/templates/error_layout.css000644 000765 000024 00000002566 12233035540 023475 0ustar00honglistaff000000 000000 body { font-family: Verdana, 'Bitstream Vera Sans', Arial, Sans-Serif; font-size: 10pt; background: white; color: #222222; margin: 0; padding-top: 3em; padding-bottom: 3em; padding-left: 4.5em; padding-right: 4.5em; } h1 { font-size: 17pt; font-weight: medium; color: #533e72; border-bottom: 1px solid #533e72; } h1.title { margin-top: 0; } h1.error_title { color: red; border-bottom: 1px solid red; } a { text-decoration: none; } a:hover { text-decoration: underline; } dt { font-weight: bold; color: #280050; } dd { margin-top: 0.5em; margin-bottom: 1em; } .commands { border: 1px solid #b594e7; background: #ddc6ff; padding: 0.5em; margin: 0.5em; font-family: 'Bitstream Vera Sans Mono', 'Courier New', Monospace; } pre { overflow: auto; white-space: pre-wrap; text-align: left; } table.backtrace th { background: #8470a6; color: white; } table.backtrace th, table.backtrace td { padding: 0.2em; padding-left: 0.4em; padding-right: 0.4em; } table.backtrace tr td { background: #ecdfff; } table.backtrace tr.even td { background: #f7f2ff; } table.backtrace td.index { font-weight: bold; } #site_footer { border-top: solid 1px black; margin-top: 1em; padding-top: 1em; font-size: small; color: #777777; } #site_footer a { color: #65498e; } #site_footer a:hover { color: #9681d9; } #site_header .corporate_identity { display: none; } passenger-4.0.37/resources/templates/error_layout.html.template000644 000765 000024 00000004754 12233035540 025464 0ustar00honglistaff000000 000000 {{TITLE}}

{{TITLE}}

{{CONTENT|raw}}
Application root
{{APP_ROOT}}
Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV and PASSENGER_ENV)
{{ENVIRONMENT}}
{{if IS_RUBY_APP}}
Ruby interpreter command
{{RUBY}}
{{/if}}
User and groups
{{USER_INFO|default=Unknown}}
Environment variables
{{ENVVARS|default=Unknown}}
Ulimits
{{ULIMIT|default=Unknown}}
{{if SYSMEMORY}}
System memory usage
{{SYSMEMORY|default=Unknown}}
{{/if}} {{if RUBY_INFO}}
General Ruby interpreter information
{{RUBY_INFO}}
{{/if}} {{if RBCONFIG}}
Ruby configuration (RbConfig::CONFIG)
{{RBCONFIG}}
{{/if}} {{if ACTIVATED_GEMS}}
Activated Ruby gems
{{ACTIVATED_GEMS}}
{{/if}} {{if LOAD_PATH}}
Ruby load path ($LOAD_PATH)
{{LOAD_PATH}}
{{/if}} {{if LOADED_LIBS}}
Ruby loaded libraries ($LOADED_FEATURES)
{{LOADED_LIBS}}
{{/if}}
passenger-4.0.37/resources/templates/general_error.html.template000644 000765 000024 00000000026 12233035540 025550 0ustar00honglistaff000000 000000
{{MESSAGE}}
passenger-4.0.37/resources/templates/general_error_with_html.html.template000644 000765 000024 00000000017 12233035540 027627 0ustar00honglistaff000000 000000 {{MESSAGE|raw}}passenger-4.0.37/resources/templates/installer_common/000755 000765 000024 00000000000 12233035540 023571 5ustar00honglistaff000000 000000 passenger-4.0.37/resources/templates/nginx/000755 000765 000024 00000000000 12233035540 021347 5ustar00honglistaff000000 000000 passenger-4.0.37/resources/templates/standalone/000755 000765 000024 00000000000 12233035540 022354 5ustar00honglistaff000000 000000 passenger-4.0.37/resources/templates/undisclosed_error.html.template000644 000765 000024 00000001252 12233035540 026451 0ustar00honglistaff000000 000000 We're sorry, but something went wrong (500)

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

passenger-4.0.37/resources/templates/standalone/cannot_write_to_dir.txt.erb000644 000765 000024 00000000715 12233035540 027723 0ustar00honglistaff000000 000000 Permission problems Phusion Passenger Standalone must be able to write to the following directory: <%= @dir %> But it can't do that, despite the fact that it's running as root. There's probably a permission problem, or (if you're running on a RedHat/CentOS-based Linux distribution) SELinux might be interfering. Please fix the permissions for the aforementioned directory and/or disable SELinux, and re-run Phusion Passenger Standalone. passenger-4.0.37/resources/templates/standalone/config.erb000644 000765 000024 00000014157 12233035540 024323 0ustar00honglistaff000000 000000 ##################################################### # This file is autogenerated by Phusion Passenger Standalone # from <%= template_filename %> # Please edit that file instead. ##################################################### master_process on; worker_processes 1; daemon on; error_log '<%= @options[:log_file] %>' <% if debugging? %>info<% end %>; pid '<%= @options[:pid_file] %>'; <% if Process.euid == 0 %> <% if @options[:user] %> <%# Run workers as the given user. The master process will always run as root and will be able to bind to any port. %> user <%= @options[:user] %> <%= default_group_for(@options[:user]) %>; <% else %> <%# Prevent running Nginx workers as nobody. %> user <%= current_user %> <%= default_group_for(current_user) %>; <% end %> <% end %> events { worker_connections 1024; } http { log_format debug '[$time_local] $msec "$request" $status conn=$connection sent=$bytes_sent body_sent=$body_bytes_sent'; include '<%= PhusionPassenger.resources_dir %>/mime.types'; passenger_ruby <%= PlatformInfo.ruby_command %>; passenger_root '<%= location_config_filename %>'; passenger_abort_on_startup_error on; passenger_ctl cleanup_pidfiles <%= serialize_strset("#{@temp_dir}/temp_dir_toucher.pid") %>; passenger_user_switching off; passenger_max_pool_size <%= @options[:max_pool_size] %>; passenger_min_instances <%= @options[:min_instances] %>; <% if @options[:user] %> passenger_user <%= @options[:user] %>; passenger_default_user <%= @options[:user] %>; passenger_analytics_log_user <%= @options[:user] %>; <% else %> passenger_user <%= current_user %>; passenger_default_user <%= current_user %>; passenger_analytics_log_user <%= current_user %>; <% end %> <% if debugging? %>passenger_log_level 2;<% end %> <% if @options[:temp_dir] %>passenger_temp_dir '<%= @options[:temp_dir] %>';<% end %> <% if @options[:rolling_restarts] %>passenger_rolling_restarts on;<% end %> <% if @options[:resist_deployment_errors] %>passenger_resist_deployment_errors on;<% end %> <% unless @options[:friendly_error_pages] %>passenger_friendly_error_pages off;<% end %> <% if @options[:union_station_gateway_address] %> union_station_gateway_address <%= @options[:union_station_gateway_address] %>; union_station_gateway_port <%= @options[:union_station_gateway_port] %>; union_station_gateway_cert -; <% end %> default_type application/octet-stream; types_hash_max_size 2048; server_names_hash_bucket_size 64; client_max_body_size 1024m; access_log off; keepalive_timeout 60; underscores_in_headers on; gzip on; gzip_comp_level 3; gzip_min_length 150; gzip_proxied any; gzip_types text/plain text/css text/json text/javascript \ application/javascript application/x-javascript application/json; <% if @apps.size > 1 %> # Default server entry. server { <% if @options[:ssl] %> <% if @options[:ssl_port] %> listen <%= nginx_listen_address %>; listen <%= nginx_listen_address_with_ssl_port %> ssl; <% else %> listen <%= nginx_listen_address %> ssl; <% end %> <% else %> listen <%= nginx_listen_address %>; <% end %> root '<%= PhusionPassenger.resources_dir %>/standalone_default_root'; } <% end %> <% if @options[:ping_port] %> server { listen <%= nginx_listen_address(@options, true) %>; root '<%= PhusionPassenger.resources_dir %>/standalone_default_root'; } <% end %> <% for app in @apps %> server { <% if app[:ssl] %> <% if app[:ssl_port] %> listen <%= nginx_listen_address(app) %>; listen <%= nginx_listen_address_with_ssl_port(app) %> ssl; <% else %> listen <%= nginx_listen_address(app) %> ssl; <% end %> <% else %> listen <%= nginx_listen_address(app) %>; <% end %> server_name <%= app[:server_names].join(' ') %>; <% if app[:static_files_dir] %> root '<%= app[:static_files_dir] %>'; <% else %> root '<%= app[:root] %>/public'; <% end %> passenger_app_root '<%= app[:root] %>'; passenger_enabled on; passenger_app_env <%= app[:environment] %>; passenger_spawn_method <%= app[:spawn_method] %>; <% if app[:app_type] %>passenger_app_type <%= app[:app_type] %>;<% end %> <% if app[:startup_file] %>passenger_startup_file <%= app[:startup_file] %>;<% end %> <% if app[:concurrency_model] != DEFAULT_CONCURRENCY_MODEL %>passenger_concurrency_model <%= app[:concurrency_model] %>;<% end %> <% if app[:thread_count] != DEFAULT_THREAD_COUNT %>passenger_thread_count <%= app[:thread_count] %>;<% end %> <% if app[:min_instances] %>passenger_min_instances <%= app[:min_instances] %>;<% end %> <% if app[:restart_dir] %>passenger_restart_dir '<%= app[:restart_dir] %>';<% end %> <% if app[:union_station_key] %> union_station_support on; union_station_key <%= app[:union_station_key] %>; <% end %> <% if app[:ssl] %> ssl_certificate <%= app[:ssl_certificate] %>; ssl_certificate_key <%= app[:ssl_certificate_key] %>; <% end %> # Rails asset pipeline support. location ~ ^/assets/ { error_page 490 = @static_asset; error_page 491 = @dynamic_request; recursive_error_pages on; if (-f $request_filename) { return 490; } if (!-f $request_filename) { return 491; } } location @static_asset { gzip_static on; expires max; add_header Cache-Control public; add_header ETag ""; } location @dynamic_request { passenger_enabled on; } } passenger_pre_start http://<%= nginx_listen_address(app) %>; <% end %> } passenger-4.0.37/resources/templates/standalone/download_tool_missing.txt.erb000644 000765 000024 00000001333 12233035540 030261 0ustar00honglistaff000000 000000 No download tool found Phusion Passenger Standalone requires some binaries, such as the Nginx core. It can download these binaries from the Phusion server (faster) or it can build these from source (slower, requires additional dependencies). But to download binaries, a download tool is required. * Option 1 (recommended): If you want the binaries to be downloaded, please press Ctrl-C, install a download tool as instructed below, and re-run Phusion Passenger Standalone. <% @runner.missing_dependencies.each do |dep| -%> - <%= dep.install_instructions %> <% end -%> * Option 2: If you want the binaries to be compiled from source, press Enter. Awaiting your choice...resources/templates/standalone/possible_solutions_for_download_and_extraction_problems.txt.erb000644 000765 000024 00000001266 12233035540 037273 0ustar00honglistaff000000 000000 passenger-4.0.37Unable to download or extract Nginx source tarball Possible reasons: * You are not connected to the Internet. If this is the case, then please connect to the Internet and try again. * The URL that Passenger Standalone tried to download from no longer exists. Please file a bug report if this is the case: http://code.google.com/p/phusion-passenger/issues/list * The download was corrupted. Please re-run Phusion Passenger Standalone; it will re-download Nginx. * Phusion Passenger Standalone is not able to write to /tmp. Please fix the permissions for this directory, or run Phusion Passenger Standalone as root. passenger-4.0.37/resources/templates/standalone/run_installer_as_root.txt.erb000644 000765 000024 00000000454 12233035540 030276 0ustar00honglistaff000000 000000 Permission problems Phusion Passenger Standalone must be able to write to the following directory: <%= @dir %> But it can't do that, because you're running Phusion Passenger Standalone as <%= `whoami`.strip %>. Please re-run Phusion Passenger Standalone as root. passenger-4.0.37/resources/templates/nginx/ask_for_extra_configure_flags.txt.erb000644 000765 000024 00000000442 12233035540 030723 0ustar00honglistaff000000 000000 Extra Nginx configure options If you want to pass extra arguments to the Nginx 'configure' script, then please specify them. If not, then specify nothing and press Enter. If you specify nothing then the 'configure' script will be run as follows: <%= @command %>passenger-4.0.37/resources/templates/nginx/cannot_write_to_dir.txt.erb000644 000765 000024 00000000660 12233035540 026715 0ustar00honglistaff000000 000000 Permission problems This installer must be able to write to the following directory: <%= @dir %> But it can't do that, despite the fact that it's running as root. There's probably a permission problem, or (if you're running on a RedHat/CentOS-based Linux distribution) SELinux might be interfering. Please fix the permissions for the aforementioned directory and/or disable SELinux, and re-run this installer.passenger-4.0.37/resources/templates/nginx/config_snippets.txt.erb000644 000765 000024 00000001052 12233035540 026047 0ustar00honglistaff000000 000000 Nginx with Passenger support was successfully installed. Please edit your Nginx configuration file<% if @config_file %> (probably <%= @config_file %>)<% end %>, and set the passenger_root and passenger_ruby configuration options in the 'http' block, like this: http { ... passenger_root <%= @passenger_root %>; passenger_ruby <%= @ruby %>; ... } After you (re)start Nginx, you are ready to deploy any number of web applications on Nginx. Press ENTER to continue. passenger-4.0.37/resources/templates/nginx/config_snippets_inserted.txt.erb000644 000765 000024 00000001155 12233035540 027750 0ustar00honglistaff000000 000000 Nginx with Passenger support was successfully installed. The Nginx configuration file (<%= @config_file %>) must contain the correct configuration options in order for Phusion Passenger to function correctly. This installer has already modified the configuration file for you! The following configuration snippet was inserted: http { ... passenger_root <%= @passenger_root %>; passenger_ruby <%= @ruby %>; ... } After you start Nginx, you are ready to deploy any number of Ruby on Rails applications on Nginx. Press ENTER to continue. passenger-4.0.37/resources/templates/nginx/confirm_extra_configure_flags.txt.erb000644 000765 000024 00000000166 12233035540 030737 0ustar00honglistaff000000 000000 Confirm configure flags The Nginx configure script will be run as follows: <%= @command %>passenger-4.0.37/resources/templates/nginx/deployment_example.txt.erb000644 000765 000024 00000001506 12233035540 026554 0ustar00honglistaff000000 000000 Deploying a web application: an example Suppose you have a web application in /somewhere. Add a server block to your Nginx configuration file, set its root to /somewhere/public, and set 'passenger_enabled on', like this: server { listen 80; server_name www.yourhost.com; root /somewhere/public; # <--- be sure to point to 'public'! passenger_enabled on; } And that's it! You may also want to check the Users Guide for security and optimization tips and other useful information: <%= @users_guide_path %> <%= @users_guide_url %> Enjoy Phusion Passenger, a product of Phusion (<%= @phusion_website %>) :-) <%= @passenger_website %> Phusion Passenger is a trademark of Hongli Lai & Ninh Bui. passenger-4.0.37/resources/templates/nginx/nginx_module_sources_not_available.txt.erb000644 000765 000024 00000000717 12233035540 031777 0ustar00honglistaff000000 000000 The necessary source files for compiling Nginx are not installed. <% if PhusionPassenger.native_packaging_method == "deb" %> Please install them with: sudo apt-get install <%= DEB_DEV_PACKAGE %> <% elsif PhusionPassenger.native_packaging_method == "rpm" %> Please install them with: sudo yum install <%= RPM_DEV_PACKAGE %>-<%= VERSION_STRING %> <% else %> Please ask your operating system vendor how to solve this problem. <% end %>passenger-4.0.37/resources/templates/nginx/other_nginx_installations_exist.txt.erb000644 000765 000024 00000001367 12233035540 031372 0ustar00honglistaff000000 000000 Wait! You are about to install a NEW Nginx installation! Your system already has an Nginx installation at: <%= @existing_binary %> If you continue using this installer, then it will install an an entirely new Nginx installation, at <%= @prefix %>/sbin/nginx. Are you sure this is what you want? "Wait, what? Do you mean you're not going to extend my existing Nginx with <%= PROGRAM_NAME %> support?" We're sorry, but no. Please read the following for more information, and for advise on how to deal with this situation: https://github.com/phusion/passenger/wiki/Why-can't-Phusion-Passenger-extend-my-existing-Nginx%3F Press Enter to continue installing, or Ctrl-C to abort.passenger-4.0.37/resources/templates/nginx/pcre_checksum_could_not_be_verified.txt.erb000644 000765 000024 00000000542 12233035540 032064 0ustar00honglistaff000000 000000 The PCRE checksum could not be verified Nginx requires PCRE for its rewrite module, so this installer will attempt to install Nginx without the rewrite module. If you want to make use of Nginx's rewrite module, please install PCRE manually by downloading it from: http://www.pcre.org/ Press ENTER to continue, or Ctrl-C to abort. passenger-4.0.37/resources/templates/nginx/pcre_could_not_be_downloaded.txt.erb000644 000765 000024 00000000526 12233035540 030527 0ustar00honglistaff000000 000000 PCRE could not be downloaded Nginx requires PCRE for its rewrite module, so this installer will attempt to install Nginx without the rewrite module. If you want to make use of Nginx's rewrite module, please install PCRE manually by downloading it from: http://www.pcre.org/ Press ENTER to continue, or Ctrl-C to abort.passenger-4.0.37/resources/templates/nginx/pcre_could_not_be_extracted.txt.erb000644 000765 000024 00000000550 12233035540 030367 0ustar00honglistaff000000 000000 The PCRE source tarball could not be extracted Nginx requires PCRE for its rewrite module, so this installer will attempt to install Nginx without the rewrite module. If you want to make use of Nginx's rewrite module, please install PCRE manually by downloading it from: http://www.pcre.org/ Press ENTER to continue, or Ctrl-C to abort.resources/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb000644 000765 000024 00000000442 12233035540 037311 0ustar00honglistaff000000 000000 passenger-4.0.37It looks like something went wrong Please read our Users guide for troubleshooting tips: <%= @users_guide_path %> <%= @users_guide_url %> If that doesn't help, please use our support facilities. We'll do our best to help you. <%= @support_url %>resources/templates/nginx/possible_solutions_for_download_and_extraction_problems.txt.erb000644 000765 000024 00000001623 12233035540 036263 0ustar00honglistaff000000 000000 passenger-4.0.37Unable to download or extract Nginx source tarball Possible reasons: * You are not connected to the Internet. If this is the case, then please connect to the Internet and try again. * The URL that this installer tried to download from no longer exists. If this is the case, then please download and extract the Nginx source manually. Then restart this installer, and choose option 2 ("No: I want to customize my Nginx installation"). * The download was corrupted. Please re-run this installer; it will re-download Nginx. If this still fails, then please download and extract the Nginx source manually. Then restart this installer, and choose option 2 ("No: I want to customize my Nginx installation"). * This installer is not able to write to /tmp. Please fix the permissions for this directory, or run this installer as root.passenger-4.0.37/resources/templates/nginx/query_download_and_install.txt.erb000644 000765 000024 00000002166 12233035540 030270 0ustar00honglistaff000000 000000 Automatically download and install Nginx? Nginx doesn't support loadable modules such as some other web servers do, so in order to install Nginx with Passenger support, it must be recompiled. Do you want this installer to download, compile and install Nginx for you? 1. Yes: download, compile and install Nginx for me. (recommended) The easiest way to get started. A stock Nginx <%= @nginx_version %> with Passenger support, but with no other additional third party modules, will be installed for you to a directory of your choice. 2. No: I want to customize my Nginx installation. (for advanced users) Choose this if you want to compile Nginx with more third party modules besides Passenger, or if you need to pass additional options to Nginx's 'configure' script. This installer will 1) ask you for the location of the Nginx source code, 2) run the 'configure' script according to your instructions, and 3) run 'make install'. Whichever you choose, if you already have an existing Nginx configuration file, then it will be preserved.passenger-4.0.37/resources/templates/nginx/welcome.txt.erb000644 000765 000024 00000001170 12233035540 024311 0ustar00honglistaff000000 000000 Welcome to the Phusion Passenger Nginx module installer, v<%= @version %>. This installer will guide you through the entire installation process. It shouldn't take more than 5 minutes in total. Here's what you can expect from the installation process: 1. This installer will compile and install Nginx with Passenger support. 2. You'll learn how to configure Passenger in Nginx. 3. You'll learn how to deploy a Ruby on Rails application. Don't worry if anything goes wrong. This installer will advise you on how to solve any problems. Press Enter to continue, or Ctrl-C to abort. passenger-4.0.37/resources/templates/installer_common/cannot_access_files_as_root.txt.erb000644 000765 000024 00000001330 12233035540 032611 0ustar00honglistaff000000 000000 Cannot access <%= @type || "files" %> This installer must be able to <%= @access || "write to" %> the following <%= @type || "files" %>: <%= @files.join("\n ") %> But it can't do that, despite the fact that it's running as root. There's probably a permission problem, an SELinux problem or some kind of operating system security problem. This installer tried its best to find out the exact reason for this failure, but unfortunately it couldn't figure it out, so it's up to you now. Please find out what's wrong with your system, fix the problems, and re-run this installer. If you don't know it either, please contact your operating system vendor for support, or consult your operating system's manual.passenger-4.0.37/resources/templates/installer_common/gem_install_permission_problems.txt.erb000644 000765 000024 00000001343 12233035540 033553 0ustar00honglistaff000000 000000 Permission problems in your gem directory detected Your gem directory is <%= Gem.dir %>, and the files within are supposed to be owned by the '<%= `whoami`.strip %>' user. However, it looks like you installed the Phusion Passenger gem with 'sudo', causing some files within to be owned by the 'root' user. This will cause permission problems later on. Please run the following command to fix the permissions: sudo chown -R <%= `whoami`.strip %> "<%= Gem.dir %>" Also, please remember to run 'gem install' commands without sudo in the future. Sudo is only necessary if the gem directory is located outside the home directory. After having fixed the permissions, please re-run this installer.passenger-4.0.37/resources/templates/installer_common/low_amount_of_memory_warning.txt.erb000644 000765 000024 00000001765 12233035540 033077 0ustar00honglistaff000000 000000 Your system does not have a lot of virtual memory Compiling <%= PROGRAM_NAME %> works best when you have at least <%= @required %> MB of virtual memory. However your system only has <%= @current %> MB of total virtual memory (<%= @ram %> MB RAM, <%= @swap %> MB swap). It is recommended that you temporarily add more swap space before proceeding. You can do it as follows: sudo dd if=/dev/zero of=/swap bs=1M count=1024 sudo mkswap /swap sudo swapon /swap See also https://wiki.archlinux.org/index.php/Swap for more information about the swap file on Linux. If you cannot activate a swap file (e.g. because you're on OpenVZ, or if you don't have root privileges) then you should install Phusion Passenger through DEB/RPM packages. For more information, please refer to the manual, section "Installation": <%= @doc_path %> <%= @doc_url %> Press Ctrl-C to abort this installer (recommended). Press Enter if you want to continue with installation anyway. passenger-4.0.37/resources/templates/installer_common/run_installer_as_root.txt.erb000644 000765 000024 00000001050 12233035540 031504 0ustar00honglistaff000000 000000 Permission problems <% if @desc %> This installer must be able to <%= @access || "write to" %> <%= @desc %>. <% else %> This installer must be able to <%= @access || "write to" %> the following directory: <%= @dir %> <% end -%> But it can't do that, because you're running the installer as <%= `whoami`.strip %>. Please give this installer root privileges, by re-running it with <%= @sudo %>: export ORIG_PATH="$PATH" <%= @sudo_s_e %> export PATH="$ORIG_PATH" <%= @ruby %> <%= @installer %>passenger-4.0.37/resources/templates/installer_common/world_inaccessible_directories.txt.erb000644 000765 000024 00000001227 12233035540 033332 0ustar00honglistaff000000 000000 Warning: some directories may be inaccessible by the web server! The web server typically runs under a separate user account for security reasons. That user must be able to access the <%= PROGRAM_NAME %> files. However, it appears that some directories have too strict permissions. This may prevent the web server user from accessing <%= PROGRAM_NAME %> files. It is recommended that you relax permissions as follows: <% for dir in @directories -%> sudo chmod o+x "<%= dir %>" <% end %> Press Ctrl-C to return to the shell. (Recommended) After relaxing permissions, re-run this installer. -OR- Press Enter to continue anyway.passenger-4.0.37/resources/templates/apache2/apache_install_broken.txt.erb000644 000765 000024 00000001344 12233035540 027350 0ustar00honglistaff000000 000000 Your Apache installation might be broken You are about to install <%= PhusionPassenger::PROGRAM_NAME %> against the following Apache installation: apxs2: <%= @apxs2 %> However, this Apache installation appears to be broken, so this installer cannot continue. To find out why this installer thinks the above Apache installation is broken, run: export ORIG_PATH="$PATH" <%= @sudo_s_e %> export PATH="$ORIG_PATH" <%= @ruby %> <%= @passenger_config %> --detect-apache2 It is also possible that your system has multiple Apache installations, and that you are simply compiling <%= PROGRAM_NAME %> against the wrong Apache install. If this is the case, then the above command will also advise you about what to do.passenger-4.0.37/resources/templates/apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb000644 000765 000024 00000001043 12233035540 033753 0ustar00honglistaff000000 000000 WARNING: Apache doesn't seem to be compiled with the 'prefork', 'worker' or 'event' MPM Phusion Passenger has only been tested on Apache with the 'prefork', the 'worker' and the 'event' MPM. Your Apache installation is compiled with the '<%= @current_mpm %>' MPM. We recommend you to abort this installer and to recompile Apache with either the 'prefork', the 'worker' or the 'event' MPM. Press Ctrl-C to abort this installer (recommended). Press Enter if you want to continue with installation anyway. passenger-4.0.37/resources/templates/apache2/config_snippets.txt.erb000644 000765 000024 00000000474 12233035540 026236 0ustar00honglistaff000000 000000 Almost there! Please edit your Apache configuration file, and add these lines: <%= @snippet.split("\n").join("\n ") %> After you restart Apache, you are ready to deploy any number of web applications on Apache, with a minimum amount of configuration! Press ENTER to continue. passenger-4.0.37/resources/templates/apache2/deployment_example.txt.erb000644 000765 000024 00000001761 12233035540 026737 0ustar00honglistaff000000 000000 Deploying a web application: an example Suppose you have a web application in /somewhere. Add a virtual host to your Apache configuration file and set its DocumentRoot to /somewhere/public: ServerName www.yourhost.com # !!! Be sure to point DocumentRoot to 'public'! DocumentRoot /somewhere/public # This relaxes Apache security settings. AllowOverride all # MultiViews must be turned off. Options -MultiViews And that's it! You may also want to check the Users Guide for security and optimization tips, troubleshooting and other useful information: <%= @users_guide_path %> <%= @users_guide_url %> Enjoy Phusion Passenger, a product of Phusion (<%= @phusion_website %>) :-) <%= @passenger_website %> Phusion Passenger is a trademark of Hongli Lai & Ninh Bui. passenger-4.0.37/resources/templates/apache2/installing_against_a_different_apache.txt.erb000644 000765 000024 00000000755 12233035540 032547 0ustar00honglistaff000000 000000 <% @other_installs.each do |result| %> * To compile against Apache <%= result.version %> (<%= result.apxs2 %>): Re-run this installer with: --apxs2-path "<%= result.apxs2 %>" <% end %> You may also want to read the "Installation" section of the manual for installation troubleshooting: <%= PhusionPassenger.apache2_doc_path %> <%= APACHE2_DOC_URL %> If you keep having problems installing, please visit the following website for support: <%= SUPPORT_URL %>passenger-4.0.37/resources/templates/apache2/multiple_apache_installations_detected.txt.erb000644 000765 000024 00000001021 12233035540 032772 0ustar00honglistaff000000 000000 Multiple Apache installations detected! You are about to install <%= PhusionPassenger::PROGRAM_NAME %> against the following Apache installation: Apache <%= @current.version %> apxs2 : <%= @current.apxs2 %> Executable: <%= @current.httpd %> However, <%= @other_installs.size %> other Apache installation(s) have been found on your system: <% @other_installs.each do |result| %> * Apache <%= result.version %> apxs2 : <%= result.apxs2 %> Executable: <%= result.httpd %> <% end %>passenger-4.0.37/resources/templates/apache2/notify_apache_module_installed.txt.erb000644 000765 000024 00000000210 12233035540 031245 0ustar00honglistaff000000 000000 The <%= PROGRAM_NAME %> Apache module is correctly installed :-) Press Enter to learn how to deploy a web app on Apache.resources/templates/apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb000644 000765 000024 00000000442 12233035540 037471 0ustar00honglistaff000000 000000 passenger-4.0.37It looks like something went wrong Please read our Users guide for troubleshooting tips: <%= @users_guide_path %> <%= @users_guide_url %> If that doesn't help, please use our support facilities. We'll do our best to help you. <%= @support_url %>passenger-4.0.37/resources/templates/apache2/present_choice_for_no_update_config.txt.erb000644 000765 000024 00000000546 12233035540 032267 0ustar00honglistaff000000 000000 (Tip: you can also re-run this installer with --no-update-config, to prevent it from automatically updating your Apache configuration files. This way, the installer will not need as many privileges. The installer will then tell you how you must update the config files. You will then have to edit the config files manually.)passenger-4.0.37/resources/templates/apache2/welcome.txt.erb000644 000765 000024 00000001130 12233035540 024465 0ustar00honglistaff000000 000000 Welcome to the Phusion Passenger Apache 2 module installer, v<%= @version %>. This installer will guide you through the entire installation process. It shouldn't take more than 3 minutes in total. Here's what you can expect from the installation process: 1. The Apache 2 module will be installed for you. 2. You'll learn how to configure Apache. 3. You'll learn how to deploy a Ruby on Rails application. Don't worry if anything goes wrong. This installer will advise you on how to solve any problems. Press Enter to continue, or Ctrl-C to abort. passenger-4.0.37/resources/standalone_default_root/index.html000644 000765 000024 00000000060 12233035540 025116 0ustar00honglistaff000000 000000 There's no website configured on this host name.passenger-4.0.37/node_lib/phusion_passenger/000755 000765 000024 00000000000 12233035540 021523 5ustar00honglistaff000000 000000 passenger-4.0.37/node_lib/phusion_passenger/httplib_emulation.js000644 000765 000024 00000014435 12233035540 025613 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2013-2014 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /** * Provides helper functions for emulating the http.Server API. */ var http = require('http'); const HTTP_HEADERS_WITHOUT_PREFIX = { 'CONTENT_LENGTH': true, 'CONTENT_TYPE': true }; function cgiKeyToHttpHeader(key) { if (HTTP_HEADERS_WITHOUT_PREFIX[key]) { return key.toLowerCase().replace(/_/g, '-'); } else if (key.match(/^HTTP_/)) { return key.replace(/^HTTP_/, '').toLowerCase().replace(/_/g, '-'); } else { return undefined; } } function setHttpHeaders(httpHeaders, cgiHeaders) { for (var i = 0; i < cgiHeaders.keys.length; i++) { var key = cgiHeaders.keys[i]; var httpHeader = cgiKeyToHttpHeader(key); if (httpHeader !== undefined) { httpHeaders[httpHeader] = cgiHeaders[key]; } } if (cgiHeaders['HTTPS']) { httpHeaders['x-forwarded-proto'] = 'https'; } if (!httpHeaders['x-forwarded-for']) { httpHeaders['x-forwarded-for'] = cgiHeaders['REMOTE_ADDR']; } } function inferHttpVersion(protocolDescription) { var match = protocolDescription.match(/^HTTP\/(.+)/); if (match) { return match[1]; } } function createIncomingMessage(headers, socket, bodyBegin) { /* Node's HTTP parser simulates an 'end' event if it determines that * the request should not have a request body. Currently (Node 0.10.18), * it thinks GET requests without an Upgrade header should not have a * request body, even though technically such GET requests are allowed * to have a request body. For compatibility reasons we implement the * same behavior as Node's HTTP parser. */ var message = new http.IncomingMessage(socket); setHttpHeaders(message.headers, headers); message.cgiHeaders = headers; message.httpVersion = inferHttpVersion(headers['SERVER_PROTOCOL']); message.method = headers['REQUEST_METHOD']; message.url = headers['REQUEST_URI']; message.connection.remoteAddress = headers['REMOTE_ADDR']; message.connection.remotePort = parseInt(headers['REMOTE_PORT']); message.upgrade = !!headers['HTTP_UPGRADE']; if (message.upgrade) { // Emit end event as described above. message.push(null); return message; } message._emitEndEvent = IncomingMessage_emitEndEvent; resetIncomingMessageOverridedMethods(message); socket.on('end', function() { message._emitEndEvent(); }); socket.on('drain', function() { message.emit('drain'); }); socket.on('timeout', function() { message.emit('timeout'); }); if (headers['REQUEST_METHOD'] != 'GET') { if (bodyBegin.length > 0) { message.push(bodyBegin); } socket.ondata = function(buffer, offset, end) { if (!message.push(buffer.slice(offset, end))) { socket._handle.readStop(); } } } else { // Emit end event as described above. message.push(null); } return message; } function IncomingMessage_pause() { this._flowing = false; this._orig_pause(); resetIncomingMessageOverridedMethods(this); } function IncomingMessage_resume() { this._flowing = true; this._orig_resume(); resetIncomingMessageOverridedMethods(this); } function IncomingMessage_on(event, listener) { if (event == 'data') { this._flowing = true; installDataEventHandler(this); } else if (event == 'readable') { installReadableEventHandler(this); } this._orig_on.call(this, event, listener); resetIncomingMessageOverridedMethods(this); return this; } function IncomingMessage_emitEndEvent() { if (!this._readableState.endEmitted) { this._readableState.endEmitted = true; this.emit('end'); } } /* * Calling on(), pause() etc on the message object may cause our overrided * methods to be set to something else. This is probably becaused by the code * in Node.js responsible for switching a stream to flowing mode, e.g. * emitDataEvents() in _stream_readable.js. Thus, this function * should be called from on(), pause() etc. */ function resetIncomingMessageOverridedMethods(message) { if (message.pause !== IncomingMessage_pause) { message._orig_pause = message.pause; message.pause = IncomingMessage_pause; } if (message.resume !== IncomingMessage_resume) { message._orig_resume = message.resume; message.resume = IncomingMessage_resume; } if (message.on !== IncomingMessage_on) { message._orig_on = message.on; message.on = IncomingMessage_on; message.addListener = IncomingMessage_on; } } function installDataEventHandler(message) { if (!message._dataEventHandlerInstalled) { message._dataEventHandlerInstalled = true; message.socket.on('data', function(chunk) { message.emit('data', chunk); }); } } function installReadableEventHandler(message) { if (!message._readableEventHandlerInstalled) { message._readableEventHandlerInstalled = true; message.socket.on('readable', function() { message.emit('readable'); }); } } function createServerResponse(req) { var res = new http.ServerResponse(req); res.assignSocket(req.socket); res.shouldKeepAlive = false; req.socket.on('drain', function() { res.emit('drain'); }); req.socket.on('timeout', function() { res.emit('timeout'); }); res.once('finish', function() { req.socket.destroySoon(); }); return res; } exports.createIncomingMessage = createIncomingMessage; exports.createServerResponse = createServerResponse; passenger-4.0.37/node_lib/phusion_passenger/line_reader.js000644 000765 000024 00000007374 12233035540 024345 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2012-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /** * Class for reading a stream line-by-line. * Usage: * * reader = new LineReader(stream); * reader.readLine(function(line) { * ... * // When done: * reader.close(); * }); */ function LineReader(stream) { var self = this; this.stream = stream; this.buffer = ''; this.lines = []; this.callbacks = []; this.paused = false; function handleLineBuffer() { if (self.lineBufferIsFull()) { stream.pause(); self.paused = true; } while (self.buffer != undefined && self.lines.length > 0 && self.callbacks.length > 0) { line = self.lines.shift(); callback = self.callbacks.shift(); callback(line); } self._autoPauseOrResume(); } function onData(data) { var index, line, callback; if (self.buffer == undefined) { // Already closed. return; } self.buffer += data; while ((index = self.buffer.indexOf("\n")) != -1) { line = self.buffer.substr(0, index + 1); self.buffer = self.buffer.substr(index + 1); self.lines.push(line); } handleLineBuffer(); } function onEnd() { if (self.buffer != undefined) { self.lines.push(self.buffer); self.buffer = ''; self.eof = true; handleLineBuffer(); } } this.onData = onData; this.onEnd = onEnd; stream.on('data', onData); stream.on('end', onEnd); stream.resume(); } LineReader.prototype.close = function() { this.stream.removeListener('data', this.onData); this.stream.removeListener('end', this.onEnd); this._pause(); this.buffer = undefined; this.lines = undefined; } LineReader.prototype.isClosed = function() { return this.buffer === undefined; } LineReader.prototype.endReached = function() { return this.eof; } LineReader.prototype.lineBufferIsFull = function() { return this.lines.length > 0; } LineReader.prototype.readLine = function(callback) { if (this.lines.length > 0) { var line = this.lines.shift(); if (!this.lineBufferIsFull() && this.paused) { this.paused = false; this.stream.resume(); } callback(line); this._autoPauseOrResume(); } else if (this.eof) { callback(undefined); } else { this.callbacks.push(callback); } } LineReader.prototype._autoPauseOrResume = function() { if (this.buffer != undefined) { if (this.lineBufferIsFull() || this.eof) { this._pause(); } else { this._resume(); } } } LineReader.prototype._pause = function() { if (!this.paused) { this.paused = true; this.stream.pause(); } } LineReader.prototype._resume = function() { if (this.paused) { this.paused = false; this.stream.resume(); } } exports.LineReader = LineReader; passenger-4.0.37/node_lib/phusion_passenger/request_handler.js000644 000765 000024 00000005157 12233035540 025256 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2012-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var net = require('net'); var SessionProtocolParser = require('./session_protocol_parser').SessionProtocolParser; /** * Handles incoming Phusion Passenger requests and emits events. */ function RequestHandler(readyCallback, clientCallback) { var self = this; function handleNewClient(socket) { var state = 'PARSING_HEADER'; var parser = new SessionProtocolParser(); function handleReadable() { // read(n) returns null unless the buffer is at least n bytes. // We just want to read whatever we can we poke into its buffer. // Hope they don't change the this. var len = socket._readableState.length; handleData(socket.read(len)); } function handleData(data) { if (state == 'PARSING_HEADER') { var consumed = parser.feed(data); if (parser.state == SessionProtocolParser.SPP_DONE) { state = 'HEADER_SEEN'; socket.removeListener('readable', handleReadable); PhusionPassenger.emit('request', parser, socket, data.slice(consumed)); } else if (parser.state == SessionProtocolParser.SPP_ERROR) { console.error('Header parse error'); socket.destroySoon(); } } else { // Do nothing. } } socket.on('readable', handleReadable); } var server = net.createServer({ allowHalfOpen: true }, handleNewClient); this.server = server; server.listen(0, function() { readyCallback(self); }); } exports.RequestHandler = RequestHandler; passenger-4.0.37/node_lib/phusion_passenger/session_protocol_parser.js000644 000765 000024 00000006670 12233035540 027052 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2012-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ const SPP_PARSING_SIZE = SessionProtocolParser.SPP_PARSING_SIZE = 0; const SPP_PARSING_HEADERS = SessionProtocolParser.SPP_PARSING_HEADERS = 1; const SPP_DONE = SessionProtocolParser.SPP_DONE = 10; const SPP_ERROR = SessionProtocolParser.SPP_ERROR = 11; const ENCODING = 'binary'; function SessionProtocolParser() { this.state = SPP_PARSING_SIZE; this.processed = 0; this.size = 0; this.keys = []; } SessionProtocolParser.prototype.feed = function(buffer) { var consumed = 0; var locallyConsumed; while (consumed < buffer.length && this.state != SPP_ERROR && this.state != SPP_DONE) { switch (this.state) { case SPP_PARSING_SIZE: this.size += buffer[consumed] * Math.pow(256, 3 - this.processed); locallyConsumed = 1; this.processed++; if (this.processed == 4) { this.state = SPP_PARSING_HEADERS; this.buffer = new Buffer(this.size); this.processed = 0; } break; case SPP_PARSING_HEADERS: locallyConsumed = Math.min(buffer.length - consumed, this.buffer.length - this.processed); buffer.copy(this.buffer, this.processed, consumed, consumed + locallyConsumed); this.processed += locallyConsumed; if (this.processed == this.buffer.length) { this.state = SPP_DONE; this.parse(); } break; default: console.assert(false); break; } consumed += locallyConsumed; } return consumed; } SessionProtocolParser.prototype.parse = function() { function findZero(buffer, start) { while (start < buffer.length) { if (buffer[start] == 0) { return start; } else { start++; } } return -1; } var start = 0; var key, value; while (start < this.buffer.length) { var keyEnd = findZero(this.buffer, start); if (keyEnd != -1 && keyEnd + 1 < this.buffer.length) { var valueStart = keyEnd + 1; var valueEnd = findZero(this.buffer, valueStart); if (valueEnd != -1) { key = this.buffer.toString(ENCODING, start, keyEnd); value = this.buffer.toString(ENCODING, valueStart, valueEnd); start = valueEnd + 1; this.keys.push(key); this[key] = value; } else { start = this.buffer.length; } } else { start = this.buffer.length; } } } exports.SessionProtocolParser = SessionProtocolParser; passenger-4.0.37/man/passenger-config.1000644 000765 000024 00000001741 12233035540 020306 0ustar00honglistaff000000 000000 .TH "passenger-config" "1" "2.0" "Phusion Passenger" "User Commands" .SH "NAME" .LP passenger\-config \- Show configuration settings for Phusion Passenger .SH "SYNOPSIS" .LP \fBpassenger\-config\fR \fI\-\-root\fR | \fI\-\-version\fR .SH "DESCRIPTION" .LP \fBpassenger\-config\fR shows the current configuration settings for Phusion Passenger. You need to select one of the following options. .SH "OPTIONS" .TP \fB\-\-root\fR Shows the Phusion Passenger root directory .TP \fB\-\-version\fR Shows the current Phusion Passenger version number .SH "SEE ALSO" .LP passenger\-memory\-stats(1), passenger\-stress\-test(1), passenger\-status(8) .LP User guide at http://www.modrails.com/documentation.html .SH "AUTHOR" .LP Phusion Passenger is written by Phusion (http://www.phusion.nl) .LP "Phusion" and "Phusion Passenger" are trademarks of Hongli Lai & Ninh Bui. .LP This manual page was written by Neil Wilson for the Ubuntu project (but may be used by others). passenger-4.0.37/man/passenger-memory-stats.8000644 000765 000024 00000003264 12233035540 021516 0ustar00honglistaff000000 000000 .TH "passenger-memory-stats" "8" "2.0" "Phusion Passenger" "Administration Commands" .SH "NAME" .LP passenger\-memory\-stats \- reports a snapshot of the Apache and Phusion Passenger memory statistcs .SH "SYNOPSIS" .LP \fBpassenger\-memory\-stats\fR .SH "DESCRIPTION" .LP \fBpassenger\-memory\-stats\fR allows you to easily analyze the real memory usage of Phusion Passenger and Apache. .LP Process inspection tools such as \fIps\fR and \fItop\fR are useful, but they rarely show the correct memory usage. The real memory usage is usually lower than what \fIps\fR and \fItop\fR report. .LP There are many technical reasons why this is so, but an explanation is beyond the scope of this page. We refer the interested reader to operating systems literature about virtual memory and copy\-on\-write. .LP When you run this tool the \fIPrivate\fR or \fIprivate dirty RSS\fR field shows the real memory usage of processes. .SH "ENVIRONMENT VARIABLES" .LP .TP \fBHTTPD\fR The full filename to the Apache executable. By default, Passenger will attempt to autodetect the Apache executable. If autodetection fails for whatever reason, then Apache processes will not be shown in the memory statistics. In that case, you may manually specify the location to the Apache executable using this environment variable. .SH "SEE ALSO" .LP passenger\-status(8), ps(1), top(1), .LP User guide at http://www.modrails.com/documentation.html .SH "AUTHOR" .LP Phusion Passenger is written by Phusion (http://www.phusion.nl) .LP "Phusion" and "Phusion Passenger" are trademarks of Hongli Lai & Ninh Bui. .LP This manual page was written by Neil Wilson for the Ubuntu project (but may be used by others). passenger-4.0.37/man/passenger-status.8000644 000765 000024 00000004113 12233035540 020367 0ustar00honglistaff000000 000000 .TH "passenger-status" "8" "2.0" "Phusion Passenger" "Adminstration Commands" .SH "NAME" .LP passenger\-status \- inspect Phusion Passenger's internal status .SH "SYNOPSIS" .LP \fBpassenger\-status\fR [\fIpid\fR] .SH "DESCRIPTION" .LP \fBpassenger\-status\fR looks at the current status of a Phusion Passenger installation. It will locate Phusion Passenger automatically if it is running and will give you a list of instances if there is more than one Phusion Passenger instance running. You can then select the instance by specifying the relevant PID on the command line. .LP The \fIgeneral information\fR section shows the following details: .TP max The maximum number of application instances that Phusion Passenger will spawn. This equals the value given for \fIPassengerMaxPoolSize\fR in the configuration. .TP count The number of application instances that are currently alive. This value is always less than or equal to \fImax\fR. .TP active The number of application instances that are currently processing requests. This value is always less than or equal to \fIcount\fR. .TP inactive The number of application instances that are currently not processing requests, i.e. are idle. Idle application instances will be shutdown after a while, as can be specified with \fIPassengerPoolIdleTime\fR in the configuration. The value of \fIinactive\fR equals \fIcount\fR \- \fIactive\fR. .LP The \fIapplications\fR section shows each application instance, which directory it belongs to. The \fIsessions\fR field shows how many HTTP client are currently being processed by that application instance. .SH "OPTIONS" .LP .TP \fBpid\fR The process ID of the Phusion Passenger instance you want to look at .SH "SEE ALSO" .LP passenger\-memory\-stats(8), ps(1), top(1) .LP User guide at http://www.modrails.com/documentation.html .SH "AUTHOR" .LP Phusion Passenger is written by Phusion (http://www.phusion.nl) .LP "Phusion" and "Phusion Passenger" are trademarks of Hongli Lai & Ninh Bui. .LP This manual page was written by Neil Wilson for the Ubuntu project (but may be used by others). passenger-4.0.37/man/passenger-stress-test.1000644 000765 000024 00000002634 12233035540 021343 0ustar00honglistaff000000 000000 .TH "passenger-stress-test" "1" "2.0" "Phusion Passenger" "User Commands" .SH "NAME" .LP passenger\-stress\-test \- stress tests a Phusion Passenger powered website. .SH "SYNOPSIS" .LP \fBpassenger\-stress\-test\fR <\fIhostname\fR> <\fIapp_roo\fRt> [\fIoptions\fR] .SH "DESCRIPTION" .LP Stress test the given (Phusion Passenger\-powered) website by .LP \- crawling it with multiple concurrently running crawlers. .LP \- gracefully restarting Apache at random times .LP \- restarting the target (Phusion Passenger\-powered) application at random times .SH "OPTIONS" .LP .TP \fB\-c, \-\-concurrency\fR <\fInumber\fR> Number of crawlers to start (default = 20) .TP \fB\-p, \-\-apache\-restart\-interval\fR <\fIinterval\fR> Gracefully restart Apache after <\fIinterval\fR> minutes (default = 1440) .TP \fB\-a, \-\-app\-restart\-interval\fR <\fIinterval\fR> Restart the application after <\fIinterval\fR> minutes (default = 55) .TP \fB\-h, \-\-help\fR Output help information and exit. .SH "SEE ALSO" .LP passenger\-config(1), passenger\-memory\-stats(8), passenger\-status(8) .LP User guide at http://www.modrails.com/documentation.html .SH "AUTHOR" .LP Phusion Passenger is written by Phusion (http://www.phusion.nl) .LP "Phusion" and "Phusion Passenger" are trademarks of Hongli Lai & Ninh Bui. .LP This manual page was written by Neil Wilson for the Ubuntu project (but may be used by others). passenger-4.0.37/lib/phusion_passenger/000755 000765 000024 00000000000 12233035540 020516 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger.rb000644 000765 000024 00000024177 12233035540 021056 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger FILE_LOCATION = File.expand_path(__FILE__) ###### Names and version numbers ###### PACKAGE_NAME = 'passenger' # Run 'rake ext/common/Constants.h' after changing this number. VERSION_STRING = '4.0.37' PREFERRED_NGINX_VERSION = '1.4.4' NGINX_SHA256_CHECKSUM = '7c989a58e5408c9593da0bebcd0e4ffc3d892d1316ba5042ddb0be5b0b4102b9' PREFERRED_PCRE_VERSION = '8.32' PCRE_SHA256_CHECKSUM = 'd5d8634b36baf3d08be442a627001099583b397f456bc795304a013383b6423a' STANDALONE_INTERFACE_VERSION = 1 ###### Directories ###### GLOBAL_NAMESPACE_DIRNAME = "passenger" # Subdirectory under $HOME to use for storing stuff. USER_NAMESPACE_DIRNAME = ".passenger" # The name for the /etc/apache2/mods-available/*.{load,conf} file. APACHE2_MODULE_CONF_NAME = "passenger" # Directories in which to look for plugins. PLUGIN_DIRS = [ "/usr/share/#{GLOBAL_NAMESPACE_DIRNAME}/plugins", "/usr/local/share/#{GLOBAL_NAMESPACE_DIRNAME}/plugins", "~/#{USER_NAMESPACE_DIRNAME}/plugins" ] REQUIRED_LOCATIONS_INI_FIELDS = [ :bin_dir, :agents_dir, :lib_dir, :helper_scripts_dir, :resources_dir, :include_dir, :doc_dir, :ruby_libdir, :node_libdir, :apache2_module_path, :ruby_extension_source_dir, :nginx_module_source_dir ].freeze OPTIONAL_LOCATIONS_INI_FIELDS = [ # Directory in which downloaded Phusion Passenger binaries are stored. # Only available when originally packaged. :download_cache_dir, # Directory which contains the main Phusion Passenger Rakefile. Only # available when originally packaged, :build_system_dir, # Directory in which the build system's output is stored, e.g. # the compiled agent executables. Only available when originally # packaged. :buildout_dir, # Directory in which we can run 'rake apache2'. Used by # passenger-install-apache2-module. Rake will save the Apache module # to `apache2_module_path`. :apache2_module_source_dir ].freeze # The subset of the optional fields which are only available when # originally packaged. ORIGINALLY_PACKAGED_LOCATIONS_INI_FIELDS = [ :download_cache_dir, :build_system_dir, :buildout_dir ].freeze # Follows the logic of ext/common/ResourceLocator.h, so don't forget to modify that too. def self.locate_directories(source_root_or_location_configuration_file = nil) source_root_or_location_configuration_file ||= find_location_configuration_file root_or_file = @source_root = source_root_or_location_configuration_file if root_or_file && File.file?(root_or_file) filename = root_or_file options = parse_ini_file(filename) @natively_packaged = get_bool_option(filename, options, 'natively_packaged') REQUIRED_LOCATIONS_INI_FIELDS.each do |field| instance_variable_set("@#{field}", get_option(filename, options, field.to_s).freeze) end OPTIONAL_LOCATIONS_INI_FIELDS.each do |field| instance_variable_set("@#{field}", get_option(filename, options, field.to_s, false).freeze) end if natively_packaged? @native_packaging_method = get_option(filename, options, 'native_packaging_method') ORIGINALLY_PACKAGED_LOCATIONS_INI_FIELDS.each do |field| instance_variable_set("@#{field}", nil) end end else @source_root = File.dirname(File.dirname(FILE_LOCATION)) @natively_packaged = false @bin_dir = "#{@source_root}/bin".freeze @agents_dir = "#{@source_root}/buildout/agents".freeze @lib_dir = "#{@source_root}/buildout".freeze @helper_scripts_dir = "#{@source_root}/helper-scripts".freeze @resources_dir = "#{@source_root}/resources".freeze @include_dir = "#{@source_root}/ext".freeze @doc_dir = "#{@source_root}/doc".freeze @ruby_libdir = File.dirname(FILE_LOCATION).freeze @node_libdir = "#{@source_root}/node_lib".freeze @apache2_module_path = "#{@source_root}/buildout/apache2/mod_passenger.so".freeze @ruby_extension_source_dir = "#{@source_root}/ext/ruby".freeze @nginx_module_source_dir = "#{@source_root}/ext/nginx".freeze @download_cache_dir = "#{@source_root}/download_cache".freeze @build_system_dir = @source_root.dup.freeze @buildout_dir = "#{@source_root}/buildout".freeze @apache2_module_source_dir = @source_root.dup.freeze REQUIRED_LOCATIONS_INI_FIELDS.each do |field| if instance_variable_get("@#{field}").nil? raise "BUG: @#{field} not set" end end end end # Returns whether this Phusion Passenger installation is in the 'originally packaged' # configuration (as opposed to the 'natively packaged' configuration. def self.originally_packaged? return !@natively_packaged end def self.natively_packaged? return @natively_packaged end # If Phusion Passenger is natively packaged, returns which packaging # method was used. Can be 'deb', 'rpm' or 'homebrew'. def self.native_packaging_method return @native_packaging_method end # Whether the current Phusion Passenger installation is installed # from a release package, e.g. an official gem or official tarball. # Retruns false if e.g. the gem was built by the user, or if this # install is from a git repository. def self.installed_from_release_package? File.exist?("#{resources_dir}/release.txt") end # When originally packaged, returns the source root. # When natively packaged, returns the location of the location configuration file. def self.source_root return @source_root end # Generate getters for the directory types in locations.ini. getters_code = "" (REQUIRED_LOCATIONS_INI_FIELDS + OPTIONAL_LOCATIONS_INI_FIELDS).each do |field| getters_code << %Q{ def self.#{field} return @#{field} end } end eval(getters_code, binding, __FILE__, __LINE__) def self.index_doc_path return "#{doc_dir}/#{INDEX_DOC_NAME}" end def self.apache2_doc_path return "#{doc_dir}/#{APACHE2_DOC_NAME}" end def self.nginx_doc_path return "#{doc_dir}/#{NGINX_DOC_NAME}" end def self.standalone_doc_path return "#{doc_dir}/#{STANDALONE_DOC_NAME}" end ###### Other resource locations ###### INDEX_DOC_NAME = "Users guide.html" APACHE2_DOC_NAME = "Users guide Apache.html" NGINX_DOC_NAME = "Users guide Nginx.html" STANDALONE_DOC_NAME = "Users guide Standalone.html" def self.binaries_sites return [ { :url => "https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release", :cacert => "#{resources_dir}/oss-binaries.phusionpassenger.com.crt" }, { :url => "https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release" } ] end # Instead of calling `require 'phusion_passenger/foo'`, you should call # `PhusionPassenger.require_passenger_lib 'foo'`. This is because when Phusion # Passenger is natively packaged, it may still be run with arbitrary Ruby # interpreters. Adding ruby_libdir to $LOAD_PATH is then dangerous because ruby_libdir # may be the distribution's Ruby's vendor_ruby directory, which may be incompatible # with the active Ruby interpreter. This method looks up the exact filename directly. # # Using this method also has two more advantages: # # 1. It is immune to Bundler's load path mangling code. # 2. It is faster than plan require() because it doesn't need to # scan the entire load path. def self.require_passenger_lib(name) require("#{ruby_libdir}/phusion_passenger/#{name}") end private def self.find_location_configuration_file filename = ENV['PASSENGER_LOCATION_CONFIGURATION_FILE'] return filename if filename && !filename.empty? filename = File.dirname(FILE_LOCATION) + "/phusion_passenger/locations.ini" return filename if filename && File.exist?(filename) require 'etc' if !defined?(Etc) begin home_dir = Etc.getpwuid(Process.uid).dir rescue ArgumentError # Unknown user. home_dir = ENV['HOME'] end if home_dir && !home_dir.empty? filename = "#{home_dir}/#{USER_NAMESPACE_DIRNAME}/locations.ini" return filename if File.exist?(filename) end filename = "/etc/#{GLOBAL_NAMESPACE_DIRNAME}/locations.ini" return filename if File.exist?(filename) return nil end def self.parse_ini_file(filename) options = {} in_locations_section = false File.open(filename, 'r') do |f| while !f.eof? line = f.readline line.strip! next if line.empty? if line =~ /\A\[(.+)\]\Z/ in_locations_section = $1 == 'locations' elsif in_locations_section && line =~ /=/ key, value = line.split(/ *= */, 2) options[key.freeze] = value.freeze end end end return options end def self.get_option(filename, options, key, required = true) value = options[key] if value return value elsif required raise "Option '#{key}' missing in file '#{filename}'" else return nil end end def self.get_bool_option(filename, options, key) value = get_option(filename, options, key) return value == 'yes' || value == 'true' || value == 'on' || value == '1' end end if !defined?(PhusionPassenger::VERSION_STRING) passenger-4.0.37/lib/phusion_passenger/abstract_installer.rb000644 000765 000024 00000025577 12233035540 024743 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'console_text_template' PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/operating_system' PhusionPassenger.require_passenger_lib 'utils/ansi_colors' PhusionPassenger.require_passenger_lib 'utils/download' require 'fileutils' require 'logger' require 'etc' # IMPORTANT: do not directly or indirectly require native_support; we can't compile # it yet until we have a compiler, and installers usually check whether a compiler # is installed. module PhusionPassenger # Abstract base class for text mode installers. Used by # passenger-install-apache2-module and passenger-install-nginx-module. # # Subclasses must at least implement the #run_steps method which handles # the installation itself. # # Usage: # # installer = ConcereteInstallerClass.new(options...) # installer.run class AbstractInstaller PASSENGER_WEBSITE = "https://www.phusionpassenger.com" PHUSION_WEBSITE = "www.phusion.nl" # Create an AbstractInstaller. All options will be stored as instance # variables, for example: # # installer = AbstractInstaller.new(:foo => "bar") # installer.instance_variable_get(:"@foo") # => "bar" def initialize(options = {}) @stdout = STDOUT @stderr = STDERR options.each_pair do |key, value| instance_variable_set(:"@#{key}", value) end end # Start the installation by calling the #install! method. def run before_install run_steps return true rescue Abort puts return false rescue SignalException, SystemExit raise rescue PlatformInfo::RuntimeError => e new_screen puts "An error occurred" puts puts e.message exit 1 rescue Exception => e show_support_options_for_installer_bug(e) exit 2 ensure after_install end protected class Abort < StandardError end class CommandError < Abort end def interactive? return !@auto end def non_interactive? return !interactive? end def before_install if STDOUT.respond_to?(:set_encoding) STDOUT.set_encoding("UTF-8") end STDOUT.write(Utils::AnsiColors::DEFAULT_TERMINAL_COLOR) STDOUT.flush end def after_install STDOUT.write(Utils::AnsiColors::RESET) STDOUT.flush end def users_guide_path return PhusionPassenger.index_doc_path end def users_guide_url return INDEX_DOC_URL end def dependencies return [[], []] end def check_dependencies(show_new_screen = true) new_screen if show_new_screen puts "Checking for required software..." puts PhusionPassenger.require_passenger_lib 'platform_info/depcheck' specs, ids = dependencies runner = PlatformInfo::Depcheck::ConsoleRunner.new specs.each do |spec| PlatformInfo::Depcheck.load(spec) end ids.each do |id| runner.add(id) end if runner.check_all return true else puts puts "Some required software is not installed." puts "But don't worry, this installer will tell you how to install them.\n" puts "Press Enter to continue, or Ctrl-C to abort." if PhusionPassenger.originally_packaged? wait else wait(10) end line puts puts "Installation instructions for required software" puts runner.missing_dependencies.each do |dep| puts " * To install #{dep.name}:" puts " #{dep.install_instructions}" puts end puts "If the aforementioned instructions didn't solve your problem, then please take" puts "a look at the Users Guide:" puts puts " #{users_guide_path}" puts " #{users_guide_url}" return false end end def check_whether_os_is_broken # No known broken OSes at the moment. end def check_gem_install_permission_problems return true if PhusionPassenger.natively_packaged? begin require 'rubygems' rescue LoadError return true end if Process.uid != 0 && PhusionPassenger.build_system_dir =~ /^#{Regexp.escape home_dir}\// && PhusionPassenger.build_system_dir =~ /^#{Regexp.escape Gem.dir}\// && File.stat(PhusionPassenger.build_system_dir).uid == 0 new_screen render_template 'installer_common/gem_install_permission_problems' return false else return true end end def check_directory_accessible_by_web_server return true if PhusionPassenger.natively_packaged? inaccessible_directories = [] list_parent_directories(PhusionPassenger.build_system_dir).each do |path| if !world_executable?(path) inaccessible_directories << path end end if !inaccessible_directories.empty? new_screen render_template 'installer_common/world_inaccessible_directories', :directories => inaccessible_directories wait end end def check_whether_system_has_enough_ram(required = 1024) begin meminfo = File.read("/proc/meminfo") if meminfo =~ /^MemTotal: *(\d+) kB$/ ram_mb = $1.to_i / 1024 if meminfo =~ /^SwapTotal: *(\d+) kB$/ swap_mb = $1.to_i / 1024 else swap_mb = 0 end end rescue Errno::ENOENT, Errno::EACCES # Don't do anything on systems without memory information. ram_mb = nil swap_mb = nil end if ram_mb && swap_mb && ram_mb + swap_mb < required new_screen render_template 'installer_common/low_amount_of_memory_warning', :required => required, :current => ram_mb + swap_mb, :ram => ram_mb, :swap => swap_mb, :doc_path => users_guide_path, :doc_url => users_guide_url wait end end def show_support_options_for_installer_bug(e) # We do not use template rendering here. Since we've determined that there's # a bug, *anything* may be broken, so we use the safest codepath to ensure that # the user sees the proper messages. begin line @stderr.puts "*** EXCEPTION: #{e} (#{e.class})\n " + e.backtrace.join("\n ") new_screen puts 'Oops, something went wrong :-(' puts puts "We're sorry, but it looks like this installer ran into an unexpected problem.\n" + "Please visit the following website for support. We'll do our best to help you.\n\n" + " #{SUPPORT_URL}\n\n" + "When submitting a support inquiry, please copy and paste the entire installer\n" + "output." rescue Exception => e2 # Raise original exception so that it doesn't get lost. raise e end end def use_stderr old_stdout = @stdout begin @stdout = @stderr yield ensure @stdout = old_stdout end end def print(text) @stdout.write(Utils::AnsiColors.ansi_colorize(text)) @stdout.flush end def puts(text = nil) if text @stdout.puts(Utils::AnsiColors.ansi_colorize(text.to_s)) else @stdout.puts end @stdout.flush end def puts_error(text) @stderr.puts(Utils::AnsiColors.ansi_colorize("#{text}")) @stderr.flush end def render_template(name, options = {}) puts ConsoleTextTemplate.new({ :file => name }, options).result end def new_screen puts line puts end def line puts "--------------------------------------------" end def prompt(message, default_value = nil) done = false while !done print "#{message}: " if non_interactive? && default_value puts default_value return default_value end begin result = STDIN.readline rescue EOFError exit 2 end result.strip! if result.empty? if default_value result = default_value done = true else done = !block_given? || yield(result) end else done = !block_given? || yield(result) end end return result rescue Interrupt raise Abort end def prompt_confirmation(message) result = prompt("#{message} [y/n]") do |value| if value.downcase == 'y' || value.downcase == 'n' true else puts_error "Invalid input '#{value}'; please enter either 'y' or 'n'." false end end return result.downcase == 'y' rescue Interrupt raise Abort end def wait(timeout = nil) if interactive? if timeout require 'timeout' unless defined?(Timeout) begin Timeout.timeout(timeout) do STDIN.readline end rescue Timeout::Error # Do nothing. end else STDIN.readline end end rescue Interrupt raise Abort end def home_dir Etc.getpwuid(Process.uid).dir end def sh(*args) puts "# #{args.join(' ')}" result = system(*args) if result return true elsif $?.signaled? && $?.termsig == Signal.list["INT"] raise Interrupt else return false end end def sh!(*args) if !sh(*args) puts_error "*** Command failed: #{args.join(' ')}" raise CommandError end end def rake(*args) PhusionPassenger.require_passenger_lib 'platform_info/ruby' if !PlatformInfo.rake_command puts_error 'Cannot find Rake.' raise Abort end sh("#{PlatformInfo.rake_command} #{args.join(' ')}") end def rake!(*args) PhusionPassenger.require_passenger_lib 'platform_info/ruby' if !PlatformInfo.rake_command puts_error 'Cannot find Rake.' raise Abort end sh!("#{PlatformInfo.rake_command} #{args.join(' ')}") end def download(url, output, options = {}) options[:logger] ||= begin logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.formatter = proc { |severity, datetime, progname, msg| "*** #{msg}\n" } logger end return PhusionPassenger::Utils::Download.download(url, output, options) end def list_parent_directories(dir) dirs = [] components = File.expand_path(dir).split(File::SEPARATOR) components.shift # Remove leading / components.size.times do |i| dirs << File::SEPARATOR + components[0 .. i].join(File::SEPARATOR) end return dirs.reverse end def world_executable?(dir) begin stat = File.stat(dir) rescue Errno::EACCESS return false end return stat.mode & 0000001 != 0 end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/active_support3_extensions/000755 000765 000024 00000000000 12233035540 026127 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger/admin_tools/000755 000765 000024 00000000000 12233035540 023026 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger/admin_tools.rb000644 000765 000024 00000003216 12233035540 023355 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger module AdminTools def self.tmpdir ["PASSENGER_TEMP_DIR", "PASSENGER_TMPDIR"].each do |name| if ENV.has_key?(name) && !ENV[name].empty? return ENV[name] end end return "/tmp" end def self.process_is_alive?(pid) begin Process.kill(0, pid) return true rescue Errno::ESRCH return false rescue SystemCallError => e return true end end end # module AdminTools end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/analytics_logger.rb000644 000765 000024 00000031605 12233035540 024376 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'thread' PhusionPassenger.require_passenger_lib 'utils' PhusionPassenger.require_passenger_lib 'utils/native_support_utils' PhusionPassenger.require_passenger_lib 'debug_logging' PhusionPassenger.require_passenger_lib 'message_channel' module PhusionPassenger class AnalyticsLogger RETRY_SLEEP = 0.2 NETWORK_ERRORS = [Errno::EPIPE, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::EHOSTUNREACH, Errno::ENETDOWN, Errno::ENETUNREACH, Errno::ETIMEDOUT] include Utils class Log attr_reader :txn_id def initialize(connection = nil, txn_id = nil) if connection @connection = connection @txn_id = txn_id connection.ref end end def null? return !@connection || !@connection.connected? end def message(text) if !@connection timestamp_string = AnalyticsLogger.timestamp_string DebugLogging.trace(3, "[Union Station log to null] #{@txn_id} #{timestamp_string} #{text}") return end @connection.synchronize do return if !@connection.connected? begin timestamp_string = AnalyticsLogger.timestamp_string DebugLogging.trace(3, "[Union Station log] #{@txn_id} #{timestamp_string} #{text}") @connection.channel.write("log", @txn_id, timestamp_string) @connection.channel.write_scalar(text) rescue SystemCallError, IOError => e @connection.disconnect DebugLogging.warn("Error communicating with the logging agent: #{e.message}") rescue Exception => e @connection.disconnect raise e end end end def begin_measure(name, extra_info = nil) if extra_info extra_info_base64 = [extra_info].pack("m") extra_info_base64.gsub!("\n", "") extra_info_base64.strip! else extra_info_base64 = nil end times = Utils::NativeSupportUtils.process_times message "BEGIN: #{name} (#{current_timestamp.to_s(36)},#{times.utime.to_s(36)},#{times.stime.to_s(36)}) #{extra_info_base64}" end def end_measure(name, error_encountered = false) times = Utils::NativeSupportUtils.process_times if error_encountered message "FAIL: #{name} (#{current_timestamp.to_s(36)},#{times.utime.to_s(36)},#{times.stime.to_s(36)})" else message "END: #{name} (#{current_timestamp.to_s(36)},#{times.utime.to_s(36)},#{times.stime.to_s(36)})" end end def measure(name, extra_info = nil) begin_measure(name, extra_info) begin yield rescue Exception error = true is_closed = closed? raise ensure end_measure(name, error) if !is_closed end end def measured_time_points(name, begin_time, end_time, extra_info = nil) if extra_info extra_info_base64 = [extra_info].pack("m") extra_info_base64.gsub!("\n", "") extra_info_base64.strip! else extra_info_base64 = nil end begin_timestamp = begin_time.to_i * 1_000_000 + begin_time.usec end_timestamp = end_time.to_i * 1_000_000 + end_time.usec message "BEGIN: #{name} (#{begin_timestamp.to_s(36)}) #{extra_info_base64}" message "END: #{name} (#{end_timestamp.to_s(36)})" end def close(flush_to_disk = false) @connection.synchronize do return if !@connection.connected? begin # We need an ACK here. See thread_handler.rb finalize_request. @connection.channel.write("closeTransaction", @txn_id, AnalyticsLogger.timestamp_string, true) result = @connection.channel.read if result != ["ok"] raise "Expected logging agent to respond with 'ok', but got #{result.inspect} instead" end if flush_to_disk @connection.channel.write("flush") result = @connection.channel.read if result != ["ok"] raise "Invalid logging agent response #{result.inspect} to the 'flush' command" end end rescue SystemCallError, IOError => e @connection.disconnect DebugLogging.warn("Error communicating with the logging agent: #{e.message}") rescue Exception => e @connection.disconnect raise e ensure @connection.unref @connection = nil end end if @connection end def closed? if @connection @connection.synchronize do return !@connection.connected? end else return nil end end private def current_timestamp time = AnalyticsLogger.current_time return time.to_i * 1_000_000 + time.usec end end def self.new_from_options(options) if options["analytics"] && options["logging_agent_address"] return new(options["logging_agent_address"], options["logging_agent_username"], options["logging_agent_password"], options["node_name"]) else return nil end end attr_accessor :max_connect_tries attr_accessor :reconnect_timeout def initialize(logging_agent_address, username, password, node_name) @server_address = logging_agent_address @username = username @password = password if node_name && !node_name.empty? @node_name = node_name else @node_name = `hostname`.strip end @random_dev = File.open("/dev/urandom") # This mutex protects the following instance variables, but # not the contents of @connection. @mutex = Mutex.new @connection = Connection.new(nil) if @server_address && local_socket_address?(@server_address) @max_connect_tries = 10 else @max_connect_tries = 1 end @reconnect_timeout = 1 @next_reconnect_time = Time.utc(1980, 1, 1) end def clear_connection @mutex.synchronize do @connection.synchronize do @random_dev = File.open("/dev/urandom") if @random_dev.closed? @connection.unref @connection = Connection.new(nil) end end end def close @mutex.synchronize do @connection.synchronize do @random_dev.close @connection.unref @connection = nil end end end def new_transaction(group_name, category = :requests, union_station_key = "-") if !@server_address return Log.new elsif !group_name || group_name.empty? raise ArgumentError, "Group name may not be empty" end txn_id = (AnalyticsLogger.current_time.to_i / 60).to_s(36) txn_id << "-#{random_token(11)}" Lock.new(@mutex).synchronize do |lock| if current_time < @next_reconnect_time return Log.new end Lock.new(@connection.mutex).synchronize do |connection_lock| if !@connection.connected? begin connect connection_lock.reset(@connection.mutex) rescue SystemCallError, IOError @connection.disconnect DebugLogging.warn("Cannot connect to the logging agent at #{@server_address}; " + "retrying in #{@reconnect_timeout} second(s).") @next_reconnect_time = current_time + @reconnect_timeout return Log.new rescue Exception => e @connection.disconnect raise e end end begin @connection.channel.write("openTransaction", txn_id, group_name, "", category, AnalyticsLogger.timestamp_string, union_station_key, true, true) result = @connection.channel.read if result != ["ok"] raise "Expected logging server to respond with 'ok', but got #{result.inspect} instead" end return Log.new(@connection, txn_id) rescue SystemCallError, IOError @connection.disconnect DebugLogging.warn("The logging agent at #{@server_address}" << " closed the connection; will reconnect in " << "#{@reconnect_timeout} second(s).") @next_reconnect_time = current_time + @reconnect_timeout return Log.new rescue Exception => e @connection.disconnect raise e end end end end def continue_transaction(txn_id, group_name, category = :requests, union_station_key = "-") if !@server_address return Log.new elsif !txn_id || txn_id.empty? raise ArgumentError, "Transaction ID may not be empty" end Lock.new(@mutex).synchronize do |lock| if current_time < @next_reconnect_time return Log.new end Lock.new(@connection.mutex).synchronize do |connection_lock| if !@connection.connected? begin connect connection_lock.reset(@connection.mutex) rescue SystemCallError, IOError @connection.disconnect DebugLogging.warn("Cannot connect to the logging agent at #{@server_address}; " + "retrying in #{@reconnect_timeout} second(s).") @next_reconnect_time = current_time + @reconnect_timeout return Log.new rescue Exception => e @connection.disconnect raise e end end begin @connection.channel.write("openTransaction", txn_id, group_name, "", category, AnalyticsLogger.timestamp_string, union_station_key, true) return Log.new(@connection, txn_id) rescue SystemCallError, IOError @connection.disconnect DebugLogging.warn("The logging agent at #{@server_address}" << " closed the connection; will reconnect in " << "#{@reconnect_timeout} second(s).") @next_reconnect_time = current_time + @reconnect_timeout return Log.new rescue Exception => e @connection.disconnect raise e end end end end private RANDOM_CHARS = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] class Lock def initialize(mutex) @mutex = mutex @locked = false end def reset(mutex, lock_now = true) unlock if @locked @mutex = mutex lock if lock_now end def synchronize lock if !@locked begin yield(self) ensure unlock if @locked end end def lock raise if @locked @mutex.lock @locked = true end def unlock raise if !@locked @mutex.unlock @locked = false end end class Connection attr_reader :mutex attr_accessor :channel def initialize(io) @mutex = Mutex.new @refcount = 1 @channel = MessageChannel.new(io) if io end def connected? return !!@channel end def disconnect @channel.close if @channel @channel = nil end def ref @refcount += 1 end def unref @refcount -= 1 if @refcount == 0 disconnect end end def synchronize @mutex.synchronize do yield end end end def connect socket = connect_to_server(@server_address) channel = MessageChannel.new(socket) result = channel.read if result.nil? raise EOFError elsif result.size != 2 || result[0] != "version" raise IOError, "The logging agent didn't sent a valid version identifier" elsif result[1] != "1" raise IOError, "Unsupported logging agent protocol version #{result[1]}" end channel.write_scalar(@username) channel.write_scalar(@password) result = channel.read if result.nil? raise EOFError elsif result[0] != "ok" raise SecurityError, result[0] end channel.write("init", @node_name) args = channel.read if !args raise Errno::ECONNREFUSED, "Cannot connect to logging agent" elsif args.size != 1 raise IOError, "Logging agent returned an invalid reply for the 'init' command" elsif args[0] == "server shutting down" raise Errno::ECONNREFUSED, "Cannot connect to logging agent" elsif args[0] != "ok" raise IOError, "Logging agent returned an invalid reply for the 'init' command" end @connection.unref @connection = Connection.new(socket) rescue Exception => e socket.close if socket && !socket.closed? raise e end def random_token(length) token = "" @random_dev.read(length).each_byte do |c| token << RANDOM_CHARS[c % RANDOM_CHARS.size] end return token end def current_time return self.class.current_time end def self.current_time return Time.now end def self.timestamp_string(time = current_time) timestamp = time.to_i * 1_000_000 + time.usec return timestamp.to_s(36) end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/apache2/000755 000765 000024 00000000000 12233035540 022021 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger/classic_rails/000755 000765 000024 00000000000 12233035540 023331 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger/common_library.rb000644 000765 000024 00000027674 12233035540 024077 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2012 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # This file lists all the Phusion Passenger C++ library files and contains # code for calculating how to compile and how to link them into executables. # It's used by the build system (build/*.rb) and # lib/phusion_passenger/standalone/runtime_installer.rb. class CommonLibraryBuilder include Rake::DSL if defined?(Rake::DSL) attr_reader :all_components, :selected_components, :output_dir def initialize(&block) @all_components = {} @all_ordered_components = [] @selected_components = {} @namespace = "common" if defined?(COMMON_OUTPUT_DIR) @output_dir = COMMON_OUTPUT_DIR + "libpassenger_common" else @output_dir = "." end instance_eval(&block) if block end def initialize_copy(other) [:all_components, :all_ordered_components, :selected_components, :namespace, :output_dir].each do |name| var_name = "@#{name}" instance_variable_set(var_name, other.instance_variable_get(var_name).dup) end end def define_component(object_name, options) options[:deps] ||= [] @all_components[object_name] = options @all_ordered_components << object_name @selected_components[object_name] = options end def only(*selector) return dup.send(:only!, *selector) end def exclude(*selector) return dup.send(:exclude!, *selector) end def set_namespace(namespace) return dup.send(:set_namespace!, namespace) end def set_output_dir(dir) return dup.send(:set_output_dir!, dir) end def link_objects result = [] selected_categories.each do |category| if category_complete?(category) && false # Feature disabled: we don't want to waste too much space when # packaging the runtime ('passenger package-runtime') so we # never generate static libraries. if aggregate_sources? result << "#{@output_dir}/#{category}.o" else result << "#{@output_dir}/#{category}.a" end else object_names = selected_objects_beloging_to_category(category) result.concat(object_filenames_for(object_names)) end end return result end def link_objects_as_string return link_objects.join(' ') end def define_tasks(extra_compiler_flags = nil) flags = "-Iext -Iext/common #{LIBEV_CFLAGS} #{extra_compiler_flags} " cflags = (flags + EXTRA_CFLAGS).strip cxxflags = (flags + EXTRA_CXXFLAGS).strip group_all_components_by_category.each_pair do |category, object_names| define_category_tasks(category, object_names, cflags, cxxflags) end task("#{@namespace}:clean") do sh "rm -rf #{@output_dir}" end return self end private def define_category_tasks(category, object_names, cflags, cxxflags) object_filenames = object_filenames_for(object_names) object_names.each do |object_name| options = @all_components[object_name] source_file = "ext/common/#{options[:source]}" object_file = "#{@output_dir}/#{object_name}" file(object_file => dependencies_for(options)) do ensure_directory_exists(File.dirname(object_file)) if source_file =~ /\.c$/ compile_c(source_file, "#{cflags} -o #{object_file}") else compile_cxx(source_file, "#{cxxflags} -o #{object_file}") end end end task "#{@namespace}:clean" do sh "rm -f #{object_filenames.join(' ')}" end if aggregate_sources? aggregate_source = "#{@output_dir}/#{category}.cpp" aggregate_object = "#{@output_dir}/#{category}.o" file(aggregate_object => dependencies_for(object_names)) do ensure_directory_exists(File.dirname(aggregate_source)) ensure_directory_exists(File.dirname(aggregate_object)) File.open(aggregate_source, "w") do |f| f.puts %q{ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif } object_names.each do |object_name| options = @all_components[object_name] source_file = options[:source].sub(%r(^ext/common), '') f.puts "#include \"#{source_file}\"" end end compile_cxx(aggregate_source, "#{flags} -o #{aggregate_object}") end task "#{@namespace}:clean" do sh "rm -f #{aggregate_source} #{aggregate_object}" end elsif false # Feature disabled: we don't want to waste too much space when # packaging the runtime ('passenger package-runtime') so we # never generate static libraries. library = "#{@output_dir}/#{category}.a" file(library => object_filenames) do create_static_library(library, object_filenames.join(' ')) end task "#{@namespace}:clean" do sh "rm -f #{library}" end end end def set_namespace!(namespace) @namespace = namespace return self end def set_output_dir!(dir) @output_dir = dir return self end def only!(*selector) new_components = apply_selector(*selector) @selected_components = new_components return self end def exclude!(*selector) apply_selector(*selector).each_key do |object_name| @selected_components.delete(object_name) end return self end def apply_selector(*selector) result = {} selector = [selector].flatten selector.each do |condition| @selected_components.each do |object_name, options| if component_satisfies_condition?(object_name, options, condition) result[object_name] = options end end end return result end def component_satisfies_condition?(object_name, options, condition) case condition when Symbol return condition == :all || options[:category] == condition when String return object_name == condition else raise ArgumentError, "Invalid condition #{condition.inspect}" end end def ensure_directory_exists(dir) sh("mkdir -p #{dir}") if !File.directory?(dir) end def selected_categories categories = {} @selected_components.each_value do |options| categories[options[:category]] = true end return categories.keys end def category_complete?(category) expected = 0 actual = 0 @all_components.each_value do |options| if options[:category] == category expected += 1 end end @selected_components.each_value do |options| if options[:category] == category actual += 1 end end return expected == actual end def selected_objects_beloging_to_category(category) result = [] @selected_components.each_pair do |object_name, options| if options[:category] == category result << object_name end end return result end def dependencies_for(component_options_or_object_names) result = nil case component_options_or_object_names when Hash component_options = component_options_or_object_names result = ["ext/common/#{component_options[:source]}"] component_options[:deps].each do |dependency| result << "ext/common/#{dependency}" end when Array result = [] object_names = component_options_or_object_names object_names.each do |object_name| options = @all_components[object_name] result.concat(dependencies_for(options)) end result.uniq! end return result end def object_filenames_for(object_names) return object_names.map { |name| "#{@output_dir}/#{name}" } end def group_all_components_by_category categories = {} @all_ordered_components.each do |object_name| options = @all_components[object_name] category = options[:category] categories[category] ||= [] categories[category] << object_name end return categories end def aggregate_sources? # Feature disabled: it's too hard to make it work because # lots of executables have to be linked to individual objects # anyway. return false end end COMMON_LIBRARY = CommonLibraryBuilder.new do define_component 'Logging.o', :source => 'Logging.cpp', :category => :base, :deps => %w( Logging.cpp Logging.h ) define_component 'Exceptions.o', :source => 'Exceptions.cpp', :category => :base, :deps => %w( Exceptions.h ) define_component 'Utils/SystemTime.o', :source => 'Utils/SystemTime.cpp', :category => :base, :deps => %w( Utils/SystemTime.h ) define_component 'Utils/StrIntUtils.o', :source => 'Utils/StrIntUtils.cpp', :category => :base, :deps => %w( Utils/StrIntUtils.h ) define_component 'Utils/IOUtils.o', :source => 'Utils/IOUtils.cpp', :category => :base, :deps => %w( Utils/IOUtils.h ) define_component 'Utils.o', :source => 'Utils.cpp', :category => :base, :deps => %w( Utils.h Utils/Base64.h Utils/StrIntUtils.h ResourceLocator.h ) define_component 'Utils/Base64.o', :source => 'Utils/Base64.cpp', :category => :other, :deps => %w( Utils/Base64.h ) define_component 'Utils/CachedFileStat.o', :source => 'Utils/CachedFileStat.cpp', :category => :other, :deps => %w( Utils/CachedFileStat.h Utils/CachedFileStat.hpp ) define_component 'Utils/LargeFiles.o', :source => 'Utils/LargeFiles.cpp', :category => :other, :deps => %w( Utils/LargeFiles.h ) define_component 'ApplicationPool2/Implementation.o', :source => 'ApplicationPool2/Implementation.cpp', :category => :other, :deps => %w( ApplicationPool2/Spawner.h ApplicationPool2/Common.h ApplicationPool2/Pool.h ApplicationPool2/SuperGroup.h ApplicationPool2/Group.h ApplicationPool2/Session.h ApplicationPool2/Options.h ApplicationPool2/PipeWatcher.h ApplicationPool2/AppTypes.h ApplicationPool2/Spawner.h ApplicationPool2/SpawnerFactory.h ApplicationPool2/SmartSpawner.h ApplicationPool2/DirectSpawner.h ApplicationPool2/DummySpawner.h ) define_component 'ApplicationPool2/AppTypes.o', :source => 'ApplicationPool2/AppTypes.cpp', :category => :other, :deps => %w( ApplicationPool2/AppTypes.h Utils/StrIntUtils.h Utils/CachedFileStat.h ) define_component 'AgentsStarter.o', :source => 'AgentsStarter.cpp', :category => :other, :deps => %w( AgentsStarter.h ResourceLocator.h MessageClient.h ServerInstanceDir.h Utils/IniFile.h Utils/VariantMap.h ) define_component 'AgentsBase.o', :source => 'agents/Base.cpp', :category => :other, :deps => %w( agents/Base.h Utils/VariantMap.h ) define_component 'agents/LoggingAgent/FilterSupport.o', :source => 'agents/LoggingAgent/FilterSupport.cpp', :category => :logging_agent, :deps => %w( agents/LoggingAgent/FilterSupport.h ) define_component 'Utils/MD5.o', :source => 'Utils/MD5.cpp', :category => :other, :deps => %w( Utils/MD5.h ) define_component 'Utils/fib.o', :source => 'Utils/fib.c', :category => :other, :deps => %w( Utils/fib.h Utils/fibpriv.h ) define_component 'Utils/jsoncpp.o', :source => 'Utils/jsoncpp.cpp', :category => :other, :deps => %w( Utils/json.h Utils/json-forwards.h ) #'BCrypt.o' => %w( # BCrypt.cpp # BCrypt.h # Blowfish.h # Blowfish.c) end # Objects that must be linked into the Nginx binary. NGINX_LIBS_SELECTOR = [:base, 'AgentsStarter.o', 'ApplicationPool2/AppTypes.o', 'Utils/CachedFileStat.o', 'Utils/Base64.o', 'agents/LoggingAgent/FilterSupport.o'] passenger-4.0.37/lib/phusion_passenger/config/000755 000765 000024 00000000000 12233035540 021763 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger/console_text_template.rb000644 000765 000024 00000003667 12233035540 025460 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'erb' PhusionPassenger.require_passenger_lib 'utils/ansi_colors' module PhusionPassenger class ConsoleTextTemplate def initialize(input, options = {}) @buffer = '' if input[:file] filename = "#{PhusionPassenger.resources_dir}/templates/#{input[:file]}.txt.erb" data = File.read(filename) else data = input[:text] end @template = ERB.new(Utils::AnsiColors.ansi_colorize(data), nil, '-', '@buffer') @template.filename = filename if filename options.each_pair do |name, value| self[name] = value end end def []=(name, value) instance_variable_set("@#{name}".to_sym, value) return self end def result return @template.result(binding) end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/constants.rb000644 000765 000024 00000010076 12233035540 023063 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger PASSENGER_ANALYTICS_WEB_LOG = "PASSENGER_ANALYTICS_WEB_LOG".freeze PASSENGER_TXN_ID = "PASSENGER_TXN_ID".freeze PASSENGER_UNION_STATION_KEY = "UNION_STATION_KEY".freeze RACK_HIJACK_IO = "rack.hijack_io".freeze # Constants shared between the C++ and Ruby codebase. The C++ Constants.h # is automatically generated by the build system from the following # definitions. module SharedConstants # Default config values DEFAULT_LOG_LEVEL = 0 DEFAULT_RUBY = "ruby" DEFAULT_PYTHON = "python" DEFAULT_NODEJS = "node" DEFAULT_MAX_POOL_SIZE = 6 DEFAULT_POOL_IDLE_TIME = 300 DEFAULT_START_TIMEOUT = 90_000 DEFAULT_WEB_APP_USER = "nobody" DEFAULT_CONCURRENCY_MODEL = "process" DEFAULT_THREAD_COUNT = 1 DEFAULT_ANALYTICS_LOG_USER = DEFAULT_WEB_APP_USER DEFAULT_ANALYTICS_LOG_GROUP = "" DEFAULT_ANALYTICS_LOG_PERMISSIONS = "u=rwx,g=rx,o=rx" DEFAULT_UNION_STATION_GATEWAY_ADDRESS = "gateway.unionstationapp.com" DEFAULT_UNION_STATION_GATEWAY_PORT = 443 # Size limits MESSAGE_SERVER_MAX_USERNAME_SIZE = 100 MESSAGE_SERVER_MAX_PASSWORD_SIZE = 100 POOL_HELPER_THREAD_STACK_SIZE = 1024 * 256 # Time limits PROCESS_SHUTDOWN_TIMEOUT = 60 # In seconds PROCESS_SHUTDOWN_TIMEOUT_DISPLAY = "1 minute" # Versions PASSENGER_VERSION = PhusionPassenger::VERSION_STRING SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION = 1 SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION = 0 SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION = 3 SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION = 0 # Misc FEEDBACK_FD = 3 PROGRAM_NAME = "Phusion Passenger" INDEX_DOC_URL = "http://www.modrails.com/documentation/Users%20guide.html" APACHE2_DOC_URL = "http://www.modrails.com/documentation/Users%20guide%20Apache.html" NGINX_DOC_URL = "http://www.modrails.com/documentation/Users%20guide%20Nginx.html" STANDALONE_DOC_URL = "http://www.modrails.com/documentation/Users%20guide%20Standalone.html" SUPPORT_URL = "http://www.phusionpassenger.com/support" ENTERPRISE_URL = "http://www.phusionpassenger.com/enterprise" DEB_MAIN_PACKAGE = "passenger" DEB_DEV_PACKAGE = "passenger-dev" DEB_APACHE_MODULE_PACKAGE = "libapache2-mod-passenger" DEB_NGINX_PACKAGE = "nginx-extras" RPM_MAIN_PACKAGE = "passenger" RPM_DEV_PACKAGE = "passenger-devel" RPM_APACHE_MODULE_PACKAGE = "mod_passenger" RPM_NGINX_PACKAGE = "nginx" STANDALONE_NGINX_CONFIGURE_OPTIONS = "--with-cc-opt='-Wno-error' " << "--without-http_fastcgi_module " << "--without-http_scgi_module " << "--without-http_uwsgi_module " << "--with-http_gzip_static_module " << "--with-http_stub_status_module " << "--with-http_ssl_module" end SharedConstants.constants.each do |name| const_set(name, SharedConstants.const_get(name)) unless const_defined? name end end passenger-4.0.37/lib/phusion_passenger/debug_logging.rb000644 000765 000024 00000006215 12233035540 023643 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger module DebugLogging # We don't refer to STDERR directly because STDERR's reference might # change during runtime. @@log_level = 0 @@log_device = nil @@log_filename = nil @@stderr_evaluator = lambda { STDERR } def self.included(klass) klass.class_eval do private :debug private :trace end end def self.log_level return @@log_level end def self.log_level=(level) @@log_level = level end def self.log_file=(filename) if filename && filename.empty? @@log_filename = nil else @@log_filename = filename end @@log_device.close if @@log_device && !@@log_device.closed? @@log_device = nil end def self._log_device return @@log_device end def self.stderr_evaluator=(block) if block @@stderr_evaluator = block else @@stderr_evaluator = lambda { STDERR } end end def error(message) trace(-1, message, 1) end module_function :error def warn(message) trace(0, message, 1) end module_function :warn def debug(message) trace(1, message, 1) end module_function :debug def trace(level, message, nesting_level = 0) if @@log_level >= level if @@log_filename if !@@log_device || @@log_device.closed? @@log_device = File.open(@@log_filename, "a") end output = @@log_device else output = @@stderr_evaluator.call end location = caller[nesting_level].sub(/.*phusion_passenger\//, '') location.sub!(/(.*):.*/, '\1') now = Time.now time_str = now.strftime("%Y-%m-%d %H:%M:%S.") time_str << sprintf("%04d", now.usec / 100) current_thread = Thread.current if !(thread_id = current_thread[:id]) current_thread.to_s =~ /:(0x[0-9a-f]+)/i thread_id = current_thread[:id] = $1 || '?' end if thread_name = current_thread[:name] thread_name = "(#{thread_name})" end output.write("[ #{time_str} #{$$}/#{thread_id}#{thread_name} #{location} ]: #{message}\n") output.flush end end module_function :trace end end passenger-4.0.37/lib/phusion_passenger/loader_shared_helpers.rb000644 000765 000024 00000040254 12233035540 025366 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2011-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'public_api' PhusionPassenger.require_passenger_lib 'debug_logging' module PhusionPassenger # Provides shared functions for loader and preloader apps. module LoaderSharedHelpers extend self # To be called by the (pre)loader as soon as possible. def init(options) Thread.main[:name] = "Main thread" # We don't dump PATH info because at this point it's # unlikely to be changed. dump_ruby_environment check_rvm_using_wrapper_script(options) return sanitize_spawn_options(options) 7 end def check_rvm_using_wrapper_script(options) ruby = options["ruby"] if ruby =~ %r(/\.?rvm/) && ruby =~ %r(/bin/ruby$) raise "You've set the `PassengerRuby` (Apache) or `passenger_ruby` (Nginx) option to '#{ruby}'. " + "However, because you are using RVM, this is not allowed: the option must point to " + "an RVM wrapper script, not a raw Ruby binary. This is because RVM is implemented " + "through various environment variables, which are set through the wrapper script.\n" + "\n" + "To find out the correct value for `PassengerRuby`/`passenger_ruby`, please read:\n\n" + " #{APACHE2_DOC_URL}#PassengerRuby\n\n" + " #{NGINX_DOC_URL}#PassengerRuby\n\n" + "Scroll to section 'RVM helper tool'.\n" + "\n-------------------------\n" end end # To be called whenever the (pre)loader is about to abort with an error. def about_to_abort(exception = nil) dump_all_information # https://code.google.com/p/phusion-passenger/issues/detail?id=1039 puts end def to_boolean(value) return !(value.nil? || value == false || value == "false") end def sanitize_spawn_options(options) defaults = { "app_type" => "rack", "environment" => "production", "print_exceptions" => true } options = defaults.merge(options) options["app_group_name"] = options["app_root"] if !options["app_group_name"] options["print_exceptions"] = to_boolean(options["print_exceptions"]) options["analytics"] = to_boolean(options["analytics"]) options["show_version_in_header"] = to_boolean(options["show_version_in_header"]) options["log_level"] = options["log_level"].to_i if options["log_level"] # TODO: smart spawning is not supported when using ruby-debug. We should raise an error # in this case. options["debugger"] = to_boolean(options["debugger"]) options["spawn_method"] = "direct" if options["debugger"] return options end def dump_all_information dump_ruby_environment dump_envvars dump_system_memory_stats end def dump_ruby_environment if dir = ENV['PASSENGER_DEBUG_DIR'] File.open("#{dir}/ruby_info", "w") do |f| f.puts "RUBY_VERSION = #{RUBY_VERSION}" f.puts "RUBY_PLATFORM = #{RUBY_PLATFORM}" f.puts "RUBY_ENGINE = #{defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'nil'}" end File.open("#{dir}/load_path", "wb") do |f| $LOAD_PATH.each do |path| f.puts path end end File.open("#{dir}/loaded_libs", "wb") do |f| $LOADED_FEATURES.each do |filename| f.puts filename end end # We write to these files last because the 'require' calls can fail. require 'rbconfig' if !defined?(RbConfig::CONFIG) File.open("#{dir}/rbconfig", "wb") do |f| RbConfig::CONFIG.each_pair do |key, value| f.puts "#{key} = #{value}" end end begin require 'rubygems' if !defined?(Gem) rescue LoadError end if defined?(Gem) File.open("#{dir}/ruby_info", "a") do |f| f.puts "RubyGems version = #{Gem::VERSION}" end File.open("#{dir}/activated_gems", "wb") do |f| if Gem.respond_to?(:loaded_specs) Gem.loaded_specs.each_pair do |name, spec| f.puts "#{name} => #{spec.version}" end else f.puts "Unable to query this information; incompatible RubyGems API." end end end end rescue SystemCallError # Don't care. end def dump_envvars if dir = ENV['PASSENGER_DEBUG_DIR'] File.open("#{dir}/envvars", "wb") do |f| ENV.each_pair do |key, value| f.puts "#{key} = #{value}" end end end rescue SystemCallError # Don't care. end def dump_system_memory_stats if dir = ENV['PASSENGER_DEBUG_DIR'] File.open("#{dir}/sysmemory", "wb") do |f| f.write(`"#{PhusionPassenger.helper_scripts_dir}/system-memory-stats.py"`) end end rescue SystemCallError # Don't care. end # Prepare an application process using rules for the given spawn options. # This method is to be called before loading the application code. # # +startup_file+ is the application type's startup file, e.g. # "config/environment.rb" for Rails apps and "config.ru" for Rack apps. # +options+ are the spawn options that were given. # # This function may modify +options+. The modified options are to be # passed to the request handler. def before_loading_app_code_step1(startup_file, options) DebugLogging.log_level = options["log_level"] if options["log_level"] # Instantiate the analytics logger if requested. Can be nil. PhusionPassenger.require_passenger_lib 'analytics_logger' options["analytics_logger"] = AnalyticsLogger.new_from_options(options) end def run_load_path_setup_code(options) # rack-preloader.rb depends on the 'rack' library, but the app # might want us to use a bundled version instead of a # gem/apt-get/yum/whatever-installed version. Therefore we must setup # the correct load paths before requiring 'rack'. # # The most popular tool for bundling dependencies is Bundler. Bundler # works as follows: # - If the bundle is locked then a file .bundle/environment.rb exists # which will setup the load paths. # - If the bundle is not locked then the load paths must be set up by # calling Bundler.setup. # - Rails 3's boot.rb automatically loads .bundle/environment.rb or # calls Bundler.setup if that's not available. # - Other Rack apps might not have a boot.rb but we still want to setup # Bundler. # - Some Rails 2 apps might have explicitly added Bundler support. # These apps call Bundler.setup in their preinitializer.rb. # # So the strategy is as follows: # Our strategy might be completely unsuitable for the app or the # developer is using something other than Bundler, so we let the user # manually specify a load path setup file. if options["load_path_setup_file"] require File.expand_path(options["load_path_setup_file"]) # The app developer may also override our strategy with this magic file. elsif File.exist?('config/setup_load_paths.rb') require File.expand_path('config/setup_load_paths') # Older versions of Bundler use .bundle/environment.rb as the Bundler # environment lock file. This has been replaced by Gemfile.lock in later # versions, but we still support the older mechanism. # If the Bundler environment lock file exists then load that. If it # exists then there's a 99.9% chance that loading it is the correct # thing to do. elsif File.exist?('.bundle/environment.rb') running_bundler(options) do require File.expand_path('.bundle/environment') end # If the legacy Bundler environment file doesn't exist then there are two # possibilities: # 1. Bundler is not used, in which case we don't have to do anything. # 2. Bundler *is* used, but either the user is using a newer Bundler versions, # or the gems are not locked. In either case, we're supposed to call # Bundler.setup. # # The existence of Gemfile indicates whether (2) is true: elsif File.exist?('Gemfile') # In case of Rails 3, config/boot.rb already calls Bundler.setup. # However older versions of Rails may not so loading boot.rb might # not be the correct thing to do. To be on the safe side we # call Bundler.setup ourselves; calling Bundler.setup twice is # harmless. If this isn't the correct thing to do after all then # there's always the load_path_setup_file option and # setup_load_paths.rb. running_bundler(options) do require 'rubygems' require 'bundler/setup' end end # !!! NOTE !!! # If the app is using Bundler then any dependencies required past this # point must be specified in the Gemfile. Like ruby-debug if debugging is on... end def before_loading_app_code_step2(options) # Do nothing. end # This method is to be called after loading the application code but # before forking a worker process. def after_loading_app_code(options) # Post-install framework extensions. Possibly preceded by a call to # PhusionPassenger.install_framework_extensions! if defined?(::Rails) && !defined?(::Rails::VERSION) require 'rails/version' end end def create_socket_address(protocol, address) if protocol == 'unix' return "unix:#{address}" elsif protocol == 'tcp' return "tcp://#{address}" else raise ArgumentError, "Unknown protocol '#{protocol}'" end end def advertise_readiness # https://code.google.com/p/phusion-passenger/issues/detail?id=1039 puts puts "!> Ready" end def advertise_sockets(output, request_handler) request_handler.server_sockets.each_pair do |name, options| concurrency = PhusionPassenger.advertised_concurrency_level || options[:concurrency] output.puts "!> socket: #{name};#{options[:address]};#{options[:protocol]};#{concurrency}" end end # To be called before the request handler main loop is entered, but after the app # startup file has been loaded. This function will fire off necessary events # and perform necessary preparation tasks. # # +forked+ indicates whether the current worker process is forked off from # an ApplicationSpawner that has preloaded the app code. # +options+ are the spawn options that were passed. def before_handling_requests(forked, options) if forked # Reseed pseudo-random number generator for security reasons. srand end if options["process_title"] && !options["process_title"].empty? $0 = options["process_title"] + ": " + options["app_group_name"] end if forked && options["analytics_logger"] options["analytics_logger"].clear_connection end # If we were forked from a preloader process then clear or # re-establish ActiveRecord database connections. This prevents # child processes from concurrently accessing the same # database connection handles. if forked && defined?(ActiveRecord::Base) if ActiveRecord::Base.respond_to?(:clear_all_connections!) ActiveRecord::Base.clear_all_connections! elsif ActiveRecord::Base.respond_to?(:clear_active_connections!) ActiveRecord::Base.clear_active_connections! elsif ActiveRecord::Base.respond_to?(:connected?) && ActiveRecord::Base.connected? ActiveRecord::Base.establish_connection end end # Fire off events. PhusionPassenger.call_event(:starting_worker_process, forked) if options["pool_account_username"] && options["pool_account_password_base64"] password = options["pool_account_password_base64"].unpack('m').first PhusionPassenger.call_event(:credentials, options["pool_account_username"], password) else PhusionPassenger.call_event(:credentials, nil, nil) end end # To be called after the request handler main loop is exited. This function # will fire off necessary events perform necessary cleanup tasks. def after_handling_requests PhusionPassenger.call_event(:stopping_worker_process) end private def running_bundler(options) yield rescue Exception => e if (defined?(Bundler::GemNotFound) && e.is_a?(Bundler::GemNotFound)) || (defined?(Bundler::GitError) && e.is_a?(Bundler::GitError)) PhusionPassenger.require_passenger_lib 'platform_info/ruby' comment = "

It looks like Bundler could not find a gem. Maybe you didn't install all the " + "gems that this application needs. To install your gems, please run:

\n\n" + "
bundle install
\n\n" ruby = options["ruby"] if ruby =~ %r(^/usr/local/rvm/) comment << "

If that didn't work, then maybe the problem is that your gems are installed " + "to #{h home_dir}/.rvm/gems, while at the same time you set " + "PassengerRuby (Apache) or passenger_ruby (Nginx) to " + "#{h ruby}. Because of the latter, RVM does not load gems from the " + "home directory.

\n\n" + "

To make RVM load gems from the home directory, you need to set " + "PassengerRuby/passenger_ruby to an RVM wrapper script " + "inside the home directory:

\n\n" + "
    \n" + "
  1. Login as #{h whoami}.
  2. \n" if PlatformInfo.rvm_installation_mode == :multi comment << "
  3. Enable RVM mixed mode by running:\n" + "
    rvm user gemsets
  4. \n" end comment << "
  5. Run this to find out what to set PassengerRuby/passenger_ruby to:\n" + "
    #{PlatformInfo.ruby_command} \\\n" +
    					"#{PhusionPassenger.bin_dir}/passenger-config --detect-ruby
  6. \n" + "
\n\n" + "

If that didn't help either, then maybe your application is being run under a " + "different environment than it's supposed to. Please check the following:

\n\n" else comment << "

If that didn't work, then the problem is probably caused by your " + "application being run under a different environment than it's supposed to. " + "Please check the following:

\n\n" end comment << "
    \n" comment << "
  1. Is this app supposed to be run as the #{h whoami} user?
  2. \n" + "
  3. Is this app being run on the correct Ruby interpreter? Below you will\n" + " see which Ruby interpreter Phusion Passenger attempted to use.
  4. \n" if PlatformInfo.in_rvm? comment << "
  5. Please check whether the correct RVM gemset is being used.
  6. \n" + "
  7. Sometimes, RVM gemsets may be broken.\n" + " Try resetting them.
  8. \n" end comment << "
\n" prepend_exception_html_comment(e, comment) end raise e end def prepend_exception_html_comment(e, comment) # Since Exception doesn't allow changing the message, we monkeypatch # the #message and #to_s methods. separator = "\n

-------- The exception is as follows: -------

\n" new_message = comment + separator + h(e.message) new_s = comment + separator + h(e.to_s) metaclass = class << e; self; end metaclass.send(:define_method, :message) do new_message end metaclass.send(:define_method, :to_s) do new_s end metaclass.send(:define_method, :html?) do true end end def h(text) require 'erb' if !defined?(ERB) return ERB::Util.h(text) end def whoami require 'etc' if !defined?(Etc) begin user = Etc.getpwuid(Process.uid) rescue ArgumentError user = nil end if user return user.name else return "##{Process.uid}" end end def home_dir @home_dir ||= begin require 'etc' if !defined?(Etc) Etc.getpwuid(Process.uid).dir end end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/message_channel.rb000644 000765 000024 00000022451 12233035540 024163 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger # This class allows reading and writing structured messages over # I/O channels. This is the Ruby implementation of ext/common/Utils/MessageIO.h; # see that file for more information. class MessageChannel HEADER_SIZE = 2 # :nodoc: DELIMITER = "\0" # :nodoc: DELIMITER_NAME = "null byte" # :nodoc: UINT16_PACK_FORMAT = "n" # :nodoc: UINT32_PACK_FORMAT = "N" # :nodoc: class InvalidHashError < StandardError end # The wrapped IO object. attr_accessor :io # Create a new MessageChannel by wrapping the given IO object. def initialize(io = nil) @io = io # Make it binary just in case. @io.binmode if @io end # Read an array message from the underlying file descriptor. # Returns the array message as an array, or nil when end-of-stream has # been reached. # # Might raise SystemCallError, IOError or SocketError when something # goes wrong. def read buffer = new_buffer if !@io.read(HEADER_SIZE, buffer) return nil end while buffer.size < HEADER_SIZE tmp = @io.read(HEADER_SIZE - buffer.size) if tmp.empty? return nil else buffer << tmp end end chunk_size = buffer.unpack(UINT16_PACK_FORMAT)[0] if !@io.read(chunk_size, buffer) return nil end while buffer.size < chunk_size tmp = @io.read(chunk_size - buffer.size) if tmp.empty? return nil else buffer << tmp end end message = [] offset = 0 delimiter_pos = buffer.index(DELIMITER, offset) while !delimiter_pos.nil? if delimiter_pos == 0 message << "" else message << buffer[offset .. delimiter_pos - 1] end offset = delimiter_pos + 1 delimiter_pos = buffer.index(DELIMITER, offset) end return message rescue Errno::ECONNRESET return nil end # Read an array message from the underlying file descriptor and return the # result as a hash instead of an array. This assumes that the array message # has an even number of elements. # Returns nil when end-of-stream has been reached. # # Might raise SystemCallError, IOError or SocketError when something # goes wrong. def read_hash buffer = new_buffer if !@io.read(HEADER_SIZE, buffer) return nil end while buffer.size < HEADER_SIZE tmp = @io.read(HEADER_SIZE - buffer.size) if tmp.empty? return nil else buffer << tmp end end chunk_size = buffer.unpack(UINT16_PACK_FORMAT)[0] if !@io.read(chunk_size, buffer) return nil end while buffer.size < chunk_size tmp = @io.read(chunk_size - buffer.size) if tmp.empty? return nil else buffer << tmp end end result = {} offset = 0 delimiter_pos = buffer.index(DELIMITER, offset) while !delimiter_pos.nil? if delimiter_pos == 0 name = "" else name = buffer[offset .. delimiter_pos - 1] end offset = delimiter_pos + 1 delimiter_pos = buffer.index(DELIMITER, offset) if delimiter_pos.nil? raise InvalidHashError elsif delimiter_pos == 0 value = "" else value = buffer[offset .. delimiter_pos - 1] end result[name] = value offset = delimiter_pos + 1 delimiter_pos = buffer.index(DELIMITER, offset) end return result rescue Errno::ECONNRESET return nil end # Read a scalar message from the underlying IO object. Returns the # read message, or nil on end-of-stream. # # Might raise SystemCallError, IOError or SocketError when something # goes wrong. # # The +buffer+ argument specifies a buffer in which #read_scalar # stores the read data. It is good practice to reuse existing buffers # in order to minimize stress on the garbage collector. # # The +max_size+ argument allows one to specify the maximum allowed # size for the scalar message. If the received scalar message's size # is larger than +max_size+, then a SecurityError will be raised. def read_scalar(buffer = new_buffer, max_size = nil) if !@io.read(4, buffer) return nil end while buffer.size < 4 tmp = @io.read(4 - buffer.size) if tmp.empty? return nil else buffer << tmp end end size = buffer.unpack(UINT32_PACK_FORMAT)[0] if size == 0 buffer.replace('') return buffer else if !max_size.nil? && size > max_size raise SecurityError, "Scalar message size (#{size}) " << "exceeds maximum allowed size (#{max_size})." end if !@io.read(size, buffer) return nil end if buffer.size < size tmp = '' while buffer.size < size if !@io.read(size - buffer.size, tmp) return nil else buffer << tmp end end end return buffer end rescue Errno::ECONNRESET return nil end # Send an array message, which consists of the given elements, over the underlying # file descriptor. _name_ is the first element in the message, and _args_ are the # other elements. These arguments will internally be converted to strings by calling # to_s(). # # Might raise SystemCallError, IOError or SocketError when something # goes wrong. def write(name, *args) check_argument(name) args.each do |arg| check_argument(arg) end message = "#{name}#{DELIMITER}" args.each do |arg| message << arg.to_s << DELIMITER end @io.write([message.size].pack('n') << message) @io.flush end # Send a scalar message over the underlying IO object. # # Might raise SystemCallError, IOError or SocketError when something # goes wrong. def write_scalar(data) @io.write([data.size].pack('N') << data) @io.flush end # Receive an IO object (a file descriptor) from the channel. The other # side must have sent an IO object by calling send_io(). Note that # this only works on Unix sockets. # # Might raise SystemCallError, IOError or SocketError when something # goes wrong. def recv_io(klass = IO, negotiate = true) write("pass IO") if negotiate io = @io.recv_io(klass) write("got IO") if negotiate return io end # Send an IO object (a file descriptor) over the channel. The other # side must receive the IO object by calling recv_io(). Note that # this only works on Unix sockets. # # Might raise SystemCallError, IOError or SocketError when something # goes wrong. def send_io(io) # We read a message before actually calling #send_io # in order to prevent the other side from accidentally # read()ing past the normal data and reading our file # descriptor too. # # For example suppose that side A looks like this: # # read(fd, buf, 1024) # read_io(fd) # # and side B: # # write(fd, buf, 100) # send_io(fd_to_pass) # # If B completes both write() and send_io(), then A's read() call # reads past the 100 bytes that B sent. On some platforms, like # Linux, this will cause read_io() to fail. And it just so happens # that Ruby's IO#read method slurps more than just the given amount # of bytes. result = read if !result raise EOFError, "End of stream" elsif result != ["pass IO"] raise IOError, "IO passing pre-negotiation header expected" else @io.send_io(io) # Once you've sent the IO you expect to be able to close it on the # sender's side, even if the other side hasn't read the IO yet. # Not so: on some operating systems (I'm looking at you OS X) this # can cause the receiving side to receive a bad file descriptor. # The post negotiation protocol ensures that we block until the # other side has really received the IO. result = read if !result raise EOFError, "End of stream" elsif result != ["got IO"] raise IOError, "IO passing post-negotiation header expected" end end end # Return the file descriptor of the underlying IO object. def fileno return @io.fileno end # Close the underlying IO stream. Might raise SystemCallError or # IOError when something goes wrong. def close @io.close end # Checks whether the underlying IO stream is closed. def closed? return @io.closed? end private def check_argument(arg) if arg.to_s.index(DELIMITER) raise ArgumentError, "Message name and arguments may not contain #{DELIMITER_NAME}." end end if defined?(ByteString) def new_buffer return ByteString.new end else def new_buffer return "" end end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/message_client.rb000644 000765 000024 00000011242 12233035540 024025 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'socket' PhusionPassenger.require_passenger_lib 'message_channel' PhusionPassenger.require_passenger_lib 'utils' PhusionPassenger.require_passenger_lib 'utils/tmpdir' module PhusionPassenger # A convenience class for communicating with MessageServer servers, # for example the ApplicationPool server. class MessageClient include Utils # Connect to the given server. By default it connects to the current # generation's helper server. def initialize(username, password, address = "unix:#{Utils.passenger_tmpdir}/socket") @socket = connect_to_server(address) begin @channel = MessageChannel.new(@socket) result = @channel.read if result.nil? raise EOFError elsif result.size != 2 || result[0] != "version" raise IOError, "The message server didn't sent a valid version identifier" elsif result[1] != "1" raise IOError, "Unsupported message server protocol version #{result[1]}" end @channel.write_scalar(username) @channel.write_scalar(password) result = @channel.read if result.nil? raise EOFError elsif result[0] != "ok" raise SecurityError, result[0] end rescue Exception @socket.close raise end end def close @socket.close if @socket @channel = @socket = nil end def connected? return !!@channel end ### HelperAgent methods ### def pool_detach_process(pid) write("detach_process", pid) check_security_response result = read if result.nil? raise EOFError else return result.first == "true" end end def pool_detach_process_by_key(detach_key) write("detach_process_by_key", detach_key) check_security_response result = read if result.nil? raise EOFError else return result.first == "true" end end def pool_status(options = {}) write("inspect", *options.to_a.flatten) check_security_response return read_scalar rescue auto_disconnect raise end def pool_xml write("toXml", true) check_security_response return read_scalar end def restart_app_group(app_group_name, options = {}) write("restart_app_group", app_group_name, *options.to_a.flatten) check_security_response result = read if result.nil? raise EOFError else return result.first == "true" end end def helper_agent_requests write("requests") check_security_response return read_scalar end ### HelperAgent BacktracesServer methods ### def helper_agent_backtraces write("backtraces") check_security_response return read_scalar end ### LoggingAgent AdminServer methods ### def logging_agent_status write("status") check_security_response return read_scalar end ### Low level I/O methods ### def read return @channel.read rescue auto_disconnect raise end def write(*args) @channel.write(*args) rescue auto_disconnect raise end def write_scalar(*args) @channel.write_scalar(*args) rescue auto_disconnect raise end def read_scalar return @channel.read_scalar rescue auto_disconnect raise end def recv_io(klass = IO, negotiate = true) return @channel.recv_io(klass, negotiate) rescue auto_disconnect raise end def check_security_response begin result = @channel.read rescue auto_disconnect raise end if result.nil? raise EOFError elsif result[0] != "Passed security" raise SecurityError, result[0] end end private def auto_disconnect if @channel @socket.close rescue nil @socket = @channel = nil end end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/native_support.rb000644 000765 000024 00000027473 12233035540 024142 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger class NativeSupportLoader def self.supported? return !defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" end def try_load if defined?(NativeSupport) return true else load_from_native_support_output_dir || load_from_buildout_dir || load_from_load_path || load_from_home_dir end end def start if ENV['PASSENGER_USE_RUBY_NATIVE_SUPPORT'] == '0' STDERR.puts " --> Continuing without #{library_name}." STDERR.puts " Because PASSENGER_USE_RUBY_NATIVE_SUPPORT is set to 0." return false elsif try_load return true elsif compile_and_load || download_binary_and_load STDERR.puts " --> #{library_name} successfully loaded." return true else STDERR.puts " --> Continuing without #{library_name}." return false end end private def archdir @archdir ||= begin PhusionPassenger.require_passenger_lib 'platform_info/binary_compatibility' PlatformInfo.ruby_extension_binary_compatibility_id end end def libext @libext ||= begin PhusionPassenger.require_passenger_lib 'platform_info/operating_system' PlatformInfo.library_extension end end def home @home ||= begin require 'etc' if !defined?(Etc) home = Etc.getpwuid(Process.uid).dir end end def library_name return "passenger_native_support.#{libext}" end def extconf_rb File.join(PhusionPassenger.ruby_extension_source_dir, "extconf.rb") end def load_from_native_support_output_dir # Quick workaround for people suffering from # https://code.google.com/p/phusion-passenger/issues/detail?id=865 output_dir = ENV['PASSENGER_NATIVE_SUPPORT_OUTPUT_DIR'] if output_dir && !output_dir.empty? begin return load_native_extension("#{output_dir}/#{VERSION_STRING}/#{archdir}/#{library_name}") rescue LoadError return false end else return false end end def load_from_buildout_dir if PhusionPassenger.buildout_dir begin return load_native_extension("#{PhusionPassenger.buildout_dir}/ruby/#{archdir}/#{library_name}") rescue LoadError return false end else return false end end def load_from_load_path return load_native_extension('passenger_native_support') rescue LoadError return false end def load_from_home_dir begin return load_native_extension("#{home}/#{USER_NAMESPACE_DIRNAME}/native_support/#{VERSION_STRING}/#{archdir}/#{library_name}") rescue LoadError return false end end def download_binary_and_load if !PhusionPassenger.installed_from_release_package? return end if ENV['PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY'] == '0' STDERR.puts " --> Skipping downloading of precompiled #{library_name}" return end STDERR.puts " --> Downloading precompiled #{library_name} for the current Ruby interpreter..." STDERR.puts " (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)" require 'shellwords' require 'logger' PhusionPassenger.require_passenger_lib 'platform_info/ruby' PhusionPassenger.require_passenger_lib 'utils/tmpio' PhusionPassenger.require_passenger_lib 'utils/download' PhusionPassenger::Utils.mktmpdir("passenger-native-support-") do |dir| Dir.chdir(dir) do basename = "rubyext-#{archdir}.tar.gz" if !download(basename, dir, :total_timeout => 30) return false end s_basename = Shellwords.escape(basename) sh "tar xzf #{s_basename}" sh "rm -f #{s_basename}" STDERR.puts " Checking whether downloaded binary is usable..." File.open("test.rb", "w") do |f| f.puts(%Q{ require File.expand_path('passenger_native_support') f = File.open("test.txt", "w") PhusionPassenger::NativeSupport.writev(f.fileno, ["hello", "\n"]) }) end if sh_nonfatal("#{PlatformInfo.ruby_command} -I. test.rb") && File.exist?("test.txt") && File.read("test.txt") == "hello\n" STDERR.puts " Binary is usable." File.unlink("test.rb") File.unlink("test.txt") result = try_directories(installation_target_dirs) do |target_dir| files = Dir["#{dir}/*"] STDERR.puts " Installing " + files.map{ |n| File.basename(n) }.join(' ') FileUtils.cp(files, target_dir) load_result = load_native_extension("#{target_dir}/#{library_name}") [load_result, false] end return result else STDERR.puts " Binary is not usable." return false end end end end def compile_and_load if ENV['PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY'] == '0' STDERR.puts " --> Skipping compiling of #{library_name}" return false end if PhusionPassenger.natively_packaged? && !File.exist?(PhusionPassenger.ruby_extension_source_dir) PhusionPassenger.require_passenger_lib 'constants' STDERR.puts " --> No #{library_name} found for current Ruby interpreter." case PhusionPassenger.native_packaging_method when 'deb' STDERR.puts " This library provides various optimized routines that make" STDERR.puts " #{PhusionPassenger::PROGRAM_NAME} faster. Please run 'sudo apt-get install #{PhusionPassenger::DEB_DEV_PACKAGE}'" STDERR.puts " so that #{PhusionPassenger::PROGRAM_NAME} can compile one on the next run." when 'rpm' STDERR.puts " This library provides various optimized routines that make" STDERR.puts " #{PhusionPassenger::PROGRAM_NAME} faster. Please run 'sudo yum install #{PhusionPassenger::RPM_DEV_PACKAGE}-#{PhusionPassenger::VERSION_STRING}'" STDERR.puts " so that #{PhusionPassenger::PROGRAM_NAME} can compile one on the next run." else STDERR.puts " #{PhusionPassenger::PROGRAM_NAME} can compile one, but an extra package must be installed" STDERR.puts " first. Please ask your operating system vendor for instructions." end return false end STDERR.puts " --> Compiling #{library_name} for the current Ruby interpreter..." STDERR.puts " (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)" STDERR.puts " -------------------------------" require 'fileutils' require 'shellwords' PhusionPassenger.require_passenger_lib 'platform_info/ruby' target_dir = compile(installation_target_dirs) if target_dir return load_native_extension("#{target_dir}/#{library_name}") else return false end end def installation_target_dirs target_dirs = [] if (output_dir = ENV['PASSENGER_NATIVE_SUPPORT_OUTPUT_DIR']) && !output_dir.empty? target_dirs << "#{output_dir}/#{VERSION_STRING}/#{archdir}" end if PhusionPassenger.buildout_dir target_dirs << "#{PhusionPassenger.buildout_dir}/ruby/#{archdir}" end target_dirs << "#{home}/#{USER_NAMESPACE_DIRNAME}/native_support/#{VERSION_STRING}/#{archdir}" return target_dirs end def download(name, output_dir, options = {}) logger = Logger.new(STDERR) logger.level = Logger::WARN logger.formatter = proc do |severity, datetime, progname, msg| msg.gsub(/^/, " ") + "\n" end sites = PhusionPassenger.binaries_sites sites.each_with_index do |site, i| if real_download(site, name, output_dir, logger, options) logger.warn "Download OK!" if i > 0 return true elsif i != sites.size - 1 logger.warn "Trying next mirror..." end end return false end def real_download(site, name, output_dir, logger, options) url = "#{site[:url]}/#{VERSION_STRING}/#{name}" filename = "#{output_dir}/#{name}" real_options = options.merge( :cacert => site[:cacert], :use_cache => true, :logger => logger ) return PhusionPassenger::Utils::Download.download(url, filename, real_options) end def mkdir(dir) begin STDERR.puts " # mkdir -p #{dir}" FileUtils.mkdir_p(dir) rescue Errno::EEXIST end end def sh(command_string) if !sh_nonfatal(command_string) raise "Could not compile #{library_name} (\"#{command_string}\" failed)" end end def sh_nonfatal(command_string) STDERR.puts " # #{command_string}" PhusionPassenger::Utils.mktmpdir("passenger-native-support-") do |tmpdir| s_tmpdir = Shellwords.escape(tmpdir) result = system("#{command_string} >#{s_tmpdir}/log 2>&1") system("cat #{s_tmpdir}/log | sed 's/^/ /' >&2") return result end end def compile(target_dirs) try_directories(target_dirs) do |target_dir| result = sh_nonfatal("#{PlatformInfo.ruby_command} #{Shellwords.escape extconf_rb}") && sh_nonfatal("make clean && make") if result STDERR.puts " Compilation succesful." [target_dir, false] else STDERR.puts " Compilation failed." [nil, false] end end end def try_directories(dirs) result = nil dirs.each_with_index do |dir, i| begin mkdir(dir) File.open("#{dir}/.permission_test", "w").close File.unlink("#{dir}/.permission_test") STDERR.puts " # cd #{dir}" Dir.chdir(dir) do result, should_retry = yield(dir) return result if !should_retry end rescue Errno::EACCES # If we encountered a permission error, then try # the next target directory. If we get a permission # error on the last one too then propagate the # exception. if i == dirs.size - 1 STDERR.puts " Encountered permission error, " + "but no more directories to try. Giving up." STDERR.puts " -------------------------------" return nil else STDERR.puts " Encountered permission error, " + "trying a different directory..." STDERR.puts " -------------------------------" end rescue Errno::ENOTDIR # This can occur when locations.ini set buildout_dir # to an invalid path. Just ignore this error. if i == dirs.size - 1 STDERR.puts " Not a valid directory, " + "but no more directories to try. Giving up." STDERR.puts " -------------------------------" return nil else STDERR.puts " Not a valid directory. Trying a different one..." STDERR.puts " -------------------------------" end end end end def load_native_extension(name_or_filename) # If passenger_native_support.so exited because it detected that it was compiled # for a different Ruby version, then subsequent require("passenger_native_support") # calls will do nothing. So we remove passenger_native_support from $LOADED_FEATURES # to force it to be loaded. $LOADED_FEATURES.reject! { |fn| File.basename(fn) == library_name } begin require(name_or_filename) return defined?(PhusionPassenger::NativeSupport) rescue LoadError => e if e.to_s =~ /dlopen/ # Print dlopen failures. We're not interested in any other # kinds of failures, such as file-not-found. puts e.to_s.gsub(/^/, " ") end return false end end end end # module PhusionPassenger if PhusionPassenger::NativeSupportLoader.supported? PhusionPassenger::NativeSupportLoader.new.start end passenger-4.0.37/lib/phusion_passenger/nginx/000755 000765 000024 00000000000 12233035540 021641 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger/packaging.rb000644 000765 000024 00000010512 12233035540 022766 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger module Packaging # A list of HTML files that are generated with Asciidoc. ASCII_DOCS = [ 'doc/Users guide.html', 'doc/Users guide Apache.html', 'doc/Users guide Nginx.html', 'doc/Users guide Standalone.html', 'doc/Security of user switching support.html', 'doc/Architectural overview.html' ] # Files that must be generated before packaging. PREGENERATED_FILES = [ 'ext/common/Constants.h', 'doc/Packaging.html' ] + ASCII_DOCS USER_EXECUTABLES = [ 'passenger', 'passenger-install-apache2-module', 'passenger-install-nginx-module', 'passenger-config' ] SUPER_USER_EXECUTABLES = [ 'passenger-status', 'passenger-memory-stats' ] # Used during native packaging. Specifies executables for # which the shebang should NOT be set to #!/usr/bin/ruby, # so that these executables can be run with any Ruby interpreter # the user desires. EXECUTABLES_WITH_FREE_RUBY = [ 'passenger', 'passenger-config', 'passenger-install-apache2-module', 'passenger-install-nginx-module' ] # A list of globs which match all files that should be packaged # in the Phusion Passenger gem or tarball. GLOB = [ '.gitignore', '.travis.yml', 'configure', 'Rakefile', 'README.md', 'CONTRIBUTORS', 'CONTRIBUTING.md', 'LICENSE', 'INSTALL.md', 'NEWS', 'passenger.gemspec', 'build/*.rb', 'lib/*.rb', 'lib/**/*.rb', 'lib/**/*.py', 'node_lib/**/*.js', 'bin/*', 'doc/**/*', 'man/*', 'debian.template/**/*', 'rpm/**/*', 'helper-scripts/**/*', 'ext/common/**/*.{cpp,c,h,hpp,md,erb}', 'ext/apache2/*.{cpp,h,hpp,c,erb}', 'ext/nginx/*.{c,cpp,h,erb}', 'ext/nginx/config', 'ext/boost/**/*', 'ext/libev/{LICENSE,Changes,README,Makefile.am,Makefile.in}', 'ext/libev/{*.m4,autogen.sh,config.guess,config.h.in,config.sub}', 'ext/libev/{configure,configure.ac,depcomp,install-sh,ltmain.sh,missing,mkinstalldirs}', 'ext/libev/{*.h,*.c}', 'ext/libeio/{LICENSE,Changes,README,Makefile.am,Makefile.in}', 'ext/libeio/{*.m4,autogen.sh,config.guess,config.h.in,config.sub}', 'ext/libeio/{configure,configure.ac,install-sh,ltmain.sh,missing,mkinstalldirs}', 'ext/libeio/{*.h,*.c}', 'ext/oxt/*.hpp', 'ext/oxt/*.cpp', 'ext/oxt/*.txt', 'ext/oxt/detail/*.hpp', 'ext/ruby/*.{c,rb}', 'dev/*', 'resources/**/*', 'test/.rspec', 'test/*.example', 'test/*.travis', 'test/*.rpm-automation', 'test/*.supp', 'test/support/*.{c,cpp,h,rb}', 'test/tut/*', 'test/cxx/**/*.{cpp,h}', 'test/oxt/*.{cpp,hpp}', 'test/ruby/**/*', 'test/node/**/*', 'test/integration_tests/**/*', 'test/stub/**/*', 'test/stub/**/.*' ] EXCLUDE_GLOB = [ 'test/stub/rails_apps/3.0/empty/help/**/*', 'test/stub/*.dSYM' ] # Files that should be excluded from the Debian tarball. DEBIAN_EXCLUDE_GLOB = [ "debian.template/**/*", ] # Files and directories that should be excluded from the Homebrew installation. HOMEBREW_EXCLUDE = [ "dev", "test", ".gitignore", ".travis.yml", "debian.template", "rpm" ] def self.files return Dir[*GLOB] - Dir[*EXCLUDE_GLOB] end def self.debian_orig_tarball_files return files - Dir[*DEBIAN_EXCLUDE_GLOB] end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/platform_info/000755 000765 000024 00000000000 12233035540 023355 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger/platform_info.rb000644 000765 000024 00000034440 12233035540 023707 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'utils/tmpio' module PhusionPassenger # This module autodetects various platform-specific information, and # provides that information through constants. module PlatformInfo private @@cache_dir = nil @@verbose = ['1', 'true', 'on', 'yes'].include?(ENV['VERBOSE']) @@log_implementation = lambda do |message| message = reindent(message, 3) message.sub!(/^ /, '') STDERR.puts " * #{message}" end def self.private_class_method(name) metaclass = class << self; self; end metaclass.send(:private, name) end private_class_method :private_class_method # Turn the specified class method into a memoized one. If the given # class method is called without arguments, then its result will be # memoized, frozen, and returned upon subsequent calls without arguments. # Calls with arguments are never memoized. # # If +cache_to_disk+ is true and a cache directory has been set with # PlatformInfo.cache_dir= then result is cached to a file on disk, # so that memoized results persist over multiple process runs. This # cache file expires in +cache_time+ seconds (1 hour by default) after # it has been written. # # def self.foo(max = 10) # rand(max) # end # memoize :foo # # foo # => 3 # foo # => 3 # foo(100) # => 49 # foo(100) # => 26 # foo # => 3 def self.memoize(method, cache_to_disk = false, cache_time = 3600) # We use class_eval here because Ruby 1.8.5 doesn't support class_variable_get/set. metaclass = class << self; self; end metaclass.send(:alias_method, "_unmemoized_#{method}", method) variable_name = "@@memoized_#{method}".sub(/\?/, '') check_variable_name = "@@has_memoized_#{method}".sub(/\?/, '') eval(%Q{ #{variable_name} = nil #{check_variable_name} = false }) line = __LINE__ + 1 source = %Q{ def self.#{method}(*args) # def self.httpd(*args) if args.empty? # if args.empty? if !#{check_variable_name} # if !@@has_memoized_httpd if @@cache_dir # if @@cache_dir cache_file = File.join(@@cache_dir, "#{method}") # cache_file = File.join(@@cache_dir, "httpd") end # end read_from_cache_file = false # read_from_cache_file = false if #{cache_to_disk} && cache_file && File.exist?(cache_file) # if #{cache_to_disk} && File.exist?(cache_file) cache_file_stat = File.stat(cache_file) # cache_file_stat = File.stat(cache_file) read_from_cache_file = # read_from_cache_file = Time.now - cache_file_stat.mtime < #{cache_time} # Time.now - cache_file_stat.mtime < #{cache_time} end # end if read_from_cache_file # if read_from_cache_file data = File.read(cache_file) # data = File.read(cache_file) #{variable_name} = Marshal.load(data).freeze # @@memoized_httpd = Marshal.load(data).freeze #{check_variable_name} = true # @@has_memoized_httpd = true else # else #{variable_name} = _unmemoized_#{method}.freeze # @@memoized_httpd = _unmemoized_httpd.freeze #{check_variable_name} = true # @@has_memoized_httpd = true if cache_file && #{cache_to_disk} # if cache_file && #{cache_to_disk} begin # begin if !File.directory?(@@cache_dir) # if !File.directory?(@@cache_dir) Dir.mkdir(@@cache_dir) # Dir.mkdir(@@cache_dir) end # end File.open(cache_file, "wb") do |f| # File.open(cache_file, "wb") do |f| f.write(Marshal.dump(#{variable_name})) # f.write(Marshal.dump(@@memoized_httpd)) end # end rescue Errno::EACCES # rescue Errno::EACCES # Ignore permission error. # # Ignore permission error. end # end end # end end # end end # end #{variable_name} # @@memoized_httpd else # else _unmemoized_#{method}(*args) # _unmemoized_httpd(*args) end # end end # end } class_eval(source, __FILE__, line) end private_class_method :memoize # Look in the directory +dir+ and check whether there's an executable # whose base name is equal to one of the elements in +possible_names+. # If so, returns the full filename. If not, returns nil. def self.select_executable(dir, *possible_names) possible_names.each do |name| filename = "#{dir}/#{name}" if File.file?(filename) && File.executable?(filename) return filename end end return nil end private_class_method :select_executable def self.unindent(str) str = str.dup str.gsub!(/\A([\s\t]*\n)+/, '') str.gsub!(/[\s\t\n]+\Z/, '') indent = str.split("\n").select{ |line| !line.strip.empty? }.map{ |line| line.index(/[^\s]/) }.compact.min || 0 str.gsub!(/^[[:blank:]]{#{indent}}/, '') return str end private_class_method :unindent def self.reindent(str, level) str = unindent(str) str.gsub!(/^/, ' ' * level) return str end private_class_method :reindent def self.create_temp_file(name, dir = tmpdir) # This function is mostly used for compiling C programs to autodetect # system properties. We create a secure temp subdirectory to prevent # TOCTU attacks, especially because we don't know how the compiler # handles this. PhusionPassenger::Utils.mktmpdir("passenger.", dir) do |subdir| filename = "#{subdir}/#{name}" f = File.open(filename, "w") begin yield(filename, f) ensure f.close if !f.closed? end end end private_class_method :create_temp_file def self.log(message) if verbose? @@log_implementation.call(message) end end private_class_method :log public class RuntimeError < ::RuntimeError end def self.cache_dir=(value) @@cache_dir = value end def self.cache_dir return @@cache_dir end def self.verbose=(val) @@verbose = val end def self.verbose? return @@verbose end def self.log_implementation=(impl) @@log_implementation = impl end def self.log_implementation return @@log_implementation end def self.env_defined?(name) return !ENV[name].nil? && !ENV[name].empty? end def self.string_env(name, default_value = nil) value = ENV[name] if value.nil? || value.empty? return default_value else return value end end def self.read_file(filename) return File.open(filename, "rb") do |f| f.read end rescue return "" end def self.tmpdir result = ENV['TMPDIR'] if result && !result.empty? return result.sub(/\/+\Z/, '') else return '/tmp' end end memoize :tmpdir # Returns the directory in which test executables should be placed. The # returned directory is guaranteed to be writable and guaranteed to # not be mounted with the 'noexec' option. # If no such directory can be found then it will raise a PlatformInfo::RuntimeError # with an appropriate error message. def self.tmpexedir basename = "test-exe.#{Process.pid}.#{Thread.current.object_id}" attempts = [] dir = tmpdir filename = "#{dir}/#{basename}" begin File.open(filename, 'w') do |f| f.puts("#!/bin/sh") end File.chmod(0700, filename) if system(filename) return dir else attempts << { :dir => dir, :error => "This directory's filesystem is mounted with the 'noexec' option." } end rescue Errno::ENOENT attempts << { :dir => dir, :error => "This directory doesn't exist." } rescue Errno::EACCES attempts << { :dir => dir, :error => "This program doesn't have permission to write to this directory." } rescue SystemCallError => e attempts << { :dir => dir, :error => e.message } ensure File.unlink(filename) rescue nil end dir = Dir.pwd filename = "#{dir}/#{basename}" begin File.open(filename, 'w') do |f| f.puts("#!/bin/sh") end File.chmod(0700, filename) if system(filename) return dir else attempts << { :dir => dir, :error => "This directory's filesystem is mounted with the 'noexec' option." } end rescue Errno::ENOENT attempts << { :dir => dir, :error => "This directory doesn't exist." } rescue Errno::EACCES attempts << { :dir => dir, :error => "This program doesn't have permission to write to this directory." } rescue SystemCallError => e attempts << { :dir => dir, :error => e.message } ensure File.unlink(filename) rescue nil end message = "ERROR: Cannot find suitable temporary directory\n" + "In order to run certain tests, this program " + "must be able to write temporary\n" + "executable files to some directory. However no such " + "directory can be found. \n" + "The following directories have been tried:\n\n" attempts.each do |attempt| message << " * #{attempt[:dir]}\n" message << " #{attempt[:error]}\n" end message << "\nYou can solve this problem by telling this program what directory to write\n" << "temporary executable files to, as follows:\n" << "\n" << " Set the $TMPDIR environment variable to the desired directory's filename and\n" << " re-run this program.\n" << "\n" << "Notes:\n" << "\n" << " * If you're using 'sudo'/'rvmsudo', remember that 'sudo'/'rvmsudo' unsets all\n" << " environment variables, so you must set the environment variable *after*\n" << " having gained root privileges.\n" << " * The directory you choose must writeable and must not be mounted with the\n" << " 'noexec' option." raise RuntimeError, message end memoize :tmpexedir def self.rb_config if defined?(::RbConfig) return ::RbConfig::CONFIG else return ::Config::CONFIG end end # Check whether the specified command is in $PATH, and return its # absolute filename. Returns nil if the command is not found. # # This function exists because system('which') doesn't always behave # correctly, for some weird reason. # # When `is_executable` is true, this function checks whether # there is an executable named `name` in $PATH. When false, it # assumes that `name` is not an executable name but a command string # (e.g. "ccache gcc"). It then infers the executable name ("ccache") # from the command string, and checks for that instead. def self.find_command(name, is_executable = true) name = name.to_s if !is_executable && name =~ / / name = name.sub(/ .*/, '') end if name =~ /^\// if File.executable?(name) return name else return nil end else ENV['PATH'].to_s.split(File::PATH_SEPARATOR).each do |directory| next if directory.empty? path = File.join(directory, name) if File.file?(path) && File.executable?(path) return path end end return nil end end def self.find_all_commands(name) search_dirs = ENV['PATH'].to_s.split(File::PATH_SEPARATOR) search_dirs.concat(%w(/bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin)) ["/opt/*/bin", "/opt/*/sbin", "/usr/local/*/bin", "/usr/local/*/sbin"].each do |glob| search_dirs.concat(Dir[glob]) end search_dirs.delete("") search_dirs.uniq! result = [] search_dirs.each do |directory| path = File.join(directory, name) if !File.exist?(path) log "Looking for #{path}: not found" elsif !File.file?(path) log "Looking for #{path}: found, but is not a file" elsif !File.executable?(path) log "Looking for #{path}: found, but is not executable" else log "Looking for #{path}: found" result << path end end return result end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/plugin.rb000644 000765 000024 00000005167 12233035540 022352 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'etc' module PhusionPassenger class Plugin @@hooks = {} @@classes = {} def self.load(name, load_once = true) PLUGIN_DIRS.each do |plugin_dir| if plugin_dir =~ /\A~/ # File.expand_path uses ENV['HOME'] which we don't want. home = Etc.getpwuid(Process.uid).dir plugin_dir = plugin_dir.sub(/\A~/, home) end plugin_dir = File.expand_path(plugin_dir) Dir["#{plugin_dir}/*/#{name}.rb"].each do |filename| if load_once require(filename) else load(filename) end end end end def self.register_hook(name, &block) hooks_list = (@@hooks[name] ||= []) hooks_list << block end def self.call_hook(name, *args, &block) last_result = nil if (hooks_list = @@hooks[name]) hooks_list.each do |callback| last_result = callback.call(*args, &block) end end return last_result end def self.register(name, klass) classes = (@@classes[name] ||= []) classes << klass end def initialize(name, *args, &block) Plugin.load(name) classes = @@classes[name] if classes @instances = classes.map do |klass| klass.new(*args, &block) end else return nil end end def call_hook(name, *args, &block) last_result = nil if @instances @instances.each do |instance| if instance.respond_to?(name.to_sym) last_result = instance.__send__(name.to_sym, *args, &block) end end end return last_result end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/preloader_shared_helpers.rb000644 000765 000024 00000010353 12233035540 026072 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2011, 2012 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'socket' PhusionPassenger.require_passenger_lib 'native_support' module PhusionPassenger # Provides shared functions for preloader apps. module PreloaderSharedHelpers extend self def init(options) if !Kernel.respond_to?(:fork) message = "Smart spawning is not available on this Ruby " + "implementation because it does not support `Kernel.fork`. " if ENV['SERVER_SOFTWARE'].to_s =~ /nginx/i message << "Please set `passenger_spawn_method` to `direct`." else message << "Please set `PassengerSpawnMethod` to `direct`." end raise(message) end return options end def accept_and_process_next_client(server_socket) original_pid = Process.pid client = server_socket.accept client.binmode begin command = client.readline rescue EOFError return nil end if command !~ /\n\Z/ STDERR.puts "Command must end with a newline" elsif command == "spawn\n" while client.readline != "\n" # Do nothing. end # Improve copy-on-write friendliness. GC.start pid = fork if pid.nil? $0 = "#{$0} (forking...)" client.puts "OK" client.puts Process.pid client.flush client.sync = true return [:forked, client] elsif defined?(NativeSupport) NativeSupport.detach_process(pid) else Process.detach(pid) end else STDERR.puts "Unknown command '#{command.inspect}'" end return nil ensure if client && Process.pid == original_pid begin client.close rescue Errno::EINVAL # Work around OS X bug. # https://code.google.com/p/phusion-passenger/issues/detail?id=854 end end end def run_main_loop(options) $0 = "Passenger AppPreloader: #{options['app_root']}" client = nil original_pid = Process.pid socket_filename = "#{options['generation_dir']}/backends/preloader.#{Process.pid}" server = UNIXServer.new(socket_filename) server.close_on_exec! # Update the dump information just before telling the preloader that we're # ready because the HelperAgent will read and memorize this information. LoaderSharedHelpers.dump_all_information puts "!> Ready" puts "!> socket: unix:#{socket_filename}" puts "!> " while true # We call ::select just in case someone overwrites the global select() # function by including ActionView::Helpers in the wrong place. # https://code.google.com/p/phusion-passenger/issues/detail?id=915 ios = Kernel.select([server, STDIN])[0] if ios.include?(server) result, client = accept_and_process_next_client(server) if result == :forked STDIN.reopen(client) STDOUT.reopen(client) STDOUT.sync = true client.close return :forked end end if ios.include?(STDIN) if STDIN.tty? begin # Prevent bash from exiting when we press Ctrl-D. STDIN.read_nonblock(1) rescue Errno::EAGAIN # Do nothing. end end break end end return nil ensure server.close if server if original_pid == Process.pid File.unlink(socket_filename) rescue nil end end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/public_api.rb000644 000765 000024 00000007014 12233035540 023154 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger class << self @@event_starting_worker_process = [] @@event_stopping_worker_process = [] @@event_starting_request_handler_thread = [] @@event_credentials = [] @@event_after_installing_signal_handlers = [] @@event_oob_work = [] @@advertised_concurrency_level = nil def on_event(name, &block) callback_list_for_event(name) << block end def call_event(name, *args) callback_list_for_event(name).each do |callback| callback.call(*args) end end def install_framework_extensions!(*args) require 'active_support/version' if defined?(::ActiveSupport) && !defined?(::ActiveSupport::VERSION) if defined?(::ActiveSupport) && ::ActiveSupport::VERSION::MAJOR >= 3 PhusionPassenger.require_passenger_lib 'active_support3_extensions/init' ActiveSupport3Extensions.init!(PhusionPassenger::App.options, *args) end end def advertised_concurrency_level @@advertised_concurrency_level end def advertised_concurrency_level=(value) @@advertised_concurrency_level = value end def benchmark(env = nil, title = "Benchmarking") log = lookup_analytics_log(env) if log log.measure("BENCHMARK: #{title}") do yield end else yield end end def log_cache_hit(env, name) log = lookup_analytics_log(env) if log log.message("Cache hit: #{name}") return true else return false end end def log_cache_miss(env, name, generation_time = nil) log = lookup_analytics_log(env) if log if generation_time log.message("Cache miss (#{generation_time.to_i}): #{name}") else log.message("Cache miss: #{name}") end return true else return false end end private def callback_list_for_event(name) return case name when :starting_worker_process @@event_starting_worker_process when :stopping_worker_process @@event_stopping_worker_process when :starting_request_handler_thread @@event_starting_request_handler_thread when :credentials @@event_credentials when :after_installing_signal_handlers @@event_after_installing_signal_handlers when :oob_work @@event_oob_work else raise ArgumentError, "Unknown event name '#{name}'" end end def lookup_analytics_log(env) if env return env[PASSENGER_ANALYTICS_WEB_LOG] else return Thread.current[PASSENGER_ANALYTICS_WEB_LOG] end end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/rack/000755 000765 000024 00000000000 12233035540 021436 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger/request_handler/000755 000765 000024 00000000000 12233035540 023703 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger/request_handler.rb000644 000765 000024 00000047723 12233035540 024245 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'socket' require 'fcntl' PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'public_api' PhusionPassenger.require_passenger_lib 'message_client' PhusionPassenger.require_passenger_lib 'debug_logging' PhusionPassenger.require_passenger_lib 'native_support' PhusionPassenger.require_passenger_lib 'utils' PhusionPassenger.require_passenger_lib 'utils/tmpdir' PhusionPassenger.require_passenger_lib 'ruby_core_enhancements' PhusionPassenger.require_passenger_lib 'request_handler/thread_handler' module PhusionPassenger class RequestHandler include DebugLogging include Utils # Signal which will cause the Rails application to exit immediately. HARD_TERMINATION_SIGNAL = "SIGTERM" # Signal which will cause the Rails application to exit as soon as it's done processing a request. SOFT_TERMINATION_SIGNAL = "SIGUSR1" BACKLOG_SIZE = 500 # String constants which exist to relieve Ruby's garbage collector. IGNORE = 'IGNORE' # :nodoc: DEFAULT = 'DEFAULT' # :nodoc: # A hash containing all server sockets that this request handler listens on. # The hash is in the form of: # # { # name1 => [socket_address1, socket_type1, socket1], # name2 => [socket_address2, socket_type2, socket2], # ... # } # # +name+ is a Symbol. +socket_addressx+ is the address of the socket, # +socket_typex+ is the socket's type (either 'unix' or 'tcp') and # +socketx+ is the actual socket IO objec. # There's guaranteed to be at least one server socket, namely one with the # name +:main+. attr_reader :server_sockets attr_reader :concurrency # If a soft termination signal was received, then the main loop will quit # the given amount of seconds after the last time a connection was accepted. # Defaults to 3 seconds. attr_accessor :soft_termination_linger_time # A password with which clients must authenticate. Default is unauthenticated. attr_accessor :connect_password # Create a new RequestHandler with the given owner pipe. # +owner_pipe+ must be the readable part of a pipe IO object. # # Additionally, the following options may be given: # - detach_key # - connect_password # - pool_account_username # - pool_account_password_base64 def initialize(owner_pipe, options = {}) require_option(options, "app_group_name") install_options_as_ivars(self, options, "app", "app_group_name", "connect_password", "detach_key", "analytics_logger", "pool_account_username" ) @force_http_session = ENV["_PASSENGER_FORCE_HTTP_SESSION"] == "true" if @force_http_session @connect_password = nil end @thread_handler = options["thread_handler"] || ThreadHandler @concurrency = 1 if options["pool_account_password_base64"] @pool_account_password = options["pool_account_password_base64"].unpack('m').first end ############# ############# @server_sockets = {} if should_use_unix_sockets? @main_socket_address, @main_socket = create_unix_socket_on_filesystem else @main_socket_address, @main_socket = create_tcp_socket end @server_sockets[:main] = { :address => @main_socket_address, :socket => @main_socket, :protocol => @force_http_session ? :http_session : :session, :concurrency => @concurrency } @http_socket_address, @http_socket = create_tcp_socket @server_sockets[:http] = { :address => @http_socket_address, :socket => @http_socket, :protocol => :http, :concurrency => 1 } @owner_pipe = owner_pipe @options = options @previous_signal_handlers = {} @main_loop_generation = 0 @main_loop_thread_lock = Mutex.new @main_loop_thread_cond = ConditionVariable.new @threads = [] @threads_mutex = Mutex.new @soft_termination_linger_time = 3 @main_loop_running = false ############# end # Clean up temporary stuff created by the request handler. # # If the main loop was started by #main_loop, then this method may only # be called after the main loop has exited. # # If the main loop was started by #start_main_loop_thread, then this method # may be called at any time, and it will stop the main loop thread. def cleanup if @main_loop_thread @main_loop_thread_lock.synchronize do @graceful_termination_pipe[1].close rescue nil end @main_loop_thread.join end @server_sockets.each_value do |value| address, type, socket = value socket.close rescue nil if type == 'unix' File.unlink(address) rescue nil end end @owner_pipe.close rescue nil end # Check whether the main loop's currently running. def main_loop_running? @main_loop_thread_lock.synchronize do return @main_loop_running end end # Enter the request handler's main loop. def main_loop debug("Entering request handler main loop") reset_signal_handlers begin @graceful_termination_pipe = IO.pipe @graceful_termination_pipe[0].close_on_exec! @graceful_termination_pipe[1].close_on_exec! @main_loop_thread_lock.synchronize do @main_loop_generation += 1 @main_loop_running = true @main_loop_thread_cond.broadcast @select_timeout = nil @selectable_sockets = [] @server_sockets.each_value do |value| socket = value[2] @selectable_sockets << socket if socket end @selectable_sockets << @owner_pipe @selectable_sockets << @graceful_termination_pipe[0] end install_useful_signal_handlers start_threads wait_until_termination_requested wait_until_all_threads_are_idle terminate_threads debug("Request handler main loop exited normally") rescue EOFError # Exit main loop. trace(2, "Request handler main loop interrupted by EOFError exception") rescue Interrupt # Exit main loop. trace(2, "Request handler main loop interrupted by Interrupt exception") rescue SignalException => signal trace(2, "Request handler main loop interrupted by SignalException") if signal.message != HARD_TERMINATION_SIGNAL && signal.message != SOFT_TERMINATION_SIGNAL raise end rescue Exception => e trace(2, "Request handler main loop interrupted by #{e.class} exception") raise ensure debug("Exiting request handler main loop") revert_signal_handlers @main_loop_thread_lock.synchronize do @graceful_termination_pipe[1].close rescue nil @graceful_termination_pipe[0].close rescue nil @selectable_sockets = [] @main_loop_generation += 1 @main_loop_running = false @main_loop_thread_cond.broadcast end end end # Start the main loop in a new thread. This thread will be stopped by #cleanup. def start_main_loop_thread current_generation = @main_loop_generation @main_loop_thread = Thread.new do begin main_loop rescue Exception => e print_exception(self.class, e) end end @main_loop_thread_lock.synchronize do while @main_loop_generation == current_generation @main_loop_thread_cond.wait(@main_loop_thread_lock) end end end # Remove this request handler from the application pool so that no # new connections will come in. Then make the main loop quit a few # seconds after the last time a connection came in. This all is to # ensure that no connections come in while we're shutting down. # # May only be called while the main loop is running. May be called # from any thread. def soft_shutdown @soft_termination_linger_thread ||= Thread.new do debug("Soft termination initiated") if @detach_key && @pool_account_username && @pool_account_password client = MessageClient.new(@pool_account_username, @pool_account_password) begin client.pool_detach_process_by_key(@detach_key) ensure client.close end end wait_until_all_threads_are_idle debug("Soft terminating in #{@soft_termination_linger_time} seconds") sleep @soft_termination_linger_time @graceful_termination_pipe[1].close rescue nil end end private def should_use_unix_sockets? # Historical note: # There seems to be a bug in MacOS X Leopard w.r.t. Unix server # sockets file descriptors that are passed to another process. # Usually Unix server sockets work fine, but when they're passed # to another process, then clients that connect to the socket # can incorrectly determine that the client socket is closed, # even though that's not actually the case. More specifically: # recv()/read() calls on these client sockets can return 0 even # when we know EOF is not reached. # # The ApplicationPool infrastructure used to connect to a backend # process's Unix socket in the helper server process, and then # pass the connection file descriptor to the web server, which # triggers this kernel bug. We used to work around this by using # TCP sockets instead of Unix sockets; TCP sockets can still fail # with this fake-EOF bug once in a while, but not nearly as often # as with Unix sockets. # # This problem no longer applies today. The web server now passes # all I/O through the HelperAgent, and the bug is no longer # triggered. Nevertheless, we keep this function intact so that # if something like this ever happens again, we know why, and we # can easily reactivate the workaround. Or maybe if we just need # TCP sockets for some other reason. #return RUBY_PLATFORM !~ /darwin/ ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby" # Unix domain socket implementation on JRuby # is still bugged as of version 1.7.0. They can # cause unexplicable freezes when used in combination # with threading. return !@force_http_session && ruby_engine != "jruby" end def create_unix_socket_on_filesystem while true begin if defined?(NativeSupport) unix_path_max = NativeSupport::UNIX_PATH_MAX else unix_path_max = 100 end socket_address = "#{passenger_tmpdir}/backends/ruby.#{generate_random_id(:base64)}" socket_address = socket_address.slice(0, unix_path_max - 10) socket = UNIXServer.new(socket_address) socket.listen(BACKLOG_SIZE) socket.close_on_exec! File.chmod(0600, socket_address) return ["unix:#{socket_address}", socket] rescue Errno::EADDRINUSE # Do nothing, try again with another name. end end end def create_tcp_socket # We use "127.0.0.1" as address in order to force # TCPv4 instead of TCPv6. socket = TCPServer.new('127.0.0.1', 0) socket.listen(BACKLOG_SIZE) socket.close_on_exec! socket_address = "tcp://127.0.0.1:#{socket.addr[1]}" return [socket_address, socket] end # Reset signal handlers to their default handler, and install some # special handlers for a few signals. The previous signal handlers # will be put back by calling revert_signal_handlers. def reset_signal_handlers Signal.list_trappable.each_key do |signal| begin prev_handler = trap(signal, DEFAULT) if prev_handler != DEFAULT @previous_signal_handlers[signal] = prev_handler end rescue ArgumentError # Signal cannot be trapped; ignore it. end end trap('HUP', IGNORE) PhusionPassenger.call_event(:after_installing_signal_handlers) end def install_useful_signal_handlers trappable_signals = Signal.list_trappable trap(SOFT_TERMINATION_SIGNAL) do begin soft_shutdown rescue => e print_exception("Passenger RequestHandler soft shutdown routine", e) end end if trappable_signals.has_key?(SOFT_TERMINATION_SIGNAL.sub(/^SIG/, '')) trap('ABRT') do print_status_report end if trappable_signals.has_key?('ABRT') trap('QUIT') do print_status_report end if trappable_signals.has_key?('QUIT') end def revert_signal_handlers @previous_signal_handlers.each_pair do |signal, handler| trap(signal, handler) end end def print_status_report warn(Utils.global_backtrace_report) warn("Threads: #{@threads.inspect}") end def start_threads common_options = { :app => @app, :app_group_name => @app_group_name, :connect_password => @connect_password, :analytics_logger => @analytics_logger } main_socket_options = common_options.merge( :server_socket => @main_socket, :socket_name => "main socket", :protocol => @server_sockets[:main][:protocol] == :session ? :session : :http ) http_socket_options = common_options.merge( :server_socket => @http_socket, :socket_name => "HTTP socket", :protocol => :http ) # Used for marking threads that have finished initializing, # or failed during initialization. Threads that are not yet done # are not in `initialization_state`. Threads that have succeeded # set their own state to true. Threads that have failed set their # own state to false. initialization_state_mutex = Mutex.new initialization_state_cond = ConditionVariable.new initialization_state = {} set_initialization_state = lambda do |value| initialization_state_mutex.synchronize do initialization_state[Thread.current] = value initialization_state_cond.signal end end set_initialization_state_to_true = lambda do set_initialization_state.call(true) end # Actually start all the threads. thread_handler = @thread_handler expected_nthreads = 0 @threads_mutex.synchronize do @concurrency.times do |i| thread = Thread.new(i) do |number| Thread.current.abort_on_exception = true begin Thread.current[:name] = "Worker #{number + 1}" handler = thread_handler.new(self, main_socket_options) handler.install handler.main_loop(set_initialization_state_to_true) ensure set_initialization_state.call(false) unregister_current_thread end end @threads << thread expected_nthreads += 1 end thread = Thread.new do Thread.current.abort_on_exception = true begin Thread.current[:name] = "HTTP helper worker" handler = thread_handler.new(self, http_socket_options) handler.install handler.main_loop(set_initialization_state_to_true) ensure set_initialization_state.call(false) unregister_current_thread end end @threads << thread expected_nthreads += 1 end # Wait until all threads have finished starting. initialization_state_mutex.synchronize do while initialization_state.size != expected_nthreads initialization_state_cond.wait(initialization_state_mutex) end end end def unregister_current_thread @threads_mutex.synchronize do @threads.delete(Thread.current) end end def wait_until_termination_requested ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby" if ruby_engine == "jruby" # On JRuby, selecting on an input TTY always returns, so # we use threads to do the job. owner_pipe_watcher = IO.pipe owner_pipe_watcher_thread = Thread.new do Thread.current.abort_on_exception = true Thread.current[:name] = "Owner pipe waiter" begin @owner_pipe.read(1) ensure owner_pipe_watcher[1].write('x') end end begin ios = select([owner_pipe_watcher[0], @graceful_termination_pipe[0]])[0] if ios.include?(owner_pipe_watcher[0]) trace(2, "Owner pipe closed") else trace(2, "Graceful termination pipe closed") end ensure owner_pipe_watcher_thread.kill owner_pipe_watcher_thread.join owner_pipe_watcher[0].close if !owner_pipe_watcher[0].closed? owner_pipe_watcher[1].close if !owner_pipe_watcher[1].closed? end else ios = select([@owner_pipe, @graceful_termination_pipe[0]])[0] if ios.include?(@owner_pipe) trace(2, "Owner pipe closed") else trace(2, "Graceful termination pipe closed") end end end def wakeup_all_threads threads = [] if get_socket_address_type(@server_sockets[:main][:address]) == :unix && !File.exist?(@server_sockets[:main][:address].sub(/^unix:/, '')) # It looks like someone deleted the Unix domain socket we listen on. # This makes it impossible to wake up the worker threads gracefully, # so we hard kill them. warn("Unix domain socket gone; force aborting all threads") @threads_mutex.synchronize do @threads.each do |thread| thread.raise(RuntimeError.new("Force abort")) end end else @concurrency.times do Thread.abort_on_exception = true threads << Thread.new(@server_sockets[:main][:address]) do |address| begin debug("Shutting down worker thread by connecting to #{address}") connect_to_server(address).close rescue Errno::ECONNREFUSED debug("Worker thread listening on #{address} already exited") rescue SystemCallError, IOError => e debug("Error shutting down worker thread (#{address}): #{e} (#{e.class})") end end end end threads << Thread.new(@server_sockets[:http][:address]) do |address| Thread.abort_on_exception = true begin debug("Shutting down HTTP thread by connecting to #{address}") connect_to_server(address).close rescue Errno::ECONNREFUSED debug("Worker thread listening on #{address} already exited") rescue SystemCallError, IOError => e debug("Error shutting down HTTP thread (#{address}): #{e} (#{e.class})") end end return threads end def terminate_threads debug("Stopping all threads") threads = @threads_mutex.synchronize do @threads.dup end threads.each do |thr| thr.raise(ThreadHandler::Interrupted.new) end threads.each do |thr| thr.join end debug("All threads stopped") end def wait_until_all_threads_are_idle debug("Waiting until all threads have become idle...") # We wait until 100 ms have passed since all handlers have become # interruptable and remained in the same iterations. done = false while !done handlers = @threads_mutex.synchronize do @threads.map do |thr| thr[:passenger_thread_handler] end end debug("There are currently #{handlers.size} threads") if handlers.empty? # There are no threads, so we're done. done = true break end # Record initial state. handlers.each { |h| h.stats_mutex.lock } iterations = handlers.map { |h| h.iteration } handlers.each { |h| h.stats_mutex.unlock } start_time = Time.now sleep 0.01 while true if handlers.size != @threads_mutex.synchronize { @threads.size } debug("The number of threads changed. Restarting waiting algorithm") break end # Record current state. handlers.each { |h| h.stats_mutex.lock } all_interruptable = handlers.all? { |h| h.interruptable } new_iterations = handlers.map { |h| h.iteration } # Are all threads interruptable and has there been no activity # since last time we checked? if all_interruptable && new_iterations == iterations # Yes. If enough time has passed then we're done. handlers.each { |h| h.stats_mutex.unlock } if Time.now >= start_time + 0.1 done = true break end else # No. We reset the timer and check again later. handlers.each { |h| h.stats_mutex.unlock } iterations = new_iterations start_time = Time.now sleep 0.01 end end end debug("All threads are now idle") end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/ruby_core_enhancements.rb000644 000765 000024 00000012702 12233035540 025566 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010, 2011, 2012 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. begin require 'rubygems' rescue LoadError end require 'socket' require 'thread' if (!defined?(RUBY_ENGINE) || RUBY_ENGINE == "ruby") && RUBY_VERSION < "1.8.7" begin require 'fastthread' rescue LoadError abort "You are using a very old Ruby version. You must install " + "the 'fastthread' gem to fix some bugs in the Ruby threading system: " + "gem install fastthread" end end PhusionPassenger.require_passenger_lib 'native_support' class Exception def backtrace_string(current_location = nil) if current_location.nil? location = nil else location = "in #{current_location} " end current_thread = Thread.current if !(thread_id = current_thread[:id]) current_thread.to_s =~ /:(0x[0-9a-f]+)/i thread_id = $1 || '?' end if thread_name = current_thread[:name] thread_name = "(#{thread_name})" end return "*** Exception #{self.class} #{location}" << "(#{self}) (process #{$$}, thread #{thread_id}#{thread_name}):\n" << "\tfrom " << backtrace.join("\n\tfrom ") end end class IO if defined?(PhusionPassenger::NativeSupport) # Writes all of the strings in the +components+ array into the given file # descriptor using the +writev()+ system call. Unlike IO#write, this method # does not require one to concatenate all those strings into a single buffer # in order to send the data in a single system call. Thus, #writev is a great # way to perform zero-copy I/O. # # Unlike the raw writev() system call, this method ensures that all given # data is written before returning, by performing multiple writev() calls # and whatever else is necessary. # # io.writev(["hello ", "world", "\n"]) def writev(components) return PhusionPassenger::NativeSupport.writev(fileno, components) end # Like #writev, but accepts two arrays. The data is written in the given order. # # io.writev2(["hello ", "world", "\n"], ["another ", "message\n"]) def writev2(components, components2) return PhusionPassenger::NativeSupport.writev2(fileno, components, components2) end # Like #writev, but accepts three arrays. The data is written in the given order. # # io.writev3(["hello ", "world", "\n"], # ["another ", "message\n"], # ["yet ", "another ", "one", "\n"]) def writev3(components, components2, components3) return PhusionPassenger::NativeSupport.writev3(fileno, components, components2, components3) end else def writev(components) return write(components.join('')) end def writev2(components, components2) data = '' components.each do |component| data << component end components2.each do |component| data << component end return write(data) end def writev3(components, components2, components3) data = '' components.each do |component| data << component end components2.each do |component| data << component end components3.each do |component| data << component end return write(data) end end if IO.method_defined?(:close_on_exec=) def close_on_exec! self.close_on_exec = true end else require 'fcntl' if defined?(Fcntl::F_SETFD) def close_on_exec! fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) end else def close_on_exec! end end end end module Signal # Like Signal.list, but only returns signals that we can actually trap. def self.list_trappable ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby" case ruby_engine when "jruby" result = Signal.list result.delete("QUIT") result.delete("ILL") result.delete("FPE") result.delete("KILL") result.delete("SEGV") result.delete("USR1") result.delete("IOT") result.delete("EXIT") else result = Signal.list result.delete("ALRM") result.delete("VTALRM") end # Don't touch SIGCHLD no matter what! On OS X waitpid() will # malfunction if SIGCHLD doesn't have a correct handler. result.delete("CLD") result.delete("CHLD") # Other stuff that we don't want to trap no matter which # Ruby engine. result.delete("STOP") return result end end module GC if !respond_to?(:copy_on_write_friendly?) # Checks whether the current Ruby interpreter's garbage # collector is copy-on-write friendly. def self.copy_on_write_friendly? return false end end end passenger-4.0.37/lib/phusion_passenger/simple_benchmarking.rb000644 000765 000024 00000003452 12233035540 025050 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. class Object # :nodoc: @@benchmark_results = {} def b!(name) time1 = Time.now begin yield ensure time2 = Time.now @@benchmark_results[name] = 0 unless @@benchmark_results.has_key?(name) @@benchmark_results[name] += time2 - time1 end end def benchmark_report(main = nil) total = 0 if main.nil? @@benchmark_results.each_value do |time| total += time end else total = @@benchmark_results[main] end @@benchmark_results.each_pair do |name, time| printf "%-12s: %.4f (%.2f%%)\n", name, time, time / total * 100 end printf "-- Total: %.4f\n", total end end passenger-4.0.37/lib/phusion_passenger/standalone/000755 000765 000024 00000000000 12233035540 022646 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger/utils/000755 000765 000024 00000000000 12233035540 021656 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger/utils.rb000644 000765 000024 00000012377 12233035540 022215 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger # Utility functions. module Utils extend self # Make methods available as class methods. def self.included(klass) # When included into another class, make sure that Utils # methods are made private. public_instance_methods(false).each do |method_name| klass.send(:private, method_name) end end # Generate a long, cryptographically secure random ID string, which # is also a valid filename. def generate_random_id(method) data = File.open("/dev/urandom", "rb") do |f| f.read(64) end case method when :base64 data = [data].pack('m') data.gsub!("\n", '') data.gsub!("+", '') data.gsub!("/", '') data.gsub!(/==$/, '') return data when :hex return data.unpack('H*')[0] else raise ArgumentError, "Invalid method #{method.inspect}" end end # Print the given exception, including the stack trace, to STDERR. # # +current_location+ is a string which describes where the code is # currently at. Usually the current class name will be enough. def print_exception(current_location, exception, destination = nil) if !exception.is_a?(SystemExit) data = exception.backtrace_string(current_location) if defined?(DebugLogging) && self.is_a?(DebugLogging) error(data) else destination ||= STDERR destination.puts(data) destination.flush if destination.respond_to?(:flush) end end end def get_socket_address_type(address) if address =~ %r{^unix:.} return :unix elsif address =~ %r{^tcp://.} return :tcp else return :unknown end end def connect_to_server(address) case get_socket_address_type(address) when :unix return UNIXSocket.new(address.sub(/^unix:/, '')) when :tcp host, port = address.sub(%r{^tcp://}, '').split(':', 2) port = port.to_i return TCPSocket.new(host, port) else raise ArgumentError, "Unknown socket address type for '#{address}'." end end def local_socket_address?(address) case get_socket_address_type(address) when :unix return true when :tcp host, port = address.sub(%r{^tcp://}, '').split(':', 2) return host == "127.0.0.1" || host == "::1" || host == "localhost" else raise ArgumentError, "Unknown socket address type for '#{address}'." end end # Checks whether the given process exists. def process_is_alive?(pid) begin Process.kill(0, pid) return true rescue Errno::ESRCH return false rescue SystemCallError => e return true end end def require_option(hash, key) if hash.has_key?(key) return hash[key] else raise ArgumentError, "Option #{key.inspect} required" end end def install_options_as_ivars(object, options, *keys) keys.each do |key| object.instance_variable_set("@#{key}", options[key]) end end # Returns a string which reports the backtraces for all threads, # or if that's not supported the backtrace for the current thread. def global_backtrace_report if Kernel.respond_to?(:caller_for_all_threads) all_thread_stacks = caller_for_all_threads elsif Thread.respond_to?(:list) && Thread.public_method_defined?(:backtrace) all_thread_stacks = {} Thread.list.each do |thread| all_thread_stacks[thread] = thread.backtrace end end output = "========== Process #{Process.pid}: backtrace dump ==========\n" if all_thread_stacks all_thread_stacks.each_pair do |thread, stack| if thread_name = thread[:name] thread_name = "(#{thread_name})" end output << ("-" * 60) << "\n" output << "# Thread: #{thread.inspect}#{thread_name}, " if thread == Thread.main output << "[main thread], " end if thread == Thread.current output << "[current thread], " end output << "alive = #{thread.alive?}\n" output << ("-" * 60) << "\n" output << " " << stack.join("\n ") output << "\n\n" end else output << ("-" * 60) << "\n" output << "# Current thread: #{Thread.current.inspect}\n" output << ("-" * 60) << "\n" output << " " << caller.join("\n ") end return output end #################################### end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/utils/ansi_colors.rb000644 000765 000024 00000005700 12233035540 024520 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger module Utils module AnsiColors RESET = "\e[0m".freeze BOLD = "\e[1m".freeze DGRAY = "\e[90m".freeze RED = "\e[31m".freeze ORANGE = "\e[38;5;214m".freeze GREEN = "\e[32m".freeze YELLOW = "\e[33m".freeze WHITE = "\e[37m".freeze BLACK_BG = "\e[40m".freeze BLUE_BG = "\e[44m".freeze DEFAULT_TERMINAL_COLOR = "#{RESET}#{WHITE}#{BLACK_BG}".freeze extend self # Make methods available as class methods. def self.included(klass) # When included into another class, make sure that Utils # methods are made private. public_instance_methods(false).each do |method_name| klass.send(:private, method_name) end end def ansi_colorize(text) text = text.gsub(%r{(.*?)}m, "#{BOLD}\\1#{DEFAULT_TERMINAL_COLOR}") text.gsub!(%r{(.*?)}m, "#{BOLD}#{DGRAY}\\1#{DEFAULT_TERMINAL_COLOR}") text.gsub!(%r{(.*?)}m, "#{BOLD}#{RED}\\1#{DEFAULT_TERMINAL_COLOR}") text.gsub!(%r{(.*?)}m, "#{BOLD}#{ORANGE}\\1#{DEFAULT_TERMINAL_COLOR}") text.gsub!(%r{(.*?)}m, "#{BOLD}#{GREEN}\\1#{DEFAULT_TERMINAL_COLOR}") text.gsub!(%r{(.*?)}m, "#{BOLD}#{YELLOW}\\1#{DEFAULT_TERMINAL_COLOR}") text.gsub!(%r{(.*?)}m, "#{BOLD}#{BLUE_BG}#{YELLOW}\\1#{DEFAULT_TERMINAL_COLOR}") return text end def strip_color_tags(text) text = text.gsub(%r{(.*?)}m, "\\1") text = text.gsub(%r{(.*?)}m, "\\1") text.gsub!(%r{(.*?)}m, "\\1") text.gsub!(%r{(.*?)}m, "\\1") text.gsub!(%r{(.*?)}m, "\\1") text.gsub!(%r{(.*?)}m, "\\1") text.gsub!(%r{(.*?)}m, "\\1") return text end end end # module Utils end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/utils/download.rb000644 000765 000024 00000015632 12233035540 024021 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'platform_info' require 'fileutils' require 'shellwords' module PhusionPassenger module Utils module Download extend self # Make methods available as class methods. def self.included(klass) # When included into another class, make sure that Utils # methods are made private. public_instance_methods(false).each do |method_name| klass.send(:private, method_name) end end # Downloads a file from the given URL and saves it to the given filename. # Returns whether the download succeeded. # # Options: # # show_progress: whether to show download progress. Default: false. # logger: the logger to use. If not given, this function will log to STDERR. # cacert: a CA certificate file to use for verifying SSL websites. # The default is to use the download tool's down CA database. # use_cache: Whether to copy the file from the download cache, if available. # Default: false. # connect_timeout: The maximum amount of time to spend on DNS lookup # and establishing the TCP connection. Set to nil to # disable this timeout. Default: 4. # idle_timeout: The maximum idle read time. Set to nil to set this timeout # to the default wget value, 900. Set to nil to disable this # timeout. Default: 5. # total_timeout: The maximum amount of time spent on the whole download # operation, including connection time. Only has effect on curl. # Set to nil to disable this timeout. Default: nil. def download(url, output, options = {}) options = { :connect_timeout => 4, :idle_timeout => 5 }.merge(options) logger = options[:logger] || Logger.new(STDERR) if options[:use_cache] && cache_dir = PhusionPassenger.download_cache_dir basename = basename_from_url(url) if File.exist?("#{cache_dir}/#{basename}") logger.info "Copying #{basename} from #{cache_dir}..." FileUtils.cp("#{cache_dir}/#{basename}", output) return true end end if PlatformInfo.find_command("curl") return download_with_curl(logger, url, output, options) elsif PlatformInfo.find_command("wget") return download_with_wget(logger, url, output, options) else logger.error "Could not download #{url}: no download tool found (curl or wget required)" return false end end private def basename_from_url(url) return url.sub(/.*\//, '') end def download_with_curl(logger, url, output, options) command = ["curl", "-f", "-L", "-o", output] if options[:show_progress] command << "-#" else command << "-s" command << "-S" end if options[:cacert] command << "--cacert" command << options[:cacert] end if options[:connect_timeout] command << "--connect-timeout" command << options[:connect_timeout].to_s end if options[:idle_timeout] command << "--speed-time" command << options[:idle_timeout].to_s command << "--speed-limit" command << "1" end if options[:total_timeout] command << "--max-time" command << options[:total_timeout].to_s end command << url command_str = Shellwords.join(command) logger.info("Invoking: #{command_str}") if options[:show_progress] # If curl errors out we don't want it to display 'curl: ' prefixes, # so we parse its output. begin io = IO.popen("#{command_str} 2>&1", "r") rescue SystemCallError => e logger.error("Could not invoke curl: #{e}") return false end begin non_empty_line_encountered = false while !io.eof? # We split on "\r" because progress bar lines do not contain "\n". data = io.gets("\r") data = remove_curl_output_prefix(data) # If an error occurs then the first few lines may be empty. # Skip those. if !non_empty_line_encountered && data =~ /\A\n+/ data.gsub!(/\A\n+/, '') end non_empty_line_encountered = true STDERR.write(data) STDERR.flush end ensure io.close end result = $?.exitstatus == 0 else begin output = `#{command_str} 2>&1` rescue SystemCallError => e logger.error("Could not invoke curl: #{e}") return false end result = $?.exitstatus == 0 if !result output = remove_curl_output_prefix(output) output.chomp! logger.error("Could not download #{url}: #{output}") end end return result end def remove_curl_output_prefix(line) return line.gsub(/^curl: (\([0-9]+\) )?/, '') end def download_with_wget(logger, url, output, options) command = ["wget", "--tries=1", "-O", output] if !options[:show_progress] command << "-nv" end if options[:cacert] command << "--ca-certificate=#{options[:cacert]}" end if options[:connect_timeout] command << "--dns-timeout=#{options[:connect_timeout]}" command << "--connect-timeout=#{options[:connect_timeout]}" end if options[:idle_timeout] command << "--timeout=#{options[:idle_timeout]}" end command << url command_str = Shellwords.join(command) logger.info("Invoking: #{command_str}") if options[:show_progress] begin result = system(*command) rescue SystemCallError => e logger.error("Could not invoke wget: #{e}") return false end if !result logger.error("Could not download #{url}: #{output}") end else begin output = `#{command_str} 2>&1` rescue SystemCallError => e logger.error("Could not invoke wget: #{e}") return false end result = $?.exitstatus == 0 if !result # Error output may begin with ":\n" which is redundant. output.gsub!(/\A#{Regexp.escape url}:\n/, '') output.chomp! logger.error("Could not download #{url}: #{output}") end end return result end end end # module Utils end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/utils/file_system_watcher.rb000644 000765 000024 00000012620 12233035540 026244 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'native_support' module PhusionPassenger module Utils # Watches changes on one or more files or directories. To use this class, # construct an object, passing it file or directory names to watch, then # call #wait_for_change. #wait_for_change waits until one of the following # events has happened since the constructor was called: # # - One of the specified files has been renamed, deleted, or its access # revoked. This will cause +true+ to be returned. # - One of the specified directories has been modified, renamed, deleted, # or its access revoked. This will cause +true+ to be returned. # - +termination_pipe+ (as passed to the constructor) becomes readable. # This will cause +nil+ to be returned. # - The thread is interrupted. This will cause +nil+ to be returned. # # The constructor will attempt to stat and possibly also open all specified # files/directories. If one of them cannot be statted or opened, then # +false+ will be returned by #wait_for_change. # # #wait_for_change may only be called once. After calling it one should # create a new object if one wishes to watch the filesystem again. # # Always call #close when a FileSystemWatcher object is no longer needed # in order to free resources. # # This class tries to use kqueue for efficient filesystem watching on # platforms that support it. On other platforms it'll fallback to stat # polling instead. if defined?(NativeSupport::FileSystemWatcher) FileSystemWatcher = NativeSupport::FileSystemWatcher FileSystemWatcher.class_eval do def self.new(filenames, termination_pipe = nil) # Default parameter values, type conversion and exception # handling in C is too much of a pain. filenames = filenames.map do |filename| filename.to_s end return _new(filenames, termination_pipe) end def self.opens_files? return true end end else class FileSystemWatcher attr_accessor :poll_interval def self.opens_files? return false end def initialize(filenames, termination_pipe = nil) @poll_interval = 3 @termination_pipe = termination_pipe @dirs = [] @files = [] begin filenames.each do |filename| stat = File.stat(filename) if stat.directory? @dirs << DirInfo.new(filename, stat) else @files << FileInfo.new(filename, stat) end end rescue Errno::EACCES, Errno::ENOENT @dirs = @files = nil end end def wait_for_change if !@dirs return false end while true if changed? return true elsif select([@termination_pipe], nil, nil, @poll_interval) return nil end end end def close end private class DirInfo DOT = "." DOTDOT = ".." def initialize(filename, stat) @filename = filename @stat = stat @subfiles = {} Dir.foreach(filename) do |entry| next if entry == DOT || entry == DOTDOT subfilename = "#{filename}/#{entry}" @subfiles[entry] = FileInfo.new(subfilename, File.stat(subfilename)) end end def changed? new_stat = File.stat(@filename) if @stat.ino != new_stat.ino || !new_stat.directory? || @stat.mtime != new_stat.mtime return true end count = 0 Dir.foreach(@filename) do |entry| next if entry == DOT || entry == DOTDOT subfilename = "#{@filename}/#{entry}" file_info = @subfiles[entry] if !file_info || file_info.changed?(false) return true else count += 1 end end return count != @subfiles.size rescue Errno::EACCES, Errno::ENOENT return true end end class FileInfo def initialize(filename, stat) @filename = filename @stat = stat end def changed?(check_mtime = true) new_stat = File.stat(@filename) if check_mtime mtime_changed = @stat.mtime != new_stat.mtime || @stat.size != new_stat.size else mtime_changed = false end return @stat.ino != new_stat.ino || @stat.ftype != new_stat.ftype || mtime_changed rescue Errno::EACCES, Errno::ENOENT return true end end def changed? return @dirs.any? { |dir_info| dir_info.changed? } || @files.any? { |file_info| file_info.changed? } end end end end # module Utils end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/utils/hosts_file_parser.rb000644 000765 000024 00000006557 12233035540 025733 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'platform_info/operating_system' module PhusionPassenger module Utils # A /etc/hosts parser. Also supports writing groups of data to the file. class HostsFileParser def self.flush_dns_cache! if PlatformInfo.os_name == "macosx" system("dscacheutil -flushcache") end end def initialize(filename_or_io = "/etc/hosts") if filename_or_io.respond_to?(:readline) read_and_parse(filename_or_io) else File.open(filename_or_io, "rb") do |f| read_and_parse(f) end end end def ip_count return @ips.size end def host_count return @host_names.size end def resolve(host_name) if host_name.downcase == "localhost" return "127.0.0.1" else return @host_names[host_name.downcase] end end def resolves_to_localhost?(hostname) ip = resolve(hostname) return ip == "127.0.0.1" || ip == "::1" || ip == "0.0.0.0" end def add_group_data(marker, data) begin_index = find_line(0, "###### BEGIN #{marker} ######") end_index = find_line(begin_index + 1, "###### END #{marker} ######") if begin_index if begin_index && end_index @lines[begin_index + 1 .. end_index - 1] = data.split("\n") else @lines << "###### BEGIN #{marker} ######" @lines.concat(data.split("\n")) @lines << "###### END #{marker} ######" end end def write(io) @lines.each do |line| io.puts(line) end end private def read_and_parse(io) lines = [] ips = {} all_host_names = {} while !io.eof? line = io.readline line.sub!(/\n\Z/m, '') lines << line ip, host_names = parse_line(line) if ip ips[ip] ||= [] ips[ip].concat(host_names) host_names.each do |host_name| all_host_names[host_name.downcase] = ip end end end @lines = lines @ips = ips @host_names = all_host_names end def parse_line(line) return nil if line =~ /^[\s\t]*#/ line = line.strip return nil if line.empty? ip, *host_names = line.split(/[ \t]+/) return [ip, host_names] end def find_line(start_index, content) i = start_index while i < @lines.size if @lines[i] == content return i else i += 1 end end return nil end end end end passenger-4.0.37/lib/phusion_passenger/utils/json.rb000644 000765 000024 00000022050 12233035540 023153 0ustar00honglistaff000000 000000 # encoding: utf-8 # ## Stupid small pure Ruby JSON parser & generator. # # Copyright © 2013 Mislav Marohnić # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the “Software”), to deal in the Software # without restriction, including without limitation the rights to use, copy, modify, # merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to the following # conditions: # # The above copyright notice and this permission notice shall be included in all copies or # substantial portions of the Software. # # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT # OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. # We use this in Phusion Passenger at places where we cannot depend on the JSON # gem being available, for example in 'passenger start' before the RuntimeInstaller # has run. require 'strscan' require 'forwardable' module PhusionPassenger module Utils # Usage: # # JSON.parse(json_string) => Array/Hash # JSON.generate(object) => json string # # Run tests by executing this file directly. Pipe standard input to the script to have it # parsed as JSON and to display the result in Ruby. # class JSON def self.parse(data) new(data).parse end WSP = /\s+/ OBJ = /[{\[]/; HEN = /\}/; AEN = /\]/ COL = /\s*:\s*/; KEY = /\s*,\s*/ NUM = /-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/ BOL = /true|false/; NUL = /null/ extend Forwardable attr_reader :scanner alias_method :s, :scanner def_delegators :scanner, :scan, :matched private :s, :scan, :matched def initialize data @scanner = StringScanner.new data.to_s end def parse space object end private def space() scan WSP end def endkey() scan(KEY) or space end def object matched == '{' ? hash : array if scan(OBJ) end def value object or string or scan(NUL) ? nil : scan(BOL) ? matched.size == 4: scan(NUM) ? eval(matched) : error end def hash obj = {} space repeat_until(HEN) { k = string; scan(COL); obj[k] = value; endkey } obj end def array ary = [] space repeat_until(AEN) { ary << value; endkey } ary end SPEC = {'b' => "\b", 'f' => "\f", 'n' => "\n", 'r' => "\r", 't' => "\t"} UNI = 'u'; CODE = /[a-fA-F0-9]{4}/ STR = /"/; STE = '"' ESC = '\\' def string if scan(STR) str, esc = '', false while c = s.getch if esc str << (c == UNI ? (s.scan(CODE) || error).to_i(16).chr : SPEC[c] || c) esc = false else case c when ESC then esc = true when STE then break else str << c end end end str end end def error raise "parse error at: #{scan(/.{1,10}/m).inspect}" end def repeat_until reg until scan(reg) pos = s.pos yield error unless s.pos > pos end end module Generator def generate(obj) raise ArgumentError unless obj.is_a? Array or obj.is_a? Hash generate_type(obj) end alias dump generate private def generate_type(obj) type = obj.is_a?(Numeric) ? :Numeric : obj.class.name begin send(:"generate_#{type}", obj) rescue NoMethodError; raise ArgumentError, "can't serialize #{type}" end end ESC_MAP = Hash.new {|h,k| k }.update \ "\r" => 'r', "\n" => 'n', "\f" => 'f', "\t" => 't', "\b" => 'b' def quote(str) %("#{str}") end def generate_String(str) quote str.gsub(/[\r\n\f\t\b"\\]/) { "\\#{ESC_MAP[$&]}"} end def generate_simple(obj) obj.inspect end alias generate_Numeric generate_simple alias generate_TrueClass generate_simple alias generate_FalseClass generate_simple def generate_Symbol(sym) generate_String(sym.to_s) end def generate_Time(time) quote time.strftime(time.utc? ? "%F %T UTC" : "%F %T %z") end def generate_Date(date) quote date.to_s end def generate_NilClass(*) 'null' end def generate_Array(ary) '[%s]' % ary.map {|o| generate_type(o) }.join(', ') end def generate_Hash(hash) '{%s}' % hash.map { |key, value| "#{generate_String(key.to_s)}: #{generate_type(value)}" }.join(', ') end end extend Generator end if __FILE__ == $0 if !$stdin.tty? data = JSON.parse $stdin.read require 'pp' pp data else require 'test/unit' require 'date' class ParserTest < Test::Unit::TestCase PARSED = JSON.parse DATA.read def parsed() PARSED end def parse_string(str) JSON.parse(%(["#{str}"]).gsub('\\\\', '\\')).first end def test_string assert_equal "Pagination library for \"Rails 3\", Sinatra, Merb, DataMapper, and more", parsed['head']['repository']['description'] end def test_string_specials assert_equal "\r\n\t\f\b", parse_string('\r\n\t\f\b') assert_equal "aA", parse_string('\u0061\u0041') assert_equal "\e", parse_string('\u001B') assert_equal "xyz", parse_string('\x\y\z') assert_equal '"\\/', parse_string('\"\\\\\\/') assert_equal 'no #{interpolation}', parse_string('no #{interpolation}') end def test_hash assert_equal %w[label ref repository sha user], parsed['head'].keys.sort end def test_number assert_equal 124.3e2, parsed['head']['repository']['size'] end def test_bool assert_equal true, parsed['head']['repository']['fork'] assert_equal false, parsed['head']['repository']['private'] end def test_nil assert_nil parsed['head']['user']['company'] end def test_array assert_equal ["4438f", {"a" => "b"}], parsed['head']['sha'] end def test_invalid assert_raises(RuntimeError) { JSON.parse %({) } assert_raises(RuntimeError) { JSON.parse %({ "foo": }) } assert_raises(RuntimeError) { JSON.parse %([ "foo": "bar" ]) } assert_raises(RuntimeError) { JSON.parse %([ ~"foo" ]) } assert_raises(RuntimeError) { JSON.parse %([ "foo ]) } assert_raises(RuntimeError) { JSON.parse %([ "foo\\" ]) } assert_raises(RuntimeError) { JSON.parse %([ "foo\\uabGd" ]) } end end class GeneratorTest < Test::Unit::TestCase def generate(obj) JSON.generate(obj) end def test_array assert_equal %([1, 2, 3]), generate([1, 2, 3]) end def test_bool assert_equal %([true, false]), generate([true, false]) end def test_null assert_equal %([null]), generate([nil]) end def test_string assert_equal %(["abc\\n123"]), generate(["abc\n123"]) end def test_string_unicode assert_equal %(["ć\\"č\\nĆŸ\\tĆĄ\\\\đ"]), generate(["ć\"č\nĆŸ\tĆĄ\\đ"]) end def test_time time = Time.utc(2012, 04, 19, 1, 2, 3) assert_equal %(["2012-04-19 01:02:03 UTC"]), generate([time]) end def test_date time = Date.new(2012, 04, 19) assert_equal %(["2012-04-19"]), generate([time]) end def test_symbol assert_equal %(["abc"]), generate([:abc]) end def test_hash json = generate(:abc => 123, 123 => 'abc') assert_match /^\{/, json assert_match /\}$/, json assert_equal [%("123": "abc"), %("abc": 123)], json[1...-1].split(', ').sort end def test_nested_structure json = generate(:hash => {1=>2}, :array => [1,2]) assert json.include?(%("hash": {"1": 2})) assert json.include?(%("array": [1, 2])) end def test_invalid_json assert_raises(ArgumentError) { generate("abc") } end def test_invalid_object err = assert_raises(ArgumentError) { generate("a" => Object.new) } assert_equal "can't serialize Object", err.message end end end end end # module Utils end # module PhusionPassenger __END__ { "head": { "ref": "master", "repository": { "forks": 0, "integrate_branch": "rails3", "watchers": 1, "language": "Ruby", "description": "Pagination library for \"Rails 3\", Sinatra, Merb, DataMapper, and more", "has_downloads": true, "fork": true, "created_at": "2011/10/24 03:20:48 -0700", "homepage": "http://github.com/mislav/will_paginate/wikis", "size": 124.3e2, "private": false, "has_wiki": true, "name": "will_paginate", "owner": "dbackeus", "url": "https://github.com/dbackeus/will_paginate", "has_issues": false, "open_issues": 0, "pushed_at": "2011/10/25 05:44:05 -0700" }, "label": "dbackeus:master", "sha": ["4438f", { "a" : "b" }], "user": { "name": "David Backeus", "company": null, "gravatar_id": "ebe96524f5db9e92188f0542dc9d1d1a", "location": "Stockholm (Sweden)", "type": "User", "login": "dbackeus" } } }passenger-4.0.37/lib/phusion_passenger/utils/native_support_utils.rb000644 000765 000024 00000004326 12233035540 026512 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'native_support' module PhusionPassenger module Utils # Utility functions that can potentially be accelerated by native_support functions. module NativeSupportUtils extend self if defined?(PhusionPassenger::NativeSupport) # Split the given string into an hash. Keys and values are obtained by splitting the # string using the null character as the delimitor. def split_by_null_into_hash(data) return PhusionPassenger::NativeSupport.split_by_null_into_hash(data) end # Wrapper for getrusage(). def process_times return PhusionPassenger::NativeSupport.process_times end else NULL = "\0".freeze class ProcessTimes < Struct.new(:utime, :stime) end def split_by_null_into_hash(data) args = data.split(NULL, -1) args.pop return Hash[*args] end def process_times times = Process.times return ProcessTimes.new((times.utime * 1_000_000).to_i, (times.stime * 1_000_000).to_i) end end end end # module Utils end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/utils/tee_input.rb000644 000765 000024 00000012164 12233035540 024203 0ustar00honglistaff000000 000000 # encoding: binary # # This file is taken from Unicorn. The following license applies to this file # (and this file only, not to the rest of Phusion Passenger): # # 1. You may make and give away verbatim copies of the source form of the # software without restriction, provided that you duplicate all of the # original copyright notices and associated disclaimers. # # 2. You may modify your copy of the software in any way, provided that # you do at least ONE of the following: # # a) place your modifications in the Public Domain or otherwise make them # Freely Available, such as by posting said modifications to Usenet or an # equivalent medium, or by allowing the author to include your # modifications in the software. # # b) use the modified software only within your corporation or # organization. # # c) rename any non-standard executables so the names do not conflict with # standard executables, which must also be provided. # # d) make other distribution arrangements with the author. # # 3. You may distribute the software in object code or executable # form, provided that you do at least ONE of the following: # # a) distribute the executables and library files of the software, # together with instructions (in the manual page or equivalent) on where # to get the original distribution. # # b) accompany the distribution with the machine-readable source of the # software. # # c) give non-standard executables non-standard names, with # instructions on where to get the original software distribution. # # d) make other distribution arrangements with the author. # # 4. You may modify and include the part of the software into any other # software (possibly commercial). But some files in the distribution # are not written by the author, so that they are not under this terms. # # 5. The scripts and library files supplied as input to or produced as # output from the software do not automatically fall under the # copyright of the software, but belong to whomever generated them, # and may be sold commercially, and may be aggregated with this # software. # # 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE. require 'stringio' PhusionPassenger.require_passenger_lib 'utils/tmpio' module PhusionPassenger module Utils # acts like tee(1) on an input input to provide a input-like stream # while providing rewindable semantics through a File/StringIO backing # store. On the first pass, the input is only read on demand so your # Rack application can use input notification (upload progress and # like). This should fully conform to the Rack::Lint::InputWrapper # specification on the public API. This class is intended to be a # strict interpretation of Rack::Lint::InputWrapper functionality and # will not support any deviations from it. # # When processing uploads, Unicorn exposes a TeeInput object under # "rack.input" of the Rack environment. class TeeInput CONTENT_LENGTH = "CONTENT_LENGTH".freeze # The maximum size (in +bytes+) to buffer in memory before # resorting to a temporary file. Default is 112 kilobytes. @@client_body_buffer_size = 112 * 1024 # sets the maximum size of request bodies to buffer in memory, # amounts larger than this are buffered to the filesystem def self.client_body_buffer_size=(bytes) @@client_body_buffer_size = bytes end # returns the maximum size of request bodies to buffer in memory, # amounts larger than this are buffered to the filesystem def self.client_body_buffer_size @@client_body_buffer_size end # Initializes a new TeeInput object. You normally do not have to call # this unless you are writing an HTTP server. def initialize(socket, env) @len = env[CONTENT_LENGTH] @len = @len.to_i if @len @socket = socket @tmp = @len && @len <= @@client_body_buffer_size ? StringIO.new("") : TmpIO.new("PassengerTeeInput") end def close @tmp.close end def size @len and return @len pos = @tmp.pos consume! @tmp.pos = pos @len = @tmp.size end def read(*args) if socket_drained? @tmp.read(*args) else tee(@socket.read(*args)) end end def gets if socket_drained? @tmp.gets else tee(@socket.gets) end end def rewind return 0 if 0 == @tmp.size consume! if !socket_drained? @tmp.rewind # Rack does not specify what the return value is here end def each while line = gets yield line end self # Rack does not specify what the return value is here end private def socket_drained? if @socket if @socket.eof? @socket = nil true else false end else true end end # consumes the stream of the socket def consume! junk = "" nil while read(16 * 1024, junk) end def tee(buffer) if buffer && buffer.size > 0 @tmp.write(buffer) end buffer end end end # module Utils end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/utils/terminal_choice_menu.rb000644 000765 000024 00000010764 12233035540 026364 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger module Utils class TerminalChoiceMenu class Choice attr_reader :name attr_accessor :checked alias checked? checked def self.create(choice) if choice.is_a?(Choice) return choice else return Choice.new(choice) end end def initialize(name, checked = false) @name = name @checked = checked end def toggle! @checked = !@checked end end def initialize(choices) @choices = choices.map { |choice| Choice.create(choice) } @pointer = 0 @index = index_choices initialize_terminal_control end def display_choices display(render_to_string) end def query if STDIN.tty? done = false begin raw_no_echo_mode hide_cursor while !done display_choices done = process_input clear_screen if !done end ensure restore_mode show_cursor puts end else display_choices puts end end def [](name) return @index[name] end def selected_choices @choices.find_all{ |c| c.checked? }.map{ |c| c.name } end private JRUBY = defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby' def index_choices index = {} @choices.each do |choice| index[choice.name] = choice end return index end def process_input case getchar(STDIN) when "\x1b" process_cursor_move return false when " " process_toggle return false when "\r" return true else return false end end def process_cursor_move if getchar(STDIN) == "[" case getchar(STDIN) when "A" # up @pointer = [@pointer - 1, 0].max when "B" # down @pointer = [@pointer + 1, @choices.size - 1].min end end end def process_toggle @choices[@pointer].toggle! end def render_to_string str = "" @choices.each_with_index do |choice, i| pointer = render_pointer(i) checkbox = render_checkbox(choice.checked) str << " #{pointer} #{checkbox} #{choice.name}\r\n" end str.chomp! return str end def render_pointer(index) return @pointer == index ? "‣" : " " end def render_checkbox(checked) return checked ? "⏹" : "⏥" end def display(str) STDOUT.write(str) STDOUT.flush end def clear_screen number_of_lines = render_to_string.split("\n").size display("\r") (number_of_lines - 1).times do display(move_up) end end def hide_cursor display("\x1b[?25l") end def show_cursor display("\x1b[?25h") end def move_up return "\x1b[0A" end def getchar(io) char = io.getc char = char.chr if char.is_a?(Integer) return char end if JRUBY require 'java' require 'readline' java_import 'jline.console.ConsoleReader' def initialize_terminal_control input = STDIN.to_inputstream output = STDOUT.to_outputstream @console = ConsoleReader.new(input, output) @console.set_history_enabled(false) @console.set_bell_enabled(true) @console.set_pagination_enabled(false) end def raw_no_echo_mode @terminal_state = @console.getEchoCharacter @console.setEchoCharacter(0) end def restore_mode @console.setEchoCharacter(@terminal_state) end else def initialize_terminal_control end def raw_no_echo_mode @terminal_state = `stty -g` system("stty raw -echo -icanon isig") end def restore_mode system("stty #{@terminal_state}") end end end end # module Utils end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/utils/tmpdir.rb000644 000765 000024 00000005012 12233035540 023500 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger module Utils protected @@passenger_tmpdir = nil def passenger_tmpdir(create = true) PhusionPassenger::Utils.passenger_tmpdir(create) end # Returns the directory in which to store Phusion Passenger-specific # temporary files. If +create+ is true, then this method creates the # directory if it doesn't exist. def self.passenger_tmpdir(create = true) dir = @@passenger_tmpdir if dir.nil? || dir.empty? tmpdir = "/tmp" ["PASSENGER_TEMP_DIR", "PASSENGER_TMPDIR"].each do |name| if ENV.has_key?(name) && !ENV[name].empty? tmpdir = ENV[name] break end end dir = "#{tmpdir}/passenger.1.0.#{Process.pid}" dir.gsub!(%r{//+}, '/') @@passenger_tmpdir = dir end if create && !File.exist?(dir) # This is a very minimal implementation of the subdirectory # creation logic in ServerInstanceDir.h. This implementation # is only meant to make the unit tests pass. For production # systems one should pre-create the temp directory with # ServerInstanceDir.h. system("mkdir", "-p", "-m", "u=rwxs,g=rwx,o=rwx", dir) system("mkdir", "-p", "-m", "u=rwxs,g=rwx,o=rwx", "#{dir}/generation-0") system("mkdir", "-p", "-m", "u=rwxs,g=rwx,o=rwx", "#{dir}/backends") end return dir end def self.passenger_tmpdir=(dir) @@passenger_tmpdir = dir end end end passenger-4.0.37/lib/phusion_passenger/utils/tmpio.rb000644 000765 000024 00000002764 12233035540 023344 0ustar00honglistaff000000 000000 require 'tmpdir' require 'fileutils' module PhusionPassenger module Utils # some versions of Ruby had a broken Tempfile which didn't work # well with unlinked files. This one is much shorter, easier # to understand, and slightly faster. class TmpIO < File # creates and returns a new File object. The File is unlinked # immediately, switched to binary mode, and userspace output # buffering is disabled def self.new(namespace) fp = begin super("#{Dir::tmpdir}/#{namespace}-#{rand}", RDWR|CREAT|EXCL, 0600) rescue Errno::EEXIST retry end unlink(fp.path) fp.binmode fp.sync = true fp end # for easier env["rack.input"] compatibility with Rack <= 1.1 def size stat.size end unless File.method_defined?(:size) end # Like Dir.mktmpdir, but creates shorter filenames. def self.mktmpdir(prefix_suffix=nil, tmpdir=nil) case prefix_suffix when nil prefix = "d" suffix = "" when String prefix = prefix_suffix suffix = "" when Array prefix = prefix_suffix[0] suffix = prefix_suffix[1] else raise ArgumentError, "unexpected prefix_suffix: #{prefix_suffix.inspect}" end tmpdir ||= Dir.tmpdir begin path = "#{tmpdir}/#{prefix}#{rand(0x100000000).to_s(36)}" path << suffix Dir.mkdir(path, 0700) rescue Errno::EEXIST retry end if block_given? begin yield path ensure FileUtils.remove_entry_secure path end else path end end end # module Utils end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/utils/unseekable_socket.rb000644 000765 000024 00000016020 12233035540 025670 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'utils' # So that we can know whether #writev is supported. module PhusionPassenger module Utils # Some frameworks (e.g. Merb) call `seek` and `rewind` on the input stream # if it responds to these methods. In case of Phusion Passenger, the input # stream is a socket, and altough socket objects respond to `seek` and # `rewind`, calling these methods will raise an exception. We don't want # this to happen so in AbstractRequestHandler we wrap the client socket # into an UnseekableSocket wrapper, which doesn't respond to these methods. # # We used to dynamically undef `seek` and `rewind` on sockets, but this # blows the Ruby interpreter's method cache and made things slower. # Wrapping a socket is faster despite extra method calls. # # Furthermore, all exceptions originating from the wrapped socket will # be annotated. One can check whether a certain exception originates # from the wrapped socket by calling #source_of_exception? class UnseekableSocket def self.wrap(socket) return new.wrap(socket) end def wrap(socket) # Some people report that sometimes their Ruby (MRI/REE) # processes get stuck with 100% CPU usage. Upon further # inspection with strace, it turns out that these Ruby # processes are continuously calling lseek() on a socket, # which of course returns ESPIPE as error. gdb reveals # lseek() is called by fwrite(), which in turn is called # by rb_fwrite(). The affected socket is the # AbstractRequestHandler client socket. # # I inspected the MRI source code and didn't find # anything that would explain this behavior. This makes # me think that it's a glibc bug, but that's very # unlikely. # # The rb_fwrite() implementation takes an entirely # different code path if I set 'sync' to true: it will # skip fwrite() and use write() instead. So here we set # 'sync' to true in the hope that this will work around # the problem. socket.sync = true # There's no need to set the encoding for Ruby 1.9 because # abstract_request_handler.rb is tagged with 'encoding: binary'. @socket = socket return self end # Don't allow disabling of sync. def sync=(value) end # Socket is sync'ed so flushing shouldn't do anything. def flush end # Already set to binary mode. def binmode end # This makes select() work. def to_io @socket end def simulate_eof! @simulate_eof = true end def stop_simulating_eof! @simulate_eof = false end def fileno @socket.fileno end def addr @socket.addr rescue => e raise annotate(e) end def write(string) @socket.write(string) rescue => e raise annotate(e) end def write_nonblock(string) @socket.write_nonblock(string) rescue => e raise annotate(e) end def writev(components) @socket.writev(components) rescue => e raise annotate(e) end if IO.method_defined?(:writev) def writev2(components, components2) @socket.writev2(components, components2) rescue => e raise annotate(e) end if IO.method_defined?(:writev2) def writev3(components, components2, components3) @socket.writev3(components, components2, components3) rescue => e raise annotate(e) end if IO.method_defined?(:writev3) def send(*args) @socket.send(*args) rescue => e raise annotate(e) end def sendmsg(*args) @socket.sendmsg(*args) rescue => e raise annotate(e) end def sendmsg_nonblock(*args) @socket.sendmsg_nonblock(*args) rescue => e raise annotate(e) end def puts(*args) @socket.puts(*args) rescue => e raise annotate(e) end def gets return nil if @simulate_eof @socket.gets rescue => e raise annotate(e) end def read(*args) if @simulate_eof length, buffer = args if buffer buffer.replace(binary_string("")) else buffer = binary_string("") end if length return nil else return buffer end end @socket.read(*args) rescue => e raise annotate(e) end def read_nonblock(*args) raise EOFError, "end of file reached" if @simulate_eof @socket.read_nonblock(*args) rescue => e raise annotate(e) end def readpartial(*args) raise EOFError, "end of file reached" if @simulate_eof @socket.readpartial(*args) rescue => e raise annotate(e) end def readline raise EOFError, "end of file reached" if @simulate_eof @socket.readline rescue => e raise annotate(e) end def recv(*args) raise EOFError, "end of file reached" if @simulate_eof @socket.recv(*args) rescue => e raise annotate(e) end def recvfrom(*args) raise EOFError, "end of file reached" if @simulate_eof @socket.recvfrom(*args) rescue => e raise annotate(e) end def recvfrom_nonblock(*args) raise EOFError, "end of file reached" if @simulate_eof @socket.recvfrom_nonblock(*args) rescue => e raise annotate(e) end def each(&block) return if @simulate_eof @socket.each(&block) rescue => e raise annotate(e) end def eof? return true if @simulate_eof @socket.eof? rescue => e raise annotate(e) end def closed? @socket.closed? rescue => e raise annotate(e) end def close @socket.close rescue => e raise annotate(e) end def close_read @socket.close_read rescue => e raise annotate(e) end def close_write @socket.close_write rescue => e raise annotate(e) end def source_of_exception?(exception) return exception.instance_variable_get(:"@from_unseekable_socket") == @socket.object_id end private def annotate(exception) exception.instance_variable_set(:"@from_unseekable_socket", @socket.object_id) return exception end def raise_error_because_activity_disallowed! raise IOError, "It is not possible to read or write from the client socket because the current." end if ''.respond_to?(:force_encoding) def binary_string(str) return ''.force_encoding('binary') end else def binary_string(str) return '' end end end end # module Utils end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/standalone/app_finder.rb000644 000765 000024 00000012112 12233035540 025277 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'utils/file_system_watcher' module PhusionPassenger module Standalone class AppFinder attr_accessor :dirs attr_reader :apps def self.looks_like_app_directory?(dir) return File.exist?("#{dir}/config.ru") || File.exist?("#{dir}/config/environment.rb") || File.exist?("#{dir}/passenger_wsgi.py") || File.exist?("#{dir}/app.js") || File.exist?("#{dir}/.meteor") end def initialize(dirs, options = {}) @dirs = dirs @options = options.dup end def global_options return @options end def scan apps = [] watchlist = [] if single_mode? app_root = find_app_root apps << { :server_names => ["_"], :root => app_root } watchlist << app_root watchlist << "#{app_root}/config" if File.exist?("#{app_root}/config") watchlist << "#{app_root}/passenger-standalone.json" if File.exist?("#{app_root}/passenger-standalone.json") config_filename = File.join(app_root, "passenger-standalone.json") if File.exist?(config_filename) global_options = load_config_file!(:global_config, config_filename) @options.merge!(global_options) end apps.map! do |app| @options.merge(app) end end @apps = apps @watchlist = watchlist return apps end def monitor(termination_pipe) raise "You must call #scan first" if !@apps watcher = PhusionPassenger::Utils::FileSystemWatcher.new(@watchlist, termination_pipe) if wait_on_io(termination_pipe, 3) return end while true changed = watcher.wait_for_change watcher.close if changed old_apps = @apps # The change could be caused by a write to some passenger.conf file. # Wait for a short period so that the write has a chance to finish. if wait_on_io(termination_pipe, 0.25) return end new_apps = scan watcher = PhusionPassenger::Utils::FileSystemWatcher.new(@watchlist, termination_pipe) if old_apps != new_apps yield(new_apps) end # Don't process change events again for a short while, # but do detect changes while waiting. if wait_on_io(termination_pipe, 3) return end else return end end ensure watcher.close if watcher end def single_mode? return true end def multi_mode? return !single_mode? end ################## private class ConfigLoadError < StandardError end def find_app_root if @dirs.empty? return File.expand_path(".") else return File.expand_path(@dirs[0]) end end def load_config_file!(context, filename) PhusionPassenger.require_passenger_lib 'utils/json' if !defined?(PhusionPassenger::Utils::JSON) begin data = File.open(filename, "r:utf-8") do |f| f.read end rescue SystemCallError => e raise ConfigLoadError, "cannot load config file #{filename} (#{e})" end begin config = PhusionPassenger::Utils::JSON.parse(data) rescue => e raise ConfigLoadError, "cannot parse config file #{filename} (#{e})" end if !config.is_a?(Hash) raise ConfigLoadError, "cannot parse config file #{filename} (it does not contain an object)" end result = {} config.each_pair do |key, val| result[key.to_sym] = val end return result end def load_config_file(context, filename) return load_config_file!(context, filename) rescue ConfigLoadError => e STDERR.puts "*** Warning: #{e.message}" return {} end def looks_like_app_directory?(dir) return AppFinder.looks_like_app_directory?(dir) end def filename_to_server_names(filename) basename = File.basename(filename) names = [basename] if basename !~ /^www\.$/i names << "www.#{basename}" end return names end # Wait until the given IO becomes readable, or until the timeout has # been reached. Returns true if the IO became readable, false if the # timeout has been reached. def wait_on_io(io, timeout) return !!select([io], nil, nil, timeout) end end end # module Standalone end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/standalone/command.rb000644 000765 000024 00000021152 12233035540 024612 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'optparse' PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'standalone/utils' module PhusionPassenger module Standalone class Command DEFAULT_OPTIONS = { :address => '0.0.0.0', :port => 3000, :environment => ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development', :max_pool_size => 6, :min_instances => 1, :spawn_method => Kernel.respond_to?(:fork) ? 'smart' : 'direct', :concurrency_model => DEFAULT_CONCURRENCY_MODEL, :thread_count => DEFAULT_THREAD_COUNT, :nginx_version => PREFERRED_NGINX_VERSION, :friendly_error_pages => true }.freeze include Utils def self.show_in_command_list return true end def self.description return nil end def initialize(args) @args = args.dup @original_args = args.dup @options = DEFAULT_OPTIONS.dup end private def require_daemon_controller if !defined?(DaemonController) begin require 'daemon_controller' begin require 'daemon_controller/version' too_old = DaemonController::VERSION_STRING < '1.1.0' rescue LoadError too_old = true end if too_old error "Your version of daemon_controller is too old. " << "You must install 1.1.0 or later. Please upgrade:\n\n" << " sudo gem uninstall FooBarWidget-daemon_controller\n" << " sudo gem install daemon_controller" exit 1 end rescue LoadError error "Please install daemon_controller first:\n\n" << " sudo gem install daemon_controller" exit 1 end end end def require_erb require 'erb' unless defined?(ERB) end def require_optparse require 'optparse' unless defined?(OptionParser) end def require_app_finder PhusionPassenger.require_passenger_lib 'standalone/app_finder' unless defined?(AppFinder) end def debugging? return ENV['PASSENGER_DEBUG'] && !ENV['PASSENGER_DEBUG'].empty? end def parse_options!(command_name, description = nil) help = false global_config_file = File.join(ENV['HOME'], USER_NAMESPACE_DIRNAME, "standalone", "config") if File.exist?(global_config_file) PhusionPassenger.require_passenger_lib 'standalone/config_file' unless defined?(ConfigFile) global_options = ConfigFile.new(:global_config, global_config_file).options @options.merge!(global_options) end require_optparse parser = OptionParser.new do |opts| opts.banner = "Usage: passenger #{command_name} [options]" opts.separator description if description opts.separator " " opts.separator "Options:" yield opts opts.on("-h", "--help", "Show this help message") do help = true end end parser.parse!(@args) if help puts parser exit 0 end end def error(message) if message =~ /\n/ STDERR.puts("*** ERROR ***\n" << wrap_desc(message, 80, 0)) else STDERR.puts(wrap_desc("*** ERROR: #{message}", 80, 0)) end @plugin.call_hook(:error, message) if @plugin end # Word wrap the given option description text so that it is formatted # nicely in the --help output. def wrap_desc(description_text, max_width = 43, newline_prefix_size = 37) line_prefix = "\n" << (' ' * newline_prefix_size) result = description_text.gsub(/(.{1,#{max_width}})( +|$\n?)|(.{1,#{max_width}})/, "\\1\\3#{line_prefix}") result.strip! return result end def ensure_directory_exists(dir) if !File.exist?(dir) require_file_utils FileUtils.mkdir_p(dir) end end def determine_various_resource_locations(create_subdirs = true) require_app_finder if @options[:socket_file] pid_basename = "passenger.pid" log_basename = "passenger.log" else pid_basename = "passenger.#{@options[:port]}.pid" log_basename = "passenger.#{@options[:port]}.log" end if @args.empty? if AppFinder.looks_like_app_directory?(".") @options[:pid_file] ||= File.expand_path("tmp/pids/#{pid_basename}") @options[:log_file] ||= File.expand_path("log/#{log_basename}") if create_subdirs ensure_directory_exists(File.dirname(@options[:pid_file])) ensure_directory_exists(File.dirname(@options[:log_file])) end else @options[:pid_file] ||= File.expand_path(pid_basename) @options[:log_file] ||= File.expand_path(log_basename) end else @options[:pid_file] ||= File.expand_path(File.join(@args[0], pid_basename)) @options[:log_file] ||= File.expand_path(File.join(@args[0], log_basename)) end end def write_nginx_config_file PhusionPassenger.require_passenger_lib 'platform_info/ruby' PhusionPassenger.require_passenger_lib 'utils/tmpio' # @temp_dir may already be set because we're redeploying # using Mass Deployment. @temp_dir ||= PhusionPassenger::Utils.mktmpdir( "passenger-standalone.") @config_filename = "#{@temp_dir}/config" location_config_filename = "#{@temp_dir}/locations.ini" File.chmod(0755, @temp_dir) begin Dir.mkdir("#{@temp_dir}/logs") rescue Errno::EEXIST end locations_ini_fields = PhusionPassenger::REQUIRED_LOCATIONS_INI_FIELDS + PhusionPassenger::OPTIONAL_LOCATIONS_INI_FIELDS - [:agents_dir, :lib_dir] File.open(location_config_filename, 'w') do |f| f.puts '[locations]' f.puts "natively_packaged=#{PhusionPassenger.natively_packaged?}" if PhusionPassenger.natively_packaged? f.puts "native_packaging_method=#{PhusionPassenger.native_packaging_method}" end f.puts "lib_dir=#{@runtime_locator.find_lib_dir}" f.puts "agents_dir=#{@runtime_locator.find_agents_dir}" locations_ini_fields.each do |field| value = PhusionPassenger.send(field) f.puts "#{field}=#{value}" if value end end puts File.read(location_config_filename) if debugging? File.open(@config_filename, 'w') do |f| f.chmod(0644) template_filename = File.join(PhusionPassenger.resources_dir, "templates", "standalone", "config.erb") require_erb erb = ERB.new(File.read(template_filename)) current_user = Etc.getpwuid(Process.uid).name # The template requires some helper methods which are defined in start_command.rb. output = erb.result(binding) f.write(output) puts output if debugging? end end def serialize_strset(*items) if "".respond_to?(:force_encoding) items = items.map { |x| x.force_encoding('binary') } null = "\0".force_encoding('binary') else null = "\0" end return [items.join(null)].pack('m*').gsub("\n", "").strip end def determine_nginx_start_command if @options[:nginx_bin] nginx_bin = @options[:nginx_bin] else nginx_bin = @runtime_locator.find_nginx_binary end return "#{nginx_bin} -c '#{@config_filename}' -p '#{@temp_dir}/'" end # Returns the port on which to ping Nginx. def nginx_ping_port if @options[:ping_port] return @options[:ping_port] else return @options[:port] end end def create_nginx_controller(extra_options = {}) require_daemon_controller require 'socket' unless defined?(UNIXSocket) require 'thread' unless defined?(Mutex) if @options[:socket_file] ping_spec = [:unix, @options[:socket_file]] else ping_spec = [:tcp, @options[:address], nginx_ping_port] end opts = { :identifier => 'Nginx', :before_start => method(:write_nginx_config_file), :start_command => method(:determine_nginx_start_command), :ping_command => ping_spec, :pid_file => @options[:pid_file], :log_file => @options[:log_file], :timeout => 25 } @nginx = DaemonController.new(opts.merge(extra_options)) @nginx_mutex = Mutex.new end end end # module Standalone end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/standalone/config_file.rb000644 000765 000024 00000006215 12233035540 025443 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'erb' module PhusionPassenger module Standalone class ConfigFile class DisallowedContextError < StandardError attr_reader :filename attr_reader :line def initialize(message, filename, line) super(message) @filename = filename @line = line end end attr_reader :options def initialize(context, filename) @options = {} @context = context @filename = filename File.open(filename, 'r') do |f| f.flock(File::LOCK_SH) instance_eval(f.read, filename) end end def address(addr) allowed_contexts(:port, :global_config) @options[:address] = addr @options[:tcp_explicitly_given] = true end def port(number) allowed_contexts(:port, :global_config) @options[:port] = number @options[:tcp_explicitly_given] = true end def environment(name) @options[:env] = name end alias env environment alias rails_env environment alias rack_env environment def max_pool_size(number) allowed_contexts(:max_pool_size, :global_config) @options[:max_pool_size] = number end def min_instances(number) @options[:min_instances] = number end def daemonize(on) allowed_contexts(:daemonize, :global_config) @options[:daemonize] = on end def nginx_bin(filename) allowed_contexts(:nginx_bin, :global_config) @options[:nginx_bin] = filename end def domain_name(name) allowed_contexts(:domain_name, :local_config) @options[:server_names] = [name] end def domain_names(*names) allowed_contexts(:domain_names, :local_config) @options[:server_names] = names.to_a.flatten end def analytics(value) @options[:analytics] = value end def debugger(value) @options[:debugger] = value end private def allowed_contexts(option_name, *contexts) if !contexts.include?(@context) raise DisallowedContextError.new("The '#{option_name}' option may not be set in this config file.", @filename, caller[1].split(':')[1].to_i) end end end end # module Standalone end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/standalone/help_command.rb000644 000765 000024 00000004112 12233035540 025617 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'standalone/command' module PhusionPassenger module Standalone class HelpCommand < Command def self.show_in_command_list return false end def run puts "Phusion Passenger Standalone, the easiest way to deploy Ruby web apps." puts puts "Available commands:" puts Main.each_command do |command_name, command_class| if command_class.show_in_command_list printf " passenger %-15s %s\n", command_name, wrap_desc(command_class.description, 51, 29) end end puts puts "Special options:" puts puts " passenger --help Display this help message." puts " passenger --version Display version number." puts puts "For more information about a specific command, please type" puts "'passenger --help', e.g. 'passenger start --help'." end end end # module Standalone end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/standalone/main.rb000644 000765 000024 00000006636 12233035540 024132 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'standalone/command' module PhusionPassenger module Standalone class Main COMMANDS = [ ['start', 'StartCommand'], ['stop', 'StopCommand'], ['status', 'StatusCommand'], ['package-runtime', 'PackageRuntimeCommand'], ['version', 'VersionCommand'], ['help', 'HelpCommand'] ] def self.run!(argv) new.run!(argv) end def self.each_command COMMANDS.each do |command_spec| command_name = command_spec[0] filename = command_name.sub(/-/, '_') + "_command" PhusionPassenger.require_passenger_lib "standalone/#{filename}" command_class = Standalone.const_get(command_spec[1]) yield(command_name, command_class) end end def run!(argv) command = argv[0] if command.nil? || command == '-h' || command == '--help' run_command('help') exit elsif command == '-v' || command == '--version' run_command('version') exit elsif command_exists?(command) begin run_command(command, argv[1..-1]) rescue => e if defined?(OptionParser::ParseError) && e.is_a?(OptionParser::ParseError) puts e puts puts "Please see '--help' for valid options." exit 1 elsif defined?(ConfigFile::DisallowedContextError) && e.is_a?(ConfigFile::DisallowedContextError) puts "*** Error in #{e.filename} line #{e.line}:" puts e exit 1 else raise e end end else STDERR.puts "Unknown command '#{command}'. Please type --help for options." exit 1 end end private def command_exists?(name) return !!find_command_spec(name) end def run_command(name, args = []) if spec = find_command_spec(name) klass = get_command_class(spec) klass.require_libs if klass.respond_to?(:require_libs) klass.new(args).run else raise ArgumentError, "Command '#{name}' doesn't exist" end end def find_command_spec(name) COMMANDS.each do |spec| if spec[0] == name return spec end end return nil end def get_command_class(spec) command_name, class_name = spec filename = command_name.sub(/-/, '_') + "_command" PhusionPassenger.require_passenger_lib("standalone/#{filename}") return Standalone.const_get(class_name) end end end # module Standalone end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/standalone/package_runtime_command.rb000644 000765 000024 00000007466 12233035540 030044 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger module Standalone class PackageRuntimeCommand < Command def self.description return "Package the Phusion Passenger Standalone runtime." end def self.require_libs PhusionPassenger.require_passenger_lib 'platform_info/binary_compatibility' PhusionPassenger.require_passenger_lib 'standalone/runtime_installer' end def run destdir = File.expand_path("passenger-standalone") description = "Package the Phusion Passenger Standalone runtime into the specified directory.\n" << "If DIRECTORY is not given then #{destdir} will be used." parse_options!("package [directory]", description) do |opts| opts.on("--nginx-version VERSION", String, wrap_desc("Nginx version to use as core (default: #{@options[:nginx_version]})")) do |value| @options[:nginx_version] = value end opts.on("--nginx-tarball FILENAME", String, wrap_desc("Use the given tarball instead of downloading from the Internet. " + "This tarball *must* match the version specified by --nginx-version!")) do |value| @options[:nginx_tarball] = value end end destdir = File.expand_path(@args[0]) if @args[0] runtime_dir = "#{destdir}/#{PhusionPassenger::VERSION_STRING}" support_dir = "#{runtime_dir}/support-#{PlatformInfo.cxx_binary_compatibility_id}" ruby_dir = "#{runtime_dir}/rubyext-#{PlatformInfo.ruby_extension_binary_compatibility_id}" nginx_dir = "#{runtime_dir}/nginx-#{@options[:nginx_version]}-#{PlatformInfo.cxx_binary_compatibility_id}" sh "rm", "-rf", support_dir sh "rm", "-rf", nginx_dir installer = RuntimeInstaller.new( :targets => [:nginx, :ruby, :support_binaries], :support_dir => support_dir, :ruby_dir => ruby_dir, :nginx_dir => nginx_dir, :nginx_version => @options[:nginx_version], :nginx_tarball => @options[:nginx_tarball], :download_binaries => false) installer.run Dir.chdir(support_dir) do support_dir_name = File.basename(support_dir) puts "cd #{support_dir}" sh "tar -c . | gzip --best > ../#{support_dir_name}.tar.gz" end Dir.chdir(ruby_dir) do ruby_dir_name = File.basename(ruby_dir) puts "cd #{ruby_dir}" sh "tar -c . | gzip --best > ../#{ruby_dir_name}.tar.gz" end Dir.chdir(nginx_dir) do nginx_dir_name = File.basename(nginx_dir) puts "cd #{nginx_dir}" sh "tar -c . | gzip --best > ../#{nginx_dir_name}.tar.gz" end puts "cd #{runtime_dir}" sh "rm", "-rf", support_dir, ruby_dir, nginx_dir end private def sh(*args) puts args.join(' ') if !system(*args) STDERR.puts "*** Cannot run command: #{args.join(' ')}" exit 1 end end end end end passenger-4.0.37/lib/phusion_passenger/standalone/runtime_installer.rb000644 000765 000024 00000052166 12233035540 026745 0ustar00honglistaff000000 000000 # encoding: utf-8 # # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'fileutils' require 'logger' PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'abstract_installer' PhusionPassenger.require_passenger_lib 'packaging' PhusionPassenger.require_passenger_lib 'common_library' PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/ruby' PhusionPassenger.require_passenger_lib 'platform_info/binary_compatibility' PhusionPassenger.require_passenger_lib 'standalone/utils' PhusionPassenger.require_passenger_lib 'utils/tmpio' module PhusionPassenger module Standalone # Installs the Phusion Passenger Standalone runtime by downloading or compiling # the Phusion Passenger support binaries and Nginx, and then storing them # in the designated directories. This installer is entirely non-interactive. # # The following option must be given: # - targets: An array containing at least one of: # * :support_binaries - to indicate that you want to install the # Phusion Passenger support binary files. # * :nginx - to indicate that you want to install Nginx. # # If `targets` contains `:support_binaries`, then you must also specify this # options: # - support_dir: The support binary files will be installed here. # # If `targets` contains `:nginx`, then you must also specify these options: # - nginx_dir: Nginx will be installed into this directory. # - lib_dir: Path to the Phusion Passenger libraries, which Nginx will link to. # This may be the same path as `support_dir`; Nginx will be compiled # after the support binary files are installed. # - nginx_version (optional): The Nginx version to download. If not given then a # hardcoded version number will be used. # - nginx_tarball (optional): The location to the Nginx tarball. This tarball *must* # contain the Nginx version as specified by +version+. If +tarball+ is given # then Nginx will not be downloaded; it will be extracted from this tarball # instead. # # Other optional options: # - download_binaries: If true then RuntimeInstaller will attempt to download # a precompiled Nginx binary and precompiled Phusion Passenger support binaries # from the network, if they exist for the current platform. The default is # true. Note that binary downloading only happens when Phusion Passenger is # installed from an official release package. # - binaries_url_root: The URL on which to look for the aforementioned binaries. # The default points to the Phusion website. class RuntimeInstaller < AbstractInstaller include Utils def initialize(*args) super(*args) raise ArgumentError, "At least one target must be given" if @targets.nil? || @targets.empty? if @targets.include?(:support_binaries) if PhusionPassenger.natively_packaged? raise ArgumentError, "You cannot specify :support_binaries as a " + "target when natively packaged" end raise ArgumentError, ":support_dir must be given" if !@support_dir end if @targets.include?(:nginx) raise ArgumentError, ":nginx_dir must be given" if !@nginx_dir raise ArgumentError, ":lib_dir must be given" if !@lib_dir end end protected def dependencies specs = [ 'depcheck_specs/compiler_toolchain', 'depcheck_specs/ruby', 'depcheck_specs/gems', 'depcheck_specs/libs', 'depcheck_specs/utilities' ] ids = [ 'cc', 'c++', 'gmake', 'ruby-openssl', 'rubygems', 'rake', 'rack', 'libcurl-dev', 'openssl-dev', 'zlib-dev', 'pcre-dev', 'daemon_controller >= 1.1.0' ].compact return [specs, ids] end def users_guide_path return PhusionPassenger.standalone_doc_path end def users_guide_url return STANDALONE_DOC_URL end def run_steps check_whether_os_is_broken check_for_download_tool download_or_compile_binaries end def before_install super @plugin.call_hook(:runtime_installer_start, self) if @plugin @working_dir = PhusionPassenger::Utils.mktmpdir("passenger.", PlatformInfo.tmpexedir) @nginx_version ||= PREFERRED_NGINX_VERSION @download_binaries = true if !defined?(@download_binaries) @binaries_url_root ||= PhusionPassenger.binaries_sites end def after_install super FileUtils.remove_entry_secure(@working_dir) if @working_dir @plugin.call_hook(:runtime_installer_cleanup) if @plugin end private def check_for_download_tool PhusionPassenger.require_passenger_lib 'platform_info/depcheck' PlatformInfo::Depcheck.load('depcheck_specs/utilities') result = PlatformInfo::Depcheck.find('download-tool').check # Don't output anything if there is a download tool. # We want to be as quiet as possible. return if result && result[:found] puts "Checking for basic prerequities..." puts runner = PlatformInfo::Depcheck::ConsoleRunner.new runner.add('download-tool') result = runner.check_all puts if !result @download_binaries = false line puts render_template 'standalone/download_tool_missing', :runner => runner wait end end def download_or_compile_binaries if should_install_support_binaries? support_binaries_downloaded = download_support_binaries end if should_install_nginx? nginx_binary_downloaded = download_nginx_binary end should_compile_support_binaries = should_install_support_binaries? && !support_binaries_downloaded should_compile_nginx = should_install_nginx? && !nginx_binary_downloaded if should_compile_support_binaries || should_compile_nginx if @dont_compile_runtime @stderr.puts "*** ERROR: Refusing to compile the Phusion Passenger Standalone runtime " + "because --no-compile-runtime is given." exit(1) end check_nginx_module_sources_available || exit(1) puts check_dependencies(false) || exit(1) puts if should_compile_support_binaries check_whether_we_can_write_to(@support_dir) || exit(1) end if should_compile_nginx check_whether_we_can_write_to(@nginx_dir) || exit(1) end end if should_compile_nginx nginx_source_dir = download_and_extract_nginx_sources end if should_compile_support_binaries compile_support_binaries end if should_compile_nginx compile_nginx(nginx_source_dir) end end # If this method returns true, then PhusionPassenger.originally_packaged? is also true. def should_install_support_binaries? return @targets.include?(:support_binaries) end def should_install_nginx? return @targets.include?(:nginx) end def should_download_binaries? return PhusionPassenger.installed_from_release_package? && @download_binaries && @binaries_url_root end def download_support_binaries return false if !should_download_binaries? puts " --> Downloading #{PROGRAM_NAME} support binaries for your platform" basename = "support-#{PlatformInfo.cxx_binary_compatibility_id}.tar.gz" tarball = "#{@working_dir}/#{basename}" if !download_support_file(basename, tarball) puts " No binaries are available for your platform. Will compile them from source" return false end FileUtils.mkdir_p(@support_dir) Dir.mkdir("#{@working_dir}/support") Dir.chdir("#{@working_dir}/support") do if !extract_tarball(tarball) @stderr.puts " *** Error: cannot extract tarball" return false end return false if !check_support_binaries end if system("mv '#{@working_dir}/support'/* '#{@support_dir}'/") return true else @stderr.puts " *** Error: could not move extracted files to the support directory" return false end rescue Interrupt exit 2 end def check_support_binaries ["PassengerWatchdog", "PassengerHelperAgent", "PassengerLoggingAgent"].each do |exe| puts " Checking whether the downloaded #{exe.sub(/^Passenger/, '')} binary is usable" output = `env LD_BIND_NOW=1 DYLD_BIND_AT_LAUNCH=1 ./agents/#{exe} --test-binary 1` if !$? || $?.exitstatus != 0 || output != "PASS\n" @stderr.puts " --> Not usable, will compile from source" return false end end puts " All good" return true end def download_nginx_binary return false if !should_download_binaries? puts " --> Downloading web helper for your platform" basename = "webhelper-#{@nginx_version}-#{PlatformInfo.cxx_binary_compatibility_id}.tar.gz" tarball = "#{@working_dir}/#{basename}" if !download_support_file(basename, tarball) puts " No binary is available for your platform. Will compile it from source." return false end FileUtils.mkdir_p(@nginx_dir) Dir.mkdir("#{@working_dir}/nginx") Dir.chdir("#{@working_dir}/nginx") do result = extract_tarball(tarball) if !result @stderr.puts " *** Error: cannot extract tarball" return false end if check_nginx_binary if system("mv '#{@working_dir}/nginx'/* '#{@nginx_dir}'/") return true else @stderr.puts " *** Error: could not move extracted web helper binary to the right directory" return false end else return false end end rescue Interrupt exit 2 end def check_nginx_binary puts " Checking whether the downloaded binary is usable" output = `env LD_BIND_NOW=1 DYLD_BIND_AT_LAUNCH=1 ./PassengerWebHelper -v 2>&1` if $? && $?.exitstatus == 0 && output =~ /nginx version:/ puts " All good" return true else @stderr.puts " --> Not usable, will compile from source" return false end end def download_and_extract_nginx_sources begin_progress_bar puts "Downloading web helper source code..." if @nginx_tarball tarball = @nginx_tarball else basename = "nginx-#{@nginx_version}.tar.gz" tarball = "#{@working_dir}/#{basename}" if !download("http://nginx.org/download/#{basename}", tarball) puts show_possible_solutions_for_download_and_extraction_problems exit(1) end end nginx_sources_name = "nginx-#{@nginx_version}" Dir.chdir(@working_dir) do begin_progress_bar begin result = extract_tarball(tarball) do |progress, total| show_progress(progress / total * 0.1, 1.0, 1, 1, "Extracting web helper source...") end rescue Exception puts raise end if result rename_nginx_proctitle("#{@working_dir}/#{nginx_sources_name}") return "#{@working_dir}/#{nginx_sources_name}" else puts show_possible_solutions_for_download_and_extraction_problems exit(1) end end rescue Interrupt exit 2 end def rename_nginx_proctitle(source_dir) filename = "#{source_dir}/src/os/unix/ngx_setproctitle.c" if File.exist?(filename) source = File.open(filename, "r") { |f| f.read } source.gsub!('"nginx: "', '"PassengerWebHelper: "') File.open(filename, "w") { |f| f.write(source) } end end def compile_support_binaries begin_progress_bar show_progress(0, 1, 1, 1, "Preparing #{PROGRAM_NAME}...") Dir.chdir(PhusionPassenger.build_system_dir) do args = "nginx_without_native_support" + " CACHING=false" + " OUTPUT_DIR='#{@support_dir}'" begin run_rake_task!(args) do |progress, total| show_progress(progress, total, 1, 1, "Compiling #{PROGRAM_NAME}...") end ensure puts end system "rm -rf '#{@support_dir}'/agents/{*.o,*.dSYM}" system "rm -rf '#{@support_dir}'/common/libboost_oxt" system "rm -rf '#{@support_dir}'/*/{*.lo,*.h,*.log,Makefile,libtool,stamp-h1,config.status,.deps}" system "rm -rf '#{@support_dir}'/{libeio,libev}/*.o" # Retain only the object files that are needed for linking the Phusion Passenger module into Nginx. nginx_libs = COMMON_LIBRARY. only(*NGINX_LIBS_SELECTOR). set_output_dir("#{@support_dir}/libpassenger_common"). link_objects Dir["#{@support_dir}/libpassenger_common/**/*"].each do |filename| if !nginx_libs.include?(filename) && File.file?(filename) File.unlink(filename) end end end end def compile_nginx(nginx_source_dir) install_nginx_from_source(nginx_source_dir) do |progress, total, status_text| show_progress(0.1 + progress / total.to_f * 0.9, 1.0, 1, 1, status_text) end puts end def check_nginx_module_sources_available if PhusionPassenger.natively_packaged? && !File.exist?(PhusionPassenger.nginx_module_source_dir) case PhusionPassenger.native_packaging_method when "deb" command = "sudo sh -c 'apt-get update && apt-get install #{DEB_DEV_PACKAGE}'" when "rpm" command = "sudo yum install #{RPM_DEV_PACKAGE}-#{VERSION_STRING}" end if command if STDIN.tty? puts " --> Installing #{PhusionPassenger::PROGRAM_NAME} web helper sources" puts " Running: #{command}" if system(command) return true else puts " *** Command failed: #{command}" return false end else puts " --> #{PhusionPassenger::PROGRAM_NAME} web helper sources not installed" puts " Please install them first: #{command}" return false end else puts " --> #{PhusionPassenger::PROGRAM_NAME} web helper sources not installed" puts " Please ask your operating system vendor how to install these." return false end else return true end end def check_whether_we_can_write_to(dir) FileUtils.mkdir_p(dir) File.new("#{dir}/__test__.txt", "w").close return true rescue new_screen if Process.uid == 0 render_template 'standalone/cannot_write_to_dir', :dir => dir else render_template 'standalone/run_installer_as_root', :dir => dir end return false ensure File.unlink("#{dir}/__test__.txt") rescue nil end def show_progress(progress, total, phase, total_phases, status_text = "") if !phase.is_a?(Range) phase = phase..phase end total_progress = (phase.first - 1).to_f / total_phases total_progress += (progress.to_f / total) * ((phase.last - phase.first + 1).to_f / total_phases) max_width = 79 progress_bar_width = 45 text = sprintf("[%-#{progress_bar_width}s] %s", '*' * (progress_bar_width * total_progress).to_i, status_text) text = text.ljust(max_width) text = text[0 .. max_width - 1] if @stdout.tty? @stdout.write("#{text}\r") @stdout.flush else if @last_status_text != status_text @last_status_text = status_text @stdout.write("[#{status_text.sub(/\.*$/, '')}]") end @stdout.write(".") @stdout.flush end @plugin.call_hook(:runtime_installer_progress, total_progress, status_text) if @plugin end def myself return `whoami`.strip end def begin_progress_bar if !@begun @begun = true puts "Installing #{PROGRAM_NAME} Standalone..." end end def show_possible_solutions_for_download_and_extraction_problems new_screen render_template "standalone/possible_solutions_for_download_and_extraction_problems" puts end def extract_tarball(filename) File.open(filename, 'rb') do |f| IO.popen("tar xzf -", "wb") do |io| buffer = '' buffer = buffer.force_encoding('binary') if buffer.respond_to?(:force_encoding) total_size = File.size(filename) bytes_read = 0 yield(bytes_read, total_size) if block_given? begin doing_our_io = true while !f.eof? f.read(1024 * 8, buffer) io.write(buffer) io.flush bytes_read += buffer.size doing_our_io = false yield(bytes_read, total_size) if block_given? doing_our_io = true end rescue Errno::EPIPE if doing_our_io return false else raise end end end if $?.exitstatus != 0 return false end end return true end def download_support_file(name, output) logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.formatter = proc do |severity, datetime, progname, msg| msg.gsub(/^/, " ") + "\n" end if @binaries_url_root.is_a?(String) sites = [{ :url => @binaries_url_root }] else sites = @binaries_url_root end sites.each_with_index do |site, i| if real_download_support_file(site, name, output, logger) logger.warn "Download OK!" if i > 0 return true elsif i != sites.size - 1 logger.warn "Trying next mirror..." end end return false end def real_download_support_file(site, name, output, logger) url = "#{site[:url]}/#{VERSION_STRING}/#{name}" return download(url, output, :cacert => site[:cacert], :logger => logger, :use_cache => true) end def run_command_with_throbber(command, status_text) backlog = "" IO.popen("#{command} 2>&1", "r") do |io| throbbers = ['-', '\\', '|', '/'] index = 0 while !io.eof? backlog << io.readline yield("#{status_text} #{throbbers[index]}") index = (index + 1) % throbbers.size end end if $?.exitstatus != 0 @stderr.puts @stderr.puts backlog @stderr.puts "*** ERROR: command failed: #{command}" exit 1 end end def copy_files(files, target) FileUtils.mkdir_p(target) files.each_with_index do |filename, i| next if File.directory?(filename) dir = "#{target}/#{File.dirname(filename)}" if !File.directory?(dir) FileUtils.mkdir_p(dir) end FileUtils.install(filename, "#{target}/#{filename}", :mode => File.stat(filename).mode) yield(i + 1, files.size) end end def rake return PlatformInfo.rake_command end def run_rake_task!(target) total_lines = `#{rake} #{target} --dry-run STDERR_TO_STDOUT=1`.split("\n").size - 1 backlog = "" IO.popen("#{rake} #{target} --trace STDERR_TO_STDOUT=1", "r") do |io| progress = 1 while !io.eof? line = io.readline if line =~ /^\*\* / yield(progress, total_lines) backlog.replace("") progress += 1 else backlog << line end end end if $?.exitstatus != 0 @stderr.puts @stderr.puts "*** ERROR: the following command failed:" @stderr.puts(backlog) exit 1 end end def install_nginx_from_source(source_dir) PhusionPassenger.require_passenger_lib 'platform_info/compiler' Dir.chdir(source_dir) do shell = PlatformInfo.find_command('bash') || "sh" command = "" lib_dir = "#{@lib_dir}/common/libpassenger_common" nginx_libs = COMMON_LIBRARY.only(*NGINX_LIBS_SELECTOR). set_output_dir(lib_dir). link_objects_as_string command << "env PASSENGER_INCLUDEDIR='#{PhusionPassenger.include_dir}' " << "PASSENGER_LIBS='#{nginx_libs} #{lib_dir}/../libboost_oxt.a' " # RPM thinks it's being smart by scanning binaries for # paths and refusing to create package if it detects any # hardcoded thats that point to /usr or other important # locations. For Phusion Passenger Standalone we do not # care at all what the Nginx configured prefix is because # we pass it its resource locations during runtime, so # work around the problem by configure Nginx with prefix # /tmp. command << "#{shell} ./configure --prefix=/tmp " << "#{STANDALONE_NGINX_CONFIGURE_OPTIONS} " << "'--add-module=#{PhusionPassenger.nginx_module_source_dir}'" run_command_with_throbber(command, "Preparing web helper...") do |status_text| yield(0, 1, status_text) end backlog = "" # Capture and index the `make --dry-run` output for # progress determination. total_lines = 0 dry_run_output = {} `#{PlatformInfo.gnu_make} --dry-run`.split("\n").each do |line| total_lines += 1 dry_run_output[line] = true end IO.popen("#{PlatformInfo.gnu_make} 2>&1", "r") do |io| progress = 1 while !io.eof? line = io.readline backlog << line # If the output is part of what we saw when dry-running, # then increase progress bar. Otherwise it could be compiler # warnings or something, so ignore those. if dry_run_output[line.chomp] yield(progress, total_lines, "Compiling web helper...") progress += 1 end end end if $?.exitstatus != 0 @stderr.puts @stderr.puts "*** ERROR: unable to compile web helper." @stderr.puts backlog exit 1 end yield(1, 1, 'Copying files...') if !system("cp -pR objs/nginx '#{@nginx_dir}/PassengerWebHelper'") @stderr.puts @stderr.puts "*** ERROR: unable to copy web helper binary." exit 1 end if !strip_binary("#{@nginx_dir}/PassengerWebHelper") @stderr.puts @stderr.puts "*** ERROR: unable to strip debugging symbols from the web helper binary." exit 1 end end end def strip_binary(filename) return system("strip", filename) end end end # module Standalone end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/standalone/runtime_locator.rb000644 000765 000024 00000012110 12233035540 026374 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'platform_info/binary_compatibility' PhusionPassenger.require_passenger_lib 'utils/json' require 'etc' module PhusionPassenger module Standalone # Helper class for locating runtime files used by Passenger Standalone. class RuntimeLocator attr_reader :runtime_dir def initialize(runtime_dir, nginx_version = PhusionPassenger::PREFERRED_NGINX_VERSION) @runtime_dir = runtime_dir || default_runtime_dir @nginx_version = nginx_version end def self.looks_like_support_dir?(dir) File.exist?("#{dir}/agents/PassengerWatchdog") && File.exist?("#{dir}/common/libboost_oxt.a") && File.exist?("#{dir}/common/libpassenger_common/ApplicationPool2/Implementation.o") end def reload @has_support_dir = @has_nginx_binary = false end # Returns the directory in which Passenger Standalone # support binaries are stored, or nil if not installed. def find_support_dir return @support_dir if @has_support_dir if PhusionPassenger.originally_packaged? if debugging? @support_dir = PhusionPassenger.buildout_dir else dir = "#{@runtime_dir}/#{version}/support-#{cxx_compat_id}" if self.class.looks_like_support_dir?(dir) @support_dir = dir else @support_dir = nil end end else @support_dir = PhusionPassenger.lib_dir end @has_support_dir = true return @support_dir end # Returns the path to the Nginx binary that Passenger Standalone # may use, or nil if not installed. def find_nginx_binary return @nginx_binary if @has_nginx_binary if File.exist?(config_filename) config = PhusionPassenger::Utils::JSON.parse(File.read(config_filename)) else config = {} end if result = config["nginx_binary"] @nginx_binary = result elsif PhusionPassenger.natively_packaged? && @nginx_version == PhusionPassenger::PREFERRED_NGINX_VERSION @nginx_binary = "#{PhusionPassenger.lib_dir}/PassengerWebHelper" else filename = "#{@runtime_dir}/#{version}/webhelper-#{@nginx_version}-#{cxx_compat_id}/PassengerWebHelper" if File.exist?(filename) @nginx_binary = filename else @nginx_binary = nil end end @has_nginx_binary = true return @nginx_binary end def find_agents_dir return "#{find_support_dir}/agents" end def find_lib_dir return find_support_dir end def everything_installed? return find_support_dir && find_nginx_binary end def install_targets result = [] result << :nginx if find_nginx_binary.nil? result << :support_binaries if find_support_dir.nil? return result end # Returns the directory to which support binaries may be installed, # in case the RuntimeInstaller is to be invoked. def support_dir_install_destination if PhusionPassenger.originally_packaged? if debugging? return "#{PhusionPassenger.lib_dir}/common/libpassenger_common" else return "#{@runtime_dir}/#{version}/support-#{cxx_compat_id}" end else return nil end end # Returns the directory to which the Nginx binary may be installed, # in case the RuntimeInstaller is to be invoked. def nginx_binary_install_destination return "#{@runtime_dir}/#{version}/webhelper-#{@nginx_version}-#{cxx_compat_id}" end private def default_runtime_dir if Process.uid == 0 # It is important that the default runtime dir for the root user # is a publicly accessible directory, because when --user is given, # the agents are run as non-root users. return "/var/lib/#{GLOBAL_NAMESPACE_DIRNAME}/standalone" else home = Etc.getpwuid.dir return "#{home}/#{USER_NAMESPACE_DIRNAME}/standalone" end end def debugging? return ['yes', 'y', 'true', '1'].include?(ENV['PASSENGER_DEBUG'].to_s.downcase) end def version return PhusionPassenger::VERSION_STRING end def cxx_compat_id return PlatformInfo.cxx_binary_compatibility_id end def config_filename return "#{@runtime_dir}/config.json" end end end # module Standalone end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/standalone/start_command.rb000644 000765 000024 00000053611 12233035540 026034 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'socket' require 'thread' require 'etc' PhusionPassenger.require_passenger_lib 'plugin' PhusionPassenger.require_passenger_lib 'standalone/command' PhusionPassenger.require_passenger_lib 'platform_info/operating_system' # We lazy load as many libraries as possible not only to improve startup performance, # but also to ensure that we don't require libraries before we've passed the dependency # checking stage of the runtime installer. module PhusionPassenger module Standalone class StartCommand < Command def self.description return "Start Phusion Passenger Standalone." end def initialize(args) super(args) @console_mutex = Mutex.new @termination_pipe = IO.pipe @threads = [] @interruptable_threads = [] @plugin = PhusionPassenger::Plugin.new('standalone/start_command', self, @options) end def run parse_my_options sanity_check_options PhusionPassenger.require_passenger_lib 'standalone/runtime_locator' @runtime_locator = RuntimeLocator.new(@options[:runtime_dir], @options[:nginx_version]) ensure_runtime_installed exit if @options[:runtime_check_only] require_app_finder @app_finder = AppFinder.new(@args, @options) @apps = @app_finder.scan @options = @app_finder.global_options determine_various_resource_locations @plugin.call_hook(:found_apps, @apps) extra_controller_options = {} @plugin.call_hook(:before_creating_nginx_controller, extra_controller_options) create_nginx_controller(extra_controller_options) begin start_nginx show_intro_message if @options[:daemonize] if PlatformInfo.ruby_supports_fork? daemonize else daemonize_without_fork end end Thread.abort_on_exception = true @plugin.call_hook(:nginx_started, @nginx) ######################## ######################## touch_temp_dir_in_background watch_log_files_in_background if should_watch_logs? wait_until_nginx_has_exited if should_wait_until_nginx_has_exited? rescue Interrupt begin_shutdown stop_threads stop_nginx exit 2 rescue SignalException => signal begin_shutdown stop_threads stop_nginx if signal.message == 'SIGINT' || signal.message == 'SIGTERM' exit 2 else raise end rescue Exception => e begin_shutdown stop_threads stop_nginx raise ensure begin_shutdown begin stop_threads ensure finalize_shutdown end end ensure @plugin.call_hook(:cleanup) end private def require_file_utils require 'fileutils' unless defined?(FileUtils) end def parse_my_options description = "Starts Phusion Passenger Standalone and serve one or more Ruby web applications." parse_options!("start [directory]", description) do |opts| opts.on("-a", "--address HOST", String, wrap_desc("Bind to HOST address (default: #{@options[:address]})")) do |value| @options[:address] = value @options[:tcp_explicitly_given] = true end opts.on("-p", "--port NUMBER", Integer, wrap_desc("Use the given port number (default: #{@options[:port]})")) do |value| @options[:port] = value @options[:tcp_explicitly_given] = true end opts.on("-S", "--socket FILE", String, wrap_desc("Bind to Unix domain socket instead of TCP socket")) do |value| @options[:socket_file] = value end opts.separator "" opts.on("-e", "--environment ENV", String, wrap_desc("Framework environment (default: #{@options[:environment]})")) do |value| @options[:environment] = value end opts.on("-R", "--rackup FILE", String, wrap_desc("Consider application a Ruby Rack app, and use the given rackup file")) do |value| @options[:app_type] = "rack" @options[:startup_file] = value end opts.on("--app-type NAME", String, wrap_desc("Force app to be detected as the given type")) do |value| @options[:app_type] = value end opts.on("--startup-file FILENAME", String, wrap_desc("Force given startup file to be used")) do |value| @options[:startup_file] = value end opts.on("--max-pool-size NUMBER", Integer, wrap_desc("Maximum number of application processes (default: #{@options[:max_pool_size]})")) do |value| @options[:max_pool_size] = value end opts.on("--min-instances NUMBER", Integer, wrap_desc("Minimum number of processes per application (default: #{@options[:min_instances]})")) do |value| @options[:min_instances] = value end opts.on("--spawn-method NAME", String, wrap_desc("The spawn method to use (default: #{@options[:spawn_method]})")) do |value| @options[:spawn_method] = value end opts.on("--concurrency-model NAME", String, wrap_desc("The concurrency model to use, either 'process' or 'thread' (default: #{@options[:concurrency_model]}) (Enterprise only)")) do |value| @options[:concurrency_model] = value end opts.on("--thread-count NAME", Integer, wrap_desc("The number of threads to use when using the 'thread' concurrency model (default: #{@options[:thread_count]}) (Enterprise only)")) do |value| @options[:thread_count] = value end opts.on("--rolling-restarts", wrap_desc("Enable rolling restarts (Enterprise only)")) do @options[:rolling_restarts] = true end opts.on("--resist-deployment-errors", wrap_desc("Enable deployment error resistance (Enterprise only)")) do @options[:resist_deployment_errors] = true end opts.on("--no-friendly-error-pages", wrap_desc("Disable passenger_friendly_error_pages")) do @options[:friendly_error_pages] = false end opts.on("--ssl", wrap_desc("Enable SSL support")) do @options[:ssl] = true end opts.on("--ssl-certificate PATH", String, wrap_desc("Specify the SSL certificate path")) do |val| @options[:ssl_certificate] = File.expand_path(val) end opts.on("--ssl-certificate-key PATH", String, wrap_desc("Specify the SSL key path")) do |val| @options[:ssl_certificate_key] = File.expand_path(val) end opts.on("--ssl-port PORT", Integer, wrap_desc("Listen for SSL on this port, while listening for HTTP on the normal port")) do |val| @options[:ssl_port] = val end opts.on("--static-files-dir PATH", String, wrap_desc("Specify the static files dir")) do |val| @options[:static_files_dir] = File.expand_path(val) end opts.on("--restart-dir PATH", String, wrap_desc("Specify the restart dir")) do |val| @options[:restart_dir] = File.expand_path(val) end opts.on("--union-station-gateway HOST:PORT", String, wrap_desc("Specify Union Station Gateway host and port")) do |value| host, port = value.split(":", 2) port = port.to_i port = 443 if port == 0 @options[:union_station_gateway_address] = host @options[:union_station_gateway_port] = port.to_i end opts.on("--union-station-key KEY", String, wrap_desc("Specify Union Station key")) do |value| @options[:union_station_key] = value end opts.separator "" opts.on("--ping-port NUMBER", Integer, wrap_desc("Use the given port number for checking whether Nginx is alive (default: same as the normal port)")) do |value| @options[:ping_port] = value end @plugin.call_hook(:parse_options, opts) opts.separator "" opts.on("-d", "--daemonize", wrap_desc("Daemonize into the background")) do @options[:daemonize] = true end opts.on("--user USERNAME", String, wrap_desc("User to run as. Ignored unless running as root.")) do |value| @options[:user] = value end opts.on("--log-file FILENAME", String, wrap_desc("Where to write log messages (default: console, or /dev/null when daemonized)")) do |value| @options[:log_file] = value end opts.on("--pid-file FILENAME", String, wrap_desc("Where to store the PID file")) do |value| @options[:pid_file] = value end opts.on("--temp-dir PATH", String, wrap_desc("Use the given temp dir")) do |value| ENV['TMPDIR'] = value @options[:temp_dir] = value end opts.separator "" opts.on("--nginx-bin FILENAME", String, wrap_desc("Nginx binary to use as core")) do |value| @options[:nginx_bin] = value end opts.on("--nginx-version VERSION", String, wrap_desc("Nginx version to use as core (default: #{@options[:nginx_version]})")) do |value| @options[:nginx_version] = value end opts.on("--nginx-tarball FILENAME", String, wrap_desc("If Nginx needs to be installed, then the given tarball will " + "be used instead of downloading from the Internet")) do |value| @options[:nginx_tarball] = File.expand_path(value) end opts.on("--binaries-url-root URL", String, wrap_desc("If Nginx needs to be installed, then the specified URL will be " + "checked for binaries prior to a local build.")) do |value| @options[:binaries_url_root] = value end opts.on("--no-download-binaries", wrap_desc("Never download binaries")) do @options[:download_binaries] = false end opts.on("--runtime-dir DIRECTORY", String, wrap_desc("Directory to use for Phusion Passenger Standalone runtime files")) do |value| @options[:runtime_dir] = File.expand_path(value) end opts.on("--runtime-check-only", wrap_desc("Quit after checking whether the Phusion Passenger Standalone runtime files are installed")) do @options[:runtime_check_only] = true end opts.on("--no-compile-runtime", wrap_desc("Abort if runtime must be compiled")) do @options[:dont_compile_runtime] = true end end @plugin.call_hook(:done_parsing_options) end def sanity_check_options if @options[:tcp_explicitly_given] && @options[:socket_file] error "You cannot specify both --address/--port and --socket. Please choose either one." exit 1 end if @options[:ssl] && !@options[:ssl_certificate] error "You specified --ssl. Please specify --ssl-certificate as well." exit 1 end if @options[:ssl] && !@options[:ssl_certificate_key] error "You specified --ssl. Please specify --ssl-certificate-key as well." exit 1 end check_port_bind_permission_and_display_sudo_suggestion check_port_availability end # Most platforms don't allow non-root processes to bind to a port lower than 1024. # Check whether this is the case for the current platform and if so, tell the user # that it must re-run Phusion Passenger Standalone with sudo. def check_port_bind_permission_and_display_sudo_suggestion if !@options[:socket_file] && @options[:port] < 1024 && Process.euid != 0 begin TCPServer.new('127.0.0.1', @options[:port]).close rescue Errno::EACCES PhusionPassenger.require_passenger_lib 'platform_info/ruby' myself = `whoami`.strip error "Only the 'root' user can run this program on port #{@options[:port]}. " << "You are currently running as '#{myself}'. Please re-run this program " << "with root privileges with the following command:\n\n" << " #{PlatformInfo.ruby_sudo_command} passenger start #{@original_args.join(' ')} --user=#{myself}\n\n" << "Don't forget the '--user' part! That will make Phusion Passenger Standalone " << "drop root privileges and switch to '#{myself}' after it has obtained " << "port #{@options[:port]}." exit 1 end end end if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby" require 'java' def check_port(host_name, port) channel = java.nio.channels.SocketChannel.open begin address = java.net.InetSocketAddress.new(host_name, port) channel.configure_blocking(false) if channel.connect(address) return true end deadline = Time.now.to_f + 0.1 done = false while true begin if channel.finish_connect return true end rescue java.net.ConnectException => e if e.message =~ /Connection refused/i return false else throw e end end # Not done connecting and no error. sleep 0.01 if Time.now.to_f >= deadline return false end end ensure channel.close end end else def check_port(address, port) begin socket = Socket.new(Socket::Constants::AF_INET, Socket::Constants::SOCK_STREAM, 0) sockaddr = Socket.pack_sockaddr_in(port, address) begin socket.connect_nonblock(sockaddr) rescue Errno::ENOENT, Errno::EINPROGRESS, Errno::EAGAIN, Errno::EWOULDBLOCK if select(nil, [socket], nil, 0.1) begin socket.connect_nonblock(sockaddr) rescue Errno::EISCONN rescue Errno::EINVAL if PlatformInfo.os_name =~ /freebsd/i raise Errno::ECONNREFUSED else raise end end else raise Errno::ECONNREFUSED end end return true rescue Errno::ECONNREFUSED return false ensure socket.close if socket && !socket.closed? end end end def check_port_availability if !@options[:socket_file] && check_port(@options[:address], @options[:port]) error "The address #{@options[:address]}:#{@options[:port]} is already " << "in use by another process, perhaps another Phusion Passenger " << "Standalone instance.\n\n" << "If you want to run this Phusion Passenger Standalone instance on " << "another port, use the -p option, like this:\n\n" << " passenger start -p #{@options[:port] + 1}" exit 1 end end def should_watch_logs? return !@options[:daemonize] && @options[:log_file] != "/dev/null" end def should_wait_until_nginx_has_exited? return !@options[:daemonize] || @app_finder.multi_mode? end # Returns the URL that Nginx will be listening on. def listen_url if @options[:socket_file] return @options[:socket_file] else if @options[:ssl] && !@options[:ssl_port] scheme = "https" else scheme = "http" end result = "#{scheme}://#{@options[:address]}" if @options[:port] != 80 result << ":#{@options[:port]}" end result << "/" return result end end def install_runtime(runtime_locator) PhusionPassenger.require_passenger_lib 'standalone/runtime_installer' installer = RuntimeInstaller.new( :targets => runtime_locator.install_targets, :support_dir => runtime_locator.support_dir_install_destination, :nginx_dir => runtime_locator.nginx_binary_install_destination, :lib_dir => runtime_locator.find_lib_dir || runtime_locator.support_dir_install_destination, :nginx_version => @options[:nginx_version], :nginx_tarball => @options[:nginx_tarball], :binaries_url_root => @options[:binaries_url_root], :download_binaries => @options.fetch(:download_binaries, true), :dont_compile_runtime => @options[:dont_compile_runtime], :plugin => @plugin) return installer.run end def ensure_runtime_installed if @runtime_locator.everything_installed? if !File.exist?(@runtime_locator.find_nginx_binary) error "The web helper binary '#{@runtime_locator.find_nginx_binary}' does not exist." exit 1 end else if !@runtime_locator.find_support_dir && PhusionPassenger.natively_packaged? error "Your Phusion Passenger Standalone installation is broken: the support " + "files could not be found. Please reinstall Phusion Passenger Standalone. " + "If this problem persists, please contact your packager." exit 1 end install_runtime(@runtime_locator) || exit(1) @runtime_locator.reload end end def start_nginx begin @nginx.start rescue DaemonController::AlreadyStarted begin pid = @nginx.pid rescue SystemCallError, IOError pid = nil end if pid error "Phusion Passenger Standalone is already running on PID #{pid}." else error "Phusion Passenger Standalone is already running." end exit 1 rescue DaemonController::StartError => e error "Could not start Passenger Nginx core:\n#{e}" exit 1 end end def show_intro_message puts "=============== Phusion Passenger Standalone web server started ===============" puts "PID file: #{@options[:pid_file]}" puts "Log file: #{@options[:log_file]}" puts "Environment: #{@options[:environment]}" puts "Accessible via: #{listen_url}" puts if @options[:daemonize] puts "Serving in the background as a daemon." else puts "You can stop Phusion Passenger Standalone by pressing Ctrl-C." end puts "Problems? Check #{STANDALONE_DOC_URL}#troubleshooting" puts "===============================================================================" end def daemonize_without_fork STDERR.puts "Unable to daemonize using the current Ruby interpreter " + "(#{PlatformInfo.ruby_command}) because it does not support forking." exit 1 end def daemonize pid = fork if pid # Parent exit!(0) else # Child trap "HUP", "IGNORE" STDIN.reopen("/dev/null", "r") STDOUT.reopen(@options[:log_file], "a") STDERR.reopen(@options[:log_file], "a") STDOUT.sync = true STDERR.sync = true Process.setsid end end # Wait until the termination pipe becomes readable (a hint for threads # to shut down), or until the timeout has been reached. Returns true if # the termination pipe became readable, false if the timeout has been reached. def wait_on_termination_pipe(timeout) ios = select([@termination_pipe[0]], nil, nil, timeout) return !ios.nil? end def watch_log_file(log_file) if File.exist?(log_file) backward = 0 else # tail bails out if the file doesn't exist, so wait until it exists. while !File.exist?(log_file) sleep 1 end backward = 10 end IO.popen("tail -f -n #{backward} \"#{log_file}\"", "rb") do |f| begin while true begin line = f.readline @console_mutex.synchronize do STDOUT.write(line) STDOUT.flush end rescue EOFError break end end ensure Process.kill('TERM', f.pid) rescue nil end end end def watch_log_files_in_background @apps.each do |app| thread = Thread.new do watch_log_file("#{app[:root]}/log/#{@options[:environment]}.log") end @threads << thread @interruptable_threads << thread end thread = Thread.new do watch_log_file(@options[:log_file]) end @threads << thread @interruptable_threads << thread end def touch_temp_dir_in_background result = system("#{@runtime_locator.find_agents_dir}/TempDirToucher", @temp_dir, "--cleanup", "--daemonize", "--pid-file", "#{@temp_dir}/temp_dir_toucher.pid", "--log-file", @options[:log_file]) if !result error "Cannot start #{@runtime_locator.find_agents_dir}/TempDirToucher" exit 1 end end def begin_shutdown return if @shutting_down @shutting_down = 1 trap("INT", &method(:signal_during_shutdown)) trap("TERM", &method(:signal_during_shutdown)) end def finalize_shutdown @shutting_down = nil trap("INT", "DEFAULT") trap("TERM", "DEFAULT") end def signal_during_shutdown(signal) if @shutting_down == 1 @shutting_down += 1 puts "Ignoring signal #{signal} during shutdown. Send it again to force exit." else exit!(1) end end def stop_touching_temp_dir_in_background if @toucher begin Process.kill('TERM', @toucher.pid) rescue Errno::ESRCH, Errno::ECHILD end @toucher.close end end def wait_until_nginx_has_exited # Since Nginx is not our child process (it daemonizes or we daemonize) # we cannot use Process.waitpid to wait for it. A busy-sleep-loop with # Process.kill(0, pid) isn't very efficient. Instead we do this: # # Connect to Nginx and wait until Nginx disconnects the socket because of # timeout. Keep doing this until we can no longer connect. while true if @options[:socket_file] socket = UNIXSocket.new(@options[:socket_file]) else socket = TCPSocket.new(@options[:address], nginx_ping_port) end begin socket.read rescue nil ensure socket.close rescue nil end end rescue Errno::ECONNREFUSED, Errno::ECONNRESET end def stop_nginx @console_mutex.synchronize do STDOUT.write("Stopping web server...") STDOUT.flush @nginx.stop STDOUT.puts " done" STDOUT.flush end end def stop_threads if !@termination_pipe[1].closed? @termination_pipe[1].write("x") @termination_pipe[1].close end @interruptable_threads.each do |thread| thread.terminate end @interruptable_threads = [] @threads.each do |thread| thread.join end @threads = [] end #### Config file template helpers #### def nginx_listen_address(options = @options, for_ping_port = false) if options[:socket_file] return "unix:" + File.expand_path(options[:socket_file]) else if for_ping_port port = options[:ping_port] else port = options[:port] end return "#{options[:address]}:#{port}" end end def nginx_listen_address_with_ssl_port(options = @options) if options[:socket_file] return "unix:" + File.expand_path(options[:socket_file]) else return "#{options[:address]}:#{options[:ssl_port]}" end end def default_group_for(username) user = Etc.getpwnam(username) group = Etc.getgrgid(user.gid) return group.name end ################# end end # module Standalone end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/standalone/status_command.rb000644 000765 000024 00000004417 12233035540 026222 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'standalone/command' module PhusionPassenger module Standalone class StatusCommand < Command def self.description return "Show the status of a running Passenger Standalone instance." end def run parse_options!("status") do |opts| opts.on("-p", "--port NUMBER", Integer, wrap_desc("The port number of a Phusion Passenger Standalone instance (default: #{@options[:port]})")) do |value| @options[:port] = value end opts.on("--pid-file FILE", String, wrap_desc("PID file of a running Phusion Passenger Standalone instance.")) do |value| @options[:pid_file] = value end end determine_various_resource_locations(false) create_nginx_controller begin running = @nginx.running? pid = @nginx.pid rescue SystemCallError, IOError running = false end if running puts "Phusion Passenger Standalone is running on PID #{pid}, according to PID file #{@options[:pid_file]}" else puts "Phusion Passenger Standalone is not running, according to PID file #{@options[:pid_file]}" end end end end end passenger-4.0.37/lib/phusion_passenger/standalone/stop_command.rb000644 000765 000024 00000005740 12233035540 025664 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'standalone/command' module PhusionPassenger module Standalone class StopCommand < Command def self.description return "Stop a running Phusion Passenger Standalone instance." end def run parse_options!("stop") do |opts| opts.on("-p", "--port NUMBER", Integer, wrap_desc("The port number of a Phusion Passenger Standalone instance (default: #{@options[:port]})")) do |value| @options[:port] = value end opts.on("--pid-file FILE", String, wrap_desc("PID file of a running Phusion Passenger Standalone instance.")) do |value| @options[:pid_file] = value end end determine_various_resource_locations(false) create_nginx_controller begin running = @nginx.running? rescue SystemCallError, IOError running = false end if running @nginx.stop else STDERR.puts "According to the PID file '#{@options[:pid_file]}', " << "Phusion Passenger Standalone doesn't seem to be running." STDERR.puts STDERR.puts "If you know that Phusion Passenger Standalone *is* running then one of these" STDERR.puts "might be the cause of this error:" STDERR.puts STDERR.puts " * The Phusion Passenger Standalone instance that you want to stop isn't running" STDERR.puts " on port #{@options[:port]}, but on another port. If this is the case then you" STDERR.puts " should specify the right port with --port." STDERR.puts " If the instance is listening on a Unix socket file instead of a TCP port," STDERR.puts " then please specify the PID file's filename with --pid-file." STDERR.puts " * The instance that you want to stop has stored its PID file in a non-standard" STDERR.puts " location. In this case please specify the right PID file with --pid-file." exit 1 end end end end end passenger-4.0.37/lib/phusion_passenger/standalone/utils.rb000644 000765 000024 00000003470 12233035540 024337 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger module Standalone module Utils private def require_platform_info_binary_compatibility if !defined?(PlatformInfo) || !PlatformInfo.respond_to?(:cxx_binary_compatibility_id) PhusionPassenger.require_passenger_lib 'platform_info/binary_compatibility' end end def runtime_version_string(nginx_version) if PhusionPassenger.originally_packaged? || nginx_version != PhusionPassenger::PREFERRED_NGINX_VERSION require_platform_info_binary_compatibility return "#{VERSION_STRING}-#{PlatformInfo.passenger_binary_compatibility_id}" else return VERSION_STRING end end end end end passenger-4.0.37/lib/phusion_passenger/standalone/version_command.rb000644 000765 000024 00000003047 12233035540 026362 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'standalone/command' module PhusionPassenger module Standalone class VersionCommand < Command def self.show_in_command_list return false end def run puts "Phusion Passenger version #{VERSION_STRING}" puts puts '"Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.' end end end end passenger-4.0.37/lib/phusion_passenger/request_handler/thread_handler.rb000644 000765 000024 00000031716 12233035540 027204 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'debug_logging' PhusionPassenger.require_passenger_lib 'message_channel' PhusionPassenger.require_passenger_lib 'utils' PhusionPassenger.require_passenger_lib 'utils/native_support_utils' PhusionPassenger.require_passenger_lib 'utils/unseekable_socket' module PhusionPassenger class RequestHandler # This class encapsulates the logic of a single RequestHandler thread. class ThreadHandler include DebugLogging include Utils class Interrupted < StandardError end REQUEST_METHOD = 'REQUEST_METHOD'.freeze GET = 'GET'.freeze PING = 'PING'.freeze OOBW = 'OOBW'.freeze PASSENGER_CONNECT_PASSWORD = 'PASSENGER_CONNECT_PASSWORD'.freeze CONTENT_LENGTH = 'CONTENT_LENGTH'.freeze HTTP_TRANSFER_ENCODING = 'HTTP_TRANSFER_ENCODING'.freeze MAX_HEADER_SIZE = 128 * 1024 OBJECT_SPACE_SUPPORTS_LIVE_OBJECTS = ObjectSpace.respond_to?(:live_objects) OBJECT_SPACE_SUPPORTS_ALLOCATED_OBJECTS = ObjectSpace.respond_to?(:allocated_objects) OBJECT_SPACE_SUPPORTS_COUNT_OBJECTS = ObjectSpace.respond_to?(:count_objects) GC_SUPPORTS_TIME = GC.respond_to?(:time) GC_SUPPORTS_CLEAR_STATS = GC.respond_to?(:clear_stats) attr_reader :thread attr_reader :stats_mutex attr_reader :interruptable attr_reader :iteration def initialize(request_handler, options = {}) @request_handler = request_handler @server_socket = Utils.require_option(options, :server_socket) @socket_name = Utils.require_option(options, :socket_name) @protocol = Utils.require_option(options, :protocol) @app_group_name = Utils.require_option(options, :app_group_name) Utils.install_options_as_ivars(self, options, :app, :analytics_logger, :connect_password ) @stats_mutex = Mutex.new @interruptable = false @iteration = 0 if @protocol == :session metaclass = class << self; self; end metaclass.class_eval do alias parse_request parse_session_request end elsif @protocol == :http metaclass = class << self; self; end metaclass.class_eval do alias parse_request parse_http_request end else raise ArgumentError, "Unknown protocol specified" end end def install @thread = Thread.current Thread.current[:passenger_thread_handler] = self PhusionPassenger.call_event(:starting_request_handler_thread) end def main_loop(finish_callback) socket_wrapper = Utils::UnseekableSocket.new channel = MessageChannel.new buffer = '' buffer.force_encoding('binary') if buffer.respond_to?(:force_encoding) begin finish_callback.call while true hijacked = accept_and_process_next_request(socket_wrapper, channel, buffer) socket_wrapper = Utils::UnseekableSocket.new if hijacked end rescue Interrupted # Do nothing. end debug("Thread handler main loop exited normally") ensure @stats_mutex.synchronize { @interruptable = true } end private # Returns true if the socket has been hijacked, false otherwise. def accept_and_process_next_request(socket_wrapper, channel, buffer) @stats_mutex.synchronize do @interruptable = true end connection = socket_wrapper.wrap(@server_socket.accept) @stats_mutex.synchronize do @interruptable = false @iteration += 1 end trace(3, "Accepted new request on socket #{@socket_name}") channel.io = connection if headers = parse_request(connection, channel, buffer) prepare_request(connection, headers) begin if headers[REQUEST_METHOD] == PING process_ping(headers, connection) elsif headers[REQUEST_METHOD] == OOBW process_oobw(headers, connection) else process_request(headers, connection, socket_wrapper, @protocol == :http) end rescue Exception has_error = true raise ensure if headers[RACK_HIJACK_IO] socket_wrapper = nil connection = nil channel = nil end finalize_request(connection, headers, has_error) trace(3, "Request done.") end else trace(2, "No headers parsed; disconnecting client.") end rescue Interrupted raise rescue => e if socket_wrapper && socket_wrapper.source_of_exception?(e) # EPIPE is harmless, it just means that the client closed the connection. # Other errors might indicate a problem so we print them, but they're # probably not bad enough to warrant stopping the request handler. if !e.is_a?(Errno::EPIPE) print_exception("Passenger RequestHandler's client socket", e) end else if @analytics_logger && headers && headers[PASSENGER_TXN_ID] log_analytics_exception(headers, e) end raise e if should_reraise_error?(e) end ensure # The 'close_write' here prevents forked child # processes from unintentionally keeping the # connection open. if connection && !connection.closed? begin connection.close_write rescue SystemCallError, IOError end begin connection.close rescue SystemCallError end end end def parse_session_request(connection, channel, buffer) headers_data = channel.read_scalar(buffer, MAX_HEADER_SIZE) if headers_data.nil? return end headers = Utils::NativeSupportUtils.split_by_null_into_hash(headers_data) if @connect_password && headers[PASSENGER_CONNECT_PASSWORD] != @connect_password warn "*** Passenger RequestHandler warning: " << "someone tried to connect with an invalid connect password." return else return headers end rescue SecurityError => e warn("*** Passenger RequestHandler warning: " << "HTTP header size exceeded maximum.") return end # Like parse_session_request, but parses an HTTP request. This is a very minimalistic # HTTP parser and is not intended to be complete, fast or secure, since the HTTP server # socket is intended to be used for debugging purposes only. def parse_http_request(connection, channel, buffer) headers = {} data = "" while data !~ /\r\n\r\n/ && data.size < MAX_HEADER_SIZE data << connection.readpartial(16 * 1024) end if data.size >= MAX_HEADER_SIZE warn("*** Passenger RequestHandler warning: " << "HTTP header size exceeded maximum.") return end data.gsub!(/\r\n\r\n.*/, '') data.split("\r\n").each_with_index do |line, i| if i == 0 # GET / HTTP/1.1 line =~ /^([A-Za-z]+) (.+?) (HTTP\/\d\.\d)$/ request_method = $1 request_uri = $2 protocol = $3 path_info, query_string = request_uri.split("?", 2) headers[REQUEST_METHOD] = request_method headers["REQUEST_URI"] = request_uri headers["QUERY_STRING"] = query_string || "" headers["SCRIPT_NAME"] = "" headers["PATH_INFO"] = path_info headers["SERVER_NAME"] = "127.0.0.1" headers["SERVER_PORT"] = connection.addr[1].to_s headers["SERVER_PROTOCOL"] = protocol else header, value = line.split(/\s*:\s*/, 2) header.upcase! # "Foo-Bar" => "FOO-BAR" header.gsub!("-", "_") # => "FOO_BAR" if header == CONTENT_LENGTH || header == "CONTENT_TYPE" headers[header] = value else headers["HTTP_#{header}"] = value end end end if @connect_password && headers["HTTP_X_PASSENGER_CONNECT_PASSWORD"] != @connect_password warn "*** Passenger RequestHandler warning: " << "someone tried to connect with an invalid connect password." return else return headers end rescue EOFError return end def process_ping(env, connection) connection.write("pong") end def process_oobw(env, connection) PhusionPassenger.call_event(:oob_work) connection.write("oobw done") end # def process_request(env, connection, socket_wrapper, full_http_response) # raise NotImplementedError, "Override with your own implementation!" # end def prepare_request(connection, headers) if !may_have_request_body?(headers) connection.simulate_eof! end if @analytics_logger && headers[PASSENGER_TXN_ID] txn_id = headers[PASSENGER_TXN_ID] union_station_key = headers[PASSENGER_UNION_STATION_KEY] log = @analytics_logger.continue_transaction(txn_id, @app_group_name, :requests, union_station_key) headers[PASSENGER_ANALYTICS_WEB_LOG] = log Thread.current[PASSENGER_ANALYTICS_WEB_LOG] = log Thread.current[PASSENGER_TXN_ID] = txn_id Thread.current[PASSENGER_UNION_STATION_KEY] = union_station_key if OBJECT_SPACE_SUPPORTS_LIVE_OBJECTS log.message("Initial objects on heap: #{ObjectSpace.live_objects}") end if OBJECT_SPACE_SUPPORTS_ALLOCATED_OBJECTS log.message("Initial objects allocated so far: #{ObjectSpace.allocated_objects}") elsif OBJECT_SPACE_SUPPORTS_COUNT_OBJECTS count = ObjectSpace.count_objects log.message("Initial objects allocated so far: #{count[:TOTAL] - count[:FREE]}") end if GC_SUPPORTS_TIME log.message("Initial GC time: #{GC.time}") end log.begin_measure("app request handler processing") end ################# end def finalize_request(connection, headers, has_error) if connection connection.stop_simulating_eof! end log = headers[PASSENGER_ANALYTICS_WEB_LOG] if log && !log.closed? exception_occurred = false begin log.end_measure("app request handler processing", has_error) if OBJECT_SPACE_SUPPORTS_LIVE_OBJECTS log.message("Final objects on heap: #{ObjectSpace.live_objects}") end if OBJECT_SPACE_SUPPORTS_ALLOCATED_OBJECTS log.message("Final objects allocated so far: #{ObjectSpace.allocated_objects}") elsif OBJECT_SPACE_SUPPORTS_COUNT_OBJECTS count = ObjectSpace.count_objects log.message("Final objects allocated so far: #{count[:TOTAL] - count[:FREE]}") end if GC_SUPPORTS_TIME log.message("Final GC time: #{GC.time}") end if GC_SUPPORTS_CLEAR_STATS # Clear statistics to void integer wraps. GC.clear_stats end Thread.current[PASSENGER_ANALYTICS_WEB_LOG] = nil rescue Exception # Maybe this exception was raised while communicating # with the logging agent. If that is the case then # log.close may also raise an exception, but we're only # interested in the original exception. So if this # situation occurs we must ignore any exceptions raised # by log.close. exception_occurred = true raise ensure # It is important that the following call receives an ACK # from the logging agent and that we don't close the socket # connection until the ACK has been received, otherwise # the helper agent may close the transaction before this # process's openTransaction command is processed. begin log.close rescue raise if !exception_occurred end end end ################# end def log_analytics_exception(env, exception) log = @analytics_logger.new_transaction( @app_group_name, :exceptions, env[PASSENGER_UNION_STATION_KEY]) begin request_txn_id = env[PASSENGER_TXN_ID] message = exception.message message = exception.to_s if message.empty? message = [message].pack('m') message.gsub!("\n", "") backtrace_string = [exception.backtrace.join("\n")].pack('m') backtrace_string.gsub!("\n", "") log.message("Request transaction ID: #{request_txn_id}") log.message("Message: #{message}") log.message("Class: #{exception.class.name}") log.message("Backtrace: #{backtrace_string}") ensure log.close end end def may_have_request_body?(headers) if headers[REQUEST_METHOD] == GET if content_length = headers[CONTENT_LENGTH] return content_length != 0 else return headers.has_key?(HTTP_TRANSFER_ENCODING) end else return true end end def should_reraise_error?(e) # Stubable by unit tests. return true end def should_reraise_app_error?(e, socket_wrapper) return false end def should_swallow_app_error?(e, socket_wrapper) return socket_wrapper && socket_wrapper.source_of_exception?(e) && e.is_a?(Errno::EPIPE) end end end # class RequestHandler end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/rack/out_of_band_gc.rb000644 000765 000024 00000003766 12233035540 024727 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2012-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'thread' module PhusionPassenger module Rack class OutOfBandGc def initialize(app, frequency, logger = nil) @app = app @frequency = frequency @request_count = 0 @mutex = Mutex.new ::PhusionPassenger.on_event(:oob_work) do t0 = Time.now disabled = GC.enable GC.start GC.disable if disabled logger.info "Out Of Band GC finished in #{Time.now - t0} sec" if logger end end def call(env) status, headers, body = @app.call(env) @mutex.synchronize do @request_count += 1 if @request_count == @frequency @request_count = 0 headers['X-Passenger-Request-OOB-Work'] = 'true' end end [status, headers, body] end end end # module Rack end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/rack/thread_handler_extension.rb000644 000765 000024 00000013114 12233035540 027023 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'utils/tee_input' module PhusionPassenger module Rack module ThreadHandlerExtension # Constants which exist to relieve Ruby's garbage collector. RACK_VERSION = "rack.version" # :nodoc: RACK_VERSION_VALUE = [1, 2] # :nodoc: RACK_INPUT = "rack.input" # :nodoc: RACK_ERRORS = "rack.errors" # :nodoc: RACK_MULTITHREAD = "rack.multithread" # :nodoc: RACK_MULTIPROCESS = "rack.multiprocess" # :nodoc: RACK_RUN_ONCE = "rack.run_once" # :nodoc: RACK_URL_SCHEME = "rack.url_scheme" # :nodoc: RACK_HIJACK_P = "rack.hijack?" # :nodoc: RACK_HIJACK = "rack.hijack" # :nodoc: SCRIPT_NAME = "SCRIPT_NAME" # :nodoc: HTTPS = "HTTPS" # :nodoc: HTTPS_DOWNCASE = "https" # :nodoc: HTTP = "http" # :nodoc: YES = "yes" # :nodoc: ON = "on" # :nodoc: ONE = "1" # :nodoc: CRLF = "\r\n" # :nodoc: NEWLINE = "\n" # :nodoc: STATUS = "Status: " # :nodoc: NAME_VALUE_SEPARATOR = ": " # :nodoc: def process_request(env, connection, socket_wrapper, full_http_response) rewindable_input = PhusionPassenger::Utils::TeeInput.new(connection, env) begin env[RACK_VERSION] = RACK_VERSION_VALUE env[RACK_INPUT] = rewindable_input env[RACK_ERRORS] = STDERR env[RACK_MULTITHREAD] = @request_handler.concurrency > 1 env[RACK_MULTIPROCESS] = true env[RACK_RUN_ONCE] = false if env[HTTPS] == YES || env[HTTPS] == ON || env[HTTPS] == ONE env[RACK_URL_SCHEME] = HTTPS_DOWNCASE else env[RACK_URL_SCHEME] = HTTP end env[RACK_HIJACK_P] = true env[RACK_HIJACK] = lambda do env[RACK_HIJACK_IO] ||= begin connection.stop_simulating_eof! connection end end begin status, headers, body = @app.call(env) rescue => e if should_reraise_app_error?(e, socket_wrapper) raise e elsif !should_swallow_app_error?(e, socket_wrapper) # It's a good idea to catch application exceptions here because # otherwise maliciously crafted responses can crash the app, # forcing it to be respawned, and thereby effectively DoSing it. print_exception("Rack application object", e) end return false end # Application requested a full socket hijack. return true if env[RACK_HIJACK_IO] begin if full_http_response connection.write("HTTP/1.1 #{status.to_i.to_s} Whatever#{CRLF}") connection.write("Connection: close#{CRLF}") end headers_output = [ STATUS, status.to_i.to_s, CRLF ] headers.each do |key, values| if values.is_a?(String) values = values.split(NEWLINE) elsif key == RACK_HIJACK # We do not check for this key name in every loop # iteration as an optimization. next end values.each do |value| headers_output << key headers_output << NAME_VALUE_SEPARATOR headers_output << value headers_output << CRLF end end headers_output << CRLF if hijack_callback = headers[RACK_HIJACK] # Application requested a partial socket hijack. body = nil connection.writev(headers_output) connection.flush hijacked_socket = env[RACK_HIJACK].call hijack_callback.call(hijacked_socket) return true elsif body.is_a?(Array) # The body may be an ActionController::StringCoercion::UglyBody # object instead of a real Array, even when #is_a? claims so. # Call #to_a just to be sure. connection.writev2(headers_output, body.to_a) return false elsif body.is_a?(String) headers_output << body connection.writev(headers_output) return false else connection.writev(headers_output) if body begin body.each do |s| connection.write(s) end rescue => e if should_reraise_app_error?(e, socket_wrapper) raise e elsif !should_swallow_app_error?(e, socket_wrapper) # Body objects can raise exceptions in #each. print_exception("Rack body object #each method", e) end return false end end return false end ensure body.close if body && body.respond_to?(:close) end ensure rewindable_input.close end end private end end # module Rack end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/platform_info/apache.rb000644 000765 000024 00000054460 12233035540 025134 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/compiler' PhusionPassenger.require_passenger_lib 'platform_info/operating_system' PhusionPassenger.require_passenger_lib 'platform_info/linux' module PhusionPassenger # Wow, I can't believe in how many ways one can build Apache in OS # X! We have to resort to all sorts of tricks to make Passenger build # out of the box on OS X. :-( # # In the name of usability and the "end user is the king" line of thought, # I shall suffer the horrible faith of writing tons of autodetection code! # Users can change the detection behavior by setting the environment variable # APXS2 to the correct 'apxs' (or 'apxs2') binary, as provided by # Apache. module PlatformInfo ################ Programs ################ # The absolute path to the 'apxs' or 'apxs2' executable, or nil if not found. def self.apxs2 if env_defined?("APXS2") return ENV["APXS2"] end ['apxs2', 'apxs'].each do |name| command = find_command(name) if !command.nil? return command end end return nil end memoize :apxs2 # The absolute path to the 'apachectl' or 'apache2ctl' binary, or nil if # not found. def self.apache2ctl(options = {}) return find_apache2_executable('apache2ctl', 'apachectl2', 'apachectl', options) end memoize :apache2ctl # The absolute path to the Apache binary (that is, 'httpd', 'httpd2', 'apache' # or 'apache2'), or nil if not found. def self.httpd(options = {}) apxs2 = options[:apxs2] || self.apxs2 if env_defined?('HTTPD') return ENV['HTTPD'] elsif apxs2.nil? ["apache2", "httpd2", "apache", "httpd"].each do |name| command = find_command(name) if !command.nil? return command end end return nil else return find_apache2_executable(`#{apxs2} -q TARGET`.strip, options) end end memoize :httpd # The Apache version, or nil if Apache is not found. def self.httpd_version(options = nil) if options httpd = options[:httpd] || self.httpd(options) else httpd = self.httpd end if httpd `#{httpd} -v` =~ %r{Apache/([\d\.]+)} return $1 else return nil end end memoize :httpd_version # Run `httpd -V` and return its output. On some systems, such as Ubuntu 13.10, # `httpd -V` fails without the environment variables defined in various scripts. # Here we take care of evaluating those scripts before running `httpd -V`. def self.httpd_V(options = nil) if options httpd = options[:httpd] || self.httpd(options) else httpd = self.httpd end if httpd command = "#{httpd} -V" if envvars_file = httpd_envvars_file(options) command = ". '#{envvars_file}' && #{command}" end return `#{command}` else return nil end end memoize :httpd_V # The Apache executable's architectural bits. Returns 32 or 64, # or nil if unable to detect. def self.httpd_architecture_bits(options = nil) if options httpd = options[:httpd] || self.httpd(options) else httpd = self.httpd end if httpd `#{httpd} -V` =~ %r{Architecture:(.*)} text = $1 if text =~ /32/ return 32 elsif text =~ /64/ return 64 else return nil end else return nil end end memoize :httpd_architecture_bits # The default Apache root directory, as specified by its compilation parameters. # This may be different from the value of the ServerRoot directive. def self.httpd_default_root(options = nil) if options info = httpd_V(options) else info = httpd_V end if info info =~ / -D HTTPD_ROOT="(.+)"$/ return $1 else return nil end end memoize :httpd_default_root # The default Apache configuration file, or nil if Apache is not found. def self.httpd_default_config_file(options = nil) if options info = httpd_V(options) else info = httpd_V end if info info =~ /-D SERVER_CONFIG_FILE="(.+)"$/ filename = $1 if filename =~ /\A\// return filename else # Not an absolute path. Infer from default root. if root = httpd_default_root(options) return "#{root}/#{filename}" else return nil end end else return nil end end memoize :httpd_default_config_file # Given an Apache config file, returns the a hash with the following elements: # # * `:files` - An array containing `config_file`, as well as all config files # included from that config file, including recursively included # ones. Only filenames that actually exist are put here. # * `:unreadable_files` - All config files that this function was unable # to read. def self.httpd_included_config_files(config_file, options = nil) state = { :files => { config_file => true }, :unreadable_files => [], :root => httpd_default_root(options) } scan_for_included_apache2_config_files(config_file, state, options) return { :files => state[:files].keys, :unreadable_files => state[:unreadable_files] } end # The default Apache error log's filename, as it is compiled into the Apache # main executable. This may not be the actual error log that is used. The actual # error log depends on the configuration file. # # Returns nil if Apache is not detected, or if the default error log filename # cannot be detected. def self.httpd_default_error_log(options = nil) if info = httpd_V(options) info =~ /-D DEFAULT_ERRORLOG="(.+)"$/ filename = $1 if filename =~ /\A\// return filename else # Not an absolute path. Infer from default root. if root = httpd_default_root(options) return "#{root}/#{filename}" else return nil end end else return nil end end memoize :httpd_default_error_log def self.httpd_actual_error_log(options = nil) if config_file = httpd_default_config_file(options) begin contents = File.open(config_file, "rb") { |f| f.read } rescue Errno::EACCES log "Unable to open #{config_file} for reading" return nil end # We don't want to match comments contents.gsub!(/^[ \t]*#.*/, '') if contents =~ /^[ \t]*ErrorLog[ \t]+(.+)[ \t]*$/i filename = unescape_apache_config_value($1, options) if filename && filename !~ /\A\// # Not an absolute path. Infer from root. if root = httpd_default_root(options) return "#{root}/#{filename}" else return nil end else return filename end elsif contents =~ /ErrorLog/i # The user apparently has ErrorLog set somewhere but # we can't parse it. The default error log location, # as reported by `httpd -V`, may be wrong (it is on OS X). # So to be safe, let's assume that we don't know. log "Unable to parse ErrorLog directive in Apache configuration file" return nil else log "No ErrorLog directive in Apache configuration file" return httpd_default_error_log(options) end else return nil end end memoize :httpd_actual_error_log # The location of the Apache envvars file, which exists on some systems such as Ubuntu. # Returns nil if Apache is not found or if the envvars file is not found. def self.httpd_envvars_file(options = nil) if options httpd = options[:httpd] || self.httpd(options) else httpd = self.httpd end httpd_dir = File.dirname(httpd) if httpd_dir == "/usr/bin" || httpd_dir == "/usr/sbin" if File.exist?("/etc/apache2/envvars") return "/etc/apache2/envvars" elsif File.exist?("/etc/httpd/envvars") return "/etc/httpd/envvars" end end conf_dir = File.expand_path(File.dirname(httpd) + "/../conf") if File.exist?("#{conf_dir}/envvars") return "#{conf_dir}/envvars" end return nil end def self.httpd_infer_envvar(varname, options = nil) if envfile = httpd_envvars_file(options) result = `. '#{envfile}' && echo $#{varname}`.strip if $? && $?.exitstatus == 0 return result else return nil end else return nil end end # Returns the path to the Apache `mods-available` subdirectory, # or nil if it's not supported by this Apache. def self.httpd_mods_available_directory(options = nil) config_file = httpd_default_config_file(options) return nil if !config_file # mods-available is supposed to be a Debian extension that only works # on the APT-installed Apache, so only return non-nil if we're # working against the APT-installed Apache. config_dir = File.dirname(config_file) if config_dir == "/etc/httpd" || config_dir == "/etc/apache2" if File.exist?("#{config_dir}/mods-available") && File.exist?("#{config_dir}/mods-enabled") return "#{config_dir}/mods-available" else return nil end else return nil end end memoize :httpd_mods_available_directory # Returns the path to the Apache `mods-enabled` subdirectory, # or nil if it's not supported by this Apache. def self.httpd_mods_enabled_directory(options = nil) config_file = httpd_default_config_file(options) return nil if !config_file # mods-enabled is supposed to be a Debian extension that only works # on the APT-installed Apache, so only return non-nil if we're # working against the APT-installed Apache. config_dir = File.dirname(config_file) if config_dir == "/etc/httpd" || config_dir == "/etc/apache2" if File.exist?("#{config_dir}/mods-available") && File.exist?("#{config_dir}/mods-enabled") return "#{config_dir}/mods-enabled" else return nil end else return nil end end memoize :httpd_mods_enabled_directory # The absolute path to the 'a2enmod' executable. def self.a2enmod(options = {}) apxs2 = options[:apxs2] || self.apxs2 dir = File.dirname(apxs2) # a2enmod is supposed to be a Debian extension that only works # on the APT-installed Apache, so only return non-nil if we're # working against the APT-installed Apache. if dir == "/usr/bin" || dir == "/usr/sbin" if env_defined?('A2ENMOD') return ENV['A2ENMOD'] else return find_apache2_executable("a2enmod", options) end else return nil end end memoize :a2enmod # The absolute path to the 'a2enmod' executable. def self.a2dismod(options = {}) apxs2 = options[:apxs2] || self.apxs2 dir = File.dirname(apxs2) # a2dismod is supposed to be a Debian extension that only works # on the APT-installed Apache, so only return non-nil if we're # working against the APT-installed Apache. if dir == "/usr/bin" || dir == "/usr/sbin" if env_defined?('A2DISMOD') return ENV['A2DISMOD'] else return find_apache2_executable("a2dismod", options) end end end memoize :a2dismod # The absolute path to the 'apr-config' or 'apr-1-config' executable, # or nil if not found. def self.apr_config if env_defined?('APR_CONFIG') return ENV['APR_CONFIG'] elsif apxs2.nil? return nil else filename = `#{apxs2} -q APR_CONFIG 2>/dev/null`.strip if filename.empty? apr_bindir = `#{apxs2} -q APR_BINDIR 2>/dev/null`.strip if apr_bindir.empty? return nil else return select_executable(apr_bindir, "apr-1-config", "apr-config") end elsif File.exist?(filename) return filename else return nil end end end memoize :apr_config # The absolute path to the 'apu-config' or 'apu-1-config' executable, or nil # if not found. def self.apu_config if env_defined?('APU_CONFIG') return ENV['APU_CONFIG'] elsif apxs2.nil? return nil else filename = `#{apxs2} -q APU_CONFIG 2>/dev/null`.strip if filename.empty? apu_bindir = `#{apxs2} -q APU_BINDIR 2>/dev/null`.strip if apu_bindir.empty? return nil else return select_executable(apu_bindir, "apu-1-config", "apu-config") end elsif File.exist?(filename) return filename else return nil end end end memoize :apu_config # Find an executable in the Apache 'bin' and 'sbin' directories. # Returns nil if not found. def self.find_apache2_executable(*possible_names) if possible_names.last.is_a?(Hash) options = possible_names.pop options = nil if options.empty? end if options dirs = options[:dirs] || [apache2_bindir(options), apache2_sbindir(options)] else dirs = [apache2_bindir, apache2_sbindir] end dirs.each do |bindir| if bindir.nil? next end possible_names.each do |name| filename = "#{bindir}/#{name}" if !File.exist?(filename) log "Looking for #{filename}: not found" elsif !File.file?(filename) log "Looking for #{filename}: found, but is not a file" elsif !File.executable?(filename) log "Looking for #{filename}: found, but is not executable" else log "Looking for #{filename}: found" return filename end end end return nil end ################ Directories ################ # The absolute path to the Apache 2 'bin' directory, or nil if unknown. def self.apache2_bindir(options = {}) apxs2 = options[:apxs2] || self.apxs2 if apxs2.nil? return nil else return `#{apxs2} -q BINDIR 2>/dev/null`.strip end end memoize :apache2_bindir # The absolute path to the Apache 2 'sbin' directory, or nil if unknown. def self.apache2_sbindir(options = {}) apxs2 = options[:apxs2] || self.apxs2 if apxs2.nil? return nil else return `#{apxs2} -q SBINDIR`.strip end end memoize :apache2_sbindir ################ Compiler and linker flags ################ # The C compiler flags that are necessary to compile an Apache module. # Also includes APR and APU compiler flags if with_apr_flags is true. def self.apache2_module_cflags(with_apr_flags = true) flags = [""] if cc_is_sun_studio? flags << "-KPIC" else flags << "-fPIC" end if with_apr_flags flags << apr_flags flags << apu_flags end if !apxs2.nil? apxs2_flags = `#{apxs2} -q CFLAGS`.strip << " -I" << `#{apxs2} -q INCLUDEDIR`.strip apxs2_flags.gsub!(/-O\d? /, '') # Remove flags not supported by GCC if os_name =~ /solaris/ # TODO: Add support for people using SunStudio # The big problem is Coolstack apxs includes a bunch of solaris -x directives. options = apxs2_flags.split options.reject! { |f| f =~ /^\-x/ } options.reject! { |f| f =~ /^\-Xa/ } options.reject! { |f| f =~ /^\-fast/ } options.reject! { |f| f =~ /^\-mt/ } apxs2_flags = options.join(' ') end if os_name == "linux" && linux_distro_tags.include?(:redhat) && apxs2 == "/usr/sbin/apxs" && httpd_architecture_bits == 64 # The Apache package in CentOS 5 x86_64 is broken. # 'apxs -q CFLAGS' contains directives for compiling # the module as 32-bit, even though httpd itself # is 64-bit. Fix this. apxs2_flags.gsub!('-m32 -march=i386 -mtune=generic', '') end apxs2_flags.strip! flags << apxs2_flags end if !httpd.nil? && os_name == "macosx" # The default Apache install on OS X is a universal binary. # Figure out which architectures it's compiled for and do the same # thing for mod_passenger. We use the 'file' utility to do this. # # Running 'file' on the Apache executable usually outputs something # like this: # # /usr/sbin/httpd: Mach-O universal binary with 4 architectures # /usr/sbin/httpd (for architecture ppc7400): Mach-O executable ppc # /usr/sbin/httpd (for architecture ppc64): Mach-O 64-bit executable ppc64 # /usr/sbin/httpd (for architecture i386): Mach-O executable i386 # /usr/sbin/httpd (for architecture x86_64): Mach-O 64-bit executable x86_64 # # But on some machines, it may output just: # # /usr/sbin/httpd: Mach-O fat file with 4 architectures # # (http://code.google.com/p/phusion-passenger/issues/detail?id=236) output = `file "#{httpd}"`.strip if output =~ /Mach-O fat file/ && output !~ /for architecture/ architectures = ["i386", "ppc", "x86_64", "ppc64"] else architectures = [] output.split("\n").grep(/for architecture/).each do |line| line =~ /for architecture (.*?)\)/ architectures << $1 end end # The compiler may not support all architectures in the binary. # XCode 4 seems to have removed support for the PPC architecture # even though there are still plenty of Apache binaries around # containing PPC components. architectures.reject! do |arch| !compiler_supports_architecture?(arch) end architectures.map! do |arch| "-arch #{arch}" end flags << architectures.compact.join(' ') end return flags.compact.join(' ').strip end memoize :apache2_module_cflags, true # Linker flags that are necessary for linking an Apache module. # Already includes APR and APU linker flags. def self.apache2_module_ldflags flags = "-fPIC #{apr_libs} #{apu_libs}" flags.strip! return flags end memoize :apache2_module_ldflags # The C compiler flags that are necessary for programs that use APR. def self.apr_flags return determine_apr_info[0] end # The linker flags that are necessary for linking programs that use APR. def self.apr_libs return determine_apr_info[1] end # The C compiler flags that are necessary for programs that use APR-Util. def self.apu_flags return determine_apu_info[0] end # The linker flags that are necessary for linking programs that use APR-Util. def self.apu_libs return determine_apu_info[1] end ################ Miscellaneous information ################ # Returns whether it is necessary to use information outputted by # 'apr-config' and 'apu-config' in order to compile an Apache module. # When Apache is installed with --with-included-apr, the APR/APU # headers are placed into the same directory as the Apache headers, # and so 'apr-config' and 'apu-config' won't be necessary in that case. def self.apr_config_needed_for_building_apache_modules? return !try_compile("whether APR is needed for building Apache modules", :c, "#include \n", apache2_module_cflags(false)) end memoize :apr_config_needed_for_building_apache_modules?, true private def self.determine_apr_info if apr_config.nil? return [nil, nil] else flags = `#{apr_config} --cppflags --includes`.strip libs = `#{apr_config} --link-ld`.strip flags.gsub!(/-O\d? /, '') if os_name =~ /solaris/ # Remove flags not supported by GCC flags = flags.split(/ +/).reject{ |f| f =~ /^\-mt/ }.join(' ') elsif os_name =~ /aix/ libs << " -Wl,-G -Wl,-brtl" end return [flags, libs] end end memoize :determine_apr_info, true private_class_method :determine_apr_info def self.determine_apu_info if apu_config.nil? return [nil, nil] else flags = `#{apu_config} --includes`.strip libs = `#{apu_config} --link-ld`.strip flags.gsub!(/-O\d? /, '') return [flags, libs] end end memoize :determine_apu_info, true private_class_method :determine_apu_info def self.scan_for_included_apache2_config_files(config_file, state, options = nil) begin config = File.open(config_file, "rb") do |f| f.read end rescue Errno::EACCES state[:unreadable_files] << config_file return end found_filenames = [] config.scan(/^[ \t]*(Include(Optional)?|ServerRoot)[ \t]+(.+?)[ \t]*$/i) do |match| if match[0].downcase == "serverroot" new_root = unescape_apache_config_value(match[2], options) state[:root] = new_root if new_root else filename = unescape_apache_config_value(match[2], options) next if filename.nil? || filename.empty? if filename !~ /\A\// # Not an absolute path. Infer from root. filename = "#{state[:root]}/#{filename}" end expand_apache2_glob(filename).each do |filename2| if !state[:files].has_key?(filename2) state[:files][filename2] = true scan_for_included_apache2_config_files(filename2, state, options) end end end end end private_class_method :scan_for_included_apache2_config_files def self.expand_apache2_glob(glob) if File.directory?(glob) glob = glob.sub(/\/*$/, '') result = Dir["#{glob}/**/*"] else result = [] Dir[glob].each do |filename| if File.directory?(filename) result.concat(Dir["#{filename}/**/*"]) else result << filename end end end result.reject! do |filename| File.directory?(filename) end return result end private_class_method :expand_apache2_glob def self.unescape_apache_config_value(value, options = nil) if value =~ /^"(.*)"$/ value = unescape_c_string($1) end if value.include?("${") log "Attempting to substitute environment variables in Apache config value #{value.inspect}..." end # The Apache config file supports environment variable # substitution. Ubuntu uses this extensively. value.gsub!(/\$\{(.+?)\}/) do |varname| if substitution = httpd_infer_envvar($1, options) log "Substituted \"#{varname}\" -> \"#{substitution}\"" substitution else log "Cannot substitute \"#{varname}\"" varname end end if value.include?("${") # We couldn't substitute everything. return nil else return value end end private_class_method :unescape_apache_config_value def self.unescape_c_string(s) state = 0 res = '' backslash = "\\" s.each_char do |c| case state when 0 case c when backslash then state = 1 else res << c end when 1 case c when 'n' then res << "\n"; state = 0 when 't' then res << "\t"; state = 0 when backslash then res << backslash; state = 0 else res << backslash; res << c; state = 0 end end end return res end private_class_method :unescape_c_string end end passenger-4.0.37/lib/phusion_passenger/platform_info/apache_detector.rb000644 000765 000024 00000016731 12233035540 027024 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/ruby' PhusionPassenger.require_passenger_lib 'platform_info/apache' PhusionPassenger.require_passenger_lib 'utils/ansi_colors' require 'pathname' module PhusionPassenger module PlatformInfo # Detects all possible Apache installations on the system, and presents the # autodetection information to the user in a friendly way. It turns out too # many people have multiple Apache installations on their system, but they # don't know about that, or they don't know how to compile against the # correct Apache installation. This tool helps them. # # If you use this class to log things to the terminal, then be sure to set # the terminal color to Utils::AnsiColors::DEFAULT_TERMINAL_COLOR. class ApacheDetector class Result # These are required and are never nil. attr_accessor :apxs2, :httpd, :ctl, :version, :config_file # These are optional and may be nil. attr_accessor :a2enmod, :a2dismod # This may be nil. It depends on how well we can infer information from the config file. attr_accessor :error_log def initialize(detector) @detector = detector end def report log " * Found Apache #{version}!" log " Information:" log " apxs2 : #{apxs2}" log " Main executable: #{httpd}" log " Control command: #{ctl}" log " Config file : #{config_file}" log " Error log file : #{error_log || 'unknown'}" log "" log " To install #{PROGRAM_NAME} against this specific Apache version:" log " #{PlatformInfo.ruby_command} #{PhusionPassenger.bin_dir}/passenger-install-apache2-module --apxs2-path='#{apxs2}'" log "" log " To start, stop or restart this specific Apache version:" log " #{ctl} start" log " #{ctl} stop" log " #{ctl} restart" log "" if error_log log " To troubleshoot, please read the logs in this file:" log " #{error_log}" log "" end end private def log(message) @detector.send(:log, message) end end attr_reader :results def initialize(output) @output = output @results = [] PlatformInfo.verbose = true PlatformInfo.log_implementation = lambda do |message| if message =~ /: found$/ log(" --> #{message}") else log(" --> #{message}") end end end def finish PlatformInfo.verbose = false PlatformInfo.log_implementation = nil end def detect_all log "Looking for possible Apache installations..." apxses = PlatformInfo.find_all_commands("apxs2") + PlatformInfo.find_all_commands("apxs") apxses = remove_symlink_duplications(apxses) log "" apxses.each do |apxs2| detect_one(apxs2) end end def detect_one(apxs2) log "Analyzing #{apxs2}..." add_result do |result| result.apxs2 = apxs2 log "Detecting main Apache executable..." result.httpd = PlatformInfo.httpd(:apxs2 => apxs2) if result.httpd log "Detecting version..." if result.version = PlatformInfo.httpd_version(:httpd => result.httpd) log " --> #{result.version}" else log " --> Cannot detect version!" result.httpd = nil end end if result.httpd log "Detecting control command..." result.ctl = PlatformInfo.apache2ctl(:apxs2 => apxs2) result.httpd = nil if !result.ctl end if result.httpd log "Detecting configuration file location..." result.config_file = PlatformInfo.httpd_default_config_file(:httpd => result.httpd) if result.config_file log " --> #{result.config_file}" else log " --> Cannot detect default config file location!" result.httpd = nil end end if result.httpd log "Detecting error log file..." result.error_log = PlatformInfo.httpd_actual_error_log(:httpd => result.httpd) if result.error_log log " --> #{result.error_log}" else log " --> Cannot detect error log file!" end end if result.httpd log "Detecting a2enmod and a2dismod..." result.a2enmod = PlatformInfo.a2enmod(:apxs2 => apxs2) result.a2dismod = PlatformInfo.a2dismod(:apxs2 => apxs2) end if result.httpd log "Found a usable Apache installation using #{apxs2}." true else log "Cannot find a usable Apache installation using #{apxs2}." false end end log "" end def report log "Final autodetection results" @results.each do |result| result.report end if @results.empty? log "Sorry, this program cannot find an Apache installation." log "" log "To install Apache, please run the following. It will tell you how to install Apache." log "" log " #{PhusionPassenger.bin_dir}/passenger-install-apache2-module" log "" log "If you are sure that you have Apache installed, please read the documentation:" log "#{APACHE2_DOC_URL}#forcing_location_of_command_line_tools_and_dependencies" elsif @results.size > 1 log "WARNING: You have multiple Apache installations on your system!" log "You are strongly recommended to read this section of the documentation:" log "#{APACHE2_DOC_URL}#multiple_apache_installs" end end def result_for(apxs2) # All the results use realpaths, so the input must too. apxs2 = Pathname.new(apxs2).realpath return @results.find { |r| r.apxs2 == apxs2 } end private def log(message) if @output.tty? @output.puts(Utils::AnsiColors.ansi_colorize(message)) else @output.puts(Utils::AnsiColors.strip_color_tags(message)) end end # On Ubuntu, /usr/bin/apxs2 is a symlink to /usr/bin/apxs. # On recent Arch Linux releases, /bin, /sbin etc are symlinks to # /usr/bin and /usr/sbin. # We're only supposed to detect one Apache in that case so we need to # resolve symlinks. def remove_symlink_duplications(filenames) old_size = filenames.size filenames = filenames.map do |filename| Pathname.new(filename).realpath end filenames.uniq! if old_size != filenames.size log "#{old_size - filenames.size} symlink duplicate(s) detected; ignoring them." end return filenames end def add_result result = Result.new(self) @results << result if yield(result) end end end end # module Phusion Passenger passenger-4.0.37/lib/phusion_passenger/platform_info/binary_compatibility.rb000644 000765 000024 00000013363 12233035540 030125 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'rbconfig' PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/ruby' PhusionPassenger.require_passenger_lib 'platform_info/operating_system' module PhusionPassenger module PlatformInfo # Returns a string that describes the current Ruby # interpreter's extension binary compatibility. A Ruby extension # compiled for a certain Ruby interpreter can also be loaded on # a different Ruby interpreter with the same binary compatibility # identifier. # # The result depends on the following factors: # - Ruby engine name. # - Ruby extension version. # This is not the same as the Ruby language version, which # identifies language-level compatibility. This is rather about # binary compatibility of extensions. # MRI seems to break source compatibility between tiny releases, # though patchlevel releases tend to be source and binary # compatible. # - Ruby extension architecture. # This is not necessarily the same as the operating system # runtime architecture or the CPU architecture. # For example, in case of JRuby, the extension architecture is # just "java" because all extensions target the Java platform; # the architecture the JVM was compiled for has no effect on # compatibility. # On systems with universal binaries support there may be multiple # architectures. In this case the architecture is "universal" # because extensions must be able to support all of the Ruby # executable's architectures. # - The operating system for which the Ruby interpreter was compiled. def self.ruby_extension_binary_compatibility_id ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby" ruby_ext_version = RUBY_VERSION if RUBY_PLATFORM =~ /darwin/ if RUBY_PLATFORM =~ /universal/ ruby_arch = "universal" else # OS X < 10.8: something like: # "/opt/ruby-enterprise/bin/ruby: Mach-O 64-bit executable x86_64" output = `file -L "#{ruby_executable}"`.strip ruby_arch = output.sub(/.* /, '') if ruby_arch == "executable" # OS X >= 10.8: something like: # "/opt/ruby-enterprise/bin/ruby: Mach-O 64-bit executable" if output =~ /Mach-O 64-bit/ ruby_arch = "x86_64" else raise "Cannot autodetect the Ruby interpreter's architecture" end end end elsif RUBY_PLATFORM == "java" ruby_arch = "java" else ruby_arch = cpu_architectures[0] end return "#{ruby_engine}-#{ruby_ext_version}-#{ruby_arch}-#{os_name}" end memoize :ruby_extension_binary_compatibility_id # Returns an identifier string that describes the current # platform's binary compatibility with regard to C/C++ # binaries. Two systems with the same binary compatibility # identifiers should be able to run the same C/C++ binaries. # # The the string depends on the following factors: # - The operating system name. # - Operating system runtime identifier. # This may include the kernel version, libc version, C++ ABI version, # etc. Everything that is of interest for binary compatibility with # regard to C/C++ binaries. # - Operating system default runtime architecture. # This is not the same as the CPU architecture; some CPUs support # multiple architectures, e.g. Intel Core 2 Duo supports x86 and # x86_64. Some operating systems actually support multiple runtime # architectures: a lot of x86_64 Linux distributions also include # 32-bit runtimes, and OS X Snow Leopard is x86_64 by default but # all system libraries also support x86. # This component identifies the architecture that is used when # compiling a binary with the system's C++ compiler with its default # options. def self.cxx_binary_compatibility_id if os_name == "macosx" # RUBY_PLATFORM gives us the kernel version, but we want # the OS X version. os_version_string = `sw_vers -productVersion`.strip # sw_vers returns something like "10.6.2". We're only # interested in the first two digits (MAJOR.MINOR) since # tiny releases tend to be binary compatible with each # other. components = os_version_string.split(".") os_version = "#{components[0]}.#{components[1]}" os_runtime = os_version os_arch = cpu_architectures[0] if os_version >= "10.5" && os_arch =~ /^i.86$/ # On Snow Leopard, 'uname -m' returns i386 but # we *know* that everything is x86_64 by default. os_arch = "x86_64" end else os_arch = cpu_architectures[0] os_runtime = nil end return [os_arch, os_name, os_runtime].compact.join("-") end memoize :cxx_binary_compatibility_id end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/platform_info/compiler.rb000644 000765 000024 00000040662 12233035540 025524 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/operating_system' module PhusionPassenger module PlatformInfo private def self.detect_language_extension(language) case language when :c return "c" when :cxx return "cpp" else raise ArgumentError, "Unsupported language #{language.inspect}" end end private_class_method :detect_language_extension def self.detect_compiler_type_name(language) case language when :c return "C" when :cxx return "C++" else raise ArgumentError, "Unsupported language #{language.inspect}" end end private_class_method :detect_compiler_type_name def self.create_compiler_command(language, flags1, flags2, link = false) case language when :c result = [cc, link ? ENV['EXTRA_PRE_LDFLAGS'] : nil, ENV['EXTRA_PRE_CFLAGS'], flags1, flags2, ENV['EXTRA_CFLAGS'], ENV['EXTRA_LDFLAGS']] when :cxx result = [cxx, link ? ENV['EXTRA_PRE_LDFLAGS'] : nil, ENV['EXTRA_PRE_CXXFLAGS'], flags1, flags2, ENV['EXTRA_CXXFLAGS'], ENV['EXTRA_LDFLAGS']] else raise ArgumentError, "Unsupported language #{language.inspect}" end return result.compact.join(" ").strip end private_class_method :create_compiler_command def self.run_compiler(description, command, source_file, source, capture_output = false) if verbose? message = "#{description}\n" << "Running: #{command}\n" if source.strip.empty? message << "Source file is empty." else message << "Source file contains:\n" << "-------------------------\n" << unindent(source) << "\n-------------------------" end log(message) end if capture_output begin output = `#{command} 2>&1` result = $?.exitstatus == 0 rescue SystemCallError => e result = nil exec_error_reason = e.message end log("Output:\n" << "-------------------------\n" << output.to_s << "\n-------------------------") elsif verbose? result = system(command) else result = system("(#{command}) >/dev/null 2>/dev/null") end if result.nil? log("Command could not be executed! #{exec_error_reason}".strip) return false elsif result log("Check suceeded") if capture_output return { :result => true, :output => output } else return true end else log("Check failed with exit status #{$?.exitstatus}") if capture_output == :always return { :result => false, :output => output } else return false end end end private_class_method :run_compiler def self.cc_or_cxx_supports_feliminate_unused_debug?(language) ext = detect_language_extension(language) compiler_type_name = detect_compiler_type_name(language) create_temp_file("passenger-compile-check.#{ext}") do |filename, f| f.close begin command = create_compiler_command(language, "-c '#{filename}' -o '#{filename}.o'", '-feliminate-unused-debug-symbols -feliminate-unused-debug-types') result = run_compiler("Checking for #{compiler_type_name} compiler '-feliminate-unused-debug-{symbols,types}' support", command, filename, '', true) return result && result[:output].empty? ensure File.unlink("#{filename}.o") rescue nil end end end private_class_method :cc_or_cxx_supports_feliminate_unused_debug? public def self.cc return string_env('CC', default_cc) end memoize :cc def self.cxx return string_env('CXX', default_cxx) end memoize :cxx def self.default_cc # On most platforms, we'll want to use the same compiler as what the rest # of the system uses, so that we generate compatible binaries. That's # most likely the 'cc' command. We used to use 'gcc' by default. # # See for example this issue with OS X Mavericks (10.9). They switched from # GCC to Clang as the default compiler. Since the Nginx by default uses 'cc' # as the compiler, we'll have to do that too. Otherwise we'll get C++ linker # errors because Nginx is compiled with Clang while Phusion Passenger is # compiled with GCC. # https://code.google.com/p/phusion-passenger/issues/detail?id=950 if PlatformInfo.find_command('cc') return 'cc' else return 'gcc' end end def self.default_cxx if PlatformInfo.find_command('c++') return 'c++' else return 'g++' end end def self.cc_is_gcc? `#{cc} -v 2>&1` =~ /gcc version/ end memoize :cc_is_gcc? def self.cxx_is_gcc? `#{cxx} -v 2>&1` =~ /gcc version/ end memoize :cxx_is_gcc? def self.cc_is_clang? `#{cc} --version 2>&1` =~ /clang version/ end memoize :cc_is_clang? def self.cxx_is_clang? `#{cxx} --version 2>&1` =~ /clang version/ end memoize :cxx_is_clang? def self.cc_is_sun_studio? `#{cc} -V 2>&1` =~ /Sun C/ || `#{cc} -flags 2>&1` =~ /Sun C/ end memoize :cc_is_sun_studio? def self.cxx_is_sun_studio? `#{cxx} -V 2>&1` =~ /Sun C/ || `#{cc} -flags 2>&1` =~ /Sun C/ end memoize :cxx_is_sun_studio? # Looks for the given C or C++ header. This works by invoking the compiler and # searching in the compiler's header search path. Returns its full filename, # or true if this function knows that the header exists but can't find it (e.g. # because the compiler cannot tell us what its header search path is). # Returns nil if the header cannot be found. def self.find_header(header_name, language, flags = nil) extension = detect_language_extension(language) create_temp_file("passenger-compile-check.#{extension}") do |filename, f| source = %Q{ #include <#{header_name}> } f.puts(source) f.close begin command = create_compiler_command(language, "-v -c '#{filename}' -o '#{filename}.o'", flags) if result = run_compiler("Checking for #{header_name}", command, filename, source, true) result[:output] =~ /^#include <...> search starts here:$(.+?)^End of search list\.$/m search_paths = $1.to_s.strip.split("\n").map{ |line| line.strip } search_paths.each do |dir| if File.file?("#{dir}/#{header_name}") return "#{dir}/#{header_name}" end end return true else return nil end ensure File.unlink("#{filename}.o") rescue nil end end end def self.try_compile(description, language, source, flags = nil) extension = detect_language_extension(language) create_temp_file("passenger-compile-check.#{extension}") do |filename, f| f.puts(source) f.close begin command = create_compiler_command(language, "-c '#{filename}' -o '#{filename}.o'", flags) return run_compiler(description, command, filename, source) ensure File.unlink("#{filename}.o") rescue nil end end end def self.try_link(description, language, source, flags = nil) extension = detect_language_extension(language) create_temp_file("passenger-link-check.#{extension}") do |filename, f| f.puts(source) f.close begin command = create_compiler_command(language, "'#{filename}' -o '#{filename}.out'", flags, true) return run_compiler(description, command, filename, source) ensure File.unlink("#{filename}.out") rescue nil end end end def self.try_compile_and_run(description, language, source, flags = nil) extension = detect_language_extension(language) create_temp_file("passenger-run-check.#{extension}", tmpexedir) do |filename, f| f.puts(source) f.close begin command = create_compiler_command(language, "'#{filename}' -o '#{filename}.out'", flags, true) if run_compiler(description, command, filename, source) log("Running #{filename}.out") begin output = `'#{filename}.out' 2>&1` rescue SystemCallError => e log("Command failed: #{e}") return false end status = $?.exitstatus log("Command exited with status #{status}. Output:\n--------------\n#{output}\n--------------") return status == 0 else return false end ensure File.unlink("#{filename}.out") rescue nil end end end # Checks whether the compiler supports "-arch #{arch}". def self.compiler_supports_architecture?(arch) return try_compile("Checking for C compiler '-arch' support", :c, '', "-arch #{arch}") end def self.cc_supports_visibility_flag? return false if os_name =~ /aix/ return try_compile("Checking for C compiler '-fvisibility' support", :c, '', '-fvisibility=hidden') end memoize :cc_supports_visibility_flag?, true def self.cxx_supports_visibility_flag? return false if os_name =~ /aix/ return try_compile("Checking for C++ compiler '-fvisibility' support", :cxx, '', '-fvisibility=hidden') end memoize :cxx_supports_visibility_flag?, true def self.cc_supports_wno_attributes_flag? return try_compile("Checking for C compiler '-Wno-attributes' support", :c, '', '-Wno-attributes') end memoize :cc_supports_wno_attributes_flag?, true def self.cxx_supports_wno_attributes_flag? return try_compile("Checking for C++ compiler '-Wno-attributes' support", :cxx, '', '-Wno-attributes') end memoize :cxx_supports_wno_attributes_flag?, true def self.cc_supports_wno_missing_field_initializers_flag? return try_compile("Checking for C compiler '-Wno-missing-field-initializers' support", :c, '', '-Wno-missing-field-initializers') end memoize :cc_supports_wno_missing_field_initializers_flag?, true def self.cxx_supports_wno_missing_field_initializers_flag? return try_compile("Checking for C++ compiler '-Wno-missing-field-initializers' support", :cxx, '', '-Wno-missing-field-initializers') end memoize :cxx_supports_wno_missing_field_initializers_flag?, true def self.cc_supports_no_tls_direct_seg_refs_option? return try_compile("Checking for C compiler '-mno-tls-direct-seg-refs' support", :c, '', '-mno-tls-direct-seg-refs') end memoize :cc_supports_no_tls_direct_seg_refs_option?, true def self.cxx_supports_no_tls_direct_seg_refs_option? return try_compile("Checking for C++ compiler '-mno-tls-direct-seg-refs' support", :cxx, '', '-mno-tls-direct-seg-refs') end memoize :cxx_supports_no_tls_direct_seg_refs_option?, true def self.compiler_supports_wno_ambiguous_member_template? result = try_compile("Checking for C++ compiler '-Wno-ambiguous-member-template' support", :cxx, '', '-Wno-ambiguous-member-template') return false if !result # For some reason, GCC does not complain about -Wno-ambiguous-member-template # not being supported unless the source contains another error. So we # check for this. create_temp_file("passenger-compile-check.cpp") do |filename, f| source = %Q{ void foo() { return error; } } f.puts(source) f.close begin command = create_compiler_command(:cxx, "-c '#{filename}' -o '#{filename}.o'", '-Wno-ambiguous-member-template') result = run_compiler("Checking whether C++ compiler '-Wno-ambiguous-member-template' support is *really* supported", command, filename, source, :always) ensure File.unlink("#{filename}.o") rescue nil end end return result && result[:output] !~ /-Wno-ambiguous-member-template/ end memoize :compiler_supports_wno_ambiguous_member_template?, true def self.cc_supports_feliminate_unused_debug? return cc_or_cxx_supports_feliminate_unused_debug?(:c) end memoize :cc_supports_feliminate_unused_debug?, true def self.cxx_supports_feliminate_unused_debug? return cc_or_cxx_supports_feliminate_unused_debug?(:cxx) end memoize :cxx_supports_feliminate_unused_debug?, true # Returns whether compiling C++ with -fvisibility=hidden might result # in tons of useless warnings, like this: # http://code.google.com/p/phusion-passenger/issues/detail?id=526 # This appears to be a bug in older g++ versions: # http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00861.html # Warnings should be suppressed with -Wno-attributes. def self.cc_visibility_flag_generates_warnings? if os_name =~ /linux/ && `#{cc} -v 2>&1` =~ /gcc version (.*?)/ return $1 <= "4.1.2" else return false end end memoize :cc_visibility_flag_generates_warnings?, true def self.cxx_visibility_flag_generates_warnings? if os_name =~ /linux/ && `#{cxx} -v 2>&1` =~ /gcc version (.*?)/ return $1 <= "4.1.2" else return false end end memoize :cxx_visibility_flag_generates_warnings?, true def self.adress_sanitizer_flag if cc_is_clang? if `#{cc} --help` =~ /-fsanitize=/ return "-fsanitize=address" else return "-faddress-sanitizer" end else return nil end end memoize :adress_sanitizer_flag def self.cxx_11_flag # C++11 support on FreeBSD 10.0 + Clang seems to be bugged. # http://llvm.org/bugs/show_bug.cgi?id=18310 return nil if os_name =~ /freebsd/ source = %{ struct Foo { Foo(Foo &&f) { } }; } if try_compile("Checking for C++ -std=gnu++11 compiler flag", :cxx, source, '-std=gnu++11') return "-std=gnu++11" elsif try_compile("Checking for C++ -std=c++11 compiler flag", :cxx, source, '-std=c++11') return "-std=c++11" else return nil end end memoize :cxx_11_flag, true def self.has_rt_library? return try_link("Checking for -lrt support", :c, "int main() { return 0; }\n", '-lrt') end memoize :has_rt_library?, true def self.has_math_library? return try_link("Checking for -lmath support", :c, "int main() { return 0; }\n", '-lmath') end memoize :has_math_library?, true def self.has_alloca_h? return try_compile("Checking for alloca.h", :c, '#include ') end memoize :has_alloca_h?, true def self.has_accept4? return try_compile("Checking for accept4()", :c, %Q{ #define _GNU_SOURCE #include static void *foo = accept4; }) end memoize :has_accept4?, true # C compiler flags that should be passed in order to enable debugging information. def self.debugging_cflags # According to OpenBSD's pthreads man page, pthreads do not work # correctly when an app is compiled with -g. It recommends using # -ggdb instead. # # In any case we'll always want to use -ggdb for better GDB debugging. if cc_is_gcc? return '-ggdb' else return '-g' end end def self.dmalloc_ldflags if !ENV['DMALLOC_LIBS'].to_s.empty? return ENV['DMALLOC_LIBS'] end if os_name == "macosx" ['/opt/local', '/usr/local', '/usr'].each do |prefix| filename = "#{prefix}/lib/libdmallocthcxx.a" if File.exist?(filename) return filename end end return nil else return "-ldmallocthcxx" end end memoize :dmalloc_ldflags def self.electric_fence_ldflags if os_name == "macosx" ['/opt/local', '/usr/local', '/usr'].each do |prefix| filename = "#{prefix}/lib/libefence.a" if File.exist?(filename) return filename end end return nil else return "-lefence" end end memoize :electric_fence_ldflags def self.export_dynamic_flags if os_name == "linux" return '-rdynamic' else return nil end end def self.make return string_env('MAKE', find_command('make')) end memoize :make, true def self.gnu_make if result = string_env('GMAKE') return result else result = find_command('gmake') if !result result = find_command('make') if result if `#{result} --version 2>&1` =~ /GNU/ return result else return nil end else return nil end else return result end end end memoize :gnu_make, true def self.xcode_select_version if find_command('xcode-select') `xcode-select --version` =~ /version (.+)\./ return $1 else return nil end end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/platform_info/curl.rb000644 000765 000024 00000003711 12233035540 024651 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'platform_info' module PhusionPassenger module PlatformInfo def self.curl_flags result = `(curl-config --cflags) 2>/dev/null`.strip if result.empty? return nil else version = `curl-config --vernum`.strip if version >= '070c01' # Curl >= 7.12.1 supports curl_easy_reset() result << " -DHAS_CURL_EASY_RESET" end return result end end memoize :curl_flags def self.curl_libs result = `(curl-config --libs) 2>/dev/null`.strip if result.empty? return nil else return result end end memoize :curl_libs def self.curl_supports_ssl? features = `(curl-config --feature) 2>/dev/null` return features =~ /SSL/ end memoize :curl_supports_ssl? end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/platform_info/cxx_portability.rb000644 000765 000024 00000016620 12233035540 027133 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/compiler' PhusionPassenger.require_passenger_lib 'platform_info/operating_system' module PhusionPassenger module PlatformInfo # Extra flags that should always be passed to the C compiler # when linking, to be included last in the command string. def self.portability_c_ldflags return portability_c_or_cxx_ldflags(:c) end memoize :portability_c_ldflags # Extra flags that should always be passed to the C++ compiler # when linking, to be included last in the command string. def self.portability_cxx_ldflags return portability_c_or_cxx_ldflags(:cxx) end memoize :portability_cxx_ldflags # Extra compiler flags that should always be passed to the C compiler, # last in the command string. def self.default_extra_cflags return default_extra_c_or_cxxflags(:cc) end memoize :default_extra_cflags, true # Extra compiler flags that should always be passed to the C++ compiler, # last in the command string. def self.default_extra_cxxflags return default_extra_c_or_cxxflags(:cxx) end memoize :default_extra_cxxflags, true private def self.check_unordered_map(flags, class_name, header_name, macro_name) ok = try_compile("Checking for unordered_map", :cxx, %Q{ #include <#{header_name}> int main() { #{class_name} m; return 0; } }) flags << "-D#{macro_name}" if ok return ok end private_class_method :check_unordered_map def self.check_hash_map(flags) hash_namespace = nil ok = false ['__gnu_cxx', '', 'std', 'stdext'].each do |namespace| ['hash_map', 'ext/hash_map'].each do |hash_map_header| ok = try_compile("Checking for #{hash_map_header}", :cxx, %Q{ #include <#{hash_map_header}> int main() { #{namespace}::hash_map m; return 0; } }) if ok hash_namespace = namespace flags << "-DHASH_NAMESPACE=\"#{namespace}\"" flags << "-DHASH_MAP_HEADER=\"<#{hash_map_header}>\"" flags << "-DHASH_MAP_CLASS=\"hash_map\"" break end end break if ok end ['ext/hash_fun.h', 'functional', 'tr1/functional', 'ext/stl_hash_fun.h', 'hash_fun.h', 'stl_hash_fun.h', 'stl/_hash_fun.h'].each do |hash_function_header| ok = try_compile("Checking for #{hash_function_header}", :cxx, %Q{ #include <#{hash_function_header}> int main() { #{hash_namespace}::hash()(5); return 0; } }) if ok flags << "-DHASH_FUN_H=\"<#{hash_function_header}>\"" break end end end private_class_method :check_hash_map def self.default_extra_c_or_cxxflags(cc_or_cxx) flags = ["-D_REENTRANT", "-I/usr/local/include"] if !send("#{cc_or_cxx}_is_sun_studio?") flags << "-Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long" if send("#{cc_or_cxx}_supports_wno_missing_field_initializers_flag?") flags << "-Wno-missing-field-initializers" end if requires_no_tls_direct_seg_refs? && send("#{cc_or_cxx}_supports_no_tls_direct_seg_refs_option?") flags << "-mno-tls-direct-seg-refs" end # Work around Clang warnings in ev++.h. if send("#{cc_or_cxx}_is_clang?") flags << "-Wno-ambiguous-member-template" end end if !send("#{cc_or_cxx}_is_sun_studio?") flags << "-fcommon" if send("#{cc_or_cxx}_supports_feliminate_unused_debug?") flags << "-feliminate-unused-debug-symbols -feliminate-unused-debug-types" end if send("#{cc_or_cxx}_supports_visibility_flag?") flags << "-fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED" if send("#{cc_or_cxx}_visibility_flag_generates_warnings?") && send("#{cc_or_cxx}_supports_wno_attributes_flag?") flags << "-Wno-attributes" end end end flags << debugging_cflags flags << '-DHAS_ALLOCA_H' if has_alloca_h? flags << '-DHAVE_ACCEPT4' if has_accept4? flags << '-DHAS_SFENCE' if supports_sfence_instruction? flags << '-DHAS_LFENCE' if supports_lfence_instruction? flags << "-DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS" if cc_or_cxx == :cxx flags << cxx_11_flag if cxx_11_flag # There are too many implementations of of the hash map! # Figure out the right one. check_unordered_map(flags, "std::unordered_map", "unordered_map", "HAS_UNORDERED_MAP") || check_unordered_map(flags, "std::tr1::unordered_map", "unordered_map", "HAS_TR1_UNORDERED_MAP") || check_hash_map(flags) end if os_name =~ /solaris/ if send("#{cc_or_cxx}_is_sun_studio?") flags << '-mt' else flags << '-pthreads' end if os_name =~ /solaris2\.11/ # skip the _XOPEN_SOURCE and _XPG4_2 definitions in later versions of Solaris / OpenIndiana flags << '-D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64' else flags << '-D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__ -D_FILE_OFFSET_BITS=64' flags << '-D__SOLARIS9__ -DBOOST__STDC_CONSTANT_MACROS_DEFINED' if os_name =~ /solaris2\.9/ end flags << '-DBOOST_HAS_STDINT_H' unless os_name =~ /solaris2\.9/ if send("#{cc_or_cxx}_is_sun_studio?") flags << '-xtarget=ultra' if RUBY_PLATFORM =~ /sparc/ else flags << '-mcpu=ultrasparc' if RUBY_PLATFORM =~ /sparc/ end elsif os_name =~ /openbsd/ flags << '-DBOOST_HAS_STDINT_H -D_GLIBCPP__PTHREADS' elsif os_name =~ /aix/ flags << '-pthread' flags << '-DOXT_DISABLE_BACKTRACES' elsif RUBY_PLATFORM =~ /(sparc-linux|arm-linux|^arm.*-linux|sh4-linux)/ # http://code.google.com/p/phusion-passenger/issues/detail?id=200 # http://groups.google.com/group/phusion-passenger/t/6b904a962ee28e5c # http://groups.google.com/group/phusion-passenger/browse_thread/thread/aad4bd9d8d200561 flags << '-DBOOST_SP_USE_PTHREADS' end return flags.compact.map{ |str| str.strip }.join(" ").strip end private_class_method :default_extra_c_or_cxxflags def self.portability_c_or_cxx_ldflags(cc_or_cxx) result = '' result << cxx_11_flag if cc_or_cxx == :cxx && cxx_11_flag if os_name =~ /solaris/ result << ' -lxnet -lsocket -lnsl -lpthread' else result << ' -lpthread' end result << ' -lrt' if has_rt_library? result << ' -lmath' if has_math_library? result.strip! return result end private_class_method :portability_c_or_cxx_ldflags end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/platform_info/depcheck.rb000644 000765 000024 00000024126 12233035540 025455 0ustar00honglistaff000000 000000 # encoding: utf-8 PhusionPassenger.require_passenger_lib 'platform_info/ruby' PhusionPassenger.require_passenger_lib 'platform_info/linux' PhusionPassenger.require_passenger_lib 'platform_info/compiler' PhusionPassenger.require_passenger_lib 'platform_info/operating_system' PhusionPassenger.require_passenger_lib 'utils/ansi_colors' module PhusionPassenger module PlatformInfo # Almost all software require other software in order to run. We call those # other software 'dependencies'. Reliably checking for dependencies can be # difficult. Helping the user in case a dependency is not installed (or # doesn't seem to be installed) is more difficult still. # # The Depcheck framework seeks to make all this easier. It allows the programmer # to write "specs" which contain dependency checking code in a structured way. # The programmer defines a dependency's basic information (name, website, etc), # defines installation instructions (which may be customized per platform) and # defines code for checking whether the dependency actually exists. The Depcheck # framework: # # * Provides helpers for checking for the existance of commands, libraries, # headers, etc. # * Registers all dependency specs in a way that can be easily accessed # structurally. # * Allows user-friendly display of dependency checking progress and user help # instructions. # # Most dependency checking code (e.g. autoconf) is very straightforward: they # just check for the existance of a command, library, header, etc and either # report "found" or "not found". In our experience the world is unfortunately # not that simple. Users can have multiple versions of a dependency installed, # where some dependencies are suitable while others are not. Therefore specs # should print as many details about the dependency as possible (location, version, # etc) so that the user can override any decisions if necessary. module Depcheck THIS_DIR = File.expand_path(File.dirname(__FILE__)) @@loaded = {} @@database = {} def self.load(partial_filename) if !@@loaded[partial_filename] filename = "#{THIS_DIR}/#{partial_filename}.rb" content = File.read(filename) instance_eval(content, filename) @@loaded[partial_filename] = true end end def self.define(identifier, &block) @@database[identifier.to_s] = block end def self.find(identifier) # We lazy-initialize everything in order to save resources. This also # allows blocks to perform relatively expensive checks without hindering # startup time. identifier = identifier.to_s result = @@database[identifier] if result.is_a?(Proc) result = Dependency.new(&result) @@database[identifier] = result end result end class Dependency def initialize(&block) instance_eval(&block) check_syntax_aspect("Name must be given") { !!@name } check_syntax_aspect("A checker must be given") { !!@checker } end def check @install_comments = nil @check_result ||= @checker.call end ### DSL for specs ### def name(value = nil) value ? @name = value : @name end def website(value = nil) value ? @website = value : @website end def website_comments(value = nil) value ? @website_comments = value : @website_comments end def install_instructions(value = nil) if value @install_instructions = value else if @install_instructions @install_instructions elsif @website result = "Please download it from #{@website}" result << "\n(#{@website_comments})" if @website_comments result else "Search Google for '#{@name}'." end end end def install_comments(value = nil) value ? @install_comments = value : @install_comments end private def check_syntax_aspect(description) if !yield raise description end end ### DSL for specs ### def define_checker(&block) @checker = block end def check_for_command(name, *args) result = find_command(name, *args) if result { :found => true, "Location" => result } else false end end def check_for_ruby_tool(name) result = locate_ruby_tool(name) if result { :found => true, "Location" => result } else false end end def check_for_header(header_name, language = :c, flags = nil) if result = PlatformInfo.find_header(header_name, language, flags) { :found => true, "Location" => result } else false end end # def check_for_library(name) # check_by_compiling("int main() { return 0; }", :cxx, nil, "-l#{name}") # end # def check_by_compiling(source, language = :c, cflags = nil, linkflags = nil) # case language # when :c # source_file = "#{PlatformInfo.tmpexedir}/depcheck-#{Process.pid}-#{Thread.current.object_id}.c" # compiler = "gcc" # compiler_flags = ENV['CFLAGS'] # when :cxx # source_file = "#{PlatformInfo.tmpexedir}/depcheck-#{Process.pid}-#{Thread.current.object_id}.cpp" # compiler = "g++" # compiler_flags = "#{ENV['CFLAGS']} #{ENV['CXXFLAGS']}".strip # else # raise ArgumentError, "Unknown language '#{language}" # end # output_file = "#{PlatformInfo.tmpexedir}/depcheck-#{Process.pid}-#{Thread.current.object_id}" # begin # File.open(source_file, 'w') do |f| # f.puts(source) # end # if find_command(compiler) # command = "#{compiler} #{compiler_flags} #{cflags} " + # "#{source_file} -o #{output_file} #{linkflags}" # [!!system(command)] # else # [:unknown, "Cannot check: compiler '#{compiler}' not found."] # end # ensure # File.unlink(source_file) rescue nil # File.unlink(output_file) rescue nil # end # end def check_for_ruby_library(name) begin require(name) { :found => true } rescue LoadError if defined?(Gem) false else begin require 'rubygems' require(name) { :found => true } rescue LoadError false end end end end def on(platform) return if @on_invoked invoke = false if (linux_distro_tags || []).include?(platform) invoke = true else case platform when :linux invoke = true if PlatformInfo.os_name =~ /linux/ when :freebsd invoke = true if PlatformInfo.os_name =~ /freebsd/ when :macosx invoke = true if PlatformInfo.os_name == "macosx" when :solaris invoke = true if PlatformInfo.os_name =~ /solaris/ when :other_platforms invoke = true end end if invoke yield @on_invoked = true end end def apt_get_install(package_name) install_instructions("Please install it with apt-get install #{package_name}") end def urpmi(package_name) install_instructions("Please install it with urpmi #{package_name}") end def yum_install(package_name, options = {}) if options[:epel] install_instructions("Please enable EPEL, then install with yum install #{package_name}") else install_instructions("Please install it with yum install #{package_name}") end end def emerge(package_name) install_instructions("Please install it with emerge -av #{package_name}") end def gem_install(package_name) install_instructions("Please make sure RubyGems is installed, then run " + "#{gem_command} install #{package_name}") end def install_osx_command_line_tools PhusionPassenger.require_passenger_lib 'platform_info/compiler' if PlatformInfo.xcode_select_version.to_s >= "2333" install_instructions "Please install the Xcode command line tools: " + "sudo xcode-select --install" else install_instructions "Please install Xcode, then install the command line tools " + "though the menu Xcode -> Preferences -> Downloads -> Components" end end def ruby_command PlatformInfo.ruby_command end def gem_command PlatformInfo.gem_command(:sudo => true) || 'gem' end def find_command(command, *args) PlatformInfo.find_command(command, *args) end def linux_distro_tags PlatformInfo.linux_distro_tags end def locate_ruby_tool(name) PlatformInfo.locate_ruby_tool(name) end end # class Dependency class ConsoleRunner attr_reader :missing_dependencies def initialize @stdout = STDOUT @dep_identifiers = [] end def add(identifier) @dep_identifiers << identifier end def check_all old_log_impl = PlatformInfo.log_implementation begin PlatformInfo.log_implementation = lambda do |message| message = PlatformInfo.send(:reindent, message, 10) message.sub!(/^ /, '') STDOUT.puts " -> #{message}" end @missing_dependencies = [] @dep_identifiers.each do |identifier| dep = Depcheck.find(identifier) raise "Cannot find depcheck spec #{identifier.inspect}" if !dep puts_header "Checking for #{dep.name}..." result = dep.check result = { :found => false } if !result if result[:found] && !result[:error] puts_detail "Found: yes" else if result[:error] puts_detail "Found: #{result[:found] ? "yes, but there was an error" : "no"}" puts_detail "Error: #{result[:error]}" else puts_detail "Found: #{result[:found] ? "yes" : "no"}" end @missing_dependencies << dep end result.each_pair do |key, value| if key.is_a?(String) puts_detail "#{key}: #{value}" end end end return @missing_dependencies.empty? ensure PlatformInfo.log_implementation = old_log_impl end end def print_installation_instructions_for_missing_dependencies @missing_dependencies.each do |dep| puts " * To install #{dep.name}:" puts " #{dep.install_instructions}" if dep.install_comments puts " #{dep.install_comments}" end puts end end private def puts(text = nil) if text @stdout.puts(Utils::AnsiColors.ansi_colorize(text)) else @stdout.puts end @stdout.flush end def puts_header(text) puts " * #{text}" end def puts_detail(text) puts " #{text}" end end end # module Depcheck end # module PlatformInfo end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/platform_info/depcheck_specs/000755 000765 000024 00000000000 12233035540 026320 5ustar00honglistaff000000 000000 passenger-4.0.37/lib/phusion_passenger/platform_info/linux.rb000644 000765 000024 00000005740 12233035540 025047 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/operating_system' module PhusionPassenger module PlatformInfo # An identifier for the current Linux distribution. nil if the operating system is not Linux. def self.linux_distro tags = linux_distro_tags if tags return tags.first else return nil end end # Autodetects the current Linux distribution and return a number of identifier tags. # The first tag identifies the distribution while the other tags indicate which # distributions it is likely compatible with. # Returns nil if the operating system is not Linux. def self.linux_distro_tags if os_name != "linux" return nil end lsb_release = read_file("/etc/lsb-release") if lsb_release =~ /Ubuntu/ return [:ubuntu, :debian] elsif File.exist?("/etc/debian_version") return [:debian] elsif File.exist?("/etc/redhat-release") redhat_release = read_file("/etc/redhat-release") if redhat_release =~ /CentOS/ return [:centos, :redhat] elsif redhat_release =~ /Fedora/ return [:fedora, :redhat] elsif redhat_release =~ /Mandriva/ return [:mandriva, :redhat] else # On official RHEL distros, the content is in the form of # "Red Hat Enterprise Linux Server release 5.1 (Tikanga)" return [:rhel, :redhat] end elsif File.exist?("/etc/system-release") system_release = read_file("/etc/system-release") if system_release =~ /Amazon Linux/ return [:amazon, :redhat] else return [:unknown] end elsif File.exist?("/etc/suse-release") return [:suse] elsif File.exist?("/etc/gentoo-release") return [:gentoo] else return [:unknown] end # TODO: Slackware end memoize :linux_distro_tags end end # PhusionPassenger passenger-4.0.37/lib/phusion_passenger/platform_info/operating_system.rb000644 000765 000024 00000015442 12233035540 027304 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'rbconfig' PhusionPassenger.require_passenger_lib 'platform_info' module PhusionPassenger module PlatformInfo # Returns the operating system's name. This name is in lowercase and contains no spaces, # and thus is suitable to be used in some kind of ID. It may contain a version number. # Linux is always identified as "linux". OS X is always identified as "macosx". # Identifiers for other operating systems may contain a version number, e.g. "freebsd10". def self.os_name if rb_config['target_os'] =~ /darwin/ && (sw_vers = find_command('sw_vers')) return "macosx" elsif rb_config['target_os'] == "linux-" return "linux" else return rb_config['target_os'] end end memoize :os_name # The current platform's shared library extension ('so' on most Unices). def self.library_extension if os_name == "macosx" return "bundle" else return "so" end end # Returns the `uname` command, or nil if `uname` cannot be found. # In addition to looking for `uname` in `PATH`, this method also looks # for `uname` in /bin and /usr/bin, just in case the user didn't # configure its PATH properly. def self.uname_command if result = find_command("uname") result elsif File.exist?("/bin/uname") return "/bin/uname" elsif File.exist?("/usr/bin/uname") return "/usr/bin/uname" else return nil end end # Returns a list of all CPU architecture names that the current machine CPU # supports. If there are multiple such architectures then the first item in # the result denotes that OS runtime's main/preferred architecture. # # This function normalizes some names. For example x86 is always reported # as "x86" regardless of whether the OS reports it as "i386" or "i686". # x86_64 is always reported as "x86_64" even if the OS reports it as "amd64". # # Please note that even if the CPU supports multiple architectures, the # operating system might not. For example most x86 CPUs nowadays also # support x86_64, but x86_64 Linux systems require various x86 compatibility # libraries to be installed before x86 executables can be run. This function # does not detect whether these compatibility libraries are installed. # The only guarantee that you have is that the OS can run executables in # the architecture denoted by the first item in the result. # # For example, on x86_64 Linux this function can return ["x86_64", "x86"]. # This indicates that the CPU supports both of these architectures, and that # the OS's main/preferred architecture is x86_64. Most executables on the # system are thus be x86_64. It is guaranteed that the OS can run x86_64 # executables, but not x86 executables per se. # # Another example: on MacOS X this function can return either # ["x86_64", "x86"] or ["x86", "x86_64"]. The former result indicates # OS X 10.6 (Snow Leopard) and beyond because starting from that version # everything is 64-bit by default. The latter result indicates an OS X # version older than 10.6. def self.cpu_architectures uname = uname_command raise "The 'uname' command cannot be found" if !uname if os_name == "macosx" arch = `#{uname} -p`.strip if arch == "i386" # Macs have been x86 since around 2007. I think all of them come with # a recent enough Intel CPU that supports both x86 and x86_64, and I # think every OS X version has both the x86 and x86_64 runtime installed. major, minor, *rest = `sw_vers -productVersion`.strip.split(".") major = major.to_i minor = minor.to_i if major >= 10 || (major == 10 && minor >= 6) # Since Snow Leopard x86_64 is the default. ["x86_64", "x86"] else # Before Snow Leopard x86 was the default. ["x86", "x86_64"] end else arch end else arch = `#{uname} -p`.strip # On some systems 'uname -p' returns something like # 'Intel(R) Pentium(R) M processor 1400MHz' or # 'Intel(R)_Xeon(R)_CPU___________X7460__@_2.66GHz'. if arch == "unknown" || arch =~ / / || arch =~ /Hz$/ arch = `#{uname} -m`.strip end if arch =~ /^i.86$/ arch = "x86" elsif arch == "amd64" arch = "x86_64" end if arch == "x86" # Most x86 operating systems nowadays are probably running on # a CPU that supports both x86 and x86_64, but we're not gonna # go through the trouble of checking that. The main architecture # is what we usually care about. ["x86"] elsif arch == "x86_64" # I don't think there's a single x86_64 CPU out there # that doesn't support x86 as well. ["x86_64", "x86"] else [arch] end end end memoize :cpu_architectures, true # Returns whether the OS's main CPU architecture supports the # x86/x86_64 sfence instruction. def self.supports_sfence_instruction? arch = cpu_architectures[0] return arch == "x86_64" || (arch == "x86" && try_compile_and_run("Checking for sfence instruction support", :c, %Q{ int main() { __asm__ __volatile__ ("sfence" ::: "memory"); return 0; } })) end memoize :supports_sfence_instruction?, true # Returns whether the OS's main CPU architecture supports the # x86/x86_64 lfence instruction. def self.supports_lfence_instruction? arch = cpu_architectures[0] return arch == "x86_64" || (arch == "x86" && try_compile_and_run("Checking for lfence instruction support", :c, %Q{ int main() { __asm__ __volatile__ ("lfence" ::: "memory"); return 0; } })) end memoize :supports_lfence_instruction?, true def self.requires_no_tls_direct_seg_refs? return File.exists?("/proc/xen/capabilities") && cpu_architectures[0] == "x86" end memoize :requires_no_tls_direct_seg_refs?, true end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/platform_info/ruby.rb000644 000765 000024 00000036226 12233035540 024674 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'rbconfig' require 'etc' PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/operating_system' module PhusionPassenger module PlatformInfo # Store original $GEM_HOME value so that even if the app customizes # $GEM_HOME we can still work with the original value. gem_home = ENV['GEM_HOME'] if gem_home gem_home = gem_home.strip.freeze gem_home = nil if gem_home.empty? end GEM_HOME = gem_home if defined?(::RUBY_ENGINE) RUBY_ENGINE = ::RUBY_ENGINE else RUBY_ENGINE = "ruby" end # Returns correct command for invoking the current Ruby interpreter. # In case of RVM this function will return the path to the RVM wrapper script # that executes the current Ruby interpreter in the currently active gem set. def self.ruby_command # Detect usage of gem-wrappers: https://github.com/rvm/gem-wrappers # This is currently used by RVM >= 1.25, although it's not exclusive to RVM. if GEM_HOME && File.exist?("#{GEM_HOME}/wrappers/ruby") return "#{GEM_HOME}/wrappers/ruby" end if in_rvm? # Detect old-school RVM wrapper script location. name = rvm_ruby_string dirs = rvm_paths if name && dirs dirs.each do |dir| filename = "#{dir}/wrappers/#{name}/ruby" if File.exist?(filename) contents = File.open(filename, 'rb') do |f| f.read end # Old wrapper scripts reference $HOME which causes # things to blow up when run by a different user. if contents.include?("$HOME") filename = nil end else filename = nil end if filename return filename end end # Correctness of these commands are confirmed by mpapis. # If we ever encounter a case for which this logic is not sufficient, # try mpapis' pseudo code: # # rvm_update_prefix = write_to rvm_path ? "" : "rvmsudo" # rvm_gemhome_prefix = write_to GEM_HOME ? "" : "rvmsudo" # repair_command = "#{rvm_update_prefix} rvm get stable && rvm reload && #{rvm_gemhome_prefix} rvm repair all" # wrapper_command = "#{rvm_gemhome_prefix} rvm wrapper #{rvm_ruby_string} --no-prefix --all" case rvm_installation_mode when :single repair_command = "rvm get stable && rvm reload && rvm repair all" wrapper_command = "rvm wrapper #{rvm_ruby_string} --no-prefix --all" when :multi repair_command = "rvmsudo rvm get stable && rvm reload && rvmsudo rvm repair all" wrapper_command = "rvmsudo rvm wrapper #{rvm_ruby_string} --no-prefix --all" when :mixed repair_command = "rvmsudo rvm get stable && rvm reload && rvm repair all" wrapper_command = "rvm wrapper #{rvm_ruby_string} --no-prefix --all" end STDERR.puts "Your RVM wrapper scripts are too old, or some " + "wrapper scripts are missing. Please update/regenerate " + "them first by running:\n\n" + " #{repair_command}\n\n" + "If that doesn't seem to work, please run:\n\n" + " #{wrapper_command}" exit 1 else # Something's wrong with the user's RVM installation. # Raise an error so that the user knows this instead of # having things fail randomly later on. # 'name' is guaranteed to be non-nil because rvm_ruby_string # already raises an exception on error. STDERR.puts "Your RVM installation appears to be broken: the RVM " + "path cannot be found. Please fix your RVM installation " + "or contact the RVM developers for support." exit 1 end else return ruby_executable end end memoize :ruby_command # Returns the full path to the current Ruby interpreter's executable file. # This might not be the actual correct command to use for invoking the Ruby # interpreter; use ruby_command instead. def self.ruby_executable @@ruby_executable ||= rb_config['bindir'] + '/' + rb_config['RUBY_INSTALL_NAME'] + rb_config['EXEEXT'] end # Returns whether the Ruby interpreter supports process forking. def self.ruby_supports_fork? # MRI >= 1.9.2's respond_to? returns false for methods # that are not implemented. return Process.respond_to?(:fork) && RUBY_ENGINE != "jruby" && RUBY_ENGINE != "macruby" && rb_config['target_os'] !~ /mswin|windows|mingw/ end # Returns whether Phusion Passenger needs Ruby development headers to # be available for the current Ruby implementation. def self.passenger_needs_ruby_dev_header? # Too much of a trouble for JRuby. We can do without it. return RUBY_ENGINE != "jruby" end # Returns the correct 'gem' command for this Ruby interpreter. # If `:sudo => true` is given, then the gem command is prefixed by a # sudo command if filesystem permissions require this. def self.gem_command(options = {}) command = locate_ruby_tool('gem') if options[:sudo] && gem_install_requires_sudo? command = "#{ruby_sudo_command} #{command}" end return command end memoize :gem_command # Returns whether running 'gem install' as the current user requires sudo. def self.gem_install_requires_sudo? `#{gem_command} env` =~ /INSTALLATION DIRECTORY: (.+)/ if install_dir = $1 return !File.writable?(install_dir) else return nil end end memoize :gem_install_requires_sudo? # Returns the absolute path to the Rake executable that # belongs to the current Ruby interpreter. Returns nil if it # doesn't exist. # # The return value may not be the actual correct invocation # for Rake. Use rake_command for that. def self.rake return locate_ruby_tool('rake') end memoize :rake # Returns the correct command string for invoking the Rake executable # that belongs to the current Ruby interpreter. Returns nil if Rake is # not found. def self.rake_command filename = rake # If the Rake executable is a Ruby program then we need to run # it in the correct Ruby interpreter just in case Rake doesn't # have the correct shebang line; we don't want a totally different # Ruby than the current one to be invoked. if filename && is_ruby_program?(filename) return "#{ruby_command} #{filename}" else # If it's not a Ruby program then it's probably a wrapper # script as is the case with e.g. RVM (~/.rvm/wrappers). return filename end end memoize :rake_command # Returns the absolute path to the RSpec runner program that # belongs to the current Ruby interpreter. Returns nil if it # doesn't exist. def self.rspec return locate_ruby_tool('rspec') end memoize :rspec # Returns whether the current Ruby interpreter is managed by RVM. def self.in_rvm? bindir = rb_config['bindir'] return bindir.include?('/.rvm/') || bindir.include?('/rvm/') end # If the current Ruby interpreter is managed by RVM, returns all # directories in which RVM places its working files. This is usually # ~/.rvm or /usr/local/rvm, but in mixed-mode installations there # can be multiple such paths. # # Otherwise returns nil. def self.rvm_paths if in_rvm? result = [] [ENV['rvm_path'], "~/.rvm", "/usr/local/rvm"].each do |path| next if path.nil? path = File.expand_path(path) rubies_path = File.join(path, 'rubies') if File.directory?(path) && File.directory?(rubies_path) result << path end end if result.empty? # Failure to locate the RVM path is probably caused by the # user customizing $rvm_path. Older RVM versions don't # export $rvm_path, making us unable to detect its value. STDERR.puts "Unable to locate the RVM path. Your RVM installation " + "is probably too old. Please update it with " + "'rvm get head && rvm reload && rvm repair all'." exit 1 else return result end else return nil end end memoize :rvm_paths # If the current Ruby interpreter is managed by RVM, returns the # RVM name which identifies the current Ruby interpreter plus the # currently active gemset, e.g. something like this: # "ruby-1.9.2-p0@mygemset" # # Returns nil otherwise. def self.rvm_ruby_string if in_rvm? # RVM used to export the necessary information through # environment variables, but doesn't always do that anymore # in the latest versions in order to fight env var pollution. # Scanning $LOAD_PATH seems to be the only way to obtain # the information. # Getting the RVM name of the Ruby interpreter ("ruby-1.9.2") # isn't so hard, we can extract it from the #ruby_executable # string. Getting the gemset name is a bit harder, so let's # try various strategies... # $GEM_HOME usually contains the gem set name. # It may be something like: # /Users/hongli/.rvm/gems/ruby-1.9.3-p392 # But also: # /home/bitnami/.rvm/gems/ruby-1.9.3-p385-perf@njist325/ruby/1.9.1 if GEM_HOME && GEM_HOME =~ %r{rvm/gems/(.+)} return $1.sub(/\/.*/, '') end # User somehow managed to nuke $GEM_HOME. Extract info # from $LOAD_PATH. matching_path = $LOAD_PATH.find_all do |item| item.include?("rvm/gems/") end if matching_path && !matching_path.empty? subpath = matching_path.to_s.gsub(/^.*rvm\/gems\//, '') result = subpath.split('/').first return result if result end # On Ruby 1.9, $LOAD_PATH does not contain any gem paths until # at least one gem has been required so the above can fail. # We're out of options now, we can't detect the gem set. # Raise an exception so that the user knows what's going on # instead of having things fail in obscure ways later. STDERR.puts "Unable to autodetect the currently active RVM gem " + "set name. This could happen if you ran this program using 'sudo' " + "instead of 'rvmsudo'. When using RVM, you're always supposed to " + "use 'rvmsudo' instead of 'sudo!'.\n\n" + "Please try rerunning this program using 'rvmsudo'. If that " + "doesn't help, please contact this program's author for support." exit 1 end return nil end memoize :rvm_ruby_string # Returns the RVM installation mode: # :single - RVM is installed in single-user mode. # :multi - RVM is installed in multi-user mode. # :mixed - RVM is in a mixed-mode installation. # nil - The current Ruby interpreter is not using RVM. def self.rvm_installation_mode if in_rvm? if ENV['rvm_path'] =~ /\.rvm/ return :single else if GEM_HOME =~ /\.rvm/ return :mixed else return :multi end end else return nil end end # Returns either 'sudo' or 'rvmsudo' depending on whether the current # Ruby interpreter is managed by RVM. def self.ruby_sudo_command if in_rvm? return "rvmsudo" else return "sudo" end end # Returns a `sudo` or `rvmsudo` command that spawns a shell, depending # on whether the current Ruby interpreter is managed by RVM. def self.ruby_sudo_shell_command(args = nil) if in_rvm? shell = ENV['SHELL'].to_s if shell.empty? begin user = Etc.getpwuid(0) rescue ArgumentError user = nil end shell = user.shell if user shell = "bash" if !shell || shell.empty? end result = "rvmsudo " result << "#{args} " if args result << shell return result else return "sudo -s #{args}".strip end end # Locates a Ruby tool command, e.g. 'gem', 'rake', 'bundle', etc. Instead of # naively looking in $PATH, this function uses a variety of search heuristics # to find the command that's really associated with the current Ruby interpreter. # It should never locate a command that's actually associated with a different # Ruby interpreter. # Returns nil when nothing's found. def self.locate_ruby_tool(name) result = locate_ruby_tool_by_basename(name) if !result exeext = rb_config['EXEEXT'] exeext = nil if exeext.empty? if exeext result = locate_ruby_tool_by_basename("#{name}#{exeext}") end if !result result = locate_ruby_tool_by_basename(transform_according_to_ruby_exec_format(name)) end if !result && exeext result = locate_ruby_tool_by_basename(transform_according_to_ruby_exec_format(name) + exeext) end end return result end private def self.locate_ruby_tool_by_basename(name) if os_name == "macosx" && ruby_command =~ %r(\A/System/Library/Frameworks/Ruby.framework/Versions/.*?/usr/bin/ruby\Z) # On OS X we must look for Ruby binaries in /usr/bin. # RubyGems puts executables (e.g. 'rake') in there, not in # /System/Libraries/(...)/bin. filename = "/usr/bin/#{name}" else filename = File.dirname(ruby_command) + "/#{name}" end if !File.file?(filename) || !File.executable?(filename) # RubyGems might put binaries in a directory other # than Ruby's bindir. Debian packaged RubyGems and # DebGem packaged RubyGems are the prime examples. begin require 'rubygems' unless defined?(Gem) filename = Gem.bindir + "/#{name}" rescue LoadError filename = nil end end if !filename || !File.file?(filename) || !File.executable?(filename) # Looks like it's not in the RubyGems bindir. Search in $PATH, but # be very careful about this because whatever we find might belong # to a different Ruby interpreter than the current one. ENV['PATH'].split(':').each do |dir| filename = "#{dir}/#{name}" if File.file?(filename) && File.executable?(filename) shebang = File.open(filename, 'rb') do |f| f.readline.strip end if shebang == "#!#{ruby_command}" # Looks good. break end end # Not found. Try next path. filename = nil end end filename end private_class_method :locate_ruby_tool_by_basename def self.is_ruby_program?(filename) File.open(filename, 'rb') do |f| return f.readline =~ /ruby/ end rescue EOFError return false end private_class_method :is_ruby_program? # Deduce Ruby's --program-prefix and --program-suffix from its install name # and transforms the given input name accordingly. # # transform_according_to_ruby_exec_format("rake") => "jrake", "rake1.8", etc def self.transform_according_to_ruby_exec_format(name) install_name = rb_config['RUBY_INSTALL_NAME'] if install_name.include?('ruby') format = install_name.sub('ruby', '%s') return sprintf(format, name) else return name end end private_class_method :transform_according_to_ruby_exec_format end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/platform_info/zlib.rb000644 000765 000024 00000002643 12233035540 024647 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'platform_info' module PhusionPassenger module PlatformInfo def self.zlib_flags return nil end def self.zlib_libs return '-lz' end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/platform_info/depcheck_specs/apache2.rb000644 000765 000024 00000004451 12233035540 030154 0ustar00honglistaff000000 000000 define 'apache2' do name 'Apache 2' website 'http://httpd.apache.org/' define_checker do PhusionPassenger.require_passenger_lib 'platform_info/apache' if check_for_command(PlatformInfo.httpd) { :found => true, "Location of httpd" => PlatformInfo.httpd, "Apache version" => PlatformInfo.httpd_version } else false end end on :debian do apt_get_install "apache2-mpm-worker" end on :mandriva do urpmi "apache" end on :redhat do yum_install "httpd" end on :gentoo do emerge "apache" end end define 'apache2-dev' do name "Apache 2 development headers" website "http://httpd.apache.org/" define_checker do PhusionPassenger.require_passenger_lib 'platform_info/apache' if PlatformInfo.apxs2 { :found => true, "Location of apxs2" => PlatformInfo.apxs2 } else false end end on :debian do apt_get_install "apache2-threaded-dev" end on :mandriva do urpmi "apache-devel" end on :redhat do yum_install "httpd-devel" end on :gentoo do emerge "apache" end on :macosx do install_osx_command_line_tools end end define 'apr-dev' do name "Apache Portable Runtime (APR) development headers" website "http://httpd.apache.org/" define_checker do PhusionPassenger.require_passenger_lib 'platform_info/apache' if PlatformInfo.apr_config { :found => true, "Location" => PlatformInfo.apr_config, "Version" => `#{PlatformInfo.apr_config} --version`.strip } else false end end on :debian do apt_get_install "libapr1-dev" end on :mandriva do urpmi "libapr-devel" end on :redhat do yum_install "apr-devel" end on :gentoo do emerge "apr" end on :macosx do install_osx_command_line_tools end end define 'apu-dev' do name "Apache Portable Runtime Utility (APU) development headers" website "http://httpd.apache.org/" define_checker do PhusionPassenger.require_passenger_lib 'platform_info/apache' if PlatformInfo.apu_config { :found => true, "Location" => PlatformInfo.apu_config, "Version" => `#{PlatformInfo.apu_config} --version`.strip } else false end end on :debian do apt_get_install "libaprutil1-dev" end on :mandriva do urpmi "libapr-util-devel" end on :redhat do yum_install "apr-util-devel" end on :macosx do install_osx_command_line_tools end end passenger-4.0.37/lib/phusion_passenger/platform_info/depcheck_specs/compiler_toolchain.rb000644 000765 000024 00000003475 12233035540 032530 0ustar00honglistaff000000 000000 define 'cc' do name "C compiler" website "http://gcc.gnu.org/" define_checker do PhusionPassenger.require_passenger_lib 'platform_info/compiler' check_for_command(PlatformInfo.cc, false) end on :debian do apt_get_install "build-essential" end on :mandriva do urpmi "gcc" end on :redhat do yum_install "gcc" end on :gentoo do emerge "gcc" end on :macosx do install_osx_command_line_tools end end define 'c++' do name "C++ compiler" website "http://gcc.gnu.org/" define_checker do PhusionPassenger.require_passenger_lib 'platform_info/compiler' check_for_command(PlatformInfo.cxx, false) end on :debian do apt_get_install "build-essential" end on :mandriva do urpmi "gcc-c++" end on :redhat do yum_install "gcc-c++" end on :gentoo do emerge "gcc" end on :macosx do install_osx_command_line_tools end end define 'make' do name "The 'make' tool" define_checker do PhusionPassenger.require_passenger_lib 'platform_info/compiler' check_for_command(PlatformInfo.make) end on :debian do apt_get_install "build-essential" end on :mandriva do urpmi "make" end on :redhat do yum_install "make" end on :macosx do install_osx_command_line_tools end on :other_platforms do website "http://www.gnu.org/software/make/" end end define 'gmake' do name "GNU make" define_checker do PhusionPassenger.require_passenger_lib 'platform_info/compiler' check_for_command(PlatformInfo.gnu_make) end on :debian do apt_get_install "build-essential" end on :mandriva do urpmi "make" end on :redhat do yum_install "make" end on :macosx do install_osx_command_line_tools end on :other_platforms do website "http://www.gnu.org/software/make/" end end passenger-4.0.37/lib/phusion_passenger/platform_info/depcheck_specs/gems.rb000644 000765 000024 00000001426 12233035540 027603 0ustar00honglistaff000000 000000 define 'fastthread' do name 'fastthread' define_checker do check_for_ruby_library('fastthread') end gem_install 'fastthread' end define 'rack' do name 'rack' define_checker do check_for_ruby_library('rack') end gem_install 'rack' end define 'daemon_controller >= 1.1.0' do name 'daemon_controller >= 1.1.0' define_checker do if check_for_ruby_library('daemon_controller') gem_command = PlatformInfo.gem_command || "gem" begin require 'daemon_controller/version' { :found => DaemonController::VERSION_STRING >= '1.1.0', "Installed version" => DaemonController::VERSION_STRING } rescue LoadError { :found => false, "Installed version" => "way too old" } end else false end end gem_install 'daemon_controller' end passenger-4.0.37/lib/phusion_passenger/platform_info/depcheck_specs/libs.rb000644 000765 000024 00000005630 12233035540 027602 0ustar00honglistaff000000 000000 define 'openssl-dev' do name "OpenSSL development headers" website "http://www.openssl.org/" define_checker do check_for_header('openssl/ssl.h') end on :debian do apt_get_install "libssl-dev" end on :redhat do yum_install "openssl-devel" end end define 'libcurl-dev' do name "Curl development headers with SSL support" website "http://curl.haxx.se/libcurl" define_checker do PhusionPassenger.require_passenger_lib 'platform_info/curl' result = { :found => false } if !(curl_config = PlatformInfo.find_command('curl-config')) result[:error] = "Cannot find the `curl-config` command." next result else result["curl-config location"] = curl_config end if !(header = PlatformInfo.find_header("curl/curl.h", :c, PlatformInfo.curl_flags)) result[:error] = "Cannot find the curl/curl.h header file." next result else result[:found] = true result["Header location"] = header == true ? "somewhere, not sure where" : header end begin result["Version"] = `#{curl_config} --version`.strip rescue SystemCallError => e result[:error] = "Cannot run `curl-config --version`: #{e}" next result end source = %Q{ #include int main() { curl_global_init(CURL_GLOBAL_ALL); return 0; } } ret = PlatformInfo.try_compile_and_run("Checking for libcurl usability", :c, source, "#{PlatformInfo.curl_flags} #{PlatformInfo.curl_libs}") result["Usable"] = ret ? "yes" : "no" if !ret result[:error] = "libcurl was found, but it isn't usable. Set VERBOSE=1 to see why." next result end result["Supports SSL"] = PlatformInfo.curl_supports_ssl? ? "yes" : "no" if !PlatformInfo.curl_supports_ssl? result[:error] = "libcurl was found, but it doesn't support SSL. Please reinstall it with SSL support." next result end result end install_instructions "Please download Curl from #{website} " + "and make sure you install it with SSL support." on :debian do install_instructions "Please run " + "apt-get install libcurl4-openssl-dev " + "or libcurl4-gnutls-dev, whichever you prefer." end on :redhat do release = PlatformInfo.read_file("/etc/redhat-release") if release =~ /release 4/ # http://code.google.com/p/phusion-passenger/issues/detail?id=554 yum_install "curl-devel zlib-devel e2fsprogs-devel krb5-devel libidn-devel" else yum_install "curl-devel" end end end define 'zlib-dev' do name "Zlib development headers" website "http://www.zlib.net/" define_checker do check_for_header('zlib.h') end on :debian do apt_get_install "zlib1g-dev" end on :mandriva do urpmi "zlib1-devel" end on :redhat do yum_install "zlib-devel" end end define 'pcre-dev' do name "PCRE development headers" website "http://www.pcre.org/" define_checker do check_for_header('pcre.h') end on :debian do apt_get_install "libpcre3-dev" end on :redhat do yum_install 'pcre-devel' end endpassenger-4.0.37/lib/phusion_passenger/platform_info/depcheck_specs/ruby.rb000644 000765 000024 00000010107 12233035540 027625 0ustar00honglistaff000000 000000 define 'ruby-dev' do name "Ruby development headers" website "http://www.ruby-lang.org/" define_checker do require 'rbconfig' begin require 'mkmf' rb_config = PlatformInfo.rb_config header_dir = rb_config['rubyhdrdir'] || rb_config['archdir'] filename = "#{header_dir}/ruby.h" if File.exist?(filename) { :found => true, "Location" => filename } else false end rescue LoadError, SystemExit # On RedHat/Fedora/CentOS, if ruby-devel is not installed then # mkmf.rb will print an error and call 'exit'. So here we # catch SystemExit as well. false rescue NotImplementedError # JRuby raises this. false end end if ruby_command =~ %r(^/usr/bin/ruby) || ruby_command =~ %r(^/System/Library/Frameworks/Ruby.framework) # Only tell user to install the headers with the system's package manager # if Ruby itself was installed with the package manager. on :debian do apt_get_install "ruby-dev" end on :mandriva do urpmi "ruby-devel" end on :redhat do yum_install "ruby-devel" end on :macosx do install_osx_command_line_tools end end on :other_platforms do install_instructions "Please (re)install Ruby by downloading it from #{website}" end end define 'ruby-openssl' do name "OpenSSL support for Ruby" if RUBY_PLATFORM =~ /java/ website "http://jruby.org/openssl" install_instructions "Please install OpenSSL support for JRuby: #{website}" else website "http://www.ruby-lang.org/" install_instructions "Please (re)install Ruby with OpenSSL support." end define_checker do begin require 'openssl' { :found => true } rescue LoadError false end end if ruby_command =~ %r(^/usr/bin/ruby) # Only tell user to install ruby-openssl with the system's package manager # if Ruby itself was installed with the package manager. on :debian do apt_get_install "libopenssl-ruby" end end end define 'rubygems' do name "RubyGems" website "http://rubyforge.org/frs/?group_id=126" define_checker do begin require 'rubygems' { :found => true } rescue LoadError false end end install_instructions "Please download it from #{website}. " + "Extract the tarball, and run ruby setup.rb" if ruby_command =~ %r(^/usr/bin/ruby) # Only tell user to install RubyGems with the system's package manager # if Ruby itself was installed with the package manager. # # Older versions of Debian have totally messed up RubyGems by patching it to install binaries # to /var/lib/gems/bin instead of /usr/bin or even /usr/local/bin. That # wouldn't be so much of a problem were it not for the fact that # /var/lib/gems/bin is not in $PATH by default, so on a regular basis people # ask various Ruby/Rails support forums why they get a 'foo: command not found' # after typing 'gem install foo'. # # Luckily newer Debian versions fixed this problem. on :debian do apt_get_install "rubygems" end end end # The 'rake' spec looks for a Rake instance that's installed for the same # Ruby interpreter as the one that's currently running. # For example if you're running this 'rake.rb' file with Ruby 1.8, then # this checker will not find Ruby 1.9's Rake or JRuby's Rake. define 'rake' do name "Rake (associated with #{ruby_command})" website "http://rake.rubyforge.org/" define_checker do PhusionPassenger.require_passenger_lib 'platform_info/ruby' if result = PlatformInfo.rake_command { :found => true, "Location" => result } else false end end if ruby_command =~ %r(^/usr/bin/ruby) # Only tell user to install Rake with the system's package manager # if Ruby itself was installed with the package manager. on :debian do apt_get_install "rake" end on :mandriva do urpmi "rake" end on :redhat do yum_install "rubygem-rake", :epel => true end end on :other_platforms do gem_install "rake" end end passenger-4.0.37/lib/phusion_passenger/platform_info/depcheck_specs/utilities.rb000644 000765 000024 00000000621 12233035540 030657 0ustar00honglistaff000000 000000 define 'download-tool' do name "A download tool like 'wget' or 'curl'" define_checker do check_for_command('wget') || check_for_command('curl') end on :debian do apt_get_install "wget curl" end on :redhat do yum_install "wget curl" end on :other_platforms do install_instructions "Please install either wget (http://www.gnu.org/software/wget/) or curl (http://curl.haxx.se/)." end endpassenger-4.0.37/lib/phusion_passenger/nginx/config_options.rb000644 000765 000024 00000025131 12233035540 025210 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # This file defines all supported Nginx per-location configuration options. The # build system automatically generates the corresponding Nginx module boilerplate # code from the definitions in this file. # # Main configuration options are not defined in this file, but are defined in # ext/nginx/Configuraion.c instead. # # The following boilerplate code is generated: # # * ngx_command_t array members (ConfigurationCommands.c.erb) # * Location configuration structure definition (ConfigurationFields.h.erb) # * Location configuration structure initialization (CreateLocationConfig.c.erb) # * Location configuration merging (MergeLocationConfig.c.erb) # * Conversion of configuration options to CGI headers (CacheLocationConfig.c.erb) # # Options: # # * name - The configuration option name. Required. # * context - The context in which this configuration option is valid. # Defaults to [:main, :srv, :loc, :lif] # * type - This configuration option's value type. Allowed types: # :string, :integer, :flag, :string_array, :string_keyval, :path # * take - Tells Nginx how many parameters and what kind of parameter # this configuration option takes. It should be set to a string # such as "NGX_CONF_FLAG". # By default this is automatically inferred from `type`: for # example if `type` is :string then ConfigurationCommands.c.erb # will infer that `NGX_CONF_TAKE1` should be used. # * function - The name of the function that should be used to store the # configuration value into the corresponding structure. This function # is not auto-generated, so it must be the name of an existing # function. By default, the function name is automatically inferred # from `type`. For example if `type` is string then `function` is # inferred to be `ngx_conf_set_str_slot`. # If you set this to a string then you are responsible for defining # said function in Configuration.c. # * struct - The type of the struct that the field is contained in. Something like # "NGX_HTTP_LOC_CONF_OFFSET" (which is also the default). # * field - The name that should be used for the auto-generated field in # the location configuration structure. Defaults to the configuration # name without the 'passenger_' prefix. Set this to nil if you do not # want a structure field to be auto-generated. If the field name contains # a dot (.e.g `upstream_config.pass_headers`) then the structure field will # also not be auto-generated, because it is assumed to belong to an existing # structure field. # * header - The name of the corresponding CGI header. By default CGI header # generation code is automatically generated, using the configuration # option's name in uppercase as the CGI header name. # Setting this to nil, or setting `field` to a value containing a dot, # will disable auto-generation of CGI header generation code. You are # then responsible for writing CGI header passing code yourself in # ContentHandler.c. # * auto_generate_nginx_merge_code - Whether location configuration merging # code should be automatically generated. Defaults to true. If you set # this to false then you are responsible for writing merging code # yourself in Configuration.c. # * alias_for - Set this if this configuration option is an alias for another # option. Alias definitions must only have the `name` and `alias_for` # fields, nothing else. LOCATION_CONFIGURATION_OPTIONS = [ { :name => 'passenger_enabled', :context => [:srv, :loc, :lif], :type => :flag, :function => 'passenger_enabled', :field => 'enabled', :header => nil }, { :name => 'passenger_ruby', :context => [:srv, :loc, :lif], :type => :string }, { :name => 'passenger_python', :type => :string }, { :name => 'passenger_nodejs', :type => :string }, { :name => 'passenger_app_env', :type => :string, :field => 'environment' }, { :name => 'passenger_friendly_error_pages', :type => :flag }, { :name => 'passenger_min_instances', :type => :integer, :header => 'PASSENGER_MIN_PROCESSES' }, { :name => 'passenger_max_instances_per_app', :context => [:main], :type => :integer, :header => 'PASSENGER_MAX_PROCESSES' }, { :name => 'passenger_max_requests', :type => :integer }, { :name => 'passenger_start_timeout', :type => :integer }, { :name => 'passenger_base_uri', :type => :string_array, :field => 'base_uris', :header => nil, :auto_generate_nginx_merge_code => false }, { :name => 'passenger_document_root', :type => :string, :header => nil }, { :name => 'passenger_user', :type => :string }, { :name => 'passenger_group', :type => :string }, { :name => 'passenger_app_group_name', :type => :string }, { :name => 'passenger_app_root', :type => :string }, { :name => 'passenger_app_rights', :type => :string }, { :name => 'union_station_support', :type => :flag }, { :name => 'union_station_filter', :take => 'NGX_CONF_TAKE1', :type => :string_array, :function => 'union_station_filter', :field => 'union_station_filters', :header => nil, :auto_generate_nginx_merge_code => false }, { :name => 'passenger_debugger', :type => :flag }, { :name => 'passenger_show_version_in_header', :type => :flag }, { :name => 'passenger_max_preloader_idle_time', :type => :integer }, { :name => 'passenger_ignore_headers', :take => 'NGX_CONF_1MORE', :function => 'ngx_conf_set_bitmask_slot', :field => 'upstream_config.ignore_headers' }, { :name => 'passenger_set_cgi_param', :context => [:srv, :loc, :lif], :type => :string_keyval, :field => 'vars_source', :header => nil, :auto_generate_nginx_merge_code => false }, { :name => 'passenger_pass_header', :type => :string_array, :field => 'upstream_config.pass_headers' }, { :name => 'passenger_ignore_client_abort', :type => :flag, :field => 'upstream_config.ignore_client_abort' }, { :name => 'passenger_buffer_response', :type => :flag, :field => 'upstream_config.buffering' }, { :name => 'passenger_buffer_size', :take => 'NGX_CONF_TAKE1', :function => 'ngx_conf_set_size_slot', :field => 'upstream_config.buffer_size' }, { :name => 'passenger_buffers', :take => 'NGX_CONF_TAKE2', :function => 'ngx_conf_set_bufs_slot', :field => 'upstream_config.bufs' }, { :name => 'passenger_busy_buffers_size', :take => 'NGX_CONF_TAKE1', :function => 'ngx_conf_set_size_slot', :field => 'upstream_config.busy_buffers_size_conf' }, { :name => 'passenger_intercept_errors', :type => :flag, :field => 'upstream_config.intercept_errors' }, { :name => 'passenger_spawn_method', :type => :string }, { :name => 'passenger_load_shell_envvars', :type => :flag }, { :name => 'union_station_key', :type => :string }, { :name => 'passenger_max_request_queue_size', :type => :integer }, { :name => 'passenger_request_queue_overflow_status_code', :type => :integer }, { :name => 'passenger_restart_dir', :type => :string }, { :name => 'passenger_app_type', :type => :string, :header => nil }, { :name => 'passenger_startup_file', :type => :string }, ###### Enterprise features ###### { :context => [:main], :name => 'passenger_fly_with', :type => :string, :struct => "NGX_HTTP_MAIN_CONF_OFFSET", :function => 'passenger_enterprise_only', :field => nil }, { :name => 'passenger_max_instances', :type => :integer, :function => 'passenger_enterprise_only', :field => nil }, { :name => 'passenger_max_request_time', :type => :integer, :function => 'passenger_enterprise_only', :field => nil }, { :name => 'passenger_memory_limit', :type => :integer, :function => 'passenger_enterprise_only', :field => nil }, { :name => 'passenger_concurrency_model', :type => :string, :function => 'passenger_enterprise_only', :field => nil }, { :name => 'passenger_thread_count', :type => :integer, :function => 'passenger_enterprise_only', :field => nil }, { :name => 'passenger_rolling_restarts', :type => :flag, :function => 'passenger_enterprise_only', :field => nil }, { :name => 'passenger_resist_deployment_errors', :type => :flag, :function => 'passenger_enterprise_only', :field => nil }, ###### Aliases for backwards compatibility ###### { :name => 'rails_spawn_method', :alias_for => 'passenger_spawn_method' }, { :name => 'rails_env', :alias_for => 'passenger_app_env' }, { :name => 'rack_env', :alias_for => 'passenger_app_env' }, { :name => 'rails_app_spawner_idle_time', :alias_for => 'passenger_max_preloader_idle_time' }, ###### Obsolete options ###### { :name => 'rails_framework_spawner_idle_time', :take => 'NGX_CONF_TAKE1', :function => 'rails_framework_spawner_idle_time', :field => nil }, { :name => 'passenger_use_global_queue', :take => 'NGX_CONF_FLAG', :function => 'passenger_use_global_queue', :field => nil } ] passenger-4.0.37/lib/phusion_passenger/config/about_command.rb000644 000765 000024 00000017123 12233035540 025124 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'config/command' module PhusionPassenger module Config class AboutCommand < Command def self.description return "Show information about #{PROGRAM_NAME}" end def self.help puts "Usage: passenger-config about " puts "Show information about #{PROGRAM_NAME}." puts puts "Available subcommands:" puts " root Show #{PROGRAM_NAME}'s root." puts " ruby-libdir Show #{PROGRAM_NAME}'s Ruby library directory." puts " includedir Show the Nginx runtime library headers directory." puts " nginx-addon-dir Show #{PROGRAM_NAME}'s Nginx addon directory." puts " nginx-libs Show Nginx runtime library flags." puts " compiled Check whether runtime libraries are compiled." puts " natively-packaged Check whether Phusion Passenger is natively" puts " packaged." puts " installed-from-release-package Check whether this installation came from" puts " an official release package." puts " make-locations-ini Generate a locations.ini based on the current" puts " install paths." puts " detect-apache2 Autodetect Apache installations." puts " ruby-command Show the correct command for invoking the Ruby" puts " interpreter." puts " rubyext-compat-id Show the Ruby extension binary compatibility ID." puts " cxx-compat-id Show the C++ binary compatibility ID." puts " version Show the version number." end def run PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/compiler' subcommand = @argv[0].to_s.dup # Compatibility with version <= 4.0.29: accept both # 'subcommand' and '--subcommand'. subcommand = "--#{subcommand}" if subcommand !~ /^--/ case subcommand when "--root" puts PhusionPassenger.source_root when "--ruby-libdir" puts PhusionPassenger.ruby_libdir when "--includedir" puts PhusionPassenger.include_dir when "--nginx-addon-dir" puts PhusionPassenger.nginx_module_source_dir when "--nginx-libs" puts "#{common_library.link_objects_as_string} #{PhusionPassenger.lib_dir}/common/libboost_oxt.a" when "--compiled" common_library.link_objects.each do |filename| if !File.exist?(filename) exit 1 end end if File.exist?("#{PhusionPassenger.lib_dir}/common/libboost_oxt.a") exit 0 else exit 1 end when "--natively-packaged" if PhusionPassenger.natively_packaged? exit 0 else exit 1 end when "--installed-from-release-package" if PhusionPassenger.installed_from_release_package? exit 0 else exit 1 end when "--make-locations-ini" if @argv[1] =~ /^--for-native-packaging-method=(.*)/ native_packaging_method = $1 else native_packaging_method = nil end puts "[locations]" if native_packaging_method puts "natively_packaged=true" puts "native_packaging_method=#{native_packaging_method}" else puts "natively_packaged=#{PhusionPassenger.natively_packaged?}" if PhusionPassenger.natively_packaged? puts "native_packaging_method=#{PhusionPassenger.native_packaging_method}" end end PhusionPassenger::REQUIRED_LOCATIONS_INI_FIELDS.each do |field| puts "#{field}=#{PhusionPassenger.send(field)}" end PhusionPassenger::OPTIONAL_LOCATIONS_INI_FIELDS.each do |field| value = PhusionPassenger.send(field) should_print = value && (!ORIGINALLY_PACKAGED_LOCATIONS_INI_FIELDS.include?(field) || ( PhusionPassenger.originally_packaged? && !native_packaging_method )) if should_print puts "#{field}=#{value}" end end when "--detect-apache2" PhusionPassenger.require_passenger_lib 'platform_info/apache_detector' detector = PhusionPassenger::PlatformInfo::ApacheDetector.new(STDOUT) STDOUT.write(Utils::AnsiColors::DEFAULT_TERMINAL_COLOR) STDOUT.flush begin detector.detect_all detector.report ensure detector.finish STDOUT.write(Utils::AnsiColors::RESET) STDOUT.flush end when "--ruby-command" PhusionPassenger.require_passenger_lib 'platform_info/ruby' ruby = PhusionPassenger::PlatformInfo.ruby_command puts "passenger-config was invoked through the following Ruby interpreter:" puts " Command: #{ruby}" STDOUT.write " Version: " STDOUT.flush system("/bin/sh -c '#{ruby} -v'") puts " To use in Apache: PassengerRuby #{ruby}" puts " To use in Nginx : passenger_ruby #{ruby}" puts " To use with Standalone: #{ruby} #{PhusionPassenger.bin_dir}/passenger start" puts ruby = PhusionPassenger::PlatformInfo.find_command('ruby') if ruby && !ruby.include?("rvm/rubies/") # If this is an RVM Ruby executable then we don't show it. We want people to # use the RVM wrapper scripts only. puts "The following Ruby interpreter was found first in $PATH:" puts " Command: #{ruby}" STDOUT.write " Version: " STDOUT.flush system("/bin/sh -c '#{ruby} -v'") puts " To use in Apache: PassengerRuby #{ruby}" puts " To use in Nginx : passenger_ruby #{ruby}" puts " To use with Standalone: #{ruby} #{PhusionPassenger.bin_dir}/passenger start" elsif !ruby.include?("rvm/rubies/") puts "No Ruby interpreter found in $PATH." end puts puts "## Notes for RVM users" puts "Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'." when "--rubyext-compat-id" PhusionPassenger.require_passenger_lib 'platform_info/binary_compatibility' puts PhusionPassenger::PlatformInfo.ruby_extension_binary_compatibility_id when "--cxx-compat-id" PhusionPassenger.require_passenger_lib 'platform_info/binary_compatibility' puts PhusionPassenger::PlatformInfo.cxx_binary_compatibility_id when "--version" puts PhusionPassenger::VERSION_STRING when "--help" self.class.help else self.class.help exit 1 end end private def common_library PhusionPassenger.require_passenger_lib 'common_library' return COMMON_LIBRARY. only(*NGINX_LIBS_SELECTOR). set_output_dir("#{PhusionPassenger.lib_dir}/common/libpassenger_common") end end end # module Config end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/config/command.rb000644 000765 000024 00000003342 12233035540 023730 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger module Config class Command def self.description return nil end def initialize(argv) @argv = argv.dup @options = self.class.create_default_options end private def self.create_default_options return {} end def parse_options @parser = self.class.create_option_parser(@options) begin @parser.parse!(@argv) rescue OptionParser::ParseError => e abort @parser.to_s end if @options[:help] puts @parser exit end end end end # module Config end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/config/detach_process_command.rb000644 000765 000024 00000006125 12233035540 027000 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'optparse' PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'admin_tools/server_instance' PhusionPassenger.require_passenger_lib 'config/command' PhusionPassenger.require_passenger_lib 'config/utils' module PhusionPassenger module Config class DetachProcessCommand < Command include PhusionPassenger::Config::Utils def self.description return "Detach an application process from the process pool" end def run parse_options select_passenger_instance @admin_client = connect_to_passenger_admin_socket(:role => :passenger_status) perform_detach end private def self.create_option_parser(options) OptionParser.new do |opts| nl = "\n" + ' ' * 37 opts.banner = "Usage: passenger-config detach-process [OPTIONS] \n" opts.separator "" opts.separator " Remove an application process from the #{PROGRAM_NAME} process pool." opts.separator " Has a similar effect to killing the application process directly with" opts.separator " `kill `, but killing directly may cause the HTTP client to see an" opts.separator " error, while using this command guarantees that clients see no errors." opts.separator "" opts.separator "Options:" opts.on("--instance INSTANCE_PID", Integer, "The #{PROGRAM_NAME} instance to select") do |value| options[:instance] = value end opts.on("-h", "--help", "Show this help") do options[:help] = true end end end def help puts @parser end def parse_options super if @argv.empty? abort "Please pass a PID. " + "See --help for more information." elsif @argv.size == 1 @pid = @argv[0].to_i elsif @argv.size > 1 help abort end end def perform_detach if @admin_client.pool_detach_process(@pid) puts "Process #{@pid} detached." else abort "Could not detach process #{@pid}." end end end end # module Config end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/config/main.rb000644 000765 000024 00000007406 12233035540 023243 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'constants' module PhusionPassenger # Core of the `passenger-config` command. Dispatches a subcommand to a specific class. module Config KNOWN_COMMANDS = [ ["detach-process", "DetachProcessCommand"], ["restart-app", "RestartAppCommand"], ["validate-install", "ValidateInstallCommand"], ["about", "AboutCommand"] ] ABOUT_OPTIONS = [ "root", "includedir", "nginx-addon-dir", "nginx-libs", "compiled", "natively-packaged", "installed-from-release-package", "make-locations-ini", "detect-apache2", "ruby-command", "ruby-libdir", "rubyext-compat-id", "cxx-compat-id", "version" ] def self.run!(argv) command_class, new_argv = lookup_command_class_by_argv(argv) if help_requested?(argv) help elsif command_class command = command_class.new(new_argv) command.run else help abort end end def self.help puts "Usage: passenger-config [options]" puts "Tool for controlling or configurating a #{PROGRAM_NAME} instance or installation." puts puts "Available commands:" KNOWN_COMMANDS.each do |props| command_class = lookup_command_class_by_class_name(props[1]) printf " %-18s %s\n", props[0], command_class.description end puts puts "Type 'passenger-config --help' for more information." end private def self.help_requested?(argv) return argv.size == 1 && (argv[0] == "--help" || argv[0] == "-h" || argv[0] == "help") end def self.lookup_command_class_by_argv(argv) return nil if argv.empty? # Compatibility with version <= 4.0.29: try to pass all # --switch invocations to AboutCommand. if argv[0] =~ /^--/ name = argv[0].sub(/^--/, '') if ABOUT_OPTIONS.include?(name) command_class = lookup_command_class_by_class_name("AboutCommand") return [command_class, argv] else return nil end end # Convert "passenger-config help " to "passenger-config --help". if argv.size == 2 && argv[0] == "help" argv = [argv[1], "--help"] end KNOWN_COMMANDS.each do |props| if argv[0] == props[0] command_class = lookup_command_class_by_class_name(props[1]) new_argv = argv[1 .. -1] return [command_class, new_argv] end end return nil end def self.lookup_command_class_by_class_name(class_name) base_name = class_name.gsub(/[A-Z]/) do |match| "_" + match[0..0].downcase end base_name.sub!(/^_/, '') base_name << ".rb" PhusionPassenger.require_passenger_lib("config/#{base_name}") return PhusionPassenger::Config.const_get(class_name) end end end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/config/restart_app_command.rb000644 000765 000024 00000012101 12233035540 026325 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'optparse' PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'admin_tools/server_instance' PhusionPassenger.require_passenger_lib 'config/command' PhusionPassenger.require_passenger_lib 'config/utils' module PhusionPassenger module Config class RestartAppCommand < Command include PhusionPassenger::Config::Utils def self.description return "Restart an application" end def run parse_options select_passenger_instance @admin_client = connect_to_passenger_admin_socket(:role => :passenger_status) select_app_group_name perform_restart end private def self.create_option_parser(options) OptionParser.new do |opts| nl = "\n" + ' ' * 37 opts.banner = "Usage 1: passenger-config restart-app [OPTIONS]\n" + "Usage 2: passenger-config restart-app --name [OPTIONS]" opts.separator "" opts.separator " Restart an application. The syntax determines how the application that is to" opts.separator " be restarted, will be selected." opts.separator "" opts.separator " 1. Selects all applications whose paths begin with the given prefix." opts.separator "" opts.separator " Example: passenger-config restart-app /webapps" opts.separator " Restarts all apps whose path begin with /webapps, such as /webapps/foo," opts.separator " /webapps/bar and /webapps123." opts.separator "" opts.separator " 2. Selects a specific application based on an exact match of its app group" opts.separator " name." opts.separator "" opts.separator " Example: passenger-config restart-app --name /webapps/foo" opts.separator " Restarts only /webapps/foo, but not for example /webapps/foo/bar or" opts.separator " /webapps/foo123." opts.separator "" opts.separator "Options:" opts.on("--name APP_GROUP_NAME", String, "The app group name to select") do |value| options[:app_group_name] = value end opts.on("--rolling-restart", "Perform a rolling restart instead of a#{nl}" + "regular restart (Enterprise only). The#{nl}" + "default is a blocking restart") do |value| if Config::Utils.is_enterprise? options[:rolling_restart] = true else abort "--rolling-restart is only available in #{PROGRAM_NAME} Enterprise: #{ENTERPRISE_URL}" end end opts.on("--instance PID", Integer, "The #{PROGRAM_NAME} instance to select") do |value| options[:instance] = value end opts.on("-h", "--help", "Show this help") do options[:help] = true end end end def help puts @parser end def parse_options super case @argv.size when 0 if !@options[:app_group_name] abort "Please pass either an app path prefix or an app group name. " + "See --help for more information." end when 1 if @options[:app_group_name] abort "You've passed an app path prefix, but you cannot also pass an " + "app group name. Please use only either one of them. See --help " + "for more information." end else help abort end end def select_app_group_name groups = @server_instance.groups(@admin_client) if app_group_name = @options[:app_group_name] @groups = [groups.find { |g| g.name == app_group_name }] if !@groups[0] abort "There is no #{PROGRAM_NAME}-served application running with the app group name '#{app_group_name}'." end else regex = /^#{Regexp.escape(@argv.first)}/ @groups = groups.find_all { |g| g.app_root =~ regex } if @groups.empty? abort "There are no #{PROGRAM_NAME}-served applications running whose paths begin with '#{@argv.first}'." end end end def perform_restart restart_method = @options[:rolling_restart] ? "rolling" : "blocking" @groups.each do |group| puts "Restarting #{group.name}" @admin_client.restart_app_group(group.name, :method => restart_method) end end end end # module Config end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/config/utils.rb000644 000765 000024 00000010063 12233035540 023450 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'constants' module PhusionPassenger module Config module Utils extend self # Make methods available as class methods. def self.included(klass) # When included into another class, make sure that Utils # methods are made private. public_instance_methods(false).each do |method_name| klass.send(:private, method_name) end end def select_passenger_instance if pid = @options[:instance] @server_instance = AdminTools::ServerInstance.for_pid(pid) if !@server_instance puts "*** ERROR: there doesn't seem to be a #{PROGRAM_NAME} instance running on PID #{pid}." list_all_passenger_instances(AdminTools::ServerInstance.list) puts puts "Please pass `--instance <#{PROGRAM_NAME}> PID>` to select a specific #{PROGRAM_NAME} instance." abort end else server_instances = AdminTools::ServerInstance.list if server_instances.empty? abort "*** ERROR: Phusion Passenger doesn't seem to be running." elsif server_instances.size == 1 @server_instance = server_instances.first else complain_that_multiple_passenger_instances_are_running(server_instances) abort end end end def complain_that_multiple_passenger_instances_are_running(server_instances) puts "It appears that multiple #{PROGRAM_NAME} instances are running. Please select" puts "a specific one by passing:" puts puts " --instance <#{PROGRAM_NAME} PID>" puts list_all_passenger_instances(server_instances) abort end def list_all_passenger_instances(server_instances) puts "The following #{PROGRAM_NAME} instances are running:" server_instances.each do |instance| begin description = instance.web_server_description rescue Errno::EACCES, Errno::ENOENT description = nil end printf " PID: %-8s %s\n", instance.pid, description end end def connect_to_passenger_admin_socket(options) return @server_instance.connect(options) rescue AdminTools::ServerInstance::RoleDeniedError PhusionPassenger.require_passenger_lib 'platform_info/ruby' STDERR.puts "*** ERROR: You are not authorized to query the status for " + "this #{PROGRAM_NAME} instance. Please try again with '#{PlatformInfo.ruby_sudo_command}'." exit 2 rescue AdminTools::ServerInstance::CorruptedDirectoryError STDERR.puts "*** ERROR: The server instance directory #{server_instance.path} is corrupted. " + "This could have two causes:\n" + "\n" + " 1. The #{PROGRAM_NAME} instance is no longer running, but it failed to cleanup the directory. " + "Please delete this directory and ignore the problem.\n" + " 2. An external program corrupted the directory. Please restart this #{PROGRAM_NAME} instance.\n" exit 2 end def is_enterprise? return defined?(PhusionPassenger::PASSENGER_IS_ENTERPRISE) && PhusionPassenger::PASSENGER_IS_ENTERPRISE end end end # module Config end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/config/validate_install_command.rb000644 000765 000024 00000014023 12233035540 027325 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'config/command' module PhusionPassenger module Config class ValidateInstallCommand < Command # Signifies that there is at least 1 error. FAIL_EXIT_CODE = 1 # Signifies that there are no error, but at least 1 warning. WARN_EXIT_CODE = 2 def self.description return "Validate this #{PROGRAM_NAME} installation" end def self.help puts "Usage: passenger-config validate-install" puts "Validate this #{PROGRAM_NAME} installation." puts puts "Exit codes:" puts " 0 - All checks passed. No errors, no warnings." puts " #{FAIL_EXIT_CODE} - There are some errors." puts " #{WARN_EXIT_CODE} - There are no errors, but there are some warnings." end def run if @argv[0] == '--help' self.class.help exit elsif @argv.size > 0 self.class.help exit 1 end begin require 'rubygems' rescue LoadError end PhusionPassenger.require_passenger_lib 'utils/ansi_colors' PhusionPassenger.require_passenger_lib 'platform_info' @error_count = 0 @warning_count = 0 prepare_terminal begin check_tools_in_path check_no_other_installs_in_path exit(FAIL_EXIT_CODE) if @error_count > 0 exit(WARN_EXIT_CODE) if @warning_count > 0 ensure reset_terminal end end private def prepare_terminal STDOUT.write(Utils::AnsiColors::DEFAULT_TERMINAL_COLOR) STDOUT.flush end def reset_terminal STDOUT.write(Utils::AnsiColors::RESET) STDOUT.flush end def check_tools_in_path checking "whether this #{PROGRAM_NAME} install is in PATH" paths = ENV['PATH'].to_s.split(':') if paths.include?(gem_bindir) || paths.include?(homebrew_bindir) || paths.include?(PhusionPassenger.bin_dir) check_ok else check_warning suggest %Q{ Please add #{PhusionPassenger.bin_dir} to PATH. Otherwise you will get "command not found" errors upon running passenger-status and other tools. Learn more at about PATH at: #{NGINX_DOC_URL}#_the_path_environment_variable } end end def check_no_other_installs_in_path logn " * Checking whether there are no other #{PROGRAM_NAME} installations... " paths = ENV['PATH'].to_s.split(':') if Process.uid == 0 && (sudo_user = ENV['SUDO_USER']) && (bash = PlatformInfo.find_command("bash")) && PlatformInfo.find_command("sudo") # If we were invoked through sudo then we need to check the original user's PATH too. output = `sudo -u #{sudo_user} #{bash} -lc 'echo; echo PATH FOLLOWS; echo "$PATH"' 2>&1` output.sub!(/.*\nPATH FOLLOWS\n/m, '') output.strip! paths.concat(output.split(':')) end paths.delete(gem_bindir) paths.delete(homebrew_bindir) paths.delete(PhusionPassenger.bin_dir) # These may not be in PATH if the user did not run this command through sudo. paths << "/usr/bin" paths << "/usr/sbin" paths.uniq! other_installs = [] paths.each do |path| filename = "#{path}/passenger-config" if File.exist?(filename) other_installs << filename end end if other_installs.empty? check_ok else check_warning suggest %Q{ Besides this #{PROGRAM_NAME} installation, the following other #{PROGRAM_NAME} installations have been detected: #{other_installs.join("\n\t\t\t\t ")} Please uninstall them to avoid confusion or conflicts. } end end # Returns the RubyGems bin dir, if Phusion Passenger is installed through RubyGems. def gem_bindir if defined?(Gem) && PhusionPassenger.originally_packaged? && PhusionPassenger.source_root =~ /^#{Regexp.escape Gem.dir}\// && File.exist?("#{Gem.bindir}/passenger-config") return Gem.bindir else return nil end end # Returns the Homebrew bin dir, if Phusion Passenger is installed through Homebrew. def homebrew_bindir if PhusionPassenger.native_packaging_method == "homebrew" return "/usr/local/bin" else return nil end end def logn(message) if STDOUT.tty? STDOUT.write(Utils::AnsiColors.ansi_colorize(message)) else STDOUT.write(Utils::AnsiColors.strip_color_tags(message)) end STDOUT.flush end def log(message) if STDOUT.tty? STDOUT.puts(Utils::AnsiColors.ansi_colorize(message)) else STDOUT.puts(Utils::AnsiColors.strip_color_tags(message)) end end def checking(message) logn " * Checking #{message}... " end def check_ok(message = "✓") log "#{message}" end def check_error(message = "✗") log "#{message}" @error_count += 1 end def check_warning(message = "(!)") log "#{message}" @warning_count += 1 end def suggest(message) puts log reindent(unindent(message), 3) puts end def unindent(text) return PlatformInfo.send(:unindent, text) end def reindent(text, level) return PlatformInfo.send(:reindent, text, level) end end end # module Config end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/classic_rails/cgi_fixed.rb000644 000765 000024 00000004104 12233035540 025576 0ustar00honglistaff000000 000000 # NOTE: This code is based on cgi_fixed.rb from Zed Shaw's scgi_rails # package, version 0.4.3. The license of this single file is as follows: # # Copyright (c) 2004 Zed A. Shaw # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # We also made some small local modifications. require 'cgi' module PhusionPassenger module ClassicRails # Modifies CGI so that we can use it. Main thing it does is expose # the stdinput and stdoutput so RequestHandler can connect them to # the right sources. It also exposes the env_table so that RequestHandler # can hook the request parameters into the environment table. # # This is partially based on the FastCGI code, but much of the Ruby 1.6 # backwards compatibility is removed. class CGIFixed < ::CGI public :env_table def initialize(params, input, output, *args) @env_table = params @args = *args @input = input @out = output super(*args) end def args @args end def env_table @env_table end def stdinput @input end def stdoutput @out end end end # module ClassicRails end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/classic_rails/thread_handler_extension.rb000644 000765 000024 00000003310 12233035540 030713 0ustar00honglistaff000000 000000 # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'classic_rails/cgi_fixed' module PhusionPassenger module ClassicRails module ThreadHandlerExtension def process_request(env, connection, socket_wrapper, full_http_response) cgi = CGIFixed.new(env, connection, connection) ::Dispatcher.dispatch(cgi, ::ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS, cgi.stdoutput) return false # Socket hijacking not supported. end end end # module ClassicRails end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/apache2/config_options.rb000644 000765 000024 00000013567 12233035540 025402 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # This file defines all supported Apache per-directory configuration options. The # build system automatically generates the corresponding Apache module boilerplate # code from the definitions in this file. # # Main configuration options are not defined in this file, but are defined in # ext/apache2/Configuraion.cpp instead. # # The following boilerplate code is generated: # # * command_rec array members (ConfigurationCommands.cpp.erb) # # Options: # # * name - The configuration option name. Required. # * context - The context in which this configuration option is valid. # Defaults to ["OR_OPTIONS", "ACCESS_CONF", "RSRC_CONF"] # * type - This configuration option's value type. Allowed types: # :string, :integer, :flag # * min_value - If `type` is :integer, then this specifies the minimum # allowed value. When nil (the default), there is no minimum. # * desc - A description for this configuration option. Required. # * header - The name of the corresponding CGI header. By default CGI header # generation code is automatically generated, using the configuration # option's name in uppercase as the CGI header name. # Setting this to nil will disable auto-generation of CGI header # generation code. You are then responsible for writing CGI header # passing code yourself in Hooks.cpp. APACHE2_DIRECTORY_CONFIGURATION_OPTIONS = [ { :name => "PassengerRuby", :type => :string, :desc => "The Ruby interpreter to use.", :header_expression => "config->ruby ? config->ruby : serverConfig.defaultRuby" }, { :name => "PassengerPython", :type => :string, :desc => "The Python interpreter to use." }, { :name => "PassengerNodejs", :type => :string, :desc => "The Node.js command to use." }, { :name => "PassengerAppEnv", :type => :string, :desc => "The environment under which applications are run." }, { :name => "RailsEnv", :type => :string, :desc => "The environment under which applications are run.", :alias_for => "PassengerAppEnv" }, { :name => "RackEnv", :type => :string, :desc => "The environment under which applications are run.", :alias_for => "PassengerAppEnv" }, { :name => "PassengerMinInstances", :type => :integer, :context => ["OR_LIMIT", "ACCESS_CONF", "RSRC_CONF"], :min_value => 0, :header => "PASSENGER_MIN_PROCESSES", :desc => "The minimum number of application instances to keep when cleaning idle instances." }, { :name => "PassengerMaxInstancesPerApp", :type => :integer, :context => ["RSRC_CONF"], :header => "PASSENGER_MAX_PROCESSES", :desc => "The maximum number of simultaneously alive application instances a single application may occupy." }, { :name => "PassengerUser", :type => :string, :context => ["ACCESS_CONF", "RSRC_CONF"], :desc => "The user that Ruby applications must run as." }, { :name => "PassengerGroup", :type => :string, :context => ["ACCESS_CONF", "RSRC_CONF"], :desc => "The group that Ruby applications must run as." }, { :name => "PassengerErrorOverride", :type => :flag, :context => ["OR_ALL"], :desc => "Allow Apache to handle error response.", :header => nil }, { :name => "PassengerMaxRequests", :type => :integer, :context => ["OR_LIMIT", "ACCESS_CONF", "RSRC_CONF"], :min_value => 0, :desc => "The maximum number of requests that an application instance may process." }, { :name => "PassengerStartTimeout", :type => :integer, :context => ["OR_LIMIT", "ACCESS_CONF", "RSRC_CONF"], :min_value => 1, :desc => "A timeout for application startup." }, { :name => "PassengerHighPerformance", :type => :flag, :context => ["OR_ALL"], :desc => "Enable or disable Passenger's high performance mode.", :header => nil }, { :name => "PassengerEnabled", :type => :flag, :context => ["OR_ALL"], :desc => "Enable or disable Phusion Passenger.", :header => nil }, { :name => "PassengerMaxRequestQueueSize", :type => :integer, :min_value => 0, :context => ["OR_ALL"], :desc => "The maximum number of queued requests." }, { :name => "PassengerLoadShellEnvvars", :type => :flag, :desc => "Whether to load environment variables from the shell before running the application." }, { :name => "PassengerBufferUpload", :type => :flag, :context => ["OR_ALL"], :desc => "Whether to buffer file uploads.", :header => nil }, { :name => 'PassengerAppType', :type => :string, :context => ["OR_ALL"], :desc => "Force specific application type.", :header => nil }, { :name => 'PassengerStartupFile', :context => ["OR_ALL"], :desc => "Force specific startup file.", :type => :string } ] passenger-4.0.37/lib/phusion_passenger/admin_tools/memory_stats.rb000644 000765 000024 00000020712 12233035540 026103 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'platform_info/apache' PhusionPassenger.require_passenger_lib 'platform_info/operating_system' module PhusionPassenger module AdminTools class MemoryStats # Information about a single process. class Process attr_accessor :pid attr_accessor :ppid attr_accessor :threads attr_accessor :vm_size # in KB attr_accessor :rss # in KB attr_accessor :cpu attr_accessor :name attr_accessor :private_dirty_rss # in KB def vm_size_in_mb return sprintf("%.1f MB", vm_size / 1024.0) end def rss_in_mb return sprintf("%.1f MB", rss / 1024.0) end def private_dirty_rss_in_mb if private_dirty_rss.is_a?(Numeric) return sprintf("%.1f MB", private_dirty_rss / 1024.0) else return "?" end end def to_a return [pid, ppid, vm_size_in_mb, private_dirty_rss_in_mb, rss_in_mb, name] end end # Returns a list of Apache processes, which may be the empty list if Apache is # not running. If the Apache executable name is unknown then nil will be returned. def apache_processes @apache_processes ||= begin if PlatformInfo.httpd processes = list_processes(:exe => PlatformInfo.httpd) if processes.empty? # On some Linux distros, the Apache worker processes # are called "httpd.worker" processes = list_processes(:exe => "#{PlatformInfo.httpd}.worker") end processes else nil end end end # Returns a list of Nginx processes, which may be the empty list if # Nginx is not running. def nginx_processes @nginx_processes ||= list_processes(:exe => "nginx") end # Returns a list of Phusion Passenger processes, which may be the empty list if # Phusion Passenger is not running. def passenger_processes @passenger_processes ||= list_processes(:match => /((^| )Passenger|(^| )Rails:|(^| )Rack:|wsgi-loader.py)/) end # Returns the sum of the memory usages of all given processes. # Returns a pair [usage, accurate]. +usage+ is the summed memory usage in KB, # and +accurate+ indicates whether this sum is accurate. This may be false # if some process's memory usage cannot be determined. def sum_memory_usage(processes) total = 0 if should_show_private_dirty_rss? accurate = true processes.each do |p| if p.private_dirty_rss.is_a?(Numeric) total += p.private_dirty_rss else accurate = true end end return [total, accurate] else processes.each do |p| total += p.rss end return [total, true] end end def platform_provides_private_dirty_rss_information? return os_name == "linux" end # Returns whether root privileges are required in order to measure private dirty RSS. # Only meaningful if #platform_provides_private_dirty_rss_information? returns true. def root_privileges_required_for_private_dirty_rss? all_processes = (apache_processes || []) + nginx_processes + passenger_processes return all_processes.any?{ |p| p.private_dirty_rss.nil? } end def should_show_private_dirty_rss? return platform_provides_private_dirty_rss_information? && (::Process.euid == 0 || root_privileges_required_for_private_dirty_rss?) end # Determine the system's RAM usage, not including swap. # Returns a tuple [total, used] where both numbers are in KB, or nil # if the system's RAM usage cannot be determined. def system_ram_usage @total_system_ram ||= begin case os_name when /linux/ free_text = `free -k` free_text =~ %r{Mem:(.+)$} line = $1.strip total = line.split(/ +/).first.to_i free_text =~ %r{buffers/cache:(.+)$} line = $1.strip used = line.split(/ +/).first.to_i [total, used] when /macosx/ vm_stat = `vm_stat` vm_stat =~ /page size of (\d+) bytes/ page_size = $1 vm_stat =~ /Pages free: +(\d+)/ free = $1 vm_stat =~ /Pages active: +(\d+)/ active = $1 vm_stat =~ /Pages inactive: +(\d+)/ inactive = $1 vm_stat =~ /Pages wired down: +(\d+)/ wired = $1 if page_size && free && active && inactive && wired page_size = page_size.to_i free = free.to_i * page_size / 1024 active = active.to_i * page_size / 1024 inactive = inactive.to_i * page_size / 1024 wired = wired.to_i * page_size / 1024 used = active + wired [free + inactive + used, used] else nil end else `top` =~ /(\d+)(K|M) Active, (\d+)(K|M) Inact, (\d+)(K|M) Wired,.*?(\d+)(K|M) Free/ if $1 && $2 && $3 && $4 && $5 && $6 && $7 && $8 to_kb = lambda do |number, unit| if unit == 'K' number.to_i else number.to_i * 1024 end end active = to_kb.call($1, $2) inactive = to_kb.call($3, $4) wired = to_kb.call($5, $6) free = to_kb.call($7, $8) used = active + wired [free + inactive + used, used] else nil end end end end private def os_name return PlatformInfo.os_name end # Returns a list of Process objects that match the given search criteria. # # # Search by executable path. # list_processes(:exe => '/usr/sbin/apache2') # # # Search by executable name. # list_processes(:name => 'ruby1.8') # # # Search by process name. # list_processes(:match => 'Passenger FrameworkSpawner') def list_processes(options) if options[:exe] name = options[:exe].sub(/.*\/(.*)/, '\1') if os_name =~ /linux/ ps = "ps -C '#{name}'" else ps = "ps -A" options[:match] = Regexp.new(Regexp.escape(name)) end elsif options[:name] if os_name =~ /linux/ ps = "ps -C '#{options[:name]}'" else ps = "ps -A" options[:match] = Regexp.new(" #{Regexp.escape(options[:name])}") end elsif options[:match] ps = "ps -A" else raise ArgumentError, "Invalid options." end processes = [] case os_name when /solaris/ list = `#{ps} -o pid,ppid,nlwp,vsz,rss,pcpu,comm`.split("\n") threads_known = true when /macosx/ list = `#{ps} -w -o pid,ppid,vsz,rss,%cpu,command`.split("\n") threads_known = false else list = `#{ps} -w -o pid,ppid,nlwp,vsz,rss,%cpu,command`.split("\n") threads_known = true end list.shift list.each do |line| line.gsub!(/^ */, '') line.gsub!(/ *$/, '') p = Process.new if threads_known p.pid, p.ppid, p.threads, p.vm_size, p.rss, p.cpu, p.name = line.split(/ +/, 7) else p.pid, p.ppid, p.vm_size, p.rss, p.cpu, p.name = line.split(/ +/, 6) end p.name.sub!(/\Aruby: /, '') p.name.sub!(/ \(ruby\)\Z/, '') if p.name !~ /^ps/ && (!options[:match] || p.name.match(options[:match])) # Convert some values to integer. [:pid, :ppid, :vm_size, :rss].each do |attr| p.send("#{attr}=", p.send(attr).to_i) end p.threads = p.threads.to_i if threads_known if platform_provides_private_dirty_rss_information? p.private_dirty_rss = determine_private_dirty_rss(p.pid) end processes << p end end return processes end # Returns the private dirty RSS for the given process, in KB. def determine_private_dirty_rss(pid) total = 0 File.read("/proc/#{pid}/smaps").split("\n").each do |line| line =~ /^(Private)_Dirty: +(\d+)/ if $2 total += $2.to_i end end if total == 0 return nil else return total end rescue Errno::EACCES, Errno::ENOENT return nil end end end # module AdminTools end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/admin_tools/server_instance.rb000644 000765 000024 00000024145 12233035540 026553 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'rexml/document' require 'fileutils' require 'socket' require 'ostruct' PhusionPassenger.require_passenger_lib 'admin_tools' PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'utils' PhusionPassenger.require_passenger_lib 'message_channel' PhusionPassenger.require_passenger_lib 'message_client' module PhusionPassenger module AdminTools class ServerInstance STALE_TIME_THRESHOLD = 60 class StaleDirectoryError < StandardError end class CorruptedDirectoryError < StandardError end class GenerationsAbsentError < StandardError end class UnsupportedGenerationStructureVersionError < StandardError end class RoleDeniedError < StandardError end class Stats attr_accessor :max, :usage, :get_wait_list_size end class Group attr_reader :app_root, :name, :environment, :spawning, :processes alias spawning? spawning def initialize(app_root, name, environment, spawning) @app_root = app_root @name = name @environment = environment @spawning = spawning @processes = [] end end class Process attr_reader :group attr_accessor :pid, :gupid, :sessions, :processed, :uptime, :server_sockets, :has_metrics, :cpu, :rss, :real_memory, :vmsize, :process_group_id, :command, :connect_password INT_PROPERTIES = [:pid, :sessions, :processed, :cpu, :rss, :real_memory, :vmsize, :process_group_id] BOOL_PROPERTIES = [:has_metrics] def initialize(group) @group = group @server_sockets = {} end def connect(socket_name = :main) socket_info = @server_sockets[socket_name] if !socket_info raise "This process has no server socket named '#{socket_name}'." end return Utils.connect_to_server(socket_info.address) if socket_info.address_type == 'unix' return UNIXSocket.new(socket_info.address) else host, port = socket_info.address.split(':', 2) return TCPSocket.new(host, port.to_i) end end def has_metrics? return @has_metrics end end attr_reader :path attr_reader :generation_path attr_reader :pid def self.list(options = {}) options = { :clean_stale_or_corrupted => true }.merge(options) instances = [] Dir["#{AdminTools.tmpdir}/passenger.*"].each do |dir| next if File.basename(dir) !~ /passenger\.#{PhusionPassenger::SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION}\.(\d+)\.(.+)\Z/ minor = $1 next if minor.to_i > PhusionPassenger::SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION begin instances << ServerInstance.new(dir) rescue StaleDirectoryError, CorruptedDirectoryError if options[:clean_stale_or_corrupted] && File.stat(dir).mtime < current_time - STALE_TIME_THRESHOLD log_cleaning_action(dir) FileUtils.chmod_R(0700, dir) rescue nil FileUtils.rm_rf(dir) end rescue UnsupportedGenerationStructureVersionError, GenerationsAbsentError # Do nothing. end end return instances end def self.for_pid(pid, options = {}) return list(options).find { |c| c.pid == pid } end def initialize(path) raise ArgumentError, "Path may not be nil." if path.nil? @path = path if File.exist?("#{path}/control_process.pid") data = File.read("#{path}/control_process.pid").strip @pid = data.to_i else path =~ /passenger\.\d+\.\d+\.(\d+)\Z/ @pid = $1.to_i end generations = Dir["#{path}/generation-*"] if generations.empty? raise GenerationsAbsentError, "There are no generation subdirectories in this instance directory." end highest_generation_number = 0 generations.each do |generation| File.basename(generation) =~ /(\d+)/ generation_number = $1.to_i if generation_number > highest_generation_number highest_generation_number = generation_number end end @generation_path = "#{path}/generation-#{highest_generation_number}" if !File.exist?("#{@generation_path}/structure_version.txt") raise CorruptedDirectoryError, "The generation directory doesn't contain a structure version specification file." end version_data = File.read("#{@generation_path}/structure_version.txt").strip major, minor = version_data.split(".", 2) if major.nil? || minor.nil? || major !~ /\A\d+\Z/ || minor !~ /\A\d+\Z/ raise CorruptedDirectoryError, "The generation directory doesn't contain a valid structure version specification file." end major = major.to_i minor = minor.to_i if major != PhusionPassenger::SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION || minor > PhusionPassenger::SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION raise UnsupportedGenerationStructureVersionError, "Unsupported generation directory structure version." end if @pid == 0 raise CorruptedDirectoryError, "Instance directory contains corrupted control_process.pid file." elsif !AdminTools.process_is_alive?(@pid) raise StaleDirectoryError, "There is no instance with PID #{@pid}." end end # Raises: # - +ArgumentError+: Unsupported role # - +RoleDeniedError+: The user that the current process is as is not authorized to utilize the given role. # - +EOFError+: The server unexpectedly closed the connection during authentication. # - +SecurityError+: The server denied our authentication credentials. def connect(options) if options[:role] username, password, default_socket_name = infer_connection_info_from_role(options[:role]) socket_name = options[:socket_name] || default_socket_name else username = options[:username] password = options[:password] socket_name = options[:socket_name] || "helper_admin" raise ArgumentError, "Either the :role or :username must be set" if !username raise ArgumentError, ":password must be set" if !password end client = MessageClient.new(username, password, "unix:#{@generation_path}/#{socket_name}") if block_given? begin yield client ensure client.close end else return client end end def web_server_description return File.read("#{@generation_path}/web_server.txt") end def web_server_config_files config_files = File.read("#{@generation_path}/config_files.txt").split("\n") config_files.map! do |filename| filename.strip end config_files.reject do |filename| filename.empty? end return config_files end def helper_agent_pid return File.read("#{@generation_path}/helper_agent.pid").strip.to_i end def analytics_log_dir return File.read("#{@generation_path}/analytics_log_dir.txt") rescue Errno::ENOENT return nil end def stats(client) doc = REXML::Document.new(client.pool_xml) stats = Stats.new stats.max = doc.elements["info/max"].text.to_i stats.usage = doc.elements["info/usage"].text.to_i stats.get_wait_list_size = doc.elements["info/get_wait_list_size"].text.to_i return stats end def get_wait_list_size(client) return stats(client).get_wait_list_size end def groups(client) doc = REXML::Document.new(client.pool_xml) groups = [] doc.elements.each("info/supergroups/supergroup/group") do |group_xml| group = Group.new(group_xml.elements["app_root"].text, group_xml.elements["name"].text, group_xml.elements["environment"].text, !!group_xml.elements["spawning"]) group_xml.elements.each("processes/process") do |process_xml| process = Process.new(group) process_xml.elements.each do |element| if element.name == "sockets" element.elements.each("socket") do |server_socket| name = server_socket.elements["name"].text.to_sym address = server_socket.elements["address"].text protocol = server_socket.elements["protocol"].text process.server_sockets[name] = OpenStruct.new( :name => name, :address => address, :protocol => protocol ) end else if process.respond_to?("#{element.name}=") if Process::INT_PROPERTIES.include?(element.name.to_sym) value = element.text.to_i elsif Process::BOOL_PROPERTIES.include?(element.name.to_sym) value = element.text == "true" else value = element.text end process.send("#{element.name}=", value) end end end group.processes << process end groups << group end return groups end def processes(client) return groups(client).map do |group| group.processes end.flatten end private def self.log_cleaning_action(dir) puts "*** Cleaning stale folder #{dir}" end def self.current_time Time.now end def infer_connection_info_from_role(role) case role when :passenger_status username = "_passenger-status" begin filename = "#{@generation_path}/passenger-status-password.txt" password = File.open(filename, "rb") do |f| f.read end rescue Errno::EACCES raise RoleDeniedError rescue Errno::ENOENT raise CorruptedDirectoryError end return [username, password, "helper_admin"] else raise ArgumentError, "Unsupported role #{role}" end end class << self; private :log_cleaning_action private :current_time end end end # module AdminTools end # module PhusionPassenger passenger-4.0.37/lib/phusion_passenger/active_support3_extensions/init.rb000644 000765 000024 00000015721 12233035540 027425 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'constants' require 'digest/md5' module PhusionPassenger module ActiveSupport3Extensions def self.init!(options, user_options = {}) if !AnalyticsLogging.install!(options, user_options) # Remove code to save memory. PhusionPassenger::ActiveSupport3Extensions.send(:remove_const, :AnalyticsLogging) PhusionPassenger.send(:remove_const, :ActiveSupport3Extensions) end end end module ActiveSupport3Extensions class AnalyticsLogging < ActiveSupport::LogSubscriber def self.install!(options, user_options) analytics_logger = options["analytics_logger"] app_group_name = options["app_group_name"] return false if !analytics_logger || !options["analytics"] # If the Ruby interpreter supports GC statistics then turn it on # so that the info can be logged. GC.enable_stats if GC.respond_to?(:enable_stats) subscriber = self.new(user_options) AnalyticsLogging.attach_to(:action_controller, subscriber) AnalyticsLogging.attach_to(:active_record, subscriber) if defined?(ActiveSupport::Cache::Store) ActiveSupport::Cache::Store.instrument = true AnalyticsLogging.attach_to(:active_support, subscriber) end PhusionPassenger.on_event(:starting_request_handler_thread) do if defined?(ActiveSupport::Cache::Store) # This flag is thread-local. ActiveSupport::Cache::Store.instrument = true end end if defined?(ActionDispatch::DebugExceptions) exceptions_middleware = ActionDispatch::DebugExceptions elsif defined?(ActionDispatch::ShowExceptions) exceptions_middleware = ActionDispatch::ShowExceptions end if exceptions_middleware if defined?(Rails) Rails.application.middleware.insert_after( exceptions_middleware, ExceptionLogger, analytics_logger, app_group_name) end end if defined?(ActionController::Base) ActionController::Base.class_eval do include ACExtension end end if defined?(ActiveSupport::Benchmarkable) ActiveSupport::Benchmarkable.class_eval do include ASBenchmarkableExtension alias_method_chain :benchmark, :passenger end end return true end def initialize(options) install_event_preprocessor(options[:event_preprocessor]) if options[:event_preprocessor] end def process_action(event) log = Thread.current[PASSENGER_ANALYTICS_WEB_LOG] if log view_runtime = event.payload[:view_runtime] log.message("View rendering time: #{(view_runtime * 1000).to_i}") if view_runtime end end def sql(event) if log = Thread.current[PASSENGER_ANALYTICS_WEB_LOG] name = event.payload[:name] || "SQL" sql = event.payload[:sql] digest = Digest::MD5.hexdigest("#{name}\0#{sql}\0#{rand}") log.measured_time_points("DB BENCHMARK: #{digest}", event.time, event.end, "#{name}\n#{sql}") end end def cache_read(event) if event.payload[:hit] PhusionPassenger.log_cache_hit(nil, event.payload[:key]) else PhusionPassenger.log_cache_miss(nil, event.payload[:key]) end end def cache_fetch_hit(event) PhusionPassenger.log_cache_hit(nil, event.payload[:key]) end def cache_generate(event) PhusionPassenger.log_cache_miss(nil, event.payload[:key], event.duration * 1000) end class ExceptionLogger def initialize(app, analytics_logger, app_group_name) @app = app @analytics_logger = analytics_logger @app_group_name = app_group_name end def call(env) @app.call(env) rescue Exception => e log_analytics_exception(env, e) if env[PASSENGER_TXN_ID] raise e end private def log_analytics_exception(env, exception) log = @analytics_logger.new_transaction( @app_group_name, :exceptions, env[PASSENGER_UNION_STATION_KEY]) begin request = ActionDispatch::Request.new(env) if request.parameters['controller'] controller = request.parameters['controller'].humanize + "Controller" action = request.parameters['action'] end request_txn_id = env[PASSENGER_TXN_ID] message = exception.message message = exception.to_s if message.empty? message = [message].pack('m') message.gsub!("\n", "") backtrace_string = [exception.backtrace.join("\n")].pack('m') backtrace_string.gsub!("\n", "") if action && controller controller_action = "#{controller}##{action}" else controller_action = controller end log.message("Request transaction ID: #{request_txn_id}") log.message("Message: #{message}") log.message("Class: #{exception.class.name}") log.message("Backtrace: #{backtrace_string}") log.message("Controller action: #{controller_action}") if controller_action ensure log.close end end end module ACExtension def process_action(action, *args) log = request.env[PASSENGER_ANALYTICS_WEB_LOG] if log log.message("Controller action: #{self.class.name}##{action_name}") log.measure("framework request processing") do super end else super end end def render(*args) log = request.env[PASSENGER_ANALYTICS_WEB_LOG] if log log.measure("view rendering") do super end else super end end end module ASBenchmarkableExtension def benchmark_with_passenger(message = "Benchmarking", *args) log = Thread.current[PASSENGER_ANALYTICS_WEB_LOG] if log log.measure("BENCHMARK: #{message}") do benchmark_without_passenger(message, *args) do yield end end else benchmark_without_passenger(message, *args) do yield end end end end private def install_event_preprocessor(event_preprocessor) public_methods(false).each do |name| singleton = class << self; self end singleton.send(:define_method, name, lambda do |event| event_preprocessor.call(event) super(event) end) end end end # class AnalyticsLogging end # module ActiveSupport3Extensions end # module PhusionPassenger passenger-4.0.37/helper-scripts/backtrace-sanitizer.rb000755 000765 000024 00000007326 12233035540 023445 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # Parses output of the glibc backtrace() function and # translates addresses into function names and source # file locations. class Addr2line attr_reader :stdin, :stdout, :pid def initialize(filename) a, b = IO.pipe c, d = IO.pipe @pid = fork do STDIN.reopen(a) b.close STDOUT.reopen(d) c.close exec("addr2line", "-Cfie", filename) end a.close d.close @stdin = b @stdout = c @stdin.sync = @stdout.sync = true end def query(address) @stdin.write("#{address}\n") function = @stdout.readline source = @stdout.readline function.strip! source.strip! return [function, source] end def close @stdin.close @stdout.close Process.kill('KILL', @pid) Process.waitpid(@pid) rescue nil end end def passthrough(input, output) while !input.eof? data = input.readline output.write(data) output.flush end end input = STDIN output = STDERR output.sync = true output.puts "Using backtrace sanitizer." argv0, pid_or_filename = ARGV if pid_or_filename =~ /\A\d+\Z/ begin exe_filename = File.expand_path(File.readlink("/proc/#{pid_or_filename}/exe")) rescue Errno::ENOENT, Errno::EACCES => e warn "*** backtrace-sanitizer warning: #{e} -> passthrough input" passthrough(input, output) exit end else exe_filename = File.expand_path(pid_or_filename) end exe_basename = File.basename(exe_filename) addr2lines = {} begin while !input.eof? line = input.readline.strip # Example lines: # ./test() [0x400b64] # /lib/libc.so.6(__libc_start_main+0xfd) [0x7fcc0ad00c8d] if line =~ /(.*)\[(.*?)\]$/ # Split line into: # subject: /lib/libc.so.6(__libc_start_main+0xfd) # address: 0x7fcc0ad00c8d subject = $1 address = $2 subject.strip! subject =~ /(.*?)(\((.*?)\))?$/ # Split subject into: # file: /lib/libc.so.6 # context: __libc_start_main+0xfd file = $1 context = $3 file.strip! context = nil if context && context.empty? if file =~ /\A\// && File.exist?(file) filename = file elsif file == argv0 || file == exe_filename || file == exe_basename filename = exe_filename else filename = nil end if filename.nil? output.puts line else addr2line = (addr2lines[filename] ||= Addr2line.new(filename)) function, source = addr2line.query(address) new_context = "#{function} at #{source}" new_context << "; #{context}" if context output.puts "#{file}(#{new_context}) [#{address}]" end else output.puts line end end ensure addr2lines.each_value do |addr2line| addr2line.close end end passenger-4.0.37/helper-scripts/classic-rails-loader.rb000644 000765 000024 00000012740 12233035540 023506 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger module App def self.options return @@options end def self.format_exception(e) result = "#{e} (#{e.class})" if !e.backtrace.empty? if e.respond_to?(:html?) && e.html? require 'erb' if !defined?(ERB) result << "\n
  " << ERB::Util.h(e.backtrace.join("\n  ")) << "
" else result << "\n " << e.backtrace.join("\n ") end end return result end def self.exit_code_for_exception(e) if e.is_a?(SystemExit) return e.status else return 1 end end def self.handshake_and_read_startup_request STDOUT.sync = true STDERR.sync = true puts "!> I have control 1.0" abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n" @@options = {} while (line = STDIN.readline) != "\n" name, value = line.strip.split(/: */, 2) @@options[name] = value end end def self.init_passenger require "#{options["ruby_libdir"]}/phusion_passenger" PhusionPassenger.locate_directories(options["passenger_root"]) PhusionPassenger.require_passenger_lib 'native_support' PhusionPassenger.require_passenger_lib 'ruby_core_enhancements' PhusionPassenger.require_passenger_lib 'utils/tmpdir' PhusionPassenger.require_passenger_lib 'loader_shared_helpers' PhusionPassenger.require_passenger_lib 'request_handler' @@options = LoaderSharedHelpers.init(@@options) Utils.passenger_tmpdir = options["generation_dir"] if defined?(NativeSupport) NativeSupport.disable_stdio_buffering end rescue Exception => e LoaderSharedHelpers.about_to_abort(e) if defined?(LoaderSharedHelpers) puts "!> Error" puts "!> html: true" if e.respond_to?(:html?) && e.html? puts "!> " puts format_exception(e) exit exit_code_for_exception(e) end def self.load_app LoaderSharedHelpers.before_loading_app_code_step1('config/environment.rb', options) LoaderSharedHelpers.before_loading_app_code_step2(options) require File.expand_path('config/environment') require 'rails/version' if !defined?(Rails::VERSION) if Rails::VERSION::MAJOR >= 3 LoaderSharedHelpers.about_to_abort puts "!> Error" puts "!> " puts "!> This application is a Rails #{Rails::VERSION::MAJOR} " + "application, but it was wrongly detected as a Rails " + "1 or Rails 2 application. This is probably a bug in " + "Phusion Passenger, so please report it." exit 1 end if !defined?(Dispatcher) require 'dispatcher' end # - No point in preloading the application sources if the garbage collector # isn't copy-on-write friendly. # - Rails >= 2.2 already preloads application sources by default, so no need # to do that again. if GC.copy_on_write_friendly? && !rails_will_preload_app_code? # Rails 2.2+ uses application_controller.rb while old # versions use application.rb. require_dependency 'application' ['models','controllers','helpers'].each do |section| Dir.glob("app/#{section}}/*.rb").each do |file| require_dependency File.expand_path(file) end end end LoaderSharedHelpers.after_loading_app_code(options) if Rails::VERSION::STRING >= '2.3.0' PhusionPassenger.require_passenger_lib 'rack/thread_handler_extension' RequestHandler::ThreadHandler.send(:include, Rack::ThreadHandlerExtension) app = ActionController::Dispatcher.new else PhusionPassenger.require_passenger_lib 'classic_rails/thread_handler_extension' RequestHandler::ThreadHandler.send(:include, ClassicRails::ThreadHandlerExtension) app = nil end handler = RequestHandler.new(STDIN, options.merge("app" => app)) LoaderSharedHelpers.before_handling_requests(false, options) return handler rescue Exception => e LoaderSharedHelpers.about_to_abort(e) puts "!> Error" puts "!> html: true" if e.respond_to?(:html?) && e.html? puts "!> " puts format_exception(e) exit exit_code_for_exception(e) end def self.rails_will_preload_app_code? return ::Rails::Initializer.method_defined?(:load_application_classes) end ################## Main code ################## handshake_and_read_startup_request init_passenger handler = load_app LoaderSharedHelpers.advertise_readiness LoaderSharedHelpers.advertise_sockets(STDOUT, handler) puts "!> " handler.main_loop LoaderSharedHelpers.after_handling_requests end # module App end # module PhusionPassenger passenger-4.0.37/helper-scripts/classic-rails-preloader.rb000644 000765 000024 00000014466 12233035540 024224 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. GC.copy_on_write_friendly = true if GC.respond_to?(:copy_on_write_friendly=) module PhusionPassenger module App def self.options return @@options end def self.format_exception(e) result = "#{e} (#{e.class})" if !e.backtrace.empty? if e.respond_to?(:html?) && e.html? require 'erb' if !defined?(ERB) result << "\n
  " << ERB::Util.h(e.backtrace.join("\n  ")) << "
" else result << "\n " << e.backtrace.join("\n ") end end return result end def self.exit_code_for_exception(e) if e.is_a?(SystemExit) return e.status else return 1 end end def self.handshake_and_read_startup_request STDOUT.sync = true STDERR.sync = true puts "!> I have control 1.0" abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n" @@options = {} while (line = STDIN.readline) != "\n" name, value = line.strip.split(/: */, 2) @@options[name] = value end end def self.init_passenger require "#{options["ruby_libdir"]}/phusion_passenger" PhusionPassenger.locate_directories(options["passenger_root"]) PhusionPassenger.require_passenger_lib 'native_support' PhusionPassenger.require_passenger_lib 'ruby_core_enhancements' PhusionPassenger.require_passenger_lib 'utils/tmpdir' PhusionPassenger.require_passenger_lib 'preloader_shared_helpers' PhusionPassenger.require_passenger_lib 'loader_shared_helpers' PhusionPassenger.require_passenger_lib 'request_handler' @@options = LoaderSharedHelpers.init(@@options) @@options = PreloaderSharedHelpers.init(@@options) Utils.passenger_tmpdir = options["generation_dir"] if defined?(NativeSupport) NativeSupport.disable_stdio_buffering end rescue Exception => e LoaderSharedHelpers.about_to_abort(e) if defined?(LoaderSharedHelpers) puts "!> Error" puts "!> html: true" if e.respond_to?(:html?) && e.html? puts "!> " puts format_exception(e) exit exit_code_for_exception(e) end def self.preload_app LoaderSharedHelpers.before_loading_app_code_step1('config/environment.rb', options) LoaderSharedHelpers.before_loading_app_code_step2(options) require File.expand_path('config/environment') require 'rails/version' if !defined?(Rails::VERSION) if Rails::VERSION::MAJOR >= 3 LoaderSharedHelpers.about_to_abort puts "!> Error" puts "!> " puts "This application is a Rails #{Rails::VERSION::MAJOR} " + "application, but it was wrongly detected as a Rails " + "1 or Rails 2 application. This is probably a bug in " + "Phusion Passenger, so please report it." exit 1 end if !defined?(Dispatcher) require 'dispatcher' end # - No point in preloading the application sources if the garbage collector # isn't copy-on-write friendly. # - Rails >= 2.2 already preloads application sources by default, so no need # to do that again. if GC.copy_on_write_friendly? && !rails_will_preload_app_code? # Rails 2.2+ uses application_controller.rb while old # versions use application.rb. require_dependency 'application' ['models','controllers','helpers'].each do |section| Dir.glob("app/#{section}}/*.rb").each do |file| require_dependency File.expand_path(file) end end end LoaderSharedHelpers.after_loading_app_code(options) rescue Exception => e LoaderSharedHelpers.about_to_abort(e) puts "!> Error" puts "!> html: true" if e.respond_to?(:html?) && e.html? puts "!> " puts format_exception(e) exit exit_code_for_exception(e) end def self.rails_will_preload_app_code? return ::Rails::Initializer.method_defined?(:load_application_classes) end def self.negotiate_spawn_command puts "!> I have control 1.0" abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n" begin while (line = STDIN.readline) != "\n" name, value = line.strip.split(/: */, 2) options[name] = value end @@options = LoaderSharedHelpers.sanitize_spawn_options(@@options) LoaderSharedHelpers.before_handling_requests(true, options) if Rails::VERSION::STRING >= '2.3.0' PhusionPassenger.require_passenger_lib 'rack/thread_handler_extension' RequestHandler::ThreadHandler.send(:include, Rack::ThreadHandlerExtension) app = ActionController::Dispatcher.new else PhusionPassenger.require_passenger_lib 'classic_rails/thread_handler_extension' RequestHandler::ThreadHandler.send(:include, ClassicRails::ThreadHandlerExtension) app = nil end handler = RequestHandler.new(STDIN, options.merge("app" => app)) rescue Exception => e LoaderSharedHelpers.about_to_abort(e) puts "!> Error" puts "!> " puts format_exception(e) exit exit_code_for_exception(e) end LoaderSharedHelpers.advertise_readiness LoaderSharedHelpers.advertise_sockets(STDOUT, handler) puts "!> " return handler end ################## Main code ################## handshake_and_read_startup_request init_passenger preload_app if PreloaderSharedHelpers.run_main_loop(options) == :forked handler = negotiate_spawn_command handler.main_loop LoaderSharedHelpers.after_handling_requests end end # module App end # module PhusionPassenger passenger-4.0.37/helper-scripts/download_binaries/000755 000765 000024 00000000000 12233035540 022643 5ustar00honglistaff000000 000000 passenger-4.0.37/helper-scripts/meteor-loader.rb000755 000765 000024 00000015522 12233035540 022254 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'socket' require 'thread' require 'logger' module PhusionPassenger module App def self.options return @@options end def self.exit_code_for_exception(e) if e.is_a?(SystemExit) return e.status else return 1 end end def self.handshake_and_read_startup_request STDOUT.sync = true STDERR.sync = true puts "!> I have control 1.0" abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n" @@options = {} while (line = STDIN.readline) != "\n" name, value = line.strip.split(/: */, 2) @@options[name] = value end end def self.init_passenger require "#{options["ruby_libdir"]}/phusion_passenger" PhusionPassenger.locate_directories(options["passenger_root"]) PhusionPassenger.require_passenger_lib 'message_channel' PhusionPassenger.require_passenger_lib 'utils/tmpio' end def self.ping_port(port) socket_domain = Socket::Constants::AF_INET sockaddr = Socket.pack_sockaddr_in(port, '127.0.0.1') begin socket = Socket.new(socket_domain, Socket::Constants::SOCK_STREAM, 0) begin socket.connect_nonblock(sockaddr) rescue Errno::ENOENT, Errno::EINPROGRESS, Errno::EAGAIN, Errno::EWOULDBLOCK if select(nil, [socket], nil, 0.1) begin socket.connect_nonblock(sockaddr) rescue Errno::EISCONN end else raise Errno::ECONNREFUSED end end return true rescue Errno::ECONNREFUSED, Errno::ENOENT return false ensure socket.close if socket end end def self.create_control_server dir = Utils.mktmpdir('meteor') filename = "#{dir}/control" server = UNIXServer.new(filename) return [server, dir, filename] end def self.load_app(control_server) port = nil tries = 0 while port.nil? && tries < 200 port = 1024 + rand(9999) if ping_port(port) || ping_port(port + 1) || ping_port(port + 2) port = nil tries += 1 end end if port.nil? abort "Cannot find a suitable port to start Meteor on" end production = options["environment"] == "production" ? "production" : "" pid = fork do # Meteor is quite !@#$% here: if we kill its start script # with *any* signal, it'll leave a ton of garbage processes # around. Apparently it expects the user to press Ctrl-C in a # terminal which happens to send a signal to all processes # in the session. We emulate that behavior here by giving # Meteor its own process group, and sending signals to the # entire process group. Process.setpgrp control_server.close exec("meteor run -p #{port} #{production}") end $0 = options["process_title"] if options["process_title"] $0 = "#{$0} (#{pid})" return [pid, port] end class ExitFlag def initialize @mutex = Mutex.new @cond = ConditionVariable.new @exit = false end def set @mutex.synchronize do @exit = true @cond.broadcast end end def wait @mutex.synchronize do while !@exit @cond.wait(@mutex) end end end end # When the HelperAgent is shutting down, it first sends a message (A) to application # processes through the control socket that this is happening. The HelperAgent then # waits until all HTTP connections are closed, before sending another message # to application processes that they should shut down (B). # Because Meteor opens long-running connections (e.g. for WebSocket), we have to shut # down the Meteor app when A arrives, otherwise the HelperAgent will never send B. def self.wait_for_exit_message(control_server) exit_flag = ExitFlag.new start_control_server_thread(control_server, exit_flag) start_stdin_waiter_thread(exit_flag) exit_flag.wait end def self.start_control_server_thread(control_server, exit_flag) Thread.new do Thread.current.abort_on_exception = true while true process_next_control_client(control_server, exit_flag) end end end def self.process_next_control_client(control_server, exit_flag) logger = Logger.new(STDERR) begin client = control_server.accept channel = MessageChannel.new(client) while message = channel.read process_next_control_message(message, logger, exit_flag) end rescue Exception => e logger.error("#{e} (#{e.class})\n " + e.backtrace.join("\n ")) ensure begin client.close if client rescue SystemCallError, IOError, SocketError end end end def self.process_next_control_message(message, logger, exit_flag) if message[0] == "abort_long_running_connections" logger.debug("Aborting long-running connections") exit_flag.set else logger.error("Invalid control message: #{message.inspect}") end end def self.start_stdin_waiter_thread(exit_flag) Thread.new do Thread.current.abort_on_exception = true begin STDIN.readline rescue EOFError ensure exit_flag.set end end end ################## Main code ################## handshake_and_read_startup_request init_passenger begin control_server, control_dir, control_filename = create_control_server pid, port = load_app(control_server) while !ping_port(port) sleep 0.01 end puts "!> Ready" puts "!> socket: main;tcp://127.0.0.1:#{port};http_session;0" puts "!> socket: control;unix:#{control_filename};control;0" puts "!> " wait_for_exit_message(control_server) ensure if pid Process.kill('INT', -pid) rescue nil Process.waitpid(pid) rescue nil Process.kill('INT', -pid) rescue nil end if control_server control_server.close begin File.unlink(control_filename) rescue SystemCallError end require 'fileutils' begin FileUtils.remove_entry_secure(control_dir) rescue SystemCallError end end end end # module App end # module PhusionPassenger passenger-4.0.37/helper-scripts/node-loader.js000644 000765 000024 00000014442 12233035540 021714 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ module.paths.unshift(__dirname + "/../node_lib"); var EventEmitter = require('events').EventEmitter; var net = require('net'); var http = require('http'); var LineReader = require('phusion_passenger/line_reader').LineReader; var RequestHandler = require('phusion_passenger/request_handler').RequestHandler; var HttplibEmulation = require('phusion_passenger/httplib_emulation'); module.isApplicationLoader = true; // https://groups.google.com/forum/#!topic/compoundjs/4txxkNtROQg GLOBAL.PhusionPassenger = exports.PhusionPassenger = new EventEmitter(); var stdinReader = new LineReader(process.stdin); beginHandshake(); readInitializationHeader(); function beginHandshake() { process.stdout.write("!> I have control 1.0\n"); } function readInitializationHeader() { stdinReader.readLine(function(line) { if (line != "You have control 1.0\n") { console.error('Invalid initialization header'); process.exit(1); } else { readOptions(); } }); } function readOptions() { var options = {}; function readNextOption() { stdinReader.readLine(function(line) { if (line == "\n") { setupEnvironment(options); } else if (line == "") { console.error("End of stream encountered while reading initialization options"); process.exit(1); } else { var matches = line.replace(/\n/, '').match(/(.*?) *: *(.*)/); options[matches[1]] = matches[2]; readNextOption(); } }); } readNextOption(); } function setupEnvironment(options) { PhusionPassenger.options = options; PhusionPassenger.configure = configure; PhusionPassenger._requestHandler = new RequestHandler(loadApplication); PhusionPassenger._appInstalled = false; process.title = 'Passenger NodeApp: ' + options.app_root; http.Server.prototype.originalListen = http.Server.prototype.listen; http.Server.prototype.listen = installServer; stdinReader.close(); stdinReader = undefined; process.stdin.on('end', shutdown); process.stdin.resume(); } /** * PhusionPassenger.configure(options) * * Configures Phusion Passenger's behavior inside this Node application. * * Options: * autoInstall (boolean, default true) * Whether to install the first HttpServer object for which listen() is called, * as the Phusion Passenger request handler. */ function configure(_options) { var options = { autoInstall: true }; for (var key in _options) { options[key] = _options[key]; } if (!options.autoInstall) { http.Server.prototype.listen = listenAndMaybeInstall; } } function loadApplication() { var startupFile = PhusionPassenger.options.startup_file || 'app.js'; require(PhusionPassenger.options.app_root + '/' + startupFile); } function extractCallback(args) { if (args.length > 1 && typeof(args[args.length - 1]) == 'function') { return args[args.length - 1]; } } function installServer() { var server = this; if (!PhusionPassenger._appInstalled) { PhusionPassenger._appInstalled = true; PhusionPassenger._server = server; server.address = function() { return 'passenger'; } finalizeStartup(); PhusionPassenger.on('request', function(headers, socket, bodyBegin) { var req, res; if (headers['HTTP_UPGRADE']) { if (EventEmitter.listenerCount(server, 'upgrade') > 0) { req = HttplibEmulation.createIncomingMessage(headers, socket, bodyBegin); server.emit('upgrade', req, socket, bodyBegin); } else { socket.destroy(); } } else { req = HttplibEmulation.createIncomingMessage(headers, socket, bodyBegin); res = HttplibEmulation.createServerResponse(req); server.emit('request', req, res); } }); var callback = extractCallback(arguments); if (callback) { server.once('listening', callback); } server.emit('listening'); return server; } else { throw new Error("http.Server.listen() was called more than once, which " + "is not allowed because Phusion Passenger is in auto-install mode. " + "This means that the first http.Server object for which listen() is called, " + "is automatically installed as the Phusion Passenger request handler. " + "If you want to create and listen on multiple http.Server object then " + "you should disable auto-install mode. Please read " + "http://stackoverflow.com/questions/20645231/phusion-passenger-error-http-server-listen-was-called-more-than-once/20645549"); } } function listenAndMaybeInstall(port) { if (port === 'passenger') { if (!PhusionPassenger._appInstalled) { return installServer.apply(this, arguments); } else { throw new Error("You may only call listen('passenger') once. Please read http://stackoverflow.com/questions/20645231/phusion-passenger-error-http-server-listen-was-called-more-than-once/20645549"); } } else { return this.originalListen.apply(this, arguments); } } function finalizeStartup() { process.stdout.write("!> Ready\n"); process.stdout.write("!> socket: main;tcp://127.0.0.1:" + PhusionPassenger._requestHandler.server.address().port + ";session;0\n"); process.stdout.write("!> \n"); } function shutdown() { if (PhusionPassenger.listeners('exit').length == 0) { process.exit(0); } else { PhusionPassenger.emit('exit'); } } passenger-4.0.37/helper-scripts/prespawn000755 000765 000024 00000006151 12233035540 020750 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010, 2011 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. STDOUT.sync = true STDERR.sync = true require 'uri' require 'socket' require 'timeout' class PrespawnLocation class InvalidURLError < RuntimeError def initialize(url) @url = url end def to_s message end def message "'#{@url}' is not a valid URL." end end def self.parse(url) uri = uri_for(url) location = if uri.host == 'unix' UNIXPrespawnLocation.new(uri) else case uri.scheme when 'http' TCPPrespawnLocation.new(uri) when 'https' SSLPrespawnLocation.new(uri) end end unless location raise InvalidURLError, url end location end def self.uri_for(url) URI.parse(url) rescue URI::InvalidURIError raise InvalidURLError, url end def initialize(uri) @uri = uri end def request_path @uri.path.empty? ? '/' : @uri.path end def request_host @uri.host end def socket @socket ||= connect end def head_request socket.write("HEAD #{request_path} HTTP/1.1\r\n") socket.write("Host: #{request_host}\r\n") socket.write("Connection: close\r\n") socket.write("\r\n") begin Timeout.timeout(10) do socket.read end rescue Timeout::Error end end end class TCPPrespawnLocation < PrespawnLocation def request_port @uri.port end def connect TCPSocket.new('127.0.0.1', request_port) end end class SSLPrespawnLocation < TCPPrespawnLocation def connect require 'openssl' socket = OpenSSL::SSL::SSLSocket.new(super) socket.sync_close = true socket.connect socket end end class UNIXPrespawnLocation < PrespawnLocation def request_path super.split(':', 2).last end def request_host '_' end def socket_path @uri.path.split(':', 2).first end def connect UNIXSocket.new(socket_path) end end url = ARGV[0] begin prespawn_location = PrespawnLocation.parse(url) rescue PrespawnLocation::InvalidURLError => e STDERR.puts "*** ERROR: #{e}" exit 1 end prespawn_location.head_request passenger-4.0.37/helper-scripts/rack-loader.rb000644 000765 000024 00000010554 12233035540 021676 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. module PhusionPassenger module App def self.options return @@options end def self.app return @@app end def self.format_exception(e) result = "#{e} (#{e.class})" if !e.backtrace.empty? if e.respond_to?(:html?) && e.html? require 'erb' if !defined?(ERB) result << "\n
  " << ERB::Util.h(e.backtrace.join("\n  ")) << "
" else result << "\n " << e.backtrace.join("\n ") end end return result end def self.exit_code_for_exception(e) if e.is_a?(SystemExit) return e.status else return 1 end end def self.handshake_and_read_startup_request STDOUT.sync = true STDERR.sync = true puts "!> I have control 1.0" abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n" @@options = {} while (line = STDIN.readline) != "\n" name, value = line.strip.split(/: */, 2) @@options[name] = value end end def self.init_passenger require "#{options["ruby_libdir"]}/phusion_passenger" PhusionPassenger.locate_directories(options["passenger_root"]) PhusionPassenger.require_passenger_lib 'native_support' PhusionPassenger.require_passenger_lib 'ruby_core_enhancements' PhusionPassenger.require_passenger_lib 'utils/tmpdir' PhusionPassenger.require_passenger_lib 'loader_shared_helpers' PhusionPassenger.require_passenger_lib 'request_handler' PhusionPassenger.require_passenger_lib 'rack/thread_handler_extension' @@options = LoaderSharedHelpers.init(@@options) Utils.passenger_tmpdir = options["generation_dir"] if defined?(NativeSupport) NativeSupport.disable_stdio_buffering end RequestHandler::ThreadHandler.send(:include, Rack::ThreadHandlerExtension) rescue Exception => e LoaderSharedHelpers.about_to_abort(e) if defined?(LoaderSharedHelpers) puts "!> Error" puts "!> html: true" if e.respond_to?(:html?) && e.html? puts "!> " puts format_exception(e) exit exit_code_for_exception(e) end def self.load_app LoaderSharedHelpers.before_loading_app_code_step1('config.ru', options) LoaderSharedHelpers.run_load_path_setup_code(options) LoaderSharedHelpers.before_loading_app_code_step2(options) begin require 'rubygems' rescue LoadError end require 'rack' rackup_file = options["startup_file"] || "config.ru" rackup_code = ::File.open(rackup_file, 'rb') do |f| f.read end @@app = eval("Rack::Builder.new {( #{rackup_code}\n )}.to_app", TOPLEVEL_BINDING, rackup_file) LoaderSharedHelpers.after_loading_app_code(options) rescue Exception => e LoaderSharedHelpers.about_to_abort(e) puts "!> Error" puts "!> html: true" if e.respond_to?(:html?) && e.html? puts "!> " puts format_exception(e) exit exit_code_for_exception(e) end ################## Main code ################## handshake_and_read_startup_request init_passenger load_app LoaderSharedHelpers.before_handling_requests(false, options) handler = RequestHandler.new(STDIN, options.merge("app" => app)) LoaderSharedHelpers.advertise_readiness LoaderSharedHelpers.advertise_sockets(STDOUT, handler) puts "!> " handler.main_loop LoaderSharedHelpers.after_handling_requests end # module App end # module PhusionPassenger passenger-4.0.37/helper-scripts/rack-preloader.rb000644 000765 000024 00000012311 12233035540 022376 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. GC.copy_on_write_friendly = true if GC.respond_to?(:copy_on_write_friendly=) module PhusionPassenger module App def self.options return @@options end def self.app return @@app end def self.format_exception(e) result = "#{e} (#{e.class})" if !e.backtrace.empty? if e.respond_to?(:html?) && e.html? require 'erb' if !defined?(ERB) result << "\n
  " << ERB::Util.h(e.backtrace.join("\n  ")) << "
" else result << "\n " << e.backtrace.join("\n ") end end return result end def self.exit_code_for_exception(e) if e.is_a?(SystemExit) return e.status else return 1 end end def self.handshake_and_read_startup_request STDOUT.sync = true STDERR.sync = true puts "!> I have control 1.0" abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n" @@options = {} while (line = STDIN.readline) != "\n" name, value = line.strip.split(/: */, 2) @@options[name] = value end end def self.init_passenger require "#{options["ruby_libdir"]}/phusion_passenger" PhusionPassenger.locate_directories(options["passenger_root"]) PhusionPassenger.require_passenger_lib 'native_support' PhusionPassenger.require_passenger_lib 'ruby_core_enhancements' PhusionPassenger.require_passenger_lib 'utils/tmpdir' PhusionPassenger.require_passenger_lib 'preloader_shared_helpers' PhusionPassenger.require_passenger_lib 'loader_shared_helpers' PhusionPassenger.require_passenger_lib 'request_handler' PhusionPassenger.require_passenger_lib 'rack/thread_handler_extension' @@options = LoaderSharedHelpers.init(@@options) @@options = PreloaderSharedHelpers.init(@@options) Utils.passenger_tmpdir = options["generation_dir"] if defined?(NativeSupport) NativeSupport.disable_stdio_buffering end RequestHandler::ThreadHandler.send(:include, Rack::ThreadHandlerExtension) rescue Exception => e LoaderSharedHelpers.about_to_abort(e) if defined?(LoaderSharedHelpers) puts "!> Error" puts "!> html: true" if e.respond_to?(:html?) && e.html? puts "!> " puts format_exception(e) exit exit_code_for_exception(e) end def self.preload_app LoaderSharedHelpers.before_loading_app_code_step1('config.ru', options) LoaderSharedHelpers.run_load_path_setup_code(options) LoaderSharedHelpers.before_loading_app_code_step2(options) begin require 'rubygems' rescue LoadError end require 'rack' rackup_file = options["startup_file"] || "config.ru" rackup_code = ::File.open(rackup_file, 'rb') do |f| f.read end @@app = eval("Rack::Builder.new {( #{rackup_code}\n )}.to_app", TOPLEVEL_BINDING, rackup_file) LoaderSharedHelpers.after_loading_app_code(options) rescue Exception => e LoaderSharedHelpers.about_to_abort(e) puts "!> Error" puts "!> html: true" if e.respond_to?(:html?) && e.html? puts "!> " puts format_exception(e) exit exit_code_for_exception(e) end def self.negotiate_spawn_command puts "!> I have control 1.0" abort "Invalid initialization header" if STDIN.readline != "You have control 1.0\n" begin while (line = STDIN.readline) != "\n" name, value = line.strip.split(/: */, 2) options[name] = value end @@options = LoaderSharedHelpers.sanitize_spawn_options(@@options) LoaderSharedHelpers.before_handling_requests(true, options) handler = RequestHandler.new(STDIN, options.merge("app" => app)) rescue Exception => e LoaderSharedHelpers.about_to_abort(e) puts "!> Error" puts "!> " puts format_exception(e) exit exit_code_for_exception(e) end LoaderSharedHelpers.advertise_readiness LoaderSharedHelpers.advertise_sockets(STDOUT, handler) puts "!> " return handler end ################## Main code ################## handshake_and_read_startup_request init_passenger preload_app if PreloaderSharedHelpers.run_main_loop(options) == :forked handler = negotiate_spawn_command handler.main_loop LoaderSharedHelpers.after_handling_requests end end # module App end # module PhusionPassenger passenger-4.0.37/helper-scripts/system-memory-stats.py000755 000765 000024 00000023357 12233035540 023535 0ustar00honglistaff000000 000000 #!/usr/bin/env python # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. import sys if sys.version_info[0] >= 3: def bytes_to_str(b): return b.decode() else: def bytes_to_str(b): return b def linux_memory_stats(): import os os.execlp('free', 'free', '-m') def osx_memory_stats(): import subprocess, re, os, resource def popen_read(command): return bytes_to_str(subprocess.Popen(command, stdout = subprocess.PIPE).communicate()[0]) # Get process info ps = popen_read(['ps', '-caxm', '-orss,comm']) vm = popen_read(['vm_stat']) # Iterate processes process_lines = ps.split('\n') sep = re.compile('[\s]+') rss_total = 0 # kB for row in range(1, len(process_lines)): row_text = process_lines[row].strip() row_elements = sep.split(row_text) try: rss = float(row_elements[0]) * 1024 except: rss = 0 # ignore... rss_total += rss # Process vm_stat vm_lines = vm.split('\n') sep = re.compile(':[\s]+') vm_stats = {} for row in range(1, len(vm_lines) - 2): row_text = vm_lines[row].strip() row_elements = sep.split(row_text) vm_stats[(row_elements[0])] = int(row_elements[1].strip('\.')) * resource.getpagesize() print('---- Summary ----') print('Wired Memory:\t\t%.1f MB' % (vm_stats["Pages wired down"] / 1024 / 1024)) print('Active Memory:\t\t%.1f MB' % (vm_stats["Pages active"] / 1024 / 1024)) print('Inactive Memory:\t%.1f MB' % (vm_stats["Pages inactive"] / 1024 / 1024)) print('Free Memory:\t\t%.1f MB' % (vm_stats["Pages free"] / 1024 / 1024)) print('Real Mem Total (ps):\t%.1f MB' % (rss_total / 1024 / 1024)) print('') print('---- vm_stat ----') print(vm.strip()) def freebsd_memory_stats(): # Ported from http://www.cyberciti.biz/files/scripts/freebsd-memory.pl.txt ## freebsd-memory -- List Total System Memory Usage ## Copyright (c) 2003-2004 Ralf S. Engelschall ## ## Redistribution and use in source and binary forms, with or without ## modification, are permitted provided that the following conditions ## are met: ## 1. Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimer. ## 2. Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimer in the ## documentation and/or other materials provided with the distribution. ## ## THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND ## ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ## ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE ## FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ## DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ## OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ## HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ## LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ## OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. import subprocess, re, os, resource def popen_read(command): return bytes_to_str(subprocess.Popen(command, stdout = subprocess.PIPE).communicate()[0]) def printf(format, *args): print(format % args) # round the physical memory size to the next power of two which is # reasonable for memory cards. We do this by first determining the # guessed memory card size under the assumption that usual computer # hardware has an average of a maximally eight memory cards installed # and those are usually of equal size. def mem_rounded(mem_size): chip_size = 1; chip_guess = (mem_size / 8) - 1 while chip_guess != 0: chip_guess >>= 1 chip_size <<= 1 mem_round = (mem_size / chip_size + 1) * chip_size return mem_round sysctl_output = popen_read(['/sbin/sysctl', '-a']) sysctl = {} regex = re.compile('^([^:]+):\s+(.+)\s*$', re.S | re.M) for line in sysctl_output.split('\n'): matches = regex.match(line) if matches is not None: sysctl[matches.group(1)] = matches.group(2) # determine the individual known information # NOTICE: forget hw.usermem, it is just (hw.physmem - vm.stats.vm.v_wire_count). # NOTICE: forget vm.stats.misc.zero_page_count, it is just the subset of # vm.stats.vm.v_free_count which is already pre-zeroed. pagesize = int(sysctl["hw.pagesize"]) mem_hw = mem_rounded(int(sysctl["hw.physmem"])) mem_phys = int(sysctl["hw.physmem"]) mem_all = int(sysctl["vm.stats.vm.v_page_count"]) * pagesize mem_wire = int(sysctl["vm.stats.vm.v_wire_count"]) * pagesize mem_active = int(sysctl["vm.stats.vm.v_active_count"]) * pagesize mem_inactive = int(sysctl["vm.stats.vm.v_inactive_count"]) * pagesize mem_cache = int(sysctl["vm.stats.vm.v_cache_count"]) * pagesize mem_free = int(sysctl["vm.stats.vm.v_free_count"]) * pagesize # determine the individual unknown information mem_gap_vm = mem_all - (mem_wire + mem_active + mem_inactive + mem_cache + mem_free) mem_gap_sys = mem_phys - mem_all mem_gap_hw = mem_hw - mem_phys # determine logical summary information mem_total = mem_hw mem_avail = mem_inactive + mem_cache + mem_free mem_used = mem_total - mem_avail # information annotations info = { "mem_wire" : 'Wired: disabled for paging out', "mem_active" : 'Active: recently referenced', "mem_inactive" : 'Inactive: recently not referenced', "mem_cache" : 'Cached: almost avail. for allocation', "mem_free" : 'Free: fully available for allocation', "mem_gap_vm" : 'Memory gap: UNKNOWN', "mem_all" : 'Total real memory managed', "mem_gap_sys" : 'Memory gap: Kernel?!', "mem_phys" : 'Total real memory available', "mem_gap_hw" : 'Memory gap: Segment Mappings?!', "mem_hw" : 'Total real memory installed', "mem_used" : 'Logically used memory', "mem_avail" : 'Logically available memory', "mem_total" : 'Logically total memory', } # print system results printf("SYSTEM MEMORY INFORMATION:") printf("mem_wire: %7d MB [%3d%%] %s", mem_wire / (1024*1024), (float(mem_wire) / mem_all) * 100, info["mem_wire"]) printf("mem_active: + %7d MB [%3d%%] %s", mem_active / (1024*1024), (float(mem_active) / mem_all) * 100, info["mem_active"]) printf("mem_inactive:+ %7d MB [%3d%%] %s", mem_inactive / (1024*1024), (float(mem_inactive) / mem_all) * 100, info["mem_inactive"]) printf("mem_cache: + %7d MB [%3d%%] %s", mem_cache / (1024*1024), (float(mem_cache) / mem_all) * 100, info["mem_cache"]) printf("mem_free: + %7d MB [%3d%%] %s", mem_free / (1024*1024), (float(mem_free) / mem_all) * 100, info["mem_free"]) printf("mem_gap_vm: + %7d MB [%3d%%] %s", mem_gap_vm / (1024*1024), (float(mem_gap_vm) / mem_all) * 100, info["mem_gap_vm"]) printf("-------------- ---------- ------") printf("mem_all: = %7d MB [100%%] %s", mem_all / (1024*1024), info["mem_all"]) printf("mem_gap_sys: + %7d MB %s", mem_gap_sys / (1024*1024), info["mem_gap_sys"]) printf("-------------- ----------") printf("mem_phys: = %7d MB %s", mem_phys / (1024*1024), info["mem_phys"]) printf("mem_gap_hw: + %7d MB %s", mem_gap_hw / (1024*1024), info["mem_gap_hw"]) printf("-------------- ----------") printf("mem_hw: = %7d MB %s", mem_hw / (1024*1024), info["mem_hw"]) # print logical results print("") printf("SYSTEM MEMORY SUMMARY:"); printf("mem_used: %7d MB [%3d%%] %s", mem_used / (1024*1024), (float(mem_used) / mem_total) * 100, info["mem_used"]) printf("mem_avail: + %7d MB [%3d%%] %s", mem_avail / (1024*1024), (float(mem_avail) / mem_total) * 100, info["mem_avail"]) printf("-------------- ---------- ------") printf("mem_total: = %7d MB [100%%] %s", mem_total / (1024*1024), info["mem_total"]) if sys.platform.find('linux') > -1: linux_memory_stats() elif sys.platform.find('darwin') > -1: osx_memory_stats() elif sys.platform.find('freebsd') > -1: freebsd_memory_stats() passenger-4.0.37/helper-scripts/wsgi-loader.py000644 000765 000024 00000017571 12233035540 021762 0ustar00honglistaff000000 000000 #!/usr/bin/env python # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. import sys, os, re, imp, traceback, socket, select, struct, logging, errno options = {} def abort(message): sys.stderr.write(message + "\n") sys.exit(1) def readline(): result = sys.stdin.readline() if result == "": raise EOFError else: return result def handshake_and_read_startup_request(): global options print("!> I have control 1.0") if readline() != "You have control 1.0\n": abort("Invalid initialization header") line = readline() while line != "\n": result = re.split(': *', line.strip(), 2) name = result[0] value = result[1] options[name] = value line = readline() def load_app(): return imp.load_source('passenger_wsgi', 'passenger_wsgi.py') def create_server_socket(): global options filename = options['generation_dir'] + '/backends/wsgi.' + str(os.getpid()) s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) try: os.remove(filename) except OSError: pass s.bind(filename) s.listen(1000) return (filename, s) def advertise_sockets(socket_filename): print("!> socket: main;unix:%s;session;1" % socket_filename) print("!> ") if sys.version_info[0] >= 3: def reraise_exception(exc_info): raise exc_info[0].with_traceback(exc_info[1], exc_info[2]) def bytes_to_str(b): return b.decode() def str_to_bytes(s): return s.encode('latin-1') else: def reraise_exception(exc_info): exec("raise exc_info[0], exc_info[1], exc_info[2]") def bytes_to_str(b): return b def str_to_bytes(s): return s class RequestHandler: def __init__(self, server_socket, owner_pipe, app): self.server = server_socket self.owner_pipe = owner_pipe self.app = app def main_loop(self): done = False try: while not done: client, address = self.accept_connection() if not client: done = True break socket_hijacked = False try: try: env, input_stream = self.parse_request(client) if env: if env['REQUEST_METHOD'] == 'ping': self.process_ping(env, input_stream, client) else: socket_hijacked = self.process_request(env, input_stream, client) except KeyboardInterrupt: done = True except IOError: e = sys.exc_info()[1] if not getattr(e, 'passenger', False) or e.errno != errno.EPIPE: logging.exception("WSGI application raised an I/O exception!") except Exception: logging.exception("WSGI application raised an exception!") finally: if not socket_hijacked: try: # Shutdown the socket like this just in case the app # spawned a child process that keeps it open. client.shutdown(socket.SHUT_WR) except: pass try: client.close() except: pass except KeyboardInterrupt: pass def accept_connection(self): result = select.select([self.owner_pipe, self.server.fileno()], [], [])[0] if self.server.fileno() in result: return self.server.accept() else: return (None, None) def parse_request(self, client): buf = b'' while len(buf) < 4: tmp = client.recv(4 - len(buf)) if len(tmp) == 0: return (None, None) buf += tmp header_size = struct.unpack('>I', buf)[0] buf = b'' while len(buf) < header_size: tmp = client.recv(header_size - len(buf)) if len(tmp) == 0: return (None, None) buf += tmp headers = buf.split(b"\0") headers.pop() # Remove trailing "\0" env = {} i = 0 while i < len(headers): env[bytes_to_str(headers[i])] = bytes_to_str(headers[i + 1]) i += 2 return (env, client) if hasattr(socket, '_fileobject'): def wrap_input_socket(self, sock): return socket._fileobject(sock, 'rb', 512) else: def wrap_input_socket(self, sock): return socket.socket.makefile(sock, 'rb', 512) def process_request(self, env, input_stream, output_stream): # The WSGI speculation says that the input parameter object passed needs to # implement a few file-like methods. This is the reason why we "wrap" the socket._socket # into the _fileobject to solve this. # # Otherwise, the POST data won't be correctly retrieved by Django. # # See: http://www.python.org/dev/peps/pep-0333/#input-and-error-streams env['wsgi.input'] = self.wrap_input_socket(input_stream) env['wsgi.errors'] = sys.stderr env['wsgi.version'] = (1, 0) env['wsgi.multithread'] = False env['wsgi.multiprocess'] = True env['wsgi.run_once'] = True if env.get('HTTPS','off') in ('on', '1', 'true', 'yes'): env['wsgi.url_scheme'] = 'https' else: env['wsgi.url_scheme'] = 'http' headers_set = [] headers_sent = [] def write(data): try: if not headers_set: raise AssertionError("write() before start_response()") elif not headers_sent: # Before the first output, send the stored headers. status, response_headers = headers_sent[:] = headers_set output_stream.sendall(str_to_bytes('Status: %s\r\n' % status)) for header in response_headers: output_stream.sendall(str_to_bytes('%s: %s\r\n' % header)) output_stream.sendall(b'\r\n') output_stream.sendall(data) except IOError: # Mark this exception as coming from the Phusion Passenger # socket and not some other socket. e = sys.exc_info()[1] setattr(e, 'passenger', True) raise e def start_response(status, response_headers, exc_info = None): if exc_info: try: if headers_sent: # Re-raise original exception if headers sent. reraise_exception(exc_info) finally: # Avoid dangling circular ref. exc_info = None elif headers_set: raise AssertionError("Headers already set!") headers_set[:] = [status, response_headers] return write def hijack(): env['passenger.hijacked_socket'] = output_stream return output_stream env['passenger.hijack'] = hijack result = self.app(env, start_response) if 'passenger.hijacked_socket' in env: # Socket connection hijacked. Don't do anything. return True try: for data in result: # Don't send headers until body appears. if data: write(data) if not headers_sent: # Send headers now if body was empty. write(b'') finally: if hasattr(result, 'close'): result.close() return False def process_ping(self, env, input_stream, output_stream): output_stream.sendall(b"pong") if __name__ == "__main__": logging.basicConfig( level = logging.WARNING, format = "[ pid=%(process)d, time=%(asctime)s ]: %(message)s") if hasattr(logging, 'captureWarnings'): logging.captureWarnings(True) handshake_and_read_startup_request() app_module = load_app() socket_filename, server_socket = create_server_socket() handler = RequestHandler(server_socket, sys.stdin, app_module.application) print("!> Ready") advertise_sockets(socket_filename) handler.main_loop() passenger-4.0.37/helper-scripts/wsgi-preloader.py000644 000765 000024 00000000026 12233035540 022454 0ustar00honglistaff000000 000000 #!/usr/bin/env python passenger-4.0.37/helper-scripts/download_binaries/extconf.rb000644 000765 000024 00000010015 12233035540 024633 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # This script is called during 'gem install'. Its role is to download # Phusion Passenger binaries. # Create a dummy Makefile to prevent 'gem install' from borking out. File.open("Makefile", "w") do |f| f.puts "all:" f.puts " true" f.puts "install:" f.puts " true" end # Don't do anything on Windows. We don't support Windows but exiting now # will at least prevent the gem from being not installable on Windows. exit if RUBY_PLATFORM =~ /mswin/i || RUBY_PLATFORM =~ /win32/i || RUBY_PLATFORM =~ /mingw/ source_root = File.expand_path("../..", File.dirname(__FILE__)) $LOAD_PATH.unshift("#{source_root}/lib") require 'phusion_passenger' PhusionPassenger.locate_directories require 'fileutils' if PhusionPassenger.natively_packaged? puts "Binary downloading is only available when originally packaged. Stopping." exit 0 end if !PhusionPassenger.installed_from_release_package? puts "This Phusion Passenger is not installed from an official release package. Stopping." exit 0 end # Create download directory and do some preparation PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/binary_compatibility' cxx_compat_id = PhusionPassenger::PlatformInfo.cxx_binary_compatibility_id ruby_compat_id = PhusionPassenger::PlatformInfo.ruby_extension_binary_compatibility_id ABORT_ON_ERROR = ARGV[0] == "--abort-on-error" if url_root = ENV['BINARIES_URL_ROOT'] SITES = [{ :url => url_root }] else SITES = PhusionPassenger.binaries_sites end FileUtils.mkdir_p(PhusionPassenger.download_cache_dir) Dir.chdir(PhusionPassenger.download_cache_dir) # Initiate downloads require 'phusion_passenger/utils/download' require 'logger' def download(name, options = {}) if File.exist?(name) puts "#{Dir.pwd}/#{name} already exists" return true end logger = Logger.new(STDOUT) logger.level = Logger::WARN logger.formatter = proc { |severity, datetime, progname, msg| "*** #{msg}\n" } SITES.each do |site| if really_download(site, name, logger, options) return true end end abort "Cannot download #{name}, aborting" if ABORT_ON_ERROR return false end def really_download(site, name, logger, options) url = "#{site[:url]}/#{PhusionPassenger::VERSION_STRING}/#{name}" puts "Attempting to download #{url} into #{Dir.pwd}" File.unlink("#{name}.tmp") rescue nil options = { :cacert => site[:cert], :logger => logger }.merge(options) result = PhusionPassenger::Utils::Download.download(url, "#{name}.tmp", options) if result File.rename("#{name}.tmp", name) else File.unlink("#{name}.tmp") rescue nil end return result end download "rubyext-#{ruby_compat_id}.tar.gz", :total_timeout => 10 download "webhelper-#{PhusionPassenger::PREFERRED_NGINX_VERSION}-#{cxx_compat_id}.tar.gz", :total_timeout => 120 download "support-#{cxx_compat_id}.tar.gz", :total_timeout => 900 passenger-4.0.37/ext/apache2/000755 000765 000024 00000000000 12233035540 016317 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/000755 000765 000024 00000000000 12233035540 016142 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/common/000755 000765 000024 00000000000 12233035540 016304 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/libeio/000755 000765 000024 00000000000 12233035540 016257 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/libev/000755 000765 000024 00000000000 12233035540 016115 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/nginx/000755 000765 000024 00000000000 12233035540 016137 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/oxt/000755 000765 000024 00000000000 12233035540 015626 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/ruby/000755 000765 000024 00000000000 12233035540 015775 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/ruby/extconf.rb000644 000765 000024 00000003630 12233035540 017772 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'mkmf' $LIBS = "" $CFLAGS << " -g" $LIBS << " -lpthread" if RUBY_PLATFORM =~ /solaris/ have_library('xnet') $CFLAGS << " -D_XPG4_2" $CFLAGS << " -D__EXTENSIONS__" if RUBY_PLATFORM =~ /solaris2.9/ $CFLAGS << " -D__SOLARIS9__" end end have_header('alloca.h') have_header('ruby/io.h') have_func('rb_thread_io_blocking_region') with_cflags($CFLAGS) do create_makefile('passenger_native_support') if RUBY_PLATFORM =~ /solaris/ # Fix syntax error in Solaris /usr/ccs/bin/make. # https://code.google.com/p/phusion-passenger/issues/detail?id=999 makefile = File.read("Makefile") makefile.sub!(/^ECHO = .*/, "ECHO = echo") File.open("Makefile", "w") do |f| f.write(makefile) end end end passenger-4.0.37/ext/ruby/passenger_native_support.c000644 000765 000024 00000067046 12233035540 023307 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include "ruby.h" #ifdef HAVE_RUBY_IO_H /* Ruby 1.9 */ #include "ruby/intern.h" #include "ruby/io.h" #include "ruby/version.h" #else #include "rubysig.h" #include "rubyio.h" #include "version.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_ALLOCA_H #include #endif #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) #define HAVE_KQUEUE #include #include #endif #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #ifndef RARRAY_LEN #define RARRAY_LEN(ary) RARRAY(ary)->len #endif #ifndef RSTRING_PTR #define RSTRING_PTR(str) RSTRING(str)->ptr #endif #ifndef RSTRING_LEN #define RSTRING_LEN(str) RSTRING(str)->len #endif #if !defined(RUBY_UBF_IO) && defined(RB_UBF_DFL) /* MacRuby compatibility */ #define RUBY_UBF_IO RB_UBF_DFL #endif #ifndef IOV_MAX /* Linux doesn't define IOV_MAX in limits.h for some reason. */ #define IOV_MAX sysconf(_SC_IOV_MAX) #endif #ifdef HAVE_RB_THREAD_IO_BLOCKING_REGION /* Ruby doesn't define this function in its headers */ VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd); #endif static VALUE mPassenger; static VALUE mNativeSupport; static VALUE S_ProcessTimes; #ifdef HAVE_KQUEUE static VALUE cFileSystemWatcher; #endif /* * call-seq: disable_stdio_buffering * * Disables any kind of buffering on the C +stdout+ and +stderr+ variables, * so that +fprintf()+ on +stdout+ and +stderr+ have immediate effect. */ static VALUE disable_stdio_buffering(VALUE self) { setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); return Qnil; } /** * Split the given string into an hash. Keys and values are obtained by splitting the * string using the null character as the delimitor. */ static VALUE split_by_null_into_hash(VALUE self, VALUE data) { const char *cdata = RSTRING_PTR(data); unsigned long len = RSTRING_LEN(data); const char *begin = cdata; const char *current = cdata; const char *end = cdata + len; VALUE result, key, value; result = rb_hash_new(); while (current < end) { if (*current == '\0') { key = rb_str_substr(data, begin - cdata, current - begin); begin = current = current + 1; while (current < end) { if (*current == '\0') { value = rb_str_substr(data, begin - cdata, current - begin);; begin = current = current + 1; rb_hash_aset(result, key, value); break; } else { current++; } } } else { current++; } } return result; } typedef struct { /* The IO vectors in this group. */ struct iovec *io_vectors; /* The number of IO vectors in io_vectors. */ unsigned int count; /* The combined size of all IO vectors in this group. */ ssize_t total_size; } IOVectorGroup; /* Given that _bytes_written_ bytes in _group_ had been successfully written, * update the information in _group_ so that the next writev() call doesn't * write the already written bytes. */ static void update_group_written_info(IOVectorGroup *group, ssize_t bytes_written) { unsigned int i; size_t counter; struct iovec *current_vec; /* Find the last vector that contains data that had already been written. */ counter = 0; for (i = 0; i < group->count; i++) { counter += group->io_vectors[i].iov_len; if (counter == (size_t) bytes_written) { /* Found. In fact, all vectors up to this one contain exactly * bytes_written bytes. So discard all these vectors. */ group->io_vectors += i + 1; group->count -= i + 1; group->total_size -= bytes_written; return; } else if (counter > (size_t) bytes_written) { /* Found. Discard all vectors before this one, and * truncate this vector. */ group->io_vectors += i; group->count -= i; group->total_size -= bytes_written; current_vec = &group->io_vectors[0]; current_vec->iov_base = ((char *) current_vec->iov_base) + current_vec->iov_len - (counter - bytes_written); current_vec->iov_len = counter - bytes_written; return; } } rb_raise(rb_eRuntimeError, "writev() returned an unexpected result"); } #ifndef TRAP_BEG typedef struct { int filedes; const struct iovec *iov; int iovcnt; } WritevWrapperData; static VALUE writev_wrapper(void *ptr) { WritevWrapperData *data = (WritevWrapperData *) ptr; return (VALUE) writev(data->filedes, data->iov, data->iovcnt); } #endif static VALUE f_generic_writev(VALUE fd, VALUE *array_of_components, unsigned int count) { VALUE components, str; unsigned int total_size, total_components, ngroups; IOVectorGroup *groups; unsigned int i, j, group_offset, vector_offset; unsigned long long ssize_max; ssize_t ret; int done, fd_num, e; #ifndef TRAP_BEG WritevWrapperData writev_wrapper_data; #endif /* First determine the number of components that we have. */ total_components = 0; for (i = 0; i < count; i++) { Check_Type(array_of_components[i], T_ARRAY); total_components += (unsigned int) RARRAY_LEN(array_of_components[i]); } if (total_components == 0) { return NUM2INT(0); } /* A single writev() call can only accept IOV_MAX vectors, so we * may have to split the components into groups and perform * multiple writev() calls, one per group. Determine the number * of groups needed, how big each group should be and allocate * memory for them. */ if (total_components % IOV_MAX == 0) { ngroups = total_components / IOV_MAX; groups = alloca(ngroups * sizeof(IOVectorGroup)); if (groups == NULL) { rb_raise(rb_eNoMemError, "Insufficient stack space."); } memset(groups, 0, ngroups * sizeof(IOVectorGroup)); for (i = 0; i < ngroups; i++) { groups[i].io_vectors = alloca(IOV_MAX * sizeof(struct iovec)); if (groups[i].io_vectors == NULL) { rb_raise(rb_eNoMemError, "Insufficient stack space."); } groups[i].count = IOV_MAX; } } else { ngroups = total_components / IOV_MAX + 1; groups = alloca(ngroups * sizeof(IOVectorGroup)); if (groups == NULL) { rb_raise(rb_eNoMemError, "Insufficient stack space."); } memset(groups, 0, ngroups * sizeof(IOVectorGroup)); for (i = 0; i < ngroups - 1; i++) { groups[i].io_vectors = alloca(IOV_MAX * sizeof(struct iovec)); if (groups[i].io_vectors == NULL) { rb_raise(rb_eNoMemError, "Insufficient stack space."); } groups[i].count = IOV_MAX; } groups[ngroups - 1].io_vectors = alloca((total_components % IOV_MAX) * sizeof(struct iovec)); if (groups[ngroups - 1].io_vectors == NULL) { rb_raise(rb_eNoMemError, "Insufficient stack space."); } groups[ngroups - 1].count = total_components % IOV_MAX; } /* Now distribute the components among the groups, filling the iovec * array in each group. Also calculate the total data size while we're * at it. */ total_size = 0; group_offset = 0; vector_offset = 0; for (i = 0; i < count; i++) { components = array_of_components[i]; for (j = 0; j < (unsigned int) RARRAY_LEN(components); j++) { str = rb_ary_entry(components, j); str = rb_obj_as_string(str); total_size += (unsigned int) RSTRING_LEN(str); /* I know writev() doesn't write to iov_base, but on some * platforms it's still defined as non-const char * * :-( */ groups[group_offset].io_vectors[vector_offset].iov_base = (char *) RSTRING_PTR(str); groups[group_offset].io_vectors[vector_offset].iov_len = RSTRING_LEN(str); groups[group_offset].total_size += RSTRING_LEN(str); vector_offset++; if (vector_offset == groups[group_offset].count) { group_offset++; vector_offset = 0; } } } /* We don't compare to SSIZE_MAX directly in order to shut up a compiler warning on OS X Snow Leopard. */ ssize_max = SSIZE_MAX; if (total_size > ssize_max) { rb_raise(rb_eArgError, "The total size of the components may not be larger than SSIZE_MAX."); } /* Write the data. */ fd_num = NUM2INT(fd); for (i = 0; i < ngroups; i++) { /* Wait until the file descriptor becomes writable before writing things. */ rb_thread_fd_writable(fd_num); done = 0; while (!done) { #ifdef TRAP_BEG TRAP_BEG; ret = writev(fd_num, groups[i].io_vectors, groups[i].count); TRAP_END; #else writev_wrapper_data.filedes = fd_num; writev_wrapper_data.iov = groups[i].io_vectors; writev_wrapper_data.iovcnt = groups[i].count; #ifdef HAVE_RB_THREAD_IO_BLOCKING_REGION ret = (int) rb_thread_io_blocking_region(writev_wrapper, &writev_wrapper_data, fd_num); #else ret = (int) rb_thread_blocking_region(writev_wrapper, &writev_wrapper_data, RUBY_UBF_IO, 0); #endif #endif if (ret == -1) { /* If the error is something like EAGAIN, yield to another * thread until the file descriptor becomes writable again. * In case of other errors, raise an exception. */ if (!rb_io_wait_writable(fd_num)) { rb_sys_fail("writev()"); } } else if (ret < groups[i].total_size) { /* Not everything in this group has been written. Retry without * writing the bytes that been successfully written. */ e = errno; update_group_written_info(&groups[i], ret); errno = e; rb_io_wait_writable(fd_num); } else { done = 1; } } } return INT2NUM(total_size); } /** * Writes all of the strings in the +components+ array into the given file * descriptor using the +writev()+ system call. Unlike IO#write, this method * does not require one to concatenate all those strings into a single buffer * in order to send the data in a single system call. Thus, #writev is a great * way to perform zero-copy I/O. * * Unlike the raw writev() system call, this method ensures that all given * data is written before returning, by performing multiple writev() calls * and whatever else is necessary. * * writev(@socket.fileno, ["hello ", "world", "\n"]) */ static VALUE f_writev(VALUE self, VALUE fd, VALUE components) { return f_generic_writev(fd, &components, 1); } /** * Like #writev, but accepts two arrays. The data is written in the given order. * * writev2(@socket.fileno, ["hello ", "world", "\n"], ["another ", "message\n"]) */ static VALUE f_writev2(VALUE self, VALUE fd, VALUE components1, VALUE components2) { VALUE array_of_components[2] = { components1, components2 }; return f_generic_writev(fd, array_of_components, 2); } /** * Like #writev, but accepts three arrays. The data is written in the given order. * * writev3(@socket.fileno, * ["hello ", "world", "\n"], * ["another ", "message\n"], * ["yet ", "another ", "one", "\n"]) */ static VALUE f_writev3(VALUE self, VALUE fd, VALUE components1, VALUE components2, VALUE components3) { VALUE array_of_components[3] = { components1, components2, components3 }; return f_generic_writev(fd, array_of_components, 3); } static VALUE process_times(VALUE self) { struct rusage usage; unsigned long long utime, stime; if (getrusage(RUSAGE_SELF, &usage) == -1) { rb_sys_fail("getrusage()"); } utime = (unsigned long long) usage.ru_utime.tv_sec * 1000000 + usage.ru_utime.tv_usec; stime = (unsigned long long) usage.ru_stime.tv_sec * 1000000 + usage.ru_stime.tv_usec; return rb_struct_new(S_ProcessTimes, rb_ull2inum(utime), rb_ull2inum(stime)); } static void * detach_process_main(void *arg) { pid_t pid = (pid_t) (long) arg; int ret; do { ret = waitpid(pid, NULL, 0); } while (ret == -1 && errno == EINTR); return NULL; } static VALUE detach_process(VALUE self, VALUE pid) { pthread_t thr; pthread_attr_t attr; size_t stack_size = 96 * 1024; unsigned long min_stack_size; int stack_min_size_defined; int round_stack_size; #ifdef PTHREAD_STACK_MIN // PTHREAD_STACK_MIN may not be a constant macro so we need // to evaluate it dynamically. min_stack_size = PTHREAD_STACK_MIN; stack_min_size_defined = 1; #else // Assume minimum stack size is 128 KB. min_stack_size = 128 * 1024; stack_min_size_defined = 0; #endif if (stack_size != 0 && stack_size < min_stack_size) { stack_size = min_stack_size; round_stack_size = !stack_min_size_defined; } else { round_stack_size = 1; } if (round_stack_size) { // Round stack size up to page boundary. long page_size; #if defined(_SC_PAGESIZE) page_size = sysconf(_SC_PAGESIZE); #elif defined(_SC_PAGE_SIZE) page_size = sysconf(_SC_PAGE_SIZE); #elif defined(PAGESIZE) page_size = sysconf(PAGESIZE); #elif defined(PAGE_SIZE) page_size = sysconf(PAGE_SIZE); #else page_size = getpagesize(); #endif if (stack_size % page_size != 0) { stack_size = stack_size - (stack_size % page_size) + page_size; } } pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, 1); pthread_attr_setstacksize(&attr, stack_size); pthread_create(&thr, &attr, detach_process_main, (void *) NUM2LONG(pid)); pthread_attr_destroy(&attr); return Qnil; } /** * Freeze the current process forever. On Ruby 1.9 this never unlocks the GIL. * Useful for testing purposes. */ static VALUE freeze_process(VALUE self) { while (1) { usleep(60 * 1000000); } return Qnil; } #if defined(HAVE_KQUEUE) || defined(IN_DOXYGEN) typedef struct { VALUE klass; VALUE filenames; VALUE termination_pipe; /* File descriptor of termination_pipe. */ int termination_fd; /* Whether something went wrong during initialization. */ int preparation_error; /* Information for kqueue. */ unsigned int events_len; int *fds; unsigned int fds_len; int kq; /* When the watcher thread is done it'll write to this pipe * to signal the main (Ruby) thread. */ int notification_fd[2]; /* When the main (Ruby) thread is interrupted it'll write to * this pipe to tell the watcher thread to exit. */ int interruption_fd[2]; } FSWatcher; typedef struct { int fd; ssize_t ret; char byte; int error; } FSWatcherReadByteData; static void fs_watcher_real_close(FSWatcher *watcher) { unsigned int i; if (watcher->kq != -1) { close(watcher->kq); watcher->kq = -1; } if (watcher->notification_fd[0] != -1) { close(watcher->notification_fd[0]); watcher->notification_fd[0] = -1; } if (watcher->notification_fd[1] != -1) { close(watcher->notification_fd[1]); watcher->notification_fd[1] = -1; } if (watcher->interruption_fd[0] != -1) { close(watcher->interruption_fd[0]); watcher->interruption_fd[0] = -1; } if (watcher->interruption_fd[1] != -1) { close(watcher->interruption_fd[1]); watcher->interruption_fd[1] = -1; } if (watcher->fds != NULL) { for (i = 0; i < watcher->fds_len; i++) { close(watcher->fds[i]); } free(watcher->fds); watcher->fds = NULL; watcher->fds_len = 0; } } static void fs_watcher_free(void *obj) { FSWatcher *watcher = (FSWatcher *) obj; fs_watcher_real_close(watcher); free(watcher); } static VALUE fs_watcher_init(VALUE arg) { FSWatcher *watcher = (FSWatcher *) arg; struct kevent *events; VALUE filename; unsigned int i; uint32_t fflags; VALUE filenum; struct stat buf; int fd; /* Open each file in the filenames list and add each one to the events array. */ /* +2 for the termination pipe and the interruption pipe. */ events = alloca((RARRAY_LEN(watcher->filenames) + 2) * sizeof(struct kevent)); watcher->fds = malloc(RARRAY_LEN(watcher->filenames) * sizeof(int)); if (watcher->fds == NULL) { rb_raise(rb_eNoMemError, "Cannot allocate memory."); return Qnil; } for (i = 0; i < RARRAY_LEN(watcher->filenames); i++) { filename = rb_ary_entry(watcher->filenames, i); if (TYPE(filename) != T_STRING) { filename = rb_obj_as_string(filename); } if (stat(RSTRING_PTR(filename), &buf) == -1) { watcher->preparation_error = 1; goto end; } #ifdef O_EVTONLY fd = open(RSTRING_PTR(filename), O_EVTONLY); #else fd = open(RSTRING_PTR(filename), O_RDONLY); #endif if (fd == -1) { watcher->preparation_error = 1; goto end; } watcher->fds[i] = fd; watcher->fds_len++; fflags = NOTE_WRITE | NOTE_EXTEND | NOTE_RENAME | NOTE_DELETE | NOTE_REVOKE; EV_SET(&events[i], fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR, fflags, 0, 0); } watcher->events_len = watcher->fds_len; /* Create pipes for inter-thread communication. */ if (pipe(watcher->notification_fd) == -1) { rb_sys_fail("pipe()"); return Qnil; } if (pipe(watcher->interruption_fd) == -1) { rb_sys_fail("pipe()"); return Qnil; } /* Create a kqueue and register all events. */ watcher->kq = kqueue(); if (watcher->kq == -1) { rb_sys_fail("kqueue()"); return Qnil; } if (watcher->termination_pipe != Qnil) { filenum = rb_funcall(watcher->termination_pipe, rb_intern("fileno"), 0); EV_SET(&events[watcher->events_len], NUM2INT(filenum), EVFILT_READ, EV_ADD | EV_ENABLE | EV_CLEAR, 0, 0, 0); watcher->termination_fd = NUM2INT(filenum); watcher->events_len++; } EV_SET(&events[watcher->events_len], watcher->interruption_fd[0], EVFILT_READ, EV_ADD | EV_ENABLE | EV_CLEAR, 0, 0, 0); watcher->events_len++; if (kevent(watcher->kq, events, watcher->events_len, NULL, 0, NULL) == -1) { rb_sys_fail("kevent()"); return Qnil; } end: if (watcher->preparation_error) { for (i = 0; i < watcher->fds_len; i++) { close(watcher->fds[i]); } free(watcher->fds); watcher->fds = NULL; watcher->fds_len = 0; } return Data_Wrap_Struct(watcher->klass, NULL, fs_watcher_free, watcher); } static VALUE fs_watcher_new(VALUE klass, VALUE filenames, VALUE termination_pipe) { FSWatcher *watcher; VALUE result; int status; Check_Type(filenames, T_ARRAY); watcher = (FSWatcher *) calloc(1, sizeof(FSWatcher)); if (watcher == NULL) { rb_raise(rb_eNoMemError, "Cannot allocate memory."); return Qnil; } watcher->klass = klass; watcher->filenames = filenames; watcher->termination_pipe = termination_pipe; watcher->termination_fd = -1; watcher->kq = -1; watcher->notification_fd[0] = -1; watcher->notification_fd[1] = -1; watcher->interruption_fd[0] = -1; watcher->interruption_fd[1] = -1; result = rb_protect(fs_watcher_init, (VALUE) watcher, &status); if (status) { fs_watcher_free(watcher); rb_jump_tag(status); return Qnil; } else { return result; } } static void * fs_watcher_wait_on_kqueue(void *arg) { FSWatcher *watcher = (FSWatcher *) arg; struct kevent *events; int nevents; ssize_t ret; events = alloca(sizeof(struct kevent) * watcher->events_len); nevents = kevent(watcher->kq, NULL, 0, events, watcher->events_len, NULL); if (nevents == -1) { ret = write(watcher->notification_fd[1], "e", 1); } else if (nevents >= 1 && ( events[0].ident == (uintptr_t) watcher->termination_fd || events[0].ident == (uintptr_t) watcher->interruption_fd[0] )) { ret = write(watcher->notification_fd[1], "t", 1); } else { ret = write(watcher->notification_fd[1], "f", 1); } if (ret == -1) { close(watcher->notification_fd[1]); watcher->notification_fd[1] = -1; } return NULL; } static VALUE fs_watcher_wait_fd(VALUE _fd) { int fd = (int) _fd; rb_thread_wait_fd(fd); return Qnil; } #ifndef TRAP_BEG static VALUE fs_watcher_read_byte_from_fd_wrapper(void *_arg) { FSWatcherReadByteData *data = (FSWatcherReadByteData *) _arg; data->ret = read(data->fd, &data->byte, 1); data->error = errno; return Qnil; } #endif static VALUE fs_watcher_read_byte_from_fd(VALUE _arg) { FSWatcherReadByteData *data = (FSWatcherReadByteData *) _arg; #if defined(TRAP_BEG) TRAP_BEG; data->ret = read(data->fd, &data->byte, 1); TRAP_END; data->error = errno; #elif defined(HAVE_RB_THREAD_IO_BLOCKING_REGION) rb_thread_io_blocking_region(fs_watcher_read_byte_from_fd_wrapper, data, data->fd); #else rb_thread_blocking_region(fs_watcher_read_byte_from_fd_wrapper, data, RUBY_UBF_IO, 0); #endif return Qnil; } static VALUE fs_watcher_wait_for_change(VALUE self) { FSWatcher *watcher; pthread_t thr; ssize_t ret; int e, interrupted = 0; FSWatcherReadByteData read_data; Data_Get_Struct(self, FSWatcher, watcher); if (watcher->preparation_error) { return Qfalse; } /* Spawn a thread, and let the thread perform the blocking kqueue * wait. When kevent() returns the thread will write its status to the * notification pipe. In the mean time we let the Ruby interpreter wait * on the other side of the pipe for us so that we don't block Ruby * threads. */ e = pthread_create(&thr, NULL, fs_watcher_wait_on_kqueue, watcher); if (e != 0) { errno = e; rb_sys_fail("pthread_create()"); return Qnil; } /* Note that rb_thread_wait() does not wait for the fd when the app * is single threaded, so we must join the thread after we've read * from the notification fd. */ rb_protect(fs_watcher_wait_fd, (VALUE) watcher->notification_fd[0], &interrupted); if (interrupted) { /* We got interrupted so tell the watcher thread to exit. */ ret = write(watcher->interruption_fd[1], "x", 1); if (ret == -1) { e = errno; fs_watcher_real_close(watcher); errno = e; rb_sys_fail("write() to interruption pipe"); return Qnil; } pthread_join(thr, NULL); /* Now clean up stuff. */ fs_watcher_real_close(watcher); rb_jump_tag(interrupted); return Qnil; } read_data.fd = watcher->notification_fd[0]; rb_protect(fs_watcher_read_byte_from_fd, (VALUE) &read_data, &interrupted); if (interrupted) { /* We got interrupted so tell the watcher thread to exit. */ ret = write(watcher->interruption_fd[1], "x", 1); if (ret == -1) { e = errno; fs_watcher_real_close(watcher); errno = e; rb_sys_fail("write() to interruption pipe"); return Qnil; } pthread_join(thr, NULL); /* Now clean up stuff. */ fs_watcher_real_close(watcher); rb_jump_tag(interrupted); return Qnil; } pthread_join(thr, NULL); if (read_data.ret == -1) { fs_watcher_real_close(watcher); errno = read_data.error; rb_sys_fail("read()"); return Qnil; } else if (read_data.ret == 0) { fs_watcher_real_close(watcher); errno = read_data.error; rb_raise(rb_eRuntimeError, "Unknown error: unexpected EOF"); return Qnil; } else if (read_data.byte == 't') { /* termination_fd or interruption_fd became readable */ return Qnil; } else if (read_data.byte == 'f') { /* a file or directory changed */ return Qtrue; } else { fs_watcher_real_close(watcher); errno = read_data.error; rb_raise(rb_eRuntimeError, "Unknown error: unexpected notification data"); return Qnil; } } static VALUE fs_watcher_close(VALUE self) { FSWatcher *watcher; Data_Get_Struct(self, FSWatcher, watcher); fs_watcher_real_close(watcher); return Qnil; } #endif /***************************/ void Init_passenger_native_support() { struct sockaddr_un addr; /* Only defined on Ruby >= 1.9.3 */ #ifdef RUBY_API_VERSION_CODE if (ruby_api_version[0] != RUBY_API_VERSION_MAJOR || ruby_api_version[1] != RUBY_API_VERSION_MINOR || ruby_api_version[2] != RUBY_API_VERSION_TEENY) { fprintf(stderr, " --> passenger_native_support was compiled for Ruby API version %d.%d.%d, " "but you're currently running a Ruby interpreter with API version %d.%d.%d.\n", RUBY_API_VERSION_MAJOR, RUBY_API_VERSION_MINOR, RUBY_API_VERSION_TEENY, ruby_api_version[0], ruby_api_version[1], ruby_api_version[2]); fprintf(stderr, " Refusing to load existing passenger_native_support.\n"); return; } /* Because native extensions may be linked to libruby, loading * a Ruby 1.9 native extension may not fail on Ruby 1.8 (even though * the extension will crash later on). We detect such a case here and * abort early. */ if (strlen(ruby_version) >= sizeof("1.8.7") - 1 && ruby_version[0] == '1' && ruby_version[1] == '.' && ruby_version[2] == '8') { fprintf(stderr, " --> passenger_native_support was compiled for Ruby %d.%d, " "but you're currently running Ruby %s\n", RUBY_API_VERSION_MAJOR, RUBY_API_VERSION_MINOR, ruby_version); fprintf(stderr, " Refusing to load existing passenger_native_support.\n"); return; } #else /* Ruby 1.8 - 1.9.2 */ /* We may not have included Ruby 1.8's version.h because of compiler * header file search paths, so we can't rely on RUBY_VERSION being * defined. */ #ifdef RUBY_VERSION #define ESTIMATED_RUBY_VERSION RUBY_VERSION #else #ifdef HAVE_RUBY_IO_H #define ESTIMATED_RUBY_VERSION "1.9.1 or 1.9.2" #else #define ESTIMATED_RUBY_VERSION "1.8" #endif #endif #ifdef HAVE_RUBY_IO_H #define ESTIMATED_RUBY_MINOR_VERSION '9' #else #define ESTIMATED_RUBY_MINOR_VERSION '8' #endif if (strlen(ruby_version) < sizeof("1.8.7") - 1 || ruby_version[0] != '1' || ruby_version[1] != '.' || ruby_version[2] != ESTIMATED_RUBY_MINOR_VERSION) { fprintf(stderr, " --> passenger_native_support was compiled for Ruby %s, " "but you're currently running Ruby %s\n", ESTIMATED_RUBY_VERSION, ruby_version); fprintf(stderr, " Refusing to load existing passenger_native_support.\n"); return; } #endif mPassenger = rb_define_module("PhusionPassenger"); /* * Utility functions for accessing system functionality. */ mNativeSupport = rb_define_module_under(mPassenger, "NativeSupport"); S_ProcessTimes = rb_struct_define("ProcessTimes", "utime", "stime", NULL); rb_define_singleton_method(mNativeSupport, "disable_stdio_buffering", disable_stdio_buffering, 0); rb_define_singleton_method(mNativeSupport, "split_by_null_into_hash", split_by_null_into_hash, 1); rb_define_singleton_method(mNativeSupport, "writev", f_writev, 2); rb_define_singleton_method(mNativeSupport, "writev2", f_writev2, 3); rb_define_singleton_method(mNativeSupport, "writev3", f_writev3, 4); rb_define_singleton_method(mNativeSupport, "process_times", process_times, 0); rb_define_singleton_method(mNativeSupport, "detach_process", detach_process, 1); rb_define_singleton_method(mNativeSupport, "freeze_process", freeze_process, 0); #ifdef HAVE_KQUEUE cFileSystemWatcher = rb_define_class_under(mNativeSupport, "FileSystemWatcher", rb_cObject); rb_define_singleton_method(cFileSystemWatcher, "_new", fs_watcher_new, 2); rb_define_method(cFileSystemWatcher, "wait_for_change", fs_watcher_wait_for_change, 0); rb_define_method(cFileSystemWatcher, "close", fs_watcher_close, 0); #endif /* The maximum length of a Unix socket path, including terminating null. */ rb_define_const(mNativeSupport, "UNIX_PATH_MAX", INT2NUM(sizeof(addr.sun_path))); /* The maximum size of the data that may be passed to #writev. */ rb_define_const(mNativeSupport, "SSIZE_MAX", LL2NUM(SSIZE_MAX)); } passenger-4.0.37/ext/oxt/backtrace.hpp000644 000765 000024 00000010706 12233035540 020262 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _OXT_BACKTRACE_HPP_ #define _OXT_BACKTRACE_HPP_ /** * Portable C++ backtrace support. * * C++ doesn't provide a builtin, automatic, portable way of obtaining * backtraces. Obtaining a backtrace via a debugger (e.g. gdb) is very * expensive. Furthermore, not all machines have a debugger installed. * This makes it very hard to debug problems on production servers. * * This file provides a portable way of specifying and obtaining * backtraces. Via oxt::thread::all_backtraces(), it is even possible * to obtain the backtraces of all running threads. * *

Initialization

* Every thread that is to contain backtrace information must be * initialized. This is done by creating a `thread_local_context` object, * and calling `set_thread_local_context()` with that object. * `oxt::initialize()` automatically does this for the calling thread, * and `oxt::thread` does this automatically as well. * *

Basic usage

* Backtrace points must be specified manually in the code using TRACE_POINT(). * The TracableException class allows one to obtain the backtrace at the moment * the exception object was created. * * For example: * @code * void foo() { * TRACE_POINT(); * do_something(); * bar(); * do_something_else(); * } * * void bar() { * TRACE_POINT(); * throw TracableException(); * } * @encode * * One can obtain the backtrace string, as follows: * @code * try { * foo(); * } catch (const TracableException &e) { * cout << "Something bad happened:\n" << e.backtrace(); * } * @endcode * * This will print something like: * @code * Something bad happened: * in 'bar' (example.cpp:123) * in 'foo' (example.cpp:117) * in 'example_function' (example.cpp:456) * @encode * *

Making sure the line number is correct

* A TRACE_POINT() call will add a backtrace point for the source line on * which it is written. However, this causes an undesirable effect in long * functions: * @code * 100 void some_long_function() { * 101 TRACE_POINT(); * 102 do_something(); * 103 for (...) { * 104 do_something(); * 105 } * 106 do_something_else(); * 107 * 108 if (!write_file()) { * 109 throw TracableException(); * 110 } * 111 } * @endcode * You will want the thrown exception to show a backtrace line number that's * near line 109. But as things are now, the backtrace will show line 101. * * This can be solved by calling UPDATE_TRACE_POINT() from time to time: * @code * 100 void some_long_function() { * 101 TRACE_POINT(); * 102 do_something(); * 103 for (...) { * 104 do_something(); * 105 } * 106 do_something_else(); * 107 * 108 if (!write_file()) { * 109 UPDATE_TRACE_POINT(); // Added! * 110 throw TracableException(); * 111 } * 112 } * @endcode * *

Compilation options

* Define OXT_DISABLE_BACKTRACES to disable backtrace support. The backtrace * functions as provided by this header will become empty stubs. */ #if defined(NDEBUG) || defined(OXT_DISABLE_BACKTRACES) #include "detail/backtrace_disabled.hpp" #else #include "detail/backtrace_enabled.hpp" #endif #endif /* _OXT_BACKTRACE_HPP_ */ passenger-4.0.37/ext/oxt/detail/000755 000765 000024 00000000000 12233035540 017070 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/oxt/dynamic_thread_group.hpp000644 000765 000024 00000015636 12233035540 022541 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010-2013 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _OXT_DYNAMIC_THREAD_GROUP_HPP_ #define _OXT_DYNAMIC_THREAD_GROUP_HPP_ #include #include #include #include #include #include #include namespace oxt { using namespace std; using namespace boost; /** * A thread group is a collection of threads. One can run aggregate * operations on it, such as interrupting and joining all threads * in the thread group. * * Unlike boost::thread_group, an oxt::dynamic_thread_group * supports oxt::thread, and automatically removes terminated threads * from its collection, hence 'dynamic' in the name. * * Threads in the group are guaranteed to have a shorter life time * than the group itself: upon destruction, all threads in the group * will be interrupted and joined by calling interrupt_and_join_all(). */ class dynamic_thread_group { private: struct thread_handle; typedef boost::shared_ptr thread_handle_ptr; /** A container which aggregates a thread object * as well as the its own iterator in the 'thread_handles' * member. The latter is used for removing itself from * 'thread_handles'. */ struct thread_handle { list::iterator iterator; thread *thr; bool removed_from_list; thread_handle() { thr = NULL; removed_from_list = false; } ~thread_handle() { delete thr; } }; /** A mutex which protects thread_handles and nthreads. */ mutable boost::mutex lock; /** The internal list of threads. */ list thread_handles; /** The number of threads in this thread group. */ unsigned int nthreads; struct thread_cleanup { dynamic_thread_group *thread_group; thread_handle *handle; thread_cleanup(dynamic_thread_group *g, thread_handle *h) { thread_group = g; handle = h; } ~thread_cleanup() { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; boost::lock_guard l(thread_group->lock); if (!handle->removed_from_list) { thread_group->thread_handles.erase(handle->iterator); thread_group->nthreads--; } } }; void thread_main(boost::function &func, thread_handle *handle) { thread_cleanup c(this, handle); func(); } public: dynamic_thread_group() { nthreads = 0; } ~dynamic_thread_group() { interrupt_and_join_all(); } /** * Create a new thread that belongs to this thread group. * * @param func The thread main function. * @param name A name for this thread. If the empty string is passed, * then an auto-generated name will be used. * @param stack_size The stack size for this thread. A value of 0 means * that the system's default stack size should be used. * @throws thread_resource_error Cannot create a thread. * @post this->num_threads() == old->num_threads() + 1 */ void create_thread(const boost::function &func, const string &name = "", unsigned int stack_size = 0) { boost::lock_guard l(lock); thread_handle_ptr handle(new thread_handle()); thread_handles.push_back(handle); handle->iterator = thread_handles.end(); handle->iterator--; try { handle->thr = new thread( boost::bind(&dynamic_thread_group::thread_main, this, func, handle.get()), name, stack_size ); nthreads++; } catch (...) { thread_handles.erase(handle->iterator); throw; } } void interrupt_all() { boost::unique_lock l(lock); list::iterator it; for (it = thread_handles.begin(); it != thread_handles.end(); it++) { (*it)->thr->interrupt(); } } /** * Interrupt and join all threads in this group. * * @post num_threads() == 0 */ void interrupt_and_join_all(bool interruptSyscalls = true) { /* While interrupting and joining the threads, each thread * will try to lock the mutex and remove itself from * 'thread_handles'. We want to avoid deadlocks so we * empty 'thread_handles' in the critical section and * join the threads outside the critical section. */ boost::unique_lock l(lock); list thread_handles_copy; list::iterator it; thread_handle_ptr handle; unsigned int nthreads_copy = nthreads; vector threads; unsigned int i = 0; // We make a copy so that the handles aren't destroyed prematurely. threads.reserve(nthreads); thread_handles_copy = thread_handles; for (it = thread_handles.begin(); it != thread_handles.end(); it++, i++) { handle = *it; handle->removed_from_list = true; threads[i] = handle->thr; } thread_handles.clear(); nthreads = 0; l.unlock(); thread::interrupt_and_join_multiple(&threads[0], nthreads_copy, interruptSyscalls); } void join_all() { // See comments from interrupt_and_join_all(). boost::unique_lock l(lock); list thread_handles_copy; list::iterator it; thread_handle_ptr handle; unsigned int nthreads_copy = nthreads; vector threads; unsigned int i = 0; // We make a copy so that the handles aren't destroyed prematurely. threads.reserve(nthreads); thread_handles_copy = thread_handles; for (it = thread_handles.begin(); it != thread_handles.end(); it++, i++) { handle = *it; handle->removed_from_list = true; threads[i] = handle->thr; } thread_handles.clear(); nthreads = 0; l.unlock(); for (i = 0; i < nthreads_copy; i++) { threads[i]->join(); } } /** * Returns the number of threads currently in this thread group. */ unsigned int num_threads() const { boost::lock_guard l(lock); return nthreads; } }; } // namespace oxt #endif /* _OXT_DYNAMIC_THREAD_GROUP_HPP_ */ passenger-4.0.37/ext/oxt/implementation.cpp000644 000765 000024 00000026362 12233035540 021370 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2008-2013 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include "tracable_exception.hpp" #include "backtrace.hpp" #include "macros.hpp" #include "thread.hpp" #include "spin_lock.hpp" #include "detail/context.hpp" #ifdef __linux__ #include #endif #ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED #include #include #include #endif namespace oxt { using namespace std; using namespace boost; static global_context_t *global_context = NULL; /* * boost::thread_specific_storage is pretty expensive. So we use the __thread * keyword whenever possible - that's almost free. */ #ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED static __thread thread_local_context_ptr *local_context = NULL; static void init_thread_local_context_support() { /* Do nothing. */ } void set_thread_local_context(const thread_local_context_ptr &ctx) { local_context = new thread_local_context_ptr(ctx); } static void free_thread_local_context() { delete local_context; local_context = NULL; } thread_local_context * get_thread_local_context() { if (OXT_LIKELY(local_context != NULL)) { return local_context->get(); } else { return NULL; } } #else /* * This is a *pointer* to a thread_specific_ptr because, once * we've created a thread_specific_ptr, we never want to destroy it * in order to avoid C++'s global variable destruction. All kinds * of cleanup code may depend on local_context and because global * variable destruction order is undefined, we just want to keep * this object alive until the OS cleans it up. */ static thread_specific_ptr *local_context = NULL; static void init_thread_local_context_support() { local_context = new thread_specific_ptr(); } void set_thread_local_context(const thread_local_context_ptr &ctx) { if (local_context != NULL) { local_context->reset(new thread_local_context_ptr(ctx)); } } static void free_thread_local_context() { if (local_context != NULL) { local_context->reset(); } } thread_local_context * get_thread_local_context() { if (OXT_LIKELY(local_context != NULL)) { thread_local_context_ptr *pointer = local_context->get(); if (OXT_LIKELY(pointer != NULL)) { return pointer->get(); } else { return NULL; } } else { return NULL; } } #endif #ifdef OXT_BACKTRACE_IS_ENABLED trace_point::trace_point(const char *_function, const char *_source, unsigned short _line, const char *_data) : function(_function), source(_source), data(_data), line(_line), m_detached(false) { thread_local_context *ctx = get_thread_local_context(); if (OXT_LIKELY(ctx != NULL)) { spin_lock::scoped_lock l(ctx->backtrace_lock); ctx->backtrace_list.push_back(this); } else { m_detached = true; } } trace_point::trace_point(const char *_function, const char *_source, unsigned short _line, const char *_data, const detached &detached_tag) : function(_function), source(_source), data(_data), line(_line), m_detached(true) { } trace_point::~trace_point() { if (OXT_LIKELY(!m_detached)) { thread_local_context *ctx = get_thread_local_context(); if (OXT_LIKELY(ctx != NULL)) { spin_lock::scoped_lock l(ctx->backtrace_lock); assert(!ctx->backtrace_list.empty()); ctx->backtrace_list.pop_back(); } } } void trace_point::update(const char *source, unsigned short line) { this->source = source; this->line = line; } tracable_exception::tracable_exception() { thread_local_context *ctx = get_thread_local_context(); if (OXT_LIKELY(ctx != NULL)) { spin_lock::scoped_lock l(ctx->backtrace_lock); vector::const_iterator it, end = ctx->backtrace_list.end(); backtrace_copy.reserve(ctx->backtrace_list.size()); for (it = ctx->backtrace_list.begin(); it != end; it++) { trace_point *p = new trace_point( (*it)->function, (*it)->source, (*it)->line, (*it)->data, trace_point::detached()); backtrace_copy.push_back(p); } } } tracable_exception::tracable_exception(const tracable_exception &other) : std::exception() { vector::const_iterator it, end = other.backtrace_copy.end(); backtrace_copy.reserve(other.backtrace_copy.size()); for (it = other.backtrace_copy.begin(); it != end; it++) { trace_point *p = new trace_point( (*it)->function, (*it)->source, (*it)->line, (*it)->data, trace_point::detached()); backtrace_copy.push_back(p); } } tracable_exception::tracable_exception(const no_backtrace &tag) : std::exception() { // Do nothing. } tracable_exception::~tracable_exception() throw() { vector::iterator it, end = backtrace_copy.end(); for (it = backtrace_copy.begin(); it != end; it++) { delete *it; } } template static string format_backtrace(const Collection &backtrace_list) { if (backtrace_list.empty()) { return " (empty)"; } else { backtrace_list.rbegin(); stringstream result; typename Collection::const_reverse_iterator it; for (it = backtrace_list.rbegin(); it != backtrace_list.rend(); it++) { const trace_point *p = *it; result << " in '" << p->function << "'"; if (p->source != NULL) { const char *source = strrchr(p->source, '/'); if (source != NULL) { source++; } else { source = p->source; } result << " (" << source << ":" << p->line << ")"; if (p->data != NULL) { result << " -- " << p->data; } } result << endl; } return result.str(); } } string tracable_exception::backtrace() const throw() { return format_backtrace< vector >(backtrace_copy); } const char * tracable_exception::what() const throw() { return "oxt::tracable_exception"; } #endif /* OXT_BACKTRACE_IS_ENABLED */ void initialize() { global_context = new global_context_t(); init_thread_local_context_support(); // For some reason make_shared() crashes here when compiled with clang 3.2 on OS X. // Clang bug? We use 'new' to work around it. thread_local_context_ptr ctx = thread_local_context::make_shared_ptr(); ctx->thread_number = 1; ctx->thread_name = "Main thread"; set_thread_local_context(ctx); ctx->thread = pthread_self(); global_context->registered_threads.push_back(ctx); ctx->iterator = global_context->registered_threads.end(); ctx->iterator--; } global_context_t::global_context_t() : next_thread_number(2) { } thread_local_context_ptr thread_local_context::make_shared_ptr() { // For some reason make_shared() crashes here when compiled with clang 3.2 on OS X. // Clang bug? We use 'new' to work around it. return thread_local_context_ptr(new thread_local_context()); } thread_local_context::thread_local_context() : thread_number(0) { thread = pthread_self(); #ifdef __linux__ tid = syscall(SYS_gettid); #endif syscall_interruption_lock.lock(); #ifdef OXT_BACKTRACE_IS_ENABLED backtrace_list.reserve(50); #endif } string thread::make_thread_name(const string &given_name) { if (given_name.empty()) { if (OXT_LIKELY(global_context != NULL)) { stringstream str; str << "Thread #"; { boost::lock_guard l(global_context->thread_registration_mutex); str << global_context->next_thread_number; } return str.str(); } else { return "(unknown)"; } } else { return given_name; } } void thread::thread_main(const boost::function func, thread_local_context_ptr ctx) { set_thread_local_context(ctx); if (OXT_LIKELY(global_context != NULL)) { boost::lock_guard l(global_context->thread_registration_mutex); ctx->thread = pthread_self(); global_context->next_thread_number++; global_context->registered_threads.push_back(ctx); ctx->iterator = global_context->registered_threads.end(); ctx->iterator--; // Set this after setting 'iterator' to indicate // that push_back() has succeeded. ctx->thread_number = global_context->next_thread_number; } try { func(); } catch (const thread_interrupted &) { // Do nothing. } // We don't care about other exceptions because they'll crash the process anyway. if (OXT_LIKELY(global_context != NULL)) { boost::lock_guard l(global_context->thread_registration_mutex); thread_local_context *ctx = get_thread_local_context(); if (ctx != 0 && ctx->thread_number != 0) { global_context->registered_threads.erase(ctx->iterator); ctx->thread_number = 0; } } free_thread_local_context(); } std::string thread::name() const throw() { return context->thread_name; } std::string thread::backtrace() const throw() { #ifdef OXT_BACKTRACE_IS_ENABLED spin_lock::scoped_lock l(context->backtrace_lock); return format_backtrace(context->backtrace_list); #else return " (backtrace support disabled during compile time)"; #endif } string thread::all_backtraces() throw() { #ifdef OXT_BACKTRACE_IS_ENABLED if (OXT_LIKELY(global_context != NULL)) { boost::lock_guard l(global_context->thread_registration_mutex); list::const_iterator it; std::stringstream result; for (it = global_context->registered_threads.begin(); it != global_context->registered_threads.end(); it++) { thread_local_context_ptr ctx = *it; result << "Thread '" << ctx->thread_name << "' (" << hex << showbase << ctx->thread << dec; #ifdef __linux__ result << ", LWP " << ctx->tid; #endif result << "):" << endl; spin_lock::scoped_lock l(ctx->backtrace_lock); std::string bt = format_backtrace(ctx->backtrace_list); result << bt; if (bt.empty() || bt[bt.size() - 1] != '\n') { result << endl; } result << endl; } return result.str(); } else { return "(OXT not initialized)"; } #else return "(backtrace support disabled during compile time)"; #endif } void thread::interrupt(bool interruptSyscalls) { int ret; boost::thread::interrupt(); if (interruptSyscalls && context->syscall_interruption_lock.try_lock()) { do { ret = pthread_kill(native_handle(), INTERRUPTION_SIGNAL); } while (ret == EINTR); context->syscall_interruption_lock.unlock(); } } } // namespace oxt passenger-4.0.37/ext/oxt/initialize.hpp000644 000765 000024 00000003026 12233035540 020501 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2012 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _OXT_INITIALIZE_HPP_ #define _OXT_INITIALIZE_HPP_ namespace oxt { /** * OXT must be initialized for a lot of things to work properly. * This does not enable system call interruption. Call setup_syscall_interruption_support() * for that. */ void initialize(); } // namespace oxt #endif /* _OXT_INITIALIZE_HPP_ */ passenger-4.0.37/ext/oxt/macros.hpp000644 000765 000024 00000007503 12233035540 017630 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010-2013 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _OXT_MACROS_HPP_ #define _OXT_MACROS_HPP_ /** * Specialized macros. * * These macros provide more specialized features which are not needed * so often by application programmers. */ #define OXT_GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) #if (defined(__GNUC__) && (__GNUC__ > 2)) || defined(IN_DOXYGEN) /** * Indicate that the given expression is likely to be true. * This allows the CPU to better perform branch prediction. */ #define OXT_LIKELY(expr) __builtin_expect((expr), 1) /** * Indicate that the given expression is likely to be false. * This allows the CPU to better perform branch prediction. */ #define OXT_UNLIKELY(expr) __builtin_expect((expr), 0) /** * Force inlining of the given function. */ #define OXT_FORCE_INLINE __attribute__((always_inline)) #if __GNUC__ >= 4 #define OXT_RESTRICT __restrict__ #else #define OXT_RESTRICT #endif #ifndef restrict /** * The C99 'restrict' keyword, now usable in C++. */ #define restrict OXT_RESTRICT #endif #ifndef restrict_ref /** * The C99 'restrict' keyword, for use with C++ references. * On compilers that support 'restrict' in C++ but not on * references, this macro does nothing. */ #define restrict_ref OXT_RESTRICT #endif #else #define OXT_LIKELY(expr) expr #define OXT_UNLIKELY(expr) expr #define OXT_FORCE_INLINE #define restrict #define restrict_ref #endif /* * GCC supports the __thread keyword on x86 since version 3.3, but versions earlier * than 4.1.2 have bugs (http://gcc.gnu.org/ml/gcc-bugs/2006-09/msg02275.html). * * FreeBSD 5 supports the __thread keyword, and everything works fine in * micro-tests, but in mod_passenger the thread-local variables are initialized * to unaligned addresses for some weird reason, thereby causing bus errors. * * GCC on OpenBSD supports __thread, but any access to such a variable * results in a segfault. * * Solaris does support __thread, but often it's not compiled into default GCC * packages (not to mention it's not available for Sparc). Playing it safe... * * On MacOS X, neither gcc nor llvm-gcc support the __thread keyword, but Clang * does. It works on at least clang >= 3.0. */ #ifndef PASSENGER_DISABLE_THREAD_LOCAL_STORAGE #if defined(__APPLE__) #if defined(__clang__) && __clang_major__ >= 3 #define OXT_THREAD_LOCAL_KEYWORD_SUPPORTED #endif #elif defined(__GNUC__) && OXT_GCC_VERSION >= 40102 #if !defined(__SOLARIS__) && !defined(__OpenBSD__) #define OXT_THREAD_LOCAL_KEYWORD_SUPPORTED #endif #endif #endif #endif /* _OXT_MACROS_HPP_ */ passenger-4.0.37/ext/oxt/Readme.txt000644 000765 000024 00000001065 12233035540 017566 0ustar00honglistaff000000 000000 == Introduction OXT, OS eXtensions for boosT, is a utility library that provides important functionality that's necessary for writing robust server software. It provides essential things that should be part of C++, but unfortunately isn't, such as: - System call interruption support. This is important for multithreaded software that can block on system calls. - Support for backtraces. == Compilation and usage Compile all .cpp files and link them into your program. No special build tools are required. OXT depends on a specially patched version of Boost. passenger-4.0.37/ext/oxt/spin_lock.hpp000644 000765 000024 00000004246 12233035540 020326 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010-2012 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _OXT_SPIN_LOCK_HPP_ #define _OXT_SPIN_LOCK_HPP_ #include "macros.hpp" // These operating systems don't support pthread spin locks: // - OpenBSD 4.3 (last checked: July 22, 2008) // - Solaris 9 (last checked: July 22, 2008) // - MacOS X (last checked: July 22, 2012) #if defined(__OpenBSD__) || defined(__SOLARIS9__) || defined(__APPLE__) #define OXT_NO_PTHREAD_SPINLOCKS #endif #if defined(__APPLE__) #include "detail/spin_lock_darwin.hpp" #elif (OXT_GCC_VERSION > 40100 && (defined(__i386__) || defined(__x86_64__))) || defined(IN_DOXYGEN) // GCC 4.0 doesn't support __sync instructions while GCC 4.2 // does. I'm not sure whether support for it started in 4.1 or // 4.2, so the above version check may have to be changed later. #include "detail/spin_lock_gcc_x86.hpp" #elif !defined(WIN32) && !defined(OXT_NO_PTHREAD_SPINLOCKS) #include "detail/spin_lock_pthreads.hpp" #else #include "detail/spin_lock_portable.hpp" #endif #endif /* _OXT_SPIN_LOCK_HPP_ */ passenger-4.0.37/ext/oxt/system_calls.cpp000644 000765 000024 00000037773 12233035540 021055 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010-2013 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include "system_calls.hpp" #include "detail/context.hpp" #include #include using namespace boost; using namespace oxt; /************************************* * oxt *************************************/ static const ErrorChance *errorChances = NULL; static unsigned int nErrorChances = 0; static void interruption_signal_handler(int sig) { // Do nothing. } void oxt::setup_syscall_interruption_support() { struct sigaction action; sigset_t signal_set; int ret; /* Very important! The signal mask is inherited across fork() * and exec() and we don't know what the parent process did to * us. At least on OS X, having a signal mask blocking important * signals can lead to stuff like waitpid() malfunction. */ sigemptyset(&signal_set); do { ret = sigprocmask(SIG_SETMASK, &signal_set, NULL); } while (ret == -1 && errno == EINTR); action.sa_handler = interruption_signal_handler; action.sa_flags = 0; sigemptyset(&action.sa_mask); do { ret = sigaction(INTERRUPTION_SIGNAL, &action, NULL); } while (ret == -1 && errno == EINTR); do { ret = siginterrupt(INTERRUPTION_SIGNAL, 1); } while (ret == -1 && errno == EINTR); } void oxt::setup_random_failure_simulation(const ErrorChance *_errorChances, unsigned int n) { if (n > OXT_MAX_ERROR_CHANCES) { throw std::runtime_error("Number of error chances may not exceed OXT_MAX_ERROR_CHANCES"); } ErrorChance *storage = new ErrorChance[n]; for (unsigned int i = 0; i < n; i++) { storage[i] = _errorChances[i]; } errorChances = storage; nErrorChances = n; } static bool shouldSimulateFailure() { if (nErrorChances > 0) { double number = random() / (double) RAND_MAX; const ErrorChance *candidates[OXT_MAX_ERROR_CHANCES]; unsigned int i, n = 0; for (i = 0; i < nErrorChances; i++) { if (number <= errorChances[i].chance) { candidates[n] = &errorChances[i]; n++; } } if (n > 0) { int choice = random() % n; errno = candidates[choice]->errorCode; return true; } else { return false; } } else { return false; } } /************************************* * Passenger::syscalls *************************************/ #define CHECK_INTERRUPTION(error_expression, allowSimulatingFailure, error_assignment, code) \ do { \ if (allowSimulatingFailure && shouldSimulateFailure()) { \ error_assignment; \ break; \ } \ thread_local_context *ctx = get_thread_local_context(); \ if (OXT_UNLIKELY(ctx != NULL)) { \ ctx->syscall_interruption_lock.unlock(); \ } \ int _my_errno; \ bool _intr_requested = false; \ do { \ code; \ _my_errno = errno; \ } while ((error_expression) \ && _my_errno == EINTR \ && (!this_thread::syscalls_interruptable() \ || !(_intr_requested = this_thread::interruption_requested())) \ ); \ if (OXT_UNLIKELY(ctx != NULL)) { \ ctx->syscall_interruption_lock.lock(); \ } \ if ((error_expression) \ && _my_errno == EINTR \ && this_thread::syscalls_interruptable() \ && _intr_requested) { \ throw thread_interrupted(); \ } \ errno = _my_errno; \ } while (false) int syscalls::open(const char *path, int oflag) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::open(path, oflag) ); return ret; } int syscalls::open(const char *path, int oflag, mode_t mode) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::open(path, oflag, mode) ); return ret; } ssize_t syscalls::read(int fd, void *buf, size_t count) { ssize_t ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::read(fd, buf, count) ); return ret; } ssize_t syscalls::write(int fd, const void *buf, size_t count) { ssize_t ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::write(fd, buf, count) ); return ret; } ssize_t syscalls::writev(int fd, const struct iovec *iov, int iovcnt) { ssize_t ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::writev(fd, iov, iovcnt) ); return ret; } int syscalls::close(int fd) { /* Apparently POSIX says that if close() returns EINTR the * file descriptor will be left in an undefined state, so * when coding for POSIX we can't just loop on EINTR or we * could run into race conditions with other threads. * http://www.daemonology.net/blog/2011-12-17-POSIX-close-is-broken.html * * On Linux, FreeBSD and OpenBSD, close() releases the file * descriptor when it returns EINTR. HP-UX does not. * http://news.ycombinator.com/item?id=3363884 * * MacOS X is insane because although the system call does * release the file descriptor, the close() function as * implemented by libSystem may call pthread_testcancel() first * which can also return EINTR. Whether this happens depends * on whether unix2003 is enabled. * http://www.reddit.com/r/programming/comments/ng6vt/posix_close2_is_broken/c38xrgu */ #if defined(_hpux) int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::close(fd) ); return ret; #else if (shouldSimulateFailure()) { return -1; } thread_local_context *ctx = get_thread_local_context(); if (OXT_UNLIKELY(ctx != NULL)) { ctx->syscall_interruption_lock.unlock(); } /* TODO: If it's not known whether the OS releases the file * descriptor on EINTR-on-close(), we should print some kind of * warning here. This would actually explain why some people get * mysterious EBADF errors. I think the best thing we can do is * to manually whitelist operating systems as we find out their * behaviors. */ int ret = ::close(fd); if (OXT_UNLIKELY(ctx != NULL)) { int e = errno; ctx->syscall_interruption_lock.lock(); errno = e; } if (ret == -1 && errno == EINTR && this_thread::syscalls_interruptable() && this_thread::interruption_requested()) { throw thread_interrupted(); } else { return ret; } #endif } int syscalls::pipe(int filedes[2]) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::pipe(filedes) ); return ret; } int syscalls::dup2(int filedes, int filedes2) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::dup2(filedes, filedes2) ); return ret; } int syscalls::mkdir(const char *pathname, mode_t mode) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::mkdir(pathname, mode) ); return ret; } int syscalls::chown(const char *path, uid_t owner, gid_t group) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::chown(path, owner, group) ); return ret; } int syscalls::accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::accept(sockfd, addr, addrlen) ); return ret; } int syscalls::bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::bind(sockfd, addr, addrlen) ); return ret; } int syscalls::connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen) { int ret; // FIXME: I don't think this is entirely correct. // http://www.madore.org/~david/computers/connect-intr.html CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::connect(sockfd, serv_addr, addrlen); ); return ret; } int syscalls::listen(int sockfd, int backlog) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::listen(sockfd, backlog) ); return ret; } int syscalls::socket(int domain, int type, int protocol) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::socket(domain, type, protocol) ); return ret; } int syscalls::socketpair(int d, int type, int protocol, int sv[2]) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::socketpair(d, type, protocol, sv) ); return ret; } ssize_t syscalls::recvmsg(int s, struct msghdr *msg, int flags) { ssize_t ret; #ifdef _AIX53 CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::nrecvmsg(s, msg, flags) ); #else CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::recvmsg(s, msg, flags) ); #endif return ret; } ssize_t syscalls::sendmsg(int s, const struct msghdr *msg, int flags) { ssize_t ret; #ifdef _AIX53 CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::nsendmsg(s, msg, flags) ); #else CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::sendmsg(s, msg, flags) ); #endif return ret; } int syscalls::setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::setsockopt(s, level, optname, optval, optlen) ); return ret; } int syscalls::shutdown(int s, int how) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::shutdown(s, how) ); return ret; } int syscalls::select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::select(nfds, readfds, writefds, errorfds, timeout) ); return ret; } int syscalls::poll(struct pollfd fds[], nfds_t nfds, int timeout) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::poll(fds, nfds, timeout) ); return ret; } FILE * syscalls::fopen(const char *path, const char *mode) { FILE *ret; CHECK_INTERRUPTION( ret == NULL, true, ret = NULL, ret = ::fopen(path, mode) ); return ret; } size_t syscalls::fread(void *ptr, size_t size, size_t nitems, FILE *stream) { int ret; CHECK_INTERRUPTION( ret == 0 && ferror(stream), true, ret = 0, ret = ::fread(ptr, size, nitems, stream) ); return ret; } int syscalls::fclose(FILE *fp) { int ret; CHECK_INTERRUPTION( ret == EOF, true, ret = EOF, ret = ::fclose(fp) ); return ret; } int syscalls::unlink(const char *pathname) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::unlink(pathname) ); return ret; } int syscalls::stat(const char *path, struct stat *buf) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::stat(path, buf) ); return ret; } int syscalls::lstat(const char *path, struct stat *buf) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::lstat(path, buf) ); return ret; } time_t syscalls::time(time_t *t) { time_t ret; CHECK_INTERRUPTION( ret == (time_t) -1, false, (void) 0, ret = ::time(t) ); return ret; } unsigned int syscalls::sleep(unsigned int seconds) { // We use syscalls::nanosleep() here not only to reuse interruption // handling code, but also to avoid potentional infinite loops // in combination with oxt::thread::interrupt_and_join(). // Upon interruption sleep() returns the number of seconds unslept // but interrupt_and_join() keeps interrupting the thread every 10 // msec. Depending on the implementation of sleep(), it might return // the same value as its original argument. A naive implementation // of syscalls::sleep() that sleeps again with the return value // could easily cause an infinite loop. nanosleep() has a large // enough resolution so it won't trigger the problem. struct timespec spec, rem; int ret; spec.tv_sec = seconds; spec.tv_nsec = 0; ret = syscalls::nanosleep(&spec, &rem); if (ret == 0) { return 0; } else if (errno == EINTR) { return rem.tv_sec; } else { // No sure what to do here. There's an error // but we can't return -1. Let's just hope // this never happens. return 0; } } int syscalls::usleep(useconds_t usec) { // We use syscalls::nanosleep() here to reuse the code that sleeps // for the remaining amount of time, if a signal was received but // system call interruption is disabled. struct timespec spec; spec.tv_sec = usec / 1000000; spec.tv_nsec = usec % 1000000 * 1000; return syscalls::nanosleep(&spec, NULL); } int syscalls::nanosleep(const struct timespec *req, struct timespec *rem) { struct timespec req2 = *req; struct timespec rem2; int ret, e; bool intr_requested; /* We never simulate failure in this function. */ thread_local_context *ctx = get_thread_local_context(); if (OXT_UNLIKELY(ctx != NULL)) { ctx->syscall_interruption_lock.unlock(); } do { ret = ::nanosleep(&req2, &rem2); e = errno; if (ret == -1) { /* nanosleep() on some systems is sometimes buggy. rem2 * could end up containing a tv_sec with a value near 2^32-1, * probably because of integer wrapping bugs in the kernel. * So we check for those. */ if (rem2.tv_sec < req->tv_sec) { req2 = rem2; } else { req2.tv_sec = 0; req2.tv_nsec = 0; } } } while (ret == -1 && e == EINTR && (!this_thread::syscalls_interruptable() || !(intr_requested = this_thread::interruption_requested())) ); if (OXT_UNLIKELY(ctx != NULL)) { ctx->syscall_interruption_lock.lock(); } if (ret == -1 && e == EINTR && this_thread::syscalls_interruptable() && intr_requested) { throw thread_interrupted(); } errno = e; if (ret == 0 && rem) { *rem = rem2; } return ret; } pid_t syscalls::fork() { /* We don't do anything with the syscall_interruption_lock here * because that can cause an infinite loop. Suppose that we unlock * syscall_interruption_lock, then another thread calls interrupt() * on this thread (which in turn locks syscall_interruption_lock), * and then we context switch back to this thread anf the fork() * proceeds. In the subprocess, syscall_interruption_lock will never * be unlocked and so we're stuck forever trying to obtain the lock. */ pid_t ret; do { ret = ::fork(); } while (ret == -1 && errno == EINTR); return ret; } int syscalls::kill(pid_t pid, int sig) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::kill(pid, sig) ); return ret; } int syscalls::killpg(pid_t pgrp, int sig) { int ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::killpg(pgrp, sig) ); return ret; } pid_t syscalls::waitpid(pid_t pid, int *status, int options) { pid_t ret; CHECK_INTERRUPTION( ret == -1, true, ret = -1, ret = ::waitpid(pid, status, options) ); return ret; } /************************************* * boost::this_thread *************************************/ #ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED /* This variable is an int instead of a bool, because a bug in GCC 4.6 * can cause segmentation faults for bool TLS variables. * https://code.google.com/p/phusion-passenger/issues/detail?id=902 * http://stackoverflow.com/questions/20410943/segmentation-fault-when-accessing-statically-initialized-thread-variable?noredirect=1#comment30483943_20410943 * https://bugzilla.redhat.com/show_bug.cgi?id=731228 */ __thread int this_thread::_syscalls_interruptable = 1; bool this_thread::syscalls_interruptable() { return _syscalls_interruptable; } #else thread_specific_ptr this_thread::_syscalls_interruptable; bool this_thread::syscalls_interruptable() { return _syscalls_interruptable.get() == NULL || *_syscalls_interruptable; } #endif passenger-4.0.37/ext/oxt/system_calls.hpp000644 000765 000024 00000024237 12233035540 021051 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010-2012 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _OXT_SYSTEM_CALLS_HPP_ #define _OXT_SYSTEM_CALLS_HPP_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "macros.hpp" /** * System call and C library call wrappers with extra features * * This file provides wrappers for many system calls and C library calls * and adds the following features: * * - Interruption of blocking system calls and blocking C library calls. * - Simulation of random failures. * * ## About system call interruption * * One must first call `oxt::setup_syscall_interruption_support()`. * Then one may use the functions in oxt::syscalls as drop-in replacements * for system calls or C library functions. These functions throw * boost::thread_interrupted upon interruption, instead of returning an EINTR * error. * * Once `setup_syscall_interruption_support()` has been called, system call * interruption is enabled by default. You can enable or disable system call * interruption in the current scope by creating instances of * boost::this_thread::enable_syscall_interruption or * boost::this_thread::disable_syscall_interruption, respectively. When system * call interruption is disabled, the oxt::syscall wrapper functions will * ignore interruption requests -- that is, they will never throw * boost::thread_interrupted, nor will they return EINTR errors. This is similar * to Boost thread interruption. * * ### How to interrupt * * Generally, oxt::thread::interrupt() and oxt::thread::interrupt_and_join() * should be used for interrupting threads. These methods will interrupt * the thread at all Boost interruption points, as well as system calls that * are caled through the oxt::syscalls namespace. Do *not* use * boost::thread::interrupt, because that will not honor system calls as * interruption points. * * Under the hood, system calls are interrupted by sending a signal to the * to a specific thread (note: sending a signal to a process will deliver the * signal to the main thread). * * Any signal will do, but of course, one should only send a signal whose * signal handler doesn't do undesirable things (such as aborting the entire * program). That's why it's generally recommended that you only use * oxt::INTERRUPTION_SIGNAL to interrupt system calls, because * oxt::setup_syscall_interruption_support() installs an "nice" signal * handler for that signal (though you should of course use * oxt::thread::interrupt() instead of sending signals whenever * possible). * * Note that sending a signal once may not interrupt the thread, because * the thread may not be calling a system call at the time the signal was * received. So one must keep sending signals periodically until the * thread has quit. * * **Warning**: * * After `oxt::setup_syscall_interruption_support()` is called, sending a signal * will cause system calls to return with an EINTR error. The oxt::syscall * functions will automatically take care of this, but if you're calling any * system calls without using that namespace, then you should check for and * take care of EINTR errors. * * ## About random simulation of failures * * Call `oxt::setup_random_failure_simulation()` to initialize random * failure simulation. */ // This is one of the things that Java is good at and C++ sucks at. Sigh... namespace oxt { static const int INTERRUPTION_SIGNAL = SIGUSR1; // SIGUSR2 is reserved by Valgrind... #define OXT_MAX_ERROR_CHANCES 16 struct ErrorChance { double chance; int errorCode; }; void setup_syscall_interruption_support(); void setup_random_failure_simulation(const ErrorChance *errorChances, unsigned int n); /** * System call and C library call wrappers with interruption support. * These functions are interruption points, i.e. they throw * boost::thread_interrupted whenever the calling thread is interrupted * by oxt::thread::interrupt() or oxt::thread::interrupt_and_join(). */ namespace syscalls { using namespace std; int open(const char *path, int oflag); int open(const char *path, int oflag, mode_t mode); ssize_t read(int fd, void *buf, size_t count); ssize_t write(int fd, const void *buf, size_t count); ssize_t writev(int fd, const struct iovec *iov, int iovcnt); int close(int fd); int pipe(int filedes[2]); int dup2(int filedes, int filedes2); int mkdir(const char *pathname, mode_t mode); int chown(const char *path, uid_t owner, gid_t group); int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen); int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen); int connect(int sockfd, const struct sockaddr *serv_addr, socklen_t addrlen); int listen(int sockfd, int backlog); int socket(int domain, int type, int protocol); int socketpair(int d, int type, int protocol, int sv[2]); ssize_t recvmsg(int s, struct msghdr *msg, int flags); ssize_t sendmsg(int s, const struct msghdr *msg, int flags); int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen); int shutdown(int s, int how); int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout); int poll(struct pollfd fds[], nfds_t nfds, int timeout); FILE *fopen(const char *path, const char *mode); size_t fread(void *ptr, size_t size, size_t nitems, FILE *stream); int fclose(FILE *fp); int unlink(const char *pathname); int stat(const char *path, struct stat *buf); int lstat(const char *path, struct stat *buf); time_t time(time_t *t); unsigned int sleep(unsigned int seconds); int usleep(useconds_t usec); int nanosleep(const struct timespec *req, struct timespec *rem); pid_t fork(); int kill(pid_t pid, int sig); int killpg(pid_t pgrp, int sig); pid_t waitpid(pid_t pid, int *status, int options); } } // namespace oxt namespace boost { namespace this_thread { /** * @intern */ #ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED extern __thread int _syscalls_interruptable; #else extern thread_specific_ptr _syscalls_interruptable; #endif /** * Check whether system calls should be interruptable in * the calling thread. */ bool syscalls_interruptable(); class restore_syscall_interruption; /** * Create this struct on the stack to temporarily enable system * call interruption, until the object goes out of scope. */ class enable_syscall_interruption { private: bool last_value; public: enable_syscall_interruption() { #ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED last_value = !!_syscalls_interruptable; _syscalls_interruptable = 1; #else if (_syscalls_interruptable.get() == NULL) { last_value = true; _syscalls_interruptable.reset(new bool(true)); } else { last_value = *_syscalls_interruptable; *_syscalls_interruptable = true; } #endif } ~enable_syscall_interruption() { #ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED _syscalls_interruptable = last_value; #else *_syscalls_interruptable = last_value; #endif } }; /** * Create this struct on the stack to temporarily disable system * call interruption, until the object goes out of scope. * While system call interruption is disabled, the functions in * InterruptableCalls will try until the return code is not EINTR. */ class disable_syscall_interruption { private: friend class restore_syscall_interruption; bool last_value; public: disable_syscall_interruption() { #ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED last_value = !!_syscalls_interruptable; _syscalls_interruptable = 0; #else if (_syscalls_interruptable.get() == NULL) { last_value = true; _syscalls_interruptable.reset(new bool(false)); } else { last_value = *_syscalls_interruptable; *_syscalls_interruptable = false; } #endif } ~disable_syscall_interruption() { #ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED _syscalls_interruptable = last_value; #else *_syscalls_interruptable = last_value; #endif } }; /** * Creating an object of this class on the stack will restore the * system call interruption state to what it was before. */ class restore_syscall_interruption { private: bool last_value; public: restore_syscall_interruption(const disable_syscall_interruption &intr) { #ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED last_value = !!_syscalls_interruptable; _syscalls_interruptable = intr.last_value; #else assert(_syscalls_interruptable.get() != NULL); last_value = *_syscalls_interruptable; *_syscalls_interruptable = intr.last_value; #endif } ~restore_syscall_interruption() { #ifdef OXT_THREAD_LOCAL_KEYWORD_SUPPORTED _syscalls_interruptable = last_value; #else *_syscalls_interruptable = last_value; #endif } }; } // namespace this_thread } // namespace boost #endif /* _OXT_SYSTEM_CALLS_HPP_ */ passenger-4.0.37/ext/oxt/thread.hpp000644 000765 000024 00000021622 12233035540 017611 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _OXT_THREAD_HPP_ #define _OXT_THREAD_HPP_ #include #include #include #include #include "system_calls.hpp" #include "detail/context.hpp" #include #include #include #include // for PTHREAD_STACK_MIN namespace oxt { /** * Enhanced thread class with support for: * - user-defined stack size. * - system call interruption. * - backtraces. */ class thread: public boost::thread { private: thread_local_context_ptr context; static std::string make_thread_name(const std::string &given_name); static void thread_main(const boost::function func, thread_local_context_ptr ctx); public: /** * Create a new thread. * * @param func A function object which will be called as the thread's * main function. This object must be copyable. func is * copied into storage managed internally by the thread library, * and that copy is invoked on a newly-created thread of execution. * @param name A name for this thread. If an empty string is given, then * a name will be automatically chosen. * @param stack_size The stack size, in bytes, that the thread should * have. If 0 is specified, the operating system's default stack * size is used. If non-zero is specified, and the size is smaller * than the operating system's minimum stack size, then the operating * system's minimum stack size will be used. * @pre func must be copyable. * @throws boost::thread_resource_error Something went wrong during * creation of the thread. */ explicit thread(const boost::function func, const std::string &name = std::string(), unsigned int stack_size = 0) : boost::thread() { context = thread_local_context::make_shared_ptr(); context->thread_name = make_thread_name(name); thread_info = make_thread_info(boost::bind(thread_main, func, context)); unsigned long min_stack_size; bool stack_min_size_defined; bool round_stack_size; #ifdef PTHREAD_STACK_MIN // PTHREAD_STACK_MIN may not be a constant macro so we need // to evaluate it dynamically. min_stack_size = PTHREAD_STACK_MIN; stack_min_size_defined = true; #else // Assume minimum stack size is 128 KB. min_stack_size = 128 * 1024; stack_min_size_defined = false; #endif if (stack_size != 0 && stack_size < min_stack_size) { stack_size = min_stack_size; round_stack_size = !stack_min_size_defined; } else { round_stack_size = true; } if (round_stack_size) { // Round stack size up to page boundary. long page_size; #if defined(_SC_PAGESIZE) page_size = sysconf(_SC_PAGESIZE); #elif defined(_SC_PAGE_SIZE) page_size = sysconf(_SC_PAGE_SIZE); #elif defined(PAGESIZE) page_size = sysconf(PAGESIZE); #elif defined(PAGE_SIZE) page_size = sysconf(PAGE_SIZE); #else page_size = getpagesize(); #endif if (stack_size % page_size != 0) { stack_size = stack_size - (stack_size % page_size) + page_size; } } attributes attrs; attrs.set_stack_size(stack_size); start_thread(attrs); } /** * Return this thread's name. The name was set during construction. */ std::string name() const throw(); /** * Return the current backtrace of the thread of execution, as a string. */ std::string backtrace() const throw(); /** * Return the backtraces of all oxt::thread threads, as well as that of the * main thread, in a nicely formatted string. */ static std::string all_backtraces() throw(); /** * Interrupt the thread. This method behaves just like * boost::thread::interrupt(), but if interruptSyscalls is true * then it will also respect the interruption points defined in * oxt::syscalls. * * Note that an interruption request may get lost, depending on the * current execution point of the thread. Thus, one should call this * method in a loop, until a certain goal condition has been fulfilled. * interrupt_and_join() is a convenience method that implements this * pattern. */ void interrupt(bool interruptSyscalls = true); /** * Keep interrupting the thread until it's done, then join it. * * @param interruptSyscalls Whether oxt::syscalls calls should also * be eligable for interruption. * @throws boost::thread_interrupted The calling thread has been * interrupted before we could join this thread. */ void interrupt_and_join(bool interruptSyscalls = true) { bool done = false; while (!done) { interrupt(interruptSyscalls); done = timed_join(boost::posix_time::millisec(10)); } } /** * Keep interrupting the thread until it's done, then join it. * This method will keep trying for at most timeout milliseconds. * * @param timeout The maximum number of milliseconds that this method * should keep trying. * @param interruptSyscalls Whether oxt::syscalls calls should also * be eligable for interruption. * @return True if the thread was successfully joined, false if the * timeout has been reached. * @throws boost::thread_interrupted The calling thread has been * interrupted before we could join this thread. */ bool interrupt_and_join(unsigned int timeout, bool interruptSyscalls = true) { bool joined = false, timed_out = false; boost::posix_time::ptime deadline = boost::posix_time::microsec_clock::local_time() + boost::posix_time::millisec(timeout); while (!joined && !timed_out) { interrupt(interruptSyscalls); joined = timed_join(boost::posix_time::millisec(10)); timed_out = !joined && boost::posix_time::microsec_clock::local_time() > deadline; } return joined; } /** * Interrupt and join multiple threads in a way that's more efficient than calling * interrupt_and_join() on each thread individually. It iterates over all threads, * interrupts each one without joining it, then waits until at least one thread * is joinable. This is repeated until all threads are joined. * * @param threads An array of threads to join. * @param size The number of elements in threads. * @param interruptSyscalls Whether oxt::syscalls calls should also * be eligable for interruption. * @throws boost::thread_interrupted The calling thread has been * interrupted before all threads have been joined. Some threads * may have been successfully joined while others haven't. */ static void interrupt_and_join_multiple(oxt::thread **threads, unsigned int size, bool interruptSyscalls = true) { std::list remaining_threads; std::list::iterator it, current; oxt::thread *thread; unsigned int i; for (i = 0; i < size; i++) { remaining_threads.push_back(threads[i]); } while (!remaining_threads.empty()) { for (it = remaining_threads.begin(); it != remaining_threads.end(); it++) { thread = *it; thread->interrupt(interruptSyscalls); } for (it = remaining_threads.begin(); it != remaining_threads.end(); it++) { thread = *it; if (thread->timed_join(boost::posix_time::millisec(0))) { current = it; it--; remaining_threads.erase(current); } } if (!remaining_threads.empty()) { syscalls::usleep(10000); } } } }; /** * Like boost::lock_guard, but is interruptable. */ template class interruptable_lock_guard { private: TimedLockable &mutex; public: interruptable_lock_guard(TimedLockable &m): mutex(m) { bool locked = false; while (!locked) { locked = m.timed_lock(boost::posix_time::milliseconds(20)); if (!locked) { boost::this_thread::interruption_point(); } } } ~interruptable_lock_guard() { mutex.unlock(); } }; } // namespace oxt #endif /* _OXT_THREAD_HPP_ */ passenger-4.0.37/ext/oxt/tracable_exception.hpp000644 000765 000024 00000002756 12233035540 022204 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _OXT_TRACABLE_EXCEPTION_HPP_ #define _OXT_TRACABLE_EXCEPTION_HPP_ #if defined(NDEBUG) || defined(OXT_DISABLE_BACKTRACES) #include "detail/tracable_exception_disabled.hpp" #else #include "detail/tracable_exception_enabled.hpp" #endif #endif /* _OXT_TRACABLE_EXCEPTION_HPP_ */ passenger-4.0.37/ext/oxt/detail/backtrace_disabled.hpp000644 000765 000024 00000003213 12233035540 023346 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include // Dummy implementation for backtrace.hpp. // See detail/backtrace_enabled.hpp for API documentation. namespace oxt { #define TRACE_POINT() do { /* nothing */ } while (false) #define TRACE_POINT_WITH_NAME(name) do { /* nothing */ } while (false) #define TRACE_POINT_WITH_DATA(data) do { /* nothing */ } while (false) #define UPDATE_TRACE_POINT() do { /* nothing */ } while (false) } // namespace oxt passenger-4.0.37/ext/oxt/detail/backtrace_enabled.hpp000644 000765 000024 00000004767 12233035540 023210 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010, 2011, 2012 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ // Actual implementation for backtrace.hpp. #define OXT_BACKTRACE_IS_ENABLED #include namespace oxt { /** * A single point in a backtrace. Creating this object will cause it * to push itself to the thread's backtrace list. This backtrace list * is stored in a thread local storage, and so is unique for each * thread. Upon destruction, the object will pop itself from the thread's * backtrace list. * * Except if you set the 'detached' argument to true. */ struct trace_point { struct detached { }; const char *function; const char *source; const char *data; unsigned short line; bool m_detached; trace_point(const char *function, const char *source, unsigned short line, const char *data = 0); trace_point(const char *function, const char *source, unsigned short line, const char *data, const detached &detached_tag); ~trace_point(); void update(const char *source, unsigned short line); }; #define TRACE_POINT() oxt::trace_point __p(BOOST_CURRENT_FUNCTION, __FILE__, __LINE__) #define TRACE_POINT_WITH_NAME(name) oxt::trace_point __p(name, __FILE__, __LINE__) #define TRACE_POINT_WITH_DATA(data) oxt::trace_point __p(BOOST_CURRENT_FUNCTION, __FILE__, __LINE__, data) #define UPDATE_TRACE_POINT() __p.update(__FILE__, __LINE__) } // namespace oxt passenger-4.0.37/ext/oxt/detail/context.hpp000644 000765 000024 00000005374 12233035540 021276 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2012 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _OXT_DETAIL_CONTEXT_HPP_ #define _OXT_DETAIL_CONTEXT_HPP_ #include #include #include #include #include #include #ifdef __linux__ #include #endif #include "../spin_lock.hpp" namespace oxt { struct thread_local_context; typedef boost::shared_ptr thread_local_context_ptr; struct global_context_t { boost::mutex next_thread_number_mutex; /** Thread numbering begins at 2. The main thread has number 1. * A thread number of 0 is invalid. */ unsigned int next_thread_number; boost::mutex thread_registration_mutex; std::list registered_threads; global_context_t(); }; struct thread_local_context { std::list::iterator iterator; pthread_t thread; #ifdef __linux__ pid_t tid; #endif unsigned int thread_number; std::string thread_name; /** This lock is normally locked, but only unlocked during an oxt::sycall function, * and is relocked when that function returns. One can use try_lock to find out * whether the code is inside an oxt::syscall function. */ spin_lock syscall_interruption_lock; #ifdef OXT_BACKTRACE_IS_ENABLED std::vector backtrace_list; spin_lock backtrace_lock; #endif static thread_local_context_ptr make_shared_ptr(); thread_local_context(); }; void set_thread_local_context(const thread_local_context_ptr &ctx); thread_local_context *get_thread_local_context(); } // namespace oxt #endif /* _OXT_DETAIL_CONTEXT_HPP_ */ passenger-4.0.37/ext/oxt/detail/spin_lock_darwin.hpp000644 000765 000024 00000003520 12233035540 023126 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include /* * Implementation of a spin lock using Darwin spin locks. * * See spin_lock_gcc_x86.hpp for API documentation. */ namespace oxt { class spin_lock { private: OSSpinLock spin; public: class scoped_lock: boost::noncopyable { private: spin_lock &l; public: scoped_lock(spin_lock &lock): l(lock) { l.lock(); } ~scoped_lock() { l.unlock(); } }; spin_lock() { spin = 0; } void lock() { OSSpinLockLock(&spin); } void unlock() { OSSpinLockUnlock(&spin); } bool try_lock() { return OSSpinLockTry(&spin); } }; } // namespace oxt passenger-4.0.37/ext/oxt/detail/spin_lock_gcc_x86.hpp000644 000765 000024 00000004451 12233035540 023107 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include namespace oxt { /** * A spin lock. It's more efficient than a mutex for locking very small * critical sections with few contentions, but less efficient otherwise. * * The interface is similar to that of boost::mutex. */ class spin_lock { private: volatile int exclusion; public: /** * Instantiate this class to lock a spin lock within a scope. */ class scoped_lock: boost::noncopyable { private: spin_lock &l; public: scoped_lock(spin_lock &lock): l(lock) { l.lock(); } ~scoped_lock() { l.unlock(); } }; spin_lock(): exclusion(0) { } /** * Lock this spin lock. * @throws boost::thread_resource_error Something went wrong. */ void lock() { while (__sync_lock_test_and_set(&exclusion, 1)) { // Do nothing. This GCC builtin instruction // ensures memory barrier. } } /** * Unlock this spin lock. * @throws boost::thread_resource_error Something went wrong. */ void unlock() { __sync_lock_release(&exclusion); } bool try_lock() { return !__sync_lock_test_and_set(&exclusion, 1); } }; } // namespace oxt passenger-4.0.37/ext/oxt/detail/spin_lock_portable.hpp000644 000765 000024 00000002664 12233035540 023462 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * Portable implementation of a spin lock. * This is actually just a mutex... * * See spin_lock_gcc_x86.hpp for API documentation. */ #include namespace oxt { typedef boost::mutex spin_lock; } passenger-4.0.37/ext/oxt/detail/spin_lock_pthreads.hpp000644 000765 000024 00000005351 12233035540 023460 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include "../macros.hpp" /* * Implementation of a spin lock using POSIX pthread spin locks. * * See spin_lock_gcc_x86.hpp for API documentation. */ namespace oxt { class spin_lock { private: pthread_spinlock_t spin; public: class scoped_lock: boost::noncopyable { private: spin_lock &l; public: scoped_lock(spin_lock &lock): l(lock) { l.lock(); } ~scoped_lock() { l.unlock(); } }; spin_lock() { int ret; do { ret = pthread_spin_init(&spin, PTHREAD_PROCESS_PRIVATE); } while (ret == EINTR); if (ret != 0) { throw boost::thread_resource_error(ret, "Cannot initialize a spin lock"); } } ~spin_lock() { int ret; do { ret = pthread_spin_destroy(&spin); } while (ret == EINTR); } void lock() { int ret; do { ret = pthread_spin_lock(&spin); } while (OXT_UNLIKELY(ret == EINTR)); if (OXT_UNLIKELY(ret != 0)) { throw boost::thread_resource_error(ret, "Cannot lock spin lock"); } } void unlock() { int ret; do { ret = pthread_spin_unlock(&spin); } while (OXT_UNLIKELY(ret == EINTR)); if (OXT_UNLIKELY(ret != 0)) { throw boost::thread_resource_error(ret, "Cannot unlock spin lock"); } } bool try_lock() { int ret; do { ret = pthread_spin_trylock(&spin); } while (OXT_UNLIKELY(ret == EINTR)); if (ret == 0) { return true; } else if (ret == EBUSY) { return false; } else { throw boost::thread_resource_error(ret, "Cannot lock spin lock"); } } }; } // namespace oxt passenger-4.0.37/ext/oxt/detail/tracable_exception_disabled.hpp000644 000765 000024 00000003704 12233035540 025267 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010-2013 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include // Dummy implementation for tracable_exception.hpp. // See detail/tracable_exception_enabled.hpp for API documentation. namespace oxt { class tracable_exception: public std::exception { public: struct no_backtrace { }; tracable_exception() : std::exception() { // Do nothing. } tracable_exception(const tracable_exception &other) : std::exception(other) { // Do nothing. } tracable_exception(const no_backtrace &tag) : std::exception() { // Do nothing. } virtual std::string backtrace() const throw() { return " (backtrace support disabled during compile time)\n"; } virtual const char *what() const throw() { return "oxt::tracable_exception"; } }; } // namespace oxt passenger-4.0.37/ext/oxt/detail/tracable_exception_enabled.hpp000644 000765 000024 00000003445 12233035540 025114 0ustar00honglistaff000000 000000 /* * OXT - OS eXtensions for boosT * Provides important functionality necessary for writing robust server software. * * Copyright (c) 2010-2013 Phusion * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include namespace oxt { struct trace_point; /** * Exception class with backtrace support. See backtrace.hpp for details. */ class tracable_exception: public std::exception { private: std::vector backtrace_copy; public: struct no_backtrace { }; tracable_exception(); tracable_exception(const tracable_exception &other); tracable_exception(const no_backtrace &tag); virtual ~tracable_exception() throw(); virtual std::string backtrace() const throw(); virtual const char *what() const throw(); }; } // namespace oxt passenger-4.0.37/ext/nginx/CacheLocationConfig.c000644 000765 000024 00000026450 12233035540 022134 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * CacheLocationConfig.c is automatically generated from CacheLocationConfig.c.erb, * using definitions from lib/phusion_passenger/nginx/config_options.rb. * Edits to CacheLocationConfig.c will be lost. * * To update CacheLocationConfig.c: * rake nginx * * To force regeneration of CacheLocationConfig.c: * rm -f ext/nginx/CacheLocationConfig.c * rake ext/nginx/CacheLocationConfig.c */ size_t len = 0; u_char int_buf[32], *end, *buf, *pos; /* Calculate lengths */ if (conf->ruby.data != NULL) { len += 15; len += conf->ruby.len + 1; } if (conf->python.data != NULL) { len += 17; len += conf->python.len + 1; } if (conf->nodejs.data != NULL) { len += 17; len += conf->nodejs.len + 1; } if (conf->environment.data != NULL) { len += 18; len += conf->environment.len + 1; } if (conf->friendly_error_pages != NGX_CONF_UNSET) { len += 31; len += conf->friendly_error_pages ? sizeof("true") : sizeof("false"); } if (conf->min_instances != NGX_CONF_UNSET) { end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->min_instances); len += 24; len += end - int_buf + 1; } if (conf->max_instances_per_app != NGX_CONF_UNSET) { end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->max_instances_per_app); len += 24; len += end - int_buf + 1; } if (conf->max_requests != NGX_CONF_UNSET) { end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->max_requests); len += 23; len += end - int_buf + 1; } if (conf->start_timeout != NGX_CONF_UNSET) { end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->start_timeout); len += 24; len += end - int_buf + 1; } if (conf->user.data != NULL) { len += 15; len += conf->user.len + 1; } if (conf->group.data != NULL) { len += 16; len += conf->group.len + 1; } if (conf->app_group_name.data != NULL) { len += 25; len += conf->app_group_name.len + 1; } if (conf->app_root.data != NULL) { len += 19; len += conf->app_root.len + 1; } if (conf->app_rights.data != NULL) { len += 21; len += conf->app_rights.len + 1; } if (conf->union_station_support != NGX_CONF_UNSET) { len += 22; len += conf->union_station_support ? sizeof("true") : sizeof("false"); } if (conf->debugger != NGX_CONF_UNSET) { len += 19; len += conf->debugger ? sizeof("true") : sizeof("false"); } if (conf->show_version_in_header != NGX_CONF_UNSET) { len += 33; len += conf->show_version_in_header ? sizeof("true") : sizeof("false"); } if (conf->max_preloader_idle_time != NGX_CONF_UNSET) { end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->max_preloader_idle_time); len += 34; len += end - int_buf + 1; } if (conf->spawn_method.data != NULL) { len += 23; len += conf->spawn_method.len + 1; } if (conf->load_shell_envvars != NGX_CONF_UNSET) { len += 29; len += conf->load_shell_envvars ? sizeof("true") : sizeof("false"); } if (conf->union_station_key.data != NULL) { len += 18; len += conf->union_station_key.len + 1; } if (conf->max_request_queue_size != NGX_CONF_UNSET) { end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->max_request_queue_size); len += 33; len += end - int_buf + 1; } if (conf->request_queue_overflow_status_code != NGX_CONF_UNSET) { end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->request_queue_overflow_status_code); len += 45; len += end - int_buf + 1; } if (conf->restart_dir.data != NULL) { len += 22; len += conf->restart_dir.len + 1; } if (conf->startup_file.data != NULL) { len += 23; len += conf->startup_file.len + 1; } /* Create string */ buf = pos = ngx_pnalloc(cf->pool, len); if (conf->ruby.data != NULL) { pos = ngx_copy(pos, "PASSENGER_RUBY", 15); pos = ngx_copy(pos, conf->ruby.data, conf->ruby.len); *pos = '\0'; pos++; } if (conf->python.data != NULL) { pos = ngx_copy(pos, "PASSENGER_PYTHON", 17); pos = ngx_copy(pos, conf->python.data, conf->python.len); *pos = '\0'; pos++; } if (conf->nodejs.data != NULL) { pos = ngx_copy(pos, "PASSENGER_NODEJS", 17); pos = ngx_copy(pos, conf->nodejs.data, conf->nodejs.len); *pos = '\0'; pos++; } if (conf->environment.data != NULL) { pos = ngx_copy(pos, "PASSENGER_APP_ENV", 18); pos = ngx_copy(pos, conf->environment.data, conf->environment.len); *pos = '\0'; pos++; } if (conf->friendly_error_pages != NGX_CONF_UNSET) { pos = ngx_copy(pos, "PASSENGER_FRIENDLY_ERROR_PAGES", 31); if (conf->friendly_error_pages) { pos = ngx_copy(pos, "true", sizeof("true")); } else { pos = ngx_copy(pos, "false", sizeof("false")); } } if (conf->min_instances != NGX_CONF_UNSET) { pos = ngx_copy(pos, "PASSENGER_MIN_PROCESSES", 24); end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->min_instances); pos = ngx_copy(pos, int_buf, end - int_buf); *pos = '\0'; pos++; } if (conf->max_instances_per_app != NGX_CONF_UNSET) { pos = ngx_copy(pos, "PASSENGER_MAX_PROCESSES", 24); end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->max_instances_per_app); pos = ngx_copy(pos, int_buf, end - int_buf); *pos = '\0'; pos++; } if (conf->max_requests != NGX_CONF_UNSET) { pos = ngx_copy(pos, "PASSENGER_MAX_REQUESTS", 23); end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->max_requests); pos = ngx_copy(pos, int_buf, end - int_buf); *pos = '\0'; pos++; } if (conf->start_timeout != NGX_CONF_UNSET) { pos = ngx_copy(pos, "PASSENGER_START_TIMEOUT", 24); end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->start_timeout); pos = ngx_copy(pos, int_buf, end - int_buf); *pos = '\0'; pos++; } if (conf->user.data != NULL) { pos = ngx_copy(pos, "PASSENGER_USER", 15); pos = ngx_copy(pos, conf->user.data, conf->user.len); *pos = '\0'; pos++; } if (conf->group.data != NULL) { pos = ngx_copy(pos, "PASSENGER_GROUP", 16); pos = ngx_copy(pos, conf->group.data, conf->group.len); *pos = '\0'; pos++; } if (conf->app_group_name.data != NULL) { pos = ngx_copy(pos, "PASSENGER_APP_GROUP_NAME", 25); pos = ngx_copy(pos, conf->app_group_name.data, conf->app_group_name.len); *pos = '\0'; pos++; } if (conf->app_root.data != NULL) { pos = ngx_copy(pos, "PASSENGER_APP_ROOT", 19); pos = ngx_copy(pos, conf->app_root.data, conf->app_root.len); *pos = '\0'; pos++; } if (conf->app_rights.data != NULL) { pos = ngx_copy(pos, "PASSENGER_APP_RIGHTS", 21); pos = ngx_copy(pos, conf->app_rights.data, conf->app_rights.len); *pos = '\0'; pos++; } if (conf->union_station_support != NGX_CONF_UNSET) { pos = ngx_copy(pos, "UNION_STATION_SUPPORT", 22); if (conf->union_station_support) { pos = ngx_copy(pos, "true", sizeof("true")); } else { pos = ngx_copy(pos, "false", sizeof("false")); } } if (conf->debugger != NGX_CONF_UNSET) { pos = ngx_copy(pos, "PASSENGER_DEBUGGER", 19); if (conf->debugger) { pos = ngx_copy(pos, "true", sizeof("true")); } else { pos = ngx_copy(pos, "false", sizeof("false")); } } if (conf->show_version_in_header != NGX_CONF_UNSET) { pos = ngx_copy(pos, "PASSENGER_SHOW_VERSION_IN_HEADER", 33); if (conf->show_version_in_header) { pos = ngx_copy(pos, "true", sizeof("true")); } else { pos = ngx_copy(pos, "false", sizeof("false")); } } if (conf->max_preloader_idle_time != NGX_CONF_UNSET) { pos = ngx_copy(pos, "PASSENGER_MAX_PRELOADER_IDLE_TIME", 34); end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->max_preloader_idle_time); pos = ngx_copy(pos, int_buf, end - int_buf); *pos = '\0'; pos++; } if (conf->spawn_method.data != NULL) { pos = ngx_copy(pos, "PASSENGER_SPAWN_METHOD", 23); pos = ngx_copy(pos, conf->spawn_method.data, conf->spawn_method.len); *pos = '\0'; pos++; } if (conf->load_shell_envvars != NGX_CONF_UNSET) { pos = ngx_copy(pos, "PASSENGER_LOAD_SHELL_ENVVARS", 29); if (conf->load_shell_envvars) { pos = ngx_copy(pos, "true", sizeof("true")); } else { pos = ngx_copy(pos, "false", sizeof("false")); } } if (conf->union_station_key.data != NULL) { pos = ngx_copy(pos, "UNION_STATION_KEY", 18); pos = ngx_copy(pos, conf->union_station_key.data, conf->union_station_key.len); *pos = '\0'; pos++; } if (conf->max_request_queue_size != NGX_CONF_UNSET) { pos = ngx_copy(pos, "PASSENGER_MAX_REQUEST_QUEUE_SIZE", 33); end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->max_request_queue_size); pos = ngx_copy(pos, int_buf, end - int_buf); *pos = '\0'; pos++; } if (conf->request_queue_overflow_status_code != NGX_CONF_UNSET) { pos = ngx_copy(pos, "PASSENGER_REQUEST_QUEUE_OVERFLOW_STATUS_CODE", 45); end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf->request_queue_overflow_status_code); pos = ngx_copy(pos, int_buf, end - int_buf); *pos = '\0'; pos++; } if (conf->restart_dir.data != NULL) { pos = ngx_copy(pos, "PASSENGER_RESTART_DIR", 22); pos = ngx_copy(pos, conf->restart_dir.data, conf->restart_dir.len); *pos = '\0'; pos++; } if (conf->startup_file.data != NULL) { pos = ngx_copy(pos, "PASSENGER_STARTUP_FILE", 23); pos = ngx_copy(pos, conf->startup_file.data, conf->startup_file.len); *pos = '\0'; pos++; } conf->options_cache.data = buf; conf->options_cache.len = pos - buf; passenger-4.0.37/ext/nginx/CacheLocationConfig.c.erb000644 000765 000024 00000011044 12233035540 022674 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * CacheLocationConfig.c is automatically generated from CacheLocationConfig.c.erb, * using definitions from lib/phusion_passenger/nginx/config_options.rb. * Edits to CacheLocationConfig.c will be lost. * * To update CacheLocationConfig.c: * rake nginx * * To force regeneration of CacheLocationConfig.c: * rm -f ext/nginx/CacheLocationConfig.c * rake ext/nginx/CacheLocationConfig.c */ <% require 'phusion_passenger/nginx/config_options' def filter_eligible_options(options) return options.reject do |option| option[:alias_for] || option.fetch(:field, true).nil? || option[:field].to_s =~ /\./ || !option.fetch(:header, true) end end def struct_field_for(option) if option.has_key?(:field) return option[:field] else return option[:name].sub(/^passenger_/, '') end end def header_name_for(option) return option[:header] || option[:name].upcase end %> size_t len = 0; u_char int_buf[32], *end, *buf, *pos; /* Calculate lengths */ <% for option in filter_eligible_options(LOCATION_CONFIGURATION_OPTIONS) %> <% if option[:type] == :string %> if (conf-><%= struct_field_for(option) %>.data != NULL) { len += <%= header_name_for(option).size + 1 %>; len += conf-><%= struct_field_for(option) %>.len + 1; } <% elsif option[:type] == :integer %> if (conf-><%= struct_field_for(option) %> != NGX_CONF_UNSET) { end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf-><%= struct_field_for(option) %>); len += <%= header_name_for(option).size + 1 %>; len += end - int_buf + 1; } <% elsif option[:type] == :flag %> if (conf-><%= struct_field_for(option) %> != NGX_CONF_UNSET) { len += <%= header_name_for(option).size + 1 %>; len += conf-><%= struct_field_for(option) %> ? sizeof("true") : sizeof("false"); } <% else %> <% raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" %> <% end %> <% end %> /* Create string */ buf = pos = ngx_pnalloc(cf->pool, len); <% for option in filter_eligible_options(LOCATION_CONFIGURATION_OPTIONS) %> <% if option[:type] == :string %> if (conf-><%= struct_field_for(option) %>.data != NULL) { pos = ngx_copy(pos, "<%= header_name_for(option) %>", <%= header_name_for(option).size + 1 %>); pos = ngx_copy(pos, conf-><%= struct_field_for(option) %>.data, conf-><%= struct_field_for(option) %>.len); *pos = '\0'; pos++; } <% elsif option[:type] == :integer %> if (conf-><%= struct_field_for(option) %> != NGX_CONF_UNSET) { pos = ngx_copy(pos, "<%= header_name_for(option) %>", <%= header_name_for(option).size + 1 %>); end = ngx_snprintf(int_buf, sizeof(int_buf) - 1, "%d", conf-><%= struct_field_for(option) %>); pos = ngx_copy(pos, int_buf, end - int_buf); *pos = '\0'; pos++; } <% elsif option[:type] == :flag %> if (conf-><%= struct_field_for(option) %> != NGX_CONF_UNSET) { pos = ngx_copy(pos, "<%= header_name_for(option) %>", <%= header_name_for(option).size + 1 %>); if (conf-><%= struct_field_for(option) %>) { pos = ngx_copy(pos, "true", sizeof("true")); } else { pos = ngx_copy(pos, "false", sizeof("false")); } } <% else %> <% raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" %> <% end %> <% end %> conf->options_cache.data = buf; conf->options_cache.len = pos - buf; passenger-4.0.37/ext/nginx/config000644 000765 000024 00000007153 12233035540 017335 0ustar00honglistaff000000 000000 # passenger-config is run with the 'ruby' command in $PATH, even when natively packaged, # so we check whether 'ruby' is correctly in $PATH. if ! ruby -v >/dev/null 2>/dev/null; then echo '*** ERROR: Cannot find the "ruby" command in $PATH. Please fix your $PATH. You can learn more about $PATH at: http://www.modrails.com/documentation/Users%20guide%20Nginx.html#_the_path_environment_variable' echo '*** Do you think that you set $PATH correctly, and you happen to be using sudo or rvmsudo? Read this: http://www.modrails.com/documentation/Users%20guide%20Nginx.html#env_vars_and_sudo' exit 1 fi ## Magic comment: begin bootstrap ## # Ensure that this script finds the passenger-config that belongs to this Phusion Passenger installation. PATH="$ngx_addon_dir/../../bin:$PATH" export PATH PASSENGER_CONFIG=${PASSENGER_CONFIG:-passenger-config} if test "x$PASSENGER_LIBS" = "x" && ! $PASSENGER_CONFIG --compiled; then echo "*** The Phusion Passenger support files are not yet compiled. Compiling them for you... ***" echo "*** Running 'rake nginx CACHING=false' in $ngx_addon_dir... ***" old_dir=`pwd` if ! cd $ngx_addon_dir; then exit 1 fi if test "x$TRACE" = 1; then if ! rake --trace nginx CACHING=false; then exit 1 fi else if ! rake nginx CACHING=false; then exit 1 fi fi cd "$old_dir" echo "*** Phusion Passenger support files have been successfully compiled. ***" fi ## Magic comment: end bootstrap ## if test "x$PASSENGER_INCLUDEDIR" = "x"; then PASSENGER_INCLUDEDIR=`$PASSENGER_CONFIG --includedir` fi if test "x$PASSENGER_LIBS" = "x"; then PASSENGER_LIBS=`$PASSENGER_CONFIG --nginx-libs` fi ngx_addon_name=ngx_http_passenger_module HTTP_MODULES="$HTTP_MODULES ngx_http_passenger_module" NGX_ADDON_SRCS="$NGX_ADDON_SRCS \ ${ngx_addon_dir}/ngx_http_passenger_module.c \ ${ngx_addon_dir}/Configuration.c \ ${ngx_addon_dir}/ContentHandler.c \ ${ngx_addon_dir}/StaticContentHandler.c" NGX_ADDON_DEPS="$NGX_ADDON_DEPS \ ${ngx_addon_dir}/Configuration.h \ ${ngx_addon_dir}/ConfigurationCommands.c \ ${ngx_addon_dir}/CreateLocationConfig.c \ ${ngx_addon_dir}/MergeLocationConfig.c \ ${ngx_addon_dir}/CacheLocationConfig.c \ ${ngx_addon_dir}/ContentHandler.h \ ${ngx_addon_dir}/StaticContentHandler.h \ ${ngx_addon_dir}/ngx_http_passenger_module.h \ ${PASSENGER_INCLUDEDIR}/common/Constants.h \ ${PASSENGER_INCLUDEDIR}/common/AgentsStarter.h \ ${PASSENGER_INCLUDEDIR}/common/ApplicationPool2/AppTypes.h" CORE_INCS="$CORE_INCS $PASSENGER_INCLUDEDIR" CORE_LIBS="$CORE_LIBS $PASSENGER_LIBS -lstdc++ -lpthread" ngx_feature="Math library" ngx_feature_name= ngx_feature_run=no ngx_feature_incs="#include " ngx_feature_path= ngx_feature_libs="-lm" ngx_feature_test="pow(1, 2)" . auto/feature if [ $ngx_found = yes ]; then CORE_LIBS="$CORE_LIBS -lm" fi ngx_feature="POSIX realtime library" ngx_feature_name= ngx_feature_run=no ngx_feature_incs= ngx_feature_path= ngx_feature_libs="-lrt" ngx_feature_test= . auto/feature if [ $ngx_found = yes ]; then CORE_LIBS="$CORE_LIBS -lrt" fi nginx_version=`grep 'NGINX_VERSION ' src/core/nginx.h | awk '{ print $3 }' | sed 's/"//g'` nginx_major_version=`echo "$nginx_version" | cut -d . -f 1` have=PASSENGER_NGINX_MAJOR_VERSION value="$nginx_major_version" . auto/define nginx_minor_version=`echo "$nginx_version" | cut -d . -f 2` have=PASSENGER_NGINX_MINOR_VERSION value="$nginx_minor_version" . auto/define nginx_micro_version=`echo "$nginx_version" | cut -d . -f 3` have=PASSENGER_NGINX_MICRO_VERSION value="$nginx_micro_version" . auto/define passenger-4.0.37/ext/nginx/Configuration.c000644 000765 000024 00000106335 12233035540 021122 0ustar00honglistaff000000 000000 /* * Copyright (C) Igor Sysoev * Copyright (C) 2007 Manlio Perillo (manlio.perillo@gmail.com) * Copyright (C) 2010-2013 Phusion * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include "ngx_http_passenger_module.h" #include "Configuration.h" #include "ContentHandler.h" #include "common/Constants.h" #include "common/agents/LoggingAgent/FilterSupport.h" static ngx_str_t headers_to_hide[] = { /* NOTE: Do not hide the "Status" header; some broken HTTP clients * expect this header. http://code.google.com/p/phusion-passenger/issues/detail?id=177 */ ngx_string("X-Accel-Expires"), ngx_string("X-Accel-Redirect"), ngx_string("X-Accel-Limit-Rate"), ngx_string("X-Accel-Buffering"), ngx_null_string }; passenger_main_conf_t passenger_main_conf; static ngx_path_init_t ngx_http_proxy_temp_path = { ngx_string(NGX_HTTP_PROXY_TEMP_PATH), { 1, 2, 0 } }; void * passenger_create_main_conf(ngx_conf_t *cf) { passenger_main_conf_t *conf; conf = ngx_pcalloc(cf->pool, sizeof(passenger_main_conf_t)); if (conf == NULL) { return NGX_CONF_ERROR; } conf->ctl = ngx_array_create(cf->pool, 1, sizeof(ngx_keyval_t)); if (conf->ctl == NULL) { return NGX_CONF_ERROR; } conf->default_ruby.data = NULL; conf->default_ruby.len = 0; conf->log_level = (ngx_int_t) NGX_CONF_UNSET; conf->debug_log_file.data = NULL; conf->debug_log_file.len = 0; conf->abort_on_startup_error = NGX_CONF_UNSET; conf->max_pool_size = (ngx_uint_t) NGX_CONF_UNSET; conf->pool_idle_time = (ngx_uint_t) NGX_CONF_UNSET; conf->user_switching = NGX_CONF_UNSET; conf->default_user.data = NULL; conf->default_user.len = 0; conf->default_group.data = NULL; conf->default_group.len = 0; conf->analytics_log_user.data = NULL; conf->analytics_log_user.len = 0; conf->analytics_log_group.data = NULL; conf->analytics_log_group.len = 0; conf->union_station_gateway_address.data = NULL; conf->union_station_gateway_address.len = 0; conf->union_station_gateway_port = (ngx_uint_t) NGX_CONF_UNSET; conf->union_station_gateway_cert.data = NULL; conf->union_station_gateway_cert.len = 0; conf->union_station_proxy_address.data = NULL; conf->union_station_proxy_address.len = 0; conf->prestart_uris = ngx_array_create(cf->pool, 1, sizeof(ngx_str_t)); if (conf->prestart_uris == NULL) { return NGX_CONF_ERROR; } return conf; } char * passenger_init_main_conf(ngx_conf_t *cf, void *conf_pointer) { passenger_main_conf_t *conf; struct passwd *user_entry; struct group *group_entry; char buf[128]; conf = &passenger_main_conf; *conf = *((passenger_main_conf_t *) conf_pointer); if (conf->default_ruby.len == 0) { conf->default_ruby.data = (u_char *) DEFAULT_RUBY; conf->default_ruby.len = strlen(DEFAULT_RUBY); } if (conf->log_level == (ngx_int_t) NGX_CONF_UNSET) { conf->log_level = DEFAULT_LOG_LEVEL; } if (conf->debug_log_file.len == 0) { conf->debug_log_file.data = (u_char *) ""; } if (conf->abort_on_startup_error == NGX_CONF_UNSET) { conf->abort_on_startup_error = 0; } if (conf->max_pool_size == (ngx_uint_t) NGX_CONF_UNSET) { conf->max_pool_size = DEFAULT_MAX_POOL_SIZE; } if (conf->pool_idle_time == (ngx_uint_t) NGX_CONF_UNSET) { conf->pool_idle_time = DEFAULT_POOL_IDLE_TIME; } if (conf->user_switching == NGX_CONF_UNSET) { conf->user_switching = 1; } if (conf->default_user.len == 0) { conf->default_user.len = sizeof(DEFAULT_WEB_APP_USER) - 1; conf->default_user.data = (u_char *) DEFAULT_WEB_APP_USER; } if (conf->default_user.len > sizeof(buf) - 1) { return "Value for 'default_user' is too long."; } memcpy(buf, conf->default_user.data, conf->default_user.len); buf[conf->default_user.len] = '\0'; user_entry = getpwnam(buf); if (user_entry == NULL) { return "The user specified by the 'default_user' option does not exist."; } if (conf->default_group.len > 0) { if (conf->default_group.len > sizeof(buf) - 1) { return "Value for 'default_group' is too long."; } memcpy(buf, conf->default_group.data, conf->default_group.len); buf[conf->default_group.len] = '\0'; group_entry = getgrnam(buf); if (group_entry == NULL) { return "The group specified by the 'default_group' option does not exist."; } } if (conf->analytics_log_user.len == 0) { conf->analytics_log_user.len = sizeof(DEFAULT_ANALYTICS_LOG_USER) - 1; conf->analytics_log_user.data = (u_char *) DEFAULT_ANALYTICS_LOG_USER; } if (conf->analytics_log_group.len == 0) { conf->analytics_log_group.len = sizeof(DEFAULT_ANALYTICS_LOG_GROUP) - 1; conf->analytics_log_group.data = (u_char *) DEFAULT_ANALYTICS_LOG_GROUP; } if (conf->union_station_gateway_address.len == 0) { conf->union_station_gateway_address.len = sizeof(DEFAULT_UNION_STATION_GATEWAY_ADDRESS) - 1; conf->union_station_gateway_address.data = (u_char *) DEFAULT_UNION_STATION_GATEWAY_ADDRESS; } if (conf->union_station_gateway_port == (ngx_uint_t) NGX_CONF_UNSET) { conf->union_station_gateway_port = DEFAULT_UNION_STATION_GATEWAY_PORT; } if (conf->union_station_gateway_cert.len == 0) { conf->union_station_gateway_cert.data = (u_char *) ""; } if (conf->union_station_proxy_address.len == 0) { conf->union_station_proxy_address.data = (u_char *) ""; } return NGX_CONF_OK; } void * passenger_create_loc_conf(ngx_conf_t *cf) { passenger_loc_conf_t *conf; ngx_keyval_t *kv; conf = ngx_pcalloc(cf->pool, sizeof(passenger_loc_conf_t)); if (conf == NULL) { return NGX_CONF_ERROR; } /* * set by ngx_pcalloc(): * * conf->upstream_config.bufs.num = 0; * conf->upstream_config.next_upstream = 0; * conf->upstream_config.temp_path = NULL; * conf->upstream_config.hide_headers_hash = { NULL, 0 }; * conf->upstream_config.hide_headers = NULL; * conf->upstream_config.pass_headers = NULL; * conf->upstream_config.uri = { 0, NULL }; * conf->upstream_config.location = NULL; * conf->upstream_config.store_lengths = NULL; * conf->upstream_config.store_values = NULL; */ #include "CreateLocationConfig.c" /******************************/ /******************************/ conf->upstream_config.pass_headers = NGX_CONF_UNSET_PTR; conf->upstream_config.hide_headers = NGX_CONF_UNSET_PTR; conf->upstream_config.store = NGX_CONF_UNSET; conf->upstream_config.store_access = NGX_CONF_UNSET_UINT; conf->upstream_config.buffering = NGX_CONF_UNSET; conf->upstream_config.ignore_client_abort = NGX_CONF_UNSET; conf->upstream_config.local = NGX_CONF_UNSET_PTR; conf->upstream_config.connect_timeout = NGX_CONF_UNSET_MSEC; conf->upstream_config.send_timeout = NGX_CONF_UNSET_MSEC; conf->upstream_config.read_timeout = NGX_CONF_UNSET_MSEC; conf->upstream_config.send_lowat = NGX_CONF_UNSET_SIZE; conf->upstream_config.buffer_size = NGX_CONF_UNSET_SIZE; conf->upstream_config.busy_buffers_size_conf = NGX_CONF_UNSET_SIZE; conf->upstream_config.max_temp_file_size_conf = NGX_CONF_UNSET_SIZE; conf->upstream_config.temp_file_write_size_conf = NGX_CONF_UNSET_SIZE; conf->upstream_config.pass_request_headers = NGX_CONF_UNSET; conf->upstream_config.pass_request_body = NGX_CONF_UNSET; #if (NGX_HTTP_CACHE) conf->upstream_config.cache = NGX_CONF_UNSET_PTR; conf->upstream_config.cache_min_uses = NGX_CONF_UNSET_UINT; conf->upstream_config.cache_bypass = NGX_CONF_UNSET_PTR; conf->upstream_config.no_cache = NGX_CONF_UNSET_PTR; conf->upstream_config.cache_valid = NGX_CONF_UNSET_PTR; #if NGINX_VERSION_NUM >= 1002000 conf->upstream_config.cache_lock = NGX_CONF_UNSET; conf->upstream_config.cache_lock_timeout = NGX_CONF_UNSET_MSEC; #endif #endif conf->upstream_config.intercept_errors = NGX_CONF_UNSET; conf->upstream_config.cyclic_temp_file = 0; conf->upstream_config.change_buffering = 1; #define DEFINE_VAR_TO_PASS(header_name, var_name) \ kv = ngx_array_push(conf->vars_source); \ kv->key.data = (u_char *) header_name; \ kv->key.len = strlen(header_name) + 1; \ kv->value.data = (u_char *) var_name; \ kv->value.len = strlen(var_name) + 1 conf->vars_source = ngx_array_create(cf->pool, 4, sizeof(ngx_keyval_t)); if (conf->vars_source == NULL) { return NGX_CONF_ERROR; } DEFINE_VAR_TO_PASS("SCGI", "1"); DEFINE_VAR_TO_PASS("QUERY_STRING", "$query_string"); DEFINE_VAR_TO_PASS("REQUEST_METHOD", "$request_method"); DEFINE_VAR_TO_PASS("SERVER_PROTOCOL", "$server_protocol"); DEFINE_VAR_TO_PASS("SERVER_SOFTWARE", "nginx/$nginx_version"); DEFINE_VAR_TO_PASS("REMOTE_ADDR", "$remote_addr"); DEFINE_VAR_TO_PASS("REMOTE_PORT", "$remote_port"); DEFINE_VAR_TO_PASS("SERVER_ADDR", "$server_addr"); DEFINE_VAR_TO_PASS("SERVER_PORT", "$server_port"); #if NGINX_VERSION_NUM >= 1000010 ngx_str_set(&conf->upstream_config.module, "passenger"); #endif return conf; } static void cache_loc_conf_options(ngx_conf_t *cf, passenger_loc_conf_t *conf) { #include "CacheLocationConfig.c" } char * passenger_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child) { passenger_loc_conf_t *prev = parent; passenger_loc_conf_t *conf = child; u_char *p; size_t size; uintptr_t *code; ngx_uint_t i; ngx_str_t *prev_base_uris, *base_uri; ngx_str_t *prev_union_station_filters, *union_station_filter; ngx_keyval_t *src; ngx_hash_init_t hash; ngx_http_script_compile_t sc; ngx_http_script_copy_code_t *copy; #include "MergeLocationConfig.c" if (prev->options_cache.data == NULL) { cache_loc_conf_options(cf, prev); } cache_loc_conf_options(cf, conf); if (prev->base_uris != NGX_CONF_UNSET_PTR) { if (conf->base_uris == NGX_CONF_UNSET_PTR) { conf->base_uris = ngx_array_create(cf->pool, 4, sizeof(ngx_str_t)); if (conf->base_uris == NULL) { return NGX_CONF_ERROR; } } prev_base_uris = (ngx_str_t *) prev->base_uris->elts; for (i = 0; i < prev->base_uris->nelts; i++) { base_uri = (ngx_str_t *) ngx_array_push(conf->base_uris); if (base_uri == NULL) { return NGX_CONF_ERROR; } *base_uri = prev_base_uris[i]; } } if (prev->union_station_filters != NGX_CONF_UNSET_PTR) { if (conf->union_station_filters == NGX_CONF_UNSET_PTR) { conf->union_station_filters = ngx_array_create(cf->pool, 4, sizeof(ngx_str_t)); if (conf->union_station_filters == NULL) { return NGX_CONF_ERROR; } } prev_union_station_filters = (ngx_str_t *) prev->union_station_filters->elts; for (i = 0; i < prev->union_station_filters->nelts; i++) { union_station_filter = (ngx_str_t *) ngx_array_push(conf->union_station_filters); if (union_station_filter == NULL) { return NGX_CONF_ERROR; } *union_station_filter = prev_union_station_filters[i]; } } /******************************/ /******************************/ if (conf->upstream_config.store != 0) { ngx_conf_merge_value(conf->upstream_config.store, prev->upstream_config.store, 0); if (conf->upstream_config.store_lengths == NULL) { conf->upstream_config.store_lengths = prev->upstream_config.store_lengths; conf->upstream_config.store_values = prev->upstream_config.store_values; } } ngx_conf_merge_uint_value(conf->upstream_config.store_access, prev->upstream_config.store_access, 0600); ngx_conf_merge_value(conf->upstream_config.buffering, prev->upstream_config.buffering, 0); ngx_conf_merge_value(conf->upstream_config.ignore_client_abort, prev->upstream_config.ignore_client_abort, 0); ngx_conf_merge_ptr_value(conf->upstream_config.local, prev->upstream_config.local, NULL); ngx_conf_merge_msec_value(conf->upstream_config.connect_timeout, prev->upstream_config.connect_timeout, 12000000); ngx_conf_merge_msec_value(conf->upstream_config.send_timeout, prev->upstream_config.send_timeout, 12000000); ngx_conf_merge_msec_value(conf->upstream_config.read_timeout, prev->upstream_config.read_timeout, 12000000); ngx_conf_merge_size_value(conf->upstream_config.send_lowat, prev->upstream_config.send_lowat, 0); ngx_conf_merge_size_value(conf->upstream_config.buffer_size, prev->upstream_config.buffer_size, 16 * 1024); ngx_conf_merge_bufs_value(conf->upstream_config.bufs, prev->upstream_config.bufs, 8, 16 * 1024); if (conf->upstream_config.bufs.num < 2) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "there must be at least 2 \"passenger_buffers\""); return NGX_CONF_ERROR; } size = conf->upstream_config.buffer_size; if (size < conf->upstream_config.bufs.size) { size = conf->upstream_config.bufs.size; } ngx_conf_merge_size_value(conf->upstream_config.busy_buffers_size_conf, prev->upstream_config.busy_buffers_size_conf, NGX_CONF_UNSET_SIZE); if (conf->upstream_config.busy_buffers_size_conf == NGX_CONF_UNSET_SIZE) { conf->upstream_config.busy_buffers_size = 2 * size; } else { conf->upstream_config.busy_buffers_size = conf->upstream_config.busy_buffers_size_conf; } if (conf->upstream_config.busy_buffers_size < size) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "\"passenger_busy_buffers_size\" must be equal to or greater " "than the maximum of the value of \"passenger_buffer_size\" and " "one of the \"passenger_buffers\""); return NGX_CONF_ERROR; } if (conf->upstream_config.busy_buffers_size > (conf->upstream_config.bufs.num - 1) * conf->upstream_config.bufs.size) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "\"passenger_busy_buffers_size\" must be less than " "the size of all \"passenger_buffers\" minus one buffer"); return NGX_CONF_ERROR; } ngx_conf_merge_size_value(conf->upstream_config.temp_file_write_size_conf, prev->upstream_config.temp_file_write_size_conf, NGX_CONF_UNSET_SIZE); if (conf->upstream_config.temp_file_write_size_conf == NGX_CONF_UNSET_SIZE) { conf->upstream_config.temp_file_write_size = 2 * size; } else { conf->upstream_config.temp_file_write_size = conf->upstream_config.temp_file_write_size_conf; } if (conf->upstream_config.temp_file_write_size < size) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "\"passenger_temp_file_write_size\" must be equal to or greater than " "the maximum of the value of \"passenger_buffer_size\" and " "one of the \"passenger_buffers\""); return NGX_CONF_ERROR; } ngx_conf_merge_size_value(conf->upstream_config.max_temp_file_size_conf, prev->upstream_config.max_temp_file_size_conf, NGX_CONF_UNSET_SIZE); if (conf->upstream_config.max_temp_file_size_conf == NGX_CONF_UNSET_SIZE) { conf->upstream_config.max_temp_file_size = 1024 * 1024 * 1024; } else { conf->upstream_config.max_temp_file_size = conf->upstream_config.max_temp_file_size_conf; } if (conf->upstream_config.max_temp_file_size != 0 && conf->upstream_config.max_temp_file_size < size) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "\"passenger_max_temp_file_size\" must be equal to zero to disable " "temporary files usage or must be equal to or greater than " "the maximum of the value of \"passenger_buffer_size\" and " "one of the \"passenger_buffers\""); return NGX_CONF_ERROR; } ngx_conf_merge_bitmask_value(conf->upstream_config.ignore_headers, prev->upstream_config.ignore_headers, NGX_CONF_BITMASK_SET); ngx_conf_merge_bitmask_value(conf->upstream_config.next_upstream, prev->upstream_config.next_upstream, (NGX_CONF_BITMASK_SET |NGX_HTTP_UPSTREAM_FT_ERROR |NGX_HTTP_UPSTREAM_FT_TIMEOUT)); if (conf->upstream_config.next_upstream & NGX_HTTP_UPSTREAM_FT_OFF) { conf->upstream_config.next_upstream = NGX_CONF_BITMASK_SET |NGX_HTTP_UPSTREAM_FT_OFF; } ngx_conf_merge_path_value(cf, &conf->upstream_config.temp_path, prev->upstream_config.temp_path, &ngx_http_proxy_temp_path); #if (NGX_HTTP_CACHE) ngx_conf_merge_ptr_value(conf->upstream_config.cache, prev->upstream_config.cache, NULL); if (conf->upstream_config.cache && conf->upstream_config.cache->data == NULL) { ngx_shm_zone_t *shm_zone; shm_zone = conf->upstream_config.cache; ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "\"scgi_cache\" zone \"%V\" is unknown", &shm_zone->shm.name); return NGX_CONF_ERROR; } ngx_conf_merge_uint_value(conf->upstream_config.cache_min_uses, prev->upstream_config.cache_min_uses, 1); ngx_conf_merge_bitmask_value(conf->upstream_config.cache_use_stale, prev->upstream_config.cache_use_stale, (NGX_CONF_BITMASK_SET | NGX_HTTP_UPSTREAM_FT_OFF)); if (conf->upstream_config.cache_use_stale & NGX_HTTP_UPSTREAM_FT_OFF) { conf->upstream_config.cache_use_stale = NGX_CONF_BITMASK_SET | NGX_HTTP_UPSTREAM_FT_OFF; } if (conf->upstream_config.cache_use_stale & NGX_HTTP_UPSTREAM_FT_ERROR) { conf->upstream_config.cache_use_stale |= NGX_HTTP_UPSTREAM_FT_NOLIVE; } if (conf->upstream_config.cache_methods == 0) { conf->upstream_config.cache_methods = prev->upstream_config.cache_methods; } conf->upstream_config.cache_methods |= NGX_HTTP_GET | NGX_HTTP_HEAD; ngx_conf_merge_ptr_value(conf->upstream_config.cache_bypass, prev->upstream_config.cache_bypass, NULL); ngx_conf_merge_ptr_value(conf->upstream_config.no_cache, prev->upstream_config.no_cache, NULL); ngx_conf_merge_ptr_value(conf->upstream_config.cache_valid, prev->upstream_config.cache_valid, NULL); if (conf->cache_key.value.data == NULL) { conf->cache_key = prev->cache_key; } #if NGINX_VERSION_NUM >= 1002000 ngx_conf_merge_value(conf->upstream_config.cache_lock, prev->upstream_config.cache_lock, 0); ngx_conf_merge_msec_value(conf->upstream_config.cache_lock_timeout, prev->upstream_config.cache_lock_timeout, 5000); #endif #endif ngx_conf_merge_value(conf->upstream_config.pass_request_headers, prev->upstream_config.pass_request_headers, 1); ngx_conf_merge_value(conf->upstream_config.pass_request_body, prev->upstream_config.pass_request_body, 1); ngx_conf_merge_value(conf->upstream_config.intercept_errors, prev->upstream_config.intercept_errors, 0); hash.max_size = 512; hash.bucket_size = ngx_align(64, ngx_cacheline_size); hash.name = "passenger_hide_headers_hash"; if (ngx_http_upstream_hide_headers_hash(cf, &conf->upstream_config, &prev->upstream_config, headers_to_hide, &hash) != NGX_OK) { return NGX_CONF_ERROR; } if (conf->upstream_config.upstream == NULL) { conf->upstream_config.upstream = prev->upstream_config.upstream; } if (conf->vars_source == NULL) { conf->flushes = prev->flushes; conf->vars_len = prev->vars_len; conf->vars = prev->vars; conf->vars_source = prev->vars_source; if (conf->vars_source == NULL) { return NGX_CONF_OK; } } conf->vars_len = ngx_array_create(cf->pool, 64, 1); if (conf->vars_len == NULL) { return NGX_CONF_ERROR; } conf->vars = ngx_array_create(cf->pool, 512, 1); if (conf->vars == NULL) { return NGX_CONF_ERROR; } src = conf->vars_source->elts; for (i = 0; i < conf->vars_source->nelts; i++) { if (ngx_http_script_variables_count(&src[i].value) == 0) { copy = ngx_array_push_n(conf->vars_len, sizeof(ngx_http_script_copy_code_t)); if (copy == NULL) { return NGX_CONF_ERROR; } copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code; copy->len = src[i].key.len; copy = ngx_array_push_n(conf->vars_len, sizeof(ngx_http_script_copy_code_t)); if (copy == NULL) { return NGX_CONF_ERROR; } copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code; copy->len = src[i].value.len; size = (sizeof(ngx_http_script_copy_code_t) + src[i].key.len + src[i].value.len + sizeof(uintptr_t) - 1) & ~(sizeof(uintptr_t) - 1); copy = ngx_array_push_n(conf->vars, size); if (copy == NULL) { return NGX_CONF_ERROR; } copy->code = ngx_http_script_copy_code; copy->len = src[i].key.len + src[i].value.len; p = (u_char *) copy + sizeof(ngx_http_script_copy_code_t); p = ngx_cpymem(p, src[i].key.data, src[i].key.len); ngx_memcpy(p, src[i].value.data, src[i].value.len); } else { copy = ngx_array_push_n(conf->vars_len, sizeof(ngx_http_script_copy_code_t)); if (copy == NULL) { return NGX_CONF_ERROR; } copy->code = (ngx_http_script_code_pt) ngx_http_script_copy_len_code; copy->len = src[i].key.len; size = (sizeof(ngx_http_script_copy_code_t) + src[i].key.len + sizeof(uintptr_t) - 1) & ~(sizeof(uintptr_t) - 1); copy = ngx_array_push_n(conf->vars, size); if (copy == NULL) { return NGX_CONF_ERROR; } copy->code = ngx_http_script_copy_code; copy->len = src[i].key.len; p = (u_char *) copy + sizeof(ngx_http_script_copy_code_t); ngx_memcpy(p, src[i].key.data, src[i].key.len); ngx_memzero(&sc, sizeof(ngx_http_script_compile_t)); sc.cf = cf; sc.source = &src[i].value; sc.flushes = &conf->flushes; sc.lengths = &conf->vars_len; sc.values = &conf->vars; if (ngx_http_script_compile(&sc) != NGX_OK) { return NGX_CONF_ERROR; } } code = ngx_array_push_n(conf->vars_len, sizeof(uintptr_t)); if (code == NULL) { return NGX_CONF_ERROR; } *code = (uintptr_t) NULL; code = ngx_array_push_n(conf->vars, sizeof(uintptr_t)); if (code == NULL) { return NGX_CONF_ERROR; } *code = (uintptr_t) NULL; } code = ngx_array_push_n(conf->vars_len, sizeof(uintptr_t)); if (code == NULL) { return NGX_CONF_ERROR; } *code = (uintptr_t) NULL; return NGX_CONF_OK; } #ifndef PASSENGER_IS_ENTERPRISE static char * passenger_enterprise_only(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { return ": this feature is only available in Phusion Passenger Enterprise. " "You are currently running the open source Phusion Passenger Enterprise. " "Please learn more about and/or buy Phusion Passenger Enterprise at https://www.phusionpassenger.com/enterprise ;"; } #endif static char * passenger_enabled(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { passenger_loc_conf_t *passenger_conf = conf; ngx_http_core_loc_conf_t *clcf; ngx_str_t *value; ngx_url_t upstream_url; value = cf->args->elts; if (ngx_strcasecmp(value[1].data, (u_char *) "on") == 0) { passenger_conf->enabled = 1; /* Register a placeholder value as upstream address. The real upstream * address (the helper agent socket filename) will be set while processing * requests, because we can't start the helper agent until config * loading is done. */ ngx_memzero(&upstream_url, sizeof(ngx_url_t)); upstream_url.url = pp_placeholder_upstream_address; upstream_url.no_resolve = 1; passenger_conf->upstream_config.upstream = ngx_http_upstream_add(cf, &upstream_url, 0); if (passenger_conf->upstream_config.upstream == NULL) { return NGX_CONF_ERROR; } clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); clcf->handler = passenger_content_handler; if (clcf->name.data != NULL && clcf->name.data[clcf->name.len - 1] == '/') { clcf->auto_redirect = 1; } } else if (ngx_strcasecmp(value[1].data, (u_char *) "off") == 0) { passenger_conf->enabled = 0; } else { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "\"passenger_enabled\" must be either set to \"on\" " "or \"off\""); return NGX_CONF_ERROR; } return NGX_CONF_OK; } char * union_station_filter(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { char *p = conf; ngx_str_t *value, *s; ngx_array_t **a; ngx_conf_post_t *post; char *message; a = (ngx_array_t **) (p + cmd->offset); if (*a == NGX_CONF_UNSET_PTR) { *a = ngx_array_create(cf->pool, 4, sizeof(ngx_str_t)); if (*a == NULL) { return NGX_CONF_ERROR; } } s = ngx_array_push(*a); if (s == NULL) { return NGX_CONF_ERROR; } value = cf->args->elts; *s = value[1]; if (cmd->post) { post = cmd->post; return post->post_handler(cf, post, s); } message = passenger_filter_validate((const char *) value[1].data, value[1].len); if (message != NULL) { ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "Union Station filter syntax error: %s; ", message); free(message); return NGX_CONF_ERROR; } return NGX_CONF_OK; } static char * rails_framework_spawner_idle_time(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { ngx_conf_log_error(NGX_LOG_ALERT, cf, 0, "The 'rails_framework_spawner_idle_time' " "directive is deprecated; please set 'passenger_max_preloader_idle_time' instead"); return NGX_CONF_OK; } static char * passenger_use_global_queue(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { ngx_conf_log_error(NGX_LOG_ALERT, cf, 0, "The 'passenger_use_global_queue' " "directive is obsolete and doesn't do anything anymore. Global queuing " "is now always enabled. Please remove this configuration directive."); return NGX_CONF_OK; } static char * set_null_terminated_keyval_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) { char *p = conf; ngx_str_t *value; ngx_array_t **a; ngx_keyval_t *kv; ngx_conf_post_t *post; u_char *last; a = (ngx_array_t **) (p + cmd->offset); if (*a == NULL) { *a = ngx_array_create(cf->pool, 4, sizeof(ngx_keyval_t)); if (*a == NULL) { return NGX_CONF_ERROR; } } kv = ngx_array_push(*a); if (kv == NULL) { return NGX_CONF_ERROR; } value = cf->args->elts; kv->key.data = ngx_palloc(cf->pool, value[1].len + 1); kv->key.len = value[1].len + 1; last = ngx_copy(kv->key.data, value[1].data, value[1].len); *last = '\0'; kv->value.data = ngx_palloc(cf->pool, value[2].len + 1); kv->value.len = value[2].len + 1; last = ngx_copy(kv->value.data, value[2].data, value[2].len); *last = '\0'; if (cmd->post) { post = cmd->post; return post->post_handler(cf, post, kv); } return NGX_CONF_OK; } const ngx_command_t passenger_commands[] = { /******** Main config ********/ { ngx_string("passenger_root"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, root_dir), NULL }, { ngx_string("passenger_ctl"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE2, set_null_terminated_keyval_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, ctl), NULL }, { ngx_string("passenger_ruby"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, default_ruby), NULL }, { ngx_string("passenger_log_level"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_num_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, log_level), NULL }, { ngx_string("passenger_debug_log_file"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, debug_log_file), NULL }, { ngx_string("passenger_temp_dir"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, temp_dir), NULL }, { ngx_string("passenger_pre_start"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_array_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, prestart_uris), NULL }, { ngx_string("passenger_abort_on_startup_error"), NGX_HTTP_MAIN_CONF | NGX_CONF_FLAG, ngx_conf_set_flag_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, abort_on_startup_error), NULL }, { ngx_string("passenger_max_pool_size"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_num_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, max_pool_size), NULL }, { ngx_string("passenger_pool_idle_time"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_num_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, pool_idle_time), NULL }, { ngx_string("passenger_user_switching"), NGX_HTTP_MAIN_CONF | NGX_CONF_FLAG, ngx_conf_set_flag_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, user_switching), NULL }, { ngx_string("passenger_default_user"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, default_user), NULL }, { ngx_string("passenger_default_group"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, default_group), NULL }, { ngx_string("passenger_analytics_log_user"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, analytics_log_user), NULL }, { ngx_string("passenger_analytics_log_group"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, analytics_log_group), NULL }, { ngx_string("union_station_gateway_address"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, union_station_gateway_address), NULL }, { ngx_string("union_station_gateway_port"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_num_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, union_station_gateway_port), NULL }, { ngx_string("union_station_gateway_cert"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, union_station_gateway_cert), NULL }, { ngx_string("union_station_proxy_address"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_MAIN_CONF_OFFSET, offsetof(passenger_main_conf_t, union_station_proxy_address), NULL }, /******** Per-location config ********/ #include "ConfigurationCommands.c" ngx_null_command }; passenger-4.0.37/ext/nginx/Configuration.h000644 000765 000024 00000005765 12233035540 021134 0ustar00honglistaff000000 000000 /* * Copyright (C) Igor Sysoev * Copyright (C) 2007 Manlio Perillo (manlio.perillo@gmail.com) * Copyright (C) 2010-2013 Phusion * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _PASSENGER_NGINX_CONFIGURATION_H_ #define _PASSENGER_NGINX_CONFIGURATION_H_ #include #include typedef struct { ngx_http_upstream_conf_t upstream_config; ngx_array_t *flushes; ngx_array_t *vars_len; ngx_array_t *vars; /** Raw SCGI header data for this location is cached here. */ ngx_str_t options_cache; #include "ConfigurationFields.h" #if (NGX_HTTP_CACHE) ngx_http_complex_value_t cache_key; #endif /************************************/ } passenger_loc_conf_t; typedef struct { ngx_str_t root_dir; ngx_array_t *ctl; ngx_str_t default_ruby; ngx_int_t log_level; ngx_str_t debug_log_file; ngx_str_t temp_dir; ngx_flag_t abort_on_startup_error; ngx_uint_t max_pool_size; ngx_uint_t pool_idle_time; ngx_flag_t user_switching; ngx_str_t default_user; ngx_str_t default_group; ngx_str_t analytics_log_user; ngx_str_t analytics_log_group; ngx_str_t union_station_gateway_address; ngx_uint_t union_station_gateway_port; ngx_str_t union_station_gateway_cert; ngx_str_t union_station_proxy_address; ngx_array_t *prestart_uris; } passenger_main_conf_t; extern const ngx_command_t passenger_commands[]; extern passenger_main_conf_t passenger_main_conf; void *passenger_create_main_conf(ngx_conf_t *cf); char *passenger_init_main_conf(ngx_conf_t *cf, void *conf_pointer); void *passenger_create_loc_conf(ngx_conf_t *cf); char *passenger_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child); #endif /* _PASSENGER_NGINX_CONFIGURATION_H_ */ passenger-4.0.37/ext/nginx/ConfigurationCommands.c000644 000765 000024 00000034345 12233035540 022605 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * ConfigurationCommands.c is automatically generated from ConfigurationCommands.c.erb, * using definitions from lib/phusion_passenger/nginx/config_options.rb. * Edits to ConfigurationCommands.c will be lost. * * To update ConfigurationCommands.c: * rake nginx * * To force regeneration of ConfigurationCommands.c: * rm -f ext/nginx/ConfigurationCommands.c * rake ext/nginx/ConfigurationCommands.c */ { ngx_string("passenger_enabled"), NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG, passenger_enabled, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, enabled), NULL }, { ngx_string("passenger_ruby"), NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, ruby), NULL }, { ngx_string("passenger_python"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, python), NULL }, { ngx_string("passenger_nodejs"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, nodejs), NULL }, { ngx_string("passenger_app_env"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, environment), NULL }, { ngx_string("passenger_friendly_error_pages"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG, ngx_conf_set_flag_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, friendly_error_pages), NULL }, { ngx_string("passenger_min_instances"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_num_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, min_instances), NULL }, { ngx_string("passenger_max_instances_per_app"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, ngx_conf_set_num_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, max_instances_per_app), NULL }, { ngx_string("passenger_max_requests"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_num_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, max_requests), NULL }, { ngx_string("passenger_start_timeout"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_num_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, start_timeout), NULL }, { ngx_string("passenger_base_uri"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_array_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, base_uris), NULL }, { ngx_string("passenger_document_root"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, document_root), NULL }, { ngx_string("passenger_user"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, user), NULL }, { ngx_string("passenger_group"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, group), NULL }, { ngx_string("passenger_app_group_name"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, app_group_name), NULL }, { ngx_string("passenger_app_root"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, app_root), NULL }, { ngx_string("passenger_app_rights"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, app_rights), NULL }, { ngx_string("union_station_support"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG, ngx_conf_set_flag_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, union_station_support), NULL }, { ngx_string("union_station_filter"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, union_station_filter, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, union_station_filters), NULL }, { ngx_string("passenger_debugger"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG, ngx_conf_set_flag_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, debugger), NULL }, { ngx_string("passenger_show_version_in_header"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG, ngx_conf_set_flag_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, show_version_in_header), NULL }, { ngx_string("passenger_max_preloader_idle_time"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_num_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, max_preloader_idle_time), NULL }, { ngx_string("passenger_ignore_headers"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_1MORE, ngx_conf_set_bitmask_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, upstream_config.ignore_headers), NULL }, { ngx_string("passenger_set_cgi_param"), NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE2, set_null_terminated_keyval_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, vars_source), NULL }, { ngx_string("passenger_pass_header"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_array_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, upstream_config.pass_headers), NULL }, { ngx_string("passenger_ignore_client_abort"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG, ngx_conf_set_flag_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, upstream_config.ignore_client_abort), NULL }, { ngx_string("passenger_buffer_response"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG, ngx_conf_set_flag_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, upstream_config.buffering), NULL }, { ngx_string("passenger_buffer_size"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_size_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, upstream_config.buffer_size), NULL }, { ngx_string("passenger_buffers"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE2, ngx_conf_set_bufs_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, upstream_config.bufs), NULL }, { ngx_string("passenger_busy_buffers_size"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_size_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, upstream_config.busy_buffers_size_conf), NULL }, { ngx_string("passenger_intercept_errors"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG, ngx_conf_set_flag_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, upstream_config.intercept_errors), NULL }, { ngx_string("passenger_spawn_method"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, spawn_method), NULL }, { ngx_string("passenger_load_shell_envvars"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG, ngx_conf_set_flag_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, load_shell_envvars), NULL }, { ngx_string("union_station_key"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, union_station_key), NULL }, { ngx_string("passenger_max_request_queue_size"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_num_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, max_request_queue_size), NULL }, { ngx_string("passenger_request_queue_overflow_status_code"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_num_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, request_queue_overflow_status_code), NULL }, { ngx_string("passenger_restart_dir"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, restart_dir), NULL }, { ngx_string("passenger_app_type"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, app_type), NULL }, { ngx_string("passenger_startup_file"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, startup_file), NULL }, { ngx_string("passenger_fly_with"), NGX_HTTP_MAIN_CONF | NGX_CONF_TAKE1, passenger_enterprise_only, NGX_HTTP_MAIN_CONF_OFFSET, 0, NULL }, { ngx_string("passenger_max_instances"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, passenger_enterprise_only, NGX_HTTP_LOC_CONF_OFFSET, 0, NULL }, { ngx_string("passenger_max_request_time"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, passenger_enterprise_only, NGX_HTTP_LOC_CONF_OFFSET, 0, NULL }, { ngx_string("passenger_memory_limit"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, passenger_enterprise_only, NGX_HTTP_LOC_CONF_OFFSET, 0, NULL }, { ngx_string("passenger_concurrency_model"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, passenger_enterprise_only, NGX_HTTP_LOC_CONF_OFFSET, 0, NULL }, { ngx_string("passenger_thread_count"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, passenger_enterprise_only, NGX_HTTP_LOC_CONF_OFFSET, 0, NULL }, { ngx_string("passenger_rolling_restarts"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG, passenger_enterprise_only, NGX_HTTP_LOC_CONF_OFFSET, 0, NULL }, { ngx_string("passenger_resist_deployment_errors"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG, passenger_enterprise_only, NGX_HTTP_LOC_CONF_OFFSET, 0, NULL }, { ngx_string("rails_spawn_method"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, spawn_method), NULL }, { ngx_string("rails_env"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, environment), NULL }, { ngx_string("rack_env"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_str_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, environment), NULL }, { ngx_string("rails_app_spawner_idle_time"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, ngx_conf_set_num_slot, NGX_HTTP_LOC_CONF_OFFSET, offsetof(passenger_loc_conf_t, max_preloader_idle_time), NULL }, { ngx_string("rails_framework_spawner_idle_time"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_TAKE1, rails_framework_spawner_idle_time, NGX_HTTP_LOC_CONF_OFFSET, 0, NULL }, { ngx_string("passenger_use_global_queue"), NGX_HTTP_MAIN_CONF | NGX_HTTP_SRV_CONF | NGX_HTTP_LOC_CONF | NGX_HTTP_LIF_CONF | NGX_CONF_FLAG, passenger_use_global_queue, NGX_HTTP_LOC_CONF_OFFSET, 0, NULL }, passenger-4.0.37/ext/nginx/ConfigurationCommands.c.erb000644 000765 000024 00000007641 12233035540 023353 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * ConfigurationCommands.c is automatically generated from ConfigurationCommands.c.erb, * using definitions from lib/phusion_passenger/nginx/config_options.rb. * Edits to ConfigurationCommands.c will be lost. * * To update ConfigurationCommands.c: * rake nginx * * To force regeneration of ConfigurationCommands.c: * rm -f ext/nginx/ConfigurationCommands.c * rake ext/nginx/ConfigurationCommands.c */ <% require 'phusion_passenger/nginx/config_options' def resolve_possible_alias(option) if option[:alias_for] the_alias = LOCATION_CONFIGURATION_OPTIONS.find do |o| o[:name] == option[:alias_for] end.dup the_alias[:aliased_for] = option[:name] return the_alias else return option end end def name_for(option) return (option[:aliased_for] || option[:name]).inspect end def context_for(option) context = option.fetch(:context, [:main, :srv, :loc, :lif]) return context.map{ |c| "NGX_HTTP_#{c.to_s.upcase}_CONF" }.join(" | ") end def take_type_for(option) return option[:take] if option[:take] case option[:type] when :string, :integer, :string_array return "NGX_CONF_TAKE1" when :flag return "NGX_CONF_FLAG" when :string_keyval return "NGX_CONF_TAKE2" else raise "Unknown type #{option[:type].inspect} for option #{option[:name]}" end end def setter_function_for(option) return option[:function] if option[:function] case option[:type] when :string return "ngx_conf_set_str_slot" when :integer return "ngx_conf_set_num_slot" when :flag return "ngx_conf_set_flag_slot" when :string_array return "ngx_conf_set_str_array_slot" when :string_keyval return "set_null_terminated_keyval_slot" when :path return "ngx_conf_set_path_slot" else raise "Unknown type #{option[:type].inspect} for option #{option[:name]}" end end def struct_for(option) option[:struct] || "NGX_HTTP_LOC_CONF_OFFSET" end def struct_type_for(option) case struct_for(option) when "NGX_HTTP_LOC_CONF_OFFSET" return "passenger_loc_conf_t" when "NGX_HTTP_MAIN_CONF_OFFSET" return "passenger_main_conf_t" else raise "Unknown struct #{struct_for(option).inspect}" end end def struct_field_for(option) if option.has_key?(:field) if field = option[:field] return "offsetof(#{struct_type_for(option)}, #{field})" else return "0" end else field = option[:name].sub(/^passenger_/, '') return "offsetof(#{struct_type_for(option)}, #{field})" end end %> <% for option in LOCATION_CONFIGURATION_OPTIONS %> { <% option = resolve_possible_alias(option) %> ngx_string(<%= name_for(option) %>), <%= context_for(option) %> | <%= take_type_for(option) %>, <%= setter_function_for(option) %>, <%= struct_for(option) %>, <%= struct_field_for(option) %>, NULL }, <% end %> passenger-4.0.37/ext/nginx/ConfigurationFields.h000644 000765 000024 00000004741 12233035540 022254 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * ConfigurationFields.h is automatically generated from ConfigurationFields.h.erb, * using definitions from lib/phusion_passenger/nginx/config_options.rb. * Edits to ConfigurationFields.h will be lost. * * To update ConfigurationFields.h: * rake nginx * * To force regeneration of ConfigurationFields.h: * rm -f ext/nginx/ConfigurationFields.h * rake ext/nginx/ConfigurationFields.h */ ngx_array_t *base_uris; ngx_int_t debugger; ngx_int_t enabled; ngx_int_t friendly_error_pages; ngx_int_t load_shell_envvars; ngx_int_t max_instances_per_app; ngx_int_t max_preloader_idle_time; ngx_int_t max_request_queue_size; ngx_int_t max_requests; ngx_int_t min_instances; ngx_int_t request_queue_overflow_status_code; ngx_int_t show_version_in_header; ngx_int_t start_timeout; ngx_array_t *union_station_filters; ngx_int_t union_station_support; ngx_array_t *vars_source; ngx_str_t app_group_name; ngx_str_t app_rights; ngx_str_t app_root; ngx_str_t app_type; ngx_str_t document_root; ngx_str_t environment; ngx_str_t group; ngx_str_t nodejs; ngx_str_t python; ngx_str_t restart_dir; ngx_str_t ruby; ngx_str_t spawn_method; ngx_str_t startup_file; ngx_str_t union_station_key; ngx_str_t user; passenger-4.0.37/ext/nginx/ConfigurationFields.h.erb000644 000765 000024 00000005711 12233035540 023021 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * ConfigurationFields.h is automatically generated from ConfigurationFields.h.erb, * using definitions from lib/phusion_passenger/nginx/config_options.rb. * Edits to ConfigurationFields.h will be lost. * * To update ConfigurationFields.h: * rake nginx * * To force regeneration of ConfigurationFields.h: * rm -f ext/nginx/ConfigurationFields.h * rake ext/nginx/ConfigurationFields.h */ <% require 'phusion_passenger/nginx/config_options' def filter_eligible_options(options) return options.reject do |option| option[:alias_for] || option.fetch(:field, true).nil? || option[:field].to_s =~ /\./ end end def struct_field_for(option) if option.has_key?(:field) return option[:field].to_s else return option[:name].sub(/^passenger_/, '') end end # Returns [definition_source, estimated_size_on_x86_64, field_name] def definition_for(option) field = struct_field_for(option) case option[:type] when :string return ["ngx_str_t #{field}", 8 + 4, field] when :integer, :flag return ["ngx_int_t #{field}", 8, field] when :string_array, :string_keyval return ["ngx_array_t *#{field}", 8, field]; else raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" end end eligible_options = filter_eligible_options(LOCATION_CONFIGURATION_OPTIONS) definitions = eligible_options.map { |o| definition_for(o) } # Sort the definitions by size in order to make the struct smaller. # It's possible to make it even smaller with a smarter algorithm but for now # I don't bother. definitions.sort! do |d1, d2| if d1[1] == d2[1] # After sorting on size, sort alphabetically. d1[2] <=> d2[2] else d1[1] <=> d2[1] end end %> <% for definition in definitions %> <%= definition[0] %>; <% end %> passenger-4.0.37/ext/nginx/ContentHandler.c000644 000765 000024 00000131265 12233035540 021223 0ustar00honglistaff000000 000000 /* * Copyright (C) Igor Sysoev * Copyright (C) 2007 Manlio Perillo (manlio.perillo@gmail.com) * Copyright (C) 2010-2013 Phusion * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include "ngx_http_passenger_module.h" #include "ContentHandler.h" #include "StaticContentHandler.h" #include "Configuration.h" #include "common/Constants.h" #define NGX_HTTP_SCGI_PARSE_NO_HEADER 20 typedef enum { FT_ERROR, FT_FILE, FT_DIRECTORY, FT_OTHER } FileType; static ngx_int_t reinit_request(ngx_http_request_t *r); static ngx_int_t process_status_line(ngx_http_request_t *r); static ngx_int_t parse_status_line(ngx_http_request_t *r, passenger_context_t *context); static ngx_int_t process_header(ngx_http_request_t *r); static void abort_request(ngx_http_request_t *r); static void finalize_request(ngx_http_request_t *r, ngx_int_t rc); static unsigned int uint_to_str(ngx_uint_t i, u_char *str, ngx_uint_t size) { unsigned int len = ngx_snprintf(str, size - 1, "%ui", i) - str; str[len] = '\0'; return len; } static FileType get_file_type(const u_char *filename, unsigned int throttle_rate) { struct stat buf; int ret; ret = pp_cached_file_stat_perform(pp_stat_cache, (const char *) filename, &buf, throttle_rate); if (ret == 0) { if (S_ISREG(buf.st_mode)) { return FT_FILE; } else if (S_ISDIR(buf.st_mode)) { return FT_DIRECTORY; } else { return FT_OTHER; } } else { return FT_ERROR; } } static int file_exists(const u_char *filename, unsigned int throttle_rate) { return get_file_type(filename, throttle_rate) == FT_FILE; } static int mapped_filename_equals(const u_char *filename, size_t filename_len, ngx_str_t *str) { return (str->len == filename_len && memcmp(str->data, filename, filename_len) == 0) || (str->len == filename_len - 1 && filename[filename_len - 1] == '/' && memcmp(str->data, filename, filename_len - 1) == 0); } /** * Maps the URI for the given request to a page cache file, if possible. * * @return Whether the URI has been successfully mapped to a page cache file. * @param r The corresponding request. * @param public_dir The web application's 'public' directory. * @param filename The filename that the URI normally maps to. * @param filename_len The length of the filename string. * @param root The size of the root path in filename. * @param page_cache_file If mapping was successful, then the page cache * file's filename will be stored in here. * page_cache_file.data must already point to * a buffer, and page_cache_file.len must be set * to the size of this buffer, including terminating NUL. */ static int map_uri_to_page_cache_file(ngx_http_request_t *r, ngx_str_t *public_dir, const u_char *filename, size_t filename_len, ngx_str_t *page_cache_file) { u_char *end; if ((r->method != NGX_HTTP_GET && r->method != NGX_HTTP_HEAD) || filename_len == 0) { return 0; } /* From this point on we know that filename is not an empty string. */ /* Check whether `filename` is equal to public_dir. * `filename` may also be equal to public_dir + "/" so check for that as well. */ if (mapped_filename_equals(filename, filename_len, public_dir)) { /* If the URI maps to the 'public' or the alias directory (i.e. the request is the * base URI) then index.html is the page cache file. */ if (filename_len + sizeof("/index.html") > page_cache_file->len) { /* Page cache filename doesn't fit in the buffer. */ return 0; } end = ngx_copy(page_cache_file->data, filename, filename_len); if (filename[filename_len - 1] != '/') { end = ngx_copy(end, "/", 1); } end = ngx_copy(end, "index.html", sizeof("index.html")); } else { /* Otherwise, the page cache file is just filename + ".html". */ if (filename_len + sizeof(".html") > page_cache_file->len) { /* Page cache filename doesn't fit in the buffer. */ return 0; } end = ngx_copy(page_cache_file->data, filename, filename_len); end = ngx_copy(end, ".html", sizeof(".html")); } if (file_exists(page_cache_file->data, 0)) { page_cache_file->len = end - page_cache_file->data - 1; return 1; } else { return 0; } } static int find_base_uri(ngx_http_request_t *r, const passenger_loc_conf_t *loc, ngx_str_t *found_base_uri) { ngx_uint_t i; ngx_str_t *base_uris, *base_uri, *uri; if (loc->base_uris == NGX_CONF_UNSET_PTR) { return 0; } else { base_uris = (ngx_str_t *) loc->base_uris->elts; uri = &r->uri; for (i = 0; i < loc->base_uris->nelts; i++) { base_uri = &base_uris[i]; if (base_uri->len == 1 && base_uri->data[0] == '/') { /* Ignore 'passenger_base_uri /' options. Users usually * specify this out of ignorance. */ continue; } if (( uri->len == base_uri->len && ngx_strncmp(uri->data, base_uri->data, uri->len) == 0 ) || ( uri->len > base_uri->len && ngx_strncmp(uri->data, base_uri->data, base_uri->len) == 0 && uri->data[base_uri->len] == (u_char) '/' )) { *found_base_uri = *base_uri; return 1; } } return 0; } } static void set_upstream_server_address(ngx_http_upstream_t *upstream, ngx_http_upstream_conf_t *upstream_config) { ngx_http_upstream_server_t *servers = upstream_config->upstream->servers->elts; ngx_addr_t *address = &servers[0].addrs[0]; const char *request_socket_filename; unsigned int request_socket_filename_len; struct sockaddr_un *sockaddr; /* The Nginx API makes it extremely difficult to register an upstream server * address outside of the configuration loading phase. However we don't know * the helper agent's request socket filename until we're done with loading * the configuration. So during configuration loading we register a placeholder * address for the upstream configuration, and while processing requests * we substitute the placeholder filename with the real helper agent request * socket filename. */ if (address->name.data == pp_placeholder_upstream_address.data) { sockaddr = (struct sockaddr_un *) address->sockaddr; request_socket_filename = pp_agents_starter_get_request_socket_filename(pp_agents_starter, &request_socket_filename_len); address->name.data = (u_char *) request_socket_filename; address->name.len = request_socket_filename_len; strncpy(sockaddr->sun_path, request_socket_filename, sizeof(sockaddr->sun_path)); sockaddr->sun_path[sizeof(sockaddr->sun_path) - 1] = '\0'; } } /** * If the helper agent socket cannot be connected to then we want Nginx to print * the proper socket filename in the error message. The socket filename is stored * in one of the upstream peer data structures. This name is initialized during * the first ngx_http_read_client_request_body() call so there's no way to fix the * name before the first request, which is why we do it after the fact. */ static void fix_peer_address(ngx_http_request_t *r) { ngx_http_upstream_rr_peer_data_t *rrp; ngx_http_upstream_rr_peers_t *peers; ngx_http_upstream_rr_peer_t *peer; unsigned int peer_index; const char *request_socket_filename; unsigned int request_socket_filename_len; if (r->upstream->peer.get != ngx_http_upstream_get_round_robin_peer) { /* This function only supports the round-robin upstream method. */ return; } rrp = r->upstream->peer.data; peers = rrp->peers; request_socket_filename = pp_agents_starter_get_request_socket_filename(pp_agents_starter, &request_socket_filename_len); while (peers != NULL) { if (peers->name) { if (peers->name->data == (u_char *) request_socket_filename) { /* Peer names already fixed. */ return; } peers->name->data = (u_char *) request_socket_filename; peers->name->len = request_socket_filename_len; } peer_index = 0; while (1) { peer = &peers->peer[peer_index]; peer->name.data = (u_char *) request_socket_filename; peer->name.len = request_socket_filename_len; if (peer->down) { peer_index++; } else { break; } } peers = peers->next; } } #if (NGX_HTTP_CACHE) static ngx_int_t create_key(ngx_http_request_t *r) { ngx_str_t *key; passenger_loc_conf_t *slcf; key = ngx_array_push(&r->cache->keys); if (key == NULL) { return NGX_ERROR; } slcf = ngx_http_get_module_loc_conf(r, ngx_http_passenger_module); if (ngx_http_complex_value(r, &slcf->cache_key, key) != NGX_OK) { return NGX_ERROR; } return NGX_OK; } #endif static ngx_int_t create_request(ngx_http_request_t *r) { u_char ch; const char * helper_agent_request_socket_password_data; unsigned int helper_agent_request_socket_password_len; u_char buf[sizeof("4294967296") + 1]; size_t len, size, key_len, val_len; const u_char *app_type_string; size_t app_type_string_len; int server_name_len; ngx_str_t escaped_uri; ngx_str_t *union_station_filters = NULL; void *tmp; ngx_uint_t i, n; ngx_buf_t *b; ngx_chain_t *cl, *body; ngx_list_part_t *part; ngx_table_elt_t *header; ngx_http_script_code_pt code; ngx_http_script_engine_t e, le; ngx_http_core_srv_conf_t *cscf; passenger_loc_conf_t *slcf; passenger_context_t *context; ngx_http_script_len_code_pt lcode; cscf = ngx_http_get_module_srv_conf(r, ngx_http_core_module); slcf = ngx_http_get_module_loc_conf(r, ngx_http_passenger_module); context = ngx_http_get_module_ctx(r, ngx_http_passenger_module); if (context == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } app_type_string = (const u_char *) pp_get_app_type_name(context->app_type); app_type_string_len = strlen((const char *) app_type_string) + 1; /* include null terminator */ /* * Nginx unescapes URI's before passing them to Phusion Passenger, * but backend processes expect the escaped version. * http://code.google.com/p/phusion-passenger/issues/detail?id=404 */ escaped_uri.len = 2 * ngx_escape_uri(NULL, r->uri.data, r->uri.len, NGX_ESCAPE_URI) + r->uri.len; escaped_uri.data = ngx_pnalloc(r->pool, escaped_uri.len + 1); escaped_uri.data[escaped_uri.len] = '\0'; ngx_escape_uri(escaped_uri.data, r->uri.data, r->uri.len, NGX_ESCAPE_URI); /************************************************** * Determine the request header length. **************************************************/ len = 0; /* Length of the Content-Length header. A value of -1 means that the content * length is unspecified, which is the case for e.g. WebSocket requests. */ if (r->headers_in.content_length_n >= 0) { len += sizeof("CONTENT_LENGTH") + uint_to_str(r->headers_in.content_length_n, buf, sizeof(buf)) + 1; /* +1 for trailing null */ } /* DOCUMENT_ROOT, SCRIPT_NAME, RAILS_RELATIVE_URL_ROOT, PATH_INFO and REQUEST_URI. */ len += sizeof("DOCUMENT_ROOT") + context->public_dir.len + 1; if (context->base_uri.len > 0) { len += sizeof("SCRIPT_NAME") + context->base_uri.len + 1; len += sizeof("RAILS_RELATIVE_URL_ROOT") + context->base_uri.len + 1; len += sizeof("PATH_INFO") + escaped_uri.len - context->base_uri.len + 1; } else { len += sizeof("SCRIPT_NAME") + sizeof(""); len += sizeof("PATH_INFO") + escaped_uri.len + 1; } len += sizeof("REQUEST_URI") + escaped_uri.len + 1; if (r->args.len > 0) { len += 1 + r->args.len; } /* SERVER_NAME; must be equal to HTTP_HOST without the port part */ if (r->headers_in.host != NULL) { tmp = memchr(r->headers_in.host->value.data, ':', r->headers_in.host->value.len); if (tmp == NULL) { server_name_len = r->headers_in.host->value.len; } else { server_name_len = (int) ((const u_char *) tmp - r->headers_in.host->value.data); } } else { server_name_len = cscf->server_name.len; } len += sizeof("SERVER_NAME") + server_name_len + 1; /* Various other HTTP headers. */ if (r->headers_in.content_type != NULL && r->headers_in.content_type->value.len > 0) { len += sizeof("CONTENT_TYPE") + r->headers_in.content_type->value.len + 1; } #if (NGX_HTTP_SSL) if (r->http_connection->ssl) { len += sizeof("HTTPS") + sizeof("on"); } #endif /* Lengths of Passenger application pool options. */ len += slcf->options_cache.len; len += sizeof("PASSENGER_APP_TYPE") + app_type_string_len; if (slcf->union_station_filters != NGX_CONF_UNSET_PTR && slcf->union_station_filters->nelts > 0) { len += sizeof("UNION_STATION_FILTERS"); union_station_filters = (ngx_str_t *) slcf->union_station_filters->elts; for (i = 0; i < slcf->union_station_filters->nelts; i++) { if (i != 0) { len++; } len += union_station_filters[i].len; } len++; } /***********************/ /***********************/ /* Lengths of various CGI variables. */ if (slcf->vars_len) { ngx_memzero(&le, sizeof(ngx_http_script_engine_t)); ngx_http_script_flush_no_cacheable_variables(r, slcf->flushes); le.flushed = 1; le.ip = slcf->vars_len->elts; le.request = r; while (*(uintptr_t *) le.ip) { lcode = *(ngx_http_script_len_code_pt *) le.ip; key_len = lcode(&le); for (val_len = 0; *(uintptr_t *) le.ip; val_len += lcode(&le)) { lcode = *(ngx_http_script_len_code_pt *) le.ip; } le.ip += sizeof(uintptr_t); len += key_len + val_len; } } /* Lengths of HTTP headers. */ if (slcf->upstream_config.pass_request_headers) { part = &r->headers_in.headers.part; header = part->elts; for (i = 0; /* void */; i++) { if (i >= part->nelts) { if (part->next == NULL) { break; } part = part->next; header = part->elts; i = 0; } len += sizeof("HTTP_") - 1 + header[i].key.len + 1 + header[i].value.len + 1; } } /************************************************** * Build the request header data. **************************************************/ helper_agent_request_socket_password_data = pp_agents_starter_get_request_socket_password(pp_agents_starter, &helper_agent_request_socket_password_len); size = helper_agent_request_socket_password_len + /* netstring length + ":" + trailing "," */ /* note: 10 == sizeof("4294967296") - 1 */ len + 10 + 1 + 1; b = ngx_create_temp_buf(r->pool, size); if (b == NULL) { return NGX_ERROR; } cl = ngx_alloc_chain_link(r->pool); if (cl == NULL) { return NGX_ERROR; } cl->buf = b; /* Build SCGI header netstring length part. */ b->last = ngx_copy(b->last, helper_agent_request_socket_password_data, helper_agent_request_socket_password_len); b->last = ngx_snprintf(b->last, 10, "%ui", len); *b->last++ = (u_char) ':'; if (r->headers_in.content_length_n >= 0) { b->last = ngx_copy(b->last, "CONTENT_LENGTH", sizeof("CONTENT_LENGTH")); b->last = ngx_snprintf(b->last, 10, "%ui", r->headers_in.content_length_n); *b->last++ = (u_char) 0; } /* Build DOCUMENT_ROOT, SCRIPT_NAME, RAILS_RELATIVE_URL_ROOT, PATH_INFO and REQUEST_URI. */ b->last = ngx_copy(b->last, "DOCUMENT_ROOT", sizeof("DOCUMENT_ROOT")); b->last = ngx_copy(b->last, context->public_dir.data, context->public_dir.len + 1); if (context->base_uri.len > 0) { b->last = ngx_copy(b->last, "SCRIPT_NAME", sizeof("SCRIPT_NAME")); b->last = ngx_copy(b->last, context->base_uri.data, context->base_uri.len + 1); b->last = ngx_copy(b->last, "RAILS_RELATIVE_URL_ROOT", sizeof("RAILS_RELATIVE_URL_ROOT")); b->last = ngx_copy(b->last, context->base_uri.data, context->base_uri.len + 1); b->last = ngx_copy(b->last, "PATH_INFO", sizeof("PATH_INFO")); b->last = ngx_copy(b->last, escaped_uri.data + context->base_uri.len, escaped_uri.len - context->base_uri.len); b->last = ngx_copy(b->last, "", 1); } else { b->last = ngx_copy(b->last, "SCRIPT_NAME", sizeof("SCRIPT_NAME")); b->last = ngx_copy(b->last, "", sizeof("")); b->last = ngx_copy(b->last, "PATH_INFO", sizeof("PATH_INFO")); b->last = ngx_copy(b->last, escaped_uri.data, escaped_uri.len); b->last = ngx_copy(b->last, "", 1); } b->last = ngx_copy(b->last, "REQUEST_URI", sizeof("REQUEST_URI")); b->last = ngx_copy(b->last, escaped_uri.data, escaped_uri.len); if (r->args.len > 0) { b->last = ngx_copy(b->last, "?", 1); b->last = ngx_copy(b->last, r->args.data, r->args.len); } b->last = ngx_copy(b->last, "", 1); /* SERVER_NAME */ b->last = ngx_copy(b->last, "SERVER_NAME", sizeof("SERVER_NAME")); if (r->headers_in.host != NULL) { b->last = ngx_copy(b->last, r->headers_in.host->value.data, server_name_len); } else { b->last = ngx_copy(b->last, cscf->server_name.data, server_name_len); } b->last = ngx_copy(b->last, "", 1); /* Various other HTTP headers. */ if (r->headers_in.content_type != NULL && r->headers_in.content_type->value.len > 0) { b->last = ngx_copy(b->last, "CONTENT_TYPE", sizeof("CONTENT_TYPE")); b->last = ngx_copy(b->last, r->headers_in.content_type->value.data, r->headers_in.content_type->value.len); b->last = ngx_copy(b->last, "", 1); } #if (NGX_HTTP_SSL) if (r->http_connection->ssl) { b->last = ngx_copy(b->last, "HTTPS", sizeof("HTTPS")); b->last = ngx_copy(b->last, "on", sizeof("on")); } #endif /* Build Passenger application pool option headers. */ b->last = ngx_copy(b->last, slcf->options_cache.data, slcf->options_cache.len); b->last = ngx_copy(b->last, "PASSENGER_APP_TYPE", sizeof("PASSENGER_APP_TYPE")); b->last = ngx_copy(b->last, app_type_string, app_type_string_len); if (slcf->union_station_filters != NGX_CONF_UNSET_PTR && slcf->union_station_filters->nelts > 0) { b->last = ngx_copy(b->last, "UNION_STATION_FILTERS", sizeof("UNION_STATION_FILTERS")); for (i = 0; i < slcf->union_station_filters->nelts; i++) { if (i != 0) { b->last = ngx_copy(b->last, "\1", 1); } b->last = ngx_copy(b->last, union_station_filters[i].data, union_station_filters[i].len); } b->last = ngx_copy(b->last, "\0", 1); } /***********************/ /***********************/ if (slcf->vars_len) { ngx_memzero(&e, sizeof(ngx_http_script_engine_t)); e.ip = slcf->vars->elts; e.pos = b->last; e.request = r; e.flushed = 1; le.ip = slcf->vars_len->elts; while (*(uintptr_t *) le.ip) { lcode = *(ngx_http_script_len_code_pt *) le.ip; (void) lcode(&le); for (val_len = 0; *(uintptr_t *) le.ip; val_len += lcode(&le)) { lcode = *(ngx_http_script_len_code_pt *) le.ip; } le.ip += sizeof(uintptr_t); while (*(uintptr_t *) e.ip) { code = *(ngx_http_script_code_pt *) e.ip; code((ngx_http_script_engine_t *) &e); } e.ip += sizeof(uintptr_t); } b->last = e.pos; } if (slcf->upstream_config.pass_request_headers) { part = &r->headers_in.headers.part; header = part->elts; for (i = 0; /* void */; i++) { if (i >= part->nelts) { if (part->next == NULL) { break; } part = part->next; header = part->elts; i = 0; } b->last = ngx_cpymem(b->last, "HTTP_", sizeof("HTTP_") - 1); for (n = 0; n < header[i].key.len; n++) { ch = header[i].key.data[n]; if (ch >= 'a' && ch <= 'z') { ch &= ~0x20; } else if (ch == '-') { ch = '_'; } *b->last++ = ch; } *b->last++ = (u_char) 0; b->last = ngx_copy(b->last, header[i].value.data, header[i].value.len); *b->last++ = (u_char) 0; } } *b->last++ = (u_char) ','; if (slcf->upstream_config.pass_request_body) { body = r->upstream->request_bufs; r->upstream->request_bufs = cl; while (body) { b = ngx_alloc_buf(r->pool); if (b == NULL) { return NGX_ERROR; } ngx_memcpy(b, body->buf, sizeof(ngx_buf_t)); cl->next = ngx_alloc_chain_link(r->pool); if (cl->next == NULL) { return NGX_ERROR; } cl = cl->next; cl->buf = b; body = body->next; } b->flush = 1; } else { r->upstream->request_bufs = cl; } cl->next = NULL; return NGX_OK; } static ngx_int_t reinit_request(ngx_http_request_t *r) { passenger_context_t *context; context = ngx_http_get_module_ctx(r, ngx_http_passenger_module); if (context == NULL) { return NGX_OK; } context->status = 0; context->status_count = 0; context->status_start = NULL; context->status_end = NULL; r->upstream->process_header = process_status_line; r->state = 0; return NGX_OK; } static ngx_int_t process_status_line(ngx_http_request_t *r) { ngx_int_t rc; ngx_http_upstream_t *u; passenger_context_t *context; context = ngx_http_get_module_ctx(r, ngx_http_passenger_module); if (context == NULL) { return NGX_ERROR; } rc = parse_status_line(r, context); if (rc == NGX_AGAIN) { return rc; } u = r->upstream; if (rc == NGX_HTTP_SCGI_PARSE_NO_HEADER) { ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "upstream sent no valid HTTP/1.0 header"); #if 0 if (u->accel) { return NGX_HTTP_UPSTREAM_INVALID_HEADER; } #endif u->headers_in.status_n = NGX_HTTP_OK; u->state->status = NGX_HTTP_OK; return NGX_OK; } u->headers_in.status_n = context->status; u->state->status = context->status; u->headers_in.status_line.len = context->status_end - context->status_start; u->headers_in.status_line.data = ngx_palloc(r->pool, u->headers_in.status_line.len); if (u->headers_in.status_line.data == NULL) { return NGX_ERROR; } ngx_memcpy(u->headers_in.status_line.data, context->status_start, u->headers_in.status_line.len); ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http scgi status %ui \"%V\"", u->headers_in.status_n, &u->headers_in.status_line); u->process_header = process_header; return process_header(r); } static ngx_int_t parse_status_line(ngx_http_request_t *r, passenger_context_t *context) { u_char ch; u_char *pos; ngx_http_upstream_t *u; enum { sw_start = 0, sw_H, sw_HT, sw_HTT, sw_HTTP, sw_first_major_digit, sw_major_digit, sw_first_minor_digit, sw_minor_digit, sw_status, sw_space_after_status, sw_status_text, sw_almost_done } state; u = r->upstream; state = r->state; for (pos = u->buffer.pos; pos < u->buffer.last; pos++) { ch = *pos; switch (state) { /* "HTTP/" */ case sw_start: switch (ch) { case 'H': state = sw_H; break; default: return NGX_HTTP_SCGI_PARSE_NO_HEADER; } break; case sw_H: switch (ch) { case 'T': state = sw_HT; break; default: return NGX_HTTP_SCGI_PARSE_NO_HEADER; } break; case sw_HT: switch (ch) { case 'T': state = sw_HTT; break; default: return NGX_HTTP_SCGI_PARSE_NO_HEADER; } break; case sw_HTT: switch (ch) { case 'P': state = sw_HTTP; break; default: return NGX_HTTP_SCGI_PARSE_NO_HEADER; } break; case sw_HTTP: switch (ch) { case '/': state = sw_first_major_digit; break; default: return NGX_HTTP_SCGI_PARSE_NO_HEADER; } break; /* the first digit of major HTTP version */ case sw_first_major_digit: if (ch < '1' || ch > '9') { return NGX_HTTP_SCGI_PARSE_NO_HEADER; } state = sw_major_digit; break; /* the major HTTP version or dot */ case sw_major_digit: if (ch == '.') { state = sw_first_minor_digit; break; } if (ch < '0' || ch > '9') { return NGX_HTTP_SCGI_PARSE_NO_HEADER; } break; /* the first digit of minor HTTP version */ case sw_first_minor_digit: if (ch < '0' || ch > '9') { return NGX_HTTP_SCGI_PARSE_NO_HEADER; } state = sw_minor_digit; break; /* the minor HTTP version or the end of the request line */ case sw_minor_digit: if (ch == ' ') { state = sw_status; break; } if (ch < '0' || ch > '9') { return NGX_HTTP_SCGI_PARSE_NO_HEADER; } break; /* HTTP status code */ case sw_status: if (ch == ' ') { break; } if (ch < '0' || ch > '9') { return NGX_HTTP_SCGI_PARSE_NO_HEADER; } context->status = context->status * 10 + ch - '0'; if (++context->status_count == 3) { state = sw_space_after_status; context->status_start = pos - 2; } break; /* space or end of line */ case sw_space_after_status: switch (ch) { case ' ': state = sw_status_text; break; case '.': /* IIS may send 403.1, 403.2, etc */ state = sw_status_text; break; case CR: state = sw_almost_done; break; case LF: goto done; default: return NGX_HTTP_SCGI_PARSE_NO_HEADER; } break; /* any text until end of line */ case sw_status_text: switch (ch) { case CR: state = sw_almost_done; break; case LF: goto done; } break; /* end of status line */ case sw_almost_done: context->status_end = pos - 1; switch (ch) { case LF: goto done; default: return NGX_HTTP_SCGI_PARSE_NO_HEADER; } } } u->buffer.pos = pos; r->state = state; return NGX_AGAIN; done: u->buffer.pos = pos + 1; if (context->status_end == NULL) { context->status_end = pos; } r->state = sw_start; return NGX_OK; } static ngx_int_t process_header(ngx_http_request_t *r) { ngx_str_t *status_line; ngx_int_t rc, status; ngx_table_elt_t *h; ngx_http_upstream_t *u; ngx_http_upstream_header_t *hh; ngx_http_upstream_main_conf_t *umcf; ngx_http_core_loc_conf_t *clcf; passenger_loc_conf_t *slcf; umcf = ngx_http_get_module_main_conf(r, ngx_http_upstream_module); clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); slcf = ngx_http_get_module_loc_conf(r, ngx_http_passenger_module); for ( ;; ) { rc = ngx_http_parse_header_line(r, &r->upstream->buffer, 1); if (rc == NGX_OK) { /* a header line has been parsed successfully */ h = ngx_list_push(&r->upstream->headers_in.headers); if (h == NULL) { return NGX_ERROR; } h->hash = r->header_hash; h->key.len = r->header_name_end - r->header_name_start; h->value.len = r->header_end - r->header_start; h->key.data = ngx_pnalloc(r->pool, h->key.len + 1 + h->value.len + 1 + h->key.len); if (h->key.data == NULL) { return NGX_ERROR; } h->value.data = h->key.data + h->key.len + 1; h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1; ngx_memcpy(h->key.data, r->header_name_start, h->key.len); h->key.data[h->key.len] = '\0'; ngx_memcpy(h->value.data, r->header_start, h->value.len); h->value.data[h->value.len] = '\0'; if (h->key.len == r->lowcase_index) { ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len); } else { ngx_strlow(h->lowcase_key, h->key.data, h->key.len); } hh = ngx_hash_find(&umcf->headers_in_hash, h->hash, h->lowcase_key, h->key.len); if (hh && hh->handler(r, h, hh->offset) != NGX_OK) { return NGX_ERROR; } ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http scgi header: \"%V: %V\"", &h->key, &h->value); continue; } if (rc == NGX_HTTP_PARSE_HEADER_DONE) { /* a whole header has been parsed successfully */ ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "http scgi header done"); /* * if no "Server" and "Date" in header line, * then add the default headers */ if (r->upstream->headers_in.server == NULL) { h = ngx_list_push(&r->upstream->headers_in.headers); if (h == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } h->hash = ngx_hash(ngx_hash(ngx_hash(ngx_hash( ngx_hash('s', 'e'), 'r'), 'v'), 'e'), 'r'); h->key.len = sizeof("Server") - 1; h->key.data = (u_char *) "Server"; if( slcf->show_version_in_header == 0 ) { if (clcf->server_tokens) { h->value.data = (u_char *) (NGINX_VER " + Phusion Passenger"); } else { h->value.data = (u_char *) ("nginx + Phusion Passenger"); } } else { if (clcf->server_tokens) { h->value.data = (u_char *) (NGINX_VER " + Phusion Passenger " PASSENGER_VERSION); } else { h->value.data = (u_char *) ("nginx + Phusion Passenger " PASSENGER_VERSION); } } h->value.len = ngx_strlen(h->value.data); h->lowcase_key = (u_char *) "server"; } if (r->upstream->headers_in.date == NULL) { h = ngx_list_push(&r->upstream->headers_in.headers); if (h == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } h->hash = ngx_hash(ngx_hash(ngx_hash('d', 'a'), 't'), 'e'); h->key.len = sizeof("Date") - 1; h->key.data = (u_char *) "Date"; h->value.len = 0; h->value.data = NULL; h->lowcase_key = (u_char *) "date"; } /* Process "Status" header. */ u = r->upstream; if (u->headers_in.status_n) { goto done; } if (u->headers_in.status) { status_line = &u->headers_in.status->value; status = ngx_atoi(status_line->data, 3); if (status == NGX_ERROR) { ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "upstream sent invalid status \"%V\"", status_line); return NGX_HTTP_UPSTREAM_INVALID_HEADER; } u->headers_in.status_n = status; u->headers_in.status_line = *status_line; } else if (u->headers_in.location) { u->headers_in.status_n = 302; ngx_str_set(&u->headers_in.status_line, "302 Moved Temporarily"); } else { u->headers_in.status_n = 200; ngx_str_set(&u->headers_in.status_line, "200 OK"); } if (u->state) { u->state->status = u->headers_in.status_n; } done: /* Supported since Nginx 1.3.15. */ #ifdef NGX_HTTP_SWITCHING_PROTOCOLS if (u->headers_in.status_n == NGX_HTTP_SWITCHING_PROTOCOLS && r->headers_in.upgrade) { u->upgrade = 1; } #endif return NGX_OK; } if (rc == NGX_AGAIN) { return NGX_AGAIN; } /* there was error while a header line parsing */ ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "upstream sent invalid header"); return NGX_HTTP_UPSTREAM_INVALID_HEADER; } } static void abort_request(ngx_http_request_t *r) { ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "abort Passenger request"); } static void finalize_request(ngx_http_request_t *r, ngx_int_t rc) { ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "finalize Passenger request"); } ngx_int_t passenger_content_handler(ngx_http_request_t *r) { ngx_int_t rc; ngx_http_upstream_t *u; passenger_loc_conf_t *slcf; ngx_str_t path, base_uri; u_char *path_last, *end; u_char root_path_str[NGX_MAX_PATH + 1]; ngx_str_t root_path; size_t root_len, len; u_char page_cache_file_str[NGX_MAX_PATH + 1]; ngx_str_t page_cache_file; passenger_context_t *context; PP_Error error; if (passenger_main_conf.root_dir.len == 0) { return NGX_DECLINED; } else if (r->subrequest_in_memory) { ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, "ngx_http_passenger_module does not support " "subrequest in memory"); return NGX_HTTP_INTERNAL_SERVER_ERROR; } slcf = ngx_http_get_module_loc_conf(r, ngx_http_passenger_module); /* Let the next content handler take care of this request if Phusion * Passenger is disabled for this URL. */ if (!slcf->enabled) { return NGX_DECLINED; } /* Let the next content handler take care of this request if this URL * maps to an existing file. */ path_last = ngx_http_map_uri_to_path(r, &path, &root_len, 0); if (path_last != NULL && file_exists(path.data, 0)) { return NGX_DECLINED; } /* Create a string containing the root path. This path already * contains a trailing slash. */ end = ngx_copy(root_path_str, path.data, root_len); *end = '\0'; root_path.data = root_path_str; root_path.len = root_len; context = ngx_pcalloc(r->pool, sizeof(passenger_context_t)); if (context == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } ngx_http_set_ctx(r, context, ngx_http_passenger_module); /* Find the base URI for this web application, if any. */ if (find_base_uri(r, slcf, &base_uri)) { /* Store the found base URI into context->public_dir. We infer that * the 'public' directory of the web app equals document root + base URI. */ if (slcf->document_root.data != NULL) { len = slcf->document_root.len + 1; context->public_dir.data = ngx_palloc(r->pool, sizeof(u_char) * len); end = ngx_copy(context->public_dir.data, slcf->document_root.data, slcf->document_root.len); } else { len = root_path.len + base_uri.len + 1; context->public_dir.data = ngx_palloc(r->pool, sizeof(u_char) * len); end = ngx_copy(context->public_dir.data, root_path.data, root_path.len); end = ngx_copy(end, base_uri.data, base_uri.len); } *end = '\0'; context->public_dir.len = len - 1; context->base_uri = base_uri; } else { /* No base URI directives are applicable for this request. So assume that * the web application's public directory is the document root. * context->base_uri is now a NULL string. */ len = sizeof(u_char *) * (root_path.len + 1); context->public_dir.data = ngx_palloc(r->pool, len); end = ngx_copy(context->public_dir.data, root_path.data, root_path.len); *end = '\0'; context->public_dir.len = root_path.len; } /* If there's a corresponding page cache file for this URL, then serve that * file instead. */ page_cache_file.data = page_cache_file_str; page_cache_file.len = sizeof(page_cache_file_str); if (map_uri_to_page_cache_file(r, &context->public_dir, path.data, path_last - path.data, &page_cache_file)) { return passenger_static_content_handler(r, &page_cache_file); } if (slcf->app_type.data == NULL) { pp_error_init(&error); if (slcf->app_root.data == NULL) { context->app_type = pp_app_type_detector_check_document_root( pp_app_type_detector, (const char *) context->public_dir.data, context->public_dir.len, context->base_uri.len != 0, &error); } else { context->app_type = pp_app_type_detector_check_app_root( pp_app_type_detector, (const char *) slcf->app_root.data, slcf->app_root.len, &error); } if (context->app_type == PAT_NONE) { return NGX_DECLINED; } else if (context->app_type == PAT_ERROR) { if (error.errnoCode == EACCES) { ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0, "%s; This error means that the Nginx worker process (PID %d, " "running as UID %d) does not have permission to access this file. " "Please read the manual to learn how to fix this problem: " "section 'Troubleshooting' -> 'Upon accessing the web app, Nginx " "reports a \"Permission denied\" error'; Extra info", error.message, (int) getpid(), (int) getuid()); } else { ngx_log_error(NGX_LOG_ALERT, r->connection->log, (error.errnoCode == PP_NO_ERRNO) ? 0 : error.errnoCode, "%s", error.message); } pp_error_destroy(&error); return NGX_HTTP_INTERNAL_SERVER_ERROR; } } else { context->app_type = pp_get_app_type2((const char *) slcf->app_type.data, slcf->app_type.len); if (context->app_type == PAT_NONE) { return NGX_DECLINED; } } /* Setup upstream stuff and prepare sending the request to the backend. */ if (ngx_http_upstream_create(r) != NGX_OK) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } u = r->upstream; u->schema = pp_schema_string; u->output.tag = (ngx_buf_tag_t) &ngx_http_passenger_module; set_upstream_server_address(u, &slcf->upstream_config); u->conf = &slcf->upstream_config; #if (NGX_HTTP_CACHE) u->create_key = create_key; #endif u->create_request = create_request; u->reinit_request = reinit_request; u->process_header = process_status_line; u->abort_request = abort_request; u->finalize_request = finalize_request; r->state = 0; u->buffering = slcf->upstream_config.buffering; u->pipe = ngx_pcalloc(r->pool, sizeof(ngx_event_pipe_t)); if (u->pipe == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } u->pipe->input_filter = ngx_event_pipe_copy_input_filter; u->pipe->input_ctx = r; rc = ngx_http_read_client_request_body(r, ngx_http_upstream_init); fix_peer_address(r); if (rc >= NGX_HTTP_SPECIAL_RESPONSE) { return rc; } return NGX_DONE; } passenger-4.0.37/ext/nginx/ContentHandler.h000644 000765 000024 00000004140 12233035540 021217 0ustar00honglistaff000000 000000 /* * Copyright (C) Igor Sysoev * Copyright (C) 2007 Manlio Perillo (manlio.perillo@gmail.com) * Copyright (C) 2010-2013 Phusion * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _PASSENGER_NGINX_CONTENT_HANDLER_H_ #define _PASSENGER_NGINX_CONTENT_HANDLER_H_ #include #include #include "common/ApplicationPool2/AppTypes.h" typedef struct { /** Proxy state. */ ngx_uint_t status; ngx_uint_t status_count; u_char *status_start; u_char *status_end; /** The application's 'public' directory. */ ngx_str_t public_dir; /** The application's base URI. Points to an empty string if none. */ ngx_str_t base_uri; /** The application's type. */ PassengerAppType app_type; } passenger_context_t; ngx_int_t passenger_content_handler(ngx_http_request_t *r); #endif /* _PASSENGER_NGINX_CONTENT_HANDLER_H_ */ passenger-4.0.37/ext/nginx/CreateLocationConfig.c000644 000765 000024 00000006570 12233035540 022335 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * CreateLocationConfig.c is automatically generated from CreateLocationConfig.c.erb, * using definitions from lib/phusion_passenger/nginx/config_options.rb. * Edits to CreateLocationConfig.c will be lost. * * To update CreateLocationConfig.c: * rake nginx * * To force regeneration of CreateLocationConfig.c: * rm -f ext/nginx/CreateLocationConfig.c * rake ext/nginx/CreateLocationConfig.c */ conf->enabled = NGX_CONF_UNSET; conf->ruby.data = NULL; conf->ruby.len = 0; conf->python.data = NULL; conf->python.len = 0; conf->nodejs.data = NULL; conf->nodejs.len = 0; conf->environment.data = NULL; conf->environment.len = 0; conf->friendly_error_pages = NGX_CONF_UNSET; conf->min_instances = NGX_CONF_UNSET; conf->max_instances_per_app = NGX_CONF_UNSET; conf->max_requests = NGX_CONF_UNSET; conf->start_timeout = NGX_CONF_UNSET; conf->base_uris = NGX_CONF_UNSET_PTR; conf->document_root.data = NULL; conf->document_root.len = 0; conf->user.data = NULL; conf->user.len = 0; conf->group.data = NULL; conf->group.len = 0; conf->app_group_name.data = NULL; conf->app_group_name.len = 0; conf->app_root.data = NULL; conf->app_root.len = 0; conf->app_rights.data = NULL; conf->app_rights.len = 0; conf->union_station_support = NGX_CONF_UNSET; conf->union_station_filters = NGX_CONF_UNSET_PTR; conf->debugger = NGX_CONF_UNSET; conf->show_version_in_header = NGX_CONF_UNSET; conf->max_preloader_idle_time = NGX_CONF_UNSET; conf->vars_source = NGX_CONF_UNSET_PTR; conf->spawn_method.data = NULL; conf->spawn_method.len = 0; conf->load_shell_envvars = NGX_CONF_UNSET; conf->union_station_key.data = NULL; conf->union_station_key.len = 0; conf->max_request_queue_size = NGX_CONF_UNSET; conf->request_queue_overflow_status_code = NGX_CONF_UNSET; conf->restart_dir.data = NULL; conf->restart_dir.len = 0; conf->app_type.data = NULL; conf->app_type.len = 0; conf->startup_file.data = NULL; conf->startup_file.len = 0; passenger-4.0.37/ext/nginx/CreateLocationConfig.c.erb000644 000765 000024 00000005130 12233035540 023073 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * CreateLocationConfig.c is automatically generated from CreateLocationConfig.c.erb, * using definitions from lib/phusion_passenger/nginx/config_options.rb. * Edits to CreateLocationConfig.c will be lost. * * To update CreateLocationConfig.c: * rake nginx * * To force regeneration of CreateLocationConfig.c: * rm -f ext/nginx/CreateLocationConfig.c * rake ext/nginx/CreateLocationConfig.c */ <% require 'phusion_passenger/nginx/config_options' def filter_eligible_options(options) return options.reject do |option| option[:alias_for] || option.fetch(:field, true).nil? || option[:field].to_s =~ /\./ end end def struct_field_for(option) if option.has_key?(:field) return option[:field] else return option[:name].sub(/^passenger_/, '') end end %> <% for option in filter_eligible_options(LOCATION_CONFIGURATION_OPTIONS) %> <% if option[:type] == :string %> conf-><%= struct_field_for(option) %>.data = NULL; conf-><%= struct_field_for(option) %>.len = 0; <% elsif option[:type] == :integer || option[:type] == :flag %> conf-><%= struct_field_for(option) %> = NGX_CONF_UNSET; <% elsif option[:type] == :string_array || option[:type] == :string_keyval %> conf-><%= struct_field_for(option) %> = NGX_CONF_UNSET_PTR; <% else %> <% raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" %> <% end %> <% end %> passenger-4.0.37/ext/nginx/MergeLocationConfig.c000644 000765 000024 00000010156 12233035540 022164 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * MergeLocationConfig.c is automatically generated from MergeLocationConfig.c.erb, * using definitions from lib/phusion_passenger/nginx/config_options.rb. * Edits to MergeLocationConfig.c will be lost. * * To update MergeLocationConfig.c: * rake nginx * * To force regeneration of MergeLocationConfig.c: * rm -f ext/nginx/MergeLocationConfig.c * rake ext/nginx/MergeLocationConfig.c */ ngx_conf_merge_value(conf->enabled, prev->enabled, NGX_CONF_UNSET); ngx_conf_merge_str_value(conf->ruby, prev->ruby, NULL); ngx_conf_merge_str_value(conf->python, prev->python, NULL); ngx_conf_merge_str_value(conf->nodejs, prev->nodejs, NULL); ngx_conf_merge_str_value(conf->environment, prev->environment, NULL); ngx_conf_merge_value(conf->friendly_error_pages, prev->friendly_error_pages, NGX_CONF_UNSET); ngx_conf_merge_value(conf->min_instances, prev->min_instances, NGX_CONF_UNSET); ngx_conf_merge_value(conf->max_instances_per_app, prev->max_instances_per_app, NGX_CONF_UNSET); ngx_conf_merge_value(conf->max_requests, prev->max_requests, NGX_CONF_UNSET); ngx_conf_merge_value(conf->start_timeout, prev->start_timeout, NGX_CONF_UNSET); ngx_conf_merge_str_value(conf->document_root, prev->document_root, NULL); ngx_conf_merge_str_value(conf->user, prev->user, NULL); ngx_conf_merge_str_value(conf->group, prev->group, NULL); ngx_conf_merge_str_value(conf->app_group_name, prev->app_group_name, NULL); ngx_conf_merge_str_value(conf->app_root, prev->app_root, NULL); ngx_conf_merge_str_value(conf->app_rights, prev->app_rights, NULL); ngx_conf_merge_value(conf->union_station_support, prev->union_station_support, NGX_CONF_UNSET); ngx_conf_merge_value(conf->debugger, prev->debugger, NGX_CONF_UNSET); ngx_conf_merge_value(conf->show_version_in_header, prev->show_version_in_header, NGX_CONF_UNSET); ngx_conf_merge_value(conf->max_preloader_idle_time, prev->max_preloader_idle_time, NGX_CONF_UNSET); ngx_conf_merge_str_value(conf->spawn_method, prev->spawn_method, NULL); ngx_conf_merge_value(conf->load_shell_envvars, prev->load_shell_envvars, NGX_CONF_UNSET); ngx_conf_merge_str_value(conf->union_station_key, prev->union_station_key, NULL); ngx_conf_merge_value(conf->max_request_queue_size, prev->max_request_queue_size, NGX_CONF_UNSET); ngx_conf_merge_value(conf->request_queue_overflow_status_code, prev->request_queue_overflow_status_code, NGX_CONF_UNSET); ngx_conf_merge_str_value(conf->restart_dir, prev->restart_dir, NULL); ngx_conf_merge_str_value(conf->app_type, prev->app_type, NULL); ngx_conf_merge_str_value(conf->startup_file, prev->startup_file, NULL); passenger-4.0.37/ext/nginx/MergeLocationConfig.c.erb000644 000765 000024 00000005120 12233035540 022726 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * MergeLocationConfig.c is automatically generated from MergeLocationConfig.c.erb, * using definitions from lib/phusion_passenger/nginx/config_options.rb. * Edits to MergeLocationConfig.c will be lost. * * To update MergeLocationConfig.c: * rake nginx * * To force regeneration of MergeLocationConfig.c: * rm -f ext/nginx/MergeLocationConfig.c * rake ext/nginx/MergeLocationConfig.c */ <% require 'phusion_passenger/nginx/config_options' def filter_eligible_options(options) return options.reject do |option| option[:alias_for] || option.fetch(:field, true).nil? || option[:field].to_s =~ /\./ || !option.fetch(:auto_generate_nginx_merge_code, true) end end def struct_field_for(option) if option.has_key?(:field) return option[:field] else return option[:name].sub(/^passenger_/, '') end end %> <% for option in filter_eligible_options(LOCATION_CONFIGURATION_OPTIONS) %> <% if option[:type] == :string %> ngx_conf_merge_str_value(conf-><%= struct_field_for(option) %>, prev-><%= struct_field_for(option) %>, NULL); <% elsif option[:type] == :integer || option[:type] == :flag %> ngx_conf_merge_value(conf-><%= struct_field_for(option) %>, prev-><%= struct_field_for(option) %>, NGX_CONF_UNSET); <% else %> <% raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" %> <% end %> <% end %> passenger-4.0.37/ext/nginx/ngx_http_passenger_module.c000644 000765 000024 00000043754 12233035540 023567 0ustar00honglistaff000000 000000 /* * Copyright (C) Igor Sysoev * Copyright (C) 2007 Manlio Perillo (manlio.perillo@gmail.com) * Copyright (C) 2010-2013 Phusion * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ngx_http_passenger_module.h" #include "Configuration.h" #include "ContentHandler.h" #define HELPER_SERVER_MAX_SHUTDOWN_TIME 5 #define HELPER_SERVER_PASSWORD_SIZE 64 static int first_start = 1; ngx_str_t pp_schema_string; ngx_str_t pp_placeholder_upstream_address; PP_CachedFileStat *pp_stat_cache; PP_AppTypeDetector *pp_app_type_detector; PP_AgentsStarter *pp_agents_starter = NULL; ngx_cycle_t *pp_current_cycle; /* HISTORIC NOTE: We used to register passenger_content_handler as a default content handler, instead of setting ngx_http_core_loc_conf_t->handler. However, if ngx_http_read_client_request_body (and thus passenger_content_handler) returns NGX_AGAIN, then Nginx will pass the not-fully-receive file upload data to the upstream handler even though it shouldn't. Is this an Nginx bug? In any case, setting ngx_http_core_loc_conf_t->handler fixed the problem. static ngx_int_t register_content_handler(ngx_conf_t *cf) { ngx_http_handler_pt *h; ngx_http_core_main_conf_t *cmcf; cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module); h = ngx_array_push(&cmcf->phases[NGX_HTTP_CONTENT_PHASE].handlers); if (h == NULL) { return NGX_ERROR; } *h = passenger_content_handler; return NGX_OK; } */ static void ignore_sigpipe() { struct sigaction action; action.sa_handler = SIG_IGN; action.sa_flags = 0; sigemptyset(&action.sa_mask); sigaction(SIGPIPE, &action, NULL); } static char * ngx_str_null_terminate(ngx_str_t *str) { char *result = malloc(str->len + 1); memcpy(result, str->data, str->len); result[str->len] = '\0'; return result; } static void pp_variant_map_set_ngx_str(PP_VariantMap *m, const char *name, ngx_str_t *value) { pp_variant_map_set(m, name, (const char *) value->data, value->len); } /** * Save the Nginx master process's PID into a file under the server instance directory. * * A bug/limitation in Nginx doesn't allow us to create the server instance dir * *after* Nginx has daemonized, so the server instance dir's filename contains Nginx's * PID before daemonization. Normally PhusionPassenger::AdminTools::ServerInstance (used * by e.g. passenger-status) will think that the server instance dir is stale because the * PID in the filename doesn't exist. This PID file tells AdminTools::ServerInstance * what the actual PID is. */ static ngx_int_t save_master_process_pid(ngx_cycle_t *cycle) { u_char filename[NGX_MAX_PATH]; u_char *last; FILE *f; last = ngx_snprintf(filename, sizeof(filename) - 1, "%s/control_process.pid", pp_agents_starter_get_server_instance_dir(pp_agents_starter)); *last = (u_char) '\0'; f = fopen((const char *) filename, "w"); if (f != NULL) { fprintf(f, "%ld", (long) getppid()); fclose(f); } else { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, "could not create %s", filename); } return NGX_OK; } /** * This function is called after forking and just before exec()ing the helper server. */ static void starting_helper_server_after_fork(void *arg) { ngx_cycle_t *cycle = (void *) arg; char *log_filename; FILE *log_file; ngx_core_conf_t *ccf; ngx_uint_t i; ngx_str_t *envs; const char *env; /* At this point, stdout and stderr may still point to the console. * Make sure that they're both redirected to the log file. */ log_file = NULL; if (cycle->new_log.file->name.len > 0) { log_filename = ngx_str_null_terminate(&cycle->new_log.file->name); log_file = fopen((const char *) log_filename, "a"); if (log_file == NULL) { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, "could not open the error log file for writing"); } free(log_filename); } else if (cycle->log != NULL && cycle->log->file->name.len > 0) { log_filename = ngx_str_null_terminate(&cycle->log->file->name); log_file = fopen((const char *) log_filename, "a"); if (log_file == NULL) { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, "could not open the error log file for writing"); } free(log_filename); } if (log_file == NULL) { /* If the log file cannot be opened then we redirect stdout * and stderr to /dev/null, because if the user disconnects * from the console on which Nginx is started, then on Linux * any writes to stdout or stderr will result in an EIO error. */ log_file = fopen("/dev/null", "w"); } if (log_file != NULL) { dup2(fileno(log_file), 1); dup2(fileno(log_file), 2); fclose(log_file); } /* Set environment variables in Nginx config file. */ ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); envs = ccf->env.elts; for (i = 0; i < ccf->env.nelts; i++) { env = (const char *) envs[i].data; if (strchr(env, '=') != NULL) { putenv(strdup(env)); } } /* Set SERVER_SOFTWARE so that application processes know what web * server they're running on during startup. */ setenv("SERVER_SOFTWARE", NGINX_VER, 1); } static ngx_int_t create_file(ngx_cycle_t *cycle, const u_char *filename, const u_char *contents, size_t len) { FILE *f; int ret; size_t total_written = 0, written; f = fopen((const char *) filename, "w"); if (f != NULL) { /* We must do something with these return values because * otherwise on some platforms it will cause a compiler * warning. */ do { ret = fchmod(fileno(f), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); } while (ret == -1 && errno == EINTR); do { written = fwrite(contents + total_written, 1, len - total_written, f); total_written += written; } while (total_written < len); fclose(f); return NGX_OK; } else { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, "could not create %s", filename); return NGX_ERROR; } } /** * Start the helper server and save its runtime information into various variables. * * @pre The helper server isn't already started. * @pre The Nginx configuration has been loaded. */ static ngx_int_t start_helper_server(ngx_cycle_t *cycle) { ngx_core_conf_t *core_conf; ngx_int_t ret, result; ngx_uint_t i; ngx_str_t *prestart_uris; char **prestart_uris_ary = NULL; ngx_keyval_t *ctl = NULL; PP_VariantMap *params = NULL; u_char filename[NGX_MAX_PATH], *last; char *passenger_root = NULL; char *error_message = NULL; core_conf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); result = NGX_OK; params = pp_variant_map_new(); passenger_root = ngx_str_null_terminate(&passenger_main_conf.root_dir); prestart_uris = (ngx_str_t *) passenger_main_conf.prestart_uris->elts; prestart_uris_ary = calloc(sizeof(char *), passenger_main_conf.prestart_uris->nelts); for (i = 0; i < passenger_main_conf.prestart_uris->nelts; i++) { prestart_uris_ary[i] = malloc(prestart_uris[i].len + 1); if (prestart_uris_ary[i] == NULL) { ngx_log_error(NGX_LOG_ALERT, cycle->log, ENOMEM, "Cannot allocate memory"); result = NGX_ERROR; goto cleanup; } memcpy(prestart_uris_ary[i], prestart_uris[i].data, prestart_uris[i].len); prestart_uris_ary[i][prestart_uris[i].len] = '\0'; } pp_variant_map_set_int (params, "web_server_pid", getpid()); pp_variant_map_set_int (params, "web_server_worker_uid", core_conf->user); pp_variant_map_set_int (params, "web_server_worker_gid", core_conf->group); pp_variant_map_set_int (params, "log_level", passenger_main_conf.log_level); pp_variant_map_set_ngx_str(params, "debug_log_file", &passenger_main_conf.debug_log_file); pp_variant_map_set_ngx_str(params, "temp_dir", &passenger_main_conf.temp_dir); pp_variant_map_set_bool (params, "user_switching", passenger_main_conf.user_switching); pp_variant_map_set_ngx_str(params, "default_user", &passenger_main_conf.default_user); pp_variant_map_set_ngx_str(params, "default_group", &passenger_main_conf.default_group); pp_variant_map_set_ngx_str(params, "default_ruby", &passenger_main_conf.default_ruby); pp_variant_map_set_int (params, "max_pool_size", passenger_main_conf.max_pool_size); pp_variant_map_set_int (params, "pool_idle_time", passenger_main_conf.pool_idle_time); pp_variant_map_set_ngx_str(params, "analytics_log_user", &passenger_main_conf.analytics_log_user); pp_variant_map_set_ngx_str(params, "analytics_log_group", &passenger_main_conf.analytics_log_group); pp_variant_map_set_ngx_str(params, "union_station_gateway_address", &passenger_main_conf.union_station_gateway_address); pp_variant_map_set_int (params, "union_station_gateway_port", passenger_main_conf.union_station_gateway_port); pp_variant_map_set_ngx_str(params, "union_station_gateway_cert", &passenger_main_conf.union_station_gateway_cert); pp_variant_map_set_ngx_str(params, "union_station_proxy_address", &passenger_main_conf.union_station_proxy_address); pp_variant_map_set_strset (params, "prestart_urls", (const char **) prestart_uris_ary, passenger_main_conf.prestart_uris->nelts); ctl = (ngx_keyval_t *) passenger_main_conf.ctl->elts; for (i = 0; i < passenger_main_conf.ctl->nelts; i++) { pp_variant_map_set2(params, (const char *) ctl[i].key.data, ctl[i].key.len - 1, (const char *) ctl[i].value.data, ctl[i].value.len - 1); } ret = pp_agents_starter_start(pp_agents_starter, passenger_root, params, starting_helper_server_after_fork, cycle, &error_message); if (!ret) { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, "%s", error_message); result = NGX_ERROR; goto cleanup; } /* Create the file passenger_temp_dir + "/control_process.pid" * and make it writable by the worker processes. This is because * save_master_process_pid is run after Nginx has lowered privileges. */ last = ngx_snprintf(filename, sizeof(filename) - 1, "%s/control_process.pid", pp_agents_starter_get_server_instance_dir(pp_agents_starter)); *last = (u_char) '\0'; if (create_file(cycle, filename, (const u_char *) "", 0) != NGX_OK) { result = NGX_ERROR; goto cleanup; } do { ret = chown((const char *) filename, (uid_t) core_conf->user, (gid_t) -1); } while (ret == -1 && errno == EINTR); if (ret == -1) { result = NGX_ERROR; goto cleanup; } /* Create various other info files. */ last = ngx_snprintf(filename, sizeof(filename) - 1, "%s/web_server.txt", pp_agents_starter_get_generation_dir(pp_agents_starter)); *last = (u_char) '\0'; if (create_file(cycle, filename, (const u_char *) NGINX_VER, strlen(NGINX_VER)) != NGX_OK) { result = NGX_ERROR; goto cleanup; } last = ngx_snprintf(filename, sizeof(filename) - 1, "%s/config_files.txt", pp_agents_starter_get_generation_dir(pp_agents_starter)); *last = (u_char) '\0'; if (create_file(cycle, filename, cycle->conf_file.data, cycle->conf_file.len) != NGX_OK) { result = NGX_ERROR; goto cleanup; } cleanup: pp_variant_map_free(params); free(passenger_root); free(error_message); if (prestart_uris_ary != NULL) { for (i = 0; i < passenger_main_conf.prestart_uris->nelts; i++) { free(prestart_uris_ary[i]); } free(prestart_uris_ary); } if (result == NGX_ERROR && passenger_main_conf.abort_on_startup_error) { exit(1); } return result; } /** * Shutdown the helper server, if there's one running. */ static void shutdown_helper_server() { if (pp_agents_starter != NULL) { pp_agents_starter_free(pp_agents_starter); pp_agents_starter = NULL; } } /** * Called when: * - Nginx is started, before the configuration is loaded and before daemonization. * - Nginx is restarted, before the configuration is reloaded. */ static ngx_int_t pre_config_init(ngx_conf_t *cf) { char *error_message; shutdown_helper_server(); ngx_memzero(&passenger_main_conf, sizeof(passenger_main_conf_t)); pp_schema_string.data = (u_char *) "passenger:"; pp_schema_string.len = sizeof("passenger:") - 1; pp_placeholder_upstream_address.data = (u_char *) "unix:/passenger_helper_server"; pp_placeholder_upstream_address.len = sizeof("unix:/passenger_helper_server") - 1; pp_stat_cache = pp_cached_file_stat_new(1024); pp_app_type_detector = pp_app_type_detector_new(); pp_agents_starter = pp_agents_starter_new(AS_NGINX, &error_message); if (pp_agents_starter == NULL) { ngx_log_error(NGX_LOG_ALERT, cf->log, ngx_errno, "%s", error_message); free(error_message); return NGX_ERROR; } return NGX_OK; } /** * Called when: * - Nginx is started, before daemonization and after the configuration has loaded. * - Nginx is restarted, after the configuration has reloaded. */ static ngx_int_t init_module(ngx_cycle_t *cycle) { if (passenger_main_conf.root_dir.len != 0) { if (first_start) { /* Ignore SIGPIPE now so that, if the helper server fails to start, * Nginx doesn't get killed by the default SIGPIPE handler upon * writing the password to the helper server. */ ignore_sigpipe(); first_start = 0; } if (start_helper_server(cycle) != NGX_OK) { passenger_main_conf.root_dir.len = 0; return NGX_OK; } pp_current_cycle = cycle; } return NGX_OK; } /** * Called when an Nginx worker process is started. This happens after init_module * is called. * * If 'master_process' is turned off, then there is only one single Nginx process * in total, and this process also acts as the worker process. In this case * init_worker_process is only called when Nginx is started, but not when it's restarted. */ static ngx_int_t init_worker_process(ngx_cycle_t *cycle) { ngx_core_conf_t *core_conf; if (passenger_main_conf.root_dir.len != 0) { save_master_process_pid(cycle); core_conf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); if (core_conf->master) { pp_agents_starter_detach(pp_agents_starter); } } return NGX_OK; } /** * Called when Nginx exits. Not called when Nginx is restarted. */ static void exit_master(ngx_cycle_t *cycle) { shutdown_helper_server(); } static ngx_http_module_t passenger_module_ctx = { pre_config_init, /* preconfiguration */ /* register_content_handler */ NULL, /* postconfiguration */ passenger_create_main_conf, /* create main configuration */ passenger_init_main_conf, /* init main configuration */ NULL, /* create server configuration */ NULL, /* merge server configuration */ passenger_create_loc_conf, /* create location configuration */ passenger_merge_loc_conf /* merge location configuration */ }; ngx_module_t ngx_http_passenger_module = { NGX_MODULE_V1, &passenger_module_ctx, /* module context */ (ngx_command_t *) passenger_commands, /* module directives */ NGX_HTTP_MODULE, /* module type */ NULL, /* init master */ init_module, /* init module */ init_worker_process, /* init process */ NULL, /* init thread */ NULL, /* exit thread */ NULL, /* exit process */ exit_master, /* exit master */ NGX_MODULE_V1_PADDING }; passenger-4.0.37/ext/nginx/ngx_http_passenger_module.h000644 000765 000024 00000004660 12233035540 023565 0ustar00honglistaff000000 000000 /* * Copyright (C) Igor Sysoev * Copyright (C) 2007 Manlio Perillo (manlio.perillo@gmail.com) * Copyright (C) 2010-2013 Phusion * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _PASSENGER_NGINX_MODULE_H_ #define _PASSENGER_NGINX_MODULE_H_ #include #include #include "common/AgentsStarter.h" #include "common/ApplicationPool2/AppTypes.h" #include "common/Utils/CachedFileStat.h" /** * The Nginx version number as an integer. * For example, on nginx 1.7.30 this value is 1007030. */ #define NGINX_VERSION_NUM \ (1000000 * PASSENGER_NGINX_MAJOR_VERSION + \ 1000 * PASSENGER_NGINX_MINOR_VERSION + \ PASSENGER_NGINX_MICRO_VERSION) extern ngx_module_t ngx_http_passenger_module; /** * A static schema string to be assigned to Nginx 'upstream' strctures. */ extern ngx_str_t pp_schema_string; extern ngx_str_t pp_placeholder_upstream_address; /** A CachedFileStat object used for caching stat() calls. */ extern PP_CachedFileStat *pp_stat_cache; extern PP_AppTypeDetector *pp_app_type_detector; extern PP_AgentsStarter *pp_agents_starter; extern ngx_cycle_t *pp_current_cycle; #endif /* _PASSENGER_NGINX_MODULE_H_ */ passenger-4.0.37/ext/nginx/StaticContentHandler.c000644 000765 000024 00000016452 12233035540 022373 0ustar00honglistaff000000 000000 /* * Copyright (C) Igor Sysoev * Copyright (C) 2010 Phusion * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "StaticContentHandler.h" #include "ngx_http_passenger_module.h" static void set_request_extension(ngx_http_request_t *r, ngx_str_t *filename) { u_char *tmp; /* Scan filename from the right until we've found a slash or a dot. */ tmp = filename->data + filename->len - 1; while (tmp >= filename->data && *tmp != '/' && *tmp != '.') { tmp--; } if (tmp >= filename->data && *tmp == '.') { /* We found a dot, and until now we haven't seen any slashes. * So we know that this is the filename's extension. */ tmp++; r->exten.data = tmp; r->exten.len = filename->len - (tmp - filename->data); } } ngx_int_t passenger_static_content_handler(ngx_http_request_t *r, ngx_str_t *filename) { u_char *last, *location; size_t len; ngx_int_t rc; ngx_uint_t level; ngx_log_t *log; ngx_buf_t *b; ngx_chain_t out; ngx_open_file_info_t of; ngx_http_core_loc_conf_t *clcf; if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD|NGX_HTTP_POST))) { return NGX_HTTP_NOT_ALLOWED; } if (r->uri.data[r->uri.len - 1] == '/') { return NGX_DECLINED; } #if (PASSENGER_NGINX_MINOR_VERSION == 8 && PASSENGER_NGINX_MICRO_VERSION < 38) || \ (PASSENGER_NGINX_MINOR_VERSION == 7 && PASSENGER_NGINX_MICRO_VERSION < 66) if (r->zero_in_uri) { return NGX_DECLINED; } #endif log = r->connection->log; ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, "http filename: \"%s\"", filename->data); clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); ngx_memzero(&of, sizeof(ngx_open_file_info_t)); #if NGX_VERSION_NUM >= 8000 of.read_ahead = clcf->read_ahead; #endif of.directio = clcf->directio; of.valid = clcf->open_file_cache_valid; of.min_uses = clcf->open_file_cache_min_uses; of.errors = clcf->open_file_cache_errors; of.events = clcf->open_file_cache_events; if (ngx_open_cached_file(clcf->open_file_cache, filename, &of, r->pool) != NGX_OK) { switch (of.err) { case 0: return NGX_HTTP_INTERNAL_SERVER_ERROR; case NGX_ENOENT: case NGX_ENOTDIR: case NGX_ENAMETOOLONG: level = NGX_LOG_ERR; rc = NGX_HTTP_NOT_FOUND; break; case NGX_EACCES: level = NGX_LOG_ERR; rc = NGX_HTTP_FORBIDDEN; break; default: level = NGX_LOG_CRIT; rc = NGX_HTTP_INTERNAL_SERVER_ERROR; break; } if (rc != NGX_HTTP_NOT_FOUND || clcf->log_not_found) { ngx_log_error(level, log, of.err, ngx_open_file_n " \"%s\" failed", filename->data); } return rc; } #if NGINX_VERSION_NUM >= 7000 r->root_tested = !r->error_page; #endif ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, "http static fd: %d", of.fd); if (of.is_dir) { ngx_log_debug0(NGX_LOG_DEBUG_HTTP, log, 0, "http dir"); r->headers_out.location = ngx_palloc(r->pool, sizeof(ngx_table_elt_t)); if (r->headers_out.location == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } len = r->uri.len + 1; if (!clcf->alias && clcf->root_lengths == NULL && r->args.len == 0) { location = filename->data + clcf->root.len; } else { if (r->args.len) { len += r->args.len + 1; } location = ngx_pnalloc(r->pool, len); if (location == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } last = ngx_copy(location, r->uri.data, r->uri.len); *last = '/'; if (r->args.len) { *++last = '?'; ngx_memcpy(++last, r->args.data, r->args.len); } } /* * we do not need to set the r->headers_out.location->hash and * r->headers_out.location->key fields */ r->headers_out.location->value.len = len; r->headers_out.location->value.data = location; return NGX_HTTP_MOVED_PERMANENTLY; } #if !(NGX_WIN32) /* the not regular files are probably Unix specific */ if (!of.is_file) { ngx_log_error(NGX_LOG_CRIT, log, 0, "\"%s\" is not a regular file", filename->data); return NGX_HTTP_NOT_FOUND; } #endif if (r->method & NGX_HTTP_POST) { return NGX_HTTP_NOT_ALLOWED; } rc = ngx_http_discard_request_body(r); if (rc != NGX_OK) { return rc; } log->action = "sending response to client"; r->headers_out.status = NGX_HTTP_OK; r->headers_out.content_length_n = of.size; r->headers_out.last_modified_time = of.mtime; set_request_extension(r, filename); if (ngx_http_set_content_type(r) != NGX_OK) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } if (r != r->main && of.size == 0) { return ngx_http_send_header(r); } r->allow_ranges = 1; /* we need to allocate all before the header would be sent */ b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); if (b == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } b->file = ngx_pcalloc(r->pool, sizeof(ngx_file_t)); if (b->file == NULL) { return NGX_HTTP_INTERNAL_SERVER_ERROR; } rc = ngx_http_send_header(r); if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) { return rc; } b->file_pos = 0; b->file_last = of.size; b->in_file = b->file_last ? 1: 0; b->last_buf = (r == r->main) ? 1: 0; b->last_in_chain = 1; b->file->fd = of.fd; b->file->name = *filename; b->file->log = log; #if NGINX_VERSION_NUM >= 7000 b->file->directio = of.is_directio; #endif out.buf = b; out.next = NULL; return ngx_http_output_filter(r, &out); } passenger-4.0.37/ext/nginx/StaticContentHandler.h000644 000765 000024 00000003352 12233035540 022373 0ustar00honglistaff000000 000000 /* * Copyright (C) Igor Sysoev * Copyright (C) 2007 Manlio Perillo (manlio.perillo@gmail.com) * Copyright (C) 2010 Phusion * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _PASSENGER_NGINX_STATIC_CONTENT_HANDLER_H_ #define _PASSENGER_NGINX_STATIC_CONTENT_HANDLER_H_ #include #include #include ngx_int_t passenger_static_content_handler(ngx_http_request_t *r, ngx_str_t *filename); #endif /* _PASSENGER_NGINX_STATIC_CONTENT_HANDLER_H_ */ passenger-4.0.37/ext/libev/aclocal.m4000644 000765 000024 00001242731 12233035540 017767 0ustar00honglistaff000000 000000 # generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, # Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, # 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, # 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR passenger-4.0.37/ext/libev/autogen.sh000644 000765 000024 00000000062 12233035540 020111 0ustar00honglistaff000000 000000 #!/bin/sh autoreconf --install --symlink --force passenger-4.0.37/ext/libev/Changes000644 000765 000024 00000062037 12233035540 017420 0ustar00honglistaff000000 000000 Revision history for libev, a high-performance and full-featured event loop. TODO: ev_loop_wakeup TODO: EV_STANDALONE == NO_HASSEL (do not use clock_gettime in ev_standalone) TODO: faq, process a thing in each iteration TODO: dbeugging tips, ev_verify, ev_init twice TODO: ev_break for immediate exit (EVBREAK_NOW?) TODO: ev_feed_child_event TODO: document the special problem of signals around fork. TODO: store pid for each signal TODO: document file descriptor usage per loop TODO: store loop pid_t and compare isndie signal handler,store 1 for same, 2 for differign pid, clean up in loop_fork TODO: embed watchers need updating when fd changes TODO: document portbaility requirements for atomic pointer access 4.15 Fri Mar 1 12:04:50 CET 2013 - destroying a non-default loop would stop the global waitpid watcher (Denis Bilenko). - queueing pending watchers of higher priority from a watcher now invokes them in a timely fashion (reported by Denis Bilenko). - add throw() to all libev functions that cannot throw exceptions, for further code size decrease when compiling for C++. - add throw () to callbacks that must not throw exceptions (allocator, syserr, loop acquire/release, periodic reschedule cbs). - fix event_base_loop return code, add event_get_callback, event_base_new, event_base_get_method calls to improve libevent 1.x emulation and add some libevent 2.x functionality (based on a patch by Jeff Davey). - add more memory fences to fix a bug reported by Jeff Davey. Better be overfenced than underprotected. - ev_run now returns a boolean status (true meaning watchers are still active). - ev_once: undef EV_ERROR in ev_kqueue.c, to avoid clashing with libev's EV_ERROR (reported by 191919). - (ecb) add memory fence support for xlC (Darin McBride). - (ecb) add memory fence support for gcc-mips (Anton Kirilov). - (ecb) add memory fence support for gcc-alpha (Christian Weisgerber). - work around some kernels losing file descriptors by leaking the kqueue descriptor in the child. - work around linux inotify not reporting IN_ATTRIB changes for directories in many cases. - include sys/syscall.h instead of plain syscall.h. - check for io watcher loops in ev_verify, check for the most common reported usage bug in ev_io_start. - chose socket vs. WSASocket at compiletime using EV_USE_WSASOCKET. - always use WSASend/WSARecv directly on windows, hoping that this works in all cases (unlike read/write/send/recv...). - try to detect signals around a fork faster (test program by Denis Bilenko). - work around recent glibc versions that leak memory in realloc. - rename ev::embed::set to ev::embed::set_embed to avoid clashing the watcher base set (loop) method. - rewrite the async/signal pipe logic to always keep a valid fd, which simplifies (and hopefuly correctifies :) the race checking on fork, at the cost of one extra fd. - add fat, msdos, jffs2, ramfs, ntfs and btrfs to the list of inotify-supporting filesystems. - move orig_CFLAGS assignment to after AC_INIT, as newer autoconf versions ignore it before (https://bugzilla.redhat.com/show_bug.cgi?id=908096). - add some untested android support. - enum expressions must be of type int (reported by Juan Pablo L). 4.11 Sat Feb 4 19:52:39 CET 2012 - INCOMPATIBLE CHANGE: ev_timer_again now clears the pending status, as was documented already, but not implemented in the repeating case. - new compiletime symbols: EV_NO_SMP and EV_NO_THREADS. - fix a race where the workaround against the epoll fork bugs caused signals to not be handled anymore. - correct backend_fudge for most backends, and implement a windows specific workaround to avoid looping because we call both select and Sleep, both with different time resolutions. - document range and guarantees of ev_sleep. - document reasonable ranges for periodics interval and offset. - rename backend_fudge to backend_mintime to avoid future confusion :) - change the default periodic reschedule function to hopefully be more exact and correct even in corner cases or in the far future. - do not rely on -lm anymore: use it when available but use our own floor () if it is missing. This should make it easier to embed, as no external libraries are required. - strategically import macros from libecb and mark rarely-used functions as cache-cold (saving almost 2k code size on typical amd64 setups). - add Symbols.ev and Symbols.event files, that were missing. - fix backend_mintime value for epoll (was 1/1024, is 1/1000 now). - fix #3 "be smart about timeouts" to not "deadlock" when timeout == now, also improve the section overall. - avoid "AVOIDING FINISHING BEFORE RETURNING" idiom. - support new EV_API_STATIC mode to make all libev symbols static. - supply default CFLAGS of -g -O3 with gcc when original CFLAGS were empty. 4.04 Wed Feb 16 09:01:51 CET 2011 - fix two problems in the native win32 backend, where reuse of fd's with different underlying handles caused handles not to be removed or added to the select set (analyzed and tested by Bert Belder). - do no rely on ceil() in ev_e?poll.c. - backport libev to HP-UX versions before 11 v3. - configure did not detect nanosleep and clock_gettime properly when they are available in the libc (as opposed to -lrt). 4.03 Tue Jan 11 14:37:25 CET 2011 - officially support polling files with all backends. - support files, /dev/zero etc. the same way as select in the epoll backend, by generating events on our own. - ports backend: work around solaris bug 6874410 and many related ones (EINTR, maybe more), with no performance loss (note that the solaris bug report is actually wrong, reality is far more bizarre and broken than that). - define EV_READ/EV_WRITE as macros in event.h, as some programs use #ifdef to test for them. - new (experimental) function: ev_feed_signal. - new (to become default) EVFLAG_NOSIGMASK flag. - new EVBACKEND_MASK symbol. - updated COMMON IDIOMS SECTION. 4.01 Fri Nov 5 21:51:29 CET 2010 - automake fucked it up, apparently, --add-missing -f is not quite enough to make it update its files, so 4.00 didn't install ev++.h and event.h on make install. grrr. - ev_loop(count|depth) didn't return anything (Robin Haberkorn). - change EV_UNDEF to 0xffffffff to silence some overzealous compilers. - use "(libev) " prefix for all libev error messages now. 4.00 Mon Oct 25 12:32:12 CEST 2010 - "PORTING FROM LIBEV 3.X TO 4.X" (in ev.pod) is recommended reading. - ev_embed_stop did not correctly stop the watcher (very good testcase by Vladimir Timofeev). - ev_run will now always update the current loop time - it erroneously didn't when idle watchers were active, causing timers not to fire. - fix a bug where a timeout of zero caused the timer not to fire in the libevent emulation (testcase by Péter Szabó). - applied win32 fixes by Michael Lenaghan (also James Mansion). - replace EV_MINIMAL by EV_FEATURES. - prefer EPOLL_CTL_ADD over EPOLL_CTL_MOD in some more cases, as it seems the former is *much* faster than the latter. - linux kernel version detection (for inotify bug workarounds) did not work properly. - reduce the number of spurious wake-ups with the ports backend. - remove dependency on sys/queue.h on freebsd (patch by Vanilla Hsu). - do async init within ev_async_start, not ev_async_set, which avoids an API quirk where the set function must be called in the C++ API even when there is nothing to set. - add (undocumented) EV_ENABLE when adding events with kqueue, this might help with OS X, which seems to need it despite documenting not to need it (helpfully pointed out by Tilghman Lesher). - do not use poll by default on freebsd, it's broken (what isn't on freebsd...). - allow to embed epoll on kernels >= 2.6.32. - configure now prepends -O3, not appends it, so one can still override it. - ev.pod: greatly expanded the portability section, added a porting section, a description of watcher states and made lots of minor fixes. - disable poll backend on AIX, the poll header spams the namespace and it's not worth working around dead platforms (reported and analyzed by Aivars Kalvans). - improve header file compatibility of the standalone eventfd code in an obscure case. - implement EV_AVOID_STDIO option. - do not use sscanf to parse linux version number (smaller, faster, no sscanf dependency). - new EV_CHILD_ENABLE and EV_SIGNAL_ENABLE configurable settings. - update libev.m4 HAVE_CLOCK_SYSCALL test for newer glibcs. - add section on accept() problems to the manpage. - rename EV_TIMEOUT to EV_TIMER. - rename ev_loop_count/depth/verify/loop/unloop. - remove ev_default_destroy and ev_default_fork. - switch to two-digit minor version. - work around an apparent gentoo compiler bug. - define _DARWIN_UNLIMITED_SELECT. just so. - use enum instead of #define for most constants. - improve compatibility to older C++ compilers. - (experimental) ev_run/ev_default_loop/ev_break/ev_loop_new have now default arguments when compiled as C++. - enable automake dependency tracking. - ev_loop_new no longer leaks memory when loop creation failed. - new ev_cleanup watcher type. 3.9 Thu Dec 31 07:59:59 CET 2009 - signalfd is no longer used by default and has to be requested explicitly - this means that easy to catch bugs become hard to catch race conditions, but the users have spoken. - point out the unspecified signal mask in the documentation, and that this is a race condition regardless of EV_SIGNALFD. - backport inotify code to C89. - inotify file descriptors could leak into child processes. - ev_stat watchers could keep an erroneous extra ref on the loop, preventing exit when unregistering all watchers (testcases provided by ry@tinyclouds.org). - implement EV_WIN32_HANDLE_TO_FD and EV_WIN32_CLOSE_FD configuration symbols to make it easier for apps to do their own fd management. - support EV_IDLE_ENABLE being disabled in ev++.h (patch by Didier Spezia). - take advantage of inotify_init1, if available, to set cloexec/nonblock on fd creation, to avoid races. - the signal handling pipe wasn't always initialised under windows (analysed by lekma). - changed minimum glibc requirement from glibc 2.9 to 2.7, for signalfd. - add missing string.h include (Denis F. Latypoff). - only replace ev_stat.prev when we detect an actual difference, so prev is (almost) always different to attr. this might have caused the problems with 04_stat.t. - add ev::timer->remaining () method to C++ API. 3.8 Sun Aug 9 14:30:45 CEST 2009 - incompatible change: do not necessarily reset signal handler to SIG_DFL when a sighandler is stopped. - ev_default_destroy did not properly free or zero some members, potentially causing crashes and memory corruption on repeated ev_default_destroy/ev_default_loop calls. - take advantage of signalfd on GNU/Linux systems. - document that the signal mask might be in an unspecified state when using libev's signal handling. - take advantage of some GNU/Linux calls to set cloexec/nonblock on fd creation, to avoid race conditions. 3.7 Fri Jul 17 16:36:32 CEST 2009 - ev_unloop and ev_loop wrongly used a global variable to exit loops, instead of using a per-loop variable (bug caught by accident...). - the ev_set_io_collect_interval interpretation has changed. - add new functionality: ev_set_userdata, ev_userdata, ev_set_invoke_pending_cb, ev_set_loop_release_cb, ev_invoke_pending, ev_pending_count, together with a long example about thread locking. - add ev_timer_remaining (as requested by Denis F. Latypoff). - add ev_loop_depth. - calling ev_unloop in fork/prepare watchers will no longer poll for new events. - Denis F. Latypoff corrected many typos in example code snippets. - honor autoconf detection of EV_USE_CLOCK_SYSCALL, also double- check that the syscall number is available before trying to use it (reported by ry@tinyclouds). - use GetSystemTimeAsFileTime instead of _timeb on windows, for slightly higher accuracy. - properly declare ev_loop_verify and ev_now_update even when !EV_MULTIPLICITY. - do not compile in any priority code when EV_MAXPRI == EV_MINPRI. - support EV_MINIMAL==2 for a reduced API. - actually 0-initialise struct sigaction when installing signals. - add section on hibernate and stopped processes to ev_timer docs. 3.6 Tue Apr 28 02:49:30 CEST 2009 - multiple timers becoming ready within an event loop iteration will be invoked in the "correct" order now. - do not leave the event loop early just because we have no active watchers, fixing a problem when embedding a kqueue loop that has active kernel events but no registered watchers (reported by blacksand blacksand). - correctly zero the idx values for arrays, so destroying and reinitialising the default loop actually works (patch by Malek Hadj-Ali). - implement ev_suspend and ev_resume. - new EV_CUSTOM revents flag for use by applications. - add documentation section about priorities. - add a glossary to the dcoumentation. - extend the ev_fork description slightly. - optimize a jump out of call_pending. 3.53 Sun Feb 15 02:38:20 CET 2009 - fix a bug in event pipe creation on win32 that would cause a failed assertion on event loop creation (patch by Malek Hadj-Ali). - probe for CLOCK_REALTIME support at runtime as well and fall back to gettimeofday if there is an error, to support older operating systems with newer header files/libraries. - prefer gettimeofday over clock_gettime with USE_CLOCK_SYSCALL (default most everywhere), otherwise not. 3.52 Wed Jan 7 21:43:02 CET 2009 - fix compilation of select backend in fd_set mode when NFDBITS is missing (to get it to compile on QNX, reported by Rodrigo Campos). - better select-nfds handling when select backend is in fd_set mode. - diagnose fd_set overruns when select backend is in fd_set mode. - due to a thinko, instead of disabling everything but select on the borked OS X platform, everything but select was allowed (reported by Emanuele Giaquinta). - actually verify that local and remote port are matching in libev's socketpair emulation, which makes denial-of-service attacks harder (but not impossible - it's windows). Make sure it even works under vista, which thinks that getpeer/sockname should return fantasy port numbers. - include "libev" in all assertion messages for potentially clearer diagnostics. - event_get_version (libevent compatibility) returned a useless string instead of the expected version string (patch by W.C.A. Wijngaards). 3.51 Wed Dec 24 23:00:11 CET 2008 - fix a bug where an inotify watcher was added twice, causing freezes on hash collisions (reported and analysed by Graham Leggett). - new config symbol, EV_USE_CLOCK_SYSCALL, to make libev use a direct syscall - slower, but no dependency on librt et al. - assume negative return values != -1 signals success of port_getn (http://cvs.epicsol.org/cgi/viewcvs.cgi/epic5/source/newio.c?rev=1.52) (no known failure reports, but it doesn't hurt). - fork detection in ev_embed now stops and restarts the watcher automatically. - EXPERIMENTAL: default the method to operator () in ev++.h, to make it nicer to use functors (requested by Benedek Låszló). - fixed const object callbacks in ev++.h. - replaced loop_ref argument of watcher.set (loop) by a direct ev_loop * in ev++.h, to avoid clashes with functor patch. - do not try to watch the empty string via inotify. - inotify watchers could be leaked under certain circumstances. - OS X 10.5 is actually even more broken than earlier versions, so fall back to select on that piece of garbage. - fixed some weirdness in the ev_embed documentation. 3.49 Wed Nov 19 11:26:53 CET 2008 - ev_stat watchers will now use inotify as a mere hint on kernels <2.6.25, or if the filesystem is not in the "known to be good" list. - better mingw32 compatibility (it's not as borked as native win32) (analysed by Roger Pack). - include stdio.h in the example program, as too many people are confused by the weird C language otherwise. I guess the next thing I get told is that the "..." ellipses in the examples don't compile with their C compiler. 3.48 Thu Oct 30 09:02:37 CET 2008 - further optimise away the EPOLL_CTL_ADD/MOD combo in the epoll backend by assuming the kernel event mask hasn't changed if ADD fails with EEXIST. - work around spurious event notification bugs in epoll by using a 32-bit generation counter. recreate kernel state if we receive spurious notifications or unwanted events. this is very costly, but I didn't come up with this horrible design. - use memset to initialise most arrays now and do away with the init functions. - expand time-out strategies into a "Be smart about timeouts" section. - drop the "struct" from all ev_watcher declarations in the documentation and did other clarifications (yeah, it was a mistake to have a struct AND a function called ev_loop). - fix a bug where ev_default would not initialise the default loop again after it was destroyed with ev_default_destroy. - rename syserr to ev_syserr to avoid name clashes when embedding, do similar changes for event.c. 3.45 Tue Oct 21 21:59:26 CEST 2008 - disable inotify usage on linux <2.6.25, as it is broken (reported by Yoann Vandoorselaere). - ev_stat erroneously would try to add inotify watchers even when inotify wasn't available (this should only have a performance impact). - ev_once now passes both timeout and io to the callback if both occur concurrently, instead of giving timeouts precedence. - disable EV_USE_INOTIFY when sys/inotify.h is too old. 3.44 Mon Sep 29 05:18:39 CEST 2008 - embed watchers now automatically invoke ev_loop_fork on the embedded loop when the parent loop forks. - new function: ev_now_update (loop). - verify_watcher was not marked static. - improve the "associating..." manpage section. - documentation tweaks here and there. 3.43 Sun Jul 6 05:34:41 CEST 2008 - include more include files on windows to get struct _stati64 (reported by Chris Hulbert, but doesn't quite fix his issue). - add missing #include in ev.c on windows (reported by Matt Tolton). 3.42 Tue Jun 17 12:12:07 CEST 2008 - work around yet another windows bug: FD_SET actually adds fd's multiple times to the fd_*SET*, despite official MSN docs claiming otherwise. Reported and well-analysed by Matt Tolton. - define NFDBITS to 0 when EV_SELECT_IS_WINSOCKET to make it compile (reported any analysed by Chris Hulbert). - fix a bug in ev_ebadf (this function is only used to catch programming errors in the libev user). reported by Matt Tolton. - fix a bug in fd_intern on win32 (could lead to compile errors under some circumstances, but would work correctly if it compiles). reported by Matt Tolton. - (try to) work around missing lstat on windows. - pass in the write fd set as except fd set under windows. windows is so uncontrollably lame that it requires this. this means that switching off oobinline is not supported (but tcp/ip doesn't have oob, so that would be stupid anyways. - use posix module symbol to auto-detect monotonic clock presence and some other default values. 3.41 Fri May 23 18:42:54 CEST 2008 - work around an obscure bug in winsocket select: if you provide only empty fd sets then select returns WSAEINVAL. how sucky. - improve timer scheduling stability and reduce use of time_epsilon. - use 1-based 2-heap for EV_MINIMAL, simplifies code, reduces codesize and makes for better cache-efficiency. - use 3-based 4-heap for !EV_MINIMAL. this makes better use of cpu cache lines and gives better growth behaviour than 2-based heaps. - cache timestamp within heap for !EV_MINIMAL, to avoid random memory accesses. - document/add EV_USE_4HEAP and EV_HEAP_CACHE_AT. - fix a potential aliasing issue in ev_timer_again. - add/document ev_periodic_at, retract direct access to ->at. - improve ev_stat docs. - add portability requirements section. - fix manpage headers etc. - normalise WSA error codes to lower range on windows. - add consistency check code that can be called automatically or on demand to check for internal structures (ev_loop_verify). 3.31 Wed Apr 16 20:45:04 CEST 2008 - added last minute fix for ev_poll.c by Brandon Black. 3.3 Wed Apr 16 19:04:10 CEST 2008 - event_base_loopexit should return 0 on success (W.C.A. Wijngaards). - added linux eventfd support. - try to autodetect epoll and inotify support by libc header version if not using autoconf. - new symbols: EV_DEFAULT_UC and EV_DEFAULT_UC_. - declare functions defined in ev.h as inline if C99 or gcc are available. - enable inlining with gcc versions 2 and 3. - work around broken poll implementations potentially not clearing revents field in ev_poll (Brandon Black) (no such systems are known at this time). - work around a bug in realloc on openbsd and darwin, also makes the erroneous valgrind complaints go away (noted by various people). - fix ev_async_pending, add c++ wrapper for ev_async (based on patch sent by Johannes Deisenhofer). - add sensible set method to ev::embed. - made integer constants type int in ev.h. 3.2 Wed Apr 2 17:11:19 CEST 2008 - fix a 64 bit overflow issue in the select backend, by using fd_mask instead of int for the mask. - rename internal sighandler to avoid clash with very old perls. - entering ev_loop will not clear the ONESHOT or NONBLOCKING flags of any outer loops anymore. - add ev_async_pending. 3.1 Thu Mar 13 13:45:22 CET 2008 - implement ev_async watchers. - only initialise signal pipe on demand. - make use of sig_atomic_t configurable. - improved documentation. 3.0 Mon Jan 28 13:14:47 CET 2008 - API/ABI bump to version 3.0. - ev++.h includes "ev.h" by default now, not . - slightly improved documentation. - speed up signal detection after a fork. - only optionally return trace status changed in ev_child watchers. - experimental (and undocumented) loop wrappers for ev++.h. 2.01 Tue Dec 25 08:04:41 CET 2007 - separate Changes file. - fix ev_path_set => ev_stat_set typo. - remove event_compat.h from the libev tarball. - change how include files are found. - doc updates. - update licenses, explicitly allow for GPL relicensing. 2.0 Sat Dec 22 17:47:03 CET 2007 - new ev_sleep, ev_set_(io|timeout)_collect_interval. - removed epoll from embeddable fd set. - fix embed watchers. - renamed ev_embed.loop to other. - added exported Symbol tables. - undefine member wrapper macros at the end of ev.c. - respect EV_H in ev++.h. 1.86 Tue Dec 18 02:36:57 CET 2007 - fix memleak on loop destroy (not relevant for perl). 1.85 Fri Dec 14 20:32:40 CET 2007 - fix some aliasing issues w.r.t. timers and periodics (not relevant for perl). (for historic versions refer to EV/Changes, found in the Perl interface) 0.1 Wed Oct 31 21:31:48 CET 2007 - original version; hacked together in <24h. passenger-4.0.37/ext/libev/config.guess000755 000765 000024 00000127534 12233035540 020451 0ustar00honglistaff000000 000000 #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: passenger-4.0.37/ext/libev/config.h.in000644 000765 000024 00000006367 12233035540 020154 0ustar00honglistaff000000 000000 /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Define to 1 to use the syscall interface for clock_gettime */ #undef HAVE_CLOCK_SYSCALL /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `epoll_ctl' function. */ #undef HAVE_EPOLL_CTL /* Define to 1 if you have the `eventfd' function. */ #undef HAVE_EVENTFD /* Define to 1 if the floor function is available */ #undef HAVE_FLOOR /* Define to 1 if you have the `inotify_init' function. */ #undef HAVE_INOTIFY_INIT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `kqueue' function. */ #undef HAVE_KQUEUE /* Define to 1 if you have the `rt' library (-lrt). */ #undef HAVE_LIBRT /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `nanosleep' function. */ #undef HAVE_NANOSLEEP /* Define to 1 if you have the `poll' function. */ #undef HAVE_POLL /* Define to 1 if you have the header file. */ #undef HAVE_POLL_H /* Define to 1 if you have the `port_create' function. */ #undef HAVE_PORT_CREATE /* Define to 1 if you have the header file. */ #undef HAVE_PORT_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `signalfd' function. */ #undef HAVE_SIGNALFD /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EPOLL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EVENTFD_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EVENT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INOTIFY_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SIGNALFD_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION passenger-4.0.37/ext/libev/config.sub000755 000765 000024 00000101153 12233035540 020101 0ustar00honglistaff000000 000000 #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: passenger-4.0.37/ext/libev/configure000755 000765 000024 00001450070 12233035540 020033 0ustar00honglistaff000000 000000 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="ev_epoll.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu orig_CFLAGS="$CFLAGS" am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=libev VERSION=4.15 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' ac_config_headers="$ac_config_headers config.h" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -z "$orig_CFLAGS"; then if test x$GCC = xyes; then CFLAGS="-g -O3" fi fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: for ac_header in sys/inotify.h sys/epoll.h sys/event.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in clock_gettime do : ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" if test "x$ac_cv_func_clock_gettime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CLOCK_GETTIME 1 _ACEOF else if test $(uname) = Linux; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime syscall" >&5 $as_echo_n "checking for clock_gettime syscall... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_have_clock_syscall=1 $as_echo "#define HAVE_CLOCK_SYSCALL 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" fi unset ac_cv_func_clock_gettime for ac_func in clock_gettime do : ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" if test "x$ac_cv_func_clock_gettime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CLOCK_GETTIME 1 _ACEOF fi done fi fi done for ac_func in nanosleep do : ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" if test "x$ac_cv_func_nanosleep" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NANOSLEEP 1 _ACEOF else if test -z "$LIBEV_M4_AVOID_LIBRT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 $as_echo_n "checking for nanosleep in -lrt... " >&6; } if ${ac_cv_lib_rt_nanosleep+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char nanosleep (); int main () { return nanosleep (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_nanosleep=yes else ac_cv_lib_rt_nanosleep=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 $as_echo "$ac_cv_lib_rt_nanosleep" >&6; } if test "x$ac_cv_lib_rt_nanosleep" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" fi unset ac_cv_func_nanosleep for ac_func in nanosleep do : ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" if test "x$ac_cv_func_nanosleep" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NANOSLEEP 1 _ACEOF fi done fi fi done if test -z "$LIBEV_M4_AVOID_LIBM"; then LIBM=m fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5 $as_echo_n "checking for library containing floor... " >&6; } if ${ac_cv_search_floor+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char floor (); int main () { return floor (); ; return 0; } _ACEOF for ac_lib in '' $LIBM; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_floor=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_floor+:} false; then : break fi done if ${ac_cv_search_floor+:} false; then : else ac_cv_search_floor=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5 $as_echo "$ac_cv_search_floor" >&6; } ac_res=$ac_cv_search_floor if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_FLOOR 1" >>confdefs.h fi ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi passenger-4.0.37/ext/libev/configure.ac000644 000765 000024 00000000626 12233035540 020407 0ustar00honglistaff000000 000000 AC_INIT orig_CFLAGS="$CFLAGS" AC_CONFIG_SRCDIR([ev_epoll.c]) AM_INIT_AUTOMAKE(libev,4.15) dnl also update ev.h! AC_CONFIG_HEADERS([config.h]) AM_MAINTAINER_MODE AC_PROG_CC dnl Supply default CFLAGS, if not specified if test -z "$orig_CFLAGS"; then if test x$GCC = xyes; then CFLAGS="-g -O3" fi fi AC_PROG_INSTALL AC_PROG_LIBTOOL m4_include([libev.m4]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT passenger-4.0.37/ext/libev/depcomp000755 000765 000024 00000044267 12233035540 017507 0ustar00honglistaff000000 000000 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: passenger-4.0.37/ext/libev/ev++.h000644 000765 000024 00000047737 12233035540 017050 0ustar00honglistaff000000 000000 /* * libev simple C++ wrapper classes * * Copyright (c) 2007,2008,2010 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #ifndef EVPP_H__ #define EVPP_H__ #ifdef EV_H # include EV_H #else # include "ev.h" #endif #ifndef EV_USE_STDEXCEPT # define EV_USE_STDEXCEPT 1 #endif #if EV_USE_STDEXCEPT # include #endif namespace ev { typedef ev_tstamp tstamp; enum { UNDEF = EV_UNDEF, NONE = EV_NONE, READ = EV_READ, WRITE = EV_WRITE, #if EV_COMPAT3 TIMEOUT = EV_TIMEOUT, #endif TIMER = EV_TIMER, PERIODIC = EV_PERIODIC, SIGNAL = EV_SIGNAL, CHILD = EV_CHILD, STAT = EV_STAT, IDLE = EV_IDLE, CHECK = EV_CHECK, PREPARE = EV_PREPARE, FORK = EV_FORK, ASYNC = EV_ASYNC, EMBED = EV_EMBED, # undef ERROR // some systems stupidly #define ERROR ERROR = EV_ERROR }; enum { AUTO = EVFLAG_AUTO, NOENV = EVFLAG_NOENV, FORKCHECK = EVFLAG_FORKCHECK, SELECT = EVBACKEND_SELECT, POLL = EVBACKEND_POLL, EPOLL = EVBACKEND_EPOLL, KQUEUE = EVBACKEND_KQUEUE, DEVPOLL = EVBACKEND_DEVPOLL, PORT = EVBACKEND_PORT }; enum { #if EV_COMPAT3 NONBLOCK = EVLOOP_NONBLOCK, ONESHOT = EVLOOP_ONESHOT, #endif NOWAIT = EVRUN_NOWAIT, ONCE = EVRUN_ONCE }; enum how_t { ONE = EVBREAK_ONE, ALL = EVBREAK_ALL }; struct bad_loop #if EV_USE_STDEXCEPT : std::runtime_error #endif { #if EV_USE_STDEXCEPT bad_loop () : std::runtime_error ("libev event loop cannot be initialized, bad value of LIBEV_FLAGS?") { } #endif }; #ifdef EV_AX # undef EV_AX #endif #ifdef EV_AX_ # undef EV_AX_ #endif #if EV_MULTIPLICITY # define EV_AX raw_loop # define EV_AX_ raw_loop, #else # define EV_AX # define EV_AX_ #endif struct loop_ref { loop_ref (EV_P) throw () #if EV_MULTIPLICITY : EV_AX (EV_A) #endif { } bool operator == (const loop_ref &other) const throw () { #if EV_MULTIPLICITY return EV_AX == other.EV_AX; #else return true; #endif } bool operator != (const loop_ref &other) const throw () { #if EV_MULTIPLICITY return ! (*this == other); #else return false; #endif } #if EV_MULTIPLICITY bool operator == (const EV_P) const throw () { return this->EV_AX == EV_A; } bool operator != (const EV_P) const throw () { return (*this == EV_A); } operator struct ev_loop * () const throw () { return EV_AX; } operator const struct ev_loop * () const throw () { return EV_AX; } bool is_default () const throw () { return EV_AX == ev_default_loop (0); } #endif #if EV_COMPAT3 void loop (int flags = 0) { ev_run (EV_AX_ flags); } void unloop (how_t how = ONE) throw () { ev_break (EV_AX_ how); } #endif void run (int flags = 0) { ev_run (EV_AX_ flags); } void break_loop (how_t how = ONE) throw () { ev_break (EV_AX_ how); } void post_fork () throw () { ev_loop_fork (EV_AX); } unsigned int backend () const throw () { return ev_backend (EV_AX); } tstamp now () const throw () { return ev_now (EV_AX); } void ref () throw () { ev_ref (EV_AX); } void unref () throw () { ev_unref (EV_AX); } #if EV_FEATURE_API unsigned int iteration () const throw () { return ev_iteration (EV_AX); } unsigned int depth () const throw () { return ev_depth (EV_AX); } void set_io_collect_interval (tstamp interval) throw () { ev_set_io_collect_interval (EV_AX_ interval); } void set_timeout_collect_interval (tstamp interval) throw () { ev_set_timeout_collect_interval (EV_AX_ interval); } #endif // function callback void once (int fd, int events, tstamp timeout, void (*cb)(int, void *), void *arg = 0) throw () { ev_once (EV_AX_ fd, events, timeout, cb, arg); } // method callback template void once (int fd, int events, tstamp timeout, K *object) throw () { once (fd, events, timeout, method_thunk, object); } // default method == operator () template void once (int fd, int events, tstamp timeout, K *object) throw () { once (fd, events, timeout, method_thunk, object); } template static void method_thunk (int revents, void *arg) { (static_cast(arg)->*method) (revents); } // no-argument method callback template void once (int fd, int events, tstamp timeout, K *object) throw () { once (fd, events, timeout, method_noargs_thunk, object); } template static void method_noargs_thunk (int revents, void *arg) { (static_cast(arg)->*method) (); } // simpler function callback template void once (int fd, int events, tstamp timeout) throw () { once (fd, events, timeout, simpler_func_thunk); } template static void simpler_func_thunk (int revents, void *arg) { (*cb) (revents); } // simplest function callback template void once (int fd, int events, tstamp timeout) throw () { once (fd, events, timeout, simplest_func_thunk); } template static void simplest_func_thunk (int revents, void *arg) { (*cb) (); } void feed_fd_event (int fd, int revents) throw () { ev_feed_fd_event (EV_AX_ fd, revents); } void feed_signal_event (int signum) throw () { ev_feed_signal_event (EV_AX_ signum); } #if EV_MULTIPLICITY struct ev_loop* EV_AX; #endif }; #if EV_MULTIPLICITY struct dynamic_loop : loop_ref { dynamic_loop (unsigned int flags = AUTO) throw (bad_loop) : loop_ref (ev_loop_new (flags)) { if (!EV_AX) throw bad_loop (); } ~dynamic_loop () throw () { ev_loop_destroy (EV_AX); EV_AX = 0; } private: dynamic_loop (const dynamic_loop &); dynamic_loop & operator= (const dynamic_loop &); }; #endif struct default_loop : loop_ref { default_loop (unsigned int flags = AUTO) throw (bad_loop) #if EV_MULTIPLICITY : loop_ref (ev_default_loop (flags)) #endif { if ( #if EV_MULTIPLICITY !EV_AX #else !ev_default_loop (flags) #endif ) throw bad_loop (); } private: default_loop (const default_loop &); default_loop &operator = (const default_loop &); }; inline loop_ref get_default_loop () throw () { #if EV_MULTIPLICITY return ev_default_loop (0); #else return loop_ref (); #endif } #undef EV_AX #undef EV_AX_ #undef EV_PX #undef EV_PX_ #if EV_MULTIPLICITY # define EV_PX loop_ref EV_A # define EV_PX_ loop_ref EV_A_ #else # define EV_PX # define EV_PX_ #endif template struct base : ev_watcher { #if EV_MULTIPLICITY EV_PX; // loop set void set (EV_P) throw () { this->EV_A = EV_A; } #endif base (EV_PX) throw () #if EV_MULTIPLICITY : EV_A (EV_A) #endif { ev_init (this, 0); } void set_ (const void *data, void (*cb)(EV_P_ ev_watcher *w, int revents)) throw () { this->data = (void *)data; ev_set_cb (static_cast(this), cb); } // function callback template void set (void *data = 0) throw () { set_ (data, function_thunk); } template static void function_thunk (EV_P_ ev_watcher *w, int revents) { function (*static_cast(w), revents); } // method callback template void set (K *object) throw () { set_ (object, method_thunk); } // default method == operator () template void set (K *object) throw () { set_ (object, method_thunk); } template static void method_thunk (EV_P_ ev_watcher *w, int revents) { (static_cast(w->data)->*method) (*static_cast(w), revents); } // no-argument callback template void set (K *object) throw () { set_ (object, method_noargs_thunk); } template static void method_noargs_thunk (EV_P_ ev_watcher *w, int revents) { (static_cast(w->data)->*method) (); } void operator ()(int events = EV_UNDEF) { return ev_cb (static_cast(this)) (static_cast(this), events); } bool is_active () const throw () { return ev_is_active (static_cast(this)); } bool is_pending () const throw () { return ev_is_pending (static_cast(this)); } void feed_event (int revents) throw () { ev_feed_event (EV_A_ static_cast(this), revents); } }; inline tstamp now (EV_P) throw () { return ev_now (EV_A); } inline void delay (tstamp interval) throw () { ev_sleep (interval); } inline int version_major () throw () { return ev_version_major (); } inline int version_minor () throw () { return ev_version_minor (); } inline unsigned int supported_backends () throw () { return ev_supported_backends (); } inline unsigned int recommended_backends () throw () { return ev_recommended_backends (); } inline unsigned int embeddable_backends () throw () { return ev_embeddable_backends (); } inline void set_allocator (void *(*cb)(void *ptr, long size) throw ()) throw () { ev_set_allocator (cb); } inline void set_syserr_cb (void (*cb)(const char *msg) throw ()) throw () { ev_set_syserr_cb (cb); } #if EV_MULTIPLICITY #define EV_CONSTRUCT(cppstem,cstem) \ (EV_PX = get_default_loop ()) throw () \ : base (EV_A) \ { \ } #else #define EV_CONSTRUCT(cppstem,cstem) \ () throw () \ { \ } #endif /* using a template here would require quite a bit more lines, * so a macro solution was chosen */ #define EV_BEGIN_WATCHER(cppstem,cstem) \ \ struct cppstem : base \ { \ void start () throw () \ { \ ev_ ## cstem ## _start (EV_A_ static_cast(this)); \ } \ \ void stop () throw () \ { \ ev_ ## cstem ## _stop (EV_A_ static_cast(this)); \ } \ \ cppstem EV_CONSTRUCT(cppstem,cstem) \ \ ~cppstem () throw () \ { \ stop (); \ } \ \ using base::set; \ \ private: \ \ cppstem (const cppstem &o); \ \ cppstem &operator =(const cppstem &o); \ \ public: #define EV_END_WATCHER(cppstem,cstem) \ }; EV_BEGIN_WATCHER (io, io) void set (int fd, int events) throw () { int active = is_active (); if (active) stop (); ev_io_set (static_cast(this), fd, events); if (active) start (); } void set (int events) throw () { int active = is_active (); if (active) stop (); ev_io_set (static_cast(this), fd, events); if (active) start (); } void start (int fd, int events) throw () { set (fd, events); start (); } EV_END_WATCHER (io, io) EV_BEGIN_WATCHER (timer, timer) void set (ev_tstamp after, ev_tstamp repeat = 0.) throw () { int active = is_active (); if (active) stop (); ev_timer_set (static_cast(this), after, repeat); if (active) start (); } void start (ev_tstamp after, ev_tstamp repeat = 0.) throw () { set (after, repeat); start (); } void again () throw () { ev_timer_again (EV_A_ static_cast(this)); } ev_tstamp remaining () { return ev_timer_remaining (EV_A_ static_cast(this)); } EV_END_WATCHER (timer, timer) #if EV_PERIODIC_ENABLE EV_BEGIN_WATCHER (periodic, periodic) void set (ev_tstamp at, ev_tstamp interval = 0.) throw () { int active = is_active (); if (active) stop (); ev_periodic_set (static_cast(this), at, interval, 0); if (active) start (); } void start (ev_tstamp at, ev_tstamp interval = 0.) throw () { set (at, interval); start (); } void again () throw () { ev_periodic_again (EV_A_ static_cast(this)); } EV_END_WATCHER (periodic, periodic) #endif #if EV_SIGNAL_ENABLE EV_BEGIN_WATCHER (sig, signal) void set (int signum) throw () { int active = is_active (); if (active) stop (); ev_signal_set (static_cast(this), signum); if (active) start (); } void start (int signum) throw () { set (signum); start (); } EV_END_WATCHER (sig, signal) #endif #if EV_CHILD_ENABLE EV_BEGIN_WATCHER (child, child) void set (int pid, int trace = 0) throw () { int active = is_active (); if (active) stop (); ev_child_set (static_cast(this), pid, trace); if (active) start (); } void start (int pid, int trace = 0) throw () { set (pid, trace); start (); } EV_END_WATCHER (child, child) #endif #if EV_STAT_ENABLE EV_BEGIN_WATCHER (stat, stat) void set (const char *path, ev_tstamp interval = 0.) throw () { int active = is_active (); if (active) stop (); ev_stat_set (static_cast(this), path, interval); if (active) start (); } void start (const char *path, ev_tstamp interval = 0.) throw () { stop (); set (path, interval); start (); } void update () throw () { ev_stat_stat (EV_A_ static_cast(this)); } EV_END_WATCHER (stat, stat) #endif #if EV_IDLE_ENABLE EV_BEGIN_WATCHER (idle, idle) void set () throw () { } EV_END_WATCHER (idle, idle) #endif #if EV_PREPARE_ENABLE EV_BEGIN_WATCHER (prepare, prepare) void set () throw () { } EV_END_WATCHER (prepare, prepare) #endif #if EV_CHECK_ENABLE EV_BEGIN_WATCHER (check, check) void set () throw () { } EV_END_WATCHER (check, check) #endif #if EV_EMBED_ENABLE EV_BEGIN_WATCHER (embed, embed) void set_embed (struct ev_loop *embedded_loop) throw () { int active = is_active (); if (active) stop (); ev_embed_set (static_cast(this), embedded_loop); if (active) start (); } void start (struct ev_loop *embedded_loop) throw () { set (embedded_loop); start (); } void sweep () { ev_embed_sweep (EV_A_ static_cast(this)); } EV_END_WATCHER (embed, embed) #endif #if EV_FORK_ENABLE EV_BEGIN_WATCHER (fork, fork) void set () throw () { } EV_END_WATCHER (fork, fork) #endif #if EV_ASYNC_ENABLE EV_BEGIN_WATCHER (async, async) void send () throw () { ev_async_send (EV_A_ static_cast(this)); } bool async_pending () throw () { return ev_async_pending (static_cast(this)); } EV_END_WATCHER (async, async) #endif #undef EV_PX #undef EV_PX_ #undef EV_CONSTRUCT #undef EV_BEGIN_WATCHER #undef EV_END_WATCHER } #endif passenger-4.0.37/ext/libev/ev.c000644 000765 000024 00000350033 12233035540 016677 0ustar00honglistaff000000 000000 /* * libev event processing core, watcher management * * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ /* this big block deduces configuration from config.h */ #ifndef EV_STANDALONE # ifdef EV_CONFIG_H # include EV_CONFIG_H # else # include "config.h" # endif #if HAVE_FLOOR # ifndef EV_USE_FLOOR # define EV_USE_FLOOR 1 # endif #endif # if HAVE_CLOCK_SYSCALL # ifndef EV_USE_CLOCK_SYSCALL # define EV_USE_CLOCK_SYSCALL 1 # ifndef EV_USE_REALTIME # define EV_USE_REALTIME 0 # endif # ifndef EV_USE_MONOTONIC # define EV_USE_MONOTONIC 1 # endif # endif # elif !defined EV_USE_CLOCK_SYSCALL # define EV_USE_CLOCK_SYSCALL 0 # endif # if HAVE_CLOCK_GETTIME # ifndef EV_USE_MONOTONIC # define EV_USE_MONOTONIC 1 # endif # ifndef EV_USE_REALTIME # define EV_USE_REALTIME 0 # endif # else # ifndef EV_USE_MONOTONIC # define EV_USE_MONOTONIC 0 # endif # ifndef EV_USE_REALTIME # define EV_USE_REALTIME 0 # endif # endif # if HAVE_NANOSLEEP # ifndef EV_USE_NANOSLEEP # define EV_USE_NANOSLEEP EV_FEATURE_OS # endif # else # undef EV_USE_NANOSLEEP # define EV_USE_NANOSLEEP 0 # endif # if HAVE_SELECT && HAVE_SYS_SELECT_H # ifndef EV_USE_SELECT # define EV_USE_SELECT EV_FEATURE_BACKENDS # endif # else # undef EV_USE_SELECT # define EV_USE_SELECT 0 # endif # if HAVE_POLL && HAVE_POLL_H # ifndef EV_USE_POLL # define EV_USE_POLL EV_FEATURE_BACKENDS # endif # else # undef EV_USE_POLL # define EV_USE_POLL 0 # endif # if HAVE_EPOLL_CTL && HAVE_SYS_EPOLL_H # ifndef EV_USE_EPOLL # define EV_USE_EPOLL EV_FEATURE_BACKENDS # endif # else # undef EV_USE_EPOLL # define EV_USE_EPOLL 0 # endif # if HAVE_KQUEUE && HAVE_SYS_EVENT_H # ifndef EV_USE_KQUEUE # define EV_USE_KQUEUE EV_FEATURE_BACKENDS # endif # else # undef EV_USE_KQUEUE # define EV_USE_KQUEUE 0 # endif # if HAVE_PORT_H && HAVE_PORT_CREATE # ifndef EV_USE_PORT # define EV_USE_PORT EV_FEATURE_BACKENDS # endif # else # undef EV_USE_PORT # define EV_USE_PORT 0 # endif # if HAVE_INOTIFY_INIT && HAVE_SYS_INOTIFY_H # ifndef EV_USE_INOTIFY # define EV_USE_INOTIFY EV_FEATURE_OS # endif # else # undef EV_USE_INOTIFY # define EV_USE_INOTIFY 0 # endif # if HAVE_SIGNALFD && HAVE_SYS_SIGNALFD_H # ifndef EV_USE_SIGNALFD # define EV_USE_SIGNALFD EV_FEATURE_OS # endif # else # undef EV_USE_SIGNALFD # define EV_USE_SIGNALFD 0 # endif # if HAVE_EVENTFD # ifndef EV_USE_EVENTFD # define EV_USE_EVENTFD EV_FEATURE_OS # endif # else # undef EV_USE_EVENTFD # define EV_USE_EVENTFD 0 # endif #endif #include #include #include #include #include #include #include #include #include #include #include #ifdef EV_H # include EV_H #else # include "ev.h" #endif #if EV_NO_THREADS # undef EV_NO_SMP # define EV_NO_SMP 1 # undef ECB_NO_THREADS # define ECB_NO_THREADS 1 #endif #if EV_NO_SMP # undef EV_NO_SMP # define ECB_NO_SMP 1 #endif #ifndef _WIN32 # include # include # include #else # include # define WIN32_LEAN_AND_MEAN # include # include # ifndef EV_SELECT_IS_WINSOCKET # define EV_SELECT_IS_WINSOCKET 1 # endif # undef EV_AVOID_STDIO #endif /* OS X, in its infinite idiocy, actually HARDCODES * a limit of 1024 into their select. Where people have brains, * OS X engineers apparently have a vacuum. Or maybe they were * ordered to have a vacuum, or they do anything for money. * This might help. Or not. */ #define _DARWIN_UNLIMITED_SELECT 1 /* this block tries to deduce configuration from header-defined symbols and defaults */ /* try to deduce the maximum number of signals on this platform */ #if defined EV_NSIG /* use what's provided */ #elif defined NSIG # define EV_NSIG (NSIG) #elif defined _NSIG # define EV_NSIG (_NSIG) #elif defined SIGMAX # define EV_NSIG (SIGMAX+1) #elif defined SIG_MAX # define EV_NSIG (SIG_MAX+1) #elif defined _SIG_MAX # define EV_NSIG (_SIG_MAX+1) #elif defined MAXSIG # define EV_NSIG (MAXSIG+1) #elif defined MAX_SIG # define EV_NSIG (MAX_SIG+1) #elif defined SIGARRAYSIZE # define EV_NSIG (SIGARRAYSIZE) /* Assume ary[SIGARRAYSIZE] */ #elif defined _sys_nsig # define EV_NSIG (_sys_nsig) /* Solaris 2.5 */ #else # error "unable to find value for NSIG, please report" /* to make it compile regardless, just remove the above line, */ /* but consider reporting it, too! :) */ # define EV_NSIG 65 #endif #ifndef EV_USE_FLOOR # define EV_USE_FLOOR 0 #endif #ifndef EV_USE_CLOCK_SYSCALL # if __linux && __GLIBC__ >= 2 # define EV_USE_CLOCK_SYSCALL EV_FEATURE_OS # else # define EV_USE_CLOCK_SYSCALL 0 # endif #endif #ifndef EV_USE_MONOTONIC # if defined _POSIX_MONOTONIC_CLOCK && _POSIX_MONOTONIC_CLOCK >= 0 # define EV_USE_MONOTONIC EV_FEATURE_OS # else # define EV_USE_MONOTONIC 0 # endif #endif #ifndef EV_USE_REALTIME # define EV_USE_REALTIME !EV_USE_CLOCK_SYSCALL #endif #ifndef EV_USE_NANOSLEEP # if _POSIX_C_SOURCE >= 199309L # define EV_USE_NANOSLEEP EV_FEATURE_OS # else # define EV_USE_NANOSLEEP 0 # endif #endif #ifndef EV_USE_SELECT # define EV_USE_SELECT EV_FEATURE_BACKENDS #endif #ifndef EV_USE_POLL # ifdef _WIN32 # define EV_USE_POLL 0 # else # define EV_USE_POLL EV_FEATURE_BACKENDS # endif #endif #ifndef EV_USE_EPOLL # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4)) # define EV_USE_EPOLL EV_FEATURE_BACKENDS # else # define EV_USE_EPOLL 0 # endif #endif #ifndef EV_USE_KQUEUE # define EV_USE_KQUEUE 0 #endif #ifndef EV_USE_PORT # define EV_USE_PORT 0 #endif #ifndef EV_USE_INOTIFY # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4)) # define EV_USE_INOTIFY EV_FEATURE_OS # else # define EV_USE_INOTIFY 0 # endif #endif #ifndef EV_PID_HASHSIZE # define EV_PID_HASHSIZE EV_FEATURE_DATA ? 16 : 1 #endif #ifndef EV_INOTIFY_HASHSIZE # define EV_INOTIFY_HASHSIZE EV_FEATURE_DATA ? 16 : 1 #endif #ifndef EV_USE_EVENTFD # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) # define EV_USE_EVENTFD EV_FEATURE_OS # else # define EV_USE_EVENTFD 0 # endif #endif #ifndef EV_USE_SIGNALFD # if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)) # define EV_USE_SIGNALFD EV_FEATURE_OS # else # define EV_USE_SIGNALFD 0 # endif #endif #if 0 /* debugging */ # define EV_VERIFY 3 # define EV_USE_4HEAP 1 # define EV_HEAP_CACHE_AT 1 #endif #ifndef EV_VERIFY # define EV_VERIFY (EV_FEATURE_API ? 1 : 0) #endif #ifndef EV_USE_4HEAP # define EV_USE_4HEAP EV_FEATURE_DATA #endif #ifndef EV_HEAP_CACHE_AT # define EV_HEAP_CACHE_AT EV_FEATURE_DATA #endif #ifdef ANDROID /* supposedly, android doesn't typedef fd_mask */ # undef EV_USE_SELECT # define EV_USE_SELECT 0 /* supposedly, we need to include syscall.h, not sys/syscall.h, so just disable */ # undef EV_USE_CLOCK_SYSCALL # define EV_USE_CLOCK_SYSCALL 0 #endif /* aix's poll.h seems to cause lots of trouble */ #ifdef _AIX /* AIX has a completely broken poll.h header */ # undef EV_USE_POLL # define EV_USE_POLL 0 #endif /* on linux, we can use a (slow) syscall to avoid a dependency on pthread, */ /* which makes programs even slower. might work on other unices, too. */ #if EV_USE_CLOCK_SYSCALL # include # ifdef SYS_clock_gettime # define clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts)) # undef EV_USE_MONOTONIC # define EV_USE_MONOTONIC 1 # else # undef EV_USE_CLOCK_SYSCALL # define EV_USE_CLOCK_SYSCALL 0 # endif #endif /* this block fixes any misconfiguration where we know we run into trouble otherwise */ #ifndef CLOCK_MONOTONIC # undef EV_USE_MONOTONIC # define EV_USE_MONOTONIC 0 #endif #ifndef CLOCK_REALTIME # undef EV_USE_REALTIME # define EV_USE_REALTIME 0 #endif #if !EV_STAT_ENABLE # undef EV_USE_INOTIFY # define EV_USE_INOTIFY 0 #endif #if !EV_USE_NANOSLEEP /* hp-ux has it in sys/time.h, which we unconditionally include above */ # if !defined _WIN32 && !defined __hpux # include # endif #endif #if EV_USE_INOTIFY # include # include /* some very old inotify.h headers don't have IN_DONT_FOLLOW */ # ifndef IN_DONT_FOLLOW # undef EV_USE_INOTIFY # define EV_USE_INOTIFY 0 # endif #endif #if EV_USE_EVENTFD /* our minimum requirement is glibc 2.7 which has the stub, but not the header */ # include # ifndef EFD_NONBLOCK # define EFD_NONBLOCK O_NONBLOCK # endif # ifndef EFD_CLOEXEC # ifdef O_CLOEXEC # define EFD_CLOEXEC O_CLOEXEC # else # define EFD_CLOEXEC 02000000 # endif # endif EV_CPP(extern "C") int (eventfd) (unsigned int initval, int flags); #endif #if EV_USE_SIGNALFD /* our minimum requirement is glibc 2.7 which has the stub, but not the header */ # include # ifndef SFD_NONBLOCK # define SFD_NONBLOCK O_NONBLOCK # endif # ifndef SFD_CLOEXEC # ifdef O_CLOEXEC # define SFD_CLOEXEC O_CLOEXEC # else # define SFD_CLOEXEC 02000000 # endif # endif EV_CPP (extern "C") int signalfd (int fd, const sigset_t *mask, int flags); struct signalfd_siginfo { uint32_t ssi_signo; char pad[128 - sizeof (uint32_t)]; }; #endif /**/ #if EV_VERIFY >= 3 # define EV_FREQUENT_CHECK ev_verify (EV_A) #else # define EV_FREQUENT_CHECK do { } while (0) #endif /* * This is used to work around floating point rounding problems. * This value is good at least till the year 4000. */ #define MIN_INTERVAL 0.0001220703125 /* 1/2**13, good till 4000 */ /*#define MIN_INTERVAL 0.00000095367431640625 /* 1/2**20, good till 2200 */ #define MIN_TIMEJUMP 1. /* minimum timejump that gets detected (if monotonic clock available) */ #define MAX_BLOCKTIME 59.743 /* never wait longer than this time (to detect time jumps) */ #define EV_TV_SET(tv,t) do { tv.tv_sec = (long)t; tv.tv_usec = (long)((t - tv.tv_sec) * 1e6); } while (0) #define EV_TS_SET(ts,t) do { ts.tv_sec = (long)t; ts.tv_nsec = (long)((t - ts.tv_sec) * 1e9); } while (0) /* the following is ecb.h embedded into libev - use update_ev_c to update from an external copy */ /* ECB.H BEGIN */ /* * libecb - http://software.schmorp.de/pkg/libecb * * Copyright (©) 2009-2012 Marc Alexander Lehmann * Copyright (©) 2011 Emanuele Giaquinta * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ECB_H #define ECB_H /* 16 bits major, 16 bits minor */ #define ECB_VERSION 0x00010003 #ifdef _WIN32 typedef signed char int8_t; typedef unsigned char uint8_t; typedef signed short int16_t; typedef unsigned short uint16_t; typedef signed int int32_t; typedef unsigned int uint32_t; #if __GNUC__ typedef signed long long int64_t; typedef unsigned long long uint64_t; #else /* _MSC_VER || __BORLANDC__ */ typedef signed __int64 int64_t; typedef unsigned __int64 uint64_t; #endif #ifdef _WIN64 #define ECB_PTRSIZE 8 typedef uint64_t uintptr_t; typedef int64_t intptr_t; #else #define ECB_PTRSIZE 4 typedef uint32_t uintptr_t; typedef int32_t intptr_t; #endif #else #include #if UINTMAX_MAX > 0xffffffffU #define ECB_PTRSIZE 8 #else #define ECB_PTRSIZE 4 #endif #endif /* work around x32 idiocy by defining proper macros */ #if __x86_64 || _M_AMD64 #if __ILP32 #define ECB_AMD64_X32 1 #else #define ECB_AMD64 1 #endif #endif /* many compilers define _GNUC_ to some versions but then only implement * what their idiot authors think are the "more important" extensions, * causing enormous grief in return for some better fake benchmark numbers. * or so. * we try to detect these and simply assume they are not gcc - if they have * an issue with that they should have done it right in the first place. */ #ifndef ECB_GCC_VERSION #if !defined __GNUC_MINOR__ || defined __INTEL_COMPILER || defined __SUNPRO_C || defined __SUNPRO_CC || defined __llvm__ || defined __clang__ #define ECB_GCC_VERSION(major,minor) 0 #else #define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))) #endif #endif #define ECB_C (__STDC__+0) /* this assumes that __STDC__ is either empty or a number */ #define ECB_C99 (__STDC_VERSION__ >= 199901L) #define ECB_C11 (__STDC_VERSION__ >= 201112L) #define ECB_CPP (__cplusplus+0) #define ECB_CPP11 (__cplusplus >= 201103L) #if ECB_CPP #define ECB_EXTERN_C extern "C" #define ECB_EXTERN_C_BEG ECB_EXTERN_C { #define ECB_EXTERN_C_END } #else #define ECB_EXTERN_C extern #define ECB_EXTERN_C_BEG #define ECB_EXTERN_C_END #endif /*****************************************************************************/ /* ECB_NO_THREADS - ecb is not used by multiple threads, ever */ /* ECB_NO_SMP - ecb might be used in multiple threads, but only on a single cpu */ #if ECB_NO_THREADS #define ECB_NO_SMP 1 #endif #if ECB_NO_SMP #define ECB_MEMORY_FENCE do { } while (0) #endif #ifndef ECB_MEMORY_FENCE #if ECB_GCC_VERSION(2,5) || defined __INTEL_COMPILER || (__llvm__ && __GNUC__) || __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110 #if __i386 || __i386__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("lock; orb $0, -1(%%esp)" : : : "memory") #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory") #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") #elif __amd64 || __amd64__ || __x86_64 || __x86_64__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mfence" : : : "memory") #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory") #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory") #elif defined __ARM_ARCH_6__ || defined __ARM_ARCH_6J__ \ || defined __ARM_ARCH_6K__ || defined __ARM_ARCH_6ZK__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mcr p15,0,%0,c7,c10,5" : : "r" (0) : "memory") #elif defined __ARM_ARCH_7__ || defined __ARM_ARCH_7A__ \ || defined __ARM_ARCH_7M__ || defined __ARM_ARCH_7R__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("dmb" : : : "memory") #elif __sparc || __sparc__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad | #StoreStore | #StoreLoad" : : : "memory") #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad" : : : "memory") #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore | #StoreStore") #elif defined __s390__ || defined __s390x__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("bcr 15,0" : : : "memory") #elif defined __mips__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory") #elif defined __alpha__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mb" : : : "memory") #elif defined __hppa__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("" : : : "memory") #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") #elif defined __ia64__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mf" : : : "memory") #endif #endif #endif #ifndef ECB_MEMORY_FENCE #if ECB_GCC_VERSION(4,7) /* see comment below (stdatomic.h) about the C11 memory model. */ #define ECB_MEMORY_FENCE __atomic_thread_fence (__ATOMIC_SEQ_CST) /* The __has_feature syntax from clang is so misdesigned that we cannot use it * without risking compile time errors with other compilers. We *could* * define our own ecb_clang_has_feature, but I just can't be bothered to work * around this shit time and again. * #elif defined __clang && __has_feature (cxx_atomic) * // see comment below (stdatomic.h) about the C11 memory model. * #define ECB_MEMORY_FENCE __c11_atomic_thread_fence (__ATOMIC_SEQ_CST) */ #elif ECB_GCC_VERSION(4,4) || defined __INTEL_COMPILER || defined __clang__ #define ECB_MEMORY_FENCE __sync_synchronize () #elif _MSC_VER >= 1400 /* VC++ 2005 */ #pragma intrinsic(_ReadBarrier,_WriteBarrier,_ReadWriteBarrier) #define ECB_MEMORY_FENCE _ReadWriteBarrier () #define ECB_MEMORY_FENCE_ACQUIRE _ReadWriteBarrier () /* according to msdn, _ReadBarrier is not a load fence */ #define ECB_MEMORY_FENCE_RELEASE _WriteBarrier () #elif defined _WIN32 #include #define ECB_MEMORY_FENCE MemoryBarrier () /* actually just xchg on x86... scary */ #elif __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110 #include #define ECB_MEMORY_FENCE __machine_rw_barrier () #define ECB_MEMORY_FENCE_ACQUIRE __machine_r_barrier () #define ECB_MEMORY_FENCE_RELEASE __machine_w_barrier () #elif __xlC__ #define ECB_MEMORY_FENCE __sync () #endif #endif #ifndef ECB_MEMORY_FENCE #if ECB_C11 && !defined __STDC_NO_ATOMICS__ /* we assume that these memory fences work on all variables/all memory accesses, */ /* not just C11 atomics and atomic accesses */ #include /* Unfortunately, neither gcc 4.7 nor clang 3.1 generate any instructions for */ /* any fence other than seq_cst, which isn't very efficient for us. */ /* Why that is, we don't know - either the C11 memory model is quite useless */ /* for most usages, or gcc and clang have a bug */ /* I *currently* lean towards the latter, and inefficiently implement */ /* all three of ecb's fences as a seq_cst fence */ #define ECB_MEMORY_FENCE atomic_thread_fence (memory_order_seq_cst) #endif #endif #ifndef ECB_MEMORY_FENCE #if !ECB_AVOID_PTHREADS /* * if you get undefined symbol references to pthread_mutex_lock, * or failure to find pthread.h, then you should implement * the ECB_MEMORY_FENCE operations for your cpu/compiler * OR provide pthread.h and link against the posix thread library * of your system. */ #include #define ECB_NEEDS_PTHREADS 1 #define ECB_MEMORY_FENCE_NEEDS_PTHREADS 1 static pthread_mutex_t ecb_mf_lock = PTHREAD_MUTEX_INITIALIZER; #define ECB_MEMORY_FENCE do { pthread_mutex_lock (&ecb_mf_lock); pthread_mutex_unlock (&ecb_mf_lock); } while (0) #endif #endif #if !defined ECB_MEMORY_FENCE_ACQUIRE && defined ECB_MEMORY_FENCE #define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE #endif #if !defined ECB_MEMORY_FENCE_RELEASE && defined ECB_MEMORY_FENCE #define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE #endif /*****************************************************************************/ #if __cplusplus #define ecb_inline static inline #elif ECB_GCC_VERSION(2,5) #define ecb_inline static __inline__ #elif ECB_C99 #define ecb_inline static inline #else #define ecb_inline static #endif #if ECB_GCC_VERSION(3,3) #define ecb_restrict __restrict__ #elif ECB_C99 #define ecb_restrict restrict #else #define ecb_restrict #endif typedef int ecb_bool; #define ECB_CONCAT_(a, b) a ## b #define ECB_CONCAT(a, b) ECB_CONCAT_(a, b) #define ECB_STRINGIFY_(a) # a #define ECB_STRINGIFY(a) ECB_STRINGIFY_(a) #define ecb_function_ ecb_inline #if ECB_GCC_VERSION(3,1) #define ecb_attribute(attrlist) __attribute__(attrlist) #define ecb_is_constant(expr) __builtin_constant_p (expr) #define ecb_expect(expr,value) __builtin_expect ((expr),(value)) #define ecb_prefetch(addr,rw,locality) __builtin_prefetch (addr, rw, locality) #else #define ecb_attribute(attrlist) #define ecb_is_constant(expr) 0 #define ecb_expect(expr,value) (expr) #define ecb_prefetch(addr,rw,locality) #endif /* no emulation for ecb_decltype */ #if ECB_GCC_VERSION(4,5) #define ecb_decltype(x) __decltype(x) #elif ECB_GCC_VERSION(3,0) #define ecb_decltype(x) __typeof(x) #endif #define ecb_noinline ecb_attribute ((__noinline__)) #define ecb_unused ecb_attribute ((__unused__)) #define ecb_const ecb_attribute ((__const__)) #define ecb_pure ecb_attribute ((__pure__)) #if ECB_C11 #define ecb_noreturn _Noreturn #else #define ecb_noreturn ecb_attribute ((__noreturn__)) #endif #if ECB_GCC_VERSION(4,3) #define ecb_artificial ecb_attribute ((__artificial__)) #define ecb_hot ecb_attribute ((__hot__)) #define ecb_cold ecb_attribute ((__cold__)) #else #define ecb_artificial #define ecb_hot #define ecb_cold #endif /* put around conditional expressions if you are very sure that the */ /* expression is mostly true or mostly false. note that these return */ /* booleans, not the expression. */ #define ecb_expect_false(expr) ecb_expect (!!(expr), 0) #define ecb_expect_true(expr) ecb_expect (!!(expr), 1) /* for compatibility to the rest of the world */ #define ecb_likely(expr) ecb_expect_true (expr) #define ecb_unlikely(expr) ecb_expect_false (expr) /* count trailing zero bits and count # of one bits */ #if ECB_GCC_VERSION(3,4) /* we assume int == 32 bit, long == 32 or 64 bit and long long == 64 bit */ #define ecb_ld32(x) (__builtin_clz (x) ^ 31) #define ecb_ld64(x) (__builtin_clzll (x) ^ 63) #define ecb_ctz32(x) __builtin_ctz (x) #define ecb_ctz64(x) __builtin_ctzll (x) #define ecb_popcount32(x) __builtin_popcount (x) /* no popcountll */ #else ecb_function_ int ecb_ctz32 (uint32_t x) ecb_const; ecb_function_ int ecb_ctz32 (uint32_t x) { int r = 0; x &= ~x + 1; /* this isolates the lowest bit */ #if ECB_branchless_on_i386 r += !!(x & 0xaaaaaaaa) << 0; r += !!(x & 0xcccccccc) << 1; r += !!(x & 0xf0f0f0f0) << 2; r += !!(x & 0xff00ff00) << 3; r += !!(x & 0xffff0000) << 4; #else if (x & 0xaaaaaaaa) r += 1; if (x & 0xcccccccc) r += 2; if (x & 0xf0f0f0f0) r += 4; if (x & 0xff00ff00) r += 8; if (x & 0xffff0000) r += 16; #endif return r; } ecb_function_ int ecb_ctz64 (uint64_t x) ecb_const; ecb_function_ int ecb_ctz64 (uint64_t x) { int shift = x & 0xffffffffU ? 0 : 32; return ecb_ctz32 (x >> shift) + shift; } ecb_function_ int ecb_popcount32 (uint32_t x) ecb_const; ecb_function_ int ecb_popcount32 (uint32_t x) { x -= (x >> 1) & 0x55555555; x = ((x >> 2) & 0x33333333) + (x & 0x33333333); x = ((x >> 4) + x) & 0x0f0f0f0f; x *= 0x01010101; return x >> 24; } ecb_function_ int ecb_ld32 (uint32_t x) ecb_const; ecb_function_ int ecb_ld32 (uint32_t x) { int r = 0; if (x >> 16) { x >>= 16; r += 16; } if (x >> 8) { x >>= 8; r += 8; } if (x >> 4) { x >>= 4; r += 4; } if (x >> 2) { x >>= 2; r += 2; } if (x >> 1) { r += 1; } return r; } ecb_function_ int ecb_ld64 (uint64_t x) ecb_const; ecb_function_ int ecb_ld64 (uint64_t x) { int r = 0; if (x >> 32) { x >>= 32; r += 32; } return r + ecb_ld32 (x); } #endif ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) ecb_const; ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) { return !(x & (x - 1)); } ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) ecb_const; ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) { return !(x & (x - 1)); } ecb_function_ uint8_t ecb_bitrev8 (uint8_t x) ecb_const; ecb_function_ uint8_t ecb_bitrev8 (uint8_t x) { return ( (x * 0x0802U & 0x22110U) | (x * 0x8020U & 0x88440U)) * 0x10101U >> 16; } ecb_function_ uint16_t ecb_bitrev16 (uint16_t x) ecb_const; ecb_function_ uint16_t ecb_bitrev16 (uint16_t x) { x = ((x >> 1) & 0x5555) | ((x & 0x5555) << 1); x = ((x >> 2) & 0x3333) | ((x & 0x3333) << 2); x = ((x >> 4) & 0x0f0f) | ((x & 0x0f0f) << 4); x = ( x >> 8 ) | ( x << 8); return x; } ecb_function_ uint32_t ecb_bitrev32 (uint32_t x) ecb_const; ecb_function_ uint32_t ecb_bitrev32 (uint32_t x) { x = ((x >> 1) & 0x55555555) | ((x & 0x55555555) << 1); x = ((x >> 2) & 0x33333333) | ((x & 0x33333333) << 2); x = ((x >> 4) & 0x0f0f0f0f) | ((x & 0x0f0f0f0f) << 4); x = ((x >> 8) & 0x00ff00ff) | ((x & 0x00ff00ff) << 8); x = ( x >> 16 ) | ( x << 16); return x; } /* popcount64 is only available on 64 bit cpus as gcc builtin */ /* so for this version we are lazy */ ecb_function_ int ecb_popcount64 (uint64_t x) ecb_const; ecb_function_ int ecb_popcount64 (uint64_t x) { return ecb_popcount32 (x) + ecb_popcount32 (x >> 32); } ecb_inline uint8_t ecb_rotl8 (uint8_t x, unsigned int count) ecb_const; ecb_inline uint8_t ecb_rotr8 (uint8_t x, unsigned int count) ecb_const; ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) ecb_const; ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) ecb_const; ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) ecb_const; ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) ecb_const; ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) ecb_const; ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) ecb_const; ecb_inline uint8_t ecb_rotl8 (uint8_t x, unsigned int count) { return (x >> ( 8 - count)) | (x << count); } ecb_inline uint8_t ecb_rotr8 (uint8_t x, unsigned int count) { return (x << ( 8 - count)) | (x >> count); } ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) { return (x >> (16 - count)) | (x << count); } ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) { return (x << (16 - count)) | (x >> count); } ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) { return (x >> (32 - count)) | (x << count); } ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) { return (x << (32 - count)) | (x >> count); } ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) { return (x >> (64 - count)) | (x << count); } ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << (64 - count)) | (x >> count); } #if ECB_GCC_VERSION(4,3) #define ecb_bswap16(x) (__builtin_bswap32 (x) >> 16) #define ecb_bswap32(x) __builtin_bswap32 (x) #define ecb_bswap64(x) __builtin_bswap64 (x) #else ecb_function_ uint16_t ecb_bswap16 (uint16_t x) ecb_const; ecb_function_ uint16_t ecb_bswap16 (uint16_t x) { return ecb_rotl16 (x, 8); } ecb_function_ uint32_t ecb_bswap32 (uint32_t x) ecb_const; ecb_function_ uint32_t ecb_bswap32 (uint32_t x) { return (((uint32_t)ecb_bswap16 (x)) << 16) | ecb_bswap16 (x >> 16); } ecb_function_ uint64_t ecb_bswap64 (uint64_t x) ecb_const; ecb_function_ uint64_t ecb_bswap64 (uint64_t x) { return (((uint64_t)ecb_bswap32 (x)) << 32) | ecb_bswap32 (x >> 32); } #endif #if ECB_GCC_VERSION(4,5) #define ecb_unreachable() __builtin_unreachable () #else /* this seems to work fine, but gcc always emits a warning for it :/ */ ecb_inline void ecb_unreachable (void) ecb_noreturn; ecb_inline void ecb_unreachable (void) { } #endif /* try to tell the compiler that some condition is definitely true */ #define ecb_assume(cond) if (!(cond)) ecb_unreachable (); else 0 ecb_inline unsigned char ecb_byteorder_helper (void) ecb_const; ecb_inline unsigned char ecb_byteorder_helper (void) { /* the union code still generates code under pressure in gcc, */ /* but less than using pointers, and always seems to */ /* successfully return a constant. */ /* the reason why we have this horrible preprocessor mess */ /* is to avoid it in all cases, at least on common architectures */ /* or when using a recent enough gcc version (>= 4.6) */ #if __i386 || __i386__ || _M_X86 || __amd64 || __amd64__ || _M_X64 return 0x44; #elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ return 0x44; #elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ return 0x11; #else union { uint32_t i; uint8_t c; } u = { 0x11223344 }; return u.c; #endif } ecb_inline ecb_bool ecb_big_endian (void) ecb_const; ecb_inline ecb_bool ecb_big_endian (void) { return ecb_byteorder_helper () == 0x11; } ecb_inline ecb_bool ecb_little_endian (void) ecb_const; ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () == 0x44; } #if ECB_GCC_VERSION(3,0) || ECB_C99 #define ecb_mod(m,n) ((m) % (n) + ((m) % (n) < 0 ? (n) : 0)) #else #define ecb_mod(m,n) ((m) < 0 ? ((n) - 1 - ((-1 - (m)) % (n))) : ((m) % (n))) #endif #if __cplusplus template static inline T ecb_div_rd (T val, T div) { return val < 0 ? - ((-val + div - 1) / div) : (val ) / div; } template static inline T ecb_div_ru (T val, T div) { return val < 0 ? - ((-val ) / div) : (val + div - 1) / div; } #else #define ecb_div_rd(val,div) ((val) < 0 ? - ((-(val) + (div) - 1) / (div)) : ((val) ) / (div)) #define ecb_div_ru(val,div) ((val) < 0 ? - ((-(val) ) / (div)) : ((val) + (div) - 1) / (div)) #endif #if ecb_cplusplus_does_not_suck /* does not work for local types (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm) */ template static inline int ecb_array_length (const T (&arr)[N]) { return N; } #else #define ecb_array_length(name) (sizeof (name) / sizeof (name [0])) #endif /*******************************************************************************/ /* floating point stuff, can be disabled by defining ECB_NO_LIBM */ /* basically, everything uses "ieee pure-endian" floating point numbers */ /* the only noteworthy exception is ancient armle, which uses order 43218765 */ #if 0 \ || __i386 || __i386__ \ || __amd64 || __amd64__ || __x86_64 || __x86_64__ \ || __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \ || defined __arm__ && defined __ARM_EABI__ \ || defined __s390__ || defined __s390x__ \ || defined __mips__ \ || defined __alpha__ \ || defined __hppa__ \ || defined __ia64__ \ || defined _M_IX86 || defined _M_AMD64 || defined _M_IA64 #define ECB_STDFP 1 #include /* for memcpy */ #else #define ECB_STDFP 0 #include /* for frexp*, ldexp* */ #endif #ifndef ECB_NO_LIBM /* convert a float to ieee single/binary32 */ ecb_function_ uint32_t ecb_float_to_binary32 (float x) ecb_const; ecb_function_ uint32_t ecb_float_to_binary32 (float x) { uint32_t r; #if ECB_STDFP memcpy (&r, &x, 4); #else /* slow emulation, works for anything but -0 */ uint32_t m; int e; if (x == 0e0f ) return 0x00000000U; if (x > +3.40282346638528860e+38f) return 0x7f800000U; if (x < -3.40282346638528860e+38f) return 0xff800000U; if (x != x ) return 0x7fbfffffU; m = frexpf (x, &e) * 0x1000000U; r = m & 0x80000000U; if (r) m = -m; if (e <= -126) { m &= 0xffffffU; m >>= (-125 - e); e = -126; } r |= (e + 126) << 23; r |= m & 0x7fffffU; #endif return r; } /* converts an ieee single/binary32 to a float */ ecb_function_ float ecb_binary32_to_float (uint32_t x) ecb_const; ecb_function_ float ecb_binary32_to_float (uint32_t x) { float r; #if ECB_STDFP memcpy (&r, &x, 4); #else /* emulation, only works for normals and subnormals and +0 */ int neg = x >> 31; int e = (x >> 23) & 0xffU; x &= 0x7fffffU; if (e) x |= 0x800000U; else e = 1; /* we distrust ldexpf a bit and do the 2**-24 scaling by an extra multiply */ r = ldexpf (x * (0.5f / 0x800000U), e - 126); r = neg ? -r : r; #endif return r; } /* convert a double to ieee double/binary64 */ ecb_function_ uint64_t ecb_double_to_binary64 (double x) ecb_const; ecb_function_ uint64_t ecb_double_to_binary64 (double x) { uint64_t r; #if ECB_STDFP memcpy (&r, &x, 8); #else /* slow emulation, works for anything but -0 */ uint64_t m; int e; if (x == 0e0 ) return 0x0000000000000000U; if (x > +1.79769313486231470e+308) return 0x7ff0000000000000U; if (x < -1.79769313486231470e+308) return 0xfff0000000000000U; if (x != x ) return 0X7ff7ffffffffffffU; m = frexp (x, &e) * 0x20000000000000U; r = m & 0x8000000000000000;; if (r) m = -m; if (e <= -1022) { m &= 0x1fffffffffffffU; m >>= (-1021 - e); e = -1022; } r |= ((uint64_t)(e + 1022)) << 52; r |= m & 0xfffffffffffffU; #endif return r; } /* converts an ieee double/binary64 to a double */ ecb_function_ double ecb_binary64_to_double (uint64_t x) ecb_const; ecb_function_ double ecb_binary64_to_double (uint64_t x) { double r; #if ECB_STDFP memcpy (&r, &x, 8); #else /* emulation, only works for normals and subnormals and +0 */ int neg = x >> 63; int e = (x >> 52) & 0x7ffU; x &= 0xfffffffffffffU; if (e) x |= 0x10000000000000U; else e = 1; /* we distrust ldexp a bit and do the 2**-53 scaling by an extra multiply */ r = ldexp (x * (0.5 / 0x10000000000000U), e - 1022); r = neg ? -r : r; #endif return r; } #endif #endif /* ECB.H END */ #if ECB_MEMORY_FENCE_NEEDS_PTHREADS /* if your architecture doesn't need memory fences, e.g. because it is * single-cpu/core, or if you use libev in a project that doesn't use libev * from multiple threads, then you can define ECB_AVOID_PTHREADS when compiling * libev, in which cases the memory fences become nops. * alternatively, you can remove this #error and link against libpthread, * which will then provide the memory fences. */ # error "memory fences not defined for your architecture, please report" #endif #ifndef ECB_MEMORY_FENCE # define ECB_MEMORY_FENCE do { } while (0) # define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE # define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE #endif #define expect_false(cond) ecb_expect_false (cond) #define expect_true(cond) ecb_expect_true (cond) #define noinline ecb_noinline #define inline_size ecb_inline #if EV_FEATURE_CODE # define inline_speed ecb_inline #else # define inline_speed static noinline #endif #define NUMPRI (EV_MAXPRI - EV_MINPRI + 1) #if EV_MINPRI == EV_MAXPRI # define ABSPRI(w) (((W)w), 0) #else # define ABSPRI(w) (((W)w)->priority - EV_MINPRI) #endif #define EMPTY /* required for microsofts broken pseudo-c compiler */ #define EMPTY2(a,b) /* used to suppress some warnings */ typedef ev_watcher *W; typedef ev_watcher_list *WL; typedef ev_watcher_time *WT; #define ev_active(w) ((W)(w))->active #define ev_at(w) ((WT)(w))->at #if EV_USE_REALTIME /* sig_atomic_t is used to avoid per-thread variables or locking but still */ /* giving it a reasonably high chance of working on typical architectures */ static EV_ATOMIC_T have_realtime; /* did clock_gettime (CLOCK_REALTIME) work? */ #endif #if EV_USE_MONOTONIC static EV_ATOMIC_T have_monotonic; /* did clock_gettime (CLOCK_MONOTONIC) work? */ #endif #ifndef EV_FD_TO_WIN32_HANDLE # define EV_FD_TO_WIN32_HANDLE(fd) _get_osfhandle (fd) #endif #ifndef EV_WIN32_HANDLE_TO_FD # define EV_WIN32_HANDLE_TO_FD(handle) _open_osfhandle (handle, 0) #endif #ifndef EV_WIN32_CLOSE_FD # define EV_WIN32_CLOSE_FD(fd) close (fd) #endif #ifdef _WIN32 # include "ev_win32.c" #endif /*****************************************************************************/ /* define a suitable floor function (only used by periodics atm) */ #if EV_USE_FLOOR # include # define ev_floor(v) floor (v) #else #include /* a floor() replacement function, should be independent of ev_tstamp type */ static ev_tstamp noinline ev_floor (ev_tstamp v) { /* the choice of shift factor is not terribly important */ #if FLT_RADIX != 2 /* assume FLT_RADIX == 10 */ const ev_tstamp shift = sizeof (unsigned long) >= 8 ? 10000000000000000000. : 1000000000.; #else const ev_tstamp shift = sizeof (unsigned long) >= 8 ? 18446744073709551616. : 4294967296.; #endif /* argument too large for an unsigned long? */ if (expect_false (v >= shift)) { ev_tstamp f; if (v == v - 1.) return v; /* very large number */ f = shift * ev_floor (v * (1. / shift)); return f + ev_floor (v - f); } /* special treatment for negative args? */ if (expect_false (v < 0.)) { ev_tstamp f = -ev_floor (-v); return f - (f == v ? 0 : 1); } /* fits into an unsigned long */ return (unsigned long)v; } #endif /*****************************************************************************/ #ifdef __linux # include #endif static unsigned int noinline ecb_cold ev_linux_version (void) { #ifdef __linux unsigned int v = 0; struct utsname buf; int i; char *p = buf.release; if (uname (&buf)) return 0; for (i = 3+1; --i; ) { unsigned int c = 0; for (;;) { if (*p >= '0' && *p <= '9') c = c * 10 + *p++ - '0'; else { p += *p == '.'; break; } } v = (v << 8) | c; } return v; #else return 0; #endif } /*****************************************************************************/ #if EV_AVOID_STDIO static void noinline ecb_cold ev_printerr (const char *msg) { write (STDERR_FILENO, msg, strlen (msg)); } #endif static void (*syserr_cb)(const char *msg) EV_THROW; void ecb_cold ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW { syserr_cb = cb; } static void noinline ecb_cold ev_syserr (const char *msg) { if (!msg) msg = "(libev) system error"; if (syserr_cb) syserr_cb (msg); else { #if EV_AVOID_STDIO ev_printerr (msg); ev_printerr (": "); ev_printerr (strerror (errno)); ev_printerr ("\n"); #else perror (msg); #endif abort (); } } static void * ev_realloc_emul (void *ptr, long size) EV_THROW { /* some systems, notably openbsd and darwin, fail to properly * implement realloc (x, 0) (as required by both ansi c-89 and * the single unix specification, so work around them here. * recently, also (at least) fedora and debian started breaking it, * despite documenting it otherwise. */ if (size) return realloc (ptr, size); free (ptr); return 0; } static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul; void ecb_cold ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW { alloc = cb; } inline_speed void * ev_realloc (void *ptr, long size) { ptr = alloc (ptr, size); if (!ptr && size) { #if EV_AVOID_STDIO ev_printerr ("(libev) memory allocation failed, aborting.\n"); #else fprintf (stderr, "(libev) cannot allocate %ld bytes, aborting.", size); #endif abort (); } return ptr; } #define ev_malloc(size) ev_realloc (0, (size)) #define ev_free(ptr) ev_realloc ((ptr), 0) /*****************************************************************************/ /* set in reify when reification needed */ #define EV_ANFD_REIFY 1 /* file descriptor info structure */ typedef struct { WL head; unsigned char events; /* the events watched for */ unsigned char reify; /* flag set when this ANFD needs reification (EV_ANFD_REIFY, EV__IOFDSET) */ unsigned char emask; /* the epoll backend stores the actual kernel mask in here */ unsigned char unused; #if EV_USE_EPOLL unsigned int egen; /* generation counter to counter epoll bugs */ #endif #if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP SOCKET handle; #endif #if EV_USE_IOCP OVERLAPPED or, ow; #endif } ANFD; /* stores the pending event set for a given watcher */ typedef struct { W w; int events; /* the pending event set for the given watcher */ } ANPENDING; #if EV_USE_INOTIFY /* hash table entry per inotify-id */ typedef struct { WL head; } ANFS; #endif /* Heap Entry */ #if EV_HEAP_CACHE_AT /* a heap element */ typedef struct { ev_tstamp at; WT w; } ANHE; #define ANHE_w(he) (he).w /* access watcher, read-write */ #define ANHE_at(he) (he).at /* access cached at, read-only */ #define ANHE_at_cache(he) (he).at = (he).w->at /* update at from watcher */ #else /* a heap element */ typedef WT ANHE; #define ANHE_w(he) (he) #define ANHE_at(he) (he)->at #define ANHE_at_cache(he) #endif #if EV_MULTIPLICITY struct ev_loop { ev_tstamp ev_rt_now; #define ev_rt_now ((loop)->ev_rt_now) #define VAR(name,decl) decl; #include "ev_vars.h" #undef VAR }; #include "ev_wrap.h" static struct ev_loop default_loop_struct; EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be initialised to make it a definition despite extern */ #else EV_API_DECL ev_tstamp ev_rt_now = 0; /* needs to be initialised to make it a definition despite extern */ #define VAR(name,decl) static decl; #include "ev_vars.h" #undef VAR static int ev_default_loop_ptr; #endif #if EV_FEATURE_API # define EV_RELEASE_CB if (expect_false (release_cb)) release_cb (EV_A) # define EV_ACQUIRE_CB if (expect_false (acquire_cb)) acquire_cb (EV_A) # define EV_INVOKE_PENDING invoke_cb (EV_A) #else # define EV_RELEASE_CB (void)0 # define EV_ACQUIRE_CB (void)0 # define EV_INVOKE_PENDING ev_invoke_pending (EV_A) #endif #define EVBREAK_RECURSE 0x80 /*****************************************************************************/ #ifndef EV_HAVE_EV_TIME ev_tstamp ev_time (void) EV_THROW { #if EV_USE_REALTIME if (expect_true (have_realtime)) { struct timespec ts; clock_gettime (CLOCK_REALTIME, &ts); return ts.tv_sec + ts.tv_nsec * 1e-9; } #endif struct timeval tv; gettimeofday (&tv, 0); return tv.tv_sec + tv.tv_usec * 1e-6; } #endif inline_size ev_tstamp get_clock (void) { #if EV_USE_MONOTONIC if (expect_true (have_monotonic)) { struct timespec ts; clock_gettime (CLOCK_MONOTONIC, &ts); return ts.tv_sec + ts.tv_nsec * 1e-9; } #endif return ev_time (); } #if EV_MULTIPLICITY ev_tstamp ev_now (EV_P) EV_THROW { return ev_rt_now; } #endif void ev_sleep (ev_tstamp delay) EV_THROW { if (delay > 0.) { #if EV_USE_NANOSLEEP struct timespec ts; EV_TS_SET (ts, delay); nanosleep (&ts, 0); #elif defined _WIN32 Sleep ((unsigned long)(delay * 1e3)); #else struct timeval tv; /* here we rely on sys/time.h + sys/types.h + unistd.h providing select */ /* something not guaranteed by newer posix versions, but guaranteed */ /* by older ones */ EV_TV_SET (tv, delay); select (0, 0, 0, 0, &tv); #endif } } /*****************************************************************************/ #define MALLOC_ROUND 4096 /* prefer to allocate in chunks of this size, must be 2**n and >> 4 longs */ /* find a suitable new size for the given array, */ /* hopefully by rounding to a nice-to-malloc size */ inline_size int array_nextsize (int elem, int cur, int cnt) { int ncur = cur + 1; do ncur <<= 1; while (cnt > ncur); /* if size is large, round to MALLOC_ROUND - 4 * longs to accommodate malloc overhead */ if (elem * ncur > MALLOC_ROUND - sizeof (void *) * 4) { ncur *= elem; ncur = (ncur + elem + (MALLOC_ROUND - 1) + sizeof (void *) * 4) & ~(MALLOC_ROUND - 1); ncur = ncur - sizeof (void *) * 4; ncur /= elem; } return ncur; } static void * noinline ecb_cold array_realloc (int elem, void *base, int *cur, int cnt) { *cur = array_nextsize (elem, *cur, cnt); return ev_realloc (base, elem * *cur); } #define array_init_zero(base,count) \ memset ((void *)(base), 0, sizeof (*(base)) * (count)) #define array_needsize(type,base,cur,cnt,init) \ if (expect_false ((cnt) > (cur))) \ { \ int ecb_unused ocur_ = (cur); \ (base) = (type *)array_realloc \ (sizeof (type), (base), &(cur), (cnt)); \ init ((base) + (ocur_), (cur) - ocur_); \ } #if 0 #define array_slim(type,stem) \ if (stem ## max < array_roundsize (stem ## cnt >> 2)) \ { \ stem ## max = array_roundsize (stem ## cnt >> 1); \ base = (type *)ev_realloc (base, sizeof (type) * (stem ## max));\ fprintf (stderr, "slimmed down " # stem " to %d\n", stem ## max);/*D*/\ } #endif #define array_free(stem, idx) \ ev_free (stem ## s idx); stem ## cnt idx = stem ## max idx = 0; stem ## s idx = 0 /*****************************************************************************/ /* dummy callback for pending events */ static void noinline pendingcb (EV_P_ ev_prepare *w, int revents) { } void noinline ev_feed_event (EV_P_ void *w, int revents) EV_THROW { W w_ = (W)w; int pri = ABSPRI (w_); if (expect_false (w_->pending)) pendings [pri][w_->pending - 1].events |= revents; else { w_->pending = ++pendingcnt [pri]; array_needsize (ANPENDING, pendings [pri], pendingmax [pri], w_->pending, EMPTY2); pendings [pri][w_->pending - 1].w = w_; pendings [pri][w_->pending - 1].events = revents; } pendingpri = NUMPRI - 1; } inline_speed void feed_reverse (EV_P_ W w) { array_needsize (W, rfeeds, rfeedmax, rfeedcnt + 1, EMPTY2); rfeeds [rfeedcnt++] = w; } inline_size void feed_reverse_done (EV_P_ int revents) { do ev_feed_event (EV_A_ rfeeds [--rfeedcnt], revents); while (rfeedcnt); } inline_speed void queue_events (EV_P_ W *events, int eventcnt, int type) { int i; for (i = 0; i < eventcnt; ++i) ev_feed_event (EV_A_ events [i], type); } /*****************************************************************************/ inline_speed void fd_event_nocheck (EV_P_ int fd, int revents) { ANFD *anfd = anfds + fd; ev_io *w; for (w = (ev_io *)anfd->head; w; w = (ev_io *)((WL)w)->next) { int ev = w->events & revents; if (ev) ev_feed_event (EV_A_ (W)w, ev); } } /* do not submit kernel events for fds that have reify set */ /* because that means they changed while we were polling for new events */ inline_speed void fd_event (EV_P_ int fd, int revents) { ANFD *anfd = anfds + fd; if (expect_true (!anfd->reify)) fd_event_nocheck (EV_A_ fd, revents); } void ev_feed_fd_event (EV_P_ int fd, int revents) EV_THROW { if (fd >= 0 && fd < anfdmax) fd_event_nocheck (EV_A_ fd, revents); } /* make sure the external fd watch events are in-sync */ /* with the kernel/libev internal state */ inline_size void fd_reify (EV_P) { int i; #if EV_SELECT_IS_WINSOCKET || EV_USE_IOCP for (i = 0; i < fdchangecnt; ++i) { int fd = fdchanges [i]; ANFD *anfd = anfds + fd; if (anfd->reify & EV__IOFDSET && anfd->head) { SOCKET handle = EV_FD_TO_WIN32_HANDLE (fd); if (handle != anfd->handle) { unsigned long arg; assert (("libev: only socket fds supported in this configuration", ioctlsocket (handle, FIONREAD, &arg) == 0)); /* handle changed, but fd didn't - we need to do it in two steps */ backend_modify (EV_A_ fd, anfd->events, 0); anfd->events = 0; anfd->handle = handle; } } } #endif for (i = 0; i < fdchangecnt; ++i) { int fd = fdchanges [i]; ANFD *anfd = anfds + fd; ev_io *w; unsigned char o_events = anfd->events; unsigned char o_reify = anfd->reify; anfd->reify = 0; /*if (expect_true (o_reify & EV_ANFD_REIFY)) probably a deoptimisation */ { anfd->events = 0; for (w = (ev_io *)anfd->head; w; w = (ev_io *)((WL)w)->next) anfd->events |= (unsigned char)w->events; if (o_events != anfd->events) o_reify = EV__IOFDSET; /* actually |= */ } if (o_reify & EV__IOFDSET) backend_modify (EV_A_ fd, o_events, anfd->events); } fdchangecnt = 0; } /* something about the given fd changed */ inline_size void fd_change (EV_P_ int fd, int flags) { unsigned char reify = anfds [fd].reify; anfds [fd].reify |= flags; if (expect_true (!reify)) { ++fdchangecnt; array_needsize (int, fdchanges, fdchangemax, fdchangecnt, EMPTY2); fdchanges [fdchangecnt - 1] = fd; } } /* the given fd is invalid/unusable, so make sure it doesn't hurt us anymore */ inline_speed void ecb_cold fd_kill (EV_P_ int fd) { ev_io *w; while ((w = (ev_io *)anfds [fd].head)) { ev_io_stop (EV_A_ w); ev_feed_event (EV_A_ (W)w, EV_ERROR | EV_READ | EV_WRITE); } } /* check whether the given fd is actually valid, for error recovery */ inline_size int ecb_cold fd_valid (int fd) { #ifdef _WIN32 return EV_FD_TO_WIN32_HANDLE (fd) != -1; #else return fcntl (fd, F_GETFD) != -1; #endif } /* called on EBADF to verify fds */ static void noinline ecb_cold fd_ebadf (EV_P) { int fd; for (fd = 0; fd < anfdmax; ++fd) if (anfds [fd].events) if (!fd_valid (fd) && errno == EBADF) fd_kill (EV_A_ fd); } /* called on ENOMEM in select/poll to kill some fds and retry */ static void noinline ecb_cold fd_enomem (EV_P) { int fd; for (fd = anfdmax; fd--; ) if (anfds [fd].events) { fd_kill (EV_A_ fd); break; } } /* usually called after fork if backend needs to re-arm all fds from scratch */ static void noinline fd_rearm_all (EV_P) { int fd; for (fd = 0; fd < anfdmax; ++fd) if (anfds [fd].events) { anfds [fd].events = 0; anfds [fd].emask = 0; fd_change (EV_A_ fd, EV__IOFDSET | EV_ANFD_REIFY); } } /* used to prepare libev internal fd's */ /* this is not fork-safe */ inline_speed void fd_intern (int fd) { #ifdef _WIN32 unsigned long arg = 1; ioctlsocket (EV_FD_TO_WIN32_HANDLE (fd), FIONBIO, &arg); #else fcntl (fd, F_SETFD, FD_CLOEXEC); fcntl (fd, F_SETFL, O_NONBLOCK); #endif } /*****************************************************************************/ /* * the heap functions want a real array index. array index 0 is guaranteed to not * be in-use at any time. the first heap entry is at array [HEAP0]. DHEAP gives * the branching factor of the d-tree. */ /* * at the moment we allow libev the luxury of two heaps, * a small-code-size 2-heap one and a ~1.5kb larger 4-heap * which is more cache-efficient. * the difference is about 5% with 50000+ watchers. */ #if EV_USE_4HEAP #define DHEAP 4 #define HEAP0 (DHEAP - 1) /* index of first element in heap */ #define HPARENT(k) ((((k) - HEAP0 - 1) / DHEAP) + HEAP0) #define UPHEAP_DONE(p,k) ((p) == (k)) /* away from the root */ inline_speed void downheap (ANHE *heap, int N, int k) { ANHE he = heap [k]; ANHE *E = heap + N + HEAP0; for (;;) { ev_tstamp minat; ANHE *minpos; ANHE *pos = heap + DHEAP * (k - HEAP0) + HEAP0 + 1; /* find minimum child */ if (expect_true (pos + DHEAP - 1 < E)) { /* fast path */ (minpos = pos + 0), (minat = ANHE_at (*minpos)); if ( ANHE_at (pos [1]) < minat) (minpos = pos + 1), (minat = ANHE_at (*minpos)); if ( ANHE_at (pos [2]) < minat) (minpos = pos + 2), (minat = ANHE_at (*minpos)); if ( ANHE_at (pos [3]) < minat) (minpos = pos + 3), (minat = ANHE_at (*minpos)); } else if (pos < E) { /* slow path */ (minpos = pos + 0), (minat = ANHE_at (*minpos)); if (pos + 1 < E && ANHE_at (pos [1]) < minat) (minpos = pos + 1), (minat = ANHE_at (*minpos)); if (pos + 2 < E && ANHE_at (pos [2]) < minat) (minpos = pos + 2), (minat = ANHE_at (*minpos)); if (pos + 3 < E && ANHE_at (pos [3]) < minat) (minpos = pos + 3), (minat = ANHE_at (*minpos)); } else break; if (ANHE_at (he) <= minat) break; heap [k] = *minpos; ev_active (ANHE_w (*minpos)) = k; k = minpos - heap; } heap [k] = he; ev_active (ANHE_w (he)) = k; } #else /* 4HEAP */ #define HEAP0 1 #define HPARENT(k) ((k) >> 1) #define UPHEAP_DONE(p,k) (!(p)) /* away from the root */ inline_speed void downheap (ANHE *heap, int N, int k) { ANHE he = heap [k]; for (;;) { int c = k << 1; if (c >= N + HEAP0) break; c += c + 1 < N + HEAP0 && ANHE_at (heap [c]) > ANHE_at (heap [c + 1]) ? 1 : 0; if (ANHE_at (he) <= ANHE_at (heap [c])) break; heap [k] = heap [c]; ev_active (ANHE_w (heap [k])) = k; k = c; } heap [k] = he; ev_active (ANHE_w (he)) = k; } #endif /* towards the root */ inline_speed void upheap (ANHE *heap, int k) { ANHE he = heap [k]; for (;;) { int p = HPARENT (k); if (UPHEAP_DONE (p, k) || ANHE_at (heap [p]) <= ANHE_at (he)) break; heap [k] = heap [p]; ev_active (ANHE_w (heap [k])) = k; k = p; } heap [k] = he; ev_active (ANHE_w (he)) = k; } /* move an element suitably so it is in a correct place */ inline_size void adjustheap (ANHE *heap, int N, int k) { if (k > HEAP0 && ANHE_at (heap [k]) <= ANHE_at (heap [HPARENT (k)])) upheap (heap, k); else downheap (heap, N, k); } /* rebuild the heap: this function is used only once and executed rarely */ inline_size void reheap (ANHE *heap, int N) { int i; /* we don't use floyds algorithm, upheap is simpler and is more cache-efficient */ /* also, this is easy to implement and correct for both 2-heaps and 4-heaps */ for (i = 0; i < N; ++i) upheap (heap, i + HEAP0); } /*****************************************************************************/ /* associate signal watchers to a signal signal */ typedef struct { EV_ATOMIC_T pending; #if EV_MULTIPLICITY EV_P; #endif WL head; } ANSIG; static ANSIG signals [EV_NSIG - 1]; /*****************************************************************************/ #if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE static void noinline ecb_cold evpipe_init (EV_P) { if (!ev_is_active (&pipe_w)) { int fds [2]; # if EV_USE_EVENTFD fds [0] = -1; fds [1] = eventfd (0, EFD_NONBLOCK | EFD_CLOEXEC); if (fds [1] < 0 && errno == EINVAL) fds [1] = eventfd (0, 0); if (fds [1] < 0) # endif { while (pipe (fds)) ev_syserr ("(libev) error creating signal/async pipe"); fd_intern (fds [0]); } fd_intern (fds [1]); evpipe [0] = fds [0]; if (evpipe [1] < 0) evpipe [1] = fds [1]; /* first call, set write fd */ else { /* on subsequent calls, do not change evpipe [1] */ /* so that evpipe_write can always rely on its value. */ /* this branch does not do anything sensible on windows, */ /* so must not be executed on windows */ dup2 (fds [1], evpipe [1]); close (fds [1]); } ev_io_set (&pipe_w, evpipe [0] < 0 ? evpipe [1] : evpipe [0], EV_READ); ev_io_start (EV_A_ &pipe_w); ev_unref (EV_A); /* watcher should not keep loop alive */ } } inline_speed void evpipe_write (EV_P_ EV_ATOMIC_T *flag) { ECB_MEMORY_FENCE; /* push out the write before this function was called, acquire flag */ if (expect_true (*flag)) return; *flag = 1; ECB_MEMORY_FENCE_RELEASE; /* make sure flag is visible before the wakeup */ pipe_write_skipped = 1; ECB_MEMORY_FENCE; /* make sure pipe_write_skipped is visible before we check pipe_write_wanted */ if (pipe_write_wanted) { int old_errno; pipe_write_skipped = 0; ECB_MEMORY_FENCE_RELEASE; old_errno = errno; /* save errno because write will clobber it */ #if EV_USE_EVENTFD if (evpipe [0] < 0) { uint64_t counter = 1; write (evpipe [1], &counter, sizeof (uint64_t)); } else #endif { #ifdef _WIN32 WSABUF buf; DWORD sent; buf.buf = &buf; buf.len = 1; WSASend (EV_FD_TO_WIN32_HANDLE (evpipe [1]), &buf, 1, &sent, 0, 0, 0); #else write (evpipe [1], &(evpipe [1]), 1); #endif } errno = old_errno; } } /* called whenever the libev signal pipe */ /* got some events (signal, async) */ static void pipecb (EV_P_ ev_io *iow, int revents) { int i; if (revents & EV_READ) { #if EV_USE_EVENTFD if (evpipe [0] < 0) { uint64_t counter; read (evpipe [1], &counter, sizeof (uint64_t)); } else #endif { char dummy[4]; #ifdef _WIN32 WSABUF buf; DWORD recvd; DWORD flags = 0; buf.buf = dummy; buf.len = sizeof (dummy); WSARecv (EV_FD_TO_WIN32_HANDLE (evpipe [0]), &buf, 1, &recvd, &flags, 0, 0); #else read (evpipe [0], &dummy, sizeof (dummy)); #endif } } pipe_write_skipped = 0; ECB_MEMORY_FENCE; /* push out skipped, acquire flags */ #if EV_SIGNAL_ENABLE if (sig_pending) { sig_pending = 0; ECB_MEMORY_FENCE; for (i = EV_NSIG - 1; i--; ) if (expect_false (signals [i].pending)) ev_feed_signal_event (EV_A_ i + 1); } #endif #if EV_ASYNC_ENABLE if (async_pending) { async_pending = 0; ECB_MEMORY_FENCE; for (i = asynccnt; i--; ) if (asyncs [i]->sent) { asyncs [i]->sent = 0; ECB_MEMORY_FENCE_RELEASE; ev_feed_event (EV_A_ asyncs [i], EV_ASYNC); } } #endif } /*****************************************************************************/ void ev_feed_signal (int signum) EV_THROW { #if EV_MULTIPLICITY EV_P; ECB_MEMORY_FENCE_ACQUIRE; EV_A = signals [signum - 1].loop; if (!EV_A) return; #endif signals [signum - 1].pending = 1; evpipe_write (EV_A_ &sig_pending); } static void ev_sighandler (int signum) { #ifdef _WIN32 signal (signum, ev_sighandler); #endif ev_feed_signal (signum); } void noinline ev_feed_signal_event (EV_P_ int signum) EV_THROW { WL w; if (expect_false (signum <= 0 || signum >= EV_NSIG)) return; --signum; #if EV_MULTIPLICITY /* it is permissible to try to feed a signal to the wrong loop */ /* or, likely more useful, feeding a signal nobody is waiting for */ if (expect_false (signals [signum].loop != EV_A)) return; #endif signals [signum].pending = 0; ECB_MEMORY_FENCE_RELEASE; for (w = signals [signum].head; w; w = w->next) ev_feed_event (EV_A_ (W)w, EV_SIGNAL); } #if EV_USE_SIGNALFD static void sigfdcb (EV_P_ ev_io *iow, int revents) { struct signalfd_siginfo si[2], *sip; /* these structs are big */ for (;;) { ssize_t res = read (sigfd, si, sizeof (si)); /* not ISO-C, as res might be -1, but works with SuS */ for (sip = si; (char *)sip < (char *)si + res; ++sip) ev_feed_signal_event (EV_A_ sip->ssi_signo); if (res < (ssize_t)sizeof (si)) break; } } #endif #endif /*****************************************************************************/ #if EV_CHILD_ENABLE static WL childs [EV_PID_HASHSIZE]; static ev_signal childev; #ifndef WIFCONTINUED # define WIFCONTINUED(status) 0 #endif /* handle a single child status event */ inline_speed void child_reap (EV_P_ int chain, int pid, int status) { ev_child *w; int traced = WIFSTOPPED (status) || WIFCONTINUED (status); for (w = (ev_child *)childs [chain & ((EV_PID_HASHSIZE) - 1)]; w; w = (ev_child *)((WL)w)->next) { if ((w->pid == pid || !w->pid) && (!traced || (w->flags & 1))) { ev_set_priority (w, EV_MAXPRI); /* need to do it *now*, this *must* be the same prio as the signal watcher itself */ w->rpid = pid; w->rstatus = status; ev_feed_event (EV_A_ (W)w, EV_CHILD); } } } #ifndef WCONTINUED # define WCONTINUED 0 #endif /* called on sigchld etc., calls waitpid */ static void childcb (EV_P_ ev_signal *sw, int revents) { int pid, status; /* some systems define WCONTINUED but then fail to support it (linux 2.4) */ if (0 >= (pid = waitpid (-1, &status, WNOHANG | WUNTRACED | WCONTINUED))) if (!WCONTINUED || errno != EINVAL || 0 >= (pid = waitpid (-1, &status, WNOHANG | WUNTRACED))) return; /* make sure we are called again until all children have been reaped */ /* we need to do it this way so that the callback gets called before we continue */ ev_feed_event (EV_A_ (W)sw, EV_SIGNAL); child_reap (EV_A_ pid, pid, status); if ((EV_PID_HASHSIZE) > 1) child_reap (EV_A_ 0, pid, status); /* this might trigger a watcher twice, but feed_event catches that */ } #endif /*****************************************************************************/ #if EV_USE_IOCP # include "ev_iocp.c" #endif #if EV_USE_PORT # include "ev_port.c" #endif #if EV_USE_KQUEUE # include "ev_kqueue.c" #endif #if EV_USE_EPOLL # include "ev_epoll.c" #endif #if EV_USE_POLL # include "ev_poll.c" #endif #if EV_USE_SELECT # include "ev_select.c" #endif int ecb_cold ev_version_major (void) EV_THROW { return EV_VERSION_MAJOR; } int ecb_cold ev_version_minor (void) EV_THROW { return EV_VERSION_MINOR; } /* return true if we are running with elevated privileges and should ignore env variables */ int inline_size ecb_cold enable_secure (void) { #ifdef _WIN32 return 0; #else return getuid () != geteuid () || getgid () != getegid (); #endif } unsigned int ecb_cold ev_supported_backends (void) EV_THROW { unsigned int flags = 0; if (EV_USE_PORT ) flags |= EVBACKEND_PORT; if (EV_USE_KQUEUE) flags |= EVBACKEND_KQUEUE; if (EV_USE_EPOLL ) flags |= EVBACKEND_EPOLL; if (EV_USE_POLL ) flags |= EVBACKEND_POLL; if (EV_USE_SELECT) flags |= EVBACKEND_SELECT; return flags; } unsigned int ecb_cold ev_recommended_backends (void) EV_THROW { unsigned int flags = ev_supported_backends (); #ifndef __NetBSD__ /* kqueue is borked on everything but netbsd apparently */ /* it usually doesn't work correctly on anything but sockets and pipes */ flags &= ~EVBACKEND_KQUEUE; #endif #ifdef __APPLE__ /* only select works correctly on that "unix-certified" platform */ flags &= ~EVBACKEND_KQUEUE; /* horribly broken, even for sockets */ flags &= ~EVBACKEND_POLL; /* poll is based on kqueue from 10.5 onwards */ #endif #ifdef __FreeBSD__ flags &= ~EVBACKEND_POLL; /* poll return value is unusable (http://forums.freebsd.org/archive/index.php/t-10270.html) */ #endif return flags; } unsigned int ecb_cold ev_embeddable_backends (void) EV_THROW { int flags = EVBACKEND_EPOLL | EVBACKEND_KQUEUE | EVBACKEND_PORT; /* epoll embeddability broken on all linux versions up to at least 2.6.23 */ if (ev_linux_version () < 0x020620) /* disable it on linux < 2.6.32 */ flags &= ~EVBACKEND_EPOLL; return flags; } unsigned int ev_backend (EV_P) EV_THROW { return backend; } #if EV_FEATURE_API unsigned int ev_iteration (EV_P) EV_THROW { return loop_count; } unsigned int ev_depth (EV_P) EV_THROW { return loop_depth; } void ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_THROW { io_blocktime = interval; } void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_THROW { timeout_blocktime = interval; } void ev_set_userdata (EV_P_ void *data) EV_THROW { userdata = data; } void * ev_userdata (EV_P) EV_THROW { return userdata; } void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P)) EV_THROW { invoke_cb = invoke_pending_cb; } void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV_P) EV_THROW) EV_THROW { release_cb = release; acquire_cb = acquire; } #endif /* initialise a loop structure, must be zero-initialised */ static void noinline ecb_cold loop_init (EV_P_ unsigned int flags) EV_THROW { if (!backend) { origflags = flags; #if EV_USE_REALTIME if (!have_realtime) { struct timespec ts; if (!clock_gettime (CLOCK_REALTIME, &ts)) have_realtime = 1; } #endif #if EV_USE_MONOTONIC if (!have_monotonic) { struct timespec ts; if (!clock_gettime (CLOCK_MONOTONIC, &ts)) have_monotonic = 1; } #endif /* pid check not overridable via env */ #ifndef _WIN32 if (flags & EVFLAG_FORKCHECK) curpid = getpid (); #endif if (!(flags & EVFLAG_NOENV) && !enable_secure () && getenv ("LIBEV_FLAGS")) flags = atoi (getenv ("LIBEV_FLAGS")); ev_rt_now = ev_time (); mn_now = get_clock (); now_floor = mn_now; rtmn_diff = ev_rt_now - mn_now; #if EV_FEATURE_API invoke_cb = ev_invoke_pending; #endif io_blocktime = 0.; timeout_blocktime = 0.; backend = 0; backend_fd = -1; sig_pending = 0; #if EV_ASYNC_ENABLE async_pending = 0; #endif pipe_write_skipped = 0; pipe_write_wanted = 0; evpipe [0] = -1; evpipe [1] = -1; #if EV_USE_INOTIFY fs_fd = flags & EVFLAG_NOINOTIFY ? -1 : -2; #endif #if EV_USE_SIGNALFD sigfd = flags & EVFLAG_SIGNALFD ? -2 : -1; #endif if (!(flags & EVBACKEND_MASK)) flags |= ev_recommended_backends (); #if EV_USE_IOCP if (!backend && (flags & EVBACKEND_IOCP )) backend = iocp_init (EV_A_ flags); #endif #if EV_USE_PORT if (!backend && (flags & EVBACKEND_PORT )) backend = port_init (EV_A_ flags); #endif #if EV_USE_KQUEUE if (!backend && (flags & EVBACKEND_KQUEUE)) backend = kqueue_init (EV_A_ flags); #endif #if EV_USE_EPOLL if (!backend && (flags & EVBACKEND_EPOLL )) backend = epoll_init (EV_A_ flags); #endif #if EV_USE_POLL if (!backend && (flags & EVBACKEND_POLL )) backend = poll_init (EV_A_ flags); #endif #if EV_USE_SELECT if (!backend && (flags & EVBACKEND_SELECT)) backend = select_init (EV_A_ flags); #endif ev_prepare_init (&pending_w, pendingcb); #if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE ev_init (&pipe_w, pipecb); ev_set_priority (&pipe_w, EV_MAXPRI); #endif } } /* free up a loop structure */ void ecb_cold ev_loop_destroy (EV_P) { int i; #if EV_MULTIPLICITY /* mimic free (0) */ if (!EV_A) return; #endif #if EV_CLEANUP_ENABLE /* queue cleanup watchers (and execute them) */ if (expect_false (cleanupcnt)) { queue_events (EV_A_ (W *)cleanups, cleanupcnt, EV_CLEANUP); EV_INVOKE_PENDING; } #endif #if EV_CHILD_ENABLE if (ev_is_default_loop (EV_A) && ev_is_active (&childev)) { ev_ref (EV_A); /* child watcher */ ev_signal_stop (EV_A_ &childev); } #endif if (ev_is_active (&pipe_w)) { /*ev_ref (EV_A);*/ /*ev_io_stop (EV_A_ &pipe_w);*/ if (evpipe [0] >= 0) EV_WIN32_CLOSE_FD (evpipe [0]); if (evpipe [1] >= 0) EV_WIN32_CLOSE_FD (evpipe [1]); } #if EV_USE_SIGNALFD if (ev_is_active (&sigfd_w)) close (sigfd); #endif #if EV_USE_INOTIFY if (fs_fd >= 0) close (fs_fd); #endif if (backend_fd >= 0) close (backend_fd); #if EV_USE_IOCP if (backend == EVBACKEND_IOCP ) iocp_destroy (EV_A); #endif #if EV_USE_PORT if (backend == EVBACKEND_PORT ) port_destroy (EV_A); #endif #if EV_USE_KQUEUE if (backend == EVBACKEND_KQUEUE) kqueue_destroy (EV_A); #endif #if EV_USE_EPOLL if (backend == EVBACKEND_EPOLL ) epoll_destroy (EV_A); #endif #if EV_USE_POLL if (backend == EVBACKEND_POLL ) poll_destroy (EV_A); #endif #if EV_USE_SELECT if (backend == EVBACKEND_SELECT) select_destroy (EV_A); #endif for (i = NUMPRI; i--; ) { array_free (pending, [i]); #if EV_IDLE_ENABLE array_free (idle, [i]); #endif } ev_free (anfds); anfds = 0; anfdmax = 0; /* have to use the microsoft-never-gets-it-right macro */ array_free (rfeed, EMPTY); array_free (fdchange, EMPTY); array_free (timer, EMPTY); #if EV_PERIODIC_ENABLE array_free (periodic, EMPTY); #endif #if EV_FORK_ENABLE array_free (fork, EMPTY); #endif #if EV_CLEANUP_ENABLE array_free (cleanup, EMPTY); #endif array_free (prepare, EMPTY); array_free (check, EMPTY); #if EV_ASYNC_ENABLE array_free (async, EMPTY); #endif backend = 0; #if EV_MULTIPLICITY if (ev_is_default_loop (EV_A)) #endif ev_default_loop_ptr = 0; #if EV_MULTIPLICITY else ev_free (EV_A); #endif } #if EV_USE_INOTIFY inline_size void infy_fork (EV_P); #endif inline_size void loop_fork (EV_P) { #if EV_USE_PORT if (backend == EVBACKEND_PORT ) port_fork (EV_A); #endif #if EV_USE_KQUEUE if (backend == EVBACKEND_KQUEUE) kqueue_fork (EV_A); #endif #if EV_USE_EPOLL if (backend == EVBACKEND_EPOLL ) epoll_fork (EV_A); #endif #if EV_USE_INOTIFY infy_fork (EV_A); #endif #if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE if (ev_is_active (&pipe_w)) { /* pipe_write_wanted must be false now, so modifying fd vars should be safe */ ev_ref (EV_A); ev_io_stop (EV_A_ &pipe_w); if (evpipe [0] >= 0) EV_WIN32_CLOSE_FD (evpipe [0]); evpipe_init (EV_A); /* iterate over everything, in case we missed something before */ ev_feed_event (EV_A_ &pipe_w, EV_CUSTOM); } #endif postfork = 0; } #if EV_MULTIPLICITY struct ev_loop * ecb_cold ev_loop_new (unsigned int flags) EV_THROW { EV_P = (struct ev_loop *)ev_malloc (sizeof (struct ev_loop)); memset (EV_A, 0, sizeof (struct ev_loop)); loop_init (EV_A_ flags); if (ev_backend (EV_A)) return EV_A; ev_free (EV_A); return 0; } #endif /* multiplicity */ #if EV_VERIFY static void noinline ecb_cold verify_watcher (EV_P_ W w) { assert (("libev: watcher has invalid priority", ABSPRI (w) >= 0 && ABSPRI (w) < NUMPRI)); if (w->pending) assert (("libev: pending watcher not on pending queue", pendings [ABSPRI (w)][w->pending - 1].w == w)); } static void noinline ecb_cold verify_heap (EV_P_ ANHE *heap, int N) { int i; for (i = HEAP0; i < N + HEAP0; ++i) { assert (("libev: active index mismatch in heap", ev_active (ANHE_w (heap [i])) == i)); assert (("libev: heap condition violated", i == HEAP0 || ANHE_at (heap [HPARENT (i)]) <= ANHE_at (heap [i]))); assert (("libev: heap at cache mismatch", ANHE_at (heap [i]) == ev_at (ANHE_w (heap [i])))); verify_watcher (EV_A_ (W)ANHE_w (heap [i])); } } static void noinline ecb_cold array_verify (EV_P_ W *ws, int cnt) { while (cnt--) { assert (("libev: active index mismatch", ev_active (ws [cnt]) == cnt + 1)); verify_watcher (EV_A_ ws [cnt]); } } #endif #if EV_FEATURE_API void ecb_cold ev_verify (EV_P) EV_THROW { #if EV_VERIFY int i; WL w, w2; assert (activecnt >= -1); assert (fdchangemax >= fdchangecnt); for (i = 0; i < fdchangecnt; ++i) assert (("libev: negative fd in fdchanges", fdchanges [i] >= 0)); assert (anfdmax >= 0); for (i = 0; i < anfdmax; ++i) { int j = 0; for (w = w2 = anfds [i].head; w; w = w->next) { verify_watcher (EV_A_ (W)w); if (j++ & 1) { assert (("libev: io watcher list contains a loop", w != w2)); w2 = w2->next; } assert (("libev: inactive fd watcher on anfd list", ev_active (w) == 1)); assert (("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i)); } } assert (timermax >= timercnt); verify_heap (EV_A_ timers, timercnt); #if EV_PERIODIC_ENABLE assert (periodicmax >= periodiccnt); verify_heap (EV_A_ periodics, periodiccnt); #endif for (i = NUMPRI; i--; ) { assert (pendingmax [i] >= pendingcnt [i]); #if EV_IDLE_ENABLE assert (idleall >= 0); assert (idlemax [i] >= idlecnt [i]); array_verify (EV_A_ (W *)idles [i], idlecnt [i]); #endif } #if EV_FORK_ENABLE assert (forkmax >= forkcnt); array_verify (EV_A_ (W *)forks, forkcnt); #endif #if EV_CLEANUP_ENABLE assert (cleanupmax >= cleanupcnt); array_verify (EV_A_ (W *)cleanups, cleanupcnt); #endif #if EV_ASYNC_ENABLE assert (asyncmax >= asynccnt); array_verify (EV_A_ (W *)asyncs, asynccnt); #endif #if EV_PREPARE_ENABLE assert (preparemax >= preparecnt); array_verify (EV_A_ (W *)prepares, preparecnt); #endif #if EV_CHECK_ENABLE assert (checkmax >= checkcnt); array_verify (EV_A_ (W *)checks, checkcnt); #endif # if 0 #if EV_CHILD_ENABLE for (w = (ev_child *)childs [chain & ((EV_PID_HASHSIZE) - 1)]; w; w = (ev_child *)((WL)w)->next) for (signum = EV_NSIG; signum--; ) if (signals [signum].pending) #endif # endif #endif } #endif #if EV_MULTIPLICITY struct ev_loop * ecb_cold #else int #endif ev_default_loop (unsigned int flags) EV_THROW { if (!ev_default_loop_ptr) { #if EV_MULTIPLICITY EV_P = ev_default_loop_ptr = &default_loop_struct; #else ev_default_loop_ptr = 1; #endif loop_init (EV_A_ flags); if (ev_backend (EV_A)) { #if EV_CHILD_ENABLE ev_signal_init (&childev, childcb, SIGCHLD); ev_set_priority (&childev, EV_MAXPRI); ev_signal_start (EV_A_ &childev); ev_unref (EV_A); /* child watcher should not keep loop alive */ #endif } else ev_default_loop_ptr = 0; } return ev_default_loop_ptr; } void ev_loop_fork (EV_P) EV_THROW { postfork = 1; } /*****************************************************************************/ void ev_invoke (EV_P_ void *w, int revents) { EV_CB_INVOKE ((W)w, revents); } unsigned int ev_pending_count (EV_P) EV_THROW { int pri; unsigned int count = 0; for (pri = NUMPRI; pri--; ) count += pendingcnt [pri]; return count; } void noinline ev_invoke_pending (EV_P) { pendingpri = NUMPRI; while (pendingpri) /* pendingpri possibly gets modified in the inner loop */ { --pendingpri; while (pendingcnt [pendingpri]) { ANPENDING *p = pendings [pendingpri] + --pendingcnt [pendingpri]; p->w->pending = 0; EV_CB_INVOKE (p->w, p->events); EV_FREQUENT_CHECK; } } } #if EV_IDLE_ENABLE /* make idle watchers pending. this handles the "call-idle */ /* only when higher priorities are idle" logic */ inline_size void idle_reify (EV_P) { if (expect_false (idleall)) { int pri; for (pri = NUMPRI; pri--; ) { if (pendingcnt [pri]) break; if (idlecnt [pri]) { queue_events (EV_A_ (W *)idles [pri], idlecnt [pri], EV_IDLE); break; } } } } #endif /* make timers pending */ inline_size void timers_reify (EV_P) { EV_FREQUENT_CHECK; if (timercnt && ANHE_at (timers [HEAP0]) < mn_now) { do { ev_timer *w = (ev_timer *)ANHE_w (timers [HEAP0]); /*assert (("libev: inactive timer on timer heap detected", ev_is_active (w)));*/ /* first reschedule or stop timer */ if (w->repeat) { ev_at (w) += w->repeat; if (ev_at (w) < mn_now) ev_at (w) = mn_now; assert (("libev: negative ev_timer repeat value found while processing timers", w->repeat > 0.)); ANHE_at_cache (timers [HEAP0]); downheap (timers, timercnt, HEAP0); } else ev_timer_stop (EV_A_ w); /* nonrepeating: stop timer */ EV_FREQUENT_CHECK; feed_reverse (EV_A_ (W)w); } while (timercnt && ANHE_at (timers [HEAP0]) < mn_now); feed_reverse_done (EV_A_ EV_TIMER); } } #if EV_PERIODIC_ENABLE static void noinline periodic_recalc (EV_P_ ev_periodic *w) { ev_tstamp interval = w->interval > MIN_INTERVAL ? w->interval : MIN_INTERVAL; ev_tstamp at = w->offset + interval * ev_floor ((ev_rt_now - w->offset) / interval); /* the above almost always errs on the low side */ while (at <= ev_rt_now) { ev_tstamp nat = at + w->interval; /* when resolution fails us, we use ev_rt_now */ if (expect_false (nat == at)) { at = ev_rt_now; break; } at = nat; } ev_at (w) = at; } /* make periodics pending */ inline_size void periodics_reify (EV_P) { EV_FREQUENT_CHECK; while (periodiccnt && ANHE_at (periodics [HEAP0]) < ev_rt_now) { do { ev_periodic *w = (ev_periodic *)ANHE_w (periodics [HEAP0]); /*assert (("libev: inactive timer on periodic heap detected", ev_is_active (w)));*/ /* first reschedule or stop timer */ if (w->reschedule_cb) { ev_at (w) = w->reschedule_cb (w, ev_rt_now); assert (("libev: ev_periodic reschedule callback returned time in the past", ev_at (w) >= ev_rt_now)); ANHE_at_cache (periodics [HEAP0]); downheap (periodics, periodiccnt, HEAP0); } else if (w->interval) { periodic_recalc (EV_A_ w); ANHE_at_cache (periodics [HEAP0]); downheap (periodics, periodiccnt, HEAP0); } else ev_periodic_stop (EV_A_ w); /* nonrepeating: stop timer */ EV_FREQUENT_CHECK; feed_reverse (EV_A_ (W)w); } while (periodiccnt && ANHE_at (periodics [HEAP0]) < ev_rt_now); feed_reverse_done (EV_A_ EV_PERIODIC); } } /* simply recalculate all periodics */ /* TODO: maybe ensure that at least one event happens when jumping forward? */ static void noinline ecb_cold periodics_reschedule (EV_P) { int i; /* adjust periodics after time jump */ for (i = HEAP0; i < periodiccnt + HEAP0; ++i) { ev_periodic *w = (ev_periodic *)ANHE_w (periodics [i]); if (w->reschedule_cb) ev_at (w) = w->reschedule_cb (w, ev_rt_now); else if (w->interval) periodic_recalc (EV_A_ w); ANHE_at_cache (periodics [i]); } reheap (periodics, periodiccnt); } #endif /* adjust all timers by a given offset */ static void noinline ecb_cold timers_reschedule (EV_P_ ev_tstamp adjust) { int i; for (i = 0; i < timercnt; ++i) { ANHE *he = timers + i + HEAP0; ANHE_w (*he)->at += adjust; ANHE_at_cache (*he); } } /* fetch new monotonic and realtime times from the kernel */ /* also detect if there was a timejump, and act accordingly */ inline_speed void time_update (EV_P_ ev_tstamp max_block) { #if EV_USE_MONOTONIC if (expect_true (have_monotonic)) { int i; ev_tstamp odiff = rtmn_diff; mn_now = get_clock (); /* only fetch the realtime clock every 0.5*MIN_TIMEJUMP seconds */ /* interpolate in the meantime */ if (expect_true (mn_now - now_floor < MIN_TIMEJUMP * .5)) { ev_rt_now = rtmn_diff + mn_now; return; } now_floor = mn_now; ev_rt_now = ev_time (); /* loop a few times, before making important decisions. * on the choice of "4": one iteration isn't enough, * in case we get preempted during the calls to * ev_time and get_clock. a second call is almost guaranteed * to succeed in that case, though. and looping a few more times * doesn't hurt either as we only do this on time-jumps or * in the unlikely event of having been preempted here. */ for (i = 4; --i; ) { ev_tstamp diff; rtmn_diff = ev_rt_now - mn_now; diff = odiff - rtmn_diff; if (expect_true ((diff < 0. ? -diff : diff) < MIN_TIMEJUMP)) return; /* all is well */ ev_rt_now = ev_time (); mn_now = get_clock (); now_floor = mn_now; } /* no timer adjustment, as the monotonic clock doesn't jump */ /* timers_reschedule (EV_A_ rtmn_diff - odiff) */ # if EV_PERIODIC_ENABLE periodics_reschedule (EV_A); # endif } else #endif { ev_rt_now = ev_time (); if (expect_false (mn_now > ev_rt_now || ev_rt_now > mn_now + max_block + MIN_TIMEJUMP)) { /* adjust timers. this is easy, as the offset is the same for all of them */ timers_reschedule (EV_A_ ev_rt_now - mn_now); #if EV_PERIODIC_ENABLE periodics_reschedule (EV_A); #endif } mn_now = ev_rt_now; } } int ev_run (EV_P_ int flags) { #if EV_FEATURE_API ++loop_depth; #endif assert (("libev: ev_loop recursion during release detected", loop_done != EVBREAK_RECURSE)); loop_done = EVBREAK_CANCEL; EV_INVOKE_PENDING; /* in case we recurse, ensure ordering stays nice and clean */ do { #if EV_VERIFY >= 2 ev_verify (EV_A); #endif #ifndef _WIN32 if (expect_false (curpid)) /* penalise the forking check even more */ if (expect_false (getpid () != curpid)) { curpid = getpid (); postfork = 1; } #endif #if EV_FORK_ENABLE /* we might have forked, so queue fork handlers */ if (expect_false (postfork)) if (forkcnt) { queue_events (EV_A_ (W *)forks, forkcnt, EV_FORK); EV_INVOKE_PENDING; } #endif #if EV_PREPARE_ENABLE /* queue prepare watchers (and execute them) */ if (expect_false (preparecnt)) { queue_events (EV_A_ (W *)prepares, preparecnt, EV_PREPARE); EV_INVOKE_PENDING; } #endif if (expect_false (loop_done)) break; /* we might have forked, so reify kernel state if necessary */ if (expect_false (postfork)) loop_fork (EV_A); /* update fd-related kernel structures */ fd_reify (EV_A); /* calculate blocking time */ { ev_tstamp waittime = 0.; ev_tstamp sleeptime = 0.; /* remember old timestamp for io_blocktime calculation */ ev_tstamp prev_mn_now = mn_now; /* update time to cancel out callback processing overhead */ time_update (EV_A_ 1e100); /* from now on, we want a pipe-wake-up */ pipe_write_wanted = 1; ECB_MEMORY_FENCE; /* make sure pipe_write_wanted is visible before we check for potential skips */ if (expect_true (!(flags & EVRUN_NOWAIT || idleall || !activecnt || pipe_write_skipped))) { waittime = MAX_BLOCKTIME; if (timercnt) { ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now; if (waittime > to) waittime = to; } #if EV_PERIODIC_ENABLE if (periodiccnt) { ev_tstamp to = ANHE_at (periodics [HEAP0]) - ev_rt_now; if (waittime > to) waittime = to; } #endif /* don't let timeouts decrease the waittime below timeout_blocktime */ if (expect_false (waittime < timeout_blocktime)) waittime = timeout_blocktime; /* at this point, we NEED to wait, so we have to ensure */ /* to pass a minimum nonzero value to the backend */ if (expect_false (waittime < backend_mintime)) waittime = backend_mintime; /* extra check because io_blocktime is commonly 0 */ if (expect_false (io_blocktime)) { sleeptime = io_blocktime - (mn_now - prev_mn_now); if (sleeptime > waittime - backend_mintime) sleeptime = waittime - backend_mintime; if (expect_true (sleeptime > 0.)) { ev_sleep (sleeptime); waittime -= sleeptime; } } } #if EV_FEATURE_API ++loop_count; #endif assert ((loop_done = EVBREAK_RECURSE, 1)); /* assert for side effect */ backend_poll (EV_A_ waittime); assert ((loop_done = EVBREAK_CANCEL, 1)); /* assert for side effect */ pipe_write_wanted = 0; /* just an optimisation, no fence needed */ ECB_MEMORY_FENCE_ACQUIRE; if (pipe_write_skipped) { assert (("libev: pipe_w not active, but pipe not written", ev_is_active (&pipe_w))); ev_feed_event (EV_A_ &pipe_w, EV_CUSTOM); } /* update ev_rt_now, do magic */ time_update (EV_A_ waittime + sleeptime); } /* queue pending timers and reschedule them */ timers_reify (EV_A); /* relative timers called last */ #if EV_PERIODIC_ENABLE periodics_reify (EV_A); /* absolute timers called first */ #endif #if EV_IDLE_ENABLE /* queue idle watchers unless other events are pending */ idle_reify (EV_A); #endif #if EV_CHECK_ENABLE /* queue check watchers, to be executed first */ if (expect_false (checkcnt)) queue_events (EV_A_ (W *)checks, checkcnt, EV_CHECK); #endif EV_INVOKE_PENDING; } while (expect_true ( activecnt && !loop_done && !(flags & (EVRUN_ONCE | EVRUN_NOWAIT)) )); if (loop_done == EVBREAK_ONE) loop_done = EVBREAK_CANCEL; #if EV_FEATURE_API --loop_depth; #endif return activecnt; } void ev_break (EV_P_ int how) EV_THROW { loop_done = how; } void ev_ref (EV_P) EV_THROW { ++activecnt; } void ev_unref (EV_P) EV_THROW { --activecnt; } void ev_now_update (EV_P) EV_THROW { time_update (EV_A_ 1e100); } void ev_suspend (EV_P) EV_THROW { ev_now_update (EV_A); } void ev_resume (EV_P) EV_THROW { ev_tstamp mn_prev = mn_now; ev_now_update (EV_A); timers_reschedule (EV_A_ mn_now - mn_prev); #if EV_PERIODIC_ENABLE /* TODO: really do this? */ periodics_reschedule (EV_A); #endif } /*****************************************************************************/ /* singly-linked list management, used when the expected list length is short */ inline_size void wlist_add (WL *head, WL elem) { elem->next = *head; *head = elem; } inline_size void wlist_del (WL *head, WL elem) { while (*head) { if (expect_true (*head == elem)) { *head = elem->next; break; } head = &(*head)->next; } } /* internal, faster, version of ev_clear_pending */ inline_speed void clear_pending (EV_P_ W w) { if (w->pending) { pendings [ABSPRI (w)][w->pending - 1].w = (W)&pending_w; w->pending = 0; } } int ev_clear_pending (EV_P_ void *w) EV_THROW { W w_ = (W)w; int pending = w_->pending; if (expect_true (pending)) { ANPENDING *p = pendings [ABSPRI (w_)] + pending - 1; p->w = (W)&pending_w; w_->pending = 0; return p->events; } else return 0; } inline_size void pri_adjust (EV_P_ W w) { int pri = ev_priority (w); pri = pri < EV_MINPRI ? EV_MINPRI : pri; pri = pri > EV_MAXPRI ? EV_MAXPRI : pri; ev_set_priority (w, pri); } inline_speed void ev_start (EV_P_ W w, int active) { pri_adjust (EV_A_ w); w->active = active; ev_ref (EV_A); } inline_size void ev_stop (EV_P_ W w) { ev_unref (EV_A); w->active = 0; } /*****************************************************************************/ void noinline ev_io_start (EV_P_ ev_io *w) EV_THROW { int fd = w->fd; if (expect_false (ev_is_active (w))) return; assert (("libev: ev_io_start called with negative fd", fd >= 0)); assert (("libev: ev_io_start called with illegal event mask", !(w->events & ~(EV__IOFDSET | EV_READ | EV_WRITE)))); EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, 1); array_needsize (ANFD, anfds, anfdmax, fd + 1, array_init_zero); wlist_add (&anfds[fd].head, (WL)w); /* common bug, apparently */ assert (("libev: ev_io_start called with corrupted watcher", ((WL)w)->next != (WL)w)); fd_change (EV_A_ fd, w->events & EV__IOFDSET | EV_ANFD_REIFY); w->events &= ~EV__IOFDSET; EV_FREQUENT_CHECK; } void noinline ev_io_stop (EV_P_ ev_io *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; assert (("libev: ev_io_stop called with illegal fd (must stay constant after start!)", w->fd >= 0 && w->fd < anfdmax)); EV_FREQUENT_CHECK; wlist_del (&anfds[w->fd].head, (WL)w); ev_stop (EV_A_ (W)w); fd_change (EV_A_ w->fd, EV_ANFD_REIFY); EV_FREQUENT_CHECK; } void noinline ev_timer_start (EV_P_ ev_timer *w) EV_THROW { if (expect_false (ev_is_active (w))) return; ev_at (w) += mn_now; assert (("libev: ev_timer_start called with negative timer repeat value", w->repeat >= 0.)); EV_FREQUENT_CHECK; ++timercnt; ev_start (EV_A_ (W)w, timercnt + HEAP0 - 1); array_needsize (ANHE, timers, timermax, ev_active (w) + 1, EMPTY2); ANHE_w (timers [ev_active (w)]) = (WT)w; ANHE_at_cache (timers [ev_active (w)]); upheap (timers, ev_active (w)); EV_FREQUENT_CHECK; /*assert (("libev: internal timer heap corruption", timers [ev_active (w)] == (WT)w));*/ } void noinline ev_timer_stop (EV_P_ ev_timer *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); assert (("libev: internal timer heap corruption", ANHE_w (timers [active]) == (WT)w)); --timercnt; if (expect_true (active < timercnt + HEAP0)) { timers [active] = timers [timercnt + HEAP0]; adjustheap (timers, timercnt, active); } } ev_at (w) -= mn_now; ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } void noinline ev_timer_again (EV_P_ ev_timer *w) EV_THROW { EV_FREQUENT_CHECK; clear_pending (EV_A_ (W)w); if (ev_is_active (w)) { if (w->repeat) { ev_at (w) = mn_now + w->repeat; ANHE_at_cache (timers [ev_active (w)]); adjustheap (timers, timercnt, ev_active (w)); } else ev_timer_stop (EV_A_ w); } else if (w->repeat) { ev_at (w) = w->repeat; ev_timer_start (EV_A_ w); } EV_FREQUENT_CHECK; } ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW { return ev_at (w) - (ev_is_active (w) ? mn_now : 0.); } #if EV_PERIODIC_ENABLE void noinline ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW { if (expect_false (ev_is_active (w))) return; if (w->reschedule_cb) ev_at (w) = w->reschedule_cb (w, ev_rt_now); else if (w->interval) { assert (("libev: ev_periodic_start called with negative interval value", w->interval >= 0.)); periodic_recalc (EV_A_ w); } else ev_at (w) = w->offset; EV_FREQUENT_CHECK; ++periodiccnt; ev_start (EV_A_ (W)w, periodiccnt + HEAP0 - 1); array_needsize (ANHE, periodics, periodicmax, ev_active (w) + 1, EMPTY2); ANHE_w (periodics [ev_active (w)]) = (WT)w; ANHE_at_cache (periodics [ev_active (w)]); upheap (periodics, ev_active (w)); EV_FREQUENT_CHECK; /*assert (("libev: internal periodic heap corruption", ANHE_w (periodics [ev_active (w)]) == (WT)w));*/ } void noinline ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); assert (("libev: internal periodic heap corruption", ANHE_w (periodics [active]) == (WT)w)); --periodiccnt; if (expect_true (active < periodiccnt + HEAP0)) { periodics [active] = periodics [periodiccnt + HEAP0]; adjustheap (periodics, periodiccnt, active); } } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } void noinline ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW { /* TODO: use adjustheap and recalculation */ ev_periodic_stop (EV_A_ w); ev_periodic_start (EV_A_ w); } #endif #ifndef SA_RESTART # define SA_RESTART 0 #endif #if EV_SIGNAL_ENABLE void noinline ev_signal_start (EV_P_ ev_signal *w) EV_THROW { if (expect_false (ev_is_active (w))) return; assert (("libev: ev_signal_start called with illegal signal number", w->signum > 0 && w->signum < EV_NSIG)); #if EV_MULTIPLICITY assert (("libev: a signal must not be attached to two different loops", !signals [w->signum - 1].loop || signals [w->signum - 1].loop == loop)); signals [w->signum - 1].loop = EV_A; ECB_MEMORY_FENCE_RELEASE; #endif EV_FREQUENT_CHECK; #if EV_USE_SIGNALFD if (sigfd == -2) { sigfd = signalfd (-1, &sigfd_set, SFD_NONBLOCK | SFD_CLOEXEC); if (sigfd < 0 && errno == EINVAL) sigfd = signalfd (-1, &sigfd_set, 0); /* retry without flags */ if (sigfd >= 0) { fd_intern (sigfd); /* doing it twice will not hurt */ sigemptyset (&sigfd_set); ev_io_init (&sigfd_w, sigfdcb, sigfd, EV_READ); ev_set_priority (&sigfd_w, EV_MAXPRI); ev_io_start (EV_A_ &sigfd_w); ev_unref (EV_A); /* signalfd watcher should not keep loop alive */ } } if (sigfd >= 0) { /* TODO: check .head */ sigaddset (&sigfd_set, w->signum); sigprocmask (SIG_BLOCK, &sigfd_set, 0); signalfd (sigfd, &sigfd_set, 0); } #endif ev_start (EV_A_ (W)w, 1); wlist_add (&signals [w->signum - 1].head, (WL)w); if (!((WL)w)->next) # if EV_USE_SIGNALFD if (sigfd < 0) /*TODO*/ # endif { # ifdef _WIN32 evpipe_init (EV_A); signal (w->signum, ev_sighandler); # else struct sigaction sa; evpipe_init (EV_A); sa.sa_handler = ev_sighandler; sigfillset (&sa.sa_mask); sa.sa_flags = SA_RESTART; /* if restarting works we save one iteration */ sigaction (w->signum, &sa, 0); if (origflags & EVFLAG_NOSIGMASK) { sigemptyset (&sa.sa_mask); sigaddset (&sa.sa_mask, w->signum); sigprocmask (SIG_UNBLOCK, &sa.sa_mask, 0); } #endif } EV_FREQUENT_CHECK; } void noinline ev_signal_stop (EV_P_ ev_signal *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; wlist_del (&signals [w->signum - 1].head, (WL)w); ev_stop (EV_A_ (W)w); if (!signals [w->signum - 1].head) { #if EV_MULTIPLICITY signals [w->signum - 1].loop = 0; /* unattach from signal */ #endif #if EV_USE_SIGNALFD if (sigfd >= 0) { sigset_t ss; sigemptyset (&ss); sigaddset (&ss, w->signum); sigdelset (&sigfd_set, w->signum); signalfd (sigfd, &sigfd_set, 0); sigprocmask (SIG_UNBLOCK, &ss, 0); } else #endif signal (w->signum, SIG_DFL); } EV_FREQUENT_CHECK; } #endif #if EV_CHILD_ENABLE void ev_child_start (EV_P_ ev_child *w) EV_THROW { #if EV_MULTIPLICITY assert (("libev: child watchers are only supported in the default loop", loop == ev_default_loop_ptr)); #endif if (expect_false (ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, 1); wlist_add (&childs [w->pid & ((EV_PID_HASHSIZE) - 1)], (WL)w); EV_FREQUENT_CHECK; } void ev_child_stop (EV_P_ ev_child *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; wlist_del (&childs [w->pid & ((EV_PID_HASHSIZE) - 1)], (WL)w); ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_STAT_ENABLE # ifdef _WIN32 # undef lstat # define lstat(a,b) _stati64 (a,b) # endif #define DEF_STAT_INTERVAL 5.0074891 #define NFS_STAT_INTERVAL 30.1074891 /* for filesystems potentially failing inotify */ #define MIN_STAT_INTERVAL 0.1074891 static void noinline stat_timer_cb (EV_P_ ev_timer *w_, int revents); #if EV_USE_INOTIFY /* the * 2 is to allow for alignment padding, which for some reason is >> 8 */ # define EV_INOTIFY_BUFSIZE (sizeof (struct inotify_event) * 2 + NAME_MAX) static void noinline infy_add (EV_P_ ev_stat *w) { w->wd = inotify_add_watch (fs_fd, w->path, IN_ATTRIB | IN_DELETE_SELF | IN_MOVE_SELF | IN_MODIFY | IN_CREATE | IN_DELETE | IN_MOVED_FROM | IN_MOVED_TO | IN_DONT_FOLLOW | IN_MASK_ADD); if (w->wd >= 0) { struct statfs sfs; /* now local changes will be tracked by inotify, but remote changes won't */ /* unless the filesystem is known to be local, we therefore still poll */ /* also do poll on <2.6.25, but with normal frequency */ if (!fs_2625) w->timer.repeat = w->interval ? w->interval : DEF_STAT_INTERVAL; else if (!statfs (w->path, &sfs) && (sfs.f_type == 0x1373 /* devfs */ || sfs.f_type == 0x4006 /* fat */ || sfs.f_type == 0x4d44 /* msdos */ || sfs.f_type == 0xEF53 /* ext2/3 */ || sfs.f_type == 0x72b6 /* jffs2 */ || sfs.f_type == 0x858458f6 /* ramfs */ || sfs.f_type == 0x5346544e /* ntfs */ || sfs.f_type == 0x3153464a /* jfs */ || sfs.f_type == 0x9123683e /* btrfs */ || sfs.f_type == 0x52654973 /* reiser3 */ || sfs.f_type == 0x01021994 /* tmpfs */ || sfs.f_type == 0x58465342 /* xfs */)) w->timer.repeat = 0.; /* filesystem is local, kernel new enough */ else w->timer.repeat = w->interval ? w->interval : NFS_STAT_INTERVAL; /* remote, use reduced frequency */ } else { /* can't use inotify, continue to stat */ w->timer.repeat = w->interval ? w->interval : DEF_STAT_INTERVAL; /* if path is not there, monitor some parent directory for speedup hints */ /* note that exceeding the hardcoded path limit is not a correctness issue, */ /* but an efficiency issue only */ if ((errno == ENOENT || errno == EACCES) && strlen (w->path) < 4096) { char path [4096]; strcpy (path, w->path); do { int mask = IN_MASK_ADD | IN_DELETE_SELF | IN_MOVE_SELF | (errno == EACCES ? IN_ATTRIB : IN_CREATE | IN_MOVED_TO); char *pend = strrchr (path, '/'); if (!pend || pend == path) break; *pend = 0; w->wd = inotify_add_watch (fs_fd, path, mask); } while (w->wd < 0 && (errno == ENOENT || errno == EACCES)); } } if (w->wd >= 0) wlist_add (&fs_hash [w->wd & ((EV_INOTIFY_HASHSIZE) - 1)].head, (WL)w); /* now re-arm timer, if required */ if (ev_is_active (&w->timer)) ev_ref (EV_A); ev_timer_again (EV_A_ &w->timer); if (ev_is_active (&w->timer)) ev_unref (EV_A); } static void noinline infy_del (EV_P_ ev_stat *w) { int slot; int wd = w->wd; if (wd < 0) return; w->wd = -2; slot = wd & ((EV_INOTIFY_HASHSIZE) - 1); wlist_del (&fs_hash [slot].head, (WL)w); /* remove this watcher, if others are watching it, they will rearm */ inotify_rm_watch (fs_fd, wd); } static void noinline infy_wd (EV_P_ int slot, int wd, struct inotify_event *ev) { if (slot < 0) /* overflow, need to check for all hash slots */ for (slot = 0; slot < (EV_INOTIFY_HASHSIZE); ++slot) infy_wd (EV_A_ slot, wd, ev); else { WL w_; for (w_ = fs_hash [slot & ((EV_INOTIFY_HASHSIZE) - 1)].head; w_; ) { ev_stat *w = (ev_stat *)w_; w_ = w_->next; /* lets us remove this watcher and all before it */ if (w->wd == wd || wd == -1) { if (ev->mask & (IN_IGNORED | IN_UNMOUNT | IN_DELETE_SELF)) { wlist_del (&fs_hash [slot & ((EV_INOTIFY_HASHSIZE) - 1)].head, (WL)w); w->wd = -1; infy_add (EV_A_ w); /* re-add, no matter what */ } stat_timer_cb (EV_A_ &w->timer, 0); } } } } static void infy_cb (EV_P_ ev_io *w, int revents) { char buf [EV_INOTIFY_BUFSIZE]; int ofs; int len = read (fs_fd, buf, sizeof (buf)); for (ofs = 0; ofs < len; ) { struct inotify_event *ev = (struct inotify_event *)(buf + ofs); infy_wd (EV_A_ ev->wd, ev->wd, ev); ofs += sizeof (struct inotify_event) + ev->len; } } inline_size void ecb_cold ev_check_2625 (EV_P) { /* kernels < 2.6.25 are borked * http://www.ussg.indiana.edu/hypermail/linux/kernel/0711.3/1208.html */ if (ev_linux_version () < 0x020619) return; fs_2625 = 1; } inline_size int infy_newfd (void) { #if defined IN_CLOEXEC && defined IN_NONBLOCK int fd = inotify_init1 (IN_CLOEXEC | IN_NONBLOCK); if (fd >= 0) return fd; #endif return inotify_init (); } inline_size void infy_init (EV_P) { if (fs_fd != -2) return; fs_fd = -1; ev_check_2625 (EV_A); fs_fd = infy_newfd (); if (fs_fd >= 0) { fd_intern (fs_fd); ev_io_init (&fs_w, infy_cb, fs_fd, EV_READ); ev_set_priority (&fs_w, EV_MAXPRI); ev_io_start (EV_A_ &fs_w); ev_unref (EV_A); } } inline_size void infy_fork (EV_P) { int slot; if (fs_fd < 0) return; ev_ref (EV_A); ev_io_stop (EV_A_ &fs_w); close (fs_fd); fs_fd = infy_newfd (); if (fs_fd >= 0) { fd_intern (fs_fd); ev_io_set (&fs_w, fs_fd, EV_READ); ev_io_start (EV_A_ &fs_w); ev_unref (EV_A); } for (slot = 0; slot < (EV_INOTIFY_HASHSIZE); ++slot) { WL w_ = fs_hash [slot].head; fs_hash [slot].head = 0; while (w_) { ev_stat *w = (ev_stat *)w_; w_ = w_->next; /* lets us add this watcher */ w->wd = -1; if (fs_fd >= 0) infy_add (EV_A_ w); /* re-add, no matter what */ else { w->timer.repeat = w->interval ? w->interval : DEF_STAT_INTERVAL; if (ev_is_active (&w->timer)) ev_ref (EV_A); ev_timer_again (EV_A_ &w->timer); if (ev_is_active (&w->timer)) ev_unref (EV_A); } } } } #endif #ifdef _WIN32 # define EV_LSTAT(p,b) _stati64 (p, b) #else # define EV_LSTAT(p,b) lstat (p, b) #endif void ev_stat_stat (EV_P_ ev_stat *w) EV_THROW { if (lstat (w->path, &w->attr) < 0) w->attr.st_nlink = 0; else if (!w->attr.st_nlink) w->attr.st_nlink = 1; } static void noinline stat_timer_cb (EV_P_ ev_timer *w_, int revents) { ev_stat *w = (ev_stat *)(((char *)w_) - offsetof (ev_stat, timer)); ev_statdata prev = w->attr; ev_stat_stat (EV_A_ w); /* memcmp doesn't work on netbsd, they.... do stuff to their struct stat */ if ( prev.st_dev != w->attr.st_dev || prev.st_ino != w->attr.st_ino || prev.st_mode != w->attr.st_mode || prev.st_nlink != w->attr.st_nlink || prev.st_uid != w->attr.st_uid || prev.st_gid != w->attr.st_gid || prev.st_rdev != w->attr.st_rdev || prev.st_size != w->attr.st_size || prev.st_atime != w->attr.st_atime || prev.st_mtime != w->attr.st_mtime || prev.st_ctime != w->attr.st_ctime ) { /* we only update w->prev on actual differences */ /* in case we test more often than invoke the callback, */ /* to ensure that prev is always different to attr */ w->prev = prev; #if EV_USE_INOTIFY if (fs_fd >= 0) { infy_del (EV_A_ w); infy_add (EV_A_ w); ev_stat_stat (EV_A_ w); /* avoid race... */ } #endif ev_feed_event (EV_A_ w, EV_STAT); } } void ev_stat_start (EV_P_ ev_stat *w) EV_THROW { if (expect_false (ev_is_active (w))) return; ev_stat_stat (EV_A_ w); if (w->interval < MIN_STAT_INTERVAL && w->interval) w->interval = MIN_STAT_INTERVAL; ev_timer_init (&w->timer, stat_timer_cb, 0., w->interval ? w->interval : DEF_STAT_INTERVAL); ev_set_priority (&w->timer, ev_priority (w)); #if EV_USE_INOTIFY infy_init (EV_A); if (fs_fd >= 0) infy_add (EV_A_ w); else #endif { ev_timer_again (EV_A_ &w->timer); ev_unref (EV_A); } ev_start (EV_A_ (W)w, 1); EV_FREQUENT_CHECK; } void ev_stat_stop (EV_P_ ev_stat *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; #if EV_USE_INOTIFY infy_del (EV_A_ w); #endif if (ev_is_active (&w->timer)) { ev_ref (EV_A); ev_timer_stop (EV_A_ &w->timer); } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_IDLE_ENABLE void ev_idle_start (EV_P_ ev_idle *w) EV_THROW { if (expect_false (ev_is_active (w))) return; pri_adjust (EV_A_ (W)w); EV_FREQUENT_CHECK; { int active = ++idlecnt [ABSPRI (w)]; ++idleall; ev_start (EV_A_ (W)w, active); array_needsize (ev_idle *, idles [ABSPRI (w)], idlemax [ABSPRI (w)], active, EMPTY2); idles [ABSPRI (w)][active - 1] = w; } EV_FREQUENT_CHECK; } void ev_idle_stop (EV_P_ ev_idle *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); idles [ABSPRI (w)][active - 1] = idles [ABSPRI (w)][--idlecnt [ABSPRI (w)]]; ev_active (idles [ABSPRI (w)][active - 1]) = active; ev_stop (EV_A_ (W)w); --idleall; } EV_FREQUENT_CHECK; } #endif #if EV_PREPARE_ENABLE void ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW { if (expect_false (ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, ++preparecnt); array_needsize (ev_prepare *, prepares, preparemax, preparecnt, EMPTY2); prepares [preparecnt - 1] = w; EV_FREQUENT_CHECK; } void ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); prepares [active - 1] = prepares [--preparecnt]; ev_active (prepares [active - 1]) = active; } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_CHECK_ENABLE void ev_check_start (EV_P_ ev_check *w) EV_THROW { if (expect_false (ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, ++checkcnt); array_needsize (ev_check *, checks, checkmax, checkcnt, EMPTY2); checks [checkcnt - 1] = w; EV_FREQUENT_CHECK; } void ev_check_stop (EV_P_ ev_check *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); checks [active - 1] = checks [--checkcnt]; ev_active (checks [active - 1]) = active; } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_EMBED_ENABLE void noinline ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW { ev_run (w->other, EVRUN_NOWAIT); } static void embed_io_cb (EV_P_ ev_io *io, int revents) { ev_embed *w = (ev_embed *)(((char *)io) - offsetof (ev_embed, io)); if (ev_cb (w)) ev_feed_event (EV_A_ (W)w, EV_EMBED); else ev_run (w->other, EVRUN_NOWAIT); } static void embed_prepare_cb (EV_P_ ev_prepare *prepare, int revents) { ev_embed *w = (ev_embed *)(((char *)prepare) - offsetof (ev_embed, prepare)); { EV_P = w->other; while (fdchangecnt) { fd_reify (EV_A); ev_run (EV_A_ EVRUN_NOWAIT); } } } static void embed_fork_cb (EV_P_ ev_fork *fork_w, int revents) { ev_embed *w = (ev_embed *)(((char *)fork_w) - offsetof (ev_embed, fork)); ev_embed_stop (EV_A_ w); { EV_P = w->other; ev_loop_fork (EV_A); ev_run (EV_A_ EVRUN_NOWAIT); } ev_embed_start (EV_A_ w); } #if 0 static void embed_idle_cb (EV_P_ ev_idle *idle, int revents) { ev_idle_stop (EV_A_ idle); } #endif void ev_embed_start (EV_P_ ev_embed *w) EV_THROW { if (expect_false (ev_is_active (w))) return; { EV_P = w->other; assert (("libev: loop to be embedded is not embeddable", backend & ev_embeddable_backends ())); ev_io_init (&w->io, embed_io_cb, backend_fd, EV_READ); } EV_FREQUENT_CHECK; ev_set_priority (&w->io, ev_priority (w)); ev_io_start (EV_A_ &w->io); ev_prepare_init (&w->prepare, embed_prepare_cb); ev_set_priority (&w->prepare, EV_MINPRI); ev_prepare_start (EV_A_ &w->prepare); ev_fork_init (&w->fork, embed_fork_cb); ev_fork_start (EV_A_ &w->fork); /*ev_idle_init (&w->idle, e,bed_idle_cb);*/ ev_start (EV_A_ (W)w, 1); EV_FREQUENT_CHECK; } void ev_embed_stop (EV_P_ ev_embed *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_io_stop (EV_A_ &w->io); ev_prepare_stop (EV_A_ &w->prepare); ev_fork_stop (EV_A_ &w->fork); ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_FORK_ENABLE void ev_fork_start (EV_P_ ev_fork *w) EV_THROW { if (expect_false (ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, ++forkcnt); array_needsize (ev_fork *, forks, forkmax, forkcnt, EMPTY2); forks [forkcnt - 1] = w; EV_FREQUENT_CHECK; } void ev_fork_stop (EV_P_ ev_fork *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); forks [active - 1] = forks [--forkcnt]; ev_active (forks [active - 1]) = active; } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_CLEANUP_ENABLE void ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW { if (expect_false (ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, ++cleanupcnt); array_needsize (ev_cleanup *, cleanups, cleanupmax, cleanupcnt, EMPTY2); cleanups [cleanupcnt - 1] = w; /* cleanup watchers should never keep a refcount on the loop */ ev_unref (EV_A); EV_FREQUENT_CHECK; } void ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; ev_ref (EV_A); { int active = ev_active (w); cleanups [active - 1] = cleanups [--cleanupcnt]; ev_active (cleanups [active - 1]) = active; } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } #endif #if EV_ASYNC_ENABLE void ev_async_start (EV_P_ ev_async *w) EV_THROW { if (expect_false (ev_is_active (w))) return; w->sent = 0; evpipe_init (EV_A); EV_FREQUENT_CHECK; ev_start (EV_A_ (W)w, ++asynccnt); array_needsize (ev_async *, asyncs, asyncmax, asynccnt, EMPTY2); asyncs [asynccnt - 1] = w; EV_FREQUENT_CHECK; } void ev_async_stop (EV_P_ ev_async *w) EV_THROW { clear_pending (EV_A_ (W)w); if (expect_false (!ev_is_active (w))) return; EV_FREQUENT_CHECK; { int active = ev_active (w); asyncs [active - 1] = asyncs [--asynccnt]; ev_active (asyncs [active - 1]) = active; } ev_stop (EV_A_ (W)w); EV_FREQUENT_CHECK; } void ev_async_send (EV_P_ ev_async *w) EV_THROW { w->sent = 1; evpipe_write (EV_A_ &async_pending); } #endif /*****************************************************************************/ struct ev_once { ev_io io; ev_timer to; void (*cb)(int revents, void *arg); void *arg; }; static void once_cb (EV_P_ struct ev_once *once, int revents) { void (*cb)(int revents, void *arg) = once->cb; void *arg = once->arg; ev_io_stop (EV_A_ &once->io); ev_timer_stop (EV_A_ &once->to); ev_free (once); cb (revents, arg); } static void once_cb_io (EV_P_ ev_io *w, int revents) { struct ev_once *once = (struct ev_once *)(((char *)w) - offsetof (struct ev_once, io)); once_cb (EV_A_ once, revents | ev_clear_pending (EV_A_ &once->to)); } static void once_cb_to (EV_P_ ev_timer *w, int revents) { struct ev_once *once = (struct ev_once *)(((char *)w) - offsetof (struct ev_once, to)); once_cb (EV_A_ once, revents | ev_clear_pending (EV_A_ &once->io)); } void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_THROW { struct ev_once *once = (struct ev_once *)ev_malloc (sizeof (struct ev_once)); if (expect_false (!once)) { cb (EV_ERROR | EV_READ | EV_WRITE | EV_TIMER, arg); return; } once->cb = cb; once->arg = arg; ev_init (&once->io, once_cb_io); if (fd >= 0) { ev_io_set (&once->io, fd, events); ev_io_start (EV_A_ &once->io); } ev_init (&once->to, once_cb_to); if (timeout >= 0.) { ev_timer_set (&once->to, timeout, 0.); ev_timer_start (EV_A_ &once->to); } } /*****************************************************************************/ #if EV_WALK_ENABLE void ecb_cold ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW { int i, j; ev_watcher_list *wl, *wn; if (types & (EV_IO | EV_EMBED)) for (i = 0; i < anfdmax; ++i) for (wl = anfds [i].head; wl; ) { wn = wl->next; #if EV_EMBED_ENABLE if (ev_cb ((ev_io *)wl) == embed_io_cb) { if (types & EV_EMBED) cb (EV_A_ EV_EMBED, ((char *)wl) - offsetof (struct ev_embed, io)); } else #endif #if EV_USE_INOTIFY if (ev_cb ((ev_io *)wl) == infy_cb) ; else #endif if ((ev_io *)wl != &pipe_w) if (types & EV_IO) cb (EV_A_ EV_IO, wl); wl = wn; } if (types & (EV_TIMER | EV_STAT)) for (i = timercnt + HEAP0; i-- > HEAP0; ) #if EV_STAT_ENABLE /*TODO: timer is not always active*/ if (ev_cb ((ev_timer *)ANHE_w (timers [i])) == stat_timer_cb) { if (types & EV_STAT) cb (EV_A_ EV_STAT, ((char *)ANHE_w (timers [i])) - offsetof (struct ev_stat, timer)); } else #endif if (types & EV_TIMER) cb (EV_A_ EV_TIMER, ANHE_w (timers [i])); #if EV_PERIODIC_ENABLE if (types & EV_PERIODIC) for (i = periodiccnt + HEAP0; i-- > HEAP0; ) cb (EV_A_ EV_PERIODIC, ANHE_w (periodics [i])); #endif #if EV_IDLE_ENABLE if (types & EV_IDLE) for (j = NUMPRI; j--; ) for (i = idlecnt [j]; i--; ) cb (EV_A_ EV_IDLE, idles [j][i]); #endif #if EV_FORK_ENABLE if (types & EV_FORK) for (i = forkcnt; i--; ) if (ev_cb (forks [i]) != embed_fork_cb) cb (EV_A_ EV_FORK, forks [i]); #endif #if EV_ASYNC_ENABLE if (types & EV_ASYNC) for (i = asynccnt; i--; ) cb (EV_A_ EV_ASYNC, asyncs [i]); #endif #if EV_PREPARE_ENABLE if (types & EV_PREPARE) for (i = preparecnt; i--; ) # if EV_EMBED_ENABLE if (ev_cb (prepares [i]) != embed_prepare_cb) # endif cb (EV_A_ EV_PREPARE, prepares [i]); #endif #if EV_CHECK_ENABLE if (types & EV_CHECK) for (i = checkcnt; i--; ) cb (EV_A_ EV_CHECK, checks [i]); #endif #if EV_SIGNAL_ENABLE if (types & EV_SIGNAL) for (i = 0; i < EV_NSIG - 1; ++i) for (wl = signals [i].head; wl; ) { wn = wl->next; cb (EV_A_ EV_SIGNAL, wl); wl = wn; } #endif #if EV_CHILD_ENABLE if (types & EV_CHILD) for (i = (EV_PID_HASHSIZE); i--; ) for (wl = childs [i]; wl; ) { wn = wl->next; cb (EV_A_ EV_CHILD, wl); wl = wn; } #endif /* EV_STAT 0x00001000 /* stat data changed */ /* EV_EMBED 0x00010000 /* embedded event loop needs sweep */ } #endif #if EV_MULTIPLICITY #include "ev_wrap.h" #endif passenger-4.0.37/ext/libev/ev.h000644 000765 000024 00000070433 12233035540 016707 0ustar00honglistaff000000 000000 /* * libev native API header * * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #ifndef EV_H_ #define EV_H_ #ifdef __cplusplus # define EV_CPP(x) x #else # define EV_CPP(x) #endif #define EV_THROW EV_CPP(throw()) EV_CPP(extern "C" {) /*****************************************************************************/ /* pre-4.0 compatibility */ #ifndef EV_COMPAT3 # define EV_COMPAT3 1 #endif #ifndef EV_FEATURES # if defined __OPTIMIZE_SIZE__ # define EV_FEATURES 0x7c # else # define EV_FEATURES 0x7f # endif #endif #define EV_FEATURE_CODE ((EV_FEATURES) & 1) #define EV_FEATURE_DATA ((EV_FEATURES) & 2) #define EV_FEATURE_CONFIG ((EV_FEATURES) & 4) #define EV_FEATURE_API ((EV_FEATURES) & 8) #define EV_FEATURE_WATCHERS ((EV_FEATURES) & 16) #define EV_FEATURE_BACKENDS ((EV_FEATURES) & 32) #define EV_FEATURE_OS ((EV_FEATURES) & 64) /* these priorities are inclusive, higher priorities will be invoked earlier */ #ifndef EV_MINPRI # define EV_MINPRI (EV_FEATURE_CONFIG ? -2 : 0) #endif #ifndef EV_MAXPRI # define EV_MAXPRI (EV_FEATURE_CONFIG ? +2 : 0) #endif #ifndef EV_MULTIPLICITY # define EV_MULTIPLICITY EV_FEATURE_CONFIG #endif #ifndef EV_PERIODIC_ENABLE # define EV_PERIODIC_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_STAT_ENABLE # define EV_STAT_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_PREPARE_ENABLE # define EV_PREPARE_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_CHECK_ENABLE # define EV_CHECK_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_IDLE_ENABLE # define EV_IDLE_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_FORK_ENABLE # define EV_FORK_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_CLEANUP_ENABLE # define EV_CLEANUP_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_SIGNAL_ENABLE # define EV_SIGNAL_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_CHILD_ENABLE # ifdef _WIN32 # define EV_CHILD_ENABLE 0 # else # define EV_CHILD_ENABLE EV_FEATURE_WATCHERS #endif #endif #ifndef EV_ASYNC_ENABLE # define EV_ASYNC_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_EMBED_ENABLE # define EV_EMBED_ENABLE EV_FEATURE_WATCHERS #endif #ifndef EV_WALK_ENABLE # define EV_WALK_ENABLE 0 /* not yet */ #endif /*****************************************************************************/ #if EV_CHILD_ENABLE && !EV_SIGNAL_ENABLE # undef EV_SIGNAL_ENABLE # define EV_SIGNAL_ENABLE 1 #endif /*****************************************************************************/ typedef double ev_tstamp; #ifndef EV_ATOMIC_T # include # define EV_ATOMIC_T sig_atomic_t volatile #endif #if EV_STAT_ENABLE # ifdef _WIN32 # include # include # endif # include #endif /* support multiple event loops? */ #if EV_MULTIPLICITY struct ev_loop; # define EV_P struct ev_loop *loop /* a loop as sole parameter in a declaration */ # define EV_P_ EV_P, /* a loop as first of multiple parameters */ # define EV_A loop /* a loop as sole argument to a function call */ # define EV_A_ EV_A, /* a loop as first of multiple arguments */ # define EV_DEFAULT_UC ev_default_loop_uc_ () /* the default loop, if initialised, as sole arg */ # define EV_DEFAULT_UC_ EV_DEFAULT_UC, /* the default loop as first of multiple arguments */ # define EV_DEFAULT ev_default_loop (0) /* the default loop as sole arg */ # define EV_DEFAULT_ EV_DEFAULT, /* the default loop as first of multiple arguments */ #else # define EV_P void # define EV_P_ # define EV_A # define EV_A_ # define EV_DEFAULT # define EV_DEFAULT_ # define EV_DEFAULT_UC # define EV_DEFAULT_UC_ # undef EV_EMBED_ENABLE #endif /* EV_INLINE is used for functions in header files */ #if __STDC_VERSION__ >= 199901L || __GNUC__ >= 3 # define EV_INLINE static inline #else # define EV_INLINE static #endif #ifdef EV_API_STATIC # define EV_API_DECL static #else # define EV_API_DECL extern #endif /* EV_PROTOTYPES can be used to switch of prototype declarations */ #ifndef EV_PROTOTYPES # define EV_PROTOTYPES 1 #endif /*****************************************************************************/ #define EV_VERSION_MAJOR 4 #define EV_VERSION_MINOR 15 /* eventmask, revents, events... */ enum { EV_UNDEF = (int)0xFFFFFFFF, /* guaranteed to be invalid */ EV_NONE = 0x00, /* no events */ EV_READ = 0x01, /* ev_io detected read will not block */ EV_WRITE = 0x02, /* ev_io detected write will not block */ EV__IOFDSET = 0x80, /* internal use only */ EV_IO = EV_READ, /* alias for type-detection */ EV_TIMER = 0x00000100, /* timer timed out */ #if EV_COMPAT3 EV_TIMEOUT = EV_TIMER, /* pre 4.0 API compatibility */ #endif EV_PERIODIC = 0x00000200, /* periodic timer timed out */ EV_SIGNAL = 0x00000400, /* signal was received */ EV_CHILD = 0x00000800, /* child/pid had status change */ EV_STAT = 0x00001000, /* stat data changed */ EV_IDLE = 0x00002000, /* event loop is idling */ EV_PREPARE = 0x00004000, /* event loop about to poll */ EV_CHECK = 0x00008000, /* event loop finished poll */ EV_EMBED = 0x00010000, /* embedded event loop needs sweep */ EV_FORK = 0x00020000, /* event loop resumed in child */ EV_CLEANUP = 0x00040000, /* event loop resumed in child */ EV_ASYNC = 0x00080000, /* async intra-loop signal */ EV_CUSTOM = 0x01000000, /* for use by user code */ EV_ERROR = (int)0x80000000 /* sent when an error occurs */ }; /* can be used to add custom fields to all watchers, while losing binary compatibility */ #ifndef EV_COMMON # define EV_COMMON void *data; #endif #ifndef EV_CB_DECLARE # define EV_CB_DECLARE(type) void (*cb)(EV_P_ struct type *w, int revents); #endif #ifndef EV_CB_INVOKE # define EV_CB_INVOKE(watcher,revents) (watcher)->cb (EV_A_ (watcher), (revents)) #endif /* not official, do not use */ #define EV_CB(type,name) void name (EV_P_ struct ev_ ## type *w, int revents) /* * struct member types: * private: you may look at them, but not change them, * and they might not mean anything to you. * ro: can be read anytime, but only changed when the watcher isn't active. * rw: can be read and modified anytime, even when the watcher is active. * * some internal details that might be helpful for debugging: * * active is either 0, which means the watcher is not active, * or the array index of the watcher (periodics, timers) * or the array index + 1 (most other watchers) * or simply 1 for watchers that aren't in some array. * pending is either 0, in which case the watcher isn't, * or the array index + 1 in the pendings array. */ #if EV_MINPRI == EV_MAXPRI # define EV_DECL_PRIORITY #elif !defined (EV_DECL_PRIORITY) # define EV_DECL_PRIORITY int priority; #endif /* shared by all watchers */ #define EV_WATCHER(type) \ int active; /* private */ \ int pending; /* private */ \ EV_DECL_PRIORITY /* private */ \ EV_COMMON /* rw */ \ EV_CB_DECLARE (type) /* private */ #define EV_WATCHER_LIST(type) \ EV_WATCHER (type) \ struct ev_watcher_list *next; /* private */ #define EV_WATCHER_TIME(type) \ EV_WATCHER (type) \ ev_tstamp at; /* private */ /* base class, nothing to see here unless you subclass */ typedef struct ev_watcher { EV_WATCHER (ev_watcher) } ev_watcher; /* base class, nothing to see here unless you subclass */ typedef struct ev_watcher_list { EV_WATCHER_LIST (ev_watcher_list) } ev_watcher_list; /* base class, nothing to see here unless you subclass */ typedef struct ev_watcher_time { EV_WATCHER_TIME (ev_watcher_time) } ev_watcher_time; /* invoked when fd is either EV_READable or EV_WRITEable */ /* revent EV_READ, EV_WRITE */ typedef struct ev_io { EV_WATCHER_LIST (ev_io) int fd; /* ro */ int events; /* ro */ } ev_io; /* invoked after a specific time, repeatable (based on monotonic clock) */ /* revent EV_TIMEOUT */ typedef struct ev_timer { EV_WATCHER_TIME (ev_timer) ev_tstamp repeat; /* rw */ } ev_timer; /* invoked at some specific time, possibly repeating at regular intervals (based on UTC) */ /* revent EV_PERIODIC */ typedef struct ev_periodic { EV_WATCHER_TIME (ev_periodic) ev_tstamp offset; /* rw */ ev_tstamp interval; /* rw */ ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now) EV_THROW; /* rw */ } ev_periodic; /* invoked when the given signal has been received */ /* revent EV_SIGNAL */ typedef struct ev_signal { EV_WATCHER_LIST (ev_signal) int signum; /* ro */ } ev_signal; /* invoked when sigchld is received and waitpid indicates the given pid */ /* revent EV_CHILD */ /* does not support priorities */ typedef struct ev_child { EV_WATCHER_LIST (ev_child) int flags; /* private */ int pid; /* ro */ int rpid; /* rw, holds the received pid */ int rstatus; /* rw, holds the exit status, use the macros from sys/wait.h */ } ev_child; #if EV_STAT_ENABLE /* st_nlink = 0 means missing file or other error */ # ifdef _WIN32 typedef struct _stati64 ev_statdata; # else typedef struct stat ev_statdata; # endif /* invoked each time the stat data changes for a given path */ /* revent EV_STAT */ typedef struct ev_stat { EV_WATCHER_LIST (ev_stat) ev_timer timer; /* private */ ev_tstamp interval; /* ro */ const char *path; /* ro */ ev_statdata prev; /* ro */ ev_statdata attr; /* ro */ int wd; /* wd for inotify, fd for kqueue */ } ev_stat; #endif #if EV_IDLE_ENABLE /* invoked when the nothing else needs to be done, keeps the process from blocking */ /* revent EV_IDLE */ typedef struct ev_idle { EV_WATCHER (ev_idle) } ev_idle; #endif /* invoked for each run of the mainloop, just before the blocking call */ /* you can still change events in any way you like */ /* revent EV_PREPARE */ typedef struct ev_prepare { EV_WATCHER (ev_prepare) } ev_prepare; /* invoked for each run of the mainloop, just after the blocking call */ /* revent EV_CHECK */ typedef struct ev_check { EV_WATCHER (ev_check) } ev_check; #if EV_FORK_ENABLE /* the callback gets invoked before check in the child process when a fork was detected */ /* revent EV_FORK */ typedef struct ev_fork { EV_WATCHER (ev_fork) } ev_fork; #endif #if EV_CLEANUP_ENABLE /* is invoked just before the loop gets destroyed */ /* revent EV_CLEANUP */ typedef struct ev_cleanup { EV_WATCHER (ev_cleanup) } ev_cleanup; #endif #if EV_EMBED_ENABLE /* used to embed an event loop inside another */ /* the callback gets invoked when the event loop has handled events, and can be 0 */ typedef struct ev_embed { EV_WATCHER (ev_embed) struct ev_loop *other; /* ro */ ev_io io; /* private */ ev_prepare prepare; /* private */ ev_check check; /* unused */ ev_timer timer; /* unused */ ev_periodic periodic; /* unused */ ev_idle idle; /* unused */ ev_fork fork; /* private */ #if EV_CLEANUP_ENABLE ev_cleanup cleanup; /* unused */ #endif } ev_embed; #endif #if EV_ASYNC_ENABLE /* invoked when somebody calls ev_async_send on the watcher */ /* revent EV_ASYNC */ typedef struct ev_async { EV_WATCHER (ev_async) EV_ATOMIC_T sent; /* private */ } ev_async; # define ev_async_pending(w) (+(w)->sent) #endif /* the presence of this union forces similar struct layout */ union ev_any_watcher { struct ev_watcher w; struct ev_watcher_list wl; struct ev_io io; struct ev_timer timer; struct ev_periodic periodic; struct ev_signal signal; struct ev_child child; #if EV_STAT_ENABLE struct ev_stat stat; #endif #if EV_IDLE_ENABLE struct ev_idle idle; #endif struct ev_prepare prepare; struct ev_check check; #if EV_FORK_ENABLE struct ev_fork fork; #endif #if EV_CLEANUP_ENABLE struct ev_cleanup cleanup; #endif #if EV_EMBED_ENABLE struct ev_embed embed; #endif #if EV_ASYNC_ENABLE struct ev_async async; #endif }; /* flag bits for ev_default_loop and ev_loop_new */ enum { /* the default */ EVFLAG_AUTO = 0x00000000U, /* not quite a mask */ /* flag bits */ EVFLAG_NOENV = 0x01000000U, /* do NOT consult environment */ EVFLAG_FORKCHECK = 0x02000000U, /* check for a fork in each iteration */ /* debugging/feature disable */ EVFLAG_NOINOTIFY = 0x00100000U, /* do not attempt to use inotify */ #if EV_COMPAT3 EVFLAG_NOSIGFD = 0, /* compatibility to pre-3.9 */ #endif EVFLAG_SIGNALFD = 0x00200000U, /* attempt to use signalfd */ EVFLAG_NOSIGMASK = 0x00400000U /* avoid modifying the signal mask */ }; /* method bits to be ored together */ enum { EVBACKEND_SELECT = 0x00000001U, /* about anywhere */ EVBACKEND_POLL = 0x00000002U, /* !win */ EVBACKEND_EPOLL = 0x00000004U, /* linux */ EVBACKEND_KQUEUE = 0x00000008U, /* bsd */ EVBACKEND_DEVPOLL = 0x00000010U, /* solaris 8 */ /* NYI */ EVBACKEND_PORT = 0x00000020U, /* solaris 10 */ EVBACKEND_ALL = 0x0000003FU, /* all known backends */ EVBACKEND_MASK = 0x0000FFFFU /* all future backends */ }; #if EV_PROTOTYPES EV_API_DECL int ev_version_major (void) EV_THROW; EV_API_DECL int ev_version_minor (void) EV_THROW; EV_API_DECL unsigned int ev_supported_backends (void) EV_THROW; EV_API_DECL unsigned int ev_recommended_backends (void) EV_THROW; EV_API_DECL unsigned int ev_embeddable_backends (void) EV_THROW; EV_API_DECL ev_tstamp ev_time (void) EV_THROW; EV_API_DECL void ev_sleep (ev_tstamp delay) EV_THROW; /* sleep for a while */ /* Sets the allocation function to use, works like realloc. * It is used to allocate and free memory. * If it returns zero when memory needs to be allocated, the library might abort * or take some potentially destructive action. * The default is your system realloc function. */ EV_API_DECL void ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW; /* set the callback function to call on a * retryable syscall error * (such as failed select, poll, epoll_wait) */ EV_API_DECL void ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW; #if EV_MULTIPLICITY /* the default loop is the only one that handles signals and child watchers */ /* you can call this as often as you like */ EV_API_DECL struct ev_loop *ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW; #ifdef EV_API_STATIC EV_API_DECL struct ev_loop *ev_default_loop_ptr; #endif EV_INLINE struct ev_loop * ev_default_loop_uc_ (void) EV_THROW { extern struct ev_loop *ev_default_loop_ptr; return ev_default_loop_ptr; } EV_INLINE int ev_is_default_loop (EV_P) EV_THROW { return EV_A == EV_DEFAULT_UC; } /* create and destroy alternative loops that don't handle signals */ EV_API_DECL struct ev_loop *ev_loop_new (unsigned int flags EV_CPP (= 0)) EV_THROW; EV_API_DECL ev_tstamp ev_now (EV_P) EV_THROW; /* time w.r.t. timers and the eventloop, updated after each poll */ #else EV_API_DECL int ev_default_loop (unsigned int flags EV_CPP (= 0)) EV_THROW; /* returns true when successful */ EV_API_DECL ev_tstamp ev_rt_now; EV_INLINE ev_tstamp ev_now (void) EV_THROW { return ev_rt_now; } /* looks weird, but ev_is_default_loop (EV_A) still works if this exists */ EV_INLINE int ev_is_default_loop (void) EV_THROW { return 1; } #endif /* multiplicity */ /* destroy event loops, also works for the default loop */ EV_API_DECL void ev_loop_destroy (EV_P); /* this needs to be called after fork, to duplicate the loop */ /* when you want to re-use it in the child */ /* you can call it in either the parent or the child */ /* you can actually call it at any time, anywhere :) */ EV_API_DECL void ev_loop_fork (EV_P) EV_THROW; EV_API_DECL unsigned int ev_backend (EV_P) EV_THROW; /* backend in use by loop */ EV_API_DECL void ev_now_update (EV_P) EV_THROW; /* update event loop time */ #if EV_WALK_ENABLE /* walk (almost) all watchers in the loop of a given type, invoking the */ /* callback on every such watcher. The callback might stop the watcher, */ /* but do nothing else with the loop */ EV_API_DECL void ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW; #endif #endif /* prototypes */ /* ev_run flags values */ enum { EVRUN_NOWAIT = 1, /* do not block/wait */ EVRUN_ONCE = 2 /* block *once* only */ }; /* ev_break how values */ enum { EVBREAK_CANCEL = 0, /* undo unloop */ EVBREAK_ONE = 1, /* unloop once */ EVBREAK_ALL = 2 /* unloop all loops */ }; #if EV_PROTOTYPES EV_API_DECL int ev_run (EV_P_ int flags EV_CPP (= 0)); EV_API_DECL void ev_break (EV_P_ int how EV_CPP (= EVBREAK_ONE)) EV_THROW; /* break out of the loop */ /* * ref/unref can be used to add or remove a refcount on the mainloop. every watcher * keeps one reference. if you have a long-running watcher you never unregister that * should not keep ev_loop from running, unref() after starting, and ref() before stopping. */ EV_API_DECL void ev_ref (EV_P) EV_THROW; EV_API_DECL void ev_unref (EV_P) EV_THROW; /* * convenience function, wait for a single event, without registering an event watcher * if timeout is < 0, do wait indefinitely */ EV_API_DECL void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) EV_THROW; # if EV_FEATURE_API EV_API_DECL unsigned int ev_iteration (EV_P) EV_THROW; /* number of loop iterations */ EV_API_DECL unsigned int ev_depth (EV_P) EV_THROW; /* #ev_loop enters - #ev_loop leaves */ EV_API_DECL void ev_verify (EV_P) EV_THROW; /* abort if loop data corrupted */ EV_API_DECL void ev_set_io_collect_interval (EV_P_ ev_tstamp interval) EV_THROW; /* sleep at least this time, default 0 */ EV_API_DECL void ev_set_timeout_collect_interval (EV_P_ ev_tstamp interval) EV_THROW; /* sleep at least this time, default 0 */ /* advanced stuff for threading etc. support, see docs */ EV_API_DECL void ev_set_userdata (EV_P_ void *data) EV_THROW; EV_API_DECL void *ev_userdata (EV_P) EV_THROW; EV_API_DECL void ev_set_invoke_pending_cb (EV_P_ void (*invoke_pending_cb)(EV_P)) EV_THROW; EV_API_DECL void ev_set_loop_release_cb (EV_P_ void (*release)(EV_P), void (*acquire)(EV_P) EV_THROW) EV_THROW; EV_API_DECL unsigned int ev_pending_count (EV_P) EV_THROW; /* number of pending events, if any */ EV_API_DECL void ev_invoke_pending (EV_P); /* invoke all pending watchers */ /* * stop/start the timer handling. */ EV_API_DECL void ev_suspend (EV_P) EV_THROW; EV_API_DECL void ev_resume (EV_P) EV_THROW; #endif #endif /* these may evaluate ev multiple times, and the other arguments at most once */ /* either use ev_init + ev_TYPE_set, or the ev_TYPE_init macro, below, to first initialise a watcher */ #define ev_init(ev,cb_) do { \ ((ev_watcher *)(void *)(ev))->active = \ ((ev_watcher *)(void *)(ev))->pending = 0; \ ev_set_priority ((ev), 0); \ ev_set_cb ((ev), cb_); \ } while (0) #define ev_io_set(ev,fd_,events_) do { (ev)->fd = (fd_); (ev)->events = (events_) | EV__IOFDSET; } while (0) #define ev_timer_set(ev,after_,repeat_) do { ((ev_watcher_time *)(ev))->at = (after_); (ev)->repeat = (repeat_); } while (0) #define ev_periodic_set(ev,ofs_,ival_,rcb_) do { (ev)->offset = (ofs_); (ev)->interval = (ival_); (ev)->reschedule_cb = (rcb_); } while (0) #define ev_signal_set(ev,signum_) do { (ev)->signum = (signum_); } while (0) #define ev_child_set(ev,pid_,trace_) do { (ev)->pid = (pid_); (ev)->flags = !!(trace_); } while (0) #define ev_stat_set(ev,path_,interval_) do { (ev)->path = (path_); (ev)->interval = (interval_); (ev)->wd = -2; } while (0) #define ev_idle_set(ev) /* nop, yes, this is a serious in-joke */ #define ev_prepare_set(ev) /* nop, yes, this is a serious in-joke */ #define ev_check_set(ev) /* nop, yes, this is a serious in-joke */ #define ev_embed_set(ev,other_) do { (ev)->other = (other_); } while (0) #define ev_fork_set(ev) /* nop, yes, this is a serious in-joke */ #define ev_cleanup_set(ev) /* nop, yes, this is a serious in-joke */ #define ev_async_set(ev) /* nop, yes, this is a serious in-joke */ #define ev_io_init(ev,cb,fd,events) do { ev_init ((ev), (cb)); ev_io_set ((ev),(fd),(events)); } while (0) #define ev_timer_init(ev,cb,after,repeat) do { ev_init ((ev), (cb)); ev_timer_set ((ev),(after),(repeat)); } while (0) #define ev_periodic_init(ev,cb,ofs,ival,rcb) do { ev_init ((ev), (cb)); ev_periodic_set ((ev),(ofs),(ival),(rcb)); } while (0) #define ev_signal_init(ev,cb,signum) do { ev_init ((ev), (cb)); ev_signal_set ((ev), (signum)); } while (0) #define ev_child_init(ev,cb,pid,trace) do { ev_init ((ev), (cb)); ev_child_set ((ev),(pid),(trace)); } while (0) #define ev_stat_init(ev,cb,path,interval) do { ev_init ((ev), (cb)); ev_stat_set ((ev),(path),(interval)); } while (0) #define ev_idle_init(ev,cb) do { ev_init ((ev), (cb)); ev_idle_set ((ev)); } while (0) #define ev_prepare_init(ev,cb) do { ev_init ((ev), (cb)); ev_prepare_set ((ev)); } while (0) #define ev_check_init(ev,cb) do { ev_init ((ev), (cb)); ev_check_set ((ev)); } while (0) #define ev_embed_init(ev,cb,other) do { ev_init ((ev), (cb)); ev_embed_set ((ev),(other)); } while (0) #define ev_fork_init(ev,cb) do { ev_init ((ev), (cb)); ev_fork_set ((ev)); } while (0) #define ev_cleanup_init(ev,cb) do { ev_init ((ev), (cb)); ev_cleanup_set ((ev)); } while (0) #define ev_async_init(ev,cb) do { ev_init ((ev), (cb)); ev_async_set ((ev)); } while (0) #define ev_is_pending(ev) (0 + ((ev_watcher *)(void *)(ev))->pending) /* ro, true when watcher is waiting for callback invocation */ #define ev_is_active(ev) (0 + ((ev_watcher *)(void *)(ev))->active) /* ro, true when the watcher has been started */ #define ev_cb(ev) (ev)->cb /* rw */ #if EV_MINPRI == EV_MAXPRI # define ev_priority(ev) ((ev), EV_MINPRI) # define ev_set_priority(ev,pri) ((ev), (pri)) #else # define ev_priority(ev) (+(((ev_watcher *)(void *)(ev))->priority)) # define ev_set_priority(ev,pri) ( (ev_watcher *)(void *)(ev))->priority = (pri) #endif #define ev_periodic_at(ev) (+((ev_watcher_time *)(ev))->at) #ifndef ev_set_cb # define ev_set_cb(ev,cb_) ev_cb (ev) = (cb_) #endif /* stopping (enabling, adding) a watcher does nothing if it is already running */ /* stopping (disabling, deleting) a watcher does nothing unless its already running */ #if EV_PROTOTYPES /* feeds an event into a watcher as if the event actually occurred */ /* accepts any ev_watcher type */ EV_API_DECL void ev_feed_event (EV_P_ void *w, int revents) EV_THROW; EV_API_DECL void ev_feed_fd_event (EV_P_ int fd, int revents) EV_THROW; #if EV_SIGNAL_ENABLE EV_API_DECL void ev_feed_signal (int signum) EV_THROW; EV_API_DECL void ev_feed_signal_event (EV_P_ int signum) EV_THROW; #endif EV_API_DECL void ev_invoke (EV_P_ void *w, int revents); EV_API_DECL int ev_clear_pending (EV_P_ void *w) EV_THROW; EV_API_DECL void ev_io_start (EV_P_ ev_io *w) EV_THROW; EV_API_DECL void ev_io_stop (EV_P_ ev_io *w) EV_THROW; EV_API_DECL void ev_timer_start (EV_P_ ev_timer *w) EV_THROW; EV_API_DECL void ev_timer_stop (EV_P_ ev_timer *w) EV_THROW; /* stops if active and no repeat, restarts if active and repeating, starts if inactive and repeating */ EV_API_DECL void ev_timer_again (EV_P_ ev_timer *w) EV_THROW; /* return remaining time */ EV_API_DECL ev_tstamp ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW; #if EV_PERIODIC_ENABLE EV_API_DECL void ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW; EV_API_DECL void ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW; EV_API_DECL void ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW; #endif /* only supported in the default loop */ #if EV_SIGNAL_ENABLE EV_API_DECL void ev_signal_start (EV_P_ ev_signal *w) EV_THROW; EV_API_DECL void ev_signal_stop (EV_P_ ev_signal *w) EV_THROW; #endif /* only supported in the default loop */ # if EV_CHILD_ENABLE EV_API_DECL void ev_child_start (EV_P_ ev_child *w) EV_THROW; EV_API_DECL void ev_child_stop (EV_P_ ev_child *w) EV_THROW; # endif # if EV_STAT_ENABLE EV_API_DECL void ev_stat_start (EV_P_ ev_stat *w) EV_THROW; EV_API_DECL void ev_stat_stop (EV_P_ ev_stat *w) EV_THROW; EV_API_DECL void ev_stat_stat (EV_P_ ev_stat *w) EV_THROW; # endif # if EV_IDLE_ENABLE EV_API_DECL void ev_idle_start (EV_P_ ev_idle *w) EV_THROW; EV_API_DECL void ev_idle_stop (EV_P_ ev_idle *w) EV_THROW; # endif #if EV_PREPARE_ENABLE EV_API_DECL void ev_prepare_start (EV_P_ ev_prepare *w) EV_THROW; EV_API_DECL void ev_prepare_stop (EV_P_ ev_prepare *w) EV_THROW; #endif #if EV_CHECK_ENABLE EV_API_DECL void ev_check_start (EV_P_ ev_check *w) EV_THROW; EV_API_DECL void ev_check_stop (EV_P_ ev_check *w) EV_THROW; #endif # if EV_FORK_ENABLE EV_API_DECL void ev_fork_start (EV_P_ ev_fork *w) EV_THROW; EV_API_DECL void ev_fork_stop (EV_P_ ev_fork *w) EV_THROW; # endif # if EV_CLEANUP_ENABLE EV_API_DECL void ev_cleanup_start (EV_P_ ev_cleanup *w) EV_THROW; EV_API_DECL void ev_cleanup_stop (EV_P_ ev_cleanup *w) EV_THROW; # endif # if EV_EMBED_ENABLE /* only supported when loop to be embedded is in fact embeddable */ EV_API_DECL void ev_embed_start (EV_P_ ev_embed *w) EV_THROW; EV_API_DECL void ev_embed_stop (EV_P_ ev_embed *w) EV_THROW; EV_API_DECL void ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW; # endif # if EV_ASYNC_ENABLE EV_API_DECL void ev_async_start (EV_P_ ev_async *w) EV_THROW; EV_API_DECL void ev_async_stop (EV_P_ ev_async *w) EV_THROW; EV_API_DECL void ev_async_send (EV_P_ ev_async *w) EV_THROW; # endif #if EV_COMPAT3 #define EVLOOP_NONBLOCK EVRUN_NOWAIT #define EVLOOP_ONESHOT EVRUN_ONCE #define EVUNLOOP_CANCEL EVBREAK_CANCEL #define EVUNLOOP_ONE EVBREAK_ONE #define EVUNLOOP_ALL EVBREAK_ALL #if EV_PROTOTYPES EV_INLINE void ev_loop (EV_P_ int flags) { ev_run (EV_A_ flags); } EV_INLINE void ev_unloop (EV_P_ int how ) { ev_break (EV_A_ how ); } EV_INLINE void ev_default_destroy (void) { ev_loop_destroy (EV_DEFAULT); } EV_INLINE void ev_default_fork (void) { ev_loop_fork (EV_DEFAULT); } #if EV_FEATURE_API EV_INLINE unsigned int ev_loop_count (EV_P) { return ev_iteration (EV_A); } EV_INLINE unsigned int ev_loop_depth (EV_P) { return ev_depth (EV_A); } EV_INLINE void ev_loop_verify (EV_P) { ev_verify (EV_A); } #endif #endif #else typedef struct ev_loop ev_loop; #endif #endif EV_CPP(}) #endif passenger-4.0.37/ext/libev/ev_epoll.c000644 000765 000024 00000023126 12233035540 020072 0ustar00honglistaff000000 000000 /* * libev epoll fd activity backend * * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ /* * general notes about epoll: * * a) epoll silently removes fds from the fd set. as nothing tells us * that an fd has been removed otherwise, we have to continually * "rearm" fds that we suspect *might* have changed (same * problem with kqueue, but much less costly there). * b) the fact that ADD != MOD creates a lot of extra syscalls due to a) * and seems not to have any advantage. * c) the inability to handle fork or file descriptors (think dup) * limits the applicability over poll, so this is not a generic * poll replacement. * d) epoll doesn't work the same as select with many file descriptors * (such as files). while not critical, no other advanced interface * seems to share this (rather non-unixy) limitation. * e) epoll claims to be embeddable, but in practise you never get * a ready event for the epoll fd (broken: <=2.6.26, working: >=2.6.32). * f) epoll_ctl returning EPERM means the fd is always ready. * * lots of "weird code" and complication handling in this file is due * to these design problems with epoll, as we try very hard to avoid * epoll_ctl syscalls for common usage patterns and handle the breakage * ensuing from receiving events for closed and otherwise long gone * file descriptors. */ #include #define EV_EMASK_EPERM 0x80 static void epoll_modify (EV_P_ int fd, int oev, int nev) { struct epoll_event ev; unsigned char oldmask; /* * we handle EPOLL_CTL_DEL by ignoring it here * on the assumption that the fd is gone anyways * if that is wrong, we have to handle the spurious * event in epoll_poll. * if the fd is added again, we try to ADD it, and, if that * fails, we assume it still has the same eventmask. */ if (!nev) return; oldmask = anfds [fd].emask; anfds [fd].emask = nev; /* store the generation counter in the upper 32 bits, the fd in the lower 32 bits */ ev.data.u64 = (uint64_t)(uint32_t)fd | ((uint64_t)(uint32_t)++anfds [fd].egen << 32); ev.events = (nev & EV_READ ? EPOLLIN : 0) | (nev & EV_WRITE ? EPOLLOUT : 0); if (expect_true (!epoll_ctl (backend_fd, oev && oldmask != nev ? EPOLL_CTL_MOD : EPOLL_CTL_ADD, fd, &ev))) return; if (expect_true (errno == ENOENT)) { /* if ENOENT then the fd went away, so try to do the right thing */ if (!nev) goto dec_egen; if (!epoll_ctl (backend_fd, EPOLL_CTL_ADD, fd, &ev)) return; } else if (expect_true (errno == EEXIST)) { /* EEXIST means we ignored a previous DEL, but the fd is still active */ /* if the kernel mask is the same as the new mask, we assume it hasn't changed */ if (oldmask == nev) goto dec_egen; if (!epoll_ctl (backend_fd, EPOLL_CTL_MOD, fd, &ev)) return; } else if (expect_true (errno == EPERM)) { /* EPERM means the fd is always ready, but epoll is too snobbish */ /* to handle it, unlike select or poll. */ anfds [fd].emask = EV_EMASK_EPERM; /* add fd to epoll_eperms, if not already inside */ if (!(oldmask & EV_EMASK_EPERM)) { array_needsize (int, epoll_eperms, epoll_epermmax, epoll_epermcnt + 1, EMPTY2); epoll_eperms [epoll_epermcnt++] = fd; } return; } fd_kill (EV_A_ fd); dec_egen: /* we didn't successfully call epoll_ctl, so decrement the generation counter again */ --anfds [fd].egen; } static void epoll_poll (EV_P_ ev_tstamp timeout) { int i; int eventcnt; if (expect_false (epoll_epermcnt)) timeout = 0.; /* epoll wait times cannot be larger than (LONG_MAX - 999UL) / HZ msecs, which is below */ /* the default libev max wait time, however. */ EV_RELEASE_CB; eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, timeout * 1e3); EV_ACQUIRE_CB; if (expect_false (eventcnt < 0)) { if (errno != EINTR) ev_syserr ("(libev) epoll_wait"); return; } for (i = 0; i < eventcnt; ++i) { struct epoll_event *ev = epoll_events + i; int fd = (uint32_t)ev->data.u64; /* mask out the lower 32 bits */ int want = anfds [fd].events; int got = (ev->events & (EPOLLOUT | EPOLLERR | EPOLLHUP) ? EV_WRITE : 0) | (ev->events & (EPOLLIN | EPOLLERR | EPOLLHUP) ? EV_READ : 0); /* * check for spurious notification. * this only finds spurious notifications on egen updates * other spurious notifications will be found by epoll_ctl, below * we assume that fd is always in range, as we never shrink the anfds array */ if (expect_false ((uint32_t)anfds [fd].egen != (uint32_t)(ev->data.u64 >> 32))) { /* recreate kernel state */ postfork = 1; continue; } if (expect_false (got & ~want)) { anfds [fd].emask = want; /* * we received an event but are not interested in it, try mod or del * this often happens because we optimistically do not unregister fds * when we are no longer interested in them, but also when we get spurious * notifications for fds from another process. this is partially handled * above with the gencounter check (== our fd is not the event fd), and * partially here, when epoll_ctl returns an error (== a child has the fd * but we closed it). */ ev->events = (want & EV_READ ? EPOLLIN : 0) | (want & EV_WRITE ? EPOLLOUT : 0); /* pre-2.6.9 kernels require a non-null pointer with EPOLL_CTL_DEL, */ /* which is fortunately easy to do for us. */ if (epoll_ctl (backend_fd, want ? EPOLL_CTL_MOD : EPOLL_CTL_DEL, fd, ev)) { postfork = 1; /* an error occurred, recreate kernel state */ continue; } } fd_event (EV_A_ fd, got); } /* if the receive array was full, increase its size */ if (expect_false (eventcnt == epoll_eventmax)) { ev_free (epoll_events); epoll_eventmax = array_nextsize (sizeof (struct epoll_event), epoll_eventmax, epoll_eventmax + 1); epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax); } /* now synthesize events for all fds where epoll fails, while select works... */ for (i = epoll_epermcnt; i--; ) { int fd = epoll_eperms [i]; unsigned char events = anfds [fd].events & (EV_READ | EV_WRITE); if (anfds [fd].emask & EV_EMASK_EPERM && events) fd_event (EV_A_ fd, events); else epoll_eperms [i] = epoll_eperms [--epoll_epermcnt]; } } int inline_size epoll_init (EV_P_ int flags) { #ifdef EPOLL_CLOEXEC backend_fd = epoll_create1 (EPOLL_CLOEXEC); if (backend_fd < 0 && (errno == EINVAL || errno == ENOSYS)) #endif backend_fd = epoll_create (256); if (backend_fd < 0) return 0; fcntl (backend_fd, F_SETFD, FD_CLOEXEC); backend_mintime = 1e-3; /* epoll does sometimes return early, this is just to avoid the worst */ backend_modify = epoll_modify; backend_poll = epoll_poll; epoll_eventmax = 64; /* initial number of events receivable per poll */ epoll_events = (struct epoll_event *)ev_malloc (sizeof (struct epoll_event) * epoll_eventmax); return EVBACKEND_EPOLL; } void inline_size epoll_destroy (EV_P) { ev_free (epoll_events); array_free (epoll_eperm, EMPTY); } void inline_size epoll_fork (EV_P) { close (backend_fd); while ((backend_fd = epoll_create (256)) < 0) ev_syserr ("(libev) epoll_create"); fcntl (backend_fd, F_SETFD, FD_CLOEXEC); fd_rearm_all (EV_A); } passenger-4.0.37/ext/libev/ev_kqueue.c000644 000765 000024 00000015225 12233035540 020257 0ustar00honglistaff000000 000000 /* * libev kqueue backend * * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #include #include #include #include #include void inline_speed kqueue_change (EV_P_ int fd, int filter, int flags, int fflags) { ++kqueue_changecnt; array_needsize (struct kevent, kqueue_changes, kqueue_changemax, kqueue_changecnt, EMPTY2); EV_SET (&kqueue_changes [kqueue_changecnt - 1], fd, filter, flags, fflags, 0, 0); } /* OS X at least needs this */ #ifndef EV_ENABLE # define EV_ENABLE 0 #endif #ifndef NOTE_EOF # define NOTE_EOF 0 #endif static void kqueue_modify (EV_P_ int fd, int oev, int nev) { if (oev != nev) { if (oev & EV_READ) kqueue_change (EV_A_ fd, EVFILT_READ , EV_DELETE, 0); if (oev & EV_WRITE) kqueue_change (EV_A_ fd, EVFILT_WRITE, EV_DELETE, 0); } /* to detect close/reopen reliably, we have to re-add */ /* event requests even when oev == nev */ if (nev & EV_READ) kqueue_change (EV_A_ fd, EVFILT_READ , EV_ADD | EV_ENABLE, NOTE_EOF); if (nev & EV_WRITE) kqueue_change (EV_A_ fd, EVFILT_WRITE, EV_ADD | EV_ENABLE, NOTE_EOF); } static void kqueue_poll (EV_P_ ev_tstamp timeout) { int res, i; struct timespec ts; /* need to resize so there is enough space for errors */ if (kqueue_changecnt > kqueue_eventmax) { ev_free (kqueue_events); kqueue_eventmax = array_nextsize (sizeof (struct kevent), kqueue_eventmax, kqueue_changecnt); kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax); } EV_RELEASE_CB; EV_TS_SET (ts, timeout); res = kevent (backend_fd, kqueue_changes, kqueue_changecnt, kqueue_events, kqueue_eventmax, &ts); EV_ACQUIRE_CB; kqueue_changecnt = 0; if (expect_false (res < 0)) { if (errno != EINTR) ev_syserr ("(libev) kevent"); return; } for (i = 0; i < res; ++i) { int fd = kqueue_events [i].ident; if (expect_false (kqueue_events [i].flags & EV_ERROR)) { int err = kqueue_events [i].data; /* we are only interested in errors for fds that we are interested in :) */ if (anfds [fd].events) { if (err == ENOENT) /* resubmit changes on ENOENT */ kqueue_modify (EV_A_ fd, 0, anfds [fd].events); else if (err == EBADF) /* on EBADF, we re-check the fd */ { if (fd_valid (fd)) kqueue_modify (EV_A_ fd, 0, anfds [fd].events); else fd_kill (EV_A_ fd); } else /* on all other errors, we error out on the fd */ fd_kill (EV_A_ fd); } } else fd_event ( EV_A_ fd, kqueue_events [i].filter == EVFILT_READ ? EV_READ : kqueue_events [i].filter == EVFILT_WRITE ? EV_WRITE : 0 ); } if (expect_false (res == kqueue_eventmax)) { ev_free (kqueue_events); kqueue_eventmax = array_nextsize (sizeof (struct kevent), kqueue_eventmax, kqueue_eventmax + 1); kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax); } } int inline_size kqueue_init (EV_P_ int flags) { /* initialize the kernel queue */ kqueue_fd_pid = getpid (); if ((backend_fd = kqueue ()) < 0) return 0; fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */ backend_mintime = 1e-9; /* apparently, they did the right thing in freebsd */ backend_modify = kqueue_modify; backend_poll = kqueue_poll; kqueue_eventmax = 64; /* initial number of events receivable per poll */ kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax); kqueue_changes = 0; kqueue_changemax = 0; kqueue_changecnt = 0; return EVBACKEND_KQUEUE; } void inline_size kqueue_destroy (EV_P) { ev_free (kqueue_events); ev_free (kqueue_changes); } void inline_size kqueue_fork (EV_P) { /* some BSD kernels don't just destroy the kqueue itself, * but also close the fd, which isn't documented, and * impossible to support properly. * we remember the pid of the kqueue call and only close * the fd if the pid is still the same. * this leaks fds on sane kernels, but BSD interfaces are * notoriously buggy and rarely get fixed. */ pid_t newpid = getpid (); if (newpid == kqueue_fd_pid) close (backend_fd); kqueue_fd_pid = newpid; while ((backend_fd = kqueue ()) < 0) ev_syserr ("(libev) kqueue"); fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* re-register interest in fds */ fd_rearm_all (EV_A); } /* sys/event.h defines EV_ERROR */ #undef EV_ERROR passenger-4.0.37/ext/libev/ev_poll.c000644 000765 000024 00000010533 12233035540 017723 0ustar00honglistaff000000 000000 /* * libev poll fd activity backend * * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #include void inline_size pollidx_init (int *base, int count) { /* consider using memset (.., -1, ...), which is practically guaranteed * to work on all systems implementing poll */ while (count--) *base++ = -1; } static void poll_modify (EV_P_ int fd, int oev, int nev) { int idx; if (oev == nev) return; array_needsize (int, pollidxs, pollidxmax, fd + 1, pollidx_init); idx = pollidxs [fd]; if (idx < 0) /* need to allocate a new pollfd */ { pollidxs [fd] = idx = pollcnt++; array_needsize (struct pollfd, polls, pollmax, pollcnt, EMPTY2); polls [idx].fd = fd; } assert (polls [idx].fd == fd); if (nev) polls [idx].events = (nev & EV_READ ? POLLIN : 0) | (nev & EV_WRITE ? POLLOUT : 0); else /* remove pollfd */ { pollidxs [fd] = -1; if (expect_true (idx < --pollcnt)) { polls [idx] = polls [pollcnt]; pollidxs [polls [idx].fd] = idx; } } } static void poll_poll (EV_P_ ev_tstamp timeout) { struct pollfd *p; int res; EV_RELEASE_CB; res = poll (polls, pollcnt, timeout * 1e3); EV_ACQUIRE_CB; if (expect_false (res < 0)) { if (errno == EBADF) fd_ebadf (EV_A); else if (errno == ENOMEM && !syserr_cb) fd_enomem (EV_A); else if (errno != EINTR) ev_syserr ("(libev) poll"); } else for (p = polls; res; ++p) { assert (("libev: poll() returned illegal result, broken BSD kernel?", p < polls + pollcnt)); if (expect_false (p->revents)) /* this expect is debatable */ { --res; if (expect_false (p->revents & POLLNVAL)) fd_kill (EV_A_ p->fd); else fd_event ( EV_A_ p->fd, (p->revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0) | (p->revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0) ); } } } int inline_size poll_init (EV_P_ int flags) { backend_mintime = 1e-3; backend_modify = poll_modify; backend_poll = poll_poll; pollidxs = 0; pollidxmax = 0; polls = 0; pollmax = 0; pollcnt = 0; return EVBACKEND_POLL; } void inline_size poll_destroy (EV_P) { ev_free (pollidxs); ev_free (polls); } passenger-4.0.37/ext/libev/ev_port.c000644 000765 000024 00000014404 12233035540 017742 0ustar00honglistaff000000 000000 /* * libev solaris event port backend * * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ /* useful reading: * * http://bugs.opensolaris.org/view_bug.do?bug_id=6268715 (random results) * http://bugs.opensolaris.org/view_bug.do?bug_id=6455223 (just totally broken) * http://bugs.opensolaris.org/view_bug.do?bug_id=6873782 (manpage ETIME) * http://bugs.opensolaris.org/view_bug.do?bug_id=6874410 (implementation ETIME) * http://www.mail-archive.com/networking-discuss@opensolaris.org/msg11898.html ETIME vs. nget * http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/event_port.c (libc) * http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/portfs/port.c#1325 (kernel) */ #include #include #include #include #include #include void inline_speed port_associate_and_check (EV_P_ int fd, int ev) { if (0 > port_associate ( backend_fd, PORT_SOURCE_FD, fd, (ev & EV_READ ? POLLIN : 0) | (ev & EV_WRITE ? POLLOUT : 0), 0 ) ) { if (errno == EBADFD) fd_kill (EV_A_ fd); else ev_syserr ("(libev) port_associate"); } } static void port_modify (EV_P_ int fd, int oev, int nev) { /* we need to reassociate no matter what, as closes are * once more silently being discarded. */ if (!nev) { if (oev) port_dissociate (backend_fd, PORT_SOURCE_FD, fd); } else port_associate_and_check (EV_A_ fd, nev); } static void port_poll (EV_P_ ev_tstamp timeout) { int res, i; struct timespec ts; uint_t nget = 1; /* we initialise this to something we will skip in the loop, as */ /* port_getn can return with nget unchanged, but no indication */ /* whether it was the original value or has been updated :/ */ port_events [0].portev_source = 0; EV_RELEASE_CB; EV_TS_SET (ts, timeout); res = port_getn (backend_fd, port_events, port_eventmax, &nget, &ts); EV_ACQUIRE_CB; /* port_getn may or may not set nget on error */ /* so we rely on port_events [0].portev_source not being updated */ if (res == -1 && errno != ETIME && errno != EINTR) ev_syserr ("(libev) port_getn (see http://bugs.opensolaris.org/view_bug.do?bug_id=6268715, try LIBEV_FLAGS=3 env variable)"); for (i = 0; i < nget; ++i) { if (port_events [i].portev_source == PORT_SOURCE_FD) { int fd = port_events [i].portev_object; fd_event ( EV_A_ fd, (port_events [i].portev_events & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0) | (port_events [i].portev_events & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0) ); fd_change (EV_A_ fd, EV__IOFDSET); } } if (expect_false (nget == port_eventmax)) { ev_free (port_events); port_eventmax = array_nextsize (sizeof (port_event_t), port_eventmax, port_eventmax + 1); port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax); } } int inline_size port_init (EV_P_ int flags) { /* Initialize the kernel queue */ if ((backend_fd = port_create ()) < 0) return 0; assert (("libev: PORT_SOURCE_FD must not be zero", PORT_SOURCE_FD)); fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* not sure if necessary, hopefully doesn't hurt */ /* if my reading of the opensolaris kernel sources are correct, then * opensolaris does something very stupid: it checks if the time has already * elapsed and doesn't round up if that is the case,m otherwise it DOES round * up. Since we can't know what the case is, we need to guess by using a * "large enough" timeout. Normally, 1e-9 would be correct. */ backend_mintime = 1e-3; /* needed to compensate for port_getn returning early */ backend_modify = port_modify; backend_poll = port_poll; port_eventmax = 64; /* initial number of events receivable per poll */ port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax); return EVBACKEND_PORT; } void inline_size port_destroy (EV_P) { ev_free (port_events); } void inline_size port_fork (EV_P) { close (backend_fd); while ((backend_fd = port_create ()) < 0) ev_syserr ("(libev) port"); fcntl (backend_fd, F_SETFD, FD_CLOEXEC); /* re-register interest in fds */ fd_rearm_all (EV_A); } passenger-4.0.37/ext/libev/ev_select.c000644 000765 000024 00000021155 12233035540 020236 0ustar00honglistaff000000 000000 /* * libev select fd activity backend * * Copyright (c) 2007,2008,2009,2010,2011 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #ifndef _WIN32 /* for unix systems */ # include # ifndef __hpux /* for REAL unix systems */ # include # endif #endif #ifndef EV_SELECT_USE_FD_SET # ifdef NFDBITS # define EV_SELECT_USE_FD_SET 0 # else # define EV_SELECT_USE_FD_SET 1 # endif #endif #if EV_SELECT_IS_WINSOCKET # undef EV_SELECT_USE_FD_SET # define EV_SELECT_USE_FD_SET 1 # undef NFDBITS # define NFDBITS 0 #endif #if !EV_SELECT_USE_FD_SET # define NFDBYTES (NFDBITS / 8) #endif #include static void select_modify (EV_P_ int fd, int oev, int nev) { if (oev == nev) return; { #if EV_SELECT_USE_FD_SET #if EV_SELECT_IS_WINSOCKET SOCKET handle = anfds [fd].handle; #else int handle = fd; #endif assert (("libev: fd >= FD_SETSIZE passed to fd_set-based select backend", fd < FD_SETSIZE)); /* FD_SET is broken on windows (it adds the fd to a set twice or more, * which eventually leads to overflows). Need to call it only on changes. */ #if EV_SELECT_IS_WINSOCKET if ((oev ^ nev) & EV_READ) #endif if (nev & EV_READ) FD_SET (handle, (fd_set *)vec_ri); else FD_CLR (handle, (fd_set *)vec_ri); #if EV_SELECT_IS_WINSOCKET if ((oev ^ nev) & EV_WRITE) #endif if (nev & EV_WRITE) FD_SET (handle, (fd_set *)vec_wi); else FD_CLR (handle, (fd_set *)vec_wi); #else int word = fd / NFDBITS; fd_mask mask = 1UL << (fd % NFDBITS); if (expect_false (vec_max <= word)) { int new_max = word + 1; vec_ri = ev_realloc (vec_ri, new_max * NFDBYTES); vec_ro = ev_realloc (vec_ro, new_max * NFDBYTES); /* could free/malloc */ vec_wi = ev_realloc (vec_wi, new_max * NFDBYTES); vec_wo = ev_realloc (vec_wo, new_max * NFDBYTES); /* could free/malloc */ #ifdef _WIN32 vec_eo = ev_realloc (vec_eo, new_max * NFDBYTES); /* could free/malloc */ #endif for (; vec_max < new_max; ++vec_max) ((fd_mask *)vec_ri) [vec_max] = ((fd_mask *)vec_wi) [vec_max] = 0; } ((fd_mask *)vec_ri) [word] |= mask; if (!(nev & EV_READ)) ((fd_mask *)vec_ri) [word] &= ~mask; ((fd_mask *)vec_wi) [word] |= mask; if (!(nev & EV_WRITE)) ((fd_mask *)vec_wi) [word] &= ~mask; #endif } } static void select_poll (EV_P_ ev_tstamp timeout) { struct timeval tv; int res; int fd_setsize; EV_RELEASE_CB; EV_TV_SET (tv, timeout); #if EV_SELECT_USE_FD_SET fd_setsize = sizeof (fd_set); #else fd_setsize = vec_max * NFDBYTES; #endif memcpy (vec_ro, vec_ri, fd_setsize); memcpy (vec_wo, vec_wi, fd_setsize); #ifdef _WIN32 /* pass in the write set as except set. * the idea behind this is to work around a windows bug that causes * errors to be reported as an exception and not by setting * the writable bit. this is so uncontrollably lame. */ memcpy (vec_eo, vec_wi, fd_setsize); res = select (vec_max * NFDBITS, (fd_set *)vec_ro, (fd_set *)vec_wo, (fd_set *)vec_eo, &tv); #elif EV_SELECT_USE_FD_SET fd_setsize = anfdmax < FD_SETSIZE ? anfdmax : FD_SETSIZE; res = select (fd_setsize, (fd_set *)vec_ro, (fd_set *)vec_wo, 0, &tv); #else res = select (vec_max * NFDBITS, (fd_set *)vec_ro, (fd_set *)vec_wo, 0, &tv); #endif EV_ACQUIRE_CB; if (expect_false (res < 0)) { #if EV_SELECT_IS_WINSOCKET errno = WSAGetLastError (); #endif #ifdef WSABASEERR /* on windows, select returns incompatible error codes, fix this */ if (errno >= WSABASEERR && errno < WSABASEERR + 1000) if (errno == WSAENOTSOCK) errno = EBADF; else errno -= WSABASEERR; #endif #ifdef _WIN32 /* select on windows erroneously returns EINVAL when no fd sets have been * provided (this is documented). what microsoft doesn't tell you that this bug * exists even when the fd sets _are_ provided, so we have to check for this bug * here and emulate by sleeping manually. * we also get EINVAL when the timeout is invalid, but we ignore this case here * and assume that EINVAL always means: you have to wait manually. */ if (errno == EINVAL) { if (timeout) { unsigned long ms = timeout * 1e3; Sleep (ms ? ms : 1); } return; } #endif if (errno == EBADF) fd_ebadf (EV_A); else if (errno == ENOMEM && !syserr_cb) fd_enomem (EV_A); else if (errno != EINTR) ev_syserr ("(libev) select"); return; } #if EV_SELECT_USE_FD_SET { int fd; for (fd = 0; fd < anfdmax; ++fd) if (anfds [fd].events) { int events = 0; #if EV_SELECT_IS_WINSOCKET SOCKET handle = anfds [fd].handle; #else int handle = fd; #endif if (FD_ISSET (handle, (fd_set *)vec_ro)) events |= EV_READ; if (FD_ISSET (handle, (fd_set *)vec_wo)) events |= EV_WRITE; #ifdef _WIN32 if (FD_ISSET (handle, (fd_set *)vec_eo)) events |= EV_WRITE; #endif if (expect_true (events)) fd_event (EV_A_ fd, events); } } #else { int word, bit; for (word = vec_max; word--; ) { fd_mask word_r = ((fd_mask *)vec_ro) [word]; fd_mask word_w = ((fd_mask *)vec_wo) [word]; #ifdef _WIN32 word_w |= ((fd_mask *)vec_eo) [word]; #endif if (word_r || word_w) for (bit = NFDBITS; bit--; ) { fd_mask mask = 1UL << bit; int events = 0; events |= word_r & mask ? EV_READ : 0; events |= word_w & mask ? EV_WRITE : 0; if (expect_true (events)) fd_event (EV_A_ word * NFDBITS + bit, events); } } } #endif } int inline_size select_init (EV_P_ int flags) { backend_mintime = 1e-6; backend_modify = select_modify; backend_poll = select_poll; #if EV_SELECT_USE_FD_SET vec_ri = ev_malloc (sizeof (fd_set)); FD_ZERO ((fd_set *)vec_ri); vec_ro = ev_malloc (sizeof (fd_set)); vec_wi = ev_malloc (sizeof (fd_set)); FD_ZERO ((fd_set *)vec_wi); vec_wo = ev_malloc (sizeof (fd_set)); #ifdef _WIN32 vec_eo = ev_malloc (sizeof (fd_set)); #endif #else vec_max = 0; vec_ri = 0; vec_ro = 0; vec_wi = 0; vec_wo = 0; #ifdef _WIN32 vec_eo = 0; #endif #endif return EVBACKEND_SELECT; } void inline_size select_destroy (EV_P) { ev_free (vec_ri); ev_free (vec_ro); ev_free (vec_wi); ev_free (vec_wo); #ifdef _WIN32 ev_free (vec_eo); #endif } passenger-4.0.37/ext/libev/ev_vars.h000644 000765 000024 00000014011 12233035540 017730 0ustar00honglistaff000000 000000 /* * loop member variable declarations * * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #define VARx(type,name) VAR(name, type name) VARx(ev_tstamp, now_floor) /* last time we refreshed rt_time */ VARx(ev_tstamp, mn_now) /* monotonic clock "now" */ VARx(ev_tstamp, rtmn_diff) /* difference realtime - monotonic time */ /* for reverse feeding of events */ VARx(W *, rfeeds) VARx(int, rfeedmax) VARx(int, rfeedcnt) VAR (pendings, ANPENDING *pendings [NUMPRI]) VAR (pendingmax, int pendingmax [NUMPRI]) VAR (pendingcnt, int pendingcnt [NUMPRI]) VARx(int, pendingpri) /* highest priority currently pending */ VARx(ev_prepare, pending_w) /* dummy pending watcher */ VARx(ev_tstamp, io_blocktime) VARx(ev_tstamp, timeout_blocktime) VARx(int, backend) VARx(int, activecnt) /* total number of active events ("refcount") */ VARx(EV_ATOMIC_T, loop_done) /* signal by ev_break */ VARx(int, backend_fd) VARx(ev_tstamp, backend_mintime) /* assumed typical timer resolution */ VAR (backend_modify, void (*backend_modify)(EV_P_ int fd, int oev, int nev)) VAR (backend_poll , void (*backend_poll)(EV_P_ ev_tstamp timeout)) VARx(ANFD *, anfds) VARx(int, anfdmax) VAR (evpipe, int evpipe [2]) VARx(ev_io, pipe_w) VARx(EV_ATOMIC_T, pipe_write_wanted) VARx(EV_ATOMIC_T, pipe_write_skipped) #if !defined(_WIN32) || EV_GENWRAP VARx(pid_t, curpid) #endif VARx(char, postfork) /* true if we need to recreate kernel state after fork */ #if EV_USE_SELECT || EV_GENWRAP VARx(void *, vec_ri) VARx(void *, vec_ro) VARx(void *, vec_wi) VARx(void *, vec_wo) #if defined(_WIN32) || EV_GENWRAP VARx(void *, vec_eo) #endif VARx(int, vec_max) #endif #if EV_USE_POLL || EV_GENWRAP VARx(struct pollfd *, polls) VARx(int, pollmax) VARx(int, pollcnt) VARx(int *, pollidxs) /* maps fds into structure indices */ VARx(int, pollidxmax) #endif #if EV_USE_EPOLL || EV_GENWRAP VARx(struct epoll_event *, epoll_events) VARx(int, epoll_eventmax) VARx(int *, epoll_eperms) VARx(int, epoll_epermcnt) VARx(int, epoll_epermmax) #endif #if EV_USE_KQUEUE || EV_GENWRAP VARx(pid_t, kqueue_fd_pid) VARx(struct kevent *, kqueue_changes) VARx(int, kqueue_changemax) VARx(int, kqueue_changecnt) VARx(struct kevent *, kqueue_events) VARx(int, kqueue_eventmax) #endif #if EV_USE_PORT || EV_GENWRAP VARx(struct port_event *, port_events) VARx(int, port_eventmax) #endif #if EV_USE_IOCP || EV_GENWRAP VARx(HANDLE, iocp) #endif VARx(int *, fdchanges) VARx(int, fdchangemax) VARx(int, fdchangecnt) VARx(ANHE *, timers) VARx(int, timermax) VARx(int, timercnt) #if EV_PERIODIC_ENABLE || EV_GENWRAP VARx(ANHE *, periodics) VARx(int, periodicmax) VARx(int, periodiccnt) #endif #if EV_IDLE_ENABLE || EV_GENWRAP VAR (idles, ev_idle **idles [NUMPRI]) VAR (idlemax, int idlemax [NUMPRI]) VAR (idlecnt, int idlecnt [NUMPRI]) #endif VARx(int, idleall) /* total number */ VARx(struct ev_prepare **, prepares) VARx(int, preparemax) VARx(int, preparecnt) VARx(struct ev_check **, checks) VARx(int, checkmax) VARx(int, checkcnt) #if EV_FORK_ENABLE || EV_GENWRAP VARx(struct ev_fork **, forks) VARx(int, forkmax) VARx(int, forkcnt) #endif #if EV_CLEANUP_ENABLE || EV_GENWRAP VARx(struct ev_cleanup **, cleanups) VARx(int, cleanupmax) VARx(int, cleanupcnt) #endif #if EV_ASYNC_ENABLE || EV_GENWRAP VARx(EV_ATOMIC_T, async_pending) VARx(struct ev_async **, asyncs) VARx(int, asyncmax) VARx(int, asynccnt) #endif #if EV_USE_INOTIFY || EV_GENWRAP VARx(int, fs_fd) VARx(ev_io, fs_w) VARx(char, fs_2625) /* whether we are running in linux 2.6.25 or newer */ VAR (fs_hash, ANFS fs_hash [EV_INOTIFY_HASHSIZE]) #endif VARx(EV_ATOMIC_T, sig_pending) #if EV_USE_SIGNALFD || EV_GENWRAP VARx(int, sigfd) VARx(ev_io, sigfd_w) VARx(sigset_t, sigfd_set) #endif VARx(unsigned int, origflags) /* original loop flags */ #if EV_FEATURE_API || EV_GENWRAP VARx(unsigned int, loop_count) /* total number of loop iterations/blocks */ VARx(unsigned int, loop_depth) /* #ev_run enters - #ev_run leaves */ VARx(void *, userdata) VAR (release_cb, void (*release_cb)(EV_P) EV_THROW) VAR (acquire_cb, void (*acquire_cb)(EV_P) EV_THROW) VAR (invoke_cb , void (*invoke_cb) (EV_P)) #endif #undef VARx passenger-4.0.37/ext/libev/ev_win32.c000644 000765 000024 00000012177 12233035540 017725 0ustar00honglistaff000000 000000 /* * libev win32 compatibility cruft (_not_ a backend) * * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #ifdef _WIN32 /* timeb.h is actually xsi legacy functionality */ #include /* note: the comment below could not be substantiated, but what would I care */ /* MSDN says this is required to handle SIGFPE */ /* my wild guess would be that using something floating-pointy is required */ /* for the crt to do something about it */ volatile double SIGFPE_REQ = 0.0f; static SOCKET ev_tcp_socket (void) { #if EV_USE_WSASOCKET return WSASocket (AF_INET, SOCK_STREAM, 0, 0, 0, 0); #else return socket (AF_INET, SOCK_STREAM, 0); #endif } /* oh, the humanity! */ static int ev_pipe (int filedes [2]) { struct sockaddr_in addr = { 0 }; int addr_size = sizeof (addr); struct sockaddr_in adr2; int adr2_size = sizeof (adr2); SOCKET listener; SOCKET sock [2] = { -1, -1 }; if ((listener = ev_tcp_socket ()) == INVALID_SOCKET) return -1; addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); addr.sin_port = 0; if (bind (listener, (struct sockaddr *)&addr, addr_size)) goto fail; if (getsockname (listener, (struct sockaddr *)&addr, &addr_size)) goto fail; if (listen (listener, 1)) goto fail; if ((sock [0] = ev_tcp_socket ()) == INVALID_SOCKET) goto fail; if (connect (sock [0], (struct sockaddr *)&addr, addr_size)) goto fail; if ((sock [1] = accept (listener, 0, 0)) < 0) goto fail; /* windows vista returns fantasy port numbers for sockets: * example for two interconnected tcp sockets: * * (Socket::unpack_sockaddr_in getsockname $sock0)[0] == 53364 * (Socket::unpack_sockaddr_in getpeername $sock0)[0] == 53363 * (Socket::unpack_sockaddr_in getsockname $sock1)[0] == 53363 * (Socket::unpack_sockaddr_in getpeername $sock1)[0] == 53365 * * wow! tridirectional sockets! * * this way of checking ports seems to work: */ if (getpeername (sock [0], (struct sockaddr *)&addr, &addr_size)) goto fail; if (getsockname (sock [1], (struct sockaddr *)&adr2, &adr2_size)) goto fail; errno = WSAEINVAL; if (addr_size != adr2_size || addr.sin_addr.s_addr != adr2.sin_addr.s_addr /* just to be sure, I mean, it's windows */ || addr.sin_port != adr2.sin_port) goto fail; closesocket (listener); #if EV_SELECT_IS_WINSOCKET filedes [0] = EV_WIN32_HANDLE_TO_FD (sock [0]); filedes [1] = EV_WIN32_HANDLE_TO_FD (sock [1]); #else /* when select isn't winsocket, we also expect socket, connect, accept etc. * to work on fds */ filedes [0] = sock [0]; filedes [1] = sock [1]; #endif return 0; fail: closesocket (listener); if (sock [0] != INVALID_SOCKET) closesocket (sock [0]); if (sock [1] != INVALID_SOCKET) closesocket (sock [1]); return -1; } #undef pipe #define pipe(filedes) ev_pipe (filedes) #define EV_HAVE_EV_TIME 1 ev_tstamp ev_time (void) { FILETIME ft; ULARGE_INTEGER ui; GetSystemTimeAsFileTime (&ft); ui.u.LowPart = ft.dwLowDateTime; ui.u.HighPart = ft.dwHighDateTime; /* msvc cannot convert ulonglong to double... yes, it is that sucky */ return (LONGLONG)(ui.QuadPart - 116444736000000000) * 1e-7; } #endif passenger-4.0.37/ext/libev/ev_wrap.h000644 000765 000024 00000012606 12233035540 017736 0ustar00honglistaff000000 000000 /* DO NOT EDIT, automatically generated by update_ev_wrap */ #ifndef EV_WRAP_H #define EV_WRAP_H #define acquire_cb ((loop)->acquire_cb) #define activecnt ((loop)->activecnt) #define anfdmax ((loop)->anfdmax) #define anfds ((loop)->anfds) #define async_pending ((loop)->async_pending) #define asynccnt ((loop)->asynccnt) #define asyncmax ((loop)->asyncmax) #define asyncs ((loop)->asyncs) #define backend ((loop)->backend) #define backend_fd ((loop)->backend_fd) #define backend_mintime ((loop)->backend_mintime) #define backend_modify ((loop)->backend_modify) #define backend_poll ((loop)->backend_poll) #define checkcnt ((loop)->checkcnt) #define checkmax ((loop)->checkmax) #define checks ((loop)->checks) #define cleanupcnt ((loop)->cleanupcnt) #define cleanupmax ((loop)->cleanupmax) #define cleanups ((loop)->cleanups) #define curpid ((loop)->curpid) #define epoll_epermcnt ((loop)->epoll_epermcnt) #define epoll_epermmax ((loop)->epoll_epermmax) #define epoll_eperms ((loop)->epoll_eperms) #define epoll_eventmax ((loop)->epoll_eventmax) #define epoll_events ((loop)->epoll_events) #define evpipe ((loop)->evpipe) #define fdchangecnt ((loop)->fdchangecnt) #define fdchangemax ((loop)->fdchangemax) #define fdchanges ((loop)->fdchanges) #define forkcnt ((loop)->forkcnt) #define forkmax ((loop)->forkmax) #define forks ((loop)->forks) #define fs_2625 ((loop)->fs_2625) #define fs_fd ((loop)->fs_fd) #define fs_hash ((loop)->fs_hash) #define fs_w ((loop)->fs_w) #define idleall ((loop)->idleall) #define idlecnt ((loop)->idlecnt) #define idlemax ((loop)->idlemax) #define idles ((loop)->idles) #define invoke_cb ((loop)->invoke_cb) #define io_blocktime ((loop)->io_blocktime) #define iocp ((loop)->iocp) #define kqueue_changecnt ((loop)->kqueue_changecnt) #define kqueue_changemax ((loop)->kqueue_changemax) #define kqueue_changes ((loop)->kqueue_changes) #define kqueue_eventmax ((loop)->kqueue_eventmax) #define kqueue_events ((loop)->kqueue_events) #define kqueue_fd_pid ((loop)->kqueue_fd_pid) #define loop_count ((loop)->loop_count) #define loop_depth ((loop)->loop_depth) #define loop_done ((loop)->loop_done) #define mn_now ((loop)->mn_now) #define now_floor ((loop)->now_floor) #define origflags ((loop)->origflags) #define pending_w ((loop)->pending_w) #define pendingcnt ((loop)->pendingcnt) #define pendingmax ((loop)->pendingmax) #define pendingpri ((loop)->pendingpri) #define pendings ((loop)->pendings) #define periodiccnt ((loop)->periodiccnt) #define periodicmax ((loop)->periodicmax) #define periodics ((loop)->periodics) #define pipe_w ((loop)->pipe_w) #define pipe_write_skipped ((loop)->pipe_write_skipped) #define pipe_write_wanted ((loop)->pipe_write_wanted) #define pollcnt ((loop)->pollcnt) #define pollidxmax ((loop)->pollidxmax) #define pollidxs ((loop)->pollidxs) #define pollmax ((loop)->pollmax) #define polls ((loop)->polls) #define port_eventmax ((loop)->port_eventmax) #define port_events ((loop)->port_events) #define postfork ((loop)->postfork) #define preparecnt ((loop)->preparecnt) #define preparemax ((loop)->preparemax) #define prepares ((loop)->prepares) #define release_cb ((loop)->release_cb) #define rfeedcnt ((loop)->rfeedcnt) #define rfeedmax ((loop)->rfeedmax) #define rfeeds ((loop)->rfeeds) #define rtmn_diff ((loop)->rtmn_diff) #define sig_pending ((loop)->sig_pending) #define sigfd ((loop)->sigfd) #define sigfd_set ((loop)->sigfd_set) #define sigfd_w ((loop)->sigfd_w) #define timeout_blocktime ((loop)->timeout_blocktime) #define timercnt ((loop)->timercnt) #define timermax ((loop)->timermax) #define timers ((loop)->timers) #define userdata ((loop)->userdata) #define vec_eo ((loop)->vec_eo) #define vec_max ((loop)->vec_max) #define vec_ri ((loop)->vec_ri) #define vec_ro ((loop)->vec_ro) #define vec_wi ((loop)->vec_wi) #define vec_wo ((loop)->vec_wo) #else #undef EV_WRAP_H #undef acquire_cb #undef activecnt #undef anfdmax #undef anfds #undef async_pending #undef asynccnt #undef asyncmax #undef asyncs #undef backend #undef backend_fd #undef backend_mintime #undef backend_modify #undef backend_poll #undef checkcnt #undef checkmax #undef checks #undef cleanupcnt #undef cleanupmax #undef cleanups #undef curpid #undef epoll_epermcnt #undef epoll_epermmax #undef epoll_eperms #undef epoll_eventmax #undef epoll_events #undef evpipe #undef fdchangecnt #undef fdchangemax #undef fdchanges #undef forkcnt #undef forkmax #undef forks #undef fs_2625 #undef fs_fd #undef fs_hash #undef fs_w #undef idleall #undef idlecnt #undef idlemax #undef idles #undef invoke_cb #undef io_blocktime #undef iocp #undef kqueue_changecnt #undef kqueue_changemax #undef kqueue_changes #undef kqueue_eventmax #undef kqueue_events #undef kqueue_fd_pid #undef loop_count #undef loop_depth #undef loop_done #undef mn_now #undef now_floor #undef origflags #undef pending_w #undef pendingcnt #undef pendingmax #undef pendingpri #undef pendings #undef periodiccnt #undef periodicmax #undef periodics #undef pipe_w #undef pipe_write_skipped #undef pipe_write_wanted #undef pollcnt #undef pollidxmax #undef pollidxs #undef pollmax #undef polls #undef port_eventmax #undef port_events #undef postfork #undef preparecnt #undef preparemax #undef prepares #undef release_cb #undef rfeedcnt #undef rfeedmax #undef rfeeds #undef rtmn_diff #undef sig_pending #undef sigfd #undef sigfd_set #undef sigfd_w #undef timeout_blocktime #undef timercnt #undef timermax #undef timers #undef userdata #undef vec_eo #undef vec_max #undef vec_ri #undef vec_ro #undef vec_wi #undef vec_wo #endif passenger-4.0.37/ext/libev/event.c000644 000765 000024 00000023336 12233035540 017411 0ustar00honglistaff000000 000000 /* * libevent compatibility layer * * Copyright (c) 2007,2008,2009,2010,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #include #include #include #ifdef EV_EVENT_H # include EV_EVENT_H #else # include "event.h" #endif #if EV_MULTIPLICITY # define dLOOPev struct ev_loop *loop = (struct ev_loop *)ev->ev_base # define dLOOPbase struct ev_loop *loop = (struct ev_loop *)base #else # define dLOOPev # define dLOOPbase #endif /* never accessed, will always be cast from/to ev_loop */ struct event_base { int dummy; }; static struct event_base *ev_x_cur; static ev_tstamp ev_tv_get (struct timeval *tv) { if (tv) { ev_tstamp after = tv->tv_sec + tv->tv_usec * 1e-6; return after ? after : 1e-6; } else return -1.; } #define EVENT_STRINGIFY(s) # s #define EVENT_VERSION(a,b) EVENT_STRINGIFY (a) "." EVENT_STRINGIFY (b) const char * event_get_version (void) { /* returns ABI, not API or library, version */ return EVENT_VERSION (EV_VERSION_MAJOR, EV_VERSION_MINOR); } const char * event_get_method (void) { return "libev"; } void *event_init (void) { #if EV_MULTIPLICITY if (ev_x_cur) ev_x_cur = (struct event_base *)ev_loop_new (EVFLAG_AUTO); else ev_x_cur = (struct event_base *)ev_default_loop (EVFLAG_AUTO); #else assert (("libev: multiple event bases not supported when not compiled with EV_MULTIPLICITY", !ev_x_cur)); ev_x_cur = (struct event_base *)(long)ev_default_loop (EVFLAG_AUTO); #endif return ev_x_cur; } const char * event_base_get_method (const struct event_base *base) { return "libev"; } struct event_base * event_base_new (void) { #if EV_MULTIPLICITY return (struct event_base *)ev_loop_new (EVFLAG_AUTO); #else assert (("libev: multiple event bases not supported when not compiled with EV_MULTIPLICITY")); return NULL; #endif } void event_base_free (struct event_base *base) { dLOOPbase; #if EV_MULTIPLICITY if (!ev_is_default_loop (loop)) ev_loop_destroy (loop); #endif } int event_dispatch (void) { return event_base_dispatch (ev_x_cur); } #ifdef EV_STANDALONE void event_set_log_callback (event_log_cb cb) { /* nop */ } #endif int event_loop (int flags) { return event_base_loop (ev_x_cur, flags); } int event_loopexit (struct timeval *tv) { return event_base_loopexit (ev_x_cur, tv); } event_callback_fn event_get_callback (const struct event *ev) { return ev->ev_callback; } static void ev_x_cb (struct event *ev, int revents) { revents &= EV_READ | EV_WRITE | EV_TIMER | EV_SIGNAL; ev->ev_res = revents; ev->ev_callback (ev->ev_fd, (short)revents, ev->ev_arg); } static void ev_x_cb_sig (EV_P_ struct ev_signal *w, int revents) { struct event *ev = (struct event *)(((char *)w) - offsetof (struct event, iosig.sig)); if (revents & EV_ERROR) event_del (ev); ev_x_cb (ev, revents); } static void ev_x_cb_io (EV_P_ struct ev_io *w, int revents) { struct event *ev = (struct event *)(((char *)w) - offsetof (struct event, iosig.io)); if ((revents & EV_ERROR) || !(ev->ev_events & EV_PERSIST)) event_del (ev); ev_x_cb (ev, revents); } static void ev_x_cb_to (EV_P_ struct ev_timer *w, int revents) { struct event *ev = (struct event *)(((char *)w) - offsetof (struct event, to)); event_del (ev); ev_x_cb (ev, revents); } void event_set (struct event *ev, int fd, short events, void (*cb)(int, short, void *), void *arg) { if (events & EV_SIGNAL) ev_init (&ev->iosig.sig, ev_x_cb_sig); else ev_init (&ev->iosig.io, ev_x_cb_io); ev_init (&ev->to, ev_x_cb_to); ev->ev_base = ev_x_cur; /* not threadsafe, but it's how libevent works */ ev->ev_fd = fd; ev->ev_events = events; ev->ev_pri = 0; ev->ev_callback = cb; ev->ev_arg = arg; ev->ev_res = 0; ev->ev_flags = EVLIST_INIT; } int event_once (int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv) { return event_base_once (ev_x_cur, fd, events, cb, arg, tv); } int event_add (struct event *ev, struct timeval *tv) { dLOOPev; if (ev->ev_events & EV_SIGNAL) { if (!ev_is_active (&ev->iosig.sig)) { ev_signal_set (&ev->iosig.sig, ev->ev_fd); ev_signal_start (EV_A_ &ev->iosig.sig); ev->ev_flags |= EVLIST_SIGNAL; } } else if (ev->ev_events & (EV_READ | EV_WRITE)) { if (!ev_is_active (&ev->iosig.io)) { ev_io_set (&ev->iosig.io, ev->ev_fd, ev->ev_events & (EV_READ | EV_WRITE)); ev_io_start (EV_A_ &ev->iosig.io); ev->ev_flags |= EVLIST_INSERTED; } } if (tv) { ev->to.repeat = ev_tv_get (tv); ev_timer_again (EV_A_ &ev->to); ev->ev_flags |= EVLIST_TIMEOUT; } else { ev_timer_stop (EV_A_ &ev->to); ev->ev_flags &= ~EVLIST_TIMEOUT; } ev->ev_flags |= EVLIST_ACTIVE; return 0; } int event_del (struct event *ev) { dLOOPev; if (ev->ev_events & EV_SIGNAL) ev_signal_stop (EV_A_ &ev->iosig.sig); else if (ev->ev_events & (EV_READ | EV_WRITE)) ev_io_stop (EV_A_ &ev->iosig.io); if (ev_is_active (&ev->to)) ev_timer_stop (EV_A_ &ev->to); ev->ev_flags = EVLIST_INIT; return 0; } void event_active (struct event *ev, int res, short ncalls) { dLOOPev; if (res & EV_TIMEOUT) ev_feed_event (EV_A_ &ev->to, res & EV_TIMEOUT); if (res & EV_SIGNAL) ev_feed_event (EV_A_ &ev->iosig.sig, res & EV_SIGNAL); if (res & (EV_READ | EV_WRITE)) ev_feed_event (EV_A_ &ev->iosig.io, res & (EV_READ | EV_WRITE)); } int event_pending (struct event *ev, short events, struct timeval *tv) { short revents = 0; dLOOPev; if (ev->ev_events & EV_SIGNAL) { /* sig */ if (ev_is_active (&ev->iosig.sig) || ev_is_pending (&ev->iosig.sig)) revents |= EV_SIGNAL; } else if (ev->ev_events & (EV_READ | EV_WRITE)) { /* io */ if (ev_is_active (&ev->iosig.io) || ev_is_pending (&ev->iosig.io)) revents |= ev->ev_events & (EV_READ | EV_WRITE); } if (ev->ev_events & EV_TIMEOUT || ev_is_active (&ev->to) || ev_is_pending (&ev->to)) { revents |= EV_TIMEOUT; if (tv) { ev_tstamp at = ev_now (EV_A); tv->tv_sec = (long)at; tv->tv_usec = (long)((at - (ev_tstamp)tv->tv_sec) * 1e6); } } return events & revents; } int event_priority_init (int npri) { return event_base_priority_init (ev_x_cur, npri); } int event_priority_set (struct event *ev, int pri) { ev->ev_pri = pri; return 0; } int event_base_set (struct event_base *base, struct event *ev) { ev->ev_base = base; return 0; } int event_base_loop (struct event_base *base, int flags) { dLOOPbase; return !ev_run (EV_A_ flags); } int event_base_dispatch (struct event_base *base) { return event_base_loop (base, 0); } static void ev_x_loopexit_cb (int revents, void *base) { dLOOPbase; ev_break (EV_A_ EVBREAK_ONE); } int event_base_loopexit (struct event_base *base, struct timeval *tv) { ev_tstamp after = ev_tv_get (tv); dLOOPbase; ev_once (EV_A_ -1, 0, after >= 0. ? after : 0., ev_x_loopexit_cb, (void *)base); return 0; } struct ev_x_once { int fd; void (*cb)(int, short, void *); void *arg; }; static void ev_x_once_cb (int revents, void *arg) { struct ev_x_once *once = (struct ev_x_once *)arg; once->cb (once->fd, (short)revents, once->arg); free (once); } int event_base_once (struct event_base *base, int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv) { struct ev_x_once *once = (struct ev_x_once *)malloc (sizeof (struct ev_x_once)); dLOOPbase; if (!once) return -1; once->fd = fd; once->cb = cb; once->arg = arg; ev_once (EV_A_ fd, events & (EV_READ | EV_WRITE), ev_tv_get (tv), ev_x_once_cb, (void *)once); return 0; } int event_base_priority_init (struct event_base *base, int npri) { /*dLOOPbase;*/ return 0; } passenger-4.0.37/ext/libev/event.h000644 000765 000024 00000014154 12233035540 017414 0ustar00honglistaff000000 000000 /* * libevent compatibility header, only core events supported * * Copyright (c) 2007,2008,2010,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #ifndef EVENT_H_ #define EVENT_H_ #ifdef EV_H # include EV_H #else # include "ev.h" #endif #ifndef EVLOOP_NONBLOCK # define EVLOOP_NONBLOCK EVRUN_NOWAIT #endif #ifndef EVLOOP_ONESHOT # define EVLOOP_ONESHOT EVRUN_ONCE #endif #ifndef EV_TIMEOUT # define EV_TIMEOUT EV_TIMER #endif #ifdef __cplusplus extern "C" { #endif /* we need sys/time.h for struct timeval only */ #if !defined (WIN32) || defined (__MINGW32__) # include /* mingw seems to need this, for whatever reason */ # include #endif struct event_base; #define EVLIST_TIMEOUT 0x01 #define EVLIST_INSERTED 0x02 #define EVLIST_SIGNAL 0x04 #define EVLIST_ACTIVE 0x08 #define EVLIST_INTERNAL 0x10 #define EVLIST_INIT 0x80 typedef void (*event_callback_fn)(int, short, void *); struct event { /* libev watchers we map onto */ union { struct ev_io io; struct ev_signal sig; } iosig; struct ev_timer to; /* compatibility slots */ struct event_base *ev_base; event_callback_fn ev_callback; void *ev_arg; int ev_fd; int ev_pri; int ev_res; int ev_flags; short ev_events; }; event_callback_fn event_get_callback (const struct event *ev); #define EV_READ EV_READ #define EV_WRITE EV_WRITE #define EV_PERSIST 0x10 #define EV_ET 0x20 /* nop */ #define EVENT_SIGNAL(ev) ((int) (ev)->ev_fd) #define EVENT_FD(ev) ((int) (ev)->ev_fd) #define event_initialized(ev) ((ev)->ev_flags & EVLIST_INIT) #define evtimer_add(ev,tv) event_add (ev, tv) #define evtimer_set(ev,cb,data) event_set (ev, -1, 0, cb, data) #define evtimer_del(ev) event_del (ev) #define evtimer_pending(ev,tv) event_pending (ev, EV_TIMEOUT, tv) #define evtimer_initialized(ev) event_initialized (ev) #define timeout_add(ev,tv) evtimer_add (ev, tv) #define timeout_set(ev,cb,data) evtimer_set (ev, cb, data) #define timeout_del(ev) evtimer_del (ev) #define timeout_pending(ev,tv) evtimer_pending (ev, tv) #define timeout_initialized(ev) evtimer_initialized (ev) #define signal_add(ev,tv) event_add (ev, tv) #define signal_set(ev,sig,cb,data) event_set (ev, sig, EV_SIGNAL | EV_PERSIST, cb, data) #define signal_del(ev) event_del (ev) #define signal_pending(ev,tv) event_pending (ev, EV_SIGNAL, tv) #define signal_initialized(ev) event_initialized (ev) const char *event_get_version (void); const char *event_get_method (void); void *event_init (void); void event_base_free (struct event_base *base); #define EVLOOP_ONCE EVLOOP_ONESHOT int event_loop (int); int event_loopexit (struct timeval *tv); int event_dispatch (void); #define _EVENT_LOG_DEBUG 0 #define _EVENT_LOG_MSG 1 #define _EVENT_LOG_WARN 2 #define _EVENT_LOG_ERR 3 typedef void (*event_log_cb)(int severity, const char *msg); void event_set_log_callback(event_log_cb cb); void event_set (struct event *ev, int fd, short events, void (*cb)(int, short, void *), void *arg); int event_once (int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv); int event_add (struct event *ev, struct timeval *tv); int event_del (struct event *ev); void event_active (struct event *ev, int res, short ncalls); /* ncalls is being ignored */ int event_pending (struct event *ev, short, struct timeval *tv); int event_priority_init (int npri); int event_priority_set (struct event *ev, int pri); struct event_base *event_base_new (void); const char *event_base_get_method (const struct event_base *); int event_base_set (struct event_base *base, struct event *ev); int event_base_loop (struct event_base *base, int); int event_base_loopexit (struct event_base *base, struct timeval *tv); int event_base_dispatch (struct event_base *base); int event_base_once (struct event_base *base, int fd, short events, void (*cb)(int, short, void *), void *arg, struct timeval *tv); int event_base_priority_init (struct event_base *base, int fd); /* next line is different in the libevent+libev version */ /*libevent-include*/ #ifdef __cplusplus } #endif #endif passenger-4.0.37/ext/libev/install-sh000755 000765 000024 00000015722 12233035540 020130 0ustar00honglistaff000000 000000 #!/bin/sh # # install - install a program, script, or datafile # # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "$0: no input file specified" >&2 exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d "$dst" ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "$0: $src does not exist" >&2 exit 1 fi if [ x"$dst" = x ] then echo "$0: no destination specified" >&2 exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d "$dst" ] then dst=$dst/`basename "$src"` else : fi fi ## this sed command emulates the dirname command dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp='' while [ $# -ne 0 ] ; do pathcomp=$pathcomp$1 shift if [ ! -d "$pathcomp" ] ; then $mkdirprog "$pathcomp" else : fi pathcomp=$pathcomp/ done fi if [ x"$dir_arg" != x ] then $doit $instcmd "$dst" && if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename "$dst"` else : fi # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && # Now remove or move aside any old file at destination location. We try this # two ways since rm can't unlink itself on some systems and the destination # file might be busy for other reasons. In this case, the final cleanup # might fail but the new file should still install successfully. { if [ -f "$dstdir/$dstfile" ] then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } passenger-4.0.37/ext/libev/libev.m4000644 000765 000024 00000003046 12233035540 017463 0ustar00honglistaff000000 000000 dnl this file is part of libev, do not make local modifications dnl http://software.schmorp.de/pkg/libev dnl libev support 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) AC_CHECK_FUNCS(inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd) AC_CHECK_FUNCS(clock_gettime, [], [ dnl on linux, try syscall wrapper first if test $(uname) = Linux; then AC_MSG_CHECKING(for clock_gettime syscall) AC_LINK_IFELSE([AC_LANG_PROGRAM( [#include #include #include ], [struct timespec ts; int status = syscall (SYS_clock_gettime, CLOCK_REALTIME, &ts)])], [ac_have_clock_syscall=1 AC_DEFINE(HAVE_CLOCK_SYSCALL, 1, Define to 1 to use the syscall interface for clock_gettime) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) fi if test -z "$LIBEV_M4_AVOID_LIBRT" && test -z "$ac_have_clock_syscall"; then AC_CHECK_LIB(rt, clock_gettime) unset ac_cv_func_clock_gettime AC_CHECK_FUNCS(clock_gettime) fi ]) AC_CHECK_FUNCS(nanosleep, [], [ if test -z "$LIBEV_M4_AVOID_LIBRT"; then AC_CHECK_LIB(rt, nanosleep) unset ac_cv_func_nanosleep AC_CHECK_FUNCS(nanosleep) fi ]) if test -z "$LIBEV_M4_AVOID_LIBM"; then LIBM=m fi AC_SEARCH_LIBS(floor, $LIBM, [AC_DEFINE(HAVE_FLOOR, 1, Define to 1 if the floor function is available)]) passenger-4.0.37/ext/libev/LICENSE000644 000765 000024 00000004002 12233035540 017116 0ustar00honglistaff000000 000000 All files in libev are Copyright (c)2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Alternatively, the contents of this package may be used under the terms of the GNU General Public License ("GPL") version 2 or any later version, in which case the provisions of the GPL are applicable instead of the above. If you wish to allow the use of your version of this package only under the terms of the GPL and not to allow others to use your version of this file under the BSD license, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL in this and the other files of this package. If you do not delete the provisions above, a recipient may use your version of this file under either the BSD or the GPL. passenger-4.0.37/ext/libev/ltmain.sh000755 000765 000024 00001052026 12233035540 017746 0ustar00honglistaff000000 000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.2 Debian-2.4.2-1.1" TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 passenger-4.0.37/ext/libev/Makefile.am000644 000765 000024 00000001025 12233035540 020147 0ustar00honglistaff000000 000000 AUTOMAKE_OPTIONS = foreign VERSION_INFO = 4:0:0 EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \ ev_vars.h ev_wrap.h \ ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \ ev.3 ev.pod Symbols.ev Symbols.event man_MANS = ev.3 include_HEADERS = ev.h ev++.h event.h lib_LTLIBRARIES = libev.la libev_la_SOURCES = ev.c event.c libev_la_LDFLAGS = -version-info $(VERSION_INFO) ev.3: ev.pod pod2man -n LIBEV -r "libev-$(VERSION)" -c "libev - high performance full featured event loop" -s3 <$< >$@ passenger-4.0.37/ext/libev/Makefile.in000644 000765 000024 00000066364 12233035540 020201 0ustar00honglistaff000000 000000 # Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(top_srcdir)/configure config.guess \ config.sub depcomp install-sh ltmain.sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libev.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libev_la_LIBADD = am_libev_la_OBJECTS = ev.lo event.lo libev_la_OBJECTS = $(am_libev_la_OBJECTS) libev_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(libev_la_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libev_la_SOURCES) DIST_SOURCES = $(libev_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac man3dir = $(mandir)/man3 NROFF = nroff MANS = $(man_MANS) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign VERSION_INFO = 4:0:0 EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \ ev_vars.h ev_wrap.h \ ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c \ ev.3 ev.pod Symbols.ev Symbols.event man_MANS = ev.3 include_HEADERS = ev.h ev++.h event.h lib_LTLIBRARIES = libev.la libev_la_SOURCES = ev.c event.c libev_la_LDFLAGS = -version-info $(VERSION_INFO) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libev.la: $(libev_la_OBJECTS) $(libev_la_DEPENDENCIES) $(EXTRA_libev_la_DEPENDENCIES) $(libev_la_LINK) -rpath $(libdir) $(libev_la_OBJECTS) $(libev_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-man3: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man3dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.3[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ done; } uninstall-man3: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(MANS) $(HEADERS) config.h installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man3 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-man uninstall-man: uninstall-man3 .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-lzma dist-shar \ dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-includeHEADERS install-info \ install-info-am install-libLTLIBRARIES install-man \ install-man3 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-man uninstall-man3 ev.3: ev.pod pod2man -n LIBEV -r "libev-$(VERSION)" -c "libev - high performance full featured event loop" -s3 <$< >$@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: passenger-4.0.37/ext/libev/missing000755 000765 000024 00000024032 12233035540 017515 0ustar00honglistaff000000 000000 #! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 passenger-4.0.37/ext/libev/mkinstalldirs000755 000765 000024 00000003704 12233035540 020727 0ustar00honglistaff000000 000000 #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here passenger-4.0.37/ext/libev/README000644 000765 000024 00000004774 12233035540 017011 0ustar00honglistaff000000 000000 libev is a high-performance event loop/event model with lots of features. (see benchmark at http://libev.schmorp.de/bench.html) ABOUT Homepage: http://software.schmorp.de/pkg/libev Mailinglist: libev@lists.schmorp.de http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev Library Documentation: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod Libev is modelled (very losely) after libevent and the Event perl module, but is faster, scales better and is more correct, and also more featureful. And also smaller. Yay. Some of the specialties of libev not commonly found elsewhere are: - extensive and detailed, readable documentation (not doxygen garbage). - fully supports fork, can detect fork in various ways and automatically re-arms kernel mechanisms that do not support fork. - highly optimised select, poll, epoll, kqueue and event ports backends. - filesystem object (path) watching (with optional linux inotify support). - wallclock-based times (using absolute time, cron-like). - relative timers/timeouts (handle time jumps). - fast intra-thread communication between multiple event loops (with optional fast linux eventfd backend). - extremely easy to embed (fully documented, no dependencies, autoconf supported but optional). - very small codebase, no bloated library, simple code. - fully extensible by being able to plug into the event loop, integrate other event loops, integrate other event loop users. - very little memory use (small watchers, small event loop data). - optional C++ interface allowing method and function callbacks at no extra memory or runtime overhead. - optional Perl interface with similar characteristics (capable of running Glib/Gtk2 on libev). - support for other languages (multiple C++ interfaces, D, Ruby, Python) available from third-parties. Examples of programs that embed libev: the EV perl module, node.js, auditd, rxvt-unicode, gvpe (GNU Virtual Private Ethernet), the Deliantra MMORPG server (http://www.deliantra.net/), Rubinius (a next-generation Ruby VM), the Ebb web server, the Rev event toolkit. CONTRIBUTORS libev was written and designed by Marc Lehmann and Emanuele Giaquinta. The following people sent in patches or made other noteworthy contributions to the design (for minor patches, see the Changes file. If I forgot to include you, please shout at me, it was an accident): W.C.A. Wijngaards Christopher Layne Chris Brody passenger-4.0.37/ext/libeio/aclocal.m4000644 000765 000024 00001227276 12233035540 020140 0ustar00honglistaff000000 000000 # generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3293 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4]) m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR passenger-4.0.37/ext/libeio/autogen.sh000755 000765 000024 00000000062 12233035540 020256 0ustar00honglistaff000000 000000 #!/bin/sh autoreconf --install --symlink --force passenger-4.0.37/ext/libeio/Changes000644 000765 000024 00000007616 12233035540 017564 0ustar00honglistaff000000 000000 Revision history for libeio TODO: maybe add mincore support? available on at least darwin, solaris, linux, freebsd TODO: openbsd requires stdint.h for intptr_t - why posix? TODO: make mtouch/readdir maybe others cancellable in-request TODO: fadvise request TODO: fdopendir/utimensat TODO: maybe work around 3.996gb barrier in pread/pwrite as well, maybe readahead etc.? 1.0 - fix a deadlock where a wakeup signal could be missed when a timeout occured at the same time. - use nonstandard but maybe-working-on-bsd fork technique. - use fewer time() syscalls when waiting for new requests. - fix a path-memory-leak in readdir when using the wrappers (reported by Thomas L. Shinnick). - support a max_idle value of 0. - support setting of idle timeout value (eio_set_idle_timeout). - readdir: correctly handle malloc failures. - readdir: new flags argument, can return inode and possibly filetype, can sort in various ways. - readdir: stop immediately when cancelled, do not continue reading the directory. - fix return value of eio_sendfile_sync. - include sys/mman.h for msync. - added EIO_STACKSIZE. - added msync, mtouch support (untested). - added sync_file_range (untested). - fixed custom support. - use a more robust feed-add detection method. - "outbundled" from IO::AIO. - eio_set_max_polltime did not properly convert time to ticks. - tentatively support darwin in sendfile. - fix freebsd/darwin sendfile. - also use sendfile emulation for ENOTSUP and EOPNOTSUPP error codes. - add OS-independent EIO_MT_* and EIO_MS_* flag enums. - add eio_statvfs/eio_fstatvfs. - add eio_mlock/eio_mlockall and OS-independent MCL_* flag enums. - no longer set errno to 0 before making syscalls, this only lures people into the trap of believing errno shows success or failure. - "fix" demo.c so that it works as non-root. - suppoert utimes seperately from futimes, as some systems have utimes but not futimes. - use _POSIX_MEMLOCK_RANGE for mlock. - do not (errornously) overwrite CFLAGS in configure.ac. - mknod used int3 for dev_t (§2 bit), not offs (64 bit). - fix memory corruption in eio_readdirx for the flags combination EIO_READDIR_STAT_ORDER | EIO_READDIR_DIRS_FIRST. - port to openbsd (another blatantly broken non-UNIX/POSIX platform). - fix eio_custom prototype. - work around a Linux (and likely FreeBSD and other kernels) bug where sendfile would not transfer all the requested bytes on large transfers, using a heuristic. - use libecb, and apply lots of minor space optimisations. - disable sendfile on darwin, broken as everything else. - add realpath request and implementation. - cancelled requests will still invoke their request callbacks. - add fallocate. - do not acquire any locks when forking. - incorporated some mingw32 changes by traviscline. - added syncfs support, using direct syscall. - set thread name on linux (ps -L/Hcx, top, gdb). - remove useless use of volatile variables. - fix memory leak when reaping threads. - use utime now uses nanosecond resolution on posix 2008 systems. - allow taking advantage of posix 2008 xxxat functions and fdopendir by implementing a working directory abstraction. - make readahead emulation behave more like actual readahead by never failing. - added EIO_LSEEK (untested). - added EIO_FALLOC_FL_PUNCH_HOLE. - wtf. etp_proc returned 0, and no compiler ever complained. - remove pread/pwrite emulation, as the only system that lacked them (cygwin) provides them for a while now. - provide pread/pwrite implementations for win32. passenger-4.0.37/ext/libeio/config.guess000755 000765 000024 00000130145 12233035540 020603 0ustar00honglistaff000000 000000 #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}" in i?86) test -z "$VENDOR" && VENDOR=pc ;; *) test -z "$VENDOR" && VENDOR=unknown ;; esac test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-${VENDOR}-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-${VENDOR}-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-${VENDOR}-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-${VENDOR}-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-${VENDOR}-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-${VENDOR}-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-${VENDOR}-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-${VENDOR}-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-${VENDOR}-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-${VENDOR}-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-${VENDOR}-osf1mk else echo ${UNAME_MACHINE}-${VENDOR}-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-${VENDOR}-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-${VENDOR}-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-${VENDOR}-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-${VENDOR}-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-${VENDOR}-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-${VENDOR}-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-${VENDOR}-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-${VENDOR}-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi else echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-gnu"; exit; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; padre:Linux:*:*) echo sparc-${VENDOR}-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-${VENDOR}-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-${VENDOR}-linux-gnu ;; PA8*) echo hppa2.0-${VENDOR}-linux-gnu ;; *) echo hppa-${VENDOR}-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-${VENDOR}-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-${VENDOR}-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-${VENDOR}-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-${VENDOR}-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-${VENODR}-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-${VENODR}-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-${VENDOR}-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-${VENDOR}-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-${VENDOR}-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-${VENDOR}-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-${VENDOR}-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-${VENDOR}-tops10 exit ;; *:TENEX:*:*) echo pdp10-${VENDOR}-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-${VENDOR}-tops20 exit ;; *:ITS:*:*) echo pdp10-${VENDOR}-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-${VENDOR}-esx exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: passenger-4.0.37/ext/libeio/config.h.in000644 000765 000024 00000006340 12233035540 020305 0ustar00honglistaff000000 000000 /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* fallocate(2) is available */ #undef HAVE_FALLOCATE /* fdatasync(2) is available */ #undef HAVE_FDATASYNC /* futimes(2) is available */ #undef HAVE_FUTIMES /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* posix_fadvise(2) is available */ #undef HAVE_POSIX_FADVISE /* posix_madvise(2) is available */ #undef HAVE_POSIX_MADVISE /* prctl(PR_SET_NAME) is available */ #undef HAVE_PRCTL_SET_NAME /* pread(2) and pwrite(2) are available */ #undef HAVE_PREADWRITE /* readahead(2) is available (linux) */ #undef HAVE_READAHEAD /* sendfile(2) is available and supported */ #undef HAVE_SENDFILE /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* sync_file_range(2) is available */ #undef HAVE_SYNC_FILE_RANGE /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PRCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* syscall(__NR_syncfs) is available */ #undef HAVE_SYS_SYNCFS /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSCALL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* utimes(2) is available */ #undef HAVE_UTIMES /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE passenger-4.0.37/ext/libeio/config.sub000755 000765 000024 00000105274 12233035540 020253 0ustar00honglistaff000000 000000 #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: passenger-4.0.37/ext/libeio/configure000755 000765 000024 00001530452 12233035540 020200 0ustar00honglistaff000000 000000 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="eio.h" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=libeio VERSION=1.0 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4' macro_revision='1.3293' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' lt_prog_compiler_pic='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$GCC" = xyes ; then CFLAGS="-O3 $CFLAGS" fi for ac_header in stdint.h sys/syscall.h sys/prctl.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5 $as_echo_n "checking for library containing pthread_create... " >&6; } if ${ac_cv_search_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF for ac_lib in '' pthread pthreads pthreadVC2; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_create=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_create+:} false; then : break fi done if ${ac_cv_search_pthread_create+:} false; then : else ac_cv_search_pthread_create=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_create" >&5 $as_echo "$ac_cv_search_pthread_create" >&6; } ac_res=$ac_cv_search_pthread_create if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pthread functions not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimes" >&5 $as_echo_n "checking for utimes... " >&6; } if ${ac_cv_utimes+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include struct timeval tv[2]; int res; int main (void) { res = utimes ("/", tv); return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_utimes=yes else ac_cv_utimes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_utimes" >&5 $as_echo "$ac_cv_utimes" >&6; } test $ac_cv_utimes = yes && $as_echo "#define HAVE_UTIMES 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for futimes" >&5 $as_echo_n "checking for futimes... " >&6; } if ${ac_cv_futimes+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include struct timeval tv[2]; int res; int fd; int main (void) { res = futimes (fd, tv); return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_futimes=yes else ac_cv_futimes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_futimes" >&5 $as_echo "$ac_cv_futimes" >&6; } test $ac_cv_futimes = yes && $as_echo "#define HAVE_FUTIMES 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readahead" >&5 $as_echo_n "checking for readahead... " >&6; } if ${ac_cv_readahead+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int fd = 0; size_t count = 2; ssize_t res; res = readahead (fd, 0, count); return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_readahead=yes else ac_cv_readahead=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readahead" >&5 $as_echo "$ac_cv_readahead" >&6; } test $ac_cv_readahead = yes && $as_echo "#define HAVE_READAHEAD 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5 $as_echo_n "checking for fdatasync... " >&6; } if ${ac_cv_fdatasync+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int fd = 0; fdatasync (fd); return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_fdatasync=yes else ac_cv_fdatasync=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fdatasync" >&5 $as_echo "$ac_cv_fdatasync" >&6; } test $ac_cv_fdatasync = yes && $as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pread and pwrite" >&5 $as_echo_n "checking for pread and pwrite... " >&6; } if ${ac_cv_preadwrite+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int fd = 0; size_t count = 1; char buf; off_t offset = 1; ssize_t res; res = pread (fd, &buf, count, offset); res = pwrite (fd, &buf, count, offset); return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_preadwrite=yes else ac_cv_preadwrite=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_preadwrite" >&5 $as_echo "$ac_cv_preadwrite" >&6; } test $ac_cv_preadwrite = yes && $as_echo "#define HAVE_PREADWRITE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile" >&5 $as_echo_n "checking for sendfile... " >&6; } if ${ac_cv_sendfile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # include #if __linux # include #elif __FreeBSD__ || defined __APPLE__ # include # include #elif __hpux # include #else # error unsupported architecture #endif int main (void) { int fd = 0; off_t offset = 1; size_t count = 2; ssize_t res; #if __linux res = sendfile (fd, fd, offset, count); #elif __FreeBSD__ res = sendfile (fd, fd, offset, count, 0, &offset, 0); #elif __hpux res = sendfile (fd, fd, offset, count, 0, 0); #endif return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sendfile=yes else ac_cv_sendfile=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sendfile" >&5 $as_echo "$ac_cv_sendfile" >&6; } test $ac_cv_sendfile = yes && $as_echo "#define HAVE_SENDFILE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sync_file_range" >&5 $as_echo_n "checking for sync_file_range... " >&6; } if ${ac_cv_sync_file_range+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int fd = 0; off64_t offset = 1; off64_t nbytes = 1; unsigned int flags = SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER; ssize_t res; res = sync_file_range (fd, offset, nbytes, flags); return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sync_file_range=yes else ac_cv_sync_file_range=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sync_file_range" >&5 $as_echo "$ac_cv_sync_file_range" >&6; } test $ac_cv_sync_file_range = yes && $as_echo "#define HAVE_SYNC_FILE_RANGE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fallocate" >&5 $as_echo_n "checking for fallocate... " >&6; } if ${ac_cv_fallocate+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int fd = 0; int mode = 0; off_t offset = 1; off_t len = 1; int res; res = fallocate (fd, mode, offset, len); return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_fallocate=yes else ac_cv_fallocate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fallocate" >&5 $as_echo "$ac_cv_fallocate" >&6; } test $ac_cv_fallocate = yes && $as_echo "#define HAVE_FALLOCATE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_syncfs" >&5 $as_echo_n "checking for sys_syncfs... " >&6; } if ${ac_cv_sys_syncfs+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { int res = syscall (__NR_syncfs, (int)0); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_sys_syncfs=yes else ac_cv_sys_syncfs=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_syncfs" >&5 $as_echo "$ac_cv_sys_syncfs" >&6; } test $ac_cv_sys_syncfs = yes && $as_echo "#define HAVE_SYS_SYNCFS 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prctl_set_name" >&5 $as_echo_n "checking for prctl_set_name... " >&6; } if ${ac_cv_prctl_set_name+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { char name = "test123"; int res = prctl (PR_SET_NAME, (unsigned long)name, 0, 0, 0); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_prctl_set_name=yes else ac_cv_prctl_set_name=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prctl_set_name" >&5 $as_echo "$ac_cv_prctl_set_name" >&6; } test $ac_cv_prctl_set_name = yes && $as_echo "#define HAVE_PRCTL_SET_NAME 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for posix_madvise" >&5 $as_echo_n "checking for posix_madvise... " >&6; } if ${ac_cv_posix_madvise+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int res = posix_madvise ((void *)0, (size_t)0, POSIX_MADV_NORMAL); int a = POSIX_MADV_SEQUENTIAL; int b = POSIX_MADV_RANDOM; int c = POSIX_MADV_WILLNEED; int d = POSIX_MADV_DONTNEED; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_posix_madvise=yes else ac_cv_posix_madvise=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_madvise" >&5 $as_echo "$ac_cv_posix_madvise" >&6; } test $ac_cv_posix_madvise = yes && $as_echo "#define HAVE_POSIX_MADVISE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for posix_fadvise" >&5 $as_echo_n "checking for posix_fadvise... " >&6; } if ${ac_cv_posix_fadvise+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 600 #include int main (void) { int res = posix_fadvise ((int)0, (off_t)0, (off_t)0, POSIX_FADV_NORMAL); int a = POSIX_FADV_SEQUENTIAL; int b = POSIX_FADV_NOREUSE; int c = POSIX_FADV_RANDOM; int d = POSIX_FADV_WILLNEED; int e = POSIX_FADV_DONTNEED; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_posix_fadvise=yes else ac_cv_posix_fadvise=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_fadvise" >&5 $as_echo "$ac_cv_posix_fadvise" >&6; } test $ac_cv_posix_fadvise = yes && $as_echo "#define HAVE_POSIX_FADVISE 1" >>confdefs.h ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi passenger-4.0.37/ext/libeio/configure.ac000644 000765 000024 00000000446 12233035540 020551 0ustar00honglistaff000000 000000 AC_PREREQ(2.59) AC_INIT AC_CONFIG_SRCDIR([eio.h]) AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE(libeio,1.0) AM_MAINTAINER_MODE AC_GNU_SOURCE AC_PROG_LIBTOOL AC_PROG_CC if test "x$GCC" = xyes ; then CFLAGS="-O3 $CFLAGS" fi m4_include([libeio.m4]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT passenger-4.0.37/ext/libeio/demo.c000644 000765 000024 00000011417 12233035540 017353 0ustar00honglistaff000000 000000 #include #include #include #include #include #include #include #include #include #include "eio.h" int respipe [2]; void want_poll (void) { char dummy; printf ("want_poll ()\n"); write (respipe [1], &dummy, 1); } void done_poll (void) { char dummy; printf ("done_poll ()\n"); read (respipe [0], &dummy, 1); } void event_loop (void) { // an event loop. yeah. struct pollfd pfd; pfd.fd = respipe [0]; pfd.events = POLLIN; printf ("\nentering event loop\n"); while (eio_nreqs ()) { poll (&pfd, 1, -1); printf ("eio_poll () = %d\n", eio_poll ()); } printf ("leaving event loop\n"); } int res_cb (eio_req *req) { printf ("res_cb(%d|%s) = %d\n", req->type, req->data ? req->data : "?", EIO_RESULT (req)); if (req->result < 0) abort (); return 0; } int readdir_cb (eio_req *req) { char *buf = (char *)EIO_BUF (req); printf ("readdir_cb = %d\n", EIO_RESULT (req)); if (EIO_RESULT (req) < 0) return 0; while (EIO_RESULT (req)--) { printf ("readdir = <%s>\n", buf); buf += strlen (buf) + 1; } return 0; } int stat_cb (eio_req *req) { struct stat *buf = EIO_STAT_BUF (req); if (req->type == EIO_FSTAT) printf ("fstat_cb = %d\n", EIO_RESULT (req)); else printf ("stat_cb(%s) = %d\n", EIO_PATH (req), EIO_RESULT (req)); if (!EIO_RESULT (req)) printf ("stat size %d perm 0%o\n", buf->st_size, buf->st_mode & 0777); return 0; } int read_cb (eio_req *req) { unsigned char *buf = (unsigned char *)EIO_BUF (req); printf ("read_cb = %d (%02x%02x%02x%02x %02x%02x%02x%02x)\n", EIO_RESULT (req), buf [0], buf [1], buf [2], buf [3], buf [4], buf [5], buf [6], buf [7]); return 0; } int last_fd; int open_cb (eio_req *req) { printf ("open_cb = %d\n", EIO_RESULT (req)); last_fd = EIO_RESULT (req); return 0; } int main (void) { printf ("pipe ()\n"); if (pipe (respipe)) abort (); printf ("eio_init ()\n"); if (eio_init (want_poll, done_poll)) abort (); do { /* avoid relative paths yourself(!) */ eio_mkdir ("eio-test-dir", 0777, 0, res_cb, "mkdir"); eio_nop (0, res_cb, "nop"); event_loop (); eio_stat ("eio-test-dir", 0, stat_cb, "stat"); eio_lstat ("eio-test-dir", 0, stat_cb, "stat"); eio_open ("eio-test-dir/eio-test-file", O_RDWR | O_CREAT, 0777, 0, open_cb, "open"); eio_symlink ("test", "eio-test-dir/eio-symlink", 0, res_cb, "symlink"); eio_mknod ("eio-test-dir/eio-fifo", S_IFIFO, 0, 0, res_cb, "mknod"); event_loop (); eio_utime ("eio-test-dir", 12345.678, 23456.789, 0, res_cb, "utime"); eio_futime (last_fd, 92345.678, 93456.789, 0, res_cb, "futime"); eio_chown ("eio-test-dir", getuid (), getgid (), 0, res_cb, "chown"); eio_fchown (last_fd, getuid (), getgid (), 0, res_cb, "fchown"); eio_fchmod (last_fd, 0723, 0, res_cb, "fchmod"); eio_readdir ("eio-test-dir", 0, 0, readdir_cb, "readdir"); eio_readdir ("/nonexistant", 0, 0, readdir_cb, "readdir"); eio_fstat (last_fd, 0, stat_cb, "stat"); eio_write (last_fd, "test\nfail\n", 10, 4, 0, res_cb, "write"); event_loop (); eio_read (last_fd, 0, 8, 0, EIO_PRI_DEFAULT, read_cb, "read"); eio_readlink ("eio-test-dir/eio-symlink", 0, res_cb, "readlink"); event_loop (); eio_dup2 (1, 2, EIO_PRI_DEFAULT, res_cb, "dup"); // dup stdout to stderr eio_chmod ("eio-test-dir", 0765, 0, res_cb, "chmod"); eio_ftruncate (last_fd, 9, 0, res_cb, "ftruncate"); eio_fdatasync (last_fd, 0, res_cb, "fdatasync"); eio_fsync (last_fd, 0, res_cb, "fsync"); eio_sync (0, res_cb, "sync"); eio_busy (0.5, 0, res_cb, "busy"); event_loop (); eio_sendfile (1, last_fd, 4, 5, 0, res_cb, "sendfile"); // write "test\n" to stdout eio_fstat (last_fd, 0, stat_cb, "stat"); event_loop (); eio_truncate ("eio-test-dir/eio-test-file", 6, 0, res_cb, "truncate"); eio_readahead (last_fd, 0, 64, 0, res_cb, "readahead"); event_loop (); eio_close (last_fd, 0, res_cb, "close"); eio_link ("eio-test-dir/eio-test-file", "eio-test-dir/eio-test-file-2", 0, res_cb, "link"); event_loop (); eio_rename ("eio-test-dir/eio-test-file", "eio-test-dir/eio-test-file-renamed", 0, res_cb, "rename"); event_loop (); eio_unlink ("eio-test-dir/eio-fifo", 0, res_cb, "unlink"); eio_unlink ("eio-test-dir/eio-symlink", 0, res_cb, "unlink"); eio_unlink ("eio-test-dir/eio-test-file-2", 0, res_cb, "unlink"); eio_unlink ("eio-test-dir/eio-test-file-renamed", 0, res_cb, "unlink"); event_loop (); eio_rmdir ("eio-test-dir", 0, res_cb, "rmdir"); event_loop (); } while (0); return 0; } passenger-4.0.37/ext/libeio/ecb.h000644 000765 000024 00000057721 12233035540 017175 0ustar00honglistaff000000 000000 /* * libecb - http://software.schmorp.de/pkg/libecb * * Copyright (©) 2009-2012 Marc Alexander Lehmann * Copyright (©) 2011 Emanuele Giaquinta * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef ECB_H #define ECB_H /* 16 bits major, 16 bits minor */ #define ECB_VERSION 0x00010002 #ifdef _WIN32 typedef signed char int8_t; typedef unsigned char uint8_t; typedef signed short int16_t; typedef unsigned short uint16_t; typedef signed int int32_t; typedef unsigned int uint32_t; #if __GNUC__ typedef signed long long int64_t; typedef unsigned long long uint64_t; #else /* _MSC_VER || __BORLANDC__ */ typedef signed __int64 int64_t; typedef unsigned __int64 uint64_t; #endif #ifdef _WIN64 #define ECB_PTRSIZE 8 typedef uint64_t uintptr_t; typedef int64_t intptr_t; #else #define ECB_PTRSIZE 4 typedef uint32_t uintptr_t; typedef int32_t intptr_t; #endif #else #include #if UINTMAX_MAX > 0xffffffffU #define ECB_PTRSIZE 8 #else #define ECB_PTRSIZE 4 #endif #endif /* many compilers define _GNUC_ to some versions but then only implement * what their idiot authors think are the "more important" extensions, * causing enormous grief in return for some better fake benchmark numbers. * or so. * we try to detect these and simply assume they are not gcc - if they have * an issue with that they should have done it right in the first place. */ #ifndef ECB_GCC_VERSION #if !defined __GNUC_MINOR__ || defined __INTEL_COMPILER || defined __SUNPRO_C || defined __SUNPRO_CC || defined __llvm__ || defined __clang__ #define ECB_GCC_VERSION(major,minor) 0 #else #define ECB_GCC_VERSION(major,minor) (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))) #endif #endif #define ECB_C (__STDC__+0) /* this assumes that __STDC__ is either empty or a number */ #define ECB_C99 (__STDC_VERSION__ >= 199901L) #define ECB_C11 (__STDC_VERSION__ >= 201112L) #define ECB_CPP (__cplusplus+0) #define ECB_CPP11 (__cplusplus >= 201103L) #if ECB_CPP #define ECB_EXTERN_C extern "C" #define ECB_EXTERN_C_BEG ECB_EXTERN_C { #define ECB_EXTERN_C_END } #else #define ECB_EXTERN_C extern #define ECB_EXTERN_C_BEG #define ECB_EXTERN_C_END #endif /*****************************************************************************/ /* ECB_NO_THREADS - ecb is not used by multiple threads, ever */ /* ECB_NO_SMP - ecb might be used in multiple threads, but only on a single cpu */ #if ECB_NO_THREADS #define ECB_NO_SMP 1 #endif #if ECB_NO_SMP #define ECB_MEMORY_FENCE do { } while (0) #endif #ifndef ECB_MEMORY_FENCE #if ECB_GCC_VERSION(2,5) || defined __INTEL_COMPILER || (__llvm__ && __GNUC__) || __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110 #if __i386 || __i386__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("lock; orb $0, -1(%%esp)" : : : "memory") #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory") #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") #elif __amd64 || __amd64__ || __x86_64 || __x86_64__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mfence" : : : "memory") #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("" : : : "memory") #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") #elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory") #elif defined __ARM_ARCH_6__ || defined __ARM_ARCH_6J__ \ || defined __ARM_ARCH_6K__ || defined __ARM_ARCH_6ZK__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mcr p15,0,%0,c7,c10,5" : : "r" (0) : "memory") #elif defined __ARM_ARCH_7__ || defined __ARM_ARCH_7A__ \ || defined __ARM_ARCH_7M__ || defined __ARM_ARCH_7R__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("dmb" : : : "memory") #elif __sparc || __sparc__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad | #StoreStore | #StoreLoad" : : : "memory") #define ECB_MEMORY_FENCE_ACQUIRE __asm__ __volatile__ ("membar #LoadStore | #LoadLoad" : : : "memory") #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("membar #LoadStore | #StoreStore") #elif defined __s390__ || defined __s390x__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("bcr 15,0" : : : "memory") #elif defined __mips__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("sync" : : : "memory") #elif defined __alpha__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mb" : : : "memory") #elif defined __hppa__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("" : : : "memory") #define ECB_MEMORY_FENCE_RELEASE __asm__ __volatile__ ("") #elif defined __ia64__ #define ECB_MEMORY_FENCE __asm__ __volatile__ ("mf" : : : "memory") #endif #endif #endif #ifndef ECB_MEMORY_FENCE #if ECB_GCC_VERSION(4,7) /* see comment below (stdatomic.h) about the C11 memory model. */ #define ECB_MEMORY_FENCE __atomic_thread_fence (__ATOMIC_SEQ_CST) /* The __has_feature syntax from clang is so misdesigned that we cannot use it * without risking compile time errors with other compilers. We *could* * define our own ecb_clang_has_feature, but I just can't be bothered to work * around this shit time and again. * #elif defined __clang && __has_feature (cxx_atomic) * // see comment below (stdatomic.h) about the C11 memory model. * #define ECB_MEMORY_FENCE __c11_atomic_thread_fence (__ATOMIC_SEQ_CST) */ #elif ECB_GCC_VERSION(4,4) || defined __INTEL_COMPILER || defined __clang__ #define ECB_MEMORY_FENCE __sync_synchronize () #elif _MSC_VER >= 1400 /* VC++ 2005 */ #pragma intrinsic(_ReadBarrier,_WriteBarrier,_ReadWriteBarrier) #define ECB_MEMORY_FENCE _ReadWriteBarrier () #define ECB_MEMORY_FENCE_ACQUIRE _ReadWriteBarrier () /* according to msdn, _ReadBarrier is not a load fence */ #define ECB_MEMORY_FENCE_RELEASE _WriteBarrier () #elif defined _WIN32 #include #define ECB_MEMORY_FENCE MemoryBarrier () /* actually just xchg on x86... scary */ #elif __SUNPRO_C >= 0x5110 || __SUNPRO_CC >= 0x5110 #include #define ECB_MEMORY_FENCE __machine_rw_barrier () #define ECB_MEMORY_FENCE_ACQUIRE __machine_r_barrier () #define ECB_MEMORY_FENCE_RELEASE __machine_w_barrier () #elif __xlC__ #define ECB_MEMORY_FENCE __sync () #endif #endif #ifndef ECB_MEMORY_FENCE #if ECB_C11 && !defined __STDC_NO_ATOMICS__ /* we assume that these memory fences work on all variables/all memory accesses, */ /* not just C11 atomics and atomic accesses */ #include /* Unfortunately, neither gcc 4.7 nor clang 3.1 generate any instructions for */ /* any fence other than seq_cst, which isn't very efficient for us. */ /* Why that is, we don't know - either the C11 memory model is quite useless */ /* for most usages, or gcc and clang have a bug */ /* I *currently* lean towards the latter, and inefficiently implement */ /* all three of ecb's fences as a seq_cst fence */ #define ECB_MEMORY_FENCE atomic_thread_fence (memory_order_seq_cst) #endif #endif #ifndef ECB_MEMORY_FENCE #if !ECB_AVOID_PTHREADS /* * if you get undefined symbol references to pthread_mutex_lock, * or failure to find pthread.h, then you should implement * the ECB_MEMORY_FENCE operations for your cpu/compiler * OR provide pthread.h and link against the posix thread library * of your system. */ #include #define ECB_NEEDS_PTHREADS 1 #define ECB_MEMORY_FENCE_NEEDS_PTHREADS 1 static pthread_mutex_t ecb_mf_lock = PTHREAD_MUTEX_INITIALIZER; #define ECB_MEMORY_FENCE do { pthread_mutex_lock (&ecb_mf_lock); pthread_mutex_unlock (&ecb_mf_lock); } while (0) #endif #endif #if !defined ECB_MEMORY_FENCE_ACQUIRE && defined ECB_MEMORY_FENCE #define ECB_MEMORY_FENCE_ACQUIRE ECB_MEMORY_FENCE #endif #if !defined ECB_MEMORY_FENCE_RELEASE && defined ECB_MEMORY_FENCE #define ECB_MEMORY_FENCE_RELEASE ECB_MEMORY_FENCE #endif /*****************************************************************************/ #if __cplusplus #define ecb_inline static inline #elif ECB_GCC_VERSION(2,5) #define ecb_inline static __inline__ #elif ECB_C99 #define ecb_inline static inline #else #define ecb_inline static #endif #if ECB_GCC_VERSION(3,3) #define ecb_restrict __restrict__ #elif ECB_C99 #define ecb_restrict restrict #else #define ecb_restrict #endif typedef int ecb_bool; #define ECB_CONCAT_(a, b) a ## b #define ECB_CONCAT(a, b) ECB_CONCAT_(a, b) #define ECB_STRINGIFY_(a) # a #define ECB_STRINGIFY(a) ECB_STRINGIFY_(a) #define ecb_function_ ecb_inline #if ECB_GCC_VERSION(3,1) #define ecb_attribute(attrlist) __attribute__(attrlist) #define ecb_is_constant(expr) __builtin_constant_p (expr) #define ecb_expect(expr,value) __builtin_expect ((expr),(value)) #define ecb_prefetch(addr,rw,locality) __builtin_prefetch (addr, rw, locality) #else #define ecb_attribute(attrlist) #define ecb_is_constant(expr) 0 #define ecb_expect(expr,value) (expr) #define ecb_prefetch(addr,rw,locality) #endif /* no emulation for ecb_decltype */ #if ECB_GCC_VERSION(4,5) #define ecb_decltype(x) __decltype(x) #elif ECB_GCC_VERSION(3,0) #define ecb_decltype(x) __typeof(x) #endif #define ecb_noinline ecb_attribute ((__noinline__)) #define ecb_unused ecb_attribute ((__unused__)) #define ecb_const ecb_attribute ((__const__)) #define ecb_pure ecb_attribute ((__pure__)) #if ECB_C11 #define ecb_noreturn _Noreturn #else #define ecb_noreturn ecb_attribute ((__noreturn__)) #endif #if ECB_GCC_VERSION(4,3) #define ecb_artificial ecb_attribute ((__artificial__)) #define ecb_hot ecb_attribute ((__hot__)) #define ecb_cold ecb_attribute ((__cold__)) #else #define ecb_artificial #define ecb_hot #define ecb_cold #endif /* put around conditional expressions if you are very sure that the */ /* expression is mostly true or mostly false. note that these return */ /* booleans, not the expression. */ #define ecb_expect_false(expr) ecb_expect (!!(expr), 0) #define ecb_expect_true(expr) ecb_expect (!!(expr), 1) /* for compatibility to the rest of the world */ #define ecb_likely(expr) ecb_expect_true (expr) #define ecb_unlikely(expr) ecb_expect_false (expr) /* count trailing zero bits and count # of one bits */ #if ECB_GCC_VERSION(3,4) /* we assume int == 32 bit, long == 32 or 64 bit and long long == 64 bit */ #define ecb_ld32(x) (__builtin_clz (x) ^ 31) #define ecb_ld64(x) (__builtin_clzll (x) ^ 63) #define ecb_ctz32(x) __builtin_ctz (x) #define ecb_ctz64(x) __builtin_ctzll (x) #define ecb_popcount32(x) __builtin_popcount (x) /* no popcountll */ #else ecb_function_ int ecb_ctz32 (uint32_t x) ecb_const; ecb_function_ int ecb_ctz32 (uint32_t x) { int r = 0; x &= ~x + 1; /* this isolates the lowest bit */ #if ECB_branchless_on_i386 r += !!(x & 0xaaaaaaaa) << 0; r += !!(x & 0xcccccccc) << 1; r += !!(x & 0xf0f0f0f0) << 2; r += !!(x & 0xff00ff00) << 3; r += !!(x & 0xffff0000) << 4; #else if (x & 0xaaaaaaaa) r += 1; if (x & 0xcccccccc) r += 2; if (x & 0xf0f0f0f0) r += 4; if (x & 0xff00ff00) r += 8; if (x & 0xffff0000) r += 16; #endif return r; } ecb_function_ int ecb_ctz64 (uint64_t x) ecb_const; ecb_function_ int ecb_ctz64 (uint64_t x) { int shift = x & 0xffffffffU ? 0 : 32; return ecb_ctz32 (x >> shift) + shift; } ecb_function_ int ecb_popcount32 (uint32_t x) ecb_const; ecb_function_ int ecb_popcount32 (uint32_t x) { x -= (x >> 1) & 0x55555555; x = ((x >> 2) & 0x33333333) + (x & 0x33333333); x = ((x >> 4) + x) & 0x0f0f0f0f; x *= 0x01010101; return x >> 24; } ecb_function_ int ecb_ld32 (uint32_t x) ecb_const; ecb_function_ int ecb_ld32 (uint32_t x) { int r = 0; if (x >> 16) { x >>= 16; r += 16; } if (x >> 8) { x >>= 8; r += 8; } if (x >> 4) { x >>= 4; r += 4; } if (x >> 2) { x >>= 2; r += 2; } if (x >> 1) { r += 1; } return r; } ecb_function_ int ecb_ld64 (uint64_t x) ecb_const; ecb_function_ int ecb_ld64 (uint64_t x) { int r = 0; if (x >> 32) { x >>= 32; r += 32; } return r + ecb_ld32 (x); } #endif ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) ecb_const; ecb_function_ ecb_bool ecb_is_pot32 (uint32_t x) { return !(x & (x - 1)); } ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) ecb_const; ecb_function_ ecb_bool ecb_is_pot64 (uint64_t x) { return !(x & (x - 1)); } ecb_function_ uint8_t ecb_bitrev8 (uint8_t x) ecb_const; ecb_function_ uint8_t ecb_bitrev8 (uint8_t x) { return ( (x * 0x0802U & 0x22110U) | (x * 0x8020U & 0x88440U)) * 0x10101U >> 16; } ecb_function_ uint16_t ecb_bitrev16 (uint16_t x) ecb_const; ecb_function_ uint16_t ecb_bitrev16 (uint16_t x) { x = ((x >> 1) & 0x5555) | ((x & 0x5555) << 1); x = ((x >> 2) & 0x3333) | ((x & 0x3333) << 2); x = ((x >> 4) & 0x0f0f) | ((x & 0x0f0f) << 4); x = ( x >> 8 ) | ( x << 8); return x; } ecb_function_ uint32_t ecb_bitrev32 (uint32_t x) ecb_const; ecb_function_ uint32_t ecb_bitrev32 (uint32_t x) { x = ((x >> 1) & 0x55555555) | ((x & 0x55555555) << 1); x = ((x >> 2) & 0x33333333) | ((x & 0x33333333) << 2); x = ((x >> 4) & 0x0f0f0f0f) | ((x & 0x0f0f0f0f) << 4); x = ((x >> 8) & 0x00ff00ff) | ((x & 0x00ff00ff) << 8); x = ( x >> 16 ) | ( x << 16); return x; } /* popcount64 is only available on 64 bit cpus as gcc builtin */ /* so for this version we are lazy */ ecb_function_ int ecb_popcount64 (uint64_t x) ecb_const; ecb_function_ int ecb_popcount64 (uint64_t x) { return ecb_popcount32 (x) + ecb_popcount32 (x >> 32); } ecb_inline uint8_t ecb_rotl8 (uint8_t x, unsigned int count) ecb_const; ecb_inline uint8_t ecb_rotr8 (uint8_t x, unsigned int count) ecb_const; ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) ecb_const; ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) ecb_const; ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) ecb_const; ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) ecb_const; ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) ecb_const; ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) ecb_const; ecb_inline uint8_t ecb_rotl8 (uint8_t x, unsigned int count) { return (x >> ( 8 - count)) | (x << count); } ecb_inline uint8_t ecb_rotr8 (uint8_t x, unsigned int count) { return (x << ( 8 - count)) | (x >> count); } ecb_inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) { return (x >> (16 - count)) | (x << count); } ecb_inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) { return (x << (16 - count)) | (x >> count); } ecb_inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) { return (x >> (32 - count)) | (x << count); } ecb_inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) { return (x << (32 - count)) | (x >> count); } ecb_inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) { return (x >> (64 - count)) | (x << count); } ecb_inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << (64 - count)) | (x >> count); } #if ECB_GCC_VERSION(4,3) #define ecb_bswap16(x) (__builtin_bswap32 (x) >> 16) #define ecb_bswap32(x) __builtin_bswap32 (x) #define ecb_bswap64(x) __builtin_bswap64 (x) #else ecb_function_ uint16_t ecb_bswap16 (uint16_t x) ecb_const; ecb_function_ uint16_t ecb_bswap16 (uint16_t x) { return ecb_rotl16 (x, 8); } ecb_function_ uint32_t ecb_bswap32 (uint32_t x) ecb_const; ecb_function_ uint32_t ecb_bswap32 (uint32_t x) { return (((uint32_t)ecb_bswap16 (x)) << 16) | ecb_bswap16 (x >> 16); } ecb_function_ uint64_t ecb_bswap64 (uint64_t x) ecb_const; ecb_function_ uint64_t ecb_bswap64 (uint64_t x) { return (((uint64_t)ecb_bswap32 (x)) << 32) | ecb_bswap32 (x >> 32); } #endif #if ECB_GCC_VERSION(4,5) #define ecb_unreachable() __builtin_unreachable () #else /* this seems to work fine, but gcc always emits a warning for it :/ */ ecb_inline void ecb_unreachable (void) ecb_noreturn; ecb_inline void ecb_unreachable (void) { } #endif /* try to tell the compiler that some condition is definitely true */ #define ecb_assume(cond) if (!(cond)) ecb_unreachable (); else 0 ecb_inline unsigned char ecb_byteorder_helper (void) ecb_const; ecb_inline unsigned char ecb_byteorder_helper (void) { /* the union code still generates code under pressure in gcc, */ /* but less than using pointers, and always seems to */ /* successfully return a constant. */ /* the reason why we have this horrible preprocessor mess */ /* is to avoid it in all cases, at least on common architectures */ /* or when using a recent enough gcc version (>= 4.6) */ #if __i386 || __i386__ || _M_X86 || __amd64 || __amd64__ || _M_X64 return 0x44; #elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ return 0x44; #elif __BYTE_ORDER__ && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ return 0x11; #else union { uint32_t i; uint8_t c; } u = { 0x11223344 }; return u.c; #endif } ecb_inline ecb_bool ecb_big_endian (void) ecb_const; ecb_inline ecb_bool ecb_big_endian (void) { return ecb_byteorder_helper () == 0x11; } ecb_inline ecb_bool ecb_little_endian (void) ecb_const; ecb_inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () == 0x44; } #if ECB_GCC_VERSION(3,0) || ECB_C99 #define ecb_mod(m,n) ((m) % (n) + ((m) % (n) < 0 ? (n) : 0)) #else #define ecb_mod(m,n) ((m) < 0 ? ((n) - 1 - ((-1 - (m)) % (n))) : ((m) % (n))) #endif #if __cplusplus template static inline T ecb_div_rd (T val, T div) { return val < 0 ? - ((-val + div - 1) / div) : (val ) / div; } template static inline T ecb_div_ru (T val, T div) { return val < 0 ? - ((-val ) / div) : (val + div - 1) / div; } #else #define ecb_div_rd(val,div) ((val) < 0 ? - ((-(val) + (div) - 1) / (div)) : ((val) ) / (div)) #define ecb_div_ru(val,div) ((val) < 0 ? - ((-(val) ) / (div)) : ((val) + (div) - 1) / (div)) #endif #if ecb_cplusplus_does_not_suck /* does not work for local types (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm) */ template static inline int ecb_array_length (const T (&arr)[N]) { return N; } #else #define ecb_array_length(name) (sizeof (name) / sizeof (name [0])) #endif /*******************************************************************************/ /* floating point stuff, can be disabled by defining ECB_NO_LIBM */ /* basically, everything uses "ieee pure-endian" floating point numbers */ /* the only noteworthy exception is ancient armle, which uses order 43218765 */ #if 0 \ || __i386 || __i386__ \ || __amd64 || __amd64__ || __x86_64 || __x86_64__ \ || __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__ \ || defined __arm__ && defined __ARM_EABI__ \ || defined __s390__ || defined __s390x__ \ || defined __mips__ \ || defined __alpha__ \ || defined __hppa__ \ || defined __ia64__ \ || defined _M_IX86 || defined _M_AMD64 || defined _M_IA64 #define ECB_STDFP 1 #include /* for memcpy */ #else #define ECB_STDFP 0 #include /* for frexp*, ldexp* */ #endif #ifndef ECB_NO_LIBM /* convert a float to ieee single/binary32 */ ecb_function_ uint32_t ecb_float_to_binary32 (float x) ecb_const; ecb_function_ uint32_t ecb_float_to_binary32 (float x) { uint32_t r; #if ECB_STDFP memcpy (&r, &x, 4); #else /* slow emulation, works for anything but -0 */ uint32_t m; int e; if (x == 0e0f ) return 0x00000000U; if (x > +3.40282346638528860e+38f) return 0x7f800000U; if (x < -3.40282346638528860e+38f) return 0xff800000U; if (x != x ) return 0x7fbfffffU; m = frexpf (x, &e) * 0x1000000U; r = m & 0x80000000U; if (r) m = -m; if (e <= -126) { m &= 0xffffffU; m >>= (-125 - e); e = -126; } r |= (e + 126) << 23; r |= m & 0x7fffffU; #endif return r; } /* converts an ieee single/binary32 to a float */ ecb_function_ float ecb_binary32_to_float (uint32_t x) ecb_const; ecb_function_ float ecb_binary32_to_float (uint32_t x) { float r; #if ECB_STDFP memcpy (&r, &x, 4); #else /* emulation, only works for normals and subnormals and +0 */ int neg = x >> 31; int e = (x >> 23) & 0xffU; x &= 0x7fffffU; if (e) x |= 0x800000U; else e = 1; /* we distrust ldexpf a bit and do the 2**-24 scaling by an extra multiply */ r = ldexpf (x * (0.5f / 0x800000U), e - 126); r = neg ? -r : r; #endif return r; } /* convert a double to ieee double/binary64 */ ecb_function_ uint64_t ecb_double_to_binary64 (double x) ecb_const; ecb_function_ uint64_t ecb_double_to_binary64 (double x) { uint64_t r; #if ECB_STDFP memcpy (&r, &x, 8); #else /* slow emulation, works for anything but -0 */ uint64_t m; int e; if (x == 0e0 ) return 0x0000000000000000U; if (x > +1.79769313486231470e+308) return 0x7ff0000000000000U; if (x < -1.79769313486231470e+308) return 0xfff0000000000000U; if (x != x ) return 0X7ff7ffffffffffffU; m = frexp (x, &e) * 0x20000000000000U; r = m & 0x8000000000000000;; if (r) m = -m; if (e <= -1022) { m &= 0x1fffffffffffffU; m >>= (-1021 - e); e = -1022; } r |= ((uint64_t)(e + 1022)) << 52; r |= m & 0xfffffffffffffU; #endif return r; } /* converts an ieee double/binary64 to a double */ ecb_function_ double ecb_binary64_to_double (uint64_t x) ecb_const; ecb_function_ double ecb_binary64_to_double (uint64_t x) { double r; #if ECB_STDFP memcpy (&r, &x, 8); #else /* emulation, only works for normals and subnormals and +0 */ int neg = x >> 63; int e = (x >> 52) & 0x7ffU; x &= 0xfffffffffffffU; if (e) x |= 0x10000000000000U; else e = 1; /* we distrust ldexp a bit and do the 2**-53 scaling by an extra multiply */ r = ldexp (x * (0.5 / 0x10000000000000U), e - 1022); r = neg ? -r : r; #endif return r; } #endif #endif passenger-4.0.37/ext/libeio/eio.c000644 000765 000024 00000210422 12233035540 017200 0ustar00honglistaff000000 000000 /* * libeio implementation * * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #ifndef _WIN32 # include "config.h" #endif #include "eio.h" #include "ecb.h" #ifdef EIO_STACKSIZE # define X_STACKSIZE EIO_STACKSIZE #endif #include "xthread.h" #include #include #include #include #include #include #include #include #include #include /* intptr_t comes from unistd.h, says POSIX/UNIX/tradition */ /* intptr_t only comes from stdint.h, says idiot openbsd coder */ #if HAVE_STDINT_H # include #endif #ifndef ECANCELED # define ECANCELED EDOM #endif #ifndef ELOOP # define ELOOP EDOM #endif #if !defined(ENOTSOCK) && defined(WSAENOTSOCK) # define ENOTSOCK WSAENOTSOCK #endif static void eio_destroy (eio_req *req); #ifndef EIO_FINISH # define EIO_FINISH(req) ((req)->finish) && !EIO_CANCELLED (req) ? (req)->finish (req) : 0 #endif #ifndef EIO_DESTROY # define EIO_DESTROY(req) do { if ((req)->destroy) (req)->destroy (req); } while (0) #endif #ifndef EIO_FEED # define EIO_FEED(req) do { if ((req)->feed ) (req)->feed (req); } while (0) #endif #ifndef EIO_FD_TO_WIN32_HANDLE # define EIO_FD_TO_WIN32_HANDLE(fd) _get_osfhandle (fd) #endif #ifndef EIO_WIN32_HANDLE_TO_FD # define EIO_WIN32_HANDLE_TO_FD(handle) _open_osfhandle (handle, 0) #endif #define EIO_ERRNO(errval,retval) ((errno = errval), retval) #define EIO_ENOSYS() EIO_ERRNO (ENOSYS, -1) #ifdef _WIN32 #undef PAGESIZE #define PAGESIZE 4096 /* GetSystemInfo? */ /* TODO: look at how perl does stat (non-sloppy), unlink (ro-files), utime, link */ #ifdef EIO_STRUCT_STATI64 /* look at perl's non-sloppy stat */ #define stat(path,buf) _stati64 (path,buf) #define fstat(fd,buf) _fstati64 (fd,buf) #endif #define lstat(path,buf) stat (path,buf) #define fsync(fd) (FlushFileBuffers ((HANDLE)EIO_FD_TO_WIN32_HANDLE (fd)) ? 0 : EIO_ERRNO (EBADF, -1)) #define mkdir(path,mode) _mkdir (path) #define link(old,neu) (CreateHardLink (neu, old, 0) ? 0 : EIO_ERRNO (ENOENT, -1)) #define chmod(path,mode) _chmod (path, mode) #define dup(fd) _dup (fd) #define dup2(fd1,fd2) _dup2 (fd1, fd2) #define fchmod(fd,mode) EIO_ENOSYS () #define chown(path,uid,gid) EIO_ENOSYS () #define fchown(fd,uid,gid) EIO_ENOSYS () #define truncate(path,offs) EIO_ENOSYS () /* far-miss: SetEndOfFile */ #define ftruncate(fd,offs) EIO_ENOSYS () /* near-miss: SetEndOfFile */ #define mknod(path,mode,dev) EIO_ENOSYS () #define sync() EIO_ENOSYS () #define readlink(path,buf,s) EIO_ENOSYS () #define statvfs(path,buf) EIO_ENOSYS () #define fstatvfs(fd,buf) EIO_ENOSYS () #define pread(fd,buf,count,offset) eio__pread (fd, buf, count, offset) #define pwrite(fd,buf,count,offset) eio__pwrite (fd, buf, count, offset) #if __GNUC__ typedef long long eio_off_t; /* signed for compatibility to msvc */ #else typedef __int64 eio_off_t; /* unsigned not supported by msvc */ #endif static eio_ssize_t eio__pread (int fd, void *buf, eio_ssize_t count, eio_off_t offset) { OVERLAPPED o = { 0 }; DWORD got; o.Offset = offset; o.OffsetHigh = offset >> 32; return ReadFile ((HANDLE)EIO_FD_TO_WIN32_HANDLE (fd), buf, count, &got, &o) ? got : -1; } static eio_ssize_t eio__pwrite (int fd, void *buf, eio_ssize_t count, eio_off_t offset) { OVERLAPPED o = { 0 }; DWORD got; o.Offset = offset; o.OffsetHigh = offset >> 32; return WriteFile ((HANDLE)EIO_FD_TO_WIN32_HANDLE (fd), buf, count, &got, &o) ? got : -1; } /* rename() uses MoveFile, which fails to overwrite */ #define rename(old,neu) eio__rename (old, neu) static int eio__rename (const char *old, const char *neu) { if (MoveFileEx (old, neu, MOVEFILE_REPLACE_EXISTING)) return 0; /* should steal _dosmaperr */ switch (GetLastError ()) { case ERROR_FILE_NOT_FOUND: case ERROR_PATH_NOT_FOUND: case ERROR_INVALID_DRIVE: case ERROR_NO_MORE_FILES: case ERROR_BAD_NETPATH: case ERROR_BAD_NET_NAME: case ERROR_BAD_PATHNAME: case ERROR_FILENAME_EXCED_RANGE: errno = ENOENT; break; default: errno = EACCES; break; } return -1; } /* we could even stat and see if it exists */ static int symlink (const char *old, const char *neu) { #if WINVER >= 0x0600 if (CreateSymbolicLink (neu, old, 1)) return 0; if (CreateSymbolicLink (neu, old, 0)) return 0; #endif return EIO_ERRNO (ENOENT, -1); } /* POSIX API only */ #define CreateHardLink(neu,old,flags) 0 #define CreateSymbolicLink(neu,old,flags) 0 struct statvfs { int dummy; }; #define DT_DIR EIO_DT_DIR #define DT_REG EIO_DT_REG #define D_NAME(entp) entp.cFileName #define D_TYPE(entp) (entp.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? DT_DIR : DT_REG) #else #include #include #include #include #include #include #if _POSIX_MEMLOCK || _POSIX_MEMLOCK_RANGE || _POSIX_MAPPED_FILES #include #endif #define D_NAME(entp) entp->d_name /* POSIX_SOURCE is useless on bsd's, and XOPEN_SOURCE is unreliable there, too */ #if __FreeBSD__ || __NetBSD__ || __OpenBSD__ #define _DIRENT_HAVE_D_TYPE /* sigh */ #define D_INO(de) (de)->d_fileno #define D_NAMLEN(de) (de)->d_namlen #elif __linux || defined d_ino || _XOPEN_SOURCE >= 600 #define D_INO(de) (de)->d_ino #endif #ifdef _D_EXACT_NAMLEN #undef D_NAMLEN #define D_NAMLEN(de) _D_EXACT_NAMLEN (de) #endif #ifdef _DIRENT_HAVE_D_TYPE #define D_TYPE(de) (de)->d_type #endif #ifndef EIO_STRUCT_DIRENT #define EIO_STRUCT_DIRENT struct dirent #endif #endif #if HAVE_UTIMES # include #endif #if HAVE_SYS_SYSCALL_H # include #endif #if HAVE_SYS_PRCTL_H # include #endif #if HAVE_SENDFILE # if __linux # include # elif __FreeBSD__ || defined __APPLE__ # include # include # elif __hpux # include # elif __solaris # include # else # error sendfile support requested but not available # endif #endif #ifndef D_TYPE # define D_TYPE(de) 0 #endif #ifndef D_INO # define D_INO(de) 0 #endif #ifndef D_NAMLEN # define D_NAMLEN(entp) strlen (D_NAME (entp)) #endif /* used for struct dirent, AIX doesn't provide it */ #ifndef NAME_MAX # define NAME_MAX 4096 #endif /* used for readlink etc. */ #ifndef PATH_MAX # define PATH_MAX 4096 #endif /* buffer size for various temporary buffers */ #define EIO_BUFSIZE 65536 #define dBUF \ char *eio_buf = malloc (EIO_BUFSIZE); \ errno = ENOMEM; \ if (!eio_buf) \ return -1 #define FUBd \ free (eio_buf) #define EIO_TICKS ((1000000 + 1023) >> 10) /*****************************************************************************/ struct tmpbuf { void *ptr; int len; }; static void * tmpbuf_get (struct tmpbuf *buf, int len) { if (buf->len < len) { free (buf->ptr); buf->ptr = malloc (buf->len = len); } return buf->ptr; } struct tmpbuf; #if _POSIX_VERSION >= 200809L #define HAVE_AT 1 #define WD2FD(wd) ((wd) ? (wd)->fd : AT_FDCWD) #ifndef O_SEARCH #define O_SEARCH O_RDONLY #endif #else #define HAVE_AT 0 static const char *wd_expand (struct tmpbuf *tmpbuf, eio_wd wd, const char *path); #endif struct eio_pwd { #if HAVE_AT int fd; #endif int len; char str[1]; /* actually, a 0-terminated canonical path */ }; /*****************************************************************************/ #define ETP_PRI_MIN EIO_PRI_MIN #define ETP_PRI_MAX EIO_PRI_MAX struct etp_worker; #define ETP_REQ eio_req #define ETP_DESTROY(req) eio_destroy (req) static int eio_finish (eio_req *req); #define ETP_FINISH(req) eio_finish (req) static void eio_execute (struct etp_worker *self, eio_req *req); #define ETP_EXECUTE(wrk,req) eio_execute (wrk,req) /*****************************************************************************/ #define ETP_NUM_PRI (ETP_PRI_MAX - ETP_PRI_MIN + 1) /* calculate time difference in ~1/EIO_TICKS of a second */ ecb_inline int tvdiff (struct timeval *tv1, struct timeval *tv2) { return (tv2->tv_sec - tv1->tv_sec ) * EIO_TICKS + ((tv2->tv_usec - tv1->tv_usec) >> 10); } static unsigned int started, idle, wanted = 4; static void (*want_poll_cb) (void); static void (*done_poll_cb) (void); static unsigned int max_poll_time; /* reslock */ static unsigned int max_poll_reqs; /* reslock */ static unsigned int nreqs; /* reqlock */ static unsigned int nready; /* reqlock */ static unsigned int npending; /* reqlock */ static unsigned int max_idle = 4; /* maximum number of threads that can idle indefinitely */ static unsigned int idle_timeout = 10; /* number of seconds after which an idle threads exit */ static xmutex_t wrklock; static xmutex_t reslock; static xmutex_t reqlock; static xcond_t reqwait; typedef struct etp_worker { struct tmpbuf tmpbuf; /* locked by wrklock */ struct etp_worker *prev, *next; xthread_t tid; #ifdef ETP_WORKER_COMMON ETP_WORKER_COMMON #endif } etp_worker; static etp_worker wrk_first; /* NOT etp */ #define ETP_WORKER_LOCK(wrk) X_LOCK (wrklock) #define ETP_WORKER_UNLOCK(wrk) X_UNLOCK (wrklock) /* worker threads management */ static void etp_worker_clear (etp_worker *wrk) { } static void ecb_cold etp_worker_free (etp_worker *wrk) { free (wrk->tmpbuf.ptr); wrk->next->prev = wrk->prev; wrk->prev->next = wrk->next; free (wrk); } static unsigned int etp_nreqs (void) { int retval; if (WORDACCESS_UNSAFE) X_LOCK (reqlock); retval = nreqs; if (WORDACCESS_UNSAFE) X_UNLOCK (reqlock); return retval; } static unsigned int etp_nready (void) { unsigned int retval; if (WORDACCESS_UNSAFE) X_LOCK (reqlock); retval = nready; if (WORDACCESS_UNSAFE) X_UNLOCK (reqlock); return retval; } static unsigned int etp_npending (void) { unsigned int retval; if (WORDACCESS_UNSAFE) X_LOCK (reqlock); retval = npending; if (WORDACCESS_UNSAFE) X_UNLOCK (reqlock); return retval; } static unsigned int etp_nthreads (void) { unsigned int retval; if (WORDACCESS_UNSAFE) X_LOCK (reqlock); retval = started; if (WORDACCESS_UNSAFE) X_UNLOCK (reqlock); return retval; } /* * a somewhat faster data structure might be nice, but * with 8 priorities this actually needs <20 insns * per shift, the most expensive operation. */ typedef struct { ETP_REQ *qs[ETP_NUM_PRI], *qe[ETP_NUM_PRI]; /* qstart, qend */ int size; } etp_reqq; static etp_reqq req_queue; static etp_reqq res_queue; static void ecb_noinline ecb_cold reqq_init (etp_reqq *q) { int pri; for (pri = 0; pri < ETP_NUM_PRI; ++pri) q->qs[pri] = q->qe[pri] = 0; q->size = 0; } static int ecb_noinline reqq_push (etp_reqq *q, ETP_REQ *req) { int pri = req->pri; req->next = 0; if (q->qe[pri]) { q->qe[pri]->next = req; q->qe[pri] = req; } else q->qe[pri] = q->qs[pri] = req; return q->size++; } static ETP_REQ * ecb_noinline reqq_shift (etp_reqq *q) { int pri; if (!q->size) return 0; --q->size; for (pri = ETP_NUM_PRI; pri--; ) { eio_req *req = q->qs[pri]; if (req) { if (!(q->qs[pri] = (eio_req *)req->next)) q->qe[pri] = 0; return req; } } abort (); } static int ecb_cold etp_init (void (*want_poll)(void), void (*done_poll)(void)) { X_MUTEX_CREATE (wrklock); X_MUTEX_CREATE (reslock); X_MUTEX_CREATE (reqlock); X_COND_CREATE (reqwait); reqq_init (&req_queue); reqq_init (&res_queue); wrk_first.next = wrk_first.prev = &wrk_first; started = 0; idle = 0; nreqs = 0; nready = 0; npending = 0; want_poll_cb = want_poll; done_poll_cb = done_poll; return 0; } X_THREAD_PROC (etp_proc); static void ecb_cold etp_start_thread (void) { etp_worker *wrk = calloc (1, sizeof (etp_worker)); /*TODO*/ assert (("unable to allocate worker thread data", wrk)); X_LOCK (wrklock); if (xthread_create (&wrk->tid, etp_proc, (void *)wrk)) { wrk->prev = &wrk_first; wrk->next = wrk_first.next; wrk_first.next->prev = wrk; wrk_first.next = wrk; ++started; } else free (wrk); X_UNLOCK (wrklock); } static void etp_maybe_start_thread (void) { if (ecb_expect_true (etp_nthreads () >= wanted)) return; /* todo: maybe use idle here, but might be less exact */ if (ecb_expect_true (0 <= (int)etp_nthreads () + (int)etp_npending () - (int)etp_nreqs ())) return; etp_start_thread (); } static void ecb_cold etp_end_thread (void) { eio_req *req = calloc (1, sizeof (eio_req)); /* will be freed by worker */ req->type = -1; req->pri = ETP_PRI_MAX - ETP_PRI_MIN; X_LOCK (reqlock); reqq_push (&req_queue, req); X_COND_SIGNAL (reqwait); X_UNLOCK (reqlock); X_LOCK (wrklock); --started; X_UNLOCK (wrklock); } static int etp_poll (void) { unsigned int maxreqs; unsigned int maxtime; struct timeval tv_start, tv_now; X_LOCK (reslock); maxreqs = max_poll_reqs; maxtime = max_poll_time; X_UNLOCK (reslock); if (maxtime) gettimeofday (&tv_start, 0); for (;;) { ETP_REQ *req; etp_maybe_start_thread (); X_LOCK (reslock); req = reqq_shift (&res_queue); if (req) { --npending; if (!res_queue.size && done_poll_cb) done_poll_cb (); } X_UNLOCK (reslock); if (!req) return 0; X_LOCK (reqlock); --nreqs; X_UNLOCK (reqlock); if (ecb_expect_false (req->type == EIO_GROUP && req->size)) { req->int1 = 1; /* mark request as delayed */ continue; } else { int res = ETP_FINISH (req); if (ecb_expect_false (res)) return res; } if (ecb_expect_false (maxreqs && !--maxreqs)) break; if (maxtime) { gettimeofday (&tv_now, 0); if (tvdiff (&tv_start, &tv_now) >= maxtime) break; } } errno = EAGAIN; return -1; } static void etp_cancel (ETP_REQ *req) { req->cancelled = 1; eio_grp_cancel (req); } static void etp_submit (ETP_REQ *req) { req->pri -= ETP_PRI_MIN; if (ecb_expect_false (req->pri < ETP_PRI_MIN - ETP_PRI_MIN)) req->pri = ETP_PRI_MIN - ETP_PRI_MIN; if (ecb_expect_false (req->pri > ETP_PRI_MAX - ETP_PRI_MIN)) req->pri = ETP_PRI_MAX - ETP_PRI_MIN; if (ecb_expect_false (req->type == EIO_GROUP)) { /* I hope this is worth it :/ */ X_LOCK (reqlock); ++nreqs; X_UNLOCK (reqlock); X_LOCK (reslock); ++npending; if (!reqq_push (&res_queue, req) && want_poll_cb) want_poll_cb (); X_UNLOCK (reslock); } else { X_LOCK (reqlock); ++nreqs; ++nready; reqq_push (&req_queue, req); X_COND_SIGNAL (reqwait); X_UNLOCK (reqlock); etp_maybe_start_thread (); } } static void ecb_cold etp_set_max_poll_time (double nseconds) { if (WORDACCESS_UNSAFE) X_LOCK (reslock); max_poll_time = nseconds * EIO_TICKS; if (WORDACCESS_UNSAFE) X_UNLOCK (reslock); } static void ecb_cold etp_set_max_poll_reqs (unsigned int maxreqs) { if (WORDACCESS_UNSAFE) X_LOCK (reslock); max_poll_reqs = maxreqs; if (WORDACCESS_UNSAFE) X_UNLOCK (reslock); } static void ecb_cold etp_set_max_idle (unsigned int nthreads) { if (WORDACCESS_UNSAFE) X_LOCK (reqlock); max_idle = nthreads; if (WORDACCESS_UNSAFE) X_UNLOCK (reqlock); } static void ecb_cold etp_set_idle_timeout (unsigned int seconds) { if (WORDACCESS_UNSAFE) X_LOCK (reqlock); idle_timeout = seconds; if (WORDACCESS_UNSAFE) X_UNLOCK (reqlock); } static void ecb_cold etp_set_min_parallel (unsigned int nthreads) { if (wanted < nthreads) wanted = nthreads; } static void ecb_cold etp_set_max_parallel (unsigned int nthreads) { if (wanted > nthreads) wanted = nthreads; while (started > wanted) etp_end_thread (); } /*****************************************************************************/ static void grp_try_feed (eio_req *grp) { while (grp->size < grp->int2 && !EIO_CANCELLED (grp)) { grp->flags &= ~EIO_FLAG_GROUPADD; EIO_FEED (grp); /* stop if no progress has been made */ if (!(grp->flags & EIO_FLAG_GROUPADD)) { grp->feed = 0; break; } } } static int grp_dec (eio_req *grp) { --grp->size; /* call feeder, if applicable */ grp_try_feed (grp); /* finish, if done */ if (!grp->size && grp->int1) return eio_finish (grp); else return 0; } static void eio_destroy (eio_req *req) { if ((req)->flags & EIO_FLAG_PTR1_FREE) free (req->ptr1); if ((req)->flags & EIO_FLAG_PTR2_FREE) free (req->ptr2); EIO_DESTROY (req); } static int eio_finish (eio_req *req) { int res = EIO_FINISH (req); if (req->grp) { int res2; eio_req *grp = req->grp; /* unlink request */ if (req->grp_next) req->grp_next->grp_prev = req->grp_prev; if (req->grp_prev) req->grp_prev->grp_next = req->grp_next; if (grp->grp_first == req) grp->grp_first = req->grp_next; res2 = grp_dec (grp); if (!res) res = res2; } eio_destroy (req); return res; } void eio_grp_cancel (eio_req *grp) { for (grp = grp->grp_first; grp; grp = grp->grp_next) eio_cancel (grp); } void eio_cancel (eio_req *req) { etp_cancel (req); } void eio_submit (eio_req *req) { etp_submit (req); } unsigned int eio_nreqs (void) { return etp_nreqs (); } unsigned int eio_nready (void) { return etp_nready (); } unsigned int eio_npending (void) { return etp_npending (); } unsigned int ecb_cold eio_nthreads (void) { return etp_nthreads (); } void ecb_cold eio_set_max_poll_time (double nseconds) { etp_set_max_poll_time (nseconds); } void ecb_cold eio_set_max_poll_reqs (unsigned int maxreqs) { etp_set_max_poll_reqs (maxreqs); } void ecb_cold eio_set_max_idle (unsigned int nthreads) { etp_set_max_idle (nthreads); } void ecb_cold eio_set_idle_timeout (unsigned int seconds) { etp_set_idle_timeout (seconds); } void ecb_cold eio_set_min_parallel (unsigned int nthreads) { etp_set_min_parallel (nthreads); } void ecb_cold eio_set_max_parallel (unsigned int nthreads) { etp_set_max_parallel (nthreads); } int eio_poll (void) { return etp_poll (); } /*****************************************************************************/ /* work around various missing functions */ #ifndef HAVE_UTIMES # undef utimes # define utimes(path,times) eio__utimes (path, times) static int eio__utimes (const char *filename, const struct timeval times[2]) { if (times) { struct utimbuf buf; buf.actime = times[0].tv_sec; buf.modtime = times[1].tv_sec; return utime (filename, &buf); } else return utime (filename, 0); } #endif #ifndef HAVE_FUTIMES # undef futimes # define futimes(fd,times) eio__futimes (fd, times) static int eio__futimes (int fd, const struct timeval tv[2]) { errno = ENOSYS; return -1; } #endif #if !HAVE_FDATASYNC # undef fdatasync # define fdatasync(fd) fsync (fd) #endif static int eio__syncfs (int fd) { int res; #if HAVE_SYS_SYNCFS res = (int)syscall (__NR_syncfs, (int)(fd)); #else res = EIO_ENOSYS (); #endif if (res < 0 && errno == ENOSYS && fd >= 0) sync (); return res; } /* sync_file_range always needs emulation */ static int eio__sync_file_range (int fd, off_t offset, size_t nbytes, unsigned int flags) { #if HAVE_SYNC_FILE_RANGE int res; if (EIO_SYNC_FILE_RANGE_WAIT_BEFORE != SYNC_FILE_RANGE_WAIT_BEFORE || EIO_SYNC_FILE_RANGE_WRITE != SYNC_FILE_RANGE_WRITE || EIO_SYNC_FILE_RANGE_WAIT_AFTER != SYNC_FILE_RANGE_WAIT_AFTER) { flags = 0 | (flags & EIO_SYNC_FILE_RANGE_WAIT_BEFORE ? SYNC_FILE_RANGE_WAIT_BEFORE : 0) | (flags & EIO_SYNC_FILE_RANGE_WRITE ? SYNC_FILE_RANGE_WRITE : 0) | (flags & EIO_SYNC_FILE_RANGE_WAIT_AFTER ? SYNC_FILE_RANGE_WAIT_AFTER : 0); } res = sync_file_range (fd, offset, nbytes, flags); if (!res || errno != ENOSYS) return res; #endif /* even though we could play tricks with the flags, it's better to always * call fdatasync, as that matches the expectation of its users best */ return fdatasync (fd); } static int eio__fallocate (int fd, int mode, off_t offset, size_t len) { #if HAVE_LINUX_FALLOCATE return fallocate (fd, mode, offset, len); #else return EIO_ENOSYS (); #endif } #if !HAVE_READAHEAD # undef readahead # define readahead(fd,offset,count) eio__readahead (fd, offset, count, self) static eio_ssize_t eio__readahead (int fd, off_t offset, size_t count, etp_worker *self) { size_t todo = count; dBUF; while (todo > 0) { size_t len = todo < EIO_BUFSIZE ? todo : EIO_BUFSIZE; pread (fd, eio_buf, len, offset); offset += len; todo -= len; } FUBd; /* linux's readahead basically only fails for EBADF or EINVAL (not mmappable) */ /* but not for e.g. EIO or eof, so we also never fail */ return 0; } #endif /* sendfile always needs emulation */ static eio_ssize_t eio__sendfile (int ofd, int ifd, off_t offset, size_t count) { eio_ssize_t written = 0; eio_ssize_t res; if (!count) return 0; for (;;) { #ifdef __APPLE__ # undef HAVE_SENDFILE /* broken, as everything on os x */ #endif #if HAVE_SENDFILE # if __linux off_t soffset = offset; res = sendfile (ofd, ifd, &soffset, count); # elif __FreeBSD__ /* * Of course, the freebsd sendfile is a dire hack with no thoughts * wasted on making it similar to other I/O functions. */ off_t sbytes; res = sendfile (ifd, ofd, offset, count, 0, &sbytes, 0); #if 0 /* according to the manpage, this is correct, but broken behaviour */ /* freebsd' sendfile will return 0 on success */ /* freebsd 8 documents it as only setting *sbytes on EINTR and EAGAIN, but */ /* not on e.g. EIO or EPIPE - sounds broken */ if ((res < 0 && (errno == EAGAIN || errno == EINTR) && sbytes) || res == 0) res = sbytes; #endif /* according to source inspection, this is correct, and useful behaviour */ if (sbytes) res = sbytes; # elif defined __APPLE__ off_t sbytes = count; res = sendfile (ifd, ofd, offset, &sbytes, 0, 0); /* according to the manpage, sbytes is always valid */ if (sbytes) res = sbytes; # elif __hpux res = sendfile (ofd, ifd, offset, count, 0, 0); # elif __solaris struct sendfilevec vec; size_t sbytes; vec.sfv_fd = ifd; vec.sfv_flag = 0; vec.sfv_off = offset; vec.sfv_len = count; res = sendfilev (ofd, &vec, 1, &sbytes); if (res < 0 && sbytes) res = sbytes; # endif #elif defined (_WIN32) && 0 /* does not work, just for documentation of what would need to be done */ /* actually, cannot be done like this, as TransmitFile changes the file offset, */ /* libeio guarantees that the file offset does not change, and windows */ /* has no way to get an independent handle to the same file description */ HANDLE h = TO_SOCKET (ifd); SetFilePointer (h, offset, 0, FILE_BEGIN); res = TransmitFile (TO_SOCKET (ofd), h, count, 0, 0, 0, 0); #else res = EIO_ENOSYS (); #endif /* we assume sendfile can copy at least 128mb in one go */ if (res <= 128 * 1024 * 1024) { if (res > 0) written += res; if (written) return written; break; } else { /* if we requested more, then probably the kernel was lazy */ written += res; offset += res; count -= res; if (!count) return written; } } if (res < 0 && (errno == ENOSYS || errno == EINVAL || errno == ENOTSOCK /* BSDs */ #ifdef ENOTSUP /* sigh, if the steenking pile called openbsd would only try to at least compile posix code... */ || errno == ENOTSUP #endif #ifdef EOPNOTSUPP /* windows */ || errno == EOPNOTSUPP /* BSDs */ #endif #if __solaris || errno == EAFNOSUPPORT || errno == EPROTOTYPE #endif ) ) { /* emulate sendfile. this is a major pain in the ass */ dBUF; res = 0; while (count) { eio_ssize_t cnt; cnt = pread (ifd, eio_buf, count > EIO_BUFSIZE ? EIO_BUFSIZE : count, offset); if (cnt <= 0) { if (cnt && !res) res = -1; break; } cnt = write (ofd, eio_buf, cnt); if (cnt <= 0) { if (cnt && !res) res = -1; break; } offset += cnt; res += cnt; count -= cnt; } FUBd; } return res; } #ifdef PAGESIZE # define eio_pagesize() PAGESIZE #else static intptr_t eio_pagesize (void) { static intptr_t page; if (!page) page = sysconf (_SC_PAGESIZE); return page; } #endif static void eio_page_align (void **addr, size_t *length) { intptr_t mask = eio_pagesize () - 1; /* round down addr */ intptr_t adj = mask & (intptr_t)*addr; *addr = (void *)((intptr_t)*addr - adj); *length += adj; /* round up length */ *length = (*length + mask) & ~mask; } #if !_POSIX_MEMLOCK # define eio__mlockall(a) EIO_ENOSYS () #else static int eio__mlockall (int flags) { #if __GLIBC__ == 2 && __GLIBC_MINOR__ <= 7 extern int mallopt (int, int); mallopt (-6, 238); /* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=473812 */ #endif if (EIO_MCL_CURRENT != MCL_CURRENT || EIO_MCL_FUTURE != MCL_FUTURE) { flags = 0 | (flags & EIO_MCL_CURRENT ? MCL_CURRENT : 0) | (flags & EIO_MCL_FUTURE ? MCL_FUTURE : 0); } return mlockall (flags); } #endif #if !_POSIX_MEMLOCK_RANGE # define eio__mlock(a,b) EIO_ENOSYS () #else static int eio__mlock (void *addr, size_t length) { eio_page_align (&addr, &length); return mlock (addr, length); } #endif #if !(_POSIX_MAPPED_FILES && _POSIX_SYNCHRONIZED_IO) # define eio__msync(a,b,c) EIO_ENOSYS () #else static int eio__msync (void *mem, size_t len, int flags) { eio_page_align (&mem, &len); if (EIO_MS_ASYNC != MS_SYNC || EIO_MS_INVALIDATE != MS_INVALIDATE || EIO_MS_SYNC != MS_SYNC) { flags = 0 | (flags & EIO_MS_ASYNC ? MS_ASYNC : 0) | (flags & EIO_MS_INVALIDATE ? MS_INVALIDATE : 0) | (flags & EIO_MS_SYNC ? MS_SYNC : 0); } return msync (mem, len, flags); } #endif static int eio__mtouch (eio_req *req) { void *mem = req->ptr2; size_t len = req->size; int flags = req->int1; eio_page_align (&mem, &len); { intptr_t addr = (intptr_t)mem; intptr_t end = addr + len; intptr_t page = eio_pagesize (); if (addr < end) if (flags & EIO_MT_MODIFY) /* modify */ do { *((volatile sig_atomic_t *)addr) |= 0; } while ((addr += page) < len && !EIO_CANCELLED (req)); else do { *((volatile sig_atomic_t *)addr) ; } while ((addr += page) < len && !EIO_CANCELLED (req)); } return 0; } /*****************************************************************************/ /* requests implemented outside eio_execute, because they are so large */ static void eio__lseek (eio_req *req) { /* this usually gets optimised away completely, or your compiler sucks, */ /* or the whence constants really are not 0, 1, 2 */ int whence = req->int2 == EIO_SEEK_SET ? SEEK_SET : req->int2 == EIO_SEEK_CUR ? SEEK_CUR : req->int2 == EIO_SEEK_END ? SEEK_END : req->int2; req->offs = lseek (req->int1, req->offs, whence); req->result = req->offs == (off_t)-1 ? -1 : 0; } /* result will always end up in tmpbuf, there is always space for adding a 0-byte */ static int eio__realpath (struct tmpbuf *tmpbuf, eio_wd wd, const char *path) { const char *rel = path; char *res; char *tmp1, *tmp2; #if SYMLOOP_MAX > 32 int symlinks = SYMLOOP_MAX; #else int symlinks = 32; #endif errno = EINVAL; if (!rel) return -1; errno = ENOENT; if (!*rel) return -1; res = tmpbuf_get (tmpbuf, PATH_MAX * 3); tmp1 = res + PATH_MAX; tmp2 = tmp1 + PATH_MAX; #if 0 /* disabled, the musl way to do things is just too racy */ #if __linux && defined(O_NONBLOCK) && defined(O_NOATIME) /* on linux we may be able to ask the kernel */ { int fd = open (rel, O_RDONLY | O_NONBLOCK | O_NOCTTY | O_NOATIME); if (fd >= 0) { sprintf (tmp1, "/proc/self/fd/%d", fd); req->result = readlink (tmp1, res, PATH_MAX); close (fd); /* here we should probably stat the open file and the disk file, to make sure they still match */ if (req->result > 0) goto done; } else if (errno == ELOOP || errno == ENAMETOOLONG || errno == ENOENT || errno == ENOTDIR || errno == EIO) return; } #endif #endif if (*rel != '/') { int len; errno = ENOENT; if (wd == EIO_INVALID_WD) return -1; if (wd == EIO_CWD) { if (!getcwd (res, PATH_MAX)) return -1; len = strlen (res); } else memcpy (res, wd->str, len = wd->len); if (res [1]) /* only use if not / */ res += len; } while (*rel) { eio_ssize_t len, linklen; const char *beg = rel; while (*rel && *rel != '/') ++rel; len = rel - beg; if (!len) /* skip slashes */ { ++rel; continue; } if (beg [0] == '.') { if (len == 1) continue; /* . - nop */ if (beg [1] == '.' && len == 2) { /* .. - back up one component, if possible */ while (res != tmpbuf->ptr) if (*--res == '/') break; continue; } } errno = ENAMETOOLONG; if (res + 1 + len + 1 >= tmp1) return -1; /* copy one component */ *res = '/'; memcpy (res + 1, beg, len); /* zero-terminate, for readlink */ res [len + 1] = 0; /* now check if it's a symlink */ linklen = readlink (tmpbuf->ptr, tmp1, PATH_MAX); if (linklen < 0) { if (errno != EINVAL) return -1; /* it's a normal directory. hopefully */ res += len + 1; } else { /* yay, it was a symlink - build new path in tmp2 */ int rellen = strlen (rel); errno = ENAMETOOLONG; if (linklen + 1 + rellen >= PATH_MAX) return -1; errno = ELOOP; if (!--symlinks) return -1; if (*tmp1 == '/') res = tmpbuf->ptr; /* symlink resolves to an absolute path */ /* we need to be careful, as rel might point into tmp2 already */ memmove (tmp2 + linklen + 1, rel, rellen + 1); tmp2 [linklen] = '/'; memcpy (tmp2, tmp1, linklen); rel = tmp2; } } /* special case for the lone root path */ if (res == tmpbuf->ptr) *res++ = '/'; return res - (char *)tmpbuf->ptr; } static signed char eio_dent_cmp (const eio_dirent *a, const eio_dirent *b) { return a->score - b->score ? a->score - b->score /* works because our signed char is always 0..100 */ : a->inode < b->inode ? -1 : a->inode > b->inode ? 1 : 0; } #define EIO_DENT_CMP(i,op,j) eio_dent_cmp (&i, &j) op 0 #define EIO_SORT_CUTOFF 30 /* quite high, but performs well on many filesystems */ #define EIO_SORT_FAST 60 /* when to only use insertion sort */ static void eio_dent_radix_sort (eio_dirent *dents, int size, signed char score_bits, eio_ino_t inode_bits) { unsigned char bits [9 + sizeof (eio_ino_t) * 8]; unsigned char *bit = bits; assert (CHAR_BIT == 8); assert (sizeof (eio_dirent) * 8 < 256); assert (offsetof (eio_dirent, inode)); /* we use bit #0 as sentinel */ assert (offsetof (eio_dirent, score)); /* we use bit #0 as sentinel */ if (size <= EIO_SORT_FAST) return; /* first prepare an array of bits to test in our radix sort */ /* try to take endianness into account, as well as differences in eio_ino_t sizes */ /* inode_bits must contain all inodes ORed together */ /* which is used to skip bits that are 0 everywhere, which is very common */ { eio_ino_t endianness; int i, j; /* we store the byte offset of byte n into byte n of "endianness" */ for (i = 0; i < sizeof (eio_ino_t); ++i) ((unsigned char *)&endianness)[i] = i; *bit++ = 0; for (i = 0; i < sizeof (eio_ino_t); ++i) { /* shifting off the byte offsets out of "endianness" */ int offs = (offsetof (eio_dirent, inode) + (endianness & 0xff)) * 8; endianness >>= 8; for (j = 0; j < 8; ++j) if (inode_bits & (((eio_ino_t)1) << (i * 8 + j))) *bit++ = offs + j; } for (j = 0; j < 8; ++j) if (score_bits & (1 << j)) *bit++ = offsetof (eio_dirent, score) * 8 + j; } /* now actually do the sorting (a variant of MSD radix sort) */ { eio_dirent *base_stk [9 + sizeof (eio_ino_t) * 8], *base; eio_dirent *end_stk [9 + sizeof (eio_ino_t) * 8], *end; unsigned char *bit_stk [9 + sizeof (eio_ino_t) * 8]; int stk_idx = 0; base_stk [stk_idx] = dents; end_stk [stk_idx] = dents + size; bit_stk [stk_idx] = bit - 1; do { base = base_stk [stk_idx]; end = end_stk [stk_idx]; bit = bit_stk [stk_idx]; for (;;) { unsigned char O = *bit >> 3; unsigned char M = 1 << (*bit & 7); eio_dirent *a = base; eio_dirent *b = end; if (b - a < EIO_SORT_CUTOFF) break; /* now bit-partition the array on the bit */ /* this ugly asymmetric loop seems to perform much better than typical */ /* partition algos found in the literature */ do if (!(((unsigned char *)a)[O] & M)) ++a; else if (!(((unsigned char *)--b)[O] & M)) { eio_dirent tmp = *a; *a = *b; *b = tmp; ++a; } while (b > a); /* next bit, or stop, if no bits left in this path */ if (!*--bit) break; base_stk [stk_idx] = a; end_stk [stk_idx] = end; bit_stk [stk_idx] = bit; ++stk_idx; end = a; } } while (stk_idx--); } } static void eio_dent_insertion_sort (eio_dirent *dents, int size) { /* first move the smallest element to the front, to act as a sentinel */ { int i; eio_dirent *min = dents; /* the radix pre-pass ensures that the minimum element is in the first EIO_SORT_CUTOFF + 1 elements */ for (i = size > EIO_SORT_FAST ? EIO_SORT_CUTOFF + 1 : size; --i; ) if (EIO_DENT_CMP (dents [i], <, *min)) min = &dents [i]; /* swap elements 0 and j (minimum) */ { eio_dirent tmp = *dents; *dents = *min; *min = tmp; } } /* then do standard insertion sort, assuming that all elements are >= dents [0] */ { eio_dirent *i, *j; for (i = dents + 1; i < dents + size; ++i) { eio_dirent value = *i; for (j = i - 1; EIO_DENT_CMP (*j, >, value); --j) j [1] = j [0]; j [1] = value; } } } static void eio_dent_sort (eio_dirent *dents, int size, signed char score_bits, eio_ino_t inode_bits) { if (size <= 1) return; /* our insertion sort relies on size > 0 */ /* first we use a radix sort, but only for dirs >= EIO_SORT_FAST */ /* and stop sorting when the partitions are <= EIO_SORT_CUTOFF */ eio_dent_radix_sort (dents, size, score_bits, inode_bits); /* use an insertion sort at the end, or for small arrays, */ /* as insertion sort is more efficient for small partitions */ eio_dent_insertion_sort (dents, size); } /* read a full directory */ static void eio__scandir (eio_req *req, etp_worker *self) { char *name, *names; int namesalloc = 4096 - sizeof (void *) * 4; int namesoffs = 0; int flags = req->int1; eio_dirent *dents = 0; int dentalloc = 128; int dentoffs = 0; eio_ino_t inode_bits = 0; #ifdef _WIN32 HANDLE dirp; WIN32_FIND_DATA entp; #else DIR *dirp; EIO_STRUCT_DIRENT *entp; #endif req->result = -1; if (!(flags & EIO_READDIR_DENTS)) flags &= ~(EIO_READDIR_DIRS_FIRST | EIO_READDIR_STAT_ORDER); #ifdef _WIN32 { int len = strlen ((const char *)req->ptr1); char *path = malloc (MAX_PATH); const char *fmt; const char *reqpath = wd_expand (&self->tmpbuf, req->wd, req->ptr1); if (!len) fmt = "./*"; else if (reqpath[len - 1] == '/' || reqpath[len - 1] == '\\') fmt = "%s*"; else fmt = "%s/*"; _snprintf (path, MAX_PATH, fmt, reqpath); dirp = FindFirstFile (path, &entp); free (path); if (dirp == INVALID_HANDLE_VALUE) { /* should steal _dosmaperr */ switch (GetLastError ()) { case ERROR_FILE_NOT_FOUND: req->result = 0; break; case ERROR_INVALID_NAME: case ERROR_PATH_NOT_FOUND: case ERROR_NO_MORE_FILES: errno = ENOENT; break; case ERROR_NOT_ENOUGH_MEMORY: errno = ENOMEM; break; default: errno = EINVAL; break; } return; } } #else #if HAVE_AT if (req->wd) { int fd = openat (WD2FD (req->wd), req->ptr1, O_CLOEXEC | O_SEARCH | O_DIRECTORY); if (fd < 0) return; dirp = fdopendir (fd); if (!dirp) close (fd); } else dirp = opendir (req->ptr1); #else dirp = opendir (wd_expand (&self->tmpbuf, req->wd, req->ptr1)); #endif if (!dirp) return; #endif if (req->flags & EIO_FLAG_PTR1_FREE) free (req->ptr1); req->flags |= EIO_FLAG_PTR1_FREE | EIO_FLAG_PTR2_FREE; req->ptr1 = dents = flags ? malloc (dentalloc * sizeof (eio_dirent)) : 0; req->ptr2 = names = malloc (namesalloc); if (!names || (flags && !dents)) return; for (;;) { int done; #ifdef _WIN32 done = !dirp; #else errno = 0; entp = readdir (dirp); done = !entp; #endif if (done) { #ifndef _WIN32 int old_errno = errno; closedir (dirp); errno = old_errno; if (errno) break; #endif /* sort etc. */ req->int1 = flags; req->result = dentoffs; if (flags & EIO_READDIR_STAT_ORDER) eio_dent_sort (dents, dentoffs, flags & EIO_READDIR_DIRS_FIRST ? 7 : 0, inode_bits); else if (flags & EIO_READDIR_DIRS_FIRST) if (flags & EIO_READDIR_FOUND_UNKNOWN) eio_dent_sort (dents, dentoffs, 7, inode_bits); /* sort by score and inode */ else { /* in this case, all is known, and we just put dirs first and sort them */ eio_dirent *oth = dents + dentoffs; eio_dirent *dir = dents; /* now partition dirs to the front, and non-dirs to the back */ /* by walking from both sides and swapping if necessary */ while (oth > dir) { if (dir->type == EIO_DT_DIR) ++dir; else if ((--oth)->type == EIO_DT_DIR) { eio_dirent tmp = *dir; *dir = *oth; *oth = tmp; ++dir; } } /* now sort the dirs only (dirs all have the same score) */ eio_dent_sort (dents, dir - dents, 0, inode_bits); } break; } /* now add the entry to our list(s) */ name = D_NAME (entp); /* skip . and .. entries */ if (name [0] != '.' || (name [1] && (name [1] != '.' || name [2]))) { int len = D_NAMLEN (entp) + 1; while (ecb_expect_false (namesoffs + len > namesalloc)) { namesalloc *= 2; req->ptr2 = names = realloc (names, namesalloc); if (!names) break; } memcpy (names + namesoffs, name, len); if (dents) { struct eio_dirent *ent; if (ecb_expect_false (dentoffs == dentalloc)) { dentalloc *= 2; req->ptr1 = dents = realloc (dents, dentalloc * sizeof (eio_dirent)); if (!dents) break; } ent = dents + dentoffs; ent->nameofs = namesoffs; /* rather dirtily we store the offset in the pointer */ ent->namelen = len - 1; ent->inode = D_INO (entp); inode_bits |= ent->inode; switch (D_TYPE (entp)) { default: ent->type = EIO_DT_UNKNOWN; flags |= EIO_READDIR_FOUND_UNKNOWN; break; #ifdef DT_FIFO case DT_FIFO: ent->type = EIO_DT_FIFO; break; #endif #ifdef DT_CHR case DT_CHR: ent->type = EIO_DT_CHR; break; #endif #ifdef DT_MPC case DT_MPC: ent->type = EIO_DT_MPC; break; #endif #ifdef DT_DIR case DT_DIR: ent->type = EIO_DT_DIR; break; #endif #ifdef DT_NAM case DT_NAM: ent->type = EIO_DT_NAM; break; #endif #ifdef DT_BLK case DT_BLK: ent->type = EIO_DT_BLK; break; #endif #ifdef DT_MPB case DT_MPB: ent->type = EIO_DT_MPB; break; #endif #ifdef DT_REG case DT_REG: ent->type = EIO_DT_REG; break; #endif #ifdef DT_NWK case DT_NWK: ent->type = EIO_DT_NWK; break; #endif #ifdef DT_CMP case DT_CMP: ent->type = EIO_DT_CMP; break; #endif #ifdef DT_LNK case DT_LNK: ent->type = EIO_DT_LNK; break; #endif #ifdef DT_SOCK case DT_SOCK: ent->type = EIO_DT_SOCK; break; #endif #ifdef DT_DOOR case DT_DOOR: ent->type = EIO_DT_DOOR; break; #endif #ifdef DT_WHT case DT_WHT: ent->type = EIO_DT_WHT; break; #endif } ent->score = 7; if (flags & EIO_READDIR_DIRS_FIRST) { if (ent->type == EIO_DT_UNKNOWN) { if (*name == '.') /* leading dots are likely directories, and, in any case, rare */ ent->score = 1; else if (!strchr (name, '.')) /* absence of dots indicate likely dirs */ ent->score = len <= 2 ? 4 - len : len <= 4 ? 4 : len <= 7 ? 5 : 6; /* shorter == more likely dir, but avoid too many classes */ } else if (ent->type == EIO_DT_DIR) ent->score = 0; } } namesoffs += len; ++dentoffs; } if (EIO_CANCELLED (req)) { errno = ECANCELED; break; } #ifdef _WIN32 if (!FindNextFile (dirp, &entp)) { FindClose (dirp); dirp = 0; } #endif } } /*****************************************************************************/ /* working directory stuff */ /* various deficiencies in the posix 2008 api force us to */ /* keep the absolute path in string form at all times */ /* fuck yeah. */ #if !HAVE_AT /* a bit like realpath, but usually faster because it doesn'T have to return */ /* an absolute or canonical path */ static const char * wd_expand (struct tmpbuf *tmpbuf, eio_wd wd, const char *path) { if (!wd || *path == '/') return path; if (path [0] == '.' && !path [1]) return wd->str; { int l1 = wd->len; int l2 = strlen (path); char *res = tmpbuf_get (tmpbuf, l1 + l2 + 2); memcpy (res, wd->str, l1); res [l1] = '/'; memcpy (res + l1 + 1, path, l2 + 1); return res; } } #endif static eio_wd eio__wd_open_sync (struct tmpbuf *tmpbuf, eio_wd wd, const char *path) { int fd; eio_wd res; int len = eio__realpath (tmpbuf, wd, path); if (len < 0) return EIO_INVALID_WD; #if HAVE_AT fd = openat (WD2FD (wd), path, O_CLOEXEC | O_SEARCH | O_DIRECTORY); if (fd < 0) return EIO_INVALID_WD; #endif res = malloc (sizeof (*res) + len); /* one extra 0-byte */ #if HAVE_AT res->fd = fd; #endif res->len = len; memcpy (res->str, tmpbuf->ptr, len); res->str [len] = 0; return res; } eio_wd eio_wd_open_sync (eio_wd wd, const char *path) { struct tmpbuf tmpbuf = { 0 }; wd = eio__wd_open_sync (&tmpbuf, wd, path); free (tmpbuf.ptr); return wd; } void eio_wd_close_sync (eio_wd wd) { if (wd != EIO_INVALID_WD && wd != EIO_CWD) { #if HAVE_AT close (wd->fd); #endif free (wd); } } #if HAVE_AT /* they forgot these */ static int eio__truncateat (int dirfd, const char *path, off_t length) { int fd = openat (dirfd, path, O_WRONLY | O_CLOEXEC); int res; if (fd < 0) return fd; res = ftruncate (fd, length); close (fd); return res; } static int eio__statvfsat (int dirfd, const char *path, struct statvfs *buf) { int fd = openat (dirfd, path, O_SEARCH | O_CLOEXEC); int res; if (fd < 0) return fd; res = fstatvfs (fd, buf); close (fd); return res; } #endif /*****************************************************************************/ #define ALLOC(len) \ if (!req->ptr2) \ { \ X_LOCK (wrklock); \ req->flags |= EIO_FLAG_PTR2_FREE; \ X_UNLOCK (wrklock); \ req->ptr2 = malloc (len); \ if (!req->ptr2) \ { \ errno = ENOMEM; \ req->result = -1; \ break; \ } \ } static void ecb_noinline ecb_cold etp_proc_init (void) { #if HAVE_PRCTL_SET_NAME /* provide a more sensible "thread name" */ char name[16 + 1]; const int namelen = sizeof (name) - 1; int len; prctl (PR_GET_NAME, (unsigned long)name, 0, 0, 0); name [namelen] = 0; len = strlen (name); strcpy (name + (len <= namelen - 4 ? len : namelen - 4), "/eio"); prctl (PR_SET_NAME, (unsigned long)name, 0, 0, 0); #endif } X_THREAD_PROC (etp_proc) { ETP_REQ *req; struct timespec ts; etp_worker *self = (etp_worker *)thr_arg; etp_proc_init (); /* try to distribute timeouts somewhat evenly */ ts.tv_nsec = ((unsigned long)self & 1023UL) * (1000000000UL / 1024UL); for (;;) { ts.tv_sec = 0; X_LOCK (reqlock); for (;;) { req = reqq_shift (&req_queue); if (req) break; if (ts.tv_sec == 1) /* no request, but timeout detected, let's quit */ { X_UNLOCK (reqlock); X_LOCK (wrklock); --started; X_UNLOCK (wrklock); goto quit; } ++idle; if (idle <= max_idle) /* we are allowed to idle, so do so without any timeout */ X_COND_WAIT (reqwait, reqlock); else { /* initialise timeout once */ if (!ts.tv_sec) ts.tv_sec = time (0) + idle_timeout; if (X_COND_TIMEDWAIT (reqwait, reqlock, ts) == ETIMEDOUT) ts.tv_sec = 1; /* assuming this is not a value computed above.,.. */ } --idle; } --nready; X_UNLOCK (reqlock); if (req->type < 0) goto quit; ETP_EXECUTE (self, req); X_LOCK (reslock); ++npending; if (!reqq_push (&res_queue, req) && want_poll_cb) want_poll_cb (); etp_worker_clear (self); X_UNLOCK (reslock); } quit: free (req); X_LOCK (wrklock); etp_worker_free (self); X_UNLOCK (wrklock); return 0; } /*****************************************************************************/ int ecb_cold eio_init (void (*want_poll)(void), void (*done_poll)(void)) { return etp_init (want_poll, done_poll); } ecb_inline void eio_api_destroy (eio_req *req) { free (req); } #define REQ(rtype) \ eio_req *req; \ \ req = (eio_req *)calloc (1, sizeof *req); \ if (!req) \ return 0; \ \ req->type = rtype; \ req->pri = pri; \ req->finish = cb; \ req->data = data; \ req->destroy = eio_api_destroy; #define SEND eio_submit (req); return req #define PATH \ req->flags |= EIO_FLAG_PTR1_FREE; \ req->ptr1 = strdup (path); \ if (!req->ptr1) \ { \ eio_api_destroy (req); \ return 0; \ } static void eio_execute (etp_worker *self, eio_req *req) { #if HAVE_AT int dirfd; #else const char *path; #endif if (ecb_expect_false (EIO_CANCELLED (req))) { req->result = -1; req->errorno = ECANCELED; return; } if (ecb_expect_false (req->wd == EIO_INVALID_WD)) { req->result = -1; req->errorno = ENOENT; return; } if (req->type >= EIO_OPEN) { #if HAVE_AT dirfd = WD2FD (req->wd); #else path = wd_expand (&self->tmpbuf, req->wd, req->ptr1); #endif } switch (req->type) { case EIO_WD_OPEN: req->wd = eio__wd_open_sync (&self->tmpbuf, req->wd, req->ptr1); req->result = req->wd == EIO_INVALID_WD ? -1 : 0; break; case EIO_WD_CLOSE: req->result = 0; eio_wd_close_sync (req->wd); break; case EIO_SEEK: eio__lseek (req); break; case EIO_READ: ALLOC (req->size); req->result = req->offs >= 0 ? pread (req->int1, req->ptr2, req->size, req->offs) : read (req->int1, req->ptr2, req->size); break; case EIO_WRITE: req->result = req->offs >= 0 ? pwrite (req->int1, req->ptr2, req->size, req->offs) : write (req->int1, req->ptr2, req->size); break; case EIO_READAHEAD: req->result = readahead (req->int1, req->offs, req->size); break; case EIO_SENDFILE: req->result = eio__sendfile (req->int1, req->int2, req->offs, req->size); break; #if HAVE_AT case EIO_STAT: ALLOC (sizeof (EIO_STRUCT_STAT)); req->result = fstatat (dirfd, req->ptr1, (EIO_STRUCT_STAT *)req->ptr2, 0); break; case EIO_LSTAT: ALLOC (sizeof (EIO_STRUCT_STAT)); req->result = fstatat (dirfd, req->ptr1, (EIO_STRUCT_STAT *)req->ptr2, AT_SYMLINK_NOFOLLOW); break; case EIO_CHOWN: req->result = fchownat (dirfd, req->ptr1, req->int2, req->int3, 0); break; case EIO_CHMOD: req->result = fchmodat (dirfd, req->ptr1, (mode_t)req->int2, 0); break; case EIO_TRUNCATE: req->result = eio__truncateat (dirfd, req->ptr1, req->offs); break; case EIO_OPEN: req->result = openat (dirfd, req->ptr1, req->int1, (mode_t)req->int2); break; case EIO_UNLINK: req->result = unlinkat (dirfd, req->ptr1, 0); break; case EIO_RMDIR: req->result = unlinkat (dirfd, req->ptr1, AT_REMOVEDIR); break; case EIO_MKDIR: req->result = mkdirat (dirfd, req->ptr1, (mode_t)req->int2); break; case EIO_RENAME: req->result = renameat (dirfd, req->ptr1, WD2FD ((eio_wd)req->int3), req->ptr2); break; case EIO_LINK: req->result = linkat (dirfd, req->ptr1, WD2FD ((eio_wd)req->int3), req->ptr2, 0); break; case EIO_SYMLINK: req->result = symlinkat (req->ptr1, dirfd, req->ptr2); break; case EIO_MKNOD: req->result = mknodat (dirfd, req->ptr1, (mode_t)req->int2, (dev_t)req->offs); break; case EIO_READLINK: ALLOC (PATH_MAX); req->result = readlinkat (dirfd, req->ptr1, req->ptr2, PATH_MAX); break; case EIO_STATVFS: ALLOC (sizeof (EIO_STRUCT_STATVFS)); req->result = eio__statvfsat (dirfd, req->ptr1, (EIO_STRUCT_STATVFS *)req->ptr2); break; case EIO_UTIME: case EIO_FUTIME: { struct timespec ts[2]; struct timespec *times; if (req->nv1 != -1. || req->nv2 != -1.) { ts[0].tv_sec = req->nv1; ts[0].tv_nsec = (req->nv1 - ts[0].tv_sec) * 1e9; ts[1].tv_sec = req->nv2; ts[1].tv_nsec = (req->nv2 - ts[1].tv_sec) * 1e9; times = ts; } else times = 0; req->result = req->type == EIO_FUTIME ? futimens (req->int1, times) : utimensat (dirfd, req->ptr1, times, 0); } break; #else case EIO_STAT: ALLOC (sizeof (EIO_STRUCT_STAT)); req->result = stat (path , (EIO_STRUCT_STAT *)req->ptr2); break; case EIO_LSTAT: ALLOC (sizeof (EIO_STRUCT_STAT)); req->result = lstat (path , (EIO_STRUCT_STAT *)req->ptr2); break; case EIO_CHOWN: req->result = chown (path , req->int2, req->int3); break; case EIO_CHMOD: req->result = chmod (path , (mode_t)req->int2); break; case EIO_TRUNCATE: req->result = truncate (path , req->offs); break; case EIO_OPEN: req->result = open (path , req->int1, (mode_t)req->int2); break; case EIO_UNLINK: req->result = unlink (path ); break; case EIO_RMDIR: req->result = rmdir (path ); break; case EIO_MKDIR: req->result = mkdir (path , (mode_t)req->int2); break; case EIO_RENAME: req->result = rename (path , req->ptr2); break; case EIO_LINK: req->result = link (path , req->ptr2); break; case EIO_SYMLINK: req->result = symlink (path , req->ptr2); break; case EIO_MKNOD: req->result = mknod (path , (mode_t)req->int2, (dev_t)req->offs); break; case EIO_READLINK: ALLOC (PATH_MAX); req->result = readlink (path, req->ptr2, PATH_MAX); break; case EIO_STATVFS: ALLOC (sizeof (EIO_STRUCT_STATVFS)); req->result = statvfs (path , (EIO_STRUCT_STATVFS *)req->ptr2); break; case EIO_UTIME: case EIO_FUTIME: { struct timeval tv[2]; struct timeval *times; if (req->nv1 != -1. || req->nv2 != -1.) { tv[0].tv_sec = req->nv1; tv[0].tv_usec = (req->nv1 - tv[0].tv_sec) * 1e6; tv[1].tv_sec = req->nv2; tv[1].tv_usec = (req->nv2 - tv[1].tv_sec) * 1e6; times = tv; } else times = 0; req->result = req->type == EIO_FUTIME ? futimes (req->int1, times) : utimes (req->ptr1, times); } break; #endif case EIO_REALPATH: if (0 <= (req->result = eio__realpath (&self->tmpbuf, req->wd, req->ptr1))) { ALLOC (req->result); memcpy (req->ptr2, self->tmpbuf.ptr, req->result); } break; case EIO_FSTAT: ALLOC (sizeof (EIO_STRUCT_STAT)); req->result = fstat (req->int1, (EIO_STRUCT_STAT *)req->ptr2); break; case EIO_FSTATVFS: ALLOC (sizeof (EIO_STRUCT_STATVFS)); req->result = fstatvfs (req->int1, (EIO_STRUCT_STATVFS *)req->ptr2); break; case EIO_FCHOWN: req->result = fchown (req->int1, req->int2, req->int3); break; case EIO_FCHMOD: req->result = fchmod (req->int1, (mode_t)req->int2); break; case EIO_FTRUNCATE: req->result = ftruncate (req->int1, req->offs); break; case EIO_CLOSE: req->result = close (req->int1); break; case EIO_DUP2: req->result = dup2 (req->int1, req->int2); break; case EIO_SYNC: req->result = 0; sync (); break; case EIO_FSYNC: req->result = fsync (req->int1); break; case EIO_FDATASYNC: req->result = fdatasync (req->int1); break; case EIO_SYNCFS: req->result = eio__syncfs (req->int1); break; case EIO_SYNC_FILE_RANGE: req->result = eio__sync_file_range (req->int1, req->offs, req->size, req->int2); break; case EIO_MSYNC: req->result = eio__msync (req->ptr2, req->size, req->int1); break; case EIO_MTOUCH: req->result = eio__mtouch (req); break; case EIO_MLOCK: req->result = eio__mlock (req->ptr2, req->size); break; case EIO_MLOCKALL: req->result = eio__mlockall (req->int1); break; case EIO_FALLOCATE: req->result = eio__fallocate (req->int1, req->int2, req->offs, req->size); break; case EIO_READDIR: eio__scandir (req, self); break; case EIO_BUSY: #ifdef _WIN32 Sleep (req->nv1 * 1e3); #else { struct timeval tv; tv.tv_sec = req->nv1; tv.tv_usec = (req->nv1 - tv.tv_sec) * 1e6; req->result = select (0, 0, 0, 0, &tv); } #endif break; case EIO_GROUP: abort (); /* handled in eio_request */ case EIO_NOP: req->result = 0; break; case EIO_CUSTOM: req->feed (req); break; default: req->result = EIO_ENOSYS (); break; } req->errorno = errno; } #ifndef EIO_NO_WRAPPERS eio_req *eio_wd_open (const char *path, int pri, eio_cb cb, void *data) { REQ (EIO_WD_OPEN); PATH; SEND; } eio_req *eio_wd_close (eio_wd wd, int pri, eio_cb cb, void *data) { REQ (EIO_WD_CLOSE); req->wd = wd; SEND; } eio_req *eio_nop (int pri, eio_cb cb, void *data) { REQ (EIO_NOP); SEND; } eio_req *eio_busy (double delay, int pri, eio_cb cb, void *data) { REQ (EIO_BUSY); req->nv1 = delay; SEND; } eio_req *eio_sync (int pri, eio_cb cb, void *data) { REQ (EIO_SYNC); SEND; } eio_req *eio_fsync (int fd, int pri, eio_cb cb, void *data) { REQ (EIO_FSYNC); req->int1 = fd; SEND; } eio_req *eio_msync (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data) { REQ (EIO_MSYNC); req->ptr2 = addr; req->size = length; req->int1 = flags; SEND; } eio_req *eio_fdatasync (int fd, int pri, eio_cb cb, void *data) { REQ (EIO_FDATASYNC); req->int1 = fd; SEND; } eio_req *eio_syncfs (int fd, int pri, eio_cb cb, void *data) { REQ (EIO_SYNCFS); req->int1 = fd; SEND; } eio_req *eio_sync_file_range (int fd, off_t offset, size_t nbytes, unsigned int flags, int pri, eio_cb cb, void *data) { REQ (EIO_SYNC_FILE_RANGE); req->int1 = fd; req->offs = offset; req->size = nbytes; req->int2 = flags; SEND; } eio_req *eio_mtouch (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data) { REQ (EIO_MTOUCH); req->ptr2 = addr; req->size = length; req->int1 = flags; SEND; } eio_req *eio_mlock (void *addr, size_t length, int pri, eio_cb cb, void *data) { REQ (EIO_MLOCK); req->ptr2 = addr; req->size = length; SEND; } eio_req *eio_mlockall (int flags, int pri, eio_cb cb, void *data) { REQ (EIO_MLOCKALL); req->int1 = flags; SEND; } eio_req *eio_fallocate (int fd, int mode, off_t offset, size_t len, int pri, eio_cb cb, void *data) { REQ (EIO_FALLOCATE); req->int1 = fd; req->int2 = mode; req->offs = offset; req->size = len; SEND; } eio_req *eio_close (int fd, int pri, eio_cb cb, void *data) { REQ (EIO_CLOSE); req->int1 = fd; SEND; } eio_req *eio_readahead (int fd, off_t offset, size_t length, int pri, eio_cb cb, void *data) { REQ (EIO_READAHEAD); req->int1 = fd; req->offs = offset; req->size = length; SEND; } eio_req *eio_seek (int fd, off_t offset, int whence, int pri, eio_cb cb, void *data) { REQ (EIO_SEEK); req->int1 = fd; req->offs = offset; req->int2 = whence; SEND; } eio_req *eio_read (int fd, void *buf, size_t length, off_t offset, int pri, eio_cb cb, void *data) { REQ (EIO_READ); req->int1 = fd; req->offs = offset; req->size = length; req->ptr2 = buf; SEND; } eio_req *eio_write (int fd, void *buf, size_t length, off_t offset, int pri, eio_cb cb, void *data) { REQ (EIO_WRITE); req->int1 = fd; req->offs = offset; req->size = length; req->ptr2 = buf; SEND; } eio_req *eio_fstat (int fd, int pri, eio_cb cb, void *data) { REQ (EIO_FSTAT); req->int1 = fd; SEND; } eio_req *eio_fstatvfs (int fd, int pri, eio_cb cb, void *data) { REQ (EIO_FSTATVFS); req->int1 = fd; SEND; } eio_req *eio_futime (int fd, double atime, double mtime, int pri, eio_cb cb, void *data) { REQ (EIO_FUTIME); req->int1 = fd; req->nv1 = atime; req->nv2 = mtime; SEND; } eio_req *eio_ftruncate (int fd, off_t offset, int pri, eio_cb cb, void *data) { REQ (EIO_FTRUNCATE); req->int1 = fd; req->offs = offset; SEND; } eio_req *eio_fchmod (int fd, mode_t mode, int pri, eio_cb cb, void *data) { REQ (EIO_FCHMOD); req->int1 = fd; req->int2 = (long)mode; SEND; } eio_req *eio_fchown (int fd, eio_uid_t uid, eio_gid_t gid, int pri, eio_cb cb, void *data) { REQ (EIO_FCHOWN); req->int1 = fd; req->int2 = (long)uid; req->int3 = (long)gid; SEND; } eio_req *eio_dup2 (int fd, int fd2, int pri, eio_cb cb, void *data) { REQ (EIO_DUP2); req->int1 = fd; req->int2 = fd2; SEND; } eio_req *eio_sendfile (int out_fd, int in_fd, off_t in_offset, size_t length, int pri, eio_cb cb, void *data) { REQ (EIO_SENDFILE); req->int1 = out_fd; req->int2 = in_fd; req->offs = in_offset; req->size = length; SEND; } eio_req *eio_open (const char *path, int flags, mode_t mode, int pri, eio_cb cb, void *data) { REQ (EIO_OPEN); PATH; req->int1 = flags; req->int2 = (long)mode; SEND; } eio_req *eio_utime (const char *path, double atime, double mtime, int pri, eio_cb cb, void *data) { REQ (EIO_UTIME); PATH; req->nv1 = atime; req->nv2 = mtime; SEND; } eio_req *eio_truncate (const char *path, off_t offset, int pri, eio_cb cb, void *data) { REQ (EIO_TRUNCATE); PATH; req->offs = offset; SEND; } eio_req *eio_chown (const char *path, eio_uid_t uid, eio_gid_t gid, int pri, eio_cb cb, void *data) { REQ (EIO_CHOWN); PATH; req->int2 = (long)uid; req->int3 = (long)gid; SEND; } eio_req *eio_chmod (const char *path, mode_t mode, int pri, eio_cb cb, void *data) { REQ (EIO_CHMOD); PATH; req->int2 = (long)mode; SEND; } eio_req *eio_mkdir (const char *path, mode_t mode, int pri, eio_cb cb, void *data) { REQ (EIO_MKDIR); PATH; req->int2 = (long)mode; SEND; } static eio_req * eio__1path (int type, const char *path, int pri, eio_cb cb, void *data) { REQ (type); PATH; SEND; } eio_req *eio_readlink (const char *path, int pri, eio_cb cb, void *data) { return eio__1path (EIO_READLINK, path, pri, cb, data); } eio_req *eio_realpath (const char *path, int pri, eio_cb cb, void *data) { return eio__1path (EIO_REALPATH, path, pri, cb, data); } eio_req *eio_stat (const char *path, int pri, eio_cb cb, void *data) { return eio__1path (EIO_STAT, path, pri, cb, data); } eio_req *eio_lstat (const char *path, int pri, eio_cb cb, void *data) { return eio__1path (EIO_LSTAT, path, pri, cb, data); } eio_req *eio_statvfs (const char *path, int pri, eio_cb cb, void *data) { return eio__1path (EIO_STATVFS, path, pri, cb, data); } eio_req *eio_unlink (const char *path, int pri, eio_cb cb, void *data) { return eio__1path (EIO_UNLINK, path, pri, cb, data); } eio_req *eio_rmdir (const char *path, int pri, eio_cb cb, void *data) { return eio__1path (EIO_RMDIR, path, pri, cb, data); } eio_req *eio_readdir (const char *path, int flags, int pri, eio_cb cb, void *data) { REQ (EIO_READDIR); PATH; req->int1 = flags; SEND; } eio_req *eio_mknod (const char *path, mode_t mode, dev_t dev, int pri, eio_cb cb, void *data) { REQ (EIO_MKNOD); PATH; req->int2 = (long)mode; req->offs = (off_t)dev; SEND; } static eio_req * eio__2path (int type, const char *path, const char *new_path, int pri, eio_cb cb, void *data) { REQ (type); PATH; req->flags |= EIO_FLAG_PTR2_FREE; req->ptr2 = strdup (new_path); if (!req->ptr2) { eio_api_destroy (req); return 0; } SEND; } eio_req *eio_link (const char *path, const char *new_path, int pri, eio_cb cb, void *data) { return eio__2path (EIO_LINK, path, new_path, pri, cb, data); } eio_req *eio_symlink (const char *path, const char *new_path, int pri, eio_cb cb, void *data) { return eio__2path (EIO_SYMLINK, path, new_path, pri, cb, data); } eio_req *eio_rename (const char *path, const char *new_path, int pri, eio_cb cb, void *data) { return eio__2path (EIO_RENAME, path, new_path, pri, cb, data); } eio_req *eio_custom (void (*execute)(eio_req *), int pri, eio_cb cb, void *data) { REQ (EIO_CUSTOM); req->feed = execute; SEND; } #endif eio_req *eio_grp (eio_cb cb, void *data) { const int pri = EIO_PRI_MAX; REQ (EIO_GROUP); SEND; } #undef REQ #undef PATH #undef SEND /*****************************************************************************/ /* grp functions */ void eio_grp_feed (eio_req *grp, void (*feed)(eio_req *req), int limit) { grp->int2 = limit; grp->feed = feed; grp_try_feed (grp); } void eio_grp_limit (eio_req *grp, int limit) { grp->int2 = limit; grp_try_feed (grp); } void eio_grp_add (eio_req *grp, eio_req *req) { assert (("cannot add requests to IO::AIO::GRP after the group finished", grp->int1 != 2)); grp->flags |= EIO_FLAG_GROUPADD; ++grp->size; req->grp = grp; req->grp_prev = 0; req->grp_next = grp->grp_first; if (grp->grp_first) grp->grp_first->grp_prev = req; grp->grp_first = req; } /*****************************************************************************/ /* misc garbage */ eio_ssize_t eio_sendfile_sync (int ofd, int ifd, off_t offset, size_t count) { return eio__sendfile (ofd, ifd, offset, count); } passenger-4.0.37/ext/libeio/eio.h000644 000765 000024 00000037634 12233035540 017221 0ustar00honglistaff000000 000000 /* * libeio API header * * Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without modifica- * tion, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MER- * CHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPE- * CIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTH- * ERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * * Alternatively, the contents of this file may be used under the terms of * the GNU General Public License ("GPL") version 2 or any later version, * in which case the provisions of the GPL are applicable instead of * the above. If you wish to allow the use of your version of this file * only under the terms of the GPL and not to allow others to use your * version of this file under the BSD license, indicate your decision * by deleting the provisions above and replace them with the notice * and other provisions required by the GPL. If you do not delete the * provisions above, a recipient may use your version of this file under * either the BSD or the GPL. */ #ifndef EIO_H_ #define EIO_H_ #ifdef __cplusplus extern "C" { #endif #include #include #include typedef struct eio_req eio_req; typedef struct eio_dirent eio_dirent; typedef int (*eio_cb)(eio_req *req); #ifndef EIO_REQ_MEMBERS # define EIO_REQ_MEMBERS #endif #ifndef EIO_STRUCT_STAT # ifdef _WIN32 # define EIO_STRUCT_STAT struct _stati64 # define EIO_STRUCT_STATI64 # else # define EIO_STRUCT_STAT struct stat # endif #endif #ifdef _WIN32 typedef int eio_uid_t; typedef int eio_gid_t; #ifdef __MINGW32__ /* no intptr_t */ typedef ssize_t eio_ssize_t; #else typedef intptr_t eio_ssize_t; /* or SSIZE_T */ #endif #if __GNUC__ typedef long long eio_ino_t; /* signed for compatibility to msvc */ #else typedef __int64 eio_ino_t; /* unsigned not supported by msvc */ #endif #else typedef uid_t eio_uid_t; typedef gid_t eio_gid_t; typedef ssize_t eio_ssize_t; typedef ino_t eio_ino_t; #endif #ifndef EIO_STRUCT_STATVFS # define EIO_STRUCT_STATVFS struct statvfs #endif /* managing working directories */ typedef struct eio_pwd *eio_wd; #define EIO_CWD 0 /* the current working directory of the process, guaranteed to be a null pointer */ #define EIO_INVALID_WD ((eio_wd)(int)-1) /* failure return for eio_wd_open */ eio_wd eio_wd_open_sync (eio_wd wd, const char *path); void eio_wd_close_sync (eio_wd wd); /* for readdir */ /* eio_readdir flags */ enum { EIO_READDIR_DENTS = 0x01, /* ptr2 contains eio_dirents, not just the (unsorted) names */ EIO_READDIR_DIRS_FIRST = 0x02, /* dirents gets sorted into a good stat() ing order to find directories first */ EIO_READDIR_STAT_ORDER = 0x04, /* dirents gets sorted into a good stat() ing order to quickly stat all files */ EIO_READDIR_FOUND_UNKNOWN = 0x80, /* set by eio_readdir when *_ARRAY was set and any TYPE=UNKNOWN's were found */ EIO_READDIR_CUSTOM1 = 0x100, /* for use by apps */ EIO_READDIR_CUSTOM2 = 0x200 /* for use by apps */ }; /* using "typical" values in the hope that the compiler will do something sensible */ enum eio_dtype { EIO_DT_UNKNOWN = 0, EIO_DT_FIFO = 1, EIO_DT_CHR = 2, EIO_DT_MPC = 3, /* multiplexed char device (v7+coherent) */ EIO_DT_DIR = 4, EIO_DT_NAM = 5, /* xenix special named file */ EIO_DT_BLK = 6, EIO_DT_MPB = 7, /* multiplexed block device (v7+coherent) */ EIO_DT_REG = 8, EIO_DT_NWK = 9, /* HP-UX network special */ EIO_DT_CMP = 9, /* VxFS compressed */ EIO_DT_LNK = 10, /* DT_SHAD = 11,*/ EIO_DT_SOCK = 12, EIO_DT_DOOR = 13, /* solaris door */ EIO_DT_WHT = 14, EIO_DT_MAX = 15 /* highest DT_VALUE ever, hopefully */ }; struct eio_dirent { int nameofs; /* offset of null-terminated name string in (char *)req->ptr2 */ unsigned short namelen; /* size of filename without trailing 0 */ unsigned char type; /* one of EIO_DT_* */ signed char score; /* internal use */ eio_ino_t inode; /* the inode number, if available, otherwise unspecified */ }; /* eio_msync flags */ enum { EIO_MS_ASYNC = 1, EIO_MS_INVALIDATE = 2, EIO_MS_SYNC = 4 }; /* eio_mtouch flags */ enum { EIO_MT_MODIFY = 1 }; /* eio_sync_file_range flags */ enum { EIO_SYNC_FILE_RANGE_WAIT_BEFORE = 1, EIO_SYNC_FILE_RANGE_WRITE = 2, EIO_SYNC_FILE_RANGE_WAIT_AFTER = 4 }; /* eio_fallocate flags */ enum { /* these MUST match the value in linux/falloc.h */ EIO_FALLOC_FL_KEEP_SIZE = 1, EIO_FALLOC_FL_PUNCH_HOLE = 2 }; /* timestamps and differences - feel free to use double in your code directly */ typedef double eio_tstamp; /* the eio request structure */ enum { EIO_CUSTOM, EIO_WD_OPEN, EIO_WD_CLOSE, EIO_CLOSE, EIO_DUP2, EIO_SEEK, EIO_READ, EIO_WRITE, EIO_READAHEAD, EIO_SENDFILE, EIO_FSTAT, EIO_FSTATVFS, EIO_FTRUNCATE, EIO_FUTIME, EIO_FCHMOD, EIO_FCHOWN, EIO_SYNC, EIO_FSYNC, EIO_FDATASYNC, EIO_SYNCFS, EIO_MSYNC, EIO_MTOUCH, EIO_SYNC_FILE_RANGE, EIO_FALLOCATE, EIO_MLOCK, EIO_MLOCKALL, EIO_GROUP, EIO_NOP, EIO_BUSY, /* these use wd + ptr1, but are emulated */ EIO_REALPATH, EIO_READDIR, /* all the following requests use wd + ptr1 as path in xxxat functions */ EIO_OPEN, EIO_STAT, EIO_LSTAT, EIO_STATVFS, EIO_TRUNCATE, EIO_UTIME, EIO_CHMOD, EIO_CHOWN, EIO_UNLINK, EIO_RMDIR, EIO_MKDIR, EIO_RENAME, EIO_MKNOD, EIO_LINK, EIO_SYMLINK, EIO_READLINK, EIO_REQ_TYPE_NUM }; /* seek whence modes */ /* these are guaranteed to hasve the traditional 0, 1, 2 values, */ /* so you might as wlel use those */ enum { EIO_SEEK_SET = 0, EIO_SEEK_CUR = 1, EIO_SEEK_END = 2 }; /* mlockall constants */ enum { EIO_MCL_CURRENT = 1, EIO_MCL_FUTURE = 2 }; /* request priorities */ enum { EIO_PRI_MIN = -4, EIO_PRI_MAX = 4, EIO_PRI_DEFAULT = 0 }; /* eio request structure */ /* this structure is mostly read-only */ /* when initialising it, all members must be zero-initialised */ struct eio_req { eio_req volatile *next; /* private ETP */ eio_wd wd; /* all applicable requests: working directory of pathname, old name; wd_open: return wd */ eio_ssize_t result; /* result of syscall, e.g. result = read (... */ off_t offs; /* read, write, truncate, readahead, sync_file_range, fallocate: file offset, mknod: dev_t */ size_t size; /* read, write, readahead, sendfile, msync, mlock, sync_file_range, fallocate: length */ void *ptr1; /* all applicable requests: pathname, old name; readdir: optional eio_dirents */ void *ptr2; /* all applicable requests: new name or memory buffer; readdir: name strings */ eio_tstamp nv1; /* utime, futime: atime; busy: sleep time */ eio_tstamp nv2; /* utime, futime: mtime */ int type; /* EIO_xxx constant ETP */ int int1; /* all applicable requests: file descriptor; sendfile: output fd; open, msync, mlockall, readdir: flags */ long int2; /* chown, fchown: uid; sendfile: input fd; open, chmod, mkdir, mknod: file mode, seek: whence, sync_file_range, fallocate: flags */ long int3; /* chown, fchown: gid; rename, link: working directory of new name */ int errorno; /* errno value on syscall return */ #if __i386 || __amd64 unsigned char cancelled; #else sig_atomic_t cancelled; #endif unsigned char flags; /* private */ signed char pri; /* the priority */ void *data; eio_cb finish; void (*destroy)(eio_req *req); /* called when request no longer needed */ void (*feed)(eio_req *req); /* only used for group requests */ EIO_REQ_MEMBERS eio_req *grp, *grp_prev, *grp_next, *grp_first; /* private */ }; /* _private_ request flags */ enum { EIO_FLAG_PTR1_FREE = 0x01, /* need to free(ptr1) */ EIO_FLAG_PTR2_FREE = 0x02, /* need to free(ptr2) */ EIO_FLAG_GROUPADD = 0x04 /* some request was added to the group */ }; /* undocumented/unsupported/private helper */ /*void eio_page_align (void **addr, size_t *length);*/ /* returns < 0 on error, errno set * need_poll, if non-zero, will be called when results are available * and eio_poll_cb needs to be invoked (it MUST NOT call eio_poll_cb itself). * done_poll is called when the need to poll is gone. */ int eio_init (void (*want_poll)(void), void (*done_poll)(void)); /* must be called regularly to handle pending requests */ /* returns 0 if all requests were handled, -1 if not, or the value of EIO_FINISH if != 0 */ int eio_poll (void); /* stop polling if poll took longer than duration seconds */ void eio_set_max_poll_time (eio_tstamp nseconds); /* do not handle more then count requests in one call to eio_poll_cb */ void eio_set_max_poll_reqs (unsigned int nreqs); /* set minimum required number * maximum wanted number * or maximum idle number of threads */ void eio_set_min_parallel (unsigned int nthreads); void eio_set_max_parallel (unsigned int nthreads); void eio_set_max_idle (unsigned int nthreads); void eio_set_idle_timeout (unsigned int seconds); unsigned int eio_nreqs (void); /* number of requests in-flight */ unsigned int eio_nready (void); /* number of not-yet handled requests */ unsigned int eio_npending (void); /* number of finished but unhandled requests */ unsigned int eio_nthreads (void); /* number of worker threads in use currently */ /*****************************************************************************/ /* convenience wrappers */ #ifndef EIO_NO_WRAPPERS eio_req *eio_wd_open (const char *path, int pri, eio_cb cb, void *data); /* result=wd */ eio_req *eio_wd_close (eio_wd wd, int pri, eio_cb cb, void *data); eio_req *eio_nop (int pri, eio_cb cb, void *data); /* does nothing except go through the whole process */ eio_req *eio_busy (eio_tstamp delay, int pri, eio_cb cb, void *data); /* ties a thread for this long, simulating busyness */ eio_req *eio_sync (int pri, eio_cb cb, void *data); eio_req *eio_fsync (int fd, int pri, eio_cb cb, void *data); eio_req *eio_fdatasync (int fd, int pri, eio_cb cb, void *data); eio_req *eio_syncfs (int fd, int pri, eio_cb cb, void *data); eio_req *eio_msync (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data); eio_req *eio_mtouch (void *addr, size_t length, int flags, int pri, eio_cb cb, void *data); eio_req *eio_mlock (void *addr, size_t length, int pri, eio_cb cb, void *data); eio_req *eio_mlockall (int flags, int pri, eio_cb cb, void *data); eio_req *eio_sync_file_range (int fd, off_t offset, size_t nbytes, unsigned int flags, int pri, eio_cb cb, void *data); eio_req *eio_fallocate (int fd, int mode, off_t offset, size_t len, int pri, eio_cb cb, void *data); eio_req *eio_close (int fd, int pri, eio_cb cb, void *data); eio_req *eio_readahead (int fd, off_t offset, size_t length, int pri, eio_cb cb, void *data); eio_req *eio_seek (int fd, off_t offset, int whence, int pri, eio_cb cb, void *data); eio_req *eio_read (int fd, void *buf, size_t length, off_t offset, int pri, eio_cb cb, void *data); eio_req *eio_write (int fd, void *buf, size_t length, off_t offset, int pri, eio_cb cb, void *data); eio_req *eio_fstat (int fd, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */ eio_req *eio_fstatvfs (int fd, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */ eio_req *eio_futime (int fd, eio_tstamp atime, eio_tstamp mtime, int pri, eio_cb cb, void *data); eio_req *eio_ftruncate (int fd, off_t offset, int pri, eio_cb cb, void *data); eio_req *eio_fchmod (int fd, mode_t mode, int pri, eio_cb cb, void *data); eio_req *eio_fchown (int fd, eio_uid_t uid, eio_gid_t gid, int pri, eio_cb cb, void *data); eio_req *eio_dup2 (int fd, int fd2, int pri, eio_cb cb, void *data); eio_req *eio_sendfile (int out_fd, int in_fd, off_t in_offset, size_t length, int pri, eio_cb cb, void *data); eio_req *eio_open (const char *path, int flags, mode_t mode, int pri, eio_cb cb, void *data); eio_req *eio_utime (const char *path, eio_tstamp atime, eio_tstamp mtime, int pri, eio_cb cb, void *data); eio_req *eio_truncate (const char *path, off_t offset, int pri, eio_cb cb, void *data); eio_req *eio_chown (const char *path, eio_uid_t uid, eio_gid_t gid, int pri, eio_cb cb, void *data); eio_req *eio_chmod (const char *path, mode_t mode, int pri, eio_cb cb, void *data); eio_req *eio_mkdir (const char *path, mode_t mode, int pri, eio_cb cb, void *data); eio_req *eio_readdir (const char *path, int flags, int pri, eio_cb cb, void *data); /* result=ptr2 allocated dynamically */ eio_req *eio_rmdir (const char *path, int pri, eio_cb cb, void *data); eio_req *eio_unlink (const char *path, int pri, eio_cb cb, void *data); eio_req *eio_readlink (const char *path, int pri, eio_cb cb, void *data); /* result=ptr2 allocated dynamically */ eio_req *eio_realpath (const char *path, int pri, eio_cb cb, void *data); /* result=ptr2 allocated dynamically */ eio_req *eio_stat (const char *path, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */ eio_req *eio_lstat (const char *path, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */ eio_req *eio_statvfs (const char *path, int pri, eio_cb cb, void *data); /* stat buffer=ptr2 allocated dynamically */ eio_req *eio_mknod (const char *path, mode_t mode, dev_t dev, int pri, eio_cb cb, void *data); eio_req *eio_link (const char *path, const char *new_path, int pri, eio_cb cb, void *data); eio_req *eio_symlink (const char *path, const char *new_path, int pri, eio_cb cb, void *data); eio_req *eio_rename (const char *path, const char *new_path, int pri, eio_cb cb, void *data); eio_req *eio_custom (void (*execute)(eio_req *), int pri, eio_cb cb, void *data); #endif /*****************************************************************************/ /* groups */ eio_req *eio_grp (eio_cb cb, void *data); void eio_grp_feed (eio_req *grp, void (*feed)(eio_req *req), int limit); void eio_grp_limit (eio_req *grp, int limit); void eio_grp_add (eio_req *grp, eio_req *req); void eio_grp_cancel (eio_req *grp); /* cancels all sub requests but not the group */ /*****************************************************************************/ /* request api */ /* true if the request was cancelled, useful in the invoke callback */ #define EIO_CANCELLED(req) ((req)->cancelled) #define EIO_RESULT(req) ((req)->result) /* returns a pointer to the result buffer allocated by eio */ #define EIO_BUF(req) ((req)->ptr2) #define EIO_STAT_BUF(req) ((EIO_STRUCT_STAT *)EIO_BUF(req)) #define EIO_STATVFS_BUF(req) ((EIO_STRUCT_STATVFS *)EIO_BUF(req)) #define EIO_PATH(req) ((char *)(req)->ptr1) /* submit a request for execution */ void eio_submit (eio_req *req); /* cancel a request as soon fast as possible, if possible */ void eio_cancel (eio_req *req); /*****************************************************************************/ /* convenience functions */ eio_ssize_t eio_sendfile_sync (int ofd, int ifd, off_t offset, size_t count); #ifdef __cplusplus } #endif #endif passenger-4.0.37/ext/libeio/install-sh000755 000765 000024 00000032537 12233035540 020275 0ustar00honglistaff000000 000000 #!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: passenger-4.0.37/ext/libeio/libeio.m4000644 000765 000024 00000013403 12233035540 017765 0ustar00honglistaff000000 000000 dnl openbsd in it's neverending brokenness requires stdint.h for intptr_t, dnl but that header isn't very portable... AC_CHECK_HEADERS([stdint.h sys/syscall.h sys/prctl.h]) AC_SEARCH_LIBS( pthread_create, [pthread pthreads pthreadVC2], , [AC_MSG_ERROR(pthread functions not found)] ) AC_CACHE_CHECK(for utimes, ac_cv_utimes, [AC_LINK_IFELSE([[ #include #include #include struct timeval tv[2]; int res; int main (void) { res = utimes ("/", tv); return 0; } ]],ac_cv_utimes=yes,ac_cv_utimes=no)]) test $ac_cv_utimes = yes && AC_DEFINE(HAVE_UTIMES, 1, utimes(2) is available) AC_CACHE_CHECK(for futimes, ac_cv_futimes, [AC_LINK_IFELSE([[ #include #include #include struct timeval tv[2]; int res; int fd; int main (void) { res = futimes (fd, tv); return 0; } ]],ac_cv_futimes=yes,ac_cv_futimes=no)]) test $ac_cv_futimes = yes && AC_DEFINE(HAVE_FUTIMES, 1, futimes(2) is available) AC_CACHE_CHECK(for readahead, ac_cv_readahead, [AC_LINK_IFELSE([ #include int main (void) { int fd = 0; size_t count = 2; ssize_t res; res = readahead (fd, 0, count); return 0; } ],ac_cv_readahead=yes,ac_cv_readahead=no)]) test $ac_cv_readahead = yes && AC_DEFINE(HAVE_READAHEAD, 1, readahead(2) is available (linux)) AC_CACHE_CHECK(for fdatasync, ac_cv_fdatasync, [AC_LINK_IFELSE([ #include int main (void) { int fd = 0; fdatasync (fd); return 0; } ],ac_cv_fdatasync=yes,ac_cv_fdatasync=no)]) test $ac_cv_fdatasync = yes && AC_DEFINE(HAVE_FDATASYNC, 1, fdatasync(2) is available) AC_CACHE_CHECK(for sendfile, ac_cv_sendfile, [AC_LINK_IFELSE([ # include #if __linux # include #elif __FreeBSD__ || defined __APPLE__ # include # include #elif __hpux # include #else # error unsupported architecture #endif int main (void) { int fd = 0; off_t offset = 1; size_t count = 2; ssize_t res; #if __linux res = sendfile (fd, fd, offset, count); #elif __FreeBSD__ res = sendfile (fd, fd, offset, count, 0, &offset, 0); #elif __hpux res = sendfile (fd, fd, offset, count, 0, 0); #endif return 0; } ],ac_cv_sendfile=yes,ac_cv_sendfile=no)]) test $ac_cv_sendfile = yes && AC_DEFINE(HAVE_SENDFILE, 1, sendfile(2) is available and supported) AC_CACHE_CHECK(for sync_file_range, ac_cv_sync_file_range, [AC_LINK_IFELSE([ #include int main (void) { int fd = 0; off64_t offset = 1; off64_t nbytes = 1; unsigned int flags = SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER; ssize_t res; res = sync_file_range (fd, offset, nbytes, flags); return 0; } ],ac_cv_sync_file_range=yes,ac_cv_sync_file_range=no)]) test $ac_cv_sync_file_range = yes && AC_DEFINE(HAVE_SYNC_FILE_RANGE, 1, sync_file_range(2) is available) AC_CACHE_CHECK(for fallocate, ac_cv_linux_fallocate, [AC_LINK_IFELSE([ #include int main (void) { int fd = 0; int mode = 0; off_t offset = 1; off_t len = 1; int res; res = fallocate (fd, mode, offset, len); return 0; } ],ac_cv_linux_fallocate=yes,ac_cv_linux_fallocate=no)]) test $ac_cv_linux_fallocate = yes && AC_DEFINE(HAVE_LINUX_FALLOCATE, 1, fallocate(2) is available) AC_CACHE_CHECK(for sys_syncfs, ac_cv_sys_syncfs, [AC_LINK_IFELSE([ #include #include int main (void) { int res = syscall (__NR_syncfs, (int)0); } ],ac_cv_sys_syncfs=yes,ac_cv_sys_syncfs=no)]) test $ac_cv_sys_syncfs = yes && AC_DEFINE(HAVE_SYS_SYNCFS, 1, syscall(__NR_syncfs) is available) AC_CACHE_CHECK(for prctl_set_name, ac_cv_prctl_set_name, [AC_LINK_IFELSE([ #include int main (void) { char name[] = "test123"; int res = prctl (PR_SET_NAME, (unsigned long)name, 0, 0, 0); } ],ac_cv_prctl_set_name=yes,ac_cv_prctl_set_name=no)]) test $ac_cv_prctl_set_name = yes && AC_DEFINE(HAVE_PRCTL_SET_NAME, 1, prctl(PR_SET_NAME) is available) dnl ############################################################################# dnl # these checks exist for the benefit of IO::AIO dnl at least uclibc defines _POSIX_ADVISORY_INFO without *any* of the required dnl functionality actually being present. ugh. AC_CACHE_CHECK(for posix_madvise, ac_cv_posix_madvise, [AC_LINK_IFELSE([ #include int main (void) { int res = posix_madvise ((void *)0, (size_t)0, POSIX_MADV_NORMAL); int a = POSIX_MADV_SEQUENTIAL; int b = POSIX_MADV_RANDOM; int c = POSIX_MADV_WILLNEED; int d = POSIX_MADV_DONTNEED; return 0; } ],ac_cv_posix_madvise=yes,ac_cv_posix_madvise=no)]) test $ac_cv_posix_madvise = yes && AC_DEFINE(HAVE_POSIX_MADVISE, 1, posix_madvise(2) is available) AC_CACHE_CHECK(for posix_fadvise, ac_cv_posix_fadvise, [AC_LINK_IFELSE([ #define _XOPEN_SOURCE 600 #include int main (void) { int res = posix_fadvise ((int)0, (off_t)0, (off_t)0, POSIX_FADV_NORMAL); int a = POSIX_FADV_SEQUENTIAL; int b = POSIX_FADV_NOREUSE; int c = POSIX_FADV_RANDOM; int d = POSIX_FADV_WILLNEED; int e = POSIX_FADV_DONTNEED; return 0; } ],ac_cv_posix_fadvise=yes,ac_cv_posix_fadvise=no)]) test $ac_cv_posix_fadvise = yes && AC_DEFINE(HAVE_POSIX_FADVISE, 1, posix_fadvise(2) is available) dnl lots of linux specifics AC_CHECK_HEADERS([linux/fs.h linux/fiemap.h]) AC_CACHE_CHECK([for splice, vmsplice and tee], ac_cv_linux_splice, [AC_LINK_IFELSE([ #include int main (void) { ssize_t res; res = splice ((int)0, (loff_t)0, (int)0, (loff_t *)0, (size_t)0, SPLICE_F_MOVE | SPLICE_F_NONBLOCK | SPLICE_F_MORE); res = tee ((int)0, (int)0, (size_t)0, SPLICE_F_NONBLOCK); res = vmsplice ((int)0, (struct iovec *)0, 0, SPLICE_F_NONBLOCK | SPLICE_F_GIFT); return 0; } ],ac_cv_linux_splice=yes,ac_cv_linux_splice=no)]) test $ac_cv_linux_splice = yes && AC_DEFINE(HAVE_LINUX_SPLICE, 1, splice/vmsplice/tee(2) are available) passenger-4.0.37/ext/libeio/LICENSE000644 000765 000024 00000003757 12233035540 017300 0ustar00honglistaff000000 000000 All files in libeio are Copyright (C)2007,2008 Marc Alexander Lehmann. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Alternatively, the contents of this package may be used under the terms of the GNU General Public License ("GPL") version 2 or any later version, in which case the provisions of the GPL are applicable instead of the above. If you wish to allow the use of your version of this package only under the terms of the GPL and not to allow others to use your version of this file under the BSD license, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL in this and the other files of this package. If you do not delete the provisions above, a recipient may use your version of this file under either the BSD or the GPL. passenger-4.0.37/ext/libeio/ltmain.sh000755 000765 000024 00001050171 12233035540 020107 0ustar00honglistaff000000 000000 # libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4 TIMESTAMP="" package_revision=1.3293 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="grep -E"} : ${FGREP="grep -F"} : ${GREP="grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_apped perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 passenger-4.0.37/ext/libeio/Makefile.am000644 000765 000024 00000000427 12233035540 020316 0ustar00honglistaff000000 000000 AUTOMAKE_OPTIONS = foreign no-dependencies VERSION_INFO = 1:0 EXTRA_DIST = LICENSE Changes autogen.sh #man_MANS = ev.3 include_HEADERS = eio.h lib_LTLIBRARIES = libeio.la libeio_la_SOURCES = eio.c ecb.h xthread.h config.h libeio_la_LDFLAGS = -version-info $(VERSION_INFO) passenger-4.0.37/ext/libeio/Makefile.in000644 000765 000024 00000052655 12233035540 020341 0ustar00honglistaff000000 000000 # Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = $(am__configure_deps) $(include_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(top_srcdir)/configure config.guess \ config.sub install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/libeio.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libeio_la_LIBADD = am_libeio_la_OBJECTS = eio.lo libeio_la_OBJECTS = $(am_libeio_la_OBJECTS) libeio_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libeio_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = am__depfiles_maybe = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libeio_la_SOURCES) DIST_SOURCES = $(libeio_la_SOURCES) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign no-dependencies VERSION_INFO = 1:0 EXTRA_DIST = LICENSE Changes autogen.sh #man_MANS = ev.3 include_HEADERS = eio.h lib_LTLIBRARIES = libeio.la libeio_la_SOURCES = eio.c ecb.h xthread.h config.h libeio_la_LDFLAGS = -version-info $(VERSION_INFO) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libeio.la: $(libeio_la_OBJECTS) $(libeio_la_DEPENDENCIES) $(libeio_la_LINK) -rpath $(libdir) $(libeio_la_OBJECTS) $(libeio_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .c.o: $(COMPILE) -c $< .c.obj: $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool ctags dist \ dist-all dist-bzip2 dist-gzip dist-lzma dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: passenger-4.0.37/ext/libeio/missing000755 000765 000024 00000026233 12233035540 017664 0ustar00honglistaff000000 000000 #! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: passenger-4.0.37/ext/libeio/xthread.h000644 000765 000024 00000011300 12233035540 020062 0ustar00honglistaff000000 000000 #ifndef XTHREAD_H_ #define XTHREAD_H_ /* whether word reads are potentially non-atomic. * this is conservative, likely most arches this runs * on have atomic word read/writes. */ #ifndef WORDACCESS_UNSAFE # if __i386 || __x86_64 # define WORDACCESS_UNSAFE 0 # else # define WORDACCESS_UNSAFE 1 # endif #endif ///////////////////////////////////////////////////////////////////////////// #ifdef _WIN32 #define NTDDI_VERSION NTDDI_WIN2K // needed to get win2000 api calls #define _WIN32_WINNT 0x400 #include //D #include #include #include #include #include #include #include #define sigset_t int #define sigfillset(a) #define pthread_sigmask(a,b,c) #define sigaddset(a,b) #define sigemptyset(s) typedef pthread_mutex_t xmutex_t; #define X_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER #define X_MUTEX_CREATE(mutex) pthread_mutex_init (&(mutex), 0) #define X_LOCK(mutex) pthread_mutex_lock (&(mutex)) #define X_UNLOCK(mutex) pthread_mutex_unlock (&(mutex)) typedef pthread_cond_t xcond_t; #define X_COND_INIT PTHREAD_COND_INITIALIZER #define X_COND_CREATE(cond) pthread_cond_init (&(cond), 0) #define X_COND_SIGNAL(cond) pthread_cond_signal (&(cond)) #define X_COND_WAIT(cond,mutex) pthread_cond_wait (&(cond), &(mutex)) #define X_COND_TIMEDWAIT(cond,mutex,to) pthread_cond_timedwait (&(cond), &(mutex), &(to)) typedef pthread_t xthread_t; #define X_THREAD_PROC(name) static void *name (void *thr_arg) #define X_THREAD_ATFORK(a,b,c) static int xthread_create (xthread_t *tid, void *(*proc)(void *), void *arg) { int retval; pthread_attr_t attr; pthread_attr_init (&attr); pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); retval = pthread_create (tid, &attr, proc, arg) == 0; pthread_attr_destroy (&attr); return retval; } #define respipe_read(a,b,c) PerlSock_recv ((a), (b), (c), 0) #define respipe_write(a,b,c) send ((a), (b), (c), 0) #define respipe_close(a) PerlSock_closesocket ((a)) #else ///////////////////////////////////////////////////////////////////////////// #if __linux && !defined(_GNU_SOURCE) # define _GNU_SOURCE #endif /* just in case */ #define _REENTRANT 1 #if __solaris # define _POSIX_PTHREAD_SEMANTICS 1 /* try to bribe solaris headers into providing a current pthread API * despite environment being configured for an older version. */ # define __EXTENSIONS__ 1 #endif #include #include #include #include #include typedef pthread_mutex_t xmutex_t; #if __linux && defined (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP) # define X_MUTEX_INIT PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP # define X_MUTEX_CREATE(mutex) \ do { \ pthread_mutexattr_t attr; \ pthread_mutexattr_init (&attr); \ pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_ADAPTIVE_NP); \ pthread_mutex_init (&(mutex), &attr); \ } while (0) #else # define X_MUTEX_INIT PTHREAD_MUTEX_INITIALIZER # define X_MUTEX_CREATE(mutex) pthread_mutex_init (&(mutex), 0) #endif #define X_LOCK(mutex) pthread_mutex_lock (&(mutex)) #define X_UNLOCK(mutex) pthread_mutex_unlock (&(mutex)) typedef pthread_cond_t xcond_t; #define X_COND_INIT PTHREAD_COND_INITIALIZER #define X_COND_CREATE(cond) pthread_cond_init (&(cond), 0) #define X_COND_SIGNAL(cond) pthread_cond_signal (&(cond)) #define X_COND_WAIT(cond,mutex) pthread_cond_wait (&(cond), &(mutex)) #define X_COND_TIMEDWAIT(cond,mutex,to) pthread_cond_timedwait (&(cond), &(mutex), &(to)) typedef pthread_t xthread_t; #define X_THREAD_PROC(name) static void *name (void *thr_arg) #define X_THREAD_ATFORK(prepare,parent,child) pthread_atfork (prepare, parent, child) // the broken bsd's once more #ifndef PTHREAD_STACK_MIN # define PTHREAD_STACK_MIN 0 #endif #ifndef X_STACKSIZE # define X_STACKSIZE sizeof (void *) * 4096 #endif static int xthread_create (xthread_t *tid, void *(*proc)(void *), void *arg) { int retval; sigset_t fullsigset, oldsigset; pthread_attr_t attr; pthread_attr_init (&attr); pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED); pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN < X_STACKSIZE ? X_STACKSIZE : PTHREAD_STACK_MIN); #ifdef PTHREAD_SCOPE_PROCESS pthread_attr_setscope (&attr, PTHREAD_SCOPE_PROCESS); #endif sigfillset (&fullsigset); pthread_sigmask (SIG_SETMASK, &fullsigset, &oldsigset); retval = pthread_create (tid, &attr, proc, arg) == 0; pthread_sigmask (SIG_SETMASK, &oldsigset, 0); pthread_attr_destroy (&attr); return retval; } #define respipe_read(a,b,c) read ((a), (b), (c)) #define respipe_write(a,b,c) write ((a), (b), (c)) #define respipe_close(a) close ((a)) #endif #endif passenger-4.0.37/ext/common/Account.h000644 000765 000024 00000012407 12233035540 020055 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_ACCOUNT_H_ #define _PASSENGER_ACCOUNT_H_ #include #include #include #include #include #include namespace Passenger { using namespace boost; using namespace std; /* * SECURITY NOTES * * We want to avoid storing plain text passwords in memory, because attackers may be able * to read this process's memory, e.g. through core dumps or debuggers. So in this source * file, as well as in several others, we follow these guidelines: * * - Variables and arguments named userSuppliedPassword represent passwords * supplied by a human, i.e. user input. These variables and arguments have the type * 'StaticString' instead of 'string', because we want to avoid accidentally copying * the password values. * - Variables and arguments named passwordOrHash might also represent passwords. However, * if it is a password, then it is guaranteed NOT to be supplied by a human, e.g. it's * randomly generated. Therefore it's okay for passwordOrHash to be of type 'string'. * - If there is a need to copy the password for whatever reason, then it must be cleared * with ZeroMemoryGuard as soon as possible. Do not use memset(), the code * for ZeroMemoryGuard explains why. */ class Account { public: enum Rights { ALL = ~0, NONE = 0, // HelperAgent ApplicationPool rights. CLEAR = 1 << 0, DETACH = 1 << 1, SET_PARAMETERS = 1 << 2, RESTART = 1 << 3, INSPECT_BASIC_INFO = 1 << 4, INSPECT_SENSITIVE_INFO = 1 << 5, // HelperAgent admin rights. INSPECT_REQUESTS = 1 << 8, INSPECT_BACKTRACES = 1 << 9, // Other rights. EXIT = 1 << 31 }; private: string username; string passwordOrHash; bool hashGiven; Rights rights; public: // Urgh, I can't use 'Rights' here as type because apparently bitwise // ORing two enums results in an int type. static Rights parseRightsString(const string &str, int defaultValue = NONE) { vector rights_vec; vector::const_iterator it; int result = defaultValue; split(str, ',', rights_vec); for (it = rights_vec.begin(); it != rights_vec.end(); it++) { if (*it == "all") { result = ALL; } else if (*it == "none") { result = NONE; } else if (*it == "clear") { result |= CLEAR; } else if (*it == "detach") { result |= DETACH; } else if (*it == "set_parameters") { result |= SET_PARAMETERS; } else if (*it == "inspect_basic_info") { result |= INSPECT_BASIC_INFO; } else if (*it == "inspect_sensitive_info") { result |= INSPECT_SENSITIVE_INFO; } else if (*it == "inspect_requests") { result |= INSPECT_REQUESTS; } else if (*it == "inspect_backtraces") { result |= INSPECT_BACKTRACES; } else if (*it == "exit") { result |= EXIT; } else if (*it != "") { throw ArgumentException("Unknown right '" + *it + "'."); } } return (Rights) result; } Account(const string &username, const string &passwordOrHash, bool hashGiven, int rights = ALL) { this->username = username; this->passwordOrHash = passwordOrHash; this->hashGiven = hashGiven; this->rights = (Rights) rights; } bool checkPasswordOrHash(const StaticString &userSuppliedPassword) const { if (hashGiven) { return passwordOrHash == createHash(userSuppliedPassword); } else { return userSuppliedPassword == passwordOrHash; } } bool hasRights(int rights) const { return this->rights & rights; } void setRights(int rights) { this->rights = (Rights) rights; } string getUsername() const { return username; } string getRawPassword() const { return passwordOrHash; } static string createHash(const StaticString &userSuppliedPassword) { // TODO: use bcrypt or something return userSuppliedPassword; } }; typedef boost::shared_ptr AccountPtr; } // namespace Passenger #endif /* _PASSENGER_ACCOUNT_H_ */ passenger-4.0.37/ext/common/AccountsDatabase.h000644 000765 000024 00000007303 12233035540 021664 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_ACCOUNTS_DATABASE_H_ #define _PASSENGER_ACCOUNTS_DATABASE_H_ #include #include #include #include #include "Account.h" #include "ServerInstanceDir.h" #include "StaticString.h" /* This source file follows the security guidelines written in Account.h. */ namespace Passenger { using namespace std; using namespace boost; class AccountsDatabase; typedef boost::shared_ptr AccountsDatabasePtr; class AccountsDatabase { private: mutable boost::mutex lock; map accounts; unsigned int uniqueNumber; public: AccountsDatabase() { uniqueNumber = 0; } unsigned int size() const { boost::lock_guard l(lock); return (unsigned int) accounts.size(); } vector listUsernames() const { map::const_iterator it; vector result; for (it = accounts.begin(); it != accounts.end(); it++) { result.push_back(it->second->getUsername()); } return result; } AccountPtr add(const string &username, const string &passwordOrHash, bool hashGiven, int rights = Account::ALL) { AccountPtr account(new Account(username, passwordOrHash, hashGiven, rights)); boost::lock_guard l(lock); accounts[username] = account; return account; } const AccountPtr get(const string &username) const { boost::lock_guard l(lock); map::const_iterator it = accounts.find(username); if (it == accounts.end()) { return AccountPtr(); } else { return it->second; } } AccountPtr authenticate(const string &username, const StaticString &userSuppliedPassword) const { boost::lock_guard l(lock); map::const_iterator it = accounts.find(username); if (it == accounts.end()) { return AccountPtr(); } else { AccountPtr account = it->second; if (account->checkPasswordOrHash(userSuppliedPassword)) { return account; } else { return AccountPtr(); } } } bool remove(const string &username) { boost::lock_guard l(lock); map::iterator it = accounts.find(username); if (it == accounts.end()) { return false; } else { accounts.erase(it); return true; } } unsigned int getUniqueNumber() { boost::lock_guard l(lock); unsigned int result = uniqueNumber; uniqueNumber++; return result; } }; } // namespace Passenger #endif /* _PASSENGER_ACCOUNTS_DATABASE_H_ */ passenger-4.0.37/ext/common/agents/000755 000765 000024 00000000000 12233035540 017565 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/common/AgentsStarter.cpp000644 000765 000024 00000012307 12233035540 021601 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #include #include #include using namespace std; using namespace boost; using namespace oxt; PP_VariantMap * pp_variant_map_new() { return (PP_VariantMap *) new Passenger::VariantMap(); } void pp_variant_map_set(PP_VariantMap *m, const char *name, const char *value, unsigned int value_len) { Passenger::VariantMap *vm = (Passenger::VariantMap *) m; vm->set(name, string(value, value_len)); } void pp_variant_map_set2(PP_VariantMap *m, const char *name, unsigned int name_len, const char *value, unsigned int value_len) { Passenger::VariantMap *vm = (Passenger::VariantMap *) m; vm->set(string(name, name_len), string(value, value_len)); } void pp_variant_map_set_int(PP_VariantMap *m, const char *name, int value) { Passenger::VariantMap *vm = (Passenger::VariantMap *) m; vm->setInt(name, value); } void pp_variant_map_set_bool(PP_VariantMap *m, const char *name, int value) { Passenger::VariantMap *vm = (Passenger::VariantMap *) m; vm->setBool(name, value); } void pp_variant_map_set_strset(PP_VariantMap *m, const char *name, const char **strs, unsigned int count) { Passenger::VariantMap *vm = (Passenger::VariantMap *) m; std::set the_set; for (unsigned int i = 0; i < count; i++) { the_set.insert(strs[i]); } vm->setStrSet(name, the_set); } void pp_variant_map_free(PP_VariantMap *m) { delete (Passenger::VariantMap *) m; } PP_AgentsStarter * pp_agents_starter_new(PP_AgentsStarterType type, char **error_message) { return (PP_AgentsStarter *) new Passenger::AgentsStarter(type); } int pp_agents_starter_start(PP_AgentsStarter *as, const char *passengerRoot, PP_VariantMap *extraParams, const PP_AfterForkCallback afterFork, void *callbackArgument, char **errorMessage) { Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as; this_thread::disable_syscall_interruption dsi; try { boost::function afterForkFunctionObject; if (afterFork != NULL) { afterForkFunctionObject = boost::bind(afterFork, callbackArgument); } agentsStarter->start(passengerRoot, *((Passenger::VariantMap *) extraParams), afterForkFunctionObject); return 1; } catch (const Passenger::SystemException &e) { errno = e.code(); *errorMessage = strdup(e.what()); return 0; } catch (const std::exception &e) { errno = -1; *errorMessage = strdup(e.what()); return 0; } } const char * pp_agents_starter_get_request_socket_filename(PP_AgentsStarter *as, unsigned int *size) { Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as; if (size != NULL) { *size = agentsStarter->getRequestSocketFilename().size(); } return agentsStarter->getRequestSocketFilename().c_str(); } const char * pp_agents_starter_get_request_socket_password(PP_AgentsStarter *as, unsigned int *size) { Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as; if (size != NULL) { *size = agentsStarter->getRequestSocketPassword().size(); } return agentsStarter->getRequestSocketPassword().c_str(); } const char * pp_agents_starter_get_server_instance_dir(PP_AgentsStarter *as) { Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as; return agentsStarter->getServerInstanceDir()->getPath().c_str(); } const char * pp_agents_starter_get_generation_dir(PP_AgentsStarter *as) { Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as; return agentsStarter->getGeneration()->getPath().c_str(); } pid_t pp_agents_starter_get_pid(PP_AgentsStarter *as) { Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as; return agentsStarter->getPid(); } void pp_agents_starter_detach(PP_AgentsStarter *as) { Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as; agentsStarter->detach(); } void pp_agents_starter_free(PP_AgentsStarter *as) { Passenger::AgentsStarter *agentsStarter = (Passenger::AgentsStarter *) as; delete agentsStarter; } passenger-4.0.37/ext/common/AgentsStarter.h000644 000765 000024 00000043345 12233035540 021254 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_AGENTS_STARTER_HPP_ #define _PASSENGER_AGENTS_STARTER_HPP_ #include #include #ifdef __cplusplus extern "C" { #endif typedef enum { AS_APACHE, AS_NGINX } PP_AgentsStarterType; typedef void PP_AgentsStarter; typedef void PP_VariantMap; typedef void (*PP_AfterForkCallback)(void *); PP_VariantMap *pp_variant_map_new(); void pp_variant_map_set(PP_VariantMap *m, const char *name, const char *value, unsigned int value_len); void pp_variant_map_set2(PP_VariantMap *m, const char *name, unsigned int name_len, const char *value, unsigned int value_len); void pp_variant_map_set_int(PP_VariantMap *m, const char *name, int value); void pp_variant_map_set_bool(PP_VariantMap *m, const char *name, int value); void pp_variant_map_set_strset(PP_VariantMap *m, const char *name, const char **strs, unsigned int count); void pp_variant_map_free(PP_VariantMap *m); PP_AgentsStarter *pp_agents_starter_new(PP_AgentsStarterType type, char **error_message); int pp_agents_starter_start(PP_AgentsStarter *as, const char *passengerRoot, PP_VariantMap *params, const PP_AfterForkCallback afterFork, void *callbackArgument, char **errorMessage); const char *pp_agents_starter_get_request_socket_filename(PP_AgentsStarter *as, unsigned int *size); const char *pp_agents_starter_get_request_socket_password(PP_AgentsStarter *as, unsigned int *size); const char *pp_agents_starter_get_server_instance_dir(PP_AgentsStarter *as); const char *pp_agents_starter_get_generation_dir(PP_AgentsStarter *as); pid_t pp_agents_starter_get_pid(PP_AgentsStarter *as); void pp_agents_starter_detach(PP_AgentsStarter *as); void pp_agents_starter_free(PP_AgentsStarter *as); #ifdef __cplusplus } /* extern "C" */ #endif #ifdef __cplusplus #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; using namespace oxt; /** * Utility class for starting various Phusion Passenger agents through the watchdog. */ class AgentsStarter { private: PP_AgentsStarterType type; /** The watchdog's PID. Equals 0 if the watchdog hasn't been started yet * or if detach() is called. */ pid_t pid; /******* Information about the started services. Only valid when pid != 0. *******/ /** The watchdog's feedback file descriptor. */ FileDescriptor feedbackFd; /** The helper agent's request socket filename and its password. This socket * is for serving SCGI requests. */ string requestSocketFilename; string requestSocketPassword; /** The socket on which the helper agent listens for administration commands, * and the corresponding password for the "web_server" account, which has the * authorization to shutdown the helper agent. */ string helperAgentAdminSocketAddress; string helperAgentExitPassword; /** The logging agent's socket address and its password. */ string loggingSocketAddress; string loggingSocketPassword; /** The server instance dir and generation dir of the agents. */ ServerInstanceDirPtr serverInstanceDir; /** The generation dir of the agents. */ ServerInstanceDir::GenerationPtr generation; /** * Safely dup2() the given file descriptor to 3 (FEEDBACK_FD). */ void installFeedbackFd(const FileDescriptor &fd) { if (fd != FEEDBACK_FD && syscalls::dup2(fd, FEEDBACK_FD) == -1) { int e = errno; try { writeArrayMessage(fd, "system error", "dup2() failed", toString(e).c_str(), NULL); _exit(1); } catch (...) { fprintf(stderr, "Passenger AgentsStarter: dup2() failed: %s (%d)\n", strerror(e), e); fflush(stderr); _exit(1); } } } /** * Call this if the watchdog seems to have crashed. This function will try * to determine whether the watchdog is still running, whether it crashed * with a signal, etc. If it has detected that the watchdog is no longer running * then it will set `pid` to -1. */ void inspectWatchdogCrashReason(pid_t &pid) { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; int ret, status; /* Upon noticing that something went wrong, the watchdog * or its subprocesses might still be writing out an error * report, so we wait a while before killing the watchdog. */ ret = timedWaitPid(pid, &status, 5000); if (ret == 0) { /* Looks like the watchdog didn't crash and is still running. */ throw RuntimeException( "Unable to start the Phusion Passenger watchdog: " "it froze during startup and reported an unknown error"); } else if (ret != -1 && WIFSIGNALED(status)) { /* Looks like a crash which caused a signal. */ pid = -1; throw RuntimeException( "Unable to start the Phusion Passenger watchdog: " "it seems to have been killed with signal " + getSignalName(WTERMSIG(status)) + " during startup"); } else if (ret == -1) { /* Looks like it exited for a different reason and has no exit code. */ pid = -1; throw RuntimeException( "Unable to start the Phusion Passenger watchdog: " "it seems to have crashed during startup for an unknown reason"); } else { /* Looks like it exited for a different reason, but has an exit code. */ pid = -1; throw RuntimeException( "Unable to start the Phusion Passenger watchdog: " "it seems to have crashed during startup for an unknown reason, " "with exit code " + toString(WEXITSTATUS(status))); } } static void killProcessGroupAndWait(pid_t *pid, unsigned long long timeout = 0) { if (*pid != -1 && (timeout == 0 || timedWaitPid(*pid, NULL, timeout) <= 0)) { this_thread::disable_syscall_interruption dsi; syscalls::killpg(*pid, SIGKILL); syscalls::waitpid(*pid, NULL, 0); *pid = -1; } } /** * Behaves like `waitpid(pid, status, WNOHANG)`, but waits at most * `timeout` miliseconds for the process to exit. */ static int timedWaitPid(pid_t pid, int *status, unsigned long long timeout) { Timer timer; int ret; do { ret = syscalls::waitpid(pid, status, WNOHANG); if (ret > 0 || ret == -1) { return ret; } else { syscalls::usleep(10000); } } while (timer.elapsed() < timeout); return 0; // timed out } /** * Gracefully shutdown an agent process by sending an exit command to its socket. * Returns whether the agent has successfully processed the exit command. * Any exceptions are caught and will cause false to be returned. */ bool gracefullyShutdownAgent(const string &address, const string &username, const string &password) { try { MessageClient client; vector args; client.connect(address, username, password); client.write("exit", NULL); return client.read(args) && args[0] == "Passed security" && client.read(args) && args[0] == "exit command received"; } catch (const SystemException &) { } catch (const IOException &) { } catch (const SecurityException &) { } return false; } public: /** * Construct a AgentsStarter object. The watchdog and the agents * aren't started yet until you call start(). * * @param type Whether one wants to start the Apache or the Nginx helper agent. */ AgentsStarter(PP_AgentsStarterType type) { this->type = type; pid = 0; } ~AgentsStarter() { if (pid != 0) { this_thread::disable_syscall_interruption dsi; bool cleanShutdown = gracefullyShutdownAgent(helperAgentAdminSocketAddress, "_web_server", helperAgentExitPassword); cleanShutdown = cleanShutdown && gracefullyShutdownAgent(loggingSocketAddress, "logging", loggingSocketPassword); /* Send a message down the feedback fd to tell the watchdog * Whether this is a clean shutdown. Closing the fd without * sending anything also indicates an unclean shutdown, * but we send a byte anyway in case there are other processes * who have the fd open. */ if (cleanShutdown) { syscalls::write(feedbackFd, "c", 1); } else { syscalls::write(feedbackFd, "u", 1); } /* If we failed to send an exit command to one of the agents then we have * to forcefully kill all agents now because otherwise one of them might * never exit. We do this by closing the feedback fd without sending a * random byte, to indicate that this is an abnormal shutdown. The watchdog * will then kill all agents. */ feedbackFd.close(); syscalls::waitpid(pid, NULL, 0); } } /** * Returns the type as was passed to the constructor. */ PP_AgentsStarterType getType() const { return type; } /** * Returns the watchdog's PID. Equals 0 if the watchdog hasn't been started yet * or if detach() is called. */ pid_t getPid() const { return pid; } // The 'const string &' here is on purpose. The C getter functions // return the string pointer directly. const string &getRequestSocketFilename() const { return requestSocketFilename; } const string &getRequestSocketPassword() const { return requestSocketPassword; } string getHelperAgentAdminSocketFilename() const { return parseUnixSocketAddress(helperAgentAdminSocketAddress); } string getHelperAgentExitPassword() const { return helperAgentExitPassword; } string getLoggingSocketAddress() const { return loggingSocketAddress; } string getLoggingSocketPassword() const { return loggingSocketPassword; } ServerInstanceDirPtr getServerInstanceDir() const { return serverInstanceDir; } ServerInstanceDir::GenerationPtr getGeneration() const { return generation; } /** * Start the agents through the watchdog. * * @throws SystemException Something went wrong. * @throws IOException Something went wrong while communicating with one * of the agents during its initialization phase. * @throws RuntimeException Something went wrong. */ void start(const string &passengerRoot, const VariantMap &extraParams = VariantMap(), const boost::function &afterFork = boost::function()) { TRACE_POINT(); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; ResourceLocator locator(passengerRoot); string watchdogFilename = locator.getAgentsDir() + "/PassengerWatchdog"; SocketPair fds; int e; pid_t pid; VariantMap params; params .set ("web_server_type", type == AS_APACHE ? "apache" : "nginx") .setPid ("web_server_pid", getpid()) .set ("web_server_passenger_version", PASSENGER_VERSION) .set ("passenger_root", passengerRoot) .setInt ("log_level", getLogLevel()) .set ("temp_dir", getSystemTempDir()); extraParams.addTo(params); fds = createUnixSocketPair(); pid = syscalls::fork(); if (pid == 0) { // Child /* Become the session leader so that Apache can't kill the * watchdog with killpg() during shutdown, so that a * Ctrl-C only affects the web server, and so that * we can kill all of our subprocesses in a single killpg(). */ setsid(); // Make sure the feedback fd is 3 and close all file descriptors // except stdin, stdout, stderr and 3. syscalls::close(fds[0]); installFeedbackFd(fds[1]); closeAllFileDescriptors(FEEDBACK_FD); /* We don't know how the web server or the environment affect * signal handlers and the signal mask, so reset this stuff * just in case. */ resetSignalHandlersAndMask(); if (afterFork) { afterFork(); } execl(watchdogFilename.c_str(), "PassengerWatchdog", (char *) 0); e = errno; try { writeArrayMessage(FEEDBACK_FD, "exec error", toString(e).c_str(), NULL); _exit(1); } catch (...) { fprintf(stderr, "Passenger AgentsStarter: could not execute %s: %s (%d)\n", watchdogFilename.c_str(), strerror(e), e); fflush(stderr); _exit(1); } } else if (pid == -1) { // Error e = errno; throw SystemException("Cannot fork a new process", e); } else { // Parent UPDATE_TRACE_POINT(); FileDescriptor feedbackFd = fds[0]; vector args; bool result = false; ScopeGuard guard(boost::bind(&AgentsStarter::killProcessGroupAndWait, &pid, 0)); fds[1].close(); /****** Send arguments to watchdog through the feedback channel ******/ UPDATE_TRACE_POINT(); /* Here we don't care about EPIPE and ECONNRESET errors. The watchdog * could have sent an error message over the feedback fd without * reading the arguments. We'll notice that later. */ try { params.writeToFd(feedbackFd); } catch (const SystemException &e) { if (e.code() != EPIPE && e.code() != ECONNRESET) { inspectWatchdogCrashReason(pid); } } /****** Read agents information report ******/ this_thread::restore_interruption ri(di); this_thread::restore_syscall_interruption rsi(dsi); UPDATE_TRACE_POINT(); try { result = readArrayMessage(feedbackFd, args); } catch (const SystemException &ex) { if (ex.code() == ECONNRESET) { inspectWatchdogCrashReason(pid); } else { killProcessGroupAndWait(&pid, 5000); guard.clear(); throw SystemException("Unable to start the Phusion Passenger watchdog: " "unable to read its startup information report", ex.code()); } } if (!result) { UPDATE_TRACE_POINT(); inspectWatchdogCrashReason(pid); } if (args[0] == "Agents information") { if ((args.size() - 1) % 2 != 0) { throw RuntimeException("Unable to start the Phusion Passenger watchdog " "because it sent an invalid startup information report (the number " "of items is not an even number)"); } VariantMap info; for (unsigned i = 1; i < args.size(); i += 2) { const string &key = args[i]; const string &value = args[i + 1]; info.set(key, value); } this->pid = pid; this->feedbackFd = feedbackFd; requestSocketFilename = info.get("request_socket_filename"); requestSocketPassword = info.get("request_socket_password"); helperAgentAdminSocketAddress = info.get("helper_agent_admin_socket_address"); helperAgentExitPassword = info.get("helper_agent_exit_password"); serverInstanceDir = boost::make_shared(info.get("server_instance_dir"), false); generation = serverInstanceDir->getGeneration(info.getInt("generation")); loggingSocketAddress = info.get("logging_socket_address"); loggingSocketPassword = info.get("logging_socket_password"); guard.clear(); } else if (args[0] == "Watchdog startup error") { killProcessGroupAndWait(&pid, 5000); guard.clear(); throw RuntimeException("Unable to start the Phusion Passenger watchdog " "because it encountered the following error during startup: " + args[1]); } else if (args[0] == "system error") { killProcessGroupAndWait(&pid, 5000); guard.clear(); throw SystemException(args[1], atoi(args[2])); } else if (args[0] == "exec error") { e = atoi(args[1]); killProcessGroupAndWait(&pid, 5000); guard.clear(); if (e == ENOENT) { string passengerRootConfig; if (type == AS_APACHE) { passengerRootConfig = "PassengerRoot"; } else { passengerRootConfig = "passenger_root"; } throw RuntimeException("Unable to start the Phusion Passenger watchdog " "because its executable (" + watchdogFilename + ") does " "not exist. This probably means that your Phusion Passenger " "installation is broken or incomplete, or that your '" + passengerRootConfig + "' directive is set to the wrong value. " "Please reinstall Phusion Passenger or fix your '" + passengerRootConfig + "' directive, whichever is applicable."); } else { throw SystemException("Unable to start the Phusion Passenger watchdog (" + watchdogFilename + ")", e); } } else { UPDATE_TRACE_POINT(); killProcessGroupAndWait(&pid, 5000); guard.clear(); throw RuntimeException("The Phusion Passenger watchdog sent an unknown feedback message '" + args[0] + "'"); } } } /** * Close any file descriptors that this object has, and make it so that the destructor * doesn't try to shut down the agents. * * @post getPid() == 0 */ void detach() { feedbackFd.close(); pid = 0; } }; } // namespace Passenger #endif /* __cplusplus */ #endif /* _PASSENGER_AGENTS_STARTER_HPP_ */ passenger-4.0.37/ext/common/ApplicationPool2/000755 000765 000024 00000000000 12233035540 021463 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/common/BackgroundEventLoop.cpp000644 000765 000024 00000006613 12233035540 022731 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; using namespace oxt; struct BackgroundEventLoopPrivate { oxt::thread *thr; boost::mutex lock; boost::condition_variable cond; bool started; }; static void signalBackgroundEventLoopExit(struct ev_loop *loop, ev_async *async, int revents) { BackgroundEventLoop *bg = (BackgroundEventLoop *) async->data; ev_break(bg->loop, EVBREAK_ALL); } static void startBackgroundLoop(BackgroundEventLoop *bg) { boost::unique_lock l(bg->priv->lock); bg->safe->setCurrentThread(); bg->priv->started = true; bg->priv->cond.notify_all(); l.unlock(); ev_run(bg->loop, 0); } BackgroundEventLoop::BackgroundEventLoop(bool scalable) { TRACE_POINT(); if (scalable) { loop = ev_loop_new(EVBACKEND_KQUEUE); if (loop == NULL) { loop = ev_loop_new(EVBACKEND_EPOLL); } if (loop == NULL) { loop = ev_loop_new(EVFLAG_AUTO); } } else { loop = ev_loop_new(EVBACKEND_POLL); } if (loop == NULL) { throw RuntimeException("Cannot create an event loop"); } async = (ev_async *) malloc(sizeof(ev_async)); async->data = this; ev_async_init(async, signalBackgroundEventLoopExit); ev_async_start(loop, async); safe = boost::make_shared(loop); priv = new BackgroundEventLoopPrivate(); priv->thr = NULL; priv->started = false; } BackgroundEventLoop::~BackgroundEventLoop() { stop(); ev_async_stop(loop, async); delete priv; free(async); } void BackgroundEventLoop::start(const string &threadName, unsigned int stackSize) { assert(priv->thr == NULL); boost::unique_lock l(priv->lock); priv->thr = new oxt::thread( boost::bind(startBackgroundLoop, this), threadName, stackSize ); while (!priv->started) { priv->cond.wait(l); } } void BackgroundEventLoop::stop() { if (priv->thr != NULL) { ev_async_send(loop, async); priv->thr->join(); priv->thr = NULL; } } bool BackgroundEventLoop::isStarted() const { return priv->thr != NULL; } } // namespace Passenger passenger-4.0.37/ext/common/BackgroundEventLoop.h000644 000765 000024 00000003754 12233035540 022401 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _BACKGROUND_EVENT_LOOP_H_ #define _BACKGROUND_EVENT_LOOP_H_ #include #include extern "C" { struct ev_loop; struct ev_async; } namespace Passenger { using namespace std; using namespace boost; class SafeLibev; struct BackgroundEventLoopPrivate; /** * Implements a libev event loop that runs in a background thread. */ struct BackgroundEventLoop { struct ev_loop *loop; ev_async *async; boost::shared_ptr safe; BackgroundEventLoopPrivate *priv; BackgroundEventLoop(bool scalable = false); ~BackgroundEventLoop(); void start(const string &threadName = "", unsigned int stackSize = 1024 * 1024); void stop(); bool isStarted() const; }; } #endif /* _BACKGROUND_EVENT_LOOP_H_ */ passenger-4.0.37/ext/common/Constants.h000644 000765 000024 00000007642 12233035540 020442 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_CONSTANTS_H_ #define _PASSENGER_CONSTANTS_H_ /* Constants.h is automatically generated from Constants.h.erb by the build system. * Most constants are derived from lib/phusion_passenger/constants.rb. * * To force regenerating this file: * rm -f ext/common/Constants.h * rake ext/common/Constants.h */ #define DEFAULT_BACKEND_ACCOUNT_RIGHTS Account::DETACH #define APACHE2_DOC_URL "http://www.modrails.com/documentation/Users%20guide%20Apache.html" #define DEB_APACHE_MODULE_PACKAGE "libapache2-mod-passenger" #define DEB_DEV_PACKAGE "passenger-dev" #define DEB_MAIN_PACKAGE "passenger" #define DEB_NGINX_PACKAGE "nginx-extras" #define DEFAULT_ANALYTICS_LOG_GROUP "" #define DEFAULT_ANALYTICS_LOG_PERMISSIONS "u=rwx,g=rx,o=rx" #define DEFAULT_ANALYTICS_LOG_USER "nobody" #define DEFAULT_CONCURRENCY_MODEL "process" #define DEFAULT_LOG_LEVEL 0 #define DEFAULT_MAX_POOL_SIZE 6 #define DEFAULT_NODEJS "node" #define DEFAULT_POOL_IDLE_TIME 300 #define DEFAULT_PYTHON "python" #define DEFAULT_RUBY "ruby" #define DEFAULT_START_TIMEOUT 90000 #define DEFAULT_THREAD_COUNT 1 #define DEFAULT_UNION_STATION_GATEWAY_ADDRESS "gateway.unionstationapp.com" #define DEFAULT_UNION_STATION_GATEWAY_PORT 443 #define DEFAULT_WEB_APP_USER "nobody" #define ENTERPRISE_URL "http://www.phusionpassenger.com/enterprise" #define FEEDBACK_FD 3 #define INDEX_DOC_URL "http://www.modrails.com/documentation/Users%20guide.html" #define MESSAGE_SERVER_MAX_PASSWORD_SIZE 100 #define MESSAGE_SERVER_MAX_USERNAME_SIZE 100 #define NGINX_DOC_URL "http://www.modrails.com/documentation/Users%20guide%20Nginx.html" #define PASSENGER_VERSION "4.0.37" #define POOL_HELPER_THREAD_STACK_SIZE 262144 #define PROCESS_SHUTDOWN_TIMEOUT 60 #define PROCESS_SHUTDOWN_TIMEOUT_DISPLAY "1 minute" #define PROGRAM_NAME "Phusion Passenger" #define RPM_APACHE_MODULE_PACKAGE "mod_passenger" #define RPM_DEV_PACKAGE "passenger-devel" #define RPM_MAIN_PACKAGE "passenger" #define RPM_NGINX_PACKAGE "nginx" #define SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION 3 #define SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION 0 #define SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION 1 #define SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION 0 #define STANDALONE_DOC_URL "http://www.modrails.com/documentation/Users%20guide%20Standalone.html" #define STANDALONE_NGINX_CONFIGURE_OPTIONS "--with-cc-opt='-Wno-error' --without-http_fastcgi_module --without-http_scgi_module --without-http_uwsgi_module --with-http_gzip_static_module --with-http_stub_status_module --with-http_ssl_module" #define SUPPORT_URL "http://www.phusionpassenger.com/support" #endif /* _PASSENGER_CONSTANTS_H */ passenger-4.0.37/ext/common/Constants.h.erb000644 000765 000024 00000003520 12233035540 021200 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_CONSTANTS_H_ #define _PASSENGER_CONSTANTS_H_ /* Constants.h is automatically generated from Constants.h.erb by the build system. * Most constants are derived from lib/phusion_passenger/constants.rb. * * To force regenerating this file: * rm -f ext/common/Constants.h * rake ext/common/Constants.h */ #define DEFAULT_BACKEND_ACCOUNT_RIGHTS Account::DETACH <% for constant_name in PhusionPassenger::SharedConstants.constants.sort %> #define <%= constant_name %> <%=PhusionPassenger::SharedConstants.const_get(constant_name).inspect %> <% end %> #endif /* _PASSENGER_CONSTANTS_H */ passenger-4.0.37/ext/common/EventedBufferedInput.h000644 000765 000024 00000026044 12233035540 022540 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _EVENTED_BUFFERED_INPUT_H_ #define _EVENTED_BUFFERED_INPUT_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace boost; using namespace oxt; #define EBI_TRACE(expr) P_TRACE(3, "[EventedBufferedInput " << this << " " << inspect() << "] " << expr) /** * Provides input buffering services for non-blocking sockets in evented I/O systems. * * Wrap an EventedBufferedInput around a socket and provide a data handler callback. * The handler is called every time there is incoming socket data. The handler must return * the number of bytes that it has actually consumed. If not everything has been * consumed, then the handler will be called with the remaining data in the next * tick. */ template class EventedBufferedInput: public boost::enable_shared_from_this< EventedBufferedInput > { private: enum State { LIVE, /** * @invariant * paused * socketPaused */ END_OF_STREAM, /** * @invariant * paused * socketPaused */ READ_ERROR, CLOSED }; SafeLibev *libev; FileDescriptor fd; ev::io watcher; StaticString buffer; State state: 2; /** * Whether this EventedBufferedInput is paused (not started). If it's * paused it should not emit data events. * * @invariant * if paused: * socketPaused */ bool paused: 1; /** * Whether the underlying socket is also paused. This does not * necessarily mean the EventedBufferedInput is also paused because * it may be emitting data events from its internal buffer. */ bool socketPaused: 1; /** * Whether the code is inside a processingBuffer() call. */ bool processingBuffer: 1; /** * Whether processBuffer() is scheduled to be called in the next * event loop iteration. */ bool nextTickInstalled: 1; /** * Increment this number to ensure that previously scheduled * processBuffer() calls will do nothing, effectively canceling * its scheduled calls. */ unsigned int generation; int error; char bufferData[bufferSize]; void verifyInvariants() { // !a || b: logical equivalent of a IMPLIES b. assert(!( state == END_OF_STREAM ) || ( paused )); assert(!( state == END_OF_STREAM ) || ( socketPaused )); assert(!( state == READ_ERROR ) || ( paused )); assert(!( state == READ_ERROR ) || ( socketPaused )); assert(!( paused ) || ( socketPaused )); } void resetCallbackFields() { onData = NULL; onError = NULL; userData = NULL; } void onReadable(ev::io &watcher, int revents) { // Keep 'this' alive until function exit. boost::shared_ptr< EventedBufferedInput > self = EventedBufferedInput::shared_from_this(); EBI_TRACE("onReadable"); verifyInvariants(); assert(!nextTickInstalled); ssize_t ret = readSocket(bufferData, bufferSize); if (ret == -1) { if (errno != EAGAIN) { error = errno; EBI_TRACE("read error " << error << " (" << strerror(error) << ")"); assert(state == LIVE); assert(!socketPaused); assert(buffer.empty()); assert(!paused); watcher.stop(); state = READ_ERROR; paused = true; socketPaused = true; verifyInvariants(); if (onError != NULL) { onError(self, "Cannot read from socket", error); verifyInvariants(); } } } else if (ret == 0) { EBI_TRACE("end of stream"); assert(state == LIVE); assert(!socketPaused); assert(buffer.empty()); assert(!paused); watcher.stop(); state = END_OF_STREAM; paused = true; socketPaused = true; verifyInvariants(); onData(self, StaticString()); verifyInvariants(); } else { EBI_TRACE("read " << ret << " bytes"); assert(state == LIVE); assert(!socketPaused); assert(buffer.empty()); assert(!paused); buffer = StaticString(bufferData, ret); processBuffer(); verifyInvariants(); } } void processBufferInNextTick() { if (!nextTickInstalled) { nextTickInstalled = true; libev->runLater(boost::bind( realProcessBufferInNextTick, boost::weak_ptr< EventedBufferedInput >(this->shared_from_this()), generation )); } } static void realProcessBufferInNextTick(boost::weak_ptr< EventedBufferedInput > wself, unsigned int generation) { boost::shared_ptr< EventedBufferedInput > self = wself.lock(); if (self != NULL && generation == self->generation) { self->verifyInvariants(); self->nextTickInstalled = false; self->processBuffer(); self->verifyInvariants(); } } struct SetProcessingBufferToFalse { EventedBufferedInput *self; SetProcessingBufferToFalse(EventedBufferedInput *_self) { self = _self; } ~SetProcessingBufferToFalse() { self->processingBuffer = false; } }; void processBuffer() { EBI_TRACE("processBuffer"); assert(!processingBuffer); processingBuffer = true; SetProcessingBufferToFalse flagGuard(this); if (state == CLOSED) { return; } assert(state == LIVE); if (paused || buffer.empty() || fd == -1) { return; } assert(buffer.size() > 0); size_t consumed = onData(EventedBufferedInput::shared_from_this(), buffer); EBI_TRACE("Consumed " << consumed << " bytes"); if (state == CLOSED) { return; } if (consumed == buffer.size()) { buffer = StaticString(); if (!paused && socketPaused) { socketPaused = false; watcher.start(); } cancelScheduledProcessBufferCall(); } else { buffer = buffer.substr(consumed); if (!socketPaused) { socketPaused = true; watcher.stop(); } if (!paused) { // Consume rest of the data in the next tick. EBI_TRACE("Consume rest in next tick"); processBufferInNextTick(); } else { cancelScheduledProcessBufferCall(); } } afterProcessingBuffer(); } void cancelScheduledProcessBufferCall() { if (nextTickInstalled) { nextTickInstalled = false; generation++; } } void _reset(SafeLibev *libev, const FileDescriptor &fd, bool firstTime = false) { if (firstTime) { generation = 0; } else { verifyInvariants(); } this->libev = libev; this->fd = fd; buffer = StaticString(); state = LIVE; paused = true; socketPaused = true; processingBuffer = false; nextTickInstalled = false; generation++; error = 0; if (watcher.is_active()) { watcher.stop(); } if (libev != NULL) { watcher.set(libev->getLoop()); } if (fd != -1) { watcher.set(fd, ev::READ); } verifyInvariants(); } protected: virtual ssize_t readSocket(void *buf, size_t n) { return syscalls::read(fd, buf, n); } virtual void afterProcessingBuffer() { // Do nothing. To be overridden in unit tests. } public: typedef size_t (*DataCallback)(const boost::shared_ptr< EventedBufferedInput > &source, const StaticString &data); typedef void (*ErrorCallback)(const boost::shared_ptr< EventedBufferedInput > &source, const char *message, int errnoCode); DataCallback onData; ErrorCallback onError; void *userData; EventedBufferedInput() { resetCallbackFields(); _reset(NULL, FileDescriptor(), true); watcher.set, &EventedBufferedInput::onReadable>(this); EBI_TRACE("created"); verifyInvariants(); } EventedBufferedInput(SafeLibev *libev, const FileDescriptor &fd) { resetCallbackFields(); _reset(libev, fd, true); watcher.set, &EventedBufferedInput::onReadable>(this); EBI_TRACE("created"); verifyInvariants(); } virtual ~EventedBufferedInput() { cancelScheduledProcessBufferCall(); watcher.stop(); EBI_TRACE("destroyed"); } bool resetable() const { return !nextTickInstalled; } void reset(SafeLibev *libev, const FileDescriptor &fd) { EBI_TRACE("reset()"); _reset(libev, fd); } void stop() { if (state == LIVE && !paused) { EBI_TRACE("stop()"); verifyInvariants(); paused = true; if (!socketPaused) { socketPaused = true; watcher.stop(); } cancelScheduledProcessBufferCall(); verifyInvariants(); } } void start() { if (state == LIVE && paused) { EBI_TRACE("start()"); verifyInvariants(); assert(socketPaused); paused = false; if (!buffer.empty()) { processBufferInNextTick(); } else { socketPaused = false; watcher.start(); cancelScheduledProcessBufferCall(); } verifyInvariants(); } } bool isStarted() const { return !paused; } bool isSocketStarted() const { return !socketPaused; } bool endReached() const { return state == END_OF_STREAM; } void readNow() { assert(!nextTickInstalled); onReadable(watcher, 0); } const FileDescriptor &getFd() const { return fd; } string inspect() const { stringstream result; const char *stateStr; result << "fd=" << fd; switch (state) { case LIVE: stateStr = "LIVE"; break; case END_OF_STREAM: stateStr = "END_OF_STREAM"; break; case READ_ERROR: stateStr = "READ_ERROR"; break; case CLOSED: stateStr = "CLOSED"; break; default: stateStr = "UNKNOWN"; break; } result << ", state=" << stateStr; result << ", buffer(" << buffer.size() << ")=\"" << cEscapeString(buffer) << "\""; result << ", paused=" << paused; result << ", socketPaused=" << socketPaused; result << ", nextTickInstalled=" << nextTickInstalled; result << ", generation=" << generation; result << ", error=" << error; return result.str(); } }; typedef boost::shared_ptr< EventedBufferedInput<> > EventedBufferedInputPtr; } // namespace Passenger #endif /* _EVENTED_BUFFERED_INPUT_H_ */ passenger-4.0.37/ext/common/EventedClient.h000644 000765 000024 00000054212 12233035540 021212 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_EVENTED_CLIENT_H_ #define _PASSENGER_EVENTED_CLIENT_H_ #include #include #include #include #include #include #include #include #include #include "FileDescriptor.h" #include "Utils/IOUtils.h" namespace Passenger { using namespace std; using namespace boost; using namespace oxt; /** * A utility class for making I/O handling in non-blocking libev evented servers * much easier. * - An EventedClient is associated with a reference counted file descriptor. * - It contains connection state information (i.e. whether the connection is * established or closed). Callbacks are provided for watching connection * state changes (e.g. onDisconnect). * - It provides reference counting features for simpler memory management * (ref() and unref()). * - It installs input and output readiness watchers that are unregistered * when the EventedClient is destroyed. One can hook into input readiness * watcher with the onReadable callback. * - Makes zero-copy writes easy. The write() method accepts an array * of buffers. Whenever possible, all of these buffers are written out in * the given order, using a single system call, without copying them into a * single temporary buffer. * - Makes non-blocking writes easy. Normally a write() system call on a * non-blocking socket can fail with EAGAIN if the socket send buffer is * full. EventedClient schedules the data to be sent later when the socket is * writable again. It automatically integrates into the main loop in order * to do this. This allows one to have write operations occur concurrently * with read operations. * In case too many scheduled writes are being piled up, EventedClient * is smart enough to temporarily disable read notifications and wait until * everything is written out before enabling read notifications again. * The definition of "too many" is customizable (setOutboxLimit()). * - EventedClient's disconnect method respects pending writes. It * will disconnect after all pending outgoing data have been written out. * *

Basic usage

* Construct an EventedClient with a libev loop and a file descriptor: * * @code * EventedClient *client = new EventedClient(loop, fd); * @endcode * * You are probably interested in read readiness notifications on fd. * However these notifications are disabled by default. You need to set the * onReadable callback (which is called every time the fd is * readable) and enable read notifications. * * @code * void onReadable(EventedClient *client) { * // do whatever you want * } * * ... * client->onReadable = onReadable; * client->notifyReads(true); * @endcode * *

Error handling

* EventedClient never raises exceptions, except when your callbacks do. * It reports errors with the onSystemError callback. That said, * EventedClient is exception-aware and will ensure that its internal * state stays consistent even when your callbacks throw exceptions. */ class EventedClient { public: typedef void (*Callback)(EventedClient *client); typedef void (*SystemErrorCallback)(EventedClient *client, const string &message, int code); protected: enum { /** * This is the initial state for a client. It means we're * connected to the client, ready to receive data and * there's no pending outgoing data. In this state we will * only be watching for read events. */ EC_CONNECTED, /** * This state is entered from EC_CONNECTED when the write() * method fails to send all data immediately and EventedClient * schedules some data to be sent later, when the socket becomes * readable again. In here we will be watching for read * and write events. Once all data has been sent out the system * will transition back to EC_CONNECTED. */ EC_WRITES_PENDING, /** * This state is entered from EC_WRITES_PENDING or from EC_CONNECTED * when the write() method fails to send all data immediately, and * the amount of data to be scheduled to be sent later is larger * than the specified outbox limit. In this state, EventedClient * will not watch for read events and will instead concentrate on * sending out all pending data before watching read events again. * When all pending data has been sent out the system will transition * to EC_CONNECTED. */ EC_TOO_MANY_WRITES_PENDING, /** * This state is like EC_CONNECTED, but indicates that the write * side of the connection has been closed. In this state write() * calls won't have any effect. */ EC_RO_CONNECTED, /** * This state is entered from EC_WRITES_PENDING when * closeWrite() has been called. The system will continue * to send out pending data but write() calls won't append more * data to the outbox. After pending data has been sent out, * the system will transition to EC_RO_CONNECTED. */ EC_RO_CONNECTED_WITH_WRITES_PENDING, /** * This state is entered from the EC_WRITES_PENDING, * EC_TOO_MANY_WRITES_PENDING, EC_RO_CONNECTED_WITH_WIRTES_PENDING * or EC_RO_CONNECTED_WITH_TOO_MANY_WRITES_PENDING state when * disconnect() is called. * It means that we want to close the connection as soon as all * pending outgoing data has been sent. As soon as that happens * it'll transition to EC_DISCONNECTED. In this state no further * I/O should be allowed. */ EC_DISCONNECTING_WITH_WRITES_PENDING, /** * Final state. Client connection has been closed. No * I/O with the client is possible. */ EC_DISCONNECTED } state; /** A libev watcher on for watching read events on fd. */ ev::io readWatcher; /** A libev watcher on for watching write events on fd. */ ev::io writeWatcher; /** Storage for data that could not be sent out immediately. */ string outbox; int refcount; unsigned int outboxLimit; bool m_notifyReads; void _onReadable(ev::io &w, int revents) { emitEvent(onReadable); } void onWritable(ev::io &w, int revents) { assert(state != EC_CONNECTED); assert(state != EC_RO_CONNECTED); assert(state != EC_DISCONNECTED); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; size_t sent = 0; bool done = outbox.empty(); while (!done) { ssize_t ret = syscalls::write(fd, outbox.data() + sent, outbox.size() - sent); if (ret == -1) { if (errno != EAGAIN) { int e = errno; if (writeErrorAction == DISCONNECT_FULL) { disconnect(true); } else { closeWrite(); } emitSystemErrorEvent("Cannot write data to client", e); return; } done = true; } else { sent += ret; done = sent == outbox.size(); } } if (sent > 0) { outbox.erase(0, sent); } updateWatcherStates(); if (outbox.empty()) { emitEvent(onPendingDataFlushed); } } bool outboxTooLarge() { return outbox.size() > 0 && outbox.size() >= outboxLimit; } void updateWatcherStates() { if (outbox.empty()) { switch (state) { case EC_CONNECTED: case EC_RO_CONNECTED: watchReadEvents(m_notifyReads); watchWriteEvents(false); break; case EC_WRITES_PENDING: case EC_TOO_MANY_WRITES_PENDING: state = EC_CONNECTED; watchReadEvents(m_notifyReads); watchWriteEvents(false); break; case EC_RO_CONNECTED_WITH_WRITES_PENDING: state = EC_RO_CONNECTED; watchReadEvents(m_notifyReads); watchWriteEvents(false); break; case EC_DISCONNECTING_WITH_WRITES_PENDING: state = EC_DISCONNECTED; watchReadEvents(false); watchWriteEvents(false); try { fd.close(); } catch (const SystemException &e) { emitSystemErrorEvent(e.brief(), e.code()); } emitEvent(onDisconnect); break; default: // Should never be reached. abort(); } } else { switch (state) { case EC_CONNECTED: if (outboxTooLarge()) { // If we have way too much stuff in the outbox then // suspend reading until we've sent out the entire outbox. state = EC_TOO_MANY_WRITES_PENDING; watchReadEvents(false); watchWriteEvents(true); } else { state = EC_WRITES_PENDING; watchReadEvents(m_notifyReads); watchWriteEvents(true); } break; case EC_RO_CONNECTED: fprintf(stderr, "BUG: when outbox is non-empty the state should never be EC_RO_CONNECTED!\n"); abort(); break; case EC_WRITES_PENDING: case EC_RO_CONNECTED_WITH_WRITES_PENDING: watchReadEvents(m_notifyReads); watchWriteEvents(true); break; case EC_TOO_MANY_WRITES_PENDING: case EC_DISCONNECTING_WITH_WRITES_PENDING: watchReadEvents(false); watchWriteEvents(true); break; default: // Should never be reached. abort(); } } } void watchReadEvents(bool enable = true) { if (readWatcher.is_active() && !enable) { readWatcher.stop(); } else if (!readWatcher.is_active() && enable) { readWatcher.start(); } } void watchWriteEvents(bool enable = true) { if (writeWatcher.is_active() && !enable) { writeWatcher.stop(); } else if (!writeWatcher.is_active() && enable) { writeWatcher.start(); } } void emitEvent(Callback callback) { if (callback != NULL) { callback(this); } } void emitSystemErrorEvent(const string &message, int code) { if (onSystemError != NULL) { onSystemError(this, message, code); } } public: /** The client's file descriptor. Could be -1: see ioAllowed(). */ FileDescriptor fd; /** Controls what to do when a write error is encountered. */ enum { /** Forcefully disconnect the client. */ DISCONNECT_FULL, /** Close the writer side of the connection, but continue allowing reading. */ DISCONNECT_WRITE } writeErrorAction; /** * Called when the file descriptor becomes readable and read notifications * are enabled (see notifyRead()). When there's too much pending * outgoing data, readability notifications are temporarily disabled; see * write() for details. */ Callback onReadable; /** * Called when the client is disconnected. This happens either immediately * when disconnect() is called, or a short amount of time later. * See the documentation for that function for details. * * Please note that destroying an EventedClient object does *not* cause * this callback to be called. */ Callback onDisconnect; /** * Called when detach() is called for the first time. */ Callback onDetach; /** * Called after all pending outgoing data have been written out. * If write() can be completed immediately without scheduling * data for later, then write() will call this callback * immediately after writing. */ Callback onPendingDataFlushed; /** * System call errors are reported with this callback. */ SystemErrorCallback onSystemError; /** * EventedClient doesn't do anything with this. Set it to whatever you want. */ void *userData; /** * Creates a new EventedClient with the given libev loop and file descriptor. * The initial reference count is 1. */ EventedClient(struct ev_loop *loop, const FileDescriptor &_fd) : readWatcher(loop), writeWatcher(loop), fd(_fd) { state = EC_CONNECTED; refcount = 1; m_notifyReads = false; outboxLimit = 1024 * 32; writeErrorAction = DISCONNECT_FULL; onReadable = NULL; onDisconnect = NULL; onDetach = NULL; onPendingDataFlushed = NULL; onSystemError = NULL; userData = NULL; readWatcher.set(fd, ev::READ); readWatcher.set(this); writeWatcher.set(this); writeWatcher.set(fd, ev::WRITE); } virtual ~EventedClient() { // Unregister file descriptor from the event loop poller before // closing the file descriptor. watchReadEvents(false); watchWriteEvents(false); } /** * Increase reference count. */ void ref() { refcount++; } /** * Decrease reference count. Upon reaching 0, this EventedClient object * will be destroyed. */ void unref() { refcount--; assert(refcount >= 0); if (refcount == 0) { delete this; } } /** * Returns whether it is allowed to perform some kind of I/O with * this client, either reading or writing. * Usually true, and false when the client is either being disconnected * or has been disconnected. A return value of false indicates that * fd might be -1, but even when it isn't -1 you shouldn't * access fd anymore. * When the connection is half-closed (e.g. after closeWrite() has * been called) the return value is still be true. Only when I/O of any * kind is disallowed will this function return false. */ bool ioAllowed() const { return state != EC_DISCONNECTING_WITH_WRITES_PENDING && state != EC_DISCONNECTED; } /** * Returns whether it is allowed to write data to the client. * Usually true, and false when the client is either being disconnected * or has been disconnected or when the writer side of the client * connection has been closed. write() will do nothing if this function * returns false. */ bool writeAllowed() const { return state == EC_CONNECTED || state == EC_WRITES_PENDING || state == EC_TOO_MANY_WRITES_PENDING || state == EC_RO_CONNECTED_WITH_WRITES_PENDING; } /** Used by unit tests. */ bool readWatcherActive() const { return readWatcher.is_active(); } /** * Returns the number of bytes that are scheduled to be sent to the * client at a later time. * * @see write() */ size_t pendingWrites() const { return outbox.size(); } /** * Sets whether you're interested in read events. This will start or * stop the input readiness watcher appropriately according to the * current state. * * If the client connection is already being closed or has already * been closed then this method does nothing. */ void notifyReads(bool enable) { if (!ioAllowed()) { return; } this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; m_notifyReads = enable; updateWatcherStates(); } /** * Sets a limit on the client outbox. The outbox is where data is stored * that could not be immediately sent to the client, e.g. because of * network congestion. Whenver the outbox's size grows past this limit, * EventedClient will enter a state in which it will stop listening for * read events and instead concentrate on sending out all pending data. * * Setting this to 0 means that the outbox has an unlimited size. Please * note however that this also means that the outbox's memory could grow * unbounded if the client is too slow at receiving data. * * The default value is some non-zero value. * * If the client connection is already being closed or has already * been closed then this method does nothing. */ void setOutboxLimit(unsigned int size) { if (!ioAllowed()) { return; } this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; outboxLimit = size; updateWatcherStates(); } void write(const StaticString &data) { write(&data, 1); } /** * Sends data to this client. This method will try to send the data * immediately (in which no intermediate copies of the data will be made), * but if the client is not yet ready to receive data (e.g. because of * network congestion) then the data will be buffered and scheduled for * sending later. * * If an I/O error was encountered then the action taken depends on the * value of writeActionError. By default it is DISCONNECT_FULL, * meaning the client connection will be closed by calling * disconnect(true). This means this method could potentially * call the onDisconnect callback. * * If the client connection is already being closed, has already * been closed or if the writer side is closed, then this method does * nothing. * * The onPendingDataFlushed callback will be called after * this data and whatever existing pending data have been written * out. That may either be immediately or after a short period of * of time. */ void write(const StaticString data[], unsigned int count) { if (!writeAllowed()) { return; } ssize_t ret; this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; ret = gatheredWrite(fd, data, count, outbox); if (ret == -1) { int e = errno; if (writeErrorAction == DISCONNECT_FULL) { disconnect(true); } else { closeWrite(); } emitSystemErrorEvent("Cannot write data to client", e); } else { updateWatcherStates(); if (outbox.empty()) { emitEvent(onPendingDataFlushed); } } } /** * Close only the writer side of the client connection. * After calling this method, subsequent write() calls won't do anything * anymore. Any pending outgoing data will be sent out whenever the * opportunity arises. * * This function does nothing if the client is being disconnected, * already disconnected or if only the writer side is closed. */ void closeWrite() { this_thread::disable_syscall_interruption dsi; switch (state) { case EC_CONNECTED: assert(outbox.empty()); state = EC_RO_CONNECTED; if (syscalls::shutdown(fd, SHUT_WR) == -1) { int e = errno; emitSystemErrorEvent( "Cannot shutdown writer half of the client socket", e); } break; case EC_WRITES_PENDING: case EC_TOO_MANY_WRITES_PENDING: state = EC_RO_CONNECTED_WITH_WRITES_PENDING; break; default: break; } updateWatcherStates(); } /** * Disconnects the client. This actually closes the underlying file * descriptor, even if the FileDescriptor object still has references. * * If force is true then the client will be disconnected * immediately, and any pending outgoing data will be discarded. * Otherwise the client will be disconnected after all pending * outgoing data have been sent; in the mean time no new data can be * received from or sent to the client. * * After the client has actually been disconnected (which may be either * immediately or after a short period of time), a disconnect event will * be emitted. * * If the client connection has already been closed then this method * does nothing. If the client connection is being closed (because * there's pending outgoing data) then the behavior depends on the * force argument: if true then the connection is closed * immediately and the pending data is discarded, otherwise this * method does nothing. * * The onDisconnect callback will be called after the file * descriptor is closed, which is either immediately or after all * pending data has been sent out. */ void disconnect(bool force = false) { if (!ioAllowed() && !(state == EC_DISCONNECTING_WITH_WRITES_PENDING && force)) { return; } this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; if (state == EC_CONNECTED || state == EC_RO_CONNECTED || force) { state = EC_DISCONNECTED; watchReadEvents(false); watchWriteEvents(false); try { fd.close(); } catch (const SystemException &e) { emitSystemErrorEvent(e.brief(), e.code()); } emitEvent(onDisconnect); } else { state = EC_DISCONNECTING_WITH_WRITES_PENDING; watchReadEvents(false); watchWriteEvents(true); if (syscalls::shutdown(fd, SHUT_RD) == -1) { int e = errno; emitSystemErrorEvent( "Cannot shutdown reader half of the client socket", e); } } } /** * Detaches the client file descriptor so that this EventedClient no longer * has any control over it. Any EventedClient I/O watchers on the client file * descriptor will be stopped and further I/O on the file descriptor via * EventedClient will become impossible. Any pending outgoing data will be * discarded. The original client file descriptor is returned and * onDetach is called. Subsequent calls to this function will * return -1 and will no longer call onDetach. * * @post !ioAllowed() * @post fd == -1 */ FileDescriptor detach() { if (state == EC_DISCONNECTED) { return fd; } else { FileDescriptor oldFd = fd; state = EC_DISCONNECTED; watchReadEvents(false); watchWriteEvents(false); fd = -1; emitEvent(onDetach); return oldFd; } } const char *getStateName() const { switch (state) { case EC_CONNECTED: return "EC_CONNECTED"; case EC_WRITES_PENDING: return "EC_WRITES_PENDING"; case EC_TOO_MANY_WRITES_PENDING: return "EC_TOO_MANY_WRITES_PENDING"; case EC_RO_CONNECTED: return "EC_RO_CONNECTED"; case EC_RO_CONNECTED_WITH_WRITES_PENDING: return "EC_RO_CONNECTED_WITH_WRITES_PENDING"; case EC_DISCONNECTING_WITH_WRITES_PENDING: return "EC_DISCONNECTING_WITH_WRITES_PENDING"; case EC_DISCONNECTED: return "EC_DISCONNECTED"; default: return "unknown"; } } }; } // namespace Passenger #endif /* _PASSENGER_EVENTED_CLIENT_H_ */ passenger-4.0.37/ext/common/EventedMessageServer.h000644 000765 000024 00000023203 12233035540 022543 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010, 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_EVENTED_MESSAGE_SERVER_H_ #define _PASSENGER_EVENTED_MESSAGE_SERVER_H_ #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace boost; /* This source file follows the security guidelines written in Account.h. */ struct EventedMessageClientContext { enum State { MS_READING_USERNAME, MS_READING_PASSWORD, MS_READING_MESSAGE, MS_PROCESSING_MESSAGE }; State state; AccountPtr account; ev::timer authenticationTimer; ScalarMessage scalarReader; ArrayMessage arrayReader; string username; EventedMessageClientContext() { state = MS_READING_USERNAME; } ~EventedMessageClientContext() { /* Its buffer might contain password data so make sure * it's properly zeroed out. */ scalarReader.reset(true); } const char *getStateName() const { switch (state) { case MS_READING_USERNAME: return "MS_READING_USERNAME"; case MS_READING_PASSWORD: return "MS_READING_PASSWORD"; case MS_READING_MESSAGE: return "MS_READING_MESSAGE"; case MS_PROCESSING_MESSAGE: return "MS_PROCESSING_MESSAGE"; default: return "unknown"; } } }; class EventedMessageClient: public EventedClient { public: EventedMessageClientContext messageServer; EventedMessageClient(struct ev_loop *loop, const FileDescriptor &fd) : EventedClient(loop, fd) { messageServer.authenticationTimer.set(loop); } void writeArrayMessage(const char *name, ...) { va_list ap; SmallVector args; const char *arg; args.push_back(name); va_start(ap, name); while ((arg = va_arg(ap, const char *)) != NULL) { args.push_back(arg); } va_end(ap); writeArrayMessage(&args[0], args.size()); } void writeArrayMessage(StaticString args[], unsigned int count) { char headerBuf[sizeof(uint16_t)]; unsigned int outSize = ArrayMessage::outputSize(count); SmallVector out; out.reserve(outSize); ArrayMessage::generate(args, count, headerBuf, &out[0], outSize); write(&out[0], outSize); } }; /** * Note when overriding onNewClient: call the parent method first! It does * some initialization but might disconnect the client if that initialization * fails. The override should check for this. */ class EventedMessageServer: public EventedServer { protected: AccountsDatabasePtr accountsDatabase; /******** Overrided hooks and methods ********/ virtual EventedClient *createClient(const FileDescriptor &fd) { return new EventedMessageClient(getLoop(), fd); } virtual void onNewClient(EventedClient *_client) { EventedMessageClient *client = (EventedMessageClient *) _client; EventedMessageClientContext *context = &client->messageServer; context->authenticationTimer.set <&EventedMessageServer::onAuthenticationTimeout>(client); context->authenticationTimer.start(10); context->arrayReader.reserve(5); context->scalarReader.setMaxSize(MESSAGE_SERVER_MAX_USERNAME_SIZE); client->writeArrayMessage("version", protocolVersion(), NULL); } virtual void onClientReadable(EventedClient *_client) { EventedMessageClient *client = (EventedMessageClient *) _client; this_thread::disable_syscall_interruption dsi; int i = 0; bool done = false; // read() from the client at most 10 times on every read readiness event // in order to give other events the chance to be processed. while (i < 10 && !done) { char buf[1024 * 8]; ssize_t ret; ret = syscalls::read(client->fd, buf, sizeof(buf)); if (ret == -1) { if (errno != EAGAIN) { int e = errno; client->disconnect(true); logSystemError(client, "Cannot read data from client", e); } done = true; } else if (ret == 0) { done = true; ScopeGuard guard(boost::bind(&EventedClient::disconnect, client, false)); onEndOfStream(client); } else { onDataReceived(client, buf, ret); } i++; done = done || !client->ioAllowed(); } } /******** New EventedMessageServer overridable hooks and API methods ********/ virtual void onClientAuthenticated(EventedMessageClient *client) { // Do nothing. } virtual bool onMessageReceived(EventedMessageClient *client, const vector &args) { return true; } virtual void onEndOfStream(EventedMessageClient *client) { // Do nothing. } virtual pair onOtherDataReceived(EventedMessageClient *client, const char *data, size_t size) { abort(); } virtual const char *protocolVersion() const { return "1"; } void discardReadData() { readDataDiscarded = true; } private: bool readDataDiscarded; static void onAuthenticationTimeout(ev::timer &t, int revents) { EventedMessageClient *client = (EventedMessageClient *) t.data; client->disconnect(); } void onDataReceived(EventedMessageClient *client, char *data, size_t size) { EventedMessageClientContext *context = &client->messageServer; size_t consumed = 0; readDataDiscarded = false; while (consumed < size && client->ioAllowed() && !readDataDiscarded) { char *current = data + consumed; size_t rest = size - consumed; switch (context->state) { case EventedMessageClientContext::MS_READING_USERNAME: consumed += context->scalarReader.feed(current, rest); if (context->scalarReader.hasError()) { client->writeArrayMessage( "The supplied username is too long.", NULL); client->disconnect(); } else if (context->scalarReader.done()) { context->username = context->scalarReader.value(); context->scalarReader.reset(); context->scalarReader.setMaxSize(MESSAGE_SERVER_MAX_PASSWORD_SIZE); context->state = EventedMessageClientContext::MS_READING_PASSWORD; } break; case EventedMessageClientContext::MS_READING_PASSWORD: { size_t locallyConsumed; locallyConsumed = context->scalarReader.feed(current, rest); consumed += locallyConsumed; // The buffer contains password data so make sure we zero // it out when we're done. MemZeroGuard passwordGuard(current, locallyConsumed); if (context->scalarReader.hasError()) { context->scalarReader.reset(true); client->writeArrayMessage( "The supplied password is too long.", NULL); client->disconnect(); } else if (context->scalarReader.done()) { context->authenticationTimer.stop(); context->account = accountsDatabase->authenticate( context->username, context->scalarReader.value()); passwordGuard.zeroNow(); context->username.clear(); if (context->account) { context->scalarReader.reset(true); context->state = EventedMessageClientContext::MS_READING_MESSAGE; client->writeArrayMessage("ok", NULL); onClientAuthenticated(client); } else { context->scalarReader.reset(true); client->writeArrayMessage( "Invalid username or password.", NULL); client->disconnect(); } } break; } case EventedMessageClientContext::MS_READING_MESSAGE: consumed += context->arrayReader.feed(current, rest); if (context->arrayReader.hasError()) { client->disconnect(); } else if (context->arrayReader.done()) { context->state = EventedMessageClientContext::MS_PROCESSING_MESSAGE; if (context->arrayReader.value().empty()) { logError(client, "Client sent an empty message."); client->disconnect(); } else if (onMessageReceived(client, context->arrayReader.value()) && context->state == EventedMessageClientContext::MS_PROCESSING_MESSAGE) { context->state = EventedMessageClientContext::MS_READING_MESSAGE; } context->arrayReader.reset(); } break; case EventedMessageClientContext::MS_PROCESSING_MESSAGE: { pair ret = onOtherDataReceived(client, current, rest); consumed += ret.first; if (ret.second && context->state == EventedMessageClientContext::MS_PROCESSING_MESSAGE) { context->state = EventedMessageClientContext::MS_READING_MESSAGE; } break; } default: // Never reached. abort(); } } } public: EventedMessageServer(struct ev_loop *loop, FileDescriptor fd, const AccountsDatabasePtr &accountsDatabase) : EventedServer(loop, fd) { this->accountsDatabase = accountsDatabase; } }; } // namespace Passenger #endif /* _PASSENGER_EVENTED_MESSAGE_SERVER_H_ */ passenger-4.0.37/ext/common/EventedServer.h000644 000765 000024 00000022540 12233035540 021241 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_EVENTED_SERVER_H_ #define _PASSENGER_EVENTED_SERVER_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "EventedClient.h" #include "FileDescriptor.h" #include "StaticString.h" #include "Logging.h" #include "Utils/ScopeGuard.h" #include "Utils/StrIntUtils.h" namespace Passenger { using namespace std; using namespace boost; using namespace oxt; /** * A base class for writing single-threaded, evented servers that use non-blocking I/O. * It uses libev for its event loop. EventedServer handles much of the situps regarding * client connection management and output buffering and tries to make it easy to * implement a zero-copy architecture. * *

Basic usage

* Derived classes can override the onClientReadable() method, which is called every time * a specific client becomes readable. It is passed a Client object which contains information * about the client, such as its file descriptor. One can use the read() system call in * that method to receive data from the client. Please note that client file descriptors * are always set to non-blocking mode so you need to handle this gracefully. * * EventedServer provides the write() method for sending data to the client. This method * will attempt to send the data to the client immediately; if it fails with EAGAIN then * EventedServer will take care of scheduling the send at a later time when the client * is ready again to receive data. * * To disconnect the client, call disconnect(). The connection might not be actually * closed until all pending outgoing data have been sent out, but all the gory details * is taken care of for you. * *

Keeping per-client information

* If you need to keep per-client information then you can override the createClient() * method and make it return an object that's a subclass of EventedServer::Client. This * object is passed to onClientReadable(), so in there you can just cast the client object * to your subclass. * *

Client object life times

* All client objects are destroyed along with the EventedServer. Disconnecting * a client also causes it to be destroyed after the current event handler has * run or a short period of time after that. */ class EventedServer { protected: typedef set ClientSet; const ClientSet &getClients() const { return clients; } string getClientName(const EventedClient *client) const { return toString(client); } void logError(const EventedClient *client, const string &message) { P_ERROR("Error in client " << getClientName(client) << ": " << message); } void logSystemError(const EventedClient *client, const string &message, int errorCode) { P_ERROR("Error in client " << getClientName(client) << ": " << message << ": " << strerror(errorCode) << " (" << errorCode << ")"); } void logSystemError(const string &message, int errorCode) { P_ERROR(message << ": " << strerror(errorCode) << " (" << errorCode << ")"); } virtual EventedClient *createClient(const FileDescriptor &fd) { return new EventedClient(loop, fd); } virtual void onNewClient(EventedClient *client) { } virtual void onClientReadable(EventedClient *client) { } /** * Called when a client has been disconnected. This may either be triggered * immediately by disconnect() or triggered after pending data has been sent * out. This means that if you call disconnect() from onClientReadable() you * need take care of the possibility that control returns to onClientReadable() * after this method is done. * * Please note that when EventedServer is being destroyed, * onClientDisconnected() is *not* triggered. */ virtual void onClientDisconnected(EventedClient *client) { } private: struct ev_loop *loop; FileDescriptor fd; ev::io acceptWatcher; ClientSet clients; void removeClient(EventedClient *client) { clients.erase(client); } void freeAllClients() { ClientSet::iterator it; ClientSet::iterator end = clients.end(); for (it = clients.begin(); it != end; it++) { (*it)->unref(); } clients.clear(); } static void _onReadable(EventedClient *client) { EventedServer *server = (EventedServer *) client->userData; client->ref(); ScopeGuard guard(boost::bind(&EventedClient::unref, client)); server->onClientReadable((EventedClient *) client); } static void _onDisconnect(EventedClient *client) { EventedServer *server = (EventedServer *) client->userData; ScopeGuard guard1(boost::bind(&EventedClient::unref, client)); client->ref(); ScopeGuard guard2(boost::bind(&EventedClient::unref, client)); server->removeClient(client); server->onClientDisconnected((EventedClient *) client); } static void _onDetach(EventedClient *client) { EventedServer *server = (EventedServer *) client->userData; ScopeGuard guard1(boost::bind(&EventedClient::unref, client)); client->ref(); ScopeGuard guard2(boost::bind(&EventedClient::unref, client)); server->removeClient(client); } static void _onSystemError(EventedClient *client, const string &message, int code) { EventedServer *server = (EventedServer *) client->userData; server->logSystemError(client, message, code); } void exceptionThrownWhileInitializingClient(EventedClient *client, ClientSet::iterator it) { if (!client->ioAllowed()) { // onNewClient() disconnected or detached the // client, so client refcount == 1 client->unref(); } else { // client refcount == 2 client->unref(); client->unref(); clients.erase(it); } // Now client refcount == 0 } void onAcceptable(ev::io &w, int revents) { this_thread::disable_syscall_interruption dsi; int i = 0; bool done = false; // Accept at most 10 connections on every accept readiness event // in order to give other events the chance to be processed. while (i < 10 && !done) { // Reserve enough space to hold both a Unix domain socket // address and an IP socket address. union { struct sockaddr_un local; struct sockaddr_in inet; } addr; socklen_t len = sizeof(addr); int clientfd = syscalls::accept(fd, (struct sockaddr *) &addr, &len); if (clientfd == -1) { if (errno != EAGAIN && errno != EWOULDBLOCK) { int e = errno; logSystemError("Cannot accept new client", e); } done = true; } else { FileDescriptor clientfdGuard(clientfd); int optval = 1; setNonBlocking(clientfdGuard); syscalls::setsockopt(clientfd, SOL_SOCKET, SO_KEEPALIVE, &optval, sizeof(optval)); EventedClient *client = createClient(clientfdGuard); client->onReadable = _onReadable; client->onDisconnect = _onDisconnect; client->onDetach = _onDetach; client->onSystemError = _onSystemError; client->userData = this; client->notifyReads(true); pair p = clients.insert(client); client->ref(); // client refcount == 2 { ScopeGuard g(boost::bind( &EventedServer::exceptionThrownWhileInitializingClient, this, client, p.first)); onNewClient(client); g.clear(); // If exception occurred: client refcount == 0 } /* No exception occured. * If onNewClient() disconnected or detached the client: * client refcount == 1 * We want the refcount to become 0. * If not: * client refcount == 2 * We want the refcount to become 1. */ client->unref(); } i++; } } public: EventedServer(struct ev_loop *_loop, FileDescriptor serverFd) : loop(_loop), acceptWatcher(_loop) { fd = serverFd; setNonBlocking(serverFd); acceptWatcher.set(this); acceptWatcher.start(fd, ev::READ); } virtual ~EventedServer() { freeAllClients(); } struct ev_loop *getLoop() const { return loop; } FileDescriptor getServerFd() const { return fd; } }; } // namespace Passenger #endif /* _PASSENGER_EVENTED_SERVER_H_ */ passenger-4.0.37/ext/common/Exceptions.cpp000644 000765 000024 00000004370 12233035540 021135 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include void pp_error_init(PP_Error *error) { error->message = NULL; error->errnoCode = PP_NO_ERRNO; error->messageIsStatic = 0; } void pp_error_destroy(PP_Error *error) { if (!error->messageIsStatic) { free(static_cast(const_cast(error->message))); error->message = NULL; error->messageIsStatic = 0; } } void pp_error_set(const std::exception &ex, PP_Error *error) { const Passenger::SystemException *sys_e; if (error == NULL) { return; } if (error->message != NULL && !error->messageIsStatic) { free(static_cast(const_cast(error->message))); } error->message = strdup(ex.what()); error->messageIsStatic = error->message == NULL; if (error->message == NULL) { error->message = "Unknown error message (unable to allocate memory for the message)"; } sys_e = dynamic_cast(&ex); if (sys_e != NULL) { error->errnoCode = sys_e->code(); } else { error->errnoCode = PP_NO_ERRNO; } } passenger-4.0.37/ext/common/Exceptions.h000644 000765 000024 00000031127 12233035540 020602 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_EXCEPTIONS_H_ #define _PASSENGER_EXCEPTIONS_H_ #ifdef __cplusplus extern "C" { #endif /* Provides helper structs and functions for translating C++ exceptions * into C error objects. */ #define PP_NO_ERRNO -1 struct PP_Error { /** The exception message. */ const char *message; /** If the original exception was a SystemException, then this * field is set to the corresponding errno value. Otherwise, it * is set to PP_NO_ERRNO. */ int errnoCode; int messageIsStatic: 1; }; typedef struct PP_Error PP_Error; void pp_error_init(PP_Error *error); void pp_error_destroy(PP_Error *error); #ifdef __cplusplus } #endif #ifdef __cplusplus #include #include #include #include #include #include #include /** * Use as follows: * * try { * ... * } catch (const std::exception &e) { * pp_error_set(e, error); * } */ void pp_error_set(const std::exception &ex, PP_Error *error); /** * @defgroup Exceptions Exceptions */ namespace Passenger { using namespace std; /** * Represents an error returned by a system call or a standard library call. * * Use the code() method to find out the value of errno at the time * the error occured. * * @ingroup Exceptions */ class SystemException: public oxt::tracable_exception { private: string briefMessage; string systemMessage; string fullMessage; int m_code; public: /** * Create a new SystemException. * * @param briefMessage A brief message describing the error. * @param errorCode The error code, i.e. the value of errno right after the error occured. * @note A system description of the error will be appended to the given message. * For example, if errorCode is EBADF, and briefMessage * is "Something happened", then what() will return "Something happened: Bad * file descriptor (10)" (if 10 is the number for EBADF). * @post code() == errorCode * @post brief() == briefMessage */ SystemException(const string &briefMessage, int errorCode) { stringstream str; str << strerror(errorCode) << " (errno=" << errorCode << ")"; systemMessage = str.str(); setBriefMessage(briefMessage); m_code = errorCode; } virtual ~SystemException() throw() {} virtual const char *what() const throw() { return fullMessage.c_str(); } void setBriefMessage(const string &message) { briefMessage = message; fullMessage = briefMessage + ": " + systemMessage; } /** * The value of errno at the time the error occured. */ int code() const throw() { return m_code; } /** * Returns a brief version of the exception message. This message does * not include the system error description, and is equivalent to the * value of the message parameter as passed to the constructor. */ string brief() const throw() { return briefMessage; } /** * Returns the system's error message. This message contains both the * content of strerror(errno) and the errno number itself. */ string sys() const throw() { return systemMessage; } }; /** * A filesystem error, as returned by the operating system. This may include, * for example, permission errors. * * @ingroup Exceptions */ class FileSystemException: public SystemException { private: string m_filename; public: FileSystemException(const string &message, int errorCode, const string &filename) : SystemException(message, errorCode), m_filename(filename) {} virtual ~FileSystemException() throw() {} /** * The filename that's associated to the error. */ string filename() const throw() { return m_filename; } }; /** * Unable to retrieve the system time using time(). * * @ingroup Exceptions */ class TimeRetrievalException: public SystemException { public: TimeRetrievalException(const string &message, int errorCode) : SystemException(message, errorCode) {} virtual ~TimeRetrievalException() throw() {} }; /** * Represents an error that occured during an I/O operation. * * @ingroup Exceptions */ class IOException: public oxt::tracable_exception { private: string msg; public: IOException(const string &message): msg(message) {} virtual ~IOException() throw() {} virtual const char *what() const throw() { return msg.c_str(); } }; /** * Thrown when a certain file cannot be found. */ class FileNotFoundException: public IOException { public: FileNotFoundException(const string &message): IOException(message) {} virtual ~FileNotFoundException() throw() {} }; /** * An unexpected end-of-file I/O error. * * @ingroup Exceptions */ class EOFException: public IOException { public: EOFException(const string &message): IOException(message) {} virtual ~EOFException() throw() {} }; /** * Thrown when an invalid configuration is given. */ class ConfigurationException: public oxt::tracable_exception { private: string msg; public: ConfigurationException(const string &message): msg(message) {} virtual ~ConfigurationException() throw() {} virtual const char *what() const throw() { return msg.c_str(); } }; /** * Thrown when SpawnManager or ApplicationPool fails to spawn an application * instance. The exception may contain an error page. This error page contains * detailed information about the error and may be in HTML format. The error * page always contains enough information so that showing `what()` is not * necessary. */ class SpawnException: public oxt::tracable_exception { public: enum ErrorKind { UNDEFINED_ERROR, /** The preloader failed to start, not due to a wrong protocol message. */ PRELOADER_STARTUP_ERROR, /** The preloader sent a wrong protocol message during startup. */ PRELOADER_STARTUP_PROTOCOL_ERROR, PRELOADER_STARTUP_TIMEOUT, PRELOADER_STARTUP_EXPLAINABLE_ERROR, /** The application failed to start, not due to a wrong protocol message. */ APP_STARTUP_ERROR, /** The application sent a wrong protocol message during startup. */ APP_STARTUP_PROTOCOL_ERROR, APP_STARTUP_TIMEOUT, APP_STARTUP_EXPLAINABLE_ERROR }; private: ErrorKind errorKind; string msg; bool m_hasErrorPage; bool m_isHTML; string m_errorPage; string preloaderCommand; map annotations; public: SpawnException(const string &message, ErrorKind errorKind = UNDEFINED_ERROR) : msg(message) { this->errorKind = errorKind; m_hasErrorPage = false; m_isHTML = false; } SpawnException(const string &message, const string &errorPage, bool isHTML = true, ErrorKind errorKind = UNDEFINED_ERROR) : msg(message), m_errorPage(errorPage) { this->errorKind = errorKind; m_hasErrorPage = true; m_isHTML = isHTML; } virtual ~SpawnException() throw() {} virtual const char *what() const throw() { return msg.c_str(); } bool hasErrorPage() const { return m_hasErrorPage; } const string &getErrorPage() const { return m_errorPage; } bool isHTML() const { return m_isHTML; } ErrorKind getErrorKind() const { return errorKind; } SpawnException &setPreloaderCommand(const string &filename) { preloaderCommand = filename; return *this; } const string &getPreloaderCommand() const { return preloaderCommand; } void addAnnotations(const map &annotations) { map::const_iterator it, end = annotations.end(); for (it = annotations.begin(); it != end; it++) { this->annotations[it->first] = it->second; } } const map &getAnnotations() const { return annotations; } string operator[](const string &name) const { return get(name); } string get(const string &name) const { map::const_iterator it = annotations.find(name); if (it == annotations.end()) { return string(); } else { return it->second; } } }; /** * Indicates that a Pool::get() or Pool::asyncGet() request was denied. * The request never reached a process. This could be because, before the * request could reach a process, the administrator detached the containing * SuperGroup. Or maybe the request sat in the queue for too long. */ class GetAbortedException: public oxt::tracable_exception { private: string msg; public: GetAbortedException(const string &message) : msg(message) { } GetAbortedException(const oxt::tracable_exception::no_backtrace &tag) : oxt::tracable_exception(tag) { } virtual ~GetAbortedException() throw() {} virtual const char *what() const throw() { return msg.c_str(); } }; /** * Indicates that a Pool::get() or Pool::asyncGet() request was denied because * the getWaitlist queue was full. */ class RequestQueueFullException: public GetAbortedException { public: RequestQueueFullException() : GetAbortedException(oxt::tracable_exception::no_backtrace()) { } virtual const char *what() const throw() { return "Request queue is full"; } }; /** * Indicates that a specified argument is incorrect or violates a requirement. * * @ingroup Exceptions */ class ArgumentException: public oxt::tracable_exception { private: string msg; public: ArgumentException(const string &message): msg(message) {} virtual ~ArgumentException() throw() {} virtual const char *what() const throw() { return msg.c_str(); } }; /* * @ingroup Exceptions */ class InvalidModeStringException: public ArgumentException { public: InvalidModeStringException(const string &message): ArgumentException(message) {} }; /** * A generic runtime exception. * * @ingroup Exceptions */ class RuntimeException: public oxt::tracable_exception { private: string msg; public: RuntimeException(const string &message): msg(message) {} virtual ~RuntimeException() throw() {} virtual const char *what() const throw() { return msg.c_str(); } }; /** * An exception indicating that some timeout expired. * * @ingroup Exceptions */ class TimeoutException: public oxt::tracable_exception { private: string msg; public: TimeoutException(const string &message): msg(message) {} virtual ~TimeoutException() throw() {} virtual const char *what() const throw() { return msg.c_str(); } }; /** * Represents some kind of security error. * * @ingroup Exceptions */ class SecurityException: public oxt::tracable_exception { private: string msg; public: SecurityException(const string &message): msg(message) {} virtual ~SecurityException() throw() {} virtual const char *what() const throw() { return msg.c_str(); } }; /** * @ingroup Exceptions */ class NonExistentUserException: public SecurityException { public: NonExistentUserException(const string &message): SecurityException(message) {} }; /** * @ingroup Exceptions */ class NonExistentGroupException: public SecurityException { public: NonExistentGroupException(const string &message): SecurityException(message) {} }; /** * The application pool is too busy and cannot fulfill a get() request. * * @ingroup Exceptions */ class BusyException: public oxt::tracable_exception { private: string msg; public: BusyException(const string &message): msg(message) {} virtual ~BusyException() throw() {} virtual const char *what() const throw() { return msg.c_str(); } }; /** * A parser detected a syntax error. * * @ingroup Exceptions */ class SyntaxError: public oxt::tracable_exception { private: string msg; public: SyntaxError(const string &message): msg(message) {} virtual ~SyntaxError() throw() {} virtual const char *what() const throw() { return msg.c_str(); } }; } // namespace Passenger #endif /* __cplusplus */ #endif /* _PASSENGER_EXCEPTIONS_H_ */ passenger-4.0.37/ext/common/FileDescriptor.h000644 000765 000024 00000017250 12233035540 021400 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010, 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_FILE_DESCRIPTOR_H_ #define _PASSENGER_FILE_DESCRIPTOR_H_ #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; using namespace oxt; #ifndef _PASSENGER_SAFELY_CLOSE_DEFINED_ #define _PASSENGER_SAFELY_CLOSE_DEFINED_ void safelyClose(int fd, bool ignoreErrors = false); #endif /** * Wrapper class around a file descriptor integer, for RAII behavior. * * A FileDescriptor object behaves just like an int, so that you can pass it to * system calls such as read(). It performs reference counting. When the last * copy of a FileDescriptor has been destroyed, the underlying file descriptor * will be automatically closed. In this case, any close() system call errors * are silently ignored. If you are interested in whether the close() system * call succeeded, then you should call FileDescriptor::close(). * * This class is *not* thread-safe. It is safe to call system calls on the * underlying file descriptor from multiple threads, but it's not safe to * call FileDescriptor::close() from multiple threads if all those * FileDescriptor objects point to the same underlying file descriptor. */ class FileDescriptor { private: struct SharedData { int fd; bool autoClose; SharedData(int fd, bool autoClose) { this->fd = fd; this->autoClose = autoClose; } ~SharedData() { if (fd >= 0 && autoClose) { this_thread::disable_syscall_interruption dsi; syscalls::close(fd); } } void close(bool checkErrors = true) { if (fd >= 0) { this_thread::disable_syscall_interruption dsi; int theFd = fd; fd = -1; safelyClose(theFd, !checkErrors); } } void detach() { fd = -1; } }; /** Shared pointer for reference counting on this file descriptor */ boost::shared_ptr data; public: /** * Creates a new empty FileDescriptor instance that has no underlying * file descriptor. * * @post *this == -1 */ FileDescriptor() { } /** * Creates a new FileDescriptor instance with the given fd as a handle. * * @post *this == fd */ explicit FileDescriptor(int fd, bool autoClose = true) { if (fd >= 0) { /* Make sure that the 'new' operator doesn't overwrite * errno so that we can write code like this: * * FileDescriptor fd = open(...); * if (fd == -1) { * print_error(errno); * } */ int e = errno; data = boost::make_shared(fd, autoClose); errno = e; } } /** * Close the underlying file descriptor. If it was already closed, then * nothing will happen. If there are multiple copies of this FileDescriptor * then the underlying file descriptor will be closed for every one of them. * * @params checkErrors Whether a SystemException should be thrown in case * closing the file descriptor fails. If false, errors * are silently ignored. * @throws SystemException Something went wrong while closing * the file descriptor. Only thrown if * checkErrors is true. * @post *this == -1 */ void close(bool checkErrors = true) { if (data != NULL) { data->close(checkErrors); data.reset(); } } /** * Detach from the underlying file descriptor without closing it. * This FileDescriptor and all copies will no longer affect the * underlying file descriptors. * * @return The underlying file descriptor, or -1 if already closed. * @post *this == -1 */ int detach() { if (data != NULL) { int fd = data->fd; data->detach(); data.reset(); return fd; } else { return -1; } } /** * Overloads the integer cast operator so that it will return the underlying * file descriptor handle as an integer. * * Returns -1 if FileDescriptor::close() was called. */ operator int () const { if (data == NULL) { return -1; } else { return data->fd; } } FileDescriptor &operator=(int fd) { /* Make sure that the 'new' and 'delete' operators don't * overwrite errno so that we can write code like this: * * FileDescriptor fd; * fd = open(...); * if (fd == -1) { * print_error(errno); * } */ int e = errno; if (fd >= 0) { data = boost::make_shared(fd, true); } else { data.reset(); } errno = e; return *this; } FileDescriptor &operator=(const FileDescriptor &other) { /* Make sure that the 'delete' operator implicitly invoked by * boost::shared_ptr doesn't overwrite errno so that we can write code * like this: * * FileDescriptor fd; * fd = other_file_descriptor_object; * if (fd == -1) { * print_error(errno); * } */ int e = errno; data = other.data; errno = e; return *this; } }; /** * A structure containing two FileDescriptor objects. Behaves like a pair * and like a two-element array. */ class FileDescriptorPair: public pair { public: FileDescriptorPair() { } FileDescriptorPair(const FileDescriptor &a, const FileDescriptor &b) : pair(a, b) { } FileDescriptor &operator[](int index) { if (index == 0) { return first; } else if (index == 1) { return second; } else { throw ArgumentException("Index must be either 0 of 1"); } } }; // Convenience aliases. typedef FileDescriptorPair Pipe; typedef FileDescriptorPair SocketPair; /** * A synchronization mechanism that's implemented with file descriptors, * and as such can be used in combination with select() and friends. * * One can wait for an event on an EventFd by select()ing it on read events. * Another thread can signal the EventFd by calling notify(). */ class EventFd { private: int reader; int writer; public: EventFd() { int fds[2]; if (syscalls::pipe(fds) == -1) { int e = errno; throw SystemException("Cannot create a pipe", e); } reader = fds[0]; writer = fds[1]; } ~EventFd() { this_thread::disable_syscall_interruption dsi; syscalls::close(reader); syscalls::close(writer); } void notify() { ssize_t ret = syscalls::write(writer, "x", 1); if (ret == -1 && errno != EAGAIN) { int e = errno; throw SystemException("Cannot write notification data", e); } } int fd() const { return reader; } }; } // namespace Passenger #endif /* _PASSENGER_FILE_DESCRIPTOR_H_ */ passenger-4.0.37/ext/common/Hooks.h000644 000765 000024 00000012160 12233035540 017540 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_HOOKS_H_ #define _PASSENGER_HOOKS_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace oxt; struct HookScriptOptions { // Required. string name; string spec; // Optional. const VariantMap *agentsOptions; vector< pair > environment; HookScriptOptions() : agentsOptions(NULL) { } }; namespace { inline vector< pair > agentsOptionsToEnvVars(const VariantMap &agentsOptions) { vector< pair > result; VariantMap::ConstIterator it, end = agentsOptions.end(); result.reserve(agentsOptions.size()); for (it = agentsOptions.begin(); it != end; it++) { string key = "PASSENGER_"; const char *data = it->first.data(); const char *end = it->first.data() + it->first.size(); while (data < end) { key.append(1, toupper(*data)); data++; } result.push_back(make_pair(key, it->second)); } return result; } inline void setEnvVarsFromVector(const vector< pair > &envvars) { vector< pair >::const_iterator it; for (it = envvars.begin(); it != envvars.end(); it++) { setenv(it->first.c_str(), it->second.c_str(), 1); } } inline void createHookScriptEnvironment(const HookScriptOptions &options, vector< pair > &envvars) { vector< pair >::const_iterator it, end = options.environment.end(); if (options.agentsOptions) { envvars = agentsOptionsToEnvVars(*options.agentsOptions); } for (it = options.environment.begin(); it != end; it++) { envvars.push_back(*it); } } inline void parseHookScriptSpec(const HookScriptOptions &options, vector &commands) { split(options.spec, ';', commands); vector::iterator it, end = commands.end(); for (it = commands.begin(); it != end; it++) { *it = strip(*it); } } } inline bool runSingleHookScript(HookScriptOptions &options, const string &command, const vector< pair > &envvars) { TRACE_POINT_WITH_DATA(command.c_str()); pid_t pid; int e, status; P_INFO("Running " << options.name << " hook script: " << command); pid = fork(); if (pid == 0) { resetSignalHandlersAndMask(); disableMallocDebugging(); closeAllFileDescriptors(2); setEnvVarsFromVector(envvars); execlp(command.c_str(), command.c_str(), (const char * const) 0); e = errno; fprintf(stderr, "*** ERROR: Cannot execute %s hook script %s: %s (errno=%d)\n", options.name.c_str(), command.c_str(), strerror(e), e); fflush(stderr); _exit(1); return true; // Never reached. } else if (pid == -1) { e = errno; P_ERROR("Cannot fork a process for hook script " << command << ": " << strerror(e) << " (errno=" << e << ")"); return false; } else if (waitpid(pid, &status, 0) == -1) { e = errno; P_ERROR("Unable to wait for hook script " << command << " (PID " << pid << "): " << strerror(e) << " (errno=" << e << ")"); return false; } else { P_INFO("Hook script " << command << " (PID " << pid << ") exited with status " << WEXITSTATUS(status)); return WEXITSTATUS(status) == 0; } } inline bool runHookScripts(HookScriptOptions &options) { TRACE_POINT(); if (options.spec.empty()) { return true; } vector commands; vector< pair > envvars; parseHookScriptSpec(options, commands); if (commands.empty()) { return true; } createHookScriptEnvironment(options, envvars); foreach (const string command, commands) { if (!runSingleHookScript(options, command, envvars)) { return false; } } return true; } } // namespace Passenger #endif /* _PASSENGER_HOOKS_H_ */ passenger-4.0.37/ext/common/Logging.cpp000644 000765 000024 00000011565 12233035540 020406 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #include #include #include #include namespace Passenger { int _logLevel = 0; int _logOutput = STDERR_FILENO; static bool printAppOutputAsDebuggingMessages = false; int getLogLevel() { return _logLevel; } void setLogLevel(int value) { _logLevel = value; } bool setDebugFile(const char *logFile) { int fd = open(logFile, O_WRONLY | O_CREAT | O_APPEND, 0644); if (fd != -1) { _logOutput = fd; return true; } else { return false; } } void _prepareLogEntry(std::stringstream &sstream, const char *file, unsigned int line) { time_t the_time; struct tm the_tm; char datetime_buf[60]; struct timeval tv; if (startsWith(file, "ext/")) { file += sizeof("ext/") - 1; if (startsWith(file, "common/")) { file += sizeof("common/") - 1; if (startsWith(file, "ApplicationPool2/")) { file += sizeof("Application") - 1; } } } the_time = time(NULL); localtime_r(&the_time, &the_tm); strftime(datetime_buf, sizeof(datetime_buf) - 1, "%F %H:%M:%S", &the_tm); gettimeofday(&tv, NULL); sstream << "[ " << datetime_buf << "." << std::setfill('0') << std::setw(4) << (unsigned long) (tv.tv_usec / 100) << " " << std::dec << getpid() << "/" << std::hex << pthread_self() << std::dec << " " << file << ":" << line << " ]: "; } static void _writeLogEntry(const StaticString &str) { try { writeExact(_logOutput, str.data(), str.size()); } catch (const SystemException &) { /* The most likely reason why this fails is when the user has setup * Apache to log to a pipe (e.g. to a log rotation script). Upon * restarting the web server, the process that reads from the pipe * shuts down, so we can't write to it anymore. That's why we * just ignore write errors. It doesn't make sense to abort for * something like this. */ } } void _writeLogEntry(const std::string &str) { _writeLogEntry(StaticString(str)); } static void realPrintAppOutput(char *buf, unsigned int bufSize, const char *pidStr, unsigned int pidStrLen, const char *channelName, unsigned int channelNameLen, const char *message, unsigned int messageLen) { char *pos = buf; char *end = buf + bufSize; pos = appendData(pos, end, "App "); pos = appendData(pos, end, pidStr, pidStrLen); pos = appendData(pos, end, " "); pos = appendData(pos, end, channelName, channelNameLen); pos = appendData(pos, end, ": "); pos = appendData(pos, end, message, messageLen); pos = appendData(pos, end, "\n"); _writeLogEntry(StaticString(buf, pos - buf)); } void printAppOutput(pid_t pid, const char *channelName, const char *message, unsigned int size) { if (printAppOutputAsDebuggingMessages) { P_DEBUG("App " << pid << " " << channelName << ": " << StaticString(message, size)); } else { char pidStr[sizeof("4294967295")]; unsigned int pidStrLen, channelNameLen, totalLen; try { pidStrLen = integerToOtherBase(pid, pidStr, sizeof(pidStr)); } catch (const std::length_error &) { pidStr[0] = '?'; pidStr[1] = '\0'; pidStrLen = 1; } channelNameLen = strlen(channelName); totalLen = (sizeof("App X Y: \n") - 2) + pidStrLen + channelNameLen + size; if (totalLen < 1024) { char buf[1024]; realPrintAppOutput(buf, sizeof(buf), pidStr, pidStrLen, channelName, channelNameLen, message, size); } else { DynamicBuffer buf(totalLen); realPrintAppOutput(buf.data, totalLen, pidStr, pidStrLen, channelName, channelNameLen, message, size); } } } void setPrintAppOutputAsDebuggingMessages(bool enabled) { printAppOutputAsDebuggingMessages = enabled; } } // namespace Passenger passenger-4.0.37/ext/common/Logging.h000644 000765 000024 00000013307 12233035540 020047 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_LOGGING_H_ #define _PASSENGER_LOGGING_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; using namespace oxt; /********** Debug logging facilities **********/ extern int _logLevel; extern int _logOutput; int getLogLevel(); void setLogLevel(int value); bool setDebugFile(const char *logFile = NULL); void _prepareLogEntry(std::stringstream &sstream, const char *file, unsigned int line); void _writeLogEntry(const std::string &str); enum PassengerLogLevel { LVL_CRIT = -2, LVL_ERROR = -1, LVL_INFO = 0, LVL_WARN = 0, LVL_DEBUG = 1, LVL_DEBUG2 = 2 }; /** * Write the given expression to the log stream. */ #define P_LOG(level, expr) \ do { \ if (Passenger::_logLevel >= (level)) { \ std::stringstream sstream; \ Passenger::_prepareLogEntry(sstream, __FILE__, __LINE__); \ sstream << expr << "\n"; \ Passenger::_writeLogEntry(sstream.str()); \ } \ } while (false) /** * Write the given expression, which represents a warning, * to the log stream. */ #define P_WARN(expr) P_LOG(LVL_WARN, expr) /** * Write the given expression, which represents a warning, * to the log stream. */ #define P_INFO(expr) P_LOG(LVL_INFO, expr) /** * Write the given expression, which represents an error, * to the log stream. */ #define P_ERROR(expr) P_LOG(LVL_ERROR, expr) /** * Write the given expression, which represents a critical non-recoverable error, * to the log stream. */ #define P_CRITICAL(expr) P_LOG(LVL_CRIT, expr) /** * Write the given expression, which represents a debugging message, * to the log stream. */ #define P_DEBUG(expr) P_TRACE(LVL_DEBUG, expr) #ifdef PASSENGER_DEBUG #define P_TRACE(level, expr) P_LOG(level, expr) #else #define P_TRACE(level, expr) do { /* nothing */ } while (false) #endif /** * Print a message that was received from an application's stdout/stderr. * * @param pid The application's PID. * @param channelName "stdout" or "stderr". * @param message The message that was received. */ void printAppOutput(pid_t pid, const char *channelName, const char *message, unsigned int size); /** * Controls how messages that are received from applications are printed. * * If `enabled` is true then messages are printed using P_DEBUG, meaning that * the normal Passenger logging prefixes will be printed as well. * * If `enabled` is false (the default), then messages are printed directly * to the log output channel using write(), with only a very short prefix * that contains the PID and channel name. */ void setPrintAppOutputAsDebuggingMessages(bool enabled); /** Print a [BUG] error message and abort with a stack trace. */ #define P_BUG(expr) \ do { \ TRACE_POINT(); \ P_CRITICAL("[BUG] " << expr); \ abort(); \ } while (false) #define P_BUG_UTP(expr) \ do { \ UPDATE_TRACE_POINT(); \ P_CRITICAL("[BUG] " << expr); \ abort(); \ } while (false) class NotExpectingExceptions { private: this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; const char *filename; const char *function; unsigned int line; public: NotExpectingExceptions(const char *_filename, unsigned int _line, const char *_function) { filename = _filename; line = _line; function = _function; } ~NotExpectingExceptions() { if (std::uncaught_exception()) { P_ERROR("Unexpected exception detected at " << filename << ":" << line << ", function '" << function << "'!"); } } }; /** * Put this in code sections where you don't expect *any* exceptions to be thrown. * This macro will automatically disable interruptions in the current scope, * and will print an error message whenever the scope exits with an exception. * * When inside critical sections, you should put this macro right after the lock * object so that the error message is displayed before unlocking the lock; * otherwise other threads may run before the error message is displayed, and * those threads may see an inconsistant state and crash. */ #define NOT_EXPECTING_EXCEPTIONS() NotExpectingExceptions __nee(__FILE__, __LINE__, __PRETTY_FUNCTION__) } // namespace Passenger #endif /* _PASSENGER_LOGGING_H_ */ passenger-4.0.37/ext/common/MessageClient.h000644 000765 000024 00000021403 12233035540 021200 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_MESSAGE_CLIENT_H_ #define _PASSENGER_MESSAGE_CLIENT_H_ #include #include #include #include "StaticString.h" #include "Exceptions.h" #include "Utils/MessageIO.h" #include "Utils/IOUtils.h" #include "Utils/ScopeGuard.h" namespace Passenger { using namespace std; using namespace boost; class MessageClient { protected: FileDescriptor fd; bool shouldAutoDisconnect; /* sendUsername() and sendPassword() exist and are virtual in order to facilitate unit testing. */ virtual void sendUsername(int fd, const StaticString &username, unsigned long long *timeout) { writeScalarMessage(fd, username); } virtual void sendPassword(int fd, const StaticString &userSuppliedPassword, unsigned long long *timeout) { writeScalarMessage(fd, userSuppliedPassword); } /** * Authenticate to the server with the given username and password. * * @throws SystemException An error occurred while reading data from or sending data to the server. * @throws IOException An error occurred while reading data from or sending data to the server. * @throws SecurityException The server denied authentication. * @throws boost::thread_interrupted * @pre channel is connected. */ void authenticate(const StaticString &username, const StaticString &userSuppliedPassword, unsigned long long *timeout) { vector args; sendUsername(fd, username, timeout); sendPassword(fd, userSuppliedPassword, timeout); if (!readArrayMessage(fd, args, timeout)) { throw IOException("The message server did not send an authentication response."); } else if (args.size() != 1) { throw IOException("The authentication response that the message server sent is not valid."); } else if (args[0] != "ok") { throw SecurityException("The message server denied authentication: " + args[0]); } } void checkConnection() { if (!connected()) { throw IOException("Not connected"); } } void autoDisconnect() { if (shouldAutoDisconnect) { fd.close(false); } } public: /** * Create a new MessageClient object. It doesn't actually connect to the server until * you call connect(). */ MessageClient() { /* The reason why we don't connect right away is because we want to make * certain methods virtual for unit testing purposes. We can't call * virtual methods in the constructor. :-( */ shouldAutoDisconnect = true; } virtual ~MessageClient() { } /** * Connect to the given MessageServer. If a connection was already established, * then the old connection will be closed and a new connection will be established. * * If this MessageClient was in a connected state, and this method throws an exception, * then old connection will be broken. * * @param serverAddress The address of the server to connect to, in the format * as specified by getSocketAddressType(). * @param username The username to use for authenticating with the server. * @param userSuppliedPassword The password to use for authenticating with the server. * @return this * @throws SystemException Something went wrong while connecting to the server. * @throws IOException Something went wrong while connecting to the server. * @throws RuntimeException Something went wrong. * @throws SecurityException Unable to authenticate to the server with the given username and password. * You may call connect() again with a different username/password. * @throws boost::thread_interrupted * @post connected() */ MessageClient *connect(const string &serverAddress, const StaticString &username, const StaticString &userSuppliedPassword) { TRACE_POINT(); ScopeGuard g(boost::bind(&MessageClient::autoDisconnect, this)); fd = connectToServer(serverAddress.c_str()); vector args; if (!readArrayMessage(fd, args)) { throw IOException("The message server closed the connection before sending a version identifier."); } if (args.size() != 2 || args[0] != "version") { throw IOException("The message server didn't sent a valid version identifier."); } if (args[1] != "1") { string message = string("Unsupported message server protocol version ") + args[1] + "."; throw IOException(message); } authenticate(username, userSuppliedPassword, NULL); g.clear(); return this; } void disconnect() { fd.close(); } bool connected() const { return fd != -1; } void setAutoDisconnect(bool value) { shouldAutoDisconnect = value; } FileDescriptor getConnection() const { return fd; } /** * @throws SystemException * @throws TimeoutException * @throws boost::thread_interrupted */ bool read(vector &args, unsigned long long *timeout = NULL) { return readArray(args); } /** * @throws SystemException * @throws TimeoutException * @throws boost::thread_interrupted */ bool readArray(vector &args, unsigned long long *timeout = NULL) { checkConnection(); ScopeGuard g(boost::bind(&MessageClient::autoDisconnect, this)); bool result = readArrayMessage(fd, args, timeout); g.clear(); return result; } /** * @throws SystemException * @throws SecurityException * @throws TimeoutException * @throws boost::thread_interrupted */ bool readScalar(string &output, unsigned int maxSize = 0, unsigned long long *timeout = NULL) { checkConnection(); ScopeGuard g(boost::bind(&MessageClient::autoDisconnect, this)); try { output = readScalarMessage(fd, maxSize, timeout); g.clear(); return true; } catch (const EOFException &) { g.clear(); return false; } } /** * @throws SystemExeption * @throws IOException * @throws boost::thread_interrupted */ int readFileDescriptor(bool negotiate = true) { checkConnection(); ScopeGuard g(boost::bind(&MessageClient::autoDisconnect, this)); int result; if (negotiate) { result = Passenger::readFileDescriptorWithNegotiation(fd); } else { result = Passenger::readFileDescriptor(fd); } g.clear(); return result; } /** * @throws SystemException * @throws boost::thread_interrupted */ void write(const char *name, ...) { checkConnection(); va_list ap; va_start(ap, name); try { try { writeArrayMessage(fd, name, ap); } catch (const SystemException &) { autoDisconnect(); throw; } va_end(ap); } catch (...) { va_end(ap); throw; } } /** * @throws SystemException * @throws TimeoutException * @throws boost::thread_interrupted */ void writeScalar(const char *data, unsigned int size, unsigned long long *timeout = NULL) { checkConnection(); ScopeGuard g(boost::bind(&MessageClient::autoDisconnect, this)); writeScalarMessage(fd, data, size, timeout); g.clear(); } /** * @throws SystemException * @throws TimeoutException * @throws boost::thread_interrupted */ void writeScalar(const StaticString &data, unsigned long long *timeout = NULL) { checkConnection(); ScopeGuard g(boost::bind(&MessageClient::autoDisconnect, this)); writeScalarMessage(fd, data, timeout); g.clear(); } /** * @throws SystemException * @throws boost::thread_interrupted */ void writeFileDescriptor(int fileDescriptor, bool negotiate = true) { checkConnection(); ScopeGuard g(boost::bind(&MessageClient::autoDisconnect, this)); if (negotiate) { Passenger::writeFileDescriptorWithNegotiation(fd, fileDescriptor); } else { Passenger::writeFileDescriptor(fd, fileDescriptor); } g.clear(); } }; typedef boost::shared_ptr MessageClientPtr; } // namespace Passenger #endif /* _PASSENGER_MESSAGE_CLIENT_H_ */ passenger-4.0.37/ext/common/MessageReadersWriters.h000644 000765 000024 00000034415 12233035540 022736 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_MESSAGE_READERS_WRITERS_H_ #define _PASSENGER_MESSAGE_READERS_WRITERS_H_ #include #include #include #include #include #include #include #include #include #include #include /** * This file provides a bunch of classes for reading and writing messages in the * MessageIO format. Unlike MessageIO functions, whose operations take control over * the I/O handle and may block, these classes act like parsers and data generators. * To read messages one must feed data to them. To write messages one must instruct * the classes to generate a bunch of data. These classes will never block, making * them ideal for use in evented servers. * *

Reading messages

* To read a single message, one must instantiate a message object and feed network * data to it with the feed() method. This method returns the number of bytes * actually processed by the message object (i.e. the number of bytes that it has * recognized as part of the message). * * When the message object has either successfully parsed the data or encountered * an error, it will indicate so via the done() method. With hasError() one can * check whether an error was encountered or whether the reader succeeded, and * with errorCode() one can obtain the exact error reason. Not all message objects * support hasError() and errorCode() because some of them can never encounter * errors and some of them can only fail for a single reason. * * When successful, the parsed message can be obtained with value(). This method * may only be called when done() is true and there is no error, otherwise the * return value is undefined. * * At this point, the message object cannot process any more data and feed() will * always return 0. To reuse the object for processing another message, one must * reset its state by calling reset(). * * The following example demonstrates how to read a continuous stream of 32-bit * integers: * @code Uint32Message intMessage; while (true) { // Read a bunch of network data... char buf[1024]; ssize_t size = recv(fd, buf, sizeof(buf)); size_t consumed = 0; // ...and process it all. We only feed data to the message object // that hasn't already been fed. while (consumed < size) { consumed += intReader.feed(buf + consumed, size - consumed); if (intMessage.done()) { printf("Integer: %d\n", (int) intMessage.value()); // The state must be reset before the reader can be reused. intMessage.reset(); } } } * @endcode * * Some message objects return non-primitive values in their value() methods, such as * ArrayMessage and ScalarMessage which return const vector & * and StaticString, respectively. These values are only valid until either * of the following things occur: * * - The buffer containing last the fed data has been destroyed or modified. * - The message object itself has been destroyed. * * This is because the message objects try to apply copy-zero optimizations whenever * possible. For example, in case of ScalarMessage, it'll check whether the data * that has been fed in the first feed() call already contains a full scalar message. * If so then it'll just return a StaticString that points to the scalar message * in the fed data; it will not copy the fed data. In this case it is important * that the buffer containing the fed data is not modified or destroyed while the * StaticString is in use. * If the first feed() call does not supply a full scalar message then it will * buffer all fed data until the buffer contains a full scalar message, and the * result will point to this buffer. Because the buffer is owned by the message * object, the result will be invalidated as soon as the message object is destroyed. */ namespace Passenger { using namespace std; /** * For 16-bit big-endian integers. */ class Uint16Message { private: uint16_t val; uint8_t consumed; public: Uint16Message() { consumed = 0; } void reset() { consumed = 0; } size_t feed(const char *data, size_t size) { size_t locallyConsumed; locallyConsumed = std::min(size, sizeof(uint16_t) - consumed); memcpy((char *) &val + consumed, data, locallyConsumed); consumed += locallyConsumed; if (locallyConsumed > 0 && done()) { val = ntohs(val); } return locallyConsumed; } bool done() const { return consumed == sizeof(uint16_t); } uint16_t value() const { return val; } static void generate(void *buf, uint16_t val) { val = htons(val); memcpy(buf, &val, sizeof(val)); } }; /** * For 32-bit big-endian integers. */ class Uint32Message { private: uint32_t val; uint8_t consumed; public: Uint32Message() { consumed = 0; } void reset() { consumed = 0; } size_t feed(const char *data, size_t size) { size_t locallyConsumed; locallyConsumed = std::min(size, sizeof(uint32_t) - consumed); memcpy((char *) &val + consumed, data, locallyConsumed); consumed += locallyConsumed; if (locallyConsumed > 0 && done()) { val = ntohl(val); } return locallyConsumed; } bool done() const { return consumed == sizeof(uint32_t); } uint32_t value() const { return val; } static void generate(void *buf, uint32_t val) { val = htonl(val); memcpy(buf, &val, sizeof(val)); } }; /** * For array messages. */ class ArrayMessage { public: enum Error { TOO_LARGE }; private: enum State { READING_HEADER, READING_BODY, DONE, ERROR }; uint16_t toReserve; uint16_t maxSize; Uint16Message headerReader; uint8_t state; uint8_t error; string buffer; vector result; void parseBody(const char *data, size_t size) { const char *start = data; const char *terminator; size_t rest = size; while ((terminator = (const char *) memchr(start, '\0', rest)) != NULL) { size_t len = terminator - start; result.push_back(StaticString(start, len)); start = terminator + 1; rest = size - (start - data); } } public: ArrayMessage() { state = READING_HEADER; toReserve = 0; maxSize = 0; } void reserve(uint16_t size) { toReserve = size; result.reserve(size); } void setMaxSize(uint16_t size) { maxSize = size; } void reset() { state = READING_HEADER; headerReader.reset(); buffer.clear(); result.clear(); if (toReserve > 0) { result.reserve(toReserve); } } size_t feed(const char *data, size_t size) { size_t consumed = 0; while (consumed < size && !done()) { const char *current = data + consumed; size_t rest = size - consumed; switch (state) { case READING_HEADER: consumed += headerReader.feed(current, rest); if (headerReader.done()) { if (maxSize > 0 && headerReader.value() > maxSize) { state = ERROR; error = TOO_LARGE; } else if (headerReader.value() == 0) { state = DONE; } else { state = READING_BODY; } } break; case READING_BODY: if (buffer.empty() && rest >= headerReader.value()) { parseBody(current, headerReader.value()); state = DONE; consumed += headerReader.value(); } else { size_t toConsume = std::min(rest, headerReader.value() - buffer.size()); if (buffer.capacity() < headerReader.value()) { buffer.reserve(headerReader.value()); } buffer.append(current, toConsume); consumed += toConsume; if (buffer.size() == headerReader.value()) { parseBody(buffer.data(), buffer.size()); state = DONE; } } break; default: // Never reached. abort(); } } return consumed; } bool done() const { return state == DONE || state == ERROR; } bool hasError() const { return state == ERROR; } Error errorCode() const { return (Error) error; } const vector &value() const { return result; } /** * Given a bunch of array items, generates an array message. The message is * generated in the form of an array of StaticStrings which must all be written * out (e.g. with writev()) in the given order. These StaticStrings point * to the buffers pointed to by args as well as headerBuf, * so args and headerBuf must stay valid until the message * has been written out or copied. * * @param args An array of array items to be included in the array message. * @param argsCount The number of items in args. * @param headerBuf A pointer to a buffer in which the array message header * is to be stored. * @param out A pointer to a StaticString array in which the generated array * message data will be stored. Exactly outputSize(argsCount) * items will be stored in this array. * @param outCount The number of items in out. */ static void generate(StaticString args[], unsigned int argsCount, char headerBuf[sizeof(uint16_t)], StaticString *out, unsigned int outCount) { if (OXT_UNLIKELY(outCount < outputSize(argsCount))) { throw ArgumentException("outCount too small."); } unsigned int size = 0; unsigned int i; for (i = 0; i < argsCount; i++) { size += args[i].size() + 1; } if (OXT_UNLIKELY(size > 0xFFFF)) { throw ArgumentException("Data size exceeds maximum size for array messages."); } Uint16Message::generate(headerBuf, size); out[0] = StaticString(headerBuf, sizeof(uint16_t)); for (i = 0; i < argsCount; i++) { out[1 + 2 * i] = args[i]; out[1 + 2 * i + 1] = StaticString("\0", 1); } } static unsigned int outputSize(unsigned int argsCount) { return argsCount * 2 + 1; } }; /** * Class for reading a scalar message. */ class ScalarMessage { public: enum Error { TOO_LARGE }; private: enum State { READING_HEADER, READING_BODY, DONE, ERROR }; uint8_t state; uint8_t error; uint32_t maxSize; Uint32Message headerReader; string buffer; StaticString result; public: ScalarMessage(uint32_t maxSize = 0) { state = READING_HEADER; this->maxSize = maxSize; } void setMaxSize(uint32_t maxSize) { this->maxSize = maxSize; } /** * Resets the internal state so that this object can be used for processing * another scalar message. * * If zeroBuffer is true, then the contents of the internal buffer * will be securely filled with zeroes. This is useful if e.g. the buffer * might contain sensitive password data. */ void reset(bool zeroBuffer = false) { state = READING_HEADER; if (zeroBuffer) { MemZeroGuard guard(buffer); } headerReader.reset(); buffer.clear(); } size_t feed(const char *data, size_t size) { size_t consumed = 0; while (consumed < size && !done()) { const char *current = data + consumed; size_t rest = size - consumed; switch (state) { case READING_HEADER: consumed += headerReader.feed(current, rest); if (headerReader.done()) { if (maxSize > 0 && headerReader.value() > maxSize) { state = ERROR; error = TOO_LARGE; } else if (headerReader.value() == 0) { state = DONE; } else { state = READING_BODY; } } break; case READING_BODY: if (buffer.empty() && rest >= headerReader.value()) { result = StaticString(current, headerReader.value()); state = DONE; consumed += headerReader.value(); } else { size_t toConsume = std::min(rest, headerReader.value() - buffer.size()); if (buffer.capacity() < headerReader.value()) { buffer.reserve(headerReader.value()); } buffer.append(current, toConsume); consumed += toConsume; if (buffer.size() == headerReader.value()) { result = StaticString(buffer); state = DONE; } } break; default: // Never reached. abort(); }; } return consumed; } bool done() const { return state == DONE || state == ERROR; } bool hasError() const { return state == ERROR; } Error errorCode() const { return (Error) error; } const StaticString &value() const { return result; } static void generate(const StaticString &data, char headerBuf[sizeof(uint32_t)], StaticString output[2]) { if (OXT_UNLIKELY(data.size() > 0xFFFFFFFF)) { throw ArgumentException("Data size exceeds maximum size for scalar messages."); } Uint32Message::generate(headerBuf, data.size()); output[0] = StaticString(headerBuf, sizeof(uint32_t)); output[1] = data; } // output must be at least count + 1 in length static void generate(const StaticString data[], unsigned int count, char headerBuf[sizeof(uint32_t)], StaticString *output) { unsigned int i; uint32_t totalSize = 0; for (i = 0; i < count; i++) { if (OXT_UNLIKELY(data[i].size() > 0xFFFFFFFF)) { throw ArgumentException("Data size exceeds maximum size for scalar messages."); } totalSize += data[i].size(); output[i + 1] = data[i]; } Uint32Message::generate(headerBuf, totalSize); output[0] = StaticString(headerBuf, sizeof(uint32_t)); } }; } // namespace Passenger #endif /* _PASSENGER_MESSAGE_READERS_WRITERS_H_ */ passenger-4.0.37/ext/common/MessageServer.h000644 000765 000024 00000052006 12233035540 021233 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010, 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_MESSAGE_SERVER_H_ #define _PASSENGER_MESSAGE_SERVER_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; using namespace oxt; /* This source file follows the security guidelines written in Account.h. */ /** * Simple pluggable request/response messaging server framework. * * MessageServer implements a server with the following properties: * - It listens on a Unix socket. Socket creation and destruction is automatically handled. * The socket is world-writable because a username/password authentication scheme is * used to enforce security. * - Multithreaded: 1 thread per client. * - Designed for simple request/response cycles. That is, a client sends a request, and * the server may respond with arbitrary data. The server does not respond sporadically, * i.e. it only responds after a request. * - Requests are MessageIO array messages. * - Connections are authenticated. Connecting clients must send a username and password, * which are then checked against an accounts database. The associated account is known * throughout the entire connection life time so that it's possible to implement * authorization features. * * MessageServer does not process messages by itself. Instead, one registers handlers * which handle message processing. This framework allows one to seperate message * handling code by function, while allowing everything to listen on the same socket and * to use a common request parsing and dispatching codebase. * * A username/password authentication scheme was chosen over a file permission scheme because * experience has shown that the latter is inadequate. For example, the web server may * consist of multiple worker processes, each running as a different user. Although ACLs * can solve this problem as well, not every platform supports ACLs by default. * *

Writing handlers

* Handlers must inherit from MessageServer::Handler. They may implement newClient() * and must implement processMessage(). * * When a new client is accepted, MessageServer will call newClient() on all handlers. * This method accepts one argument: a common client context object. This context object * contains client-specific information, such as its file descriptor. It cannot be * extended to store more information, but it is passed to every handler anyway, * hence the word "common" in its name. * newClient() is supposed to return a handler-specific client context object for storing * its own information, or a null pointer if it doesn't need to store anything. * * When a client sends a request, MessageServer iterates through all handlers and calls * processMessage() on each one, passing it the common client context and the * handler-specific client context. processMessage() may return either true or false; * true indicates that the handler processed the message, false indicates that * it did not. Iteration stops at the first handler that returns true. * If all handlers return false, i.e. the client sent a message that no handler recognizes, * then MessageServer will close the connection with the client. * * Handlers do not need to be thread-safe as long as they only operate on data in the * context objects. MessageServer ensures that context objects are not shared with other * threads. * *

Usage example

* This implements a simple ping server. Every time a "ping" request is sent, the * server responds with "pong" along with the number of times it had already sent * pong to the same client in the past. * * @code * class PingHandler: public MessageServer::Handler { * public: * struct MyContext: public MessageServer::ClientContext { * int count; * * MyContext() { * count = 0; * } * }; * * MessageServer::ClientContextPtr newClient(MessageServer::CommonClientContext &commonContext) { * return boost::make_shared(); * } * * bool processMessage(MessageServer::CommonClientContext &commonContext, * MessageServer::ClientContextPtr &specificContext, * const vector &args) * { * if (args[0] == "ping") { * MyContext *myContext = (MyContext *) specificContext.get(); * writeArrayMessage(commonContext.fd, "pong", toString(specificContext->count).c_str(), NULL); * specificContext->count++; * return true; * } else { * return false; * } * } * }; * * ... * * MessageServer server("server.sock"); * server.addHandler(MessageServer::HandlerPtr(new PingHandler())); * server.addHandler(MessageServer::HandlerPtr(new PingHandler())); * server.mainLoop(); * @endcode * * @ingroup Support */ class MessageServer { public: static const unsigned int CLIENT_THREAD_STACK_SIZE = 1024 * 128; /** Interface for client context objects. */ class ClientContext { public: virtual ~ClientContext() { } }; typedef boost::shared_ptr ClientContextPtr; /** * A common client context, containing client-specific information * used by MessageServer itself. */ class CommonClientContext: public ClientContext { public: /** The client's socket file descriptor. */ FileDescriptor fd; /** The account with which the client authenticated. */ AccountPtr account; CommonClientContext(FileDescriptor &_fd, AccountPtr &_account) : fd(_fd), account(_account) { } /** Returns a string representation for this client context. */ string name() { return toString(fd); } /** * Checks whether this client has all of the rights in `rights`. The * client will be notified about the result of this check, by sending it a * message. * * @throws SecurityException The client doesn't have one of the required rights. * @throws SystemException Something went wrong while communicating with the client. * @throws boost::thread_interrupted */ void requireRights(Account::Rights rights) { if (!account->hasRights(rights)) { P_TRACE(2, "Security error: insufficient rights to execute this command."); writeArrayMessage(fd, "SecurityException", "Insufficient rights to execute this command.", NULL); throw SecurityException("Insufficient rights to execute this command."); } else { passSecurity(); } } /** Announce to the client that it has passed the security checks. * * @throws SystemException Something went wrong while communicating with the client. * @throws boost::thread_interrupted */ void passSecurity() { writeArrayMessage(fd, "Passed security", NULL); } }; /** * An abstract message handler class. * * The methods defined in this class are allowed to throw arbitrary exceptions. * Such exceptions are caught and logged, after which the connection to the * client is closed. */ class Handler { protected: /** Utility function for checking whether the command name equals `command`, * and whether it has exactly `nargs` arguments (excluding command name). */ bool isCommand(const vector &args, const string &command, unsigned int nargs = 0) const { return args.size() == nargs + 1 && args[0] == command; } /** Utility function for checking whether the command name equals `command`, * and whether it has at least `minargs` and at most `maxargs` arguments * (excluding command name), inclusive. */ bool isCommand(const vector &args, const string &command, unsigned int minargs, unsigned int maxargs) const { return args.size() >= minargs + 1 && args.size() <= maxargs + 1 && args[0] == command; } /** Utility function for converting arguments (starting from the given index) * into a VariantMap. * * @throws ArgumentException The number of arguments isn't an even number. */ VariantMap argsToOptions(const vector &args, unsigned int startIndex = 1) const { VariantMap map; vector::const_iterator it = args.begin() + startIndex, end = args.end(); while (it != end) { const string &key = *it; it++; if (it == end) { throw ArgumentException("Invalid options"); } const string &value = *it; map.set(key, value); it++; } return map; } public: virtual ~Handler() { } /** * Called when a new client has connected to the MessageServer. * * This method is called after the client has authenticated itself. * * @param context Contains common client-specific information. * @return A client context object for storing handler-specific client * information, or null. The default implementation returns null. */ virtual ClientContextPtr newClient(CommonClientContext &context) { return ClientContextPtr(); } /** * Called when a client has disconnected from the MessageServer. The * default implementation does nothing. * * This method is called even if processMessage() throws an exception. * It is however not called if newClient() throws an exception. * * @param commonContext Contains common client-specific information. * @param handlerSpecificContext The client context object as was returned * earlier by newClient(). */ virtual void clientDisconnected(MessageServer::CommonClientContext &context, MessageServer::ClientContextPtr &handlerSpecificContext) { } /** * Called then a client has sent a request message. * * This method is called after newClient() is called. * * @param commonContext Contains common client-specific information. * @param handlerSpecificContext The client context object as was returned * earlier by newClient(). * @param args The request message's contents. * @return Whether this handler has processed the message. Return false * if the message is unrecognized. */ virtual bool processMessage(CommonClientContext &commonContext, ClientContextPtr &handlerSpecificContext, const vector &args) = 0; }; typedef boost::shared_ptr HandlerPtr; protected: /** The filename of the server socket on which this MessageServer is listening. */ string socketFilename; /** An accounts database, used for authenticating clients. */ AccountsDatabasePtr accountsDatabase; /** The registered message handlers. */ vector handlers; /** The maximum number of milliseconds that client may spend on logging in. * Clients that take longer are disconnected. * * @invariant loginTimeout != 0 */ unsigned long long loginTimeout; /** The client threads. */ dynamic_thread_group threadGroup; /** The server socket's file descriptor. * @invariant serverFd >= 0 */ int serverFd; /** Calls clientDisconnected() on all handlers when destroyed. */ struct DisconnectEventBroadcastGuard { vector &handlers; CommonClientContext &commonContext; vector &handlerSpecificContexts; DisconnectEventBroadcastGuard(vector &_handlers, CommonClientContext &_commonContext, vector &_handlerSpecificContexts) : handlers(_handlers), commonContext(_commonContext), handlerSpecificContexts(_handlerSpecificContexts) { } ~DisconnectEventBroadcastGuard() { vector::iterator handler_iter; vector::iterator context_iter; for (handler_iter = handlers.begin(), context_iter = handlerSpecificContexts.begin(); handler_iter != handlers.end(); handler_iter++, context_iter++) { (*handler_iter)->clientDisconnected(commonContext, *context_iter); } } }; /** * Create a server socket and set it up for listening. This socket will * be world-writable. * * @throws RuntimeException * @throws SystemException * @throws boost::thread_interrupted */ void startListening() { TRACE_POINT(); int ret; serverFd = createUnixServer(socketFilename.c_str()); do { ret = chmod(socketFilename.c_str(), S_ISVTX | S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH); } while (ret == -1 && errno == EINTR); } /** * Authenticate the given client and returns its account information. * * @return A smart pointer to an Account object, or NULL if authentication failed. */ AccountPtr authenticate(const FileDescriptor &client) { string username, password; MemZeroGuard passwordGuard(password); unsigned long long timeout = loginTimeout; try { writeArrayMessage(client, &timeout, "version", "1", NULL); try { if (!readScalarMessage(client, username, MESSAGE_SERVER_MAX_USERNAME_SIZE, &timeout)) { return AccountPtr(); } } catch (const SecurityException &) { writeArrayMessage(client, &timeout, "The supplied username is too long.", NULL); return AccountPtr(); } try { if (!readScalarMessage(client, password, MESSAGE_SERVER_MAX_PASSWORD_SIZE, &timeout)) { return AccountPtr(); } } catch (const SecurityException &) { writeArrayMessage(client, &timeout, "The supplied password is too long.", NULL); return AccountPtr(); } AccountPtr account = accountsDatabase->authenticate(username, password); passwordGuard.zeroNow(); if (account == NULL) { writeArrayMessage(client, &timeout, "Invalid username or password.", NULL); return AccountPtr(); } else { writeArrayMessage(client, &timeout, "ok", NULL); return account; } } catch (const SystemException &) { return AccountPtr(); } catch (const TimeoutException &) { P_WARN("Login timeout"); return AccountPtr(); } } void broadcastNewClientEvent(CommonClientContext &context, vector &handlerSpecificContexts) { vector::iterator it; for (it = handlers.begin(); it != handlers.end(); it++) { handlerSpecificContexts.push_back((*it)->newClient(context)); } } bool processMessage(CommonClientContext &commonContext, vector &handlerSpecificContexts, const vector &args) { vector::iterator handler_iter; vector::iterator context_iter; for (handler_iter = handlers.begin(), context_iter = handlerSpecificContexts.begin(); handler_iter != handlers.end(); handler_iter++, context_iter++) { if ((*handler_iter)->processMessage(commonContext, *context_iter, args)) { return true; } } return false; } void processUnknownMessage(CommonClientContext &commonContext, const vector &args) { TRACE_POINT(); string name; if (args.empty()) { name = "(null)"; } else { name = args[0]; } P_TRACE(2, "A MessageServer client sent an invalid command: " << name << " (" << args.size() << " elements)"); } /** * The main function for a thread which handles a client. */ void clientHandlingMainLoop(FileDescriptor client) { TRACE_POINT(); vector args; P_TRACE(4, "MessageServer client thread " << (int) client << " started."); try { AccountPtr account(authenticate(client)); if (account == NULL) { P_TRACE(4, "MessageServer client thread " << (int) client << " exited."); return; } CommonClientContext commonContext(client, account); vector handlerSpecificContexts; broadcastNewClientEvent(commonContext, handlerSpecificContexts); DisconnectEventBroadcastGuard dguard(handlers, commonContext, handlerSpecificContexts); while (!this_thread::interruption_requested()) { UPDATE_TRACE_POINT(); if (!readArrayMessage(commonContext.fd, args)) { // Client closed connection. break; } P_TRACE(4, "MessageServer client " << commonContext.name() << ": received message: " << toString(args)); UPDATE_TRACE_POINT(); if (!processMessage(commonContext, handlerSpecificContexts, args)) { processUnknownMessage(commonContext, args); break; } args.clear(); } P_TRACE(4, "MessageServer client thread " << (int) client << " exited."); client.close(); } catch (const boost::thread_interrupted &) { P_TRACE(2, "MessageServer client thread " << (int) client << " interrupted."); } catch (const tracable_exception &e) { P_TRACE(2, "An error occurred in a MessageServer client thread " << (int) client << ":\n" << " message: " << toString(args) << "\n" << " exception: " << e.what() << "\n" << " backtrace:\n" << e.backtrace()); } } public: /** * Creates a new MessageServer object. * The actual server main loop is not started until you call mainLoop(). * * @param socketFilename The socket filename on which this MessageServer * should be listening. * @param accountsDatabase An accounts database for this server, used for * authenticating clients. * @throws RuntimeException Something went wrong while setting up the server socket. * @throws SystemException Something went wrong while setting up the server socket. * @throws boost::thread_interrupted */ MessageServer(const string &socketFilename, AccountsDatabasePtr accountsDatabase) { this->socketFilename = socketFilename; this->accountsDatabase = accountsDatabase; loginTimeout = 2000000; startListening(); } ~MessageServer() { this_thread::disable_syscall_interruption dsi; syscalls::close(serverFd); syscalls::unlink(socketFilename.c_str()); } string getSocketFilename() const { return socketFilename; } /** * Starts the server main loop. This method will loop forever until some * other thread interrupts the calling thread, or until an exception is raised. * * @throws SystemException Unable to accept a new connection. If this is a * non-fatal error then you may call mainLoop() again * to restart the server main loop. * @throws boost::thread_interrupted The calling thread has been interrupted. */ void mainLoop() { TRACE_POINT(); while (true) { this_thread::interruption_point(); sockaddr_un addr; socklen_t len = sizeof(addr); FileDescriptor fd; UPDATE_TRACE_POINT(); fd = syscalls::accept(serverFd, (struct sockaddr *) &addr, &len); if (fd == -1) { throw SystemException("Unable to accept a new client", errno); } UPDATE_TRACE_POINT(); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; boost::function func(boost::bind(&MessageServer::clientHandlingMainLoop, this, fd)); string name = "MessageServer client thread "; name.append(toString(fd)); threadGroup.create_thread(func, name, CLIENT_THREAD_STACK_SIZE); } } /** * Registers a new handler. * * @pre The main loop isn't running. */ void addHandler(HandlerPtr handler) { handlers.push_back(handler); } /** * Sets the maximum number of microseconds that clients may spend on logging in. * Clients that take longer are disconnected. * * @pre timeout != 0 * @pre The main loop isn't running. */ void setLoginTimeout(unsigned long long timeout) { assert(timeout != 0); loginTimeout = timeout; } }; typedef boost::shared_ptr MessageServerPtr; } // namespace Passenger #endif /* _PASSENGER_MESSAGE_SERVER_H_ */ passenger-4.0.37/ext/common/MultiLibeio.cpp000644 000765 000024 00000012347 12233035540 021235 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #ifndef PREAD_AND_PWRITE_ARE_NOT_THREADSAFE #ifdef __APPLE__ #define PREAD_AND_PWRITE_ARE_NOT_THREADSAFE 1 #else #define PREAD_AND_PWRITE_ARE_NOT_THREADSAFE 0 #endif #endif namespace Passenger { using namespace oxt; static boost::mutex syncher; static boost::condition_variable cond; static bool shouldPoll = false; static oxt::thread *thr = NULL; static bool quit = false; struct Data { SafeLibevPtr libev; MultiLibeio::Callback callback; Data(const SafeLibevPtr &_libev, const MultiLibeio::Callback &_callback) : libev(_libev), callback(_callback) { // If this assertion fails, then in the context of RequestHandler it means // that it was operating on a client that has already been disconnected. // The RequestHandler code is probably missing some necessary checks on // `client->connected()`. assert(_libev != NULL); } }; struct CustomData: public Data { MultiLibeio::ExecuteCallback execute; CustomData(const SafeLibevPtr &_libev, const MultiLibeio::Callback &_callback, const MultiLibeio::ExecuteCallback &_execute) : Data(_libev, _callback), execute(_execute) { } }; static void threadMain() { boost::unique_lock l(syncher); while (!quit) { while (!shouldPoll && !quit) { cond.wait(l); } if (!quit) { shouldPoll = false; l.unlock(); eio_poll(); l.lock(); } } } static void wantPoll() { boost::lock_guard l(syncher); shouldPoll = true; cond.notify_one(); } static int dispatch(eio_req *req) { auto_ptr data((Data *) req->data); assert(data->libev != NULL); data->libev->runLater(boost::bind(data->callback, *req)); return 0; } static void executeWrapper(eio_req *req) { CustomData *data = (CustomData *) req->data; data->execute(req); } #if PREAD_AND_PWRITE_ARE_NOT_THREADSAFE static boost::mutex preadWriteLock; static void lockedPread(int fd, void *buf, size_t length, off_t offset, eio_req *req) { boost::lock_guard l(preadWriteLock); req->result = pread(fd, buf, length, offset); } static void lockedPwrite(int fd, void *buf, size_t length, off_t offset, eio_req *req) { boost::lock_guard l(preadWriteLock); req->result = pwrite(fd, buf, length, offset); } #endif void MultiLibeio::init() { eio_init(wantPoll, NULL); thr = new oxt::thread(threadMain, "MultiLibeio dispatcher", 1024 * 64); } void MultiLibeio::shutdown() { boost::unique_lock l(syncher); quit = true; cond.notify_one(); l.unlock(); thr->join(); delete thr; thr = NULL; quit = false; } #define MAKE_REQUEST(code) \ eio_req *result; \ Data *data = new Data(libev, callback); \ code \ if (result == NULL) { \ delete data; \ return NULL; \ } else { \ return result; \ } eio_req * MultiLibeio::open(const char *path, int flags, mode_t mode, int pri, const Callback &callback) { MAKE_REQUEST( result = eio_open(path, flags, mode, pri, dispatch, data); ); } eio_req * MultiLibeio::read(int fd, void *buf, size_t length, off_t offset, int pri, const Callback &callback) { #if PREAD_AND_PWRITE_ARE_NOT_THREADSAFE return custom(boost::bind(lockedPread, fd, buf, length, offset, _1), pri, callback); #else MAKE_REQUEST( result = eio_read(fd, buf, length, offset, pri, dispatch, data); ); #endif } eio_req * MultiLibeio::write(int fd, void *buf, size_t length, off_t offset, int pri, const Callback &callback) { #if PREAD_AND_PWRITE_ARE_NOT_THREADSAFE return custom(boost::bind(lockedPwrite, fd, buf, length, offset, _1), pri, callback); #else MAKE_REQUEST( result = eio_write(fd, buf, length, offset, pri, dispatch, data); ); #endif } eio_req * MultiLibeio::custom(const ExecuteCallback &execute, int pri, const Callback &callback) { CustomData *data = new CustomData(libev, callback, execute); eio_req *result = eio_custom(executeWrapper, pri, dispatch, data); if (result == NULL) { delete data; return NULL; } else { return result; } } } // namespace Passenger passenger-4.0.37/ext/common/MultiLibeio.h000644 000765 000024 00000004327 12233035540 020701 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_MULTI_LIBEIO_H_ #define _PASSENGER_MULTI_LIBEIO_H_ #include #include #include namespace Passenger { using namespace boost; class MultiLibeio { private: SafeLibevPtr libev; public: typedef boost::function ExecuteCallback; typedef boost::function Callback; static void init(); static void shutdown(); MultiLibeio() { } MultiLibeio(const SafeLibevPtr &_libev) : libev(_libev) { } const SafeLibevPtr &getLibev() const { return libev; } eio_req *open(const char *path, int flags, mode_t mode, int pri, const Callback &callback); eio_req *read(int fd, void *buf, size_t length, off_t offset, int pri, const Callback &callback); eio_req *write(int fd, void *buf, size_t length, off_t offset, int pri, const Callback &callback); eio_req *custom(const ExecuteCallback &execute, int pri, const Callback &callback); }; } // namespace Passenger #endif /* _PASSENGER_MULTI_LIBEIO_H_ */ passenger-4.0.37/ext/common/RandomGenerator.h000644 000765 000024 00000011316 12233035540 021546 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_RANDOM_GENERATOR_H_ #define _PASSENGER_RANDOM_GENERATOR_H_ #include #include #include #include #include "StaticString.h" #include "Exceptions.h" #include "Utils/StrIntUtils.h" /** * A random */ namespace Passenger { using namespace std; using namespace boost; using namespace oxt; /** * A random data generator. Data is generated using /dev/urandom, and * is cryptographically secure. Unlike rand() and friends, * RandomGenerator does not require seeding. * * The reason why RandomGenerator isn't a singleton is because opening * /dev/urandom is *very* slow on Mac OS X and OpenBSD. Each object of * this class caches the /dev/urandom file handle. * * This class is thread-safe as long as there are no concurrent * calls to reopen() or close(). */ class RandomGenerator: public boost::noncopyable { private: FILE *handle; public: RandomGenerator(bool open = true) { handle = NULL; if (open) { reopen(); } } ~RandomGenerator() { this_thread::disable_syscall_interruption dsi; close(); } void reopen() { close(); handle = syscalls::fopen("/dev/urandom", "r"); if (handle == NULL) { throw FileSystemException("Cannot open /dev/urandom", errno, "/dev/urandom"); } } void close() { if (handle != NULL) { syscalls::fclose(handle); handle = NULL; } } StaticString generateBytes(void *buf, unsigned int size) { size_t ret = syscalls::fread(buf, 1, size, handle); if (ret != size) { throw IOException("Cannot read sufficient data from /dev/urandom"); } return StaticString((const char *) buf, size); } string generateByteString(unsigned int size) { string result(size, '\0'); generateBytes(&result[0], size); return result; } string generateHexString(unsigned int size) { string buf(size, '\0'); generateBytes(&buf[0], size); return toHex(buf); } /** * Generates a random string of size bytes which is also * valid ASCII. The result consists only of the characters A-Z, * a-z and 0-9, and therefore the total number of possibilities * given a size of N is 62**N. However not every character has an * equal chance of being chosen: a-i have 5/256 chance of being * chosen, while other characters have 4/256 chance of being chosen. * Therefore, to match the entropy of a random binary string of * size N, one should choose a size which yields slightly * more possibilities than 2**N. */ string generateAsciiString(unsigned int size) { string result(size, '\0'); generateAsciiString(&result[0], size); return result; } void generateAsciiString(char *_buf, unsigned int size) { static const char chars[] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; unsigned char *buf = (unsigned char *) _buf; generateBytes(buf, size); for (unsigned int i = 0; i < size; i++) { buf[i] = chars[buf[i] % sizeof(chars)]; } } int generateInt() { int ret; generateBytes(&ret, sizeof(ret)); return ret; } unsigned int generateUint() { return (unsigned int) generateInt(); } }; typedef boost::shared_ptr RandomGeneratorPtr; } // namespace Passenger #endif /* _PASSENGER_RANDOM_GENERATOR_H_ */ passenger-4.0.37/ext/common/ResourceLocator.h000644 000765 000024 00000007422 12233035540 021575 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010, 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_RESOURCE_LOCATOR_H_ #define _PASSENGER_RESOURCE_LOCATOR_H_ #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; /** * Locates various Phusion Passenger resources on the filesystem. All Phusion Passenger * files are located through this class. There's similar code in lib/phusion_passenger.rb. * See doc/Packaging.txt.md for an introduction about where Phusion Passenger expects its * files to be located. */ class ResourceLocator { private: string root; string binDir; string agentsDir; string helperScriptsDir; string resourcesDir; string docDir; string rubyLibDir; string nodeLibDir; static string getOption(const string &file, const IniFileSectionPtr §ion, const string &key) { if (section->hasKey(key)) { return section->get(key); } else { throw RuntimeException("Option '" + key + "' missing in file '" + file + "'"); } } public: ResourceLocator(const string &rootOrFile) { root = rootOrFile; if (getFileType(rootOrFile) == FT_REGULAR) { string file = rootOrFile; IniFileSectionPtr options = IniFile(file).section("locations"); binDir = getOption(file, options, "bin_dir"); agentsDir = getOption(file, options, "agents_dir"); helperScriptsDir = getOption(file, options, "helper_scripts_dir"); resourcesDir = getOption(file, options, "resources_dir"); docDir = getOption(file, options, "doc_dir"); rubyLibDir = getOption(file, options, "ruby_libdir"); nodeLibDir = getOption(file, options, "node_libdir"); } else { string root = rootOrFile; binDir = root + "/bin"; agentsDir = root + "/buildout/agents"; helperScriptsDir = root + "/helper-scripts"; resourcesDir = root + "/resources"; docDir = root + "/doc"; rubyLibDir = root + "/lib"; nodeLibDir = root + "/node_lib"; } } string getRoot() const { return root; } string getAgentsDir() const { return agentsDir; } string getHelperScriptsDir() const { return helperScriptsDir; } string getResourcesDir() const { return resourcesDir; } string getDocDir() const { return docDir; } // Can be empty. string getRubyLibDir() const { return rubyLibDir; } string getNodeLibDir() const { return nodeLibDir; } }; typedef boost::shared_ptr ResourceLocatorPtr; } #endif /* _PASSENGER_RESOURCE_LOCATOR_H_ */ passenger-4.0.37/ext/common/SafeLibev.h000644 000765 000024 00000015665 12233035540 020332 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010, 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_SAFE_LIBEV_H_ #define _PASSENGER_SAFE_LIBEV_H_ #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; /** * Class for thread-safely using libev. */ class SafeLibev { private: typedef boost::function Callback; struct Command { int id; Callback callback; Command(unsigned int _id, const Callback &_callback) : id(_id), callback(_callback) { } }; struct ev_loop *loop; pthread_t loopThread; ev_async async; boost::mutex syncher; boost::condition_variable cond; vector commands; unsigned int nextCommandId; static void asyncHandler(EV_P_ ev_async *w, int revents) { SafeLibev *self = (SafeLibev *) w->data; self->runCommands(); } static void timeoutHandler(int revents, void *arg) { auto_ptr callback((Callback *) arg); (*callback)(); } void runCommands() { boost::unique_lock l(syncher); vector commands = this->commands; this->commands.clear(); l.unlock(); vector::const_iterator it, end = commands.end(); for (it = commands.begin(); it != end; it++) { it->callback(); } } template void startWatcherAndNotify(Watcher *watcher, bool *done) { watcher->set(loop); watcher->start(); boost::unique_lock l(syncher); *done = true; cond.notify_all(); } template void stopWatcherAndNotify(Watcher *watcher, bool *done) { watcher->stop(); boost::unique_lock l(syncher); *done = true; cond.notify_all(); } void runAndNotify(const Callback *callback, bool *done) { (*callback)(); boost::unique_lock l(syncher); *done = true; cond.notify_all(); } void incNextCommandId() { if (nextCommandId == INT_MAX) { nextCommandId = 0; } else { nextCommandId++; } } public: /** SafeLibev takes over ownership of the loop object. */ SafeLibev(struct ev_loop *loop) { this->loop = loop; loopThread = pthread_self(); nextCommandId = 0; ev_async_init(&async, asyncHandler); ev_set_priority(&async, EV_MAXPRI); async.data = this; ev_async_start(loop, &async); } ~SafeLibev() { destroy(); ev_loop_destroy(loop); } void destroy() { ev_async_stop(loop, &async); } struct ev_loop *getLoop() const { return loop; } void setCurrentThread() { loopThread = pthread_self(); } pthread_t getCurrentThread() const { return loopThread; } template void start(Watcher &watcher) { if (pthread_equal(pthread_self(), loopThread)) { watcher.set(loop); watcher.start(); } else { boost::unique_lock l(syncher); bool done = false; commands.push_back(Command(nextCommandId, boost::bind(&SafeLibev::startWatcherAndNotify, this, &watcher, &done))); incNextCommandId(); ev_async_send(loop, &async); while (!done) { cond.wait(l); } } } template void stop(Watcher &watcher) { if (pthread_equal(pthread_self(), loopThread)) { watcher.stop(); } else { boost::unique_lock l(syncher); bool done = false; commands.push_back(Command(nextCommandId, boost::bind(&SafeLibev::stopWatcherAndNotify, this, &watcher, &done))); incNextCommandId(); ev_async_send(loop, &async); while (!done) { cond.wait(l); } } } void run(const Callback &callback) { assert(callback != NULL); if (pthread_equal(pthread_self(), loopThread)) { callback(); } else { runSync(callback); } } void runSync(const Callback &callback) { assert(callback != NULL); boost::unique_lock l(syncher); bool done = false; commands.push_back(Command(nextCommandId, boost::bind(&SafeLibev::runAndNotify, this, &callback, &done))); incNextCommandId(); ev_async_send(loop, &async); while (!done) { cond.wait(l); } } /** Run a callback after a certain timeout. */ void runAfter(unsigned int timeout, const Callback &callback) { assert(callback != NULL); ev_once(loop, -1, 0, timeout / 1000.0, timeoutHandler, new Callback(callback)); } /** Thread-safe version of runAfter(). */ void runAfterTS(unsigned int timeout, const Callback &callback) { assert(callback != NULL); if (pthread_equal(pthread_self(), loopThread)) { runAfter(timeout, callback); } else { runLater(boost::bind(&SafeLibev::runAfter, this, timeout, callback)); } } unsigned int runLater(const Callback &callback) { assert(callback != NULL); unsigned int result; { boost::unique_lock l(syncher); commands.push_back(Command(nextCommandId, callback)); result = nextCommandId; incNextCommandId(); } ev_async_send(loop, &async); return result; } /** * Cancels a callback that was scheduled to be run by runLater(). * Returns whether the command has been successfully cancelled or not. * That is, a return value of true guarantees that the callback will not be called * in the future, while a return value of false means that the callback has already * been called or is currently being called. */ bool cancelCommand(int id) { boost::unique_lock l(syncher); // TODO: we can do a binary search because the command ID // is monotically increasing except on overflow. vector::iterator it, end = commands.end(); for (it = commands.begin(); it != end; it++) { if (it->id == id) { commands.erase(it); return true; } } return false; } }; typedef boost::shared_ptr SafeLibevPtr; } // namespace Passenger #endif /* _PASSENGER_SAFE_LIBEV_H_ */ passenger-4.0.37/ext/common/ServerInstanceDir.h000644 000765 000024 00000031031 12233035540 022045 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_SERVER_INSTANCE_DIR_H_ #define _PASSENGER_SERVER_INSTANCE_DIR_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; /* TODO: I think we should move away from generation dirs in the future. * That way we can become immune to existing-directory-in-tmp denial of * service attacks. To achieve the same functionality as we do now, each * server instance directory is tagged with the control process's PID * and a creation timestamp. passenger-status should treat the server instance * directory with the most recent creation timestamp as the one to query. * For now, the current code does not lead to an exploit. */ class ServerInstanceDir: public noncopyable { public: class Generation: public noncopyable { private: friend class ServerInstanceDir; string path; unsigned int number; bool owner; Generation(const string &serverInstanceDir, unsigned int number) { path = serverInstanceDir + "/generation-" + toString(number); this->number = number; owner = false; } void create(bool userSwitching, const string &defaultUser, const string &defaultGroup, uid_t webServerWorkerUid, gid_t webServerWorkerGid) { TRACE_POINT(); bool runningAsRoot = geteuid() == 0; struct passwd *defaultUserEntry; uid_t defaultUid; gid_t defaultGid; defaultUserEntry = getpwnam(defaultUser.c_str()); if (defaultUserEntry == NULL) { throw NonExistentUserException("Default user '" + defaultUser + "' does not exist."); } defaultUid = defaultUserEntry->pw_uid; defaultGid = lookupGid(defaultGroup); if (defaultGid == (gid_t) -1) { throw NonExistentGroupException("Default group '" + defaultGroup + "' does not exist."); } /* We set a very tight permission here: no read or write access for * anybody except the owner. The individual files and subdirectories * decide for themselves whether they're readable by anybody. */ makeDirTree(path, "u=rwx,g=x,o=x"); /* Write structure version file. */ string structureVersionFile = path + "/structure_version.txt"; createFile(structureVersionFile, toString(SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MAJOR_VERSION) + "." + toString(SERVER_INSTANCE_DIR_GENERATION_STRUCTURE_MINOR_VERSION), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); string passengerVersionFile = path + "/passenger_version.txt"; createFile(passengerVersionFile, PASSENGER_VERSION "\n", S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); /* We want the upload buffer directory to be only writable by the web * server's worker processs. Other users may not have any access to this * directory. */ if (runningAsRoot) { makeDirTree(path + "/buffered_uploads", "u=rwx,g=,o=", webServerWorkerUid, webServerWorkerGid); } else { makeDirTree(path + "/buffered_uploads", "u=rwx,g=,o="); } /* The HelperAgent must be able to connect to an application. */ if (runningAsRoot) { if (userSwitching) { /* Each application process may be running as a different user, * so the backends subdirectory must be world-writable. * However we don't want everybody to be able to know the * sockets' filenames, so the directory is not readable. */ makeDirTree(path + "/backends", "u=rwx,g=wx,o=wx,+t"); } else { /* All application processes are running as defaultUser/defaultGroup, * so make defaultUser/defaultGroup the owner and group of the * subdirecory. * * The directory is not readable as a security precaution: * nobody should be able to know the sockets' filenames without * having access to the application pool. */ makeDirTree(path + "/backends", "u=rwx,g=x,o=x", defaultUid, defaultGid); } } else { /* All application processes are running as the same user as the web server, * so only allow access for this user. */ makeDirTree(path + "/backends", "u=rwx,g=,o="); } owner = true; } public: ~Generation() { destroy(); } void destroy() { if (owner) { removeDirTree(path); } } unsigned int getNumber() const { return number; } // The 'const strng &' here is on purpose. The AgentsStarter C // functions return the string pointer directly. const string &getPath() const { return path; } void detach() { owner = false; } }; typedef boost::shared_ptr GenerationPtr; private: string path; bool owner; friend class Generation; void initialize(const string &path, bool owner) { TRACE_POINT(); this->path = path; this->owner = owner; /* Create the server instance directory. We only need to write to this * directory for these reasons: * 1. Initial population of structure files (structure_version.txt, instance.pid). * 2. Creating/removing a generation directory. * 3. Removing the entire server instance directory (after all * generations are removed). * * 1 and 2 are done by the helper server during initialization and before lowering * privilege. 3 is done during helper server shutdown by a cleanup process that's * running as the same user the helper server was running as before privilege * lowering. * Therefore, we make the directory only writable by the user the helper server * was running as before privilege is lowered. Everybody else has read and execute * rights though, because we want admin tools to be able to list the available * generations no matter what user they're running as. */ if (owner) { switch (getFileTypeNoFollowSymlinks(path)) { case FT_NONEXISTANT: createDirectory(path); break; case FT_DIRECTORY: verifyDirectoryPermissions(path); break; default: throw RuntimeException("'" + path + "' already exists, and is not a directory"); } } else if (getFileType(path) != FT_DIRECTORY) { throw RuntimeException("Server instance directory '" + path + "' does not exist"); } } void createDirectory(const string &path) const { // We do not use makeDirTree() here. If an attacker creates a directory // just before we do, then we want to abort because we want the directory // to have specific permissions. if (mkdir(path.c_str(), parseModeString("u=rwx,g=rx,o=rx")) == -1) { int e = errno; throw FileSystemException("Cannot create server instance directory '" + path + "'", e, path); } // Explicitly chmod the directory in case the umask is interfering. if (chmod(path.c_str(), parseModeString("u=rwx,g=rx,o=rx")) == -1) { int e = errno; throw FileSystemException("Cannot set permissions on server instance directory '" + path + "'", e, path); } // verifyDirectoryPermissions() checks for the owner/group so we must make // sure the server instance directory has that owner/group, even when the // parent directory has setgid on. if (chown(path.c_str(), geteuid(), getegid()) == -1) { int e = errno; throw FileSystemException("Cannot change the permissions of the server " "instance directory '" + path + "'", e, path); } } /** * When reusing an existing server instance directory, check permissions * so that an attacker cannot pre-create a directory with too liberal * permissions. */ void verifyDirectoryPermissions(const string &path) { TRACE_POINT(); struct stat buf; if (stat(path.c_str(), &buf) == -1) { int e = errno; throw FileSystemException("Cannot stat() " + path, e, path); } else if (buf.st_mode != (S_IFDIR | parseModeString("u=rwx,g=rx,o=rx"))) { throw RuntimeException("Tried to reuse existing server instance directory " + path + ", but it has wrong permissions"); } else if (buf.st_uid != geteuid() || buf.st_gid != getegid()) { /* The server instance directory is always created by the Watchdog. Its UID/GID never * changes because: * 1. Disabling user switching only lowers the privilege of the HelperAgent. * 2. For the UID/GID to change, the web server must be completely restarted * (not just graceful reload) so that the control process can change its UID/GID. * This causes the PID to change, so that an entirely new server instance * directory is created. */ throw RuntimeException("Tried to reuse existing server instance directory " + path + ", but it has wrong owner and group"); } } bool isDirectory(const string &dir, struct dirent *entry) const { #ifdef DT_DIR if (entry->d_type == DT_DIR) { return true; } else if (entry->d_type != DT_UNKNOWN) { return false; } // If DT_UNKNOWN, use normal check. #endif string path = dir; path.append("/"); path.append(entry->d_name); return getFileType(path) == FT_DIRECTORY; } public: ServerInstanceDir(const string &path, bool owner = true) { initialize(path, owner); } ~ServerInstanceDir() { destroy(); } void destroy() { if (owner) { GenerationPtr newestGeneration; try { newestGeneration = getNewestGeneration(); } catch (const FileSystemException &e) { if (e.code() == ENOENT) { return; } else { throw; } } if (newestGeneration == NULL) { removeDirTree(path); } } } // The 'const strng &' here is on purpose. The AgentsStarter C // functions return the string pointer directly. const string &getPath() const { return path; } void detach() { owner = false; } GenerationPtr newGeneration(bool userSwitching, const string &defaultUser, const string &defaultGroup, uid_t webServerWorkerUid, gid_t webServerWorkerGid) { GenerationPtr newestGeneration = getNewestGeneration(); unsigned int newNumber; if (newestGeneration != NULL) { newNumber = newestGeneration->getNumber() + 1; } else { newNumber = 0; } GenerationPtr generation(new Generation(path, newNumber)); generation->create(userSwitching, defaultUser, defaultGroup, webServerWorkerUid, webServerWorkerGid); return generation; } GenerationPtr getGeneration(unsigned int number) const { // Must not used boost::make_shared() here because Watchdog.cpp // deletes the raw pointer in cleanupAgentsInBackground(). return ptr(new Generation(path, number)); } GenerationPtr getNewestGeneration() const { DIR *dir = opendir(path.c_str()); struct dirent *entry; int result = -1; if (dir == NULL) { int e = errno; throw FileSystemException("Cannot open directory " + path, e, path); } while ((entry = readdir(dir)) != NULL) { if (isDirectory(path, entry) && strncmp(entry->d_name, "generation-", sizeof("generation-") - 1) == 0) { const char *numberString = entry->d_name + sizeof("generation-") - 1; int number = atoi(numberString); if (number >= 0 && number > result) { result = number; } } } closedir(dir); if (result == -1) { return GenerationPtr(); } else { return getGeneration(result); } } }; typedef boost::shared_ptr ServerInstanceDirPtr; } // namespace Passenger #endif /* _PASSENGER_SERVER_INSTANCE_DIR_H_ */ passenger-4.0.37/ext/common/StaticString.h000644 000765 000024 00000017467 12233035540 021112 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010, 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_STATIC_STRING_H_ #define _PASSENGER_STATIC_STRING_H_ #include #include #include #include #include #include namespace Passenger { using namespace std; /** * An immutable, static byte buffer. This class will never copy data: * it just holds a pointer to the data. So a StaticString will become unusable * once the data it refers to has been freed. * * StaticString will never modify the data. */ class StaticString { private: const char *content; string::size_type len; static const char *memmem(const char *haystack, string::size_type haystack_len, const char *needle, string::size_type needle_len) { if (needle_len == 0) { return haystack; } const char *last_possible = haystack + haystack_len - needle_len; do { const char *result = (const char *) memchr(haystack, needle[0], haystack_len); if (result != NULL) { if (result > last_possible) { return NULL; } else if (memcmp(result, needle, needle_len) == 0) { return result; } else { ssize_t new_len = ssize_t(haystack_len) - (result - haystack) - 1; if (new_len <= 0) { return NULL; } else { haystack = result + 1; haystack_len = new_len; } } } else { return NULL; } } while (true); } public: /** A hash function object for StaticString. */ struct Hash { size_t operator()(const StaticString &str) const { const char *data = str.content; const char *end = str.content + str.len; size_t result = 0; #if defined(__i386__) || defined(__x86_64__) /* When on x86 or x86_64, process 4 or 8 bytes * per iteration by treating the data as an * array of longs. Luckily for us these * architectures can read longs even on unaligned * addresses. */ const char *last_long = str.content + str.len / sizeof(unsigned long) * sizeof(unsigned long); while (data < last_long) { result = result * 33 + *((unsigned long *) data); data += sizeof(unsigned long); } /* Process leftover data byte-by-byte. */ #endif while (data < end) { result = result * 33 + *data; data++; } return result; } }; StaticString() { content = ""; len = 0; } StaticString(const StaticString &b) { content = b.content; len = b.len; } StaticString(const string &s) { content = s.data(); len = s.size(); } StaticString(const char *data) { content = data; len = strlen(data); } StaticString(const char *data, string::size_type len) { content = data; this->len = len; } bool empty() const { return len == 0; } string::size_type size() const { return len; } char operator[](string::size_type i) const { return content[i]; } char at(string::size_type i) const { return content[i]; } const char *c_str() const { return content; } const char *data() const { return content; } string toString() const { return string(content, len); } bool equals(const StaticString &other) const { return len == other.len && memcmp(content, other.content, len) == 0; } bool equals(const string &other) const { return len == other.size() && memcmp(content, other.data(), len) == 0; } string::size_type find(char c, string::size_type pos = 0) const { if (pos < len) { const char *result = (const char *) memchr(content + pos, c, len - pos); if (result == NULL) { return string::npos; } else { return result - content; } } else { return string::npos; } } string::size_type find(const StaticString &s, string::size_type pos = 0) const { if (s.empty()) { return 0; } else if (pos < len) { const char *result = memmem(content + pos, len - pos, s.c_str(), s.size()); if (result == NULL) { return string::npos; } else { return result - content; } } else { return string::npos; } } string::size_type find(const char *s, string::size_type pos, string::size_type n) const { return find(StaticString(s, n), pos); } StaticString substr(string::size_type pos = 0, string::size_type n = string::npos) const { if (pos > len) { throw out_of_range("Argument 'pos' out of range"); } else { if (n > len - pos) { n = len - pos; } return StaticString(content + pos, n); } } bool operator==(const StaticString &other) const { return len == other.len && memcmp(content, other.content, len) == 0; } bool operator==(const string &other) const { return len == other.size() && memcmp(content, other.data(), len) == 0; } bool operator==(const char *other) const { size_t other_len = strlen(other); return len == other_len && memcmp(content, other, other_len) == 0; } bool operator!=(const StaticString &other) const { return len != other.len || memcmp(content, other.content, len) != 0; } bool operator!=(const string &other) const { return len != other.size() || memcmp(content, other.data(), len) != 0; } bool operator!=(const char *other) const { size_t other_len = strlen(other); return len != other_len || memcmp(content, other, other_len) != 0; } bool operator<(const StaticString &other) const { size_t size = (len < other.size()) ? len : other.size(); int result = memcmp(content, other.data(), size); if (result == 0) { return len < other.size(); } else { return result < 0; } } bool operator<(const char *other) const { return *this < StaticString(other); } string operator+(const char *other) const { return string(content, len) + other; } string operator+(const string &other) const { return string(content, len) + other; } string operator+(const StaticString &other) const { string result(content, len); result.append(other.data(), other.size()); return result; } operator string() const { return string(content, len); } }; inline string operator+(const char *lhs, const StaticString &rhs) { return StaticString(lhs) + rhs; } inline string operator+(const string &lhs, const StaticString &rhs) { string result = lhs; result.append(rhs.data(), rhs.size()); return result; } inline ostream & operator<<(ostream &os, const StaticString &str) { os.write(str.data(), str.size()); return os; } inline bool operator==(const string &other, const StaticString &str) { return str == other; } inline bool operator==(const char *other, const StaticString &str) { return str == other; } inline bool operator!=(const string &other, const StaticString &str) { return str != other; } inline bool operator!=(const char *other, const StaticString &str) { return str != other; } } // namespace Passenger #endif /* _PASSENGER_STATIC_STRING_H_ */ passenger-4.0.37/ext/common/UnionStation.h000644 000765 000024 00000061742 12233035540 021121 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_UNION_STATION_H_ #define _PASSENGER_UNION_STATION_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { namespace UnionStation { using namespace std; using namespace boost; using namespace oxt; // All access to the file descriptor must be synchronized through the lock. struct Connection { mutable boost::mutex syncher; int fd; Connection(int _fd) : fd(_fd) { } ~Connection() { disconnect(); } bool connected() const { return fd != -1; } bool disconnect(string &errorResponse) { if (!connected()) { return false; } /* The server might send an "error" array message * just before disconnecting. Try to read it. */ TRACE_POINT(); vector response; try { unsigned long long timeout = 20000000; while (true) { response = readArrayMessage(fd, &timeout); } } catch (const TimeoutException &) { /* This means that the last message isn't an array * message or that the server didn't send it quickly * enough. In any case, discard whatever previous * array messages we were able to read because they're * guaranteed not to be the error message we're expecting. */ response.clear(); } catch (const SystemException &e) { /* We treat ECONNRESET the same as EOFException. * Other errors are treated as TimeoutException. */ if (e.code() != ECONNRESET) { response.clear(); } } catch (const EOFException &) { /* Do nothing. We've successfully read the last array message. */ } UPDATE_TRACE_POINT(); disconnect(); if (response.size() == 2 && response[0] == "error") { errorResponse = response[1]; return true; } else { return false; } } void disconnect() { if (fd != -1) { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; safelyClose(fd); fd = -1; } } }; typedef boost::shared_ptr ConnectionPtr; /** A special lock type for Connection that also keeps a smart * pointer to the data structure so that the mutex is not destroyed * prematurely. */ struct ConnectionLock { ConnectionPtr connection; bool locked; ConnectionLock(const ConnectionPtr &c) : connection(c) { c->syncher.lock(); locked = true; } ~ConnectionLock() { if (locked) { connection->syncher.unlock(); } } void reset(const ConnectionPtr &c, bool lockNow = true) { if (locked) { connection->syncher.unlock(); } connection = c; if (lockNow) { connection->syncher.lock(); locked = true; } else { locked = false; } } void lock() { assert(!locked); connection->syncher.lock(); locked = true; } }; /** * A scope guard which closes the given Connection on destruction unless cleared. */ class ConnectionGuard { private: ConnectionPtr connection; bool cleared; public: ConnectionGuard(const ConnectionPtr &_connection) : connection(_connection), cleared(false) { } ~ConnectionGuard() { if (!cleared) { connection->disconnect(); } } void clear() { cleared = true; } }; enum ExceptionHandlingMode { PRINT, THROW, IGNORE }; class LoggerFactory; typedef boost::shared_ptr LoggerFactoryPtr; inline void _checkinConnection(const LoggerFactoryPtr &loggerFactory, const ConnectionPtr &connection); class Logger: public boost::noncopyable { private: static const int INT64_STR_BUFSIZE = 22; // Long enough for a 64-bit number. static const unsigned long long IO_TIMEOUT = 5000000; // In microseconds. const LoggerFactoryPtr loggerFactory; const ConnectionPtr connection; const string txnId; const string groupName; const string category; const string unionStationKey; const ExceptionHandlingMode exceptionHandlingMode; bool shouldFlushToDiskAfterClose; /** * Buffer must be at least txnId.size() + 1 + INT64_STR_BUFSIZE + 1 bytes. */ char *insertTxnIdAndTimestamp(char *buffer, const char *end) { assert(end - buffer >= int(txnId.size() + 1 + INT64_STR_BUFSIZE + 1)); int size; // "txn-id-here" buffer = appendData(buffer, end, txnId); // "txn-id-here " buffer = appendData(buffer, end, " ", 1); // "txn-id-here 123456" assert(end - buffer >= INT64_STR_BUFSIZE); size = snprintf(buffer, INT64_STR_BUFSIZE, "%llu", SystemTime::getUsec()); if (size >= INT64_STR_BUFSIZE) { // The buffer is too small. throw IOException("Cannot format a new transaction log message timestamp."); } buffer += size; // "txn-id-here 123456 " buffer = appendData(buffer, end, " ", 1); return buffer; } template void handleException(const ExceptionType &e) { switch (exceptionHandlingMode) { case THROW: throw e; case PRINT: { const tracable_exception *te = dynamic_cast(&e); if (te != NULL) { P_WARN(te->what() << "\n" << te->backtrace()); } else { P_WARN(e.what()); } break; } default: break; } } public: Logger() : exceptionHandlingMode(PRINT) { } Logger(const LoggerFactoryPtr &_loggerFactory, const ConnectionPtr &_connection, const string &_txnId, const string &_groupName, const string &_category, const string &_unionStationKey, ExceptionHandlingMode _exceptionHandlingMode = PRINT) : loggerFactory(_loggerFactory), connection(_connection), txnId(_txnId), groupName(_groupName), category(_category), unionStationKey(_unionStationKey), exceptionHandlingMode(_exceptionHandlingMode), shouldFlushToDiskAfterClose(false) { } ~Logger() { TRACE_POINT(); if (connection == NULL) { return; } ConnectionLock l(connection); if (!connection->connected()) { return; } char timestamp[2 * sizeof(unsigned long long) + 1]; integerToHexatri(SystemTime::getUsec(), timestamp); UPDATE_TRACE_POINT(); ConnectionGuard guard(connection); try { unsigned long long timeout = IO_TIMEOUT; writeArrayMessage(connection->fd, &timeout, "closeTransaction", txnId.c_str(), timestamp, NULL); if (shouldFlushToDiskAfterClose) { UPDATE_TRACE_POINT(); timeout = IO_TIMEOUT; writeArrayMessage(connection->fd, &timeout, "flush", NULL); readArrayMessage(connection->fd, &timeout); } _checkinConnection(loggerFactory, connection); guard.clear(); } catch (const SystemException &e) { string errorResponse; UPDATE_TRACE_POINT(); guard.clear(); if (connection->disconnect(errorResponse)) { handleException(IOException( "Logging agent disconnected with error: " + errorResponse)); } else { handleException(e); } } } void message(const StaticString &text) { TRACE_POINT(); if (connection == NULL) { P_TRACE(3, "[Union Station log to null] " << text); return; } ConnectionLock l(connection); if (!connection->connected()) { P_TRACE(3, "[Union Station log to null] " << text); return; } char timestamp[2 * sizeof(unsigned long long) + 1]; integerToHexatri(SystemTime::getUsec(), timestamp); UPDATE_TRACE_POINT(); ConnectionGuard guard(connection); try { unsigned long long timeout = IO_TIMEOUT; P_TRACE(3, "[Union Station log] " << txnId << " " << timestamp << " " << text); writeArrayMessage(connection->fd, &timeout, "log", txnId.c_str(), timestamp, NULL); writeScalarMessage(connection->fd, text, &timeout); guard.clear(); } catch (const std::exception &e) { string errorResponse; UPDATE_TRACE_POINT(); guard.clear(); if (connection->disconnect(errorResponse)) { handleException(IOException( "Logging agent disconnected with error: " + errorResponse)); } else { handleException(e); } } } void abort(const StaticString &text) { message("ABORT"); } void flushToDiskAfterClose(bool value) { shouldFlushToDiskAfterClose = value; } bool isNull() const { return connection == NULL; } const string &getTxnId() const { return txnId; } const string &getGroupName() const { return groupName; } const string &getCategory() const { return category; } const string &getUnionStationKey() const { return unionStationKey; } }; typedef boost::shared_ptr LoggerPtr; class ScopeLog: public noncopyable { private: Logger * const log; enum { NAME, GRANULAR } type; union { const char *name; struct { const char *endMessage; const char *abortMessage; } granular; } data; bool ok; static string timevalToString(struct timeval &tv) { unsigned long long i = (unsigned long long) tv.tv_sec * 1000000 + tv.tv_usec; return usecToString(i); } static string usecToString(unsigned long long usec) { char timestamp[2 * sizeof(unsigned long long) + 1]; integerToHexatri(usec, timestamp); return timestamp; } public: ScopeLog() : log(NULL) { } ScopeLog(const LoggerPtr &_log, const char *name) : log(_log.get()) { type = NAME; data.name = name; ok = false; char message[150]; char *pos = message; const char *end = message + sizeof(message); struct rusage usage; pos = appendData(pos, end, "BEGIN: "); pos = appendData(pos, end, name); pos = appendData(pos, end, " ("); pos = appendData(pos, end, usecToString(SystemTime::getUsec())); pos = appendData(pos, end, ","); if (getrusage(RUSAGE_SELF, &usage) == -1) { int e = errno; throw SystemException("getrusage() failed", e); } pos = appendData(pos, end, timevalToString(usage.ru_utime)); pos = appendData(pos, end, ","); pos = appendData(pos, end, timevalToString(usage.ru_stime)); pos = appendData(pos, end, ") "); if (log != NULL) { log->message(StaticString(message, pos - message)); } } ScopeLog(const LoggerPtr &_log, const char *beginMessage, const char *endMessage, const char *abortMessage = NULL) : log(_log.get()) { if (_log != NULL) { type = GRANULAR; data.granular.endMessage = endMessage; data.granular.abortMessage = abortMessage; ok = abortMessage == NULL; _log->message(beginMessage); } } ~ScopeLog() { if (log == NULL) { return; } if (type == NAME) { char message[150]; char *pos = message; const char *end = message + sizeof(message); struct rusage usage; if (ok) { pos = appendData(pos, end, "END: "); } else { pos = appendData(pos, end, "FAIL: "); } pos = appendData(pos, end, data.name); pos = appendData(pos, end, " ("); pos = appendData(pos, end, usecToString(SystemTime::getUsec())); pos = appendData(pos, end, ","); if (getrusage(RUSAGE_SELF, &usage) == -1) { int e = errno; throw SystemException("getrusage() failed", e); } pos = appendData(pos, end, timevalToString(usage.ru_utime)); pos = appendData(pos, end, ","); pos = appendData(pos, end, timevalToString(usage.ru_stime)); pos = appendData(pos, end, ")"); log->message(StaticString(message, pos - message)); } else { if (ok) { log->message(data.granular.endMessage); } else { log->message(data.granular.abortMessage); } } } void success() { ok = true; } }; class LoggerFactory: public boost::enable_shared_from_this { private: static const unsigned int CONNECTION_POOL_MAX_SIZE = 10; const string serverAddress; const string username; const string password; const string nodeName; RandomGenerator randomGenerator; LoggerPtr nullLogger; /** Lock protecting the fields that follow, but not the * contents of the connection object. */ mutable boost::mutex syncher; vector connectionPool; unsigned int maxConnectTries; unsigned long long reconnectTimeout; unsigned long long nextReconnectTime; static string determineNodeName(const string &givenNodeName) { if (givenNodeName.empty()) { return getHostName(); } else { return givenNodeName; } } static bool isNetworkError(int code) { return code == EPIPE || code == ECONNREFUSED || code == ECONNRESET || code == EHOSTUNREACH || code == ENETDOWN || code == ENETUNREACH || code == ETIMEDOUT; } template static bool instanceof(const std::exception &e) { return dynamic_cast(&e) != NULL; } ConnectionPtr createNewConnection() { TRACE_POINT(); int fd; vector args; unsigned long long timeout = 15000000; fd = connectToServer(serverAddress); FdGuard guard(fd, true); if (!readArrayMessage(fd, args, &timeout)) { throw IOException("The logging agent closed the connection before sending a version identifier."); } if (args.size() != 2 || args[0] != "version") { throw IOException("The logging agent server didn't sent a valid version identifier."); } if (args[1] != "1") { string message = "Unsupported logging agent protocol version " + args[1] + "."; throw IOException(message); } UPDATE_TRACE_POINT(); writeScalarMessage(fd, username, &timeout); writeScalarMessage(fd, password, &timeout); UPDATE_TRACE_POINT(); if (!readArrayMessage(fd, args, &timeout)) { throw IOException("The logging agent did not send an authentication response."); } else if (args.size() != 1) { throw IOException("The authentication response that the logging agent sent is not valid."); } else if (args[0] != "ok") { throw SecurityException("The logging agent server denied authentication: " + args[0]); } UPDATE_TRACE_POINT(); writeArrayMessage(fd, &timeout, "init", nodeName.c_str(), NULL); if (!readArrayMessage(fd, args, &timeout)) { throw SystemException("Cannot connect to logging server", ECONNREFUSED); } else if (args.size() != 1) { throw IOException("Logging server returned an invalid reply for the 'init' command"); } else if (args[0] == "server shutting down") { throw SystemException("Cannot connect to server", ECONNREFUSED); } else if (args[0] != "ok") { throw IOException("Logging server returned an invalid reply for the 'init' command"); } guard.clear(); return boost::make_shared(fd); } public: LoggerFactory() { nullLogger = boost::make_shared(); } LoggerFactory(const string &_serverAddress, const string &_username, const string &_password, const string &_nodeName = string()) : serverAddress(_serverAddress), username(_username), password(_password), nodeName(determineNodeName(_nodeName)) { nullLogger = boost::make_shared(); if (!_serverAddress.empty() && isLocalSocketAddress(_serverAddress)) { maxConnectTries = 10; } else { maxConnectTries = 1; } reconnectTimeout = 1000000; nextReconnectTime = 0; } ConnectionPtr checkoutConnection() { TRACE_POINT(); boost::unique_lock l(syncher); if (!connectionPool.empty()) { P_TRACE(3, "Checked out existing connection"); ConnectionPtr connection = connectionPool.back(); connectionPool.pop_back(); return connection; } else { if (SystemTime::getUsec() < nextReconnectTime) { P_TRACE(3, "Not yet time to reconnect; returning NULL connection"); return ConnectionPtr(); } l.unlock(); P_TRACE(3, "Creating new connection with logging agent"); ConnectionPtr connection; try { connection = createNewConnection(); } catch (const TimeoutException &) { l.lock(); P_WARN("Timeout trying to connect to the logging agent at " << serverAddress << "; " << "will reconnect in " << reconnectTimeout / 1000000 << " second(s)."); nextReconnectTime = SystemTime::getUsec() + reconnectTimeout; return ConnectionPtr(); } catch (const tracable_exception &e) { l.lock(); nextReconnectTime = SystemTime::getUsec() + reconnectTimeout; if (instanceof(e) || instanceof(e)) { P_WARN("Cannot connect to the logging agent at " << serverAddress << " (" << e.what() << "); will reconnect in " << reconnectTimeout / 1000000 << " second(s)."); return ConnectionPtr(); } else { throw; } } return connection; } } void checkinConnection(const ConnectionPtr &connection) { boost::lock_guard l(syncher); if (connectionPool.size() < CONNECTION_POOL_MAX_SIZE) { connectionPool.push_back(connection); } else { connection->disconnect(); } } LoggerPtr createNullLogger() const { return nullLogger; } LoggerPtr newTransaction(const string &groupName, const string &category = "requests", const string &unionStationKey = "-", const string &filters = string()) { if (serverAddress.empty()) { return createNullLogger(); } unsigned long long timestamp = SystemTime::getUsec(); char txnId[ 2 * sizeof(unsigned int) + // max hex timestamp size 11 + // space for a random identifier 1 // null terminator ]; char *end; unsigned int timestampSize; char timestampStr[2 * sizeof(unsigned long long) + 1]; // "[timestamp]" // Our timestamp is like a Unix timestamp but with minutes // resolution instead of seconds. 32 bits will last us for // about 8000 years. timestampSize = integerToHexatri(timestamp / 1000000 / 60, txnId); end = txnId + timestampSize; // "[timestamp]-" *end = '-'; end++; // "[timestamp]-[random id]" randomGenerator.generateAsciiString(end, 11); end += 11; *end = '\0'; integerToHexatri(timestamp, timestampStr); ConnectionPtr connection = checkoutConnection(); if (connection == NULL) { return createNullLogger(); } ConnectionLock cl(connection); ConnectionGuard guard(connection); try { unsigned long long timeout = 15000000; writeArrayMessage(connection->fd, &timeout, "openTransaction", txnId, groupName.c_str(), "", category.c_str(), timestampStr, unionStationKey.c_str(), "true", "true", filters.c_str(), NULL); vector args; if (!readArrayMessage(connection->fd, args, &timeout)) { boost::lock_guard l(syncher); P_WARN("The logging agent at " << serverAddress << " closed the connection (no error message given);" << " will reconnect in " << reconnectTimeout / 1000000 << " second(s)."); nextReconnectTime = SystemTime::getUsec() + reconnectTimeout; return createNullLogger(); } else if (args.size() == 2 && args[0] == "error") { boost::lock_guard l(syncher); P_WARN("The logging agent at " << serverAddress << " closed the connection (error message: " << args[1] << "); will reconnect in " << reconnectTimeout / 1000000 << " second(s)."); nextReconnectTime = SystemTime::getUsec() + reconnectTimeout; return createNullLogger(); } else if (args.empty() || args[0] != "ok") { boost::lock_guard l(syncher); P_WARN("The logging agent at " << serverAddress << " sent an unexpected reply;" << " will reconnect in " << reconnectTimeout / 1000000 << " second(s)."); nextReconnectTime = SystemTime::getUsec() + reconnectTimeout; return createNullLogger(); } guard.clear(); return boost::make_shared(shared_from_this(), connection, string(txnId, end - txnId), groupName, category, unionStationKey); } catch (const TimeoutException &) { boost::lock_guard l(syncher); P_WARN("Timeout trying to communicate with the logging agent at " << serverAddress << "; " << "will reconnect in " << reconnectTimeout / 1000000 << " second(s)."); nextReconnectTime = SystemTime::getUsec() + reconnectTimeout; return createNullLogger(); } catch (const SystemException &e) { if (e.code() == ENOENT || isNetworkError(e.code())) { string errorResponse; bool gotErrorResponse; guard.clear(); gotErrorResponse = connection->disconnect(errorResponse); boost::lock_guard l(syncher); if (gotErrorResponse) { P_WARN("The logging agent at " << serverAddress << " closed the connection (error message: " << errorResponse << "); will reconnect in " << reconnectTimeout / 1000000 << " second(s)."); } else { P_WARN("The logging agent at " << serverAddress << " closed the connection (no error message given);" << " will reconnect in " << reconnectTimeout / 1000000 << " second(s)."); } nextReconnectTime = SystemTime::getUsec() + reconnectTimeout; return createNullLogger(); } else { throw; } } } LoggerPtr continueTransaction(const string &txnId, const string &groupName, const string &category = "requests", const string &unionStationKey = "-") { if (serverAddress.empty() || txnId.empty()) { return createNullLogger(); } char timestampStr[2 * sizeof(unsigned long long) + 1]; integerToHexatri(SystemTime::getUsec(), timestampStr); ConnectionPtr connection = checkoutConnection(); if (connection == NULL) { return createNullLogger(); } ConnectionLock cl(connection); ConnectionGuard guard(connection); try { unsigned long long timeout = 15000000; writeArrayMessage(connection->fd, &timeout, "openTransaction", txnId.c_str(), groupName.c_str(), "", category.c_str(), timestampStr, unionStationKey.c_str(), "true", NULL); guard.clear(); return boost::make_shared(shared_from_this(), connection, txnId, groupName, category, unionStationKey); } catch (const TimeoutException &) { boost::lock_guard l(syncher); P_WARN("Timeout trying to communicate with the logging agent at " << serverAddress << "; " << "will reconnect in " << reconnectTimeout / 1000000 << " second(s)."); nextReconnectTime = SystemTime::getUsec() + reconnectTimeout; return createNullLogger(); } catch (const SystemException &e) { if (e.code() == ENOENT || isNetworkError(e.code())) { string errorResponse; bool gotErrorResponse; guard.clear(); gotErrorResponse = connection->disconnect(errorResponse); boost::lock_guard l(syncher); if (gotErrorResponse) { P_WARN("The logging agent at " << serverAddress << " closed the connection (error message: " << errorResponse << "); will reconnect in " << reconnectTimeout / 1000000 << " second(s)."); } else { P_WARN("The logging agent at " << serverAddress << " closed the connection (no error message given);" << " will reconnect in " << reconnectTimeout / 1000000 << " second(s)."); } nextReconnectTime = SystemTime::getUsec() + reconnectTimeout; return createNullLogger(); } else { throw; } } } void setMaxConnectTries(unsigned int value) { boost::lock_guard l(syncher); maxConnectTries = value; } void setReconnectTimeout(unsigned long long usec) { boost::lock_guard l(syncher); reconnectTimeout = usec; } bool isNull() const { return serverAddress.empty(); } const string &getAddress() const { return serverAddress; } const string &getUsername() const { return username; } const string &getPassword() const { return password; } /** * @post !result.empty() */ const string &getNodeName() const { return nodeName; } }; inline void _checkinConnection(const LoggerFactoryPtr &loggerFactory, const ConnectionPtr &connection) { loggerFactory->checkinConnection(connection); } } // namespace UnionStation } // namespace Passenger #endif /* _PASSENGER_UNION_STATION_H_ */ passenger-4.0.37/ext/common/Utils/000755 000765 000024 00000000000 12233035540 017404 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/common/Utils.cpp000644 000765 000024 00000074037 12233035540 020123 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef __linux__ #include #include #endif #include #include #include #include #include #include #include #include #include #include #ifndef HOST_NAME_MAX #if defined(_POSIX_HOST_NAME_MAX) #define HOST_NAME_MAX _POSIX_HOST_NAME_MAX #elif defined(_SC_HOST_NAME_MAX) #define HOST_NAME_MAX sysconf(_SC_HOST_NAME_MAX) #else #define HOST_NAME_MAX 255 #endif #endif #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(__sun) // Introduced in Solaris 9. Let's hope nobody actually uses // a version that doesn't support this. #define HAS_CLOSEFROM #endif namespace Passenger { static string passengerTempDir; HttpHeaderBufferer::StaticData HttpHeaderBufferer::staticData; namespace { /** * Given a filename, FileGuard will unlink the file in its destructor, unless * commit() was called. Used in file operation functions that don't want to * leave behind half-finished files after error conditions. */ struct FileGuard { string filename; bool committed; FileGuard(const string &filename) { this->filename = filename; committed = false; } ~FileGuard() { if (!committed) { int ret; do { ret = unlink(filename.c_str()); } while (ret == -1 && errno == EINTR); } } void commit() { committed = true; } }; } bool fileExists(const StaticString &filename, CachedFileStat *cstat, unsigned int throttleRate) { return getFileType(filename, cstat, throttleRate) == FT_REGULAR; } FileType getFileType(const StaticString &filename, CachedFileStat *cstat, unsigned int throttleRate) { struct stat buf; int ret; if (cstat != NULL) { ret = cstat->stat(filename, &buf, throttleRate); } else { ret = stat(filename.c_str(), &buf); } if (ret == 0) { if (S_ISREG(buf.st_mode)) { return FT_REGULAR; } else if (S_ISDIR(buf.st_mode)) { return FT_DIRECTORY; } else { return FT_OTHER; } } else { if (errno == ENOENT) { return FT_NONEXISTANT; } else { int e = errno; string message("Cannot stat '"); message.append(filename); message.append("'"); throw FileSystemException(message, e, filename); } } } FileType getFileTypeNoFollowSymlinks(const StaticString &filename) { struct stat buf; int ret; ret = lstat(filename.c_str(), &buf); if (ret == 0) { if (S_ISREG(buf.st_mode)) { return FT_REGULAR; } else if (S_ISDIR(buf.st_mode)) { return FT_DIRECTORY; } else if (S_ISLNK(buf.st_mode)) { return FT_SYMLINK; } else { return FT_OTHER; } } else { if (errno == ENOENT) { return FT_NONEXISTANT; } else { int e = errno; string message("Cannot lstat '"); message.append(filename); message.append("'"); throw FileSystemException(message, e, filename); } } } void createFile(const string &filename, const StaticString &contents, mode_t permissions, uid_t owner, gid_t group, bool overwrite) { FileDescriptor fd; int ret, e, options; options = O_WRONLY | O_CREAT | O_TRUNC; if (!overwrite) { options |= O_EXCL; } do { fd = open(filename.c_str(), options, permissions); } while (fd == -1 && errno == EINTR); if (fd != -1) { FileGuard guard(filename); // The file permission may not be as expected because of the active // umask, so fchmod() it here to ensure correct permissions. do { ret = fchmod(fd, permissions); } while (ret == -1 && errno == EINTR); if (ret == -1) { e = errno; throw FileSystemException("Cannot set permissions on " + filename, e, filename); } if (owner != USER_NOT_GIVEN && group != GROUP_NOT_GIVEN) { if (owner == USER_NOT_GIVEN) { owner = (uid_t) -1; // Don't let fchown change file owner. } if (group == GROUP_NOT_GIVEN) { group = (gid_t) -1; // Don't let fchown change file group. } do { ret = fchown(fd, owner, group); } while (ret == -1 && errno == EINTR); if (ret == -1) { e = errno; throw FileSystemException("Cannot set ownership for " + filename, e, filename); } } try { writeExact(fd, contents); fd.close(); } catch (const SystemException &e) { throw FileSystemException("Cannot write to file " + filename, e.code(), filename); } guard.commit(); } else { e = errno; if (overwrite || e != EEXIST) { throw FileSystemException("Cannot create file " + filename, e, filename); } } } string canonicalizePath(const string &path) { #ifdef __GLIBC__ // We're using a GNU extension here. See the 'BUGS' // section of the realpath(3) Linux manpage for // rationale. char *tmp = realpath(path.c_str(), NULL); if (tmp == NULL) { int e = errno; string message; message = "Cannot resolve the path '"; message.append(path); message.append("'"); throw FileSystemException(message, e, path); } else { string result(tmp); free(tmp); return result; } #else char tmp[PATH_MAX]; if (realpath(path.c_str(), tmp) == NULL) { int e = errno; string message; message = "Cannot resolve the path '"; message.append(path); message.append("'"); throw FileSystemException(message, e, path); } else { return tmp; } #endif } string resolveSymlink(const StaticString &path) { char buf[PATH_MAX]; ssize_t size; size = readlink(path.c_str(), buf, sizeof(buf) - 1); if (size == -1) { if (errno == EINVAL) { return path; } else { int e = errno; string message = "Cannot resolve possible symlink '"; message.append(path.c_str(), path.size()); message.append("'"); throw FileSystemException(message, e, path); } } else { buf[size] = '\0'; if (buf[0] == '\0') { string message = "The file '"; message.append(path.c_str(), path.size()); message.append("' is a symlink, and it refers to an empty filename. This is not allowed."); throw FileSystemException(message, ENOENT, path); } else if (buf[0] == '/') { // Symlink points to an absolute path. return buf; } else { return extractDirName(path) + "/" + buf; } } } string extractDirName(const StaticString &path) { char *path_copy = strdup(path.c_str()); char *result = dirname(path_copy); string result_string(result); free(path_copy); return result_string; } StaticString extractDirNameStatic(const StaticString &path) { if (path.empty()) { return StaticString(".", 1); } const char *data = path.data(); const char *end = path.data() + path.size(); // Ignore trailing '/' characters. while (end > data && end[-1] == '/') { end--; } if (end == data) { // Apparently the entire path consists of slashes. return StaticString("/", 1); } // Find last '/'. end--; while (end > data && *end != '/') { end--; } if (end == data) { if (*data == '/') { // '/' found, but it's the first character in the path. return StaticString("/", 1); } else { // No '/' found in path. return StaticString(".", 1); } } else { // '/' found and it's not the first character in path. // 'end' points to that '/' character. // Skip to first non-'/' character. while (end >= data && *end == '/') { end--; } if (end < data) { // The entire path consists of '/' characters. return StaticString("/", 1); } else { return StaticString(data, end - data + 1); } } } string extractBaseName(const StaticString &path) { char *path_copy = strdup(path.c_str()); string result_string = basename(path_copy); free(path_copy); return result_string; } string escapeForXml(const string &input) { string result(input); string::size_type input_pos = 0; string::size_type input_end_pos = input.size(); string::size_type result_pos = 0; while (input_pos < input_end_pos) { const unsigned char ch = input[input_pos]; if ((ch >= 'A' && ch <= 'z') || (ch >= '0' && ch <= '9') || ch == '/' || ch == ' ' || ch == '_' || ch == '.' || ch == ':' || ch == '+' || ch == '-') { // This is an ASCII character. Ignore it and // go to next character. result_pos++; } else { // Not an ASCII character; escape it. char escapedCharacter[sizeof("ÿ") + 1]; int size; size = snprintf(escapedCharacter, sizeof(escapedCharacter) - 1, "&#%d;", (int) ch); if (size < 0) { throw std::bad_alloc(); } escapedCharacter[sizeof(escapedCharacter) - 1] = '\0'; result.replace(result_pos, 1, escapedCharacter, size); result_pos += size; } input_pos++; } return result; } string getProcessUsername() { struct passwd pwd, *result; char strings[1024]; int ret; result = (struct passwd *) NULL; do { ret = getpwuid_r(getuid(), &pwd, strings, sizeof(strings), &result); } while (ret == -1 && errno == EINTR); if (ret == -1) { result = (struct passwd *) NULL; } if (result == (struct passwd *) NULL || result->pw_name == NULL || result->pw_name[0] == '\0') { snprintf(strings, sizeof(strings), "UID %lld", (long long) getuid()); strings[sizeof(strings) - 1] = '\0'; return strings; } else { return result->pw_name; } } string getGroupName(gid_t gid) { struct group *groupEntry; groupEntry = getgrgid(gid); if (groupEntry == NULL) { return toString(gid); } else { return groupEntry->gr_name; } } gid_t lookupGid(const string &groupName) { struct group *groupEntry; groupEntry = getgrnam(groupName.c_str()); if (groupEntry == NULL) { if (looksLikePositiveNumber(groupName)) { return atoi(groupName); } else { return (gid_t) -1; } } else { return groupEntry->gr_gid; } } mode_t parseModeString(const StaticString &mode) { mode_t modeBits = 0; vector clauses; vector::iterator it; split(mode, ',', clauses); for (it = clauses.begin(); it != clauses.end(); it++) { const string &clause = *it; if (clause.empty()) { continue; } else if (clause.size() < 2 || (clause[0] != '+' && clause[1] != '=')) { throw InvalidModeStringException("Invalid mode clause specification '" + clause + "'"); } switch (clause[0]) { case 'u': for (string::size_type i = 2; i < clause.size(); i++) { switch (clause[i]) { case 'r': modeBits |= S_IRUSR; break; case 'w': modeBits |= S_IWUSR; break; case 'x': modeBits |= S_IXUSR; break; case 's': modeBits |= S_ISUID; break; default: throw InvalidModeStringException("Invalid permission '" + string(1, clause[i]) + "' in mode clause specification '" + clause + "'"); } } break; case 'g': for (string::size_type i = 2; i < clause.size(); i++) { switch (clause[i]) { case 'r': modeBits |= S_IRGRP; break; case 'w': modeBits |= S_IWGRP; break; case 'x': modeBits |= S_IXGRP; break; case 's': modeBits |= S_ISGID; break; default: throw InvalidModeStringException("Invalid permission '" + string(1, clause[i]) + "' in mode clause specification '" + clause + "'"); } } break; case 'o': for (string::size_type i = 2; i < clause.size(); i++) { switch (clause[i]) { case 'r': modeBits |= S_IROTH; break; case 'w': modeBits |= S_IWOTH; break; case 'x': modeBits |= S_IXOTH; break; default: throw InvalidModeStringException("Invalid permission '" + string(1, clause[i]) + "' in mode clause specification '" + clause + "'"); } } break; case '+': for (string::size_type i = 1; i < clause.size(); i++) { switch (clause[i]) { case 't': modeBits |= S_ISVTX; break; default: throw InvalidModeStringException("Invalid permission '" + string(1, clause[i]) + "' in mode clause specification '" + clause + "'"); } } break; default: throw InvalidModeStringException("Invalid owner '" + string(1, clause[0]) + "' in mode clause specification '" + clause + "'"); } } return modeBits; } string absolutizePath(const StaticString &path, const StaticString &workingDir) { vector components; if (!startsWith(path, "/")) { if (workingDir.empty()) { char buffer[PATH_MAX]; if (getcwd(buffer, sizeof(buffer)) == NULL) { int e = errno; throw SystemException("Unable to query current working directory", e); } split(buffer + 1, '/', components); } else { string absoluteWorkingDir = absolutizePath(workingDir); split(StaticString(absoluteWorkingDir.data() + 1, absoluteWorkingDir.size() - 1), '/', components); } } const char *begin = path.data(); const char *end = path.data() + path.size(); // Skip leading slashes. while (begin < end && *begin == '/') { begin++; } while (begin < end) { const char *next = (const char *) memchr(begin, '/', end - begin); if (next == NULL) { next = end; } StaticString component(begin, next - begin); if (component == "..") { if (!components.empty()) { components.pop_back(); } } else if (component != ".") { components.push_back(component); } // Skip slashes until beginning of next path component. begin = next + 1; while (begin < end && *begin == '/') { begin++; } } string result; vector::const_iterator c_it, c_end = components.end(); for (c_it = components.begin(); c_it != c_end; c_it++) { result.append("/"); result.append(*c_it); } if (result.empty()) { result = "/"; } return result; } const char * getSystemTempDir() { const char *temp_dir = getenv("PASSENGER_TEMP_DIR"); if (temp_dir == NULL || *temp_dir == '\0') { temp_dir = getenv("PASSENGER_TMPDIR"); if (temp_dir == NULL || *temp_dir == '\0') { temp_dir = "/tmp"; } } return temp_dir; } void makeDirTree(const string &path, const StaticString &mode, uid_t owner, gid_t group) { struct stat buf; vector paths; vector::reverse_iterator rit; string current = path; mode_t modeBits; int ret; if (stat(path.c_str(), &buf) == 0) { return; } modeBits = parseModeString(mode); /* Create a list of parent paths that don't exist. For example, given * path == "/a/b/c/d/e" and that only /a exists, the list will become * as follows: * * /a/b/c/d * /a/b/c * /a/b */ while (current != "/" && current != "." && getFileType(current) == FT_NONEXISTANT) { paths.push_back(current); current = extractDirName(current); } /* Now traverse the list in reverse order and create directories that don't exist. */ for (rit = paths.rbegin(); rit != paths.rend(); rit++) { current = *rit; do { ret = mkdir(current.c_str(), modeBits); } while (ret == -1 && errno == EINTR); if (ret == -1) { if (errno == EEXIST) { // Ignore error and don't chmod/chown. continue; } else { int e = errno; throw FileSystemException("Cannot create directory '" + current + "'", e, current); } } /* Chmod in order to override the umask. */ do { ret = chmod(current.c_str(), modeBits); } while (ret == -1 && errno == EINTR); if (owner != USER_NOT_GIVEN && group != GROUP_NOT_GIVEN) { if (owner == USER_NOT_GIVEN) { owner = (uid_t) -1; // Don't let chown change file owner. } if (group == GROUP_NOT_GIVEN) { group = (gid_t) -1; // Don't let chown change file group. } do { ret = chown(current.c_str(), owner, group); } while (ret == -1 && errno == EINTR); if (ret == -1) { char message[1024]; int e = errno; snprintf(message, sizeof(message) - 1, "Cannot change the directory '%s' its UID to %lld and GID to %lld", current.c_str(), (long long) owner, (long long) group); message[sizeof(message) - 1] = '\0'; throw FileSystemException(message, e, path); } } } } void removeDirTree(const string &path) { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; const char *c_path = path.c_str(); pid_t pid; pid = syscalls::fork(); if (pid == 0) { resetSignalHandlersAndMask(); disableMallocDebugging(); int devnull = open("/dev/null", O_RDONLY); if (devnull != -1) { dup2(devnull, 2); } closeAllFileDescriptors(2); execlp("chmod", "chmod", "-R", "u+rwx", c_path, (char * const) 0); perror("Cannot execute chmod"); _exit(1); } else if (pid == -1) { int e = errno; throw SystemException("Cannot fork a new process", e); } else { this_thread::restore_interruption ri(di); this_thread::restore_syscall_interruption rsi(dsi); syscalls::waitpid(pid, NULL, 0); } pid = syscalls::fork(); if (pid == 0) { resetSignalHandlersAndMask(); disableMallocDebugging(); closeAllFileDescriptors(2); execlp("rm", "rm", "-rf", c_path, (char * const) 0); perror("Cannot execute rm"); _exit(1); } else if (pid == -1) { int e = errno; throw SystemException("Cannot fork a new process", e); } else { this_thread::restore_interruption ri(di); this_thread::restore_syscall_interruption rsi(dsi); int status; if (syscalls::waitpid(pid, &status, 0) == -1 || status != 0) { throw RuntimeException("Cannot remove directory '" + path + "'"); } } } void prestartWebApps(const ResourceLocator &locator, const string &ruby, const vector &prestartURLs) { /* Apache calls the initialization routines twice during startup, and * as a result it starts two helper servers, where the first one exits * after a short idle period. We want any prespawning requests to reach * the second helper server, so we sleep for a short period before * executing the prespawning scripts. */ syscalls::sleep(2); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; vector::const_iterator it; string prespawnScript = locator.getHelperScriptsDir() + "/prespawn"; it = prestartURLs.begin(); while (it != prestartURLs.end() && !this_thread::interruption_requested()) { if (it->empty()) { it++; continue; } pid_t pid; pid = fork(); if (pid == 0) { long max_fds, i; int e; // Close all unnecessary file descriptors. max_fds = sysconf(_SC_OPEN_MAX); for (i = 3; i < max_fds; i++) { syscalls::close(i); } execlp(ruby.c_str(), ruby.c_str(), prespawnScript.c_str(), it->c_str(), (char *) 0); e = errno; fprintf(stderr, "Cannot execute '%s %s': %s (%d)\n", prespawnScript.c_str(), it->c_str(), strerror(e), e); fflush(stderr); _exit(1); } else if (pid == -1) { perror("fork()"); } else { try { this_thread::restore_interruption si(di); this_thread::restore_syscall_interruption ssi(dsi); syscalls::waitpid(pid, NULL, 0); } catch (const thread_interrupted &) { syscalls::kill(SIGKILL, pid); syscalls::waitpid(pid, NULL, 0); throw; } } this_thread::restore_interruption si(di); this_thread::restore_syscall_interruption ssi(dsi); syscalls::sleep(1); it++; } } void runAndPrintExceptions(const boost::function &func, bool toAbort) { try { func(); } catch (const boost::thread_interrupted &) { throw; } catch (const tracable_exception &e) { P_ERROR("Exception: " << e.what() << "\n" << e.backtrace()); if (toAbort) { abort(); } } } void runAndPrintExceptions(const boost::function &func) { runAndPrintExceptions(func, true); } string getHostName() { long hostNameMax = HOST_NAME_MAX; if (hostNameMax < 255) { // https://bugzilla.redhat.com/show_bug.cgi?id=130733 hostNameMax = 255; } string buf(hostNameMax + 1, '\0'); if (gethostname(&buf[0], hostNameMax + 1) == 0) { buf[hostNameMax] = '\0'; return string(buf.c_str()); } else { int e = errno; throw SystemException("Unable to query the system's host name", e); } } string getSignalName(int sig) { switch (sig) { case SIGHUP: return "SIGHUP"; case SIGINT: return "SIGINT"; case SIGQUIT: return "SIGQUIT"; case SIGILL: return "SIGILL"; case SIGTRAP: return "SIGTRAP"; case SIGABRT: return "SIGABRT"; case SIGFPE: return "SIGFPE"; case SIGKILL: return "SIGKILL"; case SIGBUS: return "SIGBUS"; case SIGSEGV: return "SIGSEGV"; case SIGPIPE: return "SIGPIPE"; case SIGALRM: return "SIGARLM"; case SIGTERM: return "SIGTERM"; case SIGUSR1: return "SIGUSR1"; case SIGUSR2: return "SIGUSR2"; #ifdef SIGEMT case SIGEMT: return "SIGEMT"; #endif #ifdef SIGINFO case SIGINFO: return "SIGINFO"; #endif default: return toString(sig); } } void resetSignalHandlersAndMask() { sigset_t signal_set; int ret; sigemptyset(&signal_set); do { ret = sigprocmask(SIG_SETMASK, &signal_set, NULL); } while (ret == -1 && errno == EINTR); struct sigaction action; action.sa_handler = SIG_DFL; action.sa_flags = SA_RESTART; sigemptyset(&action.sa_mask); sigaction(SIGHUP, &action, NULL); sigaction(SIGINT, &action, NULL); sigaction(SIGQUIT, &action, NULL); sigaction(SIGILL, &action, NULL); sigaction(SIGTRAP, &action, NULL); sigaction(SIGABRT, &action, NULL); #ifdef SIGEMT sigaction(SIGEMT, &action, NULL); #endif sigaction(SIGFPE, &action, NULL); sigaction(SIGBUS, &action, NULL); sigaction(SIGSEGV, &action, NULL); sigaction(SIGSYS, &action, NULL); sigaction(SIGPIPE, &action, NULL); sigaction(SIGALRM, &action, NULL); sigaction(SIGTERM, &action, NULL); sigaction(SIGURG, &action, NULL); sigaction(SIGSTOP, &action, NULL); sigaction(SIGTSTP, &action, NULL); sigaction(SIGCONT, &action, NULL); sigaction(SIGCHLD, &action, NULL); #ifdef SIGINFO sigaction(SIGINFO, &action, NULL); #endif sigaction(SIGUSR1, &action, NULL); sigaction(SIGUSR2, &action, NULL); } void disableMallocDebugging() { unsetenv("MALLOC_FILL_SPACE"); unsetenv("MALLOC_PROTECT_BEFORE"); unsetenv("MallocGuardEdges"); unsetenv("MallocScribble"); unsetenv("MallocPreScribble"); unsetenv("MallocCheckHeapStart"); unsetenv("MallocCheckHeapEach"); unsetenv("MallocCheckHeapAbort"); unsetenv("MallocBadFreeAbort"); unsetenv("MALLOC_CHECK_"); const char *libs = getenv("DYLD_INSERT_LIBRARIES"); if (libs != NULL && strstr(libs, "/usr/lib/libgmalloc.dylib")) { string newLibs = libs; string::size_type pos = newLibs.find("/usr/lib/libgmalloc.dylib"); size_t len = strlen("/usr/lib/libgmalloc.dylib"); // Erase all leading ':' too. while (pos > 0 && newLibs[pos - 1] == ':') { pos--; len++; } // Erase all trailing ':' too. while (pos + len < newLibs.size() && newLibs[pos + len] == ':') { len++; } newLibs.erase(pos, len); if (newLibs.empty()) { unsetenv("DYLD_INSERT_LIBRARIES"); } else { setenv("DYLD_INSERT_LIBRARIES", newLibs.c_str(), 1); } } } int runShellCommand(const StaticString &command) { pid_t pid = fork(); if (pid == 0) { resetSignalHandlersAndMask(); disableMallocDebugging(); closeAllFileDescriptors(2); execlp("/bin/sh", "/bin/sh", "-c", command.data(), (char * const) 0); _exit(1); } else if (pid == -1) { return -1; } else { int status; if (waitpid(pid, &status, 0) == -1) { return -1; } else { return status; } } } #ifdef __APPLE__ // http://www.opensource.apple.com/source/Libc/Libc-825.26/sys/fork.c // This bypasses atfork handlers. extern "C" { extern pid_t __fork(void); } #endif pid_t asyncFork() { #if defined(__linux__) #if defined(SYS_fork) return (pid_t) syscall(SYS_fork); #else return syscall(SYS_clone, SIGCHLD, 0, 0, 0, 0); #endif #elif defined(__APPLE__) return __fork(); #else return fork(); #endif } // Async-signal safe way to get the current process's hard file descriptor limit. static int getFileDescriptorLimit() { long long sysconfResult = sysconf(_SC_OPEN_MAX); struct rlimit rl; long long rlimitResult; if (getrlimit(RLIMIT_NOFILE, &rl) == -1) { rlimitResult = 0; } else { rlimitResult = (long long) rl.rlim_max; } long result; if (sysconfResult > rlimitResult) { result = sysconfResult; } else { result = rlimitResult; } if (result < 0) { // Both calls returned errors. result = 9999; } else if (result < 2) { // The calls reported broken values. result = 2; } return result; } // Async-signal safe function to get the highest file // descriptor that the process is currently using. // See also http://stackoverflow.com/questions/899038/getting-the-highest-allocated-file-descriptor static int getHighestFileDescriptor() { #if defined(F_MAXFD) int ret; do { ret = fcntl(0, F_MAXFD); } while (ret == -1 && errno == EINTR); if (ret == -1) { ret = getFileDescriptorLimit(); } return ret; #else int p[2], ret, flags; pid_t pid = -1; int result = -1; /* Since opendir() may not be async signal safe and thus may lock up * or crash, we use it in a child process which we kill if we notice * that things are going wrong. */ // Make a pipe. p[0] = p[1] = -1; do { ret = pipe(p); } while (ret == -1 && errno == EINTR); if (ret == -1) { goto done; } // Make the read side non-blocking. do { flags = fcntl(p[0], F_GETFL); } while (flags == -1 && errno == EINTR); if (flags == -1) { goto done; } do { fcntl(p[0], F_SETFL, flags | O_NONBLOCK); } while (ret == -1 && errno == EINTR); if (ret == -1) { goto done; } do { pid = asyncFork(); } while (pid == -1 && errno == EINTR); if (pid == 0) { // Don't close p[0] here or it might affect the result. resetSignalHandlersAndMask(); struct sigaction action; action.sa_handler = _exit; action.sa_flags = SA_RESTART; sigemptyset(&action.sa_mask); sigaction(SIGSEGV, &action, NULL); sigaction(SIGPIPE, &action, NULL); sigaction(SIGBUS, &action, NULL); sigaction(SIGILL, &action, NULL); sigaction(SIGFPE, &action, NULL); sigaction(SIGABRT, &action, NULL); DIR *dir = NULL; #ifdef __APPLE__ /* /dev/fd can always be trusted on OS X. */ dir = opendir("/dev/fd"); #else /* On FreeBSD and possibly other operating systems, /dev/fd only * works if fdescfs is mounted. If it isn't mounted then /dev/fd * still exists but always returns [0, 1, 2] and thus can't be * trusted. If /dev and /dev/fd are on different filesystems * then that probably means fdescfs is mounted. */ struct stat dirbuf1, dirbuf2; if (stat("/dev", &dirbuf1) == -1 || stat("/dev/fd", &dirbuf2) == -1) { _exit(1); } if (dirbuf1.st_dev != dirbuf2.st_dev) { dir = opendir("/dev/fd"); } #endif if (dir == NULL) { dir = opendir("/proc/self/fd"); if (dir == NULL) { _exit(1); } } struct dirent *ent; union { int highest; char data[sizeof(int)]; } u; u.highest = -1; while ((ent = readdir(dir)) != NULL) { if (ent->d_name[0] != '.') { int number = atoi(ent->d_name); if (number > u.highest) { u.highest = number; } } } if (u.highest != -1) { ssize_t ret, written = 0; do { ret = write(p[1], u.data + written, sizeof(int) - written); if (ret == -1) { _exit(1); } written += ret; } while (written < (ssize_t) sizeof(int)); } closedir(dir); _exit(0); } else if (pid == -1) { goto done; } else { close(p[1]); // Do not retry on EINTR: http://news.ycombinator.com/item?id=3363819 p[1] = -1; union { int highest; char data[sizeof(int)]; } u; ssize_t ret, bytesRead = 0; struct pollfd pfd; pfd.fd = p[0]; pfd.events = POLLIN; do { do { // The child process must finish within 30 ms, otherwise // we might as well query sysconf. ret = poll(&pfd, 1, 30); } while (ret == -1 && errno == EINTR); if (ret <= 0) { goto done; } do { ret = read(p[0], u.data + bytesRead, sizeof(int) - bytesRead); } while (ret == -1 && ret == EINTR); if (ret == -1) { if (errno != EAGAIN) { goto done; } } else if (ret == 0) { goto done; } else { bytesRead += ret; } } while (bytesRead < (ssize_t) sizeof(int)); result = u.highest; goto done; } done: // Do not retry on EINTR: http://news.ycombinator.com/item?id=3363819 if (p[0] != -1) { close(p[0]); } if (p[1] != -1) { close(p[1]); } if (pid != -1) { do { ret = kill(pid, SIGKILL); } while (ret == -1 && errno == EINTR); do { ret = waitpid(pid, NULL, 0); } while (ret == -1 && errno == EINTR); } if (result == -1) { result = getFileDescriptorLimit(); } return result; #endif } void closeAllFileDescriptors(int lastToKeepOpen) { #if defined(F_CLOSEM) int ret; do { ret = fcntl(lastToKeepOpen + 1, F_CLOSEM); } while (ret == -1 && errno == EINTR); if (ret != -1) { return; } #elif defined(HAS_CLOSEFROM) closefrom(lastToKeepOpen + 1); return; #endif for (int i = getHighestFileDescriptor(); i > lastToKeepOpen; i--) { /* Even though we normally shouldn't retry on EINTR * (http://news.ycombinator.com/item?id=3363819) * it's okay to do that here because because this function * may only be called in a single-threaded environment. */ int ret; do { ret = close(i); } while (ret == -1 && errno == EINTR); } } void breakpoint() { // No-op. } } // namespace Passenger passenger-4.0.37/ext/common/Utils.h000644 000765 000024 00000040237 12233035540 017563 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_UTILS_H_ #define _PASSENGER_UTILS_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; #define foreach BOOST_FOREACH #define reverse_foreach BOOST_REVERSE_FOREACH static const uid_t USER_NOT_GIVEN = (uid_t) -1; static const gid_t GROUP_NOT_GIVEN = (gid_t) -1; class CachedFileStat; class ResourceLocator; /** Enumeration which indicates what kind of file a file is. */ typedef enum { /** The file doesn't exist. */ FT_NONEXISTANT, /** A regular file or a symlink to a regular file. */ FT_REGULAR, /** A directory. */ FT_DIRECTORY, /** A symlink. Only returned by getFileTypeNoFollowSymlinks(), not by getFileType(). */ FT_SYMLINK, /** Something else, e.g. a pipe or a socket. */ FT_OTHER } FileType; /** * Convenience shortcut for creating a shared_ptr. * Instead of: * @code * boost::shared_ptr foo; * ... * foo = boost::shared_ptr(new Foo()); * @endcode * one can write: * @code * boost::shared_ptr foo; * ... * foo = ptr(new Foo()); * @endcode * * @param pointer The item to put in the boost::shared_ptr object. * @ingroup Support */ template boost::shared_ptr ptr(T *pointer) { return boost::shared_ptr(pointer); } /** * Check whether the specified file exists. * * @param filename The filename to check. * @param cstat A CachedFileStat object, if you want to use cached statting. * @param throttleRate A throttle rate for cstat. Only applicable if cstat is not NULL. * @return Whether the file exists. * @throws FileSystemException Unable to check because of a filesystem error. * @throws TimeRetrievalException * @throws boost::thread_interrupted * @ingroup Support */ bool fileExists(const StaticString &filename, CachedFileStat *cstat = 0, unsigned int throttleRate = 0); /** * Check whether 'filename' exists and what kind of file it is. * * @param filename The filename to check. It MUST be NULL-terminated. * @param mstat A CachedFileStat object, if you want to use cached statting. * @param throttleRate A throttle rate for cstat. Only applicable if cstat is not NULL. * @return The file type. * @throws FileSystemException Unable to check because of a filesystem error. * @throws TimeRetrievalException * @throws boost::thread_interrupted * @ingroup Support */ FileType getFileType(const StaticString &filename, CachedFileStat *cstat = 0, unsigned int throttleRate = 0); /** * Like getFileType(), but does not follow symlinks. */ FileType getFileTypeNoFollowSymlinks(const StaticString &filename); /** * Create the given file with the given contents, permissions and ownership. * This function does not leave behind junk files: if the ownership cannot be set * or if not all data can be written then then the file will be deleted. * * @param filename The file to create. * @param contents The contents to write to the file. * @param permissions The desired file permissions. * @param owner The desired file owner. Specify USER_NOT_GIVEN if you want to use the current * process's owner as the file owner. * @param group The desired file group. Specify GROUP_NOT_GIVEN if you want to use the current * process's group as the file group. * @param overwrite Whether to overwrite the file if it exists. If set to false * and the file exists then nothing will happen. * @throws FileSystemException Something went wrong. * @ingroup Support */ void createFile(const string &filename, const StaticString &contents, mode_t permissions = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, uid_t owner = USER_NOT_GIVEN, gid_t group = GROUP_NOT_GIVEN, bool overwrite = true); /** * Returns a canonical version of the specified path. All symbolic links * and relative path elements are resolved. * * @throws FileSystemException Something went wrong. * @ingroup Support */ string canonicalizePath(const string &path); /** * If path refers to a symlink, then this function resolves the * symlink for 1 level. That is, if the symlink points to another symlink, * then the other symlink will not be resolved. The resolved path is returned. * * If the symlink doesn't point to an absolute path, then this function will * prepend path's directory to the result. * * If path doesn't refer to a symlink then this method will return * path. * * path MUST be null-terminated! * * @throws FileSystemException Something went wrong. * @ingroup Support */ string resolveSymlink(const StaticString &path); /** * Given a path, extracts its directory name. * path MUST be null-terminated! * * @ingroup Support */ string extractDirName(const StaticString &path); /** * Given a path, extracts its directory name. This version does not use * any dynamically allocated storage and does not require `path` to be * NULL-terminated. It returns a StaticString that points either to static * storage, or to a substring of `path`. */ StaticString extractDirNameStatic(const StaticString &path); /** * Given a path, extracts its base name. * path MUST be null-terminated! * * @ingroup Support */ string extractBaseName(const StaticString &path); /** * Escape the given raw string into an XML value. * * @throws std::bad_alloc Something went wrong. * @ingroup Support */ string escapeForXml(const string &input); /** * Returns the username of the user that the current process is running as. * If the user has no associated username, then "UID xxxx" is returned, * where xxxx is the current UID. */ string getProcessUsername(); /** * Returns either the group name for the given GID, or (if the group name * couldn't be looked up) a string representation of the given GID. */ string getGroupName(gid_t gid); /** * Given a `groupName` which is either the name of a group, or a string * containing the GID of a group, looks up the GID as a gid_t. * * Returns `(gid_t) -1` if the lookup fails. */ gid_t lookupGid(const string &groupName); /** * Converts a mode string into a mode_t value. * * At this time only the symbolic mode strings are supported, e.g. something like looks * this: "u=rwx,g=w,o=rx". The grammar is as follows: * @code * mode ::= (clause ("," clause)*)? * clause ::= who "=" permission* * who ::= "u" | "g" | "o" * permission ::= "r" | "w" | "x" | "s" * @endcode * * Notes: * - The mode value starts with 0. So if you specify "u=rwx", then the group and world * permissions will be empty (set to 0). * - The "s" permission is only allowed for who == "u" or who == "g". * - The return value does not depend on the umask. * * @throws InvalidModeStringException The mode string cannot be parsed. */ mode_t parseModeString(const StaticString &mode); /** * Turns the given path into an absolute path. Unlike realpath(), this function does * not resolve symlinks. * * @throws SystemException */ string absolutizePath(const StaticString &path, const StaticString &workingDir = StaticString()); /** * Return the path name for the directory in which the system stores general * temporary files. This is usually "/tmp", but might be something else depending * on some environment variables. * * @ensure result != NULL * @ingroup Support */ const char *getSystemTempDir(); /* Create a temporary directory for storing Phusion Passenger instance-specific * temp files, such as temporarily buffered uploads, sockets for backend * processes, etc. * The directory that will be created is the one returned by * getPassengerTempDir(false, parentDir). This call stores the path to * this temp directory in an internal variable, so that subsequent calls to * getPassengerTempDir() will return the same path. * * The created temp directory will have several subdirectories: * - webserver_private - for storing the web server's buffered uploads. * - info - for storing files that allow external tools to query information * about a running Phusion Passenger instance. * - backends - for storing Unix sockets created by backend processes. * - master - for storing files such as the Passenger HelperServer socket. * * If a (sub)directory already exists, then it will not result in an error. * * The userSwitching and lowestUser arguments passed to * this method are used for determining the optimal permissions for the * (sub)directories. The permissions will be set as tightly as possible based * on the values. The workerUid and workerGid arguments * will be used for determining the owner of certain subdirectories. * * @note You should only call this method inside the web server's master * process. In case of Apache, this is the Apache control process, * the one that tends to run as root. This is because this function * will set directory permissions and owners/groups, which may require * root privileges. * * @param parentDir The directory under which the Phusion Passenger-specific * temp directory should be created. This argument may be the * empty string, in which case getSystemTempDir() will be used * as the parent directory. * @param userSwitching Whether user switching is turned on. * @param lowestUser The user that the spawn manager and the pool server will * run as, if user switching is turned off. * @param workerUid The UID that the web server's worker processes are running * as. On Apache, this is the UID that's associated with the * 'User' directive. * @param workerGid The GID that the web server's worker processes are running * as. On Apache, this is the GID that's associated with the * 'Group' directive. * @throws IOException Something went wrong. * @throws SystemException Something went wrong. * @throws FileSystemException Something went wrong. */ /* void createPassengerTempDir(const string &parentDir, bool userSwitching, const string &lowestUser, uid_t workerUid, gid_t workerGid); */ /** * Create the directory at the given path, creating intermediate directories * if necessary. The created directories' permissions are exactly as specified * by the 'mode' parameter (i.e. the umask will be ignored). You can specify * this directory's owner and group through the 'owner' and 'group' parameters. * A value of USER_NOT_GIVEN for 'owner' and/or GROUP_NOT_GIVEN 'group' means * that the owner/group should not be changed. * * If 'path' already exists, then nothing will happen. * * @param mode A mode string, as supported by parseModeString(). * @throws FileSystemException Something went wrong. * @throws InvalidModeStringException The mode string cannot be parsed. */ void makeDirTree(const string &path, const StaticString &mode = "u=rwx,g=,o=", uid_t owner = USER_NOT_GIVEN, gid_t group = GROUP_NOT_GIVEN); /** * Remove an entire directory tree recursively. If the directory doesn't exist then this * function does nothing. * * @throws RuntimeException Something went wrong. */ void removeDirTree(const string &path); void prestartWebApps(const ResourceLocator &locator, const string &ruby, const vector &prestartURLs); /** * Runs the given function and catches any tracable_exceptions. Upon catching such an exception, * its message and backtrace will be printed. If toAbort is true then it will call abort(), * otherwise the exception is swallowed. * thread_interrupted and all other exceptions are silently propagated. */ void runAndPrintExceptions(const boost::function &func, bool toAbort); void runAndPrintExceptions(const boost::function &func); /** * Returns the system's host name. * * @throws SystemException The host name cannot be retrieved. */ string getHostName(); /** * Convert a signal number to its associated name. */ string getSignalName(int sig); /** * Resets the current process's signal handler disposition and signal mask * to default values. One should call this every time one forks a child process; * non-default signal masks/handler dispositions can cause all kinds of weird quirks, * like waitpid() malfunctioning on OS X. * * This function is async-signal safe. */ void resetSignalHandlersAndMask(); /** * Disables malloc() debugging facilities on OS X. */ void disableMallocDebugging(); /** * Like system(), but properly resets the signal handler mask, * disables malloc debugging and closes file descriptors > 2. * _command_ must be null-terminated. */ int runShellCommand(const StaticString &command); /** * Async-signal safe way to fork(). * * On Linux, the fork() glibc wrapper grabs a ptmalloc lock, so * if malloc causes a segfault then we can't fork. * http://sourceware.org/bugzilla/show_bug.cgi?id=4737 * * OS X apparently does something similar, except they use a * spinlock so it results in 100% CPU. See _cthread_fork_prepare() * at http://www.opensource.apple.com/source/Libc/Libc-166/threads.subproj/cthreads.c */ pid_t asyncFork(); /** * Close all file descriptors that are higher than lastToKeepOpen. * This function is async-signal safe. But make sure there are no other * threads running that might open file descriptors! */ void closeAllFileDescriptors(int lastToKeepOpen); /** * A no-op, but usually set as a breakpoint in gdb. See CONTRIBUTING.md. */ void breakpoint(); /** * Represents a buffered upload file. * * @ingroup Support */ class BufferedUpload { public: /** The file handle. */ FILE *handle; /** * Create an empty upload bufer file, and open it for reading and writing. * * @throws SystemException Something went wrong. */ BufferedUpload(const string &dir, const char *identifier = "temp") { char templ[PATH_MAX]; int fd; snprintf(templ, sizeof(templ), "%s/%s.XXXXXX", dir.c_str(), identifier); templ[sizeof(templ) - 1] = '\0'; fd = lfs_mkstemp(templ); if (fd == -1) { char message[1024]; int e = errno; snprintf(message, sizeof(message), "Cannot create a temporary file '%s'", templ); message[sizeof(message) - 1] = '\0'; throw SystemException(message, e); } /* We use a POSIX trick here: the file's permissions are set to "u=,g=,o=" * and the file is deleted immediately from the filesystem, while we * keep its file handle open. The result is that no other processes * will be able to access this file's contents anymore, except us. * We now have an anonymous disk-backed buffer. */ fchmod(fd, 0000); unlink(templ); handle = fdopen(fd, "w+"); } ~BufferedUpload() { fclose(handle); } }; } // namespace Passenger #endif /* _PASSENGER_UTILS_H_ */ passenger-4.0.37/ext/common/Utils/AnsiColorConstants.h000644 000765 000024 00000003151 12233035540 023343 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_ANSI_COLOR_CONSTANTS_H_ #define ANSI_COLOR_RESET "\e[0m" #define ANSI_COLOR_BOLD "\e[1m" #define ANSI_COLOR_RED "\e[31m" #define ANSI_COLOR_GREEN "\e[32m" #define ANSI_COLOR_YELLOW "\e[33m" #define ANSI_COLOR_WHITE "\e[37m" #define ANSI_COLOR_BLACK_BG "\e[40m" #define ANSI_COLOR_BLUE_BG "\e[44m" #endif /* _PASSENGER_ANSI_COLOR_CONSTANTS_H_ */ passenger-4.0.37/ext/common/Utils/Base64.cpp000644 000765 000024 00000010150 12233035540 021131 0ustar00honglistaff000000 000000 /* * Base64 encoding and decoding routines * * Copyright (C) 2004-2008 RenĂ© Nyffenegger * Modified by Phusion for inclusion in Phusion Passenger. * * This source code is provided 'as-is', without any express or implied * warranty. In no event will the author be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this source code must not be misrepresented; you must not * claim that you wrote the original source code. If you use this source code * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original source code. * * 3. This notice may not be removed or altered from any source distribution. * * RenĂ© Nyffenegger rene.nyffenegger@adp-gmbh.ch * */ #include #include "Base64.h" namespace Passenger { static const std::string base64_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789+/"; static inline bool is_base64(unsigned char c) { return isalnum(c) || c == '+' || c == '/'; } string Base64::encode(const unsigned char *bytes_to_encode, unsigned int in_len) { std::string ret; int i = 0; int j = 0; unsigned char char_array_3[3]; unsigned char char_array_4[4]; // According to Wikipedia, base64-encoded data is usually 137% // + 814 bytes larger than the original. Here we reserve a little // more than that to avoid memory reallocations. ret.reserve((std::string::size_type) (in_len * 1.37) + 1024); while (in_len--) { char_array_3[i++] = *(bytes_to_encode++); if (i == 3) { char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); char_array_4[3] = char_array_3[2] & 0x3f; for(i = 0; i < 4; i++) { ret += base64_chars[char_array_4[i]]; } i = 0; } } if (i) { for(j = i; j < 3; j++) char_array_3[j] = '\0'; char_array_4[0] = (char_array_3[0] & 0xfc) >> 2; char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4); char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6); char_array_4[3] = char_array_3[2] & 0x3f; for (j = 0; (j < i + 1); j++) ret += base64_chars[char_array_4[j]]; while((i++ < 3)) ret += '='; } return ret; } std::string Base64::decode(const unsigned char *base64_data, unsigned int in_len) { int i = 0; int j = 0; int in_ = 0; unsigned char char_array_4[4], char_array_3[3]; std::string ret; unsigned int reserved_size; // The decoded data should be about this large. if (in_len > 814) { reserved_size = (unsigned int) ((in_len - 814) / 137.0) * 100; } else { reserved_size = in_len; } ret.reserve(reserved_size); while (in_len-- && ( base64_data[in_] != '=') && is_base64(base64_data[in_])) { char_array_4[i++] = base64_data[in_]; in_++; if (i == 4) { for (i = 0; i <4; i++) char_array_4[i] = base64_chars.find(char_array_4[i]); char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; for (i = 0; i < 3; i++) ret += char_array_3[i]; i = 0; } } if (i) { for (j = i; j <4; j++) char_array_4[j] = 0; for (j = 0; j <4; j++) char_array_4[j] = base64_chars.find(char_array_4[j]); char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4); char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2); char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3]; for (j = 0; (j < i - 1); j++) ret += char_array_3[j]; } return ret; } } // namespace Passenger passenger-4.0.37/ext/common/Utils/Base64.h000644 000765 000024 00000004420 12233035540 020601 0ustar00honglistaff000000 000000 /* * Base64 encoding and decoding routines * * Copyright (C) 2004-2008 RenĂ© Nyffenegger * Modified by Phusion for inclusion in Phusion Passenger. * * This source code is provided 'as-is', without any express or implied * warranty. In no event will the author be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this source code must not be misrepresented; you must not * claim that you wrote the original source code. If you use this source code * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original source code. * * 3. This notice may not be removed or altered from any source distribution. * * RenĂ© Nyffenegger rene.nyffenegger@adp-gmbh.ch * */ #ifndef _PASSENGER_BASE64_H_ #define _PASSENGER_BASE64_H_ #include #include #include "../StaticString.h" namespace Passenger { using namespace std; class Base64 { public: static string encode(const StaticString &data) { return encode((const unsigned char *) data.data(), data.size()); } /** Encode using a modified Base64 format, suitable for inclusion in URLs without * needing escaping. */ static string encodeForUrl(const StaticString &data) { string result = encode(data); string::size_type i; int paddingSize = 0; for (i = 0; i < result.size(); i++) { char c = result[i]; if (c == '+') { result[i] = '-'; } else if (c == '/') { result[i] = '_'; } else if (c == '=') { paddingSize++; } } if (paddingSize > 0) { result.resize(result.size() - paddingSize); } return result; } static string decode(const StaticString &base64_data) { return decode((const unsigned char *) base64_data.data(), base64_data.size()); } static string encode(const unsigned char *data, unsigned int len); static string decode(const unsigned char *base64_data, unsigned int len); }; } // namespace Passenger #endif /* _PASSENGER_BASE64_H_ */ passenger-4.0.37/ext/common/Utils/BCrypt.cpp000644 000765 000024 00000022124 12233035540 021314 0ustar00honglistaff000000 000000 /* $OpenBSD: bcrypt.c,v 1.22 2007/02/20 01:44:16 ray Exp $ */ /* * Modified by on 2009-10-24: * * - Made some code compilable in C++. * * Modified by on 2009-08-05: * * - Got rid of the global variables; they're not thread-safe. * Modified the functions to accept local buffers instead. * * Modified by on 2007-02-27: * * - Changed bcrypt_gensalt to accept a random seed as a parameter, * to remove the code's dependency on arc4random(), which isn't * available on Linux. */ /* * Copyright 1997 Niels Provos * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Niels Provos. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* This password hashing algorithm was designed by David Mazieres * and works as follows: * * 1. state := InitState () * 2. state := ExpandKey (state, salt, password) 3. * REPEAT rounds: * state := ExpandKey (state, 0, salt) * state := ExpandKey(state, 0, password) * 4. ctext := "OrpheanBeholderScryDoubt" * 5. REPEAT 64: * ctext := Encrypt_ECB (state, ctext); * 6. RETURN Concatenate (salt, ctext); * */ #if 0 #include #endif #define IN_PASSENGER_BCRYPT_C #include #include #include #include #include "BCrypt.h" #include "Blowfish.h" #include "Blowfish.c" #define BCRYPT_VERSION '2' #define BCRYPT_BLOCKS 6 /* Ciphertext blocks */ #define BCRYPT_MINROUNDS 16 /* we have log2(rounds) in salt */ /* This implementation is adaptable to current computing power. * You can have up to 2^31 rounds which should be enough for some * time to come. */ static void encode_salt(char *, u_int8_t *, u_int16_t, unsigned int); static void encode_base64(u_int8_t *, u_int8_t *, u_int16_t); static void decode_base64(u_int8_t *, u_int16_t, u_int8_t *); const static u_int8_t Base64Code[] = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; const static u_int8_t index_64[128] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 1, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 255, 255, 255, 255, 255, 255, 255, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 255, 255, 255, 255, 255, 255, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 255, 255, 255, 255, 255 }; #define CHAR64(c) ( (c) > 127 ? 255 : index_64[(c)]) static void decode_base64(u_int8_t *buffer, u_int16_t len, u_int8_t *data) { u_int8_t *bp = buffer; u_int8_t *p = data; u_int8_t c1, c2, c3, c4; while (bp < buffer + len) { c1 = CHAR64(*p); c2 = CHAR64(*(p + 1)); /* Invalid data */ if (c1 == 255 || c2 == 255) break; *bp++ = (c1 << 2) | ((c2 & 0x30) >> 4); if (bp >= buffer + len) break; c3 = CHAR64(*(p + 2)); if (c3 == 255) break; *bp++ = ((c2 & 0x0f) << 4) | ((c3 & 0x3c) >> 2); if (bp >= buffer + len) break; c4 = CHAR64(*(p + 3)); if (c4 == 255) break; *bp++ = ((c3 & 0x03) << 6) | c4; p += 4; } } static void encode_salt(char *salt, u_int8_t *csalt, u_int16_t clen, unsigned int logr) { salt[0] = '$'; salt[1] = BCRYPT_VERSION; salt[2] = 'a'; salt[3] = '$'; snprintf(salt + 4, 4, "%2.2u$", logr); encode_base64((u_int8_t *) salt + 7, csalt, clen); } /* Generates a salt for this version of crypt. Since versions may change. Keeping this here seems sensible. */ char * bcrypt_gensalt(char *output, unsigned int log_rounds, uint8_t *rseed) { if (log_rounds < 4) log_rounds = 4; else if (log_rounds > 31) log_rounds = 31; encode_salt(output, rseed, BCRYPT_MAXSALT, log_rounds); return output; } /* We handle $Vers$log2(NumRounds)$salt+passwd$ i.e. $2$04$iwouldntknowwhattosayetKdJ6iFtacBqJdKe6aW7ou */ char * bcrypt(char *output, const char *key, const char *salt) { blf_ctx state; u_int32_t rounds, i, k; u_int16_t j; u_int8_t key_len, salt_len, logr, minor; u_int8_t ciphertext[4 * BCRYPT_BLOCKS] = { // "OrpheanBeholderScryDoubt" without trailing null. 'O', 'r', 'p', 'h', 'e', 'a', 'n', 'B', 'e', 'h', 'o', 'l', 'd', 'e', 'r', 'S', 'c', 'r', 'y', 'D', 'o', 'u', 'b', 't' }; u_int8_t csalt[BCRYPT_MAXSALT]; u_int32_t cdata[BCRYPT_BLOCKS]; int n; /* Discard "$" identifier */ salt++; if (*salt > BCRYPT_VERSION) { return NULL; } /* Check for minor versions */ if (salt[1] != '$') { switch (salt[1]) { case 'a': /* 'ab' should not yield the same as 'abab' */ minor = salt[1]; salt++; break; default: return NULL; } } else minor = 0; /* Discard version + "$" identifier */ salt += 2; if (salt[2] != '$') /* Out of sync with passwd entry */ return NULL; /* Computer power doesn't increase linear, 2^x should be fine */ n = atoi(salt); if (n > 31 || n < 0) return NULL; logr = (u_int8_t)n; if ((rounds = (u_int32_t) 1 << logr) < BCRYPT_MINROUNDS) return NULL; /* Discard num rounds + "$" identifier */ salt += 3; if (strlen(salt) * 3 / 4 < BCRYPT_MAXSALT) return NULL; /* We dont want the base64 salt but the raw data */ decode_base64(csalt, BCRYPT_MAXSALT, (u_int8_t *) salt); salt_len = BCRYPT_MAXSALT; key_len = strlen(key) + (minor >= 'a' ? 1 : 0); /* Setting up S-Boxes and Subkeys */ Blowfish_initstate(&state); Blowfish_expandstate(&state, csalt, salt_len, (u_int8_t *) key, key_len); for (k = 0; k < rounds; k++) { Blowfish_expand0state(&state, (u_int8_t *) key, key_len); Blowfish_expand0state(&state, csalt, salt_len); } /* This can be precomputed later */ j = 0; for (i = 0; i < BCRYPT_BLOCKS; i++) cdata[i] = Blowfish_stream2word(ciphertext, 4 * BCRYPT_BLOCKS, &j); /* Now do the encryption */ for (k = 0; k < 64; k++) blf_enc(&state, cdata, BCRYPT_BLOCKS / 2); for (i = 0; i < BCRYPT_BLOCKS; i++) { ciphertext[4 * i + 3] = cdata[i] & 0xff; cdata[i] = cdata[i] >> 8; ciphertext[4 * i + 2] = cdata[i] & 0xff; cdata[i] = cdata[i] >> 8; ciphertext[4 * i + 1] = cdata[i] & 0xff; cdata[i] = cdata[i] >> 8; ciphertext[4 * i + 0] = cdata[i] & 0xff; } i = 0; output[i++] = '$'; output[i++] = BCRYPT_VERSION; if (minor) output[i++] = minor; output[i++] = '$'; snprintf(output + i, 4, "%2.2u$", logr); encode_base64((u_int8_t *) output + i + 3, csalt, BCRYPT_MAXSALT); encode_base64((u_int8_t *) output + strlen(output), ciphertext, 4 * BCRYPT_BLOCKS - 1); return output; } static void encode_base64(u_int8_t *buffer, unsigned char *data, u_int16_t len) { u_int8_t *bp = buffer; u_int8_t *p = data; u_int8_t c1, c2; while (p < data + len) { c1 = *p++; *bp++ = Base64Code[(c1 >> 2)]; c1 = (c1 & 0x03) << 4; if (p >= data + len) { *bp++ = Base64Code[c1]; break; } c2 = *p++; c1 |= (c2 >> 4) & 0x0f; *bp++ = Base64Code[c1]; c1 = (c2 & 0x0f) << 2; if (p >= data + len) { *bp++ = Base64Code[c1]; break; } c2 = *p++; c1 |= (c2 >> 6) & 0x03; *bp++ = Base64Code[c1]; *bp++ = Base64Code[c2 & 0x3f]; } *bp = '\0'; } #if 0 void main() { char blubber[73]; char salt[100]; char *p; salt[0] = '$'; salt[1] = BCRYPT_VERSION; salt[2] = '$'; snprintf(salt + 3, 4, "%2.2u$", 5); printf("24 bytes of salt: "); fgets(salt + 6, sizeof(salt) - 6, stdin); salt[99] = 0; printf("72 bytes of password: "); fpurge(stdin); fgets(blubber, sizeof(blubber), stdin); blubber[72] = 0; p = crypt(blubber, salt); printf("Passwd entry: %s\n\n", p); p = bcrypt_gensalt(5); printf("Generated salt: %s\n", p); p = crypt(blubber, p); printf("Passwd entry: %s\n", p); } #endif passenger-4.0.37/ext/common/Utils/BCrypt.h000644 000765 000024 00000006147 12233035540 020770 0ustar00honglistaff000000 000000 /* * Copyright 1997 Niels Provos * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Niels Provos. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Modified by on 2009-10-24: * * - Wrapped into C++ namespace. * - Changed some types (e.g. u_int8_t to uint8_t as defined in stdint.h) * for easier compilation. * - Moved some macros to the .c file. */ #ifndef _PASSENGER_BCRYPT_H_ #define _PASSENGER_BCRYPT_H_ #include #define BCRYPT_MAXSALT 16 /* Precomputation is just so nice */ #define BCRYPT_SALT_OUTPUT_SIZE (7 + (BCRYPT_MAXSALT * 4 + 2) / 3 + 1) #define BCRYPT_OUTPUT_SIZE 128 /* * Given a logarithmic cost parameter, generates a salt for use with bcrypt(). * * output: the computed salt will be stored here. This buffer must be * at least BCRYPT_SALT_OUTPUT_SIZE bytes. The result will be * null-terminated. * log_rounds: the logarithmic cost. * rseed: a seed of BCRYPT_MAXSALT bytes. Should be obtained from a * cryptographically secure random source. * Returns: output */ char *bcrypt_gensalt(char *output, unsigned int log_rounds, uint8_t *rseed); /* * Given a secret and a salt, generates a salted hash (which you can then store safely). * * output: the computed salted hash will be stored here. This buffer must * be at least BCRYPT_OUTPUT_SIZE bytes, and will become null-terminated. * key: A null-terminated secret. * salt: The salt, as generated by bcrypt_gensalt(). * Returns: output on success, NULL on error. */ char *bcrypt(char *output, const char *key, const char *salt); #endif /* _PASSENGER_BCRYPT_H_ */ passenger-4.0.37/ext/common/Utils/BlockingQueue.h000644 000765 000024 00000007513 12233035540 022320 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_BLOCKING_QUEUE_H_ #define _PASSENGER_BLOCKING_QUEUE_H_ #include #include #include namespace Passenger { using namespace std; using namespace boost; template class BlockingQueue { private: mutable boost::timed_mutex lock; boost::condition_variable_any added; boost::condition_variable_any removed; unsigned int max; std::queue queue; bool atMaxCapacity() const { return max > 0 && queue.size() >= max; } public: BlockingQueue(unsigned int max = 0) { this->max = max; } unsigned int size() const { boost::lock_guard l(lock); return queue.size(); } void add(const T &item) { boost::unique_lock l(lock); while (atMaxCapacity()) { removed.wait(l); } queue.push(item); added.notify_one(); if (!atMaxCapacity()) { removed.notify_one(); } } bool tryAdd(const T &item) { boost::lock_guard l(lock); if (!atMaxCapacity()) { queue.push(item); added.notify_one(); if (!atMaxCapacity()) { removed.notify_one(); } return true; } else { return false; } } T get() { boost::unique_lock l(lock); while (queue.empty()) { added.wait(l); } T item = queue.front(); queue.pop(); removed.notify_one(); if (!queue.empty()) { added.notify_one(); } return item; } bool timedGet(T &output, unsigned int timeout) { boost::unique_lock l(lock); posix_time::ptime deadline = posix_time::microsec_clock::local_time() + posix_time::milliseconds(timeout); bool timedOut = false; while (queue.empty() && !timedOut) { posix_time::time_duration diff = deadline - posix_time::microsec_clock::local_time(); if (diff.is_negative() < 0) { timedOut = true; } else { timedOut = !added.timed_wait(l, posix_time::milliseconds(diff.total_milliseconds())); } } if (!queue.empty()) { output = queue.front(); queue.pop(); removed.notify_one(); if (!queue.empty()) { added.notify_one(); } return true; } else { return false; } } bool tryGet(T &output) { boost::unique_lock l(lock); if (queue.empty()) { return false; } else { output = queue.front(); queue.pop(); removed.notify_one(); if (!queue.empty()) { added.notify_one(); } return true; } } T peek() { boost::unique_lock l(lock); while (queue.empty()) { added.wait(l); } return queue.front(); } }; } // namespace Passenger #endif /* _PASSENGER_BLOCKING_QUEUE_H_ */ passenger-4.0.37/ext/common/Utils/Blowfish.c000644 000765 000024 00000055432 12233035540 021336 0ustar00honglistaff000000 000000 /* $OpenBSD: blowfish.c,v 1.18 2004/11/02 17:23:26 hshoexer Exp $ */ /* * Blowfish block cipher for OpenBSD * Copyright 1997 Niels Provos * All rights reserved. * * Implementation advice by David Mazieres . * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Niels Provos. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * This code is derived from section 14.3 and the given source * in section V of Applied Cryptography, second edition. * Blowfish is an unpatented fast block cipher designed by * Bruce Schneier. */ #if 0 #include /* used for debugging */ #include #endif #include #include "Blowfish.h" #undef inline #ifdef __GNUC__ #define inline __inline #else /* !__GNUC__ */ #define inline #endif /* !__GNUC__ */ /* Function for Feistel Networks */ #define F(s, x) ((((s)[ (((x)>>24)&0xFF)] \ + (s)[0x100 + (((x)>>16)&0xFF)]) \ ^ (s)[0x200 + (((x)>> 8)&0xFF)]) \ + (s)[0x300 + ( (x) &0xFF)]) #define BLFRND(s,p,i,j,n) (i ^= F(s,j) ^ (p)[n]) void Blowfish_encipher(blf_ctx *c, u_int32_t *xl, u_int32_t *xr) { u_int32_t Xl; u_int32_t Xr; u_int32_t *s = c->S[0]; u_int32_t *p = c->P; Xl = *xl; Xr = *xr; Xl ^= p[0]; BLFRND(s, p, Xr, Xl, 1); BLFRND(s, p, Xl, Xr, 2); BLFRND(s, p, Xr, Xl, 3); BLFRND(s, p, Xl, Xr, 4); BLFRND(s, p, Xr, Xl, 5); BLFRND(s, p, Xl, Xr, 6); BLFRND(s, p, Xr, Xl, 7); BLFRND(s, p, Xl, Xr, 8); BLFRND(s, p, Xr, Xl, 9); BLFRND(s, p, Xl, Xr, 10); BLFRND(s, p, Xr, Xl, 11); BLFRND(s, p, Xl, Xr, 12); BLFRND(s, p, Xr, Xl, 13); BLFRND(s, p, Xl, Xr, 14); BLFRND(s, p, Xr, Xl, 15); BLFRND(s, p, Xl, Xr, 16); *xl = Xr ^ p[17]; *xr = Xl; } void Blowfish_decipher(blf_ctx *c, u_int32_t *xl, u_int32_t *xr) { u_int32_t Xl; u_int32_t Xr; u_int32_t *s = c->S[0]; u_int32_t *p = c->P; Xl = *xl; Xr = *xr; Xl ^= p[17]; BLFRND(s, p, Xr, Xl, 16); BLFRND(s, p, Xl, Xr, 15); BLFRND(s, p, Xr, Xl, 14); BLFRND(s, p, Xl, Xr, 13); BLFRND(s, p, Xr, Xl, 12); BLFRND(s, p, Xl, Xr, 11); BLFRND(s, p, Xr, Xl, 10); BLFRND(s, p, Xl, Xr, 9); BLFRND(s, p, Xr, Xl, 8); BLFRND(s, p, Xl, Xr, 7); BLFRND(s, p, Xr, Xl, 6); BLFRND(s, p, Xl, Xr, 5); BLFRND(s, p, Xr, Xl, 4); BLFRND(s, p, Xl, Xr, 3); BLFRND(s, p, Xr, Xl, 2); BLFRND(s, p, Xl, Xr, 1); *xl = Xr ^ p[0]; *xr = Xl; } void Blowfish_initstate(blf_ctx *c) { /* P-box and S-box tables initialized with digits of Pi */ static const blf_ctx initstate = { { { 0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7, 0xb8e1afed, 0x6a267e96, 0xba7c9045, 0xf12c7f99, 0x24a19947, 0xb3916cf7, 0x0801f2e2, 0x858efc16, 0x636920d8, 0x71574e69, 0xa458fea3, 0xf4933d7e, 0x0d95748f, 0x728eb658, 0x718bcd58, 0x82154aee, 0x7b54a41d, 0xc25a59b5, 0x9c30d539, 0x2af26013, 0xc5d1b023, 0x286085f0, 0xca417918, 0xb8db38ef, 0x8e79dcb0, 0x603a180e, 0x6c9e0e8b, 0xb01e8a3e, 0xd71577c1, 0xbd314b27, 0x78af2fda, 0x55605c60, 0xe65525f3, 0xaa55ab94, 0x57489862, 0x63e81440, 0x55ca396a, 0x2aab10b6, 0xb4cc5c34, 0x1141e8ce, 0xa15486af, 0x7c72e993, 0xb3ee1411, 0x636fbc2a, 0x2ba9c55d, 0x741831f6, 0xce5c3e16, 0x9b87931e, 0xafd6ba33, 0x6c24cf5c, 0x7a325381, 0x28958677, 0x3b8f4898, 0x6b4bb9af, 0xc4bfe81b, 0x66282193, 0x61d809cc, 0xfb21a991, 0x487cac60, 0x5dec8032, 0xef845d5d, 0xe98575b1, 0xdc262302, 0xeb651b88, 0x23893e81, 0xd396acc5, 0x0f6d6ff3, 0x83f44239, 0x2e0b4482, 0xa4842004, 0x69c8f04a, 0x9e1f9b5e, 0x21c66842, 0xf6e96c9a, 0x670c9c61, 0xabd388f0, 0x6a51a0d2, 0xd8542f68, 0x960fa728, 0xab5133a3, 0x6eef0b6c, 0x137a3be4, 0xba3bf050, 0x7efb2a98, 0xa1f1651d, 0x39af0176, 0x66ca593e, 0x82430e88, 0x8cee8619, 0x456f9fb4, 0x7d84a5c3, 0x3b8b5ebe, 0xe06f75d8, 0x85c12073, 0x401a449f, 0x56c16aa6, 0x4ed3aa62, 0x363f7706, 0x1bfedf72, 0x429b023d, 0x37d0d724, 0xd00a1248, 0xdb0fead3, 0x49f1c09b, 0x075372c9, 0x80991b7b, 0x25d479d8, 0xf6e8def7, 0xe3fe501a, 0xb6794c3b, 0x976ce0bd, 0x04c006ba, 0xc1a94fb6, 0x409f60c4, 0x5e5c9ec2, 0x196a2463, 0x68fb6faf, 0x3e6c53b5, 0x1339b2eb, 0x3b52ec6f, 0x6dfc511f, 0x9b30952c, 0xcc814544, 0xaf5ebd09, 0xbee3d004, 0xde334afd, 0x660f2807, 0x192e4bb3, 0xc0cba857, 0x45c8740f, 0xd20b5f39, 0xb9d3fbdb, 0x5579c0bd, 0x1a60320a, 0xd6a100c6, 0x402c7279, 0x679f25fe, 0xfb1fa3cc, 0x8ea5e9f8, 0xdb3222f8, 0x3c7516df, 0xfd616b15, 0x2f501ec8, 0xad0552ab, 0x323db5fa, 0xfd238760, 0x53317b48, 0x3e00df82, 0x9e5c57bb, 0xca6f8ca0, 0x1a87562e, 0xdf1769db, 0xd542a8f6, 0x287effc3, 0xac6732c6, 0x8c4f5573, 0x695b27b0, 0xbbca58c8, 0xe1ffa35d, 0xb8f011a0, 0x10fa3d98, 0xfd2183b8, 0x4afcb56c, 0x2dd1d35b, 0x9a53e479, 0xb6f84565, 0xd28e49bc, 0x4bfb9790, 0xe1ddf2da, 0xa4cb7e33, 0x62fb1341, 0xcee4c6e8, 0xef20cada, 0x36774c01, 0xd07e9efe, 0x2bf11fb4, 0x95dbda4d, 0xae909198, 0xeaad8e71, 0x6b93d5a0, 0xd08ed1d0, 0xafc725e0, 0x8e3c5b2f, 0x8e7594b7, 0x8ff6e2fb, 0xf2122b64, 0x8888b812, 0x900df01c, 0x4fad5ea0, 0x688fc31c, 0xd1cff191, 0xb3a8c1ad, 0x2f2f2218, 0xbe0e1777, 0xea752dfe, 0x8b021fa1, 0xe5a0cc0f, 0xb56f74e8, 0x18acf3d6, 0xce89e299, 0xb4a84fe0, 0xfd13e0b7, 0x7cc43b81, 0xd2ada8d9, 0x165fa266, 0x80957705, 0x93cc7314, 0x211a1477, 0xe6ad2065, 0x77b5fa86, 0xc75442f5, 0xfb9d35cf, 0xebcdaf0c, 0x7b3e89a0, 0xd6411bd3, 0xae1e7e49, 0x00250e2d, 0x2071b35e, 0x226800bb, 0x57b8e0af, 0x2464369b, 0xf009b91e, 0x5563911d, 0x59dfa6aa, 0x78c14389, 0xd95a537f, 0x207d5ba2, 0x02e5b9c5, 0x83260376, 0x6295cfa9, 0x11c81968, 0x4e734a41, 0xb3472dca, 0x7b14a94a, 0x1b510052, 0x9a532915, 0xd60f573f, 0xbc9bc6e4, 0x2b60a476, 0x81e67400, 0x08ba6fb5, 0x571be91f, 0xf296ec6b, 0x2a0dd915, 0xb6636521, 0xe7b9f9b6, 0xff34052e, 0xc5855664, 0x53b02d5d, 0xa99f8fa1, 0x08ba4799, 0x6e85076a}, { 0x4b7a70e9, 0xb5b32944, 0xdb75092e, 0xc4192623, 0xad6ea6b0, 0x49a7df7d, 0x9cee60b8, 0x8fedb266, 0xecaa8c71, 0x699a17ff, 0x5664526c, 0xc2b19ee1, 0x193602a5, 0x75094c29, 0xa0591340, 0xe4183a3e, 0x3f54989a, 0x5b429d65, 0x6b8fe4d6, 0x99f73fd6, 0xa1d29c07, 0xefe830f5, 0x4d2d38e6, 0xf0255dc1, 0x4cdd2086, 0x8470eb26, 0x6382e9c6, 0x021ecc5e, 0x09686b3f, 0x3ebaefc9, 0x3c971814, 0x6b6a70a1, 0x687f3584, 0x52a0e286, 0xb79c5305, 0xaa500737, 0x3e07841c, 0x7fdeae5c, 0x8e7d44ec, 0x5716f2b8, 0xb03ada37, 0xf0500c0d, 0xf01c1f04, 0x0200b3ff, 0xae0cf51a, 0x3cb574b2, 0x25837a58, 0xdc0921bd, 0xd19113f9, 0x7ca92ff6, 0x94324773, 0x22f54701, 0x3ae5e581, 0x37c2dadc, 0xc8b57634, 0x9af3dda7, 0xa9446146, 0x0fd0030e, 0xecc8c73e, 0xa4751e41, 0xe238cd99, 0x3bea0e2f, 0x3280bba1, 0x183eb331, 0x4e548b38, 0x4f6db908, 0x6f420d03, 0xf60a04bf, 0x2cb81290, 0x24977c79, 0x5679b072, 0xbcaf89af, 0xde9a771f, 0xd9930810, 0xb38bae12, 0xdccf3f2e, 0x5512721f, 0x2e6b7124, 0x501adde6, 0x9f84cd87, 0x7a584718, 0x7408da17, 0xbc9f9abc, 0xe94b7d8c, 0xec7aec3a, 0xdb851dfa, 0x63094366, 0xc464c3d2, 0xef1c1847, 0x3215d908, 0xdd433b37, 0x24c2ba16, 0x12a14d43, 0x2a65c451, 0x50940002, 0x133ae4dd, 0x71dff89e, 0x10314e55, 0x81ac77d6, 0x5f11199b, 0x043556f1, 0xd7a3c76b, 0x3c11183b, 0x5924a509, 0xf28fe6ed, 0x97f1fbfa, 0x9ebabf2c, 0x1e153c6e, 0x86e34570, 0xeae96fb1, 0x860e5e0a, 0x5a3e2ab3, 0x771fe71c, 0x4e3d06fa, 0x2965dcb9, 0x99e71d0f, 0x803e89d6, 0x5266c825, 0x2e4cc978, 0x9c10b36a, 0xc6150eba, 0x94e2ea78, 0xa5fc3c53, 0x1e0a2df4, 0xf2f74ea7, 0x361d2b3d, 0x1939260f, 0x19c27960, 0x5223a708, 0xf71312b6, 0xebadfe6e, 0xeac31f66, 0xe3bc4595, 0xa67bc883, 0xb17f37d1, 0x018cff28, 0xc332ddef, 0xbe6c5aa5, 0x65582185, 0x68ab9802, 0xeecea50f, 0xdb2f953b, 0x2aef7dad, 0x5b6e2f84, 0x1521b628, 0x29076170, 0xecdd4775, 0x619f1510, 0x13cca830, 0xeb61bd96, 0x0334fe1e, 0xaa0363cf, 0xb5735c90, 0x4c70a239, 0xd59e9e0b, 0xcbaade14, 0xeecc86bc, 0x60622ca7, 0x9cab5cab, 0xb2f3846e, 0x648b1eaf, 0x19bdf0ca, 0xa02369b9, 0x655abb50, 0x40685a32, 0x3c2ab4b3, 0x319ee9d5, 0xc021b8f7, 0x9b540b19, 0x875fa099, 0x95f7997e, 0x623d7da8, 0xf837889a, 0x97e32d77, 0x11ed935f, 0x16681281, 0x0e358829, 0xc7e61fd6, 0x96dedfa1, 0x7858ba99, 0x57f584a5, 0x1b227263, 0x9b83c3ff, 0x1ac24696, 0xcdb30aeb, 0x532e3054, 0x8fd948e4, 0x6dbc3128, 0x58ebf2ef, 0x34c6ffea, 0xfe28ed61, 0xee7c3c73, 0x5d4a14d9, 0xe864b7e3, 0x42105d14, 0x203e13e0, 0x45eee2b6, 0xa3aaabea, 0xdb6c4f15, 0xfacb4fd0, 0xc742f442, 0xef6abbb5, 0x654f3b1d, 0x41cd2105, 0xd81e799e, 0x86854dc7, 0xe44b476a, 0x3d816250, 0xcf62a1f2, 0x5b8d2646, 0xfc8883a0, 0xc1c7b6a3, 0x7f1524c3, 0x69cb7492, 0x47848a0b, 0x5692b285, 0x095bbf00, 0xad19489d, 0x1462b174, 0x23820e00, 0x58428d2a, 0x0c55f5ea, 0x1dadf43e, 0x233f7061, 0x3372f092, 0x8d937e41, 0xd65fecf1, 0x6c223bdb, 0x7cde3759, 0xcbee7460, 0x4085f2a7, 0xce77326e, 0xa6078084, 0x19f8509e, 0xe8efd855, 0x61d99735, 0xa969a7aa, 0xc50c06c2, 0x5a04abfc, 0x800bcadc, 0x9e447a2e, 0xc3453484, 0xfdd56705, 0x0e1e9ec9, 0xdb73dbd3, 0x105588cd, 0x675fda79, 0xe3674340, 0xc5c43465, 0x713e38d8, 0x3d28f89e, 0xf16dff20, 0x153e21e7, 0x8fb03d4a, 0xe6e39f2b, 0xdb83adf7}, { 0xe93d5a68, 0x948140f7, 0xf64c261c, 0x94692934, 0x411520f7, 0x7602d4f7, 0xbcf46b2e, 0xd4a20068, 0xd4082471, 0x3320f46a, 0x43b7d4b7, 0x500061af, 0x1e39f62e, 0x97244546, 0x14214f74, 0xbf8b8840, 0x4d95fc1d, 0x96b591af, 0x70f4ddd3, 0x66a02f45, 0xbfbc09ec, 0x03bd9785, 0x7fac6dd0, 0x31cb8504, 0x96eb27b3, 0x55fd3941, 0xda2547e6, 0xabca0a9a, 0x28507825, 0x530429f4, 0x0a2c86da, 0xe9b66dfb, 0x68dc1462, 0xd7486900, 0x680ec0a4, 0x27a18dee, 0x4f3ffea2, 0xe887ad8c, 0xb58ce006, 0x7af4d6b6, 0xaace1e7c, 0xd3375fec, 0xce78a399, 0x406b2a42, 0x20fe9e35, 0xd9f385b9, 0xee39d7ab, 0x3b124e8b, 0x1dc9faf7, 0x4b6d1856, 0x26a36631, 0xeae397b2, 0x3a6efa74, 0xdd5b4332, 0x6841e7f7, 0xca7820fb, 0xfb0af54e, 0xd8feb397, 0x454056ac, 0xba489527, 0x55533a3a, 0x20838d87, 0xfe6ba9b7, 0xd096954b, 0x55a867bc, 0xa1159a58, 0xcca92963, 0x99e1db33, 0xa62a4a56, 0x3f3125f9, 0x5ef47e1c, 0x9029317c, 0xfdf8e802, 0x04272f70, 0x80bb155c, 0x05282ce3, 0x95c11548, 0xe4c66d22, 0x48c1133f, 0xc70f86dc, 0x07f9c9ee, 0x41041f0f, 0x404779a4, 0x5d886e17, 0x325f51eb, 0xd59bc0d1, 0xf2bcc18f, 0x41113564, 0x257b7834, 0x602a9c60, 0xdff8e8a3, 0x1f636c1b, 0x0e12b4c2, 0x02e1329e, 0xaf664fd1, 0xcad18115, 0x6b2395e0, 0x333e92e1, 0x3b240b62, 0xeebeb922, 0x85b2a20e, 0xe6ba0d99, 0xde720c8c, 0x2da2f728, 0xd0127845, 0x95b794fd, 0x647d0862, 0xe7ccf5f0, 0x5449a36f, 0x877d48fa, 0xc39dfd27, 0xf33e8d1e, 0x0a476341, 0x992eff74, 0x3a6f6eab, 0xf4f8fd37, 0xa812dc60, 0xa1ebddf8, 0x991be14c, 0xdb6e6b0d, 0xc67b5510, 0x6d672c37, 0x2765d43b, 0xdcd0e804, 0xf1290dc7, 0xcc00ffa3, 0xb5390f92, 0x690fed0b, 0x667b9ffb, 0xcedb7d9c, 0xa091cf0b, 0xd9155ea3, 0xbb132f88, 0x515bad24, 0x7b9479bf, 0x763bd6eb, 0x37392eb3, 0xcc115979, 0x8026e297, 0xf42e312d, 0x6842ada7, 0xc66a2b3b, 0x12754ccc, 0x782ef11c, 0x6a124237, 0xb79251e7, 0x06a1bbe6, 0x4bfb6350, 0x1a6b1018, 0x11caedfa, 0x3d25bdd8, 0xe2e1c3c9, 0x44421659, 0x0a121386, 0xd90cec6e, 0xd5abea2a, 0x64af674e, 0xda86a85f, 0xbebfe988, 0x64e4c3fe, 0x9dbc8057, 0xf0f7c086, 0x60787bf8, 0x6003604d, 0xd1fd8346, 0xf6381fb0, 0x7745ae04, 0xd736fccc, 0x83426b33, 0xf01eab71, 0xb0804187, 0x3c005e5f, 0x77a057be, 0xbde8ae24, 0x55464299, 0xbf582e61, 0x4e58f48f, 0xf2ddfda2, 0xf474ef38, 0x8789bdc2, 0x5366f9c3, 0xc8b38e74, 0xb475f255, 0x46fcd9b9, 0x7aeb2661, 0x8b1ddf84, 0x846a0e79, 0x915f95e2, 0x466e598e, 0x20b45770, 0x8cd55591, 0xc902de4c, 0xb90bace1, 0xbb8205d0, 0x11a86248, 0x7574a99e, 0xb77f19b6, 0xe0a9dc09, 0x662d09a1, 0xc4324633, 0xe85a1f02, 0x09f0be8c, 0x4a99a025, 0x1d6efe10, 0x1ab93d1d, 0x0ba5a4df, 0xa186f20f, 0x2868f169, 0xdcb7da83, 0x573906fe, 0xa1e2ce9b, 0x4fcd7f52, 0x50115e01, 0xa70683fa, 0xa002b5c4, 0x0de6d027, 0x9af88c27, 0x773f8641, 0xc3604c06, 0x61a806b5, 0xf0177a28, 0xc0f586e0, 0x006058aa, 0x30dc7d62, 0x11e69ed7, 0x2338ea63, 0x53c2dd94, 0xc2c21634, 0xbbcbee56, 0x90bcb6de, 0xebfc7da1, 0xce591d76, 0x6f05e409, 0x4b7c0188, 0x39720a3d, 0x7c927c24, 0x86e3725f, 0x724d9db9, 0x1ac15bb4, 0xd39eb8fc, 0xed545578, 0x08fca5b5, 0xd83d7cd3, 0x4dad0fc4, 0x1e50ef5e, 0xb161e6f8, 0xa28514d9, 0x6c51133c, 0x6fd5c7e7, 0x56e14ec4, 0x362abfce, 0xddc6c837, 0xd79a3234, 0x92638212, 0x670efa8e, 0x406000e0}, { 0x3a39ce37, 0xd3faf5cf, 0xabc27737, 0x5ac52d1b, 0x5cb0679e, 0x4fa33742, 0xd3822740, 0x99bc9bbe, 0xd5118e9d, 0xbf0f7315, 0xd62d1c7e, 0xc700c47b, 0xb78c1b6b, 0x21a19045, 0xb26eb1be, 0x6a366eb4, 0x5748ab2f, 0xbc946e79, 0xc6a376d2, 0x6549c2c8, 0x530ff8ee, 0x468dde7d, 0xd5730a1d, 0x4cd04dc6, 0x2939bbdb, 0xa9ba4650, 0xac9526e8, 0xbe5ee304, 0xa1fad5f0, 0x6a2d519a, 0x63ef8ce2, 0x9a86ee22, 0xc089c2b8, 0x43242ef6, 0xa51e03aa, 0x9cf2d0a4, 0x83c061ba, 0x9be96a4d, 0x8fe51550, 0xba645bd6, 0x2826a2f9, 0xa73a3ae1, 0x4ba99586, 0xef5562e9, 0xc72fefd3, 0xf752f7da, 0x3f046f69, 0x77fa0a59, 0x80e4a915, 0x87b08601, 0x9b09e6ad, 0x3b3ee593, 0xe990fd5a, 0x9e34d797, 0x2cf0b7d9, 0x022b8b51, 0x96d5ac3a, 0x017da67d, 0xd1cf3ed6, 0x7c7d2d28, 0x1f9f25cf, 0xadf2b89b, 0x5ad6b472, 0x5a88f54c, 0xe029ac71, 0xe019a5e6, 0x47b0acfd, 0xed93fa9b, 0xe8d3c48d, 0x283b57cc, 0xf8d56629, 0x79132e28, 0x785f0191, 0xed756055, 0xf7960e44, 0xe3d35e8c, 0x15056dd4, 0x88f46dba, 0x03a16125, 0x0564f0bd, 0xc3eb9e15, 0x3c9057a2, 0x97271aec, 0xa93a072a, 0x1b3f6d9b, 0x1e6321f5, 0xf59c66fb, 0x26dcf319, 0x7533d928, 0xb155fdf5, 0x03563482, 0x8aba3cbb, 0x28517711, 0xc20ad9f8, 0xabcc5167, 0xccad925f, 0x4de81751, 0x3830dc8e, 0x379d5862, 0x9320f991, 0xea7a90c2, 0xfb3e7bce, 0x5121ce64, 0x774fbe32, 0xa8b6e37e, 0xc3293d46, 0x48de5369, 0x6413e680, 0xa2ae0810, 0xdd6db224, 0x69852dfd, 0x09072166, 0xb39a460a, 0x6445c0dd, 0x586cdecf, 0x1c20c8ae, 0x5bbef7dd, 0x1b588d40, 0xccd2017f, 0x6bb4e3bb, 0xdda26a7e, 0x3a59ff45, 0x3e350a44, 0xbcb4cdd5, 0x72eacea8, 0xfa6484bb, 0x8d6612ae, 0xbf3c6f47, 0xd29be463, 0x542f5d9e, 0xaec2771b, 0xf64e6370, 0x740e0d8d, 0xe75b1357, 0xf8721671, 0xaf537d5d, 0x4040cb08, 0x4eb4e2cc, 0x34d2466a, 0x0115af84, 0xe1b00428, 0x95983a1d, 0x06b89fb4, 0xce6ea048, 0x6f3f3b82, 0x3520ab82, 0x011a1d4b, 0x277227f8, 0x611560b1, 0xe7933fdc, 0xbb3a792b, 0x344525bd, 0xa08839e1, 0x51ce794b, 0x2f32c9b7, 0xa01fbac9, 0xe01cc87e, 0xbcc7d1f6, 0xcf0111c3, 0xa1e8aac7, 0x1a908749, 0xd44fbd9a, 0xd0dadecb, 0xd50ada38, 0x0339c32a, 0xc6913667, 0x8df9317c, 0xe0b12b4f, 0xf79e59b7, 0x43f5bb3a, 0xf2d519ff, 0x27d9459c, 0xbf97222c, 0x15e6fc2a, 0x0f91fc71, 0x9b941525, 0xfae59361, 0xceb69ceb, 0xc2a86459, 0x12baa8d1, 0xb6c1075e, 0xe3056a0c, 0x10d25065, 0xcb03a442, 0xe0ec6e0e, 0x1698db3b, 0x4c98a0be, 0x3278e964, 0x9f1f9532, 0xe0d392df, 0xd3a0342b, 0x8971f21e, 0x1b0a7441, 0x4ba3348c, 0xc5be7120, 0xc37632d8, 0xdf359f8d, 0x9b992f2e, 0xe60b6f47, 0x0fe3f11d, 0xe54cda54, 0x1edad891, 0xce6279cf, 0xcd3e7e6f, 0x1618b166, 0xfd2c1d05, 0x848fd2c5, 0xf6fb2299, 0xf523f357, 0xa6327623, 0x93a83531, 0x56cccd02, 0xacf08162, 0x5a75ebb5, 0x6e163697, 0x88d273cc, 0xde966292, 0x81b949d0, 0x4c50901b, 0x71c65614, 0xe6c6c7bd, 0x327a140a, 0x45e1d006, 0xc3f27b9a, 0xc9aa53fd, 0x62a80f00, 0xbb25bfe2, 0x35bdd2f6, 0x71126905, 0xb2040222, 0xb6cbcf7c, 0xcd769c2b, 0x53113ec0, 0x1640e3d3, 0x38abbd60, 0x2547adf0, 0xba38209c, 0xf746ce76, 0x77afa1c5, 0x20756060, 0x85cbfe4e, 0x8ae88dd8, 0x7aaaf9b0, 0x4cf9aa7e, 0x1948c25c, 0x02fb8a8c, 0x01c36ae4, 0xd6ebe1f9, 0x90d4f869, 0xa65cdea0, 0x3f09252d, 0xc208e69f, 0xb74e6132, 0xce77e25b, 0x578fdfe3, 0x3ac372e6} }, { 0x243f6a88, 0x85a308d3, 0x13198a2e, 0x03707344, 0xa4093822, 0x299f31d0, 0x082efa98, 0xec4e6c89, 0x452821e6, 0x38d01377, 0xbe5466cf, 0x34e90c6c, 0xc0ac29b7, 0xc97c50dd, 0x3f84d5b5, 0xb5470917, 0x9216d5d9, 0x8979fb1b } }; *c = initstate; } u_int32_t Blowfish_stream2word(const u_int8_t *data, u_int16_t databytes, u_int16_t *current) { u_int8_t i; u_int16_t j; u_int32_t temp; temp = 0x00000000; j = *current; for (i = 0; i < 4; i++, j++) { if (j >= databytes) j = 0; temp = (temp << 8) | data[j]; } *current = j; return temp; } void Blowfish_expand0state(blf_ctx *c, const u_int8_t *key, u_int16_t keybytes) { u_int16_t i; u_int16_t j; u_int16_t k; u_int32_t temp; u_int32_t datal; u_int32_t datar; j = 0; for (i = 0; i < BLF_N + 2; i++) { /* Extract 4 int8 to 1 int32 from keystream */ temp = Blowfish_stream2word(key, keybytes, &j); c->P[i] = c->P[i] ^ temp; } j = 0; datal = 0x00000000; datar = 0x00000000; for (i = 0; i < BLF_N + 2; i += 2) { Blowfish_encipher(c, &datal, &datar); c->P[i] = datal; c->P[i + 1] = datar; } for (i = 0; i < 4; i++) { for (k = 0; k < 256; k += 2) { Blowfish_encipher(c, &datal, &datar); c->S[i][k] = datal; c->S[i][k + 1] = datar; } } } void Blowfish_expandstate(blf_ctx *c, const u_int8_t *data, u_int16_t databytes, const u_int8_t *key, u_int16_t keybytes) { u_int16_t i; u_int16_t j; u_int16_t k; u_int32_t temp; u_int32_t datal; u_int32_t datar; j = 0; for (i = 0; i < BLF_N + 2; i++) { /* Extract 4 int8 to 1 int32 from keystream */ temp = Blowfish_stream2word(key, keybytes, &j); c->P[i] = c->P[i] ^ temp; } j = 0; datal = 0x00000000; datar = 0x00000000; for (i = 0; i < BLF_N + 2; i += 2) { datal ^= Blowfish_stream2word(data, databytes, &j); datar ^= Blowfish_stream2word(data, databytes, &j); Blowfish_encipher(c, &datal, &datar); c->P[i] = datal; c->P[i + 1] = datar; } for (i = 0; i < 4; i++) { for (k = 0; k < 256; k += 2) { datal ^= Blowfish_stream2word(data, databytes, &j); datar ^= Blowfish_stream2word(data, databytes, &j); Blowfish_encipher(c, &datal, &datar); c->S[i][k] = datal; c->S[i][k + 1] = datar; } } } void blf_key(blf_ctx *c, const u_int8_t *k, u_int16_t len) { /* Initialize S-boxes and subkeys with Pi */ Blowfish_initstate(c); /* Transform S-boxes and subkeys with key */ Blowfish_expand0state(c, k, len); } void blf_enc(blf_ctx *c, u_int32_t *data, u_int16_t blocks) { u_int32_t *d; u_int16_t i; d = data; for (i = 0; i < blocks; i++) { Blowfish_encipher(c, d, d + 1); d += 2; } } void blf_dec(blf_ctx *c, u_int32_t *data, u_int16_t blocks) { u_int32_t *d; u_int16_t i; d = data; for (i = 0; i < blocks; i++) { Blowfish_decipher(c, d, d + 1); d += 2; } } void blf_ecb_encrypt(blf_ctx *c, u_int8_t *data, u_int32_t len) { u_int32_t l, r; u_int32_t i; for (i = 0; i < len; i += 8) { l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; Blowfish_encipher(c, &l, &r); data[0] = l >> 24 & 0xff; data[1] = l >> 16 & 0xff; data[2] = l >> 8 & 0xff; data[3] = l & 0xff; data[4] = r >> 24 & 0xff; data[5] = r >> 16 & 0xff; data[6] = r >> 8 & 0xff; data[7] = r & 0xff; data += 8; } } void blf_ecb_decrypt(blf_ctx *c, u_int8_t *data, u_int32_t len) { u_int32_t l, r; u_int32_t i; for (i = 0; i < len; i += 8) { l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; Blowfish_decipher(c, &l, &r); data[0] = l >> 24 & 0xff; data[1] = l >> 16 & 0xff; data[2] = l >> 8 & 0xff; data[3] = l & 0xff; data[4] = r >> 24 & 0xff; data[5] = r >> 16 & 0xff; data[6] = r >> 8 & 0xff; data[7] = r & 0xff; data += 8; } } void blf_cbc_encrypt(blf_ctx *c, u_int8_t *iv, u_int8_t *data, u_int32_t len) { u_int32_t l, r; u_int32_t i, j; for (i = 0; i < len; i += 8) { for (j = 0; j < 8; j++) data[j] ^= iv[j]; l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; Blowfish_encipher(c, &l, &r); data[0] = l >> 24 & 0xff; data[1] = l >> 16 & 0xff; data[2] = l >> 8 & 0xff; data[3] = l & 0xff; data[4] = r >> 24 & 0xff; data[5] = r >> 16 & 0xff; data[6] = r >> 8 & 0xff; data[7] = r & 0xff; iv = data; data += 8; } } void blf_cbc_decrypt(blf_ctx *c, u_int8_t *iva, u_int8_t *data, u_int32_t len) { u_int32_t l, r; u_int8_t *iv; u_int32_t i, j; iv = data + len - 16; data = data + len - 8; for (i = len - 8; i >= 8; i -= 8) { l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; Blowfish_decipher(c, &l, &r); data[0] = l >> 24 & 0xff; data[1] = l >> 16 & 0xff; data[2] = l >> 8 & 0xff; data[3] = l & 0xff; data[4] = r >> 24 & 0xff; data[5] = r >> 16 & 0xff; data[6] = r >> 8 & 0xff; data[7] = r & 0xff; for (j = 0; j < 8; j++) data[j] ^= iv[j]; iv -= 8; data -= 8; } l = data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]; r = data[4] << 24 | data[5] << 16 | data[6] << 8 | data[7]; Blowfish_decipher(c, &l, &r); data[0] = l >> 24 & 0xff; data[1] = l >> 16 & 0xff; data[2] = l >> 8 & 0xff; data[3] = l & 0xff; data[4] = r >> 24 & 0xff; data[5] = r >> 16 & 0xff; data[6] = r >> 8 & 0xff; data[7] = r & 0xff; for (j = 0; j < 8; j++) data[j] ^= iva[j]; } #if 0 void report(u_int32_t data[], u_int16_t len) { u_int16_t i; for (i = 0; i < len; i += 2) printf("Block %0hd: %08lx %08lx.\n", i / 2, data[i], data[i + 1]); } void main(void) { blf_ctx c; char key[] = "AAAAA"; char key2[] = "abcdefghijklmnopqrstuvwxyz"; u_int32_t data[10]; u_int32_t data2[] = {0x424c4f57l, 0x46495348l}; u_int16_t i; /* First test */ for (i = 0; i < 10; i++) data[i] = i; blf_key(&c, (u_int8_t *) key, 5); blf_enc(&c, data, 5); blf_dec(&c, data, 1); blf_dec(&c, data + 2, 4); printf("Should read as 0 - 9.\n"); report(data, 10); /* Second test */ blf_key(&c, (u_int8_t *) key2, strlen(key2)); blf_enc(&c, data2, 1); printf("\nShould read as: 0x324ed0fe 0xf413a203.\n"); report(data2, 2); blf_dec(&c, data2, 1); report(data2, 2); } #endif passenger-4.0.37/ext/common/Utils/Blowfish.h000644 000765 000024 00000007642 12233035540 021343 0ustar00honglistaff000000 000000 /* $OpenBSD: blf.h,v 1.6 2002/02/16 21:27:17 millert Exp $ */ /* * Blowfish - a fast block cipher designed by Bruce Schneier * * Copyright 1997 Niels Provos * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Niels Provos. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Modified by on 2009-10-24: * * - Made it so that this header cannot be included directly. */ #ifndef IN_PASSENGER_BCRYPT_C #error "Do not include this header directly. Use BCrypt.h instead!" #endif #ifndef _PASSENGER_BLOWFISH_H_ #define _PASSENGER_BLOWFISH_H_ /* Add this type so we'll compile nicely on Solaris. Thanks to Jeremy LaTrasse and the Twitter crew. */ #ifdef __sun #define u_int8_t uint8_t #define u_int16_t uint16_t #define u_int32_t uint32_t #define u_int64_t uint64_t #endif // Imported from pwd.h. #define _PASSWORD_LEN 128 /* max length, not counting NUL */ /* Schneier specifies a maximum key length of 56 bytes. * This ensures that every key bit affects every cipher * bit. However, the subkeys can hold up to 72 bytes. * Warning: For normal blowfish encryption only 56 bytes * of the key affect all cipherbits. */ #define BLF_N 16 /* Number of Subkeys */ #define BLF_MAXKEYLEN ((BLF_N-2)*4) /* 448 bits */ /* Blowfish context */ typedef struct BlowfishContext { u_int32_t S[4][256]; /* S-Boxes */ u_int32_t P[BLF_N + 2]; /* Subkeys */ } blf_ctx; /* Raw access to customized Blowfish * blf_key is just: * Blowfish_initstate( state ) * Blowfish_expand0state( state, key, keylen ) */ void Blowfish_encipher(blf_ctx *, u_int32_t *, u_int32_t *); void Blowfish_decipher(blf_ctx *, u_int32_t *, u_int32_t *); void Blowfish_initstate(blf_ctx *); void Blowfish_expand0state(blf_ctx *, const u_int8_t *, u_int16_t); void Blowfish_expandstate (blf_ctx *, const u_int8_t *, u_int16_t, const u_int8_t *, u_int16_t); /* Standard Blowfish */ void blf_key(blf_ctx *, const u_int8_t *, u_int16_t); void blf_enc(blf_ctx *, u_int32_t *, u_int16_t); void blf_dec(blf_ctx *, u_int32_t *, u_int16_t); void blf_ecb_encrypt(blf_ctx *, u_int8_t *, u_int32_t); void blf_ecb_decrypt(blf_ctx *, u_int8_t *, u_int32_t); void blf_cbc_encrypt(blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t); void blf_cbc_decrypt(blf_ctx *, u_int8_t *, u_int8_t *, u_int32_t); /* Converts u_int8_t to u_int32_t */ u_int32_t Blowfish_stream2word(const u_int8_t *, u_int16_t , u_int16_t *); #endif /* _PASSENGER_BLOWFISH_H_ */ passenger-4.0.37/ext/common/Utils/BufferedIO.h000644 000765 000024 00000015044 12233035540 021533 0ustar00honglistaff000000 000000 #ifndef _PASSENGER_BUFFERED_IO_H_ #define _PASSENGER_BUFFERED_IO_H_ #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace oxt; /** * Provides buffered I/O for arbitrary file descriptors. Supports features not * found in C++'s iostream or libc's stdio: * - All functions have timeout support. * - The readLine() method returns a C++ string, so no need to worry about * buffer management. A size limit can be imposed. * - Read buffer is infinite in size. * - Unreading (pushing back) arbitrary amount of data. */ class BufferedIO { private: FileDescriptor fd; string buffer; static pair nReadOrEofReached(const char *data, unsigned int size, void *output, unsigned int goalSize, unsigned int *alreadyRead) { char *current = (char *) output + *alreadyRead; unsigned int remaining = goalSize - *alreadyRead; unsigned int consumed = min(remaining, size); memcpy(current, data, consumed); *alreadyRead += consumed; return make_pair(consumed, *alreadyRead == goalSize); } static pair eofReached(const char *data, unsigned int size, string *output) { output->append(data, size); return make_pair(size, false); } static pair newlineFound(const char *data, unsigned int size, string *output, unsigned int max) { const char *newline = (const char *) memchr(data, '\n', size); if (newline != NULL) { unsigned int accepted = newline - data + 1; if (output->size() + accepted > max) { throw SecurityException("Line too long"); } output->append(data, accepted); return make_pair(accepted, true); } else { if (output->size() + size > max) { throw SecurityException("Line too long"); } output->append(data, size); return make_pair(size, false); } } public: typedef boost::function< pair(const char *data, unsigned int size) > AcceptFunction; BufferedIO() { } BufferedIO(const FileDescriptor &_fd) : fd(_fd) { } FileDescriptor getFd() const { return fd; } const string &getBuffer() const { return buffer; } /** * This method keeps reading data in a loop, feeding each chunk to the given * acceptor function, until the function says that it has consumed all data * that it needs. Leftover data that has been read from the file descriptor * but not consumed by the acceptor function will be put in the buffer, making * it available for future read operations. * * The acceptor function accepts (data, size) as arguments and returns a * (consumed, done) pair, where 'consumed' indicates the number of bytes * from 'data' that it has consumed. 'done' indicates whether the acceptor * function is done consuming (true), or whether it expects more data (false). * * readUntil() can be used for e.g. reading data until a newline is encountered. * * If the acceptor function throws an exception then the BufferedIO instance * will be left in an undefined state, making it unusable. * * @throws RuntimeException The acceptor function returned an invalid result. * @throws SystemException * @throws TimeoutException * @throws boost::thread_interrupted */ unsigned int readUntil(const AcceptFunction &acceptor, unsigned long long *timeout = NULL) { pair acceptResult; unsigned int totalRead = 0; if (!buffer.empty()) { acceptResult = acceptor(buffer.c_str(), buffer.size()); if (OXT_UNLIKELY(!acceptResult.second && acceptResult.first < buffer.size())) { throw RuntimeException("Acceptor function cannot return (x,false) where x is smaller than the input size"); } else if (OXT_UNLIKELY(acceptResult.first > buffer.size())) { throw RuntimeException("Acceptor function cannot return a larger accept count than the input size"); } buffer.erase(0, acceptResult.first); totalRead = acceptResult.first; if (acceptResult.second) { return totalRead; } } while (true) { if (OXT_UNLIKELY(timeout != NULL && !waitUntilReadable(fd, timeout))) { throw TimeoutException("Read timeout"); } char tmp[1024 * 8]; ssize_t ret = syscalls::read(fd, tmp, sizeof(tmp)); if (ret == 0) { return totalRead; } else if (OXT_UNLIKELY(ret == -1)) { if (errno != EAGAIN) { int e = errno; throw SystemException("read() failed", e); } } else { acceptResult = acceptor(tmp, ret); totalRead += acceptResult.first; if (OXT_UNLIKELY(!acceptResult.second && acceptResult.first < (unsigned int) ret)) { throw RuntimeException("Acceptor function cannot return (x,false) where x is smaller than the input size"); } else if (OXT_UNLIKELY(acceptResult.first > (unsigned int) ret)) { throw RuntimeException("Acceptor function cannot return a larger accept count than the input size"); } if (acceptResult.second) { buffer.assign(tmp + acceptResult.first, ret - acceptResult.first); return totalRead; } } } } unsigned int read(void *buf, unsigned int size, unsigned long long *timeout = NULL) { unsigned int counter = 0; return readUntil( boost::bind(nReadOrEofReached, _1, _2, buf, size, &counter), timeout); } string readAll(unsigned long long *timeout = NULL) { string output; readUntil(boost::bind(eofReached, _1, _2, &output), timeout); return output; } /** * Reads a line and returns the line including the newline character. Upon * encountering EOF, the empty string is returned. * * The `max` parameter dictates the maximum length of the returned line. * If the line is longer than this number of characters, then a SecurityException * is thrown, and the BufferedIO becomes unusable (enters an undefined state). * * @throws SystemException * @throws TimeoutException * @throws SecurityException * @throws boost::thread_interrupted */ string readLine(unsigned int max = 1024, unsigned long long *timeout = NULL) { string output; readUntil(boost::bind(newlineFound, _1, _2, &output, max), timeout); return output; } void unread(const void *buf, unsigned int size) { string newBuffer; newBuffer.reserve(size + buffer.size()); newBuffer.append((const char *) buf, (string::size_type) size); newBuffer.append(buffer); buffer = newBuffer; } void unread(const StaticString &str) { unread(str.c_str(), str.size()); } }; } // namespace Passenger #endif /* _PASSENGER_BUFFERED_IO_H_ */ passenger-4.0.37/ext/common/Utils/CachedFileStat.cpp000644 000765 000024 00000004030 12233035540 022710 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include "CachedFileStat.h" #include "CachedFileStat.hpp" extern "C" { PP_CachedFileStat * pp_cached_file_stat_new(unsigned int max_size) { return (PP_CachedFileStat *) new Passenger::CachedFileStat(max_size); } void pp_cached_file_stat_free(PP_CachedFileStat *cstat) { delete (Passenger::CachedFileStat *) cstat; } int pp_cached_file_stat_perform(PP_CachedFileStat *cstat, const char *filename, struct stat *buf, unsigned int throttle_rate) { try { return ((Passenger::CachedFileStat *) cstat)->stat(filename, buf, throttle_rate); } catch (const Passenger::TimeRetrievalException &e) { errno = e.code(); return -1; } catch (const boost::thread_interrupted &) { errno = EINTR; return -1; } } } // extern "C" passenger-4.0.37/ext/common/Utils/CachedFileStat.h000644 000765 000024 00000003567 12233035540 022373 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_CACHED_FILE_STAT_H_ #define _PASSENGER_CACHED_FILE_STAT_H_ #include #ifdef __cplusplus extern "C" { #endif /** C bindings for Passenger::CachedFileStat. */ typedef void PP_CachedFileStat; PP_CachedFileStat *pp_cached_file_stat_new(unsigned int max_size); void pp_cached_file_stat_free(PP_CachedFileStat *cstat); int pp_cached_file_stat_perform(PP_CachedFileStat *cstat, const char *filename, struct stat *buf, unsigned int throttle_rate); #ifdef __cplusplus } #endif #endif /* _PASSENGER_CACHED_FILE_STAT_H_ */ passenger-4.0.37/ext/common/Utils/CachedFileStat.hpp000644 000765 000024 00000017262 12233035540 022730 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_CACHED_FILE_STAT_HPP_ #define _PASSENGER_CACHED_FILE_STAT_HPP_ #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace oxt; using namespace boost; /** * CachedFileStat allows one to stat() files at a throttled rate, in order * to minimize stress on the filesystem. It does this by caching the old stat * data for a specified amount of time. * * The cache has a maximum size, which may be altered during runtime. If a * file that wasn't in the cache is being stat()ed, and the cache is full, * then the oldest cache entry will be removed. * * This class is fully thread-safe. */ class CachedFileStat { public: /** Represents a cached file stat entry. */ class Entry { private: /** The last return value of stat(). */ int last_result; /** The errno set by the last stat() call. */ int last_errno; /** The last time a stat() was performed. */ time_t last_time; /** * Checks whether `interval` seconds have elapsed since `begin`. * The current time is returned via the `currentTime` argument, * so that the caller doesn't have to call time() again if it needs the current * time. * * @pre begin <= time(NULL) * @return Whether `interval` seconds have elapsed since `begin`. * @throws TimeRetrievalException Something went wrong while retrieving the time. * @throws boost::thread_interrupted */ bool expired(time_t begin, unsigned int interval, time_t ¤tTime) { currentTime = SystemTime::get(); return (unsigned int) (currentTime - begin) >= interval; } public: /** The cached stat info. */ struct stat info; /** This entry's filename. */ string filename; /** * Creates a new Entry object. The file will not be * stat()ted until you call refresh(). * * @param filename The file to stat. */ Entry(const string &_filename) : filename(_filename) { memset(&info, 0, sizeof(struct stat)); last_result = -1; last_errno = 0; last_time = 0; } /** * Re-stat() the file, if necessary. If throttleRate seconds have * passed since the last time stat() was called, then the file will be * re-stat()ted. * * The stat information, which may either be the result of a new stat() call * or just the old cached information, is be available in the info * member. * * @return 0 if the stat() call succeeded or if no stat() was performed, * -1 if something went wrong while statting the file. In the latter * case, errno will be populated with an appropriate error code. * @throws TimeRetrievalException Something went wrong while retrieving the * system time. * @throws boost::thread_interrupted */ int refresh(unsigned int throttleRate) { time_t currentTime; if (expired(last_time, throttleRate, currentTime)) { last_result = syscalls::stat(filename.c_str(), &info); last_errno = errno; last_time = currentTime; return last_result; } else { errno = last_errno; return last_result; } } }; typedef boost::shared_ptr EntryPtr; typedef list EntryList; typedef StringMap EntryMap; unsigned int maxSize; EntryList entries; EntryMap cache; mutable boost::mutex lock; /** * Creates a new CachedFileStat object. * * @param maxSize The maximum cache size. A size of 0 means unlimited. */ CachedFileStat(unsigned int maxSize = 0) { this->maxSize = maxSize; } /** * Stats the given file. If `throttleRate` seconds have passed since * the last time stat() was called on this file, then the file will be * re-stat()ted, otherwise the cached stat information will be returned. * * @param filename The file to stat. * @param stat A pointer to a stat struct; the retrieved stat information * will be stored here. * @param throttleRate Tells this CachedFileStat that the file may only * be statted at most every throttleRate seconds. * @return 0 if the stat() call succeeded or if the cached stat information was used; * -1 if something went wrong while statting the file. In the latter * case, errno will be populated with an appropriate error code. * @throws SystemException Something went wrong while retrieving the * system time. stat() errors will not result in * SystemException being thrown. * @throws boost::thread_interrupted */ int stat(const StaticString &filename, struct stat *buf, unsigned int throttleRate = 0) { boost::unique_lock l(lock); EntryList::iterator it(cache.get(filename, entries.end())); EntryPtr entry; int ret; if (it == entries.end()) { // Filename not in cache. // If cache is full, remove the least recently used // cache entry. if (maxSize != 0 && cache.size() == maxSize) { EntryList::iterator listEnd(entries.end()); listEnd--; string filename2((*listEnd)->filename); entries.pop_back(); cache.remove(filename2); } // Add to cache as most recently used. entry = boost::make_shared(filename); entries.push_front(entry); cache.set(filename, entries.begin()); } else { // Cache hit. entry = *it; // Mark this cache item as most recently used. entries.splice(entries.begin(), entries, it); cache.set(filename, entries.begin()); } ret = entry->refresh(throttleRate); *buf = entry->info; return ret; } /** * Change the maximum size of the cache. If the new size is larger * than the old size, then the oldest entries in the cache are * removed. * * A size of 0 means unlimited. */ void setMaxSize(unsigned int maxSize) { boost::unique_lock l(lock); if (maxSize != 0) { int toRemove = cache.size() - maxSize; for (int i = 0; i < toRemove; i++) { string filename(entries.back()->filename); entries.pop_back(); cache.remove(filename); } } this->maxSize = maxSize; } /** * Returns whether `filename` is in the cache. */ bool knows(const StaticString &filename) const { boost::unique_lock l(lock); return cache.has(filename); } }; } // namespace Passenger #endif /* _PASSENGER_CACHED_FILE_STAT_HPP_ */ passenger-4.0.37/ext/common/Utils/Curl.h000644 000765 000024 00000013506 12233035540 020467 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_UTILS_CURL_H_ #define _PASSENGER_UTILS_CURL_H_ /** * Utilities for setting libcurl proxy information. Proxy information is contained * in a user-supplied string in the form of: * * protocol://[username:password@]host[:port][?option1,option2] * * The address may also be `none`, which indicates that proxy usage should be * explicitly disabled even when environment variables such as "http_proxy" etc * are set. * * You are supposed to prepare a CurlProxyInfo object with prepareCurlProxy(). * Keep this object alive as long as you're using the CURL handle. * Then, call setCurlProxy() to set the proxy information on the CURL handle. * * prepareCurlProxy() throws ArgumentException upon encountering an invalid * proxy address. * * If the address is an empty string, prepareCurlProxy() and setCurlProxy() * don't do anything. */ #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; struct CurlProxyInfo { string hostAndPort; string credentials; long type; bool none; bool httpTunnel; CurlProxyInfo() : type(0), none(false), httpTunnel(false) { } }; inline const CurlProxyInfo prepareCurlProxy(const string &address) { if (address.empty()) { return CurlProxyInfo(); } else if (address == "none") { CurlProxyInfo result; result.none = true; return result; } else { CurlProxyInfo result; size_t protocolLen; vector options; string::size_type pos; if (startsWith(address, "http://")) { protocolLen = strlen("http://"); result.type = CURLPROXY_HTTP; } else if (startsWith(address, "socks5://")) { protocolLen = strlen("socks5://"); result.type = CURLPROXY_SOCKS5; } else if (startsWith(address, "socks4://")) { protocolLen = strlen("socks4://"); #if LIBCURL_VERSION_NUM >= 0x070A00 result.type = CURLPROXY_SOCKS4; #else throw ArgumentException("Socks4 proxies are not supported because " "libcurl doesn't support it. Please upgrade libcurl to version " "7.10 or higher."); #endif } else if (startsWith(address, "socks4a://")) { protocolLen = strlen("socks4a://"); #if LIBCURL_VERSION_NUM >= 0x071200 result.type = CURLPROXY_SOCKS4A; #else throw ArgumentException("Socks4A proxies are not supported because " "libcurl doesn't support it. Please upgrade libcurl to version " "7.18.0 or higher."); #endif } else if (startsWith(address, "socks5h://")) { protocolLen = strlen("socks5h://"); #if LIBCURL_VERSION_NUM >= 0x071200 result.type = CURLPROXY_SOCKS5_HOSTNAME; #else throw ArgumentException("Socks5 proxies (with proxy DNS resolving) are " "not supported because libcurl doesn't support it. Please upgrade " "libcurl to version 7.18.0 or higher."); #endif } else if (address.find("://") == string::npos) { throw ArgumentException("Invalid proxy address: no protocol specified."); } else { throw ArgumentException("Only 'http' and 'socks5' proxies are supported."); } result.hostAndPort = address.substr(protocolLen); // Extract options. pos = result.hostAndPort.find("?"); if (pos != string::npos) { string optionsString = result.hostAndPort.substr(pos + 1); result.hostAndPort.erase(pos); split(optionsString, ',', options); } // Extract authentication credentials. pos = result.hostAndPort.find("@"); if (pos != string::npos) { result.credentials = result.hostAndPort.substr(0, pos); result.hostAndPort.erase(0, pos + 1); } if (result.hostAndPort.empty()) { throw ArgumentException("No proxy host name given."); } foreach (const string option, options) { if (option == "tunnel") { if (result.type == CURLPROXY_HTTP) { result.httpTunnel = true; } else { throw ArgumentException("The 'tunnel' option is only supported for HTTP proxies."); } } else { throw ArgumentException("Invalid proxy address option '" + option + "'."); } } return result; } } inline void setCurlProxy(CURL *curl, const CurlProxyInfo &proxyInfo) { if (proxyInfo.hostAndPort.empty()) { return; } else if (proxyInfo.none) { curl_easy_setopt(curl, CURLOPT_PROXY, ""); } else { curl_easy_setopt(curl, CURLOPT_PROXY, proxyInfo.hostAndPort.c_str()); curl_easy_setopt(curl, CURLOPT_PROXYTYPE, proxyInfo.type); curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, proxyInfo.credentials.c_str()); if (proxyInfo.httpTunnel) { curl_easy_setopt(curl, CURLOPT_HTTPPROXYTUNNEL, 1); } } } } // namespace Passenger #endif /* _PASSENGER_UTILS_CURL_H_ */ passenger-4.0.37/ext/common/Utils/Dechunker.h000644 000765 000024 00000012372 12233035540 021472 0ustar00honglistaff000000 000000 #ifndef _PASSENGER_DECHUNKER_H_ #define _PASSENGER_DECHUNKER_H_ #include #include #include #include #include #include namespace Passenger { using namespace std; /** * Parses data in HTTP/1.1 chunked transfer encoding. * * Feed data into this parser by calling feed(). Do this until acceptingInput() * is false. Any data chunks it has parsed will be emitted through the onData * callback. This parser is zero-copy so the callback arguments point to the * fed data. * * Dechunker parses until the terminating chunk or until a parse error occurs. * After that it will refuse to accept new data until reset() is called. */ class Dechunker { public: typedef void (*DataCallback)(const char *data, size_t size, void *userData); typedef void (*Callback)(void *userData); private: static const char CR = '\x0D'; static const char LF = '\x0A'; char sizeBuffer[10]; unsigned int sizeBufferLen; unsigned int remainingDataSize; const char *errorMessage; enum { EXPECTING_SIZE, EXPECTING_CHUNK_EXTENSION, EXPECTING_HEADER_LF, EXPECTING_DATA, EXPECTING_NON_FINAL_CR, EXPECTING_NON_FINAL_LF, EXPECTING_FINAL_CR, EXPECTING_FINAL_LF, DONE, ERROR } state; void setError(const char *message) { errorMessage = message; state = ERROR; } bool isDigit(char ch) const { return (ch >= '0' && ch <= '9') || (ch >= 'a' && ch <= 'f') || (ch >= 'A' && ch <= 'Z'); } void parseSizeBuffer() { remainingDataSize = hexToUint(StaticString(sizeBuffer, sizeBufferLen)); } void emitDataEvent(const char *data, size_t size) const { if (onData != NULL) { onData(data, size, userData); } } void emitEndEvent() const { if (onEnd != NULL) { onEnd(userData); } } public: DataCallback onData; Callback onEnd; void *userData; Dechunker() { onData = NULL; onEnd = NULL; userData = NULL; reset(); } /** * Resets the internal state so that this Dechunker can be reused * for parsing new data. * * @post acceptingInput() * @post !hasError() */ void reset() { state = EXPECTING_SIZE; sizeBufferLen = 0; remainingDataSize = 0; errorMessage = NULL; } /** * Feeds data into this parser. Any data chunks it has parsed will be emitted * through the onData callback. Returns the number of bytes that have been * accepted. Any data not recognized as part of the chunked transfer encoding * stream will be rejected. */ size_t feed(const char *data, size_t size) { const char *current = data; const char *end = data + size; const char *needle; size_t dataSize; while (current < end && state != DONE && state != ERROR) { switch (state) { case EXPECTING_DATA: dataSize = std::min(size_t(remainingDataSize), size_t(end - current)); if (dataSize == 0) { state = EXPECTING_FINAL_CR; } else { emitDataEvent(current, dataSize); current += dataSize; remainingDataSize -= (unsigned int) dataSize; if (remainingDataSize == 0) { state = EXPECTING_NON_FINAL_CR; } } break; case EXPECTING_SIZE: while (current < end && sizeBufferLen < sizeof(sizeBuffer) && state == EXPECTING_SIZE) { if (*current == CR) { parseSizeBuffer(); state = EXPECTING_HEADER_LF; } else if (*current == ';') { parseSizeBuffer(); state = EXPECTING_CHUNK_EXTENSION; } else if (isDigit(*current)) { sizeBuffer[sizeBufferLen] = *current; sizeBufferLen++; } else { setError("Parse error: invalid chunk size character."); current--; } current++; } if (sizeBufferLen == sizeof(sizeBuffer) && state == EXPECTING_SIZE) { setError("The chunk size header is too large."); } break; case EXPECTING_CHUNK_EXTENSION: needle = (const char *) memchr(current, CR, end - current); if (needle == NULL) { current = end; } else { current = needle + 1; state = EXPECTING_HEADER_LF; } break; case EXPECTING_HEADER_LF: if (*current == LF) { state = EXPECTING_DATA; current++; } else { setError("Parse error: expected a chunk header LF."); } break; case EXPECTING_NON_FINAL_CR: if (*current == CR) { state = EXPECTING_NON_FINAL_LF; current++; } else { setError("Parse error: expected a chunk finalizing CR."); } break; case EXPECTING_NON_FINAL_LF: if (*current == LF) { reset(); current++; } else { setError("Parse error: expected a chunk finalizing LF."); } break; case EXPECTING_FINAL_CR: if (*current == CR) { state = EXPECTING_FINAL_LF; current++; } else { setError("Parse error: expected a final CR."); } break; case EXPECTING_FINAL_LF: if (*current == LF) { emitEndEvent(); state = DONE; current++; } else { setError("Parse error: expected a final LF."); } break; default: abort(); } } return current - data; } bool acceptingInput() const { return state != DONE && state != ERROR; } bool hasError() const { return state == ERROR; } const char *getErrorMessage() const { return errorMessage; } }; } // namespace Passenger #endif /* _PASSENGER_DECHUNKER_H_ */ passenger-4.0.37/ext/common/Utils/fib.c000644 000765 000024 00000030323 12233035540 020311 0ustar00honglistaff000000 000000 /*- * Copyright 1997-2003 John-Mark Gurney. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $Id: fib.c,v 1.31 2003/01/14 10:11:30 jmg Exp $ * */ #include "fib.h" #include "fibpriv.h" #include #include #define swap(type, a, b) \ do { \ type c; \ c = a; \ a = b; \ b = c; \ } while (0) \ #define INT_BITS (sizeof(int) * 8) static inline int ceillog2(unsigned int a) { int oa; int i; int b; oa = a; b = INT_BITS / 2; i = 0; while (b) { i = (i << 1); if (a >= (unsigned int) (1 << b)) { a /= (1 << b); i = i | 1; } else a &= (1 << b) - 1; b /= 2; } if ((1 << i) == oa) return i; else return i + 1; } /* * Private Heap Functions */ static void fh_deleteel(struct fibheap *h, struct fibheap_el *x) { void *data; int key; data = x->fhe_data; key = x->fhe_key; if (!h->fh_keys) fh_replacedata(h, x, h->fh_neginf); else fh_replacekey(h, x, INT_MIN); if (fh_extractminel(h) != x) { /* * XXX - This should never happen as fh_replace should set it * to min. */ abort(); } x->fhe_data = data; x->fhe_key = key; } void fh_initheap(struct fibheap *h) { h->fh_cmp_fnct = NULL; h->fh_neginf = NULL; h->fh_n = 0; h->fh_Dl = -1; h->fh_cons = NULL; h->fh_min = NULL; h->fh_root = NULL; h->fh_keys = 0; #ifdef FH_STATS h->fh_maxn = 0; h->fh_ninserts = 0; h->fh_nextracts = 0; #endif } void fh_destroyheap(struct fibheap *h) { h->fh_cmp_fnct = NULL; h->fh_neginf = NULL; if (h->fh_cons != NULL) free(h->fh_cons); h->fh_cons = NULL; } /* * Public Heap Functions */ struct fibheap * fh_makekeyheap() { struct fibheap *n; if ((n = (struct fibheap *) malloc(sizeof *n)) == NULL) return NULL; fh_initheap(n); n->fh_keys = 1; return n; } struct fibheap * fh_makeheap() { struct fibheap *n; if ((n = (struct fibheap *) malloc(sizeof *n)) == NULL) return NULL; fh_initheap(n); return n; } voidcmp fh_setcmp(struct fibheap *h, voidcmp fnct) { voidcmp oldfnct; oldfnct = h->fh_cmp_fnct; h->fh_cmp_fnct = fnct; return oldfnct; } void * fh_setneginf(struct fibheap *h, void *data) { void *old; old = h->fh_neginf; h->fh_neginf = data; return old; } struct fibheap * fh_union(struct fibheap *ha, struct fibheap *hb) { struct fibheap_el *x; if (ha->fh_root == NULL || hb->fh_root == NULL) { /* either one or both are empty */ if (ha->fh_root == NULL) { fh_destroyheap(ha); free(ha); return hb; } else { fh_destroyheap(hb); free(hb); return ha; } } ha->fh_root->fhe_left->fhe_right = hb->fh_root; hb->fh_root->fhe_left->fhe_right = ha->fh_root; x = ha->fh_root->fhe_left; ha->fh_root->fhe_left = hb->fh_root->fhe_left; hb->fh_root->fhe_left = x; ha->fh_n += hb->fh_n; /* * we probably should also keep stats on number of unions */ /* set fh_min if necessary */ if (fh_compare(ha, hb->fh_min, ha->fh_min) < 0) ha->fh_min = hb->fh_min; fh_destroyheap(hb); free(hb); return ha; } void fh_deleteheap(struct fibheap *h) { /* * We could do this even faster by walking each binomial tree, but * this is simpler to code. */ while (h->fh_min != NULL) fhe_destroy(fh_extractminel(h)); fh_destroyheap(h); free(h); } /* * Public Key Heap Functions */ struct fibheap_el * fh_insertkey(struct fibheap *h, int key, void *data) { struct fibheap_el *x; if ((x = fhe_newelem()) == NULL) return NULL; /* just insert on root list, and make sure it's not the new min */ x->fhe_data = data; x->fhe_key = key; fh_insertel(h, x); return x; } int fh_minkey(struct fibheap *h) { if (h->fh_min == NULL) return INT_MIN; return h->fh_min->fhe_key; } int fh_replacekey(struct fibheap *h, struct fibheap_el *x, int key) { int ret; ret = x->fhe_key; (void)fh_replacekeydata(h, x, key, x->fhe_data); return ret; } void * fh_replacekeydata(struct fibheap *h, struct fibheap_el *x, int key, void *data) { void *odata; int okey; struct fibheap_el *y; int r; odata = x->fhe_data; okey = x->fhe_key; /* * we can increase a key by deleting and reinserting, that * requires O(lgn) time. */ if ((r = fh_comparedata(h, key, data, x)) > 0) { /* XXX - bad code! */ abort(); fh_deleteel(h, x); x->fhe_data = data; x->fhe_key = key; fh_insertel(h, x); return odata; } x->fhe_data = data; x->fhe_key = key; /* because they are equal, we don't have to do anything */ if (r == 0) return odata; y = x->fhe_p; if (h->fh_keys && okey == key) return odata; if (y != NULL && fh_compare(h, x, y) <= 0) { fh_cut(h, x, y); fh_cascading_cut(h, y); } /* * the = is so that the call from fh_delete will delete the proper * element. */ if (fh_compare(h, x, h->fh_min) <= 0) h->fh_min = x; return odata; } /* * Public void * Heap Functions */ /* * this will return these values: * NULL failed for some reason * ptr token to use for manipulation of data */ struct fibheap_el * fh_insert(struct fibheap *h, void *data) { struct fibheap_el *x; if ((x = fhe_newelem()) == NULL) return NULL; /* just insert on root list, and make sure it's not the new min */ x->fhe_data = data; fh_insertel(h, x); return x; } void * fh_min(struct fibheap *h) { if (h->fh_min == NULL) return NULL; return h->fh_min->fhe_data; } void * fh_extractmin(struct fibheap *h) { struct fibheap_el *z; void *ret; ret = NULL; if (h->fh_min != NULL) { z = fh_extractminel(h); ret = z->fhe_data; #ifndef NO_FREE fhe_destroy(z); #endif } return ret; } void * fh_replacedata(struct fibheap *h, struct fibheap_el *x, void *data) { return fh_replacekeydata(h, x, x->fhe_key, data); } void * fh_delete(struct fibheap *h, struct fibheap_el *x) { void *k; k = x->fhe_data; if (!h->fh_keys) fh_replacedata(h, x, h->fh_neginf); else fh_replacekey(h, x, INT_MIN); fh_extractmin(h); return k; } /* * Statistics Functions */ #ifdef FH_STATS int fh_maxn(struct fibheap *h) { return h->fh_maxn; } int fh_ninserts(struct fibheap *h) { return h->fh_ninserts; } int fh_nextracts(struct fibheap *h) { return h->fh_nextracts; } #endif /* * begin of private element fuctions */ static struct fibheap_el * fh_extractminel(struct fibheap *h) { struct fibheap_el *ret; struct fibheap_el *x, *y, *orig; ret = h->fh_min; orig = NULL; /* put all the children on the root list */ /* for true consistancy, we should use fhe_remove */ for(x = ret->fhe_child; x != orig && x != NULL;) { if (orig == NULL) orig = x; y = x->fhe_right; x->fhe_p = NULL; fh_insertrootlist(h, x); x = y; } /* remove minimum from root list */ fh_removerootlist(h, ret); h->fh_n--; /* if we aren't empty, consolidate the heap */ if (h->fh_n == 0) h->fh_min = NULL; else { h->fh_min = ret->fhe_right; fh_consolidate(h); } #ifdef FH_STATS h->fh_nextracts++; #endif return ret; } static void fh_insertrootlist(struct fibheap *h, struct fibheap_el *x) { if (h->fh_root == NULL) { h->fh_root = x; x->fhe_left = x; x->fhe_right = x; return; } fhe_insertafter(h->fh_root, x); } static void fh_removerootlist(struct fibheap *h, struct fibheap_el *x) { if (x->fhe_left == x) h->fh_root = NULL; else h->fh_root = fhe_remove(x); } static void fh_consolidate(struct fibheap *h) { struct fibheap_el **a; struct fibheap_el *w; struct fibheap_el *y; struct fibheap_el *x; int i; int d; int D; fh_checkcons(h); /* assign a the value of h->fh_cons so I don't have to rewrite code */ D = h->fh_Dl + 1; a = h->fh_cons; for (i = 0; i < D; i++) a[i] = NULL; while ((w = h->fh_root) != NULL) { x = w; fh_removerootlist(h, w); d = x->fhe_degree; /* XXX - assert that d < D */ while(a[d] != NULL) { y = a[d]; if (fh_compare(h, x, y) > 0) swap(struct fibheap_el *, x, y); fh_heaplink(h, y, x); a[d] = NULL; d++; } a[d] = x; } h->fh_min = NULL; for (i = 0; i < D; i++) if (a[i] != NULL) { fh_insertrootlist(h, a[i]); if (h->fh_min == NULL || fh_compare(h, a[i], h->fh_min) < 0) h->fh_min = a[i]; } } static void fh_heaplink(struct fibheap *h, struct fibheap_el *y, struct fibheap_el *x) { /* make y a child of x */ if (x->fhe_child == NULL) x->fhe_child = y; else fhe_insertbefore(x->fhe_child, y); y->fhe_p = x; x->fhe_degree++; y->fhe_mark = 0; } static void fh_cut(struct fibheap *h, struct fibheap_el *x, struct fibheap_el *y) { fhe_remove(x); y->fhe_degree--; fh_insertrootlist(h, x); x->fhe_p = NULL; x->fhe_mark = 0; } static void fh_cascading_cut(struct fibheap *h, struct fibheap_el *y) { struct fibheap_el *z; while ((z = y->fhe_p) != NULL) { if (y->fhe_mark == 0) { y->fhe_mark = 1; return; } else { fh_cut(h, y, z); y = z; } } } /* * begining of handling elements of fibheap */ static struct fibheap_el * fhe_newelem() { struct fibheap_el *e; if ((e = (struct fibheap_el *) malloc(sizeof *e)) == NULL) return NULL; fhe_initelem(e); return e; } static void fhe_initelem(struct fibheap_el *e) { e->fhe_degree = 0; e->fhe_mark = 0; e->fhe_p = NULL; e->fhe_child = NULL; e->fhe_left = e; e->fhe_right = e; e->fhe_data = NULL; } static void fhe_insertafter(struct fibheap_el *a, struct fibheap_el *b) { if (a == a->fhe_right) { a->fhe_right = b; a->fhe_left = b; b->fhe_right = a; b->fhe_left = a; } else { b->fhe_right = a->fhe_right; a->fhe_right->fhe_left = b; a->fhe_right = b; b->fhe_left = a; } } static inline void fhe_insertbefore(struct fibheap_el *a, struct fibheap_el *b) { fhe_insertafter(a->fhe_left, b); } static struct fibheap_el * fhe_remove(struct fibheap_el *x) { struct fibheap_el *ret; if (x == x->fhe_left) ret = NULL; else ret = x->fhe_left; /* fix the parent pointer */ if (x->fhe_p != NULL && x->fhe_p->fhe_child == x) x->fhe_p->fhe_child = ret; x->fhe_right->fhe_left = x->fhe_left; x->fhe_left->fhe_right = x->fhe_right; /* clear out hanging pointers */ x->fhe_p = NULL; x->fhe_left = x; x->fhe_right = x; return ret; } static void fh_checkcons(struct fibheap *h) { int oDl; /* make sure we have enough memory allocated to "reorganize" */ if (h->fh_Dl == -1 || h->fh_n > (1 << h->fh_Dl)) { oDl = h->fh_Dl; if ((h->fh_Dl = ceillog2(h->fh_n) + 1) < 8) h->fh_Dl = 8; if (oDl != h->fh_Dl) h->fh_cons = (struct fibheap_el **)realloc(h->fh_cons, sizeof *h->fh_cons * (h->fh_Dl + 1)); if (h->fh_cons == NULL) abort(); } } static int fh_compare(struct fibheap *h, struct fibheap_el *a, struct fibheap_el *b) { if (h->fh_keys) { if (a->fhe_key < b->fhe_key) return -1; if (a->fhe_key == b->fhe_key) return 0; return 1; } else return h->fh_cmp_fnct(a->fhe_data, b->fhe_data); } static int fh_comparedata(struct fibheap *h, int key, void *data, struct fibheap_el *b) { struct fibheap_el a; a.fhe_key = key; a.fhe_data = data; return fh_compare(h, &a, b); } static void fh_insertel(struct fibheap *h, struct fibheap_el *x) { fh_insertrootlist(h, x); if (h->fh_min == NULL || (h->fh_keys ? x->fhe_key < h->fh_min->fhe_key : h->fh_cmp_fnct(x->fhe_data, h->fh_min->fhe_data) < 0)) h->fh_min = x; h->fh_n++; #ifdef FH_STATS if (h->fh_n > h->fh_maxn) h->fh_maxn = h->fh_n; h->fh_ninserts++; #endif } passenger-4.0.37/ext/common/Utils/fib.h000644 000765 000024 00000006235 12233035540 020323 0ustar00honglistaff000000 000000 /*- * Copyright 1997, 1998-2003 John-Mark Gurney. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $Id: fib.h,v 1.10 2003/01/14 10:11:30 jmg Exp $ * */ #ifndef _FIB_H_ #define _FIB_H_ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ struct fibheap_el; typedef int (*voidcmp)(void *, void *); struct fibheap { int (*fh_cmp_fnct)(void *, void *); int fh_n; int fh_Dl; struct fibheap_el **fh_cons; struct fibheap_el *fh_min; struct fibheap_el *fh_root; void *fh_neginf; int fh_keys : 1; #ifdef FH_STATS int fh_maxn; int fh_ninserts; int fh_nextracts; #endif }; struct fibheap_el { int fhe_degree; int fhe_mark; struct fibheap_el *fhe_p; struct fibheap_el *fhe_child; struct fibheap_el *fhe_left; struct fibheap_el *fhe_right; int fhe_key; void *fhe_data; }; /* functions for key heaps */ struct fibheap *fh_makekeyheap(void); void fh_initheap(struct fibheap *); struct fibheap_el *fh_insertkey(struct fibheap *, int, void *); int fh_minkey(struct fibheap *); int fh_replacekey(struct fibheap *, struct fibheap_el *, int); void *fh_replacekeydata(struct fibheap *, struct fibheap_el *, int, void *); /* functions for void * heaps */ struct fibheap *fh_makeheap(void); voidcmp fh_setcmp(struct fibheap *, voidcmp); void *fh_setneginf(struct fibheap *, void *); struct fibheap_el *fh_insert(struct fibheap *, void *); /* shared functions */ void *fh_extractmin(struct fibheap *); void *fh_min(struct fibheap *); void *fh_replacedata(struct fibheap *, struct fibheap_el *, void *); void *fh_delete(struct fibheap *, struct fibheap_el *); void fh_deleteheap(struct fibheap *); void fh_destroyheap(struct fibheap *h); /* this assumes both heaps are allocated on the heap */ struct fibheap *fh_union(struct fibheap *, struct fibheap *); #ifdef FH_STATS int fh_maxn(struct fibheap *); int fh_ninserts(struct fibheap *); int fh_nextracts(struct fibheap *); #endif #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _FIB_H_ */ passenger-4.0.37/ext/common/Utils/fibpriv.h000644 000765 000024 00000005405 12233035540 021222 0ustar00honglistaff000000 000000 /*- * Copyright 1997, 1999-2003 John-Mark Gurney. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * $Id: fibpriv.h,v 1.12 2003/01/14 10:11:30 jmg Exp $ * */ #ifndef _FIBPRIV_H_ #define _FIBPRIV_H_ /* * global heap operations */ static void fh_insertrootlist(struct fibheap *, struct fibheap_el *); static void fh_removerootlist(struct fibheap *, struct fibheap_el *); static void fh_consolidate(struct fibheap *); static void fh_heaplink(struct fibheap *h, struct fibheap_el *y, struct fibheap_el *x); static void fh_cut(struct fibheap *, struct fibheap_el *, struct fibheap_el *); static void fh_cascading_cut(struct fibheap *, struct fibheap_el *); static struct fibheap_el *fh_extractminel(struct fibheap *); static void fh_checkcons(struct fibheap *h); static int fh_compare(struct fibheap *h, struct fibheap_el *a, struct fibheap_el *b); static int fh_comparedata(struct fibheap *h, int key, void *data, struct fibheap_el *b); static void fh_insertel(struct fibheap *h, struct fibheap_el *x); static void fh_deleteel(struct fibheap *h, struct fibheap_el *x); /* * specific node operations */ static struct fibheap_el *fhe_newelem(void); static void fhe_initelem(struct fibheap_el *); static void fhe_insertafter(struct fibheap_el *a, struct fibheap_el *b); static inline void fhe_insertbefore(struct fibheap_el *a, struct fibheap_el *b); static struct fibheap_el *fhe_remove(struct fibheap_el *a); #define fhe_destroy(x) free((x)) /* * general functions */ static inline int ceillog2(unsigned int a); #endif /* _FIBPRIV_H_ */ passenger-4.0.37/ext/common/Utils/FileChangeChecker.h000644 000765 000024 00000014655 12233035540 023042 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_CHANGE_FILE_CHECKER_H_ #define _PASSENGER_CHANGE_FILE_CHECKER_H_ #include #include #include #include "CachedFileStat.hpp" #include "SystemTime.h" namespace Passenger { using namespace std; using namespace oxt; /** * A utility class for checking for file changes. Example: * * @code * FileChangeChecker checker; * checker.changed("foo.txt"); // false * writeToFile("foo.txt"); * checker.changed("foo.txt"); // true * checker.changed("foo.txt"); // false * @endcode * * FileChangeChecker uses stat() to retrieve file information. It also * supports throttling in order to limit the number of actual stat() calls. * This can improve performance on systems where disk I/O is a problem. */ class FileChangeChecker { private: struct Entry { string filename; time_t lastMtime; time_t lastCtime; Entry(const string &filename) { this->filename = filename; this->lastMtime = 0; this->lastCtime = 0; } }; typedef boost::shared_ptr EntryPtr; typedef list EntryList; typedef map EntryMap; CachedFileStat cstat; mutable boost::mutex lock; unsigned int maxSize; EntryList entries; EntryMap fileToEntry; public: /** * Create a FileChangeChecker object. * * @param maxSize The maximum size of the internal file list. A size of 0 means unlimited. */ FileChangeChecker(unsigned int maxSize = 0) : cstat(maxSize) { this->maxSize = maxSize; } /** * Checks whether, since the last call to changed() with this filename, * the file's timestamp has changed or whether the file has been created * or removed. If the stat() call fails for any other reason (e.g. the * directory is not readable) then this method will return false. * * If this method was called with this filename for the first time, or if * information about this file has since been removed from the internal * file list, then this method will return whether the file is stat()-able. * That is, if the file doesn't exist then it will return false, but if * the directory is not readable then it will also return false. * * @param filename The file to check. Note that two different filename * strings are treated as two different files, so you should * use absolute filenames if you change working directory * often. * @param throttleRate When set to a non-zero value, throttling will be * enabled. stat() will be called at most once per * throttleRate seconds. * @throws TimeRetrievalException Something went wrong while retrieving the * system time. * @throws boost::thread_interrupted */ bool changed(const string &filename, unsigned int throttleRate = 0) { boost::unique_lock l(lock); EntryMap::iterator it(fileToEntry.find(filename)); EntryPtr entry; struct stat buf; bool result, newEntry = false; int ret; if (it == fileToEntry.end()) { // Filename not in file list. // If file list is full, remove the least recently used // file list entry. if (maxSize != 0 && fileToEntry.size() == maxSize) { EntryList::iterator listEnd(entries.end()); listEnd--; string filename((*listEnd)->filename); entries.pop_back(); fileToEntry.erase(filename); } // Add to file list as most recently used. entry = EntryPtr(new Entry(filename)); entries.push_front(entry); fileToEntry[filename] = entries.begin(); newEntry = true; } else { // Filename is in file list. entry = *it->second; // Mark this entry as most recently used. entries.erase(it->second); entries.push_front(entry); fileToEntry[filename] = entries.begin(); } ret = cstat.stat(filename, &buf, throttleRate); if (newEntry) { // The file's information isn't in the file list. if (ret == -1) { entry->lastMtime = 0; entry->lastCtime = 0; return false; } else { entry->lastMtime = buf.st_mtime; entry->lastCtime = buf.st_ctime; return true; } } else { // The file's information was already in the file list. if (ret == -1 && errno == ENOENT) { result = false; entry->lastMtime = 0; entry->lastCtime = 0; } else if (ret == -1) { result = false; } else { result = entry->lastMtime != buf.st_mtime || entry->lastCtime != buf.st_ctime; entry->lastMtime = buf.st_mtime; entry->lastCtime = buf.st_ctime; } return result; } } /** * Change the maximum size of the internal file list. * * A size of 0 means unlimited. */ void setMaxSize(unsigned int maxSize) { boost::unique_lock l(lock); if (maxSize != 0) { int toRemove = fileToEntry.size() - maxSize; for (int i = 0; i < toRemove; i++) { string filename(entries.back()->filename); entries.pop_back(); fileToEntry.erase(filename); } } this->maxSize = maxSize; cstat.setMaxSize(maxSize); } /** * Returns whether filename is in the internal file list. */ bool knows(const string &filename) const { boost::unique_lock l(lock); return fileToEntry.find(filename) != fileToEntry.end(); } }; } // namespace Passenger #endif /* _PASSENGER_CHANGE_FILE_CHECKER_H_ */ passenger-4.0.37/ext/common/Utils/HashMap.h000644 000765 000024 00000004426 12233035540 021104 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_HASH_MAP_H_ #define _PASSENGER_HASH_MAP_H_ /* * There are too many ways to include hash_map/unordered_map! * This header autodetects the correct method. */ #if defined(HAS_UNORDERED_MAP) #include #define HashMap std::unordered_map #elif defined(HAS_TR1_UNORDERED_MAP) #include #define HashMap std::tr1::unordered_map #elif defined(HASH_NAMESPACE) && defined(HASH_MAP_HEADER) #ifndef _GLIBCXX_PERMIT_BACKWARD_HASH // Prevent deprecation warning on newer libstdc++ systems. // The warning suggests using unordered_map, but that is only // available when C++11 features are explicitly enabled. #define _GLIBCXX_PERMIT_BACKWARD_HASH #endif #include HASH_MAP_HEADER #define HashMap HASH_NAMESPACE::hash_map #elif defined(__GNUC__) #include #define HashMap __gnu_cxx::hash_map #elif defined(_MSC_VER) #include #define HashMap stdext::hash_map #else #include #define HashMap boost::unordered_map #endif #endif /* _PASSENGER_HASH_MAP_H_ */ passenger-4.0.37/ext/common/Utils/HttpConstants.h000644 000765 000024 00000010677 12233035540 022404 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_HTTP_CONSTANTS_H_ #define _PASSENGER_HTTP_CONSTANTS_H_ namespace Passenger { inline const char * getStatusCodeAndReasonPhrase(int statusCode) { // http://en.wikipedia.org/wiki/List_of_HTTP_status_codes switch (statusCode) { case 100: return "100 Continue"; case 101: return "101 Switching Protocols"; case 102: return "102 Processing"; case 200: return "200 OK"; case 201: return "201 Created"; case 202: return "202 Accepted"; case 203: return "203 Non-Authoritative Information"; case 204: return "204 No Content"; case 205: return "205 Reset Content"; case 206: return "206 Partial Content"; case 207: return "207 Multi-Status"; case 208: return "208 Already Reported"; case 226: return "226 IM Used"; case 300: return "300 Multiple Choices"; case 301: return "301 Moved Permanently"; case 302: return "302 Found"; case 303: return "303 See Other"; case 304: return "304 Not Modified"; case 305: return "305 Use Proxy"; case 306: return "306 Switch Proxy"; case 307: return "307 Temporary Redirect"; case 308: // Google Gears: http://code.google.com/p/gears/wiki/ResumableHttpRequestsProposal return "308 Resume Incomplete"; case 400: return "400 Bad Request"; case 401: return "401 Unauthorized"; case 402: return "402 Payment Required"; case 403: return "403 Forbidden"; case 404: return "404 Not Found"; case 405: return "405 Method Not Allowed"; case 406: return "406 Not Acceptable"; case 407: return "407 Proxy Authentication Required"; case 408: return "408 Request Timeout"; case 409: return "409 Conflict"; case 410: return "410 Gone"; case 411: return "411 Length Required"; case 412: return "412 Precondition Failed"; case 413: return "413 Request Entity Too Large"; case 414: return "414 Request-URI Too Long"; case 415: return "415 Unsupported Media Type"; case 416: return "416 Requested Range Not Satisfiable"; case 417: return "417 Expectation Failed"; case 418: return "418 Not A Funny April Fools Joke"; case 420: // https://dev.twitter.com/docs/error-codes-responses return "420 Enhance Your Calm"; case 422: return "422 Unprocessable Entity"; case 423: return "423 Locked"; case 424: return "424 Unordered Collection"; case 426: return "426 Upgrade Required"; case 428: return "428 Precondition Required"; case 429: return "429 Too Many Requests"; case 431: return "431 Request Header Fields Too Large"; case 444: // Nginx specific, used for timeouts. return "444 No Response"; case 449: return "449 Retry With"; case 450: return "450 Blocked"; case 500: return "500 Internal Server Error"; case 501: return "501 Not Implemented"; case 502: return "502 Bad Gateway"; case 503: return "503 Service Unavailable"; case 504: return "504 Gateway Timeout"; case 505: return "505 HTTP Version Not Supported"; case 506: return "506 Variant Also Negotiates"; case 507: return "507 Insufficient Storage"; case 509: return "509 Bandwidth Limit Exceeded"; case 510: return "510 Not Extended"; case 511: return "511 Network Authentication Required"; default: return (const char *) 0; } } } // namespace Passenger #endif /* _PASSENGER_HTTP_CONSTANTS_H_ */ passenger-4.0.37/ext/common/Utils/HttpHeaderBufferer.h000644 000765 000024 00000010424 12233035540 023267 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_HTTP_HEADER_BUFFERER_ #define _PASSENGER_HTTP_HEADER_BUFFERER_ #include #include #include #include #include #include namespace Passenger { using namespace std; /** * Buffers an entire HTTP header, including terminating "\r\n\r\n". * * Feed data until acceptingInput() is false. The entire HTTP header * will become available through getData(). Non-HTTP header data is * not consumed and will not be included in getData(). * * This class has zero-copy support. If the first feed already contains * an entire HTTP header getData() will point to the fed data. Otherwise * this class will put data in an internal buffer, and getData() will * point to the internal buffer. * * This class also supports size checking through setMax(). If the HTTP * header exceeds this size then this bufferer will enter an error state. * The default max size is 128 KB. */ class HttpHeaderBufferer { private: struct StaticData { StreamBMH_Occ occ; StaticData() { sbmh_init(NULL, &occ, (const unsigned char *) "\r\n\r\n", 4); } }; static StaticData staticData; string buffer; StaticString data; unsigned int max; enum { WORKING, DONE, ERROR } state; union { struct StreamBMH terminatorFinder; char padding[SBMH_SIZE(4)]; } u; public: HttpHeaderBufferer() { sbmh_init(&u.terminatorFinder, NULL, (const unsigned char *) "\r\n\r\n", 4); max = 1024 * 128; reset(); } void setMax(unsigned int value) { max = value; } void reset() { buffer.clear(); data = StaticString("", 0); sbmh_reset(&u.terminatorFinder); state = WORKING; } size_t feed(const char *data, size_t size) { if (state == DONE || state == ERROR) { return 0; } size_t accepted, feedSize; if (buffer.empty()) { feedSize = std::min(size, max); accepted = sbmh_feed(&u.terminatorFinder, &staticData.occ, (const unsigned char *) "\r\n\r\n", 4, (const unsigned char *) data, feedSize); if (u.terminatorFinder.found) { state = DONE; this->data = StaticString(data, accepted); } else if (feedSize == max) { state = ERROR; this->data = StaticString(data, accepted); } else { assert(accepted == size); buffer.append(data, size); this->data = buffer; } } else { feedSize = std::min(size, max - buffer.size()); accepted = sbmh_feed(&u.terminatorFinder, &staticData.occ, (const unsigned char *) "\r\n\r\n", 4, (const unsigned char *) data, feedSize); buffer.append(data, accepted); this->data = buffer; if (u.terminatorFinder.found) { state = DONE; } else if (buffer.size() == (size_t) max) { state = ERROR; } } return accepted; } bool acceptingInput() const { return state == WORKING; } bool hasError() const { return state == ERROR; } /** * Get the data that has been fed so far. */ StaticString getData() const { return data; } }; } // namespace Passenger #endif /* _PASSENGER_HTTP_HEADER_BUFFERER_ */ passenger-4.0.37/ext/common/Utils/IniFile.h000644 000765 000024 00000027463 12233035540 021110 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_INI_FILE_H_ #define _PASSENGER_INI_FILE_H_ #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; class IniFileSection { protected: typedef map ValueMap; string sectionName; ValueMap values; public: IniFileSection(const string §ionName) { this->sectionName = sectionName; } bool hasKey(const string &keyName) const { return values.find(keyName) != values.end(); } string get(const string &keyName) const { ValueMap::const_iterator it = values.find(keyName); if (it != values.end()) { return it->second; } else { return string(); } } string operator[](const string &keyName) const { return get(keyName); } void set(const string &keyName, const string &value) { values[keyName] = value; } string getSectionName() const { return sectionName; } void inspect() const { ValueMap::const_iterator it = values.begin(); while (it != values.end()) { cout << it->first << " = " << it->second << endl; it++; } } }; class IniFileLexer { public: class Token { public: enum Kind { UNKNOWN = 0, NEWLINE, SECTION_NAME, IDENTIFIER, ASSIGNMENT, TEXT, END_OF_FILE }; const Kind kind; const string value; const int line; const int column; // String representations of the Kind enum. const static char *identityByKind(Kind kind) { const static char* KIND_IDENTITY_TABLE[] = { "", "", "", "", "", "", "" }; return KIND_IDENTITY_TABLE[kind]; } Token(const Kind kind, const string &value, const int line, const int column) : kind(kind), value(value), line(line), column(column) { } class ExpectanceException : public std::exception { private: char message[255]; public: ExpectanceException(char expected, char got, int line, int column) { int messageSize = sizeof(message); memset(message, 0, messageSize); snprintf(message, messageSize, "On line %i, column %i: Expected '%c', got '%c' instead.", line, column, expected, got); } ExpectanceException(Token::Kind expected, Token got) { const char *expectedKindString = Token::identityByKind(expected); int messageSize = sizeof(message); memset(message, 0, messageSize); snprintf(message, messageSize, "On line %i, column %i: Expected '%s', got '%s' instead.", got.line, got.column, expectedKindString, got.value.c_str()); } ExpectanceException(char expected, Token::Kind got, int line, int column) { const char *gotKindString = Token::identityByKind(got); int messageSize = sizeof(message); memset(message, 0, messageSize); snprintf(message, messageSize, "On line %i, column %i: Expected '%c', got '%s' instead.", line, column, expected, gotKindString); } virtual const char* what() const throw() { return message; } }; }; typedef boost::shared_ptr TokenPtr; protected: ifstream iniFileStream; char lastAcceptedChar; int upcomingChar; bool upcomingTokenPtrIsStale; int currentLine; int currentColumn; TokenPtr upcomingTokenPtr; void expect(char ch) { int upcomingChar = iniFileStream.peek(); if (ch != upcomingChar) { switch(upcomingChar) { case EOF: throw Token::ExpectanceException(ch, Token::END_OF_FILE, currentLine, currentColumn + 1); case '\n': throw Token::ExpectanceException(ch, upcomingChar, currentLine + 1, 0); default: throw Token::ExpectanceException(ch, upcomingChar, currentLine, currentColumn + 1); } } } void accept() { if (upcomingChar == EOF) return; lastAcceptedChar = (char)iniFileStream.get(); upcomingChar = iniFileStream.peek(); currentColumn++; if (lastAcceptedChar == '\n') { currentLine++; currentColumn = 1; } } void ignore() { if (upcomingChar == EOF) return; upcomingChar = iniFileStream.peek(); currentColumn++; if ((char)iniFileStream.get() == '\n') { currentLine++; currentColumn = 1; } } void expectAndAccept(char ch) { expect(ch); accept(); } void acceptWhileNewLine() { while (iniFileStream.good() && upcomingChar == '\n') { accept(); } } void ignoreWhileNotNewLine() { while (iniFileStream.good() && upcomingChar != '\n') { ignore(); } } Token tokenizeIdentifier() { int line = currentLine; int column = currentColumn; string result; while (isalnum(upcomingChar) || upcomingChar == '_' || upcomingChar == '-') { result.append(1, upcomingChar); accept(); } return Token(Token::IDENTIFIER, result, line, column); } Token tokenizeSection() { expectAndAccept('['); Token sectionName = tokenizeSectionName(); expectAndAccept(']'); return sectionName; } Token tokenizeSectionName() { int line = currentLine; int column = currentColumn; string result; //while (upcomingChar != ']' && upcomingChar != '[' && upcomingChar != '\n' && upcomingChar != EOF) { while (isalnum(upcomingChar) || upcomingChar == '_' || upcomingChar == '-') { result.append(1, upcomingChar); accept(); } return Token(Token::SECTION_NAME, result, line, column); } Token tokenizeAssignment() { expectAndAccept('='); return Token(Token::ASSIGNMENT, "=", currentLine, currentColumn); } Token tokenizeText() { int line = currentLine; int column = currentColumn; string result; while (upcomingChar != '\n' && upcomingChar != EOF) { result.append(1, upcomingChar); accept(); } return Token(Token::TEXT, result, line, column); } Token tokenizeKey() { return tokenizeIdentifier(); } Token tokenizeValue() { return tokenizeText(); } Token tokenizeUnknown() { int line = currentLine; int column = currentColumn; string result; while (upcomingChar != EOF) { result.append(1, upcomingChar); accept(); } return Token(Token::UNKNOWN, result, line, column); } public: IniFileLexer(const string &fileName) { currentLine = 1; currentColumn = 1; upcomingTokenPtrIsStale = true; iniFileStream.open(fileName.c_str()); if (iniFileStream.fail()) { int e = errno; throw FileSystemException("Cannot open file '" + fileName + "' for reading", e, fileName); } } ~IniFileLexer() { iniFileStream.close(); } int getCurrentLine() { return currentLine; } int getCurrentColumn() { return currentColumn; } TokenPtr peekToken() { if (upcomingTokenPtrIsStale) { Token upcomingToken = getToken(); upcomingTokenPtr = boost::make_shared(upcomingToken); upcomingTokenPtrIsStale = false; } return upcomingTokenPtr; } Token getToken() { if (!upcomingTokenPtrIsStale) { upcomingTokenPtrIsStale = true; return *upcomingTokenPtr; } while (iniFileStream.good()) { upcomingChar = iniFileStream.peek(); switch(upcomingChar) { case '[': return tokenizeSection(); case '\n': if (lastAcceptedChar != '\n') { accept(); return Token(Token::NEWLINE, "\n", currentLine, currentColumn); } else { ignore(); break; } case ';': // Comment encountered: accept all characters until newline (exclusive). ignoreWhileNotNewLine(); break; case '=': return tokenizeAssignment(); case EOF: return Token(Token::END_OF_FILE, "", currentLine, currentColumn); default: if (isblank(upcomingChar)) { ignore(); } else { switch(lastAcceptedChar) { case '\n': return tokenizeKey(); case '=': return tokenizeValue(); default: return tokenizeUnknown(); } } } } return Token(Token::END_OF_FILE, "", currentLine, currentColumn); } }; typedef boost::shared_ptr IniFileSectionPtr; class IniFile { protected: typedef map SectionMap; string name; SectionMap sections; class IniFileParser { typedef IniFileLexer::Token Token; protected: IniFileLexer lexer; IniFile *iniFile; // The Start Symbol. void parseSections() { while ((lexer.peekToken())->kind == Token::SECTION_NAME) { parseSection(); } } void parseSection() { Token token = acceptAndReturnif(Token::SECTION_NAME); acceptIfEOL(); string sectionName = token.value; IniFileSection *section = new IniFileSection(sectionName); iniFile->addSection(section); parseSectionBody(section); } void parseSectionBody(IniFileSection *currentSection) { while ((lexer.peekToken())->kind == Token::IDENTIFIER) { parseKeyValue(currentSection); } } void parseKeyValue(IniFileSection *currentSection) { Token identifierToken = acceptAndReturnif (Token::IDENTIFIER); acceptif (Token::ASSIGNMENT); Token valueToken = acceptAndReturnif (Token::TEXT); acceptIfEOL(); currentSection->set(identifierToken.value, valueToken.value); } void acceptif (Token::Kind expectedKind) { Token token = lexer.getToken(); if (token.kind != expectedKind) { throw Token::ExpectanceException(expectedKind, token); } } void acceptIfEOL() { Token token = lexer.getToken(); if (token.kind != Token::NEWLINE && token.kind != Token::END_OF_FILE) { throw Token::ExpectanceException(Token::NEWLINE, token); } } Token acceptAndReturnif (Token::Kind expectedKind) { Token token = lexer.getToken(); if (token.kind != expectedKind) { throw Token::ExpectanceException(expectedKind, token); } return token; } public: IniFileParser(IniFile *iniFile) : lexer(iniFile->getName()), iniFile(iniFile) { parseSections(); } }; public: IniFile(const string &iniFileName) : name(iniFileName) { IniFileParser parser(this); } void addSection(IniFileSection *section) { sections.insert(make_pair(section->getSectionName(), IniFileSectionPtr(section))); } IniFileSectionPtr section(const string §ionName) { SectionMap::iterator it = sections.find(sectionName); if (it != sections.end()) { return it->second; } else { return IniFileSectionPtr(); } } bool hasSection(const string §ionName) const { return sections.find(sectionName) != sections.end(); } string getName() const { return name; } void inspect() const { SectionMap::const_iterator it = sections.begin(); while (it != sections.end()) { cout << "[" << (it->first) << "]" << endl; it->second->inspect(); it++; } } }; } // namespace Passenger #endif /* _PASSENGER_INI_FILE_H_ */ passenger-4.0.37/ext/common/Utils/IOUtils.cpp000644 000765 000024 00000074542 12233035540 021454 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _GNU_SOURCE // Needed for IOV_MAX on Linux: // https://bugzilla.redhat.com/show_bug.cgi?id=165427 #define _GNU_SOURCE #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // Also for __GLIBC__ macro. #include #include #include #include #include #ifdef __linux__ // For accept4 macros #include #include #endif #if defined(__APPLE__) #define HAVE_FPURGE #elif defined(__GLIBC__) #include #define HAVE___FPURGE #endif #include #include #include #include #include namespace Passenger { using namespace std; using namespace oxt; // Urgh, Solaris :-( #ifndef AF_LOCAL #define AF_LOCAL AF_UNIX #endif #ifndef PF_LOCAL #define PF_LOCAL PF_UNIX #endif static WritevFunction writevFunction = syscalls::writev; bool purgeStdio(FILE *f) { #if defined(HAVE_FPURGE) fpurge(f); return true; #elif defined(HAVE___FPURGE) __fpurge(f); return true; #else return false; #endif } ServerAddressType getSocketAddressType(const StaticString &address) { const char *data = address.c_str(); size_t len = address.size(); if (len > sizeof("unix:") - 1 && memcmp(data, "unix:", sizeof("unix:") - 1) == 0) { return SAT_UNIX; } else if (len > sizeof("tcp://") - 1 && memcmp(data, "tcp://", sizeof("tcp://") - 1) == 0) { return SAT_TCP; } else { return SAT_UNKNOWN; } } string parseUnixSocketAddress(const StaticString &address) { if (getSocketAddressType(address) != SAT_UNIX) { throw ArgumentException("Not a valid Unix socket address"); } return string(address.c_str() + sizeof("unix:") - 1, address.size() - sizeof("unix:") + 1); } void parseTcpSocketAddress(const StaticString &address, string &host, unsigned short &port) { if (getSocketAddressType(address) != SAT_TCP) { throw ArgumentException("Not a valid TCP socket address"); } vector args; string begin(address.c_str() + sizeof("tcp://") - 1, address.size() - sizeof("tcp://") + 1); split(begin, ':', args); if (args.size() != 2) { throw ArgumentException("Not a valid TCP socket address"); } else { host = args[0]; port = atoi(args[1].c_str()); } } bool isLocalSocketAddress(const StaticString &address) { switch (getSocketAddressType(address)) { case SAT_UNIX: return true; case SAT_TCP: { string host; unsigned short port; parseTcpSocketAddress(address, host, port); return host == "127.0.0.1" || host == "::1" || host == "localhost"; } default: throw ArgumentException("Unsupported socket address type"); } } void setNonBlocking(int fd) { int flags, ret; do { flags = fcntl(fd, F_GETFL); } while (flags == -1 && errno == EINTR); if (flags == -1) { int e = errno; throw SystemException("Cannot set socket to non-blocking mode: " "cannot get socket flags", e); } do { ret = fcntl(fd, F_SETFL, flags | O_NONBLOCK); } while (ret == -1 && errno == EINTR); if (ret == -1) { int e = errno; throw SystemException("Cannot set socket to non-blocking mode: " "cannot set socket flags", e); } } int callAccept4(int sock, struct sockaddr *addr, socklen_t *addr_len, int options) { #if defined(HAVE_ACCEPT4) int ret; do { ret = ::accept4(sock, addr, addr_len, options); } while (ret == -1 && errno == EINTR); return ret; #elif defined(__linux__) && defined(__x86_64__) int ret; do { ret = syscall(288, sock, addr, addr_len, options); } while (ret == -1 && errno == EINTR); return ret; #else errno = ENOSYS; return -1; #endif } vector resolveHostname(const string &hostname, unsigned int port, bool shuffle) { string portString = toString(port); struct addrinfo hints, *res, *current; vector result; int ret; memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; ret = getaddrinfo(hostname.c_str(), (port == 0) ? NULL : portString.c_str(), &hints, &res); if (ret != 0) { return result; } for (current = res; current != NULL; current = current->ai_next) { char host[NI_MAXHOST]; ret = getnameinfo(current->ai_addr, current->ai_addrlen, host, sizeof(host) - 1, NULL, 0, NI_NUMERICHOST); if (ret == 0) { result.push_back(host); } } freeaddrinfo(res); if (shuffle) { random_shuffle(result.begin(), result.end()); } return result; } int createServer(const StaticString &address, unsigned int backlogSize, bool autoDelete) { TRACE_POINT(); switch (getSocketAddressType(address)) { case SAT_UNIX: return createUnixServer(parseUnixSocketAddress(address), backlogSize, autoDelete); case SAT_TCP: { string host; unsigned short port; parseTcpSocketAddress(address, host, port); return createTcpServer(host.c_str(), port, backlogSize); } default: throw ArgumentException(string("Unknown address type for '") + address + "'"); } } int createUnixServer(const StaticString &filename, unsigned int backlogSize, bool autoDelete) { struct sockaddr_un addr; int fd, ret; if (filename.size() > sizeof(addr.sun_path) - 1) { string message = "Cannot create Unix socket '"; message.append(filename.toString()); message.append("': filename is too long."); throw RuntimeException(message); } fd = syscalls::socket(PF_LOCAL, SOCK_STREAM, 0); if (fd == -1) { int e = errno; throw SystemException("Cannot create a Unix socket file descriptor", e); } FdGuard guard(fd, true); addr.sun_family = AF_LOCAL; strncpy(addr.sun_path, filename.c_str(), filename.size()); addr.sun_path[filename.size()] = '\0'; if (autoDelete) { do { ret = unlink(filename.c_str()); } while (ret == -1 && errno == EINTR); } ret = syscalls::bind(fd, (const struct sockaddr *) &addr, sizeof(addr)); if (ret == -1) { int e = errno; string message = "Cannot bind Unix socket '"; message.append(filename.toString()); message.append("'"); throw SystemException(message, e); } if (backlogSize == 0) { backlogSize = 1024; } ret = syscalls::listen(fd, backlogSize); if (ret == -1) { int e = errno; string message = "Cannot listen on Unix socket '"; message.append(filename.toString()); message.append("'"); safelyClose(fd, true); throw SystemException(message, e); } guard.clear(); return fd; } int createTcpServer(const char *address, unsigned short port, unsigned int backlogSize) { struct sockaddr_in addr; int fd, ret, optval; memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; ret = inet_pton(AF_INET, address, &addr.sin_addr.s_addr); if (ret < 0) { int e = errno; string message = "Cannot parse the IP address '"; message.append(address); message.append("'"); throw SystemException(message, e); } else if (ret == 0) { string message = "Cannot parse the IP address '"; message.append(address); message.append("'"); throw ArgumentException(message); } addr.sin_port = htons(port); fd = syscalls::socket(PF_INET, SOCK_STREAM, 0); if (fd == -1) { int e = errno; throw SystemException("Cannot create a TCP socket file descriptor", e); } FdGuard guard(fd, true); ret = syscalls::bind(fd, (const struct sockaddr *) &addr, sizeof(addr)); if (ret == -1) { int e = errno; string message = "Cannot bind a TCP socket on address '"; message.append(address); message.append("' port "); message.append(toString(port)); throw SystemException(message, e); } optval = 1; if (syscalls::setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) == -1) { int e = errno; fprintf(stderr, "so_reuseaddr failed: %s\n", strerror(e)); } // Ignore SO_REUSEADDR error, it's not fatal. if (backlogSize == 0) { backlogSize = 1024; } ret = syscalls::listen(fd, backlogSize); if (ret == -1) { int e = errno; string message = "Cannot listen on TCP socket '"; message.append(address); message.append("' port "); message.append(toString(port)); throw SystemException(message, e); } guard.clear(); return fd; } int connectToServer(const StaticString &address) { TRACE_POINT(); switch (getSocketAddressType(address)) { case SAT_UNIX: return connectToUnixServer(parseUnixSocketAddress(address)); case SAT_TCP: { string host; unsigned short port; parseTcpSocketAddress(address, host, port); return connectToTcpServer(host, port); } default: throw ArgumentException(string("Unknown address type for '") + address + "'"); } } int connectToUnixServer(const StaticString &filename) { int fd = syscalls::socket(PF_UNIX, SOCK_STREAM, 0); if (fd == -1) { int e = errno; throw SystemException("Cannot create a Unix socket file descriptor", e); } FdGuard guard(fd, true); int ret; struct sockaddr_un addr; if (filename.size() > sizeof(addr.sun_path) - 1) { string message = "Cannot connect to Unix socket '"; message.append(filename.data(), filename.size()); message.append("': filename is too long."); throw RuntimeException(message); } addr.sun_family = AF_UNIX; memcpy(addr.sun_path, filename.c_str(), filename.size()); addr.sun_path[filename.size()] = '\0'; bool retry = true; int counter = 0; while (retry) { ret = syscalls::connect(fd, (const sockaddr *) &addr, sizeof(addr)); if (ret == -1) { #if defined(sun) || defined(__sun) /* Solaris has this nice kernel bug where connecting to * a newly created Unix socket which is obviously * connectable can cause an ECONNREFUSED. So we retry * in a loop. */ retry = errno == ECONNREFUSED; #else retry = false; #endif retry = retry && counter < 9; if (retry) { syscalls::usleep((useconds_t) (10000 * pow((double) 2, (double) counter))); counter++; } else { int e = errno; string message("Cannot connect to Unix socket '"); message.append(filename.toString()); message.append("'"); throw SystemException(message, e); } } else { guard.clear(); return fd; } } abort(); // Never reached. return -1; // Shut up compiler warning. } void setupNonBlockingUnixSocket(NUnix_State &state, const StaticString &filename) { state.fd = syscalls::socket(PF_UNIX, SOCK_STREAM, 0); if (state.fd == -1) { int e = errno; throw SystemException("Cannot create a Unix socket file descriptor", e); } state.filename = filename; setNonBlocking(state.fd); } bool connectToUnixServer(NUnix_State &state) { struct sockaddr_un addr; int ret; if (state.filename.size() > sizeof(addr.sun_path) - 1) { string message = "Cannot connect to Unix socket '"; message.append(state.filename.data(), state.filename.size()); message.append("': filename is too long."); throw RuntimeException(message); } addr.sun_family = AF_UNIX; memcpy(addr.sun_path, state.filename.data(), state.filename.size()); addr.sun_path[state.filename.size()] = '\0'; ret = syscalls::connect(state.fd, (const sockaddr *) &addr, sizeof(addr)); if (ret == -1) { if (errno == EINPROGRESS || errno == EWOULDBLOCK) { return false; } else if (errno == EISCONN) { return true; } else { int e = errno; string message = "Cannot connect to Unix socket '"; message.append(state.filename.data(), state.filename.size()); throw SystemException(message, e); } } else { return true; } } int connectToTcpServer(const StaticString &hostname, unsigned int port) { struct addrinfo hints, *res; int ret, e, fd; memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; ret = getaddrinfo(hostname.c_str(), toString(port).c_str(), &hints, &res); if (ret != 0) { string message = "Cannot resolve IP address '"; message.append(hostname.toString()); message.append(":"); message.append(toString(port)); message.append("': "); message.append(gai_strerror(ret)); throw IOException(message); } try { fd = syscalls::socket(PF_INET, SOCK_STREAM, 0); } catch (...) { freeaddrinfo(res); throw; } if (fd == -1) { e = errno; freeaddrinfo(res); throw SystemException("Cannot create a TCP socket file descriptor", e); } try { ret = syscalls::connect(fd, res->ai_addr, res->ai_addrlen); } catch (...) { freeaddrinfo(res); safelyClose(fd, true); throw; } e = errno; freeaddrinfo(res); if (ret == -1) { string message = "Cannot connect to TCP socket '"; message.append(hostname.toString()); message.append(":"); message.append(toString(port)); message.append("'"); safelyClose(fd, true); throw SystemException(message, e); } return fd; } void setupNonBlockingTcpSocket(NTCP_State &state, const StaticString &hostname, int port) { int ret; memset(&state.hints, 0, sizeof(state.hints)); state.hints.ai_family = PF_UNSPEC; state.hints.ai_socktype = SOCK_STREAM; ret = getaddrinfo(hostname.toString().c_str(), toString(port).c_str(), &state.hints, &state.res); if (ret != 0) { string message = "Cannot resolve IP address '"; message.append(hostname.data(), hostname.size()); message.append(":"); message.append(toString(port)); message.append("': "); message.append(gai_strerror(ret)); throw IOException(message); } state.fd = syscalls::socket(PF_INET, SOCK_STREAM, 0); if (state.fd == -1) { int e = errno; throw SystemException("Cannot create a TCP socket file descriptor", e); } state.hostname = hostname; state.port = port; setNonBlocking(state.fd); } bool connectToTcpServer(NTCP_State &state) { int ret; ret = syscalls::connect(state.fd, state.res->ai_addr, state.res->ai_addrlen); if (ret == -1) { if (errno == EINPROGRESS || errno == EWOULDBLOCK) { return false; } else if (errno == EISCONN) { freeaddrinfo(state.res); state.res = NULL; return true; } else { int e = errno; string message = "Cannot connect to TCP socket '"; message.append(state.hostname); message.append(":"); message.append(toString(state.port)); message.append("'"); throw SystemException(message, e); } } else { freeaddrinfo(state.res); state.res = NULL; return true; } } void setupNonBlockingSocket(NConnect_State &state, const StaticString &address) { TRACE_POINT(); state.type = getSocketAddressType(address); switch (state.type) { case SAT_UNIX: setupNonBlockingUnixSocket(state.s_unix, parseUnixSocketAddress(address)); break; case SAT_TCP: { string host; unsigned short port; parseTcpSocketAddress(address, host, port); setupNonBlockingTcpSocket(state.s_tcp, host, port); break; } default: throw ArgumentException(string("Unknown address type for '") + address + "'"); } } bool connectToServer(NConnect_State &state) { switch (state.type) { case SAT_UNIX: return connectToUnixServer(state.s_unix); case SAT_TCP: return connectToTcpServer(state.s_tcp); default: throw RuntimeException("Unknown address type"); } } SocketPair createUnixSocketPair() { int fds[2]; FileDescriptor sockets[2]; if (syscalls::socketpair(AF_UNIX, SOCK_STREAM, 0, fds) == -1) { int e = errno; throw SystemException("Cannot create a Unix socket pair", e); } else { sockets[0] = fds[0]; sockets[1] = fds[1]; return SocketPair(sockets[0], sockets[1]); } } Pipe createPipe() { int fds[2]; FileDescriptor p[2]; if (syscalls::pipe(fds) == -1) { int e = errno; throw SystemException("Cannot create a pipe", e); } else { p[0] = fds[0]; p[1] = fds[1]; return Pipe(p[0], p[1]); } } static bool waitUntilIOEvent(int fd, short event, unsigned long long *timeout) { struct pollfd pfd; int ret; pfd.fd = fd; pfd.events = event; pfd.revents = 0; Timer timer; ret = syscalls::poll(&pfd, 1, *timeout / 1000); if (ret == -1) { int e = errno; throw SystemException("poll() failed", e); } else { unsigned long long elapsed = timer.usecElapsed(); if (elapsed > *timeout) { *timeout = 0; } else { *timeout -= elapsed; } return ret != 0; } } bool waitUntilReadable(int fd, unsigned long long *timeout) { return waitUntilIOEvent(fd, POLLIN, timeout); } bool waitUntilWritable(int fd, unsigned long long *timeout) { return waitUntilIOEvent(fd, POLLOUT | POLLHUP, timeout); } unsigned int readExact(int fd, void *buf, unsigned int size, unsigned long long *timeout) { ssize_t ret; unsigned int alreadyRead = 0; while (alreadyRead < size) { if (timeout != NULL && !waitUntilReadable(fd, timeout)) { throw TimeoutException("Cannot read enough data within the specified timeout"); } ret = syscalls::read(fd, (char *) buf + alreadyRead, size - alreadyRead); if (ret == -1) { int e = errno; throw SystemException("read() failed", e); } else if (ret == 0) { return alreadyRead; } else { alreadyRead += ret; } } return alreadyRead; } void writeExact(int fd, const void *data, unsigned int size, unsigned long long *timeout) { ssize_t ret; unsigned int written = 0; while (written < size) { if (timeout != NULL && !waitUntilWritable(fd, timeout)) { throw TimeoutException("Cannot write enough data within the specified timeout"); } ret = syscalls::write(fd, (const char *) data + written, size - written); if (ret == -1) { int e = errno; throw SystemException("write() failed", e); } else { written += ret; } } } void writeExact(int fd, const StaticString &data, unsigned long long *timeout) { const char * restrict data_ptr = data.data(); writeExact(fd, data_ptr, data.size(), timeout); } /** * Converts an array of StaticStrings to a corresponding array of iovec structures, * returning the size sum in bytes of all StaticStrings. */ static size_t staticStringArrayToIoVec(const StaticString ary[], size_t count, struct iovec *vec, size_t &vecCount) { size_t total = 0; size_t i; for (i = 0, vecCount = 0; i < count; i++) { /* No idea whether all writev() implementations support iov_len == 0, * but I'd rather not risk finding out. */ if (ary[i].size() > 0) { /* I know writev() doesn't write to iov_base, but on some * platforms it's still defined as non-const char * * :-( */ vec[vecCount].iov_base = (char *) ary[i].data(); vec[vecCount].iov_len = ary[i].size(); total += ary[i].size(); vecCount++; } } return total; } /** * Suppose that the given IO vectors are placed adjacent to each other * in a single contiguous block of memory. Given a position inside this * block of memory, this function will calculate the index in the IO vector * array and the offset inside that IO vector that corresponds with * the position. * * For example, given the following array of IO vectors: * { "AAA", "BBBB", "CC" } * Position 0 would correspond to the first item, offset 0. * Position 1 would correspond to the first item, offset 1. * Position 5 would correspond to the second item, offset 2. * And so forth. * * If the position is outside the bounds of the array, then index will be * set to count + 1 and offset to 0. */ static void findDataPositionIndexAndOffset(struct iovec data[], size_t count, size_t position, size_t * restrict index, size_t * restrict offset) { size_t i; size_t begin = 0; for (i = 0; i < count; i++) { size_t end = begin + data[i].iov_len; if (OXT_LIKELY(begin <= position)) { if (position < end) { *index = i; *offset = position - begin; return; } else { begin = end; } } else { // Never reached. abort(); } } *index = count; *offset = 0; } static ssize_t realGatheredWrite(int fd, const StaticString *data, unsigned int dataCount, string &restBuffer, struct iovec *iov) { size_t totalSize, iovCount, i; ssize_t ret; if (restBuffer.empty()) { totalSize = staticStringArrayToIoVec(data, dataCount, iov, iovCount); if (totalSize == 0) { errno = 0; return 0; } ret = writevFunction(fd, iov, std::min(iovCount, (size_t) IOV_MAX)); if (ret == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) { // Nothing could be written without blocking, so put // everything in the rest buffer. int e = errno; restBuffer.reserve(totalSize); for (i = 0; i < iovCount; i++) { restBuffer.append((const char *) iov[i].iov_base, iov[i].iov_len); } errno = e; return 0; } else { return -1; } } else if ((size_t) ret < totalSize) { size_t index, offset; // Put all unsent data in the rest buffer. restBuffer.reserve(ret); findDataPositionIndexAndOffset(iov, iovCount, ret, &index, &offset); for (i = index; i < iovCount; i++) { if (i == index) { restBuffer.append( ((const char *) iov[i].iov_base) + offset, iov[i].iov_len - offset); } else { restBuffer.append( (const char *) iov[i].iov_base, iov[i].iov_len); } } // TODO: we should call writev() again if iovCount > iovMax // in order to send out the rest of the data without // putting them in the rest buffer. return ret; } else { // Everything is sent, and the rest buffer was empty anyway, so // just return. return totalSize; } } else { iov[0].iov_base = (char *) restBuffer.data(); iov[0].iov_len = restBuffer.size(); totalSize = staticStringArrayToIoVec(data, dataCount, iov + 1, iovCount); totalSize += restBuffer.size(); iovCount++; ret = writevFunction(fd, iov, std::min(iovCount, (size_t) IOV_MAX)); if (ret == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) { // Nothing could be written without blocking, so // append all data into the rest buffer. int e = errno; restBuffer.reserve(totalSize); for (i = 1; i < iovCount; i++) { restBuffer.append( (const char *) iov[i].iov_base, iov[i].iov_len); } errno = e; return 0; } else { return -1; } } else { string::size_type restBufferSize = restBuffer.size(); size_t restBufferSent = std::min((size_t) ret, (size_t) restBufferSize); // Remove everything in the rest buffer that we've been able to send. restBuffer.erase(0, restBufferSent); if (restBuffer.empty()) { size_t index, offset; // Looks like everything in the rest buffer was sent. // Put all unsent data into the rest buffer. findDataPositionIndexAndOffset(iov, iovCount, ret, &index, &offset); for (i = index; i < iovCount; i++) { if (i == index) { restBuffer.append( ((const char *) iov[i].iov_base) + offset, iov[i].iov_len - offset); } else { restBuffer.append( (const char *) iov[i].iov_base, iov[i].iov_len); } } // TODO: we should call writev() again if // iovCount > iovMax && ret < totalSize // in order to send out the rest of the data without // putting them in the rest buffer. } else { // The rest buffer could only be partially sent out, so // nothing in 'data' could be sent. Append everything // in 'data' into the rest buffer. restBuffer.reserve(totalSize - ret); for (i = 1; i < iovCount; i++) { restBuffer.append( (const char *) iov[i].iov_base, iov[i].iov_len); } } return ret; } } } ssize_t gatheredWrite(int fd, const StaticString *data, unsigned int dataCount, string &restBuffer) { if (dataCount < 8) { struct iovec iov[8]; return realGatheredWrite(fd, data, dataCount, restBuffer, iov); } else { vector iov; iov.reserve(dataCount + 1); return realGatheredWrite(fd, data, dataCount, restBuffer, &iov[0]); } } static size_t eraseBeginningOfIoVec(struct iovec *iov, size_t count, size_t index, size_t offset) { size_t i, newCount; for (i = index, newCount = 0; i < count; i++, newCount++) { if (newCount == 0) { iov[newCount].iov_base = (char *) iov[i].iov_base + offset; iov[newCount].iov_len = iov[i].iov_len - offset; } else { iov[newCount].iov_base = iov[i].iov_base; iov[newCount].iov_len = iov[i].iov_len; } } return newCount; } static void realGatheredWrite(int fd, const StaticString *data, unsigned int count, unsigned long long *timeout, struct iovec *iov) { size_t total, iovCount; size_t written = 0; total = staticStringArrayToIoVec(data, count, iov, iovCount); while (written < total) { if (timeout != NULL && !waitUntilWritable(fd, timeout)) { throw TimeoutException("Cannot write enough data within the specified timeout"); } ssize_t ret = writevFunction(fd, iov, std::min(iovCount, (size_t) IOV_MAX)); if (ret == -1) { int e = errno; throw SystemException("Unable to write all data", e); } else { size_t index, offset; written += ret; findDataPositionIndexAndOffset(iov, iovCount, ret, &index, &offset); iovCount = eraseBeginningOfIoVec(iov, iovCount, index, offset); } } assert(written == total); } void gatheredWrite(int fd, const StaticString *data, unsigned int count, unsigned long long *timeout) { if (count <= 8) { struct iovec iov[8]; realGatheredWrite(fd, data, count, timeout, iov); } else { vector iov; iov.reserve(count); realGatheredWrite(fd, data, count, timeout, &iov[0]); } } void setWritevFunction(WritevFunction func) { if (func != NULL) { writevFunction = func; } else { writevFunction = syscalls::writev; } } int readFileDescriptor(int fd, unsigned long long *timeout) { if (timeout != NULL && !waitUntilReadable(fd, timeout)) { throw TimeoutException("Cannot receive file descriptor within the specified timeout"); } struct msghdr msg; struct iovec vec; char dummy[1]; #if defined(__APPLE__) || defined(__SOLARIS__) || defined(__arm__) // File descriptor passing macros (CMSG_*) seem to be broken // on 64-bit MacOS X. This structure works around the problem. struct { struct cmsghdr header; int fd; } control_data; #define EXPECTED_CMSG_LEN sizeof(control_data) #else char control_data[CMSG_SPACE(sizeof(int))]; #define EXPECTED_CMSG_LEN CMSG_LEN(sizeof(int)) #endif struct cmsghdr *control_header; int ret; msg.msg_name = NULL; msg.msg_namelen = 0; dummy[0] = '\0'; vec.iov_base = dummy; vec.iov_len = sizeof(dummy); msg.msg_iov = &vec; msg.msg_iovlen = 1; msg.msg_control = (caddr_t) &control_data; msg.msg_controllen = sizeof(control_data); msg.msg_flags = 0; ret = syscalls::recvmsg(fd, &msg, 0); if (ret == -1) { throw SystemException("Cannot read file descriptor with recvmsg()", errno); } control_header = CMSG_FIRSTHDR(&msg); if (control_header == NULL) { throw IOException("No valid file descriptor received."); } if (control_header->cmsg_len != EXPECTED_CMSG_LEN || control_header->cmsg_level != SOL_SOCKET || control_header->cmsg_type != SCM_RIGHTS) { throw IOException("No valid file descriptor received."); } #if defined(__APPLE__) || defined(__SOLARIS__) || defined(__arm__) return control_data.fd; #else return *((int *) CMSG_DATA(control_header)); #endif } void writeFileDescriptor(int fd, int fdToSend, unsigned long long *timeout) { if (timeout != NULL && !waitUntilWritable(fd, timeout)) { throw TimeoutException("Cannot send file descriptor within the specified timeout"); } struct msghdr msg; struct iovec vec; char dummy[1]; #if defined(__APPLE__) || defined(__SOLARIS__) || defined(__arm__) struct { struct cmsghdr header; int fd; } control_data; #else char control_data[CMSG_SPACE(sizeof(int))]; #endif struct cmsghdr *control_header; int ret; msg.msg_name = NULL; msg.msg_namelen = 0; /* Linux and Solaris require msg_iov to be non-NULL. */ dummy[0] = '\0'; vec.iov_base = dummy; vec.iov_len = sizeof(dummy); msg.msg_iov = &vec; msg.msg_iovlen = 1; msg.msg_control = (caddr_t) &control_data; msg.msg_controllen = sizeof(control_data); msg.msg_flags = 0; control_header = CMSG_FIRSTHDR(&msg); control_header->cmsg_level = SOL_SOCKET; control_header->cmsg_type = SCM_RIGHTS; #if defined(__APPLE__) || defined(__SOLARIS__) || defined(__arm__) control_header->cmsg_len = sizeof(control_data); control_data.fd = fdToSend; #else control_header->cmsg_len = CMSG_LEN(sizeof(int)); memcpy(CMSG_DATA(control_header), &fdToSend, sizeof(int)); #endif ret = syscalls::sendmsg(fd, &msg, 0); if (ret == -1) { throw SystemException("Cannot send file descriptor with sendmsg()", errno); } } void safelyClose(int fd, bool ignoreErrors) { if (syscalls::close(fd) == -1) { /* FreeBSD has a kernel bug which can cause close() to return ENOTCONN. * This is harmless, ignore it. We check for this problem on all * platforms because some OSes might borrow Unix domain socket * code from FreeBSD. * http://www.freebsd.org/cgi/query-pr.cgi?pr=79138 * http://www.freebsd.org/cgi/query-pr.cgi?pr=144061 */ if (errno != ENOTCONN && !ignoreErrors) { int e = errno; throw SystemException("Cannot close file descriptor", e); } } } string readAll(const string &filename) { FILE *f = fopen(filename.c_str(), "rb"); if (f != NULL) { StdioGuard guard(f); return readAll(fileno(f)); } else { int e = errno; throw FileSystemException("Cannot open '" + filename + "' for reading", e, filename); } } string readAll(int fd) { string result; char buf[1024 * 32]; ssize_t ret; while (true) { do { ret = read(fd, buf, sizeof(buf)); } while (ret == -1 && errno == EINTR); if (ret == 0) { break; } else if (ret == -1) { if (errno == ECONNRESET) { break; } else { int e = errno; throw SystemException("Cannot read from file descriptor", e); } } else { result.append(buf, ret); } } return result; } } // namespace Passenger passenger-4.0.37/ext/common/Utils/IOUtils.h000644 000765 000024 00000055734 12233035540 021123 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_IO_UTILS_H_ #define _PASSENGER_IO_UTILS_H_ #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; enum ServerAddressType { SAT_UNIX, SAT_TCP, SAT_UNKNOWN }; typedef ssize_t (*WritevFunction)(int fildes, const struct iovec *iov, int iovcnt); bool purgeStdio(FILE *f); /** * Accepts a server address in one of the following formats, and returns which one it is: * * Unix domain sockets * Format: "unix:/path/to/a/socket" * Returns: SAT_UNIX * * TCP sockets * Format: "tcp://host:port" * Returns: SAT_TCP * * Other * Returns: SAT_UNKNOWN */ ServerAddressType getSocketAddressType(const StaticString &address); /** * Parses a Unix domain socket address, as accepted by getSocketAddressType(), * and returns the socket filename. * * @throw ArgumentException address is not a valid Unix domain socket address. */ string parseUnixSocketAddress(const StaticString &address); /** * Parses a TCP socket address, as accepted by getSocketAddressType(), * and returns the host and port. * * @throw ArgumentException address is not a valid TCP socket address. */ void parseTcpSocketAddress(const StaticString & restrict_ref address, string & restrict_ref host, unsigned short & restrict_ref port); /** * Returns whether the given socket address (as accepted by getSocketAddressType()) * is an address that can only refer to a server on the local system. * * @throw ArgumentException address is not a valid TCP socket address. */ bool isLocalSocketAddress(const StaticString &address); /** * Sets a socket in non-blocking mode. * * @throws SystemException Something went wrong. * @ingroup Support */ void setNonBlocking(int fd); /** * Try to call the Linux accept4() system call. If the system call is * not available, then -1 is returned and errno is set to ENOSYS. */ int callAccept4(int sock, struct sockaddr * restrict addr, socklen_t * restrict addr_len, int options); /** * Resolves the given host name and returns a list of IP addresses. * hostname may also be an IP address, in which case it is * returned. You may explicitly specify a port as a hint to * the DNS resolver; set to 0 if you don't care or can't provide a * port number. * * If shuffle is set, and the host name resolves to multiple * IP addresses, then these addresses will be shuffled before they are * returned in order to improve load balancing. */ vector resolveHostname(const string &hostname, unsigned int port = 0, bool shuffle = true); /** * Create a new Unix or TCP server socket, depending on the address type. * * @param address An address as defined by getSocketAddressType(). * @param backlogSize The size of the socket's backlog. Specify 0 to use * the paltform's maximum allowed backlog size. * @param autoDelete If address is a Unix socket that already exists, * whether that should be deleted. Otherwise this argument * is ignored. * @return The file descriptor of the newly created server socket. * @throws ArgumentException The given address cannot be parsed. * @throws RuntimeException Something went wrong. * @throws SystemException Something went wrong while creating the Unix server socket. * @throws boost::thread_interrupted A system call has been interrupted. * @ingroup Support */ int createServer(const StaticString &address, unsigned int backlogSize = 0, bool autoDelete = true); /** * Create a new Unix server socket which is bounded to filename. * * @param filename The filename to bind the socket to. * @param backlogSize The size of the socket's backlog. Specify 0 to use the * platform's maximum allowed backlog size. * @param autoDelete Whether filename should be deleted, if it already exists. * @return The file descriptor of the newly created Unix server socket. * @throws RuntimeException Something went wrong. * @throws SystemException Something went wrong while creating the Unix server socket. * @throws boost::thread_interrupted A system call has been interrupted. * @ingroup Support */ int createUnixServer(const StaticString &filename, unsigned int backlogSize = 0, bool autoDelete = true); /** * Create a new TCP server socket which is bounded to the given address and port. * SO_REUSEADDR will be set on the socket. * * @param address The IP address to bind the socket to. * @param port The port to bind the socket to, or 0 to have the OS automatically * select a free port. * @param backlogSize The size of the socket's backlog. Specify 0 to use the * platform's maximum allowed backlog size. * @return The file descriptor of the newly created server socket. * @throws SystemException Something went wrong while creating the server socket. * @throws ArgumentException The given address cannot be parsed. * @throws boost::thread_interrupted A system call has been interrupted. * @ingroup Support */ int createTcpServer(const char *address = "0.0.0.0", unsigned short port = 0, unsigned int backlogSize = 0); /** * Connect to a server at the given address in a blocking manner. * * @param address An address as accepted by getSocketAddressType(). * @return The file descriptor of the connected client socket. * @throws ArgumentException Unknown address type. * @throws RuntimeException Something went wrong. * @throws SystemException Something went wrong while connecting to the server. * @throws IOException Something went wrong while connecting to the server. * @throws boost::thread_interrupted A system call has been interrupted. * @ingroup Support */ int connectToServer(const StaticString &address); /** * Connect to a Unix server socket at filename in a blocking manner. * * @param filename The filename of the socket to connect to. * @return The file descriptor of the connected client socket. * @throws RuntimeException Something went wrong. * @throws SystemException Something went wrong while connecting to the Unix server. * @throws boost::thread_interrupted A system call has been interrupted. * @ingroup Support */ int connectToUnixServer(const StaticString &filename); /** * Connect to a TCP server socket at the given host name and port in a blocking manner. * * @param hostname The host name of the TCP server. * @param port The port number of the TCP server. * @return The file descriptor of the connected client socket. * @throws IOException Something went wrong while connecting to the Unix server. * @throws SystemException Something went wrong while connecting to the server. * @throws boost::thread_interrupted A system call has been interrupted. * @ingroup Support */ int connectToTcpServer(const StaticString &hostname, unsigned int port); /** State structure for non-blocking connectToUnixServer(). */ struct NUnix_State { FileDescriptor fd; string filename; }; /** * Setup a Unix domain socket for non-blocking connecting. When done, * the file descriptor can be accessed through state.fd. * * @param state A state structure. * @param filename The filename of the socket to connect to. * @throws SystemException Something went wrong. * @throws boost::thread_interrupted A system call has been interrupted. * @ingroup Support */ void setupNonBlockingUnixSocket(NUnix_State & restrict_ref state, const StaticString & restrict_ref filename); /** * Connect a Unix domain socket in non-blocking mode. * * @param state A state structure. * @return True if the socket was successfully connected, false if the socket isn't * ready yet, in which case the caller should select() on the socket until it's writable. * @throws RuntimeException Something went wrong. * @throws SystemException Something went wrong while connecting to the Unix server. * @throws boost::thread_interrupted A system call has been interrupted. * @ingroup Support */ bool connectToUnixServer(NUnix_State &state); /** State structure for non-blocking connectToTcpServer(). */ struct NTCP_State { FileDescriptor fd; struct addrinfo hints, *res; string hostname; int port; NTCP_State() { memset(&hints, 0, sizeof(hints)); res = NULL; port = 0; } ~NTCP_State() { if (res != NULL) { freeaddrinfo(res); } } }; /** * Setup a TCP socket for non-blocking connecting. When done, * the file descriptor can be accessed through state.fd. * * @param state A state structure. * @param hostname The host name of the TCP server. * @param port The port number of the TCP server. * @throws IOException Something went wrong. * @throws SystemException Something went wrong. * @throws boost::thread_interrupted A system call has been interrupted. * @ingroup Support */ void setupNonBlockingTcpSocket(NTCP_State & restrict_ref state, const StaticString & restrict_ref hostname, int port); /** * Connect a TCP socket in non-blocking mode. * * @param state A state structure. * @return True if the socket was successfully connected, false if the socket isn't * ready yet, in which case the caller should select() on the socket until it's writable. * @throws SystemException Something went wrong while connecting to the server. * @throws boost::thread_interrupted A system call has been interrupted. * @ingroup Support */ bool connectToTcpServer(NTCP_State &state); struct NConnect_State { ServerAddressType type; NUnix_State s_unix; NTCP_State s_tcp; }; /** * Setup a socket for non-blocking connecting to the given address. * * @param A state structure. * @param address An address as accepted by getSocketAddressType(). * @throws ArgumentException Unknown address type. * @throws RuntimeException Something went wrong. * @throws SystemException Something went wrong. * @throws IOException Something went wrong. * @throws boost::thread_interrupted A system call has been interrupted. * @ingroup Support */ void setupNonBlockingSocket(NConnect_State & restrict_ref state, const StaticString & restrict_ref address); /** * Connect a socket in non-blocking mode. * * @param state A state structure. * @return True if the socket was successfully connected, false if the socket isn't * ready yet, in which case the caller should select() on the socket until it's writable. * @throws RuntimeException Something went wrong. * @throws SystemException Something went wrong. * @throws boost::thread_interrupted A system call has been interrupted. * @ingroup Support */ bool connectToServer(NConnect_State &state); /** * Creates a Unix domain socket pair. * * @throws SystemException * @throws boost::thread_interrupted */ SocketPair createUnixSocketPair(); /** * Creates a pipe. * * @throws SystemException * @throws boost::thread_interrupted */ Pipe createPipe(); /** * Waits at most *timeout microseconds for the file descriptor to become readable. * Returns true if it become readable within the timeout, false if the timeout expired. * * *timeout may be 0, in which case this method will check whether the file * descriptor is readable, and immediately returns without waiting. * * If no exception is thrown, this method deducts the number of microseconds that has * passed from *timeout. * * @throws SystemException * @throws boost::thread_interrupted */ bool waitUntilReadable(int fd, unsigned long long *timeout); /** * Waits at most *timeout microseconds for the file descriptor to become writable. * Returns true if it become writable within the timeout, false if the timeout expired. * * *timeout may be 0, in which case this method will check whether the file * descriptor is writable, and immediately returns without waiting. * * If no exception is thrown, this method deducts the number of microseconds that has * passed from *timeout. * * @throws SystemException * @throws boost::thread_interrupted */ bool waitUntilWritable(int fd, unsigned long long *timeout); /** * Attempts to read exactly size bytes of data from the given file * descriptor, and put the result in buf. On non-blocking sockets * this function will block by poll()ing the socket. * * @param buf The buffer to place the read data in. This buffer must be at least * size bytes long. * @param size The number of bytes to read. * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on reading the size bytes * of data. If the timeout expired then TimeoutException will be * thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on reading will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @return The number of bytes read. This is exactly equal to size, * except when EOF is encountered prematurely. * @pre buf != NULL * @throws SystemException * @throws TimeoutException Unable to read size bytes of data within * timeout microseconds. * @throws boost::thread_interrupted */ unsigned int readExact(int fd, void * restrict buf, unsigned int size, unsigned long long * restrict timeout = NULL); /** * Writes a block of data to the given file descriptor and blocks until everything * is written, even for non-blocking sockets. If not everything can be written (e.g. * because the peer closed the connection before accepting everything) then an * exception will be thrown. * * @note Security guarantee: this method will not copy the data in memory, * so it's safe to use this method to write passwords to the underlying * file descriptor. * * @param data The data to send. * @param size The number of bytes in data. * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on writing the size bytes * of data. If the timeout expired then TimeoutException will be * thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on writing will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @pre data != NULL * @throws SystemException * @throws TimeoutException Unable to write size bytes of data within * timeout microseconds. * @throws boost::thread_interrupted */ void writeExact(int fd, const void * restrict data, unsigned int size, unsigned long long * restrict timeout = NULL); void writeExact(int fd, const StaticString & restrict_ref data, unsigned long long * restrict timeout = NULL); /** * Writes a bunch of data to the given file descriptor using a gathering I/O interface. * Instead of accepting a single buffer, this function accepts multiple buffers plus * a special 'rest' buffer. The rest buffer is written out first, and the data buffers * are then written out in the order as they appear. This all is done with a single * writev() system call without concatenating all data into a single buffer. * * This function is designed for use with non-blocking sockets. It returns the number * of bytes that have been written, and ensures that restBuffer will contain all data * that has not been written, i.e. should be written out as soon as the file descriptor * is writeable again. If everything has been successfully written out then restBuffer * will be empty. * A return value of 0 indicates that nothing could be written without blocking. * * Returns -1 if an error occurred other than one which indicates blocking. In this * case, errno is set appropriately. * * This function also takes care of all the stupid writev() limitations such as * IOV_MAX. It ensures that no more than IOV_MAX items will be passed to writev(). * * @param fd The file descriptor to write to. * @param data The data to write. * @param dataCount Number of elements in data. * @param restBuffer The rest buffer, as documented above. * @return The number of bytes that have been written out, or -1 on any error that * isn't related to non-blocking writes. * @throws boost::thread_interrupted */ ssize_t gatheredWrite(int fd, const StaticString * restrict data, unsigned int dataCount, string & restrict_ref restBuffer); /** * Writes a bunch of data to the given file descriptor using a gathering I/O interface. * Instead of accepting a single buffer, this function accepts multiple buffers * which are all written out in the order as they appear. This is done with a single * system call without concatenating all data into a single buffer. * * This method is a convenience wrapper around writev() but it blocks until all data * has been written and takes care of handling system limits (IOV_MAX) for you. * * This version is designed for blocking sockets so do not use it on non-blocking ones. * * @param fd The file descriptor to write to. * @param data An array of buffers to be written. * @param count Number of items in data. * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on writing all the data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on writing will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to write all given data within * timeout microseconds. * @throws boost::thread_interrupted */ void gatheredWrite(int fd, const StaticString * restrict data, unsigned int dataCount, unsigned long long * restrict timeout = NULL); /** * Sets a writev-emulating function that gatheredWrite() should call instead of the real writev(). * Useful for unit tests. Pass NULL to restore back to the real writev(). */ void setWritevFunction(WritevFunction func); /** * Receive a file descriptor over the given Unix domain socket. * This is a low-level function that directly wraps the Unix file * descriptor passing system calls. You should not use this directly; * instead you should use readFileDescriptorWithNegotiation() from MessageIO.h * which is safer. See MessageIO.h for more information about the * negotiation protocol for file descriptor passing. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on receiving the file descriptor. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on receiving will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @return The received file descriptor. * @throws SystemException Something went wrong. * @throws IOException Whatever was received doesn't seem to be a * file descriptor. * @throws TimeoutException Unable to receive a file descriptor within * timeout microseconds. * @throws boost::thread_interrupted */ int readFileDescriptor(int fd, unsigned long long *timeout = NULL); /** * Pass the file descriptor 'fdToSend' over the Unix socket 'fd'. * This is a low-level function that directly wraps the Unix file * descriptor passing system calls. You should not use this directly; * instead you should use writeFileDescriptorWithNegotiation() from MessageIO.h * which is safer. See MessageIO.h for more information about the * negotiation protocol for file descriptor passing. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on trying to pass the file descriptor. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on writing will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to pass the file descriptor within * timeout microseconds. * @throws boost::thread_interrupted */ void writeFileDescriptor(int fd, int fdToSend, unsigned long long *timeout = NULL); /** * Closes the given file descriptor and throws an exception if anything goes wrong. * This function also works around certain close() bugs and quirks on certain * operating systems, such as the FreeBSD ENOTCONN-on-close bug and the fact that * when close() returns EINTR the state of the file descriptor is unspecified. * See IOUtils.cpp and ext/oxt/system_calls.cpp for details. * * @throws SystemException * @throws boost::thread_interrupted */ #ifndef _PASSENGER_SAFELY_CLOSE_DEFINED_ #define _PASSENGER_SAFELY_CLOSE_DEFINED_ void safelyClose(int fd, bool ignoreErrors = false); #endif /** * Read all data from the given file until EOF. * * @throws SystemException */ string readAll(const string &filename); /** * Read all data from the given file descriptor until EOF. * * @throws SystemException */ string readAll(int fd); } // namespace Passenger #endif /* _PASSENGER_IO_UTILS_H_ */ passenger-4.0.37/ext/common/Utils/json-forwards.h000644 000765 000024 00000021165 12233035540 022360 0ustar00honglistaff000000 000000 /// Json-cpp amalgated forward header (http://jsoncpp.sourceforge.net/). /// It is intented to be used with #include /// This header provides forward declaration for all JsonCpp types. // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: LICENSE // ////////////////////////////////////////////////////////////////////// /* The JsonCpp library's source code, including accompanying documentation, tests and demonstration applications, are licensed under the following conditions... The author (Baptiste Lepilleur) explicitly disclaims copyright in all jurisdictions which recognize such a disclaimer. In such jurisdictions, this software is released into the Public Domain. In jurisdictions which do not recognize Public Domain property (e.g. Germany as of 2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is released under the terms of the MIT License (see below). In jurisdictions which recognize Public Domain property, the user of this software may choose to accept it either as 1) Public Domain, 2) under the conditions of the MIT License (see below), or 3) under the terms of dual Public Domain/MIT License conditions described here, as they choose. The MIT License is about as close to Public Domain as a license can get, and is described in clear, concise terms at: http://en.wikipedia.org/wiki/MIT_License The full text of the MIT License follows: ======================================================================== Copyright (c) 2007-2010 Baptiste Lepilleur Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ======================================================================== (END LICENSE TEXT) The MIT license is compatible with both the GPL and commercial software, affording one all of the rights of Public Domain with the minor nuisance of being required to keep the above copyright notice and license text in the source code. Note also that by accepting the Public Domain "license" you can re-license your copy using whatever license you like. */ // ////////////////////////////////////////////////////////////////////// // End of content of file: LICENSE // ////////////////////////////////////////////////////////////////////// #ifndef JSON_FORWARD_AMALGATED_H_INCLUDED # define JSON_FORWARD_AMALGATED_H_INCLUDED /// If defined, indicates that the source file is amalgated /// to prevent private header inclusion. #define JSON_IS_AMALGATED // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: include/json/config.h // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_CONFIG_H_INCLUDED # define JSON_CONFIG_H_INCLUDED /// If defined, indicates that json library is embedded in CppTL library. //# define JSON_IN_CPPTL 1 /// If defined, indicates that json may leverage CppTL library //# define JSON_USE_CPPTL 1 /// If defined, indicates that cpptl vector based map should be used instead of std::map /// as Value container. //# define JSON_USE_CPPTL_SMALLMAP 1 /// If defined, indicates that Json specific container should be used /// (hash table & simple deque container with customizable allocator). /// THIS FEATURE IS STILL EXPERIMENTAL! There is know bugs: See #3177332 //# define JSON_VALUE_USE_INTERNAL_MAP 1 /// Force usage of standard new/malloc based allocator instead of memory pool based allocator. /// The memory pools allocator used optimization (initializing Value and ValueInternalLink /// as if it was a POD) that may cause some validation tool to report errors. /// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined. //# define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1 /// If defined, indicates that Json use exception to report invalid type manipulation /// instead of C assert macro. # define JSON_USE_EXCEPTION 1 /// If defined, indicates that the source file is amalgated /// to prevent private header inclusion. /// Remarks: it is automatically defined in the generated amalgated header. #define JSON_IS_AMALGAMATION # ifdef JSON_IN_CPPTL # include # ifndef JSON_USE_CPPTL # define JSON_USE_CPPTL 1 # endif # endif # ifdef JSON_IN_CPPTL # define JSON_API CPPTL_API # elif defined(JSON_DLL_BUILD) # define JSON_API __declspec(dllexport) # elif defined(JSON_DLL) # define JSON_API __declspec(dllimport) # else # define JSON_API # endif // If JSON_NO_INT64 is defined, then Json only support C++ "int" type for integer // Storages, and 64 bits integer support is disabled. // #define JSON_NO_INT64 1 #if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6 // Microsoft Visual Studio 6 only support conversion from __int64 to double // (no conversion from unsigned __int64). #define JSON_USE_INT64_DOUBLE_CONVERSION 1 #endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6 #if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008 /// Indicates that the following function is deprecated. # define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) #endif #if !defined(JSONCPP_DEPRECATED) # define JSONCPP_DEPRECATED(message) #endif // if !defined(JSONCPP_DEPRECATED) namespace Json { typedef int Int; typedef unsigned int UInt; # if defined(JSON_NO_INT64) typedef int LargestInt; typedef unsigned int LargestUInt; # undef JSON_HAS_INT64 # else // if defined(JSON_NO_INT64) // For Microsoft Visual use specific types as long long is not supported # if defined(_MSC_VER) // Microsoft Visual Studio typedef __int64 Int64; typedef unsigned __int64 UInt64; # else // if defined(_MSC_VER) // Other platforms, use long long typedef long long int Int64; typedef unsigned long long int UInt64; # endif // if defined(_MSC_VER) typedef Int64 LargestInt; typedef UInt64 LargestUInt; # define JSON_HAS_INT64 # endif // if defined(JSON_NO_INT64) } // end namespace Json #endif // JSON_CONFIG_H_INCLUDED // ////////////////////////////////////////////////////////////////////// // End of content of file: include/json/config.h // ////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: include/json/forwards.h // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_FORWARDS_H_INCLUDED # define JSON_FORWARDS_H_INCLUDED #if !defined(JSON_IS_AMALGAMATION) # include "config.h" #endif // if !defined(JSON_IS_AMALGAMATION) namespace Json { // writer.h class FastWriter; class StyledWriter; // reader.h class Reader; // features.h class Features; // value.h typedef unsigned int ArrayIndex; class StaticString; class Path; class PathArgument; class Value; class ValueIteratorBase; class ValueIterator; class ValueConstIterator; #ifdef JSON_VALUE_USE_INTERNAL_MAP class ValueMapAllocator; class ValueInternalLink; class ValueInternalArray; class ValueInternalMap; #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP } // namespace Json #endif // JSON_FORWARDS_H_INCLUDED // ////////////////////////////////////////////////////////////////////// // End of content of file: include/json/forwards.h // ////////////////////////////////////////////////////////////////////// #endif //ifndef JSON_FORWARD_AMALGATED_H_INCLUDED passenger-4.0.37/ext/common/Utils/json.h000644 000765 000024 00000170366 12233035540 020543 0ustar00honglistaff000000 000000 /// Json-cpp amalgated header (http://jsoncpp.sourceforge.net/). /// It is intented to be used with #include // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: LICENSE // ////////////////////////////////////////////////////////////////////// /* The JsonCpp library's source code, including accompanying documentation, tests and demonstration applications, are licensed under the following conditions... The author (Baptiste Lepilleur) explicitly disclaims copyright in all jurisdictions which recognize such a disclaimer. In such jurisdictions, this software is released into the Public Domain. In jurisdictions which do not recognize Public Domain property (e.g. Germany as of 2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is released under the terms of the MIT License (see below). In jurisdictions which recognize Public Domain property, the user of this software may choose to accept it either as 1) Public Domain, 2) under the conditions of the MIT License (see below), or 3) under the terms of dual Public Domain/MIT License conditions described here, as they choose. The MIT License is about as close to Public Domain as a license can get, and is described in clear, concise terms at: http://en.wikipedia.org/wiki/MIT_License The full text of the MIT License follows: ======================================================================== Copyright (c) 2007-2010 Baptiste Lepilleur Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ======================================================================== (END LICENSE TEXT) The MIT license is compatible with both the GPL and commercial software, affording one all of the rights of Public Domain with the minor nuisance of being required to keep the above copyright notice and license text in the source code. Note also that by accepting the Public Domain "license" you can re-license your copy using whatever license you like. */ // ////////////////////////////////////////////////////////////////////// // End of content of file: LICENSE // ////////////////////////////////////////////////////////////////////// #ifndef JSON_AMALGATED_H_INCLUDED # define JSON_AMALGATED_H_INCLUDED /// If defined, indicates that the source file is amalgated /// to prevent private header inclusion. #define JSON_IS_AMALGATED // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: include/json/config.h // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_CONFIG_H_INCLUDED # define JSON_CONFIG_H_INCLUDED /// If defined, indicates that json library is embedded in CppTL library. //# define JSON_IN_CPPTL 1 /// If defined, indicates that json may leverage CppTL library //# define JSON_USE_CPPTL 1 /// If defined, indicates that cpptl vector based map should be used instead of std::map /// as Value container. //# define JSON_USE_CPPTL_SMALLMAP 1 /// If defined, indicates that Json specific container should be used /// (hash table & simple deque container with customizable allocator). /// THIS FEATURE IS STILL EXPERIMENTAL! There is know bugs: See #3177332 //# define JSON_VALUE_USE_INTERNAL_MAP 1 /// Force usage of standard new/malloc based allocator instead of memory pool based allocator. /// The memory pools allocator used optimization (initializing Value and ValueInternalLink /// as if it was a POD) that may cause some validation tool to report errors. /// Only has effects if JSON_VALUE_USE_INTERNAL_MAP is defined. //# define JSON_USE_SIMPLE_INTERNAL_ALLOCATOR 1 /// If defined, indicates that Json use exception to report invalid type manipulation /// instead of C assert macro. # define JSON_USE_EXCEPTION 1 /// If defined, indicates that the source file is amalgated /// to prevent private header inclusion. /// Remarks: it is automatically defined in the generated amalgated header. #define JSON_IS_AMALGAMATION # ifdef JSON_IN_CPPTL # include # ifndef JSON_USE_CPPTL # define JSON_USE_CPPTL 1 # endif # endif # ifdef JSON_IN_CPPTL # define JSON_API CPPTL_API # elif defined(JSON_DLL_BUILD) # define JSON_API __declspec(dllexport) # elif defined(JSON_DLL) # define JSON_API __declspec(dllimport) # else # define JSON_API # endif // If JSON_NO_INT64 is defined, then Json only support C++ "int" type for integer // Storages, and 64 bits integer support is disabled. // #define JSON_NO_INT64 1 #if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6 // Microsoft Visual Studio 6 only support conversion from __int64 to double // (no conversion from unsigned __int64). #define JSON_USE_INT64_DOUBLE_CONVERSION 1 #endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6 #if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008 /// Indicates that the following function is deprecated. # define JSONCPP_DEPRECATED(message) __declspec(deprecated(message)) #endif #if !defined(JSONCPP_DEPRECATED) # define JSONCPP_DEPRECATED(message) #endif // if !defined(JSONCPP_DEPRECATED) namespace Json { typedef int Int; typedef unsigned int UInt; # if defined(JSON_NO_INT64) typedef int LargestInt; typedef unsigned int LargestUInt; # undef JSON_HAS_INT64 # else // if defined(JSON_NO_INT64) // For Microsoft Visual use specific types as long long is not supported # if defined(_MSC_VER) // Microsoft Visual Studio typedef __int64 Int64; typedef unsigned __int64 UInt64; # else // if defined(_MSC_VER) // Other platforms, use long long typedef long long int Int64; typedef unsigned long long int UInt64; # endif // if defined(_MSC_VER) typedef Int64 LargestInt; typedef UInt64 LargestUInt; # define JSON_HAS_INT64 # endif // if defined(JSON_NO_INT64) } // end namespace Json #endif // JSON_CONFIG_H_INCLUDED // ////////////////////////////////////////////////////////////////////// // End of content of file: include/json/config.h // ////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: include/json/forwards.h // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_FORWARDS_H_INCLUDED # define JSON_FORWARDS_H_INCLUDED #if !defined(JSON_IS_AMALGAMATION) # include "config.h" #endif // if !defined(JSON_IS_AMALGAMATION) namespace Json { // writer.h class FastWriter; class StyledWriter; // reader.h class Reader; // features.h class Features; // value.h typedef unsigned int ArrayIndex; class StaticString; class Path; class PathArgument; class Value; class ValueIteratorBase; class ValueIterator; class ValueConstIterator; #ifdef JSON_VALUE_USE_INTERNAL_MAP class ValueMapAllocator; class ValueInternalLink; class ValueInternalArray; class ValueInternalMap; #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP } // namespace Json #endif // JSON_FORWARDS_H_INCLUDED // ////////////////////////////////////////////////////////////////////// // End of content of file: include/json/forwards.h // ////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: include/json/features.h // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef CPPTL_JSON_FEATURES_H_INCLUDED # define CPPTL_JSON_FEATURES_H_INCLUDED #if !defined(JSON_IS_AMALGAMATION) # include "forwards.h" #endif // if !defined(JSON_IS_AMALGAMATION) namespace Json { /** \brief Configuration passed to reader and writer. * This configuration object can be used to force the Reader or Writer * to behave in a standard conforming way. */ class JSON_API Features { public: /** \brief A configuration that allows all features and assumes all strings are UTF-8. * - C & C++ comments are allowed * - Root object can be any JSON value * - Assumes Value strings are encoded in UTF-8 */ static Features all(); /** \brief A configuration that is strictly compatible with the JSON specification. * - Comments are forbidden. * - Root object must be either an array or an object value. * - Assumes Value strings are encoded in UTF-8 */ static Features strictMode(); /** \brief Initialize the configuration like JsonConfig::allFeatures; */ Features(); /// \c true if comments are allowed. Default: \c true. bool allowComments_; /// \c true if root must be either an array or an object value. Default: \c false. bool strictRoot_; }; } // namespace Json #endif // CPPTL_JSON_FEATURES_H_INCLUDED // ////////////////////////////////////////////////////////////////////// // End of content of file: include/json/features.h // ////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: include/json/value.h // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef CPPTL_JSON_H_INCLUDED # define CPPTL_JSON_H_INCLUDED #if !defined(JSON_IS_AMALGAMATION) # include "forwards.h" #endif // if !defined(JSON_IS_AMALGAMATION) # include # include # ifndef JSON_USE_CPPTL_SMALLMAP # include # else # include # endif # ifdef JSON_USE_CPPTL # include # endif /** \brief JSON (JavaScript Object Notation). */ namespace Json { /** \brief Type of the value held by a Value object. */ enum ValueType { nullValue = 0, ///< 'null' value intValue, ///< signed integer value uintValue, ///< unsigned integer value realValue, ///< double value stringValue, ///< UTF-8 string value booleanValue, ///< bool value arrayValue, ///< array value (ordered list) objectValue ///< object value (collection of name/value pairs). }; enum CommentPlacement { commentBefore = 0, ///< a comment placed on the line before a value commentAfterOnSameLine, ///< a comment just after a value on the same line commentAfter, ///< a comment on the line after a value (only make sense for root value) numberOfCommentPlacement }; //# ifdef JSON_USE_CPPTL // typedef CppTL::AnyEnumerator EnumMemberNames; // typedef CppTL::AnyEnumerator EnumValues; //# endif /** \brief Lightweight wrapper to tag static string. * * Value constructor and objectValue member assignement takes advantage of the * StaticString and avoid the cost of string duplication when storing the * string or the member name. * * Example of usage: * \code * Json::Value aValue( StaticString("some text") ); * Json::Value object; * static const StaticString code("code"); * object[code] = 1234; * \endcode */ class JSON_API StaticString { public: explicit StaticString( const char *czstring ) : str_( czstring ) { } operator const char *() const { return str_; } const char *c_str() const { return str_; } private: const char *str_; }; /** \brief Represents a JSON value. * * This class is a discriminated union wrapper that can represents a: * - signed integer [range: Value::minInt - Value::maxInt] * - unsigned integer (range: 0 - Value::maxUInt) * - double * - UTF-8 string * - boolean * - 'null' * - an ordered list of Value * - collection of name/value pairs (javascript object) * * The type of the held value is represented by a #ValueType and * can be obtained using type(). * * values of an #objectValue or #arrayValue can be accessed using operator[]() methods. * Non const methods will automatically create the a #nullValue element * if it does not exist. * The sequence of an #arrayValue will be automatically resize and initialized * with #nullValue. resize() can be used to enlarge or truncate an #arrayValue. * * The get() methods can be used to obtanis default value in the case the required element * does not exist. * * It is possible to iterate over the list of a #objectValue values using * the getMemberNames() method. */ class JSON_API Value { friend class ValueIteratorBase; # ifdef JSON_VALUE_USE_INTERNAL_MAP friend class ValueInternalLink; friend class ValueInternalMap; # endif public: typedef std::vector Members; typedef ValueIterator iterator; typedef ValueConstIterator const_iterator; typedef Json::UInt UInt; typedef Json::Int Int; # if defined(JSON_HAS_INT64) typedef Json::UInt64 UInt64; typedef Json::Int64 Int64; #endif // defined(JSON_HAS_INT64) typedef Json::LargestInt LargestInt; typedef Json::LargestUInt LargestUInt; typedef Json::ArrayIndex ArrayIndex; static const Value null; /// Minimum signed integer value that can be stored in a Json::Value. static const LargestInt minLargestInt; /// Maximum signed integer value that can be stored in a Json::Value. static const LargestInt maxLargestInt; /// Maximum unsigned integer value that can be stored in a Json::Value. static const LargestUInt maxLargestUInt; /// Minimum signed int value that can be stored in a Json::Value. static const Int minInt; /// Maximum signed int value that can be stored in a Json::Value. static const Int maxInt; /// Maximum unsigned int value that can be stored in a Json::Value. static const UInt maxUInt; /// Minimum signed 64 bits int value that can be stored in a Json::Value. static const Int64 minInt64; /// Maximum signed 64 bits int value that can be stored in a Json::Value. static const Int64 maxInt64; /// Maximum unsigned 64 bits int value that can be stored in a Json::Value. static const UInt64 maxUInt64; private: #ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION # ifndef JSON_VALUE_USE_INTERNAL_MAP class CZString { public: enum DuplicationPolicy { noDuplication = 0, duplicate, duplicateOnCopy }; CZString( ArrayIndex index ); CZString( const char *cstr, DuplicationPolicy allocate ); CZString( const CZString &other ); ~CZString(); CZString &operator =( const CZString &other ); bool operator<( const CZString &other ) const; bool operator==( const CZString &other ) const; ArrayIndex index() const; const char *c_str() const; bool isStaticString() const; private: void swap( CZString &other ); const char *cstr_; ArrayIndex index_; }; public: # ifndef JSON_USE_CPPTL_SMALLMAP typedef std::map ObjectValues; # else typedef CppTL::SmallMap ObjectValues; # endif // ifndef JSON_USE_CPPTL_SMALLMAP # endif // ifndef JSON_VALUE_USE_INTERNAL_MAP #endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION public: /** \brief Create a default Value of the given type. This is a very useful constructor. To create an empty array, pass arrayValue. To create an empty object, pass objectValue. Another Value can then be set to this one by assignment. This is useful since clear() and resize() will not alter types. Examples: \code Json::Value null_value; // null Json::Value arr_value(Json::arrayValue); // [] Json::Value obj_value(Json::objectValue); // {} \endcode */ Value( ValueType type = nullValue ); Value( Int value ); Value( UInt value ); #if defined(JSON_HAS_INT64) Value( Int64 value ); Value( UInt64 value ); #endif // if defined(JSON_HAS_INT64) Value( double value ); Value( const char *value ); Value( const char *beginValue, const char *endValue ); /** \brief Constructs a value from a static string. * Like other value string constructor but do not duplicate the string for * internal storage. The given string must remain alive after the call to this * constructor. * Example of usage: * \code * Json::Value aValue( StaticString("some text") ); * \endcode */ Value( const StaticString &value ); Value( const std::string &value ); # ifdef JSON_USE_CPPTL Value( const CppTL::ConstString &value ); # endif Value( bool value ); Value( const Value &other ); ~Value(); Value &operator=( const Value &other ); /// Swap values. /// \note Currently, comments are intentionally not swapped, for /// both logic and efficiency. void swap( Value &other ); ValueType type() const; bool operator <( const Value &other ) const; bool operator <=( const Value &other ) const; bool operator >=( const Value &other ) const; bool operator >( const Value &other ) const; bool operator ==( const Value &other ) const; bool operator !=( const Value &other ) const; int compare( const Value &other ) const; const char *asCString() const; std::string asString() const; # ifdef JSON_USE_CPPTL CppTL::ConstString asConstString() const; # endif Int asInt() const; UInt asUInt() const; Int64 asInt64() const; UInt64 asUInt64() const; LargestInt asLargestInt() const; LargestUInt asLargestUInt() const; float asFloat() const; double asDouble() const; bool asBool() const; bool isNull() const; bool isBool() const; bool isInt() const; bool isUInt() const; bool isIntegral() const; bool isDouble() const; bool isNumeric() const; bool isString() const; bool isArray() const; bool isObject() const; bool isConvertibleTo( ValueType other ) const; /// Number of values in array or object ArrayIndex size() const; /// \brief Return true if empty array, empty object, or null; /// otherwise, false. bool empty() const; /// Return isNull() bool operator!() const; /// Remove all object members and array elements. /// \pre type() is arrayValue, objectValue, or nullValue /// \post type() is unchanged void clear(); /// Resize the array to size elements. /// New elements are initialized to null. /// May only be called on nullValue or arrayValue. /// \pre type() is arrayValue or nullValue /// \post type() is arrayValue void resize( ArrayIndex size ); /// Access an array element (zero based index ). /// If the array contains less than index element, then null value are inserted /// in the array so that its size is index+1. /// (You may need to say 'value[0u]' to get your compiler to distinguish /// this from the operator[] which takes a string.) Value &operator[]( ArrayIndex index ); /// Access an array element (zero based index ). /// If the array contains less than index element, then null value are inserted /// in the array so that its size is index+1. /// (You may need to say 'value[0u]' to get your compiler to distinguish /// this from the operator[] which takes a string.) Value &operator[]( int index ); /// Access an array element (zero based index ) /// (You may need to say 'value[0u]' to get your compiler to distinguish /// this from the operator[] which takes a string.) const Value &operator[]( ArrayIndex index ) const; /// Access an array element (zero based index ) /// (You may need to say 'value[0u]' to get your compiler to distinguish /// this from the operator[] which takes a string.) const Value &operator[]( int index ) const; /// If the array contains at least index+1 elements, returns the element value, /// otherwise returns defaultValue. Value get( ArrayIndex index, const Value &defaultValue ) const; /// Return true if index < size(). bool isValidIndex( ArrayIndex index ) const; /// \brief Append value to array at the end. /// /// Equivalent to jsonvalue[jsonvalue.size()] = value; Value &append( const Value &value ); /// Access an object value by name, create a null member if it does not exist. Value &operator[]( const char *key ); /// Access an object value by name, returns null if there is no member with that name. const Value &operator[]( const char *key ) const; /// Access an object value by name, create a null member if it does not exist. Value &operator[]( const std::string &key ); /// Access an object value by name, returns null if there is no member with that name. const Value &operator[]( const std::string &key ) const; /** \brief Access an object value by name, create a null member if it does not exist. * If the object as no entry for that name, then the member name used to store * the new entry is not duplicated. * Example of use: * \code * Json::Value object; * static const StaticString code("code"); * object[code] = 1234; * \endcode */ Value &operator[]( const StaticString &key ); # ifdef JSON_USE_CPPTL /// Access an object value by name, create a null member if it does not exist. Value &operator[]( const CppTL::ConstString &key ); /// Access an object value by name, returns null if there is no member with that name. const Value &operator[]( const CppTL::ConstString &key ) const; # endif /// Return the member named key if it exist, defaultValue otherwise. Value get( const char *key, const Value &defaultValue ) const; /// Return the member named key if it exist, defaultValue otherwise. Value get( const std::string &key, const Value &defaultValue ) const; # ifdef JSON_USE_CPPTL /// Return the member named key if it exist, defaultValue otherwise. Value get( const CppTL::ConstString &key, const Value &defaultValue ) const; # endif /// \brief Remove and return the named member. /// /// Do nothing if it did not exist. /// \return the removed Value, or null. /// \pre type() is objectValue or nullValue /// \post type() is unchanged Value removeMember( const char* key ); /// Same as removeMember(const char*) Value removeMember( const std::string &key ); /// Return true if the object has a member named key. bool isMember( const char *key ) const; /// Return true if the object has a member named key. bool isMember( const std::string &key ) const; # ifdef JSON_USE_CPPTL /// Return true if the object has a member named key. bool isMember( const CppTL::ConstString &key ) const; # endif /// \brief Return a list of the member names. /// /// If null, return an empty list. /// \pre type() is objectValue or nullValue /// \post if type() was nullValue, it remains nullValue Members getMemberNames() const; //# ifdef JSON_USE_CPPTL // EnumMemberNames enumMemberNames() const; // EnumValues enumValues() const; //# endif /// Comments must be //... or /* ... */ void setComment( const char *comment, CommentPlacement placement ); /// Comments must be //... or /* ... */ void setComment( const std::string &comment, CommentPlacement placement ); bool hasComment( CommentPlacement placement ) const; /// Include delimiters and embedded newlines. std::string getComment( CommentPlacement placement ) const; std::string toStyledString() const; const_iterator begin() const; const_iterator end() const; iterator begin(); iterator end(); private: Value &resolveReference( const char *key, bool isStatic ); # ifdef JSON_VALUE_USE_INTERNAL_MAP inline bool isItemAvailable() const { return itemIsUsed_ == 0; } inline void setItemUsed( bool isUsed = true ) { itemIsUsed_ = isUsed ? 1 : 0; } inline bool isMemberNameStatic() const { return memberNameIsStatic_ == 0; } inline void setMemberNameIsStatic( bool isStatic ) { memberNameIsStatic_ = isStatic ? 1 : 0; } # endif // # ifdef JSON_VALUE_USE_INTERNAL_MAP private: struct CommentInfo { CommentInfo(); ~CommentInfo(); void setComment( const char *text ); char *comment_; }; //struct MemberNamesTransform //{ // typedef const char *result_type; // const char *operator()( const CZString &name ) const // { // return name.c_str(); // } //}; union ValueHolder { LargestInt int_; LargestUInt uint_; double real_; bool bool_; char *string_; # ifdef JSON_VALUE_USE_INTERNAL_MAP ValueInternalArray *array_; ValueInternalMap *map_; #else ObjectValues *map_; # endif } value_; ValueType type_ : 8; int allocated_ : 1; // Notes: if declared as bool, bitfield is useless. # ifdef JSON_VALUE_USE_INTERNAL_MAP unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap container. int memberNameIsStatic_ : 1; // used by the ValueInternalMap container. # endif CommentInfo *comments_; }; /** \brief Experimental and untested: represents an element of the "path" to access a node. */ class PathArgument { public: friend class Path; PathArgument(); PathArgument( ArrayIndex index ); PathArgument( const char *key ); PathArgument( const std::string &key ); private: enum Kind { kindNone = 0, kindIndex, kindKey }; std::string key_; ArrayIndex index_; Kind kind_; }; /** \brief Experimental and untested: represents a "path" to access a node. * * Syntax: * - "." => root node * - ".[n]" => elements at index 'n' of root node (an array value) * - ".name" => member named 'name' of root node (an object value) * - ".name1.name2.name3" * - ".[0][1][2].name1[3]" * - ".%" => member name is provided as parameter * - ".[%]" => index is provied as parameter */ class Path { public: Path( const std::string &path, const PathArgument &a1 = PathArgument(), const PathArgument &a2 = PathArgument(), const PathArgument &a3 = PathArgument(), const PathArgument &a4 = PathArgument(), const PathArgument &a5 = PathArgument() ); const Value &resolve( const Value &root ) const; Value resolve( const Value &root, const Value &defaultValue ) const; /// Creates the "path" to access the specified node and returns a reference on the node. Value &make( Value &root ) const; private: typedef std::vector InArgs; typedef std::vector Args; void makePath( const std::string &path, const InArgs &in ); void addPathInArg( const std::string &path, const InArgs &in, InArgs::const_iterator &itInArg, PathArgument::Kind kind ); void invalidPath( const std::string &path, int location ); Args args_; }; #ifdef JSON_VALUE_USE_INTERNAL_MAP /** \brief Allocator to customize Value internal map. * Below is an example of a simple implementation (default implementation actually * use memory pool for speed). * \code class DefaultValueMapAllocator : public ValueMapAllocator { public: // overridden from ValueMapAllocator virtual ValueInternalMap *newMap() { return new ValueInternalMap(); } virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) { return new ValueInternalMap( other ); } virtual void destructMap( ValueInternalMap *map ) { delete map; } virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) { return new ValueInternalLink[size]; } virtual void releaseMapBuckets( ValueInternalLink *links ) { delete [] links; } virtual ValueInternalLink *allocateMapLink() { return new ValueInternalLink(); } virtual void releaseMapLink( ValueInternalLink *link ) { delete link; } }; * \endcode */ class JSON_API ValueMapAllocator { public: virtual ~ValueMapAllocator(); virtual ValueInternalMap *newMap() = 0; virtual ValueInternalMap *newMapCopy( const ValueInternalMap &other ) = 0; virtual void destructMap( ValueInternalMap *map ) = 0; virtual ValueInternalLink *allocateMapBuckets( unsigned int size ) = 0; virtual void releaseMapBuckets( ValueInternalLink *links ) = 0; virtual ValueInternalLink *allocateMapLink() = 0; virtual void releaseMapLink( ValueInternalLink *link ) = 0; }; /** \brief ValueInternalMap hash-map bucket chain link (for internal use only). * \internal previous_ & next_ allows for bidirectional traversal. */ class JSON_API ValueInternalLink { public: enum { itemPerLink = 6 }; // sizeof(ValueInternalLink) = 128 on 32 bits architecture. enum InternalFlags { flagAvailable = 0, flagUsed = 1 }; ValueInternalLink(); ~ValueInternalLink(); Value items_[itemPerLink]; char *keys_[itemPerLink]; ValueInternalLink *previous_; ValueInternalLink *next_; }; /** \brief A linked page based hash-table implementation used internally by Value. * \internal ValueInternalMap is a tradional bucket based hash-table, with a linked * list in each bucket to handle collision. There is an addional twist in that * each node of the collision linked list is a page containing a fixed amount of * value. This provides a better compromise between memory usage and speed. * * Each bucket is made up of a chained list of ValueInternalLink. The last * link of a given bucket can be found in the 'previous_' field of the following bucket. * The last link of the last bucket is stored in tailLink_ as it has no following bucket. * Only the last link of a bucket may contains 'available' item. The last link always * contains at least one element unless is it the bucket one very first link. */ class JSON_API ValueInternalMap { friend class ValueIteratorBase; friend class Value; public: typedef unsigned int HashKey; typedef unsigned int BucketIndex; # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION struct IteratorState { IteratorState() : map_(0) , link_(0) , itemIndex_(0) , bucketIndex_(0) { } ValueInternalMap *map_; ValueInternalLink *link_; BucketIndex itemIndex_; BucketIndex bucketIndex_; }; # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION ValueInternalMap(); ValueInternalMap( const ValueInternalMap &other ); ValueInternalMap &operator =( const ValueInternalMap &other ); ~ValueInternalMap(); void swap( ValueInternalMap &other ); BucketIndex size() const; void clear(); bool reserveDelta( BucketIndex growth ); bool reserve( BucketIndex newItemCount ); const Value *find( const char *key ) const; Value *find( const char *key ); Value &resolveReference( const char *key, bool isStatic ); void remove( const char *key ); void doActualRemove( ValueInternalLink *link, BucketIndex index, BucketIndex bucketIndex ); ValueInternalLink *&getLastLinkInBucket( BucketIndex bucketIndex ); Value &setNewItem( const char *key, bool isStatic, ValueInternalLink *link, BucketIndex index ); Value &unsafeAdd( const char *key, bool isStatic, HashKey hashedKey ); HashKey hash( const char *key ) const; int compare( const ValueInternalMap &other ) const; private: void makeBeginIterator( IteratorState &it ) const; void makeEndIterator( IteratorState &it ) const; static bool equals( const IteratorState &x, const IteratorState &other ); static void increment( IteratorState &iterator ); static void incrementBucket( IteratorState &iterator ); static void decrement( IteratorState &iterator ); static const char *key( const IteratorState &iterator ); static const char *key( const IteratorState &iterator, bool &isStatic ); static Value &value( const IteratorState &iterator ); static int distance( const IteratorState &x, const IteratorState &y ); private: ValueInternalLink *buckets_; ValueInternalLink *tailLink_; BucketIndex bucketsSize_; BucketIndex itemCount_; }; /** \brief A simplified deque implementation used internally by Value. * \internal * It is based on a list of fixed "page", each page contains a fixed number of items. * Instead of using a linked-list, a array of pointer is used for fast item look-up. * Look-up for an element is as follow: * - compute page index: pageIndex = itemIndex / itemsPerPage * - look-up item in page: pages_[pageIndex][itemIndex % itemsPerPage] * * Insertion is amortized constant time (only the array containing the index of pointers * need to be reallocated when items are appended). */ class JSON_API ValueInternalArray { friend class Value; friend class ValueIteratorBase; public: enum { itemsPerPage = 8 }; // should be a power of 2 for fast divide and modulo. typedef Value::ArrayIndex ArrayIndex; typedef unsigned int PageIndex; # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION struct IteratorState // Must be a POD { IteratorState() : array_(0) , currentPageIndex_(0) , currentItemIndex_(0) { } ValueInternalArray *array_; Value **currentPageIndex_; unsigned int currentItemIndex_; }; # endif // ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION ValueInternalArray(); ValueInternalArray( const ValueInternalArray &other ); ValueInternalArray &operator =( const ValueInternalArray &other ); ~ValueInternalArray(); void swap( ValueInternalArray &other ); void clear(); void resize( ArrayIndex newSize ); Value &resolveReference( ArrayIndex index ); Value *find( ArrayIndex index ) const; ArrayIndex size() const; int compare( const ValueInternalArray &other ) const; private: static bool equals( const IteratorState &x, const IteratorState &other ); static void increment( IteratorState &iterator ); static void decrement( IteratorState &iterator ); static Value &dereference( const IteratorState &iterator ); static Value &unsafeDereference( const IteratorState &iterator ); static int distance( const IteratorState &x, const IteratorState &y ); static ArrayIndex indexOf( const IteratorState &iterator ); void makeBeginIterator( IteratorState &it ) const; void makeEndIterator( IteratorState &it ) const; void makeIterator( IteratorState &it, ArrayIndex index ) const; void makeIndexValid( ArrayIndex index ); Value **pages_; ArrayIndex size_; PageIndex pageCount_; }; /** \brief Experimental: do not use. Allocator to customize Value internal array. * Below is an example of a simple implementation (actual implementation use * memory pool). \code class DefaultValueArrayAllocator : public ValueArrayAllocator { public: // overridden from ValueArrayAllocator virtual ~DefaultValueArrayAllocator() { } virtual ValueInternalArray *newArray() { return new ValueInternalArray(); } virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) { return new ValueInternalArray( other ); } virtual void destruct( ValueInternalArray *array ) { delete array; } virtual void reallocateArrayPageIndex( Value **&indexes, ValueInternalArray::PageIndex &indexCount, ValueInternalArray::PageIndex minNewIndexCount ) { ValueInternalArray::PageIndex newIndexCount = (indexCount*3)/2 + 1; if ( minNewIndexCount > newIndexCount ) newIndexCount = minNewIndexCount; void *newIndexes = realloc( indexes, sizeof(Value*) * newIndexCount ); if ( !newIndexes ) throw std::bad_alloc(); indexCount = newIndexCount; indexes = static_cast( newIndexes ); } virtual void releaseArrayPageIndex( Value **indexes, ValueInternalArray::PageIndex indexCount ) { if ( indexes ) free( indexes ); } virtual Value *allocateArrayPage() { return static_cast( malloc( sizeof(Value) * ValueInternalArray::itemsPerPage ) ); } virtual void releaseArrayPage( Value *value ) { if ( value ) free( value ); } }; \endcode */ class JSON_API ValueArrayAllocator { public: virtual ~ValueArrayAllocator(); virtual ValueInternalArray *newArray() = 0; virtual ValueInternalArray *newArrayCopy( const ValueInternalArray &other ) = 0; virtual void destructArray( ValueInternalArray *array ) = 0; /** \brief Reallocate array page index. * Reallocates an array of pointer on each page. * \param indexes [input] pointer on the current index. May be \c NULL. * [output] pointer on the new index of at least * \a minNewIndexCount pages. * \param indexCount [input] current number of pages in the index. * [output] number of page the reallocated index can handle. * \b MUST be >= \a minNewIndexCount. * \param minNewIndexCount Minimum number of page the new index must be able to * handle. */ virtual void reallocateArrayPageIndex( Value **&indexes, ValueInternalArray::PageIndex &indexCount, ValueInternalArray::PageIndex minNewIndexCount ) = 0; virtual void releaseArrayPageIndex( Value **indexes, ValueInternalArray::PageIndex indexCount ) = 0; virtual Value *allocateArrayPage() = 0; virtual void releaseArrayPage( Value *value ) = 0; }; #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP /** \brief base class for Value iterators. * */ class ValueIteratorBase { public: typedef unsigned int size_t; typedef int difference_type; typedef ValueIteratorBase SelfType; ValueIteratorBase(); #ifndef JSON_VALUE_USE_INTERNAL_MAP explicit ValueIteratorBase( const Value::ObjectValues::iterator ¤t ); #else ValueIteratorBase( const ValueInternalArray::IteratorState &state ); ValueIteratorBase( const ValueInternalMap::IteratorState &state ); #endif bool operator ==( const SelfType &other ) const { return isEqual( other ); } bool operator !=( const SelfType &other ) const { return !isEqual( other ); } difference_type operator -( const SelfType &other ) const { return computeDistance( other ); } /// Return either the index or the member name of the referenced value as a Value. Value key() const; /// Return the index of the referenced Value. -1 if it is not an arrayValue. UInt index() const; /// Return the member name of the referenced Value. "" if it is not an objectValue. const char *memberName() const; protected: Value &deref() const; void increment(); void decrement(); difference_type computeDistance( const SelfType &other ) const; bool isEqual( const SelfType &other ) const; void copy( const SelfType &other ); private: #ifndef JSON_VALUE_USE_INTERNAL_MAP Value::ObjectValues::iterator current_; // Indicates that iterator is for a null value. bool isNull_; #else union { ValueInternalArray::IteratorState array_; ValueInternalMap::IteratorState map_; } iterator_; bool isArray_; #endif }; /** \brief const iterator for object and array value. * */ class ValueConstIterator : public ValueIteratorBase { friend class Value; public: typedef unsigned int size_t; typedef int difference_type; typedef const Value &reference; typedef const Value *pointer; typedef ValueConstIterator SelfType; ValueConstIterator(); private: /*! \internal Use by Value to create an iterator. */ #ifndef JSON_VALUE_USE_INTERNAL_MAP explicit ValueConstIterator( const Value::ObjectValues::iterator ¤t ); #else ValueConstIterator( const ValueInternalArray::IteratorState &state ); ValueConstIterator( const ValueInternalMap::IteratorState &state ); #endif public: SelfType &operator =( const ValueIteratorBase &other ); SelfType operator++( int ) { SelfType temp( *this ); ++*this; return temp; } SelfType operator--( int ) { SelfType temp( *this ); --*this; return temp; } SelfType &operator--() { decrement(); return *this; } SelfType &operator++() { increment(); return *this; } reference operator *() const { return deref(); } }; /** \brief Iterator for object and array value. */ class ValueIterator : public ValueIteratorBase { friend class Value; public: typedef unsigned int size_t; typedef int difference_type; typedef Value &reference; typedef Value *pointer; typedef ValueIterator SelfType; ValueIterator(); ValueIterator( const ValueConstIterator &other ); ValueIterator( const ValueIterator &other ); private: /*! \internal Use by Value to create an iterator. */ #ifndef JSON_VALUE_USE_INTERNAL_MAP explicit ValueIterator( const Value::ObjectValues::iterator ¤t ); #else ValueIterator( const ValueInternalArray::IteratorState &state ); ValueIterator( const ValueInternalMap::IteratorState &state ); #endif public: SelfType &operator =( const SelfType &other ); SelfType operator++( int ) { SelfType temp( *this ); ++*this; return temp; } SelfType operator--( int ) { SelfType temp( *this ); --*this; return temp; } SelfType &operator--() { decrement(); return *this; } SelfType &operator++() { increment(); return *this; } reference operator *() const { return deref(); } }; } // namespace Json #endif // CPPTL_JSON_H_INCLUDED // ////////////////////////////////////////////////////////////////////// // End of content of file: include/json/value.h // ////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: include/json/reader.h // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef CPPTL_JSON_READER_H_INCLUDED # define CPPTL_JSON_READER_H_INCLUDED #if !defined(JSON_IS_AMALGAMATION) # include "features.h" # include "value.h" #endif // if !defined(JSON_IS_AMALGAMATION) # include # include # include # include namespace Json { /** \brief Unserialize a JSON document into a Value. * */ class JSON_API Reader { public: typedef char Char; typedef const Char *Location; /** \brief Constructs a Reader allowing all features * for parsing. */ Reader(); /** \brief Constructs a Reader allowing the specified feature set * for parsing. */ Reader( const Features &features ); /** \brief Read a Value from a JSON document. * \param document UTF-8 encoded string containing the document to read. * \param root [out] Contains the root value of the document if it was * successfully parsed. * \param collectComments \c true to collect comment and allow writing them back during * serialization, \c false to discard comments. * This parameter is ignored if Features::allowComments_ * is \c false. * \return \c true if the document was successfully parsed, \c false if an error occurred. */ bool parse( const std::string &document, Value &root, bool collectComments = true ); /** \brief Read a Value from a JSON document. * \param beginDoc Pointer on the beginning of the UTF-8 encoded string of the document to read. * \param endDoc Pointer on the end of the UTF-8 encoded string of the document to read. \ Must be >= beginDoc. * \param root [out] Contains the root value of the document if it was * successfully parsed. * \param collectComments \c true to collect comment and allow writing them back during * serialization, \c false to discard comments. * This parameter is ignored if Features::allowComments_ * is \c false. * \return \c true if the document was successfully parsed, \c false if an error occurred. */ bool parse( const char *beginDoc, const char *endDoc, Value &root, bool collectComments = true ); /// \brief Parse from input stream. /// \see Json::operator>>(std::istream&, Json::Value&). bool parse( std::istream &is, Value &root, bool collectComments = true ); /** \brief Returns a user friendly string that list errors in the parsed document. * \return Formatted error message with the list of errors with their location in * the parsed document. An empty string is returned if no error occurred * during parsing. * \deprecated Use getFormattedErrorMessages() instead (typo fix). */ JSONCPP_DEPRECATED("Use getFormattedErrorMessages instead") std::string getFormatedErrorMessages() const; /** \brief Returns a user friendly string that list errors in the parsed document. * \return Formatted error message with the list of errors with their location in * the parsed document. An empty string is returned if no error occurred * during parsing. */ std::string getFormattedErrorMessages() const; private: enum TokenType { tokenEndOfStream = 0, tokenObjectBegin, tokenObjectEnd, tokenArrayBegin, tokenArrayEnd, tokenString, tokenNumber, tokenTrue, tokenFalse, tokenNull, tokenArraySeparator, tokenMemberSeparator, tokenComment, tokenError }; class Token { public: TokenType type_; Location start_; Location end_; }; class ErrorInfo { public: Token token_; std::string message_; Location extra_; }; typedef std::deque Errors; bool expectToken( TokenType type, Token &token, const char *message ); bool readToken( Token &token ); void skipSpaces(); bool match( Location pattern, int patternLength ); bool readComment(); bool readCStyleComment(); bool readCppStyleComment(); bool readString(); void readNumber(); bool readValue(); bool readObject( Token &token ); bool readArray( Token &token ); bool decodeNumber( Token &token ); bool decodeString( Token &token ); bool decodeString( Token &token, std::string &decoded ); bool decodeDouble( Token &token ); bool decodeUnicodeCodePoint( Token &token, Location ¤t, Location end, unsigned int &unicode ); bool decodeUnicodeEscapeSequence( Token &token, Location ¤t, Location end, unsigned int &unicode ); bool addError( const std::string &message, Token &token, Location extra = 0 ); bool recoverFromError( TokenType skipUntilToken ); bool addErrorAndRecover( const std::string &message, Token &token, TokenType skipUntilToken ); void skipUntilSpace(); Value ¤tValue(); Char getNextChar(); void getLocationLineAndColumn( Location location, int &line, int &column ) const; std::string getLocationLineAndColumn( Location location ) const; void addComment( Location begin, Location end, CommentPlacement placement ); void skipCommentTokens( Token &token ); typedef std::stack Nodes; Nodes nodes_; Errors errors_; std::string document_; Location begin_; Location end_; Location current_; Location lastValueEnd_; Value *lastValue_; std::string commentsBefore_; Features features_; bool collectComments_; }; /** \brief Read from 'sin' into 'root'. Always keep comments from the input JSON. This can be used to read a file into a particular sub-object. For example: \code Json::Value root; cin >> root["dir"]["file"]; cout << root; \endcode Result: \verbatim { "dir": { "file": { // The input stream JSON would be nested here. } } } \endverbatim \throw std::exception on parse error. \see Json::operator<<() */ std::istream& operator>>( std::istream&, Value& ); } // namespace Json #endif // CPPTL_JSON_READER_H_INCLUDED // ////////////////////////////////////////////////////////////////////// // End of content of file: include/json/reader.h // ////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: include/json/writer.h // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSON_WRITER_H_INCLUDED # define JSON_WRITER_H_INCLUDED #if !defined(JSON_IS_AMALGAMATION) # include "value.h" #endif // if !defined(JSON_IS_AMALGAMATION) # include # include # include namespace Json { class Value; /** \brief Abstract class for writers. */ class JSON_API Writer { public: virtual ~Writer(); virtual std::string write( const Value &root ) = 0; }; /** \brief Outputs a Value in JSON format without formatting (not human friendly). * * The JSON document is written in a single line. It is not intended for 'human' consumption, * but may be usefull to support feature such as RPC where bandwith is limited. * \sa Reader, Value */ class JSON_API FastWriter : public Writer { public: FastWriter(); virtual ~FastWriter(){} void enableYAMLCompatibility(); public: // overridden from Writer virtual std::string write( const Value &root ); private: void writeValue( const Value &value ); std::string document_; bool yamlCompatiblityEnabled_; }; /** \brief Writes a Value in JSON format in a human friendly way. * * The rules for line break and indent are as follow: * - Object value: * - if empty then print {} without indent and line break * - if not empty the print '{', line break & indent, print one value per line * and then unindent and line break and print '}'. * - Array value: * - if empty then print [] without indent and line break * - if the array contains no object value, empty array or some other value types, * and all the values fit on one lines, then print the array on a single line. * - otherwise, it the values do not fit on one line, or the array contains * object or non empty array, then print one value per line. * * If the Value have comments then they are outputed according to their #CommentPlacement. * * \sa Reader, Value, Value::setComment() */ class JSON_API StyledWriter: public Writer { public: StyledWriter(); virtual ~StyledWriter(){} public: // overridden from Writer /** \brief Serialize a Value in JSON format. * \param root Value to serialize. * \return String containing the JSON document that represents the root value. */ virtual std::string write( const Value &root ); private: void writeValue( const Value &value ); void writeArrayValue( const Value &value ); bool isMultineArray( const Value &value ); void pushValue( const std::string &value ); void writeIndent(); void writeWithIndent( const std::string &value ); void indent(); void unindent(); void writeCommentBeforeValue( const Value &root ); void writeCommentAfterValueOnSameLine( const Value &root ); bool hasCommentForValue( const Value &value ); static std::string normalizeEOL( const std::string &text ); typedef std::vector ChildValues; ChildValues childValues_; std::string document_; std::string indentString_; int rightMargin_; int indentSize_; bool addChildValues_; }; /** \brief Writes a Value in JSON format in a human friendly way, to a stream rather than to a string. * * The rules for line break and indent are as follow: * - Object value: * - if empty then print {} without indent and line break * - if not empty the print '{', line break & indent, print one value per line * and then unindent and line break and print '}'. * - Array value: * - if empty then print [] without indent and line break * - if the array contains no object value, empty array or some other value types, * and all the values fit on one lines, then print the array on a single line. * - otherwise, it the values do not fit on one line, or the array contains * object or non empty array, then print one value per line. * * If the Value have comments then they are outputed according to their #CommentPlacement. * * \param indentation Each level will be indented by this amount extra. * \sa Reader, Value, Value::setComment() */ class JSON_API StyledStreamWriter { public: StyledStreamWriter( std::string indentation="\t" ); ~StyledStreamWriter(){} public: /** \brief Serialize a Value in JSON format. * \param out Stream to write to. (Can be ostringstream, e.g.) * \param root Value to serialize. * \note There is no point in deriving from Writer, since write() should not return a value. */ void write( std::ostream &out, const Value &root ); private: void writeValue( const Value &value ); void writeArrayValue( const Value &value ); bool isMultineArray( const Value &value ); void pushValue( const std::string &value ); void writeIndent(); void writeWithIndent( const std::string &value ); void indent(); void unindent(); void writeCommentBeforeValue( const Value &root ); void writeCommentAfterValueOnSameLine( const Value &root ); bool hasCommentForValue( const Value &value ); static std::string normalizeEOL( const std::string &text ); typedef std::vector ChildValues; ChildValues childValues_; std::ostream* document_; std::string indentString_; int rightMargin_; std::string indentation_; bool addChildValues_; }; # if defined(JSON_HAS_INT64) std::string JSON_API valueToString( Int value ); std::string JSON_API valueToString( UInt value ); # endif // if defined(JSON_HAS_INT64) std::string JSON_API valueToString( LargestInt value ); std::string JSON_API valueToString( LargestUInt value ); std::string JSON_API valueToString( double value ); std::string JSON_API valueToString( bool value ); std::string JSON_API valueToQuotedString( const char *value ); /// \brief Output using the StyledStreamWriter. /// \see Json::operator>>() std::ostream& operator<<( std::ostream&, const Value &root ); } // namespace Json #endif // JSON_WRITER_H_INCLUDED // ////////////////////////////////////////////////////////////////////// // End of content of file: include/json/writer.h // ////////////////////////////////////////////////////////////////////// #endif //ifndef JSON_AMALGATED_H_INCLUDED passenger-4.0.37/ext/common/Utils/jsoncpp.cpp000644 000765 000024 00000312777 12233035540 021605 0ustar00honglistaff000000 000000 /// Json-cpp amalgated source (http://jsoncpp.sourceforge.net/). /// It is intented to be used with #include // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: LICENSE // ////////////////////////////////////////////////////////////////////// /* The JsonCpp library's source code, including accompanying documentation, tests and demonstration applications, are licensed under the following conditions... The author (Baptiste Lepilleur) explicitly disclaims copyright in all jurisdictions which recognize such a disclaimer. In such jurisdictions, this software is released into the Public Domain. In jurisdictions which do not recognize Public Domain property (e.g. Germany as of 2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is released under the terms of the MIT License (see below). In jurisdictions which recognize Public Domain property, the user of this software may choose to accept it either as 1) Public Domain, 2) under the conditions of the MIT License (see below), or 3) under the terms of dual Public Domain/MIT License conditions described here, as they choose. The MIT License is about as close to Public Domain as a license can get, and is described in clear, concise terms at: http://en.wikipedia.org/wiki/MIT_License The full text of the MIT License follows: ======================================================================== Copyright (c) 2007-2010 Baptiste Lepilleur Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ======================================================================== (END LICENSE TEXT) The MIT license is compatible with both the GPL and commercial software, affording one all of the rights of Public Domain with the minor nuisance of being required to keep the above copyright notice and license text in the source code. Note also that by accepting the Public Domain "license" you can re-license your copy using whatever license you like. */ // ////////////////////////////////////////////////////////////////////// // End of content of file: LICENSE // ////////////////////////////////////////////////////////////////////// #include // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: src/lib_json/json_tool.h // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef LIB_JSONCPP_JSON_TOOL_H_INCLUDED # define LIB_JSONCPP_JSON_TOOL_H_INCLUDED /* This header provides common string manipulation support, such as UTF-8, * portable conversion from/to string... * * It is an internal header that must not be exposed. */ namespace Json { /// Converts a unicode code-point to UTF-8. static inline std::string codePointToUTF8(unsigned int cp) { std::string result; // based on description from http://en.wikipedia.org/wiki/UTF-8 if (cp <= 0x7f) { result.resize(1); result[0] = static_cast(cp); } else if (cp <= 0x7FF) { result.resize(2); result[1] = static_cast(0x80 | (0x3f & cp)); result[0] = static_cast(0xC0 | (0x1f & (cp >> 6))); } else if (cp <= 0xFFFF) { result.resize(3); result[2] = static_cast(0x80 | (0x3f & cp)); result[1] = 0x80 | static_cast((0x3f & (cp >> 6))); result[0] = 0xE0 | static_cast((0xf & (cp >> 12))); } else if (cp <= 0x10FFFF) { result.resize(4); result[3] = static_cast(0x80 | (0x3f & cp)); result[2] = static_cast(0x80 | (0x3f & (cp >> 6))); result[1] = static_cast(0x80 | (0x3f & (cp >> 12))); result[0] = static_cast(0xF0 | (0x7 & (cp >> 18))); } return result; } /// Returns true if ch is a control character (in range [0,32[). static inline bool isControlCharacter(char ch) { return ch > 0 && ch <= 0x1F; } enum { /// Constant that specify the size of the buffer that must be passed to uintToString. uintToStringBufferSize = 3*sizeof(LargestUInt)+1 }; // Defines a char buffer for use with uintToString(). typedef char UIntToStringBuffer[uintToStringBufferSize]; /** Converts an unsigned integer to string. * @param value Unsigned interger to convert to string * @param current Input/Output string buffer. * Must have at least uintToStringBufferSize chars free. */ static inline void uintToString( LargestUInt value, char *¤t ) { *--current = 0; do { *--current = char(value % 10) + '0'; value /= 10; } while ( value != 0 ); } } // namespace Json { #endif // LIB_JSONCPP_JSON_TOOL_H_INCLUDED // ////////////////////////////////////////////////////////////////////// // End of content of file: src/lib_json/json_tool.h // ////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: src/lib_json/json_reader.cpp // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if !defined(JSON_IS_AMALGAMATION) # include # include # include "json_tool.h" #endif // if !defined(JSON_IS_AMALGAMATION) #include #include #include #include #include #include #include #if _MSC_VER >= 1400 // VC++ 8.0 #pragma warning( disable : 4996 ) // disable warning about strdup being deprecated. #endif namespace Json { // Implementation of class Features // //////////////////////////////// Features::Features() : allowComments_( true ) , strictRoot_( false ) { } Features Features::all() { return Features(); } Features Features::strictMode() { Features features; features.allowComments_ = false; features.strictRoot_ = true; return features; } // Implementation of class Reader // //////////////////////////////// static inline bool in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4 ) { return c == c1 || c == c2 || c == c3 || c == c4; } static inline bool in( Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4, Reader::Char c5 ) { return c == c1 || c == c2 || c == c3 || c == c4 || c == c5; } static bool containsNewLine( Reader::Location begin, Reader::Location end ) { for ( ;begin < end; ++begin ) if ( *begin == '\n' || *begin == '\r' ) return true; return false; } // Class Reader // ////////////////////////////////////////////////////////////////// Reader::Reader() : features_( Features::all() ) { } Reader::Reader( const Features &features ) : features_( features ) { } bool Reader::parse( const std::string &document, Value &root, bool collectComments ) { document_ = document; const char *begin = document_.c_str(); const char *end = begin + document_.length(); return parse( begin, end, root, collectComments ); } bool Reader::parse( std::istream& sin, Value &root, bool collectComments ) { //std::istream_iterator begin(sin); //std::istream_iterator end; // Those would allow streamed input from a file, if parse() were a // template function. // Since std::string is reference-counted, this at least does not // create an extra copy. std::string doc; std::getline(sin, doc, (char)EOF); return parse( doc, root, collectComments ); } bool Reader::parse( const char *beginDoc, const char *endDoc, Value &root, bool collectComments ) { if ( !features_.allowComments_ ) { collectComments = false; } begin_ = beginDoc; end_ = endDoc; collectComments_ = collectComments; current_ = begin_; lastValueEnd_ = 0; lastValue_ = 0; commentsBefore_ = ""; errors_.clear(); while ( !nodes_.empty() ) nodes_.pop(); nodes_.push( &root ); bool successful = readValue(); Token token; skipCommentTokens( token ); if ( collectComments_ && !commentsBefore_.empty() ) root.setComment( commentsBefore_, commentAfter ); if ( features_.strictRoot_ ) { if ( !root.isArray() && !root.isObject() ) { // Set error location to start of doc, ideally should be first token found in doc token.type_ = tokenError; token.start_ = beginDoc; token.end_ = endDoc; addError( "A valid JSON document must be either an array or an object value.", token ); return false; } } return successful; } bool Reader::readValue() { Token token; skipCommentTokens( token ); bool successful = true; if ( collectComments_ && !commentsBefore_.empty() ) { currentValue().setComment( commentsBefore_, commentBefore ); commentsBefore_ = ""; } switch ( token.type_ ) { case tokenObjectBegin: successful = readObject( token ); break; case tokenArrayBegin: successful = readArray( token ); break; case tokenNumber: successful = decodeNumber( token ); break; case tokenString: successful = decodeString( token ); break; case tokenTrue: currentValue() = true; break; case tokenFalse: currentValue() = false; break; case tokenNull: currentValue() = Value(); break; default: return addError( "Syntax error: value, object or array expected.", token ); } if ( collectComments_ ) { lastValueEnd_ = current_; lastValue_ = ¤tValue(); } return successful; } void Reader::skipCommentTokens( Token &token ) { if ( features_.allowComments_ ) { do { readToken( token ); } while ( token.type_ == tokenComment ); } else { readToken( token ); } } bool Reader::expectToken( TokenType type, Token &token, const char *message ) { readToken( token ); if ( token.type_ != type ) return addError( message, token ); return true; } bool Reader::readToken( Token &token ) { skipSpaces(); token.start_ = current_; Char c = getNextChar(); bool ok = true; switch ( c ) { case '{': token.type_ = tokenObjectBegin; break; case '}': token.type_ = tokenObjectEnd; break; case '[': token.type_ = tokenArrayBegin; break; case ']': token.type_ = tokenArrayEnd; break; case '"': token.type_ = tokenString; ok = readString(); break; case '/': token.type_ = tokenComment; ok = readComment(); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case '-': token.type_ = tokenNumber; readNumber(); break; case 't': token.type_ = tokenTrue; ok = match( "rue", 3 ); break; case 'f': token.type_ = tokenFalse; ok = match( "alse", 4 ); break; case 'n': token.type_ = tokenNull; ok = match( "ull", 3 ); break; case ',': token.type_ = tokenArraySeparator; break; case ':': token.type_ = tokenMemberSeparator; break; case 0: token.type_ = tokenEndOfStream; break; default: ok = false; break; } if ( !ok ) token.type_ = tokenError; token.end_ = current_; return true; } void Reader::skipSpaces() { while ( current_ != end_ ) { Char c = *current_; if ( c == ' ' || c == '\t' || c == '\r' || c == '\n' ) ++current_; else break; } } bool Reader::match( Location pattern, int patternLength ) { if ( end_ - current_ < patternLength ) return false; int index = patternLength; while ( index-- ) if ( current_[index] != pattern[index] ) return false; current_ += patternLength; return true; } bool Reader::readComment() { Location commentBegin = current_ - 1; Char c = getNextChar(); bool successful = false; if ( c == '*' ) successful = readCStyleComment(); else if ( c == '/' ) successful = readCppStyleComment(); if ( !successful ) return false; if ( collectComments_ ) { CommentPlacement placement = commentBefore; if ( lastValueEnd_ && !containsNewLine( lastValueEnd_, commentBegin ) ) { if ( c != '*' || !containsNewLine( commentBegin, current_ ) ) placement = commentAfterOnSameLine; } addComment( commentBegin, current_, placement ); } return true; } void Reader::addComment( Location begin, Location end, CommentPlacement placement ) { assert( collectComments_ ); if ( placement == commentAfterOnSameLine ) { assert( lastValue_ != 0 ); lastValue_->setComment( std::string( begin, end ), placement ); } else { if ( !commentsBefore_.empty() ) commentsBefore_ += "\n"; commentsBefore_ += std::string( begin, end ); } } bool Reader::readCStyleComment() { while ( current_ != end_ ) { Char c = getNextChar(); if ( c == '*' && *current_ == '/' ) break; } return getNextChar() == '/'; } bool Reader::readCppStyleComment() { while ( current_ != end_ ) { Char c = getNextChar(); if ( c == '\r' || c == '\n' ) break; } return true; } void Reader::readNumber() { while ( current_ != end_ ) { if ( !(*current_ >= '0' && *current_ <= '9') && !in( *current_, '.', 'e', 'E', '+', '-' ) ) break; ++current_; } } bool Reader::readString() { Char c = 0; while ( current_ != end_ ) { c = getNextChar(); if ( c == '\\' ) getNextChar(); else if ( c == '"' ) break; } return c == '"'; } bool Reader::readObject( Token &/*tokenStart*/ ) { Token tokenName; std::string name; currentValue() = Value( objectValue ); while ( readToken( tokenName ) ) { bool initialTokenOk = true; while ( tokenName.type_ == tokenComment && initialTokenOk ) initialTokenOk = readToken( tokenName ); if ( !initialTokenOk ) break; if ( tokenName.type_ == tokenObjectEnd && name.empty() ) // empty object return true; if ( tokenName.type_ != tokenString ) break; name = ""; if ( !decodeString( tokenName, name ) ) return recoverFromError( tokenObjectEnd ); Token colon; if ( !readToken( colon ) || colon.type_ != tokenMemberSeparator ) { return addErrorAndRecover( "Missing ':' after object member name", colon, tokenObjectEnd ); } Value &value = currentValue()[ name ]; nodes_.push( &value ); bool ok = readValue(); nodes_.pop(); if ( !ok ) // error already set return recoverFromError( tokenObjectEnd ); Token comma; if ( !readToken( comma ) || ( comma.type_ != tokenObjectEnd && comma.type_ != tokenArraySeparator && comma.type_ != tokenComment ) ) { return addErrorAndRecover( "Missing ',' or '}' in object declaration", comma, tokenObjectEnd ); } bool finalizeTokenOk = true; while ( comma.type_ == tokenComment && finalizeTokenOk ) finalizeTokenOk = readToken( comma ); if ( comma.type_ == tokenObjectEnd ) return true; } return addErrorAndRecover( "Missing '}' or object member name", tokenName, tokenObjectEnd ); } bool Reader::readArray( Token &/*tokenStart*/ ) { currentValue() = Value( arrayValue ); skipSpaces(); if ( *current_ == ']' ) // empty array { Token endArray; readToken( endArray ); return true; } int index = 0; for (;;) { Value &value = currentValue()[ index++ ]; nodes_.push( &value ); bool ok = readValue(); nodes_.pop(); if ( !ok ) // error already set return recoverFromError( tokenArrayEnd ); Token token; // Accept Comment after last item in the array. ok = readToken( token ); while ( token.type_ == tokenComment && ok ) { ok = readToken( token ); } bool badTokenType = ( token.type_ != tokenArraySeparator && token.type_ != tokenArrayEnd ); if ( !ok || badTokenType ) { return addErrorAndRecover( "Missing ',' or ']' in array declaration", token, tokenArrayEnd ); } if ( token.type_ == tokenArrayEnd ) break; } return true; } bool Reader::decodeNumber( Token &token ) { bool isDouble = false; for ( Location inspect = token.start_; inspect != token.end_; ++inspect ) { isDouble = isDouble || in( *inspect, '.', 'e', 'E', '+' ) || ( *inspect == '-' && inspect != token.start_ ); } if ( isDouble ) return decodeDouble( token ); // Attempts to parse the number as an integer. If the number is // larger than the maximum supported value of an integer then // we decode the number as a double. Location current = token.start_; bool isNegative = *current == '-'; if ( isNegative ) ++current; Value::LargestUInt maxIntegerValue = isNegative ? Value::LargestUInt(-Value::minLargestInt) : Value::maxLargestUInt; Value::LargestUInt threshold = maxIntegerValue / 10; Value::UInt lastDigitThreshold = Value::UInt( maxIntegerValue % 10 ); assert( lastDigitThreshold >=0 && lastDigitThreshold <= 9 ); Value::LargestUInt value = 0; while ( current < token.end_ ) { Char c = *current++; if ( c < '0' || c > '9' ) return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token ); Value::UInt digit(c - '0'); if ( value >= threshold ) { // If the current digit is not the last one, or if it is // greater than the last digit of the maximum integer value, // the parse the number as a double. if ( current != token.end_ || digit > lastDigitThreshold ) { return decodeDouble( token ); } } value = value * 10 + digit; } if ( isNegative ) currentValue() = -Value::LargestInt( value ); else if ( value <= Value::LargestUInt(Value::maxInt) ) currentValue() = Value::LargestInt( value ); else currentValue() = value; return true; } bool Reader::decodeDouble( Token &token ) { double value = 0; const int bufferSize = 32; int count; int length = int(token.end_ - token.start_); if ( length <= bufferSize ) { Char buffer[bufferSize+1]; memcpy( buffer, token.start_, length ); buffer[length] = 0; count = sscanf( buffer, "%lf", &value ); } else { std::string buffer( token.start_, token.end_ ); count = sscanf( buffer.c_str(), "%lf", &value ); } if ( count != 1 ) return addError( "'" + std::string( token.start_, token.end_ ) + "' is not a number.", token ); currentValue() = value; return true; } bool Reader::decodeString( Token &token ) { std::string decoded; if ( !decodeString( token, decoded ) ) return false; currentValue() = decoded; return true; } bool Reader::decodeString( Token &token, std::string &decoded ) { decoded.reserve( token.end_ - token.start_ - 2 ); Location current = token.start_ + 1; // skip '"' Location end = token.end_ - 1; // do not include '"' while ( current != end ) { Char c = *current++; if ( c == '"' ) break; else if ( c == '\\' ) { if ( current == end ) return addError( "Empty escape sequence in string", token, current ); Char escape = *current++; switch ( escape ) { case '"': decoded += '"'; break; case '/': decoded += '/'; break; case '\\': decoded += '\\'; break; case 'b': decoded += '\b'; break; case 'f': decoded += '\f'; break; case 'n': decoded += '\n'; break; case 'r': decoded += '\r'; break; case 't': decoded += '\t'; break; case 'u': { unsigned int unicode; if ( !decodeUnicodeCodePoint( token, current, end, unicode ) ) return false; decoded += codePointToUTF8(unicode); } break; default: return addError( "Bad escape sequence in string", token, current ); } } else { decoded += c; } } return true; } bool Reader::decodeUnicodeCodePoint( Token &token, Location ¤t, Location end, unsigned int &unicode ) { if ( !decodeUnicodeEscapeSequence( token, current, end, unicode ) ) return false; if (unicode >= 0xD800 && unicode <= 0xDBFF) { // surrogate pairs if (end - current < 6) return addError( "additional six characters expected to parse unicode surrogate pair.", token, current ); unsigned int surrogatePair; if (*(current++) == '\\' && *(current++)== 'u') { if (decodeUnicodeEscapeSequence( token, current, end, surrogatePair )) { unicode = 0x10000 + ((unicode & 0x3FF) << 10) + (surrogatePair & 0x3FF); } else return false; } else return addError( "expecting another \\u token to begin the second half of a unicode surrogate pair", token, current ); } return true; } bool Reader::decodeUnicodeEscapeSequence( Token &token, Location ¤t, Location end, unsigned int &unicode ) { if ( end - current < 4 ) return addError( "Bad unicode escape sequence in string: four digits expected.", token, current ); unicode = 0; for ( int index =0; index < 4; ++index ) { Char c = *current++; unicode *= 16; if ( c >= '0' && c <= '9' ) unicode += c - '0'; else if ( c >= 'a' && c <= 'f' ) unicode += c - 'a' + 10; else if ( c >= 'A' && c <= 'F' ) unicode += c - 'A' + 10; else return addError( "Bad unicode escape sequence in string: hexadecimal digit expected.", token, current ); } return true; } bool Reader::addError( const std::string &message, Token &token, Location extra ) { ErrorInfo info; info.token_ = token; info.message_ = message; info.extra_ = extra; errors_.push_back( info ); return false; } bool Reader::recoverFromError( TokenType skipUntilToken ) { int errorCount = int(errors_.size()); Token skip; for (;;) { if ( !readToken(skip) ) errors_.resize( errorCount ); // discard errors caused by recovery if ( skip.type_ == skipUntilToken || skip.type_ == tokenEndOfStream ) break; } errors_.resize( errorCount ); return false; } bool Reader::addErrorAndRecover( const std::string &message, Token &token, TokenType skipUntilToken ) { addError( message, token ); return recoverFromError( skipUntilToken ); } Value & Reader::currentValue() { return *(nodes_.top()); } Reader::Char Reader::getNextChar() { if ( current_ == end_ ) return 0; return *current_++; } void Reader::getLocationLineAndColumn( Location location, int &line, int &column ) const { Location current = begin_; Location lastLineStart = current; line = 0; while ( current < location && current != end_ ) { Char c = *current++; if ( c == '\r' ) { if ( *current == '\n' ) ++current; lastLineStart = current; ++line; } else if ( c == '\n' ) { lastLineStart = current; ++line; } } // column & line start at 1 column = int(location - lastLineStart) + 1; ++line; } std::string Reader::getLocationLineAndColumn( Location location ) const { int line, column; getLocationLineAndColumn( location, line, column ); char buffer[18+16+16+1]; sprintf( buffer, "Line %d, Column %d", line, column ); return buffer; } // Deprecated. Preserved for backward compatibility std::string Reader::getFormatedErrorMessages() const { return getFormattedErrorMessages(); } std::string Reader::getFormattedErrorMessages() const { std::string formattedMessage; for ( Errors::const_iterator itError = errors_.begin(); itError != errors_.end(); ++itError ) { const ErrorInfo &error = *itError; formattedMessage += "* " + getLocationLineAndColumn( error.token_.start_ ) + "\n"; formattedMessage += " " + error.message_ + "\n"; if ( error.extra_ ) formattedMessage += "See " + getLocationLineAndColumn( error.extra_ ) + " for detail.\n"; } return formattedMessage; } std::istream& operator>>( std::istream &sin, Value &root ) { Json::Reader reader; bool ok = reader.parse(sin, root, true); //JSON_ASSERT( ok ); if (!ok) throw std::runtime_error(reader.getFormattedErrorMessages()); return sin; } } // namespace Json // ////////////////////////////////////////////////////////////////////// // End of content of file: src/lib_json/json_reader.cpp // ////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: src/lib_json/json_batchallocator.h // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #ifndef JSONCPP_BATCHALLOCATOR_H_INCLUDED # define JSONCPP_BATCHALLOCATOR_H_INCLUDED # include # include # ifndef JSONCPP_DOC_EXCLUDE_IMPLEMENTATION namespace Json { /* Fast memory allocator. * * This memory allocator allocates memory for a batch of object (specified by * the page size, the number of object in each page). * * It does not allow the destruction of a single object. All the allocated objects * can be destroyed at once. The memory can be either released or reused for future * allocation. * * The in-place new operator must be used to construct the object using the pointer * returned by allocate. */ template class BatchAllocator { public: typedef AllocatedType Type; BatchAllocator( unsigned int objectsPerPage = 255 ) : freeHead_( 0 ) , objectsPerPage_( objectsPerPage ) { // printf( "Size: %d => %s\n", sizeof(AllocatedType), typeid(AllocatedType).name() ); assert( sizeof(AllocatedType) * objectPerAllocation >= sizeof(AllocatedType *) ); // We must be able to store a slist in the object free space. assert( objectsPerPage >= 16 ); batches_ = allocateBatch( 0 ); // allocated a dummy page currentBatch_ = batches_; } ~BatchAllocator() { for ( BatchInfo *batch = batches_; batch; ) { BatchInfo *nextBatch = batch->next_; free( batch ); batch = nextBatch; } } /// allocate space for an array of objectPerAllocation object. /// @warning it is the responsability of the caller to call objects constructors. AllocatedType *allocate() { if ( freeHead_ ) // returns node from free list. { AllocatedType *object = freeHead_; freeHead_ = *(AllocatedType **)object; return object; } if ( currentBatch_->used_ == currentBatch_->end_ ) { currentBatch_ = currentBatch_->next_; while ( currentBatch_ && currentBatch_->used_ == currentBatch_->end_ ) currentBatch_ = currentBatch_->next_; if ( !currentBatch_ ) // no free batch found, allocate a new one { currentBatch_ = allocateBatch( objectsPerPage_ ); currentBatch_->next_ = batches_; // insert at the head of the list batches_ = currentBatch_; } } AllocatedType *allocated = currentBatch_->used_; currentBatch_->used_ += objectPerAllocation; return allocated; } /// Release the object. /// @warning it is the responsability of the caller to actually destruct the object. void release( AllocatedType *object ) { assert( object != 0 ); *(AllocatedType **)object = freeHead_; freeHead_ = object; } private: struct BatchInfo { BatchInfo *next_; AllocatedType *used_; AllocatedType *end_; AllocatedType buffer_[objectPerAllocation]; }; // disabled copy constructor and assignement operator. BatchAllocator( const BatchAllocator & ); void operator =( const BatchAllocator &); static BatchInfo *allocateBatch( unsigned int objectsPerPage ) { const unsigned int mallocSize = sizeof(BatchInfo) - sizeof(AllocatedType)* objectPerAllocation + sizeof(AllocatedType) * objectPerAllocation * objectsPerPage; BatchInfo *batch = static_cast( malloc( mallocSize ) ); batch->next_ = 0; batch->used_ = batch->buffer_; batch->end_ = batch->buffer_ + objectsPerPage; return batch; } BatchInfo *batches_; BatchInfo *currentBatch_; /// Head of a single linked list within the allocated space of freeed object AllocatedType *freeHead_; unsigned int objectsPerPage_; }; } // namespace Json # endif // ifndef JSONCPP_DOC_INCLUDE_IMPLEMENTATION #endif // JSONCPP_BATCHALLOCATOR_H_INCLUDED // ////////////////////////////////////////////////////////////////////// // End of content of file: src/lib_json/json_batchallocator.h // ////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: src/lib_json/json_valueiterator.inl // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE // included by json_value.cpp namespace Json { // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // class ValueIteratorBase // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// ValueIteratorBase::ValueIteratorBase() #ifndef JSON_VALUE_USE_INTERNAL_MAP : current_() , isNull_( true ) { } #else : isArray_( true ) , isNull_( true ) { iterator_.array_ = ValueInternalArray::IteratorState(); } #endif #ifndef JSON_VALUE_USE_INTERNAL_MAP ValueIteratorBase::ValueIteratorBase( const Value::ObjectValues::iterator ¤t ) : current_( current ) , isNull_( false ) { } #else ValueIteratorBase::ValueIteratorBase( const ValueInternalArray::IteratorState &state ) : isArray_( true ) { iterator_.array_ = state; } ValueIteratorBase::ValueIteratorBase( const ValueInternalMap::IteratorState &state ) : isArray_( false ) { iterator_.map_ = state; } #endif Value & ValueIteratorBase::deref() const { #ifndef JSON_VALUE_USE_INTERNAL_MAP return current_->second; #else if ( isArray_ ) return ValueInternalArray::dereference( iterator_.array_ ); return ValueInternalMap::value( iterator_.map_ ); #endif } void ValueIteratorBase::increment() { #ifndef JSON_VALUE_USE_INTERNAL_MAP ++current_; #else if ( isArray_ ) ValueInternalArray::increment( iterator_.array_ ); ValueInternalMap::increment( iterator_.map_ ); #endif } void ValueIteratorBase::decrement() { #ifndef JSON_VALUE_USE_INTERNAL_MAP --current_; #else if ( isArray_ ) ValueInternalArray::decrement( iterator_.array_ ); ValueInternalMap::decrement( iterator_.map_ ); #endif } ValueIteratorBase::difference_type ValueIteratorBase::computeDistance( const SelfType &other ) const { #ifndef JSON_VALUE_USE_INTERNAL_MAP # ifdef JSON_USE_CPPTL_SMALLMAP return current_ - other.current_; # else // Iterator for null value are initialized using the default // constructor, which initialize current_ to the default // std::map::iterator. As begin() and end() are two instance // of the default std::map::iterator, they can not be compared. // To allow this, we handle this comparison specifically. if ( isNull_ && other.isNull_ ) { return 0; } // Usage of std::distance is not portable (does not compile with Sun Studio 12 RogueWave STL, // which is the one used by default). // Using a portable hand-made version for non random iterator instead: // return difference_type( std::distance( current_, other.current_ ) ); difference_type myDistance = 0; for ( Value::ObjectValues::iterator it = current_; it != other.current_; ++it ) { ++myDistance; } return myDistance; # endif #else if ( isArray_ ) return ValueInternalArray::distance( iterator_.array_, other.iterator_.array_ ); return ValueInternalMap::distance( iterator_.map_, other.iterator_.map_ ); #endif } bool ValueIteratorBase::isEqual( const SelfType &other ) const { #ifndef JSON_VALUE_USE_INTERNAL_MAP if ( isNull_ ) { return other.isNull_; } return current_ == other.current_; #else if ( isArray_ ) return ValueInternalArray::equals( iterator_.array_, other.iterator_.array_ ); return ValueInternalMap::equals( iterator_.map_, other.iterator_.map_ ); #endif } void ValueIteratorBase::copy( const SelfType &other ) { #ifndef JSON_VALUE_USE_INTERNAL_MAP current_ = other.current_; #else if ( isArray_ ) iterator_.array_ = other.iterator_.array_; iterator_.map_ = other.iterator_.map_; #endif } Value ValueIteratorBase::key() const { #ifndef JSON_VALUE_USE_INTERNAL_MAP const Value::CZString czstring = (*current_).first; if ( czstring.c_str() ) { if ( czstring.isStaticString() ) return Value( StaticString( czstring.c_str() ) ); return Value( czstring.c_str() ); } return Value( czstring.index() ); #else if ( isArray_ ) return Value( ValueInternalArray::indexOf( iterator_.array_ ) ); bool isStatic; const char *memberName = ValueInternalMap::key( iterator_.map_, isStatic ); if ( isStatic ) return Value( StaticString( memberName ) ); return Value( memberName ); #endif } UInt ValueIteratorBase::index() const { #ifndef JSON_VALUE_USE_INTERNAL_MAP const Value::CZString czstring = (*current_).first; if ( !czstring.c_str() ) return czstring.index(); return Value::UInt( -1 ); #else if ( isArray_ ) return Value::UInt( ValueInternalArray::indexOf( iterator_.array_ ) ); return Value::UInt( -1 ); #endif } const char * ValueIteratorBase::memberName() const { #ifndef JSON_VALUE_USE_INTERNAL_MAP const char *name = (*current_).first.c_str(); return name ? name : ""; #else if ( !isArray_ ) return ValueInternalMap::key( iterator_.map_ ); return ""; #endif } // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // class ValueConstIterator // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// ValueConstIterator::ValueConstIterator() { } #ifndef JSON_VALUE_USE_INTERNAL_MAP ValueConstIterator::ValueConstIterator( const Value::ObjectValues::iterator ¤t ) : ValueIteratorBase( current ) { } #else ValueConstIterator::ValueConstIterator( const ValueInternalArray::IteratorState &state ) : ValueIteratorBase( state ) { } ValueConstIterator::ValueConstIterator( const ValueInternalMap::IteratorState &state ) : ValueIteratorBase( state ) { } #endif ValueConstIterator & ValueConstIterator::operator =( const ValueIteratorBase &other ) { copy( other ); return *this; } // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // class ValueIterator // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// ValueIterator::ValueIterator() { } #ifndef JSON_VALUE_USE_INTERNAL_MAP ValueIterator::ValueIterator( const Value::ObjectValues::iterator ¤t ) : ValueIteratorBase( current ) { } #else ValueIterator::ValueIterator( const ValueInternalArray::IteratorState &state ) : ValueIteratorBase( state ) { } ValueIterator::ValueIterator( const ValueInternalMap::IteratorState &state ) : ValueIteratorBase( state ) { } #endif ValueIterator::ValueIterator( const ValueConstIterator &other ) : ValueIteratorBase( other ) { } ValueIterator::ValueIterator( const ValueIterator &other ) : ValueIteratorBase( other ) { } ValueIterator & ValueIterator::operator =( const SelfType &other ) { copy( other ); return *this; } } // namespace Json // ////////////////////////////////////////////////////////////////////// // End of content of file: src/lib_json/json_valueiterator.inl // ////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: src/lib_json/json_value.cpp // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if !defined(JSON_IS_AMALGAMATION) # include # include # ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR # include "json_batchallocator.h" # endif // #ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR #endif // if !defined(JSON_IS_AMALGAMATION) #include #include #include #include #include #ifdef JSON_USE_CPPTL # include #endif #include // size_t #define JSON_ASSERT_UNREACHABLE assert( false ) #define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw #define JSON_FAIL_MESSAGE( message ) throw std::runtime_error( message ); #define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) JSON_FAIL_MESSAGE( message ) namespace Json { const Value Value::null; const Int Value::minInt = Int( ~(UInt(-1)/2) ); const Int Value::maxInt = Int( UInt(-1)/2 ); const UInt Value::maxUInt = UInt(-1); const Int64 Value::minInt64 = Int64( ~(UInt64(-1)/2) ); const Int64 Value::maxInt64 = Int64( UInt64(-1)/2 ); const UInt64 Value::maxUInt64 = UInt64(-1); const LargestInt Value::minLargestInt = LargestInt( ~(LargestUInt(-1)/2) ); const LargestInt Value::maxLargestInt = LargestInt( LargestUInt(-1)/2 ); const LargestUInt Value::maxLargestUInt = LargestUInt(-1); /// Unknown size marker static const unsigned int unknown = (unsigned)-1; /** Duplicates the specified string value. * @param value Pointer to the string to duplicate. Must be zero-terminated if * length is "unknown". * @param length Length of the value. if equals to unknown, then it will be * computed using strlen(value). * @return Pointer on the duplicate instance of string. */ static inline char * duplicateStringValue( const char *value, unsigned int length = unknown ) { if ( length == unknown ) length = (unsigned int)strlen(value); char *newString = static_cast( malloc( length + 1 ) ); JSON_ASSERT_MESSAGE( newString != 0, "Failed to allocate string value buffer" ); memcpy( newString, value, length ); newString[length] = 0; return newString; } /** Free the string duplicated by duplicateStringValue(). */ static inline void releaseStringValue( char *value ) { if ( value ) free( value ); } } // namespace Json // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ValueInternals... // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// #if !defined(JSON_IS_AMALGAMATION) # ifdef JSON_VALUE_USE_INTERNAL_MAP # include "json_internalarray.inl" # include "json_internalmap.inl" # endif // JSON_VALUE_USE_INTERNAL_MAP # include "json_valueiterator.inl" #endif // if !defined(JSON_IS_AMALGAMATION) namespace Json { // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // class Value::CommentInfo // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// Value::CommentInfo::CommentInfo() : comment_( 0 ) { } Value::CommentInfo::~CommentInfo() { if ( comment_ ) releaseStringValue( comment_ ); } void Value::CommentInfo::setComment( const char *text ) { if ( comment_ ) releaseStringValue( comment_ ); JSON_ASSERT( text != 0 ); JSON_ASSERT_MESSAGE( text[0]=='\0' || text[0]=='/', "Comments must start with /"); // It seems that /**/ style comments are acceptable as well. comment_ = duplicateStringValue( text ); } // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // class Value::CZString // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// # ifndef JSON_VALUE_USE_INTERNAL_MAP // Notes: index_ indicates if the string was allocated when // a string is stored. Value::CZString::CZString( ArrayIndex index ) : cstr_( 0 ) , index_( index ) { } Value::CZString::CZString( const char *cstr, DuplicationPolicy allocate ) : cstr_( allocate == duplicate ? duplicateStringValue(cstr) : cstr ) , index_( allocate ) { } Value::CZString::CZString( const CZString &other ) : cstr_( other.index_ != noDuplication && other.cstr_ != 0 ? duplicateStringValue( other.cstr_ ) : other.cstr_ ) , index_( other.cstr_ ? (other.index_ == noDuplication ? noDuplication : duplicate) : other.index_ ) { } Value::CZString::~CZString() { if ( cstr_ && index_ == duplicate ) releaseStringValue( const_cast( cstr_ ) ); } void Value::CZString::swap( CZString &other ) { std::swap( cstr_, other.cstr_ ); std::swap( index_, other.index_ ); } Value::CZString & Value::CZString::operator =( const CZString &other ) { CZString temp( other ); swap( temp ); return *this; } bool Value::CZString::operator<( const CZString &other ) const { if ( cstr_ ) return strcmp( cstr_, other.cstr_ ) < 0; return index_ < other.index_; } bool Value::CZString::operator==( const CZString &other ) const { if ( cstr_ ) return strcmp( cstr_, other.cstr_ ) == 0; return index_ == other.index_; } ArrayIndex Value::CZString::index() const { return index_; } const char * Value::CZString::c_str() const { return cstr_; } bool Value::CZString::isStaticString() const { return index_ == noDuplication; } #endif // ifndef JSON_VALUE_USE_INTERNAL_MAP // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // class Value::Value // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////// /*! \internal Default constructor initialization must be equivalent to: * memset( this, 0, sizeof(Value) ) * This optimization is used in ValueInternalMap fast allocator. */ Value::Value( ValueType type ) : type_( type ) , allocated_( 0 ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { switch ( type ) { case nullValue: break; case intValue: case uintValue: value_.int_ = 0; break; case realValue: value_.real_ = 0.0; break; case stringValue: value_.string_ = 0; break; #ifndef JSON_VALUE_USE_INTERNAL_MAP case arrayValue: case objectValue: value_.map_ = new ObjectValues(); break; #else case arrayValue: value_.array_ = arrayAllocator()->newArray(); break; case objectValue: value_.map_ = mapAllocator()->newMap(); break; #endif case booleanValue: value_.bool_ = false; break; default: JSON_ASSERT_UNREACHABLE; } } #if defined(JSON_HAS_INT64) Value::Value( UInt value ) : type_( uintValue ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { value_.uint_ = value; } Value::Value( Int value ) : type_( intValue ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { value_.int_ = value; } #endif // if defined(JSON_HAS_INT64) Value::Value( Int64 value ) : type_( intValue ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { value_.int_ = value; } Value::Value( UInt64 value ) : type_( uintValue ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { value_.uint_ = value; } Value::Value( double value ) : type_( realValue ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { value_.real_ = value; } Value::Value( const char *value ) : type_( stringValue ) , allocated_( true ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { value_.string_ = duplicateStringValue( value ); } Value::Value( const char *beginValue, const char *endValue ) : type_( stringValue ) , allocated_( true ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { value_.string_ = duplicateStringValue( beginValue, (unsigned int)(endValue - beginValue) ); } Value::Value( const std::string &value ) : type_( stringValue ) , allocated_( true ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { value_.string_ = duplicateStringValue( value.c_str(), (unsigned int)value.length() ); } Value::Value( const StaticString &value ) : type_( stringValue ) , allocated_( false ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { value_.string_ = const_cast( value.c_str() ); } # ifdef JSON_USE_CPPTL Value::Value( const CppTL::ConstString &value ) : type_( stringValue ) , allocated_( true ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { value_.string_ = duplicateStringValue( value, value.length() ); } # endif Value::Value( bool value ) : type_( booleanValue ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { value_.bool_ = value; } Value::Value( const Value &other ) : type_( other.type_ ) , comments_( 0 ) # ifdef JSON_VALUE_USE_INTERNAL_MAP , itemIsUsed_( 0 ) #endif { switch ( type_ ) { case nullValue: case intValue: case uintValue: case realValue: case booleanValue: value_ = other.value_; break; case stringValue: if ( other.value_.string_ ) { value_.string_ = duplicateStringValue( other.value_.string_ ); allocated_ = true; } else value_.string_ = 0; break; #ifndef JSON_VALUE_USE_INTERNAL_MAP case arrayValue: case objectValue: value_.map_ = new ObjectValues( *other.value_.map_ ); break; #else case arrayValue: value_.array_ = arrayAllocator()->newArrayCopy( *other.value_.array_ ); break; case objectValue: value_.map_ = mapAllocator()->newMapCopy( *other.value_.map_ ); break; #endif default: JSON_ASSERT_UNREACHABLE; } if ( other.comments_ ) { comments_ = new CommentInfo[numberOfCommentPlacement]; for ( int comment =0; comment < numberOfCommentPlacement; ++comment ) { const CommentInfo &otherComment = other.comments_[comment]; if ( otherComment.comment_ ) comments_[comment].setComment( otherComment.comment_ ); } } } Value::~Value() { switch ( type_ ) { case nullValue: case intValue: case uintValue: case realValue: case booleanValue: break; case stringValue: if ( allocated_ ) releaseStringValue( value_.string_ ); break; #ifndef JSON_VALUE_USE_INTERNAL_MAP case arrayValue: case objectValue: delete value_.map_; break; #else case arrayValue: arrayAllocator()->destructArray( value_.array_ ); break; case objectValue: mapAllocator()->destructMap( value_.map_ ); break; #endif default: JSON_ASSERT_UNREACHABLE; } if ( comments_ ) delete[] comments_; } Value & Value::operator=( const Value &other ) { Value temp( other ); swap( temp ); return *this; } void Value::swap( Value &other ) { ValueType temp = type_; type_ = other.type_; other.type_ = temp; std::swap( value_, other.value_ ); int temp2 = allocated_; allocated_ = other.allocated_; other.allocated_ = temp2; } ValueType Value::type() const { return type_; } int Value::compare( const Value &other ) const { if ( *this < other ) return -1; if ( *this > other ) return 1; return 0; } bool Value::operator <( const Value &other ) const { int typeDelta = type_ - other.type_; if ( typeDelta ) return typeDelta < 0 ? true : false; switch ( type_ ) { case nullValue: return false; case intValue: return value_.int_ < other.value_.int_; case uintValue: return value_.uint_ < other.value_.uint_; case realValue: return value_.real_ < other.value_.real_; case booleanValue: return value_.bool_ < other.value_.bool_; case stringValue: return ( value_.string_ == 0 && other.value_.string_ ) || ( other.value_.string_ && value_.string_ && strcmp( value_.string_, other.value_.string_ ) < 0 ); #ifndef JSON_VALUE_USE_INTERNAL_MAP case arrayValue: case objectValue: { int delta = int( value_.map_->size() - other.value_.map_->size() ); if ( delta ) return delta < 0; return (*value_.map_) < (*other.value_.map_); } #else case arrayValue: return value_.array_->compare( *(other.value_.array_) ) < 0; case objectValue: return value_.map_->compare( *(other.value_.map_) ) < 0; #endif default: JSON_ASSERT_UNREACHABLE; } return false; // unreachable } bool Value::operator <=( const Value &other ) const { return !(other < *this); } bool Value::operator >=( const Value &other ) const { return !(*this < other); } bool Value::operator >( const Value &other ) const { return other < *this; } bool Value::operator ==( const Value &other ) const { //if ( type_ != other.type_ ) // GCC 2.95.3 says: // attempt to take address of bit-field structure member `Json::Value::type_' // Beats me, but a temp solves the problem. int temp = other.type_; if ( type_ != temp ) return false; switch ( type_ ) { case nullValue: return true; case intValue: return value_.int_ == other.value_.int_; case uintValue: return value_.uint_ == other.value_.uint_; case realValue: return value_.real_ == other.value_.real_; case booleanValue: return value_.bool_ == other.value_.bool_; case stringValue: return ( value_.string_ == other.value_.string_ ) || ( other.value_.string_ && value_.string_ && strcmp( value_.string_, other.value_.string_ ) == 0 ); #ifndef JSON_VALUE_USE_INTERNAL_MAP case arrayValue: case objectValue: return value_.map_->size() == other.value_.map_->size() && (*value_.map_) == (*other.value_.map_); #else case arrayValue: return value_.array_->compare( *(other.value_.array_) ) == 0; case objectValue: return value_.map_->compare( *(other.value_.map_) ) == 0; #endif default: JSON_ASSERT_UNREACHABLE; } return false; // unreachable } bool Value::operator !=( const Value &other ) const { return !( *this == other ); } const char * Value::asCString() const { JSON_ASSERT( type_ == stringValue ); return value_.string_; } std::string Value::asString() const { switch ( type_ ) { case nullValue: return ""; case stringValue: return value_.string_ ? value_.string_ : ""; case booleanValue: return value_.bool_ ? "true" : "false"; case intValue: case uintValue: case realValue: case arrayValue: case objectValue: JSON_FAIL_MESSAGE( "Type is not convertible to string" ); default: JSON_ASSERT_UNREACHABLE; } return ""; // unreachable } # ifdef JSON_USE_CPPTL CppTL::ConstString Value::asConstString() const { return CppTL::ConstString( asString().c_str() ); } # endif Value::Int Value::asInt() const { switch ( type_ ) { case nullValue: return 0; case intValue: JSON_ASSERT_MESSAGE( value_.int_ >= minInt && value_.int_ <= maxInt, "unsigned integer out of signed int range" ); return Int(value_.int_); case uintValue: JSON_ASSERT_MESSAGE( value_.uint_ <= UInt(maxInt), "unsigned integer out of signed int range" ); return Int(value_.uint_); case realValue: JSON_ASSERT_MESSAGE( value_.real_ >= minInt && value_.real_ <= maxInt, "Real out of signed integer range" ); return Int( value_.real_ ); case booleanValue: return value_.bool_ ? 1 : 0; case stringValue: case arrayValue: case objectValue: JSON_FAIL_MESSAGE( "Type is not convertible to int" ); default: JSON_ASSERT_UNREACHABLE; } return 0; // unreachable; } Value::UInt Value::asUInt() const { switch ( type_ ) { case nullValue: return 0; case intValue: JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to unsigned integer" ); JSON_ASSERT_MESSAGE( value_.int_ <= maxUInt, "signed integer out of UInt range" ); return UInt(value_.int_); case uintValue: JSON_ASSERT_MESSAGE( value_.uint_ <= maxUInt, "unsigned integer out of UInt range" ); return UInt(value_.uint_); case realValue: JSON_ASSERT_MESSAGE( value_.real_ >= 0 && value_.real_ <= maxUInt, "Real out of unsigned integer range" ); return UInt( value_.real_ ); case booleanValue: return value_.bool_ ? 1 : 0; case stringValue: case arrayValue: case objectValue: JSON_FAIL_MESSAGE( "Type is not convertible to uint" ); default: JSON_ASSERT_UNREACHABLE; } return 0; // unreachable; } # if defined(JSON_HAS_INT64) Value::Int64 Value::asInt64() const { switch ( type_ ) { case nullValue: return 0; case intValue: return value_.int_; case uintValue: JSON_ASSERT_MESSAGE( value_.uint_ <= UInt64(maxInt64), "unsigned integer out of Int64 range" ); return value_.uint_; case realValue: JSON_ASSERT_MESSAGE( value_.real_ >= minInt64 && value_.real_ <= maxInt64, "Real out of Int64 range" ); return Int( value_.real_ ); case booleanValue: return value_.bool_ ? 1 : 0; case stringValue: case arrayValue: case objectValue: JSON_FAIL_MESSAGE( "Type is not convertible to Int64" ); default: JSON_ASSERT_UNREACHABLE; } return 0; // unreachable; } Value::UInt64 Value::asUInt64() const { switch ( type_ ) { case nullValue: return 0; case intValue: JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to UInt64" ); return value_.int_; case uintValue: return value_.uint_; case realValue: JSON_ASSERT_MESSAGE( value_.real_ >= 0 && value_.real_ <= maxUInt64, "Real out of UInt64 range" ); return UInt( value_.real_ ); case booleanValue: return value_.bool_ ? 1 : 0; case stringValue: case arrayValue: case objectValue: JSON_FAIL_MESSAGE( "Type is not convertible to UInt64" ); default: JSON_ASSERT_UNREACHABLE; } return 0; // unreachable; } # endif // if defined(JSON_HAS_INT64) LargestInt Value::asLargestInt() const { #if defined(JSON_NO_INT64) return asInt(); #else return asInt64(); #endif } LargestUInt Value::asLargestUInt() const { #if defined(JSON_NO_INT64) return asUInt(); #else return asUInt64(); #endif } double Value::asDouble() const { switch ( type_ ) { case nullValue: return 0.0; case intValue: return static_cast( value_.int_ ); case uintValue: #if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) return static_cast( value_.uint_ ); #else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) return static_cast( Int(value_.uint_/2) ) * 2 + Int(value_.uint_ & 1); #endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) case realValue: return value_.real_; case booleanValue: return value_.bool_ ? 1.0 : 0.0; case stringValue: case arrayValue: case objectValue: JSON_FAIL_MESSAGE( "Type is not convertible to double" ); default: JSON_ASSERT_UNREACHABLE; } return 0; // unreachable; } float Value::asFloat() const { switch ( type_ ) { case nullValue: return 0.0f; case intValue: return static_cast( value_.int_ ); case uintValue: #if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) return static_cast( value_.uint_ ); #else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) return static_cast( Int(value_.uint_/2) ) * 2 + Int(value_.uint_ & 1); #endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) case realValue: return static_cast( value_.real_ ); case booleanValue: return value_.bool_ ? 1.0f : 0.0f; case stringValue: case arrayValue: case objectValue: JSON_FAIL_MESSAGE( "Type is not convertible to float" ); default: JSON_ASSERT_UNREACHABLE; } return 0.0f; // unreachable; } bool Value::asBool() const { switch ( type_ ) { case nullValue: return false; case intValue: case uintValue: return value_.int_ != 0; case realValue: return value_.real_ != 0.0; case booleanValue: return value_.bool_; case stringValue: return value_.string_ && value_.string_[0] != 0; case arrayValue: case objectValue: return value_.map_->size() != 0; default: JSON_ASSERT_UNREACHABLE; } return false; // unreachable; } bool Value::isConvertibleTo( ValueType other ) const { switch ( type_ ) { case nullValue: return true; case intValue: return ( other == nullValue && value_.int_ == 0 ) || other == intValue || ( other == uintValue && value_.int_ >= 0 ) || other == realValue || other == stringValue || other == booleanValue; case uintValue: return ( other == nullValue && value_.uint_ == 0 ) || ( other == intValue && value_.uint_ <= (unsigned)maxInt ) || other == uintValue || other == realValue || other == stringValue || other == booleanValue; case realValue: return ( other == nullValue && value_.real_ == 0.0 ) || ( other == intValue && value_.real_ >= minInt && value_.real_ <= maxInt ) || ( other == uintValue && value_.real_ >= 0 && value_.real_ <= maxUInt ) || other == realValue || other == stringValue || other == booleanValue; case booleanValue: return ( other == nullValue && value_.bool_ == false ) || other == intValue || other == uintValue || other == realValue || other == stringValue || other == booleanValue; case stringValue: return other == stringValue || ( other == nullValue && (!value_.string_ || value_.string_[0] == 0) ); case arrayValue: return other == arrayValue || ( other == nullValue && value_.map_->size() == 0 ); case objectValue: return other == objectValue || ( other == nullValue && value_.map_->size() == 0 ); default: JSON_ASSERT_UNREACHABLE; } return false; // unreachable; } /// Number of values in array or object ArrayIndex Value::size() const { switch ( type_ ) { case nullValue: case intValue: case uintValue: case realValue: case booleanValue: case stringValue: return 0; #ifndef JSON_VALUE_USE_INTERNAL_MAP case arrayValue: // size of the array is highest index + 1 if ( !value_.map_->empty() ) { ObjectValues::const_iterator itLast = value_.map_->end(); --itLast; return (*itLast).first.index()+1; } return 0; case objectValue: return ArrayIndex( value_.map_->size() ); #else case arrayValue: return Int( value_.array_->size() ); case objectValue: return Int( value_.map_->size() ); #endif default: JSON_ASSERT_UNREACHABLE; } return 0; // unreachable; } bool Value::empty() const { if ( isNull() || isArray() || isObject() ) return size() == 0u; else return false; } bool Value::operator!() const { return isNull(); } void Value::clear() { JSON_ASSERT( type_ == nullValue || type_ == arrayValue || type_ == objectValue ); switch ( type_ ) { #ifndef JSON_VALUE_USE_INTERNAL_MAP case arrayValue: case objectValue: value_.map_->clear(); break; #else case arrayValue: value_.array_->clear(); break; case objectValue: value_.map_->clear(); break; #endif default: break; } } void Value::resize( ArrayIndex newSize ) { JSON_ASSERT( type_ == nullValue || type_ == arrayValue ); if ( type_ == nullValue ) *this = Value( arrayValue ); #ifndef JSON_VALUE_USE_INTERNAL_MAP ArrayIndex oldSize = size(); if ( newSize == 0 ) clear(); else if ( newSize > oldSize ) (*this)[ newSize - 1 ]; else { for ( ArrayIndex index = newSize; index < oldSize; ++index ) { value_.map_->erase( index ); } assert( size() == newSize ); } #else value_.array_->resize( newSize ); #endif } Value & Value::operator[]( ArrayIndex index ) { JSON_ASSERT( type_ == nullValue || type_ == arrayValue ); if ( type_ == nullValue ) *this = Value( arrayValue ); #ifndef JSON_VALUE_USE_INTERNAL_MAP CZString key( index ); ObjectValues::iterator it = value_.map_->lower_bound( key ); if ( it != value_.map_->end() && (*it).first == key ) return (*it).second; ObjectValues::value_type defaultValue( key, null ); it = value_.map_->insert( it, defaultValue ); return (*it).second; #else return value_.array_->resolveReference( index ); #endif } Value & Value::operator[]( int index ) { JSON_ASSERT( index >= 0 ); return (*this)[ ArrayIndex(index) ]; } const Value & Value::operator[]( ArrayIndex index ) const { JSON_ASSERT( type_ == nullValue || type_ == arrayValue ); if ( type_ == nullValue ) return null; #ifndef JSON_VALUE_USE_INTERNAL_MAP CZString key( index ); ObjectValues::const_iterator it = value_.map_->find( key ); if ( it == value_.map_->end() ) return null; return (*it).second; #else Value *value = value_.array_->find( index ); return value ? *value : null; #endif } const Value & Value::operator[]( int index ) const { JSON_ASSERT( index >= 0 ); return (*this)[ ArrayIndex(index) ]; } Value & Value::operator[]( const char *key ) { return resolveReference( key, false ); } Value & Value::resolveReference( const char *key, bool isStatic ) { JSON_ASSERT( type_ == nullValue || type_ == objectValue ); if ( type_ == nullValue ) *this = Value( objectValue ); #ifndef JSON_VALUE_USE_INTERNAL_MAP CZString actualKey( key, isStatic ? CZString::noDuplication : CZString::duplicateOnCopy ); ObjectValues::iterator it = value_.map_->lower_bound( actualKey ); if ( it != value_.map_->end() && (*it).first == actualKey ) return (*it).second; ObjectValues::value_type defaultValue( actualKey, null ); it = value_.map_->insert( it, defaultValue ); Value &value = (*it).second; return value; #else return value_.map_->resolveReference( key, isStatic ); #endif } Value Value::get( ArrayIndex index, const Value &defaultValue ) const { const Value *value = &((*this)[index]); return value == &null ? defaultValue : *value; } bool Value::isValidIndex( ArrayIndex index ) const { return index < size(); } const Value & Value::operator[]( const char *key ) const { JSON_ASSERT( type_ == nullValue || type_ == objectValue ); if ( type_ == nullValue ) return null; #ifndef JSON_VALUE_USE_INTERNAL_MAP CZString actualKey( key, CZString::noDuplication ); ObjectValues::const_iterator it = value_.map_->find( actualKey ); if ( it == value_.map_->end() ) return null; return (*it).second; #else const Value *value = value_.map_->find( key ); return value ? *value : null; #endif } Value & Value::operator[]( const std::string &key ) { return (*this)[ key.c_str() ]; } const Value & Value::operator[]( const std::string &key ) const { return (*this)[ key.c_str() ]; } Value & Value::operator[]( const StaticString &key ) { return resolveReference( key, true ); } # ifdef JSON_USE_CPPTL Value & Value::operator[]( const CppTL::ConstString &key ) { return (*this)[ key.c_str() ]; } const Value & Value::operator[]( const CppTL::ConstString &key ) const { return (*this)[ key.c_str() ]; } # endif Value & Value::append( const Value &value ) { return (*this)[size()] = value; } Value Value::get( const char *key, const Value &defaultValue ) const { const Value *value = &((*this)[key]); return value == &null ? defaultValue : *value; } Value Value::get( const std::string &key, const Value &defaultValue ) const { return get( key.c_str(), defaultValue ); } Value Value::removeMember( const char* key ) { JSON_ASSERT( type_ == nullValue || type_ == objectValue ); if ( type_ == nullValue ) return null; #ifndef JSON_VALUE_USE_INTERNAL_MAP CZString actualKey( key, CZString::noDuplication ); ObjectValues::iterator it = value_.map_->find( actualKey ); if ( it == value_.map_->end() ) return null; Value old(it->second); value_.map_->erase(it); return old; #else Value *value = value_.map_->find( key ); if (value){ Value old(*value); value_.map_.remove( key ); return old; } else { return null; } #endif } Value Value::removeMember( const std::string &key ) { return removeMember( key.c_str() ); } # ifdef JSON_USE_CPPTL Value Value::get( const CppTL::ConstString &key, const Value &defaultValue ) const { return get( key.c_str(), defaultValue ); } # endif bool Value::isMember( const char *key ) const { const Value *value = &((*this)[key]); return value != &null; } bool Value::isMember( const std::string &key ) const { return isMember( key.c_str() ); } # ifdef JSON_USE_CPPTL bool Value::isMember( const CppTL::ConstString &key ) const { return isMember( key.c_str() ); } #endif Value::Members Value::getMemberNames() const { JSON_ASSERT( type_ == nullValue || type_ == objectValue ); if ( type_ == nullValue ) return Value::Members(); Members members; members.reserve( value_.map_->size() ); #ifndef JSON_VALUE_USE_INTERNAL_MAP ObjectValues::const_iterator it = value_.map_->begin(); ObjectValues::const_iterator itEnd = value_.map_->end(); for ( ; it != itEnd; ++it ) members.push_back( std::string( (*it).first.c_str() ) ); #else ValueInternalMap::IteratorState it; ValueInternalMap::IteratorState itEnd; value_.map_->makeBeginIterator( it ); value_.map_->makeEndIterator( itEnd ); for ( ; !ValueInternalMap::equals( it, itEnd ); ValueInternalMap::increment(it) ) members.push_back( std::string( ValueInternalMap::key( it ) ) ); #endif return members; } // //# ifdef JSON_USE_CPPTL //EnumMemberNames //Value::enumMemberNames() const //{ // if ( type_ == objectValue ) // { // return CppTL::Enum::any( CppTL::Enum::transform( // CppTL::Enum::keys( *(value_.map_), CppTL::Type() ), // MemberNamesTransform() ) ); // } // return EnumMemberNames(); //} // // //EnumValues //Value::enumValues() const //{ // if ( type_ == objectValue || type_ == arrayValue ) // return CppTL::Enum::anyValues( *(value_.map_), // CppTL::Type() ); // return EnumValues(); //} // //# endif bool Value::isNull() const { return type_ == nullValue; } bool Value::isBool() const { return type_ == booleanValue; } bool Value::isInt() const { return type_ == intValue; } bool Value::isUInt() const { return type_ == uintValue; } bool Value::isIntegral() const { return type_ == intValue || type_ == uintValue || type_ == booleanValue; } bool Value::isDouble() const { return type_ == realValue; } bool Value::isNumeric() const { return isIntegral() || isDouble(); } bool Value::isString() const { return type_ == stringValue; } bool Value::isArray() const { return type_ == nullValue || type_ == arrayValue; } bool Value::isObject() const { return type_ == nullValue || type_ == objectValue; } void Value::setComment( const char *comment, CommentPlacement placement ) { if ( !comments_ ) comments_ = new CommentInfo[numberOfCommentPlacement]; comments_[placement].setComment( comment ); } void Value::setComment( const std::string &comment, CommentPlacement placement ) { setComment( comment.c_str(), placement ); } bool Value::hasComment( CommentPlacement placement ) const { return comments_ != 0 && comments_[placement].comment_ != 0; } std::string Value::getComment( CommentPlacement placement ) const { if ( hasComment(placement) ) return comments_[placement].comment_; return ""; } std::string Value::toStyledString() const { StyledWriter writer; return writer.write( *this ); } Value::const_iterator Value::begin() const { switch ( type_ ) { #ifdef JSON_VALUE_USE_INTERNAL_MAP case arrayValue: if ( value_.array_ ) { ValueInternalArray::IteratorState it; value_.array_->makeBeginIterator( it ); return const_iterator( it ); } break; case objectValue: if ( value_.map_ ) { ValueInternalMap::IteratorState it; value_.map_->makeBeginIterator( it ); return const_iterator( it ); } break; #else case arrayValue: case objectValue: if ( value_.map_ ) return const_iterator( value_.map_->begin() ); break; #endif default: break; } return const_iterator(); } Value::const_iterator Value::end() const { switch ( type_ ) { #ifdef JSON_VALUE_USE_INTERNAL_MAP case arrayValue: if ( value_.array_ ) { ValueInternalArray::IteratorState it; value_.array_->makeEndIterator( it ); return const_iterator( it ); } break; case objectValue: if ( value_.map_ ) { ValueInternalMap::IteratorState it; value_.map_->makeEndIterator( it ); return const_iterator( it ); } break; #else case arrayValue: case objectValue: if ( value_.map_ ) return const_iterator( value_.map_->end() ); break; #endif default: break; } return const_iterator(); } Value::iterator Value::begin() { switch ( type_ ) { #ifdef JSON_VALUE_USE_INTERNAL_MAP case arrayValue: if ( value_.array_ ) { ValueInternalArray::IteratorState it; value_.array_->makeBeginIterator( it ); return iterator( it ); } break; case objectValue: if ( value_.map_ ) { ValueInternalMap::IteratorState it; value_.map_->makeBeginIterator( it ); return iterator( it ); } break; #else case arrayValue: case objectValue: if ( value_.map_ ) return iterator( value_.map_->begin() ); break; #endif default: break; } return iterator(); } Value::iterator Value::end() { switch ( type_ ) { #ifdef JSON_VALUE_USE_INTERNAL_MAP case arrayValue: if ( value_.array_ ) { ValueInternalArray::IteratorState it; value_.array_->makeEndIterator( it ); return iterator( it ); } break; case objectValue: if ( value_.map_ ) { ValueInternalMap::IteratorState it; value_.map_->makeEndIterator( it ); return iterator( it ); } break; #else case arrayValue: case objectValue: if ( value_.map_ ) return iterator( value_.map_->end() ); break; #endif default: break; } return iterator(); } // class PathArgument // ////////////////////////////////////////////////////////////////// PathArgument::PathArgument() : kind_( kindNone ) { } PathArgument::PathArgument( ArrayIndex index ) : index_( index ) , kind_( kindIndex ) { } PathArgument::PathArgument( const char *key ) : key_( key ) , kind_( kindKey ) { } PathArgument::PathArgument( const std::string &key ) : key_( key.c_str() ) , kind_( kindKey ) { } // class Path // ////////////////////////////////////////////////////////////////// Path::Path( const std::string &path, const PathArgument &a1, const PathArgument &a2, const PathArgument &a3, const PathArgument &a4, const PathArgument &a5 ) { InArgs in; in.push_back( &a1 ); in.push_back( &a2 ); in.push_back( &a3 ); in.push_back( &a4 ); in.push_back( &a5 ); makePath( path, in ); } void Path::makePath( const std::string &path, const InArgs &in ) { const char *current = path.c_str(); const char *end = current + path.length(); InArgs::const_iterator itInArg = in.begin(); while ( current != end ) { if ( *current == '[' ) { ++current; if ( *current == '%' ) addPathInArg( path, in, itInArg, PathArgument::kindIndex ); else { ArrayIndex index = 0; for ( ; current != end && *current >= '0' && *current <= '9'; ++current ) index = index * 10 + ArrayIndex(*current - '0'); args_.push_back( index ); } if ( current == end || *current++ != ']' ) invalidPath( path, int(current - path.c_str()) ); } else if ( *current == '%' ) { addPathInArg( path, in, itInArg, PathArgument::kindKey ); ++current; } else if ( *current == '.' ) { ++current; } else { const char *beginName = current; while ( current != end && !strchr( "[.", *current ) ) ++current; args_.push_back( std::string( beginName, current ) ); } } } void Path::addPathInArg( const std::string &path, const InArgs &in, InArgs::const_iterator &itInArg, PathArgument::Kind kind ) { if ( itInArg == in.end() ) { // Error: missing argument %d } else if ( (*itInArg)->kind_ != kind ) { // Error: bad argument type } else { args_.push_back( **itInArg ); } } void Path::invalidPath( const std::string &path, int location ) { // Error: invalid path. } const Value & Path::resolve( const Value &root ) const { const Value *node = &root; for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it ) { const PathArgument &arg = *it; if ( arg.kind_ == PathArgument::kindIndex ) { if ( !node->isArray() || node->isValidIndex( arg.index_ ) ) { // Error: unable to resolve path (array value expected at position... } node = &((*node)[arg.index_]); } else if ( arg.kind_ == PathArgument::kindKey ) { if ( !node->isObject() ) { // Error: unable to resolve path (object value expected at position...) } node = &((*node)[arg.key_]); if ( node == &Value::null ) { // Error: unable to resolve path (object has no member named '' at position...) } } } return *node; } Value Path::resolve( const Value &root, const Value &defaultValue ) const { const Value *node = &root; for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it ) { const PathArgument &arg = *it; if ( arg.kind_ == PathArgument::kindIndex ) { if ( !node->isArray() || node->isValidIndex( arg.index_ ) ) return defaultValue; node = &((*node)[arg.index_]); } else if ( arg.kind_ == PathArgument::kindKey ) { if ( !node->isObject() ) return defaultValue; node = &((*node)[arg.key_]); if ( node == &Value::null ) return defaultValue; } } return *node; } Value & Path::make( Value &root ) const { Value *node = &root; for ( Args::const_iterator it = args_.begin(); it != args_.end(); ++it ) { const PathArgument &arg = *it; if ( arg.kind_ == PathArgument::kindIndex ) { if ( !node->isArray() ) { // Error: node is not an array at position ... } node = &((*node)[arg.index_]); } else if ( arg.kind_ == PathArgument::kindKey ) { if ( !node->isObject() ) { // Error: node is not an object at position... } node = &((*node)[arg.key_]); } } return *node; } } // namespace Json // ////////////////////////////////////////////////////////////////////// // End of content of file: src/lib_json/json_value.cpp // ////////////////////////////////////////////////////////////////////// // ////////////////////////////////////////////////////////////////////// // Beginning of content of file: src/lib_json/json_writer.cpp // ////////////////////////////////////////////////////////////////////// // Copyright 2007-2010 Baptiste Lepilleur // Distributed under MIT license, or public domain if desired and // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE #if !defined(JSON_IS_AMALGAMATION) # include # include "json_tool.h" #endif // if !defined(JSON_IS_AMALGAMATION) #include #include #include #include #include #include #include #include #if _MSC_VER >= 1400 // VC++ 8.0 #pragma warning( disable : 4996 ) // disable warning about strdup being deprecated. #endif namespace Json { static bool containsControlCharacter( const char* str ) { while ( *str ) { if ( isControlCharacter( *(str++) ) ) return true; } return false; } std::string valueToString( LargestInt value ) { UIntToStringBuffer buffer; char *current = buffer + sizeof(buffer); bool isNegative = value < 0; if ( isNegative ) value = -value; uintToString( LargestUInt(value), current ); if ( isNegative ) *--current = '-'; assert( current >= buffer ); return current; } std::string valueToString( LargestUInt value ) { UIntToStringBuffer buffer; char *current = buffer + sizeof(buffer); uintToString( value, current ); assert( current >= buffer ); return current; } #if defined(JSON_HAS_INT64) std::string valueToString( Int value ) { return valueToString( LargestInt(value) ); } std::string valueToString( UInt value ) { return valueToString( LargestUInt(value) ); } #endif // # if defined(JSON_HAS_INT64) std::string valueToString( double value ) { char buffer[32]; #if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with visual studio 2005 to avoid warning. sprintf_s(buffer, sizeof(buffer), "%#.16g", value); #else snprintf(buffer, sizeof(buffer), "%#.16g", value); #endif char* ch = buffer + strlen(buffer) - 1; if (*ch != '0') return buffer; // nothing to truncate, so save time while(ch > buffer && *ch == '0'){ --ch; } char* last_nonzero = ch; while(ch >= buffer){ switch(*ch){ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': --ch; continue; case '.': // Truncate zeroes to save bytes in output, but keep one. *(last_nonzero+2) = '\0'; return buffer; default: return buffer; } } return buffer; } std::string valueToString( bool value ) { return value ? "true" : "false"; } std::string valueToQuotedString( const char *value ) { // Not sure how to handle unicode... if (strpbrk(value, "\"\\\b\f\n\r\t") == NULL && !containsControlCharacter( value )) return std::string("\"") + value + "\""; // We have to walk value and escape any special characters. // Appending to std::string is not efficient, but this should be rare. // (Note: forward slashes are *not* rare, but I am not escaping them.) std::string::size_type maxsize = strlen(value)*2 + 3; // allescaped+quotes+NULL std::string result; result.reserve(maxsize); // to avoid lots of mallocs result += "\""; for (const char* c=value; *c != 0; ++c) { switch(*c) { case '\"': result += "\\\""; break; case '\\': result += "\\\\"; break; case '\b': result += "\\b"; break; case '\f': result += "\\f"; break; case '\n': result += "\\n"; break; case '\r': result += "\\r"; break; case '\t': result += "\\t"; break; //case '/': // Even though \/ is considered a legal escape in JSON, a bare // slash is also legal, so I see no reason to escape it. // (I hope I am not misunderstanding something. // blep notes: actually escaping \/ may be useful in javascript to avoid (*c); result += oss.str(); } else { result += *c; } break; } } result += "\""; return result; } // Class Writer // ////////////////////////////////////////////////////////////////// Writer::~Writer() { } // Class FastWriter // ////////////////////////////////////////////////////////////////// FastWriter::FastWriter() : yamlCompatiblityEnabled_( false ) { } void FastWriter::enableYAMLCompatibility() { yamlCompatiblityEnabled_ = true; } std::string FastWriter::write( const Value &root ) { document_ = ""; writeValue( root ); document_ += "\n"; return document_; } void FastWriter::writeValue( const Value &value ) { switch ( value.type() ) { case nullValue: document_ += "null"; break; case intValue: document_ += valueToString( value.asLargestInt() ); break; case uintValue: document_ += valueToString( value.asLargestUInt() ); break; case realValue: document_ += valueToString( value.asDouble() ); break; case stringValue: document_ += valueToQuotedString( value.asCString() ); break; case booleanValue: document_ += valueToString( value.asBool() ); break; case arrayValue: { document_ += "["; int size = value.size(); for ( int index =0; index < size; ++index ) { if ( index > 0 ) document_ += ","; writeValue( value[index] ); } document_ += "]"; } break; case objectValue: { Value::Members members( value.getMemberNames() ); document_ += "{"; for ( Value::Members::iterator it = members.begin(); it != members.end(); ++it ) { const std::string &name = *it; if ( it != members.begin() ) document_ += ","; document_ += valueToQuotedString( name.c_str() ); document_ += yamlCompatiblityEnabled_ ? ": " : ":"; writeValue( value[name] ); } document_ += "}"; } break; } } // Class StyledWriter // ////////////////////////////////////////////////////////////////// StyledWriter::StyledWriter() : rightMargin_( 74 ) , indentSize_( 3 ) { } std::string StyledWriter::write( const Value &root ) { document_ = ""; addChildValues_ = false; indentString_ = ""; writeCommentBeforeValue( root ); writeValue( root ); writeCommentAfterValueOnSameLine( root ); document_ += "\n"; return document_; } void StyledWriter::writeValue( const Value &value ) { switch ( value.type() ) { case nullValue: pushValue( "null" ); break; case intValue: pushValue( valueToString( value.asLargestInt() ) ); break; case uintValue: pushValue( valueToString( value.asLargestUInt() ) ); break; case realValue: pushValue( valueToString( value.asDouble() ) ); break; case stringValue: pushValue( valueToQuotedString( value.asCString() ) ); break; case booleanValue: pushValue( valueToString( value.asBool() ) ); break; case arrayValue: writeArrayValue( value); break; case objectValue: { Value::Members members( value.getMemberNames() ); if ( members.empty() ) pushValue( "{}" ); else { writeWithIndent( "{" ); indent(); Value::Members::iterator it = members.begin(); for (;;) { const std::string &name = *it; const Value &childValue = value[name]; writeCommentBeforeValue( childValue ); writeWithIndent( valueToQuotedString( name.c_str() ) ); document_ += " : "; writeValue( childValue ); if ( ++it == members.end() ) { writeCommentAfterValueOnSameLine( childValue ); break; } document_ += ","; writeCommentAfterValueOnSameLine( childValue ); } unindent(); writeWithIndent( "}" ); } } break; } } void StyledWriter::writeArrayValue( const Value &value ) { unsigned size = value.size(); if ( size == 0 ) pushValue( "[]" ); else { bool isArrayMultiLine = isMultineArray( value ); if ( isArrayMultiLine ) { writeWithIndent( "[" ); indent(); bool hasChildValue = !childValues_.empty(); unsigned index =0; for (;;) { const Value &childValue = value[index]; writeCommentBeforeValue( childValue ); if ( hasChildValue ) writeWithIndent( childValues_[index] ); else { writeIndent(); writeValue( childValue ); } if ( ++index == size ) { writeCommentAfterValueOnSameLine( childValue ); break; } document_ += ","; writeCommentAfterValueOnSameLine( childValue ); } unindent(); writeWithIndent( "]" ); } else // output on a single line { assert( childValues_.size() == size ); document_ += "[ "; for ( unsigned index =0; index < size; ++index ) { if ( index > 0 ) document_ += ", "; document_ += childValues_[index]; } document_ += " ]"; } } } bool StyledWriter::isMultineArray( const Value &value ) { int size = value.size(); bool isMultiLine = size*3 >= rightMargin_ ; childValues_.clear(); for ( int index =0; index < size && !isMultiLine; ++index ) { const Value &childValue = value[index]; isMultiLine = isMultiLine || ( (childValue.isArray() || childValue.isObject()) && childValue.size() > 0 ); } if ( !isMultiLine ) // check if line length > max line length { childValues_.reserve( size ); addChildValues_ = true; int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]' for ( int index =0; index < size && !isMultiLine; ++index ) { writeValue( value[index] ); lineLength += int( childValues_[index].length() ); isMultiLine = isMultiLine && hasCommentForValue( value[index] ); } addChildValues_ = false; isMultiLine = isMultiLine || lineLength >= rightMargin_; } return isMultiLine; } void StyledWriter::pushValue( const std::string &value ) { if ( addChildValues_ ) childValues_.push_back( value ); else document_ += value; } void StyledWriter::writeIndent() { if ( !document_.empty() ) { char last = document_[document_.length()-1]; if ( last == ' ' ) // already indented return; if ( last != '\n' ) // Comments may add new-line document_ += '\n'; } document_ += indentString_; } void StyledWriter::writeWithIndent( const std::string &value ) { writeIndent(); document_ += value; } void StyledWriter::indent() { indentString_ += std::string( indentSize_, ' ' ); } void StyledWriter::unindent() { assert( int(indentString_.size()) >= indentSize_ ); indentString_.resize( indentString_.size() - indentSize_ ); } void StyledWriter::writeCommentBeforeValue( const Value &root ) { if ( !root.hasComment( commentBefore ) ) return; document_ += normalizeEOL( root.getComment( commentBefore ) ); document_ += "\n"; } void StyledWriter::writeCommentAfterValueOnSameLine( const Value &root ) { if ( root.hasComment( commentAfterOnSameLine ) ) document_ += " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) ); if ( root.hasComment( commentAfter ) ) { document_ += "\n"; document_ += normalizeEOL( root.getComment( commentAfter ) ); document_ += "\n"; } } bool StyledWriter::hasCommentForValue( const Value &value ) { return value.hasComment( commentBefore ) || value.hasComment( commentAfterOnSameLine ) || value.hasComment( commentAfter ); } std::string StyledWriter::normalizeEOL( const std::string &text ) { std::string normalized; normalized.reserve( text.length() ); const char *begin = text.c_str(); const char *end = begin + text.length(); const char *current = begin; while ( current != end ) { char c = *current++; if ( c == '\r' ) // mac or dos EOL { if ( *current == '\n' ) // convert dos EOL ++current; normalized += '\n'; } else // handle unix EOL & other char normalized += c; } return normalized; } // Class StyledStreamWriter // ////////////////////////////////////////////////////////////////// StyledStreamWriter::StyledStreamWriter( std::string indentation ) : document_(NULL) , rightMargin_( 74 ) , indentation_( indentation ) { } void StyledStreamWriter::write( std::ostream &out, const Value &root ) { document_ = &out; addChildValues_ = false; indentString_ = ""; writeCommentBeforeValue( root ); writeValue( root ); writeCommentAfterValueOnSameLine( root ); *document_ << "\n"; document_ = NULL; // Forget the stream, for safety. } void StyledStreamWriter::writeValue( const Value &value ) { switch ( value.type() ) { case nullValue: pushValue( "null" ); break; case intValue: pushValue( valueToString( value.asLargestInt() ) ); break; case uintValue: pushValue( valueToString( value.asLargestUInt() ) ); break; case realValue: pushValue( valueToString( value.asDouble() ) ); break; case stringValue: pushValue( valueToQuotedString( value.asCString() ) ); break; case booleanValue: pushValue( valueToString( value.asBool() ) ); break; case arrayValue: writeArrayValue( value); break; case objectValue: { Value::Members members( value.getMemberNames() ); if ( members.empty() ) pushValue( "{}" ); else { writeWithIndent( "{" ); indent(); Value::Members::iterator it = members.begin(); for (;;) { const std::string &name = *it; const Value &childValue = value[name]; writeCommentBeforeValue( childValue ); writeWithIndent( valueToQuotedString( name.c_str() ) ); *document_ << " : "; writeValue( childValue ); if ( ++it == members.end() ) { writeCommentAfterValueOnSameLine( childValue ); break; } *document_ << ","; writeCommentAfterValueOnSameLine( childValue ); } unindent(); writeWithIndent( "}" ); } } break; } } void StyledStreamWriter::writeArrayValue( const Value &value ) { unsigned size = value.size(); if ( size == 0 ) pushValue( "[]" ); else { bool isArrayMultiLine = isMultineArray( value ); if ( isArrayMultiLine ) { writeWithIndent( "[" ); indent(); bool hasChildValue = !childValues_.empty(); unsigned index =0; for (;;) { const Value &childValue = value[index]; writeCommentBeforeValue( childValue ); if ( hasChildValue ) writeWithIndent( childValues_[index] ); else { writeIndent(); writeValue( childValue ); } if ( ++index == size ) { writeCommentAfterValueOnSameLine( childValue ); break; } *document_ << ","; writeCommentAfterValueOnSameLine( childValue ); } unindent(); writeWithIndent( "]" ); } else // output on a single line { assert( childValues_.size() == size ); *document_ << "[ "; for ( unsigned index =0; index < size; ++index ) { if ( index > 0 ) *document_ << ", "; *document_ << childValues_[index]; } *document_ << " ]"; } } } bool StyledStreamWriter::isMultineArray( const Value &value ) { int size = value.size(); bool isMultiLine = size*3 >= rightMargin_ ; childValues_.clear(); for ( int index =0; index < size && !isMultiLine; ++index ) { const Value &childValue = value[index]; isMultiLine = isMultiLine || ( (childValue.isArray() || childValue.isObject()) && childValue.size() > 0 ); } if ( !isMultiLine ) // check if line length > max line length { childValues_.reserve( size ); addChildValues_ = true; int lineLength = 4 + (size-1)*2; // '[ ' + ', '*n + ' ]' for ( int index =0; index < size && !isMultiLine; ++index ) { writeValue( value[index] ); lineLength += int( childValues_[index].length() ); isMultiLine = isMultiLine && hasCommentForValue( value[index] ); } addChildValues_ = false; isMultiLine = isMultiLine || lineLength >= rightMargin_; } return isMultiLine; } void StyledStreamWriter::pushValue( const std::string &value ) { if ( addChildValues_ ) childValues_.push_back( value ); else *document_ << value; } void StyledStreamWriter::writeIndent() { /* Some comments in this method would have been nice. ;-) if ( !document_.empty() ) { char last = document_[document_.length()-1]; if ( last == ' ' ) // already indented return; if ( last != '\n' ) // Comments may add new-line *document_ << '\n'; } */ *document_ << '\n' << indentString_; } void StyledStreamWriter::writeWithIndent( const std::string &value ) { writeIndent(); *document_ << value; } void StyledStreamWriter::indent() { indentString_ += indentation_; } void StyledStreamWriter::unindent() { assert( indentString_.size() >= indentation_.size() ); indentString_.resize( indentString_.size() - indentation_.size() ); } void StyledStreamWriter::writeCommentBeforeValue( const Value &root ) { if ( !root.hasComment( commentBefore ) ) return; *document_ << normalizeEOL( root.getComment( commentBefore ) ); *document_ << "\n"; } void StyledStreamWriter::writeCommentAfterValueOnSameLine( const Value &root ) { if ( root.hasComment( commentAfterOnSameLine ) ) *document_ << " " + normalizeEOL( root.getComment( commentAfterOnSameLine ) ); if ( root.hasComment( commentAfter ) ) { *document_ << "\n"; *document_ << normalizeEOL( root.getComment( commentAfter ) ); *document_ << "\n"; } } bool StyledStreamWriter::hasCommentForValue( const Value &value ) { return value.hasComment( commentBefore ) || value.hasComment( commentAfterOnSameLine ) || value.hasComment( commentAfter ); } std::string StyledStreamWriter::normalizeEOL( const std::string &text ) { std::string normalized; normalized.reserve( text.length() ); const char *begin = text.c_str(); const char *end = begin + text.length(); const char *current = begin; while ( current != end ) { char c = *current++; if ( c == '\r' ) // mac or dos EOL { if ( *current == '\n' ) // convert dos EOL ++current; normalized += '\n'; } else // handle unix EOL & other char normalized += c; } return normalized; } std::ostream& operator<<( std::ostream &sout, const Value &root ) { Json::StyledStreamWriter writer; writer.write(sout, root); return sout; } } // namespace Json // ////////////////////////////////////////////////////////////////////// // End of content of file: src/lib_json/json_writer.cpp // ////////////////////////////////////////////////////////////////////// passenger-4.0.37/ext/common/Utils/LargeFiles.cpp000644 000765 000024 00000001174 12233035540 022130 0ustar00honglistaff000000 000000 #ifndef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #endif #ifndef _LARGE_FILES #define _LARGE_FILES 1 #endif #ifndef _LARGEFILE_SOURCE #define _LARGEFILE_SOURCE #endif #ifndef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE #endif #include #include namespace Passenger { FILE * lfs_fopen(const char *filename, const char *mode) { return fopen(filename, mode); } FILE * lfs_fdopen(int filedes, const char *mode) { return fdopen(filedes, mode); } int lfs_mkstemp(char *templ) { #ifdef __linux__ return mkstemp64(templ); #else return mkstemp(templ); #endif } } // namespace Passenger passenger-4.0.37/ext/common/Utils/LargeFiles.h000644 000765 000024 00000003174 12233035540 021577 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_UTILS_LARGE_FILES_H_ #define _PASSENGER_UTILS_LARGE_FILES_H_ #include /* Allows access to Large File Support APIs, if the OS supports them. */ namespace Passenger { FILE *lfs_fopen(const char *filename, const char *mode); FILE *lfs_fdopen(int filedes, const char *mode); int lfs_mkstemp(char *templ); } // namespace Passenger #endif /* _PASSENGER_UTILS_LARGE_FILES_H_ */ passenger-4.0.37/ext/common/Utils/Lock.h000644 000765 000024 00000001166 12233035540 020451 0ustar00honglistaff000000 000000 #ifndef _PASSENGER_LOCK_H_ #define _PASSENGER_LOCK_H_ #include namespace Passenger { using namespace boost; /** Shortcut typedefs. */ typedef boost::lock_guard LockGuard; typedef boost::unique_lock ScopedLock; /** Nicer syntax for conditionally locking the mutex during construction. */ class DynamicScopedLock: public boost::unique_lock { public: DynamicScopedLock(boost::mutex &m, bool lockNow = true) : boost::unique_lock(m, boost::defer_lock) { if (lockNow) { lock(); } } }; } // namespace Passenger #endif /* _PASSENGER_LOCK_H_ */ passenger-4.0.37/ext/common/Utils/MD5.cpp000644 000765 000024 00000031455 12233035540 020505 0ustar00honglistaff000000 000000 /* Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch ghost@aladdin.com */ /* $Id: md5.c,v 1.6 2002/04/13 19:20:28 lpd Exp $ */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321, whose text is available at http://www.ietf.org/rfc/rfc1321.txt The code is derived from the text of the RFC, including the test suite (section A.5) but excluding the rest of Appendix A. It does not include any code or documentation that is identified in the RFC as being copyrighted. The original and principal author of md5.c is L. Peter Deutsch . Other authors are noted in the change history that follows (in reverse chronological order): 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order either statically or dynamically; added missing #include in library. 2002-03-11 lpd Corrected argument list for main(), and added int return type, in test program and T value program. 2002-02-21 lpd Added missing #include in test program. 2000-07-03 lpd Patched to eliminate warnings about "constant is unsigned in ANSI C, signed in traditional"; made test program self-checking. 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). 1999-05-03 lpd Original version. */ #include "MD5.h" #include "../../boost/detail/endian.hpp" /* File is C compatible. */ #ifdef __cplusplus #include #include "StrIntUtils.h" namespace Passenger { #endif #if defined(BOOST_BIG_ENDIAN) # define ARCH_IS_BIG_ENDIAN 1 #elif defined(BOOST_LITTLE_ENDIAN) # define ARCH_IS_BIG_ENDIAN 0 #endif #undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ #ifdef ARCH_IS_BIG_ENDIAN # define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1) #else # define BYTE_ORDER 0 #endif #define T_MASK ((md5_word_t)~0) #define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87) #define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9) #define T3 0x242070db #define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111) #define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050) #define T6 0x4787c62a #define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec) #define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe) #define T9 0x698098d8 #define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850) #define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e) #define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841) #define T13 0x6b901122 #define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c) #define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71) #define T16 0x49b40821 #define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d) #define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf) #define T19 0x265e5a51 #define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855) #define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2) #define T22 0x02441453 #define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e) #define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437) #define T25 0x21e1cde6 #define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829) #define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278) #define T28 0x455a14ed #define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa) #define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07) #define T31 0x676f02d9 #define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375) #define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd) #define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e) #define T35 0x6d9d6122 #define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3) #define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb) #define T38 0x4bdecfa9 #define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f) #define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f) #define T41 0x289b7ec6 #define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805) #define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a) #define T44 0x04881d05 #define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6) #define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a) #define T47 0x1fa27cf8 #define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a) #define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb) #define T50 0x432aff97 #define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58) #define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6) #define T53 0x655b59c3 #define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d) #define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82) #define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e) #define T57 0x6fa87e4f #define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f) #define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb) #define T60 0x4e0811a1 #define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d) #define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca) #define T63 0x2ad7d2bb #define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e) static void md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) { md5_word_t a = pms->abcd[0], b = pms->abcd[1], c = pms->abcd[2], d = pms->abcd[3]; md5_word_t t; #if BYTE_ORDER > 0 /* Define storage only for big-endian CPUs. */ md5_word_t X[16]; #else /* Define storage for little-endian or both types of CPUs. */ md5_word_t xbuf[16]; const md5_word_t *X; #endif { #if BYTE_ORDER == 0 /* * Determine dynamically whether this is a big-endian or * little-endian machine, since we can use a more efficient * algorithm on the latter. */ static const int w = 1; if (*((const md5_byte_t *)&w)) /* dynamic little-endian */ #endif #if BYTE_ORDER <= 0 /* little-endian */ { /* * On little-endian machines, we can process properly aligned * data without copying it. */ if (!((data - (const md5_byte_t *)0) & 3)) { /* data are properly aligned */ X = (const md5_word_t *)data; } else { /* not aligned */ memcpy(xbuf, data, 64); X = xbuf; } } #endif #if BYTE_ORDER == 0 else /* dynamic big-endian */ #endif #if BYTE_ORDER >= 0 /* big-endian */ { /* * On big-endian machines, we must arrange the bytes in the * right order. */ const md5_byte_t *xp = data; int i; # if BYTE_ORDER == 0 X = xbuf; /* (dynamic only) */ # else # define xbuf X /* (static only) */ # endif for (i = 0; i < 16; ++i, xp += 4) xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); } #endif } #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) /* Round 1. */ /* Let [abcd k s i] denote the operation a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ #define F(x, y, z) (((x) & (y)) | (~(x) & (z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + F(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 7, T1); SET(d, a, b, c, 1, 12, T2); SET(c, d, a, b, 2, 17, T3); SET(b, c, d, a, 3, 22, T4); SET(a, b, c, d, 4, 7, T5); SET(d, a, b, c, 5, 12, T6); SET(c, d, a, b, 6, 17, T7); SET(b, c, d, a, 7, 22, T8); SET(a, b, c, d, 8, 7, T9); SET(d, a, b, c, 9, 12, T10); SET(c, d, a, b, 10, 17, T11); SET(b, c, d, a, 11, 22, T12); SET(a, b, c, d, 12, 7, T13); SET(d, a, b, c, 13, 12, T14); SET(c, d, a, b, 14, 17, T15); SET(b, c, d, a, 15, 22, T16); #undef SET /* Round 2. */ /* Let [abcd k s i] denote the operation a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ #define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + G(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 1, 5, T17); SET(d, a, b, c, 6, 9, T18); SET(c, d, a, b, 11, 14, T19); SET(b, c, d, a, 0, 20, T20); SET(a, b, c, d, 5, 5, T21); SET(d, a, b, c, 10, 9, T22); SET(c, d, a, b, 15, 14, T23); SET(b, c, d, a, 4, 20, T24); SET(a, b, c, d, 9, 5, T25); SET(d, a, b, c, 14, 9, T26); SET(c, d, a, b, 3, 14, T27); SET(b, c, d, a, 8, 20, T28); SET(a, b, c, d, 13, 5, T29); SET(d, a, b, c, 2, 9, T30); SET(c, d, a, b, 7, 14, T31); SET(b, c, d, a, 12, 20, T32); #undef SET /* Round 3. */ /* Let [abcd k s t] denote the operation a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ #define H(x, y, z) ((x) ^ (y) ^ (z)) #define SET(a, b, c, d, k, s, Ti)\ t = a + H(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 5, 4, T33); SET(d, a, b, c, 8, 11, T34); SET(c, d, a, b, 11, 16, T35); SET(b, c, d, a, 14, 23, T36); SET(a, b, c, d, 1, 4, T37); SET(d, a, b, c, 4, 11, T38); SET(c, d, a, b, 7, 16, T39); SET(b, c, d, a, 10, 23, T40); SET(a, b, c, d, 13, 4, T41); SET(d, a, b, c, 0, 11, T42); SET(c, d, a, b, 3, 16, T43); SET(b, c, d, a, 6, 23, T44); SET(a, b, c, d, 9, 4, T45); SET(d, a, b, c, 12, 11, T46); SET(c, d, a, b, 15, 16, T47); SET(b, c, d, a, 2, 23, T48); #undef SET /* Round 4. */ /* Let [abcd k s t] denote the operation a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ #define I(x, y, z) ((y) ^ ((x) | ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + I(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 6, T49); SET(d, a, b, c, 7, 10, T50); SET(c, d, a, b, 14, 15, T51); SET(b, c, d, a, 5, 21, T52); SET(a, b, c, d, 12, 6, T53); SET(d, a, b, c, 3, 10, T54); SET(c, d, a, b, 10, 15, T55); SET(b, c, d, a, 1, 21, T56); SET(a, b, c, d, 8, 6, T57); SET(d, a, b, c, 15, 10, T58); SET(c, d, a, b, 6, 15, T59); SET(b, c, d, a, 13, 21, T60); SET(a, b, c, d, 4, 6, T61); SET(d, a, b, c, 11, 10, T62); SET(c, d, a, b, 2, 15, T63); SET(b, c, d, a, 9, 21, T64); #undef SET /* Then perform the following additions. (That is increment each of the four registers by the value it had before this block was started.) */ pms->abcd[0] += a; pms->abcd[1] += b; pms->abcd[2] += c; pms->abcd[3] += d; } void md5_init(md5_state_t *pms) { pms->count[0] = pms->count[1] = 0; pms->abcd[0] = 0x67452301; pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476; pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301; pms->abcd[3] = 0x10325476; } void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) { const md5_byte_t *p = data; int left = nbytes; int offset = (pms->count[0] >> 3) & 63; md5_word_t nbits = (md5_word_t)(nbytes << 3); if (nbytes <= 0) return; /* Update the message length. */ pms->count[1] += nbytes >> 29; pms->count[0] += nbits; if (pms->count[0] < nbits) pms->count[1]++; /* Process an initial partial block. */ if (offset) { int copy = (offset + nbytes > 64 ? 64 - offset : nbytes); memcpy(pms->buf + offset, p, copy); if (offset + copy < 64) return; p += copy; left -= copy; md5_process(pms, pms->buf); } /* Process full blocks. */ for (; left >= 64; p += 64, left -= 64) md5_process(pms, p); /* Process a final partial block. */ if (left) memcpy(pms->buf, p, left); } void md5_finish(md5_state_t *pms, md5_byte_t digest[16]) { static const md5_byte_t pad[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; md5_byte_t data[8]; int i; /* Save the length before padding. */ for (i = 0; i < 8; ++i) data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); /* Pad to 56 bytes mod 64. */ md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); /* Append the length. */ md5_append(pms, data, 8); for (i = 0; i < 16; ++i) digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); } #ifdef __cplusplus std::string md5_hex(const StaticString &input) { md5_state_t pms; md5_byte_t digest[16]; md5_init(&pms); md5_append(&pms, (const md5_byte_t *) input.data(), input.size()); md5_finish(&pms, digest); return toHex(StaticString((const char *) digest, 16)); } } // namespace Passenger #endif passenger-4.0.37/ext/common/Utils/MD5.h000644 000765 000024 00000007577 12233035540 020162 0ustar00honglistaff000000 000000 /* Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch ghost@aladdin.com */ /* $Id: md5.h,v 1.4 2002/04/13 19:20:28 lpd Exp $ */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321, whose text is available at http://www.ietf.org/rfc/rfc1321.txt The code is derived from the text of the RFC, including the test suite (section A.5) but excluding the rest of Appendix A. It does not include any code or documentation that is identified in the RFC as being copyrighted. The original and principal author of md5.h is L. Peter Deutsch . Other authors are noted in the change history that follows (in reverse chronological order): 2002-04-13 lpd Removed support for non-ANSI compilers; removed references to Ghostscript; clarified derivation from RFC 1321; now handles byte order either statically or dynamically. 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); added conditionalization for C++ compilation from Martin Purschke . 1999-05-03 lpd Original version. */ #ifndef _PASSENGER_MD5_H_ #define _PASSENGER_MD5_H_ #ifdef __cplusplus #include "../../boost/cstdint.hpp" #include #include namespace Passenger { #else #include #endif /* * This package supports both compile-time and run-time determination of CPU * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is * defined as non-zero, the code will be compiled to run only on big-endian * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to * run on either big- or little-endian CPUs, but will run slightly less * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined. */ #ifdef __cplusplus typedef boost::uint8_t md5_byte_t; /* 8-bit byte */ typedef boost::uint32_t md5_word_t; /* 32-bit word */ #else typedef uint8_t md5_byte_t; /* 8-bit byte */ typedef uint32_t md5_word_t; /* 32-bit word */ #endif /** Size of an MD5 checksum, in bytes. */ #define MD5_SIZE 16 /** Size of an MD5 checksum encoded in hex, in bytes. */ #define MD5_HEX_SIZE 32 /* Define the state of the MD5 Algorithm. */ typedef struct md5_state_s { md5_word_t count[2]; /* message length in bits, lsw first */ md5_word_t abcd[4]; /* digest buffer */ md5_byte_t buf[64]; /* accumulate block */ } md5_state_t; /* Initialize the algorithm. */ void md5_init(md5_state_t *pms); /* Append a string to the message. */ void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); /* Finish the message and return the digest. */ void md5_finish(md5_state_t *pms, md5_byte_t digest[MD5_SIZE]); #ifdef __cplusplus /* Convenience method for directly converting data into a hexadecimal MD5 string. */ std::string md5_hex(const StaticString &input); } // namespace Passenger #endif #endif /* _PASSENGER_MD5_H_ */ passenger-4.0.37/ext/common/Utils/MemoryBarrier.h000644 000765 000024 00000004315 12233035540 022337 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_MEMORY_BARRIER_H_ #define _PASSENGER_MEMORY_BARRIER_H_ // Memory barrier macros. Also act as compiler barriers. #if defined(__GNUC__) || defined(__INTEL_COMPILER) #if defined(__i386__) #if defined(HAS_SSE2) || (defined(HAS_LFENCE) && defined(HAS_SFENCE)) #define P_READ_BARRIER() \ do { __asm__ __volatile__ ("lfence" ::: "memory"); } while (false) #define P_WRITE_BARRIER() \ do { __asm__ __volatile__ ("sfence" ::: "memory"); } while (false) #else #define P_READ_BARRIER() \ do { __asm__ __volatile__ ("" ::: "memory"); } while (false) #define P_WRITE_BARRIER() \ do { __asm__ __volatile__ ("lock; addl $0,0(%%esp)" ::: "memory"); } while (false) #endif #elif defined(__x86_64__) #define P_READ_BARRIER() \ do { __asm__ __volatile__ ("lfence" ::: "memory"); } while (false) #define P_WRITE_BARRIER() \ do { __asm__ __volatile__ ("sfence" ::: "memory"); } while (false) #endif #endif #endif /* _PASSENGER_MEMORY_BARRIER_H_ */ passenger-4.0.37/ext/common/Utils/MemZeroGuard.h000644 000765 000024 00000005746 12233035540 022132 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_MEM_ZERO_GUARD_H_ #define _PASSENGER_MEM_ZERO_GUARD_H_ #include namespace Passenger { using namespace std; /** * Fills the given memory space or string with zeroes when a MemoryZeroGuard object * is destroyed. Useful for ensuring that buffers containing password data or * other sensitive information is cleared when it goes out of scope. */ class MemZeroGuard { private: void *data; unsigned int size; string *str; static void securelyZeroMemory(volatile void *data, unsigned int size) { /* We do not use memset() here because the compiler may * optimize out memset() calls. Instead, the following * code is guaranteed to zero the memory. * http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/protect-secrets.html */ volatile char *p = (volatile char *) data; while (size--) { *p++ = 0; } } public: /** * Creates a new MemZeroGuard object with a memory region to zero. * * @param data The data to zero after destruction. * @param size The size of the data. * @pre data != NULL */ MemZeroGuard(void *data, unsigned int size) { this->data = data; this->size = size; this->str = NULL; } /** * Creates a new MemoryZeroGuard object with a string to zero. * * @param str The string to zero after destruction. */ MemZeroGuard(string &str) { this->data = NULL; this->size = 0; this->str = &str; } /** * Zero the data immediately. The data will still be zeroed after * destruction of this object. */ void zeroNow() { if (str == NULL) { securelyZeroMemory(data, size); } else { securelyZeroMemory((volatile void *) str->c_str(), str->size()); } } ~MemZeroGuard() { zeroNow(); } }; } // namespace Passenger #endif /* _PASSENGER_MEM_ZERO_GUARD_H_ */ passenger-4.0.37/ext/common/Utils/MessageIO.h000644 000765 000024 00000060552 12233035540 021401 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_MESSAGE_IO_H_ #define _PASSENGER_MESSAGE_IO_H_ /** * This file contains functions for reading and writing structured messages over * I/O channels. Supported message types are as follows. * * == 16-bit and 32-bit integers * Their raw formats are binary, in big endian. * * == Array of strings (array messages) * Each string may contain arbitrary data except for the NUL byte. * Its raw format consists of a 16-bit big endian size header * and a body containing all the strings in the array, each terminated * by a NUL byte. The size header specifies the raw size of the body. * * == Arbitary binary strings (scalar messages) * Its raw format consists of a 32-bit big endian size header * followed by the raw string data. * * == File descriptor passing and negotiation * Unix socket file descriptor passing is not safe without some kind * of negotiation protocol. If one side passes a file descriptor, and * the other side accidentally read()s past the normal data then it * will read away the passed file descriptor too without actually * receiving it. * * For example suppose that side A looks like this: * * read(fd, buf, 1024) * read_io(fd) * * and side B: * * write(fd, buf, 100) * send_io(fd_to_pass) * * If B completes both write() and send_io(), then A's read() call * reads past the 100 bytes that B sent. On some platforms, like * Linux, this will cause read_io() to fail. And it just so happens * that Ruby's IO#read method slurps more than just the given amount * of bytes. * * In order to solve this problem, we wrap the actual file descriptor * passing/reading code into a negotiation protocol to ensure that * this situation can never happen. */ // For ntohl/htonl/ntohs/htons. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; /** * Reads a 16-bit unsigned integer from the given file descriptor. The result * is put into 'output'. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on reading the necessary data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on reading will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @return True if reading was successful, false if end-of-file was prematurely reached. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to read the necessary data within * timeout microseconds. * @throws boost::thread_interrupted */ inline bool readUint16(int fd, uint16_t &output, unsigned long long *timeout = NULL) { uint16_t temp; if (readExact(fd, &temp, sizeof(uint16_t), timeout) == sizeof(uint16_t)) { output = ntohs(temp); return true; } else { return false; } } /** * Reads a 16-bit unsigned integer from the given file descriptor. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on reading the necessary data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on reading will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @throws EOFException End-of-file was reached before a full integer could be read. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to read the necessary data within * timeout microseconds. * @throws boost::thread_interrupted */ inline uint16_t readUint16(int fd, unsigned long long *timeout = NULL) { uint16_t temp; if (readUint16(fd, temp, timeout)) { return temp; } else { throw EOFException("EOF encountered before a full 16-bit integer could be read"); } } /** * Reads a 32-bit unsigned integer from the given file descriptor. The result * is put into 'output'. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on reading the necessary data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on reading will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @return True if reading was successful, false if end-of-file was prematurely reached. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to read the necessary data within * timeout microseconds. * @throws boost::thread_interrupted */ inline bool readUint32(int fd, uint32_t &output, unsigned long long *timeout = NULL) { uint32_t temp; if (readExact(fd, &temp, sizeof(uint32_t), timeout) == sizeof(uint32_t)) { output = ntohl(temp); return true; } else { return false; } } /** * Reads a 32-bit unsigned integer from the given file descriptor. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on reading the necessary data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on reading will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @throws EOFException End-of-file was reached before a full integer could be read. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to read the necessary data within * timeout microseconds. * @throws boost::thread_interrupted */ inline uint32_t readUint32(int fd, unsigned long long *timeout = NULL) { uint32_t temp; if (readUint32(fd, temp, timeout)) { return temp; } else { throw EOFException("EOF encountered before a full 32-bit integer could be read"); } } /** * Reads an array message from the given file descriptor. This version * puts the result into the given collection instead of returning a * new collection. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on reading the necessary data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on reading will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @return True if an array message was read, false if end-of-file was reached * before a full array message could be read. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to read the necessary data within * timeout microseconds. * @throws boost::thread_interrupted */ template inline bool readArrayMessage(int fd, Collection &output, unsigned long long *timeout = NULL) { uint16_t size; if (!readUint16(fd, size, timeout)) { return false; } scoped_array buffer(new char[size]); MemZeroGuard g(buffer.get(), size); if (readExact(fd, buffer.get(), size, timeout) != size) { return false; } output.clear(); if (size != 0) { string::size_type start = 0, pos; StaticString buffer_str(buffer.get(), size); while ((pos = buffer_str.find('\0', start)) != string::npos) { output.push_back(buffer_str.substr(start, pos - start)); start = pos + 1; } } return true; } /** * Reads an array message from the given file descriptor. This version returns * the result immediately as a string vector. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on reading the necessary data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on reading will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @throws EOFException End-of-file was reached before a full integer could be read. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to read the necessary data within * timeout microseconds. * @throws boost::thread_interrupted */ inline vector readArrayMessage(int fd, unsigned long long *timeout = NULL) { vector output; if (readArrayMessage(fd, output, timeout)) { return output; } else { throw EOFException("EOF encountered before the full array message could be read"); } } /** * Reads a scalar message from the given file descriptor. * * @param maxSize The maximum number of bytes that may be read. If the * scalar to read is larger than this, then a SecurityException * will be thrown. Set to 0 for no size limit. * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on reading the necessary data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on reading will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @return True if a scalar message was read, false if EOF was encountered. * @throws SystemException Something went wrong. * @throws SecurityException The message body is larger than allowed by maxSize. * @throws TimeoutException Unable to read the necessary data within * timeout microseconds. * @throws boost::thread_interrupted */ inline bool readScalarMessage(int fd, string &output, unsigned int maxSize = 0, unsigned long long *timeout = NULL) { uint32_t size; if (!readUint32(fd, size, timeout)) { return false; } if (maxSize != 0 && size > (uint32_t) maxSize) { throw SecurityException("The scalar message body is larger than the size limit"); } unsigned int remaining = size; if (OXT_UNLIKELY(!output.empty())) { output.clear(); } output.reserve(size); if (OXT_LIKELY(remaining > 0)) { char buf[1024 * 32]; MemZeroGuard g(buf, sizeof(buf)); while (remaining > 0) { unsigned int blockSize = min((unsigned int) sizeof(buf), remaining); if (readExact(fd, buf, blockSize, timeout) != blockSize) { return false; } output.append(buf, blockSize); remaining -= blockSize; } } return true; } /** * Reads a scalar message from the given file descriptor. * * @param maxSize The maximum number of bytes that may be read. If the * scalar to read is larger than this, then a SecurityException * will be thrown. Set to 0 for no size limit. * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on reading the necessary data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on reading will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @throws EOFException End-of-file was reached before a full integer could be read. * @throws SystemException Something went wrong. * @throws SecurityException The message body is larger than allowed by maxSize. * @throws TimeoutException Unable to read the necessary data within * timeout microseconds. * @throws boost::thread_interrupted */ inline string readScalarMessage(int fd, unsigned int maxSize = 0, unsigned long long *timeout = NULL) { string output; if (readScalarMessage(fd, output, maxSize, timeout)) { return output; } else { throw EOFException("EOF encountered before a full scalar message could be read"); } } /** * Writes a 16-bit unsigned integer to the given file descriptor. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on writing the necessary data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on writing will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to write the necessary data within * timeout microseconds. * @throws boost::thread_interrupted */ inline void writeUint16(int fd, uint16_t value, unsigned long long *timeout = NULL) { uint16_t l = htons(value); writeExact(fd, &l, sizeof(uint16_t), timeout); } /** * Writes a 32-bit unsigned integer to the given file descriptor. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on writing the necessary data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on writing will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to write the necessary data within * timeout microseconds. * @throws boost::thread_interrupted */ inline void writeUint32(int fd, uint32_t value, unsigned long long *timeout = NULL) { uint32_t l = htonl(value); writeExact(fd, &l, sizeof(uint32_t), timeout); } /** * Writes an array message to the given file descriptor. * * @param args A collection of strings containing the array message's elements. * The collection must have an STL container-like interface and * the strings must have an STL string-like interface. * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on writing the necessary data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on writing will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to write the necessary data within * timeout microseconds. * @throws boost::thread_interrupted */ template inline void writeArrayMessageEx(int fd, const Collection &args, unsigned long long *timeout = NULL) { typename Collection::const_iterator it, end = args.end(); uint16_t bodySize = 0; for (it = args.begin(); it != end; it++) { bodySize += it->size() + 1; } scoped_array data(new char[sizeof(uint16_t) + bodySize]); uint16_t header = htons(bodySize); memcpy(data.get(), &header, sizeof(uint16_t)); char *dataEnd = data.get() + sizeof(uint16_t); for (it = args.begin(); it != end; it++) { memcpy(dataEnd, it->data(), it->size()); dataEnd += it->size(); *dataEnd = '\0'; dataEnd++; } writeExact(fd, data.get(), sizeof(uint16_t) + bodySize, timeout); } inline void writeArrayMessage(int fd, const vector &args, unsigned long long *timeout = NULL) { writeArrayMessageEx(fd, args, timeout); } inline void writeArrayMessage(int fd, const vector &args, unsigned long long *timeout = NULL) { writeArrayMessageEx(fd, args, timeout); } inline void writeArrayMessage(int fd, const StaticString args[], unsigned int nargs, unsigned long long *timeout = NULL) { unsigned int i; uint16_t bodySize = 0; for (i = 0; i < nargs; i++) { bodySize += args[i].size() + 1; } scoped_array data(new char[sizeof(uint16_t) + bodySize]); uint16_t header = htons(bodySize); memcpy(data.get(), &header, sizeof(uint16_t)); char *dataEnd = data.get() + sizeof(uint16_t); for (i = 0; i < nargs; i++) { memcpy(dataEnd, args[i].data(), args[i].size()); dataEnd += args[i].size(); *dataEnd = '\0'; dataEnd++; } writeExact(fd, data.get(), sizeof(uint16_t) + bodySize, timeout); } inline void writeArrayMessage(int fd, const StaticString &name, va_list &ap, unsigned long long *timeout = NULL) { StaticString args[10]; unsigned int nargs = 1; bool done = false; args[0] = name; do { const char *arg = va_arg(ap, const char *); if (arg == NULL) { done = true; } else { args[nargs] = arg; nargs++; } } while (!done && nargs < sizeof(args) / sizeof(StaticString)); if (done) { writeArrayMessage(fd, args, nargs, timeout); } else { // Arguments don't fit in static array. Use dynamic // array instead. vector dyn_args; for (unsigned int i = 0; i < nargs; i++) { dyn_args.push_back(args[i]); } do { const char *arg = va_arg(ap, const char *); if (arg == NULL) { done = true; } else { dyn_args.push_back(arg); } } while (!done); writeArrayMessage(fd, dyn_args, timeout); } } struct _VaGuard { va_list ≈ _VaGuard(va_list &_ap) : ap(_ap) { } ~_VaGuard() { va_end(ap); } }; /** Version of writeArrayMessage() that accepts a variadic list of 'const char *' * arguments as message elements. The list must be terminated with a NULL. */ inline void writeArrayMessage(int fd, const StaticString &name, ...) { va_list ap; va_start(ap, name); _VaGuard guard(ap); writeArrayMessage(fd, name, ap); } inline void writeArrayMessage(int fd, const char *name) { abort(); } /** Version of writeArrayMessage() that accepts a variadic list of 'const char *' * arguments as message elements, with timeout support. The list must be terminated * with a NULL. */ inline void writeArrayMessage(int fd, unsigned long long *timeout, const StaticString &name, ...) { va_list ap; va_start(ap, name); _VaGuard guard(ap); writeArrayMessage(fd, name, ap, timeout); } /** * Writes a scalar message to the given file descriptor. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on writing the necessary data. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on writing will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to write the necessary data within * timeout microseconds. * @throws boost::thread_interrupted */ inline void writeScalarMessage(int fd, const StaticString &data, unsigned long long *timeout = NULL) { uint32_t header = htonl(data.size()); StaticString buffers[2] = { StaticString((const char *) &header, sizeof(uint32_t)), data }; gatheredWrite(fd, buffers, 2, timeout); } inline void writeScalarMessage(int fd, const char *data, size_t size, unsigned long long *timeout = NULL) { writeScalarMessage(fd, StaticString(data, size), timeout); } /** * Receive a file descriptor over the given Unix domain socket, * involving a negotiation protocol. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on receiving the file descriptor. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on receiving will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @return The received file descriptor. * @throws SystemException Something went wrong. * @throws IOException Whatever was received doesn't seem to be a * file descriptor. * @throws TimeoutException Unable to receive a file descriptor within * timeout microseconds. * @throws boost::thread_interrupted */ inline int readFileDescriptorWithNegotiation(int fd, unsigned long long *timeout = NULL) { writeArrayMessage(fd, timeout, "pass IO", NULL); int result = readFileDescriptor(fd, timeout); ScopeGuard guard(boost::bind(safelyClose, result, false)); writeArrayMessage(fd, timeout, "got IO", NULL); guard.clear(); return result; } /** * Pass the file descriptor 'fdToSend' over the Unix socket 'fd', * involving a negotiation protocol. * * @param timeout A pointer to an integer, which specifies the maximum number of * microseconds that may be spent on trying to pass the file descriptor. * If the timeout expired then TimeoutException will be thrown. * If this function returns without throwing an exception, then the * total number of microseconds spent on writing will be deducted * from timeout. * Pass NULL if you do not want to enforce a timeout. * @throws SystemException Something went wrong. * @throws TimeoutException Unable to pass the file descriptor within * timeout microseconds. * @throws boost::thread_interrupted */ inline void writeFileDescriptorWithNegotiation(int fd, int fdToPass, unsigned long long *timeout = NULL) { vector args; args = readArrayMessage(fd, timeout); if (args.size() != 1 || args[0] != "pass IO") { throw IOException("FD passing pre-negotiation message expected"); } writeFileDescriptor(fd, fdToPass, timeout); args = readArrayMessage(fd, timeout); if (args.size() != 1 || args[0] != "got IO") { throw IOException("FD passing post-negotiation message expected."); } } } // namespace Passenger #endif /* _PASSENGER_MESSAGE_IO_H_ */ passenger-4.0.37/ext/common/Utils/MessagePassing.h000644 000765 000024 00000017750 12233035540 022500 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_MESSAGE_PASSING_H_ #define _PASSENGER_MESSAGE_PASSING_H_ #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; /** * A simple in-process message passing library. Each message has a name, a bunch * of named arguments and an arbitrary object. Recipients can wait for a certain * message to arrive, possibly with a timeout. The receive function will return * as soon as the mailbox contains at least one message with the given name, * and removes that message from the mailbox, returning it. * * This library is designed for convenience and correctness, not speed. Messages * are allocated on the heap and are never copied: only their smart pointers are * passed around. This way you can pass arbitrary C++ objects. * * You must not modify Message objects after they've been sent. Likewise, * do not modify Message objects returned by peek(). */ class MessageBox; struct Message; typedef boost::shared_ptr MessageBoxPtr; typedef boost::shared_ptr MessagePtr; inline void _sendToMessageBox(const MessageBoxPtr &messageBox, const MessagePtr &message); struct Message { string name; VariantMap args; boost::weak_ptr from; void *data; void (*freeData)(void *p); Message() : data(0), freeData(0) { } Message(const string &_name) : name(_name), data(0), freeData(0) { } Message(const MessageBoxPtr &from, const string &_name) : name(_name), data(0), freeData(0) { setFrom(from); } ~Message() { if (data != NULL && freeData != NULL) { freeData(data); } } void setFrom(const MessageBoxPtr &messageBox) { from = boost::weak_ptr(messageBox); } void sendReply(const MessagePtr &message) { MessageBoxPtr messageBox = from.lock(); if (messageBox != NULL) { _sendToMessageBox(messageBox, message); } } void sendReply(const string &name) { sendReply(make_shared(name)); } }; class MessageBox: public boost::enable_shared_from_this { typedef list MessageList; typedef MessageList::iterator Iterator; typedef MessageList::const_iterator ConstIterator; mutable boost::mutex syncher; boost::condition_variable cond; MessageList messages; Iterator search(const string &name) { Iterator it, end = messages.end(); for (it = messages.begin(); it != end; it++) { const MessagePtr &message = *it; if (message->name == name) { return it; } } return end; } ConstIterator search(const string &name) const { ConstIterator it, end = messages.end(); for (it = messages.begin(); it != end; it++) { const MessagePtr &message = *it; if (message->name == name) { return it; } } return end; } template Iterator searchAny(const StringCollection &names) { Iterator it, end = messages.end(); for (it = messages.begin(); it != end; it++) { const MessagePtr &message = *it; typename StringCollection::const_iterator n_it, n_end = names.end(); for (n_it = names.begin(); n_it != n_end; n_it++) { if (message->name == *n_it) { return it; } } } return end; } bool checkTimeout(boost::unique_lock &l, unsigned long long *timeout, unsigned long long beginTime, posix_time::ptime deadline) { posix_time::time_duration diff = deadline - posix_time::microsec_clock::local_time(); bool timedOut; if (diff.is_negative() < 0) { timedOut = true; } else { timedOut = !cond.timed_wait(l, posix_time::milliseconds(diff.total_milliseconds())); } if (timedOut) { substractTimePassed(timeout, beginTime); } return timedOut; } void substractTimePassed(unsigned long long *timeout, unsigned long long beginTime) { unsigned long long now = SystemTime::getMsec(); unsigned long long diff; if (now > beginTime) { diff = now - beginTime; } else { diff = 0; } if (*timeout > diff) { *timeout -= diff; } else { *timeout = 0; } } public: void send(const MessagePtr &message) { boost::lock_guard l(syncher); message->setFrom(shared_from_this()); messages.push_back(message); cond.notify_all(); } void send(const string &name) { send(make_shared(name)); } const MessagePtr peek(const string &name) const { boost::unique_lock l(syncher); ConstIterator it = search(name); if (it == messages.end()) { return MessagePtr(); } else { return *it; } } MessagePtr recv(const string &name, unsigned long long *timeout = NULL) { boost::unique_lock l(syncher); posix_time::ptime deadline; unsigned long long beginTime = 0; // Shut up compiler warning. if (timeout != NULL) { beginTime = SystemTime::getUsec(); deadline = posix_time::microsec_clock::local_time() + posix_time::microsec(*timeout); } Iterator it; while ((it = search(name)) == messages.end()) { if (timeout != NULL) { if (checkTimeout(l, timeout, beginTime, deadline)) { return MessagePtr(); } } else { cond.wait(l); } } if (timeout != NULL) { substractTimePassed(timeout, beginTime); } MessagePtr result = *it; messages.erase(it); return result; } MessagePtr recvTE(const string &name, unsigned long long *timeout = NULL) { MessagePtr result = recv(name, timeout); if (result != NULL) { return result; } else { throw TimeoutException("Timeout receiving from message box"); } } template MessagePtr recvAny(const StringCollection &names, unsigned long long *timeout = NULL) { boost::unique_lock l(syncher); posix_time::ptime deadline; unsigned long long beginTime = 0; // Shut up compiler warning. if (timeout != NULL) { beginTime = SystemTime::getUsec(); deadline = posix_time::microsec_clock::local_time() + posix_time::microsec(*timeout); } Iterator it; while ((it = searchAny(names)) == messages.end()) { if (timeout != NULL) { if (checkTimeout(l, timeout, beginTime, deadline)) { return MessagePtr(); } } else { cond.wait(l); } } if (timeout != NULL) { substractTimePassed(timeout, beginTime); } MessagePtr result = *it; messages.erase(it); return result; } unsigned int size() const { boost::lock_guard l(syncher); return messages.size(); } }; inline void _sendToMessageBox(const MessageBoxPtr &messageBox, const MessagePtr &message) { messageBox->send(message); } } // namespace Passenger #endif /* _PASSENGER_MESSAGE_PASSING_H_ */ passenger-4.0.37/ext/common/Utils/PriorityQueue.h000644 000765 000024 00000001624 12233035540 022406 0ustar00honglistaff000000 000000 #ifndef _PASSENGER_PRIORITY_QUEUE_H_ #define _PASSENGER_PRIORITY_QUEUE_H_ #include "fib.h" namespace Passenger { template class PriorityQueue { private: struct fibheap heap; public: typedef struct fibheap_el * Handle; PriorityQueue() { fh_initheap(&heap); heap.fh_keys = 1; } ~PriorityQueue() { fh_destroyheap(&heap); } Handle push(T *item, int priority) { return fh_insertkey(&heap, priority, item); } T *pop() { return (T *) fh_extractmin(&heap); } T *top() const { return (T *) fh_min(const_cast(&heap)); } void decrease(Handle handle, int priority) { fh_replacekeydata(&heap, handle, priority, handle->fhe_data); } void erase(Handle handle) { fh_delete(&heap, handle); } void clear() { fh_destroyheap(&heap); fh_initheap(&heap); heap.fh_keys = 1; } }; } // namespace Passenger #endif /* _PASSENGER_PRIORITY_QUEUE_H_ */ passenger-4.0.37/ext/common/Utils/ProcessMetricsCollector.h000644 000765 000024 00000042152 12233035540 024375 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_PROCESS_METRICS_COLLECTOR_H_ #define _PASSENGER_PROCESS_METRICS_COLLECTOR_H_ #include #include #include #include #include #include #include #ifdef __APPLE__ #include #include #include #include #endif #if !defined(__NetBSD__) && !defined(__OpenBSD__) // NetBSD does not support -p with multiple PIDs. // https://code.google.com/p/phusion-passenger/issues/detail?id=736 // OpenBSD 5.2 doesn't support it either #define PS_SUPPORTS_MULTIPLE_PIDS #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace boost; using namespace std; using namespace oxt; /** All sizes are in KB. */ struct ProcessMetrics { pid_t pid; pid_t ppid; uint8_t cpu; /** Resident Set Size, amount of memory in RAM. Does not include swap. * -1 if not yet known, 0 if completely swapped out. */ ssize_t rss; /** Proportional Set Size, see measureRealMemory(). Does not include swap. * -1 if unknown, 0 if completely swapped out. */ ssize_t pss; /** Private dirty RSS, see measureRealMemory(). Does not include swap. * -1 if unknown, 0 if completely swapped out. */ ssize_t privateDirty; /** Amount of memory in swap. * -1 if unknown, 0 if no swap used. */ ssize_t swap; /** OS X Snow Leopard does not report the VM size correctly, so don't use this. */ size_t vmsize; pid_t processGroupId; uid_t uid; string command; ProcessMetrics() { pid = (pid_t) -1; rss = -1; pss = -1; privateDirty = -1; swap = -1; vmsize = -1; } bool isValid() const { return pid != (pid_t) -1; } /** * Returns an estimate of the "real" memory usage of a process in KB. * We don't use the PSS here because that would mean if another * process that shares memory quits, this process's memory usage * would suddenly go up. */ size_t realMemory() const { ssize_t swap; if (this->swap != -1) { swap = this->swap; } else { swap = 0; } if (privateDirty != -1) { return privateDirty + swap; } else if (rss != -1) { return rss + swap; } else { return 0; } } }; class ProcessMetricMap: public map { public: /** * Returns the total memory usage of all processes in KB, possibly * including shared memory. * If measurable, the return value only includes the processes' private * memory usage (swap is accounted for), and shared is set to the * amount of shared memory. * If not measurable, then the return value is an estimate of the total * memory usage of all processes (which may or may not include shared memory * as well), and shared is set to -1. */ size_t totalMemory(ssize_t &shared) const { const_iterator it, end = this->end(); bool pssAndPrivateDirtyAvailable = true; for (it = begin(); it != end && pssAndPrivateDirtyAvailable; it++) { const ProcessMetrics &metric = it->second; pssAndPrivateDirtyAvailable = pssAndPrivateDirtyAvailable && metric.pss != -1 && metric.privateDirty != -1; } if (pssAndPrivateDirtyAvailable) { size_t total = 0; size_t priv = 0; for (it = begin(); it != end; it++) { const ProcessMetrics &metric = it->second; total += metric.pss; priv += metric.privateDirty; } shared = total - priv; return total; } else { size_t total = 0; for (it = begin(); it != end; it++) { const ProcessMetrics &metric = it->second; total += metric.realMemory(); } shared = -1; return total; } } }; /** * Utility class for collection metrics on processes, such as CPU usage, memory usage, * command name, etc. */ class ProcessMetricsCollector { public: struct ParseException {}; private: bool canMeasureRealMemory; string psOutput; /** * Scan the given data for the first word that appears on the first line. * Leading whitespaces (but not newlines) are ignored. If a word is found * then the word is returned and the data pointer is moved to the end of * the word. Otherwise, a ParseException is thrown. * * @post result.size() > 0 */ static StaticString readNextWord(const char **data) { // Skip leading whitespaces. while (**data == ' ') { (*data)++; } if (**data == '\n' || **data == '\0') { throw ParseException(); } // Find end of word and extract the word. const char *endOfWord = *data; while (*endOfWord != ' ' && *endOfWord != '\n' && *endOfWord != '\0') { endOfWord++; } StaticString result(*data, endOfWord - *data); // Move data pointer to the end of this word. *data = endOfWord; return result; } static long long processNextWordAsLongLong(const StaticString &word, char *nullTerminatedWord) { memcpy(nullTerminatedWord, word.c_str(), word.size()); nullTerminatedWord[word.size()] = '\0'; if (*nullTerminatedWord == '\0') { throw ParseException(); } else { return atoll(nullTerminatedWord); } } static long long readNextWordAsLongLong(const char **data) { StaticString word = readNextWord(data); if (word.size() < 50) { char nullTerminatedWord[50]; return processNextWordAsLongLong(word, nullTerminatedWord); } else { string nullTerminatedWord(word.size() + 1, '\0'); return processNextWordAsLongLong(word, &nullTerminatedWord[0]); } } static int processNextWordAsInt(const StaticString &word, char *nullTerminatedWord) { memcpy(nullTerminatedWord, word.c_str(), word.size()); nullTerminatedWord[word.size()] = '\0'; if (*nullTerminatedWord == '\0') { throw ParseException(); } else { return atoi(nullTerminatedWord); } } static int readNextWordAsInt(const char **data) { StaticString word = readNextWord(data); if (word.size() < 50) { char nullTerminatedWord[50]; return processNextWordAsInt(word, nullTerminatedWord); } else { string nullTerminatedWord(word.size() + 1, '\0'); return processNextWordAsInt(word, &nullTerminatedWord[0]); } } string runCommandAndCaptureOutput(const char **command) const { pid_t pid; int e; Pipe p; p = createPipe(); this_thread::disable_syscall_interruption dsi; pid = syscalls::fork(); if (pid == 0) { // Make ps nicer, we want to have as little impact on the rest // of the system as possible while collecting the metrics. int prio = getpriority(PRIO_PROCESS, getpid()); prio++; if (prio > 20) { prio = 20; } setpriority(PRIO_PROCESS, getpid(), prio); dup2(p[1], 1); close(p[0]); close(p[1]); closeAllFileDescriptors(2); execvp(command[0], (char * const *) command); _exit(1); } else if (pid == -1) { e = errno; throw SystemException("Cannot fork() a new process", e); } else { bool done = false; string result; p[1].close(); while (!done) { char buf[1024 * 4]; ssize_t ret; try { this_thread::restore_syscall_interruption rsi(dsi); ret = syscalls::read(p[0], buf, sizeof(buf)); } catch (const thread_interrupted &) { syscalls::kill(SIGKILL, pid); syscalls::waitpid(pid, NULL, 0); throw; } if (ret == -1) { e = errno; syscalls::kill(SIGKILL, pid); syscalls::waitpid(pid, NULL, 0); throw SystemException("Cannot read output from the 'ps' command", e); } done = ret == 0; result.append(buf, ret); } p[0].close(); syscalls::waitpid(pid, NULL, 0); if (result.empty()) { throw RuntimeException("The 'ps' command failed"); } else { return result; } } } string readRestOfLine(const char *data) const { // Skip leading whitespaces. while (*data == ' ') { data++; } // Rest of line is allowed to be empty. if (*data == '\n' || *data == '\0') { return ""; } // Look for newline character. From there, scan back until we've // found a non-whitespace character. const char *endOfLine = strchr(data, '\n'); if (endOfLine == NULL) { throw ParseException(); } while (*(endOfLine - 1) == ' ') { endOfLine--; } return string(data, endOfLine - data); } template ProcessMetricMap parsePsOutput(const string &output, const Collection &allowedPids) const { ProcessMetricMap result; // Ignore first line, it contains the column names. const char *start = strchr(output.c_str(), '\n'); if (start != NULL) { // Skip to beginning of next line. start++; if (*start == '\0') { start = NULL; } } #ifndef PS_SUPPORTS_MULTIPLE_PIDS set pids; ConstIterator it, end = allowedPids.end(); for (it = allowedPids.begin(); it != allowedPids.end(); it++) { pids.insert(*it); } #endif // Parse each line. while (start != NULL) { ProcessMetrics metrics; metrics.pid = (pid_t) readNextWordAsLongLong(&start); metrics.ppid = (pid_t) readNextWordAsLongLong(&start); metrics.cpu = readNextWordAsInt(&start); metrics.rss = (size_t) readNextWordAsLongLong(&start); metrics.vmsize = (size_t) readNextWordAsLongLong(&start); metrics.processGroupId = (pid_t) readNextWordAsLongLong(&start); metrics.uid = (uid_t) readNextWordAsLongLong(&start); metrics.command = readRestOfLine(start); bool pidAllowed; #ifdef PS_SUPPORTS_MULTIPLE_PIDS pidAllowed = true; #else pidAllowed = pids.find(metrics.pid) != pids.end(); #endif if (pidAllowed) { result[metrics.pid] = metrics; start = strchr(start, '\n'); if (start != NULL) { // Skip to beginning of next line. start++; if (*start == '\0') { start = NULL; } } } } return result; } public: ProcessMetricsCollector() { #ifdef __APPLE__ canMeasureRealMemory = true; #else canMeasureRealMemory = fileExists("/proc/self/smaps"); #endif } /** Mock 'ps' output, used by unit tests. */ void setPsOutput(const string &data) { this->psOutput = data; } /** * Collect metrics for the given process IDs. Nonexistant PIDs are not * included in the result. * * Returns a map which maps a given PID to its collected metrics. * * @throws ProcessMetricsCollector::ParseException * @throws SystemException * @throws RuntimeException */ template ProcessMetricMap collect(const Collection &pids) const { if (pids.empty()) { return ProcessMetricMap(); } ConstIterator it; // The list of PIDs must follow -p without a space. // https://groups.google.com/forum/#!topic/phusion-passenger/WKXy61nJBMA string pidsArg = "-p"; for (it = pids.begin(); it != pids.end(); it++) { pidsArg.append(toString(*it)); pidsArg.append(","); } if (pidsArg[pidsArg.size() - 1] == ',') { pidsArg.resize(pidsArg.size() - 1); } const char *command[] = { "ps", "-o", #if defined(sun) || defined(__sun) "pid,ppid,pcpu,rss,vsz,pgid,uid,args", #else "pid,ppid,%cpu,rss,vsize,pgid,uid,command", #endif #ifdef PS_SUPPORTS_MULTIPLE_PIDS pidsArg.c_str(), #endif NULL }; string psOutput = this->psOutput; if (psOutput.empty()) { psOutput = runCommandAndCaptureOutput(command); } pidsArg.resize(0); ProcessMetricMap result = parsePsOutput(psOutput, pids); psOutput.resize(0); if (canMeasureRealMemory) { ProcessMetricMap::iterator it; for (it = result.begin(); it != result.end(); it++) { ProcessMetrics &metric = it->second; measureRealMemory(metric.pid, metric.pss, metric.privateDirty, metric.swap); } } return result; } ProcessMetricMap collect(const vector &pids) const { return collect< vector, vector::const_iterator >(pids); } /** * Attempt to measure various parts of a process's memory usage that may * contribute to insight as to what its "real" memory usage might be. * Collected information are: * - The proportional set size: total size of a process's pages that are in * memory, where the size of each page is divided by the number of processes * sharing it. * - The private dirty RSS. * - Amount of memory in swap. * * At this time only OS X and recent Linux versions (>= 2.6.25) support * measuring the proportional set size. Usually root privileges are required. * * pss, privateDirty and swap can each be individually set to -1 if that * part cannot be measured, e.g. because we do not have permission * to do so or because the OS does not support measuring it. */ static void measureRealMemory(pid_t pid, ssize_t &pss, ssize_t &privateDirty, ssize_t &swap) { #ifdef __APPLE__ kern_return_t ret; mach_port_t task; swap = -1; ret = task_for_pid(mach_task_self(), pid, &task); if (ret != KERN_SUCCESS) { pss = -1; privateDirty = -1; return; } mach_vm_address_t addr = 0; int pagesize = getpagesize(); // In bytes. pss = 0; privateDirty = 0; while (true) { mach_vm_address_t size; vm_region_top_info_data_t info; mach_msg_type_number_t count = VM_REGION_TOP_INFO_COUNT; mach_port_t object_name; ret = mach_vm_region(task, &addr, &size, VM_REGION_TOP_INFO, (vm_region_info_t) &info, &count, &object_name); if (ret != KERN_SUCCESS) { break; } if (info.share_mode == SM_PRIVATE) { // shared_pages_resident here means that region // has shared memory only "shared" between 1 process. pss += info.private_pages_resident * pagesize; pss += info.shared_pages_resident * pagesize; privateDirty += info.private_pages_resident * pagesize; } else if (info.share_mode == SM_COW) { pss += info.private_pages_resident * pagesize; pss += info.shared_pages_resident * pagesize / info.ref_count; privateDirty += info.private_pages_resident * pagesize; } else if (info.share_mode == SM_SHARED) { pss += info.shared_pages_resident * pagesize / info.ref_count; } addr += size; } mach_port_deallocate(mach_task_self(), task); // Convert result back to KB. pss /= 1024; privateDirty /= 1024; #else string smapsFilename = "/proc/"; smapsFilename.append(toString(pid)); smapsFilename.append("/smaps"); FILE *f = syscalls::fopen(smapsFilename.c_str(), "r"); if (f == NULL) { error: pss = -1; privateDirty = -1; swap = -1; return; } StdioGuard guard(f); bool hasPss = false; bool hasPrivateDirty = false; bool hasSwap = false; // In KB. pss = 0; privateDirty = 0; swap = 0; while (!feof(f)) { char line[1024 * 4]; const char *buf; buf = fgets(line, sizeof(line), f); if (buf == NULL) { if (ferror(f)) { goto error; } else { break; } } try { if (startsWith(line, "Pss:")) { /* Linux supports Proportional Set Size since kernel 2.6.25. * See kernel commit ec4dd3eb35759f9fbeb5c1abb01403b2fde64cc9. */ hasPss = true; readNextWord(&buf); pss += readNextWordAsLongLong(&buf); if (readNextWord(&buf) != "kB") { goto error; } } else if (startsWith(line, "Private_Dirty:")) { hasPrivateDirty = true; readNextWord(&buf); privateDirty += readNextWordAsLongLong(&buf); if (readNextWord(&buf) != "kB") { goto error; } } else if (startsWith(line, "Swap:")) { hasSwap = true; readNextWord(&buf); swap += readNextWordAsLongLong(&buf); if (readNextWord(&buf) != "kB") { goto error; } } } catch (const ParseException &) { goto error; } } if (!hasPss) { pss = -1; } if (!hasPrivateDirty) { privateDirty = -1; } if (!hasSwap) { swap = -1; } #endif } }; } // namespace Passenger #endif /* _PASSENGER_PROCESS_METRICS_COLLECTOR_H_ */ passenger-4.0.37/ext/common/Utils/ScopeGuard.h000644 000765 000024 00000006223 12233035540 021614 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010, 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_SCOPE_GUARD_H_ #define _PASSENGER_SCOPE_GUARD_H_ #include #include #include #include #include namespace Passenger { using namespace boost; using namespace oxt; #ifndef _PASSENGER_SAFELY_CLOSE_DEFINED_ #define _PASSENGER_SAFELY_CLOSE_DEFINED_ void safelyClose(int fd, bool ignoreErrors = false); #endif /** * Guard object for making sure that a certain function is going to be * called when the object goes out of scope. To avoid the function from * being called, call clear(). */ class ScopeGuard: public noncopyable { private: boost::function func; bool interruptable; public: ScopeGuard() { } ScopeGuard(const boost::function &func, bool interruptable = false) { this->func = func; this->interruptable = interruptable; } ~ScopeGuard() { if (func) { if (interruptable) { func(); } else { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; func(); } } } void clear() { func = boost::function(); } void runNow() { boost::function oldFunc = func; func = boost::function(); if (interruptable) { oldFunc(); } else { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; oldFunc(); } } }; class StdioGuard: public noncopyable { private: FILE *f; public: StdioGuard() : f(0) { } StdioGuard(FILE *_f) : f(_f) { } ~StdioGuard() { if (f != NULL) { fclose(f); } } }; class FdGuard: public noncopyable { private: int fd; bool ignoreErrors; public: FdGuard(int _fd, bool _ignoreErrors = false) : fd(_fd), ignoreErrors(_ignoreErrors) { } ~FdGuard() { if (fd != -1) { safelyClose(fd, ignoreErrors); } } void clear() { fd = -1; } }; } // namespace Passenger #endif /* _PASSENGER_SCOPE_GUARD_H_ */ passenger-4.0.37/ext/common/Utils/SmallVector.h000644 000765 000024 00000046444 12233035540 022024 0ustar00honglistaff000000 000000 //===- llvm/ADT/SmallVector.h - 'Normally small' vectors --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. // ============================================================================== // LLVM Release License // ============================================================================== // University of Illinois/NCSA // Open Source License // // Copyright (c) 2003-2009 University of Illinois at Urbana-Champaign. // All rights reserved. // // Developed by: // // LLVM Team // // University of Illinois at Urbana-Champaign // // http://llvm.org // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal with // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimers. // // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimers in the // documentation and/or other materials provided with the distribution. // // * Neither the names of the LLVM Team, University of Illinois at // Urbana-Champaign, nor the names of its contributors may be used to // endorse or promote products derived from this Software without specific // prior written permission. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE // SOFTWARE. // //===----------------------------------------------------------------------===// // // This file defines the SmallVector class. Slightly modified for use in // Phusion Passenger. // //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_SMALLVECTOR_H #define LLVM_ADT_SMALLVECTOR_H #include #include #include #include #include #include #ifdef _MSC_VER namespace std { #if _MSC_VER <= 1310 // Work around flawed VC++ implementation of std::uninitialized_copy. Define // additional overloads so that elements with pointer types are recognized as // scalars and not objects, causing bizarre type conversion errors. template inline _Scalar_ptr_iterator_tag _Ptr_cat(T1 **, T2 **) { _Scalar_ptr_iterator_tag _Cat; return _Cat; } template inline _Scalar_ptr_iterator_tag _Ptr_cat(T1* const *, T2 **) { _Scalar_ptr_iterator_tag _Cat; return _Cat; } #else // FIXME: It is not clear if the problem is fixed in VS 2005. What is clear // is that the above hack won't work if it wasn't fixed. #endif } #endif namespace Passenger { /// SmallVectorImpl - This class consists of common code factored out of the /// SmallVector class to reduce code duplication based on the SmallVector 'N' /// template parameter. template class SmallVectorImpl { protected: T *Begin, *End, *Capacity; // Allocate raw space for N elements of type T. If T has a ctor or dtor, we // don't want it to be automatically run, so we need to represent the space as // something else. An array of char would work great, but might not be // aligned sufficiently. Instead, we either use GCC extensions, or some // number of union instances for the space, which guarantee maximal alignment. protected: #ifdef __GNUC__ typedef char U; U FirstEl __attribute__((aligned)); #else union U { double D; long double LD; long long L; void *P; } FirstEl; #endif // Space after 'FirstEl' is clobbered, do not add any instance vars after it. public: // Default ctor - Initialize to empty. explicit SmallVectorImpl(unsigned N) : Begin(reinterpret_cast(&FirstEl)), End(reinterpret_cast(&FirstEl)), Capacity(reinterpret_cast(&FirstEl)+N) { } ~SmallVectorImpl() { // Destroy the constructed elements in the vector. destroy_range(Begin, End); // If this wasn't grown from the inline copy, deallocate the old space. if (!isSmall()) operator delete(Begin); } typedef size_t size_type; typedef ptrdiff_t difference_type; typedef T value_type; typedef T* iterator; typedef const T* const_iterator; typedef std::reverse_iterator const_reverse_iterator; typedef std::reverse_iterator reverse_iterator; typedef T& reference; typedef const T& const_reference; typedef T* pointer; typedef const T* const_pointer; bool empty() const { return Begin == End; } size_type size() const { return End-Begin; } size_type max_size() const { return size_type(-1) / sizeof(T); } // forward iterator creation methods. iterator begin() { return Begin; } const_iterator begin() const { return Begin; } iterator end() { return End; } const_iterator end() const { return End; } // reverse iterator creation methods. reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const{ return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin());} /* These asserts could be "Begin + idx < End", but there are lots of places in llvm where we use &v[v.size()] instead of v.end(). */ reference operator[](unsigned idx) { assert (Begin + idx <= End); return Begin[idx]; } const_reference operator[](unsigned idx) const { assert (Begin + idx <= End); return Begin[idx]; } reference front() { return begin()[0]; } const_reference front() const { return begin()[0]; } reference back() { return end()[-1]; } const_reference back() const { return end()[-1]; } void push_back(const_reference Elt) { if (End < Capacity) { Retry: new (End) T(Elt); ++End; return; } grow(); goto Retry; } void pop_back() { --End; End->~T(); } T pop_back_val() { T Result = back(); pop_back(); return Result; } void clear() { destroy_range(Begin, End); End = Begin; } void resize(unsigned N) { if (N < size()) { destroy_range(Begin+N, End); End = Begin+N; } else if (N > size()) { if (unsigned(Capacity-Begin) < N) grow(N); construct_range(End, Begin+N, T()); End = Begin+N; } } void resize(unsigned N, const T &NV) { if (N < size()) { destroy_range(Begin+N, End); End = Begin+N; } else if (N > size()) { if (unsigned(Capacity-Begin) < N) grow(N); construct_range(End, Begin+N, NV); End = Begin+N; } } void reserve(unsigned N) { if (unsigned(Capacity-Begin) < N) grow(N); } void swap(SmallVectorImpl &RHS); /// append - Add the specified range to the end of the SmallVector. /// template void append(in_iter in_start, in_iter in_end) { size_type NumInputs = std::distance(in_start, in_end); // Grow allocated space if needed. if (NumInputs > size_type(Capacity-End)) grow(size()+NumInputs); // Copy the new elements over. std::uninitialized_copy(in_start, in_end, End); End += NumInputs; } /// append - Add the specified range to the end of the SmallVector. /// void append(size_type NumInputs, const T &Elt) { // Grow allocated space if needed. if (NumInputs > size_type(Capacity-End)) grow(size()+NumInputs); // Copy the new elements over. std::uninitialized_fill_n(End, NumInputs, Elt); End += NumInputs; } void assign(unsigned NumElts, const T &Elt) { clear(); if (unsigned(Capacity-Begin) < NumElts) grow(NumElts); End = Begin+NumElts; construct_range(Begin, End, Elt); } iterator erase(iterator I) { iterator N = I; // Shift all elts down one. std::copy(I+1, End, I); // Drop the last elt. pop_back(); return(N); } iterator erase(iterator S, iterator E) { iterator N = S; // Shift all elts down. iterator I = std::copy(E, End, S); // Drop the last elts. destroy_range(I, End); End = I; return(N); } iterator insert(iterator I, const T &Elt) { if (I == End) { // Important special case for empty vector. push_back(Elt); return end()-1; } if (End < Capacity) { Retry: new (End) T(back()); ++End; // Push everything else over. std::copy_backward(I, End-1, End); *I = Elt; return I; } size_t EltNo = I-Begin; grow(); I = Begin+EltNo; goto Retry; } iterator insert(iterator I, size_type NumToInsert, const T &Elt) { if (I == End) { // Important special case for empty vector. append(NumToInsert, Elt); return end()-1; } // Convert iterator to elt# to avoid invalidating iterator when we reserve() size_t InsertElt = I-begin(); // Ensure there is enough space. reserve(static_cast(size() + NumToInsert)); // Uninvalidate the iterator. I = begin()+InsertElt; // If there are more elements between the insertion point and the end of the // range than there are being inserted, we can use a simple approach to // insertion. Since we already reserved space, we know that this won't // reallocate the vector. if (size_t(end()-I) >= NumToInsert) { T *OldEnd = End; append(End-NumToInsert, End); // Copy the existing elements that get replaced. std::copy_backward(I, OldEnd-NumToInsert, OldEnd); std::fill_n(I, NumToInsert, Elt); return I; } // Otherwise, we're inserting more elements than exist already, and we're // not inserting at the end. // Copy over the elements that we're about to overwrite. T *OldEnd = End; End += NumToInsert; size_t NumOverwritten = OldEnd-I; std::uninitialized_copy(I, OldEnd, End-NumOverwritten); // Replace the overwritten part. std::fill_n(I, NumOverwritten, Elt); // Insert the non-overwritten middle part. std::uninitialized_fill_n(OldEnd, NumToInsert-NumOverwritten, Elt); return I; } template iterator insert(iterator I, ItTy From, ItTy To) { if (I == End) { // Important special case for empty vector. append(From, To); return end()-1; } size_t NumToInsert = std::distance(From, To); // Convert iterator to elt# to avoid invalidating iterator when we reserve() size_t InsertElt = I-begin(); // Ensure there is enough space. reserve(static_cast(size() + NumToInsert)); // Uninvalidate the iterator. I = begin()+InsertElt; // If there are more elements between the insertion point and the end of the // range than there are being inserted, we can use a simple approach to // insertion. Since we already reserved space, we know that this won't // reallocate the vector. if (size_t(end()-I) >= NumToInsert) { T *OldEnd = End; append(End-NumToInsert, End); // Copy the existing elements that get replaced. std::copy_backward(I, OldEnd-NumToInsert, OldEnd); std::copy(From, To, I); return I; } // Otherwise, we're inserting more elements than exist already, and we're // not inserting at the end. // Copy over the elements that we're about to overwrite. T *OldEnd = End; End += NumToInsert; size_t NumOverwritten = OldEnd-I; std::uninitialized_copy(I, OldEnd, End-NumOverwritten); // Replace the overwritten part. std::copy(From, From+NumOverwritten, I); // Insert the non-overwritten middle part. std::uninitialized_copy(From+NumOverwritten, To, OldEnd); return I; } const SmallVectorImpl &operator=(const SmallVectorImpl &RHS); bool operator==(const SmallVectorImpl &RHS) const { if (size() != RHS.size()) return false; for (T *This = Begin, *That = RHS.Begin, *E = Begin+size(); This != E; ++This, ++That) if (*This != *That) return false; return true; } bool operator!=(const SmallVectorImpl &RHS) const { return !(*this == RHS); } bool operator<(const SmallVectorImpl &RHS) const { return std::lexicographical_compare(begin(), end(), RHS.begin(), RHS.end()); } private: /// isSmall - Return true if this is a smallvector which has not had dynamic /// memory allocated for it. bool isSmall() const { return static_cast(Begin) == static_cast(&FirstEl); } /// grow - double the size of the allocated memory, guaranteeing space for at /// least one more element or MinSize if specified. void grow(size_type MinSize = 0); void construct_range(T *S, T *E, const T &Elt) { for (; S != E; ++S) new (S) T(Elt); } void destroy_range(T *S, T *E) { while (S != E) { --E; E->~T(); } } }; // Define this out-of-line to dissuade the C++ compiler from inlining it. template void SmallVectorImpl::grow(size_t MinSize) { size_t CurCapacity = Capacity-Begin; size_t CurSize = size(); size_t NewCapacity = 2*CurCapacity; if (NewCapacity < MinSize) NewCapacity = MinSize; T *NewElts = static_cast(operator new(NewCapacity*sizeof(T))); // Copy the elements over. if (boost::is_class::value) std::uninitialized_copy(Begin, End, NewElts); else // Use memcpy for PODs (std::uninitialized_copy optimizes to memmove). memcpy(NewElts, Begin, CurSize * sizeof(T)); // Destroy the original elements. destroy_range(Begin, End); // If this wasn't grown from the inline copy, deallocate the old space. if (!isSmall()) operator delete(Begin); Begin = NewElts; End = NewElts+CurSize; Capacity = Begin+NewCapacity; } template void SmallVectorImpl::swap(SmallVectorImpl &RHS) { if (this == &RHS) return; // We can only avoid copying elements if neither vector is small. if (!isSmall() && !RHS.isSmall()) { std::swap(Begin, RHS.Begin); std::swap(End, RHS.End); std::swap(Capacity, RHS.Capacity); return; } if (RHS.size() > size_type(Capacity-Begin)) grow(RHS.size()); if (size() > size_type(RHS.Capacity-RHS.begin())) RHS.grow(size()); // Swap the shared elements. size_t NumShared = size(); if (NumShared > RHS.size()) NumShared = RHS.size(); for (unsigned i = 0; i != static_cast(NumShared); ++i) std::swap(Begin[i], RHS[i]); // Copy over the extra elts. if (size() > RHS.size()) { size_t EltDiff = size() - RHS.size(); std::uninitialized_copy(Begin+NumShared, End, RHS.End); RHS.End += EltDiff; destroy_range(Begin+NumShared, End); End = Begin+NumShared; } else if (RHS.size() > size()) { size_t EltDiff = RHS.size() - size(); std::uninitialized_copy(RHS.Begin+NumShared, RHS.End, End); End += EltDiff; destroy_range(RHS.Begin+NumShared, RHS.End); RHS.End = RHS.Begin+NumShared; } } template const SmallVectorImpl & SmallVectorImpl::operator=(const SmallVectorImpl &RHS) { // Avoid self-assignment. if (this == &RHS) return *this; // If we already have sufficient space, assign the common elements, then // destroy any excess. unsigned RHSSize = unsigned(RHS.size()); unsigned CurSize = unsigned(size()); if (CurSize >= RHSSize) { // Assign common elements. iterator NewEnd; if (RHSSize) NewEnd = std::copy(RHS.Begin, RHS.Begin+RHSSize, Begin); else NewEnd = Begin; // Destroy excess elements. destroy_range(NewEnd, End); // Trim. End = NewEnd; return *this; } // If we have to grow to have enough elements, destroy the current elements. // This allows us to avoid copying them during the grow. if (unsigned(Capacity-Begin) < RHSSize) { // Destroy current elements. destroy_range(Begin, End); End = Begin; CurSize = 0; grow(RHSSize); } else if (CurSize) { // Otherwise, use assignment for the already-constructed elements. std::copy(RHS.Begin, RHS.Begin+CurSize, Begin); } // Copy construct the new elements in place. std::uninitialized_copy(RHS.Begin+CurSize, RHS.End, Begin+CurSize); // Set end. End = Begin+RHSSize; return *this; } /// SmallVector - This is a 'vector' (really, a variable-sized array), optimized /// for the case when the array is small. It contains some number of elements /// in-place, which allows it to avoid heap allocation when the actual number of /// elements is below that threshold. This allows normal "small" cases to be /// fast without losing generality for large inputs. /// /// Note that this does not attempt to be exception safe. /// template class SmallVector : public SmallVectorImpl { /// InlineElts - These are 'N-1' elements that are stored inline in the body /// of the vector. The extra '1' element is stored in SmallVectorImpl. typedef typename SmallVectorImpl::U U; enum { // MinUs - The number of U's require to cover N T's. MinUs = (static_cast(sizeof(T))*N + static_cast(sizeof(U)) - 1) / static_cast(sizeof(U)), // NumInlineEltsElts - The number of elements actually in this array. There // is already one in the parent class, and we have to round up to avoid // having a zero-element array. NumInlineEltsElts = MinUs > 1 ? (MinUs - 1) : 1, // NumTsAvailable - The number of T's we actually have space for, which may // be more than N due to rounding. NumTsAvailable = (NumInlineEltsElts+1)*static_cast(sizeof(U))/ static_cast(sizeof(T)) }; U InlineElts[NumInlineEltsElts]; public: SmallVector() : SmallVectorImpl(NumTsAvailable) { } explicit SmallVector(unsigned Size, const T &Value = T()) : SmallVectorImpl(NumTsAvailable) { this->reserve(Size); while (Size--) this->push_back(Value); } template SmallVector(ItTy S, ItTy E) : SmallVectorImpl(NumTsAvailable) { this->append(S, E); } SmallVector(const SmallVector &RHS) : SmallVectorImpl(NumTsAvailable) { if (!RHS.empty()) SmallVectorImpl::operator=(RHS); } const SmallVector &operator=(const SmallVector &RHS) { SmallVectorImpl::operator=(RHS); return *this; } }; } // End Passenger namespace namespace std { /// Implement std::swap in terms of SmallVector swap. template inline void swap(Passenger::SmallVectorImpl &LHS, Passenger::SmallVectorImpl &RHS) { LHS.swap(RHS); } /// Implement std::swap in terms of SmallVector swap. template inline void swap(Passenger::SmallVector &LHS, Passenger::SmallVector &RHS) { LHS.swap(RHS); } } #endif passenger-4.0.37/ext/common/Utils/StreamBoyerMooreHorspool.h000644 000765 000024 00000043552 12233035540 024552 0ustar00honglistaff000000 000000 /* * Copyright (c) 2010 Phusion v.o.f. * https://github.com/FooBarWidget/boyer-moore-horspool * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _STREAM_BOYER_MOORE_HORSPOOL_ #define _STREAM_BOYER_MOORE_HORSPOOL_ /* * Boyer-Moore-Horspool string search algorithm implementation with streaming support. * Most string search algorithm implementations require the entire haystack data to * be in memory. In contrast, this implementation allows one to feed the haystack data * piece-of-piece in a "streaming" manner. * * This implementation is optimized for both speed and memory usage. * Other than the memory needed for the context structure, it does not perform any * additional memory allocations (except for minimal usage of the stack). The context * structure, which contains the Boyer-Moore-Horspool occurance table and various * state information, is is organized in such a way that it can be allocated with a * single memory allocation action, regardless of the length of the needle. * Its inner loop also deviates a little bit from the original algorithm: the original * algorithm matches data right-to-left, but this implementation first matches the * rightmost character, then matches the data left-to-right, thereby incorporating * some ideas from "Tuning the Boyer-Moore-Horspool String Searching Algorithm" by * Timo Raita, 1992. It uses memcmp() for this left-to-right match which is typically * heavily optimized. * * A few more notes: * - This code can be used for searching an arbitrary binary needle in an arbitrary binary * haystack. It is not limited to text. * - Boyer-Moore-Horspool works best for long needles. Generally speaking, the longer the * needle the faster the algorithm becomes. Thus, this implementation makes no effort * at being fast at searching single-character needles or even short needles (say, * less than 5 characters). You should just use memchr() and memmem() for that; those * functions are usually heavily optimized (e.g. by using tricks like searching 4 bytes * at the same time by treating data as an array of integers) and will probably be * *much* faster than this code at searching short needles. * - You can further tweak this code to favor either memory usage or performance. * See the typedef for sbmh_size_t for more information. * * * == Basic usage * * 1. Allocate a StreamBMH structure either on the stack (alloca) or on the heap. * It must be at least SBMH_SIZE(needle_len) bytes big. * The maximum supported needle size depends on the definition of sbmh_size_t. See * its typedef for more information. * * This structure contains haystack search state information and callback * information. The section 'Reuse' explains why this is important. * * 2. Allocate a StreamBMH_Occ structure somewhere. * This structure contains the Boyer-Moore-Horspool occurrance table. The section * 'Reuse' explains why this is important. * * 3. Initialize both structures with sbmh_init(). The structures are now usable for * searching the given needle, and only the given needle. * You must ensure that the StreamBMH structure has at least SBMH_SIZE(needle_len) * bytes of space, otherwise sbmh_init() will overwrite too much memory. * sbmh_init() does NOT make a copy of the needle data. * * 4. Feed haystack data using sbmh_feed(). You must pass it the same needle that you * passed to sbmh_init(), and the same StreamBMH and StreamBMH_Occ structures. * This library does not store a pointer to the needle passed to * sbmh_init() for memory efficiency reasons: the caller already has a pointer * to the needle data so there's no need for us to store it. * * sbmh_feed() returns the number of bytes that has been analyzed: * * - If the needle has now been found then the position of the last needle character * in the currently fed data will be returned: all data until the end of the needle * has been analyzed, but no more. Additionally, the 'found' field in the context * structure will be set to true. * - If the needle hasn't been found yet, then the size of the currently fed data * will be returned: all fed data has been analyzed. * - If the needle was already found, then any additional call to sbmh_feed() * will cause it to return 0: nothing in the fed data is analyzed. * * There's no need deinitialize the StreamBMH/StreamBMH_Occ structures. Just free their * memory. * * * == Convenience * * There's a convenience macro, SBMH_ALLOC_AND_INIT(), for combining steps 1 and 2. * It accepts a NULL-terminated needle and allocates the StreamBMH structure using * malloc(): * * struct StreamBMH *ctx; * SBMH_ALLOC_AND_INIT(ctx, "my needle"); * if (ctx == NULL) { * // error... * } * ... * free(ctx); * * * == Reusing: finding the same needle in a different haystack * * You can reuse the StreamBMH structure and the StreamBMH_Occ structure for * finding the same needle in a different haystack. * * StreamBMH contains the haystack search state. It must be reset every time * you want to search in a new haystack. Call sbmh_reset() to do so. * * The StreamBMH_Occ structure must not be changed because it only contains * needle-specific preparation data, not haystack-specific state. You can * just reuse the old StreamBMH_Occ structure. * * You can then call sbmh_feed() to analyze haystack data. * * * == Reusing: finding a different needle * * You can reuse an existing StreamBMH/StreamBMH_Occ structure for finding a * *different* needle as well. Call sbmh_init() to re-initialize both structures * for use with a different needle. * However you must make sure that the StreamBMH structure is at least * SBMH_SIZE(new_needle_len) bytes big. * * * == Multithreading * * Once initialized, it is safe to share a StreamBMH_Occ structure and the * needle among multiple threads as long as they don't modify either of these. * Each thread must however have its own StreamBMH structure. * * * == Recognition of non-needle data * * The 'callback' field in the StreamBMH structure can be used for recognizing non-needle * data. This is especially useful for things like multipart MIME parsers where you're * interested in all data except for the needle. * * This callback is initially set to NULL by sbmh_init(). sbmh_reset() does not set it. * When set, sbmh_feed() will call this callback with any data that is determined to not * contain the needle. StreamBMH also has a 'user_data' field. You can set it to any * value for your own use; this code do not use it at all. * * The data passed to the callback can be either part of the data in sbmh_feed()'s * 'data' argument, or it can be part of the StreamBMH lookbehind buffer. If the latter * is the case, then consider the data only valid within the callback: once the * callback has finished, this code can do arbitrary things to the lookbehind buffer, * so to preserve that data you must make your own copy. */ /* This implementation is based on sample code originally written by Joel * Yliluoma , licensed under MIT. */ // We assume that other compilers support the 'restrict' keyword. #ifdef __GNUC__ #ifndef G_GNUC_RESTRICT #if defined (__GNUC__) && (__GNUC__ >= 4) #define G_GNUC_RESTRICT __restrict__ #else #define G_GNUC_RESTRICT #endif #endif #ifndef restrict #define restrict G_GNUC_RESTRICT #endif #endif #ifndef likely #ifdef __GNUC__ #define likely(expr) __builtin_expect((expr), 1) #define unlikely(expr) __builtin_expect((expr), 0) #else #define likely(expr) expr #define unlikely(expr) expr #endif #endif #include #include #include #include namespace Passenger { struct StreamBMH; /* * sbmh_size_t is a type for representing the needle length. It should be unsigned; * it makes no sense for it not to be. * By default it's typedef'ed to 'unsigned short', which is a 16-bit integer on most * platforms, allowing us to support needles up to about 64 KB. This ough to be enough * for most people. In the odd situation that you're dealing with extremely large * needles, you can typedef this to 'unsigned int' or even 'unsigned long long'. * * Its typedef slightly affects performance. Benchmarks on OS X Snow Leopard (x86_64) * have shown that typedeffing this to size_t (64-bit integer) makes the benchmark * 4-8% faster at the cost of 4 times more memory usage per StreamBMH structure. * Consider changing the typedef depending on your needs. */ typedef unsigned char sbmh_size_t; typedef void (*sbmh_data_cb)(const struct StreamBMH *ctx, const unsigned char *data, size_t len); struct StreamBMH_Occ { sbmh_size_t occ[256]; }; struct StreamBMH { /***** Public but read-only fields *****/ bool found; /***** Public fields; feel free to populate *****/ sbmh_data_cb callback; void *user_data; /***** Internal fields, do not access. *****/ sbmh_size_t lookbehind_size; /* After this field comes a 'lookbehind' field whose size is determined * by the allocator (e.g. SBMH_ALLOC_AND_INIT). * Algorithm uses at most needle_len - 1 bytes of space in lookbehind buffer. */ }; #define SBMH_SIZE(needle_len) (sizeof(struct StreamBMH) + (needle_len) - 1) #define SBMH_ALLOC_AND_INIT(sbmh, needle) \ do { \ size_t needle_len = strlen((const char *) needle); \ sbmh = (struct StreamBMH *) malloc(SBMH_SIZE(needle_len)); \ sbmh_init(sbmh, (const unsigned char *) needle, needle_len); \ } while (false) #if 0 #include #include #define SBMH_DEBUG(format) printf(format) #define SBMH_DEBUG1(format, arg1) printf(format, arg1) #define SBMH_DEBUG2(format, arg1, arg2) printf(format, arg1, arg2) #else #define SBMH_DEBUG(format) do { /* nothing */ } while (false) #define SBMH_DEBUG1(format, arg1) do { /* nothing */ } while (false) #define SBMH_DEBUG2(format, arg1, arg2) do { /* nothing */ } while (false) #endif /* Accessor for the lookbehind field. */ #define _SBMH_LOOKBEHIND(ctx) ((unsigned char *) ctx + sizeof(struct StreamBMH)) inline void sbmh_reset(struct StreamBMH *restrict ctx) { ctx->found = false; ctx->lookbehind_size = 0; } inline void sbmh_init(struct StreamBMH *restrict ctx, struct StreamBMH_Occ *restrict occ, const unsigned char *restrict needle, sbmh_size_t needle_len) { sbmh_size_t i; unsigned int j; if (ctx != NULL) { sbmh_reset(ctx); ctx->callback = NULL; ctx->user_data = NULL; } if (occ != NULL) { assert(needle_len > 0); /* Initialize occurrance table. */ for (j = 0; j < 256; j++) { occ->occ[j] = needle_len; } /* Populate occurance table with analysis of the needle, * ignoring last letter. */ if (needle_len >= 1) { for (i = 0; i < needle_len - 1; i++) { occ->occ[needle[i]] = needle_len - 1 - i; } } } } inline char sbmh_lookup_char(const struct StreamBMH *restrict ctx, const unsigned char *restrict data, ssize_t pos) { if (pos < 0) { return _SBMH_LOOKBEHIND(ctx)[ctx->lookbehind_size + pos]; } else { return data[pos]; } } inline bool sbmh_memcmp(const struct StreamBMH *restrict ctx, const unsigned char *restrict needle, const unsigned char *restrict data, ssize_t pos, sbmh_size_t len) { ssize_t i = 0; while (i < ssize_t(len)) { unsigned char data_ch = sbmh_lookup_char(ctx, data, pos + i); unsigned char needle_ch = needle[i]; if (data_ch == needle_ch) { i++; } else { return false; } } return true; } inline size_t sbmh_feed(struct StreamBMH *restrict ctx, const struct StreamBMH_Occ *restrict occtable, const unsigned char *restrict needle, sbmh_size_t needle_len, const unsigned char *restrict data, size_t len) { SBMH_DEBUG1("\n[sbmh] feeding: (%s)\n", std::string((const char *) data, len).c_str()); if (ctx->found) { return 0; } /* Positive: points to a position in 'data' * pos == 3 points to data[3] * Negative: points to a position in the lookbehind buffer * pos == -2 points to lookbehind[lookbehind_size - 2] */ ssize_t pos = -ctx->lookbehind_size; unsigned char last_needle_char = needle[needle_len - 1]; const sbmh_size_t *occ = occtable->occ; unsigned char *lookbehind = _SBMH_LOOKBEHIND(ctx); if (pos < 0) { SBMH_DEBUG2("[sbmh] considering lookbehind: (%s)(%s)\n", std::string((const char *) lookbehind, ctx->lookbehind_size).c_str(), std::string((const char *) data, len).c_str()); /* Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool * search with character lookup code that considers both the * lookbehind buffer and the current round's haystack data. * * Loop until * there is a match. * or until * we've moved past the position that requires the * lookbehind buffer. In this case we switch to the * optimized loop. * or until * the character to look at lies outside the haystack. */ while (pos < 0 && pos <= ssize_t(len) - ssize_t(needle_len)) { unsigned char ch = sbmh_lookup_char(ctx, data, pos + needle_len - 1); if (ch == last_needle_char && sbmh_memcmp(ctx, needle, data, pos, needle_len - 1)) { ctx->found = true; ctx->lookbehind_size = 0; if (pos > -ctx->lookbehind_size && ctx->callback != NULL) { ctx->callback(ctx, lookbehind, ctx->lookbehind_size + pos); } SBMH_DEBUG1("[sbmh] found using lookbehind; end = %d\n", int(pos + needle_len)); return pos + needle_len; } else { pos += occ[ch]; } } // No match. if (pos < 0) { /* There's too few data for Boyer-Moore-Horspool to run, * so let's use a different algorithm to skip as much as * we can. * Forward pos until * the trailing part of lookbehind + data * looks like the beginning of the needle * or until * pos == 0 */ SBMH_DEBUG1("[sbmh] inconclusive; pos = %d\n", (int) pos); while (pos < 0 && !sbmh_memcmp(ctx, needle, data, pos, len - pos)) { pos++; } SBMH_DEBUG1("[sbmh] managed to skip to pos = %d\n", (int) pos); } if (pos >= 0) { /* Discard lookbehind buffer. */ SBMH_DEBUG("[sbmh] no match; discarding lookbehind\n"); if (ctx->callback != NULL) { ctx->callback(ctx, lookbehind, ctx->lookbehind_size); } ctx->lookbehind_size = 0; } else { /* Cut off part of the lookbehind buffer that has * been processed and append the entire haystack * into it. */ sbmh_size_t bytesToCutOff = sbmh_size_t(ssize_t(ctx->lookbehind_size) + pos); if (bytesToCutOff > 0 && ctx->callback != NULL) { // The cut off data is guaranteed not to contain the needle. ctx->callback(ctx, lookbehind, bytesToCutOff); } memmove(lookbehind, lookbehind + bytesToCutOff, ctx->lookbehind_size - bytesToCutOff); ctx->lookbehind_size -= bytesToCutOff; assert(ssize_t(ctx->lookbehind_size + len) < ssize_t(needle_len)); memcpy(lookbehind + ctx->lookbehind_size, data, len); ctx->lookbehind_size += len; SBMH_DEBUG1("[sbmh] update lookbehind -> (%s)\n", std::string((const char *) lookbehind, ctx->lookbehind_size).c_str()); return len; } } assert(pos >= 0); assert(ctx->lookbehind_size == 0); SBMH_DEBUG1("[sbmh] starting from pos = %d\n", (int) pos); /* Lookbehind buffer is now empty. Perform Boyer-Moore-Horspool * search with optimized character lookup code that only considers * the current round's haystack data. */ while (likely( pos <= ssize_t(len) - ssize_t(needle_len) )) { unsigned char ch = data[pos + needle_len - 1]; if (unlikely( unlikely( ch == last_needle_char ) && unlikely( *(data + pos) == needle[0] ) && unlikely( memcmp(needle, data + pos, needle_len - 1) == 0 ) )) { SBMH_DEBUG1("[sbmh] found at position %d\n", (int) pos); ctx->found = true; if (pos > 0 && ctx->callback != NULL) { ctx->callback(ctx, data, pos); } return pos + needle_len; } else { pos += occ[ch]; } } /* There was no match. If there's trailing haystack data that we cannot * match yet using the Boyer-Moore-Horspool algorithm (because the trailing * data is less than the needle size) then match using a modified * algorithm that starts matching from the beginning instead of the end. * Whatever trailing data is left after running this algorithm is added to * the lookbehind buffer. */ SBMH_DEBUG("[sbmh] no match\n"); if (size_t(pos) < len) { while (size_t(pos) < len && ( data[pos] != needle[0] || memcmp(data + pos, needle, len - pos) != 0 )) { pos++; } if (size_t(pos) < len) { memcpy(lookbehind, data + pos, len - pos); ctx->lookbehind_size = len - pos; SBMH_DEBUG2("[sbmh] adding %d trailing bytes to lookbehind -> (%s)\n", int(len - pos), std::string((const char *) lookbehind, ctx->lookbehind_size).c_str()); } } /* Everything until pos is guaranteed not to contain needle data. */ if (pos > 0 && ctx->callback != NULL) { ctx->callback(ctx, data, std::min(size_t(pos), len)); } return len; } } // namespace Passenger #endif /* _STREAM_BOYER_MOORE_HORSPOOL_ */ passenger-4.0.37/ext/common/Utils/StringMap.h000644 000765 000024 00000012624 12233035540 021466 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_STRING_MAP_H_ #define _PASSENGER_STRING_MAP_H_ #include #include #include #include #include namespace Passenger { using namespace std; /** * An efficient map with string keys. map forces one to construct an * std::string object when looking up the map. StringMap interns all keys and * allows lookups without constructing an std::string key. * * StringMap requires the following properties on T: * - T's default constructor must be cheap, otherwise set() can be a bit slow. * - T must support operator=(). */ template class StringMap { private: struct Entry { string key; pair thePair; }; typedef HashMap InternalMap; typedef typename InternalMap::iterator InternalIterator; typedef typename InternalMap::const_iterator InternalConstIterator; typedef typename InternalMap::value_type ValueType; InternalMap store; public: class const_iterator { private: InternalConstIterator it; public: const_iterator() { } const_iterator(const InternalConstIterator &_it) : it(_it) { } const_iterator &operator=(const const_iterator &value) { it = value.it; return *this; } const_iterator &operator++() { it++; return *this; } const_iterator operator++(int) { const_iterator copy(*this); operator++(); return copy; } bool operator==(const const_iterator &other) { return it == other.it; } bool operator!=(const const_iterator &other) { return it != other.it; } const pair &operator*() { return (pair &) it->second.thePair; } const pair *operator->() { return &(**this); } }; class iterator { private: InternalIterator it; public: iterator() { } iterator(const InternalIterator &_it) : it(_it) { } iterator &operator=(const iterator &value) { it = value.it; return *this; } iterator &operator++() { it++; return *this; } iterator operator++(int) { iterator copy(*this); operator++(); return copy; } bool operator==(const iterator &other) { return it == other.it; } bool operator!=(const iterator &other) { return it != other.it; } pair &operator*() { return it->second.thePair; } pair *operator->() { return &(**this); } operator const_iterator() const { return const_iterator(it); } }; T get(const StaticString &key) const { InternalConstIterator it = store.find(key); if (it == store.end()) { return T(); } else { return it->second.thePair.second; } } T get(const StaticString &key, const T &defaultValue) const { InternalConstIterator it = store.find(key); if (it == store.end()) { return defaultValue; } else { return it->second.thePair.second; } } bool has(const StaticString &key) const { return store.find(key) != store.end(); } bool set(const StaticString &key, const T &value) { pair result = store.insert(make_pair(key, Entry())); if (result.second) { // Key has been inserted. Copy it internally and point key // to the copy. ValueType &node = *result.first; StaticString &originalKey = const_cast(node.first); Entry &entry = node.second; entry.key = key; entry.thePair.first = entry.key; entry.thePair.second = value; originalKey = entry.key; return true; } else { // Key already exists. Update value. Entry &entry = result.first->second; entry.thePair.second = value; return false; } } bool remove(const StaticString &key) { return store.erase(key) > 0; } unsigned int size() const { return store.size(); } bool empty() const { return store.empty(); } iterator begin() { return iterator(store.begin()); } const_iterator begin() const { return const_iterator(store.begin()); } iterator end() { return iterator(store.end()); } const_iterator end() const { return const_iterator(store.end()); } }; } // namespace Passenger #endif /* _PASSENGER_STRING_MAP_H_ */ passenger-4.0.37/ext/common/Utils/StrIntUtils.cpp000644 000765 000024 00000031707 12233035540 022364 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include namespace Passenger { string fillInMiddle(unsigned int max, const string &prefix, const string &middle, const string &postfix) { if (max <= prefix.size() + postfix.size()) { throw ArgumentException("Impossible to build string with the given size constraint."); } unsigned int fillSize = max - (prefix.size() + postfix.size()); if (fillSize > middle.size()) { return prefix + middle + postfix; } else { return prefix + middle.substr(0, fillSize) + postfix; } } bool startsWith(const StaticString &str, const StaticString &substr) { if (str.size() >= substr.size()) { return memcmp(str.c_str(), substr.c_str(), substr.size()) == 0; } else { return false; } } template static void _split(const StaticString &str, char sep, vector &output) { output.clear(); if (!str.empty()) { string::size_type start, pos; start = 0; while ((pos = str.find(sep, start)) != string::npos) { output.push_back(str.substr(start, pos - start)); start = pos + 1; } output.push_back(str.substr(start)); } } void split(const StaticString &str, char sep, vector &output) { _split(str, sep, output); } void split(const StaticString &str, char sep, vector &output) { _split(str, sep, output); } template static void _splitIncludeSep(const StaticString &str, char sep, vector &output) { output.clear(); if (!str.empty()) { string::size_type start, pos; start = 0; while ((pos = str.find(sep, start)) != string::npos) { output.push_back(str.substr(start, pos - start + 1)); start = pos + 1; } if (start != str.size()) { output.push_back(str.substr(start)); } } } void splitIncludeSep(const StaticString &str, char sep, vector &output) { _splitIncludeSep(str, sep, output); } void splitIncludeSep(const StaticString &str, char sep, vector &output) { _splitIncludeSep(str, sep, output); } string replaceString(const string &str, const string &toFind, const string &replaceWith) { string::size_type pos = str.find(toFind); if (pos == string::npos) { return str; } else { string result(str); return result.replace(pos, toFind.size(), replaceWith); } } string replaceAll(const string &str, const string &toFind, const string &replaceWith) { string result = str; while (result.find(toFind) != string::npos) { result = replaceString(result, toFind, replaceWith); } return result; } string strip(const StaticString &str) { const char *data = str.data(); const char *end = str.data() + str.size(); while (data < end && (*data == ' ' || *data == '\n' || *data == '\t')) { data++; } while (end > data && (end[-1] == ' ' || end[-1] == '\n' || end[-1] == '\t')) { end--; } return string(data, end - data); } string toString(const vector &vec) { vector vec2; vec2.reserve(vec.size()); for (vector::const_iterator it = vec.begin(); it != vec.end(); it++) { vec2.push_back(*it); } return toString(vec2); } string toString(const vector &vec) { string result = "["; vector::const_iterator it; unsigned int i; for (it = vec.begin(), i = 0; it != vec.end(); it++, i++) { result.append("'"); result.append(it->data(), it->size()); if (i == vec.size() - 1) { result.append("'"); } else { result.append("', "); } } result.append("]"); return result; } string pointerToIntString(void *pointer) { // Use wierd union construction to avoid compiler warnings. if (sizeof(void *) == sizeof(unsigned int)) { union { void *pointer; unsigned int value; } u; u.pointer = pointer; return toString(u.value); } else if (sizeof(void *) == sizeof(unsigned long long)) { union { void *pointer; unsigned long long value; } u; u.pointer = pointer; return toString(u.value); } else { fprintf(stderr, "Pointer size unsupported...\n"); abort(); } } template static Numeric stringToUnsignedNumeric(const StaticString &str) { Numeric result = 0; string::size_type i = 0; const char *data = str.data(); while (data[i] == ' ' && i < str.size()) { i++; } while (data[i] >= '0' && data[i] <= '9' && i < str.size()) { result *= 10; result += data[i] - '0'; i++; } return result; } unsigned long long stringToULL(const StaticString &str) { return stringToUnsignedNumeric(str); } unsigned int stringToUint(const StaticString &str) { return stringToUnsignedNumeric(str); } template static Numeric stringToSignedNumeric(const StaticString &str) { Numeric result = 0; string::size_type i = 0; const char *data = str.data(); bool minus = false; while (data[i] == ' ' && i < str.size()) { i++; } if (data[i] == '-') { minus = true; i++; } while (data[i] >= '0' && data[i] <= '9' && i < str.size()) { result *= 10; result += data[i] - '0'; i++; } if (minus) { return -result; } else { return result; } } long long stringToLL(const StaticString &str) { return stringToSignedNumeric(str); } int stringToInt(const StaticString &str) { return stringToSignedNumeric(str); } template static Numeric hexToUnsignedNumeric(const StaticString &hex) { const char *pos = hex.data(); const char *end = hex.data() + hex.size(); Numeric result = 0; bool done = false; while (pos < end && !done) { char c = *pos; if (c >= '0' && c <= '9') { result *= 16; result += c - '0'; } else if (c >= 'a' && c <= 'f') { result *= 16; result += 10 + (c - 'a'); } else if (c >= 'A' && c <= 'F') { result *= 16; result += 10 + (c - 'A'); } else { done = true; } pos++; } return result; } unsigned long long hexToULL(const StaticString &hex) { return hexToUnsignedNumeric(hex); } unsigned int hexToUint(const StaticString &hex) { return hexToUnsignedNumeric(hex); } unsigned long long hexatriToULL(const StaticString &str) { unsigned long long result = 0; string::size_type i = 0; bool done = false; while (i < str.size() && !done) { char c = str[i]; if (c >= '0' && c <= '9') { result *= 36; result += c - '0'; } else if (c >= 'a' && c <= 'z') { result *= 36; result += 10 + (c - 'a'); } else if (c >= 'A' && c <= 'Z') { result *= 36; result += 10 + (c - 'A'); } else { done = true; } i++; } return result; } string toHex(const StaticString &data) { string result(data.size() * 2, '\0'); toHex(data, (char *) result.data()); return result; } static const char hex_chars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' }; static const char upcase_hex_chars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' }; void toHex(const StaticString &data, char *output, bool upperCase) { const char *data_buf = data.c_str(); string::size_type i; if (upperCase) { for (i = 0; i < data.size(); i++) { output[i * 2] = upcase_hex_chars[(unsigned char) data_buf[i] / 16]; output[i * 2 + 1] = upcase_hex_chars[(unsigned char) data_buf[i] % 16]; } } else { for (i = 0; i < data.size(); i++) { output[i * 2] = hex_chars[(unsigned char) data_buf[i] / 16]; output[i * 2 + 1] = hex_chars[(unsigned char) data_buf[i] % 16]; } } } string integerToHex(long long value) { char buf[sizeof(long long) * 2 + 1]; integerToHex(value, buf); return string(buf); } string integerToHexatri(long long value) { char buf[sizeof(long long) * 2 + 1]; integerToHexatri(value, buf); return string(buf); } bool looksLikePositiveNumber(const StaticString &str) { if (str.empty()) { return false; } else { bool result = true; const char *data = str.data(); const char *end = str.data() + str.size(); while (result && data != end) { result = result && (*data >= '0' && *data <= '9'); data++; } return result; } } int atoi(const string &s) { return ::atoi(s.c_str()); } long atol(const string &s) { return ::atol(s.c_str()); } bool constantTimeCompare(const StaticString &a, const StaticString &b) { // http://blog.jasonmooberry.com/2010/10/constant-time-string-comparison/ // See also ActiveSupport::MessageVerifier#secure_compare. if (a.size() != b.size()) { return false; } else { const char *x = a.data(); const char *y = b.data(); const char *end = a.data() + a.size(); int result = 0; while (x < end) { result |= *x ^ *y; x++; y++; } return result == 0; } } string distanceOfTimeInWords(time_t fromTime, time_t toTime) { time_t seconds; stringstream result; if (toTime == 0) { toTime = SystemTime::get(); } if (fromTime < toTime) { seconds = toTime - fromTime; } else { seconds = fromTime - toTime; } if (seconds >= 60) { time_t minutes = seconds / 60; if (minutes >= 60) { time_t hours = minutes / 60; minutes = minutes % 60; result << hours << "h "; } seconds = seconds % 60; result << minutes << "m "; } result << seconds << "s"; return result.str(); } char * appendData(char *pos, const char *end, const char *data, size_t size) { size_t maxToCopy = std::min(end - pos, size); memcpy(pos, data, maxToCopy); return pos + size; } char * appendData(char *pos, const char *end, const StaticString &data) { return appendData(pos, end, data.data(), data.size()); } string cEscapeString(const StaticString &input) { string result; const char *current = input.c_str(); const char *end = current + input.size(); result.reserve(input.size()); while (current < end) { char c = *current; if (c >= 32 && c <= 126) { // Printable ASCII. result.append(1, c); } else { char buf[sizeof("\\xFF")]; switch (c) { case '\0': // Explicitly in hex format in order to avoid confusion // with any '0' characters that come after this byte. result.append("\\x00"); break; case '\t': result.append("\\t"); break; case '\n': result.append("\\n"); break; case '\r': result.append("\\r"); break; case '\e': result.append("\\e"); break; default: buf[0] = '\\'; buf[1] = 'x'; toHex(StaticString(current, 1), buf + 2, true); buf[4] = '\0'; result.append(buf, sizeof(buf) - 1); break; } } current++; } return result; } string escapeHTML(const StaticString &input) { string result; result.reserve((int) ceil(input.size() * 1.25)); const char *current = (const char *) input.c_str(); const char *end = current + input.size(); while (current < end) { char ch = *current; if (ch & 128) { // Multibyte UTF-8 character. const char *prev = current; utf8::advance(current, 1, end); result.append(prev, current - prev); } else { // ASCII character <= 127. if (ch == '<') { result.append("<"); } else if (ch == '>') { result.append(">"); } else if (ch == '&') { result.append("&"); } else if (ch == '"') { result.append("""); } else if (ch == '\'') { result.append("'"); } else if (ch >= 0x21 || ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t') { result.append(1, ch); } else { result.append("&#"); result.append(toString((int) ((unsigned char) ch))); result.append(";"); } current++; } } return result; } StaticString makeStaticStringWithNull(const char *data) { return StaticString(data, strlen(data) + 1); } StaticString makeStaticStringWithNull(const string &data) { return StaticString(data.c_str(), data.size() + 1); } } // namespace Passenger passenger-4.0.37/ext/common/Utils/StrIntUtils.h000644 000765 000024 00000024312 12233035540 022023 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_STR_INT_UTILS_H_ #define _PASSENGER_STR_INT_UTILS_H_ #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; /** * A RAII construct for memory buffers that are dynamically allocated with malloc(). * Upon destruction of a DynamicBuffer, the memory buffer is freed. */ struct DynamicBuffer { typedef string::size_type size_type; char *data; size_type size; /** * @throws std::bad_alloc The buffer cannot be allocated. */ DynamicBuffer(size_type _size) : size(_size) { data = (char *) malloc(_size); if (data == NULL) { throw std::bad_alloc(); } } ~DynamicBuffer() throw() { free(data); } }; /** * Given a prefix string, a middle string and a postfix string, try to build a string * that looks like prefix + middle + postfix, with as many characters from * midle preserved as possible. * * If prefix + middle + postfix does not fit in max characters, * then middle will be truncated so that it fits. If max is too * small to contain even 1 character from middle, then an ArgumentException * will be thrown. * * @code * fillInMiddle(18, "server.", "1234", ".socket"); // "server.1234.socket" * fillInMiddle(16, "server.", "1234", ".socket"); // "server.12.socket" * fillInMiddle(14, "server.", "1234", ".socket"); // ArgumentException * @endcode * * @returns The resulting string, with middle possibly truncated. * @throws ArgumentException max is too small to contain even 1 * character from middle. * @post result.size() <= max */ string fillInMiddle(unsigned int max, const string &prefix, const string &middle, const string &postfix = ""); /** * Checks whether str starts with substr. */ bool startsWith(const StaticString &str, const StaticString &substr); /** * Split the given string using the given separator. Excludes the * separator from the output. * * @param str The string to split. * @param sep The separator to use. * @param output The vector to write the output to. */ void split(const StaticString & restrict_ref str, char sep, vector & restrict_ref output); void split(const StaticString & restrict_ref str, char sep, vector & restrict_ref output); /** * Split the given string using the given separator. Includes the * separator in the output, at the end of an item. * * @param str The string to split. * @param sep The separator to use. * @param output The vector to write the output to. */ void splitIncludeSep(const StaticString & restrict_ref str, char sep, vector & restrict_ref output); void splitIncludeSep(const StaticString & restrict_ref str, char sep, vector & restrict_ref output); /** * Look for 'toFind' inside 'str', replace it with 'replaceWith' and return the result. * Only the first occurence of 'toFind' is replaced. */ string replaceString(const string &str, const string &toFind, const string &replaceWith); /** * Like replaceString(), but replace all occurrences of `toFind`. */ string replaceAll(const string &str, const string &toFind, const string &replaceWith); /** * Strips leading and trailing whitespaces. */ string strip(const StaticString &str); /** * Convert anything to a string. */ template string toString(T something) { stringstream s; s << something; return s.str(); } string toString(const vector &vec); string toString(const vector &vec); string pointerToIntString(void *pointer); /** * Converts the given integer string to an unsigned long long integer. */ unsigned long long stringToULL(const StaticString &str); unsigned int stringToUint(const StaticString &str); /** * Converts the given integer string to a long long integer. */ long long stringToLL(const StaticString &str); int stringToInt(const StaticString &str); /** * Converts the given hexadecimal string to an unsigned long long integer. */ unsigned long long hexToULL(const StaticString &str); unsigned int hexToUint(const StaticString &str); /** * Converts the given hexatridecimal (base 36) string to an unsigned long long integer. */ unsigned long long hexatriToULL(const StaticString &str); /** * Convert the given binary data to hexadecimal. */ string toHex(const StaticString &data); /** * Convert the given binary data to hexadecimal. This form accepts an * output buffer which must be at least data.size() * 2 bytes large. */ void toHex(const StaticString & restrict_ref data, char * restrict output, bool upperCase = false); /** * Reverse a string in-place. */ inline void reverseString(char *str, unsigned int size) { char *end = str + size; for (--end; str < end; str++, end--) { *str = *str ^ *end, *end = *str ^ *end, *str = *str ^ *end; } } /** * Convert the given integer to some other radix, placing * the result into the given output buffer. The output buffer * will be NULL terminated. Supported radices are 2-36. * * @param outputSize The size of the output buffer, including space for * the terminating NULL. * @return The size of the created string, excluding * terminating NULL. * @throws std::length_error The output buffer is not large enough. */ template unsigned int integerToOtherBase(IntegerType value, char *output, unsigned int outputSize) { static const char chars[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' }; IntegerType remainder = value; unsigned int size = 0; do { output[size] = chars[remainder % radix]; remainder = remainder / radix; size++; } while (remainder != 0 && size < outputSize - 1); if (remainder == 0) { reverseString(output, size); output[size] = '\0'; return size; } else { throw std::length_error("Buffer not large enough to for integerToOtherBase()"); return -1; // Shut up compiler warning. } } /** * Convert the given integer to hexadecimal, placing the result * into the given output buffer. This buffer must be at least * 2 * sizeof(IntegerType) + 1 bytes. The output buffer * will be NULL terminated. * * @return The size of the created hexadecimal string, excluding * terminating NULL. */ template unsigned int integerToHex(IntegerType value, char *output) { return integerToOtherBase(value, output, 2 * sizeof(IntegerType) + 1); } /** * Convert the given integer to a hexadecimal string. */ string integerToHex(long long value); /** * Convert the given integer to hexatridecimal (Base 36), placing the * result into the given output buffer. This buffer must be at least * 2 * sizeof(IntegerType) + 1 bytes. The output buffer * will be NULL terminated. * * @return The size of the created hexatridecimal string, excluding * terminating NULL. */ template unsigned int integerToHexatri(IntegerType value, char *output) { return integerToOtherBase(value, output, 2 * sizeof(IntegerType) + 1); } /** * Convert the given integer to a hexatridecimal string. */ string integerToHexatri(long long value); /** * Checks whether the given string looks like a number >= 0. */ bool looksLikePositiveNumber(const StaticString &str); /** * Converts the given string to an integer. */ int atoi(const string &s); /** * Converts the given string to a long integer. */ long atol(const string &s); /** * Round number up to the nearest multiple of multiple. */ template IntegerType roundUp(IntegerType number, IntegerType multiple) { return (number + multiple - 1) / multiple * multiple; } /** * Compare two strings using a constant time algorithm to avoid timing attacks. */ bool constantTimeCompare(const StaticString &a, const StaticString &b); string distanceOfTimeInWords(time_t fromTime, time_t toTime = 0); /** * Append the given data to the address at 'pos', but do not cross 'end'. * Returns the end of the appended string. */ char *appendData(char *pos, const char *end, const char *data, size_t size); char *appendData(char *pos, const char *end, const StaticString &data); /** * Escape non-ASCII-printable characters in the given string with C-style escape sequences, * e.g. "foo\nbar\0" becomes "foo\\nbar\\0". */ string cEscapeString(const StaticString &input); /** * Escapes HTML special characters the given input string, which is assumed to * contain UTF-8 data. Returns a UTF-8 encoded string. * * @throws utf8::exception A UTF-8 decoding error occurred. */ string escapeHTML(const StaticString &input); StaticString makeStaticStringWithNull(const char *data); StaticString makeStaticStringWithNull(const string &data); } // namespace Passenger #endif /* _PASSENGER_STR_INT_UTILS_H_ */ passenger-4.0.37/ext/common/Utils/SystemTime.cpp000644 000765 000024 00000003004 12233035540 022210 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include namespace Passenger { namespace SystemTimeData { bool hasForcedValue = false; time_t forcedValue = 0; bool hasForcedMsecValue = false; unsigned long long forcedMsecValue = 0; bool hasForcedUsecValue = false; unsigned long long forcedUsecValue = 0; } } passenger-4.0.37/ext/common/Utils/SystemTime.h000644 000765 000024 00000013525 12233035540 021666 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_SYSTEM_TIME_H_ #define _PASSENGER_SYSTEM_TIME_H_ #include #include #include "../Exceptions.h" namespace Passenger { using namespace oxt; namespace SystemTimeData { extern bool hasForcedValue; extern time_t forcedValue; extern bool hasForcedMsecValue; extern unsigned long long forcedMsecValue; extern bool hasForcedUsecValue; extern unsigned long long forcedUsecValue; } /** * This class allows one to obtain the system time, similar to time() and * gettimeofday(). Unlike time(), it is possible to force a certain time * to be returned, which is useful for testing code that depends on the * system time. * * get() provides seconds resolution while getMsec() provides milliseconds * resolution. Both clocks can be independently forced to a certain value * through force() and forceMsec(). */ class SystemTime { public: /** * Returns the time since the Epoch, measured in seconds. Or, if a time * was forced with force(), then the forced time is returned instead. * * @throws TimeRetrievalException Something went wrong while retrieving the time. * @throws boost::thread_interrupted */ static time_t get() { if (SystemTimeData::hasForcedValue) { return SystemTimeData::forcedValue; } else { time_t ret = syscalls::time(NULL); if (ret == -1) { int e = errno; throw TimeRetrievalException( "Unable to retrieve the system time", e); } return ret; } } /** * Returns the time since the Epoch, measured in milliseconds. Or, if a * time was forced with forceMsec(), then the forced time is returned instead. * * @param real Whether to get the real time, even if a value was forced. * @throws TimeRetrievalException Something went wrong while retrieving the time. * @throws boost::thread_interrupted */ static unsigned long long getMsec(bool real = false) { if (SystemTimeData::hasForcedMsecValue && !real) { return SystemTimeData::forcedMsecValue; } else { struct timeval t; int ret; do { ret = gettimeofday(&t, NULL); } while (ret == -1 && errno == EINTR); if (ret == -1) { int e = errno; throw TimeRetrievalException( "Unable to retrieve the system time", e); } return (unsigned long long) t.tv_sec * 1000 + t.tv_usec / 1000; } } /** * Returns the time since the Epoch, measured in microseconds. Or, if a * time was forced with forceUsec(), then the forced time is returned instead. * * @throws TimeRetrievalException Something went wrong while retrieving the time. * @throws boost::thread_interrupted */ static unsigned long long getUsec() { if (SystemTimeData::hasForcedUsecValue) { return SystemTimeData::forcedUsecValue; } else { struct timeval t; int ret; do { ret = gettimeofday(&t, NULL); } while (ret == -1 && errno == EINTR); if (ret == -1) { int e = errno; throw TimeRetrievalException( "Unable to retrieve the system time", e); } return (unsigned long long) t.tv_sec * 1000000 + t.tv_usec; } } /** * Force get() to return the given value. */ static void force(time_t value) { SystemTimeData::hasForcedValue = true; SystemTimeData::forcedValue = value; } /** * Force getMsec() to return the given value. */ static void forceMsec(unsigned long long value) { SystemTimeData::hasForcedMsecValue = true; SystemTimeData::forcedMsecValue = value; } /** * Force getUsec() to return the given value. */ static void forceUsec(unsigned long long value) { SystemTimeData::hasForcedUsecValue = true; SystemTimeData::forcedUsecValue = value; } static void forceAll(unsigned long long usec) { force(usec / 1000000); forceMsec(usec / 1000); forceUsec(usec); } /** * Release the previously forced seconds value, so that get() * returns the system time once again. */ static void release() { SystemTimeData::hasForcedValue = false; } /** * Release the previously forced msec value, so that getMsec() * returns the system time once again. */ static void releaseMsec() { SystemTimeData::hasForcedMsecValue = false; } /** * Release the previously forced usec value, so that getUsec() * returns the system time once again. */ static void releaseUsec() { SystemTimeData::hasForcedUsecValue = false; } /** * Release all previously forced values, so that get(), getMsec() * and getUsec() return the system time once again. */ static void releaseAll() { SystemTimeData::hasForcedValue = false; SystemTimeData::hasForcedMsecValue = false; SystemTimeData::hasForcedUsecValue = false; } }; } // namespace Passenger #endif /* _PASSENGER_SYSTEM_TIME_H_ */ passenger-4.0.37/ext/common/Utils/Template.h000644 000765 000024 00000012263 12233035540 021334 0ustar00honglistaff000000 000000 #ifndef _PASSENGER_TEMPLATE_H_ #define _PASSENGER_TEMPLATE_H_ #include #include #include #include #include #include namespace Passenger { using namespace std; /** * Implements a simple HTML templating language. */ class Template { private: typedef string::size_type size_type; struct State { string result; const StringMap &substitutions; State(const StaticString &content, const StringMap &_substitutions) : result(content.data(), content.size()), substitutions(_substitutions) { } }; struct Options { bool raw; string defaultValue; Options() { raw = false; } }; StaticString content; static bool isNameCharacter(char ch) { return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch == '_'; } static StaticString readOptionName(const char **current) { while (**current != '\0' && (**current == ',' || **current == ' ')) { (*current)++; } const char *begin = *current; while (**current != '\0' && isNameCharacter(**current)) { (*current)++; } const char *end = *current; return StaticString(begin, end - begin); } static StaticString readOptionValue(const char **current) { while (**current != '\0' && **current == ' ') { (*current)++; } if (**current == '=') { (*current)++; const char *begin = *current; while (**current != '\0' && **current != ',') { (*current)++; } const char *end = *current; return StaticString(begin, end - begin); } else { return StaticString(); } } static Options parseOptions(const string &optionsString) { Options options; const char *current = optionsString.data(); while (*current != '\0') { StaticString name = readOptionName(¤t); StaticString value = readOptionValue(¤t); if (name == "raw") { options.raw = true; } else if (name == "default") { options.defaultValue = value; } else { fprintf(stderr, "Unknown template option '%s'\n", name.c_str()); } } return options; } static string &makeBreakable(string &html) { string::size_type i = 0; while (i < html.size()) { char ch = html[i]; if (ch == '=' || ch == ',' || ch == ';' || ch == ':') { html.insert(i + 1, ""); i += sizeof(""); } else if (ch == '&') { // HTML escape character; skip to end. do { i++; } while (i < html.size() && html[i] != ';'); if (i < html.size()) { i++; } } else { i++; } } return html; } size_type processIf(State &state, size_type pos, size_type conditionEndPos, const string &name) { const size_t prefixSize = sizeof("if ") - 1; const size_t endIfSize = sizeof("{{/if}}") - 1; const string condition = name.substr(prefixSize, name.size() - prefixSize); const string evalResult = state.substitutions.get(condition); conditionEndPos += sizeof("}}") - 1; size_type endIfPos = state.result.find("{{/if}}", conditionEndPos); if (endIfPos == string::npos) { return state.result.size(); } if (!evalResult.empty() && evalResult != "false") { const string subContent = state.result.substr(conditionEndPos, endIfPos - conditionEndPos); State subState(subContent, state.substitutions); apply(subState); state.result.replace(pos, endIfPos + endIfSize - pos, subState.result); return pos + subState.result.size(); } else { state.result.erase(pos, endIfPos - pos + sizeof("{{/if}}") - 1); return pos; } } size_type processSubsitution(State &state, size_type pos, size_type endPos, string name) { Options options; size_type sep = name.find('|'); if (sep != string::npos) { const string optionsString = name.substr(sep + 1); name = name.substr(0, sep); options = parseOptions(optionsString); } string value = state.substitutions.get(name); if (value.empty()) { value = options.defaultValue; } if (!options.raw) { value = escapeHTML(value); makeBreakable(value); } state.result.replace(pos, endPos - pos + (sizeof("}}") - 1), value); return pos + value.size(); } size_type processCommand(State &state, size_type pos) { size_type endPos = state.result.find("}}", pos); if (endPos == string::npos) { return state.result.size(); } string name = state.result.substr(pos + 2, endPos - pos - 2); if (startsWith(name, "if ")) { return processIf(state, pos, endPos, name); } else { return processSubsitution(state, pos, endPos, name); } } void apply(State &state) { size_type searchStart = 0; while (searchStart < state.result.size()) { size_type pos = state.result.find("{{", searchStart); if (pos == string::npos) { searchStart = state.result.size(); } else { searchStart = processCommand(state, pos); } } } public: Template(const StaticString &_content) : content(_content) { } string apply(const StringMap &substitutions) { State state(content, substitutions); apply(state); return state.result; } static string apply(const StaticString &content, const StringMap &substitutions) { return Template(content).apply(substitutions); } }; } // namespace Passenger #endif /* _PASSENGER_TEMPLATE_H_ */ passenger-4.0.37/ext/common/Utils/Timer.h000644 000765 000024 00000011405 12233035540 020636 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_TIMER_H_ #define _PASSENGER_TIMER_H_ #include #include #include #include namespace Passenger { using namespace boost; using namespace oxt; /** * A Timer which one can use to check how much time has elapsed since the * timer started. This timer support miliseconds-resolution, but the exact * resolution depends on the OS and the hardware. * * This class is thread-safe. * * @code * Timer timer; * sleep(10); * timer.elapsed(); // => about 10000 (msec) * @endcode */ class Timer { private: struct timeval startTime; mutable boost::mutex lock; public: /** * Creates a new Timer object. * * @param startNow Whether the timer should be started immediately. */ Timer(bool startNow = true) { if (startNow) { start(); } else { stop(); } } /** * Start the timer. If the timer was already started, then this will * restart the timer. */ void start() { // TODO: We really use should clock_gettime() and the monotonic // clock whenever possible, instead of gettimeofday()... // On OS X we can use mach_absolute_time() boost::lock_guard l(lock); int ret; do { ret = gettimeofday(&startTime, NULL); } while (ret == -1 && errno == EINTR); } /** * Stop the timer. If there's currently another thread waiting on the wait() * call, then that wait() call will block indefinitely until you call start() * and sufficient amount of time has elapsed. */ void stop() { boost::lock_guard l(lock); startTime.tv_sec = 0; startTime.tv_usec = 0; } /** * Resets the timer. If the timer was already started then it is still started; * if it was stopped then it is still stopped. */ void reset() { boost::lock_guard l(lock); if (startTime.tv_sec != 0 || startTime.tv_usec != 0) { int ret; do { ret = gettimeofday(&startTime, NULL); } while (ret == -1 && errno == EINTR); } } /** * Returns the amount of time that has elapsed since the timer was last started, * in miliseconds. If the timer is currently stopped, then 0 is returned. */ unsigned long long elapsed() const { boost::lock_guard l(lock); if (startTime.tv_sec == 0 && startTime.tv_usec == 0) { return 0; } else { struct timeval t; unsigned long long now, beginning; int ret; do { ret = gettimeofday(&t, NULL); } while (ret == -1 && errno == EINTR); now = (unsigned long long) t.tv_sec * 1000 + t.tv_usec / 1000; beginning = (unsigned long long) startTime.tv_sec * 1000 + startTime.tv_usec / 1000; return now - beginning; } } /** * Returns the amount of time that has elapsed since the timer was last started, * in microseconds. If the timer is currently stopped, then 0 is returned. */ unsigned long long usecElapsed() const { boost::lock_guard l(lock); if (startTime.tv_sec == 0 && startTime.tv_usec == 0) { return 0; } else { struct timeval t; unsigned long long now, beginning; int ret; do { ret = gettimeofday(&t, NULL); } while (ret == -1 && errno == EINTR); now = (unsigned long long) t.tv_sec * 1000000 + t.tv_usec; beginning = (unsigned long long) startTime.tv_sec * 1000000 + startTime.tv_usec; return now - beginning; } } /** * Wait until time miliseconds have elapsed since the timer * was last started. */ void wait(unsigned long long time) const { while (elapsed() < time) { syscalls::usleep(25000); } } }; } // namespace Passenger #endif /* _PASSENGER_TIMER_H_ */ passenger-4.0.37/ext/common/Utils/utf8/000755 000765 000024 00000000000 12233035540 020272 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/common/Utils/utf8.h000644 000765 000024 00000003061 12233035540 020443 0ustar00honglistaff000000 000000 // Copyright 2006 Nemanja Trifunovic // UTF-8 CPP 2.3 /* Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731 #define UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731 #include #include #endif // header guard passenger-4.0.37/ext/common/Utils/VariantMap.h000644 000765 000024 00000030070 12233035540 021617 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_VARIANT_MAP_H_ #define _PASSENGER_VARIANT_MAP_H_ #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; /** * A map which maps string keys to values of any type. Internally all values * are stored as strings, but convenience functions are provided to cast * to and from other types. * *

get() methods

* * There are many get() versions but they all behave the same way, just returning * different types. * get(name) returns the value associated with the key name. * If the key doesn't exist then the behavior depends on the required argument: * - If required is true, then a MissingKeyException will be thrown. * - If required is false, then defaultValue will be returned. * (In case of the string version, defaultValue defaults to the empty string.) */ class VariantMap { private: map store; string empty; /** * Looks up the string value associated with name. * If found, then true is returned and a pointer to * the string value is stored in *strValue. * * If not found, and required is true, then a * MissingKeyException will be thrown. * * If not found, and required is false, then * false is returned. */ bool lookup(const string &name, bool required, const string **strValue) const { map::const_iterator it = store.find(name); if (it == store.end()) { if (required) { throw MissingKeyException(name); } else { return false; } } else { *strValue = &it->second; return true; } } public: /** Thrown when a required key is not found by one of the get() methods. */ class MissingKeyException: public oxt::tracable_exception { private: string message; string key; public: MissingKeyException(const string &key) { this->key = key; message = string("Required key '") + key + "' is missing"; } virtual ~MissingKeyException() throw() { } virtual const char *what() const throw() { return message.c_str(); } /** The key that wasn't found. */ const string &getKey() const { return key; } }; typedef map::iterator Iterator; typedef map::const_iterator ConstIterator; /** * Populates a VariantMap from the data in argv, which * consists of argc elements. * argv must be an array containing keys followed by * values, like this: * [key1, value1, key2, value2, ...] * * @throws ArgumentException The argv array does not * contain valid key-value pairs. */ void readFrom(const char **argv, unsigned int argc) { if (OXT_UNLIKELY(argc % 2 != 0)) { throw ArgumentException("argc must be a multiple of 2"); } unsigned int i = 0; while (i < argc) { string name = argv[i]; if (startsWith(name, "--")) { name.erase(0, 2); } name = replaceAll(name, "-", "_"); store[name] = replaceAll(argv[i + 1], "-", "_"); i += 2; } } /** * Populates a VariantMap from the data in `fd`. MessageIO * is used to read from the file descriptor. * * @throws SystemException * @throws IOException */ void readFrom(int fd, const StaticString &messageName = "VariantMap") { TRACE_POINT(); vector args; if (!readArrayMessage(fd, args)) { throw IOException("Unexpected end-of-file encountered"); } if (args.size() == 0) { throw IOException("Unexpected empty message received from channel"); } if (args[0] != messageName) { throw IOException("Unexpected message '" + args[0] + "' received from channel"); } if (args.size() % 2 != 1) { throw IOException("Message from channel has an unexpected number of arguments"); } vector::const_iterator it = args.begin(); it++; while (it != args.end()) { const string &key = *it; it++; const string &value = *it; it++; store[key] = value; } } VariantMap &set(const string &name, const string &value) { if (value.empty()) { map::iterator it = store.find(name); if (it != store.end()) { store.erase(it); } } else { store[name] = value; } return *this; } VariantMap &setDefault(const string &name, const string &value) { if (store.find(name) == store.end()) { set(name, value); } return *this; } VariantMap &setInt(const string &name, int value) { set(name, toString(value)); return *this; } VariantMap &setDefaultInt(const string &name, int value) { if (store.find(name) == store.end()) { store[name] = toString(value); } return *this; } VariantMap &setULL(const string &name, unsigned long long value) { set(name, toString(value)); return *this; } VariantMap &setDefaultULL(const string &name, unsigned long long value) { if (store.find(name) == store.end()) { store[name] = toString(value); } return *this; } VariantMap &setPid(const string &name, pid_t value) { set(name, toString((unsigned long long) value)); return *this; } VariantMap &setDefaultPid(const string &name, pid_t value) { if (store.find(name) == store.end()) { store[name] = toString((unsigned long long) value); } return *this; } VariantMap &setUid(const string &name, uid_t value) { set(name, toString((long long) value)); return *this; } VariantMap &setDefaultUid(const string &name, uid_t value) { if (store.find(name) == store.end()) { store[name] = toString((unsigned long long) value); } return *this; } VariantMap &setGid(const string &name, gid_t value) { set(name, toString((long long) value)); return *this; } VariantMap &setDefaultGid(const string &name, gid_t value) { if (store.find(name) == store.end()) { store[name] = toString((unsigned long long) value); } return *this; } VariantMap &setBool(const string &name, bool value) { set(name, value ? "true" : "false"); return *this; } VariantMap &setDefaultBool(const string &name, bool value) { if (store.find(name) == store.end()) { store[name] = value ? "true" : "false"; } return *this; } VariantMap &setStrSet(const string &name, const std::set &value) { std::set::const_iterator it; string result; for (it = value.begin(); it != value.end(); it++) { result.append(*it); result.append(1, '\0'); } set(name, Base64::encode(result)); return *this; } const string &get(const string &name, bool required = true) const { map::const_iterator it = store.find(name); if (it == store.end()) { if (required) { throw MissingKeyException(name); } else { return empty; } } else { return it->second; } } const string &get(const string &name, bool required, const string &defaultValue) const { map::const_iterator it = store.find(name); if (it == store.end()) { if (required) { throw MissingKeyException(name); } else { return defaultValue; } } else { return it->second; } } int getInt(const string &name, bool required = true, int defaultValue = 0) const { int result = defaultValue; const string *str; if (lookup(name, required, &str)) { result = (int) stringToLL(*str); } return result; } unsigned long long getULL(const string &name, bool required = true, unsigned long long defaultValue = 0) const { unsigned long long result = defaultValue; const string *str; if (lookup(name, required, &str)) { result = stringToULL(*str); } return result; } pid_t getPid(const string &name, bool required = true, pid_t defaultValue = 0) const { pid_t result = defaultValue; const string *str; if (lookup(name, required, &str)) { result = (pid_t) stringToLL(*str); } return result; } uid_t getUid(const string &name, bool required = true, uid_t defaultValue = 0) const { uid_t result = defaultValue; const string *str; if (lookup(name, required, &str)) { result = (uid_t) stringToLL(*str); } return result; } gid_t getGid(const string &name, bool required = true, gid_t defaultValue = 0) const { gid_t result = defaultValue; const string *str; if (lookup(name, required, &str)) { result = (gid_t) stringToLL(*str); } return result; } bool getBool(const string &name, bool required = true, bool defaultValue = false) const { bool result = defaultValue; const string *str; if (lookup(name, required, &str)) { result = *str == "true"; } return result; } vector getStrSet(const string &name, bool required = true, const vector &defaultValue = vector()) const { vector result = defaultValue; const string *str; if (lookup(name, required, &str)) { result.clear(); split(Base64::decode(*str), '\0', result); } return result; } bool erase(const string &name) { return store.erase(name) != 0; } /** Checks whether the specified key is in this map. */ bool has(const string &name) const { return store.find(name) != store.end(); } /** Returns the number of elements in this map. */ unsigned int size() const { return store.size(); } void addTo(VariantMap &other) const { map::const_iterator it; map::const_iterator end = store.end(); for (it = store.begin(); it != end; it++) { other.set(it->first, it->second); } } /** * Writes a representation of the contents in this VariantMap to * the given file descriptor with MessageIO. The data can be * unserialized with readFrom(fd). * * @throws SystemException */ void writeToFd(int fd, const StaticString &messageName = "VariantMap") const { map::const_iterator it; map::const_iterator end = store.end(); vector args; args.reserve(1 + 2 * store.size()); args.push_back(messageName); for (it = store.begin(); it != end; it++) { args.push_back(it->first); args.push_back(it->second); } writeArrayMessage(fd, args); } Iterator begin() { return store.begin(); } ConstIterator begin() const { return store.begin(); } Iterator end() { return store.end(); } ConstIterator end() const { return store.end(); } string inspect() const { map::const_iterator it; map::const_iterator end = store.end(); string result; unsigned int i = 0; result.append("{ "); for (it = store.begin(); it != end; it++, i++) { result.append("'"); result.append(it->first); result.append("' => '"); result.append(it->second); if (i == store.size() - 1) { result.append("'"); } else { result.append("', "); } } result.append(" }"); return result; } }; } // namespace Passenger #endif /* _PASSENGER_VARIANT_MAP_H_ */ _PASSENGER_VARIANT_MAP_H_ passenger-4.0.37/ext/common/Utils/utf8/checked.h000644 000765 000024 00000027116 12233035540 022040 0ustar00honglistaff000000 000000 // Copyright 2006 Nemanja Trifunovic // UTF-8 CPP 2.3 /* Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef UTF8_FOR_CPP_CHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731 #define UTF8_FOR_CPP_CHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731 #include #include namespace utf8 { // Base for the exceptions that may be thrown from the library class exception : public std::exception { }; // Exceptions that may be thrown from the library functions. class invalid_code_point : public exception { uint32_t cp; public: invalid_code_point(uint32_t cp) : cp(cp) {} virtual const char* what() const throw() { return "Invalid code point"; } uint32_t code_point() const {return cp;} }; class invalid_utf8 : public exception { uint8_t u8; public: invalid_utf8 (uint8_t u) : u8(u) {} virtual const char* what() const throw() { return "Invalid UTF-8"; } uint8_t utf8_octet() const {return u8;} }; class invalid_utf16 : public exception { uint16_t u16; public: invalid_utf16 (uint16_t u) : u16(u) {} virtual const char* what() const throw() { return "Invalid UTF-16"; } uint16_t utf16_word() const {return u16;} }; class not_enough_room : public exception { public: virtual const char* what() const throw() { return "Not enough space"; } }; /// The library API - functions intended to be called by the users template output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out, uint32_t replacement) { while (start != end) { octet_iterator sequence_start = start; internal::utf_error err_code = internal::validate_next(start, end); switch (err_code) { case internal::UTF8_OK : for (octet_iterator it = sequence_start; it != start; ++it) *out++ = *it; break; case internal::NOT_ENOUGH_ROOM: throw not_enough_room(); case internal::INVALID_LEAD: append (replacement, out); ++start; break; case internal::INCOMPLETE_SEQUENCE: case internal::OVERLONG_SEQUENCE: case internal::INVALID_CODE_POINT: append (replacement, out); ++start; // just one replacement mark for the sequence while (internal::is_trail(*start) && start != end) ++start; break; } } return out; } template inline output_iterator replace_invalid(octet_iterator start, octet_iterator end, output_iterator out) { static const uint32_t replacement_marker = internal::mask16(0xfffd); return replace_invalid(start, end, out, replacement_marker); } template octet_iterator append(uint32_t cp, octet_iterator result) { if (!internal::is_code_point_valid(cp)) throw invalid_code_point(cp); if (cp < 0x80) // one octet *(result++) = static_cast(cp); else if (cp < 0x800) { // two octets *(result++) = static_cast((cp >> 6) | 0xc0); *(result++) = static_cast((cp & 0x3f) | 0x80); } else if (cp < 0x10000) { // three octets *(result++) = static_cast((cp >> 12) | 0xe0); *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); *(result++) = static_cast((cp & 0x3f) | 0x80); } else { // four octets *(result++) = static_cast((cp >> 18) | 0xf0); *(result++) = static_cast(((cp >> 12) & 0x3f) | 0x80); *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); *(result++) = static_cast((cp & 0x3f) | 0x80); } return result; } template uint32_t next(octet_iterator& it, octet_iterator end) { uint32_t cp = 0; internal::utf_error err_code = internal::validate_next(it, end, &cp); switch (err_code) { case internal::UTF8_OK : break; case internal::NOT_ENOUGH_ROOM : throw not_enough_room(); case internal::INVALID_LEAD : case internal::INCOMPLETE_SEQUENCE : case internal::OVERLONG_SEQUENCE : throw invalid_utf8(*it); case internal::INVALID_CODE_POINT : throw invalid_code_point(cp); } return cp; } template uint32_t peek_next(octet_iterator it, octet_iterator end) { return next(it, end); } template uint32_t prior(octet_iterator& it, octet_iterator start) { octet_iterator end = it; while (internal::is_trail(*(--it))) if (it < start) throw invalid_utf8(*it); // error - no lead byte in the sequence octet_iterator temp = it; return next(temp, end); } /// Deprecated in versions that include "prior" template uint32_t previous(octet_iterator& it, octet_iterator pass_start) { octet_iterator end = it; while (internal::is_trail(*(--it))) if (it == pass_start) throw invalid_utf8(*it); // error - no lead byte in the sequence octet_iterator temp = it; return next(temp, end); } template void advance (octet_iterator& it, distance_type n, octet_iterator end) { for (distance_type i = 0; i < n; ++i) next(it, end); } template typename std::iterator_traits::difference_type distance (octet_iterator first, octet_iterator last) { typename std::iterator_traits::difference_type dist; for (dist = 0; first < last; ++dist) next(first, last); return dist; } template octet_iterator utf16to8 (u16bit_iterator start, u16bit_iterator end, octet_iterator result) { while (start != end) { uint32_t cp = internal::mask16(*start++); // Take care of surrogate pairs first if (internal::is_lead_surrogate(cp)) { if (start != end) { uint32_t trail_surrogate = internal::mask16(*start++); if (internal::is_trail_surrogate(trail_surrogate)) cp = (cp << 10) + trail_surrogate + internal::SURROGATE_OFFSET; else throw invalid_utf16(static_cast(trail_surrogate)); } else throw invalid_utf16(static_cast(cp)); } // Lone trail surrogate else if (internal::is_trail_surrogate(cp)) throw invalid_utf16(static_cast(cp)); result = append(cp, result); } return result; } template u16bit_iterator utf8to16 (octet_iterator start, octet_iterator end, u16bit_iterator result) { while (start != end) { uint32_t cp = next(start, end); if (cp > 0xffff) { //make a surrogate pair *result++ = static_cast((cp >> 10) + internal::LEAD_OFFSET); *result++ = static_cast((cp & 0x3ff) + internal::TRAIL_SURROGATE_MIN); } else *result++ = static_cast(cp); } return result; } template octet_iterator utf32to8 (u32bit_iterator start, u32bit_iterator end, octet_iterator result) { while (start != end) result = append(*(start++), result); return result; } template u32bit_iterator utf8to32 (octet_iterator start, octet_iterator end, u32bit_iterator result) { while (start != end) (*result++) = next(start, end); return result; } // The iterator class template class iterator : public std::iterator { octet_iterator it; octet_iterator range_start; octet_iterator range_end; public: iterator () {}; explicit iterator (const octet_iterator& octet_it, const octet_iterator& range_start, const octet_iterator& range_end) : it(octet_it), range_start(range_start), range_end(range_end) { if (it < range_start || it > range_end) throw std::out_of_range("Invalid utf-8 iterator position"); } // the default "big three" are OK octet_iterator base () const { return it; } uint32_t operator * () const { octet_iterator temp = it; return next(temp, range_end); } bool operator == (const iterator& rhs) const { if (range_start != rhs.range_start || range_end != rhs.range_end) throw std::logic_error("Comparing utf-8 iterators defined with different ranges"); return (it == rhs.it); } bool operator != (const iterator& rhs) const { return !(operator == (rhs)); } iterator& operator ++ () { next(it, range_end); return *this; } iterator operator ++ (int) { iterator temp = *this; next(it, range_end); return temp; } iterator& operator -- () { prior(it, range_start); return *this; } iterator operator -- (int) { iterator temp = *this; prior(it, range_start); return temp; } }; // class iterator } // namespace utf8 #endif //header guard passenger-4.0.37/ext/common/Utils/utf8/core.h000644 000765 000024 00000027052 12233035540 021401 0ustar00honglistaff000000 000000 // Copyright 2006 Nemanja Trifunovic // UTF-8 CPP 2.3 /* Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef UTF8_FOR_CPP_CORE_H_2675DCD0_9480_4c0c_B92A_CC14C027B731 #define UTF8_FOR_CPP_CORE_H_2675DCD0_9480_4c0c_B92A_CC14C027B731 #include namespace utf8 { // The typedefs for 8-bit, 16-bit and 32-bit unsigned integers // You may need to change them to match your system. // These typedefs have the same names as ones from cstdint, or boost/cstdint typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; // Helper code - not intended to be directly called by the library users. May be changed at any time namespace internal { // Unicode constants // Leading (high) surrogates: 0xd800 - 0xdbff // Trailing (low) surrogates: 0xdc00 - 0xdfff const uint16_t LEAD_SURROGATE_MIN = 0xd800u; const uint16_t LEAD_SURROGATE_MAX = 0xdbffu; const uint16_t TRAIL_SURROGATE_MIN = 0xdc00u; const uint16_t TRAIL_SURROGATE_MAX = 0xdfffu; const uint16_t LEAD_OFFSET = LEAD_SURROGATE_MIN - (0x10000 >> 10); const uint32_t SURROGATE_OFFSET = 0x10000u - (LEAD_SURROGATE_MIN << 10) - TRAIL_SURROGATE_MIN; // Maximum valid value for a Unicode code point const uint32_t CODE_POINT_MAX = 0x0010ffffu; template inline uint8_t mask8(octet_type oc) { return static_cast(0xff & oc); } template inline uint16_t mask16(u16_type oc) { return static_cast(0xffff & oc); } template inline bool is_trail(octet_type oc) { return ((mask8(oc) >> 6) == 0x2); } template inline bool is_lead_surrogate(u16 cp) { return (cp >= LEAD_SURROGATE_MIN && cp <= LEAD_SURROGATE_MAX); } template inline bool is_trail_surrogate(u16 cp) { return (cp >= TRAIL_SURROGATE_MIN && cp <= TRAIL_SURROGATE_MAX); } template inline bool is_surrogate(u16 cp) { return (cp >= LEAD_SURROGATE_MIN && cp <= TRAIL_SURROGATE_MAX); } template inline bool is_code_point_valid(u32 cp) { return (cp <= CODE_POINT_MAX && !is_surrogate(cp) && cp != 0xfffe && cp != 0xffff); } template inline typename std::iterator_traits::difference_type sequence_length(octet_iterator lead_it) { uint8_t lead = mask8(*lead_it); if (lead < 0x80) return 1; else if ((lead >> 5) == 0x6) return 2; else if ((lead >> 4) == 0xe) return 3; else if ((lead >> 3) == 0x1e) return 4; else return 0; } template inline bool is_overlong_sequence(uint32_t cp, octet_difference_type length) { if (cp < 0x80) { if (length != 1) return true; } else if (cp < 0x800) { if (length != 2) return true; } else if (cp < 0x10000) { if (length != 3) return true; } return false; } enum utf_error {UTF8_OK, NOT_ENOUGH_ROOM, INVALID_LEAD, INCOMPLETE_SEQUENCE, OVERLONG_SEQUENCE, INVALID_CODE_POINT}; /// get_sequence_x functions decode utf-8 sequences of the length x template utf_error get_sequence_1(octet_iterator& it, octet_iterator end, uint32_t* code_point) { if (it != end) { if (code_point) *code_point = mask8(*it); return UTF8_OK; } return NOT_ENOUGH_ROOM; } template utf_error get_sequence_2(octet_iterator& it, octet_iterator end, uint32_t* code_point) { utf_error ret_code = NOT_ENOUGH_ROOM; if (it != end) { uint32_t cp = mask8(*it); if (++it != end) { if (is_trail(*it)) { cp = ((cp << 6) & 0x7ff) + ((*it) & 0x3f); if (code_point) *code_point = cp; ret_code = UTF8_OK; } else ret_code = INCOMPLETE_SEQUENCE; } else ret_code = NOT_ENOUGH_ROOM; } return ret_code; } template utf_error get_sequence_3(octet_iterator& it, octet_iterator end, uint32_t* code_point) { utf_error ret_code = NOT_ENOUGH_ROOM; if (it != end) { uint32_t cp = mask8(*it); if (++it != end) { if (is_trail(*it)) { cp = ((cp << 12) & 0xffff) + ((mask8(*it) << 6) & 0xfff); if (++it != end) { if (is_trail(*it)) { cp += (*it) & 0x3f; if (code_point) *code_point = cp; ret_code = UTF8_OK; } else ret_code = INCOMPLETE_SEQUENCE; } else ret_code = NOT_ENOUGH_ROOM; } else ret_code = INCOMPLETE_SEQUENCE; } else ret_code = NOT_ENOUGH_ROOM; } return ret_code; } template utf_error get_sequence_4(octet_iterator& it, octet_iterator end, uint32_t* code_point) { utf_error ret_code = NOT_ENOUGH_ROOM; if (it != end) { uint32_t cp = mask8(*it); if (++it != end) { if (is_trail(*it)) { cp = ((cp << 18) & 0x1fffff) + ((mask8(*it) << 12) & 0x3ffff); if (++it != end) { if (is_trail(*it)) { cp += (mask8(*it) << 6) & 0xfff; if (++it != end) { if (is_trail(*it)) { cp += (*it) & 0x3f; if (code_point) *code_point = cp; ret_code = UTF8_OK; } else ret_code = INCOMPLETE_SEQUENCE; } else ret_code = NOT_ENOUGH_ROOM; } else ret_code = INCOMPLETE_SEQUENCE; } else ret_code = NOT_ENOUGH_ROOM; } else ret_code = INCOMPLETE_SEQUENCE; } else ret_code = NOT_ENOUGH_ROOM; } return ret_code; } template utf_error validate_next(octet_iterator& it, octet_iterator end, uint32_t* code_point) { // Save the original value of it so we can go back in case of failure // Of course, it does not make much sense with i.e. stream iterators octet_iterator original_it = it; uint32_t cp = 0; // Determine the sequence length based on the lead octet typedef typename std::iterator_traits::difference_type octet_difference_type; octet_difference_type length = sequence_length(it); if (length == 0) return INVALID_LEAD; // Now that we have a valid sequence length, get trail octets and calculate the code point utf_error err = UTF8_OK; switch (length) { case 1: err = get_sequence_1(it, end, &cp); break; case 2: err = get_sequence_2(it, end, &cp); break; case 3: err = get_sequence_3(it, end, &cp); break; case 4: err = get_sequence_4(it, end, &cp); break; } if (err == UTF8_OK) { // Decoding succeeded. Now, security checks... if (is_code_point_valid(cp)) { if (!is_overlong_sequence(cp, length)){ // Passed! Return here. if (code_point) *code_point = cp; ++it; return UTF8_OK; } else err = OVERLONG_SEQUENCE; } else err = INVALID_CODE_POINT; } // Failure branch - restore the original value of the iterator it = original_it; return err; } template inline utf_error validate_next(octet_iterator& it, octet_iterator end) { return validate_next(it, end, 0); } } // namespace internal /// The library API - functions intended to be called by the users // Byte order mark const uint8_t bom[] = {0xef, 0xbb, 0xbf}; template octet_iterator find_invalid(octet_iterator start, octet_iterator end) { octet_iterator result = start; while (result != end) { internal::utf_error err_code = internal::validate_next(result, end); if (err_code != internal::UTF8_OK) return result; } return result; } template inline bool is_valid(octet_iterator start, octet_iterator end) { return (find_invalid(start, end) == end); } template inline bool starts_with_bom (octet_iterator it, octet_iterator end) { return ( ((it != end) && (internal::mask8(*it++)) == bom[0]) && ((it != end) && (internal::mask8(*it++)) == bom[1]) && ((it != end) && (internal::mask8(*it)) == bom[2]) ); } //Deprecated in release 2.3 template inline bool is_bom (octet_iterator it) { return ( (internal::mask8(*it++)) == bom[0] && (internal::mask8(*it++)) == bom[1] && (internal::mask8(*it)) == bom[2] ); } } // namespace utf8 #endif // header guard passenger-4.0.37/ext/common/Utils/utf8/unchecked.h000644 000765 000024 00000020734 12233035540 022402 0ustar00honglistaff000000 000000 // Copyright 2006 Nemanja Trifunovic // UTF-8 CPP 2.3 /* Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef UTF8_FOR_CPP_UNCHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731 #define UTF8_FOR_CPP_UNCHECKED_H_2675DCD0_9480_4c0c_B92A_CC14C027B731 #include namespace utf8 { namespace unchecked { template octet_iterator append(uint32_t cp, octet_iterator result) { if (cp < 0x80) // one octet *(result++) = static_cast(cp); else if (cp < 0x800) { // two octets *(result++) = static_cast((cp >> 6) | 0xc0); *(result++) = static_cast((cp & 0x3f) | 0x80); } else if (cp < 0x10000) { // three octets *(result++) = static_cast((cp >> 12) | 0xe0); *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); *(result++) = static_cast((cp & 0x3f) | 0x80); } else { // four octets *(result++) = static_cast((cp >> 18) | 0xf0); *(result++) = static_cast(((cp >> 12) & 0x3f)| 0x80); *(result++) = static_cast(((cp >> 6) & 0x3f) | 0x80); *(result++) = static_cast((cp & 0x3f) | 0x80); } return result; } template uint32_t next(octet_iterator& it) { uint32_t cp = internal::mask8(*it); typename std::iterator_traits::difference_type length = utf8::internal::sequence_length(it); switch (length) { case 1: break; case 2: it++; cp = ((cp << 6) & 0x7ff) + ((*it) & 0x3f); break; case 3: ++it; cp = ((cp << 12) & 0xffff) + ((internal::mask8(*it) << 6) & 0xfff); ++it; cp += (*it) & 0x3f; break; case 4: ++it; cp = ((cp << 18) & 0x1fffff) + ((internal::mask8(*it) << 12) & 0x3ffff); ++it; cp += (internal::mask8(*it) << 6) & 0xfff; ++it; cp += (*it) & 0x3f; break; } ++it; return cp; } template uint32_t peek_next(octet_iterator it) { return next(it); } template uint32_t prior(octet_iterator& it) { while (internal::is_trail(*(--it))) ; octet_iterator temp = it; return next(temp); } // Deprecated in versions that include prior, but only for the sake of consistency (see utf8::previous) template inline uint32_t previous(octet_iterator& it) { return prior(it); } template void advance (octet_iterator& it, distance_type n) { for (distance_type i = 0; i < n; ++i) next(it); } template typename std::iterator_traits::difference_type distance (octet_iterator first, octet_iterator last) { typename std::iterator_traits::difference_type dist; for (dist = 0; first < last; ++dist) next(first); return dist; } template octet_iterator utf16to8 (u16bit_iterator start, u16bit_iterator end, octet_iterator result) { while (start != end) { uint32_t cp = internal::mask16(*start++); // Take care of surrogate pairs first if (internal::is_lead_surrogate(cp)) { uint32_t trail_surrogate = internal::mask16(*start++); cp = (cp << 10) + trail_surrogate + internal::SURROGATE_OFFSET; } result = append(cp, result); } return result; } template u16bit_iterator utf8to16 (octet_iterator start, octet_iterator end, u16bit_iterator result) { while (start < end) { uint32_t cp = next(start); if (cp > 0xffff) { //make a surrogate pair *result++ = static_cast((cp >> 10) + internal::LEAD_OFFSET); *result++ = static_cast((cp & 0x3ff) + internal::TRAIL_SURROGATE_MIN); } else *result++ = static_cast(cp); } return result; } template octet_iterator utf32to8 (u32bit_iterator start, u32bit_iterator end, octet_iterator result) { while (start != end) result = append(*(start++), result); return result; } template u32bit_iterator utf8to32 (octet_iterator start, octet_iterator end, u32bit_iterator result) { while (start < end) (*result++) = next(start); return result; } // The iterator class template class iterator : public std::iterator { octet_iterator it; public: iterator () {}; explicit iterator (const octet_iterator& octet_it): it(octet_it) {} // the default "big three" are OK octet_iterator base () const { return it; } uint32_t operator * () const { octet_iterator temp = it; return next(temp); } bool operator == (const iterator& rhs) const { return (it == rhs.it); } bool operator != (const iterator& rhs) const { return !(operator == (rhs)); } iterator& operator ++ () { std::advance(it, internal::sequence_length(it)); return *this; } iterator operator ++ (int) { iterator temp = *this; std::advance(it, internal::sequence_length(it)); return temp; } iterator& operator -- () { prior(it); return *this; } iterator operator -- (int) { iterator temp = *this; prior(it); return temp; } }; // class iterator } // namespace utf8::unchecked } // namespace utf8 #endif // header guard passenger-4.0.37/ext/common/ApplicationPool2/AppTypes.cpp000644 000765 000024 00000006272 12233035540 023743 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include namespace Passenger { namespace ApplicationPool2 { // Don't forget to update ApplicationPool2::Options::getStartCommand() too. const AppTypeDefinition appTypeDefinitions[] = { { PAT_RACK, "rack", "config.ru", "Passenger RackApp" }, { PAT_WSGI, "wsgi", "passenger_wsgi.py", "Passenger WsgiApp" }, { PAT_CLASSIC_RAILS, "classic-rails", "config/environment.rb", "Passenger ClassicRailsApp" }, { PAT_NODE, "node", "app.js", "Passenger NodeApp" }, { PAT_METEOR, "meteor", ".meteor", "Passenger MeteorApp" }, { PAT_NONE, NULL, NULL, NULL } }; } // namespace ApplicationPool2 } // namespace Passenger using namespace Passenger; using namespace Passenger::ApplicationPool2; PP_AppTypeDetector * pp_app_type_detector_new() { try { return new AppTypeDetector(); } catch (const std::bad_alloc &) { return 0; } } void pp_app_type_detector_free(PP_AppTypeDetector *detector) { delete (AppTypeDetector *) detector; } PassengerAppType pp_app_type_detector_check_document_root(PP_AppTypeDetector *_detector, const char *documentRoot, unsigned int len, int resolveFirstSymlink, PP_Error *error) { AppTypeDetector *detector = (AppTypeDetector *) _detector; try { return detector->checkDocumentRoot(StaticString(documentRoot, len), resolveFirstSymlink); } catch (const std::exception &e) { pp_error_set(e, error); return PAT_ERROR; } } PassengerAppType pp_app_type_detector_check_app_root(PP_AppTypeDetector *_detector, const char *appRoot, unsigned int len, PP_Error *error) { AppTypeDetector *detector = (AppTypeDetector *) _detector; try { return detector->checkAppRoot(StaticString(appRoot, len)); } catch (const std::exception &e) { pp_error_set(e, error); return PAT_ERROR; } } const char * pp_get_app_type_name(PassengerAppType type) { return getAppTypeName(type); } PassengerAppType pp_get_app_type2(const char *name, unsigned int len) { return getAppType(StaticString(name, len)); } passenger-4.0.37/ext/common/ApplicationPool2/AppTypes.h000644 000765 000024 00000016610 12233035540 023405 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL2_APP_TYPES_H_ #define _PASSENGER_APPLICATION_POOL2_APP_TYPES_H_ /** * Application type registry * * All supported application types (e.g. Rack, classic Rails, WSGI, etc) * are registered here. The AppTypeDetector is responsible for checking * what kind of application lives under the given directory. */ #include "../Exceptions.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef enum { PAT_RACK, PAT_WSGI, PAT_CLASSIC_RAILS, PAT_NODE, PAT_METEOR, PAT_NONE, PAT_ERROR } PassengerAppType; typedef void PP_AppTypeDetector; PP_AppTypeDetector *pp_app_type_detector_new(); void pp_app_type_detector_free(PP_AppTypeDetector *detector); PassengerAppType pp_app_type_detector_check_document_root(PP_AppTypeDetector *detector, const char *documentRoot, unsigned int len, int resolveFirstSymlink, PP_Error *error); PassengerAppType pp_app_type_detector_check_app_root(PP_AppTypeDetector *detector, const char *appRoot, unsigned int len, PP_Error *error); const char *pp_get_app_type_name(PassengerAppType type); PassengerAppType pp_get_app_type2(const char *name, unsigned int len); #ifdef __cplusplus } #endif /* __cplusplus */ #ifdef __cplusplus #include #include #include #include #include #include #include #include #include #include namespace Passenger { namespace ApplicationPool2 { using namespace std; struct AppTypeDefinition { const PassengerAppType type; const char * const name; const char * const startupFile; const char * const processTitle; }; extern const AppTypeDefinition appTypeDefinitions[]; class AppTypeDetector { private: CachedFileStat *cstat; unsigned int throttleRate; bool ownsCstat; bool check(char *buf, const char *end, const StaticString &appRoot, const char *name) { char *pos = buf; pos = appendData(pos, end, appRoot); pos = appendData(pos, end, "/"); pos = appendData(pos, end, name); if (OXT_UNLIKELY(pos == end)) { TRACE_POINT(); throw RuntimeException("Not enough buffer space"); } return getFileType(StaticString(buf, pos - buf), cstat, throttleRate) != FT_NONEXISTANT; } public: AppTypeDetector() { cstat = new CachedFileStat(); ownsCstat = true; throttleRate = 1; } AppTypeDetector(CachedFileStat *_cstat, unsigned int _throttleRate) { cstat = _cstat; ownsCstat = false; throttleRate = _throttleRate; } ~AppTypeDetector() { if (ownsCstat) { delete cstat; } } /** * Given a web server document root (that is, some subdirectory under the * application root, e.g. "/webapps/foobar/public"), returns the type of * application that lives there. Returns PAT_NONE if it wasn't able to detect * a supported application type. * * If `resolveFirstSymlink` is given, and `documentRoot` is a symlink, then * this function will check the parent directory * of the directory that the symlink points to (i.e. `resolve(documentRoot) + "/.."`), * instead of checking the directory that the symlink is located in (i.e. * `dirname(documentRoot)`). * * If `appRoot` is non-NULL, then the inferred application root will be stored here. * * @throws FileSystemException Unable to check because of a filesystem error. * @throws TimeRetrievalException * @throws boost::thread_interrupted */ PassengerAppType checkDocumentRoot(const StaticString &documentRoot, bool resolveFirstSymlink = false, string *appRoot = NULL) { if (!resolveFirstSymlink) { if (appRoot != NULL) { *appRoot = extractDirNameStatic(documentRoot); return checkAppRoot(*appRoot); } else { return checkAppRoot(extractDirNameStatic(documentRoot)); } } else { if (OXT_UNLIKELY(documentRoot.size() > PATH_MAX)) { TRACE_POINT(); throw RuntimeException("Not enough buffer space"); } char ntDocRoot[PATH_MAX + 1]; memcpy(ntDocRoot, documentRoot.data(), documentRoot.size()); ntDocRoot[documentRoot.size()] = '\0'; string resolvedDocumentRoot = resolveSymlink(ntDocRoot); if (appRoot != NULL) { *appRoot = extractDirNameStatic(resolvedDocumentRoot); return checkAppRoot(*appRoot); } else { return checkAppRoot(extractDirNameStatic(resolvedDocumentRoot)); } } } /** * Returns the type of application that lives under the application * directory `appRoot`. Returns PAT_NONE if it wasn't able to detect * a supported application type. * * @throws FileSystemException Unable to check because of a filesystem error. * @throws TimeRetrievalException * @throws boost::thread_interrupted */ PassengerAppType checkAppRoot(const StaticString &appRoot) { char buf[PATH_MAX + 32]; const char *end = buf + sizeof(buf) - 1; const AppTypeDefinition *definition = &appTypeDefinitions[0]; while (definition->type != PAT_NONE) { if (check(buf, end, appRoot, definition->startupFile)) { return definition->type; } definition++; } return PAT_NONE; } }; inline const char * getAppTypeName(PassengerAppType type) { const AppTypeDefinition *definition = &appTypeDefinitions[0]; while (definition->type != PAT_NONE) { if (definition->type == type) { return definition->name; } definition++; } return NULL; } inline PassengerAppType getAppType(const StaticString &name) { const AppTypeDefinition *definition = &appTypeDefinitions[0]; while (definition->type != PAT_NONE) { if (name == definition->name) { return definition->type; } definition++; } return PAT_NONE; } inline const char * getAppTypeStartupFile(PassengerAppType type) { const AppTypeDefinition *definition = &appTypeDefinitions[0]; while (definition->type != PAT_NONE) { if (definition->type == type) { return definition->startupFile; } definition++; } return NULL; } inline const char * getAppTypeProcessTitle(PassengerAppType type) { const AppTypeDefinition *definition = &appTypeDefinitions[0]; while (definition->type != PAT_NONE) { if (definition->type == type) { return definition->processTitle; } definition++; } return NULL; } } // namespace ApplicationPool2 } // namespace Passenger #endif /* __cplusplus */ #endif /* _PASSENGER_APPLICATION_POOL2_APP_TYPES_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/Common.h000644 000765 000024 00000016413 12233035540 023071 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL2_COMMON_H_ #define _PASSENGER_APPLICATION_POOL2_COMMON_H_ #include #include #include #include #include #include namespace tut { struct ApplicationPool2_PoolTest; } namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; using namespace oxt; class Pool; class SuperGroup; class Group; class Process; class Session; /** * The result of a Group::spawn() call. */ enum SpawnResult { // The spawn request has been honored. One or more processes are now being spawned. SR_OK, // A previous spawn request is still in progress, so this spawn request has been // ignored. Having said that, the desired result (increasing the number of processes // by one, within imposed constraints) will still be achieved. SR_IN_PROGRESS, // A non-rolling restart is currently in progress, so the spawn request cannot // be honored. SR_ERR_RESTARTING, // Unable to spawn a new process: the upper bound of the group process limits have // already been reached. // The group limit is checked before checking whether the pool is at full capacity, // so if you get this result then it is possible that the pool is also at full // capacity at the same time. SR_ERR_GROUP_UPPER_LIMITS_REACHED, // Unable to spawn a new process: the pool is at full capacity. Pool capacity is // checked after checking the group upper bound limits, so if you get this result // then it is guaranteed that the group upper bound limits have not been reached. SR_ERR_POOL_AT_FULL_CAPACITY }; /** * The result of a Group::attach() call. */ enum AttachResult { // Attaching succeeded. AR_OK, // Attaching failed: the upper bound of the group process limits have // already been reached. // The group limit is checked before checking whether the pool is at full capacity, // so if you get this result then it is possible that the pool is also at full // capacity at the same time. AR_GROUP_UPPER_LIMITS_REACHED, // Attaching failed: the pool is at full capacity. Pool capacity is // checked after checking the group upper bound limits, so if you get this result // then it is guaranteed that the group upper bound limits have not been reached. AR_POOL_AT_FULL_CAPACITY, // Attaching failed: another group is waiting for capacity, while this group is // not waiting for capacity. You should throw away the current process and let the // other group spawn, e.g. by calling `pool->possiblySpawnMoreProcessesForExistingGroups()`. // This is checked after checking for the group upper bound limits and the pool // capacity, so if you get this result then there is guaranteed to be capacity // in the current group and in the pool. AR_ANOTHER_GROUP_IS_WAITING_FOR_CAPACITY }; /** * The result of a Pool::disableProcess/Group::disable() call. Some values are only * returned by the functions, some values are only passed to the Group::disable() * callback, some values appear in all cases. */ enum DisableResult { // The process has been successfully disabled. // Returned by functions and passed to the callback. DR_SUCCESS, // The disabling of the process was canceled before completion. // The process still exists. // Only passed to the callback. DR_CANCELED, // Nothing happened: the requested process does not exist (anymore) // or was already disabled. // Returned by functions and passed to the callback. DR_NOOP, // The disabling of the process failed: an error occurred. // Returned by functions and passed to the callback. DR_ERROR, // Indicates that the process cannot be disabled immediately // and that the callback will be called later. // Only returned by functions. DR_DEFERRED }; /** * Determines the behavior of Pool::restartGroupsByName() and Group::restart(). * Specifically, determines whether to perform a rolling restart or not. */ enum RestartMethod { // Whether a rolling restart is performed, is determined by whether rolling restart // was enabled in the web server configuration (i.e. whether group->options.rollingRestart // is already true). RM_DEFAULT, // Perform a blocking restart. group->options.rollingRestart will not be changed. RM_BLOCKING, // Perform a rolling restart. group->options.rollingRestart will not be changed. RM_ROLLING }; typedef boost::shared_ptr PoolPtr; typedef boost::shared_ptr SuperGroupPtr; typedef boost::shared_ptr GroupPtr; typedef boost::shared_ptr ProcessPtr; typedef boost::shared_ptr SessionPtr; typedef boost::shared_ptr ExceptionPtr; typedef StringMap SuperGroupMap; typedef boost::function GetCallback; typedef boost::function DisableCallback; typedef boost::function Callback; struct GetWaiter { Options options; GetCallback callback; GetWaiter(const Options &o, const GetCallback &cb) : options(o), callback(cb) { options.persist(o); } }; struct Ticket { boost::mutex syncher; boost::condition_variable cond; SessionPtr session; ExceptionPtr exception; }; struct SpawnerConfig { // Used by SmartSpawner and DirectSpawner. /** A random generator to use. */ RandomGeneratorPtr randomGenerator; // Used by DummySpawner and SpawnerFactory. unsigned int concurrency; unsigned int spawnerCreationSleepTime; unsigned int spawnTime; SpawnerConfig(const RandomGeneratorPtr &randomGenerator = RandomGeneratorPtr()) : concurrency(1), spawnerCreationSleepTime(0), spawnTime(0) { if (randomGenerator != NULL) { this->randomGenerator = randomGenerator; } else { this->randomGenerator = boost::make_shared(); } } }; typedef boost::shared_ptr SpawnerConfigPtr; ExceptionPtr copyException(const tracable_exception &e); void rethrowException(const ExceptionPtr &e); } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_COMMON_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/ComponentInfo.h000644 000765 000024 00000003332 12233035540 024413 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL2_COMPONENT_INFO_H_ #define _PASSENGER_APPLICATION_POOL2_COMPONENT_INFO_H_ #include namespace Passenger { namespace ApplicationPool2 { using namespace std; struct ComponentInfo { string name; bool isDefault; /****************/ /****************/ ComponentInfo() { isDefault = false; /******************/ } }; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_COMPONENT_INFO_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/DirectSpawner.h000644 000765 000024 00000017675 12233035540 024426 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL2_DIRECT_SPAWNER_H_ #define _PASSENGER_APPLICATION_POOL2_DIRECT_SPAWNER_H_ #include #include // for PTHREAD_STACK_MIN #include namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; using namespace oxt; class DirectSpawner: public Spawner { private: SafeLibevPtr libev; static int startBackgroundThread(void *(*mainFunction)(void *), void *arg) { // Using raw pthread API because we don't want to register such // trivial threads on the oxt::thread list. pthread_t thr; pthread_attr_t attr; size_t stack_size = 96 * 1024; unsigned long min_stack_size; bool stack_min_size_defined; bool round_stack_size; int ret; #ifdef PTHREAD_STACK_MIN // PTHREAD_STACK_MIN may not be a constant macro so we need // to evaluate it dynamically. min_stack_size = PTHREAD_STACK_MIN; stack_min_size_defined = true; #else // Assume minimum stack size is 128 KB. min_stack_size = 128 * 1024; stack_min_size_defined = false; #endif if (stack_size != 0 && stack_size < min_stack_size) { stack_size = min_stack_size; round_stack_size = !stack_min_size_defined; } else { round_stack_size = true; } if (round_stack_size) { // Round stack size up to page boundary. long page_size; #if defined(_SC_PAGESIZE) page_size = sysconf(_SC_PAGESIZE); #elif defined(_SC_PAGE_SIZE) page_size = sysconf(_SC_PAGE_SIZE); #elif defined(PAGESIZE) page_size = sysconf(PAGESIZE); #elif defined(PAGE_SIZE) page_size = sysconf(PAGE_SIZE); #else page_size = getpagesize(); #endif if (stack_size % page_size != 0) { stack_size = stack_size - (stack_size % page_size) + page_size; } } pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, 1); pthread_attr_setstacksize(&attr, stack_size); ret = pthread_create(&thr, &attr, mainFunction, arg); pthread_attr_destroy(&attr); return ret; } static void *detachProcessMain(void *arg) { this_thread::disable_syscall_interruption dsi; pid_t pid = (pid_t) (long) arg; syscalls::waitpid(pid, NULL, 0); return NULL; } void detachProcess(pid_t pid) { startBackgroundThread(detachProcessMain, (void *) (long) pid); } vector createCommand(const Options &options, const SpawnPreparationInfo &preparation, shared_array &args) const { vector startCommandArgs; string agentsDir = resourceLocator.getAgentsDir(); vector command; split(options.getStartCommand(resourceLocator), '\t', startCommandArgs); if (startCommandArgs.empty()) { throw RuntimeException("No startCommand given"); } if (shouldLoadShellEnvvars(options, preparation)) { command.push_back(preparation.shell); command.push_back(preparation.shell); command.push_back("-lc"); command.push_back("exec \"$@\""); command.push_back("SpawnPreparerShell"); } else { command.push_back(agentsDir + "/SpawnPreparer"); } command.push_back(agentsDir + "/SpawnPreparer"); command.push_back(preparation.appRoot); command.push_back(serializeEnvvarsFromPoolOptions(options)); command.push_back(startCommandArgs[0]); // Note: do not try to set a process title here. // https://code.google.com/p/phusion-passenger/issues/detail?id=855 command.push_back(startCommandArgs[0]); for (unsigned int i = 1; i < startCommandArgs.size(); i++) { command.push_back(startCommandArgs[i]); } createCommandArgs(command, args); return command; } public: DirectSpawner(const SafeLibevPtr &_libev, const ResourceLocator &_resourceLocator, const ServerInstanceDir::GenerationPtr &_generation, const SpawnerConfigPtr &_config = SpawnerConfigPtr()) : Spawner(_resourceLocator), libev(_libev) { generation = _generation; if (_config == NULL) { config = boost::make_shared(); } else { config = _config; } } virtual ProcessPtr spawn(const Options &options) { TRACE_POINT(); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; P_DEBUG("Spawning new process: appRoot=" << options.appRoot); possiblyRaiseInternalError(options); shared_array args; SpawnPreparationInfo preparation = prepareSpawn(options); vector command = createCommand(options, preparation, args); SocketPair adminSocket = createUnixSocketPair(); Pipe errorPipe = createPipe(); DebugDirPtr debugDir = boost::make_shared(preparation.uid, preparation.gid); pid_t pid; pid = syscalls::fork(); if (pid == 0) { setenv("PASSENGER_DEBUG_DIR", debugDir->getPath().c_str(), 1); purgeStdio(stdout); purgeStdio(stderr); resetSignalHandlersAndMask(); disableMallocDebugging(); int adminSocketCopy = dup2(adminSocket.first, 3); int errorPipeCopy = dup2(errorPipe.second, 4); dup2(adminSocketCopy, 0); dup2(adminSocketCopy, 1); dup2(errorPipeCopy, 2); closeAllFileDescriptors(2); setChroot(preparation); switchUser(preparation); setWorkingDirectory(preparation); execvp(args[0], (char * const *) args.get()); int e = errno; printf("!> Error\n"); printf("!> \n"); printf("Cannot execute \"%s\": %s (errno=%d)\n", command[0].c_str(), strerror(e), e); fprintf(stderr, "Cannot execute \"%s\": %s (errno=%d)\n", command[0].c_str(), strerror(e), e); fflush(stdout); fflush(stderr); _exit(1); } else if (pid == -1) { int e = errno; throw SystemException("Cannot fork a new process", e); } else { UPDATE_TRACE_POINT(); ScopeGuard guard(boost::bind(nonInterruptableKillAndWaitpid, pid)); P_DEBUG("Process forked for appRoot=" << options.appRoot << ": PID " << pid); adminSocket.first.close(); errorPipe.second.close(); NegotiationDetails details; details.preparation = &preparation; details.libev = libev; details.stderrCapturer = make_shared( errorPipe.first, pid, // The cast works around a compilation problem in Clang. (const char *) "stderr"); details.stderrCapturer->start(); details.pid = pid; details.adminSocket = adminSocket.second; details.io = BufferedIO(adminSocket.second); details.errorPipe = errorPipe.first; details.options = &options; details.debugDir = debugDir; ProcessPtr process; { this_thread::restore_interruption ri(di); this_thread::restore_syscall_interruption rsi(dsi); process = negotiateSpawn(details); } detachProcess(process->pid); guard.clear(); P_DEBUG("Process spawning done: appRoot=" << options.appRoot << ", pid=" << process->pid); return process; } } }; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_DIRECT_SPAWNER_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/DummySpawner.h000644 000765 000024 00000005367 12233035540 024302 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL2_DUMMY_SPAWNER_H_ #define _PASSENGER_APPLICATION_POOL2_DUMMY_SPAWNER_H_ #include namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; using namespace oxt; class DummySpawner: public Spawner { private: SpawnerConfigPtr config; boost::mutex lock; unsigned int count; public: unsigned int cleanCount; DummySpawner(const ResourceLocator &resourceLocator, const SpawnerConfigPtr &_config) : Spawner(resourceLocator), config(_config) { count = 0; cleanCount = 0; } virtual ProcessPtr spawn(const Options &options) { TRACE_POINT(); possiblyRaiseInternalError(options); SocketPair adminSocket = createUnixSocketPair(); SocketListPtr sockets = boost::make_shared(); sockets->add("main", "tcp://127.0.0.1:1234", "session", config->concurrency); syscalls::usleep(config->spawnTime); boost::lock_guard l(lock); count++; ProcessPtr process = boost::make_shared(SafeLibevPtr(), (pid_t) count, "gupid-" + toString(count), toString(count), adminSocket.second, FileDescriptor(), sockets, SystemTime::getUsec(), SystemTime::getUsec()); process->dummy = true; return process; } virtual bool cleanable() const { return true; } virtual void cleanup() { cleanCount++; } }; typedef boost::shared_ptr DummySpawnerPtr; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_DUMMY_SPAWNER_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/Group.h000644 000765 000024 00000133452 12233035540 022740 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2014 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL2_GROUP_H_ #define _PASSENGER_APPLICATION_POOL2_GROUP_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; using namespace oxt; /** * Except for otherwise documented parts, this class is not thread-safe, * so only access within ApplicationPool lock. */ class Group: public boost::enable_shared_from_this { // Actually private, but marked public so that unit tests can access the fields. public: friend class Pool; friend class SuperGroup; struct GetAction { GetCallback callback; SessionPtr session; }; struct DisableWaiter { ProcessPtr process; DisableCallback callback; DisableWaiter(const ProcessPtr &_process, const DisableCallback &_callback) : process(_process), callback(_callback) { } }; struct RouteResult { Process *process; bool finished; RouteResult(Process *p, bool _finished = false) : process(p), finished(_finished) { } }; /** * Protects `lifeStatus`. */ mutable boost::mutex lifetimeSyncher; /** * A Group object progresses through a life. * * Do not access directly, always use `isAlive()`/`getLifeStatus()` or * through `lifetimeSyncher`. * * Invariant: * if lifeStatus != ALIVE: * enabledCount == 0 * disablingCount == 0 * disabledCount == 0 */ enum LifeStatus { /** Up and operational. */ ALIVE, /** Being shut down. The containing SuperGroup has issued the shutdown() * command, and this Group is now waiting for all detached processes to * exit. You cannot call `get()`, `restart()` and other mutating methods * anymore, and all threads created by this Group will exit as soon * as possible. */ SHUTTING_DOWN, /** * Shut down complete. Object no longer usable. No Processes are referenced * from this Group anymore. */ SHUT_DOWN } lifeStatus; /** * A back reference to the containing SuperGroup. Should never * be NULL because a SuperGroup should outlive all its containing * Groups. * Read-only; only set during initialization. */ boost::weak_ptr superGroup; CachedFileStat cstat; FileChangeChecker fileChangeChecker; string restartFile; string alwaysRestartFile; /** Number of times a restart has been initiated so far. This is incremented immediately * in Group::restart(), and is used to abort the restarter thread that was active at the * time the restart was initiated. It's safe for the value to wrap around. */ unsigned int restartsInitiated; /** * The number of processes that are being spawned right now. * * Invariant: * if processesBeingSpawned > 0: m_spawning */ short processesBeingSpawned; /** * Whether the spawner thread is currently working. Note that even * if it's working, it doesn't necessarily mean that processes are * being spawned (i.e. that processesBeingSpawned > 0). After the * thread is done spawning a process, it will attempt to attach * the newly-spawned process to the group. During that time it's not * technically spawning anything. */ bool m_spawning; /** Whether a non-rolling restart is in progress (i.e. whether spawnThreadRealMain() * is at work). While it is in progress, it is not possible to signal the desire to * spawn new process. If spawning was already in progress when the restart was initiated, * then the spawning will abort as soon as possible. * * When rolling restarting is in progress, this flag is false. * * Invariant: * if m_restarting: processesBeingSpawned == 0 */ bool m_restarting; /** Contains the spawn loop thread and the restarter thread. */ dynamic_thread_group interruptableThreads; /** This timer scans `detachedProcesses` periodically to see * whether any of the Processes can be shut down. */ bool detachedProcessesCheckerActive; boost::condition_variable detachedProcessesCheckerCond; Callback shutdownCallback; GroupPtr selfPointer; static void _onSessionInitiateFailure(Session *session) { ProcessPtr process = session->getProcess(); assert(process != NULL); process->getGroup()->onSessionInitiateFailure(process, session); } static void _onSessionClose(Session *session) { ProcessPtr process = session->getProcess(); assert(process != NULL); process->getGroup()->onSessionClose(process, session); } static string generateSecret(const SuperGroupPtr &superGroup); void onSessionInitiateFailure(const ProcessPtr &process, Session *session); void onSessionClose(const ProcessPtr &process, Session *session); /** Returns whether it is allowed to perform a new OOBW in this group. */ bool oobwAllowed() const; /** Returns whether a new OOBW should be initiated for this process. */ bool shouldInitiateOobw(const ProcessPtr &process) const; void maybeInitiateOobw(const ProcessPtr &process); void lockAndMaybeInitiateOobw(const ProcessPtr &process, DisableResult result, GroupPtr self); void initiateOobw(const ProcessPtr &process); void spawnThreadOOBWRequest(GroupPtr self, ProcessPtr process); void initiateNextOobwRequest(); void spawnThreadMain(GroupPtr self, SpawnerPtr spawner, Options options, unsigned int restartsInitiated); void spawnThreadRealMain(const SpawnerPtr &spawner, const Options &options, unsigned int restartsInitiated); void finalizeRestart(GroupPtr self, Options options, RestartMethod method, SpawnerFactoryPtr spawnerFactory, unsigned int restartsInitiated, vector postLockActions); void startCheckingDetachedProcesses(bool immediately); void detachedProcessesCheckerMain(GroupPtr self); void wakeUpGarbageCollector(); bool poolAtFullCapacity() const; bool anotherGroupIsWaitingForCapacity() const; boost::shared_ptr findOtherGroupWaitingForCapacity() const; ProcessPtr poolForceFreeCapacity(const Group *exclude, vector &postLockActions); bool testOverflowRequestQueue() const; const ResourceLocator &getResourceLocator() const; void runAttachHooks(const ProcessPtr process) const; void runDetachHooks(const ProcessPtr process) const; void setupAttachOrDetachHook(const ProcessPtr process, HookScriptOptions &options) const; void verifyInvariants() const { // !a || b: logical equivalent of a IMPLIES b. assert(enabledCount >= 0); assert(disablingCount >= 0); assert(disabledCount >= 0); assert(enabledProcesses.empty() == (pqueue.top() == NULL)); assert(!( enabledCount == 0 && disablingCount > 0 ) || ( processesBeingSpawned > 0) ); assert(!( !m_spawning ) || ( enabledCount > 0 || disablingCount == 0 )); assert((lifeStatus == ALIVE) == (spawner != NULL)); // Verify getWaitlist invariants. assert(!( !getWaitlist.empty() ) || ( enabledProcesses.empty() || verifyNoRequestsOnGetWaitlistAreRoutable() )); assert(!( enabledProcesses.empty() && !m_spawning && !restarting() && !poolAtFullCapacity() ) || ( getWaitlist.empty() )); assert(!( !getWaitlist.empty() ) || ( !enabledProcesses.empty() || m_spawning || restarting() || poolAtFullCapacity() )); // Verify disableWaitlist invariants. assert((int) disableWaitlist.size() >= disablingCount); // Verify processesBeingSpawned, m_spawning and m_restarting. assert(!( processesBeingSpawned > 0 ) || ( m_spawning )); assert(!( m_restarting ) || ( processesBeingSpawned == 0 )); // Verify lifeStatus. LifeStatus lifeStatus = getLifeStatus(); assert(!( lifeStatus != ALIVE ) || ( enabledCount == 0 )); assert(!( lifeStatus != ALIVE ) || ( disablingCount == 0 )); assert(!( lifeStatus != ALIVE ) || ( disabledCount == 0 )); } void verifyExpensiveInvariants() const { #ifndef NDEBUG // !a || b: logical equivalent of a IMPLIES b. assert((int) enabledProcesses.size() == enabledCount); assert((int) disablingProcesses.size() == disablingCount); assert((int) disabledProcesses.size() == disabledCount); ProcessList::const_iterator it, end; end = enabledProcesses.end(); for (it = enabledProcesses.begin(); it != end; it++) { const ProcessPtr &process = *it; assert(process->enabled == Process::ENABLED); assert(process->pqHandle != NULL); assert(process->isAlive()); assert(process->oobwStatus == Process::OOBW_NOT_ACTIVE || process->oobwStatus == Process::OOBW_REQUESTED); } end = disablingProcesses.end(); for (it = disablingProcesses.begin(); it != end; it++) { const ProcessPtr &process = *it; assert(process->enabled == Process::DISABLING); assert(process->pqHandle == NULL); assert(process->isAlive()); assert(process->oobwStatus == Process::OOBW_NOT_ACTIVE || process->oobwStatus == Process::OOBW_IN_PROGRESS); } end = disabledProcesses.end(); for (it = disabledProcesses.begin(); it != end; it++) { const ProcessPtr &process = *it; assert(process->enabled == Process::DISABLED); assert(process->pqHandle == NULL); assert(process->isAlive()); assert(process->oobwStatus == Process::OOBW_NOT_ACTIVE || process->oobwStatus == Process::OOBW_IN_PROGRESS); } foreach (const ProcessPtr &process, detachedProcesses) { assert(process->enabled == Process::DETACHED); assert(process->pqHandle == NULL); } #endif } #ifndef NDEBUG bool verifyNoRequestsOnGetWaitlistAreRoutable() const { deque::const_iterator it, end = getWaitlist.end(); for (it = getWaitlist.begin(); it != end; it++) { if (route(it->options).process != NULL) { return false; } } return true; } #endif /** * Sets options for this Group. Called at creation time and at restart time. */ void resetOptions(const Options &newOptions) { options = newOptions; options.persist(newOptions); options.clearPerRequestFields(); options.groupSecret = secret; } /** * Merges some of the new options from the latest get() request into this Group. */ void mergeOptions(const Options &other) { options.maxRequests = other.maxRequests; options.minProcesses = other.minProcesses; options.statThrottleRate = other.statThrottleRate; options.maxPreloaderIdleTime = other.maxPreloaderIdleTime; } static void runAllActions(const vector &actions) { vector::const_iterator it, end = actions.end(); for (it = actions.begin(); it != end; it++) { (*it)(); } } static void doCleanupSpawner(SpawnerPtr spawner) { spawner->cleanup(); } unsigned int generateStickySessionId() { unsigned int result; while (true) { result = (unsigned int) rand(); if (findProcessWithStickySessionId(result) == NULL) { return result; } } // Never reached; shut up compiler warning. return 0; } /* Determines which process to route a get() action to. The returned process * is guaranteed to be `canBeRoutedTo()`, i.e. not totally busy. * * A request is routed to an enabled processes, or if there are none, * from a disabling process. The rationale is as follows: * If there are no enabled process, then waiting for one to spawn is too * expensive. The next best thing is to route to disabling processes * until more processes have been spawned. */ RouteResult route(const Options &options) const { if (OXT_LIKELY(enabledCount > 0)) { if (options.stickySessionId == 0) { if (pqueue.top()->canBeRoutedTo()) { return RouteResult(pqueue.top()); } else { return RouteResult(NULL, true); } } else { Process *process = findProcessWithStickySessionId(options.stickySessionId); if (process != NULL) { if (process->canBeRoutedTo()) { return RouteResult(process); } else { return RouteResult(NULL, false); } } else if (pqueue.top()->canBeRoutedTo()) { return RouteResult(pqueue.top()); } else { return RouteResult(NULL, true); } } } else { Process *process = findProcessWithLowestBusyness(disablingProcesses); if (process->canBeRoutedTo()) { return RouteResult(process); } else { return RouteResult(NULL, true); } } } SessionPtr newSession(Process *process) { SessionPtr session = process->newSession(); session->onInitiateFailure = _onSessionInitiateFailure; session->onClose = _onSessionClose; if (process->enabled == Process::ENABLED) { if (process == pqueue.top()) { pqueue.pop(); } else { pqueue.erase(process->pqHandle); } process->pqHandle = pqueue.push(process, process->busyness()); } return session; } bool pushGetWaiter(const Options &newOptions, const GetCallback &callback) { if (OXT_LIKELY(!testOverflowRequestQueue() && (newOptions.maxRequestQueueSize == 0 || getWaitlist.size() < newOptions.maxRequestQueueSize))) { getWaitlist.push_back(GetWaiter(newOptions.copyAndPersist().clearLogger(), callback)); return true; } else { P_WARN("Request queue is full. Returning an error"); callback(SessionPtr(), boost::make_shared()); return false; } } Process *findProcessWithStickySessionId(unsigned int id) const { ProcessList::const_iterator it, end = enabledProcesses.end(); for (it = enabledProcesses.begin(); it != end; it++) { Process *process = it->get(); if (process->stickySessionId == id) { return process; } } return NULL; } Process *findProcessWithLowestBusyness(const ProcessList &processes) const { Process *result = NULL; ProcessList::const_iterator it, end = processes.end(); for (it = processes.begin(); it != end; it++) { Process *process = it->get(); if (result == NULL || process->busyness() < result->busyness()) { result = process; } } return result; } /** * Removes a process to the given list (enabledProcess, disablingProcesses, disabledProcesses). * This function does not fix getWaitlist invariants or other stuff. */ void removeProcessFromList(const ProcessPtr &process, ProcessList &source) { ProcessPtr p = process; // Keep an extra reference count just in case. source.erase(process->it); switch (process->enabled) { case Process::ENABLED: assert(&source == &enabledProcesses); enabledCount--; pqueue.erase(process->pqHandle); process->pqHandle = NULL; break; case Process::DISABLING: assert(&source == &disablingProcesses); disablingCount--; break; case Process::DISABLED: assert(&source == &disabledProcesses); disabledCount--; break; case Process::DETACHED: assert(&source == &detachedProcesses); break; default: P_BUG("Unknown 'enabled' state " << (int) process->enabled); } } /** * Adds a process to the given list (enabledProcess, disablingProcesses, disabledProcesses) * and sets the process->enabled flag accordingly. * The process must currently not be in any list. This function does not fix * getWaitlist invariants or other stuff. */ void addProcessToList(const ProcessPtr &process, ProcessList &destination) { destination.push_back(process); process->it = destination.last_iterator(); if (&destination == &enabledProcesses) { process->enabled = Process::ENABLED; process->pqHandle = pqueue.push(process.get(), process->busyness()); enabledCount++; } else if (&destination == &disablingProcesses) { process->enabled = Process::DISABLING; disablingCount++; } else if (&destination == &disabledProcesses) { assert(process->sessions == 0); process->enabled = Process::DISABLED; disabledCount++; } else if (&destination == &detachedProcesses) { assert(process->isAlive()); process->enabled = Process::DETACHED; process->abortLongRunningConnections(); } else { P_BUG("Unknown destination list"); } } template void assignSessionsToGetWaitersQuickly(Lock &lock) { if (getWaitlist.empty()) { verifyInvariants(); lock.unlock(); return; } SmallVector actions; unsigned int i = 0; bool done = false; actions.reserve(getWaitlist.size()); while (!done && i < getWaitlist.size()) { const GetWaiter &waiter = getWaitlist[i]; RouteResult result = route(waiter.options); if (result.process != NULL) { GetAction action; action.callback = waiter.callback; action.session = newSession(result.process); getWaitlist.erase(getWaitlist.begin() + i); actions.push_back(action); } else { done = result.finished; if (!result.finished) { i++; } } } verifyInvariants(); lock.unlock(); SmallVector::const_iterator it, end = actions.end(); for (it = actions.begin(); it != end; it++) { it->callback(it->session, ExceptionPtr()); } } void assignSessionsToGetWaiters(vector &postLockActions) { unsigned int i = 0; bool done = false; while (!done && i < getWaitlist.size()) { const GetWaiter &waiter = getWaitlist[i]; RouteResult result = route(waiter.options); if (result.process != NULL) { postLockActions.push_back(boost::bind( waiter.callback, newSession(result.process), ExceptionPtr())); getWaitlist.erase(getWaitlist.begin() + i); } else { done = result.finished; if (!result.finished) { i++; } } } } void enableAllDisablingProcesses(vector &postLockActions) { P_DEBUG("Enabling all DISABLING processes with result DR_ERROR"); deque::iterator it, end = disableWaitlist.end(); for (it = disableWaitlist.begin(); it != end; it++) { const DisableWaiter &waiter = *it; const ProcessPtr process = waiter.process; // A process can appear multiple times in disableWaitlist. assert(process->enabled == Process::DISABLING || process->enabled == Process::ENABLED); if (process->enabled == Process::DISABLING) { removeProcessFromList(process, disablingProcesses); addProcessToList(process, enabledProcesses); P_DEBUG("Enabled process " << process->inspect()); } } clearDisableWaitlist(DR_ERROR, postLockActions); } void removeFromDisableWaitlist(const ProcessPtr &p, DisableResult result, vector &postLockActions) { deque::const_iterator it, end = disableWaitlist.end(); deque newList; for (it = disableWaitlist.begin(); it != end; it++) { const DisableWaiter &waiter = *it; const ProcessPtr process = waiter.process; if (process == p) { postLockActions.push_back(boost::bind(waiter.callback, p, result)); } else { newList.push_back(waiter); } } disableWaitlist = newList; } void clearDisableWaitlist(DisableResult result, vector &postLockActions) { // This function may be called after processes in the disableWaitlist // have been disabled or enabled, so do not assume any value for // waiter.process->enabled in this function. postLockActions.reserve(postLockActions.size() + disableWaitlist.size()); while (!disableWaitlist.empty()) { const DisableWaiter &waiter = disableWaitlist.front(); postLockActions.push_back(boost::bind(waiter.callback, waiter.process, result)); disableWaitlist.pop_front(); } } bool shutdownCanFinish() const { return getLifeStatus() == SHUTTING_DOWN && enabledCount == 0 && disablingCount == 0 && disabledCount == 0 && detachedProcesses.empty(); } static void interruptAndJoinAllThreads(GroupPtr self) { self->interruptableThreads.interrupt_and_join_all(); } /** One of the post lock actions can potentially perform a long-running * operation, so running them in a thread is advised. */ void finishShutdown(vector &postLockActions) { TRACE_POINT(); assert(getLifeStatus() == SHUTTING_DOWN); P_DEBUG("Finishing shutdown of group " << name); if (shutdownCallback) { postLockActions.push_back(shutdownCallback); shutdownCallback = Callback(); } postLockActions.push_back(boost::bind(interruptAndJoinAllThreads, shared_from_this())); { boost::lock_guard l(lifetimeSyncher); lifeStatus = SHUT_DOWN; } selfPointer.reset(); } public: Options options; /** This name uniquely identifies this Group within its Pool. It can also be used as the display name. */ const string name; /** A secret token that may be known among all processes in this Group. Used for securing * intra-group process communication. */ const string secret; ComponentInfo componentInfo; /** * Processes are categorized as enabled, disabling or disabled. * * - get() requests should go to enabled processes. * - Disabling processes are allowed to finish their current requests, * but they generally will not receive any new requests. The only * exception is when there are no enabled processes. In this case, * a new process will be spawned while in the mean time all requests * go to one of the disabling processes. Disabling processes become * disabled as soon as they finish all their requests and there are * enabled processes. * - Disabled processes never handle requests. * * 'enabledProcesses', 'disablingProcesses' and 'disabledProcesses' contain * all enabled, disabling and disabling processes in this group, respectively. * 'enabledCount', 'disablingCount' and 'disabledCount' are used to maintain * their numbers. * These lists do not intersect. A process is in exactly 1 list. * * 'pqueue' orders all enabled processes according to busyness() values, * from small to large. * * Invariants: * enabledCount >= 0 * disablingCount >= 0 * disabledCount >= 0 * enabledProcesses.size() == enabledCount * disablingProcesses.size() == disabingCount * disabledProcesses.size() == disabledCount * * enabledProcesses.empty() == (pqueue.top() == NULL) * * if (enabledCount == 0): * processesBeingSpawned > 0 || restarting() || poolAtFullCapacity() * if (enabledCount == 0) and (disablingCount > 0): * processesBeingSpawned > 0 * if !m_spawning: * (enabledCount > 0) || (disablingCount == 0) * * if pqueue.top().isTotallyBusy(): * All enabled processes are totally busy. * * for all process in enabledProcesses: * process.enabled == Process::ENABLED * process.pqHandle != NULL * process.isAlive() * process.oobwStatus == Process::OOBW_NOT_ACTIVE || process.oobwStatus == Process::OOBW_REQUESTED * for all processes in disablingProcesses: * process.enabled == Process::DISABLING * process.pqHandle == NULL * process.isAlive() * process.oobwStatus == Process::OOBW_NOT_ACTIVE || process.oobwStatus == Process::OOBW_IN_PROGRESS * for all process in disabledProcesses: * process.enabled == Process::DISABLED * process.pqHandle == NULL * process.isAlive() * process.oobwStatus == Process::OOBW_NOT_ACTIVE || process.oobwStatus == Process::OOBW_IN_PROGRESS */ int enabledCount; int disablingCount; int disabledCount; PriorityQueue pqueue; ProcessList enabledProcesses; ProcessList disablingProcesses; ProcessList disabledProcesses; /** * When a process is detached, it is stored here until we've confirmed * that the OS process has exited. * * for all process in detachedProcesses: * process.enabled == Process::DETACHED * process.pqHandle == NULL */ ProcessList detachedProcesses; /** * get() requests for this group that cannot be immediately satisfied are * put on this wait list, which must be processed as soon as the necessary * resources have become free. * * ### Invariant 1 (safety) * * If requests are queued in the getWaitlist, then that's because there are * no processes that can serve them. * * if getWaitlist is non-empty: * enabledProcesses.empty() || (no request in getWaitlist is routeable) * * Here, "routeable" is defined as `route(options).process != NULL`. * * ### Invariant 2 (progress) * * The only reason why there are no enabled processes, while at the same time we're * not spawning or waiting for pool capacity, is because there is nothing to do. * * if enabledProcesses.empty() && !m_spawning && !restarting() && !poolAtFullCapacity(): * getWaitlist is empty * * Equivalently: * If requests are queued in the getWaitlist, then either we have processes that can process * them (some time in the future), or we're actively trying to spawn processes, unless we're * unable to do that because of resource limits. * * if getWaitlist is non-empty: * !enabledProcesses.empty() || m_spawning || restarting() || poolAtFullCapacity() */ deque getWaitlist; /** * Disable() commands that couldn't finish immediately will put their callbacks * in this queue. Note that there may be multiple DisableWaiters pointing to the * same Process. * * Invariant: * disableWaitlist.size() >= disablingCount */ deque disableWaitlist; /** * Invariant: * (lifeStatus == ALIVE) == (spawner != NULL) */ SpawnerPtr spawner; /******************************************** * Constructors and destructors ********************************************/ Group(const SuperGroupPtr &superGroup, const Options &options, const ComponentInfo &info); ~Group(); /** * Must be called before destroying a Group. You can optionally provide a * callback so that you are notified when shutdown has finished. * * The caller is responsible for migrating waiters on the getWaitlist. * * One of the post lock actions can potentially perform a long-running * operation, so running them in a thread is advised. */ void shutdown(const Callback &callback, vector &postLockActions) { assert(isAlive()); P_DEBUG("Begin shutting down group " << name); shutdownCallback = callback; detachAll(postLockActions); startCheckingDetachedProcesses(true); interruptableThreads.interrupt_all(); postLockActions.push_back(boost::bind(doCleanupSpawner, spawner)); spawner.reset(); selfPointer = shared_from_this(); assert(disableWaitlist.empty()); { boost::lock_guard l(lifetimeSyncher); lifeStatus = SHUTTING_DOWN; } } /******************************************** * Life time and back-reference methods ********************************************/ /** * Thread-safe. * @pre getLifeState() != SHUT_DOWN * @post result != NULL */ SuperGroupPtr getSuperGroup() const { return superGroup.lock(); } void setSuperGroup(const SuperGroupPtr &superGroup) { assert(this->superGroup.lock() == NULL); this->superGroup = superGroup; } /** * Thread-safe. * @pre getLifeState() != SHUT_DOWN * @post result != NULL */ PoolPtr getPool() const; // Thread-safe. bool isAlive() const { boost::lock_guard lock(lifetimeSyncher); return lifeStatus == ALIVE; } // Thread-safe. LifeStatus getLifeStatus() const { boost::lock_guard lock(lifetimeSyncher); return lifeStatus; } /******************************************** * Core methods ********************************************/ SessionPtr get(const Options &newOptions, const GetCallback &callback, vector &postLockActions) { assert(isAlive()); if (OXT_LIKELY(!restarting())) { if (OXT_UNLIKELY(needsRestart(newOptions))) { restart(newOptions); } else { mergeOptions(newOptions); } if (OXT_UNLIKELY(!newOptions.noop && shouldSpawnForGetAction())) { // If we're trying to spawn the first process for this group, and // spawning failed because the pool is at full capacity, then we // try to kill some random idle process in the pool and try again. if (spawn() == SR_ERR_POOL_AT_FULL_CAPACITY && enabledCount == 0) { P_INFO("Unable to spawn the the sole process for group " << name << " because the max pool size has been reached. Trying " << "to shutdown another idle process to free capacity..."); if (poolForceFreeCapacity(this, postLockActions) != NULL) { SpawnResult result = spawn(); assert(result == SR_OK); (void) result; } else { P_INFO("There are no processes right now that are eligible " "for shutdown. Will try again later."); } } } } if (OXT_UNLIKELY(newOptions.noop)) { ProcessPtr process = boost::make_shared(SafeLibevPtr(), 0, string(), string(), FileDescriptor(), FileDescriptor(), SocketListPtr(), 0, 0); process->dummy = true; process->requiresShutdown = false; process->setGroup(shared_from_this()); return boost::make_shared(process, (Socket *) NULL); } if (OXT_UNLIKELY(enabledCount == 0)) { /* We don't have any processes yet, but they're on the way. * * We have some choices here. If there are disabling processes * then we generally want to use them, except: * - When non-rolling restarting because those disabling processes * are from the old version. * - When all disabling processes are totally busy. * * Whenever a disabling process cannot be used, call the callback * after a process has been spawned or has failed to spawn, or * when a disabling process becomes available. */ assert(m_spawning || restarting() || poolAtFullCapacity()); if (disablingCount > 0 && !restarting()) { Process *process = findProcessWithLowestBusyness( disablingProcesses); assert(process != NULL); if (!process->isTotallyBusy()) { return newSession(process); } } if (pushGetWaiter(newOptions, callback)) { P_DEBUG("No session checked out yet: group is spawning or restarting"); } return SessionPtr(); } else { RouteResult result = route(newOptions); if (result.process == NULL) { /* Looks like all processes are totally busy. * Wait until a new one has been spawned or until * resources have become free. */ if (pushGetWaiter(newOptions, callback)) { P_DEBUG("No session checked out yet: all processes are at full capacity"); } return SessionPtr(); } else { P_DEBUG("Session checked out from process " << result.process->inspect()); return newSession(result.process); } } } /******************************************** * State mutation methods ********************************************/ // Thread-safe, but only call outside the pool lock! void requestOOBW(const ProcessPtr &process); /** * Attaches the given process to this Group and mark it as enabled. This * function doesn't touch `getWaitlist` so be sure to fix its invariants * afterwards if necessary, e.g. by calling `assignSessionsToGetWaiters()`. */ AttachResult attach(const ProcessPtr &process, vector &postLockActions) { assert(process->getGroup() == NULL || process->getGroup().get() == this); assert(process->isAlive()); assert(isAlive()); if (processUpperLimitsReached()) { return AR_GROUP_UPPER_LIMITS_REACHED; } else if (poolAtFullCapacity()) { return AR_POOL_AT_FULL_CAPACITY; } else if (!isWaitingForCapacity() && anotherGroupIsWaitingForCapacity()) { return AR_ANOTHER_GROUP_IS_WAITING_FOR_CAPACITY; } process->setGroup(shared_from_this()); process->stickySessionId = generateStickySessionId(); P_DEBUG("Attaching process " << process->inspect()); addProcessToList(process, enabledProcesses); /* Now that there are enough resources, relevant processes in * 'disableWaitlist' can be disabled. */ deque::const_iterator it, end = disableWaitlist.end(); deque newDisableWaitlist; for (it = disableWaitlist.begin(); it != end; it++) { const DisableWaiter &waiter = *it; const ProcessPtr process2 = waiter.process; // The same process can appear multiple times in disableWaitlist. assert(process2->enabled == Process::DISABLING || process2->enabled == Process::DISABLED); if (process2->sessions == 0) { if (process2->enabled == Process::DISABLING) { P_DEBUG("Disabling DISABLING process " << process2->inspect() << "; disable command succeeded immediately"); removeProcessFromList(process2, disablingProcesses); addProcessToList(process2, disabledProcesses); } else { P_DEBUG("Disabling (already disabled) DISABLING process " << process2->inspect() << "; disable command succeeded immediately"); } postLockActions.push_back(boost::bind(waiter.callback, process2, DR_SUCCESS)); } else { newDisableWaitlist.push_back(waiter); } } disableWaitlist = newDisableWaitlist; // Update GC sleep timer. wakeUpGarbageCollector(); postLockActions.push_back(boost::bind(&Group::runAttachHooks, this, process)); return AR_OK; } /** * Detaches the given process from this Group. This function doesn't touch * getWaitlist so be sure to fix its invariants afterwards if necessary. * `pool->detachProcessUnlocked()` does that so you should usually use * that method over this one. */ void detach(const ProcessPtr &process, vector &postLockActions) { assert(process->getGroup().get() == this); assert(process->isAlive()); assert(isAlive()); const ProcessPtr p = process; // Keep an extra reference just in case. P_DEBUG("Detaching process " << process->inspect()); if (process->enabled == Process::ENABLED || process->enabled == Process::DISABLING) { assert(enabledCount > 0 || disablingCount > 0); if (process->enabled == Process::ENABLED) { removeProcessFromList(process, enabledProcesses); } else { removeProcessFromList(process, disablingProcesses); removeFromDisableWaitlist(process, DR_NOOP, postLockActions); } } else { assert(!disabledProcesses.empty()); removeProcessFromList(process, disabledProcesses); } addProcessToList(process, detachedProcesses); startCheckingDetachedProcesses(false); postLockActions.push_back(boost::bind(&Group::runDetachHooks, this, process)); } /** * Detaches all processes from this Group. This function doesn't touch * getWaitlist so be sure to fix its invariants afterwards if necessary. */ void detachAll(vector &postLockActions) { assert(isAlive()); P_DEBUG("Detaching all processes in group " << name); foreach (ProcessPtr process, enabledProcesses) { addProcessToList(process, detachedProcesses); process->pqHandle = NULL; } foreach (ProcessPtr process, disablingProcesses) { addProcessToList(process, detachedProcesses); } foreach (ProcessPtr process, disabledProcesses) { addProcessToList(process, detachedProcesses); } enabledProcesses.clear(); disablingProcesses.clear(); disabledProcesses.clear(); pqueue.clear(); enabledCount = 0; disablingCount = 0; disabledCount = 0; clearDisableWaitlist(DR_NOOP, postLockActions); startCheckingDetachedProcesses(false); } /** * Marks the given process as enabled. This function doesn't touch getWaitlist * so be sure to fix its invariants afterwards if necessary. */ void enable(const ProcessPtr &process, vector &postLockActions) { assert(process->getGroup().get() == this); assert(process->isAlive()); assert(isAlive()); if (process->enabled == Process::DISABLING) { P_DEBUG("Enabling DISABLING process " << process->inspect()); removeProcessFromList(process, disablingProcesses); addProcessToList(process, enabledProcesses); removeFromDisableWaitlist(process, DR_CANCELED, postLockActions); } else if (process->enabled == Process::DISABLED) { P_DEBUG("Enabling DISABLED process " << process->inspect()); removeProcessFromList(process, disabledProcesses); addProcessToList(process, enabledProcesses); } else { P_DEBUG("Enabling ENABLED process " << process->inspect()); } } /** * Marks the given process as disabled. Returns DR_SUCCESS, DR_DEFERRED * or DR_NOOP. If the result is DR_DEFERRED, then the callback will be * called later with the result of this action. */ DisableResult disable(const ProcessPtr &process, const DisableCallback &callback) { assert(process->getGroup().get() == this); assert(process->isAlive()); assert(isAlive()); if (process->enabled == Process::ENABLED) { P_DEBUG("Disabling ENABLED process " << process->inspect() << "; enabledCount=" << enabledCount << ", process.sessions=" << process->sessions); assert(enabledCount >= 0); if (enabledCount == 1 && !allowSpawn()) { P_WARN("Cannot disable sole enabled process in group " << name << " because spawning is not allowed according to the current" << " configuration options"); return DR_ERROR; } else if (enabledCount <= 1 || process->sessions > 0) { removeProcessFromList(process, enabledProcesses); addProcessToList(process, disablingProcesses); disableWaitlist.push_back(DisableWaiter(process, callback)); if (enabledCount == 0) { /* All processes are going to be disabled, so in order * to avoid blocking requests we first spawn a new process * and disable this process after the other one is done * spawning. We do this irregardless of resource limits * because this is an exceptional situation. */ P_DEBUG("Spawning a new process to avoid the disable action from blocking requests"); spawn(); } P_DEBUG("Deferring disable command completion"); return DR_DEFERRED; } else { removeProcessFromList(process, enabledProcesses); addProcessToList(process, disabledProcesses); P_DEBUG("Disable command succeeded immediately"); return DR_SUCCESS; } } else if (process->enabled == Process::DISABLING) { assert(disablingCount > 0); disableWaitlist.push_back(DisableWaiter(process, callback)); P_DEBUG("Disabling DISABLING process " << process->inspect() << name << "; command queued, deferring disable command completion"); return DR_DEFERRED; } else { assert(disabledCount > 0); P_DEBUG("Disabling DISABLED process " << process->inspect() << name << "; disable command succeeded immediately"); return DR_NOOP; } } /** * Attempts to increase the number of processes by one, while respecting the * resource limits. That is, this method will ensure that there are at least * `minProcesses` processes, but no more than `maxProcesses` processes, and no * more than `pool->max` processes in the entire pool. */ SpawnResult spawn() { assert(isAlive()); if (m_spawning) { return SR_IN_PROGRESS; } else if (restarting()) { return SR_ERR_RESTARTING; } else if (processUpperLimitsReached()) { return SR_ERR_GROUP_UPPER_LIMITS_REACHED; } else if (poolAtFullCapacity()) { return SR_ERR_POOL_AT_FULL_CAPACITY; } else { P_DEBUG("Requested spawning of new process for group " << name); interruptableThreads.create_thread( boost::bind(&Group::spawnThreadMain, this, shared_from_this(), spawner, options.copyAndPersist().clearPerRequestFields(), restartsInitiated), "Group process spawner: " + name, POOL_HELPER_THREAD_STACK_SIZE); m_spawning = true; processesBeingSpawned++; return SR_OK; } } void cleanupSpawner(vector &postLockActions) { assert(isAlive()); postLockActions.push_back(boost::bind(doCleanupSpawner, spawner)); } void restart(const Options &options, RestartMethod method = RM_DEFAULT); /******************************************** * Queries ********************************************/ unsigned int getProcessCount() const { return enabledCount + disablingCount + disabledCount; } /** * Returns the number of processes in this group that should be part of the * ApplicationPool process limits calculations. */ unsigned int capacityUsed() const { return enabledCount + disablingCount + disabledCount + processesBeingSpawned; } /** * Returns whether the lower bound of the group-specific process limits * have been satisfied. Note that even if the result is false, the pool limits * may not allow spawning, so you should check `pool->atFullCapacity()` too. */ bool processLowerLimitsSatisfied() const { return capacityUsed() >= options.minProcesses; } /** * Returns whether the upper bound of the group-specific process limits have * been reached, or surpassed. Does not check whether pool limits have been * reached. Use `pool->atFullCapacity()` to check for that. */ bool processUpperLimitsReached() const { return options.maxProcesses != 0 && capacityUsed() >= options.maxProcesses; } /** * Returns whether all enabled processes are totally busy. If so, another * process should be spawned, if allowed by the process limits. * Returns false if there are no enabled processes. */ bool allEnabledProcessesAreTotallyBusy() const { return enabledCount > 0 && pqueue.top()->isTotallyBusy(); } /** * Checks whether this group is waiting for capacity on the pool to * become available before it can continue processing requests. */ bool isWaitingForCapacity() const { return enabledProcesses.empty() && processesBeingSpawned == 0 && !m_restarting && !getWaitlist.empty(); } bool garbageCollectable(unsigned long long now = 0) const { /* if (now == 0) { now = SystemTime::getUsec(); } return busyness() == 0 && getWaitlist.empty() && disabledProcesses.empty() && options.getMaxPreloaderIdleTime() != 0 && now - spawner->lastUsed() > (unsigned long long) options.getMaxPreloaderIdleTime() * 1000000; */ return false; } /** Whether a new process should be spawned for this group. */ bool shouldSpawn() const; /** Whether a new process should be spawned for this group in the * specific case that another get action is to be performed. */ bool shouldSpawnForGetAction() const; /** * Whether a new process is allowed to be spawned for this group, * i.e. whether the upper processes limits have not been reached. */ bool allowSpawn() const { return isAlive() && !processUpperLimitsReached() && !poolAtFullCapacity(); } bool needsRestart(const Options &options) { if (m_restarting) { return false; } else { struct stat buf; return cstat.stat(alwaysRestartFile, &buf, options.statThrottleRate) == 0 || fileChangeChecker.changed(restartFile, options.statThrottleRate); } } bool spawning() const { return m_spawning; } bool restarting() const { return m_restarting; } template void inspectXml(Stream &stream, bool includeSecrets = true) const { ProcessList::const_iterator it; stream << "" << escapeForXml(name) << ""; stream << "" << escapeForXml(componentInfo.name) << ""; stream << "" << escapeForXml(options.appRoot) << ""; stream << "" << escapeForXml(options.appType) << ""; stream << "" << escapeForXml(options.environment) << ""; stream << "" << enabledCount << ""; stream << "" << disablingCount << ""; stream << "" << disabledCount << ""; stream << "" << capacityUsed() << ""; stream << "" << getWaitlist.size() << ""; stream << "" << disableWaitlist.size() << ""; stream << "" << processesBeingSpawned << ""; if (m_spawning) { stream << ""; } if (restarting()) { stream << ""; } if (includeSecrets) { stream << "" << escapeForXml(secret) << ""; } switch (lifeStatus) { case ALIVE: stream << "ALIVE"; break; case SHUTTING_DOWN: stream << "SHUTTING_DOWN"; break; case SHUT_DOWN: stream << "SHUT_DOWN"; break; default: P_BUG("Unknown 'lifeStatus' state " << (int) lifeStatus); } stream << ""; options.toXml(stream, getResourceLocator()); stream << ""; stream << ""; for (it = enabledProcesses.begin(); it != enabledProcesses.end(); it++) { stream << ""; (*it)->inspectXml(stream, includeSecrets); stream << ""; } for (it = disablingProcesses.begin(); it != disablingProcesses.end(); it++) { stream << ""; (*it)->inspectXml(stream, includeSecrets); stream << ""; } for (it = disabledProcesses.begin(); it != disabledProcesses.end(); it++) { stream << ""; (*it)->inspectXml(stream, includeSecrets); stream << ""; } for (it = detachedProcesses.begin(); it != detachedProcesses.end(); it++) { stream << ""; (*it)->inspectXml(stream, includeSecrets); stream << ""; } stream << ""; } }; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_GROUP_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/Implementation.cpp000644 000765 000024 00000121022 12233035540 025152 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2014 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; using namespace oxt; #define TRY_COPY_EXCEPTION(klass) \ do { \ const klass *ep = dynamic_cast(&e); \ if (ep != NULL) { \ return boost::make_shared(*ep); \ } \ } while (false) ExceptionPtr copyException(const tracable_exception &e) { TRY_COPY_EXCEPTION(FileSystemException); TRY_COPY_EXCEPTION(TimeRetrievalException); TRY_COPY_EXCEPTION(SystemException); TRY_COPY_EXCEPTION(FileNotFoundException); TRY_COPY_EXCEPTION(EOFException); TRY_COPY_EXCEPTION(IOException); TRY_COPY_EXCEPTION(ConfigurationException); TRY_COPY_EXCEPTION(RequestQueueFullException); TRY_COPY_EXCEPTION(GetAbortedException); TRY_COPY_EXCEPTION(SpawnException); TRY_COPY_EXCEPTION(InvalidModeStringException); TRY_COPY_EXCEPTION(ArgumentException); TRY_COPY_EXCEPTION(RuntimeException); TRY_COPY_EXCEPTION(TimeoutException); TRY_COPY_EXCEPTION(NonExistentUserException); TRY_COPY_EXCEPTION(NonExistentGroupException); TRY_COPY_EXCEPTION(SecurityException); TRY_COPY_EXCEPTION(SyntaxError); TRY_COPY_EXCEPTION(boost::thread_interrupted); return boost::make_shared(e); } #define TRY_RETHROW_EXCEPTION(klass) \ do { \ const klass *ep = dynamic_cast(&*e); \ if (ep != NULL) { \ throw klass(*ep); \ } \ } while (false) void rethrowException(const ExceptionPtr &e) { TRY_RETHROW_EXCEPTION(FileSystemException); TRY_RETHROW_EXCEPTION(TimeRetrievalException); TRY_RETHROW_EXCEPTION(SystemException); TRY_RETHROW_EXCEPTION(FileNotFoundException); TRY_RETHROW_EXCEPTION(EOFException); TRY_RETHROW_EXCEPTION(IOException); TRY_RETHROW_EXCEPTION(ConfigurationException); TRY_RETHROW_EXCEPTION(SpawnException); TRY_RETHROW_EXCEPTION(RequestQueueFullException); TRY_RETHROW_EXCEPTION(GetAbortedException); TRY_RETHROW_EXCEPTION(InvalidModeStringException); TRY_RETHROW_EXCEPTION(ArgumentException); TRY_RETHROW_EXCEPTION(RuntimeException); TRY_RETHROW_EXCEPTION(TimeoutException); TRY_RETHROW_EXCEPTION(NonExistentUserException); TRY_RETHROW_EXCEPTION(NonExistentGroupException); TRY_RETHROW_EXCEPTION(SecurityException); TRY_RETHROW_EXCEPTION(SyntaxError); TRY_RETHROW_EXCEPTION(boost::lock_error); TRY_RETHROW_EXCEPTION(boost::thread_resource_error); TRY_RETHROW_EXCEPTION(boost::unsupported_thread_option); TRY_RETHROW_EXCEPTION(boost::invalid_thread_argument); TRY_RETHROW_EXCEPTION(boost::thread_permission_error); TRY_RETHROW_EXCEPTION(boost::thread_interrupted); TRY_RETHROW_EXCEPTION(boost::thread_exception); TRY_RETHROW_EXCEPTION(boost::condition_error); throw tracable_exception(*e); } const SuperGroupPtr Pool::getSuperGroup(const char *name) { return superGroups.get(name); } boost::mutex & SuperGroup::getPoolSyncher(const PoolPtr &pool) { return pool->syncher; } void SuperGroup::runAllActions(const vector &actions) { Pool::runAllActions(actions); } string SuperGroup::generateSecret() const { return getPool()->randomGenerator->generateAsciiString(43); } void SuperGroup::runInitializationHooks() const { getPool()->runHookScripts("after_initialize_supergroup", boost::bind(&SuperGroup::setupInitializationOrDestructionHook, this, _1)); } void SuperGroup::runDestructionHooks() const { getPool()->runHookScripts("before_destroy_supergroup", boost::bind(&SuperGroup::setupInitializationOrDestructionHook, this, _1)); } void SuperGroup::setupInitializationOrDestructionHook(HookScriptOptions &options) const { options.environment.push_back(make_pair("PASSENGER_APP_ROOT", this->options.appRoot)); } void SuperGroup::createInterruptableThread(const boost::function &func, const string &name, unsigned int stackSize) { getPool()->interruptableThreads.create_thread(func, name, stackSize); } void SuperGroup::realDoInitialize(const Options &options, unsigned int generation) { vector componentInfos; vector::const_iterator it; ExceptionPtr exception; P_TRACE(2, "Initializing SuperGroup " << inspect() << " in the background..."); try { componentInfos = loadComponentInfos(options); } catch (const tracable_exception &e) { exception = copyException(e); } if (componentInfos.empty() && exception == NULL) { string message = "The directory " + options.appRoot + " does not seem to contain a web application."; exception = boost::make_shared( message, message, false); } PoolPtr pool = getPool(); Pool::DebugSupportPtr debug = pool->debugSupport; vector actions; { if (debug != NULL && debug->superGroup) { debug->debugger->send("About to finish SuperGroup initialization"); debug->messages->recv("Proceed with initializing SuperGroup"); } boost::unique_lock lock(getPoolSyncher(pool)); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; NOT_EXPECTING_EXCEPTIONS(); if (OXT_UNLIKELY(getPool() == NULL || generation != this->generation)) { return; } P_TRACE(2, "Initialization of SuperGroup " << inspect() << " almost done; grabbed lock"); assert(state == INITIALIZING); verifyInvariants(); if (componentInfos.empty()) { /* Somehow initialization failed. Maybe something has deleted * the supergroup files while we're working. */ assert(exception != NULL); setState(DESTROYED); actions.reserve(getWaitlist.size()); while (!getWaitlist.empty()) { const GetWaiter &waiter = getWaitlist.front(); actions.push_back(boost::bind(waiter.callback, SessionPtr(), exception)); getWaitlist.pop_front(); } } else { for (it = componentInfos.begin(); it != componentInfos.end(); it++) { const ComponentInfo &info = *it; GroupPtr group = boost::make_shared(shared_from_this(), options, info); groups.push_back(group); if (info.isDefault) { defaultGroup = group.get(); } } setState(READY); assignGetWaitlistToGroups(actions); } verifyInvariants(); P_TRACE(2, "Done initializing SuperGroup " << inspect()); } this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; runAllActions(actions); runInitializationHooks(); } void SuperGroup::realDoRestart(const Options &options, unsigned int generation) { TRACE_POINT(); vector componentInfos = loadComponentInfos(options); vector::const_iterator it; PoolPtr pool = getPool(); Pool::DebugSupportPtr debug = pool->debugSupport; if (debug != NULL && debug->superGroup) { debug->debugger->send("About to finish SuperGroup restart"); debug->messages->recv("Proceed with restarting SuperGroup"); } boost::unique_lock lock(getPoolSyncher(pool)); if (OXT_UNLIKELY(this->generation != generation)) { return; } assert(state == RESTARTING); verifyInvariants(); vector allGroups; vector updatedGroups; vector newGroups; vector::const_iterator g_it; vector actions; this->options = options; // Update the component information for existing groups. UPDATE_TRACE_POINT(); for (it = componentInfos.begin(); it != componentInfos.end(); it++) { const ComponentInfo &info = *it; pair result = findGroupCorrespondingToComponent(groups, info); GroupPtr group = result.first; if (group != NULL) { unsigned int index = result.second; group->componentInfo = info; updatedGroups.push_back(group); groups[index].reset(); } else { // This is not an existing group but a new one, // so create it. group = boost::make_shared(shared_from_this(), options, info); newGroups.push_back(group); } // allGroups must be in the same order as componentInfos. allGroups.push_back(group); } // Some components might have been deleted, so delete the // corresponding groups. detachAllGroups(groups, actions); // Tell all previous existing groups to restart. for (g_it = updatedGroups.begin(); g_it != updatedGroups.end(); g_it++) { GroupPtr group = *g_it; group->restart(options); } groups = allGroups; defaultGroup = findDefaultGroup(allGroups); setState(READY); assignGetWaitlistToGroups(actions); UPDATE_TRACE_POINT(); verifyInvariants(); lock.unlock(); runAllActions(actions); } Group::Group(const SuperGroupPtr &_superGroup, const Options &options, const ComponentInfo &info) : superGroup(_superGroup), name(_superGroup->name + "#" + info.name), secret(generateSecret(_superGroup)), componentInfo(info) { enabledCount = 0; disablingCount = 0; disabledCount = 0; spawner = getPool()->spawnerFactory->create(options); restartsInitiated = 0; processesBeingSpawned = 0; m_spawning = false; m_restarting = false; lifeStatus = ALIVE; if (options.restartDir.empty()) { restartFile = options.appRoot + "/tmp/restart.txt"; alwaysRestartFile = options.appRoot + "/tmp/always_restart.txt"; } else if (options.restartDir[0] == '/') { restartFile = options.restartDir + "/restart.txt"; alwaysRestartFile = options.restartDir + "/always_restart.txt"; } else { restartFile = options.appRoot + "/" + options.restartDir + "/restart.txt"; alwaysRestartFile = options.appRoot + "/" + options.restartDir + "/always_restart.txt"; } resetOptions(options); detachedProcessesCheckerActive = false; } Group::~Group() { LifeStatus lifeStatus = getLifeStatus(); if (OXT_UNLIKELY(lifeStatus == ALIVE)) { P_BUG("You must call Group::shutdown() before destroying a Group."); } assert(lifeStatus == SHUT_DOWN); assert(!detachedProcessesCheckerActive); } PoolPtr Group::getPool() const { return getSuperGroup()->getPool(); } void Group::onSessionInitiateFailure(const ProcessPtr &process, Session *session) { vector actions; TRACE_POINT(); // Standard resource management boilerplate stuff... PoolPtr pool = getPool(); boost::unique_lock lock(pool->syncher); assert(process->isAlive()); assert(isAlive() || getLifeStatus() == SHUTTING_DOWN); UPDATE_TRACE_POINT(); P_DEBUG("Could not initiate a session with process " << process->inspect() << ", detaching from pool if possible"); if (!pool->detachProcessUnlocked(process, actions)) { P_DEBUG("Process was already detached"); } pool->fullVerifyInvariants(); lock.unlock(); runAllActions(actions); } void Group::onSessionClose(const ProcessPtr &process, Session *session) { TRACE_POINT(); // Standard resource management boilerplate stuff... PoolPtr pool = getPool(); boost::unique_lock lock(pool->syncher); assert(process->isAlive()); assert(isAlive() || getLifeStatus() == SHUTTING_DOWN); P_TRACE(2, "Session closed for process " << process->inspect()); verifyInvariants(); UPDATE_TRACE_POINT(); /* Update statistics. */ process->sessionClosed(session); assert(process->getLifeStatus() == Process::ALIVE); assert(process->enabled == Process::ENABLED || process->enabled == Process::DISABLING || process->enabled == Process::DETACHED); if (process->enabled == Process::ENABLED) { pqueue.decrease(process->pqHandle, process->busyness()); } /* This group now has a process that's guaranteed to be not * totally busy. */ assert(!process->isTotallyBusy()); bool detachingBecauseOfMaxRequests = false; bool detachingBecauseCapacityNeeded = false; bool shouldDetach = ( detachingBecauseOfMaxRequests = ( options.maxRequests > 0 && process->processed >= options.maxRequests )) || ( detachingBecauseCapacityNeeded = ( process->sessions == 0 && getWaitlist.empty() && ( !pool->getWaitlist.empty() || anotherGroupIsWaitingForCapacity() ) ) ); bool shouldDisable = process->enabled == Process::DISABLING && process->sessions == 0 && enabledCount > 0; if (shouldDetach || shouldDisable) { vector actions; if (shouldDetach) { if (detachingBecauseCapacityNeeded) { /* Someone might be trying to get() a session for a different * group that couldn't be spawned because of lack of pool capacity. * If this group isn't under sufficiently load (as apparent by the * checked conditions) then now's a good time to detach * this process or group in order to free capacity. */ P_DEBUG("Process " << process->inspect() << " is no longer totally " "busy; detaching it in order to make room in the pool"); } else { /* This process has processed its maximum number of requests, * so we detach it. */ P_DEBUG("Process " << process->inspect() << " has reached its maximum number of requests (" << options.maxRequests << "); detaching it"); } pool->detachProcessUnlocked(process, actions); } else { removeProcessFromList(process, disablingProcesses); addProcessToList(process, disabledProcesses); removeFromDisableWaitlist(process, DR_SUCCESS, actions); maybeInitiateOobw(process); } pool->fullVerifyInvariants(); lock.unlock(); runAllActions(actions); } else { // This could change process->enabled. maybeInitiateOobw(process); if (!getWaitlist.empty() && process->enabled == Process::ENABLED) { /* If there are clients on this group waiting for a process to * become available then call them now. */ UPDATE_TRACE_POINT(); // Already calls verifyInvariants(). assignSessionsToGetWaitersQuickly(lock); } } } void Group::requestOOBW(const ProcessPtr &process) { // Standard resource management boilerplate stuff... PoolPtr pool = getPool(); boost::unique_lock lock(pool->syncher); if (isAlive() && process->isAlive() && process->oobwStatus == Process::OOBW_NOT_ACTIVE) { process->oobwStatus = Process::OOBW_REQUESTED; } } bool Group::oobwAllowed() const { unsigned int oobwInstances = 0; foreach (const ProcessPtr &process, disablingProcesses) { if (process->oobwStatus == Process::OOBW_IN_PROGRESS) { oobwInstances += 1; } } foreach (const ProcessPtr &process, disabledProcesses) { if (process->oobwStatus == Process::OOBW_IN_PROGRESS) { oobwInstances += 1; } } return oobwInstances < options.maxOutOfBandWorkInstances; } bool Group::shouldInitiateOobw(const ProcessPtr &process) const { return process->oobwStatus == Process::OOBW_REQUESTED && process->enabled != Process::DETACHED && process->isAlive() && oobwAllowed(); } void Group::maybeInitiateOobw(const ProcessPtr &process) { if (shouldInitiateOobw(process)) { initiateOobw(process); } } // The 'self' parameter is for keeping the current Group object alive void Group::lockAndMaybeInitiateOobw(const ProcessPtr &process, DisableResult result, GroupPtr self) { TRACE_POINT(); // Standard resource management boilerplate stuff... PoolPtr pool = getPool(); boost::unique_lock lock(pool->syncher); if (OXT_UNLIKELY(!process->isAlive() || !isAlive())) { return; } assert(process->oobwStatus == Process::OOBW_IN_PROGRESS); if (result == DR_SUCCESS) { if (process->enabled == Process::DISABLED) { P_DEBUG("Process " << process->inspect() << " disabled; proceeding " << "with out-of-band work"); process->oobwStatus = Process::OOBW_REQUESTED; if (shouldInitiateOobw(process)) { initiateOobw(process); } else { // We do not re-enable the process because it's likely that the // administrator has explicitly changed the state. P_DEBUG("Out-of-band work for process " << process->inspect() << " aborted " "because the process no longer requests out-of-band work"); process->oobwStatus = Process::OOBW_NOT_ACTIVE; } } else { // We do not re-enable the process because it's likely that the // administrator has explicitly changed the state. P_DEBUG("Out-of-band work for process " << process->inspect() << " aborted " "because the process was reenabled after disabling"); process->oobwStatus = Process::OOBW_NOT_ACTIVE; } } else { P_DEBUG("Out-of-band work for process " << process->inspect() << " aborted " "because the process could not be disabled"); process->oobwStatus = Process::OOBW_NOT_ACTIVE; } } void Group::initiateOobw(const ProcessPtr &process) { assert(process->oobwStatus == Process::OOBW_REQUESTED); process->oobwStatus = Process::OOBW_IN_PROGRESS; if (process->enabled == Process::ENABLED || process->enabled == Process::DISABLING) { // We want the process to be disabled. However, disabling a process is potentially // asynchronous, so we pass a callback which will re-aquire the lock and call this // method again. P_DEBUG("Disabling process " << process->inspect() << " in preparation for OOBW"); DisableResult result = disable(process, boost::bind(&Group::lockAndMaybeInitiateOobw, this, _1, _2, shared_from_this())); switch (result) { case DR_SUCCESS: // Continue code flow. break; case DR_DEFERRED: // lockAndMaybeInitateOobw() will eventually be called. return; case DR_ERROR: case DR_NOOP: P_DEBUG("Out-of-band work for process " << process->inspect() << " aborted " "because the process could not be disabled"); process->oobwStatus = Process::OOBW_NOT_ACTIVE; return; default: P_BUG("Unexpected disable() result " << result); } } assert(process->enabled == Process::DISABLED); assert(process->sessions == 0); P_DEBUG("Initiating OOBW request for process " << process->inspect()); interruptableThreads.create_thread( boost::bind(&Group::spawnThreadOOBWRequest, this, shared_from_this(), process), "OOBW request thread for process " + process->inspect(), POOL_HELPER_THREAD_STACK_SIZE); } // The 'self' parameter is for keeping the current Group object alive while this thread is running. void Group::spawnThreadOOBWRequest(GroupPtr self, ProcessPtr process) { TRACE_POINT(); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; Socket *socket; Connection connection; PoolPtr pool = getPool(); Pool::DebugSupportPtr debug = pool->debugSupport; UPDATE_TRACE_POINT(); P_DEBUG("Performing OOBW request for process " << process->inspect()); if (debug != NULL && debug->oobw) { debug->debugger->send("OOBW request about to start"); debug->messages->recv("Proceed with OOBW request"); } UPDATE_TRACE_POINT(); { // Standard resource management boilerplate stuff... boost::unique_lock lock(pool->syncher); if (OXT_UNLIKELY(!process->isAlive() || process->enabled == Process::DETACHED || !isAlive())) { return; } if (process->enabled != Process::DISABLED) { UPDATE_TRACE_POINT(); P_INFO("Out-of-Band Work canceled: process " << process->inspect() << " was concurrently re-enabled."); if (debug != NULL && debug->oobw) { debug->debugger->send("OOBW request canceled"); } return; } assert(process->oobwStatus == Process::OOBW_IN_PROGRESS); assert(process->sessions == 0); socket = process->sessionSockets.top(); assert(socket != NULL); } UPDATE_TRACE_POINT(); unsigned long long timeout = 1000 * 1000 * 60; // 1 min try { this_thread::restore_interruption ri(di); this_thread::restore_syscall_interruption rsi(dsi); // Grab a connection. The connection is marked as fail in order to // ensure it is closed / recycled after this request (otherwise we'd // need to completely read the response). connection = socket->checkoutConnection(); connection.fail = true; ScopeGuard guard(boost::bind(&Socket::checkinConnection, socket, connection)); // This is copied from RequestHandler when it is sending data using the // "session" protocol. char sizeField[sizeof(uint32_t)]; SmallVector data; data.push_back(StaticString(sizeField, sizeof(uint32_t))); data.push_back(makeStaticStringWithNull("REQUEST_METHOD")); data.push_back(makeStaticStringWithNull("OOBW")); data.push_back(makeStaticStringWithNull("PASSENGER_CONNECT_PASSWORD")); data.push_back(makeStaticStringWithNull(process->connectPassword)); uint32_t dataSize = 0; for (unsigned int i = 1; i < data.size(); i++) { dataSize += (uint32_t) data[i].size(); } Uint32Message::generate(sizeField, dataSize); gatheredWrite(connection.fd, &data[0], data.size(), &timeout); // We do not care what the actual response is ... just wait for it. UPDATE_TRACE_POINT(); waitUntilReadable(connection.fd, &timeout); } catch (const SystemException &e) { P_ERROR("*** ERROR: " << e.what() << "\n" << e.backtrace()); } catch (const TimeoutException &e) { P_ERROR("*** ERROR: " << e.what() << "\n" << e.backtrace()); } UPDATE_TRACE_POINT(); vector actions; { // Standard resource management boilerplate stuff... PoolPtr pool = getPool(); boost::unique_lock lock(pool->syncher); if (OXT_UNLIKELY(!process->isAlive() || !isAlive())) { return; } process->oobwStatus = Process::OOBW_NOT_ACTIVE; if (process->enabled == Process::DISABLED) { enable(process, actions); assignSessionsToGetWaiters(actions); } pool->fullVerifyInvariants(); initiateNextOobwRequest(); } UPDATE_TRACE_POINT(); runAllActions(actions); actions.clear(); UPDATE_TRACE_POINT(); P_DEBUG("Finished OOBW request for process " << process->inspect()); if (debug != NULL && debug->oobw) { debug->debugger->send("OOBW request finished"); } } void Group::initiateNextOobwRequest() { ProcessList::const_iterator it, end = enabledProcesses.end(); for (it = enabledProcesses.begin(); it != end; it++) { const ProcessPtr &process = *it; if (shouldInitiateOobw(process)) { // We keep an extra reference to processes to prevent premature destruction. ProcessPtr p = process; initiateOobw(p); return; } } } // The 'self' parameter is for keeping the current Group object alive while this thread is running. void Group::spawnThreadMain(GroupPtr self, SpawnerPtr spawner, Options options, unsigned int restartsInitiated) { spawnThreadRealMain(spawner, options, restartsInitiated); } void Group::spawnThreadRealMain(const SpawnerPtr &spawner, const Options &options, unsigned int restartsInitiated) { TRACE_POINT(); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; PoolPtr pool = getPool(); Pool::DebugSupportPtr debug = pool->debugSupport; bool done = false; while (!done) { bool shouldFail = false; if (debug != NULL && debug->spawning) { UPDATE_TRACE_POINT(); this_thread::restore_interruption ri(di); this_thread::restore_syscall_interruption rsi(dsi); this_thread::interruption_point(); string iteration; { LockGuard g(debug->syncher); debug->spawnLoopIteration++; iteration = toString(debug->spawnLoopIteration); } P_DEBUG("Begin spawn loop iteration " << iteration); debug->debugger->send("Begin spawn loop iteration " + iteration); vector cases; cases.push_back("Proceed with spawn loop iteration " + iteration); cases.push_back("Fail spawn loop iteration " + iteration); MessagePtr message = debug->messages->recvAny(cases); shouldFail = message->name == "Fail spawn loop iteration " + iteration; } ProcessPtr process; ExceptionPtr exception; try { UPDATE_TRACE_POINT(); this_thread::restore_interruption ri(di); this_thread::restore_syscall_interruption rsi(dsi); if (shouldFail) { throw SpawnException("Simulated failure"); } else { process = spawner->spawn(options); process->setGroup(shared_from_this()); } } catch (const thread_interrupted &) { break; } catch (const tracable_exception &e) { exception = copyException(e); // Let other (unexpected) exceptions crash the program so // gdb can generate a backtrace. } UPDATE_TRACE_POINT(); ScopeGuard guard(boost::bind(Process::forceTriggerShutdownAndCleanup, process)); boost::unique_lock lock(pool->syncher); if (!isAlive()) { if (process != NULL) { P_DEBUG("Group is being shut down so dropping process " << process->inspect() << " which we just spawned and exiting spawn loop"); } else { P_DEBUG("The group is being shut down. A process failed " "to be spawned anyway, so ignoring this error and exiting " "spawn loop"); } // We stop immediately because any previously assumed invariants // may have been violated. break; } else if (restartsInitiated != this->restartsInitiated) { if (process != NULL) { P_DEBUG("A restart was issued for the group, so dropping process " << process->inspect() << " which we just spawned and exiting spawn loop"); } else { P_DEBUG("A restart was issued for the group. A process failed " "to be spawned anyway, so ignoring this error and exiting " "spawn loop"); } // We stop immediately because any previously assumed invariants // may have been violated. break; } verifyInvariants(); assert(m_spawning); assert(processesBeingSpawned > 0); processesBeingSpawned--; assert(processesBeingSpawned == 0); UPDATE_TRACE_POINT(); vector actions; if (process != NULL) { AttachResult result = attach(process, actions); if (result == AR_OK) { guard.clear(); if (getWaitlist.empty()) { pool->assignSessionsToGetWaiters(actions); } else { assignSessionsToGetWaiters(actions); } P_DEBUG("New process count = " << enabledCount << ", remaining get waiters = " << getWaitlist.size()); } else { done = true; P_DEBUG("Unable to attach spawned process " << process->inspect()); if (result == AR_ANOTHER_GROUP_IS_WAITING_FOR_CAPACITY) { pool->possiblySpawnMoreProcessesForExistingGroups(); } } } else { // TODO: sure this is the best thing? if there are // processes currently alive we should just use them. P_ERROR("Could not spawn process for group " << name << ": " << exception->what() << "\n" << exception->backtrace()); if (enabledCount == 0) { enableAllDisablingProcesses(actions); } Pool::assignExceptionToGetWaiters(getWaitlist, exception, actions); pool->assignSessionsToGetWaiters(actions); done = true; } done = done || (processLowerLimitsSatisfied() && getWaitlist.empty()) || processUpperLimitsReached() || pool->atFullCapacity(false); m_spawning = !done; if (done) { P_DEBUG("Spawn loop done"); } else { processesBeingSpawned++; P_DEBUG("Continue spawning"); } UPDATE_TRACE_POINT(); pool->fullVerifyInvariants(); lock.unlock(); UPDATE_TRACE_POINT(); runAllActions(actions); UPDATE_TRACE_POINT(); } if (debug != NULL && debug->spawning) { debug->debugger->send("Spawn loop done"); } } bool Group::shouldSpawn() const { return allowSpawn() && ( !processLowerLimitsSatisfied() || allEnabledProcessesAreTotallyBusy() || !getWaitlist.empty() ); } bool Group::shouldSpawnForGetAction() const { return enabledCount == 0 || shouldSpawn(); } void Group::restart(const Options &options, RestartMethod method) { vector actions; assert(isAlive()); P_DEBUG("Restarting group " << name); // If there is currently a restarter thread or a spawner thread active, // the following tells them to abort their current work as soon as possible. restartsInitiated++; processesBeingSpawned = 0; m_spawning = false; m_restarting = true; detachAll(actions); getPool()->interruptableThreads.create_thread( boost::bind(&Group::finalizeRestart, this, shared_from_this(), options.copyAndPersist().clearPerRequestFields(), method, getPool()->spawnerFactory, restartsInitiated, actions), "Group restarter: " + name, POOL_HELPER_THREAD_STACK_SIZE ); } // The 'self' parameter is for keeping the current Group object alive while this thread is running. void Group::finalizeRestart(GroupPtr self, Options options, RestartMethod method, SpawnerFactoryPtr spawnerFactory, unsigned int restartsInitiated, vector postLockActions) { TRACE_POINT(); Pool::runAllActions(postLockActions); postLockActions.clear(); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; // Create a new spawner. SpawnerPtr newSpawner = spawnerFactory->create(options); SpawnerPtr oldSpawner; UPDATE_TRACE_POINT(); PoolPtr pool = getPool(); Pool::DebugSupportPtr debug = pool->debugSupport; if (debug != NULL && debug->restarting) { this_thread::restore_interruption ri(di); this_thread::restore_syscall_interruption rsi(dsi); this_thread::interruption_point(); debug->debugger->send("About to end restarting"); debug->messages->recv("Finish restarting"); } ScopedLock l(pool->syncher); if (!isAlive()) { P_DEBUG("Group " << name << " is shutting down, so aborting restart"); return; } if (restartsInitiated != this->restartsInitiated) { // Before this restart could be finalized, another restart command was given. // The spawner we just created might be out of date now so we abort. P_DEBUG("Restart of group " << name << " aborted because a new restart was initiated concurrently"); if (debug != NULL && debug->restarting) { debug->debugger->send("Restarting aborted"); } return; } // Run some sanity checks. pool->fullVerifyInvariants(); assert(m_restarting); UPDATE_TRACE_POINT(); // Atomically swap the new spawner with the old one. resetOptions(options); oldSpawner = spawner; spawner = newSpawner; m_restarting = false; if (shouldSpawn()) { spawn(); } else if (isWaitingForCapacity()) { P_INFO("Group " << name << " is waiting for capacity to become available. " "Trying to shutdown another idle process to free capacity..."); if (pool->forceFreeCapacity(this, postLockActions) != NULL) { spawn(); } else { P_INFO("There are no processes right now that are eligible " "for shutdown. Will try again later."); } } verifyInvariants(); l.unlock(); oldSpawner.reset(); Pool::runAllActions(postLockActions); P_DEBUG("Restart of group " << name << " done"); if (debug != NULL && debug->restarting) { debug->debugger->send("Restarting done"); } } /** * The `immediately` parameter only has effect if the detached processes checker * thread is active. It means that, if the thread is currently sleeping, it should * wake up immediately and perform work. */ void Group::startCheckingDetachedProcesses(bool immediately) { if (!detachedProcessesCheckerActive) { P_DEBUG("Starting detached processes checker"); getPool()->nonInterruptableThreads.create_thread( boost::bind(&Group::detachedProcessesCheckerMain, this, shared_from_this()), "Detached processes checker: " + name, POOL_HELPER_THREAD_STACK_SIZE ); detachedProcessesCheckerActive = true; } else if (detachedProcessesCheckerActive && immediately) { detachedProcessesCheckerCond.notify_all(); } } void Group::detachedProcessesCheckerMain(GroupPtr self) { TRACE_POINT(); PoolPtr pool = getPool(); Pool::DebugSupportPtr debug = pool->debugSupport; if (debug != NULL && debug->detachedProcessesChecker) { debug->debugger->send("About to start detached processes checker"); debug->messages->recv("Proceed with starting detached processes checker"); } boost::unique_lock lock(pool->syncher); while (true) { assert(detachedProcessesCheckerActive); if (getLifeStatus() == SHUT_DOWN || this_thread::interruption_requested()) { UPDATE_TRACE_POINT(); P_DEBUG("Stopping detached processes checker"); detachedProcessesCheckerActive = false; break; } UPDATE_TRACE_POINT(); if (!detachedProcesses.empty()) { P_TRACE(2, "Checking whether any of the " << detachedProcesses.size() << " detached processes have exited..."); ProcessList::iterator it = detachedProcesses.begin(); ProcessList::iterator end = detachedProcesses.end(); while (it != end) { const ProcessPtr process = *it; switch (process->getLifeStatus()) { case Process::ALIVE: if (process->canTriggerShutdown()) { P_DEBUG("Detached process " << process->inspect() << " has 0 active sessions now. Triggering shutdown."); process->triggerShutdown(); assert(process->getLifeStatus() == Process::SHUTDOWN_TRIGGERED); } it++; break; case Process::SHUTDOWN_TRIGGERED: if (process->canCleanup()) { P_DEBUG("Detached process " << process->inspect() << " has shut down. Cleaning up associated resources."); process->cleanup(); assert(process->getLifeStatus() == Process::DEAD); it++; removeProcessFromList(process, detachedProcesses); } else if (process->shutdownTimeoutExpired()) { P_WARN("Detached process " << process->inspect() << " didn't shut down within " PROCESS_SHUTDOWN_TIMEOUT_DISPLAY ". Forcefully killing it with SIGKILL."); kill(process->pid, SIGKILL); it++; } else { it++; } break; default: P_BUG("Unknown 'lifeStatus' state " << (int) process->getLifeStatus()); } } } UPDATE_TRACE_POINT(); if (detachedProcesses.empty()) { UPDATE_TRACE_POINT(); P_DEBUG("Stopping detached processes checker"); detachedProcessesCheckerActive = false; vector actions; if (shutdownCanFinish()) { UPDATE_TRACE_POINT(); finishShutdown(actions); } verifyInvariants(); verifyExpensiveInvariants(); lock.unlock(); UPDATE_TRACE_POINT(); runAllActions(actions); break; } else { UPDATE_TRACE_POINT(); verifyInvariants(); verifyExpensiveInvariants(); } // Not all processes can be shut down yet. Sleep for a while unless // someone wakes us up. UPDATE_TRACE_POINT(); detachedProcessesCheckerCond.timed_wait(lock, posix_time::milliseconds(100)); } } void Group::wakeUpGarbageCollector() { getPool()->garbageCollectionCond.notify_all(); } bool Group::poolAtFullCapacity() const { return getPool()->atFullCapacity(false); } bool Group::anotherGroupIsWaitingForCapacity() const { return findOtherGroupWaitingForCapacity() != NULL; } boost::shared_ptr Group::findOtherGroupWaitingForCapacity() const { PoolPtr pool = getPool(); StringMap::const_iterator sg_it, sg_end = pool->superGroups.end(); for (sg_it = pool->superGroups.begin(); sg_it != sg_end; sg_it++) { pair p = *sg_it; vector::const_iterator g_it, g_end = p.second->groups.end(); for (g_it = p.second->groups.begin(); g_it != g_end; g_it++) { if (g_it->get() != this && (*g_it)->isWaitingForCapacity()) { return *g_it; } } } return GroupPtr(); } ProcessPtr Group::poolForceFreeCapacity(const Group *exclude, vector &postLockActions) { return getPool()->forceFreeCapacity(exclude, postLockActions); } bool Group::testOverflowRequestQueue() const { // This has a performance penalty, although I'm not sure whether the penalty is // any greater than a hash table lookup if I were to implement it in Options. Pool::DebugSupportPtr debug = getPool()->debugSupport; if (debug) { return debug->testOverflowRequestQueue; } else { return false; } } const ResourceLocator & Group::getResourceLocator() const { return getPool()->spawnerFactory->getResourceLocator(); } // 'process' is not a reference so that bind(runAttachHooks, ...) causes the shared // pointer reference to increment. void Group::runAttachHooks(const ProcessPtr process) const { getPool()->runHookScripts("attached_process", boost::bind(&Group::setupAttachOrDetachHook, this, process, _1)); } void Group::runDetachHooks(const ProcessPtr process) const { getPool()->runHookScripts("detached_process", boost::bind(&Group::setupAttachOrDetachHook, this, process, _1)); } void Group::setupAttachOrDetachHook(const ProcessPtr process, HookScriptOptions &options) const { options.environment.push_back(make_pair("PASSENGER_PROCESS_PID", toString(process->pid))); options.environment.push_back(make_pair("PASSENGER_APP_ROOT", this->options.appRoot)); } string Group::generateSecret(const SuperGroupPtr &superGroup) { return superGroup->getPool()->randomGenerator->generateAsciiString(43); } PoolPtr Process::getPool() const { assert(getLifeStatus() != DEAD); return getGroup()->getPool(); } SuperGroupPtr Process::getSuperGroup() const { assert(getLifeStatus() != DEAD); return getGroup()->getSuperGroup(); } void Process::sendAbortLongRunningConnectionsMessage(const string &address) { boost::function func = boost::bind( realSendAbortLongRunningConnectionsMessage, address); return getPool()->nonInterruptableThreads.create_thread( boost::bind(runAndPrintExceptions, func, false), "Sending detached message to process " + toString(pid), 256 * 1024); } void Process::realSendAbortLongRunningConnectionsMessage(string address) { TRACE_POINT(); FileDescriptor fd(connectToServer(address)); unsigned long long timeout = 3000000; vector args; UPDATE_TRACE_POINT(); args.push_back("abort_long_running_connections"); writeArrayMessage(fd, args, &timeout); } string Process::inspect() const { assert(getLifeStatus() != DEAD); stringstream result; result << "(pid=" << pid; GroupPtr group = getGroup(); if (group != NULL) { // This Process hasn't been attached to a Group yet. result << ", group=" << group->name; } result << ")"; return result.str(); } const string & Session::getConnectPassword() const { return getProcess()->connectPassword; } pid_t Session::getPid() const { return getProcess()->pid; } const string & Session::getGupid() const { return getProcess()->gupid; } int Session::getStickySessionId() const { return getProcess()->stickySessionId; } const GroupPtr Session::getGroup() const { return getProcess()->getGroup(); } void Session::requestOOBW() { ProcessPtr process = getProcess(); assert(process->isAlive()); process->getGroup()->requestOOBW(process); } int Session::kill(int signo) { return getProcess()->kill(signo); } PipeWatcher::DataCallback PipeWatcher::onData; PipeWatcher::PipeWatcher(const FileDescriptor &_fd, const char *_name, pid_t _pid) : fd(_fd), name(_name), pid(_pid) { started = false; } void PipeWatcher::initialize() { oxt::thread(boost::bind(threadMain, shared_from_this()), "PipeWatcher: PID " + toString(pid) + " " + name + ", fd " + toString(fd), POOL_HELPER_THREAD_STACK_SIZE); } void PipeWatcher::start() { boost::lock_guard lock(startSyncher); started = true; startCond.notify_all(); } void PipeWatcher::threadMain(boost::shared_ptr self) { TRACE_POINT(); self->threadMain(); } void PipeWatcher::threadMain() { TRACE_POINT(); { boost::unique_lock lock(startSyncher); while (!started) { startCond.wait(lock); } } UPDATE_TRACE_POINT(); while (!this_thread::interruption_requested()) { char buf[1024 * 8]; ssize_t ret; UPDATE_TRACE_POINT(); ret = syscalls::read(fd, buf, sizeof(buf)); if (ret == 0) { break; } else if (ret == -1) { UPDATE_TRACE_POINT(); if (errno == ECONNRESET) { break; } else if (errno != EAGAIN) { int e = errno; P_WARN("Cannot read from process " << pid << " " << name << ": " << strerror(e) << " (errno=" << e << ")"); break; } } else if (ret == 1 && buf[0] == '\n') { UPDATE_TRACE_POINT(); printAppOutput(pid, name, "", 0); } else { UPDATE_TRACE_POINT(); vector lines; ssize_t ret2 = ret; if (ret2 > 0 && buf[ret2 - 1] == '\n') { ret2--; } split(StaticString(buf, ret2), '\n', lines); foreach (const StaticString line, lines) { printAppOutput(pid, name, line.data(), line.size()); } } if (onData != NULL) { onData(buf, ret); } } } } // namespace ApplicationPool2 } // namespace Passenger passenger-4.0.37/ext/common/ApplicationPool2/Options.h000644 000765 000024 00000052322 12233035540 023273 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL2_OPTIONS_H_ #define _PASSENGER_APPLICATION_POOL2_OPTIONS_H_ #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; /** * This struct encapsulates information for ApplicationPool::get() and for * SpawnManager::spawn(), such as which application is to be spawned. * *

Privilege lowering support

* * If user is given and isn't the empty string, then the application process * will run as the given username. Otherwise, the owner of the application's startup * file (e.g. config.ru or config/environment.rb) will be used. * * If group is given and isn't the empty string, then the application process * will run as the given group name. If it's set to the special value * "!STARTUP_FILE!", then the startup file's group will be used. Otherwise, * the primary group of the user that the application process will run as, * will be used as group. * * If the user or group that the application process attempts to switch to * doesn't exist, then defaultUser and defaultGroup, respectively, * will be used. * * Phusion Passenger will attempt to avoid running the application process as * root: if user or group is set to the root user or the root group, * or if the startup file is owned by root, then defaultUser and * defaultGroup will be used instead. * * All this only happen if Phusion Passenger has root privileges. If not, then * these options have no effect. */ class Options { private: shared_array storage; vector getStringFields() const { vector result; result.reserve(20); result.push_back(&appRoot); result.push_back(&appGroupName); result.push_back(&appType); result.push_back(&startCommand); result.push_back(&startupFile); result.push_back(&processTitle); result.push_back(&environment); result.push_back(&baseURI); result.push_back(&spawnMethod); result.push_back(&user); result.push_back(&group); result.push_back(&defaultUser); result.push_back(&defaultGroup); result.push_back(&restartDir); result.push_back(&preexecChroot); result.push_back(&postexecChroot); result.push_back(&ruby); result.push_back(&python); result.push_back(&nodejs); result.push_back(&loggingAgentAddress); result.push_back(&loggingAgentUsername); result.push_back(&loggingAgentPassword); result.push_back(&groupSecret); result.push_back(&hostName); result.push_back(&uri); result.push_back(&unionStationKey); return result; } static inline void appendKeyValue(vector &vec, const char *key, const StaticString &value) { if (!value.empty()) { vec.push_back(key); vec.push_back(value.toString()); } } static inline void appendKeyValue(vector &vec, const char *key, const char *value) { vec.push_back(key); vec.push_back(value); } static inline void appendKeyValue2(vector &vec, const char *key, long value) { vec.push_back(key); vec.push_back(toString(value)); } static inline void appendKeyValue3(vector &vec, const char *key, unsigned long value) { vec.push_back(key); vec.push_back(toString(value)); } static inline void appendKeyValue4(vector &vec, const char *key, bool value) { vec.push_back(key); vec.push_back(value ? "true" : "false"); } public: /*********** Spawn options that should be set by the caller *********** * These are the options that are relevant while spawning an application * process. These options are only used during spawning. */ /** * The root directory of the application to spawn. In case of a Ruby on Rails * application, this is the folder that contains 'app/', 'public/', 'config/', * etc. This must be a valid directory, but the path does not have to be absolute. */ StaticString appRoot; /** * A name used by ApplicationPool to uniquely identify an application. * If one tries to get() from the application pool with name "A", then get() * again with name "B", then the latter will spawn a new application process, * even if both get() requests have the same app root. * * If left empty, then the app root is used as the app group name. */ StaticString appGroupName; /** The application's type, used for determining the command to invoke to * spawn an application process as well as determining the startup file's * filename. It can be one of the app type names in AppType.cpp, or the * empty string (default). In case of the latter, 'startCommand' and * 'startupFile' (which MUST be set) will dictate the startup command * and the startup file's filename. */ StaticString appType; /** The command for spawning the application process. This is a list of * arguments, separated by '\t', e.g. "ruby\tfoo.rb". Only used * during spawning and only if appType.empty(). */ StaticString startCommand; /** Filename of the application's startup file. Only actually used for * determining user switching info. Only used during spawning and only * if appType.empty(). */ StaticString startupFile; /** The process title to assign to the application process. Only used * during spawning. May be empty in which case no particular process * title is assigned. Only used during spawning and only if * appType.empty(). */ StaticString processTitle; /** * Defaults to DEFAULT_LOG_LEVEL. */ int logLevel; /** The maximum amount of time, in milliseconds, that may be spent * on spawning the process or the preloader. */ unsigned int startTimeout; /** * The RAILS_ENV/RACK_ENV environment that should be used. May not be an * empty string. */ StaticString environment; /** * The base URI on which the application runs. If the application is * running on the root URI, then this value must be "/". * * @invariant baseURI != "" */ StaticString baseURI; /** * Spawning method, either "smart" or "direct". */ StaticString spawnMethod; /** See overview. */ StaticString user; /** See class overview. */ StaticString group; /** See class overview. Defaults to "nobody". */ StaticString defaultUser; /** See class overview. Defaults to the defaultUser's primary group. */ StaticString defaultGroup; /** * The directory which contains restart.txt and always_restart.txt. * An empty string means that the default directory should be used. */ StaticString restartDir; StaticString preexecChroot; StaticString postexecChroot; /** * Path to the Ruby interpreter to use, in case the application to spawn * is a Ruby app. */ StaticString ruby; /** * Path to the Python interpreter to use, in case the application to spawn * is a Python app. */ StaticString python; /** * Path to the Node.js command to use, in case the application to spawn * is a Node.js app. */ StaticString nodejs; /** * Any rights that the spawned application process may have. The SpawnManager * will create a new account for each spawned app, and that account will be * assigned these rights. */ Account::Rights rights; /** * Environment variables which should be passed to the spawned application * process. */ vector< pair > environmentVariables; /** Whether debugger support should be enabled. */ bool debugger; /** Whether to load environment variables set in shell startup * files (e.g. ~/.bashrc) during spawning. */ bool loadShellEnvvars; /** Whether Union Station logging should be enabled. This option only affects * whether the application enables Union Station support; whether a request * actually results in data being logged to Union Station depends on whether * the 'logger' member is set. * * If this is set to true, then 'loggingAgentAddress', 'loggingAgentUsername' * and 'loggingAgentPassword' must be non-empty. */ bool analytics; StaticString loggingAgentAddress; StaticString loggingAgentUsername; StaticString loggingAgentPassword; /** * Whether Spawner should raise an internal error when spawning. Used * during unit tests. */ bool raiseInternalError; /*********** Per-group pool options that should be set by the caller *********** * These options dictate how Pool will manage processes, routing, etc. within * a single Group. These options are not process-specific, only group-specific. */ /** * The minimum number of processes for the current group that the application * pool's cleaner thread should keep around. */ unsigned int minProcesses; /** * The maximum number of processes that may be spawned * for this app root. This option only has effect if it's lower than * the pool size. * * A value of 0 means unspecified, and has no effect. */ unsigned int maxProcesses; /** The number of seconds that preloader processes may stay alive idling. */ long maxPreloaderIdleTime; /** * The maximum number of processes inside a group that may be performing * out-of-band work at the same time. */ unsigned int maxOutOfBandWorkInstances; /** * The maximum number of requests that may live in the Group.getWaitlist queue. * A value of 0 means unlimited. */ unsigned int maxRequestQueueSize; /** * The Union Station key to use in case analytics logging is enabled. * It is used by Pool::collectAnalytics() and other administrative * functions which are called periodically. Because they do not belong * to any request, and they may still want to log to Union Station, * this key is stored in the per-group options structure. * * It is not used on a per-request basis. Per-request analytics logging * (and Union Station logging) uses the logger object in the `logger` field * instead. */ StaticString unionStationKey; /*-----------------*/ /*********** Per-request pool options that should be set by the caller *********** * These options also dictate how Pool will manage processes, etc. Unlike the * per-group options, these options are customizable on a per-request basis. * Their effects also don't persist longer than a single request. */ /** Current request host name. */ StaticString hostName; /** Current request URI. */ StaticString uri; /** * A Union Station logger object to log things to. May be the null pointer, * in which case Union Station logging is disabled for this request. */ UnionStation::LoggerPtr logger; /** * A sticky session ID for routing to a specific process. */ unsigned int stickySessionId; /** * A throttling rate for file stats. When set to a non-zero value N, * restart.txt and other files which are usually stat()ted on every * ApplicationPool::get() call will be stat()ed at most every N seconds. */ unsigned long statThrottleRate; /** * The maximum number of requests that the spawned application may process * before exiting. A value of 0 means unlimited. */ unsigned long maxRequests; /** When true, Pool::get() and Pool::asyncGet() will create the necessary * SuperGroup and Group structures just as normally, and will even handle * restarting logic, but will not actually spawn any processes and will not * open a session with an existing process. Instead, a fake Session object * is returned which points to a Process object that isn't stored anywhere * in the Pool structures and isn't mapped to any real OS process. It does * however point to the real Group structure. Useful for unit tests. * False by default. */ bool noop; /*-----------------*/ /*-----------------*/ /*********** Spawn options automatically set by Pool *********** * These options are passed to the Spawner. The Pool::get() caller may not * see these values. */ /** The secret key of the pool group that the spawned process is to belong to. */ StaticString groupSecret; /*********************************/ /** * Creates a new Options object with the default values filled in. * One must still set appRoot manually, after having used this constructor. */ Options() { logLevel = DEFAULT_LOG_LEVEL; startTimeout = 90 * 1000; environment = "production"; baseURI = "/"; spawnMethod = "smart"; defaultUser = "nobody"; ruby = DEFAULT_RUBY; python = DEFAULT_PYTHON; nodejs = DEFAULT_NODEJS; rights = DEFAULT_BACKEND_ACCOUNT_RIGHTS; debugger = false; loadShellEnvvars = true; analytics = false; raiseInternalError = false; minProcesses = 1; maxProcesses = 0; maxPreloaderIdleTime = -1; maxOutOfBandWorkInstances = 1; maxRequestQueueSize = 100; stickySessionId = 0; statThrottleRate = 0; maxRequests = 0; noop = false; /*********************************/ } Options copy() const { return *this; } Options copyAndPersist() const { Options cpy(*this); cpy.persist(*this); return cpy; } /** * Assign other's string fields' values into this Option * object, and store the data in this Option object's internal storage * area. */ Options &persist(const Options &other) { const vector strings = getStringFields(); const vector otherStrings = other.getStringFields(); unsigned int i; size_t otherLen = 0; char *end; assert(strings.size() == otherStrings.size()); // Calculate the desired length of the internal storage area. // All strings are NULL-terminated. for (i = 0; i < otherStrings.size(); i++) { otherLen += otherStrings[i]->size() + 1; } for (i = 0; i < other.environmentVariables.size(); i++) { otherLen += environmentVariables[i].first.size() + 1; otherLen += environmentVariables[i].second.size() + 1; } shared_array data(new char[otherLen]); end = data.get(); // Copy string fields into the internal storage area. for (i = 0; i < otherStrings.size(); i++) { const StaticString *str = strings[i]; const StaticString *otherStr = otherStrings[i]; // Point current object's field to the data in the // internal storage area. *const_cast(str) = StaticString(end, otherStr->size()); // Copy over the string data. memcpy(end, otherStr->c_str(), otherStr->size()); end += otherStr->size(); *end = '\0'; end++; } // Copy environmentVariables names and values into the internal storage area. for (i = 0; i < other.environmentVariables.size(); i++) { const pair &p = other.environmentVariables[i]; environmentVariables[i] = make_pair( StaticString(end, p.first.size()), StaticString(end + p.first.size() + 1, p.second.size()) ); // Copy over string data. memcpy(end, p.first.data(), p.first.size()); end += p.first.size(); *end = '\0'; end++; // Copy over value data. memcpy(end, p.second.data(), p.second.size()); end += p.second.size(); *end = '\0'; end++; } storage = data; return *this; } Options &clearPerRequestFields() { hostName = StaticString(); uri = StaticString(); stickySessionId = 0; noop = false; return clearLogger(); } Options &clearLogger() { logger.reset(); return *this; } enum FieldSet { SPAWN_OPTIONS = 1 << 0, PER_GROUP_POOL_OPTIONS = 1 << 1, ALL_OPTIONS = ~0 }; /** * Append information in this Options object to the given string vector, except * for environmentVariables. You can customize what information you want through * the `elements` argument. */ void toVector(vector &vec, const ResourceLocator &resourceLocator, int fields = ALL_OPTIONS) const { if (fields & SPAWN_OPTIONS) { appendKeyValue (vec, "app_root", appRoot); appendKeyValue (vec, "app_group_name", getAppGroupName()); appendKeyValue (vec, "app_type", appType); appendKeyValue (vec, "start_command", getStartCommand(resourceLocator)); appendKeyValue (vec, "startup_file", getStartupFile()); appendKeyValue (vec, "process_title", getProcessTitle()); appendKeyValue2(vec, "log_level", logLevel); appendKeyValue3(vec, "start_timeout", startTimeout); appendKeyValue (vec, "environment", environment); appendKeyValue (vec, "base_uri", baseURI); appendKeyValue (vec, "spawn_method", spawnMethod); appendKeyValue (vec, "user", user); appendKeyValue (vec, "group", group); appendKeyValue (vec, "default_user", defaultUser); appendKeyValue (vec, "default_group", defaultGroup); appendKeyValue (vec, "restart_dir", restartDir); appendKeyValue (vec, "preexec_chroot", preexecChroot); appendKeyValue (vec, "postexec_chroot", postexecChroot); appendKeyValue (vec, "ruby", ruby); appendKeyValue (vec, "python", python); appendKeyValue (vec, "nodejs", nodejs); appendKeyValue (vec, "logging_agent_address", loggingAgentAddress); appendKeyValue (vec, "logging_agent_username", loggingAgentUsername); appendKeyValue (vec, "logging_agent_password", loggingAgentPassword); appendKeyValue4(vec, "debugger", debugger); appendKeyValue4(vec, "analytics", analytics); appendKeyValue (vec, "group_secret", groupSecret); /*********************************/ } if (fields & PER_GROUP_POOL_OPTIONS) { appendKeyValue3(vec, "min_processes", minProcesses); appendKeyValue3(vec, "max_processes", maxProcesses); appendKeyValue2(vec, "max_preloader_idle_time", maxPreloaderIdleTime); appendKeyValue3(vec, "max_out_of_band_work_instances", maxOutOfBandWorkInstances); appendKeyValue (vec, "union_station_key", unionStationKey); } /*********************************/ } template void toXml(Stream &stream, const ResourceLocator &resourceLocator, int fields = ALL_OPTIONS) const { vector args; unsigned int i; toVector(args, resourceLocator, fields); for (i = 0; i < args.size(); i += 2) { stream << "<" << args[i] << ">"; stream << escapeForXml(args[i + 1]); stream << ""; } } /** * Returns the app group name. If there is no explicitly set app group name * then the app root is considered to be the app group name. */ StaticString getAppGroupName() const { if (appGroupName.empty()) { return appRoot; } else { return appGroupName; } } string getStartCommand(const ResourceLocator &resourceLocator) const { if (appType == "classic-rails") { return ruby + "\t" + resourceLocator.getHelperScriptsDir() + "/classic-rails-loader.rb"; } else if (appType == "rack") { return ruby + "\t" + resourceLocator.getHelperScriptsDir() + "/rack-loader.rb"; } else if (appType == "wsgi") { return python + "\t" + resourceLocator.getHelperScriptsDir() + "/wsgi-loader.py"; } else if (appType == "node") { return nodejs + "\t" + resourceLocator.getHelperScriptsDir() + "/node-loader.js"; } else if (appType == "meteor") { return ruby + "\t" + resourceLocator.getHelperScriptsDir() + "/meteor-loader.rb"; } else { return startCommand; } } StaticString getStartupFile() const { if (startupFile.empty()) { const char *result = getAppTypeStartupFile(getAppType(appType)); if (result == NULL) { return ""; } else { return result; } } else { return startupFile; } } StaticString getProcessTitle() const { const char *result = getAppTypeProcessTitle(getAppType(appType)); if (result == NULL) { return processTitle; } else { return result; } } unsigned long getMaxPreloaderIdleTime() const { if (maxPreloaderIdleTime == -1) { return 5 * 60; } else { return maxPreloaderIdleTime; } } }; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_OPTIONS_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/PipeWatcher.h000644 000765 000024 00000004532 12233035540 024053 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2012-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL_PIPE_WATCHER_H_ #define _PASSENGER_APPLICATION_POOL_PIPE_WATCHER_H_ #include #include #include #include #include #include namespace Passenger { namespace ApplicationPool2 { using namespace boost; /** A PipeWatcher lives until the file descriptor is closed. */ struct PipeWatcher: public boost::enable_shared_from_this { // For unit tests. typedef boost::function DataCallback; static DataCallback onData; FileDescriptor fd; const char *name; pid_t pid; bool started; boost::mutex startSyncher; boost::condition_variable startCond; PipeWatcher(const FileDescriptor &_fd, const char *name, pid_t pid); void initialize(); void start(); static void threadMain(boost::shared_ptr self); void threadMain(); }; typedef boost::shared_ptr PipeWatcherPtr; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL_PIPE_WATCHER_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/Pool.h000644 000765 000024 00000141167 12233035540 022557 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2014 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL2_POOL_H_ #define _PASSENGER_APPLICATION_POOL2_POOL_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; using namespace oxt; class Pool: public boost::enable_shared_from_this { public: struct InspectOptions { bool colorize; bool verbose; InspectOptions() : colorize(false), verbose(false) { } InspectOptions(const VariantMap &options) : colorize(options.getBool("colorize", false, false)), verbose(options.getBool("verbose", false, false)) { } }; // Actually private, but marked public so that unit tests can access the fields. public: friend class SuperGroup; friend class Group; typedef UnionStation::LoggerFactory LoggerFactory; typedef UnionStation::LoggerFactoryPtr LoggerFactoryPtr; typedef UnionStation::LoggerPtr LoggerPtr; struct DebugSupport { /** Mailbox for the unit tests to receive messages on. */ MessageBoxPtr debugger; /** Mailbox for the ApplicationPool code to receive messages on. */ MessageBoxPtr messages; // Choose aspects to debug. bool restarting; bool spawning; bool superGroup; bool oobw; bool testOverflowRequestQueue; bool detachedProcessesChecker; // The following fields may only be accessed by Pool. boost::mutex syncher; unsigned int spawnLoopIteration; DebugSupport() { debugger = boost::make_shared(); messages = boost::make_shared(); restarting = true; spawning = true; superGroup = false; oobw = false; detachedProcessesChecker = false; testOverflowRequestQueue = false; spawnLoopIteration = 0; } }; typedef boost::shared_ptr DebugSupportPtr; SpawnerFactoryPtr spawnerFactory; LoggerFactoryPtr loggerFactory; RandomGeneratorPtr randomGenerator; mutable boost::mutex syncher; unsigned int max; unsigned long long maxIdleTime; boost::condition_variable garbageCollectionCond; /** * Code can register background threads in one of these dynamic thread groups * to ensure that threads are interrupted and/or joined properly upon Pool * destruction. * All threads in 'interruptableThreads' will be interrupted and joined upon * Pool destruction. * All threads in 'nonInterruptableThreads' will be joined, but not interrupted, * upon Pool destruction. */ dynamic_thread_group interruptableThreads; dynamic_thread_group nonInterruptableThreads; enum LifeStatus { ALIVE, PREPARED_FOR_SHUTDOWN, SHUTTING_DOWN, SHUT_DOWN } lifeStatus; SuperGroupMap superGroups; /** * get() requests that... * - cannot be immediately satisfied because the pool is at full * capacity and no existing processes can be killed, * - and for which the super group isn't in the pool, * ...are put on this wait list. * * This wait list is processed when one of the following things happen: * * - A process has been spawned but its associated group has * no get waiters. This process can be killed and the resulting * free capacity will be used to spawn a process for this * get request. * - A process (that has apparently been spawned after getWaitlist * was populated) is done processing a request. This process can * then be killed to free capacity. * - A process has failed to spawn, resulting in capacity to * become free. * - A SuperGroup failed to initialize, resulting in free capacity. * - Someone commanded Pool to detach a process, resulting in free * capacity. * - Someone commanded Pool to detach a SuperGroup, resulting in * free capacity. * - The 'max' option has been increased, resulting in free capacity. * * Invariant 1: * for all options in getWaitlist: * options.getAppGroupName() is not in 'superGroups'. * * Invariant 2: * if getWaitlist is non-empty: * atFullCapacity() * Equivalently: * if !atFullCapacity(): * getWaitlist is empty. */ vector getWaitlist; const VariantMap *agentsOptions; DebugSupportPtr debugSupport; static void runAllActions(const vector &actions) { vector::const_iterator it, end = actions.end(); for (it = actions.begin(); it != end; it++) { (*it)(); } } static void runAllActionsWithCopy(vector actions) { runAllActions(actions); } static const char *maybeColorize(const InspectOptions &options, const char *color) { if (options.colorize) { return color; } else { return ""; } } void verifyInvariants() const { // !a || b: logical equivalent of a IMPLIES b. assert(!( !getWaitlist.empty() ) || ( atFullCapacity(false) )); assert(!( !atFullCapacity(false) ) || ( getWaitlist.empty() )); } void verifyExpensiveInvariants() const { #ifndef NDEBUG vector::const_iterator it, end = getWaitlist.end(); for (it = getWaitlist.begin(); it != end; it++) { const GetWaiter &waiter = *it; assert(superGroups.get(waiter.options.getAppGroupName()) == NULL); } #endif } void fullVerifyInvariants() const { TRACE_POINT(); verifyInvariants(); UPDATE_TRACE_POINT(); verifyExpensiveInvariants(); UPDATE_TRACE_POINT(); StringMap::const_iterator sg_it, sg_end = superGroups.end(); for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) { pair p = *sg_it; p.second->verifyInvariants(); foreach (GroupPtr group, p.second->groups) { group->verifyInvariants(); group->verifyExpensiveInvariants(); } } } bool runHookScripts(const char *name, const boost::function &setup) const { if (agentsOptions != NULL) { string hookName = string("hook_") + name; string spec = agentsOptions->get(hookName, false); if (!spec.empty()) { HookScriptOptions options; options.agentsOptions = agentsOptions; options.name = name; options.spec = spec; setup(options); return Passenger::runHookScripts(options); } else { return true; } } else { return true; } } static const char *maybePluralize(unsigned int count, const char *singular, const char *plural) { if (count == 1) { return singular; } else { return plural; } } ProcessPtr findOldestIdleProcess(const Group *exclude = NULL) const { ProcessPtr oldestIdleProcess; SuperGroupMap::const_iterator it, end = superGroups.end(); for (it = superGroups.begin(); it != end; it++) { const SuperGroupPtr &superGroup = it->second; const vector &groups = superGroup->groups; vector::const_iterator g_it, g_end = groups.end(); for (g_it = groups.begin(); g_it != g_end; g_it++) { const GroupPtr &group = *g_it; if (group.get() == exclude) { continue; } const ProcessList &processes = group->enabledProcesses; ProcessList::const_iterator p_it, p_end = processes.end(); for (p_it = processes.begin(); p_it != p_end; p_it++) { const ProcessPtr process = *p_it; if (process->busyness() == 0 && (oldestIdleProcess == NULL || process->lastUsed < oldestIdleProcess->lastUsed) ) { oldestIdleProcess = process; } } } } return oldestIdleProcess; } ProcessPtr findBestProcessToTrash() const { ProcessPtr oldestProcess; SuperGroupMap::const_iterator it, end = superGroups.end(); for (it = superGroups.begin(); it != end; it++) { const SuperGroupPtr &superGroup = it->second; const vector &groups = superGroup->groups; vector::const_iterator g_it, g_end = groups.end(); for (g_it = groups.begin(); g_it != g_end; g_it++) { const GroupPtr &group = *g_it; const ProcessList &processes = group->enabledProcesses; ProcessList::const_iterator p_it, p_end = processes.end(); for (p_it = processes.begin(); p_it != p_end; p_it++) { const ProcessPtr process = *p_it; if (oldestProcess == NULL || process->lastUsed < oldestProcess->lastUsed) { oldestProcess = process; } } } } return oldestProcess; } /** Process all waiters on the getWaitlist. Call when capacity has become free. * This function assigns sessions to them by calling get() on the corresponding * SuperGroups, or by creating more SuperGroups, in so far the new capacity allows. */ void assignSessionsToGetWaiters(vector &postLockActions) { bool done = false; vector::iterator it, end = getWaitlist.end(); vector newWaitlist; for (it = getWaitlist.begin(); it != end && !done; it++) { GetWaiter &waiter = *it; SuperGroup *superGroup = findMatchingSuperGroup(waiter.options); if (superGroup != NULL) { SessionPtr session = superGroup->get(waiter.options, waiter.callback, postLockActions); if (session != NULL) { postLockActions.push_back(boost::bind( waiter.callback, session, ExceptionPtr())); } /* else: the callback has now been put in * the group's get wait list. */ } else if (!atFullCapacity(false)) { createSuperGroupAndAsyncGetFromIt(waiter.options, waiter.callback, postLockActions); } else { /* Still cannot satisfy this get request. Keep it on the get * wait list and try again later. */ newWaitlist.push_back(waiter); } } std::swap(getWaitlist, newWaitlist); } template static void assignExceptionToGetWaiters(Queue &getWaitlist, const ExceptionPtr &exception, vector &postLockActions) { while (!getWaitlist.empty()) { postLockActions.push_back(boost::bind( getWaitlist.front().callback, SessionPtr(), exception)); getWaitlist.pop_front(); } } void possiblySpawnMoreProcessesForExistingGroups() { StringMap::const_iterator sg_it, sg_end = superGroups.end(); /* Looks for Groups that are waiting for capacity to become available, * and spawn processes in those groups. */ for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) { pair p = *sg_it; foreach (GroupPtr group, p.second->groups) { if (group->isWaitingForCapacity()) { P_DEBUG("Group " << group->name << " is waiting for capacity"); group->spawn(); if (atFullCapacity(false)) { return; } } } } /* Now look for Groups that haven't maximized their allowed capacity * yet, and spawn processes in those groups. */ for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) { pair p = *sg_it; foreach (GroupPtr group, p.second->groups) { if (group->shouldSpawn()) { P_DEBUG("Group " << group->name << " requests more processes to be spawned"); group->spawn(); if (atFullCapacity(false)) { return; } } } } } void migrateSuperGroupGetWaitlistToPool(const SuperGroupPtr &superGroup) { getWaitlist.reserve(getWaitlist.size() + superGroup->getWaitlist.size()); while (!superGroup->getWaitlist.empty()) { getWaitlist.push_back(superGroup->getWaitlist.front()); superGroup->getWaitlist.pop_front(); } } /** * Calls Group::detach() so be sure to fix up the invariants afterwards. * See the comments for Group::detach() and the code for detachProcessUnlocked(). */ ProcessPtr forceFreeCapacity(const Group *exclude, vector &postLockActions) { ProcessPtr process = findOldestIdleProcess(exclude); if (process != NULL) { P_DEBUG("Forcefully detaching process " << process->inspect() << " in order to free capacity in the pool"); const GroupPtr group = process->getGroup(); assert(group != NULL); assert(group->getWaitlist.empty()); const SuperGroupPtr superGroup = group->getSuperGroup(); assert(superGroup != NULL); group->detach(process, postLockActions); } return process; } /** * Forcefully destroys and detaches the given SuperGroup. After detaching * the SuperGroup may have a non-empty getWaitlist so be sure to do * something with it. * * Also, one of the post lock actions can potentially perform a long-running * operation, so running them in a thread is advised. */ void forceDetachSuperGroup(const SuperGroupPtr &superGroup, vector &postLockActions, const SuperGroup::ShutdownCallback &callback) { const SuperGroupPtr sp = superGroup; // Prevent premature destruction. bool removed = superGroups.remove(superGroup->name); assert(removed); (void) removed; // Shut up compiler warning. superGroup->destroy(false, postLockActions, callback); } bool detachProcessUnlocked(const ProcessPtr &process, vector &postLockActions) { if (OXT_LIKELY(process->isAlive())) { verifyInvariants(); const GroupPtr group = process->getGroup(); const SuperGroupPtr superGroup = group->getSuperGroup(); assert(superGroup->state != SuperGroup::INITIALIZING); assert(superGroup->getWaitlist.empty()); group->detach(process, postLockActions); // 'process' may now be a stale pointer so don't use it anymore. assignSessionsToGetWaiters(postLockActions); possiblySpawnMoreProcessesForExistingGroups(); group->verifyInvariants(); superGroup->verifyInvariants(); verifyInvariants(); verifyExpensiveInvariants(); return true; } else { return false; } } void inspectProcessList(const InspectOptions &options, stringstream &result, const Group *group, const ProcessList &processes) const { ProcessList::const_iterator p_it; for (p_it = processes.begin(); p_it != processes.end(); p_it++) { const ProcessPtr &process = *p_it; char buf[128]; char cpubuf[10]; char membuf[10]; snprintf(cpubuf, sizeof(cpubuf), "%d%%", (int) process->metrics.cpu); snprintf(membuf, sizeof(membuf), "%ldM", (unsigned long) (process->metrics.realMemory() / 1024)); snprintf(buf, sizeof(buf), " * PID: %-5lu Sessions: %-2u Processed: %-5u Uptime: %s\n" " CPU: %-5s Memory : %-5s Last used: %s ago", (unsigned long) process->pid, process->sessions, process->processed, process->uptime().c_str(), cpubuf, membuf, distanceOfTimeInWords(process->lastUsed / 1000000).c_str()); result << buf << endl; if (process->enabled == Process::DISABLING) { result << " Disabling..." << endl; } else if (process->enabled == Process::DISABLED) { result << " DISABLED" << endl; } else if (process->enabled == Process::DETACHED) { result << " Shutting down..." << endl; } const Socket *socket; if (options.verbose && (socket = process->sockets->findSocketWithName("http")) != NULL) { result << " URL : http://" << replaceString(socket->address, "tcp://", "") << endl; result << " Password: " << process->connectPassword << endl; } } } struct DetachSuperGroupWaitTicket { boost::mutex syncher; boost::condition_variable cond; SuperGroup::ShutdownResult result; bool done; DetachSuperGroupWaitTicket() { done = false; } }; struct DisableWaitTicket { boost::mutex syncher; boost::condition_variable cond; DisableResult result; bool done; DisableWaitTicket() { done = false; } }; static void syncDetachSuperGroupCallback(SuperGroup::ShutdownResult result, boost::shared_ptr ticket) { LockGuard l(ticket->syncher); ticket->done = true; ticket->result = result; ticket->cond.notify_one(); } static void waitDetachSuperGroupCallback(boost::shared_ptr ticket) { ScopedLock l(ticket->syncher); while (!ticket->done) { ticket->cond.wait(l); } } static void syncDisableProcessCallback(const ProcessPtr &process, DisableResult result, boost::shared_ptr ticket) { LockGuard l(ticket->syncher); ticket->done = true; ticket->result = result; ticket->cond.notify_one(); } static void syncGetCallback(Ticket *ticket, const SessionPtr &session, const ExceptionPtr &e) { ScopedLock lock(ticket->syncher); if (OXT_LIKELY(session != NULL)) { ticket->session = session; } else { ticket->exception = e; } ticket->cond.notify_one(); } SuperGroup *findMatchingSuperGroup(const Options &options) { return superGroups.get(options.getAppGroupName()).get(); } struct GarbageCollectorState { unsigned long long now; unsigned long long nextGcRunTime; vector actions; }; static void garbageCollect(PoolPtr self) { TRACE_POINT(); { ScopedLock lock(self->syncher); self->garbageCollectionCond.timed_wait(lock, posix_time::seconds(5)); } while (!this_thread::interruption_requested()) { try { UPDATE_TRACE_POINT(); unsigned long long sleepTime = self->realGarbageCollect(); ScopedLock lock(self->syncher); self->garbageCollectionCond.timed_wait(lock, posix_time::microseconds(sleepTime)); } catch (const thread_interrupted &) { break; } catch (const tracable_exception &e) { P_WARN("ERROR: " << e.what() << "\n Backtrace:\n" << e.backtrace()); } } } void maybeUpdateNextGcRuntime(GarbageCollectorState &state, unsigned long candidate) { if (state.nextGcRunTime == 0 || candidate < state.nextGcRunTime) { state.nextGcRunTime = candidate; } } void maybeDetachIdleProcess(GarbageCollectorState &state, const GroupPtr &group, const ProcessPtr &process, ProcessList::iterator &p_it) { assert(maxIdleTime > 0); unsigned long long processGcTime = process->lastUsed + maxIdleTime; if (process->sessions == 0 && state.now >= processGcTime && (unsigned long) group->getProcessCount() > group->options.minProcesses) { ProcessList::iterator prev = p_it; prev--; P_DEBUG("Garbage collect idle process: " << process->inspect() << ", group=" << group->name); group->detach(process, state.actions); p_it = prev; } else { maybeUpdateNextGcRuntime(state, processGcTime); } } void maybeCleanPreloader(GarbageCollectorState &state, const GroupPtr &group) { if (group->spawner->cleanable() && group->options.getMaxPreloaderIdleTime() != 0) { unsigned long long spawnerGcTime = group->spawner->lastUsed() + group->options.getMaxPreloaderIdleTime() * 1000000; if (state.now >= spawnerGcTime) { P_DEBUG("Garbage collect idle spawner: group=" << group->name); group->cleanupSpawner(state.actions); } else { maybeUpdateNextGcRuntime(state, spawnerGcTime); } } } unsigned long long realGarbageCollect() { TRACE_POINT(); ScopedLock lock(syncher); SuperGroupMap::iterator it, end = superGroups.end(); GarbageCollectorState state; state.now = SystemTime::getUsec(); state.nextGcRunTime = 0; P_DEBUG("Garbage collection time..."); verifyInvariants(); // For all supergroups and groups... for (it = superGroups.begin(); it != end; it++) { SuperGroupPtr superGroup = it->second; vector &groups = superGroup->groups; vector::iterator g_it, g_end = groups.end(); superGroup->verifyInvariants(); for (g_it = groups.begin(); g_it != g_end; g_it++) { GroupPtr group = *g_it; if (maxIdleTime > 0) { ProcessList &processes = group->enabledProcesses; ProcessList::iterator p_it, p_end = processes.end(); for (p_it = processes.begin(); p_it != p_end; p_it++) { ProcessPtr process = *p_it; // ...detach processes that have been idle for more than maxIdleTime. maybeDetachIdleProcess(state, group, process, p_it); } } group->verifyInvariants(); // ...cleanup the spawner if it's been idle for more than preloaderIdleTime. maybeCleanPreloader(state, group); } superGroup->verifyInvariants(); } verifyInvariants(); lock.unlock(); // Schedule next garbage collection run. unsigned long long sleepTime; if (state.nextGcRunTime == 0 || state.nextGcRunTime <= state.now) { if (maxIdleTime == 0) { sleepTime = 10 * 60 * 1000000; } else { sleepTime = maxIdleTime; } } else { sleepTime = state.nextGcRunTime - state.now; } P_DEBUG("Garbage collection done; next garbage collect in " << std::fixed << std::setprecision(3) << (sleepTime / 1000000.0) << " sec"); UPDATE_TRACE_POINT(); runAllActions(state.actions); UPDATE_TRACE_POINT(); state.actions.clear(); return sleepTime; } struct ProcessAnalyticsLogEntry { string groupName; string key; stringstream data; }; typedef boost::shared_ptr ProcessAnalyticsLogEntryPtr; static void collectAnalytics(PoolPtr self) { TRACE_POINT(); syscalls::usleep(3000000); while (!this_thread::interruption_requested()) { try { UPDATE_TRACE_POINT(); unsigned long long sleepTime = self->realCollectAnalytics(); syscalls::usleep(sleepTime); } catch (const thread_interrupted &) { break; } catch (const tracable_exception &e) { P_WARN("ERROR: " << e.what() << "\n Backtrace:\n" << e.backtrace()); } } } static void collectPids(const ProcessList &processes, vector &pids) { foreach (const ProcessPtr &process, processes) { pids.push_back(process->pid); } } static void updateProcessMetrics(const ProcessList &processes, const ProcessMetricMap &allMetrics, vector &processesToDetach) { foreach (const ProcessPtr &process, processes) { ProcessMetricMap::const_iterator metrics_it = allMetrics.find(process->pid); if (metrics_it != allMetrics.end()) { process->metrics = metrics_it->second; // If the process is missing from 'allMetrics' then either 'ps' // failed or the process really is gone. We double check by sending // it a signal. } else if (!process->dummy && !process->osProcessExists()) { P_WARN("Process " << process->inspect() << " no longer exists! " "Detaching it from the pool."); processesToDetach.push_back(process); } } } unsigned long long realCollectAnalytics() { TRACE_POINT(); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; vector pids; unsigned int max; P_DEBUG("Analytics collection time..."); // Collect all the PIDs. { UPDATE_TRACE_POINT(); LockGuard l(syncher); max = this->max; } pids.reserve(max); { UPDATE_TRACE_POINT(); LockGuard l(syncher); SuperGroupMap::const_iterator sg_it, sg_end = superGroups.end(); for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) { const SuperGroupPtr &superGroup = sg_it->second; vector::const_iterator g_it, g_end = superGroup->groups.end(); for (g_it = superGroup->groups.begin(); g_it != g_end; g_it++) { const GroupPtr &group = *g_it; collectPids(group->enabledProcesses, pids); collectPids(group->disablingProcesses, pids); collectPids(group->disabledProcesses, pids); } } } ProcessMetricMap allMetrics; try { // Now collect the process metrics and store them in the // data structures, and log the state into the analytics logs. UPDATE_TRACE_POINT(); allMetrics = ProcessMetricsCollector().collect(pids); } catch (const ProcessMetricsCollector::ParseException &) { P_WARN("Unable to collect process metrics: cannot parse 'ps' output."); goto end; } { UPDATE_TRACE_POINT(); vector logEntries; vector processesToDetach; vector actions; ScopedLock l(syncher); SuperGroupMap::iterator sg_it, sg_end = superGroups.end(); UPDATE_TRACE_POINT(); for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) { const SuperGroupPtr &superGroup = sg_it->second; vector::iterator g_it, g_end = superGroup->groups.end(); for (g_it = superGroup->groups.begin(); g_it != g_end; g_it++) { const GroupPtr &group = *g_it; updateProcessMetrics(group->enabledProcesses, allMetrics, processesToDetach); updateProcessMetrics(group->disablingProcesses, allMetrics, processesToDetach); updateProcessMetrics(group->disabledProcesses, allMetrics, processesToDetach); // Log to Union Station. if (group->options.analytics && loggerFactory != NULL) { ProcessAnalyticsLogEntryPtr entry = boost::make_shared(); stringstream &xml = entry->data; entry->groupName = group->name; entry->key = group->options.unionStationKey; xml << "Group: "; group->inspectXml(xml, false); xml << ""; logEntries.push_back(entry); } } } UPDATE_TRACE_POINT(); foreach (const ProcessPtr process, processesToDetach) { detachProcessUnlocked(process, actions); } UPDATE_TRACE_POINT(); processesToDetach.clear(); l.unlock(); UPDATE_TRACE_POINT(); while (!logEntries.empty()) { ProcessAnalyticsLogEntryPtr entry = logEntries.back(); logEntries.pop_back(); LoggerPtr logger = loggerFactory->newTransaction(entry->groupName, "processes", entry->key); logger->message(entry->data.str()); } UPDATE_TRACE_POINT(); runAllActions(actions); UPDATE_TRACE_POINT(); // Run destructors with updated trace point. actions.clear(); } end: // Sleep for about 4 seconds, aligned to seconds boundary // for saving power on laptops. unsigned long long currentTime = SystemTime::getUsec(); unsigned long long deadline = roundUp(currentTime, 1000000) + 4000000; P_DEBUG("Analytics collection done; next analytics collection in " << std::fixed << std::setprecision(3) << ((deadline - currentTime) / 1000000.0) << " sec"); return deadline - currentTime; } SuperGroupPtr createSuperGroup(const Options &options) { SuperGroupPtr superGroup = boost::make_shared(shared_from_this(), options); superGroup->initialize(); superGroups.set(options.getAppGroupName(), superGroup); garbageCollectionCond.notify_all(); return superGroup; } SuperGroupPtr createSuperGroupAndAsyncGetFromIt(const Options &options, const GetCallback &callback, vector &postLockActions) { SuperGroupPtr superGroup = createSuperGroup(options); SessionPtr session = superGroup->get(options, callback, postLockActions); /* Callback should now have been put on the wait list, * unless something has changed and we forgot to update * some code here... */ assert(session == NULL); return superGroup; } // Debugging helper function, implemented in .cpp file so that GDB can access it. const SuperGroupPtr getSuperGroup(const char *name); public: Pool(const SpawnerFactoryPtr &spawnerFactory, const LoggerFactoryPtr &loggerFactory = LoggerFactoryPtr(), const RandomGeneratorPtr &randomGenerator = RandomGeneratorPtr(), const VariantMap *agentsOptions = NULL) { this->spawnerFactory = spawnerFactory; this->loggerFactory = loggerFactory; if (randomGenerator != NULL) { this->randomGenerator = randomGenerator; } else { this->randomGenerator = boost::make_shared(); } this->agentsOptions = agentsOptions; lifeStatus = ALIVE; max = 6; maxIdleTime = 60 * 1000000; // The following code only serve to instantiate certain inline methods // so that they can be invoked from gdb. (void) SuperGroupPtr().get(); (void) GroupPtr().get(); (void) ProcessPtr().get(); (void) SessionPtr().get(); } ~Pool() { if (lifeStatus != SHUT_DOWN) { P_BUG("You must call Pool::destroy() before actually destroying the Pool object!"); } } /** Must be called right after construction. */ void initialize() { LockGuard l(syncher); interruptableThreads.create_thread( boost::bind(collectAnalytics, shared_from_this()), "Pool analytics collector", POOL_HELPER_THREAD_STACK_SIZE ); interruptableThreads.create_thread( boost::bind(garbageCollect, shared_from_this()), "Pool garbage collector", POOL_HELPER_THREAD_STACK_SIZE ); } void initDebugging() { LockGuard l(syncher); debugSupport = boost::make_shared(); } /** Should be called right after the HelperAgent has received * the message to exit gracefully. This will tell processes to * abort any long-running connections, e.g. WebSocket connections, * because the RequestHandler has to wait until all connections are * finished before proceeding with shutdown. */ void prepareForShutdown() { TRACE_POINT(); ScopedLock lock(syncher); assert(lifeStatus == ALIVE); lifeStatus = PREPARED_FOR_SHUTDOWN; vector processes = getProcesses(false); foreach (ProcessPtr process, processes) { if (process->abortLongRunningConnections()) { // Ensure that the process is not immediately respawned. process->getGroup()->options.minProcesses = 0; } } } /** Must be called right before destruction. */ void destroy() { TRACE_POINT(); ScopedLock lock(syncher); assert(lifeStatus == ALIVE || lifeStatus == PREPARED_FOR_SHUTDOWN); lifeStatus = SHUTTING_DOWN; while (!superGroups.empty()) { string name = superGroups.begin()->second->name; lock.unlock(); detachSuperGroupByName(name); lock.lock(); } UPDATE_TRACE_POINT(); lock.unlock(); interruptableThreads.interrupt_and_join_all(); nonInterruptableThreads.join_all(); lock.lock(); lifeStatus = SHUT_DOWN; UPDATE_TRACE_POINT(); verifyInvariants(); verifyExpensiveInvariants(); } // 'lockNow == false' may only be used during unit tests. Normally we // should never call the callback while holding the lock. void asyncGet(const Options &options, const GetCallback &callback, bool lockNow = true) { DynamicScopedLock lock(syncher, lockNow); assert(lifeStatus == ALIVE || lifeStatus == PREPARED_FOR_SHUTDOWN); verifyInvariants(); P_TRACE(2, "asyncGet(appGroupName=" << options.getAppGroupName() << ")"); vector actions; SuperGroup *existingSuperGroup = findMatchingSuperGroup(options); if (OXT_LIKELY(existingSuperGroup != NULL)) { /* Best case: the app super group is already in the pool. Let's use it. */ P_TRACE(2, "Found existing SuperGroup"); existingSuperGroup->verifyInvariants(); SessionPtr session = existingSuperGroup->get(options, callback, actions); existingSuperGroup->verifyInvariants(); verifyInvariants(); P_TRACE(2, "asyncGet() finished"); if (lockNow) { lock.unlock(); } if (session != NULL) { callback(session, ExceptionPtr()); } } else if (!atFullCapacity(false)) { /* The app super group isn't in the pool and we have enough free * resources to make a new one. */ P_DEBUG("Spawning new SuperGroup"); SuperGroupPtr superGroup = createSuperGroupAndAsyncGetFromIt(options, callback, actions); superGroup->verifyInvariants(); verifyInvariants(); P_DEBUG("asyncGet() finished"); } else { /* Uh oh, the app super group isn't in the pool but we don't * have the resources to make a new one. The sysadmin should * configure the system to let something like this happen * as least as possible, but let's try to handle it as well * as we can. */ ProcessPtr freedProcess = forceFreeCapacity(NULL, actions); if (freedProcess == NULL) { /* No process is eligible for killing. This could happen if, for example, * all (super)groups are currently initializing/restarting/spawning/etc. * We have no choice but to satisfy this get() action later when resources * become available. */ P_DEBUG("Could not free a process; putting request to top-level getWaitlist"); getWaitlist.push_back(GetWaiter( options.copyAndPersist().clearLogger(), callback)); } else { /* Now that a process has been trashed we can create * the missing SuperGroup. */ P_DEBUG("Creating new SuperGroup"); SuperGroupPtr superGroup; superGroup = boost::make_shared(shared_from_this(), options); superGroup->initialize(); superGroups.set(options.getAppGroupName(), superGroup); garbageCollectionCond.notify_all(); SessionPtr session = superGroup->get(options, callback, actions); /* The SuperGroup is still initializing so the callback * should now have been put on the wait list, * unless something has changed and we forgot to update * some code here... */ assert(session == NULL); freedProcess->getGroup()->verifyInvariants(); superGroup->verifyInvariants(); } assert(atFullCapacity(false)); verifyInvariants(); verifyExpensiveInvariants(); P_TRACE(2, "asyncGet() finished"); } if (!actions.empty()) { if (lockNow) { if (lock.owns_lock()) { lock.unlock(); } runAllActions(actions); } else { // This state is not allowed. If we reach // here then it probably indicates a bug in // the test suite. abort(); } } } // TODO: 'ticket' should be a boost::shared_ptr for interruption-safety. SessionPtr get(const Options &options, Ticket *ticket) { ticket->session.reset(); ticket->exception.reset(); asyncGet(options, boost::bind(syncGetCallback, ticket, _1, _2)); ScopedLock lock(ticket->syncher); while (ticket->session == NULL && ticket->exception == NULL) { ticket->cond.wait(lock); } lock.unlock(); if (OXT_LIKELY(ticket->session != NULL)) { SessionPtr session = ticket->session; ticket->session.reset(); return session; } else { rethrowException(ticket->exception); return SessionPtr(); // Shut up compiler warning. } } GroupPtr findOrCreateGroup(const Options &options) { Options options2 = options; options2.noop = true; Ticket ticket; { LockGuard l(syncher); if (superGroups.get(options.getAppGroupName()) == NULL) { // Forcefully create SuperGroup, don't care whether resource limits // actually allow it. createSuperGroup(options); } } return get(options2, &ticket)->getGroup(); } void setMax(unsigned int max) { ScopedLock l(syncher); assert(max > 0); fullVerifyInvariants(); bool bigger = max > this->max; this->max = max; if (bigger) { /* If there are clients waiting for resources * to become free, spawn more processes now that * we have the capacity. * * We favor waiters on the pool over waiters on the * the groups because the latter already have the * resources to eventually complete. Favoring waiters * on the pool should be fairer. */ vector actions; assignSessionsToGetWaiters(actions); possiblySpawnMoreProcessesForExistingGroups(); fullVerifyInvariants(); l.unlock(); runAllActions(actions); } else { fullVerifyInvariants(); } } void setMaxIdleTime(unsigned long long value) { LockGuard l(syncher); maxIdleTime = value; garbageCollectionCond.notify_all(); } unsigned int capacityUsed(bool lock = true) const { DynamicScopedLock l(syncher, lock); SuperGroupMap::const_iterator it, end = superGroups.end(); int result = 0; for (it = superGroups.begin(); it != end; it++) { const SuperGroupPtr &superGroup = it->second; result += superGroup->capacityUsed(); } return result; } bool atFullCapacity(bool lock = true) const { DynamicScopedLock l(syncher, lock); return capacityUsed(false) >= max; } vector getProcesses(bool lock = true) const { DynamicScopedLock l(syncher, lock); vector result; SuperGroupMap::const_iterator it, end = superGroups.end(); for (it = superGroups.begin(); OXT_LIKELY(it != end); it++) { const SuperGroupPtr &superGroup = it->second; vector &groups = superGroup->groups; vector::const_iterator g_it, g_end = groups.end(); for (g_it = groups.begin(); g_it != g_end; g_it++) { const GroupPtr &group = *g_it; ProcessList::const_iterator p_it; for (p_it = group->enabledProcesses.begin(); p_it != group->enabledProcesses.end(); p_it++) { result.push_back(*p_it); } for (p_it = group->disablingProcesses.begin(); p_it != group->disablingProcesses.end(); p_it++) { result.push_back(*p_it); } for (p_it = group->disabledProcesses.begin(); p_it != group->disabledProcesses.end(); p_it++) { result.push_back(*p_it); } } } return result; } /** * Returns the total number of processes in the pool, including all disabling and * disabled processes, but excluding processes that are shutting down and excluding * processes that are being spawned. */ unsigned int getProcessCount(bool lock = true) const { DynamicScopedLock l(syncher, lock); unsigned int result = 0; SuperGroupMap::const_iterator it, end = superGroups.end(); for (it = superGroups.begin(); OXT_LIKELY(it != end); it++) { const SuperGroupPtr &superGroup = it->second; result += superGroup->getProcessCount(); } return result; } unsigned int getSuperGroupCount() const { LockGuard l(syncher); return superGroups.size(); } SuperGroupPtr findSuperGroupBySecret(const string &secret, bool lock = true) const { DynamicScopedLock l(syncher, lock); SuperGroupMap::const_iterator it, end = superGroups.end(); for (it = superGroups.begin(); OXT_LIKELY(it != end); it++) { const SuperGroupPtr &superGroup = it->second; if (superGroup->secret == secret) { return superGroup; } } return SuperGroupPtr(); } ProcessPtr findProcessByGupid(const string &gupid, bool lock = true) const { vector processes = getProcesses(lock); vector::const_iterator it, end = processes.end(); for (it = processes.begin(); it != end; it++) { const ProcessPtr &process = *it; if (process->gupid == gupid) { return process; } } return ProcessPtr(); } ProcessPtr findProcessByPid(pid_t pid, bool lock = true) const { vector processes = getProcesses(lock); vector::const_iterator it, end = processes.end(); for (it = processes.begin(); it != end; it++) { const ProcessPtr &process = *it; if (process->pid == pid) { return process; } } return ProcessPtr(); } bool detachSuperGroupByName(const string &name) { TRACE_POINT(); ScopedLock l(syncher); SuperGroupPtr superGroup = superGroups.get(name); if (OXT_LIKELY(superGroup != NULL)) { if (OXT_LIKELY(superGroups.get(superGroup->name) != NULL)) { UPDATE_TRACE_POINT(); verifyInvariants(); verifyExpensiveInvariants(); vector actions; boost::shared_ptr ticket = boost::make_shared(); ExceptionPtr exception = copyException( GetAbortedException("The containing SuperGroup was detached.")); forceDetachSuperGroup(superGroup, actions, boost::bind(syncDetachSuperGroupCallback, _1, ticket)); assignExceptionToGetWaiters(superGroup->getWaitlist, exception, actions); #if 0 /* If this SuperGroup had get waiters, either * on itself or in one of its groups, then we must * reprocess them immediately. Detaching such a * SuperGroup is essentially the same as restarting it. */ migrateSuperGroupGetWaitlistToPool(superGroup); UPDATE_TRACE_POINT(); assignSessionsToGetWaiters(actions); #endif possiblySpawnMoreProcessesForExistingGroups(); verifyInvariants(); verifyExpensiveInvariants(); l.unlock(); UPDATE_TRACE_POINT(); runAllActions(actions); actions.clear(); UPDATE_TRACE_POINT(); ScopedLock l2(ticket->syncher); while (!ticket->done) { ticket->cond.wait(l2); } return ticket->result == SuperGroup::SUCCESS; } else { return false; } } else { return false; } } bool detachSuperGroupBySecret(const string &superGroupSecret) { ScopedLock l(syncher); SuperGroupPtr superGroup = findSuperGroupBySecret(superGroupSecret, false); if (superGroup != NULL) { string name = superGroup->name; superGroup.reset(); l.unlock(); return detachSuperGroupByName(name); } else { return false; } } bool detachProcess(const ProcessPtr &process) { ScopedLock l(syncher); vector actions; bool result = detachProcessUnlocked(process, actions); fullVerifyInvariants(); l.unlock(); runAllActions(actions); return result; } bool detachProcess(pid_t pid) { ScopedLock l(syncher); ProcessPtr process = findProcessByPid(pid, false); if (process != NULL) { vector actions; bool result = detachProcessUnlocked(process, actions); fullVerifyInvariants(); l.unlock(); runAllActions(actions); return result; } else { return false; } } bool detachProcess(const string &gupid) { ScopedLock l(syncher); ProcessPtr process = findProcessByGupid(gupid, false); if (process != NULL) { vector actions; bool result = detachProcessUnlocked(process, actions); fullVerifyInvariants(); l.unlock(); runAllActions(actions); return result; } else { return false; } } DisableResult disableProcess(const string &gupid) { ScopedLock l(syncher); ProcessPtr process = findProcessByGupid(gupid, false); if (process != NULL) { GroupPtr group = process->getGroup(); // Must be a boost::shared_ptr to be interruption-safe. boost::shared_ptr ticket = boost::make_shared(); DisableResult result = group->disable(process, boost::bind(syncDisableProcessCallback, _1, _2, ticket)); group->verifyInvariants(); group->verifyExpensiveInvariants(); if (result == DR_DEFERRED) { l.unlock(); ScopedLock l2(ticket->syncher); while (!ticket->done) { ticket->cond.wait(l2); } return ticket->result; } else { return result; } } else { return DR_NOOP; } } bool restartGroupByName(const StaticString &name, RestartMethod method = RM_DEFAULT) { ScopedLock l(syncher); SuperGroupMap::iterator sg_it, sg_end = superGroups.end(); for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) { const SuperGroupPtr &superGroup = sg_it->second; foreach (const GroupPtr &group, superGroup->groups) { if (name == group->name) { if (!group->restarting()) { group->restart(group->options, method); } return true; } } } return false; } unsigned int restartSuperGroupsByAppRoot(const StaticString &appRoot) { ScopedLock l(syncher); SuperGroupMap::iterator sg_it, sg_end = superGroups.end(); unsigned int result = 0; for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) { const SuperGroupPtr &superGroup = sg_it->second; if (appRoot == superGroup->options.appRoot) { result++; superGroup->restart(superGroup->options); } } return result; } /** * Checks whether at least one process is being spawned. */ bool isSpawning(bool lock = true) const { DynamicScopedLock l(syncher, lock); SuperGroupMap::const_iterator it, end = superGroups.end(); for (it = superGroups.begin(); it != end; it++) { foreach (GroupPtr group, it->second->groups) { if (group->spawning()) { return true; } } } return false; } string inspect(const InspectOptions &options = InspectOptions(), bool lock = true) const { DynamicScopedLock l(syncher, lock); stringstream result; const char *headerColor = maybeColorize(options, ANSI_COLOR_YELLOW ANSI_COLOR_BLUE_BG ANSI_COLOR_BOLD); const char *resetColor = maybeColorize(options, ANSI_COLOR_RESET); result << headerColor << "----------- General information -----------" << resetColor << endl; result << "Max pool size : " << max << endl; result << "Processes : " << getProcessCount(false) << endl; result << "Requests in top-level queue : " << getWaitlist.size() << endl; if (options.verbose) { unsigned int i = 0; foreach (const GetWaiter &waiter, getWaitlist) { result << " " << i << ": " << waiter.options.getAppGroupName() << endl; i++; } } result << endl; result << headerColor << "----------- Application groups -----------" << resetColor << endl; SuperGroupMap::const_iterator sg_it, sg_end = superGroups.end(); for (sg_it = superGroups.begin(); sg_it != sg_end; sg_it++) { const SuperGroupPtr &superGroup = sg_it->second; const Group *group = superGroup->defaultGroup; ProcessList::const_iterator p_it; if (group != NULL) { result << group->name << ":" << endl; result << " App root: " << group->options.appRoot << endl; if (group->restarting()) { result << " (restarting...)" << endl; } if (group->spawning()) { if (group->processesBeingSpawned == 0) { result << " (spawning...)" << endl; } else { result << " (spawning " << group->processesBeingSpawned << " new " << maybePluralize(group->processesBeingSpawned, "process", "processes") << "...)" << endl; } } result << " Requests in queue: " << group->getWaitlist.size() << endl; inspectProcessList(options, result, group, group->enabledProcesses); inspectProcessList(options, result, group, group->disablingProcesses); inspectProcessList(options, result, group, group->disabledProcesses); inspectProcessList(options, result, group, group->detachedProcesses); result << endl; } } return result.str(); } string toXml(bool includeSecrets = true, bool lock = true) const { DynamicScopedLock l(syncher, lock); stringstream result; SuperGroupMap::const_iterator sg_it; vector::const_iterator g_it; ProcessList::const_iterator p_it; result << "\n"; result << ""; result << "" << getProcessCount(false) << ""; result << "" << max << ""; result << "" << capacityUsed(false) << ""; result << "" << getWaitlist.size() << ""; if (includeSecrets) { vector::const_iterator w_it, w_end = getWaitlist.end(); result << ""; for (w_it = getWaitlist.begin(); w_it != w_end; w_it++) { const GetWaiter &waiter = *w_it; result << ""; result << "" << escapeForXml(waiter.options.getAppGroupName()) << ""; result << ""; } result << ""; } result << ""; for (sg_it = superGroups.begin(); sg_it != superGroups.end(); sg_it++) { const SuperGroupPtr &superGroup = sg_it->second; result << ""; result << "" << escapeForXml(superGroup->name) << ""; result << "" << superGroup->getStateName() << ""; result << "" << superGroup->getWaitlist.size() << ""; result << "" << superGroup->capacityUsed() << ""; if (includeSecrets) { result << "" << escapeForXml(superGroup->secret) << ""; } for (g_it = superGroup->groups.begin(); g_it != superGroup->groups.end(); g_it++) { const GroupPtr &group = *g_it; if (group->componentInfo.isDefault) { result << ""; } else { result << ""; } group->inspectXml(result, includeSecrets); result << ""; } result << ""; } result << ""; result << ""; return result.str(); } }; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_POOL_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/Process.h000644 000765 000024 00000053554 12233035540 023266 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2014 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL_PROCESS_H_ #define _PASSENGER_APPLICATION_POOL_PROCESS_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; class ProcessList: public list { public: ProcessPtr &get(unsigned int index) { iterator it = begin(), end = this->end(); unsigned int i = 0; while (i != index && it != end) { i++; it++; } if (it == end) { throw RuntimeException("Index out of bounds"); } else { return *it; } } ProcessPtr &operator[](unsigned int index) { return get(index); } iterator last_iterator() { if (empty()) { return end(); } else { iterator last = end(); last--; return last; } } }; /** * Represents an application process, as spawned by a Spawner. Every Process has * a PID, an admin socket and a list of sockets on which it listens for * connections. A Process is usually contained inside a Group. * * The admin socket, an anonymous Unix domain socket, is mapped to the process's * STDIN and STDOUT and has two functions. * * 1. It acts as the main communication channel with the process. Commands are * sent to and responses are received from it. * 2. It's used for garbage collection: closing the STDIN part causes the process * to gracefully terminate itself. * * Except for the otherwise documented parts, this class is not thread-safe, * so only use within the Pool lock. * * ## Normal usage * * 1. Create a session with newSession(). * 2. Initiate the session by calling initiate() on it. * 3. Perform I/O through session->fd(). * 4. When done, close the session by calling close() on it. * 5. Call process.sessionClosed(). * * ## Life time * * A Process object lives until the containing Group calls `detach(process)`, * which indicates that it wants this Process to shut down. This causes * `signalDetached()` to be called, which may or may not send a message * to the process. After this, the Process object is stored in the * `detachedProcesses` collection in the Group and are no longer eligible for * receiving requests. Once all requests on this Process have finished, * `triggerShutdown()` will be called, which will send a message to the * process telling it to shut down. Once the process is gone, `cleanup()` is * called, and the Process object is removed from the collection. * * This means that a Group outlives all its Processes, a Process outlives all * its Sessions, and a Process also outlives the OS process. */ class Process: public boost::enable_shared_from_this { // Actually private, but marked public so that unit tests can access the fields. public: friend class Group; /** A mutex to protect access to `lifeStatus`. */ mutable boost::mutex lifetimeSyncher; /** Group inside the Pool that this Process belongs to. * Should never be NULL because a Group should outlive all of its Processes. * Read-only; only set once during initialization. */ boost::weak_ptr group; /** A subset of 'sockets': all sockets that speak the * "session" protocol, sorted by socket.busyness(). */ PriorityQueue sessionSockets; /** The iterator inside the associated Group's process list. */ ProcessList::iterator it; /** The handle inside the associated Group's process priority queue. */ PriorityQueue::Handle pqHandle; void sendAbortLongRunningConnectionsMessage(const string &address); static void realSendAbortLongRunningConnectionsMessage(string address); static bool isZombie(pid_t pid) { string filename = "/proc/" + toString(pid) + "/status"; FILE *f = fopen(filename.c_str(), "r"); if (f == NULL) { // Don't know. return false; } bool result = false; while (!feof(f)) { char buf[512]; const char *line; line = fgets(buf, sizeof(buf), f); if (line == NULL) { break; } if (strcmp(line, "State: Z (zombie)\n") == 0) { // Is a zombie. result = true; break; } } fclose(f); return result; } void indexSessionSockets() { SocketList::iterator it; concurrency = 0; for (it = sockets->begin(); it != sockets->end(); it++) { Socket *socket = &(*it); if (socket->protocol == "session" || socket->protocol == "http_session") { socket->pqHandle = sessionSockets.push(socket, socket->busyness()); if (concurrency != -1) { if (socket->concurrency == 0) { // If one of the sockets has a concurrency of // 0 (unlimited) then we mark this entire Process // as having a concurrency of 0. concurrency = -1; } else { concurrency += socket->concurrency; } } } } if (concurrency == -1) { concurrency = 0; } } public: /************************************************************* * Read-only fields, set once during initialization and never * written to again. Reading is thread-safe. *************************************************************/ /** The libev event loop to use. */ SafeLibev * const libev; /** Process PID. */ pid_t pid; /** An ID that uniquely identifies this Process in the Group, for * use in implementing sticky sessions. Set by Group::attach(). */ unsigned int stickySessionId; /** UUID for this process, randomly generated and extremely unlikely to ever * appear again in this universe. */ string gupid; string connectPassword; /** Admin socket, see class description. */ FileDescriptor adminSocket; /** The sockets that this Process listens on for connections. */ SocketListPtr sockets; /** Time at which the Spawner that created this process was created. * Microseconds resolution. */ unsigned long long spawnerCreationTime; /** Time at which we started spawning this process. Microseconds resolution. */ unsigned long long spawnStartTime; /** The maximum amount of concurrent sessions this process can handle. * 0 means unlimited. */ int concurrency; /** If true, then indicates that this Process does not refer to a real OS * process. The sockets in the socket list are fake and need not be deleted, * the admin socket need not be closed, etc. */ bool dummy; /** Whether it is required that triggerShutdown() and cleanup() must be called * before destroying this Process. Normally true, except for dummy Process * objects created by Pool::asyncGet() with options.noop == true, because those * processes are never added to Group.enabledProcesses. */ bool requiresShutdown; /************************************************************* * Information used by Pool. Do not write to these from * outside the Pool. If you read these make sure the Pool * isn't concurrently modifying. *************************************************************/ /** Time at which we finished spawning this process, i.e. when this * process was finished initializing. Microseconds resolution. */ unsigned long long spawnEndTime; /** Last time when a session was opened for this Process. */ unsigned long long lastUsed; /** Number of sessions currently open. * @invariant session >= 0 */ int sessions; /** Number of sessions opened so far. */ unsigned int processed; /** Do not access directly, always use `isAlive()`/`isDead()`/`getLifeStatus()` or * through `lifetimeSyncher`. */ enum LifeStatus { /** Up and operational. */ ALIVE, /** This process has been detached, and the detached processes checker has * verified that there are no active sessions left and has told the process * to shut down. In this state we're supposed to wait until the process * has actually shutdown, after which cleanup() must be called. */ SHUTDOWN_TRIGGERED, /** * The process has exited and cleanup() has been called. In this state, * this object is no longer usable. */ DEAD } lifeStatus; enum EnabledStatus { /** Up and operational. */ ENABLED, /** Process is being disabled. The containing Group is waiting for * all sessions on this Process to finish. It may in some corner * cases still be selected for processing requests. */ DISABLING, /** Process is fully disabled and should not be handling any * requests. It *may* still handle some requests, e.g. by * the Out-of-Band-Work trigger. */ DISABLED, /** * Process has been detached. It will be removed from the Group * as soon we have detected that the OS process has exited. Detached * processes are allowed to finish their requests, but are not * eligible for new requests. */ DETACHED } enabled; enum OobwStatus { /** Process is not using out-of-band work. */ OOBW_NOT_ACTIVE, /** The process has requested out-of-band work. At some point, the code * will see this and set the status to OOBW_IN_PROGRESS. */ OOBW_REQUESTED, /** An out-of-band work is in progress. We need to wait until all * sessions have ended and the process has been disabled before the * out-of-band work can be performed. */ OOBW_IN_PROGRESS, } oobwStatus; /** Caches whether or not the OS process still exists. */ mutable bool m_osProcessExists; bool longRunningConnectionsAborted; /** Time at which shutdown began. */ time_t shutdownStartTime; /** Collected by Pool::collectAnalytics(). */ ProcessMetrics metrics; Process(const SafeLibevPtr _libev, pid_t _pid, const string &_gupid, const string &_connectPassword, const FileDescriptor &_adminSocket, /** Pipe on which this process outputs errors. Mapped to the process's STDERR. * Only Processes spawned by DirectSpawner have this set. * SmartSpawner-spawned Processes use the same STDERR as their parent preloader processes. */ const FileDescriptor &_errorPipe, const SocketListPtr &_sockets, unsigned long long _spawnerCreationTime, unsigned long long _spawnStartTime, const SpawnerConfigPtr &_config = SpawnerConfigPtr()) : pqHandle(NULL), libev(_libev.get()), pid(_pid), stickySessionId(0), gupid(_gupid), connectPassword(_connectPassword), adminSocket(_adminSocket), sockets(_sockets), spawnerCreationTime(_spawnerCreationTime), spawnStartTime(_spawnStartTime), concurrency(0), dummy(false), requiresShutdown(true), sessions(0), processed(0), lifeStatus(ALIVE), enabled(ENABLED), oobwStatus(OOBW_NOT_ACTIVE), m_osProcessExists(true), longRunningConnectionsAborted(false), shutdownStartTime(0) { SpawnerConfigPtr config; if (_config == NULL) { config = boost::make_shared(); } else { config = _config; } if (_adminSocket != -1) { PipeWatcherPtr watcher = boost::make_shared(_adminSocket, "stdout", pid); watcher->initialize(); watcher->start(); } if (_errorPipe != -1) { PipeWatcherPtr watcher = boost::make_shared(_errorPipe, "stderr", pid); watcher->initialize(); watcher->start(); } if (OXT_LIKELY(sockets != NULL)) { indexSessionSockets(); } lastUsed = SystemTime::getUsec(); spawnEndTime = lastUsed; } ~Process() { if (OXT_UNLIKELY(!isDead() && requiresShutdown)) { P_BUG("You must call Process::triggerShutdown() and Process::cleanup() before actually " "destroying the Process object."); } } static void forceTriggerShutdownAndCleanup(ProcessPtr process) { if (process != NULL) { process->triggerShutdown(); // Pretend like the OS process has exited so // that the canCleanup() precondition is true. process->m_osProcessExists = false; process->cleanup(); } } /** * Thread-safe. * @pre getLifeState() != SHUT_DOWN * @post result != NULL */ const GroupPtr getGroup() const { assert(!isDead()); return group.lock(); } void setGroup(const GroupPtr &group) { assert(this->group.lock() == NULL || this->group.lock() == group); this->group = group; } /** * Thread-safe. * @pre getLifeState() != DEAD * @post result != NULL */ PoolPtr getPool() const; /** * Thread-safe. * @pre getLifeState() != DEAD * @post result != NULL */ SuperGroupPtr getSuperGroup() const; // Thread-safe. bool isAlive() const { boost::lock_guard lock(lifetimeSyncher); return lifeStatus == ALIVE; } // Thread-safe. bool hasTriggeredShutdown() const { boost::lock_guard lock(lifetimeSyncher); return lifeStatus == SHUTDOWN_TRIGGERED; } // Thread-safe. bool isDead() const { boost::lock_guard lock(lifetimeSyncher); return lifeStatus == DEAD; } // Thread-safe. LifeStatus getLifeStatus() const { boost::lock_guard lock(lifetimeSyncher); return lifeStatus; } bool abortLongRunningConnections() { bool sent = false; if (!longRunningConnectionsAborted) { SocketList::iterator it, end = sockets->end(); for (it = sockets->begin(); it != end; it++) { Socket *socket = &(*it); if (socket->name == "control") { sendAbortLongRunningConnectionsMessage(socket->address); sent = true; } } longRunningConnectionsAborted = true; } return sent; } bool canTriggerShutdown() const { return getLifeStatus() == ALIVE && sessions == 0; } void triggerShutdown() { assert(canTriggerShutdown()); { boost::lock_guard lock(lifetimeSyncher); assert(lifeStatus == ALIVE); lifeStatus = SHUTDOWN_TRIGGERED; shutdownStartTime = SystemTime::get(); } if (!dummy) { syscalls::shutdown(adminSocket, SHUT_WR); } } bool shutdownTimeoutExpired() const { return SystemTime::get() >= shutdownStartTime + PROCESS_SHUTDOWN_TIMEOUT; } bool canCleanup() const { return getLifeStatus() == SHUTDOWN_TRIGGERED && !osProcessExists(); } void cleanup() { assert(canCleanup()); P_TRACE(2, "Cleaning up process " << inspect()); if (!dummy) { if (OXT_LIKELY(sockets != NULL)) { SocketList::const_iterator it, end = sockets->end(); for (it = sockets->begin(); it != end; it++) { if (getSocketAddressType(it->address) == SAT_UNIX) { string filename = parseUnixSocketAddress(it->address); syscalls::unlink(filename.c_str()); } } } } boost::lock_guard lock(lifetimeSyncher); lifeStatus = DEAD; } /** Checks whether the OS process exists. * Once it has been detected that it doesn't, that event is remembered * so that we don't accidentally ping any new processes that have the * same PID. */ bool osProcessExists() const { if (!dummy && m_osProcessExists) { if (syscalls::kill(pid, 0) == 0) { /* On some environments, e.g. Heroku, the init process does * not properly reap adopted zombie processes, which can interfere * with our process existance check. To work around this, we * explicitly check whether or not the process has become a zombie. */ m_osProcessExists = !isZombie(pid); } else { m_osProcessExists = errno != ESRCH; } return m_osProcessExists; } else { return false; } } /** Kill the OS process with the given signal. */ int kill(int signo) { if (osProcessExists()) { return syscalls::kill(pid, signo); } else { return 0; } } int busyness() const { /* Different processes within a Group may have different * 'concurrency' values. We want: * - Group.pqueue to sort the processes from least used to most used. * - to give processes with concurrency == 0 more priority over processes * with concurrency > 0. * Therefore, we describe our busyness as a percentage of 'concurrency', with * the percentage value in [0..INT_MAX] instead of [0..1]. */ if (concurrency == 0) { // Allows Group.pqueue to give idle sockets more priority. if (sessions == 0) { return 0; } else { return 1; } } else { return (int) (((long long) sessions * INT_MAX) / (double) concurrency); } } /** * Whether we've reached the maximum number of concurrent sessions for this * process. */ bool isTotallyBusy() const { return concurrency != 0 && sessions >= concurrency; } /** * Whether a get() request can be routed to this process, assuming that * the sticky session ID (if any) matches. This is only not the case * if this process is totally busy. */ bool canBeRoutedTo() const { return !isTotallyBusy(); } /** * Create a new communication session with this process. This will connect to one * of the session sockets or reuse an existing connection. See Session for * more information about sessions. * * One SHOULD call sessionClosed() when one's done with the session. * Failure to do so will mess up internal statistics but will otherwise * not result in any harmful behavior. */ SessionPtr newSession() { Socket *socket = sessionSockets.pop(); if (socket->isTotallyBusy()) { return SessionPtr(); } else { socket->sessions++; this->sessions++; socket->pqHandle = sessionSockets.push(socket, socket->busyness()); lastUsed = SystemTime::getUsec(); return boost::make_shared(shared_from_this(), socket); } } void sessionClosed(Session *session) { Socket *socket = session->getSocket(); assert(socket->sessions > 0); assert(sessions > 0); socket->sessions--; this->sessions--; processed++; sessionSockets.decrease(socket->pqHandle, socket->busyness()); assert(!isTotallyBusy()); } /** * Returns the uptime of this process so far, as a string. */ string uptime() const { return distanceOfTimeInWords(spawnEndTime / 1000000); } string inspect() const; template void inspectXml(Stream &stream, bool includeSockets = true) const { stream << "" << pid << ""; stream << "" << stickySessionId << ""; stream << "" << gupid << ""; stream << "" << connectPassword << ""; stream << "" << concurrency << ""; stream << "" << sessions << ""; stream << "" << busyness() << ""; stream << "" << processed << ""; stream << "" << spawnerCreationTime << ""; stream << "" << spawnStartTime << ""; stream << "" << spawnEndTime << ""; stream << "" << lastUsed << ""; stream << "" << uptime() << ""; switch (lifeStatus) { case ALIVE: stream << "ALIVE"; break; case SHUTDOWN_TRIGGERED: stream << "SHUTDOWN_TRIGGERED"; break; case DEAD: stream << "DEAD"; break; default: P_BUG("Unknown 'lifeStatus' state " << (int) lifeStatus); } switch (enabled) { case ENABLED: stream << "ENABLED"; break; case DISABLING: stream << "DISABLING"; break; case DISABLED: stream << "DISABLED"; break; case DETACHED: stream << "DETACHED"; break; default: P_BUG("Unknown 'enabled' state " << (int) enabled); } if (metrics.isValid()) { stream << "true"; stream << "" << (int) metrics.cpu << ""; stream << "" << metrics.rss << ""; stream << "" << metrics.pss << ""; stream << "" << metrics.privateDirty << ""; stream << "" << metrics.swap << ""; stream << "" << metrics.realMemory() << ""; stream << "" << metrics.vmsize << ""; stream << "" << metrics.processGroupId << ""; stream << "" << escapeForXml(metrics.command) << ""; } if (includeSockets) { SocketList::const_iterator it; stream << ""; for (it = sockets->begin(); it != sockets->end(); it++) { const Socket &socket = *it; stream << ""; stream << "" << escapeForXml(socket.name) << ""; stream << "
" << escapeForXml(socket.address) << "
"; stream << "" << escapeForXml(socket.protocol) << ""; stream << "" << socket.concurrency << ""; stream << "" << socket.sessions << ""; stream << "
"; } stream << "
"; } } }; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_PROCESS_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/README.md000644 000765 000024 00000010504 12233035540 022742 0ustar00honglistaff000000 000000 # Overview ApplicationPool2 is a subsystem in Phusion Passenger that takes care of dynamically calculating how many processes are needed, spawning application processes, shutting down processes, restarting processes, forwarding requests to the right process, etc. Pretty much all important application process management is encapculated in this subsystem. It does not handle the actual request/response I/O with the application processes: that's left to the caller of the ApplicationPool2 subsystem. Here's a quick rundown of the available classes: * Pool This is the core of the subsystem. It contains high-level process management logic but not the low-level details of spawning processes. The code is further divided into the following classes, each of which contain the core code managing its respective domain: * SuperGroup A logical collection of different applications. Can contain one or more Groups. In the current version of Phusion Passenger, a SuperGroup only contains exactly 1 Group. * Group Represents an application and can contains multiple processes, all belonging to the same application. * Process Represents an OS process; an instance of a certain application. A process may have multiple server sockets on which it listens. This is represented by the `Socket` class: * Socket * Spawner Encapsulates all low-level process spawning logic. Pool calls Spawner whenever it needs to spawn another application process. Spawner is an interface. There are multiple implementations that all spawn processes in a different way. These are: * DirectSpawner * SmartSpawner * DummySpawner The spawn method is user-configurable. To avoid convoluting the Pool code with spawner implementation selection logic, we have: * SpawnerFactory * Session A session represents a single interaction with an application process, e.g. a single request/response session. * Options A configuration object for the Pool::get() method. The `Pool` class's `get` method is the main interface into the ApplicationPool2 subsystem. When an HTTP request comes in, call `Pool::get()` with the appropriate arguments, and it will automatically spawn a process for you when needed, open a session with that process and give you the session object. ## Threading notes ApplicationPool2 depends on an event loop for handling timers and I/O. The I/O that it handles is not the request/response I/O with application processes, but things like forwarding the processes' stderr output to our stderr. In order not to block the event loop with long-running operations, it uses a lot of background threads. ApplicationPool2 is designed to be entirely thread-safe. That said, if one's not careful, one may cause deadlocks, so read this section carefully. * Many Spawner methods are blocking because they wait for a subprocess to do something (initializing, shutting down, etc). The process may output I/O which is supposed to be handled by the main loop. If the event loop is blocked on waiting for the process, and the process is blocked on a write() to the I/O channel, then we have a deadlock. Therefore Spawner methods (including the Spawner destructor) must always be called outside the event loop thread, and the event loop must be available while the Spawner is doing its work. The only exceptions are Spawner methods which are explicitly documented as not depending on the event loop. Pool must only call Spawner methods from background threads. There's still a caveat though: Pool's destructor waits for all background threads to finish. Therefore one must not destroy Pool from the event loop. Instead, I recommend running the event loop in a separate thread, destroy Pool from the main thread, and stop the event loop after Pool is destroyed. Calling other Pool methods from the event loop is ok. Calling SpawnerFactory from the event loop is ok. * Many classes contain libev watchers and unregisters them in their destructor. In order for this unregistration to succeed, one of the following conditions must hold: 1. The destructor is called from the event loop. 2. The destructor is not called from the event loop, but the event loop is still running. Therefore I recommend that you destroy all ApplicationPool2-related objects before stopping the event loop thread. passenger-4.0.37/ext/common/ApplicationPool2/Session.h000644 000765 000024 00000010515 12233035540 023261 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL_SESSION_H_ #define _PASSENGER_APPLICATION_POOL_SESSION_H_ #include #include #include #include #include #include #include #include #include namespace Passenger { namespace ApplicationPool2 { using namespace oxt; /** * Represents a communication session with a process. A communication session * within Phusion Passenger is usually a single request + response but the API * allows arbitrary I/O. See Process's class overview for normal usage of Session. * * Not thread-safe, but Pool's and Process's API encourage that * a Session is only used by 1 thread and then thrown away. */ class Session { public: typedef void (*Callback)(Session *session); private: ProcessPtr process; /** Socket to use for this session. Guaranteed to be alive thanks to the 'process' reference. */ Socket *socket; Connection connection; FileDescriptor theFd; bool closed; void deinitiate(bool success) { connection.fail = !success; socket->checkinConnection(connection); connection.fd = -1; theFd = FileDescriptor(); } void callOnInitiateFailure() { if (OXT_LIKELY(onInitiateFailure != NULL)) { onInitiateFailure(this); } } void callOnClose() { if (OXT_LIKELY(onClose != NULL)) { onClose(this); } closed = true; } public: Callback onInitiateFailure; Callback onClose; Session(const ProcessPtr &_process, Socket *_socket) : process(_process), socket(_socket), closed(false), onInitiateFailure(NULL), onClose(NULL) { } ~Session() { TRACE_POINT(); // If user doesn't close() explicitly, we penalize performance. if (OXT_LIKELY(initiated())) { deinitiate(false); } if (OXT_LIKELY(!closed)) { callOnClose(); } } const string &getConnectPassword() const; pid_t getPid() const; const string &getGupid() const; int getStickySessionId() const; const GroupPtr getGroup() const; void requestOOBW(); int kill(int signo); bool isClosed() const { return closed; } /** * @pre !isClosed() * @post result != NULL */ const ProcessPtr &getProcess() const { assert(!closed); return process; } Socket *getSocket() const { return socket; } const string &getProtocol() const { return socket->protocol; } void initiate() { assert(!closed); ScopeGuard g(boost::bind(&Session::callOnInitiateFailure, this)); connection = socket->checkoutConnection(); connection.fail = true; theFd = FileDescriptor(connection.fd, false); g.clear(); } bool initiated() const { return connection.fd != -1; } const FileDescriptor &fd() const { return theFd; } /** * This Session object becomes fully unsable after closing. */ void close(bool success) { if (OXT_LIKELY(initiated())) { deinitiate(success); } if (OXT_LIKELY(!closed)) { callOnClose(); } } }; typedef boost::shared_ptr SessionPtr; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_SESSION_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/SmartSpawner.h000644 000765 000024 00000061377 12233035540 024300 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL2_SMART_SPAWNER_H_ #define _PASSENGER_APPLICATION_POOL2_SMART_SPAWNER_H_ #include namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; using namespace oxt; class SmartSpawner: public Spawner, public boost::enable_shared_from_this { private: /** * Structure containing arguments and working state for negotiating * the preloader startup protocol. */ struct StartupDetails { /****** Arguments ******/ pid_t pid; FileDescriptor adminSocket; BufferedIO io; BackgroundIOCapturerPtr stderrCapturer; DebugDirPtr debugDir; const Options *options; /****** Working state ******/ unsigned long long timeout; StartupDetails() { options = NULL; timeout = 0; } }; struct SpawnResult { pid_t pid; FileDescriptor adminSocket; BufferedIO io; }; /** The event loop that created Process objects should use, and that I/O forwarding * functions should use. For example data on the error pipe is forwarded using this event loop. */ SafeLibevPtr libev; const vector preloaderCommand; map preloaderAnnotations; Options options; // Protects m_lastUsed and pid. mutable boost::mutex simpleFieldSyncher; // Protects everything else. mutable boost::mutex syncher; // Preloader information. pid_t pid; FileDescriptor adminSocket; string socketAddress; unsigned long long m_lastUsed; // Upon starting the preloader, its preparation info is stored here // for future reference. SpawnPreparationInfo preparation; string getPreloaderCommandString() const { string result; unsigned int i; for (i = 0; i < preloaderCommand.size(); i++) { if (i != 0) { result.append(1, '\0'); } result.append(preloaderCommand[i]); } return result; } vector createRealPreloaderCommand(const Options &options, shared_array &args) { string agentsDir = resourceLocator.getAgentsDir(); vector command; if (shouldLoadShellEnvvars(options, preparation)) { command.push_back(preparation.shell); command.push_back(preparation.shell); command.push_back("-lc"); command.push_back("exec \"$@\""); command.push_back("SpawnPreparerShell"); } else { command.push_back(agentsDir + "/SpawnPreparer"); } command.push_back(agentsDir + "/SpawnPreparer"); command.push_back(preparation.appRoot); command.push_back(serializeEnvvarsFromPoolOptions(options)); command.push_back(preloaderCommand[0]); // Note: do not try to set a process title here. // https://code.google.com/p/phusion-passenger/issues/detail?id=855 command.push_back(preloaderCommand[0]); for (unsigned int i = 1; i < preloaderCommand.size(); i++) { command.push_back(preloaderCommand[i]); } createCommandArgs(command, args); return command; } void throwPreloaderSpawnException(const string &msg, SpawnException::ErrorKind errorKind, StartupDetails &details) { throwPreloaderSpawnException(msg, errorKind, details.stderrCapturer, details.debugDir); } void throwPreloaderSpawnException(const string &msg, SpawnException::ErrorKind errorKind, BackgroundIOCapturerPtr &stderrCapturer, const DebugDirPtr &debugDir) { TRACE_POINT(); // Stop the stderr capturing thread and get the captured stderr // output so far. string stderrOutput; if (stderrCapturer != NULL) { stderrOutput = stderrCapturer->stop(); } // If the exception wasn't due to a timeout, try to capture the // remaining stderr output for at most 2 seconds. if (errorKind != SpawnException::PRELOADER_STARTUP_TIMEOUT && errorKind != SpawnException::APP_STARTUP_TIMEOUT && stderrCapturer != NULL) { bool done = false; unsigned long long timeout = 2000; while (!done) { char buf[1024 * 32]; unsigned int ret; try { ret = readExact(stderrCapturer->getFd(), buf, sizeof(buf), &timeout); if (ret == 0) { done = true; } else { stderrOutput.append(buf, ret); } } catch (const SystemException &e) { P_WARN("Stderr I/O capture error: " << e.what()); done = true; } catch (const TimeoutException &) { done = true; } } } stderrCapturer.reset(); // Now throw SpawnException with the captured stderr output // as error response. SpawnException e(msg, createErrorPageFromStderrOutput(msg, errorKind, stderrOutput), true, errorKind); e.setPreloaderCommand(getPreloaderCommandString()); annotatePreloaderException(e, debugDir); throw e; } void annotatePreloaderException(SpawnException &e, const DebugDirPtr &debugDir) { if (debugDir != NULL) { e.addAnnotations(debugDir->readAll()); } } bool preloaderStarted() const { return pid != -1; } void startPreloader() { TRACE_POINT(); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; assert(!preloaderStarted()); P_DEBUG("Spawning new preloader: appRoot=" << options.appRoot); checkChrootDirectories(options); shared_array args; preparation = prepareSpawn(options); vector command = createRealPreloaderCommand(options, args); SocketPair adminSocket = createUnixSocketPair(); Pipe errorPipe = createPipe(); DebugDirPtr debugDir = boost::make_shared(preparation.uid, preparation.gid); pid_t pid; pid = syscalls::fork(); if (pid == 0) { setenv("PASSENGER_DEBUG_DIR", debugDir->getPath().c_str(), 1); purgeStdio(stdout); purgeStdio(stderr); resetSignalHandlersAndMask(); disableMallocDebugging(); int adminSocketCopy = dup2(adminSocket.first, 3); int errorPipeCopy = dup2(errorPipe.second, 4); dup2(adminSocketCopy, 0); dup2(adminSocketCopy, 1); dup2(errorPipeCopy, 2); closeAllFileDescriptors(2); setChroot(preparation); switchUser(preparation); setWorkingDirectory(preparation); execvp(command[0].c_str(), (char * const *) args.get()); int e = errno; printf("!> Error\n"); printf("!> \n"); printf("Cannot execute \"%s\": %s (errno=%d)\n", command[0].c_str(), strerror(e), e); fprintf(stderr, "Cannot execute \"%s\": %s (errno=%d)\n", command[0].c_str(), strerror(e), e); fflush(stdout); fflush(stderr); _exit(1); } else if (pid == -1) { int e = errno; throw SystemException("Cannot fork a new process", e); } else { ScopeGuard guard(boost::bind(nonInterruptableKillAndWaitpid, pid)); P_DEBUG("Preloader process forked for appRoot=" << options.appRoot << ": PID " << pid); adminSocket.first.close(); errorPipe.second.close(); StartupDetails details; details.pid = pid; details.adminSocket = adminSocket.second; details.io = BufferedIO(adminSocket.second); details.stderrCapturer = make_shared( errorPipe.first, pid, // The cast works around a compilation problem in Clang. (const char *) "stderr"); details.stderrCapturer->start(); details.debugDir = debugDir; details.options = &options; details.timeout = options.startTimeout * 1000; { this_thread::restore_interruption ri(di); this_thread::restore_syscall_interruption rsi(dsi); socketAddress = negotiatePreloaderStartup(details); } this->adminSocket = adminSocket.second; { boost::lock_guard l(simpleFieldSyncher); this->pid = pid; } PipeWatcherPtr watcher; watcher = boost::make_shared(adminSocket.second, "stdout", pid); watcher->initialize(); watcher->start(); watcher = boost::make_shared(errorPipe.first, "stderr", pid); watcher->initialize(); watcher->start(); preloaderAnnotations = debugDir->readAll(); P_INFO("Preloader for " << options.appRoot << " started on PID " << pid << ", listening on " << socketAddress); guard.clear(); } } void stopPreloader() { TRACE_POINT(); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; if (!preloaderStarted()) { return; } syscalls::shutdown(adminSocket, SHUT_WR); if (timedWaitpid(pid, NULL, 5000) == 0) { P_TRACE(2, "Spawn server did not exit in time, killing it..."); syscalls::kill(pid, SIGKILL); syscalls::waitpid(pid, NULL, 0); } // Delete socket after the process has exited so that it // doesn't crash upon deleting a nonexistant file. if (getSocketAddressType(socketAddress) == SAT_UNIX) { string filename = parseUnixSocketAddress(socketAddress); syscalls::unlink(filename.c_str()); } { boost::lock_guard l(simpleFieldSyncher); pid = -1; } socketAddress.clear(); preparation = SpawnPreparationInfo(); } void sendStartupRequest(StartupDetails &details) { TRACE_POINT(); try { string data = "You have control 1.0\n" "passenger_root: " + resourceLocator.getRoot() + "\n" "ruby_libdir: " + resourceLocator.getRubyLibDir() + "\n" "passenger_version: " PASSENGER_VERSION "\n" "generation_dir: " + generation->getPath() + "\n"; vector args; vector::const_iterator it, end; details.options->toVector(args, resourceLocator, Options::SPAWN_OPTIONS); for (it = args.begin(); it != args.end(); it++) { const string &key = *it; it++; const string &value = *it; data.append(key + ": " + value + "\n"); } vector lines; split(data, '\n', lines); foreach (const StaticString line, lines) { P_DEBUG("[App " << details.pid << " stdin >>] " << line); } writeExact(details.adminSocket, data, &details.timeout); writeExact(details.adminSocket, "\n", &details.timeout); } catch (const SystemException &e) { if (e.code() == EPIPE) { /* Ignore this. Process might have written an * error response before reading the arguments, * in which case we'll want to show that instead. */ } else { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. There was an I/O error while " "sending the startup request message to it: " + e.sys(), SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } } catch (const TimeoutException &) { throwPreloaderSpawnException("An error occurred while starting up the " "preloader: it did not read the startup request message in time.", SpawnException::PRELOADER_STARTUP_TIMEOUT, details); } } string handleStartupResponse(StartupDetails &details) { TRACE_POINT(); string socketAddress; while (true) { string line; try { line = readMessageLine(details); } catch (const SystemException &e) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. There was an I/O error while reading its " "startup response: " + e.sys(), SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } catch (const TimeoutException &) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader: it did not write a startup response in time.", SpawnException::PRELOADER_STARTUP_TIMEOUT, details); } if (line.empty()) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. It unexpected closed the connection while " "sending its startup response.", SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } else if (line[line.size() - 1] != '\n') { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. It sent a line without a newline character " "in its startup response.", SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } else if (line == "\n") { break; } string::size_type pos = line.find(": "); if (pos == string::npos) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. It sent a startup response line without " "separator.", SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } string key = line.substr(0, pos); string value = line.substr(pos + 2, line.size() - pos - 3); if (key == "socket") { // TODO: validate socket address here socketAddress = fixupSocketAddress(options, value); } else { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. It sent an unknown startup response line " "called '" + key + "'.", SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } } if (socketAddress.empty()) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. It did not report a socket address in its " "startup response.", SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } return socketAddress; } void handleErrorResponse(StartupDetails &details) { TRACE_POINT(); map attributes; while (true) { string line; try { line = readMessageLine(details); } catch (const SystemException &e) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. There was an I/O error while reading its " "startup response: " + e.sys(), SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } catch (const TimeoutException &) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader: it did not write a startup response in time.", SpawnException::PRELOADER_STARTUP_TIMEOUT, details); } if (line.empty()) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. It unexpected closed the connection while " "sending its startup response.", SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } else if (line[line.size() - 1] != '\n') { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. It sent a line without a newline character " "in its startup response.", SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } else if (line == "\n") { break; } string::size_type pos = line.find(": "); if (pos == string::npos) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. It sent a startup response line without " "separator.", SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } string key = line.substr(0, pos); string value = line.substr(pos + 2, line.size() - pos - 3); attributes[key] = value; } try { string message = details.io.readAll(&details.timeout); SpawnException e("An error occured while starting up the preloader.", message, attributes["html"] == "true", SpawnException::PRELOADER_STARTUP_EXPLAINABLE_ERROR); e.setPreloaderCommand(getPreloaderCommandString()); annotatePreloaderException(e, details.debugDir); throw e; } catch (const SystemException &e) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. It tried to report an error message, but " "an I/O error occurred while reading this error message: " + e.sys(), SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } catch (const TimeoutException &) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. It tried to report an error message, but " "it took too much time doing that.", SpawnException::PRELOADER_STARTUP_TIMEOUT, details); } } void handleInvalidResponseType(StartupDetails &details, const string &line) { if (line.empty()) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. It exited before signalling successful " "startup back to " PROGRAM_NAME ".", SpawnException::PRELOADER_STARTUP_ERROR, details); } else { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. It sent an unknown response type \"" + cEscapeString(line) + "\".", SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } } string negotiatePreloaderStartup(StartupDetails &details) { TRACE_POINT(); string result; try { result = readMessageLine(details); } catch (const SystemException &e) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. There was an I/O error while reading its " "handshake message: " + e.sys(), SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } catch (const TimeoutException &) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader: it did not write a handshake message in time.", SpawnException::PRELOADER_STARTUP_TIMEOUT, details); } if (result == "I have control 1.0\n") { UPDATE_TRACE_POINT(); sendStartupRequest(details); try { result = readMessageLine(details); } catch (const SystemException &e) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader. There was an I/O error while reading its " "startup response: " + e.sys(), SpawnException::PRELOADER_STARTUP_PROTOCOL_ERROR, details); } catch (const TimeoutException &) { throwPreloaderSpawnException("An error occurred while starting up " "the preloader: it did not write a startup response in time.", SpawnException::PRELOADER_STARTUP_TIMEOUT, details); } if (result == "Ready\n") { return handleStartupResponse(details); } else if (result == "Error\n") { handleErrorResponse(details); } else { handleInvalidResponseType(details, result); } } else { UPDATE_TRACE_POINT(); if (result == "Error\n") { handleErrorResponse(details); } else { handleInvalidResponseType(details, result); } } // Never reached, shut up compiler warning. abort(); return ""; } SpawnResult sendSpawnCommand(const Options &options) { TRACE_POINT(); FileDescriptor fd; try { fd = connectToServer(socketAddress); } catch (const SystemException &e) { BackgroundIOCapturerPtr stderrCapturer; throwPreloaderSpawnException("An error occurred while starting " "the application. Unable to connect to the preloader's " "socket: " + string(e.what()), SpawnException::APP_STARTUP_PROTOCOL_ERROR, stderrCapturer, DebugDirPtr()); } UPDATE_TRACE_POINT(); BufferedIO io(fd); unsigned long long timeout = options.startTimeout * 1000; string result; vector args; vector::const_iterator it; writeExact(fd, "spawn\n", &timeout); options.toVector(args, resourceLocator, Options::SPAWN_OPTIONS); for (it = args.begin(); it != args.end(); it++) { const string &key = *it; it++; const string &value = *it; writeExact(fd, key + ": " + value + "\n", &timeout); } writeExact(fd, "\n", &timeout); result = io.readLine(1024, &timeout); if (result == "OK\n") { UPDATE_TRACE_POINT(); pid_t spawnedPid; spawnedPid = atoi(io.readLine(1024, &timeout).c_str()); if (spawnedPid <= 0) { BackgroundIOCapturerPtr stderrCapturer; throwPreloaderSpawnException("An error occurred while starting " "the web application. Its preloader responded to the " "'spawn' command with an invalid PID: '" + toString(spawnedPid) + "'", SpawnException::APP_STARTUP_PROTOCOL_ERROR, stderrCapturer, DebugDirPtr()); } // TODO: we really should be checking UID. // FIXME: for Passenger 4 we *must* check the UID otherwise this is a gaping security hole. if (getsid(spawnedPid) != getsid(pid)) { BackgroundIOCapturerPtr stderrCapturer; throwPreloaderSpawnException("An error occurred while starting " "the web application. Its preloader responded to the " "'spawn' command with a PID that doesn't belong to " "the same session: '" + toString(spawnedPid) + "'", SpawnException::APP_STARTUP_PROTOCOL_ERROR, stderrCapturer, DebugDirPtr()); } SpawnResult result; result.pid = spawnedPid; result.adminSocket = fd; result.io = io; return result; } else if (result == "Error\n") { UPDATE_TRACE_POINT(); NegotiationDetails details; details.io = io; details.timeout = timeout; handleSpawnErrorResponse(details); } else { UPDATE_TRACE_POINT(); NegotiationDetails details; handleInvalidSpawnResponseType(result, details); } return SpawnResult(); // Never reached. } template SpawnResult sendSpawnCommandAgain(const Exception &e, const Options &options) { TRACE_POINT(); P_WARN("An error occurred while spawning a process: " << e.what()); P_WARN("The application preloader seems to have crashed, restarting it and trying again..."); stopPreloader(); startPreloader(); ScopeGuard guard(boost::bind(&SmartSpawner::stopPreloader, this)); SpawnResult result = sendSpawnCommand(options); guard.clear(); return result; } protected: virtual void annotateAppSpawnException(SpawnException &e, NegotiationDetails &details) { Spawner::annotateAppSpawnException(e, details); e.addAnnotations(preloaderAnnotations); } public: SmartSpawner(const SafeLibevPtr &_libev, const ResourceLocator &_resourceLocator, const ServerInstanceDir::GenerationPtr &_generation, const vector &_preloaderCommand, const Options &_options, const SpawnerConfigPtr &_config = SpawnerConfigPtr()) : Spawner(_resourceLocator), libev(_libev), preloaderCommand(_preloaderCommand) { if (preloaderCommand.size() < 2) { throw ArgumentException("preloaderCommand must have at least 2 elements"); } generation = _generation; options = _options.copyAndPersist().clearLogger(); pid = -1; m_lastUsed = SystemTime::getUsec(); if (_config == NULL) { config = boost::make_shared(); } else { config = _config; } } virtual ~SmartSpawner() { boost::lock_guard l(syncher); stopPreloader(); } virtual ProcessPtr spawn(const Options &options) { TRACE_POINT(); assert(options.appType == this->options.appType); assert(options.appRoot == this->options.appRoot); P_DEBUG("Spawning new process: appRoot=" << options.appRoot); possiblyRaiseInternalError(options); { boost::lock_guard l(simpleFieldSyncher); m_lastUsed = SystemTime::getUsec(); } UPDATE_TRACE_POINT(); boost::lock_guard l(syncher); if (!preloaderStarted()) { UPDATE_TRACE_POINT(); startPreloader(); } UPDATE_TRACE_POINT(); SpawnResult result; try { result = sendSpawnCommand(options); } catch (const SystemException &e) { result = sendSpawnCommandAgain(e, options); } catch (const IOException &e) { result = sendSpawnCommandAgain(e, options); } catch (const SpawnException &e) { result = sendSpawnCommandAgain(e, options); } UPDATE_TRACE_POINT(); NegotiationDetails details; details.preparation = &preparation; details.libev = libev; details.pid = result.pid; details.adminSocket = result.adminSocket; details.io = result.io; details.options = &options; ProcessPtr process = negotiateSpawn(details); P_DEBUG("Process spawning done: appRoot=" << options.appRoot << ", pid=" << process->pid); return process; } virtual bool cleanable() const { return true; } virtual void cleanup() { TRACE_POINT(); { boost::lock_guard l(simpleFieldSyncher); m_lastUsed = SystemTime::getUsec(); } boost::lock_guard lock(syncher); stopPreloader(); } virtual unsigned long long lastUsed() const { boost::lock_guard lock(simpleFieldSyncher); return m_lastUsed; } pid_t getPreloaderPid() const { boost::lock_guard lock(simpleFieldSyncher); return pid; } }; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_SMART_SPAWNER_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/Socket.h000644 000765 000024 00000014274 12233035540 023074 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL_SOCKET_H_ #define _PASSENGER_APPLICATION_POOL_SOCKET_H_ #include #include #include #include #include #include #include #include #include #include namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; class Process; struct Connection { int fd; bool persistent: 1; bool fail: 1; Connection() { fd = -1; persistent = false; fail = false; } void close() { if (fd != -1) { int fd2 = fd; fd = -1; persistent = false; safelyClose(fd2); } } }; /** * Not thread-safe except for the connection pooling methods, so only use * within the ApplicationPool lock. */ class Socket { private: boost::mutex connectionPoolLock; int totalConnections; vector idleConnections; int connectionPoolLimit() const { return concurrency; } Connection connect() const { Connection connection; P_TRACE(3, "Connecting to " << address); connection.fd = connectToServer(address); return connection; } public: // Read-only. string name; string address; string protocol; int concurrency; /** The handle inside the associated Process's 'sessionSockets' priority queue. * Guaranteed to be valid as long as the Process is alive. */ PriorityQueue::Handle pqHandle; /** Invariant: sessions >= 0 */ int sessions; Socket() : concurrency(0) { } Socket(const string &_name, const string &_address, const string &_protocol, int _concurrency) : totalConnections(0), name(_name), address(_address), protocol(_protocol), concurrency(_concurrency), sessions(0) { } Socket(const Socket &other) : totalConnections(other.totalConnections), idleConnections(other.idleConnections), name(other.name), address(other.address), protocol(other.protocol), concurrency(other.concurrency), pqHandle(other.pqHandle), sessions(other.sessions) { } Socket &operator=(const Socket &other) { totalConnections = other.totalConnections; idleConnections = other.idleConnections; name = other.name; address = other.address; protocol = other.protocol; concurrency = other.concurrency; pqHandle = other.pqHandle; sessions = other.sessions; return *this; } /** * Connect to this socket or reuse an existing connection. * * One MUST call checkinConnection() when one's done using the Connection. * Failure to do so will result in a resource leak. */ Connection checkoutConnection() { boost::lock_guard l(connectionPoolLock); if (!idleConnections.empty()) { Connection connection = idleConnections.back(); idleConnections.pop_back(); return connection; } else if (totalConnections < connectionPoolLimit()) { Connection connection = connect(); connection.persistent = true; totalConnections++; return connection; } else { return connect(); } } void checkinConnection(Connection connection) { boost::unique_lock l(connectionPoolLock); if (connection.persistent) { if (connection.fail) { totalConnections--; l.unlock(); connection.close(); } else { idleConnections.push_back(connection); } } else { l.unlock(); connection.close(); } } bool isIdle() const { return sessions == 0; } int busyness() const { /* Different sockets within a Process may have different * 'concurrency' values. We want: * - Process.sessionSockets to sort the sockets from least used to most used. * - to give sockets with concurrency == 0 more priority over sockets * with concurrency > 0. * Therefore, we describe our busyness as a percentage of 'concurrency', with * the percentage value in [0..INT_MAX] instead of [0..1]. */ if (concurrency == 0) { // Allows Process.sessionSockets to give // idle sockets more priority. if (sessions == 0) { return 0; } else { return 1; } } else { return (int) (((long long) sessions * INT_MAX) / (double) concurrency); } } bool isTotallyBusy() const { return concurrency != 0 && sessions >= concurrency; } }; class SocketList: public vector { public: void add(const string &name, const string &address, const string &protocol, int concurrency) { push_back(Socket(name, address, protocol, concurrency)); } const Socket *findSocketWithName(const StaticString &name) const { const_iterator it, end = this->end(); for (it = begin(); it != end; it++) { if (it->name == name) { return &(*it); } } return NULL; } bool hasSessionSockets() const { const_iterator it; for (it = begin(); it != end(); it++) { if (it->protocol == "session" || it->protocol == "http_session") { return true; } } return false; } }; typedef boost::shared_ptr SocketListPtr; } // namespace ApplicationPool2 } // namespace Pasenger #endif /* _PASSENGER_APPLICATION_POOL2_SOCKET_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/Spawner.h000644 000765 000024 00000120504 12233035540 023255 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL_SPAWNER_H_ #define _PASSENGER_APPLICATION_POOL_SPAWNER_H_ /* * This file implements application spawning support. Several classes * are provided which all implement the Spawner interface. The spawn() * method spawns an application process based on the given options * and returns a Process object which contains information about the * spawned process. * * The DirectSpawner class spawns application processes directly. * * The SmartSpawner class spawns application processes through a * preloader process. The preloader process loads the application * code into its address space and then listens on a socket for spawn * commands. Upon receiving a spawn command, it will fork() itself. * This makes spawning multiple application processes much faster. * Note that a single SmartSpawner instance is only usable for a * single application. * * DummySpawner doesn't do anything. It returns dummy Process objects. * * DirectSpawner, SmartSpawner and DummySpawner all implement the Spawner interface. * * SpawnerFactory is a convenience class which takes an Options objects * and figures out, based on options.spawnMethod, whether to create * a DirectSpawner or a SmartSpawner. In case of the smart spawning * method, SpawnerFactory also automatically figures out which preloader * to use based on options.appType. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace tut { struct ApplicationPool2_DirectSpawnerTest; struct ApplicationPool2_SmartSpawnerTest; } namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; using namespace oxt; class Spawner { protected: friend struct tut::ApplicationPool2_DirectSpawnerTest; friend struct tut::ApplicationPool2_SmartSpawnerTest; /** * Given a file descriptor, captures its output in a background thread * and also forwards it immediately to a target file descriptor. * Call stop() to stop the background thread and to obtain the captured * output so far. */ class BackgroundIOCapturer { private: FileDescriptor fd; pid_t pid; const char *channelName; boost::mutex dataSyncher; string data; oxt::thread *thr; void capture() { TRACE_POINT(); while (!this_thread::interruption_requested()) { char buf[1024 * 8]; ssize_t ret; UPDATE_TRACE_POINT(); ret = syscalls::read(fd, buf, sizeof(buf)); int e = errno; this_thread::disable_syscall_interruption dsi; if (ret == 0) { break; } else if (ret == -1) { if (e != EAGAIN && e != EWOULDBLOCK) { P_WARN("Background I/O capturer error: " << strerror(e) << " (errno=" << e << ")"); break; } } else { { boost::lock_guard l(dataSyncher); data.append(buf, ret); } UPDATE_TRACE_POINT(); if (ret == 1 && buf[0] == '\n') { printAppOutput(pid, channelName, "", 0); } else { vector lines; if (ret > 0 && buf[ret - 1] == '\n') { ret--; } split(StaticString(buf, ret), '\n', lines); foreach (const StaticString line, lines) { printAppOutput(pid, channelName, line.data(), line.size()); } } } } } public: BackgroundIOCapturer(const FileDescriptor &_fd, pid_t _pid, const char *_channelName) : fd(_fd), pid(_pid), channelName(_channelName), thr(NULL) { } ~BackgroundIOCapturer() { TRACE_POINT(); if (thr != NULL) { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; thr->interrupt_and_join(); delete thr; thr = NULL; } } const FileDescriptor &getFd() const { return fd; } void start() { assert(thr == NULL); thr = new oxt::thread(boost::bind(&BackgroundIOCapturer::capture, this), "Background I/O capturer", 64 * 1024); } string stop() { TRACE_POINT(); assert(thr != NULL); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; thr->interrupt_and_join(); delete thr; thr = NULL; boost::lock_guard l(dataSyncher); return data; } void appendToBuffer(const StaticString &dataToAdd) { TRACE_POINT(); boost::lock_guard l(dataSyncher); data.append(dataToAdd.data(), dataToAdd.size()); } }; typedef boost::shared_ptr BackgroundIOCapturerPtr; /** * A temporary directory for spawned child processes to write * debugging information to. It is removed after spawning has * determined to be successful or failed. */ class DebugDir { private: string path; static void doClosedir(DIR *dir) { closedir(dir); } public: DebugDir(uid_t uid, gid_t gid) { char buf[PATH_MAX] = "/tmp/passenger.spawn-debug.XXXXXXXXXX"; const char *result = mkdtemp(buf); if (result == NULL) { int e = errno; throw SystemException("Cannot create a temporary directory " "in the format of '/tmp/passenger-spawn-debug.XXX'", e); } else { path = result; this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; syscalls::chown(result, uid, gid); } } ~DebugDir() { removeDirTree(path); } const string &getPath() const { return path; } map readAll() { map result; DIR *dir = opendir(path.c_str()); ScopeGuard guard(boost::bind(doClosedir, dir)); struct dirent *ent; while ((ent = readdir(dir)) != NULL) { if (ent->d_name[0] != '.') { try { result.insert(make_pair( ent->d_name, Passenger::readAll(path + "/" + ent->d_name))); } catch (const SystemException &) { // Do nothing. } } } return result; } }; typedef boost::shared_ptr DebugDirPtr; /** * Contains information that will be used after fork()ing but before exec()ing, * such as the intended app root, the UID it should switch to, the * groups it should assume, etc. This structure is allocated before forking * because after forking and before exec() it may not be safe to allocate memory. */ struct SpawnPreparationInfo { // General /** Absolute application root path. */ string appRoot; /** Absolute pre-exec chroot path. If no chroot is configured, then this is "/". */ string chrootDir; /** Absolute application root path inside the chroot. If no chroot is * configured then this is is equal to appRoot. */ string appRootInsideChroot; /** A list of all parent directories of the appRoot, as well as appRoot itself. * The pre-exec chroot directory is included, and this list goes no futher than that. * For example if appRoot is /var/jail/foo/bar/baz and the chroot is /var/jail, * then this list contains: * /var/jail/foo * /var/jail/foo/bar * /var/jail/foo/bar/baz */ vector appRootPaths; /** Same as appRootPaths, but without the chroot component. For example if * appRoot is /var/jail/foo/bar/baz and the chroot is /var/jail, then this list * contains: * /foo * /foo/bar * /foo/bar/baz */ vector appRootPathsInsideChroot; // User switching bool switchUser; string username; string groupname; string home; string shell; uid_t uid; gid_t gid; int ngroups; shared_array gidset; }; /** * Structure containing arguments and working state for negotiating * the spawning protocol. */ struct NegotiationDetails { /****** Arguments ******/ /** The preparation info of the process we're negotiating with. It's used * by security validators to check whether the information sent back by the * process make any sense. */ SpawnPreparationInfo *preparation; /** The SafeLibev that the returned Process should be initialized with. */ SafeLibevPtr libev; /** This object captures the process's stderr while negotiation is in progress. * (Recall that negotiation is performed over the process's stdout while stderr * is used purely for outputting messages.) * If the negotiation protocol fails, then any output captured by this object * will be stored into the resulting SpawnException's error page. */ BackgroundIOCapturerPtr stderrCapturer; /** The PID of the process we're negotiating with. */ pid_t pid; FileDescriptor adminSocket; FileDescriptor errorPipe; const Options *options; DebugDirPtr debugDir; /****** Working state ******/ BufferedIO io; string gupid; string connectPassword; unsigned long long spawnStartTime; unsigned long long timeout; NegotiationDetails() { preparation = NULL; pid = 0; options = NULL; spawnStartTime = 0; timeout = 0; } }; private: /** * Appends key + "\0" + value + "\0" to 'output'. */ static void appendNullTerminatedKeyValue(string &output, const StaticString &key, const StaticString &value) { unsigned int minCapacity = key.size() + value.size() + 2; if (output.capacity() < minCapacity) { output.reserve(minCapacity + 1024); } output.append(key.data(), key.size()); output.append(1, '\0'); output.append(value.data(), value.size()); output.append(1, '\0'); } void sendSpawnRequest(NegotiationDetails &details) { TRACE_POINT(); try { string data = "You have control 1.0\n" "passenger_root: " + resourceLocator.getRoot() + "\n" "passenger_version: " PASSENGER_VERSION "\n" "ruby_libdir: " + resourceLocator.getRubyLibDir() + "\n" "generation_dir: " + generation->getPath() + "\n" "gupid: " + details.gupid + "\n" "connect_password: " + details.connectPassword + "\n"; vector args; vector::const_iterator it, end; details.options->toVector(args, resourceLocator, Options::SPAWN_OPTIONS); for (it = args.begin(); it != args.end(); it++) { const string &key = *it; it++; const string &value = *it; data.append(key + ": " + value + "\n"); } vector lines; split(data, '\n', lines); foreach (const StaticString line, lines) { P_DEBUG("[App " << details.pid << " stdin >>] " << line); } writeExact(details.adminSocket, data, &details.timeout); writeExact(details.adminSocket, "\n", &details.timeout); } catch (const SystemException &e) { if (e.code() == EPIPE) { /* Ignore this. Process might have written an * error response before reading the arguments, * in which case we'll want to show that instead. */ } else { throw; } } } ProcessPtr handleSpawnResponse(NegotiationDetails &details) { TRACE_POINT(); SocketListPtr sockets = boost::make_shared(); while (true) { string line; try { line = readMessageLine(details); } catch (const SystemException &e) { throwAppSpawnException("An error occurred while starting the " "web application. There was an I/O error while reading its " "startup response: " + e.sys(), SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } catch (const TimeoutException &) { throwAppSpawnException("An error occurred while starting the " "web application: it did not write a startup response in time.", SpawnException::APP_STARTUP_TIMEOUT, details); } if (line.empty()) { throwAppSpawnException("An error occurred while starting the " "web application. It unexpected closed the connection while " "sending its startup response.", SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } else if (line[line.size() - 1] != '\n') { throwAppSpawnException("An error occurred while starting the " "web application. It sent a line without a newline character " "in its startup response.", SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } else if (line == "\n") { break; } string::size_type pos = line.find(": "); if (pos == string::npos) { throwAppSpawnException("An error occurred while starting the " "web application. It sent a startup response line without " "separator.", SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } string key = line.substr(0, pos); string value = line.substr(pos + 2, line.size() - pos - 3); if (key == "socket") { // socket: ;
;; // TODO: in case of TCP sockets, check whether it points to localhost // TODO: in case of unix sockets, check whether filename is absolute // and whether owner is correct vector args; split(value, ';', args); if (args.size() == 4) { string error = validateSocketAddress(details, args[1]); if (!error.empty()) { throwAppSpawnException( "An error occurred while starting the web application. " + error, SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } sockets->add(args[0], fixupSocketAddress(*details.options, args[1]), args[2], atoi(args[3])); } else { throwAppSpawnException("An error occurred while starting the " "web application. It reported a wrongly formatted 'socket'" "response value: '" + value + "'", SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } } else if (key == "pid") { // pid: pid_t pid = atoi(value); ProcessMetricsCollector collector; vector pids; pids.push_back(pid); ProcessMetricMap result = collector.collect(pids); if (result[pid].uid != details.preparation->uid) { throwAppSpawnException("An error occurred while starting the " "web application. The PID that the loader has returned does " "not have the same UID as the loader itself.", SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } details.pid = pid; } else { throwAppSpawnException("An error occurred while starting the " "web application. It sent an unknown startup response line " "called '" + key + "'.", SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } } if (sockets->hasSessionSockets() == 0) { throwAppSpawnException("An error occured while starting the web " "application. It did not advertise any session sockets.", SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } return boost::make_shared(details.libev, details.pid, details.gupid, details.connectPassword, details.adminSocket, details.errorPipe, sockets, creationTime, details.spawnStartTime, config); } protected: ResourceLocator resourceLocator; ServerInstanceDir::GenerationPtr generation; SpawnerConfigPtr config; static void nonInterruptableKillAndWaitpid(pid_t pid) { this_thread::disable_syscall_interruption dsi; syscalls::kill(pid, SIGKILL); syscalls::waitpid(pid, NULL, 0); } /** * Behaves like waitpid(pid, status, WNOHANG), but waits at most * timeout miliseconds for the process to exit. */ static int timedWaitpid(pid_t pid, int *status, unsigned long long timeout) { Timer timer; int ret; do { ret = syscalls::waitpid(pid, status, WNOHANG); if (ret > 0 || ret == -1) { return ret; } else { syscalls::usleep(10000); } } while (timer.elapsed() < timeout); return 0; // timed out } static string fixupSocketAddress(const Options &options, const string &address) { TRACE_POINT(); if (!options.preexecChroot.empty() && !options.postexecChroot.empty()) { ServerAddressType type = getSocketAddressType(address); if (type == SAT_UNIX) { string filename = parseUnixSocketAddress(address); string fixedAddress = "unix:"; if (!options.preexecChroot.empty()) { fixedAddress.append(options.preexecChroot.data(), options.preexecChroot.size()); } if (!options.postexecChroot.empty()) { fixedAddress.append(options.postexecChroot.data(), options.postexecChroot.size()); } fixedAddress.append(filename); return fixedAddress; } else { return address; } } else { return address; } } bool isAbsolutePath(const StaticString &path) const { if (path.empty() || path[0] != '/') { return false; } else { vector components; string component; split(path, '/', components); components.erase(components.begin()); foreach (component, components) { if (component.empty() || component == "." || component == "..") { return false; } } return true; } } /** * Given a 'socket:' information string obtained from the spawned process, * validates whether it is correct. */ string validateSocketAddress(NegotiationDetails &details, const string &_address) const { string address = _address; stringstream error; switch (getSocketAddressType(address)) { case SAT_UNIX: { address = fixupSocketAddress(*details.options, address); string filename = parseUnixSocketAddress(address); // Verify that the socket filename is absolute. if (!isAbsolutePath(filename)) { error << "It reported a non-absolute socket filename: \"" << cEscapeString(filename) << "\""; break; } // Verify that the process owns the socket. struct stat buf; if (lstat(filename.c_str(), &buf) == -1) { int e = errno; error << "It reported an inaccessible socket filename: \"" << cEscapeString(filename) << "\" (lstat() failed with errno " << e << ": " << strerror(e) << ")"; break; } if (buf.st_uid != details.preparation->uid) { error << "It advertised a Unix domain socket that has a different " << "owner than expected (should be UID " << details.preparation->uid << ", but actual UID was " << buf.st_uid << ")"; break; } break; } case SAT_TCP: // TODO: validate that the socket is localhost. break; default: error << "It reported an unsupported socket address type: \"" << cEscapeString(address) << "\""; break; } return error.str(); } static void checkChrootDirectories(const Options &options) { if (!options.preexecChroot.empty()) { // TODO: check whether appRoot is a child directory of preexecChroot // and whether postexecChroot is a child directory of appRoot. } } static void createCommandArgs(const vector &command, shared_array &args) { args.reset(new const char *[command.size()]); for (unsigned int i = 1; i < command.size(); i++) { args[i - 1] = command[i].c_str(); } args[command.size() - 1] = NULL; } void possiblyRaiseInternalError(const Options &options) { if (options.raiseInternalError) { throw RuntimeException("An internal error!"); } } void throwAppSpawnException(const string &msg, SpawnException::ErrorKind errorKind, NegotiationDetails &details) { TRACE_POINT(); // Stop the stderr capturing thread and get the captured stderr // output so far. string stderrOutput; if (details.stderrCapturer != NULL) { stderrOutput = details.stderrCapturer->stop(); } // If the exception wasn't due to a timeout, try to capture the // remaining stderr output for at most 2 seconds. if (errorKind != SpawnException::PRELOADER_STARTUP_TIMEOUT && errorKind != SpawnException::APP_STARTUP_TIMEOUT && details.stderrCapturer != NULL) { bool done = false; unsigned long long timeout = 2000; while (!done) { char buf[1024 * 32]; unsigned int ret; try { ret = readExact(details.stderrCapturer->getFd(), buf, sizeof(buf), &timeout); if (ret == 0) { done = true; } else { stderrOutput.append(buf, ret); } } catch (const SystemException &e) { P_WARN("Stderr I/O capture error: " << e.what()); done = true; } catch (const TimeoutException &) { done = true; } } } details.stderrCapturer.reset(); // Now throw SpawnException with the captured stderr output // as error response. SpawnException e(msg, createErrorPageFromStderrOutput(msg, errorKind, stderrOutput), true, errorKind); annotateAppSpawnException(e, details); throw e; } virtual void annotateAppSpawnException(SpawnException &e, NegotiationDetails &details) { if (details.debugDir != NULL) { e.addAnnotations(details.debugDir->readAll()); } } string createErrorPageFromStderrOutput(const string &msg, SpawnException::ErrorKind errorKind, const string &stderrOutput) { // These kinds of SpawnExceptions are not supposed to be handled through this function. assert(errorKind != SpawnException::PRELOADER_STARTUP_EXPLAINABLE_ERROR); assert(errorKind != SpawnException::APP_STARTUP_EXPLAINABLE_ERROR); string result = escapeHTML(msg); if (errorKind == SpawnException::PRELOADER_STARTUP_TIMEOUT || errorKind == SpawnException::APP_STARTUP_TIMEOUT || errorKind == SpawnException::PRELOADER_STARTUP_ERROR || errorKind == SpawnException::APP_STARTUP_ERROR) { result.append(" Please read this article " "for more information about this problem."); } result.append("
\n

Raw process output:

\n"); if (strip(stderrOutput).empty()) { result.append("(empty)"); } else { result.append("
");
			result.append(escapeHTML(stderrOutput));
			result.append("
"); } return result; } template string readMessageLine(Details &details) { TRACE_POINT(); while (true) { string result = details.io.readLine(1024 * 4, &details.timeout); string line = result; if (!line.empty() && line[line.size() - 1] == '\n') { line.erase(line.size() - 1, 1); } if (result.empty()) { // EOF return result; } else if (startsWith(result, "!> ")) { P_DEBUG("[App " << details.pid << " stdout] " << line); result.erase(0, sizeof("!> ") - 1); return result; } else { if (details.stderrCapturer != NULL) { details.stderrCapturer->appendToBuffer(result); } printAppOutput(details.pid, "stdout", line.data(), line.size()); } } } SpawnPreparationInfo prepareSpawn(const Options &options) const { TRACE_POINT(); SpawnPreparationInfo info; prepareChroot(info, options); prepareUserSwitching(info, options); prepareSwitchingWorkingDirectory(info, options); return info; } void prepareChroot(SpawnPreparationInfo &info, const Options &options) const { TRACE_POINT(); info.appRoot = absolutizePath(options.appRoot); if (options.preexecChroot.empty()) { info.chrootDir = "/"; } else { info.chrootDir = absolutizePath(options.preexecChroot); } if (info.appRoot != info.chrootDir && startsWith(info.appRoot, info.chrootDir + "/")) { throw SpawnException("Invalid configuration: '" + info.chrootDir + "' has been configured as the chroot jail, but the application " + "root directory '" + info.appRoot + "' is not a subdirectory of the " + "chroot directory, which it must be."); } if (info.appRoot == info.chrootDir) { info.appRootInsideChroot = "/"; } else if (info.chrootDir == "/") { info.appRootInsideChroot = info.appRoot; } else { info.appRootInsideChroot = info.appRoot.substr(info.chrootDir.size()); } } void prepareUserSwitching(SpawnPreparationInfo &info, const Options &options) const { TRACE_POINT(); if (geteuid() != 0) { struct passwd *userInfo = getpwuid(geteuid()); if (userInfo == NULL) { throw RuntimeException("Cannot get user database entry for user " + getProcessUsername() + "; it looks like your system's " + "user database is broken, please fix it."); } info.switchUser = false; info.username = userInfo->pw_name; info.groupname = getGroupName(userInfo->pw_gid); info.home = userInfo->pw_dir; info.shell = userInfo->pw_shell; info.uid = geteuid(); info.gid = getegid(); info.ngroups = 0; return; } UPDATE_TRACE_POINT(); string defaultGroup; string startupFile = absolutizePath(options.getStartupFile(), info.appRoot); struct passwd *userInfo = NULL; gid_t groupId = (gid_t) -1; if (options.defaultGroup.empty()) { struct passwd *info = getpwnam(options.defaultUser.c_str()); if (info == NULL) { throw RuntimeException("Cannot get user database entry for username '" + options.defaultUser + "'"); } struct group *group = getgrgid(info->pw_gid); if (group == NULL) { throw RuntimeException(string("Cannot get group database entry for ") + "the default group belonging to username '" + options.defaultUser + "'"); } defaultGroup = group->gr_name; } else { defaultGroup = options.defaultGroup; } UPDATE_TRACE_POINT(); if (!options.user.empty()) { userInfo = getpwnam(options.user.c_str()); } else { struct stat buf; if (syscalls::lstat(startupFile.c_str(), &buf) == -1) { int e = errno; throw SystemException("Cannot lstat(\"" + startupFile + "\")", e); } userInfo = getpwuid(buf.st_uid); } if (userInfo == NULL || userInfo->pw_uid == 0) { userInfo = getpwnam(options.defaultUser.c_str()); } UPDATE_TRACE_POINT(); if (!options.group.empty()) { if (options.group == "!STARTUP_FILE!") { struct stat buf; if (syscalls::lstat(startupFile.c_str(), &buf) == -1) { int e = errno; throw SystemException("Cannot lstat(\"" + startupFile + "\")", e); } if (getgrgid(buf.st_gid) != NULL) { groupId = buf.st_gid; } else { groupId = (gid_t) -1; } } else { struct group *groupInfo = getgrnam(options.group.c_str()); if (groupInfo != NULL) { groupId = groupInfo->gr_gid; } else { groupId = (gid_t) -1; } } } else if (userInfo != NULL) { groupId = userInfo->pw_gid; } if (groupId == 0 || groupId == (gid_t) -1) { groupId = lookupGid(defaultGroup); } UPDATE_TRACE_POINT(); if (userInfo == NULL) { throw RuntimeException("Cannot determine a user to lower privilege to"); } if (groupId == (gid_t) -1) { throw RuntimeException("Cannot determine a group to lower privilege to"); } UPDATE_TRACE_POINT(); #ifdef __APPLE__ int groups[1024]; info.ngroups = sizeof(groups) / sizeof(int); #else gid_t groups[1024]; info.ngroups = sizeof(groups) / sizeof(gid_t); #endif info.switchUser = true; info.username = userInfo->pw_name; info.groupname = getGroupName(groupId); info.home = userInfo->pw_dir; info.shell = userInfo->pw_shell; info.uid = userInfo->pw_uid; info.gid = groupId; #if !defined(HAVE_GETGROUPLIST) && (defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)) #define HAVE_GETGROUPLIST #endif #ifdef HAVE_GETGROUPLIST int ret = getgrouplist(userInfo->pw_name, groupId, groups, &info.ngroups); if (ret == -1) { int e = errno; throw SystemException("getgrouplist() failed", e); } info.gidset = shared_array(new gid_t[info.ngroups]); for (int i = 0; i < info.ngroups; i++) { info.gidset[i] = groups[i]; } #endif } void prepareSwitchingWorkingDirectory(SpawnPreparationInfo &info, const Options &options) const { vector components; split(info.appRootInsideChroot, '/', components); assert(components.front() == ""); components.erase(components.begin()); for (unsigned int i = 0; i < components.size(); i++) { string path; for (unsigned int j = 0; j <= i; j++) { path.append("/"); path.append(components[j]); } if (path.empty()) { path = "/"; } if (info.chrootDir == "/") { info.appRootPaths.push_back(path); } else { info.appRootPaths.push_back(info.chrootDir + path); } info.appRootPathsInsideChroot.push_back(path); } assert(info.appRootPathsInsideChroot.back() == info.appRootInsideChroot); } bool shouldLoadShellEnvvars(const Options &options, const SpawnPreparationInfo &preparation) const { if (options.loadShellEnvvars) { string shellName = extractBaseName(preparation.shell); return shellName == "bash" || shellName == "zsh" || shellName == "ksh"; } else { return false; } } string serializeEnvvarsFromPoolOptions(const Options &options) const { vector< pair >::const_iterator it, end; string result; appendNullTerminatedKeyValue(result, "IN_PASSENGER", "1"); appendNullTerminatedKeyValue(result, "PYTHONUNBUFFERED", "1"); appendNullTerminatedKeyValue(result, "NODE_PATH", resourceLocator.getNodeLibDir()); appendNullTerminatedKeyValue(result, "RAILS_ENV", options.environment); appendNullTerminatedKeyValue(result, "RACK_ENV", options.environment); appendNullTerminatedKeyValue(result, "WSGI_ENV", options.environment); appendNullTerminatedKeyValue(result, "NODE_ENV", options.environment); appendNullTerminatedKeyValue(result, "PASSENGER_APP_ENV", options.environment); if (!options.baseURI.empty() && options.baseURI != "/") { appendNullTerminatedKeyValue(result, "RAILS_RELATIVE_URL_ROOT", options.baseURI); appendNullTerminatedKeyValue(result, "RACK_BASE_URI", options.baseURI); appendNullTerminatedKeyValue(result, "PASSENGER_BASE_URI", options.baseURI); } it = options.environmentVariables.begin(); end = options.environmentVariables.end(); while (it != end) { appendNullTerminatedKeyValue(result, it->first, it->second); it++; } return Base64::encode(result); } void switchUser(const SpawnPreparationInfo &info) { if (info.switchUser) { bool setgroupsCalled = false; #ifdef HAVE_GETGROUPLIST if (info.ngroups <= NGROUPS_MAX) { setgroupsCalled = true; if (setgroups(info.ngroups, info.gidset.get()) == -1) { int e = errno; printf("!> Error\n"); printf("!> \n"); printf("setgroups(%d, ...) failed: %s (errno=%d)\n", info.ngroups, strerror(e), e); fflush(stdout); _exit(1); } } #endif if (!setgroupsCalled && initgroups(info.username.c_str(), info.gid) == -1) { int e = errno; printf("!> Error\n"); printf("!> \n"); printf("initgroups() failed: %s (errno=%d)\n", strerror(e), e); fflush(stdout); _exit(1); } if (setgid(info.gid) == -1) { int e = errno; printf("!> Error\n"); printf("!> \n"); printf("setgid() failed: %s (errno=%d)\n", strerror(e), e); fflush(stdout); _exit(1); } if (setuid(info.uid) == -1) { int e = errno; printf("!> Error\n"); printf("!> \n"); printf("setuid() failed: %s (errno=%d)\n", strerror(e), e); fflush(stdout); _exit(1); } // We set these environment variables here instead of // in the SpawnPreparer because SpawnPreparer might // be executed by bash, but these environment variables // must be set before bash. setenv("USER", info.username.c_str(), 1); setenv("LOGNAME", info.username.c_str(), 1); setenv("SHELL", info.shell.c_str(), 1); setenv("HOME", info.home.c_str(), 1); } } void setChroot(const SpawnPreparationInfo &info) { if (info.chrootDir != "/") { int ret = chroot(info.chrootDir.c_str()); if (ret == -1) { int e = errno; fprintf(stderr, "Cannot chroot() to '%s': %s (errno=%d)\n", info.chrootDir.c_str(), strerror(e), e); fflush(stderr); _exit(1); } } } void setWorkingDirectory(const SpawnPreparationInfo &info) { vector::const_iterator it, end = info.appRootPathsInsideChroot.end(); int ret; for (it = info.appRootPathsInsideChroot.begin(); it != end; it++) { struct stat buf; ret = stat(it->c_str(), &buf); if (ret == -1 && errno == EACCES) { char parent[PATH_MAX]; const char *end = strrchr(it->c_str(), '/'); memcpy(parent, it->c_str(), end - it->c_str()); parent[end - it->c_str()] = '\0'; printf("!> Error\n"); printf("!> \n"); printf("This web application process is being run as user '%s' and group '%s' " "and must be able to access its application root directory '%s'. " "However, the parent directory '%s' has wrong permissions, thereby " "preventing this process from accessing its application root directory. " "Please fix the permissions of the directory '%s' first.\n", info.username.c_str(), info.groupname.c_str(), info.appRootPaths.back().c_str(), parent, parent); fflush(stdout); _exit(1); } else if (ret == -1) { int e = errno; printf("!> Error\n"); printf("!> \n"); printf("Unable to stat() directory '%s': %s (errno=%d)\n", it->c_str(), strerror(e), e); fflush(stdout); _exit(1); } } ret = chdir(info.appRootPathsInsideChroot.back().c_str()); if (ret == 0) { setenv("PWD", info.appRootPathsInsideChroot.back().c_str(), 1); } else if (ret == -1 && errno == EACCES) { printf("!> Error\n"); printf("!> \n"); printf("This web application process is being run as user '%s' and group '%s' " "and must be able to access its application root directory '%s'. " "However this directory is not accessible because it has wrong permissions. " "Please fix these permissions first.\n", info.username.c_str(), info.groupname.c_str(), info.appRootPaths.back().c_str()); fflush(stdout); _exit(1); } else { int e = errno; printf("!> Error\n"); printf("!> \n"); printf("Unable to change working directory to '%s': %s (errno=%d)\n", info.appRootPathsInsideChroot.back().c_str(), strerror(e), e); fflush(stdout); _exit(1); } } /** * Execute the process spawning negotiation protocol. */ ProcessPtr negotiateSpawn(NegotiationDetails &details) { TRACE_POINT(); details.spawnStartTime = SystemTime::getUsec(); details.gupid = integerToHex(SystemTime::get() / 60) + "-" + config->randomGenerator->generateAsciiString(11); details.connectPassword = config->randomGenerator->generateAsciiString(43); details.timeout = details.options->startTimeout * 1000; string result; try { result = readMessageLine(details); } catch (const SystemException &e) { throwAppSpawnException("An error occurred while starting the " "web application. There was an I/O error while reading its " "handshake message: " + e.sys(), SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } catch (const TimeoutException &) { throwAppSpawnException("An error occurred while starting the " "web application: it did not write a handshake message in time.", SpawnException::APP_STARTUP_TIMEOUT, details); } protocol_begin: if (result == "I have control 1.0\n") { UPDATE_TRACE_POINT(); sendSpawnRequest(details); try { result = readMessageLine(details); } catch (const SystemException &e) { throwAppSpawnException("An error occurred while starting the " "web application. There was an I/O error while reading its " "startup response: " + e.sys(), SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } catch (const TimeoutException &) { throwAppSpawnException("An error occurred while starting the " "web application: it did not write a startup response in time.", SpawnException::APP_STARTUP_TIMEOUT, details); } if (result == "Ready\n") { return handleSpawnResponse(details); } else if (result == "Error\n") { handleSpawnErrorResponse(details); } else if (result == "I have control 1.0\n") { goto protocol_begin; } else { handleInvalidSpawnResponseType(result, details); } } else { UPDATE_TRACE_POINT(); if (result == "Error\n") { handleSpawnErrorResponse(details); } else { handleInvalidSpawnResponseType(result, details); } } return ProcessPtr(); // Never reached. } void handleSpawnErrorResponse(NegotiationDetails &details) { TRACE_POINT(); map attributes; while (true) { string line = readMessageLine(details); if (line.empty()) { throwAppSpawnException("An error occurred while starting the " "web application. It unexpected closed the connection while " "sending its startup response.", SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } else if (line[line.size() - 1] != '\n') { throwAppSpawnException("An error occurred while starting the " "web application. It sent a line without a newline character " "in its startup response.", SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } else if (line == "\n") { break; } string::size_type pos = line.find(": "); if (pos == string::npos) { throwAppSpawnException("An error occurred while starting the " "web application. It sent a startup response line without " "separator.", SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } string key = line.substr(0, pos); string value = line.substr(pos + 2, line.size() - pos - 3); attributes[key] = value; } try { string message = details.io.readAll(&details.timeout); SpawnException e("An error occured while starting the web application.", message, attributes["html"] == "true", SpawnException::APP_STARTUP_EXPLAINABLE_ERROR); annotateAppSpawnException(e, details); throw e; } catch (const SystemException &e) { throwAppSpawnException("An error occurred while starting the " "web application. It tried to report an error message, but " "an I/O error occurred while reading this error message: " + e.sys(), SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } catch (const TimeoutException &) { throwAppSpawnException("An error occurred while starting the " "web application. It tried to report an error message, but " "it took too much time doing that.", SpawnException::APP_STARTUP_TIMEOUT, details); } } void handleInvalidSpawnResponseType(const string &line, NegotiationDetails &details) { if (line.empty()) { throwAppSpawnException("An error occurred while starting " "the web application. It exited before signalling successful " "startup back to " PROGRAM_NAME ".", SpawnException::APP_STARTUP_ERROR, details); } else { throwAppSpawnException("An error occurred while starting " "the web application. It sent an unknown response type \"" + cEscapeString(line) + "\".", SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); } } public: /** * Timestamp at which this Spawner was created. Microseconds resolution. */ const unsigned long long creationTime; Spawner(const ResourceLocator &_resourceLocator) : resourceLocator(_resourceLocator), creationTime(SystemTime::getUsec()) { } virtual ~Spawner() { } virtual ProcessPtr spawn(const Options &options) = 0; /** Does not depend on the event loop. */ virtual bool cleanable() const { return false; } virtual void cleanup() { } /** Does not depend on the event loop. */ virtual unsigned long long lastUsed() const { return 0; } SpawnerConfigPtr getConfig() const { return config; } }; typedef boost::shared_ptr SpawnerPtr; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_SPAWNER_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/SpawnerFactory.h000644 000765 000024 00000011066 12233035540 024607 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL2_SPAWNER_FACTORY_H_ #define _PASSENGER_APPLICATION_POOL2_SPAWNER_FACTORY_H_ #include #include #include #include namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; using namespace oxt; class SpawnerFactory { private: SafeLibevPtr libev; ResourceLocator resourceLocator; ServerInstanceDir::GenerationPtr generation; RandomGeneratorPtr randomGenerator; boost::mutex syncher; SpawnerConfigPtr config; DummySpawnerPtr dummySpawner; SpawnerPtr tryCreateSmartSpawner(const Options &options) { string dir = resourceLocator.getHelperScriptsDir(); vector preloaderCommand; if (options.appType == "classic-rails") { preloaderCommand.push_back(options.ruby); preloaderCommand.push_back(dir + "/classic-rails-preloader.rb"); } else if (options.appType == "rack") { preloaderCommand.push_back(options.ruby); preloaderCommand.push_back(dir + "/rack-preloader.rb"); } else { return SpawnerPtr(); } return boost::make_shared(libev, resourceLocator, generation, preloaderCommand, options, config); } public: SpawnerFactory(const SafeLibevPtr &_libev, const ResourceLocator &_resourceLocator, const ServerInstanceDir::GenerationPtr &_generation, const SpawnerConfigPtr &_config = SpawnerConfigPtr()) : libev(_libev), resourceLocator(_resourceLocator), generation(_generation) { if (_config == NULL) { config = boost::make_shared(); } else { config = _config; } } virtual ~SpawnerFactory() { } virtual SpawnerPtr create(const Options &options) { if (options.spawnMethod == "smart" || options.spawnMethod == "smart-lv2") { SpawnerPtr spawner = tryCreateSmartSpawner(options); if (spawner == NULL) { spawner = boost::make_shared(libev, resourceLocator, generation, config); } return spawner; } else if (options.spawnMethod == "direct" || options.spawnMethod == "conservative") { boost::shared_ptr spawner = boost::make_shared( libev, resourceLocator, generation, config); return spawner; } else if (options.spawnMethod == "dummy") { syscalls::usleep(config->spawnerCreationSleepTime); return getDummySpawner(); } else { throw ArgumentException("Unknown spawn method '" + options.spawnMethod + "'"); } } /** * SpawnerFactory always returns the same DummyFactory object upon * creating a dummy spawner. This allows unit tests to easily * set debugging options on the spawner. */ DummySpawnerPtr getDummySpawner() { boost::lock_guard l(syncher); if (dummySpawner == NULL) { dummySpawner = boost::make_shared(resourceLocator, config); } return dummySpawner; } /** * All created Spawner objects share the same SpawnerConfig object. */ SpawnerConfigPtr getConfig() const { return config; } RandomGeneratorPtr getRandomGenerator() const { return randomGenerator; } const ResourceLocator &getResourceLocator() const { return resourceLocator; } }; typedef boost::shared_ptr SpawnerFactoryPtr; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_SPAWNER_FACTORY_H_ */ passenger-4.0.37/ext/common/ApplicationPool2/SuperGroup.h000644 000765 000024 00000050657 12233035540 023764 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_APPLICATION_POOL2_SUPER_GROUP_H_ #define _PASSENGER_APPLICATION_POOL2_SUPER_GROUP_H_ #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { namespace ApplicationPool2 { using namespace std; using namespace boost; using namespace oxt; /** * An abstract container for multiple Groups (applications). It is a support * structure for supporting application sets, multiple applications that can * closely work with each other as if they were a single entity. There's no * support for application sets yet in Phusion Passenger 4, but this class * lays the foundation to make it possible. * * An application set is backed by a directory that contains: * * - The files for the individual applications. * - An application set manifest file that: * * Describes the containing applications. * * Describes the application set itself. * * Describes instructions that must be first * followed before the application set is usable. * * Describes instructions that must be followed when the * application set is to be cleaned up. * * SuperGroup is designed to assume to that loading the manifest file * and following the instructions in them may be a blocking operation * that can take a while. Thus it makes use of background threads to * do most of initialization and destruction work (see `doInitialize()` * and `doDestroy()`). The `state` variable keeps track of things. * * A SuperGroup starts off in the `INITIALIZING` state. When it's done * initializing, it becomes `READY`. If a restart is necessary it will * transition to `RESTARTING` and then eventually back to `READY`. * At any time the SuperGroup may be instructed to destroy itself, in * which case it will first transition to `DESTROYING` and eventually * to `DESTROYED`. Once destroyed, the SuperGroup is reusable so it * can go back to `INITIALIZING` when needed. * * * ## Life time * * A SuperGroup, once created and added to the Pool, is normally not * supposed to be destroyed and removed from the Pool automatically. * This is because a SuperGroup may contain important spawning * parameters such as SuperGroup-specific environment variables. * However the system does not disallow the administrator from * manually removing a SuperGroup from the pool. * * * ## Multiple instances and initialization/destruction * * It is allowed to create multiple SuperGroups backed by the same * application set directory, e.g. to increase concurrency. The system * may destroy a SuperGroup in the background while creating a new * one while that is in progress. This could even happen across processes, * e.g. one process is busy destroying a SuperGroup while another * one is initializing it. * * Furthermore, it is possible for a SuperGroup to receive a get() * command during destruction. * * It is therefore important that `doInitialize()` and `doDestroy()` * do not interfere with other instances of the same code, and can * commit their work atomically. * * * ## Thread-safety * * Except for otherwise documented parts, this class is not thread-safe, * so only access it within the ApplicationPool lock. */ class SuperGroup: public boost::enable_shared_from_this { public: enum State { /** This SuperGroup is being initialized. `groups` is empty and * `get()` actions cannot be immediately satisfied, so they * are placed in `getWaitlist`. Once the SuperGroup is done * loading the state it will transition to `READY`. Calling `destroy()` * will make it transition to `DESTROYING`. If initialization * failed it will transition to `DESTROYED`. */ INITIALIZING, /** This SuperGroup is loaded and is ready for action. From * here the state can transition to `RESTARTING` or `DESTROYING`. */ READY, /** This SuperGroup is being restarted. The SuperGroup * information is being reloaded from the data source * and processes are being restarted. In this state * `get()` actions can still be statisfied, and the data * structures still contain the old information. Once reloading * is done the data structures will be atomically swapped * with the newly reloaded ones. The old structures will be * destroyed in the background. * Once the restart is completed, the state will transition * to `READY`. * Re-restarting won't have any effect in this state. * `destroy()` will cause the restart to be aborted and will * cause a transition to `DESTROYING`. */ RESTARTING, /** This SuperGroup is being destroyed. Processes are being shut * down and other resources are being cleaned up. In this state, * `groups` is empty. * Restarting won't have any effect, but `get()` will cause a * transition to `INITIALIZING`. */ DESTROYING, /** This SuperGroup has been destroyed and all resources have been * freed. Restarting won't have any effect but calling `get()` will * make it transition to `INITIALIZING`. */ DESTROYED }; enum ShutdownResult { /** The SuperGroup has been successfully destroyed. */ SUCCESS, /** The SuperGroup was not destroyed because a get or restart * request came in while destroying. */ CANCELED }; typedef boost::function ShutdownCallback; private: friend class Pool; friend class Group; Options options; /** A number for concurrency control, incremented every time the state changes. * Every background thread that SuperGroup spawns knows the generation number * from when the thread was spawned. A thread generally does some work outside * the lock, then grabs the lock and updates the information in this SuperGroup * with the results of the work. But before updating happens it first checks * whether the generation number is as expected, so increasing this generation * number will prevent old threads from updating the information with possibly * now-stale information. It is a good way to prevent A-B-A concurrency * problems. */ unsigned int generation; // Thread-safe. static boost::mutex &getPoolSyncher(const PoolPtr &pool); static void runAllActions(const vector &actions); string generateSecret() const; void runInitializationHooks() const; void runDestructionHooks() const; void setupInitializationOrDestructionHook(HookScriptOptions &options) const; void createInterruptableThread(const boost::function &func, const string &name, unsigned int stackSize); void verifyInvariants() const { // !a || b: logical equivalent of a IMPLIES b. assert(groups.empty() == (state == INITIALIZING || state == DESTROYING || state == DESTROYED)); assert((defaultGroup == NULL) == (state == INITIALIZING || state == DESTROYING || state == DESTROYED)); assert(!( state == READY || state == RESTARTING || state == DESTROYING || state == DESTROYED ) || ( getWaitlist.empty() )); assert(!( state == DESTROYED ) || ( detachedGroups.empty() )); } void setState(State newState) { state = newState; generation++; } vector loadComponentInfos(const Options &options) const { vector infos; ComponentInfo info; info.name = "default"; info.isDefault = true; infos.push_back(info); return infos; } Group *findDefaultGroup(const vector &groups) const { vector::const_iterator it; for (it = groups.begin(); it != groups.end(); it++) { const GroupPtr &group = *it; if (group->componentInfo.isDefault) { return group.get(); } } return NULL; } pair findGroupCorrespondingToComponent( const vector &groups, const ComponentInfo &info) const { unsigned int i; for (i = 0; i < groups.size(); i++) { const GroupPtr &group = groups[i]; if (group->componentInfo.name == info.name) { return make_pair(const_cast(group), i); } } return make_pair(GroupPtr(), 0); } static void oneGroupHasBeenShutDown(SuperGroupPtr self, GroupPtr group) { // This function is either called from the pool event loop or directly from // the detachAllGroups post lock actions. In both cases getPool() is never NULL. PoolPtr pool = self->getPool(); boost::lock_guard lock(self->getPoolSyncher(pool)); vector::iterator it, end = self->detachedGroups.end(); for (it = self->detachedGroups.begin(); it != end; it++) { if (*it == group) { self->detachedGroups.erase(it); break; } } } /** One of the post lock actions can potentially perform a long-running * operation, so running them in a thread is advised. */ void detachAllGroups(vector &groups, vector &postLockActions) { foreach (const GroupPtr &group, groups) { // doRestart() may temporarily nullify elements in 'groups'. if (group == NULL) { continue; } while (!group->getWaitlist.empty()) { getWaitlist.push_back(group->getWaitlist.front()); group->getWaitlist.pop_front(); } detachedGroups.push_back(group); group->shutdown( boost::bind(oneGroupHasBeenShutDown, shared_from_this(), group), postLockActions ); } groups.clear(); } void assignGetWaitlistToGroups(vector &postLockActions) { while (!getWaitlist.empty()) { GetWaiter &waiter = getWaitlist.front(); Group *group = route(waiter.options); Options adjustedOptions = waiter.options; adjustOptions(adjustedOptions, group); SessionPtr session = group->get(adjustedOptions, waiter.callback, postLockActions); if (session != NULL) { postLockActions.push_back(boost::bind( waiter.callback, session, ExceptionPtr())); } getWaitlist.pop_front(); } } void adjustOptions(Options &options, const Group *group) const { // No-op. } static void doInitialize(SuperGroupPtr self, Options options, unsigned int generation) { self->realDoInitialize(options, generation); } static void doRestart(SuperGroupPtr self, Options options, unsigned int generation) { self->realDoRestart(options, generation); } void realDoInitialize(const Options &options, unsigned int generation); void realDoRestart(const Options &options, unsigned int generation); void doDestroy(SuperGroupPtr self, unsigned int generation, ShutdownCallback callback) { TRACE_POINT(); runDestructionHooks(); // Wait until 'detachedGroups' is empty. UPDATE_TRACE_POINT(); PoolPtr pool = getPool(); boost::unique_lock lock(getPoolSyncher(pool)); verifyInvariants(); while (true) { if (OXT_UNLIKELY(this->generation != generation)) { UPDATE_TRACE_POINT(); lock.unlock(); if (callback) { callback(CANCELED); } return; } else if (detachedGroups.empty()) { break; } else { UPDATE_TRACE_POINT(); lock.unlock(); syscalls::usleep(10000); lock.lock(); verifyInvariants(); } } UPDATE_TRACE_POINT(); assert(state == DESTROYING); state = DESTROYED; verifyInvariants(); lock.unlock(); if (callback) { callback(SUCCESS); } } /*********************/ /*********************/ public: mutable boost::mutex backrefSyncher; const boost::weak_ptr pool; State state; string name; string secret; /** Invariant: * groups.empty() == (state == INITIALIZING || state == DESTROYING || state == DESTROYED) */ vector groups; /** Invariant: * (defaultGroup == NULL) == (state == INITIALIZING || state == DESTROYING || state == DESTROYED) */ Group *defaultGroup; /** * get() requests for this super group that cannot be immediately satisfied * are put on this wait list, which must be processed as soon as the * necessary resources have become free. Requests must wait when a SuperGroup * is initializing. * * Invariant: * if state == READY || state == RESTARTING || state == DESTROYING || state == DESTROYED: * getWaitlist.empty() * Equivalently: * if state != INITIALIZING: * getWaitlist.empty() * Equivalently: * if !getWaitlist.empty(): * state == INITIALIZING */ deque getWaitlist; /** * Groups which are being shut down right now. These Groups contain a * reference to the containg SuperGroup so that the SuperGroup is not * actually destroyed until all Groups in this collection are done * shutting down. * * Invariant: * if state == DESTROYED: * detachedGroups.empty() */ vector detachedGroups; /** One MUST call initialize() after construction because shared_from_this() * is not available in the constructor. */ SuperGroup(const PoolPtr &_pool, const Options &options) : pool(_pool) { this->options = options.copyAndPersist().clearLogger(); this->name = options.getAppGroupName(); secret = generateSecret(); state = INITIALIZING; defaultGroup = NULL; generation = 0; } ~SuperGroup() { if (OXT_UNLIKELY(state != DESTROYED)) { P_BUG("You must call Group::destroy(..., false) before " "actually destroying the SuperGroup."); } verifyInvariants(); } void initialize() { createInterruptableThread( boost::bind( doInitialize, shared_from_this(), options.copyAndPersist(), generation), "SuperGroup initializer: " + name, POOL_HELPER_THREAD_STACK_SIZE); } /** * Thread-safe. * * As long as 'state' != DESTROYED, result != NULL. * But in thread callbacks in this file, getPool() is never NULL * because Pool::destroy() joins all threads, so Pool can never * be destroyed before all thread callbacks have finished. */ PoolPtr getPool() const { return pool.lock(); } bool isAlive() const { return state != DESTROYING && state != DESTROYED; } const char *getStateName() const { switch (state) { case INITIALIZING: return "INITIALIZING"; case READY: return "READY"; case RESTARTING: return "RESTARTING"; case DESTROYING: return "DESTROYING"; case DESTROYED: return "DESTROYED"; default: P_BUG("Unknown SuperGroup state " << (int) state); return NULL; // Shut up compiler warning. } } /** * If `allowReinitialization` is true then destroying a SuperGroup that * has get waiters will make it reinitialize. Otherwise this SuperGroup * will be forcefully set to the `DESTROYING` state and `getWaitlist` will be * left untouched; in this case it is up to the caller to empty * the `getWaitlist` and do something with it, otherwise the invariant * will be broken. * * One of the post lock actions can potentially perform a long-running * operation, so running them in a thread is advised. */ void destroy(bool allowReinitialization, vector &postLockActions, const ShutdownCallback &callback) { verifyInvariants(); switch (state) { case INITIALIZING: case READY: case RESTARTING: detachAllGroups(groups, postLockActions); defaultGroup = NULL; if (getWaitlist.empty() || !allowReinitialization) { setState(DESTROYING); createInterruptableThread( boost::bind( &SuperGroup::doDestroy, this, // Keep reference to self to prevent destruction. shared_from_this(), generation, callback), "SuperGroup destroyer: " + name, POOL_HELPER_THREAD_STACK_SIZE + 1024 * 256); } else { // Spawning this thread before setState() so that // it doesn't change the state when done. createInterruptableThread( boost::bind( &SuperGroup::doDestroy, this, // Keep reference to self to prevent destruction. shared_from_this(), generation, ShutdownCallback()), "SuperGroup destroyer: " + name, POOL_HELPER_THREAD_STACK_SIZE + 1024 * 256); setState(INITIALIZING); createInterruptableThread( boost::bind( doInitialize, shared_from_this(), options.copyAndPersist(), generation), "SuperGroup initializer: " + name, POOL_HELPER_THREAD_STACK_SIZE + 1024 * 256); if (callback) { postLockActions.push_back(boost::bind(callback, CANCELED)); } } break; case DESTROYING: case DESTROYED: break; default: P_BUG("Unknown SuperGroup state " << (int) state); } if (allowReinitialization) { verifyInvariants(); } } /** * @post * if result: * getWaitlist.empty() */ bool garbageCollectable(unsigned long long now = 0) const { /* if (state == READY) { vector::const_iterator it, end = groups.end(); bool result = true; for (it = groups.begin(); result && it != end; it++) { result = result && (*it)->garbageCollectable(now); } assert(!result || getWaitlist.empty()); return result; } else { assert(!(state == DESTROYED) || getWaitlist.empty()); return state == DESTROYED; } */ return false; } SessionPtr get(const Options &newOptions, const GetCallback &callback, vector &postLockActions) { switch (state) { case INITIALIZING: getWaitlist.push_back(GetWaiter(newOptions, callback)); verifyInvariants(); return SessionPtr(); case READY: case RESTARTING: if (needsRestart()) { restart(newOptions); } if (groups.size() > 1) { Group *group = route(newOptions); Options adjustedOptions = newOptions; adjustOptions(adjustedOptions, group); verifyInvariants(); return group->get(adjustedOptions, callback, postLockActions); } else { verifyInvariants(); return defaultGroup->get(newOptions, callback, postLockActions); } case DESTROYING: case DESTROYED: getWaitlist.push_back(GetWaiter(newOptions, callback)); setState(INITIALIZING); createInterruptableThread( boost::bind( doInitialize, shared_from_this(), newOptions.copyAndPersist().clearLogger(), generation), "SuperGroup initializer: " + name, POOL_HELPER_THREAD_STACK_SIZE); verifyInvariants(); return SessionPtr(); default: P_BUG("Unknown SuperGroup state " << (int) state); return SessionPtr(); // Shut up compiler warning. }; } Group *route(const Options &options) const { return defaultGroup; } unsigned int capacityUsed() const { vector::const_iterator it, end = groups.end(); unsigned int result = 0; for (it = groups.begin(); it != end; it++) { result += (*it)->capacityUsed(); } if (state == INITIALIZING || state == RESTARTING) { result++; } return result; } unsigned int getProcessCount() const { unsigned int result = 0; vector::const_iterator g_it, g_end = groups.end(); for (g_it = groups.begin(); g_it != g_end; g_it++) { const GroupPtr &group = *g_it; result += group->getProcessCount(); } return result; } bool needsRestart() const { return false; } void restart(const Options &options) { verifyInvariants(); if (state == READY) { createInterruptableThread( boost::bind( doRestart, // Keep reference to self to prevent destruction. shared_from_this(), options.copyAndPersist().clearLogger(), generation), "SuperGroup restarter: " + name, POOL_HELPER_THREAD_STACK_SIZE); state = RESTARTING; } verifyInvariants(); } string inspect() const { return name; } }; } // namespace ApplicationPool2 } // namespace Passenger #endif /* _PASSENGER_APPLICATION_POOL2_SUPER_GROUP_H_ */ passenger-4.0.37/ext/common/agents/Base.cpp000644 000765 000024 00000125530 12233035540 021151 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include #include #include #include #include #include #ifdef __linux__ #include #include #endif #include #include #include #include #include #include #include #include #include #include #if defined(__APPLE__) || defined(__linux__) #define LIBC_HAS_BACKTRACE_FUNC #endif #ifdef LIBC_HAS_BACKTRACE_FUNC #include #endif #include #include #include #include #include #include #include #include #include #ifdef __linux__ #include #endif namespace Passenger { using namespace std; struct AbortHandlerState { pid_t pid; int signo; siginfo_t *info; char messagePrefix[32]; char messageBuf[1024]; }; typedef void (*Callback)(AbortHandlerState &state, void *userData); #define IGNORE_SYSCALL_RESULT(code) \ do { \ int _ret = code; \ (void) _ret; \ } while (false) static bool _feedbackFdAvailable = false; static const char digits[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; static const char hex_chars[] = "01234567890abcdef"; static bool shouldDumpWithCrashWatch = true; static bool beepOnAbort = false; static bool stopOnAbort = false; // Pre-allocate an alternative stack for use in signal handlers in case // the normal stack isn't usable. static char *alternativeStack; static unsigned int alternativeStackSize; static volatile unsigned int abortHandlerCalled = 0; static unsigned int randomSeed = 0; static const char *argv0 = NULL; static const char *backtraceSanitizerCommand = NULL; static bool backtraceSanitizerPassProgramInfo = true; static DiagnosticsDumper customDiagnosticsDumper = NULL; static void *customDiagnosticsDumperUserData; // We preallocate a few pipes during startup which we will close in the // crash handler. This way we can be sure that when the crash handler // calls pipe() it won't fail with "Too many files". static int emergencyPipe1[2] = { -1, -1 }; static int emergencyPipe2[2] = { -1, -1 }; // If assert() failed, its information is stored here. static struct { const char *filename; const char *function; // May be NULL. const char *expression; unsigned int line; } lastAssertionFailure; static void ignoreSigpipe() { struct sigaction action; action.sa_handler = SIG_IGN; action.sa_flags = 0; sigemptyset(&action.sa_mask); sigaction(SIGPIPE, &action, NULL); } static bool hasEnvOption(const char *name, bool defaultValue = false) { const char *value = getenv(name); if (value != NULL) { if (*value != '\0') { return strcmp(value, "yes") == 0 || strcmp(value, "y") == 0 || strcmp(value, "1") == 0 || strcmp(value, "on") == 0 || strcmp(value, "true") == 0; } else { return defaultValue; } } else { return defaultValue; } } // When we're in a crash handler, there's nothing we can do if we fail to // write to stderr, so we ignore its return value and we ignore compiler // warnings about ignoring that. static void write_nowarn(int fd, const void *buf, size_t n) { ssize_t ret = write(fd, buf, n); (void) ret; } // No idea whether strlen() is async signal safe, but let's not risk it // and write our own version instead that's guaranteed to be safe. static size_t safeStrlen(const char *str) { size_t size = 0; while (*str != '\0') { str++; size++; } return size; } // Async-signal safe way to print to stderr. static void safePrintErr(const char *message) { write_nowarn(STDERR_FILENO, message, strlen(message)); } // Must be async signal safe. static char * appendText(char *buf, const char *text) { size_t len = safeStrlen(text); strcpy(buf, text); return buf + len; } // Must be async signal safe. static void reverse(char *str, size_t len) { char *p1, *p2; if (*str == '\0') { return; } for (p1 = str, p2 = str + len - 1; p2 > p1; ++p1, --p2) { *p1 ^= *p2; *p2 ^= *p1; *p1 ^= *p2; } } // Must be async signal safe. static char * appendULL(char *buf, unsigned long long value) { unsigned long long remainder = value; unsigned int size = 0; do { buf[size] = digits[remainder % 10]; remainder = remainder / 10; size++; } while (remainder != 0); reverse(buf, size); return buf + size; } // Must be async signal safe. template static char * appendIntegerAsHex(char *buf, IntegerType value) { IntegerType remainder = value; unsigned int size = 0; do { buf[size] = hex_chars[remainder % 16]; remainder = remainder / 16; size++; } while (remainder != 0); reverse(buf, size); return buf + size; } // Must be async signal safe. static char * appendPointerAsString(char *buf, void *pointer) { // Use wierd union construction to avoid compiler warnings. if (sizeof(void *) == sizeof(unsigned int)) { union { void *pointer; unsigned int value; } u; u.pointer = pointer; return appendIntegerAsHex(appendText(buf, "0x"), u.value); } else if (sizeof(void *) == sizeof(unsigned long long)) { union { void *pointer; unsigned long long value; } u; u.pointer = pointer; return appendIntegerAsHex(appendText(buf, "0x"), u.value); } else { return appendText(buf, "(pointer size unsupported)"); } } static char * appendSignalName(char *buf, int signo) { switch (signo) { case SIGABRT: buf = appendText(buf, "SIGABRT"); break; case SIGSEGV: buf = appendText(buf, "SIGSEGV"); break; case SIGBUS: buf = appendText(buf, "SIGBUS"); break; case SIGFPE: buf = appendText(buf, "SIGFPE"); break; case SIGILL: buf = appendText(buf, "SIGILL"); break; default: return appendULL(buf, (unsigned long long) signo); } buf = appendText(buf, "("); buf = appendULL(buf, (unsigned long long) signo); buf = appendText(buf, ")"); return buf; } #define SI_CODE_HANDLER(name) \ case name: \ buf = appendText(buf, #name); \ break // Must be async signal safe. static char * appendSignalReason(char *buf, siginfo_t *info) { bool handled = true; switch (info->si_code) { SI_CODE_HANDLER(SI_USER); #ifdef SI_KERNEL SI_CODE_HANDLER(SI_KERNEL); #endif SI_CODE_HANDLER(SI_QUEUE); SI_CODE_HANDLER(SI_TIMER); #ifdef SI_ASYNCIO SI_CODE_HANDLER(SI_ASYNCIO); #endif #ifdef SI_MESGQ SI_CODE_HANDLER(SI_MESGQ); #endif #ifdef SI_SIGIO SI_CODE_HANDLER(SI_SIGIO); #endif #ifdef SI_TKILL SI_CODE_HANDLER(SI_TKILL); #endif default: switch (info->si_signo) { case SIGSEGV: switch (info->si_code) { #ifdef SEGV_MAPERR SI_CODE_HANDLER(SEGV_MAPERR); #endif #ifdef SEGV_ACCERR SI_CODE_HANDLER(SEGV_ACCERR); #endif default: handled = false; break; } break; case SIGBUS: switch (info->si_code) { #ifdef BUS_ADRALN SI_CODE_HANDLER(BUS_ADRALN); #endif #ifdef BUS_ADRERR SI_CODE_HANDLER(BUS_ADRERR); #endif #ifdef BUS_OBJERR SI_CODE_HANDLER(BUS_OBJERR); #endif default: handled = false; break; } break; default: handled = false; break; } if (!handled) { buf = appendText(buf, "#"); buf = appendULL(buf, (unsigned long long) info->si_code); } break; } if (info->si_code <= 0) { buf = appendText(buf, ", signal sent by PID "); buf = appendULL(buf, (unsigned long long) info->si_pid); buf = appendText(buf, " with UID "); buf = appendULL(buf, (unsigned long long) info->si_uid); } buf = appendText(buf, ", si_addr="); buf = appendPointerAsString(buf, info->si_addr); return buf; } static int runInSubprocessWithTimeLimit(AbortHandlerState &state, Callback callback, void *userData, int timeLimit) { char *end; pid_t child; int p[2], e; if (pipe(p) == -1) { e = errno; end = state.messageBuf; end = appendText(end, "Could not create subprocess: pipe() failed with errno="); end = appendULL(end, e); end = appendText(end, "\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); return -1; } child = asyncFork(); if (child == 0) { close(p[0]); callback(state, userData); _exit(0); return -1; } else if (child == -1) { e = errno; close(p[0]); close(p[1]); end = state.messageBuf; end = appendText(end, "Could not create subprocess: fork() failed with errno="); end = appendULL(end, e); end = appendText(end, "\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); return -1; } else { int status; close(p[1]); // We give the child process a time limit. If it doesn't succeed in // exiting within the time limit, we assume that it has frozen // and we kill it. struct pollfd fd; fd.fd = p[0]; fd.events = POLLIN | POLLHUP | POLLERR; if (poll(&fd, 1, timeLimit) <= 0) { kill(child, SIGKILL); safePrintErr("Could not run child process: it did not exit in time\n"); } close(p[0]); if (waitpid(child, &status, 0) == child) { return status; } else { return -1; } } } static void dumpFileDescriptorInfoWithLsof(AbortHandlerState &state, void *userData) { char *end; end = state.messageBuf; end = appendULL(end, state.pid); *end = '\0'; closeAllFileDescriptors(2); execlp("lsof", "lsof", "-p", state.messageBuf, "-nP", (const char * const) 0); end = state.messageBuf; end = appendText(end, "ERROR: cannot execute command 'lsof': errno="); end = appendULL(end, errno); end = appendText(end, "\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); _exit(1); } static void dumpFileDescriptorInfoWithLs(AbortHandlerState &state, char *end) { pid_t pid; int status; pid = asyncFork(); if (pid == 0) { closeAllFileDescriptors(2); // The '-v' is for natural sorting on Linux. On BSD -v means something else but it's harmless. execlp("ls", "ls", "-lv", state.messageBuf, (const char * const) 0); _exit(1); } else if (pid == -1) { safePrintErr("ERROR: Could not fork a process to dump file descriptor information!\n"); } else if (waitpid(pid, &status, 0) != pid || status != 0) { safePrintErr("ERROR: Could not run 'ls' to dump file descriptor information!\n"); } } static void dumpFileDescriptorInfo(AbortHandlerState &state) { char *messageBuf = state.messageBuf; char *end; struct stat buf; int status; end = messageBuf; end = appendText(end, state.messagePrefix); end = appendText(end, " ] Open files and file descriptors:\n"); write_nowarn(STDERR_FILENO, messageBuf, end - messageBuf); status = runInSubprocessWithTimeLimit(state, dumpFileDescriptorInfoWithLsof, NULL, 4000); if (status != 0) { safePrintErr("Falling back to another mechanism for dumping file descriptors.\n"); end = messageBuf; end = appendText(end, "/proc/"); end = appendULL(end, state.pid); end = appendText(end, "/fd"); *end = '\0'; if (stat(messageBuf, &buf) == 0) { dumpFileDescriptorInfoWithLs(state, end + 1); } else { end = messageBuf; end = appendText(end, "/dev/fd"); *end = '\0'; if (stat(messageBuf, &buf) == 0) { dumpFileDescriptorInfoWithLs(state, end + 1); } else { end = messageBuf; end = appendText(end, "ERROR: No other file descriptor dumping mechanism on current platform detected.\n"); write_nowarn(STDERR_FILENO, messageBuf, end - messageBuf); } } } } static void dumpWithCrashWatch(AbortHandlerState &state) { char *messageBuf = state.messageBuf; const char *pidStr = messageBuf; char *end = messageBuf; end = appendULL(end, (unsigned long long) state.pid); *end = '\0'; pid_t child = asyncFork(); if (child == 0) { closeAllFileDescriptors(2); execlp("crash-watch", "crash-watch", "--dump", pidStr, (char * const) 0); if (errno == ENOENT) { safePrintErr("Crash-watch is not installed. Please install it with 'gem install crash-watch' " "or download it from https://github.com/FooBarWidget/crash-watch.\n"); } else { int e = errno; end = messageBuf; end = appendText(end, "crash-watch is installed, but it could not be executed! "); end = appendText(end, "(execlp() returned errno="); end = appendULL(end, e); end = appendText(end, ") Please check your file permissions or something.\n"); write_nowarn(STDERR_FILENO, messageBuf, end - messageBuf); } _exit(1); } else if (child == -1) { int e = errno; end = messageBuf; end = appendText(end, "Could not execute crash-watch: fork() failed with errno="); end = appendULL(end, e); end = appendText(end, "\n"); write_nowarn(STDERR_FILENO, messageBuf, end - messageBuf); } else { waitpid(child, NULL, 0); } } #ifdef LIBC_HAS_BACKTRACE_FUNC static void dumpBacktrace(AbortHandlerState &state, void *userData) { void *backtraceStore[512]; int frames = backtrace(backtraceStore, sizeof(backtraceStore) / sizeof(void *)); char *end = state.messageBuf; end = appendText(end, "--------------------------------------\n"); end = appendText(end, "[ pid="); end = appendULL(end, (unsigned long long) state.pid); end = appendText(end, " ] Backtrace with "); end = appendULL(end, (unsigned long long) frames); end = appendText(end, " frames:\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); if (backtraceSanitizerCommand != NULL) { int p[2]; if (pipe(p) == -1) { int e = errno; end = state.messageBuf; end = appendText(end, "Could not dump diagnostics through backtrace sanitizer: pipe() failed with errno="); end = appendULL(end, e); end = appendText(end, "\n"); end = appendText(end, "Falling back to writing to stderr directly...\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); backtrace_symbols_fd(backtraceStore, frames, STDERR_FILENO); return; } pid_t pid = asyncFork(); if (pid == 0) { const char *pidStr = end = state.messageBuf; end = appendULL(end, (unsigned long long) state.pid); *end = '\0'; end++; close(p[1]); dup2(p[0], STDIN_FILENO); closeAllFileDescriptors(2); char *command = end; end = appendText(end, "exec "); end = appendText(end, backtraceSanitizerCommand); if (backtraceSanitizerPassProgramInfo) { end = appendText(end, " \""); end = appendText(end, argv0); end = appendText(end, "\" "); end = appendText(end, pidStr); } *end = '\0'; end++; execlp("/bin/sh", "/bin/sh", "-c", command, (const char * const) 0); end = state.messageBuf; end = appendText(end, "ERROR: cannot execute '"); end = appendText(end, backtraceSanitizerCommand); end = appendText(end, "' for sanitizing the backtrace, trying 'cat'...\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); execlp("cat", "cat", (const char * const) 0); execlp("/bin/cat", "cat", (const char * const) 0); execlp("/usr/bin/cat", "cat", (const char * const) 0); safePrintErr("ERROR: cannot execute 'cat'\n"); _exit(1); } else if (pid == -1) { close(p[0]); close(p[1]); int e = errno; end = state.messageBuf; end = appendText(end, "Could not dump diagnostics through backtrace sanitizer: fork() failed with errno="); end = appendULL(end, e); end = appendText(end, "\n"); end = appendText(end, "Falling back to writing to stderr directly...\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); backtrace_symbols_fd(backtraceStore, frames, STDERR_FILENO); } else { int status = -1; close(p[0]); backtrace_symbols_fd(backtraceStore, frames, p[1]); close(p[1]); if (waitpid(pid, &status, 0) == -1 || status != 0) { end = state.messageBuf; end = appendText(end, "ERROR: cannot execute '"); end = appendText(end, backtraceSanitizerCommand); end = appendText(end, "' for sanitizing the backtrace, writing to stderr directly...\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); backtrace_symbols_fd(backtraceStore, frames, STDERR_FILENO); } } } else { backtrace_symbols_fd(backtraceStore, frames, STDERR_FILENO); } } #endif static void runCustomDiagnosticsDumper(AbortHandlerState &state, void *userData) { customDiagnosticsDumper(customDiagnosticsDumperUserData); } // This function is performed in a child process. static void dumpDiagnostics(AbortHandlerState &state) { char *messageBuf = state.messageBuf; char *end; pid_t pid; int status; end = messageBuf; end = appendText(end, state.messagePrefix); end = appendText(end, " ] Date, uname and ulimits:\n"); write_nowarn(STDERR_FILENO, messageBuf, end - messageBuf); // Dump human-readable time string and string. pid = asyncFork(); if (pid == 0) { closeAllFileDescriptors(2); execlp("date", "date", (const char * const) 0); _exit(1); } else if (pid == -1) { safePrintErr("ERROR: Could not fork a process to dump the time!\n"); } else if (waitpid(pid, &status, 0) != pid || status != 0) { safePrintErr("ERROR: Could not run 'date'!\n"); } // Dump system uname. pid = asyncFork(); if (pid == 0) { closeAllFileDescriptors(2); execlp("uname", "uname", "-mprsv", (const char * const) 0); _exit(1); } else if (pid == -1) { safePrintErr("ERROR: Could not fork a process to dump the uname!\n"); } else if (waitpid(pid, &status, 0) != pid || status != 0) { safePrintErr("ERROR: Could not run 'uname -mprsv'!\n"); } // Dump ulimit. pid = asyncFork(); if (pid == 0) { closeAllFileDescriptors(2); execlp("ulimit", "ulimit", "-a", (const char * const) 0); // On Linux 'ulimit' is a shell builtin, not a command. execlp("/bin/sh", "/bin/sh", "-c", "ulimit -a", (const char * const) 0); _exit(1); } else if (pid == -1) { safePrintErr("ERROR: Could not fork a process to dump the ulimit!\n"); } else if (waitpid(pid, &status, 0) != pid || status != 0) { safePrintErr("ERROR: Could not run 'ulimit -a'!\n"); } end = messageBuf; end = appendText(end, state.messagePrefix); end = appendText(end, " ] Phusion Passenger version: " PASSENGER_VERSION "\n"); write_nowarn(STDERR_FILENO, messageBuf, end - messageBuf); if (lastAssertionFailure.filename != NULL) { end = messageBuf; end = appendText(end, state.messagePrefix); end = appendText(end, " ] Last assertion failure: ("); end = appendText(end, lastAssertionFailure.expression); end = appendText(end, "), "); if (lastAssertionFailure.function != NULL) { end = appendText(end, "function "); end = appendText(end, lastAssertionFailure.function); end = appendText(end, ", "); } end = appendText(end, "file "); end = appendText(end, lastAssertionFailure.filename); end = appendText(end, ", line "); end = appendULL(end, lastAssertionFailure.line); end = appendText(end, ".\n"); write_nowarn(STDERR_FILENO, messageBuf, end - messageBuf); } // It is important that writing the message and the backtrace are two // seperate operations because it's not entirely clear whether the // latter is async signal safe and thus can crash. end = messageBuf; end = appendText(end, state.messagePrefix); #ifdef LIBC_HAS_BACKTRACE_FUNC end = appendText(end, " ] libc backtrace available!\n"); #else end = appendText(end, " ] libc backtrace not available.\n"); #endif write_nowarn(STDERR_FILENO, messageBuf, end - messageBuf); #ifdef LIBC_HAS_BACKTRACE_FUNC runInSubprocessWithTimeLimit(state, dumpBacktrace, NULL, 4000); #endif safePrintErr("--------------------------------------\n"); if (customDiagnosticsDumper != NULL) { end = messageBuf; end = appendText(end, state.messagePrefix); end = appendText(end, " ] Dumping additional diagnostical information...\n"); write_nowarn(STDERR_FILENO, messageBuf, end - messageBuf); safePrintErr("--------------------------------------\n"); runInSubprocessWithTimeLimit(state, runCustomDiagnosticsDumper, NULL, 2000); safePrintErr("--------------------------------------\n"); } dumpFileDescriptorInfo(state); safePrintErr("--------------------------------------\n"); if (shouldDumpWithCrashWatch) { end = messageBuf; end = appendText(end, state.messagePrefix); #ifdef LIBC_HAS_BACKTRACE_FUNC end = appendText(end, " ] Dumping a more detailed backtrace with crash-watch...\n"); #else end = appendText(end, " ] Dumping a backtrace with crash-watch...\n"); #endif write_nowarn(STDERR_FILENO, messageBuf, end - messageBuf); dumpWithCrashWatch(state); } else { write_nowarn(STDERR_FILENO, "\n", 1); } } static bool createCrashLogFile(char *filename, time_t t) { char *end = filename; end = appendText(end, "/var/tmp/passenger-crash-log."); end = appendULL(end, (unsigned long long) t); *end = '\0'; int fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fd == -1) { end = filename; end = appendText(end, "/tmp/passenger-crash-log."); end = appendULL(end, (unsigned long long) t); *end = '\0'; fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0600); } if (fd == -1) { *filename = '\0'; return false; } else { close(fd); return true; } } static void forkAndRedirectToTee(char *filename) { pid_t pid; int p[2]; if (pipe(p) == -1) { // Signal error condition. *filename = '\0'; return; } pid = asyncFork(); if (pid == 0) { close(p[1]); dup2(p[0], STDIN_FILENO); execlp("tee", "tee", filename, (const char * const) 0); execlp("/usr/bin/tee", "tee", filename, (const char * const) 0); execlp("cat", "cat", (const char * const) 0); execlp("/bin/cat", "cat", (const char * const) 0); execlp("/usr/bin/cat", "cat", (const char * const) 0); safePrintErr("ERROR: cannot execute 'tee' or 'cat'; crash log will be lost!\n"); _exit(1); } else if (pid == -1) { safePrintErr("ERROR: cannot fork a process for executing 'tee'\n"); *filename = '\0'; } else { close(p[0]); dup2(p[1], STDOUT_FILENO); dup2(p[1], STDERR_FILENO); } } static void abortHandler(int signo, siginfo_t *info, void *ctx) { AbortHandlerState state; state.pid = getpid(); state.signo = signo; state.info = info; pid_t child; time_t t = time(NULL); char crashLogFile[256]; abortHandlerCalled++; if (abortHandlerCalled > 1) { // The abort handler itself crashed! char *end = state.messageBuf; end = appendText(end, "[ origpid="); end = appendULL(end, (unsigned long long) state.pid); end = appendText(end, ", pid="); end = appendULL(end, (unsigned long long) getpid()); end = appendText(end, ", timestamp="); end = appendULL(end, (unsigned long long) t); if (abortHandlerCalled == 2) { // This is the first time it crashed. end = appendText(end, " ] Abort handler crashed! signo="); end = appendSignalName(end, state.signo); end = appendText(end, ", reason="); end = appendSignalReason(end, state.info); end = appendText(end, "\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); // Run default signal handler. raise(signo); } else { // This is the second time it crashed, meaning it failed to // invoke the default signal handler to abort the process! end = appendText(end, " ] Abort handler crashed again! Force exiting this time. signo="); end = appendSignalName(end, state.signo); end = appendText(end, ", reason="); end = appendSignalReason(end, state.info); end = appendText(end, "\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); _exit(1); } return; } if (emergencyPipe1[0] != -1) { close(emergencyPipe1[0]); } if (emergencyPipe1[1] != -1) { close(emergencyPipe1[1]); } if (emergencyPipe2[0] != -1) { close(emergencyPipe2[0]); } if (emergencyPipe2[1] != -1) { close(emergencyPipe2[1]); } emergencyPipe1[0] = emergencyPipe1[1] = -1; emergencyPipe2[0] = emergencyPipe2[1] = -1; /* We want to dump the entire crash log to both stderr and a log file. * We use 'tee' for this. */ if (createCrashLogFile(crashLogFile, t)) { forkAndRedirectToTee(crashLogFile); } char *end = state.messagePrefix; end = appendText(end, "[ pid="); end = appendULL(end, (unsigned long long) state.pid); *end = '\0'; end = state.messageBuf; end = appendText(end, state.messagePrefix); end = appendText(end, ", timestamp="); end = appendULL(end, (unsigned long long) t); end = appendText(end, " ] Process aborted! signo="); end = appendSignalName(end, state.signo); end = appendText(end, ", reason="); end = appendSignalReason(end, state.info); end = appendText(end, ", randomSeed="); end = appendULL(end, (unsigned long long) randomSeed); end = appendText(end, "\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); end = state.messageBuf; if (*crashLogFile != '\0') { end = appendText(end, state.messagePrefix); end = appendText(end, " ] Crash log dumped to "); end = appendText(end, crashLogFile); end = appendText(end, "\n"); } else { end = appendText(end, state.messagePrefix); end = appendText(end, " ] Could not create crash log file, so dumping to stderr only.\n"); } write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); if (beepOnAbort) { end = state.messageBuf; end = appendText(end, state.messagePrefix); end = appendText(end, " ] PASSENGER_BEEP_ON_ABORT on, executing beep...\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); child = asyncFork(); if (child == 0) { closeAllFileDescriptors(2); #ifdef __APPLE__ execlp("osascript", "osascript", "-e", "beep 2", (const char * const) 0); safePrintErr("Cannot execute 'osascript' command\n"); #else execlp("beep", "beep", (const char * const) 0); safePrintErr("Cannot execute 'beep' command\n"); #endif _exit(1); } else if (child == -1) { int e = errno; end = state.messageBuf; end = appendText(end, state.messagePrefix); end = appendText(end, " ] Could fork a child process for invoking a beep: fork() failed with errno="); end = appendULL(end, e); end = appendText(end, "\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); } } if (stopOnAbort) { end = state.messageBuf; end = appendText(end, state.messagePrefix); end = appendText(end, " ] PASSENGER_STOP_ON_ABORT on, so process stopped. Send SIGCONT when you want to continue.\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); raise(SIGSTOP); } // It isn't safe to call any waiting functions in this signal handler, // not even read() and waitpid() even though they're async signal safe. // So we fork a child process and let it dump as much diagnostics as possible // instead of doing it in this process. child = asyncFork(); if (child == 0) { // Sleep for a short while to allow the parent process to raise SIGSTOP. // usleep() and nanosleep() aren't async signal safe so we use select() // instead. struct timeval tv; tv.tv_sec = 0; tv.tv_usec = 100000; select(0, NULL, NULL, NULL, &tv); resetSignalHandlersAndMask(); child = asyncFork(); if (child == 0) { // OS X: for some reason the SIGPIPE handler may be reset to default after forking. // Later in this program we're going to pipe backtrace_symbols_fd() into the backtrace // sanitizer, which may fail, and we don't want the diagnostics process to crash // with SIGPIPE as a result, so we ignore SIGPIPE again. ignoreSigpipe(); dumpDiagnostics(state); // The child process may or may or may not resume the original process. // We do it ourselves just to be sure. kill(state.pid, SIGCONT); _exit(0); } else if (child == -1) { int e = errno; end = state.messageBuf; end = appendText(end, state.messagePrefix); end = appendText(end, "] Could fork a child process for dumping diagnostics: fork() failed with errno="); end = appendULL(end, e); end = appendText(end, "\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); _exit(1); } else { // Exit immediately so that child process is adopted by init process. _exit(0); } } else if (child == -1) { int e = errno; end = state.messageBuf; end = appendText(end, state.messagePrefix); end = appendText(end, " ] Could fork a child process for dumping diagnostics: fork() failed with errno="); end = appendULL(end, e); end = appendText(end, "\n"); write_nowarn(STDERR_FILENO, state.messageBuf, end - state.messageBuf); } else { raise(SIGSTOP); // Will continue after the child process has done its job. } // Run default signal handler. raise(signo); } /* * Override assert() to add more features and to fix bugs. We save the information * of the last assertion failure in a global variable so that we can print it * to the crash diagnostics report. */ #if defined(__GLIBC__) extern "C" __attribute__ ((__noreturn__)) void __assert_fail(__const char *__assertion, __const char *__file, unsigned int __line, __const char *__function) { lastAssertionFailure.filename = __file; lastAssertionFailure.line = __line; lastAssertionFailure.function = __function; lastAssertionFailure.expression = __assertion; fprintf(stderr, "Assertion failed! %s:%u: %s: %s\n", __file, __line, __function, __assertion); fflush(stderr); abort(); } #elif defined(__APPLE__) /* On OS X, raise() and abort() unfortunately send SIGABRT to the main thread, * causing the original backtrace to be lost in the signal handler. * We work around this for anything in the same linkage unit by just definin * our own versions of the assert handler and abort. */ #include extern "C" int raise(int sig) { return pthread_kill(pthread_self(), sig); } extern "C" void __assert_rtn(const char *func, const char *file, int line, const char *expr) { lastAssertionFailure.filename = file; lastAssertionFailure.line = line; lastAssertionFailure.function = func; lastAssertionFailure.expression = expr; if (func) { fprintf(stderr, "Assertion failed: (%s), function %s, file %s, line %d.\n", expr, func, file, line); } else { fprintf(stderr, "Assertion failed: (%s), file %s, line %d.\n", expr, file, line); } fflush(stderr); abort(); } extern "C" void abort() { sigset_t set; sigemptyset(&set); sigaddset(&set, SIGABRT); pthread_sigmask(SIG_UNBLOCK, &set, NULL); raise(SIGABRT); usleep(1000); __builtin_trap(); } #endif /* __APPLE__ */ void installAbortHandler() { alternativeStackSize = MINSIGSTKSZ + 128 * 1024; alternativeStack = (char *) malloc(alternativeStackSize); if (alternativeStack == NULL) { fprintf(stderr, "Cannot allocate an alternative with a size of %u bytes!\n", alternativeStackSize); fflush(stderr); abort(); } stack_t stack; stack.ss_sp = alternativeStack; stack.ss_size = alternativeStackSize; stack.ss_flags = 0; if (sigaltstack(&stack, NULL) != 0) { int e = errno; fprintf(stderr, "Cannot install an alternative stack for use in signal handlers: %s (%d)\n", strerror(e), e); fflush(stderr); abort(); } struct sigaction action; action.sa_sigaction = abortHandler; action.sa_flags = SA_RESETHAND | SA_SIGINFO; sigemptyset(&action.sa_mask); sigaction(SIGABRT, &action, NULL); sigaction(SIGSEGV, &action, NULL); sigaction(SIGBUS, &action, NULL); sigaction(SIGFPE, &action, NULL); sigaction(SIGILL, &action, NULL); } void installDiagnosticsDumper(DiagnosticsDumper func, void *userData) { customDiagnosticsDumper = func; customDiagnosticsDumperUserData = userData; } bool feedbackFdAvailable() { return _feedbackFdAvailable; } static int lookupErrno(const char *name) { struct Entry { int errorCode; const char * const name; }; static const Entry entries[] = { { EPERM, "EPERM" }, { ENOENT, "ENOENT" }, { ESRCH, "ESRCH" }, { EINTR, "EINTR" }, { EBADF, "EBADF" }, { ENOMEM, "ENOMEM" }, { EACCES, "EACCES" }, { EBUSY, "EBUSY" }, { EEXIST, "EEXIST" }, { ENOTDIR, "ENOTDIR" }, { EISDIR, "EISDIR" }, { EINVAL, "EINVAL" }, { ENFILE, "ENFILE" }, { EMFILE, "EMFILE" }, { ENOTTY, "ENOTTY" }, { ETXTBSY, "ETXTBSY" }, { ENOSPC, "ENOSPC" }, { ESPIPE, "ESPIPE" }, { EMLINK, "EMLINK" }, { EPIPE, "EPIPE" }, { EAGAIN, "EAGAIN" }, { EWOULDBLOCK, "EWOULDBLOCK" }, { EINPROGRESS, "EINPROGRESS" }, { EADDRINUSE, "EADDRINUSE" }, { EADDRNOTAVAIL, "EADDRNOTAVAIL" }, { ENETUNREACH, "ENETUNREACH" }, { ECONNABORTED, "ECONNABORTED" }, { ECONNRESET, "ECONNRESET" }, { EISCONN, "EISCONN" }, { ENOTCONN, "ENOTCONN" }, { ETIMEDOUT, "ETIMEDOUT" }, { ECONNREFUSED, "ECONNREFUSED" }, { EHOSTDOWN, "EHOSTDOWN" }, { EHOSTUNREACH, "EHOSTUNREACH" }, #ifdef EIO { EIO, "EIO" }, #endif #ifdef ENXIO { ENXIO, "ENXIO" }, #endif #ifdef E2BIG { E2BIG, "E2BIG" }, #endif #ifdef ENOEXEC { ENOEXEC, "ENOEXEC" }, #endif #ifdef ECHILD { ECHILD, "ECHILD" }, #endif #ifdef EDEADLK { EDEADLK, "EDEADLK" }, #endif #ifdef EFAULT { EFAULT, "EFAULT" }, #endif #ifdef ENOTBLK { ENOTBLK, "ENOTBLK" }, #endif #ifdef EXDEV { EXDEV, "EXDEV" }, #endif #ifdef ENODEV { ENODEV, "ENODEV" }, #endif #ifdef EFBIG { EFBIG, "EFBIG" }, #endif #ifdef EROFS { EROFS, "EROFS" }, #endif #ifdef EDOM { EDOM, "EDOM" }, #endif #ifdef ERANGE { ERANGE, "ERANGE" }, #endif #ifdef EALREADY { EALREADY, "EALREADY" }, #endif #ifdef ENOTSOCK { ENOTSOCK, "ENOTSOCK" }, #endif #ifdef EDESTADDRREQ { EDESTADDRREQ, "EDESTADDRREQ" }, #endif #ifdef EMSGSIZE { EMSGSIZE, "EMSGSIZE" }, #endif #ifdef EPROTOTYPE { EPROTOTYPE, "EPROTOTYPE" }, #endif #ifdef ENOPROTOOPT { ENOPROTOOPT, "ENOPROTOOPT" }, #endif #ifdef EPROTONOSUPPORT { EPROTONOSUPPORT, "EPROTONOSUPPORT" }, #endif #ifdef ESOCKTNOSUPPORT { ESOCKTNOSUPPORT, "ESOCKTNOSUPPORT" }, #endif #ifdef ENOTSUP { ENOTSUP, "ENOTSUP" }, #endif #ifdef EOPNOTSUPP { EOPNOTSUPP, "EOPNOTSUPP" }, #endif #ifdef EPFNOSUPPORT { EPFNOSUPPORT, "EPFNOSUPPORT" }, #endif #ifdef EAFNOSUPPORT { EAFNOSUPPORT, "EAFNOSUPPORT" }, #endif #ifdef ENETDOWN { ENETDOWN, "ENETDOWN" }, #endif #ifdef ENETRESET { ENETRESET, "ENETRESET" }, #endif #ifdef ENOBUFS { ENOBUFS, "ENOBUFS" }, #endif #ifdef ESHUTDOWN { ESHUTDOWN, "ESHUTDOWN" }, #endif #ifdef ETOOMANYREFS { ETOOMANYREFS, "ETOOMANYREFS" }, #endif #ifdef ELOOP { ELOOP, "ELOOP" }, #endif #ifdef ENAMETOOLONG { ENAMETOOLONG, "ENAMETOOLONG" }, #endif #ifdef ENOTEMPTY { ENOTEMPTY, "ENOTEMPTY" }, #endif #ifdef EPROCLIM { EPROCLIM, "EPROCLIM" }, #endif #ifdef EUSERS { EUSERS, "EUSERS" }, #endif #ifdef EDQUOT { EDQUOT, "EDQUOT" }, #endif #ifdef ESTALE { ESTALE, "ESTALE" }, #endif #ifdef EREMOTE { EREMOTE, "EREMOTE" }, #endif #ifdef EBADRPC { EBADRPC, "EBADRPC" }, #endif #ifdef ERPCMISMATCH { ERPCMISMATCH, "ERPCMISMATCH" }, #endif #ifdef EPROGUNAVAIL { EPROGUNAVAIL, "EPROGUNAVAIL" }, #endif #ifdef EPROGMISMATCH { EPROGMISMATCH, "EPROGMISMATCH" }, #endif #ifdef EPROCUNAVAIL { EPROCUNAVAIL, "EPROCUNAVAIL" }, #endif #ifdef ENOLCK { ENOLCK, "ENOLCK" }, #endif #ifdef ENOSYS { ENOSYS, "ENOSYS" }, #endif #ifdef EFTYPE { EFTYPE, "EFTYPE" }, #endif #ifdef EAUTH { EAUTH, "EAUTH" }, #endif #ifdef ENEEDAUTH { ENEEDAUTH, "ENEEDAUTH" }, #endif #ifdef EPWROFF { EPWROFF, "EPWROFF" }, #endif #ifdef EDEVERR { EDEVERR, "EDEVERR" }, #endif #ifdef EOVERFLOW { EOVERFLOW, "EOVERFLOW" }, #endif #ifdef EBADEXEC { EBADEXEC, "EBADEXEC" }, #endif #ifdef EBADARCH { EBADARCH, "EBADARCH" }, #endif #ifdef ESHLIBVERS { ESHLIBVERS, "ESHLIBVERS" }, #endif #ifdef EBADMACHO { EBADMACHO, "EBADMACHO" }, #endif #ifdef ECANCELED { ECANCELED, "ECANCELED" }, #endif #ifdef EIDRM { EIDRM, "EIDRM" }, #endif #ifdef ENOMSG { ENOMSG, "ENOMSG" }, #endif #ifdef EILSEQ { EILSEQ, "EILSEQ" }, #endif #ifdef ENOATTR { ENOATTR, "ENOATTR" }, #endif #ifdef EBADMSG { EBADMSG, "EBADMSG" }, #endif #ifdef EMULTIHOP { EMULTIHOP, "EMULTIHOP" }, #endif #ifdef ENODATA { ENODATA, "ENODATA" }, #endif #ifdef ENOLINK { ENOLINK, "ENOLINK" }, #endif #ifdef ENOSR { ENOSR, "ENOSR" }, #endif #ifdef ENOSTR { ENOSTR, "ENOSTR" }, #endif #ifdef EPROTO { EPROTO, "EPROTO" }, #endif #ifdef ETIME { ETIME, "ETIME" }, #endif #ifdef EOPNOTSUPP { EOPNOTSUPP, "EOPNOTSUPP" }, #endif #ifdef ENOPOLICY { ENOPOLICY, "ENOPOLICY" }, #endif #ifdef ENOTRECOVERABLE { ENOTRECOVERABLE, "ENOTRECOVERABLE" }, #endif #ifdef EOWNERDEAD { EOWNERDEAD, "EOWNERDEAD" }, #endif }; for (unsigned int i = 0; i < sizeof(entries) / sizeof(Entry); i++) { if (strcmp(entries[i].name, name) == 0) { return entries[i].errorCode; } } return -1; } static void initializeSyscallFailureSimulation(const char *processName) { // Format: // PassengerWatchdog=EMFILE:0.1,ECONNREFUSED:0.25;PassengerHelperAgent=ESPIPE=0.4 const char *spec = getenv("PASSENGER_SIMULATE_SYSCALL_FAILURES"); string prefix = string(processName) + "="; vector components; unsigned int i; // Lookup this process in the specification string. split(spec, ';', components); for (i = 0; i < components.size(); i++) { if (startsWith(components[i], prefix)) { // Found! string value = components[i].substr(prefix.size()); split(value, ',', components); vector keyAndValue; vector chances; // Process each errorCode:chance pair. for (i = 0; i < components.size(); i++) { split(components[i], ':', keyAndValue); if (keyAndValue.size() != 2) { fprintf(stderr, "%s: invalid syntax in PASSENGER_SIMULATE_SYSCALL_FAILURES: '%s'\n", processName, components[i].c_str()); continue; } int e = lookupErrno(keyAndValue[0].c_str()); if (e == -1) { fprintf(stderr, "%s: invalid error code in PASSENGER_SIMULATE_SYSCALL_FAILURES: '%s'\n", processName, components[i].c_str()); continue; } ErrorChance chance; chance.chance = atof(keyAndValue[1].c_str()); if (chance.chance < 0 || chance.chance > 1) { fprintf(stderr, "%s: invalid chance PASSENGER_SIMULATE_SYSCALL_FAILURES: '%s' - chance must be between 0 and 1\n", processName, components[i].c_str()); continue; } chance.errorCode = e; chances.push_back(chance); } // Install the chances. setup_random_failure_simulation(&chances[0], chances.size()); return; } } } enum FdIsSocketResult { FISR_YES, FISR_NO, FISR_ERROR }; static FdIsSocketResult fdIsSocket(int fd) { int ret = fcntl(fd, F_GETFL); if (ret == -1) { if (errno == EBADF) { return FISR_NO; } else { return FISR_ERROR; } } else { struct stat buf; ret = fstat(fd, &buf); if (ret == -1) { // I think some platforms return this for anonymous // Unix socket pairs. return FISR_YES; } else { if (buf.st_mode & S_IFSOCK) { return FISR_YES; } else { return FISR_NO; } } } } VariantMap initializeAgent(int argc, char *argv[], const char *processName) { VariantMap options; const char *seedStr; seedStr = getenv("PASSENGER_RANDOM_SEED"); if (seedStr == NULL || *seedStr == '\0') { randomSeed = (unsigned int) time(NULL); } else { randomSeed = (unsigned int) atoll(seedStr); } srand(randomSeed); srandom(randomSeed); ignoreSigpipe(); if (hasEnvOption("PASSENGER_ABORT_HANDLER", true)) { shouldDumpWithCrashWatch = hasEnvOption("PASSENGER_DUMP_WITH_CRASH_WATCH", true); beepOnAbort = hasEnvOption("PASSENGER_BEEP_ON_ABORT", false); stopOnAbort = hasEnvOption("PASSENGER_STOP_ON_ABORT", false); IGNORE_SYSCALL_RESULT(pipe(emergencyPipe1)); IGNORE_SYSCALL_RESULT(pipe(emergencyPipe2)); installAbortHandler(); } oxt::initialize(); setup_syscall_interruption_support(); if (getenv("PASSENGER_SIMULATE_SYSCALL_FAILURES")) { initializeSyscallFailureSimulation(processName); } setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); TRACE_POINT(); try { if (argc == 1) { int e; switch (fdIsSocket(FEEDBACK_FD)) { case FISR_YES: _feedbackFdAvailable = true; options.readFrom(FEEDBACK_FD); if (options.getBool("fire_and_forget", false)) { _feedbackFdAvailable = false; close(FEEDBACK_FD); } break; case FISR_NO: fprintf(stderr, "You're not supposed to start this program from the command line. " "It's used internally by Phusion Passenger.\n"); exit(1); break; case FISR_ERROR: e = errno; fprintf(stderr, "Encountered an error in feedback file descriptor 3: %s (%d)\n", strerror(e), e); exit(1); break; } } else { options.readFrom((const char **) argv + 1, argc - 1); } #ifdef __linux__ if (options.has("passenger_root")) { ResourceLocator locator(options.get("passenger_root", true)); string ruby = options.get("default_ruby", false, DEFAULT_RUBY); string path = ruby + " \"" + locator.getHelperScriptsDir() + "/backtrace-sanitizer.rb\""; backtraceSanitizerCommand = strdup(path.c_str()); } #endif if (backtraceSanitizerCommand == NULL) { backtraceSanitizerCommand = "c++filt -n"; backtraceSanitizerPassProgramInfo = false; } options.setDefaultInt("log_level", DEFAULT_LOG_LEVEL); setLogLevel(options.getInt("log_level")); if (!options.get("debug_log_file", false).empty()) { if (strcmp(processName, "PassengerWatchdog") == 0) { /* Have the watchdog set STDOUT and STDERR to the debug * log file so that system abort() calls that stuff * are properly logged. */ string filename = options.get("debug_log_file"); options.erase("debug_log_file"); int fd = open(filename.c_str(), O_CREAT | O_WRONLY | O_APPEND, 0644); if (fd == -1) { int e = errno; throw FileSystemException("Cannot open debug log file " + filename, e, filename); } dup2(fd, STDOUT_FILENO); dup2(fd, STDERR_FILENO); close(fd); } else { setDebugFile(options.get("debug_log_file").c_str()); } } } catch (const tracable_exception &e) { P_ERROR("*** ERROR: " << e.what() << "\n" << e.backtrace()); exit(1); } // Change process title. argv0 = strdup(argv[0]); strncpy(argv[0], processName, strlen(argv[0])); for (int i = 1; i < argc; i++) { memset(argv[i], '\0', strlen(argv[i])); } P_DEBUG("Random seed: " << randomSeed); return options; } } // namespace Passenger passenger-4.0.37/ext/common/agents/Base.h000644 000765 000024 00000003271 12233035540 020613 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010, 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_AGENT_BASE_H_ #define _PASSENGER_AGENT_BASE_H_ /** Common code for all agents. */ #include "Utils/VariantMap.h" namespace Passenger { typedef void (*DiagnosticsDumper)(void *userData); bool feedbackFdAvailable(); VariantMap initializeAgent(int argc, char *argv[], const char *processName); void installAbortHandler(); void installDiagnosticsDumper(DiagnosticsDumper func, void *userData); } #endif /* _PASSENGER_AGENT_BASE_H_ */ passenger-4.0.37/ext/common/agents/EnvPrinter.c000644 000765 000024 00000000413 12233035540 022023 0ustar00honglistaff000000 000000 #include #include #include #include extern char **environ; int main(int argc, char *argv[]) { int i = 0; while (environ[i] != NULL) { write(STDOUT_FILENO, environ[i], strlen(environ[i]) + 1); i++; } return 0; } passenger-4.0.37/ext/common/agents/HelperAgent/000755 000765 000024 00000000000 12233035540 021763 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/common/agents/LoggingAgent/000755 000765 000024 00000000000 12233035540 022132 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/common/agents/SpawnPreparer.cpp000644 000765 000024 00000012753 12233035540 023072 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2012-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * Sets given environment variables, dumps the entire environment to * a given file (for diagnostics purposes), then execs the given command. * * This is a separate executable because it does quite * some non-async-signal-safe stuff that we can't do after * fork()ing from the Spawner and before exec()ing. */ #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Passenger; extern "C" { extern char **environ; } static void changeWorkingDir(const char *dir) { int ret = chdir(dir); if (ret == 0) { setenv("PWD", dir, 1); } else { int e = errno; printf("!> Error\n"); printf("!> \n"); printf("Unable to change working directory to '%s': %s (errno=%d)\n", dir, strerror(e), e); fflush(stdout); exit(1); } } static void setGivenEnvVars(const char *envvarsData) { string envvars = Base64::decode(envvarsData); const char *key = envvars.data(); const char *end = envvars.data() + envvars.size(); while (key < end) { const char *keyEnd = (const char *) memchr(key, '\0', end - key); if (keyEnd != NULL) { const char *value = keyEnd + 1; if (value < end) { const char *valueEnd = (const char *) memchr(value, '\0', end - value); if (valueEnd != NULL) { setenv(key, value, 1); key = valueEnd + 1; } else { break; } } else { break; } } else { break; } } } static void dumpInformation() { const char *c_dir; if ((c_dir = getenv("PASSENGER_DEBUG_DIR")) == NULL) { return; } FILE *f; string dir = c_dir; f = fopen((dir + "/envvars").c_str(), "w"); if (f != NULL) { int i = 0; while (environ[i] != NULL) { fputs(environ[i], f); putc('\n', f); i++; } fclose(f); } f = fopen((dir + "/user_info").c_str(), "w"); if (f != NULL) { pid_t pid = fork(); if (pid == 0) { dup2(fileno(f), 1); execlp("id", "id", (char *) 0); _exit(1); } else if (pid == -1) { int e = errno; fprintf(stderr, "Error: cannot fork a new process: %s (errno=%d)\n", strerror(e), e); } else { waitpid(pid, NULL, 0); } fclose(f); } f = fopen((dir + "/ulimit").c_str(), "w"); if (f != NULL) { pid_t pid = fork(); if (pid == 0) { dup2(fileno(f), 1); execlp("ulimit", "ulimit", "-a", (char *) 0); _exit(1); } else if (pid == -1) { int e = errno; fprintf(stderr, "Error: cannot fork a new process: %s (errno=%d)\n", strerror(e), e); } else { waitpid(pid, NULL, 0); } fclose(f); } f = fopen((dir + "/ulimit").c_str(), "w"); if (f != NULL) { pid_t pid = fork(); if (pid == 0) { dup2(fileno(f), 1); execlp("ulimit", "ulimit", "-a", (char *) 0); _exit(1); } else if (pid == -1) { int e = errno; fprintf(stderr, "Error: cannot fork a new process: %s (errno=%d)\n", strerror(e), e); } else { waitpid(pid, NULL, 0); } fclose(f); } #ifdef __linux__ // TODO: call helper-scripts/system-memory-stats.py f = fopen((dir + "/sysmemory").c_str(), "w"); if (f != NULL) { pid_t pid = fork(); if (pid == 0) { dup2(fileno(f), 1); execlp("free", "free", "-m", (char *) 0); _exit(1); } else if (pid == -1) { int e = errno; fprintf(stderr, "Error: cannot fork a new process: %s (errno=%d)\n", strerror(e), e); } else { waitpid(pid, NULL, 0); } fclose(f); } #endif } // Usage: SpawnPreparer int main(int argc, char *argv[]) { if (argc < 5) { fprintf(stderr, "Too few arguments.\n"); exit(1); } const char *workingDir = argv[1]; const char *envvars = argv[2]; const char *executable = argv[3]; char **execArgs = &argv[4]; changeWorkingDir(workingDir); setGivenEnvVars(envvars); dumpInformation(); // Print a newline just in case whatever executed us printed data // without a newline. Otherwise the next process's "!> I have control" // command will not be properly recognized. // https://code.google.com/p/phusion-passenger/issues/detail?id=842#c16 printf("\n"); fflush(stdout); execvp(executable, (char * const *) execArgs); int e = errno; fprintf(stderr, "*** ERROR ***: Cannot execute %s: %s (%d)\n", executable, strerror(e), e); return 1; } passenger-4.0.37/ext/common/agents/TempDirToucher.c000644 000765 000024 00000021537 12233035540 022637 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* This tool touches everything in a directory every 30 minutes to prevent * /tmp cleaners from removing it. */ #include #include #include #include #include #include #include #include #include #include #include #define ERROR_PREFIX "*** TempDirToucher error" static char *dir; /** * When Passenger Standalone is started with --daemonize, then it will * pass --cleanup to this tool so that this tool is responsible * for cleaning up the Standalone temp dir. This is because Passenger * Standalone may be started in daemonize mode, which makes it exit asap * in order to conserve memory. Passenger Standalone can therefore not * be responsible for cleaning up the temp dir. */ static int shouldCleanup = 0; static int shouldDaemonize = 0; static const char *pidFile = NULL; static const char *logFile = NULL; static int terminationPipe[2]; static sig_atomic_t shouldIgnoreNextTermSignal = 0; static void parseArguments(int argc, char *argv[]) { dir = argv[1]; int i; for (i = 2; i < argc; i++) { if (strcmp(argv[i], "--cleanup") == 0) { shouldCleanup = 1; } else if (strcmp(argv[i], "--daemonize") == 0) { shouldDaemonize = 1; } else if (strcmp(argv[i], "--pid-file") == 0) { pidFile = argv[i + 1]; i++; } else if (strcmp(argv[i], "--log-file") == 0) { logFile = argv[i + 1]; i++; } else { fprintf(stderr, ERROR_PREFIX ": unrecognized argument %s\n", argv[i]); exit(1); } } } static void setNonBlocking(int fd) { int flags, ret, e; do { flags = fcntl(fd, F_GETFL); } while (flags == -1 && errno == EINTR); if (flags == -1) { e = errno; fprintf(stderr, ERROR_PREFIX ": cannot set pipe to non-blocking mode: " "cannot get file descriptor flags. Error: %s (errno %d)\n", strerror(e), e); exit(1); } do { ret = fcntl(fd, F_SETFL, flags | O_NONBLOCK); } while (ret == -1 && errno == EINTR); if (ret == -1) { e = errno; fprintf(stderr, ERROR_PREFIX ": cannot set pipe to non-blocking mode: " "cannot set file descriptor flags. Error: %s (errno %d)\n", strerror(e), e); exit(1); } } static void initialize(int argc, char *argv[]) { int e, fd; parseArguments(argc, argv); if (logFile != NULL) { fd = open(logFile, O_WRONLY | O_APPEND | O_CREAT, 0644); if (fd == -1) { e = errno; fprintf(stderr, ERROR_PREFIX ": cannot open log file %s for writing: %s (errno %d)\n", logFile, strerror(e), e); exit(1); } if (dup2(fd, 1) == -1) { e = errno; fprintf(stderr, ERROR_PREFIX ": cannot dup2(%d, 1): %s (errno %d)\n", fd, strerror(e), e); } if (dup2(fd, 2) == -1) { e = errno; fprintf(stderr, ERROR_PREFIX ": cannot dup2(%d, 2): %s (errno %d)\n", fd, strerror(e), e); } close(fd); } if (pipe(terminationPipe) == -1) { e = errno; fprintf(stderr, ERROR_PREFIX ": cannot create a pipe: %s (errno %d)\n", strerror(e), e); exit(1); } setNonBlocking(terminationPipe[1]); } static void exitHandler(int signo) { if (shouldIgnoreNextTermSignal) { shouldIgnoreNextTermSignal = 0; } else { int ret = write(terminationPipe[1], "x", 1); // We can't do anything about failures, so ignore // compiler warnings about not using the result. (void) ret; } } static void ignoreNextTermSignalHandler(int signo) { shouldIgnoreNextTermSignal = 1; } static void installSignalHandlers() { struct sigaction action; action.sa_handler = exitHandler; action.sa_flags = SA_RESTART; sigemptyset(&action.sa_mask); sigaction(SIGINT, &action, NULL); sigaction(SIGTERM, &action, NULL); action.sa_handler = ignoreNextTermSignalHandler; action.sa_flags = SA_RESTART; sigaction(SIGHUP, &action, NULL); } static void redirectStdinToNull() { int fd = open("/dev/null", O_RDONLY); if (fd != -1) { dup2(fd, 1); close(fd); } } static void maybeDaemonize() { pid_t pid; int e; if (shouldDaemonize) { pid = fork(); if (pid == 0) { setsid(); if (chdir("/") == -1) { e = errno; fprintf(stderr, ERROR_PREFIX ": cannot change working directory to /: %s (errno %d)\n", strerror(e), e); _exit(1); } redirectStdinToNull(); } else if (pid == -1) { e = errno; fprintf(stderr, ERROR_PREFIX ": cannot fork: %s (errno %d)\n", strerror(e), e); exit(1); } else { _exit(0); } } } static void maybeWritePidfile() { FILE *f; if (pidFile != NULL) { f = fopen(pidFile, "w"); if (f != NULL) { fprintf(f, "%d\n", (int) getpid()); fclose(f); } else { fprintf(stderr, ERROR_PREFIX ": cannot open PID file %s for writing\n", pidFile); exit(1); } } } static int dirExists(const char *dir) { struct stat buf; return stat(dir, &buf) == 0 && S_ISDIR(buf.st_mode); } static void touchDir(const char *dir) { pid_t pid; int e, status; pid = fork(); if (pid == 0) { close(terminationPipe[0]); close(terminationPipe[1]); if (chdir(dir) == -1) { e = errno; fprintf(stderr, ERROR_PREFIX ": cannot change working directory to %s: %s (errno %d)\n", dir, strerror(e), e); _exit(1); } execlp("/bin/sh", "/bin/sh", "-c", "find \"$1\" | xargs touch", "/bin/sh", ".", (const char * const) 0); e = errno; fprintf(stderr, ERROR_PREFIX ": cannot execute /bin/sh: %s (errno %d)\n", strerror(e), e); _exit(1); } else if (pid == -1) { e = errno; fprintf(stderr, ERROR_PREFIX ": cannot fork: %s (errno %d)\n", strerror(e), e); exit(1); } else { if (waitpid(pid, &status, 0) == -1) { if (errno != ESRCH && errno != EPERM) { fprintf(stderr, ERROR_PREFIX ": unable to wait for shell command 'find %s | xargs touch'\n", dir); exit(1); } } else if (WEXITSTATUS(status) != 0) { fprintf(stderr, ERROR_PREFIX ": shell command 'find %s | xargs touch' failed with exit status %d\n", dir, WEXITSTATUS(status)); exit(1); } } } static int doSleep(int sec) { fd_set readfds; struct timeval timeout; int ret, e; FD_ZERO(&readfds); FD_SET(terminationPipe[0], &readfds); timeout.tv_sec = sec; timeout.tv_usec = 0; do { ret = select(terminationPipe[0] + 1, &readfds, NULL, NULL, &timeout); } while (ret == -1 && errno == EINTR); if (ret == -1) { e = errno; fprintf(stderr, ERROR_PREFIX ": cannot select(): %s (errno %d)\n", strerror(e), e); exit(1); return -1; /* Never reached */ } else { return ret == 0; } } static void maybeDeletePidFile() { if (pidFile != NULL) { unlink(pidFile); } } static void performCleanup(const char *dir) { pid_t pid; int e, status; pid = fork(); if (pid == 0) { close(terminationPipe[0]); close(terminationPipe[1]); execlp("/bin/sh", "/bin/sh", "-c", "rm -rf \"$1\"", "/bin/sh", dir, (const char * const) 0); e = errno; fprintf(stderr, ERROR_PREFIX ": cannot execute /bin/sh: %s (errno %d)\n", strerror(e), e); _exit(1); } else if (pid == -1) { e = errno; fprintf(stderr, ERROR_PREFIX ": cannot fork: %s (errno %d)\n", strerror(e), e); exit(1); } else { if (waitpid(pid, &status, 0) == -1) { if (errno != ESRCH && errno != EPERM) { fprintf(stderr, ERROR_PREFIX ": unable to wait for shell command 'rm -rf %s'\n", dir); exit(1); } } else if (WEXITSTATUS(status) != 0) { fprintf(stderr, ERROR_PREFIX ": shell command 'rm -rf %s' failed with exit status %d\n", dir, WEXITSTATUS(status)); exit(1); } } } int main(int argc, char *argv[]) { initialize(argc, argv); installSignalHandlers(); maybeDaemonize(); maybeWritePidfile(); while (1) { if (dirExists(dir)) { touchDir(dir); if (!doSleep(1800)) { break; } } else { break; } } maybeDeletePidFile(); if (shouldCleanup) { performCleanup(dir); } return 0; } passenger-4.0.37/ext/common/agents/Watchdog/000755 000765 000024 00000000000 12233035540 021325 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/common/agents/Watchdog/AgentWatcher.cpp000644 000765 000024 00000040150 12233035540 024405 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /** * Abstract base class for watching agent processes. */ class AgentWatcher: public boost::enable_shared_from_this { private: /** The watcher thread. */ oxt::thread *thr; void threadMain(boost::shared_ptr self) { try { pid_t pid, ret; int status, e; while (!this_thread::interruption_requested()) { { boost::lock_guard l(lock); pid = this->pid; } // Process can be started before the watcher thread is launched. if (pid == 0) { pid = start(); } ret = syscalls::waitpid(pid, &status, 0); if (ret == -1 && errno == ECHILD) { /* If the agent is attached to gdb then waitpid() * here can return -1 with errno == ECHILD. * Fallback to kill() polling for checking * whether the agent is alive. */ ret = pid; status = 0; P_WARN("waitpid() on " << name() << " (pid=" << pid << ") returned -1 with " << "errno = ECHILD, falling back to kill polling"); waitpidUsingKillPolling(pid); e = 0; } else { e = errno; } { boost::lock_guard l(lock); this->pid = 0; } this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; if (ret == -1) { P_WARN(name() << " (pid=" << pid << ") crashed or killed for " "an unknown reason (errno = " << strerror(e) << "), restarting it..."); } else if (WIFEXITED(status)) { if (WEXITSTATUS(status) == 0) { /* When the web server is gracefully exiting, it will * tell one or more agents to gracefully exit with exit * status 0. If we see this then it means the watchdog * is gracefully shutting down too and we should stop * watching. */ return; } else { P_WARN(name() << " (pid=" << pid << ") crashed with exit status " << WEXITSTATUS(status) << ", restarting it..."); } } else { P_WARN(name() << " (pid=" << pid << ") crashed with signal " << getSignalName(WTERMSIG(status)) << ", restarting it..."); } const char *sleepTime; if ((sleepTime = getenv("PASSENGER_AGENT_RESTART_SLEEP")) != NULL) { sleep(atoi(sleepTime)); } } } catch (const boost::thread_interrupted &) { } catch (const tracable_exception &e) { boost::lock_guard l(lock); threadExceptionMessage = e.what(); threadExceptionBacktrace = e.backtrace(); wo->errorEvent.notify(); } catch (const std::exception &e) { boost::lock_guard l(lock); threadExceptionMessage = e.what(); wo->errorEvent.notify(); } catch (...) { boost::lock_guard l(lock); threadExceptionMessage = "Unknown error"; wo->errorEvent.notify(); } } protected: /** PID of the process we're watching. 0 if no process is started at this time. */ pid_t pid; /** If the watcher thread threw an uncaught exception then its information will * be stored here so that the main thread can check whether a watcher encountered * an error. These are empty strings if everything is OK. */ string threadExceptionMessage; string threadExceptionBacktrace; /** The agent process's feedback fd. */ FileDescriptor feedbackFd; /** * Lock for protecting the exchange of data between the main thread and * the watcher thread. */ mutable boost::mutex lock; WorkingObjectsPtr wo; /** * Returns the filename of the agent process's executable. This method may be * called in a forked child process and may therefore not allocate memory. */ virtual string getExeFilename() const = 0; /** * This method is to exec() the agent with the right arguments. * It is called from within a forked child process, so don't do any dynamic * memory allocations in here. It must also not throw any exceptions. * It must also preserve the value of errno after exec() is called. */ virtual void execProgram() const { execl(getExeFilename().c_str(), getExeFilename().c_str(), "3", // feedback fd (char *) 0); } /** * This method is to send startup arguments to the agent process through * the given file descriptor, which is the agent process's feedback fd. * May throw arbitrary exceptions. */ virtual void sendStartupArguments(pid_t pid, FileDescriptor &fd) = 0; /** * This method is to process the startup info that the agent process has * sent back. May throw arbitrary exceptions. */ virtual bool processStartupInfo(pid_t pid, FileDescriptor &fd, const vector &args) = 0; static void killAndDontWait(pid_t pid) { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; // If the process is a process group leader then killing the // group will likely kill all its child processes too. if (syscalls::killpg(pid, SIGTERM) == -1) { syscalls::kill(pid, SIGTERM); } } /** * Kill a process with SIGKILL, and attempt to kill its children too. * Then wait until it has quit. */ static void killAndWait(pid_t pid) { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; // If the process is a process group leader then killing the // group will likely kill all its child processes too. if (syscalls::killpg(pid, SIGKILL) == -1) { syscalls::kill(pid, SIGKILL); } syscalls::waitpid(pid, NULL, 0); } /** * Behaves like waitpid(pid, status, WNOHANG), but waits at most * timeout miliseconds for the process to exit. */ static int timedWaitPid(pid_t pid, int *status, unsigned long long timeout) { Timer timer; int ret; do { ret = syscalls::waitpid(pid, status, WNOHANG); if (ret > 0 || ret == -1) { return ret; } else { syscalls::usleep(10000); } } while (timer.elapsed() < timeout); return 0; // timed out } static void waitpidUsingKillPolling(pid_t pid) { bool done = false; while (!done) { int ret = syscalls::kill(pid, 0); done = ret == -1; if (!done) { syscalls::usleep(20000); } } } public: AgentWatcher(const WorkingObjectsPtr &wo) { thr = NULL; pid = 0; this->wo = wo; } virtual ~AgentWatcher() { delete thr; } /** * Store information about the started agent process in the given report object. * May throw arbitrary exceptions. * * @pre start() has been called and succeeded. */ virtual void reportAgentsInformation(VariantMap &report) = 0; /** Returns the name of the agent that this class is watching. */ virtual const char *name() const = 0; /** * Starts the agent process. May throw arbitrary exceptions. */ virtual pid_t start() { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; string exeFilename = getExeFilename(); SocketPair fds; int e, ret; pid_t pid; /* Create feedback fd for this agent process. We'll send some startup * arguments to this agent process through this fd, and we'll receive * startup information through it as well. */ fds = createUnixSocketPair(); pid = syscalls::fork(); if (pid == 0) { // Child /* Make sure file descriptor FEEDBACK_FD refers to the newly created * feedback fd (fds[1]) and close all other file descriptors. * In this child process we don't care about the original FEEDBACK_FD * (which is the Watchdog's communication channel to the agents starter.) * * fds[1] is guaranteed to be != FEEDBACK_FD because the watchdog * is started with FEEDBACK_FD already assigned. */ syscalls::close(fds[0]); if (syscalls::dup2(fds[1], FEEDBACK_FD) == -1) { /* Something went wrong, report error through feedback fd. */ e = errno; try { writeArrayMessage(fds[1], "system error before exec", "dup2() failed", toString(e).c_str(), NULL); _exit(1); } catch (...) { fprintf(stderr, "Passenger Watchdog: dup2() failed: %s (%d)\n", strerror(e), e); fflush(stderr); _exit(1); } } closeAllFileDescriptors(FEEDBACK_FD); /* Become the process group leader so that the watchdog can kill the * agent as well as all its descendant processes. */ setpgid(getpid(), getpid()); setOomScore(oldOomScore); try { execProgram(); } catch (...) { fprintf(stderr, "PassengerWatchdog: execProgram() threw an exception\n"); fflush(stderr); _exit(1); } e = errno; try { writeArrayMessage(FEEDBACK_FD, "exec error", toString(e).c_str(), NULL); } catch (...) { fprintf(stderr, "Passenger Watchdog: could not execute %s: %s (%d)\n", exeFilename.c_str(), strerror(e), e); fflush(stderr); } _exit(1); } else if (pid == -1) { // Error e = errno; throw SystemException("Cannot fork a new process", e); } else { // Parent FileDescriptor feedbackFd = fds[0]; vector args; fds[1].close(); this_thread::restore_interruption ri(di); this_thread::restore_syscall_interruption rsi(dsi); ScopeGuard failGuard(boost::bind(killAndWait, pid)); /* Send startup arguments. Ignore EPIPE and ECONNRESET here * because the child process might have sent an feedback message * without reading startup arguments. */ try { sendStartupArguments(pid, feedbackFd); } catch (const SystemException &ex) { if (ex.code() != EPIPE && ex.code() != ECONNRESET) { throw SystemException(string("Unable to start the ") + name() + ": an error occurred while sending startup arguments", ex.code()); } } // Now read its feedback. try { ret = readArrayMessage(feedbackFd, args); } catch (const SystemException &e) { if (e.code() == ECONNRESET) { ret = false; } else { throw SystemException(string("Unable to start the ") + name() + ": unable to read its startup information", e.code()); } } if (!ret) { this_thread::disable_interruption di2; this_thread::disable_syscall_interruption dsi2; int status; /* The feedback fd was prematurely closed for an unknown reason. * Did the agent process crash? * * We use timedWaitPid() here because if the process crashed * because of an uncaught exception, the file descriptor * might be closed before the process has printed an error * message, so we give it some time to print the error * before we kill it. */ ret = timedWaitPid(pid, &status, 5000); if (ret == 0) { /* Doesn't look like it; it seems it's still running. * We can't do anything without proper feedback so kill * the agent process and throw an exception. */ failGuard.runNow(); throw RuntimeException(string("Unable to start the ") + name() + ": it froze and reported an unknown error during its startup"); } else if (ret != -1 && WIFSIGNALED(status)) { /* Looks like a crash which caused a signal. */ throw RuntimeException(string("Unable to start the ") + name() + ": it seems to have been killed with signal " + getSignalName(WTERMSIG(status)) + " during startup"); } else if (ret == -1) { /* Looks like it exited after detecting an error. */ throw RuntimeException(string("Unable to start the ") + name() + ": it seems to have crashed during startup for an unknown reason"); } else { /* Looks like it exited after detecting an error, but has an exit code. */ throw RuntimeException(string("Unable to start the ") + name() + ": it seems to have crashed during startup for an unknown reason, " "with exit code " + toString(WEXITSTATUS(status))); } } if (args[0] == "system error before exec") { throw SystemException(string("Unable to start the ") + name() + ": " + args[1], atoi(args[2])); } else if (args[0] == "exec error") { e = atoi(args[1]); if (e == ENOENT) { throw RuntimeException(string("Unable to start the ") + name() + " because its executable (" + getExeFilename() + ") " "doesn't exist. This probably means that your " "Phusion Passenger installation is broken or " "incomplete. Please reinstall Phusion Passenger"); } else { throw SystemException(string("Unable to start the ") + name() + " because exec(\"" + getExeFilename() + "\") failed", atoi(args[1])); } } else if (!processStartupInfo(pid, feedbackFd, args)) { throw RuntimeException(string("The ") + name() + " sent an unknown startup info message '" + args[0] + "'"); } boost::lock_guard l(lock); this->feedbackFd = feedbackFd; this->pid = pid; failGuard.clear(); return pid; } } /** * Begin watching the agent process. * * @pre start() has been called and succeeded. * @pre This watcher isn't already watching. * @throws RuntimeException If a precondition failed. * @throws thread_interrupted * @throws thread_resource_error */ virtual void beginWatching() { boost::lock_guard l(lock); if (pid == 0) { throw RuntimeException("start() hasn't been called yet"); } if (thr != NULL) { throw RuntimeException("Already started watching."); } thr = new oxt::thread(boost::bind(&AgentWatcher::threadMain, this, shared_from_this()), name(), 256 * 1024); } static void stopWatching(vector< boost::shared_ptr > &watchers) { vector< boost::shared_ptr >::const_iterator it; vector threads; unsigned int i = 0; for (it = watchers.begin(); it != watchers.end(); it++, i++) { threads.push_back((*it)->thr); threads[i] = (*it)->thr; } oxt::thread::interrupt_and_join_multiple(&threads[0], threads.size()); for (it = watchers.begin(); it != watchers.end(); it++, i++) { delete (*it)->thr; (*it)->thr = NULL; } } virtual bool signalShutdown() { boost::lock_guard l(lock); if (pid == 0) { return false; } else { killAndDontWait(pid); return true; } } /** * Force the agent process to shut down. Returns true if it was shut down, * or false if it wasn't started. */ virtual bool forceShutdown() { boost::lock_guard l(lock); if (pid == 0) { return false; } else { killAndWait(pid); this->pid = 0; return true; } } /** * If the watcher thread has encountered an error, then the error message * will be stored here. If the error message is empty then it means * everything is still OK. */ string getErrorMessage() const { boost::lock_guard l(lock); return threadExceptionMessage; } /** * The error backtrace, if applicable. */ string getErrorBacktrace() const { boost::lock_guard l(lock); return threadExceptionBacktrace; } /** * Returns the agent process feedback fd, or -1 if the agent process * hasn't been started yet. Can be used to check whether this agent process * has exited without using waitpid(). */ const FileDescriptor getFeedbackFd() const { boost::lock_guard l(lock); return feedbackFd; } }; typedef boost::shared_ptr AgentWatcherPtr; passenger-4.0.37/ext/common/agents/Watchdog/HelperAgentWatcher.cpp000644 000765 000024 00000006505 12233035540 025553 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ class HelperAgentWatcher: public AgentWatcher { protected: string helperAgentFilename; VariantMap params, report; string requestSocketFilename; string messageSocketFilename; virtual const char *name() const { return "Phusion Passenger helper agent"; } virtual string getExeFilename() const { return helperAgentFilename; } virtual void execProgram() const { if (hasEnvOption("PASSENGER_RUN_HELPER_AGENT_IN_VALGRIND", false)) { execlp("valgrind", "valgrind", "--dsymutil=yes", helperAgentFilename.c_str(), (char *) 0); } else { execl(helperAgentFilename.c_str(), "PassengerHelperAgent", (char *) 0); } } virtual void sendStartupArguments(pid_t pid, FileDescriptor &fd) { VariantMap options = agentsOptions; params.addTo(options); options.writeToFd(fd); } virtual bool processStartupInfo(pid_t pid, FileDescriptor &fd, const vector &args) { if (args[0] == "initialized") { requestSocketFilename = args[1]; messageSocketFilename = args[2]; return true; } else { return false; } } public: HelperAgentWatcher(const WorkingObjectsPtr &wo) : AgentWatcher(wo) { helperAgentFilename = wo->resourceLocator->getAgentsDir() + "/PassengerHelperAgent"; report .set("request_socket_filename", agentsOptions.get("request_socket_filename", false, wo->generation->getPath() + "/request")) .set("request_socket_password", agentsOptions.get("request_socket_password", false, wo->randomGenerator.generateAsciiString(REQUEST_SOCKET_PASSWORD_SIZE))) .set("helper_agent_admin_socket_address", agentsOptions.get("helper_agent_admin_socket_address", false, "unix:" + wo->generation->getPath() + "/helper_admin")) .set("helper_agent_exit_password", agentsOptions.get("helper_agent_exit_password", false, wo->randomGenerator.generateAsciiString(MESSAGE_SERVER_MAX_PASSWORD_SIZE))); params = report; params .set("logging_agent_address", wo->loggingAgentAddress) .set("logging_agent_password", wo->loggingAgentPassword); } virtual void reportAgentsInformation(VariantMap &report) { this->report.addTo(report); } }; passenger-4.0.37/ext/common/agents/Watchdog/LoggingAgentWatcher.cpp000644 000765 000024 00000005041 12233035540 025714 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ class LoggingAgentWatcher: public AgentWatcher { protected: string agentFilename; string socketAddress; virtual const char *name() const { return "Phusion Passenger logging agent"; } virtual string getExeFilename() const { return agentFilename; } virtual void execProgram() const { execl(agentFilename.c_str(), "PassengerLoggingAgent", (char *) 0); } virtual void sendStartupArguments(pid_t pid, FileDescriptor &fd) { VariantMap options = agentsOptions; options.set("logging_agent_address", wo->loggingAgentAddress); options.set("logging_agent_password", wo->loggingAgentPassword); options.set("logging_agent_admin_address", wo->loggingAgentAdminAddress); options.writeToFd(fd); } virtual bool processStartupInfo(pid_t pid, FileDescriptor &fd, const vector &args) { if (args[0] == "initialized") { return true; } else { return false; } } public: LoggingAgentWatcher(const WorkingObjectsPtr &wo) : AgentWatcher(wo) { agentFilename = wo->resourceLocator->getAgentsDir() + "/PassengerLoggingAgent"; } virtual void reportAgentsInformation(VariantMap &report) { report .set("logging_socket_address", wo->loggingAgentAddress) .set("logging_socket_password", wo->loggingAgentPassword) .set("logging_socket_admin_address", wo->loggingAgentAdminAddress); } }; passenger-4.0.37/ext/common/agents/Watchdog/Main.cpp000644 000765 000024 00000053347 12233035540 022731 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace boost; using namespace oxt; using namespace Passenger; enum OomFileType { OOM_ADJ, OOM_SCORE_ADJ }; #define REQUEST_SOCKET_PASSWORD_SIZE 64 class ServerInstanceDirToucher; class AgentWatcher; static bool hasEnvOption(const char *name, bool defaultValue = false); static void setOomScore(const StaticString &score); /***** Agent options *****/ static VariantMap agentsOptions; static string tempDir; static bool userSwitching; static string defaultUser; static string defaultGroup; static uid_t webServerWorkerUid; static gid_t webServerWorkerGid; /***** Working objects *****/ struct WorkingObjects { RandomGenerator randomGenerator; EventFd errorEvent; ResourceLocatorPtr resourceLocator; ServerInstanceDirPtr serverInstanceDir; ServerInstanceDir::GenerationPtr generation; uid_t defaultUid; gid_t defaultGid; vector cleanupPidfiles; string loggingAgentAddress; string loggingAgentPassword; string loggingAgentAdminAddress; string adminToolStatusPassword; string adminToolManipulationPassword; }; typedef boost::shared_ptr WorkingObjectsPtr; static string oldOomScore; #include "AgentWatcher.cpp" #include "ServerInstanceDirToucher.cpp" #include "HelperAgentWatcher.cpp" #include "LoggingAgentWatcher.cpp" /***** Functions *****/ static bool hasEnvOption(const char *name, bool defaultValue) { const char *value = getenv(name); if (value != NULL) { if (*value != '\0') { return strcmp(value, "yes") == 0 || strcmp(value, "y") == 0 || strcmp(value, "1") == 0 || strcmp(value, "on") == 0 || strcmp(value, "true") == 0; } else { return defaultValue; } } else { return defaultValue; } } static FILE * openOomAdjFile(const char *mode, OomFileType &type) { FILE *f = fopen("/proc/self/oom_score_adj", mode); if (f == NULL) { f = fopen("/proc/self/oom_adj", mode); if (f == NULL) { return NULL; } else { type = OOM_ADJ; return f; } } else { type = OOM_SCORE_ADJ; return f; } } /** * Linux-only way to change OOM killer configuration for * current process. Requires root privileges, which we * should have. */ static void setOomScore(const StaticString &score) { if (score.empty()) { return; } FILE *f; OomFileType type; f = openOomAdjFile("w", type); if (f != NULL) { size_t ret = fwrite(score.data(), 1, score.size(), f); // We can't do anything about failures, so ignore compiler // warnings about not doing anything with the result. (void) ret; fclose(f); } } /** * Set the current process's OOM score to "never kill". */ static string setOomScoreNeverKill() { string oldScore; FILE *f; OomFileType type; f = openOomAdjFile("r", type); if (f == NULL) { return ""; } char buf[1024]; size_t bytesRead; while (true) { bytesRead = fread(buf, 1, sizeof(buf), f); if (bytesRead == 0 && feof(f)) { break; } else if (bytesRead == 0 && ferror(f)) { fclose(f); return ""; } else { oldScore.append(buf, bytesRead); } } fclose(f); f = openOomAdjFile("w", type); if (f == NULL) { return ""; } if (type == OOM_SCORE_ADJ) { fprintf(f, "-1000\n"); } else { assert(type == OOM_ADJ); fprintf(f, "-17\n"); } fclose(f); return oldScore; } /** * Wait until the starter process has exited or sent us an exit command, * or until one of the watcher threads encounter an error. If a thread * encountered an error then the error message will be printed. * * Returns whether this watchdog should exit gracefully, which is only the * case if the web server sent us an exit command and no thread encountered * an error. */ static bool waitForStarterProcessOrWatchers(const WorkingObjectsPtr &wo, vector &watchers) { fd_set fds; int max, ret; char x; FD_ZERO(&fds); FD_SET(FEEDBACK_FD, &fds); FD_SET(wo->errorEvent.fd(), &fds); if (FEEDBACK_FD > wo->errorEvent.fd()) { max = FEEDBACK_FD; } else { max = wo->errorEvent.fd(); } ret = syscalls::select(max + 1, &fds, NULL, NULL, NULL); if (ret == -1) { int e = errno; P_ERROR("select() failed: " << strerror(e)); return false; } if (FD_ISSET(wo->errorEvent.fd(), &fds)) { vector::const_iterator it; string message, backtrace, watcherName; for (it = watchers.begin(); it != watchers.end() && message.empty(); it++) { message = (*it)->getErrorMessage(); backtrace = (*it)->getErrorBacktrace(); watcherName = (*it)->name(); } if (!message.empty() && backtrace.empty()) { P_ERROR("Error in " << watcherName << " watcher:\n " << message); } else if (!message.empty() && !backtrace.empty()) { P_ERROR("Error in " << watcherName << " watcher:\n " << message << "\n" << backtrace); } return false; } else { ret = syscalls::read(FEEDBACK_FD, &x, 1); return ret == 1 && x == 'c'; } } static vector readCleanupPids(const WorkingObjectsPtr &wo) { vector result; foreach (string filename, wo->cleanupPidfiles) { FILE *f = fopen(filename.c_str(), "r"); if (f != NULL) { char buf[33]; size_t ret; ret = fread(buf, 1, 32, f); if (ret > 0) { buf[ret] = '\0'; result.push_back(atoi(buf)); } else { P_WARN("Cannot read cleanup PID file " << filename); } } else { P_WARN("Cannot open cleanup PID file " << filename); } } return result; } static void killCleanupPids(const vector &cleanupPids) { foreach (pid_t pid, cleanupPids) { P_DEBUG("Sending SIGTERM to cleanup PID " << pid); kill(pid, SIGTERM); } } static void killCleanupPids(const WorkingObjectsPtr &wo) { killCleanupPids(readCleanupPids(wo)); } static void cleanupAgentsInBackground(const WorkingObjectsPtr &wo, vector &watchers, char *argv[]) { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; vector cleanupPids; pid_t pid; int e; cleanupPids = readCleanupPids(wo); pid = fork(); if (pid == 0) { // Child try { vector::const_iterator it; Timer timer(false); fd_set fds, fds2; int max, agentProcessesDone; unsigned long long deadline = 30000; // miliseconds #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(sun) // Change process title. strcpy(argv[0], "PassengerWatchdog (cleaning up...)"); #endif // Wait until all agent processes have exited. The starter // process is responsible for telling the individual agents // to exit. max = 0; FD_ZERO(&fds); for (it = watchers.begin(); it != watchers.end(); it++) { FD_SET((*it)->getFeedbackFd(), &fds); if ((*it)->getFeedbackFd() > max) { max = (*it)->getFeedbackFd(); } } timer.start(); agentProcessesDone = 0; while (agentProcessesDone != -1 && agentProcessesDone < (int) watchers.size() && timer.elapsed() < deadline) { struct timeval timeout; #ifdef FD_COPY FD_COPY(&fds, &fds2); #else FD_ZERO(&fds2); for (it = watchers.begin(); it != watchers.end(); it++) { FD_SET((*it)->getFeedbackFd(), &fds2); } #endif timeout.tv_sec = 0; timeout.tv_usec = 10000; agentProcessesDone = syscalls::select(max + 1, &fds2, NULL, NULL, &timeout); if (agentProcessesDone > 0 && timer.elapsed() < deadline) { usleep(10000); } } if (agentProcessesDone == -1 || timer.elapsed() >= deadline) { // An error occurred or we've waited long enough. Kill all the // processes. P_WARN("Some Phusion Passenger agent processes did not exit " << "in time, forcefully shutting down all."); } else { P_DEBUG("All Phusion Passenger agent processes have exited. Forcing all subprocesses to shut down."); } P_DEBUG("Sending SIGTERM"); for (it = watchers.begin(); it != watchers.end(); it++) { (*it)->signalShutdown(); } usleep(1000000); P_DEBUG("Sending SIGKILL"); for (it = watchers.begin(); it != watchers.end(); it++) { (*it)->forceShutdown(); } // Now clean up the server instance directory. wo->generation->destroy(); wo->serverInstanceDir->destroy(); // Notify given PIDs about our shutdown. killCleanupPids(cleanupPids); strcpy(argv[0], "PassengerWatchdog (cleaning up 6...)"); _exit(0); } catch (const std::exception &e) { P_CRITICAL("An exception occurred during cleaning up: " << e.what()); _exit(1); } catch (...) { P_CRITICAL("An unknown exception occurred during cleaning up"); _exit(1); } } else if (pid == -1) { // Error e = errno; throw SystemException("fork() failed", e); } else { // Parent // Let child process handle cleanup. wo->serverInstanceDir->detach(); wo->generation->detach(); } } static void forceAllAgentsShutdown(const WorkingObjectsPtr &wo, vector &watchers) { vector::iterator it; for (it = watchers.begin(); it != watchers.end(); it++) { (*it)->signalShutdown(); } usleep(1000000); for (it = watchers.begin(); it != watchers.end(); it++) { (*it)->forceShutdown(); } killCleanupPids(wo); } static string inferDefaultGroup(const string &defaultUser) { struct passwd *userEntry = getpwnam(defaultUser.c_str()); if (userEntry == NULL) { throw ConfigurationException( string("The user that PassengerDefaultUser refers to, '") + defaultUser + "', does not exist."); } return getGroupName(userEntry->pw_gid); } static void runHookScriptAndThrowOnError(const char *name) { TRACE_POINT(); HookScriptOptions options; options.name = name; options.spec = agentsOptions.get(string("hook_") + name, false); options.agentsOptions = &agentsOptions; if (!runHookScripts(options)) { throw RuntimeException(string("Hook script ") + name + " failed"); } } static void initializeBareEssentials(int argc, char *argv[]) { /* * Some Apache installations (like on OS X) redirect stdout to /dev/null, * so that only stderr is redirected to the log file. We therefore * forcefully redirect stdout to stderr so that everything ends up in the * same place. */ int oldStdout = dup(1); dup2(2, 1); /* * Most operating systems overcommit memory. We *know* that this watchdog process * doesn't use much memory; on OS X it uses about 200 KB of private RSS. If the * watchdog is killed by the system Out-Of-Memory Killer or then it's all over: * the system administrator will have to restart the web server for Phusion * Passenger to be usable again. So here we disable Linux's OOM killer * for this watchdog. Note that the OOM score is inherited by child processes * so we need to restore it after each fork(). */ oldOomScore = setOomScoreNeverKill(); agentsOptions = initializeAgent(argc, argv, "PassengerWatchdog"); if (agentsOptions.get("test_binary", false) == "1") { int ret; do { ret = write(oldStdout, "PASS\n", 5); } while (ret == -1 && errno == EAGAIN); exit(0); } close(oldStdout); } static void initializeOptions() { TRACE_POINT(); agentsOptions .setDefaultInt ("log_level", DEFAULT_LOG_LEVEL) .setDefault ("temp_dir", getSystemTempDir()) .setDefaultBool("user_switching", true) .setDefault ("default_user", DEFAULT_WEB_APP_USER) .setDefaultUid ("web_server_worker_uid", getuid()) .setDefaultGid ("web_server_worker_gid", getgid()) .setDefault ("default_ruby", DEFAULT_RUBY) .setDefault ("default_python", DEFAULT_PYTHON) .setDefaultInt ("max_pool_size", DEFAULT_MAX_POOL_SIZE) .setDefaultInt ("pool_idle_time", DEFAULT_POOL_IDLE_TIME); agentsOptions.set ("passenger_version", PASSENGER_VERSION); // Check for required options UPDATE_TRACE_POINT(); agentsOptions.get("passenger_root"); agentsOptions.getPid("web_server_pid"); // Fetch optional options UPDATE_TRACE_POINT(); tempDir = agentsOptions.get("temp_dir"); userSwitching = agentsOptions.getBool("user_switching"); defaultUser = agentsOptions.get("default_user"); if (!agentsOptions.has("default_group")) { agentsOptions.set("default_group", inferDefaultGroup(defaultUser)); } defaultGroup = agentsOptions.get("default_group"); webServerWorkerUid = agentsOptions.getUid("web_server_worker_uid"); webServerWorkerGid = agentsOptions.getGid("web_server_worker_gid"); P_INFO("Options: " << agentsOptions.inspect()); } static void maybeSetsid() { /* Become the session leader so that Apache can't kill the * watchdog with killpg() during shutdown, so that a * Ctrl-C only affects the web server, and so that * we can kill all of our subprocesses in a single killpg(). * * AgentsStarter.h already calls setsid() before exec()ing * the Watchdog, but FlyingPassenger does not. */ if (agentsOptions.getBool("setsid", false)) { setsid(); } } static void lookupDefaultUidGid(uid_t &uid, gid_t &gid) { struct passwd *userEntry; userEntry = getpwnam(defaultUser.c_str()); if (userEntry == NULL) { throw NonExistentUserException("Default user '" + defaultUser + "' does not exist."); } uid = userEntry->pw_uid; gid = lookupGid(defaultGroup); if (gid == (gid_t) -1) { throw NonExistentGroupException("Default group '" + defaultGroup + "' does not exist."); } } static void initializeWorkingObjects(WorkingObjectsPtr &wo, ServerInstanceDirToucherPtr &serverInstanceDirToucher) { TRACE_POINT(); wo = boost::make_shared(); wo->resourceLocator = boost::make_shared(agentsOptions.get("passenger_root")); UPDATE_TRACE_POINT(); // Must not used boost::make_shared() here because Watchdog.cpp // deletes the raw pointer in cleanupAgentsInBackground(). if (agentsOptions.get("server_instance_dir", false).empty()) { /* We embed the super structure version in the server instance directory name * because it's possible to upgrade Phusion Passenger without changing the * web server's PID. This way each incompatible upgrade will use its own * server instance directory. */ string path = tempDir + "/passenger." + toString(SERVER_INSTANCE_DIR_STRUCTURE_MAJOR_VERSION) + "." + toString(SERVER_INSTANCE_DIR_STRUCTURE_MINOR_VERSION) + "." + toString(agentsOptions.getPid("web_server_pid")); wo->serverInstanceDir.reset(new ServerInstanceDir(path)); } else { wo->serverInstanceDir.reset(new ServerInstanceDir(agentsOptions.get("server_instance_dir"))); agentsOptions.set("server_instance_dir", wo->serverInstanceDir->getPath()); } wo->generation = wo->serverInstanceDir->newGeneration(userSwitching, defaultUser, defaultGroup, webServerWorkerUid, webServerWorkerGid); agentsOptions.set("server_instance_dir", wo->serverInstanceDir->getPath()); agentsOptions.setInt("generation_number", wo->generation->getNumber()); agentsOptions.set("generation_path", wo->generation->getPath()); UPDATE_TRACE_POINT(); serverInstanceDirToucher = boost::make_shared(wo); UPDATE_TRACE_POINT(); lookupDefaultUidGid(wo->defaultUid, wo->defaultGid); UPDATE_TRACE_POINT(); wo->cleanupPidfiles = agentsOptions.getStrSet("cleanup_pidfiles", false); UPDATE_TRACE_POINT(); wo->loggingAgentAddress = "unix:" + wo->generation->getPath() + "/logging"; wo->loggingAgentPassword = wo->randomGenerator.generateAsciiString(64); wo->loggingAgentAdminAddress = "unix:" + wo->generation->getPath() + "/logging_admin"; UPDATE_TRACE_POINT(); wo->adminToolStatusPassword = wo->randomGenerator.generateAsciiString(MESSAGE_SERVER_MAX_PASSWORD_SIZE); wo->adminToolManipulationPassword = wo->randomGenerator.generateAsciiString(MESSAGE_SERVER_MAX_PASSWORD_SIZE); agentsOptions.set("admin_tool_status_password", wo->adminToolStatusPassword); agentsOptions.set("admin_tool_manipulation_password", wo->adminToolManipulationPassword); if (geteuid() == 0 && !userSwitching) { createFile(wo->generation->getPath() + "/passenger-status-password.txt", wo->adminToolStatusPassword, S_IRUSR, wo->defaultUid, wo->defaultGid); createFile(wo->generation->getPath() + "/admin-manipulation-password.txt", wo->adminToolManipulationPassword, S_IRUSR, wo->defaultUid, wo->defaultGid); } else { createFile(wo->generation->getPath() + "/passenger-status-password.txt", wo->adminToolStatusPassword, S_IRUSR | S_IWUSR); createFile(wo->generation->getPath() + "/admin-manipulation-password.txt", wo->adminToolManipulationPassword, S_IRUSR | S_IWUSR); } } static void initializeAgentWatchers(const WorkingObjectsPtr &wo, vector &watchers) { TRACE_POINT(); watchers.push_back(make_shared(wo)); watchers.push_back(make_shared(wo)); } static void startAgents(const WorkingObjectsPtr &wo, vector &watchers) { TRACE_POINT(); foreach (AgentWatcherPtr watcher, watchers) { try { watcher->start(); } catch (const std::exception &e) { writeArrayMessage(FEEDBACK_FD, "Watchdog startup error", e.what(), NULL); forceAllAgentsShutdown(wo, watchers); exit(1); } // Allow other exceptions to propagate and crash the watchdog. } } static void beginWatchingAgents(const WorkingObjectsPtr &wo, vector &watchers) { foreach (AgentWatcherPtr watcher, watchers) { try { watcher->beginWatching(); } catch (const std::exception &e) { writeArrayMessage(FEEDBACK_FD, "Watchdog startup error", e.what(), NULL); forceAllAgentsShutdown(wo, watchers); exit(1); } // Allow other exceptions to propagate and crash the watchdog. } } static void reportAgentsInformation(const WorkingObjectsPtr &wo, const vector &watchers) { TRACE_POINT(); VariantMap report; report .set("server_instance_dir", wo->serverInstanceDir->getPath()) .setInt("generation", wo->generation->getNumber()); foreach (AgentWatcherPtr watcher, watchers) { watcher->reportAgentsInformation(report); } report.writeToFd(FEEDBACK_FD, "Agents information"); } int main(int argc, char *argv[]) { initializeBareEssentials(argc, argv); P_DEBUG("Starting Watchdog..."); WorkingObjectsPtr wo; ServerInstanceDirToucherPtr serverInstanceDirToucher; vector watchers; try { TRACE_POINT(); initializeOptions(); maybeSetsid(); initializeWorkingObjects(wo, serverInstanceDirToucher); initializeAgentWatchers(wo, watchers); UPDATE_TRACE_POINT(); runHookScriptAndThrowOnError("before_watchdog_initialization"); } catch (const std::exception &e) { writeArrayMessage(FEEDBACK_FD, "Watchdog startup error", e.what(), NULL); if (wo != NULL) { killCleanupPids(wo); } return 1; } // Allow other exceptions to propagate and crash the watchdog. try { TRACE_POINT(); startAgents(wo, watchers); beginWatchingAgents(wo, watchers); reportAgentsInformation(wo, watchers); P_INFO("All Phusion Passenger agents started!"); UPDATE_TRACE_POINT(); runHookScriptAndThrowOnError("after_watchdog_initialization"); UPDATE_TRACE_POINT(); this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; bool exitGracefully = waitForStarterProcessOrWatchers(wo, watchers); if (exitGracefully) { /* Fork a child process which cleans up all the agent processes in * the background and exit this watchdog process so that we don't block * the web server. */ P_DEBUG("Web server exited gracefully; gracefully shutting down all agents..."); } else { P_DEBUG("Web server did not exit gracefully, forcing shutdown of all agents..."); } UPDATE_TRACE_POINT(); runHookScriptAndThrowOnError("after_watchdog_shutdown"); UPDATE_TRACE_POINT(); AgentWatcher::stopWatching(watchers); if (exitGracefully) { UPDATE_TRACE_POINT(); cleanupAgentsInBackground(wo, watchers, argv); } else { UPDATE_TRACE_POINT(); forceAllAgentsShutdown(wo, watchers); } UPDATE_TRACE_POINT(); runHookScriptAndThrowOnError("after_watchdog_shutdown"); return exitGracefully ? 0 : 1; } catch (const tracable_exception &e) { P_ERROR(e.what() << "\n" << e.backtrace()); return 1; } } passenger-4.0.37/ext/common/agents/Watchdog/ServerInstanceDirToucher.cpp000644 000765 000024 00000007114 12233035540 026760 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /** * Touch all files in the server instance dir every 6 hours in order to prevent /tmp * cleaners from weaking havoc: * http://code.google.com/p/phusion-passenger/issues/detail?id=365 */ class ServerInstanceDirToucher { private: WorkingObjectsPtr wo; oxt::thread *thr; void threadMain() { while (!this_thread::interruption_requested()) { syscalls::sleep(60 * 60 * 6); begin_touch: this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; // Fork a process which touches everything in the server instance dir. pid_t pid = syscalls::fork(); if (pid == 0) { // Child int prio, ret, e; closeAllFileDescriptors(2); // Make process nicer. do { prio = getpriority(PRIO_PROCESS, getpid()); } while (prio == -1 && errno == EINTR); if (prio != -1) { prio++; if (prio > 20) { prio = 20; } do { ret = setpriority(PRIO_PROCESS, getpid(), prio); } while (ret == -1 && errno == EINTR); } else { perror("getpriority"); } do { ret = chdir(wo->serverInstanceDir->getPath().c_str()); } while (ret == -1 && errno == EINTR); if (ret == -1) { e = errno; fprintf(stderr, "chdir(\"%s\") failed: %s (%d)\n", wo->serverInstanceDir->getPath().c_str(), strerror(e), e); fflush(stderr); _exit(1); } setOomScore(oldOomScore); execlp("/bin/sh", "/bin/sh", "-c", "find . | xargs touch", (char *) 0); e = errno; fprintf(stderr, "Cannot execute 'find . | xargs touch': %s (%d)\n", strerror(e), e); fflush(stderr); _exit(1); } else if (pid == -1) { // Error P_WARN("Could not touch the server instance directory because " "fork() failed. Retrying in 2 minutes..."); this_thread::restore_interruption si(di); this_thread::restore_syscall_interruption rsi(dsi); syscalls::sleep(60 * 2); goto begin_touch; } else { syscalls::waitpid(pid, NULL, 0); } } } public: ServerInstanceDirToucher(const WorkingObjectsPtr &wo) { this->wo = wo; thr = new oxt::thread(boost::bind(&ServerInstanceDirToucher::threadMain, this), "Server instance dir toucher", 256 * 1024); } ~ServerInstanceDirToucher() { thr->interrupt_and_join(); delete thr; } }; typedef boost::shared_ptr ServerInstanceDirToucherPtr; passenger-4.0.37/ext/common/agents/LoggingAgent/AdminController.h000644 000765 000024 00000006031 12233035540 025377 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_ADMIN_CONTROLLER_H_ #define _PASSENGER_ADMIN_CONTROLLER_H_ #include #include #include namespace Passenger { using namespace std; using namespace boost; using namespace oxt; class AdminController: public MessageServer::Handler { private: struct SpecificContext: public MessageServer::ClientContext { }; typedef MessageServer::CommonClientContext CommonClientContext; LoggingServerPtr server; /********************************************* * Message handler methods *********************************************/ void processStatus(CommonClientContext &commonContext, SpecificContext *specificContext, const vector &args) { TRACE_POINT(); commonContext.passSecurity(); stringstream stream; server->dump(stream); writeScalarMessage(commonContext.fd, stream.str()); } public: AdminController(const LoggingServerPtr &server) { this->server = server; } virtual MessageServer::ClientContextPtr newClient(CommonClientContext &commonContext) { return boost::make_shared(); } virtual bool processMessage(CommonClientContext &commonContext, MessageServer::ClientContextPtr &_specificContext, const vector &args) { SpecificContext *specificContext = (SpecificContext *) _specificContext.get(); try { if (isCommand(args, "status", 0)) { processStatus(commonContext, specificContext, args); } else { return false; } } catch (const SecurityException &) { /* Client does not have enough rights to perform a certain action. * It has already been notified of this; ignore exception and move on. */ } return true; } }; } // namespace Passenger #endif /* _PASSENGER_ADMIN_CONTROLLER_H_ */ passenger-4.0.37/ext/common/agents/LoggingAgent/DataStoreId.h000644 000765 000024 00000010446 12233035540 024453 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_DATA_STORE_ID_H_ #define _PASSENGER_DATA_STORE_ID_H_ #include #include #include #include namespace Passenger { /** * Efficient representation for a (groupName, nodeName, category) tuple. */ class DataStoreId { private: char *id; unsigned short groupNameSize; unsigned short nodeNameSize; unsigned short categorySize; size_t totalSize() const { return groupNameSize + nodeNameSize + categorySize + 3; } StaticString toStaticString() const { if (id == NULL) { return StaticString(); } else { return StaticString(id, totalSize()); } } public: DataStoreId(const StaticString &groupName, const StaticString &nodeName, const StaticString &category) { assert(groupName.size() <= USHRT_MAX); assert(nodeName.size() <= USHRT_MAX); assert(category.size() <= USHRT_MAX); char *end; id = new char[groupName.size() + nodeName.size() + category.size() + 3]; end = id; memcpy(end, groupName.c_str(), groupName.size()); groupNameSize = groupName.size(); end += groupName.size(); *end = '\0'; end++; memcpy(end, nodeName.c_str(), nodeName.size()); nodeNameSize = nodeName.size(); end += nodeName.size(); *end = '\0'; end++; memcpy(end, category.c_str(), category.size()); categorySize = category.size(); end += category.size(); *end = '\0'; } DataStoreId() { id = NULL; } DataStoreId(const DataStoreId &other) { if (other.id == NULL) { id = NULL; } else { id = new char[other.totalSize()]; memcpy(id, other.id, other.totalSize()); groupNameSize = other.groupNameSize; nodeNameSize = other.nodeNameSize; categorySize = other.categorySize; } } ~DataStoreId() { delete id; } DataStoreId &operator=(const DataStoreId &other) { if (other.id == NULL) { delete id; id = NULL; return *this; } else { if (totalSize() != other.totalSize()) { delete id; id = NULL; } if (id == NULL) { id = new char[other.totalSize()]; } memcpy(id, other.id, other.totalSize()); groupNameSize = other.groupNameSize; nodeNameSize = other.nodeNameSize; categorySize = other.categorySize; return *this; } } bool operator<(const DataStoreId &other) const { return toStaticString() < other.toStaticString(); } bool operator==(const DataStoreId &other) const { if (id == NULL) { return other.id == NULL; } else { if (other.id == NULL) { return false; } else { return toStaticString() == other.toStaticString(); } } } StaticString getGroupName() const { if (id != NULL) { return StaticString(id, groupNameSize); } else { return StaticString(); } } StaticString getNodeName() const { if (id != NULL) { return StaticString(id + groupNameSize + 1, nodeNameSize); } else { return StaticString(); } } StaticString getCategory() const { if (id != NULL) { return StaticString(id + groupNameSize + 1 + nodeNameSize + 1, categorySize); } else { return StaticString(); } } }; } // namespace Passenger #endif /* _PASSENGER_DATA_STORE_ID_H_ */ passenger-4.0.37/ext/common/agents/LoggingAgent/FilterSupport.cpp000644 000765 000024 00000004034 12233035540 025461 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include "FilterSupport.h" #include #include using namespace Passenger; extern "C" { PassengerFilter * passenger_filter_create(const char *source, int size, char **error) { if (size == -1) { size = strlen(source); } try { return (PassengerFilter *) new FilterSupport::Filter(StaticString(source, size)); } catch (const SyntaxError &e) { if (error != NULL) { *error = strdup(e.what()); } return NULL; } } void passenger_filter_free(PassengerFilter *filter) { delete (FilterSupport::Filter *) filter; } char * passenger_filter_validate(const char *source, int size) { if (size == -1) { size = strlen(source); } try { (void) FilterSupport::Filter(StaticString(source, size)); return NULL; } catch (const SyntaxError &e) { return strdup(e.what()); } } } // extern "C" passenger-4.0.37/ext/common/agents/LoggingAgent/FilterSupport.h000644 000765 000024 00000115073 12233035540 025134 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_FILTER_SUPPORT_H_ #define _PASSENGER_FILTER_SUPPORT_H_ #ifdef __cplusplus #include #include #include #include #include // Checking for _PCREPOSIX_H avoids conflicts with headers provided by Apache. // https://code.google.com/p/phusion-passenger/issues/detail?id=651 #ifndef _PCREPOSIX_H #include #endif #include #include #include #include #include #include #include namespace Passenger { namespace FilterSupport { using namespace std; using namespace boost; using namespace oxt; class Tokenizer { public: enum TokenType { NONE, NOT, AND, OR, MATCHES, NOT_MATCHES, EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, LPARENTHESIS, RPARENTHESIS, COMMA, REGEXP, STRING, INTEGER, TRUE_LIT, FALSE_LIT, IDENTIFIER, END_OF_DATA }; enum TokenOptions { NO_OPTIONS = 0, REGEXP_OPTION_CASE_INSENSITIVE = 1 }; struct Token { TokenType type; int options; unsigned int pos; unsigned int size; StaticString rawValue; Token() { type = NONE; } Token(TokenType _type, unsigned int _pos, unsigned int _size, const StaticString &_rawValue) : type(_type), options(NO_OPTIONS), pos(_pos), size(_size), rawValue(_rawValue) { } string toString() const { return Tokenizer::typeToString(type); } }; private: StaticString data; bool debug; unsigned int pos; static bool isWhitespace(char ch) { return ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n'; } void skipWhitespaces() { while (pos < data.size() && isWhitespace(data[pos])) { pos++; } } unsigned int available() const { return data.size() - pos; } char current() const { return data[pos]; } char next() const { return data[pos + 1]; } static bool isIdentifierChar(char ch) { return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch == '_'; } static bool isDigit(char ch) { return ch >= '0' && ch <= '9'; } Token logToken(const Token &token) const { if (debug) { printf("# Token: %s\n", token.toString().c_str()); } return token; } void raiseSyntaxError(const string &message = "") { string msg = "Syntax error at character " + toString(pos + 1); if (!message.empty()) { msg.append(": "); msg.append(message); } throw SyntaxError(msg); } void expectingAtLeast(unsigned int size) { if (available() < size) { raiseSyntaxError("at least " + toString(size) + " more characters expected"); } } void expectingNextChar(char ch) { expectingAtLeast(2); if (next() != ch) { raiseSyntaxError("expected '" + toString(ch) + "', but found '" + toString(next()) + "'"); } } Token matchToken(TokenType type, unsigned int size = 0) { unsigned int oldPos = pos; pos += size; return Token(type, oldPos, size, data.substr(oldPos, size)); } Token matchTokensStartingWithNegation() { expectingAtLeast(2); switch (next()) { case '~': return matchToken(NOT_MATCHES, 2); case '=': return matchToken(NOT_EQUALS, 2); default: raiseSyntaxError("unrecognized operator '" + data.substr(pos, 2) + "'"); return Token(); // Shut up compiler warning. }; } Token matchAnd() { expectingNextChar('&'); return matchToken(AND, 2); } Token matchOr() { expectingNextChar('|'); return matchToken(OR, 2); } Token matchTokensStartingWithEquals() { expectingAtLeast(2); switch (next()) { case '~': return matchToken(MATCHES, 2); case '=': return matchToken(EQUALS, 2); default: raiseSyntaxError("unrecognized operator '" + data.substr(pos, 2) + "'"); return Token(); // Shut up compiler warning. } } Token matchTokensStartingWithGreaterThan() { if (available() == 0 || next() != '=') { return matchToken(GREATER_THAN, 1); } else { return matchToken(GREATER_THAN_OR_EQUALS, 2); } } Token matchTokensStartingWithLessThan() { if (available() == 0 || next() != '=') { return matchToken(LESS_THAN, 1); } else { return matchToken(LESS_THAN_OR_EQUALS, 2); } } Token matchRegexp(char terminator) { unsigned int start = pos; bool endFound = false; // Match initial quote slash. pos++; // Match rest of regexp including terminating slash. while (pos < data.size() && !endFound) { char ch = current(); if (ch == '\\') { pos++; if (pos >= data.size()) { raiseSyntaxError("unterminated regular expression"); } else { pos++; } } else if (ch == terminator) { pos++; endFound = true; } else { pos++; } } if (endFound) { Token t(REGEXP, start, pos - start, data.substr(start, pos - start)); // Match regexp options. endFound = false; while (pos < data.size() && !endFound) { char ch = current(); if (ch == 'i') { t.options |= Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE; } else if (isWhitespace(ch)) { endFound = true; } pos++; } return t; } else { raiseSyntaxError("unterminated regular expression"); return Token(); // Shut up compiler warning. } } Token matchString(char terminator) { unsigned int start = pos; bool endFound = false; // Match initial quote character. pos++; // Match rest of string including terminating quote. while (pos < data.size() && !endFound) { char ch = current(); if (ch == '\\') { pos++; if (pos >= data.size()) { raiseSyntaxError("unterminated string"); } else { pos++; } } else if (ch == terminator) { pos++; endFound = true; } else { pos++; } } if (endFound) { return Token(STRING, start, pos - start, data.substr(start, pos - start)); } else { raiseSyntaxError("unterminated string"); return Token(); // Shut up compiler warning. } } Token matchInteger() { unsigned int start = pos; // Accept initial minus or digit. pos++; while (pos < data.size() && isDigit(data[pos])) { pos++; } return Token(INTEGER, start, pos - start, data.substr(start, pos - start)); } Token matchIdentifier() { char ch = current(); if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || ch == '_') { unsigned int start = pos; pos++; while (pos < data.size() && isIdentifierChar(current())) { pos++; } StaticString val = data.substr(start, pos - start); if (val == "true") { return Token(TRUE_LIT, start, pos - start, val); } else if (val == "false") { return Token(FALSE_LIT, start, pos - start, val); } else { return Token(IDENTIFIER, start, pos - start, val); } } else { raiseSyntaxError("Identifier expected, but got an unknown token"); return Token(); // Shut up compiler warning. } } public: Tokenizer(const StaticString &data, bool debug = false) { this->data = data; this->debug = debug; pos = 0; } Token getNext() { skipWhitespaces(); if (pos >= data.size()) { return logToken(Token(END_OF_DATA, data.size(), 0, "")); } switch (current()) { case '!': return logToken(matchTokensStartingWithNegation()); case '&': return logToken(matchAnd()); case '|': return logToken(matchOr()); case '=': return logToken(matchTokensStartingWithEquals()); case '>': return logToken(matchTokensStartingWithGreaterThan()); case '<': return logToken(matchTokensStartingWithLessThan()); case '(': return logToken(matchToken(LPARENTHESIS, 1)); case ')': return logToken(matchToken(RPARENTHESIS, 1)); case ',': return logToken(matchToken(COMMA, 1)); case '/': return logToken(matchRegexp('/')); case '%': expectingAtLeast(3); if (memcmp(data.data() + pos, "%r{", 3) != 0) { raiseSyntaxError("expected '%r{', but found '" + data.substr(pos, 3) + "'"); } pos += 2; return logToken(matchRegexp('}')); case '"': return logToken(matchString('"')); case '\'': return logToken(matchString('\'')); case '-': return logToken(matchInteger()); default: if (isDigit(current())) { return logToken(matchInteger()); } else { return logToken(matchIdentifier()); } } } static string typeToString(TokenType type) { switch (type) { case NONE: return "NONE"; case NOT: return "NOT"; case AND: return "AND"; case OR: return "OR"; case MATCHES: return "MATCHES"; case NOT_MATCHES: return "NOT_MATCHES"; case EQUALS: return "EQUALS"; case NOT_EQUALS: return "NOT_EQUALS"; case GREATER_THAN: return "GREATER_THAN"; case GREATER_THAN_OR_EQUALS: return "GREATER_THAN_OR_EQUALS"; case LESS_THAN: return "LESS_THAN"; case LESS_THAN_OR_EQUALS: return "LESS_THAN_OR_EQUALS"; case LPARENTHESIS: return "LPARENTHESIS"; case RPARENTHESIS: return "RPARENTHESIS"; case COMMA: return "COMMA"; case REGEXP: return "REGEXP"; case STRING: return "STRING"; case INTEGER: return "INTEGER"; case TRUE_LIT: return "TRUE"; case FALSE_LIT: return "FALSE"; case IDENTIFIER: return "IDENTIFIER"; case END_OF_DATA: return "END_OF_DATA"; default: return "(unknown)"; } } }; enum ValueType { REGEXP_TYPE, STRING_TYPE, INTEGER_TYPE, BOOLEAN_TYPE, UNKNOWN_TYPE }; class Context { public: enum FieldIdentifier { URI, CONTROLLER, RESPONSE_TIME, RESPONSE_TIME_WITHOUT_GC, STATUS, STATUS_CODE, GC_TIME }; virtual ~Context() { } virtual string getURI() const = 0; virtual string getController() const = 0; virtual int getResponseTime() const = 0; virtual string getStatus() const = 0; virtual int getStatusCode() const = 0; virtual int getGcTime() const = 0; virtual bool hasHint(const string &name) const = 0; int getResponseTimeWithoutGc() const { return getResponseTime() - getGcTime(); } string queryStringField(FieldIdentifier id) const { switch (id) { case URI: return getURI(); case CONTROLLER: return getController(); case RESPONSE_TIME: return toString(getResponseTime()); case RESPONSE_TIME_WITHOUT_GC: return toString(getResponseTimeWithoutGc()); case STATUS: return getStatus(); case STATUS_CODE: return toString(getStatusCode()); case GC_TIME: return toString(getGcTime()); default: return ""; } } int queryIntField(FieldIdentifier id) const { switch (id) { case RESPONSE_TIME: return getResponseTime(); case RESPONSE_TIME_WITHOUT_GC: return getResponseTimeWithoutGc(); case STATUS_CODE: return getStatusCode(); case GC_TIME: return getGcTime(); default: return 0; } } bool queryBoolField(FieldIdentifier id) const { switch (id) { case URI: return !getURI().empty(); case CONTROLLER: return !getController().empty(); case RESPONSE_TIME: return getResponseTime() > 0; case RESPONSE_TIME_WITHOUT_GC: return getResponseTimeWithoutGc() > 0; case STATUS: return !getStatus().empty(); case STATUS_CODE: return getStatusCode() > 0; case GC_TIME: return getGcTime() > 0; default: return false; } } static ValueType getFieldType(FieldIdentifier id) { switch (id) { case URI: case CONTROLLER: case STATUS: return STRING_TYPE; case RESPONSE_TIME: case RESPONSE_TIME_WITHOUT_GC: case STATUS_CODE: case GC_TIME: return INTEGER_TYPE; default: return UNKNOWN_TYPE; } } }; class SimpleContext: public Context { public: string uri; string controller; string status; int responseTime; int statusCode; int gcTime; set hints; SimpleContext() { responseTime = 0; statusCode = 0; gcTime = 0; } virtual string getURI() const { return uri; } virtual string getController() const { return controller; } virtual int getResponseTime() const { return responseTime; } virtual string getStatus() const { return status; } virtual int getStatusCode() const { return statusCode; } virtual int getGcTime() const { return gcTime; } virtual bool hasHint(const string &name) const { return hints.find(name) != hints.end(); } }; class ContextFromLog: public Context { private: StaticString logData; mutable SimpleContext *parsedData; struct ParseState { unsigned long long requestProcessingStart; unsigned long long requestProcessingEnd; unsigned long long smallestTimestamp; unsigned long long largestTimestamp; unsigned long long gcTimeStart; unsigned long long gcTimeEnd; }; static void parseLine(const StaticString &txnId, unsigned long long timestamp, const StaticString &data, SimpleContext &ctx, ParseState &state) { if (startsWith(data, "BEGIN: request processing")) { state.requestProcessingStart = extractEventTimestamp(data); } else if (startsWith(data, "END: request processing") || startsWith(data, "FAIL: request processing")) { state.requestProcessingEnd = extractEventTimestamp(data); } else if (startsWith(data, "URI: ")) { ctx.uri = data.substr(data.find(':') + 2); } else if (startsWith(data, "Controller action: ")) { StaticString value = data.substr(data.find(':') + 2); size_t pos = value.find('#'); if (pos != string::npos) { ctx.controller = value.substr(0, pos); } } else if (startsWith(data, "Status: ")) { StaticString value = data.substr(data.find(':') + 2); ctx.status = value; ctx.statusCode = stringToInt(value); } else if (startsWith(data, "Initial GC time: ")) { StaticString value = data.substr(data.find(':') + 2); state.gcTimeStart = stringToULL(value); } else if (startsWith(data, "Final GC time: ")) { StaticString value = data.substr(data.find(':') + 2); state.gcTimeEnd = stringToULL(value); } if (state.smallestTimestamp == 0 || timestamp < state.smallestTimestamp) { state.smallestTimestamp = timestamp; } if (timestamp > state.largestTimestamp) { state.largestTimestamp = timestamp; } } static void reallyParse(const StaticString &data, SimpleContext &ctx) { const char *current = data.data(); const char *end = data.data() + data.size(); ParseState state; memset(&state, 0, sizeof(state)); while (current < end) { current = skipNewlines(current, end); if (current < end) { const char *endOfLine = findEndOfLine(current, end); StaticString line(current, endOfLine - current); if (!line.empty()) { StaticString txnId; unsigned long long timestamp; unsigned int writeCount; StaticString lineData; // If we want to do more complicated analysis we should sort // the lines but for the purposes of ContextFromLog // analyzing the data without sorting is good enough. if (splitLine(line, txnId, timestamp, writeCount, lineData)) { parseLine(txnId, timestamp, lineData, ctx, state); } } current = endOfLine; } } if (state.requestProcessingEnd != 0) { ctx.responseTime = int(state.requestProcessingEnd - state.requestProcessingStart); } else if (state.smallestTimestamp != 0) { ctx.responseTime = state.largestTimestamp - state.smallestTimestamp; } if (state.gcTimeEnd != 0) { ctx.gcTime = state.gcTimeEnd - state.gcTimeStart; } } static bool splitLine(const StaticString &line, StaticString &txnId, unsigned long long ×tamp, unsigned int &writeCount, StaticString &data) { size_t firstDelim = line.find(' '); if (firstDelim == string::npos) { return false; } size_t secondDelim = line.find(' ', firstDelim + 1); if (secondDelim == string::npos) { return false; } size_t thirdDelim = line.find(' ', secondDelim + 1); if (thirdDelim == string::npos) { return false; } txnId = line.substr(0, firstDelim); timestamp = hexatriToULL(line.substr(firstDelim + 1, secondDelim - firstDelim - 1)); writeCount = (unsigned int) hexatriToULL(line.substr(secondDelim + 1, thirdDelim - secondDelim - 1)); data = line.substr(thirdDelim + 1); return true; } static unsigned long long extractEventTimestamp(const StaticString &data) { size_t pos = data.find('('); if (pos == string::npos) { return 0; } else { pos++; size_t start = pos; while (pos < data.size() && isDigit(data[pos])) { pos++; } if (pos >= data.size()) { return 0; } else { return hexatriToULL(data.substr(start, pos - start)); } } } static bool isNewline(char ch) { return ch == '\n' || ch == '\r'; } static bool isDigit(char ch) { return ch >= '0' && ch <= '9'; } static const char *skipNewlines(const char *current, const char *end) { while (current < end && isNewline(*current)) { current++; } return current; } static const char *findEndOfLine(const char *current, const char *end) { while (current < end && !isNewline(*current)) { current++; } return current; } SimpleContext *parse() const { if (parsedData == NULL) { auto_ptr ctx(new SimpleContext()); reallyParse(logData, *ctx.get()); parsedData = ctx.release(); } return parsedData; } public: ContextFromLog(const StaticString &logData) { this->logData = logData; parsedData = NULL; } ~ContextFromLog() { delete parsedData; } virtual string getURI() const { return parse()->uri; } virtual string getController() const { return parse()->getController(); } virtual int getResponseTime() const { return parse()->getResponseTime(); } virtual string getStatus() const { return parse()->getStatus(); } virtual int getStatusCode() const { return parse()->getStatusCode(); } virtual int getGcTime() const { return parse()->getGcTime(); } virtual bool hasHint(const string &name) const { return parse()->hasHint(name); } }; class Filter { private: typedef Tokenizer::Token Token; typedef Tokenizer::TokenType TokenType; struct BooleanComponent; struct MultiExpression; struct Comparison; struct FunctionCall; typedef boost::shared_ptr BooleanComponentPtr; typedef boost::shared_ptr MultiExpressionPtr; typedef boost::shared_ptr ComparisonPtr; typedef boost::shared_ptr FunctionCallPtr; struct BooleanComponent { virtual ~BooleanComponent() { } virtual bool evaluate(const Context &ctx) = 0; }; enum LogicalOperator { AND, OR }; enum Comparator { MATCHES, NOT_MATCHES, EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_OR_EQUALS, LESS_THAN, LESS_THAN_OR_EQUALS, UNKNOWN_COMPARATOR }; struct MultiExpression: public BooleanComponent { struct Part { LogicalOperator theOperator; BooleanComponentPtr expression; }; BooleanComponentPtr firstExpression; vector rest; virtual bool evaluate(const Context &ctx) { bool result = firstExpression->evaluate(ctx); unsigned int i = 0; bool done = i == rest.size(); while (!done) { Part &nextPart = rest[i]; if (nextPart.theOperator == AND) { result = result && nextPart.expression->evaluate(ctx); done = !result; } else { result = result || nextPart.expression->evaluate(ctx); } i++; done = done || i == rest.size(); } return result; } }; struct Negation: public BooleanComponent { BooleanComponentPtr expr; Negation(const BooleanComponentPtr &e) : expr(e) { } virtual bool evaluate(const Context &ctx) { return !expr->evaluate(ctx); } }; struct Value { enum Source { REGEXP_LITERAL, STRING_LITERAL, INTEGER_LITERAL, BOOLEAN_LITERAL, CONTEXT_FIELD_IDENTIFIER }; Source source; union { struct { char stringStorage[sizeof(string)]; string *stringPointer; struct { regex_t regexp; int options; } regexp; } stringOrRegexpValue; int intValue; bool boolValue; Context::FieldIdentifier contextFieldIdentifier; } u; Value() { source = INTEGER_LITERAL; u.intValue = 0; } Value(const Value &other) { initializeFrom(other); } Value(bool regexp, const StaticString &value, bool caseInsensitive = false) { if (regexp) { source = REGEXP_LITERAL; } else { source = STRING_LITERAL; } u.stringOrRegexpValue.stringPointer = new (u.stringOrRegexpValue.stringStorage) string(value.data(), value.size()); if (regexp) { int options = REG_EXTENDED; u.stringOrRegexpValue.regexp.options = 0; if (caseInsensitive) { options |= REG_ICASE; u.stringOrRegexpValue.regexp.options |= Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE; } regcomp(&u.stringOrRegexpValue.regexp.regexp, u.stringOrRegexpValue.stringPointer->c_str(), options); } } Value(int val) { source = INTEGER_LITERAL; u.intValue = val; } Value(bool val) { source = BOOLEAN_LITERAL; u.boolValue = val; } Value(Context::FieldIdentifier identifier) { source = CONTEXT_FIELD_IDENTIFIER; u.contextFieldIdentifier = identifier; } ~Value() { freeStorage(); } Value &operator=(const Value &other) { freeStorage(); initializeFrom(other); return *this; } regex_t *getRegexpValue(const Context &ctx) const { if (source == REGEXP_LITERAL) { return &storedRegexp(); } else { return NULL; } } string getStringValue(const Context &ctx) const { switch (source) { case REGEXP_LITERAL: case STRING_LITERAL: return storedString(); case INTEGER_LITERAL: return toString(u.intValue); case BOOLEAN_LITERAL: if (u.boolValue) { return "true"; } else { return "false"; } case CONTEXT_FIELD_IDENTIFIER: return ctx.queryStringField(u.contextFieldIdentifier); default: return ""; } } int getIntegerValue(const Context &ctx) const { switch (source) { case REGEXP_LITERAL: return 0; case STRING_LITERAL: return atoi(storedString()); case INTEGER_LITERAL: return u.intValue; case BOOLEAN_LITERAL: return (int) u.boolValue; case CONTEXT_FIELD_IDENTIFIER: return ctx.queryIntField(u.contextFieldIdentifier); default: return 0; } } bool getBooleanValue(const Context &ctx) const { switch (source) { case REGEXP_LITERAL: return true; case STRING_LITERAL: return !storedString().empty(); case INTEGER_LITERAL: return (bool) u.intValue; case BOOLEAN_LITERAL: return u.boolValue; case CONTEXT_FIELD_IDENTIFIER: return ctx.queryBoolField(u.contextFieldIdentifier); default: return 0; } } ValueType getType() const { switch (source) { case REGEXP_LITERAL: return REGEXP_TYPE; case STRING_LITERAL: return STRING_TYPE; case INTEGER_LITERAL: return INTEGER_TYPE; case BOOLEAN_LITERAL: return BOOLEAN_TYPE; case CONTEXT_FIELD_IDENTIFIER: return Context::getFieldType(u.contextFieldIdentifier); default: return UNKNOWN_TYPE; } } private: const string &storedString() const { return *u.stringOrRegexpValue.stringPointer; } regex_t &storedRegexp() const { return (regex_t &) u.stringOrRegexpValue.regexp.regexp; } void freeStorage() { if (source == REGEXP_LITERAL || source == STRING_LITERAL) { storedString().~string(); if (source == REGEXP_LITERAL) { regfree(&storedRegexp()); } } } void initializeFrom(const Value &other) { int options; source = other.source; switch (source) { case REGEXP_LITERAL: u.stringOrRegexpValue.stringPointer = new (u.stringOrRegexpValue.stringStorage) string(other.storedString()); options = REG_EXTENDED; if (other.u.stringOrRegexpValue.regexp.options & Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE) { options |= REG_ICASE; } regcomp(&u.stringOrRegexpValue.regexp.regexp, storedString().c_str(), options); u.stringOrRegexpValue.regexp.options = other.u.stringOrRegexpValue.regexp.options; break; case STRING_LITERAL: u.stringOrRegexpValue.stringPointer = new (u.stringOrRegexpValue.stringStorage) string(other.storedString()); break; case INTEGER_LITERAL: u.intValue = other.u.intValue; break; case BOOLEAN_LITERAL: u.boolValue = other.u.boolValue; break; case CONTEXT_FIELD_IDENTIFIER: u.contextFieldIdentifier = other.u.contextFieldIdentifier; break; } } }; struct SingleValueComponent: public BooleanComponent { Value val; SingleValueComponent(const Value &v) : val(v) { } virtual bool evaluate(const Context &ctx) { return val.getBooleanValue(ctx); } }; struct Comparison: public BooleanComponent { Value subject; Comparator comparator; Value object; virtual bool evaluate(const Context &ctx) { switch (subject.getType()) { case STRING_TYPE: return compareStringOrRegexp(subject.getStringValue(ctx), ctx); case INTEGER_TYPE: return compareInteger(subject.getIntegerValue(ctx), ctx); case BOOLEAN_TYPE: return compareBoolean(subject.getBooleanValue(ctx), ctx); default: // error return false; } } private: bool compareStringOrRegexp(const string &str, const Context &ctx) { switch (comparator) { case MATCHES: return regexec(object.getRegexpValue(ctx), str.c_str(), 0, NULL, 0) == 0; case NOT_MATCHES: return regexec(object.getRegexpValue(ctx), str.c_str(), 0, NULL, 0) != 0; case EQUALS: return str == object.getStringValue(ctx); case NOT_EQUALS: return str != object.getStringValue(ctx); default: // error return false; } } bool compareInteger(int value, const Context &ctx) { int value2 = object.getIntegerValue(ctx); switch (comparator) { case EQUALS: return value == value2; case NOT_EQUALS: return value != value2; case GREATER_THAN: return value > value2; case GREATER_THAN_OR_EQUALS: return value >= value2; case LESS_THAN: return value < value2; case LESS_THAN_OR_EQUALS: return value <= value2; default: // error return false; } } bool compareBoolean(bool value, const Context &ctx) { bool value2 = object.getBooleanValue(ctx); switch (comparator) { case EQUALS: return value == value2; case NOT_EQUALS: return value != value2; default: // error return false; } } }; struct FunctionCall: public BooleanComponent { vector arguments; virtual void checkArguments() const = 0; }; struct StartsWithFunctionCall: public FunctionCall { virtual bool evaluate(const Context &ctx) { return startsWith(arguments[0].getStringValue(ctx), arguments[1].getStringValue(ctx)); } virtual void checkArguments() const { if (arguments.size() != 2) { throw SyntaxError("you passed " + toString(arguments.size()) + " argument(s) to starts_with(), but it accepts exactly 2 arguments"); } } }; struct HasHintFunctionCall: public FunctionCall { virtual bool evaluate(const Context &ctx) { return ctx.hasHint(arguments[0].getStringValue(ctx)); } virtual void checkArguments() const { if (arguments.size() != 1) { throw SyntaxError("you passed " + toString(arguments.size()) + " argument(s) to has_hint(), but it accepts exactly 1 argument"); } } }; Tokenizer tokenizer; BooleanComponentPtr root; Token lookahead; bool debug; static bool isLiteralToken(const Token &token) { return token.type == Tokenizer::REGEXP || token.type == Tokenizer::STRING || token.type == Tokenizer::INTEGER || token.type == Tokenizer::TRUE_LIT || token.type == Tokenizer::FALSE_LIT; } static bool isValueToken(const Token &token) { return isLiteralToken(token) || token.type == Tokenizer::IDENTIFIER; } static bool isLogicalOperatorToken(const Token &token) { return token.type == Tokenizer::AND || token.type == Tokenizer::OR; } static Comparator determineComparator(Tokenizer::TokenType type) { switch (type) { case Tokenizer::MATCHES: return MATCHES; case Tokenizer::NOT_MATCHES: return NOT_MATCHES; case Tokenizer::EQUALS: return EQUALS; case Tokenizer::NOT_EQUALS: return NOT_EQUALS; case Tokenizer::GREATER_THAN: return GREATER_THAN; case Tokenizer::GREATER_THAN_OR_EQUALS: return GREATER_THAN_OR_EQUALS; case Tokenizer::LESS_THAN: return LESS_THAN; case Tokenizer::LESS_THAN_OR_EQUALS: return LESS_THAN_OR_EQUALS; default: return UNKNOWN_COMPARATOR; } } static bool comparatorAcceptsValueTypes(Comparator cmp, ValueType subjectType, ValueType objectType) { switch (cmp) { case MATCHES: case NOT_MATCHES: return subjectType == STRING_TYPE && objectType == REGEXP_TYPE; case EQUALS: case NOT_EQUALS: return (subjectType == STRING_TYPE || subjectType == INTEGER_TYPE || subjectType == BOOLEAN_TYPE) && subjectType == objectType; case GREATER_THAN: case GREATER_THAN_OR_EQUALS: case LESS_THAN: case LESS_THAN_OR_EQUALS: return subjectType == INTEGER_TYPE && objectType == INTEGER_TYPE; default: abort(); return false; // Shut up compiler warning. } } static string unescapeCString(const StaticString &data) { string result; result.reserve(data.size()); const char *current = data.data(); const char *end = data.data() + data.size(); while (current < end) { char ch = *current; if (ch == '\\') { current++; if (current < end) { ch = *current; switch (ch) { case 'r': result.append(1, '\r'); break; case 'n': result.append(1, '\n'); break; case 't': result.append(1, '\t'); break; default: result.append(1, ch); break; } current++; } } else { result.append(1, ch); current++; } } return result; } void logMatch(int level, const char *name) const { if (level > 100) { // If level is too deep then it's probably a bug. abort(); } if (debug) { for (int i = 0; i < level; i++) { printf(" "); } printf("Matching: %s\n", name); } } Token peek() const { return lookahead; } bool peek(Tokenizer::TokenType type) const { return lookahead.type == type; } Token match(TokenType type) { if (lookahead.type == type) { return match(); } else { raiseSyntaxError("Expected a " + Tokenizer::typeToString(type) + " token, but got " + lookahead.toString(), lookahead); return Token(); // Shut up compiler warning. } } Token match() { Token old = lookahead; lookahead = tokenizer.getNext(); return old; } void raiseSyntaxError(const string &msg = "", const Token &token = Token()) { if (token.type != Tokenizer::NONE) { string message = "at character " + toString(token.pos + 1); if (!msg.empty()) { message.append(": "); message.append(msg); } throw SyntaxError(message); } else { throw SyntaxError(msg); } } BooleanComponentPtr matchMultiExpression(int level) { logMatch(level, "matchMultiExpression()"); MultiExpressionPtr result = boost::make_shared(); result->firstExpression = matchExpression(level + 1); while (isLogicalOperatorToken(peek())) { MultiExpression::Part part; part.theOperator = matchOperator(level + 1); part.expression = matchExpression(level + 1); result->rest.push_back(part); } return result; } BooleanComponentPtr matchExpression(int level) { logMatch(level, "matchExpression()"); bool negate = false; if (peek(Tokenizer::NOT)) { match(); negate = true; } Token next = peek(); if (next.type == Tokenizer::LPARENTHESIS) { match(); BooleanComponentPtr expression = matchMultiExpression(level + 1); match(Tokenizer::RPARENTHESIS); if (negate) { return boost::make_shared(expression); } else { return expression; } } else if (isValueToken(next)) { BooleanComponentPtr component; Token ¤t = next; match(); if (peek(Tokenizer::LPARENTHESIS)) { component = matchFunctionCall(level + 1, current); } else if (determineComparator(peek().type) != UNKNOWN_COMPARATOR) { component = matchComparison(level + 1, current); } else if (current.type == Tokenizer::TRUE_LIT || current.type == Tokenizer::FALSE_LIT) { component = matchSingleValueComponent(level + 1, current); } else { raiseSyntaxError("expected a function call, comparison or boolean literal", current); } if (negate) { return boost::make_shared(component); } else { return component; } } else { raiseSyntaxError("expected a left parenthesis or an identifier", next); return BooleanComponentPtr(); // Shut up compiler warning. } } BooleanComponentPtr matchSingleValueComponent(int level, const Token &token) { logMatch(level, "matchSingleValueComponent()"); return boost::make_shared(matchLiteral(level + 1, token)); } ComparisonPtr matchComparison(int level, const Token &subjectToken) { logMatch(level, "matchComparison()"); ComparisonPtr comparison = boost::make_shared(); comparison->subject = matchValue(level + 1, subjectToken); comparison->comparator = matchComparator(level + 1); comparison->object = matchValue(level + 1, match()); if (!comparatorAcceptsValueTypes(comparison->comparator, comparison->subject.getType(), comparison->object.getType())) { raiseSyntaxError("the comparator cannot operate on the given combination of types", subjectToken); } return comparison; } FunctionCallPtr matchFunctionCall(int level, const Token &id) { logMatch(level, "matchFunctionCall()"); FunctionCallPtr function; if (id.rawValue == "starts_with") { function = boost::make_shared(); } else if (id.rawValue == "has_hint") { function = boost::make_shared(); } else { raiseSyntaxError("unknown function '" + id.rawValue + "'", id); } match(Tokenizer::LPARENTHESIS); if (isValueToken(peek())) { function->arguments.push_back(matchValue(level + 1, match())); while (peek(Tokenizer::COMMA)) { match(); function->arguments.push_back(matchValue(level + 1, match())); } } match(Tokenizer::RPARENTHESIS); function->checkArguments(); return function; } Value matchValue(int level, const Token &token) { logMatch(level, "matchValue()"); if (isLiteralToken(token)) { return matchLiteral(level + 1, token); } else if (token.type == Tokenizer::IDENTIFIER) { return matchContextFieldIdentifier(level + 1, token); } else { raiseSyntaxError("Unrecognized value token " + Tokenizer::typeToString(token.type), token); return Value(); // Shut up compiler warning. } } LogicalOperator matchOperator(int level) { logMatch(level, "matchOperator()"); if (peek(Tokenizer::AND)) { logMatch(level + 1, "AND"); match(); return AND; } else if (peek(Tokenizer::OR)) { logMatch(level + 1, "OR"); match(); return OR; } else { raiseSyntaxError("", peek()); return AND; // Shut up compiler warning. } } Comparator matchComparator(int level) { logMatch(level, "matchComparator()"); Comparator comparator = determineComparator(peek().type); if (comparator == UNKNOWN_COMPARATOR) { raiseSyntaxError("", peek()); return MATCHES; // Shut up compiler warning. } else { logMatch(level + 1, Tokenizer::typeToString(peek().type).c_str()); match(); return comparator; } } Value matchLiteral(int level, const Token &token) { logMatch(level, "matchLiteral()"); if (token.type == Tokenizer::REGEXP) { logMatch(level + 1, "regexp"); return Value(true, unescapeCString(token.rawValue.substr(1, token.rawValue.size() - 2)), token.options & Tokenizer::REGEXP_OPTION_CASE_INSENSITIVE); } else if (token.type == Tokenizer::STRING) { logMatch(level + 1, "string"); return Value(false, unescapeCString(token.rawValue.substr(1, token.rawValue.size() - 2))); } else if (token.type == Tokenizer::INTEGER) { logMatch(level + 1, "integer"); return Value(atoi(token.rawValue.toString())); } else if (token.type == Tokenizer::TRUE_LIT) { logMatch(level + 1, "true"); return Value(true); } else if (token.type == Tokenizer::FALSE_LIT) { logMatch(level + 1, "false"); return Value(false); } else { raiseSyntaxError("regular expression, string, integer or boolean expected", token); return Value(); // Shut up compiler warning. } } Value matchContextFieldIdentifier(int level, const Token &token) { logMatch(level, "matchContextFieldIdentifier()"); if (token.rawValue == "uri") { return Value(Context::URI); } else if (token.rawValue == "controller") { return Value(Context::CONTROLLER); } else if (token.rawValue == "response_time") { return Value(Context::RESPONSE_TIME); } else if (token.rawValue == "response_time_without_gc") { return Value(Context::RESPONSE_TIME_WITHOUT_GC); } else if (token.rawValue == "status") { return Value(Context::STATUS); } else if (token.rawValue == "status_code") { return Value(Context::STATUS_CODE); } else if (token.rawValue == "gc_time") { return Value(Context::GC_TIME); } else { raiseSyntaxError("unknown field '" + token.rawValue + "'", token); return Value(); // Shut up compiler warning. } } public: Filter(const StaticString &source, bool debug = false) : tokenizer(source, debug) { this->debug = debug; lookahead = tokenizer.getNext(); root = matchMultiExpression(0); logMatch(0, "end of data"); match(Tokenizer::END_OF_DATA); } bool run(const Context &ctx) { return root->evaluate(ctx); } }; } // namespace FilterSupport } // namespace Passenger #endif /* __cplusplus */ /********* C bindings *********/ #ifdef __cplusplus extern "C" { #endif typedef void *PassengerFilter; PassengerFilter *passenger_filter_create(const char *source, int size, char **error); void passenger_filter_free(PassengerFilter *filter); char *passenger_filter_validate(const char *source, int size); #ifdef __cplusplus } #endif #endif /* _PASSENGER_FILTER_SUPPORT_H_ */ passenger-4.0.37/ext/common/agents/LoggingAgent/LoggingServer.h000644 000765 000024 00000106316 12233035540 025067 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_LOGGING_SERVER_H_ #define _PASSENGER_LOGGING_SERVER_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; using namespace oxt; class LoggingServer: public EventedMessageServer { private: static const int MAX_LOG_SINK_CACHE_SIZE = 512; static const int GARBAGE_COLLECTION_TIMEOUT = 4500; // 1 hour 15 minutes struct LogSink; typedef boost::shared_ptr LogSinkPtr; typedef map LogSinkCache; struct LogSink { LoggingServer *server; /** * Marks how many times this LogSink is currently opened, i.e. the * number of Transaction objects currently referencing this LogSink. * @invariant * (opened == 0) == (this LogSink is in LoggingServer.inactiveLogSinks) */ int opened; /** Last time this LogSink hit an open count of 0. */ ev_tstamp lastUsed; /** Last time data was actually written to the underlying storage device. */ ev_tstamp lastFlushed; /** The amount of data that has been written to this sink so far. */ unsigned int writtenTo; /** * This LogSink's iterator inside LoggingServer.logSinkCache. */ LogSinkCache::iterator cacheIterator; /** * This LogSink's iterator inside LoggingServer.inactiveLogSinks. * Only valid when opened == 0. */ list::iterator inactiveLogSinksIterator; LogSink(LoggingServer *_server) { server = _server; opened = 0; lastUsed = ev_now(server->getLoop()); lastFlushed = lastUsed; writtenTo = 0; } virtual ~LogSink() { // We really want to flush() here but can't call virtual // functions in destructor. :( } virtual bool isRemote() const { return false; } // Default interval at which this sink should be flushed. virtual unsigned int defaultFlushInterval() const { return 15; } virtual void append(const DataStoreId &dataStoreId, const StaticString &data) { writtenTo += data.size(); } virtual bool flush() { lastFlushed = ev_now(server->getLoop()); return true; } virtual void dump(ostream &stream) const { } }; struct LogFileSink: public LogSink { string filename; FileDescriptor fd; LogFileSink(LoggingServer *server, const string &filename) : LogSink(server) { if (filename.empty()) { this->filename = "/dev/null"; } else { this->filename = filename; } fd = syscalls::open(filename.c_str(), O_CREAT | O_WRONLY | O_APPEND, 0600); if (fd == -1) { int e = errno; throw FileSystemException("Cannnot open file", e, filename); } } virtual ~LogFileSink() { flush(); } virtual void append(const DataStoreId &dataStoreId, const StaticString &data) { LogSink::append(dataStoreId, data); syscalls::write(fd, data.data(), data.size()); } virtual void dump(ostream &stream) const { stream << " * Log file: " << filename << "\n"; stream << " Opened : " << opened << "\n"; stream << " LastUsed : " << distanceOfTimeInWords((time_t) lastUsed) << " ago\n"; stream << " LastFlushed: " << distanceOfTimeInWords((time_t) lastFlushed) << " ago\n"; stream << " WrittenTo : " << writtenTo << "\n"; } }; typedef boost::shared_ptr LogFileSinkPtr; struct RemoteSink: public LogSink { /* RemoteSender compresses the data with zlib before sending it * to the server. Even including Base64 and URL encoding overhead, * this compresses the data to about 25% of its original size. * Therefore we set a buffer capacity of a little less than 4 times * the TCP maximum segment size so that we can send as much * data as possible to the server in a single TCP segment. * With the "little less" we take into account: * - HTTPS overhead. This can be as high as 2 KB. * - The fact that RemoteSink.append() might try to flush the * current buffer the current data. Empirical evidence has * shown that the data for a request transaction is usually * less than 5 KB. */ static const unsigned int BUFFER_CAPACITY = 4 * 64 * 1024 - 16 * 1024; string unionStationKey; string nodeName; string category; char buffer[BUFFER_CAPACITY]; unsigned int bufferSize; RemoteSink(LoggingServer *server, const string &unionStationKey, const string &nodeName, const string &category) : LogSink(server) { this->unionStationKey = unionStationKey; this->nodeName = nodeName; this->category = category; this->bufferSize = 0; } virtual ~RemoteSink() { flush(); } virtual bool isRemote() const { return true; } virtual unsigned int defaultFlushInterval() const { return 60; } virtual void append(const DataStoreId &dataStoreId, const StaticString &data) { LogSink::append(dataStoreId, data); if (bufferSize + data.size() > BUFFER_CAPACITY) { StaticString data2[2]; data2[0] = StaticString(buffer, bufferSize); data2[1] = data; server->remoteSender.schedule(unionStationKey, nodeName, category, data2, 2); lastFlushed = ev_now(server->getLoop()); bufferSize = 0; } else { memcpy(buffer + bufferSize, data.data(), data.size()); bufferSize += data.size(); } } virtual bool flush() { if (bufferSize > 0) { lastFlushed = ev_now(server->getLoop()); StaticString data(buffer, bufferSize); server->remoteSender.schedule(unionStationKey, nodeName, category, &data, 1); bufferSize = 0; P_DEBUG("Flushed remote sink " << inspect() << ": " << bufferSize << " bytes"); return true; } else { P_DEBUG("Flushed remote sink " << inspect() << ": 0 bytes"); return false; } } string inspect() const { return "(key=" + unionStationKey + ", node=" + nodeName + ", category=" + category + ")"; } virtual void dump(ostream &stream) const { stream << " * Remote sink\n"; stream << " Key : " << unionStationKey << "\n"; stream << " Node : " << nodeName << "\n"; stream << " Category : " << category << "\n"; stream << " Opened : " << opened << "\n"; stream << " LastUsed : " << distanceOfTimeInWords((time_t) lastUsed) << " ago\n"; stream << " LastFlushed: " << distanceOfTimeInWords((time_t) lastFlushed) << " ago\n"; stream << " WrittenTo : " << writtenTo << "\n"; stream << " BufferSize : " << bufferSize << "\n"; } }; struct Transaction { LoggingServer *server; LogSinkPtr logSink; ev_tstamp createdAt; string txnId; DataStoreId dataStoreId; unsigned int writeCount; int refcount; bool crashProtect, discarded; string data; string filters; Transaction(LoggingServer *server, ev_tstamp createdAt) { this->server = server; this->createdAt = createdAt; data.reserve(8 * 1024); } ~Transaction() { if (logSink != NULL) { if (!discarded && passesFilter()) { logSink->append(dataStoreId, data); } server->closeLogSink(logSink); } } StaticString getGroupName() const { return dataStoreId.getGroupName(); } StaticString getNodeName() const { return dataStoreId.getNodeName(); } StaticString getCategory() const { return dataStoreId.getCategory(); } void discard() { data.clear(); discarded = true; } void dump(ostream &stream) const { stream << " * Transaction " << txnId << "\n"; stream << " Created at: " << distanceOfTimeInWords((time_t) createdAt) << " ago\n"; stream << " Group : " << getGroupName() << "\n"; stream << " Node : " << getNodeName() << "\n"; stream << " Category : " << getCategory() << "\n"; stream << " Refcount : " << refcount << "\n"; } private: bool passesFilter() { if (filters.empty()) { return true; } const char *current = filters.data(); const char *end = filters.data() + filters.size(); bool result = true; FilterSupport::ContextFromLog ctx(data); // 'filters' may contain multiple filter sources, separated // by '\1' characters. Process each. while (current < end && result) { StaticString tmp(current, end - current); size_t pos = tmp.find('\1'); if (pos == string::npos) { pos = tmp.size(); } StaticString source(current, pos); FilterSupport::Filter &filter = server->compileFilter(source); result = filter.run(ctx); current = tmp.data() + pos + 1; } return result; } }; typedef boost::shared_ptr TransactionPtr; enum ClientType { UNINITIALIZED, LOGGER }; struct Client: public EventedMessageClient { string nodeName; ClientType type; char nodeId[MD5_HEX_SIZE]; /** * Set of transaction IDs opened by this client. * @invariant This is a subset of the transaction IDs in the 'transactions' member. */ set openTransactions; ScalarMessage dataReader; TransactionPtr currentTransaction; string currentTimestamp; Client(struct ev_loop *loop, const FileDescriptor &fd) : EventedMessageClient(loop, fd) { type = UNINITIALIZED; dataReader.setMaxSize(1024 * 128); } template void inspect(Stream &stream) const { stream << " * Client " << (int) fd << "\n"; stream << " Initialized : " << bool(type == LOGGER) << "\n"; stream << " Node name : " << nodeName << "\n"; stream << " Open transactions: (" << openTransactions.size() << ")"; set::const_iterator it, end = openTransactions.end(); for (it = openTransactions.begin(); it != end; it++) { stream << " " << *it; } stream << "\n"; stream << " Connection state : " << getStateName() << "\n"; stream << " Message state : " << messageServer.getStateName() << "\n"; stream << " Outbox : " << outbox.size() << " bytes\n"; } }; typedef boost::shared_ptr ClientPtr; typedef map TransactionMap; typedef boost::shared_ptr FilterPtr; RemoteSender remoteSender; ev::timer garbageCollectionTimer; ev::timer sinkFlushingTimer; ev::timer exitTimer; TransactionMap transactions; LogSinkCache logSinkCache; /** * @invariant * inactiveLogSinks is sorted from oldest to youngest (by lastTime member). * for all s in inactiveLogSinks: * s.opened == 0 * inactiveLogSinks.size() == inactiveLogSinksCount */ list inactiveLogSinks; int inactiveLogSinksCount; StringMap filters; RandomGenerator randomGenerator; bool refuseNewConnections; bool exitRequested; unsigned long long exitBeginTime; int sinkFlushInterval; string dumpFile; void sendErrorToClient(Client *client, const string &message) { client->writeArrayMessage("error", message.c_str(), NULL); logError(client, message); } bool expectingArgumentsCount(Client *client, const vector &args, unsigned int size) { if (args.size() == size) { return true; } else { sendErrorToClient(client, "Invalid number of arguments"); client->disconnect(); return false; } } bool expectingMinArgumentsCount(Client *client, const vector &args, unsigned int size) { if (args.size() >= size) { return true; } else { sendErrorToClient(client, "Invalid number of arguments"); client->disconnect(); return false; } } bool expectingLoggerType(Client *client) { if (client->type == LOGGER) { return true; } else { sendErrorToClient(client, "Client not initialized as logger"); client->disconnect(); return false; } } bool checkWhetherConnectionAreAcceptable(Client *client) { if (refuseNewConnections) { client->writeArrayMessage("server shutting down", NULL); client->disconnect(); return false; } else { return true; } } static bool getBool(const vector &args, unsigned int index, bool defaultValue = false) { if (index < args.size()) { return args[index] == "true"; } else { return defaultValue; } } static StaticString getStaticString(const vector &args, unsigned int index, const StaticString &defaultValue = "") { if (index < args.size()) { return args[index]; } else { return defaultValue; } } bool validTxnId(const StaticString &txnId) const { // must contain timestamp // must contain separator // must contain random id // must not be too large return !txnId.empty(); } bool validUnionStationKey(const StaticString &key) const { // TODO: must be hexadecimal // TODO: must not be too large return !key.empty(); } bool validLogContent(const StaticString &data) const { const char *current = data.c_str(); const char *end = current + data.size(); while (current < end) { char c = *current; if ((c < 1 && c > 126) || c == '\n' || c == '\r') { return false; } current++; } return true; } bool validTimestamp(const StaticString ×tamp) const { // TODO: must be hexadecimal // TODO: must not be too large return true; } bool supportedCategory(const StaticString &category) const { return category == "requests" || category == "processes" || category == "exceptions"; } LogSinkPtr openLogFile() { string cacheKey = "file:" + dumpFile; LogSinkPtr result; LogSinkCache::iterator it = logSinkCache.find(cacheKey); if (it == logSinkCache.end()) { trimLogSinkCache(MAX_LOG_SINK_CACHE_SIZE - 1); result = boost::make_shared(this, dumpFile); pair p = logSinkCache.insert(make_pair(cacheKey, result)); result->cacheIterator = p.first; result->opened = 1; } else { result = it->second; result->opened++; if (result->opened == 1) { inactiveLogSinks.erase(result->inactiveLogSinksIterator); inactiveLogSinksCount--; } } return result; } LogSinkPtr openRemoteSink(const StaticString &unionStationKey, const string &nodeName, const string &category) { string cacheKey = "remote:"; cacheKey.append(unionStationKey.c_str(), unionStationKey.size()); cacheKey.append(1, '\0'); cacheKey.append(nodeName); cacheKey.append(1, '\0'); cacheKey.append(category); LogSinkPtr result; LogSinkCache::iterator it = logSinkCache.find(cacheKey); if (it == logSinkCache.end()) { trimLogSinkCache(MAX_LOG_SINK_CACHE_SIZE - 1); result = boost::make_shared(this, unionStationKey, nodeName, category); pair p = logSinkCache.insert(make_pair(cacheKey, result)); result->cacheIterator = p.first; result->opened = 1; } else { result = it->second; result->opened++; if (result->opened == 1) { inactiveLogSinks.erase(result->inactiveLogSinksIterator); inactiveLogSinksCount--; } } return result; } /** * 'Closes' the given log sink. It's not actually deleted from memory; * instead it's marked as inactive and cached for later use. May be * deleted later when resources are low. * * No need to call this manually. Automatically called by Transaction's * destructor. */ void closeLogSink(const LogSinkPtr &logSink) { logSink->opened--; assert(logSink->opened >= 0); logSink->lastUsed = ev_now(getLoop()); if (logSink->opened == 0) { inactiveLogSinks.push_back(logSink); logSink->inactiveLogSinksIterator = inactiveLogSinks.end(); logSink->inactiveLogSinksIterator--; inactiveLogSinksCount++; trimLogSinkCache(MAX_LOG_SINK_CACHE_SIZE); } } /** Try to reduce the log sink cache size to the given size. */ void trimLogSinkCache(unsigned int size) { while (!inactiveLogSinks.empty() && logSinkCache.size() > size) { const LogSinkPtr logSink = inactiveLogSinks.front(); inactiveLogSinks.pop_front(); inactiveLogSinksCount--; logSinkCache.erase(logSink->cacheIterator); } } FilterSupport::Filter &compileFilter(const StaticString &source) { // TODO: garbage collect filters based on time FilterPtr filter = filters.get(source); if (filter == NULL) { filter = boost::make_shared(source); filters.set(source, filter); } return *filter; } bool writeLogEntry(Client *client, const TransactionPtr &transaction, const StaticString ×tamp, const StaticString &data) { if (transaction->discarded) { return true; } if (OXT_UNLIKELY( !validLogContent(data) )) { if (client != NULL) { sendErrorToClient(client, "Log entry data contains an invalid character."); client->disconnect(); } return false; } if (OXT_UNLIKELY( !validTimestamp(timestamp) )) { if (client != NULL) { sendErrorToClient(client, "Log entry timestamp is invalid."); client->disconnect(); } return false; } char writeCountStr[sizeof(unsigned int) * 2 + 1]; integerToHexatri(transaction->writeCount, writeCountStr); transaction->writeCount++; transaction->data.append(transaction->txnId); transaction->data.append(" "); transaction->data.append(timestamp); transaction->data.append(" "); transaction->data.append(writeCountStr); transaction->data.append(" "); transaction->data.append(data); transaction->data.append("\n"); return true; } void writeDetachEntry(Client *client, const TransactionPtr &transaction) { char timestamp[2 * sizeof(unsigned long long) + 1]; // Must use System::getUsec() here instead of ev_now() because the // precision of the time is very important. integerToHexatri(SystemTime::getUsec(), timestamp); writeDetachEntry(client, transaction, timestamp); } void writeDetachEntry(Client *client, const TransactionPtr &transaction, const StaticString ×tamp) { writeLogEntry(client, transaction, timestamp, "DETACH"); } bool requireRights(Client *client, Account::Rights rights) { if (client->messageServer.account->hasRights(rights)) { return true; } else { P_TRACE(2, "Security error: insufficient rights to execute this command."); client->writeArrayMessage("SecurityException", "Insufficient rights to execute this command.", NULL); client->disconnect(); return false; } } bool isDirectory(const string &dir, struct dirent *entry) const { #if defined(__sun__) || defined(sun) || defined(_AIX) string path = dir; path.append("/"); path.append(entry->d_name); return getFileType(path) == FT_DIRECTORY; #else return entry->d_type == DT_DIR; #endif } bool looksLikeNumber(const char *str) const { const char *current = str; while (*current != '\0') { char c = *current; if (!(c >= '0' && c <= '9')) { return false; } current++; } return true; } /* Release all inactive log sinks that have been inactive for more than * GARBAGE_COLLECTION_TIMEOUT seconds. */ void releaseInactiveLogSinks(ev_tstamp now) { bool done = false; while (!done && !inactiveLogSinks.empty()) { const LogSinkPtr logSink = inactiveLogSinks.front(); if (now - logSink->lastUsed >= GARBAGE_COLLECTION_TIMEOUT) { inactiveLogSinks.pop_front(); inactiveLogSinksCount--; logSinkCache.erase(logSink->cacheIterator); } else { done = true; } } } void garbageCollect(ev::timer &timer, int revents) { P_DEBUG("Garbage collection time"); releaseInactiveLogSinks(ev_now(getLoop())); } ev_tstamp getFlushInterval(const LogSink *sink) const { if (sinkFlushInterval == 0) { return sink->defaultFlushInterval(); } else { return sinkFlushInterval; } } void sinkFlushTimeout(ev::timer &timer, int revents) { P_DEBUG("Flushing all sinks"); LogSinkCache::iterator it; LogSinkCache::iterator end = logSinkCache.end(); ev_tstamp now = ev_now(getLoop()); for (it = logSinkCache.begin(); it != end; it++) { LogSink *sink = it->second.get(); if (now - sink->lastFlushed >= getFlushInterval(sink)) { sink->flush(); } } } void flushAllSinks() { P_TRACE(2, "Flushing all sinks"); LogSinkCache::iterator it; LogSinkCache::iterator end = logSinkCache.end(); for (it = logSinkCache.begin(); it != end; it++) { LogSink *sink = it->second.get(); sink->flush(); } } void exitTimerTimeout(ev::timer &timer, int revents) { if (SystemTime::getMsec() >= exitBeginTime + 5000) { exitTimer.stop(); exitRequested = false; refuseNewConnections = false; ev_break(getLoop(), EVBREAK_ONE); } } protected: virtual EventedClient *createClient(const FileDescriptor &fd) { return new Client(getLoop(), fd); } virtual bool onMessageReceived(EventedMessageClient *_client, const vector &args) { Client *client = (Client *) _client; if (args[0] == "log") { if (OXT_UNLIKELY( !expectingArgumentsCount(client, args, 3) || !expectingLoggerType(client) )) { return true; } string txnId = args[1]; string timestamp = args[2]; TransactionMap::iterator it = transactions.find(txnId); if (OXT_UNLIKELY( it == transactions.end() )) { sendErrorToClient(client, "Cannot log data: transaction does not exist"); client->disconnect(); } else { set::iterator sit = client->openTransactions.find(txnId); if (OXT_UNLIKELY( sit == client->openTransactions.end() )) { sendErrorToClient(client, "Cannot log data: transaction not opened in this connection"); client->disconnect(); return true; } // Expecting the log data in a scalar message. client->currentTransaction = it->second; client->currentTimestamp = timestamp; return false; } } else if (args[0] == "openTransaction") { if (OXT_UNLIKELY( !expectingMinArgumentsCount(client, args, 7) || !expectingLoggerType(client) )) { return true; } string txnId = args[1]; StaticString groupName = args[2]; StaticString nodeName = args[3]; StaticString category = args[4]; StaticString timestamp = args[5]; StaticString unionStationKey = args[6]; bool crashProtect = getBool(args, 7, true); bool ack = getBool(args, 8, false); StaticString filters = getStaticString(args, 9); if (OXT_UNLIKELY( !validTxnId(txnId) )) { sendErrorToClient(client, "Invalid transaction ID format"); client->disconnect(); return true; } if (!unionStationKey.empty() && OXT_UNLIKELY( !validUnionStationKey(unionStationKey) )) { sendErrorToClient(client, "Invalid Union Station key format"); client->disconnect(); return true; } if (OXT_UNLIKELY( client->openTransactions.find(txnId) != client->openTransactions.end() )) { sendErrorToClient(client, "Cannot open transaction: transaction already opened in this connection"); client->disconnect(); return true; } const char *nodeId; if (nodeName.empty()) { nodeName = client->nodeName; nodeId = client->nodeId; } else { nodeId = NULL; } TransactionMap::iterator it = transactions.find(txnId); TransactionPtr transaction; if (it == transactions.end()) { if (OXT_UNLIKELY( !supportedCategory(category) )) { sendErrorToClient(client, "Unsupported category"); client->disconnect(); return true; } transaction = boost::make_shared(this, ev_now(getLoop())); if (unionStationKey.empty() || unionStationKey == "-") { char tempNodeId[MD5_HEX_SIZE]; if (nodeId == NULL) { md5_state_t state; md5_byte_t digest[MD5_SIZE]; md5_init(&state); md5_append(&state, (const md5_byte_t *) nodeName.data(), nodeName.size()); md5_finish(&state, digest); toHex(StaticString((const char *) digest, MD5_SIZE), tempNodeId); nodeId = tempNodeId; } transaction->logSink = openLogFile(); } else { transaction->logSink = openRemoteSink(unionStationKey, client->nodeName, category); } transaction->txnId = txnId; transaction->dataStoreId = DataStoreId(groupName, nodeName, category); transaction->writeCount = 0; transaction->refcount = 0; transaction->crashProtect = crashProtect; if (!filters.empty()) { transaction->filters = filters; } transaction->discarded = false; transactions.insert(make_pair(txnId, transaction)); } else { transaction = it->second; if (OXT_UNLIKELY( transaction->getGroupName() != groupName )) { sendErrorToClient(client, "Cannot open transaction: transaction already opened with a " "different group name ('" + transaction->getGroupName() + "' vs '" + groupName + "')"); client->disconnect(); return true; } if (OXT_UNLIKELY( transaction->getNodeName() != nodeName )) { sendErrorToClient(client, "Cannot open transaction: transaction already opened with a different node name"); client->disconnect(); return true; } if (OXT_UNLIKELY( transaction->getCategory() != category )) { sendErrorToClient(client, "Cannot open transaction: transaction already opened with a different category name"); client->disconnect(); return true; } } client->openTransactions.insert(txnId); transaction->refcount++; writeLogEntry(client, transaction, timestamp, "ATTACH"); if (ack) { client->writeArrayMessage("ok", NULL); } } else if (args[0] == "closeTransaction") { if (OXT_UNLIKELY( !expectingMinArgumentsCount(client, args, 3) || !expectingLoggerType(client) )) { return true; } string txnId = args[1]; StaticString timestamp = args[2]; bool ack = getBool(args, 3, false); TransactionMap::iterator it = transactions.find(txnId); if (OXT_UNLIKELY( it == transactions.end() )) { sendErrorToClient(client, "Cannot close transaction " + txnId + ": transaction does not exist"); client->disconnect(); } else { TransactionPtr &transaction = it->second; set::const_iterator sit = client->openTransactions.find(txnId); if (OXT_UNLIKELY( sit == client->openTransactions.end() )) { sendErrorToClient(client, "Cannot close transaction " + txnId + ": transaction not opened in this connection"); client->disconnect(); return true; } else { client->openTransactions.erase(sit); } writeDetachEntry(client, transaction, timestamp); transaction->refcount--; assert(transaction->refcount >= 0); if (transaction->refcount == 0) { transactions.erase(it); } } if (ack) { client->writeArrayMessage("ok", NULL); } } else if (args[0] == "init") { if (OXT_UNLIKELY( client->type != UNINITIALIZED )) { sendErrorToClient(client, "Already initialized"); client->disconnect(); return true; } if (OXT_UNLIKELY( !expectingArgumentsCount(client, args, 2) )) { return true; } if (OXT_UNLIKELY( !checkWhetherConnectionAreAcceptable(client) )) { return true; } StaticString nodeName = args[1]; client->nodeName = nodeName; md5_state_t state; md5_byte_t digest[MD5_SIZE]; md5_init(&state); md5_append(&state, (const md5_byte_t *) nodeName.data(), nodeName.size()); md5_finish(&state, digest); toHex(StaticString((const char *) digest, MD5_SIZE), client->nodeId); client->type = LOGGER; client->writeArrayMessage("ok", NULL); } else if (args[0] == "flush") { flushAllSinks(); client->writeArrayMessage("ok", NULL); } else if (args[0] == "info") { stringstream stream; dump(stream); client->writeArrayMessage("info", stream.str().c_str(), NULL); } else if (args[0] == "ping") { client->writeArrayMessage("pong", NULL); } else if (args[0] == "exit") { if (!requireRights(client, Account::EXIT)) { client->disconnect(); return true; } if (args.size() == 2 && args[1] == "immediately") { // Immediate exit. ev_break(getLoop(), EVBREAK_ONE); } else if (args.size() == 2 && args[1] == "semi-gracefully") { // Semi-graceful exit: refuse new connections, shut down // a few seconds after the last client has disconnected. refuseNewConnections = true; exitRequested = true; } else { // Graceful exit: shut down a few seconds after the // last client has disconnected. client->writeArrayMessage("Passed security", NULL); client->writeArrayMessage("exit command received", NULL); exitRequested = true; } client->disconnect(); } else { sendErrorToClient(client, "Unknown command '" + args[0] + "'"); client->disconnect(); } return true; } virtual pair onOtherDataReceived(EventedMessageClient *_client, const char *data, size_t size) { // In here we read the scalar message that's expected to come // after the "log" command. Client *client = (Client *) _client; size_t consumed = client->dataReader.feed(data, size); if (client->dataReader.done()) { writeLogEntry(client, client->currentTransaction, client->currentTimestamp, client->dataReader.value()); client->currentTransaction.reset(); client->dataReader.reset(); return make_pair(consumed, true); } else { return make_pair(consumed, false); } } virtual void onNewClient(EventedClient *client) { if (exitRequested && exitTimer.is_active()) { exitTimer.stop(); } EventedMessageServer::onNewClient(client); } virtual void onClientDisconnected(EventedClient *_client) { EventedMessageServer::onClientDisconnected(_client); Client *client = (Client *) _client; set::const_iterator sit; set::const_iterator send = client->openTransactions.end(); // Close any transactions that this client had opened. for (sit = client->openTransactions.begin(); sit != send; sit++) { const string &txnId = *sit; TransactionMap::iterator it = transactions.find(txnId); if (OXT_UNLIKELY( it == transactions.end() )) { P_ERROR("Bug: client->openTransactions is not a subset of this->transactions!"); abort(); } TransactionPtr &transaction = it->second; if (transaction->crashProtect) { writeDetachEntry(client, transaction); } else { transaction->discard(); } transaction->refcount--; assert(transaction->refcount >= 0); if (transaction->refcount == 0) { transactions.erase(it); } } client->openTransactions.clear(); // Possibly start exit timer. if (exitRequested && getClients().empty()) { exitTimer.start(); /* Using SystemTime here instead of setting a correct * timeout directly on the timer, so that we can * manipulate the clock in LoggingServer unit tests. */ exitBeginTime = SystemTime::getMsec(); } } public: LoggingServer(struct ev_loop *loop, FileDescriptor fd, const AccountsDatabasePtr &accountsDatabase, const VariantMap &options = VariantMap()) : EventedMessageServer(loop, fd, accountsDatabase), remoteSender( options.get("union_station_gateway_address", false, DEFAULT_UNION_STATION_GATEWAY_ADDRESS), options.getInt("union_station_gateway_port", false, DEFAULT_UNION_STATION_GATEWAY_PORT), options.get("union_station_gateway_cert", false, ""), options.get("union_station_proxy_address", false)), garbageCollectionTimer(loop), sinkFlushingTimer(loop), exitTimer(loop), dumpFile(options.get("analytics_dump_file", false, "/dev/null")) { int sinkFlushTimerInterval = options.getInt("analytics_sink_flush_timer_interval", false, 15); sinkFlushInterval = options.getInt("analytics_sink_flush_interval", false, 0); garbageCollectionTimer.set(this); garbageCollectionTimer.start(GARBAGE_COLLECTION_TIMEOUT, GARBAGE_COLLECTION_TIMEOUT); sinkFlushingTimer.set(this); sinkFlushingTimer.start(sinkFlushTimerInterval, sinkFlushTimerInterval); exitTimer.set(this); exitTimer.set(0.05, 0.05); refuseNewConnections = false; exitRequested = false; inactiveLogSinksCount = 0; } ~LoggingServer() { TransactionMap::iterator it, end = transactions.end(); for (it = transactions.begin(); it != end; it++) { TransactionPtr &transaction = it->second; if (transaction->crashProtect) { writeDetachEntry(NULL, transaction); } else { transaction->discard(); } } // Invoke destructors, causing all transactions and log sinks to // be flushed before RemoteSender is being destroyed. transactions.clear(); logSinkCache.clear(); inactiveLogSinks.clear(); } void dump(ostream &stream) const { TransactionMap::const_iterator it; TransactionMap::const_iterator end = transactions.end(); ClientSet::const_iterator cit, cend = getClients().end(); stream << "Clients:\n"; stream << " Count: " << getClients().size() << "\n"; for (cit = getClients().begin(); cit != cend; cit++) { const Client *client = static_cast(*cit); client->inspect(stream); } stream << "\n"; stream << "RemoteSender:\n"; remoteSender.inspect(stream); stream << "\n"; LogSinkCache::const_iterator sit; LogSinkCache::const_iterator send = logSinkCache.end(); stream << "Open log sinks:\n"; stream << " Count: " << logSinkCache.size() << " (of which " << inactiveLogSinksCount << " inactive)\n"; for (sit = logSinkCache.begin(); sit != send; sit++) { const LogSinkPtr &logSink = sit->second; logSink->dump(stream); } stream << "\n"; stream << "Open transactions:\n"; stream << " Count: " << transactions.size() << "\n"; for (it = transactions.begin(); it != end; it++) { const TransactionPtr &transaction = it->second; transaction->dump(stream); } } }; typedef boost::shared_ptr LoggingServerPtr; } // namespace Passenger #endif /* _PASSENGER_LOGGING_SERVER_H_ */ passenger-4.0.37/ext/common/agents/LoggingAgent/Main.cpp000644 000765 000024 00000025046 12233035540 023531 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace oxt; using namespace Passenger; /***** Agent options *****/ static VariantMap agentsOptions; static string passengerRoot; static string socketAddress; static string adminSocketAddress; static string password; static string username; static string groupname; static string adminToolStatusPassword; /***** Constants and working objects *****/ static const int MESSAGE_SERVER_THREAD_STACK_SIZE = 128 * 1024; struct WorkingObjects { ResourceLocatorPtr resourceLocator; FileDescriptor serverSocketFd; AccountsDatabasePtr adminAccountsDatabase; MessageServerPtr adminServer; boost::shared_ptr adminServerThread; AccountsDatabasePtr accountsDatabase; LoggingServerPtr loggingServer; ~WorkingObjects() { // Stop thread before destroying anything else. if (adminServerThread != NULL) { adminServerThread->interrupt_and_join(); } } }; static struct ev_loop *eventLoop = NULL; static LoggingServer *loggingServer = NULL; static int exitCode = 0; /***** Functions *****/ void feedbackFdBecameReadable(ev::io &watcher, int revents) { /* This event indicates that the watchdog has been killed. * In this case we'll kill all descendant * processes and exit. There's no point in keeping this agent * running because we can't detect when the web server exits, * and because this agent doesn't own the server instance * directory. As soon as passenger-status is run, the server * instance directory will be cleaned up, making this agent's * services inaccessible. */ syscalls::killpg(getpgrp(), SIGKILL); _exit(2); // In case killpg() fails. } static string myself() { struct passwd *entry = getpwuid(geteuid()); if (entry != NULL) { return entry->pw_name; } else { throw NonExistentUserException(string("The current user, UID ") + toString(geteuid()) + ", doesn't have a corresponding " + "entry in the system's user database. Please fix your " + "system's user database first."); } } static void initializeBareEssentials(int argc, char *argv[]) { agentsOptions = initializeAgent(argc, argv, "PassengerLoggingAgent"); curl_global_init(CURL_GLOBAL_ALL); if (agentsOptions.get("test_binary", false) == "1") { printf("PASS\n"); exit(0); } } static string findUnionStationGatewayCert(const ResourceLocator &locator, const string &cert) { if (cert.empty()) { return locator.getResourcesDir() + "/union_station_gateway.crt"; } else if (cert != "-") { return cert; } else { return ""; } } static void initializeOptions(WorkingObjects &wo) { passengerRoot = agentsOptions.get("passenger_root"); socketAddress = agentsOptions.get("logging_agent_address"); adminSocketAddress = agentsOptions.get("logging_agent_admin_address"); password = agentsOptions.get("logging_agent_password"); username = agentsOptions.get("analytics_log_user", false, myself()); groupname = agentsOptions.get("analytics_log_group", false); adminToolStatusPassword = agentsOptions.get("admin_tool_status_password"); wo.resourceLocator = boost::make_shared(passengerRoot); agentsOptions.set("union_station_gateway_cert", findUnionStationGatewayCert( *wo.resourceLocator, agentsOptions.get("union_station_gateway_cert", false))); } static void initializePrivilegedWorkingObjects(WorkingObjects &wo) { wo.serverSocketFd = createServer(socketAddress.c_str()); if (getSocketAddressType(socketAddress) == SAT_UNIX) { int ret; do { ret = chmod(parseUnixSocketAddress(socketAddress).c_str(), S_ISVTX | S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH); } while (ret == -1 && errno == EINTR); } wo.adminAccountsDatabase = boost::make_shared(); wo.adminAccountsDatabase->add("_passenger-status", adminToolStatusPassword, false); wo.adminServer = boost::make_shared(parseUnixSocketAddress(adminSocketAddress), wo.adminAccountsDatabase); } static void lowerPrivilege(const string &username, const struct passwd *user, gid_t gid) { int e; if (initgroups(username.c_str(), gid) != 0) { e = errno; P_WARN("WARNING: Unable to set supplementary groups for " << "PassengerLoggingAgent: " << strerror(e) << " (" << e << ")"); } if (setgid(gid) != 0) { e = errno; P_WARN("WARNING: Unable to lower PassengerLoggingAgent's " "privilege to that of user '" << username << "': cannot set group ID to " << gid << ": " << strerror(e) << " (" << e << ")"); } if (setuid(user->pw_uid) != 0) { e = errno; P_WARN("WARNING: Unable to lower PassengerLoggingAgent's " "privilege to that of user '" << username << "': cannot set user ID: " << strerror(e) << " (" << e << ")"); } setenv("HOME", user->pw_dir, 1); } static void maybeLowerPrivilege() { struct passwd *user; gid_t gid; /* Sanity check user accounts. */ user = getpwnam(username.c_str()); if (user == NULL) { throw NonExistentUserException(string("The configuration option ") + "'PassengerAnalyticsLogUser' (Apache) or " + "'passenger_analytics_log_user' (Nginx) was set to '" + username + "', but this user doesn't exist. Please fix " + "the configuration option."); } if (groupname.empty()) { gid = user->pw_gid; groupname = getGroupName(user->pw_gid); } else { gid = lookupGid(groupname); if (gid == (gid_t) -1) { throw NonExistentGroupException(string("The configuration option ") + "'PassengerAnalyticsLogGroup' (Apache) or " + "'passenger_analytics_log_group' (Nginx) was set to '" + groupname + "', but this group doesn't exist. Please fix " + "the configuration option."); } } /* Now's a good time to lower the privilege. */ if (geteuid() == 0) { lowerPrivilege(username, user, gid); } } static struct ev_loop * createEventLoop() { struct ev_loop *loop; // libev doesn't like choosing epoll and kqueue because the author thinks they're broken, // so let's try to force it. loop = ev_default_loop(EVBACKEND_EPOLL); if (loop == NULL) { loop = ev_default_loop(EVBACKEND_KQUEUE); } if (loop == NULL) { loop = ev_default_loop(0); } if (loop == NULL) { throw RuntimeException("Cannot create an event loop"); } else { return loop; } } static void initializeUnprivilegedWorkingObjects(WorkingObjects &wo) { eventLoop = createEventLoop(); wo.accountsDatabase = boost::make_shared(); wo.accountsDatabase->add("logging", password, false); wo.loggingServer = boost::make_shared(eventLoop, wo.serverSocketFd, wo.accountsDatabase, agentsOptions); loggingServer = wo.loggingServer.get(); wo.adminServer->addHandler(boost::make_shared(wo.loggingServer)); boost::function adminServerFunc = boost::bind(&MessageServer::mainLoop, wo.adminServer.get()); wo.adminServerThread = boost::make_shared( boost::bind(runAndPrintExceptions, adminServerFunc, true), "AdminServer thread", MESSAGE_SERVER_THREAD_STACK_SIZE ); } void caughtExitSignal(ev::sig &watcher, int revents) { P_INFO("Caught signal, exiting..."); ev_break(eventLoop, EVBREAK_ONE); /* We only consider the "exit" command to be a graceful way to shut down * the logging agent, so upon receiving an exit signal we want to return * a non-zero exit code. This is because we want the watchdog to restart * the logging agent when it's killed by SIGTERM. */ exitCode = 1; } void printInfo(ev::sig &watcher, int revents) { cerr << "---------- Begin LoggingAgent status ----------\n"; loggingServer->dump(cerr); cerr.flush(); cerr << "---------- End LoggingAgent status ----------\n"; } static void runMainLoop(WorkingObjects &wo) { ev::io feedbackFdWatcher(eventLoop); ev::sig sigintWatcher(eventLoop); ev::sig sigtermWatcher(eventLoop); ev::sig sigquitWatcher(eventLoop); sigintWatcher.set<&caughtExitSignal>(); sigintWatcher.start(SIGINT); sigtermWatcher.set<&caughtExitSignal>(); sigtermWatcher.start(SIGTERM); sigquitWatcher.set<&printInfo>(); sigquitWatcher.start(SIGQUIT); P_WARN("PassengerLoggingAgent online, listening at " << socketAddress); if (feedbackFdAvailable()) { feedbackFdWatcher.set<&feedbackFdBecameReadable>(); feedbackFdWatcher.start(FEEDBACK_FD, ev::READ); writeArrayMessage(FEEDBACK_FD, "initialized", NULL); } ev_run(eventLoop, 0); } int main(int argc, char *argv[]) { initializeBareEssentials(argc, argv); P_DEBUG("Starting PassengerLoggingAgent..."); try { TRACE_POINT(); WorkingObjects wo; initializeOptions(wo); initializePrivilegedWorkingObjects(wo); maybeLowerPrivilege(); initializeUnprivilegedWorkingObjects(wo); runMainLoop(wo); P_DEBUG("Logging agent exiting with code " << exitCode << "."); return exitCode; } catch (const tracable_exception &e) { P_ERROR("*** ERROR: " << e.what() << "\n" << e.backtrace()); return 1; } } passenger-4.0.37/ext/common/agents/LoggingAgent/RemoteSender.h000644 000765 000024 00000035651 12233035540 024711 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_REMOTE_SENDER_H_ #define _PASSENGER_REMOTE_SENDER_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; using namespace oxt; class RemoteSender { private: struct Item { bool exit; bool compressed; string unionStationKey; string nodeName; string category; string data; Item() { exit = false; compressed = false; } }; class Server { private: string ip; unsigned short port; string certificate; const CurlProxyInfo *proxyInfo; CURL *curl; struct curl_slist *headers; char lastErrorMessage[CURL_ERROR_SIZE]; string hostHeader; string responseBody; string pingURL; string sinkURL; void resetConnection() { if (curl != NULL) { #ifdef HAS_CURL_EASY_RESET curl_easy_reset(curl); #else curl_easy_cleanup(curl); curl = NULL; #endif } if (curl == NULL) { curl = curl_easy_init(); if (curl == NULL) { throw IOException("Unable to create a CURL handle"); } } curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, lastErrorMessage); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curlDataReceived); curl_easy_setopt(curl, CURLOPT_WRITEDATA, this); if (certificate.empty()) { curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); } else { curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1); curl_easy_setopt(curl, CURLOPT_CAINFO, certificate.c_str()); } /* No host name verification because Curl thinks the * host name is the IP address. But if we have the * certificate then it doesn't matter. */ curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); setCurlProxy(curl, *proxyInfo); responseBody.clear(); } void prepareRequest(const string &url) { curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); responseBody.clear(); } static size_t curlDataReceived(void *buffer, size_t size, size_t nmemb, void *userData) { Server *self = (Server *) userData; self->responseBody.append((const char *) buffer, size * nmemb); return size * nmemb; } public: Server(const string &ip, const string &hostName, unsigned short port, const string &cert, const CurlProxyInfo *proxyInfo) { this->ip = ip; this->port = port; certificate = cert; this->proxyInfo = proxyInfo; hostHeader = "Host: " + hostName; headers = NULL; headers = curl_slist_append(headers, hostHeader.c_str()); if (headers == NULL) { throw IOException("Unable to create a CURL linked list"); } // Older libcurl versions didn't strdup() any option // strings so we need to keep these in memory. pingURL = string("https://") + ip + ":" + toString(port) + "/ping"; sinkURL = string("https://") + ip + ":" + toString(port) + "/sink"; curl = NULL; resetConnection(); } ~Server() { if (curl != NULL) { curl_easy_cleanup(curl); } curl_slist_free_all(headers); } string name() const { return ip + ":" + toString(port); } bool ping() { P_DEBUG("Pinging Union Station gateway " << ip << ":" << port); ScopeGuard guard(boost::bind(&Server::resetConnection, this)); prepareRequest(pingURL); curl_easy_setopt(curl, CURLOPT_HTTPGET, 1); if (curl_easy_perform(curl) != 0) { P_DEBUG("Could not ping Union Station gateway server " << ip << ": " << lastErrorMessage); return false; } if (responseBody == "pong") { guard.clear(); return true; } else { P_DEBUG("Union Station gateway server " << ip << " returned an unexpected ping message: " << responseBody); return false; } } bool send(const Item &item) { ScopeGuard guard(boost::bind(&Server::resetConnection, this)); prepareRequest(sinkURL); struct curl_httppost *post = NULL; struct curl_httppost *last = NULL; string base64_data; curl_formadd(&post, &last, CURLFORM_PTRNAME, "key", CURLFORM_PTRCONTENTS, item.unionStationKey.c_str(), CURLFORM_CONTENTSLENGTH, (long) item.unionStationKey.size(), CURLFORM_END); curl_formadd(&post, &last, CURLFORM_PTRNAME, "node_name", CURLFORM_PTRCONTENTS, item.nodeName.c_str(), CURLFORM_CONTENTSLENGTH, (long) item.nodeName.size(), CURLFORM_END); curl_formadd(&post, &last, CURLFORM_PTRNAME, "category", CURLFORM_PTRCONTENTS, item.category.c_str(), CURLFORM_CONTENTSLENGTH, (long) item.category.size(), CURLFORM_END); if (item.compressed) { base64_data = Base64::encode(item.data); curl_formadd(&post, &last, CURLFORM_PTRNAME, "data", CURLFORM_PTRCONTENTS, base64_data.c_str(), CURLFORM_CONTENTSLENGTH, (long) base64_data.size(), CURLFORM_END); curl_formadd(&post, &last, CURLFORM_PTRNAME, "compressed", CURLFORM_PTRCONTENTS, "1", CURLFORM_END); } else { curl_formadd(&post, &last, CURLFORM_PTRNAME, "data", CURLFORM_PTRCONTENTS, item.data.c_str(), CURLFORM_CONTENTSLENGTH, (long) item.data.size(), CURLFORM_END); } curl_easy_setopt(curl, CURLOPT_HTTPGET, 0); curl_easy_setopt(curl, CURLOPT_HTTPPOST, post); P_DEBUG("Sending Union Station packet: key=" << item.unionStationKey << ", node=" << item.nodeName << ", category=" << item.category << ", compressedDataSize=" << item.data.size()); CURLcode code = curl_easy_perform(curl); curl_formfree(post); if (code == CURLE_OK) { guard.clear(); // TODO: check response return true; } else { P_DEBUG("Could not send data to Union Station gateway server " << ip << ": " << lastErrorMessage); return false; } } }; typedef boost::shared_ptr ServerPtr; string gatewayAddress; unsigned short gatewayPort; string certificate; CurlProxyInfo proxyInfo; BlockingQueue queue; oxt::thread *thr; mutable boost::mutex syncher; list servers; time_t nextCheckupTime; unsigned int packetsSent, packetsDropped; void threadMain() { ScopeGuard guard(boost::bind(&RemoteSender::freeThreadData, this)); while (true) { Item item; bool hasItem; if (firstStarted()) { item = queue.get(); hasItem = true; } else { hasItem = queue.timedGet(item, msecUntilNextCheckup()); } if (hasItem) { if (item.exit) { return; } else { if (timeForCheckup()) { recheckServers(); } sendOut(item); } } else if (timeForCheckup()) { recheckServers(); } } } bool firstStarted() const { boost::lock_guard l(syncher); return nextCheckupTime == 0; } void recheckServers() { P_INFO("Rechecking Union Station gateway servers (" << gatewayAddress << ")..."); vector ips; vector::const_iterator it; list servers; string hostName; bool someServersAreDown = false; ips = resolveHostname(gatewayAddress, gatewayPort); P_INFO(ips.size() << " Union Station gateway servers found"); for (it = ips.begin(); it != ips.end(); it++) { ServerPtr server = boost::make_shared(*it, gatewayAddress, gatewayPort, certificate, &proxyInfo); if (server->ping()) { servers.push_back(server); } else { someServersAreDown = true; } } P_INFO(servers.size() << " Union Station gateway servers are up"); if (servers.empty()) { scheduleNextCheckup(5 * 60); } else if (someServersAreDown) { scheduleNextCheckup(60 * 60); } else { scheduleNextCheckup(3 * 60 * 60); } boost::lock_guard l(syncher); this->servers = servers; } void freeThreadData() { boost::lock_guard l(syncher); servers.clear(); // Invoke destructors inside this thread. } /** * Schedules the next checkup to be run after the given number * of seconds, unless there's already a checkup scheduled for * earlier. */ void scheduleNextCheckup(unsigned int seconds) { time_t now = SystemTime::get(); if (now >= nextCheckupTime || (time_t) (now + seconds) < nextCheckupTime) { nextCheckupTime = now + seconds; P_DEBUG("Next checkup time in about " << seconds << " seconds"); } } unsigned int msecUntilNextCheckup() const { boost::lock_guard l(syncher); time_t now = SystemTime::get(); if (now >= nextCheckupTime) { return 0; } else { return (nextCheckupTime - now) * 1000; } } bool timeForCheckup() const { boost::lock_guard l(syncher); return SystemTime::get() >= nextCheckupTime; } void sendOut(const Item &item) { boost::unique_lock l(syncher); bool sent = false; bool someServersWentDown = false; while (!sent && !servers.empty()) { // Pick first available server and put it on the back of the list // for round-robin load balancing. ServerPtr server = servers.front(); l.unlock(); if (server->send(item)) { l.lock(); servers.pop_front(); servers.push_back(server); sent = true; packetsSent++; } else { l.lock(); servers.pop_front(); someServersWentDown = true; packetsDropped++; } } if (someServersWentDown) { if (servers.empty()) { scheduleNextCheckup(5 * 60); } else { scheduleNextCheckup(60 * 60); } } /* If all servers went down then all items in the queue will be * effectively dropped until after the next checkup has detected * servers that are up. */ if (!sent) { P_WARN("Dropping Union Station packet because no servers are available: " "key=" << item.unionStationKey << ", node=" << item.nodeName << ", category=" << item.category << ", compressedDataSize=" << item.data.size()); } } bool compress(const StaticString data[], unsigned int count, string &output) { if (count == 0) { StaticString newdata; return compress(&newdata, 1, output); } unsigned char out[128 * 1024]; z_stream strm; int ret, flush; unsigned int i, have; strm.zalloc = Z_NULL; strm.zfree = Z_NULL; strm.opaque = Z_NULL; ret = deflateInit(&strm, Z_DEFAULT_COMPRESSION); if (ret != Z_OK) { return false; } for (i = 0; i < count; i++) { strm.avail_in = data[i].size(); strm.next_in = (unsigned char *) data[i].c_str(); flush = (i == count - 1) ? Z_FINISH : Z_NO_FLUSH; do { strm.avail_out = sizeof(out); strm.next_out = out; ret = deflate(&strm, flush); assert(ret != Z_STREAM_ERROR); have = sizeof(out) - strm.avail_out; output.append((const char *) out, have); } while (strm.avail_out == 0); assert(strm.avail_in == 0); } assert(ret == Z_STREAM_END); deflateEnd(&strm); return true; } public: RemoteSender(const string &gatewayAddress, unsigned short gatewayPort, const string &certificate, const string &proxyAddress) : queue(1024) { TRACE_POINT(); this->gatewayAddress = gatewayAddress; this->gatewayPort = gatewayPort; this->certificate = certificate; try { this->proxyInfo = prepareCurlProxy(proxyAddress); } catch (const ArgumentException &e) { throw RuntimeException("Invalid Union Station proxy address \"" + proxyAddress + "\": " + e.what()); } nextCheckupTime = 0; packetsSent = 0; packetsDropped = 0; thr = new oxt::thread( boost::bind(&RemoteSender::threadMain, this), "RemoteSender thread", 1024 * 512 ); } ~RemoteSender() { Item item; item.exit = true; queue.add(item); /* Wait until the thread sends out all queued items. * If this cannot be done within a short amount of time, * e.g. because all servers are down, then we'll get killed * by the watchdog anyway. */ thr->join(); delete thr; } void schedule(const string &unionStationKey, const StaticString &nodeName, const StaticString &category, const StaticString data[], unsigned int count) { Item item; item.unionStationKey = unionStationKey; item.nodeName = nodeName; item.category = category; if (compress(data, count, item.data)) { item.compressed = true; } else { size_t size = 0; unsigned int i; for (i = 0; i < count; i++) { size += data[i].size(); } item.data.reserve(size); for (i = 0; i < count; i++) { item.data.append(data[i].c_str(), data[i].size()); } } P_DEBUG("Scheduling Union Station packet: key=" << unionStationKey << ", node=" << nodeName << ", category=" << category << ", compressedDataSize=" << item.data.size()); if (!queue.tryAdd(item)) { P_WARN("The Union Station gateway isn't responding quickly enough; dropping packet."); boost::lock_guard l(syncher); packetsDropped++; } } unsigned int queued() const { return queue.size(); } template void inspect(Stream &stream) const { boost::lock_guard l(syncher); stream << " Available servers (" << servers.size() << "): "; foreach (const ServerPtr server, servers) { stream << server->name() << " "; } stream << "\n"; stream << " Items in queue: " << queue.size() << "\n"; stream << " Packets sent out so far: " << packetsSent << "\n"; stream << " Packets dropped out so far: " << packetsDropped << "\n"; stream << " Next server checkup time: "; if (nextCheckupTime == 0) { stream << "not yet scheduled, waiting for first packet\n"; } else { stream << "in " << distanceOfTimeInWords(nextCheckupTime) << "\n"; } } }; } // namespace Passenger #endif /* _PASSENGER_REMOTE_SENDER_H_ */ passenger-4.0.37/ext/common/agents/HelperAgent/AgentOptions.h000644 000765 000024 00000007465 12233035540 024562 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_HELPER_AGENT_OPTIONS_H_ #define _PASSENGER_HELPER_AGENT_OPTIONS_H_ #include #include #include #include namespace Passenger { using namespace std; using namespace boost; struct AgentOptions: public VariantMap { pid_t webServerPid; string serverInstanceDir; string tempDir; bool userSwitching; string defaultUser; string defaultGroup; string passengerRoot; string defaultRubyCommand; unsigned int generationNumber; unsigned int maxPoolSize; unsigned int poolIdleTime; string requestSocketFilename; string requestSocketPassword; string adminSocketAddress; string exitPassword; string loggingAgentAddress; string loggingAgentPassword; string adminToolStatusPassword; vector prestartUrls; bool testBinary; string requestSocketLink; AgentOptions() { } AgentOptions(const VariantMap &options) : VariantMap(options) { testBinary = options.get("test_binary", false) == "1"; if (testBinary) { return; } // Required options for which a default is already set by the Watchdog. passengerRoot = options.get("passenger_root"); tempDir = options.get("temp_dir"); userSwitching = options.getBool("user_switching"); defaultRubyCommand = options.get("default_ruby"); defaultUser = options.get("default_user"); defaultGroup = options.get("default_group"); maxPoolSize = options.getInt("max_pool_size"); poolIdleTime = options.getInt("pool_idle_time"); // Required options only set by the Watchdog. webServerPid = options.getPid("web_server_pid"); serverInstanceDir = options.get("server_instance_dir"); generationNumber = options.getInt("generation_number"); requestSocketFilename = options.get("request_socket_filename"); requestSocketPassword = options.get("request_socket_password"); if (requestSocketPassword == "-") { requestSocketPassword = ""; } adminSocketAddress = options.get("helper_agent_admin_socket_address"); exitPassword = options.get("helper_agent_exit_password"); loggingAgentAddress = options.get("logging_agent_address"); loggingAgentPassword = options.get("logging_agent_password"); adminToolStatusPassword = options.get("admin_tool_status_password"); // Optional options. prestartUrls = options.getStrSet("prestart_urls", false); requestSocketLink = options.get("request_socket_link", false); } }; typedef boost::shared_ptr AgentOptionsPtr; } // namespace Passenger #endif /* _PASSENGER_HELPER_AGENT_OPTIONS_H_ */ passenger-4.0.37/ext/common/agents/HelperAgent/FileBackedPipe.h000644 000765 000024 00000047646 12233035540 024744 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_FILE_BACKED_PIPE_H_ #define _PASSENGER_FILE_BACKED_PIPE_H_ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; /** * A pipe which buffers data in memory, or if the data becomes too large, to disk. * If you write some data to the pipe then the pipe will push some data to the * 'onData' callback. This callback is allowed to take an arbitrary amount of time * to consume the data. The pipe guarantees that, while the callback is busy * consuming data, any newly written data will be buffered, either to memory * or to disk. Thus, one can write a virtually unlimited amount of data into * the pipe without filling up the system's RAM, even when the data is slowly * consumed. FileBackedPipe is highly optimized: in case the 'onData' callback * is fast enough, FileBackedPipe operates in an entirely zero-copy manner and * without any kinds of heap allocations. * * By default, FileBackedPipe is stopped, meaning that when you write to it, * the data will be buffered and the 'onData' callback will not be called. * You must start it by calling start(). * * When you're done writing data to the pipe, call end() to signal end-of-stream. * Once all buffered data has been consumed, the 'onEnd' callback will be called. * * FileBackedPipe assumes the usage of an event loop. It is *not* thread-safe! * All FileBackedPipe methods may only be called from the event loop on which it * is installed. * * FileBackedPipe *must* be dynamically allocated and assigned to a boost::shared_ptr. */ class FileBackedPipe: public boost::enable_shared_from_this { public: class ConsumeCallback { private: mutable boost::weak_ptr wself; unsigned int generation; public: ConsumeCallback() { } ConsumeCallback(const boost::shared_ptr &self, unsigned int _generation) : wself(self), generation(_generation) { } void operator()(size_t consumed, bool done) const { boost::shared_ptr self = wself.lock(); if (self != NULL) { wself.reset(); self->dataConsumed(consumed, done, generation); } } boost::function toFunction() const { boost::shared_ptr self = wself.lock(); if (self != NULL) { return boost::bind(&ConsumeCallback::operator(), this, _1, _2); } else { return boost::function(); } } }; typedef void (*DataCallback)(const boost::shared_ptr &source, const char *data, size_t size, const ConsumeCallback &consumed); typedef void (*ErrorCallback)(const boost::shared_ptr &source, int errorCode); typedef void (*Callback)(const boost::shared_ptr &source); enum DataState { IN_MEMORY, OPENING_FILE, IN_FILE }; private: typedef boost::function EioReadCallback; // We already have a boost::shared_ptr reference to libev through MultiLibeio. const string dir; size_t threshold; const char *currentData; size_t currentDataSize; MultiLibeio libeio; unsigned int consumedCallCount; unsigned int generation; bool started; bool ended; bool endReached; bool hasError; enum { /* No data event handler is currently being called. */ NOT_CALLING_EVENT, /* The data event handler is currently being called and it hasn't returned yet. */ CALLING_EVENT_NOW, /* The data event handler was called and it returned, but it hasn't called its finish callback yet. */ WAITING_FOR_EVENT_FINISH, /* The data event handler finish callback has been called and is * fetching more buffered data so that it can call the data event * handler again. */ PREPARING_NEXT_EVENT_CALL } dataEventState; DataState dataState; struct { char *data; size_t size; } memory; struct { FileDescriptor fd; /* Whether there's currently an operation in progress to write the contents * of the buffer to the file. */ bool writingToFile; /* Number of bytes written to the file so far. This number is incremented * *after* the file write operation has finished, not before. */ off_t writtenSize; /* Offset in the file at which data should be read. This can be * temporarily larger than 'writtenSize'. If this is the case then * the data with offset past 'writtenSize' should be obtained from * the writeBuffer. */ off_t readOffset; /* Data buffered in memory, to be written to the file ASAP. Data is * removed from the buffer *after* the file write operation has * finished, not before. */ string writeBuffer; } file; bool callOnData(const char *data, size_t size, bool passDataToConsumedCallback) { unsigned int oldConsumedCallCount = consumedCallCount; dataEventState = CALLING_EVENT_NOW; assert(currentData == NULL); assert(currentDataSize == 0); if (passDataToConsumedCallback) { currentData = data; } currentDataSize = size; if (OXT_LIKELY(onData != NULL)) { onData(shared_from_this(), data, size, ConsumeCallback(shared_from_this(), generation)); } else { real_dataConsumed(0, true, generation); } if (consumedCallCount == oldConsumedCallCount) { // 'consumed' callback not called. dataEventState = WAITING_FOR_EVENT_FINISH; return false; } else { // 'consumed' callback called. assert(dataEventState == NOT_CALLING_EVENT || dataEventState == PREPARING_NEXT_EVENT_CALL); return true; } } void callOnEnd() { assert(!endReached); endReached = true; if (onEnd != NULL) { onEnd(shared_from_this()); } } void callOnCommit() { if (onCommit != NULL) { onCommit(shared_from_this()); } } void setError(int errorCode) { hasError = true; if (onError != NULL) { onError(shared_from_this(), errorCode); } } SafeLibev *getLibev() const { return libeio.getLibev().get(); } void addToBuffer(const char *data, size_t size) { size_t bytesToCopy; switch (dataState) { case IN_MEMORY: bytesToCopy = std::min(size, threshold - memory.size); if (bytesToCopy == size) { if (memory.data == NULL) { assert(memory.size == 0); memory.data = new char[threshold]; } memcpy(memory.data + memory.size, data, bytesToCopy); memory.size += size; } else { dataState = OPENING_FILE; assert(file.fd == -1); assert(file.writtenSize == 0); assert(file.readOffset == 0); file.writeBuffer.reserve(memory.size + size); file.writeBuffer.append(memory.data, memory.size); file.writeBuffer.append(data, size); delete[] memory.data; memory.data = NULL; memory.size = 0; stringstream filename; filename << dir; filename << "/buffer."; filename << getpid(); filename << "."; filename << pointerToIntString(this); libeio.open(filename.str().c_str(), O_CREAT | O_RDWR | O_TRUNC, 0, 0, boost::bind(&FileBackedPipe::openCallback, this, _1, filename.str(), generation, boost::weak_ptr(shared_from_this()) ) ); } break; case OPENING_FILE: file.writeBuffer.append(data, size); break; case IN_FILE: file.writeBuffer.append(data, size); writeBufferToFile(); break; default: abort(); } } void writeBufferToFile() { assert(dataState == IN_FILE); if (!file.writingToFile) { shared_array buffer(new char[file.writeBuffer.size()]); memcpy(buffer.get(), file.writeBuffer.data(), file.writeBuffer.size()); file.writingToFile = true; libeio.write(file.fd, buffer.get(), file.writeBuffer.size(), file.writtenSize, 0, boost::bind( &FileBackedPipe::writeBufferToFileCallback, this, _1, file.fd, buffer, file.writeBuffer.size(), generation, boost::weak_ptr(shared_from_this()) ) ); } } void writeBufferToFileCallback(eio_req req, FileDescriptor fd, shared_array buffer, size_t size, unsigned int generation, boost::weak_ptr wself) { boost::shared_ptr self = wself.lock(); if (self == NULL || EIO_CANCELLED(&req) || generation != self->generation) { return; } if (req.result < 0) { setError(req.errorno); } else { assert(dataState == IN_FILE); file.writeBuffer.erase(0, size); file.writtenSize += size; file.writingToFile = false; if (file.writeBuffer.empty()) { callOnCommit(); } else { writeBufferToFile(); } } } void openCallback(eio_req req, string filename, unsigned int generation, boost::weak_ptr &wself) { boost::shared_ptr self = wself.lock(); if (self == NULL || EIO_CANCELLED(&req) || generation != self->generation) { if (req.result != -1 || EIO_CANCELLED(&req)) { eio_close(req.result, 0, successCallback, NULL); eio_unlink(filename.c_str(), 0, successCallback, NULL); } return; } assert(dataState == OPENING_FILE); if (req.result < 0) { setError(req.errorno); } else { eio_unlink(filename.c_str(), 0, successCallback, NULL); if (openTimeout == 0) { finalizeOpenFile(FileDescriptor(req.result)); } else { getLibev()->runAfter(openTimeout, boost::bind(&FileBackedPipe::finalizeOpenFileAfterTimeout, this, boost::weak_ptr(shared_from_this()), generation, FileDescriptor(req.result))); } } } void finalizeOpenFile(const FileDescriptor &fd) { dataState = IN_FILE; file.fd = fd; writeBufferToFile(); } void finalizeOpenFileAfterTimeout(boost::weak_ptr wself, unsigned int generation, FileDescriptor fd) { boost::shared_ptr self = wself.lock(); if (self != NULL || generation != self->generation) { self->finalizeOpenFile(fd); } } static int successCallback(eio_req *req) { return 0; } void readBlockFromFileOrWriteBuffer(const EioReadCallback &callback) { if (file.readOffset >= file.writtenSize) { StaticString data = StaticString(file.writeBuffer).substr( file.readOffset - file.writtenSize, 1024 * 16); callback(0, data.data(), data.size()); } else { shared_array buffer(new char[1024 * 16]); eio_req *req = libeio.read(file.fd, buffer.get(), 1024 * 16, file.readOffset, 0, boost::bind( &FileBackedPipe::readCallback, this, _1, file.fd, buffer, callback, generation, boost::weak_ptr(shared_from_this()) ) ); if (req == NULL) { throw RuntimeException("eio_read() failed!"); } } } void readCallback(eio_req req, FileDescriptor fd, shared_array buffer, EioReadCallback callback, unsigned int generation, boost::weak_ptr wself) { boost::shared_ptr self = wself.lock(); if (self == NULL || EIO_CANCELLED(&req) || generation != self->generation) { return; } if (req.result < 0) { callback(req.errorno, NULL, 0); } else { callback(0, buffer.get(), req.result); } } void dataConsumed(size_t consumed, bool done, unsigned int oldGeneration) { if (OXT_UNLIKELY(oldGeneration != generation)) { throw RuntimeException("Don't call the consumed callback after you've reset the FileBackedPipe!"); } if (pthread_equal(pthread_self(), getLibev()->getCurrentThread())) { real_dataConsumed(consumed, done, oldGeneration); } else { getLibev()->runLater(boost::bind( &FileBackedPipe::real_dataConsumed, this, consumed, done, oldGeneration)); } } void real_dataConsumed(size_t consumed, bool done, unsigned int oldGeneration) { if (OXT_UNLIKELY(oldGeneration != generation)) { throw RuntimeException("Don't call the consumed callback after you've reset the FileBackedPipe!"); } const char *data = currentData; size_t size = currentDataSize; currentData = NULL; currentDataSize = 0; assert(consumed <= size); consumedCallCount++; if (done) { started = false; } if (getBufferSize() == 0) { // Data passed to write() was immediately consumed. assert(dataEventState == CALLING_EVENT_NOW); assert(data != NULL); if (started) { if (consumed < size) { unsigned int oldGeneration = generation; bool immediatelyConsumed = callOnData( data + consumed, size - consumed, true); if (generation == oldGeneration && !immediatelyConsumed) { addToBuffer(data + consumed, size - consumed); } } else { dataEventState = NOT_CALLING_EVENT; if (ended) { callOnEnd(); } } } else { dataEventState = NOT_CALLING_EVENT; addToBuffer(data + consumed, size - consumed); } } else { /* Data passed to write() was either immediately consumed or was consumed later, * but we don't care which of those situations occurred: the consumed data is * in the buffer and we have to erase it. */ processBuffer(consumed); } } void processBuffer(size_t consumed) { assert(getBufferSize() > 0); dataEventState = NOT_CALLING_EVENT; switch (dataState) { case IN_MEMORY: memmove(memory.data, memory.data + consumed, memory.size - consumed); memory.size -= consumed; if (started) { if (memory.size == 0) { //callOnConsumed(); if (ended) { callOnEnd(); } } else { callOnData(memory.data, memory.size, false); } } break; case OPENING_FILE: case IN_FILE: file.readOffset += consumed; if (started) { if (getBufferSize() == 0) { //callOnConsumed(); if (ended) { callOnEnd(); } } else { dataEventState = PREPARING_NEXT_EVENT_CALL; readBlockFromFileOrWriteBuffer(boost::bind( &FileBackedPipe::processBuffer_readCallback, this, _1, _2, _3)); } } break; default: abort(); } } void processBuffer_readCallback(int err, const char *data, size_t size) { if (err != 0) { setError(err); } else { callOnData(data, size, false); } } public: DataCallback onData; Callback onEnd; ErrorCallback onError; Callback onCommit; void *userData; // The amount of time, in milliseconds, that the open() operation // should at least take before it finishes. For unit testing purposes. unsigned int openTimeout; FileBackedPipe(const string &_dir, size_t _threshold = 1024 * 8) : dir(_dir), threshold(_threshold), openTimeout(0) { onData = NULL; onEnd = NULL; onError = NULL; onCommit = NULL; consumedCallCount = 0; generation = 0; currentData = NULL; currentDataSize = 0; started = false; ended = false; endReached = false; hasError = false; dataEventState = NOT_CALLING_EVENT; dataState = IN_MEMORY; memory.data = NULL; memory.size = 0; file.writingToFile = false; file.readOffset = 0; file.writtenSize = 0; } ~FileBackedPipe() { delete[] memory.data; } bool resetable() const { //return dataState == IN_MEMORY; return true; } void reset(const SafeLibevPtr &libev = SafeLibevPtr()) { generation++; libeio = MultiLibeio(libev); currentData = NULL; currentDataSize = 0; started = false; ended = false; endReached = false; hasError = false; dataEventState = NOT_CALLING_EVENT; dataState = IN_MEMORY; delete[] memory.data; memory.data = NULL; memory.size = 0; file.fd = FileDescriptor(); file.writingToFile = false; file.readOffset = 0; file.writtenSize = 0; } void setThreshold(size_t value) { threshold = value; } /** * Returns the amount of data that has been buffered, both in memory and on disk. */ size_t getBufferSize() const { switch (dataState) { case IN_MEMORY: return memory.size; case OPENING_FILE: case IN_FILE: return (ssize_t) file.writtenSize - file.readOffset + file.writeBuffer.size(); default: abort(); } } DataState getDataState() const { return dataState; } /** * Writes the given data to the pipe. Returns whether all data is immediately * consumed by the 'onData' callback or whether the data buffered into a memory buffer. * That is, if the data is not immediately consumed and it is queued to be written * to disk, then false is returned. In the latter case, the 'onCommit' callback is * called when all buffered data has been written to disk. * * Note that this method may invoke the 'onData' callback immediately. */ bool write(const char *data, size_t size) { assert(!ended); assert(!hasError); if (OXT_UNLIKELY(dataEventState == CALLING_EVENT_NOW)) { throw RuntimeException("This function may not be called within a FileBackedPipe event handler."); } else if (!started || dataEventState != NOT_CALLING_EVENT) { assert(!started || getBufferSize() > 0); addToBuffer(data, size); return dataState == IN_MEMORY; } else { assert(started); assert(dataEventState == NOT_CALLING_EVENT); assert(getBufferSize() == 0); unsigned int oldGeneration = generation; bool immediatelyConsumed = callOnData(data, size, true); if (generation == oldGeneration) { assert(dataEventState != CALLING_EVENT_NOW); if (!immediatelyConsumed) { addToBuffer(data, size); return dataState == IN_MEMORY; } else { return true; } } else { return true; } } } void end() { assert(!ended); assert(!hasError); if (OXT_UNLIKELY(dataEventState == CALLING_EVENT_NOW)) { throw RuntimeException("This function may not be called within a FileBackedPipe event handler."); } else if (!started || dataEventState != NOT_CALLING_EVENT) { assert(!started || getBufferSize() > 0); ended = true; } else { assert(started); assert(dataEventState == NOT_CALLING_EVENT); assert(getBufferSize() == 0); ended = true; callOnEnd(); } } bool isStarted() const { return started; } bool reachedEnd() const { return endReached; } bool isCommittingToDisk() const { return (dataState == OPENING_FILE || dataState == IN_FILE) && !file.writeBuffer.empty(); } void start() { assert(!hasError); if (OXT_UNLIKELY(dataEventState == CALLING_EVENT_NOW)) { throw RuntimeException("This function may not be called within a FileBackedPipe event handler."); } if (!started && !endReached) { started = true; if (dataEventState == NOT_CALLING_EVENT) { if (getBufferSize() > 0) { processBuffer(0); } else if (ended) { callOnEnd(); } } } } void stop() { if (OXT_UNLIKELY(dataEventState == CALLING_EVENT_NOW)) { throw RuntimeException("This function may not be called within a FileBackedPipe event handler."); } started = false; } }; typedef boost::shared_ptr FileBackedPipePtr; } // namespace Passenger #endif /* _PASSENGER_FILE_BACKED_PIPE_H_ */ passenger-4.0.37/ext/common/agents/HelperAgent/Main.cpp000644 000765 000024 00000050620 12233035540 023356 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2014 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace boost; using namespace oxt; using namespace Passenger; using namespace Passenger::ApplicationPool2; class RemoteController: public MessageServer::Handler { private: struct SpecificContext: public MessageServer::ClientContext { }; typedef MessageServer::CommonClientContext CommonClientContext; boost::shared_ptr requestHandler; PoolPtr pool; /********************************************* * Message handler methods *********************************************/ void processDetachProcess(CommonClientContext &commonContext, SpecificContext *specificContext, const vector &args) { TRACE_POINT(); commonContext.requireRights(Account::DETACH); if (pool->detachProcess((pid_t) atoi(args[1]))) { writeArrayMessage(commonContext.fd, "true", NULL); } else { writeArrayMessage(commonContext.fd, "false", NULL); } } void processDetachProcessByKey(CommonClientContext &commonContext, SpecificContext *specificContext, const vector &args) { TRACE_POINT(); commonContext.requireRights(Account::DETACH); // TODO: implement this writeArrayMessage(commonContext.fd, "false", NULL); } bool processInspect(CommonClientContext &commonContext, SpecificContext *specificContext, const vector &args) { TRACE_POINT(); commonContext.requireRights(Account::INSPECT_BASIC_INFO); if ((args.size() - 1) % 2 != 0) { return false; } VariantMap options = argsToOptions(args); writeScalarMessage(commonContext.fd, pool->inspect(Pool::InspectOptions(options))); return true; } void processToXml(CommonClientContext &commonContext, SpecificContext *specificContext, const vector &args) { TRACE_POINT(); commonContext.requireRights(Account::INSPECT_BASIC_INFO); bool includeSensitiveInfo = commonContext.account->hasRights(Account::INSPECT_SENSITIVE_INFO) && args[1] == "true"; writeScalarMessage(commonContext.fd, pool->toXml(includeSensitiveInfo)); } void processBacktraces(CommonClientContext &commonContext, SpecificContext *specificContext, const vector &args) { TRACE_POINT(); commonContext.requireRights(Account::INSPECT_BACKTRACES); writeScalarMessage(commonContext.fd, oxt::thread::all_backtraces()); } void processRestartAppGroup(CommonClientContext &commonContext, SpecificContext *specificContext, const vector &args) { TRACE_POINT(); commonContext.requireRights(Account::RESTART); VariantMap options = argsToOptions(args, 2); RestartMethod method = RM_DEFAULT; if (options.get("method", false) == "blocking") { method = RM_BLOCKING; } else if (options.get("method", false) == "rolling") { method = RM_ROLLING; } bool result = pool->restartGroupByName(args[1], method); writeArrayMessage(commonContext.fd, result ? "true" : "false", NULL); } void processRequests(CommonClientContext &commonContext, SpecificContext *specificContext, const vector &args) { TRACE_POINT(); stringstream stream; commonContext.requireRights(Account::INSPECT_REQUESTS); requestHandler->inspect(stream); writeScalarMessage(commonContext.fd, stream.str()); } public: RemoteController(const boost::shared_ptr &requestHandler, const PoolPtr &pool) { this->requestHandler = requestHandler; this->pool = pool; } virtual MessageServer::ClientContextPtr newClient(CommonClientContext &commonContext) { return boost::make_shared(); } virtual bool processMessage(CommonClientContext &commonContext, MessageServer::ClientContextPtr &_specificContext, const vector &args) { SpecificContext *specificContext = (SpecificContext *) _specificContext.get(); try { if (isCommand(args, "detach_process", 1)) { processDetachProcess(commonContext, specificContext, args); } else if (isCommand(args, "detach_process_by_key", 1)) { processDetachProcessByKey(commonContext, specificContext, args); } else if (args[0] == "inspect") { return processInspect(commonContext, specificContext, args); } else if (isCommand(args, "toXml", 1)) { processToXml(commonContext, specificContext, args); } else if (isCommand(args, "backtraces", 0)) { processBacktraces(commonContext, specificContext, args); } else if (isCommand(args, "restart_app_group", 1, 99)) { processRestartAppGroup(commonContext, specificContext, args); } else if (isCommand(args, "requests", 0)) { processRequests(commonContext, specificContext, args); } else { return false; } } catch (const SecurityException &) { /* Client does not have enough rights to perform a certain action. * It has already been notified of this; ignore exception and move on. */ } return true; } }; class ExitHandler: public MessageServer::Handler { private: EventFd &exitEvent; public: ExitHandler(EventFd &_exitEvent) : exitEvent(_exitEvent) { } virtual bool processMessage(MessageServer::CommonClientContext &commonContext, MessageServer::ClientContextPtr &handlerSpecificContext, const vector &args) { if (args[0] == "exit") { TRACE_POINT(); commonContext.requireRights(Account::EXIT); UPDATE_TRACE_POINT(); exitEvent.notify(); UPDATE_TRACE_POINT(); writeArrayMessage(commonContext.fd, "exit command received", NULL); return true; } else { return false; } } }; /** * A representation of the Server responsible for handling Client instances. * * @see Client */ class Server { private: static const int MESSAGE_SERVER_THREAD_STACK_SIZE = 128 * 1024; static const int EVENT_LOOP_THREAD_STACK_SIZE = 256 * 1024; FileDescriptor feedbackFd; const AgentOptions &options; BackgroundEventLoop poolLoop; BackgroundEventLoop requestLoop; FileDescriptor requestSocket; ServerInstanceDir serverInstanceDir; ServerInstanceDir::GenerationPtr generation; UnionStation::LoggerFactoryPtr loggerFactory; RandomGeneratorPtr randomGenerator; SpawnerFactoryPtr spawnerFactory; PoolPtr pool; ev::sig sigquitWatcher; AccountsDatabasePtr accountsDatabase; MessageServerPtr messageServer; ResourceLocator resourceLocator; boost::shared_ptr requestHandler; boost::shared_ptr prestarterThread; boost::shared_ptr messageServerThread; boost::shared_ptr eventLoopThread; EventFd exitEvent; /** * Starts listening for client connections on this server's request socket. * * @throws SystemException Something went wrong while trying to create and bind to the Unix socket. * @throws RuntimeException Something went wrong. */ void startListening() { this_thread::disable_syscall_interruption dsi; requestSocket = createUnixServer(getRequestSocketFilename().c_str()); int ret, e; do { ret = chmod(getRequestSocketFilename().c_str(), S_ISVTX | S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH); } while (ret == -1 && errno == EINTR); setNonBlocking(requestSocket); if (!options.requestSocketLink.empty()) { struct stat buf; // If this is a symlink then we'll want to check the file the symlink // points to, so we use stat() instead of lstat(). ret = syscalls::stat(options.requestSocketLink.c_str(), &buf); if (ret == 0 || (ret == -1 && errno == ENOENT)) { if (ret == -1 || buf.st_mode & S_IFSOCK) { if (syscalls::unlink(options.requestSocketLink.c_str()) == -1) { e = errno; throw FileSystemException("Cannot delete existing socket file '" + options.requestSocketLink + "'", e, options.requestSocketLink); } } else { throw RuntimeException("File '" + options.requestSocketLink + "' already exists and is not a Unix domain socket"); } } else if (ret == -1 && errno != ENOENT) { e = errno; throw FileSystemException("Cannot stat() file '" + options.requestSocketLink + "'", e, options.requestSocketLink); } do { ret = symlink(getRequestSocketFilename().c_str(), options.requestSocketLink.c_str()); } while (ret == -1 && errno == EINTR); if (ret == -1) { e = errno; throw FileSystemException("Cannot create a symlink '" + options.requestSocketLink + "' to '" + getRequestSocketFilename() + "'", e, options.requestSocketLink); } } } /** * Lowers this process's privilege to that of username and groupname. */ void lowerPrivilege(const string &username, const string &groupname) { struct passwd *userEntry; gid_t gid; int e; userEntry = getpwnam(username.c_str()); if (userEntry == NULL) { throw NonExistentUserException(string("Unable to lower Passenger " "HelperAgent's privilege to that of user '") + username + "': user does not exist."); } gid = lookupGid(groupname); if (gid == (gid_t) -1) { throw NonExistentGroupException(string("Unable to lower Passenger " "HelperAgent's privilege to that of user '") + username + "': user does not exist."); } if (initgroups(username.c_str(), userEntry->pw_gid) != 0) { e = errno; throw SystemException(string("Unable to lower Passenger HelperAgent's " "privilege to that of user '") + username + "': cannot set supplementary groups for this user", e); } if (setgid(gid) != 0) { e = errno; throw SystemException(string("Unable to lower Passenger HelperAgent's " "privilege to that of user '") + username + "': cannot set group ID", e); } if (setuid(userEntry->pw_uid) != 0) { e = errno; throw SystemException(string("Unable to lower Passenger HelperAgent's " "privilege to that of user '") + username + "': cannot set user ID", e); } setenv("HOME", userEntry->pw_dir, 1); } void onSigquit(ev::sig &signal, int revents) { requestHandler->inspect(cerr); cerr.flush(); cerr << "\n" << pool->inspect(); cerr.flush(); cerr << "\n" << oxt::thread::all_backtraces(); cerr.flush(); } void installDiagnosticsDumper() { ::installDiagnosticsDumper(dumpDiagnosticsOnCrash, this); } void uninstallDiagnosticsDumper() { ::installDiagnosticsDumper(NULL, NULL); } static void dumpDiagnosticsOnCrash(void *userData) { Server *self = (Server *) userData; cerr << "### Request handler state\n"; self->requestHandler->inspect(cerr); cerr << "\n"; cerr.flush(); cerr << "### Pool state (simple)\n"; // Do not lock, the crash may occur within the pool. Pool::InspectOptions options; options.verbose = true; cerr << self->pool->inspect(options, false); cerr << "\n"; cerr.flush(); cerr << "### Pool state (XML)\n"; cerr << self->pool->toXml(true, false); cerr << "\n\n"; cerr.flush(); cerr << "### Backtraces\n"; cerr << oxt::thread::all_backtraces(); cerr.flush(); } public: Server(FileDescriptor feedbackFd, const AgentOptions &_options) : options(_options), requestLoop(true), serverInstanceDir(_options.serverInstanceDir, false), resourceLocator(options.passengerRoot) { TRACE_POINT(); this->feedbackFd = feedbackFd; UPDATE_TRACE_POINT(); generation = serverInstanceDir.getGeneration(options.generationNumber); startListening(); accountsDatabase = boost::make_shared(); accountsDatabase->add("_passenger-status", options.adminToolStatusPassword, false, Account::INSPECT_BASIC_INFO | Account::INSPECT_SENSITIVE_INFO | Account::INSPECT_BACKTRACES | Account::INSPECT_REQUESTS | Account::DETACH | Account::RESTART); accountsDatabase->add("_web_server", options.exitPassword, false, Account::EXIT); messageServer = boost::make_shared( parseUnixSocketAddress(options.adminSocketAddress), accountsDatabase); createFile(generation->getPath() + "/helper_agent.pid", toString(getpid()), S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (geteuid() == 0 && !options.userSwitching) { lowerPrivilege(options.defaultUser, options.defaultGroup); } UPDATE_TRACE_POINT(); randomGenerator = boost::make_shared(); // Check whether /dev/urandom is actually random. // https://code.google.com/p/phusion-passenger/issues/detail?id=516 if (randomGenerator->generateByteString(16) == randomGenerator->generateByteString(16)) { throw RuntimeException("Your random number device, /dev/urandom, appears to be broken. " "It doesn't seem to be returning random data. Please fix this."); } UPDATE_TRACE_POINT(); loggerFactory = boost::make_shared(options.loggingAgentAddress, "logging", options.loggingAgentPassword); spawnerFactory = boost::make_shared(poolLoop.safe, resourceLocator, generation, boost::make_shared(randomGenerator)); pool = boost::make_shared(spawnerFactory, loggerFactory, randomGenerator, &options); pool->initialize(); pool->setMax(options.maxPoolSize); pool->setMaxIdleTime(options.poolIdleTime * 1000000); requestHandler = boost::make_shared(requestLoop.safe, requestSocket, pool, options); messageServer->addHandler(boost::make_shared(requestHandler, pool)); messageServer->addHandler(ptr(new ExitHandler(exitEvent))); sigquitWatcher.set(requestLoop.loop); sigquitWatcher.set(SIGQUIT); sigquitWatcher.set(this); sigquitWatcher.start(); UPDATE_TRACE_POINT(); writeArrayMessage(feedbackFd, "initialized", getRequestSocketFilename().c_str(), messageServer->getSocketFilename().c_str(), NULL); boost::function func = boost::bind(prestartWebApps, resourceLocator, options.defaultRubyCommand, options.prestartUrls ); prestarterThread = ptr(new oxt::thread( boost::bind(runAndPrintExceptions, func, true) )); } ~Server() { TRACE_POINT(); this_thread::disable_syscall_interruption dsi; this_thread::disable_interruption di; P_DEBUG("Shutting down helper agent..."); prestarterThread->interrupt_and_join(); if (messageServerThread != NULL) { messageServerThread->interrupt_and_join(); } messageServer.reset(); P_DEBUG("Destroying application pool..."); pool->destroy(); uninstallDiagnosticsDumper(); pool.reset(); poolLoop.stop(); requestLoop.stop(); requestHandler.reset(); if (!options.requestSocketLink.empty()) { char path[PATH_MAX + 1]; ssize_t ret; bool shouldUnlink; ret = readlink(options.requestSocketLink.c_str(), path, PATH_MAX); if (ret != -1) { path[ret] = '\0'; // Only unlink if a new Flying Passenger instance hasn't overwritten the // symlink. // https://code.google.com/p/phusion-passenger/issues/detail?id=939 shouldUnlink = getRequestSocketFilename() == path; } else { shouldUnlink = true; } if (shouldUnlink) { syscalls::unlink(options.requestSocketLink.c_str()); } } P_TRACE(2, "All threads have been shut down."); } void mainLoop() { TRACE_POINT(); boost::function func; func = boost::bind(&MessageServer::mainLoop, messageServer.get()); messageServerThread = ptr(new oxt::thread( boost::bind(runAndPrintExceptions, func, true), "MessageServer thread", MESSAGE_SERVER_THREAD_STACK_SIZE )); poolLoop.start("Pool event loop", 0); requestLoop.start("Request event loop", 0); /* Wait until the watchdog closes the feedback fd (meaning it * was killed) or until we receive an exit message. */ this_thread::disable_syscall_interruption dsi; fd_set fds; int largestFd; FD_ZERO(&fds); FD_SET(feedbackFd, &fds); FD_SET(exitEvent.fd(), &fds); largestFd = (feedbackFd > exitEvent.fd()) ? (int) feedbackFd : exitEvent.fd(); UPDATE_TRACE_POINT(); installDiagnosticsDumper(); if (syscalls::select(largestFd + 1, &fds, NULL, NULL, NULL) == -1) { int e = errno; uninstallDiagnosticsDumper(); throw SystemException("select() failed", e); } if (FD_ISSET(feedbackFd, &fds)) { /* If the watchdog has been killed then we'll kill all descendant * processes and exit. There's no point in keeping this helper * server running because we can't detect when the web server exits, * and because this helper agent doesn't own the server instance * directory. As soon as passenger-status is run, the server * instance directory will be cleaned up, making this helper agent * inaccessible. */ P_DEBUG("Watchdog seems to be killed; forcing shutdown of all subprocesses"); // We send a SIGTERM first to allow processes to gracefully shut down. syscalls::killpg(getpgrp(), SIGTERM); usleep(500000); syscalls::killpg(getpgrp(), SIGKILL); _exit(2); // In case killpg() fails. } else { /* We received an exit command. We want to exit 5 seconds after * all clients have disconnected have become inactive. */ P_DEBUG("Received command to exit gracefully. " "Waiting until 5 seconds after all clients have disconnected..."); pool->prepareForShutdown(); requestHandler->resetInactivityTime(); while (requestHandler->inactivityTime() < 5000) { syscalls::usleep(250000); } P_DEBUG("It's now 5 seconds after all clients have disconnected. " "Proceeding with graceful exit."); } } string getRequestSocketFilename() const { return options.requestSocketFilename; } }; /** * Initializes and starts the helper agent that is responsible for handling communication * between Nginx and the backend Rails processes. * * @see Server * @see Client */ int main(int argc, char *argv[]) { TRACE_POINT(); AgentOptionsPtr options; try { options = boost::make_shared( initializeAgent(argc, argv, "PassengerHelperAgent")); } catch (const VariantMap::MissingKeyException &e) { fprintf(stderr, "Option required: %s\n", e.getKey().c_str()); return 1; } if (options->testBinary) { printf("PASS\n"); exit(0); } P_DEBUG("Starting PassengerHelperAgent..."); MultiLibeio::init(); try { UPDATE_TRACE_POINT(); Server server(FileDescriptor(FEEDBACK_FD), *options); P_WARN("PassengerHelperAgent online, listening at unix:" << server.getRequestSocketFilename()); UPDATE_TRACE_POINT(); server.mainLoop(); } catch (const tracable_exception &e) { P_ERROR("*** ERROR: " << e.what() << "\n" << e.backtrace()); return 1; } MultiLibeio::shutdown(); P_TRACE(2, "Helper agent exiting with code 0."); return 0; } passenger-4.0.37/ext/common/agents/HelperAgent/RequestHandler.cpp000644 000765 000024 00000020175 12233035540 025422 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include namespace Passenger { struct ev_loop * Client::getLoop() const { return requestHandler->libev->getLoop(); } const SafeLibevPtr & Client::getSafeLibev() const { return requestHandler->libev; } unsigned int Client::getConnectPasswordTimeout(const RequestHandler *handler) const { return handler->connectPasswordTimeout; } size_t Client::onClientInputData(const EventedBufferedInputPtr &source, const StaticString &data) { Client *client = (Client *) source->userData; if (client != NULL) { return client->requestHandler->onClientInputData(client->shared_from_this(), data); } else { return 0; } } void Client::onClientInputError(const EventedBufferedInputPtr &source, const char *message, int errnoCode) { Client *client = (Client *) source->userData; if (client != NULL) { client->requestHandler->onClientInputError(client->shared_from_this(), message, errnoCode); } } void Client::onClientBodyBufferData(const FileBackedPipePtr &source, const char *data, size_t size, const FileBackedPipe::ConsumeCallback &callback) { Client *client = (Client *) source->userData; if (client != NULL) { client->requestHandler->onClientBodyBufferData(client->shared_from_this(), data, size, callback); } } void Client::onClientBodyBufferEnd(const FileBackedPipePtr &source) { Client *client = (Client *) source->userData; if (client != NULL) { client->requestHandler->onClientBodyBufferEnd(client->shared_from_this()); } } void Client::onClientBodyBufferError(const FileBackedPipePtr &source, int errorCode) { Client *client = (Client *) source->userData; if (client != NULL) { client->requestHandler->onClientBodyBufferError(client->shared_from_this(), errorCode); } } void Client::onClientBodyBufferCommit(const FileBackedPipePtr &source) { Client *client = (Client *) source->userData; if (client != NULL) { client->requestHandler->onClientBodyBufferCommit(client->shared_from_this()); } } void Client::onClientOutputPipeData(const FileBackedPipePtr &source, const char *data, size_t size, const FileBackedPipe::ConsumeCallback &callback) { Client *client = (Client *) source->userData; if (client != NULL) { client->requestHandler->onClientOutputPipeData(client->shared_from_this(), data, size, callback); } } void Client::onClientOutputPipeEnd(const FileBackedPipePtr &source) { Client *client = (Client *) source->userData; if (client != NULL) { client->requestHandler->onClientOutputPipeEnd(client->shared_from_this()); } } void Client::onClientOutputPipeError(const FileBackedPipePtr &source, int errorCode) { Client *client = (Client *) source->userData; if (client != NULL) { client->requestHandler->onClientOutputPipeError(client->shared_from_this(), errorCode); } } void Client::onClientOutputPipeCommit(const FileBackedPipePtr &source) { Client *client = (Client *) source->userData; if (client != NULL) { client->requestHandler->onClientOutputPipeCommit(client->shared_from_this()); } } void Client::onClientOutputWritable(ev::io &io, int revents) { assert(requestHandler != NULL); requestHandler->onClientOutputWritable(shared_from_this()); } size_t Client::onAppInputData(const EventedBufferedInputPtr &source, const StaticString &data) { Client *client = (Client *) source->userData; if (client != NULL) { return client->requestHandler->onAppInputData(client->shared_from_this(), data); } else { return 0; } } void Client::onAppInputChunk(const char *data, size_t size, void *userData) { Client *client = (Client *) userData; assert(client != NULL); assert(client->requestHandler != NULL); client->requestHandler->onAppInputChunk(client->shared_from_this(), StaticString(data, size)); } void Client::onAppInputChunkEnd(void *userData) { Client *client = (Client *) userData; assert(client != NULL); assert(client->requestHandler != NULL); client->requestHandler->onAppInputChunkEnd(client->shared_from_this()); } void Client::onAppInputError(const EventedBufferedInputPtr &source, const char *message, int errnoCode) { Client *client = (Client *) source->userData; if (client != NULL) { client->requestHandler->onAppInputError(client->shared_from_this(), message, errnoCode); } } void Client::onAppOutputWritable(ev::io &io, int revents) { assert(requestHandler != NULL); requestHandler->onAppOutputWritable(shared_from_this()); } void Client::onTimeout(ev::timer &timer, int revents) { assert(requestHandler != NULL); requestHandler->onTimeout(shared_from_this()); } Client * RequestHandler::getClientPointer(const ClientPtr &client) { return client.get(); } } // namespace Passenger #ifdef STANDALONE #include #include #include #include using namespace std; using namespace Passenger; using namespace Passenger::ApplicationPool2; static SafeLibevPtr libev; static RequestHandler *handler; static struct ev_loop *loop; static PoolPtr pool; static struct ev_signal sigquitwatcher, sigintwatcher; static void sigquit_cb(struct ev_loop *loop, ev_signal *w, int revents) { handler->inspect(cout); cout.flush(); } static void sigint_cb(struct ev_loop *loop, ev_signal *w, int revents) { P_WARN("Exiting loop"); delete handler; handler = NULL; pool->destroy(); pool.reset(); ev_signal_stop(loop, &sigquitwatcher); ev_signal_stop(loop, &sigintwatcher); ev_break(loop, EVBREAK_ONE); } static void ignoreSigpipe() { struct sigaction action; action.sa_handler = SIG_IGN; action.sa_flags = 0; sigemptyset(&action.sa_mask); sigaction(SIGPIPE, &action, NULL); } int main() { oxt::initialize(); setup_syscall_interruption_support(); ignoreSigpipe(); //installAbortHandler(); setLogLevel(3); MultiLibeio::init(); loop = EV_DEFAULT; libev = boost::make_shared(loop); AgentOptions options; ServerInstanceDir serverInstanceDir(getpid()); char root[PATH_MAX]; getcwd(root, sizeof(root)); #ifdef __linux__ const char *nogroup = "nogroup"; #else const char *nogroup = "nobody"; #endif options.passengerRoot = root; options.loggingAgentAddress = "unix:/tmp/agent"; options.loggingAgentPassword = "1234"; SpawnerFactoryPtr spawnerFactory = boost::make_shared(libev, ResourceLocator(root), serverInstanceDir.newGeneration(true, "nobody", nogroup, getpid(), getgid())); UnionStation::LoggerFactoryPtr loggerFactory = boost::make_shared(options.loggingAgentAddress, "logging", options.loggingAgentPassword); pool = boost::make_shared(libev.get(), spawnerFactory, loggerFactory); FileDescriptor requestSocket(createTcpServer("127.0.0.1", 3000)); setNonBlocking(requestSocket); handler = new RequestHandler(libev, requestSocket, pool, options); ev_signal_init(&sigquitwatcher, sigquit_cb, SIGQUIT); ev_signal_start(loop, &sigquitwatcher); ev_signal_init(&sigintwatcher, sigint_cb, SIGINT); ev_signal_start(loop, &sigintwatcher); P_DEBUG("Started"); ev_run(loop, 0); MultiLibeio::shutdown(); return 0; } #endif passenger-4.0.37/ext/common/agents/HelperAgent/RequestHandler.h000644 000765 000024 00000241247 12233035540 025074 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2011-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* STAGES Accept connect password | \|/ Read header | \|/ +------+------+ | | | | \|/ | Buffer | request | body | | | | | \|/ | Checkout <-------+ session | | \|/ Send header to app | | \|/ Send request body to app OVERVIEW OF I/O CHANNELS, PIPES AND WATCHERS OPTIONAL: appOutputWatcher clientBodyBuffer (o) | | +----------+ | +-----------+ | +---------------+ | | ------ clientInput -----> | Request | ----------------> | | | Client | fd | Handler | session | Application | | | <--- clientOutputPipe --- | | <--- appInput --- | | +----------+ | +-----------+ +---------------+ | (o) clientOutputWatcher */ #ifndef _PASSENGER_REQUEST_HANDLER_H_ #define _PASSENGER_REQUEST_HANDLER_H_ #include #include #include #include #if defined(__GLIBCXX__) || defined(__APPLE__) #include #define CXX_ABI_API_AVAILABLE #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Passenger { using namespace std; using namespace boost; using namespace oxt; using namespace ApplicationPool2; class RequestHandler; #define MAX_STATUS_HEADER_SIZE 64 #define RH_ERROR(client, x) P_ERROR("[Client " << client->name() << "] " << x) #define RH_WARN(client, x) P_WARN("[Client " << client->name() << "] " << x) #define RH_DEBUG(client, x) P_DEBUG("[Client " << client->name() << "] " << x) #define RH_TRACE(client, level, x) P_TRACE(level, "[Client " << client->name() << "] " << x) #define RH_LOG_EVENT(client, eventName) \ char _clientName[7 + 8]; \ snprintf(_clientName, sizeof(_clientName), "Client %d", client->fdnum); \ TRACE_POINT_WITH_DATA(_clientName); \ RH_TRACE(client, 3, "Event: " eventName) class Client: public boost::enable_shared_from_this { private: struct ev_loop *getLoop() const; const SafeLibevPtr &getSafeLibev() const; unsigned int getConnectPasswordTimeout(const RequestHandler *handler) const; static size_t onClientInputData(const EventedBufferedInputPtr &source, const StaticString &data); static void onClientInputError(const EventedBufferedInputPtr &source, const char *message, int errnoCode); static void onClientBodyBufferData(const FileBackedPipePtr &source, const char *data, size_t size, const FileBackedPipe::ConsumeCallback &callback); static void onClientBodyBufferEnd(const FileBackedPipePtr &source); static void onClientBodyBufferError(const FileBackedPipePtr &source, int errorCode); static void onClientBodyBufferCommit(const FileBackedPipePtr &source); static void onClientOutputPipeData(const FileBackedPipePtr &source, const char *data, size_t size, const FileBackedPipe::ConsumeCallback &callback); static void onClientOutputPipeEnd(const FileBackedPipePtr &source); static void onClientOutputPipeError(const FileBackedPipePtr &source, int errorCode); static void onClientOutputPipeCommit(const FileBackedPipePtr &source); void onClientOutputWritable(ev::io &io, int revents); static size_t onAppInputData(const EventedBufferedInputPtr &source, const StaticString &data); static void onAppInputChunk(const char *data, size_t size, void *userData); static void onAppInputChunkEnd(void *userData); static void onAppInputError(const EventedBufferedInputPtr &source, const char *message, int errnoCode); void onAppOutputWritable(ev::io &io, int revents); void onTimeout(ev::timer &timer, int revents); static const char *boolStr(bool val) { static const char *strs[] = { "false", "true" }; return strs[val]; } void resetPrimitiveFields() { requestHandler = NULL; state = DISCONNECTED; backgroundOperations = 0; requestBodyIsBuffered = false; freeBufferedConnectPassword(); connectedAt = 0; contentLength = 0; clientBodyAlreadyRead = 0; checkoutSessionAfterCommit = false; stickySession = false; sessionCheckedOut = false; sessionCheckoutTry = 0; responseHeaderSeen = false; chunkedResponse = false; appRoot.clear(); } void freeScopeLogs() { endScopeLog(&scopeLogs.requestProxying, false); endScopeLog(&scopeLogs.getFromPool, false); endScopeLog(&scopeLogs.bufferingRequestBody, false); endScopeLog(&scopeLogs.requestProcessing, false); } public: /** Back reference to the RequestHandler that this Client is associated with. * NULL when this Client is not in the pool or is disconnected. */ RequestHandler *requestHandler; /** File descriptor of the client socket. Is empty when this Client is not * in the pool or is disconnected. */ FileDescriptor fd; /** The last associated file descriptor number is stored here. It is not * cleared after disassociating. Its only purpose is to make logging calls * like RH_DEBUG() print the correct client name after disconnect() is called. * Do not use this value for anything else as it may not refer to a valid * file descriptor. */ int fdnum; /***** Client <-> RequestHandler I/O channels, pipes and watchers *****/ /** Client input channel. */ EventedBufferedInputPtr clientInput; /** If request body buffering is turned on, it will be buffered into this FileBackedPipe. */ FileBackedPipePtr clientBodyBuffer; /** Client output pipe. */ FileBackedPipePtr clientOutputPipe; /** Client output channel watcher. */ ev::io clientOutputWatcher; /***** RequestHandler <-> Application I/O channels, pipes and watchers *****/ /** Application input channel. */ EventedBufferedInputPtr appInput; string appOutputBuffer; /** Application output channel watcher. */ ev::io appOutputWatcher; /***** State variables *****/ enum { BEGIN_READING_CONNECT_PASSWORD, STILL_READING_CONNECT_PASSWORD, READING_HEADER, BUFFERING_REQUEST_BODY, CHECKING_OUT_SESSION, SENDING_HEADER_TO_APP, FORWARDING_BODY_TO_APP, // Special states WRITING_SIMPLE_RESPONSE, DISCONNECTED } state; /* How many background operations are currently in progress, e.g. * an asyncGet() or bodyBuffer.add(). If the client is disconnected * while this flag is true, then the Client object is not reassociateable * in order to give the completion callbacks a chance to cancel properly. */ unsigned int backgroundOperations; struct { char *data; unsigned int alreadyRead; } bufferedConnectPassword; // Used for enforcing the connection timeout. ev::timer timeoutTimer; ev_tstamp connectedAt; long long contentLength; unsigned long long clientBodyAlreadyRead; Options options; ScgiRequestParser scgiParser; SessionPtr session; string appRoot; struct { UnionStation::ScopeLog *requestProcessing, *bufferingRequestBody, *getFromPool, *requestProxying; } scopeLogs; unsigned int sessionCheckoutTry; bool requestBodyIsBuffered; bool sessionCheckedOut; bool checkoutSessionAfterCommit; bool stickySession; bool responseHeaderSeen; bool chunkedResponse; HttpHeaderBufferer responseHeaderBufferer; Dechunker responseDechunker; Client() { fdnum = -1; clientInput = boost::make_shared< EventedBufferedInput<> >(); clientInput->onData = onClientInputData; clientInput->onError = onClientInputError; clientInput->userData = this; clientBodyBuffer = boost::make_shared("/tmp"); clientBodyBuffer->userData = this; clientBodyBuffer->onData = onClientBodyBufferData; clientBodyBuffer->onEnd = onClientBodyBufferEnd; clientBodyBuffer->onError = onClientBodyBufferError; clientBodyBuffer->onCommit = onClientBodyBufferCommit; clientOutputPipe = boost::make_shared("/tmp"); clientOutputPipe->userData = this; clientOutputPipe->onData = onClientOutputPipeData; clientOutputPipe->onEnd = onClientOutputPipeEnd; clientOutputPipe->onError = onClientOutputPipeError; clientOutputPipe->onCommit = onClientOutputPipeCommit; clientOutputWatcher.set(this); appInput = boost::make_shared< EventedBufferedInput<> >(); appInput->onData = onAppInputData; appInput->onError = onAppInputError; appInput->userData = this; appOutputWatcher.set(this); timeoutTimer.set(this); responseDechunker.onData = onAppInputChunk; responseDechunker.onEnd = onAppInputChunkEnd; responseDechunker.userData = this; bufferedConnectPassword.data = NULL; bufferedConnectPassword.alreadyRead = 0; memset(&scopeLogs, 0, sizeof(scopeLogs)); resetPrimitiveFields(); } ~Client() { if (requestHandler != NULL) { discard(); } clientInput->userData = NULL; clientBodyBuffer->userData = NULL; clientOutputPipe->userData = NULL; appInput->userData = NULL; freeBufferedConnectPassword(); freeScopeLogs(); } void associate(RequestHandler *handler, const FileDescriptor &_fd) { assert(requestHandler == NULL); requestHandler = handler; fd = _fd; fdnum = _fd; state = BEGIN_READING_CONNECT_PASSWORD; connectedAt = ev_time(); clientInput->reset(getSafeLibev().get(), _fd); clientInput->start(); clientBodyBuffer->reset(getSafeLibev()); clientOutputPipe->reset(getSafeLibev()); clientOutputPipe->start(); clientOutputWatcher.set(getLoop()); clientOutputWatcher.set(_fd, ev::WRITE); // appOutputWatcher is initialized in initiateSession. timeoutTimer.set(getLoop()); timeoutTimer.start(getConnectPasswordTimeout(handler) / 1000.0, 0.0); } void disassociate() { assert(requestHandler != NULL); resetPrimitiveFields(); fd = FileDescriptor(); clientInput->reset(NULL, FileDescriptor()); clientBodyBuffer->reset(); clientOutputPipe->reset(); clientOutputWatcher.stop(); appInput->reset(NULL, FileDescriptor()); appOutputBuffer.resize(0); appOutputWatcher.stop(); timeoutTimer.stop(); scgiParser.reset(); session.reset(); responseHeaderBufferer.reset(); responseDechunker.reset(); freeScopeLogs(); } void discard() { assert(requestHandler != NULL); resetPrimitiveFields(); fd = FileDescriptor(); clientInput->stop(); clientBodyBuffer->reset(); clientOutputPipe->reset(); clientOutputWatcher.stop(); appInput->stop(); appOutputWatcher.stop(); timeoutTimer.stop(); freeScopeLogs(); requestHandler = NULL; } bool reassociateable() const { return requestHandler == NULL && backgroundOperations == 0 && clientInput->resetable() && clientBodyBuffer->resetable() && clientOutputPipe->resetable() && appInput->resetable(); } string name() const { if (fdnum == -1) { return "(null)"; } else { return toString(fdnum); } } bool connected() const { return requestHandler != NULL; } const char *getStateName() const { switch (state) { case BEGIN_READING_CONNECT_PASSWORD: return "BEGIN_READING_CONNECT_PASSWORD"; case STILL_READING_CONNECT_PASSWORD: return "STILL_READING_CONNECT_PASSWORD"; case READING_HEADER: return "READING_HEADER"; case BUFFERING_REQUEST_BODY: return "BUFFERING_REQUEST_BODY"; case CHECKING_OUT_SESSION: return "CHECKING_OUT_SESSION"; case SENDING_HEADER_TO_APP: return "SENDING_HEADER_TO_APP"; case FORWARDING_BODY_TO_APP: return "FORWARDING_BODY_TO_APP"; case WRITING_SIMPLE_RESPONSE: return "WRITING_SIMPLE_RESPONSE"; case DISCONNECTED: return "DISCONNECTED"; default: return "UNKNOWN"; } } void freeBufferedConnectPassword() { if (bufferedConnectPassword.data != NULL) { free(bufferedConnectPassword.data); bufferedConnectPassword.data = NULL; bufferedConnectPassword.alreadyRead = 0; } } bool shouldHalfCloseWrite() const { // Many broken HTTP servers consider a half close to be a full close, so don't // half close HTTP sessions. return session->getProtocol() == "session"; } bool useUnionStation() const { return options.logger != NULL; } UnionStation::LoggerPtr getLogger() const { return options.logger; } void beginScopeLog(UnionStation::ScopeLog **scopeLog, const char *name) { if (options.logger != NULL) { *scopeLog = new UnionStation::ScopeLog(options.logger, name); } } void endScopeLog(UnionStation::ScopeLog **scopeLog, bool success = true) { if (success && *scopeLog != NULL) { (*scopeLog)->success(); } delete *scopeLog; *scopeLog = NULL; } void logMessage(const StaticString &message) { options.logger->message(message); } void verifyInvariants() const { assert((requestHandler == NULL) == (fd == -1)); assert((requestHandler == NULL) == (state == DISCONNECTED)); } template void inspect(Stream &stream) const { const char *indent = " "; time_t the_time; struct tm the_tm; char timestr[60]; the_time = (time_t) connectedAt; localtime_r(&the_time, &the_tm); strftime(timestr, sizeof(timestr) - 1, "%F %H:%M:%S", &the_tm); stream << indent << "host = " << (scgiParser.getHeader("HTTP_HOST").empty() ? "(empty)" : scgiParser.getHeader("HTTP_HOST")) << "\n"; stream << indent << "uri = " << (scgiParser.getHeader("REQUEST_URI").empty() ? "(empty)" : scgiParser.getHeader("REQUEST_URI")) << "\n"; stream << indent << "connected at = " << timestr << " (" << (unsigned long long) (ev_time() - connectedAt) << " sec ago)\n"; stream << indent << "state = " << getStateName() << "\n"; if (session == NULL) { stream << indent << "session = NULL\n"; } else { stream << indent << "session pid = " << session->getPid() << " (" << session->getGroup()->name << ")\n"; stream << indent << "session gupid = " << session->getGupid() << "\n"; stream << indent << "session initiated = " << boolStr(session->initiated()) << "\n"; } stream << indent << "requestBodyIsBuffered = " << boolStr(requestBodyIsBuffered) << "\n" << indent << "contentLength = " << contentLength << "\n" << indent << "clientBodyAlreadyRead = " << clientBodyAlreadyRead << "\n" << indent << "clientInput = " << clientInput.get() << " " << clientInput->inspect() << "\n" << indent << "clientInput started = " << boolStr(clientInput->isStarted()) << "\n" << indent << "clientBodyBuffer started = " << boolStr(clientBodyBuffer->isStarted()) << "\n" << indent << "clientBodyBuffer reachedEnd = " << boolStr(clientBodyBuffer->reachedEnd()) << "\n" << indent << "clientOutputPipe started = " << boolStr(clientOutputPipe->isStarted()) << "\n" << indent << "clientOutputPipe reachedEnd = " << boolStr(clientOutputPipe->reachedEnd()) << "\n" << indent << "clientOutputWatcher active = " << boolStr(clientOutputWatcher.is_active()) << "\n" << indent << "appInput = " << appInput.get() << " " << appInput->inspect() << "\n" << indent << "appInput started = " << boolStr(appInput->isStarted()) << "\n" << indent << "appInput reachedEnd = " << boolStr(appInput->endReached()) << "\n" << indent << "responseHeaderSeen = " << boolStr(responseHeaderSeen) << "\n" << indent << "useUnionStation = " << boolStr(useUnionStation()) << "\n" ; } }; typedef boost::shared_ptr ClientPtr; class RequestHandler { public: enum BenchmarkPoint { BP_NONE, BP_AFTER_ACCEPT, BP_AFTER_CHECK_CONNECT_PASSWORD, BP_AFTER_PARSING_HEADER, BP_BEFORE_CHECKOUT_SESSION }; private: friend class Client; typedef UnionStation::LoggerFactory LoggerFactory; typedef UnionStation::LoggerFactoryPtr LoggerFactoryPtr; typedef UnionStation::LoggerPtr LoggerPtr; const SafeLibevPtr libev; FileDescriptor requestSocket; PoolPtr pool; const AgentOptions &options; const ResourceLocator resourceLocator; LoggerFactoryPtr loggerFactory; ev::io requestSocketWatcher; ev::timer resumeSocketWatcherTimer; HashMap clients; Timer inactivityTimer; bool accept4Available; void disconnect(const ClientPtr &client) { // Prevent Client object from being destroyed until we're done. ClientPtr reference = client; clients.erase(client->fd); client->discard(); client->verifyInvariants(); RH_DEBUG(client, "Disconnected; new client count = " << clients.size()); if (clients.empty()) { inactivityTimer.start(); } } void disconnectWithError(const ClientPtr &client, const StaticString &message) { RH_WARN(client, "Disconnecting with error: " << message); if (client->useUnionStation()) { client->logMessage("Disconnecting with error: " + message); } disconnect(client); } void disconnectWithClientSocketWriteError(const ClientPtr &client, int e) { stringstream message; message << "client socket write error: "; message << strerror(e); message << " (errno=" << e << ")"; disconnectWithError(client, message.str()); } void disconnectWithAppSocketWriteError(const ClientPtr &client, int e) { stringstream message; message << "app socket write error: "; message << strerror(e); message << " (errno=" << e << ")"; disconnectWithError(client, message.str()); } void disconnectWithWarning(const ClientPtr &client, const StaticString &message) { P_DEBUG("Disconnected client " << client->name() << " with warning: " << message); disconnect(client); } template static Number clamp(Number n, Number min, Number max) { if (n < min) { return min; } else if (n > max) { return max; } else { return n; } } // GDB helper function, implemented in .cpp file to prevent inlining. Client *getClientPointer(const ClientPtr &client); void doResetInactivityTime() { inactivityTimer.reset(); } void getInactivityTime(unsigned long long *result) const { *result = inactivityTimer.elapsed(); } static bool getBoolOption(const ClientPtr &client, const StaticString &name, bool defaultValue = false) { ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name); if (it != client->scgiParser.end()) { return it->second == "true"; } else { return defaultValue; } } static long long getULongLongOption(const ClientPtr &client, const StaticString &name, long long defaultValue = -1) { ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name); if (it != client->scgiParser.end()) { long long result = stringToULL(it->second); // The client may send a malicious integer, so check for this. if (result < 0) { return defaultValue; } else { return result; } } else { return defaultValue; } } void writeSimpleResponse(const ClientPtr &client, const StaticString &data, int code = 200) { char header[256], statusBuffer[50]; char *pos = header; const char *end = header + sizeof(header) - 1; const char *status; status = getStatusCodeAndReasonPhrase(code); if (status == NULL) { snprintf(statusBuffer, sizeof(statusBuffer), "%d Unknown Reason-Phrase", code); status = statusBuffer; } if (getBoolOption(client, "PASSENGER_STATUS_LINE", true)) { pos += snprintf(pos, end - pos, "HTTP/1.1 %s\r\n", status); } pos += snprintf(pos, end - pos, "Status: %s\r\n" "Content-Length: %lu\r\n" "Content-Type: text/html; charset=UTF-8\r\n" "Cache-Control: no-cache, no-store, must-revalidate\r\n" "\r\n", status, (unsigned long) data.size()); client->clientOutputPipe->write(header, pos - header); if (!client->connected()) { return; } client->clientOutputPipe->write(data.data(), data.size()); if (!client->connected()) { return; } client->clientOutputPipe->end(); if (!client->connected()) { return; } if (client->useUnionStation()) { snprintf(header, end - header, "Status: %d %s", code, status); client->logMessage(header); } } void writeErrorResponse(const ClientPtr &client, const StaticString &message, const SpawnException *e = NULL) { assert(client->state < Client::FORWARDING_BODY_TO_APP); client->state = Client::WRITING_SIMPLE_RESPONSE; string templatesDir = resourceLocator.getResourcesDir() + "/templates"; string data; if (getBoolOption(client, "PASSENGER_FRIENDLY_ERROR_PAGES", true)) { try { string cssFile = templatesDir + "/error_layout.css"; string errorLayoutFile = templatesDir + "/error_layout.html.template"; string generalErrorFile = (e != NULL && e->isHTML()) ? templatesDir + "/general_error_with_html.html.template" : templatesDir + "/general_error.html.template"; string css = readAll(cssFile); StringMap params; params.set("CSS", css); params.set("APP_ROOT", client->options.appRoot); params.set("RUBY", client->options.ruby); params.set("ENVIRONMENT", client->options.environment); params.set("MESSAGE", message); params.set("IS_RUBY_APP", (client->options.appType == "classic-rails" || client->options.appType == "rack") ? "true" : "false"); if (e != NULL) { params.set("TITLE", "Web application could not be started"); // Store all SpawnException annotations into 'params', // but convert its name to uppercase. const map &annotations = e->getAnnotations(); map::const_iterator it, end = annotations.end(); for (it = annotations.begin(); it != end; it++) { string name = it->first; for (string::size_type i = 0; i < name.size(); i++) { name[i] = toupper(name[i]); } params.set(name, it->second); } } else { params.set("TITLE", "Internal server error"); } string content = Template::apply(readAll(generalErrorFile), params); params.set("CONTENT", content); data = Template::apply(readAll(errorLayoutFile), params); } catch (const SystemException &e2) { P_ERROR("Cannot render an error page: " << e2.what() << "\n" << e2.backtrace()); data = message; } } else { try { data = readAll(templatesDir + "/undisclosed_error.html.template"); } catch (const SystemException &e2) { P_ERROR("Cannot render an error page: " << e2.what() << "\n" << e2.backtrace()); data = "Internal Server Error"; } } stringstream str; if (getBoolOption(client, "PASSENGER_STATUS_LINE", true)) { str << "HTTP/1.1 500 Internal Server Error\r\n"; } str << "Status: 500 Internal Server Error\r\n"; str << "Content-Length: " << data.size() << "\r\n"; str << "Content-Type: text/html; charset=UTF-8\r\n"; str << "Cache-Control: no-cache, no-store, must-revalidate\r\n"; str << "\r\n"; const string header = str.str(); client->clientOutputPipe->write(header.data(), header.size()); if (!client->connected()) { return; } client->clientOutputPipe->write(data.data(), data.size()); if (!client->connected()) { return; } client->clientOutputPipe->end(); if (!client->connected()) { return; } if (client->useUnionStation()) { client->logMessage("Status: 500 Internal Server Error"); // TODO: record error message } } static BenchmarkPoint getDefaultBenchmarkPoint() { const char *val = getenv("PASSENGER_REQUEST_HANDLER_BENCHMARK_POINT"); if (val == NULL || *val == '\0') { return BP_NONE; } else if (strcmp(val, "after_accept") == 0) { return BP_AFTER_ACCEPT; } else if (strcmp(val, "after_check_connect_password") == 0) { return BP_AFTER_CHECK_CONNECT_PASSWORD; } else if (strcmp(val, "after_parsing_header") == 0) { return BP_AFTER_PARSING_HEADER; } else if (strcmp(val, "before_checkout_session") == 0) { return BP_BEFORE_CHECKOUT_SESSION; } else { P_WARN("Invalid RequestHandler benchmark point requested: " << val); return BP_NONE; } } /***************************************************** * COMPONENT: appInput -> clientOutputPipe plumbing * * The following code receives data from appInput, * possibly modifies it, and forwards it to * clientOutputPipe. *****************************************************/ struct Header { StaticString key; StaticString value; Header() { } Header(const StaticString &_key, const StaticString &_value) : key(_key), value(_value) { } bool empty() const { return key.empty(); } const char *begin() const { return key.data(); } const char *end() const { return value.data() + value.size() + sizeof("\r\n") - 1; } size_t size() const { return end() - begin(); } }; /** Given a substring containing the start of the header value, * extracts the substring that contains a single header value. * * const char *data = * "Status: 200 OK\r\n" * "Foo: bar\r\n"; * extractHeaderValue(data + strlen("Status:"), strlen(data) - strlen("Status:")); * // "200 OK" */ static StaticString extractHeaderValue(const char *data, size_t size) { const char *start = data; const char *end = data + size; const char *terminator; while (start < end && *start == ' ') { start++; } terminator = (const char *) memchr(start, '\r', end - start); if (terminator == NULL) { return StaticString(); } else { return StaticString(start, terminator - start); } } static Header lookupHeader(const StaticString &headerData, const StaticString &name) { string::size_type searchStart = 0; while (searchStart < headerData.size()) { string::size_type pos = headerData.find(name, searchStart); if (OXT_UNLIKELY(pos == string::npos)) { return Header(); } else if ((pos == 0 || headerData[pos - 1] == '\n') && headerData.size() > pos + name.size() && headerData[pos + name.size()] == ':') { StaticString value = extractHeaderValue( headerData.data() + pos + name.size() + 1, headerData.size() - pos - name.size() - 1); return Header(headerData.substr(pos, name.size()), value); } else { searchStart = pos + name.size() + 1; } } return Header(); } static Header lookupHeader(const StaticString &headerData, const StaticString &name, const StaticString &name2) { Header header = lookupHeader(headerData, name); if (header.empty()) { header = lookupHeader(headerData, name2); } return header; } bool addStatusHeaderFromStatusLine(const ClientPtr &client, string &headerData) { string::size_type begin, end; begin = headerData.find(' '); if (begin != string::npos) { end = headerData.find("\r\n", begin + 1); } else { end = string::npos; } if (begin != string::npos && end != string::npos) { StaticString statusValue(headerData.data() + begin + 1, end - begin); if (statusValue.size() <= MAX_STATUS_HEADER_SIZE) { char header[MAX_STATUS_HEADER_SIZE + sizeof("Status: \r\n")]; char *pos = header; const char *end = header + sizeof(header); pos = appendData(pos, end, "Status: "); pos = appendData(pos, end, statusValue); pos = appendData(pos, end, "\r\n"); headerData.append(StaticString(header, pos - header)); return true; } else { disconnectWithError(client, "application sent malformed response: the Status header's (" + statusValue + ") exceeds the allowed limit of " + toString(MAX_STATUS_HEADER_SIZE) + " bytes."); return false; } } else { disconnectWithError(client, "application sent malformed response: the HTTP status line is invalid."); return false; } } static bool addReasonPhrase(string &headerData, const Header &status) { if (status.value.find(' ') == string::npos) { int statusCode = stringToInt(status.value); const char *statusCodeAndReasonPhrase = getStatusCodeAndReasonPhrase(statusCode); char newStatus[100]; char *pos = newStatus; const char *end = newStatus + sizeof(newStatus); pos = appendData(pos, end, "Status: "); if (statusCodeAndReasonPhrase == NULL) { pos = appendData(pos, end, toString(statusCode)); pos = appendData(pos, end, " Unknown Reason-Phrase\r\n"); } else { pos = appendData(pos, end, statusCodeAndReasonPhrase); pos = appendData(pos, end, "\r\n"); } headerData.replace(status.begin() - headerData.data(), status.size(), newStatus, pos - newStatus); return true; } else { return false; } } bool removeStatusLine(const ClientPtr &client, string &headerData) { string::size_type end = headerData.find("\r\n"); if (end != string::npos) { headerData.erase(0, end + 2); return true; } else { disconnectWithError(client, "application sent malformed response: the HTTP status line is invalid."); return false; } } static void addStatusLineFromStatusHeader(string &headerData, const Header &status) { char statusLine[100]; char *pos = statusLine; const char *end = statusLine + sizeof(statusLine); pos = appendData(pos, end, "HTTP/1.1 "); pos = appendData(pos, end, status.value); pos = appendData(pos, end, "\r\n"); headerData.insert(0, statusLine, pos - statusLine); } static void removeHeader(string &headerData, const Header &header) { headerData.erase(header.begin() - headerData.data(), header.size()); } /* * Given a full header, possibly modify the header and send it to the clientOutputPipe. */ bool processResponseHeader(const ClientPtr &client, const StaticString &origHeaderData) { string headerData; headerData.reserve(origHeaderData.size() + 150); // Strip trailing CRLF. headerData.append(origHeaderData.data(), origHeaderData.size() - 2); if (startsWith(headerData, "HTTP/1.")) { Header status = lookupHeader(headerData, "Status", "status"); if (status.empty()) { // Add status header if necessary. if (!addStatusHeaderFromStatusLine(client, headerData)) { return false; } } else { // Add reason phrase to existing status header if necessary. addReasonPhrase(headerData, status); } // Remove status line if necesary. if (!getBoolOption(client, "PASSENGER_STATUS_LINE", true)) { if (!removeStatusLine(client, headerData)) { return false; } } } else { Header status = lookupHeader(headerData, "Status", "status"); if (!status.empty()) { // Add reason phrase to status header if necessary. if (addReasonPhrase(headerData, status)) { status = lookupHeader(headerData, "Status", "status"); } // Add status line if necessary. if (getBoolOption(client, "PASSENGER_STATUS_LINE", true)) { addStatusLineFromStatusHeader(headerData, status); } } else { disconnectWithError(client, "application sent malformed response: it didn't send an HTTP status line or a Status header."); return false; } } if (client->useUnionStation()) { Header status = lookupHeader(headerData, "Status", "status"); string message = "Status: "; message.append(status.value); client->logMessage(message); } // Process chunked transfer encoding. Header transferEncoding = lookupHeader(headerData, "Transfer-Encoding", "transfer-encoding"); if (!transferEncoding.empty() && transferEncoding.value == "chunked") { P_TRACE(3, "Response with chunked transfer encoding detected."); client->chunkedResponse = true; removeHeader(headerData, transferEncoding); } // Add X-Powered-By. if (getBoolOption(client, "PASSENGER_SHOW_VERSION_IN_HEADER", true)) { headerData.append("X-Powered-By: Phusion Passenger " PASSENGER_VERSION "\r\n"); } else { headerData.append("X-Powered-By: Phusion Passenger\r\n"); } // Add sticky session ID. if (client->stickySession && client->session != NULL) { StaticString cookieName = getStickySessionCookieName(client); headerData.append("Set-Cookie: "); headerData.append(cookieName.data(), cookieName.size()); headerData.append("="); headerData.append(toString(client->session->getStickySessionId())); headerData.append("; HttpOnly\r\n"); } // Add Date header. https://code.google.com/p/phusion-passenger/issues/detail?id=485 if (lookupHeader(headerData, "Date", "date").empty()) { char dateStr[60]; char *pos = dateStr; const char *end = dateStr + sizeof(dateStr) - 1; time_t the_time = time(NULL); struct tm the_tm; pos = appendData(pos, end, "Date: "); gmtime_r(&the_time, &the_tm); pos += strftime(pos, end - pos, "%a, %d %b %Y %H:%M:%S %Z", &the_tm); pos = appendData(pos, end, "\r\n"); headerData.append(dateStr, pos - dateStr); } // Detect out of band work request Header oobw = lookupHeader(headerData, "X-Passenger-Request-OOB-Work", "x-passenger-request-oob-work"); if (!oobw.empty()) { P_TRACE(3, "Response with oobw detected."); if (client->session != NULL) { client->session->requestOOBW(); } removeHeader(headerData, oobw); } headerData.append("\r\n"); writeToClientOutputPipe(client, headerData); return true; } void writeToClientOutputPipe(const ClientPtr &client, const StaticString &data) { bool wasCommittingToDisk = client->clientOutputPipe->isCommittingToDisk(); bool nowCommittingToDisk = !client->clientOutputPipe->write(data.data(), data.size()); if (!client->connected()) { // EPIPE/ECONNRESET detected. return; } if (!wasCommittingToDisk && nowCommittingToDisk) { RH_TRACE(client, 3, "Buffering response data to disk; temporarily stopping application socket."); client->backgroundOperations++; // If the data comes from writeErrorResponse(), then appInput is not available. if (client->session != NULL && client->session->initiated()) { client->appInput->stop(); } } } size_t onAppInputData(const ClientPtr &client, const StaticString &data) { RH_LOG_EVENT(client, "onAppInputData"); if (!client->connected()) { return 0; } if (!data.empty()) { RH_TRACE(client, 3, "Application sent data: \"" << cEscapeString(data) << "\""); // Buffer the application response until we've encountered the end of the header. if (!client->responseHeaderSeen) { size_t consumed = client->responseHeaderBufferer.feed(data.data(), data.size()); if (!client->responseHeaderBufferer.acceptingInput()) { if (client->responseHeaderBufferer.hasError()) { disconnectWithError(client, "application response format error (invalid header)"); } else { // Now that we have a full header, do something with it. client->responseHeaderSeen = true; StaticString header = client->responseHeaderBufferer.getData(); if (processResponseHeader(client, header)) { return consumed; } else { assert(!client->connected()); } } } // The header has already been processed so forward it // directly to clientOutputPipe, possibly through a // dechunker first. } else if (client->chunkedResponse) { client->responseDechunker.feed(data.data(), data.size()); } else { onAppInputChunk(client, data); } return data.size(); } else { onAppInputEof(client); return 0; } } void onAppInputChunk(const ClientPtr &client, const StaticString &data) { RH_LOG_EVENT(client, "onAppInputChunk"); writeToClientOutputPipe(client, data); } void onAppInputChunkEnd(const ClientPtr &client) { RH_LOG_EVENT(client, "onAppInputChunkEnd"); onAppInputEof(client); } void onAppInputEof(const ClientPtr &client) { RH_LOG_EVENT(client, "onAppInputEof"); // Check for session == NULL in order to avoid executing the code twice on // responses with chunked encoding. if (!client->connected() || client->session == NULL) { return; } RH_DEBUG(client, "Application sent EOF"); client->session.reset(); client->endScopeLog(&client->scopeLogs.requestProxying); client->clientOutputPipe->end(); } void onAppInputError(const ClientPtr &client, const char *message, int errorCode) { RH_LOG_EVENT(client, "onAppInputError"); if (!client->connected()) { return; } if (errorCode == ECONNRESET) { // We might as well treat ECONNRESET like an EOF. // http://stackoverflow.com/questions/2974021/what-does-econnreset-mean-in-the-context-of-an-af-local-socket onAppInputEof(client); } else { stringstream message; message << "application socket read error: "; message << strerror(errorCode); message << " (fd=" << client->appInput->getFd(); message << ", errno=" << errorCode << ")"; disconnectWithError(client, message.str()); } } void onClientOutputPipeCommit(const ClientPtr &client) { RH_LOG_EVENT(client, "onClientOutputPipeCommit"); if (!client->connected()) { return; } RH_TRACE(client, 3, "Done buffering response data to disk; resuming application socket."); client->backgroundOperations--; // If the data comes from writeErrorResponse(), then appInput is not available. if (client->session != NULL && client->session->initiated()) { client->appInput->start(); } } /***************************************************** * COMPONENT: clientOutputPipe -> client fd plumbing * * The following code handles forwarding data from * clientOutputPipe to the client socket. *****************************************************/ void onClientOutputPipeData(const ClientPtr &client, const char *data, size_t size, const FileBackedPipe::ConsumeCallback &consumed) { RH_LOG_EVENT(client, "onClientOutputPipeData"); if (!client->connected()) { return; } RH_TRACE(client, 3, "Forwarding " << size << " bytes of application data to client."); ssize_t ret = syscalls::write(client->fd, data, size); if (ret == -1) { int e = errno; RH_TRACE(client, 3, "Could not write to client socket: " << strerror(e) << " (errno=" << e << ")"); if (e == EAGAIN) { RH_TRACE(client, 3, "Waiting until the client socket is writable again."); client->clientOutputWatcher.start(); consumed(0, true); } else if (e == EPIPE || e == ECONNRESET) { // If the client closed the connection then disconnect quietly. RH_TRACE(client, 3, "Client stopped reading prematurely"); if (client->useUnionStation()) { client->logMessage("Disconnecting: client stopped reading prematurely"); } disconnect(client); } else { disconnectWithClientSocketWriteError(client, e); } } else { RH_TRACE(client, 3, "Managed to forward " << ret << " bytes."); consumed(ret, false); } } void onClientOutputPipeEnd(const ClientPtr &client) { RH_LOG_EVENT(client, "onClientOutputPipeEnd"); if (!client->connected()) { return; } RH_TRACE(client, 2, "Client output pipe ended; disconnecting client"); client->endScopeLog(&client->scopeLogs.requestProcessing); disconnect(client); } void onClientOutputPipeError(const ClientPtr &client, int errorCode) { RH_LOG_EVENT(client, "onClientOutputPipeError"); if (!client->connected()) { return; } stringstream message; message << "client output pipe error: "; message << strerror(errorCode); message << " (errno=" << errorCode << ")"; disconnectWithError(client, message.str()); } void onClientOutputWritable(const ClientPtr &client) { RH_LOG_EVENT(client, "onClientOutputWritable"); if (!client->connected()) { return; } // Continue forwarding output data to the client. RH_TRACE(client, 3, "Client socket became writable again."); client->clientOutputWatcher.stop(); assert(!client->clientOutputPipe->isStarted()); client->clientOutputPipe->start(); } /***************************************************** * COMPONENT: client acceptor * * The following code accepts new client connections * and forwards events to the appropriate functions * depending on the client state. *****************************************************/ FileDescriptor acceptNonBlockingSocket(int sock) { union { struct sockaddr_in inaddr; struct sockaddr_un unaddr; } u; socklen_t addrlen = sizeof(u); if (accept4Available) { FileDescriptor fd(callAccept4(requestSocket, (struct sockaddr *) &u, &addrlen, O_NONBLOCK)); // FreeBSD returns EINVAL if accept4() is called with invalid flags. if (fd == -1 && (errno == ENOSYS || errno == EINVAL)) { accept4Available = false; return acceptNonBlockingSocket(sock); } else { return fd; } } else { FileDescriptor fd(syscalls::accept(requestSocket, (struct sockaddr *) &u, &addrlen)); if (fd != -1) { int e = errno; setNonBlocking(fd); errno = e; } return fd; } } void onResumeSocketWatcher(ev::timer &timer, int revents) { P_INFO("Resuming listening on server socket."); resumeSocketWatcherTimer.stop(); requestSocketWatcher.start(); } void onAcceptable(ev::io &io, int revents) { bool endReached = false; unsigned int count = 0; unsigned int maxAcceptTries = clamp(clients.size(), 1, 10); ClientPtr acceptedClients[10]; while (!endReached && count < maxAcceptTries) { FileDescriptor fd = acceptNonBlockingSocket(requestSocket); if (fd == -1) { if (errno == EAGAIN || errno == EWOULDBLOCK) { endReached = true; } else { int e = errno; P_ERROR("Cannot accept client: " << strerror(e) << " (errno=" << e << "). " << "Pausing listening on server socket for 3 seconds. " << "Current client count: " << clients.size()); requestSocketWatcher.stop(); resumeSocketWatcherTimer.start(); endReached = true; } } else if (benchmarkPoint == BP_AFTER_ACCEPT) { writeExact(fd, "HTTP/1.1 200 OK\r\n" "Status: 200 OK\r\n" "Content-Type: text/html\r\n" "Connection: close\r\n" "\r\n" "Benchmark point: after_accept\n"); } else { ClientPtr client = boost::make_shared(); client->associate(this, fd); clients.insert(make_pair((int) fd, client)); acceptedClients[count] = client; count++; RH_DEBUG(client, "New client accepted; new client count = " << clients.size()); } } for (unsigned int i = 0; i < count; i++) { acceptedClients[i]->clientInput->readNow(); } if (OXT_LIKELY(!clients.empty())) { inactivityTimer.stop(); } } size_t onClientInputData(const ClientPtr &client, const StaticString &data) { RH_LOG_EVENT(client, "onClientInputData"); if (!client->connected()) { return 0; } if (data.empty()) { onClientEof(client); return 0; } else { return onClientRealData(client, data.data(), data.size()); } } size_t onClientRealData(const ClientPtr &client, const char *buf, size_t size) { size_t consumed = 0; while (consumed < size && client->connected() && client->clientInput->isStarted()) { const char *data = buf + consumed; size_t len = size - consumed; size_t locallyConsumed; RH_TRACE(client, 3, "Processing client data: \"" << cEscapeString(StaticString(data, len)) << "\""); switch (client->state) { case Client::BEGIN_READING_CONNECT_PASSWORD: locallyConsumed = state_beginReadingConnectPassword_onClientData(client, data, len); break; case Client::STILL_READING_CONNECT_PASSWORD: locallyConsumed = state_stillReadingConnectPassword_onClientData(client, data, len); break; case Client::READING_HEADER: locallyConsumed = state_readingHeader_onClientData(client, data, len); break; case Client::BUFFERING_REQUEST_BODY: locallyConsumed = state_bufferingRequestBody_onClientData(client, data, len); break; case Client::FORWARDING_BODY_TO_APP: locallyConsumed = state_forwardingBodyToApp_onClientData(client, data, len); break; default: abort(); } consumed += locallyConsumed; RH_TRACE(client, 3, "Processed client data: consumed " << locallyConsumed << " bytes"); assert(consumed <= size); } return consumed; } void onClientEof(const ClientPtr &client) { RH_LOG_EVENT(client, "onClientEof; client sent EOF"); switch (client->state) { case Client::BUFFERING_REQUEST_BODY: state_bufferingRequestBody_onClientEof(client); break; case Client::FORWARDING_BODY_TO_APP: state_forwardingBodyToApp_onClientEof(client); break; default: disconnect(client); break; } } void onClientInputError(const ClientPtr &client, const char *message, int errnoCode) { RH_LOG_EVENT(client, "onClientInputError"); if (!client->connected()) { return; } if (errnoCode == ECONNRESET) { // We might as well treat ECONNRESET like an EOF. // http://stackoverflow.com/questions/2974021/what-does-econnreset-mean-in-the-context-of-an-af-local-socket RH_TRACE(client, 3, "Client socket ECONNRESET error; treating it as EOF"); onClientEof(client); } else { stringstream message; message << "client socket read error: "; message << strerror(errnoCode); message << " (errno=" << errnoCode << ")"; disconnectWithError(client, message.str()); } } void onClientBodyBufferData(const ClientPtr &client, const char *data, size_t size, const FileBackedPipe::ConsumeCallback &consumed) { RH_LOG_EVENT(client, "onClientBodyBufferData"); if (!client->connected()) { return; } switch (client->state) { case Client::FORWARDING_BODY_TO_APP: state_forwardingBodyToApp_onClientBodyBufferData(client, data, size, consumed); break; default: abort(); } } void onClientBodyBufferError(const ClientPtr &client, int errorCode) { RH_LOG_EVENT(client, "onClientBodyBufferError"); if (!client->connected()) { return; } stringstream message; message << "client body buffer error: "; message << strerror(errorCode); message << " (errno=" << errorCode << ")"; disconnectWithError(client, message.str()); } void onClientBodyBufferEnd(const ClientPtr &client) { RH_LOG_EVENT(client, "onClientBodyBufferEnd"); if (!client->connected()) { return; } switch (client->state) { case Client::FORWARDING_BODY_TO_APP: state_forwardingBodyToApp_onClientBodyBufferEnd(client); break; default: abort(); } } void onClientBodyBufferCommit(const ClientPtr &client) { RH_LOG_EVENT(client, "onClientBodyBufferCommit"); if (!client->connected()) { return; } switch (client->state) { case Client::BUFFERING_REQUEST_BODY: state_bufferingRequestBody_onClientBodyBufferCommit(client); break; default: abort(); } } void onAppOutputWritable(const ClientPtr &client) { RH_LOG_EVENT(client, "onAppOutputWritable"); if (!client->connected()) { return; } switch (client->state) { case Client::SENDING_HEADER_TO_APP: state_sendingHeaderToApp_onAppOutputWritable(client); break; case Client::FORWARDING_BODY_TO_APP: state_forwardingBodyToApp_onAppOutputWritable(client); break; default: abort(); } } void onTimeout(const ClientPtr &client) { RH_LOG_EVENT(client, "onTimeout"); if (!client->connected()) { return; } switch (client->state) { case Client::BEGIN_READING_CONNECT_PASSWORD: case Client::STILL_READING_CONNECT_PASSWORD: disconnectWithError(client, "no connect password received within timeout"); break; default: disconnectWithError(client, "timeout"); break; } } /***************************************************** * COMPONENT: client -> application plumbing * * The following code implements forwarding data from * the client to the application. Code is seperated * by client state. *****************************************************/ /******* State: BEGIN_READING_CONNECT_PASSWORD *******/ void checkConnectPassword(const ClientPtr &client, const char *data, unsigned int len) { RH_TRACE(client, 3, "Given connect password: \"" << cEscapeString(StaticString(data, len)) << "\""); if (constantTimeCompare(StaticString(data, len), options.requestSocketPassword)) { RH_TRACE(client, 3, "Connect password is correct; reading header"); client->state = Client::READING_HEADER; client->freeBufferedConnectPassword(); client->timeoutTimer.stop(); if (benchmarkPoint == BP_AFTER_CHECK_CONNECT_PASSWORD) { writeSimpleResponse(client, "Benchmark point: after_check_connect_password\n"); } } else { disconnectWithError(client, "wrong connect password"); } } size_t state_beginReadingConnectPassword_onClientData(const ClientPtr &client, const char *data, size_t size) { if (size >= options.requestSocketPassword.size()) { checkConnectPassword(client, data, options.requestSocketPassword.size()); return options.requestSocketPassword.size(); } else { client->bufferedConnectPassword.data = (char *) malloc(options.requestSocketPassword.size()); client->bufferedConnectPassword.alreadyRead = size; memcpy(client->bufferedConnectPassword.data, data, size); client->state = Client::STILL_READING_CONNECT_PASSWORD; return size; } } /******* State: STILL_READING_CONNECT_PASSWORD *******/ size_t state_stillReadingConnectPassword_onClientData(const ClientPtr &client, const char *data, size_t size) { size_t consumed = std::min(size, options.requestSocketPassword.size() - client->bufferedConnectPassword.alreadyRead); memcpy(client->bufferedConnectPassword.data + client->bufferedConnectPassword.alreadyRead, data, consumed); client->bufferedConnectPassword.alreadyRead += consumed; if (client->bufferedConnectPassword.alreadyRead == options.requestSocketPassword.size()) { checkConnectPassword(client, client->bufferedConnectPassword.data, options.requestSocketPassword.size()); } return consumed; } /******* State: READING_HEADER *******/ bool modifyClientHeaders(const ClientPtr &client) { ScgiRequestParser &parser = client->scgiParser; ScgiRequestParser::HeaderMap &map = parser.getMap(); ScgiRequestParser::iterator it, end = map.end(); bool modified = false; /* The Rack spec specifies that HTTP_CONTENT_LENGTH and HTTP_CONTENT_TYPE must * not exist and that their respective non-HTTP_ versions should exist instead. */ if ((it = map.find("HTTP_CONTENT_LENGTH")) != end) { if (map.find("CONTENT_LENGTH") == end) { map["CONTENT_LENGTH"] = it->second; map.erase("HTTP_CONTENT_LENGTH"); } else { map.erase(it); } modified = true; } if ((it = map.find("HTTP_CONTENT_TYPE")) != end) { if (map.find("CONTENT_TYPE") == end) { map["CONTENT_TYPE"] = it->second; map.erase("HTTP_CONTENT_TYPE"); } else { map.erase(it); } modified = true; } return modified; } static void fillPoolOption(const ClientPtr &client, StaticString &field, const StaticString &name) { ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name); if (it != client->scgiParser.end()) { field = it->second; } } static void fillPoolOption(const ClientPtr &client, bool &field, const StaticString &name) { ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name); if (it != client->scgiParser.end()) { field = it->second == "true"; } } static void fillPoolOption(const ClientPtr &client, unsigned int &field, const StaticString &name) { ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name); if (it != client->scgiParser.end()) { field = stringToUint(it->second); } } static void fillPoolOption(const ClientPtr &client, unsigned long &field, const StaticString &name) { ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name); if (it != client->scgiParser.end()) { field = stringToUint(it->second); } } static void fillPoolOption(const ClientPtr &client, long &field, const StaticString &name) { ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name); if (it != client->scgiParser.end()) { field = stringToInt(it->second); } } static void fillPoolOptionSecToMsec(const ClientPtr &client, unsigned int &field, const StaticString &name) { ScgiRequestParser::const_iterator it = client->scgiParser.getHeaderIterator(name); if (it != client->scgiParser.end()) { field = stringToUint(it->second) * 1000; } } void fillPoolOptions(const ClientPtr &client) { Options &options = client->options; ScgiRequestParser &parser = client->scgiParser; ScgiRequestParser::const_iterator it, end = client->scgiParser.end(); options = Options(); StaticString scriptName = parser.getHeader("SCRIPT_NAME"); StaticString appRoot = parser.getHeader("PASSENGER_APP_ROOT"); if (scriptName.empty()) { if (appRoot.empty()) { StaticString documentRoot = parser.getHeader("DOCUMENT_ROOT"); if (documentRoot.empty()) { disconnectWithError(client, "no PASSENGER_APP_ROOT or DOCUMENT_ROOT headers set."); return; } client->appRoot = extractDirName(documentRoot); options.appRoot = client->appRoot; } else { options.appRoot = appRoot; } } else { if (appRoot.empty()) { client->appRoot = extractDirName(resolveSymlink(parser.getHeader("DOCUMENT_ROOT"))); options.appRoot = client->appRoot; } else { options.appRoot = appRoot; } options.baseURI = scriptName; } options.ruby = this->options.defaultRubyCommand; options.logLevel = getLogLevel(); options.loggingAgentAddress = this->options.loggingAgentAddress; options.loggingAgentUsername = "logging"; options.loggingAgentPassword = this->options.loggingAgentPassword; options.defaultUser = this->options.defaultUser; options.defaultGroup = this->options.defaultGroup; fillPoolOption(client, options.appGroupName, "PASSENGER_APP_GROUP_NAME"); fillPoolOption(client, options.appType, "PASSENGER_APP_TYPE"); fillPoolOption(client, options.environment, "PASSENGER_APP_ENV"); fillPoolOption(client, options.ruby, "PASSENGER_RUBY"); fillPoolOption(client, options.python, "PASSENGER_PYTHON"); fillPoolOption(client, options.nodejs, "PASSENGER_NODEJS"); fillPoolOption(client, options.user, "PASSENGER_USER"); fillPoolOption(client, options.group, "PASSENGER_GROUP"); fillPoolOption(client, options.minProcesses, "PASSENGER_MIN_PROCESSES"); fillPoolOption(client, options.maxProcesses, "PASSENGER_MAX_PROCESSES"); fillPoolOption(client, options.maxRequests, "PASSENGER_MAX_REQUESTS"); fillPoolOption(client, options.spawnMethod, "PASSENGER_SPAWN_METHOD"); fillPoolOption(client, options.startCommand, "PASSENGER_START_COMMAND"); fillPoolOptionSecToMsec(client, options.startTimeout, "PASSENGER_START_TIMEOUT"); fillPoolOption(client, options.maxPreloaderIdleTime, "PASSENGER_MAX_PRELOADER_IDLE_TIME"); fillPoolOption(client, options.maxRequestQueueSize, "PASSENGER_MAX_REQUEST_QUEUE_SIZE"); fillPoolOption(client, options.statThrottleRate, "PASSENGER_STAT_THROTTLE_RATE"); fillPoolOption(client, options.restartDir, "PASSENGER_RESTART_DIR"); fillPoolOption(client, options.startupFile, "PASSENGER_STARTUP_FILE"); fillPoolOption(client, options.loadShellEnvvars, "PASSENGER_LOAD_SHELL_ENVVARS"); fillPoolOption(client, options.debugger, "PASSENGER_DEBUGGER"); fillPoolOption(client, options.raiseInternalError, "PASSENGER_RAISE_INTERNAL_ERROR"); setStickySessionId(client); /******************/ for (it = client->scgiParser.begin(); it != end; it++) { if (!startsWith(it->first, "PASSENGER_") && !startsWith(it->first, "HTTP_") && it->first != "PATH_INFO" && it->first != "SCRIPT_NAME" && it->first != "CONTENT_LENGTH" && it->first != "CONTENT_TYPE") { options.environmentVariables.push_back(*it); } } } void initializeUnionStation(const ClientPtr &client) { if (getBoolOption(client, "UNION_STATION_SUPPORT", false)) { Options &options = client->options; ScgiRequestParser &parser = client->scgiParser; StaticString key = parser.getHeader("UNION_STATION_KEY"); StaticString filters = parser.getHeader("UNION_STATION_FILTERS"); if (key.empty()) { disconnectWithError(client, "header UNION_STATION_KEY must be set."); return; } client->options.logger = loggerFactory->newTransaction( options.getAppGroupName(), "requests", key, filters); if (!client->options.logger->isNull()) { client->options.analytics = true; client->options.unionStationKey = key; } client->beginScopeLog(&client->scopeLogs.requestProcessing, "request processing"); StaticString staticRequestMethod = parser.getHeader("REQUEST_METHOD"); client->logMessage("Request method: " + staticRequestMethod); StaticString staticRequestURI = parser.getHeader("REQUEST_URI"); if (!staticRequestURI.empty()) { client->logMessage("URI: " + staticRequestURI); } else { string requestURI = parser.getHeader("SCRIPT_NAME"); requestURI.append(parser.getHeader("PATH_INFO")); StaticString queryString = parser.getHeader("QUERY_STRING"); if (!queryString.empty()) { requestURI.append("?"); requestURI.append(queryString); } client->logMessage("URI: " + requestURI); } } } void setStickySessionId(const ClientPtr &client) { ScgiRequestParser &parser = client->scgiParser; if (parser.getHeader("PASSENGER_STICKY_SESSION") == "true") { // TODO: This is not entirely correct. Clients MAY send multiple Cookie // headers, although this is in practice extremely rare. // http://stackoverflow.com/questions/16305814/are-multiple-cookie-headers-allowed-in-an-http-request StaticString cookie = parser.getHeader("HTTP_COOKIE"); StaticString cookieName = getStickySessionCookieName(client); vector parts; client->stickySession = true; split(cookie, ';', parts); foreach (StaticString part, parts) { const char *begin = part.data(); const char *end = part.data() + part.size(); const char *sep; // Skip leading whitespace in the name. while (begin < end && *begin == ' ') { begin++; } part = StaticString(begin, end - begin); // Find the separator ('='). sep = (const char *) memchr(begin, '=', end - begin); if (sep != NULL) { StaticString name(begin, sep - begin); if (name == cookieName) { // This cookie matches the one we're looking for. StaticString value(sep + 1, end - (sep + 1)); client->options.stickySessionId = stringToUint(value); return; } } } } } StaticString getStickySessionCookieName(const ClientPtr &client) const { StaticString value = client->scgiParser.getHeader("PASSENGER_STICKY_SESSION_COOKIE_NAME"); if (value.empty()) { return StaticString("_passenger_route", sizeof("_passenger_route") - 1); } else { return value; } } size_t state_readingHeader_onClientData(const ClientPtr &client, const char *data, size_t size) { ScgiRequestParser &parser = client->scgiParser; size_t consumed = parser.feed(data, size); if (!parser.acceptingInput()) { if (parser.getState() == ScgiRequestParser::ERROR) { if (parser.getErrorReason() == ScgiRequestParser::LIMIT_REACHED) { disconnectWithError(client, "SCGI header too large"); } else { disconnectWithError(client, "invalid SCGI header"); } return consumed; } if (benchmarkPoint == BP_AFTER_PARSING_HEADER) { writeSimpleResponse(client, "Benchmark point: after_parsing_header\n"); return consumed; } bool modified = modifyClientHeaders(client); /* TODO: in case the headers are not modified, we only need to rebuild the header data * right now because the scgiParser buffer is invalidated as soon as onClientData exits. * We should figure out a way to not copy anything if we can do everything before * onClientData exits. */ parser.rebuildData(modified); client->contentLength = getULongLongOption(client, "CONTENT_LENGTH"); fillPoolOptions(client); if (!client->connected()) { return consumed; } initializeUnionStation(client); if (!client->connected()) { return consumed; } if (getBoolOption(client, "PASSENGER_BUFFERING")) { RH_TRACE(client, 3, "Valid SCGI header; buffering request body"); client->state = Client::BUFFERING_REQUEST_BODY; client->requestBodyIsBuffered = true; client->beginScopeLog(&client->scopeLogs.bufferingRequestBody, "buffering request body"); if (client->contentLength == 0) { client->clientInput->stop(); state_bufferingRequestBody_onClientEof(client); return 0; } } else { RH_TRACE(client, 3, "Valid SCGI header; not buffering request body; checking out session"); client->clientInput->stop(); checkoutSession(client); } } return consumed; } /******* State: BUFFERING_REQUEST_BODY *******/ void state_bufferingRequestBody_verifyInvariants(const ClientPtr &client) const { assert(client->requestBodyIsBuffered); assert(!client->clientBodyBuffer->isStarted()); } size_t state_bufferingRequestBody_onClientData(const ClientPtr &client, const char *data, size_t size) { state_bufferingRequestBody_verifyInvariants(client); assert(!client->clientBodyBuffer->isCommittingToDisk()); if (client->contentLength >= 0) { size = std::min( size, (unsigned long long) client->contentLength - client->clientBodyAlreadyRead ); } if (!client->clientBodyBuffer->write(data, size)) { // The pipe cannot write the data to disk quickly enough, so // suspend reading from the client until the pipe is done. client->backgroundOperations++; // TODO: figure out whether this is necessary client->clientInput->stop(); } client->clientBodyAlreadyRead += size; RH_TRACE(client, 3, "Buffered " << size << " bytes of client body data; total=" << client->clientBodyAlreadyRead << ", content-length=" << client->contentLength); assert(client->contentLength == -1 || client->clientBodyAlreadyRead <= (unsigned long long) client->contentLength); if (client->contentLength >= 0 && client->clientBodyAlreadyRead == (unsigned long long) client->contentLength) { if (client->clientBodyBuffer->isCommittingToDisk()) { RH_TRACE(client, 3, "Done buffering request body, but clientBodyBuffer not yet done committing data to disk; waiting until it's done"); client->checkoutSessionAfterCommit = true; } else { client->clientInput->stop(); state_bufferingRequestBody_onClientEof(client); } } return size; } void state_bufferingRequestBody_onClientEof(const ClientPtr &client) { state_bufferingRequestBody_verifyInvariants(client); RH_TRACE(client, 3, "Done buffering request body; checking out session"); client->clientBodyBuffer->end(); client->endScopeLog(&client->scopeLogs.bufferingRequestBody); checkoutSession(client); } void state_bufferingRequestBody_onClientBodyBufferCommit(const ClientPtr &client) { // Now that the pipe has committed the data to disk // resume reading from the client socket. state_bufferingRequestBody_verifyInvariants(client); assert(!client->clientInput->isStarted()); client->backgroundOperations--; if (client->checkoutSessionAfterCommit) { RH_TRACE(client, 3, "Done committing request body to disk"); state_bufferingRequestBody_onClientEof(client); } else { client->clientInput->start(); } } /******* State: CHECKING_OUT_SESSION *******/ void state_checkingOutSession_verifyInvariants(const ClientPtr &client) { assert(!client->clientInput->isStarted()); assert(!client->clientBodyBuffer->isStarted()); } void checkoutSession(const ClientPtr &client) { if (benchmarkPoint != BP_BEFORE_CHECKOUT_SESSION) { RH_TRACE(client, 2, "Checking out session: appRoot=" << client->options.appRoot); client->state = Client::CHECKING_OUT_SESSION; client->beginScopeLog(&client->scopeLogs.getFromPool, "get from pool"); pool->asyncGet(client->options, boost::bind(&RequestHandler::sessionCheckedOut, this, client, _1, _2)); if (!client->sessionCheckedOut) { client->backgroundOperations++; } } else { writeSimpleResponse(client, "Benchmark point: before_checkout_session\n"); } } void sessionCheckedOut(ClientPtr client, const SessionPtr &session, const ExceptionPtr &e) { if (!pthread_equal(pthread_self(), libev->getCurrentThread())) { libev->runLater(boost::bind(&RequestHandler::sessionCheckedOut_real, this, client, session, e)); } else { sessionCheckedOut_real(client, session, e); } } void sessionCheckedOut_real(ClientPtr client, const SessionPtr &session, const ExceptionPtr &e) { RH_LOG_EVENT(client, "sessionCheckedOut"); if (!client->connected()) { return; } state_checkingOutSession_verifyInvariants(client); client->backgroundOperations--; client->sessionCheckedOut = true; if (e != NULL) { client->endScopeLog(&client->scopeLogs.getFromPool, false); { boost::shared_ptr e2 = dynamic_pointer_cast(e); if (e2 != NULL) { writeRequestQueueFullExceptionErrorResponse(client); return; } } { boost::shared_ptr e2 = dynamic_pointer_cast(e); if (e2 != NULL) { writeSpawnExceptionErrorResponse(client, e2); return; } } writeOtherExceptionErrorResponse(client, e); } else { RH_DEBUG(client, "Session checked out: pid=" << session->getPid() << ", gupid=" << session->getGupid()); client->session = session; initiateSession(client); } } void writeRequestQueueFullExceptionErrorResponse(const ClientPtr &client) { StaticString value = client->scgiParser.getHeader("PASSENGER_REQUEST_QUEUE_OVERFLOW_STATUS_CODE"); int requestQueueOverflowStatusCode = 503; if (!value.empty()) { requestQueueOverflowStatusCode = atoi(value.data()); } writeSimpleResponse(client, "

This website is under heavy load

" "

We're sorry, too many people are accessing this website at the same " "time. We're working on this problem. Please try again later.

", requestQueueOverflowStatusCode); } void writeSpawnExceptionErrorResponse(const ClientPtr &client, const boost::shared_ptr &e) { if (strip(e->getErrorPage()).empty()) { RH_WARN(client, "Cannot checkout session. " << e->what()); writeErrorResponse(client, e->what()); } else { RH_WARN(client, "Cannot checkout session.\nError page:\n" << e->getErrorPage()); writeErrorResponse(client, e->getErrorPage(), e.get()); } } void writeOtherExceptionErrorResponse(const ClientPtr &client, const ExceptionPtr &e) { string typeName; #ifdef CXX_ABI_API_AVAILABLE int status; char *tmp = abi::__cxa_demangle(typeid(*e).name(), 0, 0, &status); if (tmp != NULL) { typeName = tmp; free(tmp); } else { typeName = typeid(*e).name(); } #else typeName = typeid(*e).name(); #endif RH_WARN(client, "Cannot checkout session (exception type " << typeName << "): " << e->what()); string response = "An internal error occurred while trying to spawn the application.\n"; response.append("Exception type: "); response.append(typeName); response.append("\nError message: "); response.append(e->what()); boost::shared_ptr e3 = dynamic_pointer_cast(e); if (e3 != NULL) { response.append("\nBacktrace:\n"); response.append(e3->backtrace()); } writeErrorResponse(client, response); } void initiateSession(const ClientPtr &client) { assert(client->state == Client::CHECKING_OUT_SESSION); client->sessionCheckoutTry++; try { client->session->initiate(); } catch (const SystemException &e2) { if (client->sessionCheckoutTry < 10) { RH_DEBUG(client, "Error checking out session (" << e2.what() << "); retrying (attempt " << client->sessionCheckoutTry << ")"); client->sessionCheckedOut = false; pool->asyncGet(client->options, boost::bind(&RequestHandler::sessionCheckedOut, this, client, _1, _2)); if (!client->sessionCheckedOut) { client->backgroundOperations++; } } else { string message = "could not initiate a session ("; message.append(e2.what()); message.append(")"); disconnectWithError(client, message); } return; } if (client->useUnionStation()) { client->endScopeLog(&client->scopeLogs.getFromPool); client->logMessage("Application PID: " + toString(client->session->getPid()) + " (GUPID: " + client->session->getGupid() + ")"); client->beginScopeLog(&client->scopeLogs.requestProxying, "request proxying"); } RH_DEBUG(client, "Session initiated: fd=" << client->session->fd()); setNonBlocking(client->session->fd()); client->appInput->reset(libev.get(), client->session->fd()); client->appInput->start(); client->appOutputWatcher.set(libev->getLoop()); client->appOutputWatcher.set(client->session->fd(), ev::WRITE); sendHeaderToApp(client); } /******* State: SENDING_HEADER_TO_APP *******/ void state_sendingHeaderToApp_verifyInvariants(const ClientPtr &client) { assert(!client->clientInput->isStarted()); assert(!client->clientBodyBuffer->isStarted()); } void sendHeaderToApp(const ClientPtr &client) { assert(!client->clientInput->isStarted()); assert(!client->clientBodyBuffer->isStarted()); RH_TRACE(client, 2, "Sending headers to application"); if (client->session == NULL) { disconnectWithError(client, "Application sent EOF before we were able to send headers to it"); } else if (client->session->getProtocol() == "session") { char sizeField[sizeof(uint32_t)]; SmallVector data; data.push_back(StaticString(sizeField, sizeof(uint32_t))); data.push_back(client->scgiParser.getHeaderData()); data.push_back(makeStaticStringWithNull("PASSENGER_CONNECT_PASSWORD")); data.push_back(makeStaticStringWithNull(client->session->getConnectPassword())); if (client->options.analytics) { data.push_back(makeStaticStringWithNull("PASSENGER_TXN_ID")); data.push_back(makeStaticStringWithNull(client->options.logger->getTxnId())); } uint32_t dataSize = 0; for (unsigned int i = 1; i < data.size(); i++) { dataSize += (uint32_t) data[i].size(); } Uint32Message::generate(sizeField, dataSize); ssize_t ret = gatheredWrite(client->session->fd(), &data[0], data.size(), client->appOutputBuffer); if (ret == -1 && errno != EAGAIN) { disconnectWithAppSocketWriteError(client, errno); } else if (!client->appOutputBuffer.empty()) { client->state = Client::SENDING_HEADER_TO_APP; client->appOutputWatcher.start(); } else { sendBodyToApp(client); } } else { assert(client->session->getProtocol() == "http_session"); const ScgiRequestParser &parser = client->scgiParser; ScgiRequestParser::const_iterator it, end = parser.end(); string data; data.reserve(parser.getHeaderData().size() + 128); data.append(parser.getHeader("REQUEST_METHOD")); data.append(" "); data.append(parser.getHeader("REQUEST_URI")); data.append(" HTTP/1.1\r\n"); for (it = parser.begin(); it != end; it++) { if (startsWith(it->first, "HTTP_") && it->first != "HTTP_CONNECTION") { string subheader = it->first.substr(sizeof("HTTP_") - 1); string::size_type i; for (i = 0; i < subheader.size(); i++) { if (subheader[i] == '_') { subheader[i] = '-'; } else if (i > 0 && subheader[i - 1] != '-') { subheader[i] = tolower(subheader[i]); } } data.append(subheader); data.append(": "); data.append(it->second); data.append("\r\n"); } } StaticString connection = parser.getHeader("HTTP_CONNECTION"); if (connection == "upgrade" || connection == "Upgrade") { data.append("Connection: "); data.append(connection.data(), connection.size()); data.append("\r\n"); } else { data.append("Connection: close\r\n"); } StaticString header = parser.getHeader("CONTENT_LENGTH"); if (!header.empty()) { data.append("Content-Length: "); data.append(header); data.append("\r\n"); } header = parser.getHeader("CONTENT_TYPE"); if (!header.empty()) { data.append("Content-Type: "); data.append(header); data.append("\r\n"); } if (client->options.analytics) { data.append("Passenger-Txn-Id: "); data.append(client->options.logger->getTxnId()); data.append("\r\n"); } data.append("\r\n"); StaticString datas[] = { data }; ssize_t ret = gatheredWrite(client->session->fd(), datas, 1, client->appOutputBuffer); if (ret == -1 && errno != EAGAIN) { disconnectWithAppSocketWriteError(client, errno); // TODO: what about other errors? } else if (!client->appOutputBuffer.empty()) { client->state = Client::SENDING_HEADER_TO_APP; client->appOutputWatcher.start(); } else { sendBodyToApp(client); } } } void state_sendingHeaderToApp_onAppOutputWritable(const ClientPtr &client) { state_sendingHeaderToApp_verifyInvariants(client); if (client->session == NULL) { disconnectWithError(client, "Application sent EOF before we were able to send headers to it"); } else { ssize_t ret = gatheredWrite(client->session->fd(), NULL, 0, client->appOutputBuffer); if (ret == -1) { if (errno != EAGAIN && errno != EPIPE && errno != ECONNRESET) { disconnectWithAppSocketWriteError(client, errno); } // TODO: what about other errors? } else if (client->appOutputBuffer.empty()) { client->appOutputWatcher.stop(); sendBodyToApp(client); } } } /******* State: FORWARDING_BODY_TO_APP *******/ void state_forwardingBodyToApp_verifyInvariants(const ClientPtr &client) const { assert(client->state == Client::FORWARDING_BODY_TO_APP); } void sendBodyToApp(const ClientPtr &client) { assert(client->appOutputBuffer.empty()); assert(!client->clientBodyBuffer->isStarted()); assert(!client->clientInput->isStarted()); assert(!client->appOutputWatcher.is_active()); RH_TRACE(client, 2, "Begin sending body to application"); client->state = Client::FORWARDING_BODY_TO_APP; if (client->requestBodyIsBuffered) { client->clientBodyBuffer->start(); } else if (client->contentLength == 0) { state_forwardingBodyToApp_onClientEof(client); } else { client->clientInput->start(); } } size_t state_forwardingBodyToApp_onClientData(const ClientPtr &client, const char *data, size_t size) { state_forwardingBodyToApp_verifyInvariants(client); assert(!client->requestBodyIsBuffered); if (client->contentLength >= 0) { size = std::min( size, (unsigned long long) client->contentLength - client->clientBodyAlreadyRead ); } RH_TRACE(client, 3, "Forwarding " << size << " bytes of client body data to application."); if (client->session == NULL) { RH_TRACE(client, 2, "Application had already sent EOF. Stop reading client input."); client->clientInput->stop(); syscalls::shutdown(client->fd, SHUT_RD); return 0; } ssize_t ret = syscalls::write(client->session->fd(), data, size); int e = errno; if (ret == -1) { RH_TRACE(client, 3, "Could not write to application socket: " << strerror(e) << " (errno=" << e << ")"); if (e == EAGAIN) { RH_TRACE(client, 3, "Waiting until the application socket is writable again."); client->clientInput->stop(); client->appOutputWatcher.start(); } else if (e == EPIPE || e == ECONNRESET) { // Client will be disconnected after response forwarding is done. client->clientInput->stop(); syscalls::shutdown(client->fd, SHUT_RD); } else { disconnectWithAppSocketWriteError(client, e); } return 0; } else { client->clientBodyAlreadyRead += ret; RH_TRACE(client, 3, "Managed to forward " << ret << " bytes; total=" << client->clientBodyAlreadyRead << ", content-length=" << client->contentLength); assert(client->contentLength == -1 || client->clientBodyAlreadyRead <= (unsigned long long) client->contentLength); if (client->contentLength >= 0 && client->clientBodyAlreadyRead == (unsigned long long) client->contentLength) { client->clientInput->stop(); state_forwardingBodyToApp_onClientEof(client); } return ret; } } void state_forwardingBodyToApp_onClientEof(const ClientPtr &client) { state_forwardingBodyToApp_verifyInvariants(client); assert(!client->requestBodyIsBuffered); RH_TRACE(client, 2, "End of (unbuffered) client body reached; done sending data to application"); client->clientInput->stop(); if (client->session != NULL && client->shouldHalfCloseWrite()) { syscalls::shutdown(client->session->fd(), SHUT_WR); } } void state_forwardingBodyToApp_onAppOutputWritable(const ClientPtr &client) { state_forwardingBodyToApp_verifyInvariants(client); RH_TRACE(client, 3, "Application socket became writable again."); client->appOutputWatcher.stop(); if (client->requestBodyIsBuffered) { assert(!client->clientBodyBuffer->isStarted()); client->clientBodyBuffer->start(); } else { assert(!client->clientInput->isStarted()); client->clientInput->start(); } } void state_forwardingBodyToApp_onClientBodyBufferData(const ClientPtr &client, const char *data, size_t size, const FileBackedPipe::ConsumeCallback &consumed) { state_forwardingBodyToApp_verifyInvariants(client); assert(client->requestBodyIsBuffered); RH_TRACE(client, 3, "Forwarding " << size << " bytes of buffered client body data to application."); if (client->session == NULL) { RH_TRACE(client, 2, "Application had already sent EOF. Stop reading client input."); syscalls::shutdown(client->fd, SHUT_RD); consumed(0, true); return; } ssize_t ret = syscalls::write(client->session->fd(), data, size); if (ret == -1) { int e = errno; RH_TRACE(client, 3, "Could not write to application socket: " << strerror(e) << " (errno=" << e << ")"); if (e == EAGAIN) { RH_TRACE(client, 3, "Waiting until the application socket is writable again."); client->appOutputWatcher.start(); consumed(0, true); } else if (e == EPIPE || e == ECONNRESET) { // Client will be disconnected after response forwarding is done. syscalls::shutdown(client->fd, SHUT_RD); consumed(0, true); } else { disconnectWithAppSocketWriteError(client, e); } } else { RH_TRACE(client, 3, "Managed to forward " << ret << " bytes."); consumed(ret, false); } } void state_forwardingBodyToApp_onClientBodyBufferEnd(const ClientPtr &client) { state_forwardingBodyToApp_verifyInvariants(client); assert(client->requestBodyIsBuffered); RH_TRACE(client, 2, "End of (buffered) client body reached; done sending data to application"); if (client->session != NULL && client->shouldHalfCloseWrite()) { syscalls::shutdown(client->session->fd(), SHUT_WR); } } public: // For unit testing purposes. unsigned int connectPasswordTimeout; // milliseconds BenchmarkPoint benchmarkPoint; RequestHandler(const SafeLibevPtr &_libev, const FileDescriptor &_requestSocket, const PoolPtr &_pool, const AgentOptions &_options) : libev(_libev), requestSocket(_requestSocket), pool(_pool), options(_options), resourceLocator(_options.passengerRoot), benchmarkPoint(getDefaultBenchmarkPoint()) { accept4Available = true; connectPasswordTimeout = 15000; loggerFactory = pool->loggerFactory; requestSocketWatcher.set(_requestSocket, ev::READ); requestSocketWatcher.set(_libev->getLoop()); requestSocketWatcher.set(this); requestSocketWatcher.start(); resumeSocketWatcherTimer.set(this); resumeSocketWatcherTimer.set(_libev->getLoop()); resumeSocketWatcherTimer.set(3, 3); } template void inspect(Stream &stream) const { stream << clients.size() << " clients:\n"; HashMap::const_iterator it; for (it = clients.begin(); it != clients.end(); it++) { const ClientPtr &client = it->second; stream << " Client " << client->fd << ":\n"; client->inspect(stream); } } void resetInactivityTime() { libev->run(boost::bind(&RequestHandler::doResetInactivityTime, this)); } unsigned long long inactivityTime() const { unsigned long long result; libev->run(boost::bind(&RequestHandler::getInactivityTime, this, &result)); return result; } }; } // namespace Passenger #endif /* _PASSENGER_REQUEST_HANDLER_H_ */ passenger-4.0.37/ext/common/agents/HelperAgent/ScgiRequestParser.h000644 000765 000024 00000032173 12233035540 025555 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_SCGI_REQUEST_PARSER_H_ #define _PASSENGER_SCGI_REQUEST_PARSER_H_ #include #include #include #include #include #include #include namespace Passenger { using namespace std; /** * A highly efficient parser for SCGI requests. It parses the request header and * ignores the body data. It supports size limiting for security reasons and it * is zero-copy whenever possible. * *

Usage

* Construct a parser object, then feed data to the parser until it no longer * accepts input, meaning that it has either reached the final (accepting) state * or the error state. * * Example: * @code * ScgiRequestParser parser; * char buf[1024 * 16]; * ssize_t size; * unsigned in bytesAccepted; * * do { * size = read(fd, buf, sizeof(buf)); * bytesAccepted = parser.feed(buf, size); * } while (parser.acceptingInput()); * * // Check whether a parse error occured. * if (parser.getState() == ScgiRequestParser::ERROR) { * bailOut(); * } else { * // All good! Do something with the SCGI header that the parser parsed. * processHeader(parser.getHeaderData()); * print(parser.getHeader("DOCUMENT_ROOT")); * * // If the last buffer passed to the parser also contains body data, * // then the body data starts at 'buf + bytesAccepted'. * if (bytesAccepted < size) { * processBody(buf + bytesAccepted, size - bytesAccepted); * } * } * @endcode * *

Parser properties

* - A parser object can only process a single SCGI request. You must discard * the existing parser object and create a new one if you want to process * another SCGI request. * - It checks the header netstring for both syntax validity and content validity. * If the netstring value is too large (larger than the given limit) or equal * to 0 then the parser will enter an error state. * - It also checks the body for syntax validity, i.e. whether the NULL bytes * are there, whether the closing comma exists, etc. However it does not check * the body contents, e.g. it doesn't check that "CONTENT_LENGTH" is the first * header, or that the "SCGI" header is present. * *

Zero-copy notes

* If the first feed() call contains a full SCGI header, then the parser will enter * zero-copy mode. The return value of getHeaderData() will then refer the passed * data and the internal header map will also refer to that same data. No extra * copy of anything is made. You must ensure that the first call's data is kept * around. * * If the first feed() call does not contain a full SCGI header then the parser * will enter buffering mode. All fed data, in so far they're recognized as SCGI * headers, will be buffered into an internal string. getHeaderData() and the * internal header map will then refer to this internal string. In this case * you don't need to ensure that the original data is kept around. */ class ScgiRequestParser { public: typedef HashMap< StaticString, StaticString, StaticString::Hash, equal_to > HeaderMap; typedef HeaderMap::const_iterator const_iterator; typedef HeaderMap::iterator iterator; enum State { READING_LENGTH_STRING, READING_HEADER_DATA, EXPECTING_COMMA, DONE, ERROR }; enum ErrorReason { NONE, /** The header has a length of 0 bytes. */ EMPTY_HEADER, /** The length string is too large. */ LENGTH_STRING_TOO_LARGE, /** The header is larger than the maxSize value provided to the constructor. */ LIMIT_REACHED, /** The length string contains an invalid character. */ INVALID_LENGTH_STRING, /** A header terminator character (",") was expected, but some else * was encountered instead. */ HEADER_TERMINATOR_EXPECTED, /** The header data itself contains errors. */ INVALID_HEADER_DATA }; private: State state; ErrorReason errorReason; unsigned int lengthStringBufferSize; size_t headerSize; size_t maxSize; StaticString headerData; string headerBuffer; HeaderMap headers; char lengthStringBuffer[sizeof("4294967296")]; static inline bool isDigit(char byte) { return byte >= '0' && byte <= '9'; } /** * Parse the given header data into key-value pairs, returns whether parsing succeeded. */ bool parseHeaderData(const StaticString &data, HeaderMap &output) { const char *current = data.data(); const char *end = data.data() + data.size(); while (current < end) { const char *keyEnd = (const char *) memchr(current, '\0', end - current); if (OXT_UNLIKELY( OXT_UNLIKELY(keyEnd == NULL) || OXT_UNLIKELY(keyEnd == current)) ) { return false; } StaticString key(current, keyEnd - current); current = keyEnd + 1; if (OXT_UNLIKELY(current >= end)) { return false; } const char *valueEnd = (const char *) memchr(current, '\0', end - current); if (OXT_UNLIKELY(valueEnd == NULL)) { return false; } output[key] = StaticString(current, valueEnd - current); current = valueEnd + 1; } return true; } public: /** * Create a new ScgiRequestParser, ready to parse a request. * * @param maxSize The maximum size that the SCGI data is allowed to * be, or 0 if no limit is desired. */ ScgiRequestParser(size_t maxSize = 0) { this->maxSize = maxSize; reset(); } void reset() { state = READING_LENGTH_STRING; errorReason = NONE; lengthStringBufferSize = 0; headerSize = 0; headerBuffer.clear(); headers.clear(); headerData = StaticString(); } /** * Feed SCGI request data to the parser. * * @param data The data to feed. * @param size The size of the data, in bytes. * @return The number of recognized SCGI header bytes. If this value * equals 'size', then it means all data in 'data' is part of * the SCGI header. If this value is less than size, then it * means only some data in 'data' is part of the SCGI header, * and the remaining 'size - result' bytes are part of the * request body. * @pre size > 0 * @post result <= size * @post if result <= size: getState() == DONE || getState() == ERROR */ size_t feed(const char *data, size_t size) { size_t consumed = 0; while (acceptingInput() && consumed < size) { switch (state) { case READING_LENGTH_STRING: while (consumed < size && lengthStringBufferSize < sizeof(lengthStringBuffer) - 1 && isDigit(data[consumed])) { lengthStringBuffer[lengthStringBufferSize] = data[consumed]; lengthStringBufferSize++; consumed++; } if (consumed < size) { if (data[consumed] == ':') { consumed++; lengthStringBuffer[lengthStringBufferSize] = '\0'; headerSize = atol(lengthStringBuffer); if (maxSize > 0 && headerSize > maxSize) { state = ERROR; errorReason = LIMIT_REACHED; } else if (headerSize == 0) { state = ERROR; errorReason = EMPTY_HEADER; } else { state = READING_HEADER_DATA; } } else if (lengthStringBufferSize >= sizeof(lengthStringBuffer) - 1) { state = ERROR; errorReason = LENGTH_STRING_TOO_LARGE; } else { state = ERROR; errorReason = INVALID_LENGTH_STRING; } } break; case READING_HEADER_DATA: { const char *localData = data + consumed; size_t localSize = std::min( headerSize - headerBuffer.size(), size - consumed); if (localSize == headerSize) { headerData = StaticString(localData, localSize); state = EXPECTING_COMMA; } else { if (headerBuffer.capacity() < headerSize) { headerBuffer.reserve(headerSize); } headerBuffer.append(localData, localSize); if (headerBuffer.size() == headerSize) { state = EXPECTING_COMMA; headerData = headerBuffer; } } consumed += localSize; break; } case EXPECTING_COMMA: if (data[consumed] == ',') { if (parseHeaderData(headerData, headers)) { state = DONE; } else { state = ERROR; errorReason = INVALID_HEADER_DATA; } consumed++; } else { state = ERROR; errorReason = HEADER_TERMINATOR_EXPECTED; } break; default: abort(); // Never reached. } } if (state == EXPECTING_COMMA && headerBuffer.empty()) { /* We got all the header data in a single round, except * for the closing comma. The static header data isn't * guaranteed to be around when we do get the comma so * copy it into the buffer. */ headerBuffer.assign(headerData.c_str(), headerData.size()); headerData = headerBuffer; } return consumed; } /** * Get the raw header data that has been processed so far. * Please read the zero-copy notes in the class description for * important information about the life time of the data this * StaticString points to. */ StaticString getHeaderData() const { return headerData; } const_iterator getHeaderIterator(const StaticString &name) const { return headers.find(name); } /** * Get the value of the header with the given name. * Lookup is case-sensitive. * Please read the zero-copy notes in the class description for * important information about the life time of the data this * StaticString points to. * * Returns the empty string if there is no such header. * * @pre getState() == DONE */ StaticString getHeader(const StaticString &name) const { HeaderMap::const_iterator it(headers.find(name)); if (it == headers.end()) { return ""; } else { return it->second; } } /** * Checks whether there is a header with the given name. * Lookup is case-sensitive. * * @pre getState() == DONE */ bool hasHeader(const StaticString &name) const { return headers.find(name) != headers.end(); } HeaderMap &getMap() { return headers; } unsigned int size() const { return headers.size(); } const_iterator begin() const { return headers.begin(); } const_iterator end() const { return headers.end(); } /** * Get the parser's current state. */ State getState() const { return state; } /** * Returns the reason why the parser entered the error state. * * @pre getState() == ERROR */ ErrorReason getErrorReason() const { return errorReason; } /** * Checks whether this parser is still capable of accepting input (that * is, that this parser is not in a final/error state). */ bool acceptingInput() const { return state != DONE && state != ERROR; } /** * If one has modified the headers in this ScgiRequestParser, then getHeaderData() * still returns the original header data that doesn't contain any modifications. * Call rebuildData(true) to synchronize that data with the new header map state. * * Calling rebuildData(false) will internalize the header data, if it wasn't * already so. */ void rebuildData(bool modified) { if (modified) { string *newHeaderBuffer; const_iterator it, end = headers.end(); if (headerData.data() == headerBuffer.data()) { // headerBuffer already used; allocate new temporary storage. newHeaderBuffer = new string(); } else { // headerBuffer unused; use it directly. newHeaderBuffer = &headerBuffer; } newHeaderBuffer->reserve(headerSize); for (it = headers.begin(); it != end; it++) { newHeaderBuffer->append(it->first); newHeaderBuffer->append(1, '\0'); newHeaderBuffer->append(it->second); newHeaderBuffer->append(1, '\0'); } if (headerData.data() == headerBuffer.data()) { headerBuffer = *newHeaderBuffer; delete newHeaderBuffer; } headerData = headerBuffer; headers.clear(); parseHeaderData(headerData, headers); } else if (headerData.data() != headerBuffer.data()) { headerBuffer.assign(headerData.data(), headerData.size()); headerData = headerBuffer; headers.clear(); parseHeaderData(headerData, headers); } } }; } // namespace Passenger #endif /* _PASSENGER_SCGI_REQUEST_PARSER_H_ */ passenger-4.0.37/ext/boost/algorithm/000755 000765 000024 00000000000 12233035540 020130 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/aligned_storage.hpp000644 000765 000024 00000010311 12233035540 021776 0ustar00honglistaff000000 000000 //----------------------------------------------------------------------------- // boost aligned_storage.hpp header file // See http://www.boost.org for updates, documentation, and revision history. //----------------------------------------------------------------------------- // // Copyright (c) 2002-2003 // Eric Friedman, Itay Maman // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_ALIGNED_STORAGE_HPP #define BOOST_ALIGNED_STORAGE_HPP #include // for std::size_t #include "boost/config.hpp" #include "boost/detail/workaround.hpp" #include "boost/type_traits/alignment_of.hpp" #include "boost/type_traits/type_with_alignment.hpp" #include "boost/type_traits/is_pod.hpp" #include "boost/mpl/eval_if.hpp" #include "boost/mpl/identity.hpp" #include "boost/type_traits/detail/bool_trait_def.hpp" namespace boost { namespace detail { namespace aligned_storage { BOOST_STATIC_CONSTANT( std::size_t , alignment_of_max_align = ::boost::alignment_of::value ); // // To be TR1 conforming this must be a POD type: // template < std::size_t size_ , std::size_t alignment_ > struct aligned_storage_imp { union data_t { char buf[size_]; typename mpl::eval_if_c< alignment_ == std::size_t(-1) , mpl::identity , type_with_alignment >::type align_; } data_; void* address() const { return const_cast(this); } }; template< std::size_t alignment_ > struct aligned_storage_imp<0u,alignment_> { /* intentionally empty */ void* address() const { return 0; } }; }} // namespace detail::aligned_storage template < std::size_t size_ , std::size_t alignment_ = std::size_t(-1) > class aligned_storage : #ifndef __BORLANDC__ private #else public #endif detail::aligned_storage::aligned_storage_imp { public: // constants typedef detail::aligned_storage::aligned_storage_imp type; BOOST_STATIC_CONSTANT( std::size_t , size = size_ ); BOOST_STATIC_CONSTANT( std::size_t , alignment = ( alignment_ == std::size_t(-1) ? ::boost::detail::aligned_storage::alignment_of_max_align : alignment_ ) ); #if defined(__GNUC__) &&\ (__GNUC__ > 3) ||\ (__GNUC__ == 3 && (__GNUC_MINOR__ > 2 ||\ (__GNUC_MINOR__ == 2 && __GNUC_PATCHLEVEL__ >=3))) private: // noncopyable aligned_storage(const aligned_storage&); aligned_storage& operator=(const aligned_storage&); #else // gcc less than 3.2.3 public: // _should_ be noncopyable, but GCC compiler emits error aligned_storage(const aligned_storage&); aligned_storage& operator=(const aligned_storage&); #endif // gcc < 3.2.3 workaround public: // structors aligned_storage() { } ~aligned_storage() { } public: // accessors void* address() { return static_cast(this)->address(); } #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) const void* address() const { return static_cast(this)->address(); } #else // MSVC6 const void* address() const; #endif // MSVC6 workaround }; #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // MSVC6 seems not to like inline functions with const void* returns, so we // declare the following here: template const void* aligned_storage::address() const { return const_cast< aligned_storage* >(this)->address(); } #endif // MSVC6 workaround #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // // Make sure that is_pod recognises aligned_storage<>::type // as a POD (Note that aligned_storage<> itself is not a POD): // template struct is_pod > BOOST_TT_AUX_BOOL_C_BASE(true) { BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true) }; #endif } // namespace boost #include "boost/type_traits/detail/bool_trait_undef.hpp" #endif // BOOST_ALIGNED_STORAGE_HPP passenger-4.0.37/ext/boost/array.hpp000644 000765 000024 00000036644 12233035540 020006 0ustar00honglistaff000000 000000 /* The following code declares class array, * an STL container (as wrapper) for arrays of constant size. * * See * http://www.boost.org/libs/array/ * for documentation. * * The original author site is at: http://www.josuttis.com/ * * (C) Copyright Nicolai M. Josuttis 2001. * * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * 14 Apr 2012 - (mtc) Added support for boost::hash * 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility. * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group. * See or Trac issue #3168 * Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow) * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow) * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis) * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries. * 05 Aug 2001 - minor update (Nico Josuttis) * 20 Jan 2001 - STLport fix (Beman Dawes) * 29 Sep 2000 - Initial Revision (Nico Josuttis) * * Jan 29, 2004 */ #ifndef BOOST_ARRAY_HPP #define BOOST_ARRAY_HPP #include #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) # pragma warning(push) # pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe # pragma warning(disable:4510) // boost::array' : default constructor could not be generated # pragma warning(disable:4610) // warning C4610: class 'boost::array' can never be instantiated - user defined constructor required #endif #include #include #include #include // Handles broken standard libraries better than #include #include #include #include // FIXES for broken compilers #include namespace boost { template class array { public: T elems[N]; // fixed-size array of elements of type T public: // type definitions typedef T value_type; typedef T* iterator; typedef const T* const_iterator; typedef T& reference; typedef const T& const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; // iterator support iterator begin() { return elems; } const_iterator begin() const { return elems; } const_iterator cbegin() const { return elems; } iterator end() { return elems+N; } const_iterator end() const { return elems+N; } const_iterator cend() const { return elems+N; } // reverse iterator support #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310) // workaround for broken reverse_iterator in VC7 typedef std::reverse_iterator > reverse_iterator; typedef std::reverse_iterator > const_reverse_iterator; #elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #else // workaround for broken reverse_iterator implementations typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #endif reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } const_reverse_iterator crbegin() const { return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } const_reverse_iterator crend() const { return const_reverse_iterator(begin()); } // operator[] reference operator[](size_type i) { BOOST_ASSERT_MSG( i < N, "out of range" ); return elems[i]; } const_reference operator[](size_type i) const { BOOST_ASSERT_MSG( i < N, "out of range" ); return elems[i]; } // at() with range check reference at(size_type i) { rangecheck(i); return elems[i]; } const_reference at(size_type i) const { rangecheck(i); return elems[i]; } // front() and back() reference front() { return elems[0]; } const_reference front() const { return elems[0]; } reference back() { return elems[N-1]; } const_reference back() const { return elems[N-1]; } // size is constant static size_type size() { return N; } static bool empty() { return false; } static size_type max_size() { return N; } enum { static_size = N }; // swap (note: linear complexity) void swap (array& y) { for (size_type i = 0; i < N; ++i) boost::swap(elems[i],y.elems[i]); } // direct access to data (read-only) const T* data() const { return elems; } T* data() { return elems; } // use array as C array (direct read/write access to data) T* c_array() { return elems; } // assignment with type conversion template array& operator= (const array& rhs) { std::copy(rhs.begin(),rhs.end(), begin()); return *this; } // assign one value to all elements void assign (const T& value) { fill ( value ); } // A synonym for fill void fill (const T& value) { std::fill_n(begin(),size(),value); } // check range (may be private because it is static) static void rangecheck (size_type i) { if (i >= size()) { std::out_of_range e("array<>: index out of range"); boost::throw_exception(e); } } }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< class T > class array< T, 0 > { public: // type definitions typedef T value_type; typedef T* iterator; typedef const T* const_iterator; typedef T& reference; typedef const T& const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; // iterator support iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); } const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } iterator end() { return begin(); } const_iterator end() const { return begin(); } const_iterator cend() const { return cbegin(); } // reverse iterator support #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310) // workaround for broken reverse_iterator in VC7 typedef std::reverse_iterator > reverse_iterator; typedef std::reverse_iterator > const_reverse_iterator; #elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #else // workaround for broken reverse_iterator implementations typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #endif reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } const_reverse_iterator crbegin() const { return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } const_reverse_iterator crend() const { return const_reverse_iterator(begin()); } // operator[] reference operator[](size_type /*i*/) { return failed_rangecheck(); } const_reference operator[](size_type /*i*/) const { return failed_rangecheck(); } // at() with range check reference at(size_type /*i*/) { return failed_rangecheck(); } const_reference at(size_type /*i*/) const { return failed_rangecheck(); } // front() and back() reference front() { return failed_rangecheck(); } const_reference front() const { return failed_rangecheck(); } reference back() { return failed_rangecheck(); } const_reference back() const { return failed_rangecheck(); } // size is constant static size_type size() { return 0; } static bool empty() { return true; } static size_type max_size() { return 0; } enum { static_size = 0 }; void swap (array& /*y*/) { } // direct access to data (read-only) const T* data() const { return 0; } T* data() { return 0; } // use array as C array (direct read/write access to data) T* c_array() { return 0; } // assignment with type conversion template array& operator= (const array& ) { return *this; } // assign one value to all elements void assign (const T& value) { fill ( value ); } void fill (const T& ) {} // check range (may be private because it is static) static reference failed_rangecheck () { std::out_of_range e("attempt to access element of an empty array"); boost::throw_exception(e); #if defined(BOOST_NO_EXCEPTIONS) || (!defined(BOOST_MSVC) && !defined(__PATHSCALE__)) // // We need to return something here to keep // some compilers happy: however we will never // actually get here.... // static T placeholder; return placeholder; #endif } }; #endif // comparisons template bool operator== (const array& x, const array& y) { return std::equal(x.begin(), x.end(), y.begin()); } template bool operator< (const array& x, const array& y) { return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end()); } template bool operator!= (const array& x, const array& y) { return !(x==y); } template bool operator> (const array& x, const array& y) { return y bool operator<= (const array& x, const array& y) { return !(y bool operator>= (const array& x, const array& y) { return !(x inline void swap (array& x, array& y) { x.swap(y); } #if defined(__SUNPRO_CC) // Trac ticket #4757; the Sun Solaris compiler can't handle // syntax like 'T(&get_c_array(boost::array& arg))[N]' // // We can't just use this for all compilers, because the // borland compilers can't handle this form. namespace detail { template struct c_array { typedef T type[N]; }; } // Specific for boost::array: simply returns its elems data member. template typename detail::c_array::type& get_c_array(boost::array& arg) { return arg.elems; } // Specific for boost::array: simply returns its elems data member. template typename const detail::c_array::type& get_c_array(const boost::array& arg) { return arg.elems; } #else // Specific for boost::array: simply returns its elems data member. template T(&get_c_array(boost::array& arg))[N] { return arg.elems; } // Const version. template const T(&get_c_array(const boost::array& arg))[N] { return arg.elems; } #endif #if 0 // Overload for std::array, assuming that std::array will have // explicit conversion functions as discussed at the WG21 meeting // in Summit, March 2009. template T(&get_c_array(std::array& arg))[N] { return static_cast(arg); } // Const version. template const T(&get_c_array(const std::array& arg))[N] { return static_cast(arg); } #endif template std::size_t hash_value(const array& arr) { return boost::hash_range(arr.begin(), arr.end()); } } /* namespace boost */ #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) # pragma warning(pop) #endif #endif /*BOOST_ARRAY_HPP*/ passenger-4.0.37/ext/boost/assert.hpp000644 000765 000024 00000010232 12233035540 020152 0ustar00honglistaff000000 000000 // // boost/assert.hpp - BOOST_ASSERT(expr) // BOOST_ASSERT_MSG(expr, msg) // BOOST_VERIFY(expr) // // Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. // Copyright (c) 2007 Peter Dimov // Copyright (c) Beman Dawes 2011 // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Note: There are no include guards. This is intentional. // // See http://www.boost.org/libs/utility/assert.html for documentation. // // // Stop inspect complaining about use of 'assert': // // boostinspect:naassert_macro // //--------------------------------------------------------------------------------------// // BOOST_ASSERT // //--------------------------------------------------------------------------------------// #undef BOOST_ASSERT #if defined(BOOST_DISABLE_ASSERTS) # define BOOST_ASSERT(expr) ((void)0) #elif defined(BOOST_ENABLE_ASSERT_HANDLER) #include namespace boost { void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined } // namespace boost #define BOOST_ASSERT(expr) ((expr) \ ? ((void)0) \ : ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) #else # include // .h to support old libraries w/o - effect is the same # define BOOST_ASSERT(expr) assert(expr) #endif //--------------------------------------------------------------------------------------// // BOOST_ASSERT_MSG // //--------------------------------------------------------------------------------------// # undef BOOST_ASSERT_MSG #if defined(BOOST_DISABLE_ASSERTS) || defined(NDEBUG) #define BOOST_ASSERT_MSG(expr, msg) ((void)0) #elif defined(BOOST_ENABLE_ASSERT_HANDLER) #include namespace boost { void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line); // user defined } // namespace boost #define BOOST_ASSERT_MSG(expr, msg) ((expr) \ ? ((void)0) \ : ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) #else #ifndef BOOST_ASSERT_HPP #define BOOST_ASSERT_HPP #include #include #include // IDE's like Visual Studio perform better if output goes to std::cout or // some other stream, so allow user to configure output stream: #ifndef BOOST_ASSERT_MSG_OSTREAM # define BOOST_ASSERT_MSG_OSTREAM std::cerr #endif namespace boost { namespace assertion { namespace detail { inline void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line) { BOOST_ASSERT_MSG_OSTREAM << "***** Internal Program Error - assertion (" << expr << ") failed in " << function << ":\n" << file << '(' << line << "): " << msg << std::endl; #ifdef UNDER_CE // The Windows CE CRT library does not have abort() so use exit(-1) instead. std::exit(-1); #else std::abort(); #endif } } // detail } // assertion } // detail #endif #define BOOST_ASSERT_MSG(expr, msg) ((expr) \ ? ((void)0) \ : ::boost::assertion::detail::assertion_failed_msg(#expr, msg, \ BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) #endif //--------------------------------------------------------------------------------------// // BOOST_VERIFY // //--------------------------------------------------------------------------------------// #undef BOOST_VERIFY #if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) ) # define BOOST_VERIFY(expr) ((void)(expr)) #else # define BOOST_VERIFY(expr) BOOST_ASSERT(expr) #endif passenger-4.0.37/ext/boost/atomic/000755 000765 000024 00000000000 12233035540 017416 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/atomic.hpp000644 000765 000024 00000000627 12233035540 020134 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_HPP #define BOOST_ATOMIC_HPP // Copyright (c) 2011 Helge Bahmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // This header includes all Boost.Atomic public headers #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif #endif passenger-4.0.37/ext/boost/bind/000755 000765 000024 00000000000 12233035540 017056 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/bind.hpp000644 000765 000024 00000001105 12233035540 017564 0ustar00honglistaff000000 000000 #ifndef BOOST_BIND_HPP_INCLUDED #define BOOST_BIND_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // bind.hpp - binds function objects to arguments // // Copyright (c) 2009 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // See http://www.boost.org/libs/bind/bind.html for documentation. // #include #endif // #ifndef BOOST_BIND_HPP_INCLUDED passenger-4.0.37/ext/boost/cerrno.hpp000644 000765 000024 00000010115 12233035540 020141 0ustar00honglistaff000000 000000 // Boost cerrno.hpp header -------------------------------------------------// // Copyright Beman Dawes 2005. // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/system #ifndef BOOST_CERRNO_HPP #define BOOST_CERRNO_HPP #include // supply errno values likely to be missing, particularly on Windows #ifndef EAFNOSUPPORT #define EAFNOSUPPORT 9901 #endif #ifndef EADDRINUSE #define EADDRINUSE 9902 #endif #ifndef EADDRNOTAVAIL #define EADDRNOTAVAIL 9903 #endif #ifndef EISCONN #define EISCONN 9904 #endif #ifndef EBADMSG #define EBADMSG 9905 #endif #ifndef ECONNABORTED #define ECONNABORTED 9906 #endif #ifndef EALREADY #define EALREADY 9907 #endif #ifndef ECONNREFUSED #define ECONNREFUSED 9908 #endif #ifndef ECONNRESET #define ECONNRESET 9909 #endif #ifndef EDESTADDRREQ #define EDESTADDRREQ 9910 #endif #ifndef EHOSTUNREACH #define EHOSTUNREACH 9911 #endif #ifndef EIDRM #define EIDRM 9912 #endif #ifndef EMSGSIZE #define EMSGSIZE 9913 #endif #ifndef ENETDOWN #define ENETDOWN 9914 #endif #ifndef ENETRESET #define ENETRESET 9915 #endif #ifndef ENETUNREACH #define ENETUNREACH 9916 #endif #ifndef ENOBUFS #define ENOBUFS 9917 #endif #ifndef ENOLINK #define ENOLINK 9918 #endif #ifndef ENODATA #define ENODATA 9919 #endif #ifndef ENOMSG #define ENOMSG 9920 #endif #ifndef ENOPROTOOPT #define ENOPROTOOPT 9921 #endif #ifndef ENOSR #define ENOSR 9922 #endif #ifndef ENOTSOCK #define ENOTSOCK 9923 #endif #ifndef ENOSTR #define ENOSTR 9924 #endif #ifndef ENOTCONN #define ENOTCONN 9925 #endif #ifndef ENOTSUP #define ENOTSUP 9926 #endif #ifndef ECANCELED #define ECANCELED 9927 #endif #ifndef EINPROGRESS #define EINPROGRESS 9928 #endif #ifndef EOPNOTSUPP #define EOPNOTSUPP 9929 #endif #ifndef EWOULDBLOCK #define EWOULDBLOCK 9930 #endif #ifndef EOWNERDEAD #define EOWNERDEAD 9931 #endif #ifndef EPROTO #define EPROTO 9932 #endif #ifndef EPROTONOSUPPORT #define EPROTONOSUPPORT 9933 #endif #ifndef ENOTRECOVERABLE #define ENOTRECOVERABLE 9934 #endif #ifndef ETIME #define ETIME 9935 #endif #ifndef ETXTBSY #define ETXTBSY 9936 #endif #ifndef ETIMEDOUT #define ETIMEDOUT 9938 #endif #ifndef ELOOP #define ELOOP 9939 #endif #ifndef EOVERFLOW #define EOVERFLOW 9940 #endif #ifndef EPROTOTYPE #define EPROTOTYPE 9941 #endif #ifndef ENOSYS #define ENOSYS 9942 #endif #ifndef EINVAL #define EINVAL 9943 #endif #ifndef ERANGE #define ERANGE 9944 #endif #ifndef EILSEQ #define EILSEQ 9945 #endif // Windows Mobile doesn't appear to define these: #ifndef E2BIG #define E2BIG 9946 #endif #ifndef EDOM #define EDOM 9947 #endif #ifndef EFAULT #define EFAULT 9948 #endif #ifndef EBADF #define EBADF 9949 #endif #ifndef EPIPE #define EPIPE 9950 #endif #ifndef EXDEV #define EXDEV 9951 #endif #ifndef EBUSY #define EBUSY 9952 #endif #ifndef ENOTEMPTY #define ENOTEMPTY 9953 #endif #ifndef ENOEXEC #define ENOEXEC 9954 #endif #ifndef EEXIST #define EEXIST 9955 #endif #ifndef EFBIG #define EFBIG 9956 #endif #ifndef ENAMETOOLONG #define ENAMETOOLONG 9957 #endif #ifndef ENOTTY #define ENOTTY 9958 #endif #ifndef EINTR #define EINTR 9959 #endif #ifndef ESPIPE #define ESPIPE 9960 #endif #ifndef EIO #define EIO 9961 #endif #ifndef EISDIR #define EISDIR 9962 #endif #ifndef ECHILD #define ECHILD 9963 #endif #ifndef ENOLCK #define ENOLCK 9964 #endif #ifndef ENOSPC #define ENOSPC 9965 #endif #ifndef ENXIO #define ENXIO 9966 #endif #ifndef ENODEV #define ENODEV 9967 #endif #ifndef ENOENT #define ENOENT 9968 #endif #ifndef ESRCH #define ESRCH 9969 #endif #ifndef ENOTDIR #define ENOTDIR 9970 #endif #ifndef ENOMEM #define ENOMEM 9971 #endif #ifndef EPERM #define EPERM 9972 #endif #ifndef EACCES #define EACCES 9973 #endif #ifndef EROFS #define EROFS 9974 #endif #ifndef EDEADLK #define EDEADLK 9975 #endif #ifndef EAGAIN #define EAGAIN 9976 #endif #ifndef ENFILE #define ENFILE 9977 #endif #ifndef EMFILE #define EMFILE 9978 #endif #ifndef EMLINK #define EMLINK 9979 #endif #endif // include guard passenger-4.0.37/ext/boost/checked_delete.hpp000644 000765 000024 00000003065 12233035540 021567 0ustar00honglistaff000000 000000 #ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED #define BOOST_CHECKED_DELETE_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // boost/checked_delete.hpp // // Copyright (c) 2002, 2003 Peter Dimov // Copyright (c) 2003 Daniel Frey // Copyright (c) 2003 Howard Hinnant // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/utility/checked_delete.html for documentation. // namespace boost { // verify that types are complete for increased safety template inline void checked_delete(T * x) { // intentionally complex - simplification causes regressions typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; (void) sizeof(type_must_be_complete); delete x; } template inline void checked_array_delete(T * x) { typedef char type_must_be_complete[ sizeof(T)? 1: -1 ]; (void) sizeof(type_must_be_complete); delete [] x; } template struct checked_deleter { typedef void result_type; typedef T * argument_type; void operator()(T * x) const { // boost:: disables ADL boost::checked_delete(x); } }; template struct checked_array_deleter { typedef void result_type; typedef T * argument_type; void operator()(T * x) const { boost::checked_array_delete(x); } }; } // namespace boost #endif // #ifndef BOOST_CHECKED_DELETE_HPP_INCLUDED passenger-4.0.37/ext/boost/chrono/000755 000765 000024 00000000000 12233035540 017432 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/concept/000755 000765 000024 00000000000 12233035540 017575 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/concept_check.hpp000644 000765 000024 00000076551 12233035540 021461 0ustar00honglistaff000000 000000 // // (C) Copyright Jeremy Siek 2000. // Copyright 2002 The Trustees of Indiana University. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Revision History: // 05 May 2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek) // 02 April 2001: Removed limits header altogether. (Jeremy Siek) // 01 April 2001: Modified to use new header. (JMaddock) // // See http://www.boost.org/libs/concept_check for documentation. #ifndef BOOST_CONCEPT_CHECKS_HPP # define BOOST_CONCEPT_CHECKS_HPP # include # include # include # include # include # include # include # include # include # include # include # include namespace boost { // // Backward compatibility // template inline void function_requires(Model* = 0) { BOOST_CONCEPT_ASSERT((Model)); } template inline void ignore_unused_variable_warning(T const&) {} # define BOOST_CLASS_REQUIRE(type_var, ns, concept) \ BOOST_CONCEPT_ASSERT((ns::concept)) # define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept) \ BOOST_CONCEPT_ASSERT((ns::concept)) # define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept) \ BOOST_CONCEPT_ASSERT((ns::concept)) # define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \ BOOST_CONCEPT_ASSERT((ns::concept)) // // Begin concept definitions // BOOST_concept(Integer, (T)) { BOOST_CONCEPT_USAGE(Integer) { x.error_type_must_be_an_integer_type(); } private: T x; }; template <> struct Integer {}; template <> struct Integer {}; template <> struct Integer {}; template <> struct Integer {}; template <> struct Integer {}; template <> struct Integer {}; template <> struct Integer {}; template <> struct Integer {}; template <> struct Integer {}; # if defined(BOOST_HAS_LONG_LONG) template <> struct Integer< ::boost::long_long_type> {}; template <> struct Integer< ::boost::ulong_long_type> {}; # elif defined(BOOST_HAS_MS_INT64) template <> struct Integer<__int64> {}; template <> struct Integer {}; # endif BOOST_concept(SignedInteger,(T)) { BOOST_CONCEPT_USAGE(SignedInteger) { x.error_type_must_be_a_signed_integer_type(); } private: T x; }; template <> struct SignedInteger { }; template <> struct SignedInteger {}; template <> struct SignedInteger {}; template <> struct SignedInteger {}; # if defined(BOOST_HAS_LONG_LONG) template <> struct SignedInteger< ::boost::long_long_type> {}; # elif defined(BOOST_HAS_MS_INT64) template <> struct SignedInteger<__int64> {}; # endif BOOST_concept(UnsignedInteger,(T)) { BOOST_CONCEPT_USAGE(UnsignedInteger) { x.error_type_must_be_an_unsigned_integer_type(); } private: T x; }; template <> struct UnsignedInteger {}; template <> struct UnsignedInteger {}; template <> struct UnsignedInteger {}; template <> struct UnsignedInteger {}; # if defined(BOOST_HAS_LONG_LONG) template <> struct UnsignedInteger< ::boost::ulong_long_type> {}; # elif defined(BOOST_HAS_MS_INT64) template <> struct UnsignedInteger {}; # endif //=========================================================================== // Basic Concepts BOOST_concept(DefaultConstructible,(TT)) { BOOST_CONCEPT_USAGE(DefaultConstructible) { TT a; // require default constructor ignore_unused_variable_warning(a); } }; BOOST_concept(Assignable,(TT)) { BOOST_CONCEPT_USAGE(Assignable) { #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL a = b; // require assignment operator #endif const_constraints(b); } private: void const_constraints(const TT& x) { #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL a = x; // const required for argument to assignment #else ignore_unused_variable_warning(x); #endif } private: TT a; TT b; }; BOOST_concept(CopyConstructible,(TT)) { BOOST_CONCEPT_USAGE(CopyConstructible) { TT a(b); // require copy constructor TT* ptr = &a; // require address of operator const_constraints(a); ignore_unused_variable_warning(ptr); } private: void const_constraints(const TT& a) { TT c(a); // require const copy constructor const TT* ptr = &a; // require const address of operator ignore_unused_variable_warning(c); ignore_unused_variable_warning(ptr); } TT b; }; #if (defined _MSC_VER) # pragma warning( push ) # pragma warning( disable : 4510 ) // default constructor could not be generated # pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required #endif // The SGI STL version of Assignable requires copy constructor and operator= BOOST_concept(SGIAssignable,(TT)) { BOOST_CONCEPT_USAGE(SGIAssignable) { TT c(a); #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL a = b; // require assignment operator #endif const_constraints(b); ignore_unused_variable_warning(c); } private: void const_constraints(const TT& x) { TT c(x); #if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL a = x; // const required for argument to assignment #endif ignore_unused_variable_warning(c); } TT a; TT b; }; #if (defined _MSC_VER) # pragma warning( pop ) #endif BOOST_concept(Convertible,(X)(Y)) { BOOST_CONCEPT_USAGE(Convertible) { Y y = x; ignore_unused_variable_warning(y); } private: X x; }; // The C++ standard requirements for many concepts talk about return // types that must be "convertible to bool". The problem with this // requirement is that it leaves the door open for evil proxies that // define things like operator|| with strange return types. Two // possible solutions are: // 1) require the return type to be exactly bool // 2) stay with convertible to bool, and also // specify stuff about all the logical operators. // For now we just test for convertible to bool. template void require_boolean_expr(const TT& t) { bool x = t; ignore_unused_variable_warning(x); } BOOST_concept(EqualityComparable,(TT)) { BOOST_CONCEPT_USAGE(EqualityComparable) { require_boolean_expr(a == b); require_boolean_expr(a != b); } private: TT a, b; }; BOOST_concept(LessThanComparable,(TT)) { BOOST_CONCEPT_USAGE(LessThanComparable) { require_boolean_expr(a < b); } private: TT a, b; }; // This is equivalent to SGI STL's LessThanComparable. BOOST_concept(Comparable,(TT)) { BOOST_CONCEPT_USAGE(Comparable) { require_boolean_expr(a < b); require_boolean_expr(a > b); require_boolean_expr(a <= b); require_boolean_expr(a >= b); } private: TT a, b; }; #define BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(OP,NAME) \ BOOST_concept(NAME, (First)(Second)) \ { \ BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ private: \ bool constraints_() { return a OP b; } \ First a; \ Second b; \ } #define BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(OP,NAME) \ BOOST_concept(NAME, (Ret)(First)(Second)) \ { \ BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ private: \ Ret constraints_() { return a OP b; } \ First a; \ Second b; \ } BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, EqualOp); BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, NotEqualOp); BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, LessThanOp); BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, LessEqualOp); BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, GreaterThanOp); BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, GreaterEqualOp); BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, PlusOp); BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, TimesOp); BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, DivideOp); BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOp); BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOp); //=========================================================================== // Function Object Concepts BOOST_concept(Generator,(Func)(Return)) { BOOST_CONCEPT_USAGE(Generator) { test(is_void()); } private: void test(boost::mpl::false_) { // Do we really want a reference here? const Return& r = f(); ignore_unused_variable_warning(r); } void test(boost::mpl::true_) { f(); } Func f; }; BOOST_concept(UnaryFunction,(Func)(Return)(Arg)) { BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void()); } private: void test(boost::mpl::false_) { f(arg); // "priming the pump" this way keeps msvc6 happy (ICE) Return r = f(arg); ignore_unused_variable_warning(r); } void test(boost::mpl::true_) { f(arg); } #if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ && BOOST_WORKAROUND(__GNUC__, > 3))) // Declare a dummy construktor to make gcc happy. // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. // (warning: non-static reference "const double& boost::UnaryFunction::arg" // in class without a constructor [-Wuninitialized]) UnaryFunction(); #endif Func f; Arg arg; }; BOOST_concept(BinaryFunction,(Func)(Return)(First)(Second)) { BOOST_CONCEPT_USAGE(BinaryFunction) { test(is_void()); } private: void test(boost::mpl::false_) { f(first,second); Return r = f(first, second); // require operator() (void)r; } void test(boost::mpl::true_) { f(first,second); } #if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ && BOOST_WORKAROUND(__GNUC__, > 3))) // Declare a dummy constructor to make gcc happy. // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. // (warning: non-static reference "const double& boost::BinaryFunction::arg" // in class without a constructor [-Wuninitialized]) BinaryFunction(); #endif Func f; First first; Second second; }; BOOST_concept(UnaryPredicate,(Func)(Arg)) { BOOST_CONCEPT_USAGE(UnaryPredicate) { require_boolean_expr(f(arg)); // require operator() returning bool } private: #if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ && BOOST_WORKAROUND(__GNUC__, > 3))) // Declare a dummy constructor to make gcc happy. // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. // (warning: non-static reference "const double& boost::UnaryPredicate::arg" // in class without a constructor [-Wuninitialized]) UnaryPredicate(); #endif Func f; Arg arg; }; BOOST_concept(BinaryPredicate,(Func)(First)(Second)) { BOOST_CONCEPT_USAGE(BinaryPredicate) { require_boolean_expr(f(a, b)); // require operator() returning bool } private: #if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ && BOOST_WORKAROUND(__GNUC__, > 3))) // Declare a dummy constructor to make gcc happy. // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. // (warning: non-static reference "const double& boost::BinaryPredicate::arg" // in class without a constructor [-Wuninitialized]) BinaryPredicate(); #endif Func f; First a; Second b; }; // use this when functor is used inside a container class like std::set BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second)) : BinaryPredicate { BOOST_CONCEPT_USAGE(Const_BinaryPredicate) { const_constraints(f); } private: void const_constraints(const Func& fun) { // operator() must be a const member function require_boolean_expr(fun(a, b)); } #if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ && BOOST_WORKAROUND(__GNUC__, > 3))) // Declare a dummy constructor to make gcc happy. // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. // (warning: non-static reference "const double& boost::Const_BinaryPredicate::arg" // in class without a constructor [-Wuninitialized]) Const_BinaryPredicate(); #endif Func f; First a; Second b; }; BOOST_concept(AdaptableGenerator,(Func)(Return)) : Generator { typedef typename Func::result_type result_type; BOOST_CONCEPT_USAGE(AdaptableGenerator) { BOOST_CONCEPT_ASSERT((Convertible)); } }; BOOST_concept(AdaptableUnaryFunction,(Func)(Return)(Arg)) : UnaryFunction { typedef typename Func::argument_type argument_type; typedef typename Func::result_type result_type; ~AdaptableUnaryFunction() { BOOST_CONCEPT_ASSERT((Convertible)); BOOST_CONCEPT_ASSERT((Convertible)); } }; BOOST_concept(AdaptableBinaryFunction,(Func)(Return)(First)(Second)) : BinaryFunction< Func , typename Func::result_type , typename Func::first_argument_type , typename Func::second_argument_type > { typedef typename Func::first_argument_type first_argument_type; typedef typename Func::second_argument_type second_argument_type; typedef typename Func::result_type result_type; ~AdaptableBinaryFunction() { BOOST_CONCEPT_ASSERT((Convertible)); BOOST_CONCEPT_ASSERT((Convertible)); BOOST_CONCEPT_ASSERT((Convertible)); } }; BOOST_concept(AdaptablePredicate,(Func)(Arg)) : UnaryPredicate , AdaptableUnaryFunction { }; BOOST_concept(AdaptableBinaryPredicate,(Func)(First)(Second)) : BinaryPredicate , AdaptableBinaryFunction { }; //=========================================================================== // Iterator Concepts BOOST_concept(InputIterator,(TT)) : Assignable , EqualityComparable { typedef typename boost::detail::iterator_traits::value_type value_type; typedef typename boost::detail::iterator_traits::difference_type difference_type; typedef typename boost::detail::iterator_traits::reference reference; typedef typename boost::detail::iterator_traits::pointer pointer; typedef typename boost::detail::iterator_traits::iterator_category iterator_category; BOOST_CONCEPT_USAGE(InputIterator) { BOOST_CONCEPT_ASSERT((SignedInteger)); BOOST_CONCEPT_ASSERT((Convertible)); TT j(i); (void)*i; // require dereference operator ++j; // require preincrement operator i++; // require postincrement operator } private: TT i; }; BOOST_concept(OutputIterator,(TT)(ValueT)) : Assignable { BOOST_CONCEPT_USAGE(OutputIterator) { ++i; // require preincrement operator i++; // require postincrement operator *i++ = t; // require postincrement and assignment } private: TT i, j; ValueT t; }; BOOST_concept(ForwardIterator,(TT)) : InputIterator { BOOST_CONCEPT_USAGE(ForwardIterator) { BOOST_CONCEPT_ASSERT((Convertible< BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category , std::forward_iterator_tag >)); typename InputIterator::reference r = *i; ignore_unused_variable_warning(r); } private: TT i; }; BOOST_concept(Mutable_ForwardIterator,(TT)) : ForwardIterator { BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) { *i++ = *i; // require postincrement and assignment } private: TT i; }; BOOST_concept(BidirectionalIterator,(TT)) : ForwardIterator { BOOST_CONCEPT_USAGE(BidirectionalIterator) { BOOST_CONCEPT_ASSERT((Convertible< BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category , std::bidirectional_iterator_tag >)); --i; // require predecrement operator i--; // require postdecrement operator } private: TT i; }; BOOST_concept(Mutable_BidirectionalIterator,(TT)) : BidirectionalIterator , Mutable_ForwardIterator { BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator) { *i-- = *i; // require postdecrement and assignment } private: TT i; }; BOOST_concept(RandomAccessIterator,(TT)) : BidirectionalIterator , Comparable { BOOST_CONCEPT_USAGE(RandomAccessIterator) { BOOST_CONCEPT_ASSERT((Convertible< BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category , std::random_access_iterator_tag >)); i += n; // require assignment addition operator i = i + n; i = n + i; // require addition with difference type i -= n; // require assignment subtraction operator i = i - n; // require subtraction with difference type n = i - j; // require difference operator (void)i[n]; // require element access operator } private: TT a, b; TT i, j; typename boost::detail::iterator_traits::difference_type n; }; BOOST_concept(Mutable_RandomAccessIterator,(TT)) : RandomAccessIterator , Mutable_BidirectionalIterator { BOOST_CONCEPT_USAGE(Mutable_RandomAccessIterator) { i[n] = *i; // require element access and assignment } private: TT i; typename boost::detail::iterator_traits::difference_type n; }; //=========================================================================== // Container s BOOST_concept(Container,(C)) : Assignable { typedef typename C::value_type value_type; typedef typename C::difference_type difference_type; typedef typename C::size_type size_type; typedef typename C::const_reference const_reference; typedef typename C::const_pointer const_pointer; typedef typename C::const_iterator const_iterator; BOOST_CONCEPT_USAGE(Container) { BOOST_CONCEPT_ASSERT((InputIterator)); const_constraints(c); } private: void const_constraints(const C& cc) { i = cc.begin(); i = cc.end(); n = cc.size(); n = cc.max_size(); b = cc.empty(); } C c; bool b; const_iterator i; size_type n; }; BOOST_concept(Mutable_Container,(C)) : Container { typedef typename C::reference reference; typedef typename C::iterator iterator; typedef typename C::pointer pointer; BOOST_CONCEPT_USAGE(Mutable_Container) { BOOST_CONCEPT_ASSERT(( Assignable)); BOOST_CONCEPT_ASSERT((InputIterator)); i = c.begin(); i = c.end(); c.swap(c2); } private: iterator i; C c, c2; }; BOOST_concept(ForwardContainer,(C)) : Container { BOOST_CONCEPT_USAGE(ForwardContainer) { BOOST_CONCEPT_ASSERT(( ForwardIterator< typename ForwardContainer::const_iterator >)); } }; BOOST_concept(Mutable_ForwardContainer,(C)) : ForwardContainer , Mutable_Container { BOOST_CONCEPT_USAGE(Mutable_ForwardContainer) { BOOST_CONCEPT_ASSERT(( Mutable_ForwardIterator< typename Mutable_ForwardContainer::iterator >)); } }; BOOST_concept(ReversibleContainer,(C)) : ForwardContainer { typedef typename C::const_reverse_iterator const_reverse_iterator; BOOST_CONCEPT_USAGE(ReversibleContainer) { BOOST_CONCEPT_ASSERT(( BidirectionalIterator< typename ReversibleContainer::const_iterator>)); BOOST_CONCEPT_ASSERT((BidirectionalIterator)); const_constraints(c); } private: void const_constraints(const C& cc) { const_reverse_iterator i = cc.rbegin(); i = cc.rend(); } C c; }; BOOST_concept(Mutable_ReversibleContainer,(C)) : Mutable_ForwardContainer , ReversibleContainer { typedef typename C::reverse_iterator reverse_iterator; BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer) { typedef typename Mutable_ForwardContainer::iterator iterator; BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); reverse_iterator i = c.rbegin(); i = c.rend(); } private: C c; }; BOOST_concept(RandomAccessContainer,(C)) : ReversibleContainer { typedef typename C::size_type size_type; typedef typename C::const_reference const_reference; BOOST_CONCEPT_USAGE(RandomAccessContainer) { BOOST_CONCEPT_ASSERT(( RandomAccessIterator< typename RandomAccessContainer::const_iterator >)); const_constraints(c); } private: void const_constraints(const C& cc) { const_reference r = cc[n]; ignore_unused_variable_warning(r); } C c; size_type n; }; BOOST_concept(Mutable_RandomAccessContainer,(C)) : Mutable_ReversibleContainer , RandomAccessContainer { private: typedef Mutable_RandomAccessContainer self; public: BOOST_CONCEPT_USAGE(Mutable_RandomAccessContainer) { BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); typename self::reference r = c[i]; ignore_unused_variable_warning(r); } private: typename Mutable_ReversibleContainer::size_type i; C c; }; // A Sequence is inherently mutable BOOST_concept(Sequence,(S)) : Mutable_ForwardContainer // Matt Austern's book puts DefaultConstructible here, the C++ // standard places it in Container --JGS // ... so why aren't we following the standard? --DWA , DefaultConstructible { BOOST_CONCEPT_USAGE(Sequence) { S c(n), c2(n, t), c3(first, last); c.insert(p, t); c.insert(p, n, t); c.insert(p, first, last); c.erase(p); c.erase(p, q); typename Sequence::reference r = c.front(); ignore_unused_variable_warning(c); ignore_unused_variable_warning(c2); ignore_unused_variable_warning(c3); ignore_unused_variable_warning(r); const_constraints(c); } private: void const_constraints(const S& c) { typename Sequence::const_reference r = c.front(); ignore_unused_variable_warning(r); } typename S::value_type t; typename S::size_type n; typename S::value_type* first, *last; typename S::iterator p, q; }; BOOST_concept(FrontInsertionSequence,(S)) : Sequence { BOOST_CONCEPT_USAGE(FrontInsertionSequence) { c.push_front(t); c.pop_front(); } private: S c; typename S::value_type t; }; BOOST_concept(BackInsertionSequence,(S)) : Sequence { BOOST_CONCEPT_USAGE(BackInsertionSequence) { c.push_back(t); c.pop_back(); typename BackInsertionSequence::reference r = c.back(); ignore_unused_variable_warning(r); const_constraints(c); } private: void const_constraints(const S& cc) { typename BackInsertionSequence::const_reference r = cc.back(); ignore_unused_variable_warning(r); }; S c; typename S::value_type t; }; BOOST_concept(AssociativeContainer,(C)) : ForwardContainer , DefaultConstructible { typedef typename C::key_type key_type; typedef typename C::key_compare key_compare; typedef typename C::value_compare value_compare; typedef typename C::iterator iterator; BOOST_CONCEPT_USAGE(AssociativeContainer) { i = c.find(k); r = c.equal_range(k); c.erase(k); c.erase(i); c.erase(r.first, r.second); const_constraints(c); BOOST_CONCEPT_ASSERT((BinaryPredicate)); typedef typename AssociativeContainer::value_type value_type_; BOOST_CONCEPT_ASSERT((BinaryPredicate)); } // Redundant with the base concept, but it helps below. typedef typename C::const_iterator const_iterator; private: void const_constraints(const C& cc) { ci = cc.find(k); n = cc.count(k); cr = cc.equal_range(k); } C c; iterator i; std::pair r; const_iterator ci; std::pair cr; typename C::key_type k; typename C::size_type n; }; BOOST_concept(UniqueAssociativeContainer,(C)) : AssociativeContainer { BOOST_CONCEPT_USAGE(UniqueAssociativeContainer) { C c(first, last); pos_flag = c.insert(t); c.insert(first, last); ignore_unused_variable_warning(c); } private: std::pair pos_flag; typename C::value_type t; typename C::value_type* first, *last; }; BOOST_concept(MultipleAssociativeContainer,(C)) : AssociativeContainer { BOOST_CONCEPT_USAGE(MultipleAssociativeContainer) { C c(first, last); pos = c.insert(t); c.insert(first, last); ignore_unused_variable_warning(c); ignore_unused_variable_warning(pos); } private: typename C::iterator pos; typename C::value_type t; typename C::value_type* first, *last; }; BOOST_concept(SimpleAssociativeContainer,(C)) : AssociativeContainer { BOOST_CONCEPT_USAGE(SimpleAssociativeContainer) { typedef typename C::key_type key_type; typedef typename C::value_type value_type; BOOST_MPL_ASSERT((boost::is_same)); } }; BOOST_concept(PairAssociativeContainer,(C)) : AssociativeContainer { BOOST_CONCEPT_USAGE(PairAssociativeContainer) { typedef typename C::key_type key_type; typedef typename C::value_type value_type; typedef typename C::mapped_type mapped_type; typedef std::pair required_value_type; BOOST_MPL_ASSERT((boost::is_same)); } }; BOOST_concept(SortedAssociativeContainer,(C)) : AssociativeContainer , ReversibleContainer { BOOST_CONCEPT_USAGE(SortedAssociativeContainer) { C c(kc), c2(first, last), c3(first, last, kc); p = c.upper_bound(k); p = c.lower_bound(k); r = c.equal_range(k); c.insert(p, t); ignore_unused_variable_warning(c); ignore_unused_variable_warning(c2); ignore_unused_variable_warning(c3); const_constraints(c); } void const_constraints(const C& c) { kc = c.key_comp(); vc = c.value_comp(); cp = c.upper_bound(k); cp = c.lower_bound(k); cr = c.equal_range(k); } private: typename C::key_compare kc; typename C::value_compare vc; typename C::value_type t; typename C::key_type k; typedef typename C::iterator iterator; typedef typename C::const_iterator const_iterator; typedef SortedAssociativeContainer self; iterator p; const_iterator cp; std::pair r; std::pair cr; typename C::value_type* first, *last; }; // HashedAssociativeContainer BOOST_concept(Collection,(C)) { BOOST_CONCEPT_USAGE(Collection) { boost::function_requires >(); boost::function_requires >(); boost::function_requires >(); const_constraints(c); i = c.begin(); i = c.end(); c.swap(c); } void const_constraints(const C& cc) { ci = cc.begin(); ci = cc.end(); n = cc.size(); b = cc.empty(); } private: typedef typename C::value_type value_type; typedef typename C::iterator iterator; typedef typename C::const_iterator const_iterator; typedef typename C::reference reference; typedef typename C::const_reference const_reference; // typedef typename C::pointer pointer; typedef typename C::difference_type difference_type; typedef typename C::size_type size_type; C c; bool b; iterator i; const_iterator ci; size_type n; }; } // namespace boost # include #endif // BOOST_CONCEPT_CHECKS_HPP passenger-4.0.37/ext/boost/config/000755 000765 000024 00000000000 12233035540 017407 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/config.hpp000644 000765 000024 00000004032 12233035540 020117 0ustar00honglistaff000000 000000 // Boost config.hpp configuration header file ------------------------------// // (C) Copyright John Maddock 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. // Boost config.hpp policy and rationale documentation has been moved to // http://www.boost.org/libs/config // // CAUTION: This file is intended to be completely stable - // DO NOT MODIFY THIS FILE! // #ifndef BOOST_CONFIG_HPP #define BOOST_CONFIG_HPP // if we don't have a user config, then use the default location: #if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG) # define BOOST_USER_CONFIG #endif // include it first: #ifdef BOOST_USER_CONFIG # include BOOST_USER_CONFIG #endif // if we don't have a compiler config set, try and find one: #if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG) # include #endif // if we have a compiler config, include it now: #ifdef BOOST_COMPILER_CONFIG # include BOOST_COMPILER_CONFIG #endif // if we don't have a std library config set, try and find one: #if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus) # include #endif // if we have a std library config, include it now: #ifdef BOOST_STDLIB_CONFIG # include BOOST_STDLIB_CONFIG #endif // if we don't have a platform config set, try and find one: #if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG) # include #endif // if we have a platform config, include it now: #ifdef BOOST_PLATFORM_CONFIG # include BOOST_PLATFORM_CONFIG #endif // get config suffix code: #include #endif // BOOST_CONFIG_HPP passenger-4.0.37/ext/boost/container/000755 000765 000024 00000000000 12233035540 020124 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/cregex.hpp000644 000765 000024 00000001321 12233035540 020125 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org/libs/regex for most recent version. * FILE cregex.cpp * VERSION see * DESCRIPTION: Declares POSIX API functions * + boost::RegEx high level wrapper. */ #ifndef BOOST_RE_CREGEX_HPP #define BOOST_RE_CREGEX_HPP #ifndef BOOST_REGEX_CONFIG_HPP #include #endif #include #endif /* include guard */ passenger-4.0.37/ext/boost/cstdint.hpp000644 000765 000024 00000041722 12233035540 020331 0ustar00honglistaff000000 000000 // boost cstdint.hpp header file ------------------------------------------// // (C) Copyright Beman Dawes 1999. // (C) Copyright Jens Mauer 2001 // (C) Copyright John Maddock 2001 // Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/integer for documentation. // Revision History // 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.) // 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer) // 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer) // 12 Nov 00 Merged (Jens Maurer) // 23 Sep 00 Added INTXX_C macro support (John Maddock). // 22 Sep 00 Better 64-bit support (John Maddock) // 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost // 8 Aug 99 Initial version (Beman Dawes) #ifndef BOOST_CSTDINT_HPP #define BOOST_CSTDINT_HPP // // Since we always define the INT#_C macros as per C++0x, // define __STDC_CONSTANT_MACROS so that does the right // thing if possible, and so that the user knows that the macros // are actually defined as per C99. // #ifndef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS #endif #include // // Note that GLIBC is a bit inconsistent about whether int64_t is defined or not // depending upon what headers happen to have been included first... // so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG. // See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 // #if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG)) // The following #include is an implementation artifact; not part of interface. # ifdef __hpux // HP-UX has a vaguely nice in a non-standard location # include # ifdef __STDC_32_MODE__ // this is triggered with GCC, because it defines __cplusplus < 199707L # define BOOST_NO_INT64_T # endif # elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX) # include # else # include // There is a bug in Cygwin two _C macros # if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__) # undef INTMAX_C # undef UINTMAX_C # define INTMAX_C(c) c##LL # define UINTMAX_C(c) c##ULL # endif # endif #ifdef __QNX__ // QNX (Dinkumware stdlib) defines these as non-standard names. // Reflect to the standard names. typedef ::intleast8_t int_least8_t; typedef ::intfast8_t int_fast8_t; typedef ::uintleast8_t uint_least8_t; typedef ::uintfast8_t uint_fast8_t; typedef ::intleast16_t int_least16_t; typedef ::intfast16_t int_fast16_t; typedef ::uintleast16_t uint_least16_t; typedef ::uintfast16_t uint_fast16_t; typedef ::intleast32_t int_least32_t; typedef ::intfast32_t int_fast32_t; typedef ::uintleast32_t uint_least32_t; typedef ::uintfast32_t uint_fast32_t; # ifndef BOOST_NO_INT64_T typedef ::intleast64_t int_least64_t; typedef ::intfast64_t int_fast64_t; typedef ::uintleast64_t uint_least64_t; typedef ::uintfast64_t uint_fast64_t; # endif #endif namespace boost { using ::int8_t; using ::int_least8_t; using ::int_fast8_t; using ::uint8_t; using ::uint_least8_t; using ::uint_fast8_t; using ::int16_t; using ::int_least16_t; using ::int_fast16_t; using ::uint16_t; using ::uint_least16_t; using ::uint_fast16_t; using ::int32_t; using ::int_least32_t; using ::int_fast32_t; using ::uint32_t; using ::uint_least32_t; using ::uint_fast32_t; # ifndef BOOST_NO_INT64_T using ::int64_t; using ::int_least64_t; using ::int_fast64_t; using ::uint64_t; using ::uint_least64_t; using ::uint_fast64_t; # endif using ::intmax_t; using ::uintmax_t; } // namespace boost #elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS) || defined(__SOLARIS9__) || defined(__NetBSD__) // FreeBSD and Tru64 have an that contains much of what we need. # include namespace boost { using ::int8_t; typedef int8_t int_least8_t; typedef int8_t int_fast8_t; using ::uint8_t; typedef uint8_t uint_least8_t; typedef uint8_t uint_fast8_t; using ::int16_t; typedef int16_t int_least16_t; typedef int16_t int_fast16_t; using ::uint16_t; typedef uint16_t uint_least16_t; typedef uint16_t uint_fast16_t; using ::int32_t; typedef int32_t int_least32_t; typedef int32_t int_fast32_t; using ::uint32_t; typedef uint32_t uint_least32_t; typedef uint32_t uint_fast32_t; # ifndef BOOST_NO_INT64_T using ::int64_t; typedef int64_t int_least64_t; typedef int64_t int_fast64_t; using ::uint64_t; typedef uint64_t uint_least64_t; typedef uint64_t uint_fast64_t; typedef int64_t intmax_t; typedef uint64_t uintmax_t; # else typedef int32_t intmax_t; typedef uint32_t uintmax_t; # endif } // namespace boost #else // BOOST_HAS_STDINT_H # include // implementation artifact; not part of interface # include // needed for limits macros namespace boost { // These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit // platforms. For other systems, they will have to be hand tailored. // // Because the fast types are assumed to be the same as the undecorated types, // it may be possible to hand tailor a more efficient implementation. Such // an optimization may be illusionary; on the Intel x86-family 386 on, for // example, byte arithmetic and load/stores are as fast as "int" sized ones. // 8-bit types ------------------------------------------------------------// # if UCHAR_MAX == 0xff typedef signed char int8_t; typedef signed char int_least8_t; typedef signed char int_fast8_t; typedef unsigned char uint8_t; typedef unsigned char uint_least8_t; typedef unsigned char uint_fast8_t; # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif // 16-bit types -----------------------------------------------------------// # if USHRT_MAX == 0xffff # if defined(__crayx1) // The Cray X1 has a 16-bit short, however it is not recommend // for use in performance critical code. typedef short int16_t; typedef short int_least16_t; typedef int int_fast16_t; typedef unsigned short uint16_t; typedef unsigned short uint_least16_t; typedef unsigned int uint_fast16_t; # else typedef short int16_t; typedef short int_least16_t; typedef short int_fast16_t; typedef unsigned short uint16_t; typedef unsigned short uint_least16_t; typedef unsigned short uint_fast16_t; # endif # elif (USHRT_MAX == 0xffffffff) && defined(__MTA__) // On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified // MTA / XMT does support the following non-standard integer types typedef __short16 int16_t; typedef __short16 int_least16_t; typedef __short16 int_fast16_t; typedef unsigned __short16 uint16_t; typedef unsigned __short16 uint_least16_t; typedef unsigned __short16 uint_fast16_t; # elif (USHRT_MAX == 0xffffffff) && defined(CRAY) // no 16-bit types on Cray: typedef short int_least16_t; typedef short int_fast16_t; typedef unsigned short uint_least16_t; typedef unsigned short uint_fast16_t; # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif // 32-bit types -----------------------------------------------------------// # if UINT_MAX == 0xffffffff typedef int int32_t; typedef int int_least32_t; typedef int int_fast32_t; typedef unsigned int uint32_t; typedef unsigned int uint_least32_t; typedef unsigned int uint_fast32_t; # elif (USHRT_MAX == 0xffffffff) typedef short int32_t; typedef short int_least32_t; typedef short int_fast32_t; typedef unsigned short uint32_t; typedef unsigned short uint_least32_t; typedef unsigned short uint_fast32_t; # elif ULONG_MAX == 0xffffffff typedef long int32_t; typedef long int_least32_t; typedef long int_fast32_t; typedef unsigned long uint32_t; typedef unsigned long uint_least32_t; typedef unsigned long uint_fast32_t; # elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) // Integers are 64 bits on the MTA / XMT typedef __int32 int32_t; typedef __int32 int_least32_t; typedef __int32 int_fast32_t; typedef unsigned __int32 uint32_t; typedef unsigned __int32 uint_least32_t; typedef unsigned __int32 uint_fast32_t; # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif // 64-bit types + intmax_t and uintmax_t ----------------------------------// # if defined(BOOST_HAS_LONG_LONG) && \ !defined(BOOST_MSVC) && !defined(__BORLANDC__) && \ (!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \ (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) # if defined(__hpux) // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions # elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) // 2**64 - 1 # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif typedef ::boost::long_long_type intmax_t; typedef ::boost::ulong_long_type uintmax_t; typedef ::boost::long_long_type int64_t; typedef ::boost::long_long_type int_least64_t; typedef ::boost::long_long_type int_fast64_t; typedef ::boost::ulong_long_type uint64_t; typedef ::boost::ulong_long_type uint_least64_t; typedef ::boost::ulong_long_type uint_fast64_t; # elif ULONG_MAX != 0xffffffff # if ULONG_MAX == 18446744073709551615 // 2**64 - 1 typedef long intmax_t; typedef unsigned long uintmax_t; typedef long int64_t; typedef long int_least64_t; typedef long int_fast64_t; typedef unsigned long uint64_t; typedef unsigned long uint_least64_t; typedef unsigned long uint_fast64_t; # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif # elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG) __extension__ typedef long long intmax_t; __extension__ typedef unsigned long long uintmax_t; __extension__ typedef long long int64_t; __extension__ typedef long long int_least64_t; __extension__ typedef long long int_fast64_t; __extension__ typedef unsigned long long uint64_t; __extension__ typedef unsigned long long uint_least64_t; __extension__ typedef unsigned long long uint_fast64_t; # elif defined(BOOST_HAS_MS_INT64) // // we have Borland/Intel/Microsoft __int64: // typedef __int64 intmax_t; typedef unsigned __int64 uintmax_t; typedef __int64 int64_t; typedef __int64 int_least64_t; typedef __int64 int_fast64_t; typedef unsigned __int64 uint64_t; typedef unsigned __int64 uint_least64_t; typedef unsigned __int64 uint_fast64_t; # else // assume no 64-bit integers # define BOOST_NO_INT64_T typedef int32_t intmax_t; typedef uint32_t uintmax_t; # endif } // namespace boost #endif // BOOST_HAS_STDINT_H #endif // BOOST_CSTDINT_HPP /**************************************************** Macro definition section: Added 23rd September 2000 (John Maddock). Modified 11th September 2001 to be excluded when BOOST_HAS_STDINT_H is defined (John Maddock). Modified 11th Dec 2009 to always define the INT#_C macros if they're not already defined (John Maddock). ******************************************************/ #if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \ (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C)) // // For the following code we get several warnings along the lines of: // // boost/cstdint.hpp:428:35: error: use of C99 long long integer constant // // So we declare this a system header to suppress these warnings. // #if defined(__GNUC__) && (__GNUC__ >= 4) #pragma GCC system_header #endif #include # define BOOST__STDC_CONSTANT_MACROS_DEFINED # if defined(BOOST_HAS_MS_INT64) // // Borland/Intel/Microsoft compilers have width specific suffixes: // #ifndef INT8_C # define INT8_C(value) value##i8 #endif #ifndef INT16_C # define INT16_C(value) value##i16 #endif #ifndef INT32_C # define INT32_C(value) value##i32 #endif #ifndef INT64_C # define INT64_C(value) value##i64 #endif # ifdef __BORLANDC__ // Borland bug: appending ui8 makes the type a signed char # define UINT8_C(value) static_cast(value##u) # else # define UINT8_C(value) value##ui8 # endif #ifndef UINT16_C # define UINT16_C(value) value##ui16 #endif #ifndef UINT32_C # define UINT32_C(value) value##ui32 #endif #ifndef UINT64_C # define UINT64_C(value) value##ui64 #endif #ifndef INTMAX_C # define INTMAX_C(value) value##i64 # define UINTMAX_C(value) value##ui64 #endif # elif defined(__NetBSD__) # else // do it the old fashioned way: // 8-bit types ------------------------------------------------------------// # if (UCHAR_MAX == 0xff) && !defined(INT8_C) # define INT8_C(value) static_cast(value) # define UINT8_C(value) static_cast(value##u) # endif // 16-bit types -----------------------------------------------------------// # if (USHRT_MAX == 0xffff) && !defined(INT16_C) # define INT16_C(value) static_cast(value) # define UINT16_C(value) static_cast(value##u) # endif // 32-bit types -----------------------------------------------------------// #ifndef INT32_C # if (UINT_MAX == 0xffffffff) # define INT32_C(value) value # define UINT32_C(value) value##u # elif ULONG_MAX == 0xffffffff # define INT32_C(value) value##L # define UINT32_C(value) value##uL # endif #endif // 64-bit types + intmax_t and uintmax_t ----------------------------------// #ifndef INT64_C # if defined(BOOST_HAS_LONG_LONG) && \ (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_LLONG_MAX)) # if defined(__hpux) // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions # define INT64_C(value) value##LL # define UINT64_C(value) value##uLL # elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || \ (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || \ (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \ (defined(_LLONG_MAX) && _LLONG_MAX == 18446744073709551615ULL) # define INT64_C(value) value##LL # define UINT64_C(value) value##uLL # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif # elif ULONG_MAX != 0xffffffff # if ULONG_MAX == 18446744073709551615U // 2**64 - 1 # define INT64_C(value) value##L # define UINT64_C(value) value##uL # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif # elif defined(BOOST_HAS_LONG_LONG) // Usual macros not defined, work things out for ourselves: # if(~0uLL == 18446744073709551615ULL) # define INT64_C(value) value##LL # define UINT64_C(value) value##uLL # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif # ifdef BOOST_NO_INT64_T # define INTMAX_C(value) INT32_C(value) # define UINTMAX_C(value) UINT32_C(value) # else # define INTMAX_C(value) INT64_C(value) # define UINTMAX_C(value) UINT64_C(value) # endif #endif # endif // Borland/Microsoft specific width suffixes #endif // INT#_C macros. passenger-4.0.37/ext/boost/current_function.hpp000644 000765 000024 00000002747 12233035540 022254 0ustar00honglistaff000000 000000 #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED #define BOOST_CURRENT_FUNCTION_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // boost/current_function.hpp - BOOST_CURRENT_FUNCTION // // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // http://www.boost.org/libs/utility/current_function.html // namespace boost { namespace detail { inline void current_function_helper() { #if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__) # define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ #elif defined(__DMC__) && (__DMC__ >= 0x810) # define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ #elif defined(__FUNCSIG__) # define BOOST_CURRENT_FUNCTION __FUNCSIG__ #elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500)) # define BOOST_CURRENT_FUNCTION __FUNCTION__ #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) # define BOOST_CURRENT_FUNCTION __FUNC__ #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) # define BOOST_CURRENT_FUNCTION __func__ #else # define BOOST_CURRENT_FUNCTION "(unknown)" #endif } } // namespace detail } // namespace boost #endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED passenger-4.0.37/ext/boost/date_time/000755 000765 000024 00000000000 12233035540 020075 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/detail/000755 000765 000024 00000000000 12233035540 017404 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/enable_shared_from_this.hpp000644 000765 000024 00000001022 12233035540 023474 0ustar00honglistaff000000 000000 #ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED #define BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED // // enable_shared_from_this.hpp // // Copyright (c) 2002 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // http://www.boost.org/libs/smart_ptr/enable_shared_from_this.html // #include #endif // #ifndef BOOST_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED passenger-4.0.37/ext/boost/exception/000755 000765 000024 00000000000 12233035540 020140 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/exception_ptr.hpp000644 000765 000024 00000000566 12233035540 021545 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_FA5836A2CADA11DC8CD47C8555D89593 #define UUID_FA5836A2CADA11DC8CD47C8555D89593 #include #endif passenger-4.0.37/ext/boost/foreach.hpp000644 000765 000024 00000130756 12233035540 020276 0ustar00honglistaff000000 000000 /////////////////////////////////////////////////////////////////////////////// // foreach.hpp header file // // Copyright 2004 Eric Niebler. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/foreach for documentation // // Credits: // Anson Tsao - for the initial inspiration and several good suggestions. // Thorsten Ottosen - for Boost.Range, and for suggesting a way to detect // const-qualified rvalues at compile time on VC7.1+ // Russell Hind - For help porting to Borland // Alisdair Meredith - For help porting to Borland // Stefan Slapeta - For help porting to Intel // David Jenkins - For help finding a Microsoft Code Analysis bug // mimomorin@... - For a patch to use rvalue refs on supporting compilers #ifndef BOOST_FOREACH // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include // for std::pair #include #include // Some compilers let us detect even const-qualified rvalues at compile-time #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) \ || BOOST_WORKAROUND(BOOST_MSVC, >= 1310) && !defined(_PREFAST_) \ || (BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ <= 5) && !defined(BOOST_INTEL) && \ !defined(BOOST_CLANG)) \ || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ >= 4) && !defined(BOOST_INTEL) && \ !defined(BOOST_CLANG)) # define BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION #else // Some compilers allow temporaries to be bound to non-const references. // These compilers make it impossible to for BOOST_FOREACH to detect // temporaries and avoid reevaluation of the collection expression. # if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || BOOST_WORKAROUND(__BORLANDC__, < 0x593) \ || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \ || BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) \ || BOOST_WORKAROUND(__DECCXX_VER, <= 60590042) # define BOOST_FOREACH_NO_RVALUE_DETECTION # endif // Some compilers do not correctly implement the lvalue/rvalue conversion // rules of the ternary conditional operator. # if defined(BOOST_FOREACH_NO_RVALUE_DETECTION) \ || defined(BOOST_NO_SFINAE) \ || BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ || BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(1400)) \ || BOOST_WORKAROUND(__GNUC__, < 3) \ || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ <= 2)) \ || (BOOST_WORKAROUND(__GNUC__, == 3) && (__GNUC_MINOR__ <= 3) && defined(__APPLE_CC__)) \ || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) \ || BOOST_WORKAROUND(__SUNPRO_CC, >= 0x5100) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x590)) # define BOOST_FOREACH_NO_CONST_RVALUE_DETECTION # else # define BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION # endif #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION # include # include # include # include #endif namespace boost { // forward declarations for iterator_range template class iterator_range; // forward declarations for sub_range template class sub_range; namespace foreach { /////////////////////////////////////////////////////////////////////////////// // in_range // template inline std::pair in_range(T begin, T end) { return std::make_pair(begin, end); } /////////////////////////////////////////////////////////////////////////////// // boost::foreach::is_lightweight_proxy // Specialize this for user-defined collection types if they are inexpensive to copy. // This tells BOOST_FOREACH it can avoid the rvalue/lvalue detection stuff. template struct is_lightweight_proxy : boost::mpl::false_ { }; /////////////////////////////////////////////////////////////////////////////// // boost::foreach::is_noncopyable // Specialize this for user-defined collection types if they cannot be copied. // This also tells BOOST_FOREACH to avoid the rvalue/lvalue detection stuff. template struct is_noncopyable #if !defined(BOOST_BROKEN_IS_BASE_AND_DERIVED) && !defined(BOOST_NO_IS_ABSTRACT) : boost::mpl::or_< boost::is_abstract , boost::is_base_and_derived > #elif !defined(BOOST_BROKEN_IS_BASE_AND_DERIVED) : boost::is_base_and_derived #elif !defined(BOOST_NO_IS_ABSTRACT) : boost::is_abstract #else : boost::mpl::false_ #endif { }; } // namespace foreach } // namespace boost // vc6/7 needs help ordering the following overloads #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING # define BOOST_FOREACH_TAG_DEFAULT ... #else # define BOOST_FOREACH_TAG_DEFAULT boost::foreach::tag #endif /////////////////////////////////////////////////////////////////////////////// // boost_foreach_is_lightweight_proxy // Another customization point for the is_lightweight_proxy optimization, // this one works on legacy compilers. Overload boost_foreach_is_lightweight_proxy // at the global namespace for your type. template inline boost::foreach::is_lightweight_proxy * boost_foreach_is_lightweight_proxy(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; } template inline boost::mpl::true_ * boost_foreach_is_lightweight_proxy(std::pair *&, boost::foreach::tag) { return 0; } template inline boost::mpl::true_ * boost_foreach_is_lightweight_proxy(boost::iterator_range *&, boost::foreach::tag) { return 0; } template inline boost::mpl::true_ * boost_foreach_is_lightweight_proxy(boost::sub_range *&, boost::foreach::tag) { return 0; } template inline boost::mpl::true_ * boost_foreach_is_lightweight_proxy(T **&, boost::foreach::tag) { return 0; } /////////////////////////////////////////////////////////////////////////////// // boost_foreach_is_noncopyable // Another customization point for the is_noncopyable trait, // this one works on legacy compilers. Overload boost_foreach_is_noncopyable // at the global namespace for your type. template inline boost::foreach::is_noncopyable * boost_foreach_is_noncopyable(T *&, BOOST_FOREACH_TAG_DEFAULT) { return 0; } namespace boost { namespace foreach_detail_ { /////////////////////////////////////////////////////////////////////////////// // Define some utilities for assessing the properties of expressions // template inline boost::mpl::and_ *and_(Bool1 *, Bool2 *) { return 0; } template inline boost::mpl::and_ *and_(Bool1 *, Bool2 *, Bool3 *) { return 0; } template inline boost::mpl::or_ *or_(Bool1 *, Bool2 *) { return 0; } template inline boost::mpl::or_ *or_(Bool1 *, Bool2 *, Bool3 *) { return 0; } template inline boost::mpl::not_ *not_(Bool1 *) { return 0; } template inline boost::is_array *is_array_(T const &) { return 0; } template inline boost::is_const *is_const_(T &) { return 0; } #ifndef BOOST_FOREACH_NO_RVALUE_DETECTION template inline boost::mpl::true_ *is_const_(T const &) { return 0; } #endif #ifdef BOOST_NO_CXX11_RVALUE_REFERENCES template inline boost::mpl::false_ *is_rvalue_(T &, int) { return 0; } template inline boost::mpl::true_ *is_rvalue_(T const &, ...) { return 0; } #else template inline boost::is_rvalue_reference *is_rvalue_(T &&, int) { return 0; } #endif /////////////////////////////////////////////////////////////////////////////// // auto_any_t/auto_any // General utility for putting an object of any type into automatic storage struct auto_any_base { // auto_any_base must evaluate to false in boolean context so that // they can be declared in if() statements. operator bool() const { return false; } }; template struct auto_any : auto_any_base { explicit auto_any(T const &t) : item(t) { } // temporaries of type auto_any will be bound to const auto_any_base // references, but we still want to be able to mutate the stored // data, so declare it as mutable. mutable T item; }; typedef auto_any_base const &auto_any_t; template inline BOOST_DEDUCED_TYPENAME boost::mpl::if_::type &auto_any_cast(auto_any_t a) { return static_cast const &>(a).item; } typedef boost::mpl::true_ const_; /////////////////////////////////////////////////////////////////////////////// // type2type // template struct type2type : boost::mpl::if_ { }; template struct wrap_cstr { typedef T type; }; template<> struct wrap_cstr { typedef wrap_cstr type; typedef char *iterator; typedef char *const_iterator; }; template<> struct wrap_cstr { typedef wrap_cstr type; typedef char const *iterator; typedef char const *const_iterator; }; template<> struct wrap_cstr { typedef wrap_cstr type; typedef wchar_t *iterator; typedef wchar_t *const_iterator; }; template<> struct wrap_cstr { typedef wrap_cstr type; typedef wchar_t const *iterator; typedef wchar_t const *const_iterator; }; template struct is_char_array : mpl::and_< is_array , mpl::or_< is_convertible , is_convertible > > {}; template struct foreach_iterator { // **** READ THIS IF YOUR COMPILE BREAKS HERE **** // // There is an ambiguity about how to iterate over arrays of char and wchar_t. // Should the last array element be treated as a null terminator to be skipped, or // is it just like any other element in the array? To fix the problem, you must // say which behavior you want. // // To treat the container as a null-terminated string, merely cast it to a // char const *, as in BOOST_FOREACH( char ch, (char const *)"hello" ) ... // // To treat the container as an array, use boost::as_array() in , // as in BOOST_FOREACH( char ch, boost::as_array("hello") ) ... #if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 BOOST_MPL_ASSERT_MSG( (!is_char_array::value), IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING, (T&) ); #endif // If the type is a pointer to a null terminated string (as opposed // to an array type), there is no ambiguity. typedef BOOST_DEDUCED_TYPENAME wrap_cstr::type container; typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if< C , range_const_iterator , range_mutable_iterator >::type type; }; template struct foreach_reverse_iterator { // **** READ THIS IF YOUR COMPILE BREAKS HERE **** // // There is an ambiguity about how to iterate over arrays of char and wchar_t. // Should the last array element be treated as a null terminator to be skipped, or // is it just like any other element in the array? To fix the problem, you must // say which behavior you want. // // To treat the container as a null-terminated string, merely cast it to a // char const *, as in BOOST_FOREACH( char ch, (char const *)"hello" ) ... // // To treat the container as an array, use boost::as_array() in , // as in BOOST_FOREACH( char ch, boost::as_array("hello") ) ... #if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 BOOST_MPL_ASSERT_MSG( (!is_char_array::value), IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING, (T&) ); #endif // If the type is a pointer to a null terminated string (as opposed // to an array type), there is no ambiguity. typedef BOOST_DEDUCED_TYPENAME wrap_cstr::type container; typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if< C , range_reverse_iterator , range_reverse_iterator >::type type; }; template struct foreach_reference : iterator_reference::type> { }; /////////////////////////////////////////////////////////////////////////////// // encode_type // template inline type2type *encode_type(T &, boost::mpl::false_ *) { return 0; } template inline type2type *encode_type(T const &, boost::mpl::true_ *) { return 0; } /////////////////////////////////////////////////////////////////////////////// // set_false // inline bool set_false(bool &b) { b = false; return false; } /////////////////////////////////////////////////////////////////////////////// // to_ptr // template inline T *&to_ptr(T const &) { static T *t = 0; return t; } // Borland needs a little extra help with arrays #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template inline T (*&to_ptr(T (&)[N]))[N] { static T (*t)[N] = 0; return t; } /////////////////////////////////////////////////////////////////////////////// // derefof // template inline T &derefof(T *t) { // This is a work-around for a compiler bug in Borland. If T* is a pointer to array type U(*)[N], // then dereferencing it results in a U* instead of U(&)[N]. The cast forces the issue. return reinterpret_cast( *const_cast( reinterpret_cast(t) ) ); } # define BOOST_FOREACH_DEREFOF(T) boost::foreach_detail_::derefof(*T) #else # define BOOST_FOREACH_DEREFOF(T) (*T) #endif #if defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION) \ && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) /////////////////////////////////////////////////////////////////////////////// // Rvalue references makes it drop-dead simple to detect at compile time // whether an expression is an rvalue. /////////////////////////////////////////////////////////////////////////////// # define BOOST_FOREACH_IS_RVALUE(COL) \ boost::foreach_detail_::is_rvalue_((COL), 0) #elif defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION) \ && defined(BOOST_NO_CXX11_RVALUE_REFERENCES) /////////////////////////////////////////////////////////////////////////////// // Detect at compile-time whether an expression yields an rvalue or // an lvalue. This is rather non-standard, but some popular compilers // accept it. /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // rvalue_probe // template struct rvalue_probe { struct private_type_ {}; // can't ever return an array by value typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< boost::mpl::or_, boost::is_array >, private_type_, T >::type value_type; operator value_type() { return *reinterpret_cast(this); } // never called operator T &() const { return *reinterpret_cast(const_cast(this)); } // never called }; template rvalue_probe const make_probe(T const &) { return rvalue_probe(); } # define BOOST_FOREACH_IS_RVALUE(COL) \ boost::foreach_detail_::and_( \ boost::foreach_detail_::not_(boost::foreach_detail_::is_array_(COL)) \ , (true ? 0 : boost::foreach_detail_::is_rvalue_( \ (true ? boost::foreach_detail_::make_probe(COL) : (COL)), 0))) #elif defined(BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION) /////////////////////////////////////////////////////////////////////////////// // Detect at run-time whether an expression yields an rvalue // or an lvalue. This is 100% standard C++, but not all compilers // accept it. Also, it causes FOREACH to break when used with non- // copyable collection types. /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // rvalue_probe // template struct rvalue_probe { rvalue_probe(T &t, bool &b) : value(t) , is_rvalue(b) { } struct private_type_ {}; // can't ever return an array or an abstract type by value #ifdef BOOST_NO_IS_ABSTRACT typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< boost::is_array, private_type_, T >::type value_type; #else typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< boost::mpl::or_, boost::is_array >, private_type_, T >::type value_type; #endif operator value_type() { this->is_rvalue = true; return this->value; } operator T &() const { return this->value; } private: T &value; bool &is_rvalue; }; template rvalue_probe make_probe(T &t, bool &b) { return rvalue_probe(t, b); } template rvalue_probe make_probe(T const &t, bool &b) { return rvalue_probe(t, b); } /////////////////////////////////////////////////////////////////////////////// // simple_variant // holds either a T or a T const* template struct simple_variant { simple_variant(T const *t) : is_rvalue(false) { *static_cast(this->data.address()) = t; } simple_variant(T const &t) : is_rvalue(true) { ::new(this->data.address()) T(t); } simple_variant(simple_variant const &that) : is_rvalue(that.is_rvalue) { if(this->is_rvalue) ::new(this->data.address()) T(*that.get()); else *static_cast(this->data.address()) = that.get(); } ~simple_variant() { if(this->is_rvalue) this->get()->~T(); } T const *get() const { if(this->is_rvalue) return static_cast(this->data.address()); else return *static_cast(this->data.address()); } private: enum size_type { size = sizeof(T) > sizeof(T*) ? sizeof(T) : sizeof(T*) }; simple_variant &operator =(simple_variant const &); bool const is_rvalue; aligned_storage data; }; // If the collection is an array or is noncopyable, it must be an lvalue. // If the collection is a lightweight proxy, treat it as an rvalue // BUGBUG what about a noncopyable proxy? template inline BOOST_DEDUCED_TYPENAME boost::enable_if, IsProxy>::type * should_copy_impl(LValue *, IsProxy *, bool *) { return 0; } // Otherwise, we must determine at runtime whether it's an lvalue or rvalue inline bool * should_copy_impl(boost::mpl::false_ *, boost::mpl::false_ *, bool *is_rvalue) { return is_rvalue; } #endif /////////////////////////////////////////////////////////////////////////////// // contain // template inline auto_any contain(T const &t, boost::mpl::true_ *) // rvalue { return auto_any(t); } template inline auto_any contain(T &t, boost::mpl::false_ *) // lvalue { // Cannot seem to get sunpro to handle addressof() with array types. #if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x570)) return auto_any(&t); #else return auto_any(boost::addressof(t)); #endif } #ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION template inline auto_any > contain(T const &t, bool *rvalue) { return auto_any >(*rvalue ? simple_variant(t) : simple_variant(&t)); } #endif ///////////////////////////////////////////////////////////////////////////// // begin // template inline auto_any::type> begin(auto_any_t col, type2type *, boost::mpl::true_ *) // rvalue { return auto_any::type>( boost::begin(auto_any_cast(col))); } template inline auto_any::type> begin(auto_any_t col, type2type *, boost::mpl::false_ *) // lvalue { typedef BOOST_DEDUCED_TYPENAME type2type::type type; typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iterator; return auto_any::type>( iterator(boost::begin(BOOST_FOREACH_DEREFOF((auto_any_cast(col)))))); } #ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION template inline auto_any::type> begin(auto_any_t col, type2type *, bool *) { return auto_any::type>( boost::begin(*auto_any_cast, boost::mpl::false_>(col).get())); } #endif #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template inline auto_any begin(auto_any_t col, type2type *, boost::mpl::true_ *) // null-terminated C-style strings { return auto_any(auto_any_cast(col)); } #endif /////////////////////////////////////////////////////////////////////////////// // end // template inline auto_any::type> end(auto_any_t col, type2type *, boost::mpl::true_ *) // rvalue { return auto_any::type>( boost::end(auto_any_cast(col))); } template inline auto_any::type> end(auto_any_t col, type2type *, boost::mpl::false_ *) // lvalue { typedef BOOST_DEDUCED_TYPENAME type2type::type type; typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iterator; return auto_any::type>( iterator(boost::end(BOOST_FOREACH_DEREFOF((auto_any_cast(col)))))); } #ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION template inline auto_any::type> end(auto_any_t col, type2type *, bool *) { return auto_any::type>( boost::end(*auto_any_cast, boost::mpl::false_>(col).get())); } #endif #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template inline auto_any end(auto_any_t, type2type *, boost::mpl::true_ *) // null-terminated C-style strings { return auto_any(0); // not used } #endif /////////////////////////////////////////////////////////////////////////////// // done // template inline bool done(auto_any_t cur, auto_any_t end, type2type *) { typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iter_t; return auto_any_cast(cur) == auto_any_cast(end); } #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template inline bool done(auto_any_t cur, auto_any_t, type2type *) // null-terminated C-style strings { return ! *auto_any_cast(cur); } #endif /////////////////////////////////////////////////////////////////////////////// // next // template inline void next(auto_any_t cur, type2type *) { typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iter_t; ++auto_any_cast(cur); } /////////////////////////////////////////////////////////////////////////////// // deref // template inline BOOST_DEDUCED_TYPENAME foreach_reference::type deref(auto_any_t cur, type2type *) { typedef BOOST_DEDUCED_TYPENAME foreach_iterator::type iter_t; return *auto_any_cast(cur); } ///////////////////////////////////////////////////////////////////////////// // rbegin // template inline auto_any::type> rbegin(auto_any_t col, type2type *, boost::mpl::true_ *) // rvalue { return auto_any::type>( boost::rbegin(auto_any_cast(col))); } template inline auto_any::type> rbegin(auto_any_t col, type2type *, boost::mpl::false_ *) // lvalue { typedef BOOST_DEDUCED_TYPENAME type2type::type type; typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iterator; return auto_any::type>( iterator(boost::rbegin(BOOST_FOREACH_DEREFOF((auto_any_cast(col)))))); } #ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION template inline auto_any::type> rbegin(auto_any_t col, type2type *, bool *) { return auto_any::type>( boost::rbegin(*auto_any_cast, boost::mpl::false_>(col).get())); } #endif #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template inline auto_any > rbegin(auto_any_t col, type2type *, boost::mpl::true_ *) // null-terminated C-style strings { T *p = auto_any_cast(col); while(0 != *p) ++p; return auto_any >(reverse_iterator(p)); } #endif /////////////////////////////////////////////////////////////////////////////// // rend // template inline auto_any::type> rend(auto_any_t col, type2type *, boost::mpl::true_ *) // rvalue { return auto_any::type>( boost::rend(auto_any_cast(col))); } template inline auto_any::type> rend(auto_any_t col, type2type *, boost::mpl::false_ *) // lvalue { typedef BOOST_DEDUCED_TYPENAME type2type::type type; typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iterator; return auto_any::type>( iterator(boost::rend(BOOST_FOREACH_DEREFOF((auto_any_cast(col)))))); } #ifdef BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION template inline auto_any::type> rend(auto_any_t col, type2type *, bool *) { return auto_any::type>( boost::rend(*auto_any_cast, boost::mpl::false_>(col).get())); } #endif #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template inline auto_any > rend(auto_any_t col, type2type *, boost::mpl::true_ *) // null-terminated C-style strings { return auto_any >( reverse_iterator(auto_any_cast(col))); } #endif /////////////////////////////////////////////////////////////////////////////// // rdone // template inline bool rdone(auto_any_t cur, auto_any_t end, type2type *) { typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iter_t; return auto_any_cast(cur) == auto_any_cast(end); } /////////////////////////////////////////////////////////////////////////////// // rnext // template inline void rnext(auto_any_t cur, type2type *) { typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iter_t; ++auto_any_cast(cur); } /////////////////////////////////////////////////////////////////////////////// // rderef // template inline BOOST_DEDUCED_TYPENAME foreach_reference::type rderef(auto_any_t cur, type2type *) { typedef BOOST_DEDUCED_TYPENAME foreach_reverse_iterator::type iter_t; return *auto_any_cast(cur); } } // namespace foreach_detail_ } // namespace boost // Suppress a bogus code analysis warning on vc8+ #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) # define BOOST_FOREACH_SUPPRESS_WARNINGS() __pragma(warning(suppress:6001)) #else # define BOOST_FOREACH_SUPPRESS_WARNINGS() #endif /////////////////////////////////////////////////////////////////////////////// // Define a macro for giving hidden variables a unique name. Not strictly // needed, but eliminates some warnings on some compilers. #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) // With some versions of MSVC, use of __LINE__ to create unique identifiers // can fail when the Edit-and-Continue debug flag is used. # define BOOST_FOREACH_ID(x) x #else # define BOOST_FOREACH_ID(x) BOOST_PP_CAT(x, __LINE__) #endif // A sneaky way to get the type of the collection without evaluating the expression #define BOOST_FOREACH_TYPEOF(COL) \ (true ? 0 : boost::foreach_detail_::encode_type(COL, boost::foreach_detail_::is_const_(COL))) // returns true_* if the type is noncopyable #define BOOST_FOREACH_IS_NONCOPYABLE(COL) \ boost_foreach_is_noncopyable( \ boost::foreach_detail_::to_ptr(COL) \ , boost_foreach_argument_dependent_lookup_hack_value) // returns true_* if the type is a lightweight proxy (and is not noncopyable) #define BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL) \ boost::foreach_detail_::and_( \ boost::foreach_detail_::not_(BOOST_FOREACH_IS_NONCOPYABLE(COL)) \ , boost_foreach_is_lightweight_proxy( \ boost::foreach_detail_::to_ptr(COL) \ , boost_foreach_argument_dependent_lookup_hack_value)) #if defined(BOOST_FOREACH_COMPILE_TIME_CONST_RVALUE_DETECTION) /////////////////////////////////////////////////////////////////////////////// // R-values and const R-values supported here with zero runtime overhead /////////////////////////////////////////////////////////////////////////////// // No variable is needed to track the rvalue-ness of the collection expression # define BOOST_FOREACH_PREAMBLE() \ BOOST_FOREACH_SUPPRESS_WARNINGS() // Evaluate the collection expression # define BOOST_FOREACH_EVALUATE(COL) \ (COL) # define BOOST_FOREACH_SHOULD_COPY(COL) \ (true ? 0 : boost::foreach_detail_::or_( \ BOOST_FOREACH_IS_RVALUE(COL) \ , BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL))) #elif defined(BOOST_FOREACH_RUN_TIME_CONST_RVALUE_DETECTION) /////////////////////////////////////////////////////////////////////////////// // R-values and const R-values supported here /////////////////////////////////////////////////////////////////////////////// // Declare a variable to track the rvalue-ness of the collection expression # define BOOST_FOREACH_PREAMBLE() \ BOOST_FOREACH_SUPPRESS_WARNINGS() \ if (bool BOOST_FOREACH_ID(_foreach_is_rvalue) = false) {} else // Evaluate the collection expression, and detect if it is an lvalue or and rvalue # define BOOST_FOREACH_EVALUATE(COL) \ (true ? boost::foreach_detail_::make_probe((COL), BOOST_FOREACH_ID(_foreach_is_rvalue)) : (COL)) // The rvalue/lvalue-ness of the collection expression is determined dynamically, unless // the type is an array or is noncopyable or is non-const, in which case we know it's an lvalue. // If the type happens to be a lightweight proxy, always make a copy. # define BOOST_FOREACH_SHOULD_COPY(COL) \ (boost::foreach_detail_::should_copy_impl( \ true ? 0 : boost::foreach_detail_::or_( \ boost::foreach_detail_::is_array_(COL) \ , BOOST_FOREACH_IS_NONCOPYABLE(COL) \ , boost::foreach_detail_::not_(boost::foreach_detail_::is_const_(COL))) \ , true ? 0 : BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL) \ , &BOOST_FOREACH_ID(_foreach_is_rvalue))) #elif !defined(BOOST_FOREACH_NO_RVALUE_DETECTION) /////////////////////////////////////////////////////////////////////////////// // R-values supported here, const R-values NOT supported here /////////////////////////////////////////////////////////////////////////////// // No variable is needed to track the rvalue-ness of the collection expression # define BOOST_FOREACH_PREAMBLE() \ BOOST_FOREACH_SUPPRESS_WARNINGS() // Evaluate the collection expression # define BOOST_FOREACH_EVALUATE(COL) \ (COL) // Determine whether the collection expression is an lvalue or an rvalue. // NOTE: this gets the answer wrong for const rvalues. # define BOOST_FOREACH_SHOULD_COPY(COL) \ (true ? 0 : boost::foreach_detail_::or_( \ boost::foreach_detail_::is_rvalue_((COL), 0) \ , BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL))) #else /////////////////////////////////////////////////////////////////////////////// // R-values NOT supported here /////////////////////////////////////////////////////////////////////////////// // No variable is needed to track the rvalue-ness of the collection expression # define BOOST_FOREACH_PREAMBLE() \ BOOST_FOREACH_SUPPRESS_WARNINGS() // Evaluate the collection expression # define BOOST_FOREACH_EVALUATE(COL) \ (COL) // Can't use rvalues with BOOST_FOREACH (unless they are lightweight proxies) # define BOOST_FOREACH_SHOULD_COPY(COL) \ (true ? 0 : BOOST_FOREACH_IS_LIGHTWEIGHT_PROXY(COL)) #endif #define BOOST_FOREACH_CONTAIN(COL) \ boost::foreach_detail_::contain( \ BOOST_FOREACH_EVALUATE(COL) \ , BOOST_FOREACH_SHOULD_COPY(COL)) #define BOOST_FOREACH_BEGIN(COL) \ boost::foreach_detail_::begin( \ BOOST_FOREACH_ID(_foreach_col) \ , BOOST_FOREACH_TYPEOF(COL) \ , BOOST_FOREACH_SHOULD_COPY(COL)) #define BOOST_FOREACH_END(COL) \ boost::foreach_detail_::end( \ BOOST_FOREACH_ID(_foreach_col) \ , BOOST_FOREACH_TYPEOF(COL) \ , BOOST_FOREACH_SHOULD_COPY(COL)) #define BOOST_FOREACH_DONE(COL) \ boost::foreach_detail_::done( \ BOOST_FOREACH_ID(_foreach_cur) \ , BOOST_FOREACH_ID(_foreach_end) \ , BOOST_FOREACH_TYPEOF(COL)) #define BOOST_FOREACH_NEXT(COL) \ boost::foreach_detail_::next( \ BOOST_FOREACH_ID(_foreach_cur) \ , BOOST_FOREACH_TYPEOF(COL)) #define BOOST_FOREACH_DEREF(COL) \ boost::foreach_detail_::deref( \ BOOST_FOREACH_ID(_foreach_cur) \ , BOOST_FOREACH_TYPEOF(COL)) #define BOOST_FOREACH_RBEGIN(COL) \ boost::foreach_detail_::rbegin( \ BOOST_FOREACH_ID(_foreach_col) \ , BOOST_FOREACH_TYPEOF(COL) \ , BOOST_FOREACH_SHOULD_COPY(COL)) #define BOOST_FOREACH_REND(COL) \ boost::foreach_detail_::rend( \ BOOST_FOREACH_ID(_foreach_col) \ , BOOST_FOREACH_TYPEOF(COL) \ , BOOST_FOREACH_SHOULD_COPY(COL)) #define BOOST_FOREACH_RDONE(COL) \ boost::foreach_detail_::rdone( \ BOOST_FOREACH_ID(_foreach_cur) \ , BOOST_FOREACH_ID(_foreach_end) \ , BOOST_FOREACH_TYPEOF(COL)) #define BOOST_FOREACH_RNEXT(COL) \ boost::foreach_detail_::rnext( \ BOOST_FOREACH_ID(_foreach_cur) \ , BOOST_FOREACH_TYPEOF(COL)) #define BOOST_FOREACH_RDEREF(COL) \ boost::foreach_detail_::rderef( \ BOOST_FOREACH_ID(_foreach_cur) \ , BOOST_FOREACH_TYPEOF(COL)) /////////////////////////////////////////////////////////////////////////////// // BOOST_FOREACH // // For iterating over collections. Collections can be // arrays, null-terminated strings, or STL containers. // The loop variable can be a value or reference. For // example: // // std::list int_list(/*stuff*/); // BOOST_FOREACH(int &i, int_list) // { // /* // * loop body goes here. // * i is a reference to the int in int_list. // */ // } // // Alternately, you can declare the loop variable first, // so you can access it after the loop finishes. Obviously, // if you do it this way, then the loop variable cannot be // a reference. // // int i; // BOOST_FOREACH(i, int_list) // { ... } // #define BOOST_FOREACH(VAR, COL) \ BOOST_FOREACH_PREAMBLE() \ if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_col) = BOOST_FOREACH_CONTAIN(COL)) {} else \ if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_cur) = BOOST_FOREACH_BEGIN(COL)) {} else \ if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_end) = BOOST_FOREACH_END(COL)) {} else \ for (bool BOOST_FOREACH_ID(_foreach_continue) = true; \ BOOST_FOREACH_ID(_foreach_continue) && !BOOST_FOREACH_DONE(COL); \ BOOST_FOREACH_ID(_foreach_continue) ? BOOST_FOREACH_NEXT(COL) : (void)0) \ if (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_continue))) {} else \ for (VAR = BOOST_FOREACH_DEREF(COL); !BOOST_FOREACH_ID(_foreach_continue); BOOST_FOREACH_ID(_foreach_continue) = true) /////////////////////////////////////////////////////////////////////////////// // BOOST_REVERSE_FOREACH // // For iterating over collections in reverse order. In // all other respects, BOOST_REVERSE_FOREACH is like // BOOST_FOREACH. // #define BOOST_REVERSE_FOREACH(VAR, COL) \ BOOST_FOREACH_PREAMBLE() \ if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_col) = BOOST_FOREACH_CONTAIN(COL)) {} else \ if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_cur) = BOOST_FOREACH_RBEGIN(COL)) {} else \ if (boost::foreach_detail_::auto_any_t BOOST_FOREACH_ID(_foreach_end) = BOOST_FOREACH_REND(COL)) {} else \ for (bool BOOST_FOREACH_ID(_foreach_continue) = true; \ BOOST_FOREACH_ID(_foreach_continue) && !BOOST_FOREACH_RDONE(COL); \ BOOST_FOREACH_ID(_foreach_continue) ? BOOST_FOREACH_RNEXT(COL) : (void)0) \ if (boost::foreach_detail_::set_false(BOOST_FOREACH_ID(_foreach_continue))) {} else \ for (VAR = BOOST_FOREACH_RDEREF(COL); !BOOST_FOREACH_ID(_foreach_continue); BOOST_FOREACH_ID(_foreach_continue) = true) #endif passenger-4.0.37/ext/boost/foreach_fwd.hpp000644 000765 000024 00000003246 12233035540 021127 0ustar00honglistaff000000 000000 /////////////////////////////////////////////////////////////////////////////// // foreach.hpp header file // // Copyright 2010 Eric Niebler. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/foreach for documentation // // Credits: // Kazutoshi Satoda: for suggesting the need for a _fwd header for foreach's // customization points. #ifndef BOOST_FOREACH_FWD_HPP #define BOOST_FOREACH_FWD_HPP // This must be at global scope, hence the uglified name enum boost_foreach_argument_dependent_lookup_hack { boost_foreach_argument_dependent_lookup_hack_value }; namespace boost { namespace foreach { /////////////////////////////////////////////////////////////////////////////// // boost::foreach::tag // typedef boost_foreach_argument_dependent_lookup_hack tag; /////////////////////////////////////////////////////////////////////////////// // boost::foreach::is_lightweight_proxy // Specialize this for user-defined collection types if they are inexpensive to copy. // This tells BOOST_FOREACH it can avoid the rvalue/lvalue detection stuff. template struct is_lightweight_proxy; /////////////////////////////////////////////////////////////////////////////// // boost::foreach::is_noncopyable // Specialize this for user-defined collection types if they cannot be copied. // This also tells BOOST_FOREACH to avoid the rvalue/lvalue detection stuff. template struct is_noncopyable; } // namespace foreach } // namespace boost #endif passenger-4.0.37/ext/boost/function/000755 000765 000024 00000000000 12233035540 017767 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/function.hpp000644 000765 000024 00000004230 12233035540 020477 0ustar00honglistaff000000 000000 // Boost.Function library // Copyright Douglas Gregor 2001-2003. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org/libs/function // William Kempf, Jesse Jones and Karl Nelson were all very helpful in the // design of this library. #include // unary_function, binary_function #include #include #ifndef BOOST_FUNCTION_MAX_ARGS # define BOOST_FUNCTION_MAX_ARGS 10 #endif // BOOST_FUNCTION_MAX_ARGS // Include the prologue here so that the use of file-level iteration // in anything that may be included by function_template.hpp doesn't break #include // Older Visual Age C++ version do not handle the file iteration well #if BOOST_WORKAROUND(__IBMCPP__, >= 500) && BOOST_WORKAROUND(__IBMCPP__, < 800) # if BOOST_FUNCTION_MAX_ARGS >= 0 # include # endif # if BOOST_FUNCTION_MAX_ARGS >= 1 # include # endif # if BOOST_FUNCTION_MAX_ARGS >= 2 # include # endif # if BOOST_FUNCTION_MAX_ARGS >= 3 # include # endif # if BOOST_FUNCTION_MAX_ARGS >= 4 # include # endif # if BOOST_FUNCTION_MAX_ARGS >= 5 # include # endif # if BOOST_FUNCTION_MAX_ARGS >= 6 # include # endif # if BOOST_FUNCTION_MAX_ARGS >= 7 # include # endif # if BOOST_FUNCTION_MAX_ARGS >= 8 # include # endif # if BOOST_FUNCTION_MAX_ARGS >= 9 # include # endif # if BOOST_FUNCTION_MAX_ARGS >= 10 # include # endif #else // What is the '3' for? # define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_FUNCTION_MAX_ARGS,)) # include BOOST_PP_ITERATE() # undef BOOST_PP_ITERATION_PARAMS_1 #endif passenger-4.0.37/ext/boost/function_equal.hpp000644 000765 000024 00000001427 12233035540 021673 0ustar00honglistaff000000 000000 // Copyright Douglas Gregor 2004. // Copyright 2005 Peter Dimov // Use, modification and distribution is subject to // the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org #ifndef BOOST_FUNCTION_EQUAL_HPP #define BOOST_FUNCTION_EQUAL_HPP namespace boost { template bool function_equal_impl(const F& f, const G& g, long) { return f == g; } // function_equal_impl needs to be unqualified to pick // user overloads on two-phase compilers template bool function_equal(const F& f, const G& g) { return function_equal_impl(f, g, 0); } } // end namespace boost #endif // BOOST_FUNCTION_EQUAL_HPP passenger-4.0.37/ext/boost/functional/000755 000765 000024 00000000000 12233035540 020304 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/get_pointer.hpp000644 000765 000024 00000002231 12233035540 021170 0ustar00honglistaff000000 000000 // Copyright Peter Dimov and David Abrahams 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef GET_POINTER_DWA20021219_HPP #define GET_POINTER_DWA20021219_HPP #include // In order to avoid circular dependencies with Boost.TR1 // we make sure that our include of doesn't try to // pull in the TR1 headers: that's why we use this header // rather than including directly: #include // std::auto_ptr namespace boost { // get_pointer(p) extracts a ->* capable pointer from p template T * get_pointer(T * p) { return p; } // get_pointer(shared_ptr const & p) has been moved to shared_ptr.hpp template T * get_pointer(std::auto_ptr const& p) { return p.get(); } #if !defined( BOOST_NO_CXX11_SMART_PTR ) template T * get_pointer( std::unique_ptr const& p ) { return p.get(); } template T * get_pointer( std::shared_ptr const& p ) { return p.get(); } #endif } // namespace boost #endif // GET_POINTER_DWA20021219_HPP passenger-4.0.37/ext/boost/indirect_reference.hpp000644 000765 000024 00000002017 12233035540 022472 0ustar00honglistaff000000 000000 #ifndef INDIRECT_REFERENCE_DWA200415_HPP # define INDIRECT_REFERENCE_DWA200415_HPP // // Copyright David Abrahams 2004. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // typename indirect_reference

::type provides the type of *p. // // http://www.boost.org/libs/iterator/doc/pointee.html // # include # include # include # include # include namespace boost { namespace detail { template struct smart_ptr_reference { typedef typename boost::pointee

::type& type; }; } template struct indirect_reference : mpl::eval_if< detail::is_incrementable

, iterator_reference

, detail::smart_ptr_reference

> { }; } // namespace boost #endif // INDIRECT_REFERENCE_DWA200415_HPP passenger-4.0.37/ext/boost/integer/000755 000765 000024 00000000000 12233035540 017577 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/integer.hpp000644 000765 000024 00000026062 12233035540 020316 0ustar00honglistaff000000 000000 // boost integer.hpp header file -------------------------------------------// // Copyright Beman Dawes and Daryle Walker 1999. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/integer for documentation. // Revision History // 22 Sep 01 Added value-based integer templates. (Daryle Walker) // 01 Apr 01 Modified to use new header. (John Maddock) // 30 Jul 00 Add typename syntax fix (Jens Maurer) // 28 Aug 99 Initial version #ifndef BOOST_INTEGER_HPP #define BOOST_INTEGER_HPP #include // self include #include // for boost::::boost::integer_traits #include // for ::std::numeric_limits #include // for boost::int64_t and BOOST_NO_INTEGRAL_INT64_T #include // // We simply cannot include this header on gcc without getting copious warnings of the kind: // // boost/integer.hpp:77:30: warning: use of C99 long long integer constant // // And yet there is no other reasonable implementation, so we declare this a system header // to suppress these warnings. // #if defined(__GNUC__) && (__GNUC__ >= 4) #pragma GCC system_header #endif namespace boost { // Helper templates ------------------------------------------------------// // fast integers from least integers // int_fast_t<> works correctly for unsigned too, in spite of the name. template< typename LeastInt > struct int_fast_t { typedef LeastInt fast; typedef fast type; }; // imps may specialize namespace detail{ // convert category to type template< int Category > struct int_least_helper {}; // default is empty template< int Category > struct uint_least_helper {}; // default is empty // specializatons: 1=long, 2=int, 3=short, 4=signed char, // 6=unsigned long, 7=unsigned int, 8=unsigned short, 9=unsigned char // no specializations for 0 and 5: requests for a type > long are in error #ifdef BOOST_HAS_LONG_LONG template<> struct int_least_helper<1> { typedef boost::long_long_type least; }; #elif defined(BOOST_HAS_MS_INT64) template<> struct int_least_helper<1> { typedef __int64 least; }; #endif template<> struct int_least_helper<2> { typedef long least; }; template<> struct int_least_helper<3> { typedef int least; }; template<> struct int_least_helper<4> { typedef short least; }; template<> struct int_least_helper<5> { typedef signed char least; }; #ifdef BOOST_HAS_LONG_LONG template<> struct uint_least_helper<1> { typedef boost::ulong_long_type least; }; #elif defined(BOOST_HAS_MS_INT64) template<> struct uint_least_helper<1> { typedef unsigned __int64 least; }; #endif template<> struct uint_least_helper<2> { typedef unsigned long least; }; template<> struct uint_least_helper<3> { typedef unsigned int least; }; template<> struct uint_least_helper<4> { typedef unsigned short least; }; template<> struct uint_least_helper<5> { typedef unsigned char least; }; template struct exact_signed_base_helper{}; template struct exact_unsigned_base_helper{}; template <> struct exact_signed_base_helper { typedef signed char exact; }; template <> struct exact_unsigned_base_helper { typedef unsigned char exact; }; #if USHRT_MAX != UCHAR_MAX template <> struct exact_signed_base_helper { typedef short exact; }; template <> struct exact_unsigned_base_helper { typedef unsigned short exact; }; #endif #if UINT_MAX != USHRT_MAX template <> struct exact_signed_base_helper { typedef int exact; }; template <> struct exact_unsigned_base_helper { typedef unsigned int exact; }; #endif #if ULONG_MAX != UINT_MAX template <> struct exact_signed_base_helper { typedef long exact; }; template <> struct exact_unsigned_base_helper { typedef unsigned long exact; }; #endif #if defined(BOOST_HAS_LONG_LONG) &&\ ((defined(ULLONG_MAX) && (ULLONG_MAX != ULONG_MAX)) ||\ (defined(ULONG_LONG_MAX) && (ULONG_LONG_MAX != ULONG_MAX)) ||\ (defined(ULONGLONG_MAX) && (ULONGLONG_MAX != ULONG_MAX)) ||\ (defined(_ULLONG_MAX) && (_ULLONG_MAX != ULONG_MAX))) template <> struct exact_signed_base_helper { typedef boost::long_long_type exact; }; template <> struct exact_unsigned_base_helper { typedef boost::ulong_long_type exact; }; #endif } // namespace detail // integer templates specifying number of bits ---------------------------// // signed template< int Bits > // bits (including sign) required struct int_t : public detail::exact_signed_base_helper { BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::intmax_t) * CHAR_BIT), "No suitable signed integer type with the requested number of bits is available."); typedef typename detail::int_least_helper < #ifdef BOOST_HAS_LONG_LONG (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + #else 1 + #endif (Bits-1 <= ::std::numeric_limits::digits) + (Bits-1 <= ::std::numeric_limits::digits) + (Bits-1 <= ::std::numeric_limits::digits) + (Bits-1 <= ::std::numeric_limits::digits) >::least least; typedef typename int_fast_t::type fast; }; // unsigned template< int Bits > // bits required struct uint_t : public detail::exact_unsigned_base_helper { BOOST_STATIC_ASSERT_MSG(Bits <= (int)(sizeof(boost::uintmax_t) * CHAR_BIT), "No suitable unsigned integer type with the requested number of bits is available."); #if (defined(__BORLANDC__) || defined(__CODEGEAR__)) && defined(BOOST_NO_INTEGRAL_INT64_T) // It's really not clear why this workaround should be needed... shrug I guess! JM BOOST_STATIC_CONSTANT(int, s = 6 + (Bits <= ::std::numeric_limits::digits) + (Bits <= ::std::numeric_limits::digits) + (Bits <= ::std::numeric_limits::digits) + (Bits <= ::std::numeric_limits::digits)); typedef typename detail::int_least_helper< ::boost::uint_t::s>::least least; #else typedef typename detail::uint_least_helper < #ifdef BOOST_HAS_LONG_LONG (Bits <= (int)(sizeof(boost::long_long_type) * CHAR_BIT)) + #else 1 + #endif (Bits <= ::std::numeric_limits::digits) + (Bits <= ::std::numeric_limits::digits) + (Bits <= ::std::numeric_limits::digits) + (Bits <= ::std::numeric_limits::digits) >::least least; #endif typedef typename int_fast_t::type fast; // int_fast_t<> works correctly for unsigned too, in spite of the name. }; // integer templates specifying extreme value ----------------------------// // signed #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) template< boost::long_long_type MaxValue > // maximum value to require support #else template< long MaxValue > // maximum value to require support #endif struct int_max_value_t { typedef typename detail::int_least_helper < #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) (MaxValue <= ::boost::integer_traits::const_max) + #else 1 + #endif (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) >::least least; typedef typename int_fast_t::type fast; }; #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) template< boost::long_long_type MinValue > // minimum value to require support #else template< long MinValue > // minimum value to require support #endif struct int_min_value_t { typedef typename detail::int_least_helper < #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) (MinValue >= ::boost::integer_traits::const_min) + #else 1 + #endif (MinValue >= ::boost::integer_traits::const_min) + (MinValue >= ::boost::integer_traits::const_min) + (MinValue >= ::boost::integer_traits::const_min) + (MinValue >= ::boost::integer_traits::const_min) >::least least; typedef typename int_fast_t::type fast; }; // unsigned #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) template< boost::ulong_long_type MaxValue > // minimum value to require support #else template< unsigned long MaxValue > // minimum value to require support #endif struct uint_value_t { #if (defined(__BORLANDC__) || defined(__CODEGEAR__)) // It's really not clear why this workaround should be needed... shrug I guess! JM #if defined(BOOST_NO_INTEGRAL_INT64_T) BOOST_STATIC_CONSTANT(unsigned, which = 1 + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max)); typedef typename detail::int_least_helper< ::boost::uint_value_t::which>::least least; #else // BOOST_NO_INTEGRAL_INT64_T BOOST_STATIC_CONSTANT(unsigned, which = 1 + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max)); typedef typename detail::uint_least_helper< ::boost::uint_value_t::which>::least least; #endif // BOOST_NO_INTEGRAL_INT64_T #else typedef typename detail::uint_least_helper < #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) (MaxValue <= ::boost::integer_traits::const_max) + #else 1 + #endif (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) + (MaxValue <= ::boost::integer_traits::const_max) >::least least; #endif typedef typename int_fast_t::type fast; }; } // namespace boost #endif // BOOST_INTEGER_HPP passenger-4.0.37/ext/boost/integer_fwd.hpp000644 000765 000024 00000011011 12233035540 021142 0ustar00honglistaff000000 000000 // Boost integer_fwd.hpp header file ---------------------------------------// // (C) Copyright Dave Abrahams and Daryle Walker 2001. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/integer for documentation. #ifndef BOOST_INTEGER_FWD_HPP #define BOOST_INTEGER_FWD_HPP #include // for UCHAR_MAX, etc. #include // for std::size_t #include // for BOOST_NO_INTRINSIC_WCHAR_T #include // for std::numeric_limits #include // For intmax_t namespace boost { #ifdef BOOST_NO_INTEGRAL_INT64_T typedef unsigned long static_log2_argument_type; typedef int static_log2_result_type; typedef long static_min_max_signed_type; typedef unsigned long static_min_max_unsigned_type; #else typedef boost::uintmax_t static_min_max_unsigned_type; typedef boost::intmax_t static_min_max_signed_type; typedef boost::uintmax_t static_log2_argument_type; typedef int static_log2_result_type; #endif // From ------------------------------------------------// // Only has typedefs or using statements, with #conditionals // From -----------------------------------------// template < class T > class integer_traits; template < > class integer_traits< bool >; template < > class integer_traits< char >; template < > class integer_traits< signed char >; template < > class integer_traits< unsigned char >; #ifndef BOOST_NO_INTRINSIC_WCHAR_T template < > class integer_traits< wchar_t >; #endif template < > class integer_traits< short >; template < > class integer_traits< unsigned short >; template < > class integer_traits< int >; template < > class integer_traits< unsigned int >; template < > class integer_traits< long >; template < > class integer_traits< unsigned long >; #if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_LONG_LONG) template < > class integer_traits< ::boost::long_long_type>; template < > class integer_traits< ::boost::ulong_long_type >; #elif !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) && defined(BOOST_HAS_MS_INT64) template < > class integer_traits<__int64>; template < > class integer_traits; #endif // From ------------------------------------------------// template < typename LeastInt > struct int_fast_t; template< int Bits > struct int_t; template< int Bits > struct uint_t; #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) template< boost::long_long_type MaxValue > // maximum value to require support #else template< long MaxValue > // maximum value to require support #endif struct int_max_value_t; #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) template< boost::long_long_type MinValue > // minimum value to require support #else template< long MinValue > // minimum value to require support #endif struct int_min_value_t; #if !defined(BOOST_NO_INTEGRAL_INT64_T) && defined(BOOST_HAS_LONG_LONG) template< boost::ulong_long_type MaxValue > // maximum value to require support #else template< unsigned long MaxValue > // maximum value to require support #endif struct uint_value_t; // From -----------------------------------// template < std::size_t Bit > struct high_bit_mask_t; template < std::size_t Bits > struct low_bits_mask_t; template < > struct low_bits_mask_t< ::std::numeric_limits::digits >; // From ------------------------------------// template struct static_log2; template <> struct static_log2<0u>; // From ---------------------------------// template struct static_signed_min; template struct static_signed_max; template struct static_unsigned_min; template struct static_unsigned_max; } // namespace boost #endif // BOOST_INTEGER_FWD_HPP passenger-4.0.37/ext/boost/integer_traits.hpp000644 000765 000024 00000021016 12233035540 021676 0ustar00honglistaff000000 000000 /* boost integer_traits.hpp header file * * Copyright Jens Maurer 2000 * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * $Id: integer_traits.hpp 83381 2013-03-09 22:55:05Z eric_niebler $ * * Idea by Beman Dawes, Ed Brey, Steve Cleary, and Nathan Myers */ // See http://www.boost.org/libs/integer for documentation. #ifndef BOOST_INTEGER_TRAITS_HPP #define BOOST_INTEGER_TRAITS_HPP #include #include // These are an implementation detail and not part of the interface #include // we need wchar.h for WCHAR_MAX/MIN but not all platforms provide it, // and some may have but not ... #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && (!defined(BOOST_NO_CWCHAR) || defined(sun) || defined(__sun) || defined(__QNX__)) #include #endif // // We simply cannot include this header on gcc without getting copious warnings of the kind: // // ../../../boost/integer_traits.hpp:164:66: warning: use of C99 long long integer constant // // And yet there is no other reasonable implementation, so we declare this a system header // to suppress these warnings. // #if defined(__GNUC__) && (__GNUC__ >= 4) #pragma GCC system_header #endif namespace boost { template class integer_traits : public std::numeric_limits { public: BOOST_STATIC_CONSTANT(bool, is_integral = false); }; namespace detail { template class integer_traits_base { public: BOOST_STATIC_CONSTANT(bool, is_integral = true); BOOST_STATIC_CONSTANT(T, const_min = min_val); BOOST_STATIC_CONSTANT(T, const_max = max_val); }; #ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION // A definition is required even for integral static constants template const bool integer_traits_base::is_integral; template const T integer_traits_base::const_min; template const T integer_traits_base::const_max; #endif } // namespace detail template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; #ifndef BOOST_NO_INTRINSIC_WCHAR_T template<> class integer_traits : public std::numeric_limits, // Don't trust WCHAR_MIN and WCHAR_MAX with Mac OS X's native // library: they are wrong! #if defined(WCHAR_MIN) && defined(WCHAR_MAX) && !defined(__APPLE__) public detail::integer_traits_base #elif defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__)) // No WCHAR_MIN and WCHAR_MAX, whar_t is short and unsigned: public detail::integer_traits_base #elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400))\ || (defined __APPLE__)\ || (defined(__OpenBSD__) && defined(__GNUC__))\ || (defined(__NetBSD__) && defined(__GNUC__))\ || (defined(__FreeBSD__) && defined(__GNUC__))\ || (defined(__DragonFly__) && defined(__GNUC__))\ || (defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 3) && !defined(__SGI_STL_PORT)) // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as int. // - SGI MIPSpro with native library // - gcc 3.x on HP-UX // - Mac OS X with native library // - gcc on FreeBSD, OpenBSD and NetBSD public detail::integer_traits_base #elif defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 2) && !defined(__SGI_STL_PORT) // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as unsigned int. // - gcc 2.95.x on HP-UX // (also, std::numeric_limits appears to return the wrong values). public detail::integer_traits_base #else #error No WCHAR_MIN and WCHAR_MAX present, please adjust integer_traits<> for your compiler. #endif { }; #endif // BOOST_NO_INTRINSIC_WCHAR_T template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; template<> class integer_traits : public std::numeric_limits, public detail::integer_traits_base { }; #if !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(BOOST_NO_INT64_T) #if defined(ULLONG_MAX) && defined(BOOST_HAS_LONG_LONG) template<> class integer_traits< ::boost::long_long_type> : public std::numeric_limits< ::boost::long_long_type>, public detail::integer_traits_base< ::boost::long_long_type, LLONG_MIN, LLONG_MAX> { }; template<> class integer_traits< ::boost::ulong_long_type> : public std::numeric_limits< ::boost::ulong_long_type>, public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULLONG_MAX> { }; #elif defined(ULONG_LONG_MAX) && defined(BOOST_HAS_LONG_LONG) template<> class integer_traits< ::boost::long_long_type> : public std::numeric_limits< ::boost::long_long_type>, public detail::integer_traits_base< ::boost::long_long_type, LONG_LONG_MIN, LONG_LONG_MAX>{ }; template<> class integer_traits< ::boost::ulong_long_type> : public std::numeric_limits< ::boost::ulong_long_type>, public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULONG_LONG_MAX> { }; #elif defined(ULONGLONG_MAX) && defined(BOOST_HAS_LONG_LONG) template<> class integer_traits< ::boost::long_long_type> : public std::numeric_limits< ::boost::long_long_type>, public detail::integer_traits_base< ::boost::long_long_type, LONGLONG_MIN, LONGLONG_MAX> { }; template<> class integer_traits< ::boost::ulong_long_type> : public std::numeric_limits< ::boost::ulong_long_type>, public detail::integer_traits_base< ::boost::ulong_long_type, 0, ULONGLONG_MAX> { }; #elif defined(_LLONG_MAX) && defined(_C2) && defined(BOOST_HAS_LONG_LONG) template<> class integer_traits< ::boost::long_long_type> : public std::numeric_limits< ::boost::long_long_type>, public detail::integer_traits_base< ::boost::long_long_type, -_LLONG_MAX - _C2, _LLONG_MAX> { }; template<> class integer_traits< ::boost::ulong_long_type> : public std::numeric_limits< ::boost::ulong_long_type>, public detail::integer_traits_base< ::boost::ulong_long_type, 0, _ULLONG_MAX> { }; #elif defined(BOOST_HAS_LONG_LONG) // // we have long long but no constants, this happens for example with gcc in -ansi mode, // we'll just have to work out the values for ourselves (assumes 2's compliment representation): // template<> class integer_traits< ::boost::long_long_type> : public std::numeric_limits< ::boost::long_long_type>, public detail::integer_traits_base< ::boost::long_long_type, (1LL << (sizeof(::boost::long_long_type) * CHAR_BIT - 1)), ~(1LL << (sizeof(::boost::long_long_type) * CHAR_BIT - 1))> { }; template<> class integer_traits< ::boost::ulong_long_type> : public std::numeric_limits< ::boost::ulong_long_type>, public detail::integer_traits_base< ::boost::ulong_long_type, 0, ~0uLL> { }; #elif defined(BOOST_HAS_MS_INT64) template<> class integer_traits< __int64> : public std::numeric_limits< __int64>, public detail::integer_traits_base< __int64, _I64_MIN, _I64_MAX> { }; template<> class integer_traits< unsigned __int64> : public std::numeric_limits< unsigned __int64>, public detail::integer_traits_base< unsigned __int64, 0, _UI64_MAX> { }; #endif #endif } // namespace boost #endif /* BOOST_INTEGER_TRAITS_HPP */ passenger-4.0.37/ext/boost/io/000755 000765 000024 00000000000 12233035540 016551 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/io_fwd.hpp000644 000765 000024 00000004515 12233035540 020127 0ustar00honglistaff000000 000000 // Boost io_fwd.hpp header file --------------------------------------------// // Copyright 2002 Daryle Walker. Use, modification, and distribution are subject // to the Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or a copy at .) // See for the library's home page. #ifndef BOOST_IO_FWD_HPP #define BOOST_IO_FWD_HPP #include // for std::char_traits (declaration) namespace boost { namespace io { // From -------------------------------------------// class ios_flags_saver; class ios_precision_saver; class ios_width_saver; class ios_base_all_saver; template < typename Ch, class Tr = ::std::char_traits > class basic_ios_iostate_saver; template < typename Ch, class Tr = ::std::char_traits > class basic_ios_exception_saver; template < typename Ch, class Tr = ::std::char_traits > class basic_ios_tie_saver; template < typename Ch, class Tr = ::std::char_traits > class basic_ios_rdbuf_saver; template < typename Ch, class Tr = ::std::char_traits > class basic_ios_fill_saver; template < typename Ch, class Tr = ::std::char_traits > class basic_ios_locale_saver; template < typename Ch, class Tr = ::std::char_traits > class basic_ios_all_saver; typedef basic_ios_iostate_saver ios_iostate_saver; typedef basic_ios_iostate_saver wios_iostate_saver; typedef basic_ios_exception_saver ios_exception_saver; typedef basic_ios_exception_saver wios_exception_saver; typedef basic_ios_tie_saver ios_tie_saver; typedef basic_ios_tie_saver wios_tie_saver; typedef basic_ios_rdbuf_saver ios_rdbuf_saver; typedef basic_ios_rdbuf_saver wios_rdbuf_saver; typedef basic_ios_fill_saver ios_fill_saver; typedef basic_ios_fill_saver wios_fill_saver; typedef basic_ios_locale_saver ios_locale_saver; typedef basic_ios_locale_saver wios_locale_saver; typedef basic_ios_all_saver ios_all_saver; typedef basic_ios_all_saver wios_all_saver; class ios_iword_saver; class ios_pword_saver; class ios_all_word_saver; } // namespace io } // namespace boost #endif // BOOST_IO_FWD_HPP passenger-4.0.37/ext/boost/is_placeholder.hpp000644 000765 000024 00000001172 12233035540 021631 0ustar00honglistaff000000 000000 #ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED #define BOOST_IS_PLACEHOLDER_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined( _MSC_VER ) && ( _MSC_VER >= 1020 ) # pragma once #endif // is_placeholder.hpp - TR1 is_placeholder metafunction // // Copyright (c) 2006 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt namespace boost { template< class T > struct is_placeholder { enum _vt { value = 0 }; }; } // namespace boost #endif // #ifndef BOOST_IS_PLACEHOLDER_HPP_INCLUDED passenger-4.0.37/ext/boost/iterator/000755 000765 000024 00000000000 12233035540 017773 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/iterator.hpp000644 000765 000024 00000003677 12233035540 020521 0ustar00honglistaff000000 000000 // iterator.hpp workarounds for non-conforming standard libraries ---------// // (C) Copyright Beman Dawes 2000. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/utility for documentation. // Revision History // 12 Jan 01 added for std::ptrdiff_t (Jens Maurer) // 28 Jun 00 Workarounds to deal with known MSVC bugs (David Abrahams) // 26 Jun 00 Initial version (Jeremy Siek) #ifndef BOOST_ITERATOR_HPP #define BOOST_ITERATOR_HPP #include #include // std::ptrdiff_t #include namespace boost { # if defined(BOOST_NO_STD_ITERATOR) && !defined(BOOST_MSVC_STD_ITERATOR) template struct iterator { typedef T value_type; typedef Distance difference_type; typedef Pointer pointer; typedef Reference reference; typedef Category iterator_category; }; # else // declare iterator_base in namespace detail to work around MSVC bugs which // prevent derivation from an identically-named class in a different namespace. namespace detail { template # if !defined(BOOST_MSVC_STD_ITERATOR) struct iterator_base : std::iterator {}; # else struct iterator_base : std::iterator { typedef Reference reference; typedef Pointer pointer; typedef Distance difference_type; }; # endif } template struct iterator : boost::detail::iterator_base {}; # endif } // namespace boost #endif // BOOST_ITERATOR_HPP passenger-4.0.37/ext/boost/lexical_cast.hpp000644 000765 000024 00000321754 12233035540 021322 0ustar00honglistaff000000 000000 #ifndef BOOST_LEXICAL_CAST_INCLUDED #define BOOST_LEXICAL_CAST_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // Boost lexical_cast.hpp header -------------------------------------------// // // See http://www.boost.org/libs/conversion for documentation. // See end of this header for rights and permissions. // // what: lexical_cast custom keyword cast // who: contributed by Kevlin Henney, // enhanced with contributions from Terje Slettebo, // with additional fixes and suggestions from Gennaro Prota, // Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov, // Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann, // Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters // when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2013 #include #if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING) #define BOOST_LCAST_NO_WCHAR_T #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef BOOST_NO_STD_LOCALE # include #else # ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE // Getting error at this point means, that your STL library is old/lame/misconfigured. // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE, // but beware: lexical_cast will understand only 'C' locale delimeters and thousands // separators. # error "Unable to use header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force " # error "boost::lexical_cast to use only 'C' locale during conversions." # endif #endif #ifdef BOOST_NO_STRINGSTREAM #include #else #include #endif #ifdef BOOST_NO_TYPEID #define BOOST_LCAST_THROW_BAD_CAST(S, T) throw_exception(bad_lexical_cast()) #else #define BOOST_LCAST_THROW_BAD_CAST(Source, Target) \ throw_exception(bad_lexical_cast(typeid(Source), typeid(Target))) #endif #if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700 #define BOOST_LCAST_HAS_INT128 #endif namespace boost { // exception used to indicate runtime lexical_cast failure class BOOST_SYMBOL_VISIBLE bad_lexical_cast : // workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0 #if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS public std::exception #else public std::bad_cast #endif #if defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, < 0x560 ) // under bcc32 5.5.1 bad_cast doesn't derive from exception , public std::exception #endif { public: bad_lexical_cast() BOOST_NOEXCEPT : #ifndef BOOST_NO_TYPEID source(&typeid(void)), target(&typeid(void)) #else source(0), target(0) // this breaks getters #endif { } bad_lexical_cast( const std::type_info &source_type_arg, const std::type_info &target_type_arg) BOOST_NOEXCEPT : source(&source_type_arg), target(&target_type_arg) { } const std::type_info &source_type() const { return *source; } const std::type_info &target_type() const { return *target; } #ifndef BOOST_NO_CXX11_NOEXCEPT virtual const char *what() const noexcept #else virtual const char *what() const throw() #endif { return "bad lexical cast: " "source type value could not be interpreted as target"; } #ifndef BOOST_NO_CXX11_NOEXCEPT virtual ~bad_lexical_cast() BOOST_NOEXCEPT #else virtual ~bad_lexical_cast() throw() #endif {} private: const std::type_info *source; const std::type_info *target; }; namespace detail // widest_char { template struct widest_char { typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< (sizeof(TargetChar) > sizeof(SourceChar)) , TargetChar , SourceChar >::type type; }; } } // namespace boost #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(__SUNPRO_CC) && !defined(__PGIC__) #include #include #ifndef BOOST_NO_CXX11_HDR_ARRAY #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef BOOST_NO_CWCHAR # include #endif namespace boost { namespace detail // is_char_or_wchar<...> { // returns true, if T is one of the character types template < typename T > struct is_char_or_wchar { typedef boost::type_traits::ice_or< boost::is_same< T, char >::value, #ifndef BOOST_LCAST_NO_WCHAR_T boost::is_same< T, wchar_t >::value, #endif #ifndef BOOST_NO_CXX11_CHAR16_T boost::is_same< T, char16_t >::value, #endif #ifndef BOOST_NO_CXX11_CHAR32_T boost::is_same< T, char32_t >::value, #endif boost::is_same< T, unsigned char >::value, boost::is_same< T, signed char >::value > result_type; BOOST_STATIC_CONSTANT(bool, value = (result_type::value) ); }; } namespace detail // normalize_single_byte_char { // Converts signed/unsigned char to char template < class Char > struct normalize_single_byte_char { typedef Char type; }; template <> struct normalize_single_byte_char< signed char > { typedef char type; }; template <> struct normalize_single_byte_char< unsigned char > { typedef char type; }; } namespace detail // deduce_character_type_later { // Helper type, meaning that stram character for T must be deduced // at Stage 2 (See deduce_source_char and deduce_target_char) template < class T > struct deduce_character_type_later {}; } namespace detail // stream_char_common { // Selectors to choose stream character type (common for Source and Target) // Returns one of char, wchar_t, char16_t, char32_t or deduce_character_type_later types // Executed on Stage 1 (See deduce_source_char and deduce_target_char) template < typename Type > struct stream_char_common: public boost::mpl::if_c< boost::detail::is_char_or_wchar< Type >::value, Type, boost::detail::deduce_character_type_later< Type > > {}; template < typename Char > struct stream_char_common< Char* >: public boost::mpl::if_c< boost::detail::is_char_or_wchar< Char >::value, Char, boost::detail::deduce_character_type_later< Char* > > {}; template < typename Char > struct stream_char_common< const Char* >: public boost::mpl::if_c< boost::detail::is_char_or_wchar< Char >::value, Char, boost::detail::deduce_character_type_later< const Char* > > {}; template < typename Char > struct stream_char_common< boost::iterator_range< Char* > >: public boost::mpl::if_c< boost::detail::is_char_or_wchar< Char >::value, Char, boost::detail::deduce_character_type_later< boost::iterator_range< Char* > > > {}; template < typename Char > struct stream_char_common< boost::iterator_range< const Char* > >: public boost::mpl::if_c< boost::detail::is_char_or_wchar< Char >::value, Char, boost::detail::deduce_character_type_later< boost::iterator_range< const Char* > > > {}; template < class Char, class Traits, class Alloc > struct stream_char_common< std::basic_string< Char, Traits, Alloc > > { typedef Char type; }; template < class Char, class Traits, class Alloc > struct stream_char_common< boost::container::basic_string< Char, Traits, Alloc > > { typedef Char type; }; template < typename Char, std::size_t N > struct stream_char_common< boost::array< Char, N > >: public boost::mpl::if_c< boost::detail::is_char_or_wchar< Char >::value, Char, boost::detail::deduce_character_type_later< boost::array< Char, N > > > {}; template < typename Char, std::size_t N > struct stream_char_common< boost::array< const Char, N > >: public boost::mpl::if_c< boost::detail::is_char_or_wchar< Char >::value, Char, boost::detail::deduce_character_type_later< boost::array< const Char, N > > > {}; #ifndef BOOST_NO_CXX11_HDR_ARRAY template < typename Char, std::size_t N > struct stream_char_common< std::array >: public boost::mpl::if_c< boost::detail::is_char_or_wchar< Char >::value, Char, boost::detail::deduce_character_type_later< std::array< Char, N > > > {}; template < typename Char, std::size_t N > struct stream_char_common< std::array< const Char, N > >: public boost::mpl::if_c< boost::detail::is_char_or_wchar< Char >::value, Char, boost::detail::deduce_character_type_later< std::array< const Char, N > > > {}; #endif #ifdef BOOST_LCAST_HAS_INT128 template <> struct stream_char_common< boost::int128_type >: public boost::mpl::identity< char > {}; template <> struct stream_char_common< boost::uint128_type >: public boost::mpl::identity< char > {}; #endif #if !defined(BOOST_LCAST_NO_WCHAR_T) && defined(BOOST_NO_INTRINSIC_WCHAR_T) template <> struct stream_char_common< wchar_t > { typedef char type; }; #endif } namespace detail // deduce_source_char_impl { // If type T is `deduce_character_type_later` type, then tries to deduce // character type using boost::has_left_shift metafunction. // Otherwise supplied type T is a character type, that must be normalized // using normalize_single_byte_char. // Executed at Stage 2 (See deduce_source_char and deduce_target_char) template < class Char > struct deduce_source_char_impl { typedef BOOST_DEDUCED_TYPENAME boost::detail::normalize_single_byte_char< Char >::type type; }; template < class T > struct deduce_source_char_impl< deduce_character_type_later< T > > { typedef boost::has_left_shift< std::basic_ostream< char >, T > result_t; #if defined(BOOST_LCAST_NO_WCHAR_T) BOOST_STATIC_ASSERT_MSG((result_t::value), "Source type is not std::ostream`able and std::wostream`s are not supported by your STL implementation"); typedef char type; #else typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< result_t::value, char, wchar_t >::type type; BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_left_shift< std::basic_ostream< type >, T >::value), "Source type is neither std::ostream`able nor std::wostream`able"); #endif }; } namespace detail // deduce_target_char_impl { // If type T is `deduce_character_type_later` type, then tries to deduce // character type using boost::has_right_shift metafunction. // Otherwise supplied type T is a character type, that must be normalized // using normalize_single_byte_char. // Executed at Stage 2 (See deduce_source_char and deduce_target_char) template < class Char > struct deduce_target_char_impl { typedef BOOST_DEDUCED_TYPENAME normalize_single_byte_char< Char >::type type; }; template < class T > struct deduce_target_char_impl< deduce_character_type_later > { typedef boost::has_right_shift, T > result_t; #if defined(BOOST_LCAST_NO_WCHAR_T) BOOST_STATIC_ASSERT_MSG((result_t::value), "Target type is not std::istream`able and std::wistream`s are not supported by your STL implementation"); typedef char type; #else typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< result_t::value, char, wchar_t >::type type; BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_right_shift, T >::value), "Target type is neither std::istream`able nor std::wistream`able"); #endif }; } namespace detail // deduce_target_char and deduce_source_char { // We deduce stream character types in two stages. // // Stage 1 is common for Target and Source. At Stage 1 we get // non normalized character type (may contain unsigned/signed char) // or deduce_character_type_later where T is the original type. // Stage 1 is executed by stream_char_common // // At Stage 2 we normalize character types or try to deduce character // type using metafunctions. // Stage 2 is executed by deduce_target_char_impl and // deduce_source_char_impl // // deduce_target_char and deduce_source_char functions combine // both stages template < class T > struct deduce_target_char { typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type; typedef BOOST_DEDUCED_TYPENAME deduce_target_char_impl< stage1_type >::type stage2_type; typedef stage2_type type; }; template < class T > struct deduce_source_char { typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type; typedef BOOST_DEDUCED_TYPENAME deduce_source_char_impl< stage1_type >::type stage2_type; typedef stage2_type type; }; } namespace detail // deduce_char_traits template { // We are attempting to get char_traits<> from Source or Tagret // template parameter. Otherwise we'll be using std::char_traits template < class Char, class Target, class Source > struct deduce_char_traits { typedef std::char_traits< Char > type; }; template < class Char, class Traits, class Alloc, class Source > struct deduce_char_traits< Char , std::basic_string< Char, Traits, Alloc > , Source > { typedef Traits type; }; template < class Char, class Target, class Traits, class Alloc > struct deduce_char_traits< Char , Target , std::basic_string< Char, Traits, Alloc > > { typedef Traits type; }; template < class Char, class Traits, class Alloc, class Source > struct deduce_char_traits< Char , boost::container::basic_string< Char, Traits, Alloc > , Source > { typedef Traits type; }; template < class Char, class Target, class Traits, class Alloc > struct deduce_char_traits< Char , Target , boost::container::basic_string< Char, Traits, Alloc > > { typedef Traits type; }; template < class Char, class Traits, class Alloc1, class Alloc2 > struct deduce_char_traits< Char , std::basic_string< Char, Traits, Alloc1 > , std::basic_string< Char, Traits, Alloc2 > > { typedef Traits type; }; template struct deduce_char_traits< Char , boost::container::basic_string< Char, Traits, Alloc1 > , boost::container::basic_string< Char, Traits, Alloc2 > > { typedef Traits type; }; template < class Char, class Traits, class Alloc1, class Alloc2 > struct deduce_char_traits< Char , boost::container::basic_string< Char, Traits, Alloc1 > , std::basic_string< Char, Traits, Alloc2 > > { typedef Traits type; }; template < class Char, class Traits, class Alloc1, class Alloc2 > struct deduce_char_traits< Char , std::basic_string< Char, Traits, Alloc1 > , boost::container::basic_string< Char, Traits, Alloc2 > > { typedef Traits type; }; } namespace detail // array_to_pointer_decay { template struct array_to_pointer_decay { typedef T type; }; template struct array_to_pointer_decay { typedef const T * type; }; } namespace detail // is_this_float_conversion_optimized { // this metafunction evaluates to true, if we have optimized comnversion // from Float type to Char array. // Must be in sync with lexical_stream_limited_src::shl_real_type(...) template struct is_this_float_conversion_optimized { typedef boost::type_traits::ice_and< boost::is_float::value, #if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__) boost::type_traits::ice_or< boost::type_traits::ice_eq::value, boost::is_same::value >::value #else boost::type_traits::ice_eq::value #endif > result_type; BOOST_STATIC_CONSTANT(bool, value = (result_type::value) ); }; } namespace detail // lcast_src_length { // Return max. length of string representation of Source; template< class Source // Source type of lexical_cast. > struct lcast_src_length { BOOST_STATIC_CONSTANT(std::size_t, value = 1); // To check coverage, build the test with // bjam --v2 profile optimization=off static void check_coverage() {} }; // Helper for integral types. // Notes on length calculation: // Max length for 32bit int with grouping "\1" and thousands_sep ',': // "-2,1,4,7,4,8,3,6,4,7" // ^ - is_signed // ^ - 1 digit not counted by digits10 // ^^^^^^^^^^^^^^^^^^ - digits10 * 2 // // Constant is_specialized is used instead of constant 1 // to prevent buffer overflow in a rare case when // doesn't add missing specialization for // numeric_limits for some integral type T. // When is_specialized is false, the whole expression is 0. template struct lcast_src_length_integral { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS BOOST_STATIC_CONSTANT(std::size_t, value = std::numeric_limits::is_signed + std::numeric_limits::is_specialized + /* == 1 */ std::numeric_limits::digits10 * 2 ); #else BOOST_STATIC_CONSTANT(std::size_t, value = 156); BOOST_STATIC_ASSERT(sizeof(Source) * CHAR_BIT <= 256); #endif }; #define BOOST_LCAST_DEF(T) \ template<> struct lcast_src_length \ : lcast_src_length_integral \ { static void check_coverage() {} }; BOOST_LCAST_DEF(short) BOOST_LCAST_DEF(unsigned short) BOOST_LCAST_DEF(int) BOOST_LCAST_DEF(unsigned int) BOOST_LCAST_DEF(long) BOOST_LCAST_DEF(unsigned long) #if defined(BOOST_HAS_LONG_LONG) BOOST_LCAST_DEF(boost::ulong_long_type) BOOST_LCAST_DEF(boost::long_long_type ) #elif defined(BOOST_HAS_MS_INT64) BOOST_LCAST_DEF(unsigned __int64) BOOST_LCAST_DEF( __int64) #endif #ifdef BOOST_LCAST_HAS_INT128 BOOST_LCAST_DEF(boost::int128_type) BOOST_LCAST_DEF(boost::uint128_type) #endif #undef BOOST_LCAST_DEF #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION // Helper for floating point types. // -1.23456789e-123456 // ^ sign // ^ leading digit // ^ decimal point // ^^^^^^^^ lcast_precision::value // ^ "e" // ^ exponent sign // ^^^^^^ exponent (assumed 6 or less digits) // sign + leading digit + decimal point + "e" + exponent sign == 5 template struct lcast_src_length_floating { BOOST_STATIC_ASSERT( std::numeric_limits::max_exponent10 <= 999999L && std::numeric_limits::min_exponent10 >= -999999L ); BOOST_STATIC_CONSTANT(std::size_t, value = 5 + lcast_precision::value + 6 ); }; template<> struct lcast_src_length : lcast_src_length_floating { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_floating { static void check_coverage() {} }; template<> struct lcast_src_length : lcast_src_length_floating { static void check_coverage() {} }; #endif // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION } namespace detail // lexical_cast_stream_traits { template struct lexical_cast_stream_traits { typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay::type src; typedef BOOST_DEDUCED_TYPENAME boost::remove_cv::type no_cv_src; typedef boost::detail::deduce_source_char deduce_src_char_metafunc; typedef BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::type src_char_t; typedef BOOST_DEDUCED_TYPENAME boost::detail::deduce_target_char::type target_char_t; typedef BOOST_DEDUCED_TYPENAME boost::detail::widest_char< target_char_t, src_char_t >::type char_type; #if !defined(BOOST_NO_CXX11_CHAR16_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS) BOOST_STATIC_ASSERT_MSG(( !boost::is_same::value && !boost::is_same::value), "Your compiler does not have full support for char16_t" ); #endif #if !defined(BOOST_NO_CXX11_CHAR32_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS) BOOST_STATIC_ASSERT_MSG(( !boost::is_same::value && !boost::is_same::value), "Your compiler does not have full support for char32_t" ); #endif typedef BOOST_DEDUCED_TYPENAME boost::detail::deduce_char_traits< char_type, Target, no_cv_src >::type traits; typedef boost::type_traits::ice_and< boost::is_same::value, // source is not a wide character based type boost::type_traits::ice_ne::value, // target type is based on wide character boost::type_traits::ice_not< boost::detail::is_char_or_wchar::value // single character widening is optimized >::value // and does not requires stringbuffer > is_string_widening_required_t; typedef boost::type_traits::ice_not< boost::type_traits::ice_or< boost::is_integral::value, boost::detail::is_this_float_conversion_optimized::value, boost::detail::is_char_or_wchar< BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::stage1_type // if we did not get character type at stage1 >::value // then we have no optimization for that type >::value > is_source_input_not_optimized_t; // If we have an optimized conversion for // Source, we do not need to construct stringbuf. BOOST_STATIC_CONSTANT(bool, requires_stringbuf = (boost::type_traits::ice_or< is_string_widening_required_t::value, is_source_input_not_optimized_t::value >::value) ); typedef boost::detail::lcast_src_length len_t; }; } namespace detail // '0', '+' and '-' constants { template < typename Char > struct lcast_char_constants; template<> struct lcast_char_constants { BOOST_STATIC_CONSTANT(char, zero = '0'); BOOST_STATIC_CONSTANT(char, minus = '-'); BOOST_STATIC_CONSTANT(char, plus = '+'); BOOST_STATIC_CONSTANT(char, lowercase_e = 'e'); BOOST_STATIC_CONSTANT(char, capital_e = 'E'); BOOST_STATIC_CONSTANT(char, c_decimal_separator = '.'); }; #ifndef BOOST_LCAST_NO_WCHAR_T template<> struct lcast_char_constants { BOOST_STATIC_CONSTANT(wchar_t, zero = L'0'); BOOST_STATIC_CONSTANT(wchar_t, minus = L'-'); BOOST_STATIC_CONSTANT(wchar_t, plus = L'+'); BOOST_STATIC_CONSTANT(wchar_t, lowercase_e = L'e'); BOOST_STATIC_CONSTANT(wchar_t, capital_e = L'E'); BOOST_STATIC_CONSTANT(wchar_t, c_decimal_separator = L'.'); }; #endif #if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) template<> struct lcast_char_constants { BOOST_STATIC_CONSTANT(char16_t, zero = u'0'); BOOST_STATIC_CONSTANT(char16_t, minus = u'-'); BOOST_STATIC_CONSTANT(char16_t, plus = u'+'); BOOST_STATIC_CONSTANT(char16_t, lowercase_e = u'e'); BOOST_STATIC_CONSTANT(char16_t, capital_e = u'E'); BOOST_STATIC_CONSTANT(char16_t, c_decimal_separator = u'.'); }; #endif #if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) template<> struct lcast_char_constants { BOOST_STATIC_CONSTANT(char32_t, zero = U'0'); BOOST_STATIC_CONSTANT(char32_t, minus = U'-'); BOOST_STATIC_CONSTANT(char32_t, plus = U'+'); BOOST_STATIC_CONSTANT(char32_t, lowercase_e = U'e'); BOOST_STATIC_CONSTANT(char32_t, capital_e = U'E'); BOOST_STATIC_CONSTANT(char32_t, c_decimal_separator = U'.'); }; #endif } namespace detail // lcast_to_unsigned { template inline BOOST_DEDUCED_TYPENAME make_unsigned::type lcast_to_unsigned(T value) BOOST_NOEXCEPT { typedef BOOST_DEDUCED_TYPENAME boost::make_unsigned::type result_type; return static_cast( value < 0 ? 0u - static_cast(value) : value ); } } namespace detail // lcast_put_unsigned { template CharT* lcast_put_unsigned(const T n_param, CharT* finish) { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS BOOST_STATIC_ASSERT(!std::numeric_limits::is_signed); #endif typedef typename Traits::int_type int_type; CharT const czero = lcast_char_constants::zero; int_type const zero = Traits::to_int_type(czero); BOOST_DEDUCED_TYPENAME boost::mpl::if_c< (sizeof(int_type) > sizeof(T)) , int_type , T >::type n = n_param; #ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE std::locale loc; if (loc != std::locale::classic()) { typedef std::numpunct numpunct; numpunct const& np = BOOST_USE_FACET(numpunct, loc); std::string const grouping = np.grouping(); std::string::size_type const grouping_size = grouping.size(); if ( grouping_size && grouping[0] > 0 ) { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS // Check that ulimited group is unreachable: BOOST_STATIC_ASSERT(std::numeric_limits::digits10 < CHAR_MAX); #endif CharT thousands_sep = np.thousands_sep(); std::string::size_type group = 0; // current group number char last_grp_size = grouping[0]; char left = last_grp_size; do { if(left == 0) { ++group; if(group < grouping_size) { char const grp_size = grouping[group]; last_grp_size = grp_size <= 0 ? static_cast(CHAR_MAX) : grp_size; } left = last_grp_size; --finish; Traits::assign(*finish, thousands_sep); } --left; --finish; int_type const digit = static_cast(n % 10U); Traits::assign(*finish, Traits::to_char_type(zero + digit)); n /= 10; } while(n); return finish; } } #endif { do { --finish; int_type const digit = static_cast(n % 10U); Traits::assign(*finish, Traits::to_char_type(zero + digit)); n /= 10; } while(n); } return finish; } } namespace detail // lcast_ret_unsigned { template inline bool lcast_ret_unsigned(T& value, const CharT* const begin, const CharT* end) { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS BOOST_STATIC_ASSERT(!std::numeric_limits::is_signed); #endif CharT const czero = lcast_char_constants::zero; --end; value = 0; if (begin > end || *end < czero || *end >= czero + 10) return false; value = static_cast(*end - czero); --end; T multiplier = 1; bool multiplier_overflowed = false; #ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE std::locale loc; if (loc != std::locale::classic()) { typedef std::numpunct numpunct; numpunct const& np = BOOST_USE_FACET(numpunct, loc); std::string const& grouping = np.grouping(); std::string::size_type const grouping_size = grouping.size(); /* According to Programming languages - C++ * we MUST check for correct grouping */ if (grouping_size && grouping[0] > 0) { unsigned char current_grouping = 0; CharT const thousands_sep = np.thousands_sep(); char remained = static_cast(grouping[current_grouping] - 1); bool shall_we_return = true; for(;end>=begin; --end) { if (remained) { T const multiplier_10 = static_cast(multiplier * 10); if (multiplier_10 / 10 != multiplier) multiplier_overflowed = true; T const dig_value = static_cast(*end - czero); T const new_sub_value = static_cast(multiplier_10 * dig_value); if (*end < czero || *end >= czero + 10 /* detecting overflow */ || (dig_value && new_sub_value / dig_value != multiplier_10) || static_cast((std::numeric_limits::max)()-new_sub_value) < value || (multiplier_overflowed && dig_value) ) return false; value = static_cast(value + new_sub_value); multiplier = static_cast(multiplier * 10); --remained; } else { if ( !Traits::eq(*end, thousands_sep) ) //|| begin == end ) return false; { /* * According to Programming languages - C++ * Digit grouping is checked. That is, the positions of discarded * separators is examined for consistency with * use_facet >(loc ).grouping() * * BUT what if there is no separators at all and grouping() * is not empty? Well, we have no extraced separators, so we * won`t check them for consistency. This will allow us to * work with "C" locale from other locales */ shall_we_return = false; break; } else { if ( begin == end ) return false; if (current_grouping < grouping_size-1 ) ++current_grouping; remained = grouping[current_grouping]; } } } if (shall_we_return) return true; } } #endif { while ( begin <= end ) { T const multiplier_10 = static_cast(multiplier * 10); if (multiplier_10 / 10 != multiplier) multiplier_overflowed = true; T const dig_value = static_cast(*end - czero); T const new_sub_value = static_cast(multiplier_10 * dig_value); if (*end < czero || *end >= czero + 10 /* detecting overflow */ || (dig_value && new_sub_value / dig_value != multiplier_10) || static_cast((std::numeric_limits::max)()-new_sub_value) < value || (multiplier_overflowed && dig_value) ) return false; value = static_cast(value + new_sub_value); multiplier = static_cast(multiplier * 10); --end; } } return true; } } namespace detail { template bool lc_iequal(const CharT* val, const CharT* lcase, const CharT* ucase, unsigned int len) BOOST_NOEXCEPT { for( unsigned int i=0; i < len; ++i ) { if ( val[i] != lcase[i] && val[i] != ucase[i] ) return false; } return true; } /* Returns true and sets the correct value if found NaN or Inf. */ template inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value , const CharT* lc_NAN, const CharT* lc_nan , const CharT* lc_INFINITY, const CharT* lc_infinity , const CharT opening_brace, const CharT closing_brace) BOOST_NOEXCEPT { using namespace std; if (begin == end) return false; const CharT minus = lcast_char_constants::minus; const CharT plus = lcast_char_constants::plus; const int inifinity_size = 8; bool has_minus = false; /* Parsing +/- */ if( *begin == minus) { ++ begin; has_minus = true; } else if( *begin == plus ) ++begin; if( end-begin < 3 ) return false; if( lc_iequal(begin, lc_nan, lc_NAN, 3) ) { begin += 3; if (end != begin) /* It is 'nan(...)' or some bad input*/ { if(end-begin<2) return false; // bad input -- end; if( *begin != opening_brace || *end != closing_brace) return false; // bad input } if( !has_minus ) value = std::numeric_limits::quiet_NaN(); else value = (boost::math::changesign) (std::numeric_limits::quiet_NaN()); return true; } else if (( /* 'INF' or 'inf' */ end-begin==3 && lc_iequal(begin, lc_infinity, lc_INFINITY, 3) ) || ( /* 'INFINITY' or 'infinity' */ end-begin==inifinity_size && lc_iequal(begin, lc_infinity, lc_INFINITY, inifinity_size) ) ) { if( !has_minus ) value = std::numeric_limits::infinity(); else value = (boost::math::changesign) (std::numeric_limits::infinity()); return true; } return false; } template bool put_inf_nan_impl(CharT* begin, CharT*& end, const T& value , const CharT* lc_nan , const CharT* lc_infinity) BOOST_NOEXCEPT { using namespace std; const CharT minus = lcast_char_constants::minus; if ( (boost::math::isnan)(value) ) { if ( (boost::math::signbit)(value) ) { *begin = minus; ++ begin; } memcpy(begin, lc_nan, 3 * sizeof(CharT)); end = begin + 3; return true; } else if ( (boost::math::isinf)(value) ) { if ( (boost::math::signbit)(value) ) { *begin = minus; ++ begin; } memcpy(begin, lc_infinity, 3 * sizeof(CharT)); end = begin + 3; return true; } return false; } #ifndef BOOST_LCAST_NO_WCHAR_T template bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value) BOOST_NOEXCEPT { return parse_inf_nan_impl(begin, end, value , L"NAN", L"nan" , L"INFINITY", L"infinity" , L'(', L')'); } template bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value) BOOST_NOEXCEPT { return put_inf_nan_impl(begin, end, value, L"nan", L"infinity"); } #endif #if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) template bool parse_inf_nan(const char16_t* begin, const char16_t* end, T& value) BOOST_NOEXCEPT { return parse_inf_nan_impl(begin, end, value , u"NAN", u"nan" , u"INFINITY", u"infinity" , u'(', u')'); } template bool put_inf_nan(char16_t* begin, char16_t*& end, const T& value) BOOST_NOEXCEPT { return put_inf_nan_impl(begin, end, value, u"nan", u"infinity"); } #endif #if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) template bool parse_inf_nan(const char32_t* begin, const char32_t* end, T& value) BOOST_NOEXCEPT { return parse_inf_nan_impl(begin, end, value , U"NAN", U"nan" , U"INFINITY", U"infinity" , U'(', U')'); } template bool put_inf_nan(char32_t* begin, char32_t*& end, const T& value) BOOST_NOEXCEPT { return put_inf_nan_impl(begin, end, value, U"nan", U"infinity"); } #endif template bool parse_inf_nan(const CharT* begin, const CharT* end, T& value) BOOST_NOEXCEPT { return parse_inf_nan_impl(begin, end, value , "NAN", "nan" , "INFINITY", "infinity" , '(', ')'); } template bool put_inf_nan(CharT* begin, CharT*& end, const T& value) BOOST_NOEXCEPT { return put_inf_nan_impl(begin, end, value, "nan", "infinity"); } } namespace detail // lcast_ret_float { // Silence buggy MS warnings like C4244: '+=' : conversion from 'int' to 'unsigned short', possible loss of data #if defined(_MSC_VER) && (_MSC_VER == 1400) # pragma warning(push) # pragma warning(disable:4244) #endif template struct mantissa_holder_type { /* Can not be used with this type */ }; template <> struct mantissa_holder_type { typedef unsigned int type; typedef double wide_result_t; }; template <> struct mantissa_holder_type { #ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS typedef long double wide_result_t; #if defined(BOOST_HAS_LONG_LONG) typedef boost::ulong_long_type type; #elif defined(BOOST_HAS_MS_INT64) typedef unsigned __int64 type; #endif #endif }; template inline bool lcast_ret_float(T& value, const CharT* begin, const CharT* end) { #ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE std::locale loc; typedef std::numpunct numpunct; numpunct const& np = BOOST_USE_FACET(numpunct, loc); std::string const grouping( (loc == std::locale::classic()) ? std::string() : np.grouping() ); std::string::size_type const grouping_size = grouping.size(); CharT const thousands_sep = static_cast(grouping_size ? np.thousands_sep() : 0); CharT const decimal_point = np.decimal_point(); bool found_grouping = false; std::string::size_type last_grouping_pos = grouping_size - 1; #else CharT const decimal_point = lcast_char_constants::c_decimal_separator; #endif CharT const czero = lcast_char_constants::zero; CharT const minus = lcast_char_constants::minus; CharT const plus = lcast_char_constants::plus; CharT const capital_e = lcast_char_constants::capital_e; CharT const lowercase_e = lcast_char_constants::lowercase_e; value = static_cast(0); if (parse_inf_nan(begin, end, value)) return true; typedef typename Traits::int_type int_type; typedef BOOST_DEDUCED_TYPENAME mantissa_holder_type::type mantissa_type; typedef BOOST_DEDUCED_TYPENAME mantissa_holder_type::wide_result_t wide_result_t; int_type const zero = Traits::to_int_type(czero); if (begin == end) return false; /* Getting the plus/minus sign */ bool has_minus = false; if (Traits::eq(*begin, minus) ) { ++ begin; has_minus = true; if (begin == end) return false; } else if (Traits::eq(*begin, plus) ) { ++begin; if (begin == end) return false; } bool found_decimal = false; bool found_number_before_exp = false; int pow_of_10 = 0; mantissa_type mantissa=0; bool is_mantissa_full = false; char length_since_last_delim = 0; while ( begin != end ) { if (found_decimal) { /* We allow no thousand_separators after decimal point */ mantissa_type tmp_mantissa = mantissa * 10u; if (Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) break; if ( *begin < czero || *begin >= czero + 10 ) return false; if ( is_mantissa_full || tmp_mantissa / 10u != mantissa || (std::numeric_limits::max)()-(*begin - zero) < tmp_mantissa ) { is_mantissa_full = true; ++ begin; continue; } -- pow_of_10; mantissa = tmp_mantissa; mantissa += *begin - zero; found_number_before_exp = true; } else { if (*begin >= czero && *begin < czero + 10) { /* Checking for mantissa overflow. If overflow will * occur, them we only increase multiplyer */ mantissa_type tmp_mantissa = mantissa * 10u; if( !is_mantissa_full && tmp_mantissa / 10u == mantissa && (std::numeric_limits::max)()-(*begin - zero) >= tmp_mantissa ) { mantissa = tmp_mantissa; mantissa += *begin - zero; } else { is_mantissa_full = true; ++ pow_of_10; } found_number_before_exp = true; ++ length_since_last_delim; } else if (Traits::eq(*begin, decimal_point) || Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) { #ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE /* If ( we need to check grouping * and ( grouping missmatches * or grouping position is incorrect * or we are using the grouping position 0 twice * ) * ) then return error */ if( grouping_size && found_grouping && ( length_since_last_delim != grouping[0] || last_grouping_pos>1 || (last_grouping_pos==0 && grouping_size>1) ) ) return false; #endif if(Traits::eq(*begin, decimal_point)) { ++ begin; found_decimal = true; if (!found_number_before_exp && begin==end) return false; continue; }else { if (!found_number_before_exp) return false; break; } } #ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE else if (grouping_size && Traits::eq(*begin, thousands_sep)){ if(found_grouping) { /* It is not he first time, when we find thousands separator, * so we need to chek, is the distance between two groupings * equal to grouping[last_grouping_pos] */ if (length_since_last_delim != grouping[last_grouping_pos] ) { if (!last_grouping_pos) return false; else { -- last_grouping_pos; if (length_since_last_delim != grouping[last_grouping_pos]) return false; } } else /* We are calling the grouping[0] twice, when grouping size is more than 1 */ if (grouping_size>1u && last_grouping_pos+1 grouping[last_grouping_pos] ) return false; } length_since_last_delim = 0; ++ begin; /* Delimiter at the end '100,' */ if (begin == end) return false; continue; } #endif else return false; } ++begin; } // Exponent found if ( begin != end && (Traits::eq(*begin, lowercase_e) || Traits::eq(*begin, capital_e)) ) { ++ begin; if ( begin == end ) return false; bool exp_has_minus = false; if(Traits::eq(*begin, minus)) { exp_has_minus = true; ++ begin; if ( begin == end ) return false; } else if (Traits::eq(*begin, plus)) { ++ begin; if ( begin == end ) return false; } int exp_pow_of_10 = 0; while ( begin != end ) { if ( *begin < czero || *begin >= czero + 10 || exp_pow_of_10 * 10 < exp_pow_of_10) /* Overflows are checked lower more precisely*/ return false; exp_pow_of_10 *= 10; exp_pow_of_10 += *begin - zero; ++ begin; }; if ( exp_pow_of_10 ) { /* Overflows are checked lower */ if ( exp_has_minus ) { pow_of_10 -= exp_pow_of_10; } else { pow_of_10 += exp_pow_of_10; } } } /* We need a more accurate algorithm... We can not use current algorithm * with long doubles (and with doubles if sizeof(double)==sizeof(long double)). */ const wide_result_t result = std::pow(static_cast(10.0), pow_of_10) * mantissa; value = static_cast( has_minus ? (boost::math::changesign)(result) : result); if ( (boost::math::isinf)(value) || (boost::math::isnan)(value) ) return false; return true; } // Unsilence buggy MS warnings like C4244: '+=' : conversion from 'int' to 'unsigned short', possible loss of data #if defined(_MSC_VER) && (_MSC_VER == 1400) # pragma warning(pop) #endif } namespace detail // parser_buf { // // class parser_buf: // acts as a stream buffer which wraps around a pair of pointers // // This class is copied (and slightly changed) from // boost/regex/v4/cpp_regex_traits.hpp // Thanks John Maddock for it! (previous version had some // problems with libc++ and some other STL implementations) template class parser_buf : public BufferType { typedef BufferType base_type; typedef typename base_type::int_type int_type; typedef typename base_type::char_type char_type; typedef typename base_type::pos_type pos_type; typedef ::std::streamsize streamsize; typedef typename base_type::off_type off_type; public: parser_buf() : base_type() { setbuf(0, 0); } const charT* getnext() { return this->gptr(); } #ifndef BOOST_NO_USING_TEMPLATE using base_type::pptr; using base_type::pbase; #else charT* pptr() const { return base_type::pptr(); } charT* pbase() const { return base_type::pbase(); } #endif base_type* setbuf(char_type* s, streamsize n) { this->setg(s, s, s + n); return this; } pos_type seekpos(pos_type sp, ::std::ios_base::openmode which) { if(which & ::std::ios_base::out) return pos_type(off_type(-1)); off_type size = static_cast(this->egptr() - this->eback()); charT* g = this->eback(); if(off_type(sp) <= size) { this->setg(g, g + off_type(sp), g + size); } return pos_type(off_type(-1)); } pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) { typedef typename boost::int_t::least cast_type; if(which & ::std::ios_base::out) return pos_type(off_type(-1)); std::ptrdiff_t size = this->egptr() - this->eback(); std::ptrdiff_t pos = this->gptr() - this->eback(); charT* g = this->eback(); switch(static_cast(way)) { case ::std::ios_base::beg: if((off < 0) || (off > size)) return pos_type(off_type(-1)); else this->setg(g, g + off, g + size); break; case ::std::ios_base::end: if((off < 0) || (off > size)) return pos_type(off_type(-1)); else this->setg(g, g + size - off, g + size); break; case ::std::ios_base::cur: { std::ptrdiff_t newpos = static_cast(pos + off); if((newpos < 0) || (newpos > size)) return pos_type(off_type(-1)); else this->setg(g, g + newpos, g + size); break; } default: ; } #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4244) #endif return static_cast(this->gptr() - this->eback()); #ifdef BOOST_MSVC #pragma warning(pop) #endif } private: parser_buf& operator=(const parser_buf&); parser_buf(const parser_buf&); }; } namespace detail { struct do_not_construct_out_stream_t{}; } namespace detail // optimized stream wrapper { // String representation of Source has an upper limit. template< class CharT // a result of widest_char transformation , class Traits // usually char_traits , bool RequiresStringbuffer > class lexical_stream_limited_src { #if defined(BOOST_NO_STRINGSTREAM) typedef std::ostrstream out_stream_t; #elif defined(BOOST_NO_STD_LOCALE) typedef std::ostringstream out_stream_t; typedef parser_buf buffer_t; #else typedef std::basic_ostringstream out_stream_t; typedef parser_buf, CharT> buffer_t; #endif typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< RequiresStringbuffer, out_stream_t, do_not_construct_out_stream_t >::type deduced_out_stream_t; // A string representation of Source is written to [start, finish). CharT* start; CharT* finish; deduced_out_stream_t out_stream; public: lexical_stream_limited_src(CharT* sta, CharT* fin) BOOST_NOEXCEPT : start(sta) , finish(fin) {} private: // Undefined: lexical_stream_limited_src(lexical_stream_limited_src const&); void operator=(lexical_stream_limited_src const&); /************************************ HELPER FUNCTIONS FOR OPERATORS << ( ... ) ********************************/ bool shl_char(CharT ch) BOOST_NOEXCEPT { Traits::assign(*start, ch); finish = start + 1; return true; } #ifndef BOOST_LCAST_NO_WCHAR_T template bool shl_char(T ch) { BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)) , "boost::lexical_cast does not support narrowing of char types." "Use boost::locale instead" ); #ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE std::locale loc; CharT const w = BOOST_USE_FACET(std::ctype, loc).widen(ch); #else CharT const w = static_cast(ch); #endif Traits::assign(*start, w); finish = start + 1; return true; } #endif bool shl_char_array(CharT const* str) BOOST_NOEXCEPT { start = const_cast(str); finish = start + Traits::length(str); return true; } template bool shl_char_array(T const* str) { BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)), "boost::lexical_cast does not support narrowing of char types." "Use boost::locale instead" ); return shl_input_streamable(str); } bool shl_char_array_limited(CharT const* str, std::size_t max_size) BOOST_NOEXCEPT { start = const_cast(str); finish = std::find(start, start + max_size, Traits::to_char_type(0)); return true; } template bool shl_input_streamable(InputStreamable& input) { #if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE) // If you have compilation error at this point, than your STL library // does not support such conversions. Try updating it. BOOST_STATIC_ASSERT((boost::is_same::value)); #endif bool const result = !(out_stream << input).fail(); const buffer_t* const p = static_cast( static_cast*>(out_stream.rdbuf()) ); start = p->pbase(); finish = p->pptr(); return result; } template inline bool shl_signed(T n) { start = lcast_put_unsigned(lcast_to_unsigned(n), finish); if(n < 0) { --start; CharT const minus = lcast_char_constants::minus; Traits::assign(*start, minus); } return true; } template bool shl_real_type(const T& val, SomeCharT* begin, SomeCharT*& end) { if (put_inf_nan(begin, end, val)) return true; lcast_set_precision(out_stream, &val); return shl_input_streamable(val); } static bool shl_real_type(float val, char* begin, char*& end) { using namespace std; if (put_inf_nan(begin, end, val)) return true; const double val_as_double = val; end = begin + #if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) sprintf_s(begin, end-begin, #else sprintf(begin, #endif "%.*g", static_cast(boost::detail::lcast_get_precision()), val_as_double); return end > begin; } static bool shl_real_type(double val, char* begin, char*& end) { using namespace std; if (put_inf_nan(begin, end, val)) return true; end = begin + #if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) sprintf_s(begin, end-begin, #else sprintf(begin, #endif "%.*g", static_cast(boost::detail::lcast_get_precision()), val); return end > begin; } #ifndef __MINGW32__ static bool shl_real_type(long double val, char* begin, char*& end) { using namespace std; if (put_inf_nan(begin, end, val)) return true; end = begin + #if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) sprintf_s(begin, end-begin, #else sprintf(begin, #endif "%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); return end > begin; } #endif #if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__) static bool shl_real_type(float val, wchar_t* begin, wchar_t*& end) { using namespace std; if (put_inf_nan(begin, end, val)) return true; const double val_as_double = val; end = begin + swprintf(begin, end-begin, L"%.*g", static_cast(boost::detail::lcast_get_precision()), val_as_double ); return end > begin; } static bool shl_real_type(double val, wchar_t* begin, wchar_t*& end) { using namespace std; if (put_inf_nan(begin, end, val)) return true; end = begin + swprintf(begin, end-begin, L"%.*g", static_cast(boost::detail::lcast_get_precision()), val ); return end > begin; } static bool shl_real_type(long double val, wchar_t* begin, wchar_t*& end) { using namespace std; if (put_inf_nan(begin, end, val)) return true; end = begin + swprintf(begin, end-begin, L"%.*Lg", static_cast(boost::detail::lcast_get_precision()), val ); return end > begin; } #endif /************************************ OPERATORS << ( ... ) ********************************/ public: template bool operator<<(std::basic_string const& str) BOOST_NOEXCEPT { start = const_cast(str.data()); finish = start + str.length(); return true; } template bool operator<<(boost::container::basic_string const& str) BOOST_NOEXCEPT { start = const_cast(str.data()); finish = start + str.length(); return true; } bool operator<<(bool value) BOOST_NOEXCEPT { CharT const czero = lcast_char_constants::zero; Traits::assign(*start, Traits::to_char_type(czero + value)); finish = start + 1; return true; } bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT { start = rng.begin(); finish = rng.end(); return true; } bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT { start = const_cast(rng.begin()); finish = const_cast(rng.end()); return true; } bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT { return (*this) << iterator_range( const_cast(reinterpret_cast(rng.begin())), const_cast(reinterpret_cast(rng.end())) ); } bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT { return (*this) << iterator_range( const_cast(reinterpret_cast(rng.begin())), const_cast(reinterpret_cast(rng.end())) ); } bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT { return (*this) << iterator_range( reinterpret_cast(rng.begin()), reinterpret_cast(rng.end()) ); } bool operator<<(const iterator_range& rng) BOOST_NOEXCEPT { return (*this) << iterator_range( reinterpret_cast(rng.begin()), reinterpret_cast(rng.end()) ); } bool operator<<(char ch) { return shl_char(ch); } bool operator<<(unsigned char ch) { return ((*this) << static_cast(ch)); } bool operator<<(signed char ch) { return ((*this) << static_cast(ch)); } #if !defined(BOOST_LCAST_NO_WCHAR_T) bool operator<<(wchar_t const* str) { return shl_char_array(str); } bool operator<<(wchar_t * str) { return shl_char_array(str); } #ifndef BOOST_NO_INTRINSIC_WCHAR_T bool operator<<(wchar_t ch) { return shl_char(ch); } #endif #endif #if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) bool operator<<(char16_t ch) { return shl_char(ch); } bool operator<<(char16_t * str) { return shl_char_array(str); } bool operator<<(char16_t const * str) { return shl_char_array(str); } #endif #if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) bool operator<<(char32_t ch) { return shl_char(ch); } bool operator<<(char32_t * str) { return shl_char_array(str); } bool operator<<(char32_t const * str) { return shl_char_array(str); } #endif bool operator<<(unsigned char const* ch) { return ((*this) << reinterpret_cast(ch)); } bool operator<<(unsigned char * ch) { return ((*this) << reinterpret_cast(ch)); } bool operator<<(signed char const* ch) { return ((*this) << reinterpret_cast(ch)); } bool operator<<(signed char * ch) { return ((*this) << reinterpret_cast(ch)); } bool operator<<(char const* str) { return shl_char_array(str); } bool operator<<(char* str) { return shl_char_array(str); } bool operator<<(short n) { return shl_signed(n); } bool operator<<(int n) { return shl_signed(n); } bool operator<<(long n) { return shl_signed(n); } bool operator<<(unsigned short n) { start = lcast_put_unsigned(n, finish); return true; } bool operator<<(unsigned int n) { start = lcast_put_unsigned(n, finish); return true; } bool operator<<(unsigned long n) { start = lcast_put_unsigned(n, finish); return true; } #if defined(BOOST_HAS_LONG_LONG) bool operator<<(boost::ulong_long_type n) { start = lcast_put_unsigned(n, finish); return true; } bool operator<<(boost::long_long_type n) { return shl_signed(n); } #elif defined(BOOST_HAS_MS_INT64) bool operator<<(unsigned __int64 n) { start = lcast_put_unsigned(n, finish); return true; } bool operator<<( __int64 n) { return shl_signed(n); } #endif #ifdef BOOST_LCAST_HAS_INT128 bool operator<<(const boost::uint128_type& n) { start = lcast_put_unsigned(n, finish); return true; } bool operator<<(const boost::int128_type& n) { return shl_signed(n); } #endif bool operator<<(float val) { return shl_real_type(val, start, finish); } bool operator<<(double val) { return shl_real_type(val, start, finish); } bool operator<<(long double val) { #ifndef __MINGW32__ return shl_real_type(val, start, finish); #else return shl_real_type(static_cast(val), start, finish); #endif } template bool operator<<(boost::array const& input) BOOST_NOEXCEPT { return shl_char_array_limited(input.begin(), N); } template bool operator<<(boost::array const& input) BOOST_NOEXCEPT { return ((*this) << reinterpret_cast const& >(input)); } template bool operator<<(boost::array const& input) BOOST_NOEXCEPT { return ((*this) << reinterpret_cast const& >(input)); } template bool operator<<(boost::array const& input) BOOST_NOEXCEPT { return shl_char_array_limited(input.begin(), N); } template bool operator<<(boost::array const& input) BOOST_NOEXCEPT { return ((*this) << reinterpret_cast const& >(input)); } template bool operator<<(boost::array const& input) BOOST_NOEXCEPT { return ((*this) << reinterpret_cast const& >(input)); } #ifndef BOOST_NO_CXX11_HDR_ARRAY template bool operator<<(std::array const& input) BOOST_NOEXCEPT { if (input.size()) return shl_char_array_limited(&input[0], N); else return true; } template bool operator<<(std::array const& input) BOOST_NOEXCEPT { return ((*this) << reinterpret_cast const& >(input)); } template bool operator<<(std::array const& input) BOOST_NOEXCEPT { return ((*this) << reinterpret_cast const& >(input)); } template bool operator<<(std::array const& input) BOOST_NOEXCEPT { if (input.size()) return shl_char_array_limited(&input[0], N); else return true; } template bool operator<<(std::array const& input) BOOST_NOEXCEPT { return ((*this) << reinterpret_cast const& >(input)); } template bool operator<<(std::array const& input) BOOST_NOEXCEPT { return ((*this) << reinterpret_cast const& >(input)); } #endif template bool operator<<(const InStreamable& input) { return shl_input_streamable(input); } /************************************ HELPER FUNCTIONS FOR OPERATORS >> ( ... ) ********************************/ private: template bool shr_unsigned(Type& output) { if (start == finish) return false; CharT const minus = lcast_char_constants::minus; CharT const plus = lcast_char_constants::plus; bool has_minus = false; /* We won`t use `start' any more, so no need in decrementing it after */ if ( Traits::eq(minus,*start) ) { ++start; has_minus = true; } else if ( Traits::eq( plus, *start ) ) { ++start; } bool const succeed = lcast_ret_unsigned(output, start, finish); if (has_minus) { output = static_cast(0u - output); } return succeed; } template bool shr_signed(Type& output) { if (start == finish) return false; CharT const minus = lcast_char_constants::minus; CharT const plus = lcast_char_constants::plus; typedef BOOST_DEDUCED_TYPENAME make_unsigned::type utype; utype out_tmp =0; bool has_minus = false; /* We won`t use `start' any more, so no need in decrementing it after */ if ( Traits::eq(minus,*start) ) { ++start; has_minus = true; } else if ( Traits::eq(plus, *start) ) { ++start; } bool succeed = lcast_ret_unsigned(out_tmp, start, finish); if (has_minus) { utype const comp_val = (static_cast(1) << std::numeric_limits::digits); succeed = succeed && out_tmp<=comp_val; output = static_cast(0u - out_tmp); } else { utype const comp_val = static_cast((std::numeric_limits::max)()); succeed = succeed && out_tmp<=comp_val; output = out_tmp; } return succeed; } template bool shr_using_base_class(InputStreamable& output) { BOOST_STATIC_ASSERT_MSG( (!boost::is_pointer::value), "boost::lexical_cast can not convert to pointers" ); #if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE) BOOST_STATIC_ASSERT_MSG((boost::is_same::value), "boost::lexical_cast can not convert, because your STL library does not " "support such conversions. Try updating it." ); #endif #if defined(BOOST_NO_STRINGSTREAM) std::istrstream stream(start, finish - start); #else buffer_t buf; buf.setbuf(start, finish - start); #if defined(BOOST_NO_STD_LOCALE) std::istream stream(&buf); #else std::basic_istream stream(&buf); #endif // BOOST_NO_STD_LOCALE #endif // BOOST_NO_STRINGSTREAM stream.unsetf(std::ios::skipws); lcast_set_precision(stream, static_cast(0)); return stream >> output && stream.get() == #if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING) // GCC 2.9x lacks std::char_traits<>::eof(). // We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3 // configurations, which do provide std::char_traits<>::eof(). EOF; #else Traits::eof(); #endif } template inline bool shr_xchar(T& output) { BOOST_STATIC_ASSERT_MSG(( sizeof(CharT) == sizeof(T) ), "boost::lexical_cast does not support narrowing of character types." "Use boost::locale instead" ); bool const ok = (finish - start == 1); if (ok) { CharT out; Traits::assign(out, *start); output = static_cast(out); } return ok; } /************************************ OPERATORS >> ( ... ) ********************************/ public: bool operator>>(unsigned short& output) { return shr_unsigned(output); } bool operator>>(unsigned int& output) { return shr_unsigned(output); } bool operator>>(unsigned long int& output) { return shr_unsigned(output); } bool operator>>(short& output) { return shr_signed(output); } bool operator>>(int& output) { return shr_signed(output); } bool operator>>(long int& output) { return shr_signed(output); } #if defined(BOOST_HAS_LONG_LONG) bool operator>>(boost::ulong_long_type& output) { return shr_unsigned(output); } bool operator>>(boost::long_long_type& output) { return shr_signed(output); } #elif defined(BOOST_HAS_MS_INT64) bool operator>>(unsigned __int64& output) { return shr_unsigned(output); } bool operator>>(__int64& output) { return shr_signed(output); } #endif #ifdef BOOST_LCAST_HAS_INT128 bool operator>>(boost::uint128_type& output) { return shr_unsigned(output); } bool operator>>(boost::int128_type& output) { return shr_signed(output); } #endif bool operator>>(char& output) { return shr_xchar(output); } bool operator>>(unsigned char& output) { return shr_xchar(output); } bool operator>>(signed char& output) { return shr_xchar(output); } #if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) bool operator>>(wchar_t& output) { return shr_xchar(output); } #endif #if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) bool operator>>(char16_t& output) { return shr_xchar(output); } #endif #if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS) bool operator>>(char32_t& output) { return shr_xchar(output); } #endif template bool operator>>(std::basic_string& str) { str.assign(start, finish); return true; } template bool operator>>(boost::container::basic_string& str) { str.assign(start, finish); return true; } private: template bool shr_std_array(ArrayT& output) BOOST_NOEXCEPT { using namespace std; const std::size_t size = finish - start; if (size > N - 1) { // `-1` because we need to store \0 at the end return false; } memcpy(&output[0], start, size * sizeof(CharT)); output[size] = Traits::to_char_type(0); return true; } public: template bool operator>>(boost::array& output) BOOST_NOEXCEPT { return shr_std_array(output); } template bool operator>>(boost::array& output) { return ((*this) >> reinterpret_cast& >(output)); } template bool operator>>(boost::array& output) { return ((*this) >> reinterpret_cast& >(output)); } #ifndef BOOST_NO_CXX11_HDR_ARRAY template bool operator>>(std::array& output) BOOST_NOEXCEPT { return shr_std_array(output); } template bool operator>>(std::array& output) { return ((*this) >> reinterpret_cast& >(output)); } template bool operator>>(std::array& output) { return ((*this) >> reinterpret_cast& >(output)); } #endif /* * case "-0" || "0" || "+0" : output = false; return true; * case "1" || "+1": output = true; return true; * default: return false; */ bool operator>>(bool& output) BOOST_NOEXCEPT { CharT const zero = lcast_char_constants::zero; CharT const plus = lcast_char_constants::plus; CharT const minus = lcast_char_constants::minus; switch(finish-start) { case 1: output = Traits::eq(start[0], zero+1); return output || Traits::eq(start[0], zero ); case 2: if ( Traits::eq( plus, *start) ) { ++start; output = Traits::eq(start[0], zero +1); return output || Traits::eq(start[0], zero ); } else { output = false; return Traits::eq( minus, *start) && Traits::eq( zero, start[1]); } default: output = false; // Suppress warning about uninitalized variable return false; } } bool operator>>(float& output) { return lcast_ret_float(output,start,finish); } private: // Not optimised converter template bool float_types_converter_internal(T& output, int /*tag*/) { if (parse_inf_nan(start, finish, output)) return true; bool return_value = shr_using_base_class(output); /* Some compilers and libraries successfully * parse 'inf', 'INFINITY', '1.0E', '1.0E-'... * We are trying to provide a unified behaviour, * so we just forbid such conversions (as some * of the most popular compilers/libraries do) * */ CharT const minus = lcast_char_constants::minus; CharT const plus = lcast_char_constants::plus; CharT const capital_e = lcast_char_constants::capital_e; CharT const lowercase_e = lcast_char_constants::lowercase_e; if ( return_value && ( Traits::eq(*(finish-1), lowercase_e) // 1.0e || Traits::eq(*(finish-1), capital_e) // 1.0E || Traits::eq(*(finish-1), minus) // 1.0e- or 1.0E- || Traits::eq(*(finish-1), plus) // 1.0e+ or 1.0E+ ) ) return false; return return_value; } // Optimised converter bool float_types_converter_internal(double& output,char /*tag*/) { return lcast_ret_float(output,start,finish); } public: bool operator>>(double& output) { /* * Some compilers implement long double as double. In that case these types have * same size, same precision, same max and min values... And it means, * that current implementation of lcast_ret_float cannot be used for type * double, because it will give a big precision loss. * */ boost::mpl::if_c< #if (defined(BOOST_HAS_LONG_LONG) || defined(BOOST_HAS_MS_INT64)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) boost::type_traits::ice_eq< sizeof(double), sizeof(long double) >::value, #else 1, #endif int, char >::type tag = 0; return float_types_converter_internal(output, tag); } bool operator>>(long double& output) { int tag = 0; return float_types_converter_internal(output, tag); } // Generic istream-based algorithm. // lcast_streambuf_for_target::value is true. template bool operator>>(InputStreamable& output) { return shr_using_base_class(output); } }; } namespace detail { template struct is_stdstring { BOOST_STATIC_CONSTANT(bool, value = false ); }; template struct is_stdstring< std::basic_string > { BOOST_STATIC_CONSTANT(bool, value = true ); }; template struct is_stdstring< boost::container::basic_string > { BOOST_STATIC_CONSTANT(bool, value = true ); }; template struct is_arithmetic_and_not_xchars { BOOST_STATIC_CONSTANT(bool, value = ( boost::type_traits::ice_and< boost::is_arithmetic::value, boost::is_arithmetic::value, boost::type_traits::ice_not< detail::is_char_or_wchar::value >::value, boost::type_traits::ice_not< detail::is_char_or_wchar::value >::value >::value ) ); }; /* * is_xchar_to_xchar::value is true, when * Target and Souce are the same char types, or when * Target and Souce are char types of the same size. */ template struct is_xchar_to_xchar { BOOST_STATIC_CONSTANT(bool, value = ( boost::type_traits::ice_or< boost::type_traits::ice_and< is_same::value, is_char_or_wchar::value >::value, boost::type_traits::ice_and< boost::type_traits::ice_eq< sizeof(char),sizeof(Target)>::value, boost::type_traits::ice_eq< sizeof(char),sizeof(Source)>::value, is_char_or_wchar::value, is_char_or_wchar::value >::value >::value ) ); }; template struct is_char_array_to_stdstring { BOOST_STATIC_CONSTANT(bool, value = false ); }; template struct is_char_array_to_stdstring< std::basic_string, CharT* > { BOOST_STATIC_CONSTANT(bool, value = true ); }; template struct is_char_array_to_stdstring< std::basic_string, const CharT* > { BOOST_STATIC_CONSTANT(bool, value = true ); }; template struct is_char_array_to_stdstring< boost::container::basic_string, CharT* > { BOOST_STATIC_CONSTANT(bool, value = true ); }; template struct is_char_array_to_stdstring< boost::container::basic_string, const CharT* > { BOOST_STATIC_CONSTANT(bool, value = true ); }; #if (defined _MSC_VER) # pragma warning( push ) # pragma warning( disable : 4701 ) // possible use of ... before initialization # pragma warning( disable : 4702 ) // unreachable code # pragma warning( disable : 4267 ) // conversion from 'size_t' to 'unsigned int' #endif template struct lexical_cast_do_cast { static inline Target lexical_cast_impl(const Source& arg) { typedef lexical_cast_stream_traits stream_trait; typedef detail::lexical_stream_limited_src< BOOST_DEDUCED_TYPENAME stream_trait::char_type, BOOST_DEDUCED_TYPENAME stream_trait::traits, stream_trait::requires_stringbuf > interpreter_type; // Target type must be default constructible Target result; BOOST_DEDUCED_TYPENAME stream_trait::char_type buf[stream_trait::len_t::value + 1]; stream_trait::len_t::check_coverage(); interpreter_type interpreter(buf, buf + stream_trait::len_t::value + 1); // Disabling ADL, by directly specifying operators. if(!(interpreter.operator <<(arg) && interpreter.operator >>(result))) BOOST_LCAST_THROW_BAD_CAST(Source, Target); return result; } }; #if (defined _MSC_VER) # pragma warning( pop ) #endif template struct lexical_cast_copy { static inline const Source& lexical_cast_impl(const Source &arg) BOOST_NOEXCEPT { return arg; } }; template struct detect_precision_loss { typedef boost::numeric::Trunc Rounder; typedef Source source_type ; typedef BOOST_DEDUCED_TYPENAME mpl::if_< boost::is_arithmetic, Source, Source const& >::type argument_type ; static source_type nearbyint ( argument_type s ) { const source_type near_int = Rounder::nearbyint(s); if (near_int) { const source_type orig_div_round = s / near_int; const source_type eps = std::numeric_limits::epsilon(); if ((orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > eps) BOOST_LCAST_THROW_BAD_CAST(Source, Target); } return s ; } typedef typename Rounder::round_style round_style; } ; template struct nothrow_overflow_handler { void operator() ( boost::numeric::range_check_result r ) { if (r != boost::numeric::cInRange) BOOST_LCAST_THROW_BAD_CAST(Source, Target); } } ; template struct lexical_cast_dynamic_num_not_ignoring_minus { static inline Target lexical_cast_impl(const Source &arg) { return boost::numeric::converter< Target, Source, boost::numeric::conversion_traits, nothrow_overflow_handler, detect_precision_loss >::convert(arg); } }; template struct lexical_cast_dynamic_num_ignoring_minus { static inline Target lexical_cast_impl(const Source &arg) { typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if_c< boost::is_float::value, boost::mpl::identity, boost::make_unsigned >::type usource_t; typedef boost::numeric::converter< Target, usource_t, boost::numeric::conversion_traits, nothrow_overflow_handler, detect_precision_loss > converter_t; return ( arg < 0 ? static_cast(0u - converter_t::convert(0u - arg)) : converter_t::convert(arg) ); } }; /* * lexical_cast_dynamic_num follows the rules: * 1) If Source can be converted to Target without precision loss and * without overflows, then assign Source to Target and return * * 2) If Source is less than 0 and Target is an unsigned integer, * then negate Source, check the requirements of rule 1) and if * successful, assign static_casted Source to Target and return * * 3) Otherwise throw a bad_lexical_cast exception * * * Rule 2) required because boost::lexical_cast has the behavior of * stringstream, which uses the rules of scanf for conversions. And * in the C99 standard for unsigned input value minus sign is * optional, so if a negative number is read, no errors will arise * and the result will be the two's complement. */ template struct lexical_cast_dynamic_num { static inline Target lexical_cast_impl(const Source &arg) { typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< boost::type_traits::ice_and< boost::type_traits::ice_or< boost::is_signed::value, boost::is_float::value >::value, boost::type_traits::ice_not< boost::is_same::value >::value, boost::type_traits::ice_not< boost::is_same::value >::value, boost::is_unsigned::value >::value, lexical_cast_dynamic_num_ignoring_minus, lexical_cast_dynamic_num_not_ignoring_minus >::type caster_type; return caster_type::lexical_cast_impl(arg); } }; } template inline Target lexical_cast(const Source &arg) { typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay::type src; typedef BOOST_DEDUCED_TYPENAME boost::type_traits::ice_or< boost::detail::is_xchar_to_xchar::value, boost::detail::is_char_array_to_stdstring::value, boost::type_traits::ice_and< boost::is_same::value, boost::detail::is_stdstring::value >::value > shall_we_copy_t; typedef BOOST_DEDUCED_TYPENAME boost::detail::is_arithmetic_and_not_xchars shall_we_copy_with_dynamic_check_t; typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c< shall_we_copy_t::value, boost::detail::lexical_cast_copy, BOOST_DEDUCED_TYPENAME boost::mpl::if_c< shall_we_copy_with_dynamic_check_t::value, boost::detail::lexical_cast_dynamic_num, boost::detail::lexical_cast_do_cast >::type >::type caster_type; return caster_type::lexical_cast_impl(arg); } template inline Target lexical_cast(const char* chars, std::size_t count) { return ::boost::lexical_cast( ::boost::iterator_range(chars, chars + count) ); } template inline Target lexical_cast(const unsigned char* chars, std::size_t count) { return ::boost::lexical_cast( ::boost::iterator_range(chars, chars + count) ); } template inline Target lexical_cast(const signed char* chars, std::size_t count) { return ::boost::lexical_cast( ::boost::iterator_range(chars, chars + count) ); } #ifndef BOOST_LCAST_NO_WCHAR_T template inline Target lexical_cast(const wchar_t* chars, std::size_t count) { return ::boost::lexical_cast( ::boost::iterator_range(chars, chars + count) ); } #endif #ifndef BOOST_NO_CHAR16_T template inline Target lexical_cast(const char16_t* chars, std::size_t count) { return ::boost::lexical_cast( ::boost::iterator_range(chars, chars + count) ); } #endif #ifndef BOOST_NO_CHAR32_T template inline Target lexical_cast(const char32_t* chars, std::size_t count) { return ::boost::lexical_cast( ::boost::iterator_range(chars, chars + count) ); } #endif } // namespace boost #else // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace boost { namespace detail { // selectors for choosing stream character type template struct stream_char { typedef char type; }; #ifndef BOOST_LCAST_NO_WCHAR_T #ifndef BOOST_NO_INTRINSIC_WCHAR_T template<> struct stream_char { typedef wchar_t type; }; #endif template<> struct stream_char { typedef wchar_t type; }; template<> struct stream_char { typedef wchar_t type; }; template<> struct stream_char { typedef wchar_t type; }; #endif // stream wrapper for handling lexical conversions template class lexical_stream { private: typedef typename widest_char< typename stream_char::type, typename stream_char::type>::type char_type; typedef Traits traits_type; public: lexical_stream(char_type* = 0, char_type* = 0) { stream.unsetf(std::ios::skipws); lcast_set_precision(stream, static_cast(0), static_cast(0) ); } ~lexical_stream() { #if defined(BOOST_NO_STRINGSTREAM) stream.freeze(false); #endif } bool operator<<(const Source &input) { return !(stream << input).fail(); } template bool operator>>(InputStreamable &output) { return !is_pointer::value && stream >> output && stream.get() == #if defined(__GNUC__) && (__GNUC__<3) && defined(BOOST_NO_STD_WSTRING) // GCC 2.9x lacks std::char_traits<>::eof(). // We use BOOST_NO_STD_WSTRING to filter out STLport and libstdc++-v3 // configurations, which do provide std::char_traits<>::eof(). EOF; #else traits_type::eof(); #endif } bool operator>>(std::string &output) { #if defined(BOOST_NO_STRINGSTREAM) stream << '\0'; #endif stream.str().swap(output); return true; } #ifndef BOOST_LCAST_NO_WCHAR_T bool operator>>(std::wstring &output) { stream.str().swap(output); return true; } #endif private: #if defined(BOOST_NO_STRINGSTREAM) std::strstream stream; #elif defined(BOOST_NO_STD_LOCALE) std::stringstream stream; #else std::basic_stringstream stream; #endif }; } // call-by-value fallback version (deprecated) template Target lexical_cast(Source arg) { typedef typename detail::widest_char< BOOST_DEDUCED_TYPENAME detail::stream_char::type , BOOST_DEDUCED_TYPENAME detail::stream_char::type >::type char_type; typedef std::char_traits traits; detail::lexical_stream interpreter; Target result; if(!(interpreter << arg && interpreter >> result)) BOOST_LCAST_THROW_BAD_CAST(Source, Target); return result; } } // namespace boost #endif // Copyright Kevlin Henney, 2000-2005. // Copyright Alexander Nasonov, 2006-2010. // Copyright Antony Polukhin, 2011-2013. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #undef BOOST_LCAST_THROW_BAD_CAST #undef BOOST_LCAST_NO_WCHAR_T #undef BOOST_LCAST_HAS_INT128 #endif // BOOST_LEXICAL_CAST_INCLUDED passenger-4.0.37/ext/boost/libs/000755 000765 000024 00000000000 12233035540 017073 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/limits.hpp000644 000765 000024 00000014002 12233035540 020151 0ustar00honglistaff000000 000000 // (C) Copyright John maddock 1999. // (C) David Abrahams 2002. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // use this header as a workaround for missing // See http://www.boost.org/libs/compatibility/index.html for documentation. #ifndef BOOST_LIMITS #define BOOST_LIMITS #include #ifdef BOOST_NO_LIMITS # error "There is no std::numeric_limits suppport available." #else # include #endif #if (defined(BOOST_HAS_LONG_LONG) && defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)) \ || (defined(BOOST_HAS_MS_INT64) && defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)) // Add missing specializations for numeric_limits: #ifdef BOOST_HAS_MS_INT64 # define BOOST_LLT __int64 # define BOOST_ULLT unsigned __int64 #else # define BOOST_LLT ::boost::long_long_type # define BOOST_ULLT ::boost::ulong_long_type #endif #include // for CHAR_BIT namespace std { template<> class numeric_limits { public: BOOST_STATIC_CONSTANT(bool, is_specialized = true); #ifdef BOOST_HAS_MS_INT64 static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x8000000000000000i64; } static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x7FFFFFFFFFFFFFFFi64; } #elif defined(LLONG_MAX) static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MIN; } static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MAX; } #elif defined(LONGLONG_MAX) static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MIN; } static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MAX; } #else static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 1LL << (sizeof(BOOST_LLT) * CHAR_BIT - 1); } static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~(min)(); } #endif BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT -1); BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT) - 1) * 301L / 1000); BOOST_STATIC_CONSTANT(bool, is_signed = true); BOOST_STATIC_CONSTANT(bool, is_integer = true); BOOST_STATIC_CONSTANT(bool, is_exact = true); BOOST_STATIC_CONSTANT(int, radix = 2); static BOOST_LLT epsilon() throw() { return 0; }; static BOOST_LLT round_error() throw() { return 0; }; BOOST_STATIC_CONSTANT(int, min_exponent = 0); BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); BOOST_STATIC_CONSTANT(int, max_exponent = 0); BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); BOOST_STATIC_CONSTANT(bool, has_infinity = false); BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); BOOST_STATIC_CONSTANT(bool, has_denorm = false); BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); static BOOST_LLT infinity() throw() { return 0; }; static BOOST_LLT quiet_NaN() throw() { return 0; }; static BOOST_LLT signaling_NaN() throw() { return 0; }; static BOOST_LLT denorm_min() throw() { return 0; }; BOOST_STATIC_CONSTANT(bool, is_iec559 = false); BOOST_STATIC_CONSTANT(bool, is_bounded = true); BOOST_STATIC_CONSTANT(bool, is_modulo = true); BOOST_STATIC_CONSTANT(bool, traps = false); BOOST_STATIC_CONSTANT(bool, tinyness_before = false); BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); }; template<> class numeric_limits { public: BOOST_STATIC_CONSTANT(bool, is_specialized = true); #ifdef BOOST_HAS_MS_INT64 static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0ui64; } static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0xFFFFFFFFFFFFFFFFui64; } #elif defined(ULLONG_MAX) && defined(ULLONG_MIN) static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MIN; } static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MAX; } #elif defined(ULONGLONG_MAX) && defined(ULONGLONG_MIN) static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MIN; } static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MAX; } #else static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0uLL; } static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~0uLL; } #endif BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT); BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT)) * 301L / 1000); BOOST_STATIC_CONSTANT(bool, is_signed = false); BOOST_STATIC_CONSTANT(bool, is_integer = true); BOOST_STATIC_CONSTANT(bool, is_exact = true); BOOST_STATIC_CONSTANT(int, radix = 2); static BOOST_ULLT epsilon() throw() { return 0; }; static BOOST_ULLT round_error() throw() { return 0; }; BOOST_STATIC_CONSTANT(int, min_exponent = 0); BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); BOOST_STATIC_CONSTANT(int, max_exponent = 0); BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); BOOST_STATIC_CONSTANT(bool, has_infinity = false); BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); BOOST_STATIC_CONSTANT(bool, has_denorm = false); BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); static BOOST_ULLT infinity() throw() { return 0; }; static BOOST_ULLT quiet_NaN() throw() { return 0; }; static BOOST_ULLT signaling_NaN() throw() { return 0; }; static BOOST_ULLT denorm_min() throw() { return 0; }; BOOST_STATIC_CONSTANT(bool, is_iec559 = false); BOOST_STATIC_CONSTANT(bool, is_bounded = true); BOOST_STATIC_CONSTANT(bool, is_modulo = true); BOOST_STATIC_CONSTANT(bool, traps = false); BOOST_STATIC_CONSTANT(bool, tinyness_before = false); BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); }; } #endif #endif passenger-4.0.37/ext/boost/make_shared.hpp000644 000765 000024 00000000744 12233035540 021123 0ustar00honglistaff000000 000000 #ifndef BOOST_MAKE_SHARED_HPP_INCLUDED #define BOOST_MAKE_SHARED_HPP_INCLUDED // make_shared.hpp // // Copyright (c) 2007, 2008 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // See http://www.boost.org/libs/smart_ptr/make_shared.html // for documentation. #include #endif // #ifndef BOOST_MAKE_SHARED_HPP_INCLUDED passenger-4.0.37/ext/boost/math/000755 000765 000024 00000000000 12233035540 017073 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mem_fn.hpp000644 000765 000024 00000001124 12233035540 020112 0ustar00honglistaff000000 000000 #ifndef BOOST_MEM_FN_HPP_INCLUDED #define BOOST_MEM_FN_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // mem_fn.hpp - a generalization of std::mem_fun[_ref] // // Copyright (c) 2009 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // See http://www.boost.org/libs/bind/mem_fn.html for documentation. // #include #endif // #ifndef BOOST_MEM_FN_HPP_INCLUDED passenger-4.0.37/ext/boost/memory_order.hpp000644 000765 000024 00000002371 12233035540 021361 0ustar00honglistaff000000 000000 #ifndef BOOST_MEMORY_ORDER_HPP_INCLUDED #define BOOST_MEMORY_ORDER_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // boost/memory_order.hpp // // Defines enum boost::memory_order per the C++0x working draft // // Copyright (c) 2008, 2009 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) namespace boost { // // Enum values are chosen so that code that needs to insert // a trailing fence for acquire semantics can use a single // test such as: // // if( mo & memory_order_acquire ) { ...fence... } // // For leading fences one can use: // // if( mo & memory_order_release ) { ...fence... } // // Architectures such as Alpha that need a fence on consume // can use: // // if( mo & ( memory_order_acquire | memory_order_consume ) ) { ...fence... } // enum memory_order { memory_order_relaxed = 0, memory_order_acquire = 1, memory_order_release = 2, memory_order_acq_rel = 3, // acquire | release memory_order_seq_cst = 7, // acq_rel | 4 memory_order_consume = 8 }; } // namespace boost #endif // #ifndef BOOST_MEMORY_ORDER_HPP_INCLUDED passenger-4.0.37/ext/boost/move/000755 000765 000024 00000000000 12233035540 017110 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/000755 000765 000024 00000000000 12233035540 016732 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/next_prior.hpp000644 000765 000024 00000002420 12233035540 021042 0ustar00honglistaff000000 000000 // Boost next_prior.hpp header file ---------------------------------------// // (C) Copyright Dave Abrahams and Daniel Walker 1999-2003. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/utility for documentation. // Revision History // 13 Dec 2003 Added next(x, n) and prior(x, n) (Daniel Walker) #ifndef BOOST_NEXT_PRIOR_HPP_INCLUDED #define BOOST_NEXT_PRIOR_HPP_INCLUDED #include namespace boost { // Helper functions for classes like bidirectional iterators not supporting // operator+ and operator- // // Usage: // const std::list::iterator p = get_some_iterator(); // const std::list::iterator prev = boost::prior(p); // const std::list::iterator next = boost::next(prev, 2); // Contributed by Dave Abrahams template inline T next(T x) { return ++x; } template inline T next(T x, Distance n) { std::advance(x, n); return x; } template inline T prior(T x) { return --x; } template inline T prior(T x, Distance n) { std::advance(x, -n); return x; } } // namespace boost #endif // BOOST_NEXT_PRIOR_HPP_INCLUDED passenger-4.0.37/ext/boost/non_type.hpp000644 000765 000024 00000001153 12233035540 020506 0ustar00honglistaff000000 000000 // ------------------------------------- // // (C) Copyright Gennaro Prota 2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // ------------------------------------------------------ #ifndef BOOST_NON_TYPE_HPP_GP_20030417 #define BOOST_NON_TYPE_HPP_GP_20030417 namespace boost { // Just a simple "envelope" for non-type template parameters. Useful // to work around some MSVC deficiencies. template struct non_type { }; } #endif // include guard passenger-4.0.37/ext/boost/noncopyable.hpp000644 000765 000024 00000002454 12233035540 021171 0ustar00honglistaff000000 000000 // Boost noncopyable.hpp header file --------------------------------------// // (C) Copyright Beman Dawes 1999-2003. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/utility for documentation. #ifndef BOOST_NONCOPYABLE_HPP_INCLUDED #define BOOST_NONCOPYABLE_HPP_INCLUDED #include namespace boost { // Private copy constructor and copy assignment ensure classes derived from // class noncopyable cannot be copied. // Contributed by Dave Abrahams namespace noncopyable_ // protection from unintended ADL { class noncopyable { protected: #ifndef BOOST_NO_DEFAULTED_FUNCTIONS BOOST_CONSTEXPR noncopyable() = default; ~noncopyable() = default; #else noncopyable() {} ~noncopyable() {} #endif #ifndef BOOST_NO_DELETED_FUNCTIONS noncopyable( const noncopyable& ) = delete; noncopyable& operator=( const noncopyable& ) = delete; #else private: // emphasize the following members are private noncopyable( const noncopyable& ); noncopyable& operator=( const noncopyable& ); #endif }; } typedef noncopyable_::noncopyable noncopyable; } // namespace boost #endif // BOOST_NONCOPYABLE_HPP_INCLUDED passenger-4.0.37/ext/boost/none.hpp000644 000765 000024 00000001405 12233035540 017612 0ustar00honglistaff000000 000000 // Copyright (C) 2003, Fernando Luis Cacciola Carballal. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/optional for documentation. // // You are welcome to contact the author at: // fernando_cacciola@hotmail.com // #ifndef BOOST_NONE_17SEP2003_HPP #define BOOST_NONE_17SEP2003_HPP #include "boost/none_t.hpp" // NOTE: Borland users have to include this header outside any precompiled headers // (bcc<=5.64 cannot include instance data in a precompiled header) // -- * To be verified, now that there's no unnamed namespace namespace boost { none_t const none = (static_cast(0)) ; } // namespace boost #endif passenger-4.0.37/ext/boost/none_t.hpp000644 000765 000024 00000001135 12233035540 020135 0ustar00honglistaff000000 000000 // Copyright (C) 2003, Fernando Luis Cacciola Carballal. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/optional for documentation. // // You are welcome to contact the author at: // fernando_cacciola@hotmail.com // #ifndef BOOST_NONE_T_17SEP2003_HPP #define BOOST_NONE_T_17SEP2003_HPP namespace boost { namespace detail { struct none_helper{}; } typedef int detail::none_helper::*none_t ; } // namespace boost #endif passenger-4.0.37/ext/boost/numeric/000755 000765 000024 00000000000 12233035540 017604 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/operators.hpp000644 000765 000024 00000113642 12233035540 020700 0ustar00honglistaff000000 000000 // Boost operators.hpp header file ----------------------------------------// // (C) Copyright David Abrahams, Jeremy Siek, Daryle Walker 1999-2001. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/utility/operators.htm for documentation. // Revision History // 16 Dec 10 Limit warning suppression for 4284 to older versions of VC++ // (Matthew Bradbury, fixes #4432) // 07 Aug 08 Added "euclidean" spelling. (Daniel Frey) // 03 Apr 08 Make sure "convertible to bool" is sufficient // for T::operator<, etc. (Daniel Frey) // 24 May 07 Changed empty_base to depend on T, see // http://svn.boost.org/trac/boost/ticket/979 // 21 Oct 02 Modified implementation of operators to allow compilers with a // correct named return value optimization (NRVO) to produce optimal // code. (Daniel Frey) // 02 Dec 01 Bug fixed in random_access_iteratable. (Helmut Zeisel) // 28 Sep 01 Factored out iterator operator groups. (Daryle Walker) // 27 Aug 01 'left' form for non commutative operators added; // additional classes for groups of related operators added; // workaround for empty base class optimization // bug of GCC 3.0 (Helmut Zeisel) // 25 Jun 01 output_iterator_helper changes: removed default template // parameters, added support for self-proxying, additional // documentation and tests (Aleksey Gurtovoy) // 29 May 01 Added operator classes for << and >>. Added input and output // iterator helper classes. Added classes to connect equality and // relational operators. Added classes for groups of related // operators. Reimplemented example operator and iterator helper // classes in terms of the new groups. (Daryle Walker, with help // from Alexy Gurtovoy) // 11 Feb 01 Fixed bugs in the iterator helpers which prevented explicitly // supplied arguments from actually being used (Dave Abrahams) // 04 Jul 00 Fixed NO_OPERATORS_IN_NAMESPACE bugs, major cleanup and // refactoring of compiler workarounds, additional documentation // (Alexy Gurtovoy and Mark Rodgers with some help and prompting from // Dave Abrahams) // 28 Jun 00 General cleanup and integration of bugfixes from Mark Rodgers and // Jeremy Siek (Dave Abrahams) // 20 Jun 00 Changes to accommodate Borland C++Builder 4 and Borland C++ 5.5 // (Mark Rodgers) // 20 Jun 00 Minor fixes to the prior revision (Aleksey Gurtovoy) // 10 Jun 00 Support for the base class chaining technique was added // (Aleksey Gurtovoy). See documentation and the comments below // for the details. // 12 Dec 99 Initial version with iterator operators (Jeremy Siek) // 18 Nov 99 Change name "divideable" to "dividable", remove unnecessary // specializations of dividable, subtractable, modable (Ed Brey) // 17 Nov 99 Add comments (Beman Dawes) // Remove unnecessary specialization of operators<> (Ed Brey) // 15 Nov 99 Fix less_than_comparable second operand type for first two // operators.(Beman Dawes) // 12 Nov 99 Add operators templates (Ed Brey) // 11 Nov 99 Add single template parameter version for compilers without // partial specialization (Beman Dawes) // 10 Nov 99 Initial version // 10 Jun 00: // An additional optional template parameter was added to most of // operator templates to support the base class chaining technique (see // documentation for the details). Unfortunately, a straightforward // implementation of this change would have broken compatibility with the // previous version of the library by making it impossible to use the same // template name (e.g. 'addable') for both the 1- and 2-argument versions of // an operator template. This implementation solves the backward-compatibility // issue at the cost of some simplicity. // // One of the complications is an existence of special auxiliary class template // 'is_chained_base<>' (see 'detail' namespace below), which is used // to determine whether its template parameter is a library's operator template // or not. You have to specialize 'is_chained_base<>' for each new // operator template you add to the library. // // However, most of the non-trivial implementation details are hidden behind // several local macros defined below, and as soon as you understand them, // you understand the whole library implementation. #ifndef BOOST_OPERATORS_HPP #define BOOST_OPERATORS_HPP #include #include #include #if defined(__sgi) && !defined(__GNUC__) # pragma set woff 1234 #endif #if BOOST_WORKAROUND(BOOST_MSVC, < 1600) # pragma warning( disable : 4284 ) // complaint about return type of #endif // operator-> not begin a UDT namespace boost { namespace detail { template class empty_base { // Helmut Zeisel, empty base class optimization bug with GCC 3.0.0 #if defined(__GNUC__) && __GNUC__==3 && __GNUC_MINOR__==0 && __GNU_PATCHLEVEL__==0 bool dummy; #endif }; } // namespace detail } // namespace boost // In this section we supply the xxxx1 and xxxx2 forms of the operator // templates, which are explicitly targeted at the 1-type-argument and // 2-type-argument operator forms, respectively. Some compilers get confused // when inline friend functions are overloaded in namespaces other than the // global namespace. When BOOST_NO_OPERATORS_IN_NAMESPACE is defined, all of // these templates must go in the global namespace. #ifndef BOOST_NO_OPERATORS_IN_NAMESPACE namespace boost { #endif // Basic operator classes (contributed by Dave Abrahams) ------------------// // Note that friend functions defined in a class are implicitly inline. // See the C++ std, 11.4 [class.friend] paragraph 5 template > struct less_than_comparable2 : B { friend bool operator<=(const T& x, const U& y) { return !static_cast(x > y); } friend bool operator>=(const T& x, const U& y) { return !static_cast(x < y); } friend bool operator>(const U& x, const T& y) { return y < x; } friend bool operator<(const U& x, const T& y) { return y > x; } friend bool operator<=(const U& x, const T& y) { return !static_cast(y < x); } friend bool operator>=(const U& x, const T& y) { return !static_cast(y > x); } }; template > struct less_than_comparable1 : B { friend bool operator>(const T& x, const T& y) { return y < x; } friend bool operator<=(const T& x, const T& y) { return !static_cast(y < x); } friend bool operator>=(const T& x, const T& y) { return !static_cast(x < y); } }; template > struct equality_comparable2 : B { friend bool operator==(const U& y, const T& x) { return x == y; } friend bool operator!=(const U& y, const T& x) { return !static_cast(x == y); } friend bool operator!=(const T& y, const U& x) { return !static_cast(y == x); } }; template > struct equality_comparable1 : B { friend bool operator!=(const T& x, const T& y) { return !static_cast(x == y); } }; // A macro which produces "name_2left" from "name". #define BOOST_OPERATOR2_LEFT(name) name##2##_##left // NRVO-friendly implementation (contributed by Daniel Frey) ---------------// #if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) // This is the optimal implementation for ISO/ANSI C++, // but it requires the compiler to implement the NRVO. // If the compiler has no NRVO, this is the best symmetric // implementation available. #define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \ template > \ struct NAME##2 : B \ { \ friend T operator OP( const T& lhs, const U& rhs ) \ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ friend T operator OP( const U& lhs, const T& rhs ) \ { T nrv( rhs ); nrv OP##= lhs; return nrv; } \ }; \ \ template > \ struct NAME##1 : B \ { \ friend T operator OP( const T& lhs, const T& rhs ) \ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ }; #define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \ template > \ struct NAME##2 : B \ { \ friend T operator OP( const T& lhs, const U& rhs ) \ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ }; \ \ template > \ struct BOOST_OPERATOR2_LEFT(NAME) : B \ { \ friend T operator OP( const U& lhs, const T& rhs ) \ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ }; \ \ template > \ struct NAME##1 : B \ { \ friend T operator OP( const T& lhs, const T& rhs ) \ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ }; #else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) // For compilers without NRVO the following code is optimal, but not // symmetric! Note that the implementation of // BOOST_OPERATOR2_LEFT(NAME) only looks cool, but doesn't provide // optimization opportunities to the compiler :) #define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \ template > \ struct NAME##2 : B \ { \ friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ friend T operator OP( const U& lhs, T rhs ) { return rhs OP##= lhs; } \ }; \ \ template > \ struct NAME##1 : B \ { \ friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ }; #define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \ template > \ struct NAME##2 : B \ { \ friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ }; \ \ template > \ struct BOOST_OPERATOR2_LEFT(NAME) : B \ { \ friend T operator OP( const U& lhs, const T& rhs ) \ { return T( lhs ) OP##= rhs; } \ }; \ \ template > \ struct NAME##1 : B \ { \ friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ }; #endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) BOOST_BINARY_OPERATOR_COMMUTATIVE( multipliable, * ) BOOST_BINARY_OPERATOR_COMMUTATIVE( addable, + ) BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( subtractable, - ) BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( dividable, / ) BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( modable, % ) BOOST_BINARY_OPERATOR_COMMUTATIVE( xorable, ^ ) BOOST_BINARY_OPERATOR_COMMUTATIVE( andable, & ) BOOST_BINARY_OPERATOR_COMMUTATIVE( orable, | ) #undef BOOST_BINARY_OPERATOR_COMMUTATIVE #undef BOOST_BINARY_OPERATOR_NON_COMMUTATIVE #undef BOOST_OPERATOR2_LEFT // incrementable and decrementable contributed by Jeremy Siek template > struct incrementable : B { friend T operator++(T& x, int) { incrementable_type nrv(x); ++x; return nrv; } private: // The use of this typedef works around a Borland bug typedef T incrementable_type; }; template > struct decrementable : B { friend T operator--(T& x, int) { decrementable_type nrv(x); --x; return nrv; } private: // The use of this typedef works around a Borland bug typedef T decrementable_type; }; // Iterator operator classes (contributed by Jeremy Siek) ------------------// template > struct dereferenceable : B { P operator->() const { return &*static_cast(*this); } }; template > struct indexable : B { R operator[](I n) const { return *(static_cast(*this) + n); } }; // More operator classes (contributed by Daryle Walker) --------------------// // (NRVO-friendly implementation contributed by Daniel Frey) ---------------// #if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) #define BOOST_BINARY_OPERATOR( NAME, OP ) \ template > \ struct NAME##2 : B \ { \ friend T operator OP( const T& lhs, const U& rhs ) \ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ }; \ \ template > \ struct NAME##1 : B \ { \ friend T operator OP( const T& lhs, const T& rhs ) \ { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ }; #else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) #define BOOST_BINARY_OPERATOR( NAME, OP ) \ template > \ struct NAME##2 : B \ { \ friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ }; \ \ template > \ struct NAME##1 : B \ { \ friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ }; #endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) BOOST_BINARY_OPERATOR( left_shiftable, << ) BOOST_BINARY_OPERATOR( right_shiftable, >> ) #undef BOOST_BINARY_OPERATOR template > struct equivalent2 : B { friend bool operator==(const T& x, const U& y) { return !static_cast(x < y) && !static_cast(x > y); } }; template > struct equivalent1 : B { friend bool operator==(const T&x, const T&y) { return !static_cast(x < y) && !static_cast(y < x); } }; template > struct partially_ordered2 : B { friend bool operator<=(const T& x, const U& y) { return static_cast(x < y) || static_cast(x == y); } friend bool operator>=(const T& x, const U& y) { return static_cast(x > y) || static_cast(x == y); } friend bool operator>(const U& x, const T& y) { return y < x; } friend bool operator<(const U& x, const T& y) { return y > x; } friend bool operator<=(const U& x, const T& y) { return static_cast(y > x) || static_cast(y == x); } friend bool operator>=(const U& x, const T& y) { return static_cast(y < x) || static_cast(y == x); } }; template > struct partially_ordered1 : B { friend bool operator>(const T& x, const T& y) { return y < x; } friend bool operator<=(const T& x, const T& y) { return static_cast(x < y) || static_cast(x == y); } friend bool operator>=(const T& x, const T& y) { return static_cast(y < x) || static_cast(x == y); } }; // Combined operator classes (contributed by Daryle Walker) ----------------// template > struct totally_ordered2 : less_than_comparable2 > {}; template > struct totally_ordered1 : less_than_comparable1 > {}; template > struct additive2 : addable2 > {}; template > struct additive1 : addable1 > {}; template > struct multiplicative2 : multipliable2 > {}; template > struct multiplicative1 : multipliable1 > {}; template > struct integer_multiplicative2 : multiplicative2 > {}; template > struct integer_multiplicative1 : multiplicative1 > {}; template > struct arithmetic2 : additive2 > {}; template > struct arithmetic1 : additive1 > {}; template > struct integer_arithmetic2 : additive2 > {}; template > struct integer_arithmetic1 : additive1 > {}; template > struct bitwise2 : xorable2 > > {}; template > struct bitwise1 : xorable1 > > {}; template > struct unit_steppable : incrementable > {}; template > struct shiftable2 : left_shiftable2 > {}; template > struct shiftable1 : left_shiftable1 > {}; template > struct ring_operators2 : additive2 > > {}; template > struct ring_operators1 : additive1 > {}; template > struct ordered_ring_operators2 : ring_operators2 > {}; template > struct ordered_ring_operators1 : ring_operators1 > {}; template > struct field_operators2 : ring_operators2 > > {}; template > struct field_operators1 : ring_operators1 > {}; template > struct ordered_field_operators2 : field_operators2 > {}; template > struct ordered_field_operators1 : field_operators1 > {}; template > struct euclidian_ring_operators2 : ring_operators2 > > > > {}; template > struct euclidian_ring_operators1 : ring_operators1 > > {}; template > struct ordered_euclidian_ring_operators2 : totally_ordered2 > {}; template > struct ordered_euclidian_ring_operators1 : totally_ordered1 > {}; template > struct euclidean_ring_operators2 : ring_operators2 > > > > {}; template > struct euclidean_ring_operators1 : ring_operators1 > > {}; template > struct ordered_euclidean_ring_operators2 : totally_ordered2 > {}; template > struct ordered_euclidean_ring_operators1 : totally_ordered1 > {}; template > struct input_iteratable : equality_comparable1 > > {}; template > struct output_iteratable : incrementable {}; template > struct forward_iteratable : input_iteratable {}; template > struct bidirectional_iteratable : forward_iteratable > {}; // To avoid repeated derivation from equality_comparable, // which is an indirect base class of bidirectional_iterable, // random_access_iteratable must not be derived from totally_ordered1 // but from less_than_comparable1 only. (Helmut Zeisel, 02-Dec-2001) template > struct random_access_iteratable : bidirectional_iteratable > > > {}; #ifndef BOOST_NO_OPERATORS_IN_NAMESPACE } // namespace boost #endif // BOOST_NO_OPERATORS_IN_NAMESPACE // BOOST_IMPORT_TEMPLATE1 .. BOOST_IMPORT_TEMPLATE4 - // // When BOOST_NO_OPERATORS_IN_NAMESPACE is defined we need a way to import an // operator template into the boost namespace. BOOST_IMPORT_TEMPLATE1 is used // for one-argument forms of operator templates; BOOST_IMPORT_TEMPLATE2 for // two-argument forms. Note that these macros expect to be invoked from within // boost. #ifndef BOOST_NO_OPERATORS_IN_NAMESPACE // The template is already in boost so we have nothing to do. # define BOOST_IMPORT_TEMPLATE4(template_name) # define BOOST_IMPORT_TEMPLATE3(template_name) # define BOOST_IMPORT_TEMPLATE2(template_name) # define BOOST_IMPORT_TEMPLATE1(template_name) #else // BOOST_NO_OPERATORS_IN_NAMESPACE # ifndef BOOST_NO_USING_TEMPLATE // Bring the names in with a using-declaration // to avoid stressing the compiler. # define BOOST_IMPORT_TEMPLATE4(template_name) using ::template_name; # define BOOST_IMPORT_TEMPLATE3(template_name) using ::template_name; # define BOOST_IMPORT_TEMPLATE2(template_name) using ::template_name; # define BOOST_IMPORT_TEMPLATE1(template_name) using ::template_name; # else // Otherwise, because a Borland C++ 5.5 bug prevents a using declaration // from working, we are forced to use inheritance for that compiler. # define BOOST_IMPORT_TEMPLATE4(template_name) \ template > \ struct template_name : ::template_name {}; # define BOOST_IMPORT_TEMPLATE3(template_name) \ template > \ struct template_name : ::template_name {}; # define BOOST_IMPORT_TEMPLATE2(template_name) \ template > \ struct template_name : ::template_name {}; # define BOOST_IMPORT_TEMPLATE1(template_name) \ template > \ struct template_name : ::template_name {}; # endif // BOOST_NO_USING_TEMPLATE #endif // BOOST_NO_OPERATORS_IN_NAMESPACE // // Here's where we put it all together, defining the xxxx forms of the templates // in namespace boost. We also define specializations of is_chained_base<> for // the xxxx, xxxx1, and xxxx2 templates, importing them into boost:: as // necessary. // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // is_chained_base<> - a traits class used to distinguish whether an operator // template argument is being used for base class chaining, or is specifying a // 2nd argument type. namespace boost { // A type parameter is used instead of a plain bool because Borland's compiler // didn't cope well with the more obvious non-type template parameter. namespace detail { struct true_t {}; struct false_t {}; } // namespace detail // Unspecialized version assumes that most types are not being used for base // class chaining. We specialize for the operator templates defined in this // library. template struct is_chained_base { typedef ::boost::detail::false_t value; }; } // namespace boost // Import a 4-type-argument operator template into boost (if necessary) and // provide a specialization of 'is_chained_base<>' for it. # define BOOST_OPERATOR_TEMPLATE4(template_name4) \ BOOST_IMPORT_TEMPLATE4(template_name4) \ template \ struct is_chained_base< ::boost::template_name4 > { \ typedef ::boost::detail::true_t value; \ }; // Import a 3-type-argument operator template into boost (if necessary) and // provide a specialization of 'is_chained_base<>' for it. # define BOOST_OPERATOR_TEMPLATE3(template_name3) \ BOOST_IMPORT_TEMPLATE3(template_name3) \ template \ struct is_chained_base< ::boost::template_name3 > { \ typedef ::boost::detail::true_t value; \ }; // Import a 2-type-argument operator template into boost (if necessary) and // provide a specialization of 'is_chained_base<>' for it. # define BOOST_OPERATOR_TEMPLATE2(template_name2) \ BOOST_IMPORT_TEMPLATE2(template_name2) \ template \ struct is_chained_base< ::boost::template_name2 > { \ typedef ::boost::detail::true_t value; \ }; // Import a 1-type-argument operator template into boost (if necessary) and // provide a specialization of 'is_chained_base<>' for it. # define BOOST_OPERATOR_TEMPLATE1(template_name1) \ BOOST_IMPORT_TEMPLATE1(template_name1) \ template \ struct is_chained_base< ::boost::template_name1 > { \ typedef ::boost::detail::true_t value; \ }; // BOOST_OPERATOR_TEMPLATE(template_name) defines template_name<> such that it // can be used for specifying both 1-argument and 2-argument forms. Requires the // existence of two previously defined class templates named '1' // and '2' which must implement the corresponding 1- and 2- // argument forms. // // The template type parameter O == is_chained_base::value is used to // distinguish whether the 2nd argument to is being used for // base class chaining from another boost operator template or is describing a // 2nd operand type. O == true_t only when U is actually an another operator // template from the library. Partial specialization is used to select an // implementation in terms of either '1' or '2'. // # define BOOST_OPERATOR_TEMPLATE(template_name) \ template \ ,class O = typename is_chained_base::value \ > \ struct template_name : template_name##2 {}; \ \ template \ struct template_name \ : template_name##1 {}; \ \ template \ struct template_name \ : template_name##1 {}; \ \ template \ struct is_chained_base< ::boost::template_name > { \ typedef ::boost::detail::true_t value; \ }; \ \ BOOST_OPERATOR_TEMPLATE2(template_name##2) \ BOOST_OPERATOR_TEMPLATE1(template_name##1) #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # define BOOST_OPERATOR_TEMPLATE4(template_name4) \ BOOST_IMPORT_TEMPLATE4(template_name4) # define BOOST_OPERATOR_TEMPLATE3(template_name3) \ BOOST_IMPORT_TEMPLATE3(template_name3) # define BOOST_OPERATOR_TEMPLATE2(template_name2) \ BOOST_IMPORT_TEMPLATE2(template_name2) # define BOOST_OPERATOR_TEMPLATE1(template_name1) \ BOOST_IMPORT_TEMPLATE1(template_name1) // In this case we can only assume that template_name<> is equivalent to the // more commonly needed template_name1<> form. # define BOOST_OPERATOR_TEMPLATE(template_name) \ template > \ struct template_name : template_name##1 {}; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace boost { BOOST_OPERATOR_TEMPLATE(less_than_comparable) BOOST_OPERATOR_TEMPLATE(equality_comparable) BOOST_OPERATOR_TEMPLATE(multipliable) BOOST_OPERATOR_TEMPLATE(addable) BOOST_OPERATOR_TEMPLATE(subtractable) BOOST_OPERATOR_TEMPLATE2(subtractable2_left) BOOST_OPERATOR_TEMPLATE(dividable) BOOST_OPERATOR_TEMPLATE2(dividable2_left) BOOST_OPERATOR_TEMPLATE(modable) BOOST_OPERATOR_TEMPLATE2(modable2_left) BOOST_OPERATOR_TEMPLATE(xorable) BOOST_OPERATOR_TEMPLATE(andable) BOOST_OPERATOR_TEMPLATE(orable) BOOST_OPERATOR_TEMPLATE1(incrementable) BOOST_OPERATOR_TEMPLATE1(decrementable) BOOST_OPERATOR_TEMPLATE2(dereferenceable) BOOST_OPERATOR_TEMPLATE3(indexable) BOOST_OPERATOR_TEMPLATE(left_shiftable) BOOST_OPERATOR_TEMPLATE(right_shiftable) BOOST_OPERATOR_TEMPLATE(equivalent) BOOST_OPERATOR_TEMPLATE(partially_ordered) BOOST_OPERATOR_TEMPLATE(totally_ordered) BOOST_OPERATOR_TEMPLATE(additive) BOOST_OPERATOR_TEMPLATE(multiplicative) BOOST_OPERATOR_TEMPLATE(integer_multiplicative) BOOST_OPERATOR_TEMPLATE(arithmetic) BOOST_OPERATOR_TEMPLATE(integer_arithmetic) BOOST_OPERATOR_TEMPLATE(bitwise) BOOST_OPERATOR_TEMPLATE1(unit_steppable) BOOST_OPERATOR_TEMPLATE(shiftable) BOOST_OPERATOR_TEMPLATE(ring_operators) BOOST_OPERATOR_TEMPLATE(ordered_ring_operators) BOOST_OPERATOR_TEMPLATE(field_operators) BOOST_OPERATOR_TEMPLATE(ordered_field_operators) BOOST_OPERATOR_TEMPLATE(euclidian_ring_operators) BOOST_OPERATOR_TEMPLATE(ordered_euclidian_ring_operators) BOOST_OPERATOR_TEMPLATE(euclidean_ring_operators) BOOST_OPERATOR_TEMPLATE(ordered_euclidean_ring_operators) BOOST_OPERATOR_TEMPLATE2(input_iteratable) BOOST_OPERATOR_TEMPLATE1(output_iteratable) BOOST_OPERATOR_TEMPLATE2(forward_iteratable) BOOST_OPERATOR_TEMPLATE2(bidirectional_iteratable) BOOST_OPERATOR_TEMPLATE4(random_access_iteratable) #undef BOOST_OPERATOR_TEMPLATE #undef BOOST_OPERATOR_TEMPLATE4 #undef BOOST_OPERATOR_TEMPLATE3 #undef BOOST_OPERATOR_TEMPLATE2 #undef BOOST_OPERATOR_TEMPLATE1 #undef BOOST_IMPORT_TEMPLATE1 #undef BOOST_IMPORT_TEMPLATE2 #undef BOOST_IMPORT_TEMPLATE3 #undef BOOST_IMPORT_TEMPLATE4 // The following 'operators' classes can only be used portably if the derived class // declares ALL of the required member operators. template struct operators2 : totally_ordered2 > > {}; #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct operators : operators2 {}; template struct operators #else template struct operators #endif : totally_ordered > > > {}; // Iterator helper classes (contributed by Jeremy Siek) -------------------// // (Input and output iterator helpers contributed by Daryle Walker) -------// // (Changed to use combined operator classes by Daryle Walker) ------------// template struct input_iterator_helper : input_iteratable > {}; template struct output_iterator_helper : output_iteratable > { T& operator*() { return static_cast(*this); } T& operator++() { return static_cast(*this); } }; template struct forward_iterator_helper : forward_iteratable > {}; template struct bidirectional_iterator_helper : bidirectional_iteratable > {}; template struct random_access_iterator_helper : random_access_iteratable > { friend D requires_difference_operator(const T& x, const T& y) { return x - y; } }; // random_access_iterator_helper } // namespace boost #if defined(__sgi) && !defined(__GNUC__) #pragma reset woff 1234 #endif #endif // BOOST_OPERATORS_HPP passenger-4.0.37/ext/boost/optional/000755 000765 000024 00000000000 12233035540 017767 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/optional.hpp000644 000765 000024 00000001020 12233035540 020471 0ustar00honglistaff000000 000000 // Copyright (C) 2003, Fernando Luis Cacciola Carballal. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/optional for documentation. // // You are welcome to contact the author at: // fernando_cacciola@hotmail.com // #ifndef BOOST_OPTIONAL_FLC_19NOV2002_HPP #define BOOST_OPTIONAL_FLC_19NOV2002_HPP #include "boost/optional/optional.hpp" #endif passenger-4.0.37/ext/boost/pointee.hpp000644 000765 000024 00000003435 12233035540 020323 0ustar00honglistaff000000 000000 #ifndef POINTEE_DWA200415_HPP # define POINTEE_DWA200415_HPP // // Copyright David Abrahams 2004. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // typename pointee

::type provides the pointee type of P. // // For example, it is T for T* and X for shared_ptr. // // http://www.boost.org/libs/iterator/doc/pointee.html // # include # include # include # include # include # include namespace boost { namespace detail { template struct smart_ptr_pointee { typedef typename P::element_type type; }; template struct iterator_pointee { typedef typename iterator_traits::value_type value_type; struct impl { template static char test(T const&); static char (& test(value_type&) )[2]; static Iterator& x; }; BOOST_STATIC_CONSTANT(bool, is_constant = sizeof(impl::test(*impl::x)) == 1); typedef typename mpl::if_c< # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) ::boost::detail::iterator_pointee::is_constant # else is_constant # endif , typename add_const::type , value_type >::type type; }; } template struct pointee : mpl::eval_if< detail::is_incrementable

, detail::iterator_pointee

, detail::smart_ptr_pointee

> { }; } // namespace boost #endif // POINTEE_DWA200415_HPP passenger-4.0.37/ext/boost/pointer_to_other.hpp000644 000765 000024 00000002257 12233035540 022244 0ustar00honglistaff000000 000000 #ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED #define BOOST_POINTER_TO_OTHER_HPP_INCLUDED // // pointer_to_other.hpp // // (C) Copyright Ion Gaztanaga 2005. // Copyright (c) 2005 Peter Dimov. // // Distributed under the Boost Software License, Version 1.0. // // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/smart_ptr/pointer_to_other.html // namespace boost { // Defines the same pointer type (raw or smart) to another pointee type template struct pointer_to_other; template class Sp> struct pointer_to_other< Sp, U > { typedef Sp type; }; template class Sp> struct pointer_to_other< Sp, U > { typedef Sp type; }; template class Sp> struct pointer_to_other< Sp, U > { typedef Sp type; }; template struct pointer_to_other< T*, U > { typedef U* type; }; } // namespace boost #endif // #ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED passenger-4.0.37/ext/boost/preprocessor/000755 000765 000024 00000000000 12233035540 020670 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/range/000755 000765 000024 00000000000 12233035540 017236 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/ratio/000755 000765 000024 00000000000 12233035540 017260 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/ref.hpp000644 000765 000024 00000007526 12233035540 017441 0ustar00honglistaff000000 000000 #ifndef BOOST_REF_HPP_INCLUDED #define BOOST_REF_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include // // ref.hpp - ref/cref, useful helper functions // // Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) // Copyright (C) 2001, 2002 Peter Dimov // Copyright (C) 2002 David Abrahams // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/bind/ref.html for documentation. // namespace boost { template class reference_wrapper { public: typedef T type; #if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) explicit reference_wrapper(T& t): t_(&t) {} #else explicit reference_wrapper(T& t): t_(boost::addressof(t)) {} #endif operator T& () const { return *t_; } T& get() const { return *t_; } T* get_pointer() const { return t_; } private: T* t_; }; # if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) # define BOOST_REF_CONST # else # define BOOST_REF_CONST const # endif template inline reference_wrapper BOOST_REF_CONST ref(T & t) { return reference_wrapper(t); } template inline reference_wrapper BOOST_REF_CONST cref(T const & t) { return reference_wrapper(t); } # undef BOOST_REF_CONST # ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template class is_reference_wrapper : public mpl::false_ { }; template class unwrap_reference { public: typedef T type; }; # define AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(X) \ template \ class is_reference_wrapper< X > \ : public mpl::true_ \ { \ }; \ \ template \ class unwrap_reference< X > \ { \ public: \ typedef T type; \ }; \ /**/ AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper) #if !defined(BOOST_NO_CV_SPECIALIZATIONS) AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper const) AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper volatile) AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF(reference_wrapper const volatile) #endif # undef AUX_REFERENCE_WRAPPER_METAFUNCTIONS_DEF # else // no partial specialization } // namespace boost #include namespace boost { namespace detail { typedef char (&yes_reference_wrapper_t)[1]; typedef char (&no_reference_wrapper_t)[2]; no_reference_wrapper_t is_reference_wrapper_test(...); template yes_reference_wrapper_t is_reference_wrapper_test(type< reference_wrapper >); template struct reference_unwrapper { template struct apply { typedef T type; }; }; template<> struct reference_unwrapper { template struct apply { typedef typename T::type type; }; }; } template class is_reference_wrapper { public: BOOST_STATIC_CONSTANT( bool, value = ( sizeof(detail::is_reference_wrapper_test(type())) == sizeof(detail::yes_reference_wrapper_t))); typedef ::boost::mpl::bool_ type; }; template class unwrap_reference : public detail::reference_unwrapper< is_reference_wrapper::value >::template apply {}; # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template inline typename unwrap_reference::type& unwrap_ref(T& t) { return t; } template inline T* get_pointer( reference_wrapper const & r ) { return r.get_pointer(); } } // namespace boost #endif // #ifndef BOOST_REF_HPP_INCLUDED passenger-4.0.37/ext/boost/regex/000755 000765 000024 00000000000 12233035540 017254 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/regex.h000644 000765 000024 00000004176 12233035540 017435 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2000 * Dr John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org/libs/regex for documentation. * FILE regex.h * VERSION 3.12 * DESCRIPTION: Declares POSIX API functions */ #ifndef BOOST_RE_REGEX_H #define BOOST_RE_REGEX_H #include /* * add using declarations to bring POSIX API functions into * global scope, only if this is C++ (and not C). */ #ifdef __cplusplus using boost::regoff_t; using boost::regex_tA; using boost::regmatch_t; using boost::REG_BASIC; using boost::REG_EXTENDED; using boost::REG_ICASE; using boost::REG_NOSUB; using boost::REG_NEWLINE; using boost::REG_NOSPEC; using boost::REG_PEND; using boost::REG_DUMP; using boost::REG_NOCOLLATE; using boost::REG_ESCAPE_IN_LISTS; using boost::REG_NEWLINE_ALT; using boost::REG_PERL; using boost::REG_AWK; using boost::REG_GREP; using boost::REG_EGREP; using boost::REG_ASSERT; using boost::REG_INVARG; using boost::REG_ATOI; using boost::REG_ITOA; using boost::REG_NOTBOL; using boost::REG_NOTEOL; using boost::REG_STARTEND; using boost::reg_comp_flags; using boost::reg_exec_flags; using boost::regcompA; using boost::regerrorA; using boost::regexecA; using boost::regfreeA; #ifndef BOOST_NO_WREGEX using boost::regcompW; using boost::regerrorW; using boost::regexecW; using boost::regfreeW; using boost::regex_tW; #endif using boost::REG_NOERROR; using boost::REG_NOMATCH; using boost::REG_BADPAT; using boost::REG_ECOLLATE; using boost::REG_ECTYPE; using boost::REG_EESCAPE; using boost::REG_ESUBREG; using boost::REG_EBRACK; using boost::REG_EPAREN; using boost::REG_EBRACE; using boost::REG_BADBR; using boost::REG_ERANGE; using boost::REG_ESPACE; using boost::REG_BADRPT; using boost::REG_EEND; using boost::REG_ESIZE; using boost::REG_ERPAREN; using boost::REG_EMPTY; using boost::REG_E_MEMORY; using boost::REG_E_UNKNOWN; using boost::reg_errcode_t; #endif /* __cplusplus */ #endif /* BOOST_RE_REGEX_H */ passenger-4.0.37/ext/boost/regex.hpp000644 000765 000024 00000001467 12233035540 017775 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org/libs/regex for documentation. * FILE regex.cpp * VERSION see * DESCRIPTION: Declares boost::basic_regex<> and associated * functions and classes. This header is the main * entry point for the template regex code. */ /* start with C compatibility API */ #ifndef BOOST_RE_REGEX_HPP #define BOOST_RE_REGEX_HPP #ifndef BOOST_REGEX_CONFIG_HPP #include #endif #include #endif // include passenger-4.0.37/ext/boost/regex_fwd.hpp000644 000765 000024 00000001265 12233035540 020631 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org/libs/regex for documentation. * FILE regex_fwd.cpp * VERSION see * DESCRIPTION: Forward declares boost::basic_regex<> and * associated typedefs. */ #ifndef BOOST_REGEX_FWD_HPP #define BOOST_REGEX_FWD_HPP #ifndef BOOST_REGEX_CONFIG_HPP #include #endif #include #endif passenger-4.0.37/ext/boost/scoped_array.hpp000644 000765 000024 00000000766 12233035540 021337 0ustar00honglistaff000000 000000 #ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED #define BOOST_SCOPED_ARRAY_HPP_INCLUDED // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001, 2002 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // http://www.boost.org/libs/smart_ptr/scoped_array.htm // #include #endif // #ifndef BOOST_SCOPED_ARRAY_HPP_INCLUDED passenger-4.0.37/ext/boost/scoped_ptr.hpp000644 000765 000024 00000000753 12233035540 021022 0ustar00honglistaff000000 000000 #ifndef BOOST_SCOPED_PTR_HPP_INCLUDED #define BOOST_SCOPED_PTR_HPP_INCLUDED // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001, 2002 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // http://www.boost.org/libs/smart_ptr/scoped_ptr.htm // #include #endif // #ifndef BOOST_SCOPED_PTR_HPP_INCLUDED passenger-4.0.37/ext/boost/shared_array.hpp000644 000765 000024 00000001050 12233035540 021313 0ustar00honglistaff000000 000000 #ifndef BOOST_SHARED_ARRAY_HPP_INCLUDED #define BOOST_SHARED_ARRAY_HPP_INCLUDED // // shared_array.hpp // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001, 2002 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/smart_ptr/shared_array.htm for documentation. // #include #endif // #ifndef BOOST_SHARED_ARRAY_HPP_INCLUDED passenger-4.0.37/ext/boost/shared_ptr.hpp000644 000765 000024 00000001033 12233035540 021003 0ustar00honglistaff000000 000000 #ifndef BOOST_SHARED_PTR_HPP_INCLUDED #define BOOST_SHARED_PTR_HPP_INCLUDED // // shared_ptr.hpp // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001-2008 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. // #include #endif // #ifndef BOOST_SHARED_PTR_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/000755 000765 000024 00000000000 12233035540 020155 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/static_assert.hpp000644 000765 000024 00000017323 12233035540 021531 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2000. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/static_assert for documentation. /* Revision history: 02 August 2000 Initial version. */ #ifndef BOOST_STATIC_ASSERT_HPP #define BOOST_STATIC_ASSERT_HPP #include #include #if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) // // This is horrible, but it seems to be the only we can shut up the // "anonymous variadic macros were introduced in C99 [-Wvariadic-macros]" // warning that get spewed out otherwise in non-C++11 mode. // #pragma GCC system_header #endif #ifndef BOOST_NO_CXX11_STATIC_ASSERT # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__) # else # define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) # endif #else # define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) #endif #ifdef __BORLANDC__ // // workaround for buggy integral-constant expression support: #define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS #endif #if defined(__GNUC__) && (__GNUC__ == 3) && ((__GNUC_MINOR__ == 3) || (__GNUC_MINOR__ == 4)) // gcc 3.3 and 3.4 don't produce good error messages with the default version: # define BOOST_SA_GCC_WORKAROUND #endif // // If the compiler issues warnings about old C style casts, // then enable this: // #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))) # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) ((__VA_ARGS__) == 0 ? false : true) # else # define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) == 0 ? false : true) # endif #else # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) (bool)(__VA_ARGS__) # else # define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x) # endif #endif // // If the compiler warns about unused typedefs then enable this: // #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7))) # define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused)) #else # define BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE #endif #ifndef BOOST_NO_CXX11_STATIC_ASSERT # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__) # else # define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) # endif #else namespace boost{ // HP aCC cannot deal with missing names for template value parameters template struct STATIC_ASSERTION_FAILURE; template <> struct STATIC_ASSERTION_FAILURE { enum { value = 1 }; }; // HP aCC cannot deal with missing names for template value parameters template struct static_assert_test{}; } // // Implicit instantiation requires that all member declarations be // instantiated, but that the definitions are *not* instantiated. // // It's not particularly clear how this applies to enum's or typedefs; // both are described as declarations [7.1.3] and [7.2] in the standard, // however some compilers use "delayed evaluation" of one or more of // these when implicitly instantiating templates. We use typedef declarations // by default, but try defining BOOST_USE_ENUM_STATIC_ASSERT if the enum // version gets better results from your compiler... // // Implementation: // Both of these versions rely on sizeof(incomplete_type) generating an error // message containing the name of the incomplete type. We use // "STATIC_ASSERTION_FAILURE" as the type name here to generate // an eye catching error message. The result of the sizeof expression is either // used as an enum initialiser, or as a template argument depending which version // is in use... // Note that the argument to the assert is explicitly cast to bool using old- // style casts: too many compilers currently have problems with static_cast // when used inside integral constant expressions. // #if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS) #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) // __LINE__ macro broken when -ZI is used see Q199057 // fortunately MSVC ignores duplicate typedef's. #define BOOST_STATIC_ASSERT( B ) \ typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >)\ > boost_static_assert_typedef_ #elif defined(BOOST_MSVC) && defined(BOOST_NO_CXX11_VARIADIC_MACROS) #define BOOST_STATIC_ASSERT( B ) \ typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST ( B ) >)>\ BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__) #elif defined(BOOST_MSVC) #define BOOST_STATIC_ASSERT(...) \ typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST (__VA_ARGS__) >)>\ BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__) #elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && defined(BOOST_NO_CXX11_VARIADIC_MACROS) // agurt 15/sep/02: a special care is needed to force Intel C++ issue an error // instead of warning in case of failure # define BOOST_STATIC_ASSERT( B ) \ typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \ [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >::value ] #elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && !defined(BOOST_NO_CXX11_VARIADIC_MACROS) // agurt 15/sep/02: a special care is needed to force Intel C++ issue an error // instead of warning in case of failure # define BOOST_STATIC_ASSERT(...) \ typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \ [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >::value ] #elif defined(__sgi) // special version for SGI MIPSpro compiler #define BOOST_STATIC_ASSERT( B ) \ BOOST_STATIC_CONSTANT(bool, \ BOOST_JOIN(boost_static_assert_test_, __LINE__) = ( B )); \ typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< \ BOOST_JOIN(boost_static_assert_test_, __LINE__) >)>\ BOOST_JOIN(boost_static_assert_typedef_, __LINE__) #elif BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // special version for CodeWarrior <= 8.x #define BOOST_STATIC_ASSERT( B ) \ BOOST_STATIC_CONSTANT(int, \ BOOST_JOIN(boost_static_assert_test_, __LINE__) = \ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >) ) #else // generic version # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT( ... ) \ typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE # else # define BOOST_STATIC_ASSERT( B ) \ typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >)>\ BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE # endif #endif #else // alternative enum based implementation: # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT( ... ) \ enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( __VA_ARGS__ ) >) } # else # define BOOST_STATIC_ASSERT(B) \ enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) } # endif #endif #endif // defined(BOOST_NO_CXX11_STATIC_ASSERT) #endif // BOOST_STATIC_ASSERT_HPP passenger-4.0.37/ext/boost/swap.hpp000644 000765 000024 00000000437 12233035540 017631 0ustar00honglistaff000000 000000 // Copyright (C) 2007 Joseph Gauterin // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_SWAP_HPP #define BOOST_SWAP_HPP #include "boost/utility/swap.hpp" #endif passenger-4.0.37/ext/boost/system/000755 000765 000024 00000000000 12233035540 017466 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/thread/000755 000765 000024 00000000000 12233035540 017411 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/thread.hpp000644 000765 000024 00000001507 12233035540 020125 0ustar00honglistaff000000 000000 // Copyright (C) 2001-2003 // William E. Kempf // (C) Copyright 2008-9 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See www.boost.org/libs/thread for documentation. #if !defined(BOOST_THREAD_WEK01082003_HPP) #define BOOST_THREAD_WEK01082003_HPP #include #include #include #include #include #include #include #include #include #include #include #include #endif passenger-4.0.37/ext/boost/throw_exception.hpp000644 000765 000024 00000005522 12233035540 022100 0ustar00honglistaff000000 000000 #ifndef UUID_AA15E74A856F11E08B8D93F24824019B #define UUID_AA15E74A856F11E08B8D93F24824019B #if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // boost/throw_exception.hpp // // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. // Copyright (c) 2008-2009 Emil Dotchevski and Reverge Studios, Inc. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // http://www.boost.org/libs/utility/throw_exception.html // #include #include #include #include #if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) ) # define BOOST_EXCEPTION_DISABLE #endif #if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1310 ) # define BOOST_EXCEPTION_DISABLE #endif #if !defined( BOOST_EXCEPTION_DISABLE ) # include # include # define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_CURRENT_FUNCTION,__FILE__,__LINE__) #else # define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x) #endif namespace boost { #ifdef BOOST_NO_EXCEPTIONS void throw_exception( std::exception const & e ); // user defined #else inline void throw_exception_assert_compatibility( std::exception const & ) { } template BOOST_ATTRIBUTE_NORETURN inline void throw_exception( E const & e ) { //All boost exceptions are required to derive from std::exception, //to ensure compatibility with BOOST_NO_EXCEPTIONS. throw_exception_assert_compatibility(e); #ifndef BOOST_EXCEPTION_DISABLE throw enable_current_exception(enable_error_info(e)); #else throw e; #endif } #endif #if !defined( BOOST_EXCEPTION_DISABLE ) namespace exception_detail { template BOOST_ATTRIBUTE_NORETURN void throw_exception_( E const & x, char const * current_function, char const * file, int line ) { boost::throw_exception( set_info( set_info( set_info( enable_error_info(x), throw_function(current_function)), throw_file(file)), throw_line(line))); } } #endif } // namespace boost #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/token_functions.hpp000644 000765 000024 00000046371 12233035540 022076 0ustar00honglistaff000000 000000 // Boost token_functions.hpp ------------------------------------------------// // Copyright John R. Bandela 2001. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/tokenizer/ for documentation. // Revision History: // 01 Oct 2004 Joaquin M Lopez Munoz // Workaround for a problem with string::assign in msvc-stlport // 06 Apr 2004 John Bandela // Fixed a bug involving using char_delimiter with a true input iterator // 28 Nov 2003 Robert Zeh and John Bandela // Converted into "fast" functions that avoid using += when // the supplied iterator isn't an input_iterator; based on // some work done at Archelon and a version that was checked into // the boost CVS for a short period of time. // 20 Feb 2002 John Maddock // Removed using namespace std declarations and added // workaround for BOOST_NO_STDC_NAMESPACE (the library // can be safely mixed with regex). // 06 Feb 2002 Jeremy Siek // Added char_separator. // 02 Feb 2002 Jeremy Siek // Removed tabs and a little cleanup. #ifndef BOOST_TOKEN_FUNCTIONS_JRB120303_HPP_ #define BOOST_TOKEN_FUNCTIONS_JRB120303_HPP_ #include #include #include #include #include // for find_if #include #include #include #include #if !defined(BOOST_NO_CWCTYPE) #include #endif // // the following must not be macros if we are to prefix them // with std:: (they shouldn't be macros anyway...) // #ifdef ispunct # undef ispunct #endif #ifdef iswpunct # undef iswpunct #endif #ifdef isspace # undef isspace #endif #ifdef iswspace # undef iswspace #endif // // fix namespace problems: // #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::ispunct; using ::isspace; #if !defined(BOOST_NO_CWCTYPE) using ::iswpunct; using ::iswspace; #endif } #endif namespace boost{ //=========================================================================== // The escaped_list_separator class. Which is a model of TokenizerFunction // An escaped list is a super-set of what is commonly known as a comma // separated value (csv) list.It is separated into fields by a comma or // other character. If the delimiting character is inside quotes, then it is // counted as a regular character.To allow for embedded quotes in a field, // there can be escape sequences using the \ much like C. // The role of the comma, the quotation mark, and the escape // character (backslash \), can be assigned to other characters. struct escaped_list_error : public std::runtime_error{ escaped_list_error(const std::string& what_arg):std::runtime_error(what_arg) { } }; // The out of the box GCC 2.95 on cygwin does not have a char_traits class. // MSVC does not like the following typename template ::traits_type > class escaped_list_separator { private: typedef std::basic_string string_type; struct char_eq { Char e_; char_eq(Char e):e_(e) { } bool operator()(Char c) { return Traits::eq(e_,c); } }; string_type escape_; string_type c_; string_type quote_; bool last_; bool is_escape(Char e) { char_eq f(e); return std::find_if(escape_.begin(),escape_.end(),f)!=escape_.end(); } bool is_c(Char e) { char_eq f(e); return std::find_if(c_.begin(),c_.end(),f)!=c_.end(); } bool is_quote(Char e) { char_eq f(e); return std::find_if(quote_.begin(),quote_.end(),f)!=quote_.end(); } template void do_escape(iterator& next,iterator end,Token& tok) { if (++next == end) throw escaped_list_error(std::string("cannot end with escape")); if (Traits::eq(*next,'n')) { tok+='\n'; return; } else if (is_quote(*next)) { tok+=*next; return; } else if (is_c(*next)) { tok+=*next; return; } else if (is_escape(*next)) { tok+=*next; return; } else throw escaped_list_error(std::string("unknown escape sequence")); } public: explicit escaped_list_separator(Char e = '\\', Char c = ',',Char q = '\"') : escape_(1,e), c_(1,c), quote_(1,q), last_(false) { } escaped_list_separator(string_type e, string_type c, string_type q) : escape_(e), c_(c), quote_(q), last_(false) { } void reset() {last_=false;} template bool operator()(InputIterator& next,InputIterator end,Token& tok) { bool bInQuote = false; tok = Token(); if (next == end) { if (last_) { last_ = false; return true; } else return false; } last_ = false; for (;next != end;++next) { if (is_escape(*next)) { do_escape(next,end,tok); } else if (is_c(*next)) { if (!bInQuote) { // If we are not in quote, then we are done ++next; // The last character was a c, that means there is // 1 more blank field last_ = true; return true; } else tok+=*next; } else if (is_quote(*next)) { bInQuote=!bInQuote; } else { tok += *next; } } return true; } }; //=========================================================================== // The classes here are used by offset_separator and char_separator to implement // faster assigning of tokens using assign instead of += namespace tokenizer_detail { //=========================================================================== // Tokenizer was broken for wide character separators, at least on Windows, since // CRT functions isspace etc only expect values in [0, 0xFF]. Debug build asserts // if higher values are passed in. The traits extension class should take care of this. // Assuming that the conditional will always get optimized out in the function // implementations, argument types are not a problem since both forms of character classifiers // expect an int. #if !defined(BOOST_NO_CWCTYPE) template struct traits_extension_details : public traits { typedef typename traits::char_type char_type; static bool isspace(char_type c) { return std::iswspace(c) != 0; } static bool ispunct(char_type c) { return std::iswpunct(c) != 0; } }; template struct traits_extension_details : public traits { typedef typename traits::char_type char_type; static bool isspace(char_type c) { return std::isspace(c) != 0; } static bool ispunct(char_type c) { return std::ispunct(c) != 0; } }; #endif // In case there is no cwctype header, we implement the checks manually. // We make use of the fact that the tested categories should fit in ASCII. template struct traits_extension : public traits { typedef typename traits::char_type char_type; static bool isspace(char_type c) { #if !defined(BOOST_NO_CWCTYPE) return traits_extension_details::isspace(c); #else return static_cast< unsigned >(c) <= 255 && std::isspace(c) != 0; #endif } static bool ispunct(char_type c) { #if !defined(BOOST_NO_CWCTYPE) return traits_extension_details::ispunct(c); #else return static_cast< unsigned >(c) <= 255 && std::ispunct(c) != 0; #endif } }; // The assign_or_plus_equal struct contains functions that implement // assign, +=, and clearing based on the iterator type. The // generic case does nothing for plus_equal and clearing, while // passing through the call for assign. // // When an input iterator is being used, the situation is reversed. // The assign method does nothing, plus_equal invokes operator +=, // and the clearing method sets the supplied token to the default // token constructor's result. // template struct assign_or_plus_equal { template static void assign(Iterator b, Iterator e, Token &t) { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) &&\ BOOST_WORKAROUND(__SGI_STL_PORT, < 0x500) &&\ defined(_STLP_DEBUG) &&\ (defined(_STLP_USE_DYNAMIC_LIB) || defined(_DLL)) // Problem with string::assign for msvc-stlport in debug mode: the // linker tries to import the templatized version of this memfun, // which is obviously not exported. // See http://www.stlport.com/dcforum/DCForumID6/1763.html for details. t = Token(); while(b != e) t += *b++; #else t.assign(b, e); #endif } template static void plus_equal(Token &, const Value &) { } // If we are doing an assign, there is no need for the // the clear. // template static void clear(Token &) { } }; template <> struct assign_or_plus_equal { template static void assign(Iterator , Iterator , Token &) { } template static void plus_equal(Token &t, const Value &v) { t += v; } template static void clear(Token &t) { t = Token(); } }; template struct pointer_iterator_category{ typedef std::random_access_iterator_tag type; }; template struct class_iterator_category{ typedef typename Iterator::iterator_category type; }; // This portably gets the iterator_tag without partial template specialization template struct get_iterator_category{ typedef typename mpl::if_, pointer_iterator_category, class_iterator_category >::type cat; typedef typename cat::type iterator_category; }; } // namespace tokenizer_detail //=========================================================================== // The offset_separator class, which is a model of TokenizerFunction. // Offset breaks a string into tokens based on a range of offsets class offset_separator { private: std::vector offsets_; unsigned int current_offset_; bool wrap_offsets_; bool return_partial_last_; public: template offset_separator(Iter begin, Iter end, bool wrap_offsets = true, bool return_partial_last = true) : offsets_(begin,end), current_offset_(0), wrap_offsets_(wrap_offsets), return_partial_last_(return_partial_last) { } offset_separator() : offsets_(1,1), current_offset_(), wrap_offsets_(true), return_partial_last_(true) { } void reset() { current_offset_ = 0; } template bool operator()(InputIterator& next, InputIterator end, Token& tok) { typedef tokenizer_detail::assign_or_plus_equal< BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category< InputIterator >::iterator_category > assigner; BOOST_ASSERT(!offsets_.empty()); assigner::clear(tok); InputIterator start(next); if (next == end) return false; if (current_offset_ == offsets_.size()) { if (wrap_offsets_) current_offset_=0; else return false; } int c = offsets_[current_offset_]; int i = 0; for (; i < c; ++i) { if (next == end)break; assigner::plus_equal(tok,*next++); } assigner::assign(start,next,tok); if (!return_partial_last_) if (i < (c-1) ) return false; ++current_offset_; return true; } }; //=========================================================================== // The char_separator class breaks a sequence of characters into // tokens based on the character delimiters (very much like bad old // strtok). A delimiter character can either be kept or dropped. A // kept delimiter shows up as an output token, whereas a dropped // delimiter does not. // This class replaces the char_delimiters_separator class. The // constructor for the char_delimiters_separator class was too // confusing and needed to be deprecated. However, because of the // default arguments to the constructor, adding the new constructor // would cause ambiguity, so instead I deprecated the whole class. // The implementation of the class was also simplified considerably. enum empty_token_policy { drop_empty_tokens, keep_empty_tokens }; // The out of the box GCC 2.95 on cygwin does not have a char_traits class. template ::traits_type > class char_separator { typedef tokenizer_detail::traits_extension Traits; typedef std::basic_string string_type; public: explicit char_separator(const Char* dropped_delims, const Char* kept_delims = 0, empty_token_policy empty_tokens = drop_empty_tokens) : m_dropped_delims(dropped_delims), m_use_ispunct(false), m_use_isspace(false), m_empty_tokens(empty_tokens), m_output_done(false) { // Borland workaround if (kept_delims) m_kept_delims = kept_delims; } // use ispunct() for kept delimiters and isspace for dropped. explicit char_separator() : m_use_ispunct(true), m_use_isspace(true), m_empty_tokens(drop_empty_tokens) { } void reset() { } template bool operator()(InputIterator& next, InputIterator end, Token& tok) { typedef tokenizer_detail::assign_or_plus_equal< BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category< InputIterator >::iterator_category > assigner; assigner::clear(tok); // skip past all dropped_delims if (m_empty_tokens == drop_empty_tokens) for (; next != end && is_dropped(*next); ++next) { } InputIterator start(next); if (m_empty_tokens == drop_empty_tokens) { if (next == end) return false; // if we are on a kept_delims move past it and stop if (is_kept(*next)) { assigner::plus_equal(tok,*next); ++next; } else // append all the non delim characters for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next) assigner::plus_equal(tok,*next); } else { // m_empty_tokens == keep_empty_tokens // Handle empty token at the end if (next == end) { if (m_output_done == false) { m_output_done = true; assigner::assign(start,next,tok); return true; } else return false; } if (is_kept(*next)) { if (m_output_done == false) m_output_done = true; else { assigner::plus_equal(tok,*next); ++next; m_output_done = false; } } else if (m_output_done == false && is_dropped(*next)) { m_output_done = true; } else { if (is_dropped(*next)) start=++next; for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next) assigner::plus_equal(tok,*next); m_output_done = true; } } assigner::assign(start,next,tok); return true; } private: string_type m_kept_delims; string_type m_dropped_delims; bool m_use_ispunct; bool m_use_isspace; empty_token_policy m_empty_tokens; bool m_output_done; bool is_kept(Char E) const { if (m_kept_delims.length()) return m_kept_delims.find(E) != string_type::npos; else if (m_use_ispunct) { return Traits::ispunct(E) != 0; } else return false; } bool is_dropped(Char E) const { if (m_dropped_delims.length()) return m_dropped_delims.find(E) != string_type::npos; else if (m_use_isspace) { return Traits::isspace(E) != 0; } else return false; } }; //=========================================================================== // The following class is DEPRECATED, use class char_separators instead. // // The char_delimiters_separator class, which is a model of // TokenizerFunction. char_delimiters_separator breaks a string // into tokens based on character delimiters. There are 2 types of // delimiters. returnable delimiters can be returned as // tokens. These are often punctuation. nonreturnable delimiters // cannot be returned as tokens. These are often whitespace // The out of the box GCC 2.95 on cygwin does not have a char_traits class. template ::traits_type > class char_delimiters_separator { private: typedef tokenizer_detail::traits_extension Traits; typedef std::basic_string string_type; string_type returnable_; string_type nonreturnable_; bool return_delims_; bool no_ispunct_; bool no_isspace_; bool is_ret(Char E)const { if (returnable_.length()) return returnable_.find(E) != string_type::npos; else{ if (no_ispunct_) {return false;} else{ int r = Traits::ispunct(E); return r != 0; } } } bool is_nonret(Char E)const { if (nonreturnable_.length()) return nonreturnable_.find(E) != string_type::npos; else{ if (no_isspace_) {return false;} else{ int r = Traits::isspace(E); return r != 0; } } } public: explicit char_delimiters_separator(bool return_delims = false, const Char* returnable = 0, const Char* nonreturnable = 0) : returnable_(returnable ? returnable : string_type().c_str()), nonreturnable_(nonreturnable ? nonreturnable:string_type().c_str()), return_delims_(return_delims), no_ispunct_(returnable!=0), no_isspace_(nonreturnable!=0) { } void reset() { } public: template bool operator()(InputIterator& next, InputIterator end,Token& tok) { tok = Token(); // skip past all nonreturnable delims // skip past the returnable only if we are not returning delims for (;next!=end && ( is_nonret(*next) || (is_ret(*next) && !return_delims_ ) );++next) { } if (next == end) { return false; } // if we are to return delims and we are one a returnable one // move past it and stop if (is_ret(*next) && return_delims_) { tok+=*next; ++next; } else // append all the non delim characters for (;next!=end && !is_nonret(*next) && !is_ret(*next);++next) tok+=*next; return true; } }; } //namespace boost #endif passenger-4.0.37/ext/boost/token_iterator.hpp000644 000765 000024 00000007236 12233035540 021714 0ustar00honglistaff000000 000000 // Boost token_iterator.hpp -------------------------------------------------// // Copyright John R. Bandela 2001 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/tokenizer for documentation. // Revision History: // 16 Jul 2003 John Bandela // Allowed conversions from convertible base iterators // 03 Jul 2003 John Bandela // Converted to new iterator adapter #ifndef BOOST_TOKENIZER_POLICY_JRB070303_HPP_ #define BOOST_TOKENIZER_POLICY_JRB070303_HPP_ #include #include #include #include #include namespace boost { template class token_iterator : public iterator_facade< token_iterator , Type , typename detail::minimum_category< forward_traversal_tag , typename iterator_traversal::type >::type , const Type& > { friend class iterator_core_access; TokenizerFunc f_; Iterator begin_; Iterator end_; bool valid_; Type tok_; void increment(){ BOOST_ASSERT(valid_); valid_ = f_(begin_,end_,tok_); } const Type& dereference() const { BOOST_ASSERT(valid_); return tok_; } template bool equal(const Other& a) const{ return (a.valid_ && valid_) ?( (a.begin_==begin_) && (a.end_ == end_) ) :(a.valid_==valid_); } void initialize(){ if(valid_) return; f_.reset(); valid_ = (begin_ != end_)? f_(begin_,end_,tok_):false; } public: token_iterator():begin_(),end_(),valid_(false),tok_() { } token_iterator(TokenizerFunc f, Iterator begin, Iterator e = Iterator()) : f_(f),begin_(begin),end_(e),valid_(false),tok_(){ initialize(); } token_iterator(Iterator begin, Iterator e = Iterator()) : f_(),begin_(begin),end_(e),valid_(false),tok_() {initialize();} template token_iterator( token_iterator const& t , typename enable_if_convertible::type* = 0) : f_(t.tokenizer_function()),begin_(t.base()) ,end_(t.end()),valid_(!t.at_end()),tok_(t.current_token()) {} Iterator base()const{return begin_;} Iterator end()const{return end_;}; TokenizerFunc tokenizer_function()const{return f_;} Type current_token()const{return tok_;} bool at_end()const{return !valid_;} }; template < class TokenizerFunc = char_delimiters_separator, class Iterator = std::string::const_iterator, class Type = std::string > class token_iterator_generator { private: public: typedef token_iterator type; }; // Type has to be first because it needs to be explicitly specified // because there is no way the function can deduce it. template typename token_iterator_generator::type make_token_iterator(Iterator begin, Iterator end,const TokenizerFunc& fun){ typedef typename token_iterator_generator::type ret_type; return ret_type(fun,begin,end); } } // namespace boost #endif passenger-4.0.37/ext/boost/tokenizer.hpp000644 000765 000024 00000005337 12233035540 020675 0ustar00honglistaff000000 000000 // Boost tokenizer.hpp -----------------------------------------------------// // (c) Copyright Jeremy Siek and John R. Bandela 2001. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/tokenizer for documenation // Revision History: // 03 Jul 2003 John Bandela // Converted to new iterator adapter // 02 Feb 2002 Jeremy Siek // Removed tabs and a little cleanup. #ifndef BOOST_TOKENIZER_JRB070303_HPP_ #define BOOST_TOKENIZER_JRB070303_HPP_ #include namespace boost { //=========================================================================== // A container-view of a tokenized "sequence" template < typename TokenizerFunc = char_delimiters_separator, typename Iterator = std::string::const_iterator, typename Type = std::string > class tokenizer { private: typedef token_iterator_generator TGen; // It seems that MSVC does not like the unqualified use of iterator, // Thus we use iter internally when it is used unqualified and // the users of this class will always qualify iterator. typedef typename TGen::type iter; public: typedef iter iterator; typedef iter const_iterator; typedef Type value_type; typedef value_type& reference; typedef const value_type& const_reference; typedef value_type* pointer; typedef const pointer const_pointer; typedef void size_type; typedef void difference_type; tokenizer(Iterator first, Iterator last, const TokenizerFunc& f = TokenizerFunc()) : first_(first), last_(last), f_(f) { } template tokenizer(const Container& c) : first_(c.begin()), last_(c.end()), f_() { } template tokenizer(const Container& c,const TokenizerFunc& f) : first_(c.begin()), last_(c.end()), f_(f) { } void assign(Iterator first, Iterator last){ first_ = first; last_ = last; } void assign(Iterator first, Iterator last, const TokenizerFunc& f){ assign(first,last); f_ = f; } template void assign(const Container& c){ assign(c.begin(),c.end()); } template void assign(const Container& c, const TokenizerFunc& f){ assign(c.begin(),c.end(),f); } iter begin() const { return iter(f_,first_,last_); } iter end() const { return iter(f_,last_,last_); } private: Iterator first_; Iterator last_; TokenizerFunc f_; }; } // namespace boost #endif passenger-4.0.37/ext/boost/tuple/000755 000765 000024 00000000000 12233035540 017273 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/type.hpp000644 000765 000024 00000000741 12233035540 017636 0ustar00honglistaff000000 000000 // (C) Copyright David Abrahams 2001. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_TYPE_DWA20010120_HPP # define BOOST_TYPE_DWA20010120_HPP namespace boost { // Just a simple "type envelope". Useful in various contexts, mostly to work // around some MSVC deficiencies. template struct type {}; } #endif // BOOST_TYPE_DWA20010120_HPP passenger-4.0.37/ext/boost/type_traits/000755 000765 000024 00000000000 12233035540 020511 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/typeof/000755 000765 000024 00000000000 12233035540 017450 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/units/000755 000765 000024 00000000000 12233035540 017304 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/unordered/000755 000765 000024 00000000000 12233035540 020131 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/unordered_map.hpp000644 000765 000024 00000001046 12233035540 021500 0ustar00honglistaff000000 000000 // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. // Copyright (C) 2005-2008 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/unordered for documentation #ifndef BOOST_UNORDERED_MAP_HPP_INCLUDED #define BOOST_UNORDERED_MAP_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #endif // BOOST_UNORDERED_MAP_HPP_INCLUDED passenger-4.0.37/ext/boost/unordered_set.hpp000644 000765 000024 00000001046 12233035540 021516 0ustar00honglistaff000000 000000 // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. // Copyright (C) 2005-2008 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/unordered for documentation #ifndef BOOST_UNORDERED_SET_HPP_INCLUDED #define BOOST_UNORDERED_SET_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #endif // BOOST_UNORDERED_SET_HPP_INCLUDED passenger-4.0.37/ext/boost/utility/000755 000765 000024 00000000000 12233035540 017645 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/version.hpp000644 000765 000024 00000002141 12233035540 020336 0ustar00honglistaff000000 000000 // Boost version.hpp configuration header file ------------------------------// // (C) Copyright John maddock 1999. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for documentation #ifndef BOOST_VERSION_HPP #define BOOST_VERSION_HPP // // Caution, this is the only boost header that is guarenteed // to change with every boost release, including this header // will cause a recompile every time a new boost version is // released. // // BOOST_VERSION % 100 is the patch level // BOOST_VERSION / 100 % 1000 is the minor version // BOOST_VERSION / 100000 is the major version #define BOOST_VERSION 105400 // // BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION // but as a *string* in the form "x_y[_z]" where x is the major version // number, y is the minor version number, and z is the patch level if not 0. // This is used by to select which library version to link to. #define BOOST_LIB_VERSION "1_54" #endif passenger-4.0.37/ext/boost/visit_each.hpp000644 000765 000024 00000001317 12233035540 020773 0ustar00honglistaff000000 000000 // Boost.Signals library // Copyright Douglas Gregor 2001-2003. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org/libs/signals #ifndef BOOST_VISIT_EACH_HPP #define BOOST_VISIT_EACH_HPP #include namespace boost { template inline void visit_each(Visitor& visitor, const T& t, long) { visitor(t); } template inline void visit_each(Visitor& visitor, const T& t) { visit_each(visitor, t, 0); } } #endif // BOOST_VISIT_EACH_HPP passenger-4.0.37/ext/boost/weak_ptr.hpp000644 000765 000024 00000000732 12233035540 020471 0ustar00honglistaff000000 000000 #ifndef BOOST_WEAK_PTR_HPP_INCLUDED #define BOOST_WEAK_PTR_HPP_INCLUDED // // weak_ptr.hpp // // Copyright (c) 2001, 2002, 2003 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // See http://www.boost.org/libs/smart_ptr/weak_ptr.htm for documentation. // #include #endif // #ifndef BOOST_WEAK_PTR_HPP_INCLUDED passenger-4.0.37/ext/boost/utility/addressof.hpp000644 000765 000024 00000004277 12233035540 022342 0ustar00honglistaff000000 000000 // Copyright (C) 2002 Brad King (brad.king@kitware.com) // Douglas Gregor (gregod@cs.rpi.edu) // // Copyright (C) 2002, 2008 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org #ifndef BOOST_UTILITY_ADDRESSOF_HPP # define BOOST_UTILITY_ADDRESSOF_HPP # include # include namespace boost { namespace detail { template struct addr_impl_ref { T & v_; inline addr_impl_ref( T & v ): v_( v ) {} inline operator T& () const { return v_; } private: addr_impl_ref & operator=(const addr_impl_ref &); }; template struct addressof_impl { static inline T * f( T & v, long ) { return reinterpret_cast( &const_cast(reinterpret_cast(v))); } static inline T * f( T * v, int ) { return v; } }; } // namespace detail template T * addressof( T & v ) { #if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || defined( __SUNPRO_CC ) return boost::detail::addressof_impl::f( v, 0 ); #else return boost::detail::addressof_impl::f( boost::detail::addr_impl_ref( v ), 0 ); #endif } #if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) ) namespace detail { template struct addressof_addp { typedef T * type; }; } // namespace detail template< class T, std::size_t N > typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] ) { return &t; } #endif // Borland doesn't like casting an array reference to a char reference // but these overloads work around the problem. #if defined( __BORLANDC__ ) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template T (*addressof(T (&t)[N]))[N] { return reinterpret_cast(&t); } template const T (*addressof(const T (&t)[N]))[N] { return reinterpret_cast(&t); } #endif } // namespace boost #endif // BOOST_UTILITY_ADDRESSOF_HPP passenger-4.0.37/ext/boost/utility/compare_pointees.hpp000644 000765 000024 00000004164 12233035540 023717 0ustar00honglistaff000000 000000 // Copyright (C) 2003, Fernando Luis Cacciola Carballal. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/optional for documentation. // // You are welcome to contact the author at: // fernando_cacciola@hotmail.com // #ifndef BOOST_UTILITY_COMPARE_POINTEES_25AGO2003_HPP #define BOOST_UTILITY_COMPARE_POINTEES_25AGO2003_HPP #include namespace boost { // template bool equal_pointees(OP const& x, OP const& y); // template struct equal_pointees_t; // // Being OP a model of OptionalPointee (either a pointer or an optional): // // If both x and y have valid pointees, returns the result of (*x == *y) // If only one has a valid pointee, returns false. // If none have valid pointees, returns true. // No-throw template inline bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y ) { return (!x) != (!y) ? false : ( !x ? true : (*x) == (*y) ) ; } template struct equal_pointees_t : std::binary_function { bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const { return equal_pointees(x,y) ; } } ; // template bool less_pointees(OP const& x, OP const& y); // template struct less_pointees_t; // // Being OP a model of OptionalPointee (either a pointer or an optional): // // If y has not a valid pointee, returns false. // ElseIf x has not a valid pointee, returns true. // ElseIf both x and y have valid pointees, returns the result of (*x < *y) // No-throw template inline bool less_pointees ( OptionalPointee const& x, OptionalPointee const& y ) { return !y ? false : ( !x ? true : (*x) < (*y) ) ; } template struct less_pointees_t : std::binary_function { bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const { return less_pointees(x,y) ; } } ; } // namespace boost #endif passenger-4.0.37/ext/boost/utility/declval.hpp000644 000765 000024 00000004062 12233035540 021772 0ustar00honglistaff000000 000000 // common_type.hpp ---------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP #define BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP #include //----------------------------------------------------------------------------// #include //#include //----------------------------------------------------------------------------// // // // C++03 implementation of // // Written by Vicente J. Botet Escriba // //~ 20.3.4 Function template declval [declval] //~ 1 The library provides the function template declval to simplify the definition of expressions which occur as //~ unevaluated operands. //~ 2 Remarks: If this function is used, the program is ill-formed. //~ 3 Remarks: The template parameter T of declval may be an incomplete type. //~ [ Example: //~ template //~ decltype(static_cast(declval())) convert(From&&); //~ declares a function template convert which only participats in overloading if the type From can be //~ explicitly converted to type To. For another example see class template common_type (20.7.6.6). —end //~ example ] // // //----------------------------------------------------------------------------// namespace boost { //#if !defined(BOOST_NO_RVALUE_REFERENCES) template typename add_rvalue_reference::type declval() BOOST_NOEXCEPT; // as unevaluated operand //#else // template // typename add_lvalue_reference::type declval() BOOST_NOEXCEPT; // as unevaluated operand //#endif } // namespace boost #endif // BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP passenger-4.0.37/ext/boost/utility/detail/000755 000765 000024 00000000000 12233035540 021107 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/utility/enable_if.hpp000644 000765 000024 00000006036 12233035540 022267 0ustar00honglistaff000000 000000 // Boost enable_if library // Copyright 2003 (c) The Trustees of Indiana University. // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Jaakko Jarvi (jajarvi at osl.iu.edu) // Jeremiah Willcock (jewillco at osl.iu.edu) // Andrew Lumsdaine (lums at osl.iu.edu) #ifndef BOOST_UTILITY_ENABLE_IF_HPP #define BOOST_UTILITY_ENABLE_IF_HPP #include "boost/config.hpp" // Even the definition of enable_if causes problems on some compilers, // so it's macroed out for all compilers that do not support SFINAE #ifndef BOOST_NO_SFINAE namespace boost { template struct enable_if_c { typedef T type; }; template struct enable_if_c {}; template struct enable_if : public enable_if_c {}; template struct lazy_enable_if_c { typedef typename T::type type; }; template struct lazy_enable_if_c {}; template struct lazy_enable_if : public lazy_enable_if_c {}; template struct disable_if_c { typedef T type; }; template struct disable_if_c {}; template struct disable_if : public disable_if_c {}; template struct lazy_disable_if_c { typedef typename T::type type; }; template struct lazy_disable_if_c {}; template struct lazy_disable_if : public lazy_disable_if_c {}; } // namespace boost #else namespace boost { namespace detail { typedef void enable_if_default_T; } template struct enable_if_does_not_work_on_this_compiler; template struct enable_if_c : enable_if_does_not_work_on_this_compiler { }; template struct disable_if_c : enable_if_does_not_work_on_this_compiler { }; template struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler { }; template struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler { }; template struct enable_if : enable_if_does_not_work_on_this_compiler { }; template struct disable_if : enable_if_does_not_work_on_this_compiler { }; template struct lazy_enable_if : enable_if_does_not_work_on_this_compiler { }; template struct lazy_disable_if : enable_if_does_not_work_on_this_compiler { }; } // namespace boost #endif // BOOST_NO_SFINAE #endif passenger-4.0.37/ext/boost/utility/in_place_factory.hpp000644 000765 000024 00000004332 12233035540 023661 0ustar00honglistaff000000 000000 // Copyright (C) 2003, Fernando Luis Cacciola Carballal. // Copyright (C) 2007, Tobias Schwinger. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/optional for documentation. // // You are welcome to contact the author at: // fernando_cacciola@hotmail.com // #ifndef BOOST_UTILITY_INPLACE_FACTORY_04APR2007_HPP #ifndef BOOST_PP_IS_ITERATING #include namespace boost { class in_place_factory_base {} ; #define BOOST_PP_ITERATION_LIMITS (0, BOOST_MAX_INPLACE_FACTORY_ARITY) #define BOOST_PP_FILENAME_1 #include BOOST_PP_ITERATE() } // namespace boost #include #define BOOST_UTILITY_INPLACE_FACTORY_04APR2007_HPP #else #define N BOOST_PP_ITERATION() #if N template< BOOST_PP_ENUM_PARAMS(N, class A) > #endif class BOOST_PP_CAT(in_place_factory,N) : public in_place_factory_base { public: explicit BOOST_PP_CAT(in_place_factory,N) ( BOOST_PP_ENUM_BINARY_PARAMS(N,A,const& a) ) #if N > 0 : BOOST_PP_ENUM(N, BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_INIT, _) #endif {} template void* apply(void* address BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) const { return new(address) T( BOOST_PP_ENUM_PARAMS(N, m_a) ); } template void* apply(void* address, std::size_t n BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) const { for(char* next = address = this->BOOST_NESTED_TEMPLATE apply(address); !! --n;) this->BOOST_NESTED_TEMPLATE apply(next = next+sizeof(T)); return address; } BOOST_PP_REPEAT(N, BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_DECL, _) }; #if N > 0 template< BOOST_PP_ENUM_PARAMS(N, class A) > inline BOOST_PP_CAT(in_place_factory,N)< BOOST_PP_ENUM_PARAMS(N, A) > in_place( BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& a) ) { return BOOST_PP_CAT(in_place_factory,N)< BOOST_PP_ENUM_PARAMS(N, A) > ( BOOST_PP_ENUM_PARAMS(N, a) ); } #else inline in_place_factory0 in_place() { return in_place_factory0(); } #endif #undef N #endif #endif passenger-4.0.37/ext/boost/utility/result_of.hpp000644 000765 000024 00000013344 12233035540 022365 0ustar00honglistaff000000 000000 // Boost result_of library // Copyright Douglas Gregor 2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org/libs/utility #ifndef BOOST_RESULT_OF_HPP #define BOOST_RESULT_OF_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef BOOST_RESULT_OF_NUM_ARGS # define BOOST_RESULT_OF_NUM_ARGS 16 #endif // Use the decltype-based version of result_of by default if the compiler // supports N3276 . // The user can force the choice by defining either BOOST_RESULT_OF_USE_DECLTYPE or // BOOST_RESULT_OF_USE_TR1, but not both! #if defined(BOOST_RESULT_OF_USE_DECLTYPE) && defined(BOOST_RESULT_OF_USE_TR1) # error Both BOOST_RESULT_OF_USE_DECLTYPE and BOOST_RESULT_OF_USE_TR1 cannot be defined at the same time. #endif #ifndef BOOST_RESULT_OF_USE_TR1 # ifndef BOOST_RESULT_OF_USE_DECLTYPE # ifndef BOOST_NO_CXX11_DECLTYPE_N3276 // this implies !defined(BOOST_NO_CXX11_DECLTYPE) # define BOOST_RESULT_OF_USE_DECLTYPE # else # define BOOST_RESULT_OF_USE_TR1 # endif # endif #endif namespace boost { template struct result_of; template struct tr1_result_of; // a TR1-style implementation of result_of #if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace detail { BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type) template struct tr1_result_of_impl; #ifdef BOOST_NO_SFINAE_EXPR // There doesn't seem to be any other way to turn this off such that the presence of // the user-defined operator,() below doesn't cause spurious warning all over the place, // so unconditionally turn it off. #if BOOST_MSVC # pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used #endif struct result_of_private_type {}; struct result_of_weird_type { friend result_of_private_type operator,(result_of_private_type, result_of_weird_type); }; typedef char result_of_yes_type; // sizeof(result_of_yes_type) == 1 typedef char (&result_of_no_type)[2]; // sizeof(result_of_no_type) == 2 template result_of_no_type result_of_is_private_type(T const &); result_of_yes_type result_of_is_private_type(result_of_private_type); template struct result_of_callable_class : C { result_of_callable_class(); typedef result_of_private_type const &(*pfn_t)(...); operator pfn_t() const volatile; }; template struct result_of_wrap_callable_class { typedef result_of_callable_class type; }; template struct result_of_wrap_callable_class { typedef result_of_callable_class const type; }; template struct result_of_wrap_callable_class { typedef result_of_callable_class volatile type; }; template struct result_of_wrap_callable_class { typedef result_of_callable_class const volatile type; }; template struct result_of_wrap_callable_class { typedef typename result_of_wrap_callable_class::type &type; }; template struct cpp0x_result_of_impl; #else // BOOST_NO_SFINAE_EXPR template struct result_of_always_void { typedef void type; }; template struct cpp0x_result_of_impl {}; #endif // BOOST_NO_SFINAE_EXPR template struct result_of_void_impl { typedef void type; }; template struct result_of_void_impl { typedef R type; }; template struct result_of_void_impl { typedef R type; }; // Determine the return type of a function pointer or pointer to member. template struct result_of_pointer : tr1_result_of_impl::type, FArgs, false> { }; template struct tr1_result_of_impl { typedef typename F::result_type type; }; template struct is_function_with_no_args : mpl::false_ {}; template struct is_function_with_no_args : mpl::true_ {}; template struct result_of_nested_result : F::template result {}; template struct tr1_result_of_impl : mpl::if_, result_of_void_impl, result_of_nested_result >::type {}; } // end namespace detail #define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_RESULT_OF_NUM_ARGS,)) #include BOOST_PP_ITERATE() #else # define BOOST_NO_RESULT_OF 1 #endif } #endif // BOOST_RESULT_OF_HPP passenger-4.0.37/ext/boost/utility/swap.hpp000644 000765 000024 00000003071 12233035540 021331 0ustar00honglistaff000000 000000 // Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org #ifndef BOOST_UTILITY_SWAP_HPP #define BOOST_UTILITY_SWAP_HPP // Note: the implementation of this utility contains various workarounds: // - swap_impl is put outside the boost namespace, to avoid infinite // recursion (causing stack overflow) when swapping objects of a primitive // type. // - swap_impl has a using-directive, rather than a using-declaration, // because some compilers (including MSVC 7.1, Borland 5.9.3, and // Intel 8.1) don't do argument-dependent lookup when it has a // using-declaration instead. // - boost::swap has two template arguments, instead of one, to // avoid ambiguity when swapping objects of a Boost type that does // not have its own boost::swap overload. #include //for std::swap #include //for std::size_t namespace boost_swap_impl { template void swap_impl(T& left, T& right) { using namespace std;//use std::swap if argument dependent lookup fails swap(left,right); } template void swap_impl(T (& left)[N], T (& right)[N]) { for (std::size_t i = 0; i < N; ++i) { ::boost_swap_impl::swap_impl(left[i], right[i]); } } } namespace boost { template void swap(T1& left, T2& right) { ::boost_swap_impl::swap_impl(left, right); } } #endif passenger-4.0.37/ext/boost/utility/detail/in_place_factory_prefix.hpp000644 000765 000024 00000002624 12233035540 026502 0ustar00honglistaff000000 000000 // Copyright (C) 2003, Fernando Luis Cacciola Carballal. // Copyright (C) 2007, Tobias Schwinger. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/optional for documentation. // // You are welcome to contact the author at: // fernando_cacciola@hotmail.com // #ifndef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_PREFIX_04APR2007_HPP #define BOOST_UTILITY_DETAIL_INPLACE_FACTORY_PREFIX_04APR2007_HPP #include #include #include #include #include #include #include #include #include #include #include #define BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_INIT(z,n,_) BOOST_PP_CAT(m_a,n) BOOST_PP_LPAREN() BOOST_PP_CAT(a,n) BOOST_PP_RPAREN() #define BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_DECL(z,n,_) BOOST_PP_CAT(A,n) const& BOOST_PP_CAT(m_a,n); #define BOOST_MAX_INPLACE_FACTORY_ARITY 10 #undef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_SUFFIX_04APR2007_HPP #endif passenger-4.0.37/ext/boost/utility/detail/in_place_factory_suffix.hpp000644 000765 000024 00000001431 12233035540 026504 0ustar00honglistaff000000 000000 // Copyright (C) 2003, Fernando Luis Cacciola Carballal. // Copyright (C) 2007, Tobias Schwinger. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/optional for documentation. // // You are welcome to contact the author at: // fernando_cacciola@hotmail.com // #ifndef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_SUFFIX_04APR2007_HPP #define BOOST_UTILITY_DETAIL_INPLACE_FACTORY_SUFFIX_04APR2007_HPP #undef BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_INIT #undef BOOST_DEFINE_INPLACE_FACTORY_CLASS_MEMBER_DECL #undef BOOST_MAX_INPLACE_FACTORY_ARITY #undef BOOST_UTILITY_DETAIL_INPLACE_FACTORY_PREFIX_04APR2007_HPP #endif passenger-4.0.37/ext/boost/utility/detail/result_of_iterate.hpp000644 000765 000024 00000016776 12233035540 025360 0ustar00honglistaff000000 000000 // Boost result_of library // Copyright Douglas Gregor 2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Copyright Daniel Walker, Eric Niebler, Michel Morin 2008-2012. // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or // copy at http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org/libs/utility #if !defined(BOOST_PP_IS_ITERATING) # error Boost result_of - do not include this file! #endif // CWPro8 requires an argument in a function type specialization #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3002)) && BOOST_PP_ITERATION() == 0 # define BOOST_RESULT_OF_ARGS void #else # define BOOST_RESULT_OF_ARGS BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T) #endif #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type(BOOST_RESULT_OF_ARGS), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F(BOOST_RESULT_OF_ARGS), (boost::detail::has_result_type::value)> >::type { }; #endif #ifdef BOOST_RESULT_OF_USE_DECLTYPE // Uses declval following N3225 20.7.7.6 when F is not a pointer. template struct result_of : mpl::if_< is_member_function_pointer , detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), false > , detail::cpp0x_result_of_impl< F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)) > >::type {}; namespace detail { #ifdef BOOST_NO_SFINAE_EXPR template struct BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()); template struct BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()) { R operator()(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), T)) const; typedef result_of_private_type const &(*pfn_t)(...); operator pfn_t() const volatile; }; template struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION()); template struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION()) : BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()) {}; template struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION()) : BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()) {}; template struct BOOST_PP_CAT(result_of_select_call_wrapper_type_, BOOST_PP_ITERATION()) : mpl::eval_if< is_class::type>, result_of_wrap_callable_class, mpl::identity::type> > > {}; template struct BOOST_PP_CAT(result_of_is_callable_, BOOST_PP_ITERATION()) { typedef typename BOOST_PP_CAT(result_of_select_call_wrapper_type_, BOOST_PP_ITERATION())::type wrapper_t; static const bool value = ( sizeof(result_of_no_type) == sizeof(detail::result_of_is_private_type( (boost::declval()(BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval() BOOST_PP_INTERCEPT)), result_of_weird_type()) )) ); typedef mpl::bool_ type; }; template struct cpp0x_result_of_impl : lazy_enable_if< BOOST_PP_CAT(result_of_is_callable_, BOOST_PP_ITERATION()) , cpp0x_result_of_impl > {}; template struct cpp0x_result_of_impl { typedef decltype( boost::declval()( BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval() BOOST_PP_INTERCEPT) ) ) type; }; #else // BOOST_NO_SFINAE_EXPR template struct cpp0x_result_of_impl()( BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval() BOOST_PP_INTERCEPT) ) )>::type> { typedef decltype( boost::declval()( BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval() BOOST_PP_INTERCEPT) ) ) type; }; #endif // BOOST_NO_SFINAE_EXPR } // namespace detail #else // defined(BOOST_RESULT_OF_USE_DECLTYPE) #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) template struct result_of : tr1_result_of { }; #endif #endif // defined(BOOST_RESULT_OF_USE_DECLTYPE) #undef BOOST_RESULT_OF_ARGS #if BOOST_PP_ITERATION() >= 1 namespace detail { template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; #endif } #endif passenger-4.0.37/ext/boost/unordered/detail/000755 000765 000024 00000000000 12233035540 021373 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/unordered/unordered_map.hpp000644 000765 000024 00000144142 12233035540 023474 0ustar00honglistaff000000 000000 // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. // Copyright (C) 2005-2011 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/unordered for documentation #ifndef BOOST_UNORDERED_UNORDERED_MAP_HPP_INCLUDED #define BOOST_UNORDERED_UNORDERED_MAP_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include #include #include #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #include #endif #if defined(BOOST_MSVC) #pragma warning(push) #if BOOST_MSVC >= 1400 #pragma warning(disable:4396) //the inline specifier cannot be used when a // friend declaration refers to a specialization // of a function template #endif #endif namespace boost { namespace unordered { template class unordered_map { #if defined(BOOST_UNORDERED_USE_MOVE) BOOST_COPYABLE_AND_MOVABLE(unordered_map) #endif public: typedef K key_type; typedef std::pair value_type; typedef T mapped_type; typedef H hasher; typedef P key_equal; typedef A allocator_type; private: typedef boost::unordered::detail::map types; typedef typename types::traits allocator_traits; typedef typename types::table table; public: typedef typename allocator_traits::pointer pointer; typedef typename allocator_traits::const_pointer const_pointer; typedef value_type& reference; typedef value_type const& const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef typename table::cl_iterator const_local_iterator; typedef typename table::l_iterator local_iterator; typedef typename table::c_iterator const_iterator; typedef typename table::iterator iterator; private: table table_; public: // constructors explicit unordered_map( size_type = boost::unordered::detail::default_bucket_count, const hasher& = hasher(), const key_equal& = key_equal(), const allocator_type& = allocator_type()); explicit unordered_map(allocator_type const&); template unordered_map(InputIt, InputIt); template unordered_map( InputIt, InputIt, size_type, const hasher& = hasher(), const key_equal& = key_equal()); template unordered_map( InputIt, InputIt, size_type, const hasher&, const key_equal&, const allocator_type&); // copy/move constructors unordered_map(unordered_map const&); unordered_map(unordered_map const&, allocator_type const&); #if defined(BOOST_UNORDERED_USE_MOVE) unordered_map(BOOST_RV_REF(unordered_map) other) : table_(other.table_, boost::unordered::detail::move_tag()) { } #elif !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) unordered_map(unordered_map&& other) : table_(other.table_, boost::unordered::detail::move_tag()) { } #endif #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) unordered_map(unordered_map&&, allocator_type const&); #endif #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) unordered_map( std::initializer_list, size_type = boost::unordered::detail::default_bucket_count, const hasher& = hasher(), const key_equal&l = key_equal(), const allocator_type& = allocator_type()); #endif // Destructor ~unordered_map(); // Assign #if defined(BOOST_UNORDERED_USE_MOVE) unordered_map& operator=(BOOST_COPY_ASSIGN_REF(unordered_map) x) { table_.assign(x.table_); return *this; } unordered_map& operator=(BOOST_RV_REF(unordered_map) x) { table_.move_assign(x.table_); return *this; } #else unordered_map& operator=(unordered_map const& x) { table_.assign(x.table_); return *this; } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) unordered_map& operator=(unordered_map&& x) { table_.move_assign(x.table_); return *this; } #endif #endif #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) unordered_map& operator=(std::initializer_list); #endif allocator_type get_allocator() const BOOST_NOEXCEPT { return table_.node_alloc(); } // size and capacity bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; } size_type size() const BOOST_NOEXCEPT { return table_.size_; } size_type max_size() const BOOST_NOEXCEPT; // iterators iterator begin() BOOST_NOEXCEPT { return table_.begin(); } const_iterator begin() const BOOST_NOEXCEPT { return table_.begin(); } iterator end() BOOST_NOEXCEPT { return iterator(); } const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); } const_iterator cbegin() const BOOST_NOEXCEPT { return table_.begin(); } const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); } // emplace #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template std::pair emplace(BOOST_FWD_REF(Args)... args) { return table_.emplace(boost::forward(args)...); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(Args)... args) { return table_.emplace(boost::forward(args)...).first; } #else #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) // 0 argument emplace requires special treatment in case // the container is instantiated with a value type that // doesn't have a default constructor. std::pair emplace( boost::unordered::detail::empty_emplace = boost::unordered::detail::empty_emplace(), value_type v = value_type()) { return this->emplace(boost::move(v)); } iterator emplace_hint(const_iterator hint, boost::unordered::detail::empty_emplace = boost::unordered::detail::empty_emplace(), value_type v = value_type() ) { return this->emplace_hint(hint, boost::move(v)); } #endif template std::pair emplace(BOOST_FWD_REF(A0) a0) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0)) ); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0)) ).first; } template std::pair emplace( BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1)) ); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1)) ).first; } template std::pair emplace( BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1), boost::forward(a2)) ); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1), boost::forward(a2)) ).first; } #define BOOST_UNORDERED_EMPLACE(z, n, _) \ template < \ BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \ > \ std::pair emplace( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \ ) \ { \ return table_.emplace( \ boost::unordered::detail::create_emplace_args( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \ a) \ )); \ } \ \ template < \ BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \ > \ iterator emplace_hint( \ const_iterator, \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \ ) \ { \ return table_.emplace( \ boost::unordered::detail::create_emplace_args( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \ a) \ )).first; \ } BOOST_PP_REPEAT_FROM_TO(4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _) #undef BOOST_UNORDERED_EMPLACE #endif std::pair insert(value_type const& x) { return this->emplace(x); } std::pair insert(BOOST_RV_REF(value_type) x) { return this->emplace(boost::move(x)); } iterator insert(const_iterator hint, value_type const& x) { return this->emplace_hint(hint, x); } iterator insert(const_iterator hint, BOOST_RV_REF(value_type) x) { return this->emplace_hint(hint, boost::move(x)); } template void insert(InputIt, InputIt); #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) void insert(std::initializer_list); #endif iterator erase(const_iterator); size_type erase(const key_type&); iterator erase(const_iterator, const_iterator); void quick_erase(const_iterator it) { erase(it); } void erase_return_void(const_iterator it) { erase(it); } void clear(); void swap(unordered_map&); // observers hasher hash_function() const; key_equal key_eq() const; mapped_type& operator[](const key_type&); mapped_type& at(const key_type&); mapped_type const& at(const key_type&) const; // lookup iterator find(const key_type&); const_iterator find(const key_type&) const; template iterator find( CompatibleKey const&, CompatibleHash const&, CompatiblePredicate const&); template const_iterator find( CompatibleKey const&, CompatibleHash const&, CompatiblePredicate const&) const; size_type count(const key_type&) const; std::pair equal_range(const key_type&); std::pair equal_range(const key_type&) const; // bucket interface size_type bucket_count() const BOOST_NOEXCEPT { return table_.bucket_count_; } size_type max_bucket_count() const BOOST_NOEXCEPT { return table_.max_bucket_count(); } size_type bucket_size(size_type) const; size_type bucket(const key_type& k) const { return table_.hash_to_bucket(table_.hash(k)); } local_iterator begin(size_type n) { return local_iterator( table_.begin(n), n, table_.bucket_count_); } const_local_iterator begin(size_type n) const { return const_local_iterator( table_.begin(n), n, table_.bucket_count_); } local_iterator end(size_type) { return local_iterator(); } const_local_iterator end(size_type) const { return const_local_iterator(); } const_local_iterator cbegin(size_type n) const { return const_local_iterator( table_.begin(n), n, table_.bucket_count_); } const_local_iterator cend(size_type) const { return const_local_iterator(); } // hash policy float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; } float load_factor() const BOOST_NOEXCEPT; void max_load_factor(float) BOOST_NOEXCEPT; void rehash(size_type); void reserve(size_type); #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) friend bool operator==( unordered_map const&, unordered_map const&); friend bool operator!=( unordered_map const&, unordered_map const&); #endif }; // class template unordered_map template class unordered_multimap { #if defined(BOOST_UNORDERED_USE_MOVE) BOOST_COPYABLE_AND_MOVABLE(unordered_multimap) #endif public: typedef K key_type; typedef std::pair value_type; typedef T mapped_type; typedef H hasher; typedef P key_equal; typedef A allocator_type; private: typedef boost::unordered::detail::multimap types; typedef typename types::traits allocator_traits; typedef typename types::table table; public: typedef typename allocator_traits::pointer pointer; typedef typename allocator_traits::const_pointer const_pointer; typedef value_type& reference; typedef value_type const& const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef typename table::cl_iterator const_local_iterator; typedef typename table::l_iterator local_iterator; typedef typename table::c_iterator const_iterator; typedef typename table::iterator iterator; private: table table_; public: // constructors explicit unordered_multimap( size_type = boost::unordered::detail::default_bucket_count, const hasher& = hasher(), const key_equal& = key_equal(), const allocator_type& = allocator_type()); explicit unordered_multimap(allocator_type const&); template unordered_multimap(InputIt, InputIt); template unordered_multimap( InputIt, InputIt, size_type, const hasher& = hasher(), const key_equal& = key_equal()); template unordered_multimap( InputIt, InputIt, size_type, const hasher&, const key_equal&, const allocator_type&); // copy/move constructors unordered_multimap(unordered_multimap const&); unordered_multimap(unordered_multimap const&, allocator_type const&); #if defined(BOOST_UNORDERED_USE_MOVE) unordered_multimap(BOOST_RV_REF(unordered_multimap) other) : table_(other.table_, boost::unordered::detail::move_tag()) { } #elif !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) unordered_multimap(unordered_multimap&& other) : table_(other.table_, boost::unordered::detail::move_tag()) { } #endif #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) unordered_multimap(unordered_multimap&&, allocator_type const&); #endif #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) unordered_multimap( std::initializer_list, size_type = boost::unordered::detail::default_bucket_count, const hasher& = hasher(), const key_equal&l = key_equal(), const allocator_type& = allocator_type()); #endif // Destructor ~unordered_multimap(); // Assign #if defined(BOOST_UNORDERED_USE_MOVE) unordered_multimap& operator=( BOOST_COPY_ASSIGN_REF(unordered_multimap) x) { table_.assign(x.table_); return *this; } unordered_multimap& operator=(BOOST_RV_REF(unordered_multimap) x) { table_.move_assign(x.table_); return *this; } #else unordered_multimap& operator=(unordered_multimap const& x) { table_.assign(x.table_); return *this; } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) unordered_multimap& operator=(unordered_multimap&& x) { table_.move_assign(x.table_); return *this; } #endif #endif #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) unordered_multimap& operator=(std::initializer_list); #endif allocator_type get_allocator() const BOOST_NOEXCEPT { return table_.node_alloc(); } // size and capacity bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; } size_type size() const BOOST_NOEXCEPT { return table_.size_; } size_type max_size() const BOOST_NOEXCEPT; // iterators iterator begin() BOOST_NOEXCEPT { return table_.begin(); } const_iterator begin() const BOOST_NOEXCEPT { return table_.begin(); } iterator end() BOOST_NOEXCEPT { return iterator(); } const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); } const_iterator cbegin() const BOOST_NOEXCEPT { return table_.begin(); } const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); } // emplace #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template iterator emplace(BOOST_FWD_REF(Args)... args) { return table_.emplace(boost::forward(args)...); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(Args)... args) { return table_.emplace(boost::forward(args)...); } #else #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) // 0 argument emplace requires special treatment in case // the container is instantiated with a value type that // doesn't have a default constructor. iterator emplace( boost::unordered::detail::empty_emplace = boost::unordered::detail::empty_emplace(), value_type v = value_type()) { return this->emplace(boost::move(v)); } iterator emplace_hint(const_iterator hint, boost::unordered::detail::empty_emplace = boost::unordered::detail::empty_emplace(), value_type v = value_type() ) { return this->emplace_hint(hint, boost::move(v)); } #endif template iterator emplace(BOOST_FWD_REF(A0) a0) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0)) ); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0)) ); } template iterator emplace( BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1)) ); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1)) ); } template iterator emplace( BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1), boost::forward(a2)) ); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1), boost::forward(a2)) ); } #define BOOST_UNORDERED_EMPLACE(z, n, _) \ template < \ BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \ > \ iterator emplace( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \ ) \ { \ return table_.emplace( \ boost::unordered::detail::create_emplace_args( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \ a) \ )); \ } \ \ template < \ BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \ > \ iterator emplace_hint( \ const_iterator, \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \ ) \ { \ return table_.emplace( \ boost::unordered::detail::create_emplace_args( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \ a) \ )); \ } BOOST_PP_REPEAT_FROM_TO(4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _) #undef BOOST_UNORDERED_EMPLACE #endif iterator insert(value_type const& x) { return this->emplace(x); } iterator insert(BOOST_RV_REF(value_type) x) { return this->emplace(boost::move(x)); } iterator insert(const_iterator hint, value_type const& x) { return this->emplace_hint(hint, x); } iterator insert(const_iterator hint, BOOST_RV_REF(value_type) x) { return this->emplace_hint(hint, boost::move(x)); } template void insert(InputIt, InputIt); #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) void insert(std::initializer_list); #endif iterator erase(const_iterator); size_type erase(const key_type&); iterator erase(const_iterator, const_iterator); void quick_erase(const_iterator it) { erase(it); } void erase_return_void(const_iterator it) { erase(it); } void clear(); void swap(unordered_multimap&); // observers hasher hash_function() const; key_equal key_eq() const; // lookup iterator find(const key_type&); const_iterator find(const key_type&) const; template iterator find( CompatibleKey const&, CompatibleHash const&, CompatiblePredicate const&); template const_iterator find( CompatibleKey const&, CompatibleHash const&, CompatiblePredicate const&) const; size_type count(const key_type&) const; std::pair equal_range(const key_type&); std::pair equal_range(const key_type&) const; // bucket interface size_type bucket_count() const BOOST_NOEXCEPT { return table_.bucket_count_; } size_type max_bucket_count() const BOOST_NOEXCEPT { return table_.max_bucket_count(); } size_type bucket_size(size_type) const; size_type bucket(const key_type& k) const { return table_.hash_to_bucket(table_.hash(k)); } local_iterator begin(size_type n) { return local_iterator( table_.begin(n), n, table_.bucket_count_); } const_local_iterator begin(size_type n) const { return const_local_iterator( table_.begin(n), n, table_.bucket_count_); } local_iterator end(size_type) { return local_iterator(); } const_local_iterator end(size_type) const { return const_local_iterator(); } const_local_iterator cbegin(size_type n) const { return const_local_iterator( table_.begin(n), n, table_.bucket_count_); } const_local_iterator cend(size_type) const { return const_local_iterator(); } // hash policy float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; } float load_factor() const BOOST_NOEXCEPT; void max_load_factor(float) BOOST_NOEXCEPT; void rehash(size_type); void reserve(size_type); #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) friend bool operator==( unordered_multimap const&, unordered_multimap const&); friend bool operator!=( unordered_multimap const&, unordered_multimap const&); #endif }; // class template unordered_multimap //////////////////////////////////////////////////////////////////////////////// template unordered_map::unordered_map( size_type n, const hasher &hf, const key_equal &eql, const allocator_type &a) : table_(n, hf, eql, a) { } template unordered_map::unordered_map(allocator_type const& a) : table_(boost::unordered::detail::default_bucket_count, hasher(), key_equal(), a) { } template unordered_map::unordered_map( unordered_map const& other, allocator_type const& a) : table_(other.table_, a) { } template template unordered_map::unordered_map(InputIt f, InputIt l) : table_(boost::unordered::detail::initial_size(f, l), hasher(), key_equal(), allocator_type()) { table_.insert_range(f, l); } template template unordered_map::unordered_map( InputIt f, InputIt l, size_type n, const hasher &hf, const key_equal &eql) : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, allocator_type()) { table_.insert_range(f, l); } template template unordered_map::unordered_map( InputIt f, InputIt l, size_type n, const hasher &hf, const key_equal &eql, const allocator_type &a) : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a) { table_.insert_range(f, l); } template unordered_map::~unordered_map() {} template unordered_map::unordered_map( unordered_map const& other) : table_(other.table_) { } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template unordered_map::unordered_map( unordered_map&& other, allocator_type const& a) : table_(other.table_, a, boost::unordered::detail::move_tag()) { } #endif #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template unordered_map::unordered_map( std::initializer_list list, size_type n, const hasher &hf, const key_equal &eql, const allocator_type &a) : table_( boost::unordered::detail::initial_size( list.begin(), list.end(), n), hf, eql, a) { table_.insert_range(list.begin(), list.end()); } template unordered_map& unordered_map::operator=( std::initializer_list list) { table_.clear(); table_.insert_range(list.begin(), list.end()); return *this; } #endif // size and capacity template std::size_t unordered_map::max_size() const BOOST_NOEXCEPT { return table_.max_size(); } // modifiers template template void unordered_map::insert(InputIt first, InputIt last) { table_.insert_range(first, last); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template void unordered_map::insert( std::initializer_list list) { table_.insert_range(list.begin(), list.end()); } #endif template typename unordered_map::iterator unordered_map::erase(const_iterator position) { return table_.erase(position); } template typename unordered_map::size_type unordered_map::erase(const key_type& k) { return table_.erase_key(k); } template typename unordered_map::iterator unordered_map::erase( const_iterator first, const_iterator last) { return table_.erase_range(first, last); } template void unordered_map::clear() { table_.clear(); } template void unordered_map::swap(unordered_map& other) { table_.swap(other.table_); } // observers template typename unordered_map::hasher unordered_map::hash_function() const { return table_.hash_function(); } template typename unordered_map::key_equal unordered_map::key_eq() const { return table_.key_eq(); } template typename unordered_map::mapped_type& unordered_map::operator[](const key_type &k) { return table_[k].second; } template typename unordered_map::mapped_type& unordered_map::at(const key_type& k) { return table_.at(k).second; } template typename unordered_map::mapped_type const& unordered_map::at(const key_type& k) const { return table_.at(k).second; } // lookup template typename unordered_map::iterator unordered_map::find(const key_type& k) { return table_.find_node(k); } template typename unordered_map::const_iterator unordered_map::find(const key_type& k) const { return table_.find_node(k); } template template typename unordered_map::iterator unordered_map::find( CompatibleKey const& k, CompatibleHash const& hash, CompatiblePredicate const& eq) { return table_.generic_find_node(k, hash, eq); } template template typename unordered_map::const_iterator unordered_map::find( CompatibleKey const& k, CompatibleHash const& hash, CompatiblePredicate const& eq) const { return table_.generic_find_node(k, hash, eq); } template typename unordered_map::size_type unordered_map::count(const key_type& k) const { return table_.count(k); } template std::pair< typename unordered_map::iterator, typename unordered_map::iterator> unordered_map::equal_range(const key_type& k) { return table_.equal_range(k); } template std::pair< typename unordered_map::const_iterator, typename unordered_map::const_iterator> unordered_map::equal_range(const key_type& k) const { return table_.equal_range(k); } template typename unordered_map::size_type unordered_map::bucket_size(size_type n) const { return table_.bucket_size(n); } // hash policy template float unordered_map::load_factor() const BOOST_NOEXCEPT { return table_.load_factor(); } template void unordered_map::max_load_factor(float m) BOOST_NOEXCEPT { table_.max_load_factor(m); } template void unordered_map::rehash(size_type n) { table_.rehash(n); } template void unordered_map::reserve(size_type n) { table_.reserve(n); } template inline bool operator==( unordered_map const& m1, unordered_map const& m2) { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { unordered_map x; }; #endif return m1.table_.equals(m2.table_); } template inline bool operator!=( unordered_map const& m1, unordered_map const& m2) { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { unordered_map x; }; #endif return !m1.table_.equals(m2.table_); } template inline void swap( unordered_map &m1, unordered_map &m2) { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { unordered_map x; }; #endif m1.swap(m2); } //////////////////////////////////////////////////////////////////////////////// template unordered_multimap::unordered_multimap( size_type n, const hasher &hf, const key_equal &eql, const allocator_type &a) : table_(n, hf, eql, a) { } template unordered_multimap::unordered_multimap(allocator_type const& a) : table_(boost::unordered::detail::default_bucket_count, hasher(), key_equal(), a) { } template unordered_multimap::unordered_multimap( unordered_multimap const& other, allocator_type const& a) : table_(other.table_, a) { } template template unordered_multimap::unordered_multimap(InputIt f, InputIt l) : table_(boost::unordered::detail::initial_size(f, l), hasher(), key_equal(), allocator_type()) { table_.insert_range(f, l); } template template unordered_multimap::unordered_multimap( InputIt f, InputIt l, size_type n, const hasher &hf, const key_equal &eql) : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, allocator_type()) { table_.insert_range(f, l); } template template unordered_multimap::unordered_multimap( InputIt f, InputIt l, size_type n, const hasher &hf, const key_equal &eql, const allocator_type &a) : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a) { table_.insert_range(f, l); } template unordered_multimap::~unordered_multimap() {} template unordered_multimap::unordered_multimap( unordered_multimap const& other) : table_(other.table_) { } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template unordered_multimap::unordered_multimap( unordered_multimap&& other, allocator_type const& a) : table_(other.table_, a, boost::unordered::detail::move_tag()) { } #endif #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template unordered_multimap::unordered_multimap( std::initializer_list list, size_type n, const hasher &hf, const key_equal &eql, const allocator_type &a) : table_( boost::unordered::detail::initial_size( list.begin(), list.end(), n), hf, eql, a) { table_.insert_range(list.begin(), list.end()); } template unordered_multimap& unordered_multimap::operator=( std::initializer_list list) { table_.clear(); table_.insert_range(list.begin(), list.end()); return *this; } #endif // size and capacity template std::size_t unordered_multimap::max_size() const BOOST_NOEXCEPT { return table_.max_size(); } // modifiers template template void unordered_multimap::insert(InputIt first, InputIt last) { table_.insert_range(first, last); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template void unordered_multimap::insert( std::initializer_list list) { table_.insert_range(list.begin(), list.end()); } #endif template typename unordered_multimap::iterator unordered_multimap::erase(const_iterator position) { return table_.erase(position); } template typename unordered_multimap::size_type unordered_multimap::erase(const key_type& k) { return table_.erase_key(k); } template typename unordered_multimap::iterator unordered_multimap::erase( const_iterator first, const_iterator last) { return table_.erase_range(first, last); } template void unordered_multimap::clear() { table_.clear(); } template void unordered_multimap::swap(unordered_multimap& other) { table_.swap(other.table_); } // observers template typename unordered_multimap::hasher unordered_multimap::hash_function() const { return table_.hash_function(); } template typename unordered_multimap::key_equal unordered_multimap::key_eq() const { return table_.key_eq(); } // lookup template typename unordered_multimap::iterator unordered_multimap::find(const key_type& k) { return table_.find_node(k); } template typename unordered_multimap::const_iterator unordered_multimap::find(const key_type& k) const { return table_.find_node(k); } template template typename unordered_multimap::iterator unordered_multimap::find( CompatibleKey const& k, CompatibleHash const& hash, CompatiblePredicate const& eq) { return table_.generic_find_node(k, hash, eq); } template template typename unordered_multimap::const_iterator unordered_multimap::find( CompatibleKey const& k, CompatibleHash const& hash, CompatiblePredicate const& eq) const { return table_.generic_find_node(k, hash, eq); } template typename unordered_multimap::size_type unordered_multimap::count(const key_type& k) const { return table_.count(k); } template std::pair< typename unordered_multimap::iterator, typename unordered_multimap::iterator> unordered_multimap::equal_range(const key_type& k) { return table_.equal_range(k); } template std::pair< typename unordered_multimap::const_iterator, typename unordered_multimap::const_iterator> unordered_multimap::equal_range(const key_type& k) const { return table_.equal_range(k); } template typename unordered_multimap::size_type unordered_multimap::bucket_size(size_type n) const { return table_.bucket_size(n); } // hash policy template float unordered_multimap::load_factor() const BOOST_NOEXCEPT { return table_.load_factor(); } template void unordered_multimap::max_load_factor(float m) BOOST_NOEXCEPT { table_.max_load_factor(m); } template void unordered_multimap::rehash(size_type n) { table_.rehash(n); } template void unordered_multimap::reserve(size_type n) { table_.reserve(n); } template inline bool operator==( unordered_multimap const& m1, unordered_multimap const& m2) { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { unordered_multimap x; }; #endif return m1.table_.equals(m2.table_); } template inline bool operator!=( unordered_multimap const& m1, unordered_multimap const& m2) { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { unordered_multimap x; }; #endif return !m1.table_.equals(m2.table_); } template inline void swap( unordered_multimap &m1, unordered_multimap &m2) { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { unordered_multimap x; }; #endif m1.swap(m2); } } // namespace unordered } // namespace boost #if defined(BOOST_MSVC) #pragma warning(pop) #endif #endif // BOOST_UNORDERED_UNORDERED_MAP_HPP_INCLUDED passenger-4.0.37/ext/boost/unordered/unordered_map_fwd.hpp000644 000765 000024 00000004403 12233035540 024327 0ustar00honglistaff000000 000000 // Copyright (C) 2008-2011 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNORDERED_MAP_FWD_HPP_INCLUDED #define BOOST_UNORDERED_MAP_FWD_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include #include namespace boost { namespace unordered { template , class P = std::equal_to, class A = std::allocator > > class unordered_map; template inline bool operator==(unordered_map const&, unordered_map const&); template inline bool operator!=(unordered_map const&, unordered_map const&); template inline void swap(unordered_map&, unordered_map&); template , class P = std::equal_to, class A = std::allocator > > class unordered_multimap; template inline bool operator==(unordered_multimap const&, unordered_multimap const&); template inline bool operator!=(unordered_multimap const&, unordered_multimap const&); template inline void swap(unordered_multimap&, unordered_multimap&); } using boost::unordered::unordered_map; using boost::unordered::unordered_multimap; using boost::unordered::swap; using boost::unordered::operator==; using boost::unordered::operator!=; } #endif passenger-4.0.37/ext/boost/unordered/unordered_set.hpp000644 000765 000024 00000133650 12233035540 023514 0ustar00honglistaff000000 000000 // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. // Copyright (C) 2005-2011 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/unordered for documentation #ifndef BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED #define BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include #include #include #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #include #endif #if defined(BOOST_MSVC) #pragma warning(push) #if BOOST_MSVC >= 1400 #pragma warning(disable:4396) //the inline specifier cannot be used when a // friend declaration refers to a specialization // of a function template #endif #endif namespace boost { namespace unordered { template class unordered_set { #if defined(BOOST_UNORDERED_USE_MOVE) BOOST_COPYABLE_AND_MOVABLE(unordered_set) #endif public: typedef T key_type; typedef T value_type; typedef H hasher; typedef P key_equal; typedef A allocator_type; private: typedef boost::unordered::detail::set types; typedef typename types::traits allocator_traits; typedef typename types::table table; public: typedef typename allocator_traits::pointer pointer; typedef typename allocator_traits::const_pointer const_pointer; typedef value_type& reference; typedef value_type const& const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef typename table::cl_iterator const_local_iterator; typedef typename table::cl_iterator local_iterator; typedef typename table::c_iterator const_iterator; typedef typename table::c_iterator iterator; private: table table_; public: // constructors explicit unordered_set( size_type = boost::unordered::detail::default_bucket_count, const hasher& = hasher(), const key_equal& = key_equal(), const allocator_type& = allocator_type()); explicit unordered_set(allocator_type const&); template unordered_set(InputIt, InputIt); template unordered_set( InputIt, InputIt, size_type, const hasher& = hasher(), const key_equal& = key_equal()); template unordered_set( InputIt, InputIt, size_type, const hasher&, const key_equal&, const allocator_type&); // copy/move constructors unordered_set(unordered_set const&); unordered_set(unordered_set const&, allocator_type const&); #if defined(BOOST_UNORDERED_USE_MOVE) unordered_set(BOOST_RV_REF(unordered_set) other) : table_(other.table_, boost::unordered::detail::move_tag()) { } #elif !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) unordered_set(unordered_set&& other) : table_(other.table_, boost::unordered::detail::move_tag()) { } #endif #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) unordered_set(unordered_set&&, allocator_type const&); #endif #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) unordered_set( std::initializer_list, size_type = boost::unordered::detail::default_bucket_count, const hasher& = hasher(), const key_equal&l = key_equal(), const allocator_type& = allocator_type()); #endif // Destructor ~unordered_set(); // Assign #if defined(BOOST_UNORDERED_USE_MOVE) unordered_set& operator=(BOOST_COPY_ASSIGN_REF(unordered_set) x) { table_.assign(x.table_); return *this; } unordered_set& operator=(BOOST_RV_REF(unordered_set) x) { table_.move_assign(x.table_); return *this; } #else unordered_set& operator=(unordered_set const& x) { table_.assign(x.table_); return *this; } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) unordered_set& operator=(unordered_set&& x) { table_.move_assign(x.table_); return *this; } #endif #endif #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) unordered_set& operator=(std::initializer_list); #endif allocator_type get_allocator() const BOOST_NOEXCEPT { return table_.node_alloc(); } // size and capacity bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; } size_type size() const BOOST_NOEXCEPT { return table_.size_; } size_type max_size() const BOOST_NOEXCEPT; // iterators iterator begin() BOOST_NOEXCEPT { return table_.begin(); } const_iterator begin() const BOOST_NOEXCEPT { return table_.begin(); } iterator end() BOOST_NOEXCEPT { return iterator(); } const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); } const_iterator cbegin() const BOOST_NOEXCEPT { return table_.begin(); } const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); } // emplace #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template std::pair emplace(BOOST_FWD_REF(Args)... args) { return table_.emplace(boost::forward(args)...); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(Args)... args) { return table_.emplace(boost::forward(args)...).first; } #else #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) // 0 argument emplace requires special treatment in case // the container is instantiated with a value type that // doesn't have a default constructor. std::pair emplace( boost::unordered::detail::empty_emplace = boost::unordered::detail::empty_emplace(), value_type v = value_type()) { return this->emplace(boost::move(v)); } iterator emplace_hint(const_iterator hint, boost::unordered::detail::empty_emplace = boost::unordered::detail::empty_emplace(), value_type v = value_type() ) { return this->emplace_hint(hint, boost::move(v)); } #endif template std::pair emplace(BOOST_FWD_REF(A0) a0) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0)) ); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0)) ).first; } template std::pair emplace( BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1)) ); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1)) ).first; } template std::pair emplace( BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1), boost::forward(a2)) ); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1), boost::forward(a2)) ).first; } #define BOOST_UNORDERED_EMPLACE(z, n, _) \ template < \ BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \ > \ std::pair emplace( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \ ) \ { \ return table_.emplace( \ boost::unordered::detail::create_emplace_args( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \ a) \ )); \ } \ \ template < \ BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \ > \ iterator emplace_hint( \ const_iterator, \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \ ) \ { \ return table_.emplace( \ boost::unordered::detail::create_emplace_args( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \ a) \ )).first; \ } BOOST_PP_REPEAT_FROM_TO(4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _) #undef BOOST_UNORDERED_EMPLACE #endif std::pair insert(value_type const& x) { return this->emplace(x); } std::pair insert(BOOST_UNORDERED_RV_REF(value_type) x) { return this->emplace(boost::move(x)); } iterator insert(const_iterator hint, value_type const& x) { return this->emplace_hint(hint, x); } iterator insert(const_iterator hint, BOOST_UNORDERED_RV_REF(value_type) x) { return this->emplace_hint(hint, boost::move(x)); } template void insert(InputIt, InputIt); #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) void insert(std::initializer_list); #endif iterator erase(const_iterator); size_type erase(const key_type&); iterator erase(const_iterator, const_iterator); void quick_erase(const_iterator it) { erase(it); } void erase_return_void(const_iterator it) { erase(it); } void clear(); void swap(unordered_set&); // observers hasher hash_function() const; key_equal key_eq() const; // lookup const_iterator find(const key_type&) const; template const_iterator find( CompatibleKey const&, CompatibleHash const&, CompatiblePredicate const&) const; size_type count(const key_type&) const; std::pair equal_range(const key_type&) const; // bucket interface size_type bucket_count() const BOOST_NOEXCEPT { return table_.bucket_count_; } size_type max_bucket_count() const BOOST_NOEXCEPT { return table_.max_bucket_count(); } size_type bucket_size(size_type) const; size_type bucket(const key_type& k) const { return table_.hash_to_bucket(table_.hash(k)); } local_iterator begin(size_type n) { return local_iterator( table_.begin(n), n, table_.bucket_count_); } const_local_iterator begin(size_type n) const { return const_local_iterator( table_.begin(n), n, table_.bucket_count_); } local_iterator end(size_type) { return local_iterator(); } const_local_iterator end(size_type) const { return const_local_iterator(); } const_local_iterator cbegin(size_type n) const { return const_local_iterator( table_.begin(n), n, table_.bucket_count_); } const_local_iterator cend(size_type) const { return const_local_iterator(); } // hash policy float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; } float load_factor() const BOOST_NOEXCEPT; void max_load_factor(float) BOOST_NOEXCEPT; void rehash(size_type); void reserve(size_type); #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) friend bool operator==( unordered_set const&, unordered_set const&); friend bool operator!=( unordered_set const&, unordered_set const&); #endif }; // class template unordered_set template class unordered_multiset { #if defined(BOOST_UNORDERED_USE_MOVE) BOOST_COPYABLE_AND_MOVABLE(unordered_multiset) #endif public: typedef T key_type; typedef T value_type; typedef H hasher; typedef P key_equal; typedef A allocator_type; private: typedef boost::unordered::detail::multiset types; typedef typename types::traits allocator_traits; typedef typename types::table table; public: typedef typename allocator_traits::pointer pointer; typedef typename allocator_traits::const_pointer const_pointer; typedef value_type& reference; typedef value_type const& const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef typename table::cl_iterator const_local_iterator; typedef typename table::cl_iterator local_iterator; typedef typename table::c_iterator const_iterator; typedef typename table::c_iterator iterator; private: table table_; public: // constructors explicit unordered_multiset( size_type = boost::unordered::detail::default_bucket_count, const hasher& = hasher(), const key_equal& = key_equal(), const allocator_type& = allocator_type()); explicit unordered_multiset(allocator_type const&); template unordered_multiset(InputIt, InputIt); template unordered_multiset( InputIt, InputIt, size_type, const hasher& = hasher(), const key_equal& = key_equal()); template unordered_multiset( InputIt, InputIt, size_type, const hasher&, const key_equal&, const allocator_type&); // copy/move constructors unordered_multiset(unordered_multiset const&); unordered_multiset(unordered_multiset const&, allocator_type const&); #if defined(BOOST_UNORDERED_USE_MOVE) unordered_multiset(BOOST_RV_REF(unordered_multiset) other) : table_(other.table_, boost::unordered::detail::move_tag()) { } #elif !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) unordered_multiset(unordered_multiset&& other) : table_(other.table_, boost::unordered::detail::move_tag()) { } #endif #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) unordered_multiset(unordered_multiset&&, allocator_type const&); #endif #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) unordered_multiset( std::initializer_list, size_type = boost::unordered::detail::default_bucket_count, const hasher& = hasher(), const key_equal&l = key_equal(), const allocator_type& = allocator_type()); #endif // Destructor ~unordered_multiset(); // Assign #if defined(BOOST_UNORDERED_USE_MOVE) unordered_multiset& operator=( BOOST_COPY_ASSIGN_REF(unordered_multiset) x) { table_.assign(x.table_); return *this; } unordered_multiset& operator=(BOOST_RV_REF(unordered_multiset) x) { table_.move_assign(x.table_); return *this; } #else unordered_multiset& operator=(unordered_multiset const& x) { table_.assign(x.table_); return *this; } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) unordered_multiset& operator=(unordered_multiset&& x) { table_.move_assign(x.table_); return *this; } #endif #endif #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) unordered_multiset& operator=(std::initializer_list); #endif allocator_type get_allocator() const BOOST_NOEXCEPT { return table_.node_alloc(); } // size and capacity bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; } size_type size() const BOOST_NOEXCEPT { return table_.size_; } size_type max_size() const BOOST_NOEXCEPT; // iterators iterator begin() BOOST_NOEXCEPT { return iterator(table_.begin()); } const_iterator begin() const BOOST_NOEXCEPT { return const_iterator(table_.begin()); } iterator end() BOOST_NOEXCEPT { return iterator(); } const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); } const_iterator cbegin() const BOOST_NOEXCEPT { return const_iterator(table_.begin()); } const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); } // emplace #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template iterator emplace(BOOST_FWD_REF(Args)... args) { return table_.emplace(boost::forward(args)...); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(Args)... args) { return table_.emplace(boost::forward(args)...); } #else #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100)) // 0 argument emplace requires special treatment in case // the container is instantiated with a value type that // doesn't have a default constructor. iterator emplace( boost::unordered::detail::empty_emplace = boost::unordered::detail::empty_emplace(), value_type v = value_type()) { return this->emplace(boost::move(v)); } iterator emplace_hint(const_iterator hint, boost::unordered::detail::empty_emplace = boost::unordered::detail::empty_emplace(), value_type v = value_type() ) { return this->emplace_hint(hint, boost::move(v)); } #endif template iterator emplace(BOOST_FWD_REF(A0) a0) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0)) ); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0)) ); } template iterator emplace( BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1)) ); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1)) ); } template iterator emplace( BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1), boost::forward(a2)) ); } template iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2) { return table_.emplace( boost::unordered::detail::create_emplace_args( boost::forward(a0), boost::forward(a1), boost::forward(a2)) ); } #define BOOST_UNORDERED_EMPLACE(z, n, _) \ template < \ BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \ > \ iterator emplace( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \ ) \ { \ return table_.emplace( \ boost::unordered::detail::create_emplace_args( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \ a) \ )); \ } \ \ template < \ BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \ > \ iterator emplace_hint( \ const_iterator, \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \ ) \ { \ return table_.emplace( \ boost::unordered::detail::create_emplace_args( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \ a) \ )); \ } BOOST_PP_REPEAT_FROM_TO(4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _) #undef BOOST_UNORDERED_EMPLACE #endif iterator insert(value_type const& x) { return this->emplace(x); } iterator insert(BOOST_UNORDERED_RV_REF(value_type) x) { return this->emplace(boost::move(x)); } iterator insert(const_iterator hint, value_type const& x) { return this->emplace_hint(hint, x); } iterator insert(const_iterator hint, BOOST_UNORDERED_RV_REF(value_type) x) { return this->emplace_hint(hint, boost::move(x)); } template void insert(InputIt, InputIt); #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) void insert(std::initializer_list); #endif iterator erase(const_iterator); size_type erase(const key_type&); iterator erase(const_iterator, const_iterator); void quick_erase(const_iterator it) { erase(it); } void erase_return_void(const_iterator it) { erase(it); } void clear(); void swap(unordered_multiset&); // observers hasher hash_function() const; key_equal key_eq() const; // lookup const_iterator find(const key_type&) const; template const_iterator find( CompatibleKey const&, CompatibleHash const&, CompatiblePredicate const&) const; size_type count(const key_type&) const; std::pair equal_range(const key_type&) const; // bucket interface size_type bucket_count() const BOOST_NOEXCEPT { return table_.bucket_count_; } size_type max_bucket_count() const BOOST_NOEXCEPT { return table_.max_bucket_count(); } size_type bucket_size(size_type) const; size_type bucket(const key_type& k) const { return table_.hash_to_bucket(table_.hash(k)); } local_iterator begin(size_type n) { return local_iterator( table_.begin(n), n, table_.bucket_count_); } const_local_iterator begin(size_type n) const { return const_local_iterator( table_.begin(n), n, table_.bucket_count_); } local_iterator end(size_type) { return local_iterator(); } const_local_iterator end(size_type) const { return const_local_iterator(); } const_local_iterator cbegin(size_type n) const { return const_local_iterator( table_.begin(n), n, table_.bucket_count_); } const_local_iterator cend(size_type) const { return const_local_iterator(); } // hash policy float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; } float load_factor() const BOOST_NOEXCEPT; void max_load_factor(float) BOOST_NOEXCEPT; void rehash(size_type); void reserve(size_type); #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) friend bool operator==( unordered_multiset const&, unordered_multiset const&); friend bool operator!=( unordered_multiset const&, unordered_multiset const&); #endif }; // class template unordered_multiset //////////////////////////////////////////////////////////////////////////////// template unordered_set::unordered_set( size_type n, const hasher &hf, const key_equal &eql, const allocator_type &a) : table_(n, hf, eql, a) { } template unordered_set::unordered_set(allocator_type const& a) : table_(boost::unordered::detail::default_bucket_count, hasher(), key_equal(), a) { } template unordered_set::unordered_set( unordered_set const& other, allocator_type const& a) : table_(other.table_, a) { } template template unordered_set::unordered_set(InputIt f, InputIt l) : table_(boost::unordered::detail::initial_size(f, l), hasher(), key_equal(), allocator_type()) { table_.insert_range(f, l); } template template unordered_set::unordered_set( InputIt f, InputIt l, size_type n, const hasher &hf, const key_equal &eql) : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, allocator_type()) { table_.insert_range(f, l); } template template unordered_set::unordered_set( InputIt f, InputIt l, size_type n, const hasher &hf, const key_equal &eql, const allocator_type &a) : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a) { table_.insert_range(f, l); } template unordered_set::~unordered_set() {} template unordered_set::unordered_set( unordered_set const& other) : table_(other.table_) { } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template unordered_set::unordered_set( unordered_set&& other, allocator_type const& a) : table_(other.table_, a, boost::unordered::detail::move_tag()) { } #endif #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template unordered_set::unordered_set( std::initializer_list list, size_type n, const hasher &hf, const key_equal &eql, const allocator_type &a) : table_( boost::unordered::detail::initial_size( list.begin(), list.end(), n), hf, eql, a) { table_.insert_range(list.begin(), list.end()); } template unordered_set& unordered_set::operator=( std::initializer_list list) { table_.clear(); table_.insert_range(list.begin(), list.end()); return *this; } #endif // size and capacity template std::size_t unordered_set::max_size() const BOOST_NOEXCEPT { return table_.max_size(); } // modifiers template template void unordered_set::insert(InputIt first, InputIt last) { table_.insert_range(first, last); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template void unordered_set::insert( std::initializer_list list) { table_.insert_range(list.begin(), list.end()); } #endif template typename unordered_set::iterator unordered_set::erase(const_iterator position) { return table_.erase(position); } template typename unordered_set::size_type unordered_set::erase(const key_type& k) { return table_.erase_key(k); } template typename unordered_set::iterator unordered_set::erase( const_iterator first, const_iterator last) { return table_.erase_range(first, last); } template void unordered_set::clear() { table_.clear(); } template void unordered_set::swap(unordered_set& other) { table_.swap(other.table_); } // observers template typename unordered_set::hasher unordered_set::hash_function() const { return table_.hash_function(); } template typename unordered_set::key_equal unordered_set::key_eq() const { return table_.key_eq(); } // lookup template typename unordered_set::const_iterator unordered_set::find(const key_type& k) const { return table_.find_node(k); } template template typename unordered_set::const_iterator unordered_set::find( CompatibleKey const& k, CompatibleHash const& hash, CompatiblePredicate const& eq) const { return table_.generic_find_node(k, hash, eq); } template typename unordered_set::size_type unordered_set::count(const key_type& k) const { return table_.count(k); } template std::pair< typename unordered_set::const_iterator, typename unordered_set::const_iterator> unordered_set::equal_range(const key_type& k) const { return table_.equal_range(k); } template typename unordered_set::size_type unordered_set::bucket_size(size_type n) const { return table_.bucket_size(n); } // hash policy template float unordered_set::load_factor() const BOOST_NOEXCEPT { return table_.load_factor(); } template void unordered_set::max_load_factor(float m) BOOST_NOEXCEPT { table_.max_load_factor(m); } template void unordered_set::rehash(size_type n) { table_.rehash(n); } template void unordered_set::reserve(size_type n) { table_.reserve(n); } template inline bool operator==( unordered_set const& m1, unordered_set const& m2) { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { unordered_set x; }; #endif return m1.table_.equals(m2.table_); } template inline bool operator!=( unordered_set const& m1, unordered_set const& m2) { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { unordered_set x; }; #endif return !m1.table_.equals(m2.table_); } template inline void swap( unordered_set &m1, unordered_set &m2) { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { unordered_set x; }; #endif m1.swap(m2); } //////////////////////////////////////////////////////////////////////////////// template unordered_multiset::unordered_multiset( size_type n, const hasher &hf, const key_equal &eql, const allocator_type &a) : table_(n, hf, eql, a) { } template unordered_multiset::unordered_multiset(allocator_type const& a) : table_(boost::unordered::detail::default_bucket_count, hasher(), key_equal(), a) { } template unordered_multiset::unordered_multiset( unordered_multiset const& other, allocator_type const& a) : table_(other.table_, a) { } template template unordered_multiset::unordered_multiset(InputIt f, InputIt l) : table_(boost::unordered::detail::initial_size(f, l), hasher(), key_equal(), allocator_type()) { table_.insert_range(f, l); } template template unordered_multiset::unordered_multiset( InputIt f, InputIt l, size_type n, const hasher &hf, const key_equal &eql) : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, allocator_type()) { table_.insert_range(f, l); } template template unordered_multiset::unordered_multiset( InputIt f, InputIt l, size_type n, const hasher &hf, const key_equal &eql, const allocator_type &a) : table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a) { table_.insert_range(f, l); } template unordered_multiset::~unordered_multiset() {} template unordered_multiset::unordered_multiset( unordered_multiset const& other) : table_(other.table_) { } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template unordered_multiset::unordered_multiset( unordered_multiset&& other, allocator_type const& a) : table_(other.table_, a, boost::unordered::detail::move_tag()) { } #endif #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template unordered_multiset::unordered_multiset( std::initializer_list list, size_type n, const hasher &hf, const key_equal &eql, const allocator_type &a) : table_( boost::unordered::detail::initial_size( list.begin(), list.end(), n), hf, eql, a) { table_.insert_range(list.begin(), list.end()); } template unordered_multiset& unordered_multiset::operator=( std::initializer_list list) { table_.clear(); table_.insert_range(list.begin(), list.end()); return *this; } #endif // size and capacity template std::size_t unordered_multiset::max_size() const BOOST_NOEXCEPT { return table_.max_size(); } // modifiers template template void unordered_multiset::insert(InputIt first, InputIt last) { table_.insert_range(first, last); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template void unordered_multiset::insert( std::initializer_list list) { table_.insert_range(list.begin(), list.end()); } #endif template typename unordered_multiset::iterator unordered_multiset::erase(const_iterator position) { return table_.erase(position); } template typename unordered_multiset::size_type unordered_multiset::erase(const key_type& k) { return table_.erase_key(k); } template typename unordered_multiset::iterator unordered_multiset::erase( const_iterator first, const_iterator last) { return table_.erase_range(first, last); } template void unordered_multiset::clear() { table_.clear(); } template void unordered_multiset::swap(unordered_multiset& other) { table_.swap(other.table_); } // observers template typename unordered_multiset::hasher unordered_multiset::hash_function() const { return table_.hash_function(); } template typename unordered_multiset::key_equal unordered_multiset::key_eq() const { return table_.key_eq(); } // lookup template typename unordered_multiset::const_iterator unordered_multiset::find(const key_type& k) const { return table_.find_node(k); } template template typename unordered_multiset::const_iterator unordered_multiset::find( CompatibleKey const& k, CompatibleHash const& hash, CompatiblePredicate const& eq) const { return table_.generic_find_node(k, hash, eq); } template typename unordered_multiset::size_type unordered_multiset::count(const key_type& k) const { return table_.count(k); } template std::pair< typename unordered_multiset::const_iterator, typename unordered_multiset::const_iterator> unordered_multiset::equal_range(const key_type& k) const { return table_.equal_range(k); } template typename unordered_multiset::size_type unordered_multiset::bucket_size(size_type n) const { return table_.bucket_size(n); } // hash policy template float unordered_multiset::load_factor() const BOOST_NOEXCEPT { return table_.load_factor(); } template void unordered_multiset::max_load_factor(float m) BOOST_NOEXCEPT { table_.max_load_factor(m); } template void unordered_multiset::rehash(size_type n) { table_.rehash(n); } template void unordered_multiset::reserve(size_type n) { table_.reserve(n); } template inline bool operator==( unordered_multiset const& m1, unordered_multiset const& m2) { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { unordered_multiset x; }; #endif return m1.table_.equals(m2.table_); } template inline bool operator!=( unordered_multiset const& m1, unordered_multiset const& m2) { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { unordered_multiset x; }; #endif return !m1.table_.equals(m2.table_); } template inline void swap( unordered_multiset &m1, unordered_multiset &m2) { #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613)) struct dummy { unordered_multiset x; }; #endif m1.swap(m2); } } // namespace unordered } // namespace boost #if defined(BOOST_MSVC) #pragma warning(pop) #endif #endif // BOOST_UNORDERED_UNORDERED_SET_HPP_INCLUDED passenger-4.0.37/ext/boost/unordered/unordered_set_fwd.hpp000644 000765 000024 00000004141 12233035540 024344 0ustar00honglistaff000000 000000 // Copyright (C) 2008-2011 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNORDERED_SET_FWD_HPP_INCLUDED #define BOOST_UNORDERED_SET_FWD_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include #include namespace boost { namespace unordered { template , class P = std::equal_to, class A = std::allocator > class unordered_set; template inline bool operator==(unordered_set const&, unordered_set const&); template inline bool operator!=(unordered_set const&, unordered_set const&); template inline void swap(unordered_set &m1, unordered_set &m2); template , class P = std::equal_to, class A = std::allocator > class unordered_multiset; template inline bool operator==(unordered_multiset const&, unordered_multiset const&); template inline bool operator!=(unordered_multiset const&, unordered_multiset const&); template inline void swap(unordered_multiset &m1, unordered_multiset &m2); } using boost::unordered::unordered_set; using boost::unordered::unordered_multiset; using boost::unordered::swap; using boost::unordered::operator==; using boost::unordered::operator!=; } #endif passenger-4.0.37/ext/boost/unordered/detail/allocate.hpp000644 000765 000024 00000123006 12233035540 023672 0ustar00honglistaff000000 000000 // Copyright 2005-2011 Daniel James. // Copyright 2009 Pablo Halpern. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/unordered for documentation #ifndef BOOST_UNORDERED_ALLOCATE_HPP #define BOOST_UNORDERED_ALLOCATE_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if !defined(BOOST_NO_CXX11_HDR_TUPLE) #include #endif #if defined(BOOST_MSVC) #pragma warning(push) #pragma warning(disable:4512) // assignment operator could not be generated. #pragma warning(disable:4345) // behavior change: an object of POD type // constructed with an initializer of the form () // will be default-initialized. #endif #define BOOST_UNORDERED_EMPLACE_LIMIT 10 namespace boost { namespace unordered { namespace detail { //////////////////////////////////////////////////////////////////////////// // Bits and pieces for implementing traits template typename boost::add_lvalue_reference::type make(); struct choice9 { typedef char (&type)[9]; }; struct choice8 : choice9 { typedef char (&type)[8]; }; struct choice7 : choice8 { typedef char (&type)[7]; }; struct choice6 : choice7 { typedef char (&type)[6]; }; struct choice5 : choice6 { typedef char (&type)[5]; }; struct choice4 : choice5 { typedef char (&type)[4]; }; struct choice3 : choice4 { typedef char (&type)[3]; }; struct choice2 : choice3 { typedef char (&type)[2]; }; struct choice1 : choice2 { typedef char (&type)[1]; }; choice1 choose(); typedef choice1::type yes_type; typedef choice2::type no_type; struct private_type { private_type const &operator,(int) const; }; template no_type is_private_type(T const&); yes_type is_private_type(private_type const&); struct convert_from_anything { template convert_from_anything(T const&); }; //////////////////////////////////////////////////////////////////////////// // emplace_args // // Either forwarding variadic arguments, or storing the arguments in // emplace_args##n #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #define BOOST_UNORDERED_EMPLACE_TEMPLATE typename... Args #define BOOST_UNORDERED_EMPLACE_ARGS BOOST_FWD_REF(Args)... args #define BOOST_UNORDERED_EMPLACE_FORWARD boost::forward(args)... #define BOOST_UNORDERED_EMPLACE_ARGS1(a0) a0 #define BOOST_UNORDERED_EMPLACE_ARGS2(a0, a1) a0, a1 #define BOOST_UNORDERED_EMPLACE_ARGS3(a0, a1, a2) a0, a1, a2 #else #define BOOST_UNORDERED_EMPLACE_TEMPLATE typename Args #define BOOST_UNORDERED_EMPLACE_ARGS Args const& args #define BOOST_UNORDERED_EMPLACE_FORWARD args #define BOOST_UNORDERED_FWD_PARAM(z, n, a) \ BOOST_FWD_REF(BOOST_PP_CAT(A, n)) BOOST_PP_CAT(a, n) #define BOOST_UNORDERED_CALL_FORWARD(z, i, a) \ boost::forward(BOOST_PP_CAT(a,i)) #define BOOST_UNORDERED_EARGS(z, n, _) \ template \ struct BOOST_PP_CAT(emplace_args, n) \ { \ BOOST_PP_REPEAT_##z(n, BOOST_UNORDERED_EARGS_MEMBER, _) \ BOOST_PP_CAT(emplace_args, n) ( \ BOOST_PP_ENUM_BINARY_PARAMS_Z(z, n, Arg, b) \ ) : BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_EARGS_INIT, _) \ {} \ \ }; \ \ template \ inline BOOST_PP_CAT(emplace_args, n) < \ BOOST_PP_ENUM_PARAMS_Z(z, n, A) \ > create_emplace_args( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, b) \ ) \ { \ BOOST_PP_CAT(emplace_args, n) < \ BOOST_PP_ENUM_PARAMS_Z(z, n, A) \ > e(BOOST_PP_ENUM_PARAMS_Z(z, n, b)); \ return e; \ } #define BOOST_UNORDERED_EMPLACE_ARGS1 create_emplace_args #define BOOST_UNORDERED_EMPLACE_ARGS2 create_emplace_args #define BOOST_UNORDERED_EMPLACE_ARGS3 create_emplace_args #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #define BOOST_UNORDERED_EARGS_MEMBER(z, n, _) \ typedef BOOST_FWD_REF(BOOST_PP_CAT(A, n)) BOOST_PP_CAT(Arg, n); \ BOOST_PP_CAT(Arg, n) BOOST_PP_CAT(a, n); #define BOOST_UNORDERED_EARGS_INIT(z, n, _) \ BOOST_PP_CAT(a, n)( \ boost::forward(BOOST_PP_CAT(b, n))) #else #define BOOST_UNORDERED_EARGS_MEMBER(z, n, _) \ typedef typename boost::add_lvalue_reference::type \ BOOST_PP_CAT(Arg, n); \ BOOST_PP_CAT(Arg, n) BOOST_PP_CAT(a, n); #define BOOST_UNORDERED_EARGS_INIT(z, n, _) \ BOOST_PP_CAT(a, n)(BOOST_PP_CAT(b, n)) #endif BOOST_PP_REPEAT_FROM_TO(1, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EARGS, _) #undef BOOST_UNORDERED_DEFINE_EMPLACE_ARGS #undef BOOST_UNORDERED_EARGS_MEMBER #undef BOOST_UNORDERED_EARGS_INIT #endif }}} //////////////////////////////////////////////////////////////////////////////// // // Pick which version of allocator_traits to use // // 0 = Own partial implementation // 1 = std::allocator_traits // 2 = boost::container::allocator_traits #if !defined(BOOST_UNORDERED_USE_ALLOCATOR_TRAITS) # if defined(__GXX_EXPERIMENTAL_CXX0X__) && \ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) # define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 0 # elif defined(BOOST_MSVC) # if BOOST_MSVC < 1400 // Use container's allocator_traits for older versions of Visual // C++ as I don't test with them. # define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 2 # endif # endif #endif #if !defined(BOOST_UNORDERED_USE_ALLOCATOR_TRAITS) # define BOOST_UNORDERED_USE_ALLOCATOR_TRAITS 0 #endif //////////////////////////////////////////////////////////////////////////////// // // Some utilities for implementing allocator_traits, but useful elsewhere so // they're always defined. #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) # include #endif namespace boost { namespace unordered { namespace detail { //////////////////////////////////////////////////////////////////////////// // Integral_constrant, true_type, false_type // // Uses the standard versions if available. #if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) using std::integral_constant; using std::true_type; using std::false_type; #else template struct integral_constant { enum { value = Value }; }; typedef boost::unordered::detail::integral_constant true_type; typedef boost::unordered::detail::integral_constant false_type; #endif //////////////////////////////////////////////////////////////////////////// // Explicitly call a destructor #if defined(BOOST_MSVC) #pragma warning(push) #pragma warning(disable:4100) // unreferenced formal parameter #endif template inline void destroy(T* x) { x->~T(); } #if defined(BOOST_MSVC) #pragma warning(pop) #endif //////////////////////////////////////////////////////////////////////////// // Expression test mechanism // // When SFINAE expressions are available, define // BOOST_UNORDERED_HAS_FUNCTION which can check if a function call is // supported by a class, otherwise define BOOST_UNORDERED_HAS_MEMBER which // can detect if a class has the specified member, but not that it has the // correct type, this is good enough for a passable impression of // allocator_traits. #if !defined(BOOST_NO_SFINAE_EXPR) template struct expr_test; template struct expr_test : T {}; template static char for_expr_test(U const&); # define BOOST_UNORDERED_CHECK_EXPRESSION(count, result, expression) \ template \ static typename boost::unordered::detail::expr_test< \ BOOST_PP_CAT(choice, result), \ sizeof(boost::unordered::detail::for_expr_test(( \ (expression), \ 0)))>::type test( \ BOOST_PP_CAT(choice, count)) # define BOOST_UNORDERED_DEFAULT_EXPRESSION(count, result) \ template \ static BOOST_PP_CAT(choice, result)::type test( \ BOOST_PP_CAT(choice, count)) # define BOOST_UNORDERED_HAS_FUNCTION(name, thing, args, _) \ struct BOOST_PP_CAT(has_, name) \ { \ BOOST_UNORDERED_CHECK_EXPRESSION(1, 1, \ boost::unordered::detail::make< thing >().name args); \ BOOST_UNORDERED_DEFAULT_EXPRESSION(2, 2); \ \ enum { value = sizeof(test(choose())) == sizeof(choice1::type) };\ } #else template struct identity { typedef T type; }; # define BOOST_UNORDERED_CHECK_MEMBER(count, result, name, member) \ \ typedef typename boost::unordered::detail::identity::type \ BOOST_PP_CAT(check, count); \ \ template \ struct BOOST_PP_CAT(test, count) { \ typedef BOOST_PP_CAT(choice, result) type; \ }; \ \ template static typename \ BOOST_PP_CAT(test, count)<&U::name>::type \ test(BOOST_PP_CAT(choice, count)) # define BOOST_UNORDERED_DEFAULT_MEMBER(count, result) \ template static BOOST_PP_CAT(choice, result)::type \ test(BOOST_PP_CAT(choice, count)) # define BOOST_UNORDERED_HAS_MEMBER(name) \ struct BOOST_PP_CAT(has_, name) \ { \ struct impl { \ struct base_mixin { int name; }; \ struct base : public T, public base_mixin {}; \ \ BOOST_UNORDERED_CHECK_MEMBER(1, 1, name, int base_mixin::*); \ BOOST_UNORDERED_DEFAULT_MEMBER(2, 2); \ \ enum { value = sizeof(choice2::type) == \ sizeof(test(choose())) \ }; \ }; \ \ enum { value = impl::value }; \ } #endif }}} //////////////////////////////////////////////////////////////////////////////// // // Allocator traits // // First our implementation, then later light wrappers around the alternatives #if BOOST_UNORDERED_USE_ALLOCATOR_TRAITS == 0 # include # include # include # if defined(BOOST_NO_SFINAE_EXPR) # include # endif # if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ !defined(BOOST_NO_SFINAE_EXPR) # define BOOST_UNORDERED_DETAIL_FULL_CONSTRUCT 1 # else # define BOOST_UNORDERED_DETAIL_FULL_CONSTRUCT 0 # endif namespace boost { namespace unordered { namespace detail { // TODO: Does this match std::allocator_traits::rebind_alloc? template struct rebind_wrap { typedef typename Alloc::BOOST_NESTED_TEMPLATE rebind::other type; }; # if defined(BOOST_MSVC) && BOOST_MSVC <= 1400 # define BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(tname) \ template \ struct default_type_ ## tname { \ \ template \ static choice1::type test(choice1, typename X::tname* = 0); \ \ template \ static choice2::type test(choice2, void* = 0); \ \ struct DefaultWrap { typedef Default tname; }; \ \ enum { value = (1 == sizeof(test(choose()))) }; \ \ typedef typename boost::detail::if_true:: \ BOOST_NESTED_TEMPLATE then \ ::type::tname type; \ } # else template struct sfinae : T2 {}; # define BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(tname) \ template \ struct default_type_ ## tname { \ \ template \ static typename boost::unordered::detail::sfinae< \ typename X::tname, choice1>::type \ test(choice1); \ \ template \ static choice2::type test(choice2); \ \ struct DefaultWrap { typedef Default tname; }; \ \ enum { value = (1 == sizeof(test(choose()))) }; \ \ typedef typename boost::detail::if_true:: \ BOOST_NESTED_TEMPLATE then \ ::type::tname type; \ } # endif # define BOOST_UNORDERED_DEFAULT_TYPE(T,tname, arg) \ typename default_type_ ## tname::type BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(pointer); BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(const_pointer); BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(void_pointer); BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(const_void_pointer); BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(difference_type); BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(size_type); BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(propagate_on_container_copy_assignment); BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(propagate_on_container_move_assignment); BOOST_UNORDERED_DEFAULT_TYPE_TMPLT(propagate_on_container_swap); # if !defined(BOOST_NO_SFINAE_EXPR) template BOOST_UNORDERED_HAS_FUNCTION( select_on_container_copy_construction, U const, (), 0 ); template BOOST_UNORDERED_HAS_FUNCTION( max_size, U const, (), 0 ); # if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template BOOST_UNORDERED_HAS_FUNCTION( construct, U, ( boost::unordered::detail::make(), boost::unordered::detail::make()...), 2 ); # else template BOOST_UNORDERED_HAS_FUNCTION( construct, U, ( boost::unordered::detail::make(), boost::unordered::detail::make()), 2 ); # endif template BOOST_UNORDERED_HAS_FUNCTION( destroy, U, (boost::unordered::detail::make()), 1 ); # else template BOOST_UNORDERED_HAS_MEMBER(select_on_container_copy_construction); template BOOST_UNORDERED_HAS_MEMBER(max_size); template BOOST_UNORDERED_HAS_MEMBER(construct); template BOOST_UNORDERED_HAS_MEMBER(destroy); # endif template inline Alloc call_select_on_container_copy_construction(const Alloc& rhs, typename boost::enable_if_c< boost::unordered::detail:: has_select_on_container_copy_construction::value, void* >::type = 0) { return rhs.select_on_container_copy_construction(); } template inline Alloc call_select_on_container_copy_construction(const Alloc& rhs, typename boost::disable_if_c< boost::unordered::detail:: has_select_on_container_copy_construction::value, void* >::type = 0) { return rhs; } template inline SizeType call_max_size(const Alloc& a, typename boost::enable_if_c< boost::unordered::detail::has_max_size::value, void* >::type = 0) { return a.max_size(); } template inline SizeType call_max_size(const Alloc&, typename boost::disable_if_c< boost::unordered::detail::has_max_size::value, void* >::type = 0) { return (std::numeric_limits::max)(); } template struct allocator_traits { typedef Alloc allocator_type; typedef typename Alloc::value_type value_type; typedef BOOST_UNORDERED_DEFAULT_TYPE(Alloc, pointer, value_type*) pointer; template struct pointer_to_other : boost::pointer_to_other {}; typedef BOOST_UNORDERED_DEFAULT_TYPE(Alloc, const_pointer, typename pointer_to_other::type) const_pointer; //typedef BOOST_UNORDERED_DEFAULT_TYPE(Alloc, void_pointer, // typename pointer_to_other::type) // void_pointer; // //typedef BOOST_UNORDERED_DEFAULT_TYPE(Alloc, const_void_pointer, // typename pointer_to_other::type) // const_void_pointer; typedef BOOST_UNORDERED_DEFAULT_TYPE(Alloc, difference_type, std::ptrdiff_t) difference_type; typedef BOOST_UNORDERED_DEFAULT_TYPE(Alloc, size_type, std::size_t) size_type; // TODO: rebind_alloc and rebind_traits static pointer allocate(Alloc& a, size_type n) { return a.allocate(n); } // I never use this, so I'll just comment it out for now. // //static pointer allocate(Alloc& a, size_type n, // const_void_pointer hint) // { return DEFAULT_FUNC(allocate, pointer)(a, n, hint); } static void deallocate(Alloc& a, pointer p, size_type n) { a.deallocate(p, n); } public: # if BOOST_UNORDERED_DETAIL_FULL_CONSTRUCT template static typename boost::enable_if_c< boost::unordered::detail::has_construct ::value>::type construct(Alloc& a, T* p, BOOST_FWD_REF(Args)... x) { a.construct(p, boost::forward(x)...); } template static typename boost::disable_if_c< boost::unordered::detail::has_construct ::value>::type construct(Alloc&, T* p, BOOST_FWD_REF(Args)... x) { new ((void*) p) T(boost::forward(x)...); } template static typename boost::enable_if_c< boost::unordered::detail::has_destroy::value>::type destroy(Alloc& a, T* p) { a.destroy(p); } template static typename boost::disable_if_c< boost::unordered::detail::has_destroy::value>::type destroy(Alloc&, T* p) { boost::unordered::detail::destroy(p); } # elif !defined(BOOST_NO_SFINAE_EXPR) template static typename boost::enable_if_c< boost::unordered::detail::has_construct::value>::type construct(Alloc& a, T* p, T const& x) { a.construct(p, x); } template static typename boost::disable_if_c< boost::unordered::detail::has_construct::value>::type construct(Alloc&, T* p, T const& x) { new ((void*) p) T(x); } template static typename boost::enable_if_c< boost::unordered::detail::has_destroy::value>::type destroy(Alloc& a, T* p) { a.destroy(p); } template static typename boost::disable_if_c< boost::unordered::detail::has_destroy::value>::type destroy(Alloc&, T* p) { boost::unordered::detail::destroy(p); } # else // If we don't have SFINAE expressions, only call construct for the // copy constructor for the allocator's value_type - as that's // the only construct method that old fashioned allocators support. template static void construct(Alloc& a, T* p, T const& x, typename boost::enable_if_c< boost::unordered::detail::has_construct::value && boost::is_same::value, void*>::type = 0) { a.construct(p, x); } template static void construct(Alloc&, T* p, T const& x, typename boost::disable_if_c< boost::unordered::detail::has_construct::value && boost::is_same::value, void*>::type = 0) { new ((void*) p) T(x); } template static void destroy(Alloc& a, T* p, typename boost::enable_if_c< boost::unordered::detail::has_destroy::value && boost::is_same::value, void*>::type = 0) { a.destroy(p); } template static void destroy(Alloc&, T* p, typename boost::disable_if_c< boost::unordered::detail::has_destroy::value && boost::is_same::value, void*>::type = 0) { boost::unordered::detail::destroy(p); } # endif static size_type max_size(const Alloc& a) { return boost::unordered::detail::call_max_size(a); } // Allocator propagation on construction static Alloc select_on_container_copy_construction(Alloc const& rhs) { return boost::unordered::detail:: call_select_on_container_copy_construction(rhs); } // Allocator propagation on assignment and swap. // Return true if lhs is modified. typedef BOOST_UNORDERED_DEFAULT_TYPE( Alloc, propagate_on_container_copy_assignment, false_type) propagate_on_container_copy_assignment; typedef BOOST_UNORDERED_DEFAULT_TYPE( Alloc,propagate_on_container_move_assignment, false_type) propagate_on_container_move_assignment; typedef BOOST_UNORDERED_DEFAULT_TYPE( Alloc,propagate_on_container_swap,false_type) propagate_on_container_swap; }; }}} # undef BOOST_UNORDERED_DEFAULT_TYPE_TMPLT # undef BOOST_UNORDERED_DEFAULT_TYPE //////////////////////////////////////////////////////////////////////////////// // // std::allocator_traits #elif BOOST_UNORDERED_USE_ALLOCATOR_TRAITS == 1 # include # define BOOST_UNORDERED_DETAIL_FULL_CONSTRUCT 1 namespace boost { namespace unordered { namespace detail { template struct allocator_traits : std::allocator_traits {}; template struct rebind_wrap { typedef typename std::allocator_traits:: template rebind_alloc type; }; }}} //////////////////////////////////////////////////////////////////////////////// // // boost::container::allocator_traits #elif BOOST_UNORDERED_USE_ALLOCATOR_TRAITS == 2 # include # define BOOST_UNORDERED_DETAIL_FULL_CONSTRUCT 0 namespace boost { namespace unordered { namespace detail { template struct allocator_traits : boost::container::allocator_traits {}; template struct rebind_wrap : boost::container::allocator_traits:: template portable_rebind_alloc {}; }}} #else #error "Invalid BOOST_UNORDERED_USE_ALLOCATOR_TRAITS value." #endif namespace boost { namespace unordered { namespace detail { //////////////////////////////////////////////////////////////////////////// // call_construct #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) # if BOOST_UNORDERED_DETAIL_FULL_CONSTRUCT template inline void call_construct(Alloc& alloc, T* address, BOOST_FWD_REF(Args)... args) { boost::unordered::detail::allocator_traits::construct(alloc, address, boost::forward(args)...); } template inline void destroy_value_impl(Alloc& alloc, T* x) { boost::unordered::detail::allocator_traits::destroy(alloc, x); } # else template inline void call_construct(Alloc&, T* address, BOOST_FWD_REF(Args)... args) { new((void*) address) T(boost::forward(args)...); } template inline void destroy_value_impl(Alloc&, T* x) { boost::unordered::detail::destroy(x); } # endif #else template inline void destroy_value_impl(Alloc&, T* x) { boost::unordered::detail::destroy(x); } #endif //////////////////////////////////////////////////////////////////////////// // Construct from tuple // // Used for piecewise construction. #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) # define BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(n, namespace_) \ template \ void construct_from_tuple(Alloc& alloc, T* ptr, namespace_ tuple<>) \ { \ boost::unordered::detail::call_construct(alloc, ptr); \ } \ \ BOOST_PP_REPEAT_FROM_TO(1, n, \ BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE_IMPL, namespace_) # define BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE_IMPL(z, n, namespace_) \ template \ void construct_from_tuple(Alloc& alloc, T* ptr, \ namespace_ tuple const& x) \ { \ boost::unordered::detail::call_construct(alloc, ptr, \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_GET_TUPLE_ARG, namespace_) \ ); \ } # define BOOST_UNORDERED_GET_TUPLE_ARG(z, n, namespace_) \ namespace_ get(x) #elif !defined(__SUNPRO_CC) # define BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(n, namespace_) \ template \ void construct_from_tuple(Alloc&, T* ptr, namespace_ tuple<>) \ { \ new ((void*) ptr) T(); \ } \ \ BOOST_PP_REPEAT_FROM_TO(1, n, \ BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE_IMPL, namespace_) # define BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE_IMPL(z, n, namespace_) \ template \ void construct_from_tuple(Alloc&, T* ptr, \ namespace_ tuple const& x) \ { \ new ((void*) ptr) T( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_GET_TUPLE_ARG, namespace_) \ ); \ } # define BOOST_UNORDERED_GET_TUPLE_ARG(z, n, namespace_) \ namespace_ get(x) #else template struct length {}; # define BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(n, namespace_) \ template \ void construct_from_tuple_impl( \ boost::unordered::detail::length<0>, Alloc&, T* ptr, \ namespace_ tuple<>) \ { \ new ((void*) ptr) T(); \ } \ \ BOOST_PP_REPEAT_FROM_TO(1, n, \ BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE_IMPL, namespace_) # define BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE_IMPL(z, n, namespace_) \ template \ void construct_from_tuple_impl( \ boost::unordered::detail::length, Alloc&, T* ptr, \ namespace_ tuple const& x) \ { \ new ((void*) ptr) T( \ BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_GET_TUPLE_ARG, namespace_) \ ); \ } # define BOOST_UNORDERED_GET_TUPLE_ARG(z, n, namespace_) \ namespace_ get(x) #endif BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(10, boost::) #if !defined(__SUNPRO_CC) && !defined(BOOST_NO_CXX11_HDR_TUPLE) BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE(10, std::) #endif #undef BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE #undef BOOST_UNORDERED_CONSTRUCT_FROM_TUPLE_IMPL #undef BOOST_UNORDERED_GET_TUPLE_ARG #if defined(__SUNPRO_CC) template void construct_from_tuple(Alloc& alloc, T* ptr, Tuple const& x) { construct_from_tuple_impl( boost::unordered::detail::length< boost::tuples::length::value>(), alloc, ptr, x); } #endif //////////////////////////////////////////////////////////////////////////// // Trait to check for piecewise construction. template struct use_piecewise { static choice1::type test(choice1, boost::unordered::piecewise_construct_t); static choice2::type test(choice2, ...); enum { value = sizeof(choice1::type) == sizeof(test(choose(), boost::unordered::detail::make())) }; }; #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) //////////////////////////////////////////////////////////////////////////// // Construct from variadic parameters // For the standard pair constructor. template inline void construct_value_impl(Alloc& alloc, T* address, BOOST_FWD_REF(Args)... args) { boost::unordered::detail::call_construct(alloc, address, boost::forward(args)...); } // Special case for piece_construct // // TODO: When possible, it might be better to use std::pair's // constructor for std::piece_construct with std::tuple. template inline typename enable_if, void>::type construct_value_impl(Alloc& alloc, std::pair* address, BOOST_FWD_REF(A0), BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2) { boost::unordered::detail::construct_from_tuple(alloc, boost::addressof(address->first), boost::forward(a1)); boost::unordered::detail::construct_from_tuple(alloc, boost::addressof(address->second), boost::forward(a2)); } #else // BOOST_NO_CXX11_VARIADIC_TEMPLATES //////////////////////////////////////////////////////////////////////////////// // Construct from emplace_args // Explicitly write out first three overloads for the sake of sane // error messages. template inline void construct_value_impl(Alloc&, T* address, emplace_args1 const& args) { new((void*) address) T(boost::forward(args.a0)); } template inline void construct_value_impl(Alloc&, T* address, emplace_args2 const& args) { new((void*) address) T( boost::forward(args.a0), boost::forward(args.a1) ); } template inline void construct_value_impl(Alloc&, T* address, emplace_args3 const& args) { new((void*) address) T( boost::forward(args.a0), boost::forward(args.a1), boost::forward(args.a2) ); } // Use a macro for the rest. #define BOOST_UNORDERED_CONSTRUCT_IMPL(z, num_params, _) \ template < \ typename Alloc, typename T, \ BOOST_PP_ENUM_PARAMS_Z(z, num_params, typename A) \ > \ inline void construct_value_impl(Alloc&, T* address, \ boost::unordered::detail::BOOST_PP_CAT(emplace_args,num_params) < \ BOOST_PP_ENUM_PARAMS_Z(z, num_params, A) \ > const& args) \ { \ new((void*) address) T( \ BOOST_PP_ENUM_##z(num_params, BOOST_UNORDERED_CALL_FORWARD, \ args.a)); \ } BOOST_PP_REPEAT_FROM_TO(4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_CONSTRUCT_IMPL, _) #undef BOOST_UNORDERED_CONSTRUCT_IMPL // Construct with piece_construct template inline void construct_value_impl(Alloc& alloc, std::pair* address, boost::unordered::detail::emplace_args3 const& args, typename enable_if, void*>::type = 0) { boost::unordered::detail::construct_from_tuple(alloc, boost::addressof(address->first), args.a1); boost::unordered::detail::construct_from_tuple(alloc, boost::addressof(address->second), args.a2); } #endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES }}} //////////////////////////////////////////////////////////////////////////////// // // Some helper functions for allocating & constructing namespace boost { namespace unordered { namespace detail { //////////////////////////////////////////////////////////////////////////// // // array_constructor // // Allocate and construct an array in an exception safe manner, and // clean up if an exception is thrown before the container takes charge // of it. template struct array_constructor { typedef boost::unordered::detail::allocator_traits traits; typedef typename traits::pointer pointer; Allocator& alloc_; pointer ptr_; pointer constructed_; std::size_t length_; array_constructor(Allocator& a) : alloc_(a), ptr_(), constructed_(), length_(0) { constructed_ = pointer(); ptr_ = pointer(); } ~array_constructor() { if (ptr_) { for(pointer p = ptr_; p != constructed_; ++p) traits::destroy(alloc_, boost::addressof(*p)); traits::deallocate(alloc_, ptr_, length_); } } template void construct(V const& v, std::size_t l) { BOOST_ASSERT(!ptr_); length_ = l; ptr_ = traits::allocate(alloc_, length_); pointer end = ptr_ + static_cast(length_); for(constructed_ = ptr_; constructed_ != end; ++constructed_) traits::construct(alloc_, boost::addressof(*constructed_), v); } pointer get() const { return ptr_; } pointer release() { pointer p(ptr_); ptr_ = pointer(); return p; } private: array_constructor(array_constructor const&); array_constructor& operator=(array_constructor const&); }; }}} #if defined(BOOST_MSVC) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/unordered/detail/buckets.hpp000644 000765 000024 00000061753 12233035540 023560 0ustar00honglistaff000000 000000 // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. // Copyright (C) 2005-2011 Daniel James // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNORDERED_DETAIL_MANAGER_HPP_INCLUDED #define BOOST_UNORDERED_DETAIL_MANAGER_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include #include #include #include #include #include #include namespace boost { namespace unordered { namespace detail { template struct table; template struct bucket; struct ptr_bucket; template struct table_impl; template struct grouped_table_impl; }}} namespace boost { namespace unordered { namespace iterator_detail { //////////////////////////////////////////////////////////////////////////// // Iterators // // all no throw template struct iterator; template struct c_iterator; template struct l_iterator; template struct cl_iterator; // Local Iterators // // all no throw template struct l_iterator : public boost::iterator< std::forward_iterator_tag, typename Node::value_type, std::ptrdiff_t, typename Node::node_pointer, typename Node::value_type&> { #if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) template friend struct boost::unordered::iterator_detail::cl_iterator; private: #endif typedef typename Node::node_pointer node_pointer; typedef boost::unordered::iterator_detail::iterator iterator; node_pointer ptr_; std::size_t bucket_; std::size_t bucket_count_; public: typedef typename Node::value_type value_type; l_iterator() : ptr_() {} l_iterator(iterator x, std::size_t b, std::size_t c) : ptr_(x.node_), bucket_(b), bucket_count_(c) {} value_type& operator*() const { return ptr_->value(); } value_type* operator->() const { return ptr_->value_ptr(); } l_iterator& operator++() { ptr_ = static_cast(ptr_->next_); if (ptr_ && Policy::to_bucket(bucket_count_, ptr_->hash_) != bucket_) ptr_ = node_pointer(); return *this; } l_iterator operator++(int) { l_iterator tmp(*this); ++(*this); return tmp; } bool operator==(l_iterator x) const { return ptr_ == x.ptr_; } bool operator!=(l_iterator x) const { return ptr_ != x.ptr_; } }; template struct cl_iterator : public boost::iterator< std::forward_iterator_tag, typename Node::value_type, std::ptrdiff_t, ConstNodePointer, typename Node::value_type const&> { friend struct boost::unordered::iterator_detail::l_iterator ; private: typedef typename Node::node_pointer node_pointer; typedef boost::unordered::iterator_detail::iterator iterator; node_pointer ptr_; std::size_t bucket_; std::size_t bucket_count_; public: typedef typename Node::value_type value_type; cl_iterator() : ptr_() {} cl_iterator(iterator x, std::size_t b, std::size_t c) : ptr_(x.node_), bucket_(b), bucket_count_(c) {} cl_iterator(boost::unordered::iterator_detail::l_iterator< Node, Policy> const& x) : ptr_(x.ptr_), bucket_(x.bucket_), bucket_count_(x.bucket_count_) {} value_type const& operator*() const { return ptr_->value(); } value_type const* operator->() const { return ptr_->value_ptr(); } cl_iterator& operator++() { ptr_ = static_cast(ptr_->next_); if (ptr_ && Policy::to_bucket(bucket_count_, ptr_->hash_) != bucket_) ptr_ = node_pointer(); return *this; } cl_iterator operator++(int) { cl_iterator tmp(*this); ++(*this); return tmp; } friend bool operator==(cl_iterator const& x, cl_iterator const& y) { return x.ptr_ == y.ptr_; } friend bool operator!=(cl_iterator const& x, cl_iterator const& y) { return x.ptr_ != y.ptr_; } }; template struct iterator : public boost::iterator< std::forward_iterator_tag, typename Node::value_type, std::ptrdiff_t, typename Node::node_pointer, typename Node::value_type&> { #if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) template friend struct boost::unordered::iterator_detail::c_iterator; template friend struct boost::unordered::iterator_detail::l_iterator; template friend struct boost::unordered::iterator_detail::cl_iterator; template friend struct boost::unordered::detail::table; template friend struct boost::unordered::detail::table_impl; template friend struct boost::unordered::detail::grouped_table_impl; private: #endif typedef typename Node::node_pointer node_pointer; node_pointer node_; public: typedef typename Node::value_type value_type; iterator() : node_() {} explicit iterator(typename Node::link_pointer x) : node_(static_cast(x)) {} value_type& operator*() const { return node_->value(); } value_type* operator->() const { return &node_->value(); } iterator& operator++() { node_ = static_cast(node_->next_); return *this; } iterator operator++(int) { iterator tmp(node_); node_ = static_cast(node_->next_); return tmp; } bool operator==(iterator const& x) const { return node_ == x.node_; } bool operator!=(iterator const& x) const { return node_ != x.node_; } }; template struct c_iterator : public boost::iterator< std::forward_iterator_tag, typename Node::value_type, std::ptrdiff_t, ConstNodePointer, typename Node::value_type const&> { friend struct boost::unordered::iterator_detail::iterator; #if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) template friend struct boost::unordered::detail::table; template friend struct boost::unordered::detail::table_impl; template friend struct boost::unordered::detail::grouped_table_impl; private: #endif typedef typename Node::node_pointer node_pointer; typedef boost::unordered::iterator_detail::iterator iterator; node_pointer node_; public: typedef typename Node::value_type value_type; c_iterator() : node_() {} explicit c_iterator(typename Node::link_pointer x) : node_(static_cast(x)) {} c_iterator(iterator const& x) : node_(x.node_) {} value_type const& operator*() const { return node_->value(); } value_type const* operator->() const { return &node_->value(); } c_iterator& operator++() { node_ = static_cast(node_->next_); return *this; } c_iterator operator++(int) { c_iterator tmp(node_); node_ = static_cast(node_->next_); return tmp; } friend bool operator==(c_iterator const& x, c_iterator const& y) { return x.node_ == y.node_; } friend bool operator!=(c_iterator const& x, c_iterator const& y) { return x.node_ != y.node_; } }; }}} namespace boost { namespace unordered { namespace detail { /////////////////////////////////////////////////////////////////// // // Node construction template struct node_constructor { private: typedef NodeAlloc node_allocator; typedef boost::unordered::detail::allocator_traits node_allocator_traits; typedef typename node_allocator_traits::value_type node; typedef typename node_allocator_traits::pointer node_pointer; typedef typename node::value_type value_type; protected: node_allocator& alloc_; node_pointer node_; bool node_constructed_; bool value_constructed_; public: node_constructor(node_allocator& n) : alloc_(n), node_(), node_constructed_(false), value_constructed_(false) { } ~node_constructor(); void construct(); template void construct_with_value(BOOST_UNORDERED_EMPLACE_ARGS) { construct(); boost::unordered::detail::construct_value_impl( alloc_, node_->value_ptr(), BOOST_UNORDERED_EMPLACE_FORWARD); value_constructed_ = true; } template void construct_with_value2(BOOST_FWD_REF(A0) a0) { construct(); boost::unordered::detail::construct_value_impl( alloc_, node_->value_ptr(), BOOST_UNORDERED_EMPLACE_ARGS1(boost::forward(a0))); value_constructed_ = true; } value_type const& value() const { BOOST_ASSERT(node_ && node_constructed_ && value_constructed_); return node_->value(); } // no throw node_pointer release() { BOOST_ASSERT(node_ && node_constructed_); node_pointer p = node_; node_ = node_pointer(); return p; } private: node_constructor(node_constructor const&); node_constructor& operator=(node_constructor const&); }; template node_constructor::~node_constructor() { if (node_) { if (value_constructed_) { boost::unordered::detail::destroy_value_impl(alloc_, node_->value_ptr()); } if (node_constructed_) { node_allocator_traits::destroy(alloc_, boost::addressof(*node_)); } node_allocator_traits::deallocate(alloc_, node_, 1); } } template void node_constructor::construct() { if(!node_) { node_constructed_ = false; value_constructed_ = false; node_ = node_allocator_traits::allocate(alloc_, 1); node_allocator_traits::construct(alloc_, boost::addressof(*node_), node()); node_->init(node_); node_constructed_ = true; } else { BOOST_ASSERT(node_constructed_); if (value_constructed_) { boost::unordered::detail::destroy_value_impl(alloc_, node_->value_ptr()); value_constructed_ = false; } } } /////////////////////////////////////////////////////////////////// // // Node Holder // // Temporary store for nodes. Deletes any that aren't used. template struct node_holder : private node_constructor { private: typedef node_constructor base; typedef NodeAlloc node_allocator; typedef boost::unordered::detail::allocator_traits node_allocator_traits; typedef typename node_allocator_traits::value_type node; typedef typename node_allocator_traits::pointer node_pointer; typedef typename node::value_type value_type; typedef typename node::link_pointer link_pointer; typedef boost::unordered::iterator_detail::iterator iterator; node_pointer nodes_; public: template explicit node_holder(Table& b) : base(b.node_alloc()), nodes_() { if (b.size_) { typename Table::link_pointer prev = b.get_previous_start(); nodes_ = static_cast(prev->next_); prev->next_ = link_pointer(); b.size_ = 0; } } ~node_holder(); void node_for_assignment() { if (!this->node_ && nodes_) { this->node_ = nodes_; nodes_ = static_cast(nodes_->next_); this->node_->init(this->node_); this->node_->next_ = link_pointer(); this->node_constructed_ = true; this->value_constructed_ = true; } } template inline void assign_impl(T const& v) { if (this->node_ && this->value_constructed_) { this->node_->value() = v; } else { this->construct_with_value2(v); } } template inline void assign_impl(std::pair const& v) { this->construct_with_value2(v); } template inline void move_assign_impl(T& v) { if (this->node_ && this->value_constructed_) { this->node_->value() = boost::move(v); } else { this->construct_with_value2(boost::move(v)); } } template inline void move_assign_impl(std::pair& v) { this->construct_with_value2(boost::move(v)); } node_pointer copy_of(value_type const& v) { node_for_assignment(); assign_impl(v); return base::release(); } node_pointer move_copy_of(value_type& v) { node_for_assignment(); move_assign_impl(v); return base::release(); } iterator begin() const { return iterator(nodes_); } }; template node_holder::~node_holder() { while (nodes_) { node_pointer p = nodes_; nodes_ = static_cast(p->next_); boost::unordered::detail::destroy_value_impl(this->alloc_, p->value_ptr()); node_allocator_traits::destroy(this->alloc_, boost::addressof(*p)); node_allocator_traits::deallocate(this->alloc_, p, 1); } } /////////////////////////////////////////////////////////////////// // // Bucket template struct bucket { typedef NodePointer link_pointer; link_pointer next_; bucket() : next_() {} link_pointer first_from_start() { return next_; } enum { extra_node = true }; }; struct ptr_bucket { typedef ptr_bucket* link_pointer; link_pointer next_; ptr_bucket() : next_(0) {} link_pointer first_from_start() { return this; } enum { extra_node = false }; }; /////////////////////////////////////////////////////////////////// // // Hash Policy template struct prime_policy { template static inline SizeT apply_hash(Hash const& hf, T const& x) { return hf(x); } static inline SizeT to_bucket(SizeT bucket_count, SizeT hash) { return hash % bucket_count; } static inline SizeT new_bucket_count(SizeT min) { return boost::unordered::detail::next_prime(min); } static inline SizeT prev_bucket_count(SizeT max) { return boost::unordered::detail::prev_prime(max); } }; template struct mix64_policy { template static inline SizeT apply_hash(Hash const& hf, T const& x) { SizeT key = hf(x); key = (~key) + (key << 21); // key = (key << 21) - key - 1; key = key ^ (key >> 24); key = (key + (key << 3)) + (key << 8); // key * 265 key = key ^ (key >> 14); key = (key + (key << 2)) + (key << 4); // key * 21 key = key ^ (key >> 28); key = key + (key << 31); return key; } static inline SizeT to_bucket(SizeT bucket_count, SizeT hash) { return hash & (bucket_count - 1); } static inline SizeT new_bucket_count(SizeT min) { if (min <= 4) return 4; --min; min |= min >> 1; min |= min >> 2; min |= min >> 4; min |= min >> 8; min |= min >> 16; min |= min >> 32; return min + 1; } static inline SizeT prev_bucket_count(SizeT max) { max |= max >> 1; max |= max >> 2; max |= max >> 4; max |= max >> 8; max |= max >> 16; max |= max >> 32; return (max >> 1) + 1; } }; template struct pick_policy_impl { typedef prime_policy type; }; template <> struct pick_policy_impl<64, 2> { typedef mix64_policy type; }; struct pick_policy : pick_policy_impl< std::numeric_limits::digits, std::numeric_limits::radix> {}; //////////////////////////////////////////////////////////////////////////// // Functions // Assigning and swapping the equality and hash function objects // needs strong exception safety. To implement that normally we'd // require one of them to be known to not throw and the other to // guarantee strong exception safety. Unfortunately they both only // have basic exception safety. So to acheive strong exception // safety we have storage space for two copies, and assign the new // copies to the unused space. Then switch to using that to use // them. This is implemented in 'set_hash_functions' which // atomically assigns the new function objects in a strongly // exception safe manner. template class set_hash_functions; template class functions { public: static const bool nothrow_move_assignable = boost::is_nothrow_move_assignable::value && boost::is_nothrow_move_assignable

::value; static const bool nothrow_move_constructible = boost::is_nothrow_move_constructible::value && boost::is_nothrow_move_constructible

::value; private: friend class boost::unordered::detail::set_hash_functions; functions& operator=(functions const&); typedef compressed function_pair; typedef typename boost::aligned_storage< sizeof(function_pair), boost::alignment_of::value>::type aligned_function; bool current_; // The currently active functions. aligned_function funcs_[2]; function_pair const& current() const { return *static_cast( static_cast(&funcs_[current_])); } function_pair& current() { return *static_cast( static_cast(&funcs_[current_])); } void construct(bool which, H const& hf, P const& eq) { new((void*) &funcs_[which]) function_pair(hf, eq); } void construct(bool which, function_pair const& f) { new((void*) &funcs_[which]) function_pair(f); } void construct(bool which, function_pair& f, boost::unordered::detail::move_tag m) { new((void*) &funcs_[which]) function_pair(f, m); } void destroy(bool which) { boost::unordered::detail::destroy((function_pair*)(&funcs_[which])); } public: typedef boost::unordered::detail::set_hash_functions set_hash_functions; functions(H const& hf, P const& eq) : current_(false) { construct(current_, hf, eq); } functions(functions const& bf) : current_(false) { construct(current_, bf.current()); } functions(functions& bf, boost::unordered::detail::move_tag m) : current_(false) { if (nothrow_move_constructible) { construct(current_, bf.current(), m); } else { construct(current_, bf.current()); } } ~functions() { this->destroy(current_); } H const& hash_function() const { return current().first(); } P const& key_eq() const { return current().second(); } }; template class set_hash_functions { set_hash_functions(set_hash_functions const&); set_hash_functions& operator=(set_hash_functions const&); typedef functions functions_type; functions_type& functions_; bool tmp_functions_; public: set_hash_functions(functions_type& f, H const& h, P const& p) : functions_(f), tmp_functions_(!f.current_) { f.construct(tmp_functions_, h, p); } set_hash_functions(functions_type& f, functions_type const& other) : functions_(f), tmp_functions_(!f.current_) { f.construct(tmp_functions_, other.current()); } ~set_hash_functions() { functions_.destroy(tmp_functions_); } void commit() { functions_.current_ = tmp_functions_; tmp_functions_ = !tmp_functions_; } }; template class set_hash_functions { set_hash_functions(set_hash_functions const&); set_hash_functions& operator=(set_hash_functions const&); typedef functions functions_type; functions_type& functions_; H hash_; P pred_; public: set_hash_functions(functions_type& f, H const& h, P const& p) : functions_(f), hash_(h), pred_(p) {} set_hash_functions(functions_type& f, functions_type const& other) : functions_(f), hash_(other.hash_function()), pred_(other.key_eq()) {} void commit() { functions_.current().first() = boost::move(hash_); functions_.current().second() = boost::move(pred_); } }; //////////////////////////////////////////////////////////////////////////// // rvalue parameters when type can't be a BOOST_RV_REF(T) parameter // e.g. for int #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) # define BOOST_UNORDERED_RV_REF(T) BOOST_RV_REF(T) #else struct please_ignore_this_overload { typedef please_ignore_this_overload type; }; template struct rv_ref_impl { typedef BOOST_RV_REF(T) type; }; template struct rv_ref : boost::detail::if_true< boost::is_class::value >::BOOST_NESTED_TEMPLATE then < boost::unordered::detail::rv_ref_impl, please_ignore_this_overload >::type {}; # define BOOST_UNORDERED_RV_REF(T) \ typename boost::unordered::detail::rv_ref::type #endif }}} #endif passenger-4.0.37/ext/boost/unordered/detail/equivalent.hpp000644 000765 000024 00000053273 12233035540 024273 0ustar00honglistaff000000 000000 // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. // Copyright (C) 2005-2011 Daniel James // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNORDERED_DETAIL_EQUIVALENT_HPP_INCLUDED #define BOOST_UNORDERED_DETAIL_EQUIVALENT_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include namespace boost { namespace unordered { namespace detail { template struct grouped_node; template struct grouped_ptr_node; template struct grouped_table_impl; template struct grouped_node : boost::unordered::detail::value_base { typedef typename ::boost::unordered::detail::rebind_wrap< A, grouped_node >::type allocator; typedef typename ::boost::unordered::detail:: allocator_traits::pointer node_pointer; typedef node_pointer link_pointer; link_pointer next_; node_pointer group_prev_; std::size_t hash_; grouped_node() : next_(), group_prev_(), hash_(0) {} void init(node_pointer self) { group_prev_ = self; } private: grouped_node& operator=(grouped_node const&); }; template struct grouped_ptr_node : boost::unordered::detail::value_base, boost::unordered::detail::ptr_bucket { typedef boost::unordered::detail::ptr_bucket bucket_base; typedef grouped_ptr_node* node_pointer; typedef ptr_bucket* link_pointer; node_pointer group_prev_; std::size_t hash_; grouped_ptr_node() : bucket_base(), group_prev_(0), hash_(0) {} void init(node_pointer self) { group_prev_ = self; } private: grouped_ptr_node& operator=(grouped_ptr_node const&); }; // If the allocator uses raw pointers use grouped_ptr_node // Otherwise use grouped_node. template struct pick_grouped_node2 { typedef boost::unordered::detail::grouped_node node; typedef typename boost::unordered::detail::allocator_traits< typename boost::unordered::detail::rebind_wrap::type >::pointer node_pointer; typedef boost::unordered::detail::bucket bucket; typedef node_pointer link_pointer; }; template struct pick_grouped_node2*, boost::unordered::detail::ptr_bucket*> { typedef boost::unordered::detail::grouped_ptr_node node; typedef boost::unordered::detail::ptr_bucket bucket; typedef bucket* link_pointer; }; template struct pick_grouped_node { typedef boost::unordered::detail::allocator_traits< typename boost::unordered::detail::rebind_wrap >::type > tentative_node_traits; typedef boost::unordered::detail::allocator_traits< typename boost::unordered::detail::rebind_wrap::type > tentative_bucket_traits; typedef pick_grouped_node2 pick; typedef typename pick::node node; typedef typename pick::bucket bucket; typedef typename pick::link_pointer link_pointer; }; template struct multiset { typedef boost::unordered::detail::multiset types; typedef A allocator; typedef T value_type; typedef H hasher; typedef P key_equal; typedef T key_type; typedef boost::unordered::detail::allocator_traits traits; typedef boost::unordered::detail::pick_grouped_node pick; typedef typename pick::node node; typedef typename pick::bucket bucket; typedef typename pick::link_pointer link_pointer; typedef boost::unordered::detail::grouped_table_impl table; typedef boost::unordered::detail::set_extractor extractor; typedef boost::unordered::detail::pick_policy::type policy; }; template struct multimap { typedef boost::unordered::detail::multimap types; typedef A allocator; typedef std::pair value_type; typedef H hasher; typedef P key_equal; typedef K key_type; typedef boost::unordered::detail::allocator_traits traits; typedef boost::unordered::detail::pick_grouped_node pick; typedef typename pick::node node; typedef typename pick::bucket bucket; typedef typename pick::link_pointer link_pointer; typedef boost::unordered::detail::grouped_table_impl table; typedef boost::unordered::detail::map_extractor extractor; typedef boost::unordered::detail::pick_policy::type policy; }; template struct grouped_table_impl : boost::unordered::detail::table { typedef boost::unordered::detail::table table; typedef typename table::value_type value_type; typedef typename table::bucket bucket; typedef typename table::policy policy; typedef typename table::node_pointer node_pointer; typedef typename table::node_allocator node_allocator; typedef typename table::node_allocator_traits node_allocator_traits; typedef typename table::bucket_pointer bucket_pointer; typedef typename table::link_pointer link_pointer; typedef typename table::hasher hasher; typedef typename table::key_equal key_equal; typedef typename table::key_type key_type; typedef typename table::node_constructor node_constructor; typedef typename table::extractor extractor; typedef typename table::iterator iterator; typedef typename table::c_iterator c_iterator; // Constructors grouped_table_impl(std::size_t n, hasher const& hf, key_equal const& eq, node_allocator const& a) : table(n, hf, eq, a) {} grouped_table_impl(grouped_table_impl const& x) : table(x, node_allocator_traits:: select_on_container_copy_construction(x.node_alloc())) { this->init(x); } grouped_table_impl(grouped_table_impl const& x, node_allocator const& a) : table(x, a) { this->init(x); } grouped_table_impl(grouped_table_impl& x, boost::unordered::detail::move_tag m) : table(x, m) {} grouped_table_impl(grouped_table_impl& x, node_allocator const& a, boost::unordered::detail::move_tag m) : table(x, a, m) { this->move_init(x); } // Accessors template iterator find_node_impl( std::size_t key_hash, Key const& k, Pred const& eq) const { std::size_t bucket_index = this->hash_to_bucket(key_hash); iterator n = this->begin(bucket_index); for (;;) { if (!n.node_) return n; std::size_t node_hash = n.node_->hash_; if (key_hash == node_hash) { if (eq(k, this->get_key(*n))) return n; } else { if (this->hash_to_bucket(node_hash) != bucket_index) return iterator(); } n = iterator(n.node_->group_prev_->next_); } } std::size_t count(key_type const& k) const { iterator n = this->find_node(k); if (!n.node_) return 0; std::size_t x = 0; node_pointer it = n.node_; do { it = it->group_prev_; ++x; } while(it != n.node_); return x; } std::pair equal_range(key_type const& k) const { iterator n = this->find_node(k); return std::make_pair( n, n.node_ ? iterator(n.node_->group_prev_->next_) : n); } // Equality bool equals(grouped_table_impl const& other) const { if(this->size_ != other.size_) return false; for(iterator n1 = this->begin(); n1.node_;) { iterator n2 = other.find_matching_node(n1); if (!n2.node_) return false; iterator end1(n1.node_->group_prev_->next_); iterator end2(n2.node_->group_prev_->next_); if (!group_equals(n1, end1, n2, end2)) return false; n1 = end1; } return true; } static bool group_equals(iterator n1, iterator end1, iterator n2, iterator end2) { for(;;) { if (*n1 != *n2) break; ++n1; ++n2; if (n1 == end1) return n2 == end2; if (n2 == end2) return false; } for(iterator n1a = n1, n2a = n2;;) { ++n1a; ++n2a; if (n1a == end1) { if (n2a == end2) break; else return false; } if (n2a == end2) return false; } iterator start = n1; for(;n1 != end1; ++n1) { value_type const& v = *n1; if (find(start, n1, v)) continue; std::size_t matches = count_equal(n2, end2, v); if (!matches) return false; iterator next = n1; ++next; if (matches != 1 + count_equal(next, end1, v)) return false; } return true; } static bool find(iterator n, iterator end, value_type const& v) { for(;n != end; ++n) if (*n == v) return true; return false; } static std::size_t count_equal(iterator n, iterator end, value_type const& v) { std::size_t count = 0; for(;n != end; ++n) if (*n == v) ++count; return count; } // Emplace/Insert static inline void add_after_node( node_pointer n, node_pointer pos) { n->next_ = pos->group_prev_->next_; n->group_prev_ = pos->group_prev_; pos->group_prev_->next_ = n; pos->group_prev_ = n; } inline iterator add_node( node_constructor& a, std::size_t key_hash, iterator pos) { node_pointer n = a.release(); n->hash_ = key_hash; if (pos.node_) { this->add_after_node(n, pos.node_); if (n->next_) { std::size_t next_bucket = this->hash_to_bucket( static_cast(n->next_)->hash_); if (next_bucket != this->hash_to_bucket(key_hash)) { this->get_bucket(next_bucket)->next_ = n; } } } else { bucket_pointer b = this->get_bucket( this->hash_to_bucket(key_hash)); if (!b->next_) { link_pointer start_node = this->get_previous_start(); if (start_node->next_) { this->get_bucket(this->hash_to_bucket( static_cast(start_node->next_)->hash_ ))->next_ = n; } b->next_ = start_node; n->next_ = start_node->next_; start_node->next_ = n; } else { n->next_ = b->next_->next_; b->next_->next_ = n; } } ++this->size_; return iterator(n); } iterator emplace_impl(node_constructor& a) { key_type const& k = this->get_key(a.value()); std::size_t key_hash = this->hash(k); iterator position = this->find_node(key_hash, k); // reserve has basic exception safety if the hash function // throws, strong otherwise. this->reserve_for_insert(this->size_ + 1); return this->add_node(a, key_hash, position); } void emplace_impl_no_rehash(node_constructor& a) { key_type const& k = this->get_key(a.value()); std::size_t key_hash = this->hash(k); this->add_node(a, key_hash, this->find_node(key_hash, k)); } #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) # if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) iterator emplace(boost::unordered::detail::emplace_args1< boost::unordered::detail::please_ignore_this_overload> const&) { BOOST_ASSERT(false); return iterator(); } # else iterator emplace( boost::unordered::detail::please_ignore_this_overload const&) { BOOST_ASSERT(false); return iterator(); } # endif #endif template iterator emplace(BOOST_UNORDERED_EMPLACE_ARGS) { node_constructor a(this->node_alloc()); a.construct_with_value(BOOST_UNORDERED_EMPLACE_FORWARD); return iterator(emplace_impl(a)); } //////////////////////////////////////////////////////////////////////// // Insert range methods // if hash function throws, or inserting > 1 element, basic exception // safety. Strong otherwise template typename boost::unordered::detail::enable_if_forward::type insert_range(I i, I j) { if(i == j) return; std::size_t distance = boost::unordered::detail::distance(i, j); if(distance == 1) { node_constructor a(this->node_alloc()); a.construct_with_value2(*i); emplace_impl(a); } else { // Only require basic exception safety here this->reserve_for_insert(this->size_ + distance); node_constructor a(this->node_alloc()); for (; i != j; ++i) { a.construct_with_value2(*i); emplace_impl_no_rehash(a); } } } template typename boost::unordered::detail::disable_if_forward::type insert_range(I i, I j) { node_constructor a(this->node_alloc()); for (; i != j; ++i) { a.construct_with_value2(*i); emplace_impl(a); } } //////////////////////////////////////////////////////////////////////// // Erase // // no throw std::size_t erase_key(key_type const& k) { if(!this->size_) return 0; std::size_t key_hash = this->hash(k); std::size_t bucket_index = this->hash_to_bucket(key_hash); link_pointer prev = this->get_previous_start(bucket_index); if (!prev) return 0; for (;;) { if (!prev->next_) return 0; std::size_t node_hash = static_cast(prev->next_)->hash_; if (this->hash_to_bucket(node_hash) != bucket_index) return 0; if (node_hash == key_hash && this->key_eq()(k, this->get_key( static_cast(prev->next_)->value()))) break; prev = static_cast(prev->next_)->group_prev_; } node_pointer first_node = static_cast(prev->next_); link_pointer end = first_node->group_prev_->next_; std::size_t count = this->delete_nodes(prev, end); this->fix_bucket(bucket_index, prev); return count; } iterator erase(c_iterator r) { BOOST_ASSERT(r.node_); iterator next(r.node_); ++next; erase_nodes(r.node_, next.node_); return next; } iterator erase_range(c_iterator r1, c_iterator r2) { if (r1 == r2) return iterator(r2.node_); erase_nodes(r1.node_, r2.node_); return iterator(r2.node_); } link_pointer erase_nodes(node_pointer begin, node_pointer end) { std::size_t bucket_index = this->hash_to_bucket(begin->hash_); // Split the groups containing 'begin' and 'end'. // And get the pointer to the node before begin while // we're at it. link_pointer prev = split_groups(begin, end); // If we don't have a 'prev' it means that begin is at the // beginning of a block, so search through the blocks in the // same bucket. if (!prev) { prev = this->get_previous_start(bucket_index); while (prev->next_ != begin) prev = static_cast(prev->next_)->group_prev_; } // Delete the nodes. do { link_pointer group_end = static_cast(prev->next_)->group_prev_->next_; this->delete_nodes(prev, group_end); bucket_index = this->fix_bucket(bucket_index, prev); } while(prev->next_ != end); return prev; } static link_pointer split_groups(node_pointer begin, node_pointer end) { node_pointer prev = begin->group_prev_; if (prev->next_ != begin) prev = node_pointer(); if (end) { node_pointer first = end; while (first != begin && first->group_prev_->next_ == first) { first = first->group_prev_; } boost::swap(first->group_prev_, end->group_prev_); if (first == begin) return prev; } if (prev) { node_pointer first = prev; while (first->group_prev_->next_ == first) { first = first->group_prev_; } boost::swap(first->group_prev_, begin->group_prev_); } return prev; } //////////////////////////////////////////////////////////////////////// // fill_buckets template static void fill_buckets(iterator n, table& dst, NodeCreator& creator) { link_pointer prev = dst.get_previous_start(); while (n.node_) { std::size_t key_hash = n.node_->hash_; iterator group_end(n.node_->group_prev_->next_); node_pointer first_node = creator.create(*n); node_pointer end = first_node; first_node->hash_ = key_hash; prev->next_ = first_node; ++dst.size_; for (++n; n != group_end; ++n) { end = creator.create(*n); end->hash_ = key_hash; add_after_node(end, first_node); ++dst.size_; } prev = place_in_bucket(dst, prev, end); } } // strong otherwise exception safety void rehash_impl(std::size_t num_buckets) { BOOST_ASSERT(this->buckets_); this->create_buckets(num_buckets); link_pointer prev = this->get_previous_start(); while (prev->next_) prev = place_in_bucket(*this, prev, static_cast(prev->next_)->group_prev_); } // Iterate through the nodes placing them in the correct buckets. // pre: prev->next_ is not null. static link_pointer place_in_bucket(table& dst, link_pointer prev, node_pointer end) { bucket_pointer b = dst.get_bucket(dst.hash_to_bucket(end->hash_)); if (!b->next_) { b->next_ = prev; return end; } else { link_pointer next = end->next_; end->next_ = b->next_->next_; b->next_->next_ = prev->next_; prev->next_ = next; return prev; } } }; }}} #endif passenger-4.0.37/ext/boost/unordered/detail/extract_key.hpp000644 000765 000024 00000013463 12233035540 024435 0ustar00honglistaff000000 000000 // Copyright (C) 2005-2011 Daniel James // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNORDERED_DETAIL_EXTRACT_KEY_HPP_INCLUDED #define BOOST_UNORDERED_DETAIL_EXTRACT_KEY_HPP_INCLUDED #include namespace boost { namespace unordered { namespace detail { // key extractors // // no throw // // 'extract_key' is called with the emplace parameters to return a // key if available or 'no_key' is one isn't and will need to be // constructed. This could be done by overloading the emplace implementation // for the different cases, but that's a bit tricky on compilers without // variadic templates. struct no_key { no_key() {} template no_key(T const&) {} }; template struct is_key { template static choice1::type test(T2 const&); static choice2::type test(Key const&); enum { value = sizeof(test(boost::unordered::detail::make())) == sizeof(choice2::type) }; typedef typename boost::detail::if_true:: BOOST_NESTED_TEMPLATE then::type type; }; template struct set_extractor { typedef ValueType value_type; typedef ValueType key_type; static key_type const& extract(key_type const& v) { return v; } static no_key extract() { return no_key(); } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template static no_key extract(Args const&...) { return no_key(); } #else template static no_key extract(Arg const&) { return no_key(); } template static no_key extract(Arg1 const&, Arg2 const&) { return no_key(); } #endif }; template struct map_extractor { typedef ValueType value_type; typedef typename boost::remove_const::type key_type; static key_type const& extract(value_type const& v) { return v.first; } template static key_type const& extract(std::pair const& v) { return v.first; } template static key_type const& extract( std::pair const& v) { return v.first; } template static key_type const& extract(key_type const& k, Arg1 const&) { return k; } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template static no_key extract(Args const&...) { return no_key(); } #else static no_key extract() { return no_key(); } template static no_key extract(Arg const&) { return no_key(); } template static no_key extract(Arg const&, Arg1 const&) { return no_key(); } #endif #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) #define BOOST_UNORDERED_KEY_FROM_TUPLE(namespace_) \ template \ static no_key extract(boost::unordered::piecewise_construct_t, \ namespace_ tuple<> const&, T2 const&) \ { \ return no_key(); \ } \ \ template \ static typename is_key::type \ extract(boost::unordered::piecewise_construct_t, \ namespace_ tuple const& k, T2 const&) \ { \ return typename is_key::type( \ namespace_ get<0>(k)); \ } #else #define BOOST_UNORDERED_KEY_FROM_TUPLE(namespace_) \ static no_key extract(boost::unordered::piecewise_construct_t, \ namespace_ tuple<> const&) \ { \ return no_key(); \ } \ \ template \ static typename is_key::type \ extract(boost::unordered::piecewise_construct_t, \ namespace_ tuple const& k) \ { \ return typename is_key::type( \ namespace_ get<0>(k)); \ } #endif BOOST_UNORDERED_KEY_FROM_TUPLE(boost::) #if !defined(BOOST_NO_CXX11_HDR_TUPLE) BOOST_UNORDERED_KEY_FROM_TUPLE(std::) #endif }; }}} #endif passenger-4.0.37/ext/boost/unordered/detail/fwd.hpp000644 000765 000024 00000001002 12233035540 022655 0ustar00honglistaff000000 000000 // Copyright (C) 2008-2011 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNORDERED_FWD_HPP_INCLUDED #define BOOST_UNORDERED_FWD_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif namespace boost { namespace unordered { struct piecewise_construct_t {}; const piecewise_construct_t piecewise_construct = piecewise_construct_t(); } } #endif passenger-4.0.37/ext/boost/unordered/detail/table.hpp000644 000765 000024 00000064674 12233035540 023214 0ustar00honglistaff000000 000000 // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. // Copyright (C) 2005-2011 Daniel James // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNORDERED_DETAIL_ALL_HPP_INCLUDED #define BOOST_UNORDERED_DETAIL_ALL_HPP_INCLUDED #include #include #include #include #include #if defined(BOOST_MSVC) #pragma warning(push) #pragma warning(disable:4127) // conditional expression is constant #endif #if defined(BOOST_UNORDERED_DEPRECATED_EQUALITY) #if defined(__EDG__) #elif defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) #pragma message("Warning: BOOST_UNORDERED_DEPRECATED_EQUALITY is no longer supported.") #elif defined(__GNUC__) || defined(__HP_aCC) || \ defined(__SUNPRO_CC) || defined(__IBMCPP__) #warning "BOOST_UNORDERED_DEPRECATED_EQUALITY is no longer supported." #endif #endif namespace boost { namespace unordered { namespace detail { //////////////////////////////////////////////////////////////////////////// // convert double to std::size_t inline std::size_t double_to_size(double f) { return f >= static_cast( (std::numeric_limits::max)()) ? (std::numeric_limits::max)() : static_cast(f); } // The space used to store values in a node. template struct value_base { typedef ValueType value_type; typename boost::aligned_storage< sizeof(value_type), boost::alignment_of::value>::type data_; void* address() { return this; } value_type& value() { return *(ValueType*) this; } value_type* value_ptr() { return (ValueType*) this; } private: value_base& operator=(value_base const&); }; template struct copy_nodes { typedef boost::unordered::detail::allocator_traits node_allocator_traits; node_constructor constructor; explicit copy_nodes(NodeAlloc& a) : constructor(a) {} typename node_allocator_traits::pointer create( typename node_allocator_traits::value_type::value_type const& v) { constructor.construct_with_value2(v); return constructor.release(); } }; template struct move_nodes { typedef boost::unordered::detail::allocator_traits node_allocator_traits; node_constructor constructor; explicit move_nodes(NodeAlloc& a) : constructor(a) {} typename node_allocator_traits::pointer create( typename node_allocator_traits::value_type::value_type& v) { constructor.construct_with_value2(boost::move(v)); return constructor.release(); } }; template struct assign_nodes { node_holder holder; explicit assign_nodes(Buckets& b) : holder(b) {} typename Buckets::node_pointer create( typename Buckets::value_type const& v) { return holder.copy_of(v); } }; template struct move_assign_nodes { node_holder holder; explicit move_assign_nodes(Buckets& b) : holder(b) {} typename Buckets::node_pointer create( typename Buckets::value_type& v) { return holder.move_copy_of(v); } }; template struct table : boost::unordered::detail::functions< typename Types::hasher, typename Types::key_equal> { private: table(table const&); table& operator=(table const&); public: typedef typename Types::node node; typedef typename Types::bucket bucket; typedef typename Types::hasher hasher; typedef typename Types::key_equal key_equal; typedef typename Types::key_type key_type; typedef typename Types::extractor extractor; typedef typename Types::value_type value_type; typedef typename Types::table table_impl; typedef typename Types::link_pointer link_pointer; typedef typename Types::policy policy; typedef boost::unordered::detail::functions< typename Types::hasher, typename Types::key_equal> functions; typedef typename functions::set_hash_functions set_hash_functions; typedef typename Types::allocator allocator; typedef typename boost::unordered::detail:: rebind_wrap::type node_allocator; typedef typename boost::unordered::detail:: rebind_wrap::type bucket_allocator; typedef boost::unordered::detail::allocator_traits node_allocator_traits; typedef boost::unordered::detail::allocator_traits bucket_allocator_traits; typedef typename node_allocator_traits::pointer node_pointer; typedef typename node_allocator_traits::const_pointer const_node_pointer; typedef typename bucket_allocator_traits::pointer bucket_pointer; typedef boost::unordered::detail::node_constructor node_constructor; typedef boost::unordered::iterator_detail:: iterator iterator; typedef boost::unordered::iterator_detail:: c_iterator c_iterator; typedef boost::unordered::iterator_detail:: l_iterator l_iterator; typedef boost::unordered::iterator_detail:: cl_iterator cl_iterator; //////////////////////////////////////////////////////////////////////// // Members boost::unordered::detail::compressed allocators_; std::size_t bucket_count_; std::size_t size_; float mlf_; std::size_t max_load_; bucket_pointer buckets_; //////////////////////////////////////////////////////////////////////// // Data access bucket_allocator const& bucket_alloc() const { return allocators_.first(); } node_allocator const& node_alloc() const { return allocators_.second(); } bucket_allocator& bucket_alloc() { return allocators_.first(); } node_allocator& node_alloc() { return allocators_.second(); } std::size_t max_bucket_count() const { // -1 to account for the start bucket. return policy::prev_bucket_count( bucket_allocator_traits::max_size(bucket_alloc()) - 1); } bucket_pointer get_bucket(std::size_t bucket_index) const { BOOST_ASSERT(buckets_); return buckets_ + static_cast(bucket_index); } link_pointer get_previous_start() const { return get_bucket(bucket_count_)->first_from_start(); } link_pointer get_previous_start(std::size_t bucket_index) const { return get_bucket(bucket_index)->next_; } iterator begin() const { return size_ ? iterator(get_previous_start()->next_) : iterator(); } iterator begin(std::size_t bucket_index) const { if (!size_) return iterator(); link_pointer prev = get_previous_start(bucket_index); return prev ? iterator(prev->next_) : iterator(); } std::size_t hash_to_bucket(std::size_t hash) const { return policy::to_bucket(bucket_count_, hash); } float load_factor() const { BOOST_ASSERT(bucket_count_ != 0); return static_cast(size_) / static_cast(bucket_count_); } std::size_t bucket_size(std::size_t index) const { iterator it = begin(index); if (!it.node_) return 0; std::size_t count = 0; while(it.node_ && hash_to_bucket(it.node_->hash_) == index) { ++count; ++it; } return count; } //////////////////////////////////////////////////////////////////////// // Load methods std::size_t max_size() const { using namespace std; // size < mlf_ * count return boost::unordered::detail::double_to_size(ceil( static_cast(mlf_) * static_cast(max_bucket_count()) )) - 1; } void recalculate_max_load() { using namespace std; // From 6.3.1/13: // Only resize when size >= mlf_ * count max_load_ = buckets_ ? boost::unordered::detail::double_to_size(ceil( static_cast(mlf_) * static_cast(bucket_count_) )) : 0; } void max_load_factor(float z) { BOOST_ASSERT(z > 0); mlf_ = (std::max)(z, minimum_max_load_factor); recalculate_max_load(); } std::size_t min_buckets_for_size(std::size_t size) const { BOOST_ASSERT(mlf_ >= minimum_max_load_factor); using namespace std; // From 6.3.1/13: // size < mlf_ * count // => count > size / mlf_ // // Or from rehash post-condition: // count > size / mlf_ return policy::new_bucket_count( boost::unordered::detail::double_to_size(floor( static_cast(size) / static_cast(mlf_))) + 1); } //////////////////////////////////////////////////////////////////////// // Constructors table(std::size_t num_buckets, hasher const& hf, key_equal const& eq, node_allocator const& a) : functions(hf, eq), allocators_(a,a), bucket_count_(policy::new_bucket_count(num_buckets)), size_(0), mlf_(1.0f), max_load_(0), buckets_() {} table(table const& x, node_allocator const& a) : functions(x), allocators_(a,a), bucket_count_(x.min_buckets_for_size(x.size_)), size_(0), mlf_(x.mlf_), max_load_(0), buckets_() {} table(table& x, boost::unordered::detail::move_tag m) : functions(x, m), allocators_(x.allocators_, m), bucket_count_(x.bucket_count_), size_(x.size_), mlf_(x.mlf_), max_load_(x.max_load_), buckets_(x.buckets_) { x.buckets_ = bucket_pointer(); x.size_ = 0; x.max_load_ = 0; } table(table& x, node_allocator const& a, boost::unordered::detail::move_tag m) : functions(x, m), allocators_(a, a), bucket_count_(x.bucket_count_), size_(0), mlf_(x.mlf_), max_load_(x.max_load_), buckets_() {} //////////////////////////////////////////////////////////////////////// // Initialisation. void init(table const& x) { if (x.size_) { create_buckets(bucket_count_); copy_nodes copy(node_alloc()); table_impl::fill_buckets(x.begin(), *this, copy); } } void move_init(table& x) { if(node_alloc() == x.node_alloc()) { move_buckets_from(x); } else if(x.size_) { // TODO: Could pick new bucket size? create_buckets(bucket_count_); move_nodes move(node_alloc()); node_holder nodes(x); table_impl::fill_buckets(nodes.begin(), *this, move); } } //////////////////////////////////////////////////////////////////////// // Create buckets void create_buckets(std::size_t new_count) { boost::unordered::detail::array_constructor constructor(bucket_alloc()); // Creates an extra bucket to act as the start node. constructor.construct(bucket(), new_count + 1); if (buckets_) { // Copy the nodes to the new buckets, including the dummy // node if there is one. (constructor.get() + static_cast(new_count))->next_ = (buckets_ + static_cast( bucket_count_))->next_; destroy_buckets(); } else if (bucket::extra_node) { node_constructor a(node_alloc()); a.construct(); (constructor.get() + static_cast(new_count))->next_ = a.release(); } bucket_count_ = new_count; buckets_ = constructor.release(); recalculate_max_load(); } //////////////////////////////////////////////////////////////////////// // Swap and Move void swap_allocators(table& other, false_type) { // According to 23.2.1.8, if propagate_on_container_swap is // false the behaviour is undefined unless the allocators // are equal. BOOST_ASSERT(node_alloc() == other.node_alloc()); } void swap_allocators(table& other, true_type) { allocators_.swap(other.allocators_); } // Only swaps the allocators if propagate_on_container_swap void swap(table& x) { set_hash_functions op1(*this, x); set_hash_functions op2(x, *this); // I think swap can throw if Propagate::value, // since the allocators' swap can throw. Not sure though. swap_allocators(x, boost::unordered::detail::integral_constant:: propagate_on_container_swap::value>()); boost::swap(buckets_, x.buckets_); boost::swap(bucket_count_, x.bucket_count_); boost::swap(size_, x.size_); std::swap(mlf_, x.mlf_); std::swap(max_load_, x.max_load_); op1.commit(); op2.commit(); } void move_buckets_from(table& other) { BOOST_ASSERT(node_alloc() == other.node_alloc()); BOOST_ASSERT(!buckets_); buckets_ = other.buckets_; bucket_count_ = other.bucket_count_; size_ = other.size_; other.buckets_ = bucket_pointer(); other.size_ = 0; other.max_load_ = 0; } //////////////////////////////////////////////////////////////////////// // Delete/destruct ~table() { delete_buckets(); } void delete_node(link_pointer prev) { node_pointer n = static_cast(prev->next_); prev->next_ = n->next_; boost::unordered::detail::destroy_value_impl(node_alloc(), n->value_ptr()); node_allocator_traits::destroy(node_alloc(), boost::addressof(*n)); node_allocator_traits::deallocate(node_alloc(), n, 1); --size_; } std::size_t delete_nodes(link_pointer prev, link_pointer end) { BOOST_ASSERT(prev->next_ != end); std::size_t count = 0; do { delete_node(prev); ++count; } while (prev->next_ != end); return count; } void delete_buckets() { if(buckets_) { if (size_) delete_nodes(get_previous_start(), link_pointer()); if (bucket::extra_node) { node_pointer n = static_cast( get_bucket(bucket_count_)->next_); node_allocator_traits::destroy(node_alloc(), boost::addressof(*n)); node_allocator_traits::deallocate(node_alloc(), n, 1); } destroy_buckets(); buckets_ = bucket_pointer(); max_load_ = 0; } BOOST_ASSERT(!size_); } void clear() { if (!size_) return; delete_nodes(get_previous_start(), link_pointer()); clear_buckets(); BOOST_ASSERT(!size_); } void clear_buckets() { bucket_pointer end = get_bucket(bucket_count_); for(bucket_pointer it = buckets_; it != end; ++it) { it->next_ = node_pointer(); } } void destroy_buckets() { bucket_pointer end = get_bucket(bucket_count_ + 1); for(bucket_pointer it = buckets_; it != end; ++it) { bucket_allocator_traits::destroy(bucket_alloc(), boost::addressof(*it)); } bucket_allocator_traits::deallocate(bucket_alloc(), buckets_, bucket_count_ + 1); } //////////////////////////////////////////////////////////////////////// // Fix buckets after delete // std::size_t fix_bucket(std::size_t bucket_index, link_pointer prev) { link_pointer end = prev->next_; std::size_t bucket_index2 = bucket_index; if (end) { bucket_index2 = hash_to_bucket( static_cast(end)->hash_); // If begin and end are in the same bucket, then // there's nothing to do. if (bucket_index == bucket_index2) return bucket_index2; // Update the bucket containing end. get_bucket(bucket_index2)->next_ = prev; } // Check if this bucket is now empty. bucket_pointer this_bucket = get_bucket(bucket_index); if (this_bucket->next_ == prev) this_bucket->next_ = link_pointer(); return bucket_index2; } //////////////////////////////////////////////////////////////////////// // Assignment void assign(table const& x) { if (this != boost::addressof(x)) { assign(x, boost::unordered::detail::integral_constant:: propagate_on_container_copy_assignment::value>()); } } void assign(table const& x, false_type) { // Strong exception safety. set_hash_functions new_func_this(*this, x); new_func_this.commit(); mlf_ = x.mlf_; recalculate_max_load(); if (!size_ && !x.size_) return; if (x.size_ >= max_load_) { create_buckets(min_buckets_for_size(x.size_)); } else { clear_buckets(); } // assign_nodes takes ownership of the container's elements, // assigning to them if possible, and deleting any that are // left over. assign_nodes assign(*this); table_impl::fill_buckets(x.begin(), *this, assign); } void assign(table const& x, true_type) { if (node_alloc() == x.node_alloc()) { allocators_.assign(x.allocators_); assign(x, false_type()); } else { set_hash_functions new_func_this(*this, x); // Delete everything with current allocators before assigning // the new ones. delete_buckets(); allocators_.assign(x.allocators_); // Copy over other data, all no throw. new_func_this.commit(); mlf_ = x.mlf_; bucket_count_ = min_buckets_for_size(x.size_); max_load_ = 0; // Finally copy the elements. if (x.size_) { create_buckets(bucket_count_); copy_nodes copy(node_alloc()); table_impl::fill_buckets(x.begin(), *this, copy); } } } void move_assign(table& x) { if (this != boost::addressof(x)) { move_assign(x, boost::unordered::detail::integral_constant:: propagate_on_container_move_assignment::value>()); } } void move_assign(table& x, true_type) { delete_buckets(); allocators_.move_assign(x.allocators_); move_assign_no_alloc(x); } void move_assign(table& x, false_type) { if (node_alloc() == x.node_alloc()) { delete_buckets(); move_assign_no_alloc(x); } else { set_hash_functions new_func_this(*this, x); new_func_this.commit(); mlf_ = x.mlf_; recalculate_max_load(); if (!size_ && !x.size_) return; if (x.size_ >= max_load_) { create_buckets(min_buckets_for_size(x.size_)); } else { clear_buckets(); } // move_assign_nodes takes ownership of the container's // elements, assigning to them if possible, and deleting // any that are left over. move_assign_nodes
assign(*this); node_holder nodes(x); table_impl::fill_buckets(nodes.begin(), *this, assign); } } void move_assign_no_alloc(table& x) { set_hash_functions new_func_this(*this, x); // No throw from here. mlf_ = x.mlf_; max_load_ = x.max_load_; move_buckets_from(x); new_func_this.commit(); } // Accessors key_type const& get_key(value_type const& x) const { return extractor::extract(x); } std::size_t hash(key_type const& k) const { return policy::apply_hash(this->hash_function(), k); } // Find Node template iterator generic_find_node( Key const& k, Hash const& hf, Pred const& eq) const { return static_cast(this)-> find_node_impl(policy::apply_hash(hf, k), k, eq); } iterator find_node( std::size_t key_hash, key_type const& k) const { return static_cast(this)-> find_node_impl(key_hash, k, this->key_eq()); } iterator find_node(key_type const& k) const { return static_cast(this)-> find_node_impl(hash(k), k, this->key_eq()); } iterator find_matching_node(iterator n) const { // TODO: Does this apply to C++11? // // For some stupid reason, I decided to support equality comparison // when different hash functions are used. So I can't use the hash // value from the node here. return find_node(get_key(*n)); } // Reserve and rehash void reserve_for_insert(std::size_t); void rehash(std::size_t); void reserve(std::size_t); }; //////////////////////////////////////////////////////////////////////////// // Reserve & Rehash // basic exception safety template inline void table::reserve_for_insert(std::size_t size) { if (!buckets_) { create_buckets((std::max)(bucket_count_, min_buckets_for_size(size))); } // According to the standard this should be 'size >= max_load_', // but I think this is better, defect report filed. else if(size > max_load_) { std::size_t num_buckets = min_buckets_for_size((std::max)(size, size_ + (size_ >> 1))); if (num_buckets != bucket_count_) static_cast(this)->rehash_impl(num_buckets); } } // if hash function throws, basic exception safety // strong otherwise. template inline void table::rehash(std::size_t min_buckets) { using namespace std; if(!size_) { delete_buckets(); bucket_count_ = policy::new_bucket_count(min_buckets); } else { min_buckets = policy::new_bucket_count((std::max)(min_buckets, boost::unordered::detail::double_to_size(floor( static_cast(size_) / static_cast(mlf_))) + 1)); if(min_buckets != bucket_count_) static_cast(this)->rehash_impl(min_buckets); } } template inline void table::reserve(std::size_t num_elements) { rehash(static_cast( std::ceil(static_cast(num_elements) / mlf_))); } }}} #if defined(BOOST_MSVC) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/unordered/detail/unique.hpp000644 000765 000024 00000047434 12233035540 023426 0ustar00honglistaff000000 000000 // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. // Copyright (C) 2005-2011 Daniel James // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNORDERED_DETAIL_UNIQUE_HPP_INCLUDED #define BOOST_UNORDERED_DETAIL_UNIQUE_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include namespace boost { namespace unordered { namespace detail { template struct unique_node; template struct ptr_node; template struct table_impl; template struct unique_node : boost::unordered::detail::value_base { typedef typename ::boost::unordered::detail::rebind_wrap< A, unique_node >::type::pointer node_pointer; typedef node_pointer link_pointer; link_pointer next_; std::size_t hash_; unique_node() : next_(), hash_(0) {} void init(node_pointer) { } private: unique_node& operator=(unique_node const&); }; template struct ptr_node : boost::unordered::detail::value_base, boost::unordered::detail::ptr_bucket { typedef boost::unordered::detail::ptr_bucket bucket_base; typedef ptr_node* node_pointer; typedef ptr_bucket* link_pointer; std::size_t hash_; ptr_node() : bucket_base(), hash_(0) {} void init(node_pointer) { } private: ptr_node& operator=(ptr_node const&); }; // If the allocator uses raw pointers use ptr_node // Otherwise use node. template struct pick_node2 { typedef boost::unordered::detail::unique_node node; typedef typename boost::unordered::detail::allocator_traits< typename boost::unordered::detail::rebind_wrap::type >::pointer node_pointer; typedef boost::unordered::detail::bucket bucket; typedef node_pointer link_pointer; }; template struct pick_node2*, boost::unordered::detail::ptr_bucket*> { typedef boost::unordered::detail::ptr_node node; typedef boost::unordered::detail::ptr_bucket bucket; typedef bucket* link_pointer; }; template struct pick_node { typedef boost::unordered::detail::allocator_traits< typename boost::unordered::detail::rebind_wrap >::type > tentative_node_traits; typedef boost::unordered::detail::allocator_traits< typename boost::unordered::detail::rebind_wrap::type > tentative_bucket_traits; typedef pick_node2 pick; typedef typename pick::node node; typedef typename pick::bucket bucket; typedef typename pick::link_pointer link_pointer; }; template struct set { typedef boost::unordered::detail::set types; typedef A allocator; typedef T value_type; typedef H hasher; typedef P key_equal; typedef T key_type; typedef boost::unordered::detail::allocator_traits traits; typedef boost::unordered::detail::pick_node pick; typedef typename pick::node node; typedef typename pick::bucket bucket; typedef typename pick::link_pointer link_pointer; typedef boost::unordered::detail::table_impl table; typedef boost::unordered::detail::set_extractor extractor; typedef boost::unordered::detail::pick_policy::type policy; }; template struct map { typedef boost::unordered::detail::map types; typedef A allocator; typedef std::pair value_type; typedef H hasher; typedef P key_equal; typedef K key_type; typedef boost::unordered::detail::allocator_traits traits; typedef boost::unordered::detail::pick_node pick; typedef typename pick::node node; typedef typename pick::bucket bucket; typedef typename pick::link_pointer link_pointer; typedef boost::unordered::detail::table_impl table; typedef boost::unordered::detail::map_extractor extractor; typedef boost::unordered::detail::pick_policy::type policy; }; template struct table_impl : boost::unordered::detail::table { typedef boost::unordered::detail::table table; typedef typename table::value_type value_type; typedef typename table::bucket bucket; typedef typename table::policy policy; typedef typename table::node_pointer node_pointer; typedef typename table::node_allocator node_allocator; typedef typename table::node_allocator_traits node_allocator_traits; typedef typename table::bucket_pointer bucket_pointer; typedef typename table::link_pointer link_pointer; typedef typename table::hasher hasher; typedef typename table::key_equal key_equal; typedef typename table::key_type key_type; typedef typename table::node_constructor node_constructor; typedef typename table::extractor extractor; typedef typename table::iterator iterator; typedef typename table::c_iterator c_iterator; typedef std::pair emplace_return; // Constructors table_impl(std::size_t n, hasher const& hf, key_equal const& eq, node_allocator const& a) : table(n, hf, eq, a) {} table_impl(table_impl const& x) : table(x, node_allocator_traits:: select_on_container_copy_construction(x.node_alloc())) { this->init(x); } table_impl(table_impl const& x, node_allocator const& a) : table(x, a) { this->init(x); } table_impl(table_impl& x, boost::unordered::detail::move_tag m) : table(x, m) {} table_impl(table_impl& x, node_allocator const& a, boost::unordered::detail::move_tag m) : table(x, a, m) { this->move_init(x); } // Accessors template iterator find_node_impl( std::size_t key_hash, Key const& k, Pred const& eq) const { std::size_t bucket_index = this->hash_to_bucket(key_hash); iterator n = this->begin(bucket_index); for (;;) { if (!n.node_) return n; std::size_t node_hash = n.node_->hash_; if (key_hash == node_hash) { if (eq(k, this->get_key(*n))) return n; } else { if (this->hash_to_bucket(node_hash) != bucket_index) return iterator(); } ++n; } } std::size_t count(key_type const& k) const { return this->find_node(k).node_ ? 1 : 0; } value_type& at(key_type const& k) const { if (this->size_) { iterator it = this->find_node(k); if (it.node_) return *it; } boost::throw_exception( std::out_of_range("Unable to find key in unordered_map.")); } std::pair equal_range(key_type const& k) const { iterator n = this->find_node(k); iterator n2 = n; if (n2.node_) ++n2; return std::make_pair(n, n2); } // equals bool equals(table_impl const& other) const { if(this->size_ != other.size_) return false; for(iterator n1 = this->begin(); n1.node_; ++n1) { iterator n2 = other.find_matching_node(n1); if (!n2.node_ || *n1 != *n2) return false; } return true; } // Emplace/Insert inline iterator add_node( node_constructor& a, std::size_t key_hash) { node_pointer n = a.release(); n->hash_ = key_hash; bucket_pointer b = this->get_bucket(this->hash_to_bucket(key_hash)); if (!b->next_) { link_pointer start_node = this->get_previous_start(); if (start_node->next_) { this->get_bucket(this->hash_to_bucket( static_cast(start_node->next_)->hash_) )->next_ = n; } b->next_ = start_node; n->next_ = start_node->next_; start_node->next_ = n; } else { n->next_ = b->next_->next_; b->next_->next_ = n; } ++this->size_; return iterator(n); } value_type& operator[](key_type const& k) { typedef typename value_type::second_type mapped_type; std::size_t key_hash = this->hash(k); iterator pos = this->find_node(key_hash, k); if (pos.node_) return *pos; // Create the node before rehashing in case it throws an // exception (need strong safety in such a case). node_constructor a(this->node_alloc()); a.construct_with_value(BOOST_UNORDERED_EMPLACE_ARGS3( boost::unordered::piecewise_construct, boost::make_tuple(k), boost::make_tuple())); this->reserve_for_insert(this->size_ + 1); return *add_node(a, key_hash); } #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) # if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) emplace_return emplace(boost::unordered::detail::emplace_args1< boost::unordered::detail::please_ignore_this_overload> const&) { BOOST_ASSERT(false); return emplace_return(this->begin(), false); } # else emplace_return emplace( boost::unordered::detail::please_ignore_this_overload const&) { BOOST_ASSERT(false); return emplace_return(this->begin(), false); } # endif #endif template emplace_return emplace(BOOST_UNORDERED_EMPLACE_ARGS) { #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) return emplace_impl( extractor::extract(BOOST_UNORDERED_EMPLACE_FORWARD), BOOST_UNORDERED_EMPLACE_FORWARD); #else return emplace_impl( extractor::extract(args.a0, args.a1), BOOST_UNORDERED_EMPLACE_FORWARD); #endif } #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template emplace_return emplace( boost::unordered::detail::emplace_args1 const& args) { return emplace_impl(extractor::extract(args.a0), args); } #endif template emplace_return emplace_impl(key_type const& k, BOOST_UNORDERED_EMPLACE_ARGS) { std::size_t key_hash = this->hash(k); iterator pos = this->find_node(key_hash, k); if (pos.node_) return emplace_return(pos, false); // Create the node before rehashing in case it throws an // exception (need strong safety in such a case). node_constructor a(this->node_alloc()); a.construct_with_value(BOOST_UNORDERED_EMPLACE_FORWARD); // reserve has basic exception safety if the hash function // throws, strong otherwise. this->reserve_for_insert(this->size_ + 1); return emplace_return(this->add_node(a, key_hash), true); } emplace_return emplace_impl_with_node(node_constructor& a) { key_type const& k = this->get_key(a.value()); std::size_t key_hash = this->hash(k); iterator pos = this->find_node(key_hash, k); if (pos.node_) return emplace_return(pos, false); // reserve has basic exception safety if the hash function // throws, strong otherwise. this->reserve_for_insert(this->size_ + 1); return emplace_return(this->add_node(a, key_hash), true); } template emplace_return emplace_impl(no_key, BOOST_UNORDERED_EMPLACE_ARGS) { // Don't have a key, so construct the node first in order // to be able to lookup the position. node_constructor a(this->node_alloc()); a.construct_with_value(BOOST_UNORDERED_EMPLACE_FORWARD); return emplace_impl_with_node(a); } //////////////////////////////////////////////////////////////////////// // Insert range methods // // if hash function throws, or inserting > 1 element, basic exception // safety strong otherwise template void insert_range(InputIt i, InputIt j) { if(i != j) return insert_range_impl(extractor::extract(*i), i, j); } template void insert_range_impl(key_type const& k, InputIt i, InputIt j) { node_constructor a(this->node_alloc()); insert_range_impl2(a, k, i, j); while(++i != j) { // Note: can't use get_key as '*i' might not be value_type - it // could be a pair with first_types as key_type without const or // a different second_type. // // TODO: Might be worth storing the value_type instead of the // key here. Could be more efficient if '*i' is expensive. Could // be less efficient if copying the full value_type is // expensive. insert_range_impl2(a, extractor::extract(*i), i, j); } } template void insert_range_impl2(node_constructor& a, key_type const& k, InputIt i, InputIt j) { // No side effects in this initial code std::size_t key_hash = this->hash(k); iterator pos = this->find_node(key_hash, k); if (!pos.node_) { a.construct_with_value2(*i); if(this->size_ + 1 > this->max_load_) this->reserve_for_insert(this->size_ + boost::unordered::detail::insert_size(i, j)); // Nothing after this point can throw. this->add_node(a, key_hash); } } template void insert_range_impl(no_key, InputIt i, InputIt j) { node_constructor a(this->node_alloc()); do { a.construct_with_value2(*i); emplace_impl_with_node(a); } while(++i != j); } //////////////////////////////////////////////////////////////////////// // Erase // // no throw std::size_t erase_key(key_type const& k) { if(!this->size_) return 0; std::size_t key_hash = this->hash(k); std::size_t bucket_index = this->hash_to_bucket(key_hash); link_pointer prev = this->get_previous_start(bucket_index); if (!prev) return 0; for (;;) { if (!prev->next_) return 0; std::size_t node_hash = static_cast(prev->next_)->hash_; if (this->hash_to_bucket(node_hash) != bucket_index) return 0; if (node_hash == key_hash && this->key_eq()(k, this->get_key( static_cast(prev->next_)->value()))) break; prev = prev->next_; } link_pointer end = static_cast(prev->next_)->next_; std::size_t count = this->delete_nodes(prev, end); this->fix_bucket(bucket_index, prev); return count; } iterator erase(c_iterator r) { BOOST_ASSERT(r.node_); iterator next(r.node_); ++next; erase_nodes(r.node_, next.node_); return next; } iterator erase_range(c_iterator r1, c_iterator r2) { if (r1 == r2) return iterator(r2.node_); erase_nodes(r1.node_, r2.node_); return iterator(r2.node_); } void erase_nodes(node_pointer begin, node_pointer end) { std::size_t bucket_index = this->hash_to_bucket(begin->hash_); // Find the node before begin. link_pointer prev = this->get_previous_start(bucket_index); while(prev->next_ != begin) prev = prev->next_; // Delete the nodes. do { this->delete_node(prev); bucket_index = this->fix_bucket(bucket_index, prev); } while (prev->next_ != end); } //////////////////////////////////////////////////////////////////////// // fill_buckets template static void fill_buckets(iterator n, table& dst, NodeCreator& creator) { link_pointer prev = dst.get_previous_start(); while (n.node_) { node_pointer node = creator.create(*n); node->hash_ = n.node_->hash_; prev->next_ = node; ++dst.size_; ++n; prev = place_in_bucket(dst, prev); } } // strong otherwise exception safety void rehash_impl(std::size_t num_buckets) { BOOST_ASSERT(this->buckets_); this->create_buckets(num_buckets); link_pointer prev = this->get_previous_start(); while (prev->next_) prev = place_in_bucket(*this, prev); } // Iterate through the nodes placing them in the correct buckets. // pre: prev->next_ is not null. static link_pointer place_in_bucket(table& dst, link_pointer prev) { node_pointer n = static_cast(prev->next_); bucket_pointer b = dst.get_bucket(dst.hash_to_bucket(n->hash_)); if (!b->next_) { b->next_ = prev; return n; } else { prev->next_ = n->next_; n->next_ = b->next_->next_; b->next_->next_ = n; return prev; } } }; }}} #endif passenger-4.0.37/ext/boost/unordered/detail/util.hpp000644 000765 000024 00000016734 12233035540 023074 0ustar00honglistaff000000 000000 // Copyright (C) 2003-2004 Jeremy B. Maitin-Shepard. // Copyright (C) 2005-2011 Daniel James // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNORDERED_DETAIL_UTIL_HPP_INCLUDED #define BOOST_UNORDERED_DETAIL_UTIL_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include #include #include #include #include #include namespace boost { namespace unordered { namespace detail { static const float minimum_max_load_factor = 1e-3f; static const std::size_t default_bucket_count = 11; struct move_tag {}; struct empty_emplace {}; //////////////////////////////////////////////////////////////////////////// // iterator SFINAE template struct is_forward : boost::is_convertible< typename boost::iterator_traversal::type, boost::forward_traversal_tag> {}; template struct enable_if_forward : boost::enable_if_c< boost::unordered::detail::is_forward::value, ReturnType> {}; template struct disable_if_forward : boost::disable_if_c< boost::unordered::detail::is_forward::value, ReturnType> {}; //////////////////////////////////////////////////////////////////////////// // primes #define BOOST_UNORDERED_PRIMES \ (17ul)(29ul)(37ul)(53ul)(67ul)(79ul) \ (97ul)(131ul)(193ul)(257ul)(389ul)(521ul)(769ul) \ (1031ul)(1543ul)(2053ul)(3079ul)(6151ul)(12289ul)(24593ul) \ (49157ul)(98317ul)(196613ul)(393241ul)(786433ul) \ (1572869ul)(3145739ul)(6291469ul)(12582917ul)(25165843ul) \ (50331653ul)(100663319ul)(201326611ul)(402653189ul)(805306457ul) \ (1610612741ul)(3221225473ul)(4294967291ul) template struct prime_list_template { static std::size_t const value[]; #if !defined(SUNPRO_CC) static std::ptrdiff_t const length; #else static std::ptrdiff_t const length = BOOST_PP_SEQ_SIZE(BOOST_UNORDERED_PRIMES); #endif }; template std::size_t const prime_list_template::value[] = { BOOST_PP_SEQ_ENUM(BOOST_UNORDERED_PRIMES) }; #if !defined(SUNPRO_CC) template std::ptrdiff_t const prime_list_template::length = BOOST_PP_SEQ_SIZE(BOOST_UNORDERED_PRIMES); #endif #undef BOOST_UNORDERED_PRIMES typedef prime_list_template prime_list; // no throw inline std::size_t next_prime(std::size_t num) { std::size_t const* const prime_list_begin = prime_list::value; std::size_t const* const prime_list_end = prime_list_begin + prime_list::length; std::size_t const* bound = std::lower_bound(prime_list_begin, prime_list_end, num); if(bound == prime_list_end) bound--; return *bound; } // no throw inline std::size_t prev_prime(std::size_t num) { std::size_t const* const prime_list_begin = prime_list::value; std::size_t const* const prime_list_end = prime_list_begin + prime_list::length; std::size_t const* bound = std::upper_bound(prime_list_begin,prime_list_end, num); if(bound != prime_list_begin) bound--; return *bound; } //////////////////////////////////////////////////////////////////////////// // insert_size/initial_size #if !defined(BOOST_NO_STD_DISTANCE) using ::std::distance; #else template inline std::size_t distance(ForwardIterator i, ForwardIterator j) { std::size_t x; std::distance(i, j, x); return x; } #endif template inline typename boost::unordered::detail::enable_if_forward::type insert_size(I i, I j) { return std::distance(i, j); } template inline typename boost::unordered::detail::disable_if_forward::type insert_size(I, I) { return 1; } template inline std::size_t initial_size(I i, I j, std::size_t num_buckets = boost::unordered::detail::default_bucket_count) { // TODO: Why +1? return (std::max)( boost::unordered::detail::insert_size(i, j) + 1, num_buckets); } //////////////////////////////////////////////////////////////////////////// // compressed template struct compressed_base : private T { compressed_base(T const& x) : T(x) {} compressed_base(T& x, move_tag) : T(boost::move(x)) {} T& get() { return *this; } T const& get() const { return *this; } }; template struct uncompressed_base { uncompressed_base(T const& x) : value_(x) {} uncompressed_base(T& x, move_tag) : value_(boost::move(x)) {} T& get() { return value_; } T const& get() const { return value_; } private: T value_; }; template struct generate_base : boost::detail::if_true< boost::is_empty::value >:: BOOST_NESTED_TEMPLATE then< boost::unordered::detail::compressed_base, boost::unordered::detail::uncompressed_base > {}; template struct compressed : private boost::unordered::detail::generate_base::type, private boost::unordered::detail::generate_base::type { typedef typename generate_base::type base1; typedef typename generate_base::type base2; typedef T1 first_type; typedef T2 second_type; first_type& first() { return static_cast(this)->get(); } first_type const& first() const { return static_cast(this)->get(); } second_type& second() { return static_cast(this)->get(); } second_type const& second() const { return static_cast(this)->get(); } template compressed(First const& x1, Second const& x2) : base1(x1), base2(x2) {} compressed(compressed const& x) : base1(x.first()), base2(x.second()) {} compressed(compressed& x, move_tag m) : base1(x.first(), m), base2(x.second(), m) {} void assign(compressed const& x) { first() = x.first(); second() = x.second(); } void move_assign(compressed& x) { first() = boost::move(x.first()); second() = boost::move(x.second()); } void swap(compressed& x) { boost::swap(first(), x.first()); boost::swap(second(), x.second()); } private: // Prevent assignment just to make use of assign or // move_assign explicit. compressed& operator=(compressed const&); }; }}} #endif passenger-4.0.37/ext/boost/units/detail/000755 000765 000024 00000000000 12233035540 020546 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/units/detail/utility.hpp000644 000765 000024 00000003752 12233035540 022771 0ustar00honglistaff000000 000000 // Boost.Units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2008 Matthias Christian Schabel // Copyright (C) 2008 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_UTILITY_HPP #define BOOST_UNITS_UTILITY_HPP #include #include #include #if defined(__GLIBCXX__) || defined(__GLIBCPP__) #define BOOST_UNITS_USE_DEMANGLING #include #endif // __GNUC__ #ifdef BOOST_UNITS_USE_DEMANGLING #include namespace boost { namespace units { namespace detail { inline std::string demangle(const char* name) { // need to demangle C++ symbols char* realname; std::size_t len; int stat; realname = abi::__cxa_demangle(name,NULL,&len,&stat); if (realname != NULL) { std::string out(realname); std::free(realname); boost::replace_all(out,"boost::units::",""); return out; } return std::string("demangle :: error - unable to demangle specified symbol"); } } // namespace detail template std::string simplify_typename(const L& /*source*/) { const std::string demangled = detail::demangle(typeid(L).name()); return demangled; } } // namespace units } // namespace boost #else // BOOST_UNITS_USE_DEMANGLING namespace boost { namespace units { namespace detail { inline std::string demangle(const char* name) { return name; } } // namespace detail template std::string simplify_typename(const L& /*source*/) { return std::string(typeid(L).name()); } } // namespace units } // namespace boost // To get system-specific predefined macros: // gcc -arch ppc -dM -E - < /dev/null | sort #endif // BOOST_UNITS_USE_DEMANGLING #endif // BOOST_UNITS_UTILITY_HPP passenger-4.0.37/ext/boost/typeof/message.hpp000644 000765 000024 00000000455 12233035540 021611 0ustar00honglistaff000000 000000 // Copyright (C) 2005 Arkadiy Vertleyb // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) #if defined(_MSC_VER) && defined BOOST_TYPEOF_MESSAGES # pragma message(BOOST_TYPEOF_TEXT) #endif #undef BOOST_TYPEOF_TEXT passenger-4.0.37/ext/boost/typeof/native.hpp000644 000765 000024 00000002561 12233035540 021453 0ustar00honglistaff000000 000000 // Copyright (C) 2006 Arkadiy Vertleyb // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_TYPEOF_NATIVE_HPP_INCLUDED #define BOOST_TYPEOF_NATIVE_HPP_INCLUDED #ifndef MSVC_TYPEOF_HACK #ifdef BOOST_NO_SFINAE namespace boost { namespace type_of { template T& ensure_obj(const T&); }} #else #include #include namespace boost { namespace type_of { # ifdef BOOST_NO_SFINAE template T& ensure_obj(const T&); # else template typename enable_if, T&>::type ensure_obj(T&); template typename disable_if, T&>::type ensure_obj(const T&); # endif }} #endif//BOOST_NO_SFINAE #define BOOST_TYPEOF(expr) BOOST_TYPEOF_KEYWORD(boost::type_of::ensure_obj(expr)) #define BOOST_TYPEOF_TPL BOOST_TYPEOF #define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \ struct name {\ typedef BOOST_TYPEOF_TPL(expr) type;\ }; #define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \ struct name {\ typedef BOOST_TYPEOF(expr) type;\ }; #endif//MSVC_TYPEOF_HACK #define BOOST_TYPEOF_REGISTER_TYPE(x) #define BOOST_TYPEOF_REGISTER_TEMPLATE(x, params) #endif//BOOST_TYPEOF_NATIVE_HPP_INCLUDED passenger-4.0.37/ext/boost/typeof/typeof.hpp000644 000765 000024 00000014506 12233035540 021475 0ustar00honglistaff000000 000000 // Copyright (C) 2004 Arkadiy Vertleyb // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_TYPEOF_TYPEOF_HPP_INCLUDED #define BOOST_TYPEOF_TYPEOF_HPP_INCLUDED #if defined(BOOST_TYPEOF_COMPLIANT) # define BOOST_TYPEOF_EMULATION #endif #if defined(BOOST_TYPEOF_EMULATION) && defined(BOOST_TYPEOF_NATIVE) # error both typeof emulation and native mode requested #endif #if defined(__COMO__) # ifdef __GNUG__ # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # define BOOST_TYPEOF_NATIVE # endif # define BOOST_TYPEOF_KEYWORD typeof # endif # else # ifndef BOOST_TYPEOF_NATIVE # ifndef BOOST_TYPEOF_EMULATION # define BOOST_TYPEOF_EMULATION # endif # else # error native typeof is not supported # endif # endif #elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) # ifdef __GNUC__ # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # define BOOST_TYPEOF_NATIVE # endif # define BOOST_TYPEOF_KEYWORD __typeof__ # endif # else # ifndef BOOST_TYPEOF_NATIVE # ifndef BOOST_TYPEOF_EMULATION # define BOOST_TYPEOF_EMULATION # endif # else # error native typeof is not supported # endif # endif #elif defined(__GNUC__) # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # define BOOST_TYPEOF_NATIVE # endif # define BOOST_TYPEOF_KEYWORD __typeof__ # endif #elif defined(__MWERKS__) # if(__MWERKS__ <= 0x3003) // 8.x # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # define BOOST_TYPEOF_NATIVE # endif # define BOOST_TYPEOF_KEYWORD __typeof__ # else # define BOOST_TYPEOF_EMULATION_UNSUPPORTED # endif # else // 9.x # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # define BOOST_TYPEOF_NATIVE # endif # define BOOST_TYPEOF_KEYWORD __typeof__ # endif # endif #elif defined __CODEGEARC__ # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # define BOOST_TYPEOF_EMULATION_UNSUPPORTED # endif # else # define BOOST_TYPEOF_EMULATION_UNSUPPORTED # endif #elif defined __BORLANDC__ # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # define BOOST_TYPEOF_EMULATION_UNSUPPORTED # endif # else # define BOOST_TYPEOF_EMULATION_UNSUPPORTED # endif #elif defined __DMC__ # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # define BOOST_TYPEOF_NATIVE # endif # include # define MSVC_TYPEOF_HACK # endif #elif defined(_MSC_VER) # if (_MSC_VER <= 1300) // 6.5, 7.0 # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # define BOOST_TYPEOF_NATIVE # endif # include # define MSVC_TYPEOF_HACK # else # error typeof emulation is not supported # endif # elif (_MSC_VER >= 1310) // 7.1 -> # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # ifndef _MSC_EXTENSIONS # define BOOST_TYPEOF_EMULATION # else # define BOOST_TYPEOF_NATIVE # endif # endif # endif # ifdef BOOST_TYPEOF_NATIVE # include # define MSVC_TYPEOF_HACK # endif # endif #elif defined(__HP_aCC) # ifndef BOOST_TYPEOF_NATIVE # ifndef BOOST_TYPEOF_EMULATION # define BOOST_TYPEOF_EMULATION # endif # else # error native typeof is not supported # endif #elif defined(__DECCXX) # ifndef BOOST_TYPEOF_NATIVE # ifndef BOOST_TYPEOF_EMULATION # define BOOST_TYPEOF_EMULATION # endif # else # error native typeof is not supported # endif #elif defined(__BORLANDC__) # if (__BORLANDC__ < 0x590) # define BOOST_TYPEOF_NO_FUNCTION_TYPES # define BOOST_TYPEOF_NO_MEMBER_FUNCTION_TYPES # endif # ifndef BOOST_TYPEOF_NATIVE # ifndef BOOST_TYPEOF_EMULATION # define BOOST_TYPEOF_EMULATION # endif # else # error native typeof is not supported # endif #elif defined(__SUNPRO_CC) # if (__SUNPRO_CC < 0x590 ) # ifdef BOOST_TYPEOF_NATIVE # error native typeof is not supported # endif # ifndef BOOST_TYPEOF_EMULATION # define BOOST_TYPEOF_EMULATION # endif # else # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # define BOOST_TYPEOF_NATIVE # endif # define BOOST_TYPEOF_KEYWORD __typeof__ # endif # endif #else //unknown compiler # ifndef BOOST_TYPEOF_NATIVE # ifndef BOOST_TYPEOF_EMULATION # define BOOST_TYPEOF_EMULATION # endif # else # ifndef BOOST_TYPEOF_KEYWORD # define BOOST_TYPEOF_KEYWORD typeof # endif # endif #endif #define BOOST_TYPEOF_UNIQUE_ID()\ BOOST_TYPEOF_REGISTRATION_GROUP * 0x10000 + __LINE__ #define BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()\ #ifdef BOOST_TYPEOF_EMULATION_UNSUPPORTED # include #elif defined BOOST_TYPEOF_EMULATION # define BOOST_TYPEOF_TEXT "using typeof emulation" # include # include # include # include # include # include # include # include #elif defined(BOOST_TYPEOF_NATIVE) # define BOOST_TYPEOF_TEXT "using native typeof" # include # include #else # error typeof configuration error #endif // auto #define BOOST_AUTO(Var, Expr) BOOST_TYPEOF(Expr) Var = Expr #define BOOST_AUTO_TPL(Var, Expr) BOOST_TYPEOF_TPL(Expr) Var = Expr #endif//BOOST_TYPEOF_TYPEOF_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/add_const.hpp000644 000765 000024 00000002661 12233035540 023165 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_ADD_CONST_HPP_INCLUDED #define BOOST_TT_ADD_CONST_HPP_INCLUDED #include // should be the last #include #include namespace boost { // * convert a type T to const type - add_const // this is not required since the result is always // the same as "T const", but it does suppress warnings // from some compilers: #if defined(BOOST_MSVC) // This bogus warning will appear when add_const is applied to a // const volatile reference because we can't detect const volatile // references with MSVC6. # pragma warning(push) # pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored #endif BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_const,T,T const) #if defined(BOOST_MSVC) # pragma warning(pop) #endif #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_const,T&,T&) #endif } // namespace boost #include #endif // BOOST_TT_ADD_CONST_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/add_cv.hpp000644 000765 000024 00000002702 12233035540 022443 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_ADD_CV_HPP_INCLUDED #define BOOST_TT_ADD_CV_HPP_INCLUDED #include // should be the last #include #include namespace boost { // * convert a type T to a const volatile type - add_cv // this is not required since the result is always // the same as "T const volatile", but it does suppress warnings // from some compilers: #if defined(BOOST_MSVC) // This bogus warning will appear when add_volatile is applied to a // const volatile reference because we can't detect const volatile // references with MSVC6. # pragma warning(push) # pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored #endif BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_cv,T,T const volatile) #if defined(BOOST_MSVC) # pragma warning(pop) #endif #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_cv,T&,T&) #endif } // namespace boost #include #endif // BOOST_TT_ADD_CV_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/add_lvalue_reference.hpp000644 000765 000024 00000001356 12233035540 025345 0ustar00honglistaff000000 000000 // Copyright 2010 John Maddock // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP #define BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP #include // should be the last #include #include namespace boost{ BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_lvalue_reference,T,typename boost::add_reference::type) #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_lvalue_reference,T&&,T&) #endif } #include #endif // BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP passenger-4.0.37/ext/boost/type_traits/add_pointer.hpp000644 000765 000024 00000003223 12233035540 023512 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_ADD_POINTER_HPP_INCLUDED #define BOOST_TT_ADD_POINTER_HPP_INCLUDED #include // should be the last #include #include namespace boost { namespace detail { #if defined(__BORLANDC__) && (__BORLANDC__ < 0x5A0) // // For some reason this implementation stops Borlands compiler // from dropping cv-qualifiers, it still fails with references // to arrays for some reason though (shrug...) (JM 20021104) // template struct add_pointer_impl { typedef T* type; }; template struct add_pointer_impl { typedef T* type; }; template struct add_pointer_impl { typedef T* type; }; template struct add_pointer_impl { typedef T* type; }; template struct add_pointer_impl { typedef T* type; }; #else template struct add_pointer_impl { typedef typename remove_reference::type no_ref_type; typedef no_ref_type* type; }; #endif } // namespace detail BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_pointer,T,typename boost::detail::add_pointer_impl::type) } // namespace boost #include #endif // BOOST_TT_ADD_POINTER_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/add_reference.hpp000644 000765 000024 00000005274 12233035540 024000 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_ADD_REFERENCE_HPP_INCLUDED #define BOOST_TT_ADD_REFERENCE_HPP_INCLUDED #include #include #include // should be the last #include #include namespace boost { namespace detail { #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && defined(BOOST_MSVC6_MEMBER_TEMPLATES) template struct reference_adder { template struct result_ { typedef T& type; }; }; template <> struct reference_adder { template struct result_ { typedef T type; }; }; template struct add_reference_impl { typedef typename reference_adder< ::boost::is_reference::value >::template result_ result; typedef typename result::type type; }; #else // // We can't filter out rvalue_references at the same level as // references or we get ambiguities from msvc: // template struct add_reference_rvalue_layer { typedef T& type; }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct add_reference_rvalue_layer { typedef T&& type; }; #endif template struct add_reference_impl { typedef typename add_reference_rvalue_layer::type type; }; #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&) #endif #endif // these full specialisations are always required: BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void,void) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void const,void const) BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void volatile,void volatile) BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(add_reference,void const volatile,void const volatile) #endif } // namespace detail BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_reference,T,typename boost::detail::add_reference_impl::type) // agurt, 07/mar/03: workaround Borland's ill-formed sensitivity to an additional // level of indirection, here #if BOOST_WORKAROUND(__BORLANDC__, < 0x600) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_reference,T&,T&) #endif } // namespace boost #include #endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/add_rvalue_reference.hpp000644 000765 000024 00000004575 12233035540 025361 0ustar00honglistaff000000 000000 // add_rvalue_reference.hpp ---------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP #define BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP #include //----------------------------------------------------------------------------// #include #include // should be the last #include #include //----------------------------------------------------------------------------// // // // C++03 implementation of // // 20.9.7.2 Reference modifications [meta.trans.ref] // // Written by Vicente J. Botet Escriba // // // // If T names an object or function type then the member typedef type // shall name T&&; otherwise, type shall name T. [ Note: This rule reflects // the semantics of reference collapsing. For example, when a type T names // a type T1&, the type add_rvalue_reference::type is not an rvalue // reference. -end note ] //----------------------------------------------------------------------------// namespace boost { namespace type_traits_detail { template struct add_rvalue_reference_helper { typedef T type; }; #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct add_rvalue_reference_helper { typedef T&& type; }; #endif template struct add_rvalue_reference_imp { typedef typename boost::type_traits_detail::add_rvalue_reference_helper ::value == false && is_reference::value == false) >::type type; }; } BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_rvalue_reference,T,typename boost::type_traits_detail::add_rvalue_reference_imp::type) } // namespace boost #include #endif // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP passenger-4.0.37/ext/boost/type_traits/add_volatile.hpp000644 000765 000024 00000002717 12233035540 023660 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_ADD_VOLATILE_HPP_INCLUDED #define BOOST_TT_ADD_VOLATILE_HPP_INCLUDED #include // should be the last #include #include namespace boost { // * convert a type T to volatile type - add_volatile // this is not required since the result is always // the same as "T volatile", but it does suppress warnings // from some compilers: #if defined(BOOST_MSVC) // This bogus warning will appear when add_volatile is applied to a // const volatile reference because we can't detect const volatile // references with MSVC6. # pragma warning(push) # pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored #endif BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_volatile,T,T volatile) #if defined(BOOST_MSVC) # pragma warning(pop) #endif #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_volatile,T&,T&) #endif } // namespace boost #include #endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/aligned_storage.hpp000644 000765 000024 00000000777 12233035540 024364 0ustar00honglistaff000000 000000 // Copyright (C) John Maddock 2005. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED # define BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED # include #endif // BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/alignment_of.hpp000644 000765 000024 00000007016 12233035540 023670 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED #define BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED #include #include #include // should be the last #include #include #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4121 4512) // alignment is sensitive to packing #endif #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) #pragma option push -Vx- -Ve- #endif namespace boost { template struct alignment_of; // get the alignment of some arbitrary type: namespace detail { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4324) // structure was padded due to __declspec(align()) #endif template struct alignment_of_hack { char c; T t; alignment_of_hack(); }; #ifdef BOOST_MSVC #pragma warning(pop) #endif template struct alignment_logic { BOOST_STATIC_CONSTANT(std::size_t, value = A < S ? A : S); }; template< typename T > struct alignment_of_impl { #if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) // // With MSVC both the native __alignof operator // and our own logic gets things wrong from time to time :-( // Using a combination of the two seems to make the most of a bad job: // BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::alignment_logic< sizeof(::boost::detail::alignment_of_hack) - sizeof(T), __alignof(T) >::value)); #elif !defined(BOOST_ALIGNMENT_OF) BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::alignment_logic< sizeof(::boost::detail::alignment_of_hack) - sizeof(T), sizeof(T) >::value)); #else // // We put this here, rather than in the definition of // alignment_of below, because MSVC's __alignof doesn't // always work in that context for some unexplained reason. // (See type_with_alignment tests for test cases). // BOOST_STATIC_CONSTANT(std::size_t, value = BOOST_ALIGNMENT_OF(T)); #endif }; } // namespace detail BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(alignment_of,T,::boost::detail::alignment_of_impl::value) // references have to be treated specially, assume // that a reference is just a special pointer: #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct alignment_of : public alignment_of { }; #endif #ifdef __BORLANDC__ // long double gives an incorrect value of 10 (!) // unless we do this... struct long_double_wrapper{ long double ld; }; template<> struct alignment_of : public alignment_of{}; #endif // void has to be treated specially: BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void,0) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void const,0) BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void volatile,0) BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(alignment_of,void const volatile,0) #endif } // namespace boost #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) #pragma option pop #endif #ifdef BOOST_MSVC # pragma warning(pop) #endif #include #endif // BOOST_TT_ALIGNMENT_OF_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/broken_compiler_spec.hpp000644 000765 000024 00000012661 12233035540 025414 0ustar00honglistaff000000 000000 // Copyright 2001-2003 Aleksey Gurtovoy. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED #define BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED #include #include // these are needed regardless of BOOST_TT_NO_BROKEN_COMPILER_SPEC #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace boost { namespace detail { template< typename T > struct remove_const_impl { typedef T type; }; template< typename T > struct remove_volatile_impl { typedef T type; }; template< typename T > struct remove_pointer_impl { typedef T type; }; template< typename T > struct remove_reference_impl { typedef T type; }; typedef int invoke_BOOST_TT_BROKEN_COMPILER_SPEC_outside_all_namespaces; }} #endif // agurt, 27/jun/03: disable the workaround if user defined // BOOST_TT_NO_BROKEN_COMPILER_SPEC #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ || defined(BOOST_TT_NO_BROKEN_COMPILER_SPEC) # define BOOST_TT_BROKEN_COMPILER_SPEC(T) /**/ #else // same as BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1 macro, except that it // never gets #undef-ined # define BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(trait,spec,result) \ template<> struct trait##_impl \ { \ typedef result type; \ }; \ /**/ # define BOOST_TT_AUX_REMOVE_CONST_VOLATILE_RANK1_SPEC(T) \ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_const,T const,T) \ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_const,T const volatile,T volatile) \ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_volatile,T volatile,T) \ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_volatile,T const volatile,T const) \ /**/ # define BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T) \ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*,T) \ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*const,T) \ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*volatile,T) \ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_pointer,T*const volatile,T) \ BOOST_TT_AUX_BROKEN_TYPE_TRAIT_SPEC1(remove_reference,T&,T) \ /**/ # define BOOST_TT_AUX_REMOVE_PTR_REF_RANK_2_SPEC(T) \ BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T) \ BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T const) \ BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T volatile) \ BOOST_TT_AUX_REMOVE_PTR_REF_RANK_1_SPEC(T const volatile) \ /**/ # define BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T) \ BOOST_TT_AUX_REMOVE_PTR_REF_RANK_2_SPEC(T) \ BOOST_TT_AUX_REMOVE_CONST_VOLATILE_RANK1_SPEC(T) \ /**/ # define BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T) \ BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T*) \ BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T const*) \ BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T volatile*) \ BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T const volatile*) \ /**/ # define BOOST_TT_BROKEN_COMPILER_SPEC(T) \ namespace boost { namespace detail { \ typedef invoke_BOOST_TT_BROKEN_COMPILER_SPEC_outside_all_namespaces \ please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_outside_all_namespaces; \ BOOST_TT_AUX_REMOVE_ALL_RANK_1_SPEC(T) \ BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T) \ BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T*) \ BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T const*) \ BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T volatile*) \ BOOST_TT_AUX_REMOVE_ALL_RANK_2_SPEC(T const volatile*) \ }} \ /**/ # include #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_BROKEN_COMPILER_SPEC(bool) BOOST_TT_BROKEN_COMPILER_SPEC(char) #ifndef BOOST_NO_INTRINSIC_WCHAR_T BOOST_TT_BROKEN_COMPILER_SPEC(wchar_t) #endif BOOST_TT_BROKEN_COMPILER_SPEC(signed char) BOOST_TT_BROKEN_COMPILER_SPEC(unsigned char) BOOST_TT_BROKEN_COMPILER_SPEC(signed short) BOOST_TT_BROKEN_COMPILER_SPEC(unsigned short) BOOST_TT_BROKEN_COMPILER_SPEC(signed int) BOOST_TT_BROKEN_COMPILER_SPEC(unsigned int) BOOST_TT_BROKEN_COMPILER_SPEC(signed long) BOOST_TT_BROKEN_COMPILER_SPEC(unsigned long) BOOST_TT_BROKEN_COMPILER_SPEC(float) BOOST_TT_BROKEN_COMPILER_SPEC(double) //BOOST_TT_BROKEN_COMPILER_SPEC(long double) // for backward compatibility #define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(T) \ BOOST_TT_BROKEN_COMPILER_SPEC(T) \ /**/ #endif // BOOST_TT_BROKEN_COMPILER_SPEC_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/common_type.hpp000644 000765 000024 00000012571 12233035540 023561 0ustar00honglistaff000000 000000 // common_type.hpp ---------------------------------------------------------// // Copyright 2008 Howard Hinnant // Copyright 2008 Beman Dawes // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_TYPE_TRAITS_COMMON_TYPE_HPP #define BOOST_TYPE_TRAITS_COMMON_TYPE_HPP #include #if defined(__SUNPRO_CC) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) # define BOOST_COMMON_TYPE_DONT_USE_TYPEOF #endif #if defined(__IBMCPP__) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) # define BOOST_COMMON_TYPE_DONT_USE_TYPEOF #endif //----------------------------------------------------------------------------// #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_COMMON_TYPE_ARITY) #define BOOST_COMMON_TYPE_ARITY 3 #endif //----------------------------------------------------------------------------// #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) #include // boost wonders never cease! #endif //----------------------------------------------------------------------------// #ifndef BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG) #elif defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT) #include #include #define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) \ BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES) #else #include #define BOOST_COMMON_TYPE_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND) #endif #if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_COMMON_TYPE_USES_MPL_ASSERT) #define BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE "must be complete type" #endif #if defined(BOOST_NO_CXX11_DECLTYPE) && defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) #include #include #endif #include #include #include //----------------------------------------------------------------------------// // // // C++03 implementation of // // 20.9.7.6 Other transformations [meta.trans.other] // // Written by Howard Hinnant // // Adapted for Boost by Beman Dawes, Vicente Botet and Jeffrey Hellrung // // // //----------------------------------------------------------------------------// namespace boost { // prototype #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template struct common_type; #else // or no specialization template struct common_type { public: typedef typename common_type::type, V>::type type; }; #endif // 1 arg template #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) struct common_type #else struct common_type #endif { BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(T) > 0, BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE, (T)); public: typedef T type; }; // 2 args namespace type_traits_detail { template struct common_type_2 { private: BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(T) > 0, BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE, (T)); BOOST_COMMON_TYPE_STATIC_ASSERT(sizeof(U) > 0, BOOST_COMMON_TYPE_MUST_BE_A_COMPLE_TYPE, (U)); static bool declval_bool(); // workaround gcc bug; not required by std static typename add_rvalue_reference::type declval_T(); // workaround gcc bug; not required by std static typename add_rvalue_reference::type declval_U(); // workaround gcc bug; not required by std static typename add_rvalue_reference::type declval_b(); #if !defined(BOOST_NO_CXX11_DECLTYPE) public: typedef decltype(declval() ? declval() : declval()) type; #elif defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) public: typedef typename detail_type_traits_common_type::common_type_impl< typename remove_cv::type, typename remove_cv::type >::type type; #else public: typedef BOOST_TYPEOF_TPL(declval_b() ? declval_T() : declval_U()) type; #endif #if defined(__GNUC__) && __GNUC__ == 3 && (__GNUC_MINOR__ == 2 || __GNUC_MINOR__ == 3) public: void public_dummy_function_just_to_silence_warning(); #endif }; template struct common_type_2 { typedef T type; }; } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template struct common_type #else template struct common_type #endif : public type_traits_detail::common_type_2 { }; // 3 or more args #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template struct common_type { public: typedef typename common_type::type, V...>::type type; }; #endif } // namespace boost #endif // BOOST_TYPE_TRAITS_COMMON_TYPE_HPP passenger-4.0.37/ext/boost/type_traits/composite_traits.hpp000644 000765 000024 00000001751 12233035540 024616 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // // defines traits classes for composite types: // is_array, is_pointer, is_reference, is_member_pointer, is_enum, is_union. // #ifndef BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED #define BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED #include #include #include #include #include #include #include #endif // BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/config.hpp000644 000765 000024 00000005013 12233035540 022466 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_CONFIG_HPP_INCLUDED #define BOOST_TT_CONFIG_HPP_INCLUDED #ifndef BOOST_CONFIG_HPP #include #endif #include // // whenever we have a conversion function with ellipses // it needs to be declared __cdecl to suppress compiler // warnings from MS and Borland compilers (this *must* // appear before we include is_same.hpp below): #if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)) # define BOOST_TT_DECL __cdecl #else # define BOOST_TT_DECL /**/ #endif # if (BOOST_WORKAROUND(__MWERKS__, < 0x3000) \ || BOOST_WORKAROUND(BOOST_MSVC, <= 1301) \ || !defined(__EDG_VERSION__) && BOOST_WORKAROUND(__GNUC__, < 3) \ || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \ || BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) \ || defined(__ghs) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) \ || BOOST_WORKAROUND(MPW_CPLUS, BOOST_TESTED_AT(0x890)) \ || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))) \ && defined(BOOST_NO_IS_ABSTRACT) # define BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION 1 #endif #ifndef BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION # define BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION 1 #endif // // Define BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING // when we can't test for function types with elipsis: // #if BOOST_WORKAROUND(__GNUC__, < 3) # define BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING #endif // // define BOOST_TT_TEST_MS_FUNC_SIGS // when we want to test __stdcall etc function types with is_function etc // (Note, does not work with Borland, even though it does support __stdcall etc): // #if defined(_MSC_EXTENSIONS) && !defined(__BORLANDC__) # define BOOST_TT_TEST_MS_FUNC_SIGS #endif // // define BOOST_TT_NO_CV_FUNC_TEST // if tests for cv-qualified member functions don't // work in is_member_function_pointer // #if BOOST_WORKAROUND(__MWERKS__, < 0x3000) || BOOST_WORKAROUND(__IBMCPP__, <= 600) # define BOOST_TT_NO_CV_FUNC_TEST #endif #endif // BOOST_TT_CONFIG_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/conversion_traits.hpp000644 000765 000024 00000001222 12233035540 024772 0ustar00honglistaff000000 000000 // Copyright 2000 John Maddock (john@johnmaddock.co.uk) // Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) // Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED #define BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED #include #endif // BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/cv_traits.hpp000644 000765 000024 00000001742 12233035540 023224 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // // defines traits classes for cv-qualified types: // is_const, is_volatile, remove_const, remove_volatile, remove_cv. #ifndef BOOST_TT_CV_TRAITS_HPP_INCLUDED #define BOOST_TT_CV_TRAITS_HPP_INCLUDED #include #include #include #include #include #include #include #include #endif // BOOST_TT_CV_TRAITS_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/decay.hpp000644 000765 000024 00000002466 12233035540 022317 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock & Thorsten Ottosen 2005. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_DECAY_HPP_INCLUDED #define BOOST_TT_DECAY_HPP_INCLUDED #include #include #include #include #include #include #include #include namespace boost { template< class T > struct decay { private: typedef BOOST_DEDUCED_TYPENAME remove_reference::type Ty; public: typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< is_array, mpl::identity::type*>, BOOST_DEDUCED_TYPENAME mpl::eval_if< is_function, add_pointer, mpl::identity > >::type type; }; } // namespace boost #endif // BOOST_TT_DECAY_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/detail/000755 000765 000024 00000000000 12233035540 021753 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/type_traits/function_traits.hpp000644 000765 000024 00000015641 12233035540 024444 0ustar00honglistaff000000 000000 // Copyright 2000 John Maddock (john@johnmaddock.co.uk) // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED #define BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED #include #include #include namespace boost { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail { template struct function_traits_helper; template struct function_traits_helper { BOOST_STATIC_CONSTANT(unsigned, arity = 0); typedef R result_type; }; template struct function_traits_helper { BOOST_STATIC_CONSTANT(unsigned, arity = 1); typedef R result_type; typedef T1 arg1_type; typedef T1 argument_type; }; template struct function_traits_helper { BOOST_STATIC_CONSTANT(unsigned, arity = 2); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T1 first_argument_type; typedef T2 second_argument_type; }; template struct function_traits_helper { BOOST_STATIC_CONSTANT(unsigned, arity = 3); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; }; template struct function_traits_helper { BOOST_STATIC_CONSTANT(unsigned, arity = 4); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; }; template struct function_traits_helper { BOOST_STATIC_CONSTANT(unsigned, arity = 5); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; }; template struct function_traits_helper { BOOST_STATIC_CONSTANT(unsigned, arity = 6); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; }; template struct function_traits_helper { BOOST_STATIC_CONSTANT(unsigned, arity = 7); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; }; template struct function_traits_helper { BOOST_STATIC_CONSTANT(unsigned, arity = 8); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; typedef T8 arg8_type; }; template struct function_traits_helper { BOOST_STATIC_CONSTANT(unsigned, arity = 9); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; typedef T8 arg8_type; typedef T9 arg9_type; }; template struct function_traits_helper { BOOST_STATIC_CONSTANT(unsigned, arity = 10); typedef R result_type; typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type; typedef T5 arg5_type; typedef T6 arg6_type; typedef T7 arg7_type; typedef T8 arg8_type; typedef T9 arg9_type; typedef T10 arg10_type; }; } // end namespace detail template struct function_traits : public boost::detail::function_traits_helper::type> { }; #else namespace detail { template struct type_of_size { char elements[N]; }; template type_of_size<1> function_arity_helper(R (*f)()); template type_of_size<2> function_arity_helper(R (*f)(T1)); template type_of_size<3> function_arity_helper(R (*f)(T1, T2)); template type_of_size<4> function_arity_helper(R (*f)(T1, T2, T3)); template type_of_size<5> function_arity_helper(R (*f)(T1, T2, T3, T4)); template type_of_size<6> function_arity_helper(R (*f)(T1, T2, T3, T4, T5)); template type_of_size<7> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6)); template type_of_size<8> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7)); template type_of_size<9> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8)); template type_of_size<10> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8, T9)); template type_of_size<11> function_arity_helper(R (*f)(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)); } // end namespace detail // Won't work with references template struct function_traits { BOOST_STATIC_CONSTANT(unsigned, arity = (sizeof(boost::detail::function_arity_helper((Function*)0))-1)); }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } #endif // BOOST_TT_FUNCTION_TRAITS_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/has_left_shift.hpp000644 000765 000024 00000003456 12233035540 024214 0ustar00honglistaff000000 000000 // (C) Copyright 2009-2011 Frederic Bron. // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_LEFT_SHIFT_HPP_INCLUDED #define BOOST_TT_HAS_LEFT_SHIFT_HPP_INCLUDED #define BOOST_TT_TRAIT_NAME has_left_shift #define BOOST_TT_TRAIT_OP << #define BOOST_TT_FORBIDDEN_IF\ ::boost::type_traits::ice_or<\ /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ ::boost::type_traits::ice_and<\ ::boost::is_fundamental< Lhs_nocv >::value,\ ::boost::is_fundamental< Rhs_nocv >::value,\ ::boost::type_traits::ice_or<\ ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\ ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\ >::value\ >::value,\ /* Lhs==fundamental and Rhs==pointer */\ ::boost::type_traits::ice_and<\ ::boost::is_fundamental< Lhs_nocv >::value,\ ::boost::is_pointer< Rhs_noref >::value\ >::value,\ /* Rhs==fundamental and Lhs==pointer */\ ::boost::type_traits::ice_and<\ ::boost::is_fundamental< Rhs_nocv >::value,\ ::boost::is_pointer< Lhs_noref >::value\ >::value,\ /* Lhs==pointer and Rhs==pointer */\ ::boost::type_traits::ice_and<\ ::boost::is_pointer< Lhs_noref >::value,\ ::boost::is_pointer< Rhs_noref >::value\ >::value\ >::value #include #undef BOOST_TT_TRAIT_NAME #undef BOOST_TT_TRAIT_OP #undef BOOST_TT_FORBIDDEN_IF #endif passenger-4.0.37/ext/boost/type_traits/has_nothrow_assign.hpp000644 000765 000024 00000002660 12233035540 025125 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED #define BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED #include // should be the last #include #include namespace boost { namespace detail{ template struct has_nothrow_assign_imp{ #ifndef BOOST_HAS_NOTHROW_ASSIGN BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_assign::value); #else BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_ASSIGN(T)); #endif }; } BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_assign,T,::boost::detail::has_nothrow_assign_imp::value) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void volatile,false) #endif } // namespace boost #include #endif // BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/has_nothrow_constructor.hpp000644 000765 000024 00000003744 12233035540 026232 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED #define BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED #include // should be the last #include #include namespace boost { namespace detail{ template struct has_nothrow_constructor_imp{ #ifdef BOOST_HAS_NOTHROW_CONSTRUCTOR BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_CONSTRUCTOR(T)); #else BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_constructor::value); #endif }; } BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_constructor,T,::boost::detail::has_nothrow_constructor_imp::value) BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_default_constructor,T,::boost::detail::has_nothrow_constructor_imp::value) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void volatile,false) #endif BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void volatile,false) #endif } // namespace boost #include #endif // BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/has_nothrow_copy.hpp000644 000765 000024 00000003554 12233035540 024616 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED #define BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED #include // should be the last #include #include namespace boost { namespace detail{ template struct has_nothrow_copy_imp{ #ifdef BOOST_HAS_NOTHROW_COPY BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_COPY(T)); #else BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_copy::value); #endif }; } BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy,T,::boost::detail::has_nothrow_copy_imp::value) BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy_constructor,T,::boost::detail::has_nothrow_copy_imp::value) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void volatile,false) #endif BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void volatile,false) #endif } // namespace boost #include #endif // BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/has_right_shift.hpp000644 000765 000024 00000003461 12233035540 024373 0ustar00honglistaff000000 000000 // (C) Copyright 2009-2011 Frederic Bron. // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_RIGHT_SHIFT_HPP_INCLUDED #define BOOST_TT_HAS_RIGHT_SHIFT_HPP_INCLUDED #define BOOST_TT_TRAIT_NAME has_right_shift #define BOOST_TT_TRAIT_OP >> #define BOOST_TT_FORBIDDEN_IF\ ::boost::type_traits::ice_or<\ /* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\ ::boost::type_traits::ice_and<\ ::boost::is_fundamental< Lhs_nocv >::value,\ ::boost::is_fundamental< Rhs_nocv >::value,\ ::boost::type_traits::ice_or<\ ::boost::type_traits::ice_not< ::boost::is_integral< Lhs_noref >::value >::value,\ ::boost::type_traits::ice_not< ::boost::is_integral< Rhs_noref >::value >::value\ >::value\ >::value,\ /* Lhs==fundamental and Rhs==pointer */\ ::boost::type_traits::ice_and<\ ::boost::is_fundamental< Lhs_nocv >::value,\ ::boost::is_pointer< Rhs_noref >::value\ >::value,\ /* Rhs==fundamental and Lhs==pointer */\ ::boost::type_traits::ice_and<\ ::boost::is_fundamental< Rhs_nocv >::value,\ ::boost::is_pointer< Lhs_noref >::value\ >::value,\ /* Lhs==pointer and Rhs==pointer */\ ::boost::type_traits::ice_and<\ ::boost::is_pointer< Lhs_noref >::value,\ ::boost::is_pointer< Rhs_noref >::value\ >::value\ >::value #include #undef BOOST_TT_TRAIT_NAME #undef BOOST_TT_TRAIT_OP #undef BOOST_TT_FORBIDDEN_IF #endif passenger-4.0.37/ext/boost/type_traits/has_trivial_assign.hpp000644 000765 000024 00000003705 12233035540 025100 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED #define BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED #include #include #include #include #include #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct has_trivial_assign_impl { #ifdef BOOST_HAS_TRIVIAL_ASSIGN BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_ASSIGN(T)); #else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::is_pod::value, ::boost::type_traits::ice_not< ::boost::is_const::value >::value, ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value >::value)); #endif }; } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_assign,T,::boost::detail::has_trivial_assign_impl::value) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void volatile,false) #endif } // namespace boost #include #endif // BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/has_trivial_constructor.hpp000644 000765 000024 00000003056 12233035540 026200 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED #define BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED #include #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct has_trivial_ctor_impl { #ifdef BOOST_HAS_TRIVIAL_CONSTRUCTOR BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_pod::value, BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) >::value)); #else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_pod::value, false >::value)); #endif }; } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_constructor,T,::boost::detail::has_trivial_ctor_impl::value) BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_default_constructor,T,::boost::detail::has_trivial_ctor_impl::value) } // namespace boost #include #endif // BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/has_trivial_copy.hpp000644 000765 000024 00000004424 12233035540 024565 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED #define BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED #include #include #include #include #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct has_trivial_copy_impl { #ifdef BOOST_HAS_TRIVIAL_COPY BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_COPY(T)); #else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::is_pod::value, ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value >::value)); #endif }; } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy,T,::boost::detail::has_trivial_copy_impl::value) BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy_constructor,T,::boost::detail::has_trivial_copy_impl::value) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void volatile,false) #endif BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void volatile,false) #endif } // namespace boost #include #endif // BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/has_trivial_destructor.hpp000644 000765 000024 00000003132 12233035540 026004 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED #define BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED #include #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct has_trivial_dtor_impl { #ifdef BOOST_HAS_TRIVIAL_DESTRUCTOR BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_DESTRUCTOR(T)); #else BOOST_STATIC_CONSTANT(bool, value = ::boost::is_pod::value); #endif }; } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_destructor,T,::boost::detail::has_trivial_dtor_impl::value) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void volatile,false) #endif } // namespace boost #include #endif // BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/has_trivial_move_assign.hpp000644 000765 000024 00000004031 12233035540 026117 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // (C) Copyright Eric Friedman 2002-2003. // (C) Copyright Antony Polukhin 2013. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED #define BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED #include #include #include #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct has_trivial_move_assign_impl { #ifdef BOOST_HAS_TRIVIAL_MOVE_ASSIGN BOOST_STATIC_CONSTANT(bool, value = (BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T))); #else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::is_pod::value, ::boost::type_traits::ice_not< ::boost::is_const::value >::value, ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value >::value)); #endif }; } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_move_assign,T,::boost::detail::has_trivial_move_assign_impl::value) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_assign,void volatile,false) #endif } // namespace boost #include #endif // BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/has_trivial_move_constructor.hpp000644 000765 000024 00000003767 12233035540 027237 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // (C) Copyright Eric Friedman 2002-2003. // (C) Copyright Antony Polukhin 2013. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED #define BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED #include #include #include #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct has_trivial_move_ctor_impl { #ifdef BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR BOOST_STATIC_CONSTANT(bool, value = (BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T))); #else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::is_pod::value, ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value >::value)); #endif }; } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_move_constructor,T,::boost::detail::has_trivial_move_ctor_impl::value) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_move_constructor,void volatile,false) #endif } // namespace boost #include #endif // BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/ice.hpp000644 000765 000024 00000001400 12233035540 021755 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock and Steve Cleary 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // // macros and helpers for working with integral-constant-expressions. #ifndef BOOST_TT_ICE_HPP_INCLUDED #define BOOST_TT_ICE_HPP_INCLUDED #include #include #include #include #include #endif // BOOST_TT_ICE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/integral_constant.hpp000644 000765 000024 00000002603 12233035540 024741 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP #define BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP #include #include #include namespace boost{ #if defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) || defined(__BORLANDC__) template #else template #endif struct integral_constant : public mpl::integral_c { typedef integral_constant type; }; template<> struct integral_constant : public mpl::true_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) # pragma warning(push) # pragma warning(disable:4097) typedef mpl::true_ base_; using base_::value; # pragma warning(pop) #endif typedef integral_constant type; }; template<> struct integral_constant : public mpl::false_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) # pragma warning(push) # pragma warning(disable:4097) typedef mpl::false_ base_; using base_::value; # pragma warning(pop) #endif typedef integral_constant type; }; typedef integral_constant true_type; typedef integral_constant false_type; } #endif passenger-4.0.37/ext/boost/type_traits/intrinsics.hpp000644 000765 000024 00000036411 12233035540 023414 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_INTRINSICS_HPP_INCLUDED #define BOOST_TT_INTRINSICS_HPP_INCLUDED #ifndef BOOST_TT_CONFIG_HPP_INCLUDED #include #endif // // Helper macros for builtin compiler support. // If your compiler has builtin support for any of the following // traits concepts, then redefine the appropriate macros to pick // up on the compiler support: // // (these should largely ignore cv-qualifiers) // BOOST_IS_UNION(T) should evaluate to true if T is a union type // BOOST_IS_POD(T) should evaluate to true if T is a POD type // BOOST_IS_EMPTY(T) should evaluate to true if T is an empty class type (and not a union) // BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect // BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy // BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy // BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy // BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy // BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect // BOOST_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw // BOOST_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw // BOOST_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw // BOOST_HAS_VIRTUAL_DESTRUCTOR(T) should evaluate to true T has a virtual destructor // // The following can also be defined: when detected our implementation is greatly simplified. // // BOOST_IS_ABSTRACT(T) true if T is an abstract type // BOOST_IS_BASE_OF(T,U) true if T is a base class of U // BOOST_IS_CLASS(T) true if T is a class type (and not a union) // BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U // BOOST_IS_ENUM(T) true is T is an enum // BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type // BOOST_ALIGNMENT_OF(T) should evaluate to the alignment requirements of type T. #ifdef BOOST_HAS_SGI_TYPE_TRAITS // Hook into SGI's __type_traits class, this will pick up user supplied // specializations as well as SGI - compiler supplied specializations. # include # ifdef __NetBSD__ // There are two different versions of type_traits.h on NetBSD on Spark // use an implicit include via algorithm instead, to make sure we get // the same version as the std lib: # include # else # include # endif # define BOOST_IS_POD(T) ::boost::is_same< typename ::__type_traits::is_POD_type, ::__true_type>::value # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< typename ::__type_traits::has_trivial_default_constructor, ::__true_type>::value # define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< typename ::__type_traits::has_trivial_copy_constructor, ::__true_type>::value # define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< typename ::__type_traits::has_trivial_assignment_operator, ::__true_type>::value # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< typename ::__type_traits::has_trivial_destructor, ::__true_type>::value # ifdef __sgi # define BOOST_HAS_TYPE_TRAITS_INTRINSICS # endif #endif #if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) // Metrowerks compiler is acquiring intrinsic type traits support // post version 8. We hook into the published interface to pick up // user defined specializations as well as compiler intrinsics as // and when they become available: # include # define BOOST_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union::value # define BOOST_IS_POD(T) BOOST_STD_EXTENSION_NAMESPACE::is_POD::value # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_default_ctor::value # define BOOST_HAS_TRIVIAL_COPY(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_copy_ctor::value # define BOOST_HAS_TRIVIAL_ASSIGN(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_assignment::value # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_dtor::value # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\ || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500)) # include # include # define BOOST_IS_UNION(T) __is_union(T) # define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T)) # define BOOST_IS_EMPTY(T) __is_empty(T) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) # define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)|| ( ::boost::is_pod::value && !::boost::is_volatile::value)) # define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ( ::boost::is_pod::value && ! ::boost::is_const::value && !::boost::is_volatile::value)) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::is_pod::value) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::has_trivial_constructor::value) # define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) || ::boost::has_trivial_copy::value) # define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::has_trivial_assign::value) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # define BOOST_IS_ABSTRACT(T) __is_abstract(T) # define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_CONVERTIBLE(T,U) ((__is_convertible_to(T,U) || (is_same::value && !is_function::value)) && !__is_abstract(U)) # define BOOST_IS_ENUM(T) __is_enum(T) // This one doesn't quite always do the right thing: // # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) // This one fails if the default alignment has been changed with /Zp: // # define BOOST_ALIGNMENT_OF(T) __alignof(T) # if defined(_MSC_VER) && (_MSC_VER >= 1700) # define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || ::boost::is_pod::value) && !::boost::is_volatile::value) # define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || ::boost::is_pod::value) && ! ::boost::is_const::value && !::boost::is_volatile::value) # endif # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #if defined(__DMC__) && (__DMC__ >= 0x848) // For Digital Mars C++, www.digitalmars.com # define BOOST_IS_UNION(T) (__typeinfo(T) & 0x400) # define BOOST_IS_POD(T) (__typeinfo(T) & 0x800) # define BOOST_IS_EMPTY(T) (__typeinfo(T) & 0x1000) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__typeinfo(T) & 0x10) # define BOOST_HAS_TRIVIAL_COPY(T) (__typeinfo(T) & 0x20) # define BOOST_HAS_TRIVIAL_ASSIGN(T) (__typeinfo(T) & 0x40) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__typeinfo(T) & 0x8) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__typeinfo(T) & 0x80) # define BOOST_HAS_NOTHROW_COPY(T) (__typeinfo(T) & 0x100) # define BOOST_HAS_NOTHROW_ASSIGN(T) (__typeinfo(T) & 0x200) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) (__typeinfo(T) & 0x4) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #if defined(BOOST_CLANG) && defined(__has_feature) # include # include # include # include # if __has_feature(is_union) # define BOOST_IS_UNION(T) __is_union(T) # endif # if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod) # define BOOST_IS_POD(T) __is_pod(T) # endif # if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty) # define BOOST_IS_EMPTY(T) __is_empty(T) # endif # if __has_feature(has_trivial_constructor) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) # endif # if __has_feature(has_trivial_copy) # define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value && !is_volatile::value) # endif # if __has_feature(has_trivial_assign) # define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) # endif # if __has_feature(has_trivial_destructor) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) # endif # if __has_feature(has_nothrow_constructor) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) # endif # if __has_feature(has_nothrow_copy) # define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) # endif # if __has_feature(has_nothrow_assign) # define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) # endif # if __has_feature(has_virtual_destructor) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # endif # if __has_feature(is_abstract) # define BOOST_IS_ABSTRACT(T) __is_abstract(T) # endif # if __has_feature(is_base_of) # define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) # endif # if __has_feature(is_class) # define BOOST_IS_CLASS(T) __is_class(T) # endif # if __has_feature(is_convertible_to) # include # define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible_to(T,U) && !::boost::is_abstract::value) # endif # if __has_feature(is_enum) # define BOOST_IS_ENUM(T) __is_enum(T) # endif # if __has_feature(is_polymorphic) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) # endif # if __has_feature(has_trivial_move_constructor) # define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T) # endif # if __has_feature(has_trivial_move_assign) # define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T) # endif # define BOOST_ALIGNMENT_OF(T) __alignof(T) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG) # include # include # include #ifdef BOOST_INTEL # define BOOST_INTEL_TT_OPTS || is_pod::value #else # define BOOST_INTEL_TT_OPTS #endif # define BOOST_IS_UNION(T) __is_union(T) # define BOOST_IS_POD(T) __is_pod(T) # define BOOST_IS_EMPTY(T) __is_empty(T) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value) # define BOOST_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_INTEL_TT_OPTS) && !is_reference::value && ! ::boost::is_volatile::value) # define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value && ! ::boost::is_const::value) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_INTEL_TT_OPTS) # define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_reference::value) # define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_const::value) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # define BOOST_IS_ABSTRACT(T) __is_abstract(T) # define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_ENUM(T) __is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) # if (!defined(unix) && !defined(__unix__)) || defined(__LP64__) // GCC sometimes lies about alignment requirements // of type double on 32-bit unix platforms, use the // old implementation instead in that case: # define BOOST_ALIGNMENT_OF(T) __alignof__(T) # endif # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600) # include # include # include # define BOOST_IS_UNION(T) __is_union(T) # define BOOST_IS_POD(T) __is_pod(T) # define BOOST_IS_EMPTY(T) __is_empty(T) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) # define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value && !is_volatile::value) # define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) # define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) # define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # define BOOST_IS_ABSTRACT(T) __is_abstract(T) # define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_ENUM(T) __is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) # define BOOST_ALIGNMENT_OF(T) __alignof__(T) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif # if defined(__CODEGEARC__) # include # include # include # include # define BOOST_IS_UNION(T) __is_union(T) # define BOOST_IS_POD(T) __is_pod(T) # define BOOST_IS_EMPTY(T) __is_empty(T) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T)) # define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_volatile::value && !is_reference::value) # define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T)) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T)) # define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile::value && !is_reference::value) # define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # define BOOST_IS_ABSTRACT(T) __is_abstract(T) # define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_void::value && !is_void::value) # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible(T,U) || is_void::value) # define BOOST_IS_ENUM(T) __is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) # define BOOST_ALIGNMENT_OF(T) alignof(T) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #endif // BOOST_TT_INTRINSICS_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_abstract.hpp000644 000765 000024 00000010732 12233035540 023523 0ustar00honglistaff000000 000000 #ifndef BOOST_TT_IS_ABSTRACT_CLASS_HPP #define BOOST_TT_IS_ABSTRACT_CLASS_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // is_abstract_class.hpp: // // (C) Copyright 2002 Rani Sharoni (rani_sharoni@hotmail.com) and Robert Ramey // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org for updates, documentation, and revision history. // // Compile type discovery whether given type is abstract class or not. // // Requires DR 337 to be supported by compiler // (http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#337). // // // Believed (Jan 2004) to work on: // - GCC 3.4 // - VC++ 7.1 // - compilers with new EDG frontend (Intel C++ 7, Comeau 4.3.2) // // Doesn't work on: // - VC++6, VC++7.0 and less // - GCC 3.3.X and less // - Borland C++ 6 and less // // // History: // - Originally written by Rani Sharoni, see // http://groups.google.com/groups?selm=df893da6.0207110613.75b2fe90%40posting.google.com // At this time supported by EDG (Intel C++ 7, Comeau 4.3.2) and VC7.1. // - Adapted and added into Boost.Serialization library by Robert Ramey // (starting with submission #10). // - Jan 2004: GCC 3.4 fixed to support DR337 (Giovanni Bajo). // - Jan 2004: modified to be part of Boost.TypeTraits (Pavel Vozenilek). // - Nov 2004: Christoph Ludwig found that the implementation did not work with // template types and gcc-3.4 or VC7.1, fix due to Christoph Ludwig // and John Maddock. // - Dec 2004: Added new config macro BOOST_NO_IS_ABSTRACT which causes the template // to degrade gracefully, rather than trash the compiler (John Maddock). // #include #ifndef BOOST_IS_ABSTRACT #include #include #include #include #ifdef BOOST_NO_IS_ABSTRACT #include #endif #endif // should be the last #include #include namespace boost { namespace detail{ #ifdef BOOST_IS_ABSTRACT template struct is_abstract_imp { BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_ABSTRACT(T)); }; #elif !defined(BOOST_NO_IS_ABSTRACT) template struct is_abstract_imp2 { // Deduction fails if T is void, function type, // reference type (14.8.2/2)or an abstract class type // according to review status issue #337 // template static type_traits::no_type check_sig(U (*)[1]); template static type_traits::yes_type check_sig(...); // // T must be a complete type, further if T is a template then // it must be instantiated in order for us to get the right answer: // BOOST_STATIC_ASSERT(sizeof(T) != 0); // GCC2 won't even parse this template if we embed the computation // of s1 in the computation of value. #ifdef __GNUC__ BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(is_abstract_imp2::template check_sig(0))); #else #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(check_sig(0))); #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif #endif BOOST_STATIC_CONSTANT(bool, value = (s1 == sizeof(type_traits::yes_type))); }; template struct is_abstract_select { template struct rebind { typedef is_abstract_imp2 type; }; }; template <> struct is_abstract_select { template struct rebind { typedef false_type type; }; }; template struct is_abstract_imp { typedef is_abstract_select< ::boost::is_class::value> selector; typedef typename selector::template rebind binder; typedef typename binder::type type; BOOST_STATIC_CONSTANT(bool, value = type::value); }; #endif } #ifndef BOOST_NO_IS_ABSTRACT BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_abstract,T,::boost::detail::is_abstract_imp::value) #else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_abstract,T,::boost::detail::is_polymorphic_imp::value) #endif } // namespace boost #include #endif //BOOST_TT_IS_ABSTRACT_CLASS_HPP passenger-4.0.37/ext/boost/type_traits/is_arithmetic.hpp000644 000765 000024 00000002713 12233035540 024051 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED #define BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED #if !defined( __CODEGEARC__ ) #include #include #include #include #endif // should be the last #include #include namespace boost { #if !defined(__CODEGEARC__) namespace detail { template< typename T > struct is_arithmetic_impl { BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_float::value >::value)); }; } // namespace detail #endif //* is a type T an arithmetic type described in the standard (3.9.1p8) #if defined(__CODEGEARC__) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,__is_arithmetic(T)) #else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,::boost::detail::is_arithmetic_impl::value) #endif } // namespace boost #include #endif // BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_array.hpp000644 000765 000024 00000006201 12233035540 023032 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Some fixes for is_array are based on a newsgroup posting by Jonathan Lundquist. #ifndef BOOST_TT_IS_ARRAY_HPP_INCLUDED #define BOOST_TT_IS_ARRAY_HPP_INCLUDED #include #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include # include #endif #include // should be the last #include #include namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,__is_array(T)) #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,false) #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T[N],true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T const[N],true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T volatile[N],true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T const volatile[N],true) #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T[],true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T const[],true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T volatile[],true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_array,T const volatile[],true) #endif #endif #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail { using ::boost::type_traits::yes_type; using ::boost::type_traits::no_type; using ::boost::type_traits::wrap; template< typename T > T(* is_array_tester1(wrap) )(wrap); char BOOST_TT_DECL is_array_tester1(...); template< typename T> no_type is_array_tester2(T(*)(wrap)); yes_type BOOST_TT_DECL is_array_tester2(...); template< typename T > struct is_array_impl { BOOST_STATIC_CONSTANT(bool, value = sizeof(::boost::detail::is_array_tester2( ::boost::detail::is_array_tester1( ::boost::type_traits::wrap() ) )) == 1 ); }; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void const,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void volatile,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void const volatile,false) #endif } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,::boost::detail::is_array_impl::value) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost #include #endif // BOOST_TT_IS_ARRAY_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_base_and_derived.hpp000644 000765 000024 00000017754 12233035540 025171 0ustar00honglistaff000000 000000 // (C) Copyright Rani Sharoni 2003. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED #define BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED #include #ifndef BOOST_IS_BASE_OF #include #include #include #include #include #include #endif #include // should be the last #include #include namespace boost { namespace detail { #ifndef BOOST_IS_BASE_OF #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581)) \ && !BOOST_WORKAROUND(__SUNPRO_CC , <= 0x540) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 243) \ && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) // The EDG version number is a lower estimate. // It is not currently known which EDG version // exactly fixes the problem. /************************************************************************* This version detects ambiguous base classes and private base classes correctly, and was devised by Rani Sharoni. Explanation by Terje Slettebo and Rani Sharoni. Let's take the multiple base class below as an example, and the following will also show why there's not a problem with private or ambiguous base class: struct B {}; struct B1 : B {}; struct B2 : B {}; struct D : private B1, private B2 {}; is_base_and_derived::value; First, some terminology: SC - Standard conversion UDC - User-defined conversion A user-defined conversion sequence consists of an SC, followed by an UDC, followed by another SC. Either SC may be the identity conversion. When passing the default-constructed Host object to the overloaded check_sig() functions (initialization 8.5/14/4/3), we have several viable implicit conversion sequences: For "static no_type check_sig(B const volatile *, int)" we have the conversion sequences: C -> C const (SC - Qualification Adjustment) -> B const volatile* (UDC) C -> D const volatile* (UDC) -> B1 const volatile* / B2 const volatile* -> B const volatile* (SC - Conversion) For "static yes_type check_sig(D const volatile *, T)" we have the conversion sequence: C -> D const volatile* (UDC) According to 13.3.3.1/4, in context of user-defined conversion only the standard conversion sequence is considered when selecting the best viable function, so it only considers up to the user-defined conversion. For the first function this means choosing between C -> C const and C -> C, and it chooses the latter, because it's a proper subset (13.3.3.2/3/2) of the former. Therefore, we have: C -> D const volatile* (UDC) -> B1 const volatile* / B2 const volatile* -> B const volatile* (SC - Conversion) C -> D const volatile* (UDC) Here, the principle of the "shortest subsequence" applies again, and it chooses C -> D const volatile*. This shows that it doesn't even need to consider the multiple paths to B, or accessibility, as that possibility is eliminated before it could possibly cause ambiguity or access violation. If D is not derived from B, it has to choose between C -> C const -> B const volatile* for the first function, and C -> D const volatile* for the second function, which are just as good (both requires a UDC, 13.3.3.2), had it not been for the fact that "static no_type check_sig(B const volatile *, int)" is not templated, which makes C -> C const -> B const volatile* the best choice (13.3.3/1/4), resulting in "no". Also, if Host::operator B const volatile* hadn't been const, the two conversion sequences for "static no_type check_sig(B const volatile *, int)", in the case where D is derived from B, would have been ambiguous. See also http://groups.google.com/groups?selm=df893da6.0301280859.522081f7%40posting. google.com and links therein. *************************************************************************/ template struct bd_helper { // // This VC7.1 specific workaround stops the compiler from generating // an internal compiler error when compiling with /vmg (thanks to // Aleksey Gurtovoy for figuring out the workaround). // #if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) template static type_traits::yes_type check_sig(D const volatile *, T); static type_traits::no_type check_sig(B const volatile *, int); #else static type_traits::yes_type check_sig(D const volatile *, long); static type_traits::no_type check_sig(B const volatile * const&, int); #endif }; template struct is_base_and_derived_impl2 { #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif // // May silently do the wrong thing with incomplete types // unless we trap them here: // BOOST_STATIC_ASSERT(sizeof(B) != 0); BOOST_STATIC_ASSERT(sizeof(D) != 0); struct Host { #if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) operator B const volatile *() const; #else operator B const volatile * const&() const; #endif operator D const volatile *(); }; BOOST_STATIC_CONSTANT(bool, value = sizeof(bd_helper::check_sig(Host(), 0)) == sizeof(type_traits::yes_type)); #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; #else // // broken version: // template struct is_base_and_derived_impl2 { BOOST_STATIC_CONSTANT(bool, value = (::boost::is_convertible::value)); }; #define BOOST_BROKEN_IS_BASE_AND_DERIVED #endif template struct is_base_and_derived_impl3 { BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_base_and_derived_select { template struct rebind { typedef is_base_and_derived_impl3 type; }; }; template <> struct is_base_and_derived_select { template struct rebind { typedef is_base_and_derived_impl2 type; }; }; template struct is_base_and_derived_impl { typedef typename remove_cv::type ncvB; typedef typename remove_cv::type ncvD; typedef is_base_and_derived_select< ::boost::is_class::value, ::boost::is_class::value, ::boost::is_same::value> selector; typedef typename selector::template rebind binder; typedef typename binder::type bound_type; BOOST_STATIC_CONSTANT(bool, value = bound_type::value); }; #else template struct is_base_and_derived_impl { typedef typename remove_cv::type ncvB; typedef typename remove_cv::type ncvD; BOOST_STATIC_CONSTANT(bool, value = (BOOST_IS_BASE_OF(B,D) && ! ::boost::is_same::value)); }; #endif } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF2( is_base_and_derived , Base , Derived , (::boost::detail::is_base_and_derived_impl::value) ) #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base&,Derived,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base,Derived&,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_and_derived,Base&,Derived&,false) #endif #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename Base,is_base_and_derived,Base,Base,false) #endif } // namespace boost #include #endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_base_of.hpp000644 000765 000024 00000003542 12233035540 023317 0ustar00honglistaff000000 000000 // (C) Copyright Rani Sharoni 2003-2005. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_BASE_OF_HPP_INCLUDED #define BOOST_TT_IS_BASE_OF_HPP_INCLUDED #include #include #include #include #include // should be the last #include #include namespace boost { namespace detail{ template struct is_base_of_imp { typedef typename remove_cv::type ncvB; typedef typename remove_cv::type ncvD; BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< (::boost::detail::is_base_and_derived_impl::value), (::boost::type_traits::ice_and< ::boost::is_same::value, ::boost::is_class::value>::value)>::value)); }; } BOOST_TT_AUX_BOOL_TRAIT_DEF2( is_base_of , Base , Derived , (::boost::detail::is_base_of_imp::value)) #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base,Derived&,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived&,false) #endif } // namespace boost #include #endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_class.hpp000644 000765 000024 00000011176 12233035540 023030 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000-2003. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_CLASS_HPP_INCLUDED #define BOOST_TT_IS_CLASS_HPP_INCLUDED #include #include #ifndef BOOST_IS_CLASS # include # include # include #ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION # include #else # include # include # include # include # include #endif #endif // BOOST_IS_CLASS #ifdef __EDG_VERSION__ # include #endif // should be the last #include #include namespace boost { namespace detail { #ifndef BOOST_IS_CLASS #ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION // This is actually the conforming implementation which works with // abstract classes. However, enough compilers have trouble with // it that most will use the one in // boost/type_traits/object_traits.hpp. This implementation // actually works with VC7.0, but other interactions seem to fail // when we use it. // is_class<> metafunction due to Paul Mensonides // (leavings@attbi.com). For more details: // http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1 #if defined(__GNUC__) && !defined(__EDG_VERSION__) template ::boost::type_traits::yes_type is_class_tester(void(U::*)(void)); template ::boost::type_traits::no_type is_class_tester(...); template struct is_class_impl { BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< sizeof(is_class_tester(0)) == sizeof(::boost::type_traits::yes_type), ::boost::type_traits::ice_not< ::boost::is_union::value >::value >::value) ); }; #else template struct is_class_impl { template static ::boost::type_traits::yes_type is_class_tester(void(U::*)(void)); template static ::boost::type_traits::no_type is_class_tester(...); BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< sizeof(is_class_tester(0)) == sizeof(::boost::type_traits::yes_type), ::boost::type_traits::ice_not< ::boost::is_union::value >::value >::value) ); }; #endif #else template struct is_class_impl { # ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_union::value >::value, ::boost::type_traits::ice_not< ::boost::is_scalar::value >::value, ::boost::type_traits::ice_not< ::boost::is_array::value >::value, ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, ::boost::type_traits::ice_not< ::boost::is_void::value >::value, ::boost::type_traits::ice_not< ::boost::is_function::value >::value >::value)); # else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_union::value >::value, ::boost::type_traits::ice_not< ::boost::is_scalar::value >::value, ::boost::type_traits::ice_not< ::boost::is_array::value >::value, ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, ::boost::type_traits::ice_not< ::boost::is_void::value >::value >::value)); # endif }; # endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION # else // BOOST_IS_CLASS template struct is_class_impl { BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_CLASS(T)); }; # endif // BOOST_IS_CLASS } // namespace detail # ifdef __EDG_VERSION__ BOOST_TT_AUX_BOOL_TRAIT_DEF1( is_class,T, boost::detail::is_class_impl::type>::value) # else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_class,T,::boost::detail::is_class_impl::value) # endif } // namespace boost #include #endif // BOOST_TT_IS_CLASS_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_compound.hpp000644 000765 000024 00000002431 12233035540 023541 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_COMPOUND_HPP_INCLUDED #define BOOST_TT_IS_COMPOUND_HPP_INCLUDED #include #include #include // should be the last #include #include namespace boost { #if !defined( __CODEGEARC__ ) namespace detail { template struct is_compound_impl { BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_not< ::boost::is_fundamental::value >::value)); }; } // namespace detail #endif // !defined( __CODEGEARC__ ) #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_compound,T,__is_compound(T)) #else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_compound,T,::boost::detail::is_compound_impl::value) #endif } // namespace boost #include #endif // BOOST_TT_IS_COMPOUND_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_const.hpp000644 000765 000024 00000012147 12233035540 023050 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Fixed is_pointer, is_reference, is_const, is_volatile, is_same, // is_member_pointer based on the Simulated Partial Specialization work // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or // http://groups.yahoo.com/group/boost/message/5441 // Some workarounds in here use ideas suggested from "Generic: // Mappings between Types and Values" // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). #ifndef BOOST_TT_IS_CONST_HPP_INCLUDED #define BOOST_TT_IS_CONST_HPP_INCLUDED #include #include #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include # ifdef __GNUC__ # include # endif # if BOOST_WORKAROUND(BOOST_MSVC, < 1400) # include # endif #else # include # include # include # include #endif // should be the last #include #include namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,__is_const(T)) #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace detail{ // // We can't filter out rvalue_references at the same level as // references or we get ambiguities from msvc: // template struct is_const_rvalue_filter { #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_const); #else BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_const); #endif }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct is_const_rvalue_filter { BOOST_STATIC_CONSTANT(bool, value = false); }; #endif } //* is a type T declared const - is_const BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::is_const_rvalue_filter::value) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T&,false) #if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified // references as distinct types... BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& volatile,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const volatile,false) #endif #if defined(__GNUC__) && (__GNUC__ < 3) // special case for gcc where illegally cv-qualified reference types can be // generated in some corner cases: BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T const,!(::boost::is_reference::value)) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T volatile const,!(::boost::is_reference::value)) #endif #else namespace detail { using ::boost::type_traits::yes_type; using ::boost::type_traits::no_type; yes_type is_const_tester(const volatile void*); no_type is_const_tester(volatile void *); template struct is_const_helper : public ::boost::type_traits::false_result { }; template <> struct is_const_helper { template struct result_ { static T* t; BOOST_STATIC_CONSTANT(bool, value = ( sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_const_tester(t)) )); }; }; template <> struct is_const_helper { template struct result_ { static T t; BOOST_STATIC_CONSTANT(bool, value = ( sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_const_tester(&t)) )); }; }; template struct is_const_impl : public is_const_helper< is_reference::value , is_array::value >::template result_ { }; BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void const,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void volatile,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void const volatile,true) #endif } // namespace detail //* is a type T declared const - is_const BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::is_const_impl::value) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost #include #endif // BOOST_TT_IS_CONST_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_convertible.hpp000644 000765 000024 00000040204 12233035540 024231 0ustar00honglistaff000000 000000 // Copyright 2000 John Maddock (john@johnmaddock.co.uk) // Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) // Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED #define BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED #include #ifndef BOOST_IS_CONVERTIBLE #include #include #include #include #include #include #ifndef BOOST_NO_IS_ABSTRACT #include #endif #include #include #include #if defined(__MWERKS__) #include #endif #endif // BOOST_IS_CONVERTIBLE // should be always the last #include directive #include namespace boost { #ifndef BOOST_IS_CONVERTIBLE // is one type convertible to another? // // there are multiple versions of the is_convertible // template, almost every compiler seems to require its // own version. // // Thanks to Andrei Alexandrescu for the original version of the // conversion detection technique! // namespace detail { // MS specific version: #if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) // This workaround is necessary to handle when From is void // which is normally taken care of by the partial specialization // of the is_convertible typename. using ::boost::type_traits::yes_type; using ::boost::type_traits::no_type; template< typename From > struct does_conversion_exist { template< typename To > struct result_ { static no_type BOOST_TT_DECL _m_check(...); static yes_type BOOST_TT_DECL _m_check(To); static typename add_lvalue_reference::type _m_from; enum { value = sizeof( _m_check(_m_from) ) == sizeof(yes_type) }; }; }; template<> struct does_conversion_exist { template< typename To > struct result_ { enum { value = ::boost::is_void::value }; }; }; template struct is_convertible_basic_impl : public does_conversion_exist::template result_ { }; #elif defined(__BORLANDC__) && (__BORLANDC__ < 0x560) // // special version for Borland compilers // this version breaks when used for some // UDT conversions: // template struct is_convertible_impl { #pragma option push -w-8074 // This workaround for Borland breaks the EDG C++ frontend, // so we only use it for Borland. template struct checker { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T); }; static typename add_lvalue_reference::type _m_from; static bool const value = sizeof( checker::_m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type); #pragma option pop }; #elif defined(__GNUC__) || defined(__BORLANDC__) && (__BORLANDC__ < 0x600) // special version for gcc compiler + recent Borland versions // note that this does not pass UDT's through (...) struct any_conversion { template any_conversion(const volatile T&); template any_conversion(const T&); template any_conversion(volatile T&); template any_conversion(T&); }; template struct checker { static boost::type_traits::no_type _m_check(any_conversion ...); static boost::type_traits::yes_type _m_check(T, int); }; template struct is_convertible_basic_impl { typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; static lvalue_type _m_from; #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6))) static bool const value = sizeof( boost::detail::checker::_m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type); #else static bool const value = sizeof( boost::detail::checker::_m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type); #endif }; #elif (defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 245) && !defined(__ICL)) \ || defined(__IBMCPP__) || defined(__HP_aCC) // // This is *almost* an ideal world implementation as it doesn't rely // on undefined behaviour by passing UDT's through (...). // Unfortunately it doesn't quite pass all the tests for most compilers (sigh...) // Enable this for your compiler if is_convertible_test.cpp will compile it... // // Note we do not enable this for VC7.1, because even though it passes all the // type_traits tests it is known to cause problems when instantiation occurs // deep within the instantiation tree :-( // struct any_conversion { template any_conversion(const volatile T&); template any_conversion(const T&); template any_conversion(volatile T&); // we need this constructor to catch references to functions // (which can not be cv-qualified): template any_conversion(T&); }; template struct is_convertible_basic_impl { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; static lvalue_type _m_from; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type) ); #else BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) ); #endif }; #elif defined(__DMC__) struct any_conversion { template any_conversion(const volatile T&); template any_conversion(const T&); template any_conversion(volatile T&); // we need this constructor to catch references to functions // (which can not be cv-qualified): template any_conversion(T&); }; template struct is_convertible_basic_impl { // Using '...' doesn't always work on Digital Mars. This version seems to. template static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion, float, T); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int, int); typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; static lvalue_type _m_from; // Static constants sometime cause the conversion of _m_from to To to be // called. This doesn't happen with an enum. #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES enum { value = sizeof( _m_check(static_cast(_m_from), 0, 0) ) == sizeof(::boost::type_traits::yes_type) }; #else enum { value = sizeof( _m_check(_m_from, 0, 0) ) == sizeof(::boost::type_traits::yes_type) }; #endif }; #elif defined(__MWERKS__) // // CW works with the technique implemented above for EDG, except when From // is a function type (or a reference to such a type), in which case // any_conversion won't be accepted as a valid conversion. We detect this // exceptional situation and channel it through an alternative algorithm. // template struct is_convertible_basic_impl_aux; struct any_conversion { template any_conversion(const volatile T&); template any_conversion(const T&); template any_conversion(volatile T&); template any_conversion(T&); }; template struct is_convertible_basic_impl_aux { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; static lvalue_type _m_from; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type) ); #else BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) ); #endif }; template struct is_convertible_basic_impl_aux { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; static lvalue_type _m_from; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(static_cast(_m_from)) ) == sizeof(::boost::type_traits::yes_type) ); #else BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) ); #endif }; template struct is_convertible_basic_impl: is_convertible_basic_impl_aux< From,To, ::boost::is_function::type>::value > {}; #else // // This version seems to work pretty well for a wide spectrum of compilers, // however it does rely on undefined behaviour by passing UDT's through (...). // template struct is_convertible_basic_impl { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; static lvalue_type _m_from; #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4244) #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(disable:6334) #endif #endif #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(static_cast(_m_from)) ) == sizeof(::boost::type_traits::yes_type) ); #else BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) ); #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif }; #endif // is_convertible_impl #if defined(__DMC__) // As before, a static constant sometimes causes errors on Digital Mars. template struct is_convertible_impl { enum { value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::detail::is_convertible_basic_impl::value, ::boost::is_void::value >::value, ::boost::type_traits::ice_not< ::boost::is_array::value >::value, ::boost::type_traits::ice_not< ::boost::is_function::value >::value >::value) }; }; #elif !defined(__BORLANDC__) || __BORLANDC__ > 0x551 template struct is_convertible_impl { BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::detail::is_convertible_basic_impl::value, ::boost::is_void::value >::value, ::boost::type_traits::ice_not< ::boost::is_array::value >::value, ::boost::type_traits::ice_not< ::boost::is_function::value >::value >::value) ); }; #endif template struct is_convertible_impl_select { template struct rebind { typedef is_convertible_impl type; }; }; template <> struct is_convertible_impl_select { template struct rebind { typedef true_type type; }; }; template <> struct is_convertible_impl_select { template struct rebind { typedef false_type type; }; }; template <> struct is_convertible_impl_select { template struct rebind { typedef false_type type; }; }; template struct is_convertible_impl_dispatch_base { #if !BOOST_WORKAROUND(__HP_aCC, < 60700) typedef is_convertible_impl_select< ::boost::is_arithmetic::value, ::boost::is_arithmetic::value, #ifndef BOOST_NO_IS_ABSTRACT ::boost::is_abstract::value #else false #endif > selector; #else typedef is_convertible_impl_select selector; #endif typedef typename selector::template rebind isc_binder; typedef typename isc_binder::type type; }; template struct is_convertible_impl_dispatch : public is_convertible_impl_dispatch_base::type {}; // // Now add the full and partial specialisations // for void types, these are common to all the // implementation above: // #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS # define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2,value) \ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 const,value) \ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 volatile,value) \ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 const volatile,value) \ /**/ # define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(trait,spec1,spec2,value) \ TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \ TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 const,spec2,value) \ TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 volatile,spec2,value) \ TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 const volatile,spec2,value) \ /**/ TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(is_convertible,void,void,true) # undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2 # undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1 #else BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(is_convertible,void,void,true) #endif // BOOST_NO_CV_VOID_SPECIALIZATIONS #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const,To,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void volatile,To,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const volatile,To,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,false) #endif #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl_dispatch::value)) #else BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,BOOST_IS_CONVERTIBLE(From,To)) #endif } // namespace boost #include #endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_empty.hpp000644 000765 000024 00000014004 12233035540 023052 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_EMPTY_HPP_INCLUDED #define BOOST_TT_IS_EMPTY_HPP_INCLUDED #include #include #include #include #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include # include # include #else # include # include # include # include # include # include # include #endif // should be always the last #include directive #include #ifndef BOOST_INTERNAL_IS_EMPTY #define BOOST_INTERNAL_IS_EMPTY(T) false #else #define BOOST_INTERNAL_IS_EMPTY(T) BOOST_IS_EMPTY(T) #endif namespace boost { namespace detail { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4624) // destructor could not be generated #endif template struct empty_helper_t1 : public T { empty_helper_t1(); // hh compiler bug workaround int i[256]; private: // suppress compiler warnings: empty_helper_t1(const empty_helper_t1&); empty_helper_t1& operator=(const empty_helper_t1&); }; #ifdef BOOST_MSVC #pragma warning(pop) #endif struct empty_helper_t2 { int i[256]; }; #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) template struct empty_helper { BOOST_STATIC_CONSTANT(bool, value = false); }; template struct empty_helper { BOOST_STATIC_CONSTANT( bool, value = (sizeof(empty_helper_t1) == sizeof(empty_helper_t2)) ); }; template struct is_empty_impl { typedef typename remove_cv::type cvt; BOOST_STATIC_CONSTANT( bool, value = ( ::boost::type_traits::ice_or< ::boost::detail::empty_helper::value>::value , BOOST_INTERNAL_IS_EMPTY(cvt) >::value )); }; #else // __BORLANDC__ template struct empty_helper { BOOST_STATIC_CONSTANT(bool, value = false); }; template struct empty_helper { BOOST_STATIC_CONSTANT(bool, value = ( sizeof(empty_helper_t1) == sizeof(empty_helper_t2) )); }; template struct is_empty_impl { typedef typename remove_cv::type cvt; typedef typename add_reference::type r_type; BOOST_STATIC_CONSTANT( bool, value = ( ::boost::type_traits::ice_or< ::boost::detail::empty_helper< cvt , ::boost::is_class::value , ::boost::is_convertible< r_type,int>::value >::value , BOOST_INTERNAL_IS_EMPTY(cvt) >::value)); }; #endif // __BORLANDC__ #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #ifdef BOOST_MSVC6_MEMBER_TEMPLATES template struct empty_helper_t1 : public T { empty_helper_t1(); int i[256]; }; struct empty_helper_t2 { int i[256]; }; template struct empty_helper_base { enum { value = (sizeof(empty_helper_t1) == sizeof(empty_helper_t2)) }; }; template struct empty_helper_nonbase { enum { value = false }; }; template struct empty_helper_chooser { template struct result_ { typedef empty_helper_nonbase type; }; }; template <> struct empty_helper_chooser { template struct result_ { typedef empty_helper_base type; }; }; template struct is_empty_impl { typedef ::boost::detail::empty_helper_chooser< ::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_reference::value >::value, ::boost::type_traits::ice_not< ::boost::is_convertible::value >::value, ::boost::type_traits::ice_not< ::boost::is_pointer::value >::value, ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value, ::boost::type_traits::ice_not< ::boost::is_array::value >::value, ::boost::type_traits::ice_not< ::boost::is_void::value >::value, ::boost::type_traits::ice_not< ::boost::is_convertible::value >::value >::value > chooser; typedef typename chooser::template result_ result; typedef typename result::type eh_type; BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or::value)); }; #else template struct is_empty_impl { BOOST_STATIC_CONSTANT(bool, value = BOOST_INTERNAL_IS_EMPTY(T)); }; #endif // BOOST_MSVC6_MEMBER_TEMPLATES #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // these help when the compiler has no partial specialization support: BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void const,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void volatile,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_empty,void const volatile,false) #endif } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_empty,T,::boost::detail::is_empty_impl::value) } // namespace boost #include #undef BOOST_INTERNAL_IS_EMPTY #endif // BOOST_TT_IS_EMPTY_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_enum.hpp000644 000765 000024 00000013011 12233035540 022655 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_ENUM_HPP_INCLUDED #define BOOST_TT_IS_ENUM_HPP_INCLUDED #include #ifndef BOOST_IS_ENUM #include #include #include #include #include #ifdef __GNUC__ #include #endif #include #if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) # include # include #endif #endif // should be the last #include #include namespace boost { #ifndef BOOST_IS_ENUM #if !(defined(__BORLANDC__) && (__BORLANDC__ <= 0x551)) namespace detail { #if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) template struct is_class_or_union { BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_class::value , ::boost::is_union::value >::value)); }; #else template struct is_class_or_union { # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))// we simply can't detect it this way. BOOST_STATIC_CONSTANT(bool, value = false); # else template static ::boost::type_traits::yes_type is_class_or_union_tester(void(U::*)(void)); # if BOOST_WORKAROUND(BOOST_MSVC, == 1300) \ || BOOST_WORKAROUND(__MWERKS__, <= 0x3000) // no SFINAE static ::boost::type_traits::no_type is_class_or_union_tester(...); BOOST_STATIC_CONSTANT( bool, value = sizeof(is_class_or_union_tester(0)) == sizeof(::boost::type_traits::yes_type)); # else template static ::boost::type_traits::no_type is_class_or_union_tester(...); BOOST_STATIC_CONSTANT( bool, value = sizeof(is_class_or_union_tester(0)) == sizeof(::boost::type_traits::yes_type)); # endif # endif }; #endif struct int_convertible { int_convertible(int); }; // Don't evaluate convertibility to int_convertible unless the type // is non-arithmetic. This suppresses warnings with GCC. template struct is_enum_helper { template struct type { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template <> struct is_enum_helper { template struct type : public ::boost::is_convertible::type,::boost::detail::int_convertible> { }; }; template struct is_enum_impl { //typedef ::boost::add_reference ar_t; //typedef typename ar_t::type r_type; #if defined(__GNUC__) #ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION // We MUST check for is_class_or_union on conforming compilers in // order to correctly deduce that noncopyable types are not enums // (dwa 2002/04/15)... BOOST_STATIC_CONSTANT(bool, selector = (::boost::type_traits::ice_or< ::boost::is_arithmetic::value , ::boost::is_reference::value , ::boost::is_function::value , is_class_or_union::value , is_array::value >::value)); #else // ...however, not checking is_class_or_union on non-conforming // compilers prevents a dependency recursion. BOOST_STATIC_CONSTANT(bool, selector = (::boost::type_traits::ice_or< ::boost::is_arithmetic::value , ::boost::is_reference::value , ::boost::is_function::value , is_array::value >::value)); #endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION #else // !defined(__GNUC__): BOOST_STATIC_CONSTANT(bool, selector = (::boost::type_traits::ice_or< ::boost::is_arithmetic::value , ::boost::is_reference::value , is_class_or_union::value , is_array::value >::value)); #endif #if BOOST_WORKAROUND(__BORLANDC__, < 0x600) typedef ::boost::detail::is_enum_helper< ::boost::detail::is_enum_impl::selector > se_t; #else typedef ::boost::detail::is_enum_helper se_t; #endif typedef typename se_t::template type helper; BOOST_STATIC_CONSTANT(bool, value = helper::value); }; // these help on compilers with no partial specialization support: BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void const,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void volatile,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_enum,void const volatile,false) #endif } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,::boost::detail::is_enum_impl::value) #else // __BORLANDC__ // // buggy is_convertible prevents working // implementation of is_enum: BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,false) #endif #else // BOOST_IS_ENUM BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_enum,T,BOOST_IS_ENUM(T)) #endif } // namespace boost #include #endif // BOOST_TT_IS_ENUM_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_float.hpp000644 000765 000024 00000001745 12233035540 023031 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED #define BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED // should be the last #include #include namespace boost { //* is a type T a floating-point type described in the standard (3.9.1p8) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_float,T,false) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,float,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,double,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,long double,true) } // namespace boost #include #endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_floating_point.hpp000644 000765 000024 00000002024 12233035540 024727 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000-2005. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED #define BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED // should be the last #include #include namespace boost { //* is a type T a floating-point type described in the standard (3.9.1p8) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_floating_point,T,false) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_floating_point,float,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_floating_point,double,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_floating_point,long double,true) } // namespace boost #include #endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_function.hpp000644 000765 000024 00000006016 12233035540 023545 0ustar00honglistaff000000 000000 // Copyright 2000 John Maddock (john@johnmaddock.co.uk) // Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com) // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_FUNCTION_HPP_INCLUDED #define BOOST_TT_IS_FUNCTION_HPP_INCLUDED #include #include #include #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) # include #else # include # include #endif // should be the last #include #include // is a type a function? // Please note that this implementation is unnecessarily complex: // we could just use !is_convertible::value, // except that some compilers erroneously allow conversions from // function pointers to void*. namespace boost { #if !defined( __CODEGEARC__ ) namespace detail { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) template struct is_function_chooser : public ::boost::type_traits::false_result { }; template <> struct is_function_chooser { template< typename T > struct result_ : public ::boost::type_traits::is_function_ptr_helper { }; }; template struct is_function_impl : public is_function_chooser< ::boost::is_reference::value > ::BOOST_NESTED_TEMPLATE result_ { }; #else template struct is_function_impl { #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif static T* t; BOOST_STATIC_CONSTANT( bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t)) == sizeof(::boost::type_traits::yes_type) ); #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct is_function_impl : public false_type {}; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct is_function_impl : public false_type {}; #endif #endif #endif } // namespace detail #endif // !defined( __CODEGEARC__ ) #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,__is_function(T)) #else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_function,T,::boost::detail::is_function_impl::value) #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_function,T&&,false) #endif #endif } // namespace boost #include #endif // BOOST_TT_IS_FUNCTION_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_fundamental.hpp000644 000765 000024 00000002474 12233035540 024222 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED #define BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct is_fundamental_impl : public ::boost::type_traits::ice_or< ::boost::is_arithmetic::value , ::boost::is_void::value > { }; } // namespace detail //* is a type T a fundamental type described in the standard (3.9.1) #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,__is_fundamental(T)) #else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,::boost::detail::is_fundamental_impl::value) #endif } // namespace boost #include #endif // BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_integral.hpp000644 000765 000024 00000006613 12233035540 023530 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_INTEGRAL_HPP_INCLUDED #define BOOST_TT_IS_INTEGRAL_HPP_INCLUDED #include // should be the last #include #include namespace boost { //* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3) // as an extension we include long long, as this is likely to be added to the // standard at a later date #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,__is_integral(T)) #else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_integral,T,false) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned char,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned short,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned int,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned long,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed char,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed short,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed int,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,signed long,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,bool,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,char,true) #ifndef BOOST_NO_INTRINSIC_WCHAR_T // If the following line fails to compile and you're using the Intel // compiler, see http://lists.boost.org/MailArchives/boost-users/msg06567.php, // and define BOOST_NO_INTRINSIC_WCHAR_T on the command line. BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,wchar_t,true) #endif // Same set of integral types as in boost/type_traits/integral_promotion.hpp. // Please, keep in sync. -- Alexander Nasonov #if (defined(BOOST_MSVC) && (BOOST_MSVC < 1300)) \ || (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300)) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int8,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int8,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int16,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int16,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int32,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int32,true) #ifdef __BORLANDC__ BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true) #endif #endif # if defined(BOOST_HAS_LONG_LONG) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral, ::boost::ulong_long_type,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral, ::boost::long_long_type,true) #elif defined(BOOST_HAS_MS_INT64) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int64,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int64,true) #endif #ifdef BOOST_HAS_INT128 BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,boost::int128_type,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,boost::uint128_type,true) #endif #endif // non-CodeGear implementation } // namespace boost #include #endif // BOOST_TT_IS_INTEGRAL_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_lvalue_reference.hpp000644 000765 000024 00000011111 12233035540 025216 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Fixed is_pointer, is_lvalue_reference, is_const, is_volatile, is_same, // is_member_pointer based on the Simulated Partial Specialization work // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or // http://groups.yahoo.com/group/boost/message/5441 // Some workarounds in here use ideas suggested from "Generic: // Mappings between Types and Values" // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). #ifndef BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED #define BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED #include #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include # include #endif // should be the last #include #include namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,__is_reference(T)) #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T&,true) #if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified // references as distinct types... BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const,true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& volatile,true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const volatile,true) #endif #if defined(__GNUC__) && (__GNUC__ < 3) // these allow us to work around illegally cv-qualified reference // types. BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T const ,::boost::is_lvalue_reference::value) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T volatile ,::boost::is_lvalue_reference::value) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T const volatile ,::boost::is_lvalue_reference::value) // However, the above specializations confuse gcc 2.96 unless we also // supply these specializations for array types BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,T[N],false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,const T[N],false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,volatile T[N],false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,unsigned long N,is_lvalue_reference,const volatile T[N],false) #endif #else #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4181 4097) #endif namespace detail { using ::boost::type_traits::yes_type; using ::boost::type_traits::no_type; using ::boost::type_traits::wrap; template T&(* is_lvalue_reference_helper1(wrap) )(wrap); char is_lvalue_reference_helper1(...); template no_type is_lvalue_reference_helper2(T&(*)(wrap)); yes_type is_lvalue_reference_helper2(...); template struct is_lvalue_reference_impl { BOOST_STATIC_CONSTANT( bool, value = sizeof( ::boost::detail::is_lvalue_reference_helper2( ::boost::detail::is_lvalue_reference_helper1(::boost::type_traits::wrap()))) == 1 ); }; BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void const,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void volatile,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void const volatile,false) #endif } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,::boost::detail::is_lvalue_reference_impl::value) #ifdef BOOST_MSVC # pragma warning(pop) #endif #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost #include #endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_member_function_pointer.hpp000644 000765 000024 00000010021 12233035540 026623 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED #define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED #include #include #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) // // Note: we use the "workaround" version for MSVC because it works for // __stdcall etc function types, where as the partial specialisation // version does not do so. // # include # include #else # include # include # include # include # include # include #endif // should be the last #include #include namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,__is_member_function_pointer( T )) #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) BOOST_TT_AUX_BOOL_TRAIT_DEF1( is_member_function_pointer , T , ::boost::type_traits::is_mem_fun_pointer_impl::type>::value ) #else namespace detail { #ifndef __BORLANDC__ template struct is_mem_fun_pointer_select : public ::boost::type_traits::false_result { }; template <> struct is_mem_fun_pointer_select { template struct result_ { #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif static T* make_t; typedef result_ self_type; BOOST_STATIC_CONSTANT( bool, value = ( 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t)) )); #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; }; template struct is_member_function_pointer_impl : public is_mem_fun_pointer_select< ::boost::type_traits::ice_or< ::boost::is_reference::value , ::boost::is_array::value >::value >::template result_ { }; #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_member_function_pointer_impl : public false_type{}; #endif #else // Borland C++ template struct is_member_function_pointer_impl { static T* m_t; BOOST_STATIC_CONSTANT( bool, value = (1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) ); }; template struct is_member_function_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = false); }; #endif BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void const,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void volatile,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_function_pointer,void const volatile,false) #endif } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_function_pointer,T,::boost::detail::is_member_function_pointer_impl::value) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost #include #endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_member_pointer.hpp000644 000765 000024 00000010413 12233035540 024723 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Fixed is_pointer, is_reference, is_const, is_volatile, is_same, // is_member_pointer based on the Simulated Partial Specialization work // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or // http://groups.yahoo.com/group/boost/message/5441 // Some workarounds in here use ideas suggested from "Generic: // Mappings between Types and Values" // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). #ifndef BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED #define BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED #include #include #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__BORLANDC__, < 0x600) # include #else # include # include # include # include # include # include #endif // should be the last #include #include namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,__is_member_pointer(T)) #elif BOOST_WORKAROUND(__BORLANDC__, < 0x600) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true) #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::is_member_function_pointer::value) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true) #if !BOOST_WORKAROUND(__MWERKS__,<=0x3003) && !BOOST_WORKAROUND(__IBMCPP__, <=600) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*const,true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*volatile,true) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*const volatile,true) #endif #else // no partial template specialization namespace detail { template ::boost::type_traits::yes_type BOOST_TT_DECL is_member_pointer_tester(R T::*const volatile*); ::boost::type_traits::no_type BOOST_TT_DECL is_member_pointer_tester(...); template struct is_member_pointer_select : public ::boost::type_traits::false_result { }; template <> struct is_member_pointer_select { template struct result_ { static T* make_t(); BOOST_STATIC_CONSTANT( bool, value = (::boost::type_traits::ice_or< (1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(make_t()))), (1 == sizeof(is_member_pointer_tester(make_t()))) >::value) ); }; }; template struct is_member_pointer_impl : public is_member_pointer_select< ::boost::type_traits::ice_or< ::boost::is_reference::value , ::boost::is_array::value >::value >::template result_ { }; BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void const,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void volatile,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void const volatile,false) #endif } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::detail::is_member_pointer_impl::value) #endif // __BORLANDC__ } // namespace boost #include #endif // BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_nothrow_move_assignable.hpp000644 000765 000024 00000006012 12233035540 026632 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // (C) Copyright Eric Friedman 2002-2003. // (C) Copyright Antony Polukhin 2013. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED #define BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED #include #include #include #include #include #include #include #include #include #include // should be the last #include #include namespace boost { namespace detail{ #ifndef BOOST_NO_CXX11_NOEXCEPT template struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {}; template struct false_or_cpp11_noexcept_move_assignable < T, typename ::boost::enable_if_c() = ::boost::declval())>::type > : public ::boost::integral_constant() = ::boost::declval())> {}; template struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = ( ::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value, ::boost::type_traits::ice_not< ::boost::is_reference::value >::value, ::boost::detail::false_or_cpp11_noexcept_move_assignable::value >::value)); }; #else template struct is_nothrow_move_assignable_imp{ BOOST_STATIC_CONSTANT(bool, value = ( ::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::has_trivial_move_assign::value, ::boost::has_nothrow_assign::value >::value, ::boost::type_traits::ice_not< ::boost::is_array::value >::value >::value)); }; #endif } BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_nothrow_move_assignable,T,::boost::detail::is_nothrow_move_assignable_imp::value) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_assignable,void volatile,false) #endif } // namespace boost #include #endif // BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_nothrow_move_constructible.hpp000644 000765 000024 00000005735 12233035540 027415 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // (C) Copyright Eric Friedman 2002-2003. // (C) Copyright Antony Polukhin 2013. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED #define BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED #include #include #include #include #include #include #include #include #include // should be the last #include #include namespace boost { namespace detail{ #ifndef BOOST_NO_CXX11_NOEXCEPT template struct false_or_cpp11_noexcept_move_constructible: public ::boost::false_type {}; template struct false_or_cpp11_noexcept_move_constructible < T, typename ::boost::enable_if_c()))>::type > : public ::boost::integral_constant()))> {}; template struct is_nothrow_move_constructible_imp{ BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value, ::boost::type_traits::ice_not< ::boost::is_reference::value >::value, ::boost::detail::false_or_cpp11_noexcept_move_constructible::value >::value)); }; #else template struct is_nothrow_move_constructible_imp{ BOOST_STATIC_CONSTANT(bool, value =( ::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::has_trivial_move_constructor::value, ::boost::has_nothrow_copy::value >::value, ::boost::type_traits::ice_not< ::boost::is_array::value >::value >::value)); }; #endif } BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_nothrow_move_constructible,T,::boost::detail::is_nothrow_move_constructible_imp::value) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void const,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void const volatile,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_nothrow_move_constructible,void volatile,false) #endif } // namespace boost #include #endif // BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_object.hpp000644 000765 000024 00000003341 12233035540 023164 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_OBJECT_HPP_INCLUDED #define BOOST_TT_IS_OBJECT_HPP_INCLUDED #include #include #include #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct is_object_impl { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, ::boost::type_traits::ice_not< ::boost::is_void::value>::value, ::boost::type_traits::ice_not< ::boost::is_function::value>::value >::value)); #else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, ::boost::type_traits::ice_not< ::boost::is_void::value>::value >::value)); #endif }; } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_object,T,::boost::detail::is_object_impl::value) } // namespace boost #include #endif // BOOST_TT_IS_OBJECT_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_pod.hpp000644 000765 000024 00000007270 12233035540 022505 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_POD_HPP_INCLUDED #define BOOST_TT_IS_POD_HPP_INCLUDED #include #include #include #include #include #include // should be the last #include #include #ifndef BOOST_IS_POD #define BOOST_INTERNAL_IS_POD(T) false #else #define BOOST_INTERNAL_IS_POD(T) BOOST_IS_POD(T) #endif namespace boost { // forward declaration, needed by 'is_pod_array_helper' template below template< typename T > struct is_POD; namespace detail { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_pod_impl { BOOST_STATIC_CONSTANT( bool, value = (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, BOOST_INTERNAL_IS_POD(T) >::value)); }; #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) template struct is_pod_impl : public is_pod_impl { }; #endif #else template struct is_pod_helper { template struct result_ { BOOST_STATIC_CONSTANT( bool, value = (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, BOOST_INTERNAL_IS_POD(T) >::value)); }; }; template struct bool_to_yes_no_type { typedef ::boost::type_traits::no_type type; }; template <> struct bool_to_yes_no_type { typedef ::boost::type_traits::yes_type type; }; template struct is_pod_array_helper { enum { is_pod = ::boost::is_POD::value }; // MSVC workaround typedef typename bool_to_yes_no_type::type type; type instance() const; }; template is_pod_array_helper is_POD_array(T*); template <> struct is_pod_helper { template struct result_ { static T& help(); BOOST_STATIC_CONSTANT(bool, value = sizeof(is_POD_array(help()).instance()) == sizeof(::boost::type_traits::yes_type) ); }; }; template struct is_pod_impl { BOOST_STATIC_CONSTANT( bool, value = ( ::boost::detail::is_pod_helper< ::boost::is_array::value >::template result_::value ) ); }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // the following help compilers without partial specialization support: BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void,true) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void const,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void volatile,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,void const volatile,true) #endif } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pod,T,::boost::detail::is_pod_impl::value) // is_POD is the old depricated name for this trait, do not use this as it may // be removed in future without warning!! BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_POD,T,::boost::is_pod::value) } // namespace boost #include #undef BOOST_INTERNAL_IS_POD #endif // BOOST_TT_IS_POD_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_pointer.hpp000644 000765 000024 00000011777 12233035540 023412 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Fixed is_pointer, is_reference, is_const, is_volatile, is_same, // is_member_pointer based on the Simulated Partial Specialization work // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or // http://groups.yahoo.com/group/boost/message/5441 // Some workarounds in here use ideas suggested from "Generic: // Mappings between Types and Values" // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). #ifndef BOOST_TT_IS_POINTER_HPP_INCLUDED #define BOOST_TT_IS_POINTER_HPP_INCLUDED #include #include #include #include #if !BOOST_WORKAROUND(BOOST_MSVC,<=1300) #include #endif #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include # include # include # include # include #endif // should be the last #include #include namespace boost { #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,__is_pointer(T)) #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace detail { template< typename T > struct is_pointer_helper { BOOST_STATIC_CONSTANT(bool, value = false); }; # define TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(helper,sp,result) \ template< typename T > struct helper \ { \ BOOST_STATIC_CONSTANT(bool, value = result); \ }; \ /**/ TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T*,true) # undef TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC template< typename T > struct is_pointer_impl { #if BOOST_WORKAROUND(BOOST_MSVC,<=1300) BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value) ); #else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value , ::boost::type_traits::ice_not< ::boost::is_member_pointer::value >::value >::value) ); #endif }; } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,::boost::detail::is_pointer_impl::value) #if defined(__BORLANDC__) && !defined(__COMO__) && (__BORLANDC__ < 0x600) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T&,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& const,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& volatile,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& const volatile,false) #endif #else // no partial template specialization namespace detail { struct pointer_helper { pointer_helper(const volatile void*); }; yes_type BOOST_TT_DECL is_pointer_tester(pointer_helper); no_type BOOST_TT_DECL is_pointer_tester(...); template struct is_pointer_select : public ::boost::type_traits::false_result { }; template <> struct is_pointer_select { template struct result_ { static T& make_t(); BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< (1 == sizeof(is_pointer_tester(make_t()))), (1 == sizeof(type_traits::is_function_ptr_tester(make_t()))) >::value)); }; }; template struct is_pointer_impl : public is_pointer_select< ::boost::type_traits::ice_or< ::boost::is_reference::value , ::boost::is_array::value >::value >::template result_ { }; BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void const,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void volatile,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void const volatile,false) #endif } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,::boost::detail::is_pointer_impl::value) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost #include #endif // BOOST_TT_IS_POINTER_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_reference.hpp000644 000765 000024 00000002505 12233035540 023655 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000, 2010. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_REFERENCE_HPP_INCLUDED #define BOOST_TT_IS_REFERENCE_HPP_INCLUDED #include #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct is_reference_impl { BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_lvalue_reference::value, ::boost::is_rvalue_reference::value >::value)); }; } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,::boost::detail::is_reference_impl::value) } // namespace boost #include #endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_rvalue_reference.hpp000644 000765 000024 00000001562 12233035540 025235 0ustar00honglistaff000000 000000 // (C) John Maddock 2010. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED #define BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED #include // should be the last #include #include namespace boost { BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_rvalue_reference,T,false) #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_rvalue_reference,T&&,true) #endif } // namespace boost #include #endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_same.hpp000644 000765 000024 00000006235 12233035540 022650 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Fixed is_pointer, is_reference, is_const, is_volatile, is_same, // is_member_pointer based on the Simulated Partial Specialization work // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or // http://groups.yahoo.com/group/boost/message/5441 // Some workarounds in here use ideas suggested from "Generic: // Mappings between Types and Values" // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). #ifndef BOOST_TT_IS_SAME_HPP_INCLUDED #define BOOST_TT_IS_SAME_HPP_INCLUDED #include #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #include #include #include #endif // should be the last #include #include namespace boost { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T,T,true) #if BOOST_WORKAROUND(__BORLANDC__, < 0x600) // without this, Borland's compiler gives the wrong answer for // references to arrays: BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T&,T&,true) #endif #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail { #ifdef BOOST_MSVC // the following VC6 specific implementation is *NOT* legal // C++, but has the advantage that it works for incomplete // types. template< typename T1 > struct is_same_part_1 { template struct part_2 { enum { value = false }; }; template<> struct part_2 { enum { value = true }; }; }; template< typename T1, typename T2 > struct is_same_impl { enum { value = boost::detail::is_same_part_1::template part_2::value }; }; #else // generic "no-partial-specialization" version template ::boost::type_traits::yes_type BOOST_TT_DECL is_same_tester(T*, T*); ::boost::type_traits::no_type BOOST_TT_DECL is_same_tester(...); template struct is_same_impl { static T t; static U u; BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< (sizeof(type_traits::yes_type) == sizeof(boost::detail::is_same_tester(&t,&u))), (::boost::is_reference::value == ::boost::is_reference::value), (sizeof(T) == sizeof(U)) >::value)); }; #endif // BOOST_MSVC } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,(::boost::detail::is_same_impl::value)) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost #include #endif // BOOST_TT_IS_SAME_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_scalar.hpp000644 000765 000024 00000003601 12233035540 023162 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_SCALAR_HPP_INCLUDED #define BOOST_TT_IS_SCALAR_HPP_INCLUDED #include #include #include #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct is_scalar_impl { BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_arithmetic::value, ::boost::is_enum::value, ::boost::is_pointer::value, ::boost::is_member_pointer::value >::value)); }; // these specializations are only really needed for compilers // without partial specialization support: template <> struct is_scalar_impl{ BOOST_STATIC_CONSTANT(bool, value = false ); }; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct is_scalar_impl{ BOOST_STATIC_CONSTANT(bool, value = false ); }; template <> struct is_scalar_impl{ BOOST_STATIC_CONSTANT(bool, value = false ); }; template <> struct is_scalar_impl{ BOOST_STATIC_CONSTANT(bool, value = false ); }; #endif } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_scalar,T,::boost::detail::is_scalar_impl::value) } // namespace boost #include #endif // BOOST_TT_IS_SCALAR_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_signed.hpp000644 000765 000024 00000011343 12233035540 023170 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_SIGNED_HPP_INCLUDED #define BOOST_TT_IS_SIGNED_HPP_INCLUDED #include #include #include #include // should be the last #include #include namespace boost { #if !defined( __CODEGEARC__ ) namespace detail{ #if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) && !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) template struct is_signed_values { // // Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's // rather than "real" static constants simply doesn't work or give // the correct answer. // typedef typename remove_cv::type no_cv_t; static const no_cv_t minus_one = (static_cast(-1)); static const no_cv_t zero = (static_cast(0)); }; template struct is_signed_helper { typedef typename remove_cv::type no_cv_t; BOOST_STATIC_CONSTANT(bool, value = (!(::boost::detail::is_signed_values::minus_one > boost::detail::is_signed_values::zero))); }; template struct is_signed_select_helper { template struct rebind { typedef is_signed_helper type; }; }; template <> struct is_signed_select_helper { template struct rebind { typedef false_type type; }; }; template struct is_signed_imp { typedef is_signed_select_helper< ::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value > selector; typedef typename selector::template rebind binder; typedef typename binder::type type; #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) BOOST_STATIC_CONSTANT(bool, value = is_signed_imp::type::value); #else BOOST_STATIC_CONSTANT(bool, value = type::value); #endif }; #else template struct is_signed_imp : public false_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; #ifdef BOOST_HAS_LONG_LONG template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; #endif #if defined(CHAR_MIN) && (CHAR_MIN != 0) template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; #endif #if defined(WCHAR_MIN) && (WCHAR_MIN != 0) template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; template <> struct is_signed_imp : public true_type{}; #endif #endif } #endif // !defined( __CODEGEARC__ ) #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_signed,T,__is_signed(T)) #else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_signed,T,::boost::detail::is_signed_imp::value) #endif } // namespace boost #include #endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_stateless.hpp000644 000765 000024 00000002746 12233035540 023735 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_STATELESS_HPP_INCLUDED #define BOOST_TT_IS_STATELESS_HPP_INCLUDED #include #include #include #include #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct is_stateless_impl { BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::has_trivial_constructor::value, ::boost::has_trivial_copy::value, ::boost::has_trivial_destructor::value, ::boost::is_class::value, ::boost::is_empty::value >::value)); }; } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_stateless,T,::boost::detail::is_stateless_impl::value) } // namespace boost #include #endif // BOOST_TT_IS_STATELESS_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_union.hpp000644 000765 000024 00000003063 12233035540 023047 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_UNION_HPP_INCLUDED #define BOOST_TT_IS_UNION_HPP_INCLUDED #include #include #include // should be the last #include #include namespace boost { namespace detail { #ifndef __GNUC__ template struct is_union_impl { typedef typename remove_cv::type cvt; #ifdef BOOST_IS_UNION BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(cvt)); #else BOOST_STATIC_CONSTANT(bool, value = false); #endif }; #else // // using remove_cv here generates a whole load of needless // warnings with gcc, since it doesn't do any good with gcc // in any case (at least at present), just remove it: // template struct is_union_impl { #ifdef BOOST_IS_UNION BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(T)); #else BOOST_STATIC_CONSTANT(bool, value = false); #endif }; #endif } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_union,T,::boost::detail::is_union_impl::value) } // namespace boost #include #endif // BOOST_TT_IS_UNION_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_unsigned.hpp000644 000765 000024 00000011520 12233035540 023530 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_UNSIGNED_HPP_INCLUDED #define BOOST_TT_IS_UNSIGNED_HPP_INCLUDED #include #include #include #include // should be the last #include #include namespace boost { #if !defined( __CODEGEARC__ ) namespace detail{ #if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) && !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) template struct is_unsigned_values { // // Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's // rather than "real" static constants simply doesn't work or give // the correct answer. // typedef typename remove_cv::type no_cv_t; static const no_cv_t minus_one = (static_cast(-1)); static const no_cv_t zero = (static_cast(0)); }; template struct is_ununsigned_helper { BOOST_STATIC_CONSTANT(bool, value = (::boost::detail::is_unsigned_values::minus_one > ::boost::detail::is_unsigned_values::zero)); }; template struct is_ununsigned_select_helper { template struct rebind { typedef is_ununsigned_helper type; }; }; template <> struct is_ununsigned_select_helper { template struct rebind { typedef false_type type; }; }; template struct is_unsigned_imp { typedef is_ununsigned_select_helper< ::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value > selector; typedef typename selector::template rebind binder; typedef typename binder::type type; BOOST_STATIC_CONSTANT(bool, value = type::value); }; #else template struct is_unsigned_imp : public false_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; #ifdef BOOST_HAS_LONG_LONG template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; #endif #if defined(CHAR_MIN) && (CHAR_MIN == 0) template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; #endif #if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; #endif #endif } #endif // !defined( __CODEGEARC__ ) #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_unsigned,T,__is_unsigned(T)) #else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_unsigned,T,::boost::detail::is_unsigned_imp::value) #endif } // namespace boost #include #endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_void.hpp000644 000765 000024 00000002245 12233035540 022661 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_VOID_HPP_INCLUDED #define BOOST_TT_IS_VOID_HPP_INCLUDED #include // should be the last #include #include namespace boost { //* is a type T void - is_void #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_void,T,__is_void(T)) #else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_void,T,false) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void,true) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void const,true) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void volatile,true) BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void const volatile,true) #endif #endif // non-CodeGear implementation } // namespace boost #include #endif // BOOST_TT_IS_VOID_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/is_volatile.hpp000644 000765 000024 00000011364 12233035540 023541 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Fixed is_pointer, is_reference, is_const, is_volatile, is_same, // is_member_pointer based on the Simulated Partial Specialization work // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or // http://groups.yahoo.com/group/boost/message/5441 // Some workarounds in here use ideas suggested from "Generic: // Mappings between Types and Values" // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). #ifndef BOOST_TT_IS_VOLATILE_HPP_INCLUDED #define BOOST_TT_IS_VOLATILE_HPP_INCLUDED #include #include #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include # if BOOST_WORKAROUND(BOOST_MSVC, < 1400) # include # endif #else # include # include # include # include #endif // should be the last #include #include namespace boost { namespace detail{ template struct is_volatile_rval_filter { #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_volatile); #else BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_volatile); #endif }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES // // We can't filter out rvalue_references at the same level as // references or we get ambiguities from msvc: // template struct is_volatile_rval_filter { BOOST_STATIC_CONSTANT(bool, value = false); }; #endif } #if defined( __CODEGEARC__ ) BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,__is_volatile(T)) #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) //* is a type T declared volatile - is_volatile BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_rval_filter::value) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T&,false) #if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified // references as distinct types... BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& const,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& volatile,false) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& const volatile,false) #endif #else namespace detail { using ::boost::type_traits::yes_type; using ::boost::type_traits::no_type; yes_type is_volatile_tester(void const volatile*); no_type is_volatile_tester(void const*); template struct is_volatile_helper : public ::boost::type_traits::false_result { }; template <> struct is_volatile_helper { template struct result_ { static T* t; BOOST_STATIC_CONSTANT(bool, value = ( sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_volatile_tester(t)) )); }; }; template <> struct is_volatile_helper { template struct result_ { static T t; BOOST_STATIC_CONSTANT(bool, value = ( sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_volatile_tester(&t)) )); }; }; template struct is_volatile_impl : public is_volatile_helper< is_reference::value , is_array::value >::template result_ { }; BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void const,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void volatile,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void const volatile,true) #endif } // namespace detail //* is a type T declared volatile - is_volatile BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_impl::value) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost #include #endif // BOOST_TT_IS_VOLATILE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/make_signed.hpp000644 000765 000024 00000012041 12233035540 023466 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2007. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_MAKE_SIGNED_HPP_INCLUDED #define BOOST_TT_MAKE_SIGNED_HPP_INCLUDED #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct make_signed_imp { BOOST_STATIC_ASSERT( (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)); #if !BOOST_WORKAROUND(BOOST_MSVC, <=1300) BOOST_STATIC_ASSERT( (::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)); #endif typedef typename remove_cv::type t_no_cv; typedef typename mpl::if_c< (::boost::type_traits::ice_and< ::boost::is_signed::value, ::boost::is_integral::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value >::value), T, typename mpl::if_c< (::boost::type_traits::ice_and< ::boost::is_integral::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value> ::value), typename mpl::if_< is_same, signed char, typename mpl::if_< is_same, signed short, typename mpl::if_< is_same, int, typename mpl::if_< is_same, long, #if defined(BOOST_HAS_LONG_LONG) #ifdef BOOST_HAS_INT128 typename mpl::if_c< sizeof(t_no_cv) == sizeof(boost::long_long_type), boost::long_long_type, boost::int128_type >::type #else boost::long_long_type #endif #elif defined(BOOST_HAS_MS_INT64) __int64 #else long #endif >::type >::type >::type >::type, // Not a regular integer type: typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned char), signed char, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned short), signed short, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned int), int, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned long), long, #if defined(BOOST_HAS_LONG_LONG) #ifdef BOOST_HAS_INT128 typename mpl::if_c< sizeof(t_no_cv) == sizeof(boost::long_long_type), boost::long_long_type, boost::int128_type >::type #else boost::long_long_type #endif #elif defined(BOOST_HAS_MS_INT64) __int64 #else long #endif >::type >::type >::type >::type >::type >::type base_integer_type; // Add back any const qualifier: typedef typename mpl::if_< is_const, typename add_const::type, base_integer_type >::type const_base_integer_type; // Add back any volatile qualifier: typedef typename mpl::if_< is_volatile, typename add_volatile::type, const_base_integer_type >::type type; }; } // namespace detail BOOST_TT_AUX_TYPE_TRAIT_DEF1(make_signed,T,typename boost::detail::make_signed_imp::type) } // namespace boost #include #endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/make_unsigned.hpp000644 000765 000024 00000012150 12233035540 024032 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2007. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_MAKE_UNSIGNED_HPP_INCLUDED #define BOOST_TT_MAKE_UNSIGNED_HPP_INCLUDED #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // should be the last #include #include namespace boost { namespace detail { template struct make_unsigned_imp { BOOST_STATIC_ASSERT( (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)); #if !BOOST_WORKAROUND(BOOST_MSVC, <=1300) BOOST_STATIC_ASSERT( (::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)); #endif typedef typename remove_cv::type t_no_cv; typedef typename mpl::if_c< (::boost::type_traits::ice_and< ::boost::is_unsigned::value, ::boost::is_integral::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value >::value), T, typename mpl::if_c< (::boost::type_traits::ice_and< ::boost::is_integral::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value, ::boost::type_traits::ice_not< ::boost::is_same::value>::value> ::value), typename mpl::if_< is_same, unsigned char, typename mpl::if_< is_same, unsigned short, typename mpl::if_< is_same, unsigned int, typename mpl::if_< is_same, unsigned long, #if defined(BOOST_HAS_LONG_LONG) #ifdef BOOST_HAS_INT128 typename mpl::if_c< sizeof(t_no_cv) == sizeof(boost::ulong_long_type), boost::ulong_long_type, boost::uint128_type >::type #else boost::ulong_long_type #endif #elif defined(BOOST_HAS_MS_INT64) unsigned __int64 #else unsigned long #endif >::type >::type >::type >::type, // Not a regular integer type: typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned char), unsigned char, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned short), unsigned short, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned int), unsigned int, typename mpl::if_c< sizeof(t_no_cv) == sizeof(unsigned long), unsigned long, #if defined(BOOST_HAS_LONG_LONG) #ifdef BOOST_HAS_INT128 typename mpl::if_c< sizeof(t_no_cv) == sizeof(boost::ulong_long_type), boost::ulong_long_type, boost::uint128_type >::type #else boost::ulong_long_type #endif #elif defined(BOOST_HAS_MS_INT64) unsigned __int64 #else unsigned long #endif >::type >::type >::type >::type >::type >::type base_integer_type; // Add back any const qualifier: typedef typename mpl::if_< is_const, typename add_const::type, base_integer_type >::type const_base_integer_type; // Add back any volatile qualifier: typedef typename mpl::if_< is_volatile, typename add_volatile::type, const_base_integer_type >::type type; }; } // namespace detail BOOST_TT_AUX_TYPE_TRAIT_DEF1(make_unsigned,T,typename boost::detail::make_unsigned_imp::type) } // namespace boost #include #endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/object_traits.hpp000644 000765 000024 00000002641 12233035540 024061 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // // defines object traits classes: // is_object, is_scalar, is_class, is_compound, is_pod, // has_trivial_constructor, has_trivial_copy, has_trivial_assign, // has_trivial_destructor, is_empty. // #ifndef BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED #define BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif // BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED passenger-4.0.37/ext/boost/type_traits/remove_bounds.hpp000644 000765 000024 00000003736 12233035540 024102 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED #define BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED #include #include #include #if BOOST_WORKAROUND(BOOST_MSVC,<=1300) #include #endif // should be the last #include #include #if !BOOST_WORKAROUND(BOOST_MSVC,<=1300) namespace boost { BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_bounds,T,T) #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T[N],T type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const[N],T const type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T volatile[N],T volatile type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_bounds,T const volatile[N],T const volatile type) #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T[],T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T const[],T const) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T volatile[],T volatile) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T const volatile[],T const volatile) #endif #endif } // namespace boost #endif #include #endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/remove_const.hpp000644 000765 000024 00000004660 12233035540 023733 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_REMOVE_CONST_HPP_INCLUDED #define BOOST_TT_REMOVE_CONST_HPP_INCLUDED #include #include #include #include #include #include #if BOOST_WORKAROUND(BOOST_MSVC,<=1300) #include #endif // should be the last #include #include namespace boost { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail { template struct remove_const_helper { typedef T type; }; template struct remove_const_helper { typedef T volatile type; }; template struct remove_const_impl { typedef typename remove_const_helper< typename cv_traits_imp::unqualified_type , ::boost::is_volatile::value >::type type; }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES // // We can't filter out rvalue_references at the same level as // references or we get ambiguities from msvc: // template struct remove_const_impl { typedef T&& type; }; #endif } // namespace detail // * convert a type T to non-const type - remove_const BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,typename boost::detail::remove_const_impl::type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_const,T&,T&) #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T const[N],T type[N]) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T const volatile[N],T volatile type[N]) #endif #elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,typename boost::detail::remove_const_impl::type) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost #include #endif // BOOST_TT_REMOVE_CONST_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/remove_cv.hpp000644 000765 000024 00000004554 12233035540 023217 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_REMOVE_CV_HPP_INCLUDED #define BOOST_TT_REMOVE_CV_HPP_INCLUDED #include #include #include #include #include #if BOOST_WORKAROUND(BOOST_MSVC,<=1300) #include #endif // should be the last #include #include namespace boost { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail{ template struct rvalue_ref_filter_rem_cv { typedef typename boost::detail::cv_traits_imp::unqualified_type type; }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES // // We can't filter out rvalue_references at the same level as // references or we get ambiguities from msvc: // template struct rvalue_ref_filter_rem_cv { typedef T&& type; }; #endif } // convert a type T to a non-cv-qualified type - remove_cv BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::rvalue_ref_filter_rem_cv::type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_cv,T&,T&) #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const[N],T type[N]) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T volatile[N],T type[N]) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const volatile[N],T type[N]) #endif #elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) namespace detail { template struct remove_cv_impl { typedef typename remove_volatile_impl< typename remove_const_impl::type >::type type; }; } BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::remove_cv_impl::type) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost #include #endif // BOOST_TT_REMOVE_CV_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/remove_pointer.hpp000644 000765 000024 00000005043 12233035540 024261 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED #define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED #include #include #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #include #endif #if BOOST_WORKAROUND(BOOST_MSVC,<=1300) #include #elif defined(BOOST_MSVC) #include #include #endif // should be the last #include #include namespace boost { #ifdef BOOST_MSVC namespace detail{ // // We need all this crazy indirection because a type such as: // // T (*const)(U) // // Does not bind to a or partial specialization with VC10 and earlier // template struct remove_pointer_imp { typedef T type; }; template struct remove_pointer_imp { typedef T type; }; template struct remove_pointer_imp3 { typedef typename remove_pointer_imp::type>::type type; }; template struct remove_pointer_imp3 { typedef T type; }; template struct remove_pointer_imp2 { typedef typename remove_pointer_imp3::value>::type type; }; } BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_imp2::type) #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* volatile,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const volatile,T) #elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_impl::type) #endif } // namespace boost #include #endif // BOOST_TT_REMOVE_POINTER_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/remove_reference.hpp000644 000765 000024 00000004245 12233035540 024542 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED #define BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED #include #include #include #if BOOST_WORKAROUND(BOOST_MSVC,<=1300) #include #endif // should be the last #include #include namespace boost { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail{ // // We can't filter out rvalue_references at the same level as // references or we get ambiguities from msvc: // template struct remove_rvalue_ref { typedef T type; }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct remove_rvalue_ref { typedef T type; }; #endif } // namespace detail BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,typename boost::detail::remove_rvalue_ref::type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T&,T) #if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified // references as distinct types... BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& volatile,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const volatile,T) #endif #elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,typename boost::detail::remove_reference_impl::type) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost #include #endif // BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/remove_volatile.hpp000644 000765 000024 00000004736 12233035540 024430 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED #define BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED #include #include #include #include #include #include #if BOOST_WORKAROUND(BOOST_MSVC,<=1300) #include #endif // should be the last #include #include namespace boost { #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail { template struct remove_volatile_helper { typedef T type; }; template struct remove_volatile_helper { typedef T const type; }; template struct remove_volatile_impl { typedef typename remove_volatile_helper< typename cv_traits_imp::unqualified_type , ::boost::is_const::value >::type type; }; // // We can't filter out rvalue_references at the same level as // references or we get ambiguities from msvc: // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct remove_volatile_impl { typedef T&& type; }; #endif } // namespace detail // * convert a type T to a non-volatile type - remove_volatile BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename boost::detail::remove_volatile_impl::type) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_volatile,T&,T&) #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T volatile[N],T type[N]) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T const volatile[N],T const type[N]) #endif #elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename boost::detail::remove_volatile_impl::type) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace boost #include #endif // BOOST_TT_REMOVE_VOLATILE_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/same_traits.hpp000644 000765 000024 00000001112 12233035540 023530 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // // defines is_same: #ifndef BOOST_TT_SAME_TRAITS_HPP_INCLUDED #define BOOST_TT_SAME_TRAITS_HPP_INCLUDED #include #endif // BOOST_TT_SAME_TRAITS_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/transform_traits.hpp000644 000765 000024 00000001575 12233035540 024633 0ustar00honglistaff000000 000000 // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // // defines traits classes for transforming one type to another: // remove_reference, add_reference, remove_bounds, remove_pointer. // #ifndef BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED #define BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED #include #include #include #include #include #endif // BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/type_with_alignment.hpp000644 000765 000024 00000031141 12233035540 025274 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED #define BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED #include #include #include #include #include #include #include #include #include #include // should be the last #include #include #include #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4121) // alignment is sensitive to packing #endif namespace boost { #ifndef __BORLANDC__ namespace detail { class alignment_dummy; typedef void (*function_ptr)(); typedef int (alignment_dummy::*member_ptr); typedef int (alignment_dummy::*member_function_ptr)(); #ifdef BOOST_HAS_LONG_LONG #define BOOST_TT_ALIGNMENT_BASE_TYPES BOOST_PP_TUPLE_TO_LIST( \ 12, ( \ char, short, int, long, ::boost::long_long_type, float, double, long double \ , void*, function_ptr, member_ptr, member_function_ptr)) #else #define BOOST_TT_ALIGNMENT_BASE_TYPES BOOST_PP_TUPLE_TO_LIST( \ 11, ( \ char, short, int, long, float, double, long double \ , void*, function_ptr, member_ptr, member_function_ptr)) #endif #define BOOST_TT_HAS_ONE_T(D,Data,T) boost::detail::has_one_T< T > #define BOOST_TT_ALIGNMENT_STRUCT_TYPES \ BOOST_PP_LIST_TRANSFORM(BOOST_TT_HAS_ONE_T, \ X, \ BOOST_TT_ALIGNMENT_BASE_TYPES) #define BOOST_TT_ALIGNMENT_TYPES \ BOOST_PP_LIST_APPEND(BOOST_TT_ALIGNMENT_BASE_TYPES, \ BOOST_TT_ALIGNMENT_STRUCT_TYPES) // // lower_alignment_helper -- // // This template gets instantiated a lot, so use partial // specialization when available to reduce the compiler burden. // #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct lower_alignment_helper_impl { template struct apply { typedef char type; enum { value = true }; }; }; template <> struct lower_alignment_helper_impl { template struct apply : public mpl::if_c<(alignment_of::value == target), TestType, char> { enum { value = (alignment_of::value == target) }; }; }; template struct lower_alignment_helper : public lower_alignment_helper_impl::template apply { }; #else template struct lower_alignment_helper { typedef char type; enum { value = true }; }; template struct lower_alignment_helper { enum { value = (alignment_of::value == target) }; typedef typename mpl::if_c::type type; }; #endif #define BOOST_TT_CHOOSE_MIN_ALIGNMENT(R,P,I,T) \ typename lower_alignment_helper< \ BOOST_PP_CAT(found,I),target,T \ >::type BOOST_PP_CAT(t,I); \ enum { \ BOOST_PP_CAT(found,BOOST_PP_INC(I)) \ = lower_alignment_helper::value \ }; #define BOOST_TT_CHOOSE_T(R,P,I,T) T BOOST_PP_CAT(t,I); template struct has_one_T { T data; }; template union lower_alignment { enum { found0 = false }; BOOST_PP_LIST_FOR_EACH_I( BOOST_TT_CHOOSE_MIN_ALIGNMENT , ignored , BOOST_TT_ALIGNMENT_TYPES ) }; union max_align { BOOST_PP_LIST_FOR_EACH_I( BOOST_TT_CHOOSE_T , ignored , BOOST_TT_ALIGNMENT_TYPES ) }; #undef BOOST_TT_ALIGNMENT_BASE_TYPES #undef BOOST_TT_HAS_ONE_T #undef BOOST_TT_ALIGNMENT_STRUCT_TYPES #undef BOOST_TT_ALIGNMENT_TYPES #undef BOOST_TT_CHOOSE_MIN_ALIGNMENT #undef BOOST_TT_CHOOSE_T template struct is_aligned { BOOST_STATIC_CONSTANT(bool, value = (TAlign >= Align) & (TAlign % Align == 0) ); }; #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::max_align,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<1> ,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<2> ,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<4> ,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<8> ,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<10> ,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<16> ,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::detail::lower_alignment<32> ,true) #endif } // namespace detail #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_pod< ::boost::detail::lower_alignment > { BOOST_STATIC_CONSTANT(std::size_t, value = true); }; #endif // This alignment method originally due to Brian Parker, implemented by David // Abrahams, and then ported here by Doug Gregor. namespace detail{ template class type_with_alignment_imp { typedef ::boost::detail::lower_alignment t1; typedef typename mpl::if_c< ::boost::detail::is_aligned< ::boost::alignment_of::value,Align >::value , t1 , ::boost::detail::max_align >::type align_t; BOOST_STATIC_CONSTANT(std::size_t, found = alignment_of::value); BOOST_STATIC_ASSERT(found >= Align); BOOST_STATIC_ASSERT(found % Align == 0); public: typedef align_t type; }; } template class type_with_alignment : public ::boost::detail::type_with_alignment_imp { }; #if defined(__GNUC__) namespace align { struct __attribute__((__aligned__(2))) a2 {}; struct __attribute__((__aligned__(4))) a4 {}; struct __attribute__((__aligned__(8))) a8 {}; struct __attribute__((__aligned__(16))) a16 {}; struct __attribute__((__aligned__(32))) a32 {}; struct __attribute__((__aligned__(64))) a64 {}; struct __attribute__((__aligned__(128))) a128 {}; } template<> class type_with_alignment<1> { public: typedef char type; }; template<> class type_with_alignment<2> { public: typedef align::a2 type; }; template<> class type_with_alignment<4> { public: typedef align::a4 type; }; template<> class type_with_alignment<8> { public: typedef align::a8 type; }; template<> class type_with_alignment<16> { public: typedef align::a16 type; }; template<> class type_with_alignment<32> { public: typedef align::a32 type; }; template<> class type_with_alignment<64> { public: typedef align::a64 type; }; template<> class type_with_alignment<128> { public: typedef align::a128 type; }; namespace detail { BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a2,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a4,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a32,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a64,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a128,true) } #endif #if (defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && _MSC_VER >= 1300 // // MSVC supports types which have alignments greater than the normal // maximum: these are used for example in the types __m64 and __m128 // to provide types with alignment requirements which match the SSE // registers. Therefore we extend type_with_alignment<> to support // such types, however, we have to be careful to use a builtin type // whenever possible otherwise we break previously working code: // see http://article.gmane.org/gmane.comp.lib.boost.devel/173011 // for an example and test case. Thus types like a8 below will // be used *only* if the existing implementation can't provide a type // with suitable alignment. This does mean however, that type_with_alignment<> // may return a type which cannot be passed through a function call // by value (and neither can any type containing such a type like // Boost.Optional). However, this only happens when we have no choice // in the matter because no other "ordinary" type is available. // namespace align { struct __declspec(align(8)) a8 { char m[8]; typedef a8 type; }; struct __declspec(align(16)) a16 { char m[16]; typedef a16 type; }; struct __declspec(align(32)) a32 { char m[32]; typedef a32 type; }; struct __declspec(align(64)) a64 { char m[64]; typedef a64 type; }; struct __declspec(align(128)) a128 { char m[128]; typedef a128 type; }; } template<> class type_with_alignment<8> { typedef mpl::if_c< ::boost::alignment_of::value < 8, align::a8, boost::detail::type_with_alignment_imp<8> >::type t1; public: typedef t1::type type; }; template<> class type_with_alignment<16> { typedef mpl::if_c< ::boost::alignment_of::value < 16, align::a16, boost::detail::type_with_alignment_imp<16> >::type t1; public: typedef t1::type type; }; template<> class type_with_alignment<32> { typedef mpl::if_c< ::boost::alignment_of::value < 32, align::a32, boost::detail::type_with_alignment_imp<32> >::type t1; public: typedef t1::type type; }; template<> class type_with_alignment<64> { typedef mpl::if_c< ::boost::alignment_of::value < 64, align::a64, boost::detail::type_with_alignment_imp<64> >::type t1; public: typedef t1::type type; }; template<> class type_with_alignment<128> { typedef mpl::if_c< ::boost::alignment_of::value < 128, align::a128, boost::detail::type_with_alignment_imp<128> >::type t1; public: typedef t1::type type; }; namespace detail { BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a32,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a64,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a128,true) } #endif #else // // Borland specific version, we have this for two reasons: // 1) The version above doesn't always compile (with the new test cases for example) // 2) Because of Borlands #pragma option we can create types with alignments that are // greater that the largest aligned builtin type. namespace align{ #pragma option push -a16 struct a2{ short s; }; struct a4{ int s; }; struct a8{ double s; }; struct a16{ long double s; }; #pragma option pop } namespace detail { typedef ::boost::align::a16 max_align; //#if ! BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a2,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a4,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a8,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a16,true) //#endif } template struct type_with_alignment { // We should never get to here, but if we do use the maximally // aligned type: // BOOST_STATIC_ASSERT(0); typedef align::a16 type; }; template <> struct type_with_alignment<1>{ typedef char type; }; template <> struct type_with_alignment<2>{ typedef align::a2 type; }; template <> struct type_with_alignment<4>{ typedef align::a4 type; }; template <> struct type_with_alignment<8>{ typedef align::a8 type; }; template <> struct type_with_alignment<16>{ typedef align::a16 type; }; #endif } // namespace boost #ifdef BOOST_MSVC # pragma warning(pop) #endif #include #endif // BOOST_TT_TYPE_WITH_ALIGNMENT_INCLUDED passenger-4.0.37/ext/boost/type_traits/detail/bool_trait_def.hpp000644 000765 000024 00000012522 12233035540 025442 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // $Source$ // $Date: 2011-10-09 15:28:33 -0700 (Sun, 09 Oct 2011) $ // $Revision: 74865 $ #include #include #include #include #include // // Unfortunately some libraries have started using this header without // cleaning up afterwards: so we'd better undef the macros just in case // they've been defined already.... // #ifdef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL #undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL #undef BOOST_TT_AUX_BOOL_C_BASE #undef BOOST_TT_AUX_BOOL_TRAIT_DEF1 #undef BOOST_TT_AUX_BOOL_TRAIT_DEF2 #undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1 #undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2 #undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1 #undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2 #undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1 #undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2 #undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1 #undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2 #undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1 #undef BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1 #endif #if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x570) # define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ typedef ::boost::integral_constant type; \ enum { value = type::value }; \ /**/ # define BOOST_TT_AUX_BOOL_C_BASE(C) #elif defined(BOOST_MSVC) && BOOST_MSVC < 1300 # define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ typedef ::boost::integral_constant base_; \ using base_::value; \ /**/ #endif #ifndef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL # define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) /**/ #endif #ifndef BOOST_TT_AUX_BOOL_C_BASE # define BOOST_TT_AUX_BOOL_C_BASE(C) : public ::boost::integral_constant #endif #define BOOST_TT_AUX_BOOL_TRAIT_DEF1(trait,T,C) \ template< typename T > struct trait \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ }; \ \ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ /**/ #define BOOST_TT_AUX_BOOL_TRAIT_DEF2(trait,T1,T2,C) \ template< typename T1, typename T2 > struct trait \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(T1,T2)) \ }; \ \ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,trait) \ /**/ #define BOOST_TT_AUX_BOOL_TRAIT_DEF3(trait,T1,T2,T3,C) \ template< typename T1, typename T2, typename T3 > struct trait \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(3,trait,(T1,T2,T3)) \ }; \ \ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(3,trait) \ /**/ #define BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,C) \ template<> struct trait< sp > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(sp)) \ }; \ /**/ #define BOOST_TT_AUX_BOOL_TRAIT_SPEC2(trait,sp1,sp2,C) \ template<> struct trait< sp1,sp2 > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \ }; \ /**/ #define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(trait,sp,C) \ template<> struct trait##_impl< sp > \ { \ public:\ BOOST_STATIC_CONSTANT(bool, value = (C)); \ }; \ /**/ #define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,sp1,sp2,C) \ template<> struct trait##_impl< sp1,sp2 > \ { \ public:\ BOOST_STATIC_CONSTANT(bool, value = (C)); \ }; \ /**/ #define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(param,trait,sp,C) \ template< param > struct trait< sp > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ }; \ /**/ #define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,sp,C) \ template< param1, param2 > struct trait< sp > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ }; \ /**/ #define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \ template< param > struct trait< sp1,sp2 > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \ }; \ /**/ #define BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(param1,param2,trait,sp1,sp2,C) \ template< param1, param2 > struct trait< sp1,sp2 > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ }; \ /**/ #define BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \ template< param > struct trait##_impl< sp1,sp2 > \ { \ public:\ BOOST_STATIC_CONSTANT(bool, value = (C)); \ }; \ /**/ #ifndef BOOST_NO_CV_SPECIALIZATIONS # define BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(trait,sp,value) \ BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,value) \ BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp const,value) \ BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp volatile,value) \ BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp const volatile,value) \ /**/ #else # define BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(trait,sp,value) \ BOOST_TT_AUX_BOOL_TRAIT_SPEC1(trait,sp,value) \ /**/ #endif passenger-4.0.37/ext/boost/type_traits/detail/bool_trait_undef.hpp000644 000765 000024 00000001730 12233035540 026004 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // $Source$ // $Date: 2011-10-09 15:28:33 -0700 (Sun, 09 Oct 2011) $ // $Revision: 74865 $ #undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL #undef BOOST_TT_AUX_BOOL_C_BASE #undef BOOST_TT_AUX_BOOL_TRAIT_DEF1 #undef BOOST_TT_AUX_BOOL_TRAIT_DEF2 #undef BOOST_TT_AUX_BOOL_TRAIT_DEF3 #undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1 #undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2 #undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1 #undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2 #undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1 #undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2 #undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1 #undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2 #undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1 #undef BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1 passenger-4.0.37/ext/boost/type_traits/detail/common_type_imp.hpp000644 000765 000024 00000026760 12233035540 025675 0ustar00honglistaff000000 000000 /******************************************************************************* * boost/type_traits/detail/common_type_imp.hpp * * Copyright 2010, Jeffrey Hellrung. * Distributed under the Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * * struct boost::common_type * * common_type::type is the type of the expression * b() ? x() : y() * where b() returns a bool, x() has return type T, and y() has return type U. * See * http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2661.htm#common_type * * Note that this evaluates to void if one or both of T and U is void. ******************************************************************************/ #ifndef BOOST_TYPE_TRAITS_DETAIL_COMMON_TYPE_IMP_HPP #define BOOST_TYPE_TRAITS_DETAIL_COMMON_TYPE_IMP_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace detail_type_traits_common_type { /******************************************************************************* * struct propagate_cv< From, To > * * This metafunction propagates cv-qualifiers on type From to type To. ******************************************************************************/ template< class From, class To > struct propagate_cv { typedef To type; }; template< class From, class To > struct propagate_cv< const From, To > { typedef To const type; }; template< class From, class To > struct propagate_cv< volatile From, To > { typedef To volatile type; }; template< class From, class To > struct propagate_cv< const volatile From, To > { typedef To const volatile type; }; /******************************************************************************* * struct is_integral_or_enum * * This metafunction determines if T is an integral type which can be made * signed or unsigned. ******************************************************************************/ template< class T > struct is_integral_or_enum : public mpl::or_< is_integral, is_enum > { }; template<> struct is_integral_or_enum< bool > : public false_type { }; /******************************************************************************* * struct make_unsigned_soft * struct make_signed_soft * * These metafunction are identical to make_unsigned and make_signed, * respectively, except for special-casing bool. ******************************************************************************/ template< class T > struct make_unsigned_soft : public make_unsigned { }; template<> struct make_unsigned_soft< bool > { typedef bool type; }; template< class T > struct make_signed_soft : public make_signed { }; template<> struct make_signed_soft< bool > { typedef bool type; }; /******************************************************************************* * struct sizeof_t * typedef ... yes_type * typedef ... no_type * * These types are integral players in the use of the "sizeof trick", i.e., we * can distinguish overload selection by inspecting the size of the return type * of the overload. ******************************************************************************/ template< std::size_t N > struct sizeof_t { char _dummy[N]; }; typedef sizeof_t<1> yes_type; typedef sizeof_t<2> no_type; BOOST_MPL_ASSERT_RELATION( sizeof( yes_type ), ==, 1 ); BOOST_MPL_ASSERT_RELATION( sizeof( no_type ), ==, 2 ); /******************************************************************************* * rvalue_test(T&) -> no_type * rvalue_test(...) -> yes_type * * These overloads are used to determine the rvalue-ness of an expression. ******************************************************************************/ template< class T > no_type rvalue_test(T&); yes_type rvalue_test(...); /******************************************************************************* * struct conversion_test_overloads< Sequence > * * This struct has multiple overloads of the static member function apply, each * one taking a single parameter of a type within the Boost.MPL sequence * Sequence. Each such apply overload has a return type with sizeof equal to * one plus the index of the parameter type within Sequence. Thus, we can * deduce the type T of an expression as long as we can generate a finite set of * candidate types containing T via these apply overloads and the "sizeof * trick". ******************************************************************************/ template< class First, class Last, std::size_t Index > struct conversion_test_overloads_iterate : public conversion_test_overloads_iterate< typename mpl::next< First >::type, Last, Index + 1 > { using conversion_test_overloads_iterate< typename mpl::next< First >::type, Last, Index + 1 >::apply; static sizeof_t< Index + 1 > apply(typename mpl::deref< First >::type); }; template< class Last, std::size_t Index > struct conversion_test_overloads_iterate< Last, Last, Index > { static sizeof_t< Index + 1 > apply(...); }; template< class Sequence > struct conversion_test_overloads : public conversion_test_overloads_iterate< typename mpl::begin< Sequence >::type, typename mpl::end< Sequence >::type, 0 > { }; /******************************************************************************* * struct select< Sequence, Index > * * select is synonymous with mpl::at_c unless Index equals the size of the * Boost.MPL Sequence, in which case this evaluates to void. ******************************************************************************/ template< class Sequence, int Index, int N = mpl::size< Sequence >::value > struct select : public mpl::at_c< Sequence, Index > { }; template< class Sequence, int N > struct select< Sequence, N, N > { typedef void type; }; /******************************************************************************* * class deduce_common_type< T, U, NominalCandidates > * struct nominal_candidates * struct common_type_dispatch_on_rvalueness * struct common_type_impl * * These classes and structs implement the logic behind common_type, which goes * roughly as follows. Let C be the type of the conditional expression * declval< bool >() ? declval() : declval() * if C is an rvalue, then: * let T' and U' be T and U stripped of reference- and cv-qualifiers * if T' and U' are pointer types, say, T' = V* and U' = W*, then: * define the set of NominalCandidates to be * { V*, W*, V'*, W'* } * where V' is V with whatever cv-qualifiers are on W, and W' is W * with whatever cv-qualifiers are on V * else if T' and U' are both integral or enum types, then: * define the set of NominalCandidates to be * { * unsigned_soft(T'), * unsigned_soft(U'), * signed_soft(T'), * signed_soft(U'), * T', * U', * unsigned int, * int * } * where unsigned_soft(X) is make_unsigned_soft::type and * signed_soft(X) is make_signed_soft::type (these are all * generally necessary to cover the various integral promotion cases) * else * define the set of NominalCandidates to be * { T', U' } * else * let V and W be T and U stripped of reference-qualifiers * define the set of NominalCandidates to be * { V&, W&, V'&, W'& } * where V' is V with whatever cv-qualifiers are on W, and W' is W with * whatever cv-qualifiers are on V * define the set of Candidates to be equal to the set of NominalCandidates with * duplicates removed, and use this set of Candidates to determine C using the * conversion_test_overloads struct ******************************************************************************/ template< class T, class U, class NominalCandidates > class deduce_common_type { typedef typename mpl::copy< NominalCandidates, mpl::inserter< mpl::vector0<>, mpl::if_< mpl::contains< mpl::_1, mpl::_2 >, mpl::_1, mpl::push_back< mpl::_1, mpl::_2 > > > >::type candidate_types; static const int best_candidate_index = sizeof( conversion_test_overloads< candidate_types >::apply( declval< bool >() ? declval() : declval() ) ) - 1; public: typedef typename select< candidate_types, best_candidate_index >::type type; }; template< class T, class U, class V = typename remove_cv< typename remove_reference::type >::type, class W = typename remove_cv< typename remove_reference::type >::type, bool = is_integral_or_enum::value && is_integral_or_enum::value > struct nominal_candidates { typedef mpl::vector2 type; }; template< class T, class U, class V, class W > struct nominal_candidates< T, U, V, W, true > { typedef boost::mpl::vector8< typename make_unsigned_soft::type, typename make_unsigned_soft::type, typename make_signed_soft::type, typename make_signed_soft::type, V, W, unsigned int, int > type; }; template< class T, class U, class V, class W > struct nominal_candidates< T, U, V*, W*, false > { typedef mpl::vector4< V*, W*, typename propagate_cv::type *, typename propagate_cv::type * > type; }; template struct common_type_dispatch_on_rvalueness : public deduce_common_type< T, U, typename nominal_candidates::type > { }; template< class T, class U > struct common_type_dispatch_on_rvalueness< T, U, false > { private: typedef typename remove_reference::type unrefed_T_type; typedef typename remove_reference::type unrefed_U_type; public: typedef typename deduce_common_type< T, U, mpl::vector4< unrefed_T_type &, unrefed_U_type &, typename propagate_cv< unrefed_U_type, unrefed_T_type >::type &, typename propagate_cv< unrefed_T_type, unrefed_U_type >::type & > >::type type; }; template< class T, class U > struct common_type_impl : public common_type_dispatch_on_rvalueness() ? declval() : declval() ) ) == sizeof( yes_type ) > { }; template< class T > struct common_type_impl< T, void > { typedef void type; }; template< class T > struct common_type_impl< void, T > { typedef void type; }; template<> struct common_type_impl< void, void > { typedef void type; }; } // namespace detail_type_traits_common_type } // namespace boost #endif // BOOST_TYPE_TRAITS_DETAIL_COMMON_TYPE_HPP passenger-4.0.37/ext/boost/type_traits/detail/cv_traits_impl.hpp000644 000765 000024 00000005224 12233035540 025506 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED #define BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED #include #include #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // implementation helper: #if !(BOOST_WORKAROUND(__GNUC__,== 3) && BOOST_WORKAROUND(__GNUC_MINOR__, <= 2)) namespace boost { namespace detail { #else #include namespace boost { namespace type_traits { namespace gcc8503 { #endif template struct cv_traits_imp {}; template struct cv_traits_imp { BOOST_STATIC_CONSTANT(bool, is_const = false); BOOST_STATIC_CONSTANT(bool, is_volatile = false); typedef T unqualified_type; }; template struct cv_traits_imp { BOOST_STATIC_CONSTANT(bool, is_const = true); BOOST_STATIC_CONSTANT(bool, is_volatile = false); typedef T unqualified_type; }; template struct cv_traits_imp { BOOST_STATIC_CONSTANT(bool, is_const = false); BOOST_STATIC_CONSTANT(bool, is_volatile = true); typedef T unqualified_type; }; template struct cv_traits_imp { BOOST_STATIC_CONSTANT(bool, is_const = true); BOOST_STATIC_CONSTANT(bool, is_volatile = true); typedef T unqualified_type; }; #if BOOST_WORKAROUND(__GNUC__,== 3) && BOOST_WORKAROUND(__GNUC_MINOR__, <= 2) // We have to exclude function pointers // (see http://gcc.gnu.org/bugzilla/show_bug.cgi?8503) yes_type mini_funcptr_tester(...); no_type mini_funcptr_tester(const volatile void*); } // namespace gcc8503 } // namespace type_traits namespace detail { // Use the implementation above for non function pointers template struct cv_traits_imp : public ::boost::type_traits::gcc8503::cv_traits_imp { }; // Functions are never cv-qualified template struct cv_traits_imp { BOOST_STATIC_CONSTANT(bool, is_const = false); BOOST_STATIC_CONSTANT(bool, is_volatile = false); typedef T unqualified_type; }; #endif } // namespace detail } // namespace boost #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_TT_DETAIL_CV_TRAITS_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/detail/false_result.hpp000644 000765 000024 00000001377 12233035540 025164 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2002. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_DETAIL_FALSE_RESULT_HPP_INCLUDED #define BOOST_TT_DETAIL_FALSE_RESULT_HPP_INCLUDED #include namespace boost { namespace type_traits { // Utility class which always "returns" false struct false_result { template struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; }} // namespace boost::type_traits #endif // BOOST_TT_DETAIL_FALSE_RESULT_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/detail/has_binary_operator.hpp000644 000765 000024 00000022710 12233035540 026520 0ustar00honglistaff000000 000000 // (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa. // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #include #include #include #include #include #include #include #include #include #include #include #include #include #include // should be the last #include #include // cannot include this header without getting warnings of the kind: // gcc: // warning: value computed is not used // warning: comparison between signed and unsigned integer expressions // msvc: // warning C4018: '<' : signed/unsigned mismatch // warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data // warning C4547: '*' : operator before comma has no effect; expected operator with side-effect // warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) // warning C4804: '<' : unsafe use of type 'bool' in operation // warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation // cannot find another implementation -> declared as system header to suppress these warnings. #if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3)) # pragma GCC system_header #elif defined(BOOST_MSVC) # pragma warning ( push ) # pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 ) #endif namespace boost { namespace detail { // This namespace ensures that argument-dependent name lookup does not mess things up. namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) { // 1. a function to have an instance of type T without requiring T to be default // constructible template T &make(); // 2. we provide our operator definition for types that do not have one already // a type returned from operator BOOST_TT_TRAIT_OP when no such operator is // found in the type's own namespace (our own operator is used) so that we have // a means to know that our operator was used struct no_operator { }; // this class allows implicit conversions and makes the following operator // definition less-preferred than any other such operators that might be found // via argument-dependent name lookup struct any { template any(T const&); }; // when operator BOOST_TT_TRAIT_OP is not available, this one is used no_operator operator BOOST_TT_TRAIT_OP (const any&, const any&); // 3. checks if the operator returns void or not // conditions: Lhs!=void and Rhs!=void // we first redefine "operator," so that we have no compilation error if // operator BOOST_TT_TRAIT_OP returns void and we can use the return type of // (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if // operator BOOST_TT_TRAIT_OP returns void or not: // - operator BOOST_TT_TRAIT_OP returns void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t // - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); // this intermediate trait has member value of type bool: // - value==true -> operator BOOST_TT_TRAIT_OP returns void // - value==false -> operator BOOST_TT_TRAIT_OP does not return void template < typename Lhs, typename Rhs > struct operator_returns_void { // overloads of function returns_void make the difference // yes_type and no_type have different size by construction static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() BOOST_TT_TRAIT_OP make(),returns_void_t()))))); }; // 4. checks if the return type is Ret or Ret==dont_care // conditions: Lhs!=void and Rhs!=void struct dont_care { }; template < typename Lhs, typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, true > { BOOST_STATIC_CONSTANT(bool, value = true); }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, dont_care, false > { BOOST_STATIC_CONSTANT(bool, value = true); }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, true > { BOOST_STATIC_CONSTANT(bool, value = true); }; template < typename Lhs, typename Rhs > struct operator_returns_Ret < Lhs, Rhs, void, false > { BOOST_STATIC_CONSTANT(bool, value = false); }; template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, true > { BOOST_STATIC_CONSTANT(bool, value = false); }; // otherwise checks if it is convertible to Ret using the sizeof trick // based on overload resolution // condition: Ret!=void and Ret!=dont_care and the operator does not return void template < typename Lhs, typename Rhs, typename Ret > struct operator_returns_Ret < Lhs, Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make() BOOST_TT_TRAIT_OP make()))==sizeof(::boost::type_traits::yes_type))); }; // 5. checks for operator existence // condition: Lhs!=void and Rhs!=void // checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other // existing one; // this is done with redefinition of "operator," that returns no_operator or has_operator struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs, typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make() BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); }; // 6. main trait: to avoid any compilation error, this class behaves // differently when operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the // standard. // Forbidden_if is a bool that is: // - true when the operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the standard // (would yield compilation error if used) // - false otherwise template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, true > { BOOST_STATIC_CONSTANT(bool, value = false); }; template < typename Lhs, typename Rhs, typename Ret > struct trait_impl1 < Lhs, Rhs, Ret, false > { BOOST_STATIC_CONSTANT(bool, value = ( ::boost::type_traits::ice_and< operator_exists < Lhs, Rhs >::value, operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value >::value ) ); }; // some specializations needs to be declared for the special void case template < typename Rhs, typename Ret > struct trait_impl1 < void, Rhs, Ret, false > { BOOST_STATIC_CONSTANT(bool, value = false); }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, void, Ret, false > { BOOST_STATIC_CONSTANT(bool, value = false); }; template < typename Ret > struct trait_impl1 < void, void, Ret, false > { BOOST_STATIC_CONSTANT(bool, value = false); }; // defines some typedef for convenience template < typename Lhs, typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value)); }; } // namespace impl } // namespace detail // this is the accessible definition of the trait to end user BOOST_TT_AUX_BOOL_TRAIT_DEF3(BOOST_TT_TRAIT_NAME, Lhs, Rhs=Lhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl < Lhs, Rhs, Ret >::value)) } // namespace boost #if defined(BOOST_MSVC) # pragma warning ( pop ) #endif #include passenger-4.0.37/ext/boost/type_traits/detail/has_postfix_operator.hpp000644 000765 000024 00000017202 12233035540 026730 0ustar00honglistaff000000 000000 // (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa. // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #include #include #include #include #include #include #include #include #include #include #include // should be the last #include #include // avoid warnings #if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3)) # pragma GCC system_header #elif defined(BOOST_MSVC) # pragma warning ( push ) # pragma warning ( disable : 4244 4913 ) #endif namespace boost { namespace detail { // This namespace ensures that argument-dependent name lookup does not mess things up. namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) { // 1. a function to have an instance of type T without requiring T to be default // constructible template T &make(); // 2. we provide our operator definition for types that do not have one already // a type returned from operator BOOST_TT_TRAIT_OP when no such operator is // found in the type's own namespace (our own operator is used) so that we have // a means to know that our operator was used struct no_operator { }; // this class allows implicit conversions and makes the following operator // definition less-preferred than any other such operators that might be found // via argument-dependent name lookup struct any { template any(T const&); }; // when operator BOOST_TT_TRAIT_OP is not available, this one is used no_operator operator BOOST_TT_TRAIT_OP (const any&, int); // 3. checks if the operator returns void or not // conditions: Lhs!=void // we first redefine "operator," so that we have no compilation error if // operator BOOST_TT_TRAIT_OP returns void and we can use the return type of // (lhs BOOST_TT_TRAIT_OP, returns_void_t()) to deduce if // operator BOOST_TT_TRAIT_OP returns void or not: // - operator BOOST_TT_TRAIT_OP returns void -> (lhs BOOST_TT_TRAIT_OP, returns_void_t()) returns returns_void_t // - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP, returns_void_t()) returns int struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); // this intermediate trait has member value of type bool: // - value==true -> operator BOOST_TT_TRAIT_OP returns void // - value==false -> operator BOOST_TT_TRAIT_OP does not return void template < typename Lhs > struct operator_returns_void { // overloads of function returns_void make the difference // yes_type and no_type have different size by construction static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make() BOOST_TT_TRAIT_OP,returns_void_t()))))); }; // 4. checks if the return type is Ret or Ret==dont_care // conditions: Lhs!=void struct dont_care { }; template < typename Lhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Lhs > struct operator_returns_Ret < Lhs, dont_care, true > { BOOST_STATIC_CONSTANT(bool, value = true); }; template < typename Lhs > struct operator_returns_Ret < Lhs, dont_care, false > { BOOST_STATIC_CONSTANT(bool, value = true); }; template < typename Lhs > struct operator_returns_Ret < Lhs, void, true > { BOOST_STATIC_CONSTANT(bool, value = true); }; template < typename Lhs > struct operator_returns_Ret < Lhs, void, false > { BOOST_STATIC_CONSTANT(bool, value = false); }; template < typename Lhs, typename Ret > struct operator_returns_Ret < Lhs, Ret, true > { BOOST_STATIC_CONSTANT(bool, value = false); }; // otherwise checks if it is convertible to Ret using the sizeof trick // based on overload resolution // condition: Ret!=void and Ret!=dont_care and the operator does not return void template < typename Lhs, typename Ret > struct operator_returns_Ret < Lhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make() BOOST_TT_TRAIT_OP))==sizeof(::boost::type_traits::yes_type))); }; // 5. checks for operator existence // condition: Lhs!=void // checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other // existing one; // this is done with redefinition of "operator," that returns no_operator or has_operator struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Lhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make() BOOST_TT_TRAIT_OP),make())))==sizeof(::boost::type_traits::yes_type))); }; // 6. main trait: to avoid any compilation error, this class behaves // differently when operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the // standard. // Forbidden_if is a bool that is: // - true when the operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the standard // (would yield compilation error if used) // - false otherwise template < typename Lhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, Ret, true > { BOOST_STATIC_CONSTANT(bool, value = false); }; template < typename Lhs, typename Ret > struct trait_impl1 < Lhs, Ret, false > { BOOST_STATIC_CONSTANT(bool, value = ( ::boost::type_traits::ice_and< operator_exists < Lhs >::value, operator_returns_Ret < Lhs, Ret, operator_returns_void < Lhs >::value >::value >::value ) ); }; // specialization needs to be declared for the special void case template < typename Ret > struct trait_impl1 < void, Ret, false > { BOOST_STATIC_CONSTANT(bool, value = false); }; // defines some typedef for convenience template < typename Lhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Lhs_noref; typedef typename ::boost::remove_cv::type Lhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Lhs_noptr; BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value)); }; } // namespace impl } // namespace detail // this is the accessible definition of the trait to end user BOOST_TT_AUX_BOOL_TRAIT_DEF2(BOOST_TT_TRAIT_NAME, Lhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl< Lhs, Ret >::value)) } // namespace boost #if defined(BOOST_MSVC) # pragma warning ( pop ) #endif #include passenger-4.0.37/ext/boost/type_traits/detail/has_prefix_operator.hpp000644 000765 000024 00000020147 12233035540 026533 0ustar00honglistaff000000 000000 // (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa. // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #include #include #include #include #include #include #include #include #include #include #include #include // should be the last #include #include // cannot include this header without getting warnings of the kind: // gcc: // warning: value computed is not used // warning: comparison between signed and unsigned integer expressions // msvc: // warning C4146: unary minus operator applied to unsigned type, result still unsigned // warning C4804: '-' : unsafe use of type 'bool' in operation // cannot find another implementation -> declared as system header to suppress these warnings. #if defined(__GNUC__) && ((__GNUC__==3 && __GNUC_MINOR__>=1) || (__GNUC__>3)) # pragma GCC system_header #elif defined(BOOST_MSVC) # pragma warning ( push ) # pragma warning ( disable : 4146 4804 4913 4244 ) #endif namespace boost { namespace detail { // This namespace ensures that argument-dependent name lookup does not mess things up. namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) { // 1. a function to have an instance of type T without requiring T to be default // constructible template T &make(); // 2. we provide our operator definition for types that do not have one already // a type returned from operator BOOST_TT_TRAIT_OP when no such operator is // found in the type's own namespace (our own operator is used) so that we have // a means to know that our operator was used struct no_operator { }; // this class allows implicit conversions and makes the following operator // definition less-preferred than any other such operators that might be found // via argument-dependent name lookup struct any { template any(T const&); }; // when operator BOOST_TT_TRAIT_OP is not available, this one is used no_operator operator BOOST_TT_TRAIT_OP (const any&); // 3. checks if the operator returns void or not // conditions: Rhs!=void // we first redefine "operator," so that we have no compilation error if // operator BOOST_TT_TRAIT_OP returns void and we can use the return type of // (BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if // operator BOOST_TT_TRAIT_OP returns void or not: // - operator BOOST_TT_TRAIT_OP returns void -> (BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t // - operator BOOST_TT_TRAIT_OP returns !=void -> (BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int struct returns_void_t { }; template int operator,(const T&, returns_void_t); template int operator,(const volatile T&, returns_void_t); // this intermediate trait has member value of type bool: // - value==true -> operator BOOST_TT_TRAIT_OP returns void // - value==false -> operator BOOST_TT_TRAIT_OP does not return void template < typename Rhs > struct operator_returns_void { // overloads of function returns_void make the difference // yes_type and no_type have different size by construction static ::boost::type_traits::yes_type returns_void(returns_void_t); static ::boost::type_traits::no_type returns_void(int); BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((BOOST_TT_TRAIT_OP make(),returns_void_t()))))); }; // 4. checks if the return type is Ret or Ret==dont_care // conditions: Rhs!=void struct dont_care { }; template < typename Rhs, typename Ret, bool Returns_void > struct operator_returns_Ret; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, true > { BOOST_STATIC_CONSTANT(bool, value = true); }; template < typename Rhs > struct operator_returns_Ret < Rhs, dont_care, false > { BOOST_STATIC_CONSTANT(bool, value = true); }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, true > { BOOST_STATIC_CONSTANT(bool, value = true); }; template < typename Rhs > struct operator_returns_Ret < Rhs, void, false > { BOOST_STATIC_CONSTANT(bool, value = false); }; template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, true > { BOOST_STATIC_CONSTANT(bool, value = false); }; // otherwise checks if it is convertible to Ret using the sizeof trick // based on overload resolution // condition: Ret!=void and Ret!=dont_care and the operator does not return void template < typename Rhs, typename Ret > struct operator_returns_Ret < Rhs, Ret, false > { static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(BOOST_TT_TRAIT_OP make()))==sizeof(::boost::type_traits::yes_type))); }; // 5. checks for operator existence // condition: Rhs!=void // checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other // existing one; // this is done with redefinition of "operator," that returns no_operator or has_operator struct has_operator { }; no_operator operator,(no_operator, has_operator); template < typename Rhs > struct operator_exists { static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((BOOST_TT_TRAIT_OP make()),make())))==sizeof(::boost::type_traits::yes_type))); }; // 6. main trait: to avoid any compilation error, this class behaves // differently when operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the // standard. // Forbidden_if is a bool that is: // - true when the operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the standard // (would yield compilation error if used) // - false otherwise template < typename Rhs, typename Ret, bool Forbidden_if > struct trait_impl1; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, true > { BOOST_STATIC_CONSTANT(bool, value = false); }; template < typename Rhs, typename Ret > struct trait_impl1 < Rhs, Ret, false > { BOOST_STATIC_CONSTANT(bool, value = ( ::boost::type_traits::ice_and< operator_exists < Rhs >::value, operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value >::value ) ); }; // specialization needs to be declared for the special void case template < typename Ret > struct trait_impl1 < void, Ret, false > { BOOST_STATIC_CONSTANT(bool, value = false); }; // defines some typedef for convenience template < typename Rhs, typename Ret > struct trait_impl { typedef typename ::boost::remove_reference::type Rhs_noref; typedef typename ::boost::remove_cv::type Rhs_nocv; typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer::type >::type >::type Rhs_noptr; BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value)); }; } // namespace impl } // namespace detail // this is the accessible definition of the trait to end user BOOST_TT_AUX_BOOL_TRAIT_DEF2(BOOST_TT_TRAIT_NAME, Rhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl < Rhs, Ret >::value)) } // namespace boost #if defined(BOOST_MSVC) # pragma warning ( pop ) #endif #include passenger-4.0.37/ext/boost/type_traits/detail/ice_and.hpp000644 000765 000024 00000001744 12233035540 024054 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock and Steve Cleary 2000. // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED #define BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED #include namespace boost { namespace type_traits { template struct ice_and; template struct ice_and { BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct ice_and { BOOST_STATIC_CONSTANT(bool, value = true); }; } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/detail/ice_eq.hpp000644 000765 000024 00000001714 12233035540 023714 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock and Steve Cleary 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED #define BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED #include namespace boost { namespace type_traits { template struct ice_eq { BOOST_STATIC_CONSTANT(bool, value = (b1 == b2)); }; template struct ice_ne { BOOST_STATIC_CONSTANT(bool, value = (b1 != b2)); }; #ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION template bool const ice_eq::value; template bool const ice_ne::value; #endif } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/detail/ice_not.hpp000644 000765 000024 00000001411 12233035540 024101 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock and Steve Cleary 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED #define BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED #include namespace boost { namespace type_traits { template struct ice_not { BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct ice_not { BOOST_STATIC_CONSTANT(bool, value = false); }; } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/detail/ice_or.hpp000644 000765 000024 00000001747 12233035540 023735 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock and Steve Cleary 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED #define BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED #include namespace boost { namespace type_traits { template struct ice_or; template struct ice_or { BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct ice_or { BOOST_STATIC_CONSTANT(bool, value = false); }; } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/detail/is_function_ptr_helper.hpp000644 000765 000024 00000046513 12233035540 027241 0ustar00honglistaff000000 000000 // Copyright 2000 John Maddock (john@johnmaddock.co.uk) // Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com) // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED #define BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED #include #if defined(BOOST_TT_PREPROCESSING_MODE) # include # include # include #endif namespace boost { namespace type_traits { template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = false); }; #if !defined(BOOST_TT_PREPROCESSING_MODE) // preprocessor-generated part, don't edit by hand! template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #else #undef BOOST_STATIC_CONSTANT #define BOOST_PP_ITERATION_PARAMS_1 \ (3, (0, 25, "boost/type_traits/detail/is_function_ptr_helper.hpp")) #include BOOST_PP_ITERATE() #endif // BOOST_TT_PREPROCESSING_MODE } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED ///// iteration #else #define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; @#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; @#endif #undef BOOST_PP_COUNTER #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/type_traits/detail/is_function_ptr_tester.hpp000644 000765 000024 00000175356 12233035540 027300 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED #define BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED #include #include #if defined(BOOST_TT_PREPROCESSING_MODE) # include # include # include #endif namespace boost { namespace type_traits { // Note it is acceptable to use ellipsis here, since the argument will // always be a pointer type of some sort (JM 2005/06/04): no_type BOOST_TT_DECL is_function_ptr_tester(...); #if !defined(BOOST_TT_PREPROCESSING_MODE) // pre-processed code, don't edit, try GNU cpp with // cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename template yes_type is_function_ptr_tester(R (*)()); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)()); template yes_type is_function_ptr_tester(R (__stdcall*)( ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)()); template yes_type is_function_ptr_tester(R (__fastcall*)( ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)()); template yes_type is_function_ptr_tester(R (__cdecl*)( ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); #endif #else #define BOOST_PP_ITERATION_PARAMS_1 \ (3, (0, 25, "boost/type_traits/detail/is_function_ptr_tester.hpp")) #include BOOST_PP_ITERATE() #endif // BOOST_TT_PREPROCESSING_MODE } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED ///// iteration #else #define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) #undef __stdcall #undef __fastcall #undef __cdecl template yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); @#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); @#endif @#ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); template yes_type is_function_ptr_tester(R (__stdcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); @#ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); template yes_type is_function_ptr_tester(R (__fastcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); @#endif template yes_type is_function_ptr_tester(R (__cdecl*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); template yes_type is_function_ptr_tester(R (__cdecl*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); @#endif #undef BOOST_PP_COUNTER #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp000644 000765 000024 00000230102 12233035540 027364 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED #define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED #include #if defined(BOOST_TT_PREPROCESSING_MODE) # include # include # include #endif namespace boost { namespace type_traits { template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = false); }; #if !defined(BOOST_TT_PREPROCESSING_MODE) // pre-processed code, don't edit, try GNU cpp with // cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #endif #else #undef BOOST_STATIC_CONSTANT #define BOOST_PP_ITERATION_PARAMS_1 \ (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_impl.hpp")) #include BOOST_PP_ITERATE() #endif // BOOST_TT_PREPROCESSING_MODE } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED ///// iteration #else #define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @#endif @#if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @#endif @#endif #undef BOOST_PP_COUNTER #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp000644 000765 000024 00001033111 12233035540 027733 0ustar00honglistaff000000 000000 // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED #define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED #include #include #if defined(BOOST_TT_PREPROCESSING_MODE) # include # include # include #endif namespace boost { namespace type_traits { no_type BOOST_TT_DECL is_mem_fun_pointer_tester(...); #if !defined(BOOST_TT_PREPROCESSING_MODE) // pre-processed code, don't edit, try GNU cpp with // cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)()); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)()); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)()); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)()); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); #ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile); #endif #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile); #endif #else #define BOOST_PP_ITERATION_PARAMS_1 \ (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_tester.hpp")) #include BOOST_PP_ITERATE() #endif // BOOST_TT_PREPROCESSING_MODE } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED ///// iteration #else #define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) #undef __stdcall #undef __fastcall #undef __cdecl template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); @#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile); @#endif @#ifdef BOOST_TT_TEST_MS_FUNC_SIGS // Other calling conventions used by MS compatible compilers: template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile); @#ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile); @#endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile); @#endif #undef BOOST_PP_COUNTER #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/type_traits/detail/size_t_trait_def.hpp000644 000765 000024 00000003223 12233035540 026002 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // $Source$ // $Date: 2011-04-25 05:26:48 -0700 (Mon, 25 Apr 2011) $ // $Revision: 71481 $ #include #include #include #include #include #if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300 # define BOOST_TT_AUX_SIZE_T_BASE(C) public ::boost::integral_constant # define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) /**/ #else # define BOOST_TT_AUX_SIZE_T_BASE(C) public ::boost::mpl::size_t # define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ typedef ::boost::mpl::size_t base_; \ using base_::value; \ /**/ #endif #define BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(trait,T,C) \ template< typename T > struct trait \ : BOOST_TT_AUX_SIZE_T_BASE(C) \ { \ public:\ BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ }; \ \ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ /**/ #define BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(trait,spec,C) \ template<> struct trait \ : BOOST_TT_AUX_SIZE_T_BASE(C) \ { \ public:\ BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \ }; \ /**/ #define BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,C) \ template< param > struct trait \ : BOOST_TT_AUX_SIZE_T_BASE(C) \ { \ }; \ /**/ passenger-4.0.37/ext/boost/type_traits/detail/size_t_trait_undef.hpp000644 000765 000024 00000000752 12233035540 026351 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // $Source$ // $Date: 2004-09-02 08:41:37 -0700 (Thu, 02 Sep 2004) $ // $Revision: 24874 $ #undef BOOST_TT_AUX_SIZE_T_TRAIT_DEF1 #undef BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1 #undef BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1 passenger-4.0.37/ext/boost/type_traits/detail/template_arity_spec.hpp000644 000765 000024 00000001652 12233035540 026525 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include #include #if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ && defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) # define BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(i, name) \ namespace mpl { namespace aux { \ template< BOOST_MPL_PP_PARAMS(i, typename T) > \ struct template_arity< \ name< BOOST_MPL_PP_PARAMS(i, T) > \ > \ : int_ \ { \ }; \ }} \ /**/ #else # define BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/ #endif passenger-4.0.37/ext/boost/type_traits/detail/type_trait_def.hpp000644 000765 000024 00000003052 12233035540 025466 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // $Source$ // $Date: 2011-04-25 05:26:48 -0700 (Mon, 25 Apr 2011) $ // $Revision: 71481 $ #include #include #define BOOST_TT_AUX_TYPE_TRAIT_DEF1(trait,T,result) \ template< typename T > struct trait \ { \ public:\ typedef result type; \ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ }; \ \ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ /**/ #define BOOST_TT_AUX_TYPE_TRAIT_SPEC1(trait,spec,result) \ template<> struct trait \ { \ public:\ typedef result type; \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \ }; \ /**/ #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(trait,spec,result) \ template<> struct trait##_impl \ { \ public:\ typedef result type; \ }; \ /**/ #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \ template< param > struct trait \ { \ public:\ typedef result type; \ }; \ /**/ #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,spec,result) \ template< param1, param2 > struct trait \ { \ public:\ typedef result; \ }; \ /**/ #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(param,trait,spec,result) \ template< param > struct trait##_impl \ { \ public:\ typedef result type; \ }; \ /**/ passenger-4.0.37/ext/boost/type_traits/detail/type_trait_undef.hpp000644 000765 000024 00000001161 12233035540 026030 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // $Source$ // $Date: 2004-09-02 08:41:37 -0700 (Thu, 02 Sep 2004) $ // $Revision: 24874 $ #undef BOOST_TT_AUX_TYPE_TRAIT_DEF1 #undef BOOST_TT_AUX_TYPE_TRAIT_SPEC1 #undef BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1 #undef BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1 #undef BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2 #undef BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1 passenger-4.0.37/ext/boost/type_traits/detail/wrap.hpp000644 000765 000024 00000001077 12233035540 023442 0ustar00honglistaff000000 000000 // (C) Copyright David Abrahams 2002. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_DETAIL_WRAP_HPP_INCLUDED #define BOOST_TT_DETAIL_WRAP_HPP_INCLUDED namespace boost { namespace type_traits { template struct wrap {}; }} // namespace boost::type_traits #endif // BOOST_TT_DETAIL_WRAP_HPP_INCLUDED passenger-4.0.37/ext/boost/type_traits/detail/yes_no_type.hpp000644 000765 000024 00000001326 12233035540 025023 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock and Steve Cleary 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // // macros and helpers for working with integral-constant-expressions. #ifndef BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED #define BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED namespace boost { namespace type_traits { typedef char yes_type; struct no_type { char padding[8]; }; } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED passenger-4.0.37/ext/boost/tuple/detail/000755 000765 000024 00000000000 12233035540 020535 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/tuple/tuple.hpp000644 000765 000024 00000005454 12233035540 021145 0ustar00honglistaff000000 000000 // tuple.hpp - Boost Tuple Library -------------------------------------- // Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org // ----------------------------------------------------------------- #ifndef BOOST_TUPLE_HPP #define BOOST_TUPLE_HPP #if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 // Work around a compiler bug. // boost::python::tuple has to be seen by the compiler before the // boost::tuple class template. namespace boost { namespace python { class tuple; }} #endif #include "boost/config.hpp" #include "boost/static_assert.hpp" #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) // The MSVC version #include "boost/tuple/detail/tuple_basic_no_partial_spec.hpp" #else // other compilers #include "boost/ref.hpp" #include "boost/tuple/detail/tuple_basic.hpp" #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace boost { using tuples::tuple; using tuples::make_tuple; using tuples::tie; #if !defined(BOOST_NO_USING_TEMPLATE) using tuples::get; #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) // // The "using tuples::get" statement causes the // Borland compiler to ICE, use forwarding // functions instead: // template inline typename tuples::access_traits< typename tuples::element >::type >::non_const_type get(tuples::cons& c) { return tuples::get(c); } // get function for const cons-lists, returns a const reference to // the element. If the element is a reference, returns the reference // as such (that is, can return a non-const reference) template inline typename tuples::access_traits< typename tuples::element >::type >::const_type get(const tuples::cons& c) { return tuples::get(c); } #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // // MSVC, using declarations don't mix with templates well, // so use forwarding functions instead: // template typename tuples::detail::element_ref >::RET get(tuples::cons& t, tuples::detail::workaround_holder* = 0) { return tuples::detail::get_class::get(t); } template typename tuples::detail::element_const_ref >::RET get(const tuples::cons& t, tuples::detail::workaround_holder* = 0) { return tuples::detail::get_class::get(t); } #endif // BOOST_NO_USING_TEMPLATE } // end namespace boost #endif // BOOST_TUPLE_HPP passenger-4.0.37/ext/boost/tuple/detail/tuple_basic.hpp000644 000765 000024 00000077120 12233035540 023547 0ustar00honglistaff000000 000000 // tuple_basic.hpp ----------------------------------------------------- // Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org // Outside help: // This and that, Gary Powell. // Fixed return types for get_head/get_tail // ( and other bugs ) per suggestion of Jens Maurer // simplified element type accessors + bug fix (Jeremy Siek) // Several changes/additions according to suggestions by Douglas Gregor, // William Kempf, Vesa Karvonen, John Max Skaller, Ed Brey, Beman Dawes, // David Abrahams. // Revision history: // 2002 05 01 Hugo Duncan: Fix for Borland after Jaakko's previous changes // 2002 04 18 Jaakko: tuple element types can be void or plain function // types, as long as no object is created. // Tuple objects can no hold even noncopyable types // such as arrays. // 2001 10 22 John Maddock // Fixes for Borland C++ // 2001 08 30 David Abrahams // Added default constructor for cons<>. // ----------------------------------------------------------------- #ifndef BOOST_TUPLE_BASIC_HPP #define BOOST_TUPLE_BASIC_HPP #include // needed for the assignment from pair to tuple #include "boost/type_traits/cv_traits.hpp" #include "boost/type_traits/function_traits.hpp" #include "boost/utility/swap.hpp" #include "boost/detail/workaround.hpp" // needed for BOOST_WORKAROUND namespace boost { namespace tuples { // -- null_type -------------------------------------------------------- struct null_type {}; // a helper function to provide a const null_type type temporary namespace detail { inline const null_type cnull() { return null_type(); } // -- if construct ------------------------------------------------ // Proposed by Krzysztof Czarnecki and Ulrich Eisenecker template struct IF { typedef Then RET; }; template struct IF { typedef Else RET; }; } // end detail // - cons forward declaration ----------------------------------------------- template struct cons; // - tuple forward declaration ----------------------------------------------- template < class T0 = null_type, class T1 = null_type, class T2 = null_type, class T3 = null_type, class T4 = null_type, class T5 = null_type, class T6 = null_type, class T7 = null_type, class T8 = null_type, class T9 = null_type> class tuple; // tuple_length forward declaration template struct length; namespace detail { // -- generate error template, referencing to non-existing members of this // template is used to produce compilation errors intentionally template class generate_error; template struct drop_front { template struct apply { typedef BOOST_DEDUCED_TYPENAME drop_front::BOOST_NESTED_TEMPLATE apply next; typedef BOOST_DEDUCED_TYPENAME next::type::tail_type type; static const type& call(const Tuple& tup) { return next::call(tup).tail; } }; }; template<> struct drop_front<0> { template struct apply { typedef Tuple type; static const type& call(const Tuple& tup) { return tup; } }; }; } // end of namespace detail // -cons type accessors ---------------------------------------- // typename tuples::element::type gets the type of the // Nth element ot T, first element is at index 0 // ------------------------------------------------------- #ifndef BOOST_NO_CV_SPECIALIZATIONS template struct element { typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE apply::type::head_type type; }; template struct element { private: typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE apply::type::head_type unqualified_type; public: #if BOOST_WORKAROUND(__BORLANDC__,<0x600) typedef const unqualified_type type; #else typedef BOOST_DEDUCED_TYPENAME boost::add_const::type type; #endif }; #else // def BOOST_NO_CV_SPECIALIZATIONS namespace detail { template struct element_impl { typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE apply::type::head_type type; }; template struct element_impl { typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE apply::type::head_type unqualified_type; typedef const unqualified_type type; }; } // end of namespace detail template struct element: public detail::element_impl::value> { }; #endif // -get function templates ----------------------------------------------- // Usage: get(aTuple) // -- some traits classes for get functions // access traits lifted from detail namespace to be part of the interface, // (Joel de Guzman's suggestion). Rationale: get functions are part of the // interface, so should the way to express their return types be. template struct access_traits { typedef const T& const_type; typedef T& non_const_type; typedef const typename boost::remove_cv::type& parameter_type; // used as the tuple constructors parameter types // Rationale: non-reference tuple element types can be cv-qualified. // It should be possible to initialize such types with temporaries, // and when binding temporaries to references, the reference must // be non-volatile and const. 8.5.3. (5) }; template struct access_traits { typedef T& const_type; typedef T& non_const_type; typedef T& parameter_type; }; // get function for non-const cons-lists, returns a reference to the element template inline typename access_traits< typename element >::type >::non_const_type get(cons& c BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) { typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE apply > impl; typedef BOOST_DEDUCED_TYPENAME impl::type cons_element; return const_cast(impl::call(c)).head; } // get function for const cons-lists, returns a const reference to // the element. If the element is a reference, returns the reference // as such (that is, can return a non-const reference) template inline typename access_traits< typename element >::type >::const_type get(const cons& c BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) { typedef BOOST_DEDUCED_TYPENAME detail::drop_front::BOOST_NESTED_TEMPLATE apply > impl; typedef BOOST_DEDUCED_TYPENAME impl::type cons_element; return impl::call(c).head; } // -- the cons template -------------------------------------------------- namespace detail { // These helper templates wrap void types and plain function types. // The reationale is to allow one to write tuple types with those types // as elements, even though it is not possible to instantiate such object. // E.g: typedef tuple some_type; // ok // but: some_type x; // fails template class non_storeable_type { non_storeable_type(); }; template struct wrap_non_storeable_type { typedef typename IF< ::boost::is_function::value, non_storeable_type, T >::RET type; }; template <> struct wrap_non_storeable_type { typedef non_storeable_type type; }; } // detail template struct cons { typedef HT head_type; typedef TT tail_type; typedef typename detail::wrap_non_storeable_type::type stored_head_type; stored_head_type head; tail_type tail; typename access_traits::non_const_type get_head() { return head; } typename access_traits::non_const_type get_tail() { return tail; } typename access_traits::const_type get_head() const { return head; } typename access_traits::const_type get_tail() const { return tail; } cons() : head(), tail() {} // cons() : head(detail::default_arg::f()), tail() {} // the argument for head is not strictly needed, but it prevents // array type elements. This is good, since array type elements // cannot be supported properly in any case (no assignment, // copy works only if the tails are exactly the same type, ...) cons(typename access_traits::parameter_type h, const tail_type& t) : head (h), tail(t) {} template cons( T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) : head (t1), tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) {} template cons( const null_type& /*t1*/, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9, T10& t10 ) : head (), tail (t2, t3, t4, t5, t6, t7, t8, t9, t10, detail::cnull()) {} template cons( const cons& u ) : head(u.head), tail(u.tail) {} template cons& operator=( const cons& u ) { head=u.head; tail=u.tail; return *this; } // must define assignment operator explicitly, implicit version is // illformed if HT is a reference (12.8. (12)) cons& operator=(const cons& u) { head = u.head; tail = u.tail; return *this; } template cons& operator=( const std::pair& u ) { BOOST_STATIC_ASSERT(length::value == 2); // check length = 2 head = u.first; tail.head = u.second; return *this; } // get member functions (non-const and const) template typename access_traits< typename element >::type >::non_const_type get() { return boost::tuples::get(*this); // delegate to non-member get } template typename access_traits< typename element >::type >::const_type get() const { return boost::tuples::get(*this); // delegate to non-member get } }; template struct cons { typedef HT head_type; typedef null_type tail_type; typedef cons self_type; typedef typename detail::wrap_non_storeable_type::type stored_head_type; stored_head_type head; typename access_traits::non_const_type get_head() { return head; } null_type get_tail() { return null_type(); } typename access_traits::const_type get_head() const { return head; } const null_type get_tail() const { return null_type(); } // cons() : head(detail::default_arg::f()) {} cons() : head() {} cons(typename access_traits::parameter_type h, const null_type& = null_type()) : head (h) {} template cons(T1& t1, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&) : head (t1) {} cons(const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&, const null_type&) : head () {} template cons( const cons& u ) : head(u.head) {} template cons& operator=(const cons& u ) { head = u.head; return *this; } // must define assignment operator explicitely, implicit version // is illformed if HT is a reference cons& operator=(const cons& u) { head = u.head; return *this; } template typename access_traits< typename element::type >::non_const_type get(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) { return boost::tuples::get(*this); } template typename access_traits< typename element::type >::const_type get(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, N)) const { return boost::tuples::get(*this); } }; // templates for finding out the length of the tuple ------------------- template struct length { BOOST_STATIC_CONSTANT(int, value = 1 + length::value); }; template<> struct length > { BOOST_STATIC_CONSTANT(int, value = 0); }; template<> struct length const> { BOOST_STATIC_CONSTANT(int, value = 0); }; template<> struct length { BOOST_STATIC_CONSTANT(int, value = 0); }; template<> struct length { BOOST_STATIC_CONSTANT(int, value = 0); }; namespace detail { // Tuple to cons mapper -------------------------------------------------- template struct map_tuple_to_cons { typedef cons::type > type; }; // The empty tuple is a null_type template <> struct map_tuple_to_cons { typedef null_type type; }; } // end detail // ------------------------------------------------------------------- // -- tuple ------------------------------------------------------ template class tuple : public detail::map_tuple_to_cons::type { public: typedef typename detail::map_tuple_to_cons::type inherited; typedef typename inherited::head_type head_type; typedef typename inherited::tail_type tail_type; // access_traits::parameter_type takes non-reference types as const T& tuple() {} tuple(typename access_traits::parameter_type t0) : inherited(t0, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1) : inherited(t0, t1, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2) : inherited(t0, t1, t2, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3) : inherited(t0, t1, t2, t3, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4) : inherited(t0, t1, t2, t3, t4, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5) : inherited(t0, t1, t2, t3, t4, t5, detail::cnull(), detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6) : inherited(t0, t1, t2, t3, t4, t5, t6, detail::cnull(), detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6, typename access_traits::parameter_type t7) : inherited(t0, t1, t2, t3, t4, t5, t6, t7, detail::cnull(), detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6, typename access_traits::parameter_type t7, typename access_traits::parameter_type t8) : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, detail::cnull()) {} tuple(typename access_traits::parameter_type t0, typename access_traits::parameter_type t1, typename access_traits::parameter_type t2, typename access_traits::parameter_type t3, typename access_traits::parameter_type t4, typename access_traits::parameter_type t5, typename access_traits::parameter_type t6, typename access_traits::parameter_type t7, typename access_traits::parameter_type t8, typename access_traits::parameter_type t9) : inherited(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9) {} template tuple(const cons& p) : inherited(p) {} template tuple& operator=(const cons& k) { inherited::operator=(k); return *this; } template tuple& operator=(const std::pair& k) { BOOST_STATIC_ASSERT(length::value == 2);// check_length = 2 this->head = k.first; this->tail.head = k.second; return *this; } }; // The empty tuple template <> class tuple : public null_type { public: typedef null_type inherited; }; // Swallows any assignment (by Doug Gregor) namespace detail { struct swallow_assign; typedef void (detail::swallow_assign::*ignore_t)(); struct swallow_assign { swallow_assign(ignore_t(*)(ignore_t)) {} template swallow_assign const& operator=(const T&) const { return *this; } }; } // namespace detail // "ignore" allows tuple positions to be ignored when using "tie". inline detail::ignore_t ignore(detail::ignore_t) { return 0; } // --------------------------------------------------------------------------- // The call_traits for make_tuple // Honours the reference_wrapper class. // Must be instantiated with plain or const plain types (not with references) // from template foo(const T& t) : make_tuple_traits::type // from template foo(T& t) : make_tuple_traits::type // Conversions: // T -> T, // references -> compile_time_error // reference_wrapper -> T& // const reference_wrapper -> T& // array -> const ref array template struct make_tuple_traits { typedef T type; // commented away, see below (JJ) // typedef typename IF< // boost::is_function::value, // T&, // T>::RET type; }; // The is_function test was there originally for plain function types, // which can't be stored as such (we must either store them as references or // pointers). Such a type could be formed if make_tuple was called with a // reference to a function. // But this would mean that a const qualified function type was formed in // the make_tuple function and hence make_tuple can't take a function // reference as a parameter, and thus T can't be a function type. // So is_function test was removed. // (14.8.3. says that type deduction fails if a cv-qualified function type // is created. (It only applies for the case of explicitly specifying template // args, though?)) (JJ) template struct make_tuple_traits { typedef typename detail::generate_error:: do_not_use_with_reference_type error; }; // Arrays can't be stored as plain types; convert them to references. // All arrays are converted to const. This is because make_tuple takes its // parameters as const T& and thus the knowledge of the potential // non-constness of actual argument is lost. template struct make_tuple_traits { typedef const T (&type)[n]; }; template struct make_tuple_traits { typedef const T (&type)[n]; }; template struct make_tuple_traits { typedef const volatile T (&type)[n]; }; template struct make_tuple_traits { typedef const volatile T (&type)[n]; }; template struct make_tuple_traits >{ typedef T& type; }; template struct make_tuple_traits >{ typedef T& type; }; template<> struct make_tuple_traits { typedef detail::swallow_assign type; }; namespace detail { // a helper traits to make the make_tuple functions shorter (Vesa Karvonen's // suggestion) template < class T0 = null_type, class T1 = null_type, class T2 = null_type, class T3 = null_type, class T4 = null_type, class T5 = null_type, class T6 = null_type, class T7 = null_type, class T8 = null_type, class T9 = null_type > struct make_tuple_mapper { typedef tuple::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type, typename make_tuple_traits::type> type; }; } // end detail // -make_tuple function templates ----------------------------------- inline tuple<> make_tuple() { return tuple<>(); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0) { typedef typename detail::make_tuple_mapper::type t; return t(t0); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1, t2); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1, t2, t3); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1, t2, t3, t4); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) { typedef typename detail::make_tuple_mapper::type t; return t(t0, t1, t2, t3, t4, t5); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6) { typedef typename detail::make_tuple_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6); } template inline typename detail::make_tuple_mapper::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7) { typedef typename detail::make_tuple_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7); } template inline typename detail::make_tuple_mapper ::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8) { typedef typename detail::make_tuple_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7, t8); } template inline typename detail::make_tuple_mapper ::type make_tuple(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9) { typedef typename detail::make_tuple_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); } namespace detail { template struct tie_traits { typedef T& type; }; template<> struct tie_traits { typedef swallow_assign type; }; template<> struct tie_traits { typedef null_type type; }; template < class T0 = void, class T1 = void, class T2 = void, class T3 = void, class T4 = void, class T5 = void, class T6 = void, class T7 = void, class T8 = void, class T9 = void > struct tie_mapper { typedef tuple::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type, typename tie_traits::type> type; }; } // Tie function templates ------------------------------------------------- template inline typename detail::tie_mapper::type tie(T0& t0) { typedef typename detail::tie_mapper::type t; return t(t0); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1) { typedef typename detail::tie_mapper::type t; return t(t0, t1); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1, T2& t2) { typedef typename detail::tie_mapper::type t; return t(t0, t1, t2); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1, T2& t2, T3& t3) { typedef typename detail::tie_mapper::type t; return t(t0, t1, t2, t3); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4) { typedef typename detail::tie_mapper::type t; return t(t0, t1, t2, t3, t4); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5) { typedef typename detail::tie_mapper::type t; return t(t0, t1, t2, t3, t4, t5); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6) { typedef typename detail::tie_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6); } template inline typename detail::tie_mapper::type tie(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7) { typedef typename detail::tie_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7); } template inline typename detail::tie_mapper ::type tie(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8) { typedef typename detail::tie_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7, t8); } template inline typename detail::tie_mapper ::type tie(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4, T5& t5, T6& t6, T7& t7, T8& t8, T9& t9) { typedef typename detail::tie_mapper ::type t; return t(t0, t1, t2, t3, t4, t5, t6, t7, t8, t9); } template void swap(tuple& lhs, tuple& rhs); inline void swap(null_type&, null_type&) {} template inline void swap(cons& lhs, cons& rhs) { ::boost::swap(lhs.head, rhs.head); } template inline void swap(cons& lhs, cons& rhs) { ::boost::swap(lhs.head, rhs.head); ::boost::tuples::swap(lhs.tail, rhs.tail); } template inline void swap(tuple& lhs, tuple& rhs) { typedef tuple tuple_type; typedef typename tuple_type::inherited base; ::boost::tuples::swap(static_cast(lhs), static_cast(rhs)); } } // end of namespace tuples } // end of namespace boost #endif // BOOST_TUPLE_BASIC_HPP passenger-4.0.37/ext/boost/thread/barrier.hpp000644 000765 000024 00000003311 12233035540 021546 0ustar00honglistaff000000 000000 // Copyright (C) 2002-2003 // David Moore, William E. Kempf // Copyright (C) 2007-8 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_BARRIER_JDM030602_HPP #define BOOST_BARRIER_JDM030602_HPP #include #include #include #include #include #include #include #include #include namespace boost { class barrier { public: BOOST_THREAD_NO_COPYABLE( barrier ) barrier(unsigned int count) : m_threshold(count), m_count(count), m_generation(0) { if (count == 0) boost::throw_exception(thread_exception(system::errc::invalid_argument, "barrier constructor: count cannot be zero.")); } bool wait() { boost::unique_lock lock(m_mutex); unsigned int gen = m_generation; if (--m_count == 0) { m_generation++; m_count = m_threshold; m_cond.notify_all(); return true; } while (gen == m_generation) m_cond.wait(lock); return false; } private: mutex m_mutex; condition_variable m_cond; unsigned int m_threshold; unsigned int m_count; unsigned int m_generation; }; } // namespace boost #include #endif passenger-4.0.37/ext/boost/thread/completion_latch.hpp000644 000765 000024 00000015024 12233035540 023450 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2013 Vicente J. Botet Escriba #ifndef BOOST_THREAD_COMPLETION_LATCH_HPP #define BOOST_THREAD_COMPLETION_LATCH_HPP #include #include #include #include #include #include #include #include #include #ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL #include #else #include #endif //#include #include namespace boost { namespace thread_detail { void noop() { } } class completion_latch { public: /// the implementation defined completion function type #ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL typedef function completion_function; #else typedef std::function completion_function; #endif /// noop completion function factory static completion_function noop() { return completion_function(&thread_detail::noop); } private: struct around_wait; friend struct around_wait; struct around_wait { completion_latch &that_; boost::unique_lock &lk_; around_wait(completion_latch &that, boost::unique_lock &lk) : that_(that), lk_(lk) { that_.leavers_.cond_.wait(lk, detail::counter_is_zero(that_.leavers_)); that_.waiters_.inc_and_notify_all(); that_.leavers_.cond_.wait(lk, detail::counter_is_not_zero(that_.leavers_)); } ~around_wait() { that_.waiters_.dec_and_notify_all(); } }; bool count_down(unique_lock &lk) { BOOST_ASSERT(count_ > 0); if (--count_ == 0) { waiters_.cond_.wait(lk, detail::counter_is_not_zero(waiters_)); leavers_.assign_and_notify_all(waiters_); count_.cond_.notify_all(); waiters_.cond_.wait(lk, detail::counter_is_zero(waiters_)); leavers_.assign_and_notify_all(0); lk.unlock(); funct_(); return true; } return false; } public: BOOST_THREAD_NO_COPYABLE( completion_latch ) /// Constructs a latch with a given count. completion_latch(std::size_t count) : count_(count), funct_(noop()), waiters_(0), leavers_(0) { } /// Constructs a latch with a given count and a completion function. template completion_latch(std::size_t count, BOOST_THREAD_RV_REF(F) funct) : count_(count), funct_(boost::move(funct)), waiters_(0), leavers_(0) { } template completion_latch(std::size_t count, void(*funct)()) : count_(count), funct_(funct), waiters_(0), leavers_(0) { } /// ~completion_latch() { } /// Blocks until the latch has counted down to zero. void wait() { boost::unique_lock lk(mutex_); around_wait aw(*this, lk); count_.cond_.wait(lk, detail::counter_is_zero(count_)); } /// @return true if the internal counter is already 0, false otherwise bool try_wait() { boost::unique_lock lk(mutex_); around_wait aw(*this, lk); return (count_ == 0); } /// try to wait for a specified amount of time /// @return whether there is a timeout or not. template cv_status wait_for(const chrono::duration& rel_time) { boost::unique_lock lk(mutex_); around_wait aw(*this, lk); return count_.cond_.wait_for(lk, rel_time, detail::counter_is_zero(count_)) ? cv_status::no_timeout : cv_status::timeout; } /// try to wait until the specified time_point is reached /// @return whether there is a timeout or not. template cv_status wait_until(const chrono::time_point& abs_time) { boost::unique_lock lk(mutex_); around_wait aw(*this, lk); return count_.cond_.wait_until(lk, abs_time, detail::counter_is_zero(count_)) ? cv_status::no_timeout : cv_status::timeout; } /// Decrement the count and notify anyone waiting if we reach zero. /// @Requires count must be greater than 0 void count_down() { unique_lock lk(mutex_); count_down(lk); } void signal() { count_down(); } /// Decrement the count and notify anyone waiting if we reach zero. /// Blocks until the latch has counted down to zero. /// @Requires count must be greater than 0 void count_down_and_wait() { boost::unique_lock lk(mutex_); if (count_down(lk)) { return; } around_wait aw(*this, lk); count_.cond_.wait(lk, detail::counter_is_zero(count_)); } void sync() { count_down_and_wait(); } /// Reset the counter /// #Requires This method may only be invoked when there are no other threads currently inside the count_down_and_wait() method. void reset(std::size_t count) { boost::lock_guard lk(mutex_); //BOOST_ASSERT(count_ == 0); count_ = count; } /// Resets the latch with the new completion function. /// The next time the internal count reaches 0, this function will be invoked. /// This completion function may only be invoked when there are no other threads /// currently inside the count_down and wait related functions. /// It may also be invoked from within the registered completion function. /// @Returns the old completion function if any or noop if #ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL template completion_function then(BOOST_THREAD_RV_REF(F) funct) { boost::lock_guard lk(mutex_); completion_function tmp(funct_); funct_ = boost::move(funct); return tmp; } #endif completion_function then(void(*funct)()) { boost::lock_guard lk(mutex_); completion_function tmp(funct_); funct_ = completion_function(funct); return tmp; } private: mutex mutex_; detail::counter count_; completion_function funct_; detail::counter waiters_; detail::counter leavers_; }; } // namespace boost #include #endif passenger-4.0.37/ext/boost/thread/condition.hpp000644 000765 000024 00000000752 12233035540 022114 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_CONDITION_HPP #define BOOST_THREAD_CONDITION_HPP // (C) Copyright 2007 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #if defined BOOST_THREAD_PROVIDES_CONDITION #include namespace boost { typedef condition_variable_any condition; } #endif #endif passenger-4.0.37/ext/boost/thread/condition_variable.hpp000644 000765 000024 00000001172 12233035540 023756 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_CONDITION_VARIABLE_HPP #define BOOST_THREAD_CONDITION_VARIABLE_HPP // condition_variable.hpp // // (C) Copyright 2007 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #if defined(BOOST_THREAD_PLATFORM_WIN32) #include #elif defined(BOOST_THREAD_PLATFORM_PTHREAD) #include #else #error "Boost threads unavailable on this platform" #endif #endif passenger-4.0.37/ext/boost/thread/cv_status.hpp000644 000765 000024 00000001037 12233035540 022136 0ustar00honglistaff000000 000000 // cv_status.hpp // // Copyright (C) 2011 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_CV_STATUS_HPP #define BOOST_THREAD_CV_STATUS_HPP #include namespace boost { // enum class cv_status; BOOST_SCOPED_ENUM_DECLARE_BEGIN(cv_status) { no_timeout, timeout } BOOST_SCOPED_ENUM_DECLARE_END(cv_status) } #endif // header passenger-4.0.37/ext/boost/thread/detail/000755 000765 000024 00000000000 12233035540 020653 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/thread/exceptions.hpp000644 000765 000024 00000014125 12233035540 022306 0ustar00honglistaff000000 000000 // Copyright (C) 2001-2003 // William E. Kempf // Copyright (C) 2007-9 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_EXCEPTIONS_PDM070801_H #define BOOST_THREAD_EXCEPTIONS_PDM070801_H #include // pdm: Sorry, but this class is used all over the place & I end up // with recursive headers if I don't separate it // wek: Not sure why recursive headers would cause compilation problems // given the include guards, but regardless it makes sense to // seperate this out any way. #include #include #include #include #include #include namespace boost { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS class BOOST_SYMBOL_VISIBLE thread_interrupted : public oxt::tracable_exception {}; #endif class BOOST_SYMBOL_VISIBLE thread_exception: public system::system_error //public std::exception { typedef system::system_error base_type; public: thread_exception() : base_type(0,system::system_category()) {} thread_exception(int sys_error_code) : base_type(sys_error_code, system::system_category()) {} thread_exception( int ev, const char * what_arg ) : base_type(system::error_code(ev, system::system_category()), what_arg) { } thread_exception( int ev, const std::string & what_arg ) : base_type(system::error_code(ev, system::system_category()), what_arg) { } ~thread_exception() throw() {} int native_error() const { return code().value(); } }; class BOOST_SYMBOL_VISIBLE condition_error: public system::system_error //public std::exception { typedef system::system_error base_type; public: condition_error() : base_type(system::error_code(0, system::system_category()), "Condition error") {} condition_error( int ev ) : base_type(system::error_code(ev, system::system_category()), "Condition error") { } condition_error( int ev, const char * what_arg ) : base_type(system::error_code(ev, system::system_category()), what_arg) { } condition_error( int ev, const std::string & what_arg ) : base_type(system::error_code(ev, system::system_category()), what_arg) { } }; class BOOST_SYMBOL_VISIBLE lock_error: public thread_exception { typedef thread_exception base_type; public: lock_error() : base_type(0, "boost::lock_error") {} lock_error( int ev ) : base_type(ev, "boost::lock_error") { } lock_error( int ev, const char * what_arg ) : base_type(ev, what_arg) { } lock_error( int ev, const std::string & what_arg ) : base_type(ev, what_arg) { } ~lock_error() throw() {} }; class BOOST_SYMBOL_VISIBLE thread_resource_error: public thread_exception { typedef thread_exception base_type; public: thread_resource_error() : base_type(system::errc::resource_unavailable_try_again, "boost::thread_resource_error") {} thread_resource_error( int ev ) : base_type(ev, "boost::thread_resource_error") { } thread_resource_error( int ev, const char * what_arg ) : base_type(ev, what_arg) { } thread_resource_error( int ev, const std::string & what_arg ) : base_type(ev, what_arg) { } ~thread_resource_error() throw() {} }; class BOOST_SYMBOL_VISIBLE unsupported_thread_option: public thread_exception { typedef thread_exception base_type; public: unsupported_thread_option() : base_type(system::errc::invalid_argument, "boost::unsupported_thread_option") {} unsupported_thread_option( int ev ) : base_type(ev, "boost::unsupported_thread_option") { } unsupported_thread_option( int ev, const char * what_arg ) : base_type(ev, what_arg) { } unsupported_thread_option( int ev, const std::string & what_arg ) : base_type(ev, what_arg) { } }; class BOOST_SYMBOL_VISIBLE invalid_thread_argument: public thread_exception { typedef thread_exception base_type; public: invalid_thread_argument() : base_type(system::errc::invalid_argument, "boost::invalid_thread_argument") {} invalid_thread_argument( int ev ) : base_type(ev, "boost::invalid_thread_argument") { } invalid_thread_argument( int ev, const char * what_arg ) : base_type(ev, what_arg) { } invalid_thread_argument( int ev, const std::string & what_arg ) : base_type(ev, what_arg) { } }; class BOOST_SYMBOL_VISIBLE thread_permission_error: public thread_exception { typedef thread_exception base_type; public: thread_permission_error() : base_type(system::errc::permission_denied, "boost::thread_permission_error") {} thread_permission_error( int ev ) : base_type(ev, "boost::thread_permission_error") { } thread_permission_error( int ev, const char * what_arg ) : base_type(ev, what_arg) { } thread_permission_error( int ev, const std::string & what_arg ) : base_type(ev, what_arg) { } }; } // namespace boost #include #endif passenger-4.0.37/ext/boost/thread/externally_locked.hpp000644 000765 000024 00000025013 12233035540 023633 0ustar00honglistaff000000 000000 // (C) Copyright 2012 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_EXTERNALLY_LOCKED_HPP #define BOOST_THREAD_EXTERNALLY_LOCKED_HPP #include #include #include #include #include #include #include #include #include #include #include namespace boost { /** * externally_locked cloaks an object of type T, and actually provides full * access to that object through the get and set member functions, provided you * pass a reference to a strict lock object */ //[externally_locked template class externally_locked; template class externally_locked { //BOOST_CONCEPT_ASSERT(( CopyConstructible )); BOOST_CONCEPT_ASSERT(( BasicLockable )); public: typedef MutexType mutex_type; BOOST_THREAD_COPYABLE_AND_MOVABLE( externally_locked ) /** * Requires: T is a model of CopyConstructible. * Effects: Constructs an externally locked object copying the cloaked type. */ externally_locked(mutex_type& mtx, const T& obj) : obj_(obj), mtx_(&mtx) { } /** * Requires: T is a model of Movable. * Effects: Constructs an externally locked object by moving the cloaked type. */ externally_locked(mutex_type& mtx, BOOST_THREAD_RV_REF(T) obj) : obj_(move(obj)), mtx_(&mtx) { } /** * Requires: T is a model of DefaultConstructible. * Effects: Constructs an externally locked object initializing the cloaked type with the default constructor. */ externally_locked(mutex_type& mtx) // BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(T())) : obj_(), mtx_(&mtx) { } /** * Copy constructor */ externally_locked(externally_locked const& rhs) //BOOST_NOEXCEPT : obj_(rhs.obj_), mtx_(rhs.mtx_) { } /** * Move constructor */ externally_locked(BOOST_THREAD_RV_REF(externally_locked) rhs) //BOOST_NOEXCEPT : obj_(move(rhs.obj_)), mtx_(rhs.mtx_) { } /// assignment externally_locked& operator=(externally_locked const& rhs) //BOOST_NOEXCEPT { obj_=rhs.obj_; mtx_=rhs.mtx_; return *this; } /// move assignment externally_locked& operator=(BOOST_THREAD_RV_REF(externally_locked) rhs) // BOOST_NOEXCEPT { obj_=move(rhs.obj_); mtx_=rhs.mtx_; return *this; } void swap(externally_locked& rhs) //BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR) { swap(obj_, rhs.obj_); swap(mtx_, rhs.mtx_); } /** * Requires: The lk parameter must be locking the associated mtx. * * Returns: The address of the cloaked object.. * * Throws: lock_error if BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is not defined and the lk parameter doesn't satisfy the preconditions */ T& get(strict_lock& lk) { BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/ return obj_; } const T& get(strict_lock& lk) const { BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/ return obj_; } template T& get(nested_strict_lock& lk) { BOOST_STATIC_ASSERT( (is_same::value)); /*< that locks the same type >*/ BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/ return obj_; } template const T& get(nested_strict_lock& lk) const { BOOST_STATIC_ASSERT( (is_same::value)); /*< that locks the same type >*/ BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/ return obj_; } /** * Requires: The lk parameter must be locking the associated mtx. * Returns: The address of the cloaked object.. * * Throws: lock_error if BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is not defined and the lk parameter doesn't satisfy the preconditions */ template T& get(Lock& lk) { BOOST_CONCEPT_ASSERT(( StrictLock )); BOOST_STATIC_ASSERT( (is_strict_lock::value)); /*< lk is a strict lock "sur parolle" >*/ BOOST_STATIC_ASSERT( (is_same::value)); /*< that locks the same type >*/ BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/ return obj_; } mutex_type* mutex() const BOOST_NOEXCEPT { return mtx_; } // modifiers void lock() { mtx_->lock(); } void unlock() { mtx_->unlock(); } bool try_lock() { return mtx_->try_lock(); } // todo add time related functions private: T obj_; mutex_type* mtx_; }; //] /** * externally_locked specialization for T& that cloaks an reference to an object of type T, and actually * provides full access to that object through the get and set member functions, provided you * pass a reference to a strict lock object. */ //[externally_locked_ref template class externally_locked { //BOOST_CONCEPT_ASSERT(( CopyConstructible )); BOOST_CONCEPT_ASSERT(( BasicLockable )); public: typedef MutexType mutex_type; BOOST_THREAD_COPYABLE_AND_MOVABLE( externally_locked ) /** * Effects: Constructs an externally locked object storing the cloaked reference object. */ externally_locked(T& obj, mutex_type& mtx) BOOST_NOEXCEPT : obj_(&obj), mtx_(&mtx) { } /// copy constructor externally_locked(externally_locked const& rhs) BOOST_NOEXCEPT : obj_(rhs.obj_), mtx_(rhs.mtx_) { } /// move constructor externally_locked(BOOST_THREAD_RV_REF(externally_locked) rhs) BOOST_NOEXCEPT : obj_(rhs.obj_), mtx_(rhs.mtx_) { } /// assignment externally_locked& operator=(externally_locked const& rhs) BOOST_NOEXCEPT { obj_=rhs.obj_; mtx_=rhs.mtx_; return *this; } /// move assignment externally_locked& operator=(BOOST_THREAD_RV_REF(externally_locked) rhs) BOOST_NOEXCEPT { obj_=rhs.obj_; mtx_=rhs.mtx_; return *this; } void swap(externally_locked& rhs) BOOST_NOEXCEPT { swap(obj_, rhs.obj_); swap(mtx_, rhs.mtx_); } /** * Requires: The lk parameter must be locking the associated mtx. * * Returns: The address of the cloaked object.. * * Throws: lock_error if BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is not defined and the lk parameter doesn't satisfy the preconditions */ T& get(strict_lock const& lk) { BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/ return *obj_; } const T& get(strict_lock const& lk) const { BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/ return *obj_; } template T& get(nested_strict_lock const& lk) { BOOST_STATIC_ASSERT( (is_same::value)); /*< that locks the same type >*/ BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/ return *obj_; } template const T& get(nested_strict_lock const& lk) const { BOOST_STATIC_ASSERT( (is_same::value)); /*< that locks the same type >*/ BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/ return *obj_; } /** * Requires: The lk parameter must be locking the associated mtx. * Returns: The address of the cloaked object.. * * Throws: lock_error if BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is not defined and the lk parameter doesn't satisfy the preconditions */ template T& get(Lock const& lk) { BOOST_CONCEPT_ASSERT(( StrictLock )); BOOST_STATIC_ASSERT( (is_strict_lock::value)); /*< lk is a strict lock "sur parolle" >*/ BOOST_STATIC_ASSERT( (is_same::value)); /*< that locks the same type >*/ BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/ return *obj_; } /** * Requires: The lk parameter must be locking the associated mtx. * Returns: The address of the cloaked object.. * * Throws: lock_error if BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is not defined and the lk parameter doesn't satisfy the preconditions */ template T const& get(Lock const& lk) const { BOOST_CONCEPT_ASSERT(( StrictLock )); BOOST_STATIC_ASSERT( (is_strict_lock::value)); /*< lk is a strict lock "sur parolle" >*/ BOOST_STATIC_ASSERT( (is_same::value)); /*< that locks the same type >*/ BOOST_THREAD_ASSERT_PRECONDITION( lk.owns_lock(mtx_), lock_error() ); /*< run time check throw if not locks the same >*/ return *obj_; } mutex_type* mutex() const BOOST_NOEXCEPT { return mtx_; } void lock() { mtx_->lock(); } void unlock() { mtx_->unlock(); } bool try_lock() { return mtx_->try_lock(); } // todo add time related functions protected: T* obj_; mutex_type* mtx_; }; //] template void swap(externally_locked & lhs, externally_locked & rhs) // BOOST_NOEXCEPT { lhs.swap(rhs); } } #include #endif // header passenger-4.0.37/ext/boost/thread/externally_locked_stream.hpp000644 000765 000024 00000011260 12233035540 025205 0ustar00honglistaff000000 000000 // (C) Copyright 2012 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_EXTERNALLY_LOCKED_STREAM_HPP #define BOOST_THREAD_EXTERNALLY_LOCKED_STREAM_HPP #include #include #include #include #include #include #include #include namespace boost { template class externally_locked_stream; template class stream_guard { friend class externally_locked_stream ; public: typedef typename externally_locked_stream::mutex_type mutex_type; BOOST_THREAD_MOVABLE_ONLY( stream_guard) stream_guard(externally_locked_stream& mtx) : mtx_(&mtx) { mtx.lock(); } stream_guard(externally_locked_stream& mtx, adopt_lock_t) : mtx_(&mtx) { } stream_guard(BOOST_THREAD_RV_REF(stream_guard) rhs) BOOST_NOEXCEPT : mtx_(rhs.mtx_) { rhs.mtx_= 0; } ~stream_guard() { if (mtx_ != 0) mtx_->unlock(); } bool owns_lock(const mutex_type * l) const BOOST_NOEXCEPT { return l == mtx_->mutex(); } /** * @Requires mtx_ */ Stream& get() const { BOOST_THREAD_ASSERT_PRECONDITION( mtx_, lock_error() ); return mtx_->get(*this); } Stream& bypass() const { return get(); } private: externally_locked_stream* mtx_; }; template struct is_strict_lock_sur_parole > : true_type { }; /** * externally_locked_stream cloaks a reference to an stream of type Stream, and actually * provides full access to that object through the get and set member functions, provided you * pass a reference to a strict lock object. */ //[externally_locked_stream template class externally_locked_stream: public externally_locked { typedef externally_locked base_type; public: BOOST_THREAD_NO_COPYABLE( externally_locked_stream) /** * Effects: Constructs an externally locked object storing the cloaked reference object. */ externally_locked_stream(Stream& stream, RecursiveMutex& mtx) BOOST_NOEXCEPT : base_type(stream, mtx) { } stream_guard hold() BOOST_NOEXCEPT { return stream_guard (*this); } Stream& bypass() const { stream_guard lk(*this); return get(lk); } }; //] template inline const stream_guard& operator<<(const stream_guard& lck, T arg) { lck.get() << arg; return lck; } template inline const stream_guard& operator<<(const stream_guard& lck, Stream& (*arg)(Stream&)) { lck.get() << arg; return lck; } template inline const stream_guard& operator>>(const stream_guard& lck, T& arg) { lck.get() >> arg; return lck; } template inline stream_guard operator<<(externally_locked_stream& mtx, T arg) { stream_guard lk(mtx); mtx.get(lk) << arg; return boost::move(lk); } template inline stream_guard operator<<(externally_locked_stream& mtx, Stream& (*arg)(Stream&)) { stream_guard lk(mtx); mtx.get(lk) << arg; return boost::move(lk); } template inline stream_guard operator>>(externally_locked_stream& mtx, T& arg) { stream_guard lk(mtx); mtx.get(lk) >> arg; return boost::move(lk); } } #include #endif // header passenger-4.0.37/ext/boost/thread/future.hpp000644 000765 000024 00000357124 12233035540 021450 0ustar00honglistaff000000 000000 // (C) Copyright 2008-10 Anthony Williams // (C) Copyright 2011-2013 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_FUTURE_HPP #define BOOST_THREAD_FUTURE_HPP #include // boost::thread::future requires exception handling // due to boost::exception::exception_ptr dependency #ifndef BOOST_NO_EXCEPTIONS //#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef BOOST_THREAD_USES_CHRONO #include #endif #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS #include #endif #include #include #if defined BOOST_THREAD_PROVIDES_FUTURE #define BOOST_THREAD_FUTURE future #else #define BOOST_THREAD_FUTURE unique_future #endif namespace boost { //enum class launch BOOST_SCOPED_ENUM_DECLARE_BEGIN(launch) { none = 0, async = 1, deferred = 2, any = async | deferred } BOOST_SCOPED_ENUM_DECLARE_END(launch) //enum class future_status BOOST_SCOPED_ENUM_DECLARE_BEGIN(future_status) { ready, timeout, deferred } BOOST_SCOPED_ENUM_DECLARE_END(future_status) class BOOST_SYMBOL_VISIBLE future_error : public std::logic_error { system::error_code ec_; public: future_error(system::error_code ec) : logic_error(ec.message()), ec_(ec) { } const system::error_code& code() const BOOST_NOEXCEPT { return ec_; } }; class BOOST_SYMBOL_VISIBLE future_uninitialized: public future_error { public: future_uninitialized() : future_error(system::make_error_code(future_errc::no_state)) {} }; class BOOST_SYMBOL_VISIBLE broken_promise: public future_error { public: broken_promise(): future_error(system::make_error_code(future_errc::broken_promise)) {} }; class BOOST_SYMBOL_VISIBLE future_already_retrieved: public future_error { public: future_already_retrieved(): future_error(system::make_error_code(future_errc::future_already_retrieved)) {} }; class BOOST_SYMBOL_VISIBLE promise_already_satisfied: public future_error { public: promise_already_satisfied(): future_error(system::make_error_code(future_errc::promise_already_satisfied)) {} }; class BOOST_SYMBOL_VISIBLE task_already_started: public future_error { public: task_already_started(): future_error(system::make_error_code(future_errc::promise_already_satisfied)) {} }; class BOOST_SYMBOL_VISIBLE task_moved: public future_error { public: task_moved(): future_error(system::make_error_code(future_errc::no_state)) {} }; class promise_moved: public future_error { public: promise_moved(): future_error(system::make_error_code(future_errc::no_state)) {} }; namespace future_state { enum state { uninitialized, waiting, ready, moved, deferred }; } namespace detail { #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION template struct future_deferred_continuation; template struct future_async_continuation; #endif struct relocker { boost::unique_lock& lock_; bool unlocked_; relocker(boost::unique_lock& lk): lock_(lk) { lock_.unlock(); unlocked_=true; } ~relocker() { if (unlocked_) { lock_.lock(); } } void lock() { if (unlocked_) { lock_.lock(); unlocked_=false; } } private: relocker& operator=(relocker const&); }; struct future_object_base : enable_shared_from_this { boost::exception_ptr exception; bool done; bool is_deferred_; launch policy_; bool is_constructed; boost::mutex mutex; boost::condition_variable waiters; typedef std::list waiter_list; waiter_list external_waiters; boost::function callback; //#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS bool thread_was_interrupted; //#endif #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION typedef shared_ptr continuation_ptr_type; #else typedef shared_ptr continuation_ptr_type; #endif continuation_ptr_type continuation_ptr; //#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION virtual void launch_continuation(boost::unique_lock&) { } //#endif future_object_base(): done(false), is_deferred_(false), policy_(launch::none), is_constructed(false) // This declaration should be only included conditinally, but are included to maintain the same layout. //#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS , thread_was_interrupted(false) //#endif // This declaration should be only included conditinally, but are included to maintain the same layout. //#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION , continuation_ptr() //#endif {} virtual ~future_object_base() {} void set_deferred() { is_deferred_ = true; set_launch_policy(launch::deferred); } void set_async() { is_deferred_ = false; set_launch_policy(launch::async); } void set_launch_policy(launch policy) { policy_ = policy; } waiter_list::iterator register_external_waiter(boost::condition_variable_any& cv) { boost::unique_lock lock(mutex); do_callback(lock); return external_waiters.insert(external_waiters.end(),&cv); } void remove_external_waiter(waiter_list::iterator it) { boost::lock_guard lock(mutex); external_waiters.erase(it); } #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION void do_continuation(boost::unique_lock& lock) { if (continuation_ptr) { continuation_ptr->launch_continuation(lock); if (! lock.owns_lock()) lock.lock(); continuation_ptr.reset(); } } #else void do_continuation(boost::unique_lock&) { } #endif #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION void set_continuation_ptr(continuation_ptr_type continuation, boost::unique_lock& lock) { continuation_ptr= continuation; if (done) { do_continuation(lock); } } #endif void mark_finished_internal(boost::unique_lock& lock) { done=true; waiters.notify_all(); for(waiter_list::const_iterator it=external_waiters.begin(), end=external_waiters.end();it!=end;++it) { (*it)->notify_all(); } do_continuation(lock); } void make_ready() { boost::unique_lock lock(mutex); mark_finished_internal(lock); } void do_callback(boost::unique_lock& lock) { if(callback && !done) { boost::function local_callback=callback; relocker relock(lock); local_callback(); } } void wait_internal(boost::unique_lock &lock, bool rethrow=true) { do_callback(lock); //if (!done) // fixme why this doesn't work? { if (is_deferred_) { is_deferred_=false; execute(lock); //lock.unlock(); } else { while(!done) { waiters.wait(lock); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS if(rethrow && thread_was_interrupted) { throw boost::thread_interrupted(); } #endif if(rethrow && exception) { boost::rethrow_exception(exception); } } } } void wait(bool rethrow=true) { boost::unique_lock lock(mutex); wait_internal(lock, rethrow); } #if defined BOOST_THREAD_USES_DATETIME bool timed_wait_until(boost::system_time const& target_time) { boost::unique_lock lock(mutex); if (is_deferred_) return false; do_callback(lock); while(!done) { bool const success=waiters.timed_wait(lock,target_time); if(!success && !done) { return false; } } return true; } #endif #ifdef BOOST_THREAD_USES_CHRONO template future_status wait_until(const chrono::time_point& abs_time) { boost::unique_lock lock(mutex); if (is_deferred_) return future_status::deferred; do_callback(lock); while(!done) { cv_status const st=waiters.wait_until(lock,abs_time); if(st==cv_status::timeout && !done) { return future_status::timeout; } } return future_status::ready; } #endif void mark_exceptional_finish_internal(boost::exception_ptr const& e, boost::unique_lock& lock) { exception=e; mark_finished_internal(lock); } void mark_exceptional_finish() { boost::unique_lock lock(mutex); mark_exceptional_finish_internal(boost::current_exception(), lock); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS void mark_interrupted_finish() { boost::unique_lock lock(mutex); thread_was_interrupted=true; mark_finished_internal(lock); } void set_interrupted_at_thread_exit() { unique_lock lk(mutex); thread_was_interrupted=true; if (has_value(lk)) { throw_exception(promise_already_satisfied()); } get_current_thread_data()->make_ready_at_thread_exit(shared_from_this()); } #endif void set_exception_at_thread_exit(exception_ptr e) { unique_lock lk(mutex); if (has_value(lk)) { throw_exception(promise_already_satisfied()); } exception=e; this->is_constructed = true; get_current_thread_data()->make_ready_at_thread_exit(shared_from_this()); } bool has_value() { boost::lock_guard lock(mutex); return done && !(exception #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS || thread_was_interrupted #endif ); } bool has_value(unique_lock& ) { return done && !(exception #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS || thread_was_interrupted #endif ); } bool has_exception() { boost::lock_guard lock(mutex); return done && (exception #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS || thread_was_interrupted #endif ); } bool has_exception(unique_lock&) { return done && (exception #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS || thread_was_interrupted #endif ); } bool is_deferred() const BOOST_NOEXCEPT { return is_deferred_; } launch launch_policy() const BOOST_NOEXCEPT { return policy_; } template void set_wait_callback(F f,U* u) { boost::lock_guard lock(mutex); callback=boost::bind(f,boost::ref(*u)); } virtual void execute(boost::unique_lock&) {} private: future_object_base(future_object_base const&); future_object_base& operator=(future_object_base const&); }; template struct future_traits { typedef boost::scoped_ptr storage_type; struct dummy; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES typedef T const& source_reference_type; //typedef typename boost::mpl::if_,dummy&,BOOST_THREAD_RV_REF(T)>::type rvalue_source_type; typedef BOOST_THREAD_RV_REF(T) rvalue_source_type; //typedef typename boost::mpl::if_,T,BOOST_THREAD_RV_REF(T)>::type move_dest_type; typedef T move_dest_type; #elif defined BOOST_THREAD_USES_MOVE typedef typename boost::mpl::if_c::value,T,T&>::type source_reference_type; //typedef typename boost::mpl::if_c::value,T,BOOST_THREAD_RV_REF(T)>::type rvalue_source_type; //typedef typename boost::mpl::if_c::value,BOOST_THREAD_RV_REF(T),T>::type move_dest_type; typedef BOOST_THREAD_RV_REF(T) rvalue_source_type; typedef T move_dest_type; #else typedef T& source_reference_type; typedef typename boost::mpl::if_,BOOST_THREAD_RV_REF(T),T const&>::type rvalue_source_type; typedef typename boost::mpl::if_,BOOST_THREAD_RV_REF(T),T>::type move_dest_type; #endif typedef const T& shared_future_get_result_type; static void init(storage_type& storage,source_reference_type t) { storage.reset(new T(t)); } static void init(storage_type& storage,rvalue_source_type t) { #if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES storage.reset(new T(boost::forward(t))); #else storage.reset(new T(static_cast(t))); #endif } static void cleanup(storage_type& storage) { storage.reset(); } }; template struct future_traits { typedef T* storage_type; typedef T& source_reference_type; //struct rvalue_source_type //{}; typedef T& move_dest_type; typedef T& shared_future_get_result_type; static void init(storage_type& storage,T& t) { storage=&t; } static void cleanup(storage_type& storage) { storage=0; } }; template<> struct future_traits { typedef bool storage_type; typedef void move_dest_type; typedef void shared_future_get_result_type; static void init(storage_type& storage) { storage=true; } static void cleanup(storage_type& storage) { storage=false; } }; // Used to create stand-alone futures template struct future_object: detail::future_object_base { typedef typename future_traits::storage_type storage_type; typedef typename future_traits::source_reference_type source_reference_type; typedef typename future_traits::rvalue_source_type rvalue_source_type; typedef typename future_traits::move_dest_type move_dest_type; typedef typename future_traits::shared_future_get_result_type shared_future_get_result_type; storage_type result; future_object(): result(0) {} ~future_object() {} void mark_finished_with_result_internal(source_reference_type result_, boost::unique_lock& lock) { future_traits::init(result,result_); this->mark_finished_internal(lock); } void mark_finished_with_result_internal(rvalue_source_type result_, boost::unique_lock& lock) { #if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES future_traits::init(result,boost::forward(result_)); #else future_traits::init(result,static_cast(result_)); #endif this->mark_finished_internal(lock); } void mark_finished_with_result(source_reference_type result_) { boost::unique_lock lock(mutex); this->mark_finished_with_result_internal(result_, lock); } void mark_finished_with_result(rvalue_source_type result_) { boost::unique_lock lock(mutex); #if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES mark_finished_with_result_internal(boost::forward(result_), lock); #else mark_finished_with_result_internal(static_cast(result_), lock); #endif } virtual move_dest_type get() { wait(); return boost::move(*result); } shared_future_get_result_type get_sh() { wait(); return *result; } // todo move this to detail::future_object_base future_state::state get_state() { boost::lock_guard guard(mutex); if(!done) { return future_state::waiting; } else { return future_state::ready; } } //void set_value_at_thread_exit(const T & result_) void set_value_at_thread_exit(source_reference_type result_) { unique_lock lk(this->mutex); if (this->has_value(lk)) { throw_exception(promise_already_satisfied()); } //future_traits::init(result,result_); result.reset(new T(result_)); this->is_constructed = true; get_current_thread_data()->make_ready_at_thread_exit(shared_from_this()); } //void set_value_at_thread_exit(BOOST_THREAD_RV_REF(T) result_) void set_value_at_thread_exit(rvalue_source_type result_) { unique_lock lk(this->mutex); if (this->has_value(lk)) throw_exception(promise_already_satisfied()); result.reset(new T(boost::move(result_))); //future_traits::init(result,static_cast(result_)); this->is_constructed = true; get_current_thread_data()->make_ready_at_thread_exit(shared_from_this()); } private: future_object(future_object const&); future_object& operator=(future_object const&); }; template struct future_object: detail::future_object_base { typedef typename future_traits::storage_type storage_type; typedef typename future_traits::source_reference_type source_reference_type; //typedef typename future_traits::rvalue_source_type rvalue_source_type; typedef typename future_traits::move_dest_type move_dest_type; typedef typename future_traits::shared_future_get_result_type shared_future_get_result_type; T* result; future_object(): result(0) {} ~future_object() { } void mark_finished_with_result_internal(source_reference_type result_, boost::unique_lock& lock) { //future_traits::init(result,result_); result= &result_; mark_finished_internal(lock); } // void mark_finished_with_result_internal(rvalue_source_type result_, boost::unique_lock& lock) // { // future_traits::init(result,static_cast(result_)); // mark_finished_internal(lock); // } void mark_finished_with_result(source_reference_type result_) { boost::unique_lock lock(mutex); mark_finished_with_result_internal(result_, lock); } // void mark_finished_with_result(rvalue_source_type result_) // { // boost::unique_lock lock(mutex); // mark_finished_with_result_internal(static_cast(result_), lock); // } T& get() { wait(); //return static_cast(*result); return *result; } T& get_sh() { wait(); //return static_cast(*result); return *result; } // todo move this to detail::future_object_base future_state::state get_state() { boost::lock_guard guard(mutex); if(!done) { return future_state::waiting; } else { return future_state::ready; } } void set_value_at_thread_exit(T& result_) { unique_lock lk(this->mutex); if (this->has_value(lk)) throw_exception(promise_already_satisfied()); //future_traits::init(result,result_); result= &result_; this->is_constructed = true; get_current_thread_data()->make_ready_at_thread_exit(shared_from_this()); } // void set_value_at_thread_exit(rvalue_source_type result_) // { // unique_lock lk(this->mutex); // if (this->has_value()) // throw_exception(promise_already_satisfied()); // future_traits::init(result,static_cast(result_)); // this->is_constructed = true; // get_current_thread_data()->make_ready_at_thread_exit(shared_from_this()); // } private: future_object(future_object const&); future_object& operator=(future_object const&); }; template<> struct future_object: detail::future_object_base { typedef void shared_future_get_result_type; future_object() {} void mark_finished_with_result_internal(boost::unique_lock& lock) { mark_finished_internal(lock); } void mark_finished_with_result() { boost::unique_lock lock(mutex); mark_finished_with_result_internal(lock); } void get() { this->wait(); } void get_sh() { wait(); } // todo move this to detail::future_object_base future_state::state get_state() { boost::lock_guard guard(mutex); if(!done) { return future_state::waiting; } else { return future_state::ready; } } void set_value_at_thread_exit() { unique_lock lk(this->mutex); if (this->has_value(lk)) { throw_exception(promise_already_satisfied()); } this->is_constructed = true; get_current_thread_data()->make_ready_at_thread_exit(shared_from_this()); } private: future_object(future_object const&); future_object& operator=(future_object const&); }; ///////////////////////// /// future_async_object ///////////////////////// template struct future_async_object: future_object { typedef future_object base_type; typedef typename base_type::move_dest_type move_dest_type; boost::thread thr_; public: explicit future_async_object(BOOST_THREAD_FWD_REF(Fp) f) : thr_(&future_async_object::run, this, boost::forward(f)) { this->set_async(); } ~future_async_object() { if (thr_.joinable()) thr_.join(); } move_dest_type get() { if (thr_.joinable()) thr_.join(); // fixme Is the lock needed during the whole scope? //this->wait(); boost::unique_lock lock(this->mutex); this->wait_internal(lock); //return static_cast(*(this->result)); //return boost::move(*(this->result)); return boost::move(*(this->result)); } static void run(future_async_object* that, BOOST_THREAD_FWD_REF(Fp) f) { try { that->mark_finished_with_result(f()); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { that->mark_interrupted_finish(); } #endif catch(...) { that->mark_exceptional_finish(); } } }; template struct future_async_object: public future_object { typedef future_object base_type; boost::thread thr_; public: explicit future_async_object(BOOST_THREAD_FWD_REF(Fp) f) : thr_(&future_async_object::run, this, boost::forward(f)) { this->set_async(); } ~future_async_object() { if (thr_.joinable()) thr_.join(); } static void run(future_async_object* that, BOOST_THREAD_FWD_REF(Fp) f) { try { f(); that->mark_finished_with_result(); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { that->mark_interrupted_finish(); } #endif catch(...) { that->mark_exceptional_finish(); } } }; template struct future_async_object: future_object { typedef future_object base_type; typedef typename base_type::move_dest_type move_dest_type; boost::thread thr_; public: explicit future_async_object(BOOST_THREAD_FWD_REF(Fp) f) : thr_(&future_async_object::run, this, boost::forward(f)) { this->set_async(); } ~future_async_object() { if (thr_.joinable()) thr_.join(); } move_dest_type get() { if (thr_.joinable()) thr_.join(); // fixme Is the lock needed during the whole scope? //this->wait(); boost::unique_lock lock(this->mutex); this->wait_internal(lock); //return static_cast(*(this->result)); return boost::move(*(this->result)); } static void run(future_async_object* that, BOOST_THREAD_FWD_REF(Fp) f) { try { that->mark_finished_with_result(f()); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { that->mark_interrupted_finish(); } #endif catch(...) { that->mark_exceptional_finish(); } } }; ////////////////////////// /// future_deferred_object ////////////////////////// template struct future_deferred_object: future_object { typedef future_object base_type; Fp func_; public: explicit future_deferred_object(BOOST_THREAD_FWD_REF(Fp) f) : func_(boost::forward(f)) { this->set_deferred(); } virtual void execute(boost::unique_lock& lck) { try { this->mark_finished_with_result_internal(func_(), lck); } catch (...) { this->mark_exceptional_finish_internal(current_exception(), lck); } } }; template struct future_deferred_object: future_object { typedef future_object base_type; Fp func_; public: explicit future_deferred_object(BOOST_THREAD_FWD_REF(Fp) f) : func_(boost::forward(f)) { this->set_deferred(); } virtual void execute(boost::unique_lock& lck) { try { this->mark_finished_with_result_internal(func_(), lck); } catch (...) { this->mark_exceptional_finish_internal(current_exception(), lck); } } }; template struct future_deferred_object: future_object { typedef future_object base_type; Fp func_; public: explicit future_deferred_object(BOOST_THREAD_FWD_REF(Fp) f) : func_(boost::forward(f)) { this->set_deferred(); } virtual void execute(boost::unique_lock& lck) { try { func_(); this->mark_finished_with_result_internal(lck); } catch (...) { this->mark_exceptional_finish_internal(current_exception(), lck); } } }; // template // struct future_object_alloc: public future_object // { // typedef future_object base; // Allocator alloc_; // // public: // explicit future_object_alloc(const Allocator& a) // : alloc_(a) {} // // }; class future_waiter { struct registered_waiter; typedef std::vector::size_type count_type; struct registered_waiter { boost::shared_ptr future_; detail::future_object_base::waiter_list::iterator wait_iterator; count_type index; registered_waiter(boost::shared_ptr const& a_future, detail::future_object_base::waiter_list::iterator wait_iterator_, count_type index_): future_(a_future),wait_iterator(wait_iterator_),index(index_) {} }; struct all_futures_lock { #ifdef _MANAGED typedef std::ptrdiff_t count_type_portable; #else typedef count_type count_type_portable; #endif count_type_portable count; boost::scoped_array > locks; all_futures_lock(std::vector& futures): count(futures.size()),locks(new boost::unique_lock[count]) { for(count_type_portable i=0;i(futures[i].future_->mutex).move(); #else locks[i]=boost::unique_lock(futures[i].future_->mutex); // TODO shouldn't be moved explicitly #endif } } void lock() { boost::lock(locks.get(),locks.get()+count); } void unlock() { for(count_type_portable i=0;i futures; count_type future_count; public: future_waiter(): future_count(0) {} template void add(F& f) { if(f.future_) { futures.push_back(registered_waiter(f.future_,f.future_->register_external_waiter(cv),future_count)); } ++future_count; } count_type wait() { all_futures_lock lk(futures); for(;;) { for(count_type i=0;idone) { return futures[i].index; } } cv.wait(lk); } } ~future_waiter() { for(count_type i=0;iremove_external_waiter(futures[i].wait_iterator); } } }; } template class BOOST_THREAD_FUTURE; template class shared_future; template struct is_future_type { BOOST_STATIC_CONSTANT(bool, value=false); }; template struct is_future_type > { BOOST_STATIC_CONSTANT(bool, value=true); }; template struct is_future_type > { BOOST_STATIC_CONSTANT(bool, value=true); }; template typename boost::disable_if,void>::type wait_for_all(Iterator begin,Iterator end) { for(Iterator current=begin;current!=end;++current) { current->wait(); } } template typename boost::enable_if,void>::type wait_for_all(F1& f1,F2& f2) { f1.wait(); f2.wait(); } template void wait_for_all(F1& f1,F2& f2,F3& f3) { f1.wait(); f2.wait(); f3.wait(); } template void wait_for_all(F1& f1,F2& f2,F3& f3,F4& f4) { f1.wait(); f2.wait(); f3.wait(); f4.wait(); } template void wait_for_all(F1& f1,F2& f2,F3& f3,F4& f4,F5& f5) { f1.wait(); f2.wait(); f3.wait(); f4.wait(); f5.wait(); } template typename boost::disable_if,Iterator>::type wait_for_any(Iterator begin,Iterator end) { if(begin==end) return end; detail::future_waiter waiter; for(Iterator current=begin;current!=end;++current) { waiter.add(*current); } return boost::next(begin,waiter.wait()); } template typename boost::enable_if,unsigned>::type wait_for_any(F1& f1,F2& f2) { detail::future_waiter waiter; waiter.add(f1); waiter.add(f2); return waiter.wait(); } template unsigned wait_for_any(F1& f1,F2& f2,F3& f3) { detail::future_waiter waiter; waiter.add(f1); waiter.add(f2); waiter.add(f3); return waiter.wait(); } template unsigned wait_for_any(F1& f1,F2& f2,F3& f3,F4& f4) { detail::future_waiter waiter; waiter.add(f1); waiter.add(f2); waiter.add(f3); waiter.add(f4); return waiter.wait(); } template unsigned wait_for_any(F1& f1,F2& f2,F3& f3,F4& f4,F5& f5) { detail::future_waiter waiter; waiter.add(f1); waiter.add(f2); waiter.add(f3); waiter.add(f4); waiter.add(f5); return waiter.wait(); } template class promise; template class packaged_task; namespace detail { /// Common implementation for all the futures independently of the return type class base_future { //BOOST_THREAD_MOVABLE(base_future) }; /// Common implementation for future and shared_future. template class basic_future : public base_future { protected: typedef boost::shared_ptr > future_ptr; future_ptr future_; basic_future(future_ptr a_future): future_(a_future) { } // Copy construction from a shared_future explicit basic_future(const shared_future&) BOOST_NOEXCEPT; public: typedef future_state::state state; BOOST_THREAD_MOVABLE(basic_future) basic_future(): future_() {} ~basic_future() {} basic_future(BOOST_THREAD_RV_REF(basic_future) other) BOOST_NOEXCEPT: future_(BOOST_THREAD_RV(other).future_) { BOOST_THREAD_RV(other).future_.reset(); } basic_future& operator=(BOOST_THREAD_RV_REF(basic_future) other) BOOST_NOEXCEPT { future_=BOOST_THREAD_RV(other).future_; BOOST_THREAD_RV(other).future_.reset(); return *this; } void swap(basic_future& that) BOOST_NOEXCEPT { future_.swap(that.future_); } // functions to check state, and wait for ready state get_state() const BOOST_NOEXCEPT { if(!future_) { return future_state::uninitialized; } return future_->get_state(); } bool is_ready() const BOOST_NOEXCEPT { return get_state()==future_state::ready; } bool has_exception() const BOOST_NOEXCEPT { return future_ && future_->has_exception(); } bool has_value() const BOOST_NOEXCEPT { return future_ && future_->has_value(); } launch launch_policy() const BOOST_NOEXCEPT { if ( future_ ) return future_->launch_policy(); else return launch(launch::none); } bool valid() const BOOST_NOEXCEPT { return future_ != 0; } void wait() const { if(!future_) { boost::throw_exception(future_uninitialized()); } future_->wait(false); } #if defined BOOST_THREAD_USES_DATETIME template bool timed_wait(Duration const& rel_time) const { return timed_wait_until(boost::get_system_time()+rel_time); } bool timed_wait_until(boost::system_time const& abs_time) const { if(!future_) { boost::throw_exception(future_uninitialized()); } return future_->timed_wait_until(abs_time); } #endif #ifdef BOOST_THREAD_USES_CHRONO template future_status wait_for(const chrono::duration& rel_time) const { return wait_until(chrono::steady_clock::now() + rel_time); } template future_status wait_until(const chrono::time_point& abs_time) const { if(!future_) { boost::throw_exception(future_uninitialized()); } return future_->wait_until(abs_time); } #endif }; } // detail BOOST_THREAD_DCL_MOVABLE_BEG(R) detail::basic_future BOOST_THREAD_DCL_MOVABLE_END namespace detail { #if (!defined _MSC_VER || _MSC_VER >= 1400) // _MSC_VER == 1400 on MSVC 2005 template BOOST_THREAD_FUTURE make_future_async_object(BOOST_THREAD_FWD_REF(Fp) f); template BOOST_THREAD_FUTURE make_future_deferred_object(BOOST_THREAD_FWD_REF(Fp) f); #endif // #if (!defined _MSC_VER || _MSC_VER >= 1400) #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION template BOOST_THREAD_FUTURE make_future_async_continuation(boost::unique_lock &lock, F& f, BOOST_THREAD_FWD_REF(Fp) c); template BOOST_THREAD_FUTURE make_future_deferred_continuation(boost::unique_lock &lock, F& f, BOOST_THREAD_FWD_REF(Fp) c); #endif } template class BOOST_THREAD_FUTURE : public detail::basic_future { private: typedef detail::basic_future base_type; typedef typename base_type::future_ptr future_ptr; friend class shared_future; friend class promise; #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION template friend struct detail::future_async_continuation; template friend struct detail::future_deferred_continuation; #endif #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK template friend class packaged_task; // todo check if this works in windows #else friend class packaged_task; #endif friend class detail::future_waiter; template friend BOOST_THREAD_FUTURE detail::make_future_async_object(BOOST_THREAD_FWD_REF(Fp) f); template friend BOOST_THREAD_FUTURE detail::make_future_deferred_object(BOOST_THREAD_FWD_REF(Fp) f); #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION template friend BOOST_THREAD_FUTURE detail::make_future_async_continuation(boost::unique_lock &lock, F& f, BOOST_THREAD_FWD_REF(Fp) c); template friend BOOST_THREAD_FUTURE detail::make_future_deferred_continuation(boost::unique_lock &lock, F& f, BOOST_THREAD_FWD_REF(Fp) c); #endif typedef typename detail::future_traits::move_dest_type move_dest_type; BOOST_THREAD_FUTURE(future_ptr a_future): base_type(a_future) { } public: BOOST_THREAD_MOVABLE_ONLY(BOOST_THREAD_FUTURE) typedef future_state::state state; BOOST_CONSTEXPR BOOST_THREAD_FUTURE() {} ~BOOST_THREAD_FUTURE() {} BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE) other) BOOST_NOEXCEPT: base_type(boost::move(static_cast(BOOST_THREAD_RV(other)))) { } BOOST_THREAD_FUTURE& operator=(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE) other) BOOST_NOEXCEPT { this->base_type::operator=(boost::move(static_cast(BOOST_THREAD_RV(other)))); return *this; } shared_future share() { return shared_future(::boost::move(*this)); } void swap(BOOST_THREAD_FUTURE& other) { static_cast(this)->swap(other); } // todo this functioˆn must be private and friendship provided to the internal users. void set_async() { this->future_->set_async(); } // todo this functioˆn must be private and friendship provided to the internal users. void set_deferred() { this->future_->set_deferred(); } // retrieving the value move_dest_type get() { if(!this->future_) { boost::throw_exception(future_uninitialized()); } #ifdef BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET future_ptr fut_=this->future_; this->future_.reset(); return fut_->get(); #else return this->future_->get(); #endif } #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION // template // auto then(F&& func) -> BOOST_THREAD_FUTURE; //#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR) // template // inline BOOST_THREAD_FUTURE then(RF(*func)(BOOST_THREAD_FUTURE&)); // template // inline BOOST_THREAD_FUTURE then(launch policy, RF(*func)(BOOST_THREAD_FUTURE&)); //#endif template inline BOOST_THREAD_FUTURE::type> then(BOOST_THREAD_FWD_REF(F) func); template inline BOOST_THREAD_FUTURE::type> then(launch policy, BOOST_THREAD_FWD_REF(F) func); #endif }; BOOST_THREAD_DCL_MOVABLE_BEG(T) BOOST_THREAD_FUTURE BOOST_THREAD_DCL_MOVABLE_END template class shared_future : public detail::basic_future { typedef detail::basic_future base_type; typedef typename base_type::future_ptr future_ptr; friend class detail::future_waiter; friend class promise; #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK template friend class packaged_task;// todo check if this works in windows #else friend class packaged_task; #endif shared_future(future_ptr a_future): base_type(a_future) {} public: BOOST_THREAD_MOVABLE(shared_future) shared_future(shared_future const& other): base_type(other) {} typedef future_state::state state; BOOST_CONSTEXPR shared_future() {} ~shared_future() {} shared_future& operator=(shared_future const& other) { shared_future(other).swap(*this); return *this; } shared_future(BOOST_THREAD_RV_REF(shared_future) other) BOOST_NOEXCEPT : base_type(boost::move(static_cast(BOOST_THREAD_RV(other)))) { BOOST_THREAD_RV(other).future_.reset(); } shared_future(BOOST_THREAD_RV_REF( BOOST_THREAD_FUTURE ) other) BOOST_NOEXCEPT : base_type(boost::move(static_cast(BOOST_THREAD_RV(other)))) { } shared_future& operator=(BOOST_THREAD_RV_REF(shared_future) other) BOOST_NOEXCEPT { base_type::operator=(boost::move(static_cast(BOOST_THREAD_RV(other)))); return *this; } shared_future& operator=(BOOST_THREAD_RV_REF( BOOST_THREAD_FUTURE ) other) BOOST_NOEXCEPT { base_type::operator=(boost::move(static_cast(BOOST_THREAD_RV(other)))); //shared_future(boost::move(other)).swap(*this); //this->future_.swap(BOOST_THREAD_RV(other).future_); //BOOST_THREAD_RV(other).future_.reset(); return *this; } void swap(shared_future& other) BOOST_NOEXCEPT { static_cast(this)->swap(other); } // retrieving the value typename detail::future_object::shared_future_get_result_type get() { if(!this->future_) { boost::throw_exception(future_uninitialized()); } return this->future_->get_sh(); } }; BOOST_THREAD_DCL_MOVABLE_BEG(T) shared_future BOOST_THREAD_DCL_MOVABLE_END namespace detail { /// Copy construction from a shared_future template inline basic_future::basic_future(const shared_future& other) BOOST_NOEXCEPT : future_(other.future_) { } } template class promise { typedef boost::shared_ptr > future_ptr; future_ptr future_; bool future_obtained; void lazy_init() { #if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY #include if(!atomic_load(&future_)) { future_ptr blank; atomic_compare_exchange(&future_,&blank,future_ptr(new detail::future_object)); } #include #endif } public: BOOST_THREAD_MOVABLE_ONLY(promise) #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS template promise(boost::allocator_arg_t, Allocator a) { typedef typename Allocator::template rebind >::other A2; A2 a2(a); typedef thread_detail::allocator_destructor D; future_ = future_ptr(::new(a2.allocate(1)) detail::future_object(), D(a2, 1) ); future_obtained = false; } #endif promise(): #if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY future_(), #else future_(new detail::future_object()), #endif future_obtained(false) {} ~promise() { if(future_) { boost::unique_lock lock(future_->mutex); if(!future_->done && !future_->is_constructed) { future_->mark_exceptional_finish_internal(boost::copy_exception(broken_promise()), lock); } } } // Assignment promise(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT : future_(BOOST_THREAD_RV(rhs).future_),future_obtained(BOOST_THREAD_RV(rhs).future_obtained) { BOOST_THREAD_RV(rhs).future_.reset(); BOOST_THREAD_RV(rhs).future_obtained=false; } promise & operator=(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT { future_=BOOST_THREAD_RV(rhs).future_; future_obtained=BOOST_THREAD_RV(rhs).future_obtained; BOOST_THREAD_RV(rhs).future_.reset(); BOOST_THREAD_RV(rhs).future_obtained=false; return *this; } void swap(promise& other) { future_.swap(other.future_); std::swap(future_obtained,other.future_obtained); } // Result retrieval BOOST_THREAD_FUTURE get_future() { lazy_init(); if (future_.get()==0) { boost::throw_exception(promise_moved()); } if (future_obtained) { boost::throw_exception(future_already_retrieved()); } future_obtained=true; return BOOST_THREAD_FUTURE(future_); } void set_value(typename detail::future_traits::source_reference_type r) { lazy_init(); boost::unique_lock lock(future_->mutex); if(future_->done) { boost::throw_exception(promise_already_satisfied()); } future_->mark_finished_with_result_internal(r, lock); } // void set_value(R && r); void set_value(typename detail::future_traits::rvalue_source_type r) { lazy_init(); boost::unique_lock lock(future_->mutex); if(future_->done) { boost::throw_exception(promise_already_satisfied()); } #if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES future_->mark_finished_with_result_internal(boost::forward(r), lock); #else future_->mark_finished_with_result_internal(static_cast::rvalue_source_type>(r), lock); #endif } void set_exception(boost::exception_ptr p) { lazy_init(); boost::unique_lock lock(future_->mutex); if(future_->done) { boost::throw_exception(promise_already_satisfied()); } future_->mark_exceptional_finish_internal(p, lock); } // setting the result with deferred notification void set_value_at_thread_exit(const R& r) { if (future_.get()==0) { boost::throw_exception(promise_moved()); } future_->set_value_at_thread_exit(r); } void set_value_at_thread_exit(BOOST_THREAD_RV_REF(R) r) { if (future_.get()==0) { boost::throw_exception(promise_moved()); } future_->set_value_at_thread_exit(boost::move(r)); } void set_exception_at_thread_exit(exception_ptr e) { if (future_.get()==0) { boost::throw_exception(promise_moved()); } future_->set_exception_at_thread_exit(e); } template void set_wait_callback(F f) { lazy_init(); future_->set_wait_callback(f,this); } }; template class promise { typedef boost::shared_ptr > future_ptr; future_ptr future_; bool future_obtained; void lazy_init() { #if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY #include if(!atomic_load(&future_)) { future_ptr blank; atomic_compare_exchange(&future_,&blank,future_ptr(new detail::future_object)); } #include #endif } public: BOOST_THREAD_MOVABLE_ONLY(promise) #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS template promise(boost::allocator_arg_t, Allocator a) { typedef typename Allocator::template rebind >::other A2; A2 a2(a); typedef thread_detail::allocator_destructor D; future_ = future_ptr(::new(a2.allocate(1)) detail::future_object(), D(a2, 1) ); future_obtained = false; } #endif promise(): #if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY future_(), #else future_(new detail::future_object()), #endif future_obtained(false) {} ~promise() { if(future_) { boost::unique_lock lock(future_->mutex); if(!future_->done && !future_->is_constructed) { future_->mark_exceptional_finish_internal(boost::copy_exception(broken_promise()), lock); } } } // Assignment promise(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT : future_(BOOST_THREAD_RV(rhs).future_),future_obtained(BOOST_THREAD_RV(rhs).future_obtained) { BOOST_THREAD_RV(rhs).future_.reset(); BOOST_THREAD_RV(rhs).future_obtained=false; } promise & operator=(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT { future_=BOOST_THREAD_RV(rhs).future_; future_obtained=BOOST_THREAD_RV(rhs).future_obtained; BOOST_THREAD_RV(rhs).future_.reset(); BOOST_THREAD_RV(rhs).future_obtained=false; return *this; } void swap(promise& other) { future_.swap(other.future_); std::swap(future_obtained,other.future_obtained); } // Result retrieval BOOST_THREAD_FUTURE get_future() { lazy_init(); if (future_.get()==0) { boost::throw_exception(promise_moved()); } if (future_obtained) { boost::throw_exception(future_already_retrieved()); } future_obtained=true; return BOOST_THREAD_FUTURE(future_); } void set_value(R& r) { lazy_init(); boost::unique_lock lock(future_->mutex); if(future_->done) { boost::throw_exception(promise_already_satisfied()); } future_->mark_finished_with_result_internal(r, lock); } void set_exception(boost::exception_ptr p) { lazy_init(); boost::unique_lock lock(future_->mutex); if(future_->done) { boost::throw_exception(promise_already_satisfied()); } future_->mark_exceptional_finish_internal(p, lock); } // setting the result with deferred notification void set_value_at_thread_exit(R& r) { if (future_.get()==0) { boost::throw_exception(promise_moved()); } future_->set_value_at_thread_exit(r); } void set_exception_at_thread_exit(exception_ptr e) { if (future_.get()==0) { boost::throw_exception(promise_moved()); } future_->set_exception_at_thread_exit(e); } template void set_wait_callback(F f) { lazy_init(); future_->set_wait_callback(f,this); } }; template <> class promise { typedef boost::shared_ptr > future_ptr; future_ptr future_; bool future_obtained; void lazy_init() { #if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY if(!atomic_load(&future_)) { future_ptr blank; atomic_compare_exchange(&future_,&blank,future_ptr(new detail::future_object)); } #endif } public: BOOST_THREAD_MOVABLE_ONLY(promise) #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS template promise(boost::allocator_arg_t, Allocator a) { typedef typename Allocator::template rebind >::other A2; A2 a2(a); typedef thread_detail::allocator_destructor D; future_ = future_ptr(::new(a2.allocate(1)) detail::future_object(), D(a2, 1) ); future_obtained = false; } #endif promise(): #if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY future_(), #else future_(new detail::future_object), #endif future_obtained(false) {} ~promise() { if(future_) { boost::unique_lock lock(future_->mutex); if(!future_->done && !future_->is_constructed) { future_->mark_exceptional_finish_internal(boost::copy_exception(broken_promise()), lock); } } } // Assignment promise(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT : future_(BOOST_THREAD_RV(rhs).future_),future_obtained(BOOST_THREAD_RV(rhs).future_obtained) { // we need to release the future as shared_ptr doesn't implements move semantics BOOST_THREAD_RV(rhs).future_.reset(); BOOST_THREAD_RV(rhs).future_obtained=false; } promise & operator=(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT { future_=BOOST_THREAD_RV(rhs).future_; future_obtained=BOOST_THREAD_RV(rhs).future_obtained; BOOST_THREAD_RV(rhs).future_.reset(); BOOST_THREAD_RV(rhs).future_obtained=false; return *this; } void swap(promise& other) { future_.swap(other.future_); std::swap(future_obtained,other.future_obtained); } // Result retrieval BOOST_THREAD_FUTURE get_future() { lazy_init(); if (future_.get()==0) { boost::throw_exception(promise_moved()); } if(future_obtained) { boost::throw_exception(future_already_retrieved()); } future_obtained=true; return BOOST_THREAD_FUTURE(future_); } void set_value() { lazy_init(); boost::unique_lock lock(future_->mutex); if(future_->done) { boost::throw_exception(promise_already_satisfied()); } future_->mark_finished_with_result_internal(lock); } void set_exception(boost::exception_ptr p) { lazy_init(); boost::unique_lock lock(future_->mutex); if(future_->done) { boost::throw_exception(promise_already_satisfied()); } future_->mark_exceptional_finish_internal(p,lock); } // setting the result with deferred notification void set_value_at_thread_exit() { if (future_.get()==0) { boost::throw_exception(promise_moved()); } future_->set_value_at_thread_exit(); } void set_exception_at_thread_exit(exception_ptr e) { if (future_.get()==0) { boost::throw_exception(promise_moved()); } future_->set_exception_at_thread_exit(e); } template void set_wait_callback(F f) { lazy_init(); future_->set_wait_callback(f,this); } }; #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS namespace container { template struct uses_allocator , Alloc> : true_type { }; } #endif BOOST_THREAD_DCL_MOVABLE_BEG(T) promise BOOST_THREAD_DCL_MOVABLE_END namespace detail { #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK template struct task_base; #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template struct task_base: #else template struct task_base: #endif #else template struct task_base: #endif detail::future_object { bool started; task_base(): started(false) {} void reset() { started=false; } #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) virtual void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args)=0; void run(BOOST_THREAD_RV_REF(ArgTypes) ... args) #else virtual void do_run()=0; void run() #endif { { boost::lock_guard lk(this->mutex); if(started) { boost::throw_exception(task_already_started()); } started=true; } #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) do_run(boost::forward(args)...); #else do_run(); #endif } #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) virtual void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args)=0; void apply(BOOST_THREAD_RV_REF(ArgTypes) ... args) #else virtual void do_apply()=0; void apply() #endif { { boost::lock_guard lk(this->mutex); if(started) { boost::throw_exception(task_already_started()); } started=true; } #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) do_apply(boost::forward(args)...); #else do_apply(); #endif } void owner_destroyed() { boost::unique_lock lk(this->mutex); if(!started) { started=true; this->mark_exceptional_finish_internal(boost::copy_exception(boost::broken_promise()), lk); } } }; #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK template struct task_object; #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template struct task_object: task_base #else template struct task_object: task_base #endif #else template struct task_object: task_base #endif { private: task_object(task_object&); public: F f; task_object(F const& f_): f(f_) {} task_object(BOOST_THREAD_RV_REF(F) f_): f(boost::move(f_)) {} #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args) { try { this->set_value_at_thread_exit(f(boost::forward(args)...)); } #else void do_apply() { try { this->set_value_at_thread_exit(f()); } #endif #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { this->set_interrupted_at_thread_exit(); } #endif catch(...) { this->set_exception_at_thread_exit(current_exception()); } } #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args) { try { this->mark_finished_with_result(f(boost::forward(args)...)); } #else void do_run() { try { #if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES R res((f())); this->mark_finished_with_result(boost::move(res)); #else this->mark_finished_with_result(f()); #endif } #endif #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { this->mark_interrupted_finish(); } #endif catch(...) { this->mark_exceptional_finish(); } } }; #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template struct task_object: task_base #else template struct task_object: task_base #endif #else template struct task_object: task_base #endif { private: task_object(task_object&); public: F f; task_object(F const& f_): f(f_) {} task_object(BOOST_THREAD_RV_REF(F) f_): f(boost::move(f_)) {} #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args) { try { this->set_value_at_thread_exit(f(boost::forward(args)...)); } #else void do_apply() { try { this->set_value_at_thread_exit(f()); } #endif #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { this->set_interrupted_at_thread_exit(); } #endif catch(...) { this->set_exception_at_thread_exit(current_exception()); } } #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args) { try { this->mark_finished_with_result(f(boost::forward(args)...)); } #else void do_run() { try { R& res((f())); this->mark_finished_with_result(res); } #endif #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { this->mark_interrupted_finish(); } #endif catch(...) { this->mark_exceptional_finish(); } } }; #if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR) #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template struct task_object: task_base #else template struct task_object: task_base #endif #else template struct task_object : task_base #endif { private: task_object(task_object&); public: R (*f)(); task_object(R (*f_)()): f(f_) {} #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args) { try { this->set_value_at_thread_exit(f(boost::forward(args)...)); } #else void do_apply() { try { R r((f())); this->set_value_at_thread_exit(boost::move(r)); } #endif #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { this->set_interrupted_at_thread_exit(); } #endif catch(...) { this->set_exception_at_thread_exit(current_exception()); } } #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args) { try { this->mark_finished_with_result(f(boost::forward(args)...)); } #else void do_run() { try { R res((f())); this->mark_finished_with_result(boost::move(res)); } #endif #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { this->mark_interrupted_finish(); } #endif catch(...) { this->mark_exceptional_finish(); } } }; #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template struct task_object: task_base #else template struct task_object: task_base #endif #else template struct task_object : task_base #endif { private: task_object(task_object&); public: R& (*f)(); task_object(R& (*f_)()): f(f_) {} #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args) { try { this->set_value_at_thread_exit(f(boost::forward(args)...)); } #else void do_apply() { try { this->set_value_at_thread_exit(f()); } #endif #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { this->set_interrupted_at_thread_exit(); } #endif catch(...) { this->set_exception_at_thread_exit(current_exception()); } } #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args) { try { this->mark_finished_with_result(f(boost::forward(args)...)); } #else void do_run() { try { this->mark_finished_with_result(f()); } #endif #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { this->mark_interrupted_finish(); } #endif catch(...) { this->mark_exceptional_finish(); } } }; #endif #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template struct task_object: task_base #else template struct task_object: task_base #endif #else template struct task_object: task_base #endif { private: task_object(task_object&); public: F f; task_object(F const& f_): f(f_) {} task_object(BOOST_THREAD_RV_REF(F) f_): f(boost::move(f_)) {} #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args) { try { f(boost::forward(args)...); #else void do_apply() { try { f(); #endif this->set_value_at_thread_exit(); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { this->set_interrupted_at_thread_exit(); } #endif catch(...) { this->set_exception_at_thread_exit(current_exception()); } } #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args) { try { f(boost::forward(args)...); #else void do_run() { try { f(); #endif this->mark_finished_with_result(); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { this->mark_interrupted_finish(); } #endif catch(...) { this->mark_exceptional_finish(); } } }; #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template struct task_object: task_base #else template<> struct task_object: task_base #endif #else template<> struct task_object: task_base #endif { private: task_object(task_object&); public: void (*f)(); task_object(void (*f_)()): f(f_) {} #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args) { try { f(boost::forward(args)...); #else void do_apply() { try { f(); #endif this->set_value_at_thread_exit(); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { this->set_interrupted_at_thread_exit(); } #endif catch(...) { this->set_exception_at_thread_exit(current_exception()); } } #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args) { try { f(boost::forward(args)...); #else void do_run() { try { f(); #endif this->mark_finished_with_result(); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { this->mark_interrupted_finish(); } #endif catch(...) { this->mark_exceptional_finish(); } } }; } #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template class packaged_task { typedef boost::shared_ptr > task_ptr; boost::shared_ptr > task; #else template class packaged_task { typedef boost::shared_ptr > task_ptr; boost::shared_ptr > task; #endif #else template class packaged_task { typedef boost::shared_ptr > task_ptr; boost::shared_ptr > task; #endif bool future_obtained; struct dummy; public: typedef R result_type; BOOST_THREAD_MOVABLE_ONLY(packaged_task) packaged_task(): future_obtained(false) {} // construction and destruction #if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR) #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) explicit packaged_task(R(*f)(), BOOST_THREAD_FWD_REF(ArgTypes)... args) { typedef R(*FR)(BOOST_THREAD_FWD_REF(ArgTypes)...); typedef detail::task_object task_object_type; task= task_ptr(new task_object_type(f, boost::forward(args)...)); future_obtained=false; } #else explicit packaged_task(R(*f)()) { typedef R(*FR)(); typedef detail::task_object task_object_type; task= task_ptr(new task_object_type(f)); future_obtained=false; } #endif #else explicit packaged_task(R(*f)()) { typedef R(*FR)(); typedef detail::task_object task_object_type; task= task_ptr(new task_object_type(f)); future_obtained=false; } #endif #endif #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template explicit packaged_task(BOOST_THREAD_FWD_REF(F) f , typename disable_if::type, packaged_task>, dummy* >::type=0 ) { typedef typename remove_cv::type>::type FR; #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) typedef detail::task_object task_object_type; #else typedef detail::task_object task_object_type; #endif #else typedef detail::task_object task_object_type; #endif task = task_ptr(new task_object_type(boost::forward(f))); future_obtained = false; } #else template explicit packaged_task(F const& f , typename disable_if::type, packaged_task>, dummy* >::type=0 ) { #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) typedef detail::task_object task_object_type; #else typedef detail::task_object task_object_type; #endif #else typedef detail::task_object task_object_type; #endif task = task_ptr(new task_object_type(f)); future_obtained=false; } template explicit packaged_task(BOOST_THREAD_RV_REF(F) f) { #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) typedef detail::task_object task_object_type; task = task_ptr(new task_object_type(boost::forward(f))); #else typedef detail::task_object task_object_type; task = task_ptr(new task_object_type(boost::move(f))); // TODO forward #endif #else typedef detail::task_object task_object_type; task = task_ptr(new task_object_type(boost::forward(f))); #endif future_obtained=false; } #endif #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS #if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR) template packaged_task(boost::allocator_arg_t, Allocator a, R(*f)()) { typedef R(*FR)(); #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) typedef detail::task_object task_object_type; #else typedef detail::task_object task_object_type; #endif #else typedef detail::task_object task_object_type; #endif typedef typename Allocator::template rebind::other A2; A2 a2(a); typedef thread_detail::allocator_destructor D; task = task_ptr(::new(a2.allocate(1)) task_object_type(f), D(a2, 1) ); future_obtained = false; } #endif // BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR #if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES template packaged_task(boost::allocator_arg_t, Allocator a, BOOST_THREAD_FWD_REF(F) f) { typedef typename remove_cv::type>::type FR; #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) typedef detail::task_object task_object_type; #else typedef detail::task_object task_object_type; #endif #else typedef detail::task_object task_object_type; #endif typedef typename Allocator::template rebind::other A2; A2 a2(a); typedef thread_detail::allocator_destructor D; task = task_ptr(::new(a2.allocate(1)) task_object_type(boost::forward(f)), D(a2, 1) ); future_obtained = false; } #else // ! defined BOOST_NO_CXX11_RVALUE_REFERENCES template packaged_task(boost::allocator_arg_t, Allocator a, const F& f) { #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) typedef detail::task_object task_object_type; #else typedef detail::task_object task_object_type; #endif #else typedef detail::task_object task_object_type; #endif typedef typename Allocator::template rebind::other A2; A2 a2(a); typedef thread_detail::allocator_destructor D; task = task_ptr(::new(a2.allocate(1)) task_object_type(f), D(a2, 1) ); future_obtained = false; } template packaged_task(boost::allocator_arg_t, Allocator a, BOOST_THREAD_RV_REF(F) f) { #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) typedef detail::task_object task_object_type; #else typedef detail::task_object task_object_type; #endif #else typedef detail::task_object task_object_type; #endif typedef typename Allocator::template rebind::other A2; A2 a2(a); typedef thread_detail::allocator_destructor D; #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) task = task_ptr(::new(a2.allocate(1)) task_object_type(boost::forward(f)), D(a2, 1) ); #else task = task_ptr(::new(a2.allocate(1)) task_object_type(boost::move(f)), D(a2, 1) ); // TODO forward #endif future_obtained = false; } #endif //BOOST_NO_CXX11_RVALUE_REFERENCES #endif // BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS ~packaged_task() { if(task) { task->owner_destroyed(); } } // assignment packaged_task(BOOST_THREAD_RV_REF(packaged_task) other) BOOST_NOEXCEPT : future_obtained(BOOST_THREAD_RV(other).future_obtained) { task.swap(BOOST_THREAD_RV(other).task); BOOST_THREAD_RV(other).future_obtained=false; } packaged_task& operator=(BOOST_THREAD_RV_REF(packaged_task) other) BOOST_NOEXCEPT { // todo use forward #if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES packaged_task temp(boost::move(other)); #else packaged_task temp(static_cast(other)); #endif swap(temp); return *this; } void reset() { if (!valid()) throw future_error(system::make_error_code(future_errc::no_state)); task->reset(); future_obtained=false; } void swap(packaged_task& other) BOOST_NOEXCEPT { task.swap(other.task); std::swap(future_obtained,other.future_obtained); } bool valid() const BOOST_NOEXCEPT { return task.get()!=0; } // result retrieval BOOST_THREAD_FUTURE get_future() { if(!task) { boost::throw_exception(task_moved()); } else if(!future_obtained) { future_obtained=true; return BOOST_THREAD_FUTURE(task); } else { boost::throw_exception(future_already_retrieved()); } //return BOOST_THREAD_FUTURE(); } // execution #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) void operator()(BOOST_THREAD_RV_REF(ArgTypes)... args) { if(!task) { boost::throw_exception(task_moved()); } task->run(boost::forward(args)...); } void make_ready_at_thread_exit(ArgTypes... args) { if(!task) { boost::throw_exception(task_moved()); } if (task->has_value()) { boost::throw_exception(promise_already_satisfied()); } task->apply(boost::forward(args)...); } #else void operator()() { if(!task) { boost::throw_exception(task_moved()); } task->run(); } void make_ready_at_thread_exit() { if(!task) { boost::throw_exception(task_moved()); } if (task->has_value()) boost::throw_exception(promise_already_satisfied()); task->apply(); } #endif template void set_wait_callback(F f) { task->set_wait_callback(f,this); } }; #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS namespace container { template struct uses_allocator, Alloc> : public true_type {}; } #endif BOOST_THREAD_DCL_MOVABLE_BEG(T) packaged_task BOOST_THREAD_DCL_MOVABLE_END namespace detail { //////////////////////////////// // make_future_deferred_object //////////////////////////////// template BOOST_THREAD_FUTURE make_future_deferred_object(BOOST_THREAD_FWD_REF(Fp) f) { shared_ptr > h(new future_deferred_object(boost::forward(f))); return BOOST_THREAD_FUTURE(h); } //////////////////////////////// // make_future_async_object //////////////////////////////// template BOOST_THREAD_FUTURE make_future_async_object(BOOST_THREAD_FWD_REF(Fp) f) { shared_ptr > h(new future_async_object(boost::forward(f))); return BOOST_THREAD_FUTURE(h); } } //////////////////////////////// // template // future async(launch policy, F&&, ArgTypes&&...); //////////////////////////////// #if defined BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template BOOST_THREAD_FUTURE async(launch policy, R(*f)(BOOST_THREAD_FWD_REF(ArgTypes)...), BOOST_THREAD_FWD_REF(ArgTypes)... args) { typedef R(*F)(BOOST_THREAD_FWD_REF(ArgTypes)...); typedef detail::async_func::type, typename decay::type...> BF; typedef typename BF::result_type Rp; #else template BOOST_THREAD_FUTURE async(launch policy, R(*f)()) { typedef packaged_task packaged_task_type; #endif #else template BOOST_THREAD_FUTURE async(launch policy, R(*f)()) { typedef packaged_task packaged_task_type; #endif if (int(policy) & int(launch::async)) { #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_async_object( BF( thread_detail::decay_copy(boost::forward(f)) , thread_detail::decay_copy(boost::forward(args))... ) )); #else packaged_task_type pt( f ); BOOST_THREAD_FUTURE ret = BOOST_THREAD_MAKE_RV_REF(pt.get_future()); ret.set_async(); boost::thread( boost::move(pt) ).detach(); return ::boost::move(ret); #endif } else if (int(policy) & int(launch::deferred)) { #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_deferred_object( BF( thread_detail::decay_copy(boost::forward(f)) , thread_detail::decay_copy(boost::forward(args))... ) )); #else std::terminate(); BOOST_THREAD_FUTURE ret; return ::boost::move(ret); #endif } else { std::terminate(); BOOST_THREAD_FUTURE ret; return ::boost::move(ret); } } #endif #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template BOOST_THREAD_FUTURE::type( typename decay::type... )>::type> async(launch policy, BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(ArgTypes)... args) { typedef typename boost::result_of::type( typename decay::type... )>::type R; typedef detail::async_func::type, typename decay::type...> BF; typedef typename BF::result_type Rp; #else template BOOST_THREAD_FUTURE::type()>::type> async(launch policy, BOOST_THREAD_FWD_REF(F) f) { typedef typename boost::result_of::type()>::type R; typedef packaged_task packaged_task_type; #endif #else template BOOST_THREAD_FUTURE::type()>::type> async(launch policy, BOOST_THREAD_FWD_REF(F) f) { typedef typename boost::result_of::type()>::type R; typedef packaged_task packaged_task_type; #endif if (int(policy) & int(launch::async)) { #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_async_object( BF( thread_detail::decay_copy(boost::forward(f)) , thread_detail::decay_copy(boost::forward(args))... ) )); #else packaged_task_type pt( boost::forward(f) ); BOOST_THREAD_FUTURE ret = pt.get_future(); ret.set_async(); //#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) // boost::thread( boost::move(pt), boost::forward(args)... ).detach(); // todo forward //#else boost::thread( boost::move(pt) ).detach(); //#endif return ::boost::move(ret); #endif } else if (int(policy) & int(launch::deferred)) { #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_deferred_object( BF( thread_detail::decay_copy(boost::forward(f)) , thread_detail::decay_copy(boost::forward(args))... ) )); #else std::terminate(); BOOST_THREAD_FUTURE ret; return ::boost::move(ret); // return boost::detail::make_future_deferred_object( // BF( // thread_detail::decay_copy(boost::forward(f)) // ) // ); #endif } else { std::terminate(); BOOST_THREAD_FUTURE ret; return ::boost::move(ret); } } //////////////////////////////// // template // future async(F&&, ArgTypes&&...); //////////////////////////////// #if defined BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template BOOST_THREAD_FUTURE async(R(*f)(BOOST_THREAD_FWD_REF(ArgTypes)...), BOOST_THREAD_FWD_REF(ArgTypes)... args) { return BOOST_THREAD_MAKE_RV_REF(async(launch(launch::any), f, boost::forward(args)...)); } #else template BOOST_THREAD_FUTURE async(R(*f)()) { return BOOST_THREAD_MAKE_RV_REF(async(launch(launch::any), f)); } #endif #endif #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template BOOST_THREAD_FUTURE::type( typename decay::type... )>::type> async(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(ArgTypes)... args) { return BOOST_THREAD_MAKE_RV_REF(async(launch(launch::any), boost::forward(f), boost::forward(args)...)); } #else template BOOST_THREAD_FUTURE::type> async(BOOST_THREAD_RV_REF(F) f) { return BOOST_THREAD_MAKE_RV_REF(async(launch(launch::any), boost::forward(f))); } #endif //////////////////////////////// // make_future deprecated //////////////////////////////// template BOOST_THREAD_FUTURE::type> make_future(BOOST_THREAD_FWD_REF(T) value) { typedef typename decay::type future_type; promise p; p.set_value(boost::forward(value)); return BOOST_THREAD_MAKE_RV_REF(p.get_future()); } #if defined BOOST_THREAD_USES_MOVE inline BOOST_THREAD_FUTURE make_future() { promise p; p.set_value(); return BOOST_THREAD_MAKE_RV_REF(p.get_future()); } #endif //////////////////////////////// // make_ready_future //////////////////////////////// template BOOST_THREAD_FUTURE::type> make_ready_future(BOOST_THREAD_FWD_REF(T) value) { typedef typename decay::type future_type; promise p; p.set_value(boost::forward(value)); return BOOST_THREAD_MAKE_RV_REF(p.get_future()); } #if defined BOOST_THREAD_USES_MOVE inline BOOST_THREAD_FUTURE make_ready_future() { promise p; p.set_value(); return BOOST_THREAD_MAKE_RV_REF(p.get_future()); } #endif //////////////////////////////// // make_exceptional_future //////////////////////////////// template BOOST_THREAD_FUTURE make_exceptional_future(exception_ptr ex) { promise p; p.set_exception(ex); return BOOST_THREAD_MAKE_RV_REF(p.get_future()); } #if 0 template make_future(CLOSURE closure) -> BOOST_THREAD_FUTURE { typedef decltype(closure() T; promise p; try { p.set_value(closure()); } catch(...) { p.set_exception(std::current_exception()); } return BOOST_THREAD_MAKE_RV_REF(p.get_future()); } #endif //////////////////////////////// // make_shared_future deprecated //////////////////////////////// template shared_future::type> make_shared_future(BOOST_THREAD_FWD_REF(T) value) { typedef typename decay::type future_type; promise p; p.set_value(boost::forward(value)); return BOOST_THREAD_MAKE_RV_REF(p.get_future().share()); } inline shared_future make_shared_future() { promise p; return BOOST_THREAD_MAKE_RV_REF(p.get_future().share()); } //////////////////////////////// // make_ready_shared_future //////////////////////////////// template shared_future::type> make_ready_shared_future(BOOST_THREAD_FWD_REF(T) value) { typedef typename decay::type future_type; promise p; p.set_value(boost::forward(value)); return p.get_future().share(); } inline shared_future make_ready_shared_future() { promise p; return BOOST_THREAD_MAKE_RV_REF(p.get_future().share()); } //////////////////////////////// // make_exceptional_shared_future //////////////////////////////// template shared_future make_exceptional_shared_future(exception_ptr ex) { promise p; p.set_exception(ex); return p.get_future().share(); } //////////////////////////////// // detail::future_async_continuation //////////////////////////////// #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION namespace detail { ///////////////////////// /// future_async_continuation ///////////////////////// template struct future_async_continuation: future_object { typedef future_object base_type; typedef typename base_type::move_dest_type move_dest_type; typedef weak_ptr parent_ptr_type; F parent; Fp continuation; boost::thread thr_; public: future_async_continuation( F& f, BOOST_THREAD_FWD_REF(Fp) c ) : parent(f.future_), //continuation(boost::move(c)), continuation(c), thr_() { this->set_async(); } ~future_async_continuation() { if (thr_.get_id()==thread::id()) { //BOOST_THREAD_LOG << "ERRORRRRRRRRR ~future_async_continuation " << this << " " << thr_.get_id() << BOOST_THREAD_END_LOG; return; } if (thr_.joinable()) { thr_.join(); } } void launch_continuation(boost::unique_lock& lock) { lock.unlock(); thr_ = thread(&future_async_continuation::run, this); } move_dest_type get() { if (thr_.joinable()) thr_.join(); // fixme Is the lock needed during the whole scope? //this->wait(); boost::unique_lock lock(this->mutex); this->wait_internal(lock); // fixme use boost::move return static_cast(*(this->result)); } static void run(future_async_continuation* that) { try { that->mark_finished_with_result(that->continuation(that->parent)); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { that->mark_interrupted_finish(); } #endif catch(...) { that->mark_exceptional_finish(); } } }; template struct future_async_continuation: public future_object { typedef future_object base_type; F parent; Fp continuation; boost::thread thr_; public: future_async_continuation( F& f, BOOST_THREAD_FWD_REF(Fp) c ) : parent(f.future_), continuation(boost::move(c)), thr_() { this->set_async(); } ~future_async_continuation() { if (thr_.get_id()==thread::id()) { return; } if (thr_.joinable()) thr_.join(); } void launch_continuation(boost::unique_lock& lk) { lk.unlock(); thr_ = thread(&future_async_continuation::run, this); } static void run(future_async_continuation* that) { try { that->continuation(that->parent); that->mark_finished_with_result(); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS catch(thread_interrupted& ) { that->mark_interrupted_finish(); } #endif catch(...) { that->mark_exceptional_finish(); } } }; ////////////////////////// /// future_deferred_continuation ////////////////////////// template struct future_deferred_continuation: future_object { typedef future_object base_type; F parent; Fp continuation; public: future_deferred_continuation( F& f, BOOST_THREAD_FWD_REF(Fp) c ) : parent(f.future_), //continuation(boost::move(c)) continuation(c) { this->set_deferred(); } virtual void launch_continuation(boost::unique_lock& lk) { execute(lk); } virtual void execute(boost::unique_lock& lck) { try { this->mark_finished_with_result_internal(continuation(parent), lck); } catch (...) { this->mark_exceptional_finish_internal(current_exception(), lck); } } }; template struct future_deferred_continuation: future_object { typedef future_object base_type; F parent; Fp continuation; public: future_deferred_continuation( F& f, BOOST_THREAD_FWD_REF(Fp) c ): parent(f.future_), continuation(boost::move(c)) { this->set_deferred(); } virtual void launch_continuation(boost::unique_lock& lk) { execute(lk); } virtual void execute(boost::unique_lock& lck) { try { continuation(parent); this->mark_finished_with_result_internal(lck); } catch (...) { this->mark_exceptional_finish_internal(current_exception(), lck); } } }; //////////////////////////////// // make_future_deferred_continuation //////////////////////////////// template BOOST_THREAD_FUTURE make_future_deferred_continuation( boost::unique_lock &lock, F& f, BOOST_THREAD_FWD_REF(Fp) c ) { shared_ptr > h(new future_deferred_continuation(f, boost::forward(c))); f.future_->set_continuation_ptr(h, lock); return BOOST_THREAD_FUTURE(h); } //////////////////////////////// // make_future_async_continuation //////////////////////////////// template BOOST_THREAD_FUTURE make_future_async_continuation( boost::unique_lock &lock, F& f, BOOST_THREAD_FWD_REF(Fp) c ) { shared_ptr > h(new future_async_continuation(f, boost::forward(c))); f.future_->set_continuation_ptr(h, lock); return BOOST_THREAD_FUTURE(h); } // template // struct future_continuation : future_object // { // F& parent; // C continuation; // launch policy_; // // future_continuation(boost::unique_lock& lk, F& f, BOOST_THREAD_FWD_REF(C) c) : // parent(f), // continuation(boost::forward(c)), // policy_(f.launch_policy()) // { // init_continuation(lk); // } // future_continuation(boost::unique_lock& lk, F& f, BOOST_THREAD_FWD_REF(C) c, launch policy) : // parent(f), // continuation(boost::forward(c)), // policy_(policy) // { // init_continuation(lk); // } // ~future_continuation() // {} // // void init_continuation(boost::unique_lock& lk) // { // try // { // lk.unlock(); // // fixme what to do depending on inherits_launch_policy_ and policy_? // if (int(policy_) & int(launch::deferred)) // { // R val = continuation(parent); // next.set_value(boost::move(val)); // } // else // { // BOOST_THREAD_FUTURE f = async(policy_, continuation, boost::ref(parent)); // R val = f.get(); // next.set_value(boost::move(val)); // } // } // catch (...) // { // next.set_exception(boost::current_exception()); // } // } // private: // // future_continuation(future_continuation const&); // future_continuation& operator=(future_continuation const&); // }; //#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR) // template // struct future_continuation : future_object // { // F& parent; // CR(*continuation)(F&) ; // launch policy_; // // future_continuation(F& f, CR(*c)(F&)) : // parent(f), // continuation(c), // policy_(f.launch_policy()), // next() // {} // future_continuation(F& f, CR(*c)(F&), launch policy) : // parent(f), // continuation(c), // policy_(policy), // next() // {} // ~future_continuation() // {} // // void start_continuation(boost::unique_lock& lk) // { // try // { // lk.unlock(); // // fixme what to do depending on inherits_launch_policy_ and policy_? // if (int(policy_) & int(launch::deferred)) // { // R val = continuation(parent); // next.set_value(boost::move(val)); // } // else // { // BOOST_THREAD_FUTURE f = async(policy_, continuation, boost::ref(parent)); // R val = f.get(); // next.set_value(boost::move(val)); // } // } // catch (...) // { // next.set_exception(boost::current_exception()); // } // } // private: // // future_continuation(future_continuation const&); // future_continuation& operator=(future_continuation const&); // }; //#endif } //////////////////////////////// // template // auto future::then(F&& func) -> BOOST_THREAD_FUTURE; //////////////////////////////// template template inline BOOST_THREAD_FUTURE&)>::type> BOOST_THREAD_FUTURE::then(launch policy, BOOST_THREAD_FWD_REF(F) func) { typedef typename boost::result_of&)>::type future_type; if (this->future_==0) { // fixme what to do when the future has no associated state? return BOOST_THREAD_FUTURE(); } boost::unique_lock lock(this->future_->mutex); if (int(policy) & int(launch::async)) { return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_async_continuation, future_type, F>( lock, *this, boost::forward(func) ))); } else if (int(policy) & int(launch::deferred)) { return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_deferred_continuation, future_type, F>( lock, *this, boost::forward(func) ))); } else { // fixme what to do when the policy is invalid? return BOOST_THREAD_FUTURE(); } } template template inline BOOST_THREAD_FUTURE&)>::type> BOOST_THREAD_FUTURE::then(BOOST_THREAD_FWD_REF(F) func) { typedef typename boost::result_of&)>::type future_type; if (this->future_==0) { //BOOST_THREAD_LOG << "ERROR future::then " << this << BOOST_THREAD_END_LOG; // fixme what to do when the future has no associated state? return BOOST_THREAD_FUTURE(); } boost::unique_lock lock(this->future_->mutex); if (int(this->launch_policy()) & int(launch::async)) { return boost::detail::make_future_async_continuation, future_type, F>( lock, *this, boost::forward(func) ); } else if (int(this->launch_policy()) & int(launch::deferred)) { this->future_->wait_internal(lock); return boost::detail::make_future_deferred_continuation, future_type, F>( lock, *this, boost::forward(func) ); } else { // fixme what to do when the policy is invalid? return BOOST_THREAD_FUTURE(); } } //#if 0 && defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR) // template // template // BOOST_THREAD_FUTURE // BOOST_THREAD_FUTURE::then(RF(*func)(BOOST_THREAD_FUTURE&)) // { // // typedef RF future_type; // // if (this->future_) // { // boost::unique_lock lock(this->future_->mutex); // detail::future_continuation, future_type, RF(*)(BOOST_THREAD_FUTURE&) > *ptr = // new detail::future_continuation, future_type, RF(*)(BOOST_THREAD_FUTURE&)>(*this, func); // if (ptr==0) // { // return BOOST_THREAD_MAKE_RV_REF(BOOST_THREAD_FUTURE()); // } // this->future_->set_continuation_ptr(ptr, lock); // return ptr->get_future(); // } else { // // fixme what to do when the future has no associated state? // return BOOST_THREAD_MAKE_RV_REF(BOOST_THREAD_FUTURE()); // } // // } // template // template // BOOST_THREAD_FUTURE // BOOST_THREAD_FUTURE::then(launch policy, RF(*func)(BOOST_THREAD_FUTURE&)) // { // // typedef RF future_type; // // if (this->future_) // { // boost::unique_lock lock(this->future_->mutex); // detail::future_continuation, future_type, RF(*)(BOOST_THREAD_FUTURE&) > *ptr = // new detail::future_continuation, future_type, RF(*)(BOOST_THREAD_FUTURE&)>(*this, func, policy); // if (ptr==0) // { // return BOOST_THREAD_MAKE_RV_REF(BOOST_THREAD_FUTURE()); // } // this->future_->set_continuation_ptr(ptr, lock); // return ptr->get_future(); // } else { // // fixme what to do when the future has no associated state? // return BOOST_THREAD_MAKE_RV_REF(BOOST_THREAD_FUTURE()); // } // // } //#endif #endif } #endif // BOOST_NO_EXCEPTION #endif // header passenger-4.0.37/ext/boost/thread/future_error_code.hpp000644 000765 000024 00000003057 12233035540 023644 0ustar00honglistaff000000 000000 // (C) Copyright 2008-10 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_FUTURE_ERROR_CODE_HPP #define BOOST_THREAD_FUTURE_ERROR_CODE_HPP #include #include #include #include namespace boost { //enum class future_errc BOOST_SCOPED_ENUM_DECLARE_BEGIN(future_errc) { broken_promise = 1, future_already_retrieved, promise_already_satisfied, no_state } BOOST_SCOPED_ENUM_DECLARE_END(future_errc) namespace system { template <> struct BOOST_SYMBOL_VISIBLE is_error_code_enum : public true_type {}; #ifdef BOOST_NO_CXX11_SCOPED_ENUMS template <> struct BOOST_SYMBOL_VISIBLE is_error_code_enum : public true_type { }; #endif } // system BOOST_THREAD_DECL const system::error_category& future_category() BOOST_NOEXCEPT; namespace system { inline error_code make_error_code(future_errc e) BOOST_NOEXCEPT { return error_code(underlying_cast(e), boost::future_category()); } inline error_condition make_error_condition(future_errc e) BOOST_NOEXCEPT { return error_condition(underlying_cast(e), future_category()); } } // system } // boost #endif // header passenger-4.0.37/ext/boost/thread/is_locked_by_this_thread.hpp000644 000765 000024 00000002046 12233035540 025130 0ustar00honglistaff000000 000000 // (C) Copyright 2012 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_IS_LOCKED_BY_THIS_THREAD_HPP #define BOOST_THREAD_IS_LOCKED_BY_THIS_THREAD_HPP #include #include namespace boost { template class testable_mutex; /** * Overloaded function used to check if the mutex is locked when it is testable and do nothing otherwise. * * This function is used usually to assert the pre-condition when the function can only be called when the mutex * must be locked by the current thread. */ template bool is_locked_by_this_thread(testable_mutex const& mtx) { return mtx.is_locked_by_this_thread(); } template bool is_locked_by_this_thread(Lockable const&) { return true; } } #include #endif // header passenger-4.0.37/ext/boost/thread/latch.hpp000644 000765 000024 00000007611 12233035540 021222 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2013 Vicente J. Botet Escriba #ifndef BOOST_THREAD_LATCH_HPP #define BOOST_THREAD_LATCH_HPP #include #include #include #include #include #include #include #include #include #include namespace boost { class latch { /// @Requires: count_.value_ must be greater than 0 /// Effect: Decrement the count. Unlocks the lock notify anyone waiting if we reached zero. /// Returns: true if count_.value_ reached the value 0. /// @ThreadSafe ensured by the @c lk parameter bool count_down(unique_lock &lk) /// pre_condition (count_.value_ > 0) { BOOST_ASSERT(count_.value_ > 0); if (--count_.value_ == 0) { count_.cond_.notify_all(); lk.unlock(); return true; } return false; } public: BOOST_THREAD_NO_COPYABLE( latch) /// Constructs a latch with a given count. latch(std::size_t count) : count_(count) { } /// Destructor /// Precondition: No threads are waiting or invoking count_down on @c *this. ~latch() { } /// Blocks until the latch has counted down to zero. void wait() { boost::unique_lock lk(mutex_); count_.cond_.wait(lk, detail::counter_is_zero(count_)); } /// @return true if the internal counter is already 0, false otherwise bool try_wait() { boost::unique_lock lk(mutex_); return (count_ == 0); } /// try to wait for a specified amount of time is elapsed. /// @return whether there is a timeout or not. template cv_status wait_for(const chrono::duration& rel_time) { boost::unique_lock lk(mutex_); return count_.cond_.wait_for(lk, rel_time, detail::counter_is_zero(count_)) ? cv_status::no_timeout : cv_status::timeout; } /// try to wait until the specified time_point is reached /// @return whether there were a timeout or not. template cv_status wait_until(const chrono::time_point& abs_time) { boost::unique_lock lk(mutex_); return count_.cond_.wait_until(lk, abs_time, detail::counter_is_zero(count_)) ? cv_status::no_timeout : cv_status::timeout; } /// Decrement the count and notify anyone waiting if we reach zero. /// @Requires count must be greater than 0 void count_down() { boost::unique_lock lk(mutex_); count_down(lk); } void signal() { count_down(); } /// Decrement the count and notify anyone waiting if we reach zero. /// Blocks until the latch has counted down to zero. /// @Requires count must be greater than 0 void count_down_and_wait() { boost::unique_lock lk(mutex_); if (count_down(lk)) { return; } count_.cond_.wait(lk, detail::counter_is_zero(count_)); } void sync() { count_down_and_wait(); } /// Reset the counter /// #Requires This method may only be invoked when there are no other threads currently inside the count_down_and_wait() method. void reset(std::size_t count) { boost::lock_guard lk(mutex_); //BOOST_ASSERT(count_ == 0); count_ = count; } private: mutex mutex_; detail::counter count_; }; } // namespace boost #include #endif passenger-4.0.37/ext/boost/thread/lock_algorithms.hpp000644 000765 000024 00000031621 12233035540 023306 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_LOCK_ALGORITHMS_HPP #define BOOST_THREAD_LOCK_ALGORITHMS_HPP #include #include #include #include #include #include namespace boost { namespace detail { template unsigned try_lock_internal(MutexType1& m1, MutexType2& m2) { boost::unique_lock l1(m1, boost::try_to_lock); if (!l1) { return 1; } if (!m2.try_lock()) { return 2; } l1.release(); return 0; } template unsigned try_lock_internal(MutexType1& m1, MutexType2& m2, MutexType3& m3) { boost::unique_lock l1(m1, boost::try_to_lock); if (!l1) { return 1; } if (unsigned const failed_lock=try_lock_internal(m2,m3)) { return failed_lock + 1; } l1.release(); return 0; } template unsigned try_lock_internal(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4) { boost::unique_lock l1(m1, boost::try_to_lock); if (!l1) { return 1; } if (unsigned const failed_lock=try_lock_internal(m2,m3,m4)) { return failed_lock + 1; } l1.release(); return 0; } template unsigned try_lock_internal(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4, MutexType5& m5) { boost::unique_lock l1(m1, boost::try_to_lock); if (!l1) { return 1; } if (unsigned const failed_lock=try_lock_internal(m2,m3,m4,m5)) { return failed_lock + 1; } l1.release(); return 0; } template unsigned lock_helper(MutexType1& m1, MutexType2& m2) { boost::unique_lock l1(m1); if (!m2.try_lock()) { return 1; } l1.release(); return 0; } template unsigned lock_helper(MutexType1& m1, MutexType2& m2, MutexType3& m3) { boost::unique_lock l1(m1); if (unsigned const failed_lock=try_lock_internal(m2,m3)) { return failed_lock; } l1.release(); return 0; } template unsigned lock_helper(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4) { boost::unique_lock l1(m1); if (unsigned const failed_lock=try_lock_internal(m2,m3,m4)) { return failed_lock; } l1.release(); return 0; } template unsigned lock_helper(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4, MutexType5& m5) { boost::unique_lock l1(m1); if (unsigned const failed_lock=try_lock_internal(m2,m3,m4,m5)) { return failed_lock; } l1.release(); return 0; } } namespace detail { template struct is_mutex_type_wrapper { }; template void lock_impl(MutexType1& m1, MutexType2& m2, is_mutex_type_wrapper ) { unsigned const lock_count = 2; unsigned lock_first = 0; for (;;) { switch (lock_first) { case 0: lock_first = detail::lock_helper(m1, m2); if (!lock_first) return; break; case 1: lock_first = detail::lock_helper(m2, m1); if (!lock_first) return; lock_first = (lock_first + 1) % lock_count; break; } } } template void lock_impl(Iterator begin, Iterator end, is_mutex_type_wrapper ); } template void lock(MutexType1& m1, MutexType2& m2) { detail::lock_impl(m1, m2, detail::is_mutex_type_wrapper::value>()); } template void lock(const MutexType1& m1, MutexType2& m2) { detail::lock_impl(m1, m2, detail::is_mutex_type_wrapper::value>()); } template void lock(MutexType1& m1, const MutexType2& m2) { detail::lock_impl(m1, m2, detail::is_mutex_type_wrapper::value>()); } template void lock(const MutexType1& m1, const MutexType2& m2) { detail::lock_impl(m1, m2, detail::is_mutex_type_wrapper::value>()); } template void lock(MutexType1& m1, MutexType2& m2, MutexType3& m3) { unsigned const lock_count = 3; unsigned lock_first = 0; for (;;) { switch (lock_first) { case 0: lock_first = detail::lock_helper(m1, m2, m3); if (!lock_first) return; break; case 1: lock_first = detail::lock_helper(m2, m3, m1); if (!lock_first) return; lock_first = (lock_first + 1) % lock_count; break; case 2: lock_first = detail::lock_helper(m3, m1, m2); if (!lock_first) return; lock_first = (lock_first + 2) % lock_count; break; } } } template void lock(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4) { unsigned const lock_count = 4; unsigned lock_first = 0; for (;;) { switch (lock_first) { case 0: lock_first = detail::lock_helper(m1, m2, m3, m4); if (!lock_first) return; break; case 1: lock_first = detail::lock_helper(m2, m3, m4, m1); if (!lock_first) return; lock_first = (lock_first + 1) % lock_count; break; case 2: lock_first = detail::lock_helper(m3, m4, m1, m2); if (!lock_first) return; lock_first = (lock_first + 2) % lock_count; break; case 3: lock_first = detail::lock_helper(m4, m1, m2, m3); if (!lock_first) return; lock_first = (lock_first + 3) % lock_count; break; } } } template void lock(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4, MutexType5& m5) { unsigned const lock_count = 5; unsigned lock_first = 0; for (;;) { switch (lock_first) { case 0: lock_first = detail::lock_helper(m1, m2, m3, m4, m5); if (!lock_first) return; break; case 1: lock_first = detail::lock_helper(m2, m3, m4, m5, m1); if (!lock_first) return; lock_first = (lock_first + 1) % lock_count; break; case 2: lock_first = detail::lock_helper(m3, m4, m5, m1, m2); if (!lock_first) return; lock_first = (lock_first + 2) % lock_count; break; case 3: lock_first = detail::lock_helper(m4, m5, m1, m2, m3); if (!lock_first) return; lock_first = (lock_first + 3) % lock_count; break; case 4: lock_first = detail::lock_helper(m5, m1, m2, m3, m4); if (!lock_first) return; lock_first = (lock_first + 4) % lock_count; break; } } } namespace detail { template ::value> struct try_lock_impl_return { typedef int type; }; template struct try_lock_impl_return { typedef Iterator type; }; template int try_lock_impl(MutexType1& m1, MutexType2& m2, is_mutex_type_wrapper ) { return ((int) detail::try_lock_internal(m1, m2)) - 1; } template Iterator try_lock_impl(Iterator begin, Iterator end, is_mutex_type_wrapper ); } template typename detail::try_lock_impl_return::type try_lock(MutexType1& m1, MutexType2& m2) { return detail::try_lock_impl(m1, m2, detail::is_mutex_type_wrapper::value>()); } template typename detail::try_lock_impl_return::type try_lock(const MutexType1& m1, MutexType2& m2) { return detail::try_lock_impl(m1, m2, detail::is_mutex_type_wrapper::value>()); } template typename detail::try_lock_impl_return::type try_lock(MutexType1& m1, const MutexType2& m2) { return detail::try_lock_impl(m1, m2, detail::is_mutex_type_wrapper::value>()); } template typename detail::try_lock_impl_return::type try_lock(const MutexType1& m1, const MutexType2& m2) { return detail::try_lock_impl(m1, m2, detail::is_mutex_type_wrapper::value>()); } template int try_lock(MutexType1& m1, MutexType2& m2, MutexType3& m3) { return ((int) detail::try_lock_internal(m1, m2, m3)) - 1; } template int try_lock(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4) { return ((int) detail::try_lock_internal(m1, m2, m3, m4)) - 1; } template int try_lock(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4, MutexType5& m5) { return ((int) detail::try_lock_internal(m1, m2, m3, m4, m5)) - 1; } namespace detail { template struct range_lock_guard { Iterator begin; Iterator end; range_lock_guard(Iterator begin_, Iterator end_) : begin(begin_), end(end_) { boost::lock(begin, end); } void release() { begin = end; } ~range_lock_guard() { for (; begin != end; ++begin) { begin->unlock(); } } }; template Iterator try_lock_impl(Iterator begin, Iterator end, is_mutex_type_wrapper ) { if (begin == end) { return end; } typedef typename std::iterator_traits::value_type lock_type; unique_lock guard(*begin, try_to_lock); if (!guard.owns_lock()) { return begin; } Iterator const failed = boost::try_lock(++begin, end); if (failed == end) { guard.release(); } return failed; } } namespace detail { template void lock_impl(Iterator begin, Iterator end, is_mutex_type_wrapper ) { typedef typename std::iterator_traits::value_type lock_type; if (begin == end) { return; } bool start_with_begin = true; Iterator second = begin; ++second; Iterator next = second; for (;;) { unique_lock begin_lock(*begin, defer_lock); if (start_with_begin) { begin_lock.lock(); Iterator const failed_lock = boost::try_lock(next, end); if (failed_lock == end) { begin_lock.release(); return; } start_with_begin = false; next = failed_lock; } else { detail::range_lock_guard guard(next, end); if (begin_lock.try_lock()) { Iterator const failed_lock = boost::try_lock(second, next); if (failed_lock == next) { begin_lock.release(); guard.release(); return; } start_with_begin = false; next = failed_lock; } else { start_with_begin = true; next = second; } } } } } } #include #endif passenger-4.0.37/ext/boost/thread/lock_concepts.hpp000644 000765 000024 00000011270 12233035540 022751 0ustar00honglistaff000000 000000 // (C) Copyright 2012 Vicente Botet // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_LOCK_CONCEPTS_HPP #define BOOST_THREAD_LOCK_CONCEPTS_HPP #include #include #include #include #include #include #include #include namespace boost { /** * BasicLock object supports the basic features * required to delimit a critical region * Supports the basic lock, unlock and try_lock functions and * defines the lock traits */ template struct BasicLock { typedef typename Lk::mutex_type mutex_type; void cvt_mutex_ptr(mutex_type*) {} BOOST_CONCEPT_ASSERT(( BasicLockable )); BOOST_CONCEPT_USAGE(BasicLock) { const Lk l1(mtx); Lk l2(mtx, defer_lock); Lk l3(mtx, adopt_lock); Lk l4(( Lk())); Lk l5(( boost::move(l2))); cvt_mutex_ptr(l1.mutex()); if (l1.owns_lock()) return; if (l1) return; if (!l1) return; l2.lock(); l2.unlock(); l2.release(); } BasicLock() : mtx(*static_cast(0)) {} private: BasicLock operator=(BasicLock const&); mutex_type& mtx; } ; template struct Lock { BOOST_CONCEPT_ASSERT(( BasicLock )); typedef typename Lk::mutex_type mutex_type; BOOST_CONCEPT_ASSERT(( Lockable )); BOOST_CONCEPT_USAGE(Lock) { Lk l1(mtx, try_to_lock); if (l1.try_lock()) return; } Lock() : mtx(*static_cast(0)) {} private: Lock operator=(Lock const&); mutex_type& mtx; }; template struct TimedLock { BOOST_CONCEPT_ASSERT(( Lock )); typedef typename Lk::mutex_type mutex_type; BOOST_CONCEPT_ASSERT(( TimedLockable )); BOOST_CONCEPT_USAGE(TimedLock) { const Lk l1(mtx, t); Lk l2(mtx, d); if (l1.try_lock_until(t)) return; if (l1.try_lock_for(d)) return; } TimedLock() : mtx(*static_cast(0)) {} private: TimedLock operator=(TimedLock const&); mutex_type& mtx; boost::chrono::system_clock::time_point t; boost::chrono::system_clock::duration d; }; template struct UniqueLock { BOOST_CONCEPT_ASSERT(( TimedLock )); typedef typename Lk::mutex_type mutex_type; BOOST_CONCEPT_USAGE(UniqueLock) { } UniqueLock() : mtx(*static_cast(0)) {} private: UniqueLock operator=(UniqueLock const&); mutex_type& mtx; }; template struct SharedLock { BOOST_CONCEPT_ASSERT(( TimedLock )); typedef typename Lk::mutex_type mutex_type; BOOST_CONCEPT_USAGE(SharedLock) { } SharedLock() : mtx(*static_cast(0)) {} private: SharedLock operator=(SharedLock const&); mutex_type& mtx; }; template struct UpgradeLock { BOOST_CONCEPT_ASSERT(( SharedLock )); typedef typename Lk::mutex_type mutex_type; BOOST_CONCEPT_USAGE(UpgradeLock) { } UpgradeLock() : mtx(*static_cast(0)) {} private: UpgradeLock operator=(UpgradeLock const&); mutex_type& mtx; }; /** * An StrictLock is a scoped lock guard ensuring the mutex is locked on the * scope of the lock, by locking the mutex on construction and unlocking it on * destruction. * * Essentially, a StrictLock's role is only to live on the stack as an * automatic variable. strict_lock must adhere to a non-copy and non-alias * policy. StrictLock disables copying by making the copy constructor and the * assignment operator private. While we're at it, let's disable operator new * and operator delete; strict locks are not intended to be allocated on the * heap. StrictLock avoids aliasing by using a slightly less orthodox and * less well-known technique: disable address taking. */ template struct StrictLock { typedef typename Lk::mutex_type mutex_type; BOOST_CONCEPT_ASSERT(( BasicLockable )); BOOST_STATIC_ASSERT(( is_strict_lock::value )); BOOST_CONCEPT_USAGE( StrictLock) { if (l1.owns_lock(&mtx)) return; } StrictLock() : l1(*static_cast(0)), mtx(*static_cast(0)) {} private: StrictLock operator=(StrictLock const&); Lk const& l1; mutex_type const& mtx; }; } #endif passenger-4.0.37/ext/boost/thread/lock_factories.hpp000644 000765 000024 00000004415 12233035540 023115 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_LOCK_FACTORIES_HPP #define BOOST_THREAD_LOCK_FACTORIES_HPP #include #include #if ! defined(BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS) #include // todo change to once Boost.Tuple or Boost.Fusion provides Move semantics. #endif #include namespace boost { template unique_lock make_unique_lock(Lockable& mtx) { return unique_lock (mtx); } template unique_lock make_unique_lock(Lockable& mtx, adopt_lock_t) { return unique_lock (mtx, adopt_lock); } template unique_lock make_unique_lock(Lockable& mtx, defer_lock_t) { return unique_lock (mtx, defer_lock); } template unique_lock make_unique_lock(Lockable& mtx, try_to_lock_t) { return unique_lock (mtx, try_to_lock); } #if ! defined(BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS) #if ! defined BOOST_NO_CXX11_VARIADIC_TEMPLATES template std::tuple ...> make_unique_locks(Lockable& ...mtx) { boost::lock(mtx...); return std::tuple ...>(unique_lock(mtx, adopt_lock)...); } #else template std::tuple, unique_lock > make_unique_locks(L1& m1, L2& m2) { boost::lock(m1, m2); return std::tuple,unique_lock >( unique_lock(m1, adopt_lock), unique_lock(m2, adopt_lock) ); } template std::tuple, unique_lock, unique_lock > make_unique_locks(L1& m1, L2& m2, L3& m3) { boost::lock(m1, m2, m3); return std::tuple,unique_lock,unique_lock >( unique_lock(m1, adopt_lock), unique_lock(m2, adopt_lock), unique_lock(m3, adopt_lock) ); } #endif #endif } #include #endif passenger-4.0.37/ext/boost/thread/lock_guard.hpp000644 000765 000024 00000004211 12233035540 022232 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_LOCK_GUARD_HPP #define BOOST_THREAD_LOCK_GUARD_HPP #include #include #include #include #include #if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS #include #include #endif #include namespace boost { template class lock_guard { private: Mutex& m; public: typedef Mutex mutex_type; BOOST_THREAD_NO_COPYABLE( lock_guard ) explicit lock_guard(Mutex& m_) : m(m_) { m.lock(); } lock_guard(Mutex& m_, adopt_lock_t) : m(m_) { #if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS BOOST_ASSERT(is_locked_by_this_thread(m)); #endif } #if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST lock_guard(std::initializer_list > l_) : m(*(const_cast*>(l_.begin())->m)) { m.lock(); } lock_guard(std::initializer_list > l_) : m(*(const_cast*>(l_.begin())->m)) { #if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS BOOST_ASSERT(is_locked_by_this_thread(m)); #endif } #endif ~lock_guard() { m.unlock(); } }; #if ! defined BOOST_THREAD_NO_MAKE_LOCK_GUARD template lock_guard make_lock_guard(Lockable& mtx) { return { thread_detail::lockable_wrapper(mtx) }; } template lock_guard make_lock_guard(Lockable& mtx, adopt_lock_t) { return { thread_detail::lockable_adopt_wrapper(mtx) }; } #endif } #include #endif passenger-4.0.37/ext/boost/thread/lock_options.hpp000644 000765 000024 00000001275 12233035540 022632 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_LOCK_OPTIONS_HPP #define BOOST_THREAD_LOCK_OPTIONS_HPP #include namespace boost { struct defer_lock_t { }; struct try_to_lock_t { }; struct adopt_lock_t { }; BOOST_CONSTEXPR_OR_CONST defer_lock_t defer_lock = {}; BOOST_CONSTEXPR_OR_CONST try_to_lock_t try_to_lock = {}; BOOST_CONSTEXPR_OR_CONST adopt_lock_t adopt_lock = {}; } #include #endif passenger-4.0.37/ext/boost/thread/lock_traits.hpp000644 000765 000024 00000002322 12233035540 022437 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2009-2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_LOCK_TRAITS_HPP #define BOOST_THREAD_LOCK_TRAITS_HPP #include //#include //#include // //#ifdef BOOST_THREAD_USES_CHRONO //#include //#include //#endif #include #include namespace boost { /** * An strict lock is a lock ensuring the mutex is locked on the scope of the lock * There is no single way to define a strict lock as the strict_lock and * nesteed_strict_lock shows. So we need a metafunction that states if a * lock is a strict lock "sur parole". */ template struct is_strict_lock_sur_parolle : false_type {}; template struct is_strict_lock_sur_parole : is_strict_lock_sur_parolle {}; template struct is_strict_lock : is_strict_lock_sur_parole {}; } #include #endif passenger-4.0.37/ext/boost/thread/lock_types.hpp000644 000765 000024 00000101432 12233035540 022277 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_LOCK_TYPES_HPP #define BOOST_THREAD_LOCK_TYPES_HPP #include #include #include #include #include #if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS #include #endif #include #include #ifdef BOOST_THREAD_USES_CHRONO #include #include #endif #include #include namespace boost { struct xtime; template class shared_lock; template class upgrade_lock; template class unique_lock; namespace detail { template class try_lock_wrapper; } #ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES namespace sync { template struct is_basic_lockable > { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_lockable > { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_basic_lockable > { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_lockable > { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_basic_lockable > { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_lockable > { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_basic_lockable > { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_lockable > { BOOST_STATIC_CONSTANT(bool, value = true); }; } #endif template class unique_lock { private: Mutex* m; bool is_locked; private: explicit unique_lock(upgrade_lock&); unique_lock& operator=(upgrade_lock& other); public: typedef Mutex mutex_type; BOOST_THREAD_MOVABLE_ONLY( unique_lock) #if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF. #if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) unique_lock(const volatile unique_lock&); #endif #endif unique_lock()BOOST_NOEXCEPT : m(0),is_locked(false) {} explicit unique_lock(Mutex& m_) : m(&m_), is_locked(false) { lock(); } unique_lock(Mutex& m_, adopt_lock_t) : m(&m_), is_locked(true) { #if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS BOOST_ASSERT(is_locked_by_this_thread(m)); #endif } unique_lock(Mutex& m_, defer_lock_t)BOOST_NOEXCEPT: m(&m_),is_locked(false) {} unique_lock(Mutex& m_, try_to_lock_t) : m(&m_), is_locked(false) { try_lock(); } #if defined BOOST_THREAD_USES_DATETIME template unique_lock(Mutex& m_,TimeDuration const& target_time): m(&m_),is_locked(false) { timed_lock(target_time); } unique_lock(Mutex& m_,system_time const& target_time): m(&m_),is_locked(false) { timed_lock(target_time); } #endif #ifdef BOOST_THREAD_USES_CHRONO template unique_lock(Mutex& mtx, const chrono::time_point& t) : m(&mtx), is_locked(mtx.try_lock_until(t)) { } template unique_lock(Mutex& mtx, const chrono::duration& d) : m(&mtx), is_locked(mtx.try_lock_for(d)) { } #endif unique_lock(BOOST_THREAD_RV_REF(unique_lock) other) BOOST_NOEXCEPT: m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked) { BOOST_THREAD_RV(other).is_locked=false; BOOST_THREAD_RV(other).m=0; } BOOST_THREAD_EXPLICIT_LOCK_CONVERSION unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock BOOST_THREAD_RV_REF_END other); #ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION //std-2104 unique_lock move-assignment should not be noexcept unique_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_lock BOOST_THREAD_RV_REF_END other) //BOOST_NOEXCEPT { unique_lock temp(::boost::move(other)); swap(temp); return *this; } #endif //std-2104 unique_lock move-assignment should not be noexcept unique_lock& operator=(BOOST_THREAD_RV_REF(unique_lock) other) //BOOST_NOEXCEPT { unique_lock temp(::boost::move(other)); swap(temp); return *this; } #if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF. #if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) unique_lock& operator=(unique_lock other) { swap(other); return *this; } #endif // BOOST_WORKAROUND #endif // Conversion from upgrade locking unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock BOOST_THREAD_RV_REF_END ul, try_to_lock_t) : m(0),is_locked(false) { if (BOOST_THREAD_RV(ul).owns_lock()) { if (BOOST_THREAD_RV(ul).mutex()->try_unlock_upgrade_and_lock()) { m = BOOST_THREAD_RV(ul).release(); is_locked = true; } } else { m = BOOST_THREAD_RV(ul).release(); } } #ifdef BOOST_THREAD_USES_CHRONO template unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock BOOST_THREAD_RV_REF_END ul, const chrono::time_point& abs_time) : m(0),is_locked(false) { if (BOOST_THREAD_RV(ul).owns_lock()) { if (BOOST_THREAD_RV(ul).mutex()->try_unlock_upgrade_and_lock_until(abs_time)) { m = BOOST_THREAD_RV(ul).release(); is_locked = true; } } else { m = BOOST_THREAD_RV(ul).release(); } } template unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock BOOST_THREAD_RV_REF_END ul, const chrono::duration& rel_time) : m(0),is_locked(false) { if (BOOST_THREAD_RV(ul).owns_lock()) { if (BOOST_THREAD_RV(ul).mutex()->try_unlock_upgrade_and_lock_for(rel_time)) { m = BOOST_THREAD_RV(ul).release(); is_locked = true; } } else { m = BOOST_THREAD_RV(ul).release(); } } #endif #ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS // Conversion from shared locking unique_lock(BOOST_THREAD_RV_REF_BEG shared_lock BOOST_THREAD_RV_REF_END sl, try_to_lock_t) : m(0),is_locked(false) { if (BOOST_THREAD_RV(sl).owns_lock()) { if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock()) { m = BOOST_THREAD_RV(sl).release(); is_locked = true; } } else { m = BOOST_THREAD_RV(sl).release(); } } #ifdef BOOST_THREAD_USES_CHRONO template unique_lock(BOOST_THREAD_RV_REF_BEG shared_lock BOOST_THREAD_RV_REF_END sl, const chrono::time_point& abs_time) : m(0),is_locked(false) { if (BOOST_THREAD_RV(sl).owns_lock()) { if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_until(abs_time)) { m = BOOST_THREAD_RV(sl).release(); is_locked = true; } } else { m = BOOST_THREAD_RV(sl).release(); } } template unique_lock(BOOST_THREAD_RV_REF_BEG shared_lock BOOST_THREAD_RV_REF_END sl, const chrono::duration& rel_time) : m(0),is_locked(false) { if (BOOST_THREAD_RV(sl).owns_lock()) { if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_for(rel_time)) { m = BOOST_THREAD_RV(sl).release(); is_locked = true; } } else { m = BOOST_THREAD_RV(sl).release(); } } #endif // BOOST_THREAD_USES_CHRONO #endif // BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS void swap(unique_lock& other)BOOST_NOEXCEPT { std::swap(m,other.m); std::swap(is_locked,other.is_locked); } ~unique_lock() { if (owns_lock()) { m->unlock(); } } void lock() { if (m == 0) { boost::throw_exception( boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex")); } if (owns_lock()) { boost::throw_exception( boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex")); } m->lock(); is_locked = true; } bool try_lock() { if (m == 0) { boost::throw_exception( boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex")); } if (owns_lock()) { boost::throw_exception( boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex")); } is_locked = m->try_lock(); return is_locked; } #if defined BOOST_THREAD_USES_DATETIME template bool timed_lock(TimeDuration const& relative_time) { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex")); } is_locked=m->timed_lock(relative_time); return is_locked; } bool timed_lock(::boost::system_time const& absolute_time) { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex")); } is_locked=m->timed_lock(absolute_time); return is_locked; } bool timed_lock(::boost::xtime const& absolute_time) { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex")); } is_locked=m->timed_lock(absolute_time); return is_locked; } #endif #ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_for(const chrono::duration& rel_time) { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex")); } is_locked=m->try_lock_for(rel_time); return is_locked; } template bool try_lock_until(const chrono::time_point& abs_time) { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost unique_lock owns already the mutex")); } is_locked=m->try_lock_until(abs_time); return is_locked; } #endif void unlock() { if (m == 0) { boost::throw_exception( boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock has no mutex")); } if (!owns_lock()) { boost::throw_exception( boost::lock_error(system::errc::operation_not_permitted, "boost unique_lock doesn't own the mutex")); } m->unlock(); is_locked = false; } #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) typedef void (unique_lock::*bool_type)(); operator bool_type() const BOOST_NOEXCEPT { return is_locked?&unique_lock::lock:0; } bool operator!() const BOOST_NOEXCEPT { return !owns_lock(); } #else explicit operator bool() const BOOST_NOEXCEPT { return owns_lock(); } #endif bool owns_lock() const BOOST_NOEXCEPT { return is_locked; } Mutex* mutex() const BOOST_NOEXCEPT { return m; } Mutex* release()BOOST_NOEXCEPT { Mutex* const res=m; m=0; is_locked=false; return res; } friend class shared_lock ; friend class upgrade_lock ; }; template void swap(unique_lock& lhs, unique_lock& rhs) BOOST_NOEXCEPT { lhs.swap(rhs); } BOOST_THREAD_DCL_MOVABLE_BEG(Mutex) unique_lock BOOST_THREAD_DCL_MOVABLE_END template class shared_lock { protected: Mutex* m; bool is_locked; public: typedef Mutex mutex_type; BOOST_THREAD_MOVABLE_ONLY(shared_lock) shared_lock() BOOST_NOEXCEPT: m(0),is_locked(false) {} explicit shared_lock(Mutex& m_): m(&m_),is_locked(false) { lock(); } shared_lock(Mutex& m_,adopt_lock_t): m(&m_),is_locked(true) { #if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS BOOST_ASSERT(is_locked_by_this_thread(m)); #endif } shared_lock(Mutex& m_,defer_lock_t) BOOST_NOEXCEPT: m(&m_),is_locked(false) {} shared_lock(Mutex& m_,try_to_lock_t): m(&m_),is_locked(false) { try_lock(); } #if defined BOOST_THREAD_USES_DATETIME shared_lock(Mutex& m_,system_time const& target_time): m(&m_),is_locked(false) { timed_lock(target_time); } #endif #ifdef BOOST_THREAD_USES_CHRONO template shared_lock(Mutex& mtx, const chrono::time_point& t) : m(&mtx), is_locked(mtx.try_lock_shared_until(t)) { } template shared_lock(Mutex& mtx, const chrono::duration& d) : m(&mtx), is_locked(mtx.try_lock_shared_for(d)) { } #endif shared_lock(BOOST_THREAD_RV_REF_BEG shared_lock BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT: m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked) { BOOST_THREAD_RV(other).is_locked=false; BOOST_THREAD_RV(other).m=0; } BOOST_THREAD_EXPLICIT_LOCK_CONVERSION shared_lock(BOOST_THREAD_RV_REF_BEG unique_lock BOOST_THREAD_RV_REF_END other): m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked) { if(is_locked) { m->unlock_and_lock_shared(); } BOOST_THREAD_RV(other).is_locked=false; BOOST_THREAD_RV(other).m=0; } BOOST_THREAD_EXPLICIT_LOCK_CONVERSION shared_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock BOOST_THREAD_RV_REF_END other): m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked) { if(is_locked) { m->unlock_upgrade_and_lock_shared(); } BOOST_THREAD_RV(other).is_locked=false; BOOST_THREAD_RV(other).m=0; } //std-2104 unique_lock move-assignment should not be noexcept shared_lock& operator=(BOOST_THREAD_RV_REF_BEG shared_lock BOOST_THREAD_RV_REF_END other) //BOOST_NOEXCEPT { shared_lock temp(::boost::move(other)); swap(temp); return *this; } #ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION shared_lock& operator=(BOOST_THREAD_RV_REF_BEG unique_lock BOOST_THREAD_RV_REF_END other) { shared_lock temp(::boost::move(other)); swap(temp); return *this; } shared_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_lock BOOST_THREAD_RV_REF_END other) { shared_lock temp(::boost::move(other)); swap(temp); return *this; } #endif void swap(shared_lock& other) BOOST_NOEXCEPT { std::swap(m,other.m); std::swap(is_locked,other.is_locked); } Mutex* mutex() const BOOST_NOEXCEPT { return m; } Mutex* release() BOOST_NOEXCEPT { Mutex* const res=m; m=0; is_locked=false; return res; } ~shared_lock() { if(owns_lock()) { m->unlock_shared(); } } void lock() { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex")); } m->lock_shared(); is_locked=true; } bool try_lock() { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex")); } is_locked=m->try_lock_shared(); return is_locked; } #if defined BOOST_THREAD_USES_DATETIME bool timed_lock(boost::system_time const& target_time) { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex")); } is_locked=m->timed_lock_shared(target_time); return is_locked; } template bool timed_lock(Duration const& target_time) { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex")); } is_locked=m->timed_lock_shared(target_time); return is_locked; } #endif #ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_for(const chrono::duration& rel_time) { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex")); } is_locked=m->try_lock_shared_for(rel_time); return is_locked; } template bool try_lock_until(const chrono::time_point& abs_time) { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex")); } is_locked=m->try_lock_shared_until(abs_time); return is_locked; } #endif void unlock() { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex")); } if(!owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock doesn't own the mutex")); } m->unlock_shared(); is_locked=false; } #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) typedef void (shared_lock::*bool_type)(); operator bool_type() const BOOST_NOEXCEPT { return is_locked?&shared_lock::lock:0; } bool operator!() const BOOST_NOEXCEPT { return !owns_lock(); } #else explicit operator bool() const BOOST_NOEXCEPT { return owns_lock(); } #endif bool owns_lock() const BOOST_NOEXCEPT { return is_locked; } }; BOOST_THREAD_DCL_MOVABLE_BEG(Mutex) shared_lock BOOST_THREAD_DCL_MOVABLE_END template void swap(shared_lock& lhs,shared_lock& rhs) BOOST_NOEXCEPT { lhs.swap(rhs); } template class upgrade_lock { protected: Mutex* m; bool is_locked; public: typedef Mutex mutex_type; BOOST_THREAD_MOVABLE_ONLY( upgrade_lock) upgrade_lock()BOOST_NOEXCEPT: m(0),is_locked(false) {} explicit upgrade_lock(Mutex& m_) : m(&m_), is_locked(false) { lock(); } upgrade_lock(Mutex& m_, adopt_lock_t) : m(&m_), is_locked(true) { #if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS BOOST_ASSERT(is_locked_by_this_thread(m)); #endif } upgrade_lock(Mutex& m_, defer_lock_t)BOOST_NOEXCEPT: m(&m_),is_locked(false) {} upgrade_lock(Mutex& m_, try_to_lock_t) : m(&m_), is_locked(false) { try_lock(); } #ifdef BOOST_THREAD_USES_CHRONO template upgrade_lock(Mutex& mtx, const chrono::time_point& t) : m(&mtx), is_locked(mtx.try_lock_upgrade_until(t)) { } template upgrade_lock(Mutex& mtx, const chrono::duration& d) : m(&mtx), is_locked(mtx.try_lock_upgrade_for(d)) { } #endif upgrade_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT: m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked) { BOOST_THREAD_RV(other).is_locked=false; BOOST_THREAD_RV(other).m=0; } BOOST_THREAD_EXPLICIT_LOCK_CONVERSION upgrade_lock(BOOST_THREAD_RV_REF_BEG unique_lock BOOST_THREAD_RV_REF_END other): m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked) { if(is_locked) { m->unlock_and_lock_upgrade(); } BOOST_THREAD_RV(other).is_locked=false; BOOST_THREAD_RV(other).m=0; } //std-2104 unique_lock move-assignment should not be noexcept upgrade_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_lock BOOST_THREAD_RV_REF_END other) //BOOST_NOEXCEPT { upgrade_lock temp(::boost::move(other)); swap(temp); return *this; } #ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION upgrade_lock& operator=(BOOST_THREAD_RV_REF_BEG unique_lock BOOST_THREAD_RV_REF_END other) { upgrade_lock temp(::boost::move(other)); swap(temp); return *this; } #endif #ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS // Conversion from shared locking upgrade_lock(BOOST_THREAD_RV_REF_BEG shared_lock BOOST_THREAD_RV_REF_END sl, try_to_lock_t) : m(0),is_locked(false) { if (BOOST_THREAD_RV(sl).owns_lock()) { if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_upgrade()) { m = BOOST_THREAD_RV(sl).release(); is_locked = true; } } else { m = BOOST_THREAD_RV(sl).release(); } } #ifdef BOOST_THREAD_USES_CHRONO template upgrade_lock(BOOST_THREAD_RV_REF_BEG shared_lock BOOST_THREAD_RV_REF_END sl, const chrono::time_point& abs_time) : m(0),is_locked(false) { if (BOOST_THREAD_RV(sl).owns_lock()) { if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_upgrade_until(abs_time)) { m = BOOST_THREAD_RV(sl).release(); is_locked = true; } } else { m = BOOST_THREAD_RV(sl).release(); } } template upgrade_lock(BOOST_THREAD_RV_REF_BEG shared_lock BOOST_THREAD_RV_REF_END sl, const chrono::duration& rel_time) : m(0),is_locked(false) { if (BOOST_THREAD_RV(sl).owns_lock()) { if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_upgrade_for(rel_time)) { m = BOOST_THREAD_RV(sl).release(); is_locked = true; } } else { m = BOOST_THREAD_RV(sl).release(); } } #endif // BOOST_THREAD_USES_CHRONO #endif // BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS void swap(upgrade_lock& other)BOOST_NOEXCEPT { std::swap(m,other.m); std::swap(is_locked,other.is_locked); } Mutex* mutex() const BOOST_NOEXCEPT { return m; } Mutex* release()BOOST_NOEXCEPT { Mutex* const res=m; m=0; is_locked=false; return res; } ~upgrade_lock() { if (owns_lock()) { m->unlock_upgrade(); } } void lock() { if (m == 0) { boost::throw_exception( boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex")); } if (owns_lock()) { boost::throw_exception( boost::lock_error(system::errc::resource_deadlock_would_occur, "boost upgrade_lock owns already the mutex")); } m->lock_upgrade(); is_locked = true; } bool try_lock() { if (m == 0) { boost::throw_exception( boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex")); } if (owns_lock()) { boost::throw_exception( boost::lock_error(system::errc::resource_deadlock_would_occur, "boost upgrade_lock owns already the mutex")); } is_locked = m->try_lock_upgrade(); return is_locked; } void unlock() { if (m == 0) { boost::throw_exception( boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex")); } if (!owns_lock()) { boost::throw_exception( boost::lock_error(system::errc::operation_not_permitted, "boost upgrade_lock doesn't own the mutex")); } m->unlock_upgrade(); is_locked = false; } #ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_for(const chrono::duration& rel_time) { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex")); } is_locked=m->try_lock_upgrade_for(rel_time); return is_locked; } template bool try_lock_until(const chrono::time_point& abs_time) { if(m==0) { boost::throw_exception(boost::lock_error(system::errc::operation_not_permitted, "boost shared_lock has no mutex")); } if(owns_lock()) { boost::throw_exception(boost::lock_error(system::errc::resource_deadlock_would_occur, "boost shared_lock owns already the mutex")); } is_locked=m->try_lock_upgrade_until(abs_time); return is_locked; } #endif #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) typedef void (upgrade_lock::*bool_type)(); operator bool_type() const BOOST_NOEXCEPT { return is_locked?&upgrade_lock::lock:0; } bool operator!() const BOOST_NOEXCEPT { return !owns_lock(); } #else explicit operator bool() const BOOST_NOEXCEPT { return owns_lock(); } #endif bool owns_lock() const BOOST_NOEXCEPT { return is_locked; } friend class shared_lock ; friend class unique_lock ; }; template void swap(upgrade_lock& lhs, upgrade_lock& rhs) BOOST_NOEXCEPT { lhs.swap(rhs); } BOOST_THREAD_DCL_MOVABLE_BEG(Mutex) upgrade_lock BOOST_THREAD_DCL_MOVABLE_END template unique_lock::unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock BOOST_THREAD_RV_REF_END other): m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked) { if(is_locked) { m->unlock_upgrade_and_lock(); } BOOST_THREAD_RV(other).release(); } template class upgrade_to_unique_lock { private: upgrade_lock* source; unique_lock exclusive; public: typedef Mutex mutex_type; BOOST_THREAD_MOVABLE_ONLY( upgrade_to_unique_lock) explicit upgrade_to_unique_lock(upgrade_lock& m_) : source(&m_), exclusive(::boost::move(*source)) { } ~upgrade_to_unique_lock() { if (source) { *source = BOOST_THREAD_MAKE_RV_REF(upgrade_lock (::boost::move(exclusive))); } } upgrade_to_unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_to_unique_lock BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT: source(BOOST_THREAD_RV(other).source),exclusive(::boost::move(BOOST_THREAD_RV(other).exclusive)) { BOOST_THREAD_RV(other).source=0; } //std-2104 unique_lock move-assignment should not be noexcept upgrade_to_unique_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_to_unique_lock BOOST_THREAD_RV_REF_END other) //BOOST_NOEXCEPT { upgrade_to_unique_lock temp(other); swap(temp); return *this; } void swap(upgrade_to_unique_lock& other)BOOST_NOEXCEPT { std::swap(source,other.source); exclusive.swap(other.exclusive); } #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) typedef void (upgrade_to_unique_lock::*bool_type)(upgrade_to_unique_lock&); operator bool_type() const BOOST_NOEXCEPT { return exclusive.owns_lock()?&upgrade_to_unique_lock::swap:0; } bool operator!() const BOOST_NOEXCEPT { return !owns_lock(); } #else explicit operator bool() const BOOST_NOEXCEPT { return owns_lock(); } #endif bool owns_lock() const BOOST_NOEXCEPT { return exclusive.owns_lock(); } }; BOOST_THREAD_DCL_MOVABLE_BEG(Mutex) upgrade_to_unique_lock BOOST_THREAD_DCL_MOVABLE_END namespace detail { template class try_lock_wrapper: private unique_lock { typedef unique_lock base; public: BOOST_THREAD_MOVABLE_ONLY(try_lock_wrapper) try_lock_wrapper() {} explicit try_lock_wrapper(Mutex& m): base(m,try_to_lock) {} try_lock_wrapper(Mutex& m_,adopt_lock_t): base(m_,adopt_lock) { #if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS BOOST_ASSERT(is_locked_by_this_thread(m_)); #endif } try_lock_wrapper(Mutex& m_,defer_lock_t): base(m_,defer_lock) {} try_lock_wrapper(Mutex& m_,try_to_lock_t): base(m_,try_to_lock) {} #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES try_lock_wrapper(BOOST_THREAD_RV_REF(try_lock_wrapper) other): base(::boost::move(other)) {} #elif defined BOOST_THREAD_USES_MOVE try_lock_wrapper(BOOST_THREAD_RV_REF(try_lock_wrapper) other): base(::boost::move(static_cast(other))) {} #else try_lock_wrapper(BOOST_THREAD_RV_REF(try_lock_wrapper) other): base(BOOST_THREAD_RV_REF(base)(*other)) {} #endif try_lock_wrapper& operator=(BOOST_THREAD_RV_REF_BEG try_lock_wrapper BOOST_THREAD_RV_REF_END other) { try_lock_wrapper temp(other); swap(temp); return *this; } void swap(try_lock_wrapper& other) { base::swap(other); } void lock() { base::lock(); } bool try_lock() { return base::try_lock(); } void unlock() { base::unlock(); } bool owns_lock() const { return base::owns_lock(); } Mutex* mutex() const { return base::mutex(); } Mutex* release() { return base::release(); } #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) typedef typename base::bool_type bool_type; operator bool_type() const { return base::operator bool_type(); } bool operator!() const { return !this->owns_lock(); } #else explicit operator bool() const { return owns_lock(); } #endif }; template void swap(try_lock_wrapper& lhs,try_lock_wrapper& rhs) { lhs.swap(rhs); } } } #include #endif passenger-4.0.37/ext/boost/thread/lockable_adapter.hpp000644 000765 000024 00000013363 12233035540 023404 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Vicente J. Botet Escriba 2008-2009,2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/thread for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_THREAD_LOCKABLE_ADAPTER_HPP #define BOOST_THREAD_LOCKABLE_ADAPTER_HPP #include #include namespace boost { //[basic_lockable_adapter template class basic_lockable_adapter { public: typedef BasicLockable mutex_type; protected: mutex_type& lockable() const { return lockable_; } mutable mutex_type lockable_; /*< mutable so that it can be modified by const functions >*/ public: BOOST_THREAD_NO_COPYABLE( basic_lockable_adapter) /*< no copyable >*/ basic_lockable_adapter() {} void lock() { lockable().lock(); } void unlock() { lockable().unlock(); } }; //] //[lockable_adapter template class lockable_adapter : public basic_lockable_adapter { public: typedef Lockable mutex_type; bool try_lock() { return this->lockable().try_lock(); } }; //] //[timed_lockable_adapter template class timed_lockable_adapter: public lockable_adapter { public: typedef TimedLock mutex_type; template bool try_lock_until(chrono::time_point const & abs_time) { return this->lockable().try_lock_until(abs_time); } template bool try_lock_for(chrono::duration const & rel_time) { return this->lockable().try_lock_for(rel_time); } }; //] //[shared_lockable_adapter template class shared_lockable_adapter: public timed_lockable_adapter { public: typedef SharableLock mutex_type; void lock_shared() { this->lockable().lock_shared(); } bool try_lock_shared() { return this->lockable().try_lock_shared(); } void unlock_shared() { this->lockable().unlock_shared(); } template bool try_lock_shared_until(chrono::time_point const & abs_time) { return this->lockable().try_lock_shared_until(abs_time); } template bool try_lock_shared_for(chrono::duration const & rel_time) { return this->lockable().try_lock_shared_for(rel_time); } }; //] //[upgrade_lockable_adapter template class upgrade_lockable_adapter: public shared_lockable_adapter { public: typedef UpgradableLock mutex_type; void lock_upgrade() { this->lockable().lock_upgrade(); } bool try_lock_upgrade() { return this->lockable().try_lock_upgrade(); } void unlock_upgrade() { this->lockable().unlock_upgrade(); } template bool try_lock_upgrade_until(chrono::time_point const & abs_time) { return this->lockable().try_lock_upgrade_until(abs_time); } template bool try_lock_upgrade_for(chrono::duration const & rel_time) { return this->lockable().try_lock_upgrade_for(rel_time); } bool try_unlock_shared_and_lock() { return this->lockable().try_unlock_shared_and_lock(); } template bool try_unlock_shared_and_lock_until(chrono::time_point const & abs_time) { return this->lockable().try_unlock_shared_and_lock_until(abs_time); } template bool try_unlock_shared_and_lock_for(chrono::duration const & rel_time) { return this->lockable().try_unlock_shared_and_lock_for(rel_time); } void unlock_and_lock_shared() { this->lockable().unlock_and_lock_shared(); } bool try_unlock_shared_and_lock_upgrade() { return this->lockable().try_unlock_shared_and_lock_upgrade(); } template bool try_unlock_shared_and_lock_upgrade_until(chrono::time_point const & abs_time) { return this->lockable().try_unlock_shared_and_lock_upgrade_until(abs_time); } template bool try_unlock_shared_and_lock_upgrade_for(chrono::duration const & rel_time) { return this->lockable().try_unlock_shared_and_lock_upgrade_for(rel_time); } void unlock_and_lock_upgrade() { this->lockable().unlock_and_lock_upgrade(); } void unlock_upgrade_and_lock() { this->lockable().unlock_upgrade_and_lock(); } bool try_unlock_upgrade_and_lock() { return this->lockable().try_unlock_upgrade_and_lock(); } template bool try_unlock_upgrade_and_lock_until(chrono::time_point const & abs_time) { return this->lockable().try_unlock_upgrade_and_lock_until(abs_time); } template bool try_unlock_upgrade_and_lock_for(chrono::duration const & rel_time) { return this->lockable().try_unlock_upgrade_and_lock_for(rel_time); } void unlock_upgrade_and_lock_shared() { this->lockable().unlock_upgrade_and_lock_shared(); } }; //] } #endif passenger-4.0.37/ext/boost/thread/lockable_concepts.hpp000644 000765 000024 00000010022 12233035540 023567 0ustar00honglistaff000000 000000 // (C) Copyright 2012 Vicente Botet // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_LOCKABLE_CONCEPTS_HPP #define BOOST_THREAD_LOCKABLE_CONCEPTS_HPP #include #include namespace boost { /** * BasicLockable object supports the basic features * required to delimit a critical region * Supports the basic lock and unlock functions. */ //[BasicLockable template struct BasicLockable { BOOST_CONCEPT_USAGE(BasicLockable) { l.lock(); l.unlock(); } BasicLockable() : l(*static_cast(0)) {} private: BasicLockable operator=(BasicLockable const&); Mutex& l; } ; //] /** * Lockable extends BasicLockable * with try_lock functions. */ //[Lockable template struct Lockable { BOOST_CONCEPT_ASSERT(( BasicLockable )); BOOST_CONCEPT_USAGE(Lockable) { if (l.try_lock()) return; } Lockable() : l(*static_cast(0)) {} private: Lockable operator=(Lockable const&); Mutex& l; }; //] /** * TimedLockable object extends Lockable * with timed lock functions: try_lock_until and try_lock_for and the exception based lock_until and lock_for */ //[TimedLockable template struct TimedLockable { BOOST_CONCEPT_ASSERT(( Lockable )); BOOST_CONCEPT_USAGE(TimedLockable) { if (l.try_lock_until(t)) return; if (l.try_lock_for(d)) return; } TimedLockable() : l(*static_cast(0)) {} private: TimedLockable operator=(TimedLockable const&); Mutex& l; chrono::system_clock::time_point t; chrono::system_clock::duration d; }; //] /** * SharedLockable object extends TimedLockable * with the lock_shared, lock_shared_until, lock_shared_for, try_lock_shared_until, try_lock_shared * and unlock_shared functions */ //[SharedLockable template struct SharedLockable { BOOST_CONCEPT_ASSERT(( TimedLockable )); BOOST_CONCEPT_USAGE(SharedLockable) { l.lock_shared(); l.unlock_shared(); if (l.try_lock_shared()) return; if (l.try_lock_shared_until(t)) return; if (l.try_lock_shared_for(d)) return; } SharedLockable() : l(*static_cast(0)) {} private: SharedLockable operator=(SharedLockable const&); Mutex& l; chrono::system_clock::time_point t; chrono::system_clock::duration d; }; //] /** * UpgradeLockable object extends SharedLockable * with the lock_upgrade, lock_upgrade_until, unlock_upgrade_and_lock, * unlock_and_lock_shared and unlock_upgrade_and_lock_shared functions */ //[UpgradeLockable template struct UpgradeLockable { BOOST_CONCEPT_ASSERT(( SharedLockable )); BOOST_CONCEPT_USAGE(UpgradeLockable) { l.lock_upgrade(); l.unlock_upgrade(); if (l.try_lock_upgrade()) return; if (l.try_lock_upgrade_until(t)) return; if (l.try_lock_upgrade_for(d)) return; if (l.try_unlock_shared_and_lock()) return; if (l.try_unlock_shared_and_lock_until(t)) return; if (l.try_unlock_shared_and_lock_for(d)) return; l.unlock_and_lock_shared(); if (l.try_unlock_shared_and_lock_upgrade()) return; if (l.try_unlock_shared_and_lock_upgrade_until(t)) return; if (l.try_unlock_shared_and_lock_upgrade_for(d)) return; l.unlock_and_lock_upgrade(); l.unlock_upgrade_and_lock(); if (l.try_unlock_upgrade_and_lock()) return; if (l.try_unlock_upgrade_and_lock_until(t)) return; if (l.try_unlock_upgrade_and_lock_for(d)) return; l.unlock_upgrade_and_lock_shared(); } UpgradeLockable() : l(*static_cast(0)) {} private: UpgradeLockable operator=(UpgradeLockable const&); Mutex& l; chrono::system_clock::time_point t; chrono::system_clock::duration d; }; //] } #endif passenger-4.0.37/ext/boost/thread/lockable_traits.hpp000644 000765 000024 00000015444 12233035540 023274 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_LOCKABLE_TRAITS_HPP #define BOOST_THREAD_LOCKABLE_TRAITS_HPP #include #include #include #include #include // todo make use of integral_constant, true_type and false_type namespace boost { namespace sync { #if defined(BOOST_NO_SFINAE) || \ BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) || \ BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) #if ! defined BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES #define BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES #endif #endif #ifndef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES namespace detail { #define BOOST_THREAD_DEFINE_HAS_MEMBER_CALLED(member_name) \ template::value> \ struct has_member_called_##member_name \ { \ BOOST_STATIC_CONSTANT(bool, value=false); \ }; \ \ template \ struct has_member_called_##member_name \ { \ typedef char true_type; \ struct false_type \ { \ true_type dummy[2]; \ }; \ \ struct fallback { int member_name; }; \ struct derived: \ T, fallback \ { \ derived(); \ }; \ \ template struct tester; \ \ template \ static false_type has_member(tester<&U::member_name>*); \ template \ static true_type has_member(...); \ \ BOOST_STATIC_CONSTANT( \ bool, value=sizeof(has_member(0))==sizeof(true_type)); \ } BOOST_THREAD_DEFINE_HAS_MEMBER_CALLED(lock) ; BOOST_THREAD_DEFINE_HAS_MEMBER_CALLED(unlock); BOOST_THREAD_DEFINE_HAS_MEMBER_CALLED(try_lock); template::value > struct has_member_lock { BOOST_STATIC_CONSTANT(bool, value=false); }; template struct has_member_lock { typedef char true_type; struct false_type { true_type dummy[2]; }; template static true_type has_member(V (U::*)()); template static false_type has_member(U); BOOST_STATIC_CONSTANT( bool,value=sizeof(has_member_lock::has_member(&T::lock))==sizeof(true_type)); }; template::value > struct has_member_unlock { BOOST_STATIC_CONSTANT(bool, value=false); }; template struct has_member_unlock { typedef char true_type; struct false_type { true_type dummy[2]; }; template static true_type has_member(V (U::*)()); template static false_type has_member(U); BOOST_STATIC_CONSTANT( bool,value=sizeof(has_member_unlock::has_member(&T::unlock))==sizeof(true_type)); }; template::value > struct has_member_try_lock { BOOST_STATIC_CONSTANT(bool, value=false); }; template struct has_member_try_lock { typedef char true_type; struct false_type { true_type dummy[2]; }; template static true_type has_member(bool (U::*)()); template static false_type has_member(U); BOOST_STATIC_CONSTANT( bool,value=sizeof(has_member_try_lock::has_member(&T::try_lock))==sizeof(true_type)); }; } template struct is_basic_lockable { BOOST_STATIC_CONSTANT(bool, value = detail::has_member_lock::value && detail::has_member_unlock::value); }; template struct is_lockable { BOOST_STATIC_CONSTANT(bool, value = is_basic_lockable::value && detail::has_member_try_lock::value); }; #else template struct is_basic_lockable { BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_lockable { BOOST_STATIC_CONSTANT(bool, value = false); }; #endif template struct is_recursive_mutex_sur_parole { BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_recursive_mutex_sur_parolle : is_recursive_mutex_sur_parole { }; template struct is_recursive_basic_lockable { BOOST_STATIC_CONSTANT(bool, value = is_basic_lockable::value && is_recursive_mutex_sur_parolle::value); }; template struct is_recursive_lockable { BOOST_STATIC_CONSTANT(bool, value = is_lockable::value && is_recursive_mutex_sur_parolle::value); }; } template struct is_mutex_type { BOOST_STATIC_CONSTANT(bool, value = sync::is_lockable::value); }; } #include #endif passenger-4.0.37/ext/boost/thread/locks.hpp000644 000765 000024 00000001016 12233035540 021233 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_LOCKS_HPP #define BOOST_THREAD_LOCKS_HPP #include #include #include #include #include #endif passenger-4.0.37/ext/boost/thread/mutex.hpp000644 000765 000024 00000002216 12233035540 021265 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_MUTEX_HPP #define BOOST_THREAD_MUTEX_HPP // mutex.hpp // // (C) Copyright 2007 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #if defined(BOOST_THREAD_PLATFORM_WIN32) #include #elif defined(BOOST_THREAD_PLATFORM_PTHREAD) #include #else #error "Boost threads unavailable on this platform" #endif #include namespace boost { namespace sync { #ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES template<> struct is_basic_lockable { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_lockable { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_basic_lockable { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_lockable { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif } } #endif passenger-4.0.37/ext/boost/thread/null_mutex.hpp000644 000765 000024 00000014312 12233035540 022317 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Vicente J. Botet Escriba 2008-2009,2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/thread for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_THREAD_NULL_MUTEX_HPP #define BOOST_THREAD_NULL_MUTEX_HPP #include #include #include /// \file /// Describes null_mutex class namespace boost { /// Implements a mutex that simulates a mutex without doing any operation and /// simulates a successful operation. class null_mutex { public: BOOST_THREAD_NO_COPYABLE( null_mutex) /*< no copyable >*/ null_mutex() {} /// Simulates a mutex lock() operation. Empty function. void lock() { } /// Simulates a mutex try_lock() operation. /// Equivalent to "return true;" bool try_lock() { return true; } /// Simulates a mutex unlock() operation. /// Empty function. void unlock() { } #ifdef BOOST_THREAD_USES_CHRONO /// Simulates a mutex try_lock_until() operation. /// Equivalent to "return true;" template bool try_lock_until(chrono::time_point const &) { return true; } /// Simulates a mutex try_lock_for() operation. /// Equivalent to "return true;" template bool try_lock_for(chrono::duration const &) { return true; } #endif /// Simulates a mutex lock_shared() operation. /// Empty function. void lock_shared() { } /// Simulates a mutex try_lock_shared() operation. /// Equivalent to "return true;" bool try_lock_shared() { return true; } /// Simulates a mutex unlock_shared() operation. /// Empty function. void unlock_shared() { } /// Simulates a mutex try_lock_shared_until() operation. /// Equivalent to "return true;" template bool try_lock_shared_until(chrono::time_point const &) { return true; } /// Simulates a mutex try_lock_shared_for() operation. /// Equivalent to "return true;" template bool try_lock_shared_for(chrono::duration const &) { return true; } /// Simulates a mutex lock_upgrade() operation. /// Empty function. void lock_upgrade() { } /// Simulates a mutex try_lock_upgrade() operation. /// Equivalent to "return true;" bool try_lock_upgrade() { return true; } /// Simulates a mutex unlock_upgrade() operation. /// Empty function. void unlock_upgrade() { } /// Simulates a mutex try_lock_upgrade_until() operation. /// Equivalent to "return true;" template bool try_lock_upgrade_until(chrono::time_point const &) { return true; } /// Simulates a mutex try_lock_upgrade_for() operation. /// Equivalent to "return true;" template bool try_lock_upgrade_for(chrono::duration const &) { return true; } /// Simulates a mutex try_unlock_shared_and_lock() operation. /// Equivalent to "return true;" bool try_unlock_shared_and_lock() { return true; } #ifdef BOOST_THREAD_USES_CHRONO /// Simulates a mutex try_unlock_shared_and_lock_until() operation. /// Equivalent to "return true;" template bool try_unlock_shared_and_lock_until(chrono::time_point const &) { return true; } /// Simulates a mutex try_unlock_shared_and_lock_for() operation. /// Equivalent to "return true;" template bool try_unlock_shared_and_lock_for(chrono::duration const &) { return true; } #endif /// Simulates unlock_and_lock_shared(). /// Empty function. void unlock_and_lock_shared() { } /// Simulates a mutex try_unlock_shared_and_lock_upgrade() operation. /// Equivalent to "return true;" bool try_unlock_shared_and_lock_upgrade() { return true; } #ifdef BOOST_THREAD_USES_CHRONO /// Simulates a mutex try_unlock_shared_and_lock_upgrade_until() operation. /// Equivalent to "return true;" template bool try_unlock_shared_and_lock_upgrade_until(chrono::time_point const &) { return true; } /// Simulates a mutex try_unlock_shared_and_lock_upgrade_for() operation. /// Equivalent to "return true;" template bool try_unlock_shared_and_lock_upgrade_for(chrono::duration const &) { return true; } #endif /// Simulates unlock_and_lock_upgrade(). /// Empty function. void unlock_and_lock_upgrade() { } /// Simulates unlock_upgrade_and_lock(). /// Empty function. void unlock_upgrade_and_lock() { } /// Simulates a mutex try_unlock_upgrade_and_lock() operation. /// Equivalent to "return true;" bool try_unlock_upgrade_and_lock() { return true; } #ifdef BOOST_THREAD_USES_CHRONO /// Simulates a mutex try_unlock_upgrade_and_lock_until() operation. /// Equivalent to "return true;" template bool try_unlock_upgrade_and_lock_until(chrono::time_point const &) { return true; } /// Simulates a mutex try_unlock_upgrade_and_lock_for() operation. /// Equivalent to "return true;" template bool try_unlock_upgrade_and_lock_for(chrono::duration const &) { return true; } #endif /// Simulates unlock_upgrade_and_lock_shared(). /// Empty function. void unlock_upgrade_and_lock_shared() { } }; } //namespace boost { #endif passenger-4.0.37/ext/boost/thread/once.hpp000644 000765 000024 00000002226 12233035540 021050 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_ONCE_HPP #define BOOST_THREAD_ONCE_HPP // once.hpp // // (C) Copyright 2006-7 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #if defined(BOOST_THREAD_PLATFORM_WIN32) #include #elif defined(BOOST_THREAD_PLATFORM_PTHREAD) #if defined BOOST_THREAD_ONCE_FAST_EPOCH #include #elif defined BOOST_THREAD_ONCE_ATOMIC #include #else #error "Once Not Implemented" #endif #else #error "Boost threads unavailable on this platform" #endif #include namespace boost { // template void // call_once(once_flag& flag, Callable&& func, Args&&... args); template inline void call_once(Function func,once_flag& flag) //inline void call_once(void (*func)(),once_flag& flag) { call_once(flag,func); } } #include #endif passenger-4.0.37/ext/boost/thread/poly_lockable.hpp000644 000765 000024 00000003376 12233035540 022752 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Vicente J. Botet Escriba 2008-2009,2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/thread for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_THREAD_POLY_LOCKABLE_HPP #define BOOST_THREAD_POLY_LOCKABLE_HPP #include #include namespace boost { //[basic_poly_lockable class basic_poly_lockable { public: virtual ~basic_poly_lockable() = 0; virtual void lock() = 0; virtual void unlock() = 0; }; //] //[poly_lockable class poly_lockable : public basic_poly_lockable { public: virtual ~poly_lockable() = 0; virtual bool try_lock() = 0; }; //] //[timed_poly_lockable class timed_poly_lockable: public poly_lockable { public: virtual ~timed_poly_lockable()=0; virtual bool try_lock_until(chrono::system_clock::time_point const & abs_time)=0; virtual bool try_lock_until(chrono::steady_clock::time_point const & abs_time)=0; template bool try_lock_until(chrono::time_point const & abs_time) { return try_lock_until(time_point_cast(abs_time)); } virtual bool try_lock_for(chrono::nanoseconds const & relative_time)=0; template bool try_lock_for(chrono::duration const & rel_time) { return try_lock_for(duration_cast(rel_time)); } }; //] } #endif passenger-4.0.37/ext/boost/thread/poly_lockable_adapter.hpp000644 000765 000024 00000004114 12233035540 024441 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Vicente J. Botet Escriba 2008-2009,2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/thread for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_THREAD_POLY_LOCKABLE_ADAPTER_HPP #define BOOST_THREAD_POLY_LOCKABLE_ADAPTER_HPP #include namespace boost { //[poly_basic_lockable_adapter template class poly_basic_lockable_adapter : public Base { public: typedef Mutex mutex_type; protected: mutex_type& mtx() const { return mtx_; } mutable mutex_type mtx_; /*< mutable so that it can be modified by const functions >*/ public: BOOST_THREAD_NO_COPYABLE( poly_basic_lockable_adapter) /*< no copyable >*/ poly_basic_lockable_adapter() {} void lock() { mtx().lock(); } void unlock() { mtx().unlock(); } }; //] //[poly_lockable_adapter template class poly_lockable_adapter : public poly_basic_lockable_adapter { public: typedef Mutex mutex_type; bool try_lock() { return this->mtx().try_lock(); } }; //] //[poly_timed_lockable_adapter template class poly_timed_lockable_adapter: public poly_lockable_adapter { public: typedef Mutex mutex_type; bool try_lock_until(chrono::system_clock::time_point const & abs_time) { return this->mtx().try_lock_until(abs_time); } bool try_lock_until(chrono::steady_clock::time_point const & abs_time) { return this->mtx().try_lock_until(abs_time); } bool try_lock_for(chrono::nanoseconds const & rel_time) { return this->mtx().try_lock_for(rel_time); } }; //] } #endif passenger-4.0.37/ext/boost/thread/poly_shared_lockable.hpp000644 000765 000024 00000012412 12233035540 024267 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Vicente J. Botet Escriba 2008-2009,2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/thread for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_THREAD_POLY_SHARED_LOCKABLE_HPP #define BOOST_THREAD_POLY_SHARED_LOCKABLE_HPP #include #include namespace boost { //[shared_poly_lockable class shared_poly_lockable: public timed_poly_lockable { public: virtual ~shared_poly_lockable() = 0; virtual void lock_shared() = 0; virtual bool try_lock_shared() = 0; virtual void unlock_shared() = 0; virtual bool try_lock_shared_until(chrono::system_clock::time_point const & abs_time)=0; virtual bool try_lock_shared_until(chrono::steady_clock::time_point const & abs_time)=0; template bool try_lock_shared_until(chrono::time_point const & abs_time) { return try_lock_shared_until(time_point_cast(abs_time)); } virtual bool try_lock_shared_for(chrono::nanoseconds const & relative_time)=0; template bool try_lock_shared_for(chrono::duration const & rel_time) { return try_lock_shared_for(duration_cast(rel_time)); } }; //] //[upgrade_poly_lockable class upgrade_poly_lockable: public shared_poly_lockable { public: virtual ~upgrade_poly_lockable() = 0; virtual void lock_upgrade() = 0; virtual bool try_lock_upgrade() = 0; virtual void unlock_upgrade() = 0; virtual bool try_lock_upgrade_until(chrono::system_clock::time_point const & abs_time)=0; virtual bool try_lock_upgrade_until(chrono::steady_clock::time_point const & abs_time)=0; template bool try_lock_upgrade_until(chrono::time_point const & abs_time) { return try_lock_upgrade_until(time_point_cast(abs_time)); } virtual bool try_lock_upgrade_for(chrono::nanoseconds const & relative_time)=0; template bool try_lock_upgrade_for(chrono::duration const & rel_time) { return try_lock_upgrade_for(duration_cast(rel_time)); } virtual bool try_unlock_shared_and_lock() = 0; virtual bool try_unlock_shared_and_lock_until(chrono::system_clock::time_point const & abs_time)=0; virtual bool try_unlock_shared_and_lock_until(chrono::steady_clock::time_point const & abs_time)=0; template bool try_unlock_shared_and_lock_until(chrono::time_point const & abs_time) { return try_unlock_shared_and_lock_until(time_point_cast(abs_time)); } virtual bool try_unlock_shared_and_lock_for(chrono::nanoseconds const & relative_time)=0; template bool try_unlock_shared_and_lock_for(chrono::duration const & rel_time) { return try_unlock_shared_and_lock_for(duration_cast(rel_time)); } virtual void unlock_and_lock_shared() = 0; virtual bool try_unlock_shared_and_lock_upgrade() = 0; virtual bool try_unlock_shared_and_lock_upgrade_until(chrono::system_clock::time_point const & abs_time)=0; virtual bool try_unlock_shared_and_lock_upgrade_until(chrono::steady_clock::time_point const & abs_time)=0; template bool try_unlock_shared_and_lock_upgrade_until(chrono::time_point const & abs_time) { return try_unlock_shared_and_lock_upgrade_until(time_point_cast(abs_time)); } virtual bool try_unlock_shared_and_lock_upgrade_for(chrono::nanoseconds const & relative_time)=0; template bool try_unlock_shared_and_lock_upgrade_for(chrono::duration const & rel_time) { return try_unlock_shared_and_lock_upgrade_for(duration_cast(rel_time)); } virtual void unlock_and_lock_upgrade() = 0; virtual void unlock_upgrade_and_lock() = 0; virtual bool try_unlock_upgrade_and_lock() = 0; virtual bool try_unlock_upgrade_and_lock_until(chrono::system_clock::time_point const & abs_time)=0; virtual bool try_unlock_upgrade_and_lock_until(chrono::steady_clock::time_point const & abs_time)=0; template bool try_unlock_upgrade_and_lock_until(chrono::time_point const & abs_time) { return try_unlock_upgrade_and_lock_until(time_point_cast(abs_time)); } virtual bool try_unlock_upgrade_and_lock_for(chrono::nanoseconds const & relative_time)=0; template bool try_unlock_upgrade_and_lock_for(chrono::duration const & rel_time) { return try_unlock_upgrade_and_lock_for(duration_cast(rel_time)); } virtual void unlock_upgrade_and_lock_shared() = 0; }; //] } #endif passenger-4.0.37/ext/boost/thread/poly_shared_lockable_adapter.hpp000644 000765 000024 00000011321 12233035540 025765 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Vicente J. Botet Escriba 2008-2009,2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/thread for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_THREAD_POLY_SHARED_LOCKABLE_ADAPTER_HPP #define BOOST_THREAD_POLY_SHARED_LOCKABLE_ADAPTER_HPP #include #include namespace boost { //[shared_lockable_adapter template class poly_shared_lockable_adapter: public poly_timed_lockable_adapter { public: typedef Mutex mutex_type; void lock_shared() { this->mtx().lock_shared(); } bool try_lock_shared() { return this->mtx().try_lock_shared(); } void unlock_shared() { this->mtx().unlock_shared(); } bool try_lock_shared_until(chrono::system_clock::time_point const & abs_time) { return this->mtx().try_lock_shared_until(abs_time); } bool try_lock_shared_until(chrono::steady_clock::time_point const & abs_time) { return this->mtx().try_lock_shared_until(abs_time); } bool try_lock_shared_for(chrono::nanoseconds const & rel_time) { return this->mtx().try_lock_shared_for(rel_time); } }; //] //[upgrade_lockable_adapter template class upgrade_lockable_adapter: public shared_lockable_adapter { public: typedef Mutex mutex_type; void lock_upgrade() { this->mtx().lock_upgrade(); } bool try_lock_upgrade() { return this->mtx().try_lock_upgrade(); } void unlock_upgrade() { this->mtx().unlock_upgrade(); } bool try_lock_upgrade_until(chrono::system_clock::time_point const & abs_time) { return this->mtx().try_lock_upgrade_until(abs_time); } bool try_lock_upgrade_until(chrono::steady_clock::time_point const & abs_time) { return this->mtx().try_lock_upgrade_until(abs_time); } bool try_lock_upgrade_for(chrono::nanoseconds const & rel_time) { return this->mtx().try_lock_upgrade_for(rel_time); } bool try_unlock_shared_and_lock() { return this->mtx().try_unlock_shared_and_lock(); } bool try_unlock_shared_and_lock_until(chrono::system_clock::time_point const & abs_time) { return this->mtx().try_unlock_shared_and_lock_until(abs_time); } bool try_unlock_shared_and_lock_until(chrono::steady_clock::time_point const & abs_time) { return this->mtx().try_unlock_shared_and_lock_until(abs_time); } template bool try_unlock_shared_and_lock_for(chrono::nanoseconds const & rel_time) { return this->mtx().try_unlock_shared_and_lock_for(rel_time); } void unlock_and_lock_shared() { this->mtx().unlock_and_lock_shared(); } bool try_unlock_shared_and_lock_upgrade() { return this->mtx().try_unlock_shared_and_lock_upgrade(); } bool try_unlock_shared_and_lock_upgrade_until(chrono::system_clock::time_point const & abs_time) { return this->mtx().try_unlock_shared_and_lock_upgrade_until(abs_time); } bool try_unlock_shared_and_lock_upgrade_until(chrono::steady_clock::time_point const & abs_time) { return this->mtx().try_unlock_shared_and_lock_upgrade_until(abs_time); } bool try_unlock_shared_and_lock_upgrade_for(chrono::nanoseconds const & rel_time) { return this->mtx().try_unlock_shared_and_lock_upgrade_for(rel_time); } void unlock_and_lock_upgrade() { this->mtx().unlock_and_lock_upgrade(); } void unlock_upgrade_and_lock() { this->mtx().unlock_upgrade_and_lock(); } bool try_unlock_upgrade_and_lock() { return this->mtx().try_unlock_upgrade_and_lock(); } bool try_unlock_upgrade_and_lock_until(chrono::system_clock::time_point const & abs_time) { return this->mtx().try_unlock_upgrade_and_lock_until(abs_time); } bool try_unlock_upgrade_and_lock_until(chrono::steady_clock::time_point const & abs_time) { return this->mtx().try_unlock_upgrade_and_lock_until(abs_time); } bool try_unlock_upgrade_and_lock_for(chrono::nanoseconds const & rel_time) { return this->mtx().try_unlock_upgrade_and_lock_for(rel_time); } void unlock_upgrade_and_lock_shared() { this->mtx().unlock_upgrade_and_lock_shared(); } }; //] } #endif passenger-4.0.37/ext/boost/thread/pthread/000755 000765 000024 00000000000 12233035540 021040 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/thread/recursive_mutex.hpp000644 000765 000024 00000002777 12233035540 023370 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_RECURSIVE_MUTEX_HPP #define BOOST_THREAD_RECURSIVE_MUTEX_HPP // recursive_mutex.hpp // // (C) Copyright 2007 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #if defined(BOOST_THREAD_PLATFORM_WIN32) #include #elif defined(BOOST_THREAD_PLATFORM_PTHREAD) #include #else #error "Boost threads unavailable on this platform" #endif #include namespace boost { namespace sync { #ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES template<> struct is_basic_lockable { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_lockable { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_basic_lockable { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_lockable { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template<> struct is_recursive_mutex_sur_parolle { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_recursive_mutex_sur_parolle { BOOST_STATIC_CONSTANT(bool, value = true); }; } } #endif passenger-4.0.37/ext/boost/thread/reverse_lock.hpp000644 000765 000024 00000002444 12233035540 022611 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_REVERSE_LOCK_HPP #define BOOST_THREAD_REVERSE_LOCK_HPP #include #include #include #include #include namespace boost { template class reverse_lock { public: typedef typename Lock::mutex_type mutex_type; BOOST_THREAD_NO_COPYABLE(reverse_lock) explicit reverse_lock(Lock& m_) : m(m_), mtx(0) { if (m.owns_lock()) { m.unlock(); } mtx=m.release(); } ~reverse_lock() { if (mtx) { mtx->lock(); m = BOOST_THREAD_MAKE_RV_REF(Lock(*mtx, adopt_lock)); } } private: Lock& m; mutex_type* mtx; }; #ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES template struct is_mutex_type > { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif } #endif // header passenger-4.0.37/ext/boost/thread/scoped_thread.hpp000644 000765 000024 00000017626 12233035540 022742 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2009-2012 Anthony Williams // (C) Copyright 2012 Vicente J. Botet Escriba // Based on the Anthony's idea of scoped_thread in CCiA #ifndef BOOST_THREAD_SCOPED_THREAD_HPP #define BOOST_THREAD_SCOPED_THREAD_HPP #include #include #include #include #include #include namespace boost { /** * RAI @c thread wrapper adding a specific destroyer allowing to master what can be done at destruction time. * * CallableThread: A callable void(thread&) . * The default is a join_if_joinable. * * thread std/boost::thread destructor terminates the program if the thread is not joinable. * Having a wrapper that can join the thread before destroying it seems a natural need. * * Example: * * boost::strict_scoped_thread<> t((boost::thread(F))); * */ template class strict_scoped_thread { thread t_; struct dummy; public: BOOST_THREAD_NO_COPYABLE( strict_scoped_thread) /// non copyable /* * */ #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template explicit strict_scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(Args)... args, typename disable_if::type, thread>, dummy* >::type=0) : t_(boost::forward(f), boost::forward(args)...) {} #else template explicit strict_scoped_thread(BOOST_THREAD_FWD_REF(F) f, typename disable_if::type, thread>, dummy* >::type=0) : t_(boost::forward(f)) {} template strict_scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1) : t_(boost::forward(f), boost::forward(a1)) {} template strict_scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1, BOOST_THREAD_FWD_REF(A2) a2) : t_(boost::forward(f), boost::forward(a1), boost::forward(a2)) {} template strict_scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1, BOOST_THREAD_FWD_REF(A2) a2, BOOST_THREAD_FWD_REF(A3) a3) : t_(boost::forward(f), boost::forward(a1), boost::forward(a2), boost::forward(a3)) {} #endif /** * Constructor from the thread to own. * * @param t: the thread to own. * * Effects: move the thread to own @c t. */ explicit strict_scoped_thread(BOOST_THREAD_RV_REF(thread) t) BOOST_NOEXCEPT : t_(boost::move(t)) { } /** * Destructor * Effects: Call the CallableThread functor before destroying the owned thread. * Remark: The CallableThread should not throw when joining the thread as the scoped variable is on a scope outside the thread function. */ ~strict_scoped_thread() { CallableThread on_destructor; on_destructor(t_); } }; /** * RAI @c thread wrapper adding a specific destroyer allowing to master what can be done at destruction time. * * CallableThread: A callable void(thread&) . * The default is join_if_joinable. * * thread std::thread destructor terminates the program if the thread is not joinable. * Having a wrapper that can join the thread before destroying it seems a natural need. * * Remark: @c scoped_thread is not a @c thread as @c thread is not designed to be derived from as a polymorphic type. * Anyway @c scoped_thread can be used in most of the contexts a @c thread could be used as it has the * same non-deprecated interface with the exception of the construction. * * Example: * * boost::scoped_thread<> t((boost::thread(F))); * t.interrupt(); * */ template class scoped_thread { thread t_; struct dummy; public: typedef thread::id id; BOOST_THREAD_MOVABLE_ONLY( scoped_thread) /// Movable only /** * Default Constructor. * * Effects: wraps a not-a-thread. */ scoped_thread() BOOST_NOEXCEPT: t_() { } /** * */ #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template explicit scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(Args)... args, typename disable_if::type, thread>, dummy* >::type=0) : t_(boost::forward(f), boost::forward(args)...) {} #else template explicit scoped_thread(BOOST_THREAD_FWD_REF(F) f, typename disable_if::type, thread>, dummy* >::type=0) : t_(boost::forward(f)) {} template scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1) : t_(boost::forward(f), boost::forward(a1)) {} template scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1, BOOST_THREAD_FWD_REF(A2) a2) : t_(boost::forward(f), boost::forward(a1), boost::forward(a2)) {} template scoped_thread(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1, BOOST_THREAD_FWD_REF(A2) a2, BOOST_THREAD_FWD_REF(A3) a3) : t_(boost::forward(f), boost::forward(a1), boost::forward(a2), boost::forward(a3)) {} #endif /** * Constructor from the thread to own. * * @param t: the thread to own. * * Effects: move the thread to own @c t. */ explicit scoped_thread(BOOST_THREAD_RV_REF(thread) t) BOOST_NOEXCEPT : t_(boost::move(t)) { } // explicit operator thread() // { // return boost::move(t_); // } /** * Move constructor. */ scoped_thread(BOOST_RV_REF(scoped_thread) x) BOOST_NOEXCEPT : t_(boost::move(x.t_)) {} /** * Destructor * * Effects: Call the CallableThread functor before destroying the owned thread. */ ~scoped_thread() { CallableThread on_destructor; on_destructor(t_); } /** * Move assignment. */ scoped_thread& operator=(BOOST_RV_REF(scoped_thread) x) { t_ = boost::move(x.t_); return *this; } /** * */ void swap(scoped_thread& x) BOOST_NOEXCEPT { t_.swap(x.t_); } // forwarded thread functions inline thread::id get_id() const BOOST_NOEXCEPT { return t_.get_id(); } void detach() { t_.detach(); } void join() { t_.join(); } #ifdef BOOST_THREAD_USES_CHRONO template bool try_join_for(const chrono::duration& rel_time) { return t_.try_join_for(rel_time); } template bool try_join_until(const chrono::time_point& abs_time) { return t_.try_join_until(abs_time); } #endif thread::native_handle_type native_handle()BOOST_NOEXCEPT { return t_.native_handle(); } bool joinable() const BOOST_NOEXCEPT { return t_.joinable(); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS void interrupt() { t_.interrupt(); } bool interruption_requested() const BOOST_NOEXCEPT { return t_.interruption_requested(); } #endif static unsigned hardware_concurrency()BOOST_NOEXCEPT { return thread::hardware_concurrency(); } }; /** * Effects: swaps the contents of two scoped threads. */ template void swap(scoped_thread& lhs, scoped_thread& rhs) BOOST_NOEXCEPT { return lhs.swap(rhs); } } #include #endif passenger-4.0.37/ext/boost/thread/shared_lock_guard.hpp000644 000765 000024 00000002250 12233035540 023561 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_SHARED_LOCK_GUARD_HPP #define BOOST_THREAD_SHARED_LOCK_GUARD_HPP #include //#include #include #include namespace boost { template class shared_lock_guard { private: SharedMutex& m; public: typedef SharedMutex mutex_type; BOOST_THREAD_NO_COPYABLE(shared_lock_guard) explicit shared_lock_guard(SharedMutex& m_): m(m_) { m.lock_shared(); } shared_lock_guard(SharedMutex& m_,adopt_lock_t): m(m_) {} ~shared_lock_guard() { m.unlock_shared(); } }; #ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES template struct is_mutex_type > { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif } #endif // header passenger-4.0.37/ext/boost/thread/shared_mutex.hpp000644 000765 000024 00000002265 12233035540 022617 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_SHARED_MUTEX_HPP #define BOOST_THREAD_SHARED_MUTEX_HPP // shared_mutex.hpp // // (C) Copyright 2007 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #if defined(BOOST_THREAD_PLATFORM_WIN32) #if defined(BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN) #include #else #include #endif #elif defined(BOOST_THREAD_PLATFORM_PTHREAD) //#include #include #else #error "Boost threads unavailable on this platform" #endif #include namespace boost { namespace sync { #ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES template<> struct is_basic_lockable { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_lockable { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif } } #endif passenger-4.0.37/ext/boost/thread/strict_lock.hpp000644 000765 000024 00000014146 12233035540 022450 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2008-2009,2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_STRICT_LOCK_HPP #define BOOST_THREAD_STRICT_LOCK_HPP #include #include #include #include #include #include #include #include #include #include #include namespace boost { //[strict_lock template class strict_lock { BOOST_CONCEPT_ASSERT(( BasicLockable )); public: typedef Lockable mutex_type; // construct/copy/destroy: BOOST_THREAD_NO_COPYABLE( strict_lock) /** * Constructor from a mutex reference. * * @param mtx the mutex to lock. * * __Effects: Stores a reference to the mutex to lock and locks it. * __Throws: Any exception BasicMutex::lock() can throw. */ explicit strict_lock(mutex_type& mtx) : mtx_(mtx) { mtx.lock(); } /*< locks on construction >*/ #if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST strict_lock(std::initializer_list > l_) : mtx_(*(const_cast*>(l_.begin())->m)) { mtx_.lock(); } #endif /** * Destructor * * __Effects: unlocks the stored mutex. * * __Throws */ ~strict_lock() { mtx_.unlock(); } /*< unlocks on destruction >*/ // observers /** * @return the owned mutex. */ mutex_type* mutex() const BOOST_NOEXCEPT { return &mtx_; } /** * @return whether this lock is locking a mutex. */ bool owns_lock() const BOOST_NOEXCEPT { return true; } /** * @return whether this lock is locking that mutex. */ bool owns_lock(const mutex_type* l) const BOOST_NOEXCEPT { return l == mutex(); } /*< strict locks specific function >*/ //BOOST_ADRESS_OF_DELETE(strict_lock) /*< disable aliasing >*/ //BOOST_HEAP_ALLOCATION_DELETE(strict_lock) /*< disable heap allocation >*/ /*< no possibility to unlock >*/ private: mutex_type& mtx_; }; //] template struct is_strict_lock_sur_parole > : true_type { }; /** * A nested strict lock is a scoped lock guard ensuring the mutex is locked on its * scope, by taking ownership of an nesting lock, locking the mutex on construction if not already locked * and restoring the ownership to the nesting lock on destruction. */ //[nested_strict_lock template class nested_strict_lock { BOOST_CONCEPT_ASSERT(( BasicLock )); /*< The Lock must be a movable lock >*/ public: typedef typename Lock::mutex_type mutex_type; /*< Name the lockable type locked by Lock >*/ BOOST_THREAD_NO_COPYABLE( nested_strict_lock) /** * Constructor from a nesting @c Lock. * * @param lk the nesting lock * * __Requires: lk.mutex() != null_ptr * __Effects: Stores the reference to the lock parameter and takes ownership on it. * If the lock doesn't owns the mutex @c mtx lock it. * __Postconditions: @c owns_lock(lk.mutex()) * __StrongException * __Throws: * * - lock_error when BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED is defined and lk.mutex() == null_ptr * * - Any exception that @c lk.lock() can throw. * */ explicit nested_strict_lock(Lock& lk) : lk_(lk) /*< Store reference to lk >*/ { /*< Define BOOST_THREAD_DONT_CHECK_PRECONDITIONS if you don't want to check lk ownership >*/ BOOST_THREAD_ASSERT_PRECONDITION( lk.mutex() != 0, lock_error() ); if (!lk.owns_lock()) lk.lock(); /*< ensures it is locked >*/ tmp_lk_ = move(lk); /*< Move ownership to temporary lk >*/ } #if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST nested_strict_lock(std::initializer_list > l_) : lk_(*(const_cast*>(l_.begin())->m)) { /*< Define BOOST_THREAD_DONT_CHECK_PRECONDITIONS if you don't want to check lk ownership >*/ BOOST_THREAD_ASSERT_PRECONDITION( lk_.mutex() != 0, lock_error() ); if (!lk_.owns_lock()) lk_.lock(); /*< ensures it is locked >*/ tmp_lk_ = move(lk_); /*< Move ownership to temporary lk >*/ } #endif /** * Destructor * * __Effects: Restores ownership to the nesting lock. */ ~nested_strict_lock()BOOST_NOEXCEPT { lk_ = move(tmp_lk_); /*< Move ownership to nesting lock >*/ } // observers /** * return @c the owned mutex. */ mutex_type* mutex() const BOOST_NOEXCEPT { return tmp_lk_.mutex(); } /** * @return whether this lock is locking a mutex. */ bool owns_lock() const BOOST_NOEXCEPT { return true; } /** * @return whether if this lock is locking that mutex. */ bool owns_lock(mutex_type const* l) const BOOST_NOEXCEPT { return l == mutex(); } //BOOST_ADRESS_OF_DELETE(nested_strict_lock) //BOOST_HEAP_ALLOCATEION_DELETE(nested_strict_lock) private: Lock& lk_; Lock tmp_lk_; }; //] template struct is_strict_lock_sur_parole > : true_type { }; #if ! defined BOOST_THREAD_NO_MAKE_STRICT_LOCK template strict_lock make_strict_lock(Lockable& mtx) { return { thread_detail::lockable_wrapper(mtx) }; } template nested_strict_lock make_nested_strict_lock(Lock& lk) { return { thread_detail::lockable_wrapper(lk) }; } #endif } #include #endif passenger-4.0.37/ext/boost/thread/sync_bounded_queue.hpp000644 000765 000024 00000033252 12233035540 024007 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_SYNC_BOUNDED_QUEUE_HPP #define BOOST_THREAD_SYNC_BOUNDED_QUEUE_HPP ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Vicente J. Botet Escriba 2013. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/thread for documentation. // ////////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include #include #include namespace boost { BOOST_SCOPED_ENUM_DECLARE_BEGIN(queue_op_status) { success = 0, empty, full, closed, busy } BOOST_SCOPED_ENUM_DECLARE_END(queue_op_status) struct no_block_tag{}; BOOST_CONSTEXPR_OR_CONST no_block_tag no_block = {}; struct sync_queue_is_closed : std::exception {}; template class sync_bounded_queue { public: typedef ValueType value_type; typedef std::size_t size_type; // Constructors/Assignment/Destructors BOOST_THREAD_NO_COPYABLE(sync_bounded_queue) explicit sync_bounded_queue(size_type max_elems); template sync_bounded_queue(size_type max_elems, Range range); ~sync_bounded_queue(); // Observers bool empty() const; bool full() const; size_type capacity() const; size_type size() const; bool closed() const; // Modifiers void close(); void push(const value_type& x); void push(BOOST_THREAD_RV_REF(value_type) x); bool try_push(const value_type& x); bool try_push(BOOST_THREAD_RV_REF(value_type) x); bool try_push(no_block_tag, const value_type& x); bool try_push(no_block_tag, BOOST_THREAD_RV_REF(value_type) x); // Observers/Modifiers void pull(value_type&); void pull(ValueType& elem, bool & closed); // enable_if is_nothrow_copy_movable value_type pull(); shared_ptr ptr_pull(); bool try_pull(value_type&); bool try_pull(no_block_tag,value_type&); shared_ptr try_pull(); private: mutable mutex mtx_; condition_variable not_empty_; condition_variable not_full_; size_type waiting_full_; size_type waiting_empty_; value_type* data_; size_type in_; size_type out_; size_type capacity_; bool closed_; size_type inc(size_type idx) const BOOST_NOEXCEPT { return (idx + 1) % capacity_; } bool empty(unique_lock& ) const BOOST_NOEXCEPT { return in_ == out_; } bool empty(lock_guard& ) const BOOST_NOEXCEPT { return in_ == out_; } size_type capacity(lock_guard& ) const BOOST_NOEXCEPT { return capacity; } size_type size(lock_guard& ) const BOOST_NOEXCEPT { return ((out_+capacity_-in_) % capacity_)-1; } void throw_if_closed(unique_lock&); bool try_pull(value_type& x, unique_lock& lk); bool try_push(const value_type& x, unique_lock& lk); bool try_push(BOOST_THREAD_RV_REF(value_type) x, unique_lock& lk); shared_ptr try_pull(unique_lock& lk); void wait_until_not_empty(unique_lock& lk); void wait_until_not_empty(unique_lock& lk, bool&); size_type wait_until_not_full(unique_lock& lk); size_type wait_until_not_full(unique_lock& lk, bool&); void notify_not_empty_if_needed(unique_lock& lk) { if (waiting_empty_ > 0) { --waiting_empty_; lk.unlock(); not_empty_.notify_one(); } } void notify_not_full_if_needed(unique_lock& lk) { if (waiting_full_ > 0) { --waiting_full_; lk.unlock(); not_full_.notify_one(); } } void pull(value_type& elem, unique_lock& lk) { elem = boost::move(data_[out_]); out_ = inc(out_); notify_not_full_if_needed(lk); } boost::shared_ptr ptr_pull(unique_lock& lk) { shared_ptr res = make_shared(boost::move(data_[out_])); out_ = inc(out_); notify_not_full_if_needed(lk); return res; } void set_in(size_type in, unique_lock& lk) { in_ = in; notify_not_empty_if_needed(lk); } void push_at(const value_type& elem, size_type in_p_1, unique_lock& lk) { data_[in_] = elem; set_in(in_p_1, lk); } void push_at(BOOST_THREAD_RV_REF(value_type) elem, size_type in_p_1, unique_lock& lk) { data_[in_] = boost::move(elem); set_in(in_p_1, lk); } }; template sync_bounded_queue::sync_bounded_queue(typename sync_bounded_queue::size_type max_elems) : waiting_full_(0), waiting_empty_(0), data_(new value_type[max_elems + 1]), in_(0), out_(0), capacity_(max_elems + 1), closed_(false) { BOOST_ASSERT_MSG(max_elems >= 1, "number of elements must be > 1"); } // template // template // sync_bounded_queue::sync_bounded_queue(size_type max_elems, Range range) : // waiting_full_(0), waiting_empty_(0), data_(new value_type[max_elems + 1]), in_(0), out_(0), capacity_(max_elems + 1), // closed_(false) // { // BOOST_ASSERT_MSG(max_elems >= 1, "number of elements must be > 1"); // BOOST_ASSERT_MSG(max_elems == size(range), "number of elements must match range's size"); // try // { // typedef typename Range::iterator iterator_t; // iterator_t first = boost::begin(range); // iterator_t end = boost::end(range); // size_type in = 0; // for (iterator_t cur = first; cur != end; ++cur, ++in) // { // data_[in] = *cur; // } // set_in(in); // } // catch (...) // { // delete[] data_; // } // } template sync_bounded_queue::~sync_bounded_queue() { delete[] data_; } template void sync_bounded_queue::close() { { lock_guard lk(mtx_); closed_ = true; } not_empty_.notify_all(); not_full_.notify_all(); } template bool sync_bounded_queue::closed() const { lock_guard lk(mtx_); return closed_; } template bool sync_bounded_queue::empty() const { lock_guard lk(mtx_); return empty(lk); } template bool sync_bounded_queue::full() const { lock_guard lk(mtx_); return full(lk); } template typename sync_bounded_queue::size_type sync_bounded_queue::capacity() const { lock_guard lk(mtx_); return capacity(lk); } template typename sync_bounded_queue::size_type sync_bounded_queue::size() const { lock_guard lk(mtx_); return size(lk); } template bool sync_bounded_queue::try_pull(ValueType& elem, unique_lock& lk) { if (empty(lk)) { throw_if_closed(lk); return false; } pull(elem, lk); return true; } template shared_ptr sync_bounded_queue::try_pull(unique_lock& lk) { if (empty(lk)) { throw_if_closed(lk); return shared_ptr(); } return ptr_pull(lk); } template bool sync_bounded_queue::try_pull(ValueType& elem) { try { unique_lock lk(mtx_); return try_pull(elem, lk); } catch (...) { close(); throw; } } template bool sync_bounded_queue::try_pull(no_block_tag,ValueType& elem) { try { unique_lock lk(mtx_, try_to_lock); if (!lk.owns_lock()) { return false; } return try_pull(elem, lk); } catch (...) { close(); throw; } } template boost::shared_ptr sync_bounded_queue::try_pull() { try { unique_lock lk(mtx_); return try_pull(lk); } catch (...) { close(); throw; } } template void sync_bounded_queue::throw_if_closed(unique_lock&) { if (closed_) { BOOST_THROW_EXCEPTION( sync_queue_is_closed() ); } } template void sync_bounded_queue::wait_until_not_empty(unique_lock& lk) { for (;;) { if (out_ != in_) break; throw_if_closed(lk); ++waiting_empty_; not_empty_.wait(lk); } } template void sync_bounded_queue::wait_until_not_empty(unique_lock& lk, bool & closed) { for (;;) { if (out_ != in_) break; if (closed_) {closed=true; return;} ++waiting_empty_; not_empty_.wait(lk); } } template void sync_bounded_queue::pull(ValueType& elem) { try { unique_lock lk(mtx_); wait_until_not_empty(lk); pull(elem, lk); } catch (...) { close(); throw; } } template void sync_bounded_queue::pull(ValueType& elem, bool & closed) { try { unique_lock lk(mtx_); wait_until_not_empty(lk, closed); if (closed) {return;} pull(elem, lk); } catch (...) { close(); throw; } } // enable if ValueType is nothrow movable template ValueType sync_bounded_queue::pull() { try { value_type elem; pull(elem); return boost::move(elem); } catch (...) { close(); throw; } } template boost::shared_ptr sync_bounded_queue::ptr_pull() { try { unique_lock lk(mtx_); wait_until_not_empty(lk); return ptr_pull(lk); } catch (...) { close(); throw; } } template bool sync_bounded_queue::try_push(const ValueType& elem, unique_lock& lk) { throw_if_closed(lk); size_type in_p_1 = inc(in_); if (in_p_1 == out_) // full() { return false; } push_at(elem, in_p_1, lk); return true; } template bool sync_bounded_queue::try_push(const ValueType& elem) { try { unique_lock lk(mtx_); return try_push(elem, lk); } catch (...) { close(); throw; } } template bool sync_bounded_queue::try_push(no_block_tag, const ValueType& elem) { try { unique_lock lk(mtx_, try_to_lock); if (!lk.owns_lock()) return false; return try_push(elem, lk); } catch (...) { close(); throw; } } template typename sync_bounded_queue::size_type sync_bounded_queue::wait_until_not_full(unique_lock& lk) { for (;;) { throw_if_closed(lk); size_type in_p_1 = inc(in_); if (in_p_1 != out_) // ! full() { return in_p_1; } ++waiting_full_; not_full_.wait(lk); } } template void sync_bounded_queue::push(const ValueType& elem) { try { unique_lock lk(mtx_); push_at(elem, wait_until_not_full(lk), lk); } catch (...) { close(); throw; } } template bool sync_bounded_queue::try_push(BOOST_THREAD_RV_REF(ValueType) elem, unique_lock& lk) { throw_if_closed(lk); size_type in_p_1 = inc(in_); if (in_p_1 == out_) // full() { return false; } push_at(boost::move(elem), in_p_1, lk); return true; } template bool sync_bounded_queue::try_push(BOOST_THREAD_RV_REF(ValueType) elem) { try { unique_lock lk(mtx_); return try_push(elem, lk); } catch (...) { close(); throw; } } template bool sync_bounded_queue::try_push(no_block_tag, BOOST_THREAD_RV_REF(ValueType) elem) { try { unique_lock lk(mtx_, try_to_lock); if (!lk.owns_lock()) { return false; } return try_push(elem, lk); } catch (...) { close(); throw; } } template void sync_bounded_queue::push(BOOST_THREAD_RV_REF(ValueType) elem) { try { unique_lock lk(mtx_); push_at(elem, wait_until_not_full(lk), lk); } catch (...) { close(); throw; } } template sync_bounded_queue& operator<<(sync_bounded_queue& sbq, BOOST_THREAD_RV_REF(ValueType) elem) { sbq.push(boost::forward(elem)); return sbq; } template sync_bounded_queue& operator<<(sync_bounded_queue& sbq, ValueType const&elem) { sbq.push(elem); return sbq; } template sync_bounded_queue& operator>>(sync_bounded_queue& sbq, ValueType &elem) { sbq.pull(elem); return sbq; } } #include #endif passenger-4.0.37/ext/boost/thread/sync_queue.hpp000644 000765 000024 00000025640 12233035540 022311 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_SYNC_QUEUE_HPP #define BOOST_THREAD_SYNC_QUEUE_HPP ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Vicente J. Botet Escriba 2013. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/thread for documentation. // ////////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include #include #include #include #include namespace boost { template class sync_queue { public: typedef ValueType value_type; typedef std::size_t size_type; // Constructors/Assignment/Destructors BOOST_THREAD_NO_COPYABLE(sync_queue) sync_queue(); template explicit sync_queue(Range range); ~sync_queue(); // Observers bool empty() const; bool full() const; size_type size() const; bool closed() const; // Modifiers void close(); void push(const value_type& x); void push(BOOST_THREAD_RV_REF(value_type) x); bool try_push(const value_type& x); bool try_push(BOOST_THREAD_RV_REF(value_type) x); bool try_push(no_block_tag, const value_type& x); bool try_push(no_block_tag, BOOST_THREAD_RV_REF(value_type) x); // Observers/Modifiers void pull(value_type&); void pull(ValueType& elem, bool & closed); // enable_if is_nothrow_copy_movable value_type pull(); shared_ptr ptr_pull(); bool try_pull(value_type&); bool try_pull(no_block_tag,value_type&); shared_ptr try_pull(); private: mutable mutex mtx_; condition_variable not_empty_; size_type waiting_empty_; boost::container::deque data_; bool closed_; bool empty(unique_lock& ) const BOOST_NOEXCEPT { return data_.empty(); } bool empty(lock_guard& ) const BOOST_NOEXCEPT { return data_.empty(); } size_type size(lock_guard& ) const BOOST_NOEXCEPT { return data_.size(); } void throw_if_closed(unique_lock&); bool try_pull(value_type& x, unique_lock& lk); bool try_push(const value_type& x, unique_lock& lk); bool try_push(BOOST_THREAD_RV_REF(value_type) x, unique_lock& lk); shared_ptr try_pull(unique_lock& lk); void wait_until_not_empty(unique_lock& lk); void wait_until_not_empty(unique_lock& lk, bool&); void notify_not_empty_if_needed(unique_lock& lk) { if (waiting_empty_ > 0) { --waiting_empty_; lk.unlock(); not_empty_.notify_one(); } } void pull(value_type& elem, unique_lock& ) { elem = boost::move(data_.front()); data_.pop_front(); } boost::shared_ptr ptr_pull(unique_lock& ) { shared_ptr res = make_shared(boost::move(data_.front())); data_.pop_front(); return res; } void push(const value_type& elem, unique_lock& lk) { data_.push_back(elem); notify_not_empty_if_needed(lk); } void push(BOOST_THREAD_RV_REF(value_type) elem, unique_lock& lk) { data_.push(boost::move(elem)); notify_not_empty_if_needed(lk); } }; template sync_queue::sync_queue() : waiting_empty_(0), data_(), closed_(false) { BOOST_ASSERT(data_.empty()); } // template // template // explicit sync_queue::sync_queue(Range range) : // waiting_empty_(0), data_(), closed_(false) // { // try // { // typedef typename Range::iterator iterator_t; // iterator_t first = boost::begin(range); // iterator_t end = boost::end(range); // for (iterator_t cur = first; cur != end; ++cur) // { // data_.push(boost::move(*cur));; // } // notify_not_empty_if_needed(lk); // } // catch (...) // { // delete[] data_; // } // } template sync_queue::~sync_queue() { } template void sync_queue::close() { { lock_guard lk(mtx_); closed_ = true; } not_empty_.notify_all(); } template bool sync_queue::closed() const { lock_guard lk(mtx_); return closed_; } template bool sync_queue::empty() const { lock_guard lk(mtx_); return empty(lk); } template bool sync_queue::full() const { return false; } template typename sync_queue::size_type sync_queue::size() const { lock_guard lk(mtx_); return size(lk); } template bool sync_queue::try_pull(ValueType& elem, unique_lock& lk) { if (empty(lk)) { throw_if_closed(lk); return false; } pull(elem, lk); return true; } template shared_ptr sync_queue::try_pull(unique_lock& lk) { if (empty(lk)) { throw_if_closed(lk); return shared_ptr(); } return ptr_pull(lk); } template bool sync_queue::try_pull(ValueType& elem) { try { unique_lock lk(mtx_); return try_pull(elem, lk); } catch (...) { close(); throw; } } template bool sync_queue::try_pull(no_block_tag,ValueType& elem) { try { unique_lock lk(mtx_, try_to_lock); if (!lk.owns_lock()) { return false; } return try_pull(elem, lk); } catch (...) { close(); throw; } } template boost::shared_ptr sync_queue::try_pull() { try { unique_lock lk(mtx_); return try_pull(lk); } catch (...) { close(); throw; } } template void sync_queue::throw_if_closed(unique_lock&) { if (closed_) { BOOST_THROW_EXCEPTION( sync_queue_is_closed() ); } } template void sync_queue::wait_until_not_empty(unique_lock& lk) { for (;;) { if (! empty(lk)) break; throw_if_closed(lk); ++waiting_empty_; not_empty_.wait(lk); } } template void sync_queue::wait_until_not_empty(unique_lock& lk, bool & closed) { for (;;) { if (! empty(lk)) break; if (closed_) {closed=true; return;} ++waiting_empty_; not_empty_.wait(lk); } } template void sync_queue::pull(ValueType& elem) { try { unique_lock lk(mtx_); wait_until_not_empty(lk); pull(elem, lk); } catch (...) { close(); throw; } } template void sync_queue::pull(ValueType& elem, bool & closed) { try { unique_lock lk(mtx_); wait_until_not_empty(lk, closed); if (closed) {return;} pull(elem, lk); } catch (...) { close(); throw; } } // enable if ValueType is nothrow movable template ValueType sync_queue::pull() { try { value_type elem; pull(elem); return boost::move(elem); } catch (...) { close(); throw; } } template boost::shared_ptr sync_queue::ptr_pull() { try { unique_lock lk(mtx_); wait_until_not_empty(lk); return ptr_pull(lk); } catch (...) { close(); throw; } } template bool sync_queue::try_push(const ValueType& elem, unique_lock& lk) { throw_if_closed(lk); push(elem, lk); return true; } template bool sync_queue::try_push(const ValueType& elem) { try { unique_lock lk(mtx_); return try_push(elem, lk); } catch (...) { close(); throw; } } template bool sync_queue::try_push(no_block_tag, const ValueType& elem) { try { unique_lock lk(mtx_, try_to_lock); if (!lk.owns_lock()) return false; return try_push(elem, lk); } catch (...) { close(); throw; } } template void sync_queue::push(const ValueType& elem) { try { unique_lock lk(mtx_); throw_if_closed(lk); push(elem, lk); } catch (...) { close(); throw; } } template bool sync_queue::try_push(BOOST_THREAD_RV_REF(ValueType) elem, unique_lock& lk) { throw_if_closed(lk); push(boost::forward(elem), lk); return true; } template bool sync_queue::try_push(BOOST_THREAD_RV_REF(ValueType) elem) { try { unique_lock lk(mtx_); return try_push(elem, lk); } catch (...) { close(); throw; } } template bool sync_queue::try_push(no_block_tag, BOOST_THREAD_RV_REF(ValueType) elem) { try { unique_lock lk(mtx_, try_to_lock); if (!lk.owns_lock()) { return false; } return try_push(elem, lk); } catch (...) { close(); throw; } } template void sync_queue::push(BOOST_THREAD_RV_REF(ValueType) elem) { try { unique_lock lk(mtx_); throw_if_closed(lk); push(elem, lk); } catch (...) { close(); throw; } } template sync_queue& operator<<(sync_queue& sbq, BOOST_THREAD_RV_REF(ValueType) elem) { sbq.push(boost::forward(elem)); return sbq; } template sync_queue& operator<<(sync_queue& sbq, ValueType const&elem) { sbq.push(elem); return sbq; } template sync_queue& operator>>(sync_queue& sbq, ValueType &elem) { sbq.pull(elem); return sbq; } } #include #endif passenger-4.0.37/ext/boost/thread/synchronized_value.hpp000644 000765 000024 00000071450 12233035540 024044 0ustar00honglistaff000000 000000 // (C) Copyright 2010 Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk // (C) Copyright 2012 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_SYNCHRONIZED_VALUE_HPP #define BOOST_THREAD_SYNCHRONIZED_VALUE_HPP #include #include #include #include #include #include #include #include #include #include //#include //#include //#if ! defined BOOST_NO_CXX11_HDR_TYPE_TRAITS //#include //#endif #if ! defined(BOOST_THREAD_NO_SYNCHRONIZE) #include // todo change to once Boost.Tuple or Boost.Fusion provides Move semantics. #include #endif #include namespace boost { /** * strict lock providing a const pointer access to the synchronized value type. * * @param T the value type. * @param Lockable the mutex type protecting the value type. */ template class const_strict_lock_ptr { public: typedef T value_type; typedef Lockable mutex_type; protected: // this should be a strict_lock, but unique_lock is needed to be able to return it. boost::unique_lock lk_; T const& value_; public: BOOST_THREAD_MOVABLE_ONLY( const_strict_lock_ptr ) /** * @param value constant reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * @effects locks the mutex @c mtx, stores a reference to it and to the value type @c value. */ const_strict_lock_ptr(T const& val, Lockable & mtx) : lk_(mtx), value_(val) { } const_strict_lock_ptr(T const& val, Lockable & mtx, adopt_lock_t tag) BOOST_NOEXCEPT : lk_(mtx, tag), value_(val) { } /** * Move constructor. * @effects takes ownership of the mutex owned by @c other, stores a reference to the mutex and the value type of @c other. */ const_strict_lock_ptr(BOOST_THREAD_RV_REF(const_strict_lock_ptr) other) BOOST_NOEXCEPT : lk_(boost::move(BOOST_THREAD_RV(other).lk_)),value_(BOOST_THREAD_RV(other).value_) { } ~const_strict_lock_ptr() { } /** * @return a constant pointer to the protected value */ const T* operator->() const { return &value_; } /** * @return a constant reference to the protected value */ const T& operator*() const { return value_; } }; /** * strict lock providing a pointer access to the synchronized value type. * * @param T the value type. * @param Lockable the mutex type protecting the value type. */ template class strict_lock_ptr : public const_strict_lock_ptr { typedef const_strict_lock_ptr base_type; public: BOOST_THREAD_MOVABLE_ONLY( strict_lock_ptr ) /** * @param value reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * @effects locks the mutex @c mtx, stores a reference to it and to the value type @c value. */ strict_lock_ptr(T & val, Lockable & mtx) : base_type(val, mtx) { } strict_lock_ptr(T & val, Lockable & mtx, adopt_lock_t tag) : base_type(val, mtx, tag) { } /** * Move constructor. * @effects takes ownership of the mutex owned by @c other, stores a reference to the mutex and the value type of @c other. */ strict_lock_ptr(BOOST_THREAD_RV_REF(strict_lock_ptr) other) : base_type(boost::move(static_cast(other))) { } ~strict_lock_ptr() { } /** * @return a pointer to the protected value */ T* operator->() { return const_cast(&this->value_); } /** * @return a reference to the protected value */ T& operator*() { return const_cast(this->value_); } }; template struct synchronized_value_strict_lock_ptr { typedef strict_lock_ptr type; }; template struct synchronized_value_strict_lock_ptr { typedef const_strict_lock_ptr type; }; /** * unique_lock providing a const pointer access to the synchronized value type. * * An object of type const_unique_lock_ptr is a unique_lock that provides a const pointer access to the synchronized value type. * As unique_lock controls the ownership of a lockable object within a scope. * Ownership of the lockable object may be acquired at construction or after construction, * and may be transferred, after acquisition, to another const_unique_lock_ptr object. * Objects of type const_unique_lock_ptr are not copyable but are movable. * The behavior of a program is undefined if the mutex and the value type * pointed do not exist for the entire remaining lifetime of the const_unique_lock_ptr object. * The supplied Mutex type shall meet the BasicLockable requirements. * * @note const_unique_lock_ptr meets the Lockable requirements. * If Lockable meets the TimedLockable requirements, const_unique_lock_ptr * also meets the TimedLockable requirements. * * @param T the value type. * @param Lockable the mutex type protecting the value type. */ template class const_unique_lock_ptr : public unique_lock { typedef unique_lock base_type; public: typedef T value_type; typedef Lockable mutex_type; protected: T const& value_; public: BOOST_THREAD_MOVABLE_ONLY(const_unique_lock_ptr) /** * @param value reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * * @requires If mutex_type is not a recursive mutex the calling thread does not own the mutex. * * @effects locks the mutex @c mtx, stores a reference to it and to the value type @c value. */ const_unique_lock_ptr(T const& val, Lockable & mtx) : base_type(mtx), value_(val) { } /** * @param value reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * @param tag of type adopt_lock_t used to differentiate the constructor. * @requires The calling thread own the mutex. * @effects stores a reference to it and to the value type @c value taking ownership. */ const_unique_lock_ptr(T const& val, Lockable & mtx, adopt_lock_t) BOOST_NOEXCEPT : base_type(mtx, adopt_lock), value_(val) { } /** * @param value reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * @param tag of type defer_lock_t used to differentiate the constructor. * @effects stores a reference to it and to the value type @c value c. */ const_unique_lock_ptr(T const& val, Lockable & mtx, defer_lock_t) BOOST_NOEXCEPT : base_type(mtx, defer_lock), value_(val) { } /** * @param value reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * @param tag of type try_to_lock_t used to differentiate the constructor. * @requires If mutex_type is not a recursive mutex the calling thread does not own the mutex. * @effects try to lock the mutex @c mtx, stores a reference to it and to the value type @c value. */ const_unique_lock_ptr(T const& val, Lockable & mtx, try_to_lock_t) BOOST_NOEXCEPT : base_type(mtx, try_to_lock), value_(val) { } /** * Move constructor. * @effects takes ownership of the mutex owned by @c other, stores a reference to the mutex and the value type of @c other. */ const_unique_lock_ptr(BOOST_THREAD_RV_REF(const_unique_lock_ptr) other) BOOST_NOEXCEPT : base_type(boost::move(static_cast(other))), value_(BOOST_THREAD_RV(other).value_) { } /** * @effects If owns calls unlock() on the owned mutex. */ ~const_unique_lock_ptr() { } /** * @return a constant pointer to the protected value */ const T* operator->() const { BOOST_ASSERT (this->owns_lock()); return &value_; } /** * @return a constant reference to the protected value */ const T& operator*() const { BOOST_ASSERT (this->owns_lock()); return value_; } }; /** * unique lock providing a pointer access to the synchronized value type. * * @param T the value type. * @param Lockable the mutex type protecting the value type. */ template class unique_lock_ptr : public const_unique_lock_ptr { typedef const_unique_lock_ptr base_type; public: typedef T value_type; typedef Lockable mutex_type; BOOST_THREAD_MOVABLE_ONLY(unique_lock_ptr) /** * @param value reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * @effects locks the mutex @c mtx, stores a reference to it and to the value type @c value. */ unique_lock_ptr(T & val, Lockable & mtx) : base_type(val, mtx) { } /** * @param value reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * @param tag of type adopt_lock_t used to differentiate the constructor. * @effects stores a reference to it and to the value type @c value taking ownership. */ unique_lock_ptr(T & value, Lockable & mtx, adopt_lock_t) BOOST_NOEXCEPT : base_type(value, mtx, adopt_lock) { } /** * @param value reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * @param tag of type defer_lock_t used to differentiate the constructor. * @effects stores a reference to it and to the value type @c value c. */ unique_lock_ptr(T & value, Lockable & mtx, defer_lock_t) BOOST_NOEXCEPT : base_type(value, mtx, defer_lock) { } /** * @param value reference of the value to protect. * @param mtx reference to the mutex used to protect the value. * @param tag of type try_to_lock_t used to differentiate the constructor. * @effects try to lock the mutex @c mtx, stores a reference to it and to the value type @c value. */ unique_lock_ptr(T & value, Lockable & mtx, try_to_lock_t) BOOST_NOEXCEPT : base_type(value, mtx, try_to_lock) { } /** * Move constructor. * @effects takes ownership of the mutex owned by @c other, stores a reference to the mutex and the value type of @c other. */ unique_lock_ptr(BOOST_THREAD_RV_REF(unique_lock_ptr) other) BOOST_NOEXCEPT : base_type(boost::move(static_cast(other))) { } ~unique_lock_ptr() { } /** * @return a pointer to the protected value */ T* operator->() { BOOST_ASSERT (this->owns_lock()); return const_cast(&this->value_); } /** * @return a reference to the protected value */ T& operator*() { BOOST_ASSERT (this->owns_lock()); return const_cast(this->value_); } }; template struct synchronized_value_unique_lock_ptr { typedef unique_lock_ptr type; }; template struct synchronized_value_unique_lock_ptr { typedef const_unique_lock_ptr type; }; /** * cloaks a value type and the mutex used to protect it together. * @param T the value type. * @param Lockable the mutex type protecting the value type. */ template class synchronized_value { #if ! defined(BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS) #if ! defined BOOST_NO_CXX11_VARIADIC_TEMPLATES template friend std::tuple::type ...> synchronize(SV& ...sv); #else template friend std::tuple< typename synchronized_value_strict_lock_ptr::type, typename synchronized_value_strict_lock_ptr::type > synchronize(SV1& sv1, SV2& sv2); template friend std::tuple< typename synchronized_value_strict_lock_ptr::type, typename synchronized_value_strict_lock_ptr::type, typename synchronized_value_strict_lock_ptr::type > synchronize(SV1& sv1, SV2& sv2, SV3& sv3); #endif #endif public: typedef T value_type; typedef Lockable mutex_type; private: T value_; mutable mutex_type mtx_; public: // construction/destruction /** * Default constructor. * * @Requires: T is DefaultConstructible */ synchronized_value() //BOOST_NOEXCEPT_IF(is_nothrow_default_constructible::value) : value_() { } /** * Constructor from copy constructible value. * * Requires: T is CopyConstructible */ synchronized_value(T const& other) //BOOST_NOEXCEPT_IF(is_nothrow_copy_constructible::value) : value_(other) { } /** * Move Constructor. * * Requires: T is CopyMovable */ synchronized_value(BOOST_THREAD_RV_REF(T) other) //BOOST_NOEXCEPT_IF(is_nothrow_move_constructible::value) : value_(boost::move(other)) { } /** * Constructor from value type. * * Requires: T is DefaultConstructible and Assignable * Effects: Assigns the value on a scope protected by the mutex of the rhs. The mutex is not copied. */ synchronized_value(synchronized_value const& rhs) { strict_lock lk(rhs.mtx_); value_ = rhs.value_; } /** * Move Constructor from movable value type * */ synchronized_value(BOOST_THREAD_RV_REF(synchronized_value) other) { strict_lock lk(other.mtx_); value_= boost::move(other.value_); } // mutation /** * Assignment operator. * * Effects: Copies the underlying value on a scope protected by the two mutexes. * The mutex is not copied. The locks are acquired using lock, so deadlock is avoided. * For example, there is no problem if one thread assigns a = b and the other assigns b = a. * * Return: *this */ synchronized_value& operator=(synchronized_value const& rhs) { if(&rhs != this) { // auto _ = make_unique_locks(mtx_, rhs.mtx_); unique_lock lk1(mtx_, defer_lock); unique_lock lk2(rhs.mtx_, defer_lock); lock(lk1,lk2); value_ = rhs.value_; } return *this; } /** * Assignment operator from a T const&. * Effects: The operator copies the value on a scope protected by the mutex. * Return: *this */ synchronized_value& operator=(value_type const& val) { { strict_lock lk(mtx_); value_ = val; } return *this; } //observers /** * Explicit conversion to value type. * * Requires: T is CopyConstructible * Return: A copy of the protected value obtained on a scope protected by the mutex. * */ T get() const { strict_lock lk(mtx_); return value_; } /** * Explicit conversion to value type. * * Requires: T is CopyConstructible * Return: A copy of the protected value obtained on a scope protected by the mutex. * */ #if ! defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) explicit operator T() const { return get(); } #endif /** * value type getter. * * Return: A constant reference to the protected value. * * Note: Not thread safe * */ T const& value() const { return value_; } /** * mutex getter. * * Return: A constant reference to the protecting mutex. * * Note: Not thread safe * */ mutex_type const& mutex() const { return mtx_; } /** * Swap * * Effects: Swaps the data. Again, locks are acquired using lock(). The mutexes are not swapped. * A swap method accepts a T& and swaps the data inside a critical section. * This is by far the preferred method of changing the guarded datum wholesale because it keeps the lock only * for a short time, thus lowering the pressure on the mutex. */ void swap(synchronized_value & rhs) { if (this == &rhs) { return; } // auto _ = make_unique_locks(mtx_, rhs.mtx_); unique_lock lk1(mtx_, defer_lock); unique_lock lk2(rhs.mtx_, defer_lock); lock(lk1,lk2); boost::swap(value_, rhs.value_); } /** * Swap with the underlying value type * * Effects: Swaps the data on a scope protected by the mutex. */ void swap(value_type & rhs) { strict_lock lk(mtx_); boost::swap(value_, rhs); } /** * Essentially calling a method obj->foo(x, y, z) calls the method foo(x, y, z) inside a critical section as * long-lived as the call itself. */ strict_lock_ptr operator->() { return BOOST_THREAD_MAKE_RV_REF((strict_lock_ptr(value_, mtx_))); } /** * If the synchronized_value object involved is const-qualified, then you'll only be able to call const methods * through operator->. So, for example, vec->push_back("xyz") won't work if vec were const-qualified. * The locking mechanism capitalizes on the assumption that const methods don't modify their underlying data. */ const_strict_lock_ptr operator->() const { return BOOST_THREAD_MAKE_RV_REF((const_strict_lock_ptr(value_, mtx_))); } /** * The synchronize() factory make easier to lock on a scope. * As discussed, operator-> can only lock over the duration of a call, so it is insufficient for complex operations. * With synchronize() you get to lock the object in a scoped and to directly access the object inside that scope. * * Example * void fun(synchronized_value> & vec) { * auto&& vec=vec.synchronize(); * vec.push_back(42); * assert(vec.back() == 42); * } */ strict_lock_ptr synchronize() { return BOOST_THREAD_MAKE_RV_REF((strict_lock_ptr(value_, mtx_))); } const_strict_lock_ptr synchronize() const { return BOOST_THREAD_MAKE_RV_REF((const_strict_lock_ptr(value_, mtx_))); } unique_lock_ptr unique_synchronize() { return BOOST_THREAD_MAKE_RV_REF((unique_lock_ptr(value_, mtx_))); } const_unique_lock_ptr unique_synchronize() const { return BOOST_THREAD_MAKE_RV_REF((const_unique_lock_ptr(value_, mtx_))); } unique_lock_ptr unique_synchronize(defer_lock_t tag) { return BOOST_THREAD_MAKE_RV_REF((unique_lock_ptr(value_, mtx_, tag))); } const_unique_lock_ptr unique_synchronize(defer_lock_t tag) const { return BOOST_THREAD_MAKE_RV_REF((const_unique_lock_ptr(value_, mtx_, tag))); } unique_lock_ptr defer_synchronize() BOOST_NOEXCEPT { return BOOST_THREAD_MAKE_RV_REF((unique_lock_ptr(value_, mtx_, defer_lock))); } const_unique_lock_ptr defer_synchronize() const BOOST_NOEXCEPT { return BOOST_THREAD_MAKE_RV_REF((const_unique_lock_ptr(value_, mtx_, defer_lock))); } unique_lock_ptr try_to_synchronize() BOOST_NOEXCEPT { return BOOST_THREAD_MAKE_RV_REF((unique_lock_ptr(value_, mtx_, try_to_lock))); } const_unique_lock_ptr try_to_synchronize() const BOOST_NOEXCEPT { return BOOST_THREAD_MAKE_RV_REF((const_unique_lock_ptr(value_, mtx_, try_to_lock))); } unique_lock_ptr adopt_synchronize() BOOST_NOEXCEPT { return BOOST_THREAD_MAKE_RV_REF((unique_lock_ptr(value_, mtx_, adopt_lock))); } const_unique_lock_ptr adopt_synchronize() const BOOST_NOEXCEPT { return BOOST_THREAD_MAKE_RV_REF((const_unique_lock_ptr(value_, mtx_, adopt_lock))); } #if ! defined __IBMCPP__ private: #endif class deref_value { private: friend class synchronized_value; boost::unique_lock lk_; T& value_; explicit deref_value(synchronized_value& outer): lk_(outer.mtx_),value_(outer.value_) {} public: BOOST_THREAD_MOVABLE_ONLY(deref_value) deref_value(BOOST_THREAD_RV_REF(deref_value) other): lk_(boost::move(BOOST_THREAD_RV(other).lk_)),value_(BOOST_THREAD_RV(other).value_) {} operator T&() { return value_; } deref_value& operator=(T const& newVal) { value_=newVal; return *this; } }; class const_deref_value { private: friend class synchronized_value; boost::unique_lock lk_; const T& value_; explicit const_deref_value(synchronized_value const& outer): lk_(outer.mtx_), value_(outer.value_) {} public: BOOST_THREAD_MOVABLE_ONLY(const_deref_value) const_deref_value(BOOST_THREAD_RV_REF(const_deref_value) other): lk_(boost::move(BOOST_THREAD_RV(other).lk_)), value_(BOOST_THREAD_RV(other).value_) {} operator const T&() { return value_; } }; public: deref_value operator*() { return BOOST_THREAD_MAKE_RV_REF(deref_value(*this)); } const_deref_value operator*() const { return BOOST_THREAD_MAKE_RV_REF(const_deref_value(*this)); } // io functions /** * @requires T is OutputStreamable * @effects saves the value type on the output stream @c os. */ template void save(OStream& os) const { strict_lock lk(mtx_); os << value_; } /** * @requires T is InputStreamable * @effects loads the value type from the input stream @c is. */ template void load(IStream& is) const { strict_lock lk(mtx_); is >> value_; } // relational operators /** * @requires T is EqualityComparable * */ bool operator==(synchronized_value const& rhs) const { unique_lock lk1(mtx_, defer_lock); unique_lock lk2(rhs.mtx_, defer_lock); lock(lk1,lk2); return value_ == rhs.value_; } /** * @requires T is LessThanComparable * */ bool operator<(synchronized_value const& rhs) const { unique_lock lk1(mtx_, defer_lock); unique_lock lk2(rhs.mtx_, defer_lock); lock(lk1,lk2); return value_ < rhs.value_; } /** * @requires T is GreaterThanComparable * */ bool operator>(synchronized_value const& rhs) const { unique_lock lk1(mtx_, defer_lock); unique_lock lk2(rhs.mtx_, defer_lock); lock(lk1,lk2); return value_ > rhs.value_; } bool operator<=(synchronized_value const& rhs) const { unique_lock lk1(mtx_, defer_lock); unique_lock lk2(rhs.mtx_, defer_lock); lock(lk1,lk2); return value_ <= rhs.value_; } bool operator>=(synchronized_value const& rhs) const { unique_lock lk1(mtx_, defer_lock); unique_lock lk2(rhs.mtx_, defer_lock); lock(lk1,lk2); return value_ >= rhs.value_; } bool operator==(value_type const& rhs) const { unique_lock lk1(mtx_); return value_ == rhs; } bool operator!=(value_type const& rhs) const { unique_lock lk1(mtx_); return value_ != rhs; } bool operator<(value_type const& rhs) const { unique_lock lk1(mtx_); return value_ < rhs; } bool operator<=(value_type const& rhs) const { unique_lock lk1(mtx_); return value_ <= rhs; } bool operator>(value_type const& rhs) const { unique_lock lk1(mtx_); return value_ > rhs; } bool operator>=(value_type const& rhs) const { unique_lock lk1(mtx_); return value_ >= rhs; } }; // Specialized algorithms /** * */ template inline void swap(synchronized_value & lhs, synchronized_value & rhs) { lhs.swap(rhs); } template inline void swap(synchronized_value & lhs, T & rhs) { lhs.swap(rhs); } template inline void swap(T & lhs, synchronized_value & rhs) { rhs.swap(lhs); } //Hash support template struct hash; template struct hash >; // Comparison with T template bool operator!=(synchronized_value const&lhs, synchronized_value const& rhs) { return ! (lhs==rhs); } template bool operator==(T const& lhs, synchronized_value const&rhs) { return rhs==lhs; } template bool operator!=(T const& lhs, synchronized_value const&rhs) { return rhs!=lhs; } template bool operator<(T const& lhs, synchronized_value const&rhs) { return rhs>=lhs; } template bool operator<=(T const& lhs, synchronized_value const&rhs) { return rhs>lhs; } template bool operator>(T const& lhs, synchronized_value const&rhs) { return rhs<=lhs; } template bool operator>=(T const& lhs, synchronized_value const&rhs) { return rhs inline OStream& operator<<(OStream& os, synchronized_value const& rhs) { rhs.save(os); return os; } template inline IStream& operator>>(IStream& is, synchronized_value const& rhs) { rhs.load(is); return is; } #if ! defined(BOOST_THREAD_NO_SYNCHRONIZE) #if ! defined BOOST_NO_CXX11_VARIADIC_TEMPLATES template std::tuple::type ...> synchronize(SV& ...sv) { boost::lock(sv.mtx_ ...); typedef std::tuple::type ...> t_type; return t_type(typename synchronized_value_strict_lock_ptr::type(sv.value_, sv.mtx_, adopt_lock) ...); } #else template std::tuple< typename synchronized_value_strict_lock_ptr::type, typename synchronized_value_strict_lock_ptr::type > synchronize(SV1& sv1, SV2& sv2) { boost::lock(sv1.mtx_, sv2.mtx_); typedef std::tuple< typename synchronized_value_strict_lock_ptr::type, typename synchronized_value_strict_lock_ptr::type > t_type; return t_type( typename synchronized_value_strict_lock_ptr::type(sv1.value_, sv1.mtx_, adopt_lock), typename synchronized_value_strict_lock_ptr::type(sv2.value_, sv2.mtx_, adopt_lock) ); } template std::tuple< typename synchronized_value_strict_lock_ptr::type, typename synchronized_value_strict_lock_ptr::type, typename synchronized_value_strict_lock_ptr::type > synchronize(SV1& sv1, SV2& sv2, SV3& sv3) { boost::lock(sv1.mtx_, sv2.mtx_); typedef std::tuple< typename synchronized_value_strict_lock_ptr::type, typename synchronized_value_strict_lock_ptr::type, typename synchronized_value_strict_lock_ptr::type > t_type; return t_type( typename synchronized_value_strict_lock_ptr::type(sv1.value_, sv1.mtx_, adopt_lock), typename synchronized_value_strict_lock_ptr::type(sv2.value_, sv2.mtx_, adopt_lock), typename synchronized_value_strict_lock_ptr::type(sv3.value_, sv3.mtx_, adopt_lock) ); } #endif #endif } #include #endif // header passenger-4.0.37/ext/boost/thread/testable_mutex.hpp000644 000765 000024 00000007215 12233035540 023154 0ustar00honglistaff000000 000000 // (C) Copyright 2012 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_TESTABLE_LOCKABLE_HPP #define BOOST_THREAD_TESTABLE_LOCKABLE_HPP #include #include #include #include #include namespace boost { /** * Based on Associate Mutexes with Data to Prevent Races, By Herb Sutter, May 13, 2010 * http://www.drdobbs.com/windows/associate-mutexes-with-data-to-prevent-r/224701827?pgno=3 * * Make our mutex testable if it isn't already. * * Many mutex services (including boost::mutex) don't provide a way to ask, * "Do I already hold a lock on this mutex?" * Sometimes it is needed to know if a method like is_locked to be available. * This wrapper associates an arbitrary lockable type with a thread id that stores the ID of the thread that * currently holds the lockable. The thread id initially holds an invalid value that means no threads own the mutex. * When we acquire a lock, we set the thread id; and when we release a lock, we reset it back to its default no id state. * */ template class testable_mutex { Lockable mtx_; atomic id_; public: /// the type of the wrapped lockable typedef Lockable lockable_type; /// Non copyable BOOST_THREAD_NO_COPYABLE(testable_mutex) testable_mutex() : id_(thread::id()) {} void lock() { mtx_.lock(); id_ = this_thread::get_id(); } void unlock() { BOOST_ASSERT(is_locked_by_this_thread()); id_ = thread::id(); mtx_.unlock(); } bool try_lock() { if (mtx_.try_lock()) { id_ = this_thread::get_id(); return true; } else { return false; } } #ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_for(const chrono::duration& rel_time) { if (mtx_.try_lock_for(rel_time)) { id_ = this_thread::get_id(); return true; } else { return false; } } template bool try_lock_until(const chrono::time_point& abs_time) { if (mtx_.try_lock_until(abs_time)) { id_ = this_thread::get_id(); return true; } else { return false; } } #endif bool is_locked_by_this_thread() const { return this_thread::get_id() == id_; } bool is_locked() const { return ! (thread::id() == id_); } thread::id get_id() const { return id_; } // todo add the shared and upgrade mutex functions }; template struct is_testable_lockable : false_type {}; template struct is_testable_lockable > : true_type {}; // /** // * Overloaded function used to check if the mutex is locked when it is testable and do nothing otherwise. // * // * This function is used usually to assert the pre-condition when the function can only be called when the mutex // * must be locked by the current thread. // */ // template // bool is_locked_by_this_thread(testable_mutex const& mtx) // { // return mtx.is_locked(); // } // template // bool is_locked_by_this_thread(Lockable const&) // { // return true; // } } #include #endif // header passenger-4.0.37/ext/boost/thread/thread.hpp000644 000765 000024 00000000601 12233035540 021366 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_THREAD_HPP #define BOOST_THREAD_THREAD_HPP // thread.hpp // // (C) Copyright 2007-8 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #endif passenger-4.0.37/ext/boost/thread/thread_functors.hpp000644 000765 000024 00000002127 12233035540 023316 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2009-2012 Anthony Williams // (C) Copyright 2012 Vicente J. Botet Escriba // Based on the Anthony's idea of scoped_thread in CCiA #ifndef BOOST_THREAD_THREAD_FUNCTORS_HPP #define BOOST_THREAD_THREAD_FUNCTORS_HPP #include #include #include #include #include namespace boost { struct detach { void operator()(thread& t) { t.detach(); } }; struct join_if_joinable { void operator()(thread& t) { if (t.joinable()) { t.join(); } } }; #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS struct interrupt_and_join_if_joinable { void operator()(thread& t) { t.interrupt(); if (t.joinable()) { t.join(); } } }; #endif } #include #endif passenger-4.0.37/ext/boost/thread/thread_guard.hpp000644 000765 000024 00000002017 12233035540 022553 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2009-2012 Anthony Williams // (C) Copyright 2012 Vicente J. Botet Escriba // Based on the Anthony's idea of thread_joiner in CCiA #ifndef BOOST_THREAD_THREAD_GUARD_HPP #define BOOST_THREAD_THREAD_GUARD_HPP #include #include #include #include namespace boost { /** * Non-copyable RAII scoped thread guard joiner which join the thread if joinable when destroyed. */ template class thread_guard { thread& t_; public: BOOST_THREAD_NO_COPYABLE( thread_guard) explicit thread_guard(thread& t) : t_(t) { } ~thread_guard() { CallableThread on_destructor; on_destructor(t_); } }; } #include #endif passenger-4.0.37/ext/boost/thread/thread_only.hpp000644 000765 000024 00000001432 12233035540 022432 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_THREAD_ONLY_HPP #define BOOST_THREAD_THREAD_ONLY_HPP // thread.hpp // // (C) Copyright 2013 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #if defined(BOOST_THREAD_PLATFORM_WIN32) #include #elif defined(BOOST_THREAD_PLATFORM_PTHREAD) #include #else #error "Boost threads unavailable on this platform" #endif #include #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS #include #endif #include #endif passenger-4.0.37/ext/boost/thread/thread_time.hpp000644 000765 000024 00000003066 12233035540 022414 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_TIME_HPP #define BOOST_THREAD_TIME_HPP // (C) Copyright 2007 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include namespace boost { typedef boost::posix_time::ptime system_time; inline system_time get_system_time() { #if defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK) return boost::date_time::microsec_clock::universal_time(); #else // defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK) return boost::date_time::second_clock::universal_time(); #endif // defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK) } namespace detail { inline system_time get_system_time_sentinel() { return system_time(boost::posix_time::pos_infin); } inline unsigned long get_milliseconds_until(system_time const& target_time) { if(target_time.is_pos_infinity()) { return ~(unsigned long)0; } system_time const now=get_system_time(); if(target_time<=now) { return 0; } return static_cast((target_time-now).total_milliseconds()+1); } } } #include #endif passenger-4.0.37/ext/boost/thread/tss.hpp000644 000765 000024 00000006107 12233035540 020737 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_TSS_HPP #define BOOST_THREAD_TSS_HPP // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007-8 Anthony Williams #include #include #include #include namespace boost { namespace detail { struct tss_cleanup_function { virtual ~tss_cleanup_function() {} virtual void operator()(void* data)=0; }; BOOST_THREAD_DECL void set_tss_data(void const* key,boost::shared_ptr func,void* tss_data,bool cleanup_existing); BOOST_THREAD_DECL void* get_tss_data(void const* key); } template class thread_specific_ptr { private: thread_specific_ptr(thread_specific_ptr&); thread_specific_ptr& operator=(thread_specific_ptr&); struct delete_data: detail::tss_cleanup_function { void operator()(void* data) { delete static_cast(data); } }; struct run_custom_cleanup_function: detail::tss_cleanup_function { void (*cleanup_function)(T*); explicit run_custom_cleanup_function(void (*cleanup_function_)(T*)): cleanup_function(cleanup_function_) {} void operator()(void* data) { cleanup_function(static_cast(data)); } }; boost::shared_ptr cleanup; public: typedef T element_type; thread_specific_ptr(): cleanup(detail::heap_new(),detail::do_heap_delete()) {} explicit thread_specific_ptr(void (*func_)(T*)) { if(func_) { cleanup.reset(detail::heap_new(func_),detail::do_heap_delete()); } } ~thread_specific_ptr() { detail::set_tss_data(this,boost::shared_ptr(),0,true); } T* get() const { return static_cast(detail::get_tss_data(this)); } T* operator->() const { return get(); } T& operator*() const { return *get(); } T* release() { T* const temp=get(); detail::set_tss_data(this,boost::shared_ptr(),0,false); return temp; } void reset(T* new_value=0) { T* const current_value=get(); if(current_value!=new_value) { detail::set_tss_data(this,cleanup,new_value,true); } } }; } #include #endif passenger-4.0.37/ext/boost/thread/v2/000755 000765 000024 00000000000 12233035540 017740 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/thread/xtime.hpp000644 000765 000024 00000004425 12233035540 021255 0ustar00honglistaff000000 000000 // Copyright (C) 2001-2003 // William E. Kempf // Copyright (C) 2007-8 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_XTIME_WEK070601_HPP #define BOOST_XTIME_WEK070601_HPP #include #if defined BOOST_THREAD_USES_DATETIME #include #include #include #include namespace boost { enum xtime_clock_types { TIME_UTC_=1 // TIME_TAI, // TIME_MONOTONIC, // TIME_PROCESS, // TIME_THREAD, // TIME_LOCAL, // TIME_SYNC, // TIME_RESOLUTION }; struct xtime { #if defined(BOOST_NO_INT64_T) typedef int_fast32_t xtime_sec_t; //INT_FAST32_MIN <= sec <= INT_FAST32_MAX #else typedef int_fast64_t xtime_sec_t; //INT_FAST64_MIN <= sec <= INT_FAST64_MAX #endif typedef int_fast32_t xtime_nsec_t; //0 <= xtime.nsec < NANOSECONDS_PER_SECOND xtime_sec_t sec; xtime_nsec_t nsec; operator system_time() const { return boost::posix_time::from_time_t(0)+ boost::posix_time::seconds(static_cast(sec))+ #ifdef BOOST_DATE_TIME_HAS_NANOSECONDS boost::posix_time::nanoseconds(nsec); #else boost::posix_time::microseconds((nsec+500)/1000); #endif } }; inline xtime get_xtime(boost::system_time const& abs_time) { xtime res; boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0); res.sec=static_cast(time_since_epoch.total_seconds()); res.nsec=static_cast(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second())); return res; } inline int xtime_get(struct xtime* xtp, int clock_type) { if (clock_type == TIME_UTC_) { *xtp=get_xtime(get_system_time()); return clock_type; } return 0; } inline int xtime_cmp(const xtime& xt1, const xtime& xt2) { if (xt1.sec == xt2.sec) return (int)(xt1.nsec - xt2.nsec); else return (xt1.sec > xt2.sec) ? 1 : -1; } } // namespace boost #include #endif #endif //BOOST_XTIME_WEK070601_HPP passenger-4.0.37/ext/boost/thread/v2/shared_mutex.hpp000644 000765 000024 00000071043 12233035540 023146 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_V2_SHARED_MUTEX_HPP #define BOOST_THREAD_V2_SHARED_MUTEX_HPP // shared_mutex.hpp // // Copyright Howard Hinnant 2007-2010. // Copyright Vicente J. Botet Escriba 2012. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) /* synopsis namespace boost { namespace thread_v2 { class shared_mutex { public: shared_mutex(); ~shared_mutex(); shared_mutex(const shared_mutex&) = delete; shared_mutex& operator=(const shared_mutex&) = delete; // Exclusive ownership void lock(); bool try_lock(); template bool try_lock_for(const boost::chrono::duration& rel_time); template bool try_lock_until( const boost::chrono::time_point& abs_time); void unlock(); // Shared ownership void lock_shared(); bool try_lock_shared(); template bool try_lock_shared_for(const boost::chrono::duration& rel_time); template bool try_lock_shared_until( const boost::chrono::time_point& abs_time); void unlock_shared(); }; class upgrade_mutex { public: upgrade_mutex(); ~upgrade_mutex(); upgrade_mutex(const upgrade_mutex&) = delete; upgrade_mutex& operator=(const upgrade_mutex&) = delete; // Exclusive ownership void lock(); bool try_lock(); template bool try_lock_for(const boost::chrono::duration& rel_time); template bool try_lock_until( const boost::chrono::time_point& abs_time); void unlock(); // Shared ownership void lock_shared(); bool try_lock_shared(); template bool try_lock_shared_for(const boost::chrono::duration& rel_time); template bool try_lock_shared_until( const boost::chrono::time_point& abs_time); void unlock_shared(); // Upgrade ownership void lock_upgrade(); bool try_lock_upgrade(); template bool try_lock_upgrade_for( const boost::chrono::duration& rel_time); template bool try_lock_upgrade_until( const boost::chrono::time_point& abs_time); void unlock_upgrade(); // Shared <-> Exclusive bool try_unlock_shared_and_lock(); template bool try_unlock_shared_and_lock_for( const boost::chrono::duration& rel_time); template bool try_unlock_shared_and_lock_until( const boost::chrono::time_point& abs_time); void unlock_and_lock_shared(); // Shared <-> Upgrade bool try_unlock_shared_and_lock_upgrade(); template bool try_unlock_shared_and_lock_upgrade_for( const boost::chrono::duration& rel_time); template bool try_unlock_shared_and_lock_upgrade_until( const boost::chrono::time_point& abs_time); void unlock_upgrade_and_lock_shared(); // Upgrade <-> Exclusive void unlock_upgrade_and_lock(); bool try_unlock_upgrade_and_lock(); template bool try_unlock_upgrade_and_lock_for( const boost::chrono::duration& rel_time); template bool try_unlock_upgrade_and_lock_until( const boost::chrono::time_point& abs_time); void unlock_and_lock_upgrade(); }; } // thread_v2 } // boost */ #include #include #include #include #include #include #include #define BOOST_THREAD_INLINE inline namespace boost { namespace thread_v2 { class shared_mutex { typedef ::boost::mutex mutex_t; typedef ::boost::condition_variable cond_t; typedef unsigned count_t; mutex_t mut_; cond_t gate1_; cond_t gate2_; count_t state_; static const count_t write_entered_ = 1U << (sizeof(count_t)*CHAR_BIT - 1); static const count_t n_readers_ = ~write_entered_; public: BOOST_THREAD_INLINE shared_mutex(); BOOST_THREAD_INLINE ~shared_mutex(); #ifndef BOOST_NO_DELETED_FUNCTIONS shared_mutex(shared_mutex const&) = delete; shared_mutex& operator=(shared_mutex const&) = delete; #else // BOOST_NO_DELETED_FUNCTIONS private: shared_mutex(shared_mutex const&); shared_mutex& operator=(shared_mutex const&); public: #endif // BOOST_NO_DELETED_FUNCTIONS // Exclusive ownership BOOST_THREAD_INLINE void lock(); BOOST_THREAD_INLINE bool try_lock(); template bool try_lock_for(const boost::chrono::duration& rel_time) { return try_lock_until(boost::chrono::steady_clock::now() + rel_time); } template bool try_lock_until( const boost::chrono::time_point& abs_time); BOOST_THREAD_INLINE void unlock(); // Shared ownership BOOST_THREAD_INLINE void lock_shared(); BOOST_THREAD_INLINE bool try_lock_shared(); template bool try_lock_shared_for(const boost::chrono::duration& rel_time) { return try_lock_shared_until(boost::chrono::steady_clock::now() + rel_time); } template bool try_lock_shared_until( const boost::chrono::time_point& abs_time); BOOST_THREAD_INLINE void unlock_shared(); #if defined BOOST_THREAD_USES_DATETIME bool timed_lock(system_time const& timeout); template bool timed_lock(TimeDuration const & relative_time) { return timed_lock(get_system_time()+relative_time); } bool timed_lock_shared(system_time const& timeout); template bool timed_lock_shared(TimeDuration const & relative_time) { return timed_lock_shared(get_system_time()+relative_time); } #endif }; template bool shared_mutex::try_lock_until( const boost::chrono::time_point& abs_time) { boost::unique_lock lk(mut_); if (state_ & write_entered_) { while (true) { boost::cv_status status = gate1_.wait_until(lk, abs_time); if ((state_ & write_entered_) == 0) break; if (status == boost::cv_status::timeout) return false; } } state_ |= write_entered_; if (state_ & n_readers_) { while (true) { boost::cv_status status = gate2_.wait_until(lk, abs_time); if ((state_ & n_readers_) == 0) break; if (status == boost::cv_status::timeout) { state_ &= ~write_entered_; return false; } } } return true; } template bool shared_mutex::try_lock_shared_until( const boost::chrono::time_point& abs_time) { boost::unique_lock lk(mut_); if ((state_ & write_entered_) || (state_ & n_readers_) == n_readers_) { while (true) { boost::cv_status status = gate1_.wait_until(lk, abs_time); if ((state_ & write_entered_) == 0 && (state_ & n_readers_) < n_readers_) break; if (status == boost::cv_status::timeout) return false; } } count_t num_readers = (state_ & n_readers_) + 1; state_ &= ~n_readers_; state_ |= num_readers; return true; } #if defined BOOST_THREAD_USES_DATETIME bool shared_mutex::timed_lock(system_time const& abs_time) { boost::unique_lock lk(mut_); if (state_ & write_entered_) { while (true) { bool status = gate1_.timed_wait(lk, abs_time); if ((state_ & write_entered_) == 0) break; if (!status) return false; } } state_ |= write_entered_; if (state_ & n_readers_) { while (true) { bool status = gate2_.timed_wait(lk, abs_time); if ((state_ & n_readers_) == 0) break; if (!status) { state_ &= ~write_entered_; return false; } } } return true; } bool shared_mutex::timed_lock_shared(system_time const& abs_time) { boost::unique_lock lk(mut_); if (state_ & write_entered_) { while (true) { bool status = gate1_.timed_wait(lk, abs_time); if ((state_ & write_entered_) == 0) break; if (!status ) return false; } } state_ |= write_entered_; if (state_ & n_readers_) { while (true) { bool status = gate2_.timed_wait(lk, abs_time); if ((state_ & n_readers_) == 0) break; if (!status) { state_ &= ~write_entered_; return false; } } } return true; } #endif class upgrade_mutex { typedef boost::mutex mutex_t; typedef boost::condition_variable cond_t; typedef unsigned count_t; mutex_t mut_; cond_t gate1_; cond_t gate2_; count_t state_; static const unsigned write_entered_ = 1U << (sizeof(count_t)*CHAR_BIT - 1); static const unsigned upgradable_entered_ = write_entered_ >> 1; static const unsigned n_readers_ = ~(write_entered_ | upgradable_entered_); public: BOOST_THREAD_INLINE upgrade_mutex(); BOOST_THREAD_INLINE ~upgrade_mutex(); #ifndef BOOST_NO_DELETED_FUNCTIONS upgrade_mutex(const upgrade_mutex&) = delete; upgrade_mutex& operator=(const upgrade_mutex&) = delete; #else // BOOST_NO_DELETED_FUNCTIONS private: upgrade_mutex(const upgrade_mutex&); upgrade_mutex& operator=(const upgrade_mutex&); public: #endif // BOOST_NO_DELETED_FUNCTIONS // Exclusive ownership BOOST_THREAD_INLINE void lock(); BOOST_THREAD_INLINE bool try_lock(); template bool try_lock_for(const boost::chrono::duration& rel_time) { return try_lock_until(boost::chrono::steady_clock::now() + rel_time); } template bool try_lock_until( const boost::chrono::time_point& abs_time); BOOST_THREAD_INLINE void unlock(); // Shared ownership BOOST_THREAD_INLINE void lock_shared(); BOOST_THREAD_INLINE bool try_lock_shared(); template bool try_lock_shared_for(const boost::chrono::duration& rel_time) { return try_lock_shared_until(boost::chrono::steady_clock::now() + rel_time); } template bool try_lock_shared_until( const boost::chrono::time_point& abs_time); BOOST_THREAD_INLINE void unlock_shared(); // Upgrade ownership BOOST_THREAD_INLINE void lock_upgrade(); BOOST_THREAD_INLINE bool try_lock_upgrade(); template bool try_lock_upgrade_for( const boost::chrono::duration& rel_time) { return try_lock_upgrade_until(boost::chrono::steady_clock::now() + rel_time); } template bool try_lock_upgrade_until( const boost::chrono::time_point& abs_time); BOOST_THREAD_INLINE void unlock_upgrade(); // Shared <-> Exclusive BOOST_THREAD_INLINE bool try_unlock_shared_and_lock(); template bool try_unlock_shared_and_lock_for( const boost::chrono::duration& rel_time) { return try_unlock_shared_and_lock_until( boost::chrono::steady_clock::now() + rel_time); } template bool try_unlock_shared_and_lock_until( const boost::chrono::time_point& abs_time); BOOST_THREAD_INLINE void unlock_and_lock_shared(); // Shared <-> Upgrade BOOST_THREAD_INLINE bool try_unlock_shared_and_lock_upgrade(); template bool try_unlock_shared_and_lock_upgrade_for( const boost::chrono::duration& rel_time) { return try_unlock_shared_and_lock_upgrade_until( boost::chrono::steady_clock::now() + rel_time); } template bool try_unlock_shared_and_lock_upgrade_until( const boost::chrono::time_point& abs_time); BOOST_THREAD_INLINE void unlock_upgrade_and_lock_shared(); // Upgrade <-> Exclusive BOOST_THREAD_INLINE void unlock_upgrade_and_lock(); BOOST_THREAD_INLINE bool try_unlock_upgrade_and_lock(); template bool try_unlock_upgrade_and_lock_for( const boost::chrono::duration& rel_time) { return try_unlock_upgrade_and_lock_until( boost::chrono::steady_clock::now() + rel_time); } template bool try_unlock_upgrade_and_lock_until( const boost::chrono::time_point& abs_time); BOOST_THREAD_INLINE void unlock_and_lock_upgrade(); #if defined BOOST_THREAD_USES_DATETIME inline bool timed_lock(system_time const& abs_time); template bool timed_lock(TimeDuration const & relative_time) { return timed_lock(get_system_time()+relative_time); } inline bool timed_lock_shared(system_time const& abs_time); template bool timed_lock_shared(TimeDuration const & relative_time) { return timed_lock_shared(get_system_time()+relative_time); } inline bool timed_lock_upgrade(system_time const& abs_time); template bool timed_lock_upgrade(TimeDuration const & relative_time) { return timed_lock_upgrade(get_system_time()+relative_time); } #endif }; template bool upgrade_mutex::try_lock_until( const boost::chrono::time_point& abs_time) { boost::unique_lock lk(mut_); if (state_ & (write_entered_ | upgradable_entered_)) { while (true) { boost::cv_status status = gate1_.wait_until(lk, abs_time); if ((state_ & (write_entered_ | upgradable_entered_)) == 0) break; if (status == boost::cv_status::timeout) return false; } } state_ |= write_entered_; if (state_ & n_readers_) { while (true) { boost::cv_status status = gate2_.wait_until(lk, abs_time); if ((state_ & n_readers_) == 0) break; if (status == boost::cv_status::timeout) { state_ &= ~write_entered_; return false; } } } return true; } template bool upgrade_mutex::try_lock_shared_until( const boost::chrono::time_point& abs_time) { boost::unique_lock lk(mut_); if ((state_ & write_entered_) || (state_ & n_readers_) == n_readers_) { while (true) { boost::cv_status status = gate1_.wait_until(lk, abs_time); if ((state_ & write_entered_) == 0 && (state_ & n_readers_) < n_readers_) break; if (status == boost::cv_status::timeout) return false; } } count_t num_readers = (state_ & n_readers_) + 1; state_ &= ~n_readers_; state_ |= num_readers; return true; } template bool upgrade_mutex::try_lock_upgrade_until( const boost::chrono::time_point& abs_time) { boost::unique_lock lk(mut_); if ((state_ & (write_entered_ | upgradable_entered_)) || (state_ & n_readers_) == n_readers_) { while (true) { boost::cv_status status = gate1_.wait_until(lk, abs_time); if ((state_ & (write_entered_ | upgradable_entered_)) == 0 && (state_ & n_readers_) < n_readers_) break; if (status == boost::cv_status::timeout) return false; } } count_t num_readers = (state_ & n_readers_) + 1; state_ &= ~n_readers_; state_ |= upgradable_entered_ | num_readers; return true; } #if defined BOOST_THREAD_USES_DATETIME bool upgrade_mutex::timed_lock(system_time const& abs_time) { boost::unique_lock lk(mut_); if (state_ & (write_entered_ | upgradable_entered_)) { while (true) { bool status = gate1_.timed_wait(lk, abs_time); if ((state_ & (write_entered_ | upgradable_entered_)) == 0) break; if (!status) return false; } } state_ |= write_entered_; if (state_ & n_readers_) { while (true) { bool status = gate2_.timed_wait(lk, abs_time); if ((state_ & n_readers_) == 0) break; if (!status) { state_ &= ~write_entered_; return false; } } } return true; } bool upgrade_mutex::timed_lock_shared(system_time const& abs_time) { boost::unique_lock lk(mut_); if ((state_ & write_entered_) || (state_ & n_readers_) == n_readers_) { while (true) { bool status = gate1_.timed_wait(lk, abs_time); if ((state_ & write_entered_) == 0 && (state_ & n_readers_) < n_readers_) break; if (!status) return false; } } count_t num_readers = (state_ & n_readers_) + 1; state_ &= ~n_readers_; state_ |= num_readers; return true; } bool upgrade_mutex::timed_lock_upgrade(system_time const& abs_time) { boost::unique_lock lk(mut_); if ((state_ & (write_entered_ | upgradable_entered_)) || (state_ & n_readers_) == n_readers_) { while (true) { bool status = gate1_.timed_wait(lk, abs_time); if ((state_ & (write_entered_ | upgradable_entered_)) == 0 && (state_ & n_readers_) < n_readers_) break; if (!status) return false; } } count_t num_readers = (state_ & n_readers_) + 1; state_ &= ~n_readers_; state_ |= upgradable_entered_ | num_readers; return true; } #endif template bool upgrade_mutex::try_unlock_shared_and_lock_until( const boost::chrono::time_point& abs_time) { boost::unique_lock lk(mut_); if (state_ != 1) { while (true) { boost::cv_status status = gate2_.wait_until(lk, abs_time); if (state_ == 1) break; if (status == boost::cv_status::timeout) return false; } } state_ = write_entered_; return true; } template bool upgrade_mutex::try_unlock_shared_and_lock_upgrade_until( const boost::chrono::time_point& abs_time) { boost::unique_lock lk(mut_); if ((state_ & (write_entered_ | upgradable_entered_)) != 0) { while (true) { boost::cv_status status = gate2_.wait_until(lk, abs_time); if ((state_ & (write_entered_ | upgradable_entered_)) == 0) break; if (status == boost::cv_status::timeout) return false; } } state_ |= upgradable_entered_; return true; } template bool upgrade_mutex::try_unlock_upgrade_and_lock_until( const boost::chrono::time_point& abs_time) { boost::unique_lock lk(mut_); if ((state_ & n_readers_) != 1) { while (true) { boost::cv_status status = gate2_.wait_until(lk, abs_time); if ((state_ & n_readers_) == 1) break; if (status == boost::cv_status::timeout) return false; } } state_ = write_entered_; return true; } ////// // shared_mutex shared_mutex::shared_mutex() : state_(0) { } shared_mutex::~shared_mutex() { boost::lock_guard _(mut_); } // Exclusive ownership void shared_mutex::lock() { boost::unique_lock lk(mut_); while (state_ & write_entered_) gate1_.wait(lk); state_ |= write_entered_; while (state_ & n_readers_) gate2_.wait(lk); } bool shared_mutex::try_lock() { boost::unique_lock lk(mut_); if (state_ == 0) { state_ = write_entered_; return true; } return false; } void shared_mutex::unlock() { boost::lock_guard _(mut_); state_ = 0; gate1_.notify_all(); } // Shared ownership void shared_mutex::lock_shared() { boost::unique_lock lk(mut_); while ((state_ & write_entered_) || (state_ & n_readers_) == n_readers_) gate1_.wait(lk); count_t num_readers = (state_ & n_readers_) + 1; state_ &= ~n_readers_; state_ |= num_readers; } bool shared_mutex::try_lock_shared() { boost::unique_lock lk(mut_); count_t num_readers = state_ & n_readers_; if (!(state_ & write_entered_) && num_readers != n_readers_) { ++num_readers; state_ &= ~n_readers_; state_ |= num_readers; return true; } return false; } void shared_mutex::unlock_shared() { boost::lock_guard _(mut_); count_t num_readers = (state_ & n_readers_) - 1; state_ &= ~n_readers_; state_ |= num_readers; if (state_ & write_entered_) { if (num_readers == 0) gate2_.notify_one(); } else { if (num_readers == n_readers_ - 1) gate1_.notify_one(); } } // upgrade_mutex upgrade_mutex::upgrade_mutex() : gate1_(), gate2_(), state_(0) { } upgrade_mutex::~upgrade_mutex() { boost::lock_guard _(mut_); } // Exclusive ownership void upgrade_mutex::lock() { boost::unique_lock lk(mut_); while (state_ & (write_entered_ | upgradable_entered_)) gate1_.wait(lk); state_ |= write_entered_; while (state_ & n_readers_) gate2_.wait(lk); } bool upgrade_mutex::try_lock() { boost::unique_lock lk(mut_); if (state_ == 0) { state_ = write_entered_; return true; } return false; } void upgrade_mutex::unlock() { boost::lock_guard _(mut_); state_ = 0; gate1_.notify_all(); } // Shared ownership void upgrade_mutex::lock_shared() { boost::unique_lock lk(mut_); while ((state_ & write_entered_) || (state_ & n_readers_) == n_readers_) gate1_.wait(lk); count_t num_readers = (state_ & n_readers_) + 1; state_ &= ~n_readers_; state_ |= num_readers; } bool upgrade_mutex::try_lock_shared() { boost::unique_lock lk(mut_); count_t num_readers = state_ & n_readers_; if (!(state_ & write_entered_) && num_readers != n_readers_) { ++num_readers; state_ &= ~n_readers_; state_ |= num_readers; return true; } return false; } void upgrade_mutex::unlock_shared() { boost::lock_guard _(mut_); count_t num_readers = (state_ & n_readers_) - 1; state_ &= ~n_readers_; state_ |= num_readers; if (state_ & write_entered_) { if (num_readers == 0) gate2_.notify_one(); } else { if (num_readers == n_readers_ - 1) gate1_.notify_one(); } } // Upgrade ownership void upgrade_mutex::lock_upgrade() { boost::unique_lock lk(mut_); while ((state_ & (write_entered_ | upgradable_entered_)) || (state_ & n_readers_) == n_readers_) gate1_.wait(lk); count_t num_readers = (state_ & n_readers_) + 1; state_ &= ~n_readers_; state_ |= upgradable_entered_ | num_readers; } bool upgrade_mutex::try_lock_upgrade() { boost::unique_lock lk(mut_); count_t num_readers = state_ & n_readers_; if (!(state_ & (write_entered_ | upgradable_entered_)) && num_readers != n_readers_) { ++num_readers; state_ &= ~n_readers_; state_ |= upgradable_entered_ | num_readers; return true; } return false; } void upgrade_mutex::unlock_upgrade() { { boost::lock_guard _(mut_); count_t num_readers = (state_ & n_readers_) - 1; state_ &= ~(upgradable_entered_ | n_readers_); state_ |= num_readers; } gate1_.notify_all(); } // Shared <-> Exclusive bool upgrade_mutex::try_unlock_shared_and_lock() { boost::unique_lock lk(mut_); if (state_ == 1) { state_ = write_entered_; return true; } return false; } void upgrade_mutex::unlock_and_lock_shared() { { boost::lock_guard _(mut_); state_ = 1; } gate1_.notify_all(); } // Shared <-> Upgrade bool upgrade_mutex::try_unlock_shared_and_lock_upgrade() { boost::unique_lock lk(mut_); if (!(state_ & (write_entered_ | upgradable_entered_))) { state_ |= upgradable_entered_; return true; } return false; } void upgrade_mutex::unlock_upgrade_and_lock_shared() { { boost::lock_guard _(mut_); state_ &= ~upgradable_entered_; } gate1_.notify_all(); } // Upgrade <-> Exclusive void upgrade_mutex::unlock_upgrade_and_lock() { boost::unique_lock lk(mut_); count_t num_readers = (state_ & n_readers_) - 1; state_ &= ~(upgradable_entered_ | n_readers_); state_ |= write_entered_ | num_readers; while (state_ & n_readers_) gate2_.wait(lk); } bool upgrade_mutex::try_unlock_upgrade_and_lock() { boost::unique_lock lk(mut_); if (state_ == (upgradable_entered_ | 1)) { state_ = write_entered_; return true; } return false; } void upgrade_mutex::unlock_and_lock_upgrade() { { boost::lock_guard _(mut_); state_ = upgradable_entered_ | 1; } gate1_.notify_all(); } } // thread_v2 } // boost namespace boost { //using thread_v2::shared_mutex; using thread_v2::upgrade_mutex; typedef thread_v2::upgrade_mutex shared_mutex; } #endif passenger-4.0.37/ext/boost/thread/v2/thread.hpp000644 000765 000024 00000004065 12233035540 021725 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2011 Vicente J. Botet Escriba #ifndef BOOST_THREAD_V2_THREAD_HPP #define BOOST_THREAD_V2_THREAD_HPP #include #ifdef BOOST_THREAD_USES_CHRONO #include #include #endif #include #include namespace boost { namespace this_thread { #ifdef BOOST_THREAD_USES_CHRONO template void sleep_until(const chrono::time_point& t) { using namespace chrono; mutex mut; condition_variable cv; unique_lock lk(mut); while (Clock::now() < t) cv.wait_until(lk, t); } #ifdef BOOST_THREAD_SLEEP_FOR_IS_STEADY template void sleep_for(const chrono::duration& d) { using namespace chrono; if (d > duration::zero()) { duration Max = nanoseconds::max BOOST_PREVENT_MACRO_SUBSTITUTION (); nanoseconds ns; if (d < Max) { ns = duration_cast(d); if (ns < d) ++ns; } else ns = nanoseconds:: max BOOST_PREVENT_MACRO_SUBSTITUTION (); sleep_for(ns); } } template inline BOOST_SYMBOL_VISIBLE void sleep_until(const chrono::time_point& t) { using namespace chrono; sleep_for(t - steady_clock::now()); } #else template void sleep_for(const chrono::duration& d) { using namespace chrono; if (d > duration::zero()) { steady_clock::time_point c_timeout = steady_clock::now() + ceil(d); sleep_until(c_timeout); } } #endif #endif } } #endif passenger-4.0.37/ext/boost/thread/pthread/condition_variable.hpp000644 000765 000024 00000031047 12233035540 025411 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_CONDITION_VARIABLE_PTHREAD_HPP #define BOOST_THREAD_CONDITION_VARIABLE_PTHREAD_HPP // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007-10 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba #include #include #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS #include #endif #include #ifdef BOOST_THREAD_USES_CHRONO #include #include #endif #include #include namespace boost { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS namespace this_thread { void BOOST_THREAD_DECL interruption_point(); } #endif namespace thread_cv_detail { template struct lock_on_exit { MutexType* m; lock_on_exit(): m(0) {} void activate(MutexType& m_) { m_.unlock(); m=&m_; } ~lock_on_exit() { if(m) { m->lock(); } } }; } inline void condition_variable::wait(unique_lock& m) { #if defined BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED if(! m.owns_lock()) { boost::throw_exception(condition_error(-1, "boost::condition_variable::wait() failed precondition mutex not owned")); } #endif int res=0; { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS thread_cv_detail::lock_on_exit > guard; detail::interruption_checker check_for_interruption(&internal_mutex,&cond); guard.activate(m); do { res = pthread_cond_wait(&cond,&internal_mutex); } while (res == EINTR); #else //boost::pthread::pthread_mutex_scoped_lock check_for_interruption(&internal_mutex); pthread_mutex_t* the_mutex = m.mutex()->native_handle(); do { res = pthread_cond_wait(&cond,the_mutex); } while (res == EINTR); #endif } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS this_thread::interruption_point(); #endif if(res) { boost::throw_exception(condition_error(res, "boost::condition_variable::wait failed in pthread_cond_wait")); } } inline bool condition_variable::do_wait_until( unique_lock& m, struct timespec const &timeout) { #if defined BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED if (!m.owns_lock()) { boost::throw_exception(condition_error(EPERM, "boost::condition_variable::do_wait_until() failed precondition mutex not owned")); } #endif thread_cv_detail::lock_on_exit > guard; int cond_res; { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS detail::interruption_checker check_for_interruption(&internal_mutex,&cond); guard.activate(m); cond_res=pthread_cond_timedwait(&cond,&internal_mutex,&timeout); #else //boost::pthread::pthread_mutex_scoped_lock check_for_interruption(&internal_mutex); pthread_mutex_t* the_mutex = m.mutex()->native_handle(); cond_res=pthread_cond_timedwait(&cond,the_mutex,&timeout); #endif } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS this_thread::interruption_point(); #endif if(cond_res==ETIMEDOUT) { return false; } if(cond_res) { boost::throw_exception(condition_error(cond_res, "boost::condition_variable::do_wait_until failed in pthread_cond_timedwait")); } return true; } inline void condition_variable::notify_one() BOOST_NOEXCEPT { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex); #endif BOOST_VERIFY(!pthread_cond_signal(&cond)); } inline void condition_variable::notify_all() BOOST_NOEXCEPT { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex); #endif BOOST_VERIFY(!pthread_cond_broadcast(&cond)); } class condition_variable_any { pthread_mutex_t internal_mutex; pthread_cond_t cond; public: BOOST_THREAD_NO_COPYABLE(condition_variable_any) condition_variable_any() { int const res=pthread_mutex_init(&internal_mutex,NULL); if(res) { boost::throw_exception(thread_resource_error(res, "boost::condition_variable_any::condition_variable_any() failed in pthread_mutex_init")); } int const res2=pthread_cond_init(&cond,NULL); if(res2) { BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex)); boost::throw_exception(thread_resource_error(res, "boost::condition_variable_any::condition_variable_any() failed in pthread_cond_init")); } } ~condition_variable_any() { BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex)); BOOST_VERIFY(!pthread_cond_destroy(&cond)); } template void wait(lock_type& m) { int res=0; { thread_cv_detail::lock_on_exit guard; #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS detail::interruption_checker check_for_interruption(&internal_mutex,&cond); #else boost::pthread::pthread_mutex_scoped_lock check_for_interruption(&internal_mutex); #endif guard.activate(m); res=pthread_cond_wait(&cond,&internal_mutex); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS this_thread::interruption_point(); #endif if(res) { boost::throw_exception(condition_error(res, "boost::condition_variable_any::wait() failed in pthread_cond_wait")); } } template void wait(lock_type& m,predicate_type pred) { while(!pred()) wait(m); } #if defined BOOST_THREAD_USES_DATETIME template bool timed_wait(lock_type& m,boost::system_time const& wait_until) { struct timespec const timeout=detail::to_timespec(wait_until); return do_wait_until(m, timeout); } template bool timed_wait(lock_type& m,xtime const& wait_until) { return timed_wait(m,system_time(wait_until)); } template bool timed_wait(lock_type& m,duration_type const& wait_duration) { return timed_wait(m,get_system_time()+wait_duration); } template bool timed_wait(lock_type& m,boost::system_time const& wait_until,predicate_type pred) { while (!pred()) { if(!timed_wait(m, wait_until)) return pred(); } return true; } template bool timed_wait(lock_type& m,xtime const& wait_until,predicate_type pred) { return timed_wait(m,system_time(wait_until),pred); } template bool timed_wait(lock_type& m,duration_type const& wait_duration,predicate_type pred) { return timed_wait(m,get_system_time()+wait_duration,pred); } #endif #ifdef BOOST_THREAD_USES_CHRONO template cv_status wait_until( lock_type& lock, const chrono::time_point& t) { using namespace chrono; typedef time_point nano_sys_tmpt; wait_until(lock, nano_sys_tmpt(ceil(t.time_since_epoch()))); return system_clock::now() < t ? cv_status::no_timeout : cv_status::timeout; } template cv_status wait_until( lock_type& lock, const chrono::time_point& t) { using namespace chrono; system_clock::time_point s_now = system_clock::now(); typename Clock::time_point c_now = Clock::now(); wait_until(lock, s_now + ceil(t - c_now)); return Clock::now() < t ? cv_status::no_timeout : cv_status::timeout; } template bool wait_until( lock_type& lock, const chrono::time_point& t, Predicate pred) { while (!pred()) { if (wait_until(lock, t) == cv_status::timeout) return pred(); } return true; } template cv_status wait_for( lock_type& lock, const chrono::duration& d) { using namespace chrono; system_clock::time_point s_now = system_clock::now(); steady_clock::time_point c_now = steady_clock::now(); wait_until(lock, s_now + ceil(d)); return steady_clock::now() - c_now < d ? cv_status::no_timeout : cv_status::timeout; } template bool wait_for( lock_type& lock, const chrono::duration& d, Predicate pred) { return wait_until(lock, chrono::steady_clock::now() + d, boost::move(pred)); // while (!pred()) // { // if (wait_for(lock, d) == cv_status::timeout) // return pred(); // } // return true; } template cv_status wait_until( lock_type& lk, chrono::time_point tp) { using namespace chrono; nanoseconds d = tp.time_since_epoch(); timespec ts = boost::detail::to_timespec(d); if (do_wait_until(lk, ts)) return cv_status::no_timeout; else return cv_status::timeout; } #endif void notify_one() BOOST_NOEXCEPT { boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex); BOOST_VERIFY(!pthread_cond_signal(&cond)); } void notify_all() BOOST_NOEXCEPT { boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex); BOOST_VERIFY(!pthread_cond_broadcast(&cond)); } private: // used by boost::thread::try_join_until template inline bool do_wait_until( lock_type& m, struct timespec const &timeout) { int res=0; { thread_cv_detail::lock_on_exit guard; #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS detail::interruption_checker check_for_interruption(&internal_mutex,&cond); #else boost::pthread::pthread_mutex_scoped_lock check_for_interruption(&internal_mutex); #endif guard.activate(m); res=pthread_cond_timedwait(&cond,&internal_mutex,&timeout); } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS this_thread::interruption_point(); #endif if(res==ETIMEDOUT) { return false; } if(res) { boost::throw_exception(condition_error(res, "boost::condition_variable_any::do_wait_until() failed in pthread_cond_timedwait")); } return true; } }; } #include #endif passenger-4.0.37/ext/boost/thread/pthread/condition_variable_fwd.hpp000644 000765 000024 00000020273 12233035540 026250 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_PTHREAD_CONDITION_VARIABLE_FWD_HPP #define BOOST_THREAD_PTHREAD_CONDITION_VARIABLE_FWD_HPP // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007-8 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba #include #include #include #include #include #include #include #include #if defined BOOST_THREAD_USES_DATETIME #include #endif #ifdef BOOST_THREAD_USES_CHRONO #include #include #endif #include #include #include namespace boost { class condition_variable { private: #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS pthread_mutex_t internal_mutex; #endif pthread_cond_t cond; public: //private: // used by boost::thread::try_join_until inline bool do_wait_until( unique_lock& lock, struct timespec const &timeout); bool do_wait_for( unique_lock& lock, struct timespec const &timeout) { return do_wait_until(lock, boost::detail::timespec_plus(timeout, boost::detail::timespec_now())); } public: BOOST_THREAD_NO_COPYABLE(condition_variable) condition_variable() { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS int const res=pthread_mutex_init(&internal_mutex,NULL); if(res) { boost::throw_exception(thread_resource_error(res, "boost::condition_variable::condition_variable() constructor failed in pthread_mutex_init")); } #endif int const res2=pthread_cond_init(&cond,NULL); if(res2) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex)); #endif boost::throw_exception(thread_resource_error(res2, "boost::condition_variable::condition_variable() constructor failed in pthread_cond_init")); } } ~condition_variable() { int ret; #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS do { ret = pthread_mutex_destroy(&internal_mutex); } while (ret == EINTR); BOOST_ASSERT(!ret); #endif do { ret = pthread_cond_destroy(&cond); } while (ret == EINTR); BOOST_ASSERT(!ret); } void wait(unique_lock& m); template void wait(unique_lock& m,predicate_type pred) { while(!pred()) wait(m); } #if defined BOOST_THREAD_USES_DATETIME inline bool timed_wait( unique_lock& m, boost::system_time const& wait_until) { #if defined BOOST_THREAD_WAIT_BUG struct timespec const timeout=detail::to_timespec(wait_until + BOOST_THREAD_WAIT_BUG); return do_wait_until(m, timeout); #else struct timespec const timeout=detail::to_timespec(wait_until); return do_wait_until(m, timeout); #endif } bool timed_wait( unique_lock& m, xtime const& wait_until) { return timed_wait(m,system_time(wait_until)); } template bool timed_wait( unique_lock& m, duration_type const& wait_duration) { return timed_wait(m,get_system_time()+wait_duration); } template bool timed_wait( unique_lock& m, boost::system_time const& wait_until,predicate_type pred) { while (!pred()) { if(!timed_wait(m, wait_until)) return pred(); } return true; } template bool timed_wait( unique_lock& m, xtime const& wait_until,predicate_type pred) { return timed_wait(m,system_time(wait_until),pred); } template bool timed_wait( unique_lock& m, duration_type const& wait_duration,predicate_type pred) { return timed_wait(m,get_system_time()+wait_duration,pred); } #endif #ifdef BOOST_THREAD_USES_CHRONO template cv_status wait_until( unique_lock& lock, const chrono::time_point& t) { using namespace chrono; typedef time_point nano_sys_tmpt; wait_until(lock, nano_sys_tmpt(ceil(t.time_since_epoch()))); return system_clock::now() < t ? cv_status::no_timeout : cv_status::timeout; } template cv_status wait_until( unique_lock& lock, const chrono::time_point& t) { using namespace chrono; system_clock::time_point s_now = system_clock::now(); typename Clock::time_point c_now = Clock::now(); wait_until(lock, s_now + ceil(t - c_now)); return Clock::now() < t ? cv_status::no_timeout : cv_status::timeout; } template bool wait_until( unique_lock& lock, const chrono::time_point& t, Predicate pred) { while (!pred()) { if (wait_until(lock, t) == cv_status::timeout) return pred(); } return true; } template cv_status wait_for( unique_lock& lock, const chrono::duration& d) { using namespace chrono; system_clock::time_point s_now = system_clock::now(); steady_clock::time_point c_now = steady_clock::now(); wait_until(lock, s_now + ceil(d)); return steady_clock::now() - c_now < d ? cv_status::no_timeout : cv_status::timeout; } template bool wait_for( unique_lock& lock, const chrono::duration& d, Predicate pred) { return wait_until(lock, chrono::steady_clock::now() + d, boost::move(pred)); // while (!pred()) // { // if (wait_for(lock, d) == cv_status::timeout) // return pred(); // } // return true; } #endif #define BOOST_THREAD_DEFINES_CONDITION_VARIABLE_NATIVE_HANDLE typedef pthread_cond_t* native_handle_type; native_handle_type native_handle() { return &cond; } void notify_one() BOOST_NOEXCEPT; void notify_all() BOOST_NOEXCEPT; #ifdef BOOST_THREAD_USES_CHRONO inline cv_status wait_until( unique_lock& lk, chrono::time_point tp) { using namespace chrono; nanoseconds d = tp.time_since_epoch(); timespec ts = boost::detail::to_timespec(d); if (do_wait_until(lk, ts)) return cv_status::no_timeout; else return cv_status::timeout; } #endif }; BOOST_THREAD_DECL void notify_all_at_thread_exit(condition_variable& cond, unique_lock lk); } #include #endif passenger-4.0.37/ext/boost/thread/pthread/mutex.hpp000644 000765 000024 00000023054 12233035540 022717 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_PTHREAD_MUTEX_HPP #define BOOST_THREAD_PTHREAD_MUTEX_HPP // (C) Copyright 2007-8 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include #if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS #include #endif #include #include #include #include #include #include #ifdef BOOST_THREAD_USES_CHRONO #include #include #endif #include #ifdef _POSIX_TIMEOUTS #if _POSIX_TIMEOUTS >= 0 && _POSIX_TIMEOUTS>=200112L #ifndef BOOST_PTHREAD_HAS_TIMEDLOCK #define BOOST_PTHREAD_HAS_TIMEDLOCK #endif #endif #endif #include #ifndef BOOST_THREAD_HAS_NO_EINTR_BUG #define BOOST_THREAD_HAS_EINTR_BUG #endif namespace boost { namespace posix { #ifdef BOOST_THREAD_HAS_EINTR_BUG BOOST_FORCEINLINE int pthread_mutex_destroy(pthread_mutex_t* m) { int ret; do { ret = ::pthread_mutex_destroy(m); } while (ret == EINTR); return ret; } BOOST_FORCEINLINE int pthread_mutex_lock(pthread_mutex_t* m) { int ret; do { ret = ::pthread_mutex_lock(m); } while (ret == EINTR); return ret; } BOOST_FORCEINLINE int pthread_mutex_unlock(pthread_mutex_t* m) { int ret; do { ret = ::pthread_mutex_unlock(m); } while (ret == EINTR); return ret; } #else BOOST_FORCEINLINE int pthread_mutex_destroy(pthread_mutex_t* m) { return ::pthread_mutex_destroy(m); } BOOST_FORCEINLINE int pthread_mutex_lock(pthread_mutex_t* m) { return ::pthread_mutex_lock(m); } BOOST_FORCEINLINE int pthread_mutex_unlock(pthread_mutex_t* m) { return ::pthread_mutex_unlock(m); } #endif } class mutex { private: pthread_mutex_t m; public: BOOST_THREAD_NO_COPYABLE(mutex) mutex() { int const res=pthread_mutex_init(&m,NULL); if(res) { boost::throw_exception(thread_resource_error(res, "boost:: mutex constructor failed in pthread_mutex_init")); } } ~mutex() { BOOST_VERIFY(!posix::pthread_mutex_destroy(&m)); } void lock() { int res = posix::pthread_mutex_lock(&m); if (res) { boost::throw_exception(lock_error(res,"boost: mutex lock failed in pthread_mutex_lock")); } } void unlock() { int res = posix::pthread_mutex_unlock(&m); if (res) { boost::throw_exception(lock_error(res,"boost: mutex unlock failed in pthread_mutex_unlock")); } } bool try_lock() { int res; do { res = pthread_mutex_trylock(&m); } while (res == EINTR); if (res==EBUSY) { return false; } return !res; } #define BOOST_THREAD_DEFINES_MUTEX_NATIVE_HANDLE typedef pthread_mutex_t* native_handle_type; native_handle_type native_handle() { return &m; } #if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS typedef unique_lock scoped_lock; typedef detail::try_lock_wrapper scoped_try_lock; #endif }; typedef mutex try_mutex; class timed_mutex { private: pthread_mutex_t m; #ifndef BOOST_PTHREAD_HAS_TIMEDLOCK pthread_cond_t cond; bool is_locked; #endif public: BOOST_THREAD_NO_COPYABLE(timed_mutex) timed_mutex() { int const res=pthread_mutex_init(&m,NULL); if(res) { boost::throw_exception(thread_resource_error(res, "boost:: timed_mutex constructor failed in pthread_mutex_init")); } #ifndef BOOST_PTHREAD_HAS_TIMEDLOCK int const res2=pthread_cond_init(&cond,NULL); if(res2) { BOOST_VERIFY(!posix::pthread_mutex_destroy(&m)); //BOOST_VERIFY(!pthread_mutex_destroy(&m)); boost::throw_exception(thread_resource_error(res2, "boost:: timed_mutex constructor failed in pthread_cond_init")); } is_locked=false; #endif } ~timed_mutex() { BOOST_VERIFY(!posix::pthread_mutex_destroy(&m)); #ifndef BOOST_PTHREAD_HAS_TIMEDLOCK BOOST_VERIFY(!pthread_cond_destroy(&cond)); #endif } #if defined BOOST_THREAD_USES_DATETIME template bool timed_lock(TimeDuration const & relative_time) { return timed_lock(get_system_time()+relative_time); } bool timed_lock(boost::xtime const & absolute_time) { return timed_lock(system_time(absolute_time)); } #endif #ifdef BOOST_PTHREAD_HAS_TIMEDLOCK void lock() { int res = posix::pthread_mutex_lock(&m); if (res) { boost::throw_exception(lock_error(res,"boost: mutex lock failed in pthread_mutex_lock")); } } void unlock() { int res = posix::pthread_mutex_unlock(&m); if (res) { boost::throw_exception(lock_error(res,"boost: mutex unlock failed in pthread_mutex_unlock")); } } bool try_lock() { int res; do { res = pthread_mutex_trylock(&m); } while (res == EINTR); if (res==EBUSY) { return false; } return !res; } private: bool do_try_lock_until(struct timespec const &timeout) { int const res=pthread_mutex_timedlock(&m,&timeout); BOOST_ASSERT(!res || res==ETIMEDOUT); return !res; } public: #else void lock() { boost::pthread::pthread_mutex_scoped_lock const local_lock(&m); while(is_locked) { BOOST_VERIFY(!pthread_cond_wait(&cond,&m)); } is_locked=true; } void unlock() { boost::pthread::pthread_mutex_scoped_lock const local_lock(&m); is_locked=false; BOOST_VERIFY(!pthread_cond_signal(&cond)); } bool try_lock() { boost::pthread::pthread_mutex_scoped_lock const local_lock(&m); if(is_locked) { return false; } is_locked=true; return true; } private: bool do_try_lock_until(struct timespec const &timeout) { boost::pthread::pthread_mutex_scoped_lock const local_lock(&m); while(is_locked) { int const cond_res=pthread_cond_timedwait(&cond,&m,&timeout); if(cond_res==ETIMEDOUT) { return false; } BOOST_ASSERT(!cond_res); } is_locked=true; return true; } public: #endif #if defined BOOST_THREAD_USES_DATETIME bool timed_lock(system_time const & abs_time) { struct timespec const ts=boost::detail::to_timespec(abs_time); return do_try_lock_until(ts); } #endif #ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_for(const chrono::duration& rel_time) { return try_lock_until(chrono::steady_clock::now() + rel_time); } template bool try_lock_until(const chrono::time_point& t) { using namespace chrono; system_clock::time_point s_now = system_clock::now(); typename Clock::time_point c_now = Clock::now(); return try_lock_until(s_now + ceil(t - c_now)); } template bool try_lock_until(const chrono::time_point& t) { using namespace chrono; typedef time_point nano_sys_tmpt; return try_lock_until(nano_sys_tmpt(ceil(t.time_since_epoch()))); } bool try_lock_until(const chrono::time_point& tp) { //using namespace chrono; chrono::nanoseconds d = tp.time_since_epoch(); timespec ts = boost::detail::to_timespec(d); return do_try_lock_until(ts); } #endif #define BOOST_THREAD_DEFINES_TIMED_MUTEX_NATIVE_HANDLE typedef pthread_mutex_t* native_handle_type; native_handle_type native_handle() { return &m; } #if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS typedef unique_lock scoped_timed_lock; typedef detail::try_lock_wrapper scoped_try_lock; typedef scoped_timed_lock scoped_lock; #endif }; } #include #endif passenger-4.0.37/ext/boost/thread/pthread/once.hpp000644 000765 000024 00000051065 12233035540 022504 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_PTHREAD_ONCE_HPP #define BOOST_THREAD_PTHREAD_ONCE_HPP // once.hpp // // (C) Copyright 2007-8 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { struct once_flag; #define BOOST_ONCE_INITIAL_FLAG_VALUE 0 namespace thread_detail { typedef boost::uint32_t uintmax_atomic_t; #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(value) value##u #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(~0) } #ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11 #ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES template inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args); #else template inline void call_once(once_flag& flag, Function f); template inline void call_once(once_flag& flag, Function f, T1 p1); template inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2); template inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2, T3 p3); #endif struct once_flag { BOOST_THREAD_NO_COPYABLE(once_flag) BOOST_CONSTEXPR once_flag() BOOST_NOEXCEPT : epoch(BOOST_ONCE_INITIAL_FLAG_VALUE) {} private: volatile thread_detail::uintmax_atomic_t epoch; #ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES template friend void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args); #else template friend void call_once(once_flag& flag, Function f); template friend void call_once(once_flag& flag, Function f, T1 p1); template friend void call_once(once_flag& flag, Function f, T1 p1, T2 p2); template friend void call_once(once_flag& flag, Function f, T1 p1, T2 p2, T3 p3); #endif }; #define BOOST_ONCE_INIT once_flag() #else // BOOST_THREAD_PROVIDES_ONCE_CXX11 struct once_flag { volatile thread_detail::uintmax_atomic_t epoch; }; #define BOOST_ONCE_INIT {BOOST_ONCE_INITIAL_FLAG_VALUE} #endif // BOOST_THREAD_PROVIDES_ONCE_CXX11 #if defined BOOST_THREAD_PROVIDES_INVOKE #define BOOST_THREAD_INVOKE_RET_VOID detail::invoke #define BOOST_THREAD_INVOKE_RET_VOID_CALL #elif defined BOOST_THREAD_PROVIDES_INVOKE_RET #define BOOST_THREAD_INVOKE_RET_VOID detail::invoke #define BOOST_THREAD_INVOKE_RET_VOID_CALL #else #define BOOST_THREAD_INVOKE_RET_VOID boost::bind #define BOOST_THREAD_INVOKE_RET_VOID_CALL () #endif namespace thread_detail { BOOST_THREAD_DECL uintmax_atomic_t& get_once_per_thread_epoch(); BOOST_THREAD_DECL extern uintmax_atomic_t once_global_epoch; BOOST_THREAD_DECL extern pthread_mutex_t once_epoch_mutex; BOOST_THREAD_DECL extern pthread_cond_t once_epoch_cv; } // Based on Mike Burrows fast_pthread_once algorithm as described in // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2444.html #ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES template inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args) { static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE; static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1; thread_detail::uintmax_atomic_t const epoch=flag.epoch; thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch(); if(epoch(f)), thread_detail::decay_copy(boost::forward(args))... ) BOOST_THREAD_INVOKE_RET_VOID_CALL; } BOOST_CATCH (...) { flag.epoch=uninitialized_flag; BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv)); BOOST_RETHROW } BOOST_CATCH_END flag.epoch=--thread_detail::once_global_epoch; BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv)); } else { while(flag.epoch==being_initialized) { BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex)); } } } this_thread_epoch=thread_detail::once_global_epoch; } } #else template inline void call_once(once_flag& flag, Function f) { static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE; static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1; thread_detail::uintmax_atomic_t const epoch=flag.epoch; thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch(); if(epoch inline void call_once(once_flag& flag, Function f, T1 p1) { static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE; static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1; thread_detail::uintmax_atomic_t const epoch=flag.epoch; thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch(); if(epoch inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2) { static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE; static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1; thread_detail::uintmax_atomic_t const epoch=flag.epoch; thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch(); if(epoch inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2, T3 p3) { static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE; static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1; thread_detail::uintmax_atomic_t const epoch=flag.epoch; thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch(); if(epoch inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f) { static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE; static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1; thread_detail::uintmax_atomic_t const epoch=flag.epoch; thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch(); if(epoch inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1) { static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE; static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1; thread_detail::uintmax_atomic_t const epoch=flag.epoch; thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch(); if(epoch(f)), thread_detail::decay_copy(boost::forward(p1)) ) BOOST_THREAD_INVOKE_RET_VOID_CALL; } BOOST_CATCH (...) { flag.epoch=uninitialized_flag; BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv)); BOOST_RETHROW } BOOST_CATCH_END flag.epoch=--thread_detail::once_global_epoch; BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv)); } else { while(flag.epoch==being_initialized) { BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex)); } } } this_thread_epoch=thread_detail::once_global_epoch; } } template inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2) { static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE; static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1; thread_detail::uintmax_atomic_t const epoch=flag.epoch; thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch(); if(epoch(f)), thread_detail::decay_copy(boost::forward(p1)), thread_detail::decay_copy(boost::forward(p2)) ) BOOST_THREAD_INVOKE_RET_VOID_CALL; } BOOST_CATCH (...) { flag.epoch=uninitialized_flag; BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv)); BOOST_RETHROW } BOOST_CATCH_END flag.epoch=--thread_detail::once_global_epoch; BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv)); } else { while(flag.epoch==being_initialized) { BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex)); } } } this_thread_epoch=thread_detail::once_global_epoch; } } template inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2, BOOST_THREAD_RV_REF(T3) p3) { static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE; static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1; thread_detail::uintmax_atomic_t const epoch=flag.epoch; thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch(); if(epoch(f)), thread_detail::decay_copy(boost::forward(p1)), thread_detail::decay_copy(boost::forward(p2)), thread_detail::decay_copy(boost::forward(p3)) ) BOOST_THREAD_INVOKE_RET_VOID_CALL; } BOOST_CATCH (...) { flag.epoch=uninitialized_flag; BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv)); BOOST_RETHROW } BOOST_CATCH_END flag.epoch=--thread_detail::once_global_epoch; BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv)); } else { while(flag.epoch==being_initialized) { BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex)); } } } this_thread_epoch=thread_detail::once_global_epoch; } } #endif } #include #endif passenger-4.0.37/ext/boost/thread/pthread/once_atomic.hpp000644 000765 000024 00000021227 12233035540 024035 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_PTHREAD_ONCE_ATOMIC_HPP #define BOOST_THREAD_PTHREAD_ONCE_ATOMIC_HPP // once.hpp // // (C) Copyright 2013 Andrey Semashev // (C) Copyright 2013 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include #include #include #include #include namespace boost { struct once_flag; namespace thread_detail { #if BOOST_ATOMIC_INT_LOCK_FREE == 2 typedef unsigned int atomic_int_type; #elif BOOST_ATOMIC_SHORT_LOCK_FREE == 2 typedef unsigned short atomic_int_type; #elif BOOST_ATOMIC_CHAR_LOCK_FREE == 2 typedef unsigned char atomic_int_type; #elif BOOST_ATOMIC_LONG_LOCK_FREE == 2 typedef unsigned long atomic_int_type; #elif defined(BOOST_HAS_LONG_LONG) && BOOST_ATOMIC_LLONG_LOCK_FREE == 2 typedef ulong_long_type atomic_int_type; #else // All tested integer types are not atomic, the spinlock pool will be used typedef unsigned int atomic_int_type; #endif typedef boost::atomic atomic_type; BOOST_THREAD_DECL bool enter_once_region(once_flag& flag) BOOST_NOEXCEPT; BOOST_THREAD_DECL void commit_once_region(once_flag& flag) BOOST_NOEXCEPT; BOOST_THREAD_DECL void rollback_once_region(once_flag& flag) BOOST_NOEXCEPT; inline atomic_type& get_atomic_storage(once_flag& flag) BOOST_NOEXCEPT; } #ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11 struct once_flag { BOOST_THREAD_NO_COPYABLE(once_flag) BOOST_CONSTEXPR once_flag() BOOST_NOEXCEPT : storage(0) { } private: thread_detail::atomic_type storage; friend BOOST_THREAD_DECL bool thread_detail::enter_once_region(once_flag& flag) BOOST_NOEXCEPT; friend BOOST_THREAD_DECL void thread_detail::commit_once_region(once_flag& flag) BOOST_NOEXCEPT; friend BOOST_THREAD_DECL void thread_detail::rollback_once_region(once_flag& flag) BOOST_NOEXCEPT; friend thread_detail::atomic_type& thread_detail::get_atomic_storage(once_flag& flag) BOOST_NOEXCEPT; }; #define BOOST_ONCE_INIT boost::once_flag() namespace thread_detail { inline atomic_type& get_atomic_storage(once_flag& flag) BOOST_NOEXCEPT { //return reinterpret_cast< atomic_type& >(flag.storage); return flag.storage; } } #else // BOOST_THREAD_PROVIDES_ONCE_CXX11 struct once_flag { // The thread_detail::atomic_int_type storage is marked // with this attribute in order to let the compiler know that it will alias this member // and silence compilation warnings. BOOST_THREAD_ATTRIBUTE_MAY_ALIAS thread_detail::atomic_int_type storage; }; #define BOOST_ONCE_INIT {0} namespace thread_detail { inline atomic_type& get_atomic_storage(once_flag& flag) BOOST_NOEXCEPT { return reinterpret_cast< atomic_type& >(flag.storage); } } #endif // BOOST_THREAD_PROVIDES_ONCE_CXX11 #if defined BOOST_THREAD_PROVIDES_INVOKE #define BOOST_THREAD_INVOKE_RET_VOID detail::invoke #define BOOST_THREAD_INVOKE_RET_VOID_CALL #elif defined BOOST_THREAD_PROVIDES_INVOKE_RET #define BOOST_THREAD_INVOKE_RET_VOID detail::invoke #define BOOST_THREAD_INVOKE_RET_VOID_CALL #else #define BOOST_THREAD_INVOKE_RET_VOID boost::bind #define BOOST_THREAD_INVOKE_RET_VOID_CALL () #endif #ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES template inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args) { if (thread_detail::enter_once_region(flag)) { BOOST_TRY { BOOST_THREAD_INVOKE_RET_VOID( thread_detail::decay_copy(boost::forward(f)), thread_detail::decay_copy(boost::forward(args))... ) BOOST_THREAD_INVOKE_RET_VOID_CALL; } BOOST_CATCH (...) { thread_detail::rollback_once_region(flag); BOOST_RETHROW } BOOST_CATCH_END thread_detail::commit_once_region(flag); } } #else template inline void call_once(once_flag& flag, Function f) { if (thread_detail::enter_once_region(flag)) { BOOST_TRY { f(); } BOOST_CATCH (...) { thread_detail::rollback_once_region(flag); BOOST_RETHROW } BOOST_CATCH_END thread_detail::commit_once_region(flag); } } template inline void call_once(once_flag& flag, Function f, T1 p1) { if (thread_detail::enter_once_region(flag)) { BOOST_TRY { BOOST_THREAD_INVOKE_RET_VOID(f, p1) BOOST_THREAD_INVOKE_RET_VOID_CALL; } BOOST_CATCH (...) { thread_detail::rollback_once_region(flag); BOOST_RETHROW } BOOST_CATCH_END thread_detail::commit_once_region(flag); } } template inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2) { if (thread_detail::enter_once_region(flag)) { BOOST_TRY { BOOST_THREAD_INVOKE_RET_VOID(f, p1, p2) BOOST_THREAD_INVOKE_RET_VOID_CALL; } BOOST_CATCH (...) { thread_detail::rollback_once_region(flag); BOOST_RETHROW } BOOST_CATCH_END thread_detail::commit_once_region(flag); } } template inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2, T3 p3) { if (thread_detail::enter_once_region(flag)) { BOOST_TRY { BOOST_THREAD_INVOKE_RET_VOID(f, p1, p2, p3) BOOST_THREAD_INVOKE_RET_VOID_CALL; } BOOST_CATCH (...) { thread_detail::rollback_once_region(flag); BOOST_RETHROW } BOOST_CATCH_END thread_detail::commit_once_region(flag); } } template inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f) { if (thread_detail::enter_once_region(flag)) { BOOST_TRY { f(); } BOOST_CATCH (...) { thread_detail::rollback_once_region(flag); BOOST_RETHROW } BOOST_CATCH_END thread_detail::commit_once_region(flag); } } template inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1) { if (thread_detail::enter_once_region(flag)) { BOOST_TRY { BOOST_THREAD_INVOKE_RET_VOID( thread_detail::decay_copy(boost::forward(f)), thread_detail::decay_copy(boost::forward(p1)) ) BOOST_THREAD_INVOKE_RET_VOID_CALL; } BOOST_CATCH (...) { thread_detail::rollback_once_region(flag); BOOST_RETHROW } BOOST_CATCH_END thread_detail::commit_once_region(flag); } } template inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2) { if (thread_detail::enter_once_region(flag)) { BOOST_TRY { BOOST_THREAD_INVOKE_RET_VOID( thread_detail::decay_copy(boost::forward(f)), thread_detail::decay_copy(boost::forward(p1)), thread_detail::decay_copy(boost::forward(p2)) ) BOOST_THREAD_INVOKE_RET_VOID_CALL; } BOOST_CATCH (...) { thread_detail::rollback_once_region(flag); BOOST_RETHROW } BOOST_CATCH_END thread_detail::commit_once_region(flag); } } template inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2, BOOST_THREAD_RV_REF(T3) p3) { if (thread_detail::enter_once_region(flag)) { BOOST_TRY { BOOST_THREAD_INVOKE_RET_VOID( thread_detail::decay_copy(boost::forward(f)), thread_detail::decay_copy(boost::forward(p1)), thread_detail::decay_copy(boost::forward(p2)), thread_detail::decay_copy(boost::forward(p3)) ) BOOST_THREAD_INVOKE_RET_VOID_CALL; } BOOST_CATCH (...) { thread_detail::rollback_once_region(flag); BOOST_RETHROW } BOOST_CATCH_END thread_detail::commit_once_region(flag); } } #endif } #include #endif passenger-4.0.37/ext/boost/thread/pthread/pthread_mutex_scoped_lock.hpp000644 000765 000024 00000003031 12233035540 026764 0ustar00honglistaff000000 000000 #ifndef BOOST_PTHREAD_MUTEX_SCOPED_LOCK_HPP #define BOOST_PTHREAD_MUTEX_SCOPED_LOCK_HPP // (C) Copyright 2007-8 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include namespace boost { namespace pthread { class pthread_mutex_scoped_lock { pthread_mutex_t* m; bool locked; public: explicit pthread_mutex_scoped_lock(pthread_mutex_t* m_): m(m_),locked(true) { BOOST_VERIFY(!pthread_mutex_lock(m)); } void unlock() { BOOST_VERIFY(!pthread_mutex_unlock(m)); locked=false; } ~pthread_mutex_scoped_lock() { if(locked) { unlock(); } } }; class pthread_mutex_scoped_unlock { pthread_mutex_t* m; public: explicit pthread_mutex_scoped_unlock(pthread_mutex_t* m_): m(m_) { BOOST_VERIFY(!pthread_mutex_unlock(m)); } ~pthread_mutex_scoped_unlock() { BOOST_VERIFY(!pthread_mutex_lock(m)); } }; } } #include #endif passenger-4.0.37/ext/boost/thread/pthread/recursive_mutex.hpp000644 000765 000024 00000030313 12233035540 025002 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_PTHREAD_RECURSIVE_MUTEX_HPP #define BOOST_THREAD_PTHREAD_RECURSIVE_MUTEX_HPP // (C) Copyright 2007-8 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS #include #endif #include #include #ifndef _WIN32 #include #endif #include #include #include #include #ifdef BOOST_THREAD_USES_CHRONO #include #include #endif #include #ifdef _POSIX_TIMEOUTS #if _POSIX_TIMEOUTS >= 0 && _POSIX_TIMEOUTS>=200112L #ifndef BOOST_PTHREAD_HAS_TIMEDLOCK #define BOOST_PTHREAD_HAS_TIMEDLOCK #endif #endif #endif #if defined(BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE) && defined(BOOST_PTHREAD_HAS_TIMEDLOCK) #define BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK #endif #include namespace boost { class recursive_mutex { private: pthread_mutex_t m; #ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE pthread_cond_t cond; bool is_locked; pthread_t owner; unsigned count; #endif public: BOOST_THREAD_NO_COPYABLE(recursive_mutex) recursive_mutex() { #ifdef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE pthread_mutexattr_t attr; int const init_attr_res=pthread_mutexattr_init(&attr); if(init_attr_res) { boost::throw_exception(thread_resource_error(init_attr_res, "boost:: recursive_mutex constructor failed in pthread_mutexattr_init")); } int const set_attr_res=pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); if(set_attr_res) { BOOST_VERIFY(!pthread_mutexattr_destroy(&attr)); boost::throw_exception(thread_resource_error(set_attr_res, "boost:: recursive_mutex constructor failed in pthread_mutexattr_settype")); } int const res=pthread_mutex_init(&m,&attr); if(res) { BOOST_VERIFY(!pthread_mutexattr_destroy(&attr)); boost::throw_exception(thread_resource_error(res, "boost:: recursive_mutex constructor failed in pthread_mutex_init")); } BOOST_VERIFY(!pthread_mutexattr_destroy(&attr)); #else int const res=pthread_mutex_init(&m,NULL); if(res) { boost::throw_exception(thread_resource_error(res, "boost:: recursive_mutex constructor failed in pthread_mutex_init")); } int const res2=pthread_cond_init(&cond,NULL); if(res2) { BOOST_VERIFY(!pthread_mutex_destroy(&m)); boost::throw_exception(thread_resource_error(res2, "boost:: recursive_mutex constructor failed in pthread_cond_init")); } is_locked=false; count=0; #endif } ~recursive_mutex() { BOOST_VERIFY(!pthread_mutex_destroy(&m)); #ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE BOOST_VERIFY(!pthread_cond_destroy(&cond)); #endif } #ifdef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE void lock() { BOOST_VERIFY(!pthread_mutex_lock(&m)); } void unlock() { BOOST_VERIFY(!pthread_mutex_unlock(&m)); } bool try_lock() BOOST_NOEXCEPT { int const res=pthread_mutex_trylock(&m); BOOST_ASSERT(!res || res==EBUSY); return !res; } #define BOOST_THREAD_DEFINES_RECURSIVE_MUTEX_NATIVE_HANDLE typedef pthread_mutex_t* native_handle_type; native_handle_type native_handle() { return &m; } #else void lock() { boost::pthread::pthread_mutex_scoped_lock const local_lock(&m); if(is_locked && pthread_equal(owner,pthread_self())) { ++count; return; } while(is_locked) { BOOST_VERIFY(!pthread_cond_wait(&cond,&m)); } is_locked=true; ++count; owner=pthread_self(); } void unlock() { boost::pthread::pthread_mutex_scoped_lock const local_lock(&m); if(!--count) { is_locked=false; } BOOST_VERIFY(!pthread_cond_signal(&cond)); } bool try_lock() { boost::pthread::pthread_mutex_scoped_lock const local_lock(&m); if(is_locked && !pthread_equal(owner,pthread_self())) { return false; } is_locked=true; ++count; owner=pthread_self(); return true; } #endif #if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS typedef unique_lock scoped_lock; typedef detail::try_lock_wrapper scoped_try_lock; #endif }; typedef recursive_mutex recursive_try_mutex; class recursive_timed_mutex { private: pthread_mutex_t m; #ifndef BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK pthread_cond_t cond; bool is_locked; pthread_t owner; unsigned count; #endif public: BOOST_THREAD_NO_COPYABLE(recursive_timed_mutex) recursive_timed_mutex() { #ifdef BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK pthread_mutexattr_t attr; int const init_attr_res=pthread_mutexattr_init(&attr); if(init_attr_res) { boost::throw_exception(thread_resource_error(init_attr_res, "boost:: recursive_timed_mutex constructor failed in pthread_mutexattr_init")); } int const set_attr_res=pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); if(set_attr_res) { boost::throw_exception(thread_resource_error(set_attr_res, "boost:: recursive_timed_mutex constructor failed in pthread_mutexattr_settype")); } int const res=pthread_mutex_init(&m,&attr); if(res) { BOOST_VERIFY(!pthread_mutexattr_destroy(&attr)); boost::throw_exception(thread_resource_error(res, "boost:: recursive_timed_mutex constructor failed in pthread_mutex_init")); } BOOST_VERIFY(!pthread_mutexattr_destroy(&attr)); #else int const res=pthread_mutex_init(&m,NULL); if(res) { boost::throw_exception(thread_resource_error(res, "boost:: recursive_timed_mutex constructor failed in pthread_mutex_init")); } int const res2=pthread_cond_init(&cond,NULL); if(res2) { BOOST_VERIFY(!pthread_mutex_destroy(&m)); boost::throw_exception(thread_resource_error(res2, "boost:: recursive_timed_mutex constructor failed in pthread_cond_init")); } is_locked=false; count=0; #endif } ~recursive_timed_mutex() { BOOST_VERIFY(!pthread_mutex_destroy(&m)); #ifndef BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK BOOST_VERIFY(!pthread_cond_destroy(&cond)); #endif } #if defined BOOST_THREAD_USES_DATETIME template bool timed_lock(TimeDuration const & relative_time) { return timed_lock(get_system_time()+relative_time); } #endif #ifdef BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK void lock() { BOOST_VERIFY(!pthread_mutex_lock(&m)); } void unlock() { BOOST_VERIFY(!pthread_mutex_unlock(&m)); } bool try_lock() { int const res=pthread_mutex_trylock(&m); BOOST_ASSERT(!res || res==EBUSY); return !res; } private: bool do_try_lock_until(struct timespec const &timeout) { int const res=pthread_mutex_timedlock(&m,&timeout); BOOST_ASSERT(!res || res==ETIMEDOUT); return !res; } public: #else void lock() { boost::pthread::pthread_mutex_scoped_lock const local_lock(&m); if(is_locked && pthread_equal(owner,pthread_self())) { ++count; return; } while(is_locked) { BOOST_VERIFY(!pthread_cond_wait(&cond,&m)); } is_locked=true; ++count; owner=pthread_self(); } void unlock() { boost::pthread::pthread_mutex_scoped_lock const local_lock(&m); if(!--count) { is_locked=false; } BOOST_VERIFY(!pthread_cond_signal(&cond)); } bool try_lock() BOOST_NOEXCEPT { boost::pthread::pthread_mutex_scoped_lock const local_lock(&m); if(is_locked && !pthread_equal(owner,pthread_self())) { return false; } is_locked=true; ++count; owner=pthread_self(); return true; } private: bool do_try_lock_until(struct timespec const &timeout) { boost::pthread::pthread_mutex_scoped_lock const local_lock(&m); if(is_locked && pthread_equal(owner,pthread_self())) { ++count; return true; } while(is_locked) { int const cond_res=pthread_cond_timedwait(&cond,&m,&timeout); if(cond_res==ETIMEDOUT) { return false; } BOOST_ASSERT(!cond_res); } is_locked=true; ++count; owner=pthread_self(); return true; } public: #endif #if defined BOOST_THREAD_USES_DATETIME bool timed_lock(system_time const & abs_time) { struct timespec const ts=detail::to_timespec(abs_time); return do_try_lock_until(ts); } #endif #ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_for(const chrono::duration& rel_time) { return try_lock_until(chrono::steady_clock::now() + rel_time); } template bool try_lock_until(const chrono::time_point& t) { using namespace chrono; system_clock::time_point s_now = system_clock::now(); typename Clock::time_point c_now = Clock::now(); return try_lock_until(s_now + ceil(t - c_now)); } template bool try_lock_until(const chrono::time_point& t) { using namespace chrono; typedef time_point nano_sys_tmpt; return try_lock_until(nano_sys_tmpt(ceil(t.time_since_epoch()))); } bool try_lock_until(const chrono::time_point& tp) { //using namespace chrono; chrono::nanoseconds d = tp.time_since_epoch(); timespec ts = boost::detail::to_timespec(d); return do_try_lock_until(ts); } #endif #define BOOST_THREAD_DEFINES_RECURSIVE_TIMED_MUTEX_NATIVE_HANDLE typedef pthread_mutex_t* native_handle_type; native_handle_type native_handle() { return &m; } #if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS typedef unique_lock scoped_timed_lock; typedef detail::try_lock_wrapper scoped_try_lock; typedef scoped_timed_lock scoped_lock; #endif }; } #include #endif passenger-4.0.37/ext/boost/thread/pthread/shared_mutex.hpp000644 000765 000024 00000052700 12233035540 024245 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_PTHREAD_SHARED_MUTEX_HPP #define BOOST_THREAD_PTHREAD_SHARED_MUTEX_HPP // (C) Copyright 2006-8 Anthony Williams // (C) Copyright 2012 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS #include #endif #ifdef BOOST_THREAD_USES_CHRONO #include #include #endif #include #include #include namespace boost { class shared_mutex { private: class state_data { public: state_data () : shared_count(0), exclusive(false), upgrade(false), exclusive_waiting_blocked(false) {} void assert_free() const { BOOST_ASSERT( ! exclusive ); BOOST_ASSERT( ! upgrade ); BOOST_ASSERT( shared_count==0 ); } void assert_locked() const { BOOST_ASSERT( exclusive ); BOOST_ASSERT( shared_count==0 ); BOOST_ASSERT( ! upgrade ); } void assert_lock_shared () const { BOOST_ASSERT( ! exclusive ); BOOST_ASSERT( shared_count>0 ); //BOOST_ASSERT( (! upgrade) || (shared_count>1)); // if upgraded there are at least 2 threads sharing the mutex, // except when unlock_upgrade_and_lock has decreased the number of readers but has not taken yet exclusive ownership. } void assert_lock_upgraded () const { BOOST_ASSERT( ! exclusive ); BOOST_ASSERT( upgrade ); BOOST_ASSERT( shared_count>0 ); } void assert_lock_not_upgraded () const { BOOST_ASSERT( ! upgrade ); } bool can_lock () const { return ! (shared_count || exclusive); } void exclusive_blocked (bool blocked) { exclusive_waiting_blocked = blocked; } void lock () { exclusive = true; } void unlock () { exclusive = false; exclusive_waiting_blocked = false; } bool can_lock_shared () const { return ! (exclusive || exclusive_waiting_blocked); } bool more_shared () const { return shared_count > 0 ; } unsigned get_shared_count () const { return shared_count ; } unsigned lock_shared () { return ++shared_count; } void unlock_shared () { --shared_count; } bool unlock_shared_downgrades() { if (upgrade) { upgrade=false; exclusive=true; return true; } else { exclusive_waiting_blocked=false; return false; } } void lock_upgrade () { ++shared_count; upgrade=true; } bool can_lock_upgrade () const { return ! (exclusive || exclusive_waiting_blocked || upgrade); } void unlock_upgrade () { upgrade=false; --shared_count; } //private: unsigned shared_count; bool exclusive; bool upgrade; bool exclusive_waiting_blocked; }; state_data state; boost::mutex state_change; boost::condition_variable shared_cond; boost::condition_variable exclusive_cond; boost::condition_variable upgrade_cond; void release_waiters() { exclusive_cond.notify_one(); shared_cond.notify_all(); } public: BOOST_THREAD_NO_COPYABLE(shared_mutex) shared_mutex() { } ~shared_mutex() { } void lock_shared() { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(!state.can_lock_shared()) { shared_cond.wait(lk); } state.lock_shared(); } bool try_lock_shared() { boost::unique_lock lk(state_change); if(!state.can_lock_shared()) { return false; } state.lock_shared(); return true; } #if defined BOOST_THREAD_USES_DATETIME bool timed_lock_shared(system_time const& timeout) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(!state.can_lock_shared()) { if(!shared_cond.timed_wait(lk,timeout)) { return false; } } state.lock_shared(); return true; } template bool timed_lock_shared(TimeDuration const & relative_time) { return timed_lock_shared(get_system_time()+relative_time); } #endif #ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_shared_for(const chrono::duration& rel_time) { return try_lock_shared_until(chrono::steady_clock::now() + rel_time); } template bool try_lock_shared_until(const chrono::time_point& abs_time) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(!state.can_lock_shared()) //while(state.exclusive || state.exclusive_waiting_blocked) { if(cv_status::timeout==shared_cond.wait_until(lk,abs_time)) { return false; } } state.lock_shared(); return true; } #endif void unlock_shared() { boost::unique_lock lk(state_change); state.assert_lock_shared(); state.unlock_shared(); if (! state.more_shared()) { if (state.upgrade) { // As there is a thread doing a unlock_upgrade_and_lock that is waiting for ! state.more_shared() // avoid other threads to lock, lock_upgrade or lock_shared, so only this thread is notified. state.upgrade=false; state.exclusive=true; lk.unlock(); upgrade_cond.notify_one(); } else { state.exclusive_waiting_blocked=false; lk.unlock(); } release_waiters(); } } void lock() { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while (state.shared_count || state.exclusive) { state.exclusive_waiting_blocked=true; exclusive_cond.wait(lk); } state.exclusive=true; } #if defined BOOST_THREAD_USES_DATETIME bool timed_lock(system_time const& timeout) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(state.shared_count || state.exclusive) { state.exclusive_waiting_blocked=true; if(!exclusive_cond.timed_wait(lk,timeout)) { if(state.shared_count || state.exclusive) { state.exclusive_waiting_blocked=false; release_waiters(); return false; } break; } } state.exclusive=true; return true; } template bool timed_lock(TimeDuration const & relative_time) { return timed_lock(get_system_time()+relative_time); } #endif #ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_for(const chrono::duration& rel_time) { return try_lock_until(chrono::steady_clock::now() + rel_time); } template bool try_lock_until(const chrono::time_point& abs_time) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(state.shared_count || state.exclusive) { state.exclusive_waiting_blocked=true; if(cv_status::timeout == exclusive_cond.wait_until(lk,abs_time)) { if(state.shared_count || state.exclusive) { state.exclusive_waiting_blocked=false; release_waiters(); return false; } break; } } state.exclusive=true; return true; } #endif bool try_lock() { boost::unique_lock lk(state_change); if(state.shared_count || state.exclusive) { return false; } else { state.exclusive=true; return true; } } void unlock() { boost::unique_lock lk(state_change); state.assert_locked(); state.exclusive=false; state.exclusive_waiting_blocked=false; state.assert_free(); release_waiters(); } void lock_upgrade() { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(state.exclusive || state.exclusive_waiting_blocked || state.upgrade) { shared_cond.wait(lk); } state.lock_shared(); state.upgrade=true; } #if defined BOOST_THREAD_USES_DATETIME bool timed_lock_upgrade(system_time const& timeout) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(state.exclusive || state.exclusive_waiting_blocked || state.upgrade) { if(!shared_cond.timed_wait(lk,timeout)) { if(state.exclusive || state.exclusive_waiting_blocked || state.upgrade) { return false; } break; } } state.lock_shared(); state.upgrade=true; return true; } template bool timed_lock_upgrade(TimeDuration const & relative_time) { return timed_lock_upgrade(get_system_time()+relative_time); } #endif #ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_upgrade_for(const chrono::duration& rel_time) { return try_lock_upgrade_until(chrono::steady_clock::now() + rel_time); } template bool try_lock_upgrade_until(const chrono::time_point& abs_time) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(state.exclusive || state.exclusive_waiting_blocked || state.upgrade) { if(cv_status::timeout == shared_cond.wait_until(lk,abs_time)) { if(state.exclusive || state.exclusive_waiting_blocked || state.upgrade) { return false; } break; } } state.lock_shared(); state.upgrade=true; return true; } #endif bool try_lock_upgrade() { boost::unique_lock lk(state_change); if(state.exclusive || state.exclusive_waiting_blocked || state.upgrade) { return false; } else { state.lock_shared(); state.upgrade=true; state.assert_lock_upgraded(); return true; } } void unlock_upgrade() { boost::unique_lock lk(state_change); //state.upgrade=false; state.unlock_upgrade(); if(! state.more_shared() ) { state.exclusive_waiting_blocked=false; release_waiters(); } else { shared_cond.notify_all(); } } // Upgrade <-> Exclusive void unlock_upgrade_and_lock() { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); state.assert_lock_upgraded(); state.unlock_shared(); while (state.more_shared()) { upgrade_cond.wait(lk); } state.upgrade=false; state.exclusive=true; state.assert_locked(); } void unlock_and_lock_upgrade() { boost::unique_lock lk(state_change); state.assert_locked(); state.exclusive=false; state.upgrade=true; state.lock_shared(); state.exclusive_waiting_blocked=false; state.assert_lock_upgraded(); release_waiters(); } bool try_unlock_upgrade_and_lock() { boost::unique_lock lk(state_change); state.assert_lock_upgraded(); if( !state.exclusive && !state.exclusive_waiting_blocked && state.upgrade && state.shared_count==1) { state.shared_count=0; state.exclusive=true; state.upgrade=false; state.assert_locked(); return true; } return false; } #ifdef BOOST_THREAD_USES_CHRONO template bool try_unlock_upgrade_and_lock_for( const chrono::duration& rel_time) { return try_unlock_upgrade_and_lock_until( chrono::steady_clock::now() + rel_time); } template bool try_unlock_upgrade_and_lock_until( const chrono::time_point& abs_time) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); state.assert_lock_upgraded(); if (state.shared_count != 1) { for (;;) { cv_status status = shared_cond.wait_until(lk,abs_time); if (state.shared_count == 1) break; if(status == cv_status::timeout) return false; } } state.upgrade=false; state.exclusive=true; state.exclusive_waiting_blocked=false; state.shared_count=0; return true; } #endif // Shared <-> Exclusive void unlock_and_lock_shared() { boost::unique_lock lk(state_change); state.assert_locked(); state.exclusive=false; state.lock_shared(); state.exclusive_waiting_blocked=false; release_waiters(); } #ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS bool try_unlock_shared_and_lock() { boost::unique_lock lk(state_change); state.assert_lock_shared(); if( !state.exclusive && !state.exclusive_waiting_blocked && !state.upgrade && state.shared_count==1) { state.shared_count=0; state.exclusive=true; return true; } return false; } #ifdef BOOST_THREAD_USES_CHRONO template bool try_unlock_shared_and_lock_for( const chrono::duration& rel_time) { return try_unlock_shared_and_lock_until( chrono::steady_clock::now() + rel_time); } template bool try_unlock_shared_and_lock_until( const chrono::time_point& abs_time) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); state.assert_lock_shared(); if (state.shared_count != 1) { for (;;) { cv_status status = shared_cond.wait_until(lk,abs_time); if (state.shared_count == 1) break; if(status == cv_status::timeout) return false; } } state.upgrade=false; state.exclusive=true; state.exclusive_waiting_blocked=false; state.shared_count=0; return true; } #endif #endif // Shared <-> Upgrade void unlock_upgrade_and_lock_shared() { boost::unique_lock lk(state_change); state.assert_lock_upgraded(); state.upgrade=false; state.exclusive_waiting_blocked=false; release_waiters(); } #ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS bool try_unlock_shared_and_lock_upgrade() { boost::unique_lock lk(state_change); state.assert_lock_shared(); if( !state.exclusive && !state.exclusive_waiting_blocked && !state.upgrade ) { state.upgrade=true; return true; } return false; } #ifdef BOOST_THREAD_USES_CHRONO template bool try_unlock_shared_and_lock_upgrade_for( const chrono::duration& rel_time) { return try_unlock_shared_and_lock_upgrade_until( chrono::steady_clock::now() + rel_time); } template bool try_unlock_shared_and_lock_upgrade_until( const chrono::time_point& abs_time) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); state.assert_lock_shared(); if( state.exclusive || state.exclusive_waiting_blocked || state.upgrade ) { for (;;) { cv_status status = exclusive_cond.wait_until(lk,abs_time); if( ! state.exclusive && ! state.exclusive_waiting_blocked && ! state.upgrade ) break; if(status == cv_status::timeout) return false; } } state.upgrade=true; return true; } #endif #endif }; typedef shared_mutex upgrade_mutex; } #include #endif passenger-4.0.37/ext/boost/thread/pthread/shared_mutex_assert.hpp000644 000765 000024 00000054473 12233035540 025637 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_PTHREAD_SHARED_MUTEX_HPP #define BOOST_THREAD_PTHREAD_SHARED_MUTEX_HPP // (C) Copyright 2006-8 Anthony Williams // (C) Copyright 2012 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS #include #endif #ifdef BOOST_THREAD_USES_CHRONO #include #include #endif #include #include #include namespace boost { class shared_mutex { private: class state_data { public: state_data () : shared_count(0), exclusive(false), upgrade(false), exclusive_waiting_blocked(false) {} void assert_free() const { BOOST_ASSERT( ! exclusive ); BOOST_ASSERT( ! upgrade ); BOOST_ASSERT( shared_count==0 ); } void assert_locked() const { BOOST_ASSERT( exclusive ); BOOST_ASSERT( shared_count==0 ); BOOST_ASSERT( ! upgrade ); } void assert_lock_shared () const { BOOST_ASSERT( ! exclusive ); BOOST_ASSERT( shared_count>0 ); //BOOST_ASSERT( (! upgrade) || (shared_count>1)); // if upgraded there are at least 2 threads sharing the mutex, // except when unlock_upgrade_and_lock has decreased the number of readers but has not taken yet exclusive ownership. } void assert_lock_upgraded () const { BOOST_ASSERT( ! exclusive ); BOOST_ASSERT( upgrade ); BOOST_ASSERT( shared_count>0 ); } void assert_lock_not_upgraded () const { BOOST_ASSERT( ! upgrade ); } bool can_lock () const { return ! (shared_count || exclusive); } void exclusive_blocked (bool blocked) { exclusive_waiting_blocked = blocked; } void lock () { exclusive = true; } void unlock () { exclusive = false; exclusive_waiting_blocked = false; } bool can_lock_shared () const { return ! (exclusive || exclusive_waiting_blocked); } bool is_last_shared () const { return !shared_count ; } unsigned get_shared_count () const { return shared_count ; } unsigned lock_shared () { return ++shared_count; } void unlock_shared () { --shared_count; } bool unlock_shared_downgrades() { if (upgrade) { upgrade=false; exclusive=true; return true; } else { exclusive_waiting_blocked=false; return false; } } void lock_upgrade () { lock_shared (); upgrade=true; } bool can_lock_upgrade () const { return ! (exclusive || exclusive_waiting_blocked || upgrade); } void unlock_upgrade () { upgrade=false; unlock_shared(); } //private: unsigned shared_count; bool exclusive; bool upgrade; bool exclusive_waiting_blocked; }; state_data state; boost::mutex state_change; boost::condition_variable shared_cond; boost::condition_variable exclusive_cond; boost::condition_variable upgrade_cond; void release_waiters() { exclusive_cond.notify_one(); shared_cond.notify_all(); } public: BOOST_THREAD_NO_COPYABLE(shared_mutex) shared_mutex() { } ~shared_mutex() { } void lock_shared() { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(!state.can_lock_shared()) { shared_cond.wait(lk); } state.lock_shared(); } bool try_lock_shared() { boost::unique_lock lk(state_change); if(!state.can_lock_shared()) { return false; } else { state.lock_shared(); return true; } } #if defined BOOST_THREAD_USES_DATETIME bool timed_lock_shared(system_time const& timeout) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(!state.can_lock_shared()) { if(!shared_cond.timed_wait(lk,timeout)) { return false; } } state.lock_shared(); return true; } template bool timed_lock_shared(TimeDuration const & relative_time) { return timed_lock_shared(get_system_time()+relative_time); } #endif #ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_shared_for(const chrono::duration& rel_time) { return try_lock_shared_until(chrono::steady_clock::now() + rel_time); } template bool try_lock_shared_until(const chrono::time_point& abs_time) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(!state.can_lock_shared()) { if(cv_status::timeout==shared_cond.wait_until(lk,abs_time)) { return false; } } state.lock_shared(); return true; } #endif void unlock_shared() { boost::unique_lock lk(state_change); state.assert_lock_shared(); state.unlock_shared(); if (state.get_shared_count () == 0) { if (state.unlock_shared_downgrades()) { lk.unlock(); upgrade_cond.notify_one(); } else { lk.unlock(); } release_waiters(); } } void lock() { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(!state.can_lock()) { state.exclusive_blocked(true); exclusive_cond.wait(lk); } state.lock(); } #if defined BOOST_THREAD_USES_DATETIME bool timed_lock(system_time const& timeout) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(!state.can_lock()) { state.exclusive_blocked(true); if(!exclusive_cond.timed_wait(lk,timeout)) { if(!state.can_lock()) { state.exclusive_blocked(false); release_waiters(); return false; } break; } } state.exclusive=true; //state.lock(); return true; } template bool timed_lock(TimeDuration const & relative_time) { return timed_lock(get_system_time()+relative_time); } #endif #ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_for(const chrono::duration& rel_time) { return try_lock_until(chrono::steady_clock::now() + rel_time); } template bool try_lock_until(const chrono::time_point& abs_time) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(!state.can_lock()) { state.exclusive_blocked(true); if(cv_status::timeout == exclusive_cond.wait_until(lk,abs_time)) { if(!state.can_lock()) { state.exclusive_blocked(false); release_waiters(); return false; } break; } } state.exclusive=true; //state.lock(); return true; } #endif bool try_lock() { boost::unique_lock lk(state_change); if(!state.can_lock()) { return false; } else { state.lock(); return true; } } void unlock() { boost::unique_lock lk(state_change); state.assert_locked(); state.unlock(); state.assert_free(); release_waiters(); } void lock_upgrade() { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(!state.can_lock_upgrade()) { shared_cond.wait(lk); } state.lock_upgrade(); } #if defined BOOST_THREAD_USES_DATETIME bool timed_lock_upgrade(system_time const& timeout) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(!state.can_lock_upgrade()) { if(!shared_cond.timed_wait(lk,timeout)) { if(!state.can_lock_upgrade()) { return false; } break; } } state.lock_upgrade(); return true; } template bool timed_lock_upgrade(TimeDuration const & relative_time) { return timed_lock_upgrade(get_system_time()+relative_time); } #endif #ifdef BOOST_THREAD_USES_CHRONO template bool try_lock_upgrade_for(const chrono::duration& rel_time) { return try_lock_upgrade_until(chrono::steady_clock::now() + rel_time); } template bool try_lock_upgrade_until(const chrono::time_point& abs_time) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); while(!state.can_lock_upgrade()) { if(cv_status::timeout == shared_cond.wait_until(lk,abs_time)) { if(!state.can_lock_upgrade()) { return false; } break; } } state.lock_upgrade(); return true; } #endif bool try_lock_upgrade() { boost::unique_lock lk(state_change); if(!state.can_lock_upgrade()) { return false; } else { state.lock_upgrade(); state.assert_lock_upgraded(); return true; } } void unlock_upgrade() { boost::unique_lock lk(state_change); state.assert_lock_upgraded(); state.unlock_upgrade(); state.assert_lock_not_upgraded (); if(state.get_shared_count () == 0) { state.exclusive_blocked(false); lk.unlock(); release_waiters(); } else { lk.unlock(); shared_cond.notify_all(); } } // Upgrade <-> Exclusive void unlock_upgrade_and_lock() { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); state.assert_lock_upgraded(); // assert state.get_shared_count() >=1 while( //! state.exclusive_waiting_blocked // Fixme: is this needed? //&& state.get_shared_count()!=1) { upgrade_cond.wait(lk); } state.unlock_upgrade(); state.lock(); state.assert_locked(); } void unlock_and_lock_upgrade() { boost::unique_lock lk(state_change); state.assert_locked(); state.unlock(); state.lock_upgrade(); state.assert_lock_upgraded(); release_waiters(); } bool try_unlock_upgrade_and_lock() { boost::unique_lock lk(state_change); state.assert_lock_upgraded(); if( //!state.exclusive // this should be removed once the assertion work ! state.exclusive_waiting_blocked // Fixme: why this is needed? //&& state.upgrade // this should be removed once the assertion work && state.get_shared_count()==1) { state.unlock_upgrade(); state.lock(); state.assert_locked(); return true; } return false; } #ifdef BOOST_THREAD_USES_CHRONO template bool try_unlock_upgrade_and_lock_for( const chrono::duration& rel_time) { return try_unlock_upgrade_and_lock_until( chrono::steady_clock::now() + rel_time); } template bool try_unlock_upgrade_and_lock_until( const chrono::time_point& abs_time) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); state.assert_lock_upgraded(); if (//state.exclusive // this should be removed once the assertion work state.exclusive_waiting_blocked // Fixme: is this needed? //|| ! state.upgrade // this should be removed once the assertion work || state.get_shared_count() != 1) { for (;;) { //cv_status status = shared_cond.wait_until(lk,abs_time); cv_status status = upgrade_cond.wait_until(lk,abs_time); if (//!state.exclusive // this should be removed once the assertion work ! state.exclusive_waiting_blocked // Fixme: is this needed? //&& ! state.upgrade // this should be removed once the assertion work && state.get_shared_count() == 1) break; if(status == cv_status::timeout) return false; } } state.unlock_upgrade(); state.lock(); return true; } #endif // Shared <-> Exclusive void unlock_and_lock_shared() { boost::unique_lock lk(state_change); state.assert_locked(); state.unlock(); state.lock_shared(); release_waiters(); } #ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS bool try_unlock_shared_and_lock() { boost::unique_lock lk(state_change); state.assert_lock_shared(); if( //!state.exclusive // this should be removed once the assertion work ! state.exclusive_waiting_blocked // Fixme: why this is needed? //&& ! state.upgrade // Fixme: why this is needed if state.get_shared_count()==1? && state.get_shared_count()==1) { state.unlock_shared(); state.lock(); return true; } return false; } #ifdef BOOST_THREAD_USES_CHRONO template bool try_unlock_shared_and_lock_for( const chrono::duration& rel_time) { return try_unlock_shared_and_lock_until( chrono::steady_clock::now() + rel_time); } template bool try_unlock_shared_and_lock_until( const chrono::time_point& abs_time) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); state.assert_lock_shared(); if ( // !state.exclusive // this should be removed once the assertion work state.exclusive_waiting_blocked // Fixme: is this needed? //|| state.upgrade // Fixme: why this is needed if state.get_shared_count()==1? || state.get_shared_count() != 1) { for (;;) { cv_status status = shared_cond.wait_until(lk,abs_time); if ( //! state.exclusive // this should be removed once the assertion work ! state.exclusive_waiting_blocked // Fixme: is this needed? //&& ! state.upgrade && state.get_shared_count() == 1) break; if(status == cv_status::timeout) return false; } } state.unlock_shared(); state.lock(); state.upgrade=false; // Is this absolutely needed? state.exclusive_waiting_blocked=false; // Is this absolutely needed? return true; } #endif #endif // Shared <-> Upgrade void unlock_upgrade_and_lock_shared() { boost::unique_lock lk(state_change); state.assert_lock_upgraded(); //state.unlock_upgrade(); //state.lock_shared(); // less efficient state.upgrade=false; state.exclusive_waiting_blocked=false; // Is this absolutely needed? release_waiters(); } #ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS bool try_unlock_shared_and_lock_upgrade() { boost::unique_lock lk(state_change); state.assert_lock_shared(); if( //! state.exclusive // this should be removed once the assertion work ! state.exclusive_waiting_blocked // Fixme: is this needed? && ! state.upgrade ) { state.upgrade=true; return true; } return false; } #ifdef BOOST_THREAD_USES_CHRONO template bool try_unlock_shared_and_lock_upgrade_for( const chrono::duration& rel_time) { return try_unlock_shared_and_lock_upgrade_until( chrono::steady_clock::now() + rel_time); } template bool try_unlock_shared_and_lock_upgrade_until( const chrono::time_point& abs_time) { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS boost::this_thread::disable_interruption do_not_disturb; #endif boost::unique_lock lk(state_change); state.assert_lock_shared(); if( //state.exclusive // this should be removed once the assertion work state.exclusive_waiting_blocked // Fixme: is this needed? || state.upgrade ) { for (;;) { cv_status status = exclusive_cond.wait_until(lk,abs_time); if( //! state.exclusive // this should be removed once the assertion work ! state.exclusive_waiting_blocked // Fixme: is this needed? && ! state.upgrade ) break; if(status == cv_status::timeout) return false; } } //state.unlock_shared(); //state.lock_upgrade(); // less efficient state.upgrade=true; return true; } #endif #endif }; typedef shared_mutex upgrade_mutex; } #include #endif passenger-4.0.37/ext/boost/thread/pthread/thread_data.hpp000644 000765 000024 00000020473 12233035540 024017 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_PTHREAD_THREAD_DATA_HPP #define BOOST_THREAD_PTHREAD_THREAD_DATA_HPP // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba #include #include #include #include #include #include #include #include #include #include #ifdef BOOST_THREAD_USES_CHRONO #include #endif #include #include #include #if defined(__ANDROID__) #include // http://code.google.com/p/android/issues/detail?id=39983 #endif #include #include #include namespace boost { class thread_attributes { public: thread_attributes() BOOST_NOEXCEPT { int res = pthread_attr_init(&val_); BOOST_VERIFY(!res && "pthread_attr_init failed"); } ~thread_attributes() { int res = pthread_attr_destroy(&val_); BOOST_VERIFY(!res && "pthread_attr_destroy failed"); } // stack void set_stack_size(std::size_t size) BOOST_NOEXCEPT { if (size==0) return; std::size_t page_size = getpagesize(); #ifdef PTHREAD_STACK_MIN if (size func; void* value; tss_data_node(boost::shared_ptr func_, void* value_): func(func_),value(value_) {} }; struct thread_data_base; typedef boost::shared_ptr thread_data_ptr; struct BOOST_THREAD_DECL thread_data_base: enable_shared_from_this { thread_data_ptr self; pthread_t thread_handle; boost::mutex data_mutex; boost::condition_variable done_condition; boost::mutex sleep_mutex; boost::condition_variable sleep_condition; bool done; bool join_started; bool joined; boost::detail::thread_exit_callback_node* thread_exit_callbacks; std::map tss_data; pthread_mutex_t* cond_mutex; pthread_cond_t* current_cond; typedef std::vector //, hidden_allocator > > notify_list_t; notify_list_t notify; typedef std::vector > async_states_t; async_states_t async_states_; //#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS // These data must be at the end so that the access to the other fields doesn't change // when BOOST_THREAD_PROVIDES_INTERRUPTIONS is defined. // Another option is to have them always bool interrupt_enabled; bool interrupt_requested; //#endif thread_data_base(): thread_handle(0), done(false),join_started(false),joined(false), thread_exit_callbacks(0), cond_mutex(0), current_cond(0), notify(), async_states_() //#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS , interrupt_enabled(true) , interrupt_requested(false) //#endif {} virtual ~thread_data_base(); typedef pthread_t native_handle_type; virtual void run()=0; virtual void notify_all_at_thread_exit(condition_variable* cv, mutex* m) { notify.push_back(std::pair(cv, m)); } void make_ready_at_thread_exit(shared_ptr as) { async_states_.push_back(as); } }; BOOST_THREAD_DECL thread_data_base* get_current_thread_data(); #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS class interruption_checker { thread_data_base* const thread_info; pthread_mutex_t* m; bool set; void check_for_interruption() { #ifndef BOOST_NO_EXCEPTIONS if(thread_info->interrupt_requested) { thread_info->interrupt_requested=false; throw thread_interrupted(); // BOOST_NO_EXCEPTIONS protected } #endif } void operator=(interruption_checker&); public: explicit interruption_checker(pthread_mutex_t* cond_mutex,pthread_cond_t* cond): thread_info(detail::get_current_thread_data()),m(cond_mutex), set(thread_info && thread_info->interrupt_enabled) { if(set) { lock_guard guard(thread_info->data_mutex); check_for_interruption(); thread_info->cond_mutex=cond_mutex; thread_info->current_cond=cond; BOOST_VERIFY(!pthread_mutex_lock(m)); } else { BOOST_VERIFY(!pthread_mutex_lock(m)); } } ~interruption_checker() { if(set) { BOOST_VERIFY(!pthread_mutex_unlock(m)); lock_guard guard(thread_info->data_mutex); thread_info->cond_mutex=NULL; thread_info->current_cond=NULL; } else { BOOST_VERIFY(!pthread_mutex_unlock(m)); } } }; #endif } namespace this_thread { namespace hiden { void BOOST_THREAD_DECL sleep_for(const timespec& ts); void BOOST_THREAD_DECL sleep_until(const timespec& ts); } #ifdef BOOST_THREAD_USES_CHRONO #ifdef BOOST_THREAD_SLEEP_FOR_IS_STEADY inline void BOOST_SYMBOL_VISIBLE sleep_for(const chrono::nanoseconds& ns) { return boost::this_thread::hiden::sleep_for(boost::detail::to_timespec(ns)); } #endif #endif // BOOST_THREAD_USES_CHRONO void BOOST_THREAD_DECL yield() BOOST_NOEXCEPT; #if defined BOOST_THREAD_USES_DATETIME #ifdef __DECXXX /// Workaround of DECCXX issue of incorrect template substitution template<> #endif inline void sleep(system_time const& abs_time) { return boost::this_thread::hiden::sleep_until(boost::detail::to_timespec(abs_time)); } template inline BOOST_SYMBOL_VISIBLE void sleep(TimeDuration const& rel_time) { this_thread::sleep(get_system_time()+rel_time); } #endif // BOOST_THREAD_USES_DATETIME } // this_thread } #include #endif passenger-4.0.37/ext/boost/thread/pthread/thread_heap_alloc.hpp000644 000765 000024 00000021464 12233035540 025176 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2008 Anthony Williams #ifndef THREAD_HEAP_ALLOC_PTHREAD_HPP #define THREAD_HEAP_ALLOC_PTHREAD_HPP #include namespace boost { namespace detail { template inline T* heap_new() { return new T(); } #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template inline T* heap_new(A1&& a1) { return new T(static_cast(a1)); } template inline T* heap_new(A1&& a1,A2&& a2) { return new T(static_cast(a1),static_cast(a2)); } template inline T* heap_new(A1&& a1,A2&& a2,A3&& a3) { return new T(static_cast(a1),static_cast(a2), static_cast(a3)); } template inline T* heap_new(A1&& a1,A2&& a2,A3&& a3,A4&& a4) { return new T(static_cast(a1),static_cast(a2), static_cast(a3),static_cast(a4)); } #else template inline T* heap_new_impl(A1 a1) { return new T(a1); } template inline T* heap_new_impl(A1 a1,A2 a2) { return new T(a1,a2); } template inline T* heap_new_impl(A1 a1,A2 a2,A3 a3) { return new T(a1,a2,a3); } template inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4) { return new T(a1,a2,a3,a4); } template inline T* heap_new(A1 const& a1) { return heap_new_impl(a1); } template inline T* heap_new(A1& a1) { return heap_new_impl(a1); } template inline T* heap_new(A1 const& a1,A2 const& a2) { return heap_new_impl(a1,a2); } template inline T* heap_new(A1& a1,A2 const& a2) { return heap_new_impl(a1,a2); } template inline T* heap_new(A1 const& a1,A2& a2) { return heap_new_impl(a1,a2); } template inline T* heap_new(A1& a1,A2& a2) { return heap_new_impl(a1,a2); } template inline T* heap_new(A1 const& a1,A2 const& a2,A3 const& a3) { return heap_new_impl(a1,a2,a3); } template inline T* heap_new(A1& a1,A2 const& a2,A3 const& a3) { return heap_new_impl(a1,a2,a3); } template inline T* heap_new(A1 const& a1,A2& a2,A3 const& a3) { return heap_new_impl(a1,a2,a3); } template inline T* heap_new(A1& a1,A2& a2,A3 const& a3) { return heap_new_impl(a1,a2,a3); } template inline T* heap_new(A1 const& a1,A2 const& a2,A3& a3) { return heap_new_impl(a1,a2,a3); } template inline T* heap_new(A1& a1,A2 const& a2,A3& a3) { return heap_new_impl(a1,a2,a3); } template inline T* heap_new(A1 const& a1,A2& a2,A3& a3) { return heap_new_impl(a1,a2,a3); } template inline T* heap_new(A1& a1,A2& a2,A3& a3) { return heap_new_impl(a1,a2,a3); } template inline T* heap_new(A1 const& a1,A2 const& a2,A3 const& a3,A4 const& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1& a1,A2 const& a2,A3 const& a3,A4 const& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1 const& a1,A2& a2,A3 const& a3,A4 const& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1& a1,A2& a2,A3 const& a3,A4 const& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1 const& a1,A2 const& a2,A3& a3,A4 const& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1& a1,A2 const& a2,A3& a3,A4 const& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1 const& a1,A2& a2,A3& a3,A4 const& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1& a1,A2& a2,A3& a3,A4 const& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1 const& a1,A2 const& a2,A3 const& a3,A4& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1& a1,A2 const& a2,A3 const& a3,A4& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1 const& a1,A2& a2,A3 const& a3,A4& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1& a1,A2& a2,A3 const& a3,A4& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1 const& a1,A2 const& a2,A3& a3,A4& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1& a1,A2 const& a2,A3& a3,A4& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1 const& a1,A2& a2,A3& a3,A4& a4) { return heap_new_impl(a1,a2,a3,a4); } template inline T* heap_new(A1& a1,A2& a2,A3& a3,A4& a4) { return heap_new_impl(a1,a2,a3,a4); } #endif template inline void heap_delete(T* data) { delete data; } template struct do_heap_delete { void operator()(T* data) const { detail::heap_delete(data); } }; } } #include #endif passenger-4.0.37/ext/boost/thread/pthread/timespec.hpp000644 000765 000024 00000006733 12233035540 023373 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_PTHREAD_TIMESPEC_HPP #define BOOST_THREAD_PTHREAD_TIMESPEC_HPP // (C) Copyright 2007-8 Anthony Williams // (C) Copyright 2012 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #if defined BOOST_THREAD_USES_DATETIME #include #endif #include #ifndef _WIN32 #include #endif #ifdef BOOST_THREAD_USES_CHRONO #include #endif #if defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) # define BOOST_THREAD_TIMESPEC_MAC_API #include //for gettimeofday and timeval #else #include // for clock_gettime #endif #include namespace boost { namespace detail { #if defined BOOST_THREAD_USES_DATETIME inline struct timespec to_timespec(boost::system_time const& abs_time) { struct timespec timeout = { 0,0}; boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0); timeout.tv_sec=time_since_epoch.total_seconds(); timeout.tv_nsec=(long)(time_since_epoch.fractional_seconds()*(1000000000l/time_since_epoch.ticks_per_second())); return timeout; } #endif #if defined BOOST_THREAD_USES_CHRONO inline timespec to_timespec(chrono::nanoseconds const& ns) { struct timespec ts; ts.tv_sec = static_cast(chrono::duration_cast(ns).count()); ts.tv_nsec = static_cast((ns - chrono::duration_cast(ns)).count()); return ts; } #endif inline timespec to_timespec(boost::intmax_t const& ns) { boost::intmax_t s = ns / 1000000000l; struct timespec ts; ts.tv_sec = static_cast (s); ts.tv_nsec = static_cast (ns - s * 1000000000l); return ts; } inline boost::intmax_t to_nanoseconds_int_max(timespec const& ts) { return static_cast(ts.tv_sec) * 1000000000l + ts.tv_nsec; } inline bool timespec_ge_zero(timespec const& ts) { return (ts.tv_sec >= 0) || (ts.tv_nsec >= 0); } inline timespec timespec_now() { timespec ts; #if defined(BOOST_THREAD_TIMESPEC_MAC_API) timeval tv; ::gettimeofday(&tv, 0); ts.tv_sec = tv.tv_sec; ts.tv_nsec = tv.tv_usec * 1000; #else if ( ::clock_gettime( CLOCK_REALTIME, &ts ) ) { BOOST_ASSERT(0 && "Boost::Thread - Internal Error"); } #endif return ts; } inline timespec timespec_zero() { timespec ts; ts.tv_sec = 0; ts.tv_nsec = 0; return ts; } inline timespec timespec_plus(timespec const& lhs, timespec const& rhs) { return to_timespec(to_nanoseconds_int_max(lhs) + to_nanoseconds_int_max(rhs)); } inline timespec timespec_minus(timespec const& lhs, timespec const& rhs) { return to_timespec(to_nanoseconds_int_max(lhs) - to_nanoseconds_int_max(rhs)); } inline bool timespec_gt(timespec const& lhs, timespec const& rhs) { return to_nanoseconds_int_max(lhs) > to_nanoseconds_int_max(rhs); } inline bool timespec_ge(timespec const& lhs, timespec const& rhs) { return to_nanoseconds_int_max(lhs) >= to_nanoseconds_int_max(rhs); } } } #include #endif passenger-4.0.37/ext/boost/thread/detail/async_func.hpp000644 000765 000024 00000036360 12233035540 023524 0ustar00honglistaff000000 000000 // Copyright (C) 2012 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // 2013/04 Vicente J. Botet Escriba // Provide implementation up to 9 parameters when BOOST_NO_CXX11_VARIADIC_TEMPLATES is defined. // Make use of Boost.Move // Make use of Boost.Tuple (movable) // 2012/11 Vicente J. Botet Escriba // Adapt to boost libc++ implementation //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // // The async_func code is based on the one from libcxx. //===----------------------------------------------------------------------===// #ifndef BOOST_THREAD_DETAIL_ASYNC_FUNCT_HPP #define BOOST_THREAD_DETAIL_ASYNC_FUNCT_HPP #include #include #include #include #include #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ ! defined(BOOST_NO_CXX11_HDR_TUPLE) #include #else #include #endif namespace boost { namespace detail { #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ ! defined(BOOST_NO_CXX11_HDR_TUPLE) template class async_func { std::tuple f_; public: BOOST_THREAD_MOVABLE_ONLY( async_func) //typedef typename invoke_of<_Fp, _Args...>::type Rp; typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit async_func(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(Args)... args) : f_(boost::move(f), boost::move(args)...) {} BOOST_SYMBOL_VISIBLE async_func(BOOST_THREAD_RV_REF(async_func) f) : f_(boost::move(f.f_)) {} result_type operator()() { typedef typename make_tuple_indices<1+sizeof...(Args), 1>::type Index; return execute(Index()); } private: template result_type execute(tuple_indices) { return invoke(boost::move(std::get<0>(f_)), boost::move(std::get(f_))...); } }; //BOOST_THREAD_DCL_MOVABLE_BEG(X) async_func BOOST_THREAD_DCL_MOVABLE_END #else template class async_func; template class async_func { Fp fp_; T0 v0_; T1 v1_; T2 v2_; T3 v3_; T4 v4_; T5 v5_; T6 v6_; T7 v7_; T8 v8_; //::boost::tuple f_; public: BOOST_THREAD_MOVABLE_ONLY(async_func) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit async_func(BOOST_THREAD_RV_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 , BOOST_THREAD_RV_REF(T3) a3 , BOOST_THREAD_RV_REF(T4) a4 , BOOST_THREAD_RV_REF(T5) a5 , BOOST_THREAD_RV_REF(T6) a6 , BOOST_THREAD_RV_REF(T7) a7 , BOOST_THREAD_RV_REF(T8) a8 ) : fp_(boost::move(f)) , v0_(boost::move(a0)) , v1_(boost::move(a1)) , v2_(boost::move(a2)) , v3_(boost::move(a3)) , v4_(boost::move(a4)) , v5_(boost::move(a5)) , v6_(boost::move(a6)) , v7_(boost::move(a7)) , v8_(boost::move(a8)) {} BOOST_SYMBOL_VISIBLE async_func(BOOST_THREAD_RV_REF(async_func) f) : fp_(boost::move(f.fp)) , v0_(boost::move(f.a0)) , v1_(boost::move(f.a1)) , v2_(boost::move(f.a2)) , v3_(boost::move(f.a3)) , v4_(boost::move(f.a4)) , v5_(boost::move(f.a5)) , v6_(boost::move(f.a6)) , v7_(boost::move(f.a7)) , v8_(boost::move(f.a8)) {} result_type operator()() { return invoke(boost::move(fp_) , boost::move(v0_) , boost::move(v1_) , boost::move(v2_) , boost::move(v3_) , boost::move(v4_) , boost::move(v5_) , boost::move(v6_) , boost::move(v7_) , boost::move(v8_) ); } }; template class async_func { Fp fp_; T0 v0_; T1 v1_; T2 v2_; T3 v3_; T4 v4_; T5 v5_; T6 v6_; T7 v7_; public: BOOST_THREAD_MOVABLE_ONLY(async_func) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit async_func(BOOST_THREAD_RV_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 , BOOST_THREAD_RV_REF(T3) a3 , BOOST_THREAD_RV_REF(T4) a4 , BOOST_THREAD_RV_REF(T5) a5 , BOOST_THREAD_RV_REF(T6) a6 , BOOST_THREAD_RV_REF(T7) a7 ) : fp_(boost::move(f)) , v0_(boost::move(a0)) , v1_(boost::move(a1)) , v2_(boost::move(a2)) , v3_(boost::move(a3)) , v4_(boost::move(a4)) , v5_(boost::move(a5)) , v6_(boost::move(a6)) , v7_(boost::move(a7)) {} BOOST_SYMBOL_VISIBLE async_func(BOOST_THREAD_RV_REF(async_func) f) : fp_(boost::move(f.fp)) , v0_(boost::move(f.a0)) , v1_(boost::move(f.a1)) , v2_(boost::move(f.a2)) , v3_(boost::move(f.a3)) , v4_(boost::move(f.a4)) , v5_(boost::move(f.a5)) , v6_(boost::move(f.a6)) , v7_(boost::move(f.a7)) {} result_type operator()() { return invoke(boost::move(fp_) , boost::move(v0_) , boost::move(v1_) , boost::move(v2_) , boost::move(v3_) , boost::move(v4_) , boost::move(v5_) , boost::move(v6_) , boost::move(v7_) ); } }; template class async_func { Fp fp_; T0 v0_; T1 v1_; T2 v2_; T3 v3_; T4 v4_; T5 v5_; T6 v6_; public: BOOST_THREAD_MOVABLE_ONLY(async_func) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit async_func(BOOST_THREAD_RV_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 , BOOST_THREAD_RV_REF(T3) a3 , BOOST_THREAD_RV_REF(T4) a4 , BOOST_THREAD_RV_REF(T5) a5 , BOOST_THREAD_RV_REF(T6) a6 ) : fp_(boost::move(f)) , v0_(boost::move(a0)) , v1_(boost::move(a1)) , v2_(boost::move(a2)) , v3_(boost::move(a3)) , v4_(boost::move(a4)) , v5_(boost::move(a5)) , v6_(boost::move(a6)) {} BOOST_SYMBOL_VISIBLE async_func(BOOST_THREAD_RV_REF(async_func) f) : fp_(boost::move(f.fp)) , v0_(boost::move(f.a0)) , v1_(boost::move(f.a1)) , v2_(boost::move(f.a2)) , v3_(boost::move(f.a3)) , v4_(boost::move(f.a4)) , v5_(boost::move(f.a5)) , v6_(boost::move(f.a6)) {} result_type operator()() { return invoke(boost::move(fp_) , boost::move(v0_) , boost::move(v1_) , boost::move(v2_) , boost::move(v3_) , boost::move(v4_) , boost::move(v5_) , boost::move(v6_) ); } }; template class async_func { Fp fp_; T0 v0_; T1 v1_; T2 v2_; T3 v3_; T4 v4_; T5 v5_; public: BOOST_THREAD_MOVABLE_ONLY(async_func) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit async_func(BOOST_THREAD_RV_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 , BOOST_THREAD_RV_REF(T3) a3 , BOOST_THREAD_RV_REF(T4) a4 , BOOST_THREAD_RV_REF(T5) a5 ) : fp_(boost::move(f)) , v0_(boost::move(a0)) , v1_(boost::move(a1)) , v2_(boost::move(a2)) , v3_(boost::move(a3)) , v4_(boost::move(a4)) , v5_(boost::move(a5)) {} BOOST_SYMBOL_VISIBLE async_func(BOOST_THREAD_RV_REF(async_func) f) : fp_(boost::move(f.fp)) , v0_(boost::move(f.a0)) , v1_(boost::move(f.a1)) , v2_(boost::move(f.a2)) , v3_(boost::move(f.a3)) , v4_(boost::move(f.a4)) , v5_(boost::move(f.a5)) {} result_type operator()() { return invoke(boost::move(fp_) , boost::move(v0_) , boost::move(v1_) , boost::move(v2_) , boost::move(v3_) , boost::move(v4_) , boost::move(v5_) ); } }; template class async_func { Fp fp_; T0 v0_; T1 v1_; T2 v2_; T3 v3_; T4 v4_; public: BOOST_THREAD_MOVABLE_ONLY(async_func) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit async_func(BOOST_THREAD_RV_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 , BOOST_THREAD_RV_REF(T3) a3 , BOOST_THREAD_RV_REF(T4) a4 ) : fp_(boost::move(f)) , v0_(boost::move(a0)) , v1_(boost::move(a1)) , v2_(boost::move(a2)) , v3_(boost::move(a3)) , v4_(boost::move(a4)) {} BOOST_SYMBOL_VISIBLE async_func(BOOST_THREAD_RV_REF(async_func) f) : fp_(boost::move(f.fp)) , v0_(boost::move(f.a0)) , v1_(boost::move(f.a1)) , v2_(boost::move(f.a2)) , v3_(boost::move(f.a3)) , v4_(boost::move(f.a4)) {} result_type operator()() { return invoke(boost::move(fp_) , boost::move(v0_) , boost::move(v1_) , boost::move(v2_) , boost::move(v3_) , boost::move(v4_) ); } }; template class async_func { Fp fp_; T0 v0_; T1 v1_; T2 v2_; T3 v3_; public: BOOST_THREAD_MOVABLE_ONLY(async_func) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit async_func(BOOST_THREAD_RV_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 , BOOST_THREAD_RV_REF(T3) a3 ) : fp_(boost::move(f)) , v0_(boost::move(a0)) , v1_(boost::move(a1)) , v2_(boost::move(a2)) , v3_(boost::move(a3)) {} BOOST_SYMBOL_VISIBLE async_func(BOOST_THREAD_RV_REF(async_func) f) : fp_(boost::move(f.fp)) , v0_(boost::move(f.a0)) , v1_(boost::move(f.a1)) , v2_(boost::move(f.a2)) , v3_(boost::move(f.a3)) {} result_type operator()() { return invoke(boost::move(fp_) , boost::move(v0_) , boost::move(v1_) , boost::move(v2_) , boost::move(v3_) ); } }; template class async_func { Fp fp_; T0 v0_; T1 v1_; T2 v2_; public: BOOST_THREAD_MOVABLE_ONLY(async_func) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit async_func(BOOST_THREAD_RV_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 , BOOST_THREAD_RV_REF(T2) a2 ) : fp_(boost::move(f)) , v0_(boost::move(a0)) , v1_(boost::move(a1)) , v2_(boost::move(a2)) {} BOOST_SYMBOL_VISIBLE async_func(BOOST_THREAD_RV_REF(async_func) f) : fp_(boost::move(f.fp)) , v0_(boost::move(f.a0)) , v1_(boost::move(f.a1)) , v2_(boost::move(f.a2)) {} result_type operator()() { return invoke(boost::move(fp_) , boost::move(v0_) , boost::move(v1_) , boost::move(v2_) ); } }; template class async_func { Fp fp_; T0 v0_; T1 v1_; public: BOOST_THREAD_MOVABLE_ONLY(async_func) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit async_func(BOOST_THREAD_RV_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 , BOOST_THREAD_RV_REF(T1) a1 ) : fp_(boost::move(f)) , v0_(boost::move(a0)) , v1_(boost::move(a1)) {} BOOST_SYMBOL_VISIBLE async_func(BOOST_THREAD_RV_REF(async_func) f) : fp_(boost::move(f.fp)) , v0_(boost::move(f.a0)) , v1_(boost::move(f.a1)) {} result_type operator()() { return invoke(boost::move(fp_) , boost::move(v0_) , boost::move(v1_) ); } }; template class async_func { Fp fp_; T0 v0_; public: BOOST_THREAD_MOVABLE_ONLY(async_func) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit async_func(BOOST_THREAD_RV_REF(Fp) f , BOOST_THREAD_RV_REF(T0) a0 ) : fp_(boost::move(f)) , v0_(boost::move(a0)) {} BOOST_SYMBOL_VISIBLE async_func(BOOST_THREAD_RV_REF(async_func) f) : fp_(boost::move(f.fp)) , v0_(boost::move(f.a0)) {} result_type operator()() { return invoke(boost::move(fp_) , boost::move(v0_) ); } }; template class async_func { Fp fp_; public: BOOST_THREAD_COPYABLE_AND_MOVABLE(async_func) typedef typename result_of::type result_type; BOOST_SYMBOL_VISIBLE explicit async_func(BOOST_THREAD_FWD_REF(Fp) f) : fp_(boost::move(f)) {} BOOST_SYMBOL_VISIBLE async_func(BOOST_THREAD_FWD_REF(async_func) f) : fp_(boost::move(f.fp_)) {} result_type operator()() { return fp_(); } }; #endif } } #endif // header passenger-4.0.37/ext/boost/thread/detail/config.hpp000644 000765 000024 00000034053 12233035540 022636 0ustar00honglistaff000000 000000 // Copyright (C) 2001-2003 // William E. Kempf // Copyright (C) 2011-2013 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_CONFIG_WEK01032003_HPP #define BOOST_THREAD_CONFIG_WEK01032003_HPP #include #include #include //#define BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS // ATTRIBUTE_MAY_ALIAS #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 302 \ && !defined(__INTEL_COMPILER) // GCC since 3.3 has may_alias attribute that helps to alleviate optimizer issues with // regard to violation of the strict aliasing rules. #define BOOST_THREAD_DETAIL_USE_ATTRIBUTE_MAY_ALIAS #define BOOST_THREAD_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__)) #else #define BOOST_THREAD_ATTRIBUTE_MAY_ALIAS #endif #if defined BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED #define BOOST_THREAD_ASSERT_PRECONDITION(EXPR, EX) \ if (EXPR) {} else boost::throw_exception(EX) #define BOOST_THREAD_VERIFY_PRECONDITION(EXPR, EX) \ if (EXPR) {} else boost::throw_exception(EX) #define BOOST_THREAD_THROW_ELSE_RETURN(EX, RET) \ boost::throw_exception(EX) #else #define BOOST_THREAD_ASSERT_PRECONDITION(EXPR, EX) #define BOOST_THREAD_VERIFY_PRECONDITION(EXPR, EX) \ (void)(EXPR) #define BOOST_THREAD_THROW_ELSE_RETURN(EX, RET) \ return (RET) #endif // This compiler doesn't support Boost.Chrono #if defined __IBMCPP__ && (__IBMCPP__ < 1100) \ && ! defined BOOST_THREAD_DONT_USE_CHRONO #define BOOST_THREAD_DONT_USE_CHRONO #if ! defined BOOST_THREAD_USES_DATETIME #define BOOST_THREAD_USES_DATETIME #endif #endif // This compiler doesn't support Boost.Move #if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) \ && ! defined BOOST_THREAD_DONT_USE_MOVE #define BOOST_THREAD_DONT_USE_MOVE #endif // This compiler doesn't support Boost.Container Allocators files #if defined __SUNPRO_CC \ && ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS #define BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS #endif #if defined _WIN32_WCE && _WIN32_WCE==0x501 \ && ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS #define BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS #endif #if defined BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX || defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_THREAD_NO_MAKE_LOCK_GUARD #define BOOST_THREAD_NO_MAKE_STRICT_LOCK #define BOOST_THREAD_NO_MAKE_NESTED_STRICT_LOCK #endif #if defined(BOOST_NO_CXX11_HDR_TUPLE) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #define BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS #define BOOST_THREAD_NO_SYNCHRONIZE #elif defined _MSC_VER && _MSC_VER <= 1600 // C++ features supported by VC++ 10 (aka 2010) #define BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS #define BOOST_THREAD_NO_SYNCHRONIZE #endif /// BASIC_THREAD_ID #if ! defined BOOST_THREAD_DONT_PROVIDE_BASIC_THREAD_ID \ && ! defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID #define BOOST_THREAD_PROVIDES_BASIC_THREAD_ID #endif /// RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR //#if defined BOOST_NO_CXX11_RVALUE_REFERENCES || defined BOOST_MSVC #define BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR //#endif // Default version #if !defined BOOST_THREAD_VERSION #define BOOST_THREAD_VERSION 2 #else #if BOOST_THREAD_VERSION!=2 && BOOST_THREAD_VERSION!=3 && BOOST_THREAD_VERSION!=4 #error "BOOST_THREAD_VERSION must be 2, 3 or 4" #endif #endif // CHRONO // Uses Boost.Chrono by default if not stated the opposite defining BOOST_THREAD_DONT_USE_CHRONO #if ! defined BOOST_THREAD_DONT_USE_CHRONO \ && ! defined BOOST_THREAD_USES_CHRONO #define BOOST_THREAD_USES_CHRONO #endif #if ! defined BOOST_THREAD_DONT_USE_ATOMIC \ && ! defined BOOST_THREAD_USES_ATOMIC #define BOOST_THREAD_USES_ATOMIC //#define BOOST_THREAD_DONT_USE_ATOMIC #endif #if defined BOOST_THREAD_USES_ATOMIC // Andrey Semashev #define BOOST_THREAD_ONCE_ATOMIC #else //#elif ! defined BOOST_NO_CXX11_THREAD_LOCAL && ! defined BOOST_NO_THREAD_LOCAL && ! defined BOOST_THREAD_NO_UINT32_PSEUDO_ATOMIC // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2444.html#Appendix #define BOOST_THREAD_ONCE_FAST_EPOCH #endif #if BOOST_THREAD_VERSION==2 // PROVIDE_PROMISE_LAZY #if ! defined BOOST_THREAD_DONT_PROVIDE_PROMISE_LAZY \ && ! defined BOOST_THREAD_PROVIDES_PROMISE_LAZY #define BOOST_THREAD_PROVIDES_PROMISE_LAZY #endif // PROVIDE_THREAD_EQ #if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_EQ \ && ! defined BOOST_THREAD_PROVIDES_THREAD_EQ #define BOOST_THREAD_PROVIDES_THREAD_EQ #endif #endif #if BOOST_THREAD_VERSION>=3 // ONCE_CXX11 // fixme BOOST_THREAD_PROVIDES_ONCE_CXX11 doesn't works when thread.cpp is compiled BOOST_THREAD_VERSION 3 #if ! defined BOOST_THREAD_DONT_PROVIDE_ONCE_CXX11 \ && ! defined BOOST_THREAD_PROVIDES_ONCE_CXX11 #define BOOST_THREAD_DONT_PROVIDE_ONCE_CXX11 #endif // THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE #if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE \ && ! defined BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE #define BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE #endif // THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE #if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE \ && ! defined BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE #define BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE #endif // PROVIDE_FUTURE #if ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE \ && ! defined BOOST_THREAD_PROVIDES_FUTURE #define BOOST_THREAD_PROVIDES_FUTURE #endif // FUTURE_CTOR_ALLOCATORS #if ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS \ && ! defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS #define BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS #endif // SHARED_MUTEX_UPWARDS_CONVERSIONS #if ! defined BOOST_THREAD_DONT_PROVIDE_SHARED_MUTEX_UPWARDS_CONVERSIONS \ && ! defined BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS #define BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS #endif // PROVIDE_EXPLICIT_LOCK_CONVERSION #if ! defined BOOST_THREAD_DONT_PROVIDE_EXPLICIT_LOCK_CONVERSION \ && ! defined BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION #define BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION #endif // GENERIC_SHARED_MUTEX_ON_WIN #if ! defined BOOST_THREAD_DONT_PROVIDE_GENERIC_SHARED_MUTEX_ON_WIN \ && ! defined BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN #define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN #endif // USE_MOVE #if ! defined BOOST_THREAD_DONT_USE_MOVE \ && ! defined BOOST_THREAD_USES_MOVE #define BOOST_THREAD_USES_MOVE #endif #endif // deprecated since version 4 #if BOOST_THREAD_VERSION < 4 // NESTED_LOCKS #if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS \ && ! defined BOOST_THREAD_DONT_PROVIDE_NESTED_LOCKS #define BOOST_THREAD_PROVIDES_NESTED_LOCKS #endif // CONDITION #if ! defined BOOST_THREAD_PROVIDES_CONDITION \ && ! defined BOOST_THREAD_DONT_PROVIDE_CONDITION #define BOOST_THREAD_PROVIDES_CONDITION #endif // USE_DATETIME #if ! defined BOOST_THREAD_DONT_USE_DATETIME \ && ! defined BOOST_THREAD_USES_DATETIME #define BOOST_THREAD_USES_DATETIME #endif #endif #if BOOST_THREAD_VERSION>=4 // SIGNATURE_PACKAGED_TASK #if ! defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK \ && ! defined BOOST_THREAD_DONT_PROVIDE_SIGNATURE_PACKAGED_TASK #define BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK #endif // VARIADIC_THREAD #if ! defined BOOST_THREAD_PROVIDES_VARIADIC_THREAD \ && ! defined BOOST_THREAD_DONT_PROVIDE_VARIADIC_THREAD #if ! defined(BOOST_NO_SFINAE_EXPR) && \ ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ ! defined(BOOST_NO_CXX11_DECLTYPE) && \ ! defined(BOOST_NO_CXX11_DECLTYPE_N3276) && \ ! defined(BOOST_NO_CXX11_AUTO) && \ ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \ ! defined(BOOST_NO_CXX11_HDR_TUPLE) #define BOOST_THREAD_PROVIDES_VARIADIC_THREAD #endif #endif // MAKE_READY_AT_THREAD_EXIT #if ! defined BOOST_THREAD_PROVIDES_MAKE_READY_AT_THREAD_EXIT \ && ! defined BOOST_THREAD_DONT_PROVIDE_MAKE_READY_AT_THREAD_EXIT //#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) #define BOOST_THREAD_PROVIDES_MAKE_READY_AT_THREAD_EXIT //#endif #endif // FUTURE_CONTINUATION #if ! defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION \ && ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CONTINUATION #define BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION #endif // FUTURE_INVALID_AFTER_GET #if ! defined BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET \ && ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_INVALID_AFTER_GET #define BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET #endif // NESTED_LOCKS #if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS \ && ! defined BOOST_THREAD_DONT_PROVIDE_NESTED_LOCKS #define BOOST_THREAD_DONT_PROVIDE_NESTED_LOCKS #endif // CONDITION #if ! defined BOOST_THREAD_PROVIDES_CONDITION \ && ! defined BOOST_THREAD_DONT_PROVIDE_CONDITION #define BOOST_THREAD_DONT_PROVIDE_CONDITION #endif #endif // BOOST_THREAD_VERSION>=4 // INTERRUPTIONS #if ! defined BOOST_THREAD_PROVIDES_INTERRUPTIONS \ && ! defined BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS #define BOOST_THREAD_PROVIDES_INTERRUPTIONS #endif // CORRELATIONS // EXPLICIT_LOCK_CONVERSION. #if defined BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION #define BOOST_THREAD_EXPLICIT_LOCK_CONVERSION explicit #else #define BOOST_THREAD_EXPLICIT_LOCK_CONVERSION #endif // BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN is defined if BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS #if defined BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS \ && ! defined BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN #define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN #endif // For C++11 call_once interface the compiler MUST support constexpr. // Otherwise once_flag would be initialized during dynamic initialization stage, which is not thread-safe. #if defined(BOOST_THREAD_PROVIDES_ONCE_CXX11) #if defined(BOOST_NO_CXX11_CONSTEXPR) #undef BOOST_THREAD_PROVIDES_ONCE_CXX11 #endif #endif #if defined(BOOST_THREAD_PLATFORM_WIN32) && defined BOOST_THREAD_DONT_USE_DATETIME #undef BOOST_THREAD_DONT_USE_DATETIME #define BOOST_THREAD_USES_DATETIME #endif #if defined(BOOST_THREAD_PLATFORM_WIN32) && defined BOOST_THREAD_DONT_USE_CHRONO #undef BOOST_THREAD_DONT_USE_CHRONO #define BOOST_THREAD_USES_CHRONO #endif // BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 defined by default up to Boost 1.55 // BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V3_0_0 defined by default up to Boost 1.55 #if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 #if ! defined BOOST_THREAD_PROVIDES_THREAD_EQ #define BOOST_THREAD_PROVIDES_THREAD_EQ #endif #endif #if BOOST_WORKAROUND(__BORLANDC__, < 0x600) # pragma warn -8008 // Condition always true/false # pragma warn -8080 // Identifier declared but never used # pragma warn -8057 // Parameter never used # pragma warn -8066 // Unreachable code #endif #include #if defined(BOOST_THREAD_PLATFORM_WIN32) #else # if defined(BOOST_HAS_PTHREAD_DELAY_NP) || defined(BOOST_HAS_NANOSLEEP) # define BOOST_THREAD_SLEEP_FOR_IS_STEADY # endif #endif // provided for backwards compatibility, since this // macro was used for several releases by mistake. #if defined(BOOST_THREAD_DYN_DLL) && ! defined BOOST_THREAD_DYN_LINK # define BOOST_THREAD_DYN_LINK #endif // compatibility with the rest of Boost's auto-linking code: #if defined(BOOST_THREAD_DYN_LINK) || defined(BOOST_ALL_DYN_LINK) # undef BOOST_THREAD_USE_LIB # define BOOST_THREAD_USE_DLL #endif #if defined(BOOST_THREAD_BUILD_DLL) //Build dll #elif defined(BOOST_THREAD_BUILD_LIB) //Build lib #elif defined(BOOST_THREAD_USE_DLL) //Use dll #elif defined(BOOST_THREAD_USE_LIB) //Use lib #else //Use default # if defined(BOOST_THREAD_PLATFORM_WIN32) # if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) \ || defined(__MINGW32__) || defined(MINGW32) || defined(BOOST_MINGW32) //For compilers supporting auto-tss cleanup //with Boost.Threads lib, use Boost.Threads lib # define BOOST_THREAD_USE_LIB # else //For compilers not yet supporting auto-tss cleanup //with Boost.Threads lib, use Boost.Threads dll # define BOOST_THREAD_USE_DLL # endif # else # define BOOST_THREAD_USE_LIB # endif #endif #if defined(BOOST_HAS_DECLSPEC) # if defined(BOOST_THREAD_BUILD_DLL) //Build dll # define BOOST_THREAD_DECL BOOST_SYMBOL_EXPORT //# define BOOST_THREAD_DECL __declspec(dllexport) # elif defined(BOOST_THREAD_USE_DLL) //Use dll # define BOOST_THREAD_DECL BOOST_SYMBOL_IMPORT //# define BOOST_THREAD_DECL __declspec(dllimport) # else # define BOOST_THREAD_DECL # endif #elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # define BOOST_THREAD_DECL BOOST_SYMBOL_VISIBLE #else # define BOOST_THREAD_DECL #endif // BOOST_HAS_DECLSPEC // // Automatically link to the correct build variant where possible. // #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_THREAD_NO_LIB) && !defined(BOOST_THREAD_BUILD_DLL) && !defined(BOOST_THREAD_BUILD_LIB) // // Tell the autolink to link dynamically, this will get undef'ed by auto_link.hpp // once it's done with it: // #if defined(BOOST_THREAD_USE_DLL) # define BOOST_DYN_LINK #endif // // Set the name of our library, this will get undef'ed by auto_link.hpp // once it's done with it: // #if defined(BOOST_THREAD_LIB_NAME) # define BOOST_LIB_NAME BOOST_THREAD_LIB_NAME #else # define BOOST_LIB_NAME boost_thread #endif // // If we're importing code from a dll, then tell auto_link.hpp about it: // // And include the header that does the work: // #include #endif // auto-linking disabled #endif // BOOST_THREAD_CONFIG_WEK1032003_HPP // Change Log: // 22 Jan 05 Roland Schwarz (speedsnail) // Usage of BOOST_HAS_DECLSPEC macro. // Default again is static lib usage. // BOOST_DYN_LINK only defined when autolink included. passenger-4.0.37/ext/boost/thread/detail/counter.hpp000644 000765 000024 00000004036 12233035540 023046 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2013 Vicente J. Botet Escriba #ifndef BOOST_THREAD_COUNTER_HPP #define BOOST_THREAD_COUNTER_HPP #include #include //#include //#include #include #include #include #include #include namespace boost { namespace detail { struct counter { condition_variable cond_; std::size_t value_; counter(std::size_t value) : value_(value) { } counter& operator=(counter const& rhs) { value_ = rhs.value_; return *this; } counter& operator=(std::size_t value) { value_ = value; return *this; } operator std::size_t() const { return value_; } operator std::size_t&() { return value_; } void inc_and_notify_all() { ++value_; cond_.notify_all(); } void dec_and_notify_all() { --value_; cond_.notify_all(); } void assign_and_notify_all(counter const& rhs) { value_ = rhs.value_; cond_.notify_all(); } void assign_and_notify_all(std::size_t value) { value_ = value; cond_.notify_all(); } }; struct counter_is_not_zero { counter_is_not_zero(const counter& count) : count_(count) {} bool operator()() const { return count_ != 0; } const counter& count_; }; struct counter_is_zero { counter_is_zero(const counter& count) : count_(count) {} bool operator()() const { return count_ == 0; } const counter& count_; }; } } // namespace boost #include #endif passenger-4.0.37/ext/boost/thread/detail/delete.hpp000644 000765 000024 00000003173 12233035540 022632 0ustar00honglistaff000000 000000 // Copyright (C) 2012 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_DETAIL_DELETE_HPP #define BOOST_THREAD_DETAIL_DELETE_HPP #include /** * BOOST_THREAD_DELETE_COPY_CTOR deletes the copy constructor when the compiler supports it or * makes it private. * * BOOST_THREAD_DELETE_COPY_ASSIGN deletes the copy assignment when the compiler supports it or * makes it private. */ #ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \ CLASS(CLASS const&) = delete; \ #define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \ CLASS& operator=(CLASS const&) = delete; #else // BOOST_NO_CXX11_DELETED_FUNCTIONS #if defined(BOOST_MSVC) && _MSC_VER >= 1600 #define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \ private: \ CLASS(CLASS const&); \ public: #define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \ private: \ CLASS& operator=(CLASS const&); \ public: #else #define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \ private: \ CLASS(CLASS&); \ public: #define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \ private: \ CLASS& operator=(CLASS&); \ public: #endif #endif // BOOST_NO_CXX11_DELETED_FUNCTIONS /** * BOOST_THREAD_NO_COPYABLE deletes the copy constructor and assignment when the compiler supports it or * makes them private. */ #define BOOST_THREAD_NO_COPYABLE(CLASS) \ BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \ BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) #endif // BOOST_THREAD_DETAIL_DELETE_HPP passenger-4.0.37/ext/boost/thread/detail/force_cast.hpp000644 000765 000024 00000001746 12233035540 023504 0ustar00honglistaff000000 000000 // Copyright (C) 2001-2003 // Mac Murrett // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org for most recent version including documentation. #ifndef BOOST_FORCE_CAST_MJM012402_HPP #define BOOST_FORCE_CAST_MJM012402_HPP #include namespace boost { namespace detail { namespace thread { // force_cast will convert anything to anything. // general case template inline Return_Type &force_cast(Argument_Type &rSrc) { return(*reinterpret_cast(&rSrc)); } // specialization for const template inline const Return_Type &force_cast(const Argument_Type &rSrc) { return(*reinterpret_cast(&rSrc)); } } // namespace thread } // namespace detail } // namespace boost #endif // BOOST_FORCE_CAST_MJM012402_HPP passenger-4.0.37/ext/boost/thread/detail/invoke.hpp000644 000765 000024 00000122051 12233035540 022660 0ustar00honglistaff000000 000000 // Copyright (C) 2012-2013 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // 2013/04 Vicente J. Botet Escriba // Provide implementation up to 9 parameters when BOOST_NO_CXX11_VARIADIC_TEMPLATES is defined. // Make use of Boost.Move // Make use of Boost.Tuple (movable) // 2012 Vicente J. Botet Escriba // Provide implementation _RET using bind when BOOST_NO_CXX11_HDR_FUNCTIONAL and BOOST_NO_SFINAE_EXPR are not defined // 2012 Vicente J. Botet Escriba // Adapt to boost libc++ implementation //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // // The invoke code is based on the one from libcxx. //===----------------------------------------------------------------------===// #ifndef BOOST_THREAD_DETAIL_INVOKE_HPP #define BOOST_THREAD_DETAIL_INVOKE_HPP #include #include #include #include #include #ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL #include #endif namespace boost { namespace detail { #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ ! defined(BOOST_NO_SFINAE_EXPR) && \ ! defined(BOOST_NO_CXX11_DECLTYPE) && \ ! defined(BOOST_NO_CXX11_DECLTYPE_N3276) && \ ! defined(BOOST_NO_CXX11_AUTO) #define BOOST_THREAD_PROVIDES_INVOKE #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) // bullets 1 and 2 template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args) -> decltype((boost::forward(a0).*f)(boost::forward(args)...)) { return (boost::forward(a0).*f)(boost::forward(args)...); } template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args) -> decltype(((*boost::forward(a0)).*f)(boost::forward(args)...)) { return ((*boost::forward(a0)).*f)(boost::forward(args)...); } // bullets 3 and 4 template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0) -> decltype(boost::forward(a0).*f) { return boost::forward(a0).*f; } template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0) -> decltype((*boost::forward(a0)).*f) { return (*boost::forward(a0)).*f; } // bullet 5 template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(Args) ...args) -> decltype(boost::forward(f)(boost::forward(args)...)) { return boost::forward(f)(boost::forward(args)...); } #else // BOOST_NO_CXX11_VARIADIC_TEMPLATES // bullets 1 and 2 template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0) -> decltype((boost::forward(a0).*f)()) { return (boost::forward(a0).*f)(); } template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1) -> decltype((boost::forward(a0).*f)(boost::forward(a1))) { return (boost::forward(a0).*f)(boost::forward(a1)); } template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2) -> decltype((boost::forward(a0).*f)(boost::forward(a1), boost::forward(a2))) { return (boost::forward(a0).*f)(boost::forward(a1), boost::forward(a2)); } template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0) -> decltype(((*boost::forward(a0)).*f)()) { return ((*boost::forward(a0)).*f)(); } template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1) -> decltype(((*boost::forward(a0)).*f)(boost::forward(a1))) { return ((*boost::forward(a0)).*f)(boost::forward(a1)); } template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2) -> decltype(((*boost::forward(a0)).*f)(boost::forward(a1), boost::forward(a2))) { return ((*boost::forward(a0)).*f)(boost::forward(a1), boost::forward(a2)); } // bullets 3 and 4 template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0) -> decltype(boost::forward(a0).*f) { return boost::forward(a0).*f; } template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0) -> decltype((*boost::forward(a0)).*f) { return (*boost::forward(a0)).*f; } // bullet 5 template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f) -> decltype(boost::forward(f)()) { return boost::forward(f)(); } template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(Args) a1) -> decltype(boost::forward(f)(boost::forward(a1))) { return boost::forward(f)(boost::forward(a1)); } template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2) -> decltype(boost::forward(f)(boost::forward(a1), boost::forward(a2))) { return boost::forward(f)(boost::forward(a1), boost::forward(a2)); } template inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3) -> decltype(boost::forward(f)(boost::forward(a1), boost::forward(a2), boost::forward(a3))) { return boost::forward(f)(boost::forward(a1), boost::forward(a2), boost::forward(a3)); } #endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES #elif ! defined(BOOST_NO_SFINAE_EXPR) && \ ! defined BOOST_NO_CXX11_HDR_FUNCTIONAL && \ defined BOOST_MSVC template inline Ret invoke(BOOST_THREAD_RV_REF(Fp) f) { return f(); } template inline Ret invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1) { return std::bind(boost::forward(f), boost::forward(a1))(); } template inline Ret invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2) { return std::bind(boost::forward(f), boost::forward(a1), boost::forward(a2))(); } template inline Ret invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3) { return std::bind(boost::forward(f), boost::forward(a1), boost::forward(a2), boost::forward(a3))(); } #define BOOST_THREAD_PROVIDES_INVOKE_RET #elif ! defined BOOST_MSVC //!!!!! WARNING !!!!! THIS DOESN'T WORKS YET #define BOOST_THREAD_PROVIDES_INVOKE_RET #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) // bullet 1 // (t1.*f)(t2, ..., tN) when f is a pointer to a member function of a class T and t1 is an object of // type T or a reference to an object of type T or a reference to an object of a type derived from T template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(Args...), BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args) { return (boost::forward(a0).*f)(boost::forward(args)...); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(Args...) const, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args) { return (boost::forward(a0).*f)(boost::forward(args)...); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(Args...) volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args) { return (boost::forward(a0).*f)(boost::forward(args)...); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(Args...) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args) { return (boost::forward(a0).*f)(boost::forward(args)...); } // bullet 2 // ((*t1).*f)(t2, ..., tN) when f is a pointer to a member function of a class T and t1 is not one of // the types described in the previous item; template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(Args...), BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args) { return ((*boost::forward(a0)).*f)(boost::forward(args)...); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(Args...) const, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args) { return ((*boost::forward(a0)).*f)(boost::forward(args)...); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(Args...) volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args) { return ((*boost::forward(a0)).*f)(boost::forward(args)...); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(Args...) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args) { return ((*boost::forward(a0)).*f)(boost::forward(args)...); } // bullet 3 // t1.*f when N == 1 and f is a pointer to member data of a class T and t1 is an object of type T or a // reference to an object of type T or a reference to an object of a type derived from T; // template // inline // typename enable_if_c // < // is_base_of::type>::value, // typename detail::apply_cv::type& // >::type // invoke(Ret A::* f, BOOST_THREAD_RV_REF(A0) a0) // { // return boost::forward(a0).*f; // } // bullet 4 // (*t1).*f when N == 1 and f is a pointer to member data of a class T and t1 is not one of the types //described in the previous item; // template // struct d4th_helper // { // }; // // template // struct d4th_helper // { // typedef typename apply_cv()), Ret>::type type; // }; // // template // inline // typename detail::4th_helper::type // >::value // >::type& // invoke(Ret A::* f, BOOST_THREAD_RV_REF(A0) a0) // { // return (*boost::forward(a0)).*f; // } // template // inline // typename enable_if_c // < // !is_base_of::type>::value, // typename detail::ref_return1::type // >::type // invoke(Ret A::* f, BOOST_THREAD_RV_REF(A0) a0) // { // return (*boost::forward(a0)).*f; // } // bullet 5 // f(t1, t2, ..., tN) in all other cases. template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(Args) ...args) { return boost::forward(f)(boost::forward(args)...); } template inline Ret invoke(Ret(*f)(Args... ), BOOST_THREAD_RV_REF(Args) ...args) { return f(boost::forward(args)...); } #else // BOOST_NO_CXX11_VARIADIC_TEMPLATES // bullet 1 // (t1.*f)(t2, ..., tN) when f is a pointer to a member function of a class T and t1 is an object of // type T or a reference to an object of type T or a reference to an object of a type derived from T template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(), BOOST_THREAD_RV_REF(A0) a0) { return (boost::forward(a0).*f)(); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1), BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1) { return (boost::forward(a0).*f)(boost::forward(a1)); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1), A0 a0, A1 a1) { return (a0.*f)(a1); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2), BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2 ) { return (boost::forward(a0).*f)(boost::forward(a1), boost::forward(a2)); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2), A0 a0, A1 a1, A2 a2) { return (a0.*f)(a1, a2); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3), BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3) { return (boost::forward(a0).*f)(boost::forward(a1), boost::forward(a2), boost::forward(a3)); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3), A0 a0, A1 a1, A2 a2, A3 a3) { return (a0.*f)(a1, a2, a3); } /// template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)() const, BOOST_THREAD_RV_REF(A0) a0) { return (boost::forward(a0).*f)(); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) const, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1) { return (boost::forward(a0).*f)(boost::forward(a1)); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) const, A0 a0, A1 a1) { return (a0.*f)(a1); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2) const, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2 ) { return (boost::forward(a0).*f)(boost::forward(a1), boost::forward(a2) ); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2) const, A0 a0, A1 a1, A2 a2) { return (a0.*f)(a1, a2); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3) const, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3 ) { return (boost::forward(a0).*f)(boost::forward(a1), boost::forward(a2), boost::forward(a3)); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3) const, A0 a0, A1 a1, A2 a2, A3 a3) { return (a0.*f)(a1, a2, a3); } /// template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)() volatile, BOOST_THREAD_RV_REF(A0) a0) { return (boost::forward(a0).*f)(); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1) { return (boost::forward(a0).*f)(boost::forward(a1)); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) volatile, A0 a0, A1 a1) { return (a0.*f)(a1); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2) volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2) { return (boost::forward(a0).*f)(boost::forward(a1), boost::forward(a2)); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2) volatile, A0 a0, A1 a1, A2 a2 ) { return (a0.*f)(a1, a2); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3) volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3 ) { return (boost::forward(a0).*f)(boost::forward(a1), boost::forward(a2), boost::forward(a3)); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3) volatile, A0 a0, A1 a1, A2 a2, A3 a3) { return (a0.*f)(a1, a2, a3); } /// template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)() const volatile, BOOST_THREAD_RV_REF(A0) a0) { return (boost::forward(a0).*f)(); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1) { return (boost::forward(a0).*f)(boost::forward(a1)); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) const volatile, A0 a0, A1 a1) { return (a0.*f)(a1); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2 ) { return (boost::forward(a0).*f)(boost::forward(a1), boost::forward(a2)); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2) const volatile, A0 a0, A1 a1, A2 a2 ) { return (a0.*f)(a1, a2); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3 ) { return (boost::forward(a0).*f)(boost::forward(a1), boost::forward(a2), boost::forward(a3)); } template inline typename enable_if_c < is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3) const volatile, A0 a0, A1 a1, A2 a2, A3 a3 ) { return (a0.*f)(a1, a2, a3); } // bullet 2 // ((*t1).*f)(t2, ..., tN) when f is a pointer to a member function of a class T and t1 is not one of // the types described in the previous item; template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(), BOOST_THREAD_RV_REF(A0) a0) { return ((*boost::forward(a0)).*f)(); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1), BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1) { return ((*boost::forward(a0)).*f)(boost::forward(a1)); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1), A0 a0, A1 a1) { return ((*a0).*f)(a1); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, BOOST_THREAD_RV_REF(A2)), BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2) { return ((*boost::forward(a0)).*f)(boost::forward(a1), boost::forward(a2)); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2), A0 a0, A1 a1, A2 a2) { return ((*a0).*f)(a1, a2); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, BOOST_THREAD_RV_REF(A2), BOOST_THREAD_RV_REF(A3)), BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3) { return ((*boost::forward(a0)).*f)(boost::forward(a1), boost::forward(a2), boost::forward(a3) ); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3), A0 a0, A1 a1, A2 a2, A3 a3) { return ((*a0).*f)(a1, a2, a3); } /// template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)() const, BOOST_THREAD_RV_REF(A0) a0) { return ((*boost::forward(a0)).*f)(); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) const, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1) { return ((*boost::forward(a0)).*f)(boost::forward(a1)); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) const, BOOST_THREAD_RV_REF(A0) a0, A1 a1) { return ((*boost::forward(a0)).*f)(a1); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) const, A0 a0, A1 a1) { return ((*a0).*f)(a1); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2) const, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2) { return ((*boost::forward(a0)).*f)(boost::forward(a1), boost::forward(a2)); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2) const, A0 a0, A1 a1, A2 a2) { return ((*a0).*f)(a1, a2); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3) const, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3) { return ((*boost::forward(a0)).*f)(boost::forward(a1), boost::forward(a2), boost::forward(a3)); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3) const, A0 a0, A1 a1, A2 a2, A3 a3) { return ((*a0).*f)(a1, a2, a3); } /// template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)() volatile, BOOST_THREAD_RV_REF(A0) a0) { return ((*boost::forward(a0)).*f)(); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1) { return ((*boost::forward(a0)).*f)(boost::forward(a1)); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) volatile, A0 a0, A1 a1) { return ((*a0).*f)(a1); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2) volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2) { return ((*boost::forward(a0)).*f)(boost::forward(a1), boost::forward(a2)); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2) volatile, A0 a0, A1 a1, A2 a2) { return ((*a0).*f)(a1, a2); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3) volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3) { return ((*boost::forward(a0)).*f)(boost::forward(a1), boost::forward(a2), boost::forward(a3)); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3) volatile, A0 a0, A1 a1, A2 a2, A3 a3) { return ((*a0).*f)(a1, a2, a3); } /// template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)() const volatile, BOOST_THREAD_RV_REF(A0) a0) { return ((*boost::forward(a0)).*f)(); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)() const volatile, A0 a0) { return ((*a0).*f)(); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1) { return ((*boost::forward(a0)).*f)(boost::forward(a1)); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1) const volatile, A0 a0, A1 a1) { return ((*a0).*f)(a1); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2) { return ((*boost::forward(a0)).*f)(boost::forward(a1), boost::forward(a2)); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2) const volatile, A0 a0, A1 a1, A2 a2) { return ((*a0).*f)(a1, a2); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3) { return ((*boost::forward(a0)).*f)(boost::forward(a1), boost::forward(a2), boost::forward(a3)); } template inline typename enable_if_c < ! is_base_of::type>::value, Ret >::type invoke(Ret (A::*f)(A1, A2, A3) const volatile, A0 a0, A1 a1, A2 a2, A3 a3) { return ((*a0).*f)(a1, a2, a3); } // bullet 3 // t1.*f when N == 1 and f is a pointer to member data of a class T and t1 is an object of type T or a // reference to an object of type T or a reference to an object of a type derived from T; // template // inline // typename enable_if_c // < // is_base_of::type>::value, // typename detail::apply_cv::type& // >::type // invoke(Ret A::* f, BOOST_THREAD_RV_REF(A0) a0) // { // return boost::forward(a0).*f; // } // bullet 4 // (*t1).*f when N == 1 and f is a pointer to member data of a class T and t1 is not one of the types //described in the previous item; // template // struct d4th_helper // { // }; // // template // struct d4th_helper // { // typedef typename apply_cv()), Ret>::type type; // }; // // template // inline // typename detail::4th_helper::type // >::value // >::type& // invoke(Ret A::* f, BOOST_THREAD_RV_REF(A0) a0) // { // return (*boost::forward(a0)).*f; // } // template // inline // typename enable_if_c // < // !is_base_of::type>::value, // typename detail::ref_return1::type // >::type // invoke(Ret A::* f, BOOST_THREAD_RV_REF(A0) a0) // { // return (*boost::forward(a0)).*f; // } // bullet 5 // f(t1, t2, ..., tN) in all other cases. template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(BOOST_THREAD_RV_REF(Fp) f) { return boost::forward(f)(); } template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1) { return boost::forward(f)(boost::forward(a1)); } template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(BOOST_THREAD_RV_REF(Fp) f, A1 a1) { return boost::forward(f)(a1); } template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2) { return boost::forward(f)(boost::forward(a1), boost::forward(a2)); } template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(BOOST_THREAD_RV_REF(Fp) f, A1 a1, A2 a2) { return boost::forward(f)(a1, a2); } template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3) { return boost::forward(f)(boost::forward(a1), boost::forward(a2), boost::forward(a3)); } template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(BOOST_THREAD_RV_REF(Fp) f, A1 a1, A2 a2, A3 a3) { return boost::forward(f)(a1, a2, a3); } /// template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(Fp const &f) { return f(); } template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(Fp const &f, BOOST_THREAD_RV_REF(A1) a1) { return f(boost::forward(a1)); } template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(Fp const &f, A1 a1) { return f(a1); } template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(Fp const &f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2) { return f(boost::forward(a1), boost::forward(a2)); } template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(Fp const &f, A1 a1, A2 a2) { return f(a1, a2); } template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(Fp const &f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3) { return f(boost::forward(a1), boost::forward(a2), boost::forward(a3)); } template inline typename enable_if_c < ! is_member_function_pointer::value, Ret >::type invoke(Fp const &f, A1 a1, A2 a2, A3 a3) { return f(a1, a2, a3); } /// template inline Ret invoke(Ret(*f)()) { return f(); } template inline Ret invoke(Ret(*f)(A1), BOOST_THREAD_RV_REF(A1) a1) { return f(boost::forward(a1)); } template inline Ret invoke(Ret(*f)(A1, A2), BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2) { return f(boost::forward(a1), boost::forward(a2)); } template inline Ret invoke(Ret(*f)(A1, A2, A3), BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3) { return f(boost::forward(a1), boost::forward(a2), boost::forward(a3)); } #endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif // all } } #endif // header passenger-4.0.37/ext/boost/thread/detail/is_convertible.hpp000644 000765 000024 00000002440 12233035540 024373 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright 2011-2012 Vicente J. Botet Escriba // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/thread for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_THREAD_DETAIL_IS_CONVERTIBLE_HPP #define BOOST_THREAD_DETAIL_IS_CONVERTIBLE_HPP #include #include namespace boost { namespace thread_detail { template struct is_convertible : boost::is_convertible {}; #if defined BOOST_NO_CXX11_RVALUE_REFERENCES #if defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 1300) #if defined BOOST_THREAD_USES_MOVE template struct is_convertible< rv &, rv > & > : false_type {}; #endif #elif defined __GNUC__ && (__GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ <= 4 )) template struct is_convertible : boost::is_convertible {}; #endif #endif } } // namespace boost #endif // BOOST_THREAD_DETAIL_MEMORY_HPP passenger-4.0.37/ext/boost/thread/detail/lockable_wrapper.hpp000644 000765 000024 00000001724 12233035540 024704 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_DETAIL_LOCKABLE_WRAPPER_HPP #define BOOST_THREAD_DETAIL_LOCKABLE_WRAPPER_HPP #include #if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST #include #endif #include namespace boost { #if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST namespace thread_detail { template struct lockable_wrapper { Mutex* m; explicit lockable_wrapper(Mutex& m_) : m(&m_) {} }; template struct lockable_adopt_wrapper { Mutex* m; explicit lockable_adopt_wrapper(Mutex& m_) : m(&m_) {} }; } #endif } #include #endif // header passenger-4.0.37/ext/boost/thread/detail/log.hpp000644 000765 000024 00000003564 12233035540 022155 0ustar00honglistaff000000 000000 // Copyright (C) 2012 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_THREAD_DETAIL_LOG_HPP #define BOOST_THREAD_DETAIL_LOG_HPP #include #if defined BOOST_THREAD_USES_LOG #include #include #if defined BOOST_THREAD_USES_LOG_THREAD_ID #include #endif #include namespace boost { namespace thread_detail { inline boost::recursive_mutex& terminal_mutex() { static boost::recursive_mutex mtx; return mtx; } } } #if defined BOOST_THREAD_USES_LOG_THREAD_ID #define BOOST_THREAD_LOG \ { \ boost::lock_guard _lk_(boost::thread_detail::terminal_mutex()); \ std::cout << boost::this_thread::get_id() << " - "<<__FILE__<<"["<<__LINE__<<"] " < _lk_(boost::thread_detail::terminal_mutex()); \ std::cout << __FILE__<<"["<<__LINE__<<"] " < inline dummy_stream_t const& operator<<(dummy_stream_t const& os, T) { return os; } inline dummy_stream_t const& operator<<(dummy_stream_t const& os, dummy_stream_t const&) { return os; } BOOST_CONSTEXPR_OR_CONST dummy_stream_t dummy_stream = {}; } } #define BOOST_THREAD_LOG if (true) {} else boost::thread_detail::dummy_stream #define BOOST_THREAD_END_LOG boost::thread_detail::dummy_stream #endif #define BOOST_THREAD_TRACE BOOST_THREAD_LOG << BOOST_THREAD_END_LOG #endif // header passenger-4.0.37/ext/boost/thread/detail/make_tuple_indices.hpp000644 000765 000024 00000021454 12233035540 025216 0ustar00honglistaff000000 000000 // Copyright (C) 2012-2013 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // 2013/04 Vicente J. Botet Escriba // Provide implementation up to 10 parameters when BOOST_NO_CXX11_VARIADIC_TEMPLATES is defined. // 2012/11 Vicente J. Botet Escriba // Adapt to boost libc++ implementation //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // // The make_tuple_indices C++11 code is based on the one from libcxx. //===----------------------------------------------------------------------===// #ifndef BOOST_THREAD_DETAIL_MAKE_TUPLE_INDICES_HPP #define BOOST_THREAD_DETAIL_MAKE_TUPLE_INDICES_HPP #include #include namespace boost { namespace detail { #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) // make_tuple_indices template struct tuple_indices {}; template struct make_indices_imp; template struct make_indices_imp, Ep> { typedef typename make_indices_imp, Ep>::type type; }; template struct make_indices_imp, Ep> { typedef tuple_indices type; }; template struct make_tuple_indices { BOOST_STATIC_ASSERT_MSG(Sp <= Ep, "make_tuple_indices input error"); typedef typename make_indices_imp, Ep>::type type; }; #else // - tuple forward declaration ----------------------------------------------- template < std::size_t T0 = 0, std::size_t T1 = 0, std::size_t T2 = 0, std::size_t T3 = 0, std::size_t T4 = 0, std::size_t T5 = 0, std::size_t T6 = 0, std::size_t T7 = 0, std::size_t T8 = 0, std::size_t T9 = 0> class tuple_indices {}; template struct make_indices_imp; template struct make_indices_imp, Ep> { typedef typename make_indices_imp, Ep>::type type; }; template struct make_indices_imp, Ep> { typedef typename make_indices_imp, Ep>::type type; }; template struct make_indices_imp, Ep> { typedef typename make_indices_imp, Ep>::type type; }; template struct make_indices_imp, Ep> { typedef typename make_indices_imp, Ep>::type type; }; template struct make_indices_imp, Ep> { typedef typename make_indices_imp, Ep>::type type; }; template struct make_indices_imp, Ep> { typedef typename make_indices_imp, Ep>::type type; }; template struct make_indices_imp, Ep> { typedef typename make_indices_imp, Ep>::type type; }; template struct make_indices_imp, Ep> { typedef typename make_indices_imp, Ep>::type type; }; template struct make_indices_imp, Ep> { typedef typename make_indices_imp, Ep>::type type; }; template struct make_indices_imp, Ep> { typedef typename make_indices_imp, Ep>::type type; }; // template // struct make_indices_imp, Ep> // { // typedef typename make_indices_imp, Ep>::type type; // }; template struct make_indices_imp, Ep> { typedef tuple_indices<> type; }; template struct make_indices_imp, Ep> { typedef tuple_indices type; }; template struct make_indices_imp, Ep> { typedef tuple_indices type; }; template struct make_indices_imp, Ep> { typedef tuple_indices type; }; template struct make_indices_imp, Ep> { typedef tuple_indices type; }; template struct make_indices_imp, Ep> { typedef tuple_indices type; }; template struct make_indices_imp, Ep> { typedef tuple_indices type; }; template struct make_indices_imp, Ep> { typedef tuple_indices type; }; template struct make_indices_imp, Ep> { typedef tuple_indices type; }; template struct make_indices_imp, Ep> { typedef tuple_indices type; }; template struct make_indices_imp, Ep> { typedef tuple_indices type; }; template struct make_tuple_indices { BOOST_STATIC_ASSERT_MSG(Sp <= Ep, "make_tuple_indices input error"); typedef typename make_indices_imp, Ep>::type type; }; #endif } } #endif // header passenger-4.0.37/ext/boost/thread/detail/memory.hpp000644 000765 000024 00000011247 12233035540 022701 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright 2011-2012 Vicente J. Botet Escriba // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/thread for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_THREAD_DETAIL_MEMORY_HPP #define BOOST_THREAD_DETAIL_MEMORY_HPP #include #include #include #include #include #include #include #include #include namespace boost { namespace thread_detail { template class allocator_destructor { typedef container::allocator_traits<_Alloc> alloc_traits; public: typedef typename alloc_traits::pointer pointer; typedef typename alloc_traits::size_type size_type; private: _Alloc alloc_; size_type s_; public: allocator_destructor(_Alloc& a, size_type s)BOOST_NOEXCEPT : alloc_(a), s_(s) {} void operator()(pointer p)BOOST_NOEXCEPT { alloc_traits::destroy(alloc_, p); alloc_traits::deallocate(alloc_, p, s_); } }; } //namespace thread_detail typedef container::allocator_arg_t allocator_arg_t; BOOST_CONSTEXPR_OR_CONST allocator_arg_t allocator_arg = {}; template struct uses_allocator: public container::uses_allocator { }; template struct pointer_traits { typedef Ptr pointer; // typedef
element_type; // typedef
difference_type; // template using rebind =
; // // static pointer pointer_to(
); }; template struct pointer_traits { typedef T* pointer; typedef T element_type; typedef ptrdiff_t difference_type; // template using rebind = U*; // // static pointer pointer_to(
) noexcept; }; namespace thread_detail { template ::element_type>::type, typename remove_cv::element_type>::type >::value > struct same_or_less_cv_qualified_imp : is_convertible<_Ptr1, _Ptr2> {}; template struct same_or_less_cv_qualified_imp<_Ptr1, _Ptr2, false> : false_type {}; template ::value && !is_pointer<_Ptr1>::value> struct same_or_less_cv_qualified : same_or_less_cv_qualified_imp<_Ptr1, _Ptr2> {}; template struct same_or_less_cv_qualified<_Ptr1, _Ptr2, true> : false_type {}; } template struct BOOST_SYMBOL_VISIBLE default_delete { #ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS BOOST_SYMBOL_VISIBLE BOOST_CONSTEXPR default_delete() = default; #else BOOST_SYMBOL_VISIBLE BOOST_CONSTEXPR default_delete() BOOST_NOEXCEPT {} #endif template BOOST_SYMBOL_VISIBLE default_delete(const default_delete&, typename enable_if >::type* = 0) BOOST_NOEXCEPT {} BOOST_SYMBOL_VISIBLE void operator() (T* ptr) const BOOST_NOEXCEPT { BOOST_STATIC_ASSERT_MSG(sizeof(T) > 0, "default_delete can not delete incomplete type"); delete ptr; } }; template struct BOOST_SYMBOL_VISIBLE default_delete { public: #ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS BOOST_SYMBOL_VISIBLE BOOST_CONSTEXPR default_delete() = default; #else BOOST_SYMBOL_VISIBLE BOOST_CONSTEXPR default_delete() BOOST_NOEXCEPT {} #endif template BOOST_SYMBOL_VISIBLE default_delete(const default_delete&, typename enable_if >::type* = 0) BOOST_NOEXCEPT {} template BOOST_SYMBOL_VISIBLE void operator() (U* ptr, typename enable_if >::type* = 0) const BOOST_NOEXCEPT { BOOST_STATIC_ASSERT_MSG(sizeof(T) > 0, "default_delete can not delete incomplete type"); delete [] ptr; } }; } // namespace boost #endif // BOOST_THREAD_DETAIL_MEMORY_HPP passenger-4.0.37/ext/boost/thread/detail/move.hpp000644 000765 000024 00000016005 12233035540 022334 0ustar00honglistaff000000 000000 // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007-8 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba #ifndef BOOST_THREAD_MOVE_HPP #define BOOST_THREAD_MOVE_HPP #include #ifndef BOOST_NO_SFINAE #include #include #include #include #include #endif #include #include #include #include namespace boost { namespace detail { template struct enable_move_utility_emulation_dummy_specialization; template struct thread_move_t { T& t; explicit thread_move_t(T& t_): t(t_) {} T& operator*() const { return t; } T* operator->() const { return &t; } private: void operator=(thread_move_t&); }; } #if !defined BOOST_THREAD_USES_MOVE #ifndef BOOST_NO_SFINAE template typename enable_if >, boost::detail::thread_move_t >::type move(T& t) { return boost::detail::thread_move_t(t); } #endif template boost::detail::thread_move_t move(boost::detail::thread_move_t t) { return t; } #endif //#if !defined BOOST_THREAD_USES_MOVE } #if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE) #define BOOST_THREAD_RV_REF_2_TEMPL_ARGS(TYPE) BOOST_RV_REF_2_TEMPL_ARGS(TYPE) #define BOOST_THREAD_RV_REF_BEG BOOST_RV_REF_BEG #define BOOST_THREAD_RV_REF_END BOOST_RV_REF_END #define BOOST_THREAD_RV(V) V #define BOOST_THREAD_MAKE_RV_REF(RVALUE) RVALUE #define BOOST_THREAD_FWD_REF(TYPE) BOOST_FWD_REF(TYPE) #define BOOST_THREAD_DCL_MOVABLE(TYPE) #define BOOST_THREAD_DCL_MOVABLE_BEG(T) \ namespace detail { \ template \ struct enable_move_utility_emulation_dummy_specialization< #define BOOST_THREAD_DCL_MOVABLE_END > \ : integral_constant \ {}; \ } #elif ! defined BOOST_NO_CXX11_RVALUE_REFERENCES && defined BOOST_MSVC #define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE) #define BOOST_THREAD_RV_REF_2_TEMPL_ARGS(TYPE) BOOST_RV_REF_2_TEMPL_ARGS(TYPE) #define BOOST_THREAD_RV_REF_BEG BOOST_RV_REF_BEG #define BOOST_THREAD_RV_REF_END BOOST_RV_REF_END #define BOOST_THREAD_RV(V) V #define BOOST_THREAD_MAKE_RV_REF(RVALUE) RVALUE #define BOOST_THREAD_FWD_REF(TYPE) BOOST_FWD_REF(TYPE) #define BOOST_THREAD_DCL_MOVABLE(TYPE) #define BOOST_THREAD_DCL_MOVABLE_BEG(T) \ namespace detail { \ template \ struct enable_move_utility_emulation_dummy_specialization< #define BOOST_THREAD_DCL_MOVABLE_END > \ : integral_constant \ {}; \ } #else #if defined BOOST_THREAD_USES_MOVE #define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE) #define BOOST_THREAD_RV_REF_2_TEMPL_ARGS(TYPE) BOOST_RV_REF_2_TEMPL_ARGS(TYPE) #define BOOST_THREAD_RV_REF_BEG BOOST_RV_REF_BEG #define BOOST_THREAD_RV_REF_END BOOST_RV_REF_END #define BOOST_THREAD_RV(V) V #define BOOST_THREAD_FWD_REF(TYPE) BOOST_FWD_REF(TYPE) #define BOOST_THREAD_DCL_MOVABLE(TYPE) #define BOOST_THREAD_DCL_MOVABLE_BEG(T) \ namespace detail { \ template \ struct enable_move_utility_emulation_dummy_specialization< #define BOOST_THREAD_DCL_MOVABLE_END > \ : integral_constant \ {}; \ } #else #define BOOST_THREAD_RV_REF(TYPE) boost::detail::thread_move_t< TYPE > #define BOOST_THREAD_RV_REF_BEG boost::detail::thread_move_t< #define BOOST_THREAD_RV_REF_END > #define BOOST_THREAD_RV(V) (*V) #define BOOST_THREAD_FWD_REF(TYPE) BOOST_FWD_REF(TYPE) #define BOOST_THREAD_DCL_MOVABLE(TYPE) \ template <> \ struct enable_move_utility_emulation< TYPE > \ { \ static const bool value = false; \ }; #define BOOST_THREAD_DCL_MOVABLE_BEG(T) \ template \ struct enable_move_utility_emulation< #define BOOST_THREAD_DCL_MOVABLE_END > \ { \ static const bool value = false; \ }; #endif namespace boost { namespace detail { template BOOST_THREAD_RV_REF(typename ::boost::remove_cv::type>::type) make_rv_ref(T v) BOOST_NOEXCEPT { return (BOOST_THREAD_RV_REF(typename ::boost::remove_cv::type>::type))(v); } // template // BOOST_THREAD_RV_REF(typename ::boost::remove_cv::type>::type) // make_rv_ref(T &v) BOOST_NOEXCEPT // { // return (BOOST_THREAD_RV_REF(typename ::boost::remove_cv::type>::type))(v); // } // template // const BOOST_THREAD_RV_REF(typename ::boost::remove_cv::type>::type) // make_rv_ref(T const&v) BOOST_NOEXCEPT // { // return (const BOOST_THREAD_RV_REF(typename ::boost::remove_cv::type>::type))(v); // } } } #define BOOST_THREAD_MAKE_RV_REF(RVALUE) RVALUE.move() //#define BOOST_THREAD_MAKE_RV_REF(RVALUE) boost::detail::make_rv_ref(RVALUE) #endif #if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_THREAD_MOVABLE(TYPE) #else #if defined BOOST_THREAD_USES_MOVE #define BOOST_THREAD_MOVABLE(TYPE) \ ::boost::rv& move() BOOST_NOEXCEPT \ { \ return *static_cast< ::boost::rv* >(this); \ } \ const ::boost::rv& move() const BOOST_NOEXCEPT \ { \ return *static_cast* >(this); \ } \ operator ::boost::rv&() \ { \ return *static_cast< ::boost::rv* >(this); \ } \ operator const ::boost::rv&() const \ { \ return *static_cast* >(this); \ }\ #else #define BOOST_THREAD_MOVABLE(TYPE) \ operator ::boost::detail::thread_move_t() BOOST_NOEXCEPT \ { \ return move(); \ } \ ::boost::detail::thread_move_t move() BOOST_NOEXCEPT \ { \ ::boost::detail::thread_move_t x(*this); \ return x; \ } \ #endif #endif #define BOOST_THREAD_MOVABLE_ONLY(TYPE) \ BOOST_THREAD_NO_COPYABLE(TYPE) \ BOOST_THREAD_MOVABLE(TYPE) \ #define BOOST_THREAD_COPYABLE_AND_MOVABLE(TYPE) \ BOOST_THREAD_MOVABLE(TYPE) \ namespace boost { namespace thread_detail { #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename decay::type decay_copy(T&& t) { return boost::forward(t); } #else template typename decay::type decay_copy(BOOST_THREAD_FWD_REF(T) t) { return boost::forward(t); } #endif } } #include #endif passenger-4.0.37/ext/boost/thread/detail/platform.hpp000644 000765 000024 00000005404 12233035540 023213 0ustar00honglistaff000000 000000 // Copyright 2006 Roland Schwarz. // (C) Copyright 2007 Anthony Williams // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // This work is a reimplementation along the design and ideas // of William E. Kempf. #ifndef BOOST_THREAD_RS06040501_HPP #define BOOST_THREAD_RS06040501_HPP // fetch compiler and platform configuration #include // insist on threading support being available: #include // choose platform #if defined(linux) || defined(__linux) || defined(__linux__) # define BOOST_THREAD_LINUX //# define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(100000) #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) # define BOOST_THREAD_BSD #elif defined(sun) || defined(__sun) # define BOOST_THREAD_SOLARIS #elif defined(__sgi) # define BOOST_THREAD_IRIX #elif defined(__hpux) # define BOOST_THREAD_HPUX #elif defined(__CYGWIN__) # define BOOST_THREAD_CYGWIN #elif (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(BOOST_DISABLE_WIN32) # define BOOST_THREAD_WIN32 #elif defined(__BEOS__) # define BOOST_THREAD_BEOS #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) # define BOOST_THREAD_MACOS //# define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(1000) #elif defined(__IBMCPP__) || defined(_AIX) # define BOOST_THREAD_AIX #elif defined(__amigaos__) # define BOOST_THREAD_AMIGAOS #elif defined(__QNXNTO__) # define BOOST_THREAD_QNXNTO #elif defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) # if defined(BOOST_HAS_PTHREADS) && !defined(BOOST_THREAD_POSIX) # define BOOST_THREAD_POSIX # endif #endif // For every supported platform add a new entry into the dispatch table below. // BOOST_THREAD_POSIX is tested first, so on platforms where posix and native // threading is available, the user may choose, by defining BOOST_THREAD_POSIX // in her source. If a platform is known to support pthreads and no native // port of boost_thread is available just specify "pthread" in the // dispatcher table. If there is no entry for a platform but pthreads is // available on the platform, pthread is choosen as default. If nothing is // available the preprocessor will fail with a diagnostic message. #if defined(BOOST_THREAD_POSIX) # define BOOST_THREAD_PLATFORM_PTHREAD #else # if defined(BOOST_THREAD_WIN32) # define BOOST_THREAD_PLATFORM_WIN32 # elif defined(BOOST_HAS_PTHREADS) # define BOOST_THREAD_PLATFORM_PTHREAD # else # error "Sorry, no boost threads are available for this platform." # endif #endif #endif // BOOST_THREAD_RS06040501_HPP passenger-4.0.37/ext/boost/thread/detail/singleton.hpp000644 000765 000024 00000002244 12233035540 023370 0ustar00honglistaff000000 000000 // Copyright (C) 2001-2003 // Mac Murrett // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org for most recent version including documentation. #ifndef BOOST_SINGLETON_MJM012402_HPP #define BOOST_SINGLETON_MJM012402_HPP #include namespace boost { namespace detail { namespace thread { // class singleton has the same goal as all singletons: create one instance of // a class on demand, then dish it out as requested. template class singleton : private T { private: singleton(); ~singleton(); public: static T &instance(); }; template inline singleton::singleton() { /* no-op */ } template inline singleton::~singleton() { /* no-op */ } template /*static*/ T &singleton::instance() { // function-local static to force this to work correctly at static // initialization time. static singleton s_oT; return(s_oT); } } // namespace thread } // namespace detail } // namespace boost #endif // BOOST_SINGLETON_MJM012402_HPP passenger-4.0.37/ext/boost/thread/detail/thread.hpp000644 000765 000024 00000061563 12233035540 022646 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_THREAD_COMMON_HPP #define BOOST_THREAD_THREAD_COMMON_HPP // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007-2010 Anthony Williams // (C) Copyright 20011-2012 Vicente J. Botet Escriba #include #include #ifndef BOOST_NO_IOSTREAM #include #endif #include #include #if defined BOOST_THREAD_USES_DATETIME #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef BOOST_THREAD_USES_CHRONO #include #include #endif #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) #include #endif #include #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4251) #endif namespace boost { namespace detail { #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template class thread_data: public detail::thread_data_base { public: BOOST_THREAD_NO_COPYABLE(thread_data) #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES thread_data(BOOST_THREAD_RV_REF(F) f_, BOOST_THREAD_RV_REF(ArgTypes)... args_): fp(boost::forward(f_), boost::forward(args_)...) {} #endif template void run2(tuple_indices) { invoke(std::move(std::get<0>(fp)), std::move(std::get(fp))...); } void run() { typedef typename make_tuple_indices >::value, 1>::type index_type; run2(index_type()); } private: std::tuple::type, typename decay::type...> fp; }; #else // defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template class thread_data: public detail::thread_data_base { public: BOOST_THREAD_NO_COPYABLE(thread_data) #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES thread_data(BOOST_THREAD_RV_REF(F) f_): f(boost::forward(f_)) {} // This overloading must be removed if we want the packaged_task's tests to pass. // thread_data(F& f_): // f(f_) // {} #else thread_data(BOOST_THREAD_RV_REF(F) f_): f(f_) {} thread_data(F f_): f(f_) {} #endif //thread_data() {} void run() { f(); } private: F f; }; template class thread_data >: public detail::thread_data_base { private: F& f; public: BOOST_THREAD_NO_COPYABLE(thread_data) thread_data(boost::reference_wrapper f_): f(f_) {} void run() { f(); } }; template class thread_data >: public detail::thread_data_base { private: F& f; public: BOOST_THREAD_NO_COPYABLE(thread_data) thread_data(const boost::reference_wrapper f_): f(f_) {} void run() { f(); } }; #endif } class BOOST_THREAD_DECL thread { public: typedef thread_attributes attributes; BOOST_THREAD_MOVABLE_ONLY(thread) protected: struct dummy; void release_handle(); detail::thread_data_ptr thread_info; private: bool start_thread_noexcept(); bool start_thread_noexcept(const attributes& attr); public: void start_thread() { if (!start_thread_noexcept()) { boost::throw_exception(thread_resource_error()); } } void start_thread(const attributes& attr) { if (!start_thread_noexcept(attr)) { boost::throw_exception(thread_resource_error()); } } explicit thread(detail::thread_data_ptr data); detail::thread_data_ptr get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template static inline detail::thread_data_ptr make_thread_info(BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_RV_REF(ArgTypes)... args) { return detail::thread_data_ptr(detail::heap_new< detail::thread_data::type, ArgTypes...> >( boost::forward(f), boost::forward(args)... ) ); } #else template static inline detail::thread_data_ptr make_thread_info(BOOST_THREAD_RV_REF(F) f) { return detail::thread_data_ptr(detail::heap_new::type> >( boost::forward(f))); } #endif static inline detail::thread_data_ptr make_thread_info(void (*f)()) { return detail::thread_data_ptr(detail::heap_new >( boost::forward(f))); } #else template static inline detail::thread_data_ptr make_thread_info(F f , typename disable_if_c< //boost::thread_detail::is_convertible::value || is_same::type, thread>::value, dummy* >::type=0 ) { return detail::thread_data_ptr(detail::heap_new >(f)); } template static inline detail::thread_data_ptr make_thread_info(BOOST_THREAD_RV_REF(F) f) { return detail::thread_data_ptr(detail::heap_new >(f)); } #endif public: #if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF. #if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) thread(const volatile thread&); #endif #endif thread() BOOST_NOEXCEPT; ~thread() { #if defined BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE if (joinable()) { std::terminate(); } #else detach(); #endif } #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template < class F > explicit thread(BOOST_THREAD_RV_REF(F) f //, typename disable_if::type, thread>, dummy* >::type=0 ): thread_info(make_thread_info(thread_detail::decay_copy(boost::forward(f)))) { start_thread(); } template < class F > thread(attributes const& attrs, BOOST_THREAD_RV_REF(F) f): thread_info(make_thread_info(thread_detail::decay_copy(boost::forward(f)))) { start_thread(attrs); } #else #ifdef BOOST_NO_SFINAE template explicit thread(F f): thread_info(make_thread_info(f)) { start_thread(); } template thread(attributes const& attrs, F f): thread_info(make_thread_info(f)) { start_thread(attrs); } #else template explicit thread(F f , typename disable_if_c< boost::thread_detail::is_convertible::value //|| is_same::type, thread>::value , dummy* >::type=0 ): thread_info(make_thread_info(f)) { start_thread(); } template thread(attributes const& attrs, F f , typename disable_if, dummy* >::type=0 ): thread_info(make_thread_info(f)) { start_thread(attrs); } #endif template explicit thread(BOOST_THREAD_RV_REF(F) f , typename disable_if::type, thread>, dummy* >::type=0 ): #ifdef BOOST_THREAD_USES_MOVE thread_info(make_thread_info(boost::move(f))) // todo : Add forward #else thread_info(make_thread_info(f)) // todo : Add forward #endif { start_thread(); } template thread(attributes const& attrs, BOOST_THREAD_RV_REF(F) f): #ifdef BOOST_THREAD_USES_MOVE thread_info(make_thread_info(boost::move(f))) // todo : Add forward #else thread_info(make_thread_info(f)) // todo : Add forward #endif { start_thread(attrs); } #endif thread(BOOST_THREAD_RV_REF(thread) x) { thread_info=BOOST_THREAD_RV(x).thread_info; BOOST_THREAD_RV(x).thread_info.reset(); } #if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF. #if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) thread& operator=(thread x) { swap(x); return *this; } #endif #endif thread& operator=(BOOST_THREAD_RV_REF(thread) other) BOOST_NOEXCEPT { #if defined BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE if (joinable()) std::terminate(); #endif thread_info=BOOST_THREAD_RV(other).thread_info; BOOST_THREAD_RV(other).thread_info.reset(); return *this; } #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) template thread(F&& f, Arg&& arg, Args&&... args) : thread_info(make_thread_info( thread_detail::decay_copy(boost::forward(f)), thread_detail::decay_copy(boost::forward(arg)), thread_detail::decay_copy(boost::forward(args))...) ) { start_thread(); } template thread(attributes const& attrs, F&& f, Arg&& arg, Args&&... args) : thread_info(make_thread_info( thread_detail::decay_copy(boost::forward(f)), thread_detail::decay_copy(boost::forward(arg)), thread_detail::decay_copy(boost::forward(args))...) ) { start_thread(attrs); } #else template thread(F f,A1 a1,typename disable_if, dummy* >::type=0): thread_info(make_thread_info(boost::bind(boost::type(),f,a1))) { start_thread(); } template thread(F f,A1 a1,A2 a2): thread_info(make_thread_info(boost::bind(boost::type(),f,a1,a2))) { start_thread(); } template thread(F f,A1 a1,A2 a2,A3 a3): thread_info(make_thread_info(boost::bind(boost::type(),f,a1,a2,a3))) { start_thread(); } template thread(F f,A1 a1,A2 a2,A3 a3,A4 a4): thread_info(make_thread_info(boost::bind(boost::type(),f,a1,a2,a3,a4))) { start_thread(); } template thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5): thread_info(make_thread_info(boost::bind(boost::type(),f,a1,a2,a3,a4,a5))) { start_thread(); } template thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6): thread_info(make_thread_info(boost::bind(boost::type(),f,a1,a2,a3,a4,a5,a6))) { start_thread(); } template thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7): thread_info(make_thread_info(boost::bind(boost::type(),f,a1,a2,a3,a4,a5,a6,a7))) { start_thread(); } template thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8): thread_info(make_thread_info(boost::bind(boost::type(),f,a1,a2,a3,a4,a5,a6,a7,a8))) { start_thread(); } template thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8,A9 a9): thread_info(make_thread_info(boost::bind(boost::type(),f,a1,a2,a3,a4,a5,a6,a7,a8,a9))) { start_thread(); } #endif void swap(thread& x) BOOST_NOEXCEPT { thread_info.swap(x.thread_info); } class id; #ifdef BOOST_THREAD_PLATFORM_PTHREAD inline id get_id() const BOOST_NOEXCEPT; #else id get_id() const BOOST_NOEXCEPT; #endif bool joinable() const BOOST_NOEXCEPT; private: bool join_noexcept(); public: inline void join(); #ifdef BOOST_THREAD_USES_CHRONO template bool try_join_for(const chrono::duration& rel_time) { return try_join_until(chrono::steady_clock::now() + rel_time); } template bool try_join_until(const chrono::time_point& t) { using namespace chrono; system_clock::time_point s_now = system_clock::now(); bool joined= false; do { typename Clock::duration d = ceil(t-Clock::now()); if (d <= Clock::duration::zero()) return false; // in case the Clock::time_point t is already reached joined = try_join_until(s_now + d); } while (! joined); return true; } template bool try_join_until(const chrono::time_point& t) { using namespace chrono; typedef time_point nano_sys_tmpt; return try_join_until(nano_sys_tmpt(ceil(t.time_since_epoch()))); } #endif #if defined(BOOST_THREAD_PLATFORM_WIN32) private: bool do_try_join_until_noexcept(uintmax_t milli, bool& res); inline bool do_try_join_until(uintmax_t milli); public: bool timed_join(const system_time& abs_time); //{ // return do_try_join_until(get_milliseconds_until(wait_until)); //} #ifdef BOOST_THREAD_USES_CHRONO bool try_join_until(const chrono::time_point& tp) { chrono::milliseconds rel_time= chrono::ceil(tp-chrono::system_clock::now()); return do_try_join_until(rel_time.count()); } #endif #else private: bool do_try_join_until_noexcept(struct timespec const &timeout, bool& res); inline bool do_try_join_until(struct timespec const &timeout); public: #if defined BOOST_THREAD_USES_DATETIME bool timed_join(const system_time& abs_time) { struct timespec const ts=detail::to_timespec(abs_time); return do_try_join_until(ts); } #endif #ifdef BOOST_THREAD_USES_CHRONO bool try_join_until(const chrono::time_point& tp) { using namespace chrono; nanoseconds d = tp.time_since_epoch(); timespec ts = boost::detail::to_timespec(d); return do_try_join_until(ts); } #endif #endif public: #if defined BOOST_THREAD_USES_DATETIME template inline bool timed_join(TimeDuration const& rel_time) { return timed_join(get_system_time()+rel_time); } #endif void detach(); static unsigned hardware_concurrency() BOOST_NOEXCEPT; #define BOOST_THREAD_DEFINES_THREAD_NATIVE_HANDLE typedef detail::thread_data_base::native_handle_type native_handle_type; native_handle_type native_handle(); #if defined BOOST_THREAD_PROVIDES_THREAD_EQ // Use thread::id when comparisions are needed // backwards compatibility bool operator==(const thread& other) const; bool operator!=(const thread& other) const; #endif #if defined BOOST_THREAD_USES_DATETIME static inline void yield() BOOST_NOEXCEPT { this_thread::yield(); } static inline void sleep(const system_time& xt) { this_thread::sleep(xt); } #endif #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS // extensions void interrupt(); bool interruption_requested() const BOOST_NOEXCEPT; #endif }; inline void swap(thread& lhs,thread& rhs) BOOST_NOEXCEPT { return lhs.swap(rhs); } #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES inline thread&& move(thread& t) BOOST_NOEXCEPT { return static_cast(t); } #endif BOOST_THREAD_DCL_MOVABLE(thread) namespace this_thread { #ifdef BOOST_THREAD_PLATFORM_PTHREAD inline thread::id get_id() BOOST_NOEXCEPT; #else thread::id BOOST_THREAD_DECL get_id() BOOST_NOEXCEPT; #endif #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS void BOOST_THREAD_DECL interruption_point(); bool BOOST_THREAD_DECL interruption_enabled() BOOST_NOEXCEPT; bool BOOST_THREAD_DECL interruption_requested() BOOST_NOEXCEPT; #endif #if defined BOOST_THREAD_USES_DATETIME inline BOOST_SYMBOL_VISIBLE void sleep(xtime const& abs_time) { sleep(system_time(abs_time)); } #endif } class BOOST_SYMBOL_VISIBLE thread::id { private: friend inline std::size_t hash_value(const thread::id &v) { #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID return hash_value(v.thread_data); #else return hash_value(v.thread_data.get()); #endif } #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID #if defined(BOOST_THREAD_PLATFORM_WIN32) typedef unsigned int data; #else typedef thread::native_handle_type data; #endif #else typedef detail::thread_data_ptr data; #endif data thread_data; id(data thread_data_): thread_data(thread_data_) {} friend class thread; friend id BOOST_THREAD_DECL this_thread::get_id() BOOST_NOEXCEPT; public: id() BOOST_NOEXCEPT: #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID thread_data(0) #else thread_data() #endif {} id(const id& other) BOOST_NOEXCEPT : thread_data(other.thread_data) {} bool operator==(const id& y) const BOOST_NOEXCEPT { return thread_data==y.thread_data; } bool operator!=(const id& y) const BOOST_NOEXCEPT { return thread_data!=y.thread_data; } bool operator<(const id& y) const BOOST_NOEXCEPT { return thread_data(const id& y) const BOOST_NOEXCEPT { return y.thread_data=(const id& y) const BOOST_NOEXCEPT { return !(thread_data friend BOOST_SYMBOL_VISIBLE std::basic_ostream& operator<<(std::basic_ostream& os, const id& x) { if(x.thread_data) { io::ios_flags_saver ifs( os ); return os<< std::hex << x.thread_data; } else { return os<<"{Not-any-thread}"; } } #else template BOOST_SYMBOL_VISIBLE std::basic_ostream& print(std::basic_ostream& os) const { if(thread_data) { io::ios_flags_saver ifs( os ); return os<< std::hex << thread_data; } else { return os<<"{Not-any-thread}"; } } #endif #endif }; #ifdef BOOST_THREAD_PLATFORM_PTHREAD thread::id thread::get_id() const BOOST_NOEXCEPT { #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID return const_cast(this)->native_handle(); #else detail::thread_data_ptr const local_thread_info=(get_thread_info)(); return (local_thread_info? id(local_thread_info) : id()); #endif } namespace this_thread { inline thread::id get_id() BOOST_NOEXCEPT { #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID return pthread_self(); #else boost::detail::thread_data_base* const thread_info=get_or_make_current_thread_data(); return (thread_info?thread::id(thread_info->shared_from_this()):thread::id()); #endif } } #endif void thread::join() { if (this_thread::get_id() == get_id()) boost::throw_exception(thread_resource_error(system::errc::resource_deadlock_would_occur, "boost thread: trying joining itself")); BOOST_THREAD_VERIFY_PRECONDITION( join_noexcept(), thread_resource_error(system::errc::invalid_argument, "boost thread: thread not joinable") ); } #ifdef BOOST_THREAD_PLATFORM_PTHREAD bool thread::do_try_join_until(struct timespec const &timeout) #else bool thread::do_try_join_until(uintmax_t timeout) #endif { if (this_thread::get_id() == get_id()) boost::throw_exception(thread_resource_error(system::errc::resource_deadlock_would_occur, "boost thread: trying joining itself")); bool res; if (do_try_join_until_noexcept(timeout, res)) { return res; } else { BOOST_THREAD_THROW_ELSE_RETURN( (thread_resource_error(system::errc::invalid_argument, "boost thread: thread not joinable")), false ); } } #if !defined(BOOST_NO_IOSTREAM) && defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) template BOOST_SYMBOL_VISIBLE std::basic_ostream& operator<<(std::basic_ostream& os, const thread::id& x) { return x.print(os); } #endif #if defined BOOST_THREAD_PROVIDES_THREAD_EQ inline bool thread::operator==(const thread& other) const { return get_id()==other.get_id(); } inline bool thread::operator!=(const thread& other) const { return get_id()!=other.get_id(); } #endif namespace detail { struct thread_exit_function_base { virtual ~thread_exit_function_base() {} virtual void operator()()=0; }; template struct thread_exit_function: thread_exit_function_base { F f; thread_exit_function(F f_): f(f_) {} void operator()() { f(); } }; void BOOST_THREAD_DECL add_thread_exit_function(thread_exit_function_base*); } namespace this_thread { template void at_thread_exit(F f) { detail::thread_exit_function_base* const thread_exit_func=detail::heap_new >(f); detail::add_thread_exit_function(thread_exit_func); } } } #ifdef BOOST_MSVC #pragma warning(pop) #endif #include #endif passenger-4.0.37/ext/boost/thread/detail/thread_group.hpp000644 000765 000024 00000010126 12233035540 024047 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_DETAIL_THREAD_GROUP_HPP #define BOOST_THREAD_DETAIL_THREAD_GROUP_HPP // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007-9 Anthony Williams #include #include #include #include #include #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4251) #endif namespace boost { class thread_group { private: thread_group(thread_group const&); thread_group& operator=(thread_group const&); public: thread_group() {} ~thread_group() { for(std::list::iterator it=threads.begin(),end=threads.end(); it!=end; ++it) { delete *it; } } bool is_this_thread_in() { thread::id id = this_thread::get_id(); boost::shared_lock guard(m); for(std::list::iterator it=threads.begin(),end=threads.end(); it!=end; ++it) { if ((*it)->get_id() == id) return true; } return false; } bool is_thread_in(thread* thrd) { if(thrd) { thread::id id = thrd->get_id(); boost::shared_lock guard(m); for(std::list::iterator it=threads.begin(),end=threads.end(); it!=end; ++it) { if ((*it)->get_id() == id) return true; } return false; } else { return false; } } template thread* create_thread(F threadfunc) { boost::lock_guard guard(m); std::auto_ptr new_thread(new thread(threadfunc)); threads.push_back(new_thread.get()); return new_thread.release(); } void add_thread(thread* thrd) { if(thrd) { BOOST_THREAD_ASSERT_PRECONDITION( ! is_thread_in(thrd) , thread_resource_error(system::errc::resource_deadlock_would_occur, "boost::thread_group: trying to add a duplicated thread") ); boost::lock_guard guard(m); threads.push_back(thrd); } } void remove_thread(thread* thrd) { boost::lock_guard guard(m); std::list::iterator const it=std::find(threads.begin(),threads.end(),thrd); if(it!=threads.end()) { threads.erase(it); } } void join_all() { BOOST_THREAD_ASSERT_PRECONDITION( ! is_this_thread_in() , thread_resource_error(system::errc::resource_deadlock_would_occur, "boost::thread_group: trying joining itself") ); boost::shared_lock guard(m); for(std::list::iterator it=threads.begin(),end=threads.end(); it!=end; ++it) { if ((*it)->joinable()) (*it)->join(); } } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS void interrupt_all() { boost::shared_lock guard(m); for(std::list::iterator it=threads.begin(),end=threads.end(); it!=end; ++it) { (*it)->interrupt(); } } #endif size_t size() const { boost::shared_lock guard(m); return threads.size(); } private: std::list threads; mutable shared_mutex m; }; } #ifdef BOOST_MSVC #pragma warning(pop) #endif #include #endif passenger-4.0.37/ext/boost/thread/detail/thread_heap_alloc.hpp000644 000765 000024 00000001167 12233035540 025007 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_THREAD_HEAP_ALLOC_HPP #define BOOST_THREAD_THREAD_HEAP_ALLOC_HPP // thread_heap_alloc.hpp // // (C) Copyright 2008 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #if defined(BOOST_THREAD_PLATFORM_WIN32) #include #elif defined(BOOST_THREAD_PLATFORM_PTHREAD) #include #else #error "Boost threads unavailable on this platform" #endif #endif passenger-4.0.37/ext/boost/thread/detail/thread_interruption.hpp000644 000765 000024 00000002314 12233035540 025455 0ustar00honglistaff000000 000000 #ifndef BOOST_THREAD_DETAIL_THREAD_INTERRUPTION_HPP #define BOOST_THREAD_DETAIL_THREAD_INTERRUPTION_HPP // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // (C) Copyright 2007-9 Anthony Williams // (C) Copyright 2012 Vicente J. Botet Escriba #include #include #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS namespace boost { namespace this_thread { class BOOST_THREAD_DECL disable_interruption { bool interruption_was_enabled; friend class restore_interruption; public: BOOST_THREAD_NO_COPYABLE(disable_interruption) disable_interruption() BOOST_NOEXCEPT; ~disable_interruption() BOOST_NOEXCEPT; }; class BOOST_THREAD_DECL restore_interruption { public: BOOST_THREAD_NO_COPYABLE(restore_interruption) explicit restore_interruption(disable_interruption& d) BOOST_NOEXCEPT; ~restore_interruption() BOOST_NOEXCEPT; }; } } #endif // BOOST_THREAD_PROVIDES_INTERRUPTIONS #endif // header passenger-4.0.37/ext/boost/thread/detail/tss_hooks.hpp000644 000765 000024 00000004747 12233035540 023414 0ustar00honglistaff000000 000000 // (C) Copyright Michael Glassford 2004. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #if !defined(BOOST_TLS_HOOKS_HPP) #define BOOST_TLS_HOOKS_HPP #include #include #if defined(BOOST_HAS_WINTHREADS) namespace boost { BOOST_THREAD_DECL void __cdecl on_process_enter(void); //Function to be called when the exe or dll //that uses Boost.Threads first starts //or is first loaded. //Should be called only before the first call to //on_thread_enter(). //Called automatically by Boost.Threads when //a method for doing so has been discovered. //May be omitted; may be called multiple times. BOOST_THREAD_DECL void __cdecl on_process_exit(void); //Function to be called when the exe or dll //that uses Boost.Threads first starts //or is first loaded. //Should be called only after the last call to //on_exit_thread(). //Called automatically by Boost.Threads when //a method for doing so has been discovered. //Must not be omitted; may be called multiple times. BOOST_THREAD_DECL void __cdecl on_thread_enter(void); //Function to be called just after a thread starts //in an exe or dll that uses Boost.Threads. //Must be called in the context of the thread //that is starting. //Called automatically by Boost.Threads when //a method for doing so has been discovered. //May be omitted; may be called multiple times. BOOST_THREAD_DECL void __cdecl on_thread_exit(void); //Function to be called just be fore a thread ends //in an exe or dll that uses Boost.Threads. //Must be called in the context of the thread //that is ending. //Called automatically by Boost.Threads when //a method for doing so has been discovered. //Must not be omitted; may be called multiple times. void tss_cleanup_implemented(); //Dummy function used both to detect whether tss cleanup //cleanup has been implemented and to force //it to be linked into the Boost.Threads library. } #endif //defined(BOOST_HAS_WINTHREADS) #include #endif //!defined(BOOST_TLS_HOOKS_HPP) passenger-4.0.37/ext/boost/system/api_config.hpp000644 000765 000024 00000003450 12233035540 022277 0ustar00honglistaff000000 000000 // boost/system/api_config.hpp -------------------------------------------------------// // Copyright Beman Dawes 2003, 2006, 2010 // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // See http://www.boost.org/libs/system for documentation. //--------------------------------------------------------------------------------------// // Boost.System calls operating system API functions to implement system error category // functions. Usually there is no question as to which API is to be used. // // In the case of MinGW or Cygwin/MinGW, however, both POSIX and Windows API's are // available. Chaos ensues if other code thinks one is in use when Boost.System was // actually built with the other. This header centralizes the API choice and prevents // user definition of API macros, thus elminating the possibility of mismatches and the // need to test configurations with little or no practical value. // //--------------------------------------------------------------------------------------// #ifndef BOOST_SYSTEM_API_CONFIG_HPP #define BOOST_SYSTEM_API_CONFIG_HPP # if defined(BOOST_POSIX_API) || defined(BOOST_WINDOWS_API) # error user defined BOOST_POSIX_API or BOOST_WINDOWS_API not supported # endif // BOOST_POSIX_API or BOOST_WINDOWS_API specify which API to use // Cygwin/MinGW does not predefine _WIN32. // Standalone MinGW and all other known Windows compilers do predefine _WIN32 // Compilers that predefine _WIN32 or __MINGW32__ do so for Windows 64-bit builds too. # if defined(_WIN32) || defined(__CYGWIN__) // Windows default, including MinGW and Cygwin # define BOOST_WINDOWS_API # else # define BOOST_POSIX_API # endif #endif // BOOST_SYSTEM_API_CONFIG_HPP passenger-4.0.37/ext/boost/system/config.hpp000644 000765 000024 00000004445 12233035540 021453 0ustar00honglistaff000000 000000 // boost/system/config.hpp -----------------------------------------------------------// // Copyright Beman Dawes 2003, 2006 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/system for documentation. #ifndef BOOST_SYSTEM_CONFIG_HPP #define BOOST_SYSTEM_CONFIG_HPP #include #include // for BOOST_POSIX_API or BOOST_WINDOWS_API // This header implements separate compilation features as described in // http://www.boost.org/more/separate_compilation.html // normalize macros ------------------------------------------------------------------// #if !defined(BOOST_SYSTEM_DYN_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) \ && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK) # define BOOST_SYSTEM_STATIC_LINK #endif #if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_SYSTEM_DYN_LINK) # define BOOST_SYSTEM_DYN_LINK #elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) # define BOOST_SYSTEM_STATIC_LINK #endif #if defined(BOOST_SYSTEM_DYN_LINK) && defined(BOOST_SYSTEM_STATIC_LINK) # error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK #endif // enable dynamic or static linking as requested --------------------------------------// #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK) # if defined(BOOST_SYSTEM_SOURCE) # define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT # else # define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT # endif #else # define BOOST_SYSTEM_DECL #endif // enable automatic library variant selection ----------------------------------------// #if !defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SYSTEM_NO_LIB) // // Set the name of our library, this will get undef'ed by auto_link.hpp // once it's done with it: // #define BOOST_LIB_NAME boost_system // // If we're importing code from a dll, then tell auto_link.hpp about it: // #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK) # define BOOST_DYN_LINK #endif // // And include the header that does the work: // #include #endif // auto-linking disabled #endif // BOOST_SYSTEM_CONFIG_HPP passenger-4.0.37/ext/boost/system/error_code.hpp000644 000765 000024 00000044223 12233035540 022327 0ustar00honglistaff000000 000000 // boost/system/error_code.hpp ---------------------------------------------// // Copyright Beman Dawes 2006, 2007 // Copyright Christoper Kohlhoff 2007 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/system #ifndef BOOST_ERROR_CODE_HPP #define BOOST_ERROR_CODE_HPP #include #include #include #include #include #include #include #include #include #include // TODO: undef these macros if not already defined #include #if !defined(BOOST_POSIX_API) && !defined(BOOST_WINDOWS_API) # error BOOST_POSIX_API or BOOST_WINDOWS_API must be defined #endif #include // must be the last #include #ifndef BOOST_SYSTEM_NOEXCEPT #define BOOST_SYSTEM_NOEXCEPT BOOST_NOEXCEPT #endif namespace boost { namespace system { class error_code; class error_condition; // "Concept" helpers ---------------------------------------------------// template< class T > struct is_error_code_enum { static const bool value = false; }; template< class T > struct is_error_condition_enum { static const bool value = false; }; // generic error_conditions --------------------------------------------// namespace errc { enum errc_t { success = 0, address_family_not_supported = EAFNOSUPPORT, address_in_use = EADDRINUSE, address_not_available = EADDRNOTAVAIL, already_connected = EISCONN, argument_list_too_long = E2BIG, argument_out_of_domain = EDOM, bad_address = EFAULT, bad_file_descriptor = EBADF, bad_message = EBADMSG, broken_pipe = EPIPE, connection_aborted = ECONNABORTED, connection_already_in_progress = EALREADY, connection_refused = ECONNREFUSED, connection_reset = ECONNRESET, cross_device_link = EXDEV, destination_address_required = EDESTADDRREQ, device_or_resource_busy = EBUSY, directory_not_empty = ENOTEMPTY, executable_format_error = ENOEXEC, file_exists = EEXIST, file_too_large = EFBIG, filename_too_long = ENAMETOOLONG, function_not_supported = ENOSYS, host_unreachable = EHOSTUNREACH, identifier_removed = EIDRM, illegal_byte_sequence = EILSEQ, inappropriate_io_control_operation = ENOTTY, interrupted = EINTR, invalid_argument = EINVAL, invalid_seek = ESPIPE, io_error = EIO, is_a_directory = EISDIR, message_size = EMSGSIZE, network_down = ENETDOWN, network_reset = ENETRESET, network_unreachable = ENETUNREACH, no_buffer_space = ENOBUFS, no_child_process = ECHILD, no_link = ENOLINK, no_lock_available = ENOLCK, no_message_available = ENODATA, no_message = ENOMSG, no_protocol_option = ENOPROTOOPT, no_space_on_device = ENOSPC, no_stream_resources = ENOSR, no_such_device_or_address = ENXIO, no_such_device = ENODEV, no_such_file_or_directory = ENOENT, no_such_process = ESRCH, not_a_directory = ENOTDIR, not_a_socket = ENOTSOCK, not_a_stream = ENOSTR, not_connected = ENOTCONN, not_enough_memory = ENOMEM, not_supported = ENOTSUP, operation_canceled = ECANCELED, operation_in_progress = EINPROGRESS, operation_not_permitted = EPERM, operation_not_supported = EOPNOTSUPP, operation_would_block = EWOULDBLOCK, owner_dead = EOWNERDEAD, permission_denied = EACCES, protocol_error = EPROTO, protocol_not_supported = EPROTONOSUPPORT, read_only_file_system = EROFS, resource_deadlock_would_occur = EDEADLK, resource_unavailable_try_again = EAGAIN, result_out_of_range = ERANGE, state_not_recoverable = ENOTRECOVERABLE, stream_timeout = ETIME, text_file_busy = ETXTBSY, timed_out = ETIMEDOUT, too_many_files_open_in_system = ENFILE, too_many_files_open = EMFILE, too_many_links = EMLINK, too_many_symbolic_link_levels = ELOOP, value_too_large = EOVERFLOW, wrong_protocol_type = EPROTOTYPE }; } // namespace errc # ifndef BOOST_SYSTEM_NO_DEPRECATED namespace posix = errc; namespace posix_error = errc; # endif template<> struct is_error_condition_enum { static const bool value = true; }; // ----------------------------------------------------------------------// // Operating system specific interfaces --------------------------------// // The interface is divided into general and system-specific portions to // meet these requirements: // // * Code calling an operating system API can create an error_code with // a single category (system_category), even for POSIX-like operating // systems that return some POSIX errno values and some native errno // values. This code should not have to pay the cost of distinguishing // between categories, since it is not yet known if that is needed. // // * Users wishing to write system-specific code should be given enums for // at least the common error cases. // // * System specific code should fail at compile time if moved to another // operating system. // The system specific portions of the interface are located in headers // with names reflecting the operating system. For example, // // // // // // These headers are effectively empty for compiles on operating systems // where they are not applicable. // ----------------------------------------------------------------------// // class error_category ------------------------------------------------// class error_category : public noncopyable { public: virtual ~error_category(){} virtual const char * name() const BOOST_SYSTEM_NOEXCEPT = 0; virtual std::string message( int ev ) const = 0; inline virtual error_condition default_error_condition( int ev ) const BOOST_SYSTEM_NOEXCEPT; inline virtual bool equivalent( int code, const error_condition & condition ) const BOOST_SYSTEM_NOEXCEPT; inline virtual bool equivalent( const error_code & code, int condition ) const BOOST_SYSTEM_NOEXCEPT; bool operator==(const error_category & rhs) const BOOST_SYSTEM_NOEXCEPT { return this == &rhs; } bool operator!=(const error_category & rhs) const BOOST_SYSTEM_NOEXCEPT { return this != &rhs; } bool operator<( const error_category & rhs ) const BOOST_SYSTEM_NOEXCEPT { return std::less()( this, &rhs ); } }; // predefined error categories -----------------------------------------// # ifdef BOOST_ERROR_CODE_HEADER_ONLY inline const error_category & system_category() BOOST_SYSTEM_NOEXCEPT; inline const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT; #else BOOST_SYSTEM_DECL const error_category & system_category() BOOST_SYSTEM_NOEXCEPT; BOOST_SYSTEM_DECL const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT; #endif // deprecated synonyms --------------------------------------------------// # ifndef BOOST_SYSTEM_NO_DEPRECATED inline const error_category & get_system_category() { return system_category(); } inline const error_category & get_generic_category() { return generic_category(); } inline const error_category & get_posix_category() { return generic_category(); } static const error_category & posix_category = generic_category(); static const error_category & errno_ecat = generic_category(); static const error_category & native_ecat = system_category(); # endif // class error_condition -----------------------------------------------// // error_conditions are portable, error_codes are system or library specific class error_condition { public: // constructors: error_condition() BOOST_SYSTEM_NOEXCEPT : m_val(0), m_cat(&generic_category()) {} error_condition( int val, const error_category & cat ) BOOST_SYSTEM_NOEXCEPT : m_val(val), m_cat(&cat) {} template error_condition(ErrorConditionEnum e, typename boost::enable_if >::type* = 0) BOOST_SYSTEM_NOEXCEPT { *this = make_error_condition(e); } // modifiers: void assign( int val, const error_category & cat ) BOOST_SYSTEM_NOEXCEPT { m_val = val; m_cat = &cat; } template typename boost::enable_if, error_condition>::type & operator=( ErrorConditionEnum val ) BOOST_SYSTEM_NOEXCEPT { *this = make_error_condition(val); return *this; } void clear() BOOST_SYSTEM_NOEXCEPT { m_val = 0; m_cat = &generic_category(); } // observers: int value() const BOOST_SYSTEM_NOEXCEPT { return m_val; } const error_category & category() const BOOST_SYSTEM_NOEXCEPT { return *m_cat; } std::string message() const { return m_cat->message(value()); } typedef void (*unspecified_bool_type)(); static void unspecified_bool_true() {} operator unspecified_bool_type() const BOOST_SYSTEM_NOEXCEPT // true if error { return m_val == 0 ? 0 : unspecified_bool_true; } bool operator!() const BOOST_SYSTEM_NOEXCEPT // true if no error { return m_val == 0; } // relationals: // the more symmetrical non-member syntax allows enum // conversions work for both rhs and lhs. inline friend bool operator==( const error_condition & lhs, const error_condition & rhs ) BOOST_SYSTEM_NOEXCEPT { return lhs.m_cat == rhs.m_cat && lhs.m_val == rhs.m_val; } inline friend bool operator<( const error_condition & lhs, const error_condition & rhs ) BOOST_SYSTEM_NOEXCEPT // the more symmetrical non-member syntax allows enum // conversions work for both rhs and lhs. { return lhs.m_cat < rhs.m_cat || (lhs.m_cat == rhs.m_cat && lhs.m_val < rhs.m_val); } private: int m_val; const error_category * m_cat; }; // class error_code ----------------------------------------------------// // We want error_code to be a value type that can be copied without slicing // and without requiring heap allocation, but we also want it to have // polymorphic behavior based on the error category. This is achieved by // abstract base class error_category supplying the polymorphic behavior, // and error_code containing a pointer to an object of a type derived // from error_category. class error_code { public: // constructors: error_code() BOOST_SYSTEM_NOEXCEPT : m_val(0), m_cat(&system_category()) {} error_code( int val, const error_category & cat ) BOOST_SYSTEM_NOEXCEPT : m_val(val), m_cat(&cat) {} template error_code(ErrorCodeEnum e, typename boost::enable_if >::type* = 0) BOOST_SYSTEM_NOEXCEPT { *this = make_error_code(e); } // modifiers: void assign( int val, const error_category & cat ) BOOST_SYSTEM_NOEXCEPT { m_val = val; m_cat = &cat; } template typename boost::enable_if, error_code>::type & operator=( ErrorCodeEnum val ) BOOST_SYSTEM_NOEXCEPT { *this = make_error_code(val); return *this; } void clear() BOOST_SYSTEM_NOEXCEPT { m_val = 0; m_cat = &system_category(); } // observers: int value() const BOOST_SYSTEM_NOEXCEPT { return m_val; } const error_category & category() const BOOST_SYSTEM_NOEXCEPT { return *m_cat; } error_condition default_error_condition() const BOOST_SYSTEM_NOEXCEPT { return m_cat->default_error_condition(value()); } std::string message() const { return m_cat->message(value()); } typedef void (*unspecified_bool_type)(); static void unspecified_bool_true() {} operator unspecified_bool_type() const BOOST_SYSTEM_NOEXCEPT // true if error { return m_val == 0 ? 0 : unspecified_bool_true; } bool operator!() const BOOST_SYSTEM_NOEXCEPT // true if no error { return m_val == 0; } // relationals: inline friend bool operator==( const error_code & lhs, const error_code & rhs ) BOOST_SYSTEM_NOEXCEPT // the more symmetrical non-member syntax allows enum // conversions work for both rhs and lhs. { return lhs.m_cat == rhs.m_cat && lhs.m_val == rhs.m_val; } inline friend bool operator<( const error_code & lhs, const error_code & rhs ) BOOST_SYSTEM_NOEXCEPT // the more symmetrical non-member syntax allows enum // conversions work for both rhs and lhs. { return lhs.m_cat < rhs.m_cat || (lhs.m_cat == rhs.m_cat && lhs.m_val < rhs.m_val); } private: int m_val; const error_category * m_cat; }; // predefined error_code object used as "throw on error" tag # ifndef BOOST_SYSTEM_NO_DEPRECATED BOOST_SYSTEM_DECL extern error_code throws; # endif // Moving from a "throws" object to a "throws" function without breaking // existing code is a bit of a problem. The workaround is to place the // "throws" function in namespace boost rather than namespace boost::system. } // namespace system namespace detail { inline system::error_code * throws() { return 0; } } // Misuse of the error_code object is turned into a noisy failure by // poisoning the reference. This particular implementation doesn't // produce warnings or errors from popular compilers, is very efficient // (as determined by inspecting generated code), and does not suffer // from order of initialization problems. In practice, it also seems // cause user function error handling implementation errors to be detected // very early in the development cycle. inline system::error_code & throws() { return *detail::throws(); } namespace system { // non-member functions ------------------------------------------------// inline bool operator!=( const error_code & lhs, const error_code & rhs ) BOOST_SYSTEM_NOEXCEPT { return !(lhs == rhs); } inline bool operator!=( const error_condition & lhs, const error_condition & rhs ) BOOST_SYSTEM_NOEXCEPT { return !(lhs == rhs); } inline bool operator==( const error_code & code, const error_condition & condition ) BOOST_SYSTEM_NOEXCEPT { return code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() ); } inline bool operator!=( const error_code & lhs, const error_condition & rhs ) BOOST_SYSTEM_NOEXCEPT { return !(lhs == rhs); } inline bool operator==( const error_condition & condition, const error_code & code ) BOOST_SYSTEM_NOEXCEPT { return condition.category().equivalent( code, condition.value() ) || code.category().equivalent( code.value(), condition ); } inline bool operator!=( const error_condition & lhs, const error_code & rhs ) BOOST_SYSTEM_NOEXCEPT { return !(lhs == rhs); } // TODO: both of these may move elsewhere, but the LWG hasn't spoken yet. template inline std::basic_ostream& operator<< (std::basic_ostream& os, error_code ec) { os << ec.category().name() << ':' << ec.value(); return os; } inline std::size_t hash_value( const error_code & ec ) { return static_cast(ec.value()) + reinterpret_cast(&ec.category()); } // make_* functions for errc::errc_t -----------------------------// namespace errc { // explicit conversion: inline error_code make_error_code( errc_t e ) BOOST_SYSTEM_NOEXCEPT { return error_code( e, generic_category() ); } // implicit conversion: inline error_condition make_error_condition( errc_t e ) BOOST_SYSTEM_NOEXCEPT { return error_condition( e, generic_category() ); } } // error_category default implementation -------------------------------// error_condition error_category::default_error_condition( int ev ) const BOOST_SYSTEM_NOEXCEPT { return error_condition( ev, *this ); } bool error_category::equivalent( int code, const error_condition & condition ) const BOOST_SYSTEM_NOEXCEPT { return default_error_condition( code ) == condition; } bool error_category::equivalent( const error_code & code, int condition ) const BOOST_SYSTEM_NOEXCEPT { return *this == code.category() && code.value() == condition; } } // namespace system } // namespace boost #include // pops abi_prefix.hpp pragmas # ifdef BOOST_ERROR_CODE_HEADER_ONLY # include # endif #endif // BOOST_ERROR_CODE_HPP passenger-4.0.37/ext/boost/system/system_error.hpp000644 000765 000024 00000004773 12233035540 022747 0ustar00honglistaff000000 000000 // Boost system_error.hpp --------------------------------------------------// // Copyright Beman Dawes 2006 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_SYSTEM_ERROR_HPP #define BOOST_SYSTEM_ERROR_HPP #include #include #include #include namespace boost { namespace system { // class system_error ------------------------------------------------------------// class BOOST_SYMBOL_VISIBLE system_error : public std::runtime_error // BOOST_SYMBOL_VISIBLE is needed by GCC to ensure system_error thrown from a shared // library can be caught. See svn.boost.org/trac/boost/ticket/3697 { public: system_error( error_code ec ) : std::runtime_error(""), m_error_code(ec) {} system_error( error_code ec, const std::string & what_arg ) : std::runtime_error(what_arg), m_error_code(ec) {} system_error( error_code ec, const char* what_arg ) : std::runtime_error(what_arg), m_error_code(ec) {} system_error( int ev, const error_category & ecat ) : std::runtime_error(""), m_error_code(ev,ecat) {} system_error( int ev, const error_category & ecat, const std::string & what_arg ) : std::runtime_error(what_arg), m_error_code(ev,ecat) {} system_error( int ev, const error_category & ecat, const char * what_arg ) : std::runtime_error(what_arg), m_error_code(ev,ecat) {} virtual ~system_error() throw() {} const error_code & code() const throw() { return m_error_code; } const char * what() const throw(); private: error_code m_error_code; mutable std::string m_what; }; // implementation ------------------------------------------------------// inline const char * system_error::what() const throw() // see http://www.boost.org/more/error_handling.html for lazy build rationale { if ( m_what.empty() ) { #ifndef BOOST_NO_EXCEPTIONS try #endif { m_what = this->std::runtime_error::what(); if ( !m_what.empty() ) m_what += ": "; m_what += m_error_code.message(); } #ifndef BOOST_NO_EXCEPTIONS catch (...) { return std::runtime_error::what(); } #endif } return m_what.c_str(); } } // namespace system } // namespace boost #endif // BOOST_SYSTEM_ERROR_HPP passenger-4.0.37/ext/boost/smart_ptr/allocate_shared_array.hpp000644 000765 000024 00000025225 12233035540 025204 0ustar00honglistaff000000 000000 /* * Copyright (c) 2012 Glen Joseph Fernandes * glenfe at live dot com * * Distributed under the Boost Software License, * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP #define BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP #include #include #include #include #include #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #include #endif namespace boost { template inline typename boost::detail::sp_if_array::type allocate_shared(const A& allocator, std::size_t size) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; T1* p1 = 0; T2* p2 = 0; std::size_t n1 = size * boost::detail::array_total::size; boost::detail::allocate_array_helper a1(allocator, n1, &p2); boost::detail::array_deleter d1(n1); boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2); return boost::shared_ptr(s1, p1); } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template inline typename boost::detail::sp_if_array::type allocate_shared(const A& allocator, std::size_t size, Args&&... args) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; T1* p1 = 0; T2* p2 = 0; std::size_t n1 = size * boost::detail::array_total::size; boost::detail::allocate_array_helper a1(allocator, n1, &p2); boost::detail::array_deleter d1(n1); boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(args)...); return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type allocate_shared(const A& allocator, Args&&... args) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; enum { N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; boost::detail::allocate_array_helper a1(allocator, &p2); boost::detail::array_deleter d1; boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(args)...); return boost::shared_ptr(s1, p1); } #endif #if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) template inline typename boost::detail::sp_if_size_array::type allocate_shared(const A& allocator, const T& list) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; typedef const T2 T3; enum { N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; T3* p3 = 0; boost::detail::allocate_array_helper a1(allocator, &p2); boost::detail::array_deleter d1; boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init_list(p2, p3); return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_array::type allocate_shared(const A& allocator, std::size_t size, const typename boost::detail::array_inner::type& list) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; typedef const T2 T3; enum { M = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; T3* p3 = 0; std::size_t n1 = M * size; boost::detail::allocate_array_helper a1(allocator, n1, &p2); boost::detail::array_deleter d1(n1); boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->template init_list(p2, p3); return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type allocate_shared(const A& allocator, const typename boost::detail::array_inner::type& list) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; typedef const T2 T3; enum { M = boost::detail::array_total::size, N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; T3* p3 = 0; boost::detail::allocate_array_helper a1(allocator, &p2); boost::detail::array_deleter d1; boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->template init_list(p2, p3); return boost::shared_ptr(s1, p1); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template inline typename boost::detail::sp_if_array::type allocate_shared(const A& allocator, std::initializer_list::type> list) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; typedef const T2 T3; T1* p1 = 0; T2* p2 = 0; T3* p3 = 0; std::size_t n1 = list.size() * boost::detail::array_total::size; boost::detail::allocate_array_helper a1(allocator, n1, &p2); boost::detail::array_deleter d1(n1); boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list.begin()); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init_list(p2, p3); return boost::shared_ptr(s1, p1); } #endif #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template inline typename boost::detail::sp_if_array::type allocate_shared(const A& allocator, std::size_t size, typename boost::detail::array_base::type&& value) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; T1* p1 = 0; T2* p2 = 0; std::size_t n1 = size * boost::detail::array_total::size; boost::detail::allocate_array_helper a1(allocator, n1, &p2); boost::detail::array_deleter d1(n1); boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(value)); return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type allocate_shared(const A& allocator, typename boost::detail::array_base::type&& value) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; enum { N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; boost::detail::allocate_array_helper a1(allocator, &p2); boost::detail::array_deleter d1; boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(value)); return boost::shared_ptr(s1, p1); } #endif #endif template inline typename boost::detail::sp_if_array::type allocate_shared_noinit(const A& allocator, std::size_t size) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; T1* p1 = 0; T2* p2 = 0; std::size_t n1 = size * boost::detail::array_total::size; boost::detail::allocate_array_helper a1(allocator, n1, &p2); boost::detail::array_deleter d1(n1); boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->noinit(p2); return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type allocate_shared_noinit(const A& allocator) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; enum { N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; boost::detail::allocate_array_helper a1(allocator, &p2); boost::detail::array_deleter d1; boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->noinit(p2); return boost::shared_ptr(s1, p1); } } #endif passenger-4.0.37/ext/boost/smart_ptr/bad_weak_ptr.hpp000644 000765 000024 00000002630 12233035540 023311 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED #define BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // boost/smart_ptr/bad_weak_ptr.hpp // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include #ifdef __BORLANDC__ # pragma warn -8026 // Functions with excep. spec. are not expanded inline #endif namespace boost { // The standard library that comes with Borland C++ 5.5.1, 5.6.4 // defines std::exception and its members as having C calling // convention (-pc). When the definition of bad_weak_ptr // is compiled with -ps, the compiler issues an error. // Hence, the temporary #pragma option -pc below. #if defined(__BORLANDC__) && __BORLANDC__ <= 0x564 # pragma option push -pc #endif class bad_weak_ptr: public std::exception { public: virtual char const * what() const throw() { return "tr1::bad_weak_ptr"; } }; #if defined(__BORLANDC__) && __BORLANDC__ <= 0x564 # pragma option pop #endif } // namespace boost #ifdef __BORLANDC__ # pragma warn .8026 // Functions with excep. spec. are not expanded inline #endif #endif // #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/000755 000765 000024 00000000000 12233035540 021417 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/smart_ptr/enable_shared_from_this.hpp000644 000765 000024 00000003522 12233035540 025516 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED #define BOOST_SMART_PTR_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED // // enable_shared_from_this.hpp // // Copyright 2002, 2009 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // http://www.boost.org/libs/smart_ptr/enable_shared_from_this.html // #include #include #include #include namespace boost { template class enable_shared_from_this { protected: enable_shared_from_this() BOOST_NOEXCEPT { } enable_shared_from_this(enable_shared_from_this const &) BOOST_NOEXCEPT { } enable_shared_from_this & operator=(enable_shared_from_this const &) BOOST_NOEXCEPT { return *this; } ~enable_shared_from_this() BOOST_NOEXCEPT // ~weak_ptr newer throws, so this call also must not throw { } public: shared_ptr shared_from_this() { shared_ptr p( weak_this_ ); BOOST_ASSERT( p.get() == this ); return p; } shared_ptr shared_from_this() const { shared_ptr p( weak_this_ ); BOOST_ASSERT( p.get() == this ); return p; } public: // actually private, but avoids compiler template friendship issues // Note: invoked automatically by shared_ptr; do not call template void _internal_accept_owner( shared_ptr const * ppx, Y * py ) const { if( weak_this_.expired() ) { weak_this_ = shared_ptr( *ppx, py ); } } private: mutable weak_ptr weak_this_; }; } // namespace boost #endif // #ifndef BOOST_SMART_PTR_ENABLE_SHARED_FROM_THIS_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/make_shared.hpp000644 000765 000024 00000001327 12233035540 023134 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_MAKE_SHARED_HPP_INCLUDED #define BOOST_SMART_PTR_MAKE_SHARED_HPP_INCLUDED // make_shared.hpp // // Copyright (c) 2007, 2008, 2012 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // See http://www.boost.org/libs/smart_ptr/make_shared.html // for documentation. #include #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_NO_SFINAE ) # include # include #endif #endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/make_shared_array.hpp000644 000765 000024 00000024041 12233035540 024330 0ustar00honglistaff000000 000000 /* * Copyright (c) 2012 Glen Joseph Fernandes * glenfe at live dot com * * Distributed under the Boost Software License, * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP #define BOOST_SMART_PTR_MAKE_SHARED_ARRAY_HPP #include #include #include #include #include #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) #include #endif namespace boost { template inline typename boost::detail::sp_if_array::type make_shared(std::size_t size) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; T1* p1 = 0; T2* p2 = 0; std::size_t n1 = size * boost::detail::array_total::size; boost::detail::make_array_helper a1(n1, &p2); boost::detail::array_deleter d1(n1); boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2); return boost::shared_ptr(s1, p1); } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template inline typename boost::detail::sp_if_array::type make_shared(std::size_t size, Args&&... args) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; T1* p1 = 0; T2* p2 = 0; std::size_t n1 = size * boost::detail::array_total::size; boost::detail::make_array_helper a1(n1, &p2); boost::detail::array_deleter d1(n1); boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(args)...); return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type make_shared(Args&&... args) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; enum { N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; boost::detail::make_array_helper a1(&p2); boost::detail::array_deleter d1; boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(args)...); return boost::shared_ptr(s1, p1); } #endif #if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) template inline typename boost::detail::sp_if_size_array::type make_shared(const T& list) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; typedef const T2 T3; enum { N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; T3* p3 = 0; boost::detail::make_array_helper a1(&p2); boost::detail::array_deleter d1; boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init_list(p2, p3); return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_array::type make_shared(std::size_t size, const typename boost::detail::array_inner::type& list) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; typedef const T2 T3; enum { M = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; T3* p3 = 0; std::size_t n1 = M * size; boost::detail::make_array_helper a1(n1, &p2); boost::detail::array_deleter d1(n1); boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->template init_list(p2, p3); return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type make_shared(const typename boost::detail::array_inner::type& list) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; typedef const T2 T3; enum { M = boost::detail::array_total::size, N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; T3* p3 = 0; boost::detail::make_array_helper a1(&p2); boost::detail::array_deleter d1; boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->template init_list(p2, p3); return boost::shared_ptr(s1, p1); } #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) template inline typename boost::detail::sp_if_array::type make_shared(std::initializer_list::type> list) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; typedef const T2 T3; T1* p1 = 0; T2* p2 = 0; T3* p3 = 0; std::size_t n1 = list.size() * boost::detail::array_total::size; boost::detail::make_array_helper a1(n1, &p2); boost::detail::array_deleter d1(n1); boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p3 = reinterpret_cast(list.begin()); p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init_list(p2, p3); return boost::shared_ptr(s1, p1); } #endif #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template inline typename boost::detail::sp_if_array::type make_shared(std::size_t size, typename boost::detail::array_base::type&& value) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; T1* p1 = 0; T2* p2 = 0; std::size_t n1 = size * boost::detail::array_total::size; boost::detail::make_array_helper a1(n1, &p2); boost::detail::array_deleter d1(n1); boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(value)); return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type make_shared(typename boost::detail::array_base::type&& value) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; enum { N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; boost::detail::make_array_helper a1(&p2); boost::detail::array_deleter d1; boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->init(p2, boost::detail::sp_forward(value)); return boost::shared_ptr(s1, p1); } #endif #endif template inline typename boost::detail::sp_if_array::type make_shared_noinit(std::size_t size) { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; T1* p1 = 0; T2* p2 = 0; std::size_t n1 = size * boost::detail::array_total::size; boost::detail::make_array_helper a1(n1, &p2); boost::detail::array_deleter d1(n1); boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->noinit(p2); return boost::shared_ptr(s1, p1); } template inline typename boost::detail::sp_if_size_array::type make_shared_noinit() { typedef typename boost::detail::array_inner::type T1; typedef typename boost::detail::array_base::type T2; enum { N = boost::detail::array_total::size }; T1* p1 = 0; T2* p2 = 0; boost::detail::make_array_helper a1(&p2); boost::detail::array_deleter d1; boost::shared_ptr s1(p1, d1, a1); typedef boost::detail::array_deleter* D2; p1 = reinterpret_cast(p2); D2 d2 = static_cast(s1._internal_get_untyped_deleter()); d2->noinit(p2); return boost::shared_ptr(s1, p1); } } #endif passenger-4.0.37/ext/boost/smart_ptr/make_shared_object.hpp000644 000765 000024 00000114476 12233035540 024474 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED #define BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED // make_shared_object.hpp // // Copyright (c) 2007, 2008, 2012 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // See http://www.boost.org/libs/smart_ptr/make_shared.html // for documentation. #include #include #include #include #include #include #include namespace boost { namespace detail { template< std::size_t N, std::size_t A > struct sp_aligned_storage { union type { char data_[ N ]; typename boost::type_with_alignment< A >::type align_; }; }; template< class T > class sp_ms_deleter { private: typedef typename sp_aligned_storage< sizeof( T ), ::boost::alignment_of< T >::value >::type storage_type; bool initialized_; storage_type storage_; private: void destroy() { if( initialized_ ) { #if defined( __GNUC__ ) // fixes incorrect aliasing warning T * p = reinterpret_cast< T* >( storage_.data_ ); p->~T(); #else reinterpret_cast< T* >( storage_.data_ )->~T(); #endif initialized_ = false; } } public: sp_ms_deleter() BOOST_NOEXCEPT : initialized_( false ) { } // optimization: do not copy storage_ sp_ms_deleter( sp_ms_deleter const & ) BOOST_NOEXCEPT : initialized_( false ) { } ~sp_ms_deleter() { destroy(); } void operator()( T * ) { destroy(); } static void operator_fn( T* ) // operator() can't be static { } void * address() BOOST_NOEXCEPT { return storage_.data_; } void set_initialized() BOOST_NOEXCEPT { initialized_ = true; } }; template< class T > struct sp_if_not_array { typedef boost::shared_ptr< T > type; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template< class T > struct sp_if_not_array< T[] > { }; #if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) template< class T, std::size_t N > struct sp_if_not_array< T[N] > { }; #endif #endif } // namespace detail #if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) # define BOOST_SP_MSD( T ) boost::detail::sp_inplace_tag< boost::detail::sp_ms_deleter< T > >() #else # define BOOST_SP_MSD( T ) boost::detail::sp_ms_deleter< T >() #endif // Zero-argument versions // // Used even when variadic templates are available because of the new T() vs new T issue template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared() { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T(); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T > typename boost::detail::sp_if_not_array< T >::type make_shared_noinit() { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T; pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T(); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A > typename boost::detail::sp_if_not_array< T >::type allocate_shared_noinit( A const & a ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T; pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } #if !defined( BOOST_NO_CXX11_VARIADIC_TEMPLATES ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) // Variadic templates, rvalue reference template< class T, class Arg1, class... Args > typename boost::detail::sp_if_not_array< T >::type make_shared( Arg1 && arg1, Args && ... args ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( arg1 ), boost::detail::sp_forward( args )... ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class Arg1, class... Args > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, Arg1 && arg1, Args && ... args ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( arg1 ), boost::detail::sp_forward( args )... ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } #elif !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) // For example MSVC 10.0 template< class T, class A1 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ), boost::detail::sp_forward( a6 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ), boost::detail::sp_forward( a6 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ), boost::detail::sp_forward( a6 ), boost::detail::sp_forward( a7 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ), boost::detail::sp_forward( a6 ), boost::detail::sp_forward( a7 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ), boost::detail::sp_forward( a6 ), boost::detail::sp_forward( a7 ), boost::detail::sp_forward( a8 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ), boost::detail::sp_forward( a6 ), boost::detail::sp_forward( a7 ), boost::detail::sp_forward( a8 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ), boost::detail::sp_forward( a6 ), boost::detail::sp_forward( a7 ), boost::detail::sp_forward( a8 ), boost::detail::sp_forward( a9 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ), boost::detail::sp_forward( a6 ), boost::detail::sp_forward( a7 ), boost::detail::sp_forward( a8 ), boost::detail::sp_forward( a9 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9, A10 && a10 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ), boost::detail::sp_forward( a6 ), boost::detail::sp_forward( a7 ), boost::detail::sp_forward( a8 ), boost::detail::sp_forward( a9 ), boost::detail::sp_forward( a10 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9, A10 && a10 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( boost::detail::sp_forward( a1 ), boost::detail::sp_forward( a2 ), boost::detail::sp_forward( a3 ), boost::detail::sp_forward( a4 ), boost::detail::sp_forward( a5 ), boost::detail::sp_forward( a6 ), boost::detail::sp_forward( a7 ), boost::detail::sp_forward( a8 ), boost::detail::sp_forward( a9 ), boost::detail::sp_forward( a10 ) ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } #else // C++03 version template< class T, class A1 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4, a5 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4, a5 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4, a5, a6 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4, a5, a6 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10 > typename boost::detail::sp_if_not_array< T >::type make_shared( A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9, A10 const & a10 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ) ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } template< class T, class A, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9, class A10 > typename boost::detail::sp_if_not_array< T >::type allocate_shared( A const & a, A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9, A10 const & a10 ) { boost::shared_ptr< T > pt( static_cast< T* >( 0 ), BOOST_SP_MSD( T ), a ); boost::detail::sp_ms_deleter< T > * pd = static_cast *>( pt._internal_get_untyped_deleter() ); void * pv = pd->address(); ::new( pv ) T( a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 ); pd->set_initialized(); T * pt2 = static_cast< T* >( pv ); boost::detail::sp_enable_shared_from_this( &pt, pt2, pt2 ); return boost::shared_ptr< T >( pt, pt2 ); } #endif #undef BOOST_SP_MSD } // namespace boost #endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_OBJECT_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/scoped_array.hpp000644 000765 000024 00000006375 12233035540 023354 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_SCOPED_ARRAY_HPP_INCLUDED #define BOOST_SMART_PTR_SCOPED_ARRAY_HPP_INCLUDED // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001, 2002 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // http://www.boost.org/libs/smart_ptr/scoped_array.htm // #include #include #include #include #include #include // for std::ptrdiff_t namespace boost { // Debug hooks #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) void sp_array_constructor_hook(void * p); void sp_array_destructor_hook(void * p); #endif // scoped_array extends scoped_ptr to arrays. Deletion of the array pointed to // is guaranteed, either on destruction of the scoped_array or via an explicit // reset(). Use shared_array or std::vector if your needs are more complex. template class scoped_array // noncopyable { private: T * px; scoped_array(scoped_array const &); scoped_array & operator=(scoped_array const &); typedef scoped_array this_type; void operator==( scoped_array const& ) const; void operator!=( scoped_array const& ) const; public: typedef T element_type; explicit scoped_array( T * p = 0 ) BOOST_NOEXCEPT : px( p ) { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_array_constructor_hook( px ); #endif } ~scoped_array() // never throws { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_array_destructor_hook( px ); #endif boost::checked_array_delete( px ); } void reset(T * p = 0) // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) { BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors this_type(p).swap(*this); } T & operator[](std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) { BOOST_ASSERT( px != 0 ); BOOST_ASSERT( i >= 0 ); return px[i]; } T * get() const BOOST_NOEXCEPT { return px; } // implicit conversion to "bool" #include void swap(scoped_array & b) BOOST_NOEXCEPT { T * tmp = b.px; b.px = px; px = tmp; } }; #if !defined( BOOST_NO_CXX11_NULLPTR ) template inline bool operator==( scoped_array const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT { return p.get() == 0; } template inline bool operator==( boost::detail::sp_nullptr_t, scoped_array const & p ) BOOST_NOEXCEPT { return p.get() == 0; } template inline bool operator!=( scoped_array const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT { return p.get() != 0; } template inline bool operator!=( boost::detail::sp_nullptr_t, scoped_array const & p ) BOOST_NOEXCEPT { return p.get() != 0; } #endif template inline void swap(scoped_array & a, scoped_array & b) BOOST_NOEXCEPT { a.swap(b); } } // namespace boost #endif // #ifndef BOOST_SMART_PTR_SCOPED_ARRAY_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/scoped_ptr.hpp000644 000765 000024 00000007134 12233035540 023035 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED #define BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001, 2002 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // http://www.boost.org/libs/smart_ptr/scoped_ptr.htm // #include #include #include #include #include #ifndef BOOST_NO_AUTO_PTR # include // for std::auto_ptr #endif namespace boost { // Debug hooks #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) void sp_scalar_constructor_hook(void * p); void sp_scalar_destructor_hook(void * p); #endif // scoped_ptr mimics a built-in pointer except that it guarantees deletion // of the object pointed to, either on destruction of the scoped_ptr or via // an explicit reset(). scoped_ptr is a simple solution for simple needs; // use shared_ptr or std::auto_ptr if your needs are more complex. template class scoped_ptr // noncopyable { private: T * px; scoped_ptr(scoped_ptr const &); scoped_ptr & operator=(scoped_ptr const &); typedef scoped_ptr this_type; void operator==( scoped_ptr const& ) const; void operator!=( scoped_ptr const& ) const; public: typedef T element_type; explicit scoped_ptr( T * p = 0 ): px( p ) // never throws { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_scalar_constructor_hook( px ); #endif } #ifndef BOOST_NO_AUTO_PTR explicit scoped_ptr( std::auto_ptr p ) BOOST_NOEXCEPT : px( p.release() ) { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_scalar_constructor_hook( px ); #endif } #endif ~scoped_ptr() // never throws { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_scalar_destructor_hook( px ); #endif boost::checked_delete( px ); } void reset(T * p = 0) // never throws { BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors this_type(p).swap(*this); } T & operator*() const // never throws { BOOST_ASSERT( px != 0 ); return *px; } T * operator->() const // never throws { BOOST_ASSERT( px != 0 ); return px; } T * get() const BOOST_NOEXCEPT { return px; } // implicit conversion to "bool" #include void swap(scoped_ptr & b) BOOST_NOEXCEPT { T * tmp = b.px; b.px = px; px = tmp; } }; #if !defined( BOOST_NO_CXX11_NULLPTR ) template inline bool operator==( scoped_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT { return p.get() == 0; } template inline bool operator==( boost::detail::sp_nullptr_t, scoped_ptr const & p ) BOOST_NOEXCEPT { return p.get() == 0; } template inline bool operator!=( scoped_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT { return p.get() != 0; } template inline bool operator!=( boost::detail::sp_nullptr_t, scoped_ptr const & p ) BOOST_NOEXCEPT { return p.get() != 0; } #endif template inline void swap(scoped_ptr & a, scoped_ptr & b) BOOST_NOEXCEPT { a.swap(b); } // get_pointer(p) is a generic way to say p.get() template inline T * get_pointer(scoped_ptr const & p) BOOST_NOEXCEPT { return p.get(); } } // namespace boost #endif // #ifndef BOOST_SMART_PTR_SCOPED_PTR_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/shared_array.hpp000644 000765 000024 00000016131 12233035540 023334 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_SHARED_ARRAY_HPP_INCLUDED #define BOOST_SMART_PTR_SHARED_ARRAY_HPP_INCLUDED // // shared_array.hpp // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001, 2002, 2012 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/smart_ptr/shared_array.htm for documentation. // #include // for broken compiler workarounds #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) #include #else #include // TR1 cyclic inclusion fix #include #include #include #include #include #include #include // for std::ptrdiff_t #include // for std::swap #include // for std::less namespace boost { // // shared_array // // shared_array extends shared_ptr to arrays. // The array pointed to is deleted when the last shared_array pointing to it // is destroyed or reset. // template class shared_array { private: // Borland 5.5.1 specific workarounds typedef checked_array_deleter deleter; typedef shared_array this_type; public: typedef T element_type; shared_array() BOOST_NOEXCEPT : px( 0 ), pn() { } template explicit shared_array( Y * p ): px( p ), pn( p, checked_array_deleter() ) { boost::detail::sp_assert_convertible< Y[], T[] >(); } // // Requirements: D's copy constructor must not throw // // shared_array will release p by calling d(p) // template shared_array( Y * p, D d ): px( p ), pn( p, d ) { boost::detail::sp_assert_convertible< Y[], T[] >(); } // As above, but with allocator. A's copy constructor shall not throw. template shared_array( Y * p, D d, A a ): px( p ), pn( p, d, a ) { boost::detail::sp_assert_convertible< Y[], T[] >(); } // generated copy constructor, destructor are fine... #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) // ... except in C++0x, move disables the implicit copy shared_array( shared_array const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) { } shared_array( shared_array && r ) BOOST_NOEXCEPT : px( r.px ), pn() { pn.swap( r.pn ); r.px = 0; } #endif // conversion template #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) shared_array( shared_array const & r, typename boost::detail::sp_enable_if_convertible< Y[], T[] >::type = boost::detail::sp_empty() ) #else shared_array( shared_array const & r ) #endif BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) // never throws { boost::detail::sp_assert_convertible< Y[], T[] >(); } // aliasing template< class Y > shared_array( shared_array const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn ) { } // assignment shared_array & operator=( shared_array const & r ) BOOST_NOEXCEPT { this_type( r ).swap( *this ); return *this; } #if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400) template shared_array & operator=( shared_array const & r ) BOOST_NOEXCEPT { this_type( r ).swap( *this ); return *this; } #endif #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) shared_array & operator=( shared_array && r ) BOOST_NOEXCEPT { this_type( static_cast< shared_array && >( r ) ).swap( *this ); return *this; } template shared_array & operator=( shared_array && r ) BOOST_NOEXCEPT { this_type( static_cast< shared_array && >( r ) ).swap( *this ); return *this; } #endif void reset() BOOST_NOEXCEPT { this_type().swap( *this ); } template void reset( Y * p ) // Y must be complete { BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors this_type( p ).swap( *this ); } template void reset( Y * p, D d ) { this_type( p, d ).swap( *this ); } template void reset( Y * p, D d, A a ) { this_type( p, d, a ).swap( *this ); } template void reset( shared_array const & r, element_type * p ) { this_type( r, p ).swap( *this ); } T & operator[] (std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) { BOOST_ASSERT(px != 0); BOOST_ASSERT(i >= 0); return px[i]; } T * get() const BOOST_NOEXCEPT { return px; } // implicit conversion to "bool" #include bool unique() const BOOST_NOEXCEPT { return pn.unique(); } long use_count() const BOOST_NOEXCEPT { return pn.use_count(); } void swap(shared_array & other) BOOST_NOEXCEPT { std::swap(px, other.px); pn.swap(other.pn); } void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const { return pn.get_deleter( ti ); } private: template friend class shared_array; T * px; // contained pointer detail::shared_count pn; // reference counter }; // shared_array template inline bool operator==(shared_array const & a, shared_array const & b) BOOST_NOEXCEPT { return a.get() == b.get(); } template inline bool operator!=(shared_array const & a, shared_array const & b) BOOST_NOEXCEPT { return a.get() != b.get(); } #if !defined( BOOST_NO_CXX11_NULLPTR ) template inline bool operator==( shared_array const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT { return p.get() == 0; } template inline bool operator==( boost::detail::sp_nullptr_t, shared_array const & p ) BOOST_NOEXCEPT { return p.get() == 0; } template inline bool operator!=( shared_array const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT { return p.get() != 0; } template inline bool operator!=( boost::detail::sp_nullptr_t, shared_array const & p ) BOOST_NOEXCEPT { return p.get() != 0; } #endif template inline bool operator<(shared_array const & a, shared_array const & b) BOOST_NOEXCEPT { return std::less()(a.get(), b.get()); } template void swap(shared_array & a, shared_array & b) BOOST_NOEXCEPT { a.swap(b); } template< class D, class T > D * get_deleter( shared_array const & p ) { return static_cast< D * >( p._internal_get_deleter( BOOST_SP_TYPEID(D) ) ); } } // namespace boost #endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) #endif // #ifndef BOOST_SMART_PTR_SHARED_ARRAY_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/shared_ptr.hpp000644 000765 000024 00000062765 12233035540 023041 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED #define BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED // // shared_ptr.hpp // // (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. // Copyright (c) 2001-2008 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. // #include // for broken compiler workarounds #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) #include #else // In order to avoid circular dependencies with Boost.TR1 // we make sure that our include of doesn't try to // pull in the TR1 headers: that's why we use this header // rather than including directly: #include // std::auto_ptr #include #include #include #include #include #include #include #if !defined(BOOST_SP_NO_ATOMIC_ACCESS) #include #include #endif #include // for std::swap #include // for std::less #include // for std::bad_cast #include // for std::size_t #if !defined(BOOST_NO_IOSTREAM) #if !defined(BOOST_NO_IOSFWD) #include // for std::basic_ostream #else #include #endif #endif namespace boost { template class shared_ptr; template class weak_ptr; template class enable_shared_from_this; class enable_shared_from_raw; namespace detail { // sp_element, element_type template< class T > struct sp_element { typedef T type; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template< class T > struct sp_element< T[] > { typedef T type; }; #if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) template< class T, std::size_t N > struct sp_element< T[N] > { typedef T type; }; #endif #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) // sp_dereference, return type of operator* template< class T > struct sp_dereference { typedef T & type; }; template<> struct sp_dereference< void > { typedef void type; }; #if !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) template<> struct sp_dereference< void const > { typedef void type; }; template<> struct sp_dereference< void volatile > { typedef void type; }; template<> struct sp_dereference< void const volatile > { typedef void type; }; #endif // !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template< class T > struct sp_dereference< T[] > { typedef void type; }; #if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) template< class T, std::size_t N > struct sp_dereference< T[N] > { typedef void type; }; #endif #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) // sp_member_access, return type of operator-> template< class T > struct sp_member_access { typedef T * type; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template< class T > struct sp_member_access< T[] > { typedef void type; }; #if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) template< class T, std::size_t N > struct sp_member_access< T[N] > { typedef void type; }; #endif #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) // sp_array_access, return type of operator[] template< class T > struct sp_array_access { typedef void type; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template< class T > struct sp_array_access< T[] > { typedef T & type; }; #if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 ) template< class T, std::size_t N > struct sp_array_access< T[N] > { typedef T & type; }; #endif #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) // sp_extent, for operator[] index check template< class T > struct sp_extent { enum _vt { value = 0 }; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template< class T, std::size_t N > struct sp_extent< T[N] > { enum _vt { value = N }; }; #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) // enable_shared_from_this support template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe ) { if( pe != 0 ) { pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) ); } } template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr * ppx, Y const * py, boost::enable_shared_from_raw const * pe ); #ifdef _MANAGED // Avoid C4793, ... causes native code generation struct sp_any_pointer { template sp_any_pointer( T* ) {} }; inline void sp_enable_shared_from_this( sp_any_pointer, sp_any_pointer, sp_any_pointer ) { } #else // _MANAGED inline void sp_enable_shared_from_this( ... ) { } #endif // _MANAGED #if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_NO_AUTO_PTR ) // rvalue auto_ptr support based on a technique by Dave Abrahams template< class T, class R > struct sp_enable_if_auto_ptr { }; template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R > { typedef R type; }; #endif // sp_assert_convertible template< class Y, class T > inline void sp_assert_convertible() { #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) // static_assert( sp_convertible< Y, T >::value ); typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ]; (void)sizeof( tmp ); #else T* p = static_cast< Y* >( 0 ); (void)p; #endif } // pointer constructor helper template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn ) { boost::detail::shared_count( p ).swap( pn ); boost::detail::sp_enable_shared_from_this( ppx, p, p ); } #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) { sp_assert_convertible< Y[], T[] >(); boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); } template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * p, boost::detail::shared_count & pn ) { sp_assert_convertible< Y[N], T[N] >(); boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn ); } #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) // deleter constructor helper template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p ) { boost::detail::sp_enable_shared_from_this( ppx, p, p ); } #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ ) { sp_assert_convertible< Y[], T[] >(); } template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * /*p*/ ) { sp_assert_convertible< Y[N], T[N] >(); } #endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) } // namespace detail // // shared_ptr // // An enhanced relative of scoped_ptr with reference counted copy semantics. // The object pointed to is deleted when the last shared_ptr pointing to it // is destroyed or reset. // template class shared_ptr { private: // Borland 5.5.1 specific workaround typedef shared_ptr this_type; public: typedef typename boost::detail::sp_element< T >::type element_type; shared_ptr() BOOST_NOEXCEPT : px( 0 ), pn() // never throws in 1.30+ { } #if !defined( BOOST_NO_CXX11_NULLPTR ) shared_ptr( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT : px( 0 ), pn() // never throws { } #endif template explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete { boost::detail::sp_pointer_construct( this, p, pn ); } // // Requirements: D's copy constructor must not throw // // shared_ptr will release p by calling d(p) // template shared_ptr( Y * p, D d ): px( p ), pn( p, d ) { boost::detail::sp_deleter_construct( this, p ); } #if !defined( BOOST_NO_CXX11_NULLPTR ) template shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d ) { } #endif // As above, but with allocator. A's copy constructor shall not throw. template shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) { boost::detail::sp_deleter_construct( this, p ); } #if !defined( BOOST_NO_CXX11_NULLPTR ) template shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a ) { } #endif // generated copy constructor, destructor are fine... #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) // ... except in C++0x, move disables the implicit copy shared_ptr( shared_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) { } #endif template explicit shared_ptr( weak_ptr const & r ): pn( r.pn ) // may throw { boost::detail::sp_assert_convertible< Y, T >(); // it is now safe to copy r.px, as pn(r.pn) did not throw px = r.px; } template shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ) BOOST_NOEXCEPT : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) { if( !pn.empty() ) { px = r.px; } } template #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) shared_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) #else shared_ptr( shared_ptr const & r ) #endif BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) { boost::detail::sp_assert_convertible< Y, T >(); } // aliasing template< class Y > shared_ptr( shared_ptr const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn ) { } #ifndef BOOST_NO_AUTO_PTR template explicit shared_ptr( std::auto_ptr & r ): px(r.get()), pn() { boost::detail::sp_assert_convertible< Y, T >(); Y * tmp = r.get(); pn = boost::detail::shared_count( r ); boost::detail::sp_deleter_construct( this, tmp ); } #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template shared_ptr( std::auto_ptr && r ): px(r.get()), pn() { boost::detail::sp_assert_convertible< Y, T >(); Y * tmp = r.get(); pn = boost::detail::shared_count( r ); boost::detail::sp_deleter_construct( this, tmp ); } #elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr::type = 0 ): px( r.get() ), pn() { typedef typename Ap::element_type Y; boost::detail::sp_assert_convertible< Y, T >(); Y * tmp = r.get(); pn = boost::detail::shared_count( r ); boost::detail::sp_deleter_construct( this, tmp ); } #endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_NO_AUTO_PTR #if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template< class Y, class D > shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn() { boost::detail::sp_assert_convertible< Y, T >(); typename std::unique_ptr< Y, D >::pointer tmp = r.get(); pn = boost::detail::shared_count( r ); boost::detail::sp_deleter_construct( this, tmp ); } #endif // assignment shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT { this_type(r).swap(*this); return *this; } #if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400) template shared_ptr & operator=(shared_ptr const & r) BOOST_NOEXCEPT { this_type(r).swap(*this); return *this; } #endif #ifndef BOOST_NO_AUTO_PTR template shared_ptr & operator=( std::auto_ptr & r ) { this_type( r ).swap( *this ); return *this; } #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template shared_ptr & operator=( std::auto_ptr && r ) { this_type( static_cast< std::auto_ptr && >( r ) ).swap( *this ); return *this; } #elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r ) { this_type( r ).swap( *this ); return *this; } #endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_NO_AUTO_PTR #if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template shared_ptr & operator=( std::unique_ptr && r ) { this_type( static_cast< std::unique_ptr && >( r ) ).swap(*this); return *this; } #endif // Move support #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) shared_ptr( shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn() { pn.swap( r.pn ); r.px = 0; } template #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) shared_ptr( shared_ptr && r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) #else shared_ptr( shared_ptr && r ) #endif BOOST_NOEXCEPT : px( r.px ), pn() { boost::detail::sp_assert_convertible< Y, T >(); pn.swap( r.pn ); r.px = 0; } shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT { this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); return *this; } template shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT { this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); return *this; } #endif #if !defined( BOOST_NO_CXX11_NULLPTR ) shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT // never throws { this_type().swap(*this); return *this; } #endif void reset() BOOST_NOEXCEPT // never throws in 1.30+ { this_type().swap(*this); } template void reset( Y * p ) // Y must be complete { BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors this_type( p ).swap( *this ); } template void reset( Y * p, D d ) { this_type( p, d ).swap( *this ); } template void reset( Y * p, D d, A a ) { this_type( p, d, a ).swap( *this ); } template void reset( shared_ptr const & r, element_type * p ) { this_type( r, p ).swap( *this ); } // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) typename boost::detail::sp_dereference< T >::type operator* () const { BOOST_ASSERT( px != 0 ); return *px; } // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) typename boost::detail::sp_member_access< T >::type operator-> () const { BOOST_ASSERT( px != 0 ); return px; } // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const { BOOST_ASSERT( px != 0 ); BOOST_ASSERT( i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 ) ); return px[ i ]; } element_type * get() const BOOST_NOEXCEPT { return px; } // implicit conversion to "bool" #include bool unique() const BOOST_NOEXCEPT { return pn.unique(); } long use_count() const BOOST_NOEXCEPT { return pn.use_count(); } void swap( shared_ptr & other ) BOOST_NOEXCEPT { std::swap(px, other.px); pn.swap(other.pn); } template bool owner_before( shared_ptr const & rhs ) const BOOST_NOEXCEPT { return pn < rhs.pn; } template bool owner_before( weak_ptr const & rhs ) const BOOST_NOEXCEPT { return pn < rhs.pn; } void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_NOEXCEPT { return pn.get_deleter( ti ); } void * _internal_get_untyped_deleter() const BOOST_NOEXCEPT { return pn.get_untyped_deleter(); } bool _internal_equiv( shared_ptr const & r ) const BOOST_NOEXCEPT { return px == r.px && pn == r.pn; } // Tasteless as this may seem, making all members public allows member templates // to work in the absence of member template friends. (Matthew Langston) #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS private: template friend class shared_ptr; template friend class weak_ptr; #endif element_type * px; // contained pointer boost::detail::shared_count pn; // reference counter }; // shared_ptr template inline bool operator==(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT { return a.get() == b.get(); } template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT { return a.get() != b.get(); } #if __GNUC__ == 2 && __GNUC_MINOR__ <= 96 // Resolve the ambiguity between our op!= and the one in rel_ops template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT { return a.get() != b.get(); } #endif #if !defined( BOOST_NO_CXX11_NULLPTR ) template inline bool operator==( shared_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT { return p.get() == 0; } template inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr const & p ) BOOST_NOEXCEPT { return p.get() == 0; } template inline bool operator!=( shared_ptr const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT { return p.get() != 0; } template inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr const & p ) BOOST_NOEXCEPT { return p.get() != 0; } #endif template inline bool operator<(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT { return a.owner_before( b ); } template inline void swap(shared_ptr & a, shared_ptr & b) BOOST_NOEXCEPT { a.swap(b); } template shared_ptr static_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT { (void) static_cast< T* >( static_cast< U* >( 0 ) ); typedef typename shared_ptr::element_type E; E * p = static_cast< E* >( r.get() ); return shared_ptr( r, p ); } template shared_ptr const_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT { (void) const_cast< T* >( static_cast< U* >( 0 ) ); typedef typename shared_ptr::element_type E; E * p = const_cast< E* >( r.get() ); return shared_ptr( r, p ); } template shared_ptr dynamic_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT { (void) dynamic_cast< T* >( static_cast< U* >( 0 ) ); typedef typename shared_ptr::element_type E; E * p = dynamic_cast< E* >( r.get() ); return p? shared_ptr( r, p ): shared_ptr(); } template shared_ptr reinterpret_pointer_cast( shared_ptr const & r ) BOOST_NOEXCEPT { (void) reinterpret_cast< T* >( static_cast< U* >( 0 ) ); typedef typename shared_ptr::element_type E; E * p = reinterpret_cast< E* >( r.get() ); return shared_ptr( r, p ); } // get_pointer() enables boost::mem_fn to recognize shared_ptr template inline typename shared_ptr::element_type * get_pointer(shared_ptr const & p) BOOST_NOEXCEPT { return p.get(); } // operator<< #if !defined(BOOST_NO_IOSTREAM) #if defined(BOOST_NO_TEMPLATED_IOSTREAMS) || ( defined(__GNUC__) && (__GNUC__ < 3) ) template std::ostream & operator<< (std::ostream & os, shared_ptr const & p) { os << p.get(); return os; } #else // in STLport's no-iostreams mode no iostream symbols can be used #ifndef _STLP_NO_IOSTREAMS # if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300 && __SGI_STL_PORT) // MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL using std::basic_ostream; template basic_ostream & operator<< (basic_ostream & os, shared_ptr const & p) # else template std::basic_ostream & operator<< (std::basic_ostream & os, shared_ptr const & p) # endif { os << p.get(); return os; } #endif // _STLP_NO_IOSTREAMS #endif // __GNUC__ < 3 #endif // !defined(BOOST_NO_IOSTREAM) // get_deleter namespace detail { #if ( defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) ) || \ ( defined(__EDG_VERSION__) && BOOST_WORKAROUND(__EDG_VERSION__, <= 238) ) || \ ( defined(__HP_aCC) && BOOST_WORKAROUND(__HP_aCC, <= 33500) ) // g++ 2.9x doesn't allow static_cast(void *) // apparently EDG 2.38 and HP aCC A.03.35 also don't accept it template D * basic_get_deleter(shared_ptr const & p) { void const * q = p._internal_get_deleter(BOOST_SP_TYPEID(D)); return const_cast(static_cast(q)); } #else template D * basic_get_deleter( shared_ptr const & p ) BOOST_NOEXCEPT { return static_cast( p._internal_get_deleter(BOOST_SP_TYPEID(D)) ); } #endif class esft2_deleter_wrapper { private: shared_ptr deleter_; public: esft2_deleter_wrapper() { } template< class T > void set_deleter( shared_ptr const & deleter ) { deleter_ = deleter; } template D* get_deleter() const BOOST_NOEXCEPT { return boost::detail::basic_get_deleter( deleter_ ); } template< class T> void operator()( T* ) { BOOST_ASSERT( deleter_.use_count() <= 1 ); deleter_.reset(); } }; } // namespace detail template D * get_deleter( shared_ptr const & p ) BOOST_NOEXCEPT { D *del = boost::detail::basic_get_deleter(p); if(del == 0) { boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter(p); // The following get_deleter method call is fully qualified because // older versions of gcc (2.95, 3.2.3) fail to compile it when written del_wrapper->get_deleter() if(del_wrapper) del = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter(); } return del; } // atomic access #if !defined(BOOST_SP_NO_ATOMIC_ACCESS) template inline bool atomic_is_lock_free( shared_ptr const * /*p*/ ) BOOST_NOEXCEPT { return false; } template shared_ptr atomic_load( shared_ptr const * p ) { boost::detail::spinlock_pool<2>::scoped_lock lock( p ); return *p; } template inline shared_ptr atomic_load_explicit( shared_ptr const * p, memory_order /*mo*/ ) { return atomic_load( p ); } template void atomic_store( shared_ptr * p, shared_ptr r ) { boost::detail::spinlock_pool<2>::scoped_lock lock( p ); p->swap( r ); } template inline void atomic_store_explicit( shared_ptr * p, shared_ptr r, memory_order /*mo*/ ) { atomic_store( p, r ); // std::move( r ) } template shared_ptr atomic_exchange( shared_ptr * p, shared_ptr r ) { boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); sp.lock(); p->swap( r ); sp.unlock(); return r; // return std::move( r ) } template shared_ptr atomic_exchange_explicit( shared_ptr * p, shared_ptr r, memory_order /*mo*/ ) { return atomic_exchange( p, r ); // std::move( r ) } template bool atomic_compare_exchange( shared_ptr * p, shared_ptr * v, shared_ptr w ) { boost::detail::spinlock & sp = boost::detail::spinlock_pool<2>::spinlock_for( p ); sp.lock(); if( p->_internal_equiv( *v ) ) { p->swap( w ); sp.unlock(); return true; } else { shared_ptr tmp( *p ); sp.unlock(); tmp.swap( *v ); return false; } } template inline bool atomic_compare_exchange_explicit( shared_ptr * p, shared_ptr * v, shared_ptr w, memory_order /*success*/, memory_order /*failure*/ ) { return atomic_compare_exchange( p, v, w ); // std::move( w ) } #endif // !defined(BOOST_SP_NO_ATOMIC_ACCESS) // hash_value template< class T > struct hash; template< class T > std::size_t hash_value( boost::shared_ptr const & p ) BOOST_NOEXCEPT { return boost::hash< T* >()( p.get() ); } } // namespace boost #endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) #endif // #ifndef BOOST_SMART_PTR_SHARED_PTR_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/weak_ptr.hpp000644 000765 000024 00000013414 12233035540 022505 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED #define BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED // // weak_ptr.hpp // // Copyright (c) 2001, 2002, 2003 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/smart_ptr/weak_ptr.htm for documentation. // #include // boost.TR1 include order fix #include #include namespace boost { template class weak_ptr { private: // Borland 5.5.1 specific workarounds typedef weak_ptr this_type; public: typedef typename boost::detail::sp_element< T >::type element_type; weak_ptr() BOOST_NOEXCEPT : px(0), pn() // never throws in 1.30+ { } // generated copy constructor, assignment, destructor are fine... #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) // ... except in C++0x, move disables the implicit copy weak_ptr( weak_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) { } weak_ptr & operator=( weak_ptr const & r ) BOOST_NOEXCEPT { px = r.px; pn = r.pn; return *this; } #endif // // The "obvious" converting constructor implementation: // // template // weak_ptr(weak_ptr const & r): px(r.px), pn(r.pn) // never throws // { // } // // has a serious problem. // // r.px may already have been invalidated. The px(r.px) // conversion may require access to *r.px (virtual inheritance). // // It is not possible to avoid spurious access violations since // in multithreaded programs r.px may be invalidated at any point. // template #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) weak_ptr( weak_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) #else weak_ptr( weak_ptr const & r ) #endif BOOST_NOEXCEPT : px(r.lock().get()), pn(r.pn) { boost::detail::sp_assert_convertible< Y, T >(); } #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) weak_ptr( weak_ptr && r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) #else weak_ptr( weak_ptr && r ) #endif BOOST_NOEXCEPT : px( r.lock().get() ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) { boost::detail::sp_assert_convertible< Y, T >(); r.px = 0; } // for better efficiency in the T == Y case weak_ptr( weak_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) { r.px = 0; } // for better efficiency in the T == Y case weak_ptr & operator=( weak_ptr && r ) BOOST_NOEXCEPT { this_type( static_cast< weak_ptr && >( r ) ).swap( *this ); return *this; } #endif template #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) weak_ptr( shared_ptr const & r, typename boost::detail::sp_enable_if_convertible::type = boost::detail::sp_empty() ) #else weak_ptr( shared_ptr const & r ) #endif BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) { boost::detail::sp_assert_convertible< Y, T >(); } #if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1300) template weak_ptr & operator=( weak_ptr const & r ) BOOST_NOEXCEPT { boost::detail::sp_assert_convertible< Y, T >(); px = r.lock().get(); pn = r.pn; return *this; } #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template weak_ptr & operator=( weak_ptr && r ) BOOST_NOEXCEPT { this_type( static_cast< weak_ptr && >( r ) ).swap( *this ); return *this; } #endif template weak_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT { boost::detail::sp_assert_convertible< Y, T >(); px = r.px; pn = r.pn; return *this; } #endif shared_ptr lock() const BOOST_NOEXCEPT { return shared_ptr( *this, boost::detail::sp_nothrow_tag() ); } long use_count() const BOOST_NOEXCEPT { return pn.use_count(); } bool expired() const BOOST_NOEXCEPT { return pn.use_count() == 0; } bool _empty() const // extension, not in std::weak_ptr { return pn.empty(); } void reset() BOOST_NOEXCEPT // never throws in 1.30+ { this_type().swap(*this); } void swap(this_type & other) BOOST_NOEXCEPT { std::swap(px, other.px); pn.swap(other.pn); } template void _internal_aliasing_assign(weak_ptr const & r, element_type * px2) { px = px2; pn = r.pn; } template bool owner_before( weak_ptr const & rhs ) const BOOST_NOEXCEPT { return pn < rhs.pn; } template bool owner_before( shared_ptr const & rhs ) const BOOST_NOEXCEPT { return pn < rhs.pn; } // Tasteless as this may seem, making all members public allows member templates // to work in the absence of member template friends. (Matthew Langston) #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS private: template friend class weak_ptr; template friend class shared_ptr; #endif element_type * px; // contained pointer boost::detail::weak_count pn; // reference counter }; // weak_ptr template inline bool operator<(weak_ptr const & a, weak_ptr const & b) BOOST_NOEXCEPT { return a.owner_before( b ); } template void swap(weak_ptr & a, weak_ptr & b) BOOST_NOEXCEPT { a.swap(b); } } // namespace boost #endif // #ifndef BOOST_SMART_PTR_WEAK_PTR_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/allocate_array_helper.hpp000644 000765 000024 00000015556 12233035540 026465 0ustar00honglistaff000000 000000 /* * Copyright (c) 2012 Glen Joseph Fernandes * glenfe at live dot com * * Distributed under the Boost Software License, * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SMART_PTR_DETAIL_ALLOCATE_ARRAY_HELPER_HPP #define BOOST_SMART_PTR_DETAIL_ALLOCATE_ARRAY_HELPER_HPP #include namespace boost { namespace detail { template class allocate_array_helper; template class allocate_array_helper { template friend class allocate_array_helper; typedef typename A::template rebind ::other A2; typedef typename A::template rebind::other A3; public: typedef typename A2::value_type value_type; typedef typename A2::pointer pointer; typedef typename A2::const_pointer const_pointer; typedef typename A2::reference reference; typedef typename A2::const_reference const_reference; typedef typename A2::size_type size_type; typedef typename A2::difference_type difference_type; template struct rebind { typedef allocate_array_helper other; }; allocate_array_helper(const A& allocator_, std::size_t size_, T** data_) : allocator(allocator_), size(sizeof(T) * size_), data(data_) { } template allocate_array_helper(const allocate_array_helper& other) : allocator(other.allocator), size(other.size), data(other.data) { } pointer address(reference value) const { return allocator.address(value); } const_pointer address(const_reference value) const { return allocator.address(value); } size_type max_size() const { return allocator.max_size(); } pointer allocate(size_type count, const void* value = 0) { std::size_t a1 = boost::alignment_of::value; std::size_t n1 = count * sizeof(Y) + a1 - 1; char* p1 = A3(allocator).allocate(n1 + size, value); char* p2 = p1 + n1; while (std::size_t(p2) % a1 != 0) { p2--; } *data = reinterpret_cast(p2); return reinterpret_cast(p1); } void deallocate(pointer memory, size_type count) { std::size_t a1 = boost::alignment_of::value; std::size_t n1 = count * sizeof(Y) + a1 - 1; char* p1 = reinterpret_cast(memory); A3(allocator).deallocate(p1, n1 + size); } void construct(pointer memory, const Y& value) { allocator.construct(memory, value); } void destroy(pointer memory) { allocator.destroy(memory); } template bool operator==(const allocate_array_helper& other) const { return allocator == other.allocator; } template bool operator!=(const allocate_array_helper& other) const { return !(*this == other); } private: A2 allocator; std::size_t size; T** data; }; template class allocate_array_helper { template friend class allocate_array_helper; typedef typename A::template rebind ::other A2; typedef typename A::template rebind::other A3; public: typedef typename A2::value_type value_type; typedef typename A2::pointer pointer; typedef typename A2::const_pointer const_pointer; typedef typename A2::reference reference; typedef typename A2::const_reference const_reference; typedef typename A2::size_type size_type; typedef typename A2::difference_type difference_type; template struct rebind { typedef allocate_array_helper other; }; allocate_array_helper(const A& allocator_, T** data_) : allocator(allocator_), data(data_) { } template allocate_array_helper(const allocate_array_helper& other) : allocator(other.allocator), data(other.data) { } pointer address(reference value) const { return allocator.address(value); } const_pointer address(const_reference value) const { return allocator.address(value); } size_type max_size() const { return allocator.max_size(); } pointer allocate(size_type count, const void* value = 0) { std::size_t a1 = boost::alignment_of::value; std::size_t n1 = count * sizeof(Y) + a1 - 1; char* p1 = A3(allocator).allocate(n1 + N1, value); char* p2 = p1 + n1; while (std::size_t(p2) % a1 != 0) { p2--; } *data = reinterpret_cast(p2); return reinterpret_cast(p1); } void deallocate(pointer memory, size_type count) { std::size_t a1 = boost::alignment_of::value; std::size_t n1 = count * sizeof(Y) + a1 - 1; char* p1 = reinterpret_cast(memory); A3(allocator).deallocate(p1, n1 + N1); } void construct(pointer memory, const Y& value) { allocator.construct(memory, value); } void destroy(pointer memory) { allocator.destroy(memory); } template bool operator==(const allocate_array_helper& other) const { return allocator == other.allocator; } template bool operator!=(const allocate_array_helper& other) const { return !(*this == other); } private: enum { N1 = N * sizeof(T) }; A2 allocator; T** data; }; } } #endif passenger-4.0.37/ext/boost/smart_ptr/detail/array_deleter.hpp000644 000765 000024 00000007456 12233035540 024766 0ustar00honglistaff000000 000000 /* * Copyright (c) 2012 Glen Joseph Fernandes * glenfe at live dot com * * Distributed under the Boost Software License, * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SMART_PTR_DETAIL_ARRAY_DELETER_HPP #define BOOST_SMART_PTR_DETAIL_ARRAY_DELETER_HPP #include #include namespace boost { namespace detail { template class array_deleter; template class array_deleter { public: array_deleter(std::size_t size_) : size(size_), object(0) { } ~array_deleter() { if (object) { array_destroy(object, size); } } void init(T* memory) { array_init(memory, size); object = memory; } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) void init(T* memory, T&& value) { array_init_value(memory, size, sp_forward(value)); object = memory; } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template void init(T* memory, Args&&... args) { array_init_args(memory, size, sp_forward(args)...); object = memory; } #endif #endif void init_list(T* memory, const T* list) { array_init_list(memory, size, list); object = memory; } template void init_list(T* memory, const T* list) { array_init_list(memory, size, list); object = memory; } void noinit(T* memory) { array_noinit(memory, size); object = memory; } void operator()(const void*) { if (object) { array_destroy(object, size); object = 0; } } private: std::size_t size; T* object; }; template class array_deleter { public: array_deleter() : object(0) { } ~array_deleter() { if (object) { array_destroy(object, N); } } void init(T* memory) { array_init(memory, N); object = memory; } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) void init(T* memory, T&& value) { array_init_value(memory, N, sp_forward(value)); object = memory; } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template void init(T* memory, Args&&... args) { array_init_args(memory, N, sp_forward(args)...); object = memory; } #endif #endif void init_list(T* memory, const T* list) { array_init_list(memory, N, list); object = memory; } template void init_list(T* memory, const T* list) { array_init_list(memory, N, list); object = memory; } void noinit(T* memory) { array_noinit(memory, N); object = memory; } void operator()(const void*) { if (object) { array_destroy(object, N); object = 0; } } private: T* object; }; } } #endif passenger-4.0.37/ext/boost/smart_ptr/detail/array_traits.hpp000644 000765 000024 00000002604 12233035540 024636 0ustar00honglistaff000000 000000 /* * Copyright (c) 2012 Glen Joseph Fernandes * glenfe at live dot com * * Distributed under the Boost Software License, * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SMART_PTR_DETAIL_ARRAY_TRAITS_HPP #define BOOST_SMART_PTR_DETAIL_ARRAY_TRAITS_HPP #include namespace boost { namespace detail { template struct array_base { typedef typename boost::remove_cv::type type; }; template struct array_base { typedef typename array_base::type type; }; template struct array_base { typedef typename array_base::type type; }; template struct array_total { enum { size = 1 }; }; template struct array_total { enum { size = N * array_total::size }; }; template struct array_inner; template struct array_inner { typedef T type; }; template struct array_inner { typedef T type; }; } } #endif passenger-4.0.37/ext/boost/smart_ptr/detail/array_utility.hpp000644 000765 000024 00000012736 12233035540 025042 0ustar00honglistaff000000 000000 /* * Copyright (c) 2012 Glen Joseph Fernandes * glenfe at live dot com * * Distributed under the Boost Software License, * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SMART_PTR_DETAIL_ARRAY_UTILITY_HPP #define BOOST_SMART_PTR_DETAIL_ARRAY_UTILITY_HPP #include #include #include namespace boost { namespace detail { template inline void array_destroy(T*, std::size_t, boost::true_type) { } template inline void array_destroy(T* memory, std::size_t size, boost::false_type) { for (std::size_t i = size; i > 0; ) { memory[--i].~T(); } } template inline void array_destroy(T* memory, std::size_t size) { boost::has_trivial_destructor type; array_destroy(memory, size, type); } template inline void array_init(T* memory, std::size_t size, boost::true_type) { for (std::size_t i = 0; i < size; i++) { memory[i] = T(); } } template inline void array_init(T* memory, std::size_t size, boost::false_type) { #if !defined(BOOST_NO_EXCEPTIONS) std::size_t i = 0; try { for (; i < size; i++) { void* p1 = memory + i; ::new(p1) T(); } } catch (...) { array_destroy(memory, i); throw; } #else for (std::size_t i = 0; i < size; i++) { void* p1 = memory + i; ::new(p1) T(); } #endif } template inline void array_init(T* memory, std::size_t size) { boost::has_trivial_default_constructor type; array_init(memory, size, type); } #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template inline void array_init_value(T* memory, std::size_t size, T&& value) { #if !defined(BOOST_NO_EXCEPTIONS) std::size_t i = 0; try { for (; i < size; i++) { void* p1 = memory + i; ::new(p1) T(value); } } catch (...) { array_destroy(memory, i); throw; } #else for (std::size_t i = 0; i < size; i++) { void* p1 = memory + i; ::new(p1) T(value); } #endif } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template inline void array_init_args(T* memory, std::size_t size, Args&&... args) { #if !defined(BOOST_NO_EXCEPTIONS) std::size_t i = 0; try { for (; i < size; i++) { void* p1 = memory + i; ::new(p1) T(args...); } } catch (...) { array_destroy(memory, i); throw; } #else for (std::size_t i = 0; i < size; i++) { void* p1 = memory + i; ::new(p1) T(args...); } #endif } #endif #endif template inline void array_init_list(T* memory, std::size_t size, const T* list) { #if !defined(BOOST_NO_EXCEPTIONS) std::size_t i = 0; try { for (; i < size; i++) { void* p1 = memory + i; ::new(p1) T(list[i]); } } catch (...) { array_destroy(memory, i); throw; } #else for (std::size_t i = 0; i < size; i++) { void* p1 = memory + i; ::new(p1) T(list[i]); } #endif } template inline void array_init_list(T* memory, std::size_t size, const T* list) { #if !defined(BOOST_NO_EXCEPTIONS) std::size_t i = 0; try { for (; i < size; i++) { void* p1 = memory + i; ::new(p1) T(list[i % N]); } } catch (...) { array_destroy(memory, i); throw; } #else for (std::size_t i = 0; i < size; i++) { void* p1 = memory + i; ::new(p1) T(list[i % N]); } #endif } template inline void array_noinit(T*, std::size_t, boost::true_type) { } template inline void array_noinit(T* memory, std::size_t size, boost::false_type) { #if !defined(BOOST_NO_EXCEPTIONS) std::size_t i = 0; try { for (; i < size; i++) { void* p1 = memory + i; ::new(p1) T; } } catch (...) { array_destroy(memory, i); throw; } #else for (std::size_t i = 0; i < size; i++) { void* p1 = memory + i; ::new(p1) T; } #endif } template inline void array_noinit(T* memory, std::size_t size) { boost::has_trivial_default_constructor type; array_noinit(memory, size, type); } } } #endif passenger-4.0.37/ext/boost/smart_ptr/detail/atomic_count.hpp000644 000765 000024 00000006457 12233035540 024630 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // boost/detail/atomic_count.hpp - thread/SMP safe reference counter // // Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // typedef boost::detail::atomic_count; // // atomic_count a(n); // // (n is convertible to long) // // Effects: Constructs an atomic_count with an initial value of n // // a; // // Returns: (long) the current value of a // // ++a; // // Effects: Atomically increments the value of a // Returns: (long) the new value of a // // --a; // // Effects: Atomically decrements the value of a // Returns: (long) the new value of a // // Important note: when --a returns zero, it must act as a // read memory barrier (RMB); i.e. the calling thread must // have a synchronized view of the memory // // On Intel IA-32 (x86) memory is always synchronized, so this // is not a problem. // // On many architectures the atomic instructions already act as // a memory barrier. // // This property is necessary for proper reference counting, since // a thread can update the contents of a shared object, then // release its reference, and another thread may immediately // release the last reference causing object destruction. // // The destructor needs to have a synchronized view of the // object to perform proper cleanup. // // Original example by Alexander Terekhov: // // Given: // // - a mutable shared object OBJ; // - two threads THREAD1 and THREAD2 each holding // a private smart_ptr object pointing to that OBJ. // // t1: THREAD1 updates OBJ (thread-safe via some synchronization) // and a few cycles later (after "unlock") destroys smart_ptr; // // t2: THREAD2 destroys smart_ptr WITHOUT doing any synchronization // with respect to shared mutable object OBJ; OBJ destructors // are called driven by smart_ptr interface... // #include #include #ifndef BOOST_HAS_THREADS namespace boost { namespace detail { typedef long atomic_count; } } #elif defined(BOOST_AC_USE_PTHREADS) # include #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) # include #elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # include #elif defined( BOOST_SP_HAS_SYNC ) # include #elif defined(__GLIBCPP__) || defined(__GLIBCXX__) # include #elif defined(BOOST_HAS_PTHREADS) # define BOOST_AC_USE_PTHREADS # include #else // Use #define BOOST_DISABLE_THREADS to avoid the error #error Unrecognized threading platform #endif #endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/atomic_count_gcc.hpp000644 000765 000024 00000002700 12233035540 025427 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED // // boost/detail/atomic_count_gcc.hpp // // atomic_count for GNU libstdc++ v3 // // http://gcc.gnu.org/onlinedocs/porting/Thread-safety.html // // Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. // Copyright (c) 2002 Lars Gullik Bjűnnes // Copyright 2003-2005 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #if __GNUC__ * 100 + __GNUC_MINOR__ >= 402 # include #else # include #endif namespace boost { namespace detail { #if defined(__GLIBCXX__) // g++ 3.4+ using __gnu_cxx::__atomic_add; using __gnu_cxx::__exchange_and_add; #endif class atomic_count { public: explicit atomic_count( long v ) : value_( v ) {} long operator++() { return __exchange_and_add( &value_, +1 ) + 1; } long operator--() { return __exchange_and_add( &value_, -1 ) - 1; } operator long() const { return __exchange_and_add( &value_, 0 ); } private: atomic_count(atomic_count const &); atomic_count & operator=(atomic_count const &); mutable _Atomic_word value_; }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp000644 000765 000024 00000002757 12233035540 026150 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_X86_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_X86_HPP_INCLUDED // // boost/detail/atomic_count_gcc_x86.hpp // // atomic_count for g++ on 486+/AMD64 // // Copyright 2007 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // namespace boost { namespace detail { class atomic_count { public: explicit atomic_count( long v ) : value_( static_cast< int >( v ) ) {} long operator++() { return atomic_exchange_and_add( &value_, +1 ) + 1; } long operator--() { return atomic_exchange_and_add( &value_, -1 ) - 1; } operator long() const { return atomic_exchange_and_add( &value_, 0 ); } private: atomic_count(atomic_count const &); atomic_count & operator=(atomic_count const &); mutable int value_; private: static int atomic_exchange_and_add( int * pw, int dv ) { // int r = *pw; // *pw += dv; // return r; int r; __asm__ __volatile__ ( "lock\n\t" "xadd %1, %0": "+m"( *pw ), "=r"( r ): // outputs (%0, %1) "1"( dv ): // inputs (%2 == %1) "memory", "cc" // clobbers ); return r; } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_X86_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/atomic_count_pthreads.hpp000644 000765 000024 00000003372 12233035540 026513 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_PTHREADS_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_PTHREADS_HPP_INCLUDED // // boost/detail/atomic_count_pthreads.hpp // // Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include // // The generic pthread_mutex-based implementation sometimes leads to // inefficiencies. Example: a class with two atomic_count members // can get away with a single mutex. // // Users can detect this situation by checking BOOST_AC_USE_PTHREADS. // namespace boost { namespace detail { class atomic_count { private: class scoped_lock { public: scoped_lock(pthread_mutex_t & m): m_(m) { pthread_mutex_lock(&m_); } ~scoped_lock() { pthread_mutex_unlock(&m_); } private: pthread_mutex_t & m_; }; public: explicit atomic_count(long v): value_(v) { pthread_mutex_init(&mutex_, 0); } ~atomic_count() { pthread_mutex_destroy(&mutex_); } long operator++() { scoped_lock lock(mutex_); return ++value_; } long operator--() { scoped_lock lock(mutex_); return --value_; } operator long() const { scoped_lock lock(mutex_); return value_; } private: atomic_count(atomic_count const &); atomic_count & operator=(atomic_count const &); mutable pthread_mutex_t mutex_; long value_; }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_PTHREADS_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/atomic_count_solaris.hpp000644 000765 000024 00000002205 12233035540 026347 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_SOLARIS_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_SOLARIS_HPP_INCLUDED // // boost/detail/atomic_count_solaris.hpp // based on: boost/detail/atomic_count_win32.hpp // // Copyright (c) 2001-2005 Peter Dimov // Copyright (c) 2006 Michael van der Westhuizen // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include namespace boost { namespace detail { class atomic_count { public: explicit atomic_count( uint32_t v ): value_( v ) { } long operator++() { return atomic_inc_32_nv( &value_ ); } long operator--() { return atomic_dec_32_nv( &value_ ); } operator uint32_t() const { return static_cast( value_ ); } private: atomic_count( atomic_count const & ); atomic_count & operator=( atomic_count const & ); uint32_t value_; }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_SOLARIS_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/atomic_count_sync.hpp000644 000765 000024 00000002253 12233035540 025652 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_SYNC_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_SYNC_HPP_INCLUDED // // boost/detail/atomic_count_sync.hpp // // atomic_count for g++ 4.1+ // // http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Atomic-Builtins.html // // Copyright 2007 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #if defined( __ia64__ ) && defined( __INTEL_COMPILER ) # include #endif namespace boost { namespace detail { class atomic_count { public: explicit atomic_count( long v ) : value_( v ) {} long operator++() { return __sync_add_and_fetch( &value_, 1 ); } long operator--() { return __sync_add_and_fetch( &value_, -1 ); } operator long() const { return __sync_fetch_and_add( &value_, 0 ); } private: atomic_count(atomic_count const &); atomic_count & operator=(atomic_count const &); mutable long value_; }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_SYNC_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/make_array_helper.hpp000644 000765 000024 00000013032 12233035540 025601 0ustar00honglistaff000000 000000 /* * Copyright (c) 2012 Glen Joseph Fernandes * glenfe at live dot com * * Distributed under the Boost Software License, * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SMART_PTR_DETAIL_MAKE_ARRAY_HELPER_HPP #define BOOST_SMART_PTR_DETAIL_MAKE_ARRAY_HELPER_HPP #include namespace boost { namespace detail { template class make_array_helper; template class make_array_helper { template friend class make_array_helper; public: typedef Y value_type; typedef Y* pointer; typedef const Y* const_pointer; typedef Y& reference; typedef const Y& const_reference; typedef std::size_t size_type; typedef ptrdiff_t difference_type; template struct rebind { typedef make_array_helper other; }; make_array_helper(std::size_t size_, T** data_) : size(sizeof(T) * size_), data(data_) { } template make_array_helper(const make_array_helper& other) : size(other.size), data(other.data) { } pointer address(reference value) const { return &value; } const_pointer address(const_reference value) const { return &value; } size_type max_size() const { return static_cast(-1) / sizeof(Y); } pointer allocate(size_type count, const void* = 0) { std::size_t a1 = boost::alignment_of::value; std::size_t n1 = count * sizeof(Y) + a1 - 1; void* p1 = ::operator new(n1 + size); char* p2 = static_cast(p1) + n1; while (std::size_t(p2) % a1 != 0) { p2--; } *data = reinterpret_cast(p2); return reinterpret_cast(p1); } void deallocate(pointer memory, size_type) { void* p1 = memory; ::operator delete(p1); } void construct(pointer memory, const Y& value) { void* p1 = memory; ::new(p1) Y(value); } void destroy(pointer memory) { memory->~Y(); } template bool operator==(const make_array_helper&) const { return true; } template bool operator!=(const make_array_helper& other) const { return !(*this == other); } private: std::size_t size; T** data; }; template class make_array_helper { template friend class make_array_helper; public: typedef Y value_type; typedef Y* pointer; typedef const Y* const_pointer; typedef Y& reference; typedef const Y& const_reference; typedef std::size_t size_type; typedef ptrdiff_t difference_type; template struct rebind { typedef make_array_helper other; }; make_array_helper(T** data_) : data(data_) { } template make_array_helper(const make_array_helper& other) : data(other.data) { } pointer address(reference value) const { return &value; } const_pointer address(const_reference value) const { return &value; } size_type max_size() const { return static_cast(-1) / sizeof(Y); } pointer allocate(size_type count, const void* = 0) { std::size_t a1 = boost::alignment_of::value; std::size_t n1 = count * sizeof(Y) + a1 - 1; void* p1 = ::operator new(n1 + N1); char* p2 = static_cast(p1) + n1; while (std::size_t(p2) % a1 != 0) { p2--; } *data = reinterpret_cast(p2); return reinterpret_cast(p1); } void deallocate(pointer memory, size_type) { void* p1 = memory; ::operator delete(p1); } void construct(pointer memory, const Y& value) { void* p1 = memory; ::new(p1) Y(value); } void destroy(pointer memory) { memory->~Y(); } template bool operator==(const make_array_helper&) const { return true; } template bool operator!=(const make_array_helper& other) const { return !(*this == other); } private: enum { N1 = N * sizeof(T) }; T** data; }; } } #endif passenger-4.0.37/ext/boost/smart_ptr/detail/operator_bool.hpp000644 000765 000024 00000003145 12233035540 025001 0ustar00honglistaff000000 000000 // This header intentionally has no include guards. // // Copyright (c) 2001-2009, 2012 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt #if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS ) && !defined( BOOST_NO_CXX11_NULLPTR ) explicit operator bool () const BOOST_NOEXCEPT { return px != 0; } #elif ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__) operator bool () const BOOST_NOEXCEPT { return px != 0; } #elif defined( _MANAGED ) static void unspecified_bool( this_type*** ) { } typedef void (*unspecified_bool_type)( this_type*** ); operator unspecified_bool_type() const BOOST_NOEXCEPT { return px == 0? 0: unspecified_bool; } #elif \ ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \ ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \ ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) ) typedef element_type * (this_type::*unspecified_bool_type)() const; operator unspecified_bool_type() const BOOST_NOEXCEPT { return px == 0? 0: &this_type::get; } #else typedef element_type * this_type::*unspecified_bool_type; operator unspecified_bool_type() const BOOST_NOEXCEPT { return px == 0? 0: &this_type::px; } #endif // operator! is redundant, but some compilers need it bool operator! () const BOOST_NOEXCEPT { return px == 0; } passenger-4.0.37/ext/boost/smart_ptr/detail/shared_count.hpp000644 000765 000024 00000030773 12233035540 024620 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // detail/shared_count.hpp // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2005 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #ifdef __BORLANDC__ # pragma warn -8027 // Functions containing try are not expanded inline #endif #include #include #include #include #include #include #include // In order to avoid circular dependencies with Boost.TR1 // we make sure that our include of doesn't try to // pull in the TR1 headers: that's why we use this header // rather than including directly: #include // std::auto_ptr #include // std::less #ifdef BOOST_NO_EXCEPTIONS # include // std::bad_alloc #endif #if !defined( BOOST_NO_CXX11_SMART_PTR ) # include #endif namespace boost { namespace detail { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) int const shared_count_id = 0x2C35F101; int const weak_count_id = 0x298C38A4; #endif struct sp_nothrow_tag {}; template< class D > struct sp_inplace_tag { }; #if !defined( BOOST_NO_CXX11_SMART_PTR ) template< class T > class sp_reference_wrapper { public: explicit sp_reference_wrapper( T & t): t_( boost::addressof( t ) ) { } template< class Y > void operator()( Y * p ) const { (*t_)( p ); } private: T * t_; }; template< class D > struct sp_convert_reference { typedef D type; }; template< class D > struct sp_convert_reference< D& > { typedef sp_reference_wrapper< D > type; }; #endif class weak_count; class shared_count { private: sp_counted_base * pi_; #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) int id_; #endif friend class weak_count; public: shared_count(): pi_(0) // nothrow #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { } template explicit shared_count( Y * p ): pi_( 0 ) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { #ifndef BOOST_NO_EXCEPTIONS try { pi_ = new sp_counted_impl_p( p ); } catch(...) { boost::checked_delete( p ); throw; } #else pi_ = new sp_counted_impl_p( p ); if( pi_ == 0 ) { boost::checked_delete( p ); boost::throw_exception( std::bad_alloc() ); } #endif } #if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) template shared_count( Y * p, D d ): pi_(0) #else template shared_count( P p, D d ): pi_(0) #endif #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { #if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 ) typedef Y* P; #endif #ifndef BOOST_NO_EXCEPTIONS try { pi_ = new sp_counted_impl_pd(p, d); } catch(...) { d(p); // delete p throw; } #else pi_ = new sp_counted_impl_pd(p, d); if(pi_ == 0) { d(p); // delete p boost::throw_exception(std::bad_alloc()); } #endif } #if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) template< class P, class D > shared_count( P p, sp_inplace_tag ): pi_( 0 ) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { #ifndef BOOST_NO_EXCEPTIONS try { pi_ = new sp_counted_impl_pd< P, D >( p ); } catch( ... ) { D::operator_fn( p ); // delete p throw; } #else pi_ = new sp_counted_impl_pd< P, D >( p ); if( pi_ == 0 ) { D::operator_fn( p ); // delete p boost::throw_exception( std::bad_alloc() ); } #endif // #ifndef BOOST_NO_EXCEPTIONS } #endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) template shared_count( P p, D d, A a ): pi_( 0 ) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { typedef sp_counted_impl_pda impl_type; typedef typename A::template rebind< impl_type >::other A2; A2 a2( a ); #ifndef BOOST_NO_EXCEPTIONS try { pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); } catch(...) { d( p ); if( pi_ != 0 ) { a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); } throw; } #else pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); if( pi_ != 0 ) { new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); } else { d( p ); boost::throw_exception( std::bad_alloc() ); } #endif } #if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) template< class P, class D, class A > shared_count( P p, sp_inplace_tag< D >, A a ): pi_( 0 ) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { typedef sp_counted_impl_pda< P, D, A > impl_type; typedef typename A::template rebind< impl_type >::other A2; A2 a2( a ); #ifndef BOOST_NO_EXCEPTIONS try { pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); new( static_cast< void* >( pi_ ) ) impl_type( p, a ); } catch(...) { D::operator_fn( p ); if( pi_ != 0 ) { a2.deallocate( static_cast< impl_type* >( pi_ ), 1 ); } throw; } #else pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); if( pi_ != 0 ) { new( static_cast< void* >( pi_ ) ) impl_type( p, a ); } else { D::operator_fn( p ); boost::throw_exception( std::bad_alloc() ); } #endif // #ifndef BOOST_NO_EXCEPTIONS } #endif // !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) #ifndef BOOST_NO_AUTO_PTR // auto_ptr is special cased to provide the strong guarantee template explicit shared_count( std::auto_ptr & r ): pi_( new sp_counted_impl_p( r.get() ) ) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { #ifdef BOOST_NO_EXCEPTIONS if( pi_ == 0 ) { boost::throw_exception(std::bad_alloc()); } #endif r.release(); } #endif #if !defined( BOOST_NO_CXX11_SMART_PTR ) template explicit shared_count( std::unique_ptr & r ): pi_( 0 ) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { typedef typename sp_convert_reference::type D2; D2 d2( r.get_deleter() ); pi_ = new sp_counted_impl_pd< typename std::unique_ptr::pointer, D2 >( r.get(), d2 ); #ifdef BOOST_NO_EXCEPTIONS if( pi_ == 0 ) { boost::throw_exception( std::bad_alloc() ); } #endif r.release(); } #endif ~shared_count() // nothrow { if( pi_ != 0 ) pi_->release(); #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) id_ = 0; #endif } shared_count(shared_count const & r): pi_(r.pi_) // nothrow #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { if( pi_ != 0 ) pi_->add_ref_copy(); } #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) shared_count(shared_count && r): pi_(r.pi_) // nothrow #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { r.pi_ = 0; } #endif explicit shared_count(weak_count const & r); // throws bad_weak_ptr when r.use_count() == 0 shared_count( weak_count const & r, sp_nothrow_tag ); // constructs an empty *this when r.use_count() == 0 shared_count & operator= (shared_count const & r) // nothrow { sp_counted_base * tmp = r.pi_; if( tmp != pi_ ) { if( tmp != 0 ) tmp->add_ref_copy(); if( pi_ != 0 ) pi_->release(); pi_ = tmp; } return *this; } void swap(shared_count & r) // nothrow { sp_counted_base * tmp = r.pi_; r.pi_ = pi_; pi_ = tmp; } long use_count() const // nothrow { return pi_ != 0? pi_->use_count(): 0; } bool unique() const // nothrow { return use_count() == 1; } bool empty() const // nothrow { return pi_ == 0; } friend inline bool operator==(shared_count const & a, shared_count const & b) { return a.pi_ == b.pi_; } friend inline bool operator<(shared_count const & a, shared_count const & b) { return std::less()( a.pi_, b.pi_ ); } void * get_deleter( sp_typeinfo const & ti ) const { return pi_? pi_->get_deleter( ti ): 0; } void * get_untyped_deleter() const { return pi_? pi_->get_untyped_deleter(): 0; } }; class weak_count { private: sp_counted_base * pi_; #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) int id_; #endif friend class shared_count; public: weak_count(): pi_(0) // nothrow #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(weak_count_id) #endif { } weak_count(shared_count const & r): pi_(r.pi_) // nothrow #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(weak_count_id) #endif { if(pi_ != 0) pi_->weak_add_ref(); } weak_count(weak_count const & r): pi_(r.pi_) // nothrow #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(weak_count_id) #endif { if(pi_ != 0) pi_->weak_add_ref(); } // Move support #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) weak_count(weak_count && r): pi_(r.pi_) // nothrow #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(weak_count_id) #endif { r.pi_ = 0; } #endif ~weak_count() // nothrow { if(pi_ != 0) pi_->weak_release(); #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) id_ = 0; #endif } weak_count & operator= (shared_count const & r) // nothrow { sp_counted_base * tmp = r.pi_; if( tmp != pi_ ) { if(tmp != 0) tmp->weak_add_ref(); if(pi_ != 0) pi_->weak_release(); pi_ = tmp; } return *this; } weak_count & operator= (weak_count const & r) // nothrow { sp_counted_base * tmp = r.pi_; if( tmp != pi_ ) { if(tmp != 0) tmp->weak_add_ref(); if(pi_ != 0) pi_->weak_release(); pi_ = tmp; } return *this; } void swap(weak_count & r) // nothrow { sp_counted_base * tmp = r.pi_; r.pi_ = pi_; pi_ = tmp; } long use_count() const // nothrow { return pi_ != 0? pi_->use_count(): 0; } bool empty() const // nothrow { return pi_ == 0; } friend inline bool operator==(weak_count const & a, weak_count const & b) { return a.pi_ == b.pi_; } friend inline bool operator<(weak_count const & a, weak_count const & b) { return std::less()(a.pi_, b.pi_); } }; inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ ) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { if( pi_ == 0 || !pi_->add_ref_lock() ) { boost::throw_exception( boost::bad_weak_ptr() ); } } inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ ) #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { if( pi_ != 0 && !pi_->add_ref_lock() ) { pi_ = 0; } } } // namespace detail } // namespace boost #ifdef __BORLANDC__ # pragma warn .8027 // Functions containing try are not expanded inline #endif #endif // #ifndef BOOST_SMART_PTR_DETAIL_SHARED_COUNT_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_convertible.hpp000644 000765 000024 00000004126 12233035540 025151 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // detail/sp_convertible.hpp // // Copyright 2008 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt #include #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( BOOST_NO_SFINAE ) # define BOOST_SP_NO_SP_CONVERTIBLE #endif #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ < 303 ) # define BOOST_SP_NO_SP_CONVERTIBLE #endif #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) && defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x630 ) # define BOOST_SP_NO_SP_CONVERTIBLE #endif #if !defined( BOOST_SP_NO_SP_CONVERTIBLE ) namespace boost { namespace detail { template< class Y, class T > struct sp_convertible { typedef char (&yes) [1]; typedef char (&no) [2]; static yes f( T* ); static no f( ... ); enum _vt { value = sizeof( (f)( static_cast(0) ) ) == sizeof(yes) }; }; template< class Y, class T > struct sp_convertible< Y, T[] > { enum _vt { value = false }; }; template< class Y, class T > struct sp_convertible< Y[], T[] > { enum _vt { value = sp_convertible< Y[1], T[1] >::value }; }; template< class Y, std::size_t N, class T > struct sp_convertible< Y[N], T[] > { enum _vt { value = sp_convertible< Y[1], T[1] >::value }; }; struct sp_empty { }; template< bool > struct sp_enable_if_convertible_impl; template<> struct sp_enable_if_convertible_impl { typedef sp_empty type; }; template<> struct sp_enable_if_convertible_impl { }; template< class Y, class T > struct sp_enable_if_convertible: public sp_enable_if_convertible_impl< sp_convertible< Y, T >::value > { }; } // namespace detail } // namespace boost #endif // !defined( BOOST_SP_NO_SP_CONVERTIBLE ) #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_CONVERTIBLE_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base.hpp000644 000765 000024 00000005563 12233035540 025276 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // detail/sp_counted_base.hpp // // Copyright 2005, 2006 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include #include #if defined( BOOST_SP_DISABLE_THREADS ) # include #elif defined( BOOST_SP_USE_SPINLOCK ) # include #elif defined( BOOST_SP_USE_PTHREADS ) # include #elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 ) # include #elif defined( __SNC__ ) # include #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined(__PATHSCALE__) # include #elif defined(__HP_aCC) && defined(__ia64) # include #elif defined( __GNUC__ ) && defined( __ia64__ ) && !defined( __INTEL_COMPILER ) && !defined(__PATHSCALE__) # include #elif defined( __IBMCPP__ ) && defined( __powerpc ) # include #elif defined( __MWERKS__ ) && defined( __POWERPC__ ) # include #elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX ) # include #elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) # include #elif defined( BOOST_SP_HAS_SYNC ) # include #elif defined(__GNUC__) && ( defined( __sparcv9 ) || ( defined( __sparcv8 ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 402 ) ) ) # include #elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined(__CYGWIN__) # include #elif defined( _AIX ) # include #elif !defined( BOOST_HAS_THREADS ) # include #else # include #endif #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp000644 000765 000024 00000006076 12233035540 026727 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED // // detail/sp_counted_base_acc_ia64.hpp - aC++ on HP-UX IA64 // // Copyright 2007 Baruch Zilber // Copyright 2007 Boris Gubenko // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // Lock-free algorithm by Alexander Terekhov // #include #include namespace boost { namespace detail { inline void atomic_increment( int * pw ) { // ++*pw; _Asm_fetchadd(_FASZ_W, _SEM_REL, pw, +1, _LDHINT_NONE); } inline int atomic_decrement( int * pw ) { // return --*pw; int r = static_cast(_Asm_fetchadd(_FASZ_W, _SEM_REL, pw, -1, _LDHINT_NONE)); if (1 == r) { _Asm_mf(); } return r - 1; } inline int atomic_conditional_increment( int * pw ) { // if( *pw != 0 ) ++*pw; // return *pw; int v = *pw; for (;;) { if (0 == v) { return 0; } _Asm_mov_to_ar(_AREG_CCV, v, (_UP_CALL_FENCE | _UP_SYS_FENCE | _DOWN_CALL_FENCE | _DOWN_SYS_FENCE)); int r = static_cast(_Asm_cmpxchg(_SZ_W, _SEM_ACQ, pw, v + 1, _LDHINT_NONE)); if (r == v) { return r + 1; } v = r; } } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); int use_count_; // #shared int weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_decrement( &use_count_ ) == 0 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_decrement( &weak_count_ ) == 0 ) { destroy(); } } long use_count() const // nothrow { return static_cast( use_count_ ); // TODO use ld.acq here } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_aix.hpp000644 000765 000024 00000005661 12233035540 026136 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED // // detail/sp_counted_base_aix.hpp // based on: detail/sp_counted_base_w32.hpp // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2005 Peter Dimov // Copyright 2006 Michael van der Westhuizen // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // Lock-free algorithm by Alexander Terekhov // // Thanks to Ben Hitchings for the #weak + (#shared != 0) // formulation // #include #include #include namespace boost { namespace detail { inline void atomic_increment( int32_t* pw ) { // ++*pw; fetch_and_add( pw, 1 ); } inline int32_t atomic_decrement( int32_t * pw ) { // return --*pw; int32_t originalValue; __lwsync(); originalValue = fetch_and_add( pw, -1 ); __isync(); return (originalValue - 1); } inline int32_t atomic_conditional_increment( int32_t * pw ) { // if( *pw != 0 ) ++*pw; // return *pw; int32_t tmp = fetch_and_add( pw, 0 ); for( ;; ) { if( tmp == 0 ) return 0; if( compare_and_swap( pw, &tmp, tmp + 1 ) ) return (tmp + 1); } } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); int32_t use_count_; // #shared int32_t weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_decrement( &use_count_ ) == 0 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_decrement( &weak_count_ ) == 0 ) { destroy(); } } long use_count() const // nothrow { return fetch_and_add( const_cast(&use_count_), 0 ); } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp000644 000765 000024 00000005766 12233035540 026636 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // detail/sp_counted_base_cw_ppc.hpp - CodeWarrior on PowerPC // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2005 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // Lock-free algorithm by Alexander Terekhov // // Thanks to Ben Hitchings for the #weak + (#shared != 0) // formulation // #include namespace boost { namespace detail { inline void atomic_increment( register long * pw ) { register int a; asm { loop: lwarx a, 0, pw addi a, a, 1 stwcx. a, 0, pw bne- loop } } inline long atomic_decrement( register long * pw ) { register int a; asm { sync loop: lwarx a, 0, pw addi a, a, -1 stwcx. a, 0, pw bne- loop isync } return a; } inline long atomic_conditional_increment( register long * pw ) { register int a; asm { loop: lwarx a, 0, pw cmpwi a, 0 beq store addi a, a, 1 store: stwcx. a, 0, pw bne- loop } return a; } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); long use_count_; // #shared long weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_decrement( &use_count_ ) == 0 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_decrement( &weak_count_ ) == 0 ) { destroy(); } } long use_count() const // nothrow { return static_cast( use_count_ ); } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp000644 000765 000024 00000006150 12233035540 026465 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_X86_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_X86_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // detail/sp_counted_base_cw_x86.hpp - CodeWarrion on 486+ // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2005 Peter Dimov // Copyright 2005 Rene Rivera // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // Lock-free algorithm by Alexander Terekhov // // Thanks to Ben Hitchings for the #weak + (#shared != 0) // formulation // #include namespace boost { namespace detail { inline int atomic_exchange_and_add( int * pw, int dv ) { // int r = *pw; // *pw += dv; // return r; asm { mov esi, [pw] mov eax, dv lock xadd dword ptr [esi], eax } } inline void atomic_increment( int * pw ) { //atomic_exchange_and_add( pw, 1 ); asm { mov esi, [pw] lock inc dword ptr [esi] } } inline int atomic_conditional_increment( int * pw ) { // int rv = *pw; // if( rv != 0 ) ++*pw; // return rv; asm { mov esi, [pw] mov eax, dword ptr [esi] L0: test eax, eax je L1 mov ebx, eax inc ebx lock cmpxchg dword ptr [esi], ebx jne L0 L1: } } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); int use_count_; // #shared int weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 ) { destroy(); } } long use_count() const // nothrow { return static_cast( use_count_ ); } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_X86_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp000644 000765 000024 00000007111 12233035540 026724 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED // // detail/sp_counted_base_gcc_ia64.hpp - g++ on IA64 // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2006 Peter Dimov // Copyright 2005 Ben Hutchings // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // Lock-free algorithm by Alexander Terekhov // #include namespace boost { namespace detail { inline void atomic_increment( int * pw ) { // ++*pw; int tmp; // No barrier is required here but fetchadd always has an acquire or // release barrier associated with it. We choose release as it should be // cheaper. __asm__ ("fetchadd4.rel %0=%1,1" : "=r"(tmp), "=m"(*pw) : "m"( *pw )); } inline int atomic_decrement( int * pw ) { // return --*pw; int rv; __asm__ (" fetchadd4.rel %0=%1,-1 ;; \n" " cmp.eq p7,p0=1,%0 ;; \n" "(p7) ld4.acq %0=%1 " : "=&r"(rv), "=m"(*pw) : "m"( *pw ) : "p7"); return rv; } inline int atomic_conditional_increment( int * pw ) { // if( *pw != 0 ) ++*pw; // return *pw; int rv, tmp, tmp2; __asm__ ("0: ld4 %0=%3 ;; \n" " cmp.eq p7,p0=0,%0 ;; \n" "(p7) br.cond.spnt 1f \n" " mov ar.ccv=%0 \n" " add %1=1,%0 ;; \n" " cmpxchg4.acq %2=%3,%1,ar.ccv ;; \n" " cmp.ne p7,p0=%0,%2 ;; \n" "(p7) br.cond.spnt 0b \n" " mov %0=%1 ;; \n" "1:" : "=&r"(rv), "=&r"(tmp), "=&r"(tmp2), "=m"(*pw) : "m"( *pw ) : "ar.ccv", "p7"); return rv; } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); int use_count_; // #shared int weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_decrement( &use_count_ ) == 0 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_decrement( &weak_count_ ) == 0 ) { destroy(); } } long use_count() const // nothrow { return static_cast( use_count_ ); // TODO use ld.acq here } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp000644 000765 000024 00000006754 12233035540 027145 0ustar00honglistaff000000 000000 #ifndef BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED #define BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // detail/sp_counted_base_gcc_mips.hpp - g++ on MIPS // // Copyright (c) 2009, Spirent Communications, Inc. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // Lock-free algorithm by Alexander Terekhov // #include namespace boost { namespace detail { inline void atomic_increment( int * pw ) { // ++*pw; int tmp; __asm__ __volatile__ ( "0:\n\t" ".set push\n\t" ".set mips2\n\t" "ll %0, %1\n\t" "addiu %0, 1\n\t" "sc %0, %1\n\t" ".set pop\n\t" "beqz %0, 0b": "=&r"( tmp ), "=m"( *pw ): "m"( *pw ) ); } inline int atomic_decrement( int * pw ) { // return --*pw; int rv, tmp; __asm__ __volatile__ ( "0:\n\t" ".set push\n\t" ".set mips2\n\t" "ll %1, %2\n\t" "addiu %0, %1, -1\n\t" "sc %0, %2\n\t" ".set pop\n\t" "beqz %0, 0b\n\t" "addiu %0, %1, -1": "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ): "m"( *pw ): "memory" ); return rv; } inline int atomic_conditional_increment( int * pw ) { // if( *pw != 0 ) ++*pw; // return *pw; int rv, tmp; __asm__ __volatile__ ( "0:\n\t" ".set push\n\t" ".set mips2\n\t" "ll %0, %2\n\t" "beqz %0, 1f\n\t" "addiu %1, %0, 1\n\t" "sc %1, %2\n\t" ".set pop\n\t" "beqz %1, 0b\n\t" "addiu %0, %0, 1\n\t" "1:": "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ): "m"( *pw ): "memory" ); return rv; } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); int use_count_; // #shared int weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_decrement( &use_count_ ) == 0 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_decrement( &weak_count_ ) == 0 ) { destroy(); } } long use_count() const // nothrow { return static_cast( use_count_ ); } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp000644 000765 000024 00000006701 12233035540 026747 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // detail/sp_counted_base_gcc_ppc.hpp - g++ on PowerPC // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2005 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // Lock-free algorithm by Alexander Terekhov // // Thanks to Ben Hitchings for the #weak + (#shared != 0) // formulation // #include namespace boost { namespace detail { inline void atomic_increment( int * pw ) { // ++*pw; int tmp; __asm__ ( "0:\n\t" "lwarx %1, 0, %2\n\t" "addi %1, %1, 1\n\t" "stwcx. %1, 0, %2\n\t" "bne- 0b": "=m"( *pw ), "=&b"( tmp ): "r"( pw ), "m"( *pw ): "cc" ); } inline int atomic_decrement( int * pw ) { // return --*pw; int rv; __asm__ __volatile__ ( "sync\n\t" "0:\n\t" "lwarx %1, 0, %2\n\t" "addi %1, %1, -1\n\t" "stwcx. %1, 0, %2\n\t" "bne- 0b\n\t" "isync": "=m"( *pw ), "=&b"( rv ): "r"( pw ), "m"( *pw ): "memory", "cc" ); return rv; } inline int atomic_conditional_increment( int * pw ) { // if( *pw != 0 ) ++*pw; // return *pw; int rv; __asm__ ( "0:\n\t" "lwarx %1, 0, %2\n\t" "cmpwi %1, 0\n\t" "beq 1f\n\t" "addi %1, %1, 1\n\t" "1:\n\t" "stwcx. %1, 0, %2\n\t" "bne- 0b": "=m"( *pw ), "=&b"( rv ): "r"( pw ), "m"( *pw ): "cc" ); return rv; } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); int use_count_; // #shared int weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_decrement( &use_count_ ) == 0 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_decrement( &weak_count_ ) == 0 ) { destroy(); } } long use_count() const // nothrow { return static_cast( use_count_ ); } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp000644 000765 000024 00000006650 12233035540 027300 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // detail/sp_counted_base_gcc_sparc.hpp - g++ on Sparc V8+ // // Copyright (c) 2006 Piotr Wyderski // Copyright (c) 2006 Tomas Puverle // Copyright (c) 2006 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // Thanks to Michael van der Westhuizen #include #include // int32_t namespace boost { namespace detail { inline int32_t compare_and_swap( int32_t * dest_, int32_t compare_, int32_t swap_ ) { __asm__ __volatile__( "cas [%1], %2, %0" : "+r" (swap_) : "r" (dest_), "r" (compare_) : "memory" ); return swap_; } inline int32_t atomic_fetch_and_add( int32_t * pw, int32_t dv ) { // long r = *pw; // *pw += dv; // return r; for( ;; ) { int32_t r = *pw; if( __builtin_expect((compare_and_swap(pw, r, r + dv) == r), 1) ) { return r; } } } inline void atomic_increment( int32_t * pw ) { atomic_fetch_and_add( pw, 1 ); } inline int32_t atomic_decrement( int32_t * pw ) { return atomic_fetch_and_add( pw, -1 ); } inline int32_t atomic_conditional_increment( int32_t * pw ) { // long r = *pw; // if( r != 0 ) ++*pw; // return r; for( ;; ) { int32_t r = *pw; if( r == 0 ) { return r; } if( __builtin_expect( ( compare_and_swap( pw, r, r + 1 ) == r ), 1 ) ) { return r; } } } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); int32_t use_count_; // #shared int32_t weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_decrement( &use_count_ ) == 1 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_decrement( &weak_count_ ) == 1 ) { destroy(); } } long use_count() const // nothrow { return const_cast< int32_t const volatile & >( use_count_ ); } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp000644 000765 000024 00000007000 12233035540 026603 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // detail/sp_counted_base_gcc_x86.hpp - g++ on 486+ or AMD64 // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2005 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // Lock-free algorithm by Alexander Terekhov // // Thanks to Ben Hitchings for the #weak + (#shared != 0) // formulation // #include namespace boost { namespace detail { inline int atomic_exchange_and_add( int * pw, int dv ) { // int r = *pw; // *pw += dv; // return r; int r; __asm__ __volatile__ ( "lock\n\t" "xadd %1, %0": "=m"( *pw ), "=r"( r ): // outputs (%0, %1) "m"( *pw ), "1"( dv ): // inputs (%2, %3 == %1) "memory", "cc" // clobbers ); return r; } inline void atomic_increment( int * pw ) { //atomic_exchange_and_add( pw, 1 ); __asm__ ( "lock\n\t" "incl %0": "=m"( *pw ): // output (%0) "m"( *pw ): // input (%1) "cc" // clobbers ); } inline int atomic_conditional_increment( int * pw ) { // int rv = *pw; // if( rv != 0 ) ++*pw; // return rv; int rv, tmp; __asm__ ( "movl %0, %%eax\n\t" "0:\n\t" "test %%eax, %%eax\n\t" "je 1f\n\t" "movl %%eax, %2\n\t" "incl %2\n\t" "lock\n\t" "cmpxchgl %2, %0\n\t" "jne 0b\n\t" "1:": "=m"( *pw ), "=&a"( rv ), "=&r"( tmp ): // outputs (%0, %1, %2) "m"( *pw ): // input (%3) "cc" // clobbers ); return rv; } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); int use_count_; // #shared int weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 ) { destroy(); } } long use_count() const // nothrow { return static_cast( use_count_ ); } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_nt.hpp000644 000765 000024 00000004132 12233035540 025766 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // detail/sp_counted_base_nt.hpp // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2005 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include namespace boost { namespace detail { class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); long use_count_; // #shared long weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { ++use_count_; } bool add_ref_lock() // true on success { if( use_count_ == 0 ) return false; ++use_count_; return true; } void release() // nothrow { if( --use_count_ == 0 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { ++weak_count_; } void weak_release() // nothrow { if( --weak_count_ == 0 ) { destroy(); } } long use_count() const // nothrow { return use_count_; } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_pt.hpp000644 000765 000024 00000005653 12233035540 026001 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // detail/sp_counted_base_pt.hpp // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2005 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include #include namespace boost { namespace detail { class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); long use_count_; // #shared long weak_count_; // #weak + (#shared != 0) mutable pthread_mutex_t m_; public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { // HPUX 10.20 / DCE has a nonstandard pthread_mutex_init #if defined(__hpux) && defined(_DECTHREADS_) pthread_mutex_init( &m_, pthread_mutexattr_default ); #else pthread_mutex_init( &m_, 0 ); #endif } virtual ~sp_counted_base() // nothrow { pthread_mutex_destroy( &m_ ); } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { pthread_mutex_lock( &m_ ); ++use_count_; pthread_mutex_unlock( &m_ ); } bool add_ref_lock() // true on success { pthread_mutex_lock( &m_ ); bool r = use_count_ == 0? false: ( ++use_count_, true ); pthread_mutex_unlock( &m_ ); return r; } void release() // nothrow { pthread_mutex_lock( &m_ ); long new_use_count = --use_count_; pthread_mutex_unlock( &m_ ); if( new_use_count == 0 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { pthread_mutex_lock( &m_ ); ++weak_count_; pthread_mutex_unlock( &m_ ); } void weak_release() // nothrow { pthread_mutex_lock( &m_ ); long new_weak_count = --weak_count_; pthread_mutex_unlock( &m_ ); if( new_weak_count == 0 ) { destroy(); } } long use_count() const // nothrow { pthread_mutex_lock( &m_ ); long r = use_count_; pthread_mutex_unlock( &m_ ); return r; } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp000644 000765 000024 00000006552 12233035540 026725 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // detail/sp_counted_base_gcc_sparc.hpp - g++ on Sparc V8+ // // Copyright (c) 2006 Piotr Wyderski // Copyright (c) 2006 Tomas Puverle // Copyright (c) 2006 Peter Dimov // Copyright (c) 2011 Emil Dotchevski // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // Thanks to Michael van der Westhuizen #include #include // uint32_t namespace boost { namespace detail { inline uint32_t compare_and_swap( uint32_t * dest_, uint32_t compare_, uint32_t swap_ ) { return __builtin_cellAtomicCompareAndSwap32(dest_,compare_,swap_); } inline uint32_t atomic_fetch_and_add( uint32_t * pw, uint32_t dv ) { // long r = *pw; // *pw += dv; // return r; for( ;; ) { uint32_t r = *pw; if( __builtin_expect((compare_and_swap(pw, r, r + dv) == r), 1) ) { return r; } } } inline void atomic_increment( uint32_t * pw ) { (void) __builtin_cellAtomicIncr32( pw ); } inline uint32_t atomic_decrement( uint32_t * pw ) { return __builtin_cellAtomicDecr32( pw ); } inline uint32_t atomic_conditional_increment( uint32_t * pw ) { // long r = *pw; // if( r != 0 ) ++*pw; // return r; for( ;; ) { uint32_t r = *pw; if( r == 0 ) { return r; } if( __builtin_expect( ( compare_and_swap( pw, r, r + 1 ) == r ), 1 ) ) { return r; } } } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); uint32_t use_count_; // #shared uint32_t weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_decrement( &use_count_ ) == 1 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_decrement( &weak_count_ ) == 1 ) { destroy(); } } long use_count() const // nothrow { return const_cast< uint32_t const volatile & >( use_count_ ); } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_solaris.hpp000644 000765 000024 00000004777 12233035540 027040 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SOLARIS_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SOLARIS_HPP_INCLUDED // // detail/sp_counted_base_solaris.hpp // based on: detail/sp_counted_base_w32.hpp // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2005 Peter Dimov // Copyright 2006 Michael van der Westhuizen // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // Lock-free algorithm by Alexander Terekhov // // Thanks to Ben Hitchings for the #weak + (#shared != 0) // formulation // #include #include namespace boost { namespace detail { class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); uint32_t use_count_; // #shared uint32_t weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_inc_32( &use_count_ ); } bool add_ref_lock() // true on success { for( ;; ) { uint32_t tmp = static_cast< uint32_t const volatile& >( use_count_ ); if( tmp == 0 ) return false; if( atomic_cas_32( &use_count_, tmp, tmp + 1 ) == tmp ) return true; } } void release() // nothrow { if( atomic_dec_32_nv( &use_count_ ) == 0 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_inc_32( &weak_count_ ); } void weak_release() // nothrow { if( atomic_dec_32_nv( &weak_count_ ) == 0 ) { destroy(); } } long use_count() const // nothrow { return static_cast( use_count_ ); } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SOLARIS_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_spin.hpp000644 000765 000024 00000005341 12233035540 026321 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // detail/sp_counted_base_spin.hpp - spinlock pool atomic emulation // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2008 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include #include namespace boost { namespace detail { inline int atomic_exchange_and_add( int * pw, int dv ) { spinlock_pool<1>::scoped_lock lock( pw ); int r = *pw; *pw += dv; return r; } inline void atomic_increment( int * pw ) { spinlock_pool<1>::scoped_lock lock( pw ); ++*pw; } inline int atomic_conditional_increment( int * pw ) { spinlock_pool<1>::scoped_lock lock( pw ); int rv = *pw; if( rv != 0 ) ++*pw; return rv; } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); int use_count_; // #shared int weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 ) { destroy(); } } long use_count() const // nothrow { spinlock_pool<1>::scoped_lock lock( &use_count_ ); return use_count_; } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_sync.hpp000644 000765 000024 00000005746 12233035540 026335 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // detail/sp_counted_base_sync.hpp - g++ 4.1+ __sync intrinsics // // Copyright (c) 2007 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt #include #include #if defined( __ia64__ ) && defined( __INTEL_COMPILER ) # include #endif namespace boost { namespace detail { #if INT_MAX >= 2147483647 typedef int sp_int32_t; #else typedef long sp_int32_t; #endif inline void atomic_increment( sp_int32_t * pw ) { __sync_fetch_and_add( pw, 1 ); } inline sp_int32_t atomic_decrement( sp_int32_t * pw ) { return __sync_fetch_and_add( pw, -1 ); } inline sp_int32_t atomic_conditional_increment( sp_int32_t * pw ) { // long r = *pw; // if( r != 0 ) ++*pw; // return r; sp_int32_t r = *pw; for( ;; ) { if( r == 0 ) { return r; } sp_int32_t r2 = __sync_val_compare_and_swap( pw, r, r + 1 ); if( r2 == r ) { return r; } else { r = r2; } } } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); sp_int32_t use_count_; // #shared sp_int32_t weak_count_; // #weak + (#shared != 0) public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_decrement( &use_count_ ) == 1 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_decrement( &weak_count_ ) == 1 ) { destroy(); } } long use_count() const // nothrow { return const_cast< sp_int32_t const volatile & >( use_count_ ); } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp000644 000765 000024 00000006415 12233035540 027326 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED // // detail/sp_counted_base_vacpp_ppc.hpp - xlC(vacpp) on POWER // based on: detail/sp_counted_base_w32.hpp // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2005 Peter Dimov // Copyright 2006 Michael van der Westhuizen // Copyright 2012 IBM Corp. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // Lock-free algorithm by Alexander Terekhov // // Thanks to Ben Hitchings for the #weak + (#shared != 0) // formulation // #include extern "builtin" void __lwsync(void); extern "builtin" void __isync(void); extern "builtin" int __fetch_and_add(volatile int* addr, int val); extern "builtin" int __compare_and_swap(volatile int*, int*, int); namespace boost { namespace detail { inline void atomic_increment( int *pw ) { // ++*pw; __lwsync(); __fetch_and_add(pw, 1); __isync(); } inline int atomic_decrement( int *pw ) { // return --*pw; __lwsync(); int originalValue = __fetch_and_add(pw, -1); __isync(); return (originalValue - 1); } inline int atomic_conditional_increment( int *pw ) { // if( *pw != 0 ) ++*pw; // return *pw; __lwsync(); int v = *const_cast(pw); for (;;) // loop until state is known { if (v == 0) return 0; if (__compare_and_swap(pw, &v, v + 1)) { __isync(); return (v + 1); } } } class sp_counted_base { private: sp_counted_base( sp_counted_base const & ); sp_counted_base & operator= ( sp_counted_base const & ); int use_count_; // #shared int weak_count_; // #weak + (#shared != 0) char pad[64] __attribute__((__aligned__(64))); // pad to prevent false sharing public: sp_counted_base(): use_count_( 1 ), weak_count_( 1 ) { } virtual ~sp_counted_base() // nothrow { } // dispose() is called when use_count_ drops to zero, to release // the resources managed by *this. virtual void dispose() = 0; // nothrow // destroy() is called when weak_count_ drops to zero. virtual void destroy() // nothrow { delete this; } virtual void * get_deleter( sp_typeinfo const & ti ) = 0; virtual void * get_untyped_deleter() = 0; void add_ref_copy() { atomic_increment( &use_count_ ); } bool add_ref_lock() // true on success { return atomic_conditional_increment( &use_count_ ) != 0; } void release() // nothrow { if( atomic_decrement( &use_count_ ) == 0 ) { dispose(); weak_release(); } } void weak_add_ref() // nothrow { atomic_increment( &weak_count_ ); } void weak_release() // nothrow { if( atomic_decrement( &weak_count_ ) == 0 ) { destroy(); } } long use_count() const // nothrow { return *const_cast(&use_count_); } }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_counted_impl.hpp000644 000765 000024 00000012676 12233035540 025330 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // detail/sp_counted_impl.hpp // // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. // Copyright 2004-2005 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include #if defined(BOOST_SP_USE_STD_ALLOCATOR) && defined(BOOST_SP_USE_QUICK_ALLOCATOR) # error BOOST_SP_USE_STD_ALLOCATOR and BOOST_SP_USE_QUICK_ALLOCATOR are incompatible. #endif #include #include #if defined(BOOST_SP_USE_QUICK_ALLOCATOR) #include #endif #if defined(BOOST_SP_USE_STD_ALLOCATOR) #include // std::allocator #endif #include // std::size_t namespace boost { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) void sp_scalar_constructor_hook( void * px, std::size_t size, void * pn ); void sp_scalar_destructor_hook( void * px, std::size_t size, void * pn ); #endif namespace detail { template class sp_counted_impl_p: public sp_counted_base { private: X * px_; sp_counted_impl_p( sp_counted_impl_p const & ); sp_counted_impl_p & operator= ( sp_counted_impl_p const & ); typedef sp_counted_impl_p this_type; public: explicit sp_counted_impl_p( X * px ): px_( px ) { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_scalar_constructor_hook( px, sizeof(X), this ); #endif } virtual void dispose() // nothrow { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_scalar_destructor_hook( px_, sizeof(X), this ); #endif boost::checked_delete( px_ ); } virtual void * get_deleter( detail::sp_typeinfo const & ) { return 0; } virtual void * get_untyped_deleter() { return 0; } #if defined(BOOST_SP_USE_STD_ALLOCATOR) void * operator new( std::size_t ) { return std::allocator().allocate( 1, static_cast(0) ); } void operator delete( void * p ) { std::allocator().deallocate( static_cast(p), 1 ); } #endif #if defined(BOOST_SP_USE_QUICK_ALLOCATOR) void * operator new( std::size_t ) { return quick_allocator::alloc(); } void operator delete( void * p ) { quick_allocator::dealloc( p ); } #endif }; // // Borland's Codeguard trips up over the -Vx- option here: // #ifdef __CODEGUARD__ # pragma option push -Vx- #endif template class sp_counted_impl_pd: public sp_counted_base { private: P ptr; // copy constructor must not throw D del; // copy constructor must not throw sp_counted_impl_pd( sp_counted_impl_pd const & ); sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & ); typedef sp_counted_impl_pd this_type; public: // pre: d(p) must not throw sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d ) { } sp_counted_impl_pd( P p ): ptr( p ), del() { } virtual void dispose() // nothrow { del( ptr ); } virtual void * get_deleter( detail::sp_typeinfo const & ti ) { return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast( del ): 0; } virtual void * get_untyped_deleter() { return &reinterpret_cast( del ); } #if defined(BOOST_SP_USE_STD_ALLOCATOR) void * operator new( std::size_t ) { return std::allocator().allocate( 1, static_cast(0) ); } void operator delete( void * p ) { std::allocator().deallocate( static_cast(p), 1 ); } #endif #if defined(BOOST_SP_USE_QUICK_ALLOCATOR) void * operator new( std::size_t ) { return quick_allocator::alloc(); } void operator delete( void * p ) { quick_allocator::dealloc( p ); } #endif }; template class sp_counted_impl_pda: public sp_counted_base { private: P p_; // copy constructor must not throw D d_; // copy constructor must not throw A a_; // copy constructor must not throw sp_counted_impl_pda( sp_counted_impl_pda const & ); sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & ); typedef sp_counted_impl_pda this_type; public: // pre: d( p ) must not throw sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a ) { } sp_counted_impl_pda( P p, A a ): p_( p ), d_(), a_( a ) { } virtual void dispose() // nothrow { d_( p_ ); } virtual void destroy() // nothrow { typedef typename A::template rebind< this_type >::other A2; A2 a2( a_ ); this->~this_type(); a2.deallocate( this, 1 ); } virtual void * get_deleter( detail::sp_typeinfo const & ti ) { return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast( d_ ): 0; } virtual void * get_untyped_deleter() { return &reinterpret_cast( d_ ); } }; #ifdef __CODEGUARD__ # pragma option pop #endif } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_forward.hpp000644 000765 000024 00000001425 12233035540 024300 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // detail/sp_forward.hpp // // Copyright 2008,2012 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt #include namespace boost { namespace detail { #if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) template< class T > T&& sp_forward( T & t ) BOOST_NOEXCEPT { return static_cast< T&& >( t ); } #endif } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_FORWARD_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_has_sync.hpp000644 000765 000024 00000002771 12233035540 024450 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // boost/smart_ptr/detail/sp_has_sync.hpp // // Copyright (c) 2008, 2009 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Defines the BOOST_SP_HAS_SYNC macro if the __sync_* intrinsics // are available. // #ifndef BOOST_SP_NO_SYNC #if defined( __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 ) # define BOOST_SP_HAS_SYNC #elif defined( __IBMCPP__ ) && ( __IBMCPP__ >= 1210 ) # define BOOST_SP_HAS_SYNC #elif defined( __GNUC__ ) && ( __GNUC__ * 100 + __GNUC_MINOR__ >= 401 ) #define BOOST_SP_HAS_SYNC #if defined( __arm__ ) || defined( __armel__ ) #undef BOOST_SP_HAS_SYNC #endif #if defined( __hppa ) || defined( __hppa__ ) #undef BOOST_SP_HAS_SYNC #endif #if defined( __m68k__ ) #undef BOOST_SP_HAS_SYNC #endif #if defined( __sh__ ) #undef BOOST_SP_HAS_SYNC #endif #if defined( __sparc__ ) #undef BOOST_SP_HAS_SYNC #endif #if defined( __INTEL_COMPILER ) && !defined( __ia64__ ) && ( __INTEL_COMPILER < 1110 ) #undef BOOST_SP_HAS_SYNC #endif #if defined(__PATHSCALE__) && ((__PATHCC__ == 4) && (__PATHCC_MINOR__ < 9)) #undef BOOST_SP_HAS_SYNC #endif #endif #endif // #ifndef BOOST_SP_NO_SYNC #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_HAS_SYNC_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/sp_if_array.hpp000644 000765 000024 00000001462 12233035540 024431 0ustar00honglistaff000000 000000 /* * Copyright (c) 2012 Glen Joseph Fernandes * glenfe at live dot com * * Distributed under the Boost Software License, * Version 1.0. (See accompanying file LICENSE_1_0.txt * or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SMART_PTR_DETAIL_SP_IF_ARRAY_HPP #define BOOST_SMART_PTR_DETAIL_SP_IF_ARRAY_HPP #include namespace boost { namespace detail { template struct sp_if_array; template struct sp_if_array { typedef boost::shared_ptr type; }; template struct sp_if_size_array; template struct sp_if_size_array { typedef boost::shared_ptr type; }; } } #endif passenger-4.0.37/ext/boost/smart_ptr/detail/sp_nullptr_t.hpp000644 000765 000024 00000001651 12233035540 024660 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // detail/sp_nullptr_t.hpp // // Copyright 2013 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt #include #include #if !defined( BOOST_NO_CXX11_NULLPTR ) namespace boost { namespace detail { #if defined( __clang__ ) && !defined( _LIBCPP_VERSION ) && !defined( BOOST_NO_CXX11_DECLTYPE ) typedef decltype(nullptr) sp_nullptr_t; #else typedef std::nullptr_t sp_nullptr_t; #endif } // namespace detail } // namespace boost #endif // !defined( BOOST_NO_CXX11_NULLPTR ) #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_NULLPTR_T_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/spinlock.hpp000644 000765 000024 00000002674 12233035540 023763 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // boost/detail/spinlock.hpp // // Copyright (c) 2008 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // struct spinlock // { // void lock(); // bool try_lock(); // void unlock(); // // class scoped_lock; // }; // // #define BOOST_DETAIL_SPINLOCK_INIT // #include #include #if defined( BOOST_SP_USE_PTHREADS ) # include #elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ ) # include #elif defined( BOOST_SP_HAS_SYNC ) # include #elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # include #elif defined(BOOST_HAS_PTHREADS) # include #elif !defined(BOOST_HAS_THREADS) # include #else # error Unrecognized threading platform #endif #endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/spinlock_gcc_arm.hpp000644 000765 000024 00000004672 12233035540 025436 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED // // Copyright (c) 2008, 2011 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7S__) # define BOOST_SP_ARM_BARRIER "dmb" # define BOOST_SP_ARM_HAS_LDREX #elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) # define BOOST_SP_ARM_BARRIER "mcr p15, 0, r0, c7, c10, 5" # define BOOST_SP_ARM_HAS_LDREX #else # define BOOST_SP_ARM_BARRIER "" #endif namespace boost { namespace detail { class spinlock { public: int v_; public: bool try_lock() { int r; #ifdef BOOST_SP_ARM_HAS_LDREX __asm__ __volatile__( "ldrex %0, [%2]; \n" "cmp %0, %1; \n" "strexne %0, %1, [%2]; \n" BOOST_SP_ARM_BARRIER : "=&r"( r ): // outputs "r"( 1 ), "r"( &v_ ): // inputs "memory", "cc" ); #else __asm__ __volatile__( "swp %0, %1, [%2];\n" BOOST_SP_ARM_BARRIER : "=&r"( r ): // outputs "r"( 1 ), "r"( &v_ ): // inputs "memory", "cc" ); #endif return r == 0; } void lock() { for( unsigned k = 0; !try_lock(); ++k ) { boost::detail::yield( k ); } } void unlock() { __asm__ __volatile__( BOOST_SP_ARM_BARRIER ::: "memory" ); *const_cast< int volatile* >( &v_ ) = 0; } public: class scoped_lock { private: spinlock & sp_; scoped_lock( scoped_lock const & ); scoped_lock & operator=( scoped_lock const & ); public: explicit scoped_lock( spinlock & sp ): sp_( sp ) { sp.lock(); } ~scoped_lock() { sp_.unlock(); } }; }; } // namespace detail } // namespace boost #define BOOST_DETAIL_SPINLOCK_INIT {0} #undef BOOST_SP_ARM_BARRIER #undef BOOST_SP_ARM_HAS_LDREX #endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_GCC_ARM_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/spinlock_nt.hpp000644 000765 000024 00000002670 12233035540 024460 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // Copyright (c) 2008 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include namespace boost { namespace detail { class spinlock { public: bool locked_; public: inline bool try_lock() { if( locked_ ) { return false; } else { locked_ = true; return true; } } inline void lock() { BOOST_ASSERT( !locked_ ); locked_ = true; } inline void unlock() { BOOST_ASSERT( locked_ ); locked_ = false; } public: class scoped_lock { private: spinlock & sp_; scoped_lock( scoped_lock const & ); scoped_lock & operator=( scoped_lock const & ); public: explicit scoped_lock( spinlock & sp ): sp_( sp ) { sp.lock(); } ~scoped_lock() { sp_.unlock(); } }; }; } // namespace detail } // namespace boost #define BOOST_DETAIL_SPINLOCK_INIT { false } #endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/spinlock_pool.hpp000644 000765 000024 00000005612 12233035540 025007 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_POOL_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SPINLOCK_POOL_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // boost/detail/spinlock_pool.hpp // // Copyright (c) 2008 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // spinlock_pool<0> is reserved for atomic<>, when/if it arrives // spinlock_pool<1> is reserved for shared_ptr reference counts // spinlock_pool<2> is reserved for shared_ptr atomic access // #include #include #include namespace boost { namespace detail { template< int I > class spinlock_pool { private: static spinlock pool_[ 41 ]; public: static spinlock & spinlock_for( void const * pv ) { #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 std::size_t i = reinterpret_cast< unsigned long long >( pv ) % 41; #else std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41; #endif return pool_[ i ]; } class scoped_lock { private: spinlock & sp_; scoped_lock( scoped_lock const & ); scoped_lock & operator=( scoped_lock const & ); public: explicit scoped_lock( void const * pv ): sp_( spinlock_for( pv ) ) { sp_.lock(); } ~scoped_lock() { sp_.unlock(); } }; }; template< int I > spinlock spinlock_pool< I >::pool_[ 41 ] = { BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT, BOOST_DETAIL_SPINLOCK_INIT }; } // namespace detail } // namespace boost #endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_POOL_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/spinlock_pt.hpp000644 000765 000024 00000002442 12233035540 024457 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_PT_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SPINLOCK_PT_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // Copyright (c) 2008 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include namespace boost { namespace detail { class spinlock { public: pthread_mutex_t v_; public: bool try_lock() { return pthread_mutex_trylock( &v_ ) == 0; } void lock() { pthread_mutex_lock( &v_ ); } void unlock() { pthread_mutex_unlock( &v_ ); } public: class scoped_lock { private: spinlock & sp_; scoped_lock( scoped_lock const & ); scoped_lock & operator=( scoped_lock const & ); public: explicit scoped_lock( spinlock & sp ): sp_( sp ) { sp.lock(); } ~scoped_lock() { sp_.unlock(); } }; }; } // namespace detail } // namespace boost #define BOOST_DETAIL_SPINLOCK_INIT { PTHREAD_MUTEX_INITIALIZER } #endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_PT_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/spinlock_sync.hpp000644 000765 000024 00000002723 12233035540 025012 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_SYNC_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_SPINLOCK_SYNC_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // Copyright (c) 2008 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #include #if defined( __ia64__ ) && defined( __INTEL_COMPILER ) # include #endif namespace boost { namespace detail { class spinlock { public: int v_; public: bool try_lock() { int r = __sync_lock_test_and_set( &v_, 1 ); return r == 0; } void lock() { for( unsigned k = 0; !try_lock(); ++k ) { boost::detail::yield( k ); } } void unlock() { __sync_lock_release( &v_ ); } public: class scoped_lock { private: spinlock & sp_; scoped_lock( scoped_lock const & ); scoped_lock & operator=( scoped_lock const & ); public: explicit scoped_lock( spinlock & sp ): sp_( sp ) { sp.lock(); } ~scoped_lock() { sp_.unlock(); } }; }; } // namespace detail } // namespace boost #define BOOST_DETAIL_SPINLOCK_INIT {0} #endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_SYNC_HPP_INCLUDED passenger-4.0.37/ext/boost/smart_ptr/detail/yield_k.hpp000644 000765 000024 00000004600 12233035540 023550 0ustar00honglistaff000000 000000 #ifndef BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED #define BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // yield_k.hpp // // Copyright (c) 2008 Peter Dimov // // void yield( unsigned k ); // // Typical use: // // for( unsigned k = 0; !try_lock(); ++k ) yield( k ); // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // #include // BOOST_SMT_PAUSE #if defined(_MSC_VER) && _MSC_VER >= 1310 && ( defined(_M_IX86) || defined(_M_X64) ) extern "C" void _mm_pause(); #pragma intrinsic( _mm_pause ) #define BOOST_SMT_PAUSE _mm_pause(); #elif defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) ) #define BOOST_SMT_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" ); #endif // #if defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) #if defined( BOOST_USE_WINDOWS_H ) # include #endif namespace boost { namespace detail { #if !defined( BOOST_USE_WINDOWS_H ) extern "C" void __stdcall Sleep( unsigned long ms ); #endif inline void yield( unsigned k ) { if( k < 4 ) { } #if defined( BOOST_SMT_PAUSE ) else if( k < 16 ) { BOOST_SMT_PAUSE } #endif else if( k < 32 ) { Sleep( 0 ); } else { Sleep( 1 ); } } } // namespace detail } // namespace boost #elif defined( BOOST_HAS_PTHREADS ) #include #include namespace boost { namespace detail { inline void yield( unsigned k ) { if( k < 4 ) { } #if defined( BOOST_SMT_PAUSE ) else if( k < 16 ) { BOOST_SMT_PAUSE } #endif else if( k < 32 || k & 1 ) { sched_yield(); } else { // g++ -Wextra warns on {} or {0} struct timespec rqtp = { 0, 0 }; // POSIX says that timespec has tv_sec and tv_nsec // But it doesn't guarantee order or placement rqtp.tv_sec = 0; rqtp.tv_nsec = 1000; nanosleep( &rqtp, 0 ); } } } // namespace detail } // namespace boost #else namespace boost { namespace detail { inline void yield( unsigned ) { } } // namespace detail } // namespace boost #endif #endif // #ifndef BOOST_SMART_PTR_DETAIL_YIELD_K_HPP_INCLUDED passenger-4.0.37/ext/boost/regex/concepts.hpp000644 000765 000024 00000126726 12233035540 021621 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE concepts.hpp * VERSION see * DESCRIPTION: Declares regular expression concepts. */ #ifndef BOOST_REGEX_CONCEPTS_HPP_INCLUDED #define BOOST_REGEX_CONCEPTS_HPP_INCLUDED #include #include #include #include #include #ifndef BOOST_TEST_TR1_REGEX #include #endif #include #include #include namespace boost{ // // bitmask_archetype: // this can be either an integer type, an enum, or a std::bitset, // we use the latter as the architype as it offers the "strictest" // of the possible interfaces: // typedef std::bitset<512> bitmask_archetype; // // char_architype: // A strict model for the character type interface. // struct char_architype { // default constructable: char_architype(); // copy constructable / assignable: char_architype(const char_architype&); char_architype& operator=(const char_architype&); // constructable from an integral value: char_architype(unsigned long val); // comparable: bool operator==(const char_architype&)const; bool operator!=(const char_architype&)const; bool operator<(const char_architype&)const; bool operator<=(const char_architype&)const; bool operator>=(const char_architype&)const; bool operator>(const char_architype&)const; // conversion to integral type: operator long()const; }; inline long hash_value(char_architype val) { return val; } // // char_architype can not be used with basic_string: // } // namespace boost namespace std{ template<> struct char_traits { // The intent is that this template is not instantiated, // but this typedef gives us a chance of compilation in // case it is: typedef boost::char_architype char_type; }; } // // Allocator architype: // template class allocator_architype { public: typedef T* pointer; typedef const T* const_pointer; typedef T& reference; typedef const T& const_reference; typedef T value_type; typedef unsigned size_type; typedef int difference_type; template struct rebind { typedef allocator_architype other; }; pointer address(reference r); const_pointer address(const_reference r); pointer allocate(size_type); pointer allocate(size_type, pointer); void deallocate(pointer, size_type); size_type max_size()const; allocator_architype(); allocator_architype(const allocator_architype&); template allocator_architype(const allocator_architype&); void construct(pointer, const_reference); void destroy(pointer); }; template bool operator == (const allocator_architype&, const allocator_architype&); template bool operator != (const allocator_architype&, const allocator_architype&); namespace boost{ // // regex_traits_architype: // A strict interpretation of the regular expression traits class requirements. // template struct regex_traits_architype { public: regex_traits_architype(); typedef charT char_type; // typedef std::size_t size_type; typedef std::vector string_type; typedef copy_constructible_archetype > locale_type; typedef bitmask_archetype char_class_type; static std::size_t length(const char_type* ) { return 0; } charT translate(charT ) const { return charT(); } charT translate_nocase(charT ) const { return static_object::get(); } template string_type transform(ForwardIterator , ForwardIterator ) const { return static_object::get(); } template string_type transform_primary(ForwardIterator , ForwardIterator ) const { return static_object::get(); } template char_class_type lookup_classname(ForwardIterator , ForwardIterator ) const { return static_object::get(); } template string_type lookup_collatename(ForwardIterator , ForwardIterator ) const { return static_object::get(); } bool isctype(charT, char_class_type) const { return false; } int value(charT, int) const { return 0; } locale_type imbue(locale_type l) { return l; } locale_type getloc()const { return static_object::get(); } private: // this type is not copyable: regex_traits_architype(const regex_traits_architype&); regex_traits_architype& operator=(const regex_traits_architype&); }; // // alter this to std::tr1, to test a std implementation: // #ifndef BOOST_TEST_TR1_REGEX namespace global_regex_namespace = ::boost; #else namespace global_regex_namespace = ::std::tr1; #endif template struct BitmaskConcept { void constraints() { function_requires >(); function_requires >(); m_mask1 = m_mask2 | m_mask3; m_mask1 = m_mask2 & m_mask3; m_mask1 = m_mask2 ^ m_mask3; m_mask1 = ~m_mask2; m_mask1 |= m_mask2; m_mask1 &= m_mask2; m_mask1 ^= m_mask2; } Bitmask m_mask1, m_mask2, m_mask3; }; template struct RegexTraitsConcept { RegexTraitsConcept(); // required typedefs: typedef typename traits::char_type char_type; // typedef typename traits::size_type size_type; typedef typename traits::string_type string_type; typedef typename traits::locale_type locale_type; typedef typename traits::char_class_type char_class_type; void constraints() { //function_requires >(); function_requires >(); function_requires >(); function_requires >(); function_requires >(); function_requires >(); std::size_t n = traits::length(m_pointer); ignore_unused_variable_warning(n); char_type c = m_ctraits.translate(m_char); ignore_unused_variable_warning(c); c = m_ctraits.translate_nocase(m_char); //string_type::foobar bar; string_type s1 = m_ctraits.transform(m_pointer, m_pointer); ignore_unused_variable_warning(s1); string_type s2 = m_ctraits.transform_primary(m_pointer, m_pointer); ignore_unused_variable_warning(s2); char_class_type cc = m_ctraits.lookup_classname(m_pointer, m_pointer); ignore_unused_variable_warning(cc); string_type s3 = m_ctraits.lookup_collatename(m_pointer, m_pointer); ignore_unused_variable_warning(s3); bool b = m_ctraits.isctype(m_char, cc); ignore_unused_variable_warning(b); int v = m_ctraits.value(m_char, 16); ignore_unused_variable_warning(v); locale_type l(m_ctraits.getloc()); m_traits.imbue(l); ignore_unused_variable_warning(l); } traits m_traits; const traits m_ctraits; const char_type* m_pointer; char_type m_char; private: RegexTraitsConcept& operator=(RegexTraitsConcept&); }; // // helper class to compute what traits class a regular expression type is using: // template struct regex_traits_computer; template struct regex_traits_computer< global_regex_namespace::basic_regex > { typedef traits type; }; // // BaseRegexConcept does not test anything dependent on basic_string, // in case our charT does not have an associated char_traits: // template struct BaseRegexConcept { typedef typename Regex::value_type value_type; //typedef typename Regex::size_type size_type; typedef typename Regex::flag_type flag_type; typedef typename Regex::locale_type locale_type; typedef input_iterator_archetype input_iterator_type; // derived test types: typedef const value_type* pointer_type; typedef bidirectional_iterator_archetype BidiIterator; typedef global_regex_namespace::sub_match sub_match_type; typedef global_regex_namespace::match_results > match_results_type; typedef global_regex_namespace::match_results match_results_default_type; typedef output_iterator_archetype OutIterator; typedef typename regex_traits_computer::type traits_type; typedef global_regex_namespace::regex_iterator regex_iterator_type; typedef global_regex_namespace::regex_token_iterator regex_token_iterator_type; void global_constraints() { // // test non-template components: // function_requires >(); global_regex_namespace::regex_constants::syntax_option_type opts = global_regex_namespace::regex_constants::icase | global_regex_namespace::regex_constants::nosubs | global_regex_namespace::regex_constants::optimize | global_regex_namespace::regex_constants::collate | global_regex_namespace::regex_constants::ECMAScript | global_regex_namespace::regex_constants::basic | global_regex_namespace::regex_constants::extended | global_regex_namespace::regex_constants::awk | global_regex_namespace::regex_constants::grep | global_regex_namespace::regex_constants::egrep; ignore_unused_variable_warning(opts); function_requires >(); global_regex_namespace::regex_constants::match_flag_type mopts = global_regex_namespace::regex_constants::match_default | global_regex_namespace::regex_constants::match_not_bol | global_regex_namespace::regex_constants::match_not_eol | global_regex_namespace::regex_constants::match_not_bow | global_regex_namespace::regex_constants::match_not_eow | global_regex_namespace::regex_constants::match_any | global_regex_namespace::regex_constants::match_not_null | global_regex_namespace::regex_constants::match_continuous | global_regex_namespace::regex_constants::match_prev_avail | global_regex_namespace::regex_constants::format_default | global_regex_namespace::regex_constants::format_sed | global_regex_namespace::regex_constants::format_no_copy | global_regex_namespace::regex_constants::format_first_only; ignore_unused_variable_warning(mopts); BOOST_STATIC_ASSERT((::boost::is_enum::value)); global_regex_namespace::regex_constants::error_type e1 = global_regex_namespace::regex_constants::error_collate; ignore_unused_variable_warning(e1); e1 = global_regex_namespace::regex_constants::error_ctype; ignore_unused_variable_warning(e1); e1 = global_regex_namespace::regex_constants::error_escape; ignore_unused_variable_warning(e1); e1 = global_regex_namespace::regex_constants::error_backref; ignore_unused_variable_warning(e1); e1 = global_regex_namespace::regex_constants::error_brack; ignore_unused_variable_warning(e1); e1 = global_regex_namespace::regex_constants::error_paren; ignore_unused_variable_warning(e1); e1 = global_regex_namespace::regex_constants::error_brace; ignore_unused_variable_warning(e1); e1 = global_regex_namespace::regex_constants::error_badbrace; ignore_unused_variable_warning(e1); e1 = global_regex_namespace::regex_constants::error_range; ignore_unused_variable_warning(e1); e1 = global_regex_namespace::regex_constants::error_space; ignore_unused_variable_warning(e1); e1 = global_regex_namespace::regex_constants::error_badrepeat; ignore_unused_variable_warning(e1); e1 = global_regex_namespace::regex_constants::error_complexity; ignore_unused_variable_warning(e1); e1 = global_regex_namespace::regex_constants::error_stack; ignore_unused_variable_warning(e1); BOOST_STATIC_ASSERT((::boost::is_base_and_derived::value )); const global_regex_namespace::regex_error except(e1); e1 = except.code(); typedef typename Regex::value_type regex_value_type; function_requires< RegexTraitsConcept > >(); function_requires< BaseRegexConcept > >(); } void constraints() { global_constraints(); BOOST_STATIC_ASSERT((::boost::is_same< flag_type, global_regex_namespace::regex_constants::syntax_option_type>::value)); flag_type opts = Regex::icase | Regex::nosubs | Regex::optimize | Regex::collate | Regex::ECMAScript | Regex::basic | Regex::extended | Regex::awk | Regex::grep | Regex::egrep; ignore_unused_variable_warning(opts); function_requires >(); function_requires >(); // Regex constructors: Regex e1(m_pointer); ignore_unused_variable_warning(e1); Regex e2(m_pointer, m_flags); ignore_unused_variable_warning(e2); Regex e3(m_pointer, m_size, m_flags); ignore_unused_variable_warning(e3); Regex e4(in1, in2); ignore_unused_variable_warning(e4); Regex e5(in1, in2, m_flags); ignore_unused_variable_warning(e5); // assign etc: Regex e; e = m_pointer; e = e1; e.assign(e1); e.assign(m_pointer); e.assign(m_pointer, m_flags); e.assign(m_pointer, m_size, m_flags); e.assign(in1, in2); e.assign(in1, in2, m_flags); // access: const Regex ce; typename Regex::size_type i = ce.mark_count(); ignore_unused_variable_warning(i); m_flags = ce.flags(); e.imbue(ce.getloc()); e.swap(e1); global_regex_namespace::swap(e, e1); // sub_match: BOOST_STATIC_ASSERT((::boost::is_base_and_derived, sub_match_type>::value)); typedef typename sub_match_type::value_type sub_value_type; typedef typename sub_match_type::difference_type sub_diff_type; typedef typename sub_match_type::iterator sub_iter_type; BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_same::value)); bool b = m_sub.matched; ignore_unused_variable_warning(b); BidiIterator bi = m_sub.first; ignore_unused_variable_warning(bi); bi = m_sub.second; ignore_unused_variable_warning(bi); sub_diff_type diff = m_sub.length(); ignore_unused_variable_warning(diff); // match_results tests: typedef typename match_results_type::value_type mr_value_type; typedef typename match_results_type::const_reference mr_const_reference; typedef typename match_results_type::reference mr_reference; typedef typename match_results_type::const_iterator mr_const_iterator; typedef typename match_results_type::iterator mr_iterator; typedef typename match_results_type::difference_type mr_difference_type; typedef typename match_results_type::size_type mr_size_type; typedef typename match_results_type::allocator_type mr_allocator_type; typedef typename match_results_type::char_type mr_char_type; typedef typename match_results_type::string_type mr_string_type; match_results_type m1; mr_allocator_type at; match_results_type m2(at); match_results_type m3(m1); m1 = m2; int ival = 0; mr_size_type mrs = m_cresults.size(); ignore_unused_variable_warning(mrs); mrs = m_cresults.max_size(); ignore_unused_variable_warning(mrs); b = m_cresults.empty(); ignore_unused_variable_warning(b); mr_difference_type mrd = m_cresults.length(); ignore_unused_variable_warning(mrd); mrd = m_cresults.length(ival); ignore_unused_variable_warning(mrd); mrd = m_cresults.position(); ignore_unused_variable_warning(mrd); mrd = m_cresults.position(mrs); ignore_unused_variable_warning(mrd); mr_const_reference mrcr = m_cresults[ival]; ignore_unused_variable_warning(mrcr); mr_const_reference mrcr2 = m_cresults.prefix(); ignore_unused_variable_warning(mrcr2); mr_const_reference mrcr3 = m_cresults.suffix(); ignore_unused_variable_warning(mrcr3); mr_const_iterator mrci = m_cresults.begin(); ignore_unused_variable_warning(mrci); mrci = m_cresults.end(); ignore_unused_variable_warning(mrci); mr_allocator_type at2 = m_cresults.get_allocator(); m_results.swap(m_results); global_regex_namespace::swap(m_results, m_results); // regex_match: b = global_regex_namespace::regex_match(m_in, m_in, m_results, e); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_match(m_in, m_in, m_results, e, m_mft); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_match(m_in, m_in, e); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_match(m_in, m_in, e, m_mft); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_match(m_pointer, m_pmatch, e); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_match(m_pointer, m_pmatch, e, m_mft); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_match(m_pointer, e); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_match(m_pointer, e, m_mft); ignore_unused_variable_warning(b); // regex_search: b = global_regex_namespace::regex_search(m_in, m_in, m_results, e); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_search(m_in, m_in, m_results, e, m_mft); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_search(m_in, m_in, e); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_search(m_in, m_in, e, m_mft); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_search(m_pointer, m_pmatch, e); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_search(m_pointer, m_pmatch, e, m_mft); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_search(m_pointer, e); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_search(m_pointer, e, m_mft); ignore_unused_variable_warning(b); // regex_iterator: typedef typename regex_iterator_type::regex_type rit_regex_type; typedef typename regex_iterator_type::value_type rit_value_type; typedef typename regex_iterator_type::difference_type rit_difference_type; typedef typename regex_iterator_type::pointer rit_pointer; typedef typename regex_iterator_type::reference rit_reference; typedef typename regex_iterator_type::iterator_category rit_iterator_category; BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_convertible::value)); // this takes care of most of the checks needed: function_requires >(); regex_iterator_type iter1(m_in, m_in, e); ignore_unused_variable_warning(iter1); regex_iterator_type iter2(m_in, m_in, e, m_mft); ignore_unused_variable_warning(iter2); // regex_token_iterator: typedef typename regex_token_iterator_type::regex_type rtit_regex_type; typedef typename regex_token_iterator_type::value_type rtit_value_type; typedef typename regex_token_iterator_type::difference_type rtit_difference_type; typedef typename regex_token_iterator_type::pointer rtit_pointer; typedef typename regex_token_iterator_type::reference rtit_reference; typedef typename regex_token_iterator_type::iterator_category rtit_iterator_category; BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_same::value)); BOOST_STATIC_ASSERT((::boost::is_convertible::value)); // this takes care of most of the checks needed: function_requires >(); regex_token_iterator_type ti1(m_in, m_in, e); ignore_unused_variable_warning(ti1); regex_token_iterator_type ti2(m_in, m_in, e, 0); ignore_unused_variable_warning(ti2); regex_token_iterator_type ti3(m_in, m_in, e, 0, m_mft); ignore_unused_variable_warning(ti3); std::vector subs; regex_token_iterator_type ti4(m_in, m_in, e, subs); ignore_unused_variable_warning(ti4); regex_token_iterator_type ti5(m_in, m_in, e, subs, m_mft); ignore_unused_variable_warning(ti5); static const int i_array[3] = { 1, 2, 3, }; regex_token_iterator_type ti6(m_in, m_in, e, i_array); ignore_unused_variable_warning(ti6); regex_token_iterator_type ti7(m_in, m_in, e, i_array, m_mft); ignore_unused_variable_warning(ti7); } pointer_type m_pointer; flag_type m_flags; std::size_t m_size; input_iterator_type in1, in2; const sub_match_type m_sub; const value_type m_char; match_results_type m_results; const match_results_type m_cresults; OutIterator m_out; BidiIterator m_in; global_regex_namespace::regex_constants::match_flag_type m_mft; global_regex_namespace::match_results< pointer_type, allocator_architype > > m_pmatch; BaseRegexConcept(); BaseRegexConcept(const BaseRegexConcept&); BaseRegexConcept& operator=(const BaseRegexConcept&); }; // // RegexConcept: // Test every interface in the std: // template struct RegexConcept { typedef typename Regex::value_type value_type; //typedef typename Regex::size_type size_type; typedef typename Regex::flag_type flag_type; typedef typename Regex::locale_type locale_type; // derived test types: typedef const value_type* pointer_type; typedef std::basic_string string_type; typedef boost::bidirectional_iterator_archetype BidiIterator; typedef global_regex_namespace::sub_match sub_match_type; typedef global_regex_namespace::match_results > match_results_type; typedef output_iterator_archetype OutIterator; void constraints() { function_requires >(); // string based construct: Regex e1(m_string); ignore_unused_variable_warning(e1); Regex e2(m_string, m_flags); ignore_unused_variable_warning(e2); // assign etc: Regex e; e = m_string; e.assign(m_string); e.assign(m_string, m_flags); // sub_match: string_type s(m_sub); ignore_unused_variable_warning(s); s = m_sub.str(); ignore_unused_variable_warning(s); int i = m_sub.compare(m_string); ignore_unused_variable_warning(i); int i2 = m_sub.compare(m_sub); ignore_unused_variable_warning(i2); i2 = m_sub.compare(m_pointer); ignore_unused_variable_warning(i2); bool b = m_sub == m_sub; ignore_unused_variable_warning(b); b = m_sub != m_sub; ignore_unused_variable_warning(b); b = m_sub <= m_sub; ignore_unused_variable_warning(b); b = m_sub <= m_sub; ignore_unused_variable_warning(b); b = m_sub > m_sub; ignore_unused_variable_warning(b); b = m_sub >= m_sub; ignore_unused_variable_warning(b); b = m_sub == m_pointer; ignore_unused_variable_warning(b); b = m_sub != m_pointer; ignore_unused_variable_warning(b); b = m_sub <= m_pointer; ignore_unused_variable_warning(b); b = m_sub <= m_pointer; ignore_unused_variable_warning(b); b = m_sub > m_pointer; ignore_unused_variable_warning(b); b = m_sub >= m_pointer; ignore_unused_variable_warning(b); b = m_pointer == m_sub; ignore_unused_variable_warning(b); b = m_pointer != m_sub; ignore_unused_variable_warning(b); b = m_pointer <= m_sub; ignore_unused_variable_warning(b); b = m_pointer <= m_sub; ignore_unused_variable_warning(b); b = m_pointer > m_sub; ignore_unused_variable_warning(b); b = m_pointer >= m_sub; ignore_unused_variable_warning(b); b = m_sub == m_char; ignore_unused_variable_warning(b); b = m_sub != m_char; ignore_unused_variable_warning(b); b = m_sub <= m_char; ignore_unused_variable_warning(b); b = m_sub <= m_char; ignore_unused_variable_warning(b); b = m_sub > m_char; ignore_unused_variable_warning(b); b = m_sub >= m_char; ignore_unused_variable_warning(b); b = m_char == m_sub; ignore_unused_variable_warning(b); b = m_char != m_sub; ignore_unused_variable_warning(b); b = m_char <= m_sub; ignore_unused_variable_warning(b); b = m_char <= m_sub; ignore_unused_variable_warning(b); b = m_char > m_sub; ignore_unused_variable_warning(b); b = m_char >= m_sub; ignore_unused_variable_warning(b); b = m_sub == m_string; ignore_unused_variable_warning(b); b = m_sub != m_string; ignore_unused_variable_warning(b); b = m_sub <= m_string; ignore_unused_variable_warning(b); b = m_sub <= m_string; ignore_unused_variable_warning(b); b = m_sub > m_string; ignore_unused_variable_warning(b); b = m_sub >= m_string; ignore_unused_variable_warning(b); b = m_string == m_sub; ignore_unused_variable_warning(b); b = m_string != m_sub; ignore_unused_variable_warning(b); b = m_string <= m_sub; ignore_unused_variable_warning(b); b = m_string <= m_sub; ignore_unused_variable_warning(b); b = m_string > m_sub; ignore_unused_variable_warning(b); b = m_string >= m_sub; ignore_unused_variable_warning(b); // match results: m_string = m_results.str(); ignore_unused_variable_warning(m_string); m_string = m_results.str(0); ignore_unused_variable_warning(m_string); m_out = m_cresults.format(m_out, m_string); m_out = m_cresults.format(m_out, m_string, m_mft); m_string = m_cresults.format(m_string); ignore_unused_variable_warning(m_string); m_string = m_cresults.format(m_string, m_mft); ignore_unused_variable_warning(m_string); // regex_match: b = global_regex_namespace::regex_match(m_string, m_smatch, e); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_match(m_string, m_smatch, e, m_mft); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_match(m_string, e); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_match(m_string, e, m_mft); ignore_unused_variable_warning(b); // regex_search: b = global_regex_namespace::regex_search(m_string, m_smatch, e); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_search(m_string, m_smatch, e, m_mft); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_search(m_string, e); ignore_unused_variable_warning(b); b = global_regex_namespace::regex_search(m_string, e, m_mft); ignore_unused_variable_warning(b); // regex_replace: m_out = global_regex_namespace::regex_replace(m_out, m_in, m_in, e, m_string, m_mft); m_out = global_regex_namespace::regex_replace(m_out, m_in, m_in, e, m_string); m_string = global_regex_namespace::regex_replace(m_string, e, m_string, m_mft); ignore_unused_variable_warning(m_string); m_string = global_regex_namespace::regex_replace(m_string, e, m_string); ignore_unused_variable_warning(m_string); } flag_type m_flags; string_type m_string; const sub_match_type m_sub; match_results_type m_results; pointer_type m_pointer; value_type m_char; const match_results_type m_cresults; OutIterator m_out; BidiIterator m_in; global_regex_namespace::regex_constants::match_flag_type m_mft; global_regex_namespace::match_results > > m_smatch; RegexConcept(); RegexConcept(const RegexConcept&); RegexConcept& operator=(const RegexConcept&); }; #ifndef BOOST_REGEX_TEST_STD template struct functor1 { typedef typename M::char_type char_type; const char_type* operator()(const M&)const { static const char_type c = static_cast(0); return &c; } }; template struct functor1b { typedef typename M::char_type char_type; std::vector operator()(const M&)const { static const std::vector c; return c; } }; template struct functor2 { template O operator()(const M& /*m*/, O i)const { return i; } }; template struct functor3 { template O operator()(const M& /*m*/, O i, regex_constants::match_flag_type)const { return i; } }; // // BoostRegexConcept: // Test every interface in the Boost implementation: // template struct BoostRegexConcept { typedef typename Regex::value_type value_type; typedef typename Regex::size_type size_type; typedef typename Regex::flag_type flag_type; typedef typename Regex::locale_type locale_type; // derived test types: typedef const value_type* pointer_type; typedef std::basic_string string_type; typedef typename Regex::const_iterator const_iterator; typedef bidirectional_iterator_archetype BidiIterator; typedef output_iterator_archetype OutputIterator; typedef global_regex_namespace::sub_match sub_match_type; typedef global_regex_namespace::match_results > match_results_type; typedef global_regex_namespace::match_results match_results_default_type; void constraints() { global_regex_namespace::regex_constants::match_flag_type mopts = global_regex_namespace::regex_constants::match_default | global_regex_namespace::regex_constants::match_not_bol | global_regex_namespace::regex_constants::match_not_eol | global_regex_namespace::regex_constants::match_not_bow | global_regex_namespace::regex_constants::match_not_eow | global_regex_namespace::regex_constants::match_any | global_regex_namespace::regex_constants::match_not_null | global_regex_namespace::regex_constants::match_continuous | global_regex_namespace::regex_constants::match_partial | global_regex_namespace::regex_constants::match_prev_avail | global_regex_namespace::regex_constants::format_default | global_regex_namespace::regex_constants::format_sed | global_regex_namespace::regex_constants::format_perl | global_regex_namespace::regex_constants::format_no_copy | global_regex_namespace::regex_constants::format_first_only; (void)mopts; function_requires >(); const global_regex_namespace::regex_error except(global_regex_namespace::regex_constants::error_collate); std::ptrdiff_t pt = except.position(); ignore_unused_variable_warning(pt); const Regex ce, ce2; #ifndef BOOST_NO_STD_LOCALE m_stream << ce; #endif unsigned i = ce.error_code(); ignore_unused_variable_warning(i); pointer_type p = ce.expression(); ignore_unused_variable_warning(p); int i2 = ce.compare(ce2); ignore_unused_variable_warning(i2); bool b = ce == ce2; ignore_unused_variable_warning(b); b = ce.empty(); ignore_unused_variable_warning(b); b = ce != ce2; ignore_unused_variable_warning(b); b = ce < ce2; ignore_unused_variable_warning(b); b = ce > ce2; ignore_unused_variable_warning(b); b = ce <= ce2; ignore_unused_variable_warning(b); b = ce >= ce2; ignore_unused_variable_warning(b); i = ce.status(); ignore_unused_variable_warning(i); size_type s = ce.max_size(); ignore_unused_variable_warning(s); s = ce.size(); ignore_unused_variable_warning(s); const_iterator pi = ce.begin(); ignore_unused_variable_warning(pi); pi = ce.end(); ignore_unused_variable_warning(pi); string_type s2 = ce.str(); ignore_unused_variable_warning(s2); m_string = m_sub + m_sub; ignore_unused_variable_warning(m_string); m_string = m_sub + m_pointer; ignore_unused_variable_warning(m_string); m_string = m_pointer + m_sub; ignore_unused_variable_warning(m_string); m_string = m_sub + m_string; ignore_unused_variable_warning(m_string); m_string = m_string + m_sub; ignore_unused_variable_warning(m_string); m_string = m_sub + m_char; ignore_unused_variable_warning(m_string); m_string = m_char + m_sub; ignore_unused_variable_warning(m_string); // Named sub-expressions: m_sub = m_cresults[&m_char]; ignore_unused_variable_warning(m_sub); m_sub = m_cresults[m_string]; ignore_unused_variable_warning(m_sub); m_sub = m_cresults[""]; ignore_unused_variable_warning(m_sub); m_sub = m_cresults[std::string("")]; ignore_unused_variable_warning(m_sub); m_string = m_cresults.str(&m_char); ignore_unused_variable_warning(m_string); m_string = m_cresults.str(m_string); ignore_unused_variable_warning(m_string); m_string = m_cresults.str(""); ignore_unused_variable_warning(m_string); m_string = m_cresults.str(std::string("")); ignore_unused_variable_warning(m_string); typename match_results_type::difference_type diff; diff = m_cresults.length(&m_char); ignore_unused_variable_warning(diff); diff = m_cresults.length(m_string); ignore_unused_variable_warning(diff); diff = m_cresults.length(""); ignore_unused_variable_warning(diff); diff = m_cresults.length(std::string("")); ignore_unused_variable_warning(diff); diff = m_cresults.position(&m_char); ignore_unused_variable_warning(diff); diff = m_cresults.position(m_string); ignore_unused_variable_warning(diff); diff = m_cresults.position(""); ignore_unused_variable_warning(diff); diff = m_cresults.position(std::string("")); ignore_unused_variable_warning(diff); #ifndef BOOST_NO_STD_LOCALE m_stream << m_sub; m_stream << m_cresults; #endif // // Extended formatting with a functor: // regex_constants::match_flag_type f = regex_constants::match_default; OutputIterator out = static_object::get(); functor3 func3; functor2 func2; functor1 func1; functor3 func3b; functor2 func2b; functor1 func1b; out = regex_format(out, m_cresults, func3b, f); out = regex_format(out, m_cresults, func3b); out = regex_format(out, m_cresults, func2b, f); out = regex_format(out, m_cresults, func2b); out = regex_format(out, m_cresults, func1b, f); out = regex_format(out, m_cresults, func1b); out = regex_format(out, m_cresults, boost::ref(func3b), f); out = regex_format(out, m_cresults, boost::ref(func3b)); out = regex_format(out, m_cresults, boost::ref(func2b), f); out = regex_format(out, m_cresults, boost::ref(func2b)); out = regex_format(out, m_cresults, boost::ref(func1b), f); out = regex_format(out, m_cresults, boost::ref(func1b)); out = regex_format(out, m_cresults, boost::cref(func3b), f); out = regex_format(out, m_cresults, boost::cref(func3b)); out = regex_format(out, m_cresults, boost::cref(func2b), f); out = regex_format(out, m_cresults, boost::cref(func2b)); out = regex_format(out, m_cresults, boost::cref(func1b), f); out = regex_format(out, m_cresults, boost::cref(func1b)); m_string += regex_format(m_cresults, func3b, f); m_string += regex_format(m_cresults, func3b); m_string += regex_format(m_cresults, func2b, f); m_string += regex_format(m_cresults, func2b); m_string += regex_format(m_cresults, func1b, f); m_string += regex_format(m_cresults, func1b); m_string += regex_format(m_cresults, boost::ref(func3b), f); m_string += regex_format(m_cresults, boost::ref(func3b)); m_string += regex_format(m_cresults, boost::ref(func2b), f); m_string += regex_format(m_cresults, boost::ref(func2b)); m_string += regex_format(m_cresults, boost::ref(func1b), f); m_string += regex_format(m_cresults, boost::ref(func1b)); m_string += regex_format(m_cresults, boost::cref(func3b), f); m_string += regex_format(m_cresults, boost::cref(func3b)); m_string += regex_format(m_cresults, boost::cref(func2b), f); m_string += regex_format(m_cresults, boost::cref(func2b)); m_string += regex_format(m_cresults, boost::cref(func1b), f); m_string += regex_format(m_cresults, boost::cref(func1b)); out = m_cresults.format(out, func3b, f); out = m_cresults.format(out, func3b); out = m_cresults.format(out, func2b, f); out = m_cresults.format(out, func2b); out = m_cresults.format(out, func1b, f); out = m_cresults.format(out, func1b); out = m_cresults.format(out, boost::ref(func3b), f); out = m_cresults.format(out, boost::ref(func3b)); out = m_cresults.format(out, boost::ref(func2b), f); out = m_cresults.format(out, boost::ref(func2b)); out = m_cresults.format(out, boost::ref(func1b), f); out = m_cresults.format(out, boost::ref(func1b)); out = m_cresults.format(out, boost::cref(func3b), f); out = m_cresults.format(out, boost::cref(func3b)); out = m_cresults.format(out, boost::cref(func2b), f); out = m_cresults.format(out, boost::cref(func2b)); out = m_cresults.format(out, boost::cref(func1b), f); out = m_cresults.format(out, boost::cref(func1b)); m_string += m_cresults.format(func3b, f); m_string += m_cresults.format(func3b); m_string += m_cresults.format(func2b, f); m_string += m_cresults.format(func2b); m_string += m_cresults.format(func1b, f); m_string += m_cresults.format(func1b); m_string += m_cresults.format(boost::ref(func3b), f); m_string += m_cresults.format(boost::ref(func3b)); m_string += m_cresults.format(boost::ref(func2b), f); m_string += m_cresults.format(boost::ref(func2b)); m_string += m_cresults.format(boost::ref(func1b), f); m_string += m_cresults.format(boost::ref(func1b)); m_string += m_cresults.format(boost::cref(func3b), f); m_string += m_cresults.format(boost::cref(func3b)); m_string += m_cresults.format(boost::cref(func2b), f); m_string += m_cresults.format(boost::cref(func2b)); m_string += m_cresults.format(boost::cref(func1b), f); m_string += m_cresults.format(boost::cref(func1b)); out = regex_replace(out, m_in, m_in, ce, func3, f); out = regex_replace(out, m_in, m_in, ce, func3); out = regex_replace(out, m_in, m_in, ce, func2, f); out = regex_replace(out, m_in, m_in, ce, func2); out = regex_replace(out, m_in, m_in, ce, func1, f); out = regex_replace(out, m_in, m_in, ce, func1); out = regex_replace(out, m_in, m_in, ce, boost::ref(func3), f); out = regex_replace(out, m_in, m_in, ce, boost::ref(func3)); out = regex_replace(out, m_in, m_in, ce, boost::ref(func2), f); out = regex_replace(out, m_in, m_in, ce, boost::ref(func2)); out = regex_replace(out, m_in, m_in, ce, boost::ref(func1), f); out = regex_replace(out, m_in, m_in, ce, boost::ref(func1)); out = regex_replace(out, m_in, m_in, ce, boost::cref(func3), f); out = regex_replace(out, m_in, m_in, ce, boost::cref(func3)); out = regex_replace(out, m_in, m_in, ce, boost::cref(func2), f); out = regex_replace(out, m_in, m_in, ce, boost::cref(func2)); out = regex_replace(out, m_in, m_in, ce, boost::cref(func1), f); out = regex_replace(out, m_in, m_in, ce, boost::cref(func1)); functor3 > func3s; functor2 > func2s; functor1 > func1s; m_string += regex_replace(m_string, ce, func3s, f); m_string += regex_replace(m_string, ce, func3s); m_string += regex_replace(m_string, ce, func2s, f); m_string += regex_replace(m_string, ce, func2s); m_string += regex_replace(m_string, ce, func1s, f); m_string += regex_replace(m_string, ce, func1s); m_string += regex_replace(m_string, ce, boost::ref(func3s), f); m_string += regex_replace(m_string, ce, boost::ref(func3s)); m_string += regex_replace(m_string, ce, boost::ref(func2s), f); m_string += regex_replace(m_string, ce, boost::ref(func2s)); m_string += regex_replace(m_string, ce, boost::ref(func1s), f); m_string += regex_replace(m_string, ce, boost::ref(func1s)); m_string += regex_replace(m_string, ce, boost::cref(func3s), f); m_string += regex_replace(m_string, ce, boost::cref(func3s)); m_string += regex_replace(m_string, ce, boost::cref(func2s), f); m_string += regex_replace(m_string, ce, boost::cref(func2s)); m_string += regex_replace(m_string, ce, boost::cref(func1s), f); m_string += regex_replace(m_string, ce, boost::cref(func1s)); } std::basic_ostream m_stream; sub_match_type m_sub; pointer_type m_pointer; string_type m_string; const value_type m_char; match_results_type m_results; const match_results_type m_cresults; BidiIterator m_in; BoostRegexConcept(); BoostRegexConcept(const BoostRegexConcept&); BoostRegexConcept& operator=(const BoostRegexConcept&); }; #endif // BOOST_REGEX_TEST_STD } #endif passenger-4.0.37/ext/boost/regex/config/000755 000765 000024 00000000000 12233035540 020521 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/regex/config.hpp000644 000765 000024 00000031323 12233035540 021234 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE config.hpp * VERSION see * DESCRIPTION: regex extended config setup. */ #ifndef BOOST_REGEX_CONFIG_HPP #define BOOST_REGEX_CONFIG_HPP /* * Borland C++ Fix/error check * this has to go *before* we include any std lib headers: */ #if defined(__BORLANDC__) # include #endif /***************************************************************************** * * Include all the headers we need here: * ****************************************************************************/ #ifdef __cplusplus # ifndef BOOST_REGEX_USER_CONFIG # define BOOST_REGEX_USER_CONFIG # endif # include BOOST_REGEX_USER_CONFIG # include #else /* * C build, * don't include because that may * do C++ specific things in future... */ # include # include # ifdef _MSC_VER # define BOOST_MSVC _MSC_VER # endif #endif /***************************************************************************** * * Boilerplate regex config options: * ****************************************************************************/ /* Obsolete macro, use BOOST_VERSION instead: */ #define BOOST_RE_VERSION 320 /* fix: */ #if defined(_UNICODE) && !defined(UNICODE) #define UNICODE #endif /* * Fix for gcc prior to 3.4: std::ctype doesn't allow * masks to be combined, for example: * std::use_facet >.is(std::ctype_base::lower|std::ctype_base::upper, L'a'); * returns *false*. */ #ifdef __GLIBCPP__ # define BOOST_REGEX_BUGGY_CTYPE_FACET #endif /* * Intel C++ before 8.0 ends up with unresolved externals unless we turn off * extern template support: */ #if defined(BOOST_INTEL) && defined(__cplusplus) && (BOOST_INTEL <= 800) # define BOOST_REGEX_NO_EXTERNAL_TEMPLATES #endif /* * Visual C++ doesn't support external templates with C++ extensions turned off: */ #if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS) # define BOOST_REGEX_NO_EXTERNAL_TEMPLATES #endif /* * Shared regex lib will crash without this, frankly it looks a lot like a gcc bug: */ #if defined(__MINGW32__) # define BOOST_REGEX_NO_EXTERNAL_TEMPLATES #endif /* * If there isn't good enough wide character support then there will * be no wide character regular expressions: */ #if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING)) # if !defined(BOOST_NO_WREGEX) # define BOOST_NO_WREGEX # endif #else # if defined(__sgi) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) /* STLPort on IRIX is misconfigured: does not compile * as a temporary fix include instead and prevent inclusion * of STLPort version of */ # include # define __STLPORT_CWCTYPE # define _STLP_CWCTYPE # endif #ifdef __cplusplus # include #endif #endif /* * If Win32 support has been disabled for boost in general, then * it is for regex in particular: */ #if defined(BOOST_DISABLE_WIN32) && !defined(BOOST_REGEX_NO_W32) # define BOOST_REGEX_NO_W32 #endif /* disable our own file-iterators and mapfiles if we can't * support them: */ #if !defined(BOOST_HAS_DIRENT_H) && !(defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)) # define BOOST_REGEX_NO_FILEITER #endif /* backwards compatibitity: */ #if defined(BOOST_RE_NO_LIB) # define BOOST_REGEX_NO_LIB #endif #if defined(__GNUC__) && (defined(_WIN32) || defined(__CYGWIN__)) /* gcc on win32 has problems if you include (sporadically generates bad code). */ # define BOOST_REGEX_NO_W32 #endif #if defined(__COMO__) && !defined(BOOST_REGEX_NO_W32) && !defined(_MSC_EXTENSIONS) # define BOOST_REGEX_NO_W32 #endif /***************************************************************************** * * Wide character workarounds: * ****************************************************************************/ /* * define BOOST_REGEX_HAS_OTHER_WCHAR_T when wchar_t is a native type, but the users * code may be built with wchar_t as unsigned short: basically when we're building * with MSVC and the /Zc:wchar_t option we place some extra unsigned short versions * of the non-inline functions in the library, so that users can still link to the lib, * irrespective of whether their own code is built with /Zc:wchar_t. * Note that this does NOT WORK with VC10 when the C++ locale is in effect as * the locale's facets simply do not compile in that case. */ #if defined(__cplusplus) && (defined(BOOST_MSVC) || defined(__ICL)) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) && defined(BOOST_WINDOWS) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) && !defined(BOOST_RWSTD_VER) && ((_MSC_VER < 1600) || !defined(BOOST_REGEX_USE_CPP_LOCALE)) # define BOOST_REGEX_HAS_OTHER_WCHAR_T # ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4251 4231) # if BOOST_MSVC < 1600 # pragma warning(disable : 4660) # endif # endif # if defined(_DLL) && defined(BOOST_MSVC) && (BOOST_MSVC < 1600) # include extern template class __declspec(dllimport) std::basic_string; # endif # ifdef BOOST_MSVC # pragma warning(pop) # endif #endif /***************************************************************************** * * Set up dll import/export options: * ****************************************************************************/ #ifndef BOOST_SYMBOL_EXPORT # define BOOST_SYMBOL_EXPORT # define BOOST_SYMBOL_IMPORT #endif #if (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK) # if defined(BOOST_REGEX_SOURCE) # define BOOST_REGEX_DECL BOOST_SYMBOL_EXPORT # define BOOST_REGEX_BUILD_DLL # else # define BOOST_REGEX_DECL BOOST_SYMBOL_IMPORT # endif #else # define BOOST_REGEX_DECL #endif #if !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE) && !defined(BOOST_ALL_NO_LIB) && defined(__cplusplus) # define BOOST_LIB_NAME boost_regex # if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK) # define BOOST_DYN_LINK # endif # ifdef BOOST_REGEX_DIAG # define BOOST_LIB_DIAGNOSTIC # endif # include #endif /***************************************************************************** * * Set up function call type: * ****************************************************************************/ #if defined(BOOST_MSVC) && (BOOST_MSVC >= 1200) && defined(_MSC_EXTENSIONS) #if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS) || defined(_MANAGED) || defined(BOOST_REGEX_NO_FASTCALL) # define BOOST_REGEX_CALL __cdecl #else # define BOOST_REGEX_CALL __fastcall #endif # define BOOST_REGEX_CCALL __cdecl #endif #if defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32) # define BOOST_REGEX_CALL __fastcall # define BOOST_REGEX_CCALL __stdcall #endif #ifndef BOOST_REGEX_CALL # define BOOST_REGEX_CALL #endif #ifndef BOOST_REGEX_CCALL #define BOOST_REGEX_CCALL #endif /***************************************************************************** * * Set up localisation model: * ****************************************************************************/ /* backwards compatibility: */ #ifdef BOOST_RE_LOCALE_C # define BOOST_REGEX_USE_C_LOCALE #endif #ifdef BOOST_RE_LOCALE_CPP # define BOOST_REGEX_USE_CPP_LOCALE #endif #if defined(__CYGWIN__) # define BOOST_REGEX_USE_C_LOCALE #endif /* Win32 defaults to native Win32 locale: */ #if defined(_WIN32) && !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_REGEX_NO_W32) # define BOOST_REGEX_USE_WIN32_LOCALE #endif /* otherwise use C++ locale if supported: */ #if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_NO_STD_LOCALE) # define BOOST_REGEX_USE_CPP_LOCALE #endif /* otherwise use C+ locale: */ #if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) # define BOOST_REGEX_USE_C_LOCALE #endif #ifndef BOOST_REGEX_MAX_STATE_COUNT # define BOOST_REGEX_MAX_STATE_COUNT 100000000 #endif /***************************************************************************** * * Error Handling for exception free compilers: * ****************************************************************************/ #ifdef BOOST_NO_EXCEPTIONS /* * If there are no exceptions then we must report critical-errors * the only way we know how; by terminating. */ #include #include #include # define BOOST_REGEX_NOEH_ASSERT(x)\ if(0 == (x))\ {\ std::string s("Error: critical regex++ failure in: ");\ s.append(#x);\ std::runtime_error e(s);\ boost::throw_exception(e);\ } #else /* * With exceptions then error handling is taken care of and * there is no need for these checks: */ # define BOOST_REGEX_NOEH_ASSERT(x) #endif /***************************************************************************** * * Stack protection under MS Windows: * ****************************************************************************/ #if !defined(BOOST_REGEX_NO_W32) && !defined(BOOST_REGEX_V3) # if(defined(_WIN32) || defined(_WIN64) || defined(_WINCE)) \ && !defined(__GNUC__) \ && !(defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)) \ && !(defined(__MWERKS__) && (__MWERKS__ <= 0x3003)) # define BOOST_REGEX_HAS_MS_STACK_GUARD # endif #elif defined(BOOST_REGEX_HAS_MS_STACK_GUARD) # undef BOOST_REGEX_HAS_MS_STACK_GUARD #endif #if defined(__cplusplus) && defined(BOOST_REGEX_HAS_MS_STACK_GUARD) namespace boost{ namespace re_detail{ BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page(); } } #endif /***************************************************************************** * * Algorithm selection and configuration: * ****************************************************************************/ #if !defined(BOOST_REGEX_RECURSIVE) && !defined(BOOST_REGEX_NON_RECURSIVE) # if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && !defined(_STLP_DEBUG) && !defined(__STL_DEBUG) && !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1400)) # define BOOST_REGEX_RECURSIVE # else # define BOOST_REGEX_NON_RECURSIVE # endif #endif #ifdef BOOST_REGEX_NON_RECURSIVE # ifdef BOOST_REGEX_RECURSIVE # error "Can't set both BOOST_REGEX_RECURSIVE and BOOST_REGEX_NON_RECURSIVE" # endif # ifndef BOOST_REGEX_BLOCKSIZE # define BOOST_REGEX_BLOCKSIZE 4096 # endif # if BOOST_REGEX_BLOCKSIZE < 512 # error "BOOST_REGEX_BLOCKSIZE must be at least 512" # endif # ifndef BOOST_REGEX_MAX_BLOCKS # define BOOST_REGEX_MAX_BLOCKS 1024 # endif # ifdef BOOST_REGEX_HAS_MS_STACK_GUARD # undef BOOST_REGEX_HAS_MS_STACK_GUARD # endif # ifndef BOOST_REGEX_MAX_CACHE_BLOCKS # define BOOST_REGEX_MAX_CACHE_BLOCKS 16 # endif #endif /***************************************************************************** * * helper memory allocation functions: * ****************************************************************************/ #if defined(__cplusplus) && defined(BOOST_REGEX_NON_RECURSIVE) namespace boost{ namespace re_detail{ BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block(); BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void*); }} /* namespaces */ #endif /***************************************************************************** * * Diagnostics: * ****************************************************************************/ #ifdef BOOST_REGEX_CONFIG_INFO BOOST_REGEX_DECL void BOOST_REGEX_CALL print_regex_library_info(); #endif #if defined(BOOST_REGEX_DIAG) # pragma message ("BOOST_REGEX_DECL" BOOST_STRINGIZE(=BOOST_REGEX_DECL)) # pragma message ("BOOST_REGEX_CALL" BOOST_STRINGIZE(=BOOST_REGEX_CALL)) # pragma message ("BOOST_REGEX_CCALL" BOOST_STRINGIZE(=BOOST_REGEX_CCALL)) #ifdef BOOST_REGEX_USE_C_LOCALE # pragma message ("Using C locale in regex traits class") #elif BOOST_REGEX_USE_CPP_LOCALE # pragma message ("Using C++ locale in regex traits class") #else # pragma message ("Using Win32 locale in regex traits class") #endif #if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK) # pragma message ("Dynamic linking enabled") #endif #if defined(BOOST_REGEX_NO_LIB) || defined(BOOST_ALL_NO_LIB) # pragma message ("Auto-linking disabled") #endif #ifdef BOOST_REGEX_NO_EXTERNAL_TEMPLATES # pragma message ("Extern templates disabled") #endif #endif #endif passenger-4.0.37/ext/boost/regex/mfc.hpp000644 000765 000024 00000015474 12233035540 020545 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE mfc.hpp * VERSION see * DESCRIPTION: Overloads and helpers for using MFC/ATL string types with Boost.Regex. */ #ifndef BOOST_REGEX_MFC_HPP #define BOOST_REGEX_MFC_HPP #include #include namespace boost{ // // define the types used for TCHAR's: typedef basic_regex tregex; typedef match_results tmatch; typedef regex_iterator tregex_iterator; typedef regex_token_iterator tregex_token_iterator; #if _MSC_VER >= 1310 #define SIMPLE_STRING_PARAM class B, bool b #define SIMPLE_STRING_ARG_LIST B, b #else #define SIMPLE_STRING_PARAM class B #define SIMPLE_STRING_ARG_LIST B #endif // // define regex creation functions: // template inline basic_regex make_regex(const ATL::CSimpleStringT& s, ::boost::regex_constants::syntax_option_type f = boost::regex_constants::normal) { basic_regex result(s.GetString(), s.GetString() + s.GetLength(), f); return result; } // // regex_match overloads: // template inline bool regex_match(const ATL::CSimpleStringT& s, match_results& what, const basic_regex& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { return ::boost::regex_match(s.GetString(), s.GetString() + s.GetLength(), what, e, f); } template inline bool regex_match(const ATL::CSimpleStringT& s, const basic_regex& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { return ::boost::regex_match(s.GetString(), s.GetString() + s.GetLength(), e, f); } // // regex_search overloads: // template inline bool regex_search(const ATL::CSimpleStringT& s, match_results& what, const basic_regex& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { return ::boost::regex_search(s.GetString(), s.GetString() + s.GetLength(), what, e, f); } template inline bool regex_search(const ATL::CSimpleStringT& s, const basic_regex& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { return ::boost::regex_search(s.GetString(), s.GetString() + s.GetLength(), e, f); } // // regex_iterator creation: // template inline regex_iterator make_regex_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, f); return result; } template inline regex_token_iterator make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, int sub = 0, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_token_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, sub, f); return result; } template inline regex_token_iterator make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, const std::vector& subs, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_token_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f); return result; } template inline regex_token_iterator make_regex_token_iterator(const ATL::CSimpleStringT& s, const basic_regex& e, const int (& subs)[N], ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_token_iterator result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f); return result; } template OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex& e, const ATL::CSimpleStringT& fmt, match_flag_type flags = match_default) { return ::boost::regex_replace(out, first, last, e, fmt.GetString(), flags); } namespace re_detail{ template class mfc_string_out_iterator { ATL::CSimpleStringT* out; public: mfc_string_out_iterator(ATL::CSimpleStringT& s) : out(&s) {} mfc_string_out_iterator& operator++() { return *this; } mfc_string_out_iterator& operator++(int) { return *this; } mfc_string_out_iterator& operator*() { return *this; } mfc_string_out_iterator& operator=(B v) { out->AppendChar(v); return *this; } typedef std::ptrdiff_t difference_type; typedef B value_type; typedef value_type* pointer; typedef value_type& reference; typedef std::output_iterator_tag iterator_category; }; } template ATL::CSimpleStringT regex_replace(const ATL::CSimpleStringT& s, const basic_regex& e, const ATL::CSimpleStringT& fmt, match_flag_type flags = match_default) { ATL::CSimpleStringT result(s.GetManager()); re_detail::mfc_string_out_iterator i(result); regex_replace(i, s.GetString(), s.GetString() + s.GetLength(), e, fmt.GetString(), flags); return result; } } // namespace boost. #endif passenger-4.0.37/ext/boost/regex/pattern_except.hpp000644 000765 000024 00000004226 12233035540 023016 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE pattern_except.hpp * VERSION see * DESCRIPTION: Declares pattern-matching exception classes. */ #ifndef BOOST_RE_PAT_EXCEPT_HPP #define BOOST_RE_PAT_EXCEPT_HPP #ifndef BOOST_REGEX_CONFIG_HPP #include #endif #include #include #include namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable : 4275) #endif class BOOST_REGEX_DECL regex_error : public std::runtime_error { public: explicit regex_error(const std::string& s, regex_constants::error_type err = regex_constants::error_unknown, std::ptrdiff_t pos = 0); explicit regex_error(regex_constants::error_type err); ~regex_error() throw(); regex_constants::error_type code()const { return m_error_code; } std::ptrdiff_t position()const { return m_position; } void raise()const; private: regex_constants::error_type m_error_code; std::ptrdiff_t m_position; }; typedef regex_error bad_pattern; typedef regex_error bad_expression; namespace re_detail{ BOOST_REGEX_DECL void BOOST_REGEX_CALL raise_runtime_error(const std::runtime_error& ex); template void raise_error(const traits& t, regex_constants::error_type code) { (void)t; // warning suppression std::runtime_error e(t.error_string(code)); ::boost::re_detail::raise_runtime_error(e); } } #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #endif passenger-4.0.37/ext/boost/regex/pending/000755 000765 000024 00000000000 12233035540 020700 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/regex/regex_traits.hpp000644 000765 000024 00000001335 12233035540 022467 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_traits.hpp * VERSION see * DESCRIPTION: Declares regular expression traits classes. */ #ifndef BOOST_REGEX_TRAITS_HPP #define BOOST_REGEX_TRAITS_HPP #ifndef BOOST_REGEX_CONFIG_HPP # include #endif # ifndef BOOST_REGEX_TRAITS_HPP_INCLUDED # include # endif #endif // include passenger-4.0.37/ext/boost/regex/user.hpp000644 000765 000024 00000006252 12233035540 020750 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE user.hpp * VERSION see * DESCRIPTION: User settable options. */ // define if you want the regex library to use the C locale // even on Win32: // #define BOOST_REGEX_USE_C_LOCALE // define this is you want the regex library to use the C++ // locale: // #define BOOST_REGEX_USE_CPP_LOCALE // define this if the runtime library is a dll, and you // want BOOST_REGEX_DYN_LINK to set up dll exports/imports // with __declspec(dllexport)/__declspec(dllimport.) // #define BOOST_REGEX_HAS_DLL_RUNTIME // define this if you want to dynamically link to regex, // if the runtime library is also a dll (Probably Win32 specific, // and has no effect unless BOOST_REGEX_HAS_DLL_RUNTIME is set): // #define BOOST_REGEX_DYN_LINK // define this if you don't want the lib to automatically // select its link libraries: // #define BOOST_REGEX_NO_LIB // define this if templates with switch statements cause problems: // #define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE // define this to disable Win32 support when available: // #define BOOST_REGEX_NO_W32 // define this if bool is not a real type: // #define BOOST_REGEX_NO_BOOL // define this if no template instances are to be placed in // the library rather than users object files: // #define BOOST_REGEX_NO_EXTERNAL_TEMPLATES // define this if the forward declarations in regex_fwd.hpp // cause more problems than they are worth: // #define BOOST_REGEX_NO_FWD // define this if your compiler supports MS Windows structured // exception handling. // #define BOOST_REGEX_HAS_MS_STACK_GUARD // define this if you want to use the recursive algorithm // even if BOOST_REGEX_HAS_MS_STACK_GUARD is not defined. // #define BOOST_REGEX_RECURSIVE // define this if you want to use the non-recursive // algorithm, even if the recursive version would be the default. // #define BOOST_REGEX_NON_RECURSIVE // define this if you want to set the size of the memory blocks // used by the non-recursive algorithm. // #define BOOST_REGEX_BLOCKSIZE 4096 // define this if you want to set the maximum number of memory blocks // used by the non-recursive algorithm. // #define BOOST_REGEX_MAX_BLOCKS 1024 // define this if you want to set the maximum number of memory blocks // cached by the non-recursive algorithm: Normally this is 16, but can be // higher if you have multiple threads all using boost.regex, or lower // if you don't want boost.regex to cache memory. // #define BOOST_REGEX_MAX_CACHE_BLOCKS 16 // define this if you want to be able to access extended capture // information in your sub_match's (caution this will slow things // down quite a bit). // #define BOOST_REGEX_MATCH_EXTRA // define this if you want to enable support for Unicode via ICU. // #define BOOST_HAS_ICU // define this if you want regex to use __cdecl calling convensions, even when __fastcall is available: // #define BOOST_REGEX_NO_FASTCALL passenger-4.0.37/ext/boost/regex/v4/000755 000765 000024 00000000000 12233035540 017605 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/regex/v4/basic_regex.hpp000644 000765 000024 00000054747 12233035540 022612 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2004 John Maddock * Copyright 2011 Garmin Ltd. or its subsidiaries * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org/ for most recent version. * FILE basic_regex.cpp * VERSION see * DESCRIPTION: Declares template class basic_regex. */ #ifndef BOOST_REGEX_V4_BASIC_REGEX_HPP #define BOOST_REGEX_V4_BASIC_REGEX_HPP #include #include #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable : 4251 4231 4800) #if BOOST_MSVC < 1600 #pragma warning(disable : 4660) #endif #endif namespace re_detail{ // // forward declaration, we will need this one later: // template class basic_regex_parser; template void bubble_down_one(I first, I last) { if(first != last) { I next = last - 1; while((next != first) && (*next < *(next-1))) { (next-1)->swap(*next); --next; } } } template inline int hash_value_from_capture_name(Iterator i, Iterator j) { std::size_t r = boost::hash_range(i, j); r %= ((std::numeric_limits::max)() - 10001); r += 10000; return static_cast(r); } class named_subexpressions { public: struct name { template name(const charT* i, const charT* j, int idx) : index(idx) { hash = hash_value_from_capture_name(i, j); } name(int h, int idx) : index(idx), hash(h) { } int index; int hash; bool operator < (const name& other)const { return hash < other.hash; } bool operator == (const name& other)const { return hash == other.hash; } void swap(name& other) { std::swap(index, other.index); std::swap(hash, other.hash); } }; typedef std::vector::const_iterator const_iterator; typedef std::pair range_type; named_subexpressions(){} template void set_name(const charT* i, const charT* j, int index) { m_sub_names.push_back(name(i, j, index)); bubble_down_one(m_sub_names.begin(), m_sub_names.end()); } template int get_id(const charT* i, const charT* j)const { name t(i, j, 0); typename std::vector::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t); if((pos != m_sub_names.end()) && (*pos == t)) { return pos->index; } return -1; } template range_type equal_range(const charT* i, const charT* j)const { name t(i, j, 0); return std::equal_range(m_sub_names.begin(), m_sub_names.end(), t); } int get_id(int h)const { name t(h, 0); std::vector::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t); if((pos != m_sub_names.end()) && (*pos == t)) { return pos->index; } return -1; } range_type equal_range(int h)const { name t(h, 0); return std::equal_range(m_sub_names.begin(), m_sub_names.end(), t); } private: std::vector m_sub_names; }; // // class regex_data: // represents the data we wish to expose to the matching algorithms. // template struct regex_data : public named_subexpressions { typedef regex_constants::syntax_option_type flag_type; typedef std::size_t size_type; regex_data(const ::boost::shared_ptr< ::boost::regex_traits_wrapper >& t) : m_ptraits(t), m_expression(0), m_expression_len(0) {} regex_data() : m_ptraits(new ::boost::regex_traits_wrapper()), m_expression(0), m_expression_len(0) {} ::boost::shared_ptr< ::boost::regex_traits_wrapper > m_ptraits; // traits class instance flag_type m_flags; // flags with which we were compiled int m_status; // error code (0 implies OK). const charT* m_expression; // the original expression std::ptrdiff_t m_expression_len; // the length of the original expression size_type m_mark_count; // the number of marked sub-expressions re_detail::re_syntax_base* m_first_state; // the first state of the machine unsigned m_restart_type; // search optimisation type unsigned char m_startmap[1 << CHAR_BIT]; // which characters can start a match unsigned int m_can_be_null; // whether we can match a null string re_detail::raw_storage m_data; // the buffer in which our states are constructed typename traits::char_class_type m_word_mask; // mask used to determine if a character is a word character std::vector< std::pair< std::size_t, std::size_t> > m_subs; // Position of sub-expressions within the *string*. bool m_has_recursions; // whether we have recursive expressions; }; // // class basic_regex_implementation // pimpl implementation class for basic_regex. // template class basic_regex_implementation : public regex_data { public: typedef regex_constants::syntax_option_type flag_type; typedef std::ptrdiff_t difference_type; typedef std::size_t size_type; typedef typename traits::locale_type locale_type; typedef const charT* const_iterator; basic_regex_implementation(){} basic_regex_implementation(const ::boost::shared_ptr< ::boost::regex_traits_wrapper >& t) : regex_data(t) {} void assign(const charT* arg_first, const charT* arg_last, flag_type f) { regex_data* pdat = this; basic_regex_parser parser(pdat); parser.parse(arg_first, arg_last, f); } locale_type BOOST_REGEX_CALL imbue(locale_type l) { return this->m_ptraits->imbue(l); } locale_type BOOST_REGEX_CALL getloc()const { return this->m_ptraits->getloc(); } std::basic_string BOOST_REGEX_CALL str()const { std::basic_string result; if(this->m_status == 0) result = std::basic_string(this->m_expression, this->m_expression_len); return result; } const_iterator BOOST_REGEX_CALL expression()const { return this->m_expression; } std::pair BOOST_REGEX_CALL subexpression(std::size_t n)const { if(n == 0) boost::throw_exception(std::out_of_range("0 is not a valid subexpression index.")); const std::pair& pi = this->m_subs.at(n - 1); std::pair p(expression() + pi.first, expression() + pi.second); return p; } // // begin, end: const_iterator BOOST_REGEX_CALL begin()const { return (this->m_status ? 0 : this->m_expression); } const_iterator BOOST_REGEX_CALL end()const { return (this->m_status ? 0 : this->m_expression + this->m_expression_len); } flag_type BOOST_REGEX_CALL flags()const { return this->m_flags; } size_type BOOST_REGEX_CALL size()const { return this->m_expression_len; } int BOOST_REGEX_CALL status()const { return this->m_status; } size_type BOOST_REGEX_CALL mark_count()const { return this->m_mark_count; } const re_detail::re_syntax_base* get_first_state()const { return this->m_first_state; } unsigned get_restart_type()const { return this->m_restart_type; } const unsigned char* get_map()const { return this->m_startmap; } const ::boost::regex_traits_wrapper& get_traits()const { return *(this->m_ptraits); } bool can_be_null()const { return this->m_can_be_null; } const regex_data& get_data()const { basic_regex_implementation const* p = this; return *static_cast*>(p); } }; } // namespace re_detail // // class basic_regex: // represents the compiled // regular expression: // #ifdef BOOST_REGEX_NO_FWD template > #else template #endif class basic_regex : public regbase { public: // typedefs: typedef std::size_t traits_size_type; typedef typename traits::string_type traits_string_type; typedef charT char_type; typedef traits traits_type; typedef charT value_type; typedef charT& reference; typedef const charT& const_reference; typedef const charT* const_iterator; typedef const_iterator iterator; typedef std::ptrdiff_t difference_type; typedef std::size_t size_type; typedef regex_constants::syntax_option_type flag_type; // locale_type // placeholder for actual locale type used by the // traits class to localise *this. typedef typename traits::locale_type locale_type; public: explicit basic_regex(){} explicit basic_regex(const charT* p, flag_type f = regex_constants::normal) { assign(p, f); } basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal) { assign(p1, p2, f); } basic_regex(const charT* p, size_type len, flag_type f) { assign(p, len, f); } basic_regex(const basic_regex& that) : m_pimpl(that.m_pimpl) {} ~basic_regex(){} basic_regex& BOOST_REGEX_CALL operator=(const basic_regex& that) { return assign(that); } basic_regex& BOOST_REGEX_CALL operator=(const charT* ptr) { return assign(ptr); } // // assign: basic_regex& assign(const basic_regex& that) { m_pimpl = that.m_pimpl; return *this; } basic_regex& assign(const charT* p, flag_type f = regex_constants::normal) { return assign(p, p + traits::length(p), f); } basic_regex& assign(const charT* p, size_type len, flag_type f) { return assign(p, p + len, f); } private: basic_regex& do_assign(const charT* p1, const charT* p2, flag_type f); public: basic_regex& assign(const charT* p1, const charT* p2, flag_type f = regex_constants::normal) { return do_assign(p1, p2, f); } #if !defined(BOOST_NO_MEMBER_TEMPLATES) template unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string& p, flag_type f = regex_constants::normal) { return set_expression(p.data(), p.data() + p.size(), f); } template explicit basic_regex(const std::basic_string& p, flag_type f = regex_constants::normal) { assign(p, f); } template basic_regex(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal) { typedef typename traits::string_type seq_type; seq_type a(arg_first, arg_last); if(a.size()) assign(static_cast(&*a.begin()), static_cast(&*a.begin() + a.size()), f); else assign(static_cast(0), static_cast(0), f); } template basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string& p) { return assign(p.data(), p.data() + p.size(), regex_constants::normal); } template basic_regex& BOOST_REGEX_CALL assign( const std::basic_string& s, flag_type f = regex_constants::normal) { return assign(s.data(), s.data() + s.size(), f); } template basic_regex& BOOST_REGEX_CALL assign(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal) { typedef typename traits::string_type seq_type; seq_type a(arg_first, arg_last); if(a.size()) { const charT* p1 = &*a.begin(); const charT* p2 = &*a.begin() + a.size(); return assign(p1, p2, f); } return assign(static_cast(0), static_cast(0), f); } #else unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string& p, flag_type f = regex_constants::normal) { return set_expression(p.data(), p.data() + p.size(), f); } basic_regex(const std::basic_string& p, flag_type f = regex_constants::normal) { assign(p, f); } basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string& p) { return assign(p.data(), p.data() + p.size(), regex_constants::normal); } basic_regex& BOOST_REGEX_CALL assign( const std::basic_string& s, flag_type f = regex_constants::normal) { return assign(s.data(), s.data() + s.size(), f); } #endif // // locale: locale_type BOOST_REGEX_CALL imbue(locale_type l); locale_type BOOST_REGEX_CALL getloc()const { return m_pimpl.get() ? m_pimpl->getloc() : locale_type(); } // // getflags: // retained for backwards compatibility only, "flags" // is now the preferred name: flag_type BOOST_REGEX_CALL getflags()const { return flags(); } flag_type BOOST_REGEX_CALL flags()const { return m_pimpl.get() ? m_pimpl->flags() : 0; } // // str: std::basic_string BOOST_REGEX_CALL str()const { return m_pimpl.get() ? m_pimpl->str() : std::basic_string(); } // // begin, end, subexpression: std::pair BOOST_REGEX_CALL subexpression(std::size_t n)const { if(!m_pimpl.get()) boost::throw_exception(std::logic_error("Can't access subexpressions in an invalid regex.")); return m_pimpl->subexpression(n); } const_iterator BOOST_REGEX_CALL begin()const { return (m_pimpl.get() ? m_pimpl->begin() : 0); } const_iterator BOOST_REGEX_CALL end()const { return (m_pimpl.get() ? m_pimpl->end() : 0); } // // swap: void BOOST_REGEX_CALL swap(basic_regex& that)throw() { m_pimpl.swap(that.m_pimpl); } // // size: size_type BOOST_REGEX_CALL size()const { return (m_pimpl.get() ? m_pimpl->size() : 0); } // // max_size: size_type BOOST_REGEX_CALL max_size()const { return UINT_MAX; } // // empty: bool BOOST_REGEX_CALL empty()const { return (m_pimpl.get() ? 0 != m_pimpl->status() : true); } size_type BOOST_REGEX_CALL mark_count()const { return (m_pimpl.get() ? m_pimpl->mark_count() : 0); } int status()const { return (m_pimpl.get() ? m_pimpl->status() : regex_constants::error_empty); } int BOOST_REGEX_CALL compare(const basic_regex& that) const { if(m_pimpl.get() == that.m_pimpl.get()) return 0; if(!m_pimpl.get()) return -1; if(!that.m_pimpl.get()) return 1; if(status() != that.status()) return status() - that.status(); if(flags() != that.flags()) return flags() - that.flags(); return str().compare(that.str()); } bool BOOST_REGEX_CALL operator==(const basic_regex& e)const { return compare(e) == 0; } bool BOOST_REGEX_CALL operator != (const basic_regex& e)const { return compare(e) != 0; } bool BOOST_REGEX_CALL operator<(const basic_regex& e)const { return compare(e) < 0; } bool BOOST_REGEX_CALL operator>(const basic_regex& e)const { return compare(e) > 0; } bool BOOST_REGEX_CALL operator<=(const basic_regex& e)const { return compare(e) <= 0; } bool BOOST_REGEX_CALL operator>=(const basic_regex& e)const { return compare(e) >= 0; } // // The following are deprecated as public interfaces // but are available for compatibility with earlier versions. const charT* BOOST_REGEX_CALL expression()const { return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0); } unsigned int BOOST_REGEX_CALL set_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal) { assign(p1, p2, f | regex_constants::no_except); return status(); } unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regex_constants::normal) { assign(p, f | regex_constants::no_except); return status(); } unsigned int BOOST_REGEX_CALL error_code()const { return status(); } // // private access methods: // const re_detail::re_syntax_base* get_first_state()const { BOOST_ASSERT(0 != m_pimpl.get()); return m_pimpl->get_first_state(); } unsigned get_restart_type()const { BOOST_ASSERT(0 != m_pimpl.get()); return m_pimpl->get_restart_type(); } const unsigned char* get_map()const { BOOST_ASSERT(0 != m_pimpl.get()); return m_pimpl->get_map(); } const ::boost::regex_traits_wrapper& get_traits()const { BOOST_ASSERT(0 != m_pimpl.get()); return m_pimpl->get_traits(); } bool can_be_null()const { BOOST_ASSERT(0 != m_pimpl.get()); return m_pimpl->can_be_null(); } const re_detail::regex_data& get_data()const { BOOST_ASSERT(0 != m_pimpl.get()); return m_pimpl->get_data(); } boost::shared_ptr get_named_subs()const { return m_pimpl; } private: shared_ptr > m_pimpl; }; // // out of line members; // these are the only members that mutate the basic_regex object, // and are designed to provide the strong exception guarentee // (in the event of a throw, the state of the object remains unchanged). // template basic_regex& basic_regex::do_assign(const charT* p1, const charT* p2, flag_type f) { shared_ptr > temp; if(!m_pimpl.get()) { temp = shared_ptr >(new re_detail::basic_regex_implementation()); } else { temp = shared_ptr >(new re_detail::basic_regex_implementation(m_pimpl->m_ptraits)); } temp->assign(p1, p2, f); temp.swap(m_pimpl); return *this; } template typename basic_regex::locale_type BOOST_REGEX_CALL basic_regex::imbue(locale_type l) { shared_ptr > temp(new re_detail::basic_regex_implementation()); locale_type result = temp->imbue(l); temp.swap(m_pimpl); return result; } // // non-members: // template void swap(basic_regex& e1, basic_regex& e2) { e1.swap(e2); } #ifndef BOOST_NO_STD_LOCALE template std::basic_ostream& operator << (std::basic_ostream& os, const basic_regex& e) { return (os << e.str()); } #else template std::ostream& operator << (std::ostream& os, const basic_regex& e) { return (os << e.str()); } #endif // // class reg_expression: // this is provided for backwards compatibility only, // it is deprecated, no not use! // #ifdef BOOST_REGEX_NO_FWD template > #else template #endif class reg_expression : public basic_regex { public: typedef typename basic_regex::flag_type flag_type; typedef typename basic_regex::size_type size_type; explicit reg_expression(){} explicit reg_expression(const charT* p, flag_type f = regex_constants::normal) : basic_regex(p, f){} reg_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal) : basic_regex(p1, p2, f){} reg_expression(const charT* p, size_type len, flag_type f) : basic_regex(p, len, f){} reg_expression(const reg_expression& that) : basic_regex(that) {} ~reg_expression(){} reg_expression& BOOST_REGEX_CALL operator=(const reg_expression& that) { return this->assign(that); } #if !defined(BOOST_NO_MEMBER_TEMPLATES) template explicit reg_expression(const std::basic_string& p, flag_type f = regex_constants::normal) : basic_regex(p, f) { } template reg_expression(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal) : basic_regex(arg_first, arg_last, f) { } template reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string& p) { this->assign(p); return *this; } #else explicit reg_expression(const std::basic_string& p, flag_type f = regex_constants::normal) : basic_regex(p, f) { } reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string& p) { this->assign(p); return *this; } #endif }; #ifdef BOOST_MSVC #pragma warning (pop) #endif } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/basic_regex_creator.hpp000644 000765 000024 00000147176 12233035540 024330 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE basic_regex_creator.cpp * VERSION see * DESCRIPTION: Declares template class basic_regex_creator which fills in * the data members of a regex_data object. */ #ifndef BOOST_REGEX_V4_BASIC_REGEX_CREATOR_HPP #define BOOST_REGEX_V4_BASIC_REGEX_CREATOR_HPP #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4800) #endif namespace boost{ namespace re_detail{ template struct digraph : public std::pair { digraph() : std::pair(0, 0){} digraph(charT c1) : std::pair(c1, 0){} digraph(charT c1, charT c2) : std::pair(c1, c2) {} #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) digraph(const digraph& d) : std::pair(d.first, d.second){} #endif template digraph(const Seq& s) : std::pair() { BOOST_ASSERT(s.size() <= 2); BOOST_ASSERT(s.size()); this->first = s[0]; this->second = (s.size() > 1) ? s[1] : 0; } }; template class basic_char_set { public: typedef digraph digraph_type; typedef typename traits::string_type string_type; typedef typename traits::char_class_type m_type; basic_char_set() { m_negate = false; m_has_digraphs = false; m_classes = 0; m_negated_classes = 0; m_empty = true; } void add_single(const digraph_type& s) { m_singles.insert(m_singles.end(), s); if(s.second) m_has_digraphs = true; m_empty = false; } void add_range(const digraph_type& first, const digraph_type& end) { m_ranges.insert(m_ranges.end(), first); m_ranges.insert(m_ranges.end(), end); if(first.second) { m_has_digraphs = true; add_single(first); } if(end.second) { m_has_digraphs = true; add_single(end); } m_empty = false; } void add_class(m_type m) { m_classes |= m; m_empty = false; } void add_negated_class(m_type m) { m_negated_classes |= m; m_empty = false; } void add_equivalent(const digraph_type& s) { m_equivalents.insert(m_equivalents.end(), s); if(s.second) { m_has_digraphs = true; add_single(s); } m_empty = false; } void negate() { m_negate = true; //m_empty = false; } // // accessor functions: // bool has_digraphs()const { return m_has_digraphs; } bool is_negated()const { return m_negate; } typedef typename std::vector::const_iterator list_iterator; list_iterator singles_begin()const { return m_singles.begin(); } list_iterator singles_end()const { return m_singles.end(); } list_iterator ranges_begin()const { return m_ranges.begin(); } list_iterator ranges_end()const { return m_ranges.end(); } list_iterator equivalents_begin()const { return m_equivalents.begin(); } list_iterator equivalents_end()const { return m_equivalents.end(); } m_type classes()const { return m_classes; } m_type negated_classes()const { return m_negated_classes; } bool empty()const { return m_empty; } private: std::vector m_singles; // a list of single characters to match std::vector m_ranges; // a list of end points of our ranges bool m_negate; // true if the set is to be negated bool m_has_digraphs; // true if we have digraphs present m_type m_classes; // character classes to match m_type m_negated_classes; // negated character classes to match bool m_empty; // whether we've added anything yet std::vector m_equivalents; // a list of equivalence classes }; template class basic_regex_creator { public: basic_regex_creator(regex_data* data); std::ptrdiff_t getoffset(void* addr) { return getoffset(addr, m_pdata->m_data.data()); } std::ptrdiff_t getoffset(const void* addr, const void* base) { return static_cast(addr) - static_cast(base); } re_syntax_base* getaddress(std::ptrdiff_t off) { return getaddress(off, m_pdata->m_data.data()); } re_syntax_base* getaddress(std::ptrdiff_t off, void* base) { return static_cast(static_cast(static_cast(base) + off)); } void init(unsigned l_flags) { m_pdata->m_flags = l_flags; m_icase = l_flags & regex_constants::icase; } regbase::flag_type flags() { return m_pdata->m_flags; } void flags(regbase::flag_type f) { m_pdata->m_flags = f; if(m_icase != static_cast(f & regbase::icase)) { m_icase = static_cast(f & regbase::icase); } } re_syntax_base* append_state(syntax_element_type t, std::size_t s = sizeof(re_syntax_base)); re_syntax_base* insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s = sizeof(re_syntax_base)); re_literal* append_literal(charT c); re_syntax_base* append_set(const basic_char_set& char_set); re_syntax_base* append_set(const basic_char_set& char_set, mpl::false_*); re_syntax_base* append_set(const basic_char_set& char_set, mpl::true_*); void finalize(const charT* p1, const charT* p2); protected: regex_data* m_pdata; // pointer to the basic_regex_data struct we are filling in const ::boost::regex_traits_wrapper& m_traits; // convenience reference to traits class re_syntax_base* m_last_state; // the last state we added bool m_icase; // true for case insensitive matches unsigned m_repeater_id; // the state_id of the next repeater bool m_has_backrefs; // true if there are actually any backrefs unsigned m_backrefs; // bitmask of permitted backrefs boost::uintmax_t m_bad_repeats; // bitmask of repeats we can't deduce a startmap for; bool m_has_recursions; // set when we have recursive expresisons to fixup std::vector m_recursion_checks; // notes which recursions we've followed while analysing this expression typename traits::char_class_type m_word_mask; // mask used to determine if a character is a word character typename traits::char_class_type m_mask_space; // mask used to determine if a character is a word character typename traits::char_class_type m_lower_mask; // mask used to determine if a character is a lowercase character typename traits::char_class_type m_upper_mask; // mask used to determine if a character is an uppercase character typename traits::char_class_type m_alpha_mask; // mask used to determine if a character is an alphabetic character private: basic_regex_creator& operator=(const basic_regex_creator&); basic_regex_creator(const basic_regex_creator&); void fixup_pointers(re_syntax_base* state); void fixup_recursions(re_syntax_base* state); void create_startmaps(re_syntax_base* state); int calculate_backstep(re_syntax_base* state); void create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask); unsigned get_restart_type(re_syntax_base* state); void set_all_masks(unsigned char* bits, unsigned char); bool is_bad_repeat(re_syntax_base* pt); void set_bad_repeat(re_syntax_base* pt); syntax_element_type get_repeat_type(re_syntax_base* state); void probe_leading_repeat(re_syntax_base* state); }; template basic_regex_creator::basic_regex_creator(regex_data* data) : m_pdata(data), m_traits(*(data->m_ptraits)), m_last_state(0), m_repeater_id(0), m_has_backrefs(false), m_backrefs(0), m_has_recursions(false) { m_pdata->m_data.clear(); m_pdata->m_status = ::boost::regex_constants::error_ok; static const charT w = 'w'; static const charT s = 's'; static const charT l[5] = { 'l', 'o', 'w', 'e', 'r', }; static const charT u[5] = { 'u', 'p', 'p', 'e', 'r', }; static const charT a[5] = { 'a', 'l', 'p', 'h', 'a', }; m_word_mask = m_traits.lookup_classname(&w, &w +1); m_mask_space = m_traits.lookup_classname(&s, &s +1); m_lower_mask = m_traits.lookup_classname(l, l + 5); m_upper_mask = m_traits.lookup_classname(u, u + 5); m_alpha_mask = m_traits.lookup_classname(a, a + 5); m_pdata->m_word_mask = m_word_mask; BOOST_ASSERT(m_word_mask != 0); BOOST_ASSERT(m_mask_space != 0); BOOST_ASSERT(m_lower_mask != 0); BOOST_ASSERT(m_upper_mask != 0); BOOST_ASSERT(m_alpha_mask != 0); } template re_syntax_base* basic_regex_creator::append_state(syntax_element_type t, std::size_t s) { // if the state is a backref then make a note of it: if(t == syntax_element_backref) this->m_has_backrefs = true; // append a new state, start by aligning our last one: m_pdata->m_data.align(); // set the offset to the next state in our last one: if(m_last_state) m_last_state->next.i = m_pdata->m_data.size() - getoffset(m_last_state); // now actually extent our data: m_last_state = static_cast(m_pdata->m_data.extend(s)); // fill in boilerplate options in the new state: m_last_state->next.i = 0; m_last_state->type = t; return m_last_state; } template re_syntax_base* basic_regex_creator::insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s) { // append a new state, start by aligning our last one: m_pdata->m_data.align(); // set the offset to the next state in our last one: if(m_last_state) m_last_state->next.i = m_pdata->m_data.size() - getoffset(m_last_state); // remember the last state position: std::ptrdiff_t off = getoffset(m_last_state) + s; // now actually insert our data: re_syntax_base* new_state = static_cast(m_pdata->m_data.insert(pos, s)); // fill in boilerplate options in the new state: new_state->next.i = s; new_state->type = t; m_last_state = getaddress(off); return new_state; } template re_literal* basic_regex_creator::append_literal(charT c) { re_literal* result; // start by seeing if we have an existing re_literal we can extend: if((0 == m_last_state) || (m_last_state->type != syntax_element_literal)) { // no existing re_literal, create a new one: result = static_cast(append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT))); result->length = 1; *static_cast(static_cast(result+1)) = m_traits.translate(c, m_icase); } else { // we have an existing re_literal, extend it: std::ptrdiff_t off = getoffset(m_last_state); m_pdata->m_data.extend(sizeof(charT)); m_last_state = result = static_cast(getaddress(off)); charT* characters = static_cast(static_cast(result+1)); characters[result->length] = m_traits.translate(c, m_icase); ++(result->length); } return result; } template inline re_syntax_base* basic_regex_creator::append_set( const basic_char_set& char_set) { typedef mpl::bool_< (sizeof(charT) == 1) > truth_type; return char_set.has_digraphs() ? append_set(char_set, static_cast(0)) : append_set(char_set, static_cast(0)); } template re_syntax_base* basic_regex_creator::append_set( const basic_char_set& char_set, mpl::false_*) { typedef typename traits::string_type string_type; typedef typename basic_char_set::list_iterator item_iterator; typedef typename traits::char_class_type m_type; re_set_long* result = static_cast*>(append_state(syntax_element_long_set, sizeof(re_set_long))); // // fill in the basics: // result->csingles = static_cast(::boost::re_detail::distance(char_set.singles_begin(), char_set.singles_end())); result->cranges = static_cast(::boost::re_detail::distance(char_set.ranges_begin(), char_set.ranges_end())) / 2; result->cequivalents = static_cast(::boost::re_detail::distance(char_set.equivalents_begin(), char_set.equivalents_end())); result->cclasses = char_set.classes(); result->cnclasses = char_set.negated_classes(); if(flags() & regbase::icase) { // adjust classes as needed: if(((result->cclasses & m_lower_mask) == m_lower_mask) || ((result->cclasses & m_upper_mask) == m_upper_mask)) result->cclasses |= m_alpha_mask; if(((result->cnclasses & m_lower_mask) == m_lower_mask) || ((result->cnclasses & m_upper_mask) == m_upper_mask)) result->cnclasses |= m_alpha_mask; } result->isnot = char_set.is_negated(); result->singleton = !char_set.has_digraphs(); // // remember where the state is for later: // std::ptrdiff_t offset = getoffset(result); // // now extend with all the singles: // item_iterator first, last; first = char_set.singles_begin(); last = char_set.singles_end(); while(first != last) { charT* p = static_cast(this->m_pdata->m_data.extend(sizeof(charT) * (first->second ? 3 : 2))); p[0] = m_traits.translate(first->first, m_icase); if(first->second) { p[1] = m_traits.translate(first->second, m_icase); p[2] = 0; } else p[1] = 0; ++first; } // // now extend with all the ranges: // first = char_set.ranges_begin(); last = char_set.ranges_end(); while(first != last) { // first grab the endpoints of the range: digraph c1 = *first; c1.first = this->m_traits.translate(c1.first, this->m_icase); c1.second = this->m_traits.translate(c1.second, this->m_icase); ++first; digraph c2 = *first; c2.first = this->m_traits.translate(c2.first, this->m_icase); c2.second = this->m_traits.translate(c2.second, this->m_icase); ++first; string_type s1, s2; // different actions now depending upon whether collation is turned on: if(flags() & regex_constants::collate) { // we need to transform our range into sort keys: #if BOOST_WORKAROUND(__GNUC__, < 3) string_type in(3, charT(0)); in[0] = c1.first; in[1] = c1.second; s1 = this->m_traits.transform(in.c_str(), (in[1] ? in.c_str()+2 : in.c_str()+1)); in[0] = c2.first; in[1] = c2.second; s2 = this->m_traits.transform(in.c_str(), (in[1] ? in.c_str()+2 : in.c_str()+1)); #else charT a1[3] = { c1.first, c1.second, charT(0), }; charT a2[3] = { c2.first, c2.second, charT(0), }; s1 = this->m_traits.transform(a1, (a1[1] ? a1+2 : a1+1)); s2 = this->m_traits.transform(a2, (a2[1] ? a2+2 : a2+1)); #endif if(s1.size() == 0) s1 = string_type(1, charT(0)); if(s2.size() == 0) s2 = string_type(1, charT(0)); } else { if(c1.second) { s1.insert(s1.end(), c1.first); s1.insert(s1.end(), c1.second); } else s1 = string_type(1, c1.first); if(c2.second) { s2.insert(s2.end(), c2.first); s2.insert(s2.end(), c2.second); } else s2.insert(s2.end(), c2.first); } if(s1 > s2) { // Oops error: return 0; } charT* p = static_cast(this->m_pdata->m_data.extend(sizeof(charT) * (s1.size() + s2.size() + 2) ) ); re_detail::copy(s1.begin(), s1.end(), p); p[s1.size()] = charT(0); p += s1.size() + 1; re_detail::copy(s2.begin(), s2.end(), p); p[s2.size()] = charT(0); } // // now process the equivalence classes: // first = char_set.equivalents_begin(); last = char_set.equivalents_end(); while(first != last) { string_type s; if(first->second) { #if BOOST_WORKAROUND(__GNUC__, < 3) string_type in(3, charT(0)); in[0] = first->first; in[1] = first->second; s = m_traits.transform_primary(in.c_str(), in.c_str()+2); #else charT cs[3] = { first->first, first->second, charT(0), }; s = m_traits.transform_primary(cs, cs+2); #endif } else s = m_traits.transform_primary(&first->first, &first->first+1); if(s.empty()) return 0; // invalid or unsupported equivalence class charT* p = static_cast(this->m_pdata->m_data.extend(sizeof(charT) * (s.size()+1) ) ); re_detail::copy(s.begin(), s.end(), p); p[s.size()] = charT(0); ++first; } // // finally reset the address of our last state: // m_last_state = result = static_cast*>(getaddress(offset)); return result; } template inline bool char_less(T t1, T t2) { return t1 < t2; } inline bool char_less(char t1, char t2) { return static_cast(t1) < static_cast(t2); } inline bool char_less(signed char t1, signed char t2) { return static_cast(t1) < static_cast(t2); } template re_syntax_base* basic_regex_creator::append_set( const basic_char_set& char_set, mpl::true_*) { typedef typename traits::string_type string_type; typedef typename basic_char_set::list_iterator item_iterator; re_set* result = static_cast(append_state(syntax_element_set, sizeof(re_set))); bool negate = char_set.is_negated(); std::memset(result->_map, 0, sizeof(result->_map)); // // handle singles first: // item_iterator first, last; first = char_set.singles_begin(); last = char_set.singles_end(); while(first != last) { for(unsigned int i = 0; i < (1 << CHAR_BIT); ++i) { if(this->m_traits.translate(static_cast(i), this->m_icase) == this->m_traits.translate(first->first, this->m_icase)) result->_map[i] = true; } ++first; } // // OK now handle ranges: // first = char_set.ranges_begin(); last = char_set.ranges_end(); while(first != last) { // first grab the endpoints of the range: charT c1 = this->m_traits.translate(first->first, this->m_icase); ++first; charT c2 = this->m_traits.translate(first->first, this->m_icase); ++first; // different actions now depending upon whether collation is turned on: if(flags() & regex_constants::collate) { // we need to transform our range into sort keys: charT c3[2] = { c1, charT(0), }; string_type s1 = this->m_traits.transform(c3, c3+1); c3[0] = c2; string_type s2 = this->m_traits.transform(c3, c3+1); if(s1 > s2) { // Oops error: return 0; } BOOST_ASSERT(c3[1] == charT(0)); for(unsigned i = 0; i < (1u << CHAR_BIT); ++i) { c3[0] = static_cast(i); string_type s3 = this->m_traits.transform(c3, c3 +1); if((s1 <= s3) && (s3 <= s2)) result->_map[i] = true; } } else { if(char_less(c2, c1)) { // Oops error: return 0; } // everything in range matches: std::memset(result->_map + static_cast(c1), true, 1 + static_cast(c2) - static_cast(c1)); } } // // and now the classes: // typedef typename traits::char_class_type m_type; m_type m = char_set.classes(); if(flags() & regbase::icase) { // adjust m as needed: if(((m & m_lower_mask) == m_lower_mask) || ((m & m_upper_mask) == m_upper_mask)) m |= m_alpha_mask; } if(m != 0) { for(unsigned i = 0; i < (1u << CHAR_BIT); ++i) { if(this->m_traits.isctype(static_cast(i), m)) result->_map[i] = true; } } // // and now the negated classes: // m = char_set.negated_classes(); if(flags() & regbase::icase) { // adjust m as needed: if(((m & m_lower_mask) == m_lower_mask) || ((m & m_upper_mask) == m_upper_mask)) m |= m_alpha_mask; } if(m != 0) { for(unsigned i = 0; i < (1u << CHAR_BIT); ++i) { if(0 == this->m_traits.isctype(static_cast(i), m)) result->_map[i] = true; } } // // now process the equivalence classes: // first = char_set.equivalents_begin(); last = char_set.equivalents_end(); while(first != last) { string_type s; BOOST_ASSERT(static_cast(0) == first->second); s = m_traits.transform_primary(&first->first, &first->first+1); if(s.empty()) return 0; // invalid or unsupported equivalence class for(unsigned i = 0; i < (1u << CHAR_BIT); ++i) { charT c[2] = { (static_cast(i)), charT(0), }; string_type s2 = this->m_traits.transform_primary(c, c+1); if(s == s2) result->_map[i] = true; } ++first; } if(negate) { for(unsigned i = 0; i < (1u << CHAR_BIT); ++i) { result->_map[i] = !(result->_map[i]); } } return result; } template void basic_regex_creator::finalize(const charT* p1, const charT* p2) { if(this->m_pdata->m_status) return; // we've added all the states we need, now finish things off. // start by adding a terminating state: append_state(syntax_element_match); // extend storage to store original expression: std::ptrdiff_t len = p2 - p1; m_pdata->m_expression_len = len; charT* ps = static_cast(m_pdata->m_data.extend(sizeof(charT) * (1 + (p2 - p1)))); m_pdata->m_expression = ps; re_detail::copy(p1, p2, ps); ps[p2 - p1] = 0; // fill in our other data... // successful parsing implies a zero status: m_pdata->m_status = 0; // get the first state of the machine: m_pdata->m_first_state = static_cast(m_pdata->m_data.data()); // fixup pointers in the machine: fixup_pointers(m_pdata->m_first_state); if(m_has_recursions) { m_pdata->m_has_recursions = true; fixup_recursions(m_pdata->m_first_state); if(this->m_pdata->m_status) return; } else m_pdata->m_has_recursions = false; // create nested startmaps: create_startmaps(m_pdata->m_first_state); // create main startmap: std::memset(m_pdata->m_startmap, 0, sizeof(m_pdata->m_startmap)); m_pdata->m_can_be_null = 0; m_bad_repeats = 0; if(m_has_recursions) m_recursion_checks.assign(1 + m_pdata->m_mark_count, false); create_startmap(m_pdata->m_first_state, m_pdata->m_startmap, &(m_pdata->m_can_be_null), mask_all); // get the restart type: m_pdata->m_restart_type = get_restart_type(m_pdata->m_first_state); // optimise a leading repeat if there is one: probe_leading_repeat(m_pdata->m_first_state); } template void basic_regex_creator::fixup_pointers(re_syntax_base* state) { while(state) { switch(state->type) { case syntax_element_recurse: m_has_recursions = true; if(state->next.i) state->next.p = getaddress(state->next.i, state); else state->next.p = 0; break; case syntax_element_rep: case syntax_element_dot_rep: case syntax_element_char_rep: case syntax_element_short_set_rep: case syntax_element_long_set_rep: // set the state_id of this repeat: static_cast(state)->state_id = m_repeater_id++; BOOST_FALLTHROUGH; case syntax_element_alt: std::memset(static_cast(state)->_map, 0, sizeof(static_cast(state)->_map)); static_cast(state)->can_be_null = 0; BOOST_FALLTHROUGH; case syntax_element_jump: static_cast(state)->alt.p = getaddress(static_cast(state)->alt.i, state); BOOST_FALLTHROUGH; default: if(state->next.i) state->next.p = getaddress(state->next.i, state); else state->next.p = 0; } state = state->next.p; } } template void basic_regex_creator::fixup_recursions(re_syntax_base* state) { re_syntax_base* base = state; while(state) { switch(state->type) { case syntax_element_assert_backref: { // just check that the index is valid: int idx = static_cast(state)->index; if(idx < 0) { idx = -idx-1; if(idx >= 10000) { idx = m_pdata->get_id(idx); if(idx <= 0) { // check of sub-expression that doesn't exist: if(0 == this->m_pdata->m_status) // update the error code if not already set this->m_pdata->m_status = boost::regex_constants::error_bad_pattern; // // clear the expression, we should be empty: // this->m_pdata->m_expression = 0; this->m_pdata->m_expression_len = 0; // // and throw if required: // if(0 == (this->flags() & regex_constants::no_except)) { std::string message = "Encountered a forward reference to a marked sub-expression that does not exist."; boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); e.raise(); } } } } } break; case syntax_element_recurse: { bool ok = false; re_syntax_base* p = base; std::ptrdiff_t idx = static_cast(state)->alt.i; if(idx > 10000) { // // There may be more than one capture group with this hash, just do what Perl // does and recurse to the leftmost: // idx = m_pdata->get_id(static_cast(idx)); } while(p) { if((p->type == syntax_element_startmark) && (static_cast(p)->index == idx)) { // // We've found the target of the recursion, set the jump target: // static_cast(state)->alt.p = p; ok = true; // // Now scan the target for nested repeats: // p = p->next.p; int next_rep_id = 0; while(p) { switch(p->type) { case syntax_element_rep: case syntax_element_dot_rep: case syntax_element_char_rep: case syntax_element_short_set_rep: case syntax_element_long_set_rep: next_rep_id = static_cast(p)->state_id; break; case syntax_element_endmark: if(static_cast(p)->index == idx) next_rep_id = -1; break; default: break; } if(next_rep_id) break; p = p->next.p; } if(next_rep_id > 0) { static_cast(state)->state_id = next_rep_id - 1; } break; } p = p->next.p; } if(!ok) { // recursion to sub-expression that doesn't exist: if(0 == this->m_pdata->m_status) // update the error code if not already set this->m_pdata->m_status = boost::regex_constants::error_bad_pattern; // // clear the expression, we should be empty: // this->m_pdata->m_expression = 0; this->m_pdata->m_expression_len = 0; // // and throw if required: // if(0 == (this->flags() & regex_constants::no_except)) { std::string message = "Encountered a forward reference to a recursive sub-expression that does not exist."; boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); e.raise(); } } } break; default: break; } state = state->next.p; } } template void basic_regex_creator::create_startmaps(re_syntax_base* state) { // non-recursive implementation: // create the last map in the machine first, so that earlier maps // can make use of the result... // // This was originally a recursive implementation, but that caused stack // overflows with complex expressions on small stacks (think COM+). // start by saving the case setting: bool l_icase = m_icase; std::vector > v; while(state) { switch(state->type) { case syntax_element_toggle_case: // we need to track case changes here: m_icase = static_cast(state)->icase; state = state->next.p; continue; case syntax_element_alt: case syntax_element_rep: case syntax_element_dot_rep: case syntax_element_char_rep: case syntax_element_short_set_rep: case syntax_element_long_set_rep: // just push the state onto our stack for now: v.push_back(std::pair(m_icase, state)); state = state->next.p; break; case syntax_element_backstep: // we need to calculate how big the backstep is: static_cast(state)->index = this->calculate_backstep(state->next.p); if(static_cast(state)->index < 0) { // Oops error: if(0 == this->m_pdata->m_status) // update the error code if not already set this->m_pdata->m_status = boost::regex_constants::error_bad_pattern; // // clear the expression, we should be empty: // this->m_pdata->m_expression = 0; this->m_pdata->m_expression_len = 0; // // and throw if required: // if(0 == (this->flags() & regex_constants::no_except)) { std::string message = "Invalid lookbehind assertion encountered in the regular expression."; boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); e.raise(); } } BOOST_FALLTHROUGH; default: state = state->next.p; } } // now work through our list, building all the maps as we go: while(v.size()) { // Initialize m_recursion_checks if we need it: if(m_has_recursions) m_recursion_checks.assign(1 + m_pdata->m_mark_count, false); const std::pair& p = v.back(); m_icase = p.first; state = p.second; v.pop_back(); // Build maps: m_bad_repeats = 0; create_startmap(state->next.p, static_cast(state)->_map, &static_cast(state)->can_be_null, mask_take); m_bad_repeats = 0; if(m_has_recursions) m_recursion_checks.assign(1 + m_pdata->m_mark_count, false); create_startmap(static_cast(state)->alt.p, static_cast(state)->_map, &static_cast(state)->can_be_null, mask_skip); // adjust the type of the state to allow for faster matching: state->type = this->get_repeat_type(state); } // restore case sensitivity: m_icase = l_icase; } template int basic_regex_creator::calculate_backstep(re_syntax_base* state) { typedef typename traits::char_class_type m_type; int result = 0; while(state) { switch(state->type) { case syntax_element_startmark: if((static_cast(state)->index == -1) || (static_cast(state)->index == -2)) { state = static_cast(state->next.p)->alt.p->next.p; continue; } else if(static_cast(state)->index == -3) { state = state->next.p->next.p; continue; } break; case syntax_element_endmark: if((static_cast(state)->index == -1) || (static_cast(state)->index == -2)) return result; break; case syntax_element_literal: result += static_cast(state)->length; break; case syntax_element_wild: case syntax_element_set: result += 1; break; case syntax_element_dot_rep: case syntax_element_char_rep: case syntax_element_short_set_rep: case syntax_element_backref: case syntax_element_rep: case syntax_element_combining: case syntax_element_long_set_rep: case syntax_element_backstep: { re_repeat* rep = static_cast(state); // adjust the type of the state to allow for faster matching: state->type = this->get_repeat_type(state); if((state->type == syntax_element_dot_rep) || (state->type == syntax_element_char_rep) || (state->type == syntax_element_short_set_rep)) { if(rep->max != rep->min) return -1; result += static_cast(rep->min); state = rep->alt.p; continue; } else if(state->type == syntax_element_long_set_rep) { BOOST_ASSERT(rep->next.p->type == syntax_element_long_set); if(static_cast*>(rep->next.p)->singleton == 0) return -1; if(rep->max != rep->min) return -1; result += static_cast(rep->min); state = rep->alt.p; continue; } } return -1; case syntax_element_long_set: if(static_cast*>(state)->singleton == 0) return -1; result += 1; break; case syntax_element_jump: state = static_cast(state)->alt.p; continue; case syntax_element_alt: { int r1 = calculate_backstep(state->next.p); int r2 = calculate_backstep(static_cast(state)->alt.p); if((r1 < 0) || (r1 != r2)) return -1; return result + r1; } default: break; } state = state->next.p; } return -1; } template void basic_regex_creator::create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask) { int not_last_jump = 1; re_syntax_base* recursion_start = 0; int recursion_sub = 0; re_syntax_base* recursion_restart = 0; // track case sensitivity: bool l_icase = m_icase; while(state) { switch(state->type) { case syntax_element_toggle_case: l_icase = static_cast(state)->icase; state = state->next.p; break; case syntax_element_literal: { // don't set anything in *pnull, set each element in l_map // that could match the first character in the literal: if(l_map) { l_map[0] |= mask_init; charT first_char = *static_cast(static_cast(static_cast(state) + 1)); for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i) { if(m_traits.translate(static_cast(i), l_icase) == first_char) l_map[i] |= mask; } } return; } case syntax_element_end_line: { // next character must be a line separator (if there is one): if(l_map) { l_map[0] |= mask_init; l_map[static_cast('\n')] |= mask; l_map[static_cast('\r')] |= mask; l_map[static_cast('\f')] |= mask; l_map[0x85] |= mask; } // now figure out if we can match a NULL string at this point: if(pnull) create_startmap(state->next.p, 0, pnull, mask); return; } case syntax_element_recurse: { if(state->type == syntax_element_startmark) recursion_sub = static_cast(state)->index; else recursion_sub = 0; if(m_recursion_checks[recursion_sub]) { // Infinite recursion!! if(0 == this->m_pdata->m_status) // update the error code if not already set this->m_pdata->m_status = boost::regex_constants::error_bad_pattern; // // clear the expression, we should be empty: // this->m_pdata->m_expression = 0; this->m_pdata->m_expression_len = 0; // // and throw if required: // if(0 == (this->flags() & regex_constants::no_except)) { std::string message = "Encountered an infinite recursion."; boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0); e.raise(); } } else if(recursion_start == 0) { recursion_start = state; recursion_restart = state->next.p; state = static_cast(state)->alt.p; m_recursion_checks[recursion_sub] = true; break; } m_recursion_checks[recursion_sub] = true; // can't handle nested recursion here... BOOST_FALLTHROUGH; } case syntax_element_backref: // can be null, and any character can match: if(pnull) *pnull |= mask; BOOST_FALLTHROUGH; case syntax_element_wild: { // can't be null, any character can match: set_all_masks(l_map, mask); return; } case syntax_element_match: { // must be null, any character can match: set_all_masks(l_map, mask); if(pnull) *pnull |= mask; return; } case syntax_element_word_start: { // recurse, then AND with all the word characters: create_startmap(state->next.p, l_map, pnull, mask); if(l_map) { l_map[0] |= mask_init; for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i) { if(!m_traits.isctype(static_cast(i), m_word_mask)) l_map[i] &= static_cast(~mask); } } return; } case syntax_element_word_end: { // recurse, then AND with all the word characters: create_startmap(state->next.p, l_map, pnull, mask); if(l_map) { l_map[0] |= mask_init; for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i) { if(m_traits.isctype(static_cast(i), m_word_mask)) l_map[i] &= static_cast(~mask); } } return; } case syntax_element_buffer_end: { // we *must be null* : if(pnull) *pnull |= mask; return; } case syntax_element_long_set: if(l_map) { typedef typename traits::char_class_type m_type; if(static_cast*>(state)->singleton) { l_map[0] |= mask_init; for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i) { charT c = static_cast(i); if(&c != re_is_set_member(&c, &c + 1, static_cast*>(state), *m_pdata, l_icase)) l_map[i] |= mask; } } else set_all_masks(l_map, mask); } return; case syntax_element_set: if(l_map) { l_map[0] |= mask_init; for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i) { if(static_cast(state)->_map[ static_cast(m_traits.translate(static_cast(i), l_icase))]) l_map[i] |= mask; } } return; case syntax_element_jump: // take the jump: state = static_cast(state)->alt.p; not_last_jump = -1; break; case syntax_element_alt: case syntax_element_rep: case syntax_element_dot_rep: case syntax_element_char_rep: case syntax_element_short_set_rep: case syntax_element_long_set_rep: { re_alt* rep = static_cast(state); if(rep->_map[0] & mask_init) { if(l_map) { // copy previous results: l_map[0] |= mask_init; for(unsigned int i = 0; i <= UCHAR_MAX; ++i) { if(rep->_map[i] & mask_any) l_map[i] |= mask; } } if(pnull) { if(rep->can_be_null & mask_any) *pnull |= mask; } } else { // we haven't created a startmap for this alternative yet // so take the union of the two options: if(is_bad_repeat(state)) { set_all_masks(l_map, mask); if(pnull) *pnull |= mask; return; } set_bad_repeat(state); create_startmap(state->next.p, l_map, pnull, mask); if((state->type == syntax_element_alt) || (static_cast(state)->min == 0) || (not_last_jump == 0)) create_startmap(rep->alt.p, l_map, pnull, mask); } } return; case syntax_element_soft_buffer_end: // match newline or null: if(l_map) { l_map[0] |= mask_init; l_map[static_cast('\n')] |= mask; l_map[static_cast('\r')] |= mask; } if(pnull) *pnull |= mask; return; case syntax_element_endmark: // need to handle independent subs as a special case: if(static_cast(state)->index < 0) { // can be null, any character can match: set_all_masks(l_map, mask); if(pnull) *pnull |= mask; return; } else if(recursion_start && (recursion_sub != 0) && (recursion_sub == static_cast(state)->index)) { // recursion termination: recursion_start = 0; state = recursion_restart; break; } // // Normally we just go to the next state... but if this sub-expression is // the target of a recursion, then we might be ending a recursion, in which // case we should check whatever follows that recursion, as well as whatever // follows this state: // if(m_pdata->m_has_recursions && static_cast(state)->index) { bool ok = false; re_syntax_base* p = m_pdata->m_first_state; while(p) { if(p->type == syntax_element_recurse) { re_brace* p2 = static_cast(static_cast(p)->alt.p); if((p2->type == syntax_element_startmark) && (p2->index == static_cast(state)->index)) { ok = true; break; } } p = p->next.p; } if(ok) { create_startmap(p->next.p, l_map, pnull, mask); } } state = state->next.p; break; case syntax_element_startmark: // need to handle independent subs as a special case: if(static_cast(state)->index == -3) { state = state->next.p->next.p; break; } BOOST_FALLTHROUGH; default: state = state->next.p; } ++not_last_jump; } } template unsigned basic_regex_creator::get_restart_type(re_syntax_base* state) { // // find out how the machine starts, so we can optimise the search: // while(state) { switch(state->type) { case syntax_element_startmark: case syntax_element_endmark: state = state->next.p; continue; case syntax_element_start_line: return regbase::restart_line; case syntax_element_word_start: return regbase::restart_word; case syntax_element_buffer_start: return regbase::restart_buf; case syntax_element_restart_continue: return regbase::restart_continue; default: state = 0; continue; } } return regbase::restart_any; } template void basic_regex_creator::set_all_masks(unsigned char* bits, unsigned char mask) { // // set mask in all of bits elements, // if bits[0] has mask_init not set then we can // optimise this to a call to memset: // if(bits) { if(bits[0] == 0) (std::memset)(bits, mask, 1u << CHAR_BIT); else { for(unsigned i = 0; i < (1u << CHAR_BIT); ++i) bits[i] |= mask; } bits[0] |= mask_init; } } template bool basic_regex_creator::is_bad_repeat(re_syntax_base* pt) { switch(pt->type) { case syntax_element_rep: case syntax_element_dot_rep: case syntax_element_char_rep: case syntax_element_short_set_rep: case syntax_element_long_set_rep: { unsigned state_id = static_cast(pt)->state_id; if(state_id > sizeof(m_bad_repeats) * CHAR_BIT) return true; // run out of bits, assume we can't traverse this one. static const boost::uintmax_t one = 1uL; return m_bad_repeats & (one << state_id); } default: return false; } } template void basic_regex_creator::set_bad_repeat(re_syntax_base* pt) { switch(pt->type) { case syntax_element_rep: case syntax_element_dot_rep: case syntax_element_char_rep: case syntax_element_short_set_rep: case syntax_element_long_set_rep: { unsigned state_id = static_cast(pt)->state_id; static const boost::uintmax_t one = 1uL; if(state_id <= sizeof(m_bad_repeats) * CHAR_BIT) m_bad_repeats |= (one << state_id); } break; default: break; } } template syntax_element_type basic_regex_creator::get_repeat_type(re_syntax_base* state) { typedef typename traits::char_class_type m_type; if(state->type == syntax_element_rep) { // check to see if we are repeating a single state: if(state->next.p->next.p->next.p == static_cast(state)->alt.p) { switch(state->next.p->type) { case re_detail::syntax_element_wild: return re_detail::syntax_element_dot_rep; case re_detail::syntax_element_literal: return re_detail::syntax_element_char_rep; case re_detail::syntax_element_set: return re_detail::syntax_element_short_set_rep; case re_detail::syntax_element_long_set: if(static_cast*>(state->next.p)->singleton) return re_detail::syntax_element_long_set_rep; break; default: break; } } } return state->type; } template void basic_regex_creator::probe_leading_repeat(re_syntax_base* state) { // enumerate our states, and see if we have a leading repeat // for which failed search restarts can be optimised; do { switch(state->type) { case syntax_element_startmark: if(static_cast(state)->index >= 0) { state = state->next.p; continue; } if((static_cast(state)->index == -1) || (static_cast(state)->index == -2)) { // skip past the zero width assertion: state = static_cast(state->next.p)->alt.p->next.p; continue; } if(static_cast(state)->index == -3) { // Have to skip the leading jump state: state = state->next.p->next.p; continue; } return; case syntax_element_endmark: case syntax_element_start_line: case syntax_element_end_line: case syntax_element_word_boundary: case syntax_element_within_word: case syntax_element_word_start: case syntax_element_word_end: case syntax_element_buffer_start: case syntax_element_buffer_end: case syntax_element_restart_continue: state = state->next.p; break; case syntax_element_dot_rep: case syntax_element_char_rep: case syntax_element_short_set_rep: case syntax_element_long_set_rep: if(this->m_has_backrefs == 0) static_cast(state)->leading = true; BOOST_FALLTHROUGH; default: return; } }while(state); } } // namespace re_detail } // namespace boost #ifdef BOOST_MSVC # pragma warning(pop) #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/basic_regex_parser.hpp000644 000765 000024 00000306053 12233035540 024154 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE basic_regex_parser.cpp * VERSION see * DESCRIPTION: Declares template class basic_regex_parser. */ #ifndef BOOST_REGEX_V4_BASIC_REGEX_PARSER_HPP #define BOOST_REGEX_V4_BASIC_REGEX_PARSER_HPP #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ namespace re_detail{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4244 4800) #endif template class basic_regex_parser : public basic_regex_creator { public: basic_regex_parser(regex_data* data); void parse(const charT* p1, const charT* p2, unsigned flags); void fail(regex_constants::error_type error_code, std::ptrdiff_t position); void fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos); void fail(regex_constants::error_type error_code, std::ptrdiff_t position, const std::string& message) { fail(error_code, position, message, position); } bool parse_all(); bool parse_basic(); bool parse_extended(); bool parse_literal(); bool parse_open_paren(); bool parse_basic_escape(); bool parse_extended_escape(); bool parse_match_any(); bool parse_repeat(std::size_t low = 0, std::size_t high = (std::numeric_limits::max)()); bool parse_repeat_range(bool isbasic); bool parse_alt(); bool parse_set(); bool parse_backref(); void parse_set_literal(basic_char_set& char_set); bool parse_inner_set(basic_char_set& char_set); bool parse_QE(); bool parse_perl_extension(); bool add_emacs_code(bool negate); bool unwind_alts(std::ptrdiff_t last_paren_start); digraph get_next_set_literal(basic_char_set& char_set); charT unescape_character(); regex_constants::syntax_option_type parse_options(); private: typedef bool (basic_regex_parser::*parser_proc_type)(); typedef typename traits::string_type string_type; typedef typename traits::char_class_type char_class_type; parser_proc_type m_parser_proc; // the main parser to use const charT* m_base; // the start of the string being parsed const charT* m_end; // the end of the string being parsed const charT* m_position; // our current parser position unsigned m_mark_count; // how many sub-expressions we have int m_mark_reset; // used to indicate that we're inside a (?|...) block. unsigned m_max_mark; // largest mark count seen inside a (?|...) block. std::ptrdiff_t m_paren_start; // where the last seen ')' began (where repeats are inserted). std::ptrdiff_t m_alt_insert_point; // where to insert the next alternative bool m_has_case_change; // true if somewhere in the current block the case has changed #if defined(BOOST_MSVC) && defined(_M_IX86) // This is an ugly warning suppression workaround (for warnings *inside* std::vector // that can not otherwise be suppressed)... BOOST_STATIC_ASSERT(sizeof(long) >= sizeof(void*)); std::vector m_alt_jumps; // list of alternative in the current scope. #else std::vector m_alt_jumps; // list of alternative in the current scope. #endif basic_regex_parser& operator=(const basic_regex_parser&); basic_regex_parser(const basic_regex_parser&); }; template basic_regex_parser::basic_regex_parser(regex_data* data) : basic_regex_creator(data), m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false) { } template void basic_regex_parser::parse(const charT* p1, const charT* p2, unsigned l_flags) { // pass l_flags on to base class: this->init(l_flags); // set up pointers: m_position = m_base = p1; m_end = p2; // empty strings are errors: if((p1 == p2) && ( ((l_flags & regbase::main_option_type) != regbase::perl_syntax_group) || (l_flags & regbase::no_empty_expressions) ) ) { fail(regex_constants::error_empty, 0); return; } // select which parser to use: switch(l_flags & regbase::main_option_type) { case regbase::perl_syntax_group: { m_parser_proc = &basic_regex_parser::parse_extended; // // Add a leading paren with index zero to give recursions a target: // re_brace* br = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); br->index = 0; br->icase = this->flags() & regbase::icase; break; } case regbase::basic_syntax_group: m_parser_proc = &basic_regex_parser::parse_basic; break; case regbase::literal: m_parser_proc = &basic_regex_parser::parse_literal; break; default: // Ooops, someone has managed to set more than one of the main option flags, // so this must be an error: fail(regex_constants::error_unknown, 0, "An invalid combination of regular expression syntax flags was used."); return; } // parse all our characters: bool result = parse_all(); // // Unwind our alternatives: // unwind_alts(-1); // reset l_flags as a global scope (?imsx) may have altered them: this->flags(l_flags); // if we haven't gobbled up all the characters then we must // have had an unexpected ')' : if(!result) { fail(regex_constants::error_paren, ::boost::re_detail::distance(m_base, m_position), "Found a closing ) with no corresponding openening parenthesis."); return; } // if an error has been set then give up now: if(this->m_pdata->m_status) return; // fill in our sub-expression count: this->m_pdata->m_mark_count = 1 + m_mark_count; this->finalize(p1, p2); } template void basic_regex_parser::fail(regex_constants::error_type error_code, std::ptrdiff_t position) { // get the error message: std::string message = this->m_pdata->m_ptraits->error_string(error_code); fail(error_code, position, message); } template void basic_regex_parser::fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos) { if(0 == this->m_pdata->m_status) // update the error code if not already set this->m_pdata->m_status = error_code; m_position = m_end; // don't bother parsing anything else #ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS // // Augment error message with the regular expression text: // if(start_pos == position) start_pos = (std::max)(static_cast(0), position - static_cast(10)); std::ptrdiff_t end_pos = (std::min)(position + static_cast(10), static_cast(m_end - m_base)); if(error_code != regex_constants::error_empty) { if((start_pos != 0) || (end_pos != (m_end - m_base))) message += " The error occurred while parsing the regular expression fragment: '"; else message += " The error occurred while parsing the regular expression: '"; if(start_pos != end_pos) { message += std::string(m_base + start_pos, m_base + position); message += ">>>HERE>>>"; message += std::string(m_base + position, m_base + end_pos); } message += "'."; } #endif #ifndef BOOST_NO_EXCEPTIONS if(0 == (this->flags() & regex_constants::no_except)) { boost::regex_error e(message, error_code, position); e.raise(); } #else (void)position; // suppress warnings. #endif } template bool basic_regex_parser::parse_all() { bool result = true; while(result && (m_position != m_end)) { result = (this->*m_parser_proc)(); } return result; } #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4702) #endif template bool basic_regex_parser::parse_basic() { switch(this->m_traits.syntax_type(*m_position)) { case regex_constants::syntax_escape: return parse_basic_escape(); case regex_constants::syntax_dot: return parse_match_any(); case regex_constants::syntax_caret: ++m_position; this->append_state(syntax_element_start_line); break; case regex_constants::syntax_dollar: ++m_position; this->append_state(syntax_element_end_line); break; case regex_constants::syntax_star: if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line)) return parse_literal(); else { ++m_position; return parse_repeat(); } case regex_constants::syntax_plus: if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line) || !(this->flags() & regbase::emacs_ex)) return parse_literal(); else { ++m_position; return parse_repeat(1); } case regex_constants::syntax_question: if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line) || !(this->flags() & regbase::emacs_ex)) return parse_literal(); else { ++m_position; return parse_repeat(0, 1); } case regex_constants::syntax_open_set: return parse_set(); case regex_constants::syntax_newline: if(this->flags() & regbase::newline_alt) return parse_alt(); else return parse_literal(); default: return parse_literal(); } return true; } template bool basic_regex_parser::parse_extended() { bool result = true; switch(this->m_traits.syntax_type(*m_position)) { case regex_constants::syntax_open_mark: return parse_open_paren(); case regex_constants::syntax_close_mark: return false; case regex_constants::syntax_escape: return parse_extended_escape(); case regex_constants::syntax_dot: return parse_match_any(); case regex_constants::syntax_caret: ++m_position; this->append_state( (this->flags() & regex_constants::no_mod_m ? syntax_element_buffer_start : syntax_element_start_line)); break; case regex_constants::syntax_dollar: ++m_position; this->append_state( (this->flags() & regex_constants::no_mod_m ? syntax_element_buffer_end : syntax_element_end_line)); break; case regex_constants::syntax_star: if(m_position == this->m_base) { fail(regex_constants::error_badrepeat, 0, "The repeat operator \"*\" cannot start a regular expression."); return false; } ++m_position; return parse_repeat(); case regex_constants::syntax_question: if(m_position == this->m_base) { fail(regex_constants::error_badrepeat, 0, "The repeat operator \"?\" cannot start a regular expression."); return false; } ++m_position; return parse_repeat(0,1); case regex_constants::syntax_plus: if(m_position == this->m_base) { fail(regex_constants::error_badrepeat, 0, "The repeat operator \"+\" cannot start a regular expression."); return false; } ++m_position; return parse_repeat(1); case regex_constants::syntax_open_brace: ++m_position; return parse_repeat_range(false); case regex_constants::syntax_close_brace: fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {."); return false; case regex_constants::syntax_or: return parse_alt(); case regex_constants::syntax_open_set: return parse_set(); case regex_constants::syntax_newline: if(this->flags() & regbase::newline_alt) return parse_alt(); else return parse_literal(); case regex_constants::syntax_hash: // // If we have a mod_x flag set, then skip until // we get to a newline character: // if((this->flags() & (regbase::no_perl_ex|regbase::mod_x)) == regbase::mod_x) { while((m_position != m_end) && !is_separator(*m_position++)){} return true; } BOOST_FALLTHROUGH; default: result = parse_literal(); break; } return result; } #ifdef BOOST_MSVC #pragma warning(pop) #endif template bool basic_regex_parser::parse_literal() { // append this as a literal provided it's not a space character // or the perl option regbase::mod_x is not set: if( ((this->flags() & (regbase::main_option_type|regbase::mod_x|regbase::no_perl_ex)) != regbase::mod_x) || !this->m_traits.isctype(*m_position, this->m_mask_space)) this->append_literal(*m_position); ++m_position; return true; } template bool basic_regex_parser::parse_open_paren() { // // skip the '(' and error check: // if(++m_position == m_end) { fail(regex_constants::error_paren, m_position - m_base); return false; } // // begin by checking for a perl-style (?...) extension: // if( ((this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) == 0) || ((this->flags() & (regbase::main_option_type | regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex)) ) { if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question) return parse_perl_extension(); } // // update our mark count, and append the required state: // unsigned markid = 0; if(0 == (this->flags() & regbase::nosubs)) { markid = ++m_mark_count; #ifndef BOOST_NO_STD_DISTANCE if(this->flags() & regbase::save_subexpression_location) this->m_pdata->m_subs.push_back(std::pair(std::distance(m_base, m_position) - 1, 0)); #else if(this->flags() & regbase::save_subexpression_location) this->m_pdata->m_subs.push_back(std::pair((m_position - m_base) - 1, 0)); #endif } re_brace* pb = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); pb->index = markid; pb->icase = this->flags() & regbase::icase; std::ptrdiff_t last_paren_start = this->getoffset(pb); // back up insertion point for alternations, and set new point: std::ptrdiff_t last_alt_point = m_alt_insert_point; this->m_pdata->m_data.align(); m_alt_insert_point = this->m_pdata->m_data.size(); // // back up the current flags in case we have a nested (?imsx) group: // regex_constants::syntax_option_type opts = this->flags(); bool old_case_change = m_has_case_change; m_has_case_change = false; // no changes to this scope as yet... // // Back up branch reset data in case we have a nested (?|...) // int mark_reset = m_mark_reset; m_mark_reset = -1; // // now recursively add more states, this will terminate when we get to a // matching ')' : // parse_all(); // // Unwind pushed alternatives: // if(0 == unwind_alts(last_paren_start)) return false; // // restore flags: // if(m_has_case_change) { // the case has changed in one or more of the alternatives // within the scoped (...) block: we have to add a state // to reset the case sensitivity: static_cast( this->append_state(syntax_element_toggle_case, sizeof(re_case)) )->icase = opts & regbase::icase; } this->flags(opts); m_has_case_change = old_case_change; // // restore branch reset: // m_mark_reset = mark_reset; // // we either have a ')' or we have run out of characters prematurely: // if(m_position == m_end) { this->fail(regex_constants::error_paren, ::boost::re_detail::distance(m_base, m_end)); return false; } BOOST_ASSERT(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark); #ifndef BOOST_NO_STD_DISTANCE if(markid && (this->flags() & regbase::save_subexpression_location)) this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position); #else if(markid && (this->flags() & regbase::save_subexpression_location)) this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base); #endif ++m_position; // // append closing parenthesis state: // pb = static_cast(this->append_state(syntax_element_endmark, sizeof(re_brace))); pb->index = markid; pb->icase = this->flags() & regbase::icase; this->m_paren_start = last_paren_start; // // restore the alternate insertion point: // this->m_alt_insert_point = last_alt_point; // // allow backrefs to this mark: // if((markid > 0) && (markid < sizeof(unsigned) * CHAR_BIT)) this->m_backrefs |= 1u << (markid - 1); return true; } template bool basic_regex_parser::parse_basic_escape() { ++m_position; bool result = true; switch(this->m_traits.escape_syntax_type(*m_position)) { case regex_constants::syntax_open_mark: return parse_open_paren(); case regex_constants::syntax_close_mark: return false; case regex_constants::syntax_plus: if(this->flags() & regex_constants::bk_plus_qm) { ++m_position; return parse_repeat(1); } else return parse_literal(); case regex_constants::syntax_question: if(this->flags() & regex_constants::bk_plus_qm) { ++m_position; return parse_repeat(0, 1); } else return parse_literal(); case regex_constants::syntax_open_brace: if(this->flags() & regbase::no_intervals) return parse_literal(); ++m_position; return parse_repeat_range(true); case regex_constants::syntax_close_brace: if(this->flags() & regbase::no_intervals) return parse_literal(); fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {."); return false; case regex_constants::syntax_or: if(this->flags() & regbase::bk_vbar) return parse_alt(); else result = parse_literal(); break; case regex_constants::syntax_digit: return parse_backref(); case regex_constants::escape_type_start_buffer: if(this->flags() & regbase::emacs_ex) { ++m_position; this->append_state(syntax_element_buffer_start); } else result = parse_literal(); break; case regex_constants::escape_type_end_buffer: if(this->flags() & regbase::emacs_ex) { ++m_position; this->append_state(syntax_element_buffer_end); } else result = parse_literal(); break; case regex_constants::escape_type_word_assert: if(this->flags() & regbase::emacs_ex) { ++m_position; this->append_state(syntax_element_word_boundary); } else result = parse_literal(); break; case regex_constants::escape_type_not_word_assert: if(this->flags() & regbase::emacs_ex) { ++m_position; this->append_state(syntax_element_within_word); } else result = parse_literal(); break; case regex_constants::escape_type_left_word: if(this->flags() & regbase::emacs_ex) { ++m_position; this->append_state(syntax_element_word_start); } else result = parse_literal(); break; case regex_constants::escape_type_right_word: if(this->flags() & regbase::emacs_ex) { ++m_position; this->append_state(syntax_element_word_end); } else result = parse_literal(); break; default: if(this->flags() & regbase::emacs_ex) { bool negate = true; switch(*m_position) { case 'w': negate = false; BOOST_FALLTHROUGH; case 'W': { basic_char_set char_set; if(negate) char_set.negate(); char_set.add_class(this->m_word_mask); if(0 == this->append_set(char_set)) { fail(regex_constants::error_ctype, m_position - m_base); return false; } ++m_position; return true; } case 's': negate = false; BOOST_FALLTHROUGH; case 'S': return add_emacs_code(negate); case 'c': case 'C': // not supported yet: fail(regex_constants::error_escape, m_position - m_base, "The \\c and \\C escape sequences are not supported by POSIX basic regular expressions: try the Perl syntax instead."); return false; default: break; } } result = parse_literal(); break; } return result; } template bool basic_regex_parser::parse_extended_escape() { ++m_position; if(m_position == m_end) { fail(regex_constants::error_escape, m_position - m_base, "Incomplete escape sequence found."); return false; } bool negate = false; // in case this is a character class escape: \w \d etc switch(this->m_traits.escape_syntax_type(*m_position)) { case regex_constants::escape_type_not_class: negate = true; BOOST_FALLTHROUGH; case regex_constants::escape_type_class: { escape_type_class_jump: typedef typename traits::char_class_type m_type; m_type m = this->m_traits.lookup_classname(m_position, m_position+1); if(m != 0) { basic_char_set char_set; if(negate) char_set.negate(); char_set.add_class(m); if(0 == this->append_set(char_set)) { fail(regex_constants::error_ctype, m_position - m_base); return false; } ++m_position; return true; } // // not a class, just a regular unknown escape: // this->append_literal(unescape_character()); break; } case regex_constants::syntax_digit: return parse_backref(); case regex_constants::escape_type_left_word: ++m_position; this->append_state(syntax_element_word_start); break; case regex_constants::escape_type_right_word: ++m_position; this->append_state(syntax_element_word_end); break; case regex_constants::escape_type_start_buffer: ++m_position; this->append_state(syntax_element_buffer_start); break; case regex_constants::escape_type_end_buffer: ++m_position; this->append_state(syntax_element_buffer_end); break; case regex_constants::escape_type_word_assert: ++m_position; this->append_state(syntax_element_word_boundary); break; case regex_constants::escape_type_not_word_assert: ++m_position; this->append_state(syntax_element_within_word); break; case regex_constants::escape_type_Z: ++m_position; this->append_state(syntax_element_soft_buffer_end); break; case regex_constants::escape_type_Q: return parse_QE(); case regex_constants::escape_type_C: return parse_match_any(); case regex_constants::escape_type_X: ++m_position; this->append_state(syntax_element_combining); break; case regex_constants::escape_type_G: ++m_position; this->append_state(syntax_element_restart_continue); break; case regex_constants::escape_type_not_property: negate = true; BOOST_FALLTHROUGH; case regex_constants::escape_type_property: { ++m_position; char_class_type m; if(m_position == m_end) { fail(regex_constants::error_escape, m_position - m_base, "Incomplete property escape found."); return false; } // maybe have \p{ddd} if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace) { const charT* base = m_position; // skip forward until we find enclosing brace: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace)) ++m_position; if(m_position == m_end) { fail(regex_constants::error_escape, m_position - m_base, "Closing } missing from property escape sequence."); return false; } m = this->m_traits.lookup_classname(++base, m_position++); } else { m = this->m_traits.lookup_classname(m_position, m_position+1); ++m_position; } if(m != 0) { basic_char_set char_set; if(negate) char_set.negate(); char_set.add_class(m); if(0 == this->append_set(char_set)) { fail(regex_constants::error_ctype, m_position - m_base); return false; } return true; } fail(regex_constants::error_ctype, m_position - m_base, "Escape sequence was neither a valid property nor a valid character class name."); return false; } case regex_constants::escape_type_reset_start_mark: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) { re_brace* pb = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); pb->index = -5; pb->icase = this->flags() & regbase::icase; this->m_pdata->m_data.align(); ++m_position; return true; } goto escape_type_class_jump; case regex_constants::escape_type_line_ending: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) { const charT* e = get_escape_R_string(); const charT* old_position = m_position; const charT* old_end = m_end; const charT* old_base = m_base; m_position = e; m_base = e; m_end = e + traits::length(e); bool r = parse_all(); m_position = ++old_position; m_end = old_end; m_base = old_base; return r; } goto escape_type_class_jump; case regex_constants::escape_type_extended_backref: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) { bool have_brace = false; bool negative = false; static const char* incomplete_message = "Incomplete \\g escape found."; if(++m_position == m_end) { fail(regex_constants::error_escape, m_position - m_base, incomplete_message); return false; } // maybe have \g{ddd} regex_constants::syntax_type syn = this->m_traits.syntax_type(*m_position); regex_constants::syntax_type syn_end = 0; if((syn == regex_constants::syntax_open_brace) || (syn == regex_constants::escape_type_left_word) || (syn == regex_constants::escape_type_end_buffer)) { if(++m_position == m_end) { fail(regex_constants::error_escape, m_position - m_base, incomplete_message); return false; } have_brace = true; switch(syn) { case regex_constants::syntax_open_brace: syn_end = regex_constants::syntax_close_brace; break; case regex_constants::escape_type_left_word: syn_end = regex_constants::escape_type_right_word; break; default: syn_end = regex_constants::escape_type_end_buffer; break; } } negative = (*m_position == static_cast('-')); if((negative) && (++m_position == m_end)) { fail(regex_constants::error_escape, m_position - m_base, incomplete_message); return false; } const charT* pc = m_position; int i = this->m_traits.toi(pc, m_end, 10); if((i < 0) && syn_end) { // Check for a named capture, get the leftmost one if there is more than one: const charT* base = m_position; while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != syn_end)) { ++m_position; } i = hash_value_from_capture_name(base, m_position); pc = m_position; } if(negative) i = 1 + m_mark_count - i; if(((i > 0) && (this->m_backrefs & (1u << (i-1)))) || ((i > 10000) && (this->m_pdata->get_id(i) > 0) && (this->m_backrefs & (1u << (this->m_pdata->get_id(i)-1))))) { m_position = pc; re_brace* pb = static_cast(this->append_state(syntax_element_backref, sizeof(re_brace))); pb->index = i; pb->icase = this->flags() & regbase::icase; } else { fail(regex_constants::error_backref, m_position - m_base); return false; } m_position = pc; if(have_brace) { if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != syn_end)) { fail(regex_constants::error_escape, m_position - m_base, incomplete_message); return false; } ++m_position; } return true; } goto escape_type_class_jump; case regex_constants::escape_type_control_v: if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) goto escape_type_class_jump; BOOST_FALLTHROUGH; default: this->append_literal(unescape_character()); break; } return true; } template bool basic_regex_parser::parse_match_any() { // // we have a '.' that can match any character: // ++m_position; static_cast( this->append_state(syntax_element_wild, sizeof(re_dot)) )->mask = static_cast(this->flags() & regbase::no_mod_s ? re_detail::force_not_newline : this->flags() & regbase::mod_s ? re_detail::force_newline : re_detail::dont_care); return true; } template bool basic_regex_parser::parse_repeat(std::size_t low, std::size_t high) { bool greedy = true; bool pocessive = false; std::size_t insert_point; // // when we get to here we may have a non-greedy ? mark still to come: // if((m_position != m_end) && ( (0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex))) || ((regbase::basic_syntax_group|regbase::emacs_ex) == (this->flags() & (regbase::main_option_type | regbase::emacs_ex))) ) ) { // OK we have a perl or emacs regex, check for a '?': if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question) { greedy = false; ++m_position; } // for perl regexes only check for pocessive ++ repeats. if((m_position != m_end) && (0 == (this->flags() & regbase::main_option_type)) && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus)) { pocessive = true; ++m_position; } } if(0 == this->m_last_state) { fail(regex_constants::error_badrepeat, ::boost::re_detail::distance(m_base, m_position), "Nothing to repeat."); return false; } if(this->m_last_state->type == syntax_element_endmark) { // insert a repeat before the '(' matching the last ')': insert_point = this->m_paren_start; } else if((this->m_last_state->type == syntax_element_literal) && (static_cast(this->m_last_state)->length > 1)) { // the last state was a literal with more than one character, split it in two: re_literal* lit = static_cast(this->m_last_state); charT c = (static_cast(static_cast(lit+1)))[lit->length - 1]; --(lit->length); // now append new state: lit = static_cast(this->append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT))); lit->length = 1; (static_cast(static_cast(lit+1)))[0] = c; insert_point = this->getoffset(this->m_last_state); } else { // repeat the last state whatever it was, need to add some error checking here: switch(this->m_last_state->type) { case syntax_element_start_line: case syntax_element_end_line: case syntax_element_word_boundary: case syntax_element_within_word: case syntax_element_word_start: case syntax_element_word_end: case syntax_element_buffer_start: case syntax_element_buffer_end: case syntax_element_alt: case syntax_element_soft_buffer_end: case syntax_element_restart_continue: case syntax_element_jump: case syntax_element_startmark: case syntax_element_backstep: // can't legally repeat any of the above: fail(regex_constants::error_badrepeat, m_position - m_base); return false; default: // do nothing... break; } insert_point = this->getoffset(this->m_last_state); } // // OK we now know what to repeat, so insert the repeat around it: // re_repeat* rep = static_cast(this->insert_state(insert_point, syntax_element_rep, re_repeater_size)); rep->min = low; rep->max = high; rep->greedy = greedy; rep->leading = false; // store our repeater position for later: std::ptrdiff_t rep_off = this->getoffset(rep); // and append a back jump to the repeat: re_jump* jmp = static_cast(this->append_state(syntax_element_jump, sizeof(re_jump))); jmp->alt.i = rep_off - this->getoffset(jmp); this->m_pdata->m_data.align(); // now fill in the alt jump for the repeat: rep = static_cast(this->getaddress(rep_off)); rep->alt.i = this->m_pdata->m_data.size() - rep_off; // // If the repeat is pocessive then bracket the repeat with a (?>...) // independent sub-expression construct: // if(pocessive) { if(m_position != m_end) { // // Check for illegal following quantifier, we have to do this here, because // the extra states we insert below circumvents our usual error checking :-( // switch(this->m_traits.syntax_type(*m_position)) { case regex_constants::syntax_star: case regex_constants::syntax_plus: case regex_constants::syntax_question: case regex_constants::syntax_open_brace: fail(regex_constants::error_badrepeat, m_position - m_base); return false; } } re_brace* pb = static_cast(this->insert_state(insert_point, syntax_element_startmark, sizeof(re_brace))); pb->index = -3; pb->icase = this->flags() & regbase::icase; jmp = static_cast(this->insert_state(insert_point + sizeof(re_brace), syntax_element_jump, sizeof(re_jump))); this->m_pdata->m_data.align(); jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp); pb = static_cast(this->append_state(syntax_element_endmark, sizeof(re_brace))); pb->index = -3; pb->icase = this->flags() & regbase::icase; } return true; } template bool basic_regex_parser::parse_repeat_range(bool isbasic) { static const char* incomplete_message = "Missing } in quantified repetition."; // // parse a repeat-range: // std::size_t min, max; int v; // skip whitespace: while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) ++m_position; if(this->m_position == this->m_end) { if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) { fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); return false; } // Treat the opening '{' as a literal character, rewind to start of error: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; return parse_literal(); } // get min: v = this->m_traits.toi(m_position, m_end, 10); // skip whitespace: if(v < 0) { if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) { fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); return false; } // Treat the opening '{' as a literal character, rewind to start of error: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; return parse_literal(); } while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) ++m_position; if(this->m_position == this->m_end) { if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) { fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); return false; } // Treat the opening '{' as a literal character, rewind to start of error: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; return parse_literal(); } min = v; // see if we have a comma: if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_comma) { // move on and error check: ++m_position; // skip whitespace: while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) ++m_position; if(this->m_position == this->m_end) { if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) { fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); return false; } // Treat the opening '{' as a literal character, rewind to start of error: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; return parse_literal(); } // get the value if any: v = this->m_traits.toi(m_position, m_end, 10); max = (v >= 0) ? (std::size_t)v : (std::numeric_limits::max)(); } else { // no comma, max = min: max = min; } // skip whitespace: while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) ++m_position; // OK now check trailing }: if(this->m_position == this->m_end) { if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) { fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); return false; } // Treat the opening '{' as a literal character, rewind to start of error: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; return parse_literal(); } if(isbasic) { if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_escape) { ++m_position; if(this->m_position == this->m_end) { fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); return false; } } else { fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); return false; } } if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_brace) ++m_position; else { // Treat the opening '{' as a literal character, rewind to start of error: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; return parse_literal(); } // // finally go and add the repeat, unless error: // if(min > max) { // Backtrack to error location: m_position -= 2; while(this->m_traits.isctype(*m_position, this->m_word_mask)) --m_position; ++m_position; fail(regex_constants::error_badbrace, m_position - m_base); return false; } return parse_repeat(min, max); } template bool basic_regex_parser::parse_alt() { // // error check: if there have been no previous states, // or if the last state was a '(' then error: // if( ((this->m_last_state == 0) || (this->m_last_state->type == syntax_element_startmark)) && !( ((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) && ((this->flags() & regbase::no_empty_expressions) == 0) ) ) { fail(regex_constants::error_empty, this->m_position - this->m_base, "A regular expression can start with the alternation operator |."); return false; } // // Reset mark count if required: // if(m_max_mark < m_mark_count) m_max_mark = m_mark_count; if(m_mark_reset >= 0) m_mark_count = m_mark_reset; ++m_position; // // we need to append a trailing jump: // re_syntax_base* pj = this->append_state(re_detail::syntax_element_jump, sizeof(re_jump)); std::ptrdiff_t jump_offset = this->getoffset(pj); // // now insert the alternative: // re_alt* palt = static_cast(this->insert_state(this->m_alt_insert_point, syntax_element_alt, re_alt_size)); jump_offset += re_alt_size; this->m_pdata->m_data.align(); palt->alt.i = this->m_pdata->m_data.size() - this->getoffset(palt); // // update m_alt_insert_point so that the next alternate gets // inserted at the start of the second of the two we've just created: // this->m_alt_insert_point = this->m_pdata->m_data.size(); // // the start of this alternative must have a case changes state // if the current block has messed around with case changes: // if(m_has_case_change) { static_cast( this->append_state(syntax_element_toggle_case, sizeof(re_case)) )->icase = this->m_icase; } // // push the alternative onto our stack, a recursive // implementation here is easier to understand (and faster // as it happens), but causes all kinds of stack overflow problems // on programs with small stacks (COM+). // m_alt_jumps.push_back(jump_offset); return true; } template bool basic_regex_parser::parse_set() { static const char* incomplete_message = "Character set declaration starting with [ terminated prematurely - either no ] was found or the set had no content."; ++m_position; if(m_position == m_end) { fail(regex_constants::error_brack, m_position - m_base, incomplete_message); return false; } basic_char_set char_set; const charT* base = m_position; // where the '[' was const charT* item_base = m_position; // where the '[' or '^' was while(m_position != m_end) { switch(this->m_traits.syntax_type(*m_position)) { case regex_constants::syntax_caret: if(m_position == base) { char_set.negate(); ++m_position; item_base = m_position; } else parse_set_literal(char_set); break; case regex_constants::syntax_close_set: if(m_position == item_base) { parse_set_literal(char_set); break; } else { ++m_position; if(0 == this->append_set(char_set)) { fail(regex_constants::error_ctype, m_position - m_base); return false; } } return true; case regex_constants::syntax_open_set: if(parse_inner_set(char_set)) break; return true; case regex_constants::syntax_escape: { // // look ahead and see if this is a character class shortcut // \d \w \s etc... // ++m_position; if(this->m_traits.escape_syntax_type(*m_position) == regex_constants::escape_type_class) { char_class_type m = this->m_traits.lookup_classname(m_position, m_position+1); if(m != 0) { char_set.add_class(m); ++m_position; break; } } else if(this->m_traits.escape_syntax_type(*m_position) == regex_constants::escape_type_not_class) { // negated character class: char_class_type m = this->m_traits.lookup_classname(m_position, m_position+1); if(m != 0) { char_set.add_negated_class(m); ++m_position; break; } } // not a character class, just a regular escape: --m_position; parse_set_literal(char_set); break; } default: parse_set_literal(char_set); break; } } return m_position != m_end; } template bool basic_regex_parser::parse_inner_set(basic_char_set& char_set) { static const char* incomplete_message = "Character class declaration starting with [ terminated prematurely - either no ] was found or the set had no content."; // // we have either a character class [:name:] // a collating element [.name.] // or an equivalence class [=name=] // if(m_end == ++m_position) { fail(regex_constants::error_brack, m_position - m_base, incomplete_message); return false; } switch(this->m_traits.syntax_type(*m_position)) { case regex_constants::syntax_dot: // // a collating element is treated as a literal: // --m_position; parse_set_literal(char_set); return true; case regex_constants::syntax_colon: { // check that character classes are actually enabled: if((this->flags() & (regbase::main_option_type | regbase::no_char_classes)) == (regbase::basic_syntax_group | regbase::no_char_classes)) { --m_position; parse_set_literal(char_set); return true; } // skip the ':' if(m_end == ++m_position) { fail(regex_constants::error_brack, m_position - m_base, incomplete_message); return false; } const charT* name_first = m_position; // skip at least one character, then find the matching ':]' if(m_end == ++m_position) { fail(regex_constants::error_brack, m_position - m_base, incomplete_message); return false; } while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_colon)) ++m_position; const charT* name_last = m_position; if(m_end == m_position) { fail(regex_constants::error_brack, m_position - m_base, incomplete_message); return false; } if((m_end == ++m_position) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) { fail(regex_constants::error_brack, m_position - m_base, incomplete_message); return false; } // // check for negated class: // bool negated = false; if(this->m_traits.syntax_type(*name_first) == regex_constants::syntax_caret) { ++name_first; negated = true; } typedef typename traits::char_class_type m_type; m_type m = this->m_traits.lookup_classname(name_first, name_last); if(m == 0) { if(char_set.empty() && (name_last - name_first == 1)) { // maybe a special case: ++m_position; if( (m_position != m_end) && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_set)) { if(this->m_traits.escape_syntax_type(*name_first) == regex_constants::escape_type_left_word) { ++m_position; this->append_state(syntax_element_word_start); return false; } if(this->m_traits.escape_syntax_type(*name_first) == regex_constants::escape_type_right_word) { ++m_position; this->append_state(syntax_element_word_end); return false; } } } fail(regex_constants::error_ctype, name_first - m_base); return false; } if(negated == false) char_set.add_class(m); else char_set.add_negated_class(m); ++m_position; break; } case regex_constants::syntax_equal: { // skip the '=' if(m_end == ++m_position) { fail(regex_constants::error_brack, m_position - m_base, incomplete_message); return false; } const charT* name_first = m_position; // skip at least one character, then find the matching '=]' if(m_end == ++m_position) { fail(regex_constants::error_brack, m_position - m_base, incomplete_message); return false; } while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)) ++m_position; const charT* name_last = m_position; if(m_end == m_position) { fail(regex_constants::error_brack, m_position - m_base, incomplete_message); return false; } if((m_end == ++m_position) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) { fail(regex_constants::error_brack, m_position - m_base, incomplete_message); return false; } string_type m = this->m_traits.lookup_collatename(name_first, name_last); if((0 == m.size()) || (m.size() > 2)) { fail(regex_constants::error_collate, name_first - m_base); return false; } digraph d; d.first = m[0]; if(m.size() > 1) d.second = m[1]; else d.second = 0; char_set.add_equivalent(d); ++m_position; break; } default: --m_position; parse_set_literal(char_set); break; } return true; } template void basic_regex_parser::parse_set_literal(basic_char_set& char_set) { digraph start_range(get_next_set_literal(char_set)); if(m_end == m_position) { fail(regex_constants::error_brack, m_position - m_base); return; } if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash) { // we have a range: if(m_end == ++m_position) { fail(regex_constants::error_brack, m_position - m_base); return; } if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set) { digraph end_range = get_next_set_literal(char_set); char_set.add_range(start_range, end_range); if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash) { if(m_end == ++m_position) { fail(regex_constants::error_brack, m_position - m_base); return; } if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_set) { // trailing - : --m_position; return; } fail(regex_constants::error_range, m_position - m_base); return; } return; } --m_position; } char_set.add_single(start_range); } template digraph basic_regex_parser::get_next_set_literal(basic_char_set& char_set) { digraph result; switch(this->m_traits.syntax_type(*m_position)) { case regex_constants::syntax_dash: if(!char_set.empty()) { // see if we are at the end of the set: if((++m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) { fail(regex_constants::error_range, m_position - m_base); return result; } --m_position; } result.first = *m_position++; return result; case regex_constants::syntax_escape: // check to see if escapes are supported first: if(this->flags() & regex_constants::no_escape_in_lists) { result = *m_position++; break; } ++m_position; result = unescape_character(); break; case regex_constants::syntax_open_set: { if(m_end == ++m_position) { fail(regex_constants::error_collate, m_position - m_base); return result; } if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_dot) { --m_position; result.first = *m_position; ++m_position; return result; } if(m_end == ++m_position) { fail(regex_constants::error_collate, m_position - m_base); return result; } const charT* name_first = m_position; // skip at least one character, then find the matching ':]' if(m_end == ++m_position) { fail(regex_constants::error_collate, name_first - m_base); return result; } while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_dot)) ++m_position; const charT* name_last = m_position; if(m_end == m_position) { fail(regex_constants::error_collate, name_first - m_base); return result; } if((m_end == ++m_position) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)) { fail(regex_constants::error_collate, name_first - m_base); return result; } ++m_position; string_type s = this->m_traits.lookup_collatename(name_first, name_last); if(s.empty() || (s.size() > 2)) { fail(regex_constants::error_collate, name_first - m_base); return result; } result.first = s[0]; if(s.size() > 1) result.second = s[1]; else result.second = 0; return result; } default: result = *m_position++; } return result; } // // does a value fit in the specified charT type? // template bool valid_value(charT, int v, const mpl::true_&) { return (v >> (sizeof(charT) * CHAR_BIT)) == 0; } template bool valid_value(charT, int, const mpl::false_&) { return true; // v will alsways fit in a charT } template bool valid_value(charT c, int v) { return valid_value(c, v, mpl::bool_<(sizeof(charT) < sizeof(int))>()); } template charT basic_regex_parser::unescape_character() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif charT result(0); if(m_position == m_end) { fail(regex_constants::error_escape, m_position - m_base, "Escape sequence terminated prematurely."); return false; } switch(this->m_traits.escape_syntax_type(*m_position)) { case regex_constants::escape_type_control_a: result = charT('\a'); break; case regex_constants::escape_type_e: result = charT(27); break; case regex_constants::escape_type_control_f: result = charT('\f'); break; case regex_constants::escape_type_control_n: result = charT('\n'); break; case regex_constants::escape_type_control_r: result = charT('\r'); break; case regex_constants::escape_type_control_t: result = charT('\t'); break; case regex_constants::escape_type_control_v: result = charT('\v'); break; case regex_constants::escape_type_word_assert: result = charT('\b'); break; case regex_constants::escape_type_ascii_control: ++m_position; if(m_position == m_end) { // Rewind to start of escape: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; fail(regex_constants::error_escape, m_position - m_base, "ASCII escape sequence terminated prematurely."); return result; } result = static_cast(*m_position % 32); break; case regex_constants::escape_type_hex: ++m_position; if(m_position == m_end) { // Rewind to start of escape: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; fail(regex_constants::error_escape, m_position - m_base, "Hexadecimal escape sequence terminated prematurely."); return result; } // maybe have \x{ddd} if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace) { ++m_position; if(m_position == m_end) { // Rewind to start of escape: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; fail(regex_constants::error_escape, m_position - m_base, "Missing } in hexadecimal escape sequence."); return result; } int i = this->m_traits.toi(m_position, m_end, 16); if((m_position == m_end) || (i < 0) || ((std::numeric_limits::is_specialized) && (i > (int)(std::numeric_limits::max)())) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace)) { // Rewind to start of escape: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; fail(regex_constants::error_badbrace, m_position - m_base, "Hexadecimal escape sequence was invalid."); return result; } ++m_position; result = charT(i); } else { std::ptrdiff_t len = (std::min)(static_cast(2), static_cast(m_end - m_position)); int i = this->m_traits.toi(m_position, m_position + len, 16); if((i < 0) || !valid_value(charT(0), i)) { // Rewind to start of escape: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; fail(regex_constants::error_escape, m_position - m_base, "Escape sequence did not encode a valid character."); return result; } result = charT(i); } return result; case regex_constants::syntax_digit: { // an octal escape sequence, the first character must be a zero // followed by up to 3 octal digits: std::ptrdiff_t len = (std::min)(::boost::re_detail::distance(m_position, m_end), static_cast(4)); const charT* bp = m_position; int val = this->m_traits.toi(bp, bp + 1, 8); if(val != 0) { // Rewind to start of escape: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; // Oops not an octal escape after all: fail(regex_constants::error_escape, m_position - m_base, "Invalid octal escape sequence."); return result; } val = this->m_traits.toi(m_position, m_position + len, 8); if(val < 0) { // Rewind to start of escape: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; fail(regex_constants::error_escape, m_position - m_base, "Octal escape sequence is invalid."); return result; } return static_cast(val); } case regex_constants::escape_type_named_char: { ++m_position; if(m_position == m_end) { // Rewind to start of escape: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; fail(regex_constants::error_escape, m_position - m_base); return false; } // maybe have \N{name} if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace) { const charT* base = m_position; // skip forward until we find enclosing brace: while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace)) ++m_position; if(m_position == m_end) { // Rewind to start of escape: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; fail(regex_constants::error_escape, m_position - m_base); return false; } string_type s = this->m_traits.lookup_collatename(++base, m_position++); if(s.empty()) { // Rewind to start of escape: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; fail(regex_constants::error_collate, m_position - m_base); return false; } if(s.size() == 1) { return s[0]; } } // fall through is a failure: // Rewind to start of escape: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; fail(regex_constants::error_escape, m_position - m_base); return false; } default: result = *m_position; break; } ++m_position; return result; #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool basic_regex_parser::parse_backref() { BOOST_ASSERT(m_position != m_end); const charT* pc = m_position; int i = this->m_traits.toi(pc, pc + 1, 10); if((i == 0) || (((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) && (this->flags() & regbase::no_bk_refs))) { // not a backref at all but an octal escape sequence: charT c = unescape_character(); this->append_literal(c); } else if((i > 0) && (this->m_backrefs & (1u << (i-1)))) { m_position = pc; re_brace* pb = static_cast(this->append_state(syntax_element_backref, sizeof(re_brace))); pb->index = i; pb->icase = this->flags() & regbase::icase; } else { // Rewind to start of escape: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; fail(regex_constants::error_backref, m_position - m_base); return false; } return true; } template bool basic_regex_parser::parse_QE() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif // // parse a \Q...\E sequence: // ++m_position; // skip the Q const charT* start = m_position; const charT* end; do { while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape)) ++m_position; if(m_position == m_end) { // a \Q...\E sequence may terminate with the end of the expression: end = m_position; break; } if(++m_position == m_end) // skip the escape { fail(regex_constants::error_escape, m_position - m_base, "Unterminated \\Q...\\E sequence."); return false; } // check to see if it's a \E: if(this->m_traits.escape_syntax_type(*m_position) == regex_constants::escape_type_E) { ++m_position; end = m_position - 2; break; } // otherwise go round again: }while(true); // // now add all the character between the two escapes as literals: // while(start != end) { this->append_literal(*start); ++start; } return true; #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool basic_regex_parser::parse_perl_extension() { if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } // // treat comments as a special case, as these // are the only ones that don't start with a leading // startmark state: // if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_hash) { while((m_position != m_end) && (this->m_traits.syntax_type(*m_position++) != regex_constants::syntax_close_mark)) {} return true; } // // backup some state, and prepare the way: // int markid = 0; std::ptrdiff_t jump_offset = 0; re_brace* pb = static_cast(this->append_state(syntax_element_startmark, sizeof(re_brace))); pb->icase = this->flags() & regbase::icase; std::ptrdiff_t last_paren_start = this->getoffset(pb); // back up insertion point for alternations, and set new point: std::ptrdiff_t last_alt_point = m_alt_insert_point; this->m_pdata->m_data.align(); m_alt_insert_point = this->m_pdata->m_data.size(); std::ptrdiff_t expected_alt_point = m_alt_insert_point; bool restore_flags = true; regex_constants::syntax_option_type old_flags = this->flags(); bool old_case_change = m_has_case_change; m_has_case_change = false; charT name_delim; int mark_reset = m_mark_reset; int max_mark = m_max_mark; m_mark_reset = -1; m_max_mark = m_mark_count; int v; // // select the actual extension used: // switch(this->m_traits.syntax_type(*m_position)) { case regex_constants::syntax_or: m_mark_reset = m_mark_count; BOOST_FALLTHROUGH; case regex_constants::syntax_colon: // // a non-capturing mark: // pb->index = markid = 0; ++m_position; break; case regex_constants::syntax_digit: { // // a recursive subexpression: // v = this->m_traits.toi(m_position, m_end, 10); if((v < 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base, "The recursive sub-expression refers to an invalid marking group, or is unterminated."); return false; } insert_recursion: pb->index = markid = 0; re_recurse* pr = static_cast(this->append_state(syntax_element_recurse, sizeof(re_recurse))); pr->alt.i = v; pr->state_id = 0; static_cast( this->append_state(syntax_element_toggle_case, sizeof(re_case)) )->icase = this->flags() & regbase::icase; break; } case regex_constants::syntax_plus: // // A forward-relative recursive subexpression: // ++m_position; v = this->m_traits.toi(m_position, m_end, 10); if((v <= 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression."); return false; } v += m_mark_count; goto insert_recursion; case regex_constants::syntax_dash: // // Possibly a backward-relative recursive subexpression: // ++m_position; v = this->m_traits.toi(m_position, m_end, 10); if(v <= 0) { --m_position; // Oops not a relative recursion at all, but a (?-imsx) group: goto option_group_jump; } v = m_mark_count + 1 - v; if(v <= 0) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression."); return false; } goto insert_recursion; case regex_constants::syntax_equal: pb->index = markid = -1; ++m_position; jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump))); this->m_pdata->m_data.align(); m_alt_insert_point = this->m_pdata->m_data.size(); break; case regex_constants::syntax_not: pb->index = markid = -2; ++m_position; jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump))); this->m_pdata->m_data.align(); m_alt_insert_point = this->m_pdata->m_data.size(); break; case regex_constants::escape_type_left_word: { // a lookbehind assertion: if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } regex_constants::syntax_type t = this->m_traits.syntax_type(*m_position); if(t == regex_constants::syntax_not) pb->index = markid = -2; else if(t == regex_constants::syntax_equal) pb->index = markid = -1; else { // Probably a named capture which also starts (?< : name_delim = '>'; --m_position; goto named_capture_jump; } ++m_position; jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump))); this->append_state(syntax_element_backstep, sizeof(re_brace)); this->m_pdata->m_data.align(); m_alt_insert_point = this->m_pdata->m_data.size(); break; } case regex_constants::escape_type_right_word: // // an independent sub-expression: // pb->index = markid = -3; ++m_position; jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump))); this->m_pdata->m_data.align(); m_alt_insert_point = this->m_pdata->m_data.size(); break; case regex_constants::syntax_open_mark: { // a conditional expression: pb->index = markid = -4; if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } v = this->m_traits.toi(m_position, m_end, 10); if(m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } if(*m_position == charT('R')) { if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } if(*m_position == charT('&')) { const charT* base = ++m_position; while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) ++m_position; if(m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } v = -static_cast(hash_value_from_capture_name(base, m_position)); } else { v = -this->m_traits.toi(m_position, m_end, 10); } re_brace* br = static_cast(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); br->index = v < 0 ? (v - 1) : 0; if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } } else if((*m_position == charT('\'')) || (*m_position == charT('<'))) { const charT* base = ++m_position; while((m_position != m_end) && (*m_position != charT('>')) && (*m_position != charT('\''))) ++m_position; if(m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } v = static_cast(hash_value_from_capture_name(base, m_position)); re_brace* br = static_cast(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); br->index = v; if(((*m_position != charT('>')) && (*m_position != charT('\''))) || (++m_position == m_end)) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base, "Unterminated named capture."); return false; } if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } } else if(*m_position == charT('D')) { const char* def = "DEFINE"; while(*def && (m_position != m_end) && (*m_position == charT(*def))) ++m_position, ++def; if((m_position == m_end) || *def) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } re_brace* br = static_cast(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); br->index = 9999; // special magic value! if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } } else if(v > 0) { re_brace* br = static_cast(this->append_state(syntax_element_assert_backref, sizeof(re_brace))); br->index = v; if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } } else { // verify that we have a lookahead or lookbehind assert: if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_question) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } if(this->m_traits.syntax_type(*m_position) == regex_constants::escape_type_left_word) { if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not)) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } m_position -= 3; } else { if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not)) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } m_position -= 2; } } break; } case regex_constants::syntax_close_mark: // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; case regex_constants::escape_type_end_buffer: { name_delim = *m_position; named_capture_jump: markid = 0; if(0 == (this->flags() & regbase::nosubs)) { markid = ++m_mark_count; #ifndef BOOST_NO_STD_DISTANCE if(this->flags() & regbase::save_subexpression_location) this->m_pdata->m_subs.push_back(std::pair(std::distance(m_base, m_position) - 2, 0)); #else if(this->flags() & regbase::save_subexpression_location) this->m_pdata->m_subs.push_back(std::pair((m_position - m_base) - 2, 0)); #endif } pb->index = markid; const charT* base = ++m_position; if(m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } while((m_position != m_end) && (*m_position != name_delim)) ++m_position; if(m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } this->m_pdata->set_name(base, m_position, markid); ++m_position; break; } default: if(*m_position == charT('R')) { ++m_position; v = 0; if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } goto insert_recursion; } if(*m_position == charT('&')) { ++m_position; const charT* base = m_position; while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) ++m_position; if(m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } v = static_cast(hash_value_from_capture_name(base, m_position)); goto insert_recursion; } if(*m_position == charT('P')) { ++m_position; if(m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } if(*m_position == charT('>')) { ++m_position; const charT* base = m_position; while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)) ++m_position; if(m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } v = static_cast(hash_value_from_capture_name(base, m_position)); goto insert_recursion; } } // // lets assume that we have a (?imsx) group and try and parse it: // option_group_jump: regex_constants::syntax_option_type opts = parse_options(); if(m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } // make a note of whether we have a case change: m_has_case_change = ((opts & regbase::icase) != (this->flags() & regbase::icase)); pb->index = markid = 0; if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark) { // update flags and carry on as normal: this->flags(opts); restore_flags = false; old_case_change |= m_has_case_change; // defer end of scope by one ')' } else if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_colon) { // update flags and carry on until the matching ')' is found: this->flags(opts); ++m_position; } else { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base); return false; } // finally append a case change state if we need it: if(m_has_case_change) { static_cast( this->append_state(syntax_element_toggle_case, sizeof(re_case)) )->icase = opts & regbase::icase; } } // // now recursively add more states, this will terminate when we get to a // matching ')' : // parse_all(); // // Unwind alternatives: // if(0 == unwind_alts(last_paren_start)) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid alternation operators within (?...) block."); return false; } // // we either have a ')' or we have run out of characters prematurely: // if(m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; this->fail(regex_constants::error_paren, ::boost::re_detail::distance(m_base, m_end)); return false; } BOOST_ASSERT(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark); ++m_position; // // restore the flags: // if(restore_flags) { // append a case change state if we need it: if(m_has_case_change) { static_cast( this->append_state(syntax_element_toggle_case, sizeof(re_case)) )->icase = old_flags & regbase::icase; } this->flags(old_flags); } // // set up the jump pointer if we have one: // if(jump_offset) { this->m_pdata->m_data.align(); re_jump* jmp = static_cast(this->getaddress(jump_offset)); jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp); if((this->m_last_state == jmp) && (markid != -2)) { // Oops... we didn't have anything inside the assertion. // Note we don't get here for negated forward lookahead as (?!) // does have some uses. // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid or empty zero width assertion."); return false; } } // // verify that if this is conditional expression, that we do have // an alternative, if not add one: // if(markid == -4) { re_syntax_base* b = this->getaddress(expected_alt_point); // Make sure we have exactly one alternative following this state: if(b->type != syntax_element_alt) { re_alt* alt = static_cast(this->insert_state(expected_alt_point, syntax_element_alt, sizeof(re_alt))); alt->alt.i = this->m_pdata->m_data.size() - this->getoffset(alt); } else if(this->getaddress(static_cast(b)->alt.i, b)->type == syntax_element_alt) { // Can't have seen more than one alternative: // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_bad_pattern, m_position - m_base, "More than one alternation operator | was encountered inside a conditional expression."); return false; } else { // We must *not* have seen an alternative inside a (DEFINE) block: b = this->getaddress(b->next.i, b); if((b->type == syntax_element_assert_backref) && (static_cast(b)->index == 9999)) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_bad_pattern, m_position - m_base, "Alternation operators are not allowed inside a DEFINE block."); return false; } } // check for invalid repetition of next state: b = this->getaddress(expected_alt_point); b = this->getaddress(static_cast(b)->next.i, b); if((b->type != syntax_element_assert_backref) && (b->type != syntax_element_startmark)) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_badrepeat, m_position - m_base, "A repetition operator cannot be applied to a zero-width assertion."); return false; } } // // append closing parenthesis state: // pb = static_cast(this->append_state(syntax_element_endmark, sizeof(re_brace))); pb->index = markid; pb->icase = this->flags() & regbase::icase; this->m_paren_start = last_paren_start; // // restore the alternate insertion point: // this->m_alt_insert_point = last_alt_point; // // and the case change data: // m_has_case_change = old_case_change; // // And the mark_reset data: // if(m_max_mark > m_mark_count) { m_mark_count = m_max_mark; } m_mark_reset = mark_reset; m_max_mark = max_mark; if(markid > 0) { #ifndef BOOST_NO_STD_DISTANCE if(this->flags() & regbase::save_subexpression_location) this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position) - 1; #else if(this->flags() & regbase::save_subexpression_location) this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base) - 1; #endif // // allow backrefs to this mark: // if((markid > 0) && (markid < (int)(sizeof(unsigned) * CHAR_BIT))) this->m_backrefs |= 1u << (markid - 1); } return true; } template bool basic_regex_parser::add_emacs_code(bool negate) { // // parses an emacs style \sx or \Sx construct. // if(++m_position == m_end) { // Rewind to start of sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position; fail(regex_constants::error_escape, m_position - m_base); return false; } basic_char_set char_set; if(negate) char_set.negate(); static const charT s_punct[5] = { 'p', 'u', 'n', 'c', 't', }; switch(*m_position) { case 's': case ' ': char_set.add_class(this->m_mask_space); break; case 'w': char_set.add_class(this->m_word_mask); break; case '_': char_set.add_single(digraph(charT('$'))); char_set.add_single(digraph(charT('&'))); char_set.add_single(digraph(charT('*'))); char_set.add_single(digraph(charT('+'))); char_set.add_single(digraph(charT('-'))); char_set.add_single(digraph(charT('_'))); char_set.add_single(digraph(charT('<'))); char_set.add_single(digraph(charT('>'))); break; case '.': char_set.add_class(this->m_traits.lookup_classname(s_punct, s_punct+5)); break; case '(': char_set.add_single(digraph(charT('('))); char_set.add_single(digraph(charT('['))); char_set.add_single(digraph(charT('{'))); break; case ')': char_set.add_single(digraph(charT(')'))); char_set.add_single(digraph(charT(']'))); char_set.add_single(digraph(charT('}'))); break; case '"': char_set.add_single(digraph(charT('"'))); char_set.add_single(digraph(charT('\''))); char_set.add_single(digraph(charT('`'))); break; case '\'': char_set.add_single(digraph(charT('\''))); char_set.add_single(digraph(charT(','))); char_set.add_single(digraph(charT('#'))); break; case '<': char_set.add_single(digraph(charT(';'))); break; case '>': char_set.add_single(digraph(charT('\n'))); char_set.add_single(digraph(charT('\f'))); break; default: fail(regex_constants::error_ctype, m_position - m_base); return false; } if(0 == this->append_set(char_set)) { fail(regex_constants::error_ctype, m_position - m_base); return false; } ++m_position; return true; } template regex_constants::syntax_option_type basic_regex_parser::parse_options() { // we have a (?imsx-imsx) group, convert it into a set of flags: regex_constants::syntax_option_type f = this->flags(); bool breakout = false; do { switch(*m_position) { case 's': f |= regex_constants::mod_s; f &= ~regex_constants::no_mod_s; break; case 'm': f &= ~regex_constants::no_mod_m; break; case 'i': f |= regex_constants::icase; break; case 'x': f |= regex_constants::mod_x; break; default: breakout = true; continue; } if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_paren, m_position - m_base); return false; } } while(!breakout); breakout = false; if(*m_position == static_cast('-')) { if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_paren, m_position - m_base); return false; } do { switch(*m_position) { case 's': f &= ~regex_constants::mod_s; f |= regex_constants::no_mod_s; break; case 'm': f |= regex_constants::no_mod_m; break; case 'i': f &= ~regex_constants::icase; break; case 'x': f &= ~regex_constants::mod_x; break; default: breakout = true; continue; } if(++m_position == m_end) { // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; fail(regex_constants::error_paren, m_position - m_base); return false; } } while(!breakout); } return f; } template bool basic_regex_parser::unwind_alts(std::ptrdiff_t last_paren_start) { // // If we didn't actually add any states after the last // alternative then that's an error: // if((this->m_alt_insert_point == static_cast(this->m_pdata->m_data.size())) && m_alt_jumps.size() && (m_alt_jumps.back() > last_paren_start) && !( ((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) && ((this->flags() & regbase::no_empty_expressions) == 0) ) ) { fail(regex_constants::error_empty, this->m_position - this->m_base, "Can't terminate a sub-expression with an alternation operator |."); return false; } // // Fix up our alternatives: // while(m_alt_jumps.size() && (m_alt_jumps.back() > last_paren_start)) { // // fix up the jump to point to the end of the states // that we've just added: // std::ptrdiff_t jump_offset = m_alt_jumps.back(); m_alt_jumps.pop_back(); this->m_pdata->m_data.align(); re_jump* jmp = static_cast(this->getaddress(jump_offset)); BOOST_ASSERT(jmp->type == syntax_element_jump); jmp->alt.i = this->m_pdata->m_data.size() - jump_offset; } return true; } #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace re_detail } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/c_regex_traits.hpp000644 000765 000024 00000012571 12233035540 023326 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE c_regex_traits.hpp * VERSION see * DESCRIPTION: Declares regular expression traits class that wraps the global C locale. */ #ifndef BOOST_C_REGEX_TRAITS_HPP_INCLUDED #define BOOST_C_REGEX_TRAITS_HPP_INCLUDED #ifndef BOOST_REGEX_CONFIG_HPP #include #endif #ifndef BOOST_REGEX_WORKAROUND_HPP #include #endif #include #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::strlen; using ::tolower; } #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ template struct c_regex_traits; template<> struct BOOST_REGEX_DECL c_regex_traits { c_regex_traits(){} typedef char char_type; typedef std::size_t size_type; typedef std::string string_type; struct locale_type{}; typedef boost::uint32_t char_class_type; static size_type length(const char_type* p) { return (std::strlen)(p); } char translate(char c) const { return c; } char translate_nocase(char c) const { return static_cast((std::tolower)(static_cast(c))); } static string_type BOOST_REGEX_CALL transform(const char* p1, const char* p2); static string_type BOOST_REGEX_CALL transform_primary(const char* p1, const char* p2); static char_class_type BOOST_REGEX_CALL lookup_classname(const char* p1, const char* p2); static string_type BOOST_REGEX_CALL lookup_collatename(const char* p1, const char* p2); static bool BOOST_REGEX_CALL isctype(char, char_class_type); static int BOOST_REGEX_CALL value(char, int); locale_type imbue(locale_type l) { return l; } locale_type getloc()const { return locale_type(); } private: // this type is not copyable: c_regex_traits(const c_regex_traits&); c_regex_traits& operator=(const c_regex_traits&); }; #ifndef BOOST_NO_WREGEX template<> struct BOOST_REGEX_DECL c_regex_traits { c_regex_traits(){} typedef wchar_t char_type; typedef std::size_t size_type; typedef std::wstring string_type; struct locale_type{}; typedef boost::uint32_t char_class_type; static size_type length(const char_type* p) { return (std::wcslen)(p); } wchar_t translate(wchar_t c) const { return c; } wchar_t translate_nocase(wchar_t c) const { return (std::towlower)(c); } static string_type BOOST_REGEX_CALL transform(const wchar_t* p1, const wchar_t* p2); static string_type BOOST_REGEX_CALL transform_primary(const wchar_t* p1, const wchar_t* p2); static char_class_type BOOST_REGEX_CALL lookup_classname(const wchar_t* p1, const wchar_t* p2); static string_type BOOST_REGEX_CALL lookup_collatename(const wchar_t* p1, const wchar_t* p2); static bool BOOST_REGEX_CALL isctype(wchar_t, char_class_type); static int BOOST_REGEX_CALL value(wchar_t, int); locale_type imbue(locale_type l) { return l; } locale_type getloc()const { return locale_type(); } private: // this type is not copyable: c_regex_traits(const c_regex_traits&); c_regex_traits& operator=(const c_regex_traits&); }; #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T // // Provide an unsigned short version as well, so the user can link to this // no matter whether they build with /Zc:wchar_t or not (MSVC specific). // template<> struct BOOST_REGEX_DECL c_regex_traits { c_regex_traits(){} typedef unsigned short char_type; typedef std::size_t size_type; typedef std::basic_string string_type; struct locale_type{}; typedef boost::uint32_t char_class_type; static size_type length(const char_type* p) { return (std::wcslen)((const wchar_t*)p); } unsigned short translate(unsigned short c) const { return c; } unsigned short translate_nocase(unsigned short c) const { return (std::towlower)((wchar_t)c); } static string_type BOOST_REGEX_CALL transform(const unsigned short* p1, const unsigned short* p2); static string_type BOOST_REGEX_CALL transform_primary(const unsigned short* p1, const unsigned short* p2); static char_class_type BOOST_REGEX_CALL lookup_classname(const unsigned short* p1, const unsigned short* p2); static string_type BOOST_REGEX_CALL lookup_collatename(const unsigned short* p1, const unsigned short* p2); static bool BOOST_REGEX_CALL isctype(unsigned short, char_class_type); static int BOOST_REGEX_CALL value(unsigned short, int); locale_type imbue(locale_type l) { return l; } locale_type getloc()const { return locale_type(); } private: // this type is not copyable: c_regex_traits(const c_regex_traits&); c_regex_traits& operator=(const c_regex_traits&); }; #endif #endif // BOOST_NO_WREGEX } #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/char_regex_traits.hpp000644 000765 000024 00000003276 12233035540 024023 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE char_regex_traits.cpp * VERSION see * DESCRIPTION: Declares deprecated traits classes char_regex_traits<>. */ #ifndef BOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP #define BOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ namespace deprecated{ // // class char_regex_traits_i // provides case insensitive traits classes (deprecated): template class char_regex_traits_i : public regex_traits {}; template<> class char_regex_traits_i : public regex_traits { public: typedef char char_type; typedef unsigned char uchar_type; typedef unsigned int size_type; typedef regex_traits base_type; }; #ifndef BOOST_NO_WREGEX template<> class char_regex_traits_i : public regex_traits { public: typedef wchar_t char_type; typedef unsigned short uchar_type; typedef unsigned int size_type; typedef regex_traits base_type; }; #endif } // namespace deprecated } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif // include passenger-4.0.37/ext/boost/regex/v4/cpp_regex_traits.hpp000644 000765 000024 00000104577 12233035540 023676 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 John Maddock * Copyright 2011 Garmin Ltd. or its subsidiaries * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE cpp_regex_traits.hpp * VERSION see * DESCRIPTION: Declares regular expression traits class cpp_regex_traits. */ #ifndef BOOST_CPP_REGEX_TRAITS_HPP_INCLUDED #define BOOST_CPP_REGEX_TRAITS_HPP_INCLUDED #include #include #ifndef BOOST_NO_STD_LOCALE #ifndef BOOST_RE_PAT_EXCEPT_HPP #include #endif #ifndef BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED #include #endif #ifdef BOOST_HAS_THREADS #include #endif #ifndef BOOST_REGEX_PRIMARY_TRANSFORM #include #endif #ifndef BOOST_REGEX_OBJECT_CACHE_HPP #include #endif #include #include #include #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4786 4251) #endif namespace boost{ // // forward declaration is needed by some compilers: // template class cpp_regex_traits; namespace re_detail{ // // class parser_buf: // acts as a stream buffer which wraps around a pair of pointers: // template > class parser_buf : public ::std::basic_streambuf { typedef ::std::basic_streambuf base_type; typedef typename base_type::int_type int_type; typedef typename base_type::char_type char_type; typedef typename base_type::pos_type pos_type; typedef ::std::streamsize streamsize; typedef typename base_type::off_type off_type; public: parser_buf() : base_type() { setbuf(0, 0); } const charT* getnext() { return this->gptr(); } protected: std::basic_streambuf* setbuf(char_type* s, streamsize n); typename parser_buf::pos_type seekpos(pos_type sp, ::std::ios_base::openmode which); typename parser_buf::pos_type seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which); private: parser_buf& operator=(const parser_buf&); parser_buf(const parser_buf&); }; template std::basic_streambuf* parser_buf::setbuf(char_type* s, streamsize n) { this->setg(s, s, s + n); return this; } template typename parser_buf::pos_type parser_buf::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) { typedef typename boost::int_t::least cast_type; if(which & ::std::ios_base::out) return pos_type(off_type(-1)); std::ptrdiff_t size = this->egptr() - this->eback(); std::ptrdiff_t pos = this->gptr() - this->eback(); charT* g = this->eback(); switch(static_cast(way)) { case ::std::ios_base::beg: if((off < 0) || (off > size)) return pos_type(off_type(-1)); else this->setg(g, g + off, g + size); break; case ::std::ios_base::end: if((off < 0) || (off > size)) return pos_type(off_type(-1)); else this->setg(g, g + size - off, g + size); break; case ::std::ios_base::cur: { std::ptrdiff_t newpos = static_cast(pos + off); if((newpos < 0) || (newpos > size)) return pos_type(off_type(-1)); else this->setg(g, g + newpos, g + size); break; } default: ; } #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4244) #endif return static_cast(this->gptr() - this->eback()); #ifdef BOOST_MSVC #pragma warning(pop) #endif } template typename parser_buf::pos_type parser_buf::seekpos(pos_type sp, ::std::ios_base::openmode which) { if(which & ::std::ios_base::out) return pos_type(off_type(-1)); off_type size = static_cast(this->egptr() - this->eback()); charT* g = this->eback(); if(off_type(sp) <= size) { this->setg(g, g + off_type(sp), g + size); } return pos_type(off_type(-1)); } // // class cpp_regex_traits_base: // acts as a container for locale and the facets we are using. // template struct cpp_regex_traits_base { cpp_regex_traits_base(const std::locale& l) { imbue(l); } std::locale imbue(const std::locale& l); std::locale m_locale; std::ctype const* m_pctype; #ifndef BOOST_NO_STD_MESSAGES std::messages const* m_pmessages; #endif std::collate const* m_pcollate; bool operator<(const cpp_regex_traits_base& b)const { if(m_pctype == b.m_pctype) { #ifndef BOOST_NO_STD_MESSAGES if(m_pmessages == b.m_pmessages) { return m_pcollate < b.m_pcollate; } return m_pmessages < b.m_pmessages; #else return m_pcollate < b.m_pcollate; #endif } return m_pctype < b.m_pctype; } bool operator==(const cpp_regex_traits_base& b)const { return (m_pctype == b.m_pctype) #ifndef BOOST_NO_STD_MESSAGES && (m_pmessages == b.m_pmessages) #endif && (m_pcollate == b.m_pcollate); } }; template std::locale cpp_regex_traits_base::imbue(const std::locale& l) { std::locale result(m_locale); m_locale = l; m_pctype = &BOOST_USE_FACET(std::ctype, l); #ifndef BOOST_NO_STD_MESSAGES m_pmessages = BOOST_HAS_FACET(std::messages, l) ? &BOOST_USE_FACET(std::messages, l) : 0; #endif m_pcollate = &BOOST_USE_FACET(std::collate, l); return result; } // // class cpp_regex_traits_char_layer: // implements methods that require specialisation for narrow characters: // template class cpp_regex_traits_char_layer : public cpp_regex_traits_base { typedef std::basic_string string_type; typedef std::map map_type; typedef typename map_type::const_iterator map_iterator_type; public: cpp_regex_traits_char_layer(const std::locale& l) : cpp_regex_traits_base(l) { init(); } cpp_regex_traits_char_layer(const cpp_regex_traits_base& b) : cpp_regex_traits_base(b) { init(); } void init(); regex_constants::syntax_type syntax_type(charT c)const { map_iterator_type i = m_char_map.find(c); return ((i == m_char_map.end()) ? 0 : i->second); } regex_constants::escape_syntax_type escape_syntax_type(charT c) const { map_iterator_type i = m_char_map.find(c); if(i == m_char_map.end()) { if(this->m_pctype->is(std::ctype_base::lower, c)) return regex_constants::escape_type_class; if(this->m_pctype->is(std::ctype_base::upper, c)) return regex_constants::escape_type_not_class; return 0; } return i->second; } private: string_type get_default_message(regex_constants::syntax_type); // TODO: use a hash table when available! map_type m_char_map; }; template void cpp_regex_traits_char_layer::init() { // we need to start by initialising our syntax map so we know which // character is used for which purpose: #ifndef BOOST_NO_STD_MESSAGES #ifndef __IBMCPP__ typename std::messages::catalog cat = static_cast::catalog>(-1); #else typename std::messages::catalog cat = reinterpret_cast::catalog>(-1); #endif std::string cat_name(cpp_regex_traits::get_catalog_name()); if(cat_name.size() && (this->m_pmessages != 0)) { cat = this->m_pmessages->open( cat_name, this->m_locale); if((int)cat < 0) { std::string m("Unable to open message catalog: "); std::runtime_error err(m + cat_name); boost::re_detail::raise_runtime_error(err); } } // // if we have a valid catalog then load our messages: // if((int)cat >= 0) { #ifndef BOOST_NO_EXCEPTIONS try{ #endif for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i) { string_type mss = this->m_pmessages->get(cat, 0, i, get_default_message(i)); for(typename string_type::size_type j = 0; j < mss.size(); ++j) { m_char_map[mss[j]] = i; } } this->m_pmessages->close(cat); #ifndef BOOST_NO_EXCEPTIONS } catch(...) { if(this->m_pmessages) this->m_pmessages->close(cat); throw; } #endif } else { #endif for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i) { const char* ptr = get_default_syntax(i); while(ptr && *ptr) { m_char_map[this->m_pctype->widen(*ptr)] = i; ++ptr; } } #ifndef BOOST_NO_STD_MESSAGES } #endif } template typename cpp_regex_traits_char_layer::string_type cpp_regex_traits_char_layer::get_default_message(regex_constants::syntax_type i) { const char* ptr = get_default_syntax(i); string_type result; while(ptr && *ptr) { result.append(1, this->m_pctype->widen(*ptr)); ++ptr; } return result; } // // specialised version for narrow characters: // template <> class BOOST_REGEX_DECL cpp_regex_traits_char_layer : public cpp_regex_traits_base { typedef std::string string_type; public: cpp_regex_traits_char_layer(const std::locale& l) : cpp_regex_traits_base(l) { init(); } cpp_regex_traits_char_layer(const cpp_regex_traits_base& l) : cpp_regex_traits_base(l) { init(); } regex_constants::syntax_type syntax_type(char c)const { return m_char_map[static_cast(c)]; } regex_constants::escape_syntax_type escape_syntax_type(char c) const { return m_char_map[static_cast(c)]; } private: regex_constants::syntax_type m_char_map[1u << CHAR_BIT]; void init(); }; #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET enum { char_class_space=1<<0, char_class_print=1<<1, char_class_cntrl=1<<2, char_class_upper=1<<3, char_class_lower=1<<4, char_class_alpha=1<<5, char_class_digit=1<<6, char_class_punct=1<<7, char_class_xdigit=1<<8, char_class_alnum=char_class_alpha|char_class_digit, char_class_graph=char_class_alnum|char_class_punct, char_class_blank=1<<9, char_class_word=1<<10, char_class_unicode=1<<11, char_class_horizontal_space=1<<12, char_class_vertical_space=1<<13 }; #endif // // class cpp_regex_traits_implementation: // provides pimpl implementation for cpp_regex_traits. // template class cpp_regex_traits_implementation : public cpp_regex_traits_char_layer { public: typedef typename cpp_regex_traits::char_class_type char_class_type; typedef typename std::ctype::mask native_mask_type; #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET BOOST_STATIC_CONSTANT(char_class_type, mask_blank = 1u << 24); BOOST_STATIC_CONSTANT(char_class_type, mask_word = 1u << 25); BOOST_STATIC_CONSTANT(char_class_type, mask_unicode = 1u << 26); BOOST_STATIC_CONSTANT(char_class_type, mask_horizontal = 1u << 27); BOOST_STATIC_CONSTANT(char_class_type, mask_vertical = 1u << 28); #endif typedef std::basic_string string_type; typedef charT char_type; //cpp_regex_traits_implementation(); cpp_regex_traits_implementation(const std::locale& l) : cpp_regex_traits_char_layer(l) { init(); } cpp_regex_traits_implementation(const cpp_regex_traits_base& l) : cpp_regex_traits_char_layer(l) { init(); } std::string error_string(regex_constants::error_type n) const { if(!m_error_strings.empty()) { std::map::const_iterator p = m_error_strings.find(n); return (p == m_error_strings.end()) ? std::string(get_default_error_string(n)) : p->second; } return get_default_error_string(n); } char_class_type lookup_classname(const charT* p1, const charT* p2) const { char_class_type result = lookup_classname_imp(p1, p2); if(result == 0) { string_type temp(p1, p2); this->m_pctype->tolower(&*temp.begin(), &*temp.begin() + temp.size()); result = lookup_classname_imp(&*temp.begin(), &*temp.begin() + temp.size()); } return result; } string_type lookup_collatename(const charT* p1, const charT* p2) const; string_type transform_primary(const charT* p1, const charT* p2) const; string_type transform(const charT* p1, const charT* p2) const; private: std::map m_error_strings; // error messages indexed by numberic ID std::map m_custom_class_names; // character class names std::map m_custom_collate_names; // collating element names unsigned m_collate_type; // the form of the collation string charT m_collate_delim; // the collation group delimiter // // helpers: // char_class_type lookup_classname_imp(const charT* p1, const charT* p2) const; void init(); #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET public: bool isctype(charT c, char_class_type m)const; #endif }; #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET #if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) template typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_blank; template typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_word; template typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_unicode; template typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_vertical; template typename cpp_regex_traits_implementation::char_class_type const cpp_regex_traits_implementation::mask_horizontal; #endif #endif template typename cpp_regex_traits_implementation::string_type cpp_regex_traits_implementation::transform_primary(const charT* p1, const charT* p2) const { // // PRECONDITIONS: // // A bug in gcc 3.2 (and maybe other versions as well) treats // p1 as a null terminated string, for efficiency reasons // we work around this elsewhere, but just assert here that // we adhere to gcc's (buggy) preconditions... // BOOST_ASSERT(*p2 == 0); string_type result; // // swallowing all exceptions here is a bad idea // however at least one std lib will always throw // std::bad_alloc for certain arguments... // #ifndef BOOST_NO_EXCEPTIONS try{ #endif // // What we do here depends upon the format of the sort key returned by // sort key returned by this->transform: // switch(m_collate_type) { case sort_C: case sort_unknown: // the best we can do is translate to lower case, then get a regular sort key: { result.assign(p1, p2); this->m_pctype->tolower(&*result.begin(), &*result.begin() + result.size()); result = this->m_pcollate->transform(&*result.begin(), &*result.begin() + result.size()); break; } case sort_fixed: { // get a regular sort key, and then truncate it: result.assign(this->m_pcollate->transform(p1, p2)); result.erase(this->m_collate_delim); break; } case sort_delim: // get a regular sort key, and then truncate everything after the delim: result.assign(this->m_pcollate->transform(p1, p2)); std::size_t i; for(i = 0; i < result.size(); ++i) { if(result[i] == m_collate_delim) break; } result.erase(i); break; } #ifndef BOOST_NO_EXCEPTIONS }catch(...){} #endif while(result.size() && (charT(0) == *result.rbegin())) result.erase(result.size() - 1); if(result.empty()) { // character is ignorable at the primary level: result = string_type(1, charT(0)); } return result; } template typename cpp_regex_traits_implementation::string_type cpp_regex_traits_implementation::transform(const charT* p1, const charT* p2) const { // // PRECONDITIONS: // // A bug in gcc 3.2 (and maybe other versions as well) treats // p1 as a null terminated string, for efficiency reasons // we work around this elsewhere, but just assert here that // we adhere to gcc's (buggy) preconditions... // BOOST_ASSERT(*p2 == 0); // // swallowing all exceptions here is a bad idea // however at least one std lib will always throw // std::bad_alloc for certain arguments... // string_type result; #ifndef BOOST_NO_EXCEPTIONS try{ #endif result = this->m_pcollate->transform(p1, p2); // // Borland's STLPort version returns a NULL-terminated // string that has garbage at the end - each call to // std::collate::transform returns a different string! // So as a workaround, we'll truncate the string at the first NULL // which _seems_ to work.... #if BOOST_WORKAROUND(__BORLANDC__, < 0x580) result.erase(result.find(charT(0))); #else // // some implementations (Dinkumware) append unnecessary trailing \0's: while(result.size() && (charT(0) == *result.rbegin())) result.erase(result.size() - 1); #endif BOOST_ASSERT(std::find(result.begin(), result.end(), charT(0)) == result.end()); #ifndef BOOST_NO_EXCEPTIONS } catch(...) { } #endif return result; } template typename cpp_regex_traits_implementation::string_type cpp_regex_traits_implementation::lookup_collatename(const charT* p1, const charT* p2) const { typedef typename std::map::const_iterator iter_type; if(m_custom_collate_names.size()) { iter_type pos = m_custom_collate_names.find(string_type(p1, p2)); if(pos != m_custom_collate_names.end()) return pos->second; } #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) std::string name(p1, p2); #else std::string name; const charT* p0 = p1; while(p0 != p2) name.append(1, char(*p0++)); #endif name = lookup_default_collate_name(name); #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) if(name.size()) return string_type(name.begin(), name.end()); #else if(name.size()) { string_type result; typedef std::string::const_iterator iter; iter b = name.begin(); iter e = name.end(); while(b != e) result.append(1, charT(*b++)); return result; } #endif if(p2 - p1 == 1) return string_type(1, *p1); return string_type(); } template void cpp_regex_traits_implementation::init() { #ifndef BOOST_NO_STD_MESSAGES #ifndef __IBMCPP__ typename std::messages::catalog cat = static_cast::catalog>(-1); #else typename std::messages::catalog cat = reinterpret_cast::catalog>(-1); #endif std::string cat_name(cpp_regex_traits::get_catalog_name()); if(cat_name.size() && (this->m_pmessages != 0)) { cat = this->m_pmessages->open( cat_name, this->m_locale); if((int)cat < 0) { std::string m("Unable to open message catalog: "); std::runtime_error err(m + cat_name); boost::re_detail::raise_runtime_error(err); } } // // if we have a valid catalog then load our messages: // if((int)cat >= 0) { // // Error messages: // for(boost::regex_constants::error_type i = static_cast(0); i <= boost::regex_constants::error_unknown; i = static_cast(i + 1)) { const char* p = get_default_error_string(i); string_type default_message; while(*p) { default_message.append(1, this->m_pctype->widen(*p)); ++p; } string_type s = this->m_pmessages->get(cat, 0, i+200, default_message); std::string result; for(std::string::size_type j = 0; j < s.size(); ++j) { result.append(1, this->m_pctype->narrow(s[j], 0)); } m_error_strings[i] = result; } // // Custom class names: // #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET static const char_class_type masks[16] = { std::ctype::alnum, std::ctype::alpha, std::ctype::cntrl, std::ctype::digit, std::ctype::graph, cpp_regex_traits_implementation::mask_horizontal, std::ctype::lower, std::ctype::print, std::ctype::punct, std::ctype::space, std::ctype::upper, cpp_regex_traits_implementation::mask_vertical, std::ctype::xdigit, cpp_regex_traits_implementation::mask_blank, cpp_regex_traits_implementation::mask_word, cpp_regex_traits_implementation::mask_unicode, }; #else static const char_class_type masks[16] = { ::boost::re_detail::char_class_alnum, ::boost::re_detail::char_class_alpha, ::boost::re_detail::char_class_cntrl, ::boost::re_detail::char_class_digit, ::boost::re_detail::char_class_graph, ::boost::re_detail::char_class_horizontal_space, ::boost::re_detail::char_class_lower, ::boost::re_detail::char_class_print, ::boost::re_detail::char_class_punct, ::boost::re_detail::char_class_space, ::boost::re_detail::char_class_upper, ::boost::re_detail::char_class_vertical_space, ::boost::re_detail::char_class_xdigit, ::boost::re_detail::char_class_blank, ::boost::re_detail::char_class_word, ::boost::re_detail::char_class_unicode, }; #endif static const string_type null_string; for(unsigned int j = 0; j <= 13; ++j) { string_type s(this->m_pmessages->get(cat, 0, j+300, null_string)); if(s.size()) this->m_custom_class_names[s] = masks[j]; } } #endif // // get the collation format used by m_pcollate: // m_collate_type = re_detail::find_sort_syntax(this, &m_collate_delim); } template typename cpp_regex_traits_implementation::char_class_type cpp_regex_traits_implementation::lookup_classname_imp(const charT* p1, const charT* p2) const { #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET static const char_class_type masks[22] = { 0, std::ctype::alnum, std::ctype::alpha, cpp_regex_traits_implementation::mask_blank, std::ctype::cntrl, std::ctype::digit, std::ctype::digit, std::ctype::graph, cpp_regex_traits_implementation::mask_horizontal, std::ctype::lower, std::ctype::lower, std::ctype::print, std::ctype::punct, std::ctype::space, std::ctype::space, std::ctype::upper, cpp_regex_traits_implementation::mask_unicode, std::ctype::upper, cpp_regex_traits_implementation::mask_vertical, std::ctype::alnum | cpp_regex_traits_implementation::mask_word, std::ctype::alnum | cpp_regex_traits_implementation::mask_word, std::ctype::xdigit, }; #else static const char_class_type masks[22] = { 0, ::boost::re_detail::char_class_alnum, ::boost::re_detail::char_class_alpha, ::boost::re_detail::char_class_blank, ::boost::re_detail::char_class_cntrl, ::boost::re_detail::char_class_digit, ::boost::re_detail::char_class_digit, ::boost::re_detail::char_class_graph, ::boost::re_detail::char_class_horizontal_space, ::boost::re_detail::char_class_lower, ::boost::re_detail::char_class_lower, ::boost::re_detail::char_class_print, ::boost::re_detail::char_class_punct, ::boost::re_detail::char_class_space, ::boost::re_detail::char_class_space, ::boost::re_detail::char_class_upper, ::boost::re_detail::char_class_unicode, ::boost::re_detail::char_class_upper, ::boost::re_detail::char_class_vertical_space, ::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word, ::boost::re_detail::char_class_alnum | ::boost::re_detail::char_class_word, ::boost::re_detail::char_class_xdigit, }; #endif if(m_custom_class_names.size()) { typedef typename std::map, char_class_type>::const_iterator map_iter; map_iter pos = m_custom_class_names.find(string_type(p1, p2)); if(pos != m_custom_class_names.end()) return pos->second; } std::size_t state_id = 1 + re_detail::get_default_class_id(p1, p2); BOOST_ASSERT(state_id < sizeof(masks) / sizeof(masks[0])); return masks[state_id]; } #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET template bool cpp_regex_traits_implementation::isctype(const charT c, char_class_type mask) const { return ((mask & ::boost::re_detail::char_class_space) && (this->m_pctype->is(std::ctype::space, c))) || ((mask & ::boost::re_detail::char_class_print) && (this->m_pctype->is(std::ctype::print, c))) || ((mask & ::boost::re_detail::char_class_cntrl) && (this->m_pctype->is(std::ctype::cntrl, c))) || ((mask & ::boost::re_detail::char_class_upper) && (this->m_pctype->is(std::ctype::upper, c))) || ((mask & ::boost::re_detail::char_class_lower) && (this->m_pctype->is(std::ctype::lower, c))) || ((mask & ::boost::re_detail::char_class_alpha) && (this->m_pctype->is(std::ctype::alpha, c))) || ((mask & ::boost::re_detail::char_class_digit) && (this->m_pctype->is(std::ctype::digit, c))) || ((mask & ::boost::re_detail::char_class_punct) && (this->m_pctype->is(std::ctype::punct, c))) || ((mask & ::boost::re_detail::char_class_xdigit) && (this->m_pctype->is(std::ctype::xdigit, c))) || ((mask & ::boost::re_detail::char_class_blank) && (this->m_pctype->is(std::ctype::space, c)) && !::boost::re_detail::is_separator(c)) || ((mask & ::boost::re_detail::char_class_word) && (c == '_')) || ((mask & ::boost::re_detail::char_class_unicode) && ::boost::re_detail::is_extended(c)) || ((mask & ::boost::re_detail::char_class_vertical_space) && (is_separator(c) || (c == '\v'))) || ((mask & ::boost::re_detail::char_class_horizontal_space) && this->m_pctype->is(std::ctype::space, c) && !(is_separator(c) || (c == '\v'))); } #endif template inline boost::shared_ptr > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) { cpp_regex_traits_base key(l); return ::boost::object_cache, cpp_regex_traits_implementation >::get(key, 5); } } // re_detail template class cpp_regex_traits { private: typedef std::ctype ctype_type; public: typedef charT char_type; typedef std::size_t size_type; typedef std::basic_string string_type; typedef std::locale locale_type; typedef boost::uint_least32_t char_class_type; struct boost_extensions_tag{}; cpp_regex_traits() : m_pimpl(re_detail::create_cpp_regex_traits(std::locale())) { } static size_type length(const char_type* p) { return std::char_traits::length(p); } regex_constants::syntax_type syntax_type(charT c)const { return m_pimpl->syntax_type(c); } regex_constants::escape_syntax_type escape_syntax_type(charT c) const { return m_pimpl->escape_syntax_type(c); } charT translate(charT c) const { return c; } charT translate_nocase(charT c) const { return m_pimpl->m_pctype->tolower(c); } charT translate(charT c, bool icase) const { return icase ? m_pimpl->m_pctype->tolower(c) : c; } charT tolower(charT c) const { return m_pimpl->m_pctype->tolower(c); } charT toupper(charT c) const { return m_pimpl->m_pctype->toupper(c); } string_type transform(const charT* p1, const charT* p2) const { return m_pimpl->transform(p1, p2); } string_type transform_primary(const charT* p1, const charT* p2) const { return m_pimpl->transform_primary(p1, p2); } char_class_type lookup_classname(const charT* p1, const charT* p2) const { return m_pimpl->lookup_classname(p1, p2); } string_type lookup_collatename(const charT* p1, const charT* p2) const { return m_pimpl->lookup_collatename(p1, p2); } bool isctype(charT c, char_class_type f) const { #ifndef BOOST_REGEX_BUGGY_CTYPE_FACET typedef typename std::ctype::mask ctype_mask; static const ctype_mask mask_base = static_cast( std::ctype::alnum | std::ctype::alpha | std::ctype::cntrl | std::ctype::digit | std::ctype::graph | std::ctype::lower | std::ctype::print | std::ctype::punct | std::ctype::space | std::ctype::upper | std::ctype::xdigit); if((f & mask_base) && (m_pimpl->m_pctype->is( static_cast(f & mask_base), c))) return true; else if((f & re_detail::cpp_regex_traits_implementation::mask_unicode) && re_detail::is_extended(c)) return true; else if((f & re_detail::cpp_regex_traits_implementation::mask_word) && (c == '_')) return true; else if((f & re_detail::cpp_regex_traits_implementation::mask_blank) && m_pimpl->m_pctype->is(std::ctype::space, c) && !re_detail::is_separator(c)) return true; else if((f & re_detail::cpp_regex_traits_implementation::mask_vertical) && (::boost::re_detail::is_separator(c) || (c == '\v'))) return true; else if((f & re_detail::cpp_regex_traits_implementation::mask_horizontal) && this->isctype(c, std::ctype::space) && !this->isctype(c, re_detail::cpp_regex_traits_implementation::mask_vertical)) return true; return false; #else return m_pimpl->isctype(c, f); #endif } int toi(const charT*& p1, const charT* p2, int radix)const; int value(charT c, int radix)const { const charT* pc = &c; return toi(pc, pc + 1, radix); } locale_type imbue(locale_type l) { std::locale result(getloc()); m_pimpl = re_detail::create_cpp_regex_traits(l); return result; } locale_type getloc()const { return m_pimpl->m_locale; } std::string error_string(regex_constants::error_type n) const { return m_pimpl->error_string(n); } // // extension: // set the name of the message catalog in use (defaults to "boost_regex"). // static std::string catalog_name(const std::string& name); static std::string get_catalog_name(); private: boost::shared_ptr > m_pimpl; // // catalog name handler: // static std::string& get_catalog_name_inst(); #ifdef BOOST_HAS_THREADS static static_mutex& get_mutex_inst(); #endif }; template int cpp_regex_traits::toi(const charT*& first, const charT* last, int radix)const { re_detail::parser_buf sbuf; // buffer for parsing numbers. std::basic_istream is(&sbuf); // stream for parsing numbers. // we do NOT want to parse any thousands separators inside the stream: last = std::find(first, last, BOOST_USE_FACET(std::numpunct, is.getloc()).thousands_sep()); sbuf.pubsetbuf(const_cast(static_cast(first)), static_cast(last-first)); is.clear(); if(std::abs(radix) == 16) is >> std::hex; else if(std::abs(radix) == 8) is >> std::oct; else is >> std::dec; int val; if(is >> val) { first = first + ((last - first) - sbuf.in_avail()); return val; } else return -1; } template std::string cpp_regex_traits::catalog_name(const std::string& name) { #ifdef BOOST_HAS_THREADS static_mutex::scoped_lock lk(get_mutex_inst()); #endif std::string result(get_catalog_name_inst()); get_catalog_name_inst() = name; return result; } template std::string& cpp_regex_traits::get_catalog_name_inst() { static std::string s_name; return s_name; } template std::string cpp_regex_traits::get_catalog_name() { #ifdef BOOST_HAS_THREADS static_mutex::scoped_lock lk(get_mutex_inst()); #endif std::string result(get_catalog_name_inst()); return result; } #ifdef BOOST_HAS_THREADS template static_mutex& cpp_regex_traits::get_mutex_inst() { static static_mutex s_mutex = BOOST_STATIC_MUTEX_INIT; return s_mutex; } #endif } // boost #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif #endif passenger-4.0.37/ext/boost/regex/v4/cregex.hpp000644 000765 000024 00000025225 12233035540 021601 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE cregex.cpp * VERSION see * DESCRIPTION: Declares POSIX API functions * + boost::RegEx high level wrapper. */ #ifndef BOOST_RE_CREGEX_HPP_INCLUDED #define BOOST_RE_CREGEX_HPP_INCLUDED #ifndef BOOST_REGEX_CONFIG_HPP #include #endif #include #include #ifdef __cplusplus #include #else #include #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif /* include these defs only for POSIX compatablity */ #ifdef __cplusplus namespace boost{ extern "C" { #endif #if defined(__cplusplus) && !defined(BOOST_NO_STDC_NAMESPACE) typedef std::ptrdiff_t regoff_t; typedef std::size_t regsize_t; #else typedef ptrdiff_t regoff_t; typedef size_t regsize_t; #endif typedef struct { unsigned int re_magic; #ifdef __cplusplus std::size_t re_nsub; /* number of parenthesized subexpressions */ #else size_t re_nsub; #endif const char* re_endp; /* end pointer for REG_PEND */ void* guts; /* none of your business :-) */ match_flag_type eflags; /* none of your business :-) */ } regex_tA; #ifndef BOOST_NO_WREGEX typedef struct { unsigned int re_magic; #ifdef __cplusplus std::size_t re_nsub; /* number of parenthesized subexpressions */ #else size_t re_nsub; #endif const wchar_t* re_endp; /* end pointer for REG_PEND */ void* guts; /* none of your business :-) */ match_flag_type eflags; /* none of your business :-) */ } regex_tW; #endif typedef struct { regoff_t rm_so; /* start of match */ regoff_t rm_eo; /* end of match */ } regmatch_t; /* regcomp() flags */ typedef enum{ REG_BASIC = 0000, REG_EXTENDED = 0001, REG_ICASE = 0002, REG_NOSUB = 0004, REG_NEWLINE = 0010, REG_NOSPEC = 0020, REG_PEND = 0040, REG_DUMP = 0200, REG_NOCOLLATE = 0400, REG_ESCAPE_IN_LISTS = 01000, REG_NEWLINE_ALT = 02000, REG_PERLEX = 04000, REG_PERL = REG_EXTENDED | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS | REG_PERLEX, REG_AWK = REG_EXTENDED | REG_ESCAPE_IN_LISTS, REG_GREP = REG_BASIC | REG_NEWLINE_ALT, REG_EGREP = REG_EXTENDED | REG_NEWLINE_ALT, REG_ASSERT = 15, REG_INVARG = 16, REG_ATOI = 255, /* convert name to number (!) */ REG_ITOA = 0400 /* convert number to name (!) */ } reg_comp_flags; /* regexec() flags */ typedef enum{ REG_NOTBOL = 00001, REG_NOTEOL = 00002, REG_STARTEND = 00004 } reg_exec_flags; /* * POSIX error codes: */ typedef unsigned reg_error_t; typedef reg_error_t reg_errcode_t; /* backwards compatibility */ static const reg_error_t REG_NOERROR = 0; /* Success. */ static const reg_error_t REG_NOMATCH = 1; /* Didn't find a match (for regexec). */ /* POSIX regcomp return error codes. (In the order listed in the standard.) */ static const reg_error_t REG_BADPAT = 2; /* Invalid pattern. */ static const reg_error_t REG_ECOLLATE = 3; /* Undefined collating element. */ static const reg_error_t REG_ECTYPE = 4; /* Invalid character class name. */ static const reg_error_t REG_EESCAPE = 5; /* Trailing backslash. */ static const reg_error_t REG_ESUBREG = 6; /* Invalid back reference. */ static const reg_error_t REG_EBRACK = 7; /* Unmatched left bracket. */ static const reg_error_t REG_EPAREN = 8; /* Parenthesis imbalance. */ static const reg_error_t REG_EBRACE = 9; /* Unmatched \{. */ static const reg_error_t REG_BADBR = 10; /* Invalid contents of \{\}. */ static const reg_error_t REG_ERANGE = 11; /* Invalid range end. */ static const reg_error_t REG_ESPACE = 12; /* Ran out of memory. */ static const reg_error_t REG_BADRPT = 13; /* No preceding re for repetition op. */ static const reg_error_t REG_EEND = 14; /* unexpected end of expression */ static const reg_error_t REG_ESIZE = 15; /* expression too big */ static const reg_error_t REG_ERPAREN = 8; /* = REG_EPAREN : unmatched right parenthesis */ static const reg_error_t REG_EMPTY = 17; /* empty expression */ static const reg_error_t REG_E_MEMORY = 15; /* = REG_ESIZE : out of memory */ static const reg_error_t REG_ECOMPLEXITY = 18; /* complexity too high */ static const reg_error_t REG_ESTACK = 19; /* out of stack space */ static const reg_error_t REG_E_PERL = 20; /* Perl (?...) error */ static const reg_error_t REG_E_UNKNOWN = 21; /* unknown error */ static const reg_error_t REG_ENOSYS = 21; /* = REG_E_UNKNOWN : Reserved. */ BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA*, const char*, int); BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int, const regex_tA*, char*, regsize_t); BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA*, const char*, regsize_t, regmatch_t*, int); BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeA(regex_tA*); #ifndef BOOST_NO_WREGEX BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW*, const wchar_t*, int); BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int, const regex_tW*, wchar_t*, regsize_t); BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecW(const regex_tW*, const wchar_t*, regsize_t, regmatch_t*, int); BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeW(regex_tW*); #endif #ifdef UNICODE #define regcomp regcompW #define regerror regerrorW #define regexec regexecW #define regfree regfreeW #define regex_t regex_tW #else #define regcomp regcompA #define regerror regerrorA #define regexec regexecA #define regfree regfreeA #define regex_t regex_tA #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef __cplusplus } /* extern "C" */ } /* namespace */ #endif #if defined(__cplusplus) /* * C++ high level wrapper goes here: */ #include #include namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif class RegEx; namespace re_detail{ class RegExData; struct pred1; struct pred2; struct pred3; struct pred4; } /* namespace re_detail */ #if (defined(BOOST_MSVC) || defined(__BORLANDC__)) && !defined(BOOST_DISABLE_WIN32) typedef bool (__cdecl *GrepCallback)(const RegEx& expression); typedef bool (__cdecl *GrepFileCallback)(const char* file, const RegEx& expression); typedef bool (__cdecl *FindFilesCallback)(const char* file); #else typedef bool (*GrepCallback)(const RegEx& expression); typedef bool (*GrepFileCallback)(const char* file, const RegEx& expression); typedef bool (*FindFilesCallback)(const char* file); #endif class BOOST_REGEX_DECL RegEx { private: re_detail::RegExData* pdata; public: RegEx(); RegEx(const RegEx& o); ~RegEx(); explicit RegEx(const char* c, bool icase = false); explicit RegEx(const std::string& s, bool icase = false); RegEx& operator=(const RegEx& o); RegEx& operator=(const char* p); RegEx& operator=(const std::string& s){ return this->operator=(s.c_str()); } unsigned int SetExpression(const char* p, bool icase = false); unsigned int SetExpression(const std::string& s, bool icase = false){ return SetExpression(s.c_str(), icase); } std::string Expression()const; unsigned int error_code()const; /* * now matching operators: */ bool Match(const char* p, match_flag_type flags = match_default); bool Match(const std::string& s, match_flag_type flags = match_default) { return Match(s.c_str(), flags); } bool Search(const char* p, match_flag_type flags = match_default); bool Search(const std::string& s, match_flag_type flags = match_default) { return Search(s.c_str(), flags); } unsigned int Grep(GrepCallback cb, const char* p, match_flag_type flags = match_default); unsigned int Grep(GrepCallback cb, const std::string& s, match_flag_type flags = match_default) { return Grep(cb, s.c_str(), flags); } unsigned int Grep(std::vector& v, const char* p, match_flag_type flags = match_default); unsigned int Grep(std::vector& v, const std::string& s, match_flag_type flags = match_default) { return Grep(v, s.c_str(), flags); } unsigned int Grep(std::vector& v, const char* p, match_flag_type flags = match_default); unsigned int Grep(std::vector& v, const std::string& s, match_flag_type flags = match_default) { return Grep(v, s.c_str(), flags); } #ifndef BOOST_REGEX_NO_FILEITER unsigned int GrepFiles(GrepFileCallback cb, const char* files, bool recurse = false, match_flag_type flags = match_default); unsigned int GrepFiles(GrepFileCallback cb, const std::string& files, bool recurse = false, match_flag_type flags = match_default) { return GrepFiles(cb, files.c_str(), recurse, flags); } unsigned int FindFiles(FindFilesCallback cb, const char* files, bool recurse = false, match_flag_type flags = match_default); unsigned int FindFiles(FindFilesCallback cb, const std::string& files, bool recurse = false, match_flag_type flags = match_default) { return FindFiles(cb, files.c_str(), recurse, flags); } #endif std::string Merge(const std::string& in, const std::string& fmt, bool copy = true, match_flag_type flags = match_default); std::string Merge(const char* in, const char* fmt, bool copy = true, match_flag_type flags = match_default); std::size_t Split(std::vector& v, std::string& s, match_flag_type flags = match_default, unsigned max_count = ~0); /* * now operators for returning what matched in more detail: */ std::size_t Position(int i = 0)const; std::size_t Length(int i = 0)const; bool Matched(int i = 0)const; std::size_t Marks()const; std::string What(int i = 0)const; std::string operator[](int i)const { return What(i); } static const std::size_t npos; friend struct re_detail::pred1; friend struct re_detail::pred2; friend struct re_detail::pred3; friend struct re_detail::pred4; }; #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } /* namespace boost */ #endif /* __cplusplus */ #endif /* include guard */ passenger-4.0.37/ext/boost/regex/v4/error_type.hpp000644 000765 000024 00000002352 12233035540 022512 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2003-2005 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE error_type.hpp * VERSION see * DESCRIPTION: Declares regular expression error type enumerator. */ #ifndef BOOST_REGEX_ERROR_TYPE_HPP #define BOOST_REGEX_ERROR_TYPE_HPP #ifdef __cplusplus namespace boost{ #endif #ifdef __cplusplus namespace regex_constants{ enum error_type{ error_ok = 0, /* not used */ error_no_match = 1, /* not used */ error_bad_pattern = 2, error_collate = 3, error_ctype = 4, error_escape = 5, error_backref = 6, error_brack = 7, error_paren = 8, error_brace = 9, error_badbrace = 10, error_range = 11, error_space = 12, error_badrepeat = 13, error_end = 14, /* not used */ error_size = 15, error_right_paren = 16, /* not used */ error_empty = 17, error_complexity = 18, error_stack = 19, error_perl_extension = 20, error_unknown = 21 }; } } #endif /* __cplusplus */ #endif passenger-4.0.37/ext/boost/regex/v4/fileiter.hpp000644 000765 000024 00000025765 12233035540 022140 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE fileiter.hpp * VERSION see * DESCRIPTION: Declares various platform independent file and * directory iterators, plus binary file input in * the form of class map_file. */ #ifndef BOOST_RE_FILEITER_HPP_INCLUDED #define BOOST_RE_FILEITER_HPP_INCLUDED #ifndef BOOST_REGEX_CONFIG_HPP #include #endif #include #ifndef BOOST_REGEX_NO_FILEITER #if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_REGEX_NO_W32) #error "Sorry, can't mix with STL code and gcc compiler: if you ran configure, try again with configure --disable-ms-windows" #define BOOST_REGEX_FI_WIN32_MAP #define BOOST_REGEX_FI_POSIX_DIR #elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32) #define BOOST_REGEX_FI_WIN32_MAP #define BOOST_REGEX_FI_WIN32_DIR #else #define BOOST_REGEX_FI_POSIX_MAP #define BOOST_REGEX_FI_POSIX_DIR #endif #if defined(BOOST_REGEX_FI_WIN32_MAP)||defined(BOOST_REGEX_FI_WIN32_DIR) #include #endif #if defined(BOOST_REGEX_FI_WIN32_DIR) #include namespace boost{ namespace re_detail{ #ifndef BOOST_NO_ANSI_APIS typedef WIN32_FIND_DATAA _fi_find_data; #else typedef WIN32_FIND_DATAW _fi_find_data; #endif typedef HANDLE _fi_find_handle; } // namespace re_detail } // namespace boost #define _fi_invalid_handle INVALID_HANDLE_VALUE #define _fi_dir FILE_ATTRIBUTE_DIRECTORY #elif defined(BOOST_REGEX_FI_POSIX_DIR) #include #include #include #include #include #include #include #if defined(__SUNPRO_CC) using std::list; #endif #ifndef MAX_PATH #define MAX_PATH 256 #endif namespace boost{ namespace re_detail{ #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif struct _fi_find_data { unsigned dwFileAttributes; char cFileName[MAX_PATH]; }; struct _fi_priv_data; typedef _fi_priv_data* _fi_find_handle; #define _fi_invalid_handle 0 #define _fi_dir 1 _fi_find_handle _fi_FindFirstFile(const char* lpFileName, _fi_find_data* lpFindFileData); bool _fi_FindNextFile(_fi_find_handle hFindFile, _fi_find_data* lpFindFileData); bool _fi_FindClose(_fi_find_handle hFindFile); #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif } // namespace re_detail } // namespace boost #ifdef FindFirstFile #undef FindFirstFile #endif #ifdef FindNextFile #undef FindNextFile #endif #ifdef FindClose #undef FindClose #endif #define FindFirstFileA _fi_FindFirstFile #define FindNextFileA _fi_FindNextFile #define FindClose _fi_FindClose #endif namespace boost{ namespace re_detail{ #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_REGEX_FI_WIN32_MAP // win32 mapfile class BOOST_REGEX_DECL mapfile { HANDLE hfile; HANDLE hmap; const char* _first; const char* _last; public: typedef const char* iterator; mapfile(){ hfile = hmap = 0; _first = _last = 0; } mapfile(const char* file){ hfile = hmap = 0; _first = _last = 0; open(file); } ~mapfile(){ close(); } void open(const char* file); void close(); const char* begin(){ return _first; } const char* end(){ return _last; } size_t size(){ return _last - _first; } bool valid(){ return (hfile != 0) && (hfile != INVALID_HANDLE_VALUE); } }; #else class BOOST_REGEX_DECL mapfile_iterator; class BOOST_REGEX_DECL mapfile { typedef char* pointer; std::FILE* hfile; long int _size; pointer* _first; pointer* _last; mutable std::list condemed; enum sizes { buf_size = 4096 }; void lock(pointer* node)const; void unlock(pointer* node)const; public: typedef mapfile_iterator iterator; mapfile(){ hfile = 0; _size = 0; _first = _last = 0; } mapfile(const char* file){ hfile = 0; _size = 0; _first = _last = 0; open(file); } ~mapfile(){ close(); } void open(const char* file); void close(); iterator begin()const; iterator end()const; unsigned long size()const{ return _size; } bool valid()const{ return hfile != 0; } friend class mapfile_iterator; }; class BOOST_REGEX_DECL mapfile_iterator #if !defined(BOOST_NO_STD_ITERATOR) || defined(BOOST_MSVC_STD_ITERATOR) : public std::iterator #endif { typedef mapfile::pointer internal_pointer; internal_pointer* node; const mapfile* file; unsigned long offset; long position()const { return file ? ((node - file->_first) * mapfile::buf_size + offset) : 0; } void position(long pos) { if(file) { node = file->_first + (pos / mapfile::buf_size); offset = pos % mapfile::buf_size; } } public: typedef std::ptrdiff_t difference_type; typedef char value_type; typedef const char* pointer; typedef const char& reference; typedef std::random_access_iterator_tag iterator_category; mapfile_iterator() { node = 0; file = 0; offset = 0; } mapfile_iterator(const mapfile* f, long arg_position) { file = f; node = f->_first + arg_position / mapfile::buf_size; offset = arg_position % mapfile::buf_size; if(file) file->lock(node); } mapfile_iterator(const mapfile_iterator& i) { file = i.file; node = i.node; offset = i.offset; if(file) file->lock(node); } ~mapfile_iterator() { if(file && node) file->unlock(node); } mapfile_iterator& operator = (const mapfile_iterator& i); char operator* ()const { BOOST_ASSERT(node >= file->_first); BOOST_ASSERT(node < file->_last); return file ? *(*node + sizeof(int) + offset) : char(0); } char operator[] (long off)const { mapfile_iterator tmp(*this); tmp += off; return *tmp; } mapfile_iterator& operator++ (); mapfile_iterator operator++ (int); mapfile_iterator& operator-- (); mapfile_iterator operator-- (int); mapfile_iterator& operator += (long off) { position(position() + off); return *this; } mapfile_iterator& operator -= (long off) { position(position() - off); return *this; } friend inline bool operator==(const mapfile_iterator& i, const mapfile_iterator& j) { return (i.file == j.file) && (i.node == j.node) && (i.offset == j.offset); } friend inline bool operator!=(const mapfile_iterator& i, const mapfile_iterator& j) { return !(i == j); } friend inline bool operator<(const mapfile_iterator& i, const mapfile_iterator& j) { return i.position() < j.position(); } friend inline bool operator>(const mapfile_iterator& i, const mapfile_iterator& j) { return i.position() > j.position(); } friend inline bool operator<=(const mapfile_iterator& i, const mapfile_iterator& j) { return i.position() <= j.position(); } friend inline bool operator>=(const mapfile_iterator& i, const mapfile_iterator& j) { return i.position() >= j.position(); } friend mapfile_iterator operator + (const mapfile_iterator& i, long off); friend mapfile_iterator operator + (long off, const mapfile_iterator& i) { mapfile_iterator tmp(i); return tmp += off; } friend mapfile_iterator operator - (const mapfile_iterator& i, long off); friend inline long operator - (const mapfile_iterator& i, const mapfile_iterator& j) { return i.position() - j.position(); } }; #endif // _fi_sep determines the directory separator, either '\\' or '/' BOOST_REGEX_DECL extern const char* _fi_sep; struct file_iterator_ref { _fi_find_handle hf; _fi_find_data _data; long count; }; class BOOST_REGEX_DECL file_iterator { char* _root; char* _path; char* ptr; file_iterator_ref* ref; public: typedef std::ptrdiff_t difference_type; typedef const char* value_type; typedef const char** pointer; typedef const char*& reference; typedef std::input_iterator_tag iterator_category; file_iterator(); file_iterator(const char* wild); ~file_iterator(); file_iterator(const file_iterator&); file_iterator& operator=(const file_iterator&); const char* root()const { return _root; } const char* path()const { return _path; } const char* name()const { return ptr; } _fi_find_data* data() { return &(ref->_data); } void next(); file_iterator& operator++() { next(); return *this; } file_iterator operator++(int); const char* operator*() { return path(); } friend inline bool operator == (const file_iterator& f1, const file_iterator& f2) { return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle)); } friend inline bool operator != (const file_iterator& f1, const file_iterator& f2) { return !(f1 == f2); } }; // dwa 9/13/00 - suppress unused parameter warning inline bool operator < (const file_iterator&, const file_iterator&) { return false; } class BOOST_REGEX_DECL directory_iterator { char* _root; char* _path; char* ptr; file_iterator_ref* ref; public: typedef std::ptrdiff_t difference_type; typedef const char* value_type; typedef const char** pointer; typedef const char*& reference; typedef std::input_iterator_tag iterator_category; directory_iterator(); directory_iterator(const char* wild); ~directory_iterator(); directory_iterator(const directory_iterator& other); directory_iterator& operator=(const directory_iterator& other); const char* root()const { return _root; } const char* path()const { return _path; } const char* name()const { return ptr; } _fi_find_data* data() { return &(ref->_data); } void next(); directory_iterator& operator++() { next(); return *this; } directory_iterator operator++(int); const char* operator*() { return path(); } static const char* separator() { return _fi_sep; } friend inline bool operator == (const directory_iterator& f1, const directory_iterator& f2) { return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle)); } friend inline bool operator != (const directory_iterator& f1, const directory_iterator& f2) { return !(f1 == f2); } }; inline bool operator < (const directory_iterator&, const directory_iterator&) { return false; } #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif } // namespace re_detail using boost::re_detail::directory_iterator; using boost::re_detail::file_iterator; using boost::re_detail::mapfile; } // namespace boost #endif // BOOST_REGEX_NO_FILEITER #endif // BOOST_RE_FILEITER_HPP passenger-4.0.37/ext/boost/regex/v4/instances.hpp000644 000765 000024 00000020654 12233035540 022314 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE instances.cpp * VERSION see * DESCRIPTION: Defines those template instances that are placed in the * library rather than in the users object files. */ // // note no include guard, we may include this multiple times: // #ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES namespace boost{ // // this header can be included multiple times, each time with // a different character type, BOOST_REGEX_CHAR_T must be defined // first: // #ifndef BOOST_REGEX_CHAR_T # error "BOOST_REGEX_CHAR_T not defined" #endif #ifndef BOOST_REGEX_TRAITS_T # define BOOST_REGEX_TRAITS_T , boost::regex_traits #endif // // what follows is compiler specific: // #if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif # ifndef BOOST_REGEX_INSTANTIATE # pragma option push -Jgx # endif template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >; template class BOOST_REGEX_DECL match_results< const BOOST_REGEX_CHAR_T* >; #ifndef BOOST_NO_STD_ALLOCATOR template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >; #endif # ifndef BOOST_REGEX_INSTANTIATE # pragma option pop # endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #elif defined(BOOST_MSVC) || defined(__ICL) # ifndef BOOST_REGEX_INSTANTIATE # ifdef __GNUC__ # define template __extension__ extern template # else # if BOOST_MSVC > 1310 # define BOOST_REGEX_TEMPLATE_DECL # endif # define template extern template # endif # endif #ifndef BOOST_REGEX_TEMPLATE_DECL # define BOOST_REGEX_TEMPLATE_DECL BOOST_REGEX_DECL #endif # ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable : 4251 4231) # if BOOST_MSVC < 1600 # pragma warning(disable : 4660) # endif # endif template class BOOST_REGEX_TEMPLATE_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >; #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) template class BOOST_REGEX_TEMPLATE_DECL match_results< const BOOST_REGEX_CHAR_T* >; #endif #ifndef BOOST_NO_STD_ALLOCATOR template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >; #endif #if !(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB <= 1))\ && !(defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800))\ && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))\ && !defined(BOOST_REGEX_ICU_INSTANCES) #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) template class BOOST_REGEX_TEMPLATE_DECL match_results< std::basic_string::const_iterator >; #endif #ifndef BOOST_NO_STD_ALLOCATOR template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher< std::basic_string::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >; #endif #endif # ifdef BOOST_MSVC # pragma warning(pop) # endif # ifdef template # undef template # endif #undef BOOST_REGEX_TEMPLATE_DECL #elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) # ifndef BOOST_REGEX_INSTANTIATE # ifdef __GNUC__ # define template __extension__ extern template # else # define template extern template # endif # endif #if !defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_REGEX_ICU_INSTANCES) namespace re_detail{ template BOOST_REGEX_DECL std::locale cpp_regex_traits_base::imbue(const std::locale& l); template BOOST_REGEX_DECL cpp_regex_traits_implementation::string_type cpp_regex_traits_implementation::transform_primary(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const; template BOOST_REGEX_DECL cpp_regex_traits_implementation::string_type cpp_regex_traits_implementation::transform(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const; template BOOST_REGEX_DECL cpp_regex_traits_implementation::string_type cpp_regex_traits_implementation::lookup_collatename(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const; template BOOST_REGEX_DECL void cpp_regex_traits_implementation::init(); template BOOST_REGEX_DECL cpp_regex_traits_implementation::char_class_type cpp_regex_traits_implementation::lookup_classname_imp(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const; #ifdef BOOST_REGEX_BUGGY_CTYPE_FACET template BOOST_REGEX_DECL bool cpp_regex_traits_implementation::isctype(const BOOST_REGEX_CHAR_T c, char_class_type mask) const; #endif } // namespace template BOOST_REGEX_DECL int cpp_regex_traits::toi(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, int radix)const; template BOOST_REGEX_DECL std::string cpp_regex_traits::catalog_name(const std::string& name); template BOOST_REGEX_DECL std::string& cpp_regex_traits::get_catalog_name_inst(); template BOOST_REGEX_DECL std::string cpp_regex_traits::get_catalog_name(); #ifdef BOOST_HAS_THREADS template BOOST_REGEX_DECL static_mutex& cpp_regex_traits::get_mutex_inst(); #endif #endif template BOOST_REGEX_DECL basic_regex& basic_regex::do_assign( const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2, flag_type f); template BOOST_REGEX_DECL basic_regex::locale_type BOOST_REGEX_CALL basic_regex::imbue(locale_type l); template BOOST_REGEX_DECL void BOOST_REGEX_CALL match_results::maybe_assign( const match_results& m); namespace re_detail{ template BOOST_REGEX_DECL void perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >::construct_init( const basic_regex& e, match_flag_type f); template BOOST_REGEX_DECL bool perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >::match(); template BOOST_REGEX_DECL bool perl_matcher::allocator_type BOOST_REGEX_TRAITS_T >::find(); } // namespace #if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \ && !defined(BOOST_REGEX_ICU_INSTANCES)\ && !defined(__SGI_STL_PORT)\ && !defined(_STLPORT_VERSION) // std:basic_string<>::const_iterator instances as well: template BOOST_REGEX_DECL void BOOST_REGEX_CALL match_results::const_iterator>::maybe_assign( const match_results::const_iterator>& m); namespace re_detail{ template BOOST_REGEX_DECL void perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::construct_init( const basic_regex& e, match_flag_type f); template BOOST_REGEX_DECL bool perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::match(); template BOOST_REGEX_DECL bool perl_matcher::const_iterator, match_results< std::basic_string::const_iterator >::allocator_type, boost::regex_traits >::find(); } // namespace #endif # ifdef template # undef template # endif #endif } // namespace boost #endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES passenger-4.0.37/ext/boost/regex/v4/iterator_category.hpp000644 000765 000024 00000003650 12233035540 024050 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_match.hpp * VERSION see * DESCRIPTION: Iterator traits for selecting an iterator type as * an integral constant expression. */ #ifndef BOOST_REGEX_ITERATOR_CATEGORY_HPP #define BOOST_REGEX_ITERATOR_CATEGORY_HPP #include #include #include namespace boost{ namespace detail{ template struct is_random_imp { #ifndef BOOST_NO_STD_ITERATOR_TRAITS private: typedef typename std::iterator_traits::iterator_category cat; public: BOOST_STATIC_CONSTANT(bool, value = (::boost::is_convertible::value)); #else BOOST_STATIC_CONSTANT(bool, value = false); #endif }; template struct is_random_pointer_imp { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_random_imp_selector { template struct rebind { typedef is_random_imp type; }; }; template <> struct is_random_imp_selector { template struct rebind { typedef is_random_pointer_imp type; }; }; } template struct is_random_access_iterator { private: typedef detail::is_random_imp_selector< ::boost::is_pointer::value> selector; typedef typename selector::template rebind bound_type; typedef typename bound_type::type answer; public: BOOST_STATIC_CONSTANT(bool, value = answer::value); }; #ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION template const bool is_random_access_iterator::value; #endif } #endif passenger-4.0.37/ext/boost/regex/v4/iterator_traits.hpp000644 000765 000024 00000007367 12233035540 023552 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE iterator_traits.cpp * VERSION see * DESCRIPTION: Declares iterator traits workarounds. */ #ifndef BOOST_REGEX_V4_ITERATOR_TRAITS_HPP #define BOOST_REGEX_V4_ITERATOR_TRAITS_HPP #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ namespace re_detail{ #if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct regex_iterator_traits { typedef typename T::iterator_category iterator_category; typedef typename T::value_type value_type; #if !defined(BOOST_NO_STD_ITERATOR) typedef typename T::difference_type difference_type; typedef typename T::pointer pointer; typedef typename T::reference reference; #else typedef std::ptrdiff_t difference_type; typedef value_type* pointer; typedef value_type& reference; #endif }; template struct pointer_iterator_traits { typedef std::ptrdiff_t difference_type; typedef T value_type; typedef T* pointer; typedef T& reference; typedef std::random_access_iterator_tag iterator_category; }; template struct const_pointer_iterator_traits { typedef std::ptrdiff_t difference_type; typedef T value_type; typedef const T* pointer; typedef const T& reference; typedef std::random_access_iterator_tag iterator_category; }; template<> struct regex_iterator_traits : pointer_iterator_traits{}; template<> struct regex_iterator_traits : const_pointer_iterator_traits{}; template<> struct regex_iterator_traits : pointer_iterator_traits{}; template<> struct regex_iterator_traits : const_pointer_iterator_traits{}; // // the follwoing are needed for ICU support: // template<> struct regex_iterator_traits : pointer_iterator_traits{}; template<> struct regex_iterator_traits : const_pointer_iterator_traits{}; template<> struct regex_iterator_traits : pointer_iterator_traits{}; template<> struct regex_iterator_traits : const_pointer_iterator_traits{}; #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T template<> struct regex_iterator_traits : pointer_iterator_traits{}; template<> struct regex_iterator_traits : const_pointer_iterator_traits{}; #endif #if defined(__SGI_STL_PORT) && defined(__STL_DEBUG) template<> struct regex_iterator_traits : pointer_iterator_traits{}; template<> struct regex_iterator_traits : const_pointer_iterator_traits{}; #ifndef BOOST_NO_STD_WSTRING template<> struct regex_iterator_traits : pointer_iterator_traits{}; template<> struct regex_iterator_traits : const_pointer_iterator_traits{}; #endif // BOOST_NO_WSTRING #endif // stport #else template struct regex_iterator_traits : public std::iterator_traits {}; #endif } // namespace re_detail } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/match_flags.hpp000644 000765 000024 00000014007 12233035540 022570 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE match_flags.hpp * VERSION see * DESCRIPTION: Declares match_flags type. */ #ifndef BOOST_REGEX_V4_MATCH_FLAGS #define BOOST_REGEX_V4_MATCH_FLAGS #ifdef __cplusplus # include #endif #ifdef __cplusplus namespace boost{ namespace regex_constants{ #endif typedef enum _match_flags { match_default = 0, match_not_bol = 1, /* first is not start of line */ match_not_eol = match_not_bol << 1, /* last is not end of line */ match_not_bob = match_not_eol << 1, /* first is not start of buffer */ match_not_eob = match_not_bob << 1, /* last is not end of buffer */ match_not_bow = match_not_eob << 1, /* first is not start of word */ match_not_eow = match_not_bow << 1, /* last is not end of word */ match_not_dot_newline = match_not_eow << 1, /* \n is not matched by '.' */ match_not_dot_null = match_not_dot_newline << 1, /* '\0' is not matched by '.' */ match_prev_avail = match_not_dot_null << 1, /* *--first is a valid expression */ match_init = match_prev_avail << 1, /* internal use */ match_any = match_init << 1, /* don't care what we match */ match_not_null = match_any << 1, /* string can't be null */ match_continuous = match_not_null << 1, /* each grep match must continue from */ /* uninterupted from the previous one */ match_partial = match_continuous << 1, /* find partial matches */ match_stop = match_partial << 1, /* stop after first match (grep) V3 only */ match_not_initial_null = match_stop, /* don't match initial null, V4 only */ match_all = match_stop << 1, /* must find the whole of input even if match_any is set */ match_perl = match_all << 1, /* Use perl matching rules */ match_posix = match_perl << 1, /* Use POSIX matching rules */ match_nosubs = match_posix << 1, /* don't trap marked subs */ match_extra = match_nosubs << 1, /* include full capture information for repeated captures */ match_single_line = match_extra << 1, /* treat text as single line and ignor any \n's when matching ^ and $. */ match_unused1 = match_single_line << 1, /* unused */ match_unused2 = match_unused1 << 1, /* unused */ match_unused3 = match_unused2 << 1, /* unused */ match_max = match_unused3, format_perl = 0, /* perl style replacement */ format_default = 0, /* ditto. */ format_sed = match_max << 1, /* sed style replacement. */ format_all = format_sed << 1, /* enable all extentions to sytax. */ format_no_copy = format_all << 1, /* don't copy non-matching segments. */ format_first_only = format_no_copy << 1, /* Only replace first occurance. */ format_is_if = format_first_only << 1, /* internal use only. */ format_literal = format_is_if << 1 /* treat string as a literal */ } match_flags; #if (defined(_MSC_VER) && (_MSC_VER < 1300)) || defined(__BORLANDC__) typedef unsigned long match_flag_type; #else typedef match_flags match_flag_type; #ifdef __cplusplus inline match_flags operator&(match_flags m1, match_flags m2) { return static_cast(static_cast(m1) & static_cast(m2)); } inline match_flags operator|(match_flags m1, match_flags m2) { return static_cast(static_cast(m1) | static_cast(m2)); } inline match_flags operator^(match_flags m1, match_flags m2) { return static_cast(static_cast(m1) ^ static_cast(m2)); } inline match_flags operator~(match_flags m1) { return static_cast(~static_cast(m1)); } inline match_flags& operator&=(match_flags& m1, match_flags m2) { m1 = m1&m2; return m1; } inline match_flags& operator|=(match_flags& m1, match_flags m2) { m1 = m1|m2; return m1; } inline match_flags& operator^=(match_flags& m1, match_flags m2) { m1 = m1^m2; return m1; } #endif #endif #ifdef __cplusplus } /* namespace regex_constants */ /* * import names into boost for backwards compatiblity: */ using regex_constants::match_flag_type; using regex_constants::match_default; using regex_constants::match_not_bol; using regex_constants::match_not_eol; using regex_constants::match_not_bob; using regex_constants::match_not_eob; using regex_constants::match_not_bow; using regex_constants::match_not_eow; using regex_constants::match_not_dot_newline; using regex_constants::match_not_dot_null; using regex_constants::match_prev_avail; /* using regex_constants::match_init; */ using regex_constants::match_any; using regex_constants::match_not_null; using regex_constants::match_continuous; using regex_constants::match_partial; /*using regex_constants::match_stop; */ using regex_constants::match_all; using regex_constants::match_perl; using regex_constants::match_posix; using regex_constants::match_nosubs; using regex_constants::match_extra; using regex_constants::match_single_line; /*using regex_constants::match_max; */ using regex_constants::format_all; using regex_constants::format_sed; using regex_constants::format_perl; using regex_constants::format_default; using regex_constants::format_no_copy; using regex_constants::format_first_only; /*using regex_constants::format_is_if;*/ } /* namespace boost */ #endif /* __cplusplus */ #endif /* include guard */ passenger-4.0.37/ext/boost/regex/v4/match_results.hpp000644 000765 000024 00000052710 12233035540 023200 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2009 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE match_results.cpp * VERSION see * DESCRIPTION: Declares template class match_results. */ #ifndef BOOST_REGEX_V4_MATCH_RESULTS_HPP #define BOOST_REGEX_V4_MATCH_RESULTS_HPP #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable : 4251 4231) # if BOOST_MSVC < 1600 # pragma warning(disable : 4660) # endif #endif namespace re_detail{ class named_subexpressions; } template class match_results { private: #ifndef BOOST_NO_STD_ALLOCATOR typedef std::vector, Allocator> vector_type; #else typedef std::vector > vector_type; #endif public: typedef sub_match value_type; #if !defined(BOOST_NO_STD_ALLOCATOR) && !(defined(BOOST_MSVC) && defined(_STLPORT_VERSION)) typedef typename Allocator::const_reference const_reference; #else typedef const value_type& const_reference; #endif typedef const_reference reference; typedef typename vector_type::const_iterator const_iterator; typedef const_iterator iterator; typedef typename re_detail::regex_iterator_traits< BidiIterator>::difference_type difference_type; typedef typename Allocator::size_type size_type; typedef Allocator allocator_type; typedef typename re_detail::regex_iterator_traits< BidiIterator>::value_type char_type; typedef std::basic_string string_type; typedef re_detail::named_subexpressions named_sub_type; // construct/copy/destroy: explicit match_results(const Allocator& a = Allocator()) #ifndef BOOST_NO_STD_ALLOCATOR : m_subs(a), m_base(), m_last_closed_paren(0), m_is_singular(true) {} #else : m_subs(), m_base(), m_last_closed_paren(0), m_is_singular(true) { (void)a; } #endif match_results(const match_results& m) : m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular) { if(!m_is_singular) { m_base = m.m_base; m_null = m.m_null; } } match_results& operator=(const match_results& m) { m_subs = m.m_subs; m_named_subs = m.m_named_subs; m_last_closed_paren = m.m_last_closed_paren; m_is_singular = m.m_is_singular; if(!m_is_singular) { m_base = m.m_base; m_null = m.m_null; } return *this; } ~match_results(){} // size: size_type size() const { return empty() ? 0 : m_subs.size() - 2; } size_type max_size() const { return m_subs.max_size(); } bool empty() const { return m_subs.size() < 2; } // element access: difference_type length(int sub = 0) const { if(m_is_singular) raise_logic_error(); sub += 2; if((sub < (int)m_subs.size()) && (sub > 0)) return m_subs[sub].length(); return 0; } difference_type length(const char_type* sub) const { if(m_is_singular) raise_logic_error(); const char_type* sub_end = sub; while(*sub_end) ++sub_end; return length(named_subexpression_index(sub, sub_end)); } template difference_type length(const charT* sub) const { if(m_is_singular) raise_logic_error(); const charT* sub_end = sub; while(*sub_end) ++sub_end; return length(named_subexpression_index(sub, sub_end)); } template difference_type length(const std::basic_string& sub) const { return length(sub.c_str()); } difference_type position(size_type sub = 0) const { if(m_is_singular) raise_logic_error(); sub += 2; if(sub < m_subs.size()) { const sub_match& s = m_subs[sub]; if(s.matched || (sub == 2)) { return ::boost::re_detail::distance((BidiIterator)(m_base), (BidiIterator)(s.first)); } } return ~static_cast(0); } difference_type position(const char_type* sub) const { const char_type* sub_end = sub; while(*sub_end) ++sub_end; return position(named_subexpression_index(sub, sub_end)); } template difference_type position(const charT* sub) const { const charT* sub_end = sub; while(*sub_end) ++sub_end; return position(named_subexpression_index(sub, sub_end)); } template difference_type position(const std::basic_string& sub) const { return position(sub.c_str()); } string_type str(int sub = 0) const { if(m_is_singular) raise_logic_error(); sub += 2; string_type result; if(sub < (int)m_subs.size() && (sub > 0)) { const sub_match& s = m_subs[sub]; if(s.matched) { result = s.str(); } } return result; } string_type str(const char_type* sub) const { return (*this)[sub].str(); } template string_type str(const std::basic_string& sub) const { return (*this)[sub].str(); } template string_type str(const charT* sub) const { return (*this)[sub].str(); } template string_type str(const std::basic_string& sub) const { return (*this)[sub].str(); } const_reference operator[](int sub) const { if(m_is_singular && m_subs.empty()) raise_logic_error(); sub += 2; if(sub < (int)m_subs.size() && (sub >= 0)) { return m_subs[sub]; } return m_null; } // // Named sub-expressions: // const_reference named_subexpression(const char_type* i, const char_type* j) const { // // Scan for the leftmost *matched* subexpression with the specified named: // if(m_is_singular) raise_logic_error(); re_detail::named_subexpressions::range_type r = m_named_subs->equal_range(i, j); while((r.first != r.second) && ((*this)[r.first->index].matched == false)) ++r.first; return r.first != r.second ? (*this)[r.first->index] : m_null; } template const_reference named_subexpression(const charT* i, const charT* j) const { BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type)); if(i == j) return m_null; std::vector s; while(i != j) s.insert(s.end(), *i++); return named_subexpression(&*s.begin(), &*s.begin() + s.size()); } int named_subexpression_index(const char_type* i, const char_type* j) const { // // Scan for the leftmost *matched* subexpression with the specified named. // If none found then return the leftmost expression with that name, // otherwise an invalid index: // if(m_is_singular) raise_logic_error(); re_detail::named_subexpressions::range_type s, r; s = r = m_named_subs->equal_range(i, j); while((r.first != r.second) && ((*this)[r.first->index].matched == false)) ++r.first; if(r.first == r.second) r = s; return r.first != r.second ? r.first->index : -20; } template int named_subexpression_index(const charT* i, const charT* j) const { BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type)); if(i == j) return -20; std::vector s; while(i != j) s.insert(s.end(), *i++); return named_subexpression_index(&*s.begin(), &*s.begin() + s.size()); } template const_reference operator[](const std::basic_string& s) const { return named_subexpression(s.c_str(), s.c_str() + s.size()); } const_reference operator[](const char_type* p) const { const char_type* e = p; while(*e) ++e; return named_subexpression(p, e); } template const_reference operator[](const charT* p) const { BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type)); if(*p == 0) return m_null; std::vector s; while(*p) s.insert(s.end(), *p++); return named_subexpression(&*s.begin(), &*s.begin() + s.size()); } template const_reference operator[](const std::basic_string& ns) const { BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type)); if(ns.empty()) return m_null; std::vector s; for(unsigned i = 0; i < ns.size(); ++i) s.insert(s.end(), ns[i]); return named_subexpression(&*s.begin(), &*s.begin() + s.size()); } const_reference prefix() const { if(m_is_singular) raise_logic_error(); return (*this)[-1]; } const_reference suffix() const { if(m_is_singular) raise_logic_error(); return (*this)[-2]; } const_iterator begin() const { return (m_subs.size() > 2) ? (m_subs.begin() + 2) : m_subs.end(); } const_iterator end() const { return m_subs.end(); } // format: template OutputIterator format(OutputIterator out, Functor fmt, match_flag_type flags = format_default) const { if(m_is_singular) raise_logic_error(); typedef typename re_detail::compute_functor_type, OutputIterator>::type F; F func(fmt); return func(*this, out, flags); } template string_type format(Functor fmt, match_flag_type flags = format_default) const { if(m_is_singular) raise_logic_error(); std::basic_string result; re_detail::string_out_iterator > i(result); typedef typename re_detail::compute_functor_type, re_detail::string_out_iterator > >::type F; F func(fmt); func(*this, i, flags); return result; } // format with locale: template OutputIterator format(OutputIterator out, Functor fmt, match_flag_type flags, const RegexT& re) const { if(m_is_singular) raise_logic_error(); typedef ::boost::regex_traits_wrapper traits_type; typedef typename re_detail::compute_functor_type, OutputIterator, traits_type>::type F; F func(fmt); return func(*this, out, flags, re.get_traits()); } template string_type format(Functor fmt, match_flag_type flags, const RegexT& re) const { if(m_is_singular) raise_logic_error(); typedef ::boost::regex_traits_wrapper traits_type; std::basic_string result; re_detail::string_out_iterator > i(result); typedef typename re_detail::compute_functor_type, re_detail::string_out_iterator >, traits_type >::type F; F func(fmt); func(*this, i, flags, re.get_traits()); return result; } const_reference get_last_closed_paren()const { if(m_is_singular) raise_logic_error(); return m_last_closed_paren == 0 ? m_null : (*this)[m_last_closed_paren]; } allocator_type get_allocator() const { #ifndef BOOST_NO_STD_ALLOCATOR return m_subs.get_allocator(); #else return allocator_type(); #endif } void swap(match_results& that) { std::swap(m_subs, that.m_subs); std::swap(m_named_subs, that.m_named_subs); std::swap(m_last_closed_paren, that.m_last_closed_paren); if(m_is_singular) { if(!that.m_is_singular) { m_base = that.m_base; m_null = that.m_null; } } else if(that.m_is_singular) { that.m_base = m_base; that.m_null = m_null; } else { std::swap(m_base, that.m_base); std::swap(m_null, that.m_null); } std::swap(m_is_singular, that.m_is_singular); } bool operator==(const match_results& that)const { if(m_is_singular) { return that.m_is_singular; } else if(that.m_is_singular) { return false; } return (m_subs == that.m_subs) && (m_base == that.m_base) && (m_last_closed_paren == that.m_last_closed_paren); } bool operator!=(const match_results& that)const { return !(*this == that); } #ifdef BOOST_REGEX_MATCH_EXTRA typedef typename sub_match::capture_sequence_type capture_sequence_type; const capture_sequence_type& captures(int i)const { if(m_is_singular) raise_logic_error(); return (*this)[i].captures(); } #endif // // private access functions: void BOOST_REGEX_CALL set_second(BidiIterator i) { BOOST_ASSERT(m_subs.size() > 2); m_subs[2].second = i; m_subs[2].matched = true; m_subs[0].first = i; m_subs[0].matched = (m_subs[0].first != m_subs[0].second); m_null.first = i; m_null.second = i; m_null.matched = false; m_is_singular = false; } void BOOST_REGEX_CALL set_second(BidiIterator i, size_type pos, bool m = true, bool escape_k = false) { if(pos) m_last_closed_paren = static_cast(pos); pos += 2; BOOST_ASSERT(m_subs.size() > pos); m_subs[pos].second = i; m_subs[pos].matched = m; if((pos == 2) && !escape_k) { m_subs[0].first = i; m_subs[0].matched = (m_subs[0].first != m_subs[0].second); m_null.first = i; m_null.second = i; m_null.matched = false; m_is_singular = false; } } void BOOST_REGEX_CALL set_size(size_type n, BidiIterator i, BidiIterator j) { value_type v(j); size_type len = m_subs.size(); if(len > n + 2) { m_subs.erase(m_subs.begin()+n+2, m_subs.end()); std::fill(m_subs.begin(), m_subs.end(), v); } else { std::fill(m_subs.begin(), m_subs.end(), v); if(n+2 != len) m_subs.insert(m_subs.end(), n+2-len, v); } m_subs[1].first = i; m_last_closed_paren = 0; } void BOOST_REGEX_CALL set_base(BidiIterator pos) { m_base = pos; } BidiIterator base()const { return m_base; } void BOOST_REGEX_CALL set_first(BidiIterator i) { BOOST_ASSERT(m_subs.size() > 2); // set up prefix: m_subs[1].second = i; m_subs[1].matched = (m_subs[1].first != i); // set up $0: m_subs[2].first = i; // zero out everything else: for(size_type n = 3; n < m_subs.size(); ++n) { m_subs[n].first = m_subs[n].second = m_subs[0].second; m_subs[n].matched = false; } } void BOOST_REGEX_CALL set_first(BidiIterator i, size_type pos, bool escape_k = false) { BOOST_ASSERT(pos+2 < m_subs.size()); if(pos || escape_k) { m_subs[pos+2].first = i; if(escape_k) { m_subs[1].second = i; m_subs[1].matched = (m_subs[1].first != m_subs[1].second); } } else set_first(i); } void BOOST_REGEX_CALL maybe_assign(const match_results& m); void BOOST_REGEX_CALL set_named_subs(boost::shared_ptr subs) { m_named_subs = subs; } private: // // Error handler called when an uninitialized match_results is accessed: // static void raise_logic_error() { std::logic_error e("Attempt to access an uninitialzed boost::match_results<> class."); boost::throw_exception(e); } vector_type m_subs; // subexpressions BidiIterator m_base; // where the search started from sub_match m_null; // a null match boost::shared_ptr m_named_subs; // Shared copy of named subs in the regex object int m_last_closed_paren; // Last ) to be seen - used for formatting bool m_is_singular; // True if our stored iterators are singular }; template void BOOST_REGEX_CALL match_results::maybe_assign(const match_results& m) { if(m_is_singular) { *this = m; return; } const_iterator p1, p2; p1 = begin(); p2 = m.begin(); // // Distances are measured from the start of *this* match, unless this isn't // a valid match in which case we use the start of the whole sequence. Note that // no subsequent match-candidate can ever be to the left of the first match found. // This ensures that when we are using bidirectional iterators, that distances // measured are as short as possible, and therefore as efficient as possible // to compute. Finally note that we don't use the "matched" data member to test // whether a sub-expression is a valid match, because partial matches set this // to false for sub-expression 0. // BidiIterator l_end = this->suffix().second; BidiIterator l_base = (p1->first == l_end) ? this->prefix().first : (*this)[0].first; difference_type len1 = 0; difference_type len2 = 0; difference_type base1 = 0; difference_type base2 = 0; std::size_t i; for(i = 0; i < size(); ++i, ++p1, ++p2) { // // Leftmost takes priority over longest; handle special cases // where distances need not be computed first (an optimisation // for bidirectional iterators: ensure that we don't accidently // compute the length of the whole sequence, as this can be really // expensive). // if(p1->first == l_end) { if(p2->first != l_end) { // p2 must be better than p1, and no need to calculate // actual distances: base1 = 1; base2 = 0; break; } else { // *p1 and *p2 are either unmatched or match end-of sequence, // either way no need to calculate distances: if((p1->matched == false) && (p2->matched == true)) break; if((p1->matched == true) && (p2->matched == false)) return; continue; } } else if(p2->first == l_end) { // p1 better than p2, and no need to calculate distances: return; } base1 = ::boost::re_detail::distance(l_base, p1->first); base2 = ::boost::re_detail::distance(l_base, p2->first); BOOST_ASSERT(base1 >= 0); BOOST_ASSERT(base2 >= 0); if(base1 < base2) return; if(base2 < base1) break; len1 = ::boost::re_detail::distance((BidiIterator)p1->first, (BidiIterator)p1->second); len2 = ::boost::re_detail::distance((BidiIterator)p2->first, (BidiIterator)p2->second); BOOST_ASSERT(len1 >= 0); BOOST_ASSERT(len2 >= 0); if((len1 != len2) || ((p1->matched == false) && (p2->matched == true))) break; if((p1->matched == true) && (p2->matched == false)) return; } if(i == size()) return; if(base2 < base1) *this = m; else if((len2 > len1) || ((p1->matched == false) && (p2->matched == true)) ) *this = m; } template void swap(match_results& a, match_results& b) { a.swap(b); } #ifndef BOOST_NO_STD_LOCALE template std::basic_ostream& operator << (std::basic_ostream& os, const match_results& s) { return (os << s.str()); } #else template std::ostream& operator << (std::ostream& os, const match_results& s) { return (os << s.str()); } #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/mem_block_cache.hpp000644 000765 000024 00000003706 12233035540 023377 0ustar00honglistaff000000 000000 /* * Copyright (c) 2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE mem_block_cache.hpp * VERSION see * DESCRIPTION: memory block cache used by the non-recursive matcher. */ #ifndef BOOST_REGEX_V4_MEM_BLOCK_CACHE_HPP #define BOOST_REGEX_V4_MEM_BLOCK_CACHE_HPP #include #ifdef BOOST_HAS_THREADS #include #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif namespace boost{ namespace re_detail{ struct mem_block_node { mem_block_node* next; }; struct mem_block_cache { // this member has to be statically initialsed: mem_block_node* next; unsigned cached_blocks; #ifdef BOOST_HAS_THREADS boost::static_mutex mut; #endif ~mem_block_cache() { while(next) { mem_block_node* old = next; next = next->next; ::operator delete(old); } } void* get() { #ifdef BOOST_HAS_THREADS boost::static_mutex::scoped_lock g(mut); #endif if(next) { mem_block_node* result = next; next = next->next; --cached_blocks; return result; } return ::operator new(BOOST_REGEX_BLOCKSIZE); } void put(void* p) { #ifdef BOOST_HAS_THREADS boost::static_mutex::scoped_lock g(mut); #endif if(cached_blocks >= BOOST_REGEX_MAX_CACHE_BLOCKS) { ::operator delete(p); } else { mem_block_node* old = static_cast(p); old->next = next; next = old; ++cached_blocks; } } }; extern mem_block_cache block_cache; } } // namespace boost #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #endif passenger-4.0.37/ext/boost/regex/v4/perl_matcher.hpp000644 000765 000024 00000041550 12233035540 022770 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ #ifndef BOOST_REGEX_MATCHER_HPP #define BOOST_REGEX_MATCHER_HPP #include #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4800) #endif namespace boost{ namespace re_detail{ // // error checking API: // BOOST_REGEX_DECL void BOOST_REGEX_CALL verify_options(boost::regex_constants::syntax_option_type ef, match_flag_type mf); // // function can_start: // template inline bool can_start(charT c, const unsigned char* map, unsigned char mask) { return ((c < static_cast(0)) ? true : ((c >= static_cast(1 << CHAR_BIT)) ? true : map[c] & mask)); } inline bool can_start(char c, const unsigned char* map, unsigned char mask) { return map[(unsigned char)c] & mask; } inline bool can_start(signed char c, const unsigned char* map, unsigned char mask) { return map[(unsigned char)c] & mask; } inline bool can_start(unsigned char c, const unsigned char* map, unsigned char mask) { return map[c] & mask; } inline bool can_start(unsigned short c, const unsigned char* map, unsigned char mask) { return ((c >= (1 << CHAR_BIT)) ? true : map[c] & mask); } #if !defined(__hpux) && !defined(__WINSCW__)// WCHAR_MIN not usable in pp-directives. #if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) inline bool can_start(wchar_t c, const unsigned char* map, unsigned char mask) { return ((c >= static_cast(1u << CHAR_BIT)) ? true : map[c] & mask); } #endif #endif #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) inline bool can_start(unsigned int c, const unsigned char* map, unsigned char mask) { return (((c >= static_cast(1u << CHAR_BIT)) ? true : map[c] & mask)); } #endif // // Unfortunately Rogue Waves standard library appears to have a bug // in std::basic_string::compare that results in eroneous answers // in some cases (tested with Borland C++ 5.1, Rogue Wave lib version // 0x020101) the test case was: // {39135,0} < {0xff,0} // which succeeds when it should not. // #ifndef _RWSTD_VER #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) template inline int string_compare(const std::basic_string& s, const C* p) { if(0 == *p) { if(s.empty() || ((s.size() == 1) && (s[0] == 0))) return 0; } return s.compare(p); } #endif #else #if !BOOST_WORKAROUND(BOOST_MSVC, < 1310) template inline int string_compare(const std::basic_string& s, const C* p) { if(0 == *p) { if(s.empty() || ((s.size() == 1) && (s[0] == 0))) return 0; } return s.compare(p); } #endif inline int string_compare(const std::string& s, const char* p) { return std::strcmp(s.c_str(), p); } # ifndef BOOST_NO_WREGEX inline int string_compare(const std::wstring& s, const wchar_t* p) { return std::wcscmp(s.c_str(), p); } #endif #endif template inline int string_compare(const Seq& s, const C* p) { std::size_t i = 0; while((i < s.size()) && (p[i] == s[i])) { ++i; } return (i == s.size()) ? -p[i] : s[i] - p[i]; } # define STR_COMP(s,p) string_compare(s,p) template inline const charT* re_skip_past_null(const charT* p) { while (*p != static_cast(0)) ++p; return ++p; } template iterator BOOST_REGEX_CALL re_is_set_member(iterator next, iterator last, const re_set_long* set_, const regex_data& e, bool icase) { const charT* p = reinterpret_cast(set_+1); iterator ptr; unsigned int i; //bool icase = e.m_flags & regex_constants::icase; if(next == last) return next; typedef typename traits_type::string_type traits_string_type; const ::boost::regex_traits_wrapper& traits_inst = *(e.m_ptraits); // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is never // referenced (void)traits_inst; // try and match a single character, could be a multi-character // collating element... for(i = 0; i < set_->csingles; ++i) { ptr = next; if(*p == static_cast(0)) { // treat null string as special case: if(traits_inst.translate(*ptr, icase) != *p) { while(*p == static_cast(0))++p; continue; } return set_->isnot ? next : (ptr == next) ? ++next : ptr; } else { while(*p && (ptr != last)) { if(traits_inst.translate(*ptr, icase) != *p) break; ++p; ++ptr; } if(*p == static_cast(0)) // if null we've matched return set_->isnot ? next : (ptr == next) ? ++next : ptr; p = re_skip_past_null(p); // skip null } } charT col = traits_inst.translate(*next, icase); if(set_->cranges || set_->cequivalents) { traits_string_type s1; // // try and match a range, NB only a single character can match if(set_->cranges) { if((e.m_flags & regex_constants::collate) == 0) s1.assign(1, col); else { charT a[2] = { col, charT(0), }; s1 = traits_inst.transform(a, a + 1); } for(i = 0; i < set_->cranges; ++i) { if(STR_COMP(s1, p) >= 0) { do{ ++p; }while(*p); ++p; if(STR_COMP(s1, p) <= 0) return set_->isnot ? next : ++next; } else { // skip first string do{ ++p; }while(*p); ++p; } // skip second string do{ ++p; }while(*p); ++p; } } // // try and match an equivalence class, NB only a single character can match if(set_->cequivalents) { charT a[2] = { col, charT(0), }; s1 = traits_inst.transform_primary(a, a +1); for(i = 0; i < set_->cequivalents; ++i) { if(STR_COMP(s1, p) == 0) return set_->isnot ? next : ++next; // skip string do{ ++p; }while(*p); ++p; } } } if(traits_inst.isctype(col, set_->cclasses) == true) return set_->isnot ? next : ++next; if((set_->cnclasses != 0) && (traits_inst.isctype(col, set_->cnclasses) == false)) return set_->isnot ? next : ++next; return set_->isnot ? ++next : next; } template class repeater_count { repeater_count** stack; repeater_count* next; int state_id; std::size_t count; // the number of iterations so far BidiIterator start_pos; // where the last repeat started public: repeater_count(repeater_count** s) { stack = s; next = 0; state_id = -1; count = 0; } repeater_count(int i, repeater_count** s, BidiIterator start) : start_pos(start) { state_id = i; stack = s; next = *stack; *stack = this; if(state_id > next->state_id) count = 0; else { repeater_count* p = next; while(p && (p->state_id != state_id)) p = p->next; if(p) { count = p->count; start_pos = p->start_pos; } else count = 0; } } ~repeater_count() { if(next) *stack = next; } std::size_t get_count() { return count; } int get_id() { return state_id; } std::size_t operator++() { return ++count; } bool check_null_repeat(const BidiIterator& pos, std::size_t max) { // this is called when we are about to start a new repeat, // if the last one was NULL move our count to max, // otherwise save the current position. bool result = (count == 0) ? false : (pos == start_pos); if(result) count = max; else start_pos = pos; return result; } }; struct saved_state; enum saved_state_type { saved_type_end = 0, saved_type_paren = 1, saved_type_recurse = 2, saved_type_assertion = 3, saved_state_alt = 4, saved_state_repeater_count = 5, saved_state_extra_block = 6, saved_state_greedy_single_repeat = 7, saved_state_rep_slow_dot = 8, saved_state_rep_fast_dot = 9, saved_state_rep_char = 10, saved_state_rep_short_set = 11, saved_state_rep_long_set = 12, saved_state_non_greedy_long_repeat = 13, saved_state_count = 14 }; template struct recursion_info { typedef typename Results::value_type value_type; typedef typename value_type::iterator iterator; int idx; const re_syntax_base* preturn_address; Results results; repeater_count* repeater_stack; }; #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable : 4251 4231) # if BOOST_MSVC < 1600 # pragma warning(disable : 4660) # endif #endif template class perl_matcher { public: typedef typename traits::char_type char_type; typedef perl_matcher self_type; typedef bool (self_type::*matcher_proc_type)(void); typedef std::size_t traits_size_type; typedef typename is_byte::width_type width_type; typedef typename regex_iterator_traits::difference_type difference_type; typedef match_results results_type; perl_matcher(BidiIterator first, BidiIterator end, match_results& what, const basic_regex& e, match_flag_type f, BidiIterator l_base) : m_result(what), base(first), last(end), position(first), backstop(l_base), re(e), traits_inst(e.get_traits()), m_independent(false), next_count(&rep_obj), rep_obj(&next_count) { construct_init(e, f); } bool match(); bool find(); void setf(match_flag_type f) { m_match_flags |= f; } void unsetf(match_flag_type f) { m_match_flags &= ~f; } private: void construct_init(const basic_regex& e, match_flag_type f); bool find_imp(); bool match_imp(); #ifdef BOOST_REGEX_HAS_MS_STACK_GUARD typedef bool (perl_matcher::*protected_proc_type)(); bool protected_call(protected_proc_type); #endif void estimate_max_state_count(std::random_access_iterator_tag*); void estimate_max_state_count(void*); bool match_prefix(); bool match_all_states(); // match procs, stored in s_match_vtable: bool match_startmark(); bool match_endmark(); bool match_literal(); bool match_start_line(); bool match_end_line(); bool match_wild(); bool match_match(); bool match_word_boundary(); bool match_within_word(); bool match_word_start(); bool match_word_end(); bool match_buffer_start(); bool match_buffer_end(); bool match_backref(); bool match_long_set(); bool match_set(); bool match_jump(); bool match_alt(); bool match_rep(); bool match_combining(); bool match_soft_buffer_end(); bool match_restart_continue(); bool match_long_set_repeat(); bool match_set_repeat(); bool match_char_repeat(); bool match_dot_repeat_fast(); bool match_dot_repeat_slow(); bool match_dot_repeat_dispatch() { return ::boost::is_random_access_iterator::value ? match_dot_repeat_fast() : match_dot_repeat_slow(); } bool match_backstep(); bool match_assert_backref(); bool match_toggle_case(); #ifdef BOOST_REGEX_RECURSIVE bool backtrack_till_match(std::size_t count); #endif bool match_recursion(); // find procs stored in s_find_vtable: bool find_restart_any(); bool find_restart_word(); bool find_restart_line(); bool find_restart_buf(); bool find_restart_lit(); private: // final result structure to be filled in: match_results& m_result; // temporary result for POSIX matches: scoped_ptr > m_temp_match; // pointer to actual result structure to fill in: match_results* m_presult; // start of sequence being searched: BidiIterator base; // end of sequence being searched: BidiIterator last; // current character being examined: BidiIterator position; // where to restart next search after failed match attempt: BidiIterator restart; // where the current search started from, acts as base for $` during grep: BidiIterator search_base; // how far we can go back when matching lookbehind: BidiIterator backstop; // the expression being examined: const basic_regex& re; // the expression's traits class: const ::boost::regex_traits_wrapper& traits_inst; // the next state in the machine being matched: const re_syntax_base* pstate; // matching flags in use: match_flag_type m_match_flags; // how many states we have examined so far: std::ptrdiff_t state_count; // max number of states to examine before giving up: std::ptrdiff_t max_state_count; // whether we should ignore case or not: bool icase; // set to true when (position == last), indicates that we may have a partial match: bool m_has_partial_match; // set to true whenever we get a match: bool m_has_found_match; // set to true whenever we're inside an independent sub-expression: bool m_independent; // the current repeat being examined: repeater_count* next_count; // the first repeat being examined (top of linked list): repeater_count rep_obj; // the mask to pass when matching word boundaries: typename traits::char_class_type m_word_mask; // the bitmask to use when determining whether a match_any matches a newline or not: unsigned char match_any_mask; // recursion information: std::vector > recursion_stack; #ifdef BOOST_REGEX_NON_RECURSIVE // // additional members for non-recursive version: // typedef bool (self_type::*unwind_proc_type)(bool); void extend_stack(); bool unwind(bool); bool unwind_end(bool); bool unwind_paren(bool); bool unwind_recursion_stopper(bool); bool unwind_assertion(bool); bool unwind_alt(bool); bool unwind_repeater_counter(bool); bool unwind_extra_block(bool); bool unwind_greedy_single_repeat(bool); bool unwind_slow_dot_repeat(bool); bool unwind_fast_dot_repeat(bool); bool unwind_char_repeat(bool); bool unwind_short_set_repeat(bool); bool unwind_long_set_repeat(bool); bool unwind_non_greedy_repeat(bool); bool unwind_recursion(bool); bool unwind_recursion_pop(bool); void destroy_single_repeat(); void push_matched_paren(int index, const sub_match& sub); void push_recursion_stopper(); void push_assertion(const re_syntax_base* ps, bool positive); void push_alt(const re_syntax_base* ps); void push_repeater_count(int i, repeater_count** s); void push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id); void push_non_greedy_repeat(const re_syntax_base* ps); void push_recursion(int idx, const re_syntax_base* p, results_type* presults); void push_recursion_pop(); // pointer to base of stack: saved_state* m_stack_base; // pointer to current stack position: saved_state* m_backup_state; // determines what value to return when unwinding from recursion, // allows for mixed recursive/non-recursive algorithm: bool m_recursive_result; // how many memory blocks have we used up?: unsigned used_block_count; #endif // these operations aren't allowed, so are declared private, // bodies are provided to keep explicit-instantiation requests happy: perl_matcher& operator=(const perl_matcher&) { return *this; } perl_matcher(const perl_matcher& that) : m_result(that.m_result), re(that.re), traits_inst(that.traits_inst), rep_obj(0) {} }; #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace re_detail #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #ifdef BOOST_MSVC # pragma warning(pop) #endif // // include the implementation of perl_matcher: // #ifdef BOOST_REGEX_RECURSIVE #include #else #include #endif // this one has to be last: #include #endif passenger-4.0.37/ext/boost/regex/v4/perl_matcher_common.hpp000644 000765 000024 00000071212 12233035540 024336 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE perl_matcher_common.cpp * VERSION see * DESCRIPTION: Definitions of perl_matcher member functions that are * common to both the recursive and non-recursive versions. */ #ifndef BOOST_REGEX_V4_PERL_MATCHER_COMMON_HPP #define BOOST_REGEX_V4_PERL_MATCHER_COMMON_HPP #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef __BORLANDC__ # pragma option push -w-8008 -w-8066 #endif #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4800) #endif namespace boost{ namespace re_detail{ template void perl_matcher::construct_init(const basic_regex& e, match_flag_type f) { typedef typename regex_iterator_traits::iterator_category category; typedef typename basic_regex::flag_type expression_flag_type; if(e.empty()) { // precondition failure: e is not a valid regex. std::invalid_argument ex("Invalid regular expression object"); boost::throw_exception(ex); } pstate = 0; m_match_flags = f; estimate_max_state_count(static_cast(0)); expression_flag_type re_f = re.flags(); icase = re_f & regex_constants::icase; if(!(m_match_flags & (match_perl|match_posix))) { if((re_f & (regbase::main_option_type|regbase::no_perl_ex)) == 0) m_match_flags |= match_perl; else if((re_f & (regbase::main_option_type|regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex)) m_match_flags |= match_perl; else if((re_f & (regbase::main_option_type|regbase::literal)) == (regbase::literal)) m_match_flags |= match_perl; else m_match_flags |= match_posix; } if(m_match_flags & match_posix) { m_temp_match.reset(new match_results()); m_presult = m_temp_match.get(); } else m_presult = &m_result; #ifdef BOOST_REGEX_NON_RECURSIVE m_stack_base = 0; m_backup_state = 0; #endif // find the value to use for matching word boundaries: m_word_mask = re.get_data().m_word_mask; // find bitmask to use for matching '.': match_any_mask = static_cast((f & match_not_dot_newline) ? re_detail::test_not_newline : re_detail::test_newline); } template void perl_matcher::estimate_max_state_count(std::random_access_iterator_tag*) { // // How many states should we allow our machine to visit before giving up? // This is a heuristic: it takes the greater of O(N^2) and O(NS^2) // where N is the length of the string, and S is the number of states // in the machine. It's tempting to up this to O(N^2S) or even O(N^2S^2) // but these take unreasonably amounts of time to bale out in pathological // cases. // // Calculate NS^2 first: // static const std::ptrdiff_t k = 100000; std::ptrdiff_t dist = boost::re_detail::distance(base, last); if(dist == 0) dist = 1; std::ptrdiff_t states = re.size(); if(states == 0) states = 1; states *= states; if((std::numeric_limits::max)() / dist < states) { max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits::max)() - 2); return; } states *= dist; if((std::numeric_limits::max)() - k < states) { max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits::max)() - 2); return; } states += k; max_state_count = states; // // Now calculate N^2: // states = dist; if((std::numeric_limits::max)() / dist < states) { max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits::max)() - 2); return; } states *= dist; if((std::numeric_limits::max)() - k < states) { max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits::max)() - 2); return; } states += k; // // N^2 can be a very large number indeed, to prevent things getting out // of control, cap the max states: // if(states > BOOST_REGEX_MAX_STATE_COUNT) states = BOOST_REGEX_MAX_STATE_COUNT; // // If (the possibly capped) N^2 is larger than our first estimate, // use this instead: // if(states > max_state_count) max_state_count = states; } template inline void perl_matcher::estimate_max_state_count(void*) { // we don't know how long the sequence is: max_state_count = BOOST_REGEX_MAX_STATE_COUNT; } #ifdef BOOST_REGEX_HAS_MS_STACK_GUARD template inline bool perl_matcher::protected_call( protected_proc_type proc) { ::boost::re_detail::concrete_protected_call > obj(this, proc); return obj.execute(); } #endif template inline bool perl_matcher::match() { #ifdef BOOST_REGEX_HAS_MS_STACK_GUARD return protected_call(&perl_matcher::match_imp); #else return match_imp(); #endif } template bool perl_matcher::match_imp() { // initialise our stack if we are non-recursive: #ifdef BOOST_REGEX_NON_RECURSIVE save_state_init init(&m_stack_base, &m_backup_state); used_block_count = BOOST_REGEX_MAX_BLOCKS; #if !defined(BOOST_NO_EXCEPTIONS) try{ #endif #endif // reset our state machine: position = base; search_base = base; state_count = 0; m_match_flags |= regex_constants::match_all; m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), search_base, last); m_presult->set_base(base); m_presult->set_named_subs(this->re.get_named_subs()); if(m_match_flags & match_posix) m_result = *m_presult; verify_options(re.flags(), m_match_flags); if(0 == match_prefix()) return false; return (m_result[0].second == last) && (m_result[0].first == base); #if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_NO_EXCEPTIONS) } catch(...) { // unwind all pushed states, apart from anything else this // ensures that all the states are correctly destructed // not just the memory freed. while(unwind(true)){} throw; } #endif } template inline bool perl_matcher::find() { #ifdef BOOST_REGEX_HAS_MS_STACK_GUARD return protected_call(&perl_matcher::find_imp); #else return find_imp(); #endif } template bool perl_matcher::find_imp() { static matcher_proc_type const s_find_vtable[7] = { &perl_matcher::find_restart_any, &perl_matcher::find_restart_word, &perl_matcher::find_restart_line, &perl_matcher::find_restart_buf, &perl_matcher::match_prefix, &perl_matcher::find_restart_lit, &perl_matcher::find_restart_lit, }; // initialise our stack if we are non-recursive: #ifdef BOOST_REGEX_NON_RECURSIVE save_state_init init(&m_stack_base, &m_backup_state); used_block_count = BOOST_REGEX_MAX_BLOCKS; #if !defined(BOOST_NO_EXCEPTIONS) try{ #endif #endif state_count = 0; if((m_match_flags & regex_constants::match_init) == 0) { // reset our state machine: search_base = position = base; pstate = re.get_first_state(); m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), base, last); m_presult->set_base(base); m_presult->set_named_subs(this->re.get_named_subs()); m_match_flags |= regex_constants::match_init; } else { // start again: search_base = position = m_result[0].second; // If last match was null and match_not_null was not set then increment // our start position, otherwise we go into an infinite loop: if(((m_match_flags & match_not_null) == 0) && (m_result.length() == 0)) { if(position == last) return false; else ++position; } // reset $` start: m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), search_base, last); //if((base != search_base) && (base == backstop)) // m_match_flags |= match_prev_avail; } if(m_match_flags & match_posix) { m_result.set_size(re.mark_count(), base, last); m_result.set_base(base); } verify_options(re.flags(), m_match_flags); // find out what kind of expression we have: unsigned type = (m_match_flags & match_continuous) ? static_cast(regbase::restart_continue) : static_cast(re.get_restart_type()); // call the appropriate search routine: matcher_proc_type proc = s_find_vtable[type]; return (this->*proc)(); #if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_NO_EXCEPTIONS) } catch(...) { // unwind all pushed states, apart from anything else this // ensures that all the states are correctly destructed // not just the memory freed. while(unwind(true)){} throw; } #endif } template bool perl_matcher::match_prefix() { m_has_partial_match = false; m_has_found_match = false; pstate = re.get_first_state(); m_presult->set_first(position); restart = position; match_all_states(); if(!m_has_found_match && m_has_partial_match && (m_match_flags & match_partial)) { m_has_found_match = true; m_presult->set_second(last, 0, false); position = last; if((m_match_flags & match_posix) == match_posix) { m_result.maybe_assign(*m_presult); } } #ifdef BOOST_REGEX_MATCH_EXTRA if(m_has_found_match && (match_extra & m_match_flags)) { // // we have a match, reverse the capture information: // for(unsigned i = 0; i < m_presult->size(); ++i) { typename sub_match::capture_sequence_type & seq = ((*m_presult)[i]).get_captures(); std::reverse(seq.begin(), seq.end()); } } #endif if(!m_has_found_match) position = restart; // reset search postion return m_has_found_match; } template bool perl_matcher::match_literal() { unsigned int len = static_cast(pstate)->length; const char_type* what = reinterpret_cast(static_cast(pstate) + 1); // // compare string with what we stored in // our records: for(unsigned int i = 0; i < len; ++i, ++position) { if((position == last) || (traits_inst.translate(*position, icase) != what[i])) return false; } pstate = pstate->next.p; return true; } template bool perl_matcher::match_start_line() { if(position == backstop) { if((m_match_flags & match_prev_avail) == 0) { if((m_match_flags & match_not_bol) == 0) { pstate = pstate->next.p; return true; } return false; } } else if(m_match_flags & match_single_line) return false; // check the previous value character: BidiIterator t(position); --t; if(position != last) { if(is_separator(*t) && !((*t == static_cast('\r')) && (*position == static_cast('\n'))) ) { pstate = pstate->next.p; return true; } } else if(is_separator(*t)) { pstate = pstate->next.p; return true; } return false; } template bool perl_matcher::match_end_line() { if(position != last) { if(m_match_flags & match_single_line) return false; // we're not yet at the end so *first is always valid: if(is_separator(*position)) { if((position != backstop) || (m_match_flags & match_prev_avail)) { // check that we're not in the middle of \r\n sequence BidiIterator t(position); --t; if((*t == static_cast('\r')) && (*position == static_cast('\n'))) { return false; } } pstate = pstate->next.p; return true; } } else if((m_match_flags & match_not_eol) == 0) { pstate = pstate->next.p; return true; } return false; } template bool perl_matcher::match_wild() { if(position == last) return false; if(is_separator(*position) && ((match_any_mask & static_cast(pstate)->mask) == 0)) return false; if((*position == char_type(0)) && (m_match_flags & match_not_dot_null)) return false; pstate = pstate->next.p; ++position; return true; } template bool perl_matcher::match_word_boundary() { bool b; // indcates whether next character is a word character if(position != last) { // prev and this character must be opposites: #if defined(BOOST_REGEX_USE_C_LOCALE) && defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 95) b = traits::isctype(*position, m_word_mask); #else b = traits_inst.isctype(*position, m_word_mask); #endif } else { b = (m_match_flags & match_not_eow) ? true : false; } if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) { if(m_match_flags & match_not_bow) b ^= true; else b ^= false; } else { --position; b ^= traits_inst.isctype(*position, m_word_mask); ++position; } if(b) { pstate = pstate->next.p; return true; } return false; // no match if we get to here... } template bool perl_matcher::match_within_word() { if(position == last) return false; // both prev and this character must be m_word_mask: bool prev = traits_inst.isctype(*position, m_word_mask); { bool b; if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) return false; else { --position; b = traits_inst.isctype(*position, m_word_mask); ++position; } if(b == prev) { pstate = pstate->next.p; return true; } } return false; } template bool perl_matcher::match_word_start() { if(position == last) return false; // can't be starting a word if we're already at the end of input if(!traits_inst.isctype(*position, m_word_mask)) return false; // next character isn't a word character if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) { if(m_match_flags & match_not_bow) return false; // no previous input } else { // otherwise inside buffer: BidiIterator t(position); --t; if(traits_inst.isctype(*t, m_word_mask)) return false; // previous character not non-word } // OK we have a match: pstate = pstate->next.p; return true; } template bool perl_matcher::match_word_end() { if((position == backstop) && ((m_match_flags & match_prev_avail) == 0)) return false; // start of buffer can't be end of word BidiIterator t(position); --t; if(traits_inst.isctype(*t, m_word_mask) == false) return false; // previous character wasn't a word character if(position == last) { if(m_match_flags & match_not_eow) return false; // end of buffer but not end of word } else { // otherwise inside buffer: if(traits_inst.isctype(*position, m_word_mask)) return false; // next character is a word character } pstate = pstate->next.p; return true; // if we fall through to here then we've succeeded } template bool perl_matcher::match_buffer_start() { if((position != backstop) || (m_match_flags & match_not_bob)) return false; // OK match: pstate = pstate->next.p; return true; } template bool perl_matcher::match_buffer_end() { if((position != last) || (m_match_flags & match_not_eob)) return false; // OK match: pstate = pstate->next.p; return true; } template bool perl_matcher::match_backref() { // // Compare with what we previously matched. // Note that this succeeds if the backref did not partisipate // in the match, this is in line with ECMAScript, but not Perl // or PCRE. // int index = static_cast(pstate)->index; if(index >= 10000) { named_subexpressions::range_type r = re.get_data().equal_range(index); BOOST_ASSERT(r.first != r.second); do { index = r.first->index; ++r.first; }while((r.first != r.second) && ((*m_presult)[index].matched != true)); } if((m_match_flags & match_perl) && !(*m_presult)[index].matched) return false; BidiIterator i = (*m_presult)[index].first; BidiIterator j = (*m_presult)[index].second; while(i != j) { if((position == last) || (traits_inst.translate(*position, icase) != traits_inst.translate(*i, icase))) return false; ++i; ++position; } pstate = pstate->next.p; return true; } template bool perl_matcher::match_long_set() { typedef typename traits::char_class_type char_class_type; // let the traits class do the work: if(position == last) return false; BidiIterator t = re_is_set_member(position, last, static_cast*>(pstate), re.get_data(), icase); if(t != position) { pstate = pstate->next.p; position = t; return true; } return false; } template bool perl_matcher::match_set() { if(position == last) return false; if(static_cast(pstate)->_map[static_cast(traits_inst.translate(*position, icase))]) { pstate = pstate->next.p; ++position; return true; } return false; } template bool perl_matcher::match_jump() { pstate = static_cast(pstate)->alt.p; return true; } template bool perl_matcher::match_combining() { if(position == last) return false; if(is_combining(traits_inst.translate(*position, icase))) return false; ++position; while((position != last) && is_combining(traits_inst.translate(*position, icase))) ++position; pstate = pstate->next.p; return true; } template bool perl_matcher::match_soft_buffer_end() { if(m_match_flags & match_not_eob) return false; BidiIterator p(position); while((p != last) && is_separator(traits_inst.translate(*p, icase)))++p; if(p != last) return false; pstate = pstate->next.p; return true; } template bool perl_matcher::match_restart_continue() { if(position == search_base) { pstate = pstate->next.p; return true; } return false; } template bool perl_matcher::match_backstep() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif if( ::boost::is_random_access_iterator::value) { std::ptrdiff_t maxlen = ::boost::re_detail::distance(backstop, position); if(maxlen < static_cast(pstate)->index) return false; std::advance(position, -static_cast(pstate)->index); } else { int c = static_cast(pstate)->index; while(c--) { if(position == backstop) return false; --position; } } pstate = pstate->next.p; return true; #ifdef BOOST_MSVC #pragma warning(pop) #endif } template inline bool perl_matcher::match_assert_backref() { // return true if marked sub-expression N has been matched: int index = static_cast(pstate)->index; bool result = false; if(index == 9999) { // Magic value for a (DEFINE) block: return false; } else if(index > 0) { // Have we matched subexpression "index"? // Check if index is a hash value: if(index >= 10000) { named_subexpressions::range_type r = re.get_data().equal_range(index); while(r.first != r.second) { if((*m_presult)[r.first->index].matched) { result = true; break; } ++r.first; } } else { result = (*m_presult)[index].matched; } pstate = pstate->next.p; } else { // Have we recursed into subexpression "index"? // If index == 0 then check for any recursion at all, otherwise for recursion to -index-1. int idx = -index-1; if(idx >= 10000) { named_subexpressions::range_type r = re.get_data().equal_range(idx); int stack_index = recursion_stack.empty() ? -1 : recursion_stack.back().idx; while(r.first != r.second) { result |= (stack_index == r.first->index); if(result)break; ++r.first; } } else { result = !recursion_stack.empty() && ((recursion_stack.back().idx == idx) || (index == 0)); } pstate = pstate->next.p; } return result; } template bool perl_matcher::match_toggle_case() { // change our case sensitivity: this->icase = static_cast(pstate)->icase; pstate = pstate->next.p; return true; } template bool perl_matcher::find_restart_any() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif const unsigned char* _map = re.get_map(); while(true) { // skip everything we can't match: while((position != last) && !can_start(*position, _map, (unsigned char)mask_any) ) ++position; if(position == last) { // run out of characters, try a null match if possible: if(re.can_be_null()) return match_prefix(); break; } // now try and obtain a match: if(match_prefix()) return true; if(position == last) return false; ++position; } return false; #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::find_restart_word() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif // do search optimised for word starts: const unsigned char* _map = re.get_map(); if((m_match_flags & match_prev_avail) || (position != base)) --position; else if(match_prefix()) return true; do { while((position != last) && traits_inst.isctype(*position, m_word_mask)) ++position; while((position != last) && !traits_inst.isctype(*position, m_word_mask)) ++position; if(position == last) break; if(can_start(*position, _map, (unsigned char)mask_any) ) { if(match_prefix()) return true; } if(position == last) break; } while(true); return false; #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::find_restart_line() { // do search optimised for line starts: const unsigned char* _map = re.get_map(); if(match_prefix()) return true; while(position != last) { while((position != last) && !is_separator(*position)) ++position; if(position == last) return false; ++position; if(position == last) { if(re.can_be_null() && match_prefix()) return true; return false; } if( can_start(*position, _map, (unsigned char)mask_any) ) { if(match_prefix()) return true; } if(position == last) return false; //++position; } return false; } template bool perl_matcher::find_restart_buf() { if((position == base) && ((m_match_flags & match_not_bob) == 0)) return match_prefix(); return false; } template bool perl_matcher::find_restart_lit() { #if 0 if(position == last) return false; // can't possibly match if we're at the end already unsigned type = (m_match_flags & match_continuous) ? static_cast(regbase::restart_continue) : static_cast(re.get_restart_type()); const kmp_info* info = access::get_kmp(re); int len = info->len; const char_type* x = info->pstr; int j = 0; while (position != last) { while((j > -1) && (x[j] != traits_inst.translate(*position, icase))) j = info->kmp_next[j]; ++position; ++j; if(j >= len) { if(type == regbase::restart_fixed_lit) { std::advance(position, -j); restart = position; std::advance(restart, len); m_result.set_first(position); m_result.set_second(restart); position = restart; return true; } else { restart = position; std::advance(position, -j); if(match_prefix()) return true; else { for(int k = 0; (restart != position) && (k < j); ++k, --restart) {} // dwa 10/20/2000 - warning suppression for MWCW if(restart != last) ++restart; position = restart; j = 0; //we could do better than this... } } } } if((m_match_flags & match_partial) && (position == last) && j) { // we need to check for a partial match: restart = position; std::advance(position, -j); return match_prefix(); } #endif return false; } } // namespace re_detail } // namespace boost #ifdef BOOST_MSVC # pragma warning(pop) #endif #ifdef __BORLANDC__ # pragma option pop #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/perl_matcher_non_recursive.hpp000644 000765 000024 00000146674 12233035540 025746 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE perl_matcher_common.cpp * VERSION see * DESCRIPTION: Definitions of perl_matcher member functions that are * specific to the non-recursive implementation. */ #ifndef BOOST_REGEX_V4_PERL_MATCHER_NON_RECURSIVE_HPP #define BOOST_REGEX_V4_PERL_MATCHER_NON_RECURSIVE_HPP #include #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4800) #endif namespace boost{ namespace re_detail{ template inline void inplace_destroy(T* p) { (void)p; // warning suppression p->~T(); } struct saved_state { union{ unsigned int state_id; // this padding ensures correct alignment on 64-bit platforms: std::size_t padding1; std::ptrdiff_t padding2; void* padding3; }; saved_state(unsigned i) : state_id(i) {} }; template struct saved_matched_paren : public saved_state { int index; sub_match sub; saved_matched_paren(int i, const sub_match& s) : saved_state(1), index(i), sub(s){}; }; template struct saved_position : public saved_state { const re_syntax_base* pstate; BidiIterator position; saved_position(const re_syntax_base* ps, BidiIterator pos, int i) : saved_state(i), pstate(ps), position(pos){}; }; template struct saved_assertion : public saved_position { bool positive; saved_assertion(bool p, const re_syntax_base* ps, BidiIterator pos) : saved_position(ps, pos, saved_type_assertion), positive(p){}; }; template struct saved_repeater : public saved_state { repeater_count count; saved_repeater(int i, repeater_count** s, BidiIterator start) : saved_state(saved_state_repeater_count), count(i,s,start){} }; struct saved_extra_block : public saved_state { saved_state *base, *end; saved_extra_block(saved_state* b, saved_state* e) : saved_state(saved_state_extra_block), base(b), end(e) {} }; struct save_state_init { saved_state** stack; save_state_init(saved_state** base, saved_state** end) : stack(base) { *base = static_cast(get_mem_block()); *end = reinterpret_cast(reinterpret_cast(*base)+BOOST_REGEX_BLOCKSIZE); --(*end); (void) new (*end)saved_state(0); BOOST_ASSERT(*end > *base); } ~save_state_init() { put_mem_block(*stack); *stack = 0; } }; template struct saved_single_repeat : public saved_state { std::size_t count; const re_repeat* rep; BidiIterator last_position; saved_single_repeat(std::size_t c, const re_repeat* r, BidiIterator lp, int arg_id) : saved_state(arg_id), count(c), rep(r), last_position(lp){} }; template struct saved_recursion : public saved_state { saved_recursion(int idx, const re_syntax_base* p, Results* pr) : saved_state(14), recursion_id(idx), preturn_address(p), results(*pr) {} int recursion_id; const re_syntax_base* preturn_address; Results results; }; template bool perl_matcher::match_all_states() { static matcher_proc_type const s_match_vtable[30] = { (&perl_matcher::match_startmark), &perl_matcher::match_endmark, &perl_matcher::match_literal, &perl_matcher::match_start_line, &perl_matcher::match_end_line, &perl_matcher::match_wild, &perl_matcher::match_match, &perl_matcher::match_word_boundary, &perl_matcher::match_within_word, &perl_matcher::match_word_start, &perl_matcher::match_word_end, &perl_matcher::match_buffer_start, &perl_matcher::match_buffer_end, &perl_matcher::match_backref, &perl_matcher::match_long_set, &perl_matcher::match_set, &perl_matcher::match_jump, &perl_matcher::match_alt, &perl_matcher::match_rep, &perl_matcher::match_combining, &perl_matcher::match_soft_buffer_end, &perl_matcher::match_restart_continue, // Although this next line *should* be evaluated at compile time, in practice // some compilers (VC++) emit run-time initialisation which breaks thread // safety, so use a dispatch function instead: //(::boost::is_random_access_iterator::value ? &perl_matcher::match_dot_repeat_fast : &perl_matcher::match_dot_repeat_slow), &perl_matcher::match_dot_repeat_dispatch, &perl_matcher::match_char_repeat, &perl_matcher::match_set_repeat, &perl_matcher::match_long_set_repeat, &perl_matcher::match_backstep, &perl_matcher::match_assert_backref, &perl_matcher::match_toggle_case, &perl_matcher::match_recursion, }; push_recursion_stopper(); do{ while(pstate) { matcher_proc_type proc = s_match_vtable[pstate->type]; ++state_count; if(!(this->*proc)()) { if(state_count > max_state_count) raise_error(traits_inst, regex_constants::error_complexity); if((m_match_flags & match_partial) && (position == last) && (position != search_base)) m_has_partial_match = true; bool successful_unwind = unwind(false); if((m_match_flags & match_partial) && (position == last) && (position != search_base)) m_has_partial_match = true; if(false == successful_unwind) return m_recursive_result; } } }while(unwind(true)); return m_recursive_result; } template void perl_matcher::extend_stack() { if(used_block_count) { --used_block_count; saved_state* stack_base; saved_state* backup_state; stack_base = static_cast(get_mem_block()); backup_state = reinterpret_cast(reinterpret_cast(stack_base)+BOOST_REGEX_BLOCKSIZE); saved_extra_block* block = static_cast(backup_state); --block; (void) new (block) saved_extra_block(m_stack_base, m_backup_state); m_stack_base = stack_base; m_backup_state = block; } else raise_error(traits_inst, regex_constants::error_stack); } template inline void perl_matcher::push_matched_paren(int index, const sub_match& sub) { //BOOST_ASSERT(index); saved_matched_paren* pmp = static_cast*>(m_backup_state); --pmp; if(pmp < m_stack_base) { extend_stack(); pmp = static_cast*>(m_backup_state); --pmp; } (void) new (pmp)saved_matched_paren(index, sub); m_backup_state = pmp; } template inline void perl_matcher::push_recursion_stopper() { saved_state* pmp = m_backup_state; --pmp; if(pmp < m_stack_base) { extend_stack(); pmp = m_backup_state; --pmp; } (void) new (pmp)saved_state(saved_type_recurse); m_backup_state = pmp; } template inline void perl_matcher::push_assertion(const re_syntax_base* ps, bool positive) { saved_assertion* pmp = static_cast*>(m_backup_state); --pmp; if(pmp < m_stack_base) { extend_stack(); pmp = static_cast*>(m_backup_state); --pmp; } (void) new (pmp)saved_assertion(positive, ps, position); m_backup_state = pmp; } template inline void perl_matcher::push_alt(const re_syntax_base* ps) { saved_position* pmp = static_cast*>(m_backup_state); --pmp; if(pmp < m_stack_base) { extend_stack(); pmp = static_cast*>(m_backup_state); --pmp; } (void) new (pmp)saved_position(ps, position, saved_state_alt); m_backup_state = pmp; } template inline void perl_matcher::push_non_greedy_repeat(const re_syntax_base* ps) { saved_position* pmp = static_cast*>(m_backup_state); --pmp; if(pmp < m_stack_base) { extend_stack(); pmp = static_cast*>(m_backup_state); --pmp; } (void) new (pmp)saved_position(ps, position, saved_state_non_greedy_long_repeat); m_backup_state = pmp; } template inline void perl_matcher::push_repeater_count(int i, repeater_count** s) { saved_repeater* pmp = static_cast*>(m_backup_state); --pmp; if(pmp < m_stack_base) { extend_stack(); pmp = static_cast*>(m_backup_state); --pmp; } (void) new (pmp)saved_repeater(i, s, position); m_backup_state = pmp; } template inline void perl_matcher::push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id) { saved_single_repeat* pmp = static_cast*>(m_backup_state); --pmp; if(pmp < m_stack_base) { extend_stack(); pmp = static_cast*>(m_backup_state); --pmp; } (void) new (pmp)saved_single_repeat(c, r, last_position, state_id); m_backup_state = pmp; } template inline void perl_matcher::push_recursion(int idx, const re_syntax_base* p, results_type* presults) { saved_recursion* pmp = static_cast*>(m_backup_state); --pmp; if(pmp < m_stack_base) { extend_stack(); pmp = static_cast*>(m_backup_state); --pmp; } (void) new (pmp)saved_recursion(idx, p, presults); m_backup_state = pmp; } template bool perl_matcher::match_startmark() { int index = static_cast(pstate)->index; icase = static_cast(pstate)->icase; switch(index) { case 0: pstate = pstate->next.p; break; case -1: case -2: { // forward lookahead assert: const re_syntax_base* next_pstate = static_cast(pstate->next.p)->alt.p->next.p; pstate = pstate->next.p->next.p; push_assertion(next_pstate, index == -1); break; } case -3: { // independent sub-expression, currently this is always recursive: bool old_independent = m_independent; m_independent = true; const re_syntax_base* next_pstate = static_cast(pstate->next.p)->alt.p->next.p; pstate = pstate->next.p->next.p; bool r = match_all_states(); pstate = next_pstate; m_independent = old_independent; #ifdef BOOST_REGEX_MATCH_EXTRA if(r && (m_match_flags & match_extra)) { // // our captures have been stored in *m_presult // we need to unpack them, and insert them // back in the right order when we unwind the stack: // match_results temp_match(*m_presult); unsigned i; for(i = 0; i < temp_match.size(); ++i) (*m_presult)[i].get_captures().clear(); // match everything else: r = match_all_states(); // now place the stored captures back: for(i = 0; i < temp_match.size(); ++i) { typedef typename sub_match::capture_sequence_type seq; seq& s1 = (*m_presult)[i].get_captures(); const seq& s2 = temp_match[i].captures(); s1.insert( s1.end(), s2.begin(), s2.end()); } } #endif return r; } case -4: { // conditional expression: const re_alt* alt = static_cast(pstate->next.p); BOOST_ASSERT(alt->type == syntax_element_alt); pstate = alt->next.p; if(pstate->type == syntax_element_assert_backref) { if(!match_assert_backref()) pstate = alt->alt.p; break; } else { // zero width assertion, have to match this recursively: BOOST_ASSERT(pstate->type == syntax_element_startmark); bool negated = static_cast(pstate)->index == -2; BidiIterator saved_position = position; const re_syntax_base* next_pstate = static_cast(pstate->next.p)->alt.p->next.p; pstate = pstate->next.p->next.p; bool r = match_all_states(); position = saved_position; if(negated) r = !r; if(r) pstate = next_pstate; else pstate = alt->alt.p; break; } } case -5: { push_matched_paren(0, (*m_presult)[0]); m_presult->set_first(position, 0, true); pstate = pstate->next.p; break; } default: { BOOST_ASSERT(index > 0); if((m_match_flags & match_nosubs) == 0) { push_matched_paren(index, (*m_presult)[index]); m_presult->set_first(position, index); } pstate = pstate->next.p; break; } } return true; } template bool perl_matcher::match_alt() { bool take_first, take_second; const re_alt* jmp = static_cast(pstate); // find out which of these two alternatives we need to take: if(position == last) { take_first = jmp->can_be_null & mask_take; take_second = jmp->can_be_null & mask_skip; } else { take_first = can_start(*position, jmp->_map, (unsigned char)mask_take); take_second = can_start(*position, jmp->_map, (unsigned char)mask_skip); } if(take_first) { // we can take the first alternative, // see if we need to push next alternative: if(take_second) { push_alt(jmp->alt.p); } pstate = pstate->next.p; return true; } if(take_second) { pstate = jmp->alt.p; return true; } return false; // neither option is possible } template bool perl_matcher::match_rep() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127 4244) #endif #ifdef __BORLANDC__ #pragma option push -w-8008 -w-8066 -w-8004 #endif const re_repeat* rep = static_cast(pstate); // find out which of these two alternatives we need to take: bool take_first, take_second; if(position == last) { take_first = rep->can_be_null & mask_take; take_second = rep->can_be_null & mask_skip; } else { take_first = can_start(*position, rep->_map, (unsigned char)mask_take); take_second = can_start(*position, rep->_map, (unsigned char)mask_skip); } if((m_backup_state->state_id != saved_state_repeater_count) || (static_cast*>(m_backup_state)->count.get_id() != rep->state_id) || (next_count->get_id() != rep->state_id)) { // we're moving to a different repeat from the last // one, so set up a counter object: push_repeater_count(rep->state_id, &next_count); } // // If we've had at least one repeat already, and the last one // matched the NULL string then set the repeat count to // maximum: // next_count->check_null_repeat(position, rep->max); if(next_count->get_count() < rep->min) { // we must take the repeat: if(take_first) { // increase the counter: ++(*next_count); pstate = rep->next.p; return true; } return false; } bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); if(greedy) { // try and take the repeat if we can: if((next_count->get_count() < rep->max) && take_first) { if(take_second) { // store position in case we fail: push_alt(rep->alt.p); } // increase the counter: ++(*next_count); pstate = rep->next.p; return true; } else if(take_second) { pstate = rep->alt.p; return true; } return false; // can't take anything, fail... } else // non-greedy { // try and skip the repeat if we can: if(take_second) { if((next_count->get_count() < rep->max) && take_first) { // store position in case we fail: push_non_greedy_repeat(rep->next.p); } pstate = rep->alt.p; return true; } if((next_count->get_count() < rep->max) && take_first) { // increase the counter: ++(*next_count); pstate = rep->next.p; return true; } } return false; #ifdef __BORLANDC__ #pragma option pop #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::match_dot_repeat_slow() { unsigned count = 0; const re_repeat* rep = static_cast(pstate); re_syntax_base* psingle = rep->next.p; // match compulsary repeats first: while(count < rep->min) { pstate = psingle; if(!match_wild()) return false; ++count; } bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); if(greedy) { // repeat for as long as we can: while(count < rep->max) { pstate = psingle; if(!match_wild()) break; ++count; } // remember where we got to if this is a leading repeat: if((rep->leading) && (count < rep->max)) restart = position; // push backtrack info if available: if(count - rep->min) push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); // jump to next state: pstate = rep->alt.p; return true; } else { // non-greedy, push state and return true if we can skip: if(count < rep->max) push_single_repeat(count, rep, position, saved_state_rep_slow_dot); pstate = rep->alt.p; return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); } } template bool perl_matcher::match_dot_repeat_fast() { if(m_match_flags & match_not_dot_null) return match_dot_repeat_slow(); if((static_cast(pstate->next.p)->mask & match_any_mask) == 0) return match_dot_repeat_slow(); const re_repeat* rep = static_cast(pstate); bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); unsigned count = static_cast((std::min)(static_cast(::boost::re_detail::distance(position, last)), static_cast(greedy ? rep->max : rep->min))); if(rep->min > count) { position = last; return false; // not enough text left to match } std::advance(position, count); if(greedy) { if((rep->leading) && (count < rep->max)) restart = position; // push backtrack info if available: if(count - rep->min) push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); // jump to next state: pstate = rep->alt.p; return true; } else { // non-greedy, push state and return true if we can skip: if(count < rep->max) push_single_repeat(count, rep, position, saved_state_rep_fast_dot); pstate = rep->alt.p; return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); } } template bool perl_matcher::match_char_repeat() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif #ifdef __BORLANDC__ #pragma option push -w-8008 -w-8066 -w-8004 #endif const re_repeat* rep = static_cast(pstate); BOOST_ASSERT(1 == static_cast(rep->next.p)->length); const char_type what = *reinterpret_cast(static_cast(rep->next.p) + 1); std::size_t count = 0; // // start by working out how much we can skip: // bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); std::size_t desired = greedy ? rep->max : rep->min; if(::boost::is_random_access_iterator::value) { BidiIterator end = position; std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); BidiIterator origin(position); while((position != end) && (traits_inst.translate(*position, icase) == what)) { ++position; } count = (unsigned)::boost::re_detail::distance(origin, position); } else { while((count < desired) && (position != last) && (traits_inst.translate(*position, icase) == what)) { ++position; ++count; } } if(count < rep->min) return false; if(greedy) { if((rep->leading) && (count < rep->max)) restart = position; // push backtrack info if available: if(count - rep->min) push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); // jump to next state: pstate = rep->alt.p; return true; } else { // non-greedy, push state and return true if we can skip: if(count < rep->max) push_single_repeat(count, rep, position, saved_state_rep_char); pstate = rep->alt.p; return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); } #ifdef __BORLANDC__ #pragma option pop #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::match_set_repeat() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif #ifdef __BORLANDC__ #pragma option push -w-8008 -w-8066 -w-8004 #endif const re_repeat* rep = static_cast(pstate); const unsigned char* map = static_cast(rep->next.p)->_map; std::size_t count = 0; // // start by working out how much we can skip: // bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); std::size_t desired = greedy ? rep->max : rep->min; if(::boost::is_random_access_iterator::value) { BidiIterator end = position; std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); BidiIterator origin(position); while((position != end) && map[static_cast(traits_inst.translate(*position, icase))]) { ++position; } count = (unsigned)::boost::re_detail::distance(origin, position); } else { while((count < desired) && (position != last) && map[static_cast(traits_inst.translate(*position, icase))]) { ++position; ++count; } } if(count < rep->min) return false; if(greedy) { if((rep->leading) && (count < rep->max)) restart = position; // push backtrack info if available: if(count - rep->min) push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); // jump to next state: pstate = rep->alt.p; return true; } else { // non-greedy, push state and return true if we can skip: if(count < rep->max) push_single_repeat(count, rep, position, saved_state_rep_short_set); pstate = rep->alt.p; return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); } #ifdef __BORLANDC__ #pragma option pop #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::match_long_set_repeat() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif #ifdef __BORLANDC__ #pragma option push -w-8008 -w-8066 -w-8004 #endif typedef typename traits::char_class_type m_type; const re_repeat* rep = static_cast(pstate); const re_set_long* set = static_cast*>(pstate->next.p); std::size_t count = 0; // // start by working out how much we can skip: // bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); std::size_t desired = greedy ? rep->max : rep->min; if(::boost::is_random_access_iterator::value) { BidiIterator end = position; std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); BidiIterator origin(position); while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase))) { ++position; } count = (unsigned)::boost::re_detail::distance(origin, position); } else { while((count < desired) && (position != last) && (position != re_is_set_member(position, last, set, re.get_data(), icase))) { ++position; ++count; } } if(count < rep->min) return false; if(greedy) { if((rep->leading) && (count < rep->max)) restart = position; // push backtrack info if available: if(count - rep->min) push_single_repeat(count, rep, position, saved_state_greedy_single_repeat); // jump to next state: pstate = rep->alt.p; return true; } else { // non-greedy, push state and return true if we can skip: if(count < rep->max) push_single_repeat(count, rep, position, saved_state_rep_long_set); pstate = rep->alt.p; return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip); } #ifdef __BORLANDC__ #pragma option pop #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::match_recursion() { BOOST_ASSERT(pstate->type == syntax_element_recurse); // // Backup call stack: // push_recursion_pop(); // // Set new call stack: // if(recursion_stack.capacity() == 0) { recursion_stack.reserve(50); } recursion_stack.push_back(recursion_info()); recursion_stack.back().preturn_address = pstate->next.p; recursion_stack.back().results = *m_presult; if(static_cast(pstate)->state_id > 0) { push_repeater_count(static_cast(pstate)->state_id, &next_count); } pstate = static_cast(pstate)->alt.p; recursion_stack.back().idx = static_cast(pstate)->index; return true; } template bool perl_matcher::match_endmark() { int index = static_cast(pstate)->index; icase = static_cast(pstate)->icase; if(index > 0) { if((m_match_flags & match_nosubs) == 0) { m_presult->set_second(position, index); } if(!recursion_stack.empty()) { if(index == recursion_stack.back().idx) { pstate = recursion_stack.back().preturn_address; *m_presult = recursion_stack.back().results; push_recursion(recursion_stack.back().idx, recursion_stack.back().preturn_address, &recursion_stack.back().results); recursion_stack.pop_back(); } } } else if((index < 0) && (index != -4)) { // matched forward lookahead: pstate = 0; return true; } pstate = pstate->next.p; return true; } template bool perl_matcher::match_match() { if(!recursion_stack.empty()) { BOOST_ASSERT(0 == recursion_stack.back().idx); pstate = recursion_stack.back().preturn_address; *m_presult = recursion_stack.back().results; push_recursion(recursion_stack.back().idx, recursion_stack.back().preturn_address, &recursion_stack.back().results); recursion_stack.pop_back(); return true; } if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first)) return false; if((m_match_flags & match_all) && (position != last)) return false; if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base)) return false; m_presult->set_second(position); pstate = 0; m_has_found_match = true; if((m_match_flags & match_posix) == match_posix) { m_result.maybe_assign(*m_presult); if((m_match_flags & match_any) == 0) return false; } #ifdef BOOST_REGEX_MATCH_EXTRA if(match_extra & m_match_flags) { for(unsigned i = 0; i < m_presult->size(); ++i) if((*m_presult)[i].matched) ((*m_presult)[i]).get_captures().push_back((*m_presult)[i]); } #endif return true; } /**************************************************************************** Unwind and associated proceedures follow, these perform what normal stack unwinding does in the recursive implementation. ****************************************************************************/ template bool perl_matcher::unwind(bool have_match) { static unwind_proc_type const s_unwind_table[18] = { &perl_matcher::unwind_end, &perl_matcher::unwind_paren, &perl_matcher::unwind_recursion_stopper, &perl_matcher::unwind_assertion, &perl_matcher::unwind_alt, &perl_matcher::unwind_repeater_counter, &perl_matcher::unwind_extra_block, &perl_matcher::unwind_greedy_single_repeat, &perl_matcher::unwind_slow_dot_repeat, &perl_matcher::unwind_fast_dot_repeat, &perl_matcher::unwind_char_repeat, &perl_matcher::unwind_short_set_repeat, &perl_matcher::unwind_long_set_repeat, &perl_matcher::unwind_non_greedy_repeat, &perl_matcher::unwind_recursion, &perl_matcher::unwind_recursion_pop, }; m_recursive_result = have_match; unwind_proc_type unwinder; bool cont; // // keep unwinding our stack until we have something to do: // do { unwinder = s_unwind_table[m_backup_state->state_id]; cont = (this->*unwinder)(m_recursive_result); }while(cont); // // return true if we have more states to try: // return pstate ? true : false; } template bool perl_matcher::unwind_end(bool) { pstate = 0; // nothing left to search return false; // end of stack nothing more to search } template bool perl_matcher::unwind_paren(bool have_match) { saved_matched_paren* pmp = static_cast*>(m_backup_state); // restore previous values if no match was found: if(have_match == false) { m_presult->set_first(pmp->sub.first, pmp->index, pmp->index == 0); m_presult->set_second(pmp->sub.second, pmp->index, pmp->sub.matched, pmp->index == 0); } #ifdef BOOST_REGEX_MATCH_EXTRA // // we have a match, push the capture information onto the stack: // else if(pmp->sub.matched && (match_extra & m_match_flags)) ((*m_presult)[pmp->index]).get_captures().push_back(pmp->sub); #endif // unwind stack: m_backup_state = pmp+1; boost::re_detail::inplace_destroy(pmp); return true; // keep looking } template bool perl_matcher::unwind_recursion_stopper(bool) { boost::re_detail::inplace_destroy(m_backup_state++); pstate = 0; // nothing left to search return false; // end of stack nothing more to search } template bool perl_matcher::unwind_assertion(bool r) { saved_assertion* pmp = static_cast*>(m_backup_state); pstate = pmp->pstate; position = pmp->position; bool result = (r == pmp->positive); m_recursive_result = pmp->positive ? r : !r; boost::re_detail::inplace_destroy(pmp++); m_backup_state = pmp; return !result; // return false if the assertion was matched to stop search. } template bool perl_matcher::unwind_alt(bool r) { saved_position* pmp = static_cast*>(m_backup_state); if(!r) { pstate = pmp->pstate; position = pmp->position; } boost::re_detail::inplace_destroy(pmp++); m_backup_state = pmp; return r; } template bool perl_matcher::unwind_repeater_counter(bool) { saved_repeater* pmp = static_cast*>(m_backup_state); boost::re_detail::inplace_destroy(pmp++); m_backup_state = pmp; return true; // keep looking } template bool perl_matcher::unwind_extra_block(bool) { saved_extra_block* pmp = static_cast(m_backup_state); void* condemmed = m_stack_base; m_stack_base = pmp->base; m_backup_state = pmp->end; boost::re_detail::inplace_destroy(pmp); put_mem_block(condemmed); return true; // keep looking } template inline void perl_matcher::destroy_single_repeat() { saved_single_repeat* p = static_cast*>(m_backup_state); boost::re_detail::inplace_destroy(p++); m_backup_state = p; } template bool perl_matcher::unwind_greedy_single_repeat(bool r) { saved_single_repeat* pmp = static_cast*>(m_backup_state); // if we have a match, just discard this state: if(r) { destroy_single_repeat(); return true; } const re_repeat* rep = pmp->rep; std::size_t count = pmp->count; BOOST_ASSERT(rep->next.p != 0); BOOST_ASSERT(rep->alt.p != 0); count -= rep->min; if((m_match_flags & match_partial) && (position == last)) m_has_partial_match = true; BOOST_ASSERT(count); position = pmp->last_position; // backtrack till we can skip out: do { --position; --count; ++state_count; }while(count && !can_start(*position, rep->_map, mask_skip)); // if we've hit base, destroy this state: if(count == 0) { destroy_single_repeat(); if(!can_start(*position, rep->_map, mask_skip)) return true; } else { pmp->count = count + rep->min; pmp->last_position = position; } pstate = rep->alt.p; return false; } template bool perl_matcher::unwind_slow_dot_repeat(bool r) { saved_single_repeat* pmp = static_cast*>(m_backup_state); // if we have a match, just discard this state: if(r) { destroy_single_repeat(); return true; } const re_repeat* rep = pmp->rep; std::size_t count = pmp->count; BOOST_ASSERT(rep->type == syntax_element_dot_rep); BOOST_ASSERT(rep->next.p != 0); BOOST_ASSERT(rep->alt.p != 0); BOOST_ASSERT(rep->next.p->type == syntax_element_wild); BOOST_ASSERT(count < rep->max); pstate = rep->next.p; position = pmp->last_position; if(position != last) { // wind forward until we can skip out of the repeat: do { if(!match_wild()) { // failed repeat match, discard this state and look for another: destroy_single_repeat(); return true; } ++count; ++state_count; pstate = rep->next.p; }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); } if(position == last) { // can't repeat any more, remove the pushed state: destroy_single_repeat(); if((m_match_flags & match_partial) && (position == last) && (position != search_base)) m_has_partial_match = true; if(0 == (rep->can_be_null & mask_skip)) return true; } else if(count == rep->max) { // can't repeat any more, remove the pushed state: destroy_single_repeat(); if(!can_start(*position, rep->_map, mask_skip)) return true; } else { pmp->count = count; pmp->last_position = position; } pstate = rep->alt.p; return false; } template bool perl_matcher::unwind_fast_dot_repeat(bool r) { saved_single_repeat* pmp = static_cast*>(m_backup_state); // if we have a match, just discard this state: if(r) { destroy_single_repeat(); return true; } const re_repeat* rep = pmp->rep; std::size_t count = pmp->count; BOOST_ASSERT(count < rep->max); position = pmp->last_position; if(position != last) { // wind forward until we can skip out of the repeat: do { ++position; ++count; ++state_count; }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); } // remember where we got to if this is a leading repeat: if((rep->leading) && (count < rep->max)) restart = position; if(position == last) { // can't repeat any more, remove the pushed state: destroy_single_repeat(); if((m_match_flags & match_partial) && (position == last) && (position != search_base)) m_has_partial_match = true; if(0 == (rep->can_be_null & mask_skip)) return true; } else if(count == rep->max) { // can't repeat any more, remove the pushed state: destroy_single_repeat(); if(!can_start(*position, rep->_map, mask_skip)) return true; } else { pmp->count = count; pmp->last_position = position; } pstate = rep->alt.p; return false; } template bool perl_matcher::unwind_char_repeat(bool r) { saved_single_repeat* pmp = static_cast*>(m_backup_state); // if we have a match, just discard this state: if(r) { destroy_single_repeat(); return true; } const re_repeat* rep = pmp->rep; std::size_t count = pmp->count; pstate = rep->next.p; const char_type what = *reinterpret_cast(static_cast(pstate) + 1); position = pmp->last_position; BOOST_ASSERT(rep->type == syntax_element_char_rep); BOOST_ASSERT(rep->next.p != 0); BOOST_ASSERT(rep->alt.p != 0); BOOST_ASSERT(rep->next.p->type == syntax_element_literal); BOOST_ASSERT(count < rep->max); if(position != last) { // wind forward until we can skip out of the repeat: do { if(traits_inst.translate(*position, icase) != what) { // failed repeat match, discard this state and look for another: destroy_single_repeat(); return true; } ++count; ++ position; ++state_count; pstate = rep->next.p; }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); } // remember where we got to if this is a leading repeat: if((rep->leading) && (count < rep->max)) restart = position; if(position == last) { // can't repeat any more, remove the pushed state: destroy_single_repeat(); if((m_match_flags & match_partial) && (position == last) && (position != search_base)) m_has_partial_match = true; if(0 == (rep->can_be_null & mask_skip)) return true; } else if(count == rep->max) { // can't repeat any more, remove the pushed state: destroy_single_repeat(); if(!can_start(*position, rep->_map, mask_skip)) return true; } else { pmp->count = count; pmp->last_position = position; } pstate = rep->alt.p; return false; } template bool perl_matcher::unwind_short_set_repeat(bool r) { saved_single_repeat* pmp = static_cast*>(m_backup_state); // if we have a match, just discard this state: if(r) { destroy_single_repeat(); return true; } const re_repeat* rep = pmp->rep; std::size_t count = pmp->count; pstate = rep->next.p; const unsigned char* map = static_cast(rep->next.p)->_map; position = pmp->last_position; BOOST_ASSERT(rep->type == syntax_element_short_set_rep); BOOST_ASSERT(rep->next.p != 0); BOOST_ASSERT(rep->alt.p != 0); BOOST_ASSERT(rep->next.p->type == syntax_element_set); BOOST_ASSERT(count < rep->max); if(position != last) { // wind forward until we can skip out of the repeat: do { if(!map[static_cast(traits_inst.translate(*position, icase))]) { // failed repeat match, discard this state and look for another: destroy_single_repeat(); return true; } ++count; ++ position; ++state_count; pstate = rep->next.p; }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); } // remember where we got to if this is a leading repeat: if((rep->leading) && (count < rep->max)) restart = position; if(position == last) { // can't repeat any more, remove the pushed state: destroy_single_repeat(); if((m_match_flags & match_partial) && (position == last) && (position != search_base)) m_has_partial_match = true; if(0 == (rep->can_be_null & mask_skip)) return true; } else if(count == rep->max) { // can't repeat any more, remove the pushed state: destroy_single_repeat(); if(!can_start(*position, rep->_map, mask_skip)) return true; } else { pmp->count = count; pmp->last_position = position; } pstate = rep->alt.p; return false; } template bool perl_matcher::unwind_long_set_repeat(bool r) { typedef typename traits::char_class_type m_type; saved_single_repeat* pmp = static_cast*>(m_backup_state); // if we have a match, just discard this state: if(r) { destroy_single_repeat(); return true; } const re_repeat* rep = pmp->rep; std::size_t count = pmp->count; pstate = rep->next.p; const re_set_long* set = static_cast*>(pstate); position = pmp->last_position; BOOST_ASSERT(rep->type == syntax_element_long_set_rep); BOOST_ASSERT(rep->next.p != 0); BOOST_ASSERT(rep->alt.p != 0); BOOST_ASSERT(rep->next.p->type == syntax_element_long_set); BOOST_ASSERT(count < rep->max); if(position != last) { // wind forward until we can skip out of the repeat: do { if(position == re_is_set_member(position, last, set, re.get_data(), icase)) { // failed repeat match, discard this state and look for another: destroy_single_repeat(); return true; } ++position; ++count; ++state_count; pstate = rep->next.p; }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip)); } // remember where we got to if this is a leading repeat: if((rep->leading) && (count < rep->max)) restart = position; if(position == last) { // can't repeat any more, remove the pushed state: destroy_single_repeat(); if((m_match_flags & match_partial) && (position == last) && (position != search_base)) m_has_partial_match = true; if(0 == (rep->can_be_null & mask_skip)) return true; } else if(count == rep->max) { // can't repeat any more, remove the pushed state: destroy_single_repeat(); if(!can_start(*position, rep->_map, mask_skip)) return true; } else { pmp->count = count; pmp->last_position = position; } pstate = rep->alt.p; return false; } template bool perl_matcher::unwind_non_greedy_repeat(bool r) { saved_position* pmp = static_cast*>(m_backup_state); if(!r) { position = pmp->position; pstate = pmp->pstate; ++(*next_count); } boost::re_detail::inplace_destroy(pmp++); m_backup_state = pmp; return r; } template bool perl_matcher::unwind_recursion(bool r) { saved_recursion* pmp = static_cast*>(m_backup_state); if(!r) { recursion_stack.push_back(recursion_info()); recursion_stack.back().idx = pmp->recursion_id; recursion_stack.back().preturn_address = pmp->preturn_address; recursion_stack.back().results = pmp->results; } boost::re_detail::inplace_destroy(pmp++); m_backup_state = pmp; return true; } template bool perl_matcher::unwind_recursion_pop(bool r) { saved_state* pmp = static_cast(m_backup_state); if(!r) { recursion_stack.pop_back(); } boost::re_detail::inplace_destroy(pmp++); m_backup_state = pmp; return true; } template void perl_matcher::push_recursion_pop() { saved_state* pmp = static_cast(m_backup_state); --pmp; if(pmp < m_stack_base) { extend_stack(); pmp = static_cast(m_backup_state); --pmp; } (void) new (pmp)saved_state(15); m_backup_state = pmp; } /* template bool perl_matcher::unwind_parenthesis_pop(bool r) { saved_state* pmp = static_cast(m_backup_state); if(!r) { --parenthesis_stack_position; } boost::re_detail::inplace_destroy(pmp++); m_backup_state = pmp; return true; } template void perl_matcher::push_parenthesis_pop() { saved_state* pmp = static_cast(m_backup_state); --pmp; if(pmp < m_stack_base) { extend_stack(); pmp = static_cast(m_backup_state); --pmp; } (void) new (pmp)saved_state(16); m_backup_state = pmp; } template bool perl_matcher::unwind_parenthesis_push(bool r) { saved_position* pmp = static_cast*>(m_backup_state); if(!r) { parenthesis_stack[parenthesis_stack_position++] = pmp->position; } boost::re_detail::inplace_destroy(pmp++); m_backup_state = pmp; return true; } template inline void perl_matcher::push_parenthesis_push(BidiIterator p) { saved_position* pmp = static_cast*>(m_backup_state); --pmp; if(pmp < m_stack_base) { extend_stack(); pmp = static_cast*>(m_backup_state); --pmp; } (void) new (pmp)saved_position(0, p, 17); m_backup_state = pmp; } */ } // namespace re_detail } // namespace boost #ifdef BOOST_MSVC # pragma warning(pop) #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/perl_matcher_recursive.hpp000644 000765 000024 00000072131 12233035540 025056 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE perl_matcher_common.cpp * VERSION see * DESCRIPTION: Definitions of perl_matcher member functions that are * specific to the recursive implementation. */ #ifndef BOOST_REGEX_V4_PERL_MATCHER_RECURSIVE_HPP #define BOOST_REGEX_V4_PERL_MATCHER_RECURSIVE_HPP #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4800) #endif namespace boost{ namespace re_detail{ template class backup_subex { int index; sub_match sub; public: template backup_subex(const match_results& w, int i) : index(i), sub(w[i], false) {} template void restore(match_results& w) { w.set_first(sub.first, index, index == 0); w.set_second(sub.second, index, sub.matched, index == 0); } const sub_match& get() { return sub; } }; template bool perl_matcher::match_all_states() { static matcher_proc_type const s_match_vtable[30] = { (&perl_matcher::match_startmark), &perl_matcher::match_endmark, &perl_matcher::match_literal, &perl_matcher::match_start_line, &perl_matcher::match_end_line, &perl_matcher::match_wild, &perl_matcher::match_match, &perl_matcher::match_word_boundary, &perl_matcher::match_within_word, &perl_matcher::match_word_start, &perl_matcher::match_word_end, &perl_matcher::match_buffer_start, &perl_matcher::match_buffer_end, &perl_matcher::match_backref, &perl_matcher::match_long_set, &perl_matcher::match_set, &perl_matcher::match_jump, &perl_matcher::match_alt, &perl_matcher::match_rep, &perl_matcher::match_combining, &perl_matcher::match_soft_buffer_end, &perl_matcher::match_restart_continue, // Although this next line *should* be evaluated at compile time, in practice // some compilers (VC++) emit run-time initialisation which breaks thread // safety, so use a dispatch function instead: //(::boost::is_random_access_iterator::value ? &perl_matcher::match_dot_repeat_fast : &perl_matcher::match_dot_repeat_slow), &perl_matcher::match_dot_repeat_dispatch, &perl_matcher::match_char_repeat, &perl_matcher::match_set_repeat, &perl_matcher::match_long_set_repeat, &perl_matcher::match_backstep, &perl_matcher::match_assert_backref, &perl_matcher::match_toggle_case, &perl_matcher::match_recursion, }; if(state_count > max_state_count) raise_error(traits_inst, regex_constants::error_complexity); while(pstate) { matcher_proc_type proc = s_match_vtable[pstate->type]; ++state_count; if(!(this->*proc)()) { if((m_match_flags & match_partial) && (position == last) && (position != search_base)) m_has_partial_match = true; return 0; } } return true; } template bool perl_matcher::match_startmark() { int index = static_cast(pstate)->index; icase = static_cast(pstate)->icase; bool r = true; switch(index) { case 0: pstate = pstate->next.p; break; case -1: case -2: { // forward lookahead assert: BidiIterator old_position(position); const re_syntax_base* next_pstate = static_cast(pstate->next.p)->alt.p->next.p; pstate = pstate->next.p->next.p; r = match_all_states(); pstate = next_pstate; position = old_position; if((r && (index != -1)) || (!r && (index != -2))) r = false; else r = true; break; } case -3: { // independent sub-expression: bool old_independent = m_independent; m_independent = true; const re_syntax_base* next_pstate = static_cast(pstate->next.p)->alt.p->next.p; pstate = pstate->next.p->next.p; r = match_all_states(); pstate = next_pstate; m_independent = old_independent; #ifdef BOOST_REGEX_MATCH_EXTRA if(r && (m_match_flags & match_extra)) { // // our captures have been stored in *m_presult // we need to unpack them, and insert them // back in the right order when we unwind the stack: // unsigned i; match_results tm(*m_presult); for(i = 0; i < tm.size(); ++i) (*m_presult)[i].get_captures().clear(); // match everything else: r = match_all_states(); // now place the stored captures back: for(i = 0; i < tm.size(); ++i) { typedef typename sub_match::capture_sequence_type seq; seq& s1 = (*m_presult)[i].get_captures(); const seq& s2 = tm[i].captures(); s1.insert( s1.end(), s2.begin(), s2.end()); } } #endif break; } case -4: { // conditional expression: const re_alt* alt = static_cast(pstate->next.p); BOOST_ASSERT(alt->type == syntax_element_alt); pstate = alt->next.p; if(pstate->type == syntax_element_assert_backref) { if(!match_assert_backref()) pstate = alt->alt.p; break; } else { // zero width assertion, have to match this recursively: BOOST_ASSERT(pstate->type == syntax_element_startmark); bool negated = static_cast(pstate)->index == -2; BidiIterator saved_position = position; const re_syntax_base* next_pstate = static_cast(pstate->next.p)->alt.p->next.p; pstate = pstate->next.p->next.p; bool res = match_all_states(); position = saved_position; if(negated) res = !res; if(res) pstate = next_pstate; else pstate = alt->alt.p; break; } } case -5: { // Reset start of $0, since we have a \K escape backup_subex sub(*m_presult, 0); m_presult->set_first(position, 0, true); pstate = pstate->next.p; r = match_all_states(); if(r == false) sub.restore(*m_presult); break; } default: { BOOST_ASSERT(index > 0); if((m_match_flags & match_nosubs) == 0) { backup_subex sub(*m_presult, index); m_presult->set_first(position, index); pstate = pstate->next.p; r = match_all_states(); if(r == false) sub.restore(*m_presult); #ifdef BOOST_REGEX_MATCH_EXTRA // // we have a match, push the capture information onto the stack: // else if(sub.get().matched && (match_extra & m_match_flags)) ((*m_presult)[index]).get_captures().push_back(sub.get()); #endif } else { pstate = pstate->next.p; } break; } } return r; } template bool perl_matcher::match_alt() { bool take_first, take_second; const re_alt* jmp = static_cast(pstate); // find out which of these two alternatives we need to take: if(position == last) { take_first = jmp->can_be_null & mask_take; take_second = jmp->can_be_null & mask_skip; } else { take_first = can_start(*position, jmp->_map, (unsigned char)mask_take); take_second = can_start(*position, jmp->_map, (unsigned char)mask_skip); } if(take_first) { // we can take the first alternative, // see if we need to push next alternative: if(take_second) { BidiIterator oldposition(position); const re_syntax_base* old_pstate = jmp->alt.p; pstate = pstate->next.p; if(!match_all_states()) { pstate = old_pstate; position = oldposition; } return true; } pstate = pstate->next.p; return true; } if(take_second) { pstate = jmp->alt.p; return true; } return false; // neither option is possible } template bool perl_matcher::match_rep() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127 4244) #endif const re_repeat* rep = static_cast(pstate); // // Always copy the repeat count, so that the state is restored // when we exit this scope: // repeater_count r(rep->state_id, &next_count, position); // // If we've had at least one repeat already, and the last one // matched the NULL string then set the repeat count to // maximum: // next_count->check_null_repeat(position, rep->max); // find out which of these two alternatives we need to take: bool take_first, take_second; if(position == last) { take_first = rep->can_be_null & mask_take; take_second = rep->can_be_null & mask_skip; } else { take_first = can_start(*position, rep->_map, (unsigned char)mask_take); take_second = can_start(*position, rep->_map, (unsigned char)mask_skip); } if(next_count->get_count() < rep->min) { // we must take the repeat: if(take_first) { // increase the counter: ++(*next_count); pstate = rep->next.p; return match_all_states(); } return false; } bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); if(greedy) { // try and take the repeat if we can: if((next_count->get_count() < rep->max) && take_first) { // store position in case we fail: BidiIterator pos = position; // increase the counter: ++(*next_count); pstate = rep->next.p; if(match_all_states()) return true; // failed repeat, reset posistion and fall through for alternative: position = pos; } if(take_second) { pstate = rep->alt.p; return true; } return false; // can't take anything, fail... } else // non-greedy { // try and skip the repeat if we can: if(take_second) { // store position in case we fail: BidiIterator pos = position; pstate = rep->alt.p; if(match_all_states()) return true; // failed alternative, reset posistion and fall through for repeat: position = pos; } if((next_count->get_count() < rep->max) && take_first) { // increase the counter: ++(*next_count); pstate = rep->next.p; return match_all_states(); } } return false; #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::match_dot_repeat_slow() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif unsigned count = 0; const re_repeat* rep = static_cast(pstate); re_syntax_base* psingle = rep->next.p; // match compulsary repeats first: while(count < rep->min) { pstate = psingle; if(!match_wild()) return false; ++count; } bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); if(greedy) { // normal repeat: while(count < rep->max) { pstate = psingle; if(!match_wild()) break; ++count; } if((rep->leading) && (count < rep->max)) restart = position; pstate = rep; return backtrack_till_match(count - rep->min); } else { // non-greedy, keep trying till we get a match: BidiIterator save_pos; do { if((rep->leading) && (rep->max == UINT_MAX)) restart = position; pstate = rep->alt.p; save_pos = position; ++state_count; if(match_all_states()) return true; if(count >= rep->max) return false; ++count; pstate = psingle; position = save_pos; if(!match_wild()) return false; }while(true); } #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::match_dot_repeat_fast() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif if(m_match_flags & match_not_dot_null) return match_dot_repeat_slow(); if((static_cast(pstate->next.p)->mask & match_any_mask) == 0) return match_dot_repeat_slow(); // // start by working out how much we can skip: // const re_repeat* rep = static_cast(pstate); #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4267) #endif bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); std::size_t count = (std::min)(static_cast(::boost::re_detail::distance(position, last)), static_cast(greedy ? rep->max : rep->min)); if(rep->min > count) { position = last; return false; // not enough text left to match } std::advance(position, count); #ifdef BOOST_MSVC #pragma warning(pop) #endif if((rep->leading) && (count < rep->max) && greedy) restart = position; if(greedy) return backtrack_till_match(count - rep->min); // non-greedy, keep trying till we get a match: BidiIterator save_pos; do { while((position != last) && (count < rep->max) && !can_start(*position, rep->_map, mask_skip)) { ++position; ++count; } if((rep->leading) && (rep->max == UINT_MAX)) restart = position; pstate = rep->alt.p; save_pos = position; ++state_count; if(match_all_states()) return true; if(count >= rep->max) return false; if(save_pos == last) return false; position = ++save_pos; ++count; }while(true); #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::match_char_repeat() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #pragma warning(disable:4267) #endif #ifdef __BORLANDC__ #pragma option push -w-8008 -w-8066 -w-8004 #endif const re_repeat* rep = static_cast(pstate); BOOST_ASSERT(1 == static_cast(rep->next.p)->length); const char_type what = *reinterpret_cast(static_cast(rep->next.p) + 1); // // start by working out how much we can skip: // bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); std::size_t count, desired; if(::boost::is_random_access_iterator::value) { desired = (std::min)( (std::size_t)(greedy ? rep->max : rep->min), (std::size_t)::boost::re_detail::distance(position, last)); count = desired; ++desired; if(icase) { while(--desired && (traits_inst.translate_nocase(*position) == what)) { ++position; } } else { while(--desired && (traits_inst.translate(*position) == what)) { ++position; } } count = count - desired; } else { count = 0; desired = greedy ? rep->max : rep->min; while((count < desired) && (position != last) && (traits_inst.translate(*position, icase) == what)) { ++position; ++count; } } if((rep->leading) && (count < rep->max) && greedy) restart = position; if(count < rep->min) return false; if(greedy) return backtrack_till_match(count - rep->min); // non-greedy, keep trying till we get a match: BidiIterator save_pos; do { while((position != last) && (count < rep->max) && !can_start(*position, rep->_map, mask_skip)) { if((traits_inst.translate(*position, icase) == what)) { ++position; ++count; } else return false; // counldn't repeat even though it was the only option } if((rep->leading) && (rep->max == UINT_MAX)) restart = position; pstate = rep->alt.p; save_pos = position; ++state_count; if(match_all_states()) return true; if(count >= rep->max) return false; position = save_pos; if(position == last) return false; if(traits_inst.translate(*position, icase) == what) { ++position; ++count; } else { return false; } }while(true); #ifdef __BORLANDC__ #pragma option pop #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::match_set_repeat() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif #ifdef __BORLANDC__ #pragma option push -w-8008 -w-8066 -w-8004 #endif const re_repeat* rep = static_cast(pstate); const unsigned char* map = static_cast(rep->next.p)->_map; unsigned count = 0; // // start by working out how much we can skip: // bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); std::size_t desired = greedy ? rep->max : rep->min; if(::boost::is_random_access_iterator::value) { BidiIterator end = position; std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); BidiIterator origin(position); while((position != end) && map[static_cast(traits_inst.translate(*position, icase))]) { ++position; } count = (unsigned)::boost::re_detail::distance(origin, position); } else { while((count < desired) && (position != last) && map[static_cast(traits_inst.translate(*position, icase))]) { ++position; ++count; } } if((rep->leading) && (count < rep->max) && greedy) restart = position; if(count < rep->min) return false; if(greedy) return backtrack_till_match(count - rep->min); // non-greedy, keep trying till we get a match: BidiIterator save_pos; do { while((position != last) && (count < rep->max) && !can_start(*position, rep->_map, mask_skip)) { if(map[static_cast(traits_inst.translate(*position, icase))]) { ++position; ++count; } else return false; // counldn't repeat even though it was the only option } if((rep->leading) && (rep->max == UINT_MAX)) restart = position; pstate = rep->alt.p; save_pos = position; ++state_count; if(match_all_states()) return true; if(count >= rep->max) return false; position = save_pos; if(position == last) return false; if(map[static_cast(traits_inst.translate(*position, icase))]) { ++position; ++count; } else { return false; } }while(true); #ifdef __BORLANDC__ #pragma option pop #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::match_long_set_repeat() { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif #ifdef __BORLANDC__ #pragma option push -w-8008 -w-8066 -w-8004 #endif typedef typename traits::char_class_type char_class_type; const re_repeat* rep = static_cast(pstate); const re_set_long* set = static_cast*>(pstate->next.p); unsigned count = 0; // // start by working out how much we can skip: // bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent); std::size_t desired = greedy ? rep->max : rep->min; if(::boost::is_random_access_iterator::value) { BidiIterator end = position; std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); BidiIterator origin(position); while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase))) { ++position; } count = (unsigned)::boost::re_detail::distance(origin, position); } else { while((count < desired) && (position != last) && (position != re_is_set_member(position, last, set, re.get_data(), icase))) { ++position; ++count; } } if((rep->leading) && (count < rep->max) && greedy) restart = position; if(count < rep->min) return false; if(greedy) return backtrack_till_match(count - rep->min); // non-greedy, keep trying till we get a match: BidiIterator save_pos; do { while((position != last) && (count < rep->max) && !can_start(*position, rep->_map, mask_skip)) { if(position != re_is_set_member(position, last, set, re.get_data(), icase)) { ++position; ++count; } else return false; // counldn't repeat even though it was the only option } if((rep->leading) && (rep->max == UINT_MAX)) restart = position; pstate = rep->alt.p; save_pos = position; ++state_count; if(match_all_states()) return true; if(count >= rep->max) return false; position = save_pos; if(position == last) return false; if(position != re_is_set_member(position, last, set, re.get_data(), icase)) { ++position; ++count; } else { return false; } }while(true); #ifdef __BORLANDC__ #pragma option pop #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::backtrack_till_match(std::size_t count) { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4127) #endif if((m_match_flags & match_partial) && (position == last)) m_has_partial_match = true; const re_repeat* rep = static_cast(pstate); BidiIterator backtrack = position; if(position == last) { if(rep->can_be_null & mask_skip) { pstate = rep->alt.p; if(match_all_states()) return true; } if(count) { position = --backtrack; --count; } else return false; } do { while(count && !can_start(*position, rep->_map, mask_skip)) { --position; --count; ++state_count; } pstate = rep->alt.p; backtrack = position; if(match_all_states()) return true; if(count == 0) return false; position = --backtrack; ++state_count; --count; }while(true); #ifdef BOOST_MSVC #pragma warning(pop) #endif } template bool perl_matcher::match_recursion() { BOOST_ASSERT(pstate->type == syntax_element_recurse); // // Set new call stack: // if(recursion_stack.capacity() == 0) { recursion_stack.reserve(50); } recursion_stack.push_back(recursion_info()); recursion_stack.back().preturn_address = pstate->next.p; recursion_stack.back().results = *m_presult; recursion_stack.back().repeater_stack = next_count; pstate = static_cast(pstate)->alt.p; recursion_stack.back().idx = static_cast(pstate)->index; repeater_count* saved = next_count; repeater_count r(&next_count); // resets all repeat counts since we're recursing and starting fresh on those next_count = &r; bool result = match_all_states(); next_count = saved; if(!result) { next_count = recursion_stack.back().repeater_stack; *m_presult = recursion_stack.back().results; recursion_stack.pop_back(); return false; } return true; } template bool perl_matcher::match_endmark() { int index = static_cast(pstate)->index; icase = static_cast(pstate)->icase; if(index > 0) { if((m_match_flags & match_nosubs) == 0) { m_presult->set_second(position, index); } if(!recursion_stack.empty()) { if(index == recursion_stack.back().idx) { recursion_info saved = recursion_stack.back(); recursion_stack.pop_back(); pstate = saved.preturn_address; repeater_count* saved_count = next_count; next_count = saved.repeater_stack; *m_presult = saved.results; if(!match_all_states()) { recursion_stack.push_back(saved); next_count = saved_count; return false; } } } } else if((index < 0) && (index != -4)) { // matched forward lookahead: pstate = 0; return true; } pstate = pstate ? pstate->next.p : 0; return true; } template bool perl_matcher::match_match() { if(!recursion_stack.empty()) { BOOST_ASSERT(0 == recursion_stack.back().idx); const re_syntax_base* saved_state = pstate = recursion_stack.back().preturn_address; *m_presult = recursion_stack.back().results; recursion_stack.pop_back(); if(!match_all_states()) { recursion_stack.push_back(recursion_info()); recursion_stack.back().preturn_address = saved_state; recursion_stack.back().results = *m_presult; return false; } return true; } if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first)) return false; if((m_match_flags & match_all) && (position != last)) return false; if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base)) return false; m_presult->set_second(position); pstate = 0; m_has_found_match = true; if((m_match_flags & match_posix) == match_posix) { m_result.maybe_assign(*m_presult); if((m_match_flags & match_any) == 0) return false; } #ifdef BOOST_REGEX_MATCH_EXTRA if(match_extra & m_match_flags) { for(unsigned i = 0; i < m_presult->size(); ++i) if((*m_presult)[i].matched) ((*m_presult)[i]).get_captures().push_back((*m_presult)[i]); } #endif return true; } } // namespace re_detail } // namespace boost #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/primary_transform.hpp000644 000765 000024 00000006373 12233035540 024105 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: primary_transform.hpp * VERSION: see * DESCRIPTION: Heuristically determines the sort string format in use * by the current locale. */ #ifndef BOOST_REGEX_PRIMARY_TRANSFORM #define BOOST_REGEX_PRIMARY_TRANSFORM #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ namespace re_detail{ enum{ sort_C, sort_fixed, sort_delim, sort_unknown }; template unsigned count_chars(const S& s, charT c) { // // Count how many occurances of character c occur // in string s: if c is a delimeter between collation // fields, then this should be the same value for all // sort keys: // unsigned int count = 0; for(unsigned pos = 0; pos < s.size(); ++pos) { if(s[pos] == c) ++count; } return count; } template unsigned find_sort_syntax(const traits* pt, charT* delim) { // // compare 'a' with 'A' to see how similar they are, // should really use a-accute but we can't portably do that, // typedef typename traits::string_type string_type; typedef typename traits::char_type char_type; // Suppress incorrect warning for MSVC (void)pt; char_type a[2] = {'a', '\0', }; string_type sa(pt->transform(a, a+1)); if(sa == a) { *delim = 0; return sort_C; } char_type A[2] = { 'A', '\0', }; string_type sA(pt->transform(A, A+1)); char_type c[2] = { ';', '\0', }; string_type sc(pt->transform(c, c+1)); int pos = 0; while((pos <= static_cast(sa.size())) && (pos <= static_cast(sA.size())) && (sa[pos] == sA[pos])) ++pos; --pos; if(pos < 0) { *delim = 0; return sort_unknown; } // // at this point sa[pos] is either the end of a fixed width field // or the character that acts as a delimiter: // charT maybe_delim = sa[pos]; if((pos != 0) && (count_chars(sa, maybe_delim) == count_chars(sA, maybe_delim)) && (count_chars(sa, maybe_delim) == count_chars(sc, maybe_delim))) { *delim = maybe_delim; return sort_delim; } // // OK doen't look like a delimiter, try for fixed width field: // if((sa.size() == sA.size()) && (sa.size() == sc.size())) { // note assumes that the fixed width field is less than // (numeric_limits::max)(), should be true for all types // I can't imagine 127 character fields... *delim = static_cast(++pos); return sort_fixed; } // // don't know what it is: // *delim = 0; return sort_unknown; } } // namespace re_detail } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/protected_call.hpp000644 000765 000024 00000003214 12233035540 023302 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE basic_regex_creator.cpp * VERSION see * DESCRIPTION: Declares template class basic_regex_creator which fills in * the data members of a regex_data object. */ #ifndef BOOST_REGEX_V4_PROTECTED_CALL_HPP #define BOOST_REGEX_V4_PROTECTED_CALL_HPP #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ namespace re_detail{ class BOOST_REGEX_DECL abstract_protected_call { public: bool BOOST_REGEX_CALL execute()const; // this stops gcc-4 from complaining: virtual ~abstract_protected_call(){} private: virtual bool call()const = 0; }; template class concrete_protected_call : public abstract_protected_call { public: typedef bool (T::*proc_type)(); concrete_protected_call(T* o, proc_type p) : obj(o), proc(p) {} private: virtual bool call()const; T* obj; proc_type proc; }; template bool concrete_protected_call::call()const { return (obj->*proc)(); } } } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/regbase.hpp000644 000765 000024 00000013524 12233035540 021733 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regbase.cpp * VERSION see * DESCRIPTION: Declares class regbase. */ #ifndef BOOST_REGEX_V4_REGBASE_HPP #define BOOST_REGEX_V4_REGBASE_HPP #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ // // class regbase // handles error codes and flags // class BOOST_REGEX_DECL regbase { public: enum flag_type_ { // // Divide the flags up into logical groups: // bits 0-7 indicate main synatx type. // bits 8-15 indicate syntax subtype. // bits 16-31 indicate options that are common to all // regex syntaxes. // In all cases the default is 0. // // Main synatx group: // perl_syntax_group = 0, // default basic_syntax_group = 1, // POSIX basic literal = 2, // all characters are literals main_option_type = literal | basic_syntax_group | perl_syntax_group, // everything! // // options specific to perl group: // no_bk_refs = 1 << 8, // \d not allowed no_perl_ex = 1 << 9, // disable perl extensions no_mod_m = 1 << 10, // disable Perl m modifier mod_x = 1 << 11, // Perl x modifier mod_s = 1 << 12, // force s modifier on (overrides match_not_dot_newline) no_mod_s = 1 << 13, // force s modifier off (overrides match_not_dot_newline) // // options specific to basic group: // no_char_classes = 1 << 8, // [[:CLASS:]] not allowed no_intervals = 1 << 9, // {x,y} not allowed bk_plus_qm = 1 << 10, // uses \+ and \? bk_vbar = 1 << 11, // use \| for alternatives emacs_ex = 1 << 12, // enables emacs extensions // // options common to all groups: // no_escape_in_lists = 1 << 16, // '\' not special inside [...] newline_alt = 1 << 17, // \n is the same as | no_except = 1 << 18, // no exception on error failbit = 1 << 19, // error flag icase = 1 << 20, // characters are matched regardless of case nocollate = 0, // don't use locale specific collation (deprecated) collate = 1 << 21, // use locale specific collation nosubs = 1 << 22, // don't mark sub-expressions save_subexpression_location = 1 << 23, // save subexpression locations no_empty_expressions = 1 << 24, // no empty expressions allowed optimize = 0, // not really supported basic = basic_syntax_group | collate | no_escape_in_lists, extended = no_bk_refs | collate | no_perl_ex | no_escape_in_lists, normal = 0, emacs = basic_syntax_group | collate | emacs_ex | bk_vbar, awk = no_bk_refs | collate | no_perl_ex, grep = basic | newline_alt, egrep = extended | newline_alt, sed = basic, perl = normal, ECMAScript = normal, JavaScript = normal, JScript = normal }; typedef unsigned int flag_type; enum restart_info { restart_any = 0, restart_word = 1, restart_line = 2, restart_buf = 3, restart_continue = 4, restart_lit = 5, restart_fixed_lit = 6, restart_count = 7 }; }; // // provide std lib proposal compatible constants: // namespace regex_constants{ enum flag_type_ { no_except = ::boost::regbase::no_except, failbit = ::boost::regbase::failbit, literal = ::boost::regbase::literal, icase = ::boost::regbase::icase, nocollate = ::boost::regbase::nocollate, collate = ::boost::regbase::collate, nosubs = ::boost::regbase::nosubs, optimize = ::boost::regbase::optimize, bk_plus_qm = ::boost::regbase::bk_plus_qm, bk_vbar = ::boost::regbase::bk_vbar, no_intervals = ::boost::regbase::no_intervals, no_char_classes = ::boost::regbase::no_char_classes, no_escape_in_lists = ::boost::regbase::no_escape_in_lists, no_mod_m = ::boost::regbase::no_mod_m, mod_x = ::boost::regbase::mod_x, mod_s = ::boost::regbase::mod_s, no_mod_s = ::boost::regbase::no_mod_s, save_subexpression_location = ::boost::regbase::save_subexpression_location, no_empty_expressions = ::boost::regbase::no_empty_expressions, basic = ::boost::regbase::basic, extended = ::boost::regbase::extended, normal = ::boost::regbase::normal, emacs = ::boost::regbase::emacs, awk = ::boost::regbase::awk, grep = ::boost::regbase::grep, egrep = ::boost::regbase::egrep, sed = basic, perl = normal, ECMAScript = normal, JavaScript = normal, JScript = normal }; typedef ::boost::regbase::flag_type syntax_option_type; } // namespace regex_constants } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/regex.hpp000644 000765 000024 00000010756 12233035540 021441 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex.cpp * VERSION see * DESCRIPTION: Declares boost::basic_regex<> and associated * functions and classes. This header is the main * entry point for the template regex code. */ #ifndef BOOST_RE_REGEX_HPP_INCLUDED #define BOOST_RE_REGEX_HPP_INCLUDED #ifdef __cplusplus // what follows is all C++ don't include in C builds!! #ifndef BOOST_REGEX_CONFIG_HPP #include #endif #ifndef BOOST_REGEX_WORKAROUND_HPP #include #endif #ifndef BOOST_REGEX_FWD_HPP #include #endif #ifndef BOOST_REGEX_TRAITS_HPP #include #endif #ifndef BOOST_REGEX_RAW_BUFFER_HPP #include #endif #ifndef BOOST_REGEX_V4_MATCH_FLAGS #include #endif #ifndef BOOST_REGEX_RAW_BUFFER_HPP #include #endif #ifndef BOOST_RE_PAT_EXCEPT_HPP #include #endif #ifndef BOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP #include #endif #ifndef BOOST_REGEX_V4_STATES_HPP #include #endif #ifndef BOOST_REGEX_V4_REGBASE_HPP #include #endif #ifndef BOOST_REGEX_V4_ITERATOR_TRAITS_HPP #include #endif #ifndef BOOST_REGEX_V4_BASIC_REGEX_HPP #include #endif #ifndef BOOST_REGEX_V4_BASIC_REGEX_CREATOR_HPP #include #endif #ifndef BOOST_REGEX_V4_BASIC_REGEX_PARSER_HPP #include #endif #ifndef BOOST_REGEX_V4_SUB_MATCH_HPP #include #endif #ifndef BOOST_REGEX_FORMAT_HPP #include #endif #ifndef BOOST_REGEX_V4_MATCH_RESULTS_HPP #include #endif #ifndef BOOST_REGEX_V4_PROTECTED_CALL_HPP #include #endif #ifndef BOOST_REGEX_MATCHER_HPP #include #endif // // template instances: // #define BOOST_REGEX_CHAR_T char #ifdef BOOST_REGEX_NARROW_INSTANTIATE # define BOOST_REGEX_INSTANTIATE #endif #include #undef BOOST_REGEX_CHAR_T #ifdef BOOST_REGEX_INSTANTIATE # undef BOOST_REGEX_INSTANTIATE #endif #ifndef BOOST_NO_WREGEX #define BOOST_REGEX_CHAR_T wchar_t #ifdef BOOST_REGEX_WIDE_INSTANTIATE # define BOOST_REGEX_INSTANTIATE #endif #include #undef BOOST_REGEX_CHAR_T #ifdef BOOST_REGEX_INSTANTIATE # undef BOOST_REGEX_INSTANTIATE #endif #endif #if !defined(BOOST_NO_WREGEX) && defined(BOOST_REGEX_HAS_OTHER_WCHAR_T) #define BOOST_REGEX_CHAR_T unsigned short #ifdef BOOST_REGEX_US_INSTANTIATE # define BOOST_REGEX_INSTANTIATE #endif #include #undef BOOST_REGEX_CHAR_T #ifdef BOOST_REGEX_INSTANTIATE # undef BOOST_REGEX_INSTANTIATE #endif #endif namespace boost{ #ifdef BOOST_REGEX_NO_FWD typedef basic_regex > regex; #ifndef BOOST_NO_WREGEX typedef basic_regex > wregex; #endif #endif typedef match_results cmatch; typedef match_results smatch; #ifndef BOOST_NO_WREGEX typedef match_results wcmatch; typedef match_results wsmatch; #endif } // namespace boost #ifndef BOOST_REGEX_MATCH_HPP #include #endif #ifndef BOOST_REGEX_V4_REGEX_SEARCH_HPP #include #endif #ifndef BOOST_REGEX_ITERATOR_HPP #include #endif #ifndef BOOST_REGEX_TOKEN_ITERATOR_HPP #include #endif #ifndef BOOST_REGEX_V4_REGEX_GREP_HPP #include #endif #ifndef BOOST_REGEX_V4_REGEX_REPLACE_HPP #include #endif #ifndef BOOST_REGEX_V4_REGEX_MERGE_HPP #include #endif #ifndef BOOST_REGEX_SPLIT_HPP #include #endif #endif // __cplusplus #endif // include passenger-4.0.37/ext/boost/regex/v4/regex_format.hpp000644 000765 000024 00000102370 12233035540 023003 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2009 John Maddock * Copyright 2008 Eric Niebler. * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_format.hpp * VERSION see * DESCRIPTION: Provides formatting output routines for search and replace * operations. Note this is an internal header file included * by regex.hpp, do not include on its own. */ #ifndef BOOST_REGEX_FORMAT_HPP #define BOOST_REGEX_FORMAT_HPP #include #include #include #include #include #include #include #include #include #include #ifndef BOOST_NO_SFINAE #include #endif #include namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif // // Forward declaration: // template >::allocator_type > class match_results; namespace re_detail{ // // struct trivial_format_traits: // defines minimum localisation support for formatting // in the case that the actual regex traits is unavailable. // template struct trivial_format_traits { typedef charT char_type; static std::ptrdiff_t length(const charT* p) { return global_length(p); } static charT tolower(charT c) { return ::boost::re_detail::global_lower(c); } static charT toupper(charT c) { return ::boost::re_detail::global_upper(c); } static int value(const charT c, int radix) { int result = global_value(c); return result >= radix ? -1 : result; } int toi(const charT*& p1, const charT* p2, int radix)const { return global_toi(p1, p2, radix, *this); } }; template class basic_regex_formatter { public: typedef typename traits::char_type char_type; basic_regex_formatter(OutputIterator o, const Results& r, const traits& t) : m_traits(t), m_results(r), m_out(o), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {} OutputIterator format(ForwardIter p1, ForwardIter p2, match_flag_type f); OutputIterator format(ForwardIter p1, match_flag_type f) { return format(p1, p1 + m_traits.length(p1), f); } private: typedef typename Results::value_type sub_match_type; enum output_state { output_copy, output_next_lower, output_next_upper, output_lower, output_upper, output_none }; void put(char_type c); void put(const sub_match_type& sub); void format_all(); void format_perl(); void format_escape(); void format_conditional(); void format_until_scope_end(); bool handle_perl_verb(bool have_brace); inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const mpl::false_&) { std::vector v(i, j); return (i != j) ? this->m_results.named_subexpression(&v[0], &v[0] + v.size()) : this->m_results.named_subexpression(static_cast(0), static_cast(0)); } inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const mpl::true_&) { return this->m_results.named_subexpression(i, j); } inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j) { typedef typename boost::is_convertible::type tag_type; return get_named_sub(i, j, tag_type()); } inline int get_named_sub_index(ForwardIter i, ForwardIter j, const mpl::false_&) { std::vector v(i, j); return (i != j) ? this->m_results.named_subexpression_index(&v[0], &v[0] + v.size()) : this->m_results.named_subexpression_index(static_cast(0), static_cast(0)); } inline int get_named_sub_index(ForwardIter i, ForwardIter j, const mpl::true_&) { return this->m_results.named_subexpression_index(i, j); } inline int get_named_sub_index(ForwardIter i, ForwardIter j) { typedef typename boost::is_convertible::type tag_type; return get_named_sub_index(i, j, tag_type()); } #ifdef BOOST_MSVC // msvc-8.0 issues a spurious warning on the call to std::advance here: #pragma warning(push) #pragma warning(disable:4244) #endif inline int toi(ForwardIter& i, ForwardIter j, int base, const boost::mpl::false_&) { if(i != j) { std::vector v(i, j); const char_type* start = &v[0]; const char_type* pos = start; int r = m_traits.toi(pos, &v[0] + v.size(), base); std::advance(i, pos - start); return r; } return -1; } #ifdef BOOST_MSVC #pragma warning(pop) #endif inline int toi(ForwardIter& i, ForwardIter j, int base, const boost::mpl::true_&) { return m_traits.toi(i, j, base); } inline int toi(ForwardIter& i, ForwardIter j, int base) { #if defined(_MSC_VER) && defined(__INTEL_COMPILER) && ((__INTEL_COMPILER == 9999) || (__INTEL_COMPILER == 1210)) // Workaround for Intel support issue #656654. // See also https://svn.boost.org/trac/boost/ticket/6359 return toi(i, j, base, mpl::false_()); #else typedef typename boost::is_convertible::type tag_type; return toi(i, j, base, tag_type()); #endif } const traits& m_traits; // the traits class for localised formatting operations const Results& m_results; // the match_results being used. OutputIterator m_out; // where to send output. ForwardIter m_position; // format string, current position ForwardIter m_end; // format string end match_flag_type m_flags; // format flags to use output_state m_state; // what to do with the next character output_state m_restore_state; // what state to restore to. bool m_have_conditional; // we are parsing a conditional private: basic_regex_formatter(const basic_regex_formatter&); basic_regex_formatter& operator=(const basic_regex_formatter&); }; template OutputIterator basic_regex_formatter::format(ForwardIter p1, ForwardIter p2, match_flag_type f) { m_position = p1; m_end = p2; m_flags = f; format_all(); return m_out; } template void basic_regex_formatter::format_all() { // over and over: while(m_position != m_end) { switch(*m_position) { case '&': if(m_flags & ::boost::regex_constants::format_sed) { ++m_position; put(m_results[0]); break; } put(*m_position++); break; case '\\': format_escape(); break; case '(': if(m_flags & boost::regex_constants::format_all) { ++m_position; bool have_conditional = m_have_conditional; m_have_conditional = false; format_until_scope_end(); m_have_conditional = have_conditional; if(m_position == m_end) return; BOOST_ASSERT(*m_position == static_cast(')')); ++m_position; // skip the closing ')' break; } put(*m_position); ++m_position; break; case ')': if(m_flags & boost::regex_constants::format_all) { return; } put(*m_position); ++m_position; break; case ':': if((m_flags & boost::regex_constants::format_all) && m_have_conditional) { return; } put(*m_position); ++m_position; break; case '?': if(m_flags & boost::regex_constants::format_all) { ++m_position; format_conditional(); break; } put(*m_position); ++m_position; break; case '$': if((m_flags & format_sed) == 0) { format_perl(); break; } // not a special character: BOOST_FALLTHROUGH; default: put(*m_position); ++m_position; break; } } } template void basic_regex_formatter::format_perl() { // // On entry *m_position points to a '$' character // output the information that goes with it: // BOOST_ASSERT(*m_position == '$'); // // see if this is a trailing '$': // if(++m_position == m_end) { --m_position; put(*m_position); ++m_position; return; } // // OK find out what kind it is: // bool have_brace = false; ForwardIter save_position = m_position; switch(*m_position) { case '&': ++m_position; put(this->m_results[0]); break; case '`': ++m_position; put(this->m_results.prefix()); break; case '\'': ++m_position; put(this->m_results.suffix()); break; case '$': put(*m_position++); break; case '+': if((++m_position != m_end) && (*m_position == '{')) { ForwardIter base = ++m_position; while((m_position != m_end) && (*m_position != '}')) ++m_position; if(m_position != m_end) { // Named sub-expression: put(get_named_sub(base, m_position)); ++m_position; break; } else { m_position = --base; } } put((this->m_results)[this->m_results.size() > 1 ? static_cast(this->m_results.size() - 1) : 1]); break; case '{': have_brace = true; ++m_position; BOOST_FALLTHROUGH; default: // see if we have a number: { std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end); //len = (std::min)(static_cast(2), len); int v = this->toi(m_position, m_position + len, 10); if((v < 0) || (have_brace && ((m_position == m_end) || (*m_position != '}')))) { // Look for a Perl-5.10 verb: if(!handle_perl_verb(have_brace)) { // leave the $ as is, and carry on: m_position = --save_position; put(*m_position); ++m_position; } break; } // otherwise output sub v: put(this->m_results[v]); if(have_brace) ++m_position; } } } template bool basic_regex_formatter::handle_perl_verb(bool have_brace) { // // We may have a capitalised string containing a Perl action: // static const char_type MATCH[] = { 'M', 'A', 'T', 'C', 'H' }; static const char_type PREMATCH[] = { 'P', 'R', 'E', 'M', 'A', 'T', 'C', 'H' }; static const char_type POSTMATCH[] = { 'P', 'O', 'S', 'T', 'M', 'A', 'T', 'C', 'H' }; static const char_type LAST_PAREN_MATCH[] = { 'L', 'A', 'S', 'T', '_', 'P', 'A', 'R', 'E', 'N', '_', 'M', 'A', 'T', 'C', 'H' }; static const char_type LAST_SUBMATCH_RESULT[] = { 'L', 'A', 'S', 'T', '_', 'S', 'U', 'B', 'M', 'A', 'T', 'C', 'H', '_', 'R', 'E', 'S', 'U', 'L', 'T' }; static const char_type LAST_SUBMATCH_RESULT_ALT[] = { '^', 'N' }; if(m_position == m_end) return false; if(have_brace && (*m_position == '^')) ++m_position; std::ptrdiff_t max_len = m_end - m_position; if((max_len >= 5) && std::equal(m_position, m_position + 5, MATCH)) { m_position += 5; if(have_brace) { if((m_position != m_end) && (*m_position == '}')) ++m_position; else { m_position -= 5; return false; } } put(this->m_results[0]); return true; } if((max_len >= 8) && std::equal(m_position, m_position + 8, PREMATCH)) { m_position += 8; if(have_brace) { if((m_position != m_end) && (*m_position == '}')) ++m_position; else { m_position -= 8; return false; } } put(this->m_results.prefix()); return true; } if((max_len >= 9) && std::equal(m_position, m_position + 9, POSTMATCH)) { m_position += 9; if(have_brace) { if((m_position != m_end) && (*m_position == '}')) ++m_position; else { m_position -= 9; return false; } } put(this->m_results.suffix()); return true; } if((max_len >= 16) && std::equal(m_position, m_position + 16, LAST_PAREN_MATCH)) { m_position += 16; if(have_brace) { if((m_position != m_end) && (*m_position == '}')) ++m_position; else { m_position -= 16; return false; } } put((this->m_results)[this->m_results.size() > 1 ? static_cast(this->m_results.size() - 1) : 1]); return true; } if((max_len >= 20) && std::equal(m_position, m_position + 20, LAST_SUBMATCH_RESULT)) { m_position += 20; if(have_brace) { if((m_position != m_end) && (*m_position == '}')) ++m_position; else { m_position -= 20; return false; } } put(this->m_results.get_last_closed_paren()); return true; } if((max_len >= 2) && std::equal(m_position, m_position + 2, LAST_SUBMATCH_RESULT_ALT)) { m_position += 2; if(have_brace) { if((m_position != m_end) && (*m_position == '}')) ++m_position; else { m_position -= 2; return false; } } put(this->m_results.get_last_closed_paren()); return true; } return false; } template void basic_regex_formatter::format_escape() { // skip the escape and check for trailing escape: if(++m_position == m_end) { put(static_cast('\\')); return; } // now switch on the escape type: switch(*m_position) { case 'a': put(static_cast('\a')); ++m_position; break; case 'f': put(static_cast('\f')); ++m_position; break; case 'n': put(static_cast('\n')); ++m_position; break; case 'r': put(static_cast('\r')); ++m_position; break; case 't': put(static_cast('\t')); ++m_position; break; case 'v': put(static_cast('\v')); ++m_position; break; case 'x': if(++m_position == m_end) { put(static_cast('x')); return; } // maybe have \x{ddd} if(*m_position == static_cast('{')) { ++m_position; int val = this->toi(m_position, m_end, 16); if(val < 0) { // invalid value treat everything as literals: put(static_cast('x')); put(static_cast('{')); return; } if((m_position == m_end) || (*m_position != static_cast('}'))) { --m_position; while(*m_position != static_cast('\\')) --m_position; ++m_position; put(*m_position++); return; } ++m_position; put(static_cast(val)); return; } else { std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end); len = (std::min)(static_cast(2), len); int val = this->toi(m_position, m_position + len, 16); if(val < 0) { --m_position; put(*m_position++); return; } put(static_cast(val)); } break; case 'c': if(++m_position == m_end) { --m_position; put(*m_position++); return; } put(static_cast(*m_position++ % 32)); break; case 'e': put(static_cast(27)); ++m_position; break; default: // see if we have a perl specific escape: if((m_flags & boost::regex_constants::format_sed) == 0) { bool breakout = false; switch(*m_position) { case 'l': ++m_position; m_restore_state = m_state; m_state = output_next_lower; breakout = true; break; case 'L': ++m_position; m_state = output_lower; breakout = true; break; case 'u': ++m_position; m_restore_state = m_state; m_state = output_next_upper; breakout = true; break; case 'U': ++m_position; m_state = output_upper; breakout = true; break; case 'E': ++m_position; m_state = output_copy; breakout = true; break; } if(breakout) break; } // see if we have a \n sed style backreference: std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end); len = (std::min)(static_cast(1), len); int v = this->toi(m_position, m_position+len, 10); if((v > 0) || ((v == 0) && (m_flags & ::boost::regex_constants::format_sed))) { put(m_results[v]); break; } else if(v == 0) { // octal ecape sequence: --m_position; len = ::boost::re_detail::distance(m_position, m_end); len = (std::min)(static_cast(4), len); v = this->toi(m_position, m_position + len, 8); BOOST_ASSERT(v >= 0); put(static_cast(v)); break; } // Otherwise output the character "as is": put(*m_position++); break; } } template void basic_regex_formatter::format_conditional() { if(m_position == m_end) { // oops trailing '?': put(static_cast('?')); return; } int v; if(*m_position == '{') { ForwardIter base = m_position; ++m_position; v = this->toi(m_position, m_end, 10); if(v < 0) { // Try a named subexpression: while((m_position != m_end) && (*m_position != '}')) ++m_position; v = this->get_named_sub_index(base + 1, m_position); } if((v < 0) || (*m_position != '}')) { m_position = base; // oops trailing '?': put(static_cast('?')); return; } // Skip trailing '}': ++m_position; } else { std::ptrdiff_t len = ::boost::re_detail::distance(m_position, m_end); len = (std::min)(static_cast(2), len); v = this->toi(m_position, m_position + len, 10); } if(v < 0) { // oops not a number: put(static_cast('?')); return; } // output varies depending upon whether sub-expression v matched or not: if(m_results[v].matched) { m_have_conditional = true; format_all(); m_have_conditional = false; if((m_position != m_end) && (*m_position == static_cast(':'))) { // skip the ':': ++m_position; // save output state, then turn it off: output_state saved_state = m_state; m_state = output_none; // format the rest of this scope: format_until_scope_end(); // restore output state: m_state = saved_state; } } else { // save output state, then turn it off: output_state saved_state = m_state; m_state = output_none; // format until ':' or ')': m_have_conditional = true; format_all(); m_have_conditional = false; // restore state: m_state = saved_state; if((m_position != m_end) && (*m_position == static_cast(':'))) { // skip the ':': ++m_position; // format the rest of this scope: format_until_scope_end(); } } } template void basic_regex_formatter::format_until_scope_end() { do { format_all(); if((m_position == m_end) || (*m_position == static_cast(')'))) return; put(*m_position++); }while(m_position != m_end); } template void basic_regex_formatter::put(char_type c) { // write a single character to output // according to which case translation mode we are in: switch(this->m_state) { case output_none: return; case output_next_lower: c = m_traits.tolower(c); this->m_state = m_restore_state; break; case output_next_upper: c = m_traits.toupper(c); this->m_state = m_restore_state; break; case output_lower: c = m_traits.tolower(c); break; case output_upper: c = m_traits.toupper(c); break; default: break; } *m_out = c; ++m_out; } template void basic_regex_formatter::put(const sub_match_type& sub) { typedef typename sub_match_type::iterator iterator_type; iterator_type i = sub.first; while(i != sub.second) { put(*i); ++i; } } template class string_out_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator #endif { S* out; public: string_out_iterator(S& s) : out(&s) {} string_out_iterator& operator++() { return *this; } string_out_iterator& operator++(int) { return *this; } string_out_iterator& operator*() { return *this; } string_out_iterator& operator=(typename S::value_type v) { out->append(1, v); return *this; } #ifdef BOOST_NO_STD_ITERATOR typedef std::ptrdiff_t difference_type; typedef typename S::value_type value_type; typedef value_type* pointer; typedef value_type& reference; typedef std::output_iterator_tag iterator_category; #endif }; template OutputIterator regex_format_imp(OutputIterator out, const match_results& m, ForwardIter p1, ForwardIter p2, match_flag_type flags, const traits& t ) { if(flags & regex_constants::format_literal) { return re_detail::copy(p1, p2, out); } re_detail::basic_regex_formatter< OutputIterator, match_results, traits, ForwardIter> f(out, m, t); return f.format(p1, p2, flags); } #ifndef BOOST_NO_SFINAE BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator) struct any_type { template any_type(const T&); template any_type(const T&, const U&); template any_type(const T&, const U&, const V&); }; typedef char no_type; typedef char (&unary_type)[2]; typedef char (&binary_type)[3]; typedef char (&ternary_type)[4]; no_type check_is_formatter(unary_type, binary_type, ternary_type); template unary_type check_is_formatter(T const &, binary_type, ternary_type); template binary_type check_is_formatter(unary_type, T const &, ternary_type); template binary_type check_is_formatter(T const &, U const &, ternary_type); template ternary_type check_is_formatter(unary_type, binary_type, T const &); template ternary_type check_is_formatter(T const &, binary_type, U const &); template ternary_type check_is_formatter(unary_type, T const &, U const &); template ternary_type check_is_formatter(T const &, U const &, V const &); struct unary_binary_ternary { typedef unary_type (*unary_fun)(any_type); typedef binary_type (*binary_fun)(any_type, any_type); typedef ternary_type (*ternary_fun)(any_type, any_type, any_type); operator unary_fun(); operator binary_fun(); operator ternary_fun(); }; template::value> struct formatter_wrapper : Formatter , unary_binary_ternary { formatter_wrapper(){} }; template struct formatter_wrapper : unary_binary_ternary { operator Formatter *(); }; template struct formatter_wrapper : unary_binary_ternary { operator Formatter *(); }; template struct format_traits_imp { private: // // F must be a pointer, a function, or a class with a function call operator: // BOOST_STATIC_ASSERT((::boost::is_pointer::value || ::boost::is_function::value || ::boost::is_class::value)); static formatter_wrapper::type> f; static M m; static O out; static boost::regex_constants::match_flag_type flags; public: BOOST_STATIC_CONSTANT(int, value = sizeof(check_is_formatter(f(m), f(m, out), f(m, out, flags)))); }; template struct format_traits { public: // // Type is mpl::int_ where N is one of: // // 0 : F is a pointer to a presumably null-terminated string. // 1 : F is a character-container such as a std::string. // 2 : F is a Unary Functor. // 3 : F is a Binary Functor. // 4 : F is a Ternary Functor. // typedef typename boost::mpl::if_< boost::mpl::and_, boost::mpl::not_::type> > >, boost::mpl::int_<0>, typename boost::mpl::if_< has_const_iterator, boost::mpl::int_<1>, boost::mpl::int_::value> >::type >::type type; // // This static assertion will fail if the functor passed does not accept // the same type of arguments passed. // BOOST_STATIC_ASSERT( boost::is_class::value && !has_const_iterator::value ? (type::value > 1) : true); }; #else // BOOST_NO_SFINAE template struct format_traits { public: // // Type is mpl::int_ where N is one of: // // 0 : F is a pointer to a presumably null-terminated string. // 1 : F is a character-container such as a std::string. // // Other options such as F being a Functor are not supported without // SFINAE support. // typedef typename boost::mpl::if_< boost::is_pointer, boost::mpl::int_<0>, boost::mpl::int_<1> >::type type; }; #endif // BOOST_NO_SFINAE template struct format_functor3 { format_functor3(Base b) : func(b) {} template OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f) { return boost::unwrap_ref(func)(m, i, f); } template OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&) { return (*this)(m, i, f); } private: Base func; format_functor3(const format_functor3&); format_functor3& operator=(const format_functor3&); }; template struct format_functor2 { format_functor2(Base b) : func(b) {} template OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/) { return boost::unwrap_ref(func)(m, i); } template OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&) { return (*this)(m, i, f); } private: Base func; format_functor2(const format_functor2&); format_functor2& operator=(const format_functor2&); }; template struct format_functor1 { format_functor1(Base b) : func(b) {} template OutputIter do_format_string(const S& s, OutputIter i) { return re_detail::copy(s.begin(), s.end(), i); } template inline OutputIter do_format_string(const S* s, OutputIter i) { while(s && *s) { *i = *s; ++i; ++s; } return i; } template OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/) { return do_format_string(boost::unwrap_ref(func)(m), i); } template OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&) { return (*this)(m, i, f); } private: Base func; format_functor1(const format_functor1&); format_functor1& operator=(const format_functor1&); }; template struct format_functor_c_string { format_functor_c_string(const charT* ps) : func(ps) {} template OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits()) { //typedef typename Match::char_type char_type; const charT* end = func; while(*end) ++end; return regex_format_imp(i, m, func, end, f, t); } private: const charT* func; format_functor_c_string(const format_functor_c_string&); format_functor_c_string& operator=(const format_functor_c_string&); }; template struct format_functor_container { format_functor_container(const Container& c) : func(c) {} template OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits()) { //typedef typename Match::char_type char_type; return re_detail::regex_format_imp(i, m, func.begin(), func.end(), f, t); } private: const Container& func; format_functor_container(const format_functor_container&); format_functor_container& operator=(const format_functor_container&); }; template > struct compute_functor_type { typedef typename format_traits::type tag; typedef typename boost::remove_cv< typename boost::remove_pointer::type>::type maybe_char_type; typedef typename mpl::if_< ::boost::is_same >, format_functor_c_string, typename mpl::if_< ::boost::is_same >, format_functor_container, typename mpl::if_< ::boost::is_same >, format_functor1, typename mpl::if_< ::boost::is_same >, format_functor2, format_functor3 >::type >::type >::type >::type type; }; } // namespace re_detail template inline OutputIterator regex_format(OutputIterator out, const match_results& m, Functor fmt, match_flag_type flags = format_all ) { return m.format(out, fmt, flags); } template inline std::basic_string::char_type> regex_format(const match_results& m, Functor fmt, match_flag_type flags = format_all) { return m.format(fmt, flags); } #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #endif // BOOST_REGEX_FORMAT_HPP passenger-4.0.37/ext/boost/regex/v4/regex_fwd.hpp000644 000765 000024 00000003156 12233035540 022275 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_fwd.cpp * VERSION see * DESCRIPTION: Forward declares boost::basic_regex<> and * associated typedefs. */ #ifndef BOOST_REGEX_FWD_HPP_INCLUDED #define BOOST_REGEX_FWD_HPP_INCLUDED #ifndef BOOST_REGEX_CONFIG_HPP #include #endif // // define BOOST_REGEX_NO_FWD if this // header doesn't work! // #ifdef BOOST_REGEX_NO_FWD # ifndef BOOST_RE_REGEX_HPP # include # endif #else namespace boost{ template class cpp_regex_traits; template struct c_regex_traits; template class w32_regex_traits; #ifdef BOOST_REGEX_USE_WIN32_LOCALE template > struct regex_traits; #elif defined(BOOST_REGEX_USE_CPP_LOCALE) template > struct regex_traits; #else template > struct regex_traits; #endif template > class basic_regex; typedef basic_regex > regex; #ifndef BOOST_NO_WREGEX typedef basic_regex > wregex; #endif } // namespace boost #endif // BOOST_REGEX_NO_FWD #endif passenger-4.0.37/ext/boost/regex/v4/regex_grep.hpp000644 000765 000024 00000011403 12233035540 022444 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_grep.hpp * VERSION see * DESCRIPTION: Provides regex_grep implementation. */ #ifndef BOOST_REGEX_V4_REGEX_GREP_HPP #define BOOST_REGEX_V4_REGEX_GREP_HPP namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif // // regex_grep: // find all non-overlapping matches within the sequence first last: // template inline unsigned int regex_grep(Predicate foo, BidiIterator first, BidiIterator last, const basic_regex& e, match_flag_type flags = match_default) { if(e.flags() & regex_constants::failbit) return false; typedef typename match_results::allocator_type match_allocator_type; match_results m; re_detail::perl_matcher matcher(first, last, m, e, flags, first); unsigned int count = 0; while(matcher.find()) { ++count; if(0 == foo(m)) return count; // caller doesn't want to go on if(m[0].second == last) return count; // we've reached the end, don't try and find an extra null match. if(m.length() == 0) { if(m[0].second == last) return count; // we found a NULL-match, now try to find // a non-NULL one at the same position: match_results m2(m); matcher.setf(match_not_null | match_continuous); if(matcher.find()) { ++count; if(0 == foo(m)) return count; } else { // reset match back to where it was: m = m2; } matcher.unsetf((match_not_null | match_continuous) & ~flags); } } return count; } // // regex_grep convenience interfaces: #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING // // this isn't really a partial specialisation, but template function // overloading - if the compiler doesn't support partial specialisation // then it really won't support this either: template inline unsigned int regex_grep(Predicate foo, const charT* str, const basic_regex& e, match_flag_type flags = match_default) { return regex_grep(foo, str, str + traits::length(str), e, flags); } template inline unsigned int regex_grep(Predicate foo, const std::basic_string& s, const basic_regex& e, match_flag_type flags = match_default) { return regex_grep(foo, s.begin(), s.end(), e, flags); } #else // partial specialisation inline unsigned int regex_grep(bool (*foo)(const cmatch&), const char* str, const regex& e, match_flag_type flags = match_default) { return regex_grep(foo, str, str + regex::traits_type::length(str), e, flags); } #ifndef BOOST_NO_WREGEX inline unsigned int regex_grep(bool (*foo)(const wcmatch&), const wchar_t* str, const wregex& e, match_flag_type flags = match_default) { return regex_grep(foo, str, str + wregex::traits_type::length(str), e, flags); } #endif inline unsigned int regex_grep(bool (*foo)(const match_results&), const std::string& s, const regex& e, match_flag_type flags = match_default) { return regex_grep(foo, s.begin(), s.end(), e, flags); } #if !defined(BOOST_NO_WREGEX) inline unsigned int regex_grep(bool (*foo)(const match_results::const_iterator>&), const std::basic_string& s, const wregex& e, match_flag_type flags = match_default) { return regex_grep(foo, s.begin(), s.end(), e, flags); } #endif #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #endif // BOOST_REGEX_V4_REGEX_GREP_HPP passenger-4.0.37/ext/boost/regex/v4/regex_iterator.hpp000644 000765 000024 00000014755 12233035540 023355 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2003 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_iterator.hpp * VERSION see * DESCRIPTION: Provides regex_iterator implementation. */ #ifndef BOOST_REGEX_V4_REGEX_ITERATOR_HPP #define BOOST_REGEX_V4_REGEX_ITERATOR_HPP #include namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif template class regex_iterator_implementation { typedef basic_regex regex_type; match_results what; // current match BidirectionalIterator base; // start of sequence BidirectionalIterator end; // end of sequence const regex_type re; // the expression match_flag_type flags; // flags for matching public: regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f) : base(), end(last), re(*p), flags(f){} bool init(BidirectionalIterator first) { base = first; return regex_search(first, end, what, re, flags); } bool compare(const regex_iterator_implementation& that) { if(this == &that) return true; return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); } const match_results& get() { return what; } bool next() { //if(what.prefix().first != what[0].second) // flags |= match_prev_avail; BidirectionalIterator next_start = what[0].second; match_flag_type f(flags); if(!what.length() || (f & regex_constants::match_posix)) f |= regex_constants::match_not_initial_null; //if(base != next_start) // f |= regex_constants::match_not_bob; bool result = regex_search(next_start, end, what, re, f, base); if(result) what.set_base(base); return result; } private: regex_iterator_implementation& operator=(const regex_iterator_implementation&); }; template ::value_type, class traits = regex_traits > class regex_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< std::forward_iterator_tag, match_results, typename re_detail::regex_iterator_traits::difference_type, const match_results*, const match_results& > #endif { private: typedef regex_iterator_implementation impl; typedef shared_ptr pimpl; public: typedef basic_regex regex_type; typedef match_results value_type; typedef typename re_detail::regex_iterator_traits::difference_type difference_type; typedef const value_type* pointer; typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; regex_iterator(){} regex_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, match_flag_type m = match_default) : pdata(new impl(&re, b, m)) { if(!pdata->init(a)) { pdata.reset(); } } regex_iterator(const regex_iterator& that) : pdata(that.pdata) {} regex_iterator& operator=(const regex_iterator& that) { pdata = that.pdata; return *this; } bool operator==(const regex_iterator& that)const { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); return pdata->compare(*(that.pdata.get())); } bool operator!=(const regex_iterator& that)const { return !(*this == that); } const value_type& operator*()const { return pdata->get(); } const value_type* operator->()const { return &(pdata->get()); } regex_iterator& operator++() { cow(); if(0 == pdata->next()) { pdata.reset(); } return *this; } regex_iterator operator++(int) { regex_iterator result(*this); ++(*this); return result; } private: pimpl pdata; void cow() { // copy-on-write if(pdata.get() && !pdata.unique()) { pdata.reset(new impl(*(pdata.get()))); } } }; typedef regex_iterator cregex_iterator; typedef regex_iterator sregex_iterator; #ifndef BOOST_NO_WREGEX typedef regex_iterator wcregex_iterator; typedef regex_iterator wsregex_iterator; #endif // make_regex_iterator: template inline regex_iterator make_regex_iterator(const charT* p, const basic_regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return regex_iterator(p, p+traits::length(p), e, m); } template inline regex_iterator::const_iterator, charT, traits> make_regex_iterator(const std::basic_string& p, const basic_regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return regex_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, m); } #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #endif // BOOST_REGEX_V4_REGEX_ITERATOR_HPP passenger-4.0.37/ext/boost/regex/v4/regex_match.hpp000644 000765 000024 00000034177 12233035540 022620 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_match.hpp * VERSION see * DESCRIPTION: Regular expression matching algorithms. * Note this is an internal header file included * by regex.hpp, do not include on its own. */ #ifndef BOOST_REGEX_MATCH_HPP #define BOOST_REGEX_MATCH_HPP namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif // // proc regex_match // returns true if the specified regular expression matches // the whole of the input. Fills in what matched in m. // template bool regex_match(BidiIterator first, BidiIterator last, match_results& m, const basic_regex& e, match_flag_type flags = match_default) { re_detail::perl_matcher matcher(first, last, m, e, flags, first); return matcher.match(); } template bool regex_match(iterator first, iterator last, const basic_regex& e, match_flag_type flags = match_default) { match_results m; return regex_match(first, last, m, e, flags | regex_constants::match_any); } // // query_match convenience interfaces: #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING // // this isn't really a partial specialisation, but template function // overloading - if the compiler doesn't support partial specialisation // then it really won't support this either: template inline bool regex_match(const charT* str, match_results& m, const basic_regex& e, match_flag_type flags = match_default) { return regex_match(str, str + traits::length(str), m, e, flags); } template inline bool regex_match(const std::basic_string& s, match_results::const_iterator, Allocator>& m, const basic_regex& e, match_flag_type flags = match_default) { return regex_match(s.begin(), s.end(), m, e, flags); } template inline bool regex_match(const charT* str, const basic_regex& e, match_flag_type flags = match_default) { match_results m; return regex_match(str, str + traits::length(str), m, e, flags | regex_constants::match_any); } template inline bool regex_match(const std::basic_string& s, const basic_regex& e, match_flag_type flags = match_default) { typedef typename std::basic_string::const_iterator iterator; match_results m; return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any); } #else // partial ordering inline bool regex_match(const char* str, cmatch& m, const regex& e, match_flag_type flags = match_default) { return regex_match(str, str + regex::traits_type::length(str), m, e, flags); } inline bool regex_match(const char* str, const regex& e, match_flag_type flags = match_default) { match_results m; return regex_match(str, str + regex::traits_type::length(str), m, e, flags | regex_constants::match_any); } #ifndef BOOST_NO_STD_LOCALE inline bool regex_match(const char* str, cmatch& m, const basic_regex >& e, match_flag_type flags = match_default) { return regex_match(str, str + regex::traits_type::length(str), m, e, flags); } inline bool regex_match(const char* str, const basic_regex >& e, match_flag_type flags = match_default) { match_results m; return regex_match(str, str + regex::traits_type::length(str), m, e, flags | regex_constants::match_any); } #endif inline bool regex_match(const char* str, cmatch& m, const basic_regex >& e, match_flag_type flags = match_default) { return regex_match(str, str + regex::traits_type::length(str), m, e, flags); } inline bool regex_match(const char* str, const basic_regex >& e, match_flag_type flags = match_default) { match_results m; return regex_match(str, str + regex::traits_type::length(str), m, e, flags | regex_constants::match_any); } #if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) inline bool regex_match(const char* str, cmatch& m, const basic_regex >& e, match_flag_type flags = match_default) { return regex_match(str, str + regex::traits_type::length(str), m, e, flags); } inline bool regex_match(const char* str, const basic_regex >& e, match_flag_type flags = match_default) { match_results m; return regex_match(str, str + regex::traits_type::length(str), m, e, flags | regex_constants::match_any); } #endif #ifndef BOOST_NO_WREGEX inline bool regex_match(const wchar_t* str, wcmatch& m, const wregex& e, match_flag_type flags = match_default) { return regex_match(str, str + wregex::traits_type::length(str), m, e, flags); } inline bool regex_match(const wchar_t* str, const wregex& e, match_flag_type flags = match_default) { match_results m; return regex_match(str, str + wregex::traits_type::length(str), m, e, flags | regex_constants::match_any); } #ifndef BOOST_NO_STD_LOCALE inline bool regex_match(const wchar_t* str, wcmatch& m, const basic_regex >& e, match_flag_type flags = match_default) { return regex_match(str, str + wregex::traits_type::length(str), m, e, flags); } inline bool regex_match(const wchar_t* str, const basic_regex >& e, match_flag_type flags = match_default) { match_results m; return regex_match(str, str + wregex::traits_type::length(str), m, e, flags | regex_constants::match_any); } #endif inline bool regex_match(const wchar_t* str, wcmatch& m, const basic_regex >& e, match_flag_type flags = match_default) { return regex_match(str, str + wregex::traits_type::length(str), m, e, flags); } inline bool regex_match(const wchar_t* str, const basic_regex >& e, match_flag_type flags = match_default) { match_results m; return regex_match(str, str + wregex::traits_type::length(str), m, e, flags | regex_constants::match_any); } #if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) inline bool regex_match(const wchar_t* str, wcmatch& m, const basic_regex >& e, match_flag_type flags = match_default) { return regex_match(str, str + wregex::traits_type::length(str), m, e, flags); } inline bool regex_match(const wchar_t* str, const basic_regex >& e, match_flag_type flags = match_default) { match_results m; return regex_match(str, str + wregex::traits_type::length(str), m, e, flags | regex_constants::match_any); } #endif #endif inline bool regex_match(const std::string& s, smatch& m, const regex& e, match_flag_type flags = match_default) { return regex_match(s.begin(), s.end(), m, e, flags); } inline bool regex_match(const std::string& s, const regex& e, match_flag_type flags = match_default) { match_results m; return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any); } #ifndef BOOST_NO_STD_LOCALE inline bool regex_match(const std::string& s, smatch& m, const basic_regex >& e, match_flag_type flags = match_default) { return regex_match(s.begin(), s.end(), m, e, flags); } inline bool regex_match(const std::string& s, const basic_regex >& e, match_flag_type flags = match_default) { match_results m; return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any); } #endif inline bool regex_match(const std::string& s, smatch& m, const basic_regex >& e, match_flag_type flags = match_default) { return regex_match(s.begin(), s.end(), m, e, flags); } inline bool regex_match(const std::string& s, const basic_regex >& e, match_flag_type flags = match_default) { match_results m; return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any); } #if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) inline bool regex_match(const std::string& s, smatch& m, const basic_regex >& e, match_flag_type flags = match_default) { return regex_match(s.begin(), s.end(), m, e, flags); } inline bool regex_match(const std::string& s, const basic_regex >& e, match_flag_type flags = match_default) { match_results m; return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any); } #endif #if !defined(BOOST_NO_WREGEX) inline bool regex_match(const std::basic_string& s, match_results::const_iterator>& m, const wregex& e, match_flag_type flags = match_default) { return regex_match(s.begin(), s.end(), m, e, flags); } inline bool regex_match(const std::basic_string& s, const wregex& e, match_flag_type flags = match_default) { match_results::const_iterator> m; return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any); } #ifndef BOOST_NO_STD_LOCALE inline bool regex_match(const std::basic_string& s, match_results::const_iterator>& m, const basic_regex >& e, match_flag_type flags = match_default) { return regex_match(s.begin(), s.end(), m, e, flags); } inline bool regex_match(const std::basic_string& s, const basic_regex >& e, match_flag_type flags = match_default) { match_results::const_iterator> m; return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any); } #endif inline bool regex_match(const std::basic_string& s, match_results::const_iterator>& m, const basic_regex >& e, match_flag_type flags = match_default) { return regex_match(s.begin(), s.end(), m, e, flags); } inline bool regex_match(const std::basic_string& s, const basic_regex >& e, match_flag_type flags = match_default) { match_results::const_iterator> m; return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any); } #if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) inline bool regex_match(const std::basic_string& s, match_results::const_iterator>& m, const basic_regex >& e, match_flag_type flags = match_default) { return regex_match(s.begin(), s.end(), m, e, flags); } inline bool regex_match(const std::basic_string& s, const basic_regex >& e, match_flag_type flags = match_default) { match_results::const_iterator> m; return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any); } #endif #endif #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #endif // BOOST_REGEX_MATCH_HPP passenger-4.0.37/ext/boost/regex/v4/regex_merge.hpp000644 000765 000024 00000005315 12233035540 022613 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_format.hpp * VERSION see * DESCRIPTION: Provides formatting output routines for search and replace * operations. Note this is an internal header file included * by regex.hpp, do not include on its own. */ #ifndef BOOST_REGEX_V4_REGEX_MERGE_HPP #define BOOST_REGEX_V4_REGEX_MERGE_HPP namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif template inline OutputIterator regex_merge(OutputIterator out, Iterator first, Iterator last, const basic_regex& e, const charT* fmt, match_flag_type flags = match_default) { return regex_replace(out, first, last, e, fmt, flags); } template inline OutputIterator regex_merge(OutputIterator out, Iterator first, Iterator last, const basic_regex& e, const std::basic_string& fmt, match_flag_type flags = match_default) { return regex_merge(out, first, last, e, fmt.c_str(), flags); } template inline std::basic_string regex_merge(const std::basic_string& s, const basic_regex& e, const charT* fmt, match_flag_type flags = match_default) { return regex_replace(s, e, fmt, flags); } template inline std::basic_string regex_merge(const std::basic_string& s, const basic_regex& e, const std::basic_string& fmt, match_flag_type flags = match_default) { return regex_replace(s, e, fmt, flags); } #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #endif // BOOST_REGEX_V4_REGEX_MERGE_HPP passenger-4.0.37/ext/boost/regex/v4/regex_raw_buffer.hpp000644 000765 000024 00000007066 12233035540 023643 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_raw_buffer.hpp * VERSION see * DESCRIPTION: Raw character buffer for regex code. * Note this is an internal header file included * by regex.hpp, do not include on its own. */ #ifndef BOOST_REGEX_RAW_BUFFER_HPP #define BOOST_REGEX_RAW_BUFFER_HPP #ifndef BOOST_REGEX_CONFIG_HPP #include #endif #include #include namespace boost{ namespace re_detail{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif struct empty_padding{}; union padding { void* p; unsigned int i; }; template struct padding3 { enum{ padding_size = 8, padding_mask = 7 }; }; template<> struct padding3<2> { enum{ padding_size = 2, padding_mask = 1 }; }; template<> struct padding3<4> { enum{ padding_size = 4, padding_mask = 3 }; }; template<> struct padding3<8> { enum{ padding_size = 8, padding_mask = 7 }; }; template<> struct padding3<16> { enum{ padding_size = 16, padding_mask = 15 }; }; enum{ padding_size = padding3::padding_size, padding_mask = padding3::padding_mask }; // // class raw_storage // basically this is a simplified vector // this is used by basic_regex for expression storage // class BOOST_REGEX_DECL raw_storage { public: typedef std::size_t size_type; typedef unsigned char* pointer; private: pointer last, start, end; public: raw_storage(); raw_storage(size_type n); ~raw_storage() { ::operator delete(start); } void BOOST_REGEX_CALL resize(size_type n); void* BOOST_REGEX_CALL extend(size_type n) { if(size_type(last - end) < n) resize(n + (end - start)); register pointer result = end; end += n; return result; } void* BOOST_REGEX_CALL insert(size_type pos, size_type n); size_type BOOST_REGEX_CALL size() { return end - start; } size_type BOOST_REGEX_CALL capacity() { return last - start; } void* BOOST_REGEX_CALL data()const { return start; } size_type BOOST_REGEX_CALL index(void* ptr) { return static_cast(ptr) - static_cast(data()); } void BOOST_REGEX_CALL clear() { end = start; } void BOOST_REGEX_CALL align() { // move end up to a boundary: end = start + (((end - start) + padding_mask) & ~padding_mask); } void swap(raw_storage& that) { std::swap(start, that.start); std::swap(end, that.end); std::swap(last, that.last); } }; inline raw_storage::raw_storage() { last = start = end = 0; } inline raw_storage::raw_storage(size_type n) { start = end = static_cast(::operator new(n)); BOOST_REGEX_NOEH_ASSERT(start) last = start + n; } #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace re_detail } // namespace boost #endif passenger-4.0.37/ext/boost/regex/v4/regex_replace.hpp000644 000765 000024 00000005475 12233035540 023136 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2009 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_format.hpp * VERSION see * DESCRIPTION: Provides formatting output routines for search and replace * operations. Note this is an internal header file included * by regex.hpp, do not include on its own. */ #ifndef BOOST_REGEX_V4_REGEX_REPLACE_HPP #define BOOST_REGEX_V4_REGEX_REPLACE_HPP namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif template OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex& e, Formatter fmt, match_flag_type flags = match_default) { regex_iterator i(first, last, e, flags); regex_iterator j; if(i == j) { if(!(flags & regex_constants::format_no_copy)) out = re_detail::copy(first, last, out); } else { BidirectionalIterator last_m(first); while(i != j) { if(!(flags & regex_constants::format_no_copy)) out = re_detail::copy(i->prefix().first, i->prefix().second, out); out = i->format(out, fmt, flags, e); last_m = (*i)[0].second; if(flags & regex_constants::format_first_only) break; ++i; } if(!(flags & regex_constants::format_no_copy)) out = re_detail::copy(last_m, last, out); } return out; } template std::basic_string regex_replace(const std::basic_string& s, const basic_regex& e, Formatter fmt, match_flag_type flags = match_default) { std::basic_string result; re_detail::string_out_iterator > i(result); regex_replace(i, s.begin(), s.end(), e, fmt, flags); return result; } #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #endif // BOOST_REGEX_V4_REGEX_REPLACE_HPP passenger-4.0.37/ext/boost/regex/v4/regex_search.hpp000644 000765 000024 00000015641 12233035540 022764 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_search.hpp * VERSION see * DESCRIPTION: Provides regex_search implementation. */ #ifndef BOOST_REGEX_V4_REGEX_SEARCH_HPP #define BOOST_REGEX_V4_REGEX_SEARCH_HPP namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif template bool regex_search(BidiIterator first, BidiIterator last, match_results& m, const basic_regex& e, match_flag_type flags = match_default) { return regex_search(first, last, m, e, flags, first); } template bool regex_search(BidiIterator first, BidiIterator last, match_results& m, const basic_regex& e, match_flag_type flags, BidiIterator base) { if(e.flags() & regex_constants::failbit) return false; re_detail::perl_matcher matcher(first, last, m, e, flags, base); return matcher.find(); } // // regex_search convenience interfaces: #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING // // this isn't really a partial specialisation, but template function // overloading - if the compiler doesn't support partial specialisation // then it really won't support this either: template inline bool regex_search(const charT* str, match_results& m, const basic_regex& e, match_flag_type flags = match_default) { return regex_search(str, str + traits::length(str), m, e, flags); } template inline bool regex_search(const std::basic_string& s, match_results::const_iterator, Allocator>& m, const basic_regex& e, match_flag_type flags = match_default) { return regex_search(s.begin(), s.end(), m, e, flags); } #else // partial overloads: inline bool regex_search(const char* str, cmatch& m, const regex& e, match_flag_type flags = match_default) { return regex_search(str, str + regex::traits_type::length(str), m, e, flags); } inline bool regex_search(const char* first, const char* last, const regex& e, match_flag_type flags = match_default) { cmatch m; return regex_search(first, last, m, e, flags | regex_constants::match_any); } #ifndef BOOST_NO_WREGEX inline bool regex_search(const wchar_t* str, wcmatch& m, const wregex& e, match_flag_type flags = match_default) { return regex_search(str, str + wregex::traits_type::length(str), m, e, flags); } inline bool regex_search(const wchar_t* first, const wchar_t* last, const wregex& e, match_flag_type flags = match_default) { wcmatch m; return regex_search(first, last, m, e, flags | regex_constants::match_any); } #endif inline bool regex_search(const std::string& s, smatch& m, const regex& e, match_flag_type flags = match_default) { return regex_search(s.begin(), s.end(), m, e, flags); } #if !defined(BOOST_NO_WREGEX) inline bool regex_search(const std::basic_string& s, wsmatch& m, const wregex& e, match_flag_type flags = match_default) { return regex_search(s.begin(), s.end(), m, e, flags); } #endif #endif template bool regex_search(BidiIterator first, BidiIterator last, const basic_regex& e, match_flag_type flags = match_default) { if(e.flags() & regex_constants::failbit) return false; match_results m; typedef typename match_results::allocator_type match_alloc_type; re_detail::perl_matcher matcher(first, last, m, e, flags | regex_constants::match_any, first); return matcher.find(); } #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template inline bool regex_search(const charT* str, const basic_regex& e, match_flag_type flags = match_default) { return regex_search(str, str + traits::length(str), e, flags); } template inline bool regex_search(const std::basic_string& s, const basic_regex& e, match_flag_type flags = match_default) { return regex_search(s.begin(), s.end(), e, flags); } #else // non-template function overloads inline bool regex_search(const char* str, const regex& e, match_flag_type flags = match_default) { cmatch m; return regex_search(str, str + regex::traits_type::length(str), m, e, flags | regex_constants::match_any); } #ifndef BOOST_NO_WREGEX inline bool regex_search(const wchar_t* str, const wregex& e, match_flag_type flags = match_default) { wcmatch m; return regex_search(str, str + wregex::traits_type::length(str), m, e, flags | regex_constants::match_any); } #endif inline bool regex_search(const std::string& s, const regex& e, match_flag_type flags = match_default) { smatch m; return regex_search(s.begin(), s.end(), m, e, flags | regex_constants::match_any); } #if !defined(BOOST_NO_WREGEX) inline bool regex_search(const std::basic_string& s, const wregex& e, match_flag_type flags = match_default) { wsmatch m; return regex_search(s.begin(), s.end(), m, e, flags | regex_constants::match_any); } #endif // BOOST_NO_WREGEX #endif // partial overload #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #endif // BOOST_REGEX_V4_REGEX_SEARCH_HPP passenger-4.0.37/ext/boost/regex/v4/regex_split.hpp000644 000765 000024 00000011422 12233035540 022643 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_split.hpp * VERSION see * DESCRIPTION: Implements regex_split and associated functions. * Note this is an internal header file included * by regex.hpp, do not include on its own. */ #ifndef BOOST_REGEX_SPLIT_HPP #define BOOST_REGEX_SPLIT_HPP namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4800) #endif namespace re_detail{ template const basic_regex& get_default_expression(charT) { static const charT expression_text[4] = { '\\', 's', '+', '\00', }; static const basic_regex e(expression_text); return e; } template class split_pred { typedef std::basic_string string_type; typedef typename string_type::const_iterator iterator_type; iterator_type* p_last; OutputIterator* p_out; std::size_t* p_max; std::size_t initial_max; public: split_pred(iterator_type* a, OutputIterator* b, std::size_t* c) : p_last(a), p_out(b), p_max(c), initial_max(*c) {} bool operator()(const match_results& what); }; template bool split_pred::operator() (const match_results& what) { *p_last = what[0].second; if(what.size() > 1) { // output sub-expressions only: for(unsigned i = 1; i < what.size(); ++i) { *(*p_out) = what.str(i); ++(*p_out); if(0 == --*p_max) return false; } return *p_max != 0; } else { // output $` only if it's not-null or not at the start of the input: const sub_match& sub = what[-1]; if((sub.first != sub.second) || (*p_max != initial_max)) { *(*p_out) = sub.str(); ++(*p_out); return --*p_max; } } // // initial null, do nothing: return true; } } // namespace re_detail template std::size_t regex_split(OutputIterator out, std::basic_string& s, const basic_regex& e, match_flag_type flags, std::size_t max_split) { typedef typename std::basic_string::const_iterator ci_t; //typedef typename match_results::allocator_type match_allocator; ci_t last = s.begin(); std::size_t init_size = max_split; re_detail::split_pred pred(&last, &out, &max_split); ci_t i, j; i = s.begin(); j = s.end(); regex_grep(pred, i, j, e, flags); // // if there is still input left, do a final push as long as max_split // is not exhausted, and we're not splitting sub-expressions rather // than whitespace: if(max_split && (last != s.end()) && (e.mark_count() == 1)) { *out = std::basic_string((ci_t)last, (ci_t)s.end()); ++out; last = s.end(); --max_split; } // // delete from the string everything that has been processed so far: s.erase(0, last - s.begin()); // // return the number of new records pushed: return init_size - max_split; } template inline std::size_t regex_split(OutputIterator out, std::basic_string& s, const basic_regex& e, match_flag_type flags = match_default) { return regex_split(out, s, e, flags, UINT_MAX); } template inline std::size_t regex_split(OutputIterator out, std::basic_string& s) { return regex_split(out, s, re_detail::get_default_expression(charT(0)), match_default, UINT_MAX); } #ifdef BOOST_MSVC # pragma warning(pop) #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #endif passenger-4.0.37/ext/boost/regex/v4/regex_token_iterator.hpp000644 000765 000024 00000031612 12233035540 024544 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2003 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_token_iterator.hpp * VERSION see * DESCRIPTION: Provides regex_token_iterator implementation. */ #ifndef BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP #define BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP #include #include #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) // // Borland C++ Builder 6, and Visual C++ 6, // can't cope with the array template constructor // so we have a template member that will accept any type as // argument, and then assert that is really is an array: // #include #include #endif namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #if BOOST_WORKAROUND(BOOST_MSVC, > 1300) # pragma warning(push) # pragma warning(disable:4700) #endif template class regex_token_iterator_implementation { typedef basic_regex regex_type; typedef sub_match value_type; match_results what; // current match BidirectionalIterator base; // start of search area BidirectionalIterator end; // end of search area const regex_type re; // the expression match_flag_type flags; // match flags value_type result; // the current string result int N; // the current sub-expression being enumerated std::vector subs; // the sub-expressions to enumerate public: regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, int sub, match_flag_type f) : end(last), re(*p), flags(f){ subs.push_back(sub); } regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector& v, match_flag_type f) : end(last), re(*p), flags(f), subs(v){} #if !BOOST_WORKAROUND(__HP_aCC, < 60700) #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) template regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const T& submatches, match_flag_type f) : end(last), re(*p), flags(f) { // assert that T really is an array: BOOST_STATIC_ASSERT(::boost::is_array::value); const std::size_t array_size = sizeof(T) / sizeof(submatches[0]); for(std::size_t i = 0; i < array_size; ++i) { subs.push_back(submatches[i]); } } #else template regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[CN], match_flag_type f) : end(last), re(*p), flags(f) { for(std::size_t i = 0; i < CN; ++i) { subs.push_back(submatches[i]); } } #endif #endif bool init(BidirectionalIterator first) { N = 0; base = first; if(regex_search(first, end, what, re, flags, base) == true) { N = 0; result = ((subs[N] == -1) ? what.prefix() : what[(int)subs[N]]); return true; } else if((subs[N] == -1) && (first != end)) { result.first = first; result.second = end; result.matched = (first != end); N = -1; return true; } return false; } bool compare(const regex_token_iterator_implementation& that) { if(this == &that) return true; return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (N == that.N) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); } const value_type& get() { return result; } bool next() { if(N == -1) return false; if(N+1 < (int)subs.size()) { ++N; result =((subs[N] == -1) ? what.prefix() : what[subs[N]]); return true; } //if(what.prefix().first != what[0].second) // flags |= /*match_prev_avail |*/ regex_constants::match_not_bob; BidirectionalIterator last_end(what[0].second); if(regex_search(last_end, end, what, re, ((what[0].first == what[0].second) ? flags | regex_constants::match_not_initial_null : flags), base)) { N =0; result =((subs[N] == -1) ? what.prefix() : what[subs[N]]); return true; } else if((last_end != end) && (subs[0] == -1)) { N =-1; result.first = last_end; result.second = end; result.matched = (last_end != end); return true; } return false; } private: regex_token_iterator_implementation& operator=(const regex_token_iterator_implementation&); }; template ::value_type, class traits = regex_traits > class regex_token_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< std::forward_iterator_tag, sub_match, typename re_detail::regex_iterator_traits::difference_type, const sub_match*, const sub_match& > #endif { private: typedef regex_token_iterator_implementation impl; typedef shared_ptr pimpl; public: typedef basic_regex regex_type; typedef sub_match value_type; typedef typename re_detail::regex_iterator_traits::difference_type difference_type; typedef const value_type* pointer; typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; regex_token_iterator(){} regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, int submatch = 0, match_flag_type m = match_default) : pdata(new impl(&re, b, submatch, m)) { if(!pdata->init(a)) pdata.reset(); } regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const std::vector& submatches, match_flag_type m = match_default) : pdata(new impl(&re, b, submatches, m)) { if(!pdata->init(a)) pdata.reset(); } #if !BOOST_WORKAROUND(__HP_aCC, < 60700) #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) template regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const T& submatches, match_flag_type m = match_default) : pdata(new impl(&re, b, submatches, m)) { if(!pdata->init(a)) pdata.reset(); } #else template regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const int (&submatches)[N], match_flag_type m = match_default) : pdata(new impl(&re, b, submatches, m)) { if(!pdata->init(a)) pdata.reset(); } #endif #endif regex_token_iterator(const regex_token_iterator& that) : pdata(that.pdata) {} regex_token_iterator& operator=(const regex_token_iterator& that) { pdata = that.pdata; return *this; } bool operator==(const regex_token_iterator& that)const { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); return pdata->compare(*(that.pdata.get())); } bool operator!=(const regex_token_iterator& that)const { return !(*this == that); } const value_type& operator*()const { return pdata->get(); } const value_type* operator->()const { return &(pdata->get()); } regex_token_iterator& operator++() { cow(); if(0 == pdata->next()) { pdata.reset(); } return *this; } regex_token_iterator operator++(int) { regex_token_iterator result(*this); ++(*this); return result; } private: pimpl pdata; void cow() { // copy-on-write if(pdata.get() && !pdata.unique()) { pdata.reset(new impl(*(pdata.get()))); } } }; typedef regex_token_iterator cregex_token_iterator; typedef regex_token_iterator sregex_token_iterator; #ifndef BOOST_NO_WREGEX typedef regex_token_iterator wcregex_token_iterator; typedef regex_token_iterator wsregex_token_iterator; #endif template inline regex_token_iterator make_regex_token_iterator(const charT* p, const basic_regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default) { return regex_token_iterator(p, p+traits::length(p), e, submatch, m); } template inline regex_token_iterator::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string& p, const basic_regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default) { return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); } #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) template inline regex_token_iterator make_regex_token_iterator(const charT* p, const basic_regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) { return regex_token_iterator(p, p+traits::length(p), e, submatch, m); } template inline regex_token_iterator::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string& p, const basic_regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) { return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); } #endif template inline regex_token_iterator make_regex_token_iterator(const charT* p, const basic_regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) { return regex_token_iterator(p, p+traits::length(p), e, submatch, m); } template inline regex_token_iterator::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string& p, const basic_regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) { return regex_token_iterator::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m); } #if BOOST_WORKAROUND(BOOST_MSVC, > 1300) # pragma warning(pop) #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace boost #endif // BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP passenger-4.0.37/ext/boost/regex/v4/regex_traits.hpp000644 000765 000024 00000011543 12233035540 023022 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2003 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_traits.hpp * VERSION see * DESCRIPTION: Declares regular expression traits classes. */ #ifndef BOOST_REGEX_TRAITS_HPP_INCLUDED #define BOOST_REGEX_TRAITS_HPP_INCLUDED #ifndef BOOST_REGEX_CONFIG_HPP #include #endif #ifndef BOOST_REGEX_WORKAROUND_HPP #include #endif #ifndef BOOST_REGEX_SYNTAX_TYPE_HPP #include #endif #ifndef BOOST_REGEX_ERROR_TYPE_HPP #include #endif #ifndef BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED #include #endif #ifndef BOOST_NO_STD_LOCALE # ifndef BOOST_CPP_REGEX_TRAITS_HPP_INCLUDED # include # endif #endif #if !BOOST_WORKAROUND(__BORLANDC__, < 0x560) # ifndef BOOST_C_REGEX_TRAITS_HPP_INCLUDED # include # endif #endif #if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32) # ifndef BOOST_W32_REGEX_TRAITS_HPP_INCLUDED # include # endif #endif #ifndef BOOST_REGEX_FWD_HPP_INCLUDED #include #endif #include "boost/mpl/has_xxx.hpp" #include #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ template struct regex_traits : public implementationT { regex_traits() : implementationT() {} }; // // class regex_traits_wrapper. // this is what our implementation will actually store; // it provides default implementations of the "optional" // interfaces that we support, in addition to the // required "standard" ones: // namespace re_detail{ #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__HP_aCC, < 60000) BOOST_MPL_HAS_XXX_TRAIT_DEF(boost_extensions_tag) #else template struct has_boost_extensions_tag { BOOST_STATIC_CONSTANT(bool, value = false); }; #endif template struct default_wrapper : public BaseT { typedef typename BaseT::char_type char_type; std::string error_string(::boost::regex_constants::error_type e)const { return ::boost::re_detail::get_default_error_string(e); } ::boost::regex_constants::syntax_type syntax_type(char_type c)const { return ((c & 0x7f) == c) ? get_default_syntax_type(static_cast(c)) : ::boost::regex_constants::syntax_char; } ::boost::regex_constants::escape_syntax_type escape_syntax_type(char_type c)const { return ((c & 0x7f) == c) ? get_default_escape_syntax_type(static_cast(c)) : ::boost::regex_constants::escape_type_identity; } int toi(const char_type*& p1, const char_type* p2, int radix)const { return ::boost::re_detail::global_toi(p1, p2, radix, *this); } char_type translate(char_type c, bool icase)const { return (icase ? this->translate_nocase(c) : this->translate(c)); } char_type translate(char_type c)const { return BaseT::translate(c); } char_type tolower(char_type c)const { return ::boost::re_detail::global_lower(c); } char_type toupper(char_type c)const { return ::boost::re_detail::global_upper(c); } }; template struct compute_wrapper_base { typedef BaseT type; }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__HP_aCC, < 60000) template struct compute_wrapper_base { typedef default_wrapper type; }; #else template <> struct compute_wrapper_base, false> { typedef default_wrapper > type; }; #ifndef BOOST_NO_WREGEX template <> struct compute_wrapper_base, false> { typedef default_wrapper > type; }; #endif #endif } // namespace re_detail template struct regex_traits_wrapper : public ::boost::re_detail::compute_wrapper_base< BaseT, ::boost::re_detail::has_boost_extensions_tag::value >::type { regex_traits_wrapper(){} private: regex_traits_wrapper(const regex_traits_wrapper&); regex_traits_wrapper& operator=(const regex_traits_wrapper&); }; } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif // include passenger-4.0.37/ext/boost/regex/v4/regex_traits_defaults.hpp000644 000765 000024 00000025313 12233035540 024711 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_traits_defaults.hpp * VERSION see * DESCRIPTION: Declares API's for access to regex_traits default properties. */ #ifndef BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED #define BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifndef BOOST_REGEX_SYNTAX_TYPE_HPP #include #endif #ifndef BOOST_REGEX_ERROR_TYPE_HPP #include #endif #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::strlen; } #endif namespace boost{ namespace re_detail{ // // helpers to suppress warnings: // template inline bool is_extended(charT c) { return c > 256; } inline bool is_extended(char) { return false; } BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_syntax(regex_constants::syntax_type n); BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_error_string(regex_constants::error_type n); BOOST_REGEX_DECL regex_constants::syntax_type BOOST_REGEX_CALL get_default_syntax_type(char c); BOOST_REGEX_DECL regex_constants::escape_syntax_type BOOST_REGEX_CALL get_default_escape_syntax_type(char c); // is charT c a combining character? BOOST_REGEX_DECL bool BOOST_REGEX_CALL is_combining_implementation(uint_least16_t s); template inline bool is_combining(charT c) { return (c <= static_cast(0)) ? false : ((c >= static_cast((std::numeric_limits::max)())) ? false : is_combining_implementation(static_cast(c))); } template <> inline bool is_combining(char) { return false; } template <> inline bool is_combining(signed char) { return false; } template <> inline bool is_combining(unsigned char) { return false; } #if !defined(__hpux) && !defined(__WINSCW__) // can't use WCHAR_MAX/MIN in pp-directives #ifdef _MSC_VER template<> inline bool is_combining(wchar_t c) { return is_combining_implementation(static_cast(c)); } #elif !defined(__DECCXX) && !defined(__osf__) && !defined(__OSF__) && defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) #if defined(WCHAR_MAX) && (WCHAR_MAX <= USHRT_MAX) template<> inline bool is_combining(wchar_t c) { return is_combining_implementation(static_cast(c)); } #else template<> inline bool is_combining(wchar_t c) { return (c >= (std::numeric_limits::max)()) ? false : is_combining_implementation(static_cast(c)); } #endif #endif #endif // // is a charT c a line separator? // template inline bool is_separator(charT c) { return BOOST_REGEX_MAKE_BOOL( (c == static_cast('\n')) || (c == static_cast('\r')) || (c == static_cast('\f')) || (static_cast(c) == 0x2028u) || (static_cast(c) == 0x2029u) || (static_cast(c) == 0x85u)); } template <> inline bool is_separator(char c) { return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r') || (c == '\f')); } // // get a default collating element: // BOOST_REGEX_DECL std::string BOOST_REGEX_CALL lookup_default_collate_name(const std::string& name); // // get the state_id of a character clasification, the individual // traits classes then transform that state_id into a bitmask: // template struct character_pointer_range { const charT* p1; const charT* p2; bool operator < (const character_pointer_range& r)const { return std::lexicographical_compare(p1, p2, r.p1, r.p2); } bool operator == (const character_pointer_range& r)const { // Not only do we check that the ranges are of equal size before // calling std::equal, but there is no other algorithm available: // not even a non-standard MS one. So forward to unchecked_equal // in the MS case. return ((p2 - p1) == (r.p2 - r.p1)) && re_detail::equal(p1, p2, r.p1); } }; template int get_default_class_id(const charT* p1, const charT* p2) { static const charT data[73] = { 'a', 'l', 'n', 'u', 'm', 'a', 'l', 'p', 'h', 'a', 'b', 'l', 'a', 'n', 'k', 'c', 'n', 't', 'r', 'l', 'd', 'i', 'g', 'i', 't', 'g', 'r', 'a', 'p', 'h', 'l', 'o', 'w', 'e', 'r', 'p', 'r', 'i', 'n', 't', 'p', 'u', 'n', 'c', 't', 's', 'p', 'a', 'c', 'e', 'u', 'n', 'i', 'c', 'o', 'd', 'e', 'u', 'p', 'p', 'e', 'r', 'v', 'w', 'o', 'r', 'd', 'x', 'd', 'i', 'g', 'i', 't', }; static const character_pointer_range ranges[21] = { {data+0, data+5,}, // alnum {data+5, data+10,}, // alpha {data+10, data+15,}, // blank {data+15, data+20,}, // cntrl {data+20, data+21,}, // d {data+20, data+25,}, // digit {data+25, data+30,}, // graph {data+29, data+30,}, // h {data+30, data+31,}, // l {data+30, data+35,}, // lower {data+35, data+40,}, // print {data+40, data+45,}, // punct {data+45, data+46,}, // s {data+45, data+50,}, // space {data+57, data+58,}, // u {data+50, data+57,}, // unicode {data+57, data+62,}, // upper {data+62, data+63,}, // v {data+63, data+64,}, // w {data+63, data+67,}, // word {data+67, data+73,}, // xdigit }; static const character_pointer_range* ranges_begin = ranges; static const character_pointer_range* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0])); character_pointer_range t = { p1, p2, }; const character_pointer_range* p = std::lower_bound(ranges_begin, ranges_end, t); if((p != ranges_end) && (t == *p)) return static_cast(p - ranges); return -1; } // // helper functions: // template std::ptrdiff_t global_length(const charT* p) { std::ptrdiff_t n = 0; while(*p) { ++p; ++n; } return n; } template<> inline std::ptrdiff_t global_length(const char* p) { return (std::strlen)(p); } #ifndef BOOST_NO_WREGEX template<> inline std::ptrdiff_t global_length(const wchar_t* p) { return (std::wcslen)(p); } #endif template inline charT BOOST_REGEX_CALL global_lower(charT c) { return c; } template inline charT BOOST_REGEX_CALL global_upper(charT c) { return c; } BOOST_REGEX_DECL char BOOST_REGEX_CALL do_global_lower(char c); BOOST_REGEX_DECL char BOOST_REGEX_CALL do_global_upper(char c); #ifndef BOOST_NO_WREGEX BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL do_global_lower(wchar_t c); BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL do_global_upper(wchar_t c); #endif #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL do_global_lower(unsigned short c); BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL do_global_upper(unsigned short c); #endif // // This sucks: declare template specialisations of global_lower/global_upper // that just forward to the non-template implementation functions. We do // this because there is one compiler (Compaq Tru64 C++) that doesn't seem // to differentiate between templates and non-template overloads.... // what's more, the primary template, plus all overloads have to be // defined in the same translation unit (if one is inline they all must be) // otherwise the "local template instantiation" compiler option can pick // the wrong instantiation when linking: // template<> inline char BOOST_REGEX_CALL global_lower(char c){ return do_global_lower(c); } template<> inline char BOOST_REGEX_CALL global_upper(char c){ return do_global_upper(c); } #ifndef BOOST_NO_WREGEX template<> inline wchar_t BOOST_REGEX_CALL global_lower(wchar_t c){ return do_global_lower(c); } template<> inline wchar_t BOOST_REGEX_CALL global_upper(wchar_t c){ return do_global_upper(c); } #endif #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T template<> inline unsigned short BOOST_REGEX_CALL global_lower(unsigned short c){ return do_global_lower(c); } template<> inline unsigned short BOOST_REGEX_CALL global_upper(unsigned short c){ return do_global_upper(c); } #endif template int global_value(charT c) { static const charT zero = '0'; static const charT nine = '9'; static const charT a = 'a'; static const charT f = 'f'; static const charT A = 'A'; static const charT F = 'F'; if(c > f) return -1; if(c >= a) return 10 + (c - a); if(c > F) return -1; if(c >= A) return 10 + (c - A); if(c > nine) return -1; if(c >= zero) return c - zero; return -1; } template int global_toi(const charT*& p1, const charT* p2, int radix, const traits& t) { (void)t; // warning suppression int next_value = t.value(*p1, radix); if((p1 == p2) || (next_value < 0) || (next_value >= radix)) return -1; int result = 0; while(p1 != p2) { next_value = t.value(*p1, radix); if((next_value < 0) || (next_value >= radix)) break; result *= radix; result += next_value; ++p1; } return result; } template inline const charT* get_escape_R_string() { #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable:4309 4245) #endif static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?', '|', '[', '\x0A', '\x0B', '\x0C', static_cast('\x85'), '\\', 'x', '{', '2', '0', '2', '8', '}', '\\', 'x', '{', '2', '0', '2', '9', '}', ']', ')', '\0' }; static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', '|', '[', '\x0A', '\x0B', '\x0C', static_cast('\x85'), ']', ')', '\0' }; charT c = static_cast(0x2029u); bool b = (static_cast(c) == 0x2029u); return (b ? e1 : e2); #ifdef BOOST_MSVC # pragma warning(pop) #endif } template <> inline const char* get_escape_R_string() { #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable:4309) #endif static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' }; return e2; #ifdef BOOST_MSVC # pragma warning(pop) #endif } } // re_detail } // boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/regex_workaround.hpp000644 000765 000024 00000013347 12233035540 023713 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2005 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_workarounds.cpp * VERSION see * DESCRIPTION: Declares Misc workarounds. */ #ifndef BOOST_REGEX_WORKAROUND_HPP #define BOOST_REGEX_WORKAROUND_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef BOOST_NO_STD_LOCALE # include #endif #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::sprintf; using ::strcpy; using ::strcat; using ::strlen; } #endif namespace boost{ namespace re_detail{ #ifdef BOOST_NO_STD_DISTANCE template std::ptrdiff_t distance(const T& x, const T& y) { return y - x; } #else using std::distance; #endif }} #ifdef BOOST_REGEX_NO_BOOL # define BOOST_REGEX_MAKE_BOOL(x) static_cast((x) ? true : false) #else # define BOOST_REGEX_MAKE_BOOL(x) static_cast(x) #endif /***************************************************************************** * * Fix broken broken namespace support: * ****************************************************************************/ #if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus) namespace std{ using ::ptrdiff_t; using ::size_t; using ::abs; using ::memset; using ::memcpy; } #endif /***************************************************************************** * * helper functions pointer_construct/pointer_destroy: * ****************************************************************************/ #ifdef __cplusplus namespace boost{ namespace re_detail{ #ifdef BOOST_MSVC #pragma warning (push) #pragma warning (disable : 4100) #endif template inline void pointer_destroy(T* p) { p->~T(); (void)p; } #ifdef BOOST_MSVC #pragma warning (pop) #endif template inline void pointer_construct(T* p, const T& t) { new (p) T(t); } }} // namespaces #endif /***************************************************************************** * * helper function copy: * ****************************************************************************/ #ifdef __cplusplus namespace boost{ namespace re_detail{ #if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && BOOST_WORKAROUND(BOOST_MSVC, <1600) && defined(_CPPLIB_VER) && defined(BOOST_DINKUMWARE_STDLIB) && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) // // MSVC 8 will either emit warnings or else refuse to compile // code that makes perfectly legitimate use of std::copy, when // the OutputIterator type is a user-defined class (apparently all user // defined iterators are "unsafe"). This code works around that: // template inline OutputIterator copy( InputIterator first, InputIterator last, OutputIterator dest ) { return stdext::unchecked_copy(first, last, dest); } template inline bool equal( InputIterator1 first, InputIterator1 last, InputIterator2 with ) { return stdext::unchecked_equal(first, last, with); } #elif BOOST_WORKAROUND(BOOST_MSVC, > 1500) // // MSVC 10 will either emit warnings or else refuse to compile // code that makes perfectly legitimate use of std::copy, when // the OutputIterator type is a user-defined class (apparently all user // defined iterators are "unsafe"). What's more Microsoft have removed their // non-standard "unchecked" versions, even though their still in the MS // documentation!! Work around this as best we can: // template inline OutputIterator copy( InputIterator first, InputIterator last, OutputIterator dest ) { while(first != last) *dest++ = *first++; return dest; } template inline bool equal( InputIterator1 first, InputIterator1 last, InputIterator2 with ) { while(first != last) if(*first++ != *with++) return false; return true; } #else using std::copy; using std::equal; #endif #if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ // use safe versions of strcpy etc: using ::strcpy_s; using ::strcat_s; #else inline std::size_t strcpy_s( char *strDestination, std::size_t sizeInBytes, const char *strSource ) { if(std::strlen(strSource)+1 > sizeInBytes) return 1; std::strcpy(strDestination, strSource); return 0; } inline std::size_t strcat_s( char *strDestination, std::size_t sizeInBytes, const char *strSource ) { if(std::strlen(strSource) + std::strlen(strDestination) + 1 > sizeInBytes) return 1; std::strcat(strDestination, strSource); return 0; } #endif inline void overflow_error_if_not_zero(std::size_t i) { if(i) { std::overflow_error e("String buffer too small"); boost::throw_exception(e); } } }} // namespaces #endif // __cplusplus #endif // include guard passenger-4.0.37/ext/boost/regex/v4/states.hpp000644 000765 000024 00000025752 12233035540 021634 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE states.cpp * VERSION see * DESCRIPTION: Declares internal state machine structures. */ #ifndef BOOST_REGEX_V4_STATES_HPP #define BOOST_REGEX_V4_STATES_HPP #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ namespace re_detail{ /*** mask_type ******************************************************* Whenever we have a choice of two alternatives, we use an array of bytes to indicate which of the two alternatives it is possible to take for any given input character. If mask_take is set, then we can take the next state, and if mask_skip is set then we can take the alternative. ***********************************************************************/ enum mask_type { mask_take = 1, mask_skip = 2, mask_init = 4, mask_any = mask_skip | mask_take, mask_all = mask_any }; /*** helpers ********************************************************** These helpers let us use function overload resolution to detect whether we have narrow or wide character strings: ***********************************************************************/ struct _narrow_type{}; struct _wide_type{}; template struct is_byte; template<> struct is_byte { typedef _narrow_type width_type; }; template<> struct is_byte{ typedef _narrow_type width_type; }; template<> struct is_byte { typedef _narrow_type width_type; }; template struct is_byte { typedef _wide_type width_type; }; /*** enum syntax_element_type ****************************************** Every record in the state machine falls into one of the following types: ***********************************************************************/ enum syntax_element_type { // start of a marked sub-expression, or perl-style (?...) extension syntax_element_startmark = 0, // end of a marked sub-expression, or perl-style (?...) extension syntax_element_endmark = syntax_element_startmark + 1, // any sequence of literal characters syntax_element_literal = syntax_element_endmark + 1, // start of line assertion: ^ syntax_element_start_line = syntax_element_literal + 1, // end of line assertion $ syntax_element_end_line = syntax_element_start_line + 1, // match any character: . syntax_element_wild = syntax_element_end_line + 1, // end of expression: we have a match when we get here syntax_element_match = syntax_element_wild + 1, // perl style word boundary: \b syntax_element_word_boundary = syntax_element_match + 1, // perl style within word boundary: \B syntax_element_within_word = syntax_element_word_boundary + 1, // start of word assertion: \< syntax_element_word_start = syntax_element_within_word + 1, // end of word assertion: \> syntax_element_word_end = syntax_element_word_start + 1, // start of buffer assertion: \` syntax_element_buffer_start = syntax_element_word_end + 1, // end of buffer assertion: \' syntax_element_buffer_end = syntax_element_buffer_start + 1, // backreference to previously matched sub-expression syntax_element_backref = syntax_element_buffer_end + 1, // either a wide character set [..] or one with multicharacter collating elements: syntax_element_long_set = syntax_element_backref + 1, // narrow character set: [...] syntax_element_set = syntax_element_long_set + 1, // jump to a new state in the machine: syntax_element_jump = syntax_element_set + 1, // choose between two production states: syntax_element_alt = syntax_element_jump + 1, // a repeat syntax_element_rep = syntax_element_alt + 1, // match a combining character sequence syntax_element_combining = syntax_element_rep + 1, // perl style soft buffer end: \z syntax_element_soft_buffer_end = syntax_element_combining + 1, // perl style continuation: \G syntax_element_restart_continue = syntax_element_soft_buffer_end + 1, // single character repeats: syntax_element_dot_rep = syntax_element_restart_continue + 1, syntax_element_char_rep = syntax_element_dot_rep + 1, syntax_element_short_set_rep = syntax_element_char_rep + 1, syntax_element_long_set_rep = syntax_element_short_set_rep + 1, // a backstep for lookbehind repeats: syntax_element_backstep = syntax_element_long_set_rep + 1, // an assertion that a mark was matched: syntax_element_assert_backref = syntax_element_backstep + 1, syntax_element_toggle_case = syntax_element_assert_backref + 1, // a recursive expression: syntax_element_recurse = syntax_element_toggle_case + 1 }; #ifdef BOOST_REGEX_DEBUG // dwa 09/26/00 - This is needed to suppress warnings about an ambiguous conversion std::ostream& operator<<(std::ostream&, syntax_element_type); #endif struct re_syntax_base; /*** union offset_type ************************************************ Points to another state in the machine. During machine construction we use integral offsets, but these are converted to pointers before execution of the machine. ***********************************************************************/ union offset_type { re_syntax_base* p; std::ptrdiff_t i; }; /*** struct re_syntax_base ******************************************** Base class for all states in the machine. ***********************************************************************/ struct re_syntax_base { syntax_element_type type; // what kind of state this is offset_type next; // next state in the machine }; /*** struct re_brace ************************************************** A marked parenthesis. ***********************************************************************/ struct re_brace : public re_syntax_base { // The index to match, can be zero (don't mark the sub-expression) // or negative (for perl style (?...) extentions): int index; bool icase; }; /*** struct re_dot ************************************************** Match anything. ***********************************************************************/ enum { dont_care = 1, force_not_newline = 0, force_newline = 2, test_not_newline = 2, test_newline = 3 }; struct re_dot : public re_syntax_base { unsigned char mask; }; /*** struct re_literal ************************************************ A string of literals, following this structure will be an array of characters: charT[length] ***********************************************************************/ struct re_literal : public re_syntax_base { unsigned int length; }; /*** struct re_case ************************************************ Indicates whether we are moving to a case insensive block or not ***********************************************************************/ struct re_case : public re_syntax_base { bool icase; }; /*** struct re_set_long *********************************************** A wide character set of characters, following this structure will be an array of type charT: First csingles null-terminated strings Then 2 * cranges NULL terminated strings Then cequivalents NULL terminated strings ***********************************************************************/ template struct re_set_long : public re_syntax_base { unsigned int csingles, cranges, cequivalents; mask_type cclasses; mask_type cnclasses; bool isnot; bool singleton; }; /*** struct re_set **************************************************** A set of narrow-characters, matches any of _map which is none-zero ***********************************************************************/ struct re_set : public re_syntax_base { unsigned char _map[1 << CHAR_BIT]; }; /*** struct re_jump *************************************************** Jump to a new location in the machine (not next). ***********************************************************************/ struct re_jump : public re_syntax_base { offset_type alt; // location to jump to }; /*** struct re_alt *************************************************** Jump to a new location in the machine (possibly next). ***********************************************************************/ struct re_alt : public re_jump { unsigned char _map[1 << CHAR_BIT]; // which characters can take the jump unsigned int can_be_null; // true if we match a NULL string }; /*** struct re_repeat ************************************************* Repeat a section of the machine ***********************************************************************/ struct re_repeat : public re_alt { std::size_t min, max; // min and max allowable repeats int state_id; // Unique identifier for this repeat bool leading; // True if this repeat is at the start of the machine (lets us optimize some searches) bool greedy; // True if this is a greedy repeat }; /*** struct re_recurse ************************************************ Recurse to a particular subexpression. **********************************************************************/ struct re_recurse : public re_jump { int state_id; // identifier of first nested repeat within the recursion. }; /*** enum re_jump_size_type ******************************************* Provides compiled size of re_jump structure (allowing for trailing alignment). We provide this so we know how manybytes to insert when constructing the machine (The value of padding_mask is defined in regex_raw_buffer.hpp). ***********************************************************************/ enum re_jump_size_type { re_jump_size = (sizeof(re_jump) + padding_mask) & ~(padding_mask), re_repeater_size = (sizeof(re_repeat) + padding_mask) & ~(padding_mask), re_alt_size = (sizeof(re_alt) + padding_mask) & ~(padding_mask) }; /*** proc re_is_set_member ********************************************* Forward declaration: we'll need this one later... ***********************************************************************/ template struct regex_data; template iterator BOOST_REGEX_CALL re_is_set_member(iterator next, iterator last, const re_set_long* set_, const regex_data& e, bool icase); } // namespace re_detail } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/sub_match.hpp000644 000765 000024 00000053357 12233035540 022300 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE sub_match.cpp * VERSION see * DESCRIPTION: Declares template class sub_match. */ #ifndef BOOST_REGEX_V4_SUB_MATCH_HPP #define BOOST_REGEX_V4_SUB_MATCH_HPP #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif namespace boost{ template struct sub_match : public std::pair { typedef typename re_detail::regex_iterator_traits::value_type value_type; #if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) typedef std::ptrdiff_t difference_type; #else typedef typename re_detail::regex_iterator_traits::difference_type difference_type; #endif typedef BidiIterator iterator_type; typedef BidiIterator iterator; typedef BidiIterator const_iterator; bool matched; sub_match() : std::pair(), matched(false) {} sub_match(BidiIterator i) : std::pair(i, i), matched(false) {} #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ && !BOOST_WORKAROUND(BOOST_MSVC, < 1310)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)\ && !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) template operator std::basic_string ()const { return matched ? std::basic_string(this->first, this->second) : std::basic_string(); } #else operator std::basic_string ()const { return str(); } #endif difference_type BOOST_REGEX_CALL length()const { difference_type n = matched ? ::boost::re_detail::distance((BidiIterator)this->first, (BidiIterator)this->second) : 0; return n; } std::basic_string str()const { std::basic_string result; if(matched) { std::size_t len = ::boost::re_detail::distance((BidiIterator)this->first, (BidiIterator)this->second); result.reserve(len); BidiIterator i = this->first; while(i != this->second) { result.append(1, *i); ++i; } } return result; } int compare(const sub_match& s)const { if(matched != s.matched) return static_cast(matched) - static_cast(s.matched); return str().compare(s.str()); } int compare(const std::basic_string& s)const { return str().compare(s); } int compare(const value_type* p)const { return str().compare(p); } bool operator==(const sub_match& that)const { return compare(that) == 0; } bool BOOST_REGEX_CALL operator !=(const sub_match& that)const { return compare(that) != 0; } bool operator<(const sub_match& that)const { return compare(that) < 0; } bool operator>(const sub_match& that)const { return compare(that) > 0; } bool operator<=(const sub_match& that)const { return compare(that) <= 0; } bool operator>=(const sub_match& that)const { return compare(that) >= 0; } #ifdef BOOST_REGEX_MATCH_EXTRA typedef std::vector > capture_sequence_type; const capture_sequence_type& captures()const { if(!m_captures) m_captures.reset(new capture_sequence_type()); return *m_captures; } // // Private implementation API: DO NOT USE! // capture_sequence_type& get_captures()const { if(!m_captures) m_captures.reset(new capture_sequence_type()); return *m_captures; } private: mutable boost::scoped_ptr m_captures; public: #endif sub_match(const sub_match& that, bool #ifdef BOOST_REGEX_MATCH_EXTRA deep_copy #endif = true ) : std::pair(that), matched(that.matched) { #ifdef BOOST_REGEX_MATCH_EXTRA if(that.m_captures) if(deep_copy) m_captures.reset(new capture_sequence_type(*(that.m_captures))); #endif } sub_match& operator=(const sub_match& that) { this->first = that.first; this->second = that.second; matched = that.matched; #ifdef BOOST_REGEX_MATCH_EXTRA if(that.m_captures) get_captures() = *(that.m_captures); #endif return *this; } #ifdef BOOST_OLD_REGEX_H // // the following are deprecated, do not use!! // operator int()const; operator unsigned int()const; operator short()const { return (short)(int)(*this); } operator unsigned short()const { return (unsigned short)(unsigned int)(*this); } #endif }; typedef sub_match csub_match; typedef sub_match ssub_match; #ifndef BOOST_NO_WREGEX typedef sub_match wcsub_match; typedef sub_match wssub_match; #endif // comparison to std::basic_string<> part 1: template inline bool operator == (const std::basic_string::value_type, traits, Allocator>& s, const sub_match& m) { return s.compare(m.str()) == 0; } template inline bool operator != (const std::basic_string::value_type, traits, Allocator>& s, const sub_match& m) { return s.compare(m.str()) != 0; } template inline bool operator < (const std::basic_string::value_type, traits, Allocator>& s, const sub_match& m) { return s.compare(m.str()) < 0; } template inline bool operator <= (const std::basic_string::value_type, traits, Allocator>& s, const sub_match& m) { return s.compare(m.str()) <= 0; } template inline bool operator >= (const std::basic_string::value_type, traits, Allocator>& s, const sub_match& m) { return s.compare(m.str()) >= 0; } template inline bool operator > (const std::basic_string::value_type, traits, Allocator>& s, const sub_match& m) { return s.compare(m.str()) > 0; } // comparison to std::basic_string<> part 2: template inline bool operator == (const sub_match& m, const std::basic_string::value_type, traits, Allocator>& s) { return m.str().compare(s) == 0; } template inline bool operator != (const sub_match& m, const std::basic_string::value_type, traits, Allocator>& s) { return m.str().compare(s) != 0; } template inline bool operator < (const sub_match& m, const std::basic_string::value_type, traits, Allocator>& s) { return m.str().compare(s) < 0; } template inline bool operator > (const sub_match& m, const std::basic_string::value_type, traits, Allocator>& s) { return m.str().compare(s) > 0; } template inline bool operator <= (const sub_match& m, const std::basic_string::value_type, traits, Allocator>& s) { return m.str().compare(s) <= 0; } template inline bool operator >= (const sub_match& m, const std::basic_string::value_type, traits, Allocator>& s) { return m.str().compare(s) >= 0; } // comparison to const charT* part 1: template inline bool operator == (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const* s) { return m.str().compare(s) == 0; } template inline bool operator != (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const* s) { return m.str().compare(s) != 0; } template inline bool operator > (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const* s) { return m.str().compare(s) > 0; } template inline bool operator < (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const* s) { return m.str().compare(s) < 0; } template inline bool operator >= (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const* s) { return m.str().compare(s) >= 0; } template inline bool operator <= (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const* s) { return m.str().compare(s) <= 0; } // comparison to const charT* part 2: template inline bool operator == (typename re_detail::regex_iterator_traits::value_type const* s, const sub_match& m) { return m.str().compare(s) == 0; } template inline bool operator != (typename re_detail::regex_iterator_traits::value_type const* s, const sub_match& m) { return m.str().compare(s) != 0; } template inline bool operator < (typename re_detail::regex_iterator_traits::value_type const* s, const sub_match& m) { return m.str().compare(s) > 0; } template inline bool operator > (typename re_detail::regex_iterator_traits::value_type const* s, const sub_match& m) { return m.str().compare(s) < 0; } template inline bool operator <= (typename re_detail::regex_iterator_traits::value_type const* s, const sub_match& m) { return m.str().compare(s) >= 0; } template inline bool operator >= (typename re_detail::regex_iterator_traits::value_type const* s, const sub_match& m) { return m.str().compare(s) <= 0; } // comparison to const charT& part 1: template inline bool operator == (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const& s) { return m.str().compare(0, m.length(), &s, 1) == 0; } template inline bool operator != (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const& s) { return m.str().compare(0, m.length(), &s, 1) != 0; } template inline bool operator > (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const& s) { return m.str().compare(0, m.length(), &s, 1) > 0; } template inline bool operator < (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const& s) { return m.str().compare(0, m.length(), &s, 1) < 0; } template inline bool operator >= (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const& s) { return m.str().compare(0, m.length(), &s, 1) >= 0; } template inline bool operator <= (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const& s) { return m.str().compare(0, m.length(), &s, 1) <= 0; } // comparison to const charT* part 2: template inline bool operator == (typename re_detail::regex_iterator_traits::value_type const& s, const sub_match& m) { return m.str().compare(0, m.length(), &s, 1) == 0; } template inline bool operator != (typename re_detail::regex_iterator_traits::value_type const& s, const sub_match& m) { return m.str().compare(0, m.length(), &s, 1) != 0; } template inline bool operator < (typename re_detail::regex_iterator_traits::value_type const& s, const sub_match& m) { return m.str().compare(0, m.length(), &s, 1) > 0; } template inline bool operator > (typename re_detail::regex_iterator_traits::value_type const& s, const sub_match& m) { return m.str().compare(0, m.length(), &s, 1) < 0; } template inline bool operator <= (typename re_detail::regex_iterator_traits::value_type const& s, const sub_match& m) { return m.str().compare(0, m.length(), &s, 1) >= 0; } template inline bool operator >= (typename re_detail::regex_iterator_traits::value_type const& s, const sub_match& m) { return m.str().compare(0, m.length(), &s, 1) <= 0; } // addition operators: template inline std::basic_string::value_type, traits, Allocator> operator + (const std::basic_string::value_type, traits, Allocator>& s, const sub_match& m) { std::basic_string::value_type, traits, Allocator> result; result.reserve(s.size() + m.length() + 1); return result.append(s).append(m.first, m.second); } template inline std::basic_string::value_type, traits, Allocator> operator + (const sub_match& m, const std::basic_string::value_type, traits, Allocator>& s) { std::basic_string::value_type, traits, Allocator> result; result.reserve(s.size() + m.length() + 1); return result.append(m.first, m.second).append(s); } #if !(defined(__GNUC__) && defined(BOOST_NO_STD_LOCALE)) template inline std::basic_string::value_type> operator + (typename re_detail::regex_iterator_traits::value_type const* s, const sub_match& m) { std::basic_string::value_type> result; result.reserve(std::char_traits::value_type>::length(s) + m.length() + 1); return result.append(s).append(m.first, m.second); } template inline std::basic_string::value_type> operator + (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const * s) { std::basic_string::value_type> result; result.reserve(std::char_traits::value_type>::length(s) + m.length() + 1); return result.append(m.first, m.second).append(s); } #else // worwaround versions: template inline std::basic_string::value_type> operator + (typename re_detail::regex_iterator_traits::value_type const* s, const sub_match& m) { return s + m.str(); } template inline std::basic_string::value_type> operator + (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const * s) { return m.str() + s; } #endif template inline std::basic_string::value_type> operator + (typename re_detail::regex_iterator_traits::value_type const& s, const sub_match& m) { std::basic_string::value_type> result; result.reserve(m.length() + 2); return result.append(1, s).append(m.first, m.second); } template inline std::basic_string::value_type> operator + (const sub_match& m, typename re_detail::regex_iterator_traits::value_type const& s) { std::basic_string::value_type> result; result.reserve(m.length() + 2); return result.append(m.first, m.second).append(1, s); } template inline std::basic_string::value_type> operator + (const sub_match& m1, const sub_match& m2) { std::basic_string::value_type> result; result.reserve(m1.length() + m2.length() + 1); return result.append(m1.first, m1.second).append(m2.first, m2.second); } #ifndef BOOST_NO_STD_LOCALE template std::basic_ostream& operator << (std::basic_ostream& os, const sub_match& s) { return (os << s.str()); } #else template std::ostream& operator << (std::ostream& os, const sub_match& s) { return (os << s.str()); } #endif #ifdef BOOST_OLD_REGEX_H namespace re_detail{ template int do_toi(BidiIterator i, BidiIterator j, char c, int radix) { std::string s(i, j); char* p; int result = std::strtol(s.c_str(), &p, radix); if(*p)raise_regex_exception("Bad sub-expression"); return result; } // // helper: template int do_toi(I& i, I j, charT c) { int result = 0; while((i != j) && (isdigit(*i))) { result = result*10 + (*i - '0'); ++i; } return result; } } template sub_match::operator int()const { BidiIterator i = first; BidiIterator j = second; if(i == j)raise_regex_exception("Bad sub-expression"); int neg = 1; if((i != j) && (*i == '-')) { neg = -1; ++i; } neg *= re_detail::do_toi(i, j, *i); if(i != j)raise_regex_exception("Bad sub-expression"); return neg; } template sub_match::operator unsigned int()const { BidiIterator i = first; BidiIterator j = second; if(i == j) raise_regex_exception("Bad sub-expression"); return re_detail::do_toi(i, j, *first); } #endif } // namespace boost #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/v4/syntax_type.hpp000644 000765 000024 00000010426 12233035540 022710 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2003 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE syntax_type.hpp * VERSION see * DESCRIPTION: Declares regular expression synatx type enumerator. */ #ifndef BOOST_REGEX_SYNTAX_TYPE_HPP #define BOOST_REGEX_SYNTAX_TYPE_HPP namespace boost{ namespace regex_constants{ typedef unsigned char syntax_type; // // values chosen are binary compatible with previous version: // static const syntax_type syntax_char = 0; static const syntax_type syntax_open_mark = 1; static const syntax_type syntax_close_mark = 2; static const syntax_type syntax_dollar = 3; static const syntax_type syntax_caret = 4; static const syntax_type syntax_dot = 5; static const syntax_type syntax_star = 6; static const syntax_type syntax_plus = 7; static const syntax_type syntax_question = 8; static const syntax_type syntax_open_set = 9; static const syntax_type syntax_close_set = 10; static const syntax_type syntax_or = 11; static const syntax_type syntax_escape = 12; static const syntax_type syntax_dash = 14; static const syntax_type syntax_open_brace = 15; static const syntax_type syntax_close_brace = 16; static const syntax_type syntax_digit = 17; static const syntax_type syntax_comma = 27; static const syntax_type syntax_equal = 37; static const syntax_type syntax_colon = 36; static const syntax_type syntax_not = 53; // extensions: static const syntax_type syntax_hash = 13; static const syntax_type syntax_newline = 26; // escapes: typedef syntax_type escape_syntax_type; static const escape_syntax_type escape_type_word_assert = 18; static const escape_syntax_type escape_type_not_word_assert = 19; static const escape_syntax_type escape_type_control_f = 29; static const escape_syntax_type escape_type_control_n = 30; static const escape_syntax_type escape_type_control_r = 31; static const escape_syntax_type escape_type_control_t = 32; static const escape_syntax_type escape_type_control_v = 33; static const escape_syntax_type escape_type_ascii_control = 35; static const escape_syntax_type escape_type_hex = 34; static const escape_syntax_type escape_type_unicode = 0; // not used static const escape_syntax_type escape_type_identity = 0; // not used static const escape_syntax_type escape_type_backref = syntax_digit; static const escape_syntax_type escape_type_decimal = syntax_digit; // not used static const escape_syntax_type escape_type_class = 22; static const escape_syntax_type escape_type_not_class = 23; // extensions: static const escape_syntax_type escape_type_left_word = 20; static const escape_syntax_type escape_type_right_word = 21; static const escape_syntax_type escape_type_start_buffer = 24; // for \` static const escape_syntax_type escape_type_end_buffer = 25; // for \' static const escape_syntax_type escape_type_control_a = 28; // for \a static const escape_syntax_type escape_type_e = 38; // for \e static const escape_syntax_type escape_type_E = 47; // for \Q\E static const escape_syntax_type escape_type_Q = 48; // for \Q\E static const escape_syntax_type escape_type_X = 49; // for \X static const escape_syntax_type escape_type_C = 50; // for \C static const escape_syntax_type escape_type_Z = 51; // for \Z static const escape_syntax_type escape_type_G = 52; // for \G static const escape_syntax_type escape_type_property = 54; // for \p static const escape_syntax_type escape_type_not_property = 55; // for \P static const escape_syntax_type escape_type_named_char = 56; // for \N static const escape_syntax_type escape_type_extended_backref = 57; // for \g static const escape_syntax_type escape_type_reset_start_mark = 58; // for \K static const escape_syntax_type escape_type_line_ending = 59; // for \R static const escape_syntax_type syntax_max = 60; } } #endif passenger-4.0.37/ext/boost/regex/v4/u32regex_iterator.hpp000644 000765 000024 00000015264 12233035540 023703 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2003 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE u32regex_iterator.hpp * VERSION see * DESCRIPTION: Provides u32regex_iterator implementation. */ #ifndef BOOST_REGEX_V4_U32REGEX_ITERATOR_HPP #define BOOST_REGEX_V4_U32REGEX_ITERATOR_HPP namespace boost{ #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif template class u32regex_iterator_implementation { typedef u32regex regex_type; match_results what; // current match BidirectionalIterator base; // start of sequence BidirectionalIterator end; // end of sequence const regex_type re; // the expression match_flag_type flags; // flags for matching public: u32regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f) : base(), end(last), re(*p), flags(f){} bool init(BidirectionalIterator first) { base = first; return u32regex_search(first, end, what, re, flags, base); } bool compare(const u32regex_iterator_implementation& that) { if(this == &that) return true; return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); } const match_results& get() { return what; } bool next() { //if(what.prefix().first != what[0].second) // flags |= match_prev_avail; BidirectionalIterator next_start = what[0].second; match_flag_type f(flags); if(!what.length()) f |= regex_constants::match_not_initial_null; //if(base != next_start) // f |= regex_constants::match_not_bob; bool result = u32regex_search(next_start, end, what, re, f, base); if(result) what.set_base(base); return result; } private: u32regex_iterator_implementation& operator=(const u32regex_iterator_implementation&); }; template class u32regex_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< std::forward_iterator_tag, match_results, typename re_detail::regex_iterator_traits::difference_type, const match_results*, const match_results& > #endif { private: typedef u32regex_iterator_implementation impl; typedef shared_ptr pimpl; public: typedef u32regex regex_type; typedef match_results value_type; typedef typename re_detail::regex_iterator_traits::difference_type difference_type; typedef const value_type* pointer; typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; u32regex_iterator(){} u32regex_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, match_flag_type m = match_default) : pdata(new impl(&re, b, m)) { if(!pdata->init(a)) { pdata.reset(); } } u32regex_iterator(const u32regex_iterator& that) : pdata(that.pdata) {} u32regex_iterator& operator=(const u32regex_iterator& that) { pdata = that.pdata; return *this; } bool operator==(const u32regex_iterator& that)const { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); return pdata->compare(*(that.pdata.get())); } bool operator!=(const u32regex_iterator& that)const { return !(*this == that); } const value_type& operator*()const { return pdata->get(); } const value_type* operator->()const { return &(pdata->get()); } u32regex_iterator& operator++() { cow(); if(0 == pdata->next()) { pdata.reset(); } return *this; } u32regex_iterator operator++(int) { u32regex_iterator result(*this); ++(*this); return result; } private: pimpl pdata; void cow() { // copy-on-write if(pdata.get() && !pdata.unique()) { pdata.reset(new impl(*(pdata.get()))); } } }; typedef u32regex_iterator utf8regex_iterator; typedef u32regex_iterator utf16regex_iterator; typedef u32regex_iterator utf32regex_iterator; inline u32regex_iterator make_u32regex_iterator(const char* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_iterator(p, p+std::strlen(p), e, m); } #ifndef BOOST_NO_WREGEX inline u32regex_iterator make_u32regex_iterator(const wchar_t* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_iterator(p, p+std::wcslen(p), e, m); } #endif #if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) inline u32regex_iterator make_u32regex_iterator(const UChar* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_iterator(p, p+u_strlen(p), e, m); } #endif template inline u32regex_iterator::const_iterator> make_u32regex_iterator(const std::basic_string& p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { typedef typename std::basic_string::const_iterator iter_type; return u32regex_iterator(p.begin(), p.end(), e, m); } inline u32regex_iterator make_u32regex_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_iterator(s.getBuffer(), s.getBuffer() + s.length(), e, m); } #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif } // namespace boost #endif // BOOST_REGEX_V4_REGEX_ITERATOR_HPP passenger-4.0.37/ext/boost/regex/v4/u32regex_token_iterator.hpp000644 000765 000024 00000036770 12233035540 025110 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2003 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE u32regex_token_iterator.hpp * VERSION see * DESCRIPTION: Provides u32regex_token_iterator implementation. */ #ifndef BOOST_REGEX_V4_U32REGEX_TOKEN_ITERATOR_HPP #define BOOST_REGEX_V4_U32REGEX_TOKEN_ITERATOR_HPP #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) // // Borland C++ Builder 6, and Visual C++ 6, // can't cope with the array template constructor // so we have a template member that will accept any type as // argument, and then assert that is really is an array: // #include #include #endif namespace boost{ #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #if BOOST_WORKAROUND(BOOST_MSVC, > 1300) # pragma warning(push) # pragma warning(disable:4700) #endif template class u32regex_token_iterator_implementation { typedef u32regex regex_type; typedef sub_match value_type; match_results what; // current match BidirectionalIterator end; // end of search area BidirectionalIterator base; // start of search area const regex_type re; // the expression match_flag_type flags; // match flags value_type result; // the current string result int N; // the current sub-expression being enumerated std::vector subs; // the sub-expressions to enumerate public: u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, int sub, match_flag_type f) : end(last), re(*p), flags(f){ subs.push_back(sub); } u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector& v, match_flag_type f) : end(last), re(*p), flags(f), subs(v){} #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // can't reliably get this to work.... #elif (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) template u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const T& submatches, match_flag_type f) : end(last), re(*p), flags(f) { // assert that T really is an array: BOOST_STATIC_ASSERT(::boost::is_array::value); const std::size_t array_size = sizeof(T) / sizeof(submatches[0]); for(std::size_t i = 0; i < array_size; ++i) { subs.push_back(submatches[i]); } } #else template u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[CN], match_flag_type f) : end(last), re(*p), flags(f) { for(std::size_t i = 0; i < CN; ++i) { subs.push_back(submatches[i]); } } #endif bool init(BidirectionalIterator first) { base = first; N = 0; if(u32regex_search(first, end, what, re, flags, base) == true) { N = 0; result = ((subs[N] == -1) ? what.prefix() : what[(int)subs[N]]); return true; } else if((subs[N] == -1) && (first != end)) { result.first = first; result.second = end; result.matched = (first != end); N = -1; return true; } return false; } bool compare(const u32regex_token_iterator_implementation& that) { if(this == &that) return true; return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (N == that.N) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second); } const value_type& get() { return result; } bool next() { if(N == -1) return false; if(N+1 < (int)subs.size()) { ++N; result =((subs[N] == -1) ? what.prefix() : what[subs[N]]); return true; } //if(what.prefix().first != what[0].second) // flags |= match_prev_avail | regex_constants::match_not_bob; BidirectionalIterator last_end(what[0].second); if(u32regex_search(last_end, end, what, re, ((what[0].first == what[0].second) ? flags | regex_constants::match_not_initial_null : flags), base)) { N =0; result =((subs[N] == -1) ? what.prefix() : what[subs[N]]); return true; } else if((last_end != end) && (subs[0] == -1)) { N =-1; result.first = last_end; result.second = end; result.matched = (last_end != end); return true; } return false; } private: u32regex_token_iterator_implementation& operator=(const u32regex_token_iterator_implementation&); }; template class u32regex_token_iterator #ifndef BOOST_NO_STD_ITERATOR : public std::iterator< std::forward_iterator_tag, sub_match, typename re_detail::regex_iterator_traits::difference_type, const sub_match*, const sub_match& > #endif { private: typedef u32regex_token_iterator_implementation impl; typedef shared_ptr pimpl; public: typedef u32regex regex_type; typedef sub_match value_type; typedef typename re_detail::regex_iterator_traits::difference_type difference_type; typedef const value_type* pointer; typedef const value_type& reference; typedef std::forward_iterator_tag iterator_category; u32regex_token_iterator(){} u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, int submatch = 0, match_flag_type m = match_default) : pdata(new impl(&re, b, submatch, m)) { if(!pdata->init(a)) pdata.reset(); } u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const std::vector& submatches, match_flag_type m = match_default) : pdata(new impl(&re, b, submatches, m)) { if(!pdata->init(a)) pdata.reset(); } #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // can't reliably get this to work.... #elif (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) template u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const T& submatches, match_flag_type m = match_default) : pdata(new impl(&re, b, submatches, m)) { if(!pdata->init(a)) pdata.reset(); } #else template u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re, const int (&submatches)[N], match_flag_type m = match_default) : pdata(new impl(&re, b, submatches, m)) { if(!pdata->init(a)) pdata.reset(); } #endif u32regex_token_iterator(const u32regex_token_iterator& that) : pdata(that.pdata) {} u32regex_token_iterator& operator=(const u32regex_token_iterator& that) { pdata = that.pdata; return *this; } bool operator==(const u32regex_token_iterator& that)const { if((pdata.get() == 0) || (that.pdata.get() == 0)) return pdata.get() == that.pdata.get(); return pdata->compare(*(that.pdata.get())); } bool operator!=(const u32regex_token_iterator& that)const { return !(*this == that); } const value_type& operator*()const { return pdata->get(); } const value_type* operator->()const { return &(pdata->get()); } u32regex_token_iterator& operator++() { cow(); if(0 == pdata->next()) { pdata.reset(); } return *this; } u32regex_token_iterator operator++(int) { u32regex_token_iterator result(*this); ++(*this); return result; } private: pimpl pdata; void cow() { // copy-on-write if(pdata.get() && !pdata.unique()) { pdata.reset(new impl(*(pdata.get()))); } } }; typedef u32regex_token_iterator utf8regex_token_iterator; typedef u32regex_token_iterator utf16regex_token_iterator; typedef u32regex_token_iterator utf32regex_token_iterator; // construction from an integral sub_match state_id: inline u32regex_token_iterator make_u32regex_token_iterator(const char* p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator(p, p+std::strlen(p), e, submatch, m); } #ifndef BOOST_NO_WREGEX inline u32regex_token_iterator make_u32regex_token_iterator(const wchar_t* p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator(p, p+std::wcslen(p), e, submatch, m); } #endif #if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) inline u32regex_token_iterator make_u32regex_token_iterator(const UChar* p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator(p, p+u_strlen(p), e, submatch, m); } #endif template inline u32regex_token_iterator::const_iterator> make_u32regex_token_iterator(const std::basic_string& p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default) { typedef typename std::basic_string::const_iterator iter_type; return u32regex_token_iterator(p.begin(), p.end(), e, submatch, m); } inline u32regex_token_iterator make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m); } #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) // construction from a reference to an array: template inline u32regex_token_iterator make_u32regex_token_iterator(const char* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator(p, p+std::strlen(p), e, submatch, m); } #ifndef BOOST_NO_WREGEX template inline u32regex_token_iterator make_u32regex_token_iterator(const wchar_t* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator(p, p+std::wcslen(p), e, submatch, m); } #endif #if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) template inline u32regex_token_iterator make_u32regex_token_iterator(const UChar* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator(p, p+u_strlen(p), e, submatch, m); } #endif template inline u32regex_token_iterator::const_iterator> make_u32regex_token_iterator(const std::basic_string& p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) { typedef typename std::basic_string::const_iterator iter_type; return u32regex_token_iterator(p.begin(), p.end(), e, submatch, m); } template inline u32regex_token_iterator make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m); } #endif // BOOST_MSVC < 1300 // construction from a vector of sub_match state_id's: inline u32regex_token_iterator make_u32regex_token_iterator(const char* p, const u32regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator(p, p+std::strlen(p), e, submatch, m); } #ifndef BOOST_NO_WREGEX inline u32regex_token_iterator make_u32regex_token_iterator(const wchar_t* p, const u32regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator(p, p+std::wcslen(p), e, submatch, m); } #endif #if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) inline u32regex_token_iterator make_u32regex_token_iterator(const UChar* p, const u32regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator(p, p+u_strlen(p), e, submatch, m); } #endif template inline u32regex_token_iterator::const_iterator> make_u32regex_token_iterator(const std::basic_string& p, const u32regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) { typedef typename std::basic_string::const_iterator iter_type; return u32regex_token_iterator(p.begin(), p.end(), e, submatch, m); } inline u32regex_token_iterator make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, const std::vector& submatch, regex_constants::match_flag_type m = regex_constants::match_default) { return u32regex_token_iterator(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m); } #if BOOST_WORKAROUND(BOOST_MSVC, > 1300) # pragma warning(pop) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif } // namespace boost #endif // BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP passenger-4.0.37/ext/boost/regex/v4/w32_regex_traits.hpp000644 000765 000024 00000056654 12233035540 023531 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE w32_regex_traits.hpp * VERSION see * DESCRIPTION: Declares regular expression traits class w32_regex_traits. */ #ifndef BOOST_W32_REGEX_TRAITS_HPP_INCLUDED #define BOOST_W32_REGEX_TRAITS_HPP_INCLUDED #ifndef BOOST_RE_PAT_EXCEPT_HPP #include #endif #ifndef BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED #include #endif #ifdef BOOST_HAS_THREADS #include #endif #ifndef BOOST_REGEX_PRIMARY_TRANSFORM #include #endif #ifndef BOOST_REGEX_OBJECT_CACHE_HPP #include #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4786) #pragma warning(disable:4800) #endif namespace boost{ // // forward declaration is needed by some compilers: // template class w32_regex_traits; namespace re_detail{ // // start by typedeffing the types we'll need: // typedef ::boost::uint32_t lcid_type; // placeholder for LCID. typedef ::boost::shared_ptr cat_type; // placeholder for dll HANDLE. // // then add wrappers around the actual Win32 API's (ie implementation hiding): // BOOST_REGEX_DECL lcid_type BOOST_REGEX_CALL w32_get_default_locale(); BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(char, lcid_type); #ifndef BOOST_NO_WREGEX BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(wchar_t, lcid_type); #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(unsigned short ca, lcid_type state_id); #endif #endif BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(char, lcid_type); #ifndef BOOST_NO_WREGEX BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(wchar_t, lcid_type); #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(unsigned short ca, lcid_type state_id); #endif #endif BOOST_REGEX_DECL cat_type BOOST_REGEX_CALL w32_cat_open(const std::string& name); BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type state_id, int i, const std::string& def); #ifndef BOOST_NO_WREGEX BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type state_id, int i, const std::wstring& def); #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T BOOST_REGEX_DECL std::basic_string BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type, int i, const std::basic_string& def); #endif #endif BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_transform(lcid_type state_id, const char* p1, const char* p2); #ifndef BOOST_NO_WREGEX BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_transform(lcid_type state_id, const wchar_t* p1, const wchar_t* p2); #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T BOOST_REGEX_DECL std::basic_string BOOST_REGEX_CALL w32_transform(lcid_type state_id, const unsigned short* p1, const unsigned short* p2); #endif #endif BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_tolower(char c, lcid_type); #ifndef BOOST_NO_WREGEX BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL w32_tolower(wchar_t c, lcid_type); #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL w32_tolower(unsigned short c, lcid_type state_id); #endif #endif BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_toupper(char c, lcid_type); #ifndef BOOST_NO_WREGEX BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL w32_toupper(wchar_t c, lcid_type); #endif BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type, boost::uint32_t mask, char c); #ifndef BOOST_NO_WREGEX BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type, boost::uint32_t mask, wchar_t c); #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type state_id, boost::uint32_t m, unsigned short c); #endif #endif // // class w32_regex_traits_base: // acts as a container for locale and the facets we are using. // template struct w32_regex_traits_base { w32_regex_traits_base(lcid_type l) { imbue(l); } lcid_type imbue(lcid_type l); lcid_type m_locale; }; template inline lcid_type w32_regex_traits_base::imbue(lcid_type l) { lcid_type result(m_locale); m_locale = l; return result; } // // class w32_regex_traits_char_layer: // implements methods that require specialisation for narrow characters: // template class w32_regex_traits_char_layer : public w32_regex_traits_base { typedef std::basic_string string_type; typedef std::map map_type; typedef typename map_type::const_iterator map_iterator_type; public: w32_regex_traits_char_layer(const lcid_type l); regex_constants::syntax_type syntax_type(charT c)const { map_iterator_type i = m_char_map.find(c); return ((i == m_char_map.end()) ? 0 : i->second); } regex_constants::escape_syntax_type escape_syntax_type(charT c) const { map_iterator_type i = m_char_map.find(c); if(i == m_char_map.end()) { if(::boost::re_detail::w32_is_lower(c, this->m_locale)) return regex_constants::escape_type_class; if(::boost::re_detail::w32_is_upper(c, this->m_locale)) return regex_constants::escape_type_not_class; return 0; } return i->second; } charT tolower(charT c)const { return ::boost::re_detail::w32_tolower(c, this->m_locale); } bool isctype(boost::uint32_t mask, charT c)const { return ::boost::re_detail::w32_is(this->m_locale, mask, c); } private: string_type get_default_message(regex_constants::syntax_type); // TODO: use a hash table when available! map_type m_char_map; }; template w32_regex_traits_char_layer::w32_regex_traits_char_layer(::boost::re_detail::lcid_type l) : w32_regex_traits_base(l) { // we need to start by initialising our syntax map so we know which // character is used for which purpose: cat_type cat; std::string cat_name(w32_regex_traits::get_catalog_name()); if(cat_name.size()) { cat = ::boost::re_detail::w32_cat_open(cat_name); if(!cat) { std::string m("Unable to open message catalog: "); std::runtime_error err(m + cat_name); boost::re_detail::raise_runtime_error(err); } } // // if we have a valid catalog then load our messages: // if(cat) { for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i) { string_type mss = ::boost::re_detail::w32_cat_get(cat, this->m_locale, i, get_default_message(i)); for(typename string_type::size_type j = 0; j < mss.size(); ++j) { this->m_char_map[mss[j]] = i; } } } else { for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i) { const char* ptr = get_default_syntax(i); while(ptr && *ptr) { this->m_char_map[static_cast(*ptr)] = i; ++ptr; } } } } template typename w32_regex_traits_char_layer::string_type w32_regex_traits_char_layer::get_default_message(regex_constants::syntax_type i) { const char* ptr = get_default_syntax(i); string_type result; while(ptr && *ptr) { result.append(1, static_cast(*ptr)); ++ptr; } return result; } // // specialised version for narrow characters: // template <> class BOOST_REGEX_DECL w32_regex_traits_char_layer : public w32_regex_traits_base { typedef std::string string_type; public: w32_regex_traits_char_layer(::boost::re_detail::lcid_type l) : w32_regex_traits_base(l) { init(); } regex_constants::syntax_type syntax_type(char c)const { return m_char_map[static_cast(c)]; } regex_constants::escape_syntax_type escape_syntax_type(char c) const { return m_char_map[static_cast(c)]; } char tolower(char c)const { return m_lower_map[static_cast(c)]; } bool isctype(boost::uint32_t mask, char c)const { return m_type_map[static_cast(c)] & mask; } private: regex_constants::syntax_type m_char_map[1u << CHAR_BIT]; char m_lower_map[1u << CHAR_BIT]; boost::uint16_t m_type_map[1u << CHAR_BIT]; void init(); }; // // class w32_regex_traits_implementation: // provides pimpl implementation for w32_regex_traits. // template class w32_regex_traits_implementation : public w32_regex_traits_char_layer { public: typedef typename w32_regex_traits::char_class_type char_class_type; BOOST_STATIC_CONSTANT(char_class_type, mask_word = 0x0400); // must be C1_DEFINED << 1 BOOST_STATIC_CONSTANT(char_class_type, mask_unicode = 0x0800); // must be C1_DEFINED << 2 BOOST_STATIC_CONSTANT(char_class_type, mask_horizontal = 0x1000); // must be C1_DEFINED << 3 BOOST_STATIC_CONSTANT(char_class_type, mask_vertical = 0x2000); // must be C1_DEFINED << 4 BOOST_STATIC_CONSTANT(char_class_type, mask_base = 0x3ff); // all the masks used by the CT_CTYPE1 group typedef std::basic_string string_type; typedef charT char_type; w32_regex_traits_implementation(::boost::re_detail::lcid_type l); std::string error_string(regex_constants::error_type n) const { if(!m_error_strings.empty()) { std::map::const_iterator p = m_error_strings.find(n); return (p == m_error_strings.end()) ? std::string(get_default_error_string(n)) : p->second; } return get_default_error_string(n); } char_class_type lookup_classname(const charT* p1, const charT* p2) const { char_class_type result = lookup_classname_imp(p1, p2); if(result == 0) { typedef typename string_type::size_type size_type; string_type temp(p1, p2); for(size_type i = 0; i < temp.size(); ++i) temp[i] = this->tolower(temp[i]); result = lookup_classname_imp(&*temp.begin(), &*temp.begin() + temp.size()); } return result; } string_type lookup_collatename(const charT* p1, const charT* p2) const; string_type transform_primary(const charT* p1, const charT* p2) const; string_type transform(const charT* p1, const charT* p2) const { return ::boost::re_detail::w32_transform(this->m_locale, p1, p2); } private: std::map m_error_strings; // error messages indexed by numberic ID std::map m_custom_class_names; // character class names std::map m_custom_collate_names; // collating element names unsigned m_collate_type; // the form of the collation string charT m_collate_delim; // the collation group delimiter // // helpers: // char_class_type lookup_classname_imp(const charT* p1, const charT* p2) const; }; template typename w32_regex_traits_implementation::string_type w32_regex_traits_implementation::transform_primary(const charT* p1, const charT* p2) const { string_type result; // // What we do here depends upon the format of the sort key returned by // sort key returned by this->transform: // switch(m_collate_type) { case sort_C: case sort_unknown: // the best we can do is translate to lower case, then get a regular sort key: { result.assign(p1, p2); typedef typename string_type::size_type size_type; for(size_type i = 0; i < result.size(); ++i) result[i] = this->tolower(result[i]); result = this->transform(&*result.begin(), &*result.begin() + result.size()); break; } case sort_fixed: { // get a regular sort key, and then truncate it: result.assign(this->transform(p1, p2)); result.erase(this->m_collate_delim); break; } case sort_delim: // get a regular sort key, and then truncate everything after the delim: result.assign(this->transform(p1, p2)); std::size_t i; for(i = 0; i < result.size(); ++i) { if(result[i] == m_collate_delim) break; } result.erase(i); break; } if(result.empty()) result = string_type(1, charT(0)); return result; } template typename w32_regex_traits_implementation::string_type w32_regex_traits_implementation::lookup_collatename(const charT* p1, const charT* p2) const { typedef typename std::map::const_iterator iter_type; if(m_custom_collate_names.size()) { iter_type pos = m_custom_collate_names.find(string_type(p1, p2)); if(pos != m_custom_collate_names.end()) return pos->second; } #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) std::string name(p1, p2); #else std::string name; const charT* p0 = p1; while(p0 != p2) name.append(1, char(*p0++)); #endif name = lookup_default_collate_name(name); #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) if(name.size()) return string_type(name.begin(), name.end()); #else if(name.size()) { string_type result; typedef std::string::const_iterator iter; iter b = name.begin(); iter e = name.end(); while(b != e) result.append(1, charT(*b++)); return result; } #endif if(p2 - p1 == 1) return string_type(1, *p1); return string_type(); } template w32_regex_traits_implementation::w32_regex_traits_implementation(::boost::re_detail::lcid_type l) : w32_regex_traits_char_layer(l) { cat_type cat; std::string cat_name(w32_regex_traits::get_catalog_name()); if(cat_name.size()) { cat = ::boost::re_detail::w32_cat_open(cat_name); if(!cat) { std::string m("Unable to open message catalog: "); std::runtime_error err(m + cat_name); boost::re_detail::raise_runtime_error(err); } } // // if we have a valid catalog then load our messages: // if(cat) { // // Error messages: // for(boost::regex_constants::error_type i = static_cast(0); i <= boost::regex_constants::error_unknown; i = static_cast(i + 1)) { const char* p = get_default_error_string(i); string_type default_message; while(*p) { default_message.append(1, static_cast(*p)); ++p; } string_type s = ::boost::re_detail::w32_cat_get(cat, this->m_locale, i+200, default_message); std::string result; for(std::string::size_type j = 0; j < s.size(); ++j) { result.append(1, static_cast(s[j])); } m_error_strings[i] = result; } // // Custom class names: // static const char_class_type masks[14] = { 0x0104u, // C1_ALPHA | C1_DIGIT 0x0100u, // C1_ALPHA 0x0020u, // C1_CNTRL 0x0004u, // C1_DIGIT (~(0x0020u|0x0008u) & 0x01ffu) | 0x0400u, // not C1_CNTRL or C1_SPACE 0x0002u, // C1_LOWER (~0x0020u & 0x01ffu) | 0x0400, // not C1_CNTRL 0x0010u, // C1_PUNCT 0x0008u, // C1_SPACE 0x0001u, // C1_UPPER 0x0080u, // C1_XDIGIT 0x0040u, // C1_BLANK w32_regex_traits_implementation::mask_word, w32_regex_traits_implementation::mask_unicode, }; static const string_type null_string; for(unsigned int j = 0; j <= 13; ++j) { string_type s(::boost::re_detail::w32_cat_get(cat, this->m_locale, j+300, null_string)); if(s.size()) this->m_custom_class_names[s] = masks[j]; } } // // get the collation format used by m_pcollate: // m_collate_type = re_detail::find_sort_syntax(this, &m_collate_delim); } template typename w32_regex_traits_implementation::char_class_type w32_regex_traits_implementation::lookup_classname_imp(const charT* p1, const charT* p2) const { static const char_class_type masks[22] = { 0, 0x0104u, // C1_ALPHA | C1_DIGIT 0x0100u, // C1_ALPHA 0x0040u, // C1_BLANK 0x0020u, // C1_CNTRL 0x0004u, // C1_DIGIT 0x0004u, // C1_DIGIT (~(0x0020u|0x0008u|0x0040) & 0x01ffu) | 0x0400u, // not C1_CNTRL or C1_SPACE or C1_BLANK w32_regex_traits_implementation::mask_horizontal, 0x0002u, // C1_LOWER 0x0002u, // C1_LOWER (~0x0020u & 0x01ffu) | 0x0400, // not C1_CNTRL 0x0010u, // C1_PUNCT 0x0008u, // C1_SPACE 0x0008u, // C1_SPACE 0x0001u, // C1_UPPER w32_regex_traits_implementation::mask_unicode, 0x0001u, // C1_UPPER w32_regex_traits_implementation::mask_vertical, 0x0104u | w32_regex_traits_implementation::mask_word, 0x0104u | w32_regex_traits_implementation::mask_word, 0x0080u, // C1_XDIGIT }; if(m_custom_class_names.size()) { typedef typename std::map, char_class_type>::const_iterator map_iter; map_iter pos = m_custom_class_names.find(string_type(p1, p2)); if(pos != m_custom_class_names.end()) return pos->second; } std::size_t state_id = 1 + re_detail::get_default_class_id(p1, p2); if(state_id < sizeof(masks) / sizeof(masks[0])) return masks[state_id]; return masks[0]; } template boost::shared_ptr > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) { // TODO: create a cache for previously constructed objects. return boost::object_cache< ::boost::re_detail::lcid_type, w32_regex_traits_implementation >::get(l, 5); } } // re_detail template class w32_regex_traits { public: typedef charT char_type; typedef std::size_t size_type; typedef std::basic_string string_type; typedef ::boost::re_detail::lcid_type locale_type; typedef boost::uint_least32_t char_class_type; struct boost_extensions_tag{}; w32_regex_traits() : m_pimpl(re_detail::create_w32_regex_traits(::boost::re_detail::w32_get_default_locale())) { } static size_type length(const char_type* p) { return std::char_traits::length(p); } regex_constants::syntax_type syntax_type(charT c)const { return m_pimpl->syntax_type(c); } regex_constants::escape_syntax_type escape_syntax_type(charT c) const { return m_pimpl->escape_syntax_type(c); } charT translate(charT c) const { return c; } charT translate_nocase(charT c) const { return this->m_pimpl->tolower(c); } charT translate(charT c, bool icase) const { return icase ? this->m_pimpl->tolower(c) : c; } charT tolower(charT c) const { return this->m_pimpl->tolower(c); } charT toupper(charT c) const { return ::boost::re_detail::w32_toupper(c, this->m_pimpl->m_locale); } string_type transform(const charT* p1, const charT* p2) const { return ::boost::re_detail::w32_transform(this->m_pimpl->m_locale, p1, p2); } string_type transform_primary(const charT* p1, const charT* p2) const { return m_pimpl->transform_primary(p1, p2); } char_class_type lookup_classname(const charT* p1, const charT* p2) const { return m_pimpl->lookup_classname(p1, p2); } string_type lookup_collatename(const charT* p1, const charT* p2) const { return m_pimpl->lookup_collatename(p1, p2); } bool isctype(charT c, char_class_type f) const { if((f & re_detail::w32_regex_traits_implementation::mask_base) && (this->m_pimpl->isctype(f & re_detail::w32_regex_traits_implementation::mask_base, c))) return true; else if((f & re_detail::w32_regex_traits_implementation::mask_unicode) && re_detail::is_extended(c)) return true; else if((f & re_detail::w32_regex_traits_implementation::mask_word) && (c == '_')) return true; else if((f & re_detail::w32_regex_traits_implementation::mask_vertical) && (::boost::re_detail::is_separator(c) || (c == '\v'))) return true; else if((f & re_detail::w32_regex_traits_implementation::mask_horizontal) && this->isctype(c, 0x0008u) && !this->isctype(c, re_detail::w32_regex_traits_implementation::mask_vertical)) return true; return false; } int toi(const charT*& p1, const charT* p2, int radix)const { return ::boost::re_detail::global_toi(p1, p2, radix, *this); } int value(charT c, int radix)const { int result = ::boost::re_detail::global_value(c); return result < radix ? result : -1; } locale_type imbue(locale_type l) { ::boost::re_detail::lcid_type result(getloc()); m_pimpl = re_detail::create_w32_regex_traits(l); return result; } locale_type getloc()const { return m_pimpl->m_locale; } std::string error_string(regex_constants::error_type n) const { return m_pimpl->error_string(n); } // // extension: // set the name of the message catalog in use (defaults to "boost_regex"). // static std::string catalog_name(const std::string& name); static std::string get_catalog_name(); private: boost::shared_ptr > m_pimpl; // // catalog name handler: // static std::string& get_catalog_name_inst(); #ifdef BOOST_HAS_THREADS static static_mutex& get_mutex_inst(); #endif }; template std::string w32_regex_traits::catalog_name(const std::string& name) { #ifdef BOOST_HAS_THREADS static_mutex::scoped_lock lk(get_mutex_inst()); #endif std::string result(get_catalog_name_inst()); get_catalog_name_inst() = name; return result; } template std::string& w32_regex_traits::get_catalog_name_inst() { static std::string s_name; return s_name; } template std::string w32_regex_traits::get_catalog_name() { #ifdef BOOST_HAS_THREADS static_mutex::scoped_lock lk(get_mutex_inst()); #endif std::string result(get_catalog_name_inst()); return result; } #ifdef BOOST_HAS_THREADS template static_mutex& w32_regex_traits::get_mutex_inst() { static static_mutex s_mutex = BOOST_STATIC_MUTEX_INIT; return s_mutex; } #endif } // boost #ifdef BOOST_MSVC #pragma warning(pop) #endif #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/regex/pending/object_cache.hpp000644 000765 000024 00000012204 12233035540 024001 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE object_cache.hpp * VERSION see * DESCRIPTION: Implements a generic object cache. */ #ifndef BOOST_REGEX_OBJECT_CACHE_HPP #define BOOST_REGEX_OBJECT_CACHE_HPP #include #include #include #include #include #include #ifdef BOOST_HAS_THREADS #include #endif namespace boost{ template class object_cache { public: typedef std::pair< ::boost::shared_ptr, Key const*> value_type; typedef std::list list_type; typedef typename list_type::iterator list_iterator; typedef std::map map_type; typedef typename map_type::iterator map_iterator; typedef typename list_type::size_type size_type; static boost::shared_ptr get(const Key& k, size_type l_max_cache_size); private: static boost::shared_ptr do_get(const Key& k, size_type l_max_cache_size); struct data { list_type cont; map_type index; }; // Needed by compilers not implementing the resolution to DR45. For reference, // see http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#45. friend struct data; }; template boost::shared_ptr object_cache::get(const Key& k, size_type l_max_cache_size) { #ifdef BOOST_HAS_THREADS static boost::static_mutex mut = BOOST_STATIC_MUTEX_INIT; boost::static_mutex::scoped_lock l(mut); if(l) { return do_get(k, l_max_cache_size); } // // what do we do if the lock fails? // for now just throw, but we should never really get here... // ::boost::throw_exception(std::runtime_error("Error in thread safety code: could not acquire a lock")); #if defined(BOOST_NO_UNREACHABLE_RETURN_DETECTION) || defined(BOOST_NO_EXCEPTIONS) return boost::shared_ptr(); #endif #else return do_get(k, l_max_cache_size); #endif } template boost::shared_ptr object_cache::do_get(const Key& k, size_type l_max_cache_size) { typedef typename object_cache::data object_data; typedef typename map_type::size_type map_size_type; static object_data s_data; // // see if the object is already in the cache: // map_iterator mpos = s_data.index.find(k); if(mpos != s_data.index.end()) { // // Eureka! // We have a cached item, bump it up the list and return it: // if(--(s_data.cont.end()) != mpos->second) { // splice out the item we want to move: list_type temp; temp.splice(temp.end(), s_data.cont, mpos->second); // and now place it at the end of the list: s_data.cont.splice(s_data.cont.end(), temp, temp.begin()); BOOST_ASSERT(*(s_data.cont.back().second) == k); // update index with new position: mpos->second = --(s_data.cont.end()); BOOST_ASSERT(&(mpos->first) == mpos->second->second); BOOST_ASSERT(&(mpos->first) == s_data.cont.back().second); } return s_data.cont.back().first; } // // if we get here then the item is not in the cache, // so create it: // boost::shared_ptr result(new Object(k)); // // Add it to the list, and index it: // s_data.cont.push_back(value_type(result, static_cast(0))); s_data.index.insert(std::make_pair(k, --(s_data.cont.end()))); s_data.cont.back().second = &(s_data.index.find(k)->first); map_size_type s = s_data.index.size(); BOOST_ASSERT(s_data.index[k]->first.get() == result.get()); BOOST_ASSERT(&(s_data.index.find(k)->first) == s_data.cont.back().second); BOOST_ASSERT(s_data.index.find(k)->first == k); if(s > l_max_cache_size) { // // We have too many items in the list, so we need to start // popping them off the back of the list, but only if they're // being held uniquely by us: // list_iterator pos = s_data.cont.begin(); list_iterator last = s_data.cont.end(); while((pos != last) && (s > l_max_cache_size)) { if(pos->first.unique()) { list_iterator condemmed(pos); ++pos; // now remove the items from our containers, // then order has to be as follows: BOOST_ASSERT(s_data.index.find(*(condemmed->second)) != s_data.index.end()); s_data.index.erase(*(condemmed->second)); s_data.cont.erase(condemmed); --s; } else ++pos; } BOOST_ASSERT(s_data.index[k]->first.get() == result.get()); BOOST_ASSERT(&(s_data.index.find(k)->first) == s_data.cont.back().second); BOOST_ASSERT(s_data.index.find(k)->first == k); } return result; } } #endif passenger-4.0.37/ext/boost/regex/pending/static_mutex.hpp000644 000765 000024 00000010066 12233035540 024125 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE static_mutex.hpp * VERSION see * DESCRIPTION: Declares static_mutex lock type, there are three different * implementations: POSIX pthreads, WIN32 threads, and portable, * these are described in more detail below. */ #ifndef BOOST_REGEX_STATIC_MUTEX_HPP #define BOOST_REGEX_STATIC_MUTEX_HPP #include #include // dll import/export options. #ifdef BOOST_HAS_PTHREADS #include #endif #if defined(BOOST_HAS_PTHREADS) && defined(PTHREAD_MUTEX_INITIALIZER) // // pthreads version: // simple wrap around a pthread_mutex_t initialized with // PTHREAD_MUTEX_INITIALIZER. // namespace boost{ class static_mutex; #define BOOST_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER, } class BOOST_REGEX_DECL scoped_static_mutex_lock { public: scoped_static_mutex_lock(static_mutex& mut, bool lk = true); ~scoped_static_mutex_lock(); inline bool locked()const { return m_have_lock; } inline operator void const*()const { return locked() ? this : 0; } void lock(); void unlock(); private: static_mutex& m_mutex; bool m_have_lock; }; class static_mutex { public: typedef scoped_static_mutex_lock scoped_lock; pthread_mutex_t m_mutex; }; } // namespace boost #elif defined(BOOST_HAS_WINTHREADS) // // Win32 version: // Use a 32-bit int as a lock, along with a test-and-set // implementation using InterlockedCompareExchange. // #include namespace boost{ class BOOST_REGEX_DECL scoped_static_mutex_lock; class static_mutex { public: typedef scoped_static_mutex_lock scoped_lock; boost::int32_t m_mutex; }; #define BOOST_STATIC_MUTEX_INIT { 0, } class BOOST_REGEX_DECL scoped_static_mutex_lock { public: scoped_static_mutex_lock(static_mutex& mut, bool lk = true); ~scoped_static_mutex_lock(); operator void const*()const { return locked() ? this : 0; } bool locked()const { return m_have_lock; } void lock(); void unlock(); private: static_mutex& m_mutex; bool m_have_lock; scoped_static_mutex_lock(const scoped_static_mutex_lock&); scoped_static_mutex_lock& operator=(const scoped_static_mutex_lock&); }; } // namespace #else // // Portable version of a static mutex based on Boost.Thread library: // This has to use a single mutex shared by all instances of static_mutex // because boost::call_once doesn't alow us to pass instance information // down to the initialisation proceedure. In fact the initialisation routine // may need to be called more than once - but only once per instance. // // Since this preprocessor path is almost never taken, we hide these header // dependencies so that build tools don't find them. // #define B1 #define B2 #include B1 #include B2 #undef B1 #undef B2 namespace boost{ class BOOST_REGEX_DECL scoped_static_mutex_lock; extern "C" BOOST_REGEX_DECL void boost_regex_free_static_mutex(); class BOOST_REGEX_DECL static_mutex { public: typedef scoped_static_mutex_lock scoped_lock; static void init(); static boost::recursive_mutex* m_pmutex; static boost::once_flag m_once; }; #define BOOST_STATIC_MUTEX_INIT { } class BOOST_REGEX_DECL scoped_static_mutex_lock { public: scoped_static_mutex_lock(static_mutex& mut, bool lk = true); ~scoped_static_mutex_lock(); operator void const*()const; bool locked()const; void lock(); void unlock(); private: boost::recursive_mutex::scoped_lock* m_plock; bool m_have_lock; }; inline scoped_static_mutex_lock::operator void const*()const { return locked() ? this : 0; } inline bool scoped_static_mutex_lock::locked()const { return m_have_lock; } } // namespace #endif #endif passenger-4.0.37/ext/boost/regex/pending/unicode_iterator.hpp000644 000765 000024 00000056052 12233035540 024760 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE unicode_iterator.hpp * VERSION see * DESCRIPTION: Iterator adapters for converting between different Unicode encodings. */ /**************************************************************************** Contents: ~~~~~~~~~ 1) Read Only, Input Adapters: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template class u32_to_u8_iterator; Adapts sequence of UTF-32 code points to "look like" a sequence of UTF-8. template class u8_to_u32_iterator; Adapts sequence of UTF-8 code points to "look like" a sequence of UTF-32. template class u32_to_u16_iterator; Adapts sequence of UTF-32 code points to "look like" a sequence of UTF-16. template class u16_to_u32_iterator; Adapts sequence of UTF-16 code points to "look like" a sequence of UTF-32. 2) Single pass output iterator adapters: template class utf8_output_iterator; Accepts UTF-32 code points and forwards them on as UTF-8 code points. template class utf16_output_iterator; Accepts UTF-32 code points and forwards them on as UTF-16 code points. ****************************************************************************/ #ifndef BOOST_REGEX_UNICODE_ITERATOR_HPP #define BOOST_REGEX_UNICODE_ITERATOR_HPP #include #include #include #include #include #include #ifndef BOOST_NO_STD_LOCALE #include #include #endif #include // CHAR_BIT namespace boost{ namespace detail{ static const ::boost::uint16_t high_surrogate_base = 0xD7C0u; static const ::boost::uint16_t low_surrogate_base = 0xDC00u; static const ::boost::uint32_t ten_bit_mask = 0x3FFu; inline bool is_high_surrogate(::boost::uint16_t v) { return (v & 0xFFFFFC00u) == 0xd800u; } inline bool is_low_surrogate(::boost::uint16_t v) { return (v & 0xFFFFFC00u) == 0xdc00u; } template inline bool is_surrogate(T v) { return (v & 0xFFFFF800u) == 0xd800; } inline unsigned utf8_byte_count(boost::uint8_t c) { // if the most significant bit with a zero in it is in position // 8-N then there are N bytes in this UTF-8 sequence: boost::uint8_t mask = 0x80u; unsigned result = 0; while(c & mask) { ++result; mask >>= 1; } return (result == 0) ? 1 : ((result > 4) ? 4 : result); } inline unsigned utf8_trailing_byte_count(boost::uint8_t c) { return utf8_byte_count(c) - 1; } #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4100) #endif inline void invalid_utf32_code_point(::boost::uint32_t val) { #ifndef BOOST_NO_STD_LOCALE std::stringstream ss; ss << "Invalid UTF-32 code point U+" << std::showbase << std::hex << val << " encountered while trying to encode UTF-16 sequence"; std::out_of_range e(ss.str()); #else std::out_of_range e("Invalid UTF-32 code point encountered while trying to encode UTF-16 sequence"); #endif boost::throw_exception(e); } #ifdef BOOST_MSVC #pragma warning(pop) #endif } // namespace detail template class u32_to_u16_iterator : public boost::iterator_facade, U16Type, std::bidirectional_iterator_tag, const U16Type> { typedef boost::iterator_facade, U16Type, std::bidirectional_iterator_tag, const U16Type> base_type; #if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) typedef typename std::iterator_traits::value_type base_value_type; BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 32); BOOST_STATIC_ASSERT(sizeof(U16Type)*CHAR_BIT == 16); #endif public: typename base_type::reference dereference()const { if(m_current == 2) extract_current(); return m_values[m_current]; } bool equal(const u32_to_u16_iterator& that)const { if(m_position == that.m_position) { // Both m_currents must be equal, or both even // this is the same as saying their sum must be even: return (m_current + that.m_current) & 1u ? false : true; } return false; } void increment() { // if we have a pending read then read now, so that we know whether // to skip a position, or move to a low-surrogate: if(m_current == 2) { // pending read: extract_current(); } // move to the next surrogate position: ++m_current; // if we've reached the end skip a position: if(m_values[m_current] == 0) { m_current = 2; ++m_position; } } void decrement() { if(m_current != 1) { // decrementing an iterator always leads to a valid position: --m_position; extract_current(); m_current = m_values[1] ? 1 : 0; } else { m_current = 0; } } BaseIterator base()const { return m_position; } // construct: u32_to_u16_iterator() : m_position(), m_current(0) { m_values[0] = 0; m_values[1] = 0; m_values[2] = 0; } u32_to_u16_iterator(BaseIterator b) : m_position(b), m_current(2) { m_values[0] = 0; m_values[1] = 0; m_values[2] = 0; } private: void extract_current()const { // begin by checking for a code point out of range: ::boost::uint32_t v = *m_position; if(v >= 0x10000u) { if(v > 0x10FFFFu) detail::invalid_utf32_code_point(*m_position); // split into two surrogates: m_values[0] = static_cast(v >> 10) + detail::high_surrogate_base; m_values[1] = static_cast(v & detail::ten_bit_mask) + detail::low_surrogate_base; m_current = 0; BOOST_ASSERT(detail::is_high_surrogate(m_values[0])); BOOST_ASSERT(detail::is_low_surrogate(m_values[1])); } else { // 16-bit code point: m_values[0] = static_cast(*m_position); m_values[1] = 0; m_current = 0; // value must not be a surrogate: if(detail::is_surrogate(m_values[0])) detail::invalid_utf32_code_point(*m_position); } } BaseIterator m_position; mutable U16Type m_values[3]; mutable unsigned m_current; }; template class u16_to_u32_iterator : public boost::iterator_facade, U32Type, std::bidirectional_iterator_tag, const U32Type> { typedef boost::iterator_facade, U32Type, std::bidirectional_iterator_tag, const U32Type> base_type; // special values for pending iterator reads: BOOST_STATIC_CONSTANT(U32Type, pending_read = 0xffffffffu); #if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) typedef typename std::iterator_traits::value_type base_value_type; BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 16); BOOST_STATIC_ASSERT(sizeof(U32Type)*CHAR_BIT == 32); #endif public: typename base_type::reference dereference()const { if(m_value == pending_read) extract_current(); return m_value; } bool equal(const u16_to_u32_iterator& that)const { return m_position == that.m_position; } void increment() { // skip high surrogate first if there is one: if(detail::is_high_surrogate(*m_position)) ++m_position; ++m_position; m_value = pending_read; } void decrement() { --m_position; // if we have a low surrogate then go back one more: if(detail::is_low_surrogate(*m_position)) --m_position; m_value = pending_read; } BaseIterator base()const { return m_position; } // construct: u16_to_u32_iterator() : m_position() { m_value = pending_read; } u16_to_u32_iterator(BaseIterator b) : m_position(b) { m_value = pending_read; } // // Range checked version: // u16_to_u32_iterator(BaseIterator b, BaseIterator start, BaseIterator end) : m_position(b) { m_value = pending_read; // // The range must not start with a low surrogate, or end in a high surrogate, // otherwise we run the risk of running outside the underlying input range. // Likewise b must not be located at a low surrogate. // boost::uint16_t val; if(start != end) { if((b != start) && (b != end)) { val = *b; if(detail::is_surrogate(val) && ((val & 0xFC00u) == 0xDC00u)) invalid_code_point(val); } val = *start; if(detail::is_surrogate(val) && ((val & 0xFC00u) == 0xDC00u)) invalid_code_point(val); val = *--end; if(detail::is_high_surrogate(val)) invalid_code_point(val); } } private: static void invalid_code_point(::boost::uint16_t val) { #ifndef BOOST_NO_STD_LOCALE std::stringstream ss; ss << "Misplaced UTF-16 surrogate U+" << std::showbase << std::hex << val << " encountered while trying to encode UTF-32 sequence"; std::out_of_range e(ss.str()); #else std::out_of_range e("Misplaced UTF-16 surrogate encountered while trying to encode UTF-32 sequence"); #endif boost::throw_exception(e); } void extract_current()const { m_value = static_cast(static_cast< ::boost::uint16_t>(*m_position)); // if the last value is a high surrogate then adjust m_position and m_value as needed: if(detail::is_high_surrogate(*m_position)) { // precondition; next value must have be a low-surrogate: BaseIterator next(m_position); ::boost::uint16_t t = *++next; if((t & 0xFC00u) != 0xDC00u) invalid_code_point(t); m_value = (m_value - detail::high_surrogate_base) << 10; m_value |= (static_cast(static_cast< ::boost::uint16_t>(t)) & detail::ten_bit_mask); } // postcondition; result must not be a surrogate: if(detail::is_surrogate(m_value)) invalid_code_point(static_cast< ::boost::uint16_t>(m_value)); } BaseIterator m_position; mutable U32Type m_value; }; template class u32_to_u8_iterator : public boost::iterator_facade, U8Type, std::bidirectional_iterator_tag, const U8Type> { typedef boost::iterator_facade, U8Type, std::bidirectional_iterator_tag, const U8Type> base_type; #if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) typedef typename std::iterator_traits::value_type base_value_type; BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 32); BOOST_STATIC_ASSERT(sizeof(U8Type)*CHAR_BIT == 8); #endif public: typename base_type::reference dereference()const { if(m_current == 4) extract_current(); return m_values[m_current]; } bool equal(const u32_to_u8_iterator& that)const { if(m_position == that.m_position) { // either the m_current's must be equal, or one must be 0 and // the other 4: which means neither must have bits 1 or 2 set: return (m_current == that.m_current) || (((m_current | that.m_current) & 3) == 0); } return false; } void increment() { // if we have a pending read then read now, so that we know whether // to skip a position, or move to a low-surrogate: if(m_current == 4) { // pending read: extract_current(); } // move to the next surrogate position: ++m_current; // if we've reached the end skip a position: if(m_values[m_current] == 0) { m_current = 4; ++m_position; } } void decrement() { if((m_current & 3) == 0) { --m_position; extract_current(); m_current = 3; while(m_current && (m_values[m_current] == 0)) --m_current; } else --m_current; } BaseIterator base()const { return m_position; } // construct: u32_to_u8_iterator() : m_position(), m_current(0) { m_values[0] = 0; m_values[1] = 0; m_values[2] = 0; m_values[3] = 0; m_values[4] = 0; } u32_to_u8_iterator(BaseIterator b) : m_position(b), m_current(4) { m_values[0] = 0; m_values[1] = 0; m_values[2] = 0; m_values[3] = 0; m_values[4] = 0; } private: void extract_current()const { boost::uint32_t c = *m_position; if(c > 0x10FFFFu) detail::invalid_utf32_code_point(c); if(c < 0x80u) { m_values[0] = static_cast(c); m_values[1] = static_cast(0u); m_values[2] = static_cast(0u); m_values[3] = static_cast(0u); } else if(c < 0x800u) { m_values[0] = static_cast(0xC0u + (c >> 6)); m_values[1] = static_cast(0x80u + (c & 0x3Fu)); m_values[2] = static_cast(0u); m_values[3] = static_cast(0u); } else if(c < 0x10000u) { m_values[0] = static_cast(0xE0u + (c >> 12)); m_values[1] = static_cast(0x80u + ((c >> 6) & 0x3Fu)); m_values[2] = static_cast(0x80u + (c & 0x3Fu)); m_values[3] = static_cast(0u); } else { m_values[0] = static_cast(0xF0u + (c >> 18)); m_values[1] = static_cast(0x80u + ((c >> 12) & 0x3Fu)); m_values[2] = static_cast(0x80u + ((c >> 6) & 0x3Fu)); m_values[3] = static_cast(0x80u + (c & 0x3Fu)); } m_current= 0; } BaseIterator m_position; mutable U8Type m_values[5]; mutable unsigned m_current; }; template class u8_to_u32_iterator : public boost::iterator_facade, U32Type, std::bidirectional_iterator_tag, const U32Type> { typedef boost::iterator_facade, U32Type, std::bidirectional_iterator_tag, const U32Type> base_type; // special values for pending iterator reads: BOOST_STATIC_CONSTANT(U32Type, pending_read = 0xffffffffu); #if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) typedef typename std::iterator_traits::value_type base_value_type; BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 8); BOOST_STATIC_ASSERT(sizeof(U32Type)*CHAR_BIT == 32); #endif public: typename base_type::reference dereference()const { if(m_value == pending_read) extract_current(); return m_value; } bool equal(const u8_to_u32_iterator& that)const { return m_position == that.m_position; } void increment() { // We must not start with a continuation character: if((static_cast(*m_position) & 0xC0) == 0x80) invalid_sequence(); // skip high surrogate first if there is one: unsigned c = detail::utf8_byte_count(*m_position); if(m_value == pending_read) { // Since we haven't read in a value, we need to validate the code points: for(unsigned i = 0; i < c; ++i) { ++m_position; // We must have a continuation byte: if((i != c - 1) && ((static_cast(*m_position) & 0xC0) != 0x80)) invalid_sequence(); } } else { std::advance(m_position, c); } m_value = pending_read; } void decrement() { // Keep backtracking until we don't have a trailing character: unsigned count = 0; while((*--m_position & 0xC0u) == 0x80u) ++count; // now check that the sequence was valid: if(count != detail::utf8_trailing_byte_count(*m_position)) invalid_sequence(); m_value = pending_read; } BaseIterator base()const { return m_position; } // construct: u8_to_u32_iterator() : m_position() { m_value = pending_read; } u8_to_u32_iterator(BaseIterator b) : m_position(b) { m_value = pending_read; } // // Checked constructor: // u8_to_u32_iterator(BaseIterator b, BaseIterator start, BaseIterator end) : m_position(b) { m_value = pending_read; // // We must not start with a continuation character, or end with a // truncated UTF-8 sequence otherwise we run the risk of going past // the start/end of the underlying sequence: // if(start != end) { unsigned char v = *start; if((v & 0xC0u) == 0x80u) invalid_sequence(); if((b != start) && (b != end) && ((*b & 0xC0u) == 0x80u)) invalid_sequence(); BaseIterator pos = end; do { v = *--pos; } while((start != pos) && ((v & 0xC0u) == 0x80u)); std::ptrdiff_t extra = detail::utf8_byte_count(v); if(std::distance(pos, end) < extra) invalid_sequence(); } } private: static void invalid_sequence() { std::out_of_range e("Invalid UTF-8 sequence encountered while trying to encode UTF-32 character"); boost::throw_exception(e); } void extract_current()const { m_value = static_cast(static_cast< ::boost::uint8_t>(*m_position)); // we must not have a continuation character: if((m_value & 0xC0u) == 0x80u) invalid_sequence(); // see how many extra bytes we have: unsigned extra = detail::utf8_trailing_byte_count(*m_position); // extract the extra bits, 6 from each extra byte: BaseIterator next(m_position); for(unsigned c = 0; c < extra; ++c) { ++next; m_value <<= 6; // We must have a continuation byte: if((static_cast(*next) & 0xC0) != 0x80) invalid_sequence(); m_value += static_cast(*next) & 0x3Fu; } // we now need to remove a few of the leftmost bits, but how many depends // upon how many extra bytes we've extracted: static const boost::uint32_t masks[4] = { 0x7Fu, 0x7FFu, 0xFFFFu, 0x1FFFFFu, }; m_value &= masks[extra]; // check the result: if(m_value > static_cast(0x10FFFFu)) invalid_sequence(); } BaseIterator m_position; mutable U32Type m_value; }; template class utf16_output_iterator { public: typedef void difference_type; typedef void value_type; typedef boost::uint32_t* pointer; typedef boost::uint32_t& reference; typedef std::output_iterator_tag iterator_category; utf16_output_iterator(const BaseIterator& b) : m_position(b){} utf16_output_iterator(const utf16_output_iterator& that) : m_position(that.m_position){} utf16_output_iterator& operator=(const utf16_output_iterator& that) { m_position = that.m_position; return *this; } const utf16_output_iterator& operator*()const { return *this; } void operator=(boost::uint32_t val)const { push(val); } utf16_output_iterator& operator++() { return *this; } utf16_output_iterator& operator++(int) { return *this; } BaseIterator base()const { return m_position; } private: void push(boost::uint32_t v)const { if(v >= 0x10000u) { // begin by checking for a code point out of range: if(v > 0x10FFFFu) detail::invalid_utf32_code_point(v); // split into two surrogates: *m_position++ = static_cast(v >> 10) + detail::high_surrogate_base; *m_position++ = static_cast(v & detail::ten_bit_mask) + detail::low_surrogate_base; } else { // 16-bit code point: // value must not be a surrogate: if(detail::is_surrogate(v)) detail::invalid_utf32_code_point(v); *m_position++ = static_cast(v); } } mutable BaseIterator m_position; }; template class utf8_output_iterator { public: typedef void difference_type; typedef void value_type; typedef boost::uint32_t* pointer; typedef boost::uint32_t& reference; typedef std::output_iterator_tag iterator_category; utf8_output_iterator(const BaseIterator& b) : m_position(b){} utf8_output_iterator(const utf8_output_iterator& that) : m_position(that.m_position){} utf8_output_iterator& operator=(const utf8_output_iterator& that) { m_position = that.m_position; return *this; } const utf8_output_iterator& operator*()const { return *this; } void operator=(boost::uint32_t val)const { push(val); } utf8_output_iterator& operator++() { return *this; } utf8_output_iterator& operator++(int) { return *this; } BaseIterator base()const { return m_position; } private: void push(boost::uint32_t c)const { if(c > 0x10FFFFu) detail::invalid_utf32_code_point(c); if(c < 0x80u) { *m_position++ = static_cast(c); } else if(c < 0x800u) { *m_position++ = static_cast(0xC0u + (c >> 6)); *m_position++ = static_cast(0x80u + (c & 0x3Fu)); } else if(c < 0x10000u) { *m_position++ = static_cast(0xE0u + (c >> 12)); *m_position++ = static_cast(0x80u + ((c >> 6) & 0x3Fu)); *m_position++ = static_cast(0x80u + (c & 0x3Fu)); } else { *m_position++ = static_cast(0xF0u + (c >> 18)); *m_position++ = static_cast(0x80u + ((c >> 12) & 0x3Fu)); *m_position++ = static_cast(0x80u + ((c >> 6) & 0x3Fu)); *m_position++ = static_cast(0x80u + (c & 0x3Fu)); } } mutable BaseIterator m_position; }; } // namespace boost #endif // BOOST_REGEX_UNICODE_ITERATOR_HPP passenger-4.0.37/ext/boost/regex/config/borland.hpp000644 000765 000024 00000004276 12233035540 022664 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE boost/regex/config/borland.hpp * VERSION see * DESCRIPTION: regex borland-specific config setup. */ #if defined(__BORLANDC__) # if (__BORLANDC__ == 0x550) || (__BORLANDC__ == 0x551) // problems with std::basic_string and dll RTL: # if defined(_RTLDLL) && defined(_RWSTD_COMPILE_INSTANTIATE) # ifdef BOOST_REGEX_BUILD_DLL # error _RWSTD_COMPILE_INSTANTIATE must not be defined when building regex++ as a DLL # else # pragma message("Defining _RWSTD_COMPILE_INSTANTIATE when linking to the DLL version of the RTL may produce memory corruption problems in std::basic_string, as a result of separate versions of basic_string's static data in the RTL and you're exe/dll: be warned!!") # endif # endif # ifndef _RTLDLL // this is harmless for a staic link: # define _RWSTD_COMPILE_INSTANTIATE # endif // external templates cause problems for some reason: # define BOOST_REGEX_NO_EXTERNAL_TEMPLATES # endif # if (__BORLANDC__ <= 0x540) && !defined(BOOST_REGEX_NO_LIB) && !defined(_NO_VCL) // C++ Builder 4 and earlier, we can't tell whether we should be using // the VCL runtime or not, do a static link instead: # define BOOST_REGEX_STATIC_LINK # endif // // VCL support: // if we're building a console app then there can't be any VCL (can there?) # if !defined(__CONSOLE__) && !defined(_NO_VCL) # define BOOST_REGEX_USE_VCL # endif // // if this isn't Win32 then don't automatically select link // libraries: // # ifndef _Windows # ifndef BOOST_REGEX_NO_LIB # define BOOST_REGEX_NO_LIB # endif # ifndef BOOST_REGEX_STATIC_LINK # define BOOST_REGEX_STATIC_LINK # endif # endif #if __BORLANDC__ < 0x600 // // string workarounds: // #include #undef strcmp #undef strcpy #endif #endif passenger-4.0.37/ext/boost/regex/config/cwchar.hpp000644 000765 000024 00000007762 12233035540 022515 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE boost/regex/config/cwchar.hpp * VERSION see * DESCRIPTION: regex wide character string fixes. */ #ifndef BOOST_REGEX_CONFIG_CWCHAR_HPP #define BOOST_REGEX_CONFIG_CWCHAR_HPP #include #include #include #if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) // apparently this is required for the RW STL on Linux: #undef iswalnum #undef iswalpha #undef iswblank #undef iswcntrl #undef iswdigit #undef iswgraph #undef iswlower #undef iswprint #undef iswprint #undef iswpunct #undef iswspace #undef iswupper #undef iswxdigit #undef iswctype #undef towlower #undef towupper #undef towctrans #undef wctrans #undef wctype #endif namespace std{ #ifndef BOOST_NO_STDC_NAMESPACE extern "C"{ #endif #ifdef iswalnum inline int (iswalnum)(wint_t i) { return iswalnum(i); } #undef iswalnum #elif defined(BOOST_NO_STDC_NAMESPACE) using ::iswalnum; #endif #ifdef iswalpha inline int (iswalpha)(wint_t i) { return iswalpha(i); } #undef iswalpha #elif defined(BOOST_NO_STDC_NAMESPACE) using ::iswalpha; #endif #ifdef iswcntrl inline int (iswcntrl)(wint_t i) { return iswcntrl(i); } #undef iswcntrl #elif defined(BOOST_NO_STDC_NAMESPACE) using ::iswcntrl; #endif #ifdef iswdigit inline int (iswdigit)(wint_t i) { return iswdigit(i); } #undef iswdigit #elif defined(BOOST_NO_STDC_NAMESPACE) using ::iswdigit; #endif #ifdef iswgraph inline int (iswgraph)(wint_t i) { return iswgraph(i); } #undef iswgraph #elif defined(BOOST_NO_STDC_NAMESPACE) using ::iswgraph; #endif #ifdef iswlower inline int (iswlower)(wint_t i) { return iswlower(i); } #undef iswlower #elif defined(BOOST_NO_STDC_NAMESPACE) using ::iswlower; #endif #ifdef iswprint inline int (iswprint)(wint_t i) { return iswprint(i); } #undef iswprint #elif defined(BOOST_NO_STDC_NAMESPACE) using ::iswprint; #endif #ifdef iswpunct inline int (iswpunct)(wint_t i) { return iswpunct(i); } #undef iswpunct #elif defined(BOOST_NO_STDC_NAMESPACE) using ::iswpunct; #endif #ifdef iswspace inline int (iswspace)(wint_t i) { return iswspace(i); } #undef iswspace #elif defined(BOOST_NO_STDC_NAMESPACE) using ::iswspace; #endif #ifdef iswupper inline int (iswupper)(wint_t i) { return iswupper(i); } #undef iswupper #elif defined(BOOST_NO_STDC_NAMESPACE) using ::iswupper; #endif #ifdef iswxdigit inline int (iswxdigit)(wint_t i) { return iswxdigit(i); } #undef iswxdigit #elif defined(BOOST_NO_STDC_NAMESPACE) using ::iswxdigit; #endif #ifdef towlower inline wint_t (towlower)(wint_t i) { return towlower(i); } #undef towlower #elif defined(BOOST_NO_STDC_NAMESPACE) using ::towlower; #endif #ifdef towupper inline wint_t (towupper)(wint_t i) { return towupper(i); } #undef towupper #elif defined(BOOST_NO_STDC_NAMESPACE) using :: towupper; #endif #ifdef wcscmp inline int (wcscmp)(const wchar_t *p1, const wchar_t *p2) { return wcscmp(p1,p2); } #undef wcscmp #elif defined(BOOST_NO_STDC_NAMESPACE) using ::wcscmp; #endif #ifdef wcscoll inline int (wcscoll)(const wchar_t *p1, const wchar_t *p2) { return wcscoll(p1,p2); } #undef wcscoll #elif defined(BOOST_NO_STDC_NAMESPACE) && !defined(UNDER_CE) using ::wcscoll; #endif #ifdef wcscpy inline wchar_t *(wcscpy)(wchar_t *p1, const wchar_t *p2) { return wcscpy(p1,p2); } #undef wcscpy #elif defined(BOOST_NO_STDC_NAMESPACE) using ::wcscpy; #endif #ifdef wcslen inline size_t (wcslen)(const wchar_t *p) { return wcslen(p); } #undef wcslen #elif defined(BOOST_NO_STDC_NAMESPACE) using ::wcslen; #endif #ifdef wcsxfrm size_t wcsxfrm(wchar_t *p1, const wchar_t *p2, size_t s) { return wcsxfrm(p1,p2,s); } #undef wcsxfrm #elif defined(BOOST_NO_STDC_NAMESPACE) using ::wcsxfrm; #endif #ifndef BOOST_NO_STDC_NAMESPACE } // extern "C" #endif } // namespace std #endif passenger-4.0.37/ext/boost/ratio/config.hpp000644 000765 000024 00000005562 12233035540 021246 0ustar00honglistaff000000 000000 // config.hpp ---------------------------------------------------------------// // Copyright 2012 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_RATIO_CONFIG_HPP #define BOOST_RATIO_CONFIG_HPP #include #include #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) # if ! defined BOOST_NO_CXX11_U16STRING # define BOOST_NO_CXX11_U16STRING # endif # if ! defined BOOST_NO_CXX11_U32STRING # define BOOST_NO_CXX11_U32STRING # endif #endif #if !defined BOOST_RATIO_VERSION #define BOOST_RATIO_VERSION 1 #else #if BOOST_RATIO_VERSION!=1 && BOOST_RATIO_VERSION!=2 #error "BOOST_RATIO_VERSION must be 1 or 2" #endif #endif #if BOOST_RATIO_VERSION==1 #if ! defined BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0 #define BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 #endif #endif #if BOOST_RATIO_VERSION==2 #if ! defined BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0 #define BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0 #endif #endif #ifdef INTMAX_C #define BOOST_RATIO_INTMAX_C(a) INTMAX_C(a) #else #define BOOST_RATIO_INTMAX_C(a) a##LL #endif #ifdef UINTMAX_C #define BOOST_RATIO_UINTMAX_C(a) UINTMAX_C(a) #else #define BOOST_RATIO_UINTMAX_C(a) a##ULL #endif #define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFELL) #ifndef BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG) #elif defined(BOOST_RATIO_USES_STATIC_ASSERT) #include #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND) #elif defined(BOOST_RATIO_USES_MPL_ASSERT) #include #include #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) \ BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES) #else //~ #elif defined(BOOST_RATIO_USES_ARRAY_ASSERT) #define BOOST_RATIO_CONCAT(A,B) A##B #define BOOST_RATIO_NAME(A,B) BOOST_RATIO_CONCAT(A,B) #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_RATIO_NAME(__boost_ratio_test_,__LINE__)[(CND)?1:-1] //~ #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) #endif #if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_RATIO_USES_MPL_ASSERT) #define BOOST_RATIO_OVERFLOW_IN_ADD "overflow in ratio add" #define BOOST_RATIO_OVERFLOW_IN_SUB "overflow in ratio sub" #define BOOST_RATIO_OVERFLOW_IN_MUL "overflow in ratio mul" #define BOOST_RATIO_OVERFLOW_IN_DIV "overflow in ratio div" #define BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE "ratio numerator is out of range" #define BOOST_RATIO_DIVIDE_BY_0 "ratio divide by 0" #define BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range" #endif //#define BOOST_RATIO_EXTENSIONS #endif // header passenger-4.0.37/ext/boost/ratio/detail/000755 000765 000024 00000000000 12233035540 020522 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/ratio/ratio.hpp000644 000765 000024 00000016277 12233035540 021124 0ustar00honglistaff000000 000000 // ratio.hpp ---------------------------------------------------------------// // Copyright 2008 Howard Hinnant // Copyright 2008 Beman Dawes // Copyright 2009 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt /* This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype. Many thanks to Howard for making his code available under the Boost license. The original code was modified to conform to Boost conventions and to section 20.4 Compile-time rational arithmetic [ratio], of the C++ committee working paper N2798. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf. time2_demo contained this comment: Much thanks to Andrei Alexandrescu, Walter Brown, Peter Dimov, Jeff Garland, Terry Golubiewski, Daniel Krugler, Anthony Williams. */ // The way overflow is managed for ratio_less is taken from llvm/libcxx/include/ratio #ifndef BOOST_RATIO_RATIO_HPP #define BOOST_RATIO_RATIO_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef BOOST_RATIO_EXTENSIONS #include #include #endif // // We simply cannot include this header on gcc without getting copious warnings of the kind: // // boost/integer.hpp:77:30: warning: use of C99 long long integer constant // // And yet there is no other reasonable implementation, so we declare this a system header // to suppress these warnings. // #if defined(__GNUC__) && (__GNUC__ >= 4) #pragma GCC system_header #endif namespace boost { //----------------------------------------------------------------------------// // // // 20.6.1 Class template ratio [ratio.ratio] // // // //----------------------------------------------------------------------------// template class ratio { static const boost::intmax_t ABS_N = mpl::abs_c::value; static const boost::intmax_t ABS_D = mpl::abs_c::value; BOOST_RATIO_STATIC_ASSERT(ABS_N >= 0, BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE, ()); BOOST_RATIO_STATIC_ASSERT(ABS_D > 0, BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE, ()); BOOST_RATIO_STATIC_ASSERT(D != 0, BOOST_RATIO_DIVIDE_BY_0 , ()); static const boost::intmax_t SIGN_N = mpl::sign_c::value * mpl::sign_c::value; static const boost::intmax_t GCD = mpl::gcd_c::value; public: BOOST_STATIC_CONSTEXPR boost::intmax_t num = SIGN_N * ABS_N / GCD; BOOST_STATIC_CONSTEXPR boost::intmax_t den = ABS_D / GCD; #ifdef BOOST_RATIO_EXTENSIONS typedef mpl::rational_c_tag tag; typedef boost::rational value_type; typedef boost::intmax_t num_type; typedef boost::intmax_t den_type; ratio() {} template ratio(const ratio<_N2, _D2>&, typename enable_if_c < (ratio<_N2, _D2>::num == num && ratio<_N2, _D2>::den == den) >::type* = 0) {} template typename enable_if_c < (ratio<_N2, _D2>::num == num && ratio<_N2, _D2>::den == den), ratio& >::type operator=(const ratio<_N2, _D2>&) {return *this;} static value_type value() {return value_type(num,den);} value_type operator()() const {return value();} #endif typedef ratio type; }; #if defined(BOOST_NO_CXX11_CONSTEXPR) template const boost::intmax_t ratio::num; template const boost::intmax_t ratio::den; #endif //----------------------------------------------------------------------------// // // // 20.6.2 Arithmetic on ratio types [ratio.arithmetic] // // // //----------------------------------------------------------------------------// template struct ratio_add : boost::ratio_detail::ratio_add::type { }; template struct ratio_subtract : boost::ratio_detail::ratio_subtract::type { }; template struct ratio_multiply : boost::ratio_detail::ratio_multiply::type { }; template struct ratio_divide : boost::ratio_detail::ratio_divide::type { }; //----------------------------------------------------------------------------// // // // 20.6.3 Comparasion of ratio types [ratio.comparison] // // // //----------------------------------------------------------------------------// // ratio_equal template struct ratio_equal : public boost::integral_constant {}; template struct ratio_not_equal : public boost::integral_constant::value> {}; // ratio_less template struct ratio_less : boost::integral_constant::value> {}; template struct ratio_less_equal : boost::integral_constant::value> {}; template struct ratio_greater : boost::integral_constant::value> {}; template struct ratio_greater_equal : boost::integral_constant::value> {}; template struct ratio_gcd : ratio::value, mpl::lcm_c::value>::type { }; #ifdef BOOST_RATIO_EXTENSIONS template struct ratio_negate : ratio<-R::num, R::den>::type { }; template struct ratio_abs : ratio::value, R::den>::type { }; template struct ratio_sign : mpl::sign_c { }; template struct ratio_lcm : ratio::value, mpl::gcd_c::value>::type { }; #endif } // namespace boost #endif // BOOST_RATIO_RATIO_HPP passenger-4.0.37/ext/boost/ratio/ratio_fwd.hpp000644 000765 000024 00000007235 12233035540 021756 0ustar00honglistaff000000 000000 // ratio_fwd.hpp ---------------------------------------------------------------// // Copyright 2008 Howard Hinnant // Copyright 2008 Beman Dawes // Copyright 2009 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt /* This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype. Many thanks to Howard for making his code available under the Boost license. The original code was modified to conform to Boost conventions and to section 20.4 Compile-time rational arithmetic [ratio], of the C++ committee working paper N2798. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf. time2_demo contained this comment: Much thanks to Andrei Alexandrescu, Walter Brown, Peter Dimov, Jeff Garland, Terry Golubiewski, Daniel Krugler, Anthony Williams. */ // The way overflow is managed for ratio_less is taken from llvm/libcxx/include/ratio #ifndef BOOST_RATIO_RATIO_FWD_HPP #define BOOST_RATIO_RATIO_FWD_HPP #include namespace boost { //----------------------------------------------------------------------------// // // // 20.6 Compile-time rational arithmetic [ratio] // // // //----------------------------------------------------------------------------// // ratio template class ratio; // ratio arithmetic template struct ratio_add; template struct ratio_subtract; template struct ratio_multiply; template struct ratio_divide; // ratio comparison template struct ratio_equal; template struct ratio_not_equal; template struct ratio_less; template struct ratio_less_equal; template struct ratio_greater; template struct ratio_greater_equal; // convenience SI typedefs typedef ratio atto; typedef ratio femto; typedef ratio pico; typedef ratio nano; typedef ratio micro; typedef ratio milli; typedef ratio centi; typedef ratio deci; typedef ratio< BOOST_RATIO_INTMAX_C(10), BOOST_RATIO_INTMAX_C(1)> deca; typedef ratio< BOOST_RATIO_INTMAX_C(100), BOOST_RATIO_INTMAX_C(1)> hecto; typedef ratio< BOOST_RATIO_INTMAX_C(1000), BOOST_RATIO_INTMAX_C(1)> kilo; typedef ratio< BOOST_RATIO_INTMAX_C(1000000), BOOST_RATIO_INTMAX_C(1)> mega; typedef ratio< BOOST_RATIO_INTMAX_C(1000000000), BOOST_RATIO_INTMAX_C(1)> giga; typedef ratio< BOOST_RATIO_INTMAX_C(1000000000000), BOOST_RATIO_INTMAX_C(1)> tera; typedef ratio< BOOST_RATIO_INTMAX_C(1000000000000000), BOOST_RATIO_INTMAX_C(1)> peta; typedef ratio exa; } // namespace boost #endif // BOOST_RATIO_HPP passenger-4.0.37/ext/boost/ratio/detail/mpl/000755 000765 000024 00000000000 12233035540 021312 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/ratio/detail/overflow_helpers.hpp000644 000765 000024 00000031111 12233035540 024615 0ustar00honglistaff000000 000000 // ratio.hpp ---------------------------------------------------------------// // Copyright 2008 Howard Hinnant // Copyright 2008 Beman Dawes // Copyright 2009 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt /* This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype. Many thanks to Howard for making his code available under the Boost license. The original code was modified to conform to Boost conventions and to section 20.4 Compile-time rational arithmetic [ratio], of the C++ committee working paper N2798. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf. time2_demo contained this comment: Much thanks to Andrei Alexandrescu, Walter Brown, Peter Dimov, Jeff Garland, Terry Golubiewski, Daniel Krugler, Anthony Williams. */ // The way overflow is managed for ratio_less is taken from llvm/libcxx/include/ratio #ifndef BOOST_RATIO_DETAIL_RATIO_OPERATIONS_HPP #define BOOST_RATIO_DETAIL_RATIO_OPERATIONS_HPP #include #include #include #include #include #include #include #include #include #include // // We simply cannot include this header on gcc without getting copious warnings of the kind: // // boost/integer.hpp:77:30: warning: use of C99 long long integer constant // // And yet there is no other reasonable implementation, so we declare this a system header // to suppress these warnings. // #if defined(__GNUC__) && (__GNUC__ >= 4) #pragma GCC system_header #endif namespace boost { //----------------------------------------------------------------------------// // helpers // //----------------------------------------------------------------------------// namespace ratio_detail { template ::value> class br_add; template class br_add { static const boost::intmax_t min = boost::integer_traits::const_min; static const boost::intmax_t max = boost::integer_traits::const_max; BOOST_RATIO_STATIC_ASSERT(X <= max - Y , BOOST_RATIO_OVERFLOW_IN_ADD, ()); public: static const boost::intmax_t value = X + Y; }; template class br_add { public: static const boost::intmax_t value = X; }; template class br_add { static const boost::intmax_t min = boost::integer_traits::const_min; static const boost::intmax_t max = boost::integer_traits::const_max; BOOST_RATIO_STATIC_ASSERT(min - Y <= X, BOOST_RATIO_OVERFLOW_IN_ADD, ()); public: static const boost::intmax_t value = X + Y; }; template ::value> class br_sub; template class br_sub { static const boost::intmax_t min = boost::integer_traits::const_min; static const boost::intmax_t max = boost::integer_traits::const_max; BOOST_RATIO_STATIC_ASSERT(min + Y <= X, BOOST_RATIO_OVERFLOW_IN_SUB, ()); public: static const boost::intmax_t value = X - Y; }; template class br_sub { public: static const boost::intmax_t value = X; }; template class br_sub { static const boost::intmax_t min = boost::integer_traits::const_min; static const boost::intmax_t max = boost::integer_traits::const_max; BOOST_RATIO_STATIC_ASSERT(X <= max + Y, BOOST_RATIO_OVERFLOW_IN_SUB, ()); public: static const boost::intmax_t value = X - Y; }; template class br_mul { static const boost::intmax_t nan = boost::intmax_t(BOOST_RATIO_UINTMAX_C(1) << (sizeof(boost::intmax_t) * CHAR_BIT - 1)); static const boost::intmax_t min = boost::integer_traits::const_min; static const boost::intmax_t max = boost::integer_traits::const_max; static const boost::intmax_t a_x = mpl::abs_c::value; static const boost::intmax_t a_y = mpl::abs_c::value; BOOST_RATIO_STATIC_ASSERT(X != nan, BOOST_RATIO_OVERFLOW_IN_MUL, ()); BOOST_RATIO_STATIC_ASSERT(Y != nan, BOOST_RATIO_OVERFLOW_IN_MUL, ()); BOOST_RATIO_STATIC_ASSERT(a_x <= max / a_y, BOOST_RATIO_OVERFLOW_IN_MUL, ()); public: static const boost::intmax_t value = X * Y; }; template class br_mul<0, Y> { public: static const boost::intmax_t value = 0; }; template class br_mul { public: static const boost::intmax_t value = 0; }; template <> class br_mul<0, 0> { public: static const boost::intmax_t value = 0; }; // Not actually used but left here in case needed in future maintenance template class br_div { static const boost::intmax_t nan = boost::intmax_t(BOOST_RATIO_UINTMAX_C(1) << (sizeof(boost::intmax_t) * CHAR_BIT - 1)); static const boost::intmax_t min = boost::integer_traits::const_min; static const boost::intmax_t max = boost::integer_traits::const_max; BOOST_RATIO_STATIC_ASSERT(X != nan, BOOST_RATIO_OVERFLOW_IN_DIV, ()); BOOST_RATIO_STATIC_ASSERT(Y != nan, BOOST_RATIO_OVERFLOW_IN_DIV, ()); BOOST_RATIO_STATIC_ASSERT(Y != 0, BOOST_RATIO_DIVIDE_BY_0, ()); public: static const boost::intmax_t value = X / Y; }; // ratio arithmetic template struct ratio_add; template struct ratio_subtract; template struct ratio_multiply; template struct ratio_divide; template struct ratio_add { //The nested typedef type shall be a synonym for ratio::type where T1 has the value R1::num * //R2::den + R2::num * R1::den and T2 has the value R1::den * R2::den. // As the preceding doesn't works because of overflow on boost::intmax_t we need something more elaborated. private: static const boost::intmax_t gcd_n1_n2 = mpl::gcd_c::value; static const boost::intmax_t gcd_d1_d2 = mpl::gcd_c::value; public: // No need to normalize as ratio_multiply is already normalized typedef typename ratio_multiply < ratio, ratio < boost::ratio_detail::br_add < boost::ratio_detail::br_mul::value, boost::ratio_detail::br_mul::value >::value, R2::den > >::type type; }; template struct ratio_add > { typedef R type; }; template struct ratio_subtract { //The nested typedef type shall be a synonym for ratio::type where T1 has the value // R1::num *R2::den - R2::num * R1::den and T2 has the value R1::den * R2::den. // As the preceding doesn't works because of overflow on boost::intmax_t we need something more elaborated. private: static const boost::intmax_t gcd_n1_n2 = mpl::gcd_c::value; static const boost::intmax_t gcd_d1_d2 = mpl::gcd_c::value; public: // No need to normalize as ratio_multiply is already normalized typedef typename ratio_multiply < ratio, ratio < boost::ratio_detail::br_sub < boost::ratio_detail::br_mul::value, boost::ratio_detail::br_mul::value >::value, R2::den > >::type type; }; template struct ratio_subtract > { typedef R type; }; template struct ratio_multiply { // The nested typedef type shall be a synonym for ratio::type. // As the preceding doesn't works because of overflow on boost::intmax_t we need something more elaborated. private: static const boost::intmax_t gcd_n1_d2 = mpl::gcd_c::value; static const boost::intmax_t gcd_d1_n2 = mpl::gcd_c::value; public: typedef typename ratio < boost::ratio_detail::br_mul::value, boost::ratio_detail::br_mul::value >::type type; }; template struct ratio_divide { // The nested typedef type shall be a synonym for ratio::type. // As the preceding doesn't works because of overflow on boost::intmax_t we need something more elaborated. private: static const boost::intmax_t gcd_n1_n2 = mpl::gcd_c::value; static const boost::intmax_t gcd_d1_d2 = mpl::gcd_c::value; public: typedef typename ratio < boost::ratio_detail::br_mul::value, boost::ratio_detail::br_mul::value >::type type; }; template struct is_evenly_divisible_by { private: static const boost::intmax_t gcd_n1_n2 = mpl::gcd_c::value; static const boost::intmax_t gcd_d1_d2 = mpl::gcd_c::value; public: typedef integral_constant type; }; template struct is_ratio : public boost::false_type {}; template struct is_ratio > : public boost::true_type {}; template struct ratio_less1 { static const bool value = Q1 < Q2; }; template struct ratio_less1 { static const bool value = false; }; template struct ratio_less1 { static const bool value = true; }; template struct ratio_less1 { static const bool value = false; }; template struct ratio_less1 { static const bool value = ratio_less1, ratio >::value; }; template < class R1, class R2, boost::intmax_t S1 = mpl::sign_c::value, boost::intmax_t S2 = mpl::sign_c::value > struct ratio_less { static const bool value = S1 < S2; }; template struct ratio_less { static const bool value = ratio_less1::value; }; template struct ratio_less { static const bool value = ratio_less1, ratio<-R1::num, R1::den> >::value; }; } // namespace ratio_detail } // namespace boost #endif // BOOST_RATIO_HPP passenger-4.0.37/ext/boost/ratio/detail/mpl/abs.hpp000644 000765 000024 00000004116 12233035540 022572 0ustar00honglistaff000000 000000 //////////////////////////////////////////////////////////////////// // // Copyright Vicente J. Botet Escriba 2010 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // //////////////////////////////////////////////////////////////////// #ifndef BOOST_MPL_ABS_HPP_INCLUDED #define BOOST_MPL_ABS_HPP_INCLUDED #include #include #include #include #include #include #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( defined(BOOST_MSVC) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ ) # define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2 #endif namespace boost { namespace mpl { template< typename Tag > struct abs_impl; template< typename T > struct abs_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N) > struct abs : abs_impl< typename abs_tag::type >::template apply::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(1, abs, (N)) }; BOOST_MPL_AUX_NA_SPEC(1, abs) template< typename T , T n1 > struct abs_c : abs > { }; #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) namespace aux { template< typename T, T n > struct abs_wknd { BOOST_STATIC_CONSTANT(T, value = (n < 0 ? -n : n)); typedef integral_c type; }; } #endif template<> struct abs_impl { #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) template< typename N > struct apply : aux::abs_wknd< typename N::value_type, N::value > #else template< typename N > struct apply : integral_c< typename N::value_type, ((N::value < 0) ? (-N::value) : N::value ) > #endif { }; }; }} #endif // BOOST_MPL_ABS_HPP_INCLUDED passenger-4.0.37/ext/boost/ratio/detail/mpl/gcd.hpp000644 000765 000024 00000007154 12233035540 022567 0ustar00honglistaff000000 000000 //////////////////////////////////////////////////////////////////// // // Copyright Vicente J. Botet Escriba 2010 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // //////////////////////////////////////////////////////////////////// #ifndef BOOST_MPL_GCD_HPP_INCLUDED #define BOOST_MPL_GCD_HPP_INCLUDED #include #include #include #include #include #include #include #include #include #include #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( defined(BOOST_MSVC) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ ) # define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2 #endif namespace boost { namespace mpl { template< typename Tag1, typename Tag2 > struct gcd_impl; template< typename T > struct gcd_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct gcd : gcd_impl< typename gcd_tag::type , typename gcd_tag::type >::template apply::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, gcd, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC(2, gcd) template< typename T , T n1 , T n2 > struct gcd_c : gcd,integral_c > { }; namespace aux { // Workaround for error: the type of partial specialization template parameter constant "n2" // depends on another template parameter // Note: this solution could be wrong for n1 or n2 = [2**63 .. 2**64-1] #if defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) template< typename T1, boost::intmax_t n1, bool n1_is_0 , typename T2, boost::intmax_t n2, bool n2_is_0 > struct gcd_aux : gcd_aux {}; template struct gcd_aux : integral_c {}; template struct gcd_aux : integral_c {}; #else // defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) template< typename T1, T1 n1, bool n1_is_0, typename T2, T2 n2, bool n2_is_0 > struct gcd_aux : gcd_aux::type, //~ T1, (n1 % n2), (n1 % n2)==0> {}; template struct gcd_aux : integral_c {}; template struct gcd_aux : integral_c {}; #endif // defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) } template<> struct gcd_impl { template< typename N1, typename N2 > struct apply : abs > { }; }; }} #endif // BOOST_MPL_GCD_HPP_INCLUDED passenger-4.0.37/ext/boost/ratio/detail/mpl/lcm.hpp000644 000765 000024 00000007304 12233035540 022602 0ustar00honglistaff000000 000000 //////////////////////////////////////////////////////////////////// // // Copyright Vicente J. Botet Escriba 2010 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // //////////////////////////////////////////////////////////////////// #ifndef BOOST_MPL_LCM_HPP_INCLUDED #define BOOST_MPL_LCM_HPP_INCLUDED #include #include #include #include #include #include #include #include #include #include #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( defined(BOOST_MSVC) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ ) # define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2 #endif namespace boost { namespace mpl { template< typename Tag1, typename Tag2 > struct lcm_impl; template< typename T > struct lcm_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct lcm : lcm_impl< typename lcm_tag::type , typename lcm_tag::type >::template apply::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, lcm, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC(2, lcm) template< typename T , T n1 , T n2 > struct lcm_c : lcm,integral_c > { }; namespace aux { // Workaround for error: the type of partial specialization template parameter constant "n2" // depends on another template parameter // Note: this solution could be wrong for n1 or n2 = [2**63 .. 2**64-1] #if defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) template< typename T1, boost::intmax_t n1, bool n1_is_0 , typename T2, boost::intmax_t n2, bool n2_is_0 > struct lcm_aux : abs::type, ( n1 / gcd, integral_c >::value * n2 ) > > {}; template struct lcm_aux : integral_c {}; template struct lcm_aux : integral_c {}; #else // defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) template< typename T1, T1 n1, bool n1_is_0, typename T2, T2 n2, bool n2_is_0 > struct lcm_aux : abs::type, ( n1 / gcd, integral_c >::value * n2 ) > > {}; template struct lcm_aux : integral_c {}; template struct lcm_aux : integral_c {}; #endif // defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) } template<> struct lcm_impl { template< typename N1, typename N2 > struct apply : abs > { }; }; }} #endif // BOOST_MPL_LCM_HPP_INCLUDED passenger-4.0.37/ext/boost/ratio/detail/mpl/sign.hpp000644 000765 000024 00000004157 12233035540 022772 0ustar00honglistaff000000 000000 //////////////////////////////////////////////////////////////////// // // Copyright Vicente J. Botet Escriba 2010 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // //////////////////////////////////////////////////////////////////// #ifndef BOOST_MPL_SIGN_HPP_INCLUDED #define BOOST_MPL_SIGN_HPP_INCLUDED #include #include #include #include #include #include #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( defined(BOOST_MSVC) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ ) # define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2 #endif namespace boost { namespace mpl { template< typename Tag > struct sign_impl; template< typename T > struct sign_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N) > struct sign : sign_impl< typename sign_tag::type >::template apply::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(1, sign, (N)) }; BOOST_MPL_AUX_NA_SPEC(1, sign) template< typename T , T n1 > struct sign_c : sign > { }; #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) namespace aux { template< typename T, T n > struct sign_wknd { BOOST_STATIC_CONSTANT(T, value = (n == 0 ? 0 : (n < 0 ? -1 : 1))); typedef integral_c type; }; } #endif template<> struct sign_impl { #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC_2) template< typename N > struct apply : aux::sign_wknd< typename N::value_type, N::value > #else template< typename N > struct apply : integral_c< typename N::value_type, (N::value == 0 ? 0 : (N::value < 0 ? -1 : 1)) > #endif { }; }; }} #endif // BOOST_MPL_SIGN_HPP_INCLUDED passenger-4.0.37/ext/boost/range/algorithm/000755 000765 000024 00000000000 12233035540 021224 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/range/as_literal.hpp000644 000765 000024 00000005776 12233035540 022105 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2006. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_AS_LITERAL_HPP #define BOOST_RANGE_AS_LITERAL_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING #include #else #include #include #include #include #ifndef BOOST_NO_CWCHAR #include #endif namespace boost { namespace range_detail { inline std::size_t length( const char* s ) { return strlen( s ); } #ifndef BOOST_NO_CWCHAR inline std::size_t length( const wchar_t* s ) { return wcslen( s ); } #endif // // Remark: the compiler cannot choose between T* and T[sz] // overloads, so we must put the T* internal to the // unconstrained version. // inline bool is_char_ptr( char* ) { return true; } inline bool is_char_ptr( const char* ) { return true; } #ifndef BOOST_NO_CWCHAR inline bool is_char_ptr( wchar_t* ) { return true; } inline bool is_char_ptr( const wchar_t* ) { return true; } #endif template< class T > inline long is_char_ptr( const T& /* r */ ) { return 0L; } template< class T > inline iterator_range make_range( T* const r, bool ) { return iterator_range( r, r + length(r) ); } template< class T > inline iterator_range::type> make_range( T& r, long ) { return boost::make_iterator_range( r ); } } template< class Range > inline iterator_range::type> as_literal( Range& r ) { return range_detail::make_range( r, range_detail::is_char_ptr(r) ); } template< class Range > inline iterator_range::type> as_literal( const Range& r ) { return range_detail::make_range( r, range_detail::is_char_ptr(r) ); } template< class Char, std::size_t sz > inline iterator_range as_literal( Char (&arr)[sz] ) { return range_detail::make_range( arr, range_detail::is_char_ptr(arr) ); } template< class Char, std::size_t sz > inline iterator_range as_literal( const Char (&arr)[sz] ) { return range_detail::make_range( arr, range_detail::is_char_ptr(arr) ); } } #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING #endif passenger-4.0.37/ext/boost/range/begin.hpp000644 000765 000024 00000007033 12233035540 021036 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_BEGIN_HPP #define BOOST_RANGE_BEGIN_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING #include #else #include namespace boost { #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ !BOOST_WORKAROUND(__GNUC__, < 3) \ /**/ namespace range_detail { #endif ////////////////////////////////////////////////////////////////////// // primary template ////////////////////////////////////////////////////////////////////// template< typename C > inline BOOST_DEDUCED_TYPENAME range_iterator::type range_begin( C& c ) { // // If you get a compile-error here, it is most likely because // you have not implemented range_begin() properly in // the namespace of C // return c.begin(); } ////////////////////////////////////////////////////////////////////// // pair ////////////////////////////////////////////////////////////////////// template< typename Iterator > inline Iterator range_begin( const std::pair& p ) { return p.first; } template< typename Iterator > inline Iterator range_begin( std::pair& p ) { return p.first; } ////////////////////////////////////////////////////////////////////// // array ////////////////////////////////////////////////////////////////////// // // May this be discarded? Or is it needed for bad compilers? // template< typename T, std::size_t sz > inline const T* range_begin( const T (&a)[sz] ) { return a; } template< typename T, std::size_t sz > inline T* range_begin( T (&a)[sz] ) { return a; } #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ !BOOST_WORKAROUND(__GNUC__, < 3) \ /**/ } // namespace 'range_detail' #endif // Use a ADL namespace barrier to avoid ambiguity with other unqualified // calls. This is particularly important with C++0x encouraging // unqualified calls to begin/end. namespace range_adl_barrier { template< class T > inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( T& r ) { #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ !BOOST_WORKAROUND(__GNUC__, < 3) \ /**/ using namespace range_detail; #endif return range_begin( r ); } template< class T > inline BOOST_DEDUCED_TYPENAME range_iterator::type begin( const T& r ) { #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ !BOOST_WORKAROUND(__GNUC__, < 3) \ /**/ using namespace range_detail; #endif return range_begin( r ); } } // namespace range_adl_barrier } // namespace boost #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING namespace boost { namespace range_adl_barrier { template< class T > inline BOOST_DEDUCED_TYPENAME range_iterator::type const_begin( const T& r ) { return boost::range_adl_barrier::begin( r ); } } // namespace range_adl_barrier using namespace range_adl_barrier; } // namespace boost #endif passenger-4.0.37/ext/boost/range/concepts.hpp000644 000765 000024 00000031457 12233035540 021577 0ustar00honglistaff000000 000000 // Boost.Range library concept checks // // Copyright Neil Groves 2009. Use, modification and distribution // are subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Copyright Daniel Walker 2006. Use, modification and distribution // are subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_CONCEPTS_HPP #define BOOST_RANGE_CONCEPTS_HPP #include #include #include #include #include #include #include /*! * \file * \brief Concept checks for the Boost Range library. * * The structures in this file may be used in conjunction with the * Boost Concept Check library to insure that the type of a function * parameter is compatible with a range concept. If not, a meaningful * compile time error is generated. Checks are provided for the range * concepts related to iterator traversal categories. For example, the * following line checks that the type T models the ForwardRange * concept. * * \code * BOOST_CONCEPT_ASSERT((ForwardRangeConcept)); * \endcode * * A different concept check is required to ensure writeable value * access. For example to check for a ForwardRange that can be written * to, the following code is required. * * \code * BOOST_CONCEPT_ASSERT((WriteableForwardRangeConcept)); * \endcode * * \see http://www.boost.org/libs/range/doc/range.html for details * about range concepts. * \see http://www.boost.org/libs/iterator/doc/iterator_concepts.html * for details about iterator concepts. * \see http://www.boost.org/libs/concept_check/concept_check.htm for * details about concept checks. */ namespace boost { namespace range_detail { #ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT // List broken compiler versions here: #ifdef __GNUC__ // GNUC 4.2 has strange issues correctly detecting compliance with the Concepts // hence the least disruptive approach is to turn-off the concept checking for // this version of the compiler. #if __GNUC__ == 4 && __GNUC_MINOR__ == 2 #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 #endif #endif #ifdef __BORLANDC__ #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 #endif #ifdef __PATHCC__ #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 0 #endif // Default to using the concept asserts unless we have defined it off // during the search for black listed compilers. #ifndef BOOST_RANGE_ENABLE_CONCEPT_ASSERT #define BOOST_RANGE_ENABLE_CONCEPT_ASSERT 1 #endif #endif #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT #define BOOST_RANGE_CONCEPT_ASSERT( x ) BOOST_CONCEPT_ASSERT( x ) #else #define BOOST_RANGE_CONCEPT_ASSERT( x ) #endif // Rationale for the inclusion of redefined iterator concept // classes: // // The Range algorithms often do not require that the iterators are // Assignable or default constructable, but the correct standard // conformant iterators do require the iterators to be a model of the // Assignable concept. // Iterators that contains a functor that is not assignable therefore // are not correct models of the standard iterator concepts, // despite being adequate for most algorithms. An example of this // use case is the combination of the boost::adaptors::filtered // class with a boost::lambda::bind generated functor. // Ultimately modeling the range concepts using composition // with the Boost.Iterator concepts would render the library // incompatible with many common Boost.Lambda expressions. template struct IncrementableIteratorConcept : CopyConstructible { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT typedef BOOST_DEDUCED_TYPENAME iterator_traversal::type traversal_category; BOOST_RANGE_CONCEPT_ASSERT(( Convertible< traversal_category, incrementable_traversal_tag >)); BOOST_CONCEPT_USAGE(IncrementableIteratorConcept) { ++i; (void)i++; } private: Iterator i; #endif }; template struct SinglePassIteratorConcept : IncrementableIteratorConcept , EqualityComparable { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT BOOST_RANGE_CONCEPT_ASSERT(( Convertible< BOOST_DEDUCED_TYPENAME SinglePassIteratorConcept::traversal_category, single_pass_traversal_tag >)); BOOST_CONCEPT_USAGE(SinglePassIteratorConcept) { Iterator i2(++i); boost::ignore_unused_variable_warning(i2); // deliberately we are loose with the postfix version for the single pass // iterator due to the commonly poor adherence to the specification means that // many algorithms would be unusable, whereas actually without the check they // work (void)(i++); BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r1(*i); boost::ignore_unused_variable_warning(r1); BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r2(*(++i)); boost::ignore_unused_variable_warning(r2); } private: Iterator i; #endif }; template struct ForwardIteratorConcept : SinglePassIteratorConcept , DefaultConstructible { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::difference_type difference_type; BOOST_MPL_ASSERT((is_integral)); BOOST_MPL_ASSERT_RELATION(std::numeric_limits::is_signed, ==, true); BOOST_RANGE_CONCEPT_ASSERT(( Convertible< BOOST_DEDUCED_TYPENAME ForwardIteratorConcept::traversal_category, forward_traversal_tag >)); BOOST_CONCEPT_USAGE(ForwardIteratorConcept) { // See the above note in the SinglePassIteratorConcept about the handling of the // postfix increment. Since with forward and better iterators there is no need // for a proxy, we can sensibly require that the dereference result // is convertible to reference. Iterator i2(i++); boost::ignore_unused_variable_warning(i2); BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference r(*(i++)); boost::ignore_unused_variable_warning(r); } private: Iterator i; #endif }; template struct BidirectionalIteratorConcept : ForwardIteratorConcept { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT BOOST_RANGE_CONCEPT_ASSERT(( Convertible< BOOST_DEDUCED_TYPENAME BidirectionalIteratorConcept::traversal_category, bidirectional_traversal_tag >)); BOOST_CONCEPT_USAGE(BidirectionalIteratorConcept) { --i; (void)i--; } private: Iterator i; #endif }; template struct RandomAccessIteratorConcept : BidirectionalIteratorConcept { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT BOOST_RANGE_CONCEPT_ASSERT(( Convertible< BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::traversal_category, random_access_traversal_tag >)); BOOST_CONCEPT_USAGE(RandomAccessIteratorConcept) { i += n; i = i + n; i = n + i; i -= n; i = i - n; n = i - j; } private: BOOST_DEDUCED_TYPENAME RandomAccessIteratorConcept::difference_type n; Iterator i; Iterator j; #endif }; } // namespace range_detail //! Check if a type T models the SinglePassRange range concept. template struct SinglePassRangeConcept { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT typedef BOOST_DEDUCED_TYPENAME range_iterator::type const_iterator; typedef BOOST_DEDUCED_TYPENAME range_iterator::type iterator; BOOST_RANGE_CONCEPT_ASSERT((range_detail::SinglePassIteratorConcept)); BOOST_RANGE_CONCEPT_ASSERT((range_detail::SinglePassIteratorConcept)); BOOST_CONCEPT_USAGE(SinglePassRangeConcept) { // This has been modified from assigning to this->i // (where i was a member variable) to improve // compatibility with Boost.Lambda iterator i1 = boost::begin(*m_range); iterator i2 = boost::end(*m_range); ignore_unused_variable_warning(i1); ignore_unused_variable_warning(i2); const_constraints(*m_range); } private: void const_constraints(const T& const_range) { const_iterator ci1 = boost::begin(const_range); const_iterator ci2 = boost::end(const_range); ignore_unused_variable_warning(ci1); ignore_unused_variable_warning(ci2); } // Rationale: // The type of m_range is T* rather than T because it allows // T to be an abstract class. The other obvious alternative of // T& produces a warning on some compilers. T* m_range; #endif }; //! Check if a type T models the ForwardRange range concept. template struct ForwardRangeConcept : SinglePassRangeConcept { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT BOOST_RANGE_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept)); BOOST_RANGE_CONCEPT_ASSERT((range_detail::ForwardIteratorConcept)); #endif }; template struct WriteableRangeConcept { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT typedef BOOST_DEDUCED_TYPENAME range_iterator::type iterator; BOOST_CONCEPT_USAGE(WriteableRangeConcept) { *i = v; } private: iterator i; BOOST_DEDUCED_TYPENAME range_value::type v; #endif }; //! Check if a type T models the WriteableForwardRange range concept. template struct WriteableForwardRangeConcept : ForwardRangeConcept , WriteableRangeConcept { }; //! Check if a type T models the BidirectionalRange range concept. template struct BidirectionalRangeConcept : ForwardRangeConcept { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT BOOST_RANGE_CONCEPT_ASSERT((range_detail::BidirectionalIteratorConcept)); BOOST_RANGE_CONCEPT_ASSERT((range_detail::BidirectionalIteratorConcept)); #endif }; //! Check if a type T models the WriteableBidirectionalRange range concept. template struct WriteableBidirectionalRangeConcept : BidirectionalRangeConcept , WriteableRangeConcept { }; //! Check if a type T models the RandomAccessRange range concept. template struct RandomAccessRangeConcept : BidirectionalRangeConcept { #if BOOST_RANGE_ENABLE_CONCEPT_ASSERT BOOST_RANGE_CONCEPT_ASSERT((range_detail::RandomAccessIteratorConcept)); BOOST_RANGE_CONCEPT_ASSERT((range_detail::RandomAccessIteratorConcept)); #endif }; //! Check if a type T models the WriteableRandomAccessRange range concept. template struct WriteableRandomAccessRangeConcept : RandomAccessRangeConcept , WriteableRangeConcept { }; } // namespace boost #endif // BOOST_RANGE_CONCEPTS_HPP passenger-4.0.37/ext/boost/range/config.hpp000644 000765 000024 00000002463 12233035540 021221 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_CONFIG_HPP #define BOOST_RANGE_CONFIG_HPP #include #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #ifdef BOOST_RANGE_DEDUCED_TYPENAME #error "macro already defined!" #endif #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # define BOOST_RANGE_DEDUCED_TYPENAME typename #else # if BOOST_WORKAROUND(BOOST_MSVC, == 1300) && !defined(_MSC_EXTENSIONS) # define BOOST_RANGE_DEDUCED_TYPENAME typename # else # define BOOST_RANGE_DEDUCED_TYPENAME BOOST_DEDUCED_TYPENAME # endif #endif #ifdef BOOST_RANGE_NO_ARRAY_SUPPORT #error "macro already defined!" #endif #if BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) || BOOST_WORKAROUND( __MWERKS__, <= 0x3003 ) #define BOOST_RANGE_NO_ARRAY_SUPPORT 1 #endif #ifdef BOOST_RANGE_NO_ARRAY_SUPPORT #define BOOST_RANGE_ARRAY_REF() (boost_range_array) #define BOOST_RANGE_NO_STATIC_ASSERT #else #define BOOST_RANGE_ARRAY_REF() (&boost_range_array) #endif #endif passenger-4.0.37/ext/boost/range/const_iterator.hpp000644 000765 000024 00000003502 12233035540 023006 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_CONST_ITERATOR_HPP #define BOOST_RANGE_CONST_ITERATOR_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #include #else #include #include #include #include namespace boost { ////////////////////////////////////////////////////////////////////////// // default ////////////////////////////////////////////////////////////////////////// namespace range_detail { BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( const_iterator ) } template< typename C > struct range_const_iterator : range_detail::extract_const_iterator {}; ////////////////////////////////////////////////////////////////////////// // pair ////////////////////////////////////////////////////////////////////////// template< typename Iterator > struct range_const_iterator< std::pair > { typedef Iterator type; }; ////////////////////////////////////////////////////////////////////////// // array ////////////////////////////////////////////////////////////////////////// template< typename T, std::size_t sz > struct range_const_iterator< T[sz] > { typedef const T* type; }; } // namespace boost #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif passenger-4.0.37/ext/boost/range/detail/000755 000765 000024 00000000000 12233035540 020500 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/range/difference_type.hpp000644 000765 000024 00000001342 12233035540 023102 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_DIFFERENCE_TYPE_HPP #define BOOST_RANGE_DIFFERENCE_TYPE_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #include #include namespace boost { template< class T > struct range_difference : iterator_difference< typename range_iterator::type > { }; } #endif passenger-4.0.37/ext/boost/range/distance.hpp000644 000765 000024 00000001454 12233035540 021545 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2006. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_DISTANCE_HPP #define BOOST_RANGE_DISTANCE_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #include #include namespace boost { template< class T > inline BOOST_DEDUCED_TYPENAME range_difference::type distance( const T& r ) { return std::distance( boost::begin( r ), boost::end( r ) ); } } // namespace 'boost' #endif passenger-4.0.37/ext/boost/range/empty.hpp000644 000765 000024 00000001334 12233035540 021106 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_EMPTY_HPP #define BOOST_RANGE_EMPTY_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #include #include namespace boost { template< class T > inline bool empty( const T& r ) { return boost::begin( r ) == boost::end( r ); } } // namespace 'boost' #endif passenger-4.0.37/ext/boost/range/end.hpp000644 000765 000024 00000007105 12233035540 020520 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_END_HPP #define BOOST_RANGE_END_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING #include #else #include #include #include namespace boost { #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ !BOOST_WORKAROUND(__GNUC__, < 3) \ /**/ namespace range_detail { #endif ////////////////////////////////////////////////////////////////////// // primary template ////////////////////////////////////////////////////////////////////// template< typename C > inline BOOST_DEDUCED_TYPENAME range_iterator::type range_end( C& c ) { // // If you get a compile-error here, it is most likely because // you have not implemented range_begin() properly in // the namespace of C // return c.end(); } ////////////////////////////////////////////////////////////////////// // pair ////////////////////////////////////////////////////////////////////// template< typename Iterator > inline Iterator range_end( const std::pair& p ) { return p.second; } template< typename Iterator > inline Iterator range_end( std::pair& p ) { return p.second; } ////////////////////////////////////////////////////////////////////// // array ////////////////////////////////////////////////////////////////////// template< typename T, std::size_t sz > inline const T* range_end( const T (&a)[sz] ) { return range_detail::array_end( a ); } template< typename T, std::size_t sz > inline T* range_end( T (&a)[sz] ) { return range_detail::array_end( a ); } #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ !BOOST_WORKAROUND(__GNUC__, < 3) \ /**/ } // namespace 'range_detail' #endif namespace range_adl_barrier { template< class T > inline BOOST_DEDUCED_TYPENAME range_iterator::type end( T& r ) { #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ !BOOST_WORKAROUND(__GNUC__, < 3) \ /**/ using namespace range_detail; #endif return range_end( r ); } template< class T > inline BOOST_DEDUCED_TYPENAME range_iterator::type end( const T& r ) { #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ !BOOST_WORKAROUND(__GNUC__, < 3) \ /**/ using namespace range_detail; #endif return range_end( r ); } } // namespace range_adl_barrier } // namespace 'boost' #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING namespace boost { namespace range_adl_barrier { template< class T > inline BOOST_DEDUCED_TYPENAME range_iterator::type const_end( const T& r ) { return boost::range_adl_barrier::end( r ); } } // namespace range_adl_barrier using namespace range_adl_barrier; } // namespace boost #endif passenger-4.0.37/ext/boost/range/functions.hpp000644 000765 000024 00000001276 12233035540 021765 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2006. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_FUNCTIONS_HPP #define BOOST_RANGE_FUNCTIONS_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #include #include #include #include #include #include #endif passenger-4.0.37/ext/boost/range/iterator.hpp000644 000765 000024 00000003524 12233035540 021604 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_ITERATOR_HPP #define BOOST_RANGE_ITERATOR_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include #include #include namespace boost { #if BOOST_WORKAROUND(BOOST_MSVC, == 1310) namespace range_detail_vc7_1 { template< typename C, typename Sig = void(C) > struct range_iterator { typedef BOOST_RANGE_DEDUCED_TYPENAME mpl::eval_if_c< is_const::value, range_const_iterator< typename remove_const::type >, range_mutable_iterator >::type type; }; template< typename C, typename T > struct range_iterator< C, void(T[]) > { typedef T* type; }; } #endif template< typename C > struct range_iterator { #if BOOST_WORKAROUND(BOOST_MSVC, == 1310) typedef BOOST_RANGE_DEDUCED_TYPENAME range_detail_vc7_1::range_iterator::type type; #else typedef BOOST_RANGE_DEDUCED_TYPENAME mpl::eval_if_c< is_const::value, range_const_iterator< typename remove_const::type >, range_mutable_iterator >::type type; #endif }; } // namespace boost //#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif passenger-4.0.37/ext/boost/range/iterator_range.hpp000644 000765 000024 00000001022 12233035540 022747 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Neil Groves 2009. // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_ITERATOR_RANGE_HPP_INCLUDED #define BOOST_RANGE_ITERATOR_RANGE_HPP_INCLUDED #include "boost/range/iterator_range_core.hpp" #include "boost/range/iterator_range_io.hpp" #endif // include guard passenger-4.0.37/ext/boost/range/iterator_range_core.hpp000644 000765 000024 00000054500 12233035540 023770 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Neil Groves & Thorsten Ottosen & Pavol Droba 2003-2004. // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED #define BOOST_RANGE_ITERATOR_RANGE_CORE_HPP_INCLUDED #include // Define __STL_CONFIG_H, if appropriate. #include #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) #pragma warning( push ) #pragma warning( disable : 4996 ) #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /*! \file Defines the \c iterator_class and related functions. \c iterator_range is a simple wrapper of iterator pair idiom. It provides a rich subset of Container interface. */ namespace boost { namespace iterator_range_detail { // // The functions adl_begin and adl_end are implemented in a separate // class for gcc-2.9x // template struct iterator_range_impl { template< class ForwardRange > static IteratorT adl_begin( ForwardRange& r ) { return static_cast( boost::begin( r ) ); } template< class ForwardRange > static IteratorT adl_end( ForwardRange& r ) { return static_cast( boost::end( r ) ); } }; template< class Left, class Right > inline bool less_than( const Left& l, const Right& r ) { return std::lexicographical_compare( boost::begin(l), boost::end(l), boost::begin(r), boost::end(r) ); } template< class Left, class Right > inline bool greater_than( const Left& l, const Right& r ) { return less_than(r,l); } template< class Left, class Right > inline bool less_or_equal_than( const Left& l, const Right& r ) { return !iterator_range_detail::less_than(r,l); } template< class Left, class Right > inline bool greater_or_equal_than( const Left& l, const Right& r ) { return !iterator_range_detail::less_than(l,r); } // This version is maintained since it is used in other boost libraries // such as Boost.Assign template< class Left, class Right > inline bool equal(const Left& l, const Right& r) { return boost::equal(l, r); } struct range_tag { }; struct const_range_tag { }; } // iterator range template class -----------------------------------------// //! iterator_range class /*! An \c iterator_range delimits a range in a sequence by beginning and ending iterators. An iterator_range can be passed to an algorithm which requires a sequence as an input. For example, the \c toupper() function may be used most frequently on strings, but can also be used on iterator_ranges: \code boost::tolower( find( s, "UPPERCASE STRING" ) ); \endcode Many algorithms working with sequences take a pair of iterators, delimiting a working range, as an arguments. The \c iterator_range class is an encapsulation of a range identified by a pair of iterators. It provides a collection interface, so it is possible to pass an instance to an algorithm requiring a collection as an input. */ template class iterator_range { typedef range_detail::safe_bool< IteratorT iterator_range::* > safe_bool_t; protected: // Used by sub_range //! implementation class typedef iterator_range_detail::iterator_range_impl impl; public: //! this type typedef iterator_range type; typedef BOOST_DEDUCED_TYPENAME safe_bool_t::unspecified_bool_type unspecified_bool_type; //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type); //! Encapsulated value type typedef BOOST_DEDUCED_TYPENAME iterator_value::type value_type; //! Difference type typedef BOOST_DEDUCED_TYPENAME iterator_difference::type difference_type; //! Size type typedef std::size_t size_type; // note: must be unsigned //! This type typedef iterator_range this_type; //! Reference type // // Needed because value-type is the same for // const and non-const iterators // typedef BOOST_DEDUCED_TYPENAME iterator_reference::type reference; //! const_iterator type /*! There is no distinction between const_iterator and iterator. These typedefs are provides to fulfill container interface */ typedef IteratorT const_iterator; //! iterator type typedef IteratorT iterator; private: // for return value of operator()() typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< boost::mpl::or_< boost::is_abstract< value_type >, boost::is_array< value_type > >, reference, value_type >::type abstract_value_type; public: iterator_range() : m_Begin( iterator() ), m_End( iterator() ) { } //! Constructor from a pair of iterators template< class Iterator > iterator_range( Iterator Begin, Iterator End ) : m_Begin(Begin), m_End(End) {} //! Constructor from a Range template< class Range > iterator_range( const Range& r ) : m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ) {} //! Constructor from a Range template< class Range > iterator_range( Range& r ) : m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ) {} //! Constructor from a Range template< class Range > iterator_range( const Range& r, iterator_range_detail::const_range_tag ) : m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ) {} //! Constructor from a Range template< class Range > iterator_range( Range& r, iterator_range_detail::range_tag ) : m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ) {} #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) this_type& operator=( const this_type& r ) { m_Begin = r.begin(); m_End = r.end(); return *this; } #endif template< class Iterator > iterator_range& operator=( const iterator_range& r ) { m_Begin = r.begin(); m_End = r.end(); return *this; } template< class ForwardRange > iterator_range& operator=( ForwardRange& r ) { m_Begin = impl::adl_begin( r ); m_End = impl::adl_end( r ); return *this; } template< class ForwardRange > iterator_range& operator=( const ForwardRange& r ) { m_Begin = impl::adl_begin( r ); m_End = impl::adl_end( r ); return *this; } IteratorT begin() const { return m_Begin; } IteratorT end() const { return m_End; } difference_type size() const { return m_End - m_Begin; } bool empty() const { return m_Begin == m_End; } operator unspecified_bool_type() const { return safe_bool_t::to_unspecified_bool(m_Begin != m_End, &iterator_range::m_Begin); } bool operator!() const { return empty(); } bool equal( const iterator_range& r ) const { return m_Begin == r.m_Begin && m_End == r.m_End; } #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING bool operator==( const iterator_range& r ) const { return boost::equal( *this, r ); } bool operator!=( const iterator_range& r ) const { return !operator==(r); } bool operator<( const iterator_range& r ) const { return iterator_range_detail::less_than( *this, r ); } bool operator>( const iterator_range& r ) const { return iterator_range_detail::greater_than( *this, r ); } bool operator<=( const iterator_range& r ) const { return iterator_range_detail::less_or_equal_than( *this, r ); } bool operator>=( const iterator_range& r ) const { return iterator_range_detail::greater_or_equal_than( *this, r ); } #endif public: // convenience reference front() const { BOOST_ASSERT( !empty() ); return *m_Begin; } reference back() const { BOOST_ASSERT( !empty() ); IteratorT last( m_End ); return *--last; } // pop_front() - added to model the SinglePassRangePrimitiveConcept void pop_front() { BOOST_ASSERT( !empty() ); ++m_Begin; } // pop_back() - added to model the BidirectionalRangePrimitiveConcept void pop_back() { BOOST_ASSERT( !empty() ); --m_End; } reference operator[]( difference_type at ) const { BOOST_ASSERT( at >= 0 && at < size() ); return m_Begin[at]; } // // When storing transform iterators, operator[]() // fails because it returns by reference. Therefore // operator()() is provided for these cases. // abstract_value_type operator()( difference_type at ) const { BOOST_ASSERT( at >= 0 && at < size() ); return m_Begin[at]; } iterator_range& advance_begin( difference_type n ) { std::advance( m_Begin, n ); return *this; } iterator_range& advance_end( difference_type n ) { std::advance( m_End, n ); return *this; } private: // begin and end iterators IteratorT m_Begin; IteratorT m_End; protected: // // Allow subclasses an easy way to access the // base type // typedef iterator_range iterator_range_; }; // iterator range free-standing operators ---------------------------// ///////////////////////////////////////////////////////////////////// // comparison operators ///////////////////////////////////////////////////////////////////// template< class IteratorT, class ForwardRange > inline bool operator==( const ForwardRange& l, const iterator_range& r ) { return boost::equal( l, r ); } template< class IteratorT, class ForwardRange > inline bool operator!=( const ForwardRange& l, const iterator_range& r ) { return !boost::equal( l, r ); } template< class IteratorT, class ForwardRange > inline bool operator<( const ForwardRange& l, const iterator_range& r ) { return iterator_range_detail::less_than( l, r ); } template< class IteratorT, class ForwardRange > inline bool operator<=( const ForwardRange& l, const iterator_range& r ) { return iterator_range_detail::less_or_equal_than( l, r ); } template< class IteratorT, class ForwardRange > inline bool operator>( const ForwardRange& l, const iterator_range& r ) { return iterator_range_detail::greater_than( l, r ); } template< class IteratorT, class ForwardRange > inline bool operator>=( const ForwardRange& l, const iterator_range& r ) { return iterator_range_detail::greater_or_equal_than( l, r ); } #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING #else template< class Iterator1T, class Iterator2T > inline bool operator==( const iterator_range& l, const iterator_range& r ) { return boost::equal( l, r ); } template< class IteratorT, class ForwardRange > inline bool operator==( const iterator_range& l, const ForwardRange& r ) { return boost::equal( l, r ); } template< class Iterator1T, class Iterator2T > inline bool operator!=( const iterator_range& l, const iterator_range& r ) { return !boost::equal( l, r ); } template< class IteratorT, class ForwardRange > inline bool operator!=( const iterator_range& l, const ForwardRange& r ) { return !boost::equal( l, r ); } template< class Iterator1T, class Iterator2T > inline bool operator<( const iterator_range& l, const iterator_range& r ) { return iterator_range_detail::less_than( l, r ); } template< class IteratorT, class ForwardRange > inline bool operator<( const iterator_range& l, const ForwardRange& r ) { return iterator_range_detail::less_than( l, r ); } template< class Iterator1T, class Iterator2T > inline bool operator<=( const iterator_range& l, const iterator_range& r ) { return iterator_range_detail::less_or_equal_than( l, r ); } template< class IteratorT, class ForwardRange > inline bool operator<=( const iterator_range& l, const ForwardRange& r ) { return iterator_range_detail::less_or_equal_than( l, r ); } template< class Iterator1T, class Iterator2T > inline bool operator>( const iterator_range& l, const iterator_range& r ) { return iterator_range_detail::greater_than( l, r ); } template< class IteratorT, class ForwardRange > inline bool operator>( const iterator_range& l, const ForwardRange& r ) { return iterator_range_detail::greater_than( l, r ); } template< class Iterator1T, class Iterator2T > inline bool operator>=( const iterator_range& l, const iterator_range& r ) { return iterator_range_detail::greater_or_equal_than( l, r ); } template< class IteratorT, class ForwardRange > inline bool operator>=( const iterator_range& l, const ForwardRange& r ) { return iterator_range_detail::greater_or_equal_than( l, r ); } #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING // iterator range utilities -----------------------------------------// //! iterator_range construct helper /*! Construct an \c iterator_range from a pair of iterators \param Begin A begin iterator \param End An end iterator \return iterator_range object */ template< typename IteratorT > inline iterator_range< IteratorT > make_iterator_range( IteratorT Begin, IteratorT End ) { return iterator_range( Begin, End ); } #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template< typename Range > inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > make_iterator_range( Range& r ) { return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > ( boost::begin( r ), boost::end( r ) ); } #else //! iterator_range construct helper /*! Construct an \c iterator_range from a \c Range containing the begin and end iterators. */ template< class ForwardRange > inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > make_iterator_range( ForwardRange& r ) { return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > ( r, iterator_range_detail::range_tag() ); } template< class ForwardRange > inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > make_iterator_range( const ForwardRange& r ) { return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > ( r, iterator_range_detail::const_range_tag() ); } #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING namespace iterator_range_detail { template< class Range > inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > make_range_impl( Range& r, BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) { // // Not worth the effort // //if( advance_begin == 0 && advance_end == 0 ) // return make_iterator_range( r ); // BOOST_DEDUCED_TYPENAME range_iterator::type new_begin = boost::begin( r ), new_end = boost::end( r ); std::advance( new_begin, advance_begin ); std::advance( new_end, advance_end ); return make_iterator_range( new_begin, new_end ); } } #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template< class Range > inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > make_iterator_range( Range& r, BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) { //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" ); return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); } #else template< class Range > inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > make_iterator_range( Range& r, BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) { //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" ); return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); } template< class Range > inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > make_iterator_range( const Range& r, BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) { //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" ); return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); } #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING //! copy a range into a sequence /*! Construct a new sequence of the specified type from the elements in the given range \param Range An input range \return New sequence */ template< typename SeqT, typename Range > inline SeqT copy_range( const Range& r ) { return SeqT( boost::begin( r ), boost::end( r ) ); } } // namespace 'boost' #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) #pragma warning( pop ) #endif #endif passenger-4.0.37/ext/boost/range/iterator_range_io.hpp000644 000765 000024 00000005140 12233035540 023443 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Neil Groves 2009. // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED #define BOOST_RANGE_ITERATOR_RANGE_IO_HPP_INCLUDED #include #include #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) #pragma warning( push ) #pragma warning( disable : 4996 ) #endif // From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch. #ifndef BOOST_OLD_IOSTREAMS # if defined(__STL_CONFIG_H) && \ !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \ /**/ # define BOOST_OLD_IOSTREAMS # endif #endif // #ifndef BOOST_OLD_IOSTREAMS #ifndef _STLP_NO_IOSTREAMS # ifndef BOOST_OLD_IOSTREAMS # include # else # include # endif #endif // _STLP_NO_IOSTREAMS #include #include #include #include namespace boost { #ifndef _STLP_NO_IOSTREAMS # ifndef BOOST_OLD_IOSTREAMS //! iterator_range output operator /*! Output the range to an ostream. Elements are outputted in a sequence without separators. */ template< typename IteratorT, typename Elem, typename Traits > inline std::basic_ostream& operator<<( std::basic_ostream& Os, const iterator_range& r ) { std::copy( r.begin(), r.end(), std::ostream_iterator< BOOST_DEDUCED_TYPENAME iterator_value::type, Elem, Traits>(Os) ); return Os; } # else //! iterator_range output operator /*! Output the range to an ostream. Elements are outputted in a sequence without separators. */ template< typename IteratorT > inline std::ostream& operator<<( std::ostream& Os, const iterator_range& r ) { std::copy( r.begin(), r.end(), std::ostream_iterator(Os)); return Os; } # endif #endif // _STLP_NO_IOSTREAMS } // namespace boost #undef BOOST_OLD_IOSTREAMS #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1500)) #pragma warning(pop) #endif #endif // include guard passenger-4.0.37/ext/boost/range/mutable_iterator.hpp000644 000765 000024 00000003460 12233035540 023314 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_MUTABLE_ITERATOR_HPP #define BOOST_RANGE_MUTABLE_ITERATOR_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #include #else #include #include #include #include namespace boost { ////////////////////////////////////////////////////////////////////////// // default ////////////////////////////////////////////////////////////////////////// namespace range_detail { BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( iterator ) } template< typename C > struct range_mutable_iterator : range_detail::extract_iterator {}; ////////////////////////////////////////////////////////////////////////// // pair ////////////////////////////////////////////////////////////////////////// template< typename Iterator > struct range_mutable_iterator< std::pair > { typedef Iterator type; }; ////////////////////////////////////////////////////////////////////////// // array ////////////////////////////////////////////////////////////////////////// template< typename T, std::size_t sz > struct range_mutable_iterator< T[sz] > { typedef T* type; }; } // namespace boost #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif passenger-4.0.37/ext/boost/range/rbegin.hpp000644 000765 000024 00000002730 12233035540 021217 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_RBEGIN_HPP #define BOOST_RANGE_RBEGIN_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #include namespace boost { #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template< class C > inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type rbegin( C& c ) { return BOOST_DEDUCED_TYPENAME range_reverse_iterator::type( boost::end( c ) ); } #else template< class C > inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type rbegin( C& c ) { typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type iter_type; return iter_type( boost::end( c ) ); } template< class C > inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type rbegin( const C& c ) { typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type iter_type; return iter_type( boost::end( c ) ); } #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING template< class T > inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type const_rbegin( const T& r ) { return boost::rbegin( r ); } } // namespace 'boost' #endif passenger-4.0.37/ext/boost/range/rend.hpp000644 000765 000024 00000002662 12233035540 020705 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_REND_HPP #define BOOST_RANGE_REND_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #include namespace boost { #ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template< class C > inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type rend( C& c ) { return BOOST_DEDUCED_TYPENAME range_reverse_iterator::type( boost::begin( c ) ); } #else template< class C > inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type rend( C& c ) { typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type iter_type; return iter_type( boost::begin( c ) ); } template< class C > inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type rend( const C& c ) { typedef BOOST_DEDUCED_TYPENAME range_reverse_iterator::type iter_type; return iter_type( boost::begin( c ) ); } #endif template< class T > inline BOOST_DEDUCED_TYPENAME range_reverse_iterator::type const_rend( const T& r ) { return boost::rend( r ); } } // namespace 'boost' #endif passenger-4.0.37/ext/boost/range/reverse_iterator.hpp000644 000765 000024 00000001753 12233035540 023341 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_REVERSE_ITERATOR_HPP #define BOOST_RANGE_REVERSE_ITERATOR_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #include #include namespace boost { ////////////////////////////////////////////////////////////////////////// // default ////////////////////////////////////////////////////////////////////////// template< typename C > struct range_reverse_iterator { typedef reverse_iterator< BOOST_DEDUCED_TYPENAME range_iterator::type > type; }; } // namespace boost #endif passenger-4.0.37/ext/boost/range/size.hpp000644 000765 000024 00000002652 12233035540 020726 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_SIZE_HPP #define BOOST_RANGE_SIZE_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #include #include #include #include namespace boost { namespace range_detail { template inline BOOST_DEDUCED_TYPENAME range_size::type range_calculate_size(const SinglePassRange& rng) { BOOST_ASSERT( (boost::end(rng) - boost::begin(rng)) >= 0 && "reachability invariant broken!" ); return boost::end(rng) - boost::begin(rng); } } template inline BOOST_DEDUCED_TYPENAME range_size::type size(const SinglePassRange& rng) { #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \ !BOOST_WORKAROUND(__GNUC__, < 3) \ /**/ using namespace range_detail; #endif return range_calculate_size(rng); } } // namespace 'boost' #endif passenger-4.0.37/ext/boost/range/size_type.hpp000644 000765 000024 00000004320 12233035540 021761 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_SIZE_TYPE_HPP #define BOOST_RANGE_SIZE_TYPE_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #include #else #include #include #include #include #include namespace boost { namespace detail { ////////////////////////////////////////////////////////////////////////// // default ////////////////////////////////////////////////////////////////////////// template class has_size_type { typedef char no_type; struct yes_type { char dummy[2]; }; template static yes_type test(BOOST_DEDUCED_TYPENAME C::size_type x); template static no_type test(Arg x); public: static const bool value = sizeof(test(0)) == sizeof(yes_type); }; template struct range_size { typedef BOOST_DEDUCED_TYPENAME make_unsigned< BOOST_DEDUCED_TYPENAME range_difference::type >::type type; }; template struct range_size< C, BOOST_DEDUCED_TYPENAME enable_if, void>::type > { typedef BOOST_DEDUCED_TYPENAME C::size_type type; }; } template< class T > struct range_size : detail::range_size { }; template< class T > struct range_size : detail::range_size { }; } // namespace boost #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif passenger-4.0.37/ext/boost/range/value_type.hpp000644 000765 000024 00000001471 12233035540 022127 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_VALUE_TYPE_HPP #define BOOST_RANGE_VALUE_TYPE_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #include //#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //#include //#else #include namespace boost { template< class T > struct range_value : iterator_value< typename range_iterator::type > { }; } #endif passenger-4.0.37/ext/boost/range/detail/common.hpp000644 000765 000024 00000015153 12233035540 022506 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_DETAIL_COMMON_HPP #define BOOST_RANGE_DETAIL_COMMON_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #include #include #include #include #include #include ////////////////////////////////////////////////////////////////////////////// // missing partial specialization workaround. ////////////////////////////////////////////////////////////////////////////// namespace boost { namespace range_detail { // 1 = std containers // 2 = std::pair // 3 = const std::pair // 4 = array // 5 = const array // 6 = char array // 7 = wchar_t array // 8 = char* // 9 = const char* // 10 = whar_t* // 11 = const wchar_t* // 12 = string typedef mpl::int_<1>::type std_container_; typedef mpl::int_<2>::type std_pair_; typedef mpl::int_<3>::type const_std_pair_; typedef mpl::int_<4>::type array_; typedef mpl::int_<5>::type const_array_; typedef mpl::int_<6>::type char_array_; typedef mpl::int_<7>::type wchar_t_array_; typedef mpl::int_<8>::type char_ptr_; typedef mpl::int_<9>::type const_char_ptr_; typedef mpl::int_<10>::type wchar_t_ptr_; typedef mpl::int_<11>::type const_wchar_t_ptr_; typedef mpl::int_<12>::type string_; template< typename C > struct range_helper { static C* c; static C ptr; BOOST_STATIC_CONSTANT( bool, is_pair_ = sizeof( boost::range_detail::is_pair_impl( c ) ) == sizeof( yes_type ) ); BOOST_STATIC_CONSTANT( bool, is_char_ptr_ = sizeof( boost::range_detail::is_char_ptr_impl( ptr ) ) == sizeof( yes_type ) ); BOOST_STATIC_CONSTANT( bool, is_const_char_ptr_ = sizeof( boost::range_detail::is_const_char_ptr_impl( ptr ) ) == sizeof( yes_type ) ); BOOST_STATIC_CONSTANT( bool, is_wchar_t_ptr_ = sizeof( boost::range_detail::is_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) ); BOOST_STATIC_CONSTANT( bool, is_const_wchar_t_ptr_ = sizeof( boost::range_detail::is_const_wchar_t_ptr_impl( ptr ) ) == sizeof( yes_type ) ); BOOST_STATIC_CONSTANT( bool, is_char_array_ = sizeof( boost::range_detail::is_char_array_impl( ptr ) ) == sizeof( yes_type ) ); BOOST_STATIC_CONSTANT( bool, is_wchar_t_array_ = sizeof( boost::range_detail::is_wchar_t_array_impl( ptr ) ) == sizeof( yes_type ) ); BOOST_STATIC_CONSTANT( bool, is_string_ = (boost::type_traits::ice_or::value )); BOOST_STATIC_CONSTANT( bool, is_array_ = boost::is_array::value ); }; template< typename C > class range { typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_pair_, boost::range_detail::std_pair_, void >::type pair_t; typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_array_, boost::range_detail::array_, pair_t >::type array_t; typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_string_, boost::range_detail::string_, array_t >::type string_t; typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_char_ptr_, boost::range_detail::const_char_ptr_, string_t >::type const_char_ptr_t; typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_ptr_, boost::range_detail::char_ptr_, const_char_ptr_t >::type char_ptr_t; typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_const_wchar_t_ptr_, boost::range_detail::const_wchar_t_ptr_, char_ptr_t >::type const_wchar_ptr_t; typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_ptr_, boost::range_detail::wchar_t_ptr_, const_wchar_ptr_t >::type wchar_ptr_t; typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_wchar_t_array_, boost::range_detail::wchar_t_array_, wchar_ptr_t >::type wchar_array_t; typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::range_detail::range_helper::is_char_array_, boost::range_detail::char_array_, wchar_array_t >::type char_array_t; public: typedef BOOST_RANGE_DEDUCED_TYPENAME boost::mpl::if_c< ::boost::is_void::value, boost::range_detail::std_container_, char_array_t >::type type; }; // class 'range' } } #endif passenger-4.0.37/ext/boost/range/detail/extract_optional_type.hpp000644 000765 000024 00000004115 12233035540 025632 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Arno Schoedl & Neil Groves 2009. // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED #define BOOST_RANGE_DETAIL_EXTRACT_OPTIONAL_TYPE_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include #ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS #define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \ template< typename C > \ struct extract_ ## a_typedef \ { \ typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \ }; #else namespace boost { namespace range_detail { template< typename T > struct exists { typedef void type; }; } } // Defines extract_some_typedef which exposes T::some_typedef as // extract_some_typedef::type if T::some_typedef exists. Otherwise // extract_some_typedef is empty. #define BOOST_RANGE_EXTRACT_OPTIONAL_TYPE( a_typedef ) \ template< typename C, typename Enable=void > \ struct extract_ ## a_typedef \ {}; \ template< typename C > \ struct extract_ ## a_typedef< C \ , BOOST_DEDUCED_TYPENAME boost::range_detail::exists< BOOST_DEDUCED_TYPENAME C::a_typedef >::type \ > { \ typedef BOOST_DEDUCED_TYPENAME C::a_typedef type; \ }; #endif #endif // include guard passenger-4.0.37/ext/boost/range/detail/implementation_help.hpp000644 000765 000024 00000005410 12233035540 025246 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_DETAIL_IMPLEMENTATION_HELP_HPP #define BOOST_RANGE_DETAIL_IMPLEMENTATION_HELP_HPP #include #include #include #include #include #ifndef BOOST_NO_CWCHAR #include #endif namespace boost { namespace range_detail { template inline void boost_range_silence_warning( const T& ) { } ///////////////////////////////////////////////////////////////////// // end() help ///////////////////////////////////////////////////////////////////// inline const char* str_end( const char* s, const char* ) { return s + strlen( s ); } #ifndef BOOST_NO_CWCHAR inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) { return s + wcslen( s ); } #else inline const wchar_t* str_end( const wchar_t* s, const wchar_t* ) { if( s == 0 || s[0] == 0 ) return s; while( *++s != 0 ) ; return s; } #endif template< class Char > inline Char* str_end( Char* s ) { return const_cast( str_end( s, s ) ); } template< class T, std::size_t sz > inline T* array_end( T BOOST_RANGE_ARRAY_REF()[sz] ) { return boost_range_array + sz; } template< class T, std::size_t sz > inline const T* array_end( const T BOOST_RANGE_ARRAY_REF()[sz] ) { return boost_range_array + sz; } ///////////////////////////////////////////////////////////////////// // size() help ///////////////////////////////////////////////////////////////////// template< class Char > inline std::size_t str_size( const Char* const& s ) { return str_end( s ) - s; } template< class T, std::size_t sz > inline std::size_t array_size( T BOOST_RANGE_ARRAY_REF()[sz] ) { boost_range_silence_warning( boost_range_array ); return sz; } template< class T, std::size_t sz > inline std::size_t array_size( const T BOOST_RANGE_ARRAY_REF()[sz] ) { boost_range_silence_warning( boost_range_array ); return sz; } } // namespace 'range_detail' } // namespace 'boost' #endif passenger-4.0.37/ext/boost/range/detail/misc_concept.hpp000644 000765 000024 00000001466 12233035540 023666 0ustar00honglistaff000000 000000 // Boost.Range library concept checks // // Copyright Neil Groves 2009. Use, modification and distribution // are subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED #define BOOST_RANGE_DETAIL_MISC_CONCEPT_HPP_INCLUDED #include namespace boost { namespace range_detail { template class SameTypeConcept { public: BOOST_CONCEPT_USAGE(SameTypeConcept) { same_type(a,b); } private: template void same_type(T,T) {} T1 a; T2 b; }; } } #endif // include guard passenger-4.0.37/ext/boost/range/detail/safe_bool.hpp000644 000765 000024 00000004023 12233035540 023141 0ustar00honglistaff000000 000000 // This header intentionally has no include guards. // // Copyright (c) 2010 Neil Groves // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // This code utilises the experience gained during the evolution of // #ifndef BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP #define BOOST_RANGE_SAFE_BOOL_INCLUDED_HPP #include #include namespace boost { namespace range_detail { template class safe_bool { public: typedef safe_bool this_type; #if (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570)) || defined(__CINT_) typedef bool unspecified_bool_type; static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr) { return x; } #elif defined(_MANAGED) static void unspecified_bool(this_type***) { } typedef void(*unspecified_bool_type)(this_type***); static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr) { return x ? unspecified_bool : 0; } #elif \ ( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, < 0x3200) ) || \ ( defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 304) ) || \ ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) ) typedef bool (this_type::*unspecified_bool_type)() const; static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr) { return x ? &this_type::detail_safe_bool_member_fn : 0; } private: bool detail_safe_bool_member_fn() const { return false; } #else typedef DataMemberPtr unspecified_bool_type; static unspecified_bool_type to_unspecified_bool(const bool x, DataMemberPtr p) { return x ? p : 0; } #endif private: safe_bool(); safe_bool(const safe_bool&); void operator=(const safe_bool&); ~safe_bool(); }; } // namespace range_detail } // namespace boost #endif // include guard passenger-4.0.37/ext/boost/range/detail/sfinae.hpp000644 000765 000024 00000005213 12233035540 022457 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2003-2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_DETAIL_SFINAE_HPP #define BOOST_RANGE_DETAIL_SFINAE_HPP #include #include #include #include namespace boost { namespace range_detail { using type_traits::yes_type; using type_traits::no_type; ////////////////////////////////////////////////////////////////////// // string ////////////////////////////////////////////////////////////////////// yes_type is_string_impl( const char* const ); yes_type is_string_impl( const wchar_t* const ); no_type is_string_impl( ... ); template< std::size_t sz > yes_type is_char_array_impl( char BOOST_RANGE_ARRAY_REF()[sz] ); template< std::size_t sz > yes_type is_char_array_impl( const char BOOST_RANGE_ARRAY_REF()[sz] ); no_type is_char_array_impl( ... ); template< std::size_t sz > yes_type is_wchar_t_array_impl( wchar_t BOOST_RANGE_ARRAY_REF()[sz] ); template< std::size_t sz > yes_type is_wchar_t_array_impl( const wchar_t BOOST_RANGE_ARRAY_REF()[sz] ); no_type is_wchar_t_array_impl( ... ); yes_type is_char_ptr_impl( char* const ); no_type is_char_ptr_impl( ... ); yes_type is_const_char_ptr_impl( const char* const ); no_type is_const_char_ptr_impl( ... ); yes_type is_wchar_t_ptr_impl( wchar_t* const ); no_type is_wchar_t_ptr_impl( ... ); yes_type is_const_wchar_t_ptr_impl( const wchar_t* const ); no_type is_const_wchar_t_ptr_impl( ... ); ////////////////////////////////////////////////////////////////////// // pair ////////////////////////////////////////////////////////////////////// template< typename Iterator > yes_type is_pair_impl( const std::pair* ); no_type is_pair_impl( ... ); ////////////////////////////////////////////////////////////////////// // tags ////////////////////////////////////////////////////////////////////// struct char_or_wchar_t_array_tag {}; } // namespace 'range_detail' } // namespace 'boost' #endif passenger-4.0.37/ext/boost/range/detail/str_types.hpp000644 000765 000024 00000001455 12233035540 023252 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Thorsten Ottosen 2006. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_DETAIL_STR_TYPES_HPP #define BOOST_RANGE_DETAIL_STR_TYPES_HPP #include #include namespace boost { template< class T > struct range_mutable_iterator { typedef T* type; }; template< class T > struct range_const_iterator { typedef const T* type; }; template< class T > struct range_size { typedef std::size_t type; }; } #endif passenger-4.0.37/ext/boost/range/algorithm/equal.hpp000644 000765 000024 00000021300 12233035540 023040 0ustar00honglistaff000000 000000 // Boost.Range library // // Copyright Neil Groves 2009. // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED #define BOOST_RANGE_ALGORITHM_EQUAL_HPP_INCLUDED #include #include #include namespace boost { namespace range_detail { // An implementation of equality comparison that is optimized for iterator // traversal categories less than RandomAccessTraversal. template< class SinglePassTraversalReadableIterator1, class SinglePassTraversalReadableIterator2, class IteratorCategoryTag1, class IteratorCategoryTag2 > inline bool equal_impl( SinglePassTraversalReadableIterator1 first1, SinglePassTraversalReadableIterator1 last1, SinglePassTraversalReadableIterator2 first2, SinglePassTraversalReadableIterator2 last2, IteratorCategoryTag1, IteratorCategoryTag2 ) { while (true) { // If we have reached the end of the left range then this is // the end of the loop. They are equal if and only if we have // simultaneously reached the end of the right range. if (first1 == last1) return first2 == last2; // If we have reached the end of the right range at this line // it indicates that the right range is shorter than the left // and hence the result is false. if (first2 == last2) return false; // continue looping if and only if the values are equal if (*first1 != *first2) break; ++first1; ++first2; } // Reaching this line in the algorithm indicates that a value // inequality has been detected. return false; } template< class SinglePassTraversalReadableIterator1, class SinglePassTraversalReadableIterator2, class IteratorCategoryTag1, class IteratorCategoryTag2, class BinaryPredicate > inline bool equal_impl( SinglePassTraversalReadableIterator1 first1, SinglePassTraversalReadableIterator1 last1, SinglePassTraversalReadableIterator2 first2, SinglePassTraversalReadableIterator2 last2, BinaryPredicate pred, IteratorCategoryTag1, IteratorCategoryTag2 ) { while (true) { // If we have reached the end of the left range then this is // the end of the loop. They are equal if and only if we have // simultaneously reached the end of the right range. if (first1 == last1) return first2 == last2; // If we have reached the end of the right range at this line // it indicates that the right range is shorter than the left // and hence the result is false. if (first2 == last2) return false; // continue looping if and only if the values are equal if (!pred(*first1, *first2)) break; ++first1; ++first2; } // Reaching this line in the algorithm indicates that a value // inequality has been detected. return false; } // An implementation of equality comparison that is optimized for // random access iterators. template< class RandomAccessTraversalReadableIterator1, class RandomAccessTraversalReadableIterator2 > inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1, RandomAccessTraversalReadableIterator1 last1, RandomAccessTraversalReadableIterator2 first2, RandomAccessTraversalReadableIterator2 last2, std::random_access_iterator_tag, std::random_access_iterator_tag ) { return ((last1 - first1) == (last2 - first2)) && std::equal(first1, last1, first2); } template< class RandomAccessTraversalReadableIterator1, class RandomAccessTraversalReadableIterator2, class BinaryPredicate > inline bool equal_impl( RandomAccessTraversalReadableIterator1 first1, RandomAccessTraversalReadableIterator1 last1, RandomAccessTraversalReadableIterator2 first2, RandomAccessTraversalReadableIterator2 last2, BinaryPredicate pred ) { return ((last1 - first1) == (last2 - first2)) && std::equal(first1, last1, first2, pred); } template< class SinglePassTraversalReadableIterator1, class SinglePassTraversalReadableIterator2 > inline bool equal( SinglePassTraversalReadableIterator1 first1, SinglePassTraversalReadableIterator1 last1, SinglePassTraversalReadableIterator2 first2, SinglePassTraversalReadableIterator2 last2 ) { BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1; BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2; return equal_impl(first1, last1, first2, last2, tag1, tag2); } template< class SinglePassTraversalReadableIterator1, class SinglePassTraversalReadableIterator2, class BinaryPredicate > inline bool equal( SinglePassTraversalReadableIterator1 first1, SinglePassTraversalReadableIterator1 last1, SinglePassTraversalReadableIterator2 first2, SinglePassTraversalReadableIterator2 last2, BinaryPredicate pred ) { BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator1 >::iterator_category tag1; BOOST_DEDUCED_TYPENAME std::iterator_traits< SinglePassTraversalReadableIterator2 >::iterator_category tag2; return equal_impl(first1, last1, first2, last2, pred, tag1, tag2); } } // namespace range_detail namespace range { /// \brief template function equal /// /// range-based version of the equal std algorithm /// /// \pre SinglePassRange1 is a model of the SinglePassRangeConcept /// \pre SinglePassRange2 is a model of the SinglePassRangeConcept /// \pre BinaryPredicate is a model of the BinaryPredicateConcept template< class SinglePassRange1, class SinglePassRange2 > inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2 ) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); return ::boost::range_detail::equal( ::boost::begin(rng1), ::boost::end(rng1), ::boost::begin(rng2), ::boost::end(rng2) ); } /// \overload template< class SinglePassRange1, class SinglePassRange2, class BinaryPredicate > inline bool equal( const SinglePassRange1& rng1, const SinglePassRange2& rng2, BinaryPredicate pred ) { BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); BOOST_RANGE_CONCEPT_ASSERT(( SinglePassRangeConcept )); return ::boost::range_detail::equal( ::boost::begin(rng1), ::boost::end(rng1), ::boost::begin(rng2), ::boost::end(rng2), pred); } } // namespace range using ::boost::range::equal; } // namespace boost #endif // include guard passenger-4.0.37/ext/boost/preprocessor/arithmetic/000755 000765 000024 00000000000 12233035540 023021 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/array/000755 000765 000024 00000000000 12233035540 022006 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/cat.hpp000644 000765 000024 00000001675 12233035540 022161 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CAT_HPP # define BOOST_PREPROCESSOR_CAT_HPP # # include # # /* BOOST_PP_CAT */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b) # else # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_OO((a, b)) # define BOOST_PP_CAT_OO(par) BOOST_PP_CAT_I ## par # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_CAT_I(a, b) a ## b # else # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b) # define BOOST_PP_CAT_II(p, res) res # endif # # endif passenger-4.0.37/ext/boost/preprocessor/comma_if.hpp000644 000765 000024 00000001360 12233035540 023153 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_COMMA_IF_HPP # define BOOST_PREPROCESSOR_COMMA_IF_HPP # # include # # endif passenger-4.0.37/ext/boost/preprocessor/config/000755 000765 000024 00000000000 12233035540 022135 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/control/000755 000765 000024 00000000000 12233035540 022350 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/debug/000755 000765 000024 00000000000 12233035540 021756 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/dec.hpp000644 000765 000024 00000001340 12233035540 022132 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_DEC_HPP # define BOOST_PREPROCESSOR_DEC_HPP # # include # # endif passenger-4.0.37/ext/boost/preprocessor/detail/000755 000765 000024 00000000000 12233035540 022132 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/empty.hpp000644 000765 000024 00000001346 12233035540 022543 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_EMPTY_HPP # define BOOST_PREPROCESSOR_EMPTY_HPP # # include # # endif passenger-4.0.37/ext/boost/preprocessor/enum.hpp000644 000765 000024 00000001343 12233035540 022346 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ENUM_HPP # define BOOST_PREPROCESSOR_ENUM_HPP # # include # # endif passenger-4.0.37/ext/boost/preprocessor/enum_params.hpp000644 000765 000024 00000001370 12233035540 023711 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_HPP # define BOOST_PREPROCESSOR_ENUM_PARAMS_HPP # # include # # endif passenger-4.0.37/ext/boost/preprocessor/enum_params_with_a_default.hpp000644 000765 000024 00000001445 12233035540 026753 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT_HPP # define BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT_HPP # # include # # endif passenger-4.0.37/ext/boost/preprocessor/enum_shifted_params.hpp000644 000765 000024 00000001420 12233035540 025413 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP # define BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP # # include # # endif passenger-4.0.37/ext/boost/preprocessor/facilities/000755 000765 000024 00000000000 12233035540 023004 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/identity.hpp000644 000765 000024 00000001357 12233035540 023240 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_IDENTITY_HPP # define BOOST_PREPROCESSOR_IDENTITY_HPP # # include # # endif passenger-4.0.37/ext/boost/preprocessor/inc.hpp000644 000765 000024 00000001340 12233035540 022150 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_INC_HPP # define BOOST_PREPROCESSOR_INC_HPP # # include # # endif passenger-4.0.37/ext/boost/preprocessor/iterate.hpp000644 000765 000024 00000001353 12233035540 023040 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ITERATE_HPP # define BOOST_PREPROCESSOR_ITERATE_HPP # # include # # endif passenger-4.0.37/ext/boost/preprocessor/iteration/000755 000765 000024 00000000000 12233035540 022666 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/list/000755 000765 000024 00000000000 12233035540 021643 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/logical/000755 000765 000024 00000000000 12233035540 022302 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/punctuation/000755 000765 000024 00000000000 12233035540 023241 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/repeat.hpp000644 000765 000024 00000001351 12233035540 022661 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPEAT_HPP # define BOOST_PREPROCESSOR_REPEAT_HPP # # include # # endif passenger-4.0.37/ext/boost/preprocessor/repeat_2nd.hpp000644 000765 000024 00000001361 12233035540 023425 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPEAT_2ND_HPP # define BOOST_PREPROCESSOR_REPEAT_2ND_HPP # # include # # endif passenger-4.0.37/ext/boost/preprocessor/repetition/000755 000765 000024 00000000000 12233035540 023052 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/seq/000755 000765 000024 00000000000 12233035540 021460 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/slot/000755 000765 000024 00000000000 12233035540 021651 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/stringize.hpp000644 000765 000024 00000002003 12233035540 023412 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_STRINGIZE_HPP # define BOOST_PREPROCESSOR_STRINGIZE_HPP # # include # # /* BOOST_PP_STRINGIZE */ # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_A((text)) # define BOOST_PP_STRINGIZE_A(arg) BOOST_PP_STRINGIZE_I arg # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_OO((text)) # define BOOST_PP_STRINGIZE_OO(par) BOOST_PP_STRINGIZE_I ## par # else # define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text) # endif # # define BOOST_PP_STRINGIZE_I(text) #text # # endif passenger-4.0.37/ext/boost/preprocessor/tuple/000755 000765 000024 00000000000 12233035540 022021 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/variadic/000755 000765 000024 00000000000 12233035540 022452 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/variadic/elem.hpp000644 000765 000024 00000033564 12233035540 024120 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Edward Diener 2011. * # * (C) Copyright Paul Mensonides 2011. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_VARIADIC_ELEM_HPP # define BOOST_PREPROCESSOR_VARIADIC_ELEM_HPP # # include # include # # /* BOOST_PP_VARIADIC_ELEM */ # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_VARIADIC_ELEM(n, ...) BOOST_PP_VARIADIC_ELEM_I(n,__VA_ARGS__) # define BOOST_PP_VARIADIC_ELEM_I(n, ...) BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_VARIADIC_ELEM_, n)(__VA_ARGS__,),) # else # define BOOST_PP_VARIADIC_ELEM(n, ...) BOOST_PP_CAT(BOOST_PP_VARIADIC_ELEM_, n)(__VA_ARGS__,) # endif # define BOOST_PP_VARIADIC_ELEM_0(e0, ...) e0 # define BOOST_PP_VARIADIC_ELEM_1(e0, e1, ...) e1 # define BOOST_PP_VARIADIC_ELEM_2(e0, e1, e2, ...) e2 # define BOOST_PP_VARIADIC_ELEM_3(e0, e1, e2, e3, ...) e3 # define BOOST_PP_VARIADIC_ELEM_4(e0, e1, e2, e3, e4, ...) e4 # define BOOST_PP_VARIADIC_ELEM_5(e0, e1, e2, e3, e4, e5, ...) e5 # define BOOST_PP_VARIADIC_ELEM_6(e0, e1, e2, e3, e4, e5, e6, ...) e6 # define BOOST_PP_VARIADIC_ELEM_7(e0, e1, e2, e3, e4, e5, e6, e7, ...) e7 # define BOOST_PP_VARIADIC_ELEM_8(e0, e1, e2, e3, e4, e5, e6, e7, e8, ...) e8 # define BOOST_PP_VARIADIC_ELEM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ...) e9 # define BOOST_PP_VARIADIC_ELEM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, ...) e10 # define BOOST_PP_VARIADIC_ELEM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, ...) e11 # define BOOST_PP_VARIADIC_ELEM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, ...) e12 # define BOOST_PP_VARIADIC_ELEM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, ...) e13 # define BOOST_PP_VARIADIC_ELEM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, ...) e14 # define BOOST_PP_VARIADIC_ELEM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, ...) e15 # define BOOST_PP_VARIADIC_ELEM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, ...) e16 # define BOOST_PP_VARIADIC_ELEM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, ...) e17 # define BOOST_PP_VARIADIC_ELEM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, ...) e18 # define BOOST_PP_VARIADIC_ELEM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, ...) e19 # define BOOST_PP_VARIADIC_ELEM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ...) e20 # define BOOST_PP_VARIADIC_ELEM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, ...) e21 # define BOOST_PP_VARIADIC_ELEM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, ...) e22 # define BOOST_PP_VARIADIC_ELEM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, ...) e23 # define BOOST_PP_VARIADIC_ELEM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, ...) e24 # define BOOST_PP_VARIADIC_ELEM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, ...) e25 # define BOOST_PP_VARIADIC_ELEM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, ...) e26 # define BOOST_PP_VARIADIC_ELEM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, ...) e27 # define BOOST_PP_VARIADIC_ELEM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, ...) e28 # define BOOST_PP_VARIADIC_ELEM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, ...) e29 # define BOOST_PP_VARIADIC_ELEM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, ...) e30 # define BOOST_PP_VARIADIC_ELEM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, ...) e31 # define BOOST_PP_VARIADIC_ELEM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, ...) e32 # define BOOST_PP_VARIADIC_ELEM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, ...) e33 # define BOOST_PP_VARIADIC_ELEM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, ...) e34 # define BOOST_PP_VARIADIC_ELEM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, ...) e35 # define BOOST_PP_VARIADIC_ELEM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, ...) e36 # define BOOST_PP_VARIADIC_ELEM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, ...) e37 # define BOOST_PP_VARIADIC_ELEM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, ...) e38 # define BOOST_PP_VARIADIC_ELEM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, ...) e39 # define BOOST_PP_VARIADIC_ELEM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, ...) e40 # define BOOST_PP_VARIADIC_ELEM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, ...) e41 # define BOOST_PP_VARIADIC_ELEM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, ...) e42 # define BOOST_PP_VARIADIC_ELEM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, ...) e43 # define BOOST_PP_VARIADIC_ELEM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, ...) e44 # define BOOST_PP_VARIADIC_ELEM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, ...) e45 # define BOOST_PP_VARIADIC_ELEM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, ...) e46 # define BOOST_PP_VARIADIC_ELEM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, ...) e47 # define BOOST_PP_VARIADIC_ELEM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, ...) e48 # define BOOST_PP_VARIADIC_ELEM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, ...) e49 # define BOOST_PP_VARIADIC_ELEM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, ...) e50 # define BOOST_PP_VARIADIC_ELEM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, ...) e51 # define BOOST_PP_VARIADIC_ELEM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, ...) e52 # define BOOST_PP_VARIADIC_ELEM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, ...) e53 # define BOOST_PP_VARIADIC_ELEM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, ...) e54 # define BOOST_PP_VARIADIC_ELEM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, ...) e55 # define BOOST_PP_VARIADIC_ELEM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, ...) e56 # define BOOST_PP_VARIADIC_ELEM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, ...) e57 # define BOOST_PP_VARIADIC_ELEM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, ...) e58 # define BOOST_PP_VARIADIC_ELEM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, ...) e59 # define BOOST_PP_VARIADIC_ELEM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, ...) e60 # define BOOST_PP_VARIADIC_ELEM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, ...) e61 # define BOOST_PP_VARIADIC_ELEM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, ...) e62 # define BOOST_PP_VARIADIC_ELEM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, ...) e63 # endif # # endif passenger-4.0.37/ext/boost/preprocessor/variadic/size.hpp000644 000765 000024 00000004125 12233035540 024137 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Edward Diener 2011. * # * (C) Copyright Paul Mensonides 2011. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_VARIADIC_SIZE_HPP # define BOOST_PREPROCESSOR_VARIADIC_SIZE_HPP # # include # include # # /* BOOST_PP_VARIADIC_SIZE */ # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),) # else # define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,) # endif # define BOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size # endif # # endif passenger-4.0.37/ext/boost/preprocessor/tuple/eat.hpp000644 000765 000024 00000031173 12233035540 023310 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002-2011) */ # /* Revised by Edward Diener (2011) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_TUPLE_EAT_HPP # define BOOST_PREPROCESSOR_TUPLE_EAT_HPP # # include # # /* BOOST_PP_EAT */ # # if BOOST_PP_VARIADICS # define BOOST_PP_EAT(...) # else # define BOOST_PP_EAT(x) # endif # # /* BOOST_PP_TUPLE_EAT */ # # if BOOST_PP_VARIADICS # define BOOST_PP_TUPLE_EAT(size) BOOST_PP_EAT # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_I(size) # else # define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_OO((size)) # define BOOST_PP_TUPLE_EAT_OO(par) BOOST_PP_TUPLE_EAT_I ## par # endif # define BOOST_PP_TUPLE_EAT_I(size) BOOST_PP_TUPLE_EAT_ ## size # endif # define BOOST_PP_TUPLE_EAT_1(e0) # define BOOST_PP_TUPLE_EAT_2(e0, e1) # define BOOST_PP_TUPLE_EAT_3(e0, e1, e2) # define BOOST_PP_TUPLE_EAT_4(e0, e1, e2, e3) # define BOOST_PP_TUPLE_EAT_5(e0, e1, e2, e3, e4) # define BOOST_PP_TUPLE_EAT_6(e0, e1, e2, e3, e4, e5) # define BOOST_PP_TUPLE_EAT_7(e0, e1, e2, e3, e4, e5, e6) # define BOOST_PP_TUPLE_EAT_8(e0, e1, e2, e3, e4, e5, e6, e7) # define BOOST_PP_TUPLE_EAT_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) # define BOOST_PP_TUPLE_EAT_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) # define BOOST_PP_TUPLE_EAT_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) # define BOOST_PP_TUPLE_EAT_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) # define BOOST_PP_TUPLE_EAT_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) # define BOOST_PP_TUPLE_EAT_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) # define BOOST_PP_TUPLE_EAT_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) # define BOOST_PP_TUPLE_EAT_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) # define BOOST_PP_TUPLE_EAT_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) # define BOOST_PP_TUPLE_EAT_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) # define BOOST_PP_TUPLE_EAT_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) # define BOOST_PP_TUPLE_EAT_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) # define BOOST_PP_TUPLE_EAT_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) # define BOOST_PP_TUPLE_EAT_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) # define BOOST_PP_TUPLE_EAT_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) # define BOOST_PP_TUPLE_EAT_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) # define BOOST_PP_TUPLE_EAT_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) # define BOOST_PP_TUPLE_EAT_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) # define BOOST_PP_TUPLE_EAT_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) # define BOOST_PP_TUPLE_EAT_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) # define BOOST_PP_TUPLE_EAT_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) # define BOOST_PP_TUPLE_EAT_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) # define BOOST_PP_TUPLE_EAT_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) # define BOOST_PP_TUPLE_EAT_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) # define BOOST_PP_TUPLE_EAT_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) # define BOOST_PP_TUPLE_EAT_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) # define BOOST_PP_TUPLE_EAT_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) # define BOOST_PP_TUPLE_EAT_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) # define BOOST_PP_TUPLE_EAT_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) # define BOOST_PP_TUPLE_EAT_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) # define BOOST_PP_TUPLE_EAT_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) # define BOOST_PP_TUPLE_EAT_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) # define BOOST_PP_TUPLE_EAT_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) # define BOOST_PP_TUPLE_EAT_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) # define BOOST_PP_TUPLE_EAT_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) # define BOOST_PP_TUPLE_EAT_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) # define BOOST_PP_TUPLE_EAT_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) # define BOOST_PP_TUPLE_EAT_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) # define BOOST_PP_TUPLE_EAT_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) # define BOOST_PP_TUPLE_EAT_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) # define BOOST_PP_TUPLE_EAT_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) # define BOOST_PP_TUPLE_EAT_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) # define BOOST_PP_TUPLE_EAT_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) # define BOOST_PP_TUPLE_EAT_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) # define BOOST_PP_TUPLE_EAT_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) # define BOOST_PP_TUPLE_EAT_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) # define BOOST_PP_TUPLE_EAT_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) # define BOOST_PP_TUPLE_EAT_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) # define BOOST_PP_TUPLE_EAT_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) # define BOOST_PP_TUPLE_EAT_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) # define BOOST_PP_TUPLE_EAT_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) # define BOOST_PP_TUPLE_EAT_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) # define BOOST_PP_TUPLE_EAT_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) # define BOOST_PP_TUPLE_EAT_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) # define BOOST_PP_TUPLE_EAT_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) # define BOOST_PP_TUPLE_EAT_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) # # endif passenger-4.0.37/ext/boost/preprocessor/tuple/elem.hpp000644 000765 000024 00000146721 12233035540 023467 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002-2011) */ # /* Revised by Edward Diener (2011) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_TUPLE_ELEM_HPP # define BOOST_PREPROCESSOR_TUPLE_ELEM_HPP # # include # include # include # include # include # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) # define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) # else # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__)(__VA_ARGS__) # endif # define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple) # define BOOST_PP_TUPLE_ELEM_O_3(size, n, tuple) BOOST_PP_TUPLE_ELEM_O_2(n, tuple) # else # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_, n), BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size), tuple)) # define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) # define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I_OO((size, n, tuple)) # define BOOST_PP_TUPLE_ELEM_I_OO(par) BOOST_PP_TUPLE_ELEM_I ## par # define BOOST_PP_TUPLE_ELEM_I(size, n, tuple) BOOST_PP_TUPLE_ELEM_II((n, BOOST_PP_TUPLE_ELEM_E_ ## size ## tuple)) # define BOOST_PP_TUPLE_ELEM_II(par) BOOST_PP_TUPLE_ELEM_III_OO(par) # define BOOST_PP_TUPLE_ELEM_III_OO(par) BOOST_PP_TUPLE_ELEM_III ## par # define BOOST_PP_TUPLE_ELEM_III(n, etuple) BOOST_PP_TUPLE_ELEM_ ## n ## etuple # else # define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_, n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size) tuple) # define BOOST_PP_TUPLE_ELEM_I(x) x # endif # define BOOST_PP_TUPLE_ELEM_E_1(e0) (e0, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_2(e0, e1) (e0, e1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_3(e0, e1, e2) (e0, e1, e2, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_4(e0, e1, e2, e3) (e0, e1, e2, e3, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_5(e0, e1, e2, e3, e4) (e0, e1, e2, e3, e4, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_6(e0, e1, e2, e3, e4, e5) (e0, e1, e2, e3, e4, e5, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_7(e0, e1, e2, e3, e4, e5, e6) (e0, e1, e2, e3, e4, e5, e6, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_8(e0, e1, e2, e3, e4, e5, e6, e7) (e0, e1, e2, e3, e4, e5, e6, e7, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) (e0, e1, e2, e3, e4, e5, e6, e7, e8, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, ?) # define BOOST_PP_TUPLE_ELEM_E_64 # define BOOST_PP_TUPLE_ELEM_0(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e0 # define BOOST_PP_TUPLE_ELEM_1(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e1 # define BOOST_PP_TUPLE_ELEM_2(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e2 # define BOOST_PP_TUPLE_ELEM_3(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e3 # define BOOST_PP_TUPLE_ELEM_4(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e4 # define BOOST_PP_TUPLE_ELEM_5(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e5 # define BOOST_PP_TUPLE_ELEM_6(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e6 # define BOOST_PP_TUPLE_ELEM_7(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e7 # define BOOST_PP_TUPLE_ELEM_8(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e8 # define BOOST_PP_TUPLE_ELEM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e9 # define BOOST_PP_TUPLE_ELEM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e10 # define BOOST_PP_TUPLE_ELEM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e11 # define BOOST_PP_TUPLE_ELEM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e12 # define BOOST_PP_TUPLE_ELEM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e13 # define BOOST_PP_TUPLE_ELEM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e14 # define BOOST_PP_TUPLE_ELEM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e15 # define BOOST_PP_TUPLE_ELEM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e16 # define BOOST_PP_TUPLE_ELEM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e17 # define BOOST_PP_TUPLE_ELEM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e18 # define BOOST_PP_TUPLE_ELEM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e19 # define BOOST_PP_TUPLE_ELEM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e20 # define BOOST_PP_TUPLE_ELEM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e21 # define BOOST_PP_TUPLE_ELEM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e22 # define BOOST_PP_TUPLE_ELEM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e23 # define BOOST_PP_TUPLE_ELEM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e24 # define BOOST_PP_TUPLE_ELEM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e25 # define BOOST_PP_TUPLE_ELEM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e26 # define BOOST_PP_TUPLE_ELEM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e27 # define BOOST_PP_TUPLE_ELEM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e28 # define BOOST_PP_TUPLE_ELEM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e29 # define BOOST_PP_TUPLE_ELEM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e30 # define BOOST_PP_TUPLE_ELEM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e31 # define BOOST_PP_TUPLE_ELEM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e32 # define BOOST_PP_TUPLE_ELEM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e33 # define BOOST_PP_TUPLE_ELEM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e34 # define BOOST_PP_TUPLE_ELEM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e35 # define BOOST_PP_TUPLE_ELEM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e36 # define BOOST_PP_TUPLE_ELEM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e37 # define BOOST_PP_TUPLE_ELEM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e38 # define BOOST_PP_TUPLE_ELEM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e39 # define BOOST_PP_TUPLE_ELEM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e40 # define BOOST_PP_TUPLE_ELEM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e41 # define BOOST_PP_TUPLE_ELEM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e42 # define BOOST_PP_TUPLE_ELEM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e43 # define BOOST_PP_TUPLE_ELEM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e44 # define BOOST_PP_TUPLE_ELEM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e45 # define BOOST_PP_TUPLE_ELEM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e46 # define BOOST_PP_TUPLE_ELEM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e47 # define BOOST_PP_TUPLE_ELEM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e48 # define BOOST_PP_TUPLE_ELEM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e49 # define BOOST_PP_TUPLE_ELEM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e50 # define BOOST_PP_TUPLE_ELEM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e51 # define BOOST_PP_TUPLE_ELEM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e52 # define BOOST_PP_TUPLE_ELEM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e53 # define BOOST_PP_TUPLE_ELEM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e54 # define BOOST_PP_TUPLE_ELEM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e55 # define BOOST_PP_TUPLE_ELEM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e56 # define BOOST_PP_TUPLE_ELEM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e57 # define BOOST_PP_TUPLE_ELEM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e58 # define BOOST_PP_TUPLE_ELEM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e59 # define BOOST_PP_TUPLE_ELEM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e60 # define BOOST_PP_TUPLE_ELEM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e61 # define BOOST_PP_TUPLE_ELEM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e62 # define BOOST_PP_TUPLE_ELEM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e63 # endif # # /* directly used elsewhere in Boost... */ # # define BOOST_PP_TUPLE_ELEM_1_0(a) a # # define BOOST_PP_TUPLE_ELEM_2_0(a, b) a # define BOOST_PP_TUPLE_ELEM_2_1(a, b) b # # define BOOST_PP_TUPLE_ELEM_3_0(a, b, c) a # define BOOST_PP_TUPLE_ELEM_3_1(a, b, c) b # define BOOST_PP_TUPLE_ELEM_3_2(a, b, c) c # # endif passenger-4.0.37/ext/boost/preprocessor/tuple/rem.hpp000644 000765 000024 00000060110 12233035540 023313 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002-2011. * # * (C) Copyright Edward Diener 2011. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_TUPLE_REM_HPP # define BOOST_PREPROCESSOR_TUPLE_REM_HPP # # include # include # include # # /* BOOST_PP_REM */ # # if BOOST_PP_VARIADICS # define BOOST_PP_REM(...) __VA_ARGS__ # else # define BOOST_PP_REM(x) x # endif # # /* BOOST_PP_TUPLE_REM */ # # if BOOST_PP_VARIADICS # define BOOST_PP_TUPLE_REM(size) BOOST_PP_REM # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_I(size) # else # define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_OO((size)) # define BOOST_PP_TUPLE_REM_OO(par) BOOST_PP_TUPLE_REM_I ## par # endif # define BOOST_PP_TUPLE_REM_I(size) BOOST_PP_TUPLE_REM_ ## size # endif # define BOOST_PP_TUPLE_REM_1(e0) e0 # define BOOST_PP_TUPLE_REM_2(e0, e1) e0, e1 # define BOOST_PP_TUPLE_REM_3(e0, e1, e2) e0, e1, e2 # define BOOST_PP_TUPLE_REM_4(e0, e1, e2, e3) e0, e1, e2, e3 # define BOOST_PP_TUPLE_REM_5(e0, e1, e2, e3, e4) e0, e1, e2, e3, e4 # define BOOST_PP_TUPLE_REM_6(e0, e1, e2, e3, e4, e5) e0, e1, e2, e3, e4, e5 # define BOOST_PP_TUPLE_REM_7(e0, e1, e2, e3, e4, e5, e6) e0, e1, e2, e3, e4, e5, e6 # define BOOST_PP_TUPLE_REM_8(e0, e1, e2, e3, e4, e5, e6, e7) e0, e1, e2, e3, e4, e5, e6, e7 # define BOOST_PP_TUPLE_REM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) e0, e1, e2, e3, e4, e5, e6, e7, e8 # define BOOST_PP_TUPLE_REM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9 # define BOOST_PP_TUPLE_REM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10 # define BOOST_PP_TUPLE_REM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11 # define BOOST_PP_TUPLE_REM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12 # define BOOST_PP_TUPLE_REM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13 # define BOOST_PP_TUPLE_REM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14 # define BOOST_PP_TUPLE_REM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15 # define BOOST_PP_TUPLE_REM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16 # define BOOST_PP_TUPLE_REM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17 # define BOOST_PP_TUPLE_REM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18 # define BOOST_PP_TUPLE_REM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19 # define BOOST_PP_TUPLE_REM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20 # define BOOST_PP_TUPLE_REM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21 # define BOOST_PP_TUPLE_REM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22 # define BOOST_PP_TUPLE_REM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23 # define BOOST_PP_TUPLE_REM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24 # define BOOST_PP_TUPLE_REM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25 # define BOOST_PP_TUPLE_REM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26 # define BOOST_PP_TUPLE_REM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27 # define BOOST_PP_TUPLE_REM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28 # define BOOST_PP_TUPLE_REM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29 # define BOOST_PP_TUPLE_REM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30 # define BOOST_PP_TUPLE_REM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31 # define BOOST_PP_TUPLE_REM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32 # define BOOST_PP_TUPLE_REM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33 # define BOOST_PP_TUPLE_REM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34 # define BOOST_PP_TUPLE_REM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35 # define BOOST_PP_TUPLE_REM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36 # define BOOST_PP_TUPLE_REM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37 # define BOOST_PP_TUPLE_REM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38 # define BOOST_PP_TUPLE_REM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39 # define BOOST_PP_TUPLE_REM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40 # define BOOST_PP_TUPLE_REM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41 # define BOOST_PP_TUPLE_REM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42 # define BOOST_PP_TUPLE_REM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43 # define BOOST_PP_TUPLE_REM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44 # define BOOST_PP_TUPLE_REM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45 # define BOOST_PP_TUPLE_REM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46 # define BOOST_PP_TUPLE_REM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47 # define BOOST_PP_TUPLE_REM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48 # define BOOST_PP_TUPLE_REM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49 # define BOOST_PP_TUPLE_REM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50 # define BOOST_PP_TUPLE_REM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51 # define BOOST_PP_TUPLE_REM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52 # define BOOST_PP_TUPLE_REM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53 # define BOOST_PP_TUPLE_REM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54 # define BOOST_PP_TUPLE_REM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55 # define BOOST_PP_TUPLE_REM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56 # define BOOST_PP_TUPLE_REM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57 # define BOOST_PP_TUPLE_REM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58 # define BOOST_PP_TUPLE_REM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59 # define BOOST_PP_TUPLE_REM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60 # define BOOST_PP_TUPLE_REM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61 # define BOOST_PP_TUPLE_REM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62 # define BOOST_PP_TUPLE_REM_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63 # # /* BOOST_PP_TUPLE_REM_CTOR */ # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_REM_CTOR_I(m, args) BOOST_PP_TUPLE_REM_CTOR_II(m, args) # define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(m ## args,) # else # define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__)(__VA_ARGS__) # endif # define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_REM tuple # define BOOST_PP_TUPLE_REM_CTOR_O_2(size, tuple) BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple) # else # define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_D(size, tuple) # define BOOST_PP_TUPLE_REM_CTOR_D(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple) # endif # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) ext tuple # else # define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) BOOST_PP_TUPLE_REM_CTOR_OO((ext, tuple)) # define BOOST_PP_TUPLE_REM_CTOR_OO(par) BOOST_PP_TUPLE_REM_CTOR_II ## par # define BOOST_PP_TUPLE_REM_CTOR_II(ext, tuple) ext ## tuple # endif # endif # # endif passenger-4.0.37/ext/boost/preprocessor/tuple/to_list.hpp000644 000765 000024 00000070562 12233035540 024221 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002-2011) */ # /* Revised by Edward Diener (2011) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP # define BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP # # include # include # include # include # # /* BOOST_PP_TUPLE_TO_LIST */ # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_TO_LIST_I(m, args) BOOST_PP_TUPLE_TO_LIST_II(m, args) # define BOOST_PP_TUPLE_TO_LIST_II(m, args) BOOST_PP_CAT(m ## args,) # else # define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__) # endif # define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple # define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple) # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_I(size, tuple) # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s t # else # define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_II(BOOST_PP_TUPLE_TO_LIST_ ## s t) # define BOOST_PP_TUPLE_TO_LIST_II(res) res # endif # else # define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_OO((size, tuple)) # define BOOST_PP_TUPLE_TO_LIST_OO(par) BOOST_PP_TUPLE_TO_LIST_I ## par # define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s ## t # endif # endif # # define BOOST_PP_TUPLE_TO_LIST_1(e0) (e0, BOOST_PP_NIL) # define BOOST_PP_TUPLE_TO_LIST_2(e0, e1) (e0, (e1, BOOST_PP_NIL)) # define BOOST_PP_TUPLE_TO_LIST_3(e0, e1, e2) (e0, (e1, (e2, BOOST_PP_NIL))) # define BOOST_PP_TUPLE_TO_LIST_4(e0, e1, e2, e3) (e0, (e1, (e2, (e3, BOOST_PP_NIL)))) # define BOOST_PP_TUPLE_TO_LIST_5(e0, e1, e2, e3, e4) (e0, (e1, (e2, (e3, (e4, BOOST_PP_NIL))))) # define BOOST_PP_TUPLE_TO_LIST_6(e0, e1, e2, e3, e4, e5) (e0, (e1, (e2, (e3, (e4, (e5, BOOST_PP_NIL)))))) # define BOOST_PP_TUPLE_TO_LIST_7(e0, e1, e2, e3, e4, e5, e6) (e0, (e1, (e2, (e3, (e4, (e5, (e6, BOOST_PP_NIL))))))) # define BOOST_PP_TUPLE_TO_LIST_8(e0, e1, e2, e3, e4, e5, e6, e7) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, BOOST_PP_NIL)))))))) # define BOOST_PP_TUPLE_TO_LIST_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, BOOST_PP_NIL))))))))) # define BOOST_PP_TUPLE_TO_LIST_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, BOOST_PP_NIL)))))))))) # define BOOST_PP_TUPLE_TO_LIST_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, BOOST_PP_NIL))))))))))) # define BOOST_PP_TUPLE_TO_LIST_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, BOOST_PP_NIL)))))))))))) # define BOOST_PP_TUPLE_TO_LIST_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, BOOST_PP_NIL))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, BOOST_PP_NIL)))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, BOOST_PP_NIL))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, BOOST_PP_NIL)))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, BOOST_PP_NIL))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, BOOST_PP_NIL)))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, BOOST_PP_NIL))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, BOOST_PP_NIL)))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, BOOST_PP_NIL))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, BOOST_PP_NIL)))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, BOOST_PP_NIL))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, BOOST_PP_NIL)))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, BOOST_PP_NIL))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, BOOST_PP_NIL)))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, BOOST_PP_NIL))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, BOOST_PP_NIL)))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, BOOST_PP_NIL))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, BOOST_PP_NIL)))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, BOOST_PP_NIL))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, BOOST_PP_NIL)))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, BOOST_PP_NIL))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, BOOST_PP_NIL)))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, BOOST_PP_NIL))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, (e61, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, (e61, (e62, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, (e61, (e62, (e63, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # # endif passenger-4.0.37/ext/boost/preprocessor/slot/detail/000755 000765 000024 00000000000 12233035540 023113 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/slot/slot.hpp000644 000765 000024 00000002514 12233035540 023345 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SLOT_SLOT_HPP # define BOOST_PREPROCESSOR_SLOT_SLOT_HPP # # include # include # # /* BOOST_PP_ASSIGN_SLOT */ # # define BOOST_PP_ASSIGN_SLOT(i) BOOST_PP_CAT(BOOST_PP_ASSIGN_SLOT_, i) # # define BOOST_PP_ASSIGN_SLOT_1 # define BOOST_PP_ASSIGN_SLOT_2 # define BOOST_PP_ASSIGN_SLOT_3 # define BOOST_PP_ASSIGN_SLOT_4 # define BOOST_PP_ASSIGN_SLOT_5 # # /* BOOST_PP_SLOT */ # # define BOOST_PP_SLOT(i) BOOST_PP_CAT(BOOST_PP_SLOT_, i)() # # endif passenger-4.0.37/ext/boost/preprocessor/slot/detail/def.hpp000644 000765 000024 00000005437 12233035540 024373 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SLOT_DETAIL_DEF_HPP # define BOOST_PREPROCESSOR_SLOT_DETAIL_DEF_HPP # # /* BOOST_PP_SLOT_OFFSET_x */ # # define BOOST_PP_SLOT_OFFSET_10(x) (x) % 1000000000UL # define BOOST_PP_SLOT_OFFSET_9(x) BOOST_PP_SLOT_OFFSET_10(x) % 100000000UL # define BOOST_PP_SLOT_OFFSET_8(x) BOOST_PP_SLOT_OFFSET_9(x) % 10000000UL # define BOOST_PP_SLOT_OFFSET_7(x) BOOST_PP_SLOT_OFFSET_8(x) % 1000000UL # define BOOST_PP_SLOT_OFFSET_6(x) BOOST_PP_SLOT_OFFSET_7(x) % 100000UL # define BOOST_PP_SLOT_OFFSET_5(x) BOOST_PP_SLOT_OFFSET_6(x) % 10000UL # define BOOST_PP_SLOT_OFFSET_4(x) BOOST_PP_SLOT_OFFSET_5(x) % 1000UL # define BOOST_PP_SLOT_OFFSET_3(x) BOOST_PP_SLOT_OFFSET_4(x) % 100UL # define BOOST_PP_SLOT_OFFSET_2(x) BOOST_PP_SLOT_OFFSET_3(x) % 10UL # # /* BOOST_PP_SLOT_CC_x */ # # define BOOST_PP_SLOT_CC_2(a, b) BOOST_PP_SLOT_CC_2_D(a, b) # define BOOST_PP_SLOT_CC_3(a, b, c) BOOST_PP_SLOT_CC_3_D(a, b, c) # define BOOST_PP_SLOT_CC_4(a, b, c, d) BOOST_PP_SLOT_CC_4_D(a, b, c, d) # define BOOST_PP_SLOT_CC_5(a, b, c, d, e) BOOST_PP_SLOT_CC_5_D(a, b, c, d, e) # define BOOST_PP_SLOT_CC_6(a, b, c, d, e, f) BOOST_PP_SLOT_CC_6_D(a, b, c, d, e, f) # define BOOST_PP_SLOT_CC_7(a, b, c, d, e, f, g) BOOST_PP_SLOT_CC_7_D(a, b, c, d, e, f, g) # define BOOST_PP_SLOT_CC_8(a, b, c, d, e, f, g, h) BOOST_PP_SLOT_CC_8_D(a, b, c, d, e, f, g, h) # define BOOST_PP_SLOT_CC_9(a, b, c, d, e, f, g, h, i) BOOST_PP_SLOT_CC_9_D(a, b, c, d, e, f, g, h, i) # define BOOST_PP_SLOT_CC_10(a, b, c, d, e, f, g, h, i, j) BOOST_PP_SLOT_CC_10_D(a, b, c, d, e, f, g, h, i, j) # # define BOOST_PP_SLOT_CC_2_D(a, b) a ## b # define BOOST_PP_SLOT_CC_3_D(a, b, c) a ## b ## c # define BOOST_PP_SLOT_CC_4_D(a, b, c, d) a ## b ## c ## d # define BOOST_PP_SLOT_CC_5_D(a, b, c, d, e) a ## b ## c ## d ## e # define BOOST_PP_SLOT_CC_6_D(a, b, c, d, e, f) a ## b ## c ## d ## e ## f # define BOOST_PP_SLOT_CC_7_D(a, b, c, d, e, f, g) a ## b ## c ## d ## e ## f ## g # define BOOST_PP_SLOT_CC_8_D(a, b, c, d, e, f, g, h) a ## b ## c ## d ## e ## f ## g ## h # define BOOST_PP_SLOT_CC_9_D(a, b, c, d, e, f, g, h, i) a ## b ## c ## d ## e ## f ## g ## h ## i # define BOOST_PP_SLOT_CC_10_D(a, b, c, d, e, f, g, h, i, j) a ## b ## c ## d ## e ## f ## g ## h ## i ## j # # endif passenger-4.0.37/ext/boost/preprocessor/slot/detail/shared.hpp000644 000765 000024 00000024360 12233035540 025077 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PP_VALUE # error BOOST_PP_ERROR: BOOST_PP_VALUE is not defined # endif # # undef BOOST_PP_SLOT_TEMP_1 # undef BOOST_PP_SLOT_TEMP_2 # undef BOOST_PP_SLOT_TEMP_3 # undef BOOST_PP_SLOT_TEMP_4 # undef BOOST_PP_SLOT_TEMP_5 # undef BOOST_PP_SLOT_TEMP_6 # undef BOOST_PP_SLOT_TEMP_7 # undef BOOST_PP_SLOT_TEMP_8 # undef BOOST_PP_SLOT_TEMP_9 # undef BOOST_PP_SLOT_TEMP_10 # # if (BOOST_PP_VALUE) / 1000000000UL == 0 # define BOOST_PP_SLOT_TEMP_10 0 # elif (BOOST_PP_VALUE) / 1000000000UL == 1 # define BOOST_PP_SLOT_TEMP_10 1 # elif (BOOST_PP_VALUE) / 1000000000UL == 2 # define BOOST_PP_SLOT_TEMP_10 2 # elif (BOOST_PP_VALUE) / 1000000000UL == 3 # define BOOST_PP_SLOT_TEMP_10 3 # elif (BOOST_PP_VALUE) / 1000000000UL == 4 # define BOOST_PP_SLOT_TEMP_10 4 # elif (BOOST_PP_VALUE) / 1000000000UL == 5 # define BOOST_PP_SLOT_TEMP_10 5 # elif (BOOST_PP_VALUE) / 1000000000UL == 6 # define BOOST_PP_SLOT_TEMP_10 6 # elif (BOOST_PP_VALUE) / 1000000000UL == 7 # define BOOST_PP_SLOT_TEMP_10 7 # elif (BOOST_PP_VALUE) / 1000000000UL == 8 # define BOOST_PP_SLOT_TEMP_10 8 # elif (BOOST_PP_VALUE) / 1000000000UL == 9 # define BOOST_PP_SLOT_TEMP_10 9 # endif # # if BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 0 # define BOOST_PP_SLOT_TEMP_9 0 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 1 # define BOOST_PP_SLOT_TEMP_9 1 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 2 # define BOOST_PP_SLOT_TEMP_9 2 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 3 # define BOOST_PP_SLOT_TEMP_9 3 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 4 # define BOOST_PP_SLOT_TEMP_9 4 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 5 # define BOOST_PP_SLOT_TEMP_9 5 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 6 # define BOOST_PP_SLOT_TEMP_9 6 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 7 # define BOOST_PP_SLOT_TEMP_9 7 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 8 # define BOOST_PP_SLOT_TEMP_9 8 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 9 # define BOOST_PP_SLOT_TEMP_9 9 # endif # # if BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 0 # define BOOST_PP_SLOT_TEMP_8 0 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 1 # define BOOST_PP_SLOT_TEMP_8 1 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 2 # define BOOST_PP_SLOT_TEMP_8 2 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 3 # define BOOST_PP_SLOT_TEMP_8 3 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 4 # define BOOST_PP_SLOT_TEMP_8 4 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 5 # define BOOST_PP_SLOT_TEMP_8 5 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 6 # define BOOST_PP_SLOT_TEMP_8 6 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 7 # define BOOST_PP_SLOT_TEMP_8 7 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 8 # define BOOST_PP_SLOT_TEMP_8 8 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 9 # define BOOST_PP_SLOT_TEMP_8 9 # endif # # if BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 0 # define BOOST_PP_SLOT_TEMP_7 0 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 1 # define BOOST_PP_SLOT_TEMP_7 1 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 2 # define BOOST_PP_SLOT_TEMP_7 2 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 3 # define BOOST_PP_SLOT_TEMP_7 3 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 4 # define BOOST_PP_SLOT_TEMP_7 4 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 5 # define BOOST_PP_SLOT_TEMP_7 5 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 6 # define BOOST_PP_SLOT_TEMP_7 6 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 7 # define BOOST_PP_SLOT_TEMP_7 7 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 8 # define BOOST_PP_SLOT_TEMP_7 8 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 9 # define BOOST_PP_SLOT_TEMP_7 9 # endif # # if BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 0 # define BOOST_PP_SLOT_TEMP_6 0 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 1 # define BOOST_PP_SLOT_TEMP_6 1 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 2 # define BOOST_PP_SLOT_TEMP_6 2 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 3 # define BOOST_PP_SLOT_TEMP_6 3 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 4 # define BOOST_PP_SLOT_TEMP_6 4 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 5 # define BOOST_PP_SLOT_TEMP_6 5 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 6 # define BOOST_PP_SLOT_TEMP_6 6 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 7 # define BOOST_PP_SLOT_TEMP_6 7 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 8 # define BOOST_PP_SLOT_TEMP_6 8 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 9 # define BOOST_PP_SLOT_TEMP_6 9 # endif # # if BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 0 # define BOOST_PP_SLOT_TEMP_5 0 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 1 # define BOOST_PP_SLOT_TEMP_5 1 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 2 # define BOOST_PP_SLOT_TEMP_5 2 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 3 # define BOOST_PP_SLOT_TEMP_5 3 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 4 # define BOOST_PP_SLOT_TEMP_5 4 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 5 # define BOOST_PP_SLOT_TEMP_5 5 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 6 # define BOOST_PP_SLOT_TEMP_5 6 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 7 # define BOOST_PP_SLOT_TEMP_5 7 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 8 # define BOOST_PP_SLOT_TEMP_5 8 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 9 # define BOOST_PP_SLOT_TEMP_5 9 # endif # # if BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 0 # define BOOST_PP_SLOT_TEMP_4 0 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 1 # define BOOST_PP_SLOT_TEMP_4 1 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 2 # define BOOST_PP_SLOT_TEMP_4 2 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 3 # define BOOST_PP_SLOT_TEMP_4 3 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 4 # define BOOST_PP_SLOT_TEMP_4 4 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 5 # define BOOST_PP_SLOT_TEMP_4 5 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 6 # define BOOST_PP_SLOT_TEMP_4 6 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 7 # define BOOST_PP_SLOT_TEMP_4 7 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 8 # define BOOST_PP_SLOT_TEMP_4 8 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 9 # define BOOST_PP_SLOT_TEMP_4 9 # endif # # if BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 0 # define BOOST_PP_SLOT_TEMP_3 0 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 1 # define BOOST_PP_SLOT_TEMP_3 1 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 2 # define BOOST_PP_SLOT_TEMP_3 2 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 3 # define BOOST_PP_SLOT_TEMP_3 3 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 4 # define BOOST_PP_SLOT_TEMP_3 4 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 5 # define BOOST_PP_SLOT_TEMP_3 5 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 6 # define BOOST_PP_SLOT_TEMP_3 6 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 7 # define BOOST_PP_SLOT_TEMP_3 7 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 8 # define BOOST_PP_SLOT_TEMP_3 8 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 9 # define BOOST_PP_SLOT_TEMP_3 9 # endif # # if BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 0 # define BOOST_PP_SLOT_TEMP_2 0 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 1 # define BOOST_PP_SLOT_TEMP_2 1 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 2 # define BOOST_PP_SLOT_TEMP_2 2 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 3 # define BOOST_PP_SLOT_TEMP_2 3 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 4 # define BOOST_PP_SLOT_TEMP_2 4 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 5 # define BOOST_PP_SLOT_TEMP_2 5 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 6 # define BOOST_PP_SLOT_TEMP_2 6 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 7 # define BOOST_PP_SLOT_TEMP_2 7 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 8 # define BOOST_PP_SLOT_TEMP_2 8 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 9 # define BOOST_PP_SLOT_TEMP_2 9 # endif # # if BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 0 # define BOOST_PP_SLOT_TEMP_1 0 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 1 # define BOOST_PP_SLOT_TEMP_1 1 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 2 # define BOOST_PP_SLOT_TEMP_1 2 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 3 # define BOOST_PP_SLOT_TEMP_1 3 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 4 # define BOOST_PP_SLOT_TEMP_1 4 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 5 # define BOOST_PP_SLOT_TEMP_1 5 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 6 # define BOOST_PP_SLOT_TEMP_1 6 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 7 # define BOOST_PP_SLOT_TEMP_1 7 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 8 # define BOOST_PP_SLOT_TEMP_1 8 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 9 # define BOOST_PP_SLOT_TEMP_1 9 # endif # # undef BOOST_PP_VALUE passenger-4.0.37/ext/boost/preprocessor/seq/elem.hpp000644 000765 000024 00000037542 12233035540 023126 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_ELEM_HPP # define BOOST_PREPROCESSOR_SEQ_ELEM_HPP # # include # include # include # # /* BOOST_PP_SEQ_ELEM */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_ELEM(i, seq) BOOST_PP_SEQ_ELEM_I(i, seq) # else # define BOOST_PP_SEQ_ELEM(i, seq) BOOST_PP_SEQ_ELEM_I((i, seq)) # endif # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II((BOOST_PP_SEQ_ELEM_ ## i seq)) # define BOOST_PP_SEQ_ELEM_II(res) BOOST_PP_SEQ_ELEM_IV(BOOST_PP_SEQ_ELEM_III res) # define BOOST_PP_SEQ_ELEM_III(x, _) x BOOST_PP_EMPTY() # define BOOST_PP_SEQ_ELEM_IV(x) x # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_ELEM_I(par) BOOST_PP_SEQ_ELEM_II ## par # define BOOST_PP_SEQ_ELEM_II(i, seq) BOOST_PP_SEQ_ELEM_III(BOOST_PP_SEQ_ELEM_ ## i ## seq) # define BOOST_PP_SEQ_ELEM_III(im) BOOST_PP_SEQ_ELEM_IV(im) # define BOOST_PP_SEQ_ELEM_IV(x, _) x # else # if defined(__IBMC__) || defined(__IBMCPP__) # define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II(BOOST_PP_CAT(BOOST_PP_SEQ_ELEM_ ## i, seq)) # else # define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II(BOOST_PP_SEQ_ELEM_ ## i seq) # endif # define BOOST_PP_SEQ_ELEM_II(im) BOOST_PP_SEQ_ELEM_III(im) # define BOOST_PP_SEQ_ELEM_III(x, _) x # endif # # define BOOST_PP_SEQ_ELEM_0(x) x, BOOST_PP_NIL # define BOOST_PP_SEQ_ELEM_1(_) BOOST_PP_SEQ_ELEM_0 # define BOOST_PP_SEQ_ELEM_2(_) BOOST_PP_SEQ_ELEM_1 # define BOOST_PP_SEQ_ELEM_3(_) BOOST_PP_SEQ_ELEM_2 # define BOOST_PP_SEQ_ELEM_4(_) BOOST_PP_SEQ_ELEM_3 # define BOOST_PP_SEQ_ELEM_5(_) BOOST_PP_SEQ_ELEM_4 # define BOOST_PP_SEQ_ELEM_6(_) BOOST_PP_SEQ_ELEM_5 # define BOOST_PP_SEQ_ELEM_7(_) BOOST_PP_SEQ_ELEM_6 # define BOOST_PP_SEQ_ELEM_8(_) BOOST_PP_SEQ_ELEM_7 # define BOOST_PP_SEQ_ELEM_9(_) BOOST_PP_SEQ_ELEM_8 # define BOOST_PP_SEQ_ELEM_10(_) BOOST_PP_SEQ_ELEM_9 # define BOOST_PP_SEQ_ELEM_11(_) BOOST_PP_SEQ_ELEM_10 # define BOOST_PP_SEQ_ELEM_12(_) BOOST_PP_SEQ_ELEM_11 # define BOOST_PP_SEQ_ELEM_13(_) BOOST_PP_SEQ_ELEM_12 # define BOOST_PP_SEQ_ELEM_14(_) BOOST_PP_SEQ_ELEM_13 # define BOOST_PP_SEQ_ELEM_15(_) BOOST_PP_SEQ_ELEM_14 # define BOOST_PP_SEQ_ELEM_16(_) BOOST_PP_SEQ_ELEM_15 # define BOOST_PP_SEQ_ELEM_17(_) BOOST_PP_SEQ_ELEM_16 # define BOOST_PP_SEQ_ELEM_18(_) BOOST_PP_SEQ_ELEM_17 # define BOOST_PP_SEQ_ELEM_19(_) BOOST_PP_SEQ_ELEM_18 # define BOOST_PP_SEQ_ELEM_20(_) BOOST_PP_SEQ_ELEM_19 # define BOOST_PP_SEQ_ELEM_21(_) BOOST_PP_SEQ_ELEM_20 # define BOOST_PP_SEQ_ELEM_22(_) BOOST_PP_SEQ_ELEM_21 # define BOOST_PP_SEQ_ELEM_23(_) BOOST_PP_SEQ_ELEM_22 # define BOOST_PP_SEQ_ELEM_24(_) BOOST_PP_SEQ_ELEM_23 # define BOOST_PP_SEQ_ELEM_25(_) BOOST_PP_SEQ_ELEM_24 # define BOOST_PP_SEQ_ELEM_26(_) BOOST_PP_SEQ_ELEM_25 # define BOOST_PP_SEQ_ELEM_27(_) BOOST_PP_SEQ_ELEM_26 # define BOOST_PP_SEQ_ELEM_28(_) BOOST_PP_SEQ_ELEM_27 # define BOOST_PP_SEQ_ELEM_29(_) BOOST_PP_SEQ_ELEM_28 # define BOOST_PP_SEQ_ELEM_30(_) BOOST_PP_SEQ_ELEM_29 # define BOOST_PP_SEQ_ELEM_31(_) BOOST_PP_SEQ_ELEM_30 # define BOOST_PP_SEQ_ELEM_32(_) BOOST_PP_SEQ_ELEM_31 # define BOOST_PP_SEQ_ELEM_33(_) BOOST_PP_SEQ_ELEM_32 # define BOOST_PP_SEQ_ELEM_34(_) BOOST_PP_SEQ_ELEM_33 # define BOOST_PP_SEQ_ELEM_35(_) BOOST_PP_SEQ_ELEM_34 # define BOOST_PP_SEQ_ELEM_36(_) BOOST_PP_SEQ_ELEM_35 # define BOOST_PP_SEQ_ELEM_37(_) BOOST_PP_SEQ_ELEM_36 # define BOOST_PP_SEQ_ELEM_38(_) BOOST_PP_SEQ_ELEM_37 # define BOOST_PP_SEQ_ELEM_39(_) BOOST_PP_SEQ_ELEM_38 # define BOOST_PP_SEQ_ELEM_40(_) BOOST_PP_SEQ_ELEM_39 # define BOOST_PP_SEQ_ELEM_41(_) BOOST_PP_SEQ_ELEM_40 # define BOOST_PP_SEQ_ELEM_42(_) BOOST_PP_SEQ_ELEM_41 # define BOOST_PP_SEQ_ELEM_43(_) BOOST_PP_SEQ_ELEM_42 # define BOOST_PP_SEQ_ELEM_44(_) BOOST_PP_SEQ_ELEM_43 # define BOOST_PP_SEQ_ELEM_45(_) BOOST_PP_SEQ_ELEM_44 # define BOOST_PP_SEQ_ELEM_46(_) BOOST_PP_SEQ_ELEM_45 # define BOOST_PP_SEQ_ELEM_47(_) BOOST_PP_SEQ_ELEM_46 # define BOOST_PP_SEQ_ELEM_48(_) BOOST_PP_SEQ_ELEM_47 # define BOOST_PP_SEQ_ELEM_49(_) BOOST_PP_SEQ_ELEM_48 # define BOOST_PP_SEQ_ELEM_50(_) BOOST_PP_SEQ_ELEM_49 # define BOOST_PP_SEQ_ELEM_51(_) BOOST_PP_SEQ_ELEM_50 # define BOOST_PP_SEQ_ELEM_52(_) BOOST_PP_SEQ_ELEM_51 # define BOOST_PP_SEQ_ELEM_53(_) BOOST_PP_SEQ_ELEM_52 # define BOOST_PP_SEQ_ELEM_54(_) BOOST_PP_SEQ_ELEM_53 # define BOOST_PP_SEQ_ELEM_55(_) BOOST_PP_SEQ_ELEM_54 # define BOOST_PP_SEQ_ELEM_56(_) BOOST_PP_SEQ_ELEM_55 # define BOOST_PP_SEQ_ELEM_57(_) BOOST_PP_SEQ_ELEM_56 # define BOOST_PP_SEQ_ELEM_58(_) BOOST_PP_SEQ_ELEM_57 # define BOOST_PP_SEQ_ELEM_59(_) BOOST_PP_SEQ_ELEM_58 # define BOOST_PP_SEQ_ELEM_60(_) BOOST_PP_SEQ_ELEM_59 # define BOOST_PP_SEQ_ELEM_61(_) BOOST_PP_SEQ_ELEM_60 # define BOOST_PP_SEQ_ELEM_62(_) BOOST_PP_SEQ_ELEM_61 # define BOOST_PP_SEQ_ELEM_63(_) BOOST_PP_SEQ_ELEM_62 # define BOOST_PP_SEQ_ELEM_64(_) BOOST_PP_SEQ_ELEM_63 # define BOOST_PP_SEQ_ELEM_65(_) BOOST_PP_SEQ_ELEM_64 # define BOOST_PP_SEQ_ELEM_66(_) BOOST_PP_SEQ_ELEM_65 # define BOOST_PP_SEQ_ELEM_67(_) BOOST_PP_SEQ_ELEM_66 # define BOOST_PP_SEQ_ELEM_68(_) BOOST_PP_SEQ_ELEM_67 # define BOOST_PP_SEQ_ELEM_69(_) BOOST_PP_SEQ_ELEM_68 # define BOOST_PP_SEQ_ELEM_70(_) BOOST_PP_SEQ_ELEM_69 # define BOOST_PP_SEQ_ELEM_71(_) BOOST_PP_SEQ_ELEM_70 # define BOOST_PP_SEQ_ELEM_72(_) BOOST_PP_SEQ_ELEM_71 # define BOOST_PP_SEQ_ELEM_73(_) BOOST_PP_SEQ_ELEM_72 # define BOOST_PP_SEQ_ELEM_74(_) BOOST_PP_SEQ_ELEM_73 # define BOOST_PP_SEQ_ELEM_75(_) BOOST_PP_SEQ_ELEM_74 # define BOOST_PP_SEQ_ELEM_76(_) BOOST_PP_SEQ_ELEM_75 # define BOOST_PP_SEQ_ELEM_77(_) BOOST_PP_SEQ_ELEM_76 # define BOOST_PP_SEQ_ELEM_78(_) BOOST_PP_SEQ_ELEM_77 # define BOOST_PP_SEQ_ELEM_79(_) BOOST_PP_SEQ_ELEM_78 # define BOOST_PP_SEQ_ELEM_80(_) BOOST_PP_SEQ_ELEM_79 # define BOOST_PP_SEQ_ELEM_81(_) BOOST_PP_SEQ_ELEM_80 # define BOOST_PP_SEQ_ELEM_82(_) BOOST_PP_SEQ_ELEM_81 # define BOOST_PP_SEQ_ELEM_83(_) BOOST_PP_SEQ_ELEM_82 # define BOOST_PP_SEQ_ELEM_84(_) BOOST_PP_SEQ_ELEM_83 # define BOOST_PP_SEQ_ELEM_85(_) BOOST_PP_SEQ_ELEM_84 # define BOOST_PP_SEQ_ELEM_86(_) BOOST_PP_SEQ_ELEM_85 # define BOOST_PP_SEQ_ELEM_87(_) BOOST_PP_SEQ_ELEM_86 # define BOOST_PP_SEQ_ELEM_88(_) BOOST_PP_SEQ_ELEM_87 # define BOOST_PP_SEQ_ELEM_89(_) BOOST_PP_SEQ_ELEM_88 # define BOOST_PP_SEQ_ELEM_90(_) BOOST_PP_SEQ_ELEM_89 # define BOOST_PP_SEQ_ELEM_91(_) BOOST_PP_SEQ_ELEM_90 # define BOOST_PP_SEQ_ELEM_92(_) BOOST_PP_SEQ_ELEM_91 # define BOOST_PP_SEQ_ELEM_93(_) BOOST_PP_SEQ_ELEM_92 # define BOOST_PP_SEQ_ELEM_94(_) BOOST_PP_SEQ_ELEM_93 # define BOOST_PP_SEQ_ELEM_95(_) BOOST_PP_SEQ_ELEM_94 # define BOOST_PP_SEQ_ELEM_96(_) BOOST_PP_SEQ_ELEM_95 # define BOOST_PP_SEQ_ELEM_97(_) BOOST_PP_SEQ_ELEM_96 # define BOOST_PP_SEQ_ELEM_98(_) BOOST_PP_SEQ_ELEM_97 # define BOOST_PP_SEQ_ELEM_99(_) BOOST_PP_SEQ_ELEM_98 # define BOOST_PP_SEQ_ELEM_100(_) BOOST_PP_SEQ_ELEM_99 # define BOOST_PP_SEQ_ELEM_101(_) BOOST_PP_SEQ_ELEM_100 # define BOOST_PP_SEQ_ELEM_102(_) BOOST_PP_SEQ_ELEM_101 # define BOOST_PP_SEQ_ELEM_103(_) BOOST_PP_SEQ_ELEM_102 # define BOOST_PP_SEQ_ELEM_104(_) BOOST_PP_SEQ_ELEM_103 # define BOOST_PP_SEQ_ELEM_105(_) BOOST_PP_SEQ_ELEM_104 # define BOOST_PP_SEQ_ELEM_106(_) BOOST_PP_SEQ_ELEM_105 # define BOOST_PP_SEQ_ELEM_107(_) BOOST_PP_SEQ_ELEM_106 # define BOOST_PP_SEQ_ELEM_108(_) BOOST_PP_SEQ_ELEM_107 # define BOOST_PP_SEQ_ELEM_109(_) BOOST_PP_SEQ_ELEM_108 # define BOOST_PP_SEQ_ELEM_110(_) BOOST_PP_SEQ_ELEM_109 # define BOOST_PP_SEQ_ELEM_111(_) BOOST_PP_SEQ_ELEM_110 # define BOOST_PP_SEQ_ELEM_112(_) BOOST_PP_SEQ_ELEM_111 # define BOOST_PP_SEQ_ELEM_113(_) BOOST_PP_SEQ_ELEM_112 # define BOOST_PP_SEQ_ELEM_114(_) BOOST_PP_SEQ_ELEM_113 # define BOOST_PP_SEQ_ELEM_115(_) BOOST_PP_SEQ_ELEM_114 # define BOOST_PP_SEQ_ELEM_116(_) BOOST_PP_SEQ_ELEM_115 # define BOOST_PP_SEQ_ELEM_117(_) BOOST_PP_SEQ_ELEM_116 # define BOOST_PP_SEQ_ELEM_118(_) BOOST_PP_SEQ_ELEM_117 # define BOOST_PP_SEQ_ELEM_119(_) BOOST_PP_SEQ_ELEM_118 # define BOOST_PP_SEQ_ELEM_120(_) BOOST_PP_SEQ_ELEM_119 # define BOOST_PP_SEQ_ELEM_121(_) BOOST_PP_SEQ_ELEM_120 # define BOOST_PP_SEQ_ELEM_122(_) BOOST_PP_SEQ_ELEM_121 # define BOOST_PP_SEQ_ELEM_123(_) BOOST_PP_SEQ_ELEM_122 # define BOOST_PP_SEQ_ELEM_124(_) BOOST_PP_SEQ_ELEM_123 # define BOOST_PP_SEQ_ELEM_125(_) BOOST_PP_SEQ_ELEM_124 # define BOOST_PP_SEQ_ELEM_126(_) BOOST_PP_SEQ_ELEM_125 # define BOOST_PP_SEQ_ELEM_127(_) BOOST_PP_SEQ_ELEM_126 # define BOOST_PP_SEQ_ELEM_128(_) BOOST_PP_SEQ_ELEM_127 # define BOOST_PP_SEQ_ELEM_129(_) BOOST_PP_SEQ_ELEM_128 # define BOOST_PP_SEQ_ELEM_130(_) BOOST_PP_SEQ_ELEM_129 # define BOOST_PP_SEQ_ELEM_131(_) BOOST_PP_SEQ_ELEM_130 # define BOOST_PP_SEQ_ELEM_132(_) BOOST_PP_SEQ_ELEM_131 # define BOOST_PP_SEQ_ELEM_133(_) BOOST_PP_SEQ_ELEM_132 # define BOOST_PP_SEQ_ELEM_134(_) BOOST_PP_SEQ_ELEM_133 # define BOOST_PP_SEQ_ELEM_135(_) BOOST_PP_SEQ_ELEM_134 # define BOOST_PP_SEQ_ELEM_136(_) BOOST_PP_SEQ_ELEM_135 # define BOOST_PP_SEQ_ELEM_137(_) BOOST_PP_SEQ_ELEM_136 # define BOOST_PP_SEQ_ELEM_138(_) BOOST_PP_SEQ_ELEM_137 # define BOOST_PP_SEQ_ELEM_139(_) BOOST_PP_SEQ_ELEM_138 # define BOOST_PP_SEQ_ELEM_140(_) BOOST_PP_SEQ_ELEM_139 # define BOOST_PP_SEQ_ELEM_141(_) BOOST_PP_SEQ_ELEM_140 # define BOOST_PP_SEQ_ELEM_142(_) BOOST_PP_SEQ_ELEM_141 # define BOOST_PP_SEQ_ELEM_143(_) BOOST_PP_SEQ_ELEM_142 # define BOOST_PP_SEQ_ELEM_144(_) BOOST_PP_SEQ_ELEM_143 # define BOOST_PP_SEQ_ELEM_145(_) BOOST_PP_SEQ_ELEM_144 # define BOOST_PP_SEQ_ELEM_146(_) BOOST_PP_SEQ_ELEM_145 # define BOOST_PP_SEQ_ELEM_147(_) BOOST_PP_SEQ_ELEM_146 # define BOOST_PP_SEQ_ELEM_148(_) BOOST_PP_SEQ_ELEM_147 # define BOOST_PP_SEQ_ELEM_149(_) BOOST_PP_SEQ_ELEM_148 # define BOOST_PP_SEQ_ELEM_150(_) BOOST_PP_SEQ_ELEM_149 # define BOOST_PP_SEQ_ELEM_151(_) BOOST_PP_SEQ_ELEM_150 # define BOOST_PP_SEQ_ELEM_152(_) BOOST_PP_SEQ_ELEM_151 # define BOOST_PP_SEQ_ELEM_153(_) BOOST_PP_SEQ_ELEM_152 # define BOOST_PP_SEQ_ELEM_154(_) BOOST_PP_SEQ_ELEM_153 # define BOOST_PP_SEQ_ELEM_155(_) BOOST_PP_SEQ_ELEM_154 # define BOOST_PP_SEQ_ELEM_156(_) BOOST_PP_SEQ_ELEM_155 # define BOOST_PP_SEQ_ELEM_157(_) BOOST_PP_SEQ_ELEM_156 # define BOOST_PP_SEQ_ELEM_158(_) BOOST_PP_SEQ_ELEM_157 # define BOOST_PP_SEQ_ELEM_159(_) BOOST_PP_SEQ_ELEM_158 # define BOOST_PP_SEQ_ELEM_160(_) BOOST_PP_SEQ_ELEM_159 # define BOOST_PP_SEQ_ELEM_161(_) BOOST_PP_SEQ_ELEM_160 # define BOOST_PP_SEQ_ELEM_162(_) BOOST_PP_SEQ_ELEM_161 # define BOOST_PP_SEQ_ELEM_163(_) BOOST_PP_SEQ_ELEM_162 # define BOOST_PP_SEQ_ELEM_164(_) BOOST_PP_SEQ_ELEM_163 # define BOOST_PP_SEQ_ELEM_165(_) BOOST_PP_SEQ_ELEM_164 # define BOOST_PP_SEQ_ELEM_166(_) BOOST_PP_SEQ_ELEM_165 # define BOOST_PP_SEQ_ELEM_167(_) BOOST_PP_SEQ_ELEM_166 # define BOOST_PP_SEQ_ELEM_168(_) BOOST_PP_SEQ_ELEM_167 # define BOOST_PP_SEQ_ELEM_169(_) BOOST_PP_SEQ_ELEM_168 # define BOOST_PP_SEQ_ELEM_170(_) BOOST_PP_SEQ_ELEM_169 # define BOOST_PP_SEQ_ELEM_171(_) BOOST_PP_SEQ_ELEM_170 # define BOOST_PP_SEQ_ELEM_172(_) BOOST_PP_SEQ_ELEM_171 # define BOOST_PP_SEQ_ELEM_173(_) BOOST_PP_SEQ_ELEM_172 # define BOOST_PP_SEQ_ELEM_174(_) BOOST_PP_SEQ_ELEM_173 # define BOOST_PP_SEQ_ELEM_175(_) BOOST_PP_SEQ_ELEM_174 # define BOOST_PP_SEQ_ELEM_176(_) BOOST_PP_SEQ_ELEM_175 # define BOOST_PP_SEQ_ELEM_177(_) BOOST_PP_SEQ_ELEM_176 # define BOOST_PP_SEQ_ELEM_178(_) BOOST_PP_SEQ_ELEM_177 # define BOOST_PP_SEQ_ELEM_179(_) BOOST_PP_SEQ_ELEM_178 # define BOOST_PP_SEQ_ELEM_180(_) BOOST_PP_SEQ_ELEM_179 # define BOOST_PP_SEQ_ELEM_181(_) BOOST_PP_SEQ_ELEM_180 # define BOOST_PP_SEQ_ELEM_182(_) BOOST_PP_SEQ_ELEM_181 # define BOOST_PP_SEQ_ELEM_183(_) BOOST_PP_SEQ_ELEM_182 # define BOOST_PP_SEQ_ELEM_184(_) BOOST_PP_SEQ_ELEM_183 # define BOOST_PP_SEQ_ELEM_185(_) BOOST_PP_SEQ_ELEM_184 # define BOOST_PP_SEQ_ELEM_186(_) BOOST_PP_SEQ_ELEM_185 # define BOOST_PP_SEQ_ELEM_187(_) BOOST_PP_SEQ_ELEM_186 # define BOOST_PP_SEQ_ELEM_188(_) BOOST_PP_SEQ_ELEM_187 # define BOOST_PP_SEQ_ELEM_189(_) BOOST_PP_SEQ_ELEM_188 # define BOOST_PP_SEQ_ELEM_190(_) BOOST_PP_SEQ_ELEM_189 # define BOOST_PP_SEQ_ELEM_191(_) BOOST_PP_SEQ_ELEM_190 # define BOOST_PP_SEQ_ELEM_192(_) BOOST_PP_SEQ_ELEM_191 # define BOOST_PP_SEQ_ELEM_193(_) BOOST_PP_SEQ_ELEM_192 # define BOOST_PP_SEQ_ELEM_194(_) BOOST_PP_SEQ_ELEM_193 # define BOOST_PP_SEQ_ELEM_195(_) BOOST_PP_SEQ_ELEM_194 # define BOOST_PP_SEQ_ELEM_196(_) BOOST_PP_SEQ_ELEM_195 # define BOOST_PP_SEQ_ELEM_197(_) BOOST_PP_SEQ_ELEM_196 # define BOOST_PP_SEQ_ELEM_198(_) BOOST_PP_SEQ_ELEM_197 # define BOOST_PP_SEQ_ELEM_199(_) BOOST_PP_SEQ_ELEM_198 # define BOOST_PP_SEQ_ELEM_200(_) BOOST_PP_SEQ_ELEM_199 # define BOOST_PP_SEQ_ELEM_201(_) BOOST_PP_SEQ_ELEM_200 # define BOOST_PP_SEQ_ELEM_202(_) BOOST_PP_SEQ_ELEM_201 # define BOOST_PP_SEQ_ELEM_203(_) BOOST_PP_SEQ_ELEM_202 # define BOOST_PP_SEQ_ELEM_204(_) BOOST_PP_SEQ_ELEM_203 # define BOOST_PP_SEQ_ELEM_205(_) BOOST_PP_SEQ_ELEM_204 # define BOOST_PP_SEQ_ELEM_206(_) BOOST_PP_SEQ_ELEM_205 # define BOOST_PP_SEQ_ELEM_207(_) BOOST_PP_SEQ_ELEM_206 # define BOOST_PP_SEQ_ELEM_208(_) BOOST_PP_SEQ_ELEM_207 # define BOOST_PP_SEQ_ELEM_209(_) BOOST_PP_SEQ_ELEM_208 # define BOOST_PP_SEQ_ELEM_210(_) BOOST_PP_SEQ_ELEM_209 # define BOOST_PP_SEQ_ELEM_211(_) BOOST_PP_SEQ_ELEM_210 # define BOOST_PP_SEQ_ELEM_212(_) BOOST_PP_SEQ_ELEM_211 # define BOOST_PP_SEQ_ELEM_213(_) BOOST_PP_SEQ_ELEM_212 # define BOOST_PP_SEQ_ELEM_214(_) BOOST_PP_SEQ_ELEM_213 # define BOOST_PP_SEQ_ELEM_215(_) BOOST_PP_SEQ_ELEM_214 # define BOOST_PP_SEQ_ELEM_216(_) BOOST_PP_SEQ_ELEM_215 # define BOOST_PP_SEQ_ELEM_217(_) BOOST_PP_SEQ_ELEM_216 # define BOOST_PP_SEQ_ELEM_218(_) BOOST_PP_SEQ_ELEM_217 # define BOOST_PP_SEQ_ELEM_219(_) BOOST_PP_SEQ_ELEM_218 # define BOOST_PP_SEQ_ELEM_220(_) BOOST_PP_SEQ_ELEM_219 # define BOOST_PP_SEQ_ELEM_221(_) BOOST_PP_SEQ_ELEM_220 # define BOOST_PP_SEQ_ELEM_222(_) BOOST_PP_SEQ_ELEM_221 # define BOOST_PP_SEQ_ELEM_223(_) BOOST_PP_SEQ_ELEM_222 # define BOOST_PP_SEQ_ELEM_224(_) BOOST_PP_SEQ_ELEM_223 # define BOOST_PP_SEQ_ELEM_225(_) BOOST_PP_SEQ_ELEM_224 # define BOOST_PP_SEQ_ELEM_226(_) BOOST_PP_SEQ_ELEM_225 # define BOOST_PP_SEQ_ELEM_227(_) BOOST_PP_SEQ_ELEM_226 # define BOOST_PP_SEQ_ELEM_228(_) BOOST_PP_SEQ_ELEM_227 # define BOOST_PP_SEQ_ELEM_229(_) BOOST_PP_SEQ_ELEM_228 # define BOOST_PP_SEQ_ELEM_230(_) BOOST_PP_SEQ_ELEM_229 # define BOOST_PP_SEQ_ELEM_231(_) BOOST_PP_SEQ_ELEM_230 # define BOOST_PP_SEQ_ELEM_232(_) BOOST_PP_SEQ_ELEM_231 # define BOOST_PP_SEQ_ELEM_233(_) BOOST_PP_SEQ_ELEM_232 # define BOOST_PP_SEQ_ELEM_234(_) BOOST_PP_SEQ_ELEM_233 # define BOOST_PP_SEQ_ELEM_235(_) BOOST_PP_SEQ_ELEM_234 # define BOOST_PP_SEQ_ELEM_236(_) BOOST_PP_SEQ_ELEM_235 # define BOOST_PP_SEQ_ELEM_237(_) BOOST_PP_SEQ_ELEM_236 # define BOOST_PP_SEQ_ELEM_238(_) BOOST_PP_SEQ_ELEM_237 # define BOOST_PP_SEQ_ELEM_239(_) BOOST_PP_SEQ_ELEM_238 # define BOOST_PP_SEQ_ELEM_240(_) BOOST_PP_SEQ_ELEM_239 # define BOOST_PP_SEQ_ELEM_241(_) BOOST_PP_SEQ_ELEM_240 # define BOOST_PP_SEQ_ELEM_242(_) BOOST_PP_SEQ_ELEM_241 # define BOOST_PP_SEQ_ELEM_243(_) BOOST_PP_SEQ_ELEM_242 # define BOOST_PP_SEQ_ELEM_244(_) BOOST_PP_SEQ_ELEM_243 # define BOOST_PP_SEQ_ELEM_245(_) BOOST_PP_SEQ_ELEM_244 # define BOOST_PP_SEQ_ELEM_246(_) BOOST_PP_SEQ_ELEM_245 # define BOOST_PP_SEQ_ELEM_247(_) BOOST_PP_SEQ_ELEM_246 # define BOOST_PP_SEQ_ELEM_248(_) BOOST_PP_SEQ_ELEM_247 # define BOOST_PP_SEQ_ELEM_249(_) BOOST_PP_SEQ_ELEM_248 # define BOOST_PP_SEQ_ELEM_250(_) BOOST_PP_SEQ_ELEM_249 # define BOOST_PP_SEQ_ELEM_251(_) BOOST_PP_SEQ_ELEM_250 # define BOOST_PP_SEQ_ELEM_252(_) BOOST_PP_SEQ_ELEM_251 # define BOOST_PP_SEQ_ELEM_253(_) BOOST_PP_SEQ_ELEM_252 # define BOOST_PP_SEQ_ELEM_254(_) BOOST_PP_SEQ_ELEM_253 # define BOOST_PP_SEQ_ELEM_255(_) BOOST_PP_SEQ_ELEM_254 # # endif passenger-4.0.37/ext/boost/preprocessor/seq/enum.hpp000644 000765 000024 00000037621 12233035540 023146 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_ENUM_HPP # define BOOST_PREPROCESSOR_SEQ_ENUM_HPP # # include # include # include # # /* BOOST_PP_SEQ_ENUM */ # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM_I(seq) # define BOOST_PP_SEQ_ENUM_I(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM_I(BOOST_PP_SEQ_SIZE(seq), seq) # define BOOST_PP_SEQ_ENUM_I(size, seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, size) seq # else # define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq # endif # # define BOOST_PP_SEQ_ENUM_1(x) x # define BOOST_PP_SEQ_ENUM_2(x) x, BOOST_PP_SEQ_ENUM_1 # define BOOST_PP_SEQ_ENUM_3(x) x, BOOST_PP_SEQ_ENUM_2 # define BOOST_PP_SEQ_ENUM_4(x) x, BOOST_PP_SEQ_ENUM_3 # define BOOST_PP_SEQ_ENUM_5(x) x, BOOST_PP_SEQ_ENUM_4 # define BOOST_PP_SEQ_ENUM_6(x) x, BOOST_PP_SEQ_ENUM_5 # define BOOST_PP_SEQ_ENUM_7(x) x, BOOST_PP_SEQ_ENUM_6 # define BOOST_PP_SEQ_ENUM_8(x) x, BOOST_PP_SEQ_ENUM_7 # define BOOST_PP_SEQ_ENUM_9(x) x, BOOST_PP_SEQ_ENUM_8 # define BOOST_PP_SEQ_ENUM_10(x) x, BOOST_PP_SEQ_ENUM_9 # define BOOST_PP_SEQ_ENUM_11(x) x, BOOST_PP_SEQ_ENUM_10 # define BOOST_PP_SEQ_ENUM_12(x) x, BOOST_PP_SEQ_ENUM_11 # define BOOST_PP_SEQ_ENUM_13(x) x, BOOST_PP_SEQ_ENUM_12 # define BOOST_PP_SEQ_ENUM_14(x) x, BOOST_PP_SEQ_ENUM_13 # define BOOST_PP_SEQ_ENUM_15(x) x, BOOST_PP_SEQ_ENUM_14 # define BOOST_PP_SEQ_ENUM_16(x) x, BOOST_PP_SEQ_ENUM_15 # define BOOST_PP_SEQ_ENUM_17(x) x, BOOST_PP_SEQ_ENUM_16 # define BOOST_PP_SEQ_ENUM_18(x) x, BOOST_PP_SEQ_ENUM_17 # define BOOST_PP_SEQ_ENUM_19(x) x, BOOST_PP_SEQ_ENUM_18 # define BOOST_PP_SEQ_ENUM_20(x) x, BOOST_PP_SEQ_ENUM_19 # define BOOST_PP_SEQ_ENUM_21(x) x, BOOST_PP_SEQ_ENUM_20 # define BOOST_PP_SEQ_ENUM_22(x) x, BOOST_PP_SEQ_ENUM_21 # define BOOST_PP_SEQ_ENUM_23(x) x, BOOST_PP_SEQ_ENUM_22 # define BOOST_PP_SEQ_ENUM_24(x) x, BOOST_PP_SEQ_ENUM_23 # define BOOST_PP_SEQ_ENUM_25(x) x, BOOST_PP_SEQ_ENUM_24 # define BOOST_PP_SEQ_ENUM_26(x) x, BOOST_PP_SEQ_ENUM_25 # define BOOST_PP_SEQ_ENUM_27(x) x, BOOST_PP_SEQ_ENUM_26 # define BOOST_PP_SEQ_ENUM_28(x) x, BOOST_PP_SEQ_ENUM_27 # define BOOST_PP_SEQ_ENUM_29(x) x, BOOST_PP_SEQ_ENUM_28 # define BOOST_PP_SEQ_ENUM_30(x) x, BOOST_PP_SEQ_ENUM_29 # define BOOST_PP_SEQ_ENUM_31(x) x, BOOST_PP_SEQ_ENUM_30 # define BOOST_PP_SEQ_ENUM_32(x) x, BOOST_PP_SEQ_ENUM_31 # define BOOST_PP_SEQ_ENUM_33(x) x, BOOST_PP_SEQ_ENUM_32 # define BOOST_PP_SEQ_ENUM_34(x) x, BOOST_PP_SEQ_ENUM_33 # define BOOST_PP_SEQ_ENUM_35(x) x, BOOST_PP_SEQ_ENUM_34 # define BOOST_PP_SEQ_ENUM_36(x) x, BOOST_PP_SEQ_ENUM_35 # define BOOST_PP_SEQ_ENUM_37(x) x, BOOST_PP_SEQ_ENUM_36 # define BOOST_PP_SEQ_ENUM_38(x) x, BOOST_PP_SEQ_ENUM_37 # define BOOST_PP_SEQ_ENUM_39(x) x, BOOST_PP_SEQ_ENUM_38 # define BOOST_PP_SEQ_ENUM_40(x) x, BOOST_PP_SEQ_ENUM_39 # define BOOST_PP_SEQ_ENUM_41(x) x, BOOST_PP_SEQ_ENUM_40 # define BOOST_PP_SEQ_ENUM_42(x) x, BOOST_PP_SEQ_ENUM_41 # define BOOST_PP_SEQ_ENUM_43(x) x, BOOST_PP_SEQ_ENUM_42 # define BOOST_PP_SEQ_ENUM_44(x) x, BOOST_PP_SEQ_ENUM_43 # define BOOST_PP_SEQ_ENUM_45(x) x, BOOST_PP_SEQ_ENUM_44 # define BOOST_PP_SEQ_ENUM_46(x) x, BOOST_PP_SEQ_ENUM_45 # define BOOST_PP_SEQ_ENUM_47(x) x, BOOST_PP_SEQ_ENUM_46 # define BOOST_PP_SEQ_ENUM_48(x) x, BOOST_PP_SEQ_ENUM_47 # define BOOST_PP_SEQ_ENUM_49(x) x, BOOST_PP_SEQ_ENUM_48 # define BOOST_PP_SEQ_ENUM_50(x) x, BOOST_PP_SEQ_ENUM_49 # define BOOST_PP_SEQ_ENUM_51(x) x, BOOST_PP_SEQ_ENUM_50 # define BOOST_PP_SEQ_ENUM_52(x) x, BOOST_PP_SEQ_ENUM_51 # define BOOST_PP_SEQ_ENUM_53(x) x, BOOST_PP_SEQ_ENUM_52 # define BOOST_PP_SEQ_ENUM_54(x) x, BOOST_PP_SEQ_ENUM_53 # define BOOST_PP_SEQ_ENUM_55(x) x, BOOST_PP_SEQ_ENUM_54 # define BOOST_PP_SEQ_ENUM_56(x) x, BOOST_PP_SEQ_ENUM_55 # define BOOST_PP_SEQ_ENUM_57(x) x, BOOST_PP_SEQ_ENUM_56 # define BOOST_PP_SEQ_ENUM_58(x) x, BOOST_PP_SEQ_ENUM_57 # define BOOST_PP_SEQ_ENUM_59(x) x, BOOST_PP_SEQ_ENUM_58 # define BOOST_PP_SEQ_ENUM_60(x) x, BOOST_PP_SEQ_ENUM_59 # define BOOST_PP_SEQ_ENUM_61(x) x, BOOST_PP_SEQ_ENUM_60 # define BOOST_PP_SEQ_ENUM_62(x) x, BOOST_PP_SEQ_ENUM_61 # define BOOST_PP_SEQ_ENUM_63(x) x, BOOST_PP_SEQ_ENUM_62 # define BOOST_PP_SEQ_ENUM_64(x) x, BOOST_PP_SEQ_ENUM_63 # define BOOST_PP_SEQ_ENUM_65(x) x, BOOST_PP_SEQ_ENUM_64 # define BOOST_PP_SEQ_ENUM_66(x) x, BOOST_PP_SEQ_ENUM_65 # define BOOST_PP_SEQ_ENUM_67(x) x, BOOST_PP_SEQ_ENUM_66 # define BOOST_PP_SEQ_ENUM_68(x) x, BOOST_PP_SEQ_ENUM_67 # define BOOST_PP_SEQ_ENUM_69(x) x, BOOST_PP_SEQ_ENUM_68 # define BOOST_PP_SEQ_ENUM_70(x) x, BOOST_PP_SEQ_ENUM_69 # define BOOST_PP_SEQ_ENUM_71(x) x, BOOST_PP_SEQ_ENUM_70 # define BOOST_PP_SEQ_ENUM_72(x) x, BOOST_PP_SEQ_ENUM_71 # define BOOST_PP_SEQ_ENUM_73(x) x, BOOST_PP_SEQ_ENUM_72 # define BOOST_PP_SEQ_ENUM_74(x) x, BOOST_PP_SEQ_ENUM_73 # define BOOST_PP_SEQ_ENUM_75(x) x, BOOST_PP_SEQ_ENUM_74 # define BOOST_PP_SEQ_ENUM_76(x) x, BOOST_PP_SEQ_ENUM_75 # define BOOST_PP_SEQ_ENUM_77(x) x, BOOST_PP_SEQ_ENUM_76 # define BOOST_PP_SEQ_ENUM_78(x) x, BOOST_PP_SEQ_ENUM_77 # define BOOST_PP_SEQ_ENUM_79(x) x, BOOST_PP_SEQ_ENUM_78 # define BOOST_PP_SEQ_ENUM_80(x) x, BOOST_PP_SEQ_ENUM_79 # define BOOST_PP_SEQ_ENUM_81(x) x, BOOST_PP_SEQ_ENUM_80 # define BOOST_PP_SEQ_ENUM_82(x) x, BOOST_PP_SEQ_ENUM_81 # define BOOST_PP_SEQ_ENUM_83(x) x, BOOST_PP_SEQ_ENUM_82 # define BOOST_PP_SEQ_ENUM_84(x) x, BOOST_PP_SEQ_ENUM_83 # define BOOST_PP_SEQ_ENUM_85(x) x, BOOST_PP_SEQ_ENUM_84 # define BOOST_PP_SEQ_ENUM_86(x) x, BOOST_PP_SEQ_ENUM_85 # define BOOST_PP_SEQ_ENUM_87(x) x, BOOST_PP_SEQ_ENUM_86 # define BOOST_PP_SEQ_ENUM_88(x) x, BOOST_PP_SEQ_ENUM_87 # define BOOST_PP_SEQ_ENUM_89(x) x, BOOST_PP_SEQ_ENUM_88 # define BOOST_PP_SEQ_ENUM_90(x) x, BOOST_PP_SEQ_ENUM_89 # define BOOST_PP_SEQ_ENUM_91(x) x, BOOST_PP_SEQ_ENUM_90 # define BOOST_PP_SEQ_ENUM_92(x) x, BOOST_PP_SEQ_ENUM_91 # define BOOST_PP_SEQ_ENUM_93(x) x, BOOST_PP_SEQ_ENUM_92 # define BOOST_PP_SEQ_ENUM_94(x) x, BOOST_PP_SEQ_ENUM_93 # define BOOST_PP_SEQ_ENUM_95(x) x, BOOST_PP_SEQ_ENUM_94 # define BOOST_PP_SEQ_ENUM_96(x) x, BOOST_PP_SEQ_ENUM_95 # define BOOST_PP_SEQ_ENUM_97(x) x, BOOST_PP_SEQ_ENUM_96 # define BOOST_PP_SEQ_ENUM_98(x) x, BOOST_PP_SEQ_ENUM_97 # define BOOST_PP_SEQ_ENUM_99(x) x, BOOST_PP_SEQ_ENUM_98 # define BOOST_PP_SEQ_ENUM_100(x) x, BOOST_PP_SEQ_ENUM_99 # define BOOST_PP_SEQ_ENUM_101(x) x, BOOST_PP_SEQ_ENUM_100 # define BOOST_PP_SEQ_ENUM_102(x) x, BOOST_PP_SEQ_ENUM_101 # define BOOST_PP_SEQ_ENUM_103(x) x, BOOST_PP_SEQ_ENUM_102 # define BOOST_PP_SEQ_ENUM_104(x) x, BOOST_PP_SEQ_ENUM_103 # define BOOST_PP_SEQ_ENUM_105(x) x, BOOST_PP_SEQ_ENUM_104 # define BOOST_PP_SEQ_ENUM_106(x) x, BOOST_PP_SEQ_ENUM_105 # define BOOST_PP_SEQ_ENUM_107(x) x, BOOST_PP_SEQ_ENUM_106 # define BOOST_PP_SEQ_ENUM_108(x) x, BOOST_PP_SEQ_ENUM_107 # define BOOST_PP_SEQ_ENUM_109(x) x, BOOST_PP_SEQ_ENUM_108 # define BOOST_PP_SEQ_ENUM_110(x) x, BOOST_PP_SEQ_ENUM_109 # define BOOST_PP_SEQ_ENUM_111(x) x, BOOST_PP_SEQ_ENUM_110 # define BOOST_PP_SEQ_ENUM_112(x) x, BOOST_PP_SEQ_ENUM_111 # define BOOST_PP_SEQ_ENUM_113(x) x, BOOST_PP_SEQ_ENUM_112 # define BOOST_PP_SEQ_ENUM_114(x) x, BOOST_PP_SEQ_ENUM_113 # define BOOST_PP_SEQ_ENUM_115(x) x, BOOST_PP_SEQ_ENUM_114 # define BOOST_PP_SEQ_ENUM_116(x) x, BOOST_PP_SEQ_ENUM_115 # define BOOST_PP_SEQ_ENUM_117(x) x, BOOST_PP_SEQ_ENUM_116 # define BOOST_PP_SEQ_ENUM_118(x) x, BOOST_PP_SEQ_ENUM_117 # define BOOST_PP_SEQ_ENUM_119(x) x, BOOST_PP_SEQ_ENUM_118 # define BOOST_PP_SEQ_ENUM_120(x) x, BOOST_PP_SEQ_ENUM_119 # define BOOST_PP_SEQ_ENUM_121(x) x, BOOST_PP_SEQ_ENUM_120 # define BOOST_PP_SEQ_ENUM_122(x) x, BOOST_PP_SEQ_ENUM_121 # define BOOST_PP_SEQ_ENUM_123(x) x, BOOST_PP_SEQ_ENUM_122 # define BOOST_PP_SEQ_ENUM_124(x) x, BOOST_PP_SEQ_ENUM_123 # define BOOST_PP_SEQ_ENUM_125(x) x, BOOST_PP_SEQ_ENUM_124 # define BOOST_PP_SEQ_ENUM_126(x) x, BOOST_PP_SEQ_ENUM_125 # define BOOST_PP_SEQ_ENUM_127(x) x, BOOST_PP_SEQ_ENUM_126 # define BOOST_PP_SEQ_ENUM_128(x) x, BOOST_PP_SEQ_ENUM_127 # define BOOST_PP_SEQ_ENUM_129(x) x, BOOST_PP_SEQ_ENUM_128 # define BOOST_PP_SEQ_ENUM_130(x) x, BOOST_PP_SEQ_ENUM_129 # define BOOST_PP_SEQ_ENUM_131(x) x, BOOST_PP_SEQ_ENUM_130 # define BOOST_PP_SEQ_ENUM_132(x) x, BOOST_PP_SEQ_ENUM_131 # define BOOST_PP_SEQ_ENUM_133(x) x, BOOST_PP_SEQ_ENUM_132 # define BOOST_PP_SEQ_ENUM_134(x) x, BOOST_PP_SEQ_ENUM_133 # define BOOST_PP_SEQ_ENUM_135(x) x, BOOST_PP_SEQ_ENUM_134 # define BOOST_PP_SEQ_ENUM_136(x) x, BOOST_PP_SEQ_ENUM_135 # define BOOST_PP_SEQ_ENUM_137(x) x, BOOST_PP_SEQ_ENUM_136 # define BOOST_PP_SEQ_ENUM_138(x) x, BOOST_PP_SEQ_ENUM_137 # define BOOST_PP_SEQ_ENUM_139(x) x, BOOST_PP_SEQ_ENUM_138 # define BOOST_PP_SEQ_ENUM_140(x) x, BOOST_PP_SEQ_ENUM_139 # define BOOST_PP_SEQ_ENUM_141(x) x, BOOST_PP_SEQ_ENUM_140 # define BOOST_PP_SEQ_ENUM_142(x) x, BOOST_PP_SEQ_ENUM_141 # define BOOST_PP_SEQ_ENUM_143(x) x, BOOST_PP_SEQ_ENUM_142 # define BOOST_PP_SEQ_ENUM_144(x) x, BOOST_PP_SEQ_ENUM_143 # define BOOST_PP_SEQ_ENUM_145(x) x, BOOST_PP_SEQ_ENUM_144 # define BOOST_PP_SEQ_ENUM_146(x) x, BOOST_PP_SEQ_ENUM_145 # define BOOST_PP_SEQ_ENUM_147(x) x, BOOST_PP_SEQ_ENUM_146 # define BOOST_PP_SEQ_ENUM_148(x) x, BOOST_PP_SEQ_ENUM_147 # define BOOST_PP_SEQ_ENUM_149(x) x, BOOST_PP_SEQ_ENUM_148 # define BOOST_PP_SEQ_ENUM_150(x) x, BOOST_PP_SEQ_ENUM_149 # define BOOST_PP_SEQ_ENUM_151(x) x, BOOST_PP_SEQ_ENUM_150 # define BOOST_PP_SEQ_ENUM_152(x) x, BOOST_PP_SEQ_ENUM_151 # define BOOST_PP_SEQ_ENUM_153(x) x, BOOST_PP_SEQ_ENUM_152 # define BOOST_PP_SEQ_ENUM_154(x) x, BOOST_PP_SEQ_ENUM_153 # define BOOST_PP_SEQ_ENUM_155(x) x, BOOST_PP_SEQ_ENUM_154 # define BOOST_PP_SEQ_ENUM_156(x) x, BOOST_PP_SEQ_ENUM_155 # define BOOST_PP_SEQ_ENUM_157(x) x, BOOST_PP_SEQ_ENUM_156 # define BOOST_PP_SEQ_ENUM_158(x) x, BOOST_PP_SEQ_ENUM_157 # define BOOST_PP_SEQ_ENUM_159(x) x, BOOST_PP_SEQ_ENUM_158 # define BOOST_PP_SEQ_ENUM_160(x) x, BOOST_PP_SEQ_ENUM_159 # define BOOST_PP_SEQ_ENUM_161(x) x, BOOST_PP_SEQ_ENUM_160 # define BOOST_PP_SEQ_ENUM_162(x) x, BOOST_PP_SEQ_ENUM_161 # define BOOST_PP_SEQ_ENUM_163(x) x, BOOST_PP_SEQ_ENUM_162 # define BOOST_PP_SEQ_ENUM_164(x) x, BOOST_PP_SEQ_ENUM_163 # define BOOST_PP_SEQ_ENUM_165(x) x, BOOST_PP_SEQ_ENUM_164 # define BOOST_PP_SEQ_ENUM_166(x) x, BOOST_PP_SEQ_ENUM_165 # define BOOST_PP_SEQ_ENUM_167(x) x, BOOST_PP_SEQ_ENUM_166 # define BOOST_PP_SEQ_ENUM_168(x) x, BOOST_PP_SEQ_ENUM_167 # define BOOST_PP_SEQ_ENUM_169(x) x, BOOST_PP_SEQ_ENUM_168 # define BOOST_PP_SEQ_ENUM_170(x) x, BOOST_PP_SEQ_ENUM_169 # define BOOST_PP_SEQ_ENUM_171(x) x, BOOST_PP_SEQ_ENUM_170 # define BOOST_PP_SEQ_ENUM_172(x) x, BOOST_PP_SEQ_ENUM_171 # define BOOST_PP_SEQ_ENUM_173(x) x, BOOST_PP_SEQ_ENUM_172 # define BOOST_PP_SEQ_ENUM_174(x) x, BOOST_PP_SEQ_ENUM_173 # define BOOST_PP_SEQ_ENUM_175(x) x, BOOST_PP_SEQ_ENUM_174 # define BOOST_PP_SEQ_ENUM_176(x) x, BOOST_PP_SEQ_ENUM_175 # define BOOST_PP_SEQ_ENUM_177(x) x, BOOST_PP_SEQ_ENUM_176 # define BOOST_PP_SEQ_ENUM_178(x) x, BOOST_PP_SEQ_ENUM_177 # define BOOST_PP_SEQ_ENUM_179(x) x, BOOST_PP_SEQ_ENUM_178 # define BOOST_PP_SEQ_ENUM_180(x) x, BOOST_PP_SEQ_ENUM_179 # define BOOST_PP_SEQ_ENUM_181(x) x, BOOST_PP_SEQ_ENUM_180 # define BOOST_PP_SEQ_ENUM_182(x) x, BOOST_PP_SEQ_ENUM_181 # define BOOST_PP_SEQ_ENUM_183(x) x, BOOST_PP_SEQ_ENUM_182 # define BOOST_PP_SEQ_ENUM_184(x) x, BOOST_PP_SEQ_ENUM_183 # define BOOST_PP_SEQ_ENUM_185(x) x, BOOST_PP_SEQ_ENUM_184 # define BOOST_PP_SEQ_ENUM_186(x) x, BOOST_PP_SEQ_ENUM_185 # define BOOST_PP_SEQ_ENUM_187(x) x, BOOST_PP_SEQ_ENUM_186 # define BOOST_PP_SEQ_ENUM_188(x) x, BOOST_PP_SEQ_ENUM_187 # define BOOST_PP_SEQ_ENUM_189(x) x, BOOST_PP_SEQ_ENUM_188 # define BOOST_PP_SEQ_ENUM_190(x) x, BOOST_PP_SEQ_ENUM_189 # define BOOST_PP_SEQ_ENUM_191(x) x, BOOST_PP_SEQ_ENUM_190 # define BOOST_PP_SEQ_ENUM_192(x) x, BOOST_PP_SEQ_ENUM_191 # define BOOST_PP_SEQ_ENUM_193(x) x, BOOST_PP_SEQ_ENUM_192 # define BOOST_PP_SEQ_ENUM_194(x) x, BOOST_PP_SEQ_ENUM_193 # define BOOST_PP_SEQ_ENUM_195(x) x, BOOST_PP_SEQ_ENUM_194 # define BOOST_PP_SEQ_ENUM_196(x) x, BOOST_PP_SEQ_ENUM_195 # define BOOST_PP_SEQ_ENUM_197(x) x, BOOST_PP_SEQ_ENUM_196 # define BOOST_PP_SEQ_ENUM_198(x) x, BOOST_PP_SEQ_ENUM_197 # define BOOST_PP_SEQ_ENUM_199(x) x, BOOST_PP_SEQ_ENUM_198 # define BOOST_PP_SEQ_ENUM_200(x) x, BOOST_PP_SEQ_ENUM_199 # define BOOST_PP_SEQ_ENUM_201(x) x, BOOST_PP_SEQ_ENUM_200 # define BOOST_PP_SEQ_ENUM_202(x) x, BOOST_PP_SEQ_ENUM_201 # define BOOST_PP_SEQ_ENUM_203(x) x, BOOST_PP_SEQ_ENUM_202 # define BOOST_PP_SEQ_ENUM_204(x) x, BOOST_PP_SEQ_ENUM_203 # define BOOST_PP_SEQ_ENUM_205(x) x, BOOST_PP_SEQ_ENUM_204 # define BOOST_PP_SEQ_ENUM_206(x) x, BOOST_PP_SEQ_ENUM_205 # define BOOST_PP_SEQ_ENUM_207(x) x, BOOST_PP_SEQ_ENUM_206 # define BOOST_PP_SEQ_ENUM_208(x) x, BOOST_PP_SEQ_ENUM_207 # define BOOST_PP_SEQ_ENUM_209(x) x, BOOST_PP_SEQ_ENUM_208 # define BOOST_PP_SEQ_ENUM_210(x) x, BOOST_PP_SEQ_ENUM_209 # define BOOST_PP_SEQ_ENUM_211(x) x, BOOST_PP_SEQ_ENUM_210 # define BOOST_PP_SEQ_ENUM_212(x) x, BOOST_PP_SEQ_ENUM_211 # define BOOST_PP_SEQ_ENUM_213(x) x, BOOST_PP_SEQ_ENUM_212 # define BOOST_PP_SEQ_ENUM_214(x) x, BOOST_PP_SEQ_ENUM_213 # define BOOST_PP_SEQ_ENUM_215(x) x, BOOST_PP_SEQ_ENUM_214 # define BOOST_PP_SEQ_ENUM_216(x) x, BOOST_PP_SEQ_ENUM_215 # define BOOST_PP_SEQ_ENUM_217(x) x, BOOST_PP_SEQ_ENUM_216 # define BOOST_PP_SEQ_ENUM_218(x) x, BOOST_PP_SEQ_ENUM_217 # define BOOST_PP_SEQ_ENUM_219(x) x, BOOST_PP_SEQ_ENUM_218 # define BOOST_PP_SEQ_ENUM_220(x) x, BOOST_PP_SEQ_ENUM_219 # define BOOST_PP_SEQ_ENUM_221(x) x, BOOST_PP_SEQ_ENUM_220 # define BOOST_PP_SEQ_ENUM_222(x) x, BOOST_PP_SEQ_ENUM_221 # define BOOST_PP_SEQ_ENUM_223(x) x, BOOST_PP_SEQ_ENUM_222 # define BOOST_PP_SEQ_ENUM_224(x) x, BOOST_PP_SEQ_ENUM_223 # define BOOST_PP_SEQ_ENUM_225(x) x, BOOST_PP_SEQ_ENUM_224 # define BOOST_PP_SEQ_ENUM_226(x) x, BOOST_PP_SEQ_ENUM_225 # define BOOST_PP_SEQ_ENUM_227(x) x, BOOST_PP_SEQ_ENUM_226 # define BOOST_PP_SEQ_ENUM_228(x) x, BOOST_PP_SEQ_ENUM_227 # define BOOST_PP_SEQ_ENUM_229(x) x, BOOST_PP_SEQ_ENUM_228 # define BOOST_PP_SEQ_ENUM_230(x) x, BOOST_PP_SEQ_ENUM_229 # define BOOST_PP_SEQ_ENUM_231(x) x, BOOST_PP_SEQ_ENUM_230 # define BOOST_PP_SEQ_ENUM_232(x) x, BOOST_PP_SEQ_ENUM_231 # define BOOST_PP_SEQ_ENUM_233(x) x, BOOST_PP_SEQ_ENUM_232 # define BOOST_PP_SEQ_ENUM_234(x) x, BOOST_PP_SEQ_ENUM_233 # define BOOST_PP_SEQ_ENUM_235(x) x, BOOST_PP_SEQ_ENUM_234 # define BOOST_PP_SEQ_ENUM_236(x) x, BOOST_PP_SEQ_ENUM_235 # define BOOST_PP_SEQ_ENUM_237(x) x, BOOST_PP_SEQ_ENUM_236 # define BOOST_PP_SEQ_ENUM_238(x) x, BOOST_PP_SEQ_ENUM_237 # define BOOST_PP_SEQ_ENUM_239(x) x, BOOST_PP_SEQ_ENUM_238 # define BOOST_PP_SEQ_ENUM_240(x) x, BOOST_PP_SEQ_ENUM_239 # define BOOST_PP_SEQ_ENUM_241(x) x, BOOST_PP_SEQ_ENUM_240 # define BOOST_PP_SEQ_ENUM_242(x) x, BOOST_PP_SEQ_ENUM_241 # define BOOST_PP_SEQ_ENUM_243(x) x, BOOST_PP_SEQ_ENUM_242 # define BOOST_PP_SEQ_ENUM_244(x) x, BOOST_PP_SEQ_ENUM_243 # define BOOST_PP_SEQ_ENUM_245(x) x, BOOST_PP_SEQ_ENUM_244 # define BOOST_PP_SEQ_ENUM_246(x) x, BOOST_PP_SEQ_ENUM_245 # define BOOST_PP_SEQ_ENUM_247(x) x, BOOST_PP_SEQ_ENUM_246 # define BOOST_PP_SEQ_ENUM_248(x) x, BOOST_PP_SEQ_ENUM_247 # define BOOST_PP_SEQ_ENUM_249(x) x, BOOST_PP_SEQ_ENUM_248 # define BOOST_PP_SEQ_ENUM_250(x) x, BOOST_PP_SEQ_ENUM_249 # define BOOST_PP_SEQ_ENUM_251(x) x, BOOST_PP_SEQ_ENUM_250 # define BOOST_PP_SEQ_ENUM_252(x) x, BOOST_PP_SEQ_ENUM_251 # define BOOST_PP_SEQ_ENUM_253(x) x, BOOST_PP_SEQ_ENUM_252 # define BOOST_PP_SEQ_ENUM_254(x) x, BOOST_PP_SEQ_ENUM_253 # define BOOST_PP_SEQ_ENUM_255(x) x, BOOST_PP_SEQ_ENUM_254 # define BOOST_PP_SEQ_ENUM_256(x) x, BOOST_PP_SEQ_ENUM_255 # # endif passenger-4.0.37/ext/boost/preprocessor/seq/for_each_i.hpp000644 000765 000024 00000006430 12233035540 024252 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP # define BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP # # include # include # include # include # include # include # include # include # # /* BOOST_PP_SEQ_FOR_EACH_I */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) # else # define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) # define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) # endif # # define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(4, 2, x))) # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I x # else # define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I(BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) # endif # # define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i) (macro, data, BOOST_PP_SEQ_TAIL(seq), BOOST_PP_INC(i)) # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, BOOST_PP_TUPLE_REM_4 x) # define BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, im) # else # define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) # endif # # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq)) # # /* BOOST_PP_SEQ_FOR_EACH_I_R */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) # else # define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) # define BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/seq/seq.hpp000644 000765 000024 00000003210 12233035540 022755 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_SEQ_HPP # define BOOST_PREPROCESSOR_SEQ_SEQ_HPP # # include # include # # /* BOOST_PP_SEQ_HEAD */ # # define BOOST_PP_SEQ_HEAD(seq) BOOST_PP_SEQ_ELEM(0, seq) # # /* BOOST_PP_SEQ_TAIL */ # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_1((seq)) # define BOOST_PP_SEQ_TAIL_1(par) BOOST_PP_SEQ_TAIL_2 ## par # define BOOST_PP_SEQ_TAIL_2(seq) BOOST_PP_SEQ_TAIL_I ## seq # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_ID(BOOST_PP_SEQ_TAIL_I seq) # define BOOST_PP_SEQ_TAIL_ID(id) id # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_D(seq) # define BOOST_PP_SEQ_TAIL_D(seq) BOOST_PP_SEQ_TAIL_I seq # else # define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_I seq # endif # # define BOOST_PP_SEQ_TAIL_I(x) # # /* BOOST_PP_SEQ_NIL */ # # define BOOST_PP_SEQ_NIL(x) (x) # # endif passenger-4.0.37/ext/boost/preprocessor/seq/size.hpp000644 000765 000024 00000070763 12233035540 023160 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_SIZE_HPP # define BOOST_PREPROCESSOR_SEQ_SIZE_HPP # # include # include # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_SEQ_SIZE_I((seq)) # define BOOST_PP_SEQ_SIZE_I(par) BOOST_PP_SEQ_SIZE_II ## par # define BOOST_PP_SEQ_SIZE_II(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 ## seq) # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() || BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_SEQ_SIZE_I(seq) # define BOOST_PP_SEQ_SIZE_I(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 seq) # elif defined(__IBMC__) || defined(__IBMCPP__) # define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_0, seq)) # else # define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 seq) # endif # # define BOOST_PP_SEQ_SIZE_0(_) BOOST_PP_SEQ_SIZE_1 # define BOOST_PP_SEQ_SIZE_1(_) BOOST_PP_SEQ_SIZE_2 # define BOOST_PP_SEQ_SIZE_2(_) BOOST_PP_SEQ_SIZE_3 # define BOOST_PP_SEQ_SIZE_3(_) BOOST_PP_SEQ_SIZE_4 # define BOOST_PP_SEQ_SIZE_4(_) BOOST_PP_SEQ_SIZE_5 # define BOOST_PP_SEQ_SIZE_5(_) BOOST_PP_SEQ_SIZE_6 # define BOOST_PP_SEQ_SIZE_6(_) BOOST_PP_SEQ_SIZE_7 # define BOOST_PP_SEQ_SIZE_7(_) BOOST_PP_SEQ_SIZE_8 # define BOOST_PP_SEQ_SIZE_8(_) BOOST_PP_SEQ_SIZE_9 # define BOOST_PP_SEQ_SIZE_9(_) BOOST_PP_SEQ_SIZE_10 # define BOOST_PP_SEQ_SIZE_10(_) BOOST_PP_SEQ_SIZE_11 # define BOOST_PP_SEQ_SIZE_11(_) BOOST_PP_SEQ_SIZE_12 # define BOOST_PP_SEQ_SIZE_12(_) BOOST_PP_SEQ_SIZE_13 # define BOOST_PP_SEQ_SIZE_13(_) BOOST_PP_SEQ_SIZE_14 # define BOOST_PP_SEQ_SIZE_14(_) BOOST_PP_SEQ_SIZE_15 # define BOOST_PP_SEQ_SIZE_15(_) BOOST_PP_SEQ_SIZE_16 # define BOOST_PP_SEQ_SIZE_16(_) BOOST_PP_SEQ_SIZE_17 # define BOOST_PP_SEQ_SIZE_17(_) BOOST_PP_SEQ_SIZE_18 # define BOOST_PP_SEQ_SIZE_18(_) BOOST_PP_SEQ_SIZE_19 # define BOOST_PP_SEQ_SIZE_19(_) BOOST_PP_SEQ_SIZE_20 # define BOOST_PP_SEQ_SIZE_20(_) BOOST_PP_SEQ_SIZE_21 # define BOOST_PP_SEQ_SIZE_21(_) BOOST_PP_SEQ_SIZE_22 # define BOOST_PP_SEQ_SIZE_22(_) BOOST_PP_SEQ_SIZE_23 # define BOOST_PP_SEQ_SIZE_23(_) BOOST_PP_SEQ_SIZE_24 # define BOOST_PP_SEQ_SIZE_24(_) BOOST_PP_SEQ_SIZE_25 # define BOOST_PP_SEQ_SIZE_25(_) BOOST_PP_SEQ_SIZE_26 # define BOOST_PP_SEQ_SIZE_26(_) BOOST_PP_SEQ_SIZE_27 # define BOOST_PP_SEQ_SIZE_27(_) BOOST_PP_SEQ_SIZE_28 # define BOOST_PP_SEQ_SIZE_28(_) BOOST_PP_SEQ_SIZE_29 # define BOOST_PP_SEQ_SIZE_29(_) BOOST_PP_SEQ_SIZE_30 # define BOOST_PP_SEQ_SIZE_30(_) BOOST_PP_SEQ_SIZE_31 # define BOOST_PP_SEQ_SIZE_31(_) BOOST_PP_SEQ_SIZE_32 # define BOOST_PP_SEQ_SIZE_32(_) BOOST_PP_SEQ_SIZE_33 # define BOOST_PP_SEQ_SIZE_33(_) BOOST_PP_SEQ_SIZE_34 # define BOOST_PP_SEQ_SIZE_34(_) BOOST_PP_SEQ_SIZE_35 # define BOOST_PP_SEQ_SIZE_35(_) BOOST_PP_SEQ_SIZE_36 # define BOOST_PP_SEQ_SIZE_36(_) BOOST_PP_SEQ_SIZE_37 # define BOOST_PP_SEQ_SIZE_37(_) BOOST_PP_SEQ_SIZE_38 # define BOOST_PP_SEQ_SIZE_38(_) BOOST_PP_SEQ_SIZE_39 # define BOOST_PP_SEQ_SIZE_39(_) BOOST_PP_SEQ_SIZE_40 # define BOOST_PP_SEQ_SIZE_40(_) BOOST_PP_SEQ_SIZE_41 # define BOOST_PP_SEQ_SIZE_41(_) BOOST_PP_SEQ_SIZE_42 # define BOOST_PP_SEQ_SIZE_42(_) BOOST_PP_SEQ_SIZE_43 # define BOOST_PP_SEQ_SIZE_43(_) BOOST_PP_SEQ_SIZE_44 # define BOOST_PP_SEQ_SIZE_44(_) BOOST_PP_SEQ_SIZE_45 # define BOOST_PP_SEQ_SIZE_45(_) BOOST_PP_SEQ_SIZE_46 # define BOOST_PP_SEQ_SIZE_46(_) BOOST_PP_SEQ_SIZE_47 # define BOOST_PP_SEQ_SIZE_47(_) BOOST_PP_SEQ_SIZE_48 # define BOOST_PP_SEQ_SIZE_48(_) BOOST_PP_SEQ_SIZE_49 # define BOOST_PP_SEQ_SIZE_49(_) BOOST_PP_SEQ_SIZE_50 # define BOOST_PP_SEQ_SIZE_50(_) BOOST_PP_SEQ_SIZE_51 # define BOOST_PP_SEQ_SIZE_51(_) BOOST_PP_SEQ_SIZE_52 # define BOOST_PP_SEQ_SIZE_52(_) BOOST_PP_SEQ_SIZE_53 # define BOOST_PP_SEQ_SIZE_53(_) BOOST_PP_SEQ_SIZE_54 # define BOOST_PP_SEQ_SIZE_54(_) BOOST_PP_SEQ_SIZE_55 # define BOOST_PP_SEQ_SIZE_55(_) BOOST_PP_SEQ_SIZE_56 # define BOOST_PP_SEQ_SIZE_56(_) BOOST_PP_SEQ_SIZE_57 # define BOOST_PP_SEQ_SIZE_57(_) BOOST_PP_SEQ_SIZE_58 # define BOOST_PP_SEQ_SIZE_58(_) BOOST_PP_SEQ_SIZE_59 # define BOOST_PP_SEQ_SIZE_59(_) BOOST_PP_SEQ_SIZE_60 # define BOOST_PP_SEQ_SIZE_60(_) BOOST_PP_SEQ_SIZE_61 # define BOOST_PP_SEQ_SIZE_61(_) BOOST_PP_SEQ_SIZE_62 # define BOOST_PP_SEQ_SIZE_62(_) BOOST_PP_SEQ_SIZE_63 # define BOOST_PP_SEQ_SIZE_63(_) BOOST_PP_SEQ_SIZE_64 # define BOOST_PP_SEQ_SIZE_64(_) BOOST_PP_SEQ_SIZE_65 # define BOOST_PP_SEQ_SIZE_65(_) BOOST_PP_SEQ_SIZE_66 # define BOOST_PP_SEQ_SIZE_66(_) BOOST_PP_SEQ_SIZE_67 # define BOOST_PP_SEQ_SIZE_67(_) BOOST_PP_SEQ_SIZE_68 # define BOOST_PP_SEQ_SIZE_68(_) BOOST_PP_SEQ_SIZE_69 # define BOOST_PP_SEQ_SIZE_69(_) BOOST_PP_SEQ_SIZE_70 # define BOOST_PP_SEQ_SIZE_70(_) BOOST_PP_SEQ_SIZE_71 # define BOOST_PP_SEQ_SIZE_71(_) BOOST_PP_SEQ_SIZE_72 # define BOOST_PP_SEQ_SIZE_72(_) BOOST_PP_SEQ_SIZE_73 # define BOOST_PP_SEQ_SIZE_73(_) BOOST_PP_SEQ_SIZE_74 # define BOOST_PP_SEQ_SIZE_74(_) BOOST_PP_SEQ_SIZE_75 # define BOOST_PP_SEQ_SIZE_75(_) BOOST_PP_SEQ_SIZE_76 # define BOOST_PP_SEQ_SIZE_76(_) BOOST_PP_SEQ_SIZE_77 # define BOOST_PP_SEQ_SIZE_77(_) BOOST_PP_SEQ_SIZE_78 # define BOOST_PP_SEQ_SIZE_78(_) BOOST_PP_SEQ_SIZE_79 # define BOOST_PP_SEQ_SIZE_79(_) BOOST_PP_SEQ_SIZE_80 # define BOOST_PP_SEQ_SIZE_80(_) BOOST_PP_SEQ_SIZE_81 # define BOOST_PP_SEQ_SIZE_81(_) BOOST_PP_SEQ_SIZE_82 # define BOOST_PP_SEQ_SIZE_82(_) BOOST_PP_SEQ_SIZE_83 # define BOOST_PP_SEQ_SIZE_83(_) BOOST_PP_SEQ_SIZE_84 # define BOOST_PP_SEQ_SIZE_84(_) BOOST_PP_SEQ_SIZE_85 # define BOOST_PP_SEQ_SIZE_85(_) BOOST_PP_SEQ_SIZE_86 # define BOOST_PP_SEQ_SIZE_86(_) BOOST_PP_SEQ_SIZE_87 # define BOOST_PP_SEQ_SIZE_87(_) BOOST_PP_SEQ_SIZE_88 # define BOOST_PP_SEQ_SIZE_88(_) BOOST_PP_SEQ_SIZE_89 # define BOOST_PP_SEQ_SIZE_89(_) BOOST_PP_SEQ_SIZE_90 # define BOOST_PP_SEQ_SIZE_90(_) BOOST_PP_SEQ_SIZE_91 # define BOOST_PP_SEQ_SIZE_91(_) BOOST_PP_SEQ_SIZE_92 # define BOOST_PP_SEQ_SIZE_92(_) BOOST_PP_SEQ_SIZE_93 # define BOOST_PP_SEQ_SIZE_93(_) BOOST_PP_SEQ_SIZE_94 # define BOOST_PP_SEQ_SIZE_94(_) BOOST_PP_SEQ_SIZE_95 # define BOOST_PP_SEQ_SIZE_95(_) BOOST_PP_SEQ_SIZE_96 # define BOOST_PP_SEQ_SIZE_96(_) BOOST_PP_SEQ_SIZE_97 # define BOOST_PP_SEQ_SIZE_97(_) BOOST_PP_SEQ_SIZE_98 # define BOOST_PP_SEQ_SIZE_98(_) BOOST_PP_SEQ_SIZE_99 # define BOOST_PP_SEQ_SIZE_99(_) BOOST_PP_SEQ_SIZE_100 # define BOOST_PP_SEQ_SIZE_100(_) BOOST_PP_SEQ_SIZE_101 # define BOOST_PP_SEQ_SIZE_101(_) BOOST_PP_SEQ_SIZE_102 # define BOOST_PP_SEQ_SIZE_102(_) BOOST_PP_SEQ_SIZE_103 # define BOOST_PP_SEQ_SIZE_103(_) BOOST_PP_SEQ_SIZE_104 # define BOOST_PP_SEQ_SIZE_104(_) BOOST_PP_SEQ_SIZE_105 # define BOOST_PP_SEQ_SIZE_105(_) BOOST_PP_SEQ_SIZE_106 # define BOOST_PP_SEQ_SIZE_106(_) BOOST_PP_SEQ_SIZE_107 # define BOOST_PP_SEQ_SIZE_107(_) BOOST_PP_SEQ_SIZE_108 # define BOOST_PP_SEQ_SIZE_108(_) BOOST_PP_SEQ_SIZE_109 # define BOOST_PP_SEQ_SIZE_109(_) BOOST_PP_SEQ_SIZE_110 # define BOOST_PP_SEQ_SIZE_110(_) BOOST_PP_SEQ_SIZE_111 # define BOOST_PP_SEQ_SIZE_111(_) BOOST_PP_SEQ_SIZE_112 # define BOOST_PP_SEQ_SIZE_112(_) BOOST_PP_SEQ_SIZE_113 # define BOOST_PP_SEQ_SIZE_113(_) BOOST_PP_SEQ_SIZE_114 # define BOOST_PP_SEQ_SIZE_114(_) BOOST_PP_SEQ_SIZE_115 # define BOOST_PP_SEQ_SIZE_115(_) BOOST_PP_SEQ_SIZE_116 # define BOOST_PP_SEQ_SIZE_116(_) BOOST_PP_SEQ_SIZE_117 # define BOOST_PP_SEQ_SIZE_117(_) BOOST_PP_SEQ_SIZE_118 # define BOOST_PP_SEQ_SIZE_118(_) BOOST_PP_SEQ_SIZE_119 # define BOOST_PP_SEQ_SIZE_119(_) BOOST_PP_SEQ_SIZE_120 # define BOOST_PP_SEQ_SIZE_120(_) BOOST_PP_SEQ_SIZE_121 # define BOOST_PP_SEQ_SIZE_121(_) BOOST_PP_SEQ_SIZE_122 # define BOOST_PP_SEQ_SIZE_122(_) BOOST_PP_SEQ_SIZE_123 # define BOOST_PP_SEQ_SIZE_123(_) BOOST_PP_SEQ_SIZE_124 # define BOOST_PP_SEQ_SIZE_124(_) BOOST_PP_SEQ_SIZE_125 # define BOOST_PP_SEQ_SIZE_125(_) BOOST_PP_SEQ_SIZE_126 # define BOOST_PP_SEQ_SIZE_126(_) BOOST_PP_SEQ_SIZE_127 # define BOOST_PP_SEQ_SIZE_127(_) BOOST_PP_SEQ_SIZE_128 # define BOOST_PP_SEQ_SIZE_128(_) BOOST_PP_SEQ_SIZE_129 # define BOOST_PP_SEQ_SIZE_129(_) BOOST_PP_SEQ_SIZE_130 # define BOOST_PP_SEQ_SIZE_130(_) BOOST_PP_SEQ_SIZE_131 # define BOOST_PP_SEQ_SIZE_131(_) BOOST_PP_SEQ_SIZE_132 # define BOOST_PP_SEQ_SIZE_132(_) BOOST_PP_SEQ_SIZE_133 # define BOOST_PP_SEQ_SIZE_133(_) BOOST_PP_SEQ_SIZE_134 # define BOOST_PP_SEQ_SIZE_134(_) BOOST_PP_SEQ_SIZE_135 # define BOOST_PP_SEQ_SIZE_135(_) BOOST_PP_SEQ_SIZE_136 # define BOOST_PP_SEQ_SIZE_136(_) BOOST_PP_SEQ_SIZE_137 # define BOOST_PP_SEQ_SIZE_137(_) BOOST_PP_SEQ_SIZE_138 # define BOOST_PP_SEQ_SIZE_138(_) BOOST_PP_SEQ_SIZE_139 # define BOOST_PP_SEQ_SIZE_139(_) BOOST_PP_SEQ_SIZE_140 # define BOOST_PP_SEQ_SIZE_140(_) BOOST_PP_SEQ_SIZE_141 # define BOOST_PP_SEQ_SIZE_141(_) BOOST_PP_SEQ_SIZE_142 # define BOOST_PP_SEQ_SIZE_142(_) BOOST_PP_SEQ_SIZE_143 # define BOOST_PP_SEQ_SIZE_143(_) BOOST_PP_SEQ_SIZE_144 # define BOOST_PP_SEQ_SIZE_144(_) BOOST_PP_SEQ_SIZE_145 # define BOOST_PP_SEQ_SIZE_145(_) BOOST_PP_SEQ_SIZE_146 # define BOOST_PP_SEQ_SIZE_146(_) BOOST_PP_SEQ_SIZE_147 # define BOOST_PP_SEQ_SIZE_147(_) BOOST_PP_SEQ_SIZE_148 # define BOOST_PP_SEQ_SIZE_148(_) BOOST_PP_SEQ_SIZE_149 # define BOOST_PP_SEQ_SIZE_149(_) BOOST_PP_SEQ_SIZE_150 # define BOOST_PP_SEQ_SIZE_150(_) BOOST_PP_SEQ_SIZE_151 # define BOOST_PP_SEQ_SIZE_151(_) BOOST_PP_SEQ_SIZE_152 # define BOOST_PP_SEQ_SIZE_152(_) BOOST_PP_SEQ_SIZE_153 # define BOOST_PP_SEQ_SIZE_153(_) BOOST_PP_SEQ_SIZE_154 # define BOOST_PP_SEQ_SIZE_154(_) BOOST_PP_SEQ_SIZE_155 # define BOOST_PP_SEQ_SIZE_155(_) BOOST_PP_SEQ_SIZE_156 # define BOOST_PP_SEQ_SIZE_156(_) BOOST_PP_SEQ_SIZE_157 # define BOOST_PP_SEQ_SIZE_157(_) BOOST_PP_SEQ_SIZE_158 # define BOOST_PP_SEQ_SIZE_158(_) BOOST_PP_SEQ_SIZE_159 # define BOOST_PP_SEQ_SIZE_159(_) BOOST_PP_SEQ_SIZE_160 # define BOOST_PP_SEQ_SIZE_160(_) BOOST_PP_SEQ_SIZE_161 # define BOOST_PP_SEQ_SIZE_161(_) BOOST_PP_SEQ_SIZE_162 # define BOOST_PP_SEQ_SIZE_162(_) BOOST_PP_SEQ_SIZE_163 # define BOOST_PP_SEQ_SIZE_163(_) BOOST_PP_SEQ_SIZE_164 # define BOOST_PP_SEQ_SIZE_164(_) BOOST_PP_SEQ_SIZE_165 # define BOOST_PP_SEQ_SIZE_165(_) BOOST_PP_SEQ_SIZE_166 # define BOOST_PP_SEQ_SIZE_166(_) BOOST_PP_SEQ_SIZE_167 # define BOOST_PP_SEQ_SIZE_167(_) BOOST_PP_SEQ_SIZE_168 # define BOOST_PP_SEQ_SIZE_168(_) BOOST_PP_SEQ_SIZE_169 # define BOOST_PP_SEQ_SIZE_169(_) BOOST_PP_SEQ_SIZE_170 # define BOOST_PP_SEQ_SIZE_170(_) BOOST_PP_SEQ_SIZE_171 # define BOOST_PP_SEQ_SIZE_171(_) BOOST_PP_SEQ_SIZE_172 # define BOOST_PP_SEQ_SIZE_172(_) BOOST_PP_SEQ_SIZE_173 # define BOOST_PP_SEQ_SIZE_173(_) BOOST_PP_SEQ_SIZE_174 # define BOOST_PP_SEQ_SIZE_174(_) BOOST_PP_SEQ_SIZE_175 # define BOOST_PP_SEQ_SIZE_175(_) BOOST_PP_SEQ_SIZE_176 # define BOOST_PP_SEQ_SIZE_176(_) BOOST_PP_SEQ_SIZE_177 # define BOOST_PP_SEQ_SIZE_177(_) BOOST_PP_SEQ_SIZE_178 # define BOOST_PP_SEQ_SIZE_178(_) BOOST_PP_SEQ_SIZE_179 # define BOOST_PP_SEQ_SIZE_179(_) BOOST_PP_SEQ_SIZE_180 # define BOOST_PP_SEQ_SIZE_180(_) BOOST_PP_SEQ_SIZE_181 # define BOOST_PP_SEQ_SIZE_181(_) BOOST_PP_SEQ_SIZE_182 # define BOOST_PP_SEQ_SIZE_182(_) BOOST_PP_SEQ_SIZE_183 # define BOOST_PP_SEQ_SIZE_183(_) BOOST_PP_SEQ_SIZE_184 # define BOOST_PP_SEQ_SIZE_184(_) BOOST_PP_SEQ_SIZE_185 # define BOOST_PP_SEQ_SIZE_185(_) BOOST_PP_SEQ_SIZE_186 # define BOOST_PP_SEQ_SIZE_186(_) BOOST_PP_SEQ_SIZE_187 # define BOOST_PP_SEQ_SIZE_187(_) BOOST_PP_SEQ_SIZE_188 # define BOOST_PP_SEQ_SIZE_188(_) BOOST_PP_SEQ_SIZE_189 # define BOOST_PP_SEQ_SIZE_189(_) BOOST_PP_SEQ_SIZE_190 # define BOOST_PP_SEQ_SIZE_190(_) BOOST_PP_SEQ_SIZE_191 # define BOOST_PP_SEQ_SIZE_191(_) BOOST_PP_SEQ_SIZE_192 # define BOOST_PP_SEQ_SIZE_192(_) BOOST_PP_SEQ_SIZE_193 # define BOOST_PP_SEQ_SIZE_193(_) BOOST_PP_SEQ_SIZE_194 # define BOOST_PP_SEQ_SIZE_194(_) BOOST_PP_SEQ_SIZE_195 # define BOOST_PP_SEQ_SIZE_195(_) BOOST_PP_SEQ_SIZE_196 # define BOOST_PP_SEQ_SIZE_196(_) BOOST_PP_SEQ_SIZE_197 # define BOOST_PP_SEQ_SIZE_197(_) BOOST_PP_SEQ_SIZE_198 # define BOOST_PP_SEQ_SIZE_198(_) BOOST_PP_SEQ_SIZE_199 # define BOOST_PP_SEQ_SIZE_199(_) BOOST_PP_SEQ_SIZE_200 # define BOOST_PP_SEQ_SIZE_200(_) BOOST_PP_SEQ_SIZE_201 # define BOOST_PP_SEQ_SIZE_201(_) BOOST_PP_SEQ_SIZE_202 # define BOOST_PP_SEQ_SIZE_202(_) BOOST_PP_SEQ_SIZE_203 # define BOOST_PP_SEQ_SIZE_203(_) BOOST_PP_SEQ_SIZE_204 # define BOOST_PP_SEQ_SIZE_204(_) BOOST_PP_SEQ_SIZE_205 # define BOOST_PP_SEQ_SIZE_205(_) BOOST_PP_SEQ_SIZE_206 # define BOOST_PP_SEQ_SIZE_206(_) BOOST_PP_SEQ_SIZE_207 # define BOOST_PP_SEQ_SIZE_207(_) BOOST_PP_SEQ_SIZE_208 # define BOOST_PP_SEQ_SIZE_208(_) BOOST_PP_SEQ_SIZE_209 # define BOOST_PP_SEQ_SIZE_209(_) BOOST_PP_SEQ_SIZE_210 # define BOOST_PP_SEQ_SIZE_210(_) BOOST_PP_SEQ_SIZE_211 # define BOOST_PP_SEQ_SIZE_211(_) BOOST_PP_SEQ_SIZE_212 # define BOOST_PP_SEQ_SIZE_212(_) BOOST_PP_SEQ_SIZE_213 # define BOOST_PP_SEQ_SIZE_213(_) BOOST_PP_SEQ_SIZE_214 # define BOOST_PP_SEQ_SIZE_214(_) BOOST_PP_SEQ_SIZE_215 # define BOOST_PP_SEQ_SIZE_215(_) BOOST_PP_SEQ_SIZE_216 # define BOOST_PP_SEQ_SIZE_216(_) BOOST_PP_SEQ_SIZE_217 # define BOOST_PP_SEQ_SIZE_217(_) BOOST_PP_SEQ_SIZE_218 # define BOOST_PP_SEQ_SIZE_218(_) BOOST_PP_SEQ_SIZE_219 # define BOOST_PP_SEQ_SIZE_219(_) BOOST_PP_SEQ_SIZE_220 # define BOOST_PP_SEQ_SIZE_220(_) BOOST_PP_SEQ_SIZE_221 # define BOOST_PP_SEQ_SIZE_221(_) BOOST_PP_SEQ_SIZE_222 # define BOOST_PP_SEQ_SIZE_222(_) BOOST_PP_SEQ_SIZE_223 # define BOOST_PP_SEQ_SIZE_223(_) BOOST_PP_SEQ_SIZE_224 # define BOOST_PP_SEQ_SIZE_224(_) BOOST_PP_SEQ_SIZE_225 # define BOOST_PP_SEQ_SIZE_225(_) BOOST_PP_SEQ_SIZE_226 # define BOOST_PP_SEQ_SIZE_226(_) BOOST_PP_SEQ_SIZE_227 # define BOOST_PP_SEQ_SIZE_227(_) BOOST_PP_SEQ_SIZE_228 # define BOOST_PP_SEQ_SIZE_228(_) BOOST_PP_SEQ_SIZE_229 # define BOOST_PP_SEQ_SIZE_229(_) BOOST_PP_SEQ_SIZE_230 # define BOOST_PP_SEQ_SIZE_230(_) BOOST_PP_SEQ_SIZE_231 # define BOOST_PP_SEQ_SIZE_231(_) BOOST_PP_SEQ_SIZE_232 # define BOOST_PP_SEQ_SIZE_232(_) BOOST_PP_SEQ_SIZE_233 # define BOOST_PP_SEQ_SIZE_233(_) BOOST_PP_SEQ_SIZE_234 # define BOOST_PP_SEQ_SIZE_234(_) BOOST_PP_SEQ_SIZE_235 # define BOOST_PP_SEQ_SIZE_235(_) BOOST_PP_SEQ_SIZE_236 # define BOOST_PP_SEQ_SIZE_236(_) BOOST_PP_SEQ_SIZE_237 # define BOOST_PP_SEQ_SIZE_237(_) BOOST_PP_SEQ_SIZE_238 # define BOOST_PP_SEQ_SIZE_238(_) BOOST_PP_SEQ_SIZE_239 # define BOOST_PP_SEQ_SIZE_239(_) BOOST_PP_SEQ_SIZE_240 # define BOOST_PP_SEQ_SIZE_240(_) BOOST_PP_SEQ_SIZE_241 # define BOOST_PP_SEQ_SIZE_241(_) BOOST_PP_SEQ_SIZE_242 # define BOOST_PP_SEQ_SIZE_242(_) BOOST_PP_SEQ_SIZE_243 # define BOOST_PP_SEQ_SIZE_243(_) BOOST_PP_SEQ_SIZE_244 # define BOOST_PP_SEQ_SIZE_244(_) BOOST_PP_SEQ_SIZE_245 # define BOOST_PP_SEQ_SIZE_245(_) BOOST_PP_SEQ_SIZE_246 # define BOOST_PP_SEQ_SIZE_246(_) BOOST_PP_SEQ_SIZE_247 # define BOOST_PP_SEQ_SIZE_247(_) BOOST_PP_SEQ_SIZE_248 # define BOOST_PP_SEQ_SIZE_248(_) BOOST_PP_SEQ_SIZE_249 # define BOOST_PP_SEQ_SIZE_249(_) BOOST_PP_SEQ_SIZE_250 # define BOOST_PP_SEQ_SIZE_250(_) BOOST_PP_SEQ_SIZE_251 # define BOOST_PP_SEQ_SIZE_251(_) BOOST_PP_SEQ_SIZE_252 # define BOOST_PP_SEQ_SIZE_252(_) BOOST_PP_SEQ_SIZE_253 # define BOOST_PP_SEQ_SIZE_253(_) BOOST_PP_SEQ_SIZE_254 # define BOOST_PP_SEQ_SIZE_254(_) BOOST_PP_SEQ_SIZE_255 # define BOOST_PP_SEQ_SIZE_255(_) BOOST_PP_SEQ_SIZE_256 # define BOOST_PP_SEQ_SIZE_256(_) BOOST_PP_SEQ_SIZE_257 # # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_0 0 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_1 1 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_2 2 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_3 3 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_4 4 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_5 5 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_6 6 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_7 7 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_8 8 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_9 9 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_10 10 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_11 11 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_12 12 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_13 13 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_14 14 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_15 15 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_16 16 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_17 17 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_18 18 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_19 19 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_20 20 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_21 21 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_22 22 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_23 23 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_24 24 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_25 25 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_26 26 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_27 27 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_28 28 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_29 29 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_30 30 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_31 31 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_32 32 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_33 33 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_34 34 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_35 35 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_36 36 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_37 37 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_38 38 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_39 39 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_40 40 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_41 41 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_42 42 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_43 43 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_44 44 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_45 45 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_46 46 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_47 47 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_48 48 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_49 49 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_50 50 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_51 51 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_52 52 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_53 53 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_54 54 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_55 55 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_56 56 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_57 57 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_58 58 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_59 59 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_60 60 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_61 61 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_62 62 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_63 63 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_64 64 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_65 65 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_66 66 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_67 67 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_68 68 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_69 69 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_70 70 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_71 71 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_72 72 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_73 73 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_74 74 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_75 75 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_76 76 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_77 77 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_78 78 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_79 79 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_80 80 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_81 81 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_82 82 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_83 83 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_84 84 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_85 85 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_86 86 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_87 87 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_88 88 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_89 89 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_90 90 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_91 91 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_92 92 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_93 93 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_94 94 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_95 95 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_96 96 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_97 97 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_98 98 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_99 99 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_100 100 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_101 101 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_102 102 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_103 103 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_104 104 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_105 105 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_106 106 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_107 107 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_108 108 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_109 109 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_110 110 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_111 111 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_112 112 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_113 113 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_114 114 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_115 115 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_116 116 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_117 117 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_118 118 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_119 119 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_120 120 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_121 121 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_122 122 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_123 123 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_124 124 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_125 125 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_126 126 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_127 127 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_128 128 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_129 129 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_130 130 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_131 131 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_132 132 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_133 133 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_134 134 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_135 135 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_136 136 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_137 137 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_138 138 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_139 139 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_140 140 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_141 141 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_142 142 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_143 143 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_144 144 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_145 145 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_146 146 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_147 147 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_148 148 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_149 149 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_150 150 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_151 151 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_152 152 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_153 153 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_154 154 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_155 155 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_156 156 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_157 157 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_158 158 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_159 159 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_160 160 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_161 161 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_162 162 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_163 163 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_164 164 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_165 165 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_166 166 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_167 167 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_168 168 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_169 169 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_170 170 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_171 171 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_172 172 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_173 173 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_174 174 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_175 175 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_176 176 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_177 177 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_178 178 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_179 179 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_180 180 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_181 181 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_182 182 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_183 183 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_184 184 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_185 185 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_186 186 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_187 187 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_188 188 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_189 189 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_190 190 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_191 191 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_192 192 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_193 193 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_194 194 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_195 195 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_196 196 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_197 197 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_198 198 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_199 199 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_200 200 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_201 201 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_202 202 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_203 203 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_204 204 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_205 205 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_206 206 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_207 207 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_208 208 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_209 209 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_210 210 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_211 211 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_212 212 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_213 213 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_214 214 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_215 215 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_216 216 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_217 217 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_218 218 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_219 219 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_220 220 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_221 221 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_222 222 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_223 223 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_224 224 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_225 225 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_226 226 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_227 227 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_228 228 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_229 229 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_230 230 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_231 231 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_232 232 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_233 233 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_234 234 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_235 235 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_236 236 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_237 237 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_238 238 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_239 239 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_240 240 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_241 241 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_242 242 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_243 243 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_244 244 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_245 245 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_246 246 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_247 247 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_248 248 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_249 249 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_250 250 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_251 251 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_252 252 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_253 253 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_254 254 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_255 255 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_256 256 # # endif passenger-4.0.37/ext/boost/preprocessor/repetition/detail/000755 000765 000024 00000000000 12233035540 024314 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/repetition/enum.hpp000644 000765 000024 00000005742 12233035540 024537 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_HPP # # include # include # include # include # include # include # include # include # # /* BOOST_PP_ENUM */ # # if 0 # define BOOST_PP_ENUM(count, macro, data) # endif # # define BOOST_PP_ENUM BOOST_PP_CAT(BOOST_PP_ENUM_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d)) # define BOOST_PP_ENUM_2(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_M_2, (m, d)) # define BOOST_PP_ENUM_3(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_M_3, (m, d)) # else # define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_ENUM_1_I(c, m, d) # define BOOST_PP_ENUM_2(c, m, d) BOOST_PP_ENUM_2_I(c, m, d) # define BOOST_PP_ENUM_3(c, m, d) BOOST_PP_ENUM_3_I(c, m, d) # define BOOST_PP_ENUM_1_I(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d)) # define BOOST_PP_ENUM_2_I(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_M_2, (m, d)) # define BOOST_PP_ENUM_3_I(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_M_3, (m, d)) # endif # # define BOOST_PP_ENUM_4(c, m, d) BOOST_PP_ERROR(0x0003) # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_ENUM_M_1(z, n, md) BOOST_PP_ENUM_M_1_IM(z, n, BOOST_PP_TUPLE_REM_2 md) # define BOOST_PP_ENUM_M_2(z, n, md) BOOST_PP_ENUM_M_2_IM(z, n, BOOST_PP_TUPLE_REM_2 md) # define BOOST_PP_ENUM_M_3(z, n, md) BOOST_PP_ENUM_M_3_IM(z, n, BOOST_PP_TUPLE_REM_2 md) # define BOOST_PP_ENUM_M_1_IM(z, n, im) BOOST_PP_ENUM_M_1_I(z, n, im) # define BOOST_PP_ENUM_M_2_IM(z, n, im) BOOST_PP_ENUM_M_2_I(z, n, im) # define BOOST_PP_ENUM_M_3_IM(z, n, im) BOOST_PP_ENUM_M_3_I(z, n, im) # else # define BOOST_PP_ENUM_M_1(z, n, md) BOOST_PP_ENUM_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) # define BOOST_PP_ENUM_M_2(z, n, md) BOOST_PP_ENUM_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) # define BOOST_PP_ENUM_M_3(z, n, md) BOOST_PP_ENUM_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) # endif # # define BOOST_PP_ENUM_M_1_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d) # define BOOST_PP_ENUM_M_2_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d) # define BOOST_PP_ENUM_M_3_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d) # # endif passenger-4.0.37/ext/boost/preprocessor/repetition/enum_binary_params.hpp000644 000765 000024 00000005344 12233035540 027444 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_BINARY_PARAMS_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_BINARY_PARAMS_HPP # # include # include # include # include # include # include # # /* BOOST_PP_ENUM_BINARY_PARAMS */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_BINARY_PARAMS(count, p1, p2) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) # else # define BOOST_PP_ENUM_BINARY_PARAMS(count, p1, p2) BOOST_PP_ENUM_BINARY_PARAMS_I(count, p1, p2) # define BOOST_PP_ENUM_BINARY_PARAMS_I(count, p1, p2) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) # endif # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_ENUM_BINARY_PARAMS_M(z, n, pp) BOOST_PP_ENUM_BINARY_PARAMS_M_IM(z, n, BOOST_PP_TUPLE_REM_2 pp) # define BOOST_PP_ENUM_BINARY_PARAMS_M_IM(z, n, im) BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, im) # else # define BOOST_PP_ENUM_BINARY_PARAMS_M(z, n, pp) BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, pp), BOOST_PP_TUPLE_ELEM(2, 1, pp)) # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, p1, p2) BOOST_PP_ENUM_BINARY_PARAMS_M_II(z, n, p1, p2) # define BOOST_PP_ENUM_BINARY_PARAMS_M_II(z, n, p1, p2) BOOST_PP_COMMA_IF(n) p1 ## n p2 ## n # else # define BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, p1, p2) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(p1, n) BOOST_PP_CAT(p2, n) # endif # # /* BOOST_PP_ENUM_BINARY_PARAMS_Z */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_BINARY_PARAMS_Z(z, count, p1, p2) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) # else # define BOOST_PP_ENUM_BINARY_PARAMS_Z(z, count, p1, p2) BOOST_PP_ENUM_BINARY_PARAMS_Z_I(z, count, p1, p2) # define BOOST_PP_ENUM_BINARY_PARAMS_Z_I(z, count, p1, p2) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/repetition/enum_params.hpp000644 000765 000024 00000002770 12233035540 026100 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP # # include # include # include # # /* BOOST_PP_ENUM_PARAMS */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) # else # define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_ENUM_PARAMS_I(count, param) # define BOOST_PP_ENUM_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) # endif # # define BOOST_PP_ENUM_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) param ## n # # /* BOOST_PP_ENUM_PARAMS_Z */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) # else # define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) # define BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/repetition/enum_params_with_a_default.hpp000644 000765 000024 00000001531 12233035540 031131 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_A_DEFAULT_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_A_DEFAULT_HPP # # include # include # include # # /* BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT */ # # define BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(count, param, def) BOOST_PP_ENUM_BINARY_PARAMS(count, param, = def BOOST_PP_INTERCEPT) # # endif passenger-4.0.37/ext/boost/preprocessor/repetition/enum_shifted_params.hpp000644 000765 000024 00000003535 12233035540 027606 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP # # include # include # include # include # include # include # # /* BOOST_PP_ENUM_SHIFTED_PARAMS */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) # else # define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) # define BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) # endif # # define BOOST_PP_ENUM_SHIFTED_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(param, BOOST_PP_INC(n)) # # /* BOOST_PP_ENUM_SHIFTED_PARAMS_Z */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) # else # define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) # define BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/repetition/enum_trailing_params.hpp000644 000765 000024 00000003475 12233035540 027774 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_PARAMS_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_PARAMS_HPP # # include # include # # /* BOOST_PP_ENUM_TRAILING_PARAMS */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_TRAILING_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) # else # define BOOST_PP_ENUM_TRAILING_PARAMS(count, param) BOOST_PP_ENUM_TRAILING_PARAMS_I(count, param) # define BOOST_PP_ENUM_TRAILING_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) # endif # # define BOOST_PP_ENUM_TRAILING_PARAMS_M(z, n, param) , param ## n # # /* BOOST_PP_ENUM_TRAILING_PARAMS_Z */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) # else # define BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, count, param) BOOST_PP_ENUM_TRAILING_PARAMS_Z_I(z, count, param) # define BOOST_PP_ENUM_TRAILING_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/repetition/for.hpp000644 000765 000024 00000040304 12233035540 024352 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_FOR_HPP # define BOOST_PREPROCESSOR_REPETITION_FOR_HPP # # include # include # include # # /* BOOST_PP_FOR */ # # if 0 # define BOOST_PP_FOR(state, pred, op, macro) # endif # # define BOOST_PP_FOR BOOST_PP_CAT(BOOST_PP_FOR_, BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256)) # # define BOOST_PP_FOR_P(n) BOOST_PP_CAT(BOOST_PP_FOR_CHECK_, BOOST_PP_FOR_ ## n(1, BOOST_PP_FOR_SR_P, BOOST_PP_FOR_SR_O, BOOST_PP_FOR_SR_M)) # # define BOOST_PP_FOR_SR_P(r, s) s # define BOOST_PP_FOR_SR_O(r, s) 0 # define BOOST_PP_FOR_SR_M(r, s) BOOST_PP_NIL # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # include # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # include # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # include # else # include # endif # # define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002) # # define BOOST_PP_FOR_CHECK_BOOST_PP_NIL 1 # # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_1(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_2(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_3(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_4(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_5(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_6(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_7(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_8(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_9(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_10(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_11(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_12(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_13(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_14(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_15(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_16(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_17(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_18(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_19(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_20(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_21(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_22(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_23(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_24(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_25(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_26(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_27(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_28(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_29(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_30(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_31(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_32(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_33(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_34(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_35(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_36(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_37(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_38(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_39(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_40(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_41(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_42(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_43(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_44(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_45(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_46(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_47(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_48(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_49(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_50(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_51(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_52(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_53(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_54(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_55(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_56(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_57(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_58(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_59(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_60(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_61(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_62(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_63(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_64(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_65(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_66(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_67(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_68(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_69(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_70(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_71(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_72(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_73(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_74(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_75(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_76(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_77(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_78(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_79(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_80(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_81(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_82(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_83(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_84(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_85(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_86(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_87(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_88(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_89(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_90(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_91(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_92(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_93(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_94(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_95(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_96(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_97(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_98(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_99(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_100(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_101(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_102(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_103(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_104(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_105(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_106(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_107(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_108(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_109(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_110(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_111(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_112(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_113(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_114(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_115(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_116(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_117(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_118(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_119(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_120(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_121(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_122(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_123(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_124(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_125(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_126(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_127(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_128(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_129(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_130(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_131(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_132(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_133(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_134(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_135(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_136(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_137(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_138(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_139(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_140(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_141(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_142(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_143(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_144(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_145(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_146(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_147(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_148(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_149(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_150(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_151(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_152(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_153(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_154(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_155(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_156(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_157(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_158(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_159(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_160(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_161(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_162(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_163(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_164(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_165(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_166(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_167(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_168(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_169(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_170(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_171(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_172(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_173(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_174(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_175(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_176(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_177(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_178(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_179(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_180(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_181(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_182(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_183(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_184(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_185(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_186(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_187(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_188(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_189(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_190(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_191(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_192(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_193(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_194(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_195(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_196(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_197(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_198(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_199(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_200(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_201(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_202(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_203(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_204(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_205(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_206(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_207(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_208(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_209(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_210(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_211(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_212(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_213(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_214(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_215(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_216(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_217(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_218(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_219(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_220(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_221(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_222(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_223(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_224(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_225(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_226(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_227(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_228(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_229(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_230(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_231(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_232(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_233(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_234(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_235(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_236(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_237(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_238(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_239(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_240(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_241(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_242(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_243(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_244(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_245(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_246(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_247(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_248(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_249(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_250(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_251(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_252(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_253(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_254(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_255(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_256(s, p, o, m) 0 # # endif passenger-4.0.37/ext/boost/preprocessor/repetition/repeat.hpp000644 000765 000024 00000166622 12233035540 025060 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP # define BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP # # include # include # include # include # include # # /* BOOST_PP_REPEAT */ # # if 0 # define BOOST_PP_REPEAT(count, macro, data) # endif # # define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) # # define BOOST_PP_REPEAT_P(n) BOOST_PP_CAT(BOOST_PP_REPEAT_CHECK_, BOOST_PP_REPEAT_ ## n(1, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3, BOOST_PP_NIL)) # # define BOOST_PP_REPEAT_CHECK_BOOST_PP_NIL 1 # define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_1(c, m, d) 0 # define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_2(c, m, d) 0 # define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_3(c, m, d) 0 # # define BOOST_PP_REPEAT_1(c, m, d) BOOST_PP_REPEAT_1_I(c, m, d) # define BOOST_PP_REPEAT_2(c, m, d) BOOST_PP_REPEAT_2_I(c, m, d) # define BOOST_PP_REPEAT_3(c, m, d) BOOST_PP_REPEAT_3_I(c, m, d) # define BOOST_PP_REPEAT_4(c, m, d) BOOST_PP_ERROR(0x0003) # # define BOOST_PP_REPEAT_1_I(c, m, d) BOOST_PP_REPEAT_1_ ## c(m, d) # define BOOST_PP_REPEAT_2_I(c, m, d) BOOST_PP_REPEAT_2_ ## c(m, d) # define BOOST_PP_REPEAT_3_I(c, m, d) BOOST_PP_REPEAT_3_ ## c(m, d) # # define BOOST_PP_REPEAT_1ST BOOST_PP_REPEAT_1 # define BOOST_PP_REPEAT_2ND BOOST_PP_REPEAT_2 # define BOOST_PP_REPEAT_3RD BOOST_PP_REPEAT_3 # # define BOOST_PP_REPEAT_1_0(m, d) # define BOOST_PP_REPEAT_1_1(m, d) m(2, 0, d) # define BOOST_PP_REPEAT_1_2(m, d) BOOST_PP_REPEAT_1_1(m, d) m(2, 1, d) # define BOOST_PP_REPEAT_1_3(m, d) BOOST_PP_REPEAT_1_2(m, d) m(2, 2, d) # define BOOST_PP_REPEAT_1_4(m, d) BOOST_PP_REPEAT_1_3(m, d) m(2, 3, d) # define BOOST_PP_REPEAT_1_5(m, d) BOOST_PP_REPEAT_1_4(m, d) m(2, 4, d) # define BOOST_PP_REPEAT_1_6(m, d) BOOST_PP_REPEAT_1_5(m, d) m(2, 5, d) # define BOOST_PP_REPEAT_1_7(m, d) BOOST_PP_REPEAT_1_6(m, d) m(2, 6, d) # define BOOST_PP_REPEAT_1_8(m, d) BOOST_PP_REPEAT_1_7(m, d) m(2, 7, d) # define BOOST_PP_REPEAT_1_9(m, d) BOOST_PP_REPEAT_1_8(m, d) m(2, 8, d) # define BOOST_PP_REPEAT_1_10(m, d) BOOST_PP_REPEAT_1_9(m, d) m(2, 9, d) # define BOOST_PP_REPEAT_1_11(m, d) BOOST_PP_REPEAT_1_10(m, d) m(2, 10, d) # define BOOST_PP_REPEAT_1_12(m, d) BOOST_PP_REPEAT_1_11(m, d) m(2, 11, d) # define BOOST_PP_REPEAT_1_13(m, d) BOOST_PP_REPEAT_1_12(m, d) m(2, 12, d) # define BOOST_PP_REPEAT_1_14(m, d) BOOST_PP_REPEAT_1_13(m, d) m(2, 13, d) # define BOOST_PP_REPEAT_1_15(m, d) BOOST_PP_REPEAT_1_14(m, d) m(2, 14, d) # define BOOST_PP_REPEAT_1_16(m, d) BOOST_PP_REPEAT_1_15(m, d) m(2, 15, d) # define BOOST_PP_REPEAT_1_17(m, d) BOOST_PP_REPEAT_1_16(m, d) m(2, 16, d) # define BOOST_PP_REPEAT_1_18(m, d) BOOST_PP_REPEAT_1_17(m, d) m(2, 17, d) # define BOOST_PP_REPEAT_1_19(m, d) BOOST_PP_REPEAT_1_18(m, d) m(2, 18, d) # define BOOST_PP_REPEAT_1_20(m, d) BOOST_PP_REPEAT_1_19(m, d) m(2, 19, d) # define BOOST_PP_REPEAT_1_21(m, d) BOOST_PP_REPEAT_1_20(m, d) m(2, 20, d) # define BOOST_PP_REPEAT_1_22(m, d) BOOST_PP_REPEAT_1_21(m, d) m(2, 21, d) # define BOOST_PP_REPEAT_1_23(m, d) BOOST_PP_REPEAT_1_22(m, d) m(2, 22, d) # define BOOST_PP_REPEAT_1_24(m, d) BOOST_PP_REPEAT_1_23(m, d) m(2, 23, d) # define BOOST_PP_REPEAT_1_25(m, d) BOOST_PP_REPEAT_1_24(m, d) m(2, 24, d) # define BOOST_PP_REPEAT_1_26(m, d) BOOST_PP_REPEAT_1_25(m, d) m(2, 25, d) # define BOOST_PP_REPEAT_1_27(m, d) BOOST_PP_REPEAT_1_26(m, d) m(2, 26, d) # define BOOST_PP_REPEAT_1_28(m, d) BOOST_PP_REPEAT_1_27(m, d) m(2, 27, d) # define BOOST_PP_REPEAT_1_29(m, d) BOOST_PP_REPEAT_1_28(m, d) m(2, 28, d) # define BOOST_PP_REPEAT_1_30(m, d) BOOST_PP_REPEAT_1_29(m, d) m(2, 29, d) # define BOOST_PP_REPEAT_1_31(m, d) BOOST_PP_REPEAT_1_30(m, d) m(2, 30, d) # define BOOST_PP_REPEAT_1_32(m, d) BOOST_PP_REPEAT_1_31(m, d) m(2, 31, d) # define BOOST_PP_REPEAT_1_33(m, d) BOOST_PP_REPEAT_1_32(m, d) m(2, 32, d) # define BOOST_PP_REPEAT_1_34(m, d) BOOST_PP_REPEAT_1_33(m, d) m(2, 33, d) # define BOOST_PP_REPEAT_1_35(m, d) BOOST_PP_REPEAT_1_34(m, d) m(2, 34, d) # define BOOST_PP_REPEAT_1_36(m, d) BOOST_PP_REPEAT_1_35(m, d) m(2, 35, d) # define BOOST_PP_REPEAT_1_37(m, d) BOOST_PP_REPEAT_1_36(m, d) m(2, 36, d) # define BOOST_PP_REPEAT_1_38(m, d) BOOST_PP_REPEAT_1_37(m, d) m(2, 37, d) # define BOOST_PP_REPEAT_1_39(m, d) BOOST_PP_REPEAT_1_38(m, d) m(2, 38, d) # define BOOST_PP_REPEAT_1_40(m, d) BOOST_PP_REPEAT_1_39(m, d) m(2, 39, d) # define BOOST_PP_REPEAT_1_41(m, d) BOOST_PP_REPEAT_1_40(m, d) m(2, 40, d) # define BOOST_PP_REPEAT_1_42(m, d) BOOST_PP_REPEAT_1_41(m, d) m(2, 41, d) # define BOOST_PP_REPEAT_1_43(m, d) BOOST_PP_REPEAT_1_42(m, d) m(2, 42, d) # define BOOST_PP_REPEAT_1_44(m, d) BOOST_PP_REPEAT_1_43(m, d) m(2, 43, d) # define BOOST_PP_REPEAT_1_45(m, d) BOOST_PP_REPEAT_1_44(m, d) m(2, 44, d) # define BOOST_PP_REPEAT_1_46(m, d) BOOST_PP_REPEAT_1_45(m, d) m(2, 45, d) # define BOOST_PP_REPEAT_1_47(m, d) BOOST_PP_REPEAT_1_46(m, d) m(2, 46, d) # define BOOST_PP_REPEAT_1_48(m, d) BOOST_PP_REPEAT_1_47(m, d) m(2, 47, d) # define BOOST_PP_REPEAT_1_49(m, d) BOOST_PP_REPEAT_1_48(m, d) m(2, 48, d) # define BOOST_PP_REPEAT_1_50(m, d) BOOST_PP_REPEAT_1_49(m, d) m(2, 49, d) # define BOOST_PP_REPEAT_1_51(m, d) BOOST_PP_REPEAT_1_50(m, d) m(2, 50, d) # define BOOST_PP_REPEAT_1_52(m, d) BOOST_PP_REPEAT_1_51(m, d) m(2, 51, d) # define BOOST_PP_REPEAT_1_53(m, d) BOOST_PP_REPEAT_1_52(m, d) m(2, 52, d) # define BOOST_PP_REPEAT_1_54(m, d) BOOST_PP_REPEAT_1_53(m, d) m(2, 53, d) # define BOOST_PP_REPEAT_1_55(m, d) BOOST_PP_REPEAT_1_54(m, d) m(2, 54, d) # define BOOST_PP_REPEAT_1_56(m, d) BOOST_PP_REPEAT_1_55(m, d) m(2, 55, d) # define BOOST_PP_REPEAT_1_57(m, d) BOOST_PP_REPEAT_1_56(m, d) m(2, 56, d) # define BOOST_PP_REPEAT_1_58(m, d) BOOST_PP_REPEAT_1_57(m, d) m(2, 57, d) # define BOOST_PP_REPEAT_1_59(m, d) BOOST_PP_REPEAT_1_58(m, d) m(2, 58, d) # define BOOST_PP_REPEAT_1_60(m, d) BOOST_PP_REPEAT_1_59(m, d) m(2, 59, d) # define BOOST_PP_REPEAT_1_61(m, d) BOOST_PP_REPEAT_1_60(m, d) m(2, 60, d) # define BOOST_PP_REPEAT_1_62(m, d) BOOST_PP_REPEAT_1_61(m, d) m(2, 61, d) # define BOOST_PP_REPEAT_1_63(m, d) BOOST_PP_REPEAT_1_62(m, d) m(2, 62, d) # define BOOST_PP_REPEAT_1_64(m, d) BOOST_PP_REPEAT_1_63(m, d) m(2, 63, d) # define BOOST_PP_REPEAT_1_65(m, d) BOOST_PP_REPEAT_1_64(m, d) m(2, 64, d) # define BOOST_PP_REPEAT_1_66(m, d) BOOST_PP_REPEAT_1_65(m, d) m(2, 65, d) # define BOOST_PP_REPEAT_1_67(m, d) BOOST_PP_REPEAT_1_66(m, d) m(2, 66, d) # define BOOST_PP_REPEAT_1_68(m, d) BOOST_PP_REPEAT_1_67(m, d) m(2, 67, d) # define BOOST_PP_REPEAT_1_69(m, d) BOOST_PP_REPEAT_1_68(m, d) m(2, 68, d) # define BOOST_PP_REPEAT_1_70(m, d) BOOST_PP_REPEAT_1_69(m, d) m(2, 69, d) # define BOOST_PP_REPEAT_1_71(m, d) BOOST_PP_REPEAT_1_70(m, d) m(2, 70, d) # define BOOST_PP_REPEAT_1_72(m, d) BOOST_PP_REPEAT_1_71(m, d) m(2, 71, d) # define BOOST_PP_REPEAT_1_73(m, d) BOOST_PP_REPEAT_1_72(m, d) m(2, 72, d) # define BOOST_PP_REPEAT_1_74(m, d) BOOST_PP_REPEAT_1_73(m, d) m(2, 73, d) # define BOOST_PP_REPEAT_1_75(m, d) BOOST_PP_REPEAT_1_74(m, d) m(2, 74, d) # define BOOST_PP_REPEAT_1_76(m, d) BOOST_PP_REPEAT_1_75(m, d) m(2, 75, d) # define BOOST_PP_REPEAT_1_77(m, d) BOOST_PP_REPEAT_1_76(m, d) m(2, 76, d) # define BOOST_PP_REPEAT_1_78(m, d) BOOST_PP_REPEAT_1_77(m, d) m(2, 77, d) # define BOOST_PP_REPEAT_1_79(m, d) BOOST_PP_REPEAT_1_78(m, d) m(2, 78, d) # define BOOST_PP_REPEAT_1_80(m, d) BOOST_PP_REPEAT_1_79(m, d) m(2, 79, d) # define BOOST_PP_REPEAT_1_81(m, d) BOOST_PP_REPEAT_1_80(m, d) m(2, 80, d) # define BOOST_PP_REPEAT_1_82(m, d) BOOST_PP_REPEAT_1_81(m, d) m(2, 81, d) # define BOOST_PP_REPEAT_1_83(m, d) BOOST_PP_REPEAT_1_82(m, d) m(2, 82, d) # define BOOST_PP_REPEAT_1_84(m, d) BOOST_PP_REPEAT_1_83(m, d) m(2, 83, d) # define BOOST_PP_REPEAT_1_85(m, d) BOOST_PP_REPEAT_1_84(m, d) m(2, 84, d) # define BOOST_PP_REPEAT_1_86(m, d) BOOST_PP_REPEAT_1_85(m, d) m(2, 85, d) # define BOOST_PP_REPEAT_1_87(m, d) BOOST_PP_REPEAT_1_86(m, d) m(2, 86, d) # define BOOST_PP_REPEAT_1_88(m, d) BOOST_PP_REPEAT_1_87(m, d) m(2, 87, d) # define BOOST_PP_REPEAT_1_89(m, d) BOOST_PP_REPEAT_1_88(m, d) m(2, 88, d) # define BOOST_PP_REPEAT_1_90(m, d) BOOST_PP_REPEAT_1_89(m, d) m(2, 89, d) # define BOOST_PP_REPEAT_1_91(m, d) BOOST_PP_REPEAT_1_90(m, d) m(2, 90, d) # define BOOST_PP_REPEAT_1_92(m, d) BOOST_PP_REPEAT_1_91(m, d) m(2, 91, d) # define BOOST_PP_REPEAT_1_93(m, d) BOOST_PP_REPEAT_1_92(m, d) m(2, 92, d) # define BOOST_PP_REPEAT_1_94(m, d) BOOST_PP_REPEAT_1_93(m, d) m(2, 93, d) # define BOOST_PP_REPEAT_1_95(m, d) BOOST_PP_REPEAT_1_94(m, d) m(2, 94, d) # define BOOST_PP_REPEAT_1_96(m, d) BOOST_PP_REPEAT_1_95(m, d) m(2, 95, d) # define BOOST_PP_REPEAT_1_97(m, d) BOOST_PP_REPEAT_1_96(m, d) m(2, 96, d) # define BOOST_PP_REPEAT_1_98(m, d) BOOST_PP_REPEAT_1_97(m, d) m(2, 97, d) # define BOOST_PP_REPEAT_1_99(m, d) BOOST_PP_REPEAT_1_98(m, d) m(2, 98, d) # define BOOST_PP_REPEAT_1_100(m, d) BOOST_PP_REPEAT_1_99(m, d) m(2, 99, d) # define BOOST_PP_REPEAT_1_101(m, d) BOOST_PP_REPEAT_1_100(m, d) m(2, 100, d) # define BOOST_PP_REPEAT_1_102(m, d) BOOST_PP_REPEAT_1_101(m, d) m(2, 101, d) # define BOOST_PP_REPEAT_1_103(m, d) BOOST_PP_REPEAT_1_102(m, d) m(2, 102, d) # define BOOST_PP_REPEAT_1_104(m, d) BOOST_PP_REPEAT_1_103(m, d) m(2, 103, d) # define BOOST_PP_REPEAT_1_105(m, d) BOOST_PP_REPEAT_1_104(m, d) m(2, 104, d) # define BOOST_PP_REPEAT_1_106(m, d) BOOST_PP_REPEAT_1_105(m, d) m(2, 105, d) # define BOOST_PP_REPEAT_1_107(m, d) BOOST_PP_REPEAT_1_106(m, d) m(2, 106, d) # define BOOST_PP_REPEAT_1_108(m, d) BOOST_PP_REPEAT_1_107(m, d) m(2, 107, d) # define BOOST_PP_REPEAT_1_109(m, d) BOOST_PP_REPEAT_1_108(m, d) m(2, 108, d) # define BOOST_PP_REPEAT_1_110(m, d) BOOST_PP_REPEAT_1_109(m, d) m(2, 109, d) # define BOOST_PP_REPEAT_1_111(m, d) BOOST_PP_REPEAT_1_110(m, d) m(2, 110, d) # define BOOST_PP_REPEAT_1_112(m, d) BOOST_PP_REPEAT_1_111(m, d) m(2, 111, d) # define BOOST_PP_REPEAT_1_113(m, d) BOOST_PP_REPEAT_1_112(m, d) m(2, 112, d) # define BOOST_PP_REPEAT_1_114(m, d) BOOST_PP_REPEAT_1_113(m, d) m(2, 113, d) # define BOOST_PP_REPEAT_1_115(m, d) BOOST_PP_REPEAT_1_114(m, d) m(2, 114, d) # define BOOST_PP_REPEAT_1_116(m, d) BOOST_PP_REPEAT_1_115(m, d) m(2, 115, d) # define BOOST_PP_REPEAT_1_117(m, d) BOOST_PP_REPEAT_1_116(m, d) m(2, 116, d) # define BOOST_PP_REPEAT_1_118(m, d) BOOST_PP_REPEAT_1_117(m, d) m(2, 117, d) # define BOOST_PP_REPEAT_1_119(m, d) BOOST_PP_REPEAT_1_118(m, d) m(2, 118, d) # define BOOST_PP_REPEAT_1_120(m, d) BOOST_PP_REPEAT_1_119(m, d) m(2, 119, d) # define BOOST_PP_REPEAT_1_121(m, d) BOOST_PP_REPEAT_1_120(m, d) m(2, 120, d) # define BOOST_PP_REPEAT_1_122(m, d) BOOST_PP_REPEAT_1_121(m, d) m(2, 121, d) # define BOOST_PP_REPEAT_1_123(m, d) BOOST_PP_REPEAT_1_122(m, d) m(2, 122, d) # define BOOST_PP_REPEAT_1_124(m, d) BOOST_PP_REPEAT_1_123(m, d) m(2, 123, d) # define BOOST_PP_REPEAT_1_125(m, d) BOOST_PP_REPEAT_1_124(m, d) m(2, 124, d) # define BOOST_PP_REPEAT_1_126(m, d) BOOST_PP_REPEAT_1_125(m, d) m(2, 125, d) # define BOOST_PP_REPEAT_1_127(m, d) BOOST_PP_REPEAT_1_126(m, d) m(2, 126, d) # define BOOST_PP_REPEAT_1_128(m, d) BOOST_PP_REPEAT_1_127(m, d) m(2, 127, d) # define BOOST_PP_REPEAT_1_129(m, d) BOOST_PP_REPEAT_1_128(m, d) m(2, 128, d) # define BOOST_PP_REPEAT_1_130(m, d) BOOST_PP_REPEAT_1_129(m, d) m(2, 129, d) # define BOOST_PP_REPEAT_1_131(m, d) BOOST_PP_REPEAT_1_130(m, d) m(2, 130, d) # define BOOST_PP_REPEAT_1_132(m, d) BOOST_PP_REPEAT_1_131(m, d) m(2, 131, d) # define BOOST_PP_REPEAT_1_133(m, d) BOOST_PP_REPEAT_1_132(m, d) m(2, 132, d) # define BOOST_PP_REPEAT_1_134(m, d) BOOST_PP_REPEAT_1_133(m, d) m(2, 133, d) # define BOOST_PP_REPEAT_1_135(m, d) BOOST_PP_REPEAT_1_134(m, d) m(2, 134, d) # define BOOST_PP_REPEAT_1_136(m, d) BOOST_PP_REPEAT_1_135(m, d) m(2, 135, d) # define BOOST_PP_REPEAT_1_137(m, d) BOOST_PP_REPEAT_1_136(m, d) m(2, 136, d) # define BOOST_PP_REPEAT_1_138(m, d) BOOST_PP_REPEAT_1_137(m, d) m(2, 137, d) # define BOOST_PP_REPEAT_1_139(m, d) BOOST_PP_REPEAT_1_138(m, d) m(2, 138, d) # define BOOST_PP_REPEAT_1_140(m, d) BOOST_PP_REPEAT_1_139(m, d) m(2, 139, d) # define BOOST_PP_REPEAT_1_141(m, d) BOOST_PP_REPEAT_1_140(m, d) m(2, 140, d) # define BOOST_PP_REPEAT_1_142(m, d) BOOST_PP_REPEAT_1_141(m, d) m(2, 141, d) # define BOOST_PP_REPEAT_1_143(m, d) BOOST_PP_REPEAT_1_142(m, d) m(2, 142, d) # define BOOST_PP_REPEAT_1_144(m, d) BOOST_PP_REPEAT_1_143(m, d) m(2, 143, d) # define BOOST_PP_REPEAT_1_145(m, d) BOOST_PP_REPEAT_1_144(m, d) m(2, 144, d) # define BOOST_PP_REPEAT_1_146(m, d) BOOST_PP_REPEAT_1_145(m, d) m(2, 145, d) # define BOOST_PP_REPEAT_1_147(m, d) BOOST_PP_REPEAT_1_146(m, d) m(2, 146, d) # define BOOST_PP_REPEAT_1_148(m, d) BOOST_PP_REPEAT_1_147(m, d) m(2, 147, d) # define BOOST_PP_REPEAT_1_149(m, d) BOOST_PP_REPEAT_1_148(m, d) m(2, 148, d) # define BOOST_PP_REPEAT_1_150(m, d) BOOST_PP_REPEAT_1_149(m, d) m(2, 149, d) # define BOOST_PP_REPEAT_1_151(m, d) BOOST_PP_REPEAT_1_150(m, d) m(2, 150, d) # define BOOST_PP_REPEAT_1_152(m, d) BOOST_PP_REPEAT_1_151(m, d) m(2, 151, d) # define BOOST_PP_REPEAT_1_153(m, d) BOOST_PP_REPEAT_1_152(m, d) m(2, 152, d) # define BOOST_PP_REPEAT_1_154(m, d) BOOST_PP_REPEAT_1_153(m, d) m(2, 153, d) # define BOOST_PP_REPEAT_1_155(m, d) BOOST_PP_REPEAT_1_154(m, d) m(2, 154, d) # define BOOST_PP_REPEAT_1_156(m, d) BOOST_PP_REPEAT_1_155(m, d) m(2, 155, d) # define BOOST_PP_REPEAT_1_157(m, d) BOOST_PP_REPEAT_1_156(m, d) m(2, 156, d) # define BOOST_PP_REPEAT_1_158(m, d) BOOST_PP_REPEAT_1_157(m, d) m(2, 157, d) # define BOOST_PP_REPEAT_1_159(m, d) BOOST_PP_REPEAT_1_158(m, d) m(2, 158, d) # define BOOST_PP_REPEAT_1_160(m, d) BOOST_PP_REPEAT_1_159(m, d) m(2, 159, d) # define BOOST_PP_REPEAT_1_161(m, d) BOOST_PP_REPEAT_1_160(m, d) m(2, 160, d) # define BOOST_PP_REPEAT_1_162(m, d) BOOST_PP_REPEAT_1_161(m, d) m(2, 161, d) # define BOOST_PP_REPEAT_1_163(m, d) BOOST_PP_REPEAT_1_162(m, d) m(2, 162, d) # define BOOST_PP_REPEAT_1_164(m, d) BOOST_PP_REPEAT_1_163(m, d) m(2, 163, d) # define BOOST_PP_REPEAT_1_165(m, d) BOOST_PP_REPEAT_1_164(m, d) m(2, 164, d) # define BOOST_PP_REPEAT_1_166(m, d) BOOST_PP_REPEAT_1_165(m, d) m(2, 165, d) # define BOOST_PP_REPEAT_1_167(m, d) BOOST_PP_REPEAT_1_166(m, d) m(2, 166, d) # define BOOST_PP_REPEAT_1_168(m, d) BOOST_PP_REPEAT_1_167(m, d) m(2, 167, d) # define BOOST_PP_REPEAT_1_169(m, d) BOOST_PP_REPEAT_1_168(m, d) m(2, 168, d) # define BOOST_PP_REPEAT_1_170(m, d) BOOST_PP_REPEAT_1_169(m, d) m(2, 169, d) # define BOOST_PP_REPEAT_1_171(m, d) BOOST_PP_REPEAT_1_170(m, d) m(2, 170, d) # define BOOST_PP_REPEAT_1_172(m, d) BOOST_PP_REPEAT_1_171(m, d) m(2, 171, d) # define BOOST_PP_REPEAT_1_173(m, d) BOOST_PP_REPEAT_1_172(m, d) m(2, 172, d) # define BOOST_PP_REPEAT_1_174(m, d) BOOST_PP_REPEAT_1_173(m, d) m(2, 173, d) # define BOOST_PP_REPEAT_1_175(m, d) BOOST_PP_REPEAT_1_174(m, d) m(2, 174, d) # define BOOST_PP_REPEAT_1_176(m, d) BOOST_PP_REPEAT_1_175(m, d) m(2, 175, d) # define BOOST_PP_REPEAT_1_177(m, d) BOOST_PP_REPEAT_1_176(m, d) m(2, 176, d) # define BOOST_PP_REPEAT_1_178(m, d) BOOST_PP_REPEAT_1_177(m, d) m(2, 177, d) # define BOOST_PP_REPEAT_1_179(m, d) BOOST_PP_REPEAT_1_178(m, d) m(2, 178, d) # define BOOST_PP_REPEAT_1_180(m, d) BOOST_PP_REPEAT_1_179(m, d) m(2, 179, d) # define BOOST_PP_REPEAT_1_181(m, d) BOOST_PP_REPEAT_1_180(m, d) m(2, 180, d) # define BOOST_PP_REPEAT_1_182(m, d) BOOST_PP_REPEAT_1_181(m, d) m(2, 181, d) # define BOOST_PP_REPEAT_1_183(m, d) BOOST_PP_REPEAT_1_182(m, d) m(2, 182, d) # define BOOST_PP_REPEAT_1_184(m, d) BOOST_PP_REPEAT_1_183(m, d) m(2, 183, d) # define BOOST_PP_REPEAT_1_185(m, d) BOOST_PP_REPEAT_1_184(m, d) m(2, 184, d) # define BOOST_PP_REPEAT_1_186(m, d) BOOST_PP_REPEAT_1_185(m, d) m(2, 185, d) # define BOOST_PP_REPEAT_1_187(m, d) BOOST_PP_REPEAT_1_186(m, d) m(2, 186, d) # define BOOST_PP_REPEAT_1_188(m, d) BOOST_PP_REPEAT_1_187(m, d) m(2, 187, d) # define BOOST_PP_REPEAT_1_189(m, d) BOOST_PP_REPEAT_1_188(m, d) m(2, 188, d) # define BOOST_PP_REPEAT_1_190(m, d) BOOST_PP_REPEAT_1_189(m, d) m(2, 189, d) # define BOOST_PP_REPEAT_1_191(m, d) BOOST_PP_REPEAT_1_190(m, d) m(2, 190, d) # define BOOST_PP_REPEAT_1_192(m, d) BOOST_PP_REPEAT_1_191(m, d) m(2, 191, d) # define BOOST_PP_REPEAT_1_193(m, d) BOOST_PP_REPEAT_1_192(m, d) m(2, 192, d) # define BOOST_PP_REPEAT_1_194(m, d) BOOST_PP_REPEAT_1_193(m, d) m(2, 193, d) # define BOOST_PP_REPEAT_1_195(m, d) BOOST_PP_REPEAT_1_194(m, d) m(2, 194, d) # define BOOST_PP_REPEAT_1_196(m, d) BOOST_PP_REPEAT_1_195(m, d) m(2, 195, d) # define BOOST_PP_REPEAT_1_197(m, d) BOOST_PP_REPEAT_1_196(m, d) m(2, 196, d) # define BOOST_PP_REPEAT_1_198(m, d) BOOST_PP_REPEAT_1_197(m, d) m(2, 197, d) # define BOOST_PP_REPEAT_1_199(m, d) BOOST_PP_REPEAT_1_198(m, d) m(2, 198, d) # define BOOST_PP_REPEAT_1_200(m, d) BOOST_PP_REPEAT_1_199(m, d) m(2, 199, d) # define BOOST_PP_REPEAT_1_201(m, d) BOOST_PP_REPEAT_1_200(m, d) m(2, 200, d) # define BOOST_PP_REPEAT_1_202(m, d) BOOST_PP_REPEAT_1_201(m, d) m(2, 201, d) # define BOOST_PP_REPEAT_1_203(m, d) BOOST_PP_REPEAT_1_202(m, d) m(2, 202, d) # define BOOST_PP_REPEAT_1_204(m, d) BOOST_PP_REPEAT_1_203(m, d) m(2, 203, d) # define BOOST_PP_REPEAT_1_205(m, d) BOOST_PP_REPEAT_1_204(m, d) m(2, 204, d) # define BOOST_PP_REPEAT_1_206(m, d) BOOST_PP_REPEAT_1_205(m, d) m(2, 205, d) # define BOOST_PP_REPEAT_1_207(m, d) BOOST_PP_REPEAT_1_206(m, d) m(2, 206, d) # define BOOST_PP_REPEAT_1_208(m, d) BOOST_PP_REPEAT_1_207(m, d) m(2, 207, d) # define BOOST_PP_REPEAT_1_209(m, d) BOOST_PP_REPEAT_1_208(m, d) m(2, 208, d) # define BOOST_PP_REPEAT_1_210(m, d) BOOST_PP_REPEAT_1_209(m, d) m(2, 209, d) # define BOOST_PP_REPEAT_1_211(m, d) BOOST_PP_REPEAT_1_210(m, d) m(2, 210, d) # define BOOST_PP_REPEAT_1_212(m, d) BOOST_PP_REPEAT_1_211(m, d) m(2, 211, d) # define BOOST_PP_REPEAT_1_213(m, d) BOOST_PP_REPEAT_1_212(m, d) m(2, 212, d) # define BOOST_PP_REPEAT_1_214(m, d) BOOST_PP_REPEAT_1_213(m, d) m(2, 213, d) # define BOOST_PP_REPEAT_1_215(m, d) BOOST_PP_REPEAT_1_214(m, d) m(2, 214, d) # define BOOST_PP_REPEAT_1_216(m, d) BOOST_PP_REPEAT_1_215(m, d) m(2, 215, d) # define BOOST_PP_REPEAT_1_217(m, d) BOOST_PP_REPEAT_1_216(m, d) m(2, 216, d) # define BOOST_PP_REPEAT_1_218(m, d) BOOST_PP_REPEAT_1_217(m, d) m(2, 217, d) # define BOOST_PP_REPEAT_1_219(m, d) BOOST_PP_REPEAT_1_218(m, d) m(2, 218, d) # define BOOST_PP_REPEAT_1_220(m, d) BOOST_PP_REPEAT_1_219(m, d) m(2, 219, d) # define BOOST_PP_REPEAT_1_221(m, d) BOOST_PP_REPEAT_1_220(m, d) m(2, 220, d) # define BOOST_PP_REPEAT_1_222(m, d) BOOST_PP_REPEAT_1_221(m, d) m(2, 221, d) # define BOOST_PP_REPEAT_1_223(m, d) BOOST_PP_REPEAT_1_222(m, d) m(2, 222, d) # define BOOST_PP_REPEAT_1_224(m, d) BOOST_PP_REPEAT_1_223(m, d) m(2, 223, d) # define BOOST_PP_REPEAT_1_225(m, d) BOOST_PP_REPEAT_1_224(m, d) m(2, 224, d) # define BOOST_PP_REPEAT_1_226(m, d) BOOST_PP_REPEAT_1_225(m, d) m(2, 225, d) # define BOOST_PP_REPEAT_1_227(m, d) BOOST_PP_REPEAT_1_226(m, d) m(2, 226, d) # define BOOST_PP_REPEAT_1_228(m, d) BOOST_PP_REPEAT_1_227(m, d) m(2, 227, d) # define BOOST_PP_REPEAT_1_229(m, d) BOOST_PP_REPEAT_1_228(m, d) m(2, 228, d) # define BOOST_PP_REPEAT_1_230(m, d) BOOST_PP_REPEAT_1_229(m, d) m(2, 229, d) # define BOOST_PP_REPEAT_1_231(m, d) BOOST_PP_REPEAT_1_230(m, d) m(2, 230, d) # define BOOST_PP_REPEAT_1_232(m, d) BOOST_PP_REPEAT_1_231(m, d) m(2, 231, d) # define BOOST_PP_REPEAT_1_233(m, d) BOOST_PP_REPEAT_1_232(m, d) m(2, 232, d) # define BOOST_PP_REPEAT_1_234(m, d) BOOST_PP_REPEAT_1_233(m, d) m(2, 233, d) # define BOOST_PP_REPEAT_1_235(m, d) BOOST_PP_REPEAT_1_234(m, d) m(2, 234, d) # define BOOST_PP_REPEAT_1_236(m, d) BOOST_PP_REPEAT_1_235(m, d) m(2, 235, d) # define BOOST_PP_REPEAT_1_237(m, d) BOOST_PP_REPEAT_1_236(m, d) m(2, 236, d) # define BOOST_PP_REPEAT_1_238(m, d) BOOST_PP_REPEAT_1_237(m, d) m(2, 237, d) # define BOOST_PP_REPEAT_1_239(m, d) BOOST_PP_REPEAT_1_238(m, d) m(2, 238, d) # define BOOST_PP_REPEAT_1_240(m, d) BOOST_PP_REPEAT_1_239(m, d) m(2, 239, d) # define BOOST_PP_REPEAT_1_241(m, d) BOOST_PP_REPEAT_1_240(m, d) m(2, 240, d) # define BOOST_PP_REPEAT_1_242(m, d) BOOST_PP_REPEAT_1_241(m, d) m(2, 241, d) # define BOOST_PP_REPEAT_1_243(m, d) BOOST_PP_REPEAT_1_242(m, d) m(2, 242, d) # define BOOST_PP_REPEAT_1_244(m, d) BOOST_PP_REPEAT_1_243(m, d) m(2, 243, d) # define BOOST_PP_REPEAT_1_245(m, d) BOOST_PP_REPEAT_1_244(m, d) m(2, 244, d) # define BOOST_PP_REPEAT_1_246(m, d) BOOST_PP_REPEAT_1_245(m, d) m(2, 245, d) # define BOOST_PP_REPEAT_1_247(m, d) BOOST_PP_REPEAT_1_246(m, d) m(2, 246, d) # define BOOST_PP_REPEAT_1_248(m, d) BOOST_PP_REPEAT_1_247(m, d) m(2, 247, d) # define BOOST_PP_REPEAT_1_249(m, d) BOOST_PP_REPEAT_1_248(m, d) m(2, 248, d) # define BOOST_PP_REPEAT_1_250(m, d) BOOST_PP_REPEAT_1_249(m, d) m(2, 249, d) # define BOOST_PP_REPEAT_1_251(m, d) BOOST_PP_REPEAT_1_250(m, d) m(2, 250, d) # define BOOST_PP_REPEAT_1_252(m, d) BOOST_PP_REPEAT_1_251(m, d) m(2, 251, d) # define BOOST_PP_REPEAT_1_253(m, d) BOOST_PP_REPEAT_1_252(m, d) m(2, 252, d) # define BOOST_PP_REPEAT_1_254(m, d) BOOST_PP_REPEAT_1_253(m, d) m(2, 253, d) # define BOOST_PP_REPEAT_1_255(m, d) BOOST_PP_REPEAT_1_254(m, d) m(2, 254, d) # define BOOST_PP_REPEAT_1_256(m, d) BOOST_PP_REPEAT_1_255(m, d) m(2, 255, d) # # define BOOST_PP_REPEAT_2_0(m, d) # define BOOST_PP_REPEAT_2_1(m, d) m(3, 0, d) # define BOOST_PP_REPEAT_2_2(m, d) BOOST_PP_REPEAT_2_1(m, d) m(3, 1, d) # define BOOST_PP_REPEAT_2_3(m, d) BOOST_PP_REPEAT_2_2(m, d) m(3, 2, d) # define BOOST_PP_REPEAT_2_4(m, d) BOOST_PP_REPEAT_2_3(m, d) m(3, 3, d) # define BOOST_PP_REPEAT_2_5(m, d) BOOST_PP_REPEAT_2_4(m, d) m(3, 4, d) # define BOOST_PP_REPEAT_2_6(m, d) BOOST_PP_REPEAT_2_5(m, d) m(3, 5, d) # define BOOST_PP_REPEAT_2_7(m, d) BOOST_PP_REPEAT_2_6(m, d) m(3, 6, d) # define BOOST_PP_REPEAT_2_8(m, d) BOOST_PP_REPEAT_2_7(m, d) m(3, 7, d) # define BOOST_PP_REPEAT_2_9(m, d) BOOST_PP_REPEAT_2_8(m, d) m(3, 8, d) # define BOOST_PP_REPEAT_2_10(m, d) BOOST_PP_REPEAT_2_9(m, d) m(3, 9, d) # define BOOST_PP_REPEAT_2_11(m, d) BOOST_PP_REPEAT_2_10(m, d) m(3, 10, d) # define BOOST_PP_REPEAT_2_12(m, d) BOOST_PP_REPEAT_2_11(m, d) m(3, 11, d) # define BOOST_PP_REPEAT_2_13(m, d) BOOST_PP_REPEAT_2_12(m, d) m(3, 12, d) # define BOOST_PP_REPEAT_2_14(m, d) BOOST_PP_REPEAT_2_13(m, d) m(3, 13, d) # define BOOST_PP_REPEAT_2_15(m, d) BOOST_PP_REPEAT_2_14(m, d) m(3, 14, d) # define BOOST_PP_REPEAT_2_16(m, d) BOOST_PP_REPEAT_2_15(m, d) m(3, 15, d) # define BOOST_PP_REPEAT_2_17(m, d) BOOST_PP_REPEAT_2_16(m, d) m(3, 16, d) # define BOOST_PP_REPEAT_2_18(m, d) BOOST_PP_REPEAT_2_17(m, d) m(3, 17, d) # define BOOST_PP_REPEAT_2_19(m, d) BOOST_PP_REPEAT_2_18(m, d) m(3, 18, d) # define BOOST_PP_REPEAT_2_20(m, d) BOOST_PP_REPEAT_2_19(m, d) m(3, 19, d) # define BOOST_PP_REPEAT_2_21(m, d) BOOST_PP_REPEAT_2_20(m, d) m(3, 20, d) # define BOOST_PP_REPEAT_2_22(m, d) BOOST_PP_REPEAT_2_21(m, d) m(3, 21, d) # define BOOST_PP_REPEAT_2_23(m, d) BOOST_PP_REPEAT_2_22(m, d) m(3, 22, d) # define BOOST_PP_REPEAT_2_24(m, d) BOOST_PP_REPEAT_2_23(m, d) m(3, 23, d) # define BOOST_PP_REPEAT_2_25(m, d) BOOST_PP_REPEAT_2_24(m, d) m(3, 24, d) # define BOOST_PP_REPEAT_2_26(m, d) BOOST_PP_REPEAT_2_25(m, d) m(3, 25, d) # define BOOST_PP_REPEAT_2_27(m, d) BOOST_PP_REPEAT_2_26(m, d) m(3, 26, d) # define BOOST_PP_REPEAT_2_28(m, d) BOOST_PP_REPEAT_2_27(m, d) m(3, 27, d) # define BOOST_PP_REPEAT_2_29(m, d) BOOST_PP_REPEAT_2_28(m, d) m(3, 28, d) # define BOOST_PP_REPEAT_2_30(m, d) BOOST_PP_REPEAT_2_29(m, d) m(3, 29, d) # define BOOST_PP_REPEAT_2_31(m, d) BOOST_PP_REPEAT_2_30(m, d) m(3, 30, d) # define BOOST_PP_REPEAT_2_32(m, d) BOOST_PP_REPEAT_2_31(m, d) m(3, 31, d) # define BOOST_PP_REPEAT_2_33(m, d) BOOST_PP_REPEAT_2_32(m, d) m(3, 32, d) # define BOOST_PP_REPEAT_2_34(m, d) BOOST_PP_REPEAT_2_33(m, d) m(3, 33, d) # define BOOST_PP_REPEAT_2_35(m, d) BOOST_PP_REPEAT_2_34(m, d) m(3, 34, d) # define BOOST_PP_REPEAT_2_36(m, d) BOOST_PP_REPEAT_2_35(m, d) m(3, 35, d) # define BOOST_PP_REPEAT_2_37(m, d) BOOST_PP_REPEAT_2_36(m, d) m(3, 36, d) # define BOOST_PP_REPEAT_2_38(m, d) BOOST_PP_REPEAT_2_37(m, d) m(3, 37, d) # define BOOST_PP_REPEAT_2_39(m, d) BOOST_PP_REPEAT_2_38(m, d) m(3, 38, d) # define BOOST_PP_REPEAT_2_40(m, d) BOOST_PP_REPEAT_2_39(m, d) m(3, 39, d) # define BOOST_PP_REPEAT_2_41(m, d) BOOST_PP_REPEAT_2_40(m, d) m(3, 40, d) # define BOOST_PP_REPEAT_2_42(m, d) BOOST_PP_REPEAT_2_41(m, d) m(3, 41, d) # define BOOST_PP_REPEAT_2_43(m, d) BOOST_PP_REPEAT_2_42(m, d) m(3, 42, d) # define BOOST_PP_REPEAT_2_44(m, d) BOOST_PP_REPEAT_2_43(m, d) m(3, 43, d) # define BOOST_PP_REPEAT_2_45(m, d) BOOST_PP_REPEAT_2_44(m, d) m(3, 44, d) # define BOOST_PP_REPEAT_2_46(m, d) BOOST_PP_REPEAT_2_45(m, d) m(3, 45, d) # define BOOST_PP_REPEAT_2_47(m, d) BOOST_PP_REPEAT_2_46(m, d) m(3, 46, d) # define BOOST_PP_REPEAT_2_48(m, d) BOOST_PP_REPEAT_2_47(m, d) m(3, 47, d) # define BOOST_PP_REPEAT_2_49(m, d) BOOST_PP_REPEAT_2_48(m, d) m(3, 48, d) # define BOOST_PP_REPEAT_2_50(m, d) BOOST_PP_REPEAT_2_49(m, d) m(3, 49, d) # define BOOST_PP_REPEAT_2_51(m, d) BOOST_PP_REPEAT_2_50(m, d) m(3, 50, d) # define BOOST_PP_REPEAT_2_52(m, d) BOOST_PP_REPEAT_2_51(m, d) m(3, 51, d) # define BOOST_PP_REPEAT_2_53(m, d) BOOST_PP_REPEAT_2_52(m, d) m(3, 52, d) # define BOOST_PP_REPEAT_2_54(m, d) BOOST_PP_REPEAT_2_53(m, d) m(3, 53, d) # define BOOST_PP_REPEAT_2_55(m, d) BOOST_PP_REPEAT_2_54(m, d) m(3, 54, d) # define BOOST_PP_REPEAT_2_56(m, d) BOOST_PP_REPEAT_2_55(m, d) m(3, 55, d) # define BOOST_PP_REPEAT_2_57(m, d) BOOST_PP_REPEAT_2_56(m, d) m(3, 56, d) # define BOOST_PP_REPEAT_2_58(m, d) BOOST_PP_REPEAT_2_57(m, d) m(3, 57, d) # define BOOST_PP_REPEAT_2_59(m, d) BOOST_PP_REPEAT_2_58(m, d) m(3, 58, d) # define BOOST_PP_REPEAT_2_60(m, d) BOOST_PP_REPEAT_2_59(m, d) m(3, 59, d) # define BOOST_PP_REPEAT_2_61(m, d) BOOST_PP_REPEAT_2_60(m, d) m(3, 60, d) # define BOOST_PP_REPEAT_2_62(m, d) BOOST_PP_REPEAT_2_61(m, d) m(3, 61, d) # define BOOST_PP_REPEAT_2_63(m, d) BOOST_PP_REPEAT_2_62(m, d) m(3, 62, d) # define BOOST_PP_REPEAT_2_64(m, d) BOOST_PP_REPEAT_2_63(m, d) m(3, 63, d) # define BOOST_PP_REPEAT_2_65(m, d) BOOST_PP_REPEAT_2_64(m, d) m(3, 64, d) # define BOOST_PP_REPEAT_2_66(m, d) BOOST_PP_REPEAT_2_65(m, d) m(3, 65, d) # define BOOST_PP_REPEAT_2_67(m, d) BOOST_PP_REPEAT_2_66(m, d) m(3, 66, d) # define BOOST_PP_REPEAT_2_68(m, d) BOOST_PP_REPEAT_2_67(m, d) m(3, 67, d) # define BOOST_PP_REPEAT_2_69(m, d) BOOST_PP_REPEAT_2_68(m, d) m(3, 68, d) # define BOOST_PP_REPEAT_2_70(m, d) BOOST_PP_REPEAT_2_69(m, d) m(3, 69, d) # define BOOST_PP_REPEAT_2_71(m, d) BOOST_PP_REPEAT_2_70(m, d) m(3, 70, d) # define BOOST_PP_REPEAT_2_72(m, d) BOOST_PP_REPEAT_2_71(m, d) m(3, 71, d) # define BOOST_PP_REPEAT_2_73(m, d) BOOST_PP_REPEAT_2_72(m, d) m(3, 72, d) # define BOOST_PP_REPEAT_2_74(m, d) BOOST_PP_REPEAT_2_73(m, d) m(3, 73, d) # define BOOST_PP_REPEAT_2_75(m, d) BOOST_PP_REPEAT_2_74(m, d) m(3, 74, d) # define BOOST_PP_REPEAT_2_76(m, d) BOOST_PP_REPEAT_2_75(m, d) m(3, 75, d) # define BOOST_PP_REPEAT_2_77(m, d) BOOST_PP_REPEAT_2_76(m, d) m(3, 76, d) # define BOOST_PP_REPEAT_2_78(m, d) BOOST_PP_REPEAT_2_77(m, d) m(3, 77, d) # define BOOST_PP_REPEAT_2_79(m, d) BOOST_PP_REPEAT_2_78(m, d) m(3, 78, d) # define BOOST_PP_REPEAT_2_80(m, d) BOOST_PP_REPEAT_2_79(m, d) m(3, 79, d) # define BOOST_PP_REPEAT_2_81(m, d) BOOST_PP_REPEAT_2_80(m, d) m(3, 80, d) # define BOOST_PP_REPEAT_2_82(m, d) BOOST_PP_REPEAT_2_81(m, d) m(3, 81, d) # define BOOST_PP_REPEAT_2_83(m, d) BOOST_PP_REPEAT_2_82(m, d) m(3, 82, d) # define BOOST_PP_REPEAT_2_84(m, d) BOOST_PP_REPEAT_2_83(m, d) m(3, 83, d) # define BOOST_PP_REPEAT_2_85(m, d) BOOST_PP_REPEAT_2_84(m, d) m(3, 84, d) # define BOOST_PP_REPEAT_2_86(m, d) BOOST_PP_REPEAT_2_85(m, d) m(3, 85, d) # define BOOST_PP_REPEAT_2_87(m, d) BOOST_PP_REPEAT_2_86(m, d) m(3, 86, d) # define BOOST_PP_REPEAT_2_88(m, d) BOOST_PP_REPEAT_2_87(m, d) m(3, 87, d) # define BOOST_PP_REPEAT_2_89(m, d) BOOST_PP_REPEAT_2_88(m, d) m(3, 88, d) # define BOOST_PP_REPEAT_2_90(m, d) BOOST_PP_REPEAT_2_89(m, d) m(3, 89, d) # define BOOST_PP_REPEAT_2_91(m, d) BOOST_PP_REPEAT_2_90(m, d) m(3, 90, d) # define BOOST_PP_REPEAT_2_92(m, d) BOOST_PP_REPEAT_2_91(m, d) m(3, 91, d) # define BOOST_PP_REPEAT_2_93(m, d) BOOST_PP_REPEAT_2_92(m, d) m(3, 92, d) # define BOOST_PP_REPEAT_2_94(m, d) BOOST_PP_REPEAT_2_93(m, d) m(3, 93, d) # define BOOST_PP_REPEAT_2_95(m, d) BOOST_PP_REPEAT_2_94(m, d) m(3, 94, d) # define BOOST_PP_REPEAT_2_96(m, d) BOOST_PP_REPEAT_2_95(m, d) m(3, 95, d) # define BOOST_PP_REPEAT_2_97(m, d) BOOST_PP_REPEAT_2_96(m, d) m(3, 96, d) # define BOOST_PP_REPEAT_2_98(m, d) BOOST_PP_REPEAT_2_97(m, d) m(3, 97, d) # define BOOST_PP_REPEAT_2_99(m, d) BOOST_PP_REPEAT_2_98(m, d) m(3, 98, d) # define BOOST_PP_REPEAT_2_100(m, d) BOOST_PP_REPEAT_2_99(m, d) m(3, 99, d) # define BOOST_PP_REPEAT_2_101(m, d) BOOST_PP_REPEAT_2_100(m, d) m(3, 100, d) # define BOOST_PP_REPEAT_2_102(m, d) BOOST_PP_REPEAT_2_101(m, d) m(3, 101, d) # define BOOST_PP_REPEAT_2_103(m, d) BOOST_PP_REPEAT_2_102(m, d) m(3, 102, d) # define BOOST_PP_REPEAT_2_104(m, d) BOOST_PP_REPEAT_2_103(m, d) m(3, 103, d) # define BOOST_PP_REPEAT_2_105(m, d) BOOST_PP_REPEAT_2_104(m, d) m(3, 104, d) # define BOOST_PP_REPEAT_2_106(m, d) BOOST_PP_REPEAT_2_105(m, d) m(3, 105, d) # define BOOST_PP_REPEAT_2_107(m, d) BOOST_PP_REPEAT_2_106(m, d) m(3, 106, d) # define BOOST_PP_REPEAT_2_108(m, d) BOOST_PP_REPEAT_2_107(m, d) m(3, 107, d) # define BOOST_PP_REPEAT_2_109(m, d) BOOST_PP_REPEAT_2_108(m, d) m(3, 108, d) # define BOOST_PP_REPEAT_2_110(m, d) BOOST_PP_REPEAT_2_109(m, d) m(3, 109, d) # define BOOST_PP_REPEAT_2_111(m, d) BOOST_PP_REPEAT_2_110(m, d) m(3, 110, d) # define BOOST_PP_REPEAT_2_112(m, d) BOOST_PP_REPEAT_2_111(m, d) m(3, 111, d) # define BOOST_PP_REPEAT_2_113(m, d) BOOST_PP_REPEAT_2_112(m, d) m(3, 112, d) # define BOOST_PP_REPEAT_2_114(m, d) BOOST_PP_REPEAT_2_113(m, d) m(3, 113, d) # define BOOST_PP_REPEAT_2_115(m, d) BOOST_PP_REPEAT_2_114(m, d) m(3, 114, d) # define BOOST_PP_REPEAT_2_116(m, d) BOOST_PP_REPEAT_2_115(m, d) m(3, 115, d) # define BOOST_PP_REPEAT_2_117(m, d) BOOST_PP_REPEAT_2_116(m, d) m(3, 116, d) # define BOOST_PP_REPEAT_2_118(m, d) BOOST_PP_REPEAT_2_117(m, d) m(3, 117, d) # define BOOST_PP_REPEAT_2_119(m, d) BOOST_PP_REPEAT_2_118(m, d) m(3, 118, d) # define BOOST_PP_REPEAT_2_120(m, d) BOOST_PP_REPEAT_2_119(m, d) m(3, 119, d) # define BOOST_PP_REPEAT_2_121(m, d) BOOST_PP_REPEAT_2_120(m, d) m(3, 120, d) # define BOOST_PP_REPEAT_2_122(m, d) BOOST_PP_REPEAT_2_121(m, d) m(3, 121, d) # define BOOST_PP_REPEAT_2_123(m, d) BOOST_PP_REPEAT_2_122(m, d) m(3, 122, d) # define BOOST_PP_REPEAT_2_124(m, d) BOOST_PP_REPEAT_2_123(m, d) m(3, 123, d) # define BOOST_PP_REPEAT_2_125(m, d) BOOST_PP_REPEAT_2_124(m, d) m(3, 124, d) # define BOOST_PP_REPEAT_2_126(m, d) BOOST_PP_REPEAT_2_125(m, d) m(3, 125, d) # define BOOST_PP_REPEAT_2_127(m, d) BOOST_PP_REPEAT_2_126(m, d) m(3, 126, d) # define BOOST_PP_REPEAT_2_128(m, d) BOOST_PP_REPEAT_2_127(m, d) m(3, 127, d) # define BOOST_PP_REPEAT_2_129(m, d) BOOST_PP_REPEAT_2_128(m, d) m(3, 128, d) # define BOOST_PP_REPEAT_2_130(m, d) BOOST_PP_REPEAT_2_129(m, d) m(3, 129, d) # define BOOST_PP_REPEAT_2_131(m, d) BOOST_PP_REPEAT_2_130(m, d) m(3, 130, d) # define BOOST_PP_REPEAT_2_132(m, d) BOOST_PP_REPEAT_2_131(m, d) m(3, 131, d) # define BOOST_PP_REPEAT_2_133(m, d) BOOST_PP_REPEAT_2_132(m, d) m(3, 132, d) # define BOOST_PP_REPEAT_2_134(m, d) BOOST_PP_REPEAT_2_133(m, d) m(3, 133, d) # define BOOST_PP_REPEAT_2_135(m, d) BOOST_PP_REPEAT_2_134(m, d) m(3, 134, d) # define BOOST_PP_REPEAT_2_136(m, d) BOOST_PP_REPEAT_2_135(m, d) m(3, 135, d) # define BOOST_PP_REPEAT_2_137(m, d) BOOST_PP_REPEAT_2_136(m, d) m(3, 136, d) # define BOOST_PP_REPEAT_2_138(m, d) BOOST_PP_REPEAT_2_137(m, d) m(3, 137, d) # define BOOST_PP_REPEAT_2_139(m, d) BOOST_PP_REPEAT_2_138(m, d) m(3, 138, d) # define BOOST_PP_REPEAT_2_140(m, d) BOOST_PP_REPEAT_2_139(m, d) m(3, 139, d) # define BOOST_PP_REPEAT_2_141(m, d) BOOST_PP_REPEAT_2_140(m, d) m(3, 140, d) # define BOOST_PP_REPEAT_2_142(m, d) BOOST_PP_REPEAT_2_141(m, d) m(3, 141, d) # define BOOST_PP_REPEAT_2_143(m, d) BOOST_PP_REPEAT_2_142(m, d) m(3, 142, d) # define BOOST_PP_REPEAT_2_144(m, d) BOOST_PP_REPEAT_2_143(m, d) m(3, 143, d) # define BOOST_PP_REPEAT_2_145(m, d) BOOST_PP_REPEAT_2_144(m, d) m(3, 144, d) # define BOOST_PP_REPEAT_2_146(m, d) BOOST_PP_REPEAT_2_145(m, d) m(3, 145, d) # define BOOST_PP_REPEAT_2_147(m, d) BOOST_PP_REPEAT_2_146(m, d) m(3, 146, d) # define BOOST_PP_REPEAT_2_148(m, d) BOOST_PP_REPEAT_2_147(m, d) m(3, 147, d) # define BOOST_PP_REPEAT_2_149(m, d) BOOST_PP_REPEAT_2_148(m, d) m(3, 148, d) # define BOOST_PP_REPEAT_2_150(m, d) BOOST_PP_REPEAT_2_149(m, d) m(3, 149, d) # define BOOST_PP_REPEAT_2_151(m, d) BOOST_PP_REPEAT_2_150(m, d) m(3, 150, d) # define BOOST_PP_REPEAT_2_152(m, d) BOOST_PP_REPEAT_2_151(m, d) m(3, 151, d) # define BOOST_PP_REPEAT_2_153(m, d) BOOST_PP_REPEAT_2_152(m, d) m(3, 152, d) # define BOOST_PP_REPEAT_2_154(m, d) BOOST_PP_REPEAT_2_153(m, d) m(3, 153, d) # define BOOST_PP_REPEAT_2_155(m, d) BOOST_PP_REPEAT_2_154(m, d) m(3, 154, d) # define BOOST_PP_REPEAT_2_156(m, d) BOOST_PP_REPEAT_2_155(m, d) m(3, 155, d) # define BOOST_PP_REPEAT_2_157(m, d) BOOST_PP_REPEAT_2_156(m, d) m(3, 156, d) # define BOOST_PP_REPEAT_2_158(m, d) BOOST_PP_REPEAT_2_157(m, d) m(3, 157, d) # define BOOST_PP_REPEAT_2_159(m, d) BOOST_PP_REPEAT_2_158(m, d) m(3, 158, d) # define BOOST_PP_REPEAT_2_160(m, d) BOOST_PP_REPEAT_2_159(m, d) m(3, 159, d) # define BOOST_PP_REPEAT_2_161(m, d) BOOST_PP_REPEAT_2_160(m, d) m(3, 160, d) # define BOOST_PP_REPEAT_2_162(m, d) BOOST_PP_REPEAT_2_161(m, d) m(3, 161, d) # define BOOST_PP_REPEAT_2_163(m, d) BOOST_PP_REPEAT_2_162(m, d) m(3, 162, d) # define BOOST_PP_REPEAT_2_164(m, d) BOOST_PP_REPEAT_2_163(m, d) m(3, 163, d) # define BOOST_PP_REPEAT_2_165(m, d) BOOST_PP_REPEAT_2_164(m, d) m(3, 164, d) # define BOOST_PP_REPEAT_2_166(m, d) BOOST_PP_REPEAT_2_165(m, d) m(3, 165, d) # define BOOST_PP_REPEAT_2_167(m, d) BOOST_PP_REPEAT_2_166(m, d) m(3, 166, d) # define BOOST_PP_REPEAT_2_168(m, d) BOOST_PP_REPEAT_2_167(m, d) m(3, 167, d) # define BOOST_PP_REPEAT_2_169(m, d) BOOST_PP_REPEAT_2_168(m, d) m(3, 168, d) # define BOOST_PP_REPEAT_2_170(m, d) BOOST_PP_REPEAT_2_169(m, d) m(3, 169, d) # define BOOST_PP_REPEAT_2_171(m, d) BOOST_PP_REPEAT_2_170(m, d) m(3, 170, d) # define BOOST_PP_REPEAT_2_172(m, d) BOOST_PP_REPEAT_2_171(m, d) m(3, 171, d) # define BOOST_PP_REPEAT_2_173(m, d) BOOST_PP_REPEAT_2_172(m, d) m(3, 172, d) # define BOOST_PP_REPEAT_2_174(m, d) BOOST_PP_REPEAT_2_173(m, d) m(3, 173, d) # define BOOST_PP_REPEAT_2_175(m, d) BOOST_PP_REPEAT_2_174(m, d) m(3, 174, d) # define BOOST_PP_REPEAT_2_176(m, d) BOOST_PP_REPEAT_2_175(m, d) m(3, 175, d) # define BOOST_PP_REPEAT_2_177(m, d) BOOST_PP_REPEAT_2_176(m, d) m(3, 176, d) # define BOOST_PP_REPEAT_2_178(m, d) BOOST_PP_REPEAT_2_177(m, d) m(3, 177, d) # define BOOST_PP_REPEAT_2_179(m, d) BOOST_PP_REPEAT_2_178(m, d) m(3, 178, d) # define BOOST_PP_REPEAT_2_180(m, d) BOOST_PP_REPEAT_2_179(m, d) m(3, 179, d) # define BOOST_PP_REPEAT_2_181(m, d) BOOST_PP_REPEAT_2_180(m, d) m(3, 180, d) # define BOOST_PP_REPEAT_2_182(m, d) BOOST_PP_REPEAT_2_181(m, d) m(3, 181, d) # define BOOST_PP_REPEAT_2_183(m, d) BOOST_PP_REPEAT_2_182(m, d) m(3, 182, d) # define BOOST_PP_REPEAT_2_184(m, d) BOOST_PP_REPEAT_2_183(m, d) m(3, 183, d) # define BOOST_PP_REPEAT_2_185(m, d) BOOST_PP_REPEAT_2_184(m, d) m(3, 184, d) # define BOOST_PP_REPEAT_2_186(m, d) BOOST_PP_REPEAT_2_185(m, d) m(3, 185, d) # define BOOST_PP_REPEAT_2_187(m, d) BOOST_PP_REPEAT_2_186(m, d) m(3, 186, d) # define BOOST_PP_REPEAT_2_188(m, d) BOOST_PP_REPEAT_2_187(m, d) m(3, 187, d) # define BOOST_PP_REPEAT_2_189(m, d) BOOST_PP_REPEAT_2_188(m, d) m(3, 188, d) # define BOOST_PP_REPEAT_2_190(m, d) BOOST_PP_REPEAT_2_189(m, d) m(3, 189, d) # define BOOST_PP_REPEAT_2_191(m, d) BOOST_PP_REPEAT_2_190(m, d) m(3, 190, d) # define BOOST_PP_REPEAT_2_192(m, d) BOOST_PP_REPEAT_2_191(m, d) m(3, 191, d) # define BOOST_PP_REPEAT_2_193(m, d) BOOST_PP_REPEAT_2_192(m, d) m(3, 192, d) # define BOOST_PP_REPEAT_2_194(m, d) BOOST_PP_REPEAT_2_193(m, d) m(3, 193, d) # define BOOST_PP_REPEAT_2_195(m, d) BOOST_PP_REPEAT_2_194(m, d) m(3, 194, d) # define BOOST_PP_REPEAT_2_196(m, d) BOOST_PP_REPEAT_2_195(m, d) m(3, 195, d) # define BOOST_PP_REPEAT_2_197(m, d) BOOST_PP_REPEAT_2_196(m, d) m(3, 196, d) # define BOOST_PP_REPEAT_2_198(m, d) BOOST_PP_REPEAT_2_197(m, d) m(3, 197, d) # define BOOST_PP_REPEAT_2_199(m, d) BOOST_PP_REPEAT_2_198(m, d) m(3, 198, d) # define BOOST_PP_REPEAT_2_200(m, d) BOOST_PP_REPEAT_2_199(m, d) m(3, 199, d) # define BOOST_PP_REPEAT_2_201(m, d) BOOST_PP_REPEAT_2_200(m, d) m(3, 200, d) # define BOOST_PP_REPEAT_2_202(m, d) BOOST_PP_REPEAT_2_201(m, d) m(3, 201, d) # define BOOST_PP_REPEAT_2_203(m, d) BOOST_PP_REPEAT_2_202(m, d) m(3, 202, d) # define BOOST_PP_REPEAT_2_204(m, d) BOOST_PP_REPEAT_2_203(m, d) m(3, 203, d) # define BOOST_PP_REPEAT_2_205(m, d) BOOST_PP_REPEAT_2_204(m, d) m(3, 204, d) # define BOOST_PP_REPEAT_2_206(m, d) BOOST_PP_REPEAT_2_205(m, d) m(3, 205, d) # define BOOST_PP_REPEAT_2_207(m, d) BOOST_PP_REPEAT_2_206(m, d) m(3, 206, d) # define BOOST_PP_REPEAT_2_208(m, d) BOOST_PP_REPEAT_2_207(m, d) m(3, 207, d) # define BOOST_PP_REPEAT_2_209(m, d) BOOST_PP_REPEAT_2_208(m, d) m(3, 208, d) # define BOOST_PP_REPEAT_2_210(m, d) BOOST_PP_REPEAT_2_209(m, d) m(3, 209, d) # define BOOST_PP_REPEAT_2_211(m, d) BOOST_PP_REPEAT_2_210(m, d) m(3, 210, d) # define BOOST_PP_REPEAT_2_212(m, d) BOOST_PP_REPEAT_2_211(m, d) m(3, 211, d) # define BOOST_PP_REPEAT_2_213(m, d) BOOST_PP_REPEAT_2_212(m, d) m(3, 212, d) # define BOOST_PP_REPEAT_2_214(m, d) BOOST_PP_REPEAT_2_213(m, d) m(3, 213, d) # define BOOST_PP_REPEAT_2_215(m, d) BOOST_PP_REPEAT_2_214(m, d) m(3, 214, d) # define BOOST_PP_REPEAT_2_216(m, d) BOOST_PP_REPEAT_2_215(m, d) m(3, 215, d) # define BOOST_PP_REPEAT_2_217(m, d) BOOST_PP_REPEAT_2_216(m, d) m(3, 216, d) # define BOOST_PP_REPEAT_2_218(m, d) BOOST_PP_REPEAT_2_217(m, d) m(3, 217, d) # define BOOST_PP_REPEAT_2_219(m, d) BOOST_PP_REPEAT_2_218(m, d) m(3, 218, d) # define BOOST_PP_REPEAT_2_220(m, d) BOOST_PP_REPEAT_2_219(m, d) m(3, 219, d) # define BOOST_PP_REPEAT_2_221(m, d) BOOST_PP_REPEAT_2_220(m, d) m(3, 220, d) # define BOOST_PP_REPEAT_2_222(m, d) BOOST_PP_REPEAT_2_221(m, d) m(3, 221, d) # define BOOST_PP_REPEAT_2_223(m, d) BOOST_PP_REPEAT_2_222(m, d) m(3, 222, d) # define BOOST_PP_REPEAT_2_224(m, d) BOOST_PP_REPEAT_2_223(m, d) m(3, 223, d) # define BOOST_PP_REPEAT_2_225(m, d) BOOST_PP_REPEAT_2_224(m, d) m(3, 224, d) # define BOOST_PP_REPEAT_2_226(m, d) BOOST_PP_REPEAT_2_225(m, d) m(3, 225, d) # define BOOST_PP_REPEAT_2_227(m, d) BOOST_PP_REPEAT_2_226(m, d) m(3, 226, d) # define BOOST_PP_REPEAT_2_228(m, d) BOOST_PP_REPEAT_2_227(m, d) m(3, 227, d) # define BOOST_PP_REPEAT_2_229(m, d) BOOST_PP_REPEAT_2_228(m, d) m(3, 228, d) # define BOOST_PP_REPEAT_2_230(m, d) BOOST_PP_REPEAT_2_229(m, d) m(3, 229, d) # define BOOST_PP_REPEAT_2_231(m, d) BOOST_PP_REPEAT_2_230(m, d) m(3, 230, d) # define BOOST_PP_REPEAT_2_232(m, d) BOOST_PP_REPEAT_2_231(m, d) m(3, 231, d) # define BOOST_PP_REPEAT_2_233(m, d) BOOST_PP_REPEAT_2_232(m, d) m(3, 232, d) # define BOOST_PP_REPEAT_2_234(m, d) BOOST_PP_REPEAT_2_233(m, d) m(3, 233, d) # define BOOST_PP_REPEAT_2_235(m, d) BOOST_PP_REPEAT_2_234(m, d) m(3, 234, d) # define BOOST_PP_REPEAT_2_236(m, d) BOOST_PP_REPEAT_2_235(m, d) m(3, 235, d) # define BOOST_PP_REPEAT_2_237(m, d) BOOST_PP_REPEAT_2_236(m, d) m(3, 236, d) # define BOOST_PP_REPEAT_2_238(m, d) BOOST_PP_REPEAT_2_237(m, d) m(3, 237, d) # define BOOST_PP_REPEAT_2_239(m, d) BOOST_PP_REPEAT_2_238(m, d) m(3, 238, d) # define BOOST_PP_REPEAT_2_240(m, d) BOOST_PP_REPEAT_2_239(m, d) m(3, 239, d) # define BOOST_PP_REPEAT_2_241(m, d) BOOST_PP_REPEAT_2_240(m, d) m(3, 240, d) # define BOOST_PP_REPEAT_2_242(m, d) BOOST_PP_REPEAT_2_241(m, d) m(3, 241, d) # define BOOST_PP_REPEAT_2_243(m, d) BOOST_PP_REPEAT_2_242(m, d) m(3, 242, d) # define BOOST_PP_REPEAT_2_244(m, d) BOOST_PP_REPEAT_2_243(m, d) m(3, 243, d) # define BOOST_PP_REPEAT_2_245(m, d) BOOST_PP_REPEAT_2_244(m, d) m(3, 244, d) # define BOOST_PP_REPEAT_2_246(m, d) BOOST_PP_REPEAT_2_245(m, d) m(3, 245, d) # define BOOST_PP_REPEAT_2_247(m, d) BOOST_PP_REPEAT_2_246(m, d) m(3, 246, d) # define BOOST_PP_REPEAT_2_248(m, d) BOOST_PP_REPEAT_2_247(m, d) m(3, 247, d) # define BOOST_PP_REPEAT_2_249(m, d) BOOST_PP_REPEAT_2_248(m, d) m(3, 248, d) # define BOOST_PP_REPEAT_2_250(m, d) BOOST_PP_REPEAT_2_249(m, d) m(3, 249, d) # define BOOST_PP_REPEAT_2_251(m, d) BOOST_PP_REPEAT_2_250(m, d) m(3, 250, d) # define BOOST_PP_REPEAT_2_252(m, d) BOOST_PP_REPEAT_2_251(m, d) m(3, 251, d) # define BOOST_PP_REPEAT_2_253(m, d) BOOST_PP_REPEAT_2_252(m, d) m(3, 252, d) # define BOOST_PP_REPEAT_2_254(m, d) BOOST_PP_REPEAT_2_253(m, d) m(3, 253, d) # define BOOST_PP_REPEAT_2_255(m, d) BOOST_PP_REPEAT_2_254(m, d) m(3, 254, d) # define BOOST_PP_REPEAT_2_256(m, d) BOOST_PP_REPEAT_2_255(m, d) m(3, 255, d) # # define BOOST_PP_REPEAT_3_0(m, d) # define BOOST_PP_REPEAT_3_1(m, d) m(4, 0, d) # define BOOST_PP_REPEAT_3_2(m, d) BOOST_PP_REPEAT_3_1(m, d) m(4, 1, d) # define BOOST_PP_REPEAT_3_3(m, d) BOOST_PP_REPEAT_3_2(m, d) m(4, 2, d) # define BOOST_PP_REPEAT_3_4(m, d) BOOST_PP_REPEAT_3_3(m, d) m(4, 3, d) # define BOOST_PP_REPEAT_3_5(m, d) BOOST_PP_REPEAT_3_4(m, d) m(4, 4, d) # define BOOST_PP_REPEAT_3_6(m, d) BOOST_PP_REPEAT_3_5(m, d) m(4, 5, d) # define BOOST_PP_REPEAT_3_7(m, d) BOOST_PP_REPEAT_3_6(m, d) m(4, 6, d) # define BOOST_PP_REPEAT_3_8(m, d) BOOST_PP_REPEAT_3_7(m, d) m(4, 7, d) # define BOOST_PP_REPEAT_3_9(m, d) BOOST_PP_REPEAT_3_8(m, d) m(4, 8, d) # define BOOST_PP_REPEAT_3_10(m, d) BOOST_PP_REPEAT_3_9(m, d) m(4, 9, d) # define BOOST_PP_REPEAT_3_11(m, d) BOOST_PP_REPEAT_3_10(m, d) m(4, 10, d) # define BOOST_PP_REPEAT_3_12(m, d) BOOST_PP_REPEAT_3_11(m, d) m(4, 11, d) # define BOOST_PP_REPEAT_3_13(m, d) BOOST_PP_REPEAT_3_12(m, d) m(4, 12, d) # define BOOST_PP_REPEAT_3_14(m, d) BOOST_PP_REPEAT_3_13(m, d) m(4, 13, d) # define BOOST_PP_REPEAT_3_15(m, d) BOOST_PP_REPEAT_3_14(m, d) m(4, 14, d) # define BOOST_PP_REPEAT_3_16(m, d) BOOST_PP_REPEAT_3_15(m, d) m(4, 15, d) # define BOOST_PP_REPEAT_3_17(m, d) BOOST_PP_REPEAT_3_16(m, d) m(4, 16, d) # define BOOST_PP_REPEAT_3_18(m, d) BOOST_PP_REPEAT_3_17(m, d) m(4, 17, d) # define BOOST_PP_REPEAT_3_19(m, d) BOOST_PP_REPEAT_3_18(m, d) m(4, 18, d) # define BOOST_PP_REPEAT_3_20(m, d) BOOST_PP_REPEAT_3_19(m, d) m(4, 19, d) # define BOOST_PP_REPEAT_3_21(m, d) BOOST_PP_REPEAT_3_20(m, d) m(4, 20, d) # define BOOST_PP_REPEAT_3_22(m, d) BOOST_PP_REPEAT_3_21(m, d) m(4, 21, d) # define BOOST_PP_REPEAT_3_23(m, d) BOOST_PP_REPEAT_3_22(m, d) m(4, 22, d) # define BOOST_PP_REPEAT_3_24(m, d) BOOST_PP_REPEAT_3_23(m, d) m(4, 23, d) # define BOOST_PP_REPEAT_3_25(m, d) BOOST_PP_REPEAT_3_24(m, d) m(4, 24, d) # define BOOST_PP_REPEAT_3_26(m, d) BOOST_PP_REPEAT_3_25(m, d) m(4, 25, d) # define BOOST_PP_REPEAT_3_27(m, d) BOOST_PP_REPEAT_3_26(m, d) m(4, 26, d) # define BOOST_PP_REPEAT_3_28(m, d) BOOST_PP_REPEAT_3_27(m, d) m(4, 27, d) # define BOOST_PP_REPEAT_3_29(m, d) BOOST_PP_REPEAT_3_28(m, d) m(4, 28, d) # define BOOST_PP_REPEAT_3_30(m, d) BOOST_PP_REPEAT_3_29(m, d) m(4, 29, d) # define BOOST_PP_REPEAT_3_31(m, d) BOOST_PP_REPEAT_3_30(m, d) m(4, 30, d) # define BOOST_PP_REPEAT_3_32(m, d) BOOST_PP_REPEAT_3_31(m, d) m(4, 31, d) # define BOOST_PP_REPEAT_3_33(m, d) BOOST_PP_REPEAT_3_32(m, d) m(4, 32, d) # define BOOST_PP_REPEAT_3_34(m, d) BOOST_PP_REPEAT_3_33(m, d) m(4, 33, d) # define BOOST_PP_REPEAT_3_35(m, d) BOOST_PP_REPEAT_3_34(m, d) m(4, 34, d) # define BOOST_PP_REPEAT_3_36(m, d) BOOST_PP_REPEAT_3_35(m, d) m(4, 35, d) # define BOOST_PP_REPEAT_3_37(m, d) BOOST_PP_REPEAT_3_36(m, d) m(4, 36, d) # define BOOST_PP_REPEAT_3_38(m, d) BOOST_PP_REPEAT_3_37(m, d) m(4, 37, d) # define BOOST_PP_REPEAT_3_39(m, d) BOOST_PP_REPEAT_3_38(m, d) m(4, 38, d) # define BOOST_PP_REPEAT_3_40(m, d) BOOST_PP_REPEAT_3_39(m, d) m(4, 39, d) # define BOOST_PP_REPEAT_3_41(m, d) BOOST_PP_REPEAT_3_40(m, d) m(4, 40, d) # define BOOST_PP_REPEAT_3_42(m, d) BOOST_PP_REPEAT_3_41(m, d) m(4, 41, d) # define BOOST_PP_REPEAT_3_43(m, d) BOOST_PP_REPEAT_3_42(m, d) m(4, 42, d) # define BOOST_PP_REPEAT_3_44(m, d) BOOST_PP_REPEAT_3_43(m, d) m(4, 43, d) # define BOOST_PP_REPEAT_3_45(m, d) BOOST_PP_REPEAT_3_44(m, d) m(4, 44, d) # define BOOST_PP_REPEAT_3_46(m, d) BOOST_PP_REPEAT_3_45(m, d) m(4, 45, d) # define BOOST_PP_REPEAT_3_47(m, d) BOOST_PP_REPEAT_3_46(m, d) m(4, 46, d) # define BOOST_PP_REPEAT_3_48(m, d) BOOST_PP_REPEAT_3_47(m, d) m(4, 47, d) # define BOOST_PP_REPEAT_3_49(m, d) BOOST_PP_REPEAT_3_48(m, d) m(4, 48, d) # define BOOST_PP_REPEAT_3_50(m, d) BOOST_PP_REPEAT_3_49(m, d) m(4, 49, d) # define BOOST_PP_REPEAT_3_51(m, d) BOOST_PP_REPEAT_3_50(m, d) m(4, 50, d) # define BOOST_PP_REPEAT_3_52(m, d) BOOST_PP_REPEAT_3_51(m, d) m(4, 51, d) # define BOOST_PP_REPEAT_3_53(m, d) BOOST_PP_REPEAT_3_52(m, d) m(4, 52, d) # define BOOST_PP_REPEAT_3_54(m, d) BOOST_PP_REPEAT_3_53(m, d) m(4, 53, d) # define BOOST_PP_REPEAT_3_55(m, d) BOOST_PP_REPEAT_3_54(m, d) m(4, 54, d) # define BOOST_PP_REPEAT_3_56(m, d) BOOST_PP_REPEAT_3_55(m, d) m(4, 55, d) # define BOOST_PP_REPEAT_3_57(m, d) BOOST_PP_REPEAT_3_56(m, d) m(4, 56, d) # define BOOST_PP_REPEAT_3_58(m, d) BOOST_PP_REPEAT_3_57(m, d) m(4, 57, d) # define BOOST_PP_REPEAT_3_59(m, d) BOOST_PP_REPEAT_3_58(m, d) m(4, 58, d) # define BOOST_PP_REPEAT_3_60(m, d) BOOST_PP_REPEAT_3_59(m, d) m(4, 59, d) # define BOOST_PP_REPEAT_3_61(m, d) BOOST_PP_REPEAT_3_60(m, d) m(4, 60, d) # define BOOST_PP_REPEAT_3_62(m, d) BOOST_PP_REPEAT_3_61(m, d) m(4, 61, d) # define BOOST_PP_REPEAT_3_63(m, d) BOOST_PP_REPEAT_3_62(m, d) m(4, 62, d) # define BOOST_PP_REPEAT_3_64(m, d) BOOST_PP_REPEAT_3_63(m, d) m(4, 63, d) # define BOOST_PP_REPEAT_3_65(m, d) BOOST_PP_REPEAT_3_64(m, d) m(4, 64, d) # define BOOST_PP_REPEAT_3_66(m, d) BOOST_PP_REPEAT_3_65(m, d) m(4, 65, d) # define BOOST_PP_REPEAT_3_67(m, d) BOOST_PP_REPEAT_3_66(m, d) m(4, 66, d) # define BOOST_PP_REPEAT_3_68(m, d) BOOST_PP_REPEAT_3_67(m, d) m(4, 67, d) # define BOOST_PP_REPEAT_3_69(m, d) BOOST_PP_REPEAT_3_68(m, d) m(4, 68, d) # define BOOST_PP_REPEAT_3_70(m, d) BOOST_PP_REPEAT_3_69(m, d) m(4, 69, d) # define BOOST_PP_REPEAT_3_71(m, d) BOOST_PP_REPEAT_3_70(m, d) m(4, 70, d) # define BOOST_PP_REPEAT_3_72(m, d) BOOST_PP_REPEAT_3_71(m, d) m(4, 71, d) # define BOOST_PP_REPEAT_3_73(m, d) BOOST_PP_REPEAT_3_72(m, d) m(4, 72, d) # define BOOST_PP_REPEAT_3_74(m, d) BOOST_PP_REPEAT_3_73(m, d) m(4, 73, d) # define BOOST_PP_REPEAT_3_75(m, d) BOOST_PP_REPEAT_3_74(m, d) m(4, 74, d) # define BOOST_PP_REPEAT_3_76(m, d) BOOST_PP_REPEAT_3_75(m, d) m(4, 75, d) # define BOOST_PP_REPEAT_3_77(m, d) BOOST_PP_REPEAT_3_76(m, d) m(4, 76, d) # define BOOST_PP_REPEAT_3_78(m, d) BOOST_PP_REPEAT_3_77(m, d) m(4, 77, d) # define BOOST_PP_REPEAT_3_79(m, d) BOOST_PP_REPEAT_3_78(m, d) m(4, 78, d) # define BOOST_PP_REPEAT_3_80(m, d) BOOST_PP_REPEAT_3_79(m, d) m(4, 79, d) # define BOOST_PP_REPEAT_3_81(m, d) BOOST_PP_REPEAT_3_80(m, d) m(4, 80, d) # define BOOST_PP_REPEAT_3_82(m, d) BOOST_PP_REPEAT_3_81(m, d) m(4, 81, d) # define BOOST_PP_REPEAT_3_83(m, d) BOOST_PP_REPEAT_3_82(m, d) m(4, 82, d) # define BOOST_PP_REPEAT_3_84(m, d) BOOST_PP_REPEAT_3_83(m, d) m(4, 83, d) # define BOOST_PP_REPEAT_3_85(m, d) BOOST_PP_REPEAT_3_84(m, d) m(4, 84, d) # define BOOST_PP_REPEAT_3_86(m, d) BOOST_PP_REPEAT_3_85(m, d) m(4, 85, d) # define BOOST_PP_REPEAT_3_87(m, d) BOOST_PP_REPEAT_3_86(m, d) m(4, 86, d) # define BOOST_PP_REPEAT_3_88(m, d) BOOST_PP_REPEAT_3_87(m, d) m(4, 87, d) # define BOOST_PP_REPEAT_3_89(m, d) BOOST_PP_REPEAT_3_88(m, d) m(4, 88, d) # define BOOST_PP_REPEAT_3_90(m, d) BOOST_PP_REPEAT_3_89(m, d) m(4, 89, d) # define BOOST_PP_REPEAT_3_91(m, d) BOOST_PP_REPEAT_3_90(m, d) m(4, 90, d) # define BOOST_PP_REPEAT_3_92(m, d) BOOST_PP_REPEAT_3_91(m, d) m(4, 91, d) # define BOOST_PP_REPEAT_3_93(m, d) BOOST_PP_REPEAT_3_92(m, d) m(4, 92, d) # define BOOST_PP_REPEAT_3_94(m, d) BOOST_PP_REPEAT_3_93(m, d) m(4, 93, d) # define BOOST_PP_REPEAT_3_95(m, d) BOOST_PP_REPEAT_3_94(m, d) m(4, 94, d) # define BOOST_PP_REPEAT_3_96(m, d) BOOST_PP_REPEAT_3_95(m, d) m(4, 95, d) # define BOOST_PP_REPEAT_3_97(m, d) BOOST_PP_REPEAT_3_96(m, d) m(4, 96, d) # define BOOST_PP_REPEAT_3_98(m, d) BOOST_PP_REPEAT_3_97(m, d) m(4, 97, d) # define BOOST_PP_REPEAT_3_99(m, d) BOOST_PP_REPEAT_3_98(m, d) m(4, 98, d) # define BOOST_PP_REPEAT_3_100(m, d) BOOST_PP_REPEAT_3_99(m, d) m(4, 99, d) # define BOOST_PP_REPEAT_3_101(m, d) BOOST_PP_REPEAT_3_100(m, d) m(4, 100, d) # define BOOST_PP_REPEAT_3_102(m, d) BOOST_PP_REPEAT_3_101(m, d) m(4, 101, d) # define BOOST_PP_REPEAT_3_103(m, d) BOOST_PP_REPEAT_3_102(m, d) m(4, 102, d) # define BOOST_PP_REPEAT_3_104(m, d) BOOST_PP_REPEAT_3_103(m, d) m(4, 103, d) # define BOOST_PP_REPEAT_3_105(m, d) BOOST_PP_REPEAT_3_104(m, d) m(4, 104, d) # define BOOST_PP_REPEAT_3_106(m, d) BOOST_PP_REPEAT_3_105(m, d) m(4, 105, d) # define BOOST_PP_REPEAT_3_107(m, d) BOOST_PP_REPEAT_3_106(m, d) m(4, 106, d) # define BOOST_PP_REPEAT_3_108(m, d) BOOST_PP_REPEAT_3_107(m, d) m(4, 107, d) # define BOOST_PP_REPEAT_3_109(m, d) BOOST_PP_REPEAT_3_108(m, d) m(4, 108, d) # define BOOST_PP_REPEAT_3_110(m, d) BOOST_PP_REPEAT_3_109(m, d) m(4, 109, d) # define BOOST_PP_REPEAT_3_111(m, d) BOOST_PP_REPEAT_3_110(m, d) m(4, 110, d) # define BOOST_PP_REPEAT_3_112(m, d) BOOST_PP_REPEAT_3_111(m, d) m(4, 111, d) # define BOOST_PP_REPEAT_3_113(m, d) BOOST_PP_REPEAT_3_112(m, d) m(4, 112, d) # define BOOST_PP_REPEAT_3_114(m, d) BOOST_PP_REPEAT_3_113(m, d) m(4, 113, d) # define BOOST_PP_REPEAT_3_115(m, d) BOOST_PP_REPEAT_3_114(m, d) m(4, 114, d) # define BOOST_PP_REPEAT_3_116(m, d) BOOST_PP_REPEAT_3_115(m, d) m(4, 115, d) # define BOOST_PP_REPEAT_3_117(m, d) BOOST_PP_REPEAT_3_116(m, d) m(4, 116, d) # define BOOST_PP_REPEAT_3_118(m, d) BOOST_PP_REPEAT_3_117(m, d) m(4, 117, d) # define BOOST_PP_REPEAT_3_119(m, d) BOOST_PP_REPEAT_3_118(m, d) m(4, 118, d) # define BOOST_PP_REPEAT_3_120(m, d) BOOST_PP_REPEAT_3_119(m, d) m(4, 119, d) # define BOOST_PP_REPEAT_3_121(m, d) BOOST_PP_REPEAT_3_120(m, d) m(4, 120, d) # define BOOST_PP_REPEAT_3_122(m, d) BOOST_PP_REPEAT_3_121(m, d) m(4, 121, d) # define BOOST_PP_REPEAT_3_123(m, d) BOOST_PP_REPEAT_3_122(m, d) m(4, 122, d) # define BOOST_PP_REPEAT_3_124(m, d) BOOST_PP_REPEAT_3_123(m, d) m(4, 123, d) # define BOOST_PP_REPEAT_3_125(m, d) BOOST_PP_REPEAT_3_124(m, d) m(4, 124, d) # define BOOST_PP_REPEAT_3_126(m, d) BOOST_PP_REPEAT_3_125(m, d) m(4, 125, d) # define BOOST_PP_REPEAT_3_127(m, d) BOOST_PP_REPEAT_3_126(m, d) m(4, 126, d) # define BOOST_PP_REPEAT_3_128(m, d) BOOST_PP_REPEAT_3_127(m, d) m(4, 127, d) # define BOOST_PP_REPEAT_3_129(m, d) BOOST_PP_REPEAT_3_128(m, d) m(4, 128, d) # define BOOST_PP_REPEAT_3_130(m, d) BOOST_PP_REPEAT_3_129(m, d) m(4, 129, d) # define BOOST_PP_REPEAT_3_131(m, d) BOOST_PP_REPEAT_3_130(m, d) m(4, 130, d) # define BOOST_PP_REPEAT_3_132(m, d) BOOST_PP_REPEAT_3_131(m, d) m(4, 131, d) # define BOOST_PP_REPEAT_3_133(m, d) BOOST_PP_REPEAT_3_132(m, d) m(4, 132, d) # define BOOST_PP_REPEAT_3_134(m, d) BOOST_PP_REPEAT_3_133(m, d) m(4, 133, d) # define BOOST_PP_REPEAT_3_135(m, d) BOOST_PP_REPEAT_3_134(m, d) m(4, 134, d) # define BOOST_PP_REPEAT_3_136(m, d) BOOST_PP_REPEAT_3_135(m, d) m(4, 135, d) # define BOOST_PP_REPEAT_3_137(m, d) BOOST_PP_REPEAT_3_136(m, d) m(4, 136, d) # define BOOST_PP_REPEAT_3_138(m, d) BOOST_PP_REPEAT_3_137(m, d) m(4, 137, d) # define BOOST_PP_REPEAT_3_139(m, d) BOOST_PP_REPEAT_3_138(m, d) m(4, 138, d) # define BOOST_PP_REPEAT_3_140(m, d) BOOST_PP_REPEAT_3_139(m, d) m(4, 139, d) # define BOOST_PP_REPEAT_3_141(m, d) BOOST_PP_REPEAT_3_140(m, d) m(4, 140, d) # define BOOST_PP_REPEAT_3_142(m, d) BOOST_PP_REPEAT_3_141(m, d) m(4, 141, d) # define BOOST_PP_REPEAT_3_143(m, d) BOOST_PP_REPEAT_3_142(m, d) m(4, 142, d) # define BOOST_PP_REPEAT_3_144(m, d) BOOST_PP_REPEAT_3_143(m, d) m(4, 143, d) # define BOOST_PP_REPEAT_3_145(m, d) BOOST_PP_REPEAT_3_144(m, d) m(4, 144, d) # define BOOST_PP_REPEAT_3_146(m, d) BOOST_PP_REPEAT_3_145(m, d) m(4, 145, d) # define BOOST_PP_REPEAT_3_147(m, d) BOOST_PP_REPEAT_3_146(m, d) m(4, 146, d) # define BOOST_PP_REPEAT_3_148(m, d) BOOST_PP_REPEAT_3_147(m, d) m(4, 147, d) # define BOOST_PP_REPEAT_3_149(m, d) BOOST_PP_REPEAT_3_148(m, d) m(4, 148, d) # define BOOST_PP_REPEAT_3_150(m, d) BOOST_PP_REPEAT_3_149(m, d) m(4, 149, d) # define BOOST_PP_REPEAT_3_151(m, d) BOOST_PP_REPEAT_3_150(m, d) m(4, 150, d) # define BOOST_PP_REPEAT_3_152(m, d) BOOST_PP_REPEAT_3_151(m, d) m(4, 151, d) # define BOOST_PP_REPEAT_3_153(m, d) BOOST_PP_REPEAT_3_152(m, d) m(4, 152, d) # define BOOST_PP_REPEAT_3_154(m, d) BOOST_PP_REPEAT_3_153(m, d) m(4, 153, d) # define BOOST_PP_REPEAT_3_155(m, d) BOOST_PP_REPEAT_3_154(m, d) m(4, 154, d) # define BOOST_PP_REPEAT_3_156(m, d) BOOST_PP_REPEAT_3_155(m, d) m(4, 155, d) # define BOOST_PP_REPEAT_3_157(m, d) BOOST_PP_REPEAT_3_156(m, d) m(4, 156, d) # define BOOST_PP_REPEAT_3_158(m, d) BOOST_PP_REPEAT_3_157(m, d) m(4, 157, d) # define BOOST_PP_REPEAT_3_159(m, d) BOOST_PP_REPEAT_3_158(m, d) m(4, 158, d) # define BOOST_PP_REPEAT_3_160(m, d) BOOST_PP_REPEAT_3_159(m, d) m(4, 159, d) # define BOOST_PP_REPEAT_3_161(m, d) BOOST_PP_REPEAT_3_160(m, d) m(4, 160, d) # define BOOST_PP_REPEAT_3_162(m, d) BOOST_PP_REPEAT_3_161(m, d) m(4, 161, d) # define BOOST_PP_REPEAT_3_163(m, d) BOOST_PP_REPEAT_3_162(m, d) m(4, 162, d) # define BOOST_PP_REPEAT_3_164(m, d) BOOST_PP_REPEAT_3_163(m, d) m(4, 163, d) # define BOOST_PP_REPEAT_3_165(m, d) BOOST_PP_REPEAT_3_164(m, d) m(4, 164, d) # define BOOST_PP_REPEAT_3_166(m, d) BOOST_PP_REPEAT_3_165(m, d) m(4, 165, d) # define BOOST_PP_REPEAT_3_167(m, d) BOOST_PP_REPEAT_3_166(m, d) m(4, 166, d) # define BOOST_PP_REPEAT_3_168(m, d) BOOST_PP_REPEAT_3_167(m, d) m(4, 167, d) # define BOOST_PP_REPEAT_3_169(m, d) BOOST_PP_REPEAT_3_168(m, d) m(4, 168, d) # define BOOST_PP_REPEAT_3_170(m, d) BOOST_PP_REPEAT_3_169(m, d) m(4, 169, d) # define BOOST_PP_REPEAT_3_171(m, d) BOOST_PP_REPEAT_3_170(m, d) m(4, 170, d) # define BOOST_PP_REPEAT_3_172(m, d) BOOST_PP_REPEAT_3_171(m, d) m(4, 171, d) # define BOOST_PP_REPEAT_3_173(m, d) BOOST_PP_REPEAT_3_172(m, d) m(4, 172, d) # define BOOST_PP_REPEAT_3_174(m, d) BOOST_PP_REPEAT_3_173(m, d) m(4, 173, d) # define BOOST_PP_REPEAT_3_175(m, d) BOOST_PP_REPEAT_3_174(m, d) m(4, 174, d) # define BOOST_PP_REPEAT_3_176(m, d) BOOST_PP_REPEAT_3_175(m, d) m(4, 175, d) # define BOOST_PP_REPEAT_3_177(m, d) BOOST_PP_REPEAT_3_176(m, d) m(4, 176, d) # define BOOST_PP_REPEAT_3_178(m, d) BOOST_PP_REPEAT_3_177(m, d) m(4, 177, d) # define BOOST_PP_REPEAT_3_179(m, d) BOOST_PP_REPEAT_3_178(m, d) m(4, 178, d) # define BOOST_PP_REPEAT_3_180(m, d) BOOST_PP_REPEAT_3_179(m, d) m(4, 179, d) # define BOOST_PP_REPEAT_3_181(m, d) BOOST_PP_REPEAT_3_180(m, d) m(4, 180, d) # define BOOST_PP_REPEAT_3_182(m, d) BOOST_PP_REPEAT_3_181(m, d) m(4, 181, d) # define BOOST_PP_REPEAT_3_183(m, d) BOOST_PP_REPEAT_3_182(m, d) m(4, 182, d) # define BOOST_PP_REPEAT_3_184(m, d) BOOST_PP_REPEAT_3_183(m, d) m(4, 183, d) # define BOOST_PP_REPEAT_3_185(m, d) BOOST_PP_REPEAT_3_184(m, d) m(4, 184, d) # define BOOST_PP_REPEAT_3_186(m, d) BOOST_PP_REPEAT_3_185(m, d) m(4, 185, d) # define BOOST_PP_REPEAT_3_187(m, d) BOOST_PP_REPEAT_3_186(m, d) m(4, 186, d) # define BOOST_PP_REPEAT_3_188(m, d) BOOST_PP_REPEAT_3_187(m, d) m(4, 187, d) # define BOOST_PP_REPEAT_3_189(m, d) BOOST_PP_REPEAT_3_188(m, d) m(4, 188, d) # define BOOST_PP_REPEAT_3_190(m, d) BOOST_PP_REPEAT_3_189(m, d) m(4, 189, d) # define BOOST_PP_REPEAT_3_191(m, d) BOOST_PP_REPEAT_3_190(m, d) m(4, 190, d) # define BOOST_PP_REPEAT_3_192(m, d) BOOST_PP_REPEAT_3_191(m, d) m(4, 191, d) # define BOOST_PP_REPEAT_3_193(m, d) BOOST_PP_REPEAT_3_192(m, d) m(4, 192, d) # define BOOST_PP_REPEAT_3_194(m, d) BOOST_PP_REPEAT_3_193(m, d) m(4, 193, d) # define BOOST_PP_REPEAT_3_195(m, d) BOOST_PP_REPEAT_3_194(m, d) m(4, 194, d) # define BOOST_PP_REPEAT_3_196(m, d) BOOST_PP_REPEAT_3_195(m, d) m(4, 195, d) # define BOOST_PP_REPEAT_3_197(m, d) BOOST_PP_REPEAT_3_196(m, d) m(4, 196, d) # define BOOST_PP_REPEAT_3_198(m, d) BOOST_PP_REPEAT_3_197(m, d) m(4, 197, d) # define BOOST_PP_REPEAT_3_199(m, d) BOOST_PP_REPEAT_3_198(m, d) m(4, 198, d) # define BOOST_PP_REPEAT_3_200(m, d) BOOST_PP_REPEAT_3_199(m, d) m(4, 199, d) # define BOOST_PP_REPEAT_3_201(m, d) BOOST_PP_REPEAT_3_200(m, d) m(4, 200, d) # define BOOST_PP_REPEAT_3_202(m, d) BOOST_PP_REPEAT_3_201(m, d) m(4, 201, d) # define BOOST_PP_REPEAT_3_203(m, d) BOOST_PP_REPEAT_3_202(m, d) m(4, 202, d) # define BOOST_PP_REPEAT_3_204(m, d) BOOST_PP_REPEAT_3_203(m, d) m(4, 203, d) # define BOOST_PP_REPEAT_3_205(m, d) BOOST_PP_REPEAT_3_204(m, d) m(4, 204, d) # define BOOST_PP_REPEAT_3_206(m, d) BOOST_PP_REPEAT_3_205(m, d) m(4, 205, d) # define BOOST_PP_REPEAT_3_207(m, d) BOOST_PP_REPEAT_3_206(m, d) m(4, 206, d) # define BOOST_PP_REPEAT_3_208(m, d) BOOST_PP_REPEAT_3_207(m, d) m(4, 207, d) # define BOOST_PP_REPEAT_3_209(m, d) BOOST_PP_REPEAT_3_208(m, d) m(4, 208, d) # define BOOST_PP_REPEAT_3_210(m, d) BOOST_PP_REPEAT_3_209(m, d) m(4, 209, d) # define BOOST_PP_REPEAT_3_211(m, d) BOOST_PP_REPEAT_3_210(m, d) m(4, 210, d) # define BOOST_PP_REPEAT_3_212(m, d) BOOST_PP_REPEAT_3_211(m, d) m(4, 211, d) # define BOOST_PP_REPEAT_3_213(m, d) BOOST_PP_REPEAT_3_212(m, d) m(4, 212, d) # define BOOST_PP_REPEAT_3_214(m, d) BOOST_PP_REPEAT_3_213(m, d) m(4, 213, d) # define BOOST_PP_REPEAT_3_215(m, d) BOOST_PP_REPEAT_3_214(m, d) m(4, 214, d) # define BOOST_PP_REPEAT_3_216(m, d) BOOST_PP_REPEAT_3_215(m, d) m(4, 215, d) # define BOOST_PP_REPEAT_3_217(m, d) BOOST_PP_REPEAT_3_216(m, d) m(4, 216, d) # define BOOST_PP_REPEAT_3_218(m, d) BOOST_PP_REPEAT_3_217(m, d) m(4, 217, d) # define BOOST_PP_REPEAT_3_219(m, d) BOOST_PP_REPEAT_3_218(m, d) m(4, 218, d) # define BOOST_PP_REPEAT_3_220(m, d) BOOST_PP_REPEAT_3_219(m, d) m(4, 219, d) # define BOOST_PP_REPEAT_3_221(m, d) BOOST_PP_REPEAT_3_220(m, d) m(4, 220, d) # define BOOST_PP_REPEAT_3_222(m, d) BOOST_PP_REPEAT_3_221(m, d) m(4, 221, d) # define BOOST_PP_REPEAT_3_223(m, d) BOOST_PP_REPEAT_3_222(m, d) m(4, 222, d) # define BOOST_PP_REPEAT_3_224(m, d) BOOST_PP_REPEAT_3_223(m, d) m(4, 223, d) # define BOOST_PP_REPEAT_3_225(m, d) BOOST_PP_REPEAT_3_224(m, d) m(4, 224, d) # define BOOST_PP_REPEAT_3_226(m, d) BOOST_PP_REPEAT_3_225(m, d) m(4, 225, d) # define BOOST_PP_REPEAT_3_227(m, d) BOOST_PP_REPEAT_3_226(m, d) m(4, 226, d) # define BOOST_PP_REPEAT_3_228(m, d) BOOST_PP_REPEAT_3_227(m, d) m(4, 227, d) # define BOOST_PP_REPEAT_3_229(m, d) BOOST_PP_REPEAT_3_228(m, d) m(4, 228, d) # define BOOST_PP_REPEAT_3_230(m, d) BOOST_PP_REPEAT_3_229(m, d) m(4, 229, d) # define BOOST_PP_REPEAT_3_231(m, d) BOOST_PP_REPEAT_3_230(m, d) m(4, 230, d) # define BOOST_PP_REPEAT_3_232(m, d) BOOST_PP_REPEAT_3_231(m, d) m(4, 231, d) # define BOOST_PP_REPEAT_3_233(m, d) BOOST_PP_REPEAT_3_232(m, d) m(4, 232, d) # define BOOST_PP_REPEAT_3_234(m, d) BOOST_PP_REPEAT_3_233(m, d) m(4, 233, d) # define BOOST_PP_REPEAT_3_235(m, d) BOOST_PP_REPEAT_3_234(m, d) m(4, 234, d) # define BOOST_PP_REPEAT_3_236(m, d) BOOST_PP_REPEAT_3_235(m, d) m(4, 235, d) # define BOOST_PP_REPEAT_3_237(m, d) BOOST_PP_REPEAT_3_236(m, d) m(4, 236, d) # define BOOST_PP_REPEAT_3_238(m, d) BOOST_PP_REPEAT_3_237(m, d) m(4, 237, d) # define BOOST_PP_REPEAT_3_239(m, d) BOOST_PP_REPEAT_3_238(m, d) m(4, 238, d) # define BOOST_PP_REPEAT_3_240(m, d) BOOST_PP_REPEAT_3_239(m, d) m(4, 239, d) # define BOOST_PP_REPEAT_3_241(m, d) BOOST_PP_REPEAT_3_240(m, d) m(4, 240, d) # define BOOST_PP_REPEAT_3_242(m, d) BOOST_PP_REPEAT_3_241(m, d) m(4, 241, d) # define BOOST_PP_REPEAT_3_243(m, d) BOOST_PP_REPEAT_3_242(m, d) m(4, 242, d) # define BOOST_PP_REPEAT_3_244(m, d) BOOST_PP_REPEAT_3_243(m, d) m(4, 243, d) # define BOOST_PP_REPEAT_3_245(m, d) BOOST_PP_REPEAT_3_244(m, d) m(4, 244, d) # define BOOST_PP_REPEAT_3_246(m, d) BOOST_PP_REPEAT_3_245(m, d) m(4, 245, d) # define BOOST_PP_REPEAT_3_247(m, d) BOOST_PP_REPEAT_3_246(m, d) m(4, 246, d) # define BOOST_PP_REPEAT_3_248(m, d) BOOST_PP_REPEAT_3_247(m, d) m(4, 247, d) # define BOOST_PP_REPEAT_3_249(m, d) BOOST_PP_REPEAT_3_248(m, d) m(4, 248, d) # define BOOST_PP_REPEAT_3_250(m, d) BOOST_PP_REPEAT_3_249(m, d) m(4, 249, d) # define BOOST_PP_REPEAT_3_251(m, d) BOOST_PP_REPEAT_3_250(m, d) m(4, 250, d) # define BOOST_PP_REPEAT_3_252(m, d) BOOST_PP_REPEAT_3_251(m, d) m(4, 251, d) # define BOOST_PP_REPEAT_3_253(m, d) BOOST_PP_REPEAT_3_252(m, d) m(4, 252, d) # define BOOST_PP_REPEAT_3_254(m, d) BOOST_PP_REPEAT_3_253(m, d) m(4, 253, d) # define BOOST_PP_REPEAT_3_255(m, d) BOOST_PP_REPEAT_3_254(m, d) m(4, 254, d) # define BOOST_PP_REPEAT_3_256(m, d) BOOST_PP_REPEAT_3_255(m, d) m(4, 255, d) # # endif passenger-4.0.37/ext/boost/preprocessor/repetition/repeat_from_to.hpp000644 000765 000024 00000012212 12233035540 026566 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_REPEAT_FROM_TO_HPP # define BOOST_PREPROCESSOR_REPETITION_REPEAT_FROM_TO_HPP # # include # include # include # include # include # include # include # include # include # include # # /* BOOST_PP_REPEAT_FROM_TO */ # # if 0 # define BOOST_PP_REPEAT_FROM_TO(first, last, macro, data) # endif # # define BOOST_PP_REPEAT_FROM_TO BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) # # define BOOST_PP_REPEAT_FROM_TO_1(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_1(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt) # define BOOST_PP_REPEAT_FROM_TO_2(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_2(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt) # define BOOST_PP_REPEAT_FROM_TO_3(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_3(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt) # define BOOST_PP_REPEAT_FROM_TO_4(f, l, m, dt) BOOST_PP_ERROR(0x0003) # # define BOOST_PP_REPEAT_FROM_TO_1ST BOOST_PP_REPEAT_FROM_TO_1 # define BOOST_PP_REPEAT_FROM_TO_2ND BOOST_PP_REPEAT_FROM_TO_2 # define BOOST_PP_REPEAT_FROM_TO_3RD BOOST_PP_REPEAT_FROM_TO_3 # # /* BOOST_PP_REPEAT_FROM_TO_D */ # # if 0 # define BOOST_PP_REPEAT_FROM_TO_D(d, first, last, macro, data) # endif # # define BOOST_PP_REPEAT_FROM_TO_D BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_D_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_REPEAT_FROM_TO_D_1(d, f, l, m, dt) BOOST_PP_REPEAT_1(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_1, (d, f, m, dt)) # define BOOST_PP_REPEAT_FROM_TO_D_2(d, f, l, m, dt) BOOST_PP_REPEAT_2(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_2, (d, f, m, dt)) # define BOOST_PP_REPEAT_FROM_TO_D_3(d, f, l, m, dt) BOOST_PP_REPEAT_3(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_3, (d, f, m, dt)) # else # define BOOST_PP_REPEAT_FROM_TO_D_1(d, f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_1_I(d, f, l, m, dt) # define BOOST_PP_REPEAT_FROM_TO_D_2(d, f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_2_I(d, f, l, m, dt) # define BOOST_PP_REPEAT_FROM_TO_D_3(d, f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_3_I(d, f, l, m, dt) # define BOOST_PP_REPEAT_FROM_TO_D_1_I(d, f, l, m, dt) BOOST_PP_REPEAT_1(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_1, (d, f, m, dt)) # define BOOST_PP_REPEAT_FROM_TO_D_2_I(d, f, l, m, dt) BOOST_PP_REPEAT_2(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_2, (d, f, m, dt)) # define BOOST_PP_REPEAT_FROM_TO_D_3_I(d, f, l, m, dt) BOOST_PP_REPEAT_3(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_3, (d, f, m, dt)) # endif # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_REPEAT_FROM_TO_M_1(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_1_IM(z, n, BOOST_PP_TUPLE_REM_4 dfmd) # define BOOST_PP_REPEAT_FROM_TO_M_2(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_2_IM(z, n, BOOST_PP_TUPLE_REM_4 dfmd) # define BOOST_PP_REPEAT_FROM_TO_M_3(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_3_IM(z, n, BOOST_PP_TUPLE_REM_4 dfmd) # define BOOST_PP_REPEAT_FROM_TO_M_1_IM(z, n, im) BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, im) # define BOOST_PP_REPEAT_FROM_TO_M_2_IM(z, n, im) BOOST_PP_REPEAT_FROM_TO_M_2_I(z, n, im) # define BOOST_PP_REPEAT_FROM_TO_M_3_IM(z, n, im) BOOST_PP_REPEAT_FROM_TO_M_3_I(z, n, im) # else # define BOOST_PP_REPEAT_FROM_TO_M_1(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(4, 0, dfmd), BOOST_PP_TUPLE_ELEM(4, 1, dfmd), BOOST_PP_TUPLE_ELEM(4, 2, dfmd), BOOST_PP_TUPLE_ELEM(4, 3, dfmd)) # define BOOST_PP_REPEAT_FROM_TO_M_2(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(4, 0, dfmd), BOOST_PP_TUPLE_ELEM(4, 1, dfmd), BOOST_PP_TUPLE_ELEM(4, 2, dfmd), BOOST_PP_TUPLE_ELEM(4, 3, dfmd)) # define BOOST_PP_REPEAT_FROM_TO_M_3(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(4, 0, dfmd), BOOST_PP_TUPLE_ELEM(4, 1, dfmd), BOOST_PP_TUPLE_ELEM(4, 2, dfmd), BOOST_PP_TUPLE_ELEM(4, 3, dfmd)) # endif # # define BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_1_II(z, BOOST_PP_ADD_D(d, n, f), m, dt) # define BOOST_PP_REPEAT_FROM_TO_M_2_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_2_II(z, BOOST_PP_ADD_D(d, n, f), m, dt) # define BOOST_PP_REPEAT_FROM_TO_M_3_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_3_II(z, BOOST_PP_ADD_D(d, n, f), m, dt) # # define BOOST_PP_REPEAT_FROM_TO_M_1_II(z, n, m, dt) m(z, n, dt) # define BOOST_PP_REPEAT_FROM_TO_M_2_II(z, n, m, dt) m(z, n, dt) # define BOOST_PP_REPEAT_FROM_TO_M_3_II(z, n, m, dt) m(z, n, dt) # # endif passenger-4.0.37/ext/boost/preprocessor/repetition/detail/for.hpp000644 000765 000024 00000216263 12233035540 025625 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP # define BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP # # include # include # include # include # # define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_FOR_1_C(BOOST_PP_BOOL(p(2, s)), s, p, o, m) # define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_FOR_2_C(BOOST_PP_BOOL(p(3, s)), s, p, o, m) # define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_FOR_3_C(BOOST_PP_BOOL(p(4, s)), s, p, o, m) # define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_FOR_4_C(BOOST_PP_BOOL(p(5, s)), s, p, o, m) # define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_FOR_5_C(BOOST_PP_BOOL(p(6, s)), s, p, o, m) # define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_FOR_6_C(BOOST_PP_BOOL(p(7, s)), s, p, o, m) # define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_FOR_7_C(BOOST_PP_BOOL(p(8, s)), s, p, o, m) # define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_FOR_8_C(BOOST_PP_BOOL(p(9, s)), s, p, o, m) # define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_FOR_9_C(BOOST_PP_BOOL(p(10, s)), s, p, o, m) # define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_FOR_10_C(BOOST_PP_BOOL(p(11, s)), s, p, o, m) # define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_FOR_11_C(BOOST_PP_BOOL(p(12, s)), s, p, o, m) # define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_FOR_12_C(BOOST_PP_BOOL(p(13, s)), s, p, o, m) # define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_FOR_13_C(BOOST_PP_BOOL(p(14, s)), s, p, o, m) # define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_FOR_14_C(BOOST_PP_BOOL(p(15, s)), s, p, o, m) # define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_FOR_15_C(BOOST_PP_BOOL(p(16, s)), s, p, o, m) # define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_FOR_16_C(BOOST_PP_BOOL(p(17, s)), s, p, o, m) # define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_FOR_17_C(BOOST_PP_BOOL(p(18, s)), s, p, o, m) # define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_FOR_18_C(BOOST_PP_BOOL(p(19, s)), s, p, o, m) # define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_FOR_19_C(BOOST_PP_BOOL(p(20, s)), s, p, o, m) # define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_FOR_20_C(BOOST_PP_BOOL(p(21, s)), s, p, o, m) # define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_FOR_21_C(BOOST_PP_BOOL(p(22, s)), s, p, o, m) # define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_FOR_22_C(BOOST_PP_BOOL(p(23, s)), s, p, o, m) # define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_FOR_23_C(BOOST_PP_BOOL(p(24, s)), s, p, o, m) # define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_FOR_24_C(BOOST_PP_BOOL(p(25, s)), s, p, o, m) # define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_FOR_25_C(BOOST_PP_BOOL(p(26, s)), s, p, o, m) # define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_FOR_26_C(BOOST_PP_BOOL(p(27, s)), s, p, o, m) # define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_FOR_27_C(BOOST_PP_BOOL(p(28, s)), s, p, o, m) # define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_FOR_28_C(BOOST_PP_BOOL(p(29, s)), s, p, o, m) # define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_FOR_29_C(BOOST_PP_BOOL(p(30, s)), s, p, o, m) # define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_FOR_30_C(BOOST_PP_BOOL(p(31, s)), s, p, o, m) # define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_FOR_31_C(BOOST_PP_BOOL(p(32, s)), s, p, o, m) # define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_FOR_32_C(BOOST_PP_BOOL(p(33, s)), s, p, o, m) # define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_FOR_33_C(BOOST_PP_BOOL(p(34, s)), s, p, o, m) # define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_FOR_34_C(BOOST_PP_BOOL(p(35, s)), s, p, o, m) # define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_FOR_35_C(BOOST_PP_BOOL(p(36, s)), s, p, o, m) # define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_FOR_36_C(BOOST_PP_BOOL(p(37, s)), s, p, o, m) # define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_FOR_37_C(BOOST_PP_BOOL(p(38, s)), s, p, o, m) # define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_FOR_38_C(BOOST_PP_BOOL(p(39, s)), s, p, o, m) # define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_FOR_39_C(BOOST_PP_BOOL(p(40, s)), s, p, o, m) # define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_FOR_40_C(BOOST_PP_BOOL(p(41, s)), s, p, o, m) # define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_FOR_41_C(BOOST_PP_BOOL(p(42, s)), s, p, o, m) # define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_FOR_42_C(BOOST_PP_BOOL(p(43, s)), s, p, o, m) # define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_FOR_43_C(BOOST_PP_BOOL(p(44, s)), s, p, o, m) # define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_FOR_44_C(BOOST_PP_BOOL(p(45, s)), s, p, o, m) # define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_FOR_45_C(BOOST_PP_BOOL(p(46, s)), s, p, o, m) # define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_FOR_46_C(BOOST_PP_BOOL(p(47, s)), s, p, o, m) # define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_FOR_47_C(BOOST_PP_BOOL(p(48, s)), s, p, o, m) # define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_FOR_48_C(BOOST_PP_BOOL(p(49, s)), s, p, o, m) # define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_FOR_49_C(BOOST_PP_BOOL(p(50, s)), s, p, o, m) # define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_FOR_50_C(BOOST_PP_BOOL(p(51, s)), s, p, o, m) # define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_FOR_51_C(BOOST_PP_BOOL(p(52, s)), s, p, o, m) # define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_FOR_52_C(BOOST_PP_BOOL(p(53, s)), s, p, o, m) # define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_FOR_53_C(BOOST_PP_BOOL(p(54, s)), s, p, o, m) # define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_FOR_54_C(BOOST_PP_BOOL(p(55, s)), s, p, o, m) # define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_FOR_55_C(BOOST_PP_BOOL(p(56, s)), s, p, o, m) # define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_FOR_56_C(BOOST_PP_BOOL(p(57, s)), s, p, o, m) # define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_FOR_57_C(BOOST_PP_BOOL(p(58, s)), s, p, o, m) # define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_FOR_58_C(BOOST_PP_BOOL(p(59, s)), s, p, o, m) # define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_FOR_59_C(BOOST_PP_BOOL(p(60, s)), s, p, o, m) # define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_FOR_60_C(BOOST_PP_BOOL(p(61, s)), s, p, o, m) # define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_FOR_61_C(BOOST_PP_BOOL(p(62, s)), s, p, o, m) # define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_FOR_62_C(BOOST_PP_BOOL(p(63, s)), s, p, o, m) # define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_FOR_63_C(BOOST_PP_BOOL(p(64, s)), s, p, o, m) # define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_FOR_64_C(BOOST_PP_BOOL(p(65, s)), s, p, o, m) # define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_FOR_65_C(BOOST_PP_BOOL(p(66, s)), s, p, o, m) # define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_FOR_66_C(BOOST_PP_BOOL(p(67, s)), s, p, o, m) # define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_FOR_67_C(BOOST_PP_BOOL(p(68, s)), s, p, o, m) # define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_FOR_68_C(BOOST_PP_BOOL(p(69, s)), s, p, o, m) # define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_FOR_69_C(BOOST_PP_BOOL(p(70, s)), s, p, o, m) # define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_FOR_70_C(BOOST_PP_BOOL(p(71, s)), s, p, o, m) # define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_FOR_71_C(BOOST_PP_BOOL(p(72, s)), s, p, o, m) # define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_FOR_72_C(BOOST_PP_BOOL(p(73, s)), s, p, o, m) # define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_FOR_73_C(BOOST_PP_BOOL(p(74, s)), s, p, o, m) # define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_FOR_74_C(BOOST_PP_BOOL(p(75, s)), s, p, o, m) # define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_FOR_75_C(BOOST_PP_BOOL(p(76, s)), s, p, o, m) # define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_FOR_76_C(BOOST_PP_BOOL(p(77, s)), s, p, o, m) # define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_FOR_77_C(BOOST_PP_BOOL(p(78, s)), s, p, o, m) # define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_FOR_78_C(BOOST_PP_BOOL(p(79, s)), s, p, o, m) # define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_FOR_79_C(BOOST_PP_BOOL(p(80, s)), s, p, o, m) # define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_FOR_80_C(BOOST_PP_BOOL(p(81, s)), s, p, o, m) # define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_FOR_81_C(BOOST_PP_BOOL(p(82, s)), s, p, o, m) # define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_FOR_82_C(BOOST_PP_BOOL(p(83, s)), s, p, o, m) # define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_FOR_83_C(BOOST_PP_BOOL(p(84, s)), s, p, o, m) # define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_FOR_84_C(BOOST_PP_BOOL(p(85, s)), s, p, o, m) # define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_FOR_85_C(BOOST_PP_BOOL(p(86, s)), s, p, o, m) # define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_FOR_86_C(BOOST_PP_BOOL(p(87, s)), s, p, o, m) # define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_FOR_87_C(BOOST_PP_BOOL(p(88, s)), s, p, o, m) # define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_FOR_88_C(BOOST_PP_BOOL(p(89, s)), s, p, o, m) # define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_FOR_89_C(BOOST_PP_BOOL(p(90, s)), s, p, o, m) # define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_FOR_90_C(BOOST_PP_BOOL(p(91, s)), s, p, o, m) # define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_FOR_91_C(BOOST_PP_BOOL(p(92, s)), s, p, o, m) # define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_FOR_92_C(BOOST_PP_BOOL(p(93, s)), s, p, o, m) # define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_FOR_93_C(BOOST_PP_BOOL(p(94, s)), s, p, o, m) # define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_FOR_94_C(BOOST_PP_BOOL(p(95, s)), s, p, o, m) # define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_FOR_95_C(BOOST_PP_BOOL(p(96, s)), s, p, o, m) # define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_FOR_96_C(BOOST_PP_BOOL(p(97, s)), s, p, o, m) # define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_FOR_97_C(BOOST_PP_BOOL(p(98, s)), s, p, o, m) # define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_FOR_98_C(BOOST_PP_BOOL(p(99, s)), s, p, o, m) # define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_FOR_99_C(BOOST_PP_BOOL(p(100, s)), s, p, o, m) # define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_FOR_100_C(BOOST_PP_BOOL(p(101, s)), s, p, o, m) # define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_FOR_101_C(BOOST_PP_BOOL(p(102, s)), s, p, o, m) # define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_FOR_102_C(BOOST_PP_BOOL(p(103, s)), s, p, o, m) # define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_FOR_103_C(BOOST_PP_BOOL(p(104, s)), s, p, o, m) # define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_FOR_104_C(BOOST_PP_BOOL(p(105, s)), s, p, o, m) # define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_FOR_105_C(BOOST_PP_BOOL(p(106, s)), s, p, o, m) # define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_FOR_106_C(BOOST_PP_BOOL(p(107, s)), s, p, o, m) # define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_FOR_107_C(BOOST_PP_BOOL(p(108, s)), s, p, o, m) # define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_FOR_108_C(BOOST_PP_BOOL(p(109, s)), s, p, o, m) # define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_FOR_109_C(BOOST_PP_BOOL(p(110, s)), s, p, o, m) # define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_FOR_110_C(BOOST_PP_BOOL(p(111, s)), s, p, o, m) # define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_FOR_111_C(BOOST_PP_BOOL(p(112, s)), s, p, o, m) # define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_FOR_112_C(BOOST_PP_BOOL(p(113, s)), s, p, o, m) # define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_FOR_113_C(BOOST_PP_BOOL(p(114, s)), s, p, o, m) # define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_FOR_114_C(BOOST_PP_BOOL(p(115, s)), s, p, o, m) # define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_FOR_115_C(BOOST_PP_BOOL(p(116, s)), s, p, o, m) # define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_FOR_116_C(BOOST_PP_BOOL(p(117, s)), s, p, o, m) # define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_FOR_117_C(BOOST_PP_BOOL(p(118, s)), s, p, o, m) # define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_FOR_118_C(BOOST_PP_BOOL(p(119, s)), s, p, o, m) # define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_FOR_119_C(BOOST_PP_BOOL(p(120, s)), s, p, o, m) # define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_FOR_120_C(BOOST_PP_BOOL(p(121, s)), s, p, o, m) # define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_FOR_121_C(BOOST_PP_BOOL(p(122, s)), s, p, o, m) # define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_FOR_122_C(BOOST_PP_BOOL(p(123, s)), s, p, o, m) # define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_FOR_123_C(BOOST_PP_BOOL(p(124, s)), s, p, o, m) # define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_FOR_124_C(BOOST_PP_BOOL(p(125, s)), s, p, o, m) # define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_FOR_125_C(BOOST_PP_BOOL(p(126, s)), s, p, o, m) # define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_FOR_126_C(BOOST_PP_BOOL(p(127, s)), s, p, o, m) # define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_FOR_127_C(BOOST_PP_BOOL(p(128, s)), s, p, o, m) # define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_FOR_128_C(BOOST_PP_BOOL(p(129, s)), s, p, o, m) # define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_FOR_129_C(BOOST_PP_BOOL(p(130, s)), s, p, o, m) # define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_FOR_130_C(BOOST_PP_BOOL(p(131, s)), s, p, o, m) # define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_FOR_131_C(BOOST_PP_BOOL(p(132, s)), s, p, o, m) # define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_FOR_132_C(BOOST_PP_BOOL(p(133, s)), s, p, o, m) # define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_FOR_133_C(BOOST_PP_BOOL(p(134, s)), s, p, o, m) # define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_FOR_134_C(BOOST_PP_BOOL(p(135, s)), s, p, o, m) # define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_FOR_135_C(BOOST_PP_BOOL(p(136, s)), s, p, o, m) # define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_FOR_136_C(BOOST_PP_BOOL(p(137, s)), s, p, o, m) # define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_FOR_137_C(BOOST_PP_BOOL(p(138, s)), s, p, o, m) # define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_FOR_138_C(BOOST_PP_BOOL(p(139, s)), s, p, o, m) # define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_FOR_139_C(BOOST_PP_BOOL(p(140, s)), s, p, o, m) # define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_FOR_140_C(BOOST_PP_BOOL(p(141, s)), s, p, o, m) # define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_FOR_141_C(BOOST_PP_BOOL(p(142, s)), s, p, o, m) # define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_FOR_142_C(BOOST_PP_BOOL(p(143, s)), s, p, o, m) # define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_FOR_143_C(BOOST_PP_BOOL(p(144, s)), s, p, o, m) # define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_FOR_144_C(BOOST_PP_BOOL(p(145, s)), s, p, o, m) # define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_FOR_145_C(BOOST_PP_BOOL(p(146, s)), s, p, o, m) # define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_FOR_146_C(BOOST_PP_BOOL(p(147, s)), s, p, o, m) # define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_FOR_147_C(BOOST_PP_BOOL(p(148, s)), s, p, o, m) # define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_FOR_148_C(BOOST_PP_BOOL(p(149, s)), s, p, o, m) # define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_FOR_149_C(BOOST_PP_BOOL(p(150, s)), s, p, o, m) # define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_FOR_150_C(BOOST_PP_BOOL(p(151, s)), s, p, o, m) # define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_FOR_151_C(BOOST_PP_BOOL(p(152, s)), s, p, o, m) # define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_FOR_152_C(BOOST_PP_BOOL(p(153, s)), s, p, o, m) # define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_FOR_153_C(BOOST_PP_BOOL(p(154, s)), s, p, o, m) # define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_FOR_154_C(BOOST_PP_BOOL(p(155, s)), s, p, o, m) # define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_FOR_155_C(BOOST_PP_BOOL(p(156, s)), s, p, o, m) # define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_FOR_156_C(BOOST_PP_BOOL(p(157, s)), s, p, o, m) # define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_FOR_157_C(BOOST_PP_BOOL(p(158, s)), s, p, o, m) # define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_FOR_158_C(BOOST_PP_BOOL(p(159, s)), s, p, o, m) # define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_FOR_159_C(BOOST_PP_BOOL(p(160, s)), s, p, o, m) # define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_FOR_160_C(BOOST_PP_BOOL(p(161, s)), s, p, o, m) # define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_FOR_161_C(BOOST_PP_BOOL(p(162, s)), s, p, o, m) # define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_FOR_162_C(BOOST_PP_BOOL(p(163, s)), s, p, o, m) # define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_FOR_163_C(BOOST_PP_BOOL(p(164, s)), s, p, o, m) # define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_FOR_164_C(BOOST_PP_BOOL(p(165, s)), s, p, o, m) # define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_FOR_165_C(BOOST_PP_BOOL(p(166, s)), s, p, o, m) # define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_FOR_166_C(BOOST_PP_BOOL(p(167, s)), s, p, o, m) # define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_FOR_167_C(BOOST_PP_BOOL(p(168, s)), s, p, o, m) # define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_FOR_168_C(BOOST_PP_BOOL(p(169, s)), s, p, o, m) # define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_FOR_169_C(BOOST_PP_BOOL(p(170, s)), s, p, o, m) # define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_FOR_170_C(BOOST_PP_BOOL(p(171, s)), s, p, o, m) # define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_FOR_171_C(BOOST_PP_BOOL(p(172, s)), s, p, o, m) # define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_FOR_172_C(BOOST_PP_BOOL(p(173, s)), s, p, o, m) # define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_FOR_173_C(BOOST_PP_BOOL(p(174, s)), s, p, o, m) # define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_FOR_174_C(BOOST_PP_BOOL(p(175, s)), s, p, o, m) # define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_FOR_175_C(BOOST_PP_BOOL(p(176, s)), s, p, o, m) # define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_FOR_176_C(BOOST_PP_BOOL(p(177, s)), s, p, o, m) # define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_FOR_177_C(BOOST_PP_BOOL(p(178, s)), s, p, o, m) # define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_FOR_178_C(BOOST_PP_BOOL(p(179, s)), s, p, o, m) # define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_FOR_179_C(BOOST_PP_BOOL(p(180, s)), s, p, o, m) # define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_FOR_180_C(BOOST_PP_BOOL(p(181, s)), s, p, o, m) # define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_FOR_181_C(BOOST_PP_BOOL(p(182, s)), s, p, o, m) # define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_FOR_182_C(BOOST_PP_BOOL(p(183, s)), s, p, o, m) # define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_FOR_183_C(BOOST_PP_BOOL(p(184, s)), s, p, o, m) # define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_FOR_184_C(BOOST_PP_BOOL(p(185, s)), s, p, o, m) # define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_FOR_185_C(BOOST_PP_BOOL(p(186, s)), s, p, o, m) # define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_FOR_186_C(BOOST_PP_BOOL(p(187, s)), s, p, o, m) # define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_FOR_187_C(BOOST_PP_BOOL(p(188, s)), s, p, o, m) # define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_FOR_188_C(BOOST_PP_BOOL(p(189, s)), s, p, o, m) # define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_FOR_189_C(BOOST_PP_BOOL(p(190, s)), s, p, o, m) # define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_FOR_190_C(BOOST_PP_BOOL(p(191, s)), s, p, o, m) # define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_FOR_191_C(BOOST_PP_BOOL(p(192, s)), s, p, o, m) # define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_FOR_192_C(BOOST_PP_BOOL(p(193, s)), s, p, o, m) # define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_FOR_193_C(BOOST_PP_BOOL(p(194, s)), s, p, o, m) # define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_FOR_194_C(BOOST_PP_BOOL(p(195, s)), s, p, o, m) # define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_FOR_195_C(BOOST_PP_BOOL(p(196, s)), s, p, o, m) # define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_FOR_196_C(BOOST_PP_BOOL(p(197, s)), s, p, o, m) # define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_FOR_197_C(BOOST_PP_BOOL(p(198, s)), s, p, o, m) # define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_FOR_198_C(BOOST_PP_BOOL(p(199, s)), s, p, o, m) # define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_FOR_199_C(BOOST_PP_BOOL(p(200, s)), s, p, o, m) # define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_FOR_200_C(BOOST_PP_BOOL(p(201, s)), s, p, o, m) # define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_FOR_201_C(BOOST_PP_BOOL(p(202, s)), s, p, o, m) # define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_FOR_202_C(BOOST_PP_BOOL(p(203, s)), s, p, o, m) # define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_FOR_203_C(BOOST_PP_BOOL(p(204, s)), s, p, o, m) # define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_FOR_204_C(BOOST_PP_BOOL(p(205, s)), s, p, o, m) # define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_FOR_205_C(BOOST_PP_BOOL(p(206, s)), s, p, o, m) # define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_FOR_206_C(BOOST_PP_BOOL(p(207, s)), s, p, o, m) # define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_FOR_207_C(BOOST_PP_BOOL(p(208, s)), s, p, o, m) # define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_FOR_208_C(BOOST_PP_BOOL(p(209, s)), s, p, o, m) # define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_FOR_209_C(BOOST_PP_BOOL(p(210, s)), s, p, o, m) # define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_FOR_210_C(BOOST_PP_BOOL(p(211, s)), s, p, o, m) # define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_FOR_211_C(BOOST_PP_BOOL(p(212, s)), s, p, o, m) # define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_FOR_212_C(BOOST_PP_BOOL(p(213, s)), s, p, o, m) # define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_FOR_213_C(BOOST_PP_BOOL(p(214, s)), s, p, o, m) # define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_FOR_214_C(BOOST_PP_BOOL(p(215, s)), s, p, o, m) # define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_FOR_215_C(BOOST_PP_BOOL(p(216, s)), s, p, o, m) # define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_FOR_216_C(BOOST_PP_BOOL(p(217, s)), s, p, o, m) # define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_FOR_217_C(BOOST_PP_BOOL(p(218, s)), s, p, o, m) # define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_FOR_218_C(BOOST_PP_BOOL(p(219, s)), s, p, o, m) # define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_FOR_219_C(BOOST_PP_BOOL(p(220, s)), s, p, o, m) # define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_FOR_220_C(BOOST_PP_BOOL(p(221, s)), s, p, o, m) # define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_FOR_221_C(BOOST_PP_BOOL(p(222, s)), s, p, o, m) # define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_FOR_222_C(BOOST_PP_BOOL(p(223, s)), s, p, o, m) # define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_FOR_223_C(BOOST_PP_BOOL(p(224, s)), s, p, o, m) # define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_FOR_224_C(BOOST_PP_BOOL(p(225, s)), s, p, o, m) # define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_FOR_225_C(BOOST_PP_BOOL(p(226, s)), s, p, o, m) # define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_FOR_226_C(BOOST_PP_BOOL(p(227, s)), s, p, o, m) # define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_FOR_227_C(BOOST_PP_BOOL(p(228, s)), s, p, o, m) # define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_FOR_228_C(BOOST_PP_BOOL(p(229, s)), s, p, o, m) # define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_FOR_229_C(BOOST_PP_BOOL(p(230, s)), s, p, o, m) # define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_FOR_230_C(BOOST_PP_BOOL(p(231, s)), s, p, o, m) # define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_FOR_231_C(BOOST_PP_BOOL(p(232, s)), s, p, o, m) # define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_FOR_232_C(BOOST_PP_BOOL(p(233, s)), s, p, o, m) # define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_FOR_233_C(BOOST_PP_BOOL(p(234, s)), s, p, o, m) # define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_FOR_234_C(BOOST_PP_BOOL(p(235, s)), s, p, o, m) # define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_FOR_235_C(BOOST_PP_BOOL(p(236, s)), s, p, o, m) # define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_FOR_236_C(BOOST_PP_BOOL(p(237, s)), s, p, o, m) # define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_FOR_237_C(BOOST_PP_BOOL(p(238, s)), s, p, o, m) # define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_FOR_238_C(BOOST_PP_BOOL(p(239, s)), s, p, o, m) # define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_FOR_239_C(BOOST_PP_BOOL(p(240, s)), s, p, o, m) # define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_FOR_240_C(BOOST_PP_BOOL(p(241, s)), s, p, o, m) # define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_FOR_241_C(BOOST_PP_BOOL(p(242, s)), s, p, o, m) # define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_FOR_242_C(BOOST_PP_BOOL(p(243, s)), s, p, o, m) # define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_FOR_243_C(BOOST_PP_BOOL(p(244, s)), s, p, o, m) # define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_FOR_244_C(BOOST_PP_BOOL(p(245, s)), s, p, o, m) # define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_FOR_245_C(BOOST_PP_BOOL(p(246, s)), s, p, o, m) # define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_FOR_246_C(BOOST_PP_BOOL(p(247, s)), s, p, o, m) # define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_FOR_247_C(BOOST_PP_BOOL(p(248, s)), s, p, o, m) # define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_FOR_248_C(BOOST_PP_BOOL(p(249, s)), s, p, o, m) # define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_FOR_249_C(BOOST_PP_BOOL(p(250, s)), s, p, o, m) # define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_FOR_250_C(BOOST_PP_BOOL(p(251, s)), s, p, o, m) # define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_FOR_251_C(BOOST_PP_BOOL(p(252, s)), s, p, o, m) # define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_FOR_252_C(BOOST_PP_BOOL(p(253, s)), s, p, o, m) # define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_FOR_253_C(BOOST_PP_BOOL(p(254, s)), s, p, o, m) # define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_FOR_254_C(BOOST_PP_BOOL(p(255, s)), s, p, o, m) # define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_FOR_255_C(BOOST_PP_BOOL(p(256, s)), s, p, o, m) # define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_FOR_256_C(BOOST_PP_BOOL(p(257, s)), s, p, o, m) # # define BOOST_PP_FOR_1_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IIF(c, BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(2, s), p, o, m) # define BOOST_PP_FOR_2_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IIF(c, BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(3, s), p, o, m) # define BOOST_PP_FOR_3_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IIF(c, BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(4, s), p, o, m) # define BOOST_PP_FOR_4_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IIF(c, BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(5, s), p, o, m) # define BOOST_PP_FOR_5_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IIF(c, BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(6, s), p, o, m) # define BOOST_PP_FOR_6_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IIF(c, BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(7, s), p, o, m) # define BOOST_PP_FOR_7_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IIF(c, BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(8, s), p, o, m) # define BOOST_PP_FOR_8_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IIF(c, BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(9, s), p, o, m) # define BOOST_PP_FOR_9_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IIF(c, BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(10, s), p, o, m) # define BOOST_PP_FOR_10_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IIF(c, BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(11, s), p, o, m) # define BOOST_PP_FOR_11_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IIF(c, BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(12, s), p, o, m) # define BOOST_PP_FOR_12_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IIF(c, BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(13, s), p, o, m) # define BOOST_PP_FOR_13_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IIF(c, BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(14, s), p, o, m) # define BOOST_PP_FOR_14_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IIF(c, BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(15, s), p, o, m) # define BOOST_PP_FOR_15_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IIF(c, BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(16, s), p, o, m) # define BOOST_PP_FOR_16_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IIF(c, BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(17, s), p, o, m) # define BOOST_PP_FOR_17_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IIF(c, BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(18, s), p, o, m) # define BOOST_PP_FOR_18_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IIF(c, BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(19, s), p, o, m) # define BOOST_PP_FOR_19_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IIF(c, BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(20, s), p, o, m) # define BOOST_PP_FOR_20_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IIF(c, BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(21, s), p, o, m) # define BOOST_PP_FOR_21_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IIF(c, BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(22, s), p, o, m) # define BOOST_PP_FOR_22_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IIF(c, BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(23, s), p, o, m) # define BOOST_PP_FOR_23_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IIF(c, BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(24, s), p, o, m) # define BOOST_PP_FOR_24_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IIF(c, BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(25, s), p, o, m) # define BOOST_PP_FOR_25_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IIF(c, BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(26, s), p, o, m) # define BOOST_PP_FOR_26_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IIF(c, BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(27, s), p, o, m) # define BOOST_PP_FOR_27_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IIF(c, BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(28, s), p, o, m) # define BOOST_PP_FOR_28_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IIF(c, BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(29, s), p, o, m) # define BOOST_PP_FOR_29_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IIF(c, BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(30, s), p, o, m) # define BOOST_PP_FOR_30_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IIF(c, BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(31, s), p, o, m) # define BOOST_PP_FOR_31_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IIF(c, BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(32, s), p, o, m) # define BOOST_PP_FOR_32_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IIF(c, BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(33, s), p, o, m) # define BOOST_PP_FOR_33_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IIF(c, BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(34, s), p, o, m) # define BOOST_PP_FOR_34_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IIF(c, BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(35, s), p, o, m) # define BOOST_PP_FOR_35_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IIF(c, BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(36, s), p, o, m) # define BOOST_PP_FOR_36_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IIF(c, BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(37, s), p, o, m) # define BOOST_PP_FOR_37_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IIF(c, BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(38, s), p, o, m) # define BOOST_PP_FOR_38_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IIF(c, BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(39, s), p, o, m) # define BOOST_PP_FOR_39_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IIF(c, BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(40, s), p, o, m) # define BOOST_PP_FOR_40_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IIF(c, BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(41, s), p, o, m) # define BOOST_PP_FOR_41_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IIF(c, BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(42, s), p, o, m) # define BOOST_PP_FOR_42_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IIF(c, BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(43, s), p, o, m) # define BOOST_PP_FOR_43_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IIF(c, BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(44, s), p, o, m) # define BOOST_PP_FOR_44_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IIF(c, BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(45, s), p, o, m) # define BOOST_PP_FOR_45_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IIF(c, BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(46, s), p, o, m) # define BOOST_PP_FOR_46_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IIF(c, BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(47, s), p, o, m) # define BOOST_PP_FOR_47_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IIF(c, BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(48, s), p, o, m) # define BOOST_PP_FOR_48_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IIF(c, BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(49, s), p, o, m) # define BOOST_PP_FOR_49_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IIF(c, BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(50, s), p, o, m) # define BOOST_PP_FOR_50_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IIF(c, BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(51, s), p, o, m) # define BOOST_PP_FOR_51_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IIF(c, BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(52, s), p, o, m) # define BOOST_PP_FOR_52_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IIF(c, BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(53, s), p, o, m) # define BOOST_PP_FOR_53_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IIF(c, BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(54, s), p, o, m) # define BOOST_PP_FOR_54_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IIF(c, BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(55, s), p, o, m) # define BOOST_PP_FOR_55_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IIF(c, BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(56, s), p, o, m) # define BOOST_PP_FOR_56_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IIF(c, BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(57, s), p, o, m) # define BOOST_PP_FOR_57_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IIF(c, BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(58, s), p, o, m) # define BOOST_PP_FOR_58_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IIF(c, BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(59, s), p, o, m) # define BOOST_PP_FOR_59_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IIF(c, BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(60, s), p, o, m) # define BOOST_PP_FOR_60_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IIF(c, BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(61, s), p, o, m) # define BOOST_PP_FOR_61_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IIF(c, BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(62, s), p, o, m) # define BOOST_PP_FOR_62_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IIF(c, BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(63, s), p, o, m) # define BOOST_PP_FOR_63_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IIF(c, BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(64, s), p, o, m) # define BOOST_PP_FOR_64_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IIF(c, BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(65, s), p, o, m) # define BOOST_PP_FOR_65_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IIF(c, BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(66, s), p, o, m) # define BOOST_PP_FOR_66_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IIF(c, BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(67, s), p, o, m) # define BOOST_PP_FOR_67_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IIF(c, BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(68, s), p, o, m) # define BOOST_PP_FOR_68_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IIF(c, BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(69, s), p, o, m) # define BOOST_PP_FOR_69_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IIF(c, BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(70, s), p, o, m) # define BOOST_PP_FOR_70_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IIF(c, BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(71, s), p, o, m) # define BOOST_PP_FOR_71_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IIF(c, BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(72, s), p, o, m) # define BOOST_PP_FOR_72_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IIF(c, BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(73, s), p, o, m) # define BOOST_PP_FOR_73_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IIF(c, BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(74, s), p, o, m) # define BOOST_PP_FOR_74_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IIF(c, BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(75, s), p, o, m) # define BOOST_PP_FOR_75_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IIF(c, BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(76, s), p, o, m) # define BOOST_PP_FOR_76_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IIF(c, BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(77, s), p, o, m) # define BOOST_PP_FOR_77_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IIF(c, BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(78, s), p, o, m) # define BOOST_PP_FOR_78_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IIF(c, BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(79, s), p, o, m) # define BOOST_PP_FOR_79_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IIF(c, BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(80, s), p, o, m) # define BOOST_PP_FOR_80_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IIF(c, BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(81, s), p, o, m) # define BOOST_PP_FOR_81_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IIF(c, BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(82, s), p, o, m) # define BOOST_PP_FOR_82_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IIF(c, BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(83, s), p, o, m) # define BOOST_PP_FOR_83_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IIF(c, BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(84, s), p, o, m) # define BOOST_PP_FOR_84_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IIF(c, BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(85, s), p, o, m) # define BOOST_PP_FOR_85_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IIF(c, BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(86, s), p, o, m) # define BOOST_PP_FOR_86_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IIF(c, BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(87, s), p, o, m) # define BOOST_PP_FOR_87_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IIF(c, BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(88, s), p, o, m) # define BOOST_PP_FOR_88_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IIF(c, BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(89, s), p, o, m) # define BOOST_PP_FOR_89_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IIF(c, BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(90, s), p, o, m) # define BOOST_PP_FOR_90_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IIF(c, BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(91, s), p, o, m) # define BOOST_PP_FOR_91_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IIF(c, BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(92, s), p, o, m) # define BOOST_PP_FOR_92_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IIF(c, BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(93, s), p, o, m) # define BOOST_PP_FOR_93_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IIF(c, BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(94, s), p, o, m) # define BOOST_PP_FOR_94_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IIF(c, BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(95, s), p, o, m) # define BOOST_PP_FOR_95_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IIF(c, BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(96, s), p, o, m) # define BOOST_PP_FOR_96_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IIF(c, BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(97, s), p, o, m) # define BOOST_PP_FOR_97_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IIF(c, BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(98, s), p, o, m) # define BOOST_PP_FOR_98_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IIF(c, BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(99, s), p, o, m) # define BOOST_PP_FOR_99_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IIF(c, BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(100, s), p, o, m) # define BOOST_PP_FOR_100_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IIF(c, BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(101, s), p, o, m) # define BOOST_PP_FOR_101_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IIF(c, BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(102, s), p, o, m) # define BOOST_PP_FOR_102_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IIF(c, BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(103, s), p, o, m) # define BOOST_PP_FOR_103_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IIF(c, BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(104, s), p, o, m) # define BOOST_PP_FOR_104_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IIF(c, BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(105, s), p, o, m) # define BOOST_PP_FOR_105_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IIF(c, BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(106, s), p, o, m) # define BOOST_PP_FOR_106_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IIF(c, BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(107, s), p, o, m) # define BOOST_PP_FOR_107_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IIF(c, BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(108, s), p, o, m) # define BOOST_PP_FOR_108_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IIF(c, BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(109, s), p, o, m) # define BOOST_PP_FOR_109_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IIF(c, BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(110, s), p, o, m) # define BOOST_PP_FOR_110_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IIF(c, BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(111, s), p, o, m) # define BOOST_PP_FOR_111_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IIF(c, BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(112, s), p, o, m) # define BOOST_PP_FOR_112_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IIF(c, BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(113, s), p, o, m) # define BOOST_PP_FOR_113_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IIF(c, BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(114, s), p, o, m) # define BOOST_PP_FOR_114_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IIF(c, BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(115, s), p, o, m) # define BOOST_PP_FOR_115_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IIF(c, BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(116, s), p, o, m) # define BOOST_PP_FOR_116_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IIF(c, BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(117, s), p, o, m) # define BOOST_PP_FOR_117_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IIF(c, BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(118, s), p, o, m) # define BOOST_PP_FOR_118_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IIF(c, BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(119, s), p, o, m) # define BOOST_PP_FOR_119_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IIF(c, BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(120, s), p, o, m) # define BOOST_PP_FOR_120_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IIF(c, BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(121, s), p, o, m) # define BOOST_PP_FOR_121_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IIF(c, BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(122, s), p, o, m) # define BOOST_PP_FOR_122_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IIF(c, BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(123, s), p, o, m) # define BOOST_PP_FOR_123_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IIF(c, BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(124, s), p, o, m) # define BOOST_PP_FOR_124_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IIF(c, BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(125, s), p, o, m) # define BOOST_PP_FOR_125_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IIF(c, BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(126, s), p, o, m) # define BOOST_PP_FOR_126_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IIF(c, BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(127, s), p, o, m) # define BOOST_PP_FOR_127_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IIF(c, BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(128, s), p, o, m) # define BOOST_PP_FOR_128_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IIF(c, BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(129, s), p, o, m) # define BOOST_PP_FOR_129_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IIF(c, BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(130, s), p, o, m) # define BOOST_PP_FOR_130_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IIF(c, BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(131, s), p, o, m) # define BOOST_PP_FOR_131_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IIF(c, BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(132, s), p, o, m) # define BOOST_PP_FOR_132_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IIF(c, BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(133, s), p, o, m) # define BOOST_PP_FOR_133_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IIF(c, BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(134, s), p, o, m) # define BOOST_PP_FOR_134_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IIF(c, BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(135, s), p, o, m) # define BOOST_PP_FOR_135_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IIF(c, BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(136, s), p, o, m) # define BOOST_PP_FOR_136_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IIF(c, BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(137, s), p, o, m) # define BOOST_PP_FOR_137_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IIF(c, BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(138, s), p, o, m) # define BOOST_PP_FOR_138_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IIF(c, BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(139, s), p, o, m) # define BOOST_PP_FOR_139_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IIF(c, BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(140, s), p, o, m) # define BOOST_PP_FOR_140_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IIF(c, BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(141, s), p, o, m) # define BOOST_PP_FOR_141_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IIF(c, BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(142, s), p, o, m) # define BOOST_PP_FOR_142_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IIF(c, BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(143, s), p, o, m) # define BOOST_PP_FOR_143_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IIF(c, BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(144, s), p, o, m) # define BOOST_PP_FOR_144_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IIF(c, BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(145, s), p, o, m) # define BOOST_PP_FOR_145_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IIF(c, BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(146, s), p, o, m) # define BOOST_PP_FOR_146_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IIF(c, BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(147, s), p, o, m) # define BOOST_PP_FOR_147_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IIF(c, BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(148, s), p, o, m) # define BOOST_PP_FOR_148_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IIF(c, BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(149, s), p, o, m) # define BOOST_PP_FOR_149_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IIF(c, BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(150, s), p, o, m) # define BOOST_PP_FOR_150_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IIF(c, BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(151, s), p, o, m) # define BOOST_PP_FOR_151_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IIF(c, BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(152, s), p, o, m) # define BOOST_PP_FOR_152_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IIF(c, BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(153, s), p, o, m) # define BOOST_PP_FOR_153_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IIF(c, BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(154, s), p, o, m) # define BOOST_PP_FOR_154_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IIF(c, BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(155, s), p, o, m) # define BOOST_PP_FOR_155_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IIF(c, BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(156, s), p, o, m) # define BOOST_PP_FOR_156_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IIF(c, BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(157, s), p, o, m) # define BOOST_PP_FOR_157_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IIF(c, BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(158, s), p, o, m) # define BOOST_PP_FOR_158_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IIF(c, BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(159, s), p, o, m) # define BOOST_PP_FOR_159_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IIF(c, BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(160, s), p, o, m) # define BOOST_PP_FOR_160_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IIF(c, BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(161, s), p, o, m) # define BOOST_PP_FOR_161_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IIF(c, BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(162, s), p, o, m) # define BOOST_PP_FOR_162_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IIF(c, BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(163, s), p, o, m) # define BOOST_PP_FOR_163_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IIF(c, BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(164, s), p, o, m) # define BOOST_PP_FOR_164_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IIF(c, BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(165, s), p, o, m) # define BOOST_PP_FOR_165_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IIF(c, BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(166, s), p, o, m) # define BOOST_PP_FOR_166_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IIF(c, BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(167, s), p, o, m) # define BOOST_PP_FOR_167_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IIF(c, BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(168, s), p, o, m) # define BOOST_PP_FOR_168_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IIF(c, BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(169, s), p, o, m) # define BOOST_PP_FOR_169_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IIF(c, BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(170, s), p, o, m) # define BOOST_PP_FOR_170_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IIF(c, BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(171, s), p, o, m) # define BOOST_PP_FOR_171_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IIF(c, BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(172, s), p, o, m) # define BOOST_PP_FOR_172_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IIF(c, BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(173, s), p, o, m) # define BOOST_PP_FOR_173_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IIF(c, BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(174, s), p, o, m) # define BOOST_PP_FOR_174_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IIF(c, BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(175, s), p, o, m) # define BOOST_PP_FOR_175_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IIF(c, BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(176, s), p, o, m) # define BOOST_PP_FOR_176_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IIF(c, BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(177, s), p, o, m) # define BOOST_PP_FOR_177_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IIF(c, BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(178, s), p, o, m) # define BOOST_PP_FOR_178_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IIF(c, BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(179, s), p, o, m) # define BOOST_PP_FOR_179_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IIF(c, BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(180, s), p, o, m) # define BOOST_PP_FOR_180_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IIF(c, BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(181, s), p, o, m) # define BOOST_PP_FOR_181_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IIF(c, BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(182, s), p, o, m) # define BOOST_PP_FOR_182_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IIF(c, BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(183, s), p, o, m) # define BOOST_PP_FOR_183_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IIF(c, BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(184, s), p, o, m) # define BOOST_PP_FOR_184_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IIF(c, BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(185, s), p, o, m) # define BOOST_PP_FOR_185_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IIF(c, BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(186, s), p, o, m) # define BOOST_PP_FOR_186_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IIF(c, BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(187, s), p, o, m) # define BOOST_PP_FOR_187_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IIF(c, BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(188, s), p, o, m) # define BOOST_PP_FOR_188_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IIF(c, BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(189, s), p, o, m) # define BOOST_PP_FOR_189_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IIF(c, BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(190, s), p, o, m) # define BOOST_PP_FOR_190_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IIF(c, BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(191, s), p, o, m) # define BOOST_PP_FOR_191_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IIF(c, BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(192, s), p, o, m) # define BOOST_PP_FOR_192_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IIF(c, BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(193, s), p, o, m) # define BOOST_PP_FOR_193_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IIF(c, BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(194, s), p, o, m) # define BOOST_PP_FOR_194_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IIF(c, BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(195, s), p, o, m) # define BOOST_PP_FOR_195_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IIF(c, BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(196, s), p, o, m) # define BOOST_PP_FOR_196_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IIF(c, BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(197, s), p, o, m) # define BOOST_PP_FOR_197_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IIF(c, BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(198, s), p, o, m) # define BOOST_PP_FOR_198_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IIF(c, BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(199, s), p, o, m) # define BOOST_PP_FOR_199_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IIF(c, BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(200, s), p, o, m) # define BOOST_PP_FOR_200_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IIF(c, BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(201, s), p, o, m) # define BOOST_PP_FOR_201_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IIF(c, BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(202, s), p, o, m) # define BOOST_PP_FOR_202_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IIF(c, BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(203, s), p, o, m) # define BOOST_PP_FOR_203_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IIF(c, BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(204, s), p, o, m) # define BOOST_PP_FOR_204_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IIF(c, BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(205, s), p, o, m) # define BOOST_PP_FOR_205_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IIF(c, BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(206, s), p, o, m) # define BOOST_PP_FOR_206_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IIF(c, BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(207, s), p, o, m) # define BOOST_PP_FOR_207_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IIF(c, BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(208, s), p, o, m) # define BOOST_PP_FOR_208_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IIF(c, BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(209, s), p, o, m) # define BOOST_PP_FOR_209_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IIF(c, BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(210, s), p, o, m) # define BOOST_PP_FOR_210_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IIF(c, BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(211, s), p, o, m) # define BOOST_PP_FOR_211_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IIF(c, BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(212, s), p, o, m) # define BOOST_PP_FOR_212_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IIF(c, BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(213, s), p, o, m) # define BOOST_PP_FOR_213_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IIF(c, BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(214, s), p, o, m) # define BOOST_PP_FOR_214_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IIF(c, BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(215, s), p, o, m) # define BOOST_PP_FOR_215_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IIF(c, BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(216, s), p, o, m) # define BOOST_PP_FOR_216_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IIF(c, BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(217, s), p, o, m) # define BOOST_PP_FOR_217_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IIF(c, BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(218, s), p, o, m) # define BOOST_PP_FOR_218_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IIF(c, BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(219, s), p, o, m) # define BOOST_PP_FOR_219_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IIF(c, BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(220, s), p, o, m) # define BOOST_PP_FOR_220_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IIF(c, BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(221, s), p, o, m) # define BOOST_PP_FOR_221_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IIF(c, BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(222, s), p, o, m) # define BOOST_PP_FOR_222_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IIF(c, BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(223, s), p, o, m) # define BOOST_PP_FOR_223_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IIF(c, BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(224, s), p, o, m) # define BOOST_PP_FOR_224_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IIF(c, BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(225, s), p, o, m) # define BOOST_PP_FOR_225_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IIF(c, BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(226, s), p, o, m) # define BOOST_PP_FOR_226_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IIF(c, BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(227, s), p, o, m) # define BOOST_PP_FOR_227_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IIF(c, BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(228, s), p, o, m) # define BOOST_PP_FOR_228_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IIF(c, BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(229, s), p, o, m) # define BOOST_PP_FOR_229_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IIF(c, BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(230, s), p, o, m) # define BOOST_PP_FOR_230_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IIF(c, BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(231, s), p, o, m) # define BOOST_PP_FOR_231_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IIF(c, BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(232, s), p, o, m) # define BOOST_PP_FOR_232_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IIF(c, BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(233, s), p, o, m) # define BOOST_PP_FOR_233_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IIF(c, BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(234, s), p, o, m) # define BOOST_PP_FOR_234_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IIF(c, BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(235, s), p, o, m) # define BOOST_PP_FOR_235_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IIF(c, BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(236, s), p, o, m) # define BOOST_PP_FOR_236_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IIF(c, BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(237, s), p, o, m) # define BOOST_PP_FOR_237_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IIF(c, BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(238, s), p, o, m) # define BOOST_PP_FOR_238_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IIF(c, BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(239, s), p, o, m) # define BOOST_PP_FOR_239_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IIF(c, BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(240, s), p, o, m) # define BOOST_PP_FOR_240_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IIF(c, BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(241, s), p, o, m) # define BOOST_PP_FOR_241_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IIF(c, BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(242, s), p, o, m) # define BOOST_PP_FOR_242_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IIF(c, BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(243, s), p, o, m) # define BOOST_PP_FOR_243_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IIF(c, BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(244, s), p, o, m) # define BOOST_PP_FOR_244_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IIF(c, BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(245, s), p, o, m) # define BOOST_PP_FOR_245_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IIF(c, BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(246, s), p, o, m) # define BOOST_PP_FOR_246_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IIF(c, BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(247, s), p, o, m) # define BOOST_PP_FOR_247_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IIF(c, BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(248, s), p, o, m) # define BOOST_PP_FOR_248_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IIF(c, BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(249, s), p, o, m) # define BOOST_PP_FOR_249_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IIF(c, BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(250, s), p, o, m) # define BOOST_PP_FOR_250_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IIF(c, BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(251, s), p, o, m) # define BOOST_PP_FOR_251_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IIF(c, BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(252, s), p, o, m) # define BOOST_PP_FOR_252_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IIF(c, BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(253, s), p, o, m) # define BOOST_PP_FOR_253_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IIF(c, BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(254, s), p, o, m) # define BOOST_PP_FOR_254_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IIF(c, BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(255, s), p, o, m) # define BOOST_PP_FOR_255_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IIF(c, BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(256, s), p, o, m) # define BOOST_PP_FOR_256_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IIF(c, BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(257, s), p, o, m) # # endif passenger-4.0.37/ext/boost/preprocessor/punctuation/comma.hpp000644 000765 000024 00000001010 12233035540 025036 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP # define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP # # /* BOOST_PP_COMMA */ # # define BOOST_PP_COMMA() , # # endif passenger-4.0.37/ext/boost/preprocessor/punctuation/comma_if.hpp000644 000765 000024 00000001764 12233035540 025534 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP # define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP # # include # include # include # include # # /* BOOST_PP_COMMA_IF */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_COMMA_IF(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() # else # define BOOST_PP_COMMA_IF(cond) BOOST_PP_COMMA_IF_I(cond) # define BOOST_PP_COMMA_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() # endif # # endif passenger-4.0.37/ext/boost/preprocessor/punctuation/paren.hpp000644 000765 000024 00000001472 12233035540 025063 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_PUNCTUATION_PAREN_HPP # define BOOST_PREPROCESSOR_PUNCTUATION_PAREN_HPP # # /* BOOST_PP_LPAREN */ # # define BOOST_PP_LPAREN() ( # # /* BOOST_PP_RPAREN */ # # define BOOST_PP_RPAREN() ) # # endif passenger-4.0.37/ext/boost/preprocessor/logical/and.hpp000644 000765 000024 00000001624 12233035540 023560 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LOGICAL_AND_HPP # define BOOST_PREPROCESSOR_LOGICAL_AND_HPP # # include # include # include # # /* BOOST_PP_AND */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_AND(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) # else # define BOOST_PP_AND(p, q) BOOST_PP_AND_I(p, q) # define BOOST_PP_AND_I(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/logical/bitand.hpp000644 000765 000024 00000002607 12233035540 024261 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP # define BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP # # include # # /* BOOST_PP_BITAND */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_I(x, y) # else # define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_OO((x, y)) # define BOOST_PP_BITAND_OO(par) BOOST_PP_BITAND_I ## par # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ ## x ## y # else # define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ID(BOOST_PP_BITAND_ ## x ## y) # define BOOST_PP_BITAND_ID(res) res # endif # # define BOOST_PP_BITAND_00 0 # define BOOST_PP_BITAND_01 0 # define BOOST_PP_BITAND_10 0 # define BOOST_PP_BITAND_11 1 # # endif passenger-4.0.37/ext/boost/preprocessor/logical/bool.hpp000644 000765 000024 00000017731 12233035540 023757 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP # define BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP # # include # # /* BOOST_PP_BOOL */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_BOOL(x) BOOST_PP_BOOL_I(x) # else # define BOOST_PP_BOOL(x) BOOST_PP_BOOL_OO((x)) # define BOOST_PP_BOOL_OO(par) BOOST_PP_BOOL_I ## par # endif # # define BOOST_PP_BOOL_I(x) BOOST_PP_BOOL_ ## x # # define BOOST_PP_BOOL_0 0 # define BOOST_PP_BOOL_1 1 # define BOOST_PP_BOOL_2 1 # define BOOST_PP_BOOL_3 1 # define BOOST_PP_BOOL_4 1 # define BOOST_PP_BOOL_5 1 # define BOOST_PP_BOOL_6 1 # define BOOST_PP_BOOL_7 1 # define BOOST_PP_BOOL_8 1 # define BOOST_PP_BOOL_9 1 # define BOOST_PP_BOOL_10 1 # define BOOST_PP_BOOL_11 1 # define BOOST_PP_BOOL_12 1 # define BOOST_PP_BOOL_13 1 # define BOOST_PP_BOOL_14 1 # define BOOST_PP_BOOL_15 1 # define BOOST_PP_BOOL_16 1 # define BOOST_PP_BOOL_17 1 # define BOOST_PP_BOOL_18 1 # define BOOST_PP_BOOL_19 1 # define BOOST_PP_BOOL_20 1 # define BOOST_PP_BOOL_21 1 # define BOOST_PP_BOOL_22 1 # define BOOST_PP_BOOL_23 1 # define BOOST_PP_BOOL_24 1 # define BOOST_PP_BOOL_25 1 # define BOOST_PP_BOOL_26 1 # define BOOST_PP_BOOL_27 1 # define BOOST_PP_BOOL_28 1 # define BOOST_PP_BOOL_29 1 # define BOOST_PP_BOOL_30 1 # define BOOST_PP_BOOL_31 1 # define BOOST_PP_BOOL_32 1 # define BOOST_PP_BOOL_33 1 # define BOOST_PP_BOOL_34 1 # define BOOST_PP_BOOL_35 1 # define BOOST_PP_BOOL_36 1 # define BOOST_PP_BOOL_37 1 # define BOOST_PP_BOOL_38 1 # define BOOST_PP_BOOL_39 1 # define BOOST_PP_BOOL_40 1 # define BOOST_PP_BOOL_41 1 # define BOOST_PP_BOOL_42 1 # define BOOST_PP_BOOL_43 1 # define BOOST_PP_BOOL_44 1 # define BOOST_PP_BOOL_45 1 # define BOOST_PP_BOOL_46 1 # define BOOST_PP_BOOL_47 1 # define BOOST_PP_BOOL_48 1 # define BOOST_PP_BOOL_49 1 # define BOOST_PP_BOOL_50 1 # define BOOST_PP_BOOL_51 1 # define BOOST_PP_BOOL_52 1 # define BOOST_PP_BOOL_53 1 # define BOOST_PP_BOOL_54 1 # define BOOST_PP_BOOL_55 1 # define BOOST_PP_BOOL_56 1 # define BOOST_PP_BOOL_57 1 # define BOOST_PP_BOOL_58 1 # define BOOST_PP_BOOL_59 1 # define BOOST_PP_BOOL_60 1 # define BOOST_PP_BOOL_61 1 # define BOOST_PP_BOOL_62 1 # define BOOST_PP_BOOL_63 1 # define BOOST_PP_BOOL_64 1 # define BOOST_PP_BOOL_65 1 # define BOOST_PP_BOOL_66 1 # define BOOST_PP_BOOL_67 1 # define BOOST_PP_BOOL_68 1 # define BOOST_PP_BOOL_69 1 # define BOOST_PP_BOOL_70 1 # define BOOST_PP_BOOL_71 1 # define BOOST_PP_BOOL_72 1 # define BOOST_PP_BOOL_73 1 # define BOOST_PP_BOOL_74 1 # define BOOST_PP_BOOL_75 1 # define BOOST_PP_BOOL_76 1 # define BOOST_PP_BOOL_77 1 # define BOOST_PP_BOOL_78 1 # define BOOST_PP_BOOL_79 1 # define BOOST_PP_BOOL_80 1 # define BOOST_PP_BOOL_81 1 # define BOOST_PP_BOOL_82 1 # define BOOST_PP_BOOL_83 1 # define BOOST_PP_BOOL_84 1 # define BOOST_PP_BOOL_85 1 # define BOOST_PP_BOOL_86 1 # define BOOST_PP_BOOL_87 1 # define BOOST_PP_BOOL_88 1 # define BOOST_PP_BOOL_89 1 # define BOOST_PP_BOOL_90 1 # define BOOST_PP_BOOL_91 1 # define BOOST_PP_BOOL_92 1 # define BOOST_PP_BOOL_93 1 # define BOOST_PP_BOOL_94 1 # define BOOST_PP_BOOL_95 1 # define BOOST_PP_BOOL_96 1 # define BOOST_PP_BOOL_97 1 # define BOOST_PP_BOOL_98 1 # define BOOST_PP_BOOL_99 1 # define BOOST_PP_BOOL_100 1 # define BOOST_PP_BOOL_101 1 # define BOOST_PP_BOOL_102 1 # define BOOST_PP_BOOL_103 1 # define BOOST_PP_BOOL_104 1 # define BOOST_PP_BOOL_105 1 # define BOOST_PP_BOOL_106 1 # define BOOST_PP_BOOL_107 1 # define BOOST_PP_BOOL_108 1 # define BOOST_PP_BOOL_109 1 # define BOOST_PP_BOOL_110 1 # define BOOST_PP_BOOL_111 1 # define BOOST_PP_BOOL_112 1 # define BOOST_PP_BOOL_113 1 # define BOOST_PP_BOOL_114 1 # define BOOST_PP_BOOL_115 1 # define BOOST_PP_BOOL_116 1 # define BOOST_PP_BOOL_117 1 # define BOOST_PP_BOOL_118 1 # define BOOST_PP_BOOL_119 1 # define BOOST_PP_BOOL_120 1 # define BOOST_PP_BOOL_121 1 # define BOOST_PP_BOOL_122 1 # define BOOST_PP_BOOL_123 1 # define BOOST_PP_BOOL_124 1 # define BOOST_PP_BOOL_125 1 # define BOOST_PP_BOOL_126 1 # define BOOST_PP_BOOL_127 1 # define BOOST_PP_BOOL_128 1 # define BOOST_PP_BOOL_129 1 # define BOOST_PP_BOOL_130 1 # define BOOST_PP_BOOL_131 1 # define BOOST_PP_BOOL_132 1 # define BOOST_PP_BOOL_133 1 # define BOOST_PP_BOOL_134 1 # define BOOST_PP_BOOL_135 1 # define BOOST_PP_BOOL_136 1 # define BOOST_PP_BOOL_137 1 # define BOOST_PP_BOOL_138 1 # define BOOST_PP_BOOL_139 1 # define BOOST_PP_BOOL_140 1 # define BOOST_PP_BOOL_141 1 # define BOOST_PP_BOOL_142 1 # define BOOST_PP_BOOL_143 1 # define BOOST_PP_BOOL_144 1 # define BOOST_PP_BOOL_145 1 # define BOOST_PP_BOOL_146 1 # define BOOST_PP_BOOL_147 1 # define BOOST_PP_BOOL_148 1 # define BOOST_PP_BOOL_149 1 # define BOOST_PP_BOOL_150 1 # define BOOST_PP_BOOL_151 1 # define BOOST_PP_BOOL_152 1 # define BOOST_PP_BOOL_153 1 # define BOOST_PP_BOOL_154 1 # define BOOST_PP_BOOL_155 1 # define BOOST_PP_BOOL_156 1 # define BOOST_PP_BOOL_157 1 # define BOOST_PP_BOOL_158 1 # define BOOST_PP_BOOL_159 1 # define BOOST_PP_BOOL_160 1 # define BOOST_PP_BOOL_161 1 # define BOOST_PP_BOOL_162 1 # define BOOST_PP_BOOL_163 1 # define BOOST_PP_BOOL_164 1 # define BOOST_PP_BOOL_165 1 # define BOOST_PP_BOOL_166 1 # define BOOST_PP_BOOL_167 1 # define BOOST_PP_BOOL_168 1 # define BOOST_PP_BOOL_169 1 # define BOOST_PP_BOOL_170 1 # define BOOST_PP_BOOL_171 1 # define BOOST_PP_BOOL_172 1 # define BOOST_PP_BOOL_173 1 # define BOOST_PP_BOOL_174 1 # define BOOST_PP_BOOL_175 1 # define BOOST_PP_BOOL_176 1 # define BOOST_PP_BOOL_177 1 # define BOOST_PP_BOOL_178 1 # define BOOST_PP_BOOL_179 1 # define BOOST_PP_BOOL_180 1 # define BOOST_PP_BOOL_181 1 # define BOOST_PP_BOOL_182 1 # define BOOST_PP_BOOL_183 1 # define BOOST_PP_BOOL_184 1 # define BOOST_PP_BOOL_185 1 # define BOOST_PP_BOOL_186 1 # define BOOST_PP_BOOL_187 1 # define BOOST_PP_BOOL_188 1 # define BOOST_PP_BOOL_189 1 # define BOOST_PP_BOOL_190 1 # define BOOST_PP_BOOL_191 1 # define BOOST_PP_BOOL_192 1 # define BOOST_PP_BOOL_193 1 # define BOOST_PP_BOOL_194 1 # define BOOST_PP_BOOL_195 1 # define BOOST_PP_BOOL_196 1 # define BOOST_PP_BOOL_197 1 # define BOOST_PP_BOOL_198 1 # define BOOST_PP_BOOL_199 1 # define BOOST_PP_BOOL_200 1 # define BOOST_PP_BOOL_201 1 # define BOOST_PP_BOOL_202 1 # define BOOST_PP_BOOL_203 1 # define BOOST_PP_BOOL_204 1 # define BOOST_PP_BOOL_205 1 # define BOOST_PP_BOOL_206 1 # define BOOST_PP_BOOL_207 1 # define BOOST_PP_BOOL_208 1 # define BOOST_PP_BOOL_209 1 # define BOOST_PP_BOOL_210 1 # define BOOST_PP_BOOL_211 1 # define BOOST_PP_BOOL_212 1 # define BOOST_PP_BOOL_213 1 # define BOOST_PP_BOOL_214 1 # define BOOST_PP_BOOL_215 1 # define BOOST_PP_BOOL_216 1 # define BOOST_PP_BOOL_217 1 # define BOOST_PP_BOOL_218 1 # define BOOST_PP_BOOL_219 1 # define BOOST_PP_BOOL_220 1 # define BOOST_PP_BOOL_221 1 # define BOOST_PP_BOOL_222 1 # define BOOST_PP_BOOL_223 1 # define BOOST_PP_BOOL_224 1 # define BOOST_PP_BOOL_225 1 # define BOOST_PP_BOOL_226 1 # define BOOST_PP_BOOL_227 1 # define BOOST_PP_BOOL_228 1 # define BOOST_PP_BOOL_229 1 # define BOOST_PP_BOOL_230 1 # define BOOST_PP_BOOL_231 1 # define BOOST_PP_BOOL_232 1 # define BOOST_PP_BOOL_233 1 # define BOOST_PP_BOOL_234 1 # define BOOST_PP_BOOL_235 1 # define BOOST_PP_BOOL_236 1 # define BOOST_PP_BOOL_237 1 # define BOOST_PP_BOOL_238 1 # define BOOST_PP_BOOL_239 1 # define BOOST_PP_BOOL_240 1 # define BOOST_PP_BOOL_241 1 # define BOOST_PP_BOOL_242 1 # define BOOST_PP_BOOL_243 1 # define BOOST_PP_BOOL_244 1 # define BOOST_PP_BOOL_245 1 # define BOOST_PP_BOOL_246 1 # define BOOST_PP_BOOL_247 1 # define BOOST_PP_BOOL_248 1 # define BOOST_PP_BOOL_249 1 # define BOOST_PP_BOOL_250 1 # define BOOST_PP_BOOL_251 1 # define BOOST_PP_BOOL_252 1 # define BOOST_PP_BOOL_253 1 # define BOOST_PP_BOOL_254 1 # define BOOST_PP_BOOL_255 1 # define BOOST_PP_BOOL_256 1 # # endif passenger-4.0.37/ext/boost/preprocessor/logical/compl.hpp000644 000765 000024 00000002432 12233035540 024126 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LOGICAL_COMPL_HPP # define BOOST_PREPROCESSOR_LOGICAL_COMPL_HPP # # include # # /* BOOST_PP_COMPL */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_COMPL(x) BOOST_PP_COMPL_I(x) # else # define BOOST_PP_COMPL(x) BOOST_PP_COMPL_OO((x)) # define BOOST_PP_COMPL_OO(par) BOOST_PP_COMPL_I ## par # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ ## x # else # define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ID(BOOST_PP_COMPL_ ## x) # define BOOST_PP_COMPL_ID(id) id # endif # # define BOOST_PP_COMPL_0 1 # define BOOST_PP_COMPL_1 0 # # endif passenger-4.0.37/ext/boost/preprocessor/list/adt.hpp000644 000765 000024 00000004173 12233035540 023131 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * # * See http://www.boost.org for most recent version. # */ # # /* Revised by Paul Mensonides (2002) */ # # ifndef BOOST_PREPROCESSOR_LIST_ADT_HPP # define BOOST_PREPROCESSOR_LIST_ADT_HPP # # include # include # include # include # # /* BOOST_PP_LIST_CONS */ # # define BOOST_PP_LIST_CONS(head, tail) (head, tail) # # /* BOOST_PP_LIST_NIL */ # # define BOOST_PP_LIST_NIL BOOST_PP_NIL # # /* BOOST_PP_LIST_FIRST */ # # define BOOST_PP_LIST_FIRST(list) BOOST_PP_LIST_FIRST_D(list) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I list # else # define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I ## list # endif # # define BOOST_PP_LIST_FIRST_I(head, tail) head # # /* BOOST_PP_LIST_REST */ # # define BOOST_PP_LIST_REST(list) BOOST_PP_LIST_REST_D(list) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I list # else # define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I ## list # endif # # define BOOST_PP_LIST_REST_I(head, tail) tail # # /* BOOST_PP_LIST_IS_CONS */ # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() # define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_LIST_IS_CONS_D(list) # define BOOST_PP_LIST_IS_CONS_D(list) BOOST_PP_LIST_IS_CONS_ ## list # define BOOST_PP_LIST_IS_CONS_(head, tail) 1 # define BOOST_PP_LIST_IS_CONS_BOOST_PP_NIL 0 # else # define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_IS_BINARY(list) # endif # # /* BOOST_PP_LIST_IS_NIL */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() # define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_IS_BINARY(list)) # else # define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_LIST_IS_CONS(list)) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/list/append.hpp000644 000765 000024 00000002517 12233035540 023630 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_APPEND_HPP # define BOOST_PREPROCESSOR_LIST_APPEND_HPP # # include # include # # /* BOOST_PP_LIST_APPEND */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_APPEND(a, b) BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_APPEND_O, b, a) # else # define BOOST_PP_LIST_APPEND(a, b) BOOST_PP_LIST_APPEND_I(a, b) # define BOOST_PP_LIST_APPEND_I(a, b) BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_APPEND_O, b, a) # endif # # define BOOST_PP_LIST_APPEND_O(d, s, x) (x, s) # # /* BOOST_PP_LIST_APPEND_D */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_APPEND_D(d, a, b) BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_APPEND_O, b, a) # else # define BOOST_PP_LIST_APPEND_D(d, a, b) BOOST_PP_LIST_APPEND_D_I(d, a, b) # define BOOST_PP_LIST_APPEND_D_I(d, a, b) BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_APPEND_O, b, a) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/list/detail/000755 000765 000024 00000000000 12233035540 023105 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/list/fold_left.hpp000644 000765 000024 00000051607 12233035540 024323 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_FOLD_LEFT_HPP # define BOOST_PREPROCESSOR_LIST_FOLD_LEFT_HPP # # include # include # include # include # # /* BOOST_PP_LIST_FOLD_LEFT */ # # if 0 # define BOOST_PP_LIST_FOLD_LEFT(op, state, list) # endif # # define BOOST_PP_LIST_FOLD_LEFT BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) # # define BOOST_PP_LIST_FOLD_LEFT_257(o, s, l) BOOST_PP_ERROR(0x0004) # # define BOOST_PP_LIST_FOLD_LEFT_D(d, o, s, l) BOOST_PP_LIST_FOLD_LEFT_ ## d(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_2ND BOOST_PP_LIST_FOLD_LEFT # define BOOST_PP_LIST_FOLD_LEFT_2ND_D BOOST_PP_LIST_FOLD_LEFT_D # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # include # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # include # else # include # endif # # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_NIL 1 # # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) 0 # # endif passenger-4.0.37/ext/boost/preprocessor/list/fold_right.hpp000644 000765 000024 00000002456 12233035540 024504 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP # define BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP # # include # include # include # include # # if 0 # define BOOST_PP_LIST_FOLD_RIGHT(op, state, list) # endif # # define BOOST_PP_LIST_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) # # define BOOST_PP_LIST_FOLD_RIGHT_257(o, s, l) BOOST_PP_ERROR(0x0004) # # define BOOST_PP_LIST_FOLD_RIGHT_D(d, o, s, l) BOOST_PP_LIST_FOLD_RIGHT_ ## d(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_2ND BOOST_PP_LIST_FOLD_RIGHT # define BOOST_PP_LIST_FOLD_RIGHT_2ND_D BOOST_PP_LIST_FOLD_RIGHT_D # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # include # else # include # endif # # endif passenger-4.0.37/ext/boost/preprocessor/list/for_each_i.hpp000644 000765 000024 00000006331 12233035540 024435 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_LIST_FOR_EACH_I_HPP # define BOOST_PREPROCESSOR_LIST_LIST_FOR_EACH_I_HPP # # include # include # include # include # include # include # # /* BOOST_PP_LIST_FOR_EACH_I */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_LIST_FOR_EACH_I(macro, data, list) BOOST_PP_FOR((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) # else # define BOOST_PP_LIST_FOR_EACH_I(macro, data, list) BOOST_PP_LIST_FOR_EACH_I_I(macro, data, list) # define BOOST_PP_LIST_FOR_EACH_I_I(macro, data, list) BOOST_PP_FOR((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) # endif # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_LIST_FOR_EACH_I_P(r, x) BOOST_PP_LIST_FOR_EACH_I_P_D x # define BOOST_PP_LIST_FOR_EACH_I_P_D(m, d, l, i) BOOST_PP_LIST_IS_CONS(l) # else # define BOOST_PP_LIST_FOR_EACH_I_P(r, x) BOOST_PP_LIST_IS_CONS(BOOST_PP_TUPLE_ELEM(4, 2, x)) # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_LIST_FOR_EACH_I_O(r, x) BOOST_PP_LIST_FOR_EACH_I_O_D x # define BOOST_PP_LIST_FOR_EACH_I_O_D(m, d, l, i) (m, d, BOOST_PP_LIST_REST(l), BOOST_PP_INC(i)) # else # define BOOST_PP_LIST_FOR_EACH_I_O(r, x) (BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_LIST_REST(BOOST_PP_TUPLE_ELEM(4, 2, x)), BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(4, 3, x))) # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_FOR_EACH_I_M(r, x) BOOST_PP_LIST_FOR_EACH_I_M_D(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) # else # define BOOST_PP_LIST_FOR_EACH_I_M(r, x) BOOST_PP_LIST_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_REM_4 x) # define BOOST_PP_LIST_FOR_EACH_I_M_I(r, x_e) BOOST_PP_LIST_FOR_EACH_I_M_D(r, x_e) # endif # # define BOOST_PP_LIST_FOR_EACH_I_M_D(r, m, d, l, i) m(r, d, i, BOOST_PP_LIST_FIRST(l)) # # /* BOOST_PP_LIST_FOR_EACH_I_R */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_FOR_EACH_I_R(r, macro, data, list) BOOST_PP_FOR_ ## r((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) # else # define BOOST_PP_LIST_FOR_EACH_I_R(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_I_R_I(r, macro, data, list) # define BOOST_PP_LIST_FOR_EACH_I_R_I(r, macro, data, list) BOOST_PP_FOR_ ## r((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/list/reverse.hpp000644 000765 000024 00000002623 12233035540 024032 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_REVERSE_HPP # define BOOST_PREPROCESSOR_LIST_REVERSE_HPP # # include # include # # /* BOOST_PP_LIST_REVERSE */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) # else # define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_REVERSE_I(list) # define BOOST_PP_LIST_REVERSE_I(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) # endif # # define BOOST_PP_LIST_REVERSE_O(d, s, x) (x, s) # # /* BOOST_PP_LIST_REVERSE_D */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) # else # define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_REVERSE_D_I(d, list) # define BOOST_PP_LIST_REVERSE_D_I(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/list/transform.hpp000644 000765 000024 00000004401 12233035540 024366 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_TRANSFORM_HPP # define BOOST_PREPROCESSOR_LIST_TRANSFORM_HPP # # include # include # include # include # # /* BOOST_PP_LIST_TRANSFORM */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_TRANSFORM(op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list)) # else # define BOOST_PP_LIST_TRANSFORM(op, data, list) BOOST_PP_LIST_TRANSFORM_I(op, data, list) # define BOOST_PP_LIST_TRANSFORM_I(op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list)) # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_TRANSFORM_O(d, odr, elem) BOOST_PP_LIST_TRANSFORM_O_D(d, BOOST_PP_TUPLE_ELEM(3, 0, odr), BOOST_PP_TUPLE_ELEM(3, 1, odr), BOOST_PP_TUPLE_ELEM(3, 2, odr), elem) # else # define BOOST_PP_LIST_TRANSFORM_O(d, odr, elem) BOOST_PP_LIST_TRANSFORM_O_I(d, BOOST_PP_TUPLE_REM_3 odr, elem) # define BOOST_PP_LIST_TRANSFORM_O_I(d, im, elem) BOOST_PP_LIST_TRANSFORM_O_D(d, im, elem) # endif # # define BOOST_PP_LIST_TRANSFORM_O_D(d, op, data, res, elem) (op, data, (op(d, data, elem), res)) # # /* BOOST_PP_LIST_TRANSFORM_D */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_TRANSFORM_D(d, op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list)) # else # define BOOST_PP_LIST_TRANSFORM_D(d, op, data, list) BOOST_PP_LIST_TRANSFORM_D_I(d, op, data, list) # define BOOST_PP_LIST_TRANSFORM_D_I(d, op, data, list) BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_LIST_FOLD_RIGHT_ ## d(BOOST_PP_LIST_TRANSFORM_O, (op, data, BOOST_PP_NIL), list)) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/list/detail/fold_left.hpp000644 000765 000024 00000172531 12233035540 025565 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP # define BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP # # include # include # include # include # # define BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_2, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(2, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_3, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(3, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_4, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(4, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_5, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(5, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_6, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(6, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_7, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(7, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_8, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(8, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_9, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(9, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_10, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(10, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_11, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(11, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_12, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(12, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_13, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(13, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_14, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(14, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_15, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(15, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_16, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(16, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_17, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(17, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_18, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(18, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_19, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(19, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_20, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(20, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_21, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(21, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_22, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(22, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_23, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(23, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_24, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(24, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_25, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(25, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_26, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(26, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_27, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(27, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_28, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(28, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_29, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(29, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_30, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(30, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_31, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(31, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_32, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(32, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_33, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(33, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_34, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(34, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_35, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(35, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_36, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(36, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_37, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(37, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_38, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(38, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_39, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(39, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_40, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(40, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_41, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(41, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_42, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(42, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_43, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(43, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_44, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(44, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_45, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(45, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_46, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(46, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_47, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(47, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_48, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(48, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_49, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(49, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_50, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(50, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_51, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(51, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_52, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(52, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_53, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(53, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_54, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(54, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_55, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(55, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_56, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(56, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_57, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(57, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_58, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(58, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_59, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(59, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_60, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(60, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_61, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(61, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_62, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(62, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_63, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(63, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_64, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(64, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_65, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(65, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_66, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(66, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_67, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(67, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_68, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(68, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_69, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(69, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_70, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(70, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_71, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(71, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_72, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(72, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_73, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(73, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_74, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(74, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_75, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(75, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_76, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(76, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_77, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(77, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_78, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(78, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_79, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(79, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_80, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(80, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_81, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(81, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_82, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(82, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_83, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(83, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_84, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(84, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_85, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(85, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_86, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(86, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_87, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(87, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_88, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(88, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_89, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(89, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_90, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(90, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_91, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(91, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_92, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(92, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_93, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(93, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_94, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(94, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_95, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(95, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_96, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(96, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_97, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(97, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_98, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(98, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_99, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(99, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_100, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(100, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_101, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(101, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_102, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(102, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_103, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(103, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_104, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(104, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_105, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(105, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_106, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(106, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_107, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(107, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_108, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(108, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_109, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(109, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_110, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(110, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_111, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(111, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_112, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(112, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_113, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(113, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_114, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(114, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_115, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(115, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_116, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(116, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_117, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(117, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_118, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(118, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_119, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(119, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_120, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(120, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_121, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(121, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_122, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(122, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_123, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(123, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_124, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(124, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_125, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(125, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_126, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(126, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_127, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(127, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_128, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(128, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_129, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(129, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_130, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(130, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_131, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(131, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_132, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(132, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_133, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(133, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_134, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(134, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_135, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(135, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_136, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(136, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_137, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(137, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_138, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(138, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_139, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(139, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_140, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(140, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_141, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(141, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_142, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(142, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_143, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(143, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_144, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(144, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_145, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(145, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_146, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(146, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_147, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(147, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_148, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(148, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_149, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(149, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_150, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(150, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_151, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(151, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_152, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(152, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_153, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(153, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_154, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(154, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_155, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(155, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_156, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(156, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_157, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(157, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_158, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(158, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_159, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(159, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_160, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(160, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_161, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(161, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_162, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(162, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_163, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(163, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_164, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(164, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_165, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(165, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_166, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(166, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_167, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(167, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_168, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(168, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_169, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(169, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_170, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(170, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_171, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(171, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_172, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(172, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_173, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(173, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_174, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(174, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_175, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(175, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_176, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(176, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_177, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(177, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_178, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(178, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_179, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(179, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_180, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(180, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_181, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(181, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_182, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(182, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_183, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(183, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_184, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(184, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_185, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(185, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_186, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(186, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_187, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(187, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_188, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(188, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_189, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(189, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_190, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(190, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_191, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(191, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_192, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(192, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_193, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(193, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_194, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(194, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_195, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(195, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_196, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(196, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_197, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(197, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_198, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(198, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_199, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(199, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_200, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(200, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_201, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(201, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_202, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(202, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_203, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(203, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_204, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(204, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_205, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(205, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_206, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(206, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_207, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(207, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_208, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(208, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_209, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(209, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_210, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(210, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_211, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(211, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_212, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(212, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_213, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(213, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_214, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(214, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_215, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(215, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_216, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(216, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_217, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(217, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_218, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(218, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_219, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(219, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_220, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(220, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_221, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(221, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_222, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(222, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_223, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(223, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_224, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(224, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_225, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(225, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_226, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(226, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_227, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(227, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_228, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(228, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_229, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(229, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_230, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(230, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_231, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(231, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_232, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(232, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_233, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(233, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_234, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(234, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_235, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(235, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_236, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(236, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_237, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(237, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_238, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(238, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_239, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(239, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_240, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(240, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_241, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(241, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_242, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(242, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_243, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(243, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_244, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(244, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_245, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(245, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_246, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(246, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_247, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(247, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_248, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(248, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_249, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(249, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_250, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(250, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_251, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(251, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_252, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(252, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_253, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(253, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_254, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(254, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_255, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(255, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_256, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(256, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_257, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(257, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # # endif passenger-4.0.37/ext/boost/preprocessor/list/detail/fold_right.hpp000644 000765 000024 00000071375 12233035540 025754 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_RIGHT_HPP # define BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_RIGHT_HPP # # include # include # # define BOOST_PP_LIST_FOLD_RIGHT_1(o, s, l) BOOST_PP_LIST_FOLD_LEFT_1(o, s, BOOST_PP_LIST_REVERSE_D(1, l)) # define BOOST_PP_LIST_FOLD_RIGHT_2(o, s, l) BOOST_PP_LIST_FOLD_LEFT_2(o, s, BOOST_PP_LIST_REVERSE_D(2, l)) # define BOOST_PP_LIST_FOLD_RIGHT_3(o, s, l) BOOST_PP_LIST_FOLD_LEFT_3(o, s, BOOST_PP_LIST_REVERSE_D(3, l)) # define BOOST_PP_LIST_FOLD_RIGHT_4(o, s, l) BOOST_PP_LIST_FOLD_LEFT_4(o, s, BOOST_PP_LIST_REVERSE_D(4, l)) # define BOOST_PP_LIST_FOLD_RIGHT_5(o, s, l) BOOST_PP_LIST_FOLD_LEFT_5(o, s, BOOST_PP_LIST_REVERSE_D(5, l)) # define BOOST_PP_LIST_FOLD_RIGHT_6(o, s, l) BOOST_PP_LIST_FOLD_LEFT_6(o, s, BOOST_PP_LIST_REVERSE_D(6, l)) # define BOOST_PP_LIST_FOLD_RIGHT_7(o, s, l) BOOST_PP_LIST_FOLD_LEFT_7(o, s, BOOST_PP_LIST_REVERSE_D(7, l)) # define BOOST_PP_LIST_FOLD_RIGHT_8(o, s, l) BOOST_PP_LIST_FOLD_LEFT_8(o, s, BOOST_PP_LIST_REVERSE_D(8, l)) # define BOOST_PP_LIST_FOLD_RIGHT_9(o, s, l) BOOST_PP_LIST_FOLD_LEFT_9(o, s, BOOST_PP_LIST_REVERSE_D(9, l)) # define BOOST_PP_LIST_FOLD_RIGHT_10(o, s, l) BOOST_PP_LIST_FOLD_LEFT_10(o, s, BOOST_PP_LIST_REVERSE_D(10, l)) # define BOOST_PP_LIST_FOLD_RIGHT_11(o, s, l) BOOST_PP_LIST_FOLD_LEFT_11(o, s, BOOST_PP_LIST_REVERSE_D(11, l)) # define BOOST_PP_LIST_FOLD_RIGHT_12(o, s, l) BOOST_PP_LIST_FOLD_LEFT_12(o, s, BOOST_PP_LIST_REVERSE_D(12, l)) # define BOOST_PP_LIST_FOLD_RIGHT_13(o, s, l) BOOST_PP_LIST_FOLD_LEFT_13(o, s, BOOST_PP_LIST_REVERSE_D(13, l)) # define BOOST_PP_LIST_FOLD_RIGHT_14(o, s, l) BOOST_PP_LIST_FOLD_LEFT_14(o, s, BOOST_PP_LIST_REVERSE_D(14, l)) # define BOOST_PP_LIST_FOLD_RIGHT_15(o, s, l) BOOST_PP_LIST_FOLD_LEFT_15(o, s, BOOST_PP_LIST_REVERSE_D(15, l)) # define BOOST_PP_LIST_FOLD_RIGHT_16(o, s, l) BOOST_PP_LIST_FOLD_LEFT_16(o, s, BOOST_PP_LIST_REVERSE_D(16, l)) # define BOOST_PP_LIST_FOLD_RIGHT_17(o, s, l) BOOST_PP_LIST_FOLD_LEFT_17(o, s, BOOST_PP_LIST_REVERSE_D(17, l)) # define BOOST_PP_LIST_FOLD_RIGHT_18(o, s, l) BOOST_PP_LIST_FOLD_LEFT_18(o, s, BOOST_PP_LIST_REVERSE_D(18, l)) # define BOOST_PP_LIST_FOLD_RIGHT_19(o, s, l) BOOST_PP_LIST_FOLD_LEFT_19(o, s, BOOST_PP_LIST_REVERSE_D(19, l)) # define BOOST_PP_LIST_FOLD_RIGHT_20(o, s, l) BOOST_PP_LIST_FOLD_LEFT_20(o, s, BOOST_PP_LIST_REVERSE_D(20, l)) # define BOOST_PP_LIST_FOLD_RIGHT_21(o, s, l) BOOST_PP_LIST_FOLD_LEFT_21(o, s, BOOST_PP_LIST_REVERSE_D(21, l)) # define BOOST_PP_LIST_FOLD_RIGHT_22(o, s, l) BOOST_PP_LIST_FOLD_LEFT_22(o, s, BOOST_PP_LIST_REVERSE_D(22, l)) # define BOOST_PP_LIST_FOLD_RIGHT_23(o, s, l) BOOST_PP_LIST_FOLD_LEFT_23(o, s, BOOST_PP_LIST_REVERSE_D(23, l)) # define BOOST_PP_LIST_FOLD_RIGHT_24(o, s, l) BOOST_PP_LIST_FOLD_LEFT_24(o, s, BOOST_PP_LIST_REVERSE_D(24, l)) # define BOOST_PP_LIST_FOLD_RIGHT_25(o, s, l) BOOST_PP_LIST_FOLD_LEFT_25(o, s, BOOST_PP_LIST_REVERSE_D(25, l)) # define BOOST_PP_LIST_FOLD_RIGHT_26(o, s, l) BOOST_PP_LIST_FOLD_LEFT_26(o, s, BOOST_PP_LIST_REVERSE_D(26, l)) # define BOOST_PP_LIST_FOLD_RIGHT_27(o, s, l) BOOST_PP_LIST_FOLD_LEFT_27(o, s, BOOST_PP_LIST_REVERSE_D(27, l)) # define BOOST_PP_LIST_FOLD_RIGHT_28(o, s, l) BOOST_PP_LIST_FOLD_LEFT_28(o, s, BOOST_PP_LIST_REVERSE_D(28, l)) # define BOOST_PP_LIST_FOLD_RIGHT_29(o, s, l) BOOST_PP_LIST_FOLD_LEFT_29(o, s, BOOST_PP_LIST_REVERSE_D(29, l)) # define BOOST_PP_LIST_FOLD_RIGHT_30(o, s, l) BOOST_PP_LIST_FOLD_LEFT_30(o, s, BOOST_PP_LIST_REVERSE_D(30, l)) # define BOOST_PP_LIST_FOLD_RIGHT_31(o, s, l) BOOST_PP_LIST_FOLD_LEFT_31(o, s, BOOST_PP_LIST_REVERSE_D(31, l)) # define BOOST_PP_LIST_FOLD_RIGHT_32(o, s, l) BOOST_PP_LIST_FOLD_LEFT_32(o, s, BOOST_PP_LIST_REVERSE_D(32, l)) # define BOOST_PP_LIST_FOLD_RIGHT_33(o, s, l) BOOST_PP_LIST_FOLD_LEFT_33(o, s, BOOST_PP_LIST_REVERSE_D(33, l)) # define BOOST_PP_LIST_FOLD_RIGHT_34(o, s, l) BOOST_PP_LIST_FOLD_LEFT_34(o, s, BOOST_PP_LIST_REVERSE_D(34, l)) # define BOOST_PP_LIST_FOLD_RIGHT_35(o, s, l) BOOST_PP_LIST_FOLD_LEFT_35(o, s, BOOST_PP_LIST_REVERSE_D(35, l)) # define BOOST_PP_LIST_FOLD_RIGHT_36(o, s, l) BOOST_PP_LIST_FOLD_LEFT_36(o, s, BOOST_PP_LIST_REVERSE_D(36, l)) # define BOOST_PP_LIST_FOLD_RIGHT_37(o, s, l) BOOST_PP_LIST_FOLD_LEFT_37(o, s, BOOST_PP_LIST_REVERSE_D(37, l)) # define BOOST_PP_LIST_FOLD_RIGHT_38(o, s, l) BOOST_PP_LIST_FOLD_LEFT_38(o, s, BOOST_PP_LIST_REVERSE_D(38, l)) # define BOOST_PP_LIST_FOLD_RIGHT_39(o, s, l) BOOST_PP_LIST_FOLD_LEFT_39(o, s, BOOST_PP_LIST_REVERSE_D(39, l)) # define BOOST_PP_LIST_FOLD_RIGHT_40(o, s, l) BOOST_PP_LIST_FOLD_LEFT_40(o, s, BOOST_PP_LIST_REVERSE_D(40, l)) # define BOOST_PP_LIST_FOLD_RIGHT_41(o, s, l) BOOST_PP_LIST_FOLD_LEFT_41(o, s, BOOST_PP_LIST_REVERSE_D(41, l)) # define BOOST_PP_LIST_FOLD_RIGHT_42(o, s, l) BOOST_PP_LIST_FOLD_LEFT_42(o, s, BOOST_PP_LIST_REVERSE_D(42, l)) # define BOOST_PP_LIST_FOLD_RIGHT_43(o, s, l) BOOST_PP_LIST_FOLD_LEFT_43(o, s, BOOST_PP_LIST_REVERSE_D(43, l)) # define BOOST_PP_LIST_FOLD_RIGHT_44(o, s, l) BOOST_PP_LIST_FOLD_LEFT_44(o, s, BOOST_PP_LIST_REVERSE_D(44, l)) # define BOOST_PP_LIST_FOLD_RIGHT_45(o, s, l) BOOST_PP_LIST_FOLD_LEFT_45(o, s, BOOST_PP_LIST_REVERSE_D(45, l)) # define BOOST_PP_LIST_FOLD_RIGHT_46(o, s, l) BOOST_PP_LIST_FOLD_LEFT_46(o, s, BOOST_PP_LIST_REVERSE_D(46, l)) # define BOOST_PP_LIST_FOLD_RIGHT_47(o, s, l) BOOST_PP_LIST_FOLD_LEFT_47(o, s, BOOST_PP_LIST_REVERSE_D(47, l)) # define BOOST_PP_LIST_FOLD_RIGHT_48(o, s, l) BOOST_PP_LIST_FOLD_LEFT_48(o, s, BOOST_PP_LIST_REVERSE_D(48, l)) # define BOOST_PP_LIST_FOLD_RIGHT_49(o, s, l) BOOST_PP_LIST_FOLD_LEFT_49(o, s, BOOST_PP_LIST_REVERSE_D(49, l)) # define BOOST_PP_LIST_FOLD_RIGHT_50(o, s, l) BOOST_PP_LIST_FOLD_LEFT_50(o, s, BOOST_PP_LIST_REVERSE_D(50, l)) # define BOOST_PP_LIST_FOLD_RIGHT_51(o, s, l) BOOST_PP_LIST_FOLD_LEFT_51(o, s, BOOST_PP_LIST_REVERSE_D(51, l)) # define BOOST_PP_LIST_FOLD_RIGHT_52(o, s, l) BOOST_PP_LIST_FOLD_LEFT_52(o, s, BOOST_PP_LIST_REVERSE_D(52, l)) # define BOOST_PP_LIST_FOLD_RIGHT_53(o, s, l) BOOST_PP_LIST_FOLD_LEFT_53(o, s, BOOST_PP_LIST_REVERSE_D(53, l)) # define BOOST_PP_LIST_FOLD_RIGHT_54(o, s, l) BOOST_PP_LIST_FOLD_LEFT_54(o, s, BOOST_PP_LIST_REVERSE_D(54, l)) # define BOOST_PP_LIST_FOLD_RIGHT_55(o, s, l) BOOST_PP_LIST_FOLD_LEFT_55(o, s, BOOST_PP_LIST_REVERSE_D(55, l)) # define BOOST_PP_LIST_FOLD_RIGHT_56(o, s, l) BOOST_PP_LIST_FOLD_LEFT_56(o, s, BOOST_PP_LIST_REVERSE_D(56, l)) # define BOOST_PP_LIST_FOLD_RIGHT_57(o, s, l) BOOST_PP_LIST_FOLD_LEFT_57(o, s, BOOST_PP_LIST_REVERSE_D(57, l)) # define BOOST_PP_LIST_FOLD_RIGHT_58(o, s, l) BOOST_PP_LIST_FOLD_LEFT_58(o, s, BOOST_PP_LIST_REVERSE_D(58, l)) # define BOOST_PP_LIST_FOLD_RIGHT_59(o, s, l) BOOST_PP_LIST_FOLD_LEFT_59(o, s, BOOST_PP_LIST_REVERSE_D(59, l)) # define BOOST_PP_LIST_FOLD_RIGHT_60(o, s, l) BOOST_PP_LIST_FOLD_LEFT_60(o, s, BOOST_PP_LIST_REVERSE_D(60, l)) # define BOOST_PP_LIST_FOLD_RIGHT_61(o, s, l) BOOST_PP_LIST_FOLD_LEFT_61(o, s, BOOST_PP_LIST_REVERSE_D(61, l)) # define BOOST_PP_LIST_FOLD_RIGHT_62(o, s, l) BOOST_PP_LIST_FOLD_LEFT_62(o, s, BOOST_PP_LIST_REVERSE_D(62, l)) # define BOOST_PP_LIST_FOLD_RIGHT_63(o, s, l) BOOST_PP_LIST_FOLD_LEFT_63(o, s, BOOST_PP_LIST_REVERSE_D(63, l)) # define BOOST_PP_LIST_FOLD_RIGHT_64(o, s, l) BOOST_PP_LIST_FOLD_LEFT_64(o, s, BOOST_PP_LIST_REVERSE_D(64, l)) # define BOOST_PP_LIST_FOLD_RIGHT_65(o, s, l) BOOST_PP_LIST_FOLD_LEFT_65(o, s, BOOST_PP_LIST_REVERSE_D(65, l)) # define BOOST_PP_LIST_FOLD_RIGHT_66(o, s, l) BOOST_PP_LIST_FOLD_LEFT_66(o, s, BOOST_PP_LIST_REVERSE_D(66, l)) # define BOOST_PP_LIST_FOLD_RIGHT_67(o, s, l) BOOST_PP_LIST_FOLD_LEFT_67(o, s, BOOST_PP_LIST_REVERSE_D(67, l)) # define BOOST_PP_LIST_FOLD_RIGHT_68(o, s, l) BOOST_PP_LIST_FOLD_LEFT_68(o, s, BOOST_PP_LIST_REVERSE_D(68, l)) # define BOOST_PP_LIST_FOLD_RIGHT_69(o, s, l) BOOST_PP_LIST_FOLD_LEFT_69(o, s, BOOST_PP_LIST_REVERSE_D(69, l)) # define BOOST_PP_LIST_FOLD_RIGHT_70(o, s, l) BOOST_PP_LIST_FOLD_LEFT_70(o, s, BOOST_PP_LIST_REVERSE_D(70, l)) # define BOOST_PP_LIST_FOLD_RIGHT_71(o, s, l) BOOST_PP_LIST_FOLD_LEFT_71(o, s, BOOST_PP_LIST_REVERSE_D(71, l)) # define BOOST_PP_LIST_FOLD_RIGHT_72(o, s, l) BOOST_PP_LIST_FOLD_LEFT_72(o, s, BOOST_PP_LIST_REVERSE_D(72, l)) # define BOOST_PP_LIST_FOLD_RIGHT_73(o, s, l) BOOST_PP_LIST_FOLD_LEFT_73(o, s, BOOST_PP_LIST_REVERSE_D(73, l)) # define BOOST_PP_LIST_FOLD_RIGHT_74(o, s, l) BOOST_PP_LIST_FOLD_LEFT_74(o, s, BOOST_PP_LIST_REVERSE_D(74, l)) # define BOOST_PP_LIST_FOLD_RIGHT_75(o, s, l) BOOST_PP_LIST_FOLD_LEFT_75(o, s, BOOST_PP_LIST_REVERSE_D(75, l)) # define BOOST_PP_LIST_FOLD_RIGHT_76(o, s, l) BOOST_PP_LIST_FOLD_LEFT_76(o, s, BOOST_PP_LIST_REVERSE_D(76, l)) # define BOOST_PP_LIST_FOLD_RIGHT_77(o, s, l) BOOST_PP_LIST_FOLD_LEFT_77(o, s, BOOST_PP_LIST_REVERSE_D(77, l)) # define BOOST_PP_LIST_FOLD_RIGHT_78(o, s, l) BOOST_PP_LIST_FOLD_LEFT_78(o, s, BOOST_PP_LIST_REVERSE_D(78, l)) # define BOOST_PP_LIST_FOLD_RIGHT_79(o, s, l) BOOST_PP_LIST_FOLD_LEFT_79(o, s, BOOST_PP_LIST_REVERSE_D(79, l)) # define BOOST_PP_LIST_FOLD_RIGHT_80(o, s, l) BOOST_PP_LIST_FOLD_LEFT_80(o, s, BOOST_PP_LIST_REVERSE_D(80, l)) # define BOOST_PP_LIST_FOLD_RIGHT_81(o, s, l) BOOST_PP_LIST_FOLD_LEFT_81(o, s, BOOST_PP_LIST_REVERSE_D(81, l)) # define BOOST_PP_LIST_FOLD_RIGHT_82(o, s, l) BOOST_PP_LIST_FOLD_LEFT_82(o, s, BOOST_PP_LIST_REVERSE_D(82, l)) # define BOOST_PP_LIST_FOLD_RIGHT_83(o, s, l) BOOST_PP_LIST_FOLD_LEFT_83(o, s, BOOST_PP_LIST_REVERSE_D(83, l)) # define BOOST_PP_LIST_FOLD_RIGHT_84(o, s, l) BOOST_PP_LIST_FOLD_LEFT_84(o, s, BOOST_PP_LIST_REVERSE_D(84, l)) # define BOOST_PP_LIST_FOLD_RIGHT_85(o, s, l) BOOST_PP_LIST_FOLD_LEFT_85(o, s, BOOST_PP_LIST_REVERSE_D(85, l)) # define BOOST_PP_LIST_FOLD_RIGHT_86(o, s, l) BOOST_PP_LIST_FOLD_LEFT_86(o, s, BOOST_PP_LIST_REVERSE_D(86, l)) # define BOOST_PP_LIST_FOLD_RIGHT_87(o, s, l) BOOST_PP_LIST_FOLD_LEFT_87(o, s, BOOST_PP_LIST_REVERSE_D(87, l)) # define BOOST_PP_LIST_FOLD_RIGHT_88(o, s, l) BOOST_PP_LIST_FOLD_LEFT_88(o, s, BOOST_PP_LIST_REVERSE_D(88, l)) # define BOOST_PP_LIST_FOLD_RIGHT_89(o, s, l) BOOST_PP_LIST_FOLD_LEFT_89(o, s, BOOST_PP_LIST_REVERSE_D(89, l)) # define BOOST_PP_LIST_FOLD_RIGHT_90(o, s, l) BOOST_PP_LIST_FOLD_LEFT_90(o, s, BOOST_PP_LIST_REVERSE_D(90, l)) # define BOOST_PP_LIST_FOLD_RIGHT_91(o, s, l) BOOST_PP_LIST_FOLD_LEFT_91(o, s, BOOST_PP_LIST_REVERSE_D(91, l)) # define BOOST_PP_LIST_FOLD_RIGHT_92(o, s, l) BOOST_PP_LIST_FOLD_LEFT_92(o, s, BOOST_PP_LIST_REVERSE_D(92, l)) # define BOOST_PP_LIST_FOLD_RIGHT_93(o, s, l) BOOST_PP_LIST_FOLD_LEFT_93(o, s, BOOST_PP_LIST_REVERSE_D(93, l)) # define BOOST_PP_LIST_FOLD_RIGHT_94(o, s, l) BOOST_PP_LIST_FOLD_LEFT_94(o, s, BOOST_PP_LIST_REVERSE_D(94, l)) # define BOOST_PP_LIST_FOLD_RIGHT_95(o, s, l) BOOST_PP_LIST_FOLD_LEFT_95(o, s, BOOST_PP_LIST_REVERSE_D(95, l)) # define BOOST_PP_LIST_FOLD_RIGHT_96(o, s, l) BOOST_PP_LIST_FOLD_LEFT_96(o, s, BOOST_PP_LIST_REVERSE_D(96, l)) # define BOOST_PP_LIST_FOLD_RIGHT_97(o, s, l) BOOST_PP_LIST_FOLD_LEFT_97(o, s, BOOST_PP_LIST_REVERSE_D(97, l)) # define BOOST_PP_LIST_FOLD_RIGHT_98(o, s, l) BOOST_PP_LIST_FOLD_LEFT_98(o, s, BOOST_PP_LIST_REVERSE_D(98, l)) # define BOOST_PP_LIST_FOLD_RIGHT_99(o, s, l) BOOST_PP_LIST_FOLD_LEFT_99(o, s, BOOST_PP_LIST_REVERSE_D(99, l)) # define BOOST_PP_LIST_FOLD_RIGHT_100(o, s, l) BOOST_PP_LIST_FOLD_LEFT_100(o, s, BOOST_PP_LIST_REVERSE_D(100, l)) # define BOOST_PP_LIST_FOLD_RIGHT_101(o, s, l) BOOST_PP_LIST_FOLD_LEFT_101(o, s, BOOST_PP_LIST_REVERSE_D(101, l)) # define BOOST_PP_LIST_FOLD_RIGHT_102(o, s, l) BOOST_PP_LIST_FOLD_LEFT_102(o, s, BOOST_PP_LIST_REVERSE_D(102, l)) # define BOOST_PP_LIST_FOLD_RIGHT_103(o, s, l) BOOST_PP_LIST_FOLD_LEFT_103(o, s, BOOST_PP_LIST_REVERSE_D(103, l)) # define BOOST_PP_LIST_FOLD_RIGHT_104(o, s, l) BOOST_PP_LIST_FOLD_LEFT_104(o, s, BOOST_PP_LIST_REVERSE_D(104, l)) # define BOOST_PP_LIST_FOLD_RIGHT_105(o, s, l) BOOST_PP_LIST_FOLD_LEFT_105(o, s, BOOST_PP_LIST_REVERSE_D(105, l)) # define BOOST_PP_LIST_FOLD_RIGHT_106(o, s, l) BOOST_PP_LIST_FOLD_LEFT_106(o, s, BOOST_PP_LIST_REVERSE_D(106, l)) # define BOOST_PP_LIST_FOLD_RIGHT_107(o, s, l) BOOST_PP_LIST_FOLD_LEFT_107(o, s, BOOST_PP_LIST_REVERSE_D(107, l)) # define BOOST_PP_LIST_FOLD_RIGHT_108(o, s, l) BOOST_PP_LIST_FOLD_LEFT_108(o, s, BOOST_PP_LIST_REVERSE_D(108, l)) # define BOOST_PP_LIST_FOLD_RIGHT_109(o, s, l) BOOST_PP_LIST_FOLD_LEFT_109(o, s, BOOST_PP_LIST_REVERSE_D(109, l)) # define BOOST_PP_LIST_FOLD_RIGHT_110(o, s, l) BOOST_PP_LIST_FOLD_LEFT_110(o, s, BOOST_PP_LIST_REVERSE_D(110, l)) # define BOOST_PP_LIST_FOLD_RIGHT_111(o, s, l) BOOST_PP_LIST_FOLD_LEFT_111(o, s, BOOST_PP_LIST_REVERSE_D(111, l)) # define BOOST_PP_LIST_FOLD_RIGHT_112(o, s, l) BOOST_PP_LIST_FOLD_LEFT_112(o, s, BOOST_PP_LIST_REVERSE_D(112, l)) # define BOOST_PP_LIST_FOLD_RIGHT_113(o, s, l) BOOST_PP_LIST_FOLD_LEFT_113(o, s, BOOST_PP_LIST_REVERSE_D(113, l)) # define BOOST_PP_LIST_FOLD_RIGHT_114(o, s, l) BOOST_PP_LIST_FOLD_LEFT_114(o, s, BOOST_PP_LIST_REVERSE_D(114, l)) # define BOOST_PP_LIST_FOLD_RIGHT_115(o, s, l) BOOST_PP_LIST_FOLD_LEFT_115(o, s, BOOST_PP_LIST_REVERSE_D(115, l)) # define BOOST_PP_LIST_FOLD_RIGHT_116(o, s, l) BOOST_PP_LIST_FOLD_LEFT_116(o, s, BOOST_PP_LIST_REVERSE_D(116, l)) # define BOOST_PP_LIST_FOLD_RIGHT_117(o, s, l) BOOST_PP_LIST_FOLD_LEFT_117(o, s, BOOST_PP_LIST_REVERSE_D(117, l)) # define BOOST_PP_LIST_FOLD_RIGHT_118(o, s, l) BOOST_PP_LIST_FOLD_LEFT_118(o, s, BOOST_PP_LIST_REVERSE_D(118, l)) # define BOOST_PP_LIST_FOLD_RIGHT_119(o, s, l) BOOST_PP_LIST_FOLD_LEFT_119(o, s, BOOST_PP_LIST_REVERSE_D(119, l)) # define BOOST_PP_LIST_FOLD_RIGHT_120(o, s, l) BOOST_PP_LIST_FOLD_LEFT_120(o, s, BOOST_PP_LIST_REVERSE_D(120, l)) # define BOOST_PP_LIST_FOLD_RIGHT_121(o, s, l) BOOST_PP_LIST_FOLD_LEFT_121(o, s, BOOST_PP_LIST_REVERSE_D(121, l)) # define BOOST_PP_LIST_FOLD_RIGHT_122(o, s, l) BOOST_PP_LIST_FOLD_LEFT_122(o, s, BOOST_PP_LIST_REVERSE_D(122, l)) # define BOOST_PP_LIST_FOLD_RIGHT_123(o, s, l) BOOST_PP_LIST_FOLD_LEFT_123(o, s, BOOST_PP_LIST_REVERSE_D(123, l)) # define BOOST_PP_LIST_FOLD_RIGHT_124(o, s, l) BOOST_PP_LIST_FOLD_LEFT_124(o, s, BOOST_PP_LIST_REVERSE_D(124, l)) # define BOOST_PP_LIST_FOLD_RIGHT_125(o, s, l) BOOST_PP_LIST_FOLD_LEFT_125(o, s, BOOST_PP_LIST_REVERSE_D(125, l)) # define BOOST_PP_LIST_FOLD_RIGHT_126(o, s, l) BOOST_PP_LIST_FOLD_LEFT_126(o, s, BOOST_PP_LIST_REVERSE_D(126, l)) # define BOOST_PP_LIST_FOLD_RIGHT_127(o, s, l) BOOST_PP_LIST_FOLD_LEFT_127(o, s, BOOST_PP_LIST_REVERSE_D(127, l)) # define BOOST_PP_LIST_FOLD_RIGHT_128(o, s, l) BOOST_PP_LIST_FOLD_LEFT_128(o, s, BOOST_PP_LIST_REVERSE_D(128, l)) # define BOOST_PP_LIST_FOLD_RIGHT_129(o, s, l) BOOST_PP_LIST_FOLD_LEFT_129(o, s, BOOST_PP_LIST_REVERSE_D(129, l)) # define BOOST_PP_LIST_FOLD_RIGHT_130(o, s, l) BOOST_PP_LIST_FOLD_LEFT_130(o, s, BOOST_PP_LIST_REVERSE_D(130, l)) # define BOOST_PP_LIST_FOLD_RIGHT_131(o, s, l) BOOST_PP_LIST_FOLD_LEFT_131(o, s, BOOST_PP_LIST_REVERSE_D(131, l)) # define BOOST_PP_LIST_FOLD_RIGHT_132(o, s, l) BOOST_PP_LIST_FOLD_LEFT_132(o, s, BOOST_PP_LIST_REVERSE_D(132, l)) # define BOOST_PP_LIST_FOLD_RIGHT_133(o, s, l) BOOST_PP_LIST_FOLD_LEFT_133(o, s, BOOST_PP_LIST_REVERSE_D(133, l)) # define BOOST_PP_LIST_FOLD_RIGHT_134(o, s, l) BOOST_PP_LIST_FOLD_LEFT_134(o, s, BOOST_PP_LIST_REVERSE_D(134, l)) # define BOOST_PP_LIST_FOLD_RIGHT_135(o, s, l) BOOST_PP_LIST_FOLD_LEFT_135(o, s, BOOST_PP_LIST_REVERSE_D(135, l)) # define BOOST_PP_LIST_FOLD_RIGHT_136(o, s, l) BOOST_PP_LIST_FOLD_LEFT_136(o, s, BOOST_PP_LIST_REVERSE_D(136, l)) # define BOOST_PP_LIST_FOLD_RIGHT_137(o, s, l) BOOST_PP_LIST_FOLD_LEFT_137(o, s, BOOST_PP_LIST_REVERSE_D(137, l)) # define BOOST_PP_LIST_FOLD_RIGHT_138(o, s, l) BOOST_PP_LIST_FOLD_LEFT_138(o, s, BOOST_PP_LIST_REVERSE_D(138, l)) # define BOOST_PP_LIST_FOLD_RIGHT_139(o, s, l) BOOST_PP_LIST_FOLD_LEFT_139(o, s, BOOST_PP_LIST_REVERSE_D(139, l)) # define BOOST_PP_LIST_FOLD_RIGHT_140(o, s, l) BOOST_PP_LIST_FOLD_LEFT_140(o, s, BOOST_PP_LIST_REVERSE_D(140, l)) # define BOOST_PP_LIST_FOLD_RIGHT_141(o, s, l) BOOST_PP_LIST_FOLD_LEFT_141(o, s, BOOST_PP_LIST_REVERSE_D(141, l)) # define BOOST_PP_LIST_FOLD_RIGHT_142(o, s, l) BOOST_PP_LIST_FOLD_LEFT_142(o, s, BOOST_PP_LIST_REVERSE_D(142, l)) # define BOOST_PP_LIST_FOLD_RIGHT_143(o, s, l) BOOST_PP_LIST_FOLD_LEFT_143(o, s, BOOST_PP_LIST_REVERSE_D(143, l)) # define BOOST_PP_LIST_FOLD_RIGHT_144(o, s, l) BOOST_PP_LIST_FOLD_LEFT_144(o, s, BOOST_PP_LIST_REVERSE_D(144, l)) # define BOOST_PP_LIST_FOLD_RIGHT_145(o, s, l) BOOST_PP_LIST_FOLD_LEFT_145(o, s, BOOST_PP_LIST_REVERSE_D(145, l)) # define BOOST_PP_LIST_FOLD_RIGHT_146(o, s, l) BOOST_PP_LIST_FOLD_LEFT_146(o, s, BOOST_PP_LIST_REVERSE_D(146, l)) # define BOOST_PP_LIST_FOLD_RIGHT_147(o, s, l) BOOST_PP_LIST_FOLD_LEFT_147(o, s, BOOST_PP_LIST_REVERSE_D(147, l)) # define BOOST_PP_LIST_FOLD_RIGHT_148(o, s, l) BOOST_PP_LIST_FOLD_LEFT_148(o, s, BOOST_PP_LIST_REVERSE_D(148, l)) # define BOOST_PP_LIST_FOLD_RIGHT_149(o, s, l) BOOST_PP_LIST_FOLD_LEFT_149(o, s, BOOST_PP_LIST_REVERSE_D(149, l)) # define BOOST_PP_LIST_FOLD_RIGHT_150(o, s, l) BOOST_PP_LIST_FOLD_LEFT_150(o, s, BOOST_PP_LIST_REVERSE_D(150, l)) # define BOOST_PP_LIST_FOLD_RIGHT_151(o, s, l) BOOST_PP_LIST_FOLD_LEFT_151(o, s, BOOST_PP_LIST_REVERSE_D(151, l)) # define BOOST_PP_LIST_FOLD_RIGHT_152(o, s, l) BOOST_PP_LIST_FOLD_LEFT_152(o, s, BOOST_PP_LIST_REVERSE_D(152, l)) # define BOOST_PP_LIST_FOLD_RIGHT_153(o, s, l) BOOST_PP_LIST_FOLD_LEFT_153(o, s, BOOST_PP_LIST_REVERSE_D(153, l)) # define BOOST_PP_LIST_FOLD_RIGHT_154(o, s, l) BOOST_PP_LIST_FOLD_LEFT_154(o, s, BOOST_PP_LIST_REVERSE_D(154, l)) # define BOOST_PP_LIST_FOLD_RIGHT_155(o, s, l) BOOST_PP_LIST_FOLD_LEFT_155(o, s, BOOST_PP_LIST_REVERSE_D(155, l)) # define BOOST_PP_LIST_FOLD_RIGHT_156(o, s, l) BOOST_PP_LIST_FOLD_LEFT_156(o, s, BOOST_PP_LIST_REVERSE_D(156, l)) # define BOOST_PP_LIST_FOLD_RIGHT_157(o, s, l) BOOST_PP_LIST_FOLD_LEFT_157(o, s, BOOST_PP_LIST_REVERSE_D(157, l)) # define BOOST_PP_LIST_FOLD_RIGHT_158(o, s, l) BOOST_PP_LIST_FOLD_LEFT_158(o, s, BOOST_PP_LIST_REVERSE_D(158, l)) # define BOOST_PP_LIST_FOLD_RIGHT_159(o, s, l) BOOST_PP_LIST_FOLD_LEFT_159(o, s, BOOST_PP_LIST_REVERSE_D(159, l)) # define BOOST_PP_LIST_FOLD_RIGHT_160(o, s, l) BOOST_PP_LIST_FOLD_LEFT_160(o, s, BOOST_PP_LIST_REVERSE_D(160, l)) # define BOOST_PP_LIST_FOLD_RIGHT_161(o, s, l) BOOST_PP_LIST_FOLD_LEFT_161(o, s, BOOST_PP_LIST_REVERSE_D(161, l)) # define BOOST_PP_LIST_FOLD_RIGHT_162(o, s, l) BOOST_PP_LIST_FOLD_LEFT_162(o, s, BOOST_PP_LIST_REVERSE_D(162, l)) # define BOOST_PP_LIST_FOLD_RIGHT_163(o, s, l) BOOST_PP_LIST_FOLD_LEFT_163(o, s, BOOST_PP_LIST_REVERSE_D(163, l)) # define BOOST_PP_LIST_FOLD_RIGHT_164(o, s, l) BOOST_PP_LIST_FOLD_LEFT_164(o, s, BOOST_PP_LIST_REVERSE_D(164, l)) # define BOOST_PP_LIST_FOLD_RIGHT_165(o, s, l) BOOST_PP_LIST_FOLD_LEFT_165(o, s, BOOST_PP_LIST_REVERSE_D(165, l)) # define BOOST_PP_LIST_FOLD_RIGHT_166(o, s, l) BOOST_PP_LIST_FOLD_LEFT_166(o, s, BOOST_PP_LIST_REVERSE_D(166, l)) # define BOOST_PP_LIST_FOLD_RIGHT_167(o, s, l) BOOST_PP_LIST_FOLD_LEFT_167(o, s, BOOST_PP_LIST_REVERSE_D(167, l)) # define BOOST_PP_LIST_FOLD_RIGHT_168(o, s, l) BOOST_PP_LIST_FOLD_LEFT_168(o, s, BOOST_PP_LIST_REVERSE_D(168, l)) # define BOOST_PP_LIST_FOLD_RIGHT_169(o, s, l) BOOST_PP_LIST_FOLD_LEFT_169(o, s, BOOST_PP_LIST_REVERSE_D(169, l)) # define BOOST_PP_LIST_FOLD_RIGHT_170(o, s, l) BOOST_PP_LIST_FOLD_LEFT_170(o, s, BOOST_PP_LIST_REVERSE_D(170, l)) # define BOOST_PP_LIST_FOLD_RIGHT_171(o, s, l) BOOST_PP_LIST_FOLD_LEFT_171(o, s, BOOST_PP_LIST_REVERSE_D(171, l)) # define BOOST_PP_LIST_FOLD_RIGHT_172(o, s, l) BOOST_PP_LIST_FOLD_LEFT_172(o, s, BOOST_PP_LIST_REVERSE_D(172, l)) # define BOOST_PP_LIST_FOLD_RIGHT_173(o, s, l) BOOST_PP_LIST_FOLD_LEFT_173(o, s, BOOST_PP_LIST_REVERSE_D(173, l)) # define BOOST_PP_LIST_FOLD_RIGHT_174(o, s, l) BOOST_PP_LIST_FOLD_LEFT_174(o, s, BOOST_PP_LIST_REVERSE_D(174, l)) # define BOOST_PP_LIST_FOLD_RIGHT_175(o, s, l) BOOST_PP_LIST_FOLD_LEFT_175(o, s, BOOST_PP_LIST_REVERSE_D(175, l)) # define BOOST_PP_LIST_FOLD_RIGHT_176(o, s, l) BOOST_PP_LIST_FOLD_LEFT_176(o, s, BOOST_PP_LIST_REVERSE_D(176, l)) # define BOOST_PP_LIST_FOLD_RIGHT_177(o, s, l) BOOST_PP_LIST_FOLD_LEFT_177(o, s, BOOST_PP_LIST_REVERSE_D(177, l)) # define BOOST_PP_LIST_FOLD_RIGHT_178(o, s, l) BOOST_PP_LIST_FOLD_LEFT_178(o, s, BOOST_PP_LIST_REVERSE_D(178, l)) # define BOOST_PP_LIST_FOLD_RIGHT_179(o, s, l) BOOST_PP_LIST_FOLD_LEFT_179(o, s, BOOST_PP_LIST_REVERSE_D(179, l)) # define BOOST_PP_LIST_FOLD_RIGHT_180(o, s, l) BOOST_PP_LIST_FOLD_LEFT_180(o, s, BOOST_PP_LIST_REVERSE_D(180, l)) # define BOOST_PP_LIST_FOLD_RIGHT_181(o, s, l) BOOST_PP_LIST_FOLD_LEFT_181(o, s, BOOST_PP_LIST_REVERSE_D(181, l)) # define BOOST_PP_LIST_FOLD_RIGHT_182(o, s, l) BOOST_PP_LIST_FOLD_LEFT_182(o, s, BOOST_PP_LIST_REVERSE_D(182, l)) # define BOOST_PP_LIST_FOLD_RIGHT_183(o, s, l) BOOST_PP_LIST_FOLD_LEFT_183(o, s, BOOST_PP_LIST_REVERSE_D(183, l)) # define BOOST_PP_LIST_FOLD_RIGHT_184(o, s, l) BOOST_PP_LIST_FOLD_LEFT_184(o, s, BOOST_PP_LIST_REVERSE_D(184, l)) # define BOOST_PP_LIST_FOLD_RIGHT_185(o, s, l) BOOST_PP_LIST_FOLD_LEFT_185(o, s, BOOST_PP_LIST_REVERSE_D(185, l)) # define BOOST_PP_LIST_FOLD_RIGHT_186(o, s, l) BOOST_PP_LIST_FOLD_LEFT_186(o, s, BOOST_PP_LIST_REVERSE_D(186, l)) # define BOOST_PP_LIST_FOLD_RIGHT_187(o, s, l) BOOST_PP_LIST_FOLD_LEFT_187(o, s, BOOST_PP_LIST_REVERSE_D(187, l)) # define BOOST_PP_LIST_FOLD_RIGHT_188(o, s, l) BOOST_PP_LIST_FOLD_LEFT_188(o, s, BOOST_PP_LIST_REVERSE_D(188, l)) # define BOOST_PP_LIST_FOLD_RIGHT_189(o, s, l) BOOST_PP_LIST_FOLD_LEFT_189(o, s, BOOST_PP_LIST_REVERSE_D(189, l)) # define BOOST_PP_LIST_FOLD_RIGHT_190(o, s, l) BOOST_PP_LIST_FOLD_LEFT_190(o, s, BOOST_PP_LIST_REVERSE_D(190, l)) # define BOOST_PP_LIST_FOLD_RIGHT_191(o, s, l) BOOST_PP_LIST_FOLD_LEFT_191(o, s, BOOST_PP_LIST_REVERSE_D(191, l)) # define BOOST_PP_LIST_FOLD_RIGHT_192(o, s, l) BOOST_PP_LIST_FOLD_LEFT_192(o, s, BOOST_PP_LIST_REVERSE_D(192, l)) # define BOOST_PP_LIST_FOLD_RIGHT_193(o, s, l) BOOST_PP_LIST_FOLD_LEFT_193(o, s, BOOST_PP_LIST_REVERSE_D(193, l)) # define BOOST_PP_LIST_FOLD_RIGHT_194(o, s, l) BOOST_PP_LIST_FOLD_LEFT_194(o, s, BOOST_PP_LIST_REVERSE_D(194, l)) # define BOOST_PP_LIST_FOLD_RIGHT_195(o, s, l) BOOST_PP_LIST_FOLD_LEFT_195(o, s, BOOST_PP_LIST_REVERSE_D(195, l)) # define BOOST_PP_LIST_FOLD_RIGHT_196(o, s, l) BOOST_PP_LIST_FOLD_LEFT_196(o, s, BOOST_PP_LIST_REVERSE_D(196, l)) # define BOOST_PP_LIST_FOLD_RIGHT_197(o, s, l) BOOST_PP_LIST_FOLD_LEFT_197(o, s, BOOST_PP_LIST_REVERSE_D(197, l)) # define BOOST_PP_LIST_FOLD_RIGHT_198(o, s, l) BOOST_PP_LIST_FOLD_LEFT_198(o, s, BOOST_PP_LIST_REVERSE_D(198, l)) # define BOOST_PP_LIST_FOLD_RIGHT_199(o, s, l) BOOST_PP_LIST_FOLD_LEFT_199(o, s, BOOST_PP_LIST_REVERSE_D(199, l)) # define BOOST_PP_LIST_FOLD_RIGHT_200(o, s, l) BOOST_PP_LIST_FOLD_LEFT_200(o, s, BOOST_PP_LIST_REVERSE_D(200, l)) # define BOOST_PP_LIST_FOLD_RIGHT_201(o, s, l) BOOST_PP_LIST_FOLD_LEFT_201(o, s, BOOST_PP_LIST_REVERSE_D(201, l)) # define BOOST_PP_LIST_FOLD_RIGHT_202(o, s, l) BOOST_PP_LIST_FOLD_LEFT_202(o, s, BOOST_PP_LIST_REVERSE_D(202, l)) # define BOOST_PP_LIST_FOLD_RIGHT_203(o, s, l) BOOST_PP_LIST_FOLD_LEFT_203(o, s, BOOST_PP_LIST_REVERSE_D(203, l)) # define BOOST_PP_LIST_FOLD_RIGHT_204(o, s, l) BOOST_PP_LIST_FOLD_LEFT_204(o, s, BOOST_PP_LIST_REVERSE_D(204, l)) # define BOOST_PP_LIST_FOLD_RIGHT_205(o, s, l) BOOST_PP_LIST_FOLD_LEFT_205(o, s, BOOST_PP_LIST_REVERSE_D(205, l)) # define BOOST_PP_LIST_FOLD_RIGHT_206(o, s, l) BOOST_PP_LIST_FOLD_LEFT_206(o, s, BOOST_PP_LIST_REVERSE_D(206, l)) # define BOOST_PP_LIST_FOLD_RIGHT_207(o, s, l) BOOST_PP_LIST_FOLD_LEFT_207(o, s, BOOST_PP_LIST_REVERSE_D(207, l)) # define BOOST_PP_LIST_FOLD_RIGHT_208(o, s, l) BOOST_PP_LIST_FOLD_LEFT_208(o, s, BOOST_PP_LIST_REVERSE_D(208, l)) # define BOOST_PP_LIST_FOLD_RIGHT_209(o, s, l) BOOST_PP_LIST_FOLD_LEFT_209(o, s, BOOST_PP_LIST_REVERSE_D(209, l)) # define BOOST_PP_LIST_FOLD_RIGHT_210(o, s, l) BOOST_PP_LIST_FOLD_LEFT_210(o, s, BOOST_PP_LIST_REVERSE_D(210, l)) # define BOOST_PP_LIST_FOLD_RIGHT_211(o, s, l) BOOST_PP_LIST_FOLD_LEFT_211(o, s, BOOST_PP_LIST_REVERSE_D(211, l)) # define BOOST_PP_LIST_FOLD_RIGHT_212(o, s, l) BOOST_PP_LIST_FOLD_LEFT_212(o, s, BOOST_PP_LIST_REVERSE_D(212, l)) # define BOOST_PP_LIST_FOLD_RIGHT_213(o, s, l) BOOST_PP_LIST_FOLD_LEFT_213(o, s, BOOST_PP_LIST_REVERSE_D(213, l)) # define BOOST_PP_LIST_FOLD_RIGHT_214(o, s, l) BOOST_PP_LIST_FOLD_LEFT_214(o, s, BOOST_PP_LIST_REVERSE_D(214, l)) # define BOOST_PP_LIST_FOLD_RIGHT_215(o, s, l) BOOST_PP_LIST_FOLD_LEFT_215(o, s, BOOST_PP_LIST_REVERSE_D(215, l)) # define BOOST_PP_LIST_FOLD_RIGHT_216(o, s, l) BOOST_PP_LIST_FOLD_LEFT_216(o, s, BOOST_PP_LIST_REVERSE_D(216, l)) # define BOOST_PP_LIST_FOLD_RIGHT_217(o, s, l) BOOST_PP_LIST_FOLD_LEFT_217(o, s, BOOST_PP_LIST_REVERSE_D(217, l)) # define BOOST_PP_LIST_FOLD_RIGHT_218(o, s, l) BOOST_PP_LIST_FOLD_LEFT_218(o, s, BOOST_PP_LIST_REVERSE_D(218, l)) # define BOOST_PP_LIST_FOLD_RIGHT_219(o, s, l) BOOST_PP_LIST_FOLD_LEFT_219(o, s, BOOST_PP_LIST_REVERSE_D(219, l)) # define BOOST_PP_LIST_FOLD_RIGHT_220(o, s, l) BOOST_PP_LIST_FOLD_LEFT_220(o, s, BOOST_PP_LIST_REVERSE_D(220, l)) # define BOOST_PP_LIST_FOLD_RIGHT_221(o, s, l) BOOST_PP_LIST_FOLD_LEFT_221(o, s, BOOST_PP_LIST_REVERSE_D(221, l)) # define BOOST_PP_LIST_FOLD_RIGHT_222(o, s, l) BOOST_PP_LIST_FOLD_LEFT_222(o, s, BOOST_PP_LIST_REVERSE_D(222, l)) # define BOOST_PP_LIST_FOLD_RIGHT_223(o, s, l) BOOST_PP_LIST_FOLD_LEFT_223(o, s, BOOST_PP_LIST_REVERSE_D(223, l)) # define BOOST_PP_LIST_FOLD_RIGHT_224(o, s, l) BOOST_PP_LIST_FOLD_LEFT_224(o, s, BOOST_PP_LIST_REVERSE_D(224, l)) # define BOOST_PP_LIST_FOLD_RIGHT_225(o, s, l) BOOST_PP_LIST_FOLD_LEFT_225(o, s, BOOST_PP_LIST_REVERSE_D(225, l)) # define BOOST_PP_LIST_FOLD_RIGHT_226(o, s, l) BOOST_PP_LIST_FOLD_LEFT_226(o, s, BOOST_PP_LIST_REVERSE_D(226, l)) # define BOOST_PP_LIST_FOLD_RIGHT_227(o, s, l) BOOST_PP_LIST_FOLD_LEFT_227(o, s, BOOST_PP_LIST_REVERSE_D(227, l)) # define BOOST_PP_LIST_FOLD_RIGHT_228(o, s, l) BOOST_PP_LIST_FOLD_LEFT_228(o, s, BOOST_PP_LIST_REVERSE_D(228, l)) # define BOOST_PP_LIST_FOLD_RIGHT_229(o, s, l) BOOST_PP_LIST_FOLD_LEFT_229(o, s, BOOST_PP_LIST_REVERSE_D(229, l)) # define BOOST_PP_LIST_FOLD_RIGHT_230(o, s, l) BOOST_PP_LIST_FOLD_LEFT_230(o, s, BOOST_PP_LIST_REVERSE_D(230, l)) # define BOOST_PP_LIST_FOLD_RIGHT_231(o, s, l) BOOST_PP_LIST_FOLD_LEFT_231(o, s, BOOST_PP_LIST_REVERSE_D(231, l)) # define BOOST_PP_LIST_FOLD_RIGHT_232(o, s, l) BOOST_PP_LIST_FOLD_LEFT_232(o, s, BOOST_PP_LIST_REVERSE_D(232, l)) # define BOOST_PP_LIST_FOLD_RIGHT_233(o, s, l) BOOST_PP_LIST_FOLD_LEFT_233(o, s, BOOST_PP_LIST_REVERSE_D(233, l)) # define BOOST_PP_LIST_FOLD_RIGHT_234(o, s, l) BOOST_PP_LIST_FOLD_LEFT_234(o, s, BOOST_PP_LIST_REVERSE_D(234, l)) # define BOOST_PP_LIST_FOLD_RIGHT_235(o, s, l) BOOST_PP_LIST_FOLD_LEFT_235(o, s, BOOST_PP_LIST_REVERSE_D(235, l)) # define BOOST_PP_LIST_FOLD_RIGHT_236(o, s, l) BOOST_PP_LIST_FOLD_LEFT_236(o, s, BOOST_PP_LIST_REVERSE_D(236, l)) # define BOOST_PP_LIST_FOLD_RIGHT_237(o, s, l) BOOST_PP_LIST_FOLD_LEFT_237(o, s, BOOST_PP_LIST_REVERSE_D(237, l)) # define BOOST_PP_LIST_FOLD_RIGHT_238(o, s, l) BOOST_PP_LIST_FOLD_LEFT_238(o, s, BOOST_PP_LIST_REVERSE_D(238, l)) # define BOOST_PP_LIST_FOLD_RIGHT_239(o, s, l) BOOST_PP_LIST_FOLD_LEFT_239(o, s, BOOST_PP_LIST_REVERSE_D(239, l)) # define BOOST_PP_LIST_FOLD_RIGHT_240(o, s, l) BOOST_PP_LIST_FOLD_LEFT_240(o, s, BOOST_PP_LIST_REVERSE_D(240, l)) # define BOOST_PP_LIST_FOLD_RIGHT_241(o, s, l) BOOST_PP_LIST_FOLD_LEFT_241(o, s, BOOST_PP_LIST_REVERSE_D(241, l)) # define BOOST_PP_LIST_FOLD_RIGHT_242(o, s, l) BOOST_PP_LIST_FOLD_LEFT_242(o, s, BOOST_PP_LIST_REVERSE_D(242, l)) # define BOOST_PP_LIST_FOLD_RIGHT_243(o, s, l) BOOST_PP_LIST_FOLD_LEFT_243(o, s, BOOST_PP_LIST_REVERSE_D(243, l)) # define BOOST_PP_LIST_FOLD_RIGHT_244(o, s, l) BOOST_PP_LIST_FOLD_LEFT_244(o, s, BOOST_PP_LIST_REVERSE_D(244, l)) # define BOOST_PP_LIST_FOLD_RIGHT_245(o, s, l) BOOST_PP_LIST_FOLD_LEFT_245(o, s, BOOST_PP_LIST_REVERSE_D(245, l)) # define BOOST_PP_LIST_FOLD_RIGHT_246(o, s, l) BOOST_PP_LIST_FOLD_LEFT_246(o, s, BOOST_PP_LIST_REVERSE_D(246, l)) # define BOOST_PP_LIST_FOLD_RIGHT_247(o, s, l) BOOST_PP_LIST_FOLD_LEFT_247(o, s, BOOST_PP_LIST_REVERSE_D(247, l)) # define BOOST_PP_LIST_FOLD_RIGHT_248(o, s, l) BOOST_PP_LIST_FOLD_LEFT_248(o, s, BOOST_PP_LIST_REVERSE_D(248, l)) # define BOOST_PP_LIST_FOLD_RIGHT_249(o, s, l) BOOST_PP_LIST_FOLD_LEFT_249(o, s, BOOST_PP_LIST_REVERSE_D(249, l)) # define BOOST_PP_LIST_FOLD_RIGHT_250(o, s, l) BOOST_PP_LIST_FOLD_LEFT_250(o, s, BOOST_PP_LIST_REVERSE_D(250, l)) # define BOOST_PP_LIST_FOLD_RIGHT_251(o, s, l) BOOST_PP_LIST_FOLD_LEFT_251(o, s, BOOST_PP_LIST_REVERSE_D(251, l)) # define BOOST_PP_LIST_FOLD_RIGHT_252(o, s, l) BOOST_PP_LIST_FOLD_LEFT_252(o, s, BOOST_PP_LIST_REVERSE_D(252, l)) # define BOOST_PP_LIST_FOLD_RIGHT_253(o, s, l) BOOST_PP_LIST_FOLD_LEFT_253(o, s, BOOST_PP_LIST_REVERSE_D(253, l)) # define BOOST_PP_LIST_FOLD_RIGHT_254(o, s, l) BOOST_PP_LIST_FOLD_LEFT_254(o, s, BOOST_PP_LIST_REVERSE_D(254, l)) # define BOOST_PP_LIST_FOLD_RIGHT_255(o, s, l) BOOST_PP_LIST_FOLD_LEFT_255(o, s, BOOST_PP_LIST_REVERSE_D(255, l)) # define BOOST_PP_LIST_FOLD_RIGHT_256(o, s, l) BOOST_PP_LIST_FOLD_LEFT_256(o, s, BOOST_PP_LIST_REVERSE_D(256, l)) # # endif passenger-4.0.37/ext/boost/preprocessor/iteration/detail/000755 000765 000024 00000000000 12233035540 024130 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/iteration/iterate.hpp000644 000765 000024 00000007172 12233035540 025043 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP # define BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP # # include # include # include # include # include # include # include # # /* BOOST_PP_ITERATION_DEPTH */ # # define BOOST_PP_ITERATION_DEPTH() 0 # # /* BOOST_PP_ITERATION */ # # define BOOST_PP_ITERATION() BOOST_PP_CAT(BOOST_PP_ITERATION_, BOOST_PP_ITERATION_DEPTH()) # # /* BOOST_PP_ITERATION_START && BOOST_PP_ITERATION_FINISH */ # # define BOOST_PP_ITERATION_START() BOOST_PP_CAT(BOOST_PP_ITERATION_START_, BOOST_PP_ITERATION_DEPTH()) # define BOOST_PP_ITERATION_FINISH() BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, BOOST_PP_ITERATION_DEPTH()) # # /* BOOST_PP_ITERATION_FLAGS */ # # define BOOST_PP_ITERATION_FLAGS() (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, BOOST_PP_ITERATION_DEPTH())()) # # /* BOOST_PP_FRAME_ITERATION */ # # define BOOST_PP_FRAME_ITERATION(i) BOOST_PP_CAT(BOOST_PP_ITERATION_, i) # # /* BOOST_PP_FRAME_START && BOOST_PP_FRAME_FINISH */ # # define BOOST_PP_FRAME_START(i) BOOST_PP_CAT(BOOST_PP_ITERATION_START_, i) # define BOOST_PP_FRAME_FINISH(i) BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, i) # # /* BOOST_PP_FRAME_FLAGS */ # # define BOOST_PP_FRAME_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, i)()) # # /* BOOST_PP_RELATIVE_ITERATION */ # # define BOOST_PP_RELATIVE_ITERATION(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_) # # define BOOST_PP_RELATIVE_0(m) BOOST_PP_CAT(m, BOOST_PP_ITERATION_DEPTH()) # define BOOST_PP_RELATIVE_1(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())) # define BOOST_PP_RELATIVE_2(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))) # define BOOST_PP_RELATIVE_3(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))) # define BOOST_PP_RELATIVE_4(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))))) # # /* BOOST_PP_RELATIVE_START && BOOST_PP_RELATIVE_FINISH */ # # define BOOST_PP_RELATIVE_START(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_START_) # define BOOST_PP_RELATIVE_FINISH(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FINISH_) # # /* BOOST_PP_RELATIVE_FLAGS */ # # define BOOST_PP_RELATIVE_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FLAGS_)()) # # /* BOOST_PP_ITERATE */ # # define BOOST_PP_ITERATE() BOOST_PP_CAT(BOOST_PP_ITERATE_, BOOST_PP_INC(BOOST_PP_ITERATION_DEPTH())) # # define BOOST_PP_ITERATE_1 # define BOOST_PP_ITERATE_2 # define BOOST_PP_ITERATE_3 # define BOOST_PP_ITERATE_4 # define BOOST_PP_ITERATE_5 # # endif passenger-4.0.37/ext/boost/preprocessor/iteration/detail/bounds/000755 000765 000024 00000000000 12233035540 025422 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/iteration/detail/iter/000755 000765 000024 00000000000 12233035540 025073 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/iteration/detail/iter/forward1.hpp000644 000765 000024 00000152770 12233035540 027345 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if defined(BOOST_PP_ITERATION_LIMITS) # if !defined(BOOST_PP_FILENAME_1) # error BOOST_PP_ERROR: depth #1 filename is not defined # endif # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_ITERATION_FLAGS_1() 0 # undef BOOST_PP_ITERATION_LIMITS # elif defined(BOOST_PP_ITERATION_PARAMS_1) # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_1) # include # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_1) # include # define BOOST_PP_FILENAME_1 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_1) # if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_1) >= 4 # define BOOST_PP_ITERATION_FLAGS_1() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_1) # else # define BOOST_PP_ITERATION_FLAGS_1() 0 # endif # else # error BOOST_PP_ERROR: depth #1 iteration boundaries or filename not defined # endif # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 1 # # define BOOST_PP_IS_ITERATING 1 # # if (BOOST_PP_ITERATION_START_1) > (BOOST_PP_ITERATION_FINISH_1) # include # else # if BOOST_PP_ITERATION_START_1 <= 0 && BOOST_PP_ITERATION_FINISH_1 >= 0 # define BOOST_PP_ITERATION_1 0 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 1 && BOOST_PP_ITERATION_FINISH_1 >= 1 # define BOOST_PP_ITERATION_1 1 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 2 && BOOST_PP_ITERATION_FINISH_1 >= 2 # define BOOST_PP_ITERATION_1 2 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 3 && BOOST_PP_ITERATION_FINISH_1 >= 3 # define BOOST_PP_ITERATION_1 3 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 4 && BOOST_PP_ITERATION_FINISH_1 >= 4 # define BOOST_PP_ITERATION_1 4 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 5 && BOOST_PP_ITERATION_FINISH_1 >= 5 # define BOOST_PP_ITERATION_1 5 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 6 && BOOST_PP_ITERATION_FINISH_1 >= 6 # define BOOST_PP_ITERATION_1 6 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 7 && BOOST_PP_ITERATION_FINISH_1 >= 7 # define BOOST_PP_ITERATION_1 7 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 8 && BOOST_PP_ITERATION_FINISH_1 >= 8 # define BOOST_PP_ITERATION_1 8 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 9 && BOOST_PP_ITERATION_FINISH_1 >= 9 # define BOOST_PP_ITERATION_1 9 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 10 && BOOST_PP_ITERATION_FINISH_1 >= 10 # define BOOST_PP_ITERATION_1 10 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 11 && BOOST_PP_ITERATION_FINISH_1 >= 11 # define BOOST_PP_ITERATION_1 11 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 12 && BOOST_PP_ITERATION_FINISH_1 >= 12 # define BOOST_PP_ITERATION_1 12 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 13 && BOOST_PP_ITERATION_FINISH_1 >= 13 # define BOOST_PP_ITERATION_1 13 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 14 && BOOST_PP_ITERATION_FINISH_1 >= 14 # define BOOST_PP_ITERATION_1 14 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 15 && BOOST_PP_ITERATION_FINISH_1 >= 15 # define BOOST_PP_ITERATION_1 15 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 16 && BOOST_PP_ITERATION_FINISH_1 >= 16 # define BOOST_PP_ITERATION_1 16 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 17 && BOOST_PP_ITERATION_FINISH_1 >= 17 # define BOOST_PP_ITERATION_1 17 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 18 && BOOST_PP_ITERATION_FINISH_1 >= 18 # define BOOST_PP_ITERATION_1 18 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 19 && BOOST_PP_ITERATION_FINISH_1 >= 19 # define BOOST_PP_ITERATION_1 19 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 20 && BOOST_PP_ITERATION_FINISH_1 >= 20 # define BOOST_PP_ITERATION_1 20 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 21 && BOOST_PP_ITERATION_FINISH_1 >= 21 # define BOOST_PP_ITERATION_1 21 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 22 && BOOST_PP_ITERATION_FINISH_1 >= 22 # define BOOST_PP_ITERATION_1 22 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 23 && BOOST_PP_ITERATION_FINISH_1 >= 23 # define BOOST_PP_ITERATION_1 23 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 24 && BOOST_PP_ITERATION_FINISH_1 >= 24 # define BOOST_PP_ITERATION_1 24 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 25 && BOOST_PP_ITERATION_FINISH_1 >= 25 # define BOOST_PP_ITERATION_1 25 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 26 && BOOST_PP_ITERATION_FINISH_1 >= 26 # define BOOST_PP_ITERATION_1 26 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 27 && BOOST_PP_ITERATION_FINISH_1 >= 27 # define BOOST_PP_ITERATION_1 27 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 28 && BOOST_PP_ITERATION_FINISH_1 >= 28 # define BOOST_PP_ITERATION_1 28 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 29 && BOOST_PP_ITERATION_FINISH_1 >= 29 # define BOOST_PP_ITERATION_1 29 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 30 && BOOST_PP_ITERATION_FINISH_1 >= 30 # define BOOST_PP_ITERATION_1 30 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 31 && BOOST_PP_ITERATION_FINISH_1 >= 31 # define BOOST_PP_ITERATION_1 31 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 32 && BOOST_PP_ITERATION_FINISH_1 >= 32 # define BOOST_PP_ITERATION_1 32 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 33 && BOOST_PP_ITERATION_FINISH_1 >= 33 # define BOOST_PP_ITERATION_1 33 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 34 && BOOST_PP_ITERATION_FINISH_1 >= 34 # define BOOST_PP_ITERATION_1 34 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 35 && BOOST_PP_ITERATION_FINISH_1 >= 35 # define BOOST_PP_ITERATION_1 35 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 36 && BOOST_PP_ITERATION_FINISH_1 >= 36 # define BOOST_PP_ITERATION_1 36 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 37 && BOOST_PP_ITERATION_FINISH_1 >= 37 # define BOOST_PP_ITERATION_1 37 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 38 && BOOST_PP_ITERATION_FINISH_1 >= 38 # define BOOST_PP_ITERATION_1 38 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 39 && BOOST_PP_ITERATION_FINISH_1 >= 39 # define BOOST_PP_ITERATION_1 39 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 40 && BOOST_PP_ITERATION_FINISH_1 >= 40 # define BOOST_PP_ITERATION_1 40 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 41 && BOOST_PP_ITERATION_FINISH_1 >= 41 # define BOOST_PP_ITERATION_1 41 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 42 && BOOST_PP_ITERATION_FINISH_1 >= 42 # define BOOST_PP_ITERATION_1 42 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 43 && BOOST_PP_ITERATION_FINISH_1 >= 43 # define BOOST_PP_ITERATION_1 43 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 44 && BOOST_PP_ITERATION_FINISH_1 >= 44 # define BOOST_PP_ITERATION_1 44 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 45 && BOOST_PP_ITERATION_FINISH_1 >= 45 # define BOOST_PP_ITERATION_1 45 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 46 && BOOST_PP_ITERATION_FINISH_1 >= 46 # define BOOST_PP_ITERATION_1 46 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 47 && BOOST_PP_ITERATION_FINISH_1 >= 47 # define BOOST_PP_ITERATION_1 47 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 48 && BOOST_PP_ITERATION_FINISH_1 >= 48 # define BOOST_PP_ITERATION_1 48 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 49 && BOOST_PP_ITERATION_FINISH_1 >= 49 # define BOOST_PP_ITERATION_1 49 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 50 && BOOST_PP_ITERATION_FINISH_1 >= 50 # define BOOST_PP_ITERATION_1 50 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 51 && BOOST_PP_ITERATION_FINISH_1 >= 51 # define BOOST_PP_ITERATION_1 51 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 52 && BOOST_PP_ITERATION_FINISH_1 >= 52 # define BOOST_PP_ITERATION_1 52 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 53 && BOOST_PP_ITERATION_FINISH_1 >= 53 # define BOOST_PP_ITERATION_1 53 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 54 && BOOST_PP_ITERATION_FINISH_1 >= 54 # define BOOST_PP_ITERATION_1 54 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 55 && BOOST_PP_ITERATION_FINISH_1 >= 55 # define BOOST_PP_ITERATION_1 55 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 56 && BOOST_PP_ITERATION_FINISH_1 >= 56 # define BOOST_PP_ITERATION_1 56 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 57 && BOOST_PP_ITERATION_FINISH_1 >= 57 # define BOOST_PP_ITERATION_1 57 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 58 && BOOST_PP_ITERATION_FINISH_1 >= 58 # define BOOST_PP_ITERATION_1 58 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 59 && BOOST_PP_ITERATION_FINISH_1 >= 59 # define BOOST_PP_ITERATION_1 59 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 60 && BOOST_PP_ITERATION_FINISH_1 >= 60 # define BOOST_PP_ITERATION_1 60 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 61 && BOOST_PP_ITERATION_FINISH_1 >= 61 # define BOOST_PP_ITERATION_1 61 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 62 && BOOST_PP_ITERATION_FINISH_1 >= 62 # define BOOST_PP_ITERATION_1 62 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 63 && BOOST_PP_ITERATION_FINISH_1 >= 63 # define BOOST_PP_ITERATION_1 63 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 64 && BOOST_PP_ITERATION_FINISH_1 >= 64 # define BOOST_PP_ITERATION_1 64 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 65 && BOOST_PP_ITERATION_FINISH_1 >= 65 # define BOOST_PP_ITERATION_1 65 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 66 && BOOST_PP_ITERATION_FINISH_1 >= 66 # define BOOST_PP_ITERATION_1 66 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 67 && BOOST_PP_ITERATION_FINISH_1 >= 67 # define BOOST_PP_ITERATION_1 67 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 68 && BOOST_PP_ITERATION_FINISH_1 >= 68 # define BOOST_PP_ITERATION_1 68 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 69 && BOOST_PP_ITERATION_FINISH_1 >= 69 # define BOOST_PP_ITERATION_1 69 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 70 && BOOST_PP_ITERATION_FINISH_1 >= 70 # define BOOST_PP_ITERATION_1 70 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 71 && BOOST_PP_ITERATION_FINISH_1 >= 71 # define BOOST_PP_ITERATION_1 71 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 72 && BOOST_PP_ITERATION_FINISH_1 >= 72 # define BOOST_PP_ITERATION_1 72 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 73 && BOOST_PP_ITERATION_FINISH_1 >= 73 # define BOOST_PP_ITERATION_1 73 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 74 && BOOST_PP_ITERATION_FINISH_1 >= 74 # define BOOST_PP_ITERATION_1 74 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 75 && BOOST_PP_ITERATION_FINISH_1 >= 75 # define BOOST_PP_ITERATION_1 75 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 76 && BOOST_PP_ITERATION_FINISH_1 >= 76 # define BOOST_PP_ITERATION_1 76 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 77 && BOOST_PP_ITERATION_FINISH_1 >= 77 # define BOOST_PP_ITERATION_1 77 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 78 && BOOST_PP_ITERATION_FINISH_1 >= 78 # define BOOST_PP_ITERATION_1 78 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 79 && BOOST_PP_ITERATION_FINISH_1 >= 79 # define BOOST_PP_ITERATION_1 79 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 80 && BOOST_PP_ITERATION_FINISH_1 >= 80 # define BOOST_PP_ITERATION_1 80 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 81 && BOOST_PP_ITERATION_FINISH_1 >= 81 # define BOOST_PP_ITERATION_1 81 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 82 && BOOST_PP_ITERATION_FINISH_1 >= 82 # define BOOST_PP_ITERATION_1 82 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 83 && BOOST_PP_ITERATION_FINISH_1 >= 83 # define BOOST_PP_ITERATION_1 83 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 84 && BOOST_PP_ITERATION_FINISH_1 >= 84 # define BOOST_PP_ITERATION_1 84 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 85 && BOOST_PP_ITERATION_FINISH_1 >= 85 # define BOOST_PP_ITERATION_1 85 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 86 && BOOST_PP_ITERATION_FINISH_1 >= 86 # define BOOST_PP_ITERATION_1 86 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 87 && BOOST_PP_ITERATION_FINISH_1 >= 87 # define BOOST_PP_ITERATION_1 87 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 88 && BOOST_PP_ITERATION_FINISH_1 >= 88 # define BOOST_PP_ITERATION_1 88 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 89 && BOOST_PP_ITERATION_FINISH_1 >= 89 # define BOOST_PP_ITERATION_1 89 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 90 && BOOST_PP_ITERATION_FINISH_1 >= 90 # define BOOST_PP_ITERATION_1 90 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 91 && BOOST_PP_ITERATION_FINISH_1 >= 91 # define BOOST_PP_ITERATION_1 91 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 92 && BOOST_PP_ITERATION_FINISH_1 >= 92 # define BOOST_PP_ITERATION_1 92 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 93 && BOOST_PP_ITERATION_FINISH_1 >= 93 # define BOOST_PP_ITERATION_1 93 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 94 && BOOST_PP_ITERATION_FINISH_1 >= 94 # define BOOST_PP_ITERATION_1 94 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 95 && BOOST_PP_ITERATION_FINISH_1 >= 95 # define BOOST_PP_ITERATION_1 95 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 96 && BOOST_PP_ITERATION_FINISH_1 >= 96 # define BOOST_PP_ITERATION_1 96 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 97 && BOOST_PP_ITERATION_FINISH_1 >= 97 # define BOOST_PP_ITERATION_1 97 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 98 && BOOST_PP_ITERATION_FINISH_1 >= 98 # define BOOST_PP_ITERATION_1 98 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 99 && BOOST_PP_ITERATION_FINISH_1 >= 99 # define BOOST_PP_ITERATION_1 99 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 100 && BOOST_PP_ITERATION_FINISH_1 >= 100 # define BOOST_PP_ITERATION_1 100 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 101 && BOOST_PP_ITERATION_FINISH_1 >= 101 # define BOOST_PP_ITERATION_1 101 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 102 && BOOST_PP_ITERATION_FINISH_1 >= 102 # define BOOST_PP_ITERATION_1 102 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 103 && BOOST_PP_ITERATION_FINISH_1 >= 103 # define BOOST_PP_ITERATION_1 103 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 104 && BOOST_PP_ITERATION_FINISH_1 >= 104 # define BOOST_PP_ITERATION_1 104 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 105 && BOOST_PP_ITERATION_FINISH_1 >= 105 # define BOOST_PP_ITERATION_1 105 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 106 && BOOST_PP_ITERATION_FINISH_1 >= 106 # define BOOST_PP_ITERATION_1 106 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 107 && BOOST_PP_ITERATION_FINISH_1 >= 107 # define BOOST_PP_ITERATION_1 107 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 108 && BOOST_PP_ITERATION_FINISH_1 >= 108 # define BOOST_PP_ITERATION_1 108 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 109 && BOOST_PP_ITERATION_FINISH_1 >= 109 # define BOOST_PP_ITERATION_1 109 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 110 && BOOST_PP_ITERATION_FINISH_1 >= 110 # define BOOST_PP_ITERATION_1 110 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 111 && BOOST_PP_ITERATION_FINISH_1 >= 111 # define BOOST_PP_ITERATION_1 111 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 112 && BOOST_PP_ITERATION_FINISH_1 >= 112 # define BOOST_PP_ITERATION_1 112 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 113 && BOOST_PP_ITERATION_FINISH_1 >= 113 # define BOOST_PP_ITERATION_1 113 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 114 && BOOST_PP_ITERATION_FINISH_1 >= 114 # define BOOST_PP_ITERATION_1 114 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 115 && BOOST_PP_ITERATION_FINISH_1 >= 115 # define BOOST_PP_ITERATION_1 115 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 116 && BOOST_PP_ITERATION_FINISH_1 >= 116 # define BOOST_PP_ITERATION_1 116 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 117 && BOOST_PP_ITERATION_FINISH_1 >= 117 # define BOOST_PP_ITERATION_1 117 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 118 && BOOST_PP_ITERATION_FINISH_1 >= 118 # define BOOST_PP_ITERATION_1 118 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 119 && BOOST_PP_ITERATION_FINISH_1 >= 119 # define BOOST_PP_ITERATION_1 119 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 120 && BOOST_PP_ITERATION_FINISH_1 >= 120 # define BOOST_PP_ITERATION_1 120 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 121 && BOOST_PP_ITERATION_FINISH_1 >= 121 # define BOOST_PP_ITERATION_1 121 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 122 && BOOST_PP_ITERATION_FINISH_1 >= 122 # define BOOST_PP_ITERATION_1 122 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 123 && BOOST_PP_ITERATION_FINISH_1 >= 123 # define BOOST_PP_ITERATION_1 123 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 124 && BOOST_PP_ITERATION_FINISH_1 >= 124 # define BOOST_PP_ITERATION_1 124 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 125 && BOOST_PP_ITERATION_FINISH_1 >= 125 # define BOOST_PP_ITERATION_1 125 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 126 && BOOST_PP_ITERATION_FINISH_1 >= 126 # define BOOST_PP_ITERATION_1 126 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 127 && BOOST_PP_ITERATION_FINISH_1 >= 127 # define BOOST_PP_ITERATION_1 127 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 128 && BOOST_PP_ITERATION_FINISH_1 >= 128 # define BOOST_PP_ITERATION_1 128 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 129 && BOOST_PP_ITERATION_FINISH_1 >= 129 # define BOOST_PP_ITERATION_1 129 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 130 && BOOST_PP_ITERATION_FINISH_1 >= 130 # define BOOST_PP_ITERATION_1 130 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 131 && BOOST_PP_ITERATION_FINISH_1 >= 131 # define BOOST_PP_ITERATION_1 131 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 132 && BOOST_PP_ITERATION_FINISH_1 >= 132 # define BOOST_PP_ITERATION_1 132 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 133 && BOOST_PP_ITERATION_FINISH_1 >= 133 # define BOOST_PP_ITERATION_1 133 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 134 && BOOST_PP_ITERATION_FINISH_1 >= 134 # define BOOST_PP_ITERATION_1 134 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 135 && BOOST_PP_ITERATION_FINISH_1 >= 135 # define BOOST_PP_ITERATION_1 135 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 136 && BOOST_PP_ITERATION_FINISH_1 >= 136 # define BOOST_PP_ITERATION_1 136 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 137 && BOOST_PP_ITERATION_FINISH_1 >= 137 # define BOOST_PP_ITERATION_1 137 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 138 && BOOST_PP_ITERATION_FINISH_1 >= 138 # define BOOST_PP_ITERATION_1 138 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 139 && BOOST_PP_ITERATION_FINISH_1 >= 139 # define BOOST_PP_ITERATION_1 139 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 140 && BOOST_PP_ITERATION_FINISH_1 >= 140 # define BOOST_PP_ITERATION_1 140 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 141 && BOOST_PP_ITERATION_FINISH_1 >= 141 # define BOOST_PP_ITERATION_1 141 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 142 && BOOST_PP_ITERATION_FINISH_1 >= 142 # define BOOST_PP_ITERATION_1 142 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 143 && BOOST_PP_ITERATION_FINISH_1 >= 143 # define BOOST_PP_ITERATION_1 143 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 144 && BOOST_PP_ITERATION_FINISH_1 >= 144 # define BOOST_PP_ITERATION_1 144 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 145 && BOOST_PP_ITERATION_FINISH_1 >= 145 # define BOOST_PP_ITERATION_1 145 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 146 && BOOST_PP_ITERATION_FINISH_1 >= 146 # define BOOST_PP_ITERATION_1 146 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 147 && BOOST_PP_ITERATION_FINISH_1 >= 147 # define BOOST_PP_ITERATION_1 147 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 148 && BOOST_PP_ITERATION_FINISH_1 >= 148 # define BOOST_PP_ITERATION_1 148 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 149 && BOOST_PP_ITERATION_FINISH_1 >= 149 # define BOOST_PP_ITERATION_1 149 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 150 && BOOST_PP_ITERATION_FINISH_1 >= 150 # define BOOST_PP_ITERATION_1 150 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 151 && BOOST_PP_ITERATION_FINISH_1 >= 151 # define BOOST_PP_ITERATION_1 151 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 152 && BOOST_PP_ITERATION_FINISH_1 >= 152 # define BOOST_PP_ITERATION_1 152 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 153 && BOOST_PP_ITERATION_FINISH_1 >= 153 # define BOOST_PP_ITERATION_1 153 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 154 && BOOST_PP_ITERATION_FINISH_1 >= 154 # define BOOST_PP_ITERATION_1 154 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 155 && BOOST_PP_ITERATION_FINISH_1 >= 155 # define BOOST_PP_ITERATION_1 155 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 156 && BOOST_PP_ITERATION_FINISH_1 >= 156 # define BOOST_PP_ITERATION_1 156 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 157 && BOOST_PP_ITERATION_FINISH_1 >= 157 # define BOOST_PP_ITERATION_1 157 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 158 && BOOST_PP_ITERATION_FINISH_1 >= 158 # define BOOST_PP_ITERATION_1 158 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 159 && BOOST_PP_ITERATION_FINISH_1 >= 159 # define BOOST_PP_ITERATION_1 159 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 160 && BOOST_PP_ITERATION_FINISH_1 >= 160 # define BOOST_PP_ITERATION_1 160 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 161 && BOOST_PP_ITERATION_FINISH_1 >= 161 # define BOOST_PP_ITERATION_1 161 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 162 && BOOST_PP_ITERATION_FINISH_1 >= 162 # define BOOST_PP_ITERATION_1 162 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 163 && BOOST_PP_ITERATION_FINISH_1 >= 163 # define BOOST_PP_ITERATION_1 163 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 164 && BOOST_PP_ITERATION_FINISH_1 >= 164 # define BOOST_PP_ITERATION_1 164 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 165 && BOOST_PP_ITERATION_FINISH_1 >= 165 # define BOOST_PP_ITERATION_1 165 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 166 && BOOST_PP_ITERATION_FINISH_1 >= 166 # define BOOST_PP_ITERATION_1 166 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 167 && BOOST_PP_ITERATION_FINISH_1 >= 167 # define BOOST_PP_ITERATION_1 167 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 168 && BOOST_PP_ITERATION_FINISH_1 >= 168 # define BOOST_PP_ITERATION_1 168 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 169 && BOOST_PP_ITERATION_FINISH_1 >= 169 # define BOOST_PP_ITERATION_1 169 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 170 && BOOST_PP_ITERATION_FINISH_1 >= 170 # define BOOST_PP_ITERATION_1 170 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 171 && BOOST_PP_ITERATION_FINISH_1 >= 171 # define BOOST_PP_ITERATION_1 171 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 172 && BOOST_PP_ITERATION_FINISH_1 >= 172 # define BOOST_PP_ITERATION_1 172 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 173 && BOOST_PP_ITERATION_FINISH_1 >= 173 # define BOOST_PP_ITERATION_1 173 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 174 && BOOST_PP_ITERATION_FINISH_1 >= 174 # define BOOST_PP_ITERATION_1 174 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 175 && BOOST_PP_ITERATION_FINISH_1 >= 175 # define BOOST_PP_ITERATION_1 175 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 176 && BOOST_PP_ITERATION_FINISH_1 >= 176 # define BOOST_PP_ITERATION_1 176 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 177 && BOOST_PP_ITERATION_FINISH_1 >= 177 # define BOOST_PP_ITERATION_1 177 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 178 && BOOST_PP_ITERATION_FINISH_1 >= 178 # define BOOST_PP_ITERATION_1 178 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 179 && BOOST_PP_ITERATION_FINISH_1 >= 179 # define BOOST_PP_ITERATION_1 179 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 180 && BOOST_PP_ITERATION_FINISH_1 >= 180 # define BOOST_PP_ITERATION_1 180 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 181 && BOOST_PP_ITERATION_FINISH_1 >= 181 # define BOOST_PP_ITERATION_1 181 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 182 && BOOST_PP_ITERATION_FINISH_1 >= 182 # define BOOST_PP_ITERATION_1 182 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 183 && BOOST_PP_ITERATION_FINISH_1 >= 183 # define BOOST_PP_ITERATION_1 183 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 184 && BOOST_PP_ITERATION_FINISH_1 >= 184 # define BOOST_PP_ITERATION_1 184 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 185 && BOOST_PP_ITERATION_FINISH_1 >= 185 # define BOOST_PP_ITERATION_1 185 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 186 && BOOST_PP_ITERATION_FINISH_1 >= 186 # define BOOST_PP_ITERATION_1 186 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 187 && BOOST_PP_ITERATION_FINISH_1 >= 187 # define BOOST_PP_ITERATION_1 187 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 188 && BOOST_PP_ITERATION_FINISH_1 >= 188 # define BOOST_PP_ITERATION_1 188 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 189 && BOOST_PP_ITERATION_FINISH_1 >= 189 # define BOOST_PP_ITERATION_1 189 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 190 && BOOST_PP_ITERATION_FINISH_1 >= 190 # define BOOST_PP_ITERATION_1 190 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 191 && BOOST_PP_ITERATION_FINISH_1 >= 191 # define BOOST_PP_ITERATION_1 191 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 192 && BOOST_PP_ITERATION_FINISH_1 >= 192 # define BOOST_PP_ITERATION_1 192 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 193 && BOOST_PP_ITERATION_FINISH_1 >= 193 # define BOOST_PP_ITERATION_1 193 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 194 && BOOST_PP_ITERATION_FINISH_1 >= 194 # define BOOST_PP_ITERATION_1 194 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 195 && BOOST_PP_ITERATION_FINISH_1 >= 195 # define BOOST_PP_ITERATION_1 195 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 196 && BOOST_PP_ITERATION_FINISH_1 >= 196 # define BOOST_PP_ITERATION_1 196 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 197 && BOOST_PP_ITERATION_FINISH_1 >= 197 # define BOOST_PP_ITERATION_1 197 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 198 && BOOST_PP_ITERATION_FINISH_1 >= 198 # define BOOST_PP_ITERATION_1 198 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 199 && BOOST_PP_ITERATION_FINISH_1 >= 199 # define BOOST_PP_ITERATION_1 199 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 200 && BOOST_PP_ITERATION_FINISH_1 >= 200 # define BOOST_PP_ITERATION_1 200 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 201 && BOOST_PP_ITERATION_FINISH_1 >= 201 # define BOOST_PP_ITERATION_1 201 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 202 && BOOST_PP_ITERATION_FINISH_1 >= 202 # define BOOST_PP_ITERATION_1 202 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 203 && BOOST_PP_ITERATION_FINISH_1 >= 203 # define BOOST_PP_ITERATION_1 203 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 204 && BOOST_PP_ITERATION_FINISH_1 >= 204 # define BOOST_PP_ITERATION_1 204 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 205 && BOOST_PP_ITERATION_FINISH_1 >= 205 # define BOOST_PP_ITERATION_1 205 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 206 && BOOST_PP_ITERATION_FINISH_1 >= 206 # define BOOST_PP_ITERATION_1 206 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 207 && BOOST_PP_ITERATION_FINISH_1 >= 207 # define BOOST_PP_ITERATION_1 207 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 208 && BOOST_PP_ITERATION_FINISH_1 >= 208 # define BOOST_PP_ITERATION_1 208 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 209 && BOOST_PP_ITERATION_FINISH_1 >= 209 # define BOOST_PP_ITERATION_1 209 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 210 && BOOST_PP_ITERATION_FINISH_1 >= 210 # define BOOST_PP_ITERATION_1 210 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 211 && BOOST_PP_ITERATION_FINISH_1 >= 211 # define BOOST_PP_ITERATION_1 211 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 212 && BOOST_PP_ITERATION_FINISH_1 >= 212 # define BOOST_PP_ITERATION_1 212 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 213 && BOOST_PP_ITERATION_FINISH_1 >= 213 # define BOOST_PP_ITERATION_1 213 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 214 && BOOST_PP_ITERATION_FINISH_1 >= 214 # define BOOST_PP_ITERATION_1 214 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 215 && BOOST_PP_ITERATION_FINISH_1 >= 215 # define BOOST_PP_ITERATION_1 215 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 216 && BOOST_PP_ITERATION_FINISH_1 >= 216 # define BOOST_PP_ITERATION_1 216 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 217 && BOOST_PP_ITERATION_FINISH_1 >= 217 # define BOOST_PP_ITERATION_1 217 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 218 && BOOST_PP_ITERATION_FINISH_1 >= 218 # define BOOST_PP_ITERATION_1 218 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 219 && BOOST_PP_ITERATION_FINISH_1 >= 219 # define BOOST_PP_ITERATION_1 219 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 220 && BOOST_PP_ITERATION_FINISH_1 >= 220 # define BOOST_PP_ITERATION_1 220 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 221 && BOOST_PP_ITERATION_FINISH_1 >= 221 # define BOOST_PP_ITERATION_1 221 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 222 && BOOST_PP_ITERATION_FINISH_1 >= 222 # define BOOST_PP_ITERATION_1 222 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 223 && BOOST_PP_ITERATION_FINISH_1 >= 223 # define BOOST_PP_ITERATION_1 223 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 224 && BOOST_PP_ITERATION_FINISH_1 >= 224 # define BOOST_PP_ITERATION_1 224 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 225 && BOOST_PP_ITERATION_FINISH_1 >= 225 # define BOOST_PP_ITERATION_1 225 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 226 && BOOST_PP_ITERATION_FINISH_1 >= 226 # define BOOST_PP_ITERATION_1 226 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 227 && BOOST_PP_ITERATION_FINISH_1 >= 227 # define BOOST_PP_ITERATION_1 227 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 228 && BOOST_PP_ITERATION_FINISH_1 >= 228 # define BOOST_PP_ITERATION_1 228 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 229 && BOOST_PP_ITERATION_FINISH_1 >= 229 # define BOOST_PP_ITERATION_1 229 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 230 && BOOST_PP_ITERATION_FINISH_1 >= 230 # define BOOST_PP_ITERATION_1 230 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 231 && BOOST_PP_ITERATION_FINISH_1 >= 231 # define BOOST_PP_ITERATION_1 231 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 232 && BOOST_PP_ITERATION_FINISH_1 >= 232 # define BOOST_PP_ITERATION_1 232 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 233 && BOOST_PP_ITERATION_FINISH_1 >= 233 # define BOOST_PP_ITERATION_1 233 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 234 && BOOST_PP_ITERATION_FINISH_1 >= 234 # define BOOST_PP_ITERATION_1 234 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 235 && BOOST_PP_ITERATION_FINISH_1 >= 235 # define BOOST_PP_ITERATION_1 235 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 236 && BOOST_PP_ITERATION_FINISH_1 >= 236 # define BOOST_PP_ITERATION_1 236 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 237 && BOOST_PP_ITERATION_FINISH_1 >= 237 # define BOOST_PP_ITERATION_1 237 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 238 && BOOST_PP_ITERATION_FINISH_1 >= 238 # define BOOST_PP_ITERATION_1 238 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 239 && BOOST_PP_ITERATION_FINISH_1 >= 239 # define BOOST_PP_ITERATION_1 239 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 240 && BOOST_PP_ITERATION_FINISH_1 >= 240 # define BOOST_PP_ITERATION_1 240 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 241 && BOOST_PP_ITERATION_FINISH_1 >= 241 # define BOOST_PP_ITERATION_1 241 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 242 && BOOST_PP_ITERATION_FINISH_1 >= 242 # define BOOST_PP_ITERATION_1 242 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 243 && BOOST_PP_ITERATION_FINISH_1 >= 243 # define BOOST_PP_ITERATION_1 243 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 244 && BOOST_PP_ITERATION_FINISH_1 >= 244 # define BOOST_PP_ITERATION_1 244 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 245 && BOOST_PP_ITERATION_FINISH_1 >= 245 # define BOOST_PP_ITERATION_1 245 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 246 && BOOST_PP_ITERATION_FINISH_1 >= 246 # define BOOST_PP_ITERATION_1 246 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 247 && BOOST_PP_ITERATION_FINISH_1 >= 247 # define BOOST_PP_ITERATION_1 247 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 248 && BOOST_PP_ITERATION_FINISH_1 >= 248 # define BOOST_PP_ITERATION_1 248 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 249 && BOOST_PP_ITERATION_FINISH_1 >= 249 # define BOOST_PP_ITERATION_1 249 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 250 && BOOST_PP_ITERATION_FINISH_1 >= 250 # define BOOST_PP_ITERATION_1 250 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 251 && BOOST_PP_ITERATION_FINISH_1 >= 251 # define BOOST_PP_ITERATION_1 251 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 252 && BOOST_PP_ITERATION_FINISH_1 >= 252 # define BOOST_PP_ITERATION_1 252 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 253 && BOOST_PP_ITERATION_FINISH_1 >= 253 # define BOOST_PP_ITERATION_1 253 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 254 && BOOST_PP_ITERATION_FINISH_1 >= 254 # define BOOST_PP_ITERATION_1 254 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 255 && BOOST_PP_ITERATION_FINISH_1 >= 255 # define BOOST_PP_ITERATION_1 255 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 256 && BOOST_PP_ITERATION_FINISH_1 >= 256 # define BOOST_PP_ITERATION_1 256 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # endif # # undef BOOST_PP_IS_ITERATING # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 0 # # undef BOOST_PP_ITERATION_START_1 # undef BOOST_PP_ITERATION_FINISH_1 # undef BOOST_PP_FILENAME_1 # # undef BOOST_PP_ITERATION_FLAGS_1 # undef BOOST_PP_ITERATION_PARAMS_1 passenger-4.0.37/ext/boost/preprocessor/iteration/detail/iter/forward2.hpp000644 000765 000024 00000152665 12233035540 027351 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if defined(BOOST_PP_ITERATION_LIMITS) # if !defined(BOOST_PP_FILENAME_2) # error BOOST_PP_ERROR: depth #2 filename is not defined # endif # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_ITERATION_FLAGS_2() 0 # undef BOOST_PP_ITERATION_LIMITS # elif defined(BOOST_PP_ITERATION_PARAMS_2) # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_2) # include # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_2) # include # define BOOST_PP_FILENAME_2 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_2) # if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_2) >= 4 # define BOOST_PP_ITERATION_FLAGS_2() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_2) # else # define BOOST_PP_ITERATION_FLAGS_2() 0 # endif # else # error BOOST_PP_ERROR: depth #2 iteration boundaries or filename not defined # endif # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 2 # # if (BOOST_PP_ITERATION_START_2) > (BOOST_PP_ITERATION_FINISH_2) # include # else # if BOOST_PP_ITERATION_START_2 <= 0 && BOOST_PP_ITERATION_FINISH_2 >= 0 # define BOOST_PP_ITERATION_2 0 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 1 && BOOST_PP_ITERATION_FINISH_2 >= 1 # define BOOST_PP_ITERATION_2 1 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 2 && BOOST_PP_ITERATION_FINISH_2 >= 2 # define BOOST_PP_ITERATION_2 2 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 3 && BOOST_PP_ITERATION_FINISH_2 >= 3 # define BOOST_PP_ITERATION_2 3 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 4 && BOOST_PP_ITERATION_FINISH_2 >= 4 # define BOOST_PP_ITERATION_2 4 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 5 && BOOST_PP_ITERATION_FINISH_2 >= 5 # define BOOST_PP_ITERATION_2 5 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 6 && BOOST_PP_ITERATION_FINISH_2 >= 6 # define BOOST_PP_ITERATION_2 6 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 7 && BOOST_PP_ITERATION_FINISH_2 >= 7 # define BOOST_PP_ITERATION_2 7 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 8 && BOOST_PP_ITERATION_FINISH_2 >= 8 # define BOOST_PP_ITERATION_2 8 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 9 && BOOST_PP_ITERATION_FINISH_2 >= 9 # define BOOST_PP_ITERATION_2 9 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 10 && BOOST_PP_ITERATION_FINISH_2 >= 10 # define BOOST_PP_ITERATION_2 10 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 11 && BOOST_PP_ITERATION_FINISH_2 >= 11 # define BOOST_PP_ITERATION_2 11 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 12 && BOOST_PP_ITERATION_FINISH_2 >= 12 # define BOOST_PP_ITERATION_2 12 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 13 && BOOST_PP_ITERATION_FINISH_2 >= 13 # define BOOST_PP_ITERATION_2 13 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 14 && BOOST_PP_ITERATION_FINISH_2 >= 14 # define BOOST_PP_ITERATION_2 14 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 15 && BOOST_PP_ITERATION_FINISH_2 >= 15 # define BOOST_PP_ITERATION_2 15 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 16 && BOOST_PP_ITERATION_FINISH_2 >= 16 # define BOOST_PP_ITERATION_2 16 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 17 && BOOST_PP_ITERATION_FINISH_2 >= 17 # define BOOST_PP_ITERATION_2 17 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 18 && BOOST_PP_ITERATION_FINISH_2 >= 18 # define BOOST_PP_ITERATION_2 18 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 19 && BOOST_PP_ITERATION_FINISH_2 >= 19 # define BOOST_PP_ITERATION_2 19 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 20 && BOOST_PP_ITERATION_FINISH_2 >= 20 # define BOOST_PP_ITERATION_2 20 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 21 && BOOST_PP_ITERATION_FINISH_2 >= 21 # define BOOST_PP_ITERATION_2 21 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 22 && BOOST_PP_ITERATION_FINISH_2 >= 22 # define BOOST_PP_ITERATION_2 22 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 23 && BOOST_PP_ITERATION_FINISH_2 >= 23 # define BOOST_PP_ITERATION_2 23 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 24 && BOOST_PP_ITERATION_FINISH_2 >= 24 # define BOOST_PP_ITERATION_2 24 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 25 && BOOST_PP_ITERATION_FINISH_2 >= 25 # define BOOST_PP_ITERATION_2 25 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 26 && BOOST_PP_ITERATION_FINISH_2 >= 26 # define BOOST_PP_ITERATION_2 26 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 27 && BOOST_PP_ITERATION_FINISH_2 >= 27 # define BOOST_PP_ITERATION_2 27 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 28 && BOOST_PP_ITERATION_FINISH_2 >= 28 # define BOOST_PP_ITERATION_2 28 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 29 && BOOST_PP_ITERATION_FINISH_2 >= 29 # define BOOST_PP_ITERATION_2 29 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 30 && BOOST_PP_ITERATION_FINISH_2 >= 30 # define BOOST_PP_ITERATION_2 30 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 31 && BOOST_PP_ITERATION_FINISH_2 >= 31 # define BOOST_PP_ITERATION_2 31 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 32 && BOOST_PP_ITERATION_FINISH_2 >= 32 # define BOOST_PP_ITERATION_2 32 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 33 && BOOST_PP_ITERATION_FINISH_2 >= 33 # define BOOST_PP_ITERATION_2 33 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 34 && BOOST_PP_ITERATION_FINISH_2 >= 34 # define BOOST_PP_ITERATION_2 34 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 35 && BOOST_PP_ITERATION_FINISH_2 >= 35 # define BOOST_PP_ITERATION_2 35 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 36 && BOOST_PP_ITERATION_FINISH_2 >= 36 # define BOOST_PP_ITERATION_2 36 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 37 && BOOST_PP_ITERATION_FINISH_2 >= 37 # define BOOST_PP_ITERATION_2 37 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 38 && BOOST_PP_ITERATION_FINISH_2 >= 38 # define BOOST_PP_ITERATION_2 38 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 39 && BOOST_PP_ITERATION_FINISH_2 >= 39 # define BOOST_PP_ITERATION_2 39 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 40 && BOOST_PP_ITERATION_FINISH_2 >= 40 # define BOOST_PP_ITERATION_2 40 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 41 && BOOST_PP_ITERATION_FINISH_2 >= 41 # define BOOST_PP_ITERATION_2 41 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 42 && BOOST_PP_ITERATION_FINISH_2 >= 42 # define BOOST_PP_ITERATION_2 42 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 43 && BOOST_PP_ITERATION_FINISH_2 >= 43 # define BOOST_PP_ITERATION_2 43 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 44 && BOOST_PP_ITERATION_FINISH_2 >= 44 # define BOOST_PP_ITERATION_2 44 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 45 && BOOST_PP_ITERATION_FINISH_2 >= 45 # define BOOST_PP_ITERATION_2 45 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 46 && BOOST_PP_ITERATION_FINISH_2 >= 46 # define BOOST_PP_ITERATION_2 46 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 47 && BOOST_PP_ITERATION_FINISH_2 >= 47 # define BOOST_PP_ITERATION_2 47 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 48 && BOOST_PP_ITERATION_FINISH_2 >= 48 # define BOOST_PP_ITERATION_2 48 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 49 && BOOST_PP_ITERATION_FINISH_2 >= 49 # define BOOST_PP_ITERATION_2 49 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 50 && BOOST_PP_ITERATION_FINISH_2 >= 50 # define BOOST_PP_ITERATION_2 50 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 51 && BOOST_PP_ITERATION_FINISH_2 >= 51 # define BOOST_PP_ITERATION_2 51 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 52 && BOOST_PP_ITERATION_FINISH_2 >= 52 # define BOOST_PP_ITERATION_2 52 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 53 && BOOST_PP_ITERATION_FINISH_2 >= 53 # define BOOST_PP_ITERATION_2 53 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 54 && BOOST_PP_ITERATION_FINISH_2 >= 54 # define BOOST_PP_ITERATION_2 54 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 55 && BOOST_PP_ITERATION_FINISH_2 >= 55 # define BOOST_PP_ITERATION_2 55 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 56 && BOOST_PP_ITERATION_FINISH_2 >= 56 # define BOOST_PP_ITERATION_2 56 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 57 && BOOST_PP_ITERATION_FINISH_2 >= 57 # define BOOST_PP_ITERATION_2 57 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 58 && BOOST_PP_ITERATION_FINISH_2 >= 58 # define BOOST_PP_ITERATION_2 58 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 59 && BOOST_PP_ITERATION_FINISH_2 >= 59 # define BOOST_PP_ITERATION_2 59 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 60 && BOOST_PP_ITERATION_FINISH_2 >= 60 # define BOOST_PP_ITERATION_2 60 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 61 && BOOST_PP_ITERATION_FINISH_2 >= 61 # define BOOST_PP_ITERATION_2 61 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 62 && BOOST_PP_ITERATION_FINISH_2 >= 62 # define BOOST_PP_ITERATION_2 62 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 63 && BOOST_PP_ITERATION_FINISH_2 >= 63 # define BOOST_PP_ITERATION_2 63 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 64 && BOOST_PP_ITERATION_FINISH_2 >= 64 # define BOOST_PP_ITERATION_2 64 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 65 && BOOST_PP_ITERATION_FINISH_2 >= 65 # define BOOST_PP_ITERATION_2 65 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 66 && BOOST_PP_ITERATION_FINISH_2 >= 66 # define BOOST_PP_ITERATION_2 66 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 67 && BOOST_PP_ITERATION_FINISH_2 >= 67 # define BOOST_PP_ITERATION_2 67 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 68 && BOOST_PP_ITERATION_FINISH_2 >= 68 # define BOOST_PP_ITERATION_2 68 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 69 && BOOST_PP_ITERATION_FINISH_2 >= 69 # define BOOST_PP_ITERATION_2 69 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 70 && BOOST_PP_ITERATION_FINISH_2 >= 70 # define BOOST_PP_ITERATION_2 70 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 71 && BOOST_PP_ITERATION_FINISH_2 >= 71 # define BOOST_PP_ITERATION_2 71 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 72 && BOOST_PP_ITERATION_FINISH_2 >= 72 # define BOOST_PP_ITERATION_2 72 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 73 && BOOST_PP_ITERATION_FINISH_2 >= 73 # define BOOST_PP_ITERATION_2 73 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 74 && BOOST_PP_ITERATION_FINISH_2 >= 74 # define BOOST_PP_ITERATION_2 74 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 75 && BOOST_PP_ITERATION_FINISH_2 >= 75 # define BOOST_PP_ITERATION_2 75 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 76 && BOOST_PP_ITERATION_FINISH_2 >= 76 # define BOOST_PP_ITERATION_2 76 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 77 && BOOST_PP_ITERATION_FINISH_2 >= 77 # define BOOST_PP_ITERATION_2 77 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 78 && BOOST_PP_ITERATION_FINISH_2 >= 78 # define BOOST_PP_ITERATION_2 78 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 79 && BOOST_PP_ITERATION_FINISH_2 >= 79 # define BOOST_PP_ITERATION_2 79 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 80 && BOOST_PP_ITERATION_FINISH_2 >= 80 # define BOOST_PP_ITERATION_2 80 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 81 && BOOST_PP_ITERATION_FINISH_2 >= 81 # define BOOST_PP_ITERATION_2 81 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 82 && BOOST_PP_ITERATION_FINISH_2 >= 82 # define BOOST_PP_ITERATION_2 82 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 83 && BOOST_PP_ITERATION_FINISH_2 >= 83 # define BOOST_PP_ITERATION_2 83 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 84 && BOOST_PP_ITERATION_FINISH_2 >= 84 # define BOOST_PP_ITERATION_2 84 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 85 && BOOST_PP_ITERATION_FINISH_2 >= 85 # define BOOST_PP_ITERATION_2 85 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 86 && BOOST_PP_ITERATION_FINISH_2 >= 86 # define BOOST_PP_ITERATION_2 86 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 87 && BOOST_PP_ITERATION_FINISH_2 >= 87 # define BOOST_PP_ITERATION_2 87 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 88 && BOOST_PP_ITERATION_FINISH_2 >= 88 # define BOOST_PP_ITERATION_2 88 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 89 && BOOST_PP_ITERATION_FINISH_2 >= 89 # define BOOST_PP_ITERATION_2 89 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 90 && BOOST_PP_ITERATION_FINISH_2 >= 90 # define BOOST_PP_ITERATION_2 90 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 91 && BOOST_PP_ITERATION_FINISH_2 >= 91 # define BOOST_PP_ITERATION_2 91 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 92 && BOOST_PP_ITERATION_FINISH_2 >= 92 # define BOOST_PP_ITERATION_2 92 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 93 && BOOST_PP_ITERATION_FINISH_2 >= 93 # define BOOST_PP_ITERATION_2 93 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 94 && BOOST_PP_ITERATION_FINISH_2 >= 94 # define BOOST_PP_ITERATION_2 94 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 95 && BOOST_PP_ITERATION_FINISH_2 >= 95 # define BOOST_PP_ITERATION_2 95 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 96 && BOOST_PP_ITERATION_FINISH_2 >= 96 # define BOOST_PP_ITERATION_2 96 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 97 && BOOST_PP_ITERATION_FINISH_2 >= 97 # define BOOST_PP_ITERATION_2 97 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 98 && BOOST_PP_ITERATION_FINISH_2 >= 98 # define BOOST_PP_ITERATION_2 98 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 99 && BOOST_PP_ITERATION_FINISH_2 >= 99 # define BOOST_PP_ITERATION_2 99 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 100 && BOOST_PP_ITERATION_FINISH_2 >= 100 # define BOOST_PP_ITERATION_2 100 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 101 && BOOST_PP_ITERATION_FINISH_2 >= 101 # define BOOST_PP_ITERATION_2 101 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 102 && BOOST_PP_ITERATION_FINISH_2 >= 102 # define BOOST_PP_ITERATION_2 102 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 103 && BOOST_PP_ITERATION_FINISH_2 >= 103 # define BOOST_PP_ITERATION_2 103 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 104 && BOOST_PP_ITERATION_FINISH_2 >= 104 # define BOOST_PP_ITERATION_2 104 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 105 && BOOST_PP_ITERATION_FINISH_2 >= 105 # define BOOST_PP_ITERATION_2 105 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 106 && BOOST_PP_ITERATION_FINISH_2 >= 106 # define BOOST_PP_ITERATION_2 106 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 107 && BOOST_PP_ITERATION_FINISH_2 >= 107 # define BOOST_PP_ITERATION_2 107 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 108 && BOOST_PP_ITERATION_FINISH_2 >= 108 # define BOOST_PP_ITERATION_2 108 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 109 && BOOST_PP_ITERATION_FINISH_2 >= 109 # define BOOST_PP_ITERATION_2 109 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 110 && BOOST_PP_ITERATION_FINISH_2 >= 110 # define BOOST_PP_ITERATION_2 110 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 111 && BOOST_PP_ITERATION_FINISH_2 >= 111 # define BOOST_PP_ITERATION_2 111 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 112 && BOOST_PP_ITERATION_FINISH_2 >= 112 # define BOOST_PP_ITERATION_2 112 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 113 && BOOST_PP_ITERATION_FINISH_2 >= 113 # define BOOST_PP_ITERATION_2 113 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 114 && BOOST_PP_ITERATION_FINISH_2 >= 114 # define BOOST_PP_ITERATION_2 114 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 115 && BOOST_PP_ITERATION_FINISH_2 >= 115 # define BOOST_PP_ITERATION_2 115 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 116 && BOOST_PP_ITERATION_FINISH_2 >= 116 # define BOOST_PP_ITERATION_2 116 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 117 && BOOST_PP_ITERATION_FINISH_2 >= 117 # define BOOST_PP_ITERATION_2 117 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 118 && BOOST_PP_ITERATION_FINISH_2 >= 118 # define BOOST_PP_ITERATION_2 118 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 119 && BOOST_PP_ITERATION_FINISH_2 >= 119 # define BOOST_PP_ITERATION_2 119 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 120 && BOOST_PP_ITERATION_FINISH_2 >= 120 # define BOOST_PP_ITERATION_2 120 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 121 && BOOST_PP_ITERATION_FINISH_2 >= 121 # define BOOST_PP_ITERATION_2 121 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 122 && BOOST_PP_ITERATION_FINISH_2 >= 122 # define BOOST_PP_ITERATION_2 122 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 123 && BOOST_PP_ITERATION_FINISH_2 >= 123 # define BOOST_PP_ITERATION_2 123 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 124 && BOOST_PP_ITERATION_FINISH_2 >= 124 # define BOOST_PP_ITERATION_2 124 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 125 && BOOST_PP_ITERATION_FINISH_2 >= 125 # define BOOST_PP_ITERATION_2 125 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 126 && BOOST_PP_ITERATION_FINISH_2 >= 126 # define BOOST_PP_ITERATION_2 126 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 127 && BOOST_PP_ITERATION_FINISH_2 >= 127 # define BOOST_PP_ITERATION_2 127 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 128 && BOOST_PP_ITERATION_FINISH_2 >= 128 # define BOOST_PP_ITERATION_2 128 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 129 && BOOST_PP_ITERATION_FINISH_2 >= 129 # define BOOST_PP_ITERATION_2 129 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 130 && BOOST_PP_ITERATION_FINISH_2 >= 130 # define BOOST_PP_ITERATION_2 130 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 131 && BOOST_PP_ITERATION_FINISH_2 >= 131 # define BOOST_PP_ITERATION_2 131 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 132 && BOOST_PP_ITERATION_FINISH_2 >= 132 # define BOOST_PP_ITERATION_2 132 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 133 && BOOST_PP_ITERATION_FINISH_2 >= 133 # define BOOST_PP_ITERATION_2 133 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 134 && BOOST_PP_ITERATION_FINISH_2 >= 134 # define BOOST_PP_ITERATION_2 134 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 135 && BOOST_PP_ITERATION_FINISH_2 >= 135 # define BOOST_PP_ITERATION_2 135 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 136 && BOOST_PP_ITERATION_FINISH_2 >= 136 # define BOOST_PP_ITERATION_2 136 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 137 && BOOST_PP_ITERATION_FINISH_2 >= 137 # define BOOST_PP_ITERATION_2 137 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 138 && BOOST_PP_ITERATION_FINISH_2 >= 138 # define BOOST_PP_ITERATION_2 138 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 139 && BOOST_PP_ITERATION_FINISH_2 >= 139 # define BOOST_PP_ITERATION_2 139 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 140 && BOOST_PP_ITERATION_FINISH_2 >= 140 # define BOOST_PP_ITERATION_2 140 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 141 && BOOST_PP_ITERATION_FINISH_2 >= 141 # define BOOST_PP_ITERATION_2 141 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 142 && BOOST_PP_ITERATION_FINISH_2 >= 142 # define BOOST_PP_ITERATION_2 142 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 143 && BOOST_PP_ITERATION_FINISH_2 >= 143 # define BOOST_PP_ITERATION_2 143 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 144 && BOOST_PP_ITERATION_FINISH_2 >= 144 # define BOOST_PP_ITERATION_2 144 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 145 && BOOST_PP_ITERATION_FINISH_2 >= 145 # define BOOST_PP_ITERATION_2 145 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 146 && BOOST_PP_ITERATION_FINISH_2 >= 146 # define BOOST_PP_ITERATION_2 146 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 147 && BOOST_PP_ITERATION_FINISH_2 >= 147 # define BOOST_PP_ITERATION_2 147 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 148 && BOOST_PP_ITERATION_FINISH_2 >= 148 # define BOOST_PP_ITERATION_2 148 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 149 && BOOST_PP_ITERATION_FINISH_2 >= 149 # define BOOST_PP_ITERATION_2 149 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 150 && BOOST_PP_ITERATION_FINISH_2 >= 150 # define BOOST_PP_ITERATION_2 150 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 151 && BOOST_PP_ITERATION_FINISH_2 >= 151 # define BOOST_PP_ITERATION_2 151 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 152 && BOOST_PP_ITERATION_FINISH_2 >= 152 # define BOOST_PP_ITERATION_2 152 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 153 && BOOST_PP_ITERATION_FINISH_2 >= 153 # define BOOST_PP_ITERATION_2 153 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 154 && BOOST_PP_ITERATION_FINISH_2 >= 154 # define BOOST_PP_ITERATION_2 154 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 155 && BOOST_PP_ITERATION_FINISH_2 >= 155 # define BOOST_PP_ITERATION_2 155 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 156 && BOOST_PP_ITERATION_FINISH_2 >= 156 # define BOOST_PP_ITERATION_2 156 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 157 && BOOST_PP_ITERATION_FINISH_2 >= 157 # define BOOST_PP_ITERATION_2 157 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 158 && BOOST_PP_ITERATION_FINISH_2 >= 158 # define BOOST_PP_ITERATION_2 158 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 159 && BOOST_PP_ITERATION_FINISH_2 >= 159 # define BOOST_PP_ITERATION_2 159 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 160 && BOOST_PP_ITERATION_FINISH_2 >= 160 # define BOOST_PP_ITERATION_2 160 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 161 && BOOST_PP_ITERATION_FINISH_2 >= 161 # define BOOST_PP_ITERATION_2 161 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 162 && BOOST_PP_ITERATION_FINISH_2 >= 162 # define BOOST_PP_ITERATION_2 162 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 163 && BOOST_PP_ITERATION_FINISH_2 >= 163 # define BOOST_PP_ITERATION_2 163 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 164 && BOOST_PP_ITERATION_FINISH_2 >= 164 # define BOOST_PP_ITERATION_2 164 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 165 && BOOST_PP_ITERATION_FINISH_2 >= 165 # define BOOST_PP_ITERATION_2 165 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 166 && BOOST_PP_ITERATION_FINISH_2 >= 166 # define BOOST_PP_ITERATION_2 166 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 167 && BOOST_PP_ITERATION_FINISH_2 >= 167 # define BOOST_PP_ITERATION_2 167 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 168 && BOOST_PP_ITERATION_FINISH_2 >= 168 # define BOOST_PP_ITERATION_2 168 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 169 && BOOST_PP_ITERATION_FINISH_2 >= 169 # define BOOST_PP_ITERATION_2 169 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 170 && BOOST_PP_ITERATION_FINISH_2 >= 170 # define BOOST_PP_ITERATION_2 170 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 171 && BOOST_PP_ITERATION_FINISH_2 >= 171 # define BOOST_PP_ITERATION_2 171 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 172 && BOOST_PP_ITERATION_FINISH_2 >= 172 # define BOOST_PP_ITERATION_2 172 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 173 && BOOST_PP_ITERATION_FINISH_2 >= 173 # define BOOST_PP_ITERATION_2 173 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 174 && BOOST_PP_ITERATION_FINISH_2 >= 174 # define BOOST_PP_ITERATION_2 174 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 175 && BOOST_PP_ITERATION_FINISH_2 >= 175 # define BOOST_PP_ITERATION_2 175 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 176 && BOOST_PP_ITERATION_FINISH_2 >= 176 # define BOOST_PP_ITERATION_2 176 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 177 && BOOST_PP_ITERATION_FINISH_2 >= 177 # define BOOST_PP_ITERATION_2 177 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 178 && BOOST_PP_ITERATION_FINISH_2 >= 178 # define BOOST_PP_ITERATION_2 178 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 179 && BOOST_PP_ITERATION_FINISH_2 >= 179 # define BOOST_PP_ITERATION_2 179 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 180 && BOOST_PP_ITERATION_FINISH_2 >= 180 # define BOOST_PP_ITERATION_2 180 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 181 && BOOST_PP_ITERATION_FINISH_2 >= 181 # define BOOST_PP_ITERATION_2 181 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 182 && BOOST_PP_ITERATION_FINISH_2 >= 182 # define BOOST_PP_ITERATION_2 182 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 183 && BOOST_PP_ITERATION_FINISH_2 >= 183 # define BOOST_PP_ITERATION_2 183 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 184 && BOOST_PP_ITERATION_FINISH_2 >= 184 # define BOOST_PP_ITERATION_2 184 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 185 && BOOST_PP_ITERATION_FINISH_2 >= 185 # define BOOST_PP_ITERATION_2 185 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 186 && BOOST_PP_ITERATION_FINISH_2 >= 186 # define BOOST_PP_ITERATION_2 186 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 187 && BOOST_PP_ITERATION_FINISH_2 >= 187 # define BOOST_PP_ITERATION_2 187 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 188 && BOOST_PP_ITERATION_FINISH_2 >= 188 # define BOOST_PP_ITERATION_2 188 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 189 && BOOST_PP_ITERATION_FINISH_2 >= 189 # define BOOST_PP_ITERATION_2 189 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 190 && BOOST_PP_ITERATION_FINISH_2 >= 190 # define BOOST_PP_ITERATION_2 190 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 191 && BOOST_PP_ITERATION_FINISH_2 >= 191 # define BOOST_PP_ITERATION_2 191 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 192 && BOOST_PP_ITERATION_FINISH_2 >= 192 # define BOOST_PP_ITERATION_2 192 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 193 && BOOST_PP_ITERATION_FINISH_2 >= 193 # define BOOST_PP_ITERATION_2 193 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 194 && BOOST_PP_ITERATION_FINISH_2 >= 194 # define BOOST_PP_ITERATION_2 194 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 195 && BOOST_PP_ITERATION_FINISH_2 >= 195 # define BOOST_PP_ITERATION_2 195 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 196 && BOOST_PP_ITERATION_FINISH_2 >= 196 # define BOOST_PP_ITERATION_2 196 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 197 && BOOST_PP_ITERATION_FINISH_2 >= 197 # define BOOST_PP_ITERATION_2 197 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 198 && BOOST_PP_ITERATION_FINISH_2 >= 198 # define BOOST_PP_ITERATION_2 198 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 199 && BOOST_PP_ITERATION_FINISH_2 >= 199 # define BOOST_PP_ITERATION_2 199 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 200 && BOOST_PP_ITERATION_FINISH_2 >= 200 # define BOOST_PP_ITERATION_2 200 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 201 && BOOST_PP_ITERATION_FINISH_2 >= 201 # define BOOST_PP_ITERATION_2 201 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 202 && BOOST_PP_ITERATION_FINISH_2 >= 202 # define BOOST_PP_ITERATION_2 202 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 203 && BOOST_PP_ITERATION_FINISH_2 >= 203 # define BOOST_PP_ITERATION_2 203 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 204 && BOOST_PP_ITERATION_FINISH_2 >= 204 # define BOOST_PP_ITERATION_2 204 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 205 && BOOST_PP_ITERATION_FINISH_2 >= 205 # define BOOST_PP_ITERATION_2 205 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 206 && BOOST_PP_ITERATION_FINISH_2 >= 206 # define BOOST_PP_ITERATION_2 206 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 207 && BOOST_PP_ITERATION_FINISH_2 >= 207 # define BOOST_PP_ITERATION_2 207 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 208 && BOOST_PP_ITERATION_FINISH_2 >= 208 # define BOOST_PP_ITERATION_2 208 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 209 && BOOST_PP_ITERATION_FINISH_2 >= 209 # define BOOST_PP_ITERATION_2 209 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 210 && BOOST_PP_ITERATION_FINISH_2 >= 210 # define BOOST_PP_ITERATION_2 210 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 211 && BOOST_PP_ITERATION_FINISH_2 >= 211 # define BOOST_PP_ITERATION_2 211 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 212 && BOOST_PP_ITERATION_FINISH_2 >= 212 # define BOOST_PP_ITERATION_2 212 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 213 && BOOST_PP_ITERATION_FINISH_2 >= 213 # define BOOST_PP_ITERATION_2 213 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 214 && BOOST_PP_ITERATION_FINISH_2 >= 214 # define BOOST_PP_ITERATION_2 214 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 215 && BOOST_PP_ITERATION_FINISH_2 >= 215 # define BOOST_PP_ITERATION_2 215 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 216 && BOOST_PP_ITERATION_FINISH_2 >= 216 # define BOOST_PP_ITERATION_2 216 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 217 && BOOST_PP_ITERATION_FINISH_2 >= 217 # define BOOST_PP_ITERATION_2 217 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 218 && BOOST_PP_ITERATION_FINISH_2 >= 218 # define BOOST_PP_ITERATION_2 218 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 219 && BOOST_PP_ITERATION_FINISH_2 >= 219 # define BOOST_PP_ITERATION_2 219 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 220 && BOOST_PP_ITERATION_FINISH_2 >= 220 # define BOOST_PP_ITERATION_2 220 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 221 && BOOST_PP_ITERATION_FINISH_2 >= 221 # define BOOST_PP_ITERATION_2 221 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 222 && BOOST_PP_ITERATION_FINISH_2 >= 222 # define BOOST_PP_ITERATION_2 222 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 223 && BOOST_PP_ITERATION_FINISH_2 >= 223 # define BOOST_PP_ITERATION_2 223 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 224 && BOOST_PP_ITERATION_FINISH_2 >= 224 # define BOOST_PP_ITERATION_2 224 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 225 && BOOST_PP_ITERATION_FINISH_2 >= 225 # define BOOST_PP_ITERATION_2 225 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 226 && BOOST_PP_ITERATION_FINISH_2 >= 226 # define BOOST_PP_ITERATION_2 226 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 227 && BOOST_PP_ITERATION_FINISH_2 >= 227 # define BOOST_PP_ITERATION_2 227 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 228 && BOOST_PP_ITERATION_FINISH_2 >= 228 # define BOOST_PP_ITERATION_2 228 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 229 && BOOST_PP_ITERATION_FINISH_2 >= 229 # define BOOST_PP_ITERATION_2 229 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 230 && BOOST_PP_ITERATION_FINISH_2 >= 230 # define BOOST_PP_ITERATION_2 230 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 231 && BOOST_PP_ITERATION_FINISH_2 >= 231 # define BOOST_PP_ITERATION_2 231 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 232 && BOOST_PP_ITERATION_FINISH_2 >= 232 # define BOOST_PP_ITERATION_2 232 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 233 && BOOST_PP_ITERATION_FINISH_2 >= 233 # define BOOST_PP_ITERATION_2 233 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 234 && BOOST_PP_ITERATION_FINISH_2 >= 234 # define BOOST_PP_ITERATION_2 234 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 235 && BOOST_PP_ITERATION_FINISH_2 >= 235 # define BOOST_PP_ITERATION_2 235 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 236 && BOOST_PP_ITERATION_FINISH_2 >= 236 # define BOOST_PP_ITERATION_2 236 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 237 && BOOST_PP_ITERATION_FINISH_2 >= 237 # define BOOST_PP_ITERATION_2 237 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 238 && BOOST_PP_ITERATION_FINISH_2 >= 238 # define BOOST_PP_ITERATION_2 238 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 239 && BOOST_PP_ITERATION_FINISH_2 >= 239 # define BOOST_PP_ITERATION_2 239 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 240 && BOOST_PP_ITERATION_FINISH_2 >= 240 # define BOOST_PP_ITERATION_2 240 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 241 && BOOST_PP_ITERATION_FINISH_2 >= 241 # define BOOST_PP_ITERATION_2 241 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 242 && BOOST_PP_ITERATION_FINISH_2 >= 242 # define BOOST_PP_ITERATION_2 242 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 243 && BOOST_PP_ITERATION_FINISH_2 >= 243 # define BOOST_PP_ITERATION_2 243 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 244 && BOOST_PP_ITERATION_FINISH_2 >= 244 # define BOOST_PP_ITERATION_2 244 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 245 && BOOST_PP_ITERATION_FINISH_2 >= 245 # define BOOST_PP_ITERATION_2 245 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 246 && BOOST_PP_ITERATION_FINISH_2 >= 246 # define BOOST_PP_ITERATION_2 246 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 247 && BOOST_PP_ITERATION_FINISH_2 >= 247 # define BOOST_PP_ITERATION_2 247 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 248 && BOOST_PP_ITERATION_FINISH_2 >= 248 # define BOOST_PP_ITERATION_2 248 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 249 && BOOST_PP_ITERATION_FINISH_2 >= 249 # define BOOST_PP_ITERATION_2 249 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 250 && BOOST_PP_ITERATION_FINISH_2 >= 250 # define BOOST_PP_ITERATION_2 250 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 251 && BOOST_PP_ITERATION_FINISH_2 >= 251 # define BOOST_PP_ITERATION_2 251 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 252 && BOOST_PP_ITERATION_FINISH_2 >= 252 # define BOOST_PP_ITERATION_2 252 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 253 && BOOST_PP_ITERATION_FINISH_2 >= 253 # define BOOST_PP_ITERATION_2 253 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 254 && BOOST_PP_ITERATION_FINISH_2 >= 254 # define BOOST_PP_ITERATION_2 254 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 255 && BOOST_PP_ITERATION_FINISH_2 >= 255 # define BOOST_PP_ITERATION_2 255 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 256 && BOOST_PP_ITERATION_FINISH_2 >= 256 # define BOOST_PP_ITERATION_2 256 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # endif # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 1 # # undef BOOST_PP_ITERATION_START_2 # undef BOOST_PP_ITERATION_FINISH_2 # undef BOOST_PP_FILENAME_2 # # undef BOOST_PP_ITERATION_FLAGS_2 # undef BOOST_PP_ITERATION_PARAMS_2 passenger-4.0.37/ext/boost/preprocessor/iteration/detail/iter/reverse1.hpp000644 000765 000024 00000136313 12233035540 027347 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if BOOST_PP_ITERATION_FINISH_1 <= 256 && BOOST_PP_ITERATION_START_1 >= 256 # define BOOST_PP_ITERATION_1 256 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 255 && BOOST_PP_ITERATION_START_1 >= 255 # define BOOST_PP_ITERATION_1 255 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 254 && BOOST_PP_ITERATION_START_1 >= 254 # define BOOST_PP_ITERATION_1 254 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 253 && BOOST_PP_ITERATION_START_1 >= 253 # define BOOST_PP_ITERATION_1 253 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 252 && BOOST_PP_ITERATION_START_1 >= 252 # define BOOST_PP_ITERATION_1 252 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 251 && BOOST_PP_ITERATION_START_1 >= 251 # define BOOST_PP_ITERATION_1 251 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 250 && BOOST_PP_ITERATION_START_1 >= 250 # define BOOST_PP_ITERATION_1 250 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 249 && BOOST_PP_ITERATION_START_1 >= 249 # define BOOST_PP_ITERATION_1 249 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 248 && BOOST_PP_ITERATION_START_1 >= 248 # define BOOST_PP_ITERATION_1 248 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 247 && BOOST_PP_ITERATION_START_1 >= 247 # define BOOST_PP_ITERATION_1 247 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 246 && BOOST_PP_ITERATION_START_1 >= 246 # define BOOST_PP_ITERATION_1 246 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 245 && BOOST_PP_ITERATION_START_1 >= 245 # define BOOST_PP_ITERATION_1 245 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 244 && BOOST_PP_ITERATION_START_1 >= 244 # define BOOST_PP_ITERATION_1 244 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 243 && BOOST_PP_ITERATION_START_1 >= 243 # define BOOST_PP_ITERATION_1 243 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 242 && BOOST_PP_ITERATION_START_1 >= 242 # define BOOST_PP_ITERATION_1 242 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 241 && BOOST_PP_ITERATION_START_1 >= 241 # define BOOST_PP_ITERATION_1 241 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 240 && BOOST_PP_ITERATION_START_1 >= 240 # define BOOST_PP_ITERATION_1 240 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 239 && BOOST_PP_ITERATION_START_1 >= 239 # define BOOST_PP_ITERATION_1 239 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 238 && BOOST_PP_ITERATION_START_1 >= 238 # define BOOST_PP_ITERATION_1 238 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 237 && BOOST_PP_ITERATION_START_1 >= 237 # define BOOST_PP_ITERATION_1 237 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 236 && BOOST_PP_ITERATION_START_1 >= 236 # define BOOST_PP_ITERATION_1 236 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 235 && BOOST_PP_ITERATION_START_1 >= 235 # define BOOST_PP_ITERATION_1 235 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 234 && BOOST_PP_ITERATION_START_1 >= 234 # define BOOST_PP_ITERATION_1 234 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 233 && BOOST_PP_ITERATION_START_1 >= 233 # define BOOST_PP_ITERATION_1 233 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 232 && BOOST_PP_ITERATION_START_1 >= 232 # define BOOST_PP_ITERATION_1 232 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 231 && BOOST_PP_ITERATION_START_1 >= 231 # define BOOST_PP_ITERATION_1 231 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 230 && BOOST_PP_ITERATION_START_1 >= 230 # define BOOST_PP_ITERATION_1 230 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 229 && BOOST_PP_ITERATION_START_1 >= 229 # define BOOST_PP_ITERATION_1 229 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 228 && BOOST_PP_ITERATION_START_1 >= 228 # define BOOST_PP_ITERATION_1 228 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 227 && BOOST_PP_ITERATION_START_1 >= 227 # define BOOST_PP_ITERATION_1 227 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 226 && BOOST_PP_ITERATION_START_1 >= 226 # define BOOST_PP_ITERATION_1 226 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 225 && BOOST_PP_ITERATION_START_1 >= 225 # define BOOST_PP_ITERATION_1 225 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 224 && BOOST_PP_ITERATION_START_1 >= 224 # define BOOST_PP_ITERATION_1 224 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 223 && BOOST_PP_ITERATION_START_1 >= 223 # define BOOST_PP_ITERATION_1 223 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 222 && BOOST_PP_ITERATION_START_1 >= 222 # define BOOST_PP_ITERATION_1 222 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 221 && BOOST_PP_ITERATION_START_1 >= 221 # define BOOST_PP_ITERATION_1 221 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 220 && BOOST_PP_ITERATION_START_1 >= 220 # define BOOST_PP_ITERATION_1 220 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 219 && BOOST_PP_ITERATION_START_1 >= 219 # define BOOST_PP_ITERATION_1 219 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 218 && BOOST_PP_ITERATION_START_1 >= 218 # define BOOST_PP_ITERATION_1 218 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 217 && BOOST_PP_ITERATION_START_1 >= 217 # define BOOST_PP_ITERATION_1 217 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 216 && BOOST_PP_ITERATION_START_1 >= 216 # define BOOST_PP_ITERATION_1 216 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 215 && BOOST_PP_ITERATION_START_1 >= 215 # define BOOST_PP_ITERATION_1 215 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 214 && BOOST_PP_ITERATION_START_1 >= 214 # define BOOST_PP_ITERATION_1 214 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 213 && BOOST_PP_ITERATION_START_1 >= 213 # define BOOST_PP_ITERATION_1 213 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 212 && BOOST_PP_ITERATION_START_1 >= 212 # define BOOST_PP_ITERATION_1 212 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 211 && BOOST_PP_ITERATION_START_1 >= 211 # define BOOST_PP_ITERATION_1 211 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 210 && BOOST_PP_ITERATION_START_1 >= 210 # define BOOST_PP_ITERATION_1 210 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 209 && BOOST_PP_ITERATION_START_1 >= 209 # define BOOST_PP_ITERATION_1 209 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 208 && BOOST_PP_ITERATION_START_1 >= 208 # define BOOST_PP_ITERATION_1 208 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 207 && BOOST_PP_ITERATION_START_1 >= 207 # define BOOST_PP_ITERATION_1 207 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 206 && BOOST_PP_ITERATION_START_1 >= 206 # define BOOST_PP_ITERATION_1 206 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 205 && BOOST_PP_ITERATION_START_1 >= 205 # define BOOST_PP_ITERATION_1 205 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 204 && BOOST_PP_ITERATION_START_1 >= 204 # define BOOST_PP_ITERATION_1 204 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 203 && BOOST_PP_ITERATION_START_1 >= 203 # define BOOST_PP_ITERATION_1 203 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 202 && BOOST_PP_ITERATION_START_1 >= 202 # define BOOST_PP_ITERATION_1 202 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 201 && BOOST_PP_ITERATION_START_1 >= 201 # define BOOST_PP_ITERATION_1 201 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 200 && BOOST_PP_ITERATION_START_1 >= 200 # define BOOST_PP_ITERATION_1 200 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 199 && BOOST_PP_ITERATION_START_1 >= 199 # define BOOST_PP_ITERATION_1 199 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 198 && BOOST_PP_ITERATION_START_1 >= 198 # define BOOST_PP_ITERATION_1 198 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 197 && BOOST_PP_ITERATION_START_1 >= 197 # define BOOST_PP_ITERATION_1 197 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 196 && BOOST_PP_ITERATION_START_1 >= 196 # define BOOST_PP_ITERATION_1 196 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 195 && BOOST_PP_ITERATION_START_1 >= 195 # define BOOST_PP_ITERATION_1 195 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 194 && BOOST_PP_ITERATION_START_1 >= 194 # define BOOST_PP_ITERATION_1 194 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 193 && BOOST_PP_ITERATION_START_1 >= 193 # define BOOST_PP_ITERATION_1 193 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 192 && BOOST_PP_ITERATION_START_1 >= 192 # define BOOST_PP_ITERATION_1 192 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 191 && BOOST_PP_ITERATION_START_1 >= 191 # define BOOST_PP_ITERATION_1 191 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 190 && BOOST_PP_ITERATION_START_1 >= 190 # define BOOST_PP_ITERATION_1 190 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 189 && BOOST_PP_ITERATION_START_1 >= 189 # define BOOST_PP_ITERATION_1 189 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 188 && BOOST_PP_ITERATION_START_1 >= 188 # define BOOST_PP_ITERATION_1 188 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 187 && BOOST_PP_ITERATION_START_1 >= 187 # define BOOST_PP_ITERATION_1 187 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 186 && BOOST_PP_ITERATION_START_1 >= 186 # define BOOST_PP_ITERATION_1 186 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 185 && BOOST_PP_ITERATION_START_1 >= 185 # define BOOST_PP_ITERATION_1 185 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 184 && BOOST_PP_ITERATION_START_1 >= 184 # define BOOST_PP_ITERATION_1 184 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 183 && BOOST_PP_ITERATION_START_1 >= 183 # define BOOST_PP_ITERATION_1 183 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 182 && BOOST_PP_ITERATION_START_1 >= 182 # define BOOST_PP_ITERATION_1 182 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 181 && BOOST_PP_ITERATION_START_1 >= 181 # define BOOST_PP_ITERATION_1 181 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 180 && BOOST_PP_ITERATION_START_1 >= 180 # define BOOST_PP_ITERATION_1 180 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 179 && BOOST_PP_ITERATION_START_1 >= 179 # define BOOST_PP_ITERATION_1 179 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 178 && BOOST_PP_ITERATION_START_1 >= 178 # define BOOST_PP_ITERATION_1 178 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 177 && BOOST_PP_ITERATION_START_1 >= 177 # define BOOST_PP_ITERATION_1 177 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 176 && BOOST_PP_ITERATION_START_1 >= 176 # define BOOST_PP_ITERATION_1 176 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 175 && BOOST_PP_ITERATION_START_1 >= 175 # define BOOST_PP_ITERATION_1 175 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 174 && BOOST_PP_ITERATION_START_1 >= 174 # define BOOST_PP_ITERATION_1 174 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 173 && BOOST_PP_ITERATION_START_1 >= 173 # define BOOST_PP_ITERATION_1 173 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 172 && BOOST_PP_ITERATION_START_1 >= 172 # define BOOST_PP_ITERATION_1 172 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 171 && BOOST_PP_ITERATION_START_1 >= 171 # define BOOST_PP_ITERATION_1 171 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 170 && BOOST_PP_ITERATION_START_1 >= 170 # define BOOST_PP_ITERATION_1 170 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 169 && BOOST_PP_ITERATION_START_1 >= 169 # define BOOST_PP_ITERATION_1 169 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 168 && BOOST_PP_ITERATION_START_1 >= 168 # define BOOST_PP_ITERATION_1 168 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 167 && BOOST_PP_ITERATION_START_1 >= 167 # define BOOST_PP_ITERATION_1 167 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 166 && BOOST_PP_ITERATION_START_1 >= 166 # define BOOST_PP_ITERATION_1 166 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 165 && BOOST_PP_ITERATION_START_1 >= 165 # define BOOST_PP_ITERATION_1 165 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 164 && BOOST_PP_ITERATION_START_1 >= 164 # define BOOST_PP_ITERATION_1 164 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 163 && BOOST_PP_ITERATION_START_1 >= 163 # define BOOST_PP_ITERATION_1 163 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 162 && BOOST_PP_ITERATION_START_1 >= 162 # define BOOST_PP_ITERATION_1 162 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 161 && BOOST_PP_ITERATION_START_1 >= 161 # define BOOST_PP_ITERATION_1 161 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 160 && BOOST_PP_ITERATION_START_1 >= 160 # define BOOST_PP_ITERATION_1 160 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 159 && BOOST_PP_ITERATION_START_1 >= 159 # define BOOST_PP_ITERATION_1 159 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 158 && BOOST_PP_ITERATION_START_1 >= 158 # define BOOST_PP_ITERATION_1 158 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 157 && BOOST_PP_ITERATION_START_1 >= 157 # define BOOST_PP_ITERATION_1 157 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 156 && BOOST_PP_ITERATION_START_1 >= 156 # define BOOST_PP_ITERATION_1 156 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 155 && BOOST_PP_ITERATION_START_1 >= 155 # define BOOST_PP_ITERATION_1 155 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 154 && BOOST_PP_ITERATION_START_1 >= 154 # define BOOST_PP_ITERATION_1 154 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 153 && BOOST_PP_ITERATION_START_1 >= 153 # define BOOST_PP_ITERATION_1 153 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 152 && BOOST_PP_ITERATION_START_1 >= 152 # define BOOST_PP_ITERATION_1 152 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 151 && BOOST_PP_ITERATION_START_1 >= 151 # define BOOST_PP_ITERATION_1 151 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 150 && BOOST_PP_ITERATION_START_1 >= 150 # define BOOST_PP_ITERATION_1 150 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 149 && BOOST_PP_ITERATION_START_1 >= 149 # define BOOST_PP_ITERATION_1 149 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 148 && BOOST_PP_ITERATION_START_1 >= 148 # define BOOST_PP_ITERATION_1 148 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 147 && BOOST_PP_ITERATION_START_1 >= 147 # define BOOST_PP_ITERATION_1 147 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 146 && BOOST_PP_ITERATION_START_1 >= 146 # define BOOST_PP_ITERATION_1 146 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 145 && BOOST_PP_ITERATION_START_1 >= 145 # define BOOST_PP_ITERATION_1 145 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 144 && BOOST_PP_ITERATION_START_1 >= 144 # define BOOST_PP_ITERATION_1 144 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 143 && BOOST_PP_ITERATION_START_1 >= 143 # define BOOST_PP_ITERATION_1 143 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 142 && BOOST_PP_ITERATION_START_1 >= 142 # define BOOST_PP_ITERATION_1 142 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 141 && BOOST_PP_ITERATION_START_1 >= 141 # define BOOST_PP_ITERATION_1 141 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 140 && BOOST_PP_ITERATION_START_1 >= 140 # define BOOST_PP_ITERATION_1 140 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 139 && BOOST_PP_ITERATION_START_1 >= 139 # define BOOST_PP_ITERATION_1 139 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 138 && BOOST_PP_ITERATION_START_1 >= 138 # define BOOST_PP_ITERATION_1 138 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 137 && BOOST_PP_ITERATION_START_1 >= 137 # define BOOST_PP_ITERATION_1 137 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 136 && BOOST_PP_ITERATION_START_1 >= 136 # define BOOST_PP_ITERATION_1 136 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 135 && BOOST_PP_ITERATION_START_1 >= 135 # define BOOST_PP_ITERATION_1 135 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 134 && BOOST_PP_ITERATION_START_1 >= 134 # define BOOST_PP_ITERATION_1 134 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 133 && BOOST_PP_ITERATION_START_1 >= 133 # define BOOST_PP_ITERATION_1 133 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 132 && BOOST_PP_ITERATION_START_1 >= 132 # define BOOST_PP_ITERATION_1 132 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 131 && BOOST_PP_ITERATION_START_1 >= 131 # define BOOST_PP_ITERATION_1 131 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 130 && BOOST_PP_ITERATION_START_1 >= 130 # define BOOST_PP_ITERATION_1 130 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 129 && BOOST_PP_ITERATION_START_1 >= 129 # define BOOST_PP_ITERATION_1 129 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 128 && BOOST_PP_ITERATION_START_1 >= 128 # define BOOST_PP_ITERATION_1 128 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 127 && BOOST_PP_ITERATION_START_1 >= 127 # define BOOST_PP_ITERATION_1 127 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 126 && BOOST_PP_ITERATION_START_1 >= 126 # define BOOST_PP_ITERATION_1 126 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 125 && BOOST_PP_ITERATION_START_1 >= 125 # define BOOST_PP_ITERATION_1 125 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 124 && BOOST_PP_ITERATION_START_1 >= 124 # define BOOST_PP_ITERATION_1 124 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 123 && BOOST_PP_ITERATION_START_1 >= 123 # define BOOST_PP_ITERATION_1 123 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 122 && BOOST_PP_ITERATION_START_1 >= 122 # define BOOST_PP_ITERATION_1 122 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 121 && BOOST_PP_ITERATION_START_1 >= 121 # define BOOST_PP_ITERATION_1 121 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 120 && BOOST_PP_ITERATION_START_1 >= 120 # define BOOST_PP_ITERATION_1 120 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 119 && BOOST_PP_ITERATION_START_1 >= 119 # define BOOST_PP_ITERATION_1 119 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 118 && BOOST_PP_ITERATION_START_1 >= 118 # define BOOST_PP_ITERATION_1 118 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 117 && BOOST_PP_ITERATION_START_1 >= 117 # define BOOST_PP_ITERATION_1 117 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 116 && BOOST_PP_ITERATION_START_1 >= 116 # define BOOST_PP_ITERATION_1 116 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 115 && BOOST_PP_ITERATION_START_1 >= 115 # define BOOST_PP_ITERATION_1 115 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 114 && BOOST_PP_ITERATION_START_1 >= 114 # define BOOST_PP_ITERATION_1 114 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 113 && BOOST_PP_ITERATION_START_1 >= 113 # define BOOST_PP_ITERATION_1 113 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 112 && BOOST_PP_ITERATION_START_1 >= 112 # define BOOST_PP_ITERATION_1 112 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 111 && BOOST_PP_ITERATION_START_1 >= 111 # define BOOST_PP_ITERATION_1 111 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 110 && BOOST_PP_ITERATION_START_1 >= 110 # define BOOST_PP_ITERATION_1 110 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 109 && BOOST_PP_ITERATION_START_1 >= 109 # define BOOST_PP_ITERATION_1 109 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 108 && BOOST_PP_ITERATION_START_1 >= 108 # define BOOST_PP_ITERATION_1 108 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 107 && BOOST_PP_ITERATION_START_1 >= 107 # define BOOST_PP_ITERATION_1 107 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 106 && BOOST_PP_ITERATION_START_1 >= 106 # define BOOST_PP_ITERATION_1 106 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 105 && BOOST_PP_ITERATION_START_1 >= 105 # define BOOST_PP_ITERATION_1 105 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 104 && BOOST_PP_ITERATION_START_1 >= 104 # define BOOST_PP_ITERATION_1 104 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 103 && BOOST_PP_ITERATION_START_1 >= 103 # define BOOST_PP_ITERATION_1 103 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 102 && BOOST_PP_ITERATION_START_1 >= 102 # define BOOST_PP_ITERATION_1 102 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 101 && BOOST_PP_ITERATION_START_1 >= 101 # define BOOST_PP_ITERATION_1 101 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 100 && BOOST_PP_ITERATION_START_1 >= 100 # define BOOST_PP_ITERATION_1 100 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 99 && BOOST_PP_ITERATION_START_1 >= 99 # define BOOST_PP_ITERATION_1 99 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 98 && BOOST_PP_ITERATION_START_1 >= 98 # define BOOST_PP_ITERATION_1 98 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 97 && BOOST_PP_ITERATION_START_1 >= 97 # define BOOST_PP_ITERATION_1 97 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 96 && BOOST_PP_ITERATION_START_1 >= 96 # define BOOST_PP_ITERATION_1 96 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 95 && BOOST_PP_ITERATION_START_1 >= 95 # define BOOST_PP_ITERATION_1 95 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 94 && BOOST_PP_ITERATION_START_1 >= 94 # define BOOST_PP_ITERATION_1 94 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 93 && BOOST_PP_ITERATION_START_1 >= 93 # define BOOST_PP_ITERATION_1 93 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 92 && BOOST_PP_ITERATION_START_1 >= 92 # define BOOST_PP_ITERATION_1 92 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 91 && BOOST_PP_ITERATION_START_1 >= 91 # define BOOST_PP_ITERATION_1 91 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 90 && BOOST_PP_ITERATION_START_1 >= 90 # define BOOST_PP_ITERATION_1 90 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 89 && BOOST_PP_ITERATION_START_1 >= 89 # define BOOST_PP_ITERATION_1 89 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 88 && BOOST_PP_ITERATION_START_1 >= 88 # define BOOST_PP_ITERATION_1 88 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 87 && BOOST_PP_ITERATION_START_1 >= 87 # define BOOST_PP_ITERATION_1 87 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 86 && BOOST_PP_ITERATION_START_1 >= 86 # define BOOST_PP_ITERATION_1 86 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 85 && BOOST_PP_ITERATION_START_1 >= 85 # define BOOST_PP_ITERATION_1 85 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 84 && BOOST_PP_ITERATION_START_1 >= 84 # define BOOST_PP_ITERATION_1 84 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 83 && BOOST_PP_ITERATION_START_1 >= 83 # define BOOST_PP_ITERATION_1 83 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 82 && BOOST_PP_ITERATION_START_1 >= 82 # define BOOST_PP_ITERATION_1 82 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 81 && BOOST_PP_ITERATION_START_1 >= 81 # define BOOST_PP_ITERATION_1 81 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 80 && BOOST_PP_ITERATION_START_1 >= 80 # define BOOST_PP_ITERATION_1 80 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 79 && BOOST_PP_ITERATION_START_1 >= 79 # define BOOST_PP_ITERATION_1 79 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 78 && BOOST_PP_ITERATION_START_1 >= 78 # define BOOST_PP_ITERATION_1 78 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 77 && BOOST_PP_ITERATION_START_1 >= 77 # define BOOST_PP_ITERATION_1 77 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 76 && BOOST_PP_ITERATION_START_1 >= 76 # define BOOST_PP_ITERATION_1 76 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 75 && BOOST_PP_ITERATION_START_1 >= 75 # define BOOST_PP_ITERATION_1 75 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 74 && BOOST_PP_ITERATION_START_1 >= 74 # define BOOST_PP_ITERATION_1 74 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 73 && BOOST_PP_ITERATION_START_1 >= 73 # define BOOST_PP_ITERATION_1 73 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 72 && BOOST_PP_ITERATION_START_1 >= 72 # define BOOST_PP_ITERATION_1 72 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 71 && BOOST_PP_ITERATION_START_1 >= 71 # define BOOST_PP_ITERATION_1 71 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 70 && BOOST_PP_ITERATION_START_1 >= 70 # define BOOST_PP_ITERATION_1 70 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 69 && BOOST_PP_ITERATION_START_1 >= 69 # define BOOST_PP_ITERATION_1 69 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 68 && BOOST_PP_ITERATION_START_1 >= 68 # define BOOST_PP_ITERATION_1 68 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 67 && BOOST_PP_ITERATION_START_1 >= 67 # define BOOST_PP_ITERATION_1 67 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 66 && BOOST_PP_ITERATION_START_1 >= 66 # define BOOST_PP_ITERATION_1 66 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 65 && BOOST_PP_ITERATION_START_1 >= 65 # define BOOST_PP_ITERATION_1 65 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 64 && BOOST_PP_ITERATION_START_1 >= 64 # define BOOST_PP_ITERATION_1 64 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 63 && BOOST_PP_ITERATION_START_1 >= 63 # define BOOST_PP_ITERATION_1 63 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 62 && BOOST_PP_ITERATION_START_1 >= 62 # define BOOST_PP_ITERATION_1 62 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 61 && BOOST_PP_ITERATION_START_1 >= 61 # define BOOST_PP_ITERATION_1 61 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 60 && BOOST_PP_ITERATION_START_1 >= 60 # define BOOST_PP_ITERATION_1 60 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 59 && BOOST_PP_ITERATION_START_1 >= 59 # define BOOST_PP_ITERATION_1 59 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 58 && BOOST_PP_ITERATION_START_1 >= 58 # define BOOST_PP_ITERATION_1 58 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 57 && BOOST_PP_ITERATION_START_1 >= 57 # define BOOST_PP_ITERATION_1 57 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 56 && BOOST_PP_ITERATION_START_1 >= 56 # define BOOST_PP_ITERATION_1 56 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 55 && BOOST_PP_ITERATION_START_1 >= 55 # define BOOST_PP_ITERATION_1 55 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 54 && BOOST_PP_ITERATION_START_1 >= 54 # define BOOST_PP_ITERATION_1 54 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 53 && BOOST_PP_ITERATION_START_1 >= 53 # define BOOST_PP_ITERATION_1 53 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 52 && BOOST_PP_ITERATION_START_1 >= 52 # define BOOST_PP_ITERATION_1 52 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 51 && BOOST_PP_ITERATION_START_1 >= 51 # define BOOST_PP_ITERATION_1 51 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 50 && BOOST_PP_ITERATION_START_1 >= 50 # define BOOST_PP_ITERATION_1 50 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 49 && BOOST_PP_ITERATION_START_1 >= 49 # define BOOST_PP_ITERATION_1 49 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 48 && BOOST_PP_ITERATION_START_1 >= 48 # define BOOST_PP_ITERATION_1 48 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 47 && BOOST_PP_ITERATION_START_1 >= 47 # define BOOST_PP_ITERATION_1 47 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 46 && BOOST_PP_ITERATION_START_1 >= 46 # define BOOST_PP_ITERATION_1 46 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 45 && BOOST_PP_ITERATION_START_1 >= 45 # define BOOST_PP_ITERATION_1 45 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 44 && BOOST_PP_ITERATION_START_1 >= 44 # define BOOST_PP_ITERATION_1 44 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 43 && BOOST_PP_ITERATION_START_1 >= 43 # define BOOST_PP_ITERATION_1 43 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 42 && BOOST_PP_ITERATION_START_1 >= 42 # define BOOST_PP_ITERATION_1 42 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 41 && BOOST_PP_ITERATION_START_1 >= 41 # define BOOST_PP_ITERATION_1 41 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 40 && BOOST_PP_ITERATION_START_1 >= 40 # define BOOST_PP_ITERATION_1 40 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 39 && BOOST_PP_ITERATION_START_1 >= 39 # define BOOST_PP_ITERATION_1 39 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 38 && BOOST_PP_ITERATION_START_1 >= 38 # define BOOST_PP_ITERATION_1 38 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 37 && BOOST_PP_ITERATION_START_1 >= 37 # define BOOST_PP_ITERATION_1 37 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 36 && BOOST_PP_ITERATION_START_1 >= 36 # define BOOST_PP_ITERATION_1 36 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 35 && BOOST_PP_ITERATION_START_1 >= 35 # define BOOST_PP_ITERATION_1 35 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 34 && BOOST_PP_ITERATION_START_1 >= 34 # define BOOST_PP_ITERATION_1 34 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 33 && BOOST_PP_ITERATION_START_1 >= 33 # define BOOST_PP_ITERATION_1 33 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 32 && BOOST_PP_ITERATION_START_1 >= 32 # define BOOST_PP_ITERATION_1 32 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 31 && BOOST_PP_ITERATION_START_1 >= 31 # define BOOST_PP_ITERATION_1 31 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 30 && BOOST_PP_ITERATION_START_1 >= 30 # define BOOST_PP_ITERATION_1 30 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 29 && BOOST_PP_ITERATION_START_1 >= 29 # define BOOST_PP_ITERATION_1 29 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 28 && BOOST_PP_ITERATION_START_1 >= 28 # define BOOST_PP_ITERATION_1 28 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 27 && BOOST_PP_ITERATION_START_1 >= 27 # define BOOST_PP_ITERATION_1 27 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 26 && BOOST_PP_ITERATION_START_1 >= 26 # define BOOST_PP_ITERATION_1 26 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 25 && BOOST_PP_ITERATION_START_1 >= 25 # define BOOST_PP_ITERATION_1 25 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 24 && BOOST_PP_ITERATION_START_1 >= 24 # define BOOST_PP_ITERATION_1 24 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 23 && BOOST_PP_ITERATION_START_1 >= 23 # define BOOST_PP_ITERATION_1 23 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 22 && BOOST_PP_ITERATION_START_1 >= 22 # define BOOST_PP_ITERATION_1 22 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 21 && BOOST_PP_ITERATION_START_1 >= 21 # define BOOST_PP_ITERATION_1 21 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 20 && BOOST_PP_ITERATION_START_1 >= 20 # define BOOST_PP_ITERATION_1 20 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 19 && BOOST_PP_ITERATION_START_1 >= 19 # define BOOST_PP_ITERATION_1 19 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 18 && BOOST_PP_ITERATION_START_1 >= 18 # define BOOST_PP_ITERATION_1 18 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 17 && BOOST_PP_ITERATION_START_1 >= 17 # define BOOST_PP_ITERATION_1 17 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 16 && BOOST_PP_ITERATION_START_1 >= 16 # define BOOST_PP_ITERATION_1 16 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 15 && BOOST_PP_ITERATION_START_1 >= 15 # define BOOST_PP_ITERATION_1 15 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 14 && BOOST_PP_ITERATION_START_1 >= 14 # define BOOST_PP_ITERATION_1 14 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 13 && BOOST_PP_ITERATION_START_1 >= 13 # define BOOST_PP_ITERATION_1 13 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 12 && BOOST_PP_ITERATION_START_1 >= 12 # define BOOST_PP_ITERATION_1 12 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 11 && BOOST_PP_ITERATION_START_1 >= 11 # define BOOST_PP_ITERATION_1 11 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 10 && BOOST_PP_ITERATION_START_1 >= 10 # define BOOST_PP_ITERATION_1 10 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 9 && BOOST_PP_ITERATION_START_1 >= 9 # define BOOST_PP_ITERATION_1 9 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 8 && BOOST_PP_ITERATION_START_1 >= 8 # define BOOST_PP_ITERATION_1 8 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 7 && BOOST_PP_ITERATION_START_1 >= 7 # define BOOST_PP_ITERATION_1 7 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 6 && BOOST_PP_ITERATION_START_1 >= 6 # define BOOST_PP_ITERATION_1 6 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 5 && BOOST_PP_ITERATION_START_1 >= 5 # define BOOST_PP_ITERATION_1 5 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 4 && BOOST_PP_ITERATION_START_1 >= 4 # define BOOST_PP_ITERATION_1 4 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 3 && BOOST_PP_ITERATION_START_1 >= 3 # define BOOST_PP_ITERATION_1 3 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 2 && BOOST_PP_ITERATION_START_1 >= 2 # define BOOST_PP_ITERATION_1 2 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 1 && BOOST_PP_ITERATION_START_1 >= 1 # define BOOST_PP_ITERATION_1 1 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 0 && BOOST_PP_ITERATION_START_1 >= 0 # define BOOST_PP_ITERATION_1 0 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif passenger-4.0.37/ext/boost/preprocessor/iteration/detail/bounds/lower1.hpp000644 000765 000024 00000007757 12233035540 027364 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_START_1 # # undef BOOST_PP_ITERATION_START_1_DIGIT_1 # undef BOOST_PP_ITERATION_START_1_DIGIT_2 # undef BOOST_PP_ITERATION_START_1_DIGIT_3 # undef BOOST_PP_ITERATION_START_1_DIGIT_4 # undef BOOST_PP_ITERATION_START_1_DIGIT_5 # undef BOOST_PP_ITERATION_START_1_DIGIT_6 # undef BOOST_PP_ITERATION_START_1_DIGIT_7 # undef BOOST_PP_ITERATION_START_1_DIGIT_8 # undef BOOST_PP_ITERATION_START_1_DIGIT_9 # undef BOOST_PP_ITERATION_START_1_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_START_1_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_START_1_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_START_1_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_START_1_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_START_1_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_START_1_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_START_1_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_START_1_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_START_1_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_START_1_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_START_1_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_START_1_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_START_1_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_START_1_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_START_1_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_START_1_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_START_1_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_START_1_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_START_1_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_START_1_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_START_1_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_START_1_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_START_1_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_START_1_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_START_1_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_START_1_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_START_1_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_START_1_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_START_1_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_START_1_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_START_1_DIGIT_3 # define BOOST_PP_ITERATION_START_1 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_1_DIGIT_3, BOOST_PP_ITERATION_START_1_DIGIT_2, BOOST_PP_ITERATION_START_1_DIGIT_1) # elif BOOST_PP_ITERATION_START_1_DIGIT_2 # define BOOST_PP_ITERATION_START_1 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_1_DIGIT_2, BOOST_PP_ITERATION_START_1_DIGIT_1) # else # define BOOST_PP_ITERATION_START_1 BOOST_PP_ITERATION_START_1_DIGIT_1 # endif passenger-4.0.37/ext/boost/preprocessor/iteration/detail/bounds/lower2.hpp000644 000765 000024 00000007757 12233035540 027365 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_START_2 # # undef BOOST_PP_ITERATION_START_2_DIGIT_1 # undef BOOST_PP_ITERATION_START_2_DIGIT_2 # undef BOOST_PP_ITERATION_START_2_DIGIT_3 # undef BOOST_PP_ITERATION_START_2_DIGIT_4 # undef BOOST_PP_ITERATION_START_2_DIGIT_5 # undef BOOST_PP_ITERATION_START_2_DIGIT_6 # undef BOOST_PP_ITERATION_START_2_DIGIT_7 # undef BOOST_PP_ITERATION_START_2_DIGIT_8 # undef BOOST_PP_ITERATION_START_2_DIGIT_9 # undef BOOST_PP_ITERATION_START_2_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_START_2_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_START_2_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_START_2_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_START_2_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_START_2_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_START_2_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_START_2_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_START_2_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_START_2_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_START_2_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_START_2_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_START_2_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_START_2_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_START_2_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_START_2_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_START_2_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_START_2_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_START_2_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_START_2_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_START_2_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_START_2_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_START_2_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_START_2_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_START_2_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_START_2_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_START_2_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_START_2_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_START_2_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_START_2_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_START_2_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_START_2_DIGIT_3 # define BOOST_PP_ITERATION_START_2 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_2_DIGIT_3, BOOST_PP_ITERATION_START_2_DIGIT_2, BOOST_PP_ITERATION_START_2_DIGIT_1) # elif BOOST_PP_ITERATION_START_2_DIGIT_2 # define BOOST_PP_ITERATION_START_2 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_2_DIGIT_2, BOOST_PP_ITERATION_START_2_DIGIT_1) # else # define BOOST_PP_ITERATION_START_2 BOOST_PP_ITERATION_START_2_DIGIT_1 # endif passenger-4.0.37/ext/boost/preprocessor/iteration/detail/bounds/upper1.hpp000644 000765 000024 00000010043 12233035540 027345 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_FINISH_1 # # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_1 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_2 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_3 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_4 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_5 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_6 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_7 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_8 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_9 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_FINISH_1_DIGIT_3 # define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_1_DIGIT_3, BOOST_PP_ITERATION_FINISH_1_DIGIT_2, BOOST_PP_ITERATION_FINISH_1_DIGIT_1) # elif BOOST_PP_ITERATION_FINISH_1_DIGIT_2 # define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_1_DIGIT_2, BOOST_PP_ITERATION_FINISH_1_DIGIT_1) # else # define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_ITERATION_FINISH_1_DIGIT_1 # endif passenger-4.0.37/ext/boost/preprocessor/iteration/detail/bounds/upper2.hpp000644 000765 000024 00000010043 12233035540 027346 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_FINISH_2 # # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_1 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_2 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_3 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_4 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_5 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_6 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_7 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_8 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_9 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_FINISH_2_DIGIT_3 # define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_2_DIGIT_3, BOOST_PP_ITERATION_FINISH_2_DIGIT_2, BOOST_PP_ITERATION_FINISH_2_DIGIT_1) # elif BOOST_PP_ITERATION_FINISH_2_DIGIT_2 # define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_2_DIGIT_2, BOOST_PP_ITERATION_FINISH_2_DIGIT_1) # else # define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_ITERATION_FINISH_2_DIGIT_1 # endif passenger-4.0.37/ext/boost/preprocessor/facilities/empty.hpp000644 000765 000024 00000001004 12233035540 024646 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP # define BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP # # /* BOOST_PP_EMPTY */ # # define BOOST_PP_EMPTY() # # endif passenger-4.0.37/ext/boost/preprocessor/facilities/identity.hpp000644 000765 000024 00000001136 12233035540 025347 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP # define BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP # # include # # /* BOOST_PP_IDENTITY */ # # define BOOST_PP_IDENTITY(item) item BOOST_PP_EMPTY # # endif passenger-4.0.37/ext/boost/preprocessor/facilities/intercept.hpp000644 000765 000024 00000021321 12233035540 025511 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FACILITIES_INTERCEPT_HPP # define BOOST_PREPROCESSOR_FACILITIES_INTERCEPT_HPP # # /* BOOST_PP_INTERCEPT */ # # define BOOST_PP_INTERCEPT BOOST_PP_INTERCEPT_ # # define BOOST_PP_INTERCEPT_0 # define BOOST_PP_INTERCEPT_1 # define BOOST_PP_INTERCEPT_2 # define BOOST_PP_INTERCEPT_3 # define BOOST_PP_INTERCEPT_4 # define BOOST_PP_INTERCEPT_5 # define BOOST_PP_INTERCEPT_6 # define BOOST_PP_INTERCEPT_7 # define BOOST_PP_INTERCEPT_8 # define BOOST_PP_INTERCEPT_9 # define BOOST_PP_INTERCEPT_10 # define BOOST_PP_INTERCEPT_11 # define BOOST_PP_INTERCEPT_12 # define BOOST_PP_INTERCEPT_13 # define BOOST_PP_INTERCEPT_14 # define BOOST_PP_INTERCEPT_15 # define BOOST_PP_INTERCEPT_16 # define BOOST_PP_INTERCEPT_17 # define BOOST_PP_INTERCEPT_18 # define BOOST_PP_INTERCEPT_19 # define BOOST_PP_INTERCEPT_20 # define BOOST_PP_INTERCEPT_21 # define BOOST_PP_INTERCEPT_22 # define BOOST_PP_INTERCEPT_23 # define BOOST_PP_INTERCEPT_24 # define BOOST_PP_INTERCEPT_25 # define BOOST_PP_INTERCEPT_26 # define BOOST_PP_INTERCEPT_27 # define BOOST_PP_INTERCEPT_28 # define BOOST_PP_INTERCEPT_29 # define BOOST_PP_INTERCEPT_30 # define BOOST_PP_INTERCEPT_31 # define BOOST_PP_INTERCEPT_32 # define BOOST_PP_INTERCEPT_33 # define BOOST_PP_INTERCEPT_34 # define BOOST_PP_INTERCEPT_35 # define BOOST_PP_INTERCEPT_36 # define BOOST_PP_INTERCEPT_37 # define BOOST_PP_INTERCEPT_38 # define BOOST_PP_INTERCEPT_39 # define BOOST_PP_INTERCEPT_40 # define BOOST_PP_INTERCEPT_41 # define BOOST_PP_INTERCEPT_42 # define BOOST_PP_INTERCEPT_43 # define BOOST_PP_INTERCEPT_44 # define BOOST_PP_INTERCEPT_45 # define BOOST_PP_INTERCEPT_46 # define BOOST_PP_INTERCEPT_47 # define BOOST_PP_INTERCEPT_48 # define BOOST_PP_INTERCEPT_49 # define BOOST_PP_INTERCEPT_50 # define BOOST_PP_INTERCEPT_51 # define BOOST_PP_INTERCEPT_52 # define BOOST_PP_INTERCEPT_53 # define BOOST_PP_INTERCEPT_54 # define BOOST_PP_INTERCEPT_55 # define BOOST_PP_INTERCEPT_56 # define BOOST_PP_INTERCEPT_57 # define BOOST_PP_INTERCEPT_58 # define BOOST_PP_INTERCEPT_59 # define BOOST_PP_INTERCEPT_60 # define BOOST_PP_INTERCEPT_61 # define BOOST_PP_INTERCEPT_62 # define BOOST_PP_INTERCEPT_63 # define BOOST_PP_INTERCEPT_64 # define BOOST_PP_INTERCEPT_65 # define BOOST_PP_INTERCEPT_66 # define BOOST_PP_INTERCEPT_67 # define BOOST_PP_INTERCEPT_68 # define BOOST_PP_INTERCEPT_69 # define BOOST_PP_INTERCEPT_70 # define BOOST_PP_INTERCEPT_71 # define BOOST_PP_INTERCEPT_72 # define BOOST_PP_INTERCEPT_73 # define BOOST_PP_INTERCEPT_74 # define BOOST_PP_INTERCEPT_75 # define BOOST_PP_INTERCEPT_76 # define BOOST_PP_INTERCEPT_77 # define BOOST_PP_INTERCEPT_78 # define BOOST_PP_INTERCEPT_79 # define BOOST_PP_INTERCEPT_80 # define BOOST_PP_INTERCEPT_81 # define BOOST_PP_INTERCEPT_82 # define BOOST_PP_INTERCEPT_83 # define BOOST_PP_INTERCEPT_84 # define BOOST_PP_INTERCEPT_85 # define BOOST_PP_INTERCEPT_86 # define BOOST_PP_INTERCEPT_87 # define BOOST_PP_INTERCEPT_88 # define BOOST_PP_INTERCEPT_89 # define BOOST_PP_INTERCEPT_90 # define BOOST_PP_INTERCEPT_91 # define BOOST_PP_INTERCEPT_92 # define BOOST_PP_INTERCEPT_93 # define BOOST_PP_INTERCEPT_94 # define BOOST_PP_INTERCEPT_95 # define BOOST_PP_INTERCEPT_96 # define BOOST_PP_INTERCEPT_97 # define BOOST_PP_INTERCEPT_98 # define BOOST_PP_INTERCEPT_99 # define BOOST_PP_INTERCEPT_100 # define BOOST_PP_INTERCEPT_101 # define BOOST_PP_INTERCEPT_102 # define BOOST_PP_INTERCEPT_103 # define BOOST_PP_INTERCEPT_104 # define BOOST_PP_INTERCEPT_105 # define BOOST_PP_INTERCEPT_106 # define BOOST_PP_INTERCEPT_107 # define BOOST_PP_INTERCEPT_108 # define BOOST_PP_INTERCEPT_109 # define BOOST_PP_INTERCEPT_110 # define BOOST_PP_INTERCEPT_111 # define BOOST_PP_INTERCEPT_112 # define BOOST_PP_INTERCEPT_113 # define BOOST_PP_INTERCEPT_114 # define BOOST_PP_INTERCEPT_115 # define BOOST_PP_INTERCEPT_116 # define BOOST_PP_INTERCEPT_117 # define BOOST_PP_INTERCEPT_118 # define BOOST_PP_INTERCEPT_119 # define BOOST_PP_INTERCEPT_120 # define BOOST_PP_INTERCEPT_121 # define BOOST_PP_INTERCEPT_122 # define BOOST_PP_INTERCEPT_123 # define BOOST_PP_INTERCEPT_124 # define BOOST_PP_INTERCEPT_125 # define BOOST_PP_INTERCEPT_126 # define BOOST_PP_INTERCEPT_127 # define BOOST_PP_INTERCEPT_128 # define BOOST_PP_INTERCEPT_129 # define BOOST_PP_INTERCEPT_130 # define BOOST_PP_INTERCEPT_131 # define BOOST_PP_INTERCEPT_132 # define BOOST_PP_INTERCEPT_133 # define BOOST_PP_INTERCEPT_134 # define BOOST_PP_INTERCEPT_135 # define BOOST_PP_INTERCEPT_136 # define BOOST_PP_INTERCEPT_137 # define BOOST_PP_INTERCEPT_138 # define BOOST_PP_INTERCEPT_139 # define BOOST_PP_INTERCEPT_140 # define BOOST_PP_INTERCEPT_141 # define BOOST_PP_INTERCEPT_142 # define BOOST_PP_INTERCEPT_143 # define BOOST_PP_INTERCEPT_144 # define BOOST_PP_INTERCEPT_145 # define BOOST_PP_INTERCEPT_146 # define BOOST_PP_INTERCEPT_147 # define BOOST_PP_INTERCEPT_148 # define BOOST_PP_INTERCEPT_149 # define BOOST_PP_INTERCEPT_150 # define BOOST_PP_INTERCEPT_151 # define BOOST_PP_INTERCEPT_152 # define BOOST_PP_INTERCEPT_153 # define BOOST_PP_INTERCEPT_154 # define BOOST_PP_INTERCEPT_155 # define BOOST_PP_INTERCEPT_156 # define BOOST_PP_INTERCEPT_157 # define BOOST_PP_INTERCEPT_158 # define BOOST_PP_INTERCEPT_159 # define BOOST_PP_INTERCEPT_160 # define BOOST_PP_INTERCEPT_161 # define BOOST_PP_INTERCEPT_162 # define BOOST_PP_INTERCEPT_163 # define BOOST_PP_INTERCEPT_164 # define BOOST_PP_INTERCEPT_165 # define BOOST_PP_INTERCEPT_166 # define BOOST_PP_INTERCEPT_167 # define BOOST_PP_INTERCEPT_168 # define BOOST_PP_INTERCEPT_169 # define BOOST_PP_INTERCEPT_170 # define BOOST_PP_INTERCEPT_171 # define BOOST_PP_INTERCEPT_172 # define BOOST_PP_INTERCEPT_173 # define BOOST_PP_INTERCEPT_174 # define BOOST_PP_INTERCEPT_175 # define BOOST_PP_INTERCEPT_176 # define BOOST_PP_INTERCEPT_177 # define BOOST_PP_INTERCEPT_178 # define BOOST_PP_INTERCEPT_179 # define BOOST_PP_INTERCEPT_180 # define BOOST_PP_INTERCEPT_181 # define BOOST_PP_INTERCEPT_182 # define BOOST_PP_INTERCEPT_183 # define BOOST_PP_INTERCEPT_184 # define BOOST_PP_INTERCEPT_185 # define BOOST_PP_INTERCEPT_186 # define BOOST_PP_INTERCEPT_187 # define BOOST_PP_INTERCEPT_188 # define BOOST_PP_INTERCEPT_189 # define BOOST_PP_INTERCEPT_190 # define BOOST_PP_INTERCEPT_191 # define BOOST_PP_INTERCEPT_192 # define BOOST_PP_INTERCEPT_193 # define BOOST_PP_INTERCEPT_194 # define BOOST_PP_INTERCEPT_195 # define BOOST_PP_INTERCEPT_196 # define BOOST_PP_INTERCEPT_197 # define BOOST_PP_INTERCEPT_198 # define BOOST_PP_INTERCEPT_199 # define BOOST_PP_INTERCEPT_200 # define BOOST_PP_INTERCEPT_201 # define BOOST_PP_INTERCEPT_202 # define BOOST_PP_INTERCEPT_203 # define BOOST_PP_INTERCEPT_204 # define BOOST_PP_INTERCEPT_205 # define BOOST_PP_INTERCEPT_206 # define BOOST_PP_INTERCEPT_207 # define BOOST_PP_INTERCEPT_208 # define BOOST_PP_INTERCEPT_209 # define BOOST_PP_INTERCEPT_210 # define BOOST_PP_INTERCEPT_211 # define BOOST_PP_INTERCEPT_212 # define BOOST_PP_INTERCEPT_213 # define BOOST_PP_INTERCEPT_214 # define BOOST_PP_INTERCEPT_215 # define BOOST_PP_INTERCEPT_216 # define BOOST_PP_INTERCEPT_217 # define BOOST_PP_INTERCEPT_218 # define BOOST_PP_INTERCEPT_219 # define BOOST_PP_INTERCEPT_220 # define BOOST_PP_INTERCEPT_221 # define BOOST_PP_INTERCEPT_222 # define BOOST_PP_INTERCEPT_223 # define BOOST_PP_INTERCEPT_224 # define BOOST_PP_INTERCEPT_225 # define BOOST_PP_INTERCEPT_226 # define BOOST_PP_INTERCEPT_227 # define BOOST_PP_INTERCEPT_228 # define BOOST_PP_INTERCEPT_229 # define BOOST_PP_INTERCEPT_230 # define BOOST_PP_INTERCEPT_231 # define BOOST_PP_INTERCEPT_232 # define BOOST_PP_INTERCEPT_233 # define BOOST_PP_INTERCEPT_234 # define BOOST_PP_INTERCEPT_235 # define BOOST_PP_INTERCEPT_236 # define BOOST_PP_INTERCEPT_237 # define BOOST_PP_INTERCEPT_238 # define BOOST_PP_INTERCEPT_239 # define BOOST_PP_INTERCEPT_240 # define BOOST_PP_INTERCEPT_241 # define BOOST_PP_INTERCEPT_242 # define BOOST_PP_INTERCEPT_243 # define BOOST_PP_INTERCEPT_244 # define BOOST_PP_INTERCEPT_245 # define BOOST_PP_INTERCEPT_246 # define BOOST_PP_INTERCEPT_247 # define BOOST_PP_INTERCEPT_248 # define BOOST_PP_INTERCEPT_249 # define BOOST_PP_INTERCEPT_250 # define BOOST_PP_INTERCEPT_251 # define BOOST_PP_INTERCEPT_252 # define BOOST_PP_INTERCEPT_253 # define BOOST_PP_INTERCEPT_254 # define BOOST_PP_INTERCEPT_255 # define BOOST_PP_INTERCEPT_256 # # endif passenger-4.0.37/ext/boost/preprocessor/facilities/overload.hpp000644 000765 000024 00000002176 12233035540 025336 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2011. * # * (C) Copyright Edward Diener 2011. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP # define BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP # # include # include # # /* BOOST_PP_OVERLOAD */ # # if BOOST_PP_VARIADICS # define BOOST_PP_OVERLOAD(prefix, ...) BOOST_PP_CAT(prefix, BOOST_PP_VARIADIC_SIZE(__VA_ARGS__)) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/detail/auto_rec.hpp000644 000765 000024 00000063030 12233035540 024446 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # include # else # # ifndef BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP # define BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP # # include # # /* BOOST_PP_AUTO_REC */ # # define BOOST_PP_AUTO_REC(pred, n) BOOST_PP_NODE_ENTRY_ ## n(pred) # # define BOOST_PP_NODE_ENTRY_256(p) BOOST_PP_NODE_128(p)(p)(p)(p)(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_128(p) BOOST_PP_NODE_64(p)(p)(p)(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_64(p) BOOST_PP_NODE_32(p)(p)(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_32(p) BOOST_PP_NODE_16(p)(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_16(p) BOOST_PP_NODE_8(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_8(p) BOOST_PP_NODE_4(p)(p)(p) # define BOOST_PP_NODE_ENTRY_4(p) BOOST_PP_NODE_2(p)(p) # define BOOST_PP_NODE_ENTRY_2(p) BOOST_PP_NODE_1(p) # # define BOOST_PP_NODE_128(p) BOOST_PP_IIF(p(128), BOOST_PP_NODE_64, BOOST_PP_NODE_192) # define BOOST_PP_NODE_64(p) BOOST_PP_IIF(p(64), BOOST_PP_NODE_32, BOOST_PP_NODE_96) # define BOOST_PP_NODE_32(p) BOOST_PP_IIF(p(32), BOOST_PP_NODE_16, BOOST_PP_NODE_48) # define BOOST_PP_NODE_16(p) BOOST_PP_IIF(p(16), BOOST_PP_NODE_8, BOOST_PP_NODE_24) # define BOOST_PP_NODE_8(p) BOOST_PP_IIF(p(8), BOOST_PP_NODE_4, BOOST_PP_NODE_12) # define BOOST_PP_NODE_4(p) BOOST_PP_IIF(p(4), BOOST_PP_NODE_2, BOOST_PP_NODE_6) # define BOOST_PP_NODE_2(p) BOOST_PP_IIF(p(2), BOOST_PP_NODE_1, BOOST_PP_NODE_3) # define BOOST_PP_NODE_1(p) BOOST_PP_IIF(p(1), 1, 2) # define BOOST_PP_NODE_3(p) BOOST_PP_IIF(p(3), 3, 4) # define BOOST_PP_NODE_6(p) BOOST_PP_IIF(p(6), BOOST_PP_NODE_5, BOOST_PP_NODE_7) # define BOOST_PP_NODE_5(p) BOOST_PP_IIF(p(5), 5, 6) # define BOOST_PP_NODE_7(p) BOOST_PP_IIF(p(7), 7, 8) # define BOOST_PP_NODE_12(p) BOOST_PP_IIF(p(12), BOOST_PP_NODE_10, BOOST_PP_NODE_14) # define BOOST_PP_NODE_10(p) BOOST_PP_IIF(p(10), BOOST_PP_NODE_9, BOOST_PP_NODE_11) # define BOOST_PP_NODE_9(p) BOOST_PP_IIF(p(9), 9, 10) # define BOOST_PP_NODE_11(p) BOOST_PP_IIF(p(11), 11, 12) # define BOOST_PP_NODE_14(p) BOOST_PP_IIF(p(14), BOOST_PP_NODE_13, BOOST_PP_NODE_15) # define BOOST_PP_NODE_13(p) BOOST_PP_IIF(p(13), 13, 14) # define BOOST_PP_NODE_15(p) BOOST_PP_IIF(p(15), 15, 16) # define BOOST_PP_NODE_24(p) BOOST_PP_IIF(p(24), BOOST_PP_NODE_20, BOOST_PP_NODE_28) # define BOOST_PP_NODE_20(p) BOOST_PP_IIF(p(20), BOOST_PP_NODE_18, BOOST_PP_NODE_22) # define BOOST_PP_NODE_18(p) BOOST_PP_IIF(p(18), BOOST_PP_NODE_17, BOOST_PP_NODE_19) # define BOOST_PP_NODE_17(p) BOOST_PP_IIF(p(17), 17, 18) # define BOOST_PP_NODE_19(p) BOOST_PP_IIF(p(19), 19, 20) # define BOOST_PP_NODE_22(p) BOOST_PP_IIF(p(22), BOOST_PP_NODE_21, BOOST_PP_NODE_23) # define BOOST_PP_NODE_21(p) BOOST_PP_IIF(p(21), 21, 22) # define BOOST_PP_NODE_23(p) BOOST_PP_IIF(p(23), 23, 24) # define BOOST_PP_NODE_28(p) BOOST_PP_IIF(p(28), BOOST_PP_NODE_26, BOOST_PP_NODE_30) # define BOOST_PP_NODE_26(p) BOOST_PP_IIF(p(26), BOOST_PP_NODE_25, BOOST_PP_NODE_27) # define BOOST_PP_NODE_25(p) BOOST_PP_IIF(p(25), 25, 26) # define BOOST_PP_NODE_27(p) BOOST_PP_IIF(p(27), 27, 28) # define BOOST_PP_NODE_30(p) BOOST_PP_IIF(p(30), BOOST_PP_NODE_29, BOOST_PP_NODE_31) # define BOOST_PP_NODE_29(p) BOOST_PP_IIF(p(29), 29, 30) # define BOOST_PP_NODE_31(p) BOOST_PP_IIF(p(31), 31, 32) # define BOOST_PP_NODE_48(p) BOOST_PP_IIF(p(48), BOOST_PP_NODE_40, BOOST_PP_NODE_56) # define BOOST_PP_NODE_40(p) BOOST_PP_IIF(p(40), BOOST_PP_NODE_36, BOOST_PP_NODE_44) # define BOOST_PP_NODE_36(p) BOOST_PP_IIF(p(36), BOOST_PP_NODE_34, BOOST_PP_NODE_38) # define BOOST_PP_NODE_34(p) BOOST_PP_IIF(p(34), BOOST_PP_NODE_33, BOOST_PP_NODE_35) # define BOOST_PP_NODE_33(p) BOOST_PP_IIF(p(33), 33, 34) # define BOOST_PP_NODE_35(p) BOOST_PP_IIF(p(35), 35, 36) # define BOOST_PP_NODE_38(p) BOOST_PP_IIF(p(38), BOOST_PP_NODE_37, BOOST_PP_NODE_39) # define BOOST_PP_NODE_37(p) BOOST_PP_IIF(p(37), 37, 38) # define BOOST_PP_NODE_39(p) BOOST_PP_IIF(p(39), 39, 40) # define BOOST_PP_NODE_44(p) BOOST_PP_IIF(p(44), BOOST_PP_NODE_42, BOOST_PP_NODE_46) # define BOOST_PP_NODE_42(p) BOOST_PP_IIF(p(42), BOOST_PP_NODE_41, BOOST_PP_NODE_43) # define BOOST_PP_NODE_41(p) BOOST_PP_IIF(p(41), 41, 42) # define BOOST_PP_NODE_43(p) BOOST_PP_IIF(p(43), 43, 44) # define BOOST_PP_NODE_46(p) BOOST_PP_IIF(p(46), BOOST_PP_NODE_45, BOOST_PP_NODE_47) # define BOOST_PP_NODE_45(p) BOOST_PP_IIF(p(45), 45, 46) # define BOOST_PP_NODE_47(p) BOOST_PP_IIF(p(47), 47, 48) # define BOOST_PP_NODE_56(p) BOOST_PP_IIF(p(56), BOOST_PP_NODE_52, BOOST_PP_NODE_60) # define BOOST_PP_NODE_52(p) BOOST_PP_IIF(p(52), BOOST_PP_NODE_50, BOOST_PP_NODE_54) # define BOOST_PP_NODE_50(p) BOOST_PP_IIF(p(50), BOOST_PP_NODE_49, BOOST_PP_NODE_51) # define BOOST_PP_NODE_49(p) BOOST_PP_IIF(p(49), 49, 50) # define BOOST_PP_NODE_51(p) BOOST_PP_IIF(p(51), 51, 52) # define BOOST_PP_NODE_54(p) BOOST_PP_IIF(p(54), BOOST_PP_NODE_53, BOOST_PP_NODE_55) # define BOOST_PP_NODE_53(p) BOOST_PP_IIF(p(53), 53, 54) # define BOOST_PP_NODE_55(p) BOOST_PP_IIF(p(55), 55, 56) # define BOOST_PP_NODE_60(p) BOOST_PP_IIF(p(60), BOOST_PP_NODE_58, BOOST_PP_NODE_62) # define BOOST_PP_NODE_58(p) BOOST_PP_IIF(p(58), BOOST_PP_NODE_57, BOOST_PP_NODE_59) # define BOOST_PP_NODE_57(p) BOOST_PP_IIF(p(57), 57, 58) # define BOOST_PP_NODE_59(p) BOOST_PP_IIF(p(59), 59, 60) # define BOOST_PP_NODE_62(p) BOOST_PP_IIF(p(62), BOOST_PP_NODE_61, BOOST_PP_NODE_63) # define BOOST_PP_NODE_61(p) BOOST_PP_IIF(p(61), 61, 62) # define BOOST_PP_NODE_63(p) BOOST_PP_IIF(p(63), 63, 64) # define BOOST_PP_NODE_96(p) BOOST_PP_IIF(p(96), BOOST_PP_NODE_80, BOOST_PP_NODE_112) # define BOOST_PP_NODE_80(p) BOOST_PP_IIF(p(80), BOOST_PP_NODE_72, BOOST_PP_NODE_88) # define BOOST_PP_NODE_72(p) BOOST_PP_IIF(p(72), BOOST_PP_NODE_68, BOOST_PP_NODE_76) # define BOOST_PP_NODE_68(p) BOOST_PP_IIF(p(68), BOOST_PP_NODE_66, BOOST_PP_NODE_70) # define BOOST_PP_NODE_66(p) BOOST_PP_IIF(p(66), BOOST_PP_NODE_65, BOOST_PP_NODE_67) # define BOOST_PP_NODE_65(p) BOOST_PP_IIF(p(65), 65, 66) # define BOOST_PP_NODE_67(p) BOOST_PP_IIF(p(67), 67, 68) # define BOOST_PP_NODE_70(p) BOOST_PP_IIF(p(70), BOOST_PP_NODE_69, BOOST_PP_NODE_71) # define BOOST_PP_NODE_69(p) BOOST_PP_IIF(p(69), 69, 70) # define BOOST_PP_NODE_71(p) BOOST_PP_IIF(p(71), 71, 72) # define BOOST_PP_NODE_76(p) BOOST_PP_IIF(p(76), BOOST_PP_NODE_74, BOOST_PP_NODE_78) # define BOOST_PP_NODE_74(p) BOOST_PP_IIF(p(74), BOOST_PP_NODE_73, BOOST_PP_NODE_75) # define BOOST_PP_NODE_73(p) BOOST_PP_IIF(p(73), 73, 74) # define BOOST_PP_NODE_75(p) BOOST_PP_IIF(p(75), 75, 76) # define BOOST_PP_NODE_78(p) BOOST_PP_IIF(p(78), BOOST_PP_NODE_77, BOOST_PP_NODE_79) # define BOOST_PP_NODE_77(p) BOOST_PP_IIF(p(77), 77, 78) # define BOOST_PP_NODE_79(p) BOOST_PP_IIF(p(79), 79, 80) # define BOOST_PP_NODE_88(p) BOOST_PP_IIF(p(88), BOOST_PP_NODE_84, BOOST_PP_NODE_92) # define BOOST_PP_NODE_84(p) BOOST_PP_IIF(p(84), BOOST_PP_NODE_82, BOOST_PP_NODE_86) # define BOOST_PP_NODE_82(p) BOOST_PP_IIF(p(82), BOOST_PP_NODE_81, BOOST_PP_NODE_83) # define BOOST_PP_NODE_81(p) BOOST_PP_IIF(p(81), 81, 82) # define BOOST_PP_NODE_83(p) BOOST_PP_IIF(p(83), 83, 84) # define BOOST_PP_NODE_86(p) BOOST_PP_IIF(p(86), BOOST_PP_NODE_85, BOOST_PP_NODE_87) # define BOOST_PP_NODE_85(p) BOOST_PP_IIF(p(85), 85, 86) # define BOOST_PP_NODE_87(p) BOOST_PP_IIF(p(87), 87, 88) # define BOOST_PP_NODE_92(p) BOOST_PP_IIF(p(92), BOOST_PP_NODE_90, BOOST_PP_NODE_94) # define BOOST_PP_NODE_90(p) BOOST_PP_IIF(p(90), BOOST_PP_NODE_89, BOOST_PP_NODE_91) # define BOOST_PP_NODE_89(p) BOOST_PP_IIF(p(89), 89, 90) # define BOOST_PP_NODE_91(p) BOOST_PP_IIF(p(91), 91, 92) # define BOOST_PP_NODE_94(p) BOOST_PP_IIF(p(94), BOOST_PP_NODE_93, BOOST_PP_NODE_95) # define BOOST_PP_NODE_93(p) BOOST_PP_IIF(p(93), 93, 94) # define BOOST_PP_NODE_95(p) BOOST_PP_IIF(p(95), 95, 96) # define BOOST_PP_NODE_112(p) BOOST_PP_IIF(p(112), BOOST_PP_NODE_104, BOOST_PP_NODE_120) # define BOOST_PP_NODE_104(p) BOOST_PP_IIF(p(104), BOOST_PP_NODE_100, BOOST_PP_NODE_108) # define BOOST_PP_NODE_100(p) BOOST_PP_IIF(p(100), BOOST_PP_NODE_98, BOOST_PP_NODE_102) # define BOOST_PP_NODE_98(p) BOOST_PP_IIF(p(98), BOOST_PP_NODE_97, BOOST_PP_NODE_99) # define BOOST_PP_NODE_97(p) BOOST_PP_IIF(p(97), 97, 98) # define BOOST_PP_NODE_99(p) BOOST_PP_IIF(p(99), 99, 100) # define BOOST_PP_NODE_102(p) BOOST_PP_IIF(p(102), BOOST_PP_NODE_101, BOOST_PP_NODE_103) # define BOOST_PP_NODE_101(p) BOOST_PP_IIF(p(101), 101, 102) # define BOOST_PP_NODE_103(p) BOOST_PP_IIF(p(103), 103, 104) # define BOOST_PP_NODE_108(p) BOOST_PP_IIF(p(108), BOOST_PP_NODE_106, BOOST_PP_NODE_110) # define BOOST_PP_NODE_106(p) BOOST_PP_IIF(p(106), BOOST_PP_NODE_105, BOOST_PP_NODE_107) # define BOOST_PP_NODE_105(p) BOOST_PP_IIF(p(105), 105, 106) # define BOOST_PP_NODE_107(p) BOOST_PP_IIF(p(107), 107, 108) # define BOOST_PP_NODE_110(p) BOOST_PP_IIF(p(110), BOOST_PP_NODE_109, BOOST_PP_NODE_111) # define BOOST_PP_NODE_109(p) BOOST_PP_IIF(p(109), 109, 110) # define BOOST_PP_NODE_111(p) BOOST_PP_IIF(p(111), 111, 112) # define BOOST_PP_NODE_120(p) BOOST_PP_IIF(p(120), BOOST_PP_NODE_116, BOOST_PP_NODE_124) # define BOOST_PP_NODE_116(p) BOOST_PP_IIF(p(116), BOOST_PP_NODE_114, BOOST_PP_NODE_118) # define BOOST_PP_NODE_114(p) BOOST_PP_IIF(p(114), BOOST_PP_NODE_113, BOOST_PP_NODE_115) # define BOOST_PP_NODE_113(p) BOOST_PP_IIF(p(113), 113, 114) # define BOOST_PP_NODE_115(p) BOOST_PP_IIF(p(115), 115, 116) # define BOOST_PP_NODE_118(p) BOOST_PP_IIF(p(118), BOOST_PP_NODE_117, BOOST_PP_NODE_119) # define BOOST_PP_NODE_117(p) BOOST_PP_IIF(p(117), 117, 118) # define BOOST_PP_NODE_119(p) BOOST_PP_IIF(p(119), 119, 120) # define BOOST_PP_NODE_124(p) BOOST_PP_IIF(p(124), BOOST_PP_NODE_122, BOOST_PP_NODE_126) # define BOOST_PP_NODE_122(p) BOOST_PP_IIF(p(122), BOOST_PP_NODE_121, BOOST_PP_NODE_123) # define BOOST_PP_NODE_121(p) BOOST_PP_IIF(p(121), 121, 122) # define BOOST_PP_NODE_123(p) BOOST_PP_IIF(p(123), 123, 124) # define BOOST_PP_NODE_126(p) BOOST_PP_IIF(p(126), BOOST_PP_NODE_125, BOOST_PP_NODE_127) # define BOOST_PP_NODE_125(p) BOOST_PP_IIF(p(125), 125, 126) # define BOOST_PP_NODE_127(p) BOOST_PP_IIF(p(127), 127, 128) # define BOOST_PP_NODE_192(p) BOOST_PP_IIF(p(192), BOOST_PP_NODE_160, BOOST_PP_NODE_224) # define BOOST_PP_NODE_160(p) BOOST_PP_IIF(p(160), BOOST_PP_NODE_144, BOOST_PP_NODE_176) # define BOOST_PP_NODE_144(p) BOOST_PP_IIF(p(144), BOOST_PP_NODE_136, BOOST_PP_NODE_152) # define BOOST_PP_NODE_136(p) BOOST_PP_IIF(p(136), BOOST_PP_NODE_132, BOOST_PP_NODE_140) # define BOOST_PP_NODE_132(p) BOOST_PP_IIF(p(132), BOOST_PP_NODE_130, BOOST_PP_NODE_134) # define BOOST_PP_NODE_130(p) BOOST_PP_IIF(p(130), BOOST_PP_NODE_129, BOOST_PP_NODE_131) # define BOOST_PP_NODE_129(p) BOOST_PP_IIF(p(129), 129, 130) # define BOOST_PP_NODE_131(p) BOOST_PP_IIF(p(131), 131, 132) # define BOOST_PP_NODE_134(p) BOOST_PP_IIF(p(134), BOOST_PP_NODE_133, BOOST_PP_NODE_135) # define BOOST_PP_NODE_133(p) BOOST_PP_IIF(p(133), 133, 134) # define BOOST_PP_NODE_135(p) BOOST_PP_IIF(p(135), 135, 136) # define BOOST_PP_NODE_140(p) BOOST_PP_IIF(p(140), BOOST_PP_NODE_138, BOOST_PP_NODE_142) # define BOOST_PP_NODE_138(p) BOOST_PP_IIF(p(138), BOOST_PP_NODE_137, BOOST_PP_NODE_139) # define BOOST_PP_NODE_137(p) BOOST_PP_IIF(p(137), 137, 138) # define BOOST_PP_NODE_139(p) BOOST_PP_IIF(p(139), 139, 140) # define BOOST_PP_NODE_142(p) BOOST_PP_IIF(p(142), BOOST_PP_NODE_141, BOOST_PP_NODE_143) # define BOOST_PP_NODE_141(p) BOOST_PP_IIF(p(141), 141, 142) # define BOOST_PP_NODE_143(p) BOOST_PP_IIF(p(143), 143, 144) # define BOOST_PP_NODE_152(p) BOOST_PP_IIF(p(152), BOOST_PP_NODE_148, BOOST_PP_NODE_156) # define BOOST_PP_NODE_148(p) BOOST_PP_IIF(p(148), BOOST_PP_NODE_146, BOOST_PP_NODE_150) # define BOOST_PP_NODE_146(p) BOOST_PP_IIF(p(146), BOOST_PP_NODE_145, BOOST_PP_NODE_147) # define BOOST_PP_NODE_145(p) BOOST_PP_IIF(p(145), 145, 146) # define BOOST_PP_NODE_147(p) BOOST_PP_IIF(p(147), 147, 148) # define BOOST_PP_NODE_150(p) BOOST_PP_IIF(p(150), BOOST_PP_NODE_149, BOOST_PP_NODE_151) # define BOOST_PP_NODE_149(p) BOOST_PP_IIF(p(149), 149, 150) # define BOOST_PP_NODE_151(p) BOOST_PP_IIF(p(151), 151, 152) # define BOOST_PP_NODE_156(p) BOOST_PP_IIF(p(156), BOOST_PP_NODE_154, BOOST_PP_NODE_158) # define BOOST_PP_NODE_154(p) BOOST_PP_IIF(p(154), BOOST_PP_NODE_153, BOOST_PP_NODE_155) # define BOOST_PP_NODE_153(p) BOOST_PP_IIF(p(153), 153, 154) # define BOOST_PP_NODE_155(p) BOOST_PP_IIF(p(155), 155, 156) # define BOOST_PP_NODE_158(p) BOOST_PP_IIF(p(158), BOOST_PP_NODE_157, BOOST_PP_NODE_159) # define BOOST_PP_NODE_157(p) BOOST_PP_IIF(p(157), 157, 158) # define BOOST_PP_NODE_159(p) BOOST_PP_IIF(p(159), 159, 160) # define BOOST_PP_NODE_176(p) BOOST_PP_IIF(p(176), BOOST_PP_NODE_168, BOOST_PP_NODE_184) # define BOOST_PP_NODE_168(p) BOOST_PP_IIF(p(168), BOOST_PP_NODE_164, BOOST_PP_NODE_172) # define BOOST_PP_NODE_164(p) BOOST_PP_IIF(p(164), BOOST_PP_NODE_162, BOOST_PP_NODE_166) # define BOOST_PP_NODE_162(p) BOOST_PP_IIF(p(162), BOOST_PP_NODE_161, BOOST_PP_NODE_163) # define BOOST_PP_NODE_161(p) BOOST_PP_IIF(p(161), 161, 162) # define BOOST_PP_NODE_163(p) BOOST_PP_IIF(p(163), 163, 164) # define BOOST_PP_NODE_166(p) BOOST_PP_IIF(p(166), BOOST_PP_NODE_165, BOOST_PP_NODE_167) # define BOOST_PP_NODE_165(p) BOOST_PP_IIF(p(165), 165, 166) # define BOOST_PP_NODE_167(p) BOOST_PP_IIF(p(167), 167, 168) # define BOOST_PP_NODE_172(p) BOOST_PP_IIF(p(172), BOOST_PP_NODE_170, BOOST_PP_NODE_174) # define BOOST_PP_NODE_170(p) BOOST_PP_IIF(p(170), BOOST_PP_NODE_169, BOOST_PP_NODE_171) # define BOOST_PP_NODE_169(p) BOOST_PP_IIF(p(169), 169, 170) # define BOOST_PP_NODE_171(p) BOOST_PP_IIF(p(171), 171, 172) # define BOOST_PP_NODE_174(p) BOOST_PP_IIF(p(174), BOOST_PP_NODE_173, BOOST_PP_NODE_175) # define BOOST_PP_NODE_173(p) BOOST_PP_IIF(p(173), 173, 174) # define BOOST_PP_NODE_175(p) BOOST_PP_IIF(p(175), 175, 176) # define BOOST_PP_NODE_184(p) BOOST_PP_IIF(p(184), BOOST_PP_NODE_180, BOOST_PP_NODE_188) # define BOOST_PP_NODE_180(p) BOOST_PP_IIF(p(180), BOOST_PP_NODE_178, BOOST_PP_NODE_182) # define BOOST_PP_NODE_178(p) BOOST_PP_IIF(p(178), BOOST_PP_NODE_177, BOOST_PP_NODE_179) # define BOOST_PP_NODE_177(p) BOOST_PP_IIF(p(177), 177, 178) # define BOOST_PP_NODE_179(p) BOOST_PP_IIF(p(179), 179, 180) # define BOOST_PP_NODE_182(p) BOOST_PP_IIF(p(182), BOOST_PP_NODE_181, BOOST_PP_NODE_183) # define BOOST_PP_NODE_181(p) BOOST_PP_IIF(p(181), 181, 182) # define BOOST_PP_NODE_183(p) BOOST_PP_IIF(p(183), 183, 184) # define BOOST_PP_NODE_188(p) BOOST_PP_IIF(p(188), BOOST_PP_NODE_186, BOOST_PP_NODE_190) # define BOOST_PP_NODE_186(p) BOOST_PP_IIF(p(186), BOOST_PP_NODE_185, BOOST_PP_NODE_187) # define BOOST_PP_NODE_185(p) BOOST_PP_IIF(p(185), 185, 186) # define BOOST_PP_NODE_187(p) BOOST_PP_IIF(p(187), 187, 188) # define BOOST_PP_NODE_190(p) BOOST_PP_IIF(p(190), BOOST_PP_NODE_189, BOOST_PP_NODE_191) # define BOOST_PP_NODE_189(p) BOOST_PP_IIF(p(189), 189, 190) # define BOOST_PP_NODE_191(p) BOOST_PP_IIF(p(191), 191, 192) # define BOOST_PP_NODE_224(p) BOOST_PP_IIF(p(224), BOOST_PP_NODE_208, BOOST_PP_NODE_240) # define BOOST_PP_NODE_208(p) BOOST_PP_IIF(p(208), BOOST_PP_NODE_200, BOOST_PP_NODE_216) # define BOOST_PP_NODE_200(p) BOOST_PP_IIF(p(200), BOOST_PP_NODE_196, BOOST_PP_NODE_204) # define BOOST_PP_NODE_196(p) BOOST_PP_IIF(p(196), BOOST_PP_NODE_194, BOOST_PP_NODE_198) # define BOOST_PP_NODE_194(p) BOOST_PP_IIF(p(194), BOOST_PP_NODE_193, BOOST_PP_NODE_195) # define BOOST_PP_NODE_193(p) BOOST_PP_IIF(p(193), 193, 194) # define BOOST_PP_NODE_195(p) BOOST_PP_IIF(p(195), 195, 196) # define BOOST_PP_NODE_198(p) BOOST_PP_IIF(p(198), BOOST_PP_NODE_197, BOOST_PP_NODE_199) # define BOOST_PP_NODE_197(p) BOOST_PP_IIF(p(197), 197, 198) # define BOOST_PP_NODE_199(p) BOOST_PP_IIF(p(199), 199, 200) # define BOOST_PP_NODE_204(p) BOOST_PP_IIF(p(204), BOOST_PP_NODE_202, BOOST_PP_NODE_206) # define BOOST_PP_NODE_202(p) BOOST_PP_IIF(p(202), BOOST_PP_NODE_201, BOOST_PP_NODE_203) # define BOOST_PP_NODE_201(p) BOOST_PP_IIF(p(201), 201, 202) # define BOOST_PP_NODE_203(p) BOOST_PP_IIF(p(203), 203, 204) # define BOOST_PP_NODE_206(p) BOOST_PP_IIF(p(206), BOOST_PP_NODE_205, BOOST_PP_NODE_207) # define BOOST_PP_NODE_205(p) BOOST_PP_IIF(p(205), 205, 206) # define BOOST_PP_NODE_207(p) BOOST_PP_IIF(p(207), 207, 208) # define BOOST_PP_NODE_216(p) BOOST_PP_IIF(p(216), BOOST_PP_NODE_212, BOOST_PP_NODE_220) # define BOOST_PP_NODE_212(p) BOOST_PP_IIF(p(212), BOOST_PP_NODE_210, BOOST_PP_NODE_214) # define BOOST_PP_NODE_210(p) BOOST_PP_IIF(p(210), BOOST_PP_NODE_209, BOOST_PP_NODE_211) # define BOOST_PP_NODE_209(p) BOOST_PP_IIF(p(209), 209, 210) # define BOOST_PP_NODE_211(p) BOOST_PP_IIF(p(211), 211, 212) # define BOOST_PP_NODE_214(p) BOOST_PP_IIF(p(214), BOOST_PP_NODE_213, BOOST_PP_NODE_215) # define BOOST_PP_NODE_213(p) BOOST_PP_IIF(p(213), 213, 214) # define BOOST_PP_NODE_215(p) BOOST_PP_IIF(p(215), 215, 216) # define BOOST_PP_NODE_220(p) BOOST_PP_IIF(p(220), BOOST_PP_NODE_218, BOOST_PP_NODE_222) # define BOOST_PP_NODE_218(p) BOOST_PP_IIF(p(218), BOOST_PP_NODE_217, BOOST_PP_NODE_219) # define BOOST_PP_NODE_217(p) BOOST_PP_IIF(p(217), 217, 218) # define BOOST_PP_NODE_219(p) BOOST_PP_IIF(p(219), 219, 220) # define BOOST_PP_NODE_222(p) BOOST_PP_IIF(p(222), BOOST_PP_NODE_221, BOOST_PP_NODE_223) # define BOOST_PP_NODE_221(p) BOOST_PP_IIF(p(221), 221, 222) # define BOOST_PP_NODE_223(p) BOOST_PP_IIF(p(223), 223, 224) # define BOOST_PP_NODE_240(p) BOOST_PP_IIF(p(240), BOOST_PP_NODE_232, BOOST_PP_NODE_248) # define BOOST_PP_NODE_232(p) BOOST_PP_IIF(p(232), BOOST_PP_NODE_228, BOOST_PP_NODE_236) # define BOOST_PP_NODE_228(p) BOOST_PP_IIF(p(228), BOOST_PP_NODE_226, BOOST_PP_NODE_230) # define BOOST_PP_NODE_226(p) BOOST_PP_IIF(p(226), BOOST_PP_NODE_225, BOOST_PP_NODE_227) # define BOOST_PP_NODE_225(p) BOOST_PP_IIF(p(225), 225, 226) # define BOOST_PP_NODE_227(p) BOOST_PP_IIF(p(227), 227, 228) # define BOOST_PP_NODE_230(p) BOOST_PP_IIF(p(230), BOOST_PP_NODE_229, BOOST_PP_NODE_231) # define BOOST_PP_NODE_229(p) BOOST_PP_IIF(p(229), 229, 230) # define BOOST_PP_NODE_231(p) BOOST_PP_IIF(p(231), 231, 232) # define BOOST_PP_NODE_236(p) BOOST_PP_IIF(p(236), BOOST_PP_NODE_234, BOOST_PP_NODE_238) # define BOOST_PP_NODE_234(p) BOOST_PP_IIF(p(234), BOOST_PP_NODE_233, BOOST_PP_NODE_235) # define BOOST_PP_NODE_233(p) BOOST_PP_IIF(p(233), 233, 234) # define BOOST_PP_NODE_235(p) BOOST_PP_IIF(p(235), 235, 236) # define BOOST_PP_NODE_238(p) BOOST_PP_IIF(p(238), BOOST_PP_NODE_237, BOOST_PP_NODE_239) # define BOOST_PP_NODE_237(p) BOOST_PP_IIF(p(237), 237, 238) # define BOOST_PP_NODE_239(p) BOOST_PP_IIF(p(239), 239, 240) # define BOOST_PP_NODE_248(p) BOOST_PP_IIF(p(248), BOOST_PP_NODE_244, BOOST_PP_NODE_252) # define BOOST_PP_NODE_244(p) BOOST_PP_IIF(p(244), BOOST_PP_NODE_242, BOOST_PP_NODE_246) # define BOOST_PP_NODE_242(p) BOOST_PP_IIF(p(242), BOOST_PP_NODE_241, BOOST_PP_NODE_243) # define BOOST_PP_NODE_241(p) BOOST_PP_IIF(p(241), 241, 242) # define BOOST_PP_NODE_243(p) BOOST_PP_IIF(p(243), 243, 244) # define BOOST_PP_NODE_246(p) BOOST_PP_IIF(p(246), BOOST_PP_NODE_245, BOOST_PP_NODE_247) # define BOOST_PP_NODE_245(p) BOOST_PP_IIF(p(245), 245, 246) # define BOOST_PP_NODE_247(p) BOOST_PP_IIF(p(247), 247, 248) # define BOOST_PP_NODE_252(p) BOOST_PP_IIF(p(252), BOOST_PP_NODE_250, BOOST_PP_NODE_254) # define BOOST_PP_NODE_250(p) BOOST_PP_IIF(p(250), BOOST_PP_NODE_249, BOOST_PP_NODE_251) # define BOOST_PP_NODE_249(p) BOOST_PP_IIF(p(249), 249, 250) # define BOOST_PP_NODE_251(p) BOOST_PP_IIF(p(251), 251, 252) # define BOOST_PP_NODE_254(p) BOOST_PP_IIF(p(254), BOOST_PP_NODE_253, BOOST_PP_NODE_255) # define BOOST_PP_NODE_253(p) BOOST_PP_IIF(p(253), 253, 254) # define BOOST_PP_NODE_255(p) BOOST_PP_IIF(p(255), 255, 256) # # endif # endif passenger-4.0.37/ext/boost/preprocessor/detail/check.hpp000644 000765 000024 00000004207 12233035540 023723 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_DETAIL_CHECK_HPP # define BOOST_PREPROCESSOR_DETAIL_CHECK_HPP # # include # include # # /* BOOST_PP_CHECK */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_D(x, type) # else # define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_OO((x, type)) # define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_D ## par # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, type x)) # define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) # define BOOST_PP_CHECK_2(res, _) res # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(type x) # define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) # define BOOST_PP_CHECK_2(chk) BOOST_PP_CHECK_3((BOOST_PP_CHECK_RESULT_ ## chk)) # define BOOST_PP_CHECK_3(im) BOOST_PP_CHECK_5(BOOST_PP_CHECK_4 im) # define BOOST_PP_CHECK_4(res, _) res # define BOOST_PP_CHECK_5(res) res # else /* DMC */ # define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_OO((type x)) # define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_0 ## par # define BOOST_PP_CHECK_0(chk) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, chk)) # define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) # define BOOST_PP_CHECK_2(res, _) res # endif # # define BOOST_PP_CHECK_RESULT_1 1, BOOST_PP_NIL # # endif passenger-4.0.37/ext/boost/preprocessor/detail/is_binary.hpp000644 000765 000024 00000002331 12233035540 024621 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP # define BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP # # include # include # # /* BOOST_PP_IS_BINARY */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_IS_BINARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK) # else # define BOOST_PP_IS_BINARY(x) BOOST_PP_IS_BINARY_I(x) # define BOOST_PP_IS_BINARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK) # endif # # define BOOST_PP_IS_BINARY_CHECK(a, b) 1 # define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_BINARY_CHECK 0, BOOST_PP_NIL # # endif passenger-4.0.37/ext/boost/preprocessor/debug/error.hpp000644 000765 000024 00000003046 12233035540 023623 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_DEBUG_ERROR_HPP # define BOOST_PREPROCESSOR_DEBUG_ERROR_HPP # # include # include # # /* BOOST_PP_ERROR */ # # if BOOST_PP_CONFIG_ERRORS # define BOOST_PP_ERROR(code) BOOST_PP_CAT(BOOST_PP_ERROR_, code) # endif # # define BOOST_PP_ERROR_0x0000 BOOST_PP_ERROR(0x0000, BOOST_PP_INDEX_OUT_OF_BOUNDS) # define BOOST_PP_ERROR_0x0001 BOOST_PP_ERROR(0x0001, BOOST_PP_WHILE_OVERFLOW) # define BOOST_PP_ERROR_0x0002 BOOST_PP_ERROR(0x0002, BOOST_PP_FOR_OVERFLOW) # define BOOST_PP_ERROR_0x0003 BOOST_PP_ERROR(0x0003, BOOST_PP_REPEAT_OVERFLOW) # define BOOST_PP_ERROR_0x0004 BOOST_PP_ERROR(0x0004, BOOST_PP_LIST_FOLD_OVERFLOW) # define BOOST_PP_ERROR_0x0005 BOOST_PP_ERROR(0x0005, BOOST_PP_SEQ_FOLD_OVERFLOW) # define BOOST_PP_ERROR_0x0006 BOOST_PP_ERROR(0x0006, BOOST_PP_ARITHMETIC_OVERFLOW) # define BOOST_PP_ERROR_0x0007 BOOST_PP_ERROR(0x0007, BOOST_PP_DIVISION_BY_ZERO) # # endif passenger-4.0.37/ext/boost/preprocessor/control/detail/000755 000765 000024 00000000000 12233035540 023612 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/preprocessor/control/expr_iif.hpp000644 000765 000024 00000002310 12233035540 024662 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_EXPR_IIF_HPP # define BOOST_PREPROCESSOR_CONTROL_EXPR_IIF_HPP # # include # # /* BOOST_PP_EXPR_IIF */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_EXPR_IIF(bit, expr) BOOST_PP_EXPR_IIF_I(bit, expr) # else # define BOOST_PP_EXPR_IIF(bit, expr) BOOST_PP_EXPR_IIF_OO((bit, expr)) # define BOOST_PP_EXPR_IIF_OO(par) BOOST_PP_EXPR_IIF_I ## par # endif # # define BOOST_PP_EXPR_IIF_I(bit, expr) BOOST_PP_EXPR_IIF_ ## bit(expr) # # define BOOST_PP_EXPR_IIF_0(expr) # define BOOST_PP_EXPR_IIF_1(expr) expr # # endif passenger-4.0.37/ext/boost/preprocessor/control/if.hpp000644 000765 000024 00000001612 12233035540 023457 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_IF_HPP # define BOOST_PREPROCESSOR_CONTROL_IF_HPP # # include # include # include # # /* BOOST_PP_IF */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_IF(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) # else # define BOOST_PP_IF(cond, t, f) BOOST_PP_IF_I(cond, t, f) # define BOOST_PP_IF_I(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/control/iif.hpp000644 000765 000024 00000002455 12233035540 023636 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_IIF_HPP # define BOOST_PREPROCESSOR_CONTROL_IIF_HPP # # include # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_I(bit, t, f) # else # define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_OO((bit, t, f)) # define BOOST_PP_IIF_OO(par) BOOST_PP_IIF_I ## par # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_ ## bit(t, f) # else # define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_II(BOOST_PP_IIF_ ## bit(t, f)) # define BOOST_PP_IIF_II(id) id # endif # # define BOOST_PP_IIF_0(t, f) f # define BOOST_PP_IIF_1(t, f) t # # endif passenger-4.0.37/ext/boost/preprocessor/control/while.hpp000644 000765 000024 00000042231 12233035540 024173 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_WHILE_HPP # define BOOST_PREPROCESSOR_CONTROL_WHILE_HPP # # include # include # include # include # include # include # include # # /* BOOST_PP_WHILE */ # # if 0 # define BOOST_PP_WHILE(pred, op, state) # endif # # define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_CHECK_, BOOST_PP_LIST_FOLD_RIGHT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)))) # else # define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL))) # endif # # define BOOST_PP_WHILE_F(d, _) 0 # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # include # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # include # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # include # else # include # endif # # define BOOST_PP_WHILE_257(p, o, s) BOOST_PP_ERROR(0x0001) # # define BOOST_PP_WHILE_CHECK_BOOST_PP_NIL 1 # # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_1(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_2(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_3(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_4(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_5(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_6(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_7(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_8(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_9(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_10(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_11(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_12(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_13(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_14(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_15(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_16(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_17(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_18(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_19(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_20(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_21(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_22(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_23(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_24(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_25(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_26(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_27(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_28(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_29(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_30(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_31(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_32(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_33(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_34(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_35(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_36(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_37(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_38(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_39(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_40(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_41(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_42(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_43(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_44(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_45(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_46(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_47(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_48(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_49(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_50(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_51(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_52(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_53(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_54(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_55(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_56(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_57(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_58(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_59(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_60(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_61(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_62(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_63(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_64(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_65(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_66(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_67(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_68(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_69(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_70(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_71(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_72(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_73(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_74(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_75(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_76(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_77(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_78(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_79(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_80(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_81(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_82(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_83(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_84(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_85(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_86(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_87(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_88(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_89(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_90(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_91(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_92(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_93(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_94(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_95(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_96(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_97(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_98(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_99(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_100(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_101(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_102(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_103(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_104(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_105(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_106(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_107(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_108(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_109(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_110(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_111(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_112(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_113(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_114(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_115(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_116(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_117(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_118(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_119(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_120(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_121(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_122(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_123(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_124(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_125(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_126(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_127(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_128(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_129(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_130(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_131(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_132(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_133(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_134(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_135(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_136(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_137(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_138(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_139(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_140(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_141(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_142(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_143(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_144(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_145(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_146(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_147(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_148(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_149(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_150(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_151(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_152(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_153(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_154(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_155(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_156(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_157(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_158(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_159(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_160(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_161(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_162(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_163(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_164(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_165(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_166(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_167(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_168(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_169(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_170(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_171(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_172(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_173(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_174(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_175(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_176(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_177(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_178(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_179(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_180(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_181(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_182(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_183(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_184(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_185(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_186(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_187(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_188(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_189(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_190(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_191(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_192(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_193(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_194(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_195(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_196(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_197(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_198(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_199(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_200(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_201(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_202(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_203(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_204(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_205(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_206(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_207(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_208(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_209(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_210(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_211(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_212(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_213(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_214(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_215(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_216(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_217(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_218(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_219(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_220(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_221(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_222(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_223(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_224(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_225(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_226(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_227(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_228(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_229(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_230(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_231(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_232(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_233(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_234(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_235(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_236(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_237(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_238(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_239(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_240(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_241(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_242(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_243(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_244(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_245(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_246(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_247(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_248(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_249(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_250(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_251(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_252(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_253(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_254(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_255(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_256(p, o, s) 0 # # endif passenger-4.0.37/ext/boost/preprocessor/control/detail/while.hpp000644 000765 000024 00000203751 12233035540 025443 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP # define BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP # # include # include # include # # define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_C(BOOST_PP_BOOL(p(2, s)), p, o, s) # define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_C(BOOST_PP_BOOL(p(3, s)), p, o, s) # define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_C(BOOST_PP_BOOL(p(4, s)), p, o, s) # define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_WHILE_4_C(BOOST_PP_BOOL(p(5, s)), p, o, s) # define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_WHILE_5_C(BOOST_PP_BOOL(p(6, s)), p, o, s) # define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_WHILE_6_C(BOOST_PP_BOOL(p(7, s)), p, o, s) # define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_WHILE_7_C(BOOST_PP_BOOL(p(8, s)), p, o, s) # define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_WHILE_8_C(BOOST_PP_BOOL(p(9, s)), p, o, s) # define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_WHILE_9_C(BOOST_PP_BOOL(p(10, s)), p, o, s) # define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_WHILE_10_C(BOOST_PP_BOOL(p(11, s)), p, o, s) # define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_WHILE_11_C(BOOST_PP_BOOL(p(12, s)), p, o, s) # define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_WHILE_12_C(BOOST_PP_BOOL(p(13, s)), p, o, s) # define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_WHILE_13_C(BOOST_PP_BOOL(p(14, s)), p, o, s) # define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_WHILE_14_C(BOOST_PP_BOOL(p(15, s)), p, o, s) # define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_WHILE_15_C(BOOST_PP_BOOL(p(16, s)), p, o, s) # define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_WHILE_16_C(BOOST_PP_BOOL(p(17, s)), p, o, s) # define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_WHILE_17_C(BOOST_PP_BOOL(p(18, s)), p, o, s) # define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_WHILE_18_C(BOOST_PP_BOOL(p(19, s)), p, o, s) # define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_WHILE_19_C(BOOST_PP_BOOL(p(20, s)), p, o, s) # define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_WHILE_20_C(BOOST_PP_BOOL(p(21, s)), p, o, s) # define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_WHILE_21_C(BOOST_PP_BOOL(p(22, s)), p, o, s) # define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_WHILE_22_C(BOOST_PP_BOOL(p(23, s)), p, o, s) # define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_WHILE_23_C(BOOST_PP_BOOL(p(24, s)), p, o, s) # define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_WHILE_24_C(BOOST_PP_BOOL(p(25, s)), p, o, s) # define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_WHILE_25_C(BOOST_PP_BOOL(p(26, s)), p, o, s) # define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_WHILE_26_C(BOOST_PP_BOOL(p(27, s)), p, o, s) # define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_WHILE_27_C(BOOST_PP_BOOL(p(28, s)), p, o, s) # define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_WHILE_28_C(BOOST_PP_BOOL(p(29, s)), p, o, s) # define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_WHILE_29_C(BOOST_PP_BOOL(p(30, s)), p, o, s) # define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_WHILE_30_C(BOOST_PP_BOOL(p(31, s)), p, o, s) # define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_WHILE_31_C(BOOST_PP_BOOL(p(32, s)), p, o, s) # define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_WHILE_32_C(BOOST_PP_BOOL(p(33, s)), p, o, s) # define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_WHILE_33_C(BOOST_PP_BOOL(p(34, s)), p, o, s) # define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_WHILE_34_C(BOOST_PP_BOOL(p(35, s)), p, o, s) # define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_WHILE_35_C(BOOST_PP_BOOL(p(36, s)), p, o, s) # define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_WHILE_36_C(BOOST_PP_BOOL(p(37, s)), p, o, s) # define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_WHILE_37_C(BOOST_PP_BOOL(p(38, s)), p, o, s) # define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_WHILE_38_C(BOOST_PP_BOOL(p(39, s)), p, o, s) # define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_WHILE_39_C(BOOST_PP_BOOL(p(40, s)), p, o, s) # define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_WHILE_40_C(BOOST_PP_BOOL(p(41, s)), p, o, s) # define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_WHILE_41_C(BOOST_PP_BOOL(p(42, s)), p, o, s) # define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_WHILE_42_C(BOOST_PP_BOOL(p(43, s)), p, o, s) # define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_WHILE_43_C(BOOST_PP_BOOL(p(44, s)), p, o, s) # define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_WHILE_44_C(BOOST_PP_BOOL(p(45, s)), p, o, s) # define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_WHILE_45_C(BOOST_PP_BOOL(p(46, s)), p, o, s) # define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_WHILE_46_C(BOOST_PP_BOOL(p(47, s)), p, o, s) # define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_WHILE_47_C(BOOST_PP_BOOL(p(48, s)), p, o, s) # define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_WHILE_48_C(BOOST_PP_BOOL(p(49, s)), p, o, s) # define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_WHILE_49_C(BOOST_PP_BOOL(p(50, s)), p, o, s) # define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_WHILE_50_C(BOOST_PP_BOOL(p(51, s)), p, o, s) # define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_WHILE_51_C(BOOST_PP_BOOL(p(52, s)), p, o, s) # define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_WHILE_52_C(BOOST_PP_BOOL(p(53, s)), p, o, s) # define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_WHILE_53_C(BOOST_PP_BOOL(p(54, s)), p, o, s) # define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_WHILE_54_C(BOOST_PP_BOOL(p(55, s)), p, o, s) # define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_WHILE_55_C(BOOST_PP_BOOL(p(56, s)), p, o, s) # define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_WHILE_56_C(BOOST_PP_BOOL(p(57, s)), p, o, s) # define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_WHILE_57_C(BOOST_PP_BOOL(p(58, s)), p, o, s) # define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_WHILE_58_C(BOOST_PP_BOOL(p(59, s)), p, o, s) # define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_WHILE_59_C(BOOST_PP_BOOL(p(60, s)), p, o, s) # define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_WHILE_60_C(BOOST_PP_BOOL(p(61, s)), p, o, s) # define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_WHILE_61_C(BOOST_PP_BOOL(p(62, s)), p, o, s) # define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_WHILE_62_C(BOOST_PP_BOOL(p(63, s)), p, o, s) # define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_WHILE_63_C(BOOST_PP_BOOL(p(64, s)), p, o, s) # define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_WHILE_64_C(BOOST_PP_BOOL(p(65, s)), p, o, s) # define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_WHILE_65_C(BOOST_PP_BOOL(p(66, s)), p, o, s) # define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_WHILE_66_C(BOOST_PP_BOOL(p(67, s)), p, o, s) # define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_WHILE_67_C(BOOST_PP_BOOL(p(68, s)), p, o, s) # define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_WHILE_68_C(BOOST_PP_BOOL(p(69, s)), p, o, s) # define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_WHILE_69_C(BOOST_PP_BOOL(p(70, s)), p, o, s) # define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_WHILE_70_C(BOOST_PP_BOOL(p(71, s)), p, o, s) # define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_WHILE_71_C(BOOST_PP_BOOL(p(72, s)), p, o, s) # define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_WHILE_72_C(BOOST_PP_BOOL(p(73, s)), p, o, s) # define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_WHILE_73_C(BOOST_PP_BOOL(p(74, s)), p, o, s) # define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_WHILE_74_C(BOOST_PP_BOOL(p(75, s)), p, o, s) # define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_WHILE_75_C(BOOST_PP_BOOL(p(76, s)), p, o, s) # define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_WHILE_76_C(BOOST_PP_BOOL(p(77, s)), p, o, s) # define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_WHILE_77_C(BOOST_PP_BOOL(p(78, s)), p, o, s) # define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_WHILE_78_C(BOOST_PP_BOOL(p(79, s)), p, o, s) # define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_WHILE_79_C(BOOST_PP_BOOL(p(80, s)), p, o, s) # define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_WHILE_80_C(BOOST_PP_BOOL(p(81, s)), p, o, s) # define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_WHILE_81_C(BOOST_PP_BOOL(p(82, s)), p, o, s) # define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_WHILE_82_C(BOOST_PP_BOOL(p(83, s)), p, o, s) # define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_WHILE_83_C(BOOST_PP_BOOL(p(84, s)), p, o, s) # define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_WHILE_84_C(BOOST_PP_BOOL(p(85, s)), p, o, s) # define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_WHILE_85_C(BOOST_PP_BOOL(p(86, s)), p, o, s) # define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_WHILE_86_C(BOOST_PP_BOOL(p(87, s)), p, o, s) # define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_WHILE_87_C(BOOST_PP_BOOL(p(88, s)), p, o, s) # define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_WHILE_88_C(BOOST_PP_BOOL(p(89, s)), p, o, s) # define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_WHILE_89_C(BOOST_PP_BOOL(p(90, s)), p, o, s) # define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_WHILE_90_C(BOOST_PP_BOOL(p(91, s)), p, o, s) # define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_WHILE_91_C(BOOST_PP_BOOL(p(92, s)), p, o, s) # define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_WHILE_92_C(BOOST_PP_BOOL(p(93, s)), p, o, s) # define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_WHILE_93_C(BOOST_PP_BOOL(p(94, s)), p, o, s) # define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_WHILE_94_C(BOOST_PP_BOOL(p(95, s)), p, o, s) # define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_WHILE_95_C(BOOST_PP_BOOL(p(96, s)), p, o, s) # define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_WHILE_96_C(BOOST_PP_BOOL(p(97, s)), p, o, s) # define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_WHILE_97_C(BOOST_PP_BOOL(p(98, s)), p, o, s) # define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_WHILE_98_C(BOOST_PP_BOOL(p(99, s)), p, o, s) # define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_WHILE_99_C(BOOST_PP_BOOL(p(100, s)), p, o, s) # define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_WHILE_100_C(BOOST_PP_BOOL(p(101, s)), p, o, s) # define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_WHILE_101_C(BOOST_PP_BOOL(p(102, s)), p, o, s) # define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_WHILE_102_C(BOOST_PP_BOOL(p(103, s)), p, o, s) # define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_WHILE_103_C(BOOST_PP_BOOL(p(104, s)), p, o, s) # define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_WHILE_104_C(BOOST_PP_BOOL(p(105, s)), p, o, s) # define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_WHILE_105_C(BOOST_PP_BOOL(p(106, s)), p, o, s) # define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_WHILE_106_C(BOOST_PP_BOOL(p(107, s)), p, o, s) # define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_WHILE_107_C(BOOST_PP_BOOL(p(108, s)), p, o, s) # define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_WHILE_108_C(BOOST_PP_BOOL(p(109, s)), p, o, s) # define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_WHILE_109_C(BOOST_PP_BOOL(p(110, s)), p, o, s) # define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_WHILE_110_C(BOOST_PP_BOOL(p(111, s)), p, o, s) # define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_WHILE_111_C(BOOST_PP_BOOL(p(112, s)), p, o, s) # define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_WHILE_112_C(BOOST_PP_BOOL(p(113, s)), p, o, s) # define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_WHILE_113_C(BOOST_PP_BOOL(p(114, s)), p, o, s) # define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_WHILE_114_C(BOOST_PP_BOOL(p(115, s)), p, o, s) # define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_WHILE_115_C(BOOST_PP_BOOL(p(116, s)), p, o, s) # define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_WHILE_116_C(BOOST_PP_BOOL(p(117, s)), p, o, s) # define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_WHILE_117_C(BOOST_PP_BOOL(p(118, s)), p, o, s) # define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_WHILE_118_C(BOOST_PP_BOOL(p(119, s)), p, o, s) # define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_WHILE_119_C(BOOST_PP_BOOL(p(120, s)), p, o, s) # define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_WHILE_120_C(BOOST_PP_BOOL(p(121, s)), p, o, s) # define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_WHILE_121_C(BOOST_PP_BOOL(p(122, s)), p, o, s) # define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_WHILE_122_C(BOOST_PP_BOOL(p(123, s)), p, o, s) # define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_WHILE_123_C(BOOST_PP_BOOL(p(124, s)), p, o, s) # define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_WHILE_124_C(BOOST_PP_BOOL(p(125, s)), p, o, s) # define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_WHILE_125_C(BOOST_PP_BOOL(p(126, s)), p, o, s) # define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_WHILE_126_C(BOOST_PP_BOOL(p(127, s)), p, o, s) # define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_WHILE_127_C(BOOST_PP_BOOL(p(128, s)), p, o, s) # define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_WHILE_128_C(BOOST_PP_BOOL(p(129, s)), p, o, s) # define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_WHILE_129_C(BOOST_PP_BOOL(p(130, s)), p, o, s) # define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_WHILE_130_C(BOOST_PP_BOOL(p(131, s)), p, o, s) # define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_WHILE_131_C(BOOST_PP_BOOL(p(132, s)), p, o, s) # define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_WHILE_132_C(BOOST_PP_BOOL(p(133, s)), p, o, s) # define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_WHILE_133_C(BOOST_PP_BOOL(p(134, s)), p, o, s) # define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_WHILE_134_C(BOOST_PP_BOOL(p(135, s)), p, o, s) # define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_WHILE_135_C(BOOST_PP_BOOL(p(136, s)), p, o, s) # define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_WHILE_136_C(BOOST_PP_BOOL(p(137, s)), p, o, s) # define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_WHILE_137_C(BOOST_PP_BOOL(p(138, s)), p, o, s) # define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_WHILE_138_C(BOOST_PP_BOOL(p(139, s)), p, o, s) # define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_WHILE_139_C(BOOST_PP_BOOL(p(140, s)), p, o, s) # define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_WHILE_140_C(BOOST_PP_BOOL(p(141, s)), p, o, s) # define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_WHILE_141_C(BOOST_PP_BOOL(p(142, s)), p, o, s) # define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_WHILE_142_C(BOOST_PP_BOOL(p(143, s)), p, o, s) # define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_WHILE_143_C(BOOST_PP_BOOL(p(144, s)), p, o, s) # define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_WHILE_144_C(BOOST_PP_BOOL(p(145, s)), p, o, s) # define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_WHILE_145_C(BOOST_PP_BOOL(p(146, s)), p, o, s) # define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_WHILE_146_C(BOOST_PP_BOOL(p(147, s)), p, o, s) # define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_WHILE_147_C(BOOST_PP_BOOL(p(148, s)), p, o, s) # define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_WHILE_148_C(BOOST_PP_BOOL(p(149, s)), p, o, s) # define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_WHILE_149_C(BOOST_PP_BOOL(p(150, s)), p, o, s) # define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_WHILE_150_C(BOOST_PP_BOOL(p(151, s)), p, o, s) # define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_WHILE_151_C(BOOST_PP_BOOL(p(152, s)), p, o, s) # define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_WHILE_152_C(BOOST_PP_BOOL(p(153, s)), p, o, s) # define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_WHILE_153_C(BOOST_PP_BOOL(p(154, s)), p, o, s) # define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_WHILE_154_C(BOOST_PP_BOOL(p(155, s)), p, o, s) # define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_WHILE_155_C(BOOST_PP_BOOL(p(156, s)), p, o, s) # define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_WHILE_156_C(BOOST_PP_BOOL(p(157, s)), p, o, s) # define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_WHILE_157_C(BOOST_PP_BOOL(p(158, s)), p, o, s) # define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_WHILE_158_C(BOOST_PP_BOOL(p(159, s)), p, o, s) # define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_WHILE_159_C(BOOST_PP_BOOL(p(160, s)), p, o, s) # define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_WHILE_160_C(BOOST_PP_BOOL(p(161, s)), p, o, s) # define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_WHILE_161_C(BOOST_PP_BOOL(p(162, s)), p, o, s) # define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_WHILE_162_C(BOOST_PP_BOOL(p(163, s)), p, o, s) # define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_WHILE_163_C(BOOST_PP_BOOL(p(164, s)), p, o, s) # define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_WHILE_164_C(BOOST_PP_BOOL(p(165, s)), p, o, s) # define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_WHILE_165_C(BOOST_PP_BOOL(p(166, s)), p, o, s) # define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_WHILE_166_C(BOOST_PP_BOOL(p(167, s)), p, o, s) # define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_WHILE_167_C(BOOST_PP_BOOL(p(168, s)), p, o, s) # define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_WHILE_168_C(BOOST_PP_BOOL(p(169, s)), p, o, s) # define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_WHILE_169_C(BOOST_PP_BOOL(p(170, s)), p, o, s) # define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_WHILE_170_C(BOOST_PP_BOOL(p(171, s)), p, o, s) # define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_WHILE_171_C(BOOST_PP_BOOL(p(172, s)), p, o, s) # define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_WHILE_172_C(BOOST_PP_BOOL(p(173, s)), p, o, s) # define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_WHILE_173_C(BOOST_PP_BOOL(p(174, s)), p, o, s) # define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_WHILE_174_C(BOOST_PP_BOOL(p(175, s)), p, o, s) # define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_WHILE_175_C(BOOST_PP_BOOL(p(176, s)), p, o, s) # define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_WHILE_176_C(BOOST_PP_BOOL(p(177, s)), p, o, s) # define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_WHILE_177_C(BOOST_PP_BOOL(p(178, s)), p, o, s) # define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_WHILE_178_C(BOOST_PP_BOOL(p(179, s)), p, o, s) # define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_WHILE_179_C(BOOST_PP_BOOL(p(180, s)), p, o, s) # define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_WHILE_180_C(BOOST_PP_BOOL(p(181, s)), p, o, s) # define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_WHILE_181_C(BOOST_PP_BOOL(p(182, s)), p, o, s) # define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_WHILE_182_C(BOOST_PP_BOOL(p(183, s)), p, o, s) # define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_WHILE_183_C(BOOST_PP_BOOL(p(184, s)), p, o, s) # define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_WHILE_184_C(BOOST_PP_BOOL(p(185, s)), p, o, s) # define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_WHILE_185_C(BOOST_PP_BOOL(p(186, s)), p, o, s) # define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_WHILE_186_C(BOOST_PP_BOOL(p(187, s)), p, o, s) # define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_WHILE_187_C(BOOST_PP_BOOL(p(188, s)), p, o, s) # define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_WHILE_188_C(BOOST_PP_BOOL(p(189, s)), p, o, s) # define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_WHILE_189_C(BOOST_PP_BOOL(p(190, s)), p, o, s) # define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_WHILE_190_C(BOOST_PP_BOOL(p(191, s)), p, o, s) # define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_WHILE_191_C(BOOST_PP_BOOL(p(192, s)), p, o, s) # define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_WHILE_192_C(BOOST_PP_BOOL(p(193, s)), p, o, s) # define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_WHILE_193_C(BOOST_PP_BOOL(p(194, s)), p, o, s) # define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_WHILE_194_C(BOOST_PP_BOOL(p(195, s)), p, o, s) # define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_WHILE_195_C(BOOST_PP_BOOL(p(196, s)), p, o, s) # define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_WHILE_196_C(BOOST_PP_BOOL(p(197, s)), p, o, s) # define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_WHILE_197_C(BOOST_PP_BOOL(p(198, s)), p, o, s) # define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_WHILE_198_C(BOOST_PP_BOOL(p(199, s)), p, o, s) # define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_WHILE_199_C(BOOST_PP_BOOL(p(200, s)), p, o, s) # define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_WHILE_200_C(BOOST_PP_BOOL(p(201, s)), p, o, s) # define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_WHILE_201_C(BOOST_PP_BOOL(p(202, s)), p, o, s) # define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_WHILE_202_C(BOOST_PP_BOOL(p(203, s)), p, o, s) # define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_WHILE_203_C(BOOST_PP_BOOL(p(204, s)), p, o, s) # define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_WHILE_204_C(BOOST_PP_BOOL(p(205, s)), p, o, s) # define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_WHILE_205_C(BOOST_PP_BOOL(p(206, s)), p, o, s) # define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_WHILE_206_C(BOOST_PP_BOOL(p(207, s)), p, o, s) # define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_WHILE_207_C(BOOST_PP_BOOL(p(208, s)), p, o, s) # define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_WHILE_208_C(BOOST_PP_BOOL(p(209, s)), p, o, s) # define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_WHILE_209_C(BOOST_PP_BOOL(p(210, s)), p, o, s) # define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_WHILE_210_C(BOOST_PP_BOOL(p(211, s)), p, o, s) # define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_WHILE_211_C(BOOST_PP_BOOL(p(212, s)), p, o, s) # define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_WHILE_212_C(BOOST_PP_BOOL(p(213, s)), p, o, s) # define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_WHILE_213_C(BOOST_PP_BOOL(p(214, s)), p, o, s) # define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_WHILE_214_C(BOOST_PP_BOOL(p(215, s)), p, o, s) # define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_WHILE_215_C(BOOST_PP_BOOL(p(216, s)), p, o, s) # define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_WHILE_216_C(BOOST_PP_BOOL(p(217, s)), p, o, s) # define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_WHILE_217_C(BOOST_PP_BOOL(p(218, s)), p, o, s) # define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_WHILE_218_C(BOOST_PP_BOOL(p(219, s)), p, o, s) # define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_WHILE_219_C(BOOST_PP_BOOL(p(220, s)), p, o, s) # define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_WHILE_220_C(BOOST_PP_BOOL(p(221, s)), p, o, s) # define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_WHILE_221_C(BOOST_PP_BOOL(p(222, s)), p, o, s) # define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_WHILE_222_C(BOOST_PP_BOOL(p(223, s)), p, o, s) # define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_WHILE_223_C(BOOST_PP_BOOL(p(224, s)), p, o, s) # define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_WHILE_224_C(BOOST_PP_BOOL(p(225, s)), p, o, s) # define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_WHILE_225_C(BOOST_PP_BOOL(p(226, s)), p, o, s) # define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_WHILE_226_C(BOOST_PP_BOOL(p(227, s)), p, o, s) # define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_WHILE_227_C(BOOST_PP_BOOL(p(228, s)), p, o, s) # define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_WHILE_228_C(BOOST_PP_BOOL(p(229, s)), p, o, s) # define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_WHILE_229_C(BOOST_PP_BOOL(p(230, s)), p, o, s) # define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_WHILE_230_C(BOOST_PP_BOOL(p(231, s)), p, o, s) # define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_WHILE_231_C(BOOST_PP_BOOL(p(232, s)), p, o, s) # define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_WHILE_232_C(BOOST_PP_BOOL(p(233, s)), p, o, s) # define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_WHILE_233_C(BOOST_PP_BOOL(p(234, s)), p, o, s) # define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_WHILE_234_C(BOOST_PP_BOOL(p(235, s)), p, o, s) # define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_WHILE_235_C(BOOST_PP_BOOL(p(236, s)), p, o, s) # define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_WHILE_236_C(BOOST_PP_BOOL(p(237, s)), p, o, s) # define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_WHILE_237_C(BOOST_PP_BOOL(p(238, s)), p, o, s) # define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_WHILE_238_C(BOOST_PP_BOOL(p(239, s)), p, o, s) # define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_WHILE_239_C(BOOST_PP_BOOL(p(240, s)), p, o, s) # define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_WHILE_240_C(BOOST_PP_BOOL(p(241, s)), p, o, s) # define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_WHILE_241_C(BOOST_PP_BOOL(p(242, s)), p, o, s) # define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_WHILE_242_C(BOOST_PP_BOOL(p(243, s)), p, o, s) # define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_WHILE_243_C(BOOST_PP_BOOL(p(244, s)), p, o, s) # define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_WHILE_244_C(BOOST_PP_BOOL(p(245, s)), p, o, s) # define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_WHILE_245_C(BOOST_PP_BOOL(p(246, s)), p, o, s) # define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_WHILE_246_C(BOOST_PP_BOOL(p(247, s)), p, o, s) # define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_WHILE_247_C(BOOST_PP_BOOL(p(248, s)), p, o, s) # define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_WHILE_248_C(BOOST_PP_BOOL(p(249, s)), p, o, s) # define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_WHILE_249_C(BOOST_PP_BOOL(p(250, s)), p, o, s) # define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_WHILE_250_C(BOOST_PP_BOOL(p(251, s)), p, o, s) # define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_WHILE_251_C(BOOST_PP_BOOL(p(252, s)), p, o, s) # define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_WHILE_252_C(BOOST_PP_BOOL(p(253, s)), p, o, s) # define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_WHILE_253_C(BOOST_PP_BOOL(p(254, s)), p, o, s) # define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_WHILE_254_C(BOOST_PP_BOOL(p(255, s)), p, o, s) # define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_C(BOOST_PP_BOOL(p(256, s)), p, o, s) # define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_C(BOOST_PP_BOOL(p(257, s)), p, o, s) # # define BOOST_PP_WHILE_1_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(2, s)) # define BOOST_PP_WHILE_2_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(3, s)) # define BOOST_PP_WHILE_3_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(4, s)) # define BOOST_PP_WHILE_4_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_5, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(5, s)) # define BOOST_PP_WHILE_5_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_6, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(6, s)) # define BOOST_PP_WHILE_6_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_7, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(7, s)) # define BOOST_PP_WHILE_7_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_8, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(8, s)) # define BOOST_PP_WHILE_8_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_9, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(9, s)) # define BOOST_PP_WHILE_9_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_10, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(10, s)) # define BOOST_PP_WHILE_10_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_11, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(11, s)) # define BOOST_PP_WHILE_11_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_12, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(12, s)) # define BOOST_PP_WHILE_12_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_13, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(13, s)) # define BOOST_PP_WHILE_13_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_14, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(14, s)) # define BOOST_PP_WHILE_14_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_15, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(15, s)) # define BOOST_PP_WHILE_15_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_16, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(16, s)) # define BOOST_PP_WHILE_16_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_17, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(17, s)) # define BOOST_PP_WHILE_17_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_18, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(18, s)) # define BOOST_PP_WHILE_18_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_19, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(19, s)) # define BOOST_PP_WHILE_19_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_20, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(20, s)) # define BOOST_PP_WHILE_20_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_21, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(21, s)) # define BOOST_PP_WHILE_21_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_22, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(22, s)) # define BOOST_PP_WHILE_22_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_23, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(23, s)) # define BOOST_PP_WHILE_23_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_24, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(24, s)) # define BOOST_PP_WHILE_24_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_25, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(25, s)) # define BOOST_PP_WHILE_25_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_26, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(26, s)) # define BOOST_PP_WHILE_26_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_27, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(27, s)) # define BOOST_PP_WHILE_27_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_28, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(28, s)) # define BOOST_PP_WHILE_28_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_29, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(29, s)) # define BOOST_PP_WHILE_29_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_30, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(30, s)) # define BOOST_PP_WHILE_30_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_31, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(31, s)) # define BOOST_PP_WHILE_31_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_32, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(32, s)) # define BOOST_PP_WHILE_32_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_33, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(33, s)) # define BOOST_PP_WHILE_33_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_34, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(34, s)) # define BOOST_PP_WHILE_34_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_35, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(35, s)) # define BOOST_PP_WHILE_35_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_36, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(36, s)) # define BOOST_PP_WHILE_36_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_37, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(37, s)) # define BOOST_PP_WHILE_37_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_38, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(38, s)) # define BOOST_PP_WHILE_38_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_39, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(39, s)) # define BOOST_PP_WHILE_39_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_40, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(40, s)) # define BOOST_PP_WHILE_40_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_41, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(41, s)) # define BOOST_PP_WHILE_41_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_42, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(42, s)) # define BOOST_PP_WHILE_42_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_43, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(43, s)) # define BOOST_PP_WHILE_43_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_44, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(44, s)) # define BOOST_PP_WHILE_44_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_45, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(45, s)) # define BOOST_PP_WHILE_45_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_46, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(46, s)) # define BOOST_PP_WHILE_46_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_47, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(47, s)) # define BOOST_PP_WHILE_47_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_48, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(48, s)) # define BOOST_PP_WHILE_48_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_49, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(49, s)) # define BOOST_PP_WHILE_49_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_50, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(50, s)) # define BOOST_PP_WHILE_50_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_51, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(51, s)) # define BOOST_PP_WHILE_51_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_52, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(52, s)) # define BOOST_PP_WHILE_52_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_53, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(53, s)) # define BOOST_PP_WHILE_53_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_54, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(54, s)) # define BOOST_PP_WHILE_54_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_55, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(55, s)) # define BOOST_PP_WHILE_55_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_56, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(56, s)) # define BOOST_PP_WHILE_56_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_57, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(57, s)) # define BOOST_PP_WHILE_57_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_58, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(58, s)) # define BOOST_PP_WHILE_58_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_59, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(59, s)) # define BOOST_PP_WHILE_59_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_60, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(60, s)) # define BOOST_PP_WHILE_60_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_61, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(61, s)) # define BOOST_PP_WHILE_61_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_62, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(62, s)) # define BOOST_PP_WHILE_62_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_63, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(63, s)) # define BOOST_PP_WHILE_63_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_64, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(64, s)) # define BOOST_PP_WHILE_64_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_65, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(65, s)) # define BOOST_PP_WHILE_65_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_66, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(66, s)) # define BOOST_PP_WHILE_66_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_67, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(67, s)) # define BOOST_PP_WHILE_67_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_68, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(68, s)) # define BOOST_PP_WHILE_68_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_69, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(69, s)) # define BOOST_PP_WHILE_69_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_70, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(70, s)) # define BOOST_PP_WHILE_70_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_71, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(71, s)) # define BOOST_PP_WHILE_71_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_72, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(72, s)) # define BOOST_PP_WHILE_72_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_73, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(73, s)) # define BOOST_PP_WHILE_73_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_74, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(74, s)) # define BOOST_PP_WHILE_74_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_75, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(75, s)) # define BOOST_PP_WHILE_75_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_76, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(76, s)) # define BOOST_PP_WHILE_76_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_77, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(77, s)) # define BOOST_PP_WHILE_77_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_78, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(78, s)) # define BOOST_PP_WHILE_78_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_79, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(79, s)) # define BOOST_PP_WHILE_79_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_80, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(80, s)) # define BOOST_PP_WHILE_80_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_81, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(81, s)) # define BOOST_PP_WHILE_81_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_82, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(82, s)) # define BOOST_PP_WHILE_82_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_83, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(83, s)) # define BOOST_PP_WHILE_83_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_84, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(84, s)) # define BOOST_PP_WHILE_84_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_85, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(85, s)) # define BOOST_PP_WHILE_85_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_86, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(86, s)) # define BOOST_PP_WHILE_86_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_87, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(87, s)) # define BOOST_PP_WHILE_87_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_88, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(88, s)) # define BOOST_PP_WHILE_88_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_89, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(89, s)) # define BOOST_PP_WHILE_89_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_90, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(90, s)) # define BOOST_PP_WHILE_90_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_91, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(91, s)) # define BOOST_PP_WHILE_91_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_92, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(92, s)) # define BOOST_PP_WHILE_92_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_93, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(93, s)) # define BOOST_PP_WHILE_93_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_94, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(94, s)) # define BOOST_PP_WHILE_94_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_95, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(95, s)) # define BOOST_PP_WHILE_95_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_96, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(96, s)) # define BOOST_PP_WHILE_96_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_97, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(97, s)) # define BOOST_PP_WHILE_97_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_98, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(98, s)) # define BOOST_PP_WHILE_98_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_99, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(99, s)) # define BOOST_PP_WHILE_99_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_100, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(100, s)) # define BOOST_PP_WHILE_100_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_101, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(101, s)) # define BOOST_PP_WHILE_101_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_102, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(102, s)) # define BOOST_PP_WHILE_102_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_103, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(103, s)) # define BOOST_PP_WHILE_103_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_104, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(104, s)) # define BOOST_PP_WHILE_104_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_105, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(105, s)) # define BOOST_PP_WHILE_105_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_106, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(106, s)) # define BOOST_PP_WHILE_106_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_107, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(107, s)) # define BOOST_PP_WHILE_107_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_108, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(108, s)) # define BOOST_PP_WHILE_108_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_109, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(109, s)) # define BOOST_PP_WHILE_109_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_110, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(110, s)) # define BOOST_PP_WHILE_110_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_111, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(111, s)) # define BOOST_PP_WHILE_111_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_112, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(112, s)) # define BOOST_PP_WHILE_112_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_113, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(113, s)) # define BOOST_PP_WHILE_113_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_114, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(114, s)) # define BOOST_PP_WHILE_114_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_115, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(115, s)) # define BOOST_PP_WHILE_115_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_116, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(116, s)) # define BOOST_PP_WHILE_116_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_117, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(117, s)) # define BOOST_PP_WHILE_117_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_118, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(118, s)) # define BOOST_PP_WHILE_118_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_119, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(119, s)) # define BOOST_PP_WHILE_119_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_120, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(120, s)) # define BOOST_PP_WHILE_120_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_121, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(121, s)) # define BOOST_PP_WHILE_121_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_122, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(122, s)) # define BOOST_PP_WHILE_122_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_123, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(123, s)) # define BOOST_PP_WHILE_123_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_124, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(124, s)) # define BOOST_PP_WHILE_124_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_125, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(125, s)) # define BOOST_PP_WHILE_125_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_126, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(126, s)) # define BOOST_PP_WHILE_126_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_127, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(127, s)) # define BOOST_PP_WHILE_127_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_128, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(128, s)) # define BOOST_PP_WHILE_128_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_129, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(129, s)) # define BOOST_PP_WHILE_129_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_130, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(130, s)) # define BOOST_PP_WHILE_130_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_131, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(131, s)) # define BOOST_PP_WHILE_131_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_132, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(132, s)) # define BOOST_PP_WHILE_132_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_133, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(133, s)) # define BOOST_PP_WHILE_133_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_134, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(134, s)) # define BOOST_PP_WHILE_134_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_135, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(135, s)) # define BOOST_PP_WHILE_135_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_136, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(136, s)) # define BOOST_PP_WHILE_136_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_137, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(137, s)) # define BOOST_PP_WHILE_137_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_138, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(138, s)) # define BOOST_PP_WHILE_138_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_139, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(139, s)) # define BOOST_PP_WHILE_139_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_140, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(140, s)) # define BOOST_PP_WHILE_140_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_141, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(141, s)) # define BOOST_PP_WHILE_141_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_142, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(142, s)) # define BOOST_PP_WHILE_142_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_143, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(143, s)) # define BOOST_PP_WHILE_143_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_144, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(144, s)) # define BOOST_PP_WHILE_144_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_145, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(145, s)) # define BOOST_PP_WHILE_145_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_146, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(146, s)) # define BOOST_PP_WHILE_146_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_147, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(147, s)) # define BOOST_PP_WHILE_147_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_148, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(148, s)) # define BOOST_PP_WHILE_148_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_149, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(149, s)) # define BOOST_PP_WHILE_149_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_150, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(150, s)) # define BOOST_PP_WHILE_150_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_151, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(151, s)) # define BOOST_PP_WHILE_151_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_152, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(152, s)) # define BOOST_PP_WHILE_152_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_153, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(153, s)) # define BOOST_PP_WHILE_153_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_154, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(154, s)) # define BOOST_PP_WHILE_154_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_155, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(155, s)) # define BOOST_PP_WHILE_155_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_156, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(156, s)) # define BOOST_PP_WHILE_156_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_157, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(157, s)) # define BOOST_PP_WHILE_157_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_158, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(158, s)) # define BOOST_PP_WHILE_158_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_159, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(159, s)) # define BOOST_PP_WHILE_159_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_160, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(160, s)) # define BOOST_PP_WHILE_160_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_161, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(161, s)) # define BOOST_PP_WHILE_161_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_162, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(162, s)) # define BOOST_PP_WHILE_162_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_163, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(163, s)) # define BOOST_PP_WHILE_163_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_164, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(164, s)) # define BOOST_PP_WHILE_164_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_165, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(165, s)) # define BOOST_PP_WHILE_165_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_166, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(166, s)) # define BOOST_PP_WHILE_166_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_167, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(167, s)) # define BOOST_PP_WHILE_167_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_168, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(168, s)) # define BOOST_PP_WHILE_168_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_169, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(169, s)) # define BOOST_PP_WHILE_169_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_170, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(170, s)) # define BOOST_PP_WHILE_170_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_171, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(171, s)) # define BOOST_PP_WHILE_171_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_172, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(172, s)) # define BOOST_PP_WHILE_172_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_173, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(173, s)) # define BOOST_PP_WHILE_173_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_174, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(174, s)) # define BOOST_PP_WHILE_174_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_175, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(175, s)) # define BOOST_PP_WHILE_175_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_176, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(176, s)) # define BOOST_PP_WHILE_176_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_177, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(177, s)) # define BOOST_PP_WHILE_177_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_178, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(178, s)) # define BOOST_PP_WHILE_178_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_179, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(179, s)) # define BOOST_PP_WHILE_179_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_180, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(180, s)) # define BOOST_PP_WHILE_180_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_181, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(181, s)) # define BOOST_PP_WHILE_181_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_182, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(182, s)) # define BOOST_PP_WHILE_182_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_183, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(183, s)) # define BOOST_PP_WHILE_183_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_184, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(184, s)) # define BOOST_PP_WHILE_184_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_185, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(185, s)) # define BOOST_PP_WHILE_185_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_186, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(186, s)) # define BOOST_PP_WHILE_186_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_187, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(187, s)) # define BOOST_PP_WHILE_187_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_188, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(188, s)) # define BOOST_PP_WHILE_188_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_189, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(189, s)) # define BOOST_PP_WHILE_189_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_190, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(190, s)) # define BOOST_PP_WHILE_190_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_191, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(191, s)) # define BOOST_PP_WHILE_191_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_192, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(192, s)) # define BOOST_PP_WHILE_192_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_193, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(193, s)) # define BOOST_PP_WHILE_193_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_194, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(194, s)) # define BOOST_PP_WHILE_194_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_195, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(195, s)) # define BOOST_PP_WHILE_195_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_196, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(196, s)) # define BOOST_PP_WHILE_196_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_197, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(197, s)) # define BOOST_PP_WHILE_197_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_198, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(198, s)) # define BOOST_PP_WHILE_198_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_199, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(199, s)) # define BOOST_PP_WHILE_199_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_200, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(200, s)) # define BOOST_PP_WHILE_200_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_201, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(201, s)) # define BOOST_PP_WHILE_201_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_202, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(202, s)) # define BOOST_PP_WHILE_202_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_203, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(203, s)) # define BOOST_PP_WHILE_203_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_204, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(204, s)) # define BOOST_PP_WHILE_204_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_205, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(205, s)) # define BOOST_PP_WHILE_205_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_206, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(206, s)) # define BOOST_PP_WHILE_206_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_207, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(207, s)) # define BOOST_PP_WHILE_207_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_208, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(208, s)) # define BOOST_PP_WHILE_208_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_209, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(209, s)) # define BOOST_PP_WHILE_209_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_210, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(210, s)) # define BOOST_PP_WHILE_210_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_211, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(211, s)) # define BOOST_PP_WHILE_211_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_212, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(212, s)) # define BOOST_PP_WHILE_212_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_213, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(213, s)) # define BOOST_PP_WHILE_213_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_214, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(214, s)) # define BOOST_PP_WHILE_214_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_215, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(215, s)) # define BOOST_PP_WHILE_215_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_216, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(216, s)) # define BOOST_PP_WHILE_216_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_217, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(217, s)) # define BOOST_PP_WHILE_217_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_218, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(218, s)) # define BOOST_PP_WHILE_218_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_219, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(219, s)) # define BOOST_PP_WHILE_219_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_220, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(220, s)) # define BOOST_PP_WHILE_220_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_221, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(221, s)) # define BOOST_PP_WHILE_221_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_222, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(222, s)) # define BOOST_PP_WHILE_222_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_223, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(223, s)) # define BOOST_PP_WHILE_223_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_224, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(224, s)) # define BOOST_PP_WHILE_224_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_225, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(225, s)) # define BOOST_PP_WHILE_225_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_226, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(226, s)) # define BOOST_PP_WHILE_226_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_227, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(227, s)) # define BOOST_PP_WHILE_227_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_228, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(228, s)) # define BOOST_PP_WHILE_228_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_229, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(229, s)) # define BOOST_PP_WHILE_229_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_230, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(230, s)) # define BOOST_PP_WHILE_230_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_231, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(231, s)) # define BOOST_PP_WHILE_231_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_232, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(232, s)) # define BOOST_PP_WHILE_232_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_233, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(233, s)) # define BOOST_PP_WHILE_233_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_234, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(234, s)) # define BOOST_PP_WHILE_234_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_235, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(235, s)) # define BOOST_PP_WHILE_235_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_236, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(236, s)) # define BOOST_PP_WHILE_236_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_237, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(237, s)) # define BOOST_PP_WHILE_237_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_238, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(238, s)) # define BOOST_PP_WHILE_238_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_239, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(239, s)) # define BOOST_PP_WHILE_239_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_240, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(240, s)) # define BOOST_PP_WHILE_240_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_241, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(241, s)) # define BOOST_PP_WHILE_241_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_242, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(242, s)) # define BOOST_PP_WHILE_242_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_243, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(243, s)) # define BOOST_PP_WHILE_243_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_244, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(244, s)) # define BOOST_PP_WHILE_244_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_245, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(245, s)) # define BOOST_PP_WHILE_245_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_246, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(246, s)) # define BOOST_PP_WHILE_246_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_247, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(247, s)) # define BOOST_PP_WHILE_247_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_248, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(248, s)) # define BOOST_PP_WHILE_248_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_249, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(249, s)) # define BOOST_PP_WHILE_249_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_250, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(250, s)) # define BOOST_PP_WHILE_250_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_251, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(251, s)) # define BOOST_PP_WHILE_251_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_252, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(252, s)) # define BOOST_PP_WHILE_252_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_253, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(253, s)) # define BOOST_PP_WHILE_253_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_254, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(254, s)) # define BOOST_PP_WHILE_254_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_255, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(255, s)) # define BOOST_PP_WHILE_255_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_256, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(256, s)) # define BOOST_PP_WHILE_256_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_257, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(257, s)) # # # endif passenger-4.0.37/ext/boost/preprocessor/config/config.hpp000644 000765 000024 00000011036 12233035540 024114 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002-2011. * # * (C) Copyright Edward Diener 2011. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP # define BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP # # /* BOOST_PP_CONFIG_FLAGS */ # # define BOOST_PP_CONFIG_STRICT() 0x0001 # define BOOST_PP_CONFIG_IDEAL() 0x0002 # # define BOOST_PP_CONFIG_MSVC() 0x0004 # define BOOST_PP_CONFIG_MWCC() 0x0008 # define BOOST_PP_CONFIG_BCC() 0x0010 # define BOOST_PP_CONFIG_EDG() 0x0020 # define BOOST_PP_CONFIG_DMC() 0x0040 # # ifndef BOOST_PP_CONFIG_FLAGS # if defined(__GCCXML__) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # elif defined(__WAVE__) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # elif defined(__MWERKS__) && __MWERKS__ >= 0x3200 # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # elif defined(__EDG__) || defined(__EDG_VERSION__) # if defined(_MSC_VER) && __EDG_VERSION__ >= 308 # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) # else # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT()) # endif # elif defined(__MWERKS__) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MWCC()) # elif defined(__DMC__) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_DMC()) # elif defined(__BORLANDC__) && __BORLANDC__ >= 0x581 # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_BCC()) # elif defined(_MSC_VER) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) # else # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # endif # endif # # /* BOOST_PP_CONFIG_EXTENDED_LINE_INFO */ # # ifndef BOOST_PP_CONFIG_EXTENDED_LINE_INFO # define BOOST_PP_CONFIG_EXTENDED_LINE_INFO 0 # endif # # /* BOOST_PP_CONFIG_ERRORS */ # # ifndef BOOST_PP_CONFIG_ERRORS # ifdef NDEBUG # define BOOST_PP_CONFIG_ERRORS 0 # else # define BOOST_PP_CONFIG_ERRORS 1 # endif # endif # # /* BOOST_PP_VARIADICS */ # # if !defined BOOST_PP_VARIADICS # /* variadic support explicitly disabled for all untested compilers */ # if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI # define BOOST_PP_VARIADICS 0 # /* VC++ (C/C++) */ # elif defined _MSC_VER && _MSC_VER >= 1400 && !defined __EDG__ # if _MSC_VER >= 1400 # define BOOST_PP_VARIADICS 1 # define BOOST_PP_VARIADICS_MSVC 1 # else # define BOOST_PP_VARIADICS 0 # endif # /* Wave (C/C++), GCC (C++) */ # elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && __GXX_EXPERIMENTAL_CXX0X__ # define BOOST_PP_VARIADICS 1 # /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */ # elif !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L # define BOOST_PP_VARIADICS 1 # else # define BOOST_PP_VARIADICS 0 # endif # elif !BOOST_PP_VARIADICS + 1 < 2 # undef BOOST_PP_VARIADICS # define BOOST_PP_VARIADICS 1 # if defined _MSC_VER && _MSC_VER >= 1400 && !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI) # define BOOST_PP_VARIADICS_MSVC 1 # endif # else # undef BOOST_PP_VARIADICS # define BOOST_PP_VARIADICS 0 # endif # # endif passenger-4.0.37/ext/boost/preprocessor/array/data.hpp000644 000765 000024 00000002206 12233035540 023430 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARRAY_DATA_HPP # define BOOST_PREPROCESSOR_ARRAY_DATA_HPP # # include # include # # /* BOOST_PP_ARRAY_DATA */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ARRAY_DATA(array) BOOST_PP_TUPLE_ELEM(2, 1, array) # else # define BOOST_PP_ARRAY_DATA(array) BOOST_PP_ARRAY_DATA_I(array) # define BOOST_PP_ARRAY_DATA_I(array) BOOST_PP_ARRAY_DATA_II array # define BOOST_PP_ARRAY_DATA_II(size, data) data # endif # # endif passenger-4.0.37/ext/boost/preprocessor/array/elem.hpp000644 000765 000024 00000002432 12233035540 023442 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARRAY_ELEM_HPP # define BOOST_PREPROCESSOR_ARRAY_ELEM_HPP # # include # include # include # include # # /* BOOST_PP_ARRAY_ELEM */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array)) # else # define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_ARRAY_ELEM_I(i, array) # define BOOST_PP_ARRAY_ELEM_I(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array)) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/array/size.hpp000644 000765 000024 00000002206 12233035540 023471 0ustar00honglistaff000000 000000 # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARRAY_SIZE_HPP # define BOOST_PREPROCESSOR_ARRAY_SIZE_HPP # # include # include # # /* BOOST_PP_ARRAY_SIZE */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_TUPLE_ELEM(2, 0, array) # else # define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_ARRAY_SIZE_I(array) # define BOOST_PP_ARRAY_SIZE_I(array) BOOST_PP_ARRAY_SIZE_II array # define BOOST_PP_ARRAY_SIZE_II(size, data) size # endif # # endif passenger-4.0.37/ext/boost/preprocessor/arithmetic/add.hpp000644 000765 000024 00000003502 12233035540 024262 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARITHMETIC_ADD_HPP # define BOOST_PREPROCESSOR_ARITHMETIC_ADD_HPP # # include # include # include # include # include # # /* BOOST_PP_ADD */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ADD(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) # else # define BOOST_PP_ADD(x, y) BOOST_PP_ADD_I(x, y) # define BOOST_PP_ADD_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) # endif # # define BOOST_PP_ADD_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_ADD_O(d, xy) BOOST_PP_ADD_O_I xy # else # define BOOST_PP_ADD_O(d, xy) BOOST_PP_ADD_O_I(BOOST_PP_TUPLE_ELEM(2, 0, xy), BOOST_PP_TUPLE_ELEM(2, 1, xy)) # endif # # define BOOST_PP_ADD_O_I(x, y) (BOOST_PP_INC(x), BOOST_PP_DEC(y)) # # /* BOOST_PP_ADD_D */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ADD_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) # else # define BOOST_PP_ADD_D(d, x, y) BOOST_PP_ADD_D_I(d, x, y) # define BOOST_PP_ADD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) # endif # # endif passenger-4.0.37/ext/boost/preprocessor/arithmetic/dec.hpp000644 000765 000024 00000020145 12233035540 024267 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARITHMETIC_DEC_HPP # define BOOST_PREPROCESSOR_ARITHMETIC_DEC_HPP # # include # # /* BOOST_PP_DEC */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_DEC(x) BOOST_PP_DEC_I(x) # else # define BOOST_PP_DEC(x) BOOST_PP_DEC_OO((x)) # define BOOST_PP_DEC_OO(par) BOOST_PP_DEC_I ## par # endif # # define BOOST_PP_DEC_I(x) BOOST_PP_DEC_ ## x # # define BOOST_PP_DEC_0 0 # define BOOST_PP_DEC_1 0 # define BOOST_PP_DEC_2 1 # define BOOST_PP_DEC_3 2 # define BOOST_PP_DEC_4 3 # define BOOST_PP_DEC_5 4 # define BOOST_PP_DEC_6 5 # define BOOST_PP_DEC_7 6 # define BOOST_PP_DEC_8 7 # define BOOST_PP_DEC_9 8 # define BOOST_PP_DEC_10 9 # define BOOST_PP_DEC_11 10 # define BOOST_PP_DEC_12 11 # define BOOST_PP_DEC_13 12 # define BOOST_PP_DEC_14 13 # define BOOST_PP_DEC_15 14 # define BOOST_PP_DEC_16 15 # define BOOST_PP_DEC_17 16 # define BOOST_PP_DEC_18 17 # define BOOST_PP_DEC_19 18 # define BOOST_PP_DEC_20 19 # define BOOST_PP_DEC_21 20 # define BOOST_PP_DEC_22 21 # define BOOST_PP_DEC_23 22 # define BOOST_PP_DEC_24 23 # define BOOST_PP_DEC_25 24 # define BOOST_PP_DEC_26 25 # define BOOST_PP_DEC_27 26 # define BOOST_PP_DEC_28 27 # define BOOST_PP_DEC_29 28 # define BOOST_PP_DEC_30 29 # define BOOST_PP_DEC_31 30 # define BOOST_PP_DEC_32 31 # define BOOST_PP_DEC_33 32 # define BOOST_PP_DEC_34 33 # define BOOST_PP_DEC_35 34 # define BOOST_PP_DEC_36 35 # define BOOST_PP_DEC_37 36 # define BOOST_PP_DEC_38 37 # define BOOST_PP_DEC_39 38 # define BOOST_PP_DEC_40 39 # define BOOST_PP_DEC_41 40 # define BOOST_PP_DEC_42 41 # define BOOST_PP_DEC_43 42 # define BOOST_PP_DEC_44 43 # define BOOST_PP_DEC_45 44 # define BOOST_PP_DEC_46 45 # define BOOST_PP_DEC_47 46 # define BOOST_PP_DEC_48 47 # define BOOST_PP_DEC_49 48 # define BOOST_PP_DEC_50 49 # define BOOST_PP_DEC_51 50 # define BOOST_PP_DEC_52 51 # define BOOST_PP_DEC_53 52 # define BOOST_PP_DEC_54 53 # define BOOST_PP_DEC_55 54 # define BOOST_PP_DEC_56 55 # define BOOST_PP_DEC_57 56 # define BOOST_PP_DEC_58 57 # define BOOST_PP_DEC_59 58 # define BOOST_PP_DEC_60 59 # define BOOST_PP_DEC_61 60 # define BOOST_PP_DEC_62 61 # define BOOST_PP_DEC_63 62 # define BOOST_PP_DEC_64 63 # define BOOST_PP_DEC_65 64 # define BOOST_PP_DEC_66 65 # define BOOST_PP_DEC_67 66 # define BOOST_PP_DEC_68 67 # define BOOST_PP_DEC_69 68 # define BOOST_PP_DEC_70 69 # define BOOST_PP_DEC_71 70 # define BOOST_PP_DEC_72 71 # define BOOST_PP_DEC_73 72 # define BOOST_PP_DEC_74 73 # define BOOST_PP_DEC_75 74 # define BOOST_PP_DEC_76 75 # define BOOST_PP_DEC_77 76 # define BOOST_PP_DEC_78 77 # define BOOST_PP_DEC_79 78 # define BOOST_PP_DEC_80 79 # define BOOST_PP_DEC_81 80 # define BOOST_PP_DEC_82 81 # define BOOST_PP_DEC_83 82 # define BOOST_PP_DEC_84 83 # define BOOST_PP_DEC_85 84 # define BOOST_PP_DEC_86 85 # define BOOST_PP_DEC_87 86 # define BOOST_PP_DEC_88 87 # define BOOST_PP_DEC_89 88 # define BOOST_PP_DEC_90 89 # define BOOST_PP_DEC_91 90 # define BOOST_PP_DEC_92 91 # define BOOST_PP_DEC_93 92 # define BOOST_PP_DEC_94 93 # define BOOST_PP_DEC_95 94 # define BOOST_PP_DEC_96 95 # define BOOST_PP_DEC_97 96 # define BOOST_PP_DEC_98 97 # define BOOST_PP_DEC_99 98 # define BOOST_PP_DEC_100 99 # define BOOST_PP_DEC_101 100 # define BOOST_PP_DEC_102 101 # define BOOST_PP_DEC_103 102 # define BOOST_PP_DEC_104 103 # define BOOST_PP_DEC_105 104 # define BOOST_PP_DEC_106 105 # define BOOST_PP_DEC_107 106 # define BOOST_PP_DEC_108 107 # define BOOST_PP_DEC_109 108 # define BOOST_PP_DEC_110 109 # define BOOST_PP_DEC_111 110 # define BOOST_PP_DEC_112 111 # define BOOST_PP_DEC_113 112 # define BOOST_PP_DEC_114 113 # define BOOST_PP_DEC_115 114 # define BOOST_PP_DEC_116 115 # define BOOST_PP_DEC_117 116 # define BOOST_PP_DEC_118 117 # define BOOST_PP_DEC_119 118 # define BOOST_PP_DEC_120 119 # define BOOST_PP_DEC_121 120 # define BOOST_PP_DEC_122 121 # define BOOST_PP_DEC_123 122 # define BOOST_PP_DEC_124 123 # define BOOST_PP_DEC_125 124 # define BOOST_PP_DEC_126 125 # define BOOST_PP_DEC_127 126 # define BOOST_PP_DEC_128 127 # define BOOST_PP_DEC_129 128 # define BOOST_PP_DEC_130 129 # define BOOST_PP_DEC_131 130 # define BOOST_PP_DEC_132 131 # define BOOST_PP_DEC_133 132 # define BOOST_PP_DEC_134 133 # define BOOST_PP_DEC_135 134 # define BOOST_PP_DEC_136 135 # define BOOST_PP_DEC_137 136 # define BOOST_PP_DEC_138 137 # define BOOST_PP_DEC_139 138 # define BOOST_PP_DEC_140 139 # define BOOST_PP_DEC_141 140 # define BOOST_PP_DEC_142 141 # define BOOST_PP_DEC_143 142 # define BOOST_PP_DEC_144 143 # define BOOST_PP_DEC_145 144 # define BOOST_PP_DEC_146 145 # define BOOST_PP_DEC_147 146 # define BOOST_PP_DEC_148 147 # define BOOST_PP_DEC_149 148 # define BOOST_PP_DEC_150 149 # define BOOST_PP_DEC_151 150 # define BOOST_PP_DEC_152 151 # define BOOST_PP_DEC_153 152 # define BOOST_PP_DEC_154 153 # define BOOST_PP_DEC_155 154 # define BOOST_PP_DEC_156 155 # define BOOST_PP_DEC_157 156 # define BOOST_PP_DEC_158 157 # define BOOST_PP_DEC_159 158 # define BOOST_PP_DEC_160 159 # define BOOST_PP_DEC_161 160 # define BOOST_PP_DEC_162 161 # define BOOST_PP_DEC_163 162 # define BOOST_PP_DEC_164 163 # define BOOST_PP_DEC_165 164 # define BOOST_PP_DEC_166 165 # define BOOST_PP_DEC_167 166 # define BOOST_PP_DEC_168 167 # define BOOST_PP_DEC_169 168 # define BOOST_PP_DEC_170 169 # define BOOST_PP_DEC_171 170 # define BOOST_PP_DEC_172 171 # define BOOST_PP_DEC_173 172 # define BOOST_PP_DEC_174 173 # define BOOST_PP_DEC_175 174 # define BOOST_PP_DEC_176 175 # define BOOST_PP_DEC_177 176 # define BOOST_PP_DEC_178 177 # define BOOST_PP_DEC_179 178 # define BOOST_PP_DEC_180 179 # define BOOST_PP_DEC_181 180 # define BOOST_PP_DEC_182 181 # define BOOST_PP_DEC_183 182 # define BOOST_PP_DEC_184 183 # define BOOST_PP_DEC_185 184 # define BOOST_PP_DEC_186 185 # define BOOST_PP_DEC_187 186 # define BOOST_PP_DEC_188 187 # define BOOST_PP_DEC_189 188 # define BOOST_PP_DEC_190 189 # define BOOST_PP_DEC_191 190 # define BOOST_PP_DEC_192 191 # define BOOST_PP_DEC_193 192 # define BOOST_PP_DEC_194 193 # define BOOST_PP_DEC_195 194 # define BOOST_PP_DEC_196 195 # define BOOST_PP_DEC_197 196 # define BOOST_PP_DEC_198 197 # define BOOST_PP_DEC_199 198 # define BOOST_PP_DEC_200 199 # define BOOST_PP_DEC_201 200 # define BOOST_PP_DEC_202 201 # define BOOST_PP_DEC_203 202 # define BOOST_PP_DEC_204 203 # define BOOST_PP_DEC_205 204 # define BOOST_PP_DEC_206 205 # define BOOST_PP_DEC_207 206 # define BOOST_PP_DEC_208 207 # define BOOST_PP_DEC_209 208 # define BOOST_PP_DEC_210 209 # define BOOST_PP_DEC_211 210 # define BOOST_PP_DEC_212 211 # define BOOST_PP_DEC_213 212 # define BOOST_PP_DEC_214 213 # define BOOST_PP_DEC_215 214 # define BOOST_PP_DEC_216 215 # define BOOST_PP_DEC_217 216 # define BOOST_PP_DEC_218 217 # define BOOST_PP_DEC_219 218 # define BOOST_PP_DEC_220 219 # define BOOST_PP_DEC_221 220 # define BOOST_PP_DEC_222 221 # define BOOST_PP_DEC_223 222 # define BOOST_PP_DEC_224 223 # define BOOST_PP_DEC_225 224 # define BOOST_PP_DEC_226 225 # define BOOST_PP_DEC_227 226 # define BOOST_PP_DEC_228 227 # define BOOST_PP_DEC_229 228 # define BOOST_PP_DEC_230 229 # define BOOST_PP_DEC_231 230 # define BOOST_PP_DEC_232 231 # define BOOST_PP_DEC_233 232 # define BOOST_PP_DEC_234 233 # define BOOST_PP_DEC_235 234 # define BOOST_PP_DEC_236 235 # define BOOST_PP_DEC_237 236 # define BOOST_PP_DEC_238 237 # define BOOST_PP_DEC_239 238 # define BOOST_PP_DEC_240 239 # define BOOST_PP_DEC_241 240 # define BOOST_PP_DEC_242 241 # define BOOST_PP_DEC_243 242 # define BOOST_PP_DEC_244 243 # define BOOST_PP_DEC_245 244 # define BOOST_PP_DEC_246 245 # define BOOST_PP_DEC_247 246 # define BOOST_PP_DEC_248 247 # define BOOST_PP_DEC_249 248 # define BOOST_PP_DEC_250 249 # define BOOST_PP_DEC_251 250 # define BOOST_PP_DEC_252 251 # define BOOST_PP_DEC_253 252 # define BOOST_PP_DEC_254 253 # define BOOST_PP_DEC_255 254 # define BOOST_PP_DEC_256 255 # # endif passenger-4.0.37/ext/boost/preprocessor/arithmetic/inc.hpp000644 000765 000024 00000020151 12233035540 024302 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARITHMETIC_INC_HPP # define BOOST_PREPROCESSOR_ARITHMETIC_INC_HPP # # include # # /* BOOST_PP_INC */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_INC(x) BOOST_PP_INC_I(x) # else # define BOOST_PP_INC(x) BOOST_PP_INC_OO((x)) # define BOOST_PP_INC_OO(par) BOOST_PP_INC_I ## par # endif # # define BOOST_PP_INC_I(x) BOOST_PP_INC_ ## x # # define BOOST_PP_INC_0 1 # define BOOST_PP_INC_1 2 # define BOOST_PP_INC_2 3 # define BOOST_PP_INC_3 4 # define BOOST_PP_INC_4 5 # define BOOST_PP_INC_5 6 # define BOOST_PP_INC_6 7 # define BOOST_PP_INC_7 8 # define BOOST_PP_INC_8 9 # define BOOST_PP_INC_9 10 # define BOOST_PP_INC_10 11 # define BOOST_PP_INC_11 12 # define BOOST_PP_INC_12 13 # define BOOST_PP_INC_13 14 # define BOOST_PP_INC_14 15 # define BOOST_PP_INC_15 16 # define BOOST_PP_INC_16 17 # define BOOST_PP_INC_17 18 # define BOOST_PP_INC_18 19 # define BOOST_PP_INC_19 20 # define BOOST_PP_INC_20 21 # define BOOST_PP_INC_21 22 # define BOOST_PP_INC_22 23 # define BOOST_PP_INC_23 24 # define BOOST_PP_INC_24 25 # define BOOST_PP_INC_25 26 # define BOOST_PP_INC_26 27 # define BOOST_PP_INC_27 28 # define BOOST_PP_INC_28 29 # define BOOST_PP_INC_29 30 # define BOOST_PP_INC_30 31 # define BOOST_PP_INC_31 32 # define BOOST_PP_INC_32 33 # define BOOST_PP_INC_33 34 # define BOOST_PP_INC_34 35 # define BOOST_PP_INC_35 36 # define BOOST_PP_INC_36 37 # define BOOST_PP_INC_37 38 # define BOOST_PP_INC_38 39 # define BOOST_PP_INC_39 40 # define BOOST_PP_INC_40 41 # define BOOST_PP_INC_41 42 # define BOOST_PP_INC_42 43 # define BOOST_PP_INC_43 44 # define BOOST_PP_INC_44 45 # define BOOST_PP_INC_45 46 # define BOOST_PP_INC_46 47 # define BOOST_PP_INC_47 48 # define BOOST_PP_INC_48 49 # define BOOST_PP_INC_49 50 # define BOOST_PP_INC_50 51 # define BOOST_PP_INC_51 52 # define BOOST_PP_INC_52 53 # define BOOST_PP_INC_53 54 # define BOOST_PP_INC_54 55 # define BOOST_PP_INC_55 56 # define BOOST_PP_INC_56 57 # define BOOST_PP_INC_57 58 # define BOOST_PP_INC_58 59 # define BOOST_PP_INC_59 60 # define BOOST_PP_INC_60 61 # define BOOST_PP_INC_61 62 # define BOOST_PP_INC_62 63 # define BOOST_PP_INC_63 64 # define BOOST_PP_INC_64 65 # define BOOST_PP_INC_65 66 # define BOOST_PP_INC_66 67 # define BOOST_PP_INC_67 68 # define BOOST_PP_INC_68 69 # define BOOST_PP_INC_69 70 # define BOOST_PP_INC_70 71 # define BOOST_PP_INC_71 72 # define BOOST_PP_INC_72 73 # define BOOST_PP_INC_73 74 # define BOOST_PP_INC_74 75 # define BOOST_PP_INC_75 76 # define BOOST_PP_INC_76 77 # define BOOST_PP_INC_77 78 # define BOOST_PP_INC_78 79 # define BOOST_PP_INC_79 80 # define BOOST_PP_INC_80 81 # define BOOST_PP_INC_81 82 # define BOOST_PP_INC_82 83 # define BOOST_PP_INC_83 84 # define BOOST_PP_INC_84 85 # define BOOST_PP_INC_85 86 # define BOOST_PP_INC_86 87 # define BOOST_PP_INC_87 88 # define BOOST_PP_INC_88 89 # define BOOST_PP_INC_89 90 # define BOOST_PP_INC_90 91 # define BOOST_PP_INC_91 92 # define BOOST_PP_INC_92 93 # define BOOST_PP_INC_93 94 # define BOOST_PP_INC_94 95 # define BOOST_PP_INC_95 96 # define BOOST_PP_INC_96 97 # define BOOST_PP_INC_97 98 # define BOOST_PP_INC_98 99 # define BOOST_PP_INC_99 100 # define BOOST_PP_INC_100 101 # define BOOST_PP_INC_101 102 # define BOOST_PP_INC_102 103 # define BOOST_PP_INC_103 104 # define BOOST_PP_INC_104 105 # define BOOST_PP_INC_105 106 # define BOOST_PP_INC_106 107 # define BOOST_PP_INC_107 108 # define BOOST_PP_INC_108 109 # define BOOST_PP_INC_109 110 # define BOOST_PP_INC_110 111 # define BOOST_PP_INC_111 112 # define BOOST_PP_INC_112 113 # define BOOST_PP_INC_113 114 # define BOOST_PP_INC_114 115 # define BOOST_PP_INC_115 116 # define BOOST_PP_INC_116 117 # define BOOST_PP_INC_117 118 # define BOOST_PP_INC_118 119 # define BOOST_PP_INC_119 120 # define BOOST_PP_INC_120 121 # define BOOST_PP_INC_121 122 # define BOOST_PP_INC_122 123 # define BOOST_PP_INC_123 124 # define BOOST_PP_INC_124 125 # define BOOST_PP_INC_125 126 # define BOOST_PP_INC_126 127 # define BOOST_PP_INC_127 128 # define BOOST_PP_INC_128 129 # define BOOST_PP_INC_129 130 # define BOOST_PP_INC_130 131 # define BOOST_PP_INC_131 132 # define BOOST_PP_INC_132 133 # define BOOST_PP_INC_133 134 # define BOOST_PP_INC_134 135 # define BOOST_PP_INC_135 136 # define BOOST_PP_INC_136 137 # define BOOST_PP_INC_137 138 # define BOOST_PP_INC_138 139 # define BOOST_PP_INC_139 140 # define BOOST_PP_INC_140 141 # define BOOST_PP_INC_141 142 # define BOOST_PP_INC_142 143 # define BOOST_PP_INC_143 144 # define BOOST_PP_INC_144 145 # define BOOST_PP_INC_145 146 # define BOOST_PP_INC_146 147 # define BOOST_PP_INC_147 148 # define BOOST_PP_INC_148 149 # define BOOST_PP_INC_149 150 # define BOOST_PP_INC_150 151 # define BOOST_PP_INC_151 152 # define BOOST_PP_INC_152 153 # define BOOST_PP_INC_153 154 # define BOOST_PP_INC_154 155 # define BOOST_PP_INC_155 156 # define BOOST_PP_INC_156 157 # define BOOST_PP_INC_157 158 # define BOOST_PP_INC_158 159 # define BOOST_PP_INC_159 160 # define BOOST_PP_INC_160 161 # define BOOST_PP_INC_161 162 # define BOOST_PP_INC_162 163 # define BOOST_PP_INC_163 164 # define BOOST_PP_INC_164 165 # define BOOST_PP_INC_165 166 # define BOOST_PP_INC_166 167 # define BOOST_PP_INC_167 168 # define BOOST_PP_INC_168 169 # define BOOST_PP_INC_169 170 # define BOOST_PP_INC_170 171 # define BOOST_PP_INC_171 172 # define BOOST_PP_INC_172 173 # define BOOST_PP_INC_173 174 # define BOOST_PP_INC_174 175 # define BOOST_PP_INC_175 176 # define BOOST_PP_INC_176 177 # define BOOST_PP_INC_177 178 # define BOOST_PP_INC_178 179 # define BOOST_PP_INC_179 180 # define BOOST_PP_INC_180 181 # define BOOST_PP_INC_181 182 # define BOOST_PP_INC_182 183 # define BOOST_PP_INC_183 184 # define BOOST_PP_INC_184 185 # define BOOST_PP_INC_185 186 # define BOOST_PP_INC_186 187 # define BOOST_PP_INC_187 188 # define BOOST_PP_INC_188 189 # define BOOST_PP_INC_189 190 # define BOOST_PP_INC_190 191 # define BOOST_PP_INC_191 192 # define BOOST_PP_INC_192 193 # define BOOST_PP_INC_193 194 # define BOOST_PP_INC_194 195 # define BOOST_PP_INC_195 196 # define BOOST_PP_INC_196 197 # define BOOST_PP_INC_197 198 # define BOOST_PP_INC_198 199 # define BOOST_PP_INC_199 200 # define BOOST_PP_INC_200 201 # define BOOST_PP_INC_201 202 # define BOOST_PP_INC_202 203 # define BOOST_PP_INC_203 204 # define BOOST_PP_INC_204 205 # define BOOST_PP_INC_205 206 # define BOOST_PP_INC_206 207 # define BOOST_PP_INC_207 208 # define BOOST_PP_INC_208 209 # define BOOST_PP_INC_209 210 # define BOOST_PP_INC_210 211 # define BOOST_PP_INC_211 212 # define BOOST_PP_INC_212 213 # define BOOST_PP_INC_213 214 # define BOOST_PP_INC_214 215 # define BOOST_PP_INC_215 216 # define BOOST_PP_INC_216 217 # define BOOST_PP_INC_217 218 # define BOOST_PP_INC_218 219 # define BOOST_PP_INC_219 220 # define BOOST_PP_INC_220 221 # define BOOST_PP_INC_221 222 # define BOOST_PP_INC_222 223 # define BOOST_PP_INC_223 224 # define BOOST_PP_INC_224 225 # define BOOST_PP_INC_225 226 # define BOOST_PP_INC_226 227 # define BOOST_PP_INC_227 228 # define BOOST_PP_INC_228 229 # define BOOST_PP_INC_229 230 # define BOOST_PP_INC_230 231 # define BOOST_PP_INC_231 232 # define BOOST_PP_INC_232 233 # define BOOST_PP_INC_233 234 # define BOOST_PP_INC_234 235 # define BOOST_PP_INC_235 236 # define BOOST_PP_INC_236 237 # define BOOST_PP_INC_237 238 # define BOOST_PP_INC_238 239 # define BOOST_PP_INC_239 240 # define BOOST_PP_INC_240 241 # define BOOST_PP_INC_241 242 # define BOOST_PP_INC_242 243 # define BOOST_PP_INC_243 244 # define BOOST_PP_INC_244 245 # define BOOST_PP_INC_245 246 # define BOOST_PP_INC_246 247 # define BOOST_PP_INC_247 248 # define BOOST_PP_INC_248 249 # define BOOST_PP_INC_249 250 # define BOOST_PP_INC_250 251 # define BOOST_PP_INC_251 252 # define BOOST_PP_INC_252 253 # define BOOST_PP_INC_253 254 # define BOOST_PP_INC_254 255 # define BOOST_PP_INC_255 256 # define BOOST_PP_INC_256 256 # # endif passenger-4.0.37/ext/boost/preprocessor/arithmetic/sub.hpp000644 000765 000024 00000003420 12233035540 024322 0ustar00honglistaff000000 000000 # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP # define BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP # # include # include # include # include # # /* BOOST_PP_SUB */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SUB(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) # else # define BOOST_PP_SUB(x, y) BOOST_PP_SUB_I(x, y) # define BOOST_PP_SUB_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) # endif # # define BOOST_PP_SUB_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I xy # else # define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I(BOOST_PP_TUPLE_ELEM(2, 0, xy), BOOST_PP_TUPLE_ELEM(2, 1, xy)) # endif # # define BOOST_PP_SUB_O_I(x, y) (BOOST_PP_DEC(x), BOOST_PP_DEC(y)) # # /* BOOST_PP_SUB_D */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SUB_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) # else # define BOOST_PP_SUB_D(d, x, y) BOOST_PP_SUB_D_I(d, x, y) # define BOOST_PP_SUB_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) # endif # # endif passenger-4.0.37/ext/boost/optional/optional.hpp000644 000765 000024 00000075201 12233035540 022332 0ustar00honglistaff000000 000000 // Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/optional for documentation. // // You are welcome to contact the author at: // fernando_cacciola@hotmail.com // // Revisions: // 27 Apr 2008 (improved swap) Fernando Cacciola, Niels Dekker, Thorsten Ottosen // #ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP #define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if BOOST_WORKAROUND(BOOST_MSVC, == 1200) // VC6.0 has the following bug: // When a templated assignment operator exist, an implicit conversion // constructing an optional is used when assigment of the form: // optional opt ; opt = T(...); // is compiled. // However, optional's ctor is _explicit_ and the assignemt shouldn't compile. // Therefore, for VC6.0 templated assignment is disabled. // #define BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT #endif #if BOOST_WORKAROUND(BOOST_MSVC, == 1300) // VC7.0 has the following bug: // When both a non-template and a template copy-ctor exist // and the templated version is made 'explicit', the explicit is also // given to the non-templated version, making the class non-implicitely-copyable. // #define BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR #endif #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION,<=700) // AFAICT only VC7.1 correctly resolves the overload set // that includes the in-place factory taking functions, // so for the other VC versions, in-place factory support // is disabled #define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT #endif #if BOOST_WORKAROUND(__BORLANDC__, <= 0x551) // BCB (5.5.1) cannot parse the nested template struct in an inplace factory. #define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT #endif #if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) \ && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581) ) // BCB (up to 5.64) has the following bug: // If there is a member function/operator template of the form // template mfunc( Expr expr ) ; // some calls are resolved to this even if there are other better matches. // The effect of this bug is that calls to converting ctors and assignments // are incrorrectly sink to this general catch-all member function template as shown above. #define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION #endif #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) > 302 \ && !defined(__INTEL_COMPILER) // GCC since 3.3 has may_alias attribute that helps to alleviate optimizer issues with // regard to violation of the strict aliasing rules. The optional< T > storage type is marked // with this attribute in order to let the compiler know that it will alias objects of type T // and silence compilation warnings. #define BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS #endif // Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<> // member template of a factory as used in the optional<> implementation. // He proposed this simple fix which is to move the call to apply<> outside // namespace boost. namespace boost_optional_detail { template inline void construct(Factory const& factory, void* address) { factory.BOOST_NESTED_TEMPLATE apply(address); } } namespace boost { class in_place_factory_base ; class typed_in_place_factory_base ; // This forward is needed to refer to namespace scope swap from the member swap template void swap ( optional& x, optional& y ); namespace optional_detail { // This local class is used instead of that in "aligned_storage.hpp" // because I've found the 'official' class to ICE BCB5.5 // when some types are used with optional<> // (due to sizeof() passed down as a non-type template parameter) template class aligned_storage { // Borland ICEs if unnamed unions are used for this! union // This works around GCC warnings about breaking strict aliasing rules when casting storage address to T* #if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS) __attribute__((may_alias)) #endif dummy_u { char data[ sizeof(T) ]; BOOST_DEDUCED_TYPENAME type_with_alignment< ::boost::alignment_of::value >::type aligner_; } dummy_ ; public: #if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS) void const* address() const { return &dummy_; } void * address() { return &dummy_; } #else void const* address() const { return dummy_.data; } void * address() { return dummy_.data; } #endif } ; template struct types_when_isnt_ref { typedef T const& reference_const_type ; typedef T & reference_type ; typedef T const* pointer_const_type ; typedef T * pointer_type ; typedef T const& argument_type ; } ; template struct types_when_is_ref { typedef BOOST_DEDUCED_TYPENAME remove_reference::type raw_type ; typedef raw_type& reference_const_type ; typedef raw_type& reference_type ; typedef raw_type* pointer_const_type ; typedef raw_type* pointer_type ; typedef raw_type& argument_type ; } ; struct optional_tag {} ; template class optional_base : public optional_tag { private : typedef #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) BOOST_DEDUCED_TYPENAME #endif ::boost::detail::make_reference_content::type internal_type ; typedef aligned_storage storage_type ; typedef types_when_isnt_ref types_when_not_ref ; typedef types_when_is_ref types_when_ref ; typedef optional_base this_type ; protected : typedef T value_type ; typedef mpl::true_ is_reference_tag ; typedef mpl::false_ is_not_reference_tag ; typedef BOOST_DEDUCED_TYPENAME is_reference::type is_reference_predicate ; public: typedef BOOST_DEDUCED_TYPENAME mpl::if_::type types ; protected: typedef bool (this_type::*unspecified_bool_type)() const; typedef BOOST_DEDUCED_TYPENAME types::reference_type reference_type ; typedef BOOST_DEDUCED_TYPENAME types::reference_const_type reference_const_type ; typedef BOOST_DEDUCED_TYPENAME types::pointer_type pointer_type ; typedef BOOST_DEDUCED_TYPENAME types::pointer_const_type pointer_const_type ; typedef BOOST_DEDUCED_TYPENAME types::argument_type argument_type ; // Creates an optional uninitialized. // No-throw optional_base() : m_initialized(false) {} // Creates an optional uninitialized. // No-throw optional_base ( none_t ) : m_initialized(false) {} // Creates an optional initialized with 'val'. // Can throw if T::T(T const&) does optional_base ( argument_type val ) : m_initialized(false) { construct(val); } // Creates an optional initialized with 'val' IFF cond is true, otherwise creates an uninitialzed optional. // Can throw if T::T(T const&) does optional_base ( bool cond, argument_type val ) : m_initialized(false) { if ( cond ) construct(val); } // Creates a deep copy of another optional // Can throw if T::T(T const&) does optional_base ( optional_base const& rhs ) : m_initialized(false) { if ( rhs.is_initialized() ) construct(rhs.get_impl()); } // This is used for both converting and in-place constructions. // Derived classes use the 'tag' to select the appropriate // implementation (the correct 'construct()' overload) template explicit optional_base ( Expr const& expr, Expr const* tag ) : m_initialized(false) { construct(expr,tag); } // No-throw (assuming T::~T() doesn't) ~optional_base() { destroy() ; } // Assigns from another optional (deep-copies the rhs value) void assign ( optional_base const& rhs ) { if (is_initialized()) { if ( rhs.is_initialized() ) assign_value(rhs.get_impl(), is_reference_predicate() ); else destroy(); } else { if ( rhs.is_initialized() ) construct(rhs.get_impl()); } } // Assigns from another _convertible_ optional (deep-copies the rhs value) template void assign ( optional const& rhs ) { if (is_initialized()) { if ( rhs.is_initialized() ) assign_value(static_cast(rhs.get()), is_reference_predicate() ); else destroy(); } else { if ( rhs.is_initialized() ) construct(static_cast(rhs.get())); } } // Assigns from a T (deep-copies the rhs value) void assign ( argument_type val ) { if (is_initialized()) assign_value(val, is_reference_predicate() ); else construct(val); } // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED // No-throw (assuming T::~T() doesn't) void assign ( none_t ) { destroy(); } #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT template void assign_expr ( Expr const& expr, Expr const* tag ) { if (is_initialized()) assign_expr_to_initialized(expr,tag); else construct(expr,tag); } #endif public : // Destroys the current value, if any, leaving this UNINITIALIZED // No-throw (assuming T::~T() doesn't) void reset() { destroy(); } // Replaces the current value -if any- with 'val' void reset ( argument_type val ) { assign(val); } // Returns a pointer to the value if this is initialized, otherwise, // returns NULL. // No-throw pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; } pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; } bool is_initialized() const { return m_initialized ; } protected : void construct ( argument_type val ) { new (m_storage.address()) internal_type(val) ; m_initialized = true ; } #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT // Constructs in-place using the given factory template void construct ( Expr const& factory, in_place_factory_base const* ) { BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; boost_optional_detail::construct(factory, m_storage.address()); m_initialized = true ; } // Constructs in-place using the given typed factory template void construct ( Expr const& factory, typed_in_place_factory_base const* ) { BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; factory.apply(m_storage.address()) ; m_initialized = true ; } template void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag ) { destroy(); construct(factory,tag); } // Constructs in-place using the given typed factory template void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag ) { destroy(); construct(factory,tag); } #endif // Constructs using any expression implicitely convertible to the single argument // of a one-argument T constructor. // Converting constructions of optional from optional uses this function with // 'Expr' being of type 'U' and relying on a converting constructor of T from U. template void construct ( Expr const& expr, void const* ) { new (m_storage.address()) internal_type(expr) ; m_initialized = true ; } // Assigns using a form any expression implicitely convertible to the single argument // of a T's assignment operator. // Converting assignments of optional from optional uses this function with // 'Expr' being of type 'U' and relying on a converting assignment of T from U. template void assign_expr_to_initialized ( Expr const& expr, void const* ) { assign_value(expr, is_reference_predicate()); } #ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION // BCB5.64 (and probably lower versions) workaround. // The in-place factories are supported by means of catch-all constructors // and assignment operators (the functions are parameterized in terms of // an arbitrary 'Expr' type) // This compiler incorrectly resolves the overload set and sinks optional and optional // to the 'Expr'-taking functions even though explicit overloads are present for them. // Thus, the following overload is needed to properly handle the case when the 'lhs' // is another optional. // // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error // instead of choosing the wrong overload // // Notice that 'Expr' will be optional or optional (but not optional_base<..>) template void construct ( Expr const& expr, optional_tag const* ) { if ( expr.is_initialized() ) { // An exception can be thrown here. // It it happens, THIS will be left uninitialized. new (m_storage.address()) internal_type(expr.get()) ; m_initialized = true ; } } #endif void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; } void assign_value ( argument_type val, is_reference_tag ) { construct(val); } void destroy() { if ( m_initialized ) destroy_impl(is_reference_predicate()) ; } unspecified_bool_type safe_bool() const { return m_initialized ? &this_type::is_initialized : 0 ; } reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; } reference_type get_impl() { return dereference(get_object(), is_reference_predicate() ) ; } pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; } pointer_type get_ptr_impl() { return cast_ptr(get_object(), is_reference_predicate() ) ; } private : // internal_type can be either T or reference_content #if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS) // This workaround is supposed to silence GCC warnings about broken strict aliasing rules internal_type const* get_object() const { union { void const* ap_pvoid; internal_type const* as_ptype; } caster = { m_storage.address() }; return caster.as_ptype; } internal_type * get_object() { union { void* ap_pvoid; internal_type* as_ptype; } caster = { m_storage.address() }; return caster.as_ptype; } #else internal_type const* get_object() const { return static_cast(m_storage.address()); } internal_type * get_object() { return static_cast (m_storage.address()); } #endif // reference_content lacks an implicit conversion to T&, so the following is needed to obtain a proper reference. reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; } reference_type dereference( internal_type* p, is_not_reference_tag ) { return *p ; } reference_const_type dereference( internal_type const* p, is_reference_tag ) const { return p->get() ; } reference_type dereference( internal_type* p, is_reference_tag ) { return p->get() ; } #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581)) void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; } #else void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->T::~T() ; m_initialized = false ; } #endif void destroy_impl ( is_reference_tag ) { m_initialized = false ; } // If T is of reference type, trying to get a pointer to the held value must result in a compile-time error. // Decent compilers should disallow conversions from reference_content* to T*, but just in case, // the following olverloads are used to filter out the case and guarantee an error in case of T being a reference. pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; } pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; } pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; } pointer_type cast_ptr( internal_type * p, is_reference_tag ) { return &p->get() ; } bool m_initialized ; storage_type m_storage ; } ; } // namespace optional_detail template class optional : public optional_detail::optional_base { typedef optional_detail::optional_base base ; typedef BOOST_DEDUCED_TYPENAME base::unspecified_bool_type unspecified_bool_type ; public : typedef optional this_type ; typedef BOOST_DEDUCED_TYPENAME base::value_type value_type ; typedef BOOST_DEDUCED_TYPENAME base::reference_type reference_type ; typedef BOOST_DEDUCED_TYPENAME base::reference_const_type reference_const_type ; typedef BOOST_DEDUCED_TYPENAME base::pointer_type pointer_type ; typedef BOOST_DEDUCED_TYPENAME base::pointer_const_type pointer_const_type ; typedef BOOST_DEDUCED_TYPENAME base::argument_type argument_type ; // Creates an optional uninitialized. // No-throw optional() : base() {} // Creates an optional uninitialized. // No-throw optional( none_t none_ ) : base(none_) {} // Creates an optional initialized with 'val'. // Can throw if T::T(T const&) does optional ( argument_type val ) : base(val) {} // Creates an optional initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional. // Can throw if T::T(T const&) does optional ( bool cond, argument_type val ) : base(cond,val) {} #ifndef BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR // NOTE: MSVC needs templated versions first // Creates a deep copy of another convertible optional // Requires a valid conversion from U to T. // Can throw if T::T(U const&) does template explicit optional ( optional const& rhs ) : base() { if ( rhs.is_initialized() ) this->construct(rhs.get()); } #endif #ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT // Creates an optional with an expression which can be either // (a) An instance of InPlaceFactory (i.e. in_place(a,b,...,n); // (b) An instance of TypedInPlaceFactory ( i.e. in_place(a,b,...,n); // (c) Any expression implicitely convertible to the single type // of a one-argument T's constructor. // (d*) Weak compilers (BCB) might also resolved Expr as optional and optional // even though explicit overloads are present for these. // Depending on the above some T ctor is called. // Can throw is the resolved T ctor throws. template explicit optional ( Expr const& expr ) : base(expr,boost::addressof(expr)) {} #endif // Creates a deep copy of another optional // Can throw if T::T(T const&) does optional ( optional const& rhs ) : base( static_cast(rhs) ) {} // No-throw (assuming T::~T() doesn't) ~optional() {} #if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION) // Assigns from an expression. See corresponding constructor. // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED template optional& operator= ( Expr const& expr ) { this->assign_expr(expr,boost::addressof(expr)); return *this ; } #endif #ifndef BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT // Assigns from another convertible optional (converts && deep-copies the rhs value) // Requires a valid conversion from U to T. // Basic Guarantee: If T::T( U const& ) throws, this is left UNINITIALIZED template optional& operator= ( optional const& rhs ) { this->assign(rhs); return *this ; } #endif // Assigns from another optional (deep-copies the rhs value) // Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED // (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw) optional& operator= ( optional const& rhs ) { this->assign( static_cast(rhs) ) ; return *this ; } // Assigns from a T (deep-copies the rhs value) // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED optional& operator= ( argument_type val ) { this->assign( val ) ; return *this ; } // Assigns from a "none" // Which destroys the current value, if any, leaving this UNINITIALIZED // No-throw (assuming T::~T() doesn't) optional& operator= ( none_t none_ ) { this->assign( none_ ) ; return *this ; } void swap( optional & arg ) { // allow for Koenig lookup using boost::swap; swap(*this, arg); } // Returns a reference to the value if this is initialized, otherwise, // the behaviour is UNDEFINED // No-throw reference_const_type get() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); } reference_type get() { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); } // Returns a copy of the value if this is initialized, 'v' otherwise reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; } reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; } // Returns a pointer to the value if this is initialized, otherwise, // the behaviour is UNDEFINED // No-throw pointer_const_type operator->() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; } pointer_type operator->() { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; } // Returns a reference to the value if this is initialized, otherwise, // the behaviour is UNDEFINED // No-throw reference_const_type operator *() const { return this->get() ; } reference_type operator *() { return this->get() ; } // implicit conversion to "bool" // No-throw operator unspecified_bool_type() const { return this->safe_bool() ; } // This is provided for those compilers which don't like the conversion to bool // on some contexts. bool operator!() const { return !this->is_initialized() ; } } ; // Returns optional(v) template inline optional make_optional ( T const& v ) { return optional(v); } // Returns optional(cond,v) template inline optional make_optional ( bool cond, T const& v ) { return optional(cond,v); } // Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED. // No-throw template inline BOOST_DEDUCED_TYPENAME optional::reference_const_type get ( optional const& opt ) { return opt.get() ; } template inline BOOST_DEDUCED_TYPENAME optional::reference_type get ( optional& opt ) { return opt.get() ; } // Returns a pointer to the value if this is initialized, otherwise, returns NULL. // No-throw template inline BOOST_DEDUCED_TYPENAME optional::pointer_const_type get ( optional const* opt ) { return opt->get_ptr() ; } template inline BOOST_DEDUCED_TYPENAME optional::pointer_type get ( optional* opt ) { return opt->get_ptr() ; } // Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED. // No-throw template inline BOOST_DEDUCED_TYPENAME optional::reference_const_type get_optional_value_or ( optional const& opt, BOOST_DEDUCED_TYPENAME optional::reference_const_type v ) { return opt.get_value_or(v) ; } template inline BOOST_DEDUCED_TYPENAME optional::reference_type get_optional_value_or ( optional& opt, BOOST_DEDUCED_TYPENAME optional::reference_type v ) { return opt.get_value_or(v) ; } // Returns a pointer to the value if this is initialized, otherwise, returns NULL. // No-throw template inline BOOST_DEDUCED_TYPENAME optional::pointer_const_type get_pointer ( optional const& opt ) { return opt.get_ptr() ; } template inline BOOST_DEDUCED_TYPENAME optional::pointer_type get_pointer ( optional& opt ) { return opt.get_ptr() ; } // optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values). // WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead. // // optional vs optional cases // template inline bool operator == ( optional const& x, optional const& y ) { return equal_pointees(x,y); } template inline bool operator < ( optional const& x, optional const& y ) { return less_pointees(x,y); } template inline bool operator != ( optional const& x, optional const& y ) { return !( x == y ) ; } template inline bool operator > ( optional const& x, optional const& y ) { return y < x ; } template inline bool operator <= ( optional const& x, optional const& y ) { return !( y < x ) ; } template inline bool operator >= ( optional const& x, optional const& y ) { return !( x < y ) ; } // // optional vs T cases // template inline bool operator == ( optional const& x, T const& y ) { return equal_pointees(x, optional(y)); } template inline bool operator < ( optional const& x, T const& y ) { return less_pointees(x, optional(y)); } template inline bool operator != ( optional const& x, T const& y ) { return !( x == y ) ; } template inline bool operator > ( optional const& x, T const& y ) { return y < x ; } template inline bool operator <= ( optional const& x, T const& y ) { return !( y < x ) ; } template inline bool operator >= ( optional const& x, T const& y ) { return !( x < y ) ; } // // T vs optional cases // template inline bool operator == ( T const& x, optional const& y ) { return equal_pointees( optional(x), y ); } template inline bool operator < ( T const& x, optional const& y ) { return less_pointees( optional(x), y ); } template inline bool operator != ( T const& x, optional const& y ) { return !( x == y ) ; } template inline bool operator > ( T const& x, optional const& y ) { return y < x ; } template inline bool operator <= ( T const& x, optional const& y ) { return !( y < x ) ; } template inline bool operator >= ( T const& x, optional const& y ) { return !( x < y ) ; } // // optional vs none cases // template inline bool operator == ( optional const& x, none_t ) { return equal_pointees(x, optional() ); } template inline bool operator < ( optional const& x, none_t ) { return less_pointees(x,optional() ); } template inline bool operator != ( optional const& x, none_t y ) { return !( x == y ) ; } template inline bool operator > ( optional const& x, none_t y ) { return y < x ; } template inline bool operator <= ( optional const& x, none_t y ) { return !( y < x ) ; } template inline bool operator >= ( optional const& x, none_t y ) { return !( x < y ) ; } // // none vs optional cases // template inline bool operator == ( none_t , optional const& y ) { return equal_pointees(optional() ,y); } template inline bool operator < ( none_t , optional const& y ) { return less_pointees(optional() ,y); } template inline bool operator != ( none_t x, optional const& y ) { return !( x == y ) ; } template inline bool operator > ( none_t x, optional const& y ) { return y < x ; } template inline bool operator <= ( none_t x, optional const& y ) { return !( y < x ) ; } template inline bool operator >= ( none_t x, optional const& y ) { return !( x < y ) ; } namespace optional_detail { template struct swap_selector; template<> struct swap_selector { template static void optional_swap ( optional& x, optional& y ) { const bool hasX = !!x; const bool hasY = !!y; if ( !hasX && !hasY ) return; if( !hasX ) x = boost::in_place(); else if ( !hasY ) y = boost::in_place(); // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers boost::swap(x.get(),y.get()); if( !hasX ) y = boost::none ; else if( !hasY ) x = boost::none ; } }; template<> struct swap_selector { template static void optional_swap ( optional& x, optional& y ) { const bool hasX = !!x; const bool hasY = !!y; if ( !hasX && hasY ) { x = y.get(); y = boost::none ; } else if ( hasX && !hasY ) { y = x.get(); x = boost::none ; } else if ( hasX && hasY ) { // Boost.Utility.Swap will take care of ADL and workarounds for broken compilers boost::swap(x.get(),y.get()); } } }; } // namespace optional_detail template struct optional_swap_should_use_default_constructor : has_nothrow_default_constructor {} ; template inline void swap ( optional& x, optional& y ) { optional_detail::swap_selector::value>::optional_swap(x, y); } } // namespace boost #endif passenger-4.0.37/ext/boost/optional/optional_fwd.hpp000644 000765 000024 00000001463 12233035540 023171 0ustar00honglistaff000000 000000 // Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal. // // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/optional for documentation. // // You are welcome to contact the author at: // fernando_cacciola@hotmail.com // // Revisions: // 10 May 2008 (added swap related forward declaration) Niels Dekker // #ifndef BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP #define BOOST_OPTIONAL_OPTIONAL_FWD_FLC_19NOV2002_HPP namespace boost { template class optional ; template void swap ( optional& , optional& ) ; template struct optional_swap_should_use_default_constructor ; } // namespace boost #endif passenger-4.0.37/ext/boost/numeric/conversion/000755 000765 000024 00000000000 12233035540 021771 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/numeric/conversion/bounds.hpp000644 000765 000024 00000001302 12233035540 023770 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_BOUNDS_12NOV2002_HPP #include "boost/numeric/conversion/detail/bounds.hpp" namespace boost { namespace numeric { template struct bounds : boundsdetail::get_impl::type {} ; } } // namespace boost::numeric #endif passenger-4.0.37/ext/boost/numeric/conversion/cast.hpp000644 000765 000024 00000004163 12233035540 023440 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // // // Revision History // // 19 Nov 2001 Syntatic changes as suggested by Darin Adler (Fernando Cacciola) // 08 Nov 2001 Fixes to accommodate MSVC (Fernando Cacciola) // 04 Nov 2001 Fixes to accommodate gcc2.92 (Fernando Cacciola) // 30 Oct 2001 Some fixes suggested by Daryle Walker (Fernando Cacciola) // 25 Oct 2001 Initial boostification (Fernando Cacciola) // 23 Jan 2004 Inital add to cvs (post review)s // 22 Jun 2011 Added support for specializing cast policies via numeric_cast_traits (Brandon Kohn). // #ifndef BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP #define BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP #include #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) # include #else #include #include #include namespace boost { template inline Target numeric_cast( Source arg ) { typedef numeric::conversion_traits conv_traits; typedef numeric::numeric_cast_traits cast_traits; typedef boost::numeric::converter < Target, Source, conv_traits, typename cast_traits::overflow_policy, typename cast_traits::rounding_policy, boost::numeric::raw_converter< conv_traits >, typename cast_traits::range_checking_policy > converter; return converter::convert(arg); } using numeric::bad_numeric_cast; } // namespace boost #endif #endif passenger-4.0.37/ext/boost/numeric/conversion/conversion_traits.hpp000644 000765 000024 00000002432 12233035540 026256 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_CONVERSION_TRAITS_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_CONVERSION_TRAITS_FLC_12NOV2002_HPP #include "boost/numeric/conversion/detail/conversion_traits.hpp" #include "boost/detail/workaround.hpp" #include "boost/config.hpp" namespace boost { namespace numeric { template struct conversion_traits : convdetail::get_conversion_traits::type { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) typedef typename convdetail::get_conversion_traits::type base_; typedef typename base_::target_type target_type; typedef typename base_::source_type source_type; typedef typename base_::result_type result_type; typedef typename base_::argument_type argument_type; #endif } ; } } // namespace boost::numeric #endif // /////////////////////////////////////////////////////////////////////////////////////////////// passenger-4.0.37/ext/boost/numeric/conversion/converter.hpp000644 000765 000024 00000004277 12233035540 024523 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_CONVERTER_FLC_12NOV2002_HPP #include "boost/numeric/conversion/conversion_traits.hpp" #include "boost/numeric/conversion/converter_policies.hpp" #include "boost/numeric/conversion/detail/converter.hpp" namespace boost { namespace numeric { template, class OverflowHandler = def_overflow_handler, class Float2IntRounder = Trunc< BOOST_DEDUCED_TYPENAME Traits::source_type> , class RawConverter = raw_converter, class UserRangeChecker = UseInternalRangeChecker > struct converter : convdetail::get_converter_impl::type { typedef Traits traits ; typedef typename Traits::argument_type argument_type ; typedef typename Traits::result_type result_type ; result_type operator() ( argument_type s ) const { return this->convert(s) ; } } ; template , class UserRangeChecker = UseInternalRangeChecker > struct make_converter_from { template, class RawConverter = raw_converter > struct to { typedef converter type ; } ; } ; } } // namespace boost::numeric #endif passenger-4.0.37/ext/boost/numeric/conversion/converter_policies.hpp000644 000765 000024 00000010566 12233035540 026410 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_CONVERTER_POLICIES_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_CONVERTER_POLICIES_FLC_12NOV2002_HPP #include // for std::bad_cast #include // for std::floor and std::ceil #include #include #include "boost/type_traits/is_arithmetic.hpp" #include "boost/mpl/if.hpp" #include "boost/mpl/integral_c.hpp" namespace boost { namespace numeric { template struct Trunc { typedef S source_type ; typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; static source_type nearbyint ( argument_type s ) { #if !defined(BOOST_NO_STDC_NAMESPACE) using std::floor ; using std::ceil ; #endif return s < static_cast(0) ? ceil(s) : floor(s) ; } typedef mpl::integral_c< std::float_round_style, std::round_toward_zero> round_style ; } ; template struct Floor { typedef S source_type ; typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; static source_type nearbyint ( argument_type s ) { #if !defined(BOOST_NO_STDC_NAMESPACE) using std::floor ; #endif return floor(s) ; } typedef mpl::integral_c< std::float_round_style, std::round_toward_neg_infinity> round_style ; } ; template struct Ceil { typedef S source_type ; typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; static source_type nearbyint ( argument_type s ) { #if !defined(BOOST_NO_STDC_NAMESPACE) using std::ceil ; #endif return ceil(s) ; } typedef mpl::integral_c< std::float_round_style, std::round_toward_infinity> round_style ; } ; template struct RoundEven { typedef S source_type ; typedef typename mpl::if_< is_arithmetic,S,S const&>::type argument_type ; static source_type nearbyint ( argument_type s ) { // Algorithm contributed by Guillaume Melquiond #if !defined(BOOST_NO_STDC_NAMESPACE) using std::floor ; using std::ceil ; #endif // only works inside the range not at the boundaries S prev = floor(s); S next = ceil(s); S rt = (s - prev) - (next - s); // remainder type S const zero(0.0); S const two(2.0); if ( rt < zero ) return prev; else if ( rt > zero ) return next; else { bool is_prev_even = two * floor(prev / two) == prev ; return ( is_prev_even ? prev : next ) ; } } typedef mpl::integral_c< std::float_round_style, std::round_to_nearest> round_style ; } ; enum range_check_result { cInRange = 0 , cNegOverflow = 1 , cPosOverflow = 2 } ; class bad_numeric_cast : public std::bad_cast { public: virtual const char * what() const throw() { return "bad numeric conversion: overflow"; } }; class negative_overflow : public bad_numeric_cast { public: virtual const char * what() const throw() { return "bad numeric conversion: negative overflow"; } }; class positive_overflow : public bad_numeric_cast { public: virtual const char * what() const throw() { return "bad numeric conversion: positive overflow"; } }; struct def_overflow_handler { void operator() ( range_check_result r ) // throw(negative_overflow,positive_overflow) { #ifndef BOOST_NO_EXCEPTIONS if ( r == cNegOverflow ) throw negative_overflow() ; else if ( r == cPosOverflow ) throw positive_overflow() ; #else if ( r == cNegOverflow ) ::boost::throw_exception(negative_overflow()) ; else if ( r == cPosOverflow ) ::boost::throw_exception(positive_overflow()) ; #endif } } ; struct silent_overflow_handler { void operator() ( range_check_result ) {} // throw() } ; template struct raw_converter { typedef typename Traits::result_type result_type ; typedef typename Traits::argument_type argument_type ; static result_type low_level_convert ( argument_type s ) { return static_cast(s) ; } } ; struct UseInternalRangeChecker {} ; } } // namespace boost::numeric #endif passenger-4.0.37/ext/boost/numeric/conversion/detail/000755 000765 000024 00000000000 12233035540 023233 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/numeric/conversion/int_float_mixture_enum.hpp000644 000765 000024 00000001523 12233035540 027263 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_INT_FLOAT_MIXTURE_ENUM_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_INT_FLOAT_MIXTURE_ENUM_FLC_12NOV2002_HPP namespace boost { namespace numeric { enum int_float_mixture_enum { integral_to_integral ,integral_to_float ,float_to_integral ,float_to_float } ; } } // namespace boost::numeric #endif // /////////////////////////////////////////////////////////////////////////////////////////////// passenger-4.0.37/ext/boost/numeric/conversion/numeric_cast_traits.hpp000644 000765 000024 00000001727 12233035540 026553 0ustar00honglistaff000000 000000 // //! Copyright (c) 2011 //! Brandon Kohn // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_NUMERIC_CAST_TRAITS_HPP #define BOOST_NUMERIC_CAST_TRAITS_HPP #include namespace boost { namespace numeric { template struct numeric_cast_traits { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; }}//namespace boost::numeric; #if !defined( BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS ) #include #include #endif//!defined BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS #endif//BOOST_NUMERIC_CAST_TRAITS_HPP passenger-4.0.37/ext/boost/numeric/conversion/sign_mixture_enum.hpp000644 000765 000024 00000001510 12233035540 026240 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_SIGN_MIXTURE_ENUM_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_SIGN_MIXTURE_ENUM_FLC_12NOV2002_HPP namespace boost { namespace numeric { enum sign_mixture_enum { unsigned_to_unsigned ,signed_to_signed ,signed_to_unsigned ,unsigned_to_signed } ; } } // namespace boost::numeric #endif // /////////////////////////////////////////////////////////////////////////////////////////////// passenger-4.0.37/ext/boost/numeric/conversion/udt_builtin_mixture_enum.hpp000644 000765 000024 00000001351 12233035540 027625 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_UDT_BUILTIN_MIXTURE_ENUM_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_UDT_BUILTIN_MIXTURE_ENUM_FLC_12NOV2002_HPP namespace boost { namespace numeric { enum udt_builtin_mixture_enum { builtin_to_builtin ,builtin_to_udt ,udt_to_builtin ,udt_to_udt } ; } } // namespace boost::numeric #endif passenger-4.0.37/ext/boost/numeric/conversion/detail/bounds.hpp000644 000765 000024 00000003434 12233035540 025242 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP #include "boost/limits.hpp" #include "boost/config.hpp" #include "boost/mpl/if.hpp" namespace boost { namespace numeric { namespace boundsdetail { template class Integral { typedef std::numeric_limits limits ; public : static N lowest () { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); } static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); } static N smallest() { return static_cast(1); } } ; template class Float { typedef std::numeric_limits limits ; public : static N lowest () { return static_cast(-limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ()) ; } static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); } static N smallest() { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); } } ; template struct get_impl { typedef mpl::bool_< ::std::numeric_limits::is_integer > is_int ; typedef Integral impl_int ; typedef Float impl_float ; typedef typename mpl::if_::type type ; } ; } } } // namespace boost::numeric::boundsdetail. #endif // /////////////////////////////////////////////////////////////////////////////////////////////// passenger-4.0.37/ext/boost/numeric/conversion/detail/conversion_traits.hpp000644 000765 000024 00000007003 12233035540 027517 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_DETAIL_CONVERSION_TRAITS_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_DETAIL_CONVERSION_TRAITS_FLC_12NOV2002_HPP #include "boost/type_traits/is_arithmetic.hpp" #include "boost/type_traits/is_same.hpp" #include "boost/type_traits/remove_cv.hpp" #include "boost/numeric/conversion/detail/meta.hpp" #include "boost/numeric/conversion/detail/int_float_mixture.hpp" #include "boost/numeric/conversion/detail/sign_mixture.hpp" #include "boost/numeric/conversion/detail/udt_builtin_mixture.hpp" #include "boost/numeric/conversion/detail/is_subranged.hpp" namespace boost { namespace numeric { namespace convdetail { //------------------------------------------------------------------- // Implementation of the Conversion Traits for T != S // // This is a VISIBLE base class of the user-level conversion_traits<> class. //------------------------------------------------------------------- template struct non_trivial_traits_impl { typedef typename get_int_float_mixture ::type int_float_mixture ; typedef typename get_sign_mixture ::type sign_mixture ; typedef typename get_udt_builtin_mixture ::type udt_builtin_mixture ; typedef typename get_is_subranged::type subranged ; typedef mpl::false_ trivial ; typedef T target_type ; typedef S source_type ; typedef T result_type ; typedef typename mpl::if_< is_arithmetic, S, S const&>::type argument_type ; typedef typename mpl::if_::type supertype ; typedef typename mpl::if_::type subtype ; } ; //------------------------------------------------------------------- // Implementation of the Conversion Traits for T == S // // This is a VISIBLE base class of the user-level conversion_traits<> class. //------------------------------------------------------------------- template struct trivial_traits_impl { typedef typename get_int_float_mixture ::type int_float_mixture ; typedef typename get_sign_mixture ::type sign_mixture ; typedef typename get_udt_builtin_mixture::type udt_builtin_mixture ; typedef mpl::false_ subranged ; typedef mpl::true_ trivial ; typedef N target_type ; typedef N source_type ; typedef N const& result_type ; typedef N const& argument_type ; typedef N supertype ; typedef N subtype ; } ; //------------------------------------------------------------------- // Top level implementation selector. //------------------------------------------------------------------- template struct get_conversion_traits { typedef typename remove_cv::type target_type ; typedef typename remove_cv::type source_type ; typedef typename is_same::type is_trivial ; typedef trivial_traits_impl trivial_imp ; typedef non_trivial_traits_impl non_trivial_imp ; typedef typename mpl::if_::type type ; } ; } } } // namespace boost::numeric::convdetail #endif passenger-4.0.37/ext/boost/numeric/conversion/detail/converter.hpp000644 000765 000024 00000047113 12233035540 025761 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_DETAIL_CONVERTER_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_DETAIL_CONVERTER_FLC_12NOV2002_HPP #include #include "boost/numeric/conversion/detail/meta.hpp" #include "boost/numeric/conversion/detail/conversion_traits.hpp" #include "boost/numeric/conversion/bounds.hpp" #include "boost/type_traits/is_same.hpp" #include "boost/mpl/integral_c.hpp" namespace boost { namespace numeric { namespace convdetail { // Integral Constants representing rounding modes typedef mpl::integral_c round2zero_c ; typedef mpl::integral_c round2nearest_c ; typedef mpl::integral_c round2inf_c ; typedef mpl::integral_c round2neg_inf_c ; // Metafunction: // // for_round_style::type // // {RoundStyle} Integral Constant specifying a round style as declared above. // {RoundToZero,RoundToNearest,RoundToInf,RoundToNegInf} arbitrary types. // // Selects one of the 4 types according to the value of RoundStyle. // template struct for_round_style { typedef ct_switch4 selector ; typedef typename selector::type type ; } ; //-------------------------------------------------------------------------- // Range Checking Logic. // // The range checking logic is built up by combining 1 or 2 predicates. // Each predicate is encapsulated in a template class and exposes // the static member function 'apply'. // //-------------------------------------------------------------------------- // Because a particular logic can combine either 1 or two predicates, the following // tags are used to allow the predicate applier to receive 2 preds, but optimize away // one of them if it is 'non-applicable' struct non_applicable { typedef mpl::false_ do_apply ; } ; struct applicable { typedef mpl::true_ do_apply ; } ; //-------------------------------------------------------------------------- // // Range Checking Logic implementations. // // The following classes, collectivelly named 'Predicates', are instantiated within // the corresponding range checkers. // Their static member function 'apply' is called to perform the actual range checking logic. //-------------------------------------------------------------------------- // s < Lowest(T) ? cNegOverflow : cInRange // template struct LT_LoT : applicable { typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s < static_cast(bounds::lowest()) ? cNegOverflow : cInRange ; } } ; // s < 0 ? cNegOverflow : cInRange // template struct LT_Zero : applicable { typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s < static_cast(0) ? cNegOverflow : cInRange ; } } ; // s <= Lowest(T)-1 ? cNegOverflow : cInRange // template struct LE_PrevLoT : applicable { typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s <= static_cast(bounds::lowest()) - static_cast(1.0) ? cNegOverflow : cInRange ; } } ; // s < Lowest(T)-0.5 ? cNegOverflow : cInRange // template struct LT_HalfPrevLoT : applicable { typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s < static_cast(bounds::lowest()) - static_cast(0.5) ? cNegOverflow : cInRange ; } } ; // s > Highest(T) ? cPosOverflow : cInRange // template struct GT_HiT : applicable { typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s > static_cast(bounds::highest()) ? cPosOverflow : cInRange ; } } ; // s >= Lowest(T) + 1 ? cPosOverflow : cInRange // template struct GE_SuccHiT : applicable { typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s >= static_cast(bounds::highest()) + static_cast(1.0) ? cPosOverflow : cInRange ; } } ; // s >= Lowest(T) + 0.5 ? cPosgOverflow : cInRange // template struct GT_HalfSuccHiT : applicable { typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename Traits::argument_type argument_type ; static range_check_result apply ( argument_type s ) { return s >= static_cast(bounds::highest()) + static_cast(0.5) ? cPosOverflow : cInRange ; } } ; //-------------------------------------------------------------------------- // // Predicate Combiner. // // This helper classes are used to possibly combine the range checking logic // individually performed by the predicates // //-------------------------------------------------------------------------- // Applies both predicates: first 'PredA', and if it equals 'cInRange', 'PredB' template struct applyBoth { typedef typename PredA::argument_type argument_type ; static range_check_result apply ( argument_type s ) { range_check_result r = PredA::apply(s) ; if ( r == cInRange ) r = PredB::apply(s); return r ; } } ; template struct combine { typedef applyBoth Both ; typedef void NNone ; // 'None' is defined as a macro in (/usr/X11R6/include/X11/X.h) typedef typename PredA::do_apply do_applyA ; typedef typename PredB::do_apply do_applyB ; typedef typename for_both::type type ; } ; //-------------------------------------------------------------------------- // Range Checker classes. // // The following classes are VISIBLE base classes of the user-level converter<> class. // They supply the optimized 'out_of_range()' and 'validate_range()' static member functions // visible in the user interface. // //-------------------------------------------------------------------------- // Dummy range checker. template struct dummy_range_checker { typedef typename Traits::argument_type argument_type ; static range_check_result out_of_range ( argument_type ) { return cInRange ; } static void validate_range ( argument_type ) {} } ; // Generic range checker. // // All the range checking logic for all possible combinations of source and target // can be arranged in terms of one or two predicates, which test overflow on both neg/pos 'sides' // of the ranges. // // These predicates are given here as IsNegOverflow and IsPosOverflow. // template struct generic_range_checker { typedef OverflowHandler overflow_handler ; typedef typename Traits::argument_type argument_type ; static range_check_result out_of_range ( argument_type s ) { typedef typename combine::type Predicate ; return Predicate::apply(s); } static void validate_range ( argument_type s ) { OverflowHandler()( out_of_range(s) ) ; } } ; //-------------------------------------------------------------------------- // // Selectors for the optimized Range Checker class. // //-------------------------------------------------------------------------- template struct GetRC_Sig2Sig_or_Unsig2Unsig { typedef dummy_range_checker Dummy ; typedef LT_LoT Pred1 ; typedef GT_HiT Pred2 ; typedef generic_range_checker Normal ; typedef typename Traits::subranged subranged ; typedef typename mpl::if_::type type ; } ; template struct GetRC_Sig2Unsig { typedef LT_Zero Pred1 ; typedef GT_HiT Pred2 ; typedef generic_range_checker ChoiceA ; typedef generic_range_checker ChoiceB ; typedef typename Traits::target_type T ; typedef typename Traits::source_type S ; typedef typename subranged_Unsig2Sig::type oposite_subranged ; typedef typename mpl::not_::type positively_subranged ; typedef typename mpl::if_::type type ; } ; template struct GetRC_Unsig2Sig { typedef GT_HiT Pred1 ; typedef generic_range_checker type ; } ; template struct GetRC_Int2Int { typedef GetRC_Sig2Sig_or_Unsig2Unsig Sig2SigQ ; typedef GetRC_Sig2Unsig Sig2UnsigQ ; typedef GetRC_Unsig2Sig Unsig2SigQ ; typedef Sig2SigQ Unsig2UnsigQ ; typedef typename Traits::sign_mixture sign_mixture ; typedef typename for_sign_mixture::type selector ; typedef typename selector::type type ; } ; template struct GetRC_Int2Float { typedef dummy_range_checker type ; } ; template struct GetRC_Float2Int { typedef LE_PrevLoT Pred1 ; typedef GE_SuccHiT Pred2 ; typedef LT_HalfPrevLoT Pred3 ; typedef GT_HalfSuccHiT Pred4 ; typedef GT_HiT Pred5 ; typedef LT_LoT Pred6 ; typedef generic_range_checker ToZero ; typedef generic_range_checker ToNearest ; typedef generic_range_checker ToInf ; typedef generic_range_checker ToNegInf ; typedef typename Float2IntRounder::round_style round_style ; typedef typename for_round_style::type type ; } ; template struct GetRC_Float2Float { typedef dummy_range_checker Dummy ; typedef LT_LoT Pred1 ; typedef GT_HiT Pred2 ; typedef generic_range_checker Normal ; typedef typename Traits::subranged subranged ; typedef typename mpl::if_::type type ; } ; template struct GetRC_BuiltIn2BuiltIn { typedef GetRC_Int2Int Int2IntQ ; typedef GetRC_Int2Float Int2FloatQ ; typedef GetRC_Float2Int Float2IntQ ; typedef GetRC_Float2Float Float2FloatQ ; typedef typename Traits::int_float_mixture int_float_mixture ; typedef typename for_int_float_mixture::type selector ; typedef typename selector::type type ; } ; template struct GetRC { typedef GetRC_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; typedef dummy_range_checker Dummy ; typedef mpl::identity DummyQ ; typedef typename Traits::udt_builtin_mixture udt_builtin_mixture ; typedef typename for_udt_builtin_mixture::type selector ; typedef typename selector::type type ; } ; //-------------------------------------------------------------------------- // Converter classes. // // The following classes are VISIBLE base classes of the user-level converter<> class. // They supply the optimized 'nearbyint()' and 'convert()' static member functions // visible in the user interface. // //-------------------------------------------------------------------------- // // Trivial Converter : used when (cv-unqualified) T == (cv-unqualified) S // template struct trivial_converter_impl : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type ,BOOST_DEDUCED_TYPENAME Traits::result_type > ,public dummy_range_checker { typedef Traits traits ; typedef typename Traits::source_type source_type ; typedef typename Traits::argument_type argument_type ; typedef typename Traits::result_type result_type ; static result_type low_level_convert ( argument_type s ) { return s ; } static source_type nearbyint ( argument_type s ) { return s ; } static result_type convert ( argument_type s ) { return s ; } } ; // // Rounding Converter : used for float to integral conversions. // template struct rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type ,BOOST_DEDUCED_TYPENAME Traits::result_type > ,public RangeChecker ,public Float2IntRounder ,public RawConverter { typedef RangeChecker RangeCheckerBase ; typedef Float2IntRounder Float2IntRounderBase ; typedef RawConverter RawConverterBase ; typedef Traits traits ; typedef typename Traits::source_type source_type ; typedef typename Traits::argument_type argument_type ; typedef typename Traits::result_type result_type ; static result_type convert ( argument_type s ) { RangeCheckerBase::validate_range(s); source_type s1 = Float2IntRounderBase::nearbyint(s); return RawConverterBase::low_level_convert(s1); } } ; // // Non-Rounding Converter : used for all other conversions. // template struct non_rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type ,BOOST_DEDUCED_TYPENAME Traits::result_type > ,public RangeChecker ,public RawConverter { typedef RangeChecker RangeCheckerBase ; typedef RawConverter RawConverterBase ; typedef Traits traits ; typedef typename Traits::source_type source_type ; typedef typename Traits::argument_type argument_type ; typedef typename Traits::result_type result_type ; static source_type nearbyint ( argument_type s ) { return s ; } static result_type convert ( argument_type s ) { RangeCheckerBase::validate_range(s); return RawConverterBase::low_level_convert(s); } } ; //-------------------------------------------------------------------------- // // Selectors for the optimized Converter class. // //-------------------------------------------------------------------------- template struct get_non_trivial_converter { typedef GetRC InternalRangeCheckerQ ; typedef is_same use_internal_RC ; typedef mpl::identity UserRangeCheckerQ ; typedef typename mpl::eval_if::type RangeChecker ; typedef non_rounding_converter NonRounding ; typedef rounding_converter Rounding ; typedef mpl::identity NonRoundingQ ; typedef mpl::identity RoundingQ ; typedef typename Traits::int_float_mixture int_float_mixture ; typedef typename for_int_float_mixture::type selector ; typedef typename selector::type type ; } ; template< class Traits ,class OverflowHandler ,class Float2IntRounder ,class RawConverter ,class UserRangeChecker > struct get_converter_impl { #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x0561 ) ) // bcc55 prefers sometimes template parameters to be explicit local types. // (notice that is is illegal to reuse the names like this) typedef Traits Traits ; typedef OverflowHandler OverflowHandler ; typedef Float2IntRounder Float2IntRounder ; typedef RawConverter RawConverter ; typedef UserRangeChecker UserRangeChecker ; #endif typedef trivial_converter_impl Trivial ; typedef mpl::identity TrivialQ ; typedef get_non_trivial_converter< Traits ,OverflowHandler ,Float2IntRounder ,RawConverter ,UserRangeChecker > NonTrivialQ ; typedef typename Traits::trivial trivial ; typedef typename mpl::eval_if::type type ; } ; } } } // namespace boost::numeric::convdetail #endif passenger-4.0.37/ext/boost/numeric/conversion/detail/int_float_mixture.hpp000644 000765 000024 00000005050 12233035540 027500 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_DETAIL_INT_FLOAT_MIXTURE_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_DETAIL_INT_FLOAT_MIXTURE_FLC_12NOV2002_HPP #include "boost/config.hpp" #include "boost/limits.hpp" #include "boost/numeric/conversion/int_float_mixture_enum.hpp" #include "boost/numeric/conversion/detail/meta.hpp" #include "boost/mpl/integral_c.hpp" namespace boost { namespace numeric { namespace convdetail { // Integral Constants for 'IntFloatMixture' typedef mpl::integral_c int2int_c ; typedef mpl::integral_c int2float_c ; typedef mpl::integral_c float2int_c ; typedef mpl::integral_c float2float_c ; // Metafunction: // // get_int_float_mixture::type // // Selects the appropriate Int-Float Mixture Integral Constant for the combination T,S. // template struct get_int_float_mixture { typedef mpl::bool_< ::std::numeric_limits::is_integer > S_int ; typedef mpl::bool_< ::std::numeric_limits::is_integer > T_int ; typedef typename for_both::type type ; } ; // Metafunction: // // for_int_float_mixture::type // // {Mixture} is one of the Integral Constants for Mixture, declared above. // {int_int,int_float,float_int,float_float} are aribtrary types. (not metafunctions) // // According to the value of 'IntFloatMixture', selects the corresponding type. // template struct for_int_float_mixture { typedef typename ct_switch4::type type ; } ; } } } // namespace boost::numeric::convdetail #endif // /////////////////////////////////////////////////////////////////////////////////////////////// passenger-4.0.37/ext/boost/numeric/conversion/detail/is_subranged.hpp000644 000765 000024 00000017006 12233035540 026415 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_DETAIL_IS_SUBRANGED_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_DETAIL_IS_SUBRANGED_FLC_12NOV2002_HPP #include "boost/config.hpp" #include "boost/limits.hpp" #include "boost/mpl/int.hpp" #include "boost/mpl/multiplies.hpp" #include "boost/mpl/less.hpp" #include "boost/mpl/equal_to.hpp" #include "boost/type_traits/is_same.hpp" #include "boost/numeric/conversion/detail/meta.hpp" #include "boost/numeric/conversion/detail/int_float_mixture.hpp" #include "boost/numeric/conversion/detail/sign_mixture.hpp" #include "boost/numeric/conversion/detail/udt_builtin_mixture.hpp" namespace boost { namespace numeric { namespace convdetail { //--------------------------------------------------------------- // Implementations of the compile time predicate "T is subranged" //--------------------------------------------------------------- // for integral to integral conversions template struct subranged_Sig2Unsig { // Signed to unsigned conversions are 'subranged' because of possible loose // of negative values. typedef mpl::true_ type ; } ; // for unsigned integral to signed integral conversions template struct subranged_Unsig2Sig { // IMPORTANT NOTE: // // This code assumes that signed/unsigned integral values are represented // such that: // // numeric_limits::digits + 1 == numeric_limits::digits // // The '+1' is required since numeric_limits<>::digits gives 1 bit less for signed integral types. // // This fact is used by the following logic: // // if ( (numeric_limits::digits+1) < (2*numeric_limits::digits) ) // then the conversion is subranged. // typedef mpl::int_< ::std::numeric_limits::digits > S_digits ; typedef mpl::int_< ::std::numeric_limits::digits > T_digits ; // T is signed, so take digits+1 typedef typename T_digits::next u_T_digits ; typedef mpl::int_<2> Two ; typedef typename mpl::multiplies::type S_digits_times_2 ; typedef typename mpl::less::type type ; } ; // for integral to integral conversions of the same sign. template struct subranged_SameSign { // An integral conversion of the same sign is subranged if digits(T) < digits(S). typedef mpl::int_< ::std::numeric_limits::digits > S_digits ; typedef mpl::int_< ::std::numeric_limits::digits > T_digits ; typedef typename mpl::less::type type ; } ; // for integral to float conversions template struct subranged_Int2Float { typedef mpl::false_ type ; } ; // for float to integral conversions template struct subranged_Float2Int { typedef mpl::true_ type ; } ; // for float to float conversions template struct subranged_Float2Float { // If both T and S are floats, // compare exponent bits and if they match, mantisa bits. typedef mpl::int_< ::std::numeric_limits::digits > S_mantisa ; typedef mpl::int_< ::std::numeric_limits::digits > T_mantisa ; typedef mpl::int_< ::std::numeric_limits::max_exponent > S_exponent ; typedef mpl::int_< ::std::numeric_limits::max_exponent > T_exponent ; typedef typename mpl::less::type T_smaller_exponent ; typedef typename mpl::equal_to::type equal_exponents ; typedef mpl::less T_smaller_mantisa ; typedef mpl::eval_if not_bigger_exponent_case ; typedef typename mpl::eval_if::type type ; } ; // for Udt to built-in conversions template struct subranged_Udt2BuiltIn { typedef mpl::true_ type ; } ; // for built-in to Udt conversions template struct subranged_BuiltIn2Udt { typedef mpl::false_ type ; } ; // for Udt to Udt conversions template struct subranged_Udt2Udt { typedef mpl::false_ type ; } ; //------------------------------------------------------------------- // Selectors for the implementations of the subranged predicate //------------------------------------------------------------------- template struct get_subranged_Int2Int { typedef subranged_SameSign Sig2Sig ; typedef subranged_Sig2Unsig Sig2Unsig ; typedef subranged_Unsig2Sig Unsig2Sig ; typedef Sig2Sig Unsig2Unsig ; typedef typename get_sign_mixture::type sign_mixture ; typedef typename for_sign_mixture::type type ; } ; template struct get_subranged_BuiltIn2BuiltIn { typedef get_subranged_Int2Int Int2IntQ ; typedef subranged_Int2Float Int2Float ; typedef subranged_Float2Int Float2Int ; typedef subranged_Float2Float Float2Float ; typedef mpl::identity Int2FloatQ ; typedef mpl::identity Float2IntQ ; typedef mpl::identity Float2FloatQ ; typedef typename get_int_float_mixture::type int_float_mixture ; typedef for_int_float_mixture for_ ; typedef typename for_::type selected ; typedef typename selected::type type ; } ; template struct get_subranged { typedef get_subranged_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; typedef subranged_BuiltIn2Udt BuiltIn2Udt ; typedef subranged_Udt2BuiltIn Udt2BuiltIn ; typedef subranged_Udt2Udt Udt2Udt ; typedef mpl::identity BuiltIn2UdtQ ; typedef mpl::identity Udt2BuiltInQ ; typedef mpl::identity Udt2UdtQ ; typedef typename get_udt_builtin_mixture::type udt_builtin_mixture ; typedef typename for_udt_builtin_mixture::type selected ; typedef typename selected::type selected2 ; typedef typename selected2::type type ; } ; //------------------------------------------------------------------- // Top level implementation selector. //------------------------------------------------------------------- template struct get_is_subranged { typedef get_subranged non_trivial_case ; typedef mpl::identity trivial_case ; typedef is_same is_trivial ; typedef typename mpl::if_::type selected ; typedef typename selected::type type ; } ; } } } // namespace boost::numeric::convdetail #endif passenger-4.0.37/ext/boost/numeric/conversion/detail/meta.hpp000644 000765 000024 00000007116 12233035540 024677 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_DETAIL_META_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_DETAIL_META_FLC_12NOV2002_HPP #include "boost/type_traits/remove_cv.hpp" #include "boost/mpl/if.hpp" #include "boost/mpl/eval_if.hpp" #include "boost/mpl/equal_to.hpp" #include "boost/mpl/not.hpp" #include "boost/mpl/and.hpp" #include "boost/mpl/bool.hpp" #include "boost/mpl/identity.hpp" namespace boost { namespace numeric { namespace convdetail { template< class T1, class T2> struct equal_to { #if !defined(__BORLANDC__) enum { x = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value == BOOST_MPL_AUX_VALUE_WKND(T2)::value ) }; BOOST_STATIC_CONSTANT(bool, value = x); typedef mpl::bool_ type; #else BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value == BOOST_MPL_AUX_VALUE_WKND(T2)::value )); typedef mpl::bool_<( BOOST_MPL_AUX_VALUE_WKND(T1)::value == BOOST_MPL_AUX_VALUE_WKND(T2)::value )> type; #endif }; // Metafunction: // // ct_switch4::type // // {Value,Case(X)Val} are Integral Constants (such as: mpl::int_<>) // {Case(X)Type,DefaultType} are arbitrary types. (not metafunctions) // // Returns Case(X)Type if Val==Case(X)Val; DefaultType otherwise. // template struct ct_switch4 { typedef mpl::identity Case0TypeQ ; typedef mpl::identity Case1TypeQ ; typedef equal_to is_case0 ; typedef equal_to is_case1 ; typedef equal_to is_case2 ; typedef mpl::if_ choose_2_3Q ; typedef mpl::eval_if choose_1_2_3Q ; typedef typename mpl::eval_if::type type ; } ; // Metafunction: // // for_both::type // // {exp0,expr1} are Boolean Integral Constants // {TT,TF,FT,FF} are aribtrary types. (not metafunctions) // // According to the combined boolean value of 'expr0 && expr1', selects the corresponding type. // template struct for_both { typedef mpl::identity TF_Q ; typedef mpl::identity TT_Q ; typedef typename mpl::not_::type not_expr0 ; typedef typename mpl::not_::type not_expr1 ; typedef typename mpl::and_::type caseTT ; typedef typename mpl::and_::type caseTF ; typedef typename mpl::and_::type caseFT ; typedef mpl::if_ choose_FT_FF_Q ; typedef mpl::eval_if choose_TF_FT_FF_Q ; typedef typename mpl::eval_if::type type ; } ; } } } // namespace boost::numeric::convdetail #endif passenger-4.0.37/ext/boost/numeric/conversion/detail/numeric_cast_traits.hpp000644 000765 000024 00000012623 12233035540 030012 0ustar00honglistaff000000 000000 // //! Copyright (c) 2011-2012 //! Brandon Kohn // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #if !defined(BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES) #include #if !defined(BOOST_NO_LONG_LONG) #include #endif #else #if !BOOST_PP_IS_ITERATING #include #include #include #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits_common.hpp") #endif // //! Copyright (c) 2011-2012 //! Brandon Kohn // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 1) #endif //! These are the assumed common built in fundamental types (not typedefs/macros.) #define BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES() \ (char) \ (signed char) \ (unsigned char) \ (short) \ (unsigned short) \ (int) \ (unsigned int) \ (long) \ (unsigned long) \ (float) \ (double) \ (long double) \ /***/ #define BOOST_NUMERIC_CONVERSION_SEQ_A() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES() #define BOOST_NUMERIC_CONVERSION_SEQ_B() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES() namespace boost { namespace numeric { #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_A())), )) #include BOOST_PP_ITERATE() }}//namespace boost::numeric; #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) #pragma wave option(output: null) #endif #if ( defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) ) || !defined(BOOST_NO_LONG_LONG) #undef BOOST_NUMERIC_CONVERSION_SEQ_A #undef BOOST_NUMERIC_CONVERSION_SEQ_B #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 2, line: 0, output: "preprocessed/numeric_cast_traits_long_long.hpp") #endif // //! Copyright (c) 2011-2012 //! Brandon Kohn // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) #pragma wave option(preserve: 1) #endif namespace boost { namespace numeric { #define BOOST_NUMERIC_CONVERSION_SEQ_A() BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES()(boost::long_long_type)(boost::ulong_long_type) #define BOOST_NUMERIC_CONVERSION_SEQ_B() (boost::long_long_type)(boost::ulong_long_type) #define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_A())), )) #include BOOST_PP_ITERATE() }}//namespace boost::numeric; #if defined(__WAVE__) && defined(BOOST_NUMERIC_CONVERSION_CREATE_PREPROCESSED_FILES) #pragma wave option(output: null) #endif #endif #undef BOOST_NUMERIC_CONVERSION_BASE_BUILTIN_TYPES #undef BOOST_NUMERIC_CONVERSION_SEQ_A #undef BOOST_NUMERIC_CONVERSION_SEQ_B #elif BOOST_PP_ITERATION_DEPTH() == 1 #define BOOST_PP_ITERATION_PARAMS_2 (3, (0, BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_NUMERIC_CONVERSION_SEQ_B())), )) #include BOOST_PP_ITERATE() #elif BOOST_PP_ITERATION_DEPTH() == 2 //! Generate default traits for the specified source and target. #define BOOST_NUMERIC_CONVERSION_A BOOST_PP_FRAME_ITERATION(1) #define BOOST_NUMERIC_CONVERSION_B BOOST_PP_FRAME_ITERATION(2) template <> struct numeric_cast_traits < BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_A, BOOST_NUMERIC_CONVERSION_SEQ_A()) , BOOST_PP_SEQ_ELEM(BOOST_NUMERIC_CONVERSION_B, BOOST_NUMERIC_CONVERSION_SEQ_B()) > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; #undef BOOST_NUMERIC_CONVERSION_A #undef BOOST_NUMERIC_CONVERSION_B #endif//! Depth 2. #endif// BOOST_NUMERIC_CONVERSION_DONT_USE_PREPROCESSED_FILES passenger-4.0.37/ext/boost/numeric/conversion/detail/preprocessed/000755 000765 000024 00000000000 12233035540 025731 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/numeric/conversion/detail/sign_mixture.hpp000644 000765 000024 00000004763 12233035540 026473 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_DETAIL_SIGN_MIXTURE_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_DETAIL_SIGN_MIXTURE_FLC_12NOV2002_HPP #include "boost/config.hpp" #include "boost/limits.hpp" #include "boost/numeric/conversion/sign_mixture_enum.hpp" #include "boost/numeric/conversion/detail/meta.hpp" #include "boost/mpl/integral_c.hpp" namespace boost { namespace numeric { namespace convdetail { // Integral Constants for 'SignMixture' typedef mpl::integral_c unsig2unsig_c ; typedef mpl::integral_c sig2sig_c ; typedef mpl::integral_c sig2unsig_c ; typedef mpl::integral_c unsig2sig_c ; // Metafunction: // // get_sign_mixture::type // // Selects the appropriate SignMixture Integral Constant for the combination T,S. // template struct get_sign_mixture { typedef mpl::bool_< ::std::numeric_limits::is_signed > S_signed ; typedef mpl::bool_< ::std::numeric_limits::is_signed > T_signed ; typedef typename for_both::type type ; } ; // Metafunction: // // for_sign_mixture::type // // {SignMixture} is one of the Integral Constants for SignMixture, declared above. // {Sig2Sig,Sig2Unsig,Unsig2Sig,Unsig2Unsig} are aribtrary types. (not metafunctions) // // According to the value of 'SignMixture', selects the corresponding type. // template struct for_sign_mixture { typedef typename ct_switch4::type type ; } ; } } } // namespace boost::numeric::convdetail #endif // /////////////////////////////////////////////////////////////////////////////////////////////// passenger-4.0.37/ext/boost/numeric/conversion/detail/udt_builtin_mixture.hpp000644 000765 000024 00000004660 12233035540 030051 0ustar00honglistaff000000 000000 // (c) Copyright Fernando Luis Cacciola Carballal 2000-2004 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/numeric/conversion // // Contact the author at: fernando_cacciola@hotmail.com // #ifndef BOOST_NUMERIC_CONVERSION_DETAIL_UDT_BUILTIN_MIXTURE_FLC_12NOV2002_HPP #define BOOST_NUMERIC_CONVERSION_DETAIL_UDT_BUILTIN_MIXTURE_FLC_12NOV2002_HPP #include "boost/type_traits/is_arithmetic.hpp" #include "boost/numeric/conversion/udt_builtin_mixture_enum.hpp" #include "boost/numeric/conversion/detail/meta.hpp" #include "boost/mpl/integral_c.hpp" namespace boost { namespace numeric { namespace convdetail { // Integral Constants for 'UdtMixture' typedef mpl::integral_c builtin2builtin_c ; typedef mpl::integral_c builtin2udt_c ; typedef mpl::integral_c udt2builtin_c ; typedef mpl::integral_c udt2udt_c ; // Metafunction: // // for_udt_mixture::type // // {UdtMixture} is one of the Integral Constants for UdMixture, declared above. // {BuiltIn2BuiltIn,BuiltIn2Udt,Udt2BuiltIn,Udt2Udt} are aribtrary types. (not metafunctions) // // According to the value of 'UdtMixture', selects the corresponding type. // template struct for_udt_builtin_mixture { typedef typename ct_switch4::type type ; } ; // Metafunction: // // get_udt_mixture::type // // Selects the appropriate UdtMixture Integral Constant for the combination T,S. // template struct get_udt_builtin_mixture { typedef is_arithmetic S_builtin ; typedef is_arithmetic T_builtin ; typedef typename for_both::type type ; } ; } } } // namespace boost::numeric::convdetail #endif passenger-4.0.37/ext/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp000644 000765 000024 00000123430 12233035540 034057 0ustar00honglistaff000000 000000 // //! Copyright (c) 2011-2012 //! Brandon Kohn // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // namespace boost { namespace numeric { template <> struct numeric_cast_traits < char , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , signed char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , unsigned char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , unsigned short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , unsigned int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , unsigned long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , signed char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , unsigned char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , unsigned short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , unsigned int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , unsigned long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , signed char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , unsigned char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , unsigned short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , unsigned int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , unsigned long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , signed char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , unsigned char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , unsigned short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , unsigned int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , unsigned long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , signed char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , unsigned char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , unsigned short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , unsigned int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , unsigned long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , signed char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , unsigned char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , unsigned short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , unsigned int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , unsigned long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , signed char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , unsigned char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , unsigned short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , unsigned int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , unsigned long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , signed char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , unsigned char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , unsigned short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , unsigned int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , unsigned long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , signed char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , unsigned char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , unsigned short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , unsigned int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , unsigned long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , signed char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , unsigned char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , unsigned short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , unsigned int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , unsigned long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , signed char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , unsigned char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , unsigned short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , unsigned int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , unsigned long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , signed char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , unsigned char > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , unsigned short > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , unsigned int > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , unsigned long > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , float > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , long double > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; }} passenger-4.0.37/ext/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp000644 000765 000024 00000022137 12233035540 034547 0ustar00honglistaff000000 000000 // //! Copyright (c) 2011-2012 //! Brandon Kohn // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // namespace boost { namespace numeric { template <> struct numeric_cast_traits < char , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < char , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < signed char , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned char , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < short , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned short , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < int , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned int , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < unsigned long , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < float , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < double , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < long double , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::long_long_type , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::long_long_type , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::ulong_long_type , boost::long_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; template <> struct numeric_cast_traits < boost::ulong_long_type , boost::ulong_long_type > { typedef def_overflow_handler overflow_policy; typedef UseInternalRangeChecker range_checking_policy; typedef Trunc rounding_policy; }; }} passenger-4.0.37/ext/boost/mpl/accumulate.hpp000644 000765 000024 00000002037 12233035540 021570 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ACCUMULATE_HPP_INCLUDED #define BOOST_MPL_ACCUMULATE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: accumulate.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(State) , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp) > struct accumulate : fold { BOOST_MPL_AUX_LAMBDA_SUPPORT(3,accumulate,(Sequence,State,ForwardOp)) }; BOOST_MPL_AUX_NA_SPEC(3, accumulate) }} #endif // BOOST_MPL_ACCUMULATE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/advance.hpp000644 000765 000024 00000004015 12233035540 021044 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ADVANCE_HPP_INCLUDED #define BOOST_MPL_ADVANCE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: advance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { // default implementation for forward/bidirectional iterators template< typename Tag > struct advance_impl { template< typename Iterator, typename N > struct apply { typedef typename less< N,long_<0> >::type backward_; typedef typename if_< backward_, negate, N >::type offset_; typedef typename if_< backward_ , aux::advance_backward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value > , aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value > >::type f_; typedef typename apply_wrap1::type type; }; }; template< typename BOOST_MPL_AUX_NA_PARAM(Iterator) , typename BOOST_MPL_AUX_NA_PARAM(N) > struct advance : advance_impl< typename tag::type > ::template apply { }; template< typename Iterator , BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_c : advance_impl< typename tag::type > ::template apply > { }; BOOST_MPL_AUX_NA_SPEC(2, advance) }} #endif // BOOST_MPL_ADVANCE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/advance_fwd.hpp000644 000765 000024 00000001402 12233035540 021701 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED #define BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: advance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { BOOST_MPL_AUX_COMMON_NAME_WKND(advance) template< typename Tag > struct advance_impl; template< typename Iterator, typename N > struct advance; }} #endif // BOOST_MPL_ADVANCE_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/alias.hpp000644 000765 000024 00000001054 12233035540 020534 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ALIAS_HPP_INCLUDED #define BOOST_MPL_ALIAS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: alias.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace { namespace mpl = boost::mpl; } #endif // BOOST_MPL_ALIAS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/always.hpp000644 000765 000024 00000001654 12233035540 020751 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ALWAYS_HPP_INCLUDED #define BOOST_MPL_ALWAYS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: always.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template< typename Value > struct always { template< typename T BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(1, typename T, na) > struct apply { typedef Value type; }; }; BOOST_MPL_AUX_ARITY_SPEC(1, always) }} #endif // BOOST_MPL_ALWAYS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/and.hpp000644 000765 000024 00000003162 12233035540 020207 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AND_HPP_INCLUDED #define BOOST_MPL_AND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: and.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include // agurt, 19/may/04: workaround a conflict with header's // 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(and)' // has to be checked in a separate condition, otherwise GCC complains // about 'and' being an alternative token #if defined(_MSC_VER) #ifndef __GCCXML__ #if defined(and) # pragma push_macro("and") # undef and # define and(x) #endif #endif #endif # define BOOST_MPL_PREPROCESSED_HEADER and.hpp # include #if defined(_MSC_VER) #ifndef __GCCXML__ #if defined(and) # pragma pop_macro("and") #endif #endif #endif #else # define AUX778076_OP_NAME and_ # define AUX778076_OP_VALUE1 false # define AUX778076_OP_VALUE2 true # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AND_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/apply.hpp000644 000765 000024 00000014057 12233035540 020577 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_APPLY_HPP_INCLUDED #define BOOST_MPL_APPLY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER apply.hpp # include #else # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header # define AUX778076_APPLY_PARAMS(param) \ BOOST_MPL_PP_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ ) \ /**/ # define AUX778076_APPLY_DEF_PARAMS(param, value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ /**/ # define AUX778076_APPLY_N_PARAMS(n, param) \ BOOST_MPL_PP_PARAMS(n, param) \ /**/ # define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ BOOST_PP_COMMA_IF(n) \ BOOST_MPL_PP_PARAMS(n, param) \ /**/ # define AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(n, param, def) \ BOOST_PP_COMMA_IF(n) \ BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ /**/ # define AUX778076_APPLY_N_SPEC_PARAMS(n, param) \ BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \ /**/ #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() # if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) // real C++ version is already taken care of # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace aux { // apply_count_args #define AUX778076_COUNT_ARGS_PREFIX apply #define AUX778076_COUNT_ARGS_DEFAULT na #define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY #include } template< typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) > struct apply : aux::apply_chooser< aux::apply_count_args< AUX778076_APPLY_PARAMS(T) >::value >::template result_< F, AUX778076_APPLY_PARAMS(T) >::type { }; # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE # undef AUX778076_APPLY_N_SPEC_PARAMS # undef AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS # undef AUX778076_APPLY_N_COMMA_PARAMS # undef AUX778076_APPLY_N_PARAMS # undef AUX778076_APPLY_DEF_PARAMS # undef AUX778076_APPLY_PARAMS }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_APPLY_HPP_INCLUDED ///// iteration, depth == 1 // For gcc 4.4 compatability, we must include the // BOOST_PP_ITERATION_DEPTH test inside an #else clause. #else // BOOST_PP_IS_ITERATING #if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) template< typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply,i_) #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) : BOOST_PP_CAT(apply_wrap,i_)< typename lambda::type AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > { #else { typedef typename BOOST_PP_CAT(apply_wrap,i_)< typename lambda::type AUX778076_APPLY_N_COMMA_PARAMS(i_, T) >::type type; #endif BOOST_MPL_AUX_LAMBDA_SUPPORT( BOOST_PP_INC(i_) , BOOST_PP_CAT(apply,i_) , (F AUX778076_APPLY_N_COMMA_PARAMS(i_,T)) ) }; #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) /// workaround for ETI bug template<> struct BOOST_PP_CAT(apply,i_) { typedef int type; }; #endif # if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY /// primary template (not a specialization!) template< typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) > struct apply : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > { }; #else template< typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) > struct apply< F AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(i_, T, na) > : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > { }; #endif # else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) namespace aux { template<> struct apply_chooser { template< typename F, AUX778076_APPLY_PARAMS(typename T) > struct result_ { typedef BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > type; }; }; } // namespace aux #endif # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE # undef i_ #endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/apply_fwd.hpp000644 000765 000024 00000005323 12233035540 021433 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_APPLY_FWD_HPP_INCLUDED #define BOOST_MPL_APPLY_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: apply_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER apply_fwd.hpp # include #else # include # include # include # include # include # include # include # include // agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC // (for known reasons) #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) # define BOOST_MPL_CFG_NO_APPLY_TEMPLATE #endif namespace boost { namespace mpl { // local macro, #undef-ined at the end of the header # define AUX778076_APPLY_DEF_PARAMS(param, value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ /**/ # define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ BOOST_PP_COMMA_IF(n) \ BOOST_MPL_PP_PARAMS(n, param) \ /**/ # if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) // forward declaration template< typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) > struct apply; #else namespace aux { template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser; } #endif # endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() # undef AUX778076_APPLY_N_COMMA_PARAMS # undef AUX778076_APPLY_DEF_PARAMS }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_APPLY_FWD_HPP_INCLUDED ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) template< typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply,i_); #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/apply_wrap.hpp000644 000765 000024 00000014216 12233035540 021625 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_APPLY_WRAP_HPP_INCLUDED #define BOOST_MPL_APPLY_WRAP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: apply_wrap.hpp 49272 2008-10-11 06:50:46Z agurtovoy $ // $Date: 2008-10-10 23:50:46 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49272 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER apply_wrap.hpp # include #else # include # include # include # include # include # include # include # include # include # include # include # include # include # include namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header # define AUX778076_APPLY_WRAP_PARAMS(n, param) \ BOOST_MPL_PP_PARAMS(n, param) \ /**/ # define AUX778076_APPLY_WRAP_SPEC_PARAMS(n, param) \ BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \ /**/ #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() # undef AUX778076_APPLY_WRAP_SPEC_PARAMS # undef AUX778076_APPLY_WRAP_PARAMS }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_APPLY_WRAP_HPP_INCLUDED ///// iteration, depth == 1 // For gcc 4.4 compatability, we must include the // BOOST_PP_ITERATION_DEPTH test inside an #else clause. #else // BOOST_PP_IS_ITERATING #if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // MSVC version #define AUX778076_MSVC_DTW_NAME BOOST_PP_CAT(msvc_apply,i_) #define AUX778076_MSVC_DTW_ORIGINAL_NAME apply #define AUX778076_MSVC_DTW_ARITY i_ #include template< typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply_wrap,i_) { // Metafunction forwarding confuses vc6 typedef typename BOOST_PP_CAT(msvc_apply,i_)::template result_< AUX778076_APPLY_WRAP_PARAMS(i_, T) >::type type; }; # elif defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) // MWCW/Borland version template< int N, typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply_wrap_impl,i_); #define BOOST_PP_ITERATION_PARAMS_2 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY - i_, )) #include BOOST_PP_ITERATE() template< typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply_wrap,i_) : BOOST_PP_CAT(apply_wrap_impl,i_)< ::boost::mpl::aux::arity::value , F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) >::type { }; # else // ISO98 C++, with minor concession to vc7 template< typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) #if i_ == 0 , typename has_apply_ = typename aux::has_apply::type #endif > struct BOOST_PP_CAT(apply_wrap,i_) // metafunction forwarding confuses MSVC 7.0 #if !BOOST_WORKAROUND(BOOST_MSVC, == 1300) : F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) > { #else { typedef typename F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) >::type type; #endif }; #if i_ == 0 && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename F > struct BOOST_PP_CAT(apply_wrap,i_) : F::apply { }; #endif # endif // workarounds #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) /// workaround for ETI bug template<> struct BOOST_PP_CAT(apply_wrap,i_) { typedef int type; }; #endif # undef i_ ///// iteration, depth == 2 #elif BOOST_PP_ITERATION_DEPTH() == 2 # define j_ BOOST_PP_FRAME_ITERATION(2) #if i_ == 0 && j_ == 0 \ && defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \ && !defined(BOOST_MPL_CFG_NO_HAS_APPLY) template< typename F, bool F_has_apply > struct apply_wrap_impl0_bcb { typedef typename F::template apply< na > type; }; template< typename F > struct apply_wrap_impl0_bcb< F, true > { typedef typename F::apply type; }; template< typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply_wrap_impl,i_)< BOOST_MPL_PP_ADD(i_, j_) , F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) > { typedef apply_wrap_impl0_bcb< F, aux::has_apply< F >::value >::type type; }; #else template< typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply_wrap_impl,i_)< BOOST_MPL_PP_ADD(i_, j_) , F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) > { typedef typename F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) #if i_ == 0 && j_ == 0 /// since the defaults are "lost", we have to pass *something* even for nullary /// metafunction classes na #else BOOST_PP_COMMA_IF(BOOST_PP_AND(i_, j_)) BOOST_MPL_PP_ENUM(j_, na) #endif > type; }; #endif # undef j_ #endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/arg.hpp000644 000765 000024 00000006366 12233035540 020227 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_ARG_HPP_INCLUDED #define BOOST_MPL_ARG_HPP_INCLUDED // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: arg.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include #endif #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER arg.hpp # include #else # include # include # include # include # include # include # include # include # include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN // local macro, #undef-ined at the end of the header #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ /**/ #else # define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ BOOST_MPL_PP_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ ) \ /**/ #endif #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() # undef AUX778076_ARG_N_DEFAULT_PARAMS BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_ARG_HPP_INCLUDED ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) #if i_ > 0 template<> struct arg { BOOST_STATIC_CONSTANT(int, value = i_); typedef arg next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) > struct apply { typedef BOOST_PP_CAT(U,i_) type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; #else template<> struct arg<-1> { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; #endif // i_ > 0 #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/arg_fwd.hpp000644 000765 000024 00000001461 12233035540 021056 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ARG_FWD_HPP_INCLUDED #define BOOST_MPL_ARG_FWD_HPP_INCLUDED // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: arg_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arg; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(arg) #endif // BOOST_MPL_ARG_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/arithmetic.hpp000644 000765 000024 00000001406 12233035540 021575 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ARITHMETIC_HPP_INCLUDED #define BOOST_MPL_ARITHMETIC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: arithmetic.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include // deprecated #endif // BOOST_MPL_ARITHMETIC_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/as_sequence.hpp000644 000765 000024 00000001735 12233035540 021744 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AS_SEQUENCE_HPP_INCLUDED #define BOOST_MPL_AS_SEQUENCE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: as_sequence.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct as_sequence : if_< is_sequence, T, single_view > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,as_sequence,(T)) }; BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, as_sequence) }} #endif // BOOST_MPL_AS_SEQUENCE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/assert.hpp000644 000765 000024 00000033533 12233035540 020753 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ASSERT_HPP_INCLUDED #define BOOST_MPL_ASSERT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: assert.hpp 84442 2013-05-23 14:38:22Z steven_watanabe $ // $Date: 2013-05-23 07:38:22 -0700 (Thu, 23 May 2013) $ // $Revision: 84442 $ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // make sure 'size_t' is placed into 'std' #include #if BOOST_WORKAROUND(BOOST_MSVC, == 1700) #include #endif #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || (BOOST_MPL_CFG_GCC != 0) \ || BOOST_WORKAROUND(__IBMCPP__, <= 600) # define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES #endif #if BOOST_WORKAROUND(__MWERKS__, < 0x3202) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER #endif // agurt, 10/nov/06: use enums for Borland (which cannot cope with static constants) // and GCC (which issues "unused variable" warnings when static constants are used // at a function scope) #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || (BOOST_MPL_CFG_GCC != 0) # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr } #else # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr) #endif BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN struct failed {}; // agurt, 24/aug/04: MSVC 7.1 workaround here and below: return/accept // 'assert' by reference; can't apply it unconditionally -- apparently it // degrades the quality of GCC diagnostics #if BOOST_WORKAROUND(BOOST_MSVC, == 1310) # define AUX778076_ASSERT_ARG(x) x& #else # define AUX778076_ASSERT_ARG(x) x #endif template< bool C > struct assert { typedef void* type; }; template<> struct assert { typedef AUX778076_ASSERT_ARG(assert) type; }; template< bool C > int assertion_failed( typename assert::type ); template< bool C > struct assertion { static int failed( assert ); }; template<> struct assertion { static int failed( void* ); }; struct assert_ { #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {}; #endif static assert_ const arg; enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal }; }; #if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) bool operator==( failed, failed ); bool operator!=( failed, failed ); bool operator>( failed, failed ); bool operator>=( failed, failed ); bool operator<( failed, failed ); bool operator<=( failed, failed ); #if defined(__EDG_VERSION__) template< bool (*)(failed, failed), long x, long y > struct assert_relation {}; # define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation #else template< BOOST_MPL_AUX_NTTP_DECL(long, x), BOOST_MPL_AUX_NTTP_DECL(long, y), bool (*)(failed, failed) > struct assert_relation {}; # define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation #endif #else // BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ ); boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ ); boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ ); boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ ); boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ ); boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ ); template< assert_::relations r, long x, long y > struct assert_relation {}; #endif #if BOOST_WORKAROUND(BOOST_MSVC, >= 1700) template struct extract_assert_pred; template struct extract_assert_pred { typedef Pred type; }; template struct eval_assert { typedef typename extract_assert_pred::type P; typedef typename P::type p_type; typedef typename ::boost::mpl::if_c), failed ************ P::************ >::type type; }; template struct eval_assert_not { typedef typename extract_assert_pred::type P; typedef typename P::type p_type; typedef typename ::boost::mpl::if_c), failed ************ ::boost::mpl::not_

::************ >::type type; }; template< typename T > T make_assert_arg(); #elif !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) template< bool > struct assert_arg_pred_impl { typedef int type; }; template<> struct assert_arg_pred_impl { typedef void* type; }; template< typename P > struct assert_arg_pred { typedef typename P::type p_type; typedef typename assert_arg_pred_impl< p_type::value >::type type; }; template< typename P > struct assert_arg_pred_not { typedef typename P::type p_type; BOOST_MPL_AUX_ASSERT_CONSTANT( bool, p = !p_type::value ); typedef typename assert_arg_pred_impl

::type type; }; template< typename Pred > failed ************ (Pred::************ assert_arg( void (*)(Pred), typename assert_arg_pred::type ) ); template< typename Pred > failed ************ (boost::mpl::not_::************ assert_not_arg( void (*)(Pred), typename assert_arg_pred_not::type ) ); template< typename Pred > AUX778076_ASSERT_ARG(assert) assert_arg( void (*)(Pred), typename assert_arg_pred_not::type ); template< typename Pred > AUX778076_ASSERT_ARG(assert) assert_not_arg( void (*)(Pred), typename assert_arg_pred::type ); #else // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER template< bool c, typename Pred > struct assert_arg_type_impl { typedef failed ************ Pred::* mwcw83_wknd; typedef mwcw83_wknd ************* type; }; template< typename Pred > struct assert_arg_type_impl { typedef AUX778076_ASSERT_ARG(assert) type; }; template< typename Pred > struct assert_arg_type : assert_arg_type_impl< BOOST_MPL_AUX_VALUE_WKND(BOOST_MPL_AUX_NESTED_TYPE_WKND(Pred))::value, Pred > { }; template< typename Pred > typename assert_arg_type::type assert_arg(void (*)(Pred), int); template< typename Pred > typename assert_arg_type< boost::mpl::not_ >::type assert_not_arg(void (*)(Pred), int); # if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) template< long x, long y, bool (*r)(failed, failed) > typename assert_arg_type_impl< false,BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) >::type assert_rel_arg( BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) ); # else template< assert_::relations r, long x, long y > typename assert_arg_type_impl< false,assert_relation >::type assert_rel_arg( assert_relation ); # endif #endif // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER #undef AUX778076_ASSERT_ARG BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #if BOOST_WORKAROUND(BOOST_MSVC, == 1700) // BOOST_MPL_ASSERT((pred)) #define BOOST_MPL_ASSERT(pred) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::make_assert_arg< \ typename boost::mpl::eval_assert::type \ >() \ ) \ ) \ ) \ /**/ // BOOST_MPL_ASSERT_NOT((pred)) #define BOOST_MPL_ASSERT_NOT(pred) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::make_assert_arg< \ typename boost::mpl::eval_assert_not::type \ >() \ ) \ ) \ ) \ /**/ #else // BOOST_MPL_ASSERT((pred)) #define BOOST_MPL_ASSERT(pred) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::assert_arg( (void (*) pred)0, 1 ) \ ) \ ) \ ) \ /**/ // BOOST_MPL_ASSERT_NOT((pred)) #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # define BOOST_MPL_ASSERT_NOT(pred) \ enum { \ BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion::failed( \ boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ ) \ ) \ }\ /**/ #else # define BOOST_MPL_ASSERT_NOT(pred) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ ) \ ) \ ) \ /**/ #endif #endif // BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y) #if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) # if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) // agurt, 9/nov/06: 'enum' below is a workaround for gcc 4.0.4/4.1.1 bugs #29522 and #29518 # define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \ enum { BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) }; \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion_failed( \ (boost::mpl::failed ************ ( boost::mpl::assert_relation< \ boost::mpl::assert_::relations( sizeof( \ boost::mpl::assert_::arg rel boost::mpl::assert_::arg \ ) ) \ , x \ , y \ >::************)) 0 ) \ ) \ ) \ /**/ # else # define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assert_rel,counter) = sizeof( \ boost::mpl::assert_::arg rel boost::mpl::assert_::arg \ ) \ ); \ BOOST_MPL_AUX_ASSERT_CONSTANT( bool, BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) ); \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::assert_rel_arg( boost::mpl::assert_relation< \ boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,counter)) \ , x \ , y \ >() ) \ ) \ ) \ ) \ /**/ # endif # define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \ /**/ #else // !BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES # if defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) # define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed<(x rel y)>( boost::mpl::assert_rel_arg( \ boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))() \ ) ) \ ) \ ) \ /**/ # else # define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed<(x rel y)>( (boost::mpl::failed ************ ( \ boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))::************))0 ) \ ) \ ) \ /**/ # endif #endif // BOOST_MPL_ASSERT_MSG( (pred::value), USER_PROVIDED_MESSAGE, (types) ) #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) # define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ struct msg; \ typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \ { \ using boost::mpl::assert_::types; \ static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ { return 0; } \ } BOOST_PP_CAT(mpl_assert_arg,counter); \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion<(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ ) \ ) \ /**/ #else # define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ struct msg; \ typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \ { \ static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ { return 0; } \ } BOOST_PP_CAT(mpl_assert_arg,counter); \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ ) \ ) \ /**/ #endif #define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \ BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \ /**/ #endif // BOOST_MPL_ASSERT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/at.hpp000644 000765 000024 00000002426 12233035540 020053 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AT_HPP_INCLUDED #define BOOST_MPL_AT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: at.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(N) > struct at : at_impl< typename sequence_tag::type > ::template apply< Sequence,N > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,at,(Sequence,N)) }; template< typename Sequence , BOOST_MPL_AUX_NTTP_DECL(long, N) > struct at_c : at_impl< typename sequence_tag::type > ::template apply< Sequence,mpl::long_ > { }; BOOST_MPL_AUX_NA_SPEC(2, at) }} #endif // BOOST_MPL_AT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/at_fwd.hpp000644 000765 000024 00000001213 12233035540 020704 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AT_FWD_HPP_INCLUDED #define BOOST_MPL_AT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: at_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct at_impl; template< typename Sequence, typename N > struct at; }} #endif // BOOST_MPL_AT_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/000755 000765 000024 00000000000 12233035540 017666 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/back.hpp000644 000765 000024 00000001754 12233035540 020352 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BACK_HPP_INCLUDED #define BOOST_MPL_BACK_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct back : back_impl< typename sequence_tag::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,back,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, back) }} #endif // BOOST_MPL_BACK_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/back_fwd.hpp000644 000765 000024 00000001213 12233035540 021200 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BACK_FWD_HPP_INCLUDED #define BOOST_MPL_BACK_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct back_impl; template< typename Sequence > struct back; }} #endif // BOOST_MPL_BACK_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/back_inserter.hpp000644 000765 000024 00000001436 12233035540 022262 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BACK_INSERTER_HPP_INCLUDED #define BOOST_MPL_BACK_INSERTER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: back_inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template< typename Sequence > struct back_inserter : inserter< Sequence,push_back<> > { }; }} #endif // BOOST_MPL_BACK_INSERTER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/base.hpp000644 000765 000024 00000001463 12233035540 020361 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BASE_HPP_INCLUDED #define BOOST_MPL_BASE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: base.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct base { typedef typename T::base type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,base,(T)) }; BOOST_MPL_AUX_NA_SPEC(1, base) }} #endif // BOOST_MPL_BASE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/begin.hpp000644 000765 000024 00000001040 12233035540 020522 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BEGIN_HPP_INCLUDED #define BOOST_MPL_BEGIN_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: begin.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #endif // BOOST_MPL_BEGIN_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/begin_end.hpp000644 000765 000024 00000003020 12233035540 021350 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BEGIN_END_HPP_INCLUDED #define BOOST_MPL_BEGIN_END_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { // agurt, 13/sep/02: switched from inheritance to typedef; MSVC is more // happy this way (less ETI-related errors), and it doesn't affect // anything else template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct begin { typedef typename sequence_tag::type tag_; typedef typename begin_impl< tag_ > ::template apply< Sequence >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,begin,(Sequence)) }; template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct end { typedef typename sequence_tag::type tag_; typedef typename end_impl< tag_ > ::template apply< Sequence >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,end,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, begin) BOOST_MPL_AUX_NA_SPEC(1, end) }} #endif // BOOST_MPL_BEGIN_END_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/begin_end_fwd.hpp000644 000765 000024 00000001366 12233035540 022223 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED #define BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: begin_end_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct begin_impl; template< typename Tag > struct end_impl; template< typename Sequence > struct begin; template< typename Sequence > struct end; }} #endif // BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/bind.hpp000644 000765 000024 00000035316 12233035540 020367 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_BIND_HPP_INCLUDED #define BOOST_MPL_BIND_HPP_INCLUDED // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: bind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include # include # include # include # include # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # include # endif #endif #include #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # if defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) # define BOOST_MPL_PREPROCESSED_HEADER basic_bind.hpp # else # define BOOST_MPL_PREPROCESSED_HEADER bind.hpp # endif # include #else # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header # define AUX778076_APPLY \ BOOST_PP_CAT(apply_wrap,BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ /**/ # if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) # define AUX778076_DMC_PARAM() , int dummy_ # else # define AUX778076_DMC_PARAM() # endif # define AUX778076_BIND_PARAMS(param) \ BOOST_MPL_PP_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ ) \ /**/ # define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ /**/ # define AUX778076_BIND_N_PARAMS(n, param) \ BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ /**/ # define AUX778076_BIND_N_SPEC_PARAMS(n, param, def) \ BOOST_PP_COMMA_IF(n) \ BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ /**/ #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ AUX778076_BIND_DEFAULT_PARAMS(param, value) \ /**/ #else # define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ AUX778076_BIND_PARAMS(param) \ /**/ #endif namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename T, AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg { typedef T type; }; # if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg<-1>,Arg > { typedef typename Arg::next next; typedef Arg type; }; # endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT template< BOOST_MPL_AUX_NTTP_DECL(int, N), AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg< arg,AUX778076_BIND_PARAMS(U) > { typedef typename AUX778076_APPLY, AUX778076_BIND_PARAMS(U)>::type type; }; #if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) template< typename F, AUX778076_BIND_PARAMS(typename T), AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg< bind,AUX778076_BIND_PARAMS(U) > { typedef bind f_; typedef typename AUX778076_APPLY::type type; }; #endif #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // agurt, 15/jan/02: it's not a intended to be used as a function class, and // MSVC6.5 has problems with 'apply' name here (the code compiles, but doesn't // work), so I went with the 'result_' here, and in all other similar cases template< bool > struct resolve_arg_impl { template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ { typedef typename AUX778076_APPLY< T , AUX778076_BIND_PARAMS(U) >::type type; }; }; // for 'resolve_bind_arg' template< typename T > struct is_bind_template; template< typename T, AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,AUX778076_BIND_PARAMS(U) > { }; # if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) template< typename T > struct replace_unnamed_arg_impl { template< typename Arg > struct result_ { typedef Arg next; typedef T type; }; }; template<> struct replace_unnamed_arg_impl< arg<-1> > { template< typename Arg > struct result_ { typedef typename next::type next; typedef Arg type; }; }; template< typename T, typename Arg > struct replace_unnamed_arg : replace_unnamed_arg_impl::template result_ { }; # endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT // agurt, 10/mar/02: the forward declaration has to appear before any of // 'is_bind_helper' overloads, otherwise MSVC6.5 issues an ICE on it template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); // overload for "main" form // agurt, 15/mar/02: MSVC 6.5 fails to properly resolve the overload // in case if we use 'aux::type_wrapper< bind<...> >' here, and all // 'bind' instantiations form a complete type anyway #if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) template< typename F, AUX778076_BIND_PARAMS(typename T) > aux::yes_tag is_bind_helper(bind*); #endif template< BOOST_MPL_AUX_NTTP_DECL(int, N) > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace aux #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) /// if_/eval_if specializations # define AUX778076_SPEC_NAME if_ # define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, )) # include BOOST_PP_ITERATE() #if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) # define AUX778076_SPEC_NAME eval_if # define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, )) # include BOOST_PP_ITERATE() #endif #endif // real C++ version is already taken care of #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) namespace aux { // apply_count_args #define AUX778076_COUNT_ARGS_PREFIX bind #define AUX778076_COUNT_ARGS_DEFAULT na #define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY #include } // bind template< typename F, AUX778076_BIND_PARAMS(typename T) AUX778076_DMC_PARAM() > struct bind : aux::bind_chooser< aux::bind_count_args::value >::template result_< F,AUX778076_BIND_PARAMS(T) >::type { }; BOOST_MPL_AUX_ARITY_SPEC( BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) , bind ) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) , bind ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # undef AUX778076_BIND_NESTED_DEFAULT_PARAMS # undef AUX778076_BIND_N_SPEC_PARAMS # undef AUX778076_BIND_N_PARAMS # undef AUX778076_BIND_DEFAULT_PARAMS # undef AUX778076_BIND_PARAMS # undef AUX778076_DMC_PARAM # undef AUX778076_APPLY }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_BIND_HPP_INCLUDED ///// iteration, depth == 1 // For gcc 4.4 compatability, we must include the // BOOST_PP_ITERATION_DEPTH test inside an #else clause. #else // BOOST_PP_IS_ITERATING #if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) #if defined(AUX778076_SPEC_NAME) // lazy metafunction specialization template< template< BOOST_MPL_PP_PARAMS(i_, typename T) > class F, typename Tag > struct BOOST_PP_CAT(quote,i_); template< BOOST_MPL_PP_PARAMS(i_, typename T) > struct AUX778076_SPEC_NAME; template< typename Tag AUX778076_BIND_N_PARAMS(i_, typename T) > struct BOOST_PP_CAT(bind,i_)< BOOST_PP_CAT(quote,i_) AUX778076_BIND_N_PARAMS(i_,T) > { template< AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) > struct apply { private: typedef mpl::arg<1> n1; # define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, )) # include BOOST_PP_ITERATE() typedef typename AUX778076_SPEC_NAME< typename t1::type , BOOST_MPL_PP_EXT_PARAMS(2, BOOST_PP_INC(i_), t) >::type f_; public: typedef typename f_::type type; }; }; #undef AUX778076_SPEC_NAME #else // AUX778076_SPEC_NAME template< typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() > struct BOOST_PP_CAT(bind,i_) { template< AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) > struct apply { private: # if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg::type f_; /// # else typedef typename aux::resolve_bind_arg::type f_; # endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT # if i_ > 0 # define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, )) # include BOOST_PP_ITERATE() # endif public: # define AUX778076_ARG(unused, i_, t) \ BOOST_PP_COMMA_IF(i_) \ typename BOOST_PP_CAT(t,BOOST_PP_INC(i_))::type \ /**/ typedef typename BOOST_PP_CAT(apply_wrap,i_)< f_ BOOST_PP_COMMA_IF(i_) BOOST_MPL_PP_REPEAT(i_, AUX778076_ARG, t) >::type type; # undef AUX778076_ARG }; }; namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename F AUX778076_BIND_N_PARAMS(i_, typename T), AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg< BOOST_PP_CAT(bind,i_),AUX778076_BIND_PARAMS(U) > { typedef BOOST_PP_CAT(bind,i_) f_; typedef typename AUX778076_APPLY::type type; }; #else template< typename F AUX778076_BIND_N_PARAMS(i_, typename T) > aux::yes_tag is_bind_helper(BOOST_PP_CAT(bind,i_)*); #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) # if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY /// primary template (not a specialization!) template< typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() > struct bind : BOOST_PP_CAT(bind,i_) { }; #else template< typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() > struct bind< F AUX778076_BIND_N_SPEC_PARAMS(i_, T, na) > : BOOST_PP_CAT(bind,i_) { }; #endif # else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace aux { template<> struct bind_chooser { template< typename F, AUX778076_BIND_PARAMS(typename T) > struct result_ { typedef BOOST_PP_CAT(bind,i_)< F AUX778076_BIND_N_PARAMS(i_,T) > type; }; }; } // namespace aux # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif // BOOST_MPL_CFG_NO_BIND_TEMPLATE #endif // AUX778076_SPEC_NAME # undef i_ ///// iteration, depth == 2 #elif BOOST_PP_ITERATION_DEPTH() == 2 # define j_ BOOST_PP_FRAME_ITERATION(2) # if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) typedef aux::replace_unnamed_arg< BOOST_PP_CAT(T,j_),BOOST_PP_CAT(n,j_) > BOOST_PP_CAT(r,j_); typedef typename BOOST_PP_CAT(r,j_)::type BOOST_PP_CAT(a,j_); typedef typename BOOST_PP_CAT(r,j_)::next BOOST_PP_CAT(n,BOOST_PP_INC(j_)); typedef aux::resolve_bind_arg BOOST_PP_CAT(t,j_); /// # else typedef aux::resolve_bind_arg< BOOST_PP_CAT(T,j_),AUX778076_BIND_PARAMS(U)> BOOST_PP_CAT(t,j_); # endif # undef j_ #endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/bind_fwd.hpp000644 000765 000024 00000005050 12233035540 021217 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_BIND_FWD_HPP_INCLUDED #define BOOST_MPL_BIND_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: bind_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER bind_fwd.hpp # include #else # include # include # include # include # include # include # include namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header # if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) # define AUX778076_DMC_PARAM() , int dummy_ = 0 # else # define AUX778076_DMC_PARAM() # endif # define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ AUX778076_DMC_PARAM() \ /**/ # define AUX778076_BIND_N_PARAMS(n, param) \ BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ AUX778076_DMC_PARAM() \ /**/ #if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) template< typename F, AUX778076_BIND_DEFAULT_PARAMS(typename T, na) > struct bind; #endif #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() # undef AUX778076_BIND_N_PARAMS # undef AUX778076_BIND_DEFAULT_PARAMS # undef AUX778076_DMC_PARAM }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_BIND_FWD_HPP_INCLUDED ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) template< typename F AUX778076_BIND_N_PARAMS(i_, typename T) > struct BOOST_PP_CAT(bind,i_); #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/bitand.hpp000644 000765 000024 00000002266 12233035540 020712 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BITAND_HPP_INCLUDED #define BOOST_MPL_BITAND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2009 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: bitand.hpp 63520 2010-07-02 08:59:55Z agurtovoy $ // $Date: 2010-07-02 01:59:55 -0700 (Fri, 02 Jul 2010) $ // $Revision: 63520 $ // agurt, 23/jan/10: workaround a conflict with header's // macros, see http://tinyurl.com/ycwdxco; 'defined(bitand)' // has to be checked in a separate condition, otherwise GCC complains // about 'bitand' being an alternative token #if defined(_MSC_VER) #ifndef __GCCXML__ #if defined(bitand) # pragma push_macro("bitand") # undef bitand # define bitand(x) #endif #endif #endif #define AUX778076_OP_NAME bitand_ #define AUX778076_OP_PREFIX bitand #define AUX778076_OP_TOKEN & #include #if defined(_MSC_VER) #ifndef __GCCXML__ #if defined(bitand) # pragma pop_macro("bitand") #endif #endif #endif #endif // BOOST_MPL_BITAND_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/bitor.hpp000644 000765 000024 00000002250 12233035540 020561 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BITOR_HPP_INCLUDED #define BOOST_MPL_BITOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2009 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: bitor.hpp 63520 2010-07-02 08:59:55Z agurtovoy $ // $Date: 2010-07-02 01:59:55 -0700 (Fri, 02 Jul 2010) $ // $Revision: 63520 $ // agurt, 23/jan/10: workaround a conflict with header's // macros, see http://tinyurl.com/ycwdxco; 'defined(bitor)' // has to be checked in a separate condition, otherwise GCC complains // about 'bitor' being an alternative token #if defined(_MSC_VER) #ifndef __GCCXML__ #if defined(bitor) # pragma push_macro("bitor") # undef bitor # define bitor(x) #endif #endif #endif #define AUX778076_OP_NAME bitor_ #define AUX778076_OP_PREFIX bitor #define AUX778076_OP_TOKEN | #include #if defined(_MSC_VER) #ifndef __GCCXML__ #if defined(bitor) # pragma pop_macro("bitor") #endif #endif #endif #endif // BOOST_MPL_BITOR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/bitwise.hpp000644 000765 000024 00000001317 12233035540 021113 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BITWISE_HPP_INCLUDED #define BOOST_MPL_BITWISE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: bitwise.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #endif // BOOST_MPL_BITWISE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/bitxor.hpp000644 000765 000024 00000001264 12233035540 020755 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BITXOR_HPP_INCLUDED #define BOOST_MPL_BITXOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: bitxor.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME bitxor_ #define AUX778076_OP_PREFIX bitxor #define AUX778076_OP_TOKEN ^ #include #endif // BOOST_MPL_BITXOR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/bool.hpp000644 000765 000024 00000002033 12233035540 020374 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BOOL_HPP_INCLUDED #define BOOST_MPL_BOOL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: bool.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< bool C_ > struct bool_ { BOOST_STATIC_CONSTANT(bool, value = C_); typedef integral_c_tag tag; typedef bool_ type; typedef bool value_type; operator bool() const { return this->value; } }; #if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) template< bool C_ > bool const bool_::value; #endif BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #endif // BOOST_MPL_BOOL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/bool_fwd.hpp000644 000765 000024 00000001551 12233035540 021240 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_BOOL_FWD_HPP_INCLUDED #define BOOST_MPL_BOOL_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: bool_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< bool C_ > struct bool_; // shorcuts typedef bool_ true_; typedef bool_ false_; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(bool_) BOOST_MPL_AUX_ADL_BARRIER_DECL(true_) BOOST_MPL_AUX_ADL_BARRIER_DECL(false_) #endif // BOOST_MPL_BOOL_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/char.hpp000644 000765 000024 00000001077 12233035540 020365 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_CHAR_HPP_INCLUDED #define BOOST_MPL_CHAR_HPP_INCLUDED // Copyright Eric Niebler 2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Source$ // $Date: 2008-06-14 08:41:37 -0700 (Sat, 16 Jun 2008) $ // $Revision: 24874 $ #include #define AUX_WRAPPER_VALUE_TYPE char #include #endif // BOOST_MPL_CHAR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/char_fwd.hpp000644 000765 000024 00000001336 12233035540 021223 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_CHAR_FWD_HPP_INCLUDED #define BOOST_MPL_CHAR_FWD_HPP_INCLUDED // Copyright Eric Niebler 2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Source$ // $Date: 2008-06-14 08:41:37 -0700 (Sat, 16 Jun 2008) $ // $Revision: 24874 $ #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< BOOST_MPL_AUX_NTTP_DECL(char, N) > struct char_; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(char_) #endif // BOOST_MPL_CHAR_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/clear.hpp000644 000765 000024 00000001766 12233035540 020543 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_CLEAR_HPP_INCLUDED #define BOOST_MPL_CLEAR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct clear : clear_impl< typename sequence_tag::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,clear,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, clear) }} #endif // BOOST_MPL_CLEAR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/clear_fwd.hpp000644 000765 000024 00000001221 12233035540 021365 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_CLEAR_FWD_HPP_INCLUDED #define BOOST_MPL_CLEAR_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: clear_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct clear_impl; template< typename Sequence > struct clear; }} #endif // BOOST_MPL_CLEAR_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/comparison.hpp000644 000765 000024 00000001350 12233035540 021614 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_COMPARISON_HPP_INCLUDED #define BOOST_MPL_COMPARISON_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: comparison.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #endif // BOOST_MPL_COMPARISON_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/contains.hpp000644 000765 000024 00000002134 12233035540 021261 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_CONTAINS_HPP_INCLUDED #define BOOST_MPL_CONTAINS_HPP_INCLUDED // Copyright Eric Friedman 2002 // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: contains.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct contains : contains_impl< typename sequence_tag::type > ::template apply< Sequence,T > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,contains,(Sequence,T)) }; BOOST_MPL_AUX_NA_SPEC(2, contains) }} #endif // BOOST_MPL_CONTAINS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/contains_fwd.hpp000644 000765 000024 00000001312 12233035540 022116 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED #define BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED // Copyright Eric Friedman 2002 // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: contains_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct contains_impl; template< typename Sequence, typename T > struct contains; }} #endif // BOOST_MPL_CONTAINS_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/copy.hpp000644 000765 000024 00000002271 12233035540 020417 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_COPY_HPP_INCLUDED #define BOOST_MPL_COPY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: copy.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Sequence , typename Inserter > struct copy_impl : fold< Sequence , typename Inserter::state , typename Inserter::operation > { }; template< typename Sequence , typename Inserter > struct reverse_copy_impl : reverse_fold< Sequence , typename Inserter::state , typename Inserter::operation > { }; } // namespace aux BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(2, copy) }} #endif // BOOST_MPL_COPY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/copy_if.hpp000644 000765 000024 00000004217 12233035540 021077 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_COPY_IF_HPP_INCLUDED #define BOOST_MPL_COPY_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: copy_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Operation , typename Predicate > struct copy_if_op { template< typename Sequence, typename T > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : eval_if< typename apply1::type , apply2 , identity > { #else { typedef typename eval_if< typename apply1::type , apply2 , identity >::type type; #endif }; }; template< typename Sequence , typename Predicate , typename Inserter > struct copy_if_impl : fold< Sequence , typename Inserter::state , protect< aux::copy_if_op< typename Inserter::operation , Predicate > > > { }; template< typename Sequence , typename Predicate , typename Inserter > struct reverse_copy_if_impl : reverse_fold< Sequence , typename Inserter::state , protect< aux::copy_if_op< typename Inserter::operation , Predicate > > > { }; } // namespace aux BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, copy_if) }} #endif // BOOST_MPL_COPY_IF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/count.hpp000644 000765 000024 00000002041 12233035540 020570 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_COUNT_HPP_INCLUDED #define BOOST_MPL_COUNT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: count.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct count : count_impl< typename sequence_tag::type > ::template apply { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,count,(Sequence,T)) }; BOOST_MPL_AUX_NA_SPEC(2, count) }} #endif // BOOST_MPL_COUNT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/count_fwd.hpp000644 000765 000024 00000001235 12233035540 021434 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_COUNT_FWD_HPP_INCLUDED #define BOOST_MPL_COUNT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: count_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct count_impl; template< typename Sequence, typename T > struct count; }} #endif // BOOST_MPL_COUNT_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/count_if.hpp000644 000765 000024 00000003521 12233035540 021252 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_COUNT_IF_HPP_INCLUDED #define BOOST_MPL_COUNT_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: count_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Predicate > struct next_if { template< typename N , typename T > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : eval_if< typename apply1::type , next , identity > { #else { typedef typename eval_if< typename apply1::type , next , identity >::type type; #endif }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(Predicate) > struct count_if : aux::msvc_eti_base< typename fold< Sequence , integral_c , protect< aux::next_if > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,count_if,(Sequence,Predicate)) }; BOOST_MPL_AUX_NA_SPEC(2, count_if) }} #endif // BOOST_MPL_COUNT_IF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/deque.hpp000644 000765 000024 00000003372 12233035540 020553 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_DEQUE_HPP_INCLUDED #define BOOST_MPL_DEQUE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: deque.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_DEQUE_HEADER \ BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE).hpp \ /**/ #else # define AUX778076_DEQUE_HEADER \ BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE)##.hpp \ /**/ #endif # include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_DEQUE_HEADER) # undef AUX778076_DEQUE_HEADER #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER deque.hpp # include #else # include # define AUX778076_SEQUENCE_NAME deque # define AUX778076_SEQUENCE_BASE_NAME vector # define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_DEQUE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/deref.hpp000644 000765 000024 00000002023 12233035540 020525 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_DEREF_HPP_INCLUDED #define BOOST_MPL_DEREF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: deref.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Iterator) > struct deref { #if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) typedef typename Iterator::type type; #else typedef typename aux::msvc_type::type type; #endif BOOST_MPL_AUX_LAMBDA_SUPPORT(1,deref,(Iterator)) }; BOOST_MPL_AUX_NA_SPEC(1, deref) }} #endif // BOOST_MPL_DEREF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/distance.hpp000644 000765 000024 00000004127 12233035540 021241 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_DISTANCE_HPP_INCLUDED #define BOOST_MPL_DISTANCE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: distance.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { // default implementation for forward/bidirectional iterators template< typename Tag > struct distance_impl { template< typename First, typename Last > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : aux::msvc_eti_base< typename iter_fold< iterator_range , mpl::long_<0> , next<> >::type > { #else { typedef typename iter_fold< iterator_range , mpl::long_<0> , next<> >::type type; BOOST_STATIC_CONSTANT(long, value = (iter_fold< iterator_range , mpl::long_<0> , next<> >::type::value) ); #endif }; }; template< typename BOOST_MPL_AUX_NA_PARAM(First) , typename BOOST_MPL_AUX_NA_PARAM(Last) > struct distance : distance_impl< typename tag::type > ::template apply { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, distance, (First, Last)) }; BOOST_MPL_AUX_NA_SPEC(2, distance) }} #endif // BOOST_MPL_DISTANCE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/distance_fwd.hpp000644 000765 000024 00000001411 12233035540 022072 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED #define BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: distance_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { BOOST_MPL_AUX_COMMON_NAME_WKND(distance) template< typename Tag > struct distance_impl; template< typename First, typename Last > struct distance; }} #endif // BOOST_MPL_DISTANCE_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/divides.hpp000644 000765 000024 00000001165 12233035540 021075 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_DIVIDES_HPP_INCLUDED #define BOOST_MPL_DIVIDES_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: divides.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME divides #define AUX778076_OP_TOKEN / #include #endif // BOOST_MPL_DIVIDES_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/empty.hpp000644 000765 000024 00000001766 12233035540 020613 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_EMPTY_HPP_INCLUDED #define BOOST_MPL_EMPTY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct empty : empty_impl< typename sequence_tag::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,empty,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, empty) }} #endif // BOOST_MPL_EMPTY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/empty_base.hpp000644 000765 000024 00000002661 12233035540 021600 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_EMPTY_BASE_HPP_INCLUDED #define BOOST_MPL_EMPTY_BASE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: empty_base.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include // should be always the last #include directive #include namespace boost { namespace mpl { // empty base class, guaranteed to have no members; inheritance from // 'empty_base' through the 'inherit' metafunction is a no-op - see // "mpl/inherit.hpp> header for the details struct empty_base {}; template< typename T > struct is_empty_base : false_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using false_::value; #endif }; template<> struct is_empty_base : true_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using true_::value; #endif }; }} namespace boost { BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_empty, mpl::empty_base, true) } #include #endif // BOOST_MPL_EMPTY_BASE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/empty_fwd.hpp000644 000765 000024 00000001221 12233035540 021435 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_EMPTY_FWD_HPP_INCLUDED #define BOOST_MPL_EMPTY_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: empty_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct empty_impl; template< typename Sequence > struct empty; }} #endif // BOOST_MPL_EMPTY_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/empty_sequence.hpp000644 000765 000024 00000001752 12233035540 022476 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED #define BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // Copyright Alexander Nasonov 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: empty_sequence.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { struct empty_sequence { struct tag; struct begin { typedef random_access_iterator_tag category; }; typedef begin end; }; template<> struct size_impl { template< typename Sequence > struct apply : int_<0> { }; }; }} #endif // #ifndef BOOST_MPL_EMPTY_SEQUENCE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/end.hpp000644 000765 000024 00000001030 12233035540 020203 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_END_HPP_INCLUDED #define BOOST_MPL_END_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #endif // BOOST_MPL_END_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/equal.hpp000644 000765 000024 00000005324 12233035540 020556 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_EQUAL_HPP_INCLUDED #define BOOST_MPL_EQUAL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Predicate , typename LastIterator1 , typename LastIterator2 > struct equal_pred { template< typename Iterator2 , typename Iterator1 > struct apply { typedef typename and_< not_< is_same > , not_< is_same > , aux::iter_apply2 >::type type; }; }; template< typename Sequence1 , typename Sequence2 , typename Predicate > struct equal_impl { typedef typename begin::type first1_; typedef typename begin::type first2_; typedef typename end::type last1_; typedef typename end::type last2_; typedef aux::iter_fold_if_impl< first1_ , first2_ , next<> , protect< aux::equal_pred > , void_ , always > fold_; typedef typename fold_::iterator iter1_; typedef typename fold_::state iter2_; typedef and_< is_same , is_same > result_; typedef typename result_::type type; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(Sequence1) , typename BOOST_MPL_AUX_NA_PARAM(Sequence2) , typename Predicate = is_same<_,_> > struct equal : aux::msvc_eti_base< typename aux::equal_impl::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,equal,(Sequence1,Sequence2)) }; BOOST_MPL_AUX_NA_SPEC(2, equal) }} #endif // BOOST_MPL_EQUAL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/equal_to.hpp000644 000765 000024 00000001173 12233035540 021256 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_EQUAL_TO_HPP_INCLUDED #define BOOST_MPL_EQUAL_TO_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: equal_to.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME equal_to #define AUX778076_OP_TOKEN == #include #endif // BOOST_MPL_EQUAL_TO_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/erase.hpp000644 000765 000024 00000002227 12233035540 020545 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ERASE_HPP_INCLUDED #define BOOST_MPL_ERASE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: erase.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(First) , typename BOOST_MPL_AUX_NA_PARAM(Last) > struct erase : erase_impl< typename sequence_tag::type > ::template apply< Sequence,First,Last > { BOOST_MPL_AUX_LAMBDA_SUPPORT(3,erase,(Sequence,First,Last)) }; BOOST_MPL_AUX_NA_SPEC(3,erase) }} #endif // BOOST_MPL_ERASE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/erase_fwd.hpp000644 000765 000024 00000001260 12233035540 021401 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ERASE_FWD_HPP_INCLUDED #define BOOST_MPL_ERASE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: erase_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct erase_impl; template< typename Sequence, typename First, typename Last > struct erase; }} #endif // BOOST_MPL_ERASE_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/erase_key.hpp000644 000765 000024 00000002203 12233035540 021407 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ERASE_KEY_HPP_INCLUDED #define BOOST_MPL_ERASE_KEY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: erase_key.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(Key) > struct erase_key : erase_key_impl< typename sequence_tag::type > ::template apply< Sequence,Key > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,erase_key,(Sequence,Key)) }; BOOST_MPL_AUX_NA_SPEC(2,erase_key) }} #endif // BOOST_MPL_ERASE_KEY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/erase_key_fwd.hpp000644 000765 000024 00000001267 12233035540 022260 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED #define BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: erase_key_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct erase_key_impl; template< typename Sequence, typename Key > struct erase_key; }} #endif // BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/eval_if.hpp000644 000765 000024 00000003510 12233035540 021047 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_EVAL_IF_HPP_INCLUDED #define BOOST_MPL_EVAL_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: eval_if.hpp 61921 2010-05-11 21:33:24Z neilgroves $ // $Date: 2010-05-11 14:33:24 -0700 (Tue, 11 May 2010) $ // $Revision: 61921 $ #include #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(C) , typename BOOST_MPL_AUX_NA_PARAM(F1) , typename BOOST_MPL_AUX_NA_PARAM(F2) > struct eval_if #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \ && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \ ) { typedef typename if_::type f_; typedef typename f_::type type; #else : if_::type { #endif BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2)) }; // (almost) copy & paste in order to save one more // recursively nested template instantiation to user template< bool C , typename F1 , typename F2 > struct eval_if_c #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \ && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \ ) { typedef typename if_c::type f_; typedef typename f_::type type; #else : if_c::type { #endif }; BOOST_MPL_AUX_NA_SPEC(3, eval_if) }} #endif // BOOST_MPL_EVAL_IF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/filter_view.hpp000644 000765 000024 00000002347 12233035540 021770 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_FILTER_VIEW_HPP_INCLUDED #define BOOST_MPL_FILTER_VIEW_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: filter_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(Predicate) > struct filter_view { private: typedef typename lambda::type pred_; typedef typename begin::type first_; typedef typename end::type last_; public: struct tag; typedef filter_view type; typedef typename aux::next_filter_iter< first_,last_,pred_ >::type begin; typedef aux::filter_iter< last_,last_,pred_ > end; }; BOOST_MPL_AUX_NA_SPEC(2, filter_view) }} #endif // BOOST_MPL_FILTER_VIEW_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/find.hpp000644 000765 000024 00000001660 12233035540 020366 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_FIND_HPP_INCLUDED #define BOOST_MPL_FIND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: find.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct find : find_if< Sequence,same_as > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find,(Sequence,T)) }; BOOST_MPL_AUX_NA_SPEC(2, find) }} #endif // BOOST_MPL_FIND_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/find_if.hpp000644 000765 000024 00000002426 12233035540 021045 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_FIND_IF_HPP_INCLUDED #define BOOST_MPL_FIND_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: find_if.hpp 49274 2008-10-11 07:22:05Z agurtovoy $ // $Date: 2008-10-11 00:22:05 -0700 (Sat, 11 Oct 2008) $ // $Revision: 49274 $ #include #include #include #include #include #include namespace boost { namespace mpl { BOOST_MPL_AUX_COMMON_NAME_WKND(find_if) template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(Predicate) > struct find_if { typedef typename iter_fold_if< Sequence , void , mpl::arg<1> // ignore , protect< aux::find_if_pred > >::type result_; typedef typename second::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find_if,(Sequence,Predicate)) }; BOOST_MPL_AUX_NA_SPEC(2,find_if) }} #endif // BOOST_MPL_FIND_IF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/fold.hpp000644 000765 000024 00000002400 12233035540 020363 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_FOLD_HPP_INCLUDED #define BOOST_MPL_FOLD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(State) , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp) > struct fold { typedef typename aux::fold_impl< ::boost::mpl::O1_size::value , typename begin::type , typename end::type , State , ForwardOp >::state type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,fold,(Sequence,State,ForwardOp)) }; BOOST_MPL_AUX_NA_SPEC(3, fold) }} #endif // BOOST_MPL_FOLD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/for_each.hpp000644 000765 000024 00000005515 12233035540 021217 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_FOR_EACH_HPP_INCLUDED #define BOOST_MPL_FOR_EACH_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: for_each.hpp 55648 2009-08-18 05:16:53Z agurtovoy $ // $Date: 2009-08-17 22:16:53 -0700 (Mon, 17 Aug 2009) $ // $Revision: 55648 $ #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< bool done = true > struct for_each_impl { template< typename Iterator , typename LastIterator , typename TransformFunc , typename F > static void execute( Iterator* , LastIterator* , TransformFunc* , F ) { } }; template<> struct for_each_impl { template< typename Iterator , typename LastIterator , typename TransformFunc , typename F > static void execute( Iterator* , LastIterator* , TransformFunc* , F f ) { typedef typename deref::type item; typedef typename apply1::type arg; // dwa 2002/9/10 -- make sure not to invoke undefined behavior // when we pass arg. value_initialized x; aux::unwrap(f, 0)(boost::get(x)); typedef typename mpl::next::type iter; for_each_impl::value> ::execute( static_cast(0), static_cast(0), static_cast(0), f); } }; } // namespace aux // agurt, 17/mar/02: pointer default parameters are necessary to workaround // MSVC 6.5 function template signature's mangling bug template< typename Sequence , typename TransformOp , typename F > inline void for_each(F f, Sequence* = 0, TransformOp* = 0) { BOOST_MPL_ASSERT(( is_sequence )); typedef typename begin::type first; typedef typename end::type last; aux::for_each_impl< boost::is_same::value > ::execute(static_cast(0), static_cast(0), static_cast(0), f); } template< typename Sequence , typename F > inline void for_each(F f, Sequence* = 0) { for_each >(f); } }} #endif // BOOST_MPL_FOR_EACH_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/front.hpp000644 000765 000024 00000001766 12233035540 020605 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_FRONT_HPP_INCLUDED #define BOOST_MPL_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct front : front_impl< typename sequence_tag::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,front,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, front) }} #endif // BOOST_MPL_FRONT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/front_fwd.hpp000644 000765 000024 00000001221 12233035540 021427 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_FRONT_FWD_HPP_INCLUDED #define BOOST_MPL_FRONT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct front_impl; template< typename Sequence > struct front; }} #endif // BOOST_MPL_FRONT_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/front_inserter.hpp000644 000765 000024 00000001445 12233035540 022512 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED #define BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: front_inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template< typename Sequence > struct front_inserter : inserter< Sequence,push_front<> > { }; }} #endif // BOOST_MPL_FRONT_INSERTER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/greater.hpp000644 000765 000024 00000001165 12233035540 021077 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_GREATER_HPP_INCLUDED #define BOOST_MPL_GREATER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: greater.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME greater #define AUX778076_OP_TOKEN > #include #endif // BOOST_MPL_GREATER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/greater_equal.hpp000644 000765 000024 00000001224 12233035540 022262 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED #define BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: greater_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME greater_equal #define AUX778076_OP_TOKEN >= #include #endif // BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/has_key.hpp000644 000765 000024 00000002215 12233035540 021066 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_HAS_KEY_HPP_INCLUDED #define BOOST_MPL_HAS_KEY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_key.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence) , typename BOOST_MPL_AUX_NA_PARAM(Key) > struct has_key : has_key_impl< typename sequence_tag::type > ::template apply { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,has_key,(AssociativeSequence,Key)) }; BOOST_MPL_AUX_NA_SPEC(2, has_key) }} #endif // BOOST_MPL_HAS_KEY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/has_key_fwd.hpp000644 000765 000024 00000001334 12233035540 021727 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED #define BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_key_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct has_key_impl; template< typename AssociativeSequence, typename Key > struct has_key; }} #endif // BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/has_xxx.hpp000644 000765 000024 00000052556 12233035540 021142 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_HAS_XXX_HPP_INCLUDED #define BOOST_MPL_HAS_XXX_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2006 // Copyright David Abrahams 2002-2003 // Copyright Daniel Walker 2007 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_xxx.hpp 64146 2010-07-19 00:46:31Z djwalker $ // $Date: 2010-07-18 17:46:31 -0700 (Sun, 18 Jul 2010) $ // $Revision: 64146 $ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) ) # include #endif #if !defined(BOOST_MPL_CFG_NO_HAS_XXX) # if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) // agurt, 11/sep/02: MSVC-specific version (< 7.1), based on a USENET // newsgroup's posting by John Madsen (comp.lang.c++.moderated, // 1999-11-12 19:17:06 GMT); the code is _not_ standard-conforming, but // it works way more reliably than the SFINAE-based implementation // Modified dwa 8/Oct/02 to handle reference types. # include # include namespace boost { namespace mpl { namespace aux { struct has_xxx_tag; #if BOOST_WORKAROUND(BOOST_MSVC, == 1300) template< typename U > struct msvc_incomplete_array { typedef char (&type)[sizeof(U) + 1]; }; #endif template< typename T > struct msvc_is_incomplete { // MSVC is capable of some kinds of SFINAE. If U is an incomplete // type, it won't pick the second overload static char tester(...); #if BOOST_WORKAROUND(BOOST_MSVC, == 1300) template< typename U > static typename msvc_incomplete_array::type tester(type_wrapper); #else template< typename U > static char (& tester(type_wrapper) )[sizeof(U)+1]; #endif BOOST_STATIC_CONSTANT(bool, value = sizeof(tester(type_wrapper())) == 1 ); }; template<> struct msvc_is_incomplete { BOOST_STATIC_CONSTANT(bool, value = false); }; }}} # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, default_) \ template< typename T, typename name = ::boost::mpl::aux::has_xxx_tag > \ struct BOOST_PP_CAT(trait,_impl) : T \ { \ static boost::mpl::aux::no_tag \ test(void(*)(::boost::mpl::aux::has_xxx_tag)); \ \ static boost::mpl::aux::yes_tag test(...); \ \ BOOST_STATIC_CONSTANT(bool, value = \ sizeof(test(static_cast(0))) \ != sizeof(boost::mpl::aux::no_tag) \ ); \ typedef boost::mpl::bool_ type; \ }; \ \ template< typename T, typename fallback_ = boost::mpl::bool_ > \ struct trait \ : boost::mpl::if_c< \ boost::mpl::aux::msvc_is_incomplete::value \ , boost::mpl::bool_ \ , BOOST_PP_CAT(trait,_impl) \ >::type \ { \ }; \ \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, void) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, bool) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, char) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \ /**/ # define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \ template<> struct trait \ { \ BOOST_STATIC_CONSTANT(bool, value = false); \ typedef boost::mpl::bool_ type; \ }; \ /**/ #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \ /**/ #else # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ /**/ #endif // SFINAE-based implementations below are derived from a USENET newsgroup's // posting by Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST) # elif BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ || BOOST_WORKAROUND(__IBMCPP__, <= 700) // MSVC 7.1+ & VACPP // agurt, 15/jun/05: replace overload-based SFINAE implementation with SFINAE // applied to partial specialization to fix some apparently random failures // (thanks to Daniel Wallin for researching this!) # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ template< typename T > \ struct BOOST_PP_CAT(trait, _msvc_sfinae_helper) \ { \ typedef void type; \ };\ \ template< typename T, typename U = void > \ struct BOOST_PP_CAT(trait,_impl_) \ { \ BOOST_STATIC_CONSTANT(bool, value = false); \ typedef boost::mpl::bool_ type; \ }; \ \ template< typename T > \ struct BOOST_PP_CAT(trait,_impl_)< \ T \ , typename BOOST_PP_CAT(trait, _msvc_sfinae_helper)< typename T::name >::type \ > \ { \ BOOST_STATIC_CONSTANT(bool, value = true); \ typedef boost::mpl::bool_ type; \ }; \ \ template< typename T, typename fallback_ = boost::mpl::bool_ > \ struct trait \ : BOOST_PP_CAT(trait,_impl_) \ { \ }; \ /**/ # elif BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) ) # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF(trait, trait_tester, name, default_) \ template< typename T, bool IS_CLASS > \ struct trait_tester \ { \ BOOST_STATIC_CONSTANT( bool, value = false ); \ }; \ template< typename T > \ struct trait_tester< T, true > \ { \ struct trait_tester_impl \ { \ template < class U > \ static int resolve( boost::mpl::aux::type_wrapper const volatile * \ , boost::mpl::aux::type_wrapper* = 0 ); \ static char resolve( ... ); \ }; \ typedef boost::mpl::aux::type_wrapper t_; \ BOOST_STATIC_CONSTANT( bool, value = ( sizeof( trait_tester_impl::resolve( static_cast< t_ * >(0) ) ) == sizeof(int) ) ); \ }; \ template< typename T, typename fallback_ = boost::mpl::bool_ > \ struct trait \ { \ BOOST_STATIC_CONSTANT( bool, value = (trait_tester< T, boost::is_class< T >::value >::value) ); \ typedef boost::mpl::bool_< trait< T, fallback_ >::value > type; \ }; # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF( trait \ , BOOST_PP_CAT(trait,_tester) \ , name \ , default_ ) \ /**/ # else // other SFINAE-capable compilers # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ template< typename T, typename fallback_ = boost::mpl::bool_ > \ struct trait \ { \ struct gcc_3_2_wknd \ { \ template< typename U > \ static boost::mpl::aux::yes_tag test( \ boost::mpl::aux::type_wrapper const volatile* \ , boost::mpl::aux::type_wrapper* = 0 \ ); \ \ static boost::mpl::aux::no_tag test(...); \ }; \ \ typedef boost::mpl::aux::type_wrapper t_; \ BOOST_STATIC_CONSTANT(bool, value = \ sizeof(gcc_3_2_wknd::test(static_cast(0))) \ == sizeof(boost::mpl::aux::yes_tag) \ ); \ typedef boost::mpl::bool_ type; \ }; \ /**/ # endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300) #else // BOOST_MPL_CFG_NO_HAS_XXX // placeholder implementation # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ template< typename T, typename fallback_ = boost::mpl::bool_ > \ struct trait \ { \ BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \ typedef fallback_ type; \ }; \ /**/ #endif #define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(has_,name), name, false) \ /**/ #if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE) // Create a boolean Metafunction to detect a nested template // member. This implementation is based on a USENET newsgroup's // posting by Aleksey Gurtovoy (comp.lang.c++.moderated, 2002-03-19), // Rani Sharoni's USENET posting cited above, the non-template has_xxx // implementations above, and discussion on the Boost mailing list. # if !defined(BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES) # if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) # define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 1 # endif # endif # if !defined(BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION) # if (defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS)) # define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 1 # endif # endif # if !defined(BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE) # if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) # define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 1 # endif # endif // NOTE: Many internal implementation macros take a Boost.Preprocessor // array argument called args which is of the following form. // ( 4, ( trait, name, max_arity, default_ ) ) # define BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \ BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _introspect) \ /**/ # define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _substitute), n) \ /**/ # define BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) \ BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _test) \ /**/ // Thanks to Guillaume Melquiond for pointing out the need for the // "substitute" template as an argument to the overloaded test // functions to get SFINAE to work for member templates with the // correct name but different number of arguments. # define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE(z, n, args) \ template< \ template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename V) > class V \ > \ struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) { \ }; \ /**/ # define BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \ BOOST_PP_REPEAT( \ BOOST_PP_ARRAY_ELEM(2, args) \ , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE \ , args \ ) \ /**/ # if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION # define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ template< typename V > \ static boost::mpl::aux::no_tag \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \ /**/ # else # define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ static boost::mpl::aux::no_tag \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \ /**/ # endif # if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES # define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT(z, n, args) \ template< typename V > \ static boost::mpl::aux::yes_tag \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ boost::mpl::aux::type_wrapper< V > const volatile* \ , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) < \ V::template BOOST_PP_ARRAY_ELEM(1, args) \ >* = 0 \ ); \ /**/ # define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ BOOST_PP_REPEAT( \ BOOST_PP_ARRAY_ELEM(2, args) \ , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT \ , args \ ) \ /**/ # else # define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ template< typename V > \ static boost::mpl::aux::yes_tag \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ V const volatile* \ , member_macro(args, V, T)* = 0 \ ); \ /**/ # endif # if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION # define BOOST_MPL_HAS_MEMBER_TEST(args) \ sizeof(BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U >(0)) \ == sizeof(boost::mpl::aux::yes_tag) \ /**/ # else # if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES # define BOOST_MPL_HAS_MEMBER_TEST(args) \ sizeof( \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ static_cast< boost::mpl::aux::type_wrapper< U >* >(0) \ ) \ ) == sizeof(boost::mpl::aux::yes_tag) \ /**/ # else # define BOOST_MPL_HAS_MEMBER_TEST(args) \ sizeof( \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ static_cast< U* >(0) \ ) \ ) == sizeof(boost::mpl::aux::yes_tag) \ /**/ # endif # endif # define BOOST_MPL_HAS_MEMBER_INTROSPECT( \ args, substitute_macro, member_macro \ ) \ template< typename U > \ struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) { \ BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \ BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ BOOST_STATIC_CONSTANT( \ bool, value = BOOST_MPL_HAS_MEMBER_TEST(args) \ ); \ typedef boost::mpl::bool_< value > type; \ }; \ /**/ # define BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ args, introspect_macro, substitute_macro, member_macro \ ) \ template< \ typename T \ , typename fallback_ \ = boost::mpl::bool_< BOOST_PP_ARRAY_ELEM(3, args) > \ > \ class BOOST_PP_ARRAY_ELEM(0, args) { \ introspect_macro(args, substitute_macro, member_macro) \ public: \ static const bool value \ = BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< T >::value; \ typedef typename BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< \ T \ >::type type; \ }; \ /**/ // BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE expands to the full // implementation of the function-based metafunction. Compile with -E // to see the preprocessor output for this macro. # define BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \ args, substitute_macro, member_macro \ ) \ BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ args \ , BOOST_MPL_HAS_MEMBER_INTROSPECT \ , substitute_macro \ , member_macro \ ) \ /**/ # if BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE # if !defined(BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE) # if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) # define BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE 1 # endif # endif # if !BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE # define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ args, n \ ) \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ /**/ # else # define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ args, n \ ) \ BOOST_PP_CAT( \ boost_mpl_has_xxx_ \ , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ ) \ /**/ # endif # define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME( \ args \ ) \ BOOST_PP_CAT( \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ args, 0 \ ) \ , _tag \ ) \ /**/ # define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ z, n, args \ ) \ template< \ template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename U) > class U \ > \ struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ args, n \ ) { \ typedef \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \ type; \ }; \ /**/ # define BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ args, substitute_macro \ ) \ typedef void \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args); \ BOOST_PP_REPEAT( \ BOOST_PP_ARRAY_ELEM(2, args) \ , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE \ , args \ ) \ /**/ # define BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE( \ args, member_macro \ ) \ template< \ typename U \ , typename V \ = BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \ > \ struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) { \ BOOST_STATIC_CONSTANT(bool, value = false); \ typedef boost::mpl::bool_< value > type; \ }; \ /**/ # define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE( \ z, n, args \ ) \ template< typename U > \ struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< \ U \ , typename \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ args, n \ )< \ BOOST_MSVC_TYPENAME U::BOOST_PP_ARRAY_ELEM(1, args)< > \ >::type \ > { \ BOOST_STATIC_CONSTANT(bool, value = true); \ typedef boost::mpl::bool_< value > type; \ }; \ /**/ # define BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE( \ args, member_macro \ ) \ BOOST_PP_REPEAT( \ BOOST_PP_ARRAY_ELEM(2, args) \ , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE \ , args \ ) \ /**/ # define BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE( \ args, substitute_macro, member_macro \ ) \ BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE(args, member_macro) \ BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE(args, member_macro) \ template< typename U > \ struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \ : BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U > { \ }; \ /**/ // BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE expands to the full // implementation of the template-based metafunction. Compile with -E // to see the preprocessor output for this macro. // // Note that if BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE is // defined BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE needs // to be expanded at namespace level before // BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE can be used. # define BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \ args, substitute_macro, member_macro \ ) \ BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ args, substitute_macro \ ) \ BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ args \ , BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE \ , substitute_macro \ , member_macro \ ) \ /**/ # endif // BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE // Note: In the current implementation the parameter and access macros // are no longer expanded. # if !BOOST_WORKAROUND(BOOST_MSVC, <= 1400) # define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \ ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \ , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \ , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \ ) \ /**/ # else # define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \ ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \ , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \ , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \ ) \ /**/ # endif #else // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE // placeholder implementation # define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ template< typename T \ , typename fallback_ = boost::mpl::bool_< default_ > > \ struct trait { \ BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \ typedef fallback_ type; \ }; \ /**/ #endif // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE # define BOOST_MPL_HAS_XXX_TEMPLATE_DEF(name) \ BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF( \ BOOST_PP_CAT(has_, name), name, false \ ) \ /**/ #endif // BOOST_MPL_HAS_XXX_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/identity.hpp000644 000765 000024 00000002042 12233035540 021272 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_IDENTITY_HPP_INCLUDED #define BOOST_MPL_IDENTITY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: identity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct identity { typedef T type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1, identity, (T)) }; template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct make_identity { typedef identity type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1, make_identity, (T)) }; BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, identity) BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, make_identity) }} #endif // BOOST_MPL_IDENTITY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/if.hpp000644 000765 000024 00000005705 12233035540 020050 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_IF_HPP_INCLUDED #define BOOST_MPL_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< bool C , typename T1 , typename T2 > struct if_c { typedef T1 type; }; template< typename T1 , typename T2 > struct if_c { typedef T2 type; }; // agurt, 05/sep/04: nondescriptive parameter names for the sake of DigitalMars // (and possibly MWCW < 8.0); see http://article.gmane.org/gmane.comp.lib.boost.devel/108959 template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename BOOST_MPL_AUX_NA_PARAM(T3) > struct if_ { private: // agurt, 02/jan/03: two-step 'type' definition for the sake of aCC typedef if_c< #if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) BOOST_MPL_AUX_VALUE_WKND(T1)::value #else BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value) #endif , T2 , T3 > almost_type_; public: typedef typename almost_type_::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(T1,T2,T3)) }; #else // no partial class template specialization namespace aux { template< bool C > struct if_impl { template< typename T1, typename T2 > struct result_ { typedef T1 type; }; }; template<> struct if_impl { template< typename T1, typename T2 > struct result_ { typedef T2 type; }; }; } // namespace aux template< bool C_ , typename T1 , typename T2 > struct if_c { typedef typename aux::if_impl< C_ > ::template result_::type type; }; // (almost) copy & paste in order to save one more // recursively nested template instantiation to user template< typename BOOST_MPL_AUX_NA_PARAM(C_) , typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct if_ { enum { msvc_wknd_ = BOOST_MPL_AUX_MSVC_VALUE_WKND(C_)::value }; typedef typename aux::if_impl< BOOST_MPL_AUX_STATIC_CAST(bool, msvc_wknd_) > ::template result_::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C_,T1,T2)) }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_MPL_AUX_NA_SPEC(3, if_) }} #endif // BOOST_MPL_IF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/index_if.hpp000644 000765 000024 00000003117 12233035540 021232 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INDEX_IF_HPP_INCLUDED #define BOOST_MPL_INDEX_IF_HPP_INCLUDED // Copyright Eric Friedman 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: index_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(Predicate) > struct index_if { typedef typename iter_fold_if< Sequence , int_<0> , next<> , aux::find_if_pred >::type result_; typedef typename end::type not_found_; typedef typename first::type result_index_; typedef typename second::type result_iterator_; typedef typename if_< is_same< result_iterator_,not_found_ > , void_ , result_index_ >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,index_if,(Sequence,Predicate)) }; BOOST_MPL_AUX_NA_SPEC(2, index_if) }} #endif // BOOST_MPL_INDEX_IF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/index_of.hpp000644 000765 000024 00000001756 12233035540 021247 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INDEX_OF_HPP_INCLUDED #define BOOST_MPL_INDEX_OF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright Eric Friedman 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: index_of.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct index_of : index_if< Sequence,same_as > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,index_of,(Sequence,T)) }; BOOST_MPL_AUX_NA_SPEC(2, index_of) }} #endif // BOOST_MPL_INDEX_OF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/inherit.hpp000644 000765 000024 00000013220 12233035540 021103 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_INHERIT_HPP_INCLUDED #define BOOST_MPL_INHERIT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: inherit.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER inherit.hpp # include #else # include # include # include # include # include # include # include # include # include namespace boost { namespace mpl { // 'inherit' metafunction; returns an unspecified class type // produced by public derivation from all metafunction's parameters // (T1,T2,..,Tn), except the parameters of 'empty_base' class type; // regardless the position and number of 'empty_base' parameters in the // metafunction's argument list, derivation from them is always a no-op; // for instance: // inherit::type == her // inherit::type == struct unspecified : her, my {}; // inherit::type == her // inherit::type == her // inherit::type == struct unspecified : her, my {}; // inherit::type == empty_base #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1,T2)) }; template< typename T1 > struct inherit2 { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1,empty_base)) }; template< typename T2 > struct inherit2 { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base,T2)) }; // needed to disambiguate the previous two in case when both // T1 and T2 == empty_base template<> struct inherit2 { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base,empty_base)) }; #else namespace aux { template< bool C1, bool C2 > struct inherit2_impl { template< typename Derived, typename T1, typename T2 > struct result_ : T1, T2 { typedef Derived type_; }; }; template<> struct inherit2_impl { template< typename Derived, typename T1, typename T2 > struct result_ : T1 { typedef T1 type_; }; }; template<> struct inherit2_impl { template< typename Derived, typename T1, typename T2 > struct result_ : T2 { typedef T2 type_; }; }; template<> struct inherit2_impl { template< typename Derived, typename T1, typename T2 > struct result_ { typedef T1 type_; }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : aux::inherit2_impl< is_empty_base::value , is_empty_base::value >::template result_< inherit2,T1,T2 > { typedef typename inherit2::type_ type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1,T2)) }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_MPL_AUX_NA_SPEC(2, inherit2) #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(3, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_INHERIT_HPP_INCLUDED ///// iteration #else #define n_ BOOST_PP_FRAME_ITERATION(1) template< BOOST_MPL_PP_DEFAULT_PARAMS(n_, typename T, na) > struct BOOST_PP_CAT(inherit,n_) : inherit2< typename BOOST_PP_CAT(inherit,BOOST_PP_DEC(n_))< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(n_), T) >::type , BOOST_PP_CAT(T,n_) > { BOOST_MPL_AUX_LAMBDA_SUPPORT( n_ , BOOST_PP_CAT(inherit,n_) , (BOOST_MPL_PP_PARAMS(n_, T)) ) }; BOOST_MPL_AUX_NA_SPEC(n_, BOOST_PP_CAT(inherit,n_)) #if n_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY /// primary template template< BOOST_MPL_PP_DEFAULT_PARAMS(n_, typename T, empty_base) > struct inherit : BOOST_PP_CAT(inherit,n_) { }; // 'na' specialization template<> struct inherit< BOOST_MPL_PP_ENUM(5, na) > { template< #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) BOOST_MPL_PP_DEFAULT_PARAMS(n_, typename T, empty_base) #else BOOST_MPL_PP_PARAMS(n_, typename T) #endif > struct apply : inherit< BOOST_MPL_PP_PARAMS(n_, T) > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(n_, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(n_, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(n_, n_, inherit) #endif #undef n_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/inherit_linearly.hpp000644 000765 000024 00000002071 12233035540 023004 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INHERIT_FRONT_TO_BACK_HPP_INCLUDED #define BOOST_MPL_INHERIT_FRONT_TO_BACK_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: inherit_linearly.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Types_) , typename BOOST_MPL_AUX_NA_PARAM(Node_) , typename Root_ = empty_base > struct inherit_linearly : fold { BOOST_MPL_AUX_LAMBDA_SUPPORT(3,inherit_linearly,(Types_,Node_,Root_)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit_linearly) }} #endif // BOOST_MPL_INHERIT_FRONT_TO_BACK_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/insert.hpp000644 000765 000024 00000002157 12233035540 020754 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INSERT_HPP_INCLUDED #define BOOST_MPL_INSERT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: insert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(Pos_or_T) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct insert : insert_impl< typename sequence_tag::type > ::template apply< Sequence,Pos_or_T,T > { BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert,(Sequence,Pos_or_T,T)) }; BOOST_MPL_AUX_NA_SPEC(3, insert) }} #endif // BOOST_MPL_INSERT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/insert_fwd.hpp000644 000765 000024 00000001266 12233035540 021614 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INSERT_FWD_HPP_INCLUDED #define BOOST_MPL_INSERT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: insert_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct insert_impl; template< typename Sequence, typename Pos_or_T, typename T > struct insert; }} #endif // BOOST_MPL_INSERT_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/insert_range.hpp000644 000765 000024 00000002250 12233035540 022122 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INSERT_RANGE_HPP_INCLUDED #define BOOST_MPL_INSERT_RANGE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: insert_range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(Pos) , typename BOOST_MPL_AUX_NA_PARAM(Range) > struct insert_range : insert_range_impl< typename sequence_tag::type > ::template apply< Sequence,Pos,Range > { BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert_range,(Sequence,Pos,Range)) }; BOOST_MPL_AUX_NA_SPEC(3, insert_range) }} #endif // BOOST_MPL_INSERT_RANGE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/insert_range_fwd.hpp000644 000765 000024 00000001331 12233035540 022761 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED #define BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: insert_range_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct insert_range_impl; template< typename Sequence, typename Pos, typename Range > struct insert_range; }} #endif // BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/inserter.hpp000644 000765 000024 00000001363 12233035540 021301 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INSERTER_HPP_INCLUDED #define BOOST_MPL_INSERTER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: inserter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Sequence , typename Operation > struct inserter { typedef Sequence state; typedef Operation operation; }; }} #endif // BOOST_MPL_INSERTER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/int.hpp000644 000765 000024 00000001156 12233035540 020240 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INT_HPP_INCLUDED #define BOOST_MPL_INT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: int.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #define AUX_WRAPPER_VALUE_TYPE int #include #endif // BOOST_MPL_INT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/int_fwd.hpp000644 000765 000024 00000001420 12233035540 021072 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INT_FWD_HPP_INCLUDED #define BOOST_MPL_INT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: int_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(int_) #endif // BOOST_MPL_INT_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/integral_c.hpp000644 000765 000024 00000003120 12233035540 021546 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED #define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: integral_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #if BOOST_WORKAROUND(__HP_aCC, <= 53800) // the type of non-type template arguments may not depend on template arguments # define AUX_WRAPPER_PARAMS(N) typename T, long N #else # define AUX_WRAPPER_PARAMS(N) typename T, T N #endif #define AUX_WRAPPER_NAME integral_c #define AUX_WRAPPER_VALUE_TYPE T #define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value > #include #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x551) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN // 'bool' constant doesn't have 'next'/'prior' members template< bool C > struct integral_c { BOOST_STATIC_CONSTANT(bool, value = C); typedef integral_c_tag tag; typedef integral_c type; typedef bool value_type; operator bool() const { return this->value; } }; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #endif #endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/integral_c_fwd.hpp000644 000765 000024 00000001750 12233035540 022415 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED #define BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: integral_c_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN #if BOOST_WORKAROUND(__HP_aCC, <= 53800) // the type of non-type template arguments may not depend on template arguments template< typename T, long N > struct integral_c; #else template< typename T, T N > struct integral_c; #endif BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c) #endif // BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/integral_c_tag.hpp000644 000765 000024 00000001506 12233035540 022407 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED #define BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: integral_c_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN struct integral_c_tag { BOOST_STATIC_CONSTANT(int, value = 0); }; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c_tag) #endif // BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/is_placeholder.hpp000644 000765 000024 00000003074 12233035540 022424 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED #define BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: is_placeholder.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename T > struct is_placeholder : bool_ { }; template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct is_placeholder< arg > : bool_ { }; #else namespace aux { aux::no_tag is_placeholder_helper(...); template< BOOST_MPL_AUX_NTTP_DECL(int, N) > aux::yes_tag is_placeholder_helper(aux::type_wrapper< arg >*); } // namespace aux template< typename T > struct is_placeholder { static aux::type_wrapper* get(); BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_placeholder_helper(get())) == sizeof(aux::yes_tag) ); typedef bool_ type; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION }} #endif // BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/is_sequence.hpp000644 000765 000024 00000005302 12233035540 021746 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED #define BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: is_sequence.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) # include #elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) # include #endif #include namespace boost { namespace mpl { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) namespace aux { // agurt, 11/jun/03: // MSVC 6.5/7.0 fails if 'has_begin' is instantiated on a class type that has a // 'begin' member that doesn't name a type; e.g. 'has_begin< std::vector >' // would fail; requiring 'T' to have _both_ 'tag' and 'begin' members workarounds // the issue for most real-world cases template< typename T > struct is_sequence_impl : and_< identity< aux::has_tag > , identity< aux::has_begin > > { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct is_sequence : if_< #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) aux::msvc_is_class #else boost::is_class #endif , aux::is_sequence_impl , bool_ >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T)) }; #elif defined(BOOST_MPL_CFG_NO_HAS_XXX) template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct is_sequence : bool_ { }; #else template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct is_sequence : not_< is_same< typename begin::type, void_ > > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T)) }; #endif // BOOST_MSVC #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) template<> struct is_sequence : bool_ { }; #endif BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence) }} #endif // BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/iter_fold.hpp000644 000765 000024 00000002544 12233035540 021417 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ITER_FOLD_HPP_INCLUDED #define BOOST_MPL_ITER_FOLD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iter_fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(State) , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp) > struct iter_fold { typedef typename aux::iter_fold_impl< ::boost::mpl::O1_size::value , typename begin::type , typename end::type , State , typename lambda::type >::state type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,iter_fold,(Sequence,State,ForwardOp)) }; BOOST_MPL_AUX_NA_SPEC(3, iter_fold) }} #endif // BOOST_MPL_ITER_FOLD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/iter_fold_if.hpp000644 000765 000024 00000006157 12233035540 022101 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED #define BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright Eric Friedman 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iter_fold_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Predicate, typename LastIterator > struct iter_fold_if_pred { template< typename State, typename Iterator > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : and_< not_< is_same > , apply1 > { #else { typedef and_< not_< is_same > , apply1 > type; #endif }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(State) , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp) , typename BOOST_MPL_AUX_NA_PARAM(ForwardPredicate) , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp) , typename BOOST_MPL_AUX_NA_PARAM(BackwardPredicate) > struct iter_fold_if { typedef typename begin::type first_; typedef typename end::type last_; typedef typename eval_if< is_na , if_< is_na, always, always > , identity >::type backward_pred_; // cwpro8 doesn't like 'cut-off' type here (use typedef instead) #if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) struct result_ : #else typedef #endif aux::iter_fold_if_impl< first_ , State , ForwardOp , protect< aux::iter_fold_if_pred< ForwardPredicate,last_ > > , BackwardOp , backward_pred_ > #if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) { }; #else result_; #endif public: typedef pair< typename result_::state , typename result_::iterator > type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , iter_fold_if , (Sequence,State,ForwardOp,ForwardPredicate,BackwardOp,BackwardPredicate) ) }; BOOST_MPL_AUX_NA_SPEC(6, iter_fold_if) }} #endif // BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/iterator_category.hpp000644 000765 000024 00000001650 12233035540 023173 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED #define BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iterator_category.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Iterator) > struct iterator_category { typedef typename Iterator::category type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,iterator_category,(Iterator)) }; BOOST_MPL_AUX_NA_SPEC(1, iterator_category) }} #endif // BOOST_MPL_ITERATOR_CATEGORY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/iterator_range.hpp000644 000765 000024 00000002040 12233035540 022444 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED #define BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iterator_range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { struct iterator_range_tag; template< typename BOOST_MPL_AUX_NA_PARAM(First) , typename BOOST_MPL_AUX_NA_PARAM(Last) > struct iterator_range { typedef iterator_range_tag tag; typedef iterator_range type; typedef First begin; typedef Last end; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,iterator_range,(First,Last)) }; BOOST_MPL_AUX_NA_SPEC(2, iterator_range) }} #endif // BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/iterator_tags.hpp000644 000765 000024 00000001554 12233035540 022317 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED #define BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iterator_tags.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { struct forward_iterator_tag : int_<0> { typedef forward_iterator_tag type; }; struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; }; struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; }; }} #endif // BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/joint_view.hpp000644 000765 000024 00000003345 12233035540 021625 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_JOINT_VIEW_HPP_INCLUDED #define BOOST_MPL_JOINT_VIEW_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: joint_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { namespace aux { struct joint_view_tag; } template<> struct size_impl< aux::joint_view_tag > { template < typename JointView > struct apply : plus< size , size > {}; }; template< typename BOOST_MPL_AUX_NA_PARAM(Sequence1_) , typename BOOST_MPL_AUX_NA_PARAM(Sequence2_) > struct joint_view { typedef typename mpl::begin::type first1_; typedef typename mpl::end::type last1_; typedef typename mpl::begin::type first2_; typedef typename mpl::end::type last2_; // agurt, 25/may/03: for the 'size_traits' implementation above typedef Sequence1_ sequence1_; typedef Sequence2_ sequence2_; typedef joint_view type; typedef aux::joint_view_tag tag; typedef joint_iter begin; typedef joint_iter end; }; BOOST_MPL_AUX_NA_SPEC(2, joint_view) }} #endif // BOOST_MPL_JOINT_VIEW_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/key_type.hpp000644 000765 000024 00000002223 12233035540 021273 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_KEY_TYPE_HPP_INCLUDED #define BOOST_MPL_KEY_TYPE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: key_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct key_type : apply_wrap2< key_type_impl< typename sequence_tag::type > , AssociativeSequence, T> { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,key_type,(AssociativeSequence,T)) }; BOOST_MPL_AUX_NA_SPEC(2, key_type) }} #endif // BOOST_MPL_KEY_TYPE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/key_type_fwd.hpp000644 000765 000024 00000001340 12233035540 022132 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED #define BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: key_type_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct key_type_impl; template< typename AssociativeSequence, typename T > struct key_type; }} #endif // BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/lambda.hpp000644 000765 000024 00000001565 12233035540 020672 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LAMBDA_HPP_INCLUDED #define BOOST_MPL_LAMBDA_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # include #else # include # include # define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS #endif #endif // BOOST_MPL_LAMBDA_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/lambda_fwd.hpp000644 000765 000024 00000002436 12233035540 021530 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED #define BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: lambda_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # include # include # include namespace boost { namespace mpl { template< typename T = na , typename Tag = void_ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM( typename Arity = int_< aux::template_arity::value > ) > struct lambda; }} #else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT # include namespace boost { namespace mpl { template< typename T = na , typename Tag = void_ , typename Protect = true_ > struct lambda; }} #endif #endif // BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/less.hpp000644 000765 000024 00000001146 12233035540 020413 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LESS_HPP_INCLUDED #define BOOST_MPL_LESS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: less.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME less #define AUX778076_OP_TOKEN < #include #endif // BOOST_MPL_LESS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/less_equal.hpp000644 000765 000024 00000001205 12233035540 021576 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LESS_EQUAL_HPP_INCLUDED #define BOOST_MPL_LESS_EQUAL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: less_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME less_equal #define AUX778076_OP_TOKEN <= #include #endif // BOOST_MPL_LESS_EQUAL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/limits/000755 000765 000024 00000000000 12233035540 020233 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/list/000755 000765 000024 00000000000 12233035540 017705 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/list.hpp000644 000765 000024 00000003257 12233035540 020425 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_HPP_INCLUDED #define BOOST_MPL_LIST_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_LIST_HEADER \ BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE).hpp \ /**/ #else # define AUX778076_LIST_HEADER \ BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE)##.hpp \ /**/ #endif # include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_HEADER) # undef AUX778076_LIST_HEADER #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list.hpp # include #else # include # define AUX778076_SEQUENCE_NAME list # define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_LIST_SIZE # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list_c.hpp000644 000765 000024 00000003577 12233035540 020734 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_C_HPP_INCLUDED #define BOOST_MPL_LIST_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_LIST_C_HEADER \ BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE),_c).hpp \ /**/ #else # define AUX778076_LIST_C_HEADER \ BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE),_c)##.hpp \ /**/ #endif # include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_C_HEADER) # undef AUX778076_LIST_C_HEADER # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list_c.hpp # include #else # include # define AUX778076_SEQUENCE_NAME list_c # define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_LIST_SIZE # define AUX778076_SEQUENCE_NAME_N(n) BOOST_PP_CAT(BOOST_PP_CAT(list,n),_c) # define AUX778076_SEQUENCE_INTEGRAL_WRAPPER # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/logical.hpp000644 000765 000024 00000001140 12233035540 021051 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LOGICAL_HPP_INCLUDED #define BOOST_MPL_LOGICAL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: logical.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #endif // BOOST_MPL_LOGICAL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/long.hpp000644 000765 000024 00000001164 12233035540 020404 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LONG_HPP_INCLUDED #define BOOST_MPL_LONG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: long.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #define AUX_WRAPPER_VALUE_TYPE long #include #endif // BOOST_MPL_LONG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/long_fwd.hpp000644 000765 000024 00000001427 12233035540 021246 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LONG_FWD_HPP_INCLUDED #define BOOST_MPL_LONG_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: long_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct long_; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(long_) #endif // BOOST_MPL_LONG_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/lower_bound.hpp000644 000765 000024 00000007201 12233035540 021762 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LOWER_BOUND_HPP_INCLUDED #define BOOST_MPL_LOWER_BOUND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: lower_bound.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL #endif #if !defined(BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL) # include # include # include # include # include # include # include # include # include # include # include #else # include # include # include #endif #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL) // agurt 23/oct/02: has a wrong complexity etc., but at least it works // feel free to contribute a better implementation! template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(T) , typename Predicate = less<> , typename pred_ = typename lambda::type > struct lower_bound : find_if< Sequence, bind1< not_<>, bind2 > > { }; #else namespace aux { template< typename Distance , typename Predicate , typename T , typename DeferredIterator > struct lower_bound_step_impl; template< typename Distance , typename Predicate , typename T , typename DeferredIterator > struct lower_bound_step { typedef typename eval_if< Distance , lower_bound_step_impl , DeferredIterator >::type type; }; template< typename Distance , typename Predicate , typename T , typename DeferredIterator > struct lower_bound_step_impl { typedef typename divides< Distance, long_<2> >::type offset_; typedef typename DeferredIterator::type iter_; typedef typename advance< iter_,offset_ >::type middle_; typedef typename apply2< Predicate , typename deref::type , T >::type cond_; typedef typename prior< minus< Distance, offset_> >::type step_; typedef lower_bound_step< offset_,Predicate,T,DeferredIterator > step_forward_; typedef lower_bound_step< step_,Predicate,T,next > step_backward_; typedef typename eval_if< cond_ , step_backward_ , step_forward_ >::type type; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(T) , typename Predicate = less<> > struct lower_bound { private: typedef typename lambda::type pred_; typedef typename size::type size_; public: typedef typename aux::lower_bound_step< size_,pred_,T,begin >::type type; }; #endif // BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL BOOST_MPL_AUX_NA_SPEC(2, lower_bound) }} #endif // BOOST_MPL_LOWER_BOUND_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/000755 000765 000024 00000000000 12233035540 017507 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/map.hpp000644 000765 000024 00000003237 12233035540 020225 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_HPP_INCLUDED #define BOOST_MPL_MAP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: map.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_MAP_HEADER \ BOOST_PP_CAT(map, BOOST_MPL_LIMIT_MAP_SIZE).hpp \ /**/ #else # define AUX778076_MAP_HEADER \ BOOST_PP_CAT(map, BOOST_MPL_LIMIT_MAP_SIZE)##.hpp \ /**/ #endif # include BOOST_PP_STRINGIZE(boost/mpl/map/AUX778076_MAP_HEADER) # undef AUX778076_MAP_HEADER #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER map.hpp # include #else # include # define AUX778076_SEQUENCE_NAME map # define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_MAP_SIZE # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_MAP_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/math/000755 000765 000024 00000000000 12233035540 017663 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/max.hpp000644 000765 000024 00000001026 12233035540 020227 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAX_HPP_INCLUDED #define BOOST_MPL_MAX_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: max.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #endif // BOOST_MPL_MAX_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/max_element.hpp000644 000765 000024 00000003232 12233035540 021741 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED #define BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: max_element.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { BOOST_MPL_AUX_COMMON_NAME_WKND(max_element) namespace aux { template< typename Predicate > struct select_max { template< typename OldIterator, typename Iterator > struct apply { typedef typename apply2< Predicate , typename deref::type , typename deref::type >::type condition_; typedef typename if_< condition_ , Iterator , OldIterator >::type type; }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename Predicate = less<_,_> > struct max_element : iter_fold< Sequence , typename begin::type , protect< aux::select_max > > { }; BOOST_MPL_AUX_NA_SPEC(1, max_element) }} #endif // BOOST_MPL_MAX_ELEMENT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/min.hpp000644 000765 000024 00000001026 12233035540 020225 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MIN_HPP_INCLUDED #define BOOST_MPL_MIN_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: min.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #endif // BOOST_MPL_MIN_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/min_element.hpp000644 000765 000024 00000001635 12233035540 021744 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MIN_ELEMENT_HPP_INCLUDED #define BOOST_MPL_MIN_ELEMENT_HPP_INCLUDED // Copyright David Abrahams 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: min_element.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { BOOST_MPL_AUX_COMMON_NAME_WKND(min_element) template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename Predicate = less<_,_> > struct min_element : max_element< Sequence , mpl::not_ > { }; BOOST_MPL_AUX_NA_SPEC(1, min_element) }} #endif // BOOST_MPL_MIN_ELEMENT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/min_max.hpp000644 000765 000024 00000001766 12233035540 021105 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MIN_MAX_HPP_INCLUDED #define BOOST_MPL_MIN_MAX_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: min_max.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct min : if_< less,N1,N2 > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct max : if_< less,N2,N1 > { }; BOOST_MPL_AUX_NA_SPEC(2, min) BOOST_MPL_AUX_NA_SPEC(2, max) }} #endif // BOOST_MPL_MIN_MAX_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/minus.hpp000644 000765 000024 00000001153 12233035540 020576 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MINUS_HPP_INCLUDED #define BOOST_MPL_MINUS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: minus.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME minus #define AUX778076_OP_TOKEN - #include #endif // BOOST_MPL_MINUS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/modulus.hpp000644 000765 000024 00000001222 12233035540 021130 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MODULUS_HPP_INCLUDED #define BOOST_MPL_MODULUS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: modulus.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME modulus #define AUX778076_OP_TOKEN % #define AUX778076_OP_ARITY 2 #include #endif // BOOST_MPL_MODULUS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/multiplies.hpp000644 000765 000024 00000002652 12233035540 021637 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MULTIPLIES_HPP_INCLUDED #define BOOST_MPL_MULTIPLIES_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: multiplies.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include // backward compatibility header, deprecated namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY #else # define AUX778076_OP_ARITY 2 #endif template< BOOST_MPL_PP_DEFAULT_PARAMS(AUX778076_OP_ARITY, typename N, na) > struct multiplies : times< BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) > { BOOST_MPL_AUX_LAMBDA_SUPPORT( AUX778076_OP_ARITY , multiplies , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) ) ) }; BOOST_MPL_AUX_NA_SPEC(AUX778076_OP_ARITY, multiplies) #undef AUX778076_OP_ARITY }} #endif // BOOST_MPL_MULTIPLIES_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/multiset/000755 000765 000024 00000000000 12233035540 020600 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/negate.hpp000644 000765 000024 00000003700 12233035540 020706 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_NEGATE_HPP_INCLUDED #define BOOST_MPL_NEGATE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: negate.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename Tag > struct negate_impl; template< typename T > struct negate_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N) > struct negate #if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) : negate_impl< typename negate_tag::type >::template apply::type #else : aux::msvc_eti_base< typename apply_wrap1< negate_impl< typename negate_tag::type > , N >::type >::type #endif { BOOST_MPL_AUX_LAMBDA_SUPPORT(1, negate, (N)) }; BOOST_MPL_AUX_NA_SPEC(1, negate) #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) namespace aux { template< typename T, T n > struct negate_wknd { BOOST_STATIC_CONSTANT(T, value = -n); typedef integral_c type; }; } #endif template<> struct negate_impl { #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) template< typename N > struct apply : aux::negate_wknd< typename N::value_type, N::value > #else template< typename N > struct apply : integral_c< typename N::value_type, (-N::value) > #endif { }; }; }} #endif // BOOST_MPL_NEGATE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/next.hpp000644 000765 000024 00000001035 12233035540 020420 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_NEXT_HPP_INCLUDED #define BOOST_MPL_NEXT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: next.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #endif // BOOST_MPL_NEXT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/next_prior.hpp000644 000765 000024 00000002204 12233035540 021632 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED #define BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: next_prior.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { BOOST_MPL_AUX_COMMON_NAME_WKND(next) BOOST_MPL_AUX_COMMON_NAME_WKND(prior) template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct next { typedef typename T::next type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,next,(T)) }; template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct prior { typedef typename T::prior type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,prior,(T)) }; BOOST_MPL_AUX_NA_SPEC(1, next) BOOST_MPL_AUX_NA_SPEC(1, prior) }} #endif // BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/not.hpp000644 000765 000024 00000002153 12233035540 020244 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_NOT_HPP_INCLUDED #define BOOST_MPL_NOT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: not.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(long, C_) > // 'long' is intentional here struct not_impl : bool_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct not_ : aux::not_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T)::value > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,not_,(T)) }; BOOST_MPL_AUX_NA_SPEC(1,not_) }} #endif // BOOST_MPL_NOT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/not_equal_to.hpp000644 000765 000024 00000001217 12233035540 022135 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED #define BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: not_equal_to.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME not_equal_to #define AUX778076_OP_TOKEN != #include #endif // BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/numeric_cast.hpp000644 000765 000024 00000002462 12233035540 022123 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED #define BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: numeric_cast.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include // agurt 21/sep/04: portability macro for the sake of MSVC 6.x-7.0; // resolves conflicts with 'boost::numeric_cast' function template. // use it in your own code _only_ if you care about compatibility with // these outdated compilers! #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570) ) # define BOOST_MPL_AUX_NUMERIC_CAST numeric_cast_ #else # define BOOST_MPL_AUX_NUMERIC_CAST numeric_cast #endif namespace boost { namespace mpl { // no default implementation; the definition is needed to make MSVC happy template< typename SourceTag, typename TargetTag > struct BOOST_MPL_AUX_NUMERIC_CAST { template< typename N > struct apply; }; }} #endif // BOOST_MPL_NUMERIC_CAST_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/O1_size.hpp000644 000765 000024 00000002125 12233035540 020754 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_O1_SIZE_HPP_INCLUDED #define BOOST_MPL_O1_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { // returns sequence size if it's an O(1) operation; otherwise returns -1 template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct O1_size : O1_size_impl< typename sequence_tag::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1, O1_size, (Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, O1_size) }} #endif // BOOST_MPL_O1_SIZE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/O1_size_fwd.hpp000644 000765 000024 00000001235 12233035540 021615 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED #define BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: O1_size_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct O1_size_impl; template< typename Sequence > struct O1_size; }} #endif // BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/or.hpp000644 000765 000024 00000003217 12233035540 020066 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_OR_HPP_INCLUDED #define BOOST_MPL_OR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: or.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include // agurt, 19/may/04: workaround a conflict with header's // 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(or)' // has to be checked in a separate condition, otherwise GCC complains // about 'or' being an alternative token #if defined(_MSC_VER) #ifndef __GCCXML__ #if defined(or) # pragma push_macro("or") # undef or # define or(x) #endif #endif #endif # define BOOST_MPL_PREPROCESSED_HEADER or.hpp # include #if defined(_MSC_VER) #ifndef __GCCXML__ #if defined(or) # pragma pop_macro("or") #endif #endif #endif #else # define AUX778076_OP_NAME or_ # define AUX778076_OP_VALUE1 true # define AUX778076_OP_VALUE2 false # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_OR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/order.hpp000644 000765 000024 00000002171 12233035540 020557 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ORDER_HPP_INCLUDED #define BOOST_MPL_ORDER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: order.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence) , typename BOOST_MPL_AUX_NA_PARAM(Key) > struct order : order_impl< typename sequence_tag::type > ::template apply { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,order,(AssociativeSequence,Key)) }; BOOST_MPL_AUX_NA_SPEC(2, order) }} #endif // BOOST_MPL_ORDER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/order_fwd.hpp000644 000765 000024 00000001320 12233035540 021412 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ORDER_FWD_HPP_INCLUDED #define BOOST_MPL_ORDER_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: order_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct order_impl; template< typename AssociativeSequence, typename Key > struct order; }} #endif // BOOST_MPL_ORDER_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/pair.hpp000644 000765 000024 00000003104 12233035540 020374 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_PAIR_HPP_INCLUDED #define BOOST_MPL_PAIR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: pair.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct pair { typedef pair type; typedef T1 first; typedef T2 second; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,pair,(T1,T2)) }; template< typename BOOST_MPL_AUX_NA_PARAM(P) > struct first { #if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) typedef typename P::first type; #else typedef typename aux::msvc_eti_base

::first type; #endif BOOST_MPL_AUX_LAMBDA_SUPPORT(1,first,(P)) }; template< typename BOOST_MPL_AUX_NA_PARAM(P) > struct second { #if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) typedef typename P::second type; #else typedef typename aux::msvc_eti_base

::second type; #endif BOOST_MPL_AUX_LAMBDA_SUPPORT(1,second,(P)) }; BOOST_MPL_AUX_NA_SPEC_NO_ETI(2, pair) BOOST_MPL_AUX_NA_SPEC(1, first) BOOST_MPL_AUX_NA_SPEC(1, second) }} #endif // BOOST_MPL_PAIR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/pair_view.hpp000644 000765 000024 00000010557 12233035540 021440 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_PAIR_VIEW_HPP_INCLUDED #define BOOST_MPL_PAIR_VIEW_HPP_INCLUDED // Copyright David Abrahams 2003-2004 // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: pair_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { struct pair_iter_tag; #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Iter1, typename Iter2, typename Category > struct pair_iter; template< typename Category > struct prior_pair_iter { template< typename Iter1, typename Iter2 > struct apply { typedef typename mpl::prior::type i1_; typedef typename mpl::prior::type i2_; typedef pair_iter type; }; }; template<> struct prior_pair_iter { template< typename Iter1, typename Iter2 > struct apply { typedef pair_iter type; }; }; #endif } template< typename Iter1 , typename Iter2 , typename Category > struct pair_iter { typedef aux::pair_iter_tag tag; typedef Category category; typedef Iter1 first; typedef Iter2 second; #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) typedef pair< typename deref::type , typename deref::type > type; typedef typename mpl::next::type i1_; typedef typename mpl::next::type i2_; typedef pair_iter next; typedef apply_wrap2< aux::prior_pair_iter,Iter1,Iter2 >::type prior; #endif }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Iter1, typename Iter2, typename C > struct deref< pair_iter > { typedef pair< typename deref::type , typename deref::type > type; }; template< typename Iter1, typename Iter2, typename C > struct next< pair_iter > { typedef typename mpl::next::type i1_; typedef typename mpl::next::type i2_; typedef pair_iter type; }; template< typename Iter1, typename Iter2, typename C > struct prior< pair_iter > { typedef typename mpl::prior::type i1_; typedef typename mpl::prior::type i2_; typedef pair_iter type; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template<> struct advance_impl { template< typename Iter, typename D > struct apply { typedef typename mpl::advance< typename Iter::first,D >::type i1_; typedef typename mpl::advance< typename Iter::second,D >::type i2_; typedef pair_iter type; }; }; template<> struct distance_impl { template< typename Iter1, typename Iter2 > struct apply { // agurt, 10/nov/04: MSVC 6.5 ICE-s on forwarding typedef typename mpl::distance< typename first::type , typename first::type >::type type; }; }; template< typename BOOST_MPL_AUX_NA_PARAM(Sequence1) , typename BOOST_MPL_AUX_NA_PARAM(Sequence2) > struct pair_view { typedef nested_begin_end_tag tag; typedef typename begin::type iter1_; typedef typename begin::type iter2_; typedef typename min< typename iterator_category::type , typename iterator_category::type >::type category_; typedef pair_iter begin; typedef pair_iter< typename end::type , typename end::type , category_ > end; }; BOOST_MPL_AUX_NA_SPEC(2, pair_view) }} #endif // BOOST_MPL_PAIR_VIEW_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/partition.hpp000644 000765 000024 00000002202 12233035540 021450 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_PARTITION_HPP_INCLUDED #define BOOST_MPL_PARTITION_HPP_INCLUDED // Copyright Eric Friedman 2002-2003 // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: partition.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { namespace aux { template < typename Sequence , typename Pred , typename In1 , typename In2 > struct partition_impl : stable_partition_impl { }; template < typename Sequence , typename Pred , typename In1 , typename In2 > struct reverse_partition_impl : reverse_stable_partition_impl { }; } // namespace aux BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, partition) }} #endif // BOOST_MPL_PARTITION_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/placeholders.hpp000644 000765 000024 00000005001 12233035540 022104 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED #define BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: placeholders.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) # define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) \ using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ /**/ # else # define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) /**/ # endif #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER placeholders.hpp # include #else # include # include # include # include // watch out for GNU gettext users, who #define _(x) #if !defined(_) || defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<-1> _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} #endif /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY + 1, )) #include BOOST_PP_ITERATE() #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg BOOST_PP_CAT(_,i_); BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(BOOST_PP_CAT(_,i_)) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::BOOST_PP_CAT(_,i_); } }} #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/plus.hpp000644 000765 000024 00000001146 12233035540 020430 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_PLUS_HPP_INCLUDED #define BOOST_MPL_PLUS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: plus.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME plus #define AUX778076_OP_TOKEN + #include #endif // BOOST_MPL_PLUS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/pop_back.hpp000644 000765 000024 00000002024 12233035540 021217 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_POP_BACK_HPP_INCLUDED #define BOOST_MPL_POP_BACK_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: pop_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct pop_back : pop_back_impl< typename sequence_tag::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,pop_back,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, pop_back) }} #endif // BOOST_MPL_POP_BACK_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/pop_back_fwd.hpp000644 000765 000024 00000001243 12233035540 022061 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_POP_BACK_FWD_HPP_INCLUDED #define BOOST_MPL_POP_BACK_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: pop_back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct pop_back_impl; template< typename Sequence > struct pop_back; }} #endif // BOOST_MPL_POP_BACK_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/pop_front.hpp000644 000765 000024 00000002036 12233035540 021452 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_POP_FRONT_HPP_INCLUDED #define BOOST_MPL_POP_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct pop_front : pop_front_impl< typename sequence_tag::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,pop_front,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, pop_front) }} #endif // BOOST_MPL_POP_FRONT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/pop_front_fwd.hpp000644 000765 000024 00000001251 12233035540 022310 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED #define BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: pop_front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct pop_front_impl; template< typename Sequence > struct pop_front; }} #endif // BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/print.hpp000644 000765 000024 00000003061 12233035540 020577 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_PRINT_HPP_INCLUDED #define BOOST_MPL_PRINT_HPP_INCLUDED // Copyright David Abrahams 2003 // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: print.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { namespace aux { #if defined(BOOST_MSVC) # pragma warning(push, 3) // we only want one warning from MSVC, so turn off the other one # pragma warning(disable: 4307) #elif defined(__MWERKS__) # pragma warn_hidevirtual on struct print_base { virtual void f() {} }; #endif #if defined(__EDG_VERSION__) template struct dependent_unsigned { static const unsigned value = 1; }; #endif } // namespace aux template struct print : mpl::identity #if defined(__MWERKS__) , aux::print_base #endif { #if defined(BOOST_MSVC) enum { n = sizeof(T) + -1 }; #elif defined(__MWERKS__) void f(int); #else enum { n = # if defined(__EDG_VERSION__) aux::dependent_unsigned::value > -1 # else sizeof(T) > -1 # endif }; #endif }; #if defined(BOOST_MSVC) # pragma warning(pop) #elif defined(__MWERKS__) # pragma warn_hidevirtual reset #endif }} #endif // BOOST_MPL_PRINT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/prior.hpp000644 000765 000024 00000001041 12233035540 020572 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_PRIOR_HPP_INCLUDED #define BOOST_MPL_PRIOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: prior.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #endif // BOOST_MPL_PRIOR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/protect.hpp000644 000765 000024 00000002477 12233035540 021135 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_PROTECT_HPP_INCLUDED #define BOOST_MPL_PROTECT_HPP_INCLUDED // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: protect.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T) , int not_le_ = 0 > struct protect : T { #if BOOST_WORKAROUND(__EDG_VERSION__, == 238) typedef mpl::protect type; #else typedef protect type; #endif }; #if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, N), typename T > struct arity< protect, N > : arity { }; } // namespace aux #endif BOOST_MPL_AUX_NA_SPEC_MAIN(1, protect) #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(1, 1, protect) #endif }} #endif // BOOST_MPL_PROTECT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/push_back.hpp000644 000765 000024 00000002565 12233035540 021412 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_PUSH_BACK_HPP_INCLUDED #define BOOST_MPL_PUSH_BACK_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct push_back : push_back_impl< typename sequence_tag::type > ::template apply< Sequence,T > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,push_back,(Sequence,T)) }; template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct has_push_back : has_push_back_impl< typename sequence_tag::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,has_push_back,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(2, push_back) BOOST_MPL_AUX_NA_SPEC(1, has_push_back) }} #endif // BOOST_MPL_PUSH_BACK_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/push_back_fwd.hpp000644 000765 000024 00000001265 12233035540 022246 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED #define BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: push_back_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct push_back_impl; template< typename Sequence, typename T > struct push_back; }} #endif // BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/push_front.hpp000644 000765 000024 00000002602 12233035540 021632 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_PUSH_FRONT_HPP_INCLUDED #define BOOST_MPL_PUSH_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct push_front : push_front_impl< typename sequence_tag::type > ::template apply< Sequence,T > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,push_front,(Sequence,T)) }; template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct has_push_front : has_push_front_impl< typename sequence_tag::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,has_push_front,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(2, push_front) BOOST_MPL_AUX_NA_SPEC(1, has_push_front) }} #endif // BOOST_MPL_PUSH_FRONT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/push_front_fwd.hpp000644 000765 000024 00000001273 12233035540 022475 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED #define BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: push_front_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct push_front_impl; template< typename Sequence, typename T > struct push_front; }} #endif // BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/quote.hpp000644 000765 000024 00000007232 12233035540 020604 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_QUOTE_HPP_INCLUDED #define BOOST_MPL_QUOTE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: quote.hpp 49272 2008-10-11 06:50:46Z agurtovoy $ // $Date: 2008-10-10 23:50:46 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49272 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #include #if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ && !defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) # define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE #endif #if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) \ && defined(BOOST_MPL_CFG_NO_HAS_XXX) # define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER quote.hpp # include #else # include # include # include # include # include # include #if !defined(BOOST_MPL_CFG_NO_QUOTE_TEMPLATE) namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename T, bool has_type_ > struct quote_impl // GCC has a problem with metafunction forwarding when T is a // specialization of a template called 'type'. # if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4)) \ && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(0)) \ && BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, BOOST_TESTED_AT(2)) { typedef typename T::type type; }; # else : T { }; # endif template< typename T > struct quote_impl { typedef T type; }; #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template< bool > struct quote_impl { template< typename T > struct result_ : T { }; }; template<> struct quote_impl { template< typename T > struct result_ { typedef T type; }; }; #endif #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_QUOTE_TEMPLATE #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_QUOTE_HPP_INCLUDED ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) template< template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F , typename Tag = void_ > struct BOOST_PP_CAT(quote,i_) { template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply #if defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) { typedef typename quote_impl< F< BOOST_MPL_PP_PARAMS(i_, U) > , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value >::type type; }; #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) : quote_impl< F< BOOST_MPL_PP_PARAMS(i_, U) > , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > { }; #else : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > > { }; #endif }; #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/range_c.hpp000644 000765 000024 00000002316 12233035540 021043 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_RANGE_C_HPP_INCLUDED #define BOOST_MPL_RANGE_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: range_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename T , T Start , T Finish > struct range_c { typedef aux::half_open_range_tag tag; typedef T value_type; typedef range_c type; typedef integral_c start; typedef integral_c finish; typedef r_iter begin; typedef r_iter end; }; }} #endif // BOOST_MPL_RANGE_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/remove.hpp000644 000765 000024 00000002162 12233035540 020741 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_REMOVE_HPP_INCLUDED #define BOOST_MPL_REMOVE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: remove.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Sequence , typename T , typename Inserter > struct remove_impl : remove_if_impl< Sequence, same_as, Inserter > { }; template< typename Sequence , typename T , typename Inserter > struct reverse_remove_impl : reverse_remove_if_impl< Sequence, same_as, Inserter > { }; } // namespace aux BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, remove) }} #endif // BOOST_MPL_REMOVE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/remove_if.hpp000644 000765 000024 00000003720 12233035540 021420 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_REMOVE_IF_HPP_INCLUDED #define BOOST_MPL_REMOVE_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: remove_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Pred, typename InsertOp > struct remove_if_helper { template< typename Sequence, typename U > struct apply { typedef typename eval_if< typename apply1::type , identity , apply2 >::type type; }; }; template< typename Sequence , typename Predicate , typename Inserter > struct remove_if_impl : fold< Sequence , typename Inserter::state , protect< aux::remove_if_helper< typename lambda::type , typename Inserter::operation > > > { }; template< typename Sequence , typename Predicate , typename Inserter > struct reverse_remove_if_impl : reverse_fold< Sequence , typename Inserter::state , protect< aux::remove_if_helper< typename lambda::type , typename Inserter::operation > > > { }; } // namespace aux BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, remove_if) }} #endif // BOOST_MPL_REMOVE_IF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/replace.hpp000644 000765 000024 00000002373 12233035540 021063 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_REPLACE_HPP_INCLUDED #define BOOST_MPL_REPLACE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright John R. Bandela 2000-2002 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: replace.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Sequence , typename OldType , typename NewType , typename Inserter > struct replace_impl : replace_if_impl< Sequence, same_as, NewType, Inserter > { }; template< typename Sequence , typename OldType , typename NewType , typename Inserter > struct reverse_replace_impl : reverse_replace_if_impl< Sequence, same_as, NewType, Inserter > { }; } // namespace aux BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, replace) }} #endif // BOOST_MPL_REPLACE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/replace_if.hpp000644 000765 000024 00000003560 12233035540 021540 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_REPLACE_IF_HPP_INCLUDED #define BOOST_MPL_REPLACE_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright John R. Bandela 2000-2002 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: replace_if.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Predicate, typename T > struct replace_if_op { template< typename U > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : if_< typename apply1::type , T , U > { #else { typedef typename if_< typename apply1::type , T , U >::type type; #endif }; }; template< typename Sequence , typename Predicate , typename T , typename Inserter > struct replace_if_impl : transform1_impl< Sequence , protect< aux::replace_if_op > , Inserter > { }; template< typename Sequence , typename Predicate , typename T , typename Inserter > struct reverse_replace_if_impl : reverse_transform1_impl< Sequence , protect< aux::replace_if_op > , Inserter > { }; } // namespace aux BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, replace_if) }} #endif // BOOST_MPL_REPLACE_IF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/reverse.hpp000644 000765 000024 00000001541 12233035540 021117 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_REVERSE_HPP_INCLUDED #define BOOST_MPL_REVERSE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: reverse.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(Inserter) > struct reverse : reverse_copy< Sequence , Inserter > { }; BOOST_MPL_AUX_NA_SPEC(1, reverse) }} #endif // BOOST_MPL_REVERSE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/reverse_fold.hpp000644 000765 000024 00000002561 12233035540 022126 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED #define BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: reverse_fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(State) , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp) , typename ForwardOp = arg<1> > struct reverse_fold { typedef typename aux::reverse_fold_impl< ::boost::mpl::O1_size::value , typename begin::type , typename end::type , State , BackwardOp , ForwardOp >::state type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,reverse_fold,(Sequence,State,BackwardOp)) }; BOOST_MPL_AUX_NA_SPEC(3, reverse_fold) }} #endif // BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/reverse_iter_fold.hpp000644 000765 000024 00000003115 12233035540 023145 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ITER_FOLD_BACKWARD_HPP_INCLUDED #define BOOST_MPL_ITER_FOLD_BACKWARD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Dave Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: reverse_iter_fold.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(State) , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp) , typename ForwardOp = arg<1> > struct reverse_iter_fold { typedef typename aux::reverse_iter_fold_impl< ::boost::mpl::O1_size::value , typename begin::type , typename end::type , State , typename lambda::type , typename lambda::type >::state type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , reverse_iter_fold , (Sequence,State,BackwardOp,ForwardOp) ) }; BOOST_MPL_AUX_NA_SPEC(3, reverse_iter_fold) }} #endif // BOOST_MPL_ITER_FOLD_BACKWARD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/same_as.hpp000644 000765 000024 00000002316 12233035540 021055 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SAME_AS_HPP_INCLUDED #define BOOST_MPL_SAME_AS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: same_as.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template< typename T1 > struct same_as { template< typename T2 > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : is_same { #else { typedef typename is_same::type type; #endif }; }; template< typename T1 > struct not_same_as { template< typename T2 > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : not_< is_same > { #else { typedef typename not_< is_same >::type type; #endif }; }; }} #endif // BOOST_MPL_SAME_AS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/sequence_tag.hpp000644 000765 000024 00000006034 12233035540 022111 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED #define BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: sequence_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { // agurt, 27/nov/02: have to use a simplistic 'sequence_tag' implementation // on MSVC to avoid dreadful "internal structure overflow" error #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || defined(BOOST_MPL_CFG_NO_HAS_XXX) template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct sequence_tag { typedef typename Sequence::tag type; }; #elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) // agurt, 07/feb/03: workaround for what seems to be MSVC 7.0-specific ETI issue namespace aux { template< bool > struct sequence_tag_impl { template< typename Sequence > struct result_ { typedef typename Sequence::tag type; }; }; template<> struct sequence_tag_impl { template< typename Sequence > struct result_ { typedef int type; }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct sequence_tag : aux::sequence_tag_impl< !aux::is_msvc_eti_arg::value > ::template result_ { }; #else namespace aux { template< bool has_tag_, bool has_begin_ > struct sequence_tag_impl { // agurt 24/nov/02: MSVC 6.5 gets confused in 'sequence_tag_impl' // specialization below, if we name it 'result_' here template< typename Sequence > struct result2_; }; # define AUX_CLASS_SEQUENCE_TAG_SPEC(has_tag, has_begin, result_type) \ template<> struct sequence_tag_impl \ { \ template< typename Sequence > struct result2_ \ { \ typedef result_type type; \ }; \ }; \ /**/ AUX_CLASS_SEQUENCE_TAG_SPEC(true, true, typename Sequence::tag) AUX_CLASS_SEQUENCE_TAG_SPEC(true, false, typename Sequence::tag) AUX_CLASS_SEQUENCE_TAG_SPEC(false, true, nested_begin_end_tag) AUX_CLASS_SEQUENCE_TAG_SPEC(false, false, non_sequence_tag) # undef AUX_CLASS_SEQUENCE_TAG_SPEC } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct sequence_tag : aux::sequence_tag_impl< ::boost::mpl::aux::has_tag::value , ::boost::mpl::aux::has_begin::value >::template result2_ { }; #endif // BOOST_MSVC BOOST_MPL_AUX_NA_SPEC(1, sequence_tag) }} #endif // BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/sequence_tag_fwd.hpp000644 000765 000024 00000001277 12233035540 022755 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED #define BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: sequence_tag_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { struct nested_begin_end_tag; struct non_sequence_tag; template< typename Sequence > struct sequence_tag; }} #endif // BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/000755 000765 000024 00000000000 12233035540 017525 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/set.hpp000644 000765 000024 00000003237 12233035540 020243 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_HPP_INCLUDED #define BOOST_MPL_SET_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_SET_HEADER \ BOOST_PP_CAT(set, BOOST_MPL_LIMIT_SET_SIZE).hpp \ /**/ #else # define AUX778076_SET_HEADER \ BOOST_PP_CAT(set, BOOST_MPL_LIMIT_SET_SIZE)##.hpp \ /**/ #endif # include BOOST_PP_STRINGIZE(boost/mpl/set/AUX778076_SET_HEADER) # undef AUX778076_SET_HEADER #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER set.hpp # include #else # include # define AUX778076_SEQUENCE_NAME set # define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_SET_SIZE # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_SET_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set_c.hpp000644 000765 000024 00000003554 12233035540 020547 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_C_HPP_INCLUDED #define BOOST_MPL_SET_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_SET_C_HEADER \ BOOST_PP_CAT(BOOST_PP_CAT(set,BOOST_MPL_LIMIT_SET_SIZE),_c).hpp \ /**/ #else # define AUX778076_SET_C_HEADER \ BOOST_PP_CAT(BOOST_PP_CAT(set,BOOST_MPL_LIMIT_SET_SIZE),_c)##.hpp \ /**/ #endif # include BOOST_PP_STRINGIZE(boost/mpl/set/AUX778076_SET_C_HEADER) # undef AUX778076_SET_C_HEADER # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER set_c.hpp # include #else # include # define AUX778076_SEQUENCE_NAME set_c # define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_SET_SIZE # define AUX778076_SEQUENCE_NAME_N(n) BOOST_PP_CAT(BOOST_PP_CAT(set,n),_c) # define AUX778076_SEQUENCE_INTEGRAL_WRAPPER # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_SET_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/shift_left.hpp000644 000765 000024 00000001235 12233035540 021573 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SHIFT_LEFT_HPP_INCLUDED #define BOOST_MPL_SHIFT_LEFT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: shift_left.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME shift_left #define AUX778076_OP_TOKEN << #include #endif // BOOST_MPL_SHIFT_LEFT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/shift_right.hpp000644 000765 000024 00000001242 12233035540 021754 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SHIFT_RIGHT_HPP_INCLUDED #define BOOST_MPL_SHIFT_RIGHT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: shift_right.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME shift_right #define AUX778076_OP_TOKEN >> #include #endif // BOOST_MPL_SHIFT_RIGHT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/single_view.hpp000644 000765 000024 00000001633 12233035540 021761 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SINGLE_VIEW_HPP_INCLUDED #define BOOST_MPL_SINGLE_VIEW_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: single_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct single_view : iterator_range< aux::sel_iter , aux::sel_iter > { }; BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, single_view) }} #endif // BOOST_MPL_SINGLE_VIEW_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/size.hpp000644 000765 000024 00000002127 12233035540 020417 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SIZE_HPP_INCLUDED #define BOOST_MPL_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct size : aux::msvc_eti_base< typename size_impl< typename sequence_tag::type > ::template apply< Sequence >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(1, size, (Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, size) }} #endif // BOOST_MPL_SIZE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/size_fwd.hpp000644 000765 000024 00000001213 12233035540 021252 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SIZE_FWD_HPP_INCLUDED #define BOOST_MPL_SIZE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: size_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct size_impl; template< typename Sequence > struct size; }} #endif // BOOST_MPL_SIZE_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/size_t.hpp000644 000765 000024 00000001322 12233035540 020736 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SIZE_T_HPP_INCLUDED #define BOOST_MPL_SIZE_T_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: size_t.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #define AUX_WRAPPER_VALUE_TYPE std::size_t #define AUX_WRAPPER_NAME size_t #define AUX_WRAPPER_PARAMS(N) std::size_t N #include #endif // BOOST_MPL_SIZE_T_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/size_t_fwd.hpp000644 000765 000024 00000001500 12233035540 021574 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED #define BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: size_t_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include // make sure 'size_t' is placed into 'std' #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< std::size_t N > struct size_t; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(size_t) #endif // BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/sizeof.hpp000644 000765 000024 00000001547 12233035540 020751 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SIZEOF_HPP_INCLUDED #define BOOST_MPL_SIZEOF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: sizeof.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct sizeof_ : mpl::size_t< sizeof(T) > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,sizeof_,(T)) }; BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, sizeof_) }} #endif // BOOST_MPL_SIZEOF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/sort.hpp000644 000765 000024 00000001315 12233035540 020432 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SORT_HPP_INCLUDED #define BOOST_MPL_SORT_HPP_INCLUDED // Copyright Eric Friedman 2002-2003 // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: sort.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, sort) }} #endif // BOOST_MPL_SORT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/stable_partition.hpp000644 000765 000024 00000003440 12233035540 023007 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED #define BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED // Copyright Eric Friedman 2002-2003 // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: stable_partition.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template < typename Sequence , typename Pred , typename In , typename In2 , typename In1 = typename if_na::type > struct stable_partition_impl : fold< Sequence , pair< typename In1::state, typename In2::state > , protect< partition_op< Pred , typename In1::operation , typename In2::operation > > > { }; template < typename Sequence , typename Pred , typename In , typename In2 , typename In1 = typename if_na::type > struct reverse_stable_partition_impl : reverse_fold< Sequence , pair< typename In1::state, typename In2::state > , protect< partition_op< Pred , typename In1::operation , typename In2::operation > > > { }; } // namespace aux BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, stable_partition) }} #endif // BOOST_MPL_STABLE_PARTITION_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/string.hpp000644 000765 000024 00000057743 12233035540 020771 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_STRING_HPP_INCLUDED #define BOOST_MPL_STRING_HPP_INCLUDED // Copyright Eric Niebler 2009 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: string.hpp 49239 2009-04-01 09:10:26Z eric_niebler $ // $Date: 2009-04-01 02:10:26 -0700 (Wed, 1 Apr 2009) $ // $Revision: 49239 $ // // Thanks to: // Dmitry Goncharov for porting this to the Sun compiler #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // for bidirectional_iterator_tag #include namespace boost { namespace mpl { #define BOOST_MPL_STRING_MAX_PARAMS \ BOOST_PP_DIV(BOOST_PP_ADD(BOOST_MPL_LIMIT_STRING_SIZE, 3), 4) // Low-level bit-twiddling is done by macros. Any implementation-defined behavior of // multi-character literals should be localized to these macros. #define BOOST_MPL_MULTICHAR_LENGTH(c) \ (std::size_t)((c0xffffff)+(c>0xffff)+(c>0xff)+1)) #if defined(BOOST_LITTLE_ENDIAN) && defined(__SUNPRO_CC) #define BOOST_MPL_MULTICHAR_AT(c,i) \ (char)(0xff&((unsigned)(c)>>(8*(std::size_t)(i)))) #define BOOST_MPL_MULTICHAR_PUSH_BACK(c,i) \ ((((unsigned char)(i))<<(BOOST_MPL_MULTICHAR_LENGTH(c)*8))|(unsigned)(c)) #define BOOST_MPL_MULTICHAR_PUSH_FRONT(c,i) \ (((unsigned)(c)<<8)|(unsigned char)(i)) #define BOOST_MPL_MULTICHAR_POP_BACK(c) \ (((1<<((BOOST_MPL_MULTICHAR_LENGTH(c)-1)*8))-1)&(unsigned)(c)) #define BOOST_MPL_MULTICHAR_POP_FRONT(c) \ ((unsigned)(c)>>8) #else #define BOOST_MPL_MULTICHAR_AT(c,i) \ (char)(0xff&((unsigned)(c)>>(8*(BOOST_MPL_MULTICHAR_LENGTH(c)-(std::size_t)(i)-1)))) #define BOOST_MPL_MULTICHAR_PUSH_BACK(c,i) \ (((unsigned)(c)<<8)|(unsigned char)(i)) #define BOOST_MPL_MULTICHAR_PUSH_FRONT(c,i) \ ((((unsigned char)(i))<<(BOOST_MPL_MULTICHAR_LENGTH(c)*8))|(unsigned)(c)) #define BOOST_MPL_MULTICHAR_POP_BACK(c) \ ((unsigned)(c)>>8) #define BOOST_MPL_MULTICHAR_POP_FRONT(c) \ (((1<<((BOOST_MPL_MULTICHAR_LENGTH(c)-1)*8))-1)&(unsigned)(c)) #endif struct string_tag; struct string_iterator_tag; template struct string; template struct string_iterator; template struct sequence_tag; template struct size_impl; template<> struct size_impl { template struct apply; #define M0(z, n, data) \ + BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C,n)) #define M1(z, n, data) \ template \ struct apply > \ : mpl::size_t<(0 BOOST_PP_REPEAT_ ## z(n, M0, ~))> \ {}; BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_MPL_STRING_MAX_PARAMS), M1, ~) #undef M0 #undef M1 }; template<> struct size_impl::apply > : mpl::size_t<0> {}; template struct begin_impl; template<> struct begin_impl { template struct apply { typedef mpl::string_iterator type; }; }; template struct end_impl; template<> struct end_impl { template struct apply; #define M0(z,n,data) \ template \ struct apply > \ { \ typedef mpl::string_iterator, n, 0> type; \ }; BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_MPL_STRING_MAX_PARAMS), M0, ~) #undef M0 }; template<> struct end_impl::apply > { typedef mpl::string_iterator, 0, 0> type; }; template struct push_back_impl; template<> struct push_back_impl { template struct apply { BOOST_MPL_ASSERT_MSG( (BOOST_MPL_LIMIT_STRING_SIZE != mpl::size::type::value) , PUSH_BACK_FAILED_MPL_STRING_IS_FULL , (Sequence) ); // If the above assertion didn't fire, then the string is sparse. // Repack the string and retry the push_back typedef typename mpl::push_back< typename mpl::copy< Sequence , mpl::back_inserter > >::type , Value >::type type; }; template struct apply, Value, false> { typedef mpl::string<(char)Value::value> type; }; #define M0(z,n,data) \ template \ struct apply, Value, false> \ { \ typedef \ mpl::string< \ BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), C) \ BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ ((unsigned)BOOST_PP_CAT(C,BOOST_PP_DEC(n))>0xffffff) \ ?BOOST_PP_CAT(C,BOOST_PP_DEC(n)) \ :BOOST_MPL_MULTICHAR_PUSH_BACK(BOOST_PP_CAT(C,BOOST_PP_DEC(n)), Value::value) \ , ((unsigned)BOOST_PP_CAT(C,BOOST_PP_DEC(n))>0xffffff) \ ?(char)Value::value \ :0 \ > \ type; \ }; BOOST_PP_REPEAT_FROM_TO(1, BOOST_MPL_STRING_MAX_PARAMS, M0, ~) #undef M0 template struct apply, Value, false> { typedef mpl::string< BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS), C) , BOOST_MPL_MULTICHAR_PUSH_BACK(BOOST_PP_CAT(C,BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS)), Value::value) > type; }; }; template struct has_push_back_impl; template<> struct has_push_back_impl { template struct apply : mpl::true_ {}; }; template struct pop_back_impl; template<> struct pop_back_impl { template struct apply; #define M0(z,n,data) \ template \ struct apply > \ { \ BOOST_MPL_ASSERT_MSG((C0 != 0), POP_BACK_FAILED_MPL_STRING_IS_EMPTY, (mpl::string<>)); \ typedef \ mpl::string< \ BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_DEC(n), C) \ BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) \ BOOST_MPL_MULTICHAR_POP_BACK(BOOST_PP_CAT(C,BOOST_PP_DEC(n))) \ > \ type; \ }; BOOST_PP_REPEAT_FROM_TO(1, BOOST_PP_INC(BOOST_MPL_STRING_MAX_PARAMS), M0, ~) #undef M0 }; template struct has_pop_back_impl; template<> struct has_pop_back_impl { template struct apply : mpl::true_ {}; }; template struct push_front_impl; template<> struct push_front_impl { template struct apply { BOOST_MPL_ASSERT_MSG( (BOOST_MPL_LIMIT_STRING_SIZE != mpl::size::type::value) , PUSH_FRONT_FAILED_MPL_STRING_IS_FULL , (Sequence) ); // If the above assertion didn't fire, then the string is sparse. // Repack the string and retry the push_front. typedef typename mpl::push_front< typename mpl::reverse_copy< Sequence , mpl::front_inserter > >::type , Value >::type type; }; #if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) template struct apply, Value, false> { typedef mpl::string<(char)Value::value> type; }; #endif #define M0(z,n,data) \ template \ struct apply, Value, true> \ { \ typedef \ mpl::string< \ (char)Value::value \ BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, n, C) \ > \ type; \ }; BOOST_PP_REPEAT_FROM_TO(1, BOOST_MPL_STRING_MAX_PARAMS, M0, ~) #undef M0 template struct apply, Value, false> { typedef mpl::string< BOOST_MPL_MULTICHAR_PUSH_FRONT(C0, Value::value) , BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C) > type0; #if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) typedef typename mpl::if_< mpl::empty > , mpl::string<(char)Value::value> , type0 >::type type; #else typedef type0 type; #endif }; }; template struct has_push_front_impl; template<> struct has_push_front_impl { template struct apply : mpl::true_ {}; }; template struct pop_front_impl; template<> struct pop_front_impl { template struct apply; #define M0(z,n,data) \ template \ struct apply, true> \ { \ BOOST_MPL_ASSERT_MSG((C0 != 0), POP_FRONT_FAILED_MPL_STRING_IS_EMPTY, (mpl::string<>)); \ typedef \ mpl::string \ type; \ }; BOOST_PP_REPEAT_FROM_TO(1, BOOST_MPL_STRING_MAX_PARAMS, M0, ~) #undef M0 template struct apply, false> { typedef mpl::string< BOOST_MPL_MULTICHAR_POP_FRONT(C0) , BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_MPL_STRING_MAX_PARAMS, C) > type; }; }; template struct has_pop_front_impl; template<> struct has_pop_front_impl { template struct apply : mpl::true_ {}; }; template struct insert_range_impl; template<> struct insert_range_impl { template struct apply : mpl::copy< mpl::joint_view< mpl::iterator_range< mpl::string_iterator , Pos > , mpl::joint_view< Range , mpl::iterator_range< Pos , typename mpl::end::type > > > , mpl::back_inserter > > {}; }; template struct insert_impl; template<> struct insert_impl { template struct apply : mpl::insert_range > {}; }; template struct erase_impl; template<> struct erase_impl { template struct apply : mpl::copy< mpl::joint_view< mpl::iterator_range< mpl::string_iterator , First > , mpl::iterator_range< typename mpl::if_na::type>::type , typename mpl::end::type > > , mpl::back_inserter > > {}; }; template struct clear_impl; template<> struct clear_impl { template struct apply { typedef mpl::string<> type; }; }; #define M0(z, n, data) \ template \ struct string_iterator, n, J> \ { \ enum { eomc_ = (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == J + 1) }; \ typedef mpl::string string; \ typedef std::bidirectional_iterator_tag category; \ typedef \ mpl::string_iterator \ next; \ typedef \ mpl::string_iterator \ prior; \ typedef mpl::char_ type; \ }; \ template \ struct string_iterator, n, 0> \ { \ enum { eomc_ = (BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, n)) == 1) }; \ typedef mpl::string string; \ typedef std::bidirectional_iterator_tag category; \ typedef \ mpl::string_iterator \ next; \ typedef \ mpl::string_iterator< \ string \ , n - 1 \ , BOOST_MPL_MULTICHAR_LENGTH(BOOST_PP_CAT(C, BOOST_PP_DEC(n))) - 1 \ > \ prior; \ typedef mpl::char_ type; \ }; BOOST_PP_REPEAT(BOOST_MPL_STRING_MAX_PARAMS, M0, ~) #undef M0 template struct string { /// INTERNAL ONLY enum { front_ = C0 , back_ = BOOST_PP_CAT(C, BOOST_PP_DEC(BOOST_MPL_STRING_MAX_PARAMS)) }; typedef char value_type; typedef string type; typedef string_tag tag; }; namespace aux_ { template struct next_unless : mpl::next {}; template struct next_unless { typedef End type; }; template struct deref_unless : mpl::deref {}; template struct deref_unless { typedef mpl::char_<'\0'> type; }; } template struct c_str { typedef typename mpl::end::type iend; typedef typename mpl::begin::type i0; #define M0(z, n, data) \ typedef \ typename mpl::aux_::next_unless::type \ BOOST_PP_CAT(i, BOOST_PP_INC(n)); BOOST_PP_REPEAT(BOOST_MPL_LIMIT_STRING_SIZE, M0, ~) #undef M0 typedef c_str type; static typename Sequence::value_type const value[BOOST_MPL_LIMIT_STRING_SIZE+1]; }; template typename Sequence::value_type const c_str::value[BOOST_MPL_LIMIT_STRING_SIZE+1] = { #define M0(z, n, data) \ mpl::aux_::deref_unless::type::value, BOOST_PP_REPEAT(BOOST_MPL_LIMIT_STRING_SIZE, M0, ~) #undef M0 '\0' }; }} // namespace boost #endif // BOOST_MPL_STRING_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/switch.hpp000644 000765 000024 00000002414 12233035540 020745 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SWITCH_HPP_INCLUDED #define BOOST_MPL_SWITCH_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: switch.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Body) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct switch_ { typedef typename find_if< Body , apply1< lambda< first<_1> >, T > >::type iter_; typedef typename deref::type pair_; typedef typename lambda< typename second::type >::type f_; typedef typename apply1::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,switch_,(Body,T)) }; BOOST_MPL_AUX_NA_SPEC(2, switch_) }} #endif // BOOST_MPL_SWITCH_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/tag.hpp000644 000765 000024 00000002145 12233035540 020220 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_TAG_HPP_INCLUDED #define BOOST_MPL_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename T > struct tag_impl { typedef typename T::tag type; }; } template< typename T, typename Default = void_ > struct tag #if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) : if_< aux::has_tag , aux::tag_impl , Default >::type { #else { typedef typename eval_if< aux::has_tag , aux::tag_impl , Default >::type type; #endif }; }} #endif // BOOST_MPL_TAG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/times.hpp000644 000765 000024 00000001153 12233035540 020564 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_TIMES_HPP_INCLUDED #define BOOST_MPL_TIMES_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: times.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define AUX778076_OP_NAME times #define AUX778076_OP_TOKEN * #include #endif // BOOST_MPL_TIMES_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/transform.hpp000644 000765 000024 00000010326 12233035540 021460 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_TRANSFORM_HPP_INCLUDED #define BOOST_MPL_TRANSFORM_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: transform.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Seq , typename Op , typename In > struct transform1_impl : fold< Seq , typename In::state , bind2< typename lambda< typename In::operation >::type , _1 , bind1< typename lambda::type, _2> > > { }; template< typename Seq , typename Op , typename In > struct reverse_transform1_impl : reverse_fold< Seq , typename In::state , bind2< typename lambda< typename In::operation >::type , _1 , bind1< typename lambda::type, _2> > > { }; template< typename Seq1 , typename Seq2 , typename Op , typename In > struct transform2_impl : fold< pair_view , typename In::state , bind2< typename lambda< typename In::operation >::type , _1 , bind2< typename lambda::type , bind1,_2> , bind1,_2> > > > { }; template< typename Seq1 , typename Seq2 , typename Op , typename In > struct reverse_transform2_impl : reverse_fold< pair_view , typename In::state , bind2< typename lambda< typename In::operation >::type , _1 , bind2< typename lambda< Op >::type , bind1,_2> , bind1,_2> > > > { }; } // namespace aux BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, transform1) BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, transform2) #define AUX778076_TRANSFORM_DEF(name) \ template< \ typename BOOST_MPL_AUX_NA_PARAM(Seq1) \ , typename BOOST_MPL_AUX_NA_PARAM(Seq2OrOperation) \ , typename BOOST_MPL_AUX_NA_PARAM(OperationOrInserter) \ , typename BOOST_MPL_AUX_NA_PARAM(Inserter) \ > \ struct name \ { \ typedef typename eval_if< \ or_< \ is_na \ , is_lambda_expression< Seq2OrOperation > \ , not_< is_sequence > \ > \ , name##1 \ , name##2 \ >::type type; \ }; \ BOOST_MPL_AUX_NA_SPEC(4, name) \ /**/ AUX778076_TRANSFORM_DEF(transform) AUX778076_TRANSFORM_DEF(reverse_transform) #undef AUX778076_TRANSFORM_DEF }} #endif // BOOST_MPL_TRANSFORM_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/transform_view.hpp000644 000765 000024 00000002325 12233035540 022512 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_TRANSFORM_VIEW_HPP_INCLUDED #define BOOST_MPL_TRANSFORM_VIEW_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: transform_view.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(F) > struct transform_view { private: typedef typename lambda::type f_; typedef typename begin::type first_; typedef typename end::type last_; public: struct tag; typedef transform_view type; typedef aux::transform_iter< first_,last_,f_ > begin; typedef aux::transform_iter< last_,last_,f_ > end; }; BOOST_MPL_AUX_NA_SPEC(2, transform_view) }} #endif // BOOST_MPL_TRANSFORM_VIEW_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/unique.hpp000644 000765 000024 00000004156 12233035540 020757 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_UNIQUE_HPP_INCLUDED #define BOOST_MPL_UNIQUE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright John R. Bandela 2000-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: unique.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Predicate, typename Operation > struct unique_op { template< typename Pair, typename T > struct apply { typedef typename Pair::first seq_; typedef typename Pair::second prior_; typedef typename eval_if< and_< is_not_na, apply2 > , identity , apply2 >::type new_seq_; typedef pair type; }; }; template< typename Sequence , typename Predicate , typename Inserter > struct unique_impl : first< typename fold< Sequence , pair< typename Inserter::state,na > , protect< aux::unique_op > >::type > { }; template< typename Sequence , typename Predicate , typename Inserter > struct reverse_unique_impl : first< typename reverse_fold< Sequence , pair< typename Inserter::state,na > , protect< aux::unique_op > >::type > { }; } // namespace aux BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(3, unique) }} #endif // BOOST_MPL_UNIQUE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/unpack_args.hpp000644 000765 000024 00000007131 12233035540 021742 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED #define BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: unpack_args.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER unpack_args.hpp # include #else # include # include # include # include # include # include namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header # define AUX778076_UNPACK(unused, i, Args) \ , typename at_c::type \ /**/ # define AUX778076_UNPACKED_ARGS(n, Args) \ BOOST_MPL_PP_REPEAT(n, AUX778076_UNPACK, Args) \ /**/ namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< int size, typename F, typename Args > struct unpack_args_impl; #else template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl { template< typename F, typename Args > struct apply; }; #endif #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() } template< typename F > struct unpack_args { template< typename Args > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) : aux::unpack_args_impl< size::value,F,Args > # else : aux::unpack_args_impl< size::value > ::template apply< F,Args > # endif { #else // BOOST_MPL_CFG_NO_NESTED_FORWARDING { typedef typename aux::unpack_args_impl< size::value , F , Args >::type type; #endif }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) # undef AUX778076_UNPACK # undef AUX778076_UNPACKED_ARGS }} #endif // BOOST_MPL_CFG_USE_PREPROCESSED_HEADERS #endif // BOOST_MPL_UNPACK_ARGS_HPP_INCLUDED ///// iteration, depth == 1 // For gcc 4.4 compatability, we must include the // BOOST_PP_ITERATION_DEPTH test inside an #else clause. #else // BOOST_PP_IS_ITERATING #if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename F, typename Args > struct unpack_args_impl : BOOST_PP_CAT(apply,i_)< F AUX778076_UNPACKED_ARGS(i_, Args) > { }; #else template<> struct unpack_args_impl { template< typename F, typename Args > struct apply : BOOST_PP_CAT(apply,i_)< F AUX778076_UNPACKED_ARGS(i_, Args) > { }; }; #endif # undef i_ #endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/upper_bound.hpp000644 000765 000024 00000007121 12233035540 021766 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_UPPER_BOUND_HPP_INCLUDED #define BOOST_MPL_UPPER_BOUND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: upper_bound.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL #endif #if !defined(BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL) # include # include # include # include # include # include # include # include # include # include # include #else # include # include #endif #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL) // agurt 23/oct/02: has a wrong complexity etc., but at least it works; // feel free to contribute a better implementation! template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(T) , typename Predicate = less<> , typename pred_ = typename lambda::type > struct upper_bound : find_if< Sequence, bind2 > { }; #else namespace aux { template< typename Distance , typename Predicate , typename T , typename DeferredIterator > struct upper_bound_step_impl; template< typename Distance , typename Predicate , typename T , typename DeferredIterator > struct upper_bound_step { typedef typename eval_if< Distance , upper_bound_step_impl , DeferredIterator >::type type; }; template< typename Distance , typename Predicate , typename T , typename DeferredIterator > struct upper_bound_step_impl { typedef typename divides< Distance, long_<2> >::type offset_; typedef typename DeferredIterator::type iter_; typedef typename advance< iter_,offset_ >::type middle_; typedef typename apply2< Predicate , T , typename deref::type >::type cond_; typedef typename prior< minus< Distance, offset_ > >::type step_; typedef upper_bound_step< offset_,Predicate,T,DeferredIterator > step_forward_; typedef upper_bound_step< step_,Predicate,T,next > step_backward_; typedef typename eval_if< cond_ , step_forward_ , step_backward_ >::type type; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(T) , typename Predicate = less<> > struct upper_bound { private: typedef typename lambda::type pred_; typedef typename size::type size_; public: typedef typename aux::upper_bound_step< size_,pred_,T,begin >::type type; }; #endif // BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL BOOST_MPL_AUX_NA_SPEC(2, upper_bound) }} #endif // BOOST_MPL_UPPER_BOUND_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/value_type.hpp000644 000765 000024 00000002251 12233035540 021620 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VALUE_TYPE_HPP_INCLUDED #define BOOST_MPL_VALUE_TYPE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: value_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct value_type : apply_wrap2< value_type_impl< typename sequence_tag::type > , AssociativeSequence, T > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,value_type,(AssociativeSequence,T)) }; BOOST_MPL_AUX_NA_SPEC(2, value_type) }} #endif // BOOST_MPL_VALUE_TYPE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/value_type_fwd.hpp000644 000765 000024 00000001354 12233035540 022463 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED #define BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: value_type_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { template< typename Tag > struct value_type_impl; template< typename AssociativeSequence, typename T > struct value_type; }} #endif // BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/000755 000765 000024 00000000000 12233035540 020234 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/vector.hpp000644 000765 000024 00000003325 12233035540 020750 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_HPP_INCLUDED #define BOOST_MPL_VECTOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_VECTOR_HEADER \ BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE).hpp \ /**/ #else # define AUX778076_VECTOR_HEADER \ BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE)##.hpp \ /**/ #endif # include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_HEADER) # undef AUX778076_VECTOR_HEADER #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector.hpp # include #else # include # define AUX778076_SEQUENCE_NAME vector # define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector_c.hpp000644 000765 000024 00000003767 12233035540 021264 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector_c.hpp 49271 2008-10-11 06:46:00Z agurtovoy $ // $Date: 2008-10-10 23:46:00 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49271 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_VECTOR_C_HEADER \ BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_MPL_LIMIT_VECTOR_SIZE),_c).hpp \ /**/ #else # define AUX778076_VECTOR_C_HEADER \ BOOST_PP_CAT(BOOST_PP_CAT(vector,BOOST_MPL_LIMIT_VECTOR_SIZE),_c)##.hpp \ /**/ #endif # include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_C_HEADER) # undef AUX778076_VECTOR_C_HEADER # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector_c.hpp # include #else # include # define AUX778076_SEQUENCE_NAME vector_c # define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE # define AUX778076_SEQUENCE_NAME_N(n) BOOST_PP_CAT(BOOST_PP_CAT(vector,n),_c) # define AUX778076_SEQUENCE_CONVERT_CN_TO(z,n,TARGET) TARGET(BOOST_PP_CAT(C,n)) # define AUX778076_SEQUENCE_INTEGRAL_WRAPPER # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/void.hpp000644 000765 000024 00000003257 12233035540 020413 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VOID_HPP_INCLUDED #define BOOST_MPL_VOID_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: void.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN // [JDG Feb-4-2003] made void_ a complete type to allow it to be // instantiated so that it can be passed in as an object that can be // used to select an overloaded function. Possible use includes signaling // a zero arity functor evaluation call. struct void_ { typedef void_ type; }; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { template< typename T > struct is_void_ : false_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using false_::value; #endif }; template<> struct is_void_ : true_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using true_::value; #endif }; template< typename T > struct is_not_void_ : true_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using true_::value; #endif }; template<> struct is_not_void_ : false_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using false_::value; #endif }; BOOST_MPL_AUX_NA_SPEC(1, is_void_) BOOST_MPL_AUX_NA_SPEC(1, is_not_void_) }} #endif // BOOST_MPL_VOID_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/void_fwd.hpp000644 000765 000024 00000001302 12233035540 021240 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VOID_FWD_HPP_INCLUDED #define BOOST_MPL_VOID_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: void_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN struct void_; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(void_) #endif // BOOST_MPL_VOID_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/zip_view.hpp000644 000765 000024 00000003161 12233035540 021300 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ZIP_VIEW_HPP_INCLUDED #define BOOST_MPL_ZIP_VIEW_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2010 // Copyright David Abrahams 2000-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: zip_view.hpp 61591 2010-04-26 21:31:09Z agurtovoy $ // $Date: 2010-04-26 14:31:09 -0700 (Mon, 26 Apr 2010) $ // $Revision: 61591 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename IteratorSeq > struct zip_iterator { typedef forward_iterator_tag category; typedef typename transform1< IteratorSeq , deref<_1> >::type type; typedef zip_iterator< typename transform1< IteratorSeq , mpl::next<_1> >::type > next; }; template< typename BOOST_MPL_AUX_NA_PARAM(Sequences) > struct zip_view { private: typedef typename transform1< Sequences, mpl::begin<_1> >::type first_ones_; typedef typename transform1< Sequences, mpl::end<_1> >::type last_ones_; public: typedef nested_begin_end_tag tag; typedef zip_view type; typedef zip_iterator begin; typedef zip_iterator end; }; BOOST_MPL_AUX_NA_SPEC(1, zip_view) }} #endif // BOOST_MPL_ZIP_VIEW_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/000755 000765 000024 00000000000 12233035540 021170 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/vector/vector0.hpp000644 000765 000024 00000002342 12233035540 022330 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif // BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/vector0_c.hpp000644 000765 000024 00000001416 12233035540 022633 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector0_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template< typename T > struct vector0_c : vector0<> { typedef vector0_c type; typedef T value_type; }; }} #endif // BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/vector10.hpp000644 000765 000024 00000002370 12233035540 022412 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector10.hpp # include #else # include # include # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, 10, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/vector10_c.hpp000644 000765 000024 00000002462 12233035540 022716 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_VECTOR10_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR10_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector10_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector10_c.hpp # include #else # include # include # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, 10, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR10_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/vector20.hpp000644 000765 000024 00000002372 12233035540 022415 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector20.hpp # include #else # include # include # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(11, 20, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/vector20_c.hpp000644 000765 000024 00000002464 12233035540 022721 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_VECTOR20_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR20_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector20_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector20_c.hpp # include #else # include # include # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(11, 20, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR20_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/vector30.hpp000644 000765 000024 00000002372 12233035540 022416 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_VECTOR30_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR30_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector30.hpp # include #else # include # include # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(21, 30, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR30_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/vector30_c.hpp000644 000765 000024 00000002521 12233035540 022714 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector30_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector30_c.hpp # include #else # include # include # include # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(21, 30, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_USE_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/vector40.hpp000644 000765 000024 00000002372 12233035540 022417 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector40.hpp # include #else # include # include # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(31, 40, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR40_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/vector40_c.hpp000644 000765 000024 00000002464 12233035540 022723 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_VECTOR40_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR40_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector40_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector40_c.hpp # include #else # include # include # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(31, 40, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR40_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/vector50.hpp000644 000765 000024 00000002372 12233035540 022420 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_VECTOR50_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR50_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector50.hpp # include #else # include # include # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(41, 50, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR50_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/vector50_c.hpp000644 000765 000024 00000002461 12233035540 022721 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_VECTOR50_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR50_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector50_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector50_c.hpp # include #else # include # include # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(41, 50, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR50_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/at.hpp000644 000765 000024 00000005147 12233035540 022314 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: at.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template< typename Vector, long n_ > struct v_at_impl { typedef long_< (Vector::lower_bound_::value + n_) > index_; typedef __typeof__( Vector::item_(index_()) ) type; }; template< typename Vector, long n_ > struct v_at : aux::wrapped_type< typename v_at_impl::type > { }; template<> struct at_impl< aux::vector_tag > { template< typename Vector, typename N > struct apply : v_at< Vector , BOOST_MPL_AUX_VALUE_WKND(N)::value > { }; }; #else # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) template< typename Vector, BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct v_at; template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct at_impl< aux::vector_tag > { template< typename Vector, typename N > struct apply #if !defined(__BORLANDC__) : v_at< Vector , BOOST_MPL_AUX_VALUE_WKND(N)::value > { #else { typedef typename v_at< Vector , BOOST_MPL_AUX_VALUE_WKND(N)::value >::type type; #endif }; }; # else namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct v_at_impl { template< typename V > struct result_; }; // to work around ETI, etc. template<> struct v_at_impl<-1> { template< typename V > struct result_ { typedef void_ type; }; }; } // namespace aux template< typename T, BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct v_at : aux::v_at_impl::template result_ { }; # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES }} #endif // BOOST_MPL_VECTOR_AUX_AT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/back.hpp000644 000765 000024 00000002613 12233035540 022603 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template<> struct back_impl< aux::vector_tag > { template< typename Vector > struct apply : v_at< Vector , prior::type::value > { }; }; #else #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< long n_ > struct back_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES }} #endif // BOOST_MPL_VECTOR_AUX_BACK_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/begin_end.hpp000644 000765 000024 00000002257 12233035540 023621 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) # include # include # include namespace boost { namespace mpl { template<> struct begin_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef v_iter type; }; }; template<> struct end_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef v_iter type; }; }; }} #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES #endif // BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/clear.hpp000644 000765 000024 00000002432 12233035540 022770 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template<> struct clear_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef vector0<> type; }; }; #else #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< long N > struct clear_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef vector0<> type; }; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES }} #endif // BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/empty.hpp000644 000765 000024 00000003001 12233035540 023031 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template<> struct empty_impl< aux::vector_tag > { template< typename Vector > struct apply : is_same< typename Vector::lower_bound_ , typename Vector::upper_bound_ > { }; }; #else template<> struct empty_impl< aux::vector_tag<0> > { template< typename Vector > struct apply : true_ { }; }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< long N > struct empty_impl< aux::vector_tag > { template< typename Vector > struct apply : false_ { }; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES }} #endif // BOOST_MPL_VECTOR_AUX_EMPTY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/front.hpp000644 000765 000024 00000002537 12233035540 023040 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_FRONT_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template<> struct front_impl< aux::vector_tag > { template< typename Vector > struct apply : v_at { }; }; #else #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct front_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES }} #endif // BOOST_MPL_VECTOR_AUX_FRONT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/include_preprocessed.hpp000644 000765 000024 00000003357 12233035540 026112 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) # define AUX778076_INCLUDE_DIR typeof_based #elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) # define AUX778076_INCLUDE_DIR no_ctps #else # define AUX778076_INCLUDE_DIR plain #endif #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_HEADER \ AUX778076_INCLUDE_DIR/BOOST_MPL_PREPROCESSED_HEADER \ /**/ #else # define AUX778076_HEADER \ BOOST_PP_CAT(AUX778076_INCLUDE_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ /**/ #endif #if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) # define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX778076_HEADER) # include AUX778076_INCLUDE_STRING # undef AUX778076_INCLUDE_STRING #else # include BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX778076_HEADER) #endif # undef AUX778076_HEADER # undef AUX778076_INCLUDE_DIR #undef BOOST_MPL_PREPROCESSED_HEADER passenger-4.0.37/ext/boost/mpl/vector/aux_/item.hpp000644 000765 000024 00000005004 12233035540 022636 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template< typename T , typename Base , int at_front = 0 > struct v_item : Base { typedef typename Base::upper_bound_ index_; typedef typename next::type upper_bound_; typedef typename next::type size; typedef Base base; typedef v_item type; // agurt 10/sep/04: MWCW <= 9.3 workaround here and below; the compiler // breaks if using declaration comes _before_ the new overload static aux::type_wrapper item_(index_); using Base::item_; }; template< typename T , typename Base > struct v_item : Base { typedef typename prior::type index_; typedef index_ lower_bound_; typedef typename next::type size; typedef Base base; typedef v_item type; static aux::type_wrapper item_(index_); using Base::item_; }; // "erasure" item template< typename Base , int at_front > struct v_mask : Base { typedef typename prior::type index_; typedef index_ upper_bound_; typedef typename prior::type size; typedef Base base; typedef v_mask type; static aux::type_wrapper item_(index_); using Base::item_; }; template< typename Base > struct v_mask : Base { typedef typename Base::lower_bound_ index_; typedef typename next::type lower_bound_; typedef typename prior::type size; typedef Base base; typedef v_mask type; static aux::type_wrapper item_(index_); using Base::item_; }; #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES }} #endif // BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/iterator.hpp000644 000765 000024 00000006006 12233035540 023534 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_VECTOR_ITERATOR_HPP_INCLUDED #define BOOST_MPL_AUX_VECTOR_ITERATOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename Vector , BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct v_iter { typedef aux::v_iter_tag tag; typedef random_access_iterator_tag category; typedef typename v_at::type type; typedef Vector vector_; typedef mpl::long_ pos; #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) enum { next_ = n_ + 1 , prior_ = n_ - 1 , pos_ = n_ }; typedef v_iter next; typedef v_iter prior; #endif }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Vector , BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct next< v_iter > { typedef v_iter type; }; template< typename Vector , BOOST_MPL_AUX_NTTP_DECL(long, n_) > struct prior< v_iter > { typedef v_iter type; }; template< typename Vector , BOOST_MPL_AUX_NTTP_DECL(long, n_) , typename Distance > struct advance< v_iter,Distance> { typedef v_iter< Vector , (n_ + BOOST_MPL_AUX_NESTED_VALUE_WKND(long, Distance)) > type; }; template< typename Vector , BOOST_MPL_AUX_NTTP_DECL(long, n_) , BOOST_MPL_AUX_NTTP_DECL(long, m_) > struct distance< v_iter, v_iter > : mpl::long_<(m_ - n_)> { }; #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template<> struct advance_impl { template< typename Iterator, typename N > struct apply { enum { pos_ = Iterator::pos_, n_ = N::value }; typedef v_iter< typename Iterator::vector_ , (pos_ + n_) > type; }; }; template<> struct distance_impl { template< typename Iter1, typename Iter2 > struct apply { enum { pos1_ = Iter1::pos_, pos2_ = Iter2::pos_ }; typedef long_<( pos2_ - pos1_ )> type; BOOST_STATIC_CONSTANT(long, value = ( pos2_ - pos1_ )); }; }; #endif }} #endif // BOOST_MPL_AUX_VECTOR_ITERATOR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/numbered.hpp000644 000765 000024 00000011432 12233035540 023503 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION #if defined(BOOST_PP_IS_ITERATING) // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #define i_ BOOST_PP_FRAME_ITERATION(1) #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) # define AUX778076_VECTOR_TAIL(vector, i_, T) \ BOOST_PP_CAT(vector,i_)< \ BOOST_PP_ENUM_PARAMS(i_, T) \ > \ /**/ #if i_ > 0 template< BOOST_PP_ENUM_PARAMS(i_, typename T) > struct BOOST_PP_CAT(vector,i_) : v_item< BOOST_PP_CAT(T,BOOST_PP_DEC(i_)) , AUX778076_VECTOR_TAIL(vector,BOOST_PP_DEC(i_),T) > { typedef BOOST_PP_CAT(vector,i_) type; }; #endif # undef AUX778076_VECTOR_TAIL #else // "brute force" implementation # if i_ > 0 template< BOOST_PP_ENUM_PARAMS(i_, typename T) > struct BOOST_PP_CAT(vector,i_) { typedef aux::vector_tag tag; typedef BOOST_PP_CAT(vector,i_) type; # define AUX778076_VECTOR_ITEM(unused, i_, unused2) \ typedef BOOST_PP_CAT(T,i_) BOOST_PP_CAT(item,i_); \ /**/ BOOST_PP_REPEAT(i_, AUX778076_VECTOR_ITEM, unused) # undef AUX778076_VECTOR_ITEM typedef void_ BOOST_PP_CAT(item,i_); typedef BOOST_PP_CAT(T,BOOST_PP_DEC(i_)) back; // Borland forces us to use 'type' here (instead of the class name) typedef v_iter begin; typedef v_iter end; }; template<> struct push_front_impl< aux::vector_tag > { template< typename Vector, typename T > struct apply { typedef BOOST_PP_CAT(vector,i_)< T BOOST_PP_COMMA_IF(BOOST_PP_DEC(i_)) BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i_), typename Vector::item) > type; }; }; template<> struct pop_front_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef BOOST_PP_CAT(vector,BOOST_PP_DEC(i_))< BOOST_PP_ENUM_SHIFTED_PARAMS(i_, typename Vector::item) > type; }; }; template<> struct push_back_impl< aux::vector_tag > { template< typename Vector, typename T > struct apply { typedef BOOST_PP_CAT(vector,i_)< BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i_), typename Vector::item) BOOST_PP_COMMA_IF(BOOST_PP_DEC(i_)) T > type; }; }; template<> struct pop_back_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef BOOST_PP_CAT(vector,BOOST_PP_DEC(i_))< BOOST_PP_ENUM_PARAMS(BOOST_PP_DEC(i_), typename Vector::item) > type; }; }; # endif // i_ > 0 # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) template< typename V > struct v_at { typedef typename V::BOOST_PP_CAT(item,i_) type; }; # else namespace aux { template<> struct v_at_impl { template< typename V_ > struct result_ { typedef typename V_::BOOST_PP_CAT(item,i_) type; }; }; } template<> struct at_impl< aux::vector_tag > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; #if i_ > 0 template<> struct front_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag > { template< typename Vector > struct apply : false_ { }; }; #endif template<> struct size_impl< aux::vector_tag > { template< typename Vector > struct apply : long_ { }; }; template<> struct O1_size_impl< aux::vector_tag > : size_impl< aux::vector_tag > { }; template<> struct clear_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef vector0<> type; }; }; # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/vector/aux_/numbered_c.hpp000644 000765 000024 00000004002 12233035540 024000 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION #if defined(BOOST_PP_IS_ITERATING) // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #define i_ BOOST_PP_FRAME_ITERATION(1) #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) # define AUX778076_VECTOR_TAIL(vector, i_, C) \ BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) \ /**/ #if i_ > 0 template< typename T , BOOST_PP_ENUM_PARAMS(i_, T C) > struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) : v_item< integral_c , AUX778076_VECTOR_TAIL(vector,BOOST_PP_DEC(i_),C) > { typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type; typedef T value_type; }; #endif # undef AUX778076_VECTOR_TAIL #else // "brute force" implementation # define AUX778076_VECTOR_C_PARAM_FUNC(unused, i_, param) \ BOOST_PP_COMMA_IF(i_) \ integral_c \ /**/ template< typename T , BOOST_PP_ENUM_PARAMS(i_, T C) > struct BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) : BOOST_PP_CAT(vector,i_)< BOOST_PP_REPEAT(i_,AUX778076_VECTOR_C_PARAM_FUNC,C) > { typedef BOOST_PP_CAT(BOOST_PP_CAT(vector,i_),_c) type; typedef T value_type; }; # undef AUX778076_VECTOR_C_PARAM_FUNC #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/vector/aux_/O1_size.hpp000644 000765 000024 00000002447 12233035540 023221 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template<> struct O1_size_impl< aux::vector_tag > { template< typename Vector > struct apply : Vector::size { }; }; #else #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< long N > struct O1_size_impl< aux::vector_tag > { template< typename Vector > struct apply : mpl::long_ { }; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES }} #endif // BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/pop_back.hpp000644 000765 000024 00000001777 12233035540 023473 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_POP_BACK_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_POP_BACK_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: pop_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) # include # include namespace boost { namespace mpl { template<> struct pop_back_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef v_mask type; }; }; }} #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES #endif // BOOST_MPL_VECTOR_AUX_POP_BACK_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/pop_front.hpp000644 000765 000024 00000002005 12233035540 023704 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_POP_FRONT_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_POP_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) # include # include namespace boost { namespace mpl { template<> struct pop_front_impl< aux::vector_tag > { template< typename Vector > struct apply { typedef v_mask type; }; }; }} #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES #endif // BOOST_MPL_VECTOR_AUX_POP_FRONT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/000755 000765 000024 00000000000 12233035540 023666 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/vector/aux_/push_back.hpp000644 000765 000024 00000001754 12233035540 023647 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_PUSH_BACK_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_PUSH_BACK_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) # include # include namespace boost { namespace mpl { template<> struct push_back_impl< aux::vector_tag > { template< typename Vector, typename T > struct apply { typedef v_item type; }; }; }} #endif #endif // BOOST_MPL_VECTOR_AUX_PUSH_BACK_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/push_front.hpp000644 000765 000024 00000002031 12233035540 024064 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_PUSH_FRONT_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_PUSH_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) # include # include namespace boost { namespace mpl { template<> struct push_front_impl< aux::vector_tag > { template< typename Vector, typename T > struct apply { typedef v_item type; }; }; }} #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES #endif // BOOST_MPL_VECTOR_AUX_PUSH_FRONT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/size.hpp000644 000765 000024 00000002256 12233035540 022660 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_SIZE_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template<> struct size_impl< aux::vector_tag > : O1_size_impl< aux::vector_tag > { }; #else #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< long N > struct size_impl< aux::vector_tag > : O1_size_impl< aux::vector_tag > { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES }} #endif // BOOST_MPL_VECTOR_AUX_SIZE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/tag.hpp000644 000765 000024 00000001516 12233035540 022457 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_TAG_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { namespace aux { struct v_iter_tag; #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) struct vector_tag; #else template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct vector_tag; #endif }}} #endif // BOOST_MPL_VECTOR_AUX_TAG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/vector0.hpp000644 000765 000024 00000002604 12233035540 023265 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED #define BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename Dummy = na > struct vector0; template<> struct vector0 { #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) typedef aux::vector_tag tag; typedef vector0 type; typedef long_<32768> lower_bound_; typedef lower_bound_ upper_bound_; typedef long_<0> size; static aux::type_wrapper item_(...); #else typedef aux::vector_tag<0> tag; typedef vector0 type; typedef void_ item0; typedef v_iter,0> begin; typedef v_iter,0> end; #endif }; }} #endif // BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/000755 000765 000024 00000000000 12233035540 025333 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/plain/000755 000765 000024 00000000000 12233035540 024771 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/000755 000765 000024 00000000000 12233035540 026332 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp000644 000765 000024 00000004654 12233035540 030517 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector10.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 > struct vector1 : v_item< T0 , vector0< > > { typedef vector1 type; }; template< typename T0, typename T1 > struct vector2 : v_item< T1 , vector1 > { typedef vector2 type; }; template< typename T0, typename T1, typename T2 > struct vector3 : v_item< T2 , vector2< T0,T1 > > { typedef vector3 type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector4 : v_item< T3 , vector3< T0,T1,T2 > > { typedef vector4 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector5 : v_item< T4 , vector4< T0,T1,T2,T3 > > { typedef vector5 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector6 : v_item< T5 , vector5< T0,T1,T2,T3,T4 > > { typedef vector6 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector7 : v_item< T6 , vector6< T0,T1,T2,T3,T4,T5 > > { typedef vector7 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector8 : v_item< T7 , vector7< T0,T1,T2,T3,T4,T5,T6 > > { typedef vector8 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector9 : v_item< T8 , vector8< T0,T1,T2,T3,T4,T5,T6,T7 > > { typedef vector9 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector10 : v_item< T9 , vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > > { typedef vector10 type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp000644 000765 000024 00000005261 12233035540 031014 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector10_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0 > struct vector1_c : v_item< integral_c< T,C0 > , vector0_c > { typedef vector1_c type; typedef T value_type; }; template< typename T , T C0, T C1 > struct vector2_c : v_item< integral_c< T,C1 > , vector1_c< T,C0 > > { typedef vector2_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2 > struct vector3_c : v_item< integral_c< T,C2 > , vector2_c< T,C0,C1 > > { typedef vector3_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3 > struct vector4_c : v_item< integral_c< T,C3 > , vector3_c< T,C0,C1,C2 > > { typedef vector4_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4 > struct vector5_c : v_item< integral_c< T,C4 > , vector4_c< T,C0,C1,C2,C3 > > { typedef vector5_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5 > struct vector6_c : v_item< integral_c< T,C5 > , vector5_c< T,C0,C1,C2,C3,C4 > > { typedef vector6_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6 > struct vector7_c : v_item< integral_c< T,C6 > , vector6_c< T,C0,C1,C2,C3,C4,C5 > > { typedef vector7_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7 > struct vector8_c : v_item< integral_c< T,C7 > , vector7_c< T,C0,C1,C2,C3,C4,C5,C6 > > { typedef vector8_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8 > struct vector9_c : v_item< integral_c< T,C8 > , vector8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > > { typedef vector9_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9 > struct vector10_c : v_item< integral_c< T,C9 > , vector9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > > { typedef vector10_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp000644 000765 000024 00000010333 12233035540 030507 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector20.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector11 : v_item< T10 , vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > > { typedef vector11 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector12 : v_item< T11 , vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > > { typedef vector12 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector13 : v_item< T12 , vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > > { typedef vector13 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector14 : v_item< T13 , vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > > { typedef vector14 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector15 : v_item< T14 , vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > > { typedef vector15 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector16 : v_item< T15 , vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > > { typedef vector16 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector17 : v_item< T16 , vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > > { typedef vector17 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector18 : v_item< T17 , vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > > { typedef vector18 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector19 : v_item< T18 , vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > > { typedef vector19 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector20 : v_item< T19 , vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > > { typedef vector20 type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp000644 000765 000024 00000007356 12233035540 031024 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector20_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 > struct vector11_c : v_item< integral_c< T,C10 > , vector10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > > { typedef vector11_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11 > struct vector12_c : v_item< integral_c< T,C11 > , vector11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > > { typedef vector12_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12 > struct vector13_c : v_item< integral_c< T,C12 > , vector12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > > { typedef vector13_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13 > struct vector14_c : v_item< integral_c< T,C13 > , vector13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > > { typedef vector14_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14 > struct vector15_c : v_item< integral_c< T,C14 > , vector14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 > > { typedef vector15_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15 > struct vector16_c : v_item< integral_c< T,C15 > , vector15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 > > { typedef vector16_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16 > struct vector17_c : v_item< integral_c< T,C16 > , vector16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 > > { typedef vector17_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17 > struct vector18_c : v_item< integral_c< T,C17 > , vector17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 > > { typedef vector18_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18 > struct vector19_c : v_item< integral_c< T,C18 > , vector18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 > > { typedef vector19_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19 > struct vector20_c : v_item< integral_c< T,C19 > , vector19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 > > { typedef vector20_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp000644 000765 000024 00000014107 12233035540 030513 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector30.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20 > struct vector21 : v_item< T20 , vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 > > { typedef vector21 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21 > struct vector22 : v_item< T21 , vector21< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 > > { typedef vector22 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22 > struct vector23 : v_item< T22 , vector22< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 > > { typedef vector23 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23 > struct vector24 : v_item< T23 , vector23< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 > > { typedef vector24 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 > struct vector25 : v_item< T24 , vector24< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 > > { typedef vector25 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25 > struct vector26 : v_item< T25 , vector25< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 > > { typedef vector26 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26 > struct vector27 : v_item< T26 , vector26< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 > > { typedef vector27 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27 > struct vector28 : v_item< T27 , vector27< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 > > { typedef vector28 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28 > struct vector29 : v_item< T28 , vector28< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 > > { typedef vector29 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 > struct vector30 : v_item< T29 , vector29< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 > > { typedef vector30 type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp000644 000765 000024 00000011554 12233035540 031020 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 > struct vector21_c : v_item< integral_c< T,C20 > , vector20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 > > { typedef vector21_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21 > struct vector22_c : v_item< integral_c< T,C21 > , vector21_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 > > { typedef vector22_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22 > struct vector23_c : v_item< integral_c< T,C22 > , vector22_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 > > { typedef vector23_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23 > struct vector24_c : v_item< integral_c< T,C23 > , vector23_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 > > { typedef vector24_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24 > struct vector25_c : v_item< integral_c< T,C24 > , vector24_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 > > { typedef vector25_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25 > struct vector26_c : v_item< integral_c< T,C25 > , vector25_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 > > { typedef vector26_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26 > struct vector27_c : v_item< integral_c< T,C26 > , vector26_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 > > { typedef vector27_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27 > struct vector28_c : v_item< integral_c< T,C27 > , vector27_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 > > { typedef vector28_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28 > struct vector29_c : v_item< integral_c< T,C28 > , vector28_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 > > { typedef vector29_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29 > struct vector30_c : v_item< integral_c< T,C29 > , vector29_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 > > { typedef vector30_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp000644 000765 000024 00000017663 12233035540 030526 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector40.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30 > struct vector31 : v_item< T30 , vector30< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 > > { typedef vector31 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31 > struct vector32 : v_item< T31 , vector31< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 > > { typedef vector32 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32 > struct vector33 : v_item< T32 , vector32< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 > > { typedef vector33 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33 > struct vector34 : v_item< T33 , vector33< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 > > { typedef vector34 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 > struct vector35 : v_item< T34 , vector34< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 > > { typedef vector35 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35 > struct vector36 : v_item< T35 , vector35< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 > > { typedef vector36 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36 > struct vector37 : v_item< T36 , vector36< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 > > { typedef vector37 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37 > struct vector38 : v_item< T37 , vector37< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 > > { typedef vector38 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38 > struct vector39 : v_item< T38 , vector38< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 > > { typedef vector39 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 > struct vector40 : v_item< T39 , vector39< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 > > { typedef vector40 type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp000644 000765 000024 00000013752 12233035540 031023 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector40_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 > struct vector31_c : v_item< integral_c< T,C30 > , vector30_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 > > { typedef vector31_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31 > struct vector32_c : v_item< integral_c< T,C31 > , vector31_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 > > { typedef vector32_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32 > struct vector33_c : v_item< integral_c< T,C32 > , vector32_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 > > { typedef vector33_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33 > struct vector34_c : v_item< integral_c< T,C33 > , vector33_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 > > { typedef vector34_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34 > struct vector35_c : v_item< integral_c< T,C34 > , vector34_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 > > { typedef vector35_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35 > struct vector36_c : v_item< integral_c< T,C35 > , vector35_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 > > { typedef vector36_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36 > struct vector37_c : v_item< integral_c< T,C36 > , vector36_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 > > { typedef vector37_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37 > struct vector38_c : v_item< integral_c< T,C37 > , vector37_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 > > { typedef vector38_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38 > struct vector39_c : v_item< integral_c< T,C38 > , vector38_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 > > { typedef vector39_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39 > struct vector40_c : v_item< integral_c< T,C39 > , vector39_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 > > { typedef vector40_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp000644 000765 000024 00000023437 12233035540 030523 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector50.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40 > struct vector41 : v_item< T40 , vector40< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 > > { typedef vector41 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41 > struct vector42 : v_item< T41 , vector41< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 > > { typedef vector42 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42 > struct vector43 : v_item< T42 , vector42< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 > > { typedef vector43 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43 > struct vector44 : v_item< T43 , vector43< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 > > { typedef vector44 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 > struct vector45 : v_item< T44 , vector44< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 > > { typedef vector45 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45 > struct vector46 : v_item< T45 , vector45< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 > > { typedef vector46 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46 > struct vector47 : v_item< T46 , vector46< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 > > { typedef vector47 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47 > struct vector48 : v_item< T47 , vector47< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 > > { typedef vector48 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47, typename T48 > struct vector49 : v_item< T48 , vector48< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 > > { typedef vector49 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47, typename T48, typename T49 > struct vector50 : v_item< T49 , vector49< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 > > { typedef vector50 type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp000644 000765 000024 00000016150 12233035540 031017 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector50_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 > struct vector41_c : v_item< integral_c< T,C40 > , vector40_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 > > { typedef vector41_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41 > struct vector42_c : v_item< integral_c< T,C41 > , vector41_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 > > { typedef vector42_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42 > struct vector43_c : v_item< integral_c< T,C42 > , vector42_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 > > { typedef vector43_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43 > struct vector44_c : v_item< integral_c< T,C43 > , vector43_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 > > { typedef vector44_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44 > struct vector45_c : v_item< integral_c< T,C44 > , vector44_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 > > { typedef vector45_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45 > struct vector46_c : v_item< integral_c< T,C45 > , vector45_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 > > { typedef vector46_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46 > struct vector47_c : v_item< integral_c< T,C46 > , vector46_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 > > { typedef vector47_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47 > struct vector48_c : v_item< integral_c< T,C47 > , vector47_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 > > { typedef vector48_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48 > struct vector49_c : v_item< integral_c< T,C48 > , vector48_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 > > { typedef vector49_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49 > struct vector50_c : v_item< integral_c< T,C49 > , vector49_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 > > { typedef vector50_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp000644 000765 000024 00000044165 12233035540 027157 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector10.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename V > struct v_at< V,0 > { typedef typename V::item0 type; }; template< typename T0 > struct vector1 { typedef aux::vector_tag<1> tag; typedef vector1 type; typedef T0 item0; typedef void_ item1; typedef T0 back; typedef v_iter< type,0 > begin; typedef v_iter< type,1 > end; }; template<> struct push_front_impl< aux::vector_tag<0> > { template< typename Vector, typename T > struct apply { typedef vector1< T > type; }; }; template<> struct pop_front_impl< aux::vector_tag<1> > { template< typename Vector > struct apply { typedef vector0< > type; }; }; template<> struct push_back_impl< aux::vector_tag<0> > { template< typename Vector, typename T > struct apply { typedef vector1< T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<1> > { template< typename Vector > struct apply { typedef vector0< > type; }; }; template< typename V > struct v_at< V,1 > { typedef typename V::item1 type; }; template< typename T0, typename T1 > struct vector2 { typedef aux::vector_tag<2> tag; typedef vector2 type; typedef T0 item0; typedef T1 item1; typedef void_ item2; typedef T1 back; typedef v_iter< type,0 > begin; typedef v_iter< type,2 > end; }; template<> struct push_front_impl< aux::vector_tag<1> > { template< typename Vector, typename T > struct apply { typedef vector2< T , typename Vector::item0 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<2> > { template< typename Vector > struct apply { typedef vector1< typename Vector::item1 > type; }; }; template<> struct push_back_impl< aux::vector_tag<1> > { template< typename Vector, typename T > struct apply { typedef vector2< typename Vector::item0 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<2> > { template< typename Vector > struct apply { typedef vector1< typename Vector::item0 > type; }; }; template< typename V > struct v_at< V,2 > { typedef typename V::item2 type; }; template< typename T0, typename T1, typename T2 > struct vector3 { typedef aux::vector_tag<3> tag; typedef vector3 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef void_ item3; typedef T2 back; typedef v_iter< type,0 > begin; typedef v_iter< type,3 > end; }; template<> struct push_front_impl< aux::vector_tag<2> > { template< typename Vector, typename T > struct apply { typedef vector3< T , typename Vector::item0, typename Vector::item1 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<3> > { template< typename Vector > struct apply { typedef vector2< typename Vector::item1, typename Vector::item2 > type; }; }; template<> struct push_back_impl< aux::vector_tag<2> > { template< typename Vector, typename T > struct apply { typedef vector3< typename Vector::item0, typename Vector::item1 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<3> > { template< typename Vector > struct apply { typedef vector2< typename Vector::item0, typename Vector::item1 > type; }; }; template< typename V > struct v_at< V,3 > { typedef typename V::item3 type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector4 { typedef aux::vector_tag<4> tag; typedef vector4 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef void_ item4; typedef T3 back; typedef v_iter< type,0 > begin; typedef v_iter< type,4 > end; }; template<> struct push_front_impl< aux::vector_tag<3> > { template< typename Vector, typename T > struct apply { typedef vector4< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<4> > { template< typename Vector > struct apply { typedef vector3< typename Vector::item1, typename Vector::item2 , typename Vector::item3 > type; }; }; template<> struct push_back_impl< aux::vector_tag<3> > { template< typename Vector, typename T > struct apply { typedef vector4< typename Vector::item0, typename Vector::item1 , typename Vector::item2 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<4> > { template< typename Vector > struct apply { typedef vector3< typename Vector::item0, typename Vector::item1 , typename Vector::item2 > type; }; }; template< typename V > struct v_at< V,4 > { typedef typename V::item4 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector5 { typedef aux::vector_tag<5> tag; typedef vector5 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef void_ item5; typedef T4 back; typedef v_iter< type,0 > begin; typedef v_iter< type,5 > end; }; template<> struct push_front_impl< aux::vector_tag<4> > { template< typename Vector, typename T > struct apply { typedef vector5< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<5> > { template< typename Vector > struct apply { typedef vector4< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 > type; }; }; template<> struct push_back_impl< aux::vector_tag<4> > { template< typename Vector, typename T > struct apply { typedef vector5< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<5> > { template< typename Vector > struct apply { typedef vector4< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 > type; }; }; template< typename V > struct v_at< V,5 > { typedef typename V::item5 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector6 { typedef aux::vector_tag<6> tag; typedef vector6 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef void_ item6; typedef T5 back; typedef v_iter< type,0 > begin; typedef v_iter< type,6 > end; }; template<> struct push_front_impl< aux::vector_tag<5> > { template< typename Vector, typename T > struct apply { typedef vector6< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<6> > { template< typename Vector > struct apply { typedef vector5< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5 > type; }; }; template<> struct push_back_impl< aux::vector_tag<5> > { template< typename Vector, typename T > struct apply { typedef vector6< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<6> > { template< typename Vector > struct apply { typedef vector5< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4 > type; }; }; template< typename V > struct v_at< V,6 > { typedef typename V::item6 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector7 { typedef aux::vector_tag<7> tag; typedef vector7 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef void_ item7; typedef T6 back; typedef v_iter< type,0 > begin; typedef v_iter< type,7 > end; }; template<> struct push_front_impl< aux::vector_tag<6> > { template< typename Vector, typename T > struct apply { typedef vector7< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<7> > { template< typename Vector > struct apply { typedef vector6< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 > type; }; }; template<> struct push_back_impl< aux::vector_tag<6> > { template< typename Vector, typename T > struct apply { typedef vector7< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<7> > { template< typename Vector > struct apply { typedef vector6< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 > type; }; }; template< typename V > struct v_at< V,7 > { typedef typename V::item7 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector8 { typedef aux::vector_tag<8> tag; typedef vector8 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef void_ item8; typedef T7 back; typedef v_iter< type,0 > begin; typedef v_iter< type,8 > end; }; template<> struct push_front_impl< aux::vector_tag<7> > { template< typename Vector, typename T > struct apply { typedef vector8< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<8> > { template< typename Vector > struct apply { typedef vector7< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7 > type; }; }; template<> struct push_back_impl< aux::vector_tag<7> > { template< typename Vector, typename T > struct apply { typedef vector8< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<8> > { template< typename Vector > struct apply { typedef vector7< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6 > type; }; }; template< typename V > struct v_at< V,8 > { typedef typename V::item8 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector9 { typedef aux::vector_tag<9> tag; typedef vector9 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef void_ item9; typedef T8 back; typedef v_iter< type,0 > begin; typedef v_iter< type,9 > end; }; template<> struct push_front_impl< aux::vector_tag<8> > { template< typename Vector, typename T > struct apply { typedef vector9< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<9> > { template< typename Vector > struct apply { typedef vector8< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 > type; }; }; template<> struct push_back_impl< aux::vector_tag<8> > { template< typename Vector, typename T > struct apply { typedef vector9< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<9> > { template< typename Vector > struct apply { typedef vector8< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 > type; }; }; template< typename V > struct v_at< V,9 > { typedef typename V::item9 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector10 { typedef aux::vector_tag<10> tag; typedef vector10 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef void_ item10; typedef T9 back; typedef v_iter< type,0 > begin; typedef v_iter< type,10 > end; }; template<> struct push_front_impl< aux::vector_tag<9> > { template< typename Vector, typename T > struct apply { typedef vector10< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<10> > { template< typename Vector > struct apply { typedef vector9< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9 > type; }; }; template<> struct push_back_impl< aux::vector_tag<9> > { template< typename Vector, typename T > struct apply { typedef vector10< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<10> > { template< typename Vector > struct apply { typedef vector9< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8 > type; }; }; template< typename V > struct v_at< V,10 > { typedef typename V::item10 type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp000644 000765 000024 00000006302 12233035540 027450 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector10_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0 > struct vector1_c : vector1< integral_c< T,C0 > > { typedef vector1_c type; typedef T value_type; }; template< typename T , T C0, T C1 > struct vector2_c : vector2< integral_c< T,C0 >, integral_c< T,C1 > > { typedef vector2_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2 > struct vector3_c : vector3< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > > { typedef vector3_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3 > struct vector4_c : vector4< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >, integral_c > { typedef vector4_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4 > struct vector5_c : vector5< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 > > { typedef vector5_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5 > struct vector6_c : vector6< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 > > { typedef vector6_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6 > struct vector7_c : vector7< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c > { typedef vector7_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7 > struct vector8_c : vector8< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 > > { typedef vector8_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8 > struct vector9_c : vector9< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 > > { typedef vector9_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9 > struct vector10_c : vector10< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > > { typedef vector10_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp000644 000765 000024 00000103715 12233035540 027155 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector20.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector11 { typedef aux::vector_tag<11> tag; typedef vector11 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef void_ item11; typedef T10 back; typedef v_iter< type,0 > begin; typedef v_iter< type,11 > end; }; template<> struct push_front_impl< aux::vector_tag<10> > { template< typename Vector, typename T > struct apply { typedef vector11< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<11> > { template< typename Vector > struct apply { typedef vector10< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 > type; }; }; template<> struct push_back_impl< aux::vector_tag<10> > { template< typename Vector, typename T > struct apply { typedef vector11< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<11> > { template< typename Vector > struct apply { typedef vector10< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 > type; }; }; template< typename V > struct v_at< V,11 > { typedef typename V::item11 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector12 { typedef aux::vector_tag<12> tag; typedef vector12 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef void_ item12; typedef T11 back; typedef v_iter< type,0 > begin; typedef v_iter< type,12 > end; }; template<> struct push_front_impl< aux::vector_tag<11> > { template< typename Vector, typename T > struct apply { typedef vector12< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<12> > { template< typename Vector > struct apply { typedef vector11< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11 > type; }; }; template<> struct push_back_impl< aux::vector_tag<11> > { template< typename Vector, typename T > struct apply { typedef vector12< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<12> > { template< typename Vector > struct apply { typedef vector11< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10 > type; }; }; template< typename V > struct v_at< V,12 > { typedef typename V::item12 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector13 { typedef aux::vector_tag<13> tag; typedef vector13 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef void_ item13; typedef T12 back; typedef v_iter< type,0 > begin; typedef v_iter< type,13 > end; }; template<> struct push_front_impl< aux::vector_tag<12> > { template< typename Vector, typename T > struct apply { typedef vector13< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<13> > { template< typename Vector > struct apply { typedef vector12< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 > type; }; }; template<> struct push_back_impl< aux::vector_tag<12> > { template< typename Vector, typename T > struct apply { typedef vector13< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<13> > { template< typename Vector > struct apply { typedef vector12< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 > type; }; }; template< typename V > struct v_at< V,13 > { typedef typename V::item13 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector14 { typedef aux::vector_tag<14> tag; typedef vector14 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef void_ item14; typedef T13 back; typedef v_iter< type,0 > begin; typedef v_iter< type,14 > end; }; template<> struct push_front_impl< aux::vector_tag<13> > { template< typename Vector, typename T > struct apply { typedef vector14< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<14> > { template< typename Vector > struct apply { typedef vector13< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13 > type; }; }; template<> struct push_back_impl< aux::vector_tag<13> > { template< typename Vector, typename T > struct apply { typedef vector14< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<14> > { template< typename Vector > struct apply { typedef vector13< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12 > type; }; }; template< typename V > struct v_at< V,14 > { typedef typename V::item14 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector15 { typedef aux::vector_tag<15> tag; typedef vector15 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef void_ item15; typedef T14 back; typedef v_iter< type,0 > begin; typedef v_iter< type,15 > end; }; template<> struct push_front_impl< aux::vector_tag<14> > { template< typename Vector, typename T > struct apply { typedef vector15< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<15> > { template< typename Vector > struct apply { typedef vector14< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 > type; }; }; template<> struct push_back_impl< aux::vector_tag<14> > { template< typename Vector, typename T > struct apply { typedef vector15< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<15> > { template< typename Vector > struct apply { typedef vector14< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 > type; }; }; template< typename V > struct v_at< V,15 > { typedef typename V::item15 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector16 { typedef aux::vector_tag<16> tag; typedef vector16 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef void_ item16; typedef T15 back; typedef v_iter< type,0 > begin; typedef v_iter< type,16 > end; }; template<> struct push_front_impl< aux::vector_tag<15> > { template< typename Vector, typename T > struct apply { typedef vector16< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<16> > { template< typename Vector > struct apply { typedef vector15< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15 > type; }; }; template<> struct push_back_impl< aux::vector_tag<15> > { template< typename Vector, typename T > struct apply { typedef vector16< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<16> > { template< typename Vector > struct apply { typedef vector15< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14 > type; }; }; template< typename V > struct v_at< V,16 > { typedef typename V::item16 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector17 { typedef aux::vector_tag<17> tag; typedef vector17 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef void_ item17; typedef T16 back; typedef v_iter< type,0 > begin; typedef v_iter< type,17 > end; }; template<> struct push_front_impl< aux::vector_tag<16> > { template< typename Vector, typename T > struct apply { typedef vector17< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<17> > { template< typename Vector > struct apply { typedef vector16< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 > type; }; }; template<> struct push_back_impl< aux::vector_tag<16> > { template< typename Vector, typename T > struct apply { typedef vector17< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<17> > { template< typename Vector > struct apply { typedef vector16< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 > type; }; }; template< typename V > struct v_at< V,17 > { typedef typename V::item17 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector18 { typedef aux::vector_tag<18> tag; typedef vector18 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef void_ item18; typedef T17 back; typedef v_iter< type,0 > begin; typedef v_iter< type,18 > end; }; template<> struct push_front_impl< aux::vector_tag<17> > { template< typename Vector, typename T > struct apply { typedef vector18< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<18> > { template< typename Vector > struct apply { typedef vector17< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17 > type; }; }; template<> struct push_back_impl< aux::vector_tag<17> > { template< typename Vector, typename T > struct apply { typedef vector18< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<18> > { template< typename Vector > struct apply { typedef vector17< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16 > type; }; }; template< typename V > struct v_at< V,18 > { typedef typename V::item18 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector19 { typedef aux::vector_tag<19> tag; typedef vector19 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef void_ item19; typedef T18 back; typedef v_iter< type,0 > begin; typedef v_iter< type,19 > end; }; template<> struct push_front_impl< aux::vector_tag<18> > { template< typename Vector, typename T > struct apply { typedef vector19< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<19> > { template< typename Vector > struct apply { typedef vector18< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 > type; }; }; template<> struct push_back_impl< aux::vector_tag<18> > { template< typename Vector, typename T > struct apply { typedef vector19< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<19> > { template< typename Vector > struct apply { typedef vector18< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 > type; }; }; template< typename V > struct v_at< V,19 > { typedef typename V::item19 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector20 { typedef aux::vector_tag<20> tag; typedef vector20 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef void_ item20; typedef T19 back; typedef v_iter< type,0 > begin; typedef v_iter< type,20 > end; }; template<> struct push_front_impl< aux::vector_tag<19> > { template< typename Vector, typename T > struct apply { typedef vector20< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<20> > { template< typename Vector > struct apply { typedef vector19< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19 > type; }; }; template<> struct push_back_impl< aux::vector_tag<19> > { template< typename Vector, typename T > struct apply { typedef vector20< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<20> > { template< typename Vector > struct apply { typedef vector19< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18 > type; }; }; template< typename V > struct v_at< V,20 > { typedef typename V::item20 type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp000644 000765 000024 00000014331 12233035540 027452 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector20_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 > struct vector11_c : vector11< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >, integral_c > { typedef vector11_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11 > struct vector12_c : vector12< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 > > { typedef vector12_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12 > struct vector13_c : vector13< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > > { typedef vector13_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13 > struct vector14_c : vector14< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >, integral_c > { typedef vector14_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14 > struct vector15_c : vector15< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 > > { typedef vector15_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15 > struct vector16_c : vector16< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > > { typedef vector16_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16 > struct vector17_c : vector17< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >, integral_c > { typedef vector17_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17 > struct vector18_c : vector18< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 > > { typedef vector18_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18 > struct vector19_c : vector19< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > > { typedef vector19_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19 > struct vector20_c : vector20< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >, integral_c > { typedef vector20_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp000644 000765 000024 00000144101 12233035540 027150 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector30.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20 > struct vector21 { typedef aux::vector_tag<21> tag; typedef vector21 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef void_ item21; typedef T20 back; typedef v_iter< type,0 > begin; typedef v_iter< type,21 > end; }; template<> struct push_front_impl< aux::vector_tag<20> > { template< typename Vector, typename T > struct apply { typedef vector21< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<21> > { template< typename Vector > struct apply { typedef vector20< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 > type; }; }; template<> struct push_back_impl< aux::vector_tag<20> > { template< typename Vector, typename T > struct apply { typedef vector21< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<21> > { template< typename Vector > struct apply { typedef vector20< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 > type; }; }; template< typename V > struct v_at< V,21 > { typedef typename V::item21 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21 > struct vector22 { typedef aux::vector_tag<22> tag; typedef vector22 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef void_ item22; typedef T21 back; typedef v_iter< type,0 > begin; typedef v_iter< type,22 > end; }; template<> struct push_front_impl< aux::vector_tag<21> > { template< typename Vector, typename T > struct apply { typedef vector22< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<22> > { template< typename Vector > struct apply { typedef vector21< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21 > type; }; }; template<> struct push_back_impl< aux::vector_tag<21> > { template< typename Vector, typename T > struct apply { typedef vector22< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<22> > { template< typename Vector > struct apply { typedef vector21< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20 > type; }; }; template< typename V > struct v_at< V,22 > { typedef typename V::item22 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22 > struct vector23 { typedef aux::vector_tag<23> tag; typedef vector23 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef void_ item23; typedef T22 back; typedef v_iter< type,0 > begin; typedef v_iter< type,23 > end; }; template<> struct push_front_impl< aux::vector_tag<22> > { template< typename Vector, typename T > struct apply { typedef vector23< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<23> > { template< typename Vector > struct apply { typedef vector22< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 > type; }; }; template<> struct push_back_impl< aux::vector_tag<22> > { template< typename Vector, typename T > struct apply { typedef vector23< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<23> > { template< typename Vector > struct apply { typedef vector22< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 > type; }; }; template< typename V > struct v_at< V,23 > { typedef typename V::item23 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23 > struct vector24 { typedef aux::vector_tag<24> tag; typedef vector24 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef void_ item24; typedef T23 back; typedef v_iter< type,0 > begin; typedef v_iter< type,24 > end; }; template<> struct push_front_impl< aux::vector_tag<23> > { template< typename Vector, typename T > struct apply { typedef vector24< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<24> > { template< typename Vector > struct apply { typedef vector23< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23 > type; }; }; template<> struct push_back_impl< aux::vector_tag<23> > { template< typename Vector, typename T > struct apply { typedef vector24< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<24> > { template< typename Vector > struct apply { typedef vector23< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22 > type; }; }; template< typename V > struct v_at< V,24 > { typedef typename V::item24 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 > struct vector25 { typedef aux::vector_tag<25> tag; typedef vector25 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef void_ item25; typedef T24 back; typedef v_iter< type,0 > begin; typedef v_iter< type,25 > end; }; template<> struct push_front_impl< aux::vector_tag<24> > { template< typename Vector, typename T > struct apply { typedef vector25< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<25> > { template< typename Vector > struct apply { typedef vector24< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 > type; }; }; template<> struct push_back_impl< aux::vector_tag<24> > { template< typename Vector, typename T > struct apply { typedef vector25< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<25> > { template< typename Vector > struct apply { typedef vector24< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 > type; }; }; template< typename V > struct v_at< V,25 > { typedef typename V::item25 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25 > struct vector26 { typedef aux::vector_tag<26> tag; typedef vector26 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef void_ item26; typedef T25 back; typedef v_iter< type,0 > begin; typedef v_iter< type,26 > end; }; template<> struct push_front_impl< aux::vector_tag<25> > { template< typename Vector, typename T > struct apply { typedef vector26< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<26> > { template< typename Vector > struct apply { typedef vector25< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25 > type; }; }; template<> struct push_back_impl< aux::vector_tag<25> > { template< typename Vector, typename T > struct apply { typedef vector26< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<26> > { template< typename Vector > struct apply { typedef vector25< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24 > type; }; }; template< typename V > struct v_at< V,26 > { typedef typename V::item26 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26 > struct vector27 { typedef aux::vector_tag<27> tag; typedef vector27 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef void_ item27; typedef T26 back; typedef v_iter< type,0 > begin; typedef v_iter< type,27 > end; }; template<> struct push_front_impl< aux::vector_tag<26> > { template< typename Vector, typename T > struct apply { typedef vector27< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<27> > { template< typename Vector > struct apply { typedef vector26< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 > type; }; }; template<> struct push_back_impl< aux::vector_tag<26> > { template< typename Vector, typename T > struct apply { typedef vector27< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<27> > { template< typename Vector > struct apply { typedef vector26< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 > type; }; }; template< typename V > struct v_at< V,27 > { typedef typename V::item27 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27 > struct vector28 { typedef aux::vector_tag<28> tag; typedef vector28 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef void_ item28; typedef T27 back; typedef v_iter< type,0 > begin; typedef v_iter< type,28 > end; }; template<> struct push_front_impl< aux::vector_tag<27> > { template< typename Vector, typename T > struct apply { typedef vector28< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<28> > { template< typename Vector > struct apply { typedef vector27< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27 > type; }; }; template<> struct push_back_impl< aux::vector_tag<27> > { template< typename Vector, typename T > struct apply { typedef vector28< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<28> > { template< typename Vector > struct apply { typedef vector27< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26 > type; }; }; template< typename V > struct v_at< V,28 > { typedef typename V::item28 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28 > struct vector29 { typedef aux::vector_tag<29> tag; typedef vector29 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef void_ item29; typedef T28 back; typedef v_iter< type,0 > begin; typedef v_iter< type,29 > end; }; template<> struct push_front_impl< aux::vector_tag<28> > { template< typename Vector, typename T > struct apply { typedef vector29< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<29> > { template< typename Vector > struct apply { typedef vector28< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 > type; }; }; template<> struct push_back_impl< aux::vector_tag<28> > { template< typename Vector, typename T > struct apply { typedef vector29< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<29> > { template< typename Vector > struct apply { typedef vector28< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 > type; }; }; template< typename V > struct v_at< V,29 > { typedef typename V::item29 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 > struct vector30 { typedef aux::vector_tag<30> tag; typedef vector30 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef void_ item30; typedef T29 back; typedef v_iter< type,0 > begin; typedef v_iter< type,30 > end; }; template<> struct push_front_impl< aux::vector_tag<29> > { template< typename Vector, typename T > struct apply { typedef vector30< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<30> > { template< typename Vector > struct apply { typedef vector29< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29 > type; }; }; template<> struct push_back_impl< aux::vector_tag<29> > { template< typename Vector, typename T > struct apply { typedef vector30< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<30> > { template< typename Vector > struct apply { typedef vector29< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28 > type; }; }; template< typename V > struct v_at< V,30 > { typedef typename V::item30 type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp000644 000765 000024 00000022445 12233035540 027460 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 > struct vector21_c : vector21< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 > > { typedef vector21_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21 > struct vector22_c : vector22< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > > { typedef vector22_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22 > struct vector23_c : vector23< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >, integral_c > { typedef vector23_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23 > struct vector24_c : vector24< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 > > { typedef vector24_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24 > struct vector25_c : vector25< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > > { typedef vector25_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25 > struct vector26_c : vector26< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >, integral_c > { typedef vector26_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26 > struct vector27_c : vector27< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 > > { typedef vector27_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27 > struct vector28_c : vector28< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > > { typedef vector28_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28 > struct vector29_c : vector29< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >, integral_c > { typedef vector29_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29 > struct vector30_c : vector30< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 > > { typedef vector30_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp000644 000765 000024 00000204265 12233035540 027161 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector40.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30 > struct vector31 { typedef aux::vector_tag<31> tag; typedef vector31 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef void_ item31; typedef T30 back; typedef v_iter< type,0 > begin; typedef v_iter< type,31 > end; }; template<> struct push_front_impl< aux::vector_tag<30> > { template< typename Vector, typename T > struct apply { typedef vector31< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<31> > { template< typename Vector > struct apply { typedef vector30< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 > type; }; }; template<> struct push_back_impl< aux::vector_tag<30> > { template< typename Vector, typename T > struct apply { typedef vector31< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<31> > { template< typename Vector > struct apply { typedef vector30< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 > type; }; }; template< typename V > struct v_at< V,31 > { typedef typename V::item31 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31 > struct vector32 { typedef aux::vector_tag<32> tag; typedef vector32 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef void_ item32; typedef T31 back; typedef v_iter< type,0 > begin; typedef v_iter< type,32 > end; }; template<> struct push_front_impl< aux::vector_tag<31> > { template< typename Vector, typename T > struct apply { typedef vector32< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<32> > { template< typename Vector > struct apply { typedef vector31< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31 > type; }; }; template<> struct push_back_impl< aux::vector_tag<31> > { template< typename Vector, typename T > struct apply { typedef vector32< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<32> > { template< typename Vector > struct apply { typedef vector31< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30 > type; }; }; template< typename V > struct v_at< V,32 > { typedef typename V::item32 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32 > struct vector33 { typedef aux::vector_tag<33> tag; typedef vector33 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef void_ item33; typedef T32 back; typedef v_iter< type,0 > begin; typedef v_iter< type,33 > end; }; template<> struct push_front_impl< aux::vector_tag<32> > { template< typename Vector, typename T > struct apply { typedef vector33< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<33> > { template< typename Vector > struct apply { typedef vector32< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 > type; }; }; template<> struct push_back_impl< aux::vector_tag<32> > { template< typename Vector, typename T > struct apply { typedef vector33< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<33> > { template< typename Vector > struct apply { typedef vector32< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 > type; }; }; template< typename V > struct v_at< V,33 > { typedef typename V::item33 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33 > struct vector34 { typedef aux::vector_tag<34> tag; typedef vector34 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef void_ item34; typedef T33 back; typedef v_iter< type,0 > begin; typedef v_iter< type,34 > end; }; template<> struct push_front_impl< aux::vector_tag<33> > { template< typename Vector, typename T > struct apply { typedef vector34< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<34> > { template< typename Vector > struct apply { typedef vector33< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33 > type; }; }; template<> struct push_back_impl< aux::vector_tag<33> > { template< typename Vector, typename T > struct apply { typedef vector34< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<34> > { template< typename Vector > struct apply { typedef vector33< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32 > type; }; }; template< typename V > struct v_at< V,34 > { typedef typename V::item34 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 > struct vector35 { typedef aux::vector_tag<35> tag; typedef vector35 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef void_ item35; typedef T34 back; typedef v_iter< type,0 > begin; typedef v_iter< type,35 > end; }; template<> struct push_front_impl< aux::vector_tag<34> > { template< typename Vector, typename T > struct apply { typedef vector35< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<35> > { template< typename Vector > struct apply { typedef vector34< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 > type; }; }; template<> struct push_back_impl< aux::vector_tag<34> > { template< typename Vector, typename T > struct apply { typedef vector35< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<35> > { template< typename Vector > struct apply { typedef vector34< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 > type; }; }; template< typename V > struct v_at< V,35 > { typedef typename V::item35 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35 > struct vector36 { typedef aux::vector_tag<36> tag; typedef vector36 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef void_ item36; typedef T35 back; typedef v_iter< type,0 > begin; typedef v_iter< type,36 > end; }; template<> struct push_front_impl< aux::vector_tag<35> > { template< typename Vector, typename T > struct apply { typedef vector36< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<36> > { template< typename Vector > struct apply { typedef vector35< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35 > type; }; }; template<> struct push_back_impl< aux::vector_tag<35> > { template< typename Vector, typename T > struct apply { typedef vector36< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<36> > { template< typename Vector > struct apply { typedef vector35< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34 > type; }; }; template< typename V > struct v_at< V,36 > { typedef typename V::item36 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36 > struct vector37 { typedef aux::vector_tag<37> tag; typedef vector37 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef void_ item37; typedef T36 back; typedef v_iter< type,0 > begin; typedef v_iter< type,37 > end; }; template<> struct push_front_impl< aux::vector_tag<36> > { template< typename Vector, typename T > struct apply { typedef vector37< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<37> > { template< typename Vector > struct apply { typedef vector36< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 > type; }; }; template<> struct push_back_impl< aux::vector_tag<36> > { template< typename Vector, typename T > struct apply { typedef vector37< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<37> > { template< typename Vector > struct apply { typedef vector36< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 > type; }; }; template< typename V > struct v_at< V,37 > { typedef typename V::item37 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37 > struct vector38 { typedef aux::vector_tag<38> tag; typedef vector38 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef void_ item38; typedef T37 back; typedef v_iter< type,0 > begin; typedef v_iter< type,38 > end; }; template<> struct push_front_impl< aux::vector_tag<37> > { template< typename Vector, typename T > struct apply { typedef vector38< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<38> > { template< typename Vector > struct apply { typedef vector37< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37 > type; }; }; template<> struct push_back_impl< aux::vector_tag<37> > { template< typename Vector, typename T > struct apply { typedef vector38< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<38> > { template< typename Vector > struct apply { typedef vector37< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36 > type; }; }; template< typename V > struct v_at< V,38 > { typedef typename V::item38 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38 > struct vector39 { typedef aux::vector_tag<39> tag; typedef vector39 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef void_ item39; typedef T38 back; typedef v_iter< type,0 > begin; typedef v_iter< type,39 > end; }; template<> struct push_front_impl< aux::vector_tag<38> > { template< typename Vector, typename T > struct apply { typedef vector39< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<39> > { template< typename Vector > struct apply { typedef vector38< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 > type; }; }; template<> struct push_back_impl< aux::vector_tag<38> > { template< typename Vector, typename T > struct apply { typedef vector39< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<39> > { template< typename Vector > struct apply { typedef vector38< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 > type; }; }; template< typename V > struct v_at< V,39 > { typedef typename V::item39 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 > struct vector40 { typedef aux::vector_tag<40> tag; typedef vector40 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef void_ item40; typedef T39 back; typedef v_iter< type,0 > begin; typedef v_iter< type,40 > end; }; template<> struct push_front_impl< aux::vector_tag<39> > { template< typename Vector, typename T > struct apply { typedef vector40< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<40> > { template< typename Vector > struct apply { typedef vector39< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39 > type; }; }; template<> struct push_back_impl< aux::vector_tag<39> > { template< typename Vector, typename T > struct apply { typedef vector40< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<40> > { template< typename Vector > struct apply { typedef vector39< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38 > type; }; }; template< typename V > struct v_at< V,40 > { typedef typename V::item40 type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp000644 000765 000024 00000030560 12233035540 027456 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector40_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 > struct vector31_c : vector31< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > > { typedef vector31_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31 > struct vector32_c : vector32< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >, integral_c > { typedef vector32_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32 > struct vector33_c : vector33< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 > > { typedef vector33_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33 > struct vector34_c : vector34< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > > { typedef vector34_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34 > struct vector35_c : vector35< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >, integral_c > { typedef vector35_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35 > struct vector36_c : vector36< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 > > { typedef vector36_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36 > struct vector37_c : vector37< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > > { typedef vector37_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37 > struct vector38_c : vector38< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >, integral_c > { typedef vector38_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38 > struct vector39_c : vector39< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 > > { typedef vector39_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39 > struct vector40_c : vector40< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > > { typedef vector40_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp000644 000765 000024 00000244451 12233035540 027163 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector50.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40 > struct vector41 { typedef aux::vector_tag<41> tag; typedef vector41 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef void_ item41; typedef T40 back; typedef v_iter< type,0 > begin; typedef v_iter< type,41 > end; }; template<> struct push_front_impl< aux::vector_tag<40> > { template< typename Vector, typename T > struct apply { typedef vector41< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<41> > { template< typename Vector > struct apply { typedef vector40< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 > type; }; }; template<> struct push_back_impl< aux::vector_tag<40> > { template< typename Vector, typename T > struct apply { typedef vector41< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<41> > { template< typename Vector > struct apply { typedef vector40< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 > type; }; }; template< typename V > struct v_at< V,41 > { typedef typename V::item41 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41 > struct vector42 { typedef aux::vector_tag<42> tag; typedef vector42 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef void_ item42; typedef T41 back; typedef v_iter< type,0 > begin; typedef v_iter< type,42 > end; }; template<> struct push_front_impl< aux::vector_tag<41> > { template< typename Vector, typename T > struct apply { typedef vector42< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<42> > { template< typename Vector > struct apply { typedef vector41< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41 > type; }; }; template<> struct push_back_impl< aux::vector_tag<41> > { template< typename Vector, typename T > struct apply { typedef vector42< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<42> > { template< typename Vector > struct apply { typedef vector41< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40 > type; }; }; template< typename V > struct v_at< V,42 > { typedef typename V::item42 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42 > struct vector43 { typedef aux::vector_tag<43> tag; typedef vector43 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef void_ item43; typedef T42 back; typedef v_iter< type,0 > begin; typedef v_iter< type,43 > end; }; template<> struct push_front_impl< aux::vector_tag<42> > { template< typename Vector, typename T > struct apply { typedef vector43< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<43> > { template< typename Vector > struct apply { typedef vector42< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 > type; }; }; template<> struct push_back_impl< aux::vector_tag<42> > { template< typename Vector, typename T > struct apply { typedef vector43< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<43> > { template< typename Vector > struct apply { typedef vector42< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 > type; }; }; template< typename V > struct v_at< V,43 > { typedef typename V::item43 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43 > struct vector44 { typedef aux::vector_tag<44> tag; typedef vector44 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef void_ item44; typedef T43 back; typedef v_iter< type,0 > begin; typedef v_iter< type,44 > end; }; template<> struct push_front_impl< aux::vector_tag<43> > { template< typename Vector, typename T > struct apply { typedef vector44< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<44> > { template< typename Vector > struct apply { typedef vector43< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43 > type; }; }; template<> struct push_back_impl< aux::vector_tag<43> > { template< typename Vector, typename T > struct apply { typedef vector44< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<44> > { template< typename Vector > struct apply { typedef vector43< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42 > type; }; }; template< typename V > struct v_at< V,44 > { typedef typename V::item44 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 > struct vector45 { typedef aux::vector_tag<45> tag; typedef vector45 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef T44 item44; typedef void_ item45; typedef T44 back; typedef v_iter< type,0 > begin; typedef v_iter< type,45 > end; }; template<> struct push_front_impl< aux::vector_tag<44> > { template< typename Vector, typename T > struct apply { typedef vector45< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<45> > { template< typename Vector > struct apply { typedef vector44< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43, typename Vector::item44 > type; }; }; template<> struct push_back_impl< aux::vector_tag<44> > { template< typename Vector, typename T > struct apply { typedef vector45< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<45> > { template< typename Vector > struct apply { typedef vector44< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 > type; }; }; template< typename V > struct v_at< V,45 > { typedef typename V::item45 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45 > struct vector46 { typedef aux::vector_tag<46> tag; typedef vector46 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef T44 item44; typedef T45 item45; typedef void_ item46; typedef T45 back; typedef v_iter< type,0 > begin; typedef v_iter< type,46 > end; }; template<> struct push_front_impl< aux::vector_tag<45> > { template< typename Vector, typename T > struct apply { typedef vector46< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<46> > { template< typename Vector > struct apply { typedef vector45< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43, typename Vector::item44 , typename Vector::item45 > type; }; }; template<> struct push_back_impl< aux::vector_tag<45> > { template< typename Vector, typename T > struct apply { typedef vector46< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<46> > { template< typename Vector > struct apply { typedef vector45< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44 > type; }; }; template< typename V > struct v_at< V,46 > { typedef typename V::item46 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46 > struct vector47 { typedef aux::vector_tag<47> tag; typedef vector47 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef T44 item44; typedef T45 item45; typedef T46 item46; typedef void_ item47; typedef T46 back; typedef v_iter< type,0 > begin; typedef v_iter< type,47 > end; }; template<> struct push_front_impl< aux::vector_tag<46> > { template< typename Vector, typename T > struct apply { typedef vector47< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<47> > { template< typename Vector > struct apply { typedef vector46< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43, typename Vector::item44 , typename Vector::item45, typename Vector::item46 > type; }; }; template<> struct push_back_impl< aux::vector_tag<46> > { template< typename Vector, typename T > struct apply { typedef vector47< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<47> > { template< typename Vector > struct apply { typedef vector46< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 > type; }; }; template< typename V > struct v_at< V,47 > { typedef typename V::item47 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47 > struct vector48 { typedef aux::vector_tag<48> tag; typedef vector48 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef T44 item44; typedef T45 item45; typedef T46 item46; typedef T47 item47; typedef void_ item48; typedef T47 back; typedef v_iter< type,0 > begin; typedef v_iter< type,48 > end; }; template<> struct push_front_impl< aux::vector_tag<47> > { template< typename Vector, typename T > struct apply { typedef vector48< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<48> > { template< typename Vector > struct apply { typedef vector47< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43, typename Vector::item44 , typename Vector::item45, typename Vector::item46 , typename Vector::item47 > type; }; }; template<> struct push_back_impl< aux::vector_tag<47> > { template< typename Vector, typename T > struct apply { typedef vector48< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<48> > { template< typename Vector > struct apply { typedef vector47< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46 > type; }; }; template< typename V > struct v_at< V,48 > { typedef typename V::item48 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47, typename T48 > struct vector49 { typedef aux::vector_tag<49> tag; typedef vector49 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef T44 item44; typedef T45 item45; typedef T46 item46; typedef T47 item47; typedef T48 item48; typedef void_ item49; typedef T48 back; typedef v_iter< type,0 > begin; typedef v_iter< type,49 > end; }; template<> struct push_front_impl< aux::vector_tag<48> > { template< typename Vector, typename T > struct apply { typedef vector49< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46, typename Vector::item47 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<49> > { template< typename Vector > struct apply { typedef vector48< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43, typename Vector::item44 , typename Vector::item45, typename Vector::item46 , typename Vector::item47, typename Vector::item48 > type; }; }; template<> struct push_back_impl< aux::vector_tag<48> > { template< typename Vector, typename T > struct apply { typedef vector49< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46, typename Vector::item47 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<49> > { template< typename Vector > struct apply { typedef vector48< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46, typename Vector::item47 > type; }; }; template< typename V > struct v_at< V,49 > { typedef typename V::item49 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47, typename T48, typename T49 > struct vector50 { typedef aux::vector_tag<50> tag; typedef vector50 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef T44 item44; typedef T45 item45; typedef T46 item46; typedef T47 item47; typedef T48 item48; typedef T49 item49; typedef void_ item50; typedef T49 back; typedef v_iter< type,0 > begin; typedef v_iter< type,50 > end; }; template<> struct push_front_impl< aux::vector_tag<49> > { template< typename Vector, typename T > struct apply { typedef vector50< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46, typename Vector::item47 , typename Vector::item48 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<50> > { template< typename Vector > struct apply { typedef vector49< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43, typename Vector::item44 , typename Vector::item45, typename Vector::item46 , typename Vector::item47, typename Vector::item48 , typename Vector::item49 > type; }; }; template<> struct push_back_impl< aux::vector_tag<49> > { template< typename Vector, typename T > struct apply { typedef vector50< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46, typename Vector::item47 , typename Vector::item48 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<50> > { template< typename Vector > struct apply { typedef vector49< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46, typename Vector::item47 , typename Vector::item48 > type; }; }; template< typename V > struct v_at< V,50 > { typedef typename V::item50 type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp000644 000765 000024 00000036703 12233035540 027464 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector50_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 > struct vector41_c : vector41< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >, integral_c > { typedef vector41_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41 > struct vector42_c : vector42< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 > > { typedef vector42_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42 > struct vector43_c : vector43< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > > { typedef vector43_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43 > struct vector44_c : vector44< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >, integral_c > { typedef vector44_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44 > struct vector45_c : vector45< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > , integral_c< T,C43 >, integral_c< T,C44 > > { typedef vector45_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45 > struct vector46_c : vector46< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > > { typedef vector46_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46 > struct vector47_c : vector47< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >, integral_c > { typedef vector47_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47 > struct vector48_c : vector48< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > , integral_c< T,C46 >, integral_c< T,C47 > > { typedef vector48_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48 > struct vector49_c : vector49< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 > > { typedef vector49_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49 > struct vector50_c : vector50< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 >, integral_c > { typedef vector50_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp000644 000765 000024 00000073655 12233035540 027527 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector10.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template<> struct v_at_impl<0> { template< typename V_ > struct result_ { typedef typename V_::item0 type; }; }; } template<> struct at_impl< aux::vector_tag<0> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct size_impl< aux::vector_tag<0> > { template< typename Vector > struct apply : long_<0> { }; }; template<> struct O1_size_impl< aux::vector_tag<0> > : size_impl< aux::vector_tag<0> > { }; template<> struct clear_impl< aux::vector_tag<0> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0 > struct vector1 { typedef aux::vector_tag<1> tag; typedef vector1 type; typedef T0 item0; typedef void_ item1; typedef T0 back; typedef v_iter< type,0 > begin; typedef v_iter< type,1 > end; }; template<> struct push_front_impl< aux::vector_tag<0> > { template< typename Vector, typename T > struct apply { typedef vector1< T > type; }; }; template<> struct pop_front_impl< aux::vector_tag<1> > { template< typename Vector > struct apply { typedef vector0< > type; }; }; template<> struct push_back_impl< aux::vector_tag<0> > { template< typename Vector, typename T > struct apply { typedef vector1< T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<1> > { template< typename Vector > struct apply { typedef vector0< > type; }; }; namespace aux { template<> struct v_at_impl<1> { template< typename V_ > struct result_ { typedef typename V_::item1 type; }; }; } template<> struct at_impl< aux::vector_tag<1> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<1> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<1> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<1> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<1> > { template< typename Vector > struct apply : long_<1> { }; }; template<> struct O1_size_impl< aux::vector_tag<1> > : size_impl< aux::vector_tag<1> > { }; template<> struct clear_impl< aux::vector_tag<1> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1 > struct vector2 { typedef aux::vector_tag<2> tag; typedef vector2 type; typedef T0 item0; typedef T1 item1; typedef void_ item2; typedef T1 back; typedef v_iter< type,0 > begin; typedef v_iter< type,2 > end; }; template<> struct push_front_impl< aux::vector_tag<1> > { template< typename Vector, typename T > struct apply { typedef vector2< T , typename Vector::item0 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<2> > { template< typename Vector > struct apply { typedef vector1< typename Vector::item1 > type; }; }; template<> struct push_back_impl< aux::vector_tag<1> > { template< typename Vector, typename T > struct apply { typedef vector2< typename Vector::item0 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<2> > { template< typename Vector > struct apply { typedef vector1< typename Vector::item0 > type; }; }; namespace aux { template<> struct v_at_impl<2> { template< typename V_ > struct result_ { typedef typename V_::item2 type; }; }; } template<> struct at_impl< aux::vector_tag<2> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<2> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<2> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<2> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<2> > { template< typename Vector > struct apply : long_<2> { }; }; template<> struct O1_size_impl< aux::vector_tag<2> > : size_impl< aux::vector_tag<2> > { }; template<> struct clear_impl< aux::vector_tag<2> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2 > struct vector3 { typedef aux::vector_tag<3> tag; typedef vector3 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef void_ item3; typedef T2 back; typedef v_iter< type,0 > begin; typedef v_iter< type,3 > end; }; template<> struct push_front_impl< aux::vector_tag<2> > { template< typename Vector, typename T > struct apply { typedef vector3< T , typename Vector::item0, typename Vector::item1 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<3> > { template< typename Vector > struct apply { typedef vector2< typename Vector::item1, typename Vector::item2 > type; }; }; template<> struct push_back_impl< aux::vector_tag<2> > { template< typename Vector, typename T > struct apply { typedef vector3< typename Vector::item0, typename Vector::item1 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<3> > { template< typename Vector > struct apply { typedef vector2< typename Vector::item0, typename Vector::item1 > type; }; }; namespace aux { template<> struct v_at_impl<3> { template< typename V_ > struct result_ { typedef typename V_::item3 type; }; }; } template<> struct at_impl< aux::vector_tag<3> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<3> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<3> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<3> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<3> > { template< typename Vector > struct apply : long_<3> { }; }; template<> struct O1_size_impl< aux::vector_tag<3> > : size_impl< aux::vector_tag<3> > { }; template<> struct clear_impl< aux::vector_tag<3> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector4 { typedef aux::vector_tag<4> tag; typedef vector4 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef void_ item4; typedef T3 back; typedef v_iter< type,0 > begin; typedef v_iter< type,4 > end; }; template<> struct push_front_impl< aux::vector_tag<3> > { template< typename Vector, typename T > struct apply { typedef vector4< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<4> > { template< typename Vector > struct apply { typedef vector3< typename Vector::item1, typename Vector::item2 , typename Vector::item3 > type; }; }; template<> struct push_back_impl< aux::vector_tag<3> > { template< typename Vector, typename T > struct apply { typedef vector4< typename Vector::item0, typename Vector::item1 , typename Vector::item2 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<4> > { template< typename Vector > struct apply { typedef vector3< typename Vector::item0, typename Vector::item1 , typename Vector::item2 > type; }; }; namespace aux { template<> struct v_at_impl<4> { template< typename V_ > struct result_ { typedef typename V_::item4 type; }; }; } template<> struct at_impl< aux::vector_tag<4> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<4> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<4> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<4> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<4> > { template< typename Vector > struct apply : long_<4> { }; }; template<> struct O1_size_impl< aux::vector_tag<4> > : size_impl< aux::vector_tag<4> > { }; template<> struct clear_impl< aux::vector_tag<4> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector5 { typedef aux::vector_tag<5> tag; typedef vector5 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef void_ item5; typedef T4 back; typedef v_iter< type,0 > begin; typedef v_iter< type,5 > end; }; template<> struct push_front_impl< aux::vector_tag<4> > { template< typename Vector, typename T > struct apply { typedef vector5< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<5> > { template< typename Vector > struct apply { typedef vector4< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 > type; }; }; template<> struct push_back_impl< aux::vector_tag<4> > { template< typename Vector, typename T > struct apply { typedef vector5< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<5> > { template< typename Vector > struct apply { typedef vector4< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 > type; }; }; namespace aux { template<> struct v_at_impl<5> { template< typename V_ > struct result_ { typedef typename V_::item5 type; }; }; } template<> struct at_impl< aux::vector_tag<5> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<5> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<5> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<5> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<5> > { template< typename Vector > struct apply : long_<5> { }; }; template<> struct O1_size_impl< aux::vector_tag<5> > : size_impl< aux::vector_tag<5> > { }; template<> struct clear_impl< aux::vector_tag<5> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector6 { typedef aux::vector_tag<6> tag; typedef vector6 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef void_ item6; typedef T5 back; typedef v_iter< type,0 > begin; typedef v_iter< type,6 > end; }; template<> struct push_front_impl< aux::vector_tag<5> > { template< typename Vector, typename T > struct apply { typedef vector6< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<6> > { template< typename Vector > struct apply { typedef vector5< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5 > type; }; }; template<> struct push_back_impl< aux::vector_tag<5> > { template< typename Vector, typename T > struct apply { typedef vector6< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<6> > { template< typename Vector > struct apply { typedef vector5< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4 > type; }; }; namespace aux { template<> struct v_at_impl<6> { template< typename V_ > struct result_ { typedef typename V_::item6 type; }; }; } template<> struct at_impl< aux::vector_tag<6> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<6> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<6> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<6> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<6> > { template< typename Vector > struct apply : long_<6> { }; }; template<> struct O1_size_impl< aux::vector_tag<6> > : size_impl< aux::vector_tag<6> > { }; template<> struct clear_impl< aux::vector_tag<6> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector7 { typedef aux::vector_tag<7> tag; typedef vector7 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef void_ item7; typedef T6 back; typedef v_iter< type,0 > begin; typedef v_iter< type,7 > end; }; template<> struct push_front_impl< aux::vector_tag<6> > { template< typename Vector, typename T > struct apply { typedef vector7< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<7> > { template< typename Vector > struct apply { typedef vector6< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 > type; }; }; template<> struct push_back_impl< aux::vector_tag<6> > { template< typename Vector, typename T > struct apply { typedef vector7< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<7> > { template< typename Vector > struct apply { typedef vector6< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 > type; }; }; namespace aux { template<> struct v_at_impl<7> { template< typename V_ > struct result_ { typedef typename V_::item7 type; }; }; } template<> struct at_impl< aux::vector_tag<7> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<7> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<7> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<7> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<7> > { template< typename Vector > struct apply : long_<7> { }; }; template<> struct O1_size_impl< aux::vector_tag<7> > : size_impl< aux::vector_tag<7> > { }; template<> struct clear_impl< aux::vector_tag<7> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector8 { typedef aux::vector_tag<8> tag; typedef vector8 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef void_ item8; typedef T7 back; typedef v_iter< type,0 > begin; typedef v_iter< type,8 > end; }; template<> struct push_front_impl< aux::vector_tag<7> > { template< typename Vector, typename T > struct apply { typedef vector8< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<8> > { template< typename Vector > struct apply { typedef vector7< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7 > type; }; }; template<> struct push_back_impl< aux::vector_tag<7> > { template< typename Vector, typename T > struct apply { typedef vector8< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<8> > { template< typename Vector > struct apply { typedef vector7< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6 > type; }; }; namespace aux { template<> struct v_at_impl<8> { template< typename V_ > struct result_ { typedef typename V_::item8 type; }; }; } template<> struct at_impl< aux::vector_tag<8> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<8> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<8> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<8> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<8> > { template< typename Vector > struct apply : long_<8> { }; }; template<> struct O1_size_impl< aux::vector_tag<8> > : size_impl< aux::vector_tag<8> > { }; template<> struct clear_impl< aux::vector_tag<8> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector9 { typedef aux::vector_tag<9> tag; typedef vector9 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef void_ item9; typedef T8 back; typedef v_iter< type,0 > begin; typedef v_iter< type,9 > end; }; template<> struct push_front_impl< aux::vector_tag<8> > { template< typename Vector, typename T > struct apply { typedef vector9< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<9> > { template< typename Vector > struct apply { typedef vector8< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 > type; }; }; template<> struct push_back_impl< aux::vector_tag<8> > { template< typename Vector, typename T > struct apply { typedef vector9< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<9> > { template< typename Vector > struct apply { typedef vector8< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 > type; }; }; namespace aux { template<> struct v_at_impl<9> { template< typename V_ > struct result_ { typedef typename V_::item9 type; }; }; } template<> struct at_impl< aux::vector_tag<9> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<9> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<9> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<9> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<9> > { template< typename Vector > struct apply : long_<9> { }; }; template<> struct O1_size_impl< aux::vector_tag<9> > : size_impl< aux::vector_tag<9> > { }; template<> struct clear_impl< aux::vector_tag<9> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector10 { typedef aux::vector_tag<10> tag; typedef vector10 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef void_ item10; typedef T9 back; typedef v_iter< type,0 > begin; typedef v_iter< type,10 > end; }; template<> struct push_front_impl< aux::vector_tag<9> > { template< typename Vector, typename T > struct apply { typedef vector10< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<10> > { template< typename Vector > struct apply { typedef vector9< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9 > type; }; }; template<> struct push_back_impl< aux::vector_tag<9> > { template< typename Vector, typename T > struct apply { typedef vector10< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<10> > { template< typename Vector > struct apply { typedef vector9< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8 > type; }; }; namespace aux { template<> struct v_at_impl<10> { template< typename V_ > struct result_ { typedef typename V_::item10 type; }; }; } template<> struct at_impl< aux::vector_tag<10> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<10> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<10> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<10> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<10> > { template< typename Vector > struct apply : long_<10> { }; }; template<> struct O1_size_impl< aux::vector_tag<10> > : size_impl< aux::vector_tag<10> > { }; template<> struct clear_impl< aux::vector_tag<10> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp000644 000765 000024 00000006302 12233035540 030012 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector10_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0 > struct vector1_c : vector1< integral_c< T,C0 > > { typedef vector1_c type; typedef T value_type; }; template< typename T , T C0, T C1 > struct vector2_c : vector2< integral_c< T,C0 >, integral_c< T,C1 > > { typedef vector2_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2 > struct vector3_c : vector3< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > > { typedef vector3_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3 > struct vector4_c : vector4< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 >, integral_c > { typedef vector4_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4 > struct vector5_c : vector5< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 > > { typedef vector5_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5 > struct vector6_c : vector6< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 > > { typedef vector6_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6 > struct vector7_c : vector7< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c > { typedef vector7_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7 > struct vector8_c : vector8< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 > > { typedef vector8_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8 > struct vector9_c : vector9< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 > > { typedef vector9_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9 > struct vector10_c : vector10< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > > { typedef vector10_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp000644 000765 000024 00000132245 12233035540 027517 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector20.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector11 { typedef aux::vector_tag<11> tag; typedef vector11 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef void_ item11; typedef T10 back; typedef v_iter< type,0 > begin; typedef v_iter< type,11 > end; }; template<> struct push_front_impl< aux::vector_tag<10> > { template< typename Vector, typename T > struct apply { typedef vector11< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<11> > { template< typename Vector > struct apply { typedef vector10< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 > type; }; }; template<> struct push_back_impl< aux::vector_tag<10> > { template< typename Vector, typename T > struct apply { typedef vector11< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<11> > { template< typename Vector > struct apply { typedef vector10< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 > type; }; }; namespace aux { template<> struct v_at_impl<11> { template< typename V_ > struct result_ { typedef typename V_::item11 type; }; }; } template<> struct at_impl< aux::vector_tag<11> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<11> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<11> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<11> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<11> > { template< typename Vector > struct apply : long_<11> { }; }; template<> struct O1_size_impl< aux::vector_tag<11> > : size_impl< aux::vector_tag<11> > { }; template<> struct clear_impl< aux::vector_tag<11> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector12 { typedef aux::vector_tag<12> tag; typedef vector12 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef void_ item12; typedef T11 back; typedef v_iter< type,0 > begin; typedef v_iter< type,12 > end; }; template<> struct push_front_impl< aux::vector_tag<11> > { template< typename Vector, typename T > struct apply { typedef vector12< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<12> > { template< typename Vector > struct apply { typedef vector11< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11 > type; }; }; template<> struct push_back_impl< aux::vector_tag<11> > { template< typename Vector, typename T > struct apply { typedef vector12< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<12> > { template< typename Vector > struct apply { typedef vector11< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10 > type; }; }; namespace aux { template<> struct v_at_impl<12> { template< typename V_ > struct result_ { typedef typename V_::item12 type; }; }; } template<> struct at_impl< aux::vector_tag<12> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<12> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<12> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<12> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<12> > { template< typename Vector > struct apply : long_<12> { }; }; template<> struct O1_size_impl< aux::vector_tag<12> > : size_impl< aux::vector_tag<12> > { }; template<> struct clear_impl< aux::vector_tag<12> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector13 { typedef aux::vector_tag<13> tag; typedef vector13 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef void_ item13; typedef T12 back; typedef v_iter< type,0 > begin; typedef v_iter< type,13 > end; }; template<> struct push_front_impl< aux::vector_tag<12> > { template< typename Vector, typename T > struct apply { typedef vector13< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<13> > { template< typename Vector > struct apply { typedef vector12< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 > type; }; }; template<> struct push_back_impl< aux::vector_tag<12> > { template< typename Vector, typename T > struct apply { typedef vector13< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<13> > { template< typename Vector > struct apply { typedef vector12< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 > type; }; }; namespace aux { template<> struct v_at_impl<13> { template< typename V_ > struct result_ { typedef typename V_::item13 type; }; }; } template<> struct at_impl< aux::vector_tag<13> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<13> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<13> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<13> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<13> > { template< typename Vector > struct apply : long_<13> { }; }; template<> struct O1_size_impl< aux::vector_tag<13> > : size_impl< aux::vector_tag<13> > { }; template<> struct clear_impl< aux::vector_tag<13> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector14 { typedef aux::vector_tag<14> tag; typedef vector14 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef void_ item14; typedef T13 back; typedef v_iter< type,0 > begin; typedef v_iter< type,14 > end; }; template<> struct push_front_impl< aux::vector_tag<13> > { template< typename Vector, typename T > struct apply { typedef vector14< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<14> > { template< typename Vector > struct apply { typedef vector13< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13 > type; }; }; template<> struct push_back_impl< aux::vector_tag<13> > { template< typename Vector, typename T > struct apply { typedef vector14< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<14> > { template< typename Vector > struct apply { typedef vector13< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12 > type; }; }; namespace aux { template<> struct v_at_impl<14> { template< typename V_ > struct result_ { typedef typename V_::item14 type; }; }; } template<> struct at_impl< aux::vector_tag<14> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<14> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<14> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<14> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<14> > { template< typename Vector > struct apply : long_<14> { }; }; template<> struct O1_size_impl< aux::vector_tag<14> > : size_impl< aux::vector_tag<14> > { }; template<> struct clear_impl< aux::vector_tag<14> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector15 { typedef aux::vector_tag<15> tag; typedef vector15 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef void_ item15; typedef T14 back; typedef v_iter< type,0 > begin; typedef v_iter< type,15 > end; }; template<> struct push_front_impl< aux::vector_tag<14> > { template< typename Vector, typename T > struct apply { typedef vector15< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<15> > { template< typename Vector > struct apply { typedef vector14< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 > type; }; }; template<> struct push_back_impl< aux::vector_tag<14> > { template< typename Vector, typename T > struct apply { typedef vector15< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<15> > { template< typename Vector > struct apply { typedef vector14< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 > type; }; }; namespace aux { template<> struct v_at_impl<15> { template< typename V_ > struct result_ { typedef typename V_::item15 type; }; }; } template<> struct at_impl< aux::vector_tag<15> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<15> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<15> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<15> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<15> > { template< typename Vector > struct apply : long_<15> { }; }; template<> struct O1_size_impl< aux::vector_tag<15> > : size_impl< aux::vector_tag<15> > { }; template<> struct clear_impl< aux::vector_tag<15> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector16 { typedef aux::vector_tag<16> tag; typedef vector16 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef void_ item16; typedef T15 back; typedef v_iter< type,0 > begin; typedef v_iter< type,16 > end; }; template<> struct push_front_impl< aux::vector_tag<15> > { template< typename Vector, typename T > struct apply { typedef vector16< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<16> > { template< typename Vector > struct apply { typedef vector15< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15 > type; }; }; template<> struct push_back_impl< aux::vector_tag<15> > { template< typename Vector, typename T > struct apply { typedef vector16< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<16> > { template< typename Vector > struct apply { typedef vector15< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14 > type; }; }; namespace aux { template<> struct v_at_impl<16> { template< typename V_ > struct result_ { typedef typename V_::item16 type; }; }; } template<> struct at_impl< aux::vector_tag<16> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<16> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<16> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<16> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<16> > { template< typename Vector > struct apply : long_<16> { }; }; template<> struct O1_size_impl< aux::vector_tag<16> > : size_impl< aux::vector_tag<16> > { }; template<> struct clear_impl< aux::vector_tag<16> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector17 { typedef aux::vector_tag<17> tag; typedef vector17 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef void_ item17; typedef T16 back; typedef v_iter< type,0 > begin; typedef v_iter< type,17 > end; }; template<> struct push_front_impl< aux::vector_tag<16> > { template< typename Vector, typename T > struct apply { typedef vector17< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<17> > { template< typename Vector > struct apply { typedef vector16< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 > type; }; }; template<> struct push_back_impl< aux::vector_tag<16> > { template< typename Vector, typename T > struct apply { typedef vector17< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<17> > { template< typename Vector > struct apply { typedef vector16< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 > type; }; }; namespace aux { template<> struct v_at_impl<17> { template< typename V_ > struct result_ { typedef typename V_::item17 type; }; }; } template<> struct at_impl< aux::vector_tag<17> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<17> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<17> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<17> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<17> > { template< typename Vector > struct apply : long_<17> { }; }; template<> struct O1_size_impl< aux::vector_tag<17> > : size_impl< aux::vector_tag<17> > { }; template<> struct clear_impl< aux::vector_tag<17> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector18 { typedef aux::vector_tag<18> tag; typedef vector18 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef void_ item18; typedef T17 back; typedef v_iter< type,0 > begin; typedef v_iter< type,18 > end; }; template<> struct push_front_impl< aux::vector_tag<17> > { template< typename Vector, typename T > struct apply { typedef vector18< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<18> > { template< typename Vector > struct apply { typedef vector17< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17 > type; }; }; template<> struct push_back_impl< aux::vector_tag<17> > { template< typename Vector, typename T > struct apply { typedef vector18< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<18> > { template< typename Vector > struct apply { typedef vector17< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16 > type; }; }; namespace aux { template<> struct v_at_impl<18> { template< typename V_ > struct result_ { typedef typename V_::item18 type; }; }; } template<> struct at_impl< aux::vector_tag<18> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<18> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<18> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<18> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<18> > { template< typename Vector > struct apply : long_<18> { }; }; template<> struct O1_size_impl< aux::vector_tag<18> > : size_impl< aux::vector_tag<18> > { }; template<> struct clear_impl< aux::vector_tag<18> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector19 { typedef aux::vector_tag<19> tag; typedef vector19 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef void_ item19; typedef T18 back; typedef v_iter< type,0 > begin; typedef v_iter< type,19 > end; }; template<> struct push_front_impl< aux::vector_tag<18> > { template< typename Vector, typename T > struct apply { typedef vector19< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<19> > { template< typename Vector > struct apply { typedef vector18< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 > type; }; }; template<> struct push_back_impl< aux::vector_tag<18> > { template< typename Vector, typename T > struct apply { typedef vector19< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<19> > { template< typename Vector > struct apply { typedef vector18< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 > type; }; }; namespace aux { template<> struct v_at_impl<19> { template< typename V_ > struct result_ { typedef typename V_::item19 type; }; }; } template<> struct at_impl< aux::vector_tag<19> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<19> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<19> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<19> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<19> > { template< typename Vector > struct apply : long_<19> { }; }; template<> struct O1_size_impl< aux::vector_tag<19> > : size_impl< aux::vector_tag<19> > { }; template<> struct clear_impl< aux::vector_tag<19> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector20 { typedef aux::vector_tag<20> tag; typedef vector20 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef void_ item20; typedef T19 back; typedef v_iter< type,0 > begin; typedef v_iter< type,20 > end; }; template<> struct push_front_impl< aux::vector_tag<19> > { template< typename Vector, typename T > struct apply { typedef vector20< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<20> > { template< typename Vector > struct apply { typedef vector19< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19 > type; }; }; template<> struct push_back_impl< aux::vector_tag<19> > { template< typename Vector, typename T > struct apply { typedef vector20< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<20> > { template< typename Vector > struct apply { typedef vector19< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18 > type; }; }; namespace aux { template<> struct v_at_impl<20> { template< typename V_ > struct result_ { typedef typename V_::item20 type; }; }; } template<> struct at_impl< aux::vector_tag<20> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<20> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<20> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<20> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<20> > { template< typename Vector > struct apply : long_<20> { }; }; template<> struct O1_size_impl< aux::vector_tag<20> > : size_impl< aux::vector_tag<20> > { }; template<> struct clear_impl< aux::vector_tag<20> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp000644 000765 000024 00000014331 12233035540 030014 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector20_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 > struct vector11_c : vector11< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 >, integral_c > { typedef vector11_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11 > struct vector12_c : vector12< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 > > { typedef vector12_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12 > struct vector13_c : vector13< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > > { typedef vector13_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13 > struct vector14_c : vector14< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 >, integral_c > { typedef vector14_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14 > struct vector15_c : vector15< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 > > { typedef vector15_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15 > struct vector16_c : vector16< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > > { typedef vector16_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16 > struct vector17_c : vector17< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 >, integral_c > { typedef vector17_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17 > struct vector18_c : vector18< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 > > { typedef vector18_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18 > struct vector19_c : vector19< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > > { typedef vector19_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19 > struct vector20_c : vector20< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 >, integral_c > { typedef vector20_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp000644 000765 000024 00000172431 12233035540 027521 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector30.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20 > struct vector21 { typedef aux::vector_tag<21> tag; typedef vector21 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef void_ item21; typedef T20 back; typedef v_iter< type,0 > begin; typedef v_iter< type,21 > end; }; template<> struct push_front_impl< aux::vector_tag<20> > { template< typename Vector, typename T > struct apply { typedef vector21< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<21> > { template< typename Vector > struct apply { typedef vector20< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 > type; }; }; template<> struct push_back_impl< aux::vector_tag<20> > { template< typename Vector, typename T > struct apply { typedef vector21< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<21> > { template< typename Vector > struct apply { typedef vector20< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 > type; }; }; namespace aux { template<> struct v_at_impl<21> { template< typename V_ > struct result_ { typedef typename V_::item21 type; }; }; } template<> struct at_impl< aux::vector_tag<21> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<21> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<21> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<21> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<21> > { template< typename Vector > struct apply : long_<21> { }; }; template<> struct O1_size_impl< aux::vector_tag<21> > : size_impl< aux::vector_tag<21> > { }; template<> struct clear_impl< aux::vector_tag<21> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21 > struct vector22 { typedef aux::vector_tag<22> tag; typedef vector22 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef void_ item22; typedef T21 back; typedef v_iter< type,0 > begin; typedef v_iter< type,22 > end; }; template<> struct push_front_impl< aux::vector_tag<21> > { template< typename Vector, typename T > struct apply { typedef vector22< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<22> > { template< typename Vector > struct apply { typedef vector21< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21 > type; }; }; template<> struct push_back_impl< aux::vector_tag<21> > { template< typename Vector, typename T > struct apply { typedef vector22< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<22> > { template< typename Vector > struct apply { typedef vector21< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20 > type; }; }; namespace aux { template<> struct v_at_impl<22> { template< typename V_ > struct result_ { typedef typename V_::item22 type; }; }; } template<> struct at_impl< aux::vector_tag<22> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<22> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<22> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<22> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<22> > { template< typename Vector > struct apply : long_<22> { }; }; template<> struct O1_size_impl< aux::vector_tag<22> > : size_impl< aux::vector_tag<22> > { }; template<> struct clear_impl< aux::vector_tag<22> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22 > struct vector23 { typedef aux::vector_tag<23> tag; typedef vector23 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef void_ item23; typedef T22 back; typedef v_iter< type,0 > begin; typedef v_iter< type,23 > end; }; template<> struct push_front_impl< aux::vector_tag<22> > { template< typename Vector, typename T > struct apply { typedef vector23< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<23> > { template< typename Vector > struct apply { typedef vector22< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 > type; }; }; template<> struct push_back_impl< aux::vector_tag<22> > { template< typename Vector, typename T > struct apply { typedef vector23< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<23> > { template< typename Vector > struct apply { typedef vector22< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 > type; }; }; namespace aux { template<> struct v_at_impl<23> { template< typename V_ > struct result_ { typedef typename V_::item23 type; }; }; } template<> struct at_impl< aux::vector_tag<23> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<23> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<23> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<23> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<23> > { template< typename Vector > struct apply : long_<23> { }; }; template<> struct O1_size_impl< aux::vector_tag<23> > : size_impl< aux::vector_tag<23> > { }; template<> struct clear_impl< aux::vector_tag<23> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23 > struct vector24 { typedef aux::vector_tag<24> tag; typedef vector24 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef void_ item24; typedef T23 back; typedef v_iter< type,0 > begin; typedef v_iter< type,24 > end; }; template<> struct push_front_impl< aux::vector_tag<23> > { template< typename Vector, typename T > struct apply { typedef vector24< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<24> > { template< typename Vector > struct apply { typedef vector23< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23 > type; }; }; template<> struct push_back_impl< aux::vector_tag<23> > { template< typename Vector, typename T > struct apply { typedef vector24< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<24> > { template< typename Vector > struct apply { typedef vector23< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22 > type; }; }; namespace aux { template<> struct v_at_impl<24> { template< typename V_ > struct result_ { typedef typename V_::item24 type; }; }; } template<> struct at_impl< aux::vector_tag<24> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<24> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<24> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<24> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<24> > { template< typename Vector > struct apply : long_<24> { }; }; template<> struct O1_size_impl< aux::vector_tag<24> > : size_impl< aux::vector_tag<24> > { }; template<> struct clear_impl< aux::vector_tag<24> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 > struct vector25 { typedef aux::vector_tag<25> tag; typedef vector25 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef void_ item25; typedef T24 back; typedef v_iter< type,0 > begin; typedef v_iter< type,25 > end; }; template<> struct push_front_impl< aux::vector_tag<24> > { template< typename Vector, typename T > struct apply { typedef vector25< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<25> > { template< typename Vector > struct apply { typedef vector24< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 > type; }; }; template<> struct push_back_impl< aux::vector_tag<24> > { template< typename Vector, typename T > struct apply { typedef vector25< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<25> > { template< typename Vector > struct apply { typedef vector24< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 > type; }; }; namespace aux { template<> struct v_at_impl<25> { template< typename V_ > struct result_ { typedef typename V_::item25 type; }; }; } template<> struct at_impl< aux::vector_tag<25> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<25> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<25> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<25> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<25> > { template< typename Vector > struct apply : long_<25> { }; }; template<> struct O1_size_impl< aux::vector_tag<25> > : size_impl< aux::vector_tag<25> > { }; template<> struct clear_impl< aux::vector_tag<25> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25 > struct vector26 { typedef aux::vector_tag<26> tag; typedef vector26 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef void_ item26; typedef T25 back; typedef v_iter< type,0 > begin; typedef v_iter< type,26 > end; }; template<> struct push_front_impl< aux::vector_tag<25> > { template< typename Vector, typename T > struct apply { typedef vector26< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<26> > { template< typename Vector > struct apply { typedef vector25< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25 > type; }; }; template<> struct push_back_impl< aux::vector_tag<25> > { template< typename Vector, typename T > struct apply { typedef vector26< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<26> > { template< typename Vector > struct apply { typedef vector25< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24 > type; }; }; namespace aux { template<> struct v_at_impl<26> { template< typename V_ > struct result_ { typedef typename V_::item26 type; }; }; } template<> struct at_impl< aux::vector_tag<26> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<26> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<26> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<26> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<26> > { template< typename Vector > struct apply : long_<26> { }; }; template<> struct O1_size_impl< aux::vector_tag<26> > : size_impl< aux::vector_tag<26> > { }; template<> struct clear_impl< aux::vector_tag<26> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26 > struct vector27 { typedef aux::vector_tag<27> tag; typedef vector27 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef void_ item27; typedef T26 back; typedef v_iter< type,0 > begin; typedef v_iter< type,27 > end; }; template<> struct push_front_impl< aux::vector_tag<26> > { template< typename Vector, typename T > struct apply { typedef vector27< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<27> > { template< typename Vector > struct apply { typedef vector26< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 > type; }; }; template<> struct push_back_impl< aux::vector_tag<26> > { template< typename Vector, typename T > struct apply { typedef vector27< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<27> > { template< typename Vector > struct apply { typedef vector26< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 > type; }; }; namespace aux { template<> struct v_at_impl<27> { template< typename V_ > struct result_ { typedef typename V_::item27 type; }; }; } template<> struct at_impl< aux::vector_tag<27> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<27> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<27> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<27> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<27> > { template< typename Vector > struct apply : long_<27> { }; }; template<> struct O1_size_impl< aux::vector_tag<27> > : size_impl< aux::vector_tag<27> > { }; template<> struct clear_impl< aux::vector_tag<27> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27 > struct vector28 { typedef aux::vector_tag<28> tag; typedef vector28 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef void_ item28; typedef T27 back; typedef v_iter< type,0 > begin; typedef v_iter< type,28 > end; }; template<> struct push_front_impl< aux::vector_tag<27> > { template< typename Vector, typename T > struct apply { typedef vector28< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<28> > { template< typename Vector > struct apply { typedef vector27< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27 > type; }; }; template<> struct push_back_impl< aux::vector_tag<27> > { template< typename Vector, typename T > struct apply { typedef vector28< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<28> > { template< typename Vector > struct apply { typedef vector27< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26 > type; }; }; namespace aux { template<> struct v_at_impl<28> { template< typename V_ > struct result_ { typedef typename V_::item28 type; }; }; } template<> struct at_impl< aux::vector_tag<28> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<28> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<28> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<28> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<28> > { template< typename Vector > struct apply : long_<28> { }; }; template<> struct O1_size_impl< aux::vector_tag<28> > : size_impl< aux::vector_tag<28> > { }; template<> struct clear_impl< aux::vector_tag<28> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28 > struct vector29 { typedef aux::vector_tag<29> tag; typedef vector29 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef void_ item29; typedef T28 back; typedef v_iter< type,0 > begin; typedef v_iter< type,29 > end; }; template<> struct push_front_impl< aux::vector_tag<28> > { template< typename Vector, typename T > struct apply { typedef vector29< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<29> > { template< typename Vector > struct apply { typedef vector28< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 > type; }; }; template<> struct push_back_impl< aux::vector_tag<28> > { template< typename Vector, typename T > struct apply { typedef vector29< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<29> > { template< typename Vector > struct apply { typedef vector28< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 > type; }; }; namespace aux { template<> struct v_at_impl<29> { template< typename V_ > struct result_ { typedef typename V_::item29 type; }; }; } template<> struct at_impl< aux::vector_tag<29> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<29> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<29> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<29> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<29> > { template< typename Vector > struct apply : long_<29> { }; }; template<> struct O1_size_impl< aux::vector_tag<29> > : size_impl< aux::vector_tag<29> > { }; template<> struct clear_impl< aux::vector_tag<29> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 > struct vector30 { typedef aux::vector_tag<30> tag; typedef vector30 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef void_ item30; typedef T29 back; typedef v_iter< type,0 > begin; typedef v_iter< type,30 > end; }; template<> struct push_front_impl< aux::vector_tag<29> > { template< typename Vector, typename T > struct apply { typedef vector30< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<30> > { template< typename Vector > struct apply { typedef vector29< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29 > type; }; }; template<> struct push_back_impl< aux::vector_tag<29> > { template< typename Vector, typename T > struct apply { typedef vector30< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<30> > { template< typename Vector > struct apply { typedef vector29< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28 > type; }; }; namespace aux { template<> struct v_at_impl<30> { template< typename V_ > struct result_ { typedef typename V_::item30 type; }; }; } template<> struct at_impl< aux::vector_tag<30> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<30> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<30> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<30> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<30> > { template< typename Vector > struct apply : long_<30> { }; }; template<> struct O1_size_impl< aux::vector_tag<30> > : size_impl< aux::vector_tag<30> > { }; template<> struct clear_impl< aux::vector_tag<30> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp000644 000765 000024 00000022445 12233035540 030022 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 > struct vector21_c : vector21< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 > > { typedef vector21_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21 > struct vector22_c : vector22< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > > { typedef vector22_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22 > struct vector23_c : vector23< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 >, integral_c > { typedef vector23_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23 > struct vector24_c : vector24< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 > > { typedef vector24_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24 > struct vector25_c : vector25< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > > { typedef vector25_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25 > struct vector26_c : vector26< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 >, integral_c > { typedef vector26_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26 > struct vector27_c : vector27< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 > > { typedef vector27_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27 > struct vector28_c : vector28< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > > { typedef vector28_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28 > struct vector29_c : vector29< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 >, integral_c > { typedef vector29_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29 > struct vector30_c : vector30< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 > > { typedef vector30_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp000644 000765 000024 00000232615 12233035540 027523 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector40.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30 > struct vector31 { typedef aux::vector_tag<31> tag; typedef vector31 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef void_ item31; typedef T30 back; typedef v_iter< type,0 > begin; typedef v_iter< type,31 > end; }; template<> struct push_front_impl< aux::vector_tag<30> > { template< typename Vector, typename T > struct apply { typedef vector31< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<31> > { template< typename Vector > struct apply { typedef vector30< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 > type; }; }; template<> struct push_back_impl< aux::vector_tag<30> > { template< typename Vector, typename T > struct apply { typedef vector31< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<31> > { template< typename Vector > struct apply { typedef vector30< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 > type; }; }; namespace aux { template<> struct v_at_impl<31> { template< typename V_ > struct result_ { typedef typename V_::item31 type; }; }; } template<> struct at_impl< aux::vector_tag<31> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<31> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<31> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<31> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<31> > { template< typename Vector > struct apply : long_<31> { }; }; template<> struct O1_size_impl< aux::vector_tag<31> > : size_impl< aux::vector_tag<31> > { }; template<> struct clear_impl< aux::vector_tag<31> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31 > struct vector32 { typedef aux::vector_tag<32> tag; typedef vector32 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef void_ item32; typedef T31 back; typedef v_iter< type,0 > begin; typedef v_iter< type,32 > end; }; template<> struct push_front_impl< aux::vector_tag<31> > { template< typename Vector, typename T > struct apply { typedef vector32< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<32> > { template< typename Vector > struct apply { typedef vector31< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31 > type; }; }; template<> struct push_back_impl< aux::vector_tag<31> > { template< typename Vector, typename T > struct apply { typedef vector32< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<32> > { template< typename Vector > struct apply { typedef vector31< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30 > type; }; }; namespace aux { template<> struct v_at_impl<32> { template< typename V_ > struct result_ { typedef typename V_::item32 type; }; }; } template<> struct at_impl< aux::vector_tag<32> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<32> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<32> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<32> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<32> > { template< typename Vector > struct apply : long_<32> { }; }; template<> struct O1_size_impl< aux::vector_tag<32> > : size_impl< aux::vector_tag<32> > { }; template<> struct clear_impl< aux::vector_tag<32> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32 > struct vector33 { typedef aux::vector_tag<33> tag; typedef vector33 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef void_ item33; typedef T32 back; typedef v_iter< type,0 > begin; typedef v_iter< type,33 > end; }; template<> struct push_front_impl< aux::vector_tag<32> > { template< typename Vector, typename T > struct apply { typedef vector33< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<33> > { template< typename Vector > struct apply { typedef vector32< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 > type; }; }; template<> struct push_back_impl< aux::vector_tag<32> > { template< typename Vector, typename T > struct apply { typedef vector33< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<33> > { template< typename Vector > struct apply { typedef vector32< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 > type; }; }; namespace aux { template<> struct v_at_impl<33> { template< typename V_ > struct result_ { typedef typename V_::item33 type; }; }; } template<> struct at_impl< aux::vector_tag<33> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<33> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<33> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<33> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<33> > { template< typename Vector > struct apply : long_<33> { }; }; template<> struct O1_size_impl< aux::vector_tag<33> > : size_impl< aux::vector_tag<33> > { }; template<> struct clear_impl< aux::vector_tag<33> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33 > struct vector34 { typedef aux::vector_tag<34> tag; typedef vector34 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef void_ item34; typedef T33 back; typedef v_iter< type,0 > begin; typedef v_iter< type,34 > end; }; template<> struct push_front_impl< aux::vector_tag<33> > { template< typename Vector, typename T > struct apply { typedef vector34< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<34> > { template< typename Vector > struct apply { typedef vector33< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33 > type; }; }; template<> struct push_back_impl< aux::vector_tag<33> > { template< typename Vector, typename T > struct apply { typedef vector34< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<34> > { template< typename Vector > struct apply { typedef vector33< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32 > type; }; }; namespace aux { template<> struct v_at_impl<34> { template< typename V_ > struct result_ { typedef typename V_::item34 type; }; }; } template<> struct at_impl< aux::vector_tag<34> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<34> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<34> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<34> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<34> > { template< typename Vector > struct apply : long_<34> { }; }; template<> struct O1_size_impl< aux::vector_tag<34> > : size_impl< aux::vector_tag<34> > { }; template<> struct clear_impl< aux::vector_tag<34> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 > struct vector35 { typedef aux::vector_tag<35> tag; typedef vector35 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef void_ item35; typedef T34 back; typedef v_iter< type,0 > begin; typedef v_iter< type,35 > end; }; template<> struct push_front_impl< aux::vector_tag<34> > { template< typename Vector, typename T > struct apply { typedef vector35< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<35> > { template< typename Vector > struct apply { typedef vector34< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 > type; }; }; template<> struct push_back_impl< aux::vector_tag<34> > { template< typename Vector, typename T > struct apply { typedef vector35< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<35> > { template< typename Vector > struct apply { typedef vector34< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 > type; }; }; namespace aux { template<> struct v_at_impl<35> { template< typename V_ > struct result_ { typedef typename V_::item35 type; }; }; } template<> struct at_impl< aux::vector_tag<35> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<35> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<35> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<35> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<35> > { template< typename Vector > struct apply : long_<35> { }; }; template<> struct O1_size_impl< aux::vector_tag<35> > : size_impl< aux::vector_tag<35> > { }; template<> struct clear_impl< aux::vector_tag<35> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35 > struct vector36 { typedef aux::vector_tag<36> tag; typedef vector36 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef void_ item36; typedef T35 back; typedef v_iter< type,0 > begin; typedef v_iter< type,36 > end; }; template<> struct push_front_impl< aux::vector_tag<35> > { template< typename Vector, typename T > struct apply { typedef vector36< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<36> > { template< typename Vector > struct apply { typedef vector35< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35 > type; }; }; template<> struct push_back_impl< aux::vector_tag<35> > { template< typename Vector, typename T > struct apply { typedef vector36< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<36> > { template< typename Vector > struct apply { typedef vector35< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34 > type; }; }; namespace aux { template<> struct v_at_impl<36> { template< typename V_ > struct result_ { typedef typename V_::item36 type; }; }; } template<> struct at_impl< aux::vector_tag<36> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<36> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<36> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<36> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<36> > { template< typename Vector > struct apply : long_<36> { }; }; template<> struct O1_size_impl< aux::vector_tag<36> > : size_impl< aux::vector_tag<36> > { }; template<> struct clear_impl< aux::vector_tag<36> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36 > struct vector37 { typedef aux::vector_tag<37> tag; typedef vector37 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef void_ item37; typedef T36 back; typedef v_iter< type,0 > begin; typedef v_iter< type,37 > end; }; template<> struct push_front_impl< aux::vector_tag<36> > { template< typename Vector, typename T > struct apply { typedef vector37< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<37> > { template< typename Vector > struct apply { typedef vector36< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 > type; }; }; template<> struct push_back_impl< aux::vector_tag<36> > { template< typename Vector, typename T > struct apply { typedef vector37< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<37> > { template< typename Vector > struct apply { typedef vector36< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 > type; }; }; namespace aux { template<> struct v_at_impl<37> { template< typename V_ > struct result_ { typedef typename V_::item37 type; }; }; } template<> struct at_impl< aux::vector_tag<37> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<37> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<37> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<37> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<37> > { template< typename Vector > struct apply : long_<37> { }; }; template<> struct O1_size_impl< aux::vector_tag<37> > : size_impl< aux::vector_tag<37> > { }; template<> struct clear_impl< aux::vector_tag<37> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37 > struct vector38 { typedef aux::vector_tag<38> tag; typedef vector38 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef void_ item38; typedef T37 back; typedef v_iter< type,0 > begin; typedef v_iter< type,38 > end; }; template<> struct push_front_impl< aux::vector_tag<37> > { template< typename Vector, typename T > struct apply { typedef vector38< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<38> > { template< typename Vector > struct apply { typedef vector37< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37 > type; }; }; template<> struct push_back_impl< aux::vector_tag<37> > { template< typename Vector, typename T > struct apply { typedef vector38< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<38> > { template< typename Vector > struct apply { typedef vector37< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36 > type; }; }; namespace aux { template<> struct v_at_impl<38> { template< typename V_ > struct result_ { typedef typename V_::item38 type; }; }; } template<> struct at_impl< aux::vector_tag<38> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<38> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<38> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<38> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<38> > { template< typename Vector > struct apply : long_<38> { }; }; template<> struct O1_size_impl< aux::vector_tag<38> > : size_impl< aux::vector_tag<38> > { }; template<> struct clear_impl< aux::vector_tag<38> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38 > struct vector39 { typedef aux::vector_tag<39> tag; typedef vector39 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef void_ item39; typedef T38 back; typedef v_iter< type,0 > begin; typedef v_iter< type,39 > end; }; template<> struct push_front_impl< aux::vector_tag<38> > { template< typename Vector, typename T > struct apply { typedef vector39< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<39> > { template< typename Vector > struct apply { typedef vector38< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 > type; }; }; template<> struct push_back_impl< aux::vector_tag<38> > { template< typename Vector, typename T > struct apply { typedef vector39< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<39> > { template< typename Vector > struct apply { typedef vector38< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 > type; }; }; namespace aux { template<> struct v_at_impl<39> { template< typename V_ > struct result_ { typedef typename V_::item39 type; }; }; } template<> struct at_impl< aux::vector_tag<39> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<39> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<39> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<39> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<39> > { template< typename Vector > struct apply : long_<39> { }; }; template<> struct O1_size_impl< aux::vector_tag<39> > : size_impl< aux::vector_tag<39> > { }; template<> struct clear_impl< aux::vector_tag<39> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 > struct vector40 { typedef aux::vector_tag<40> tag; typedef vector40 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef void_ item40; typedef T39 back; typedef v_iter< type,0 > begin; typedef v_iter< type,40 > end; }; template<> struct push_front_impl< aux::vector_tag<39> > { template< typename Vector, typename T > struct apply { typedef vector40< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<40> > { template< typename Vector > struct apply { typedef vector39< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39 > type; }; }; template<> struct push_back_impl< aux::vector_tag<39> > { template< typename Vector, typename T > struct apply { typedef vector40< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<40> > { template< typename Vector > struct apply { typedef vector39< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38 > type; }; }; namespace aux { template<> struct v_at_impl<40> { template< typename V_ > struct result_ { typedef typename V_::item40 type; }; }; } template<> struct at_impl< aux::vector_tag<40> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<40> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<40> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<40> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<40> > { template< typename Vector > struct apply : long_<40> { }; }; template<> struct O1_size_impl< aux::vector_tag<40> > : size_impl< aux::vector_tag<40> > { }; template<> struct clear_impl< aux::vector_tag<40> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp000644 000765 000024 00000030560 12233035540 030020 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector40_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 > struct vector31_c : vector31< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > > { typedef vector31_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31 > struct vector32_c : vector32< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 >, integral_c > { typedef vector32_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32 > struct vector33_c : vector33< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 > > { typedef vector33_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33 > struct vector34_c : vector34< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > > { typedef vector34_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34 > struct vector35_c : vector35< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 >, integral_c > { typedef vector35_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35 > struct vector36_c : vector36< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 > > { typedef vector36_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36 > struct vector37_c : vector37< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > > { typedef vector37_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37 > struct vector38_c : vector38< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 >, integral_c > { typedef vector38_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38 > struct vector39_c : vector39< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 > > { typedef vector39_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39 > struct vector40_c : vector40< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > > { typedef vector40_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp000644 000765 000024 00000273001 12233035540 027516 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector50.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40 > struct vector41 { typedef aux::vector_tag<41> tag; typedef vector41 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef void_ item41; typedef T40 back; typedef v_iter< type,0 > begin; typedef v_iter< type,41 > end; }; template<> struct push_front_impl< aux::vector_tag<40> > { template< typename Vector, typename T > struct apply { typedef vector41< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<41> > { template< typename Vector > struct apply { typedef vector40< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 > type; }; }; template<> struct push_back_impl< aux::vector_tag<40> > { template< typename Vector, typename T > struct apply { typedef vector41< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<41> > { template< typename Vector > struct apply { typedef vector40< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 > type; }; }; namespace aux { template<> struct v_at_impl<41> { template< typename V_ > struct result_ { typedef typename V_::item41 type; }; }; } template<> struct at_impl< aux::vector_tag<41> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<41> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<41> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<41> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<41> > { template< typename Vector > struct apply : long_<41> { }; }; template<> struct O1_size_impl< aux::vector_tag<41> > : size_impl< aux::vector_tag<41> > { }; template<> struct clear_impl< aux::vector_tag<41> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41 > struct vector42 { typedef aux::vector_tag<42> tag; typedef vector42 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef void_ item42; typedef T41 back; typedef v_iter< type,0 > begin; typedef v_iter< type,42 > end; }; template<> struct push_front_impl< aux::vector_tag<41> > { template< typename Vector, typename T > struct apply { typedef vector42< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<42> > { template< typename Vector > struct apply { typedef vector41< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41 > type; }; }; template<> struct push_back_impl< aux::vector_tag<41> > { template< typename Vector, typename T > struct apply { typedef vector42< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<42> > { template< typename Vector > struct apply { typedef vector41< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40 > type; }; }; namespace aux { template<> struct v_at_impl<42> { template< typename V_ > struct result_ { typedef typename V_::item42 type; }; }; } template<> struct at_impl< aux::vector_tag<42> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<42> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<42> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<42> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<42> > { template< typename Vector > struct apply : long_<42> { }; }; template<> struct O1_size_impl< aux::vector_tag<42> > : size_impl< aux::vector_tag<42> > { }; template<> struct clear_impl< aux::vector_tag<42> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42 > struct vector43 { typedef aux::vector_tag<43> tag; typedef vector43 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef void_ item43; typedef T42 back; typedef v_iter< type,0 > begin; typedef v_iter< type,43 > end; }; template<> struct push_front_impl< aux::vector_tag<42> > { template< typename Vector, typename T > struct apply { typedef vector43< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<43> > { template< typename Vector > struct apply { typedef vector42< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 > type; }; }; template<> struct push_back_impl< aux::vector_tag<42> > { template< typename Vector, typename T > struct apply { typedef vector43< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<43> > { template< typename Vector > struct apply { typedef vector42< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 > type; }; }; namespace aux { template<> struct v_at_impl<43> { template< typename V_ > struct result_ { typedef typename V_::item43 type; }; }; } template<> struct at_impl< aux::vector_tag<43> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<43> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<43> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<43> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<43> > { template< typename Vector > struct apply : long_<43> { }; }; template<> struct O1_size_impl< aux::vector_tag<43> > : size_impl< aux::vector_tag<43> > { }; template<> struct clear_impl< aux::vector_tag<43> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43 > struct vector44 { typedef aux::vector_tag<44> tag; typedef vector44 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef void_ item44; typedef T43 back; typedef v_iter< type,0 > begin; typedef v_iter< type,44 > end; }; template<> struct push_front_impl< aux::vector_tag<43> > { template< typename Vector, typename T > struct apply { typedef vector44< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<44> > { template< typename Vector > struct apply { typedef vector43< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43 > type; }; }; template<> struct push_back_impl< aux::vector_tag<43> > { template< typename Vector, typename T > struct apply { typedef vector44< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<44> > { template< typename Vector > struct apply { typedef vector43< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42 > type; }; }; namespace aux { template<> struct v_at_impl<44> { template< typename V_ > struct result_ { typedef typename V_::item44 type; }; }; } template<> struct at_impl< aux::vector_tag<44> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<44> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<44> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<44> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<44> > { template< typename Vector > struct apply : long_<44> { }; }; template<> struct O1_size_impl< aux::vector_tag<44> > : size_impl< aux::vector_tag<44> > { }; template<> struct clear_impl< aux::vector_tag<44> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 > struct vector45 { typedef aux::vector_tag<45> tag; typedef vector45 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef T44 item44; typedef void_ item45; typedef T44 back; typedef v_iter< type,0 > begin; typedef v_iter< type,45 > end; }; template<> struct push_front_impl< aux::vector_tag<44> > { template< typename Vector, typename T > struct apply { typedef vector45< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<45> > { template< typename Vector > struct apply { typedef vector44< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43, typename Vector::item44 > type; }; }; template<> struct push_back_impl< aux::vector_tag<44> > { template< typename Vector, typename T > struct apply { typedef vector45< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<45> > { template< typename Vector > struct apply { typedef vector44< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 > type; }; }; namespace aux { template<> struct v_at_impl<45> { template< typename V_ > struct result_ { typedef typename V_::item45 type; }; }; } template<> struct at_impl< aux::vector_tag<45> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<45> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<45> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<45> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<45> > { template< typename Vector > struct apply : long_<45> { }; }; template<> struct O1_size_impl< aux::vector_tag<45> > : size_impl< aux::vector_tag<45> > { }; template<> struct clear_impl< aux::vector_tag<45> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45 > struct vector46 { typedef aux::vector_tag<46> tag; typedef vector46 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef T44 item44; typedef T45 item45; typedef void_ item46; typedef T45 back; typedef v_iter< type,0 > begin; typedef v_iter< type,46 > end; }; template<> struct push_front_impl< aux::vector_tag<45> > { template< typename Vector, typename T > struct apply { typedef vector46< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<46> > { template< typename Vector > struct apply { typedef vector45< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43, typename Vector::item44 , typename Vector::item45 > type; }; }; template<> struct push_back_impl< aux::vector_tag<45> > { template< typename Vector, typename T > struct apply { typedef vector46< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<46> > { template< typename Vector > struct apply { typedef vector45< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44 > type; }; }; namespace aux { template<> struct v_at_impl<46> { template< typename V_ > struct result_ { typedef typename V_::item46 type; }; }; } template<> struct at_impl< aux::vector_tag<46> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<46> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<46> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<46> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<46> > { template< typename Vector > struct apply : long_<46> { }; }; template<> struct O1_size_impl< aux::vector_tag<46> > : size_impl< aux::vector_tag<46> > { }; template<> struct clear_impl< aux::vector_tag<46> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46 > struct vector47 { typedef aux::vector_tag<47> tag; typedef vector47 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef T44 item44; typedef T45 item45; typedef T46 item46; typedef void_ item47; typedef T46 back; typedef v_iter< type,0 > begin; typedef v_iter< type,47 > end; }; template<> struct push_front_impl< aux::vector_tag<46> > { template< typename Vector, typename T > struct apply { typedef vector47< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<47> > { template< typename Vector > struct apply { typedef vector46< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43, typename Vector::item44 , typename Vector::item45, typename Vector::item46 > type; }; }; template<> struct push_back_impl< aux::vector_tag<46> > { template< typename Vector, typename T > struct apply { typedef vector47< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<47> > { template< typename Vector > struct apply { typedef vector46< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 > type; }; }; namespace aux { template<> struct v_at_impl<47> { template< typename V_ > struct result_ { typedef typename V_::item47 type; }; }; } template<> struct at_impl< aux::vector_tag<47> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<47> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<47> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<47> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<47> > { template< typename Vector > struct apply : long_<47> { }; }; template<> struct O1_size_impl< aux::vector_tag<47> > : size_impl< aux::vector_tag<47> > { }; template<> struct clear_impl< aux::vector_tag<47> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47 > struct vector48 { typedef aux::vector_tag<48> tag; typedef vector48 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef T44 item44; typedef T45 item45; typedef T46 item46; typedef T47 item47; typedef void_ item48; typedef T47 back; typedef v_iter< type,0 > begin; typedef v_iter< type,48 > end; }; template<> struct push_front_impl< aux::vector_tag<47> > { template< typename Vector, typename T > struct apply { typedef vector48< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<48> > { template< typename Vector > struct apply { typedef vector47< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43, typename Vector::item44 , typename Vector::item45, typename Vector::item46 , typename Vector::item47 > type; }; }; template<> struct push_back_impl< aux::vector_tag<47> > { template< typename Vector, typename T > struct apply { typedef vector48< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<48> > { template< typename Vector > struct apply { typedef vector47< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46 > type; }; }; namespace aux { template<> struct v_at_impl<48> { template< typename V_ > struct result_ { typedef typename V_::item48 type; }; }; } template<> struct at_impl< aux::vector_tag<48> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<48> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<48> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<48> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<48> > { template< typename Vector > struct apply : long_<48> { }; }; template<> struct O1_size_impl< aux::vector_tag<48> > : size_impl< aux::vector_tag<48> > { }; template<> struct clear_impl< aux::vector_tag<48> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47, typename T48 > struct vector49 { typedef aux::vector_tag<49> tag; typedef vector49 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef T44 item44; typedef T45 item45; typedef T46 item46; typedef T47 item47; typedef T48 item48; typedef void_ item49; typedef T48 back; typedef v_iter< type,0 > begin; typedef v_iter< type,49 > end; }; template<> struct push_front_impl< aux::vector_tag<48> > { template< typename Vector, typename T > struct apply { typedef vector49< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46, typename Vector::item47 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<49> > { template< typename Vector > struct apply { typedef vector48< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43, typename Vector::item44 , typename Vector::item45, typename Vector::item46 , typename Vector::item47, typename Vector::item48 > type; }; }; template<> struct push_back_impl< aux::vector_tag<48> > { template< typename Vector, typename T > struct apply { typedef vector49< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46, typename Vector::item47 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<49> > { template< typename Vector > struct apply { typedef vector48< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46, typename Vector::item47 > type; }; }; namespace aux { template<> struct v_at_impl<49> { template< typename V_ > struct result_ { typedef typename V_::item49 type; }; }; } template<> struct at_impl< aux::vector_tag<49> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<49> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<49> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<49> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<49> > { template< typename Vector > struct apply : long_<49> { }; }; template<> struct O1_size_impl< aux::vector_tag<49> > : size_impl< aux::vector_tag<49> > { }; template<> struct clear_impl< aux::vector_tag<49> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47, typename T48, typename T49 > struct vector50 { typedef aux::vector_tag<50> tag; typedef vector50 type; typedef T0 item0; typedef T1 item1; typedef T2 item2; typedef T3 item3; typedef T4 item4; typedef T5 item5; typedef T6 item6; typedef T7 item7; typedef T8 item8; typedef T9 item9; typedef T10 item10; typedef T11 item11; typedef T12 item12; typedef T13 item13; typedef T14 item14; typedef T15 item15; typedef T16 item16; typedef T17 item17; typedef T18 item18; typedef T19 item19; typedef T20 item20; typedef T21 item21; typedef T22 item22; typedef T23 item23; typedef T24 item24; typedef T25 item25; typedef T26 item26; typedef T27 item27; typedef T28 item28; typedef T29 item29; typedef T30 item30; typedef T31 item31; typedef T32 item32; typedef T33 item33; typedef T34 item34; typedef T35 item35; typedef T36 item36; typedef T37 item37; typedef T38 item38; typedef T39 item39; typedef T40 item40; typedef T41 item41; typedef T42 item42; typedef T43 item43; typedef T44 item44; typedef T45 item45; typedef T46 item46; typedef T47 item47; typedef T48 item48; typedef T49 item49; typedef void_ item50; typedef T49 back; typedef v_iter< type,0 > begin; typedef v_iter< type,50 > end; }; template<> struct push_front_impl< aux::vector_tag<49> > { template< typename Vector, typename T > struct apply { typedef vector50< T , typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46, typename Vector::item47 , typename Vector::item48 > type; }; }; template<> struct pop_front_impl< aux::vector_tag<50> > { template< typename Vector > struct apply { typedef vector49< typename Vector::item1, typename Vector::item2 , typename Vector::item3, typename Vector::item4 , typename Vector::item5, typename Vector::item6 , typename Vector::item7, typename Vector::item8 , typename Vector::item9, typename Vector::item10 , typename Vector::item11, typename Vector::item12 , typename Vector::item13, typename Vector::item14 , typename Vector::item15, typename Vector::item16 , typename Vector::item17, typename Vector::item18 , typename Vector::item19, typename Vector::item20 , typename Vector::item21, typename Vector::item22 , typename Vector::item23, typename Vector::item24 , typename Vector::item25, typename Vector::item26 , typename Vector::item27, typename Vector::item28 , typename Vector::item29, typename Vector::item30 , typename Vector::item31, typename Vector::item32 , typename Vector::item33, typename Vector::item34 , typename Vector::item35, typename Vector::item36 , typename Vector::item37, typename Vector::item38 , typename Vector::item39, typename Vector::item40 , typename Vector::item41, typename Vector::item42 , typename Vector::item43, typename Vector::item44 , typename Vector::item45, typename Vector::item46 , typename Vector::item47, typename Vector::item48 , typename Vector::item49 > type; }; }; template<> struct push_back_impl< aux::vector_tag<49> > { template< typename Vector, typename T > struct apply { typedef vector50< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46, typename Vector::item47 , typename Vector::item48 , T > type; }; }; template<> struct pop_back_impl< aux::vector_tag<50> > { template< typename Vector > struct apply { typedef vector49< typename Vector::item0, typename Vector::item1 , typename Vector::item2, typename Vector::item3 , typename Vector::item4, typename Vector::item5 , typename Vector::item6, typename Vector::item7 , typename Vector::item8, typename Vector::item9 , typename Vector::item10, typename Vector::item11 , typename Vector::item12, typename Vector::item13 , typename Vector::item14, typename Vector::item15 , typename Vector::item16, typename Vector::item17 , typename Vector::item18, typename Vector::item19 , typename Vector::item20, typename Vector::item21 , typename Vector::item22, typename Vector::item23 , typename Vector::item24, typename Vector::item25 , typename Vector::item26, typename Vector::item27 , typename Vector::item28, typename Vector::item29 , typename Vector::item30, typename Vector::item31 , typename Vector::item32, typename Vector::item33 , typename Vector::item34, typename Vector::item35 , typename Vector::item36, typename Vector::item37 , typename Vector::item38, typename Vector::item39 , typename Vector::item40, typename Vector::item41 , typename Vector::item42, typename Vector::item43 , typename Vector::item44, typename Vector::item45 , typename Vector::item46, typename Vector::item47 , typename Vector::item48 > type; }; }; namespace aux { template<> struct v_at_impl<50> { template< typename V_ > struct result_ { typedef typename V_::item50 type; }; }; } template<> struct at_impl< aux::vector_tag<50> > { template< typename V_, typename N > struct apply { typedef typename aux::v_at_impl ::template result_::type type; }; }; template<> struct front_impl< aux::vector_tag<50> > { template< typename Vector > struct apply { typedef typename Vector::item0 type; }; }; template<> struct back_impl< aux::vector_tag<50> > { template< typename Vector > struct apply { typedef typename Vector::back type; }; }; template<> struct empty_impl< aux::vector_tag<50> > { template< typename Vector > struct apply : false_ { }; }; template<> struct size_impl< aux::vector_tag<50> > { template< typename Vector > struct apply : long_<50> { }; }; template<> struct O1_size_impl< aux::vector_tag<50> > : size_impl< aux::vector_tag<50> > { }; template<> struct clear_impl< aux::vector_tag<50> > { template< typename Vector > struct apply { typedef vector0<> type; }; }; }} passenger-4.0.37/ext/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp000644 000765 000024 00000036703 12233035540 030026 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector/vector50_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 > struct vector41_c : vector41< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 >, integral_c > { typedef vector41_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41 > struct vector42_c : vector42< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 > > { typedef vector42_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42 > struct vector43_c : vector43< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > > { typedef vector43_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43 > struct vector44_c : vector44< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 >, integral_c > { typedef vector44_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44 > struct vector45_c : vector45< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > , integral_c< T,C43 >, integral_c< T,C44 > > { typedef vector45_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45 > struct vector46_c : vector46< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > > { typedef vector46_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46 > struct vector47_c : vector47< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 >, integral_c > { typedef vector47_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47 > struct vector48_c : vector48< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > , integral_c< T,C46 >, integral_c< T,C47 > > { typedef vector48_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48 > struct vector49_c : vector49< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 > > { typedef vector49_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49 > struct vector50_c : vector50< integral_c< T,C0 >, integral_c< T,C1 >, integral_c< T,C2 > , integral_c< T,C3 >, integral_c< T,C4 >, integral_c< T,C5 >, integral_c< T,C6 > , integral_c< T,C7 >, integral_c< T,C8 >, integral_c< T,C9 > , integral_c< T,C10 >, integral_c< T,C11 >, integral_c< T,C12 > , integral_c< T,C13 >, integral_c< T,C14 >, integral_c< T,C15 > , integral_c< T,C16 >, integral_c< T,C17 >, integral_c< T,C18 > , integral_c< T,C19 >, integral_c< T,C20 >, integral_c< T,C21 > , integral_c< T,C22 >, integral_c< T,C23 >, integral_c< T,C24 > , integral_c< T,C25 >, integral_c< T,C26 >, integral_c< T,C27 > , integral_c< T,C28 >, integral_c< T,C29 >, integral_c< T,C30 > , integral_c< T,C31 >, integral_c< T,C32 >, integral_c< T,C33 > , integral_c< T,C34 >, integral_c< T,C35 >, integral_c< T,C36 > , integral_c< T,C37 >, integral_c< T,C38 >, integral_c< T,C39 > , integral_c< T,C40 >, integral_c< T,C41 >, integral_c< T,C42 > , integral_c< T,C43 >, integral_c< T,C44 >, integral_c< T,C45 > , integral_c< T,C46 >, integral_c< T,C47 >, integral_c< T,C48 >, integral_c > { typedef vector50_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/set/aux_/000755 000765 000024 00000000000 12233035540 020461 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/set/set0.hpp000644 000765 000024 00000002371 12233035540 021114 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_SET0_HPP_INCLUDED #define BOOST_MPL_SET_SET0_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include //#include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif // BOOST_MPL_SET_SET0_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/set0_c.hpp000644 000765 000024 00000001420 12233035540 021410 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_SET0_C_HPP_INCLUDED #define BOOST_MPL_SET_SET0_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set0_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template< typename T > struct set0_c : set0<> { typedef set0_c type; typedef T value_type; }; }} #endif // BOOST_MPL_SET_SET0_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/set10.hpp000644 000765 000024 00000002236 12233035540 021175 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_SET10_HPP_INCLUDED #define BOOST_MPL_SET_SET10_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER set10.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, 10, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_SET_SET10_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/set10_c.hpp000644 000765 000024 00000002322 12233035540 021473 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_SET10_C_HPP_INCLUDED #define BOOST_MPL_SET_SET10_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set10_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER set10_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, 10, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_SET_SET10_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/set20.hpp000644 000765 000024 00000002240 12233035540 021171 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_SET20_HPP_INCLUDED #define BOOST_MPL_SET_SET20_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER set20.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(11, 20, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_SET_SET20_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/set20_c.hpp000644 000765 000024 00000002324 12233035540 021476 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_SET20_C_HPP_INCLUDED #define BOOST_MPL_SET_SET20_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set20_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER set20_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(11, 20, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_SET_SET20_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/set30.hpp000644 000765 000024 00000002240 12233035540 021172 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_SET30_HPP_INCLUDED #define BOOST_MPL_SET_SET30_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER set30.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(21, 30, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_SET_SET30_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/set30_c.hpp000644 000765 000024 00000002324 12233035540 021477 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_SET30_C_HPP_INCLUDED #define BOOST_MPL_SET_SET30_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set30_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER set30_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(21, 30, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_SET_SET30_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/set40.hpp000644 000765 000024 00000002240 12233035540 021173 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_SET40_HPP_INCLUDED #define BOOST_MPL_SET_SET40_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER set40.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(31, 40, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_SET_SET40_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/set40_c.hpp000644 000765 000024 00000002324 12233035540 021500 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_SET40_C_HPP_INCLUDED #define BOOST_MPL_SET_SET40_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set40_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER set40_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(31, 40, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_SET_SET40_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/set50.hpp000644 000765 000024 00000002240 12233035540 021174 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_SET50_HPP_INCLUDED #define BOOST_MPL_SET_SET50_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER set50.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(41, 50, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_SET_SET50_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/set50_c.hpp000644 000765 000024 00000002324 12233035540 021501 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_SET50_C_HPP_INCLUDED #define BOOST_MPL_SET_SET50_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set50_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER set50_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(41, 50, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_SET_SET50_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/at_impl.hpp000644 000765 000024 00000002013 12233035540 022613 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: at_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template<> struct at_impl< aux::set_tag > { template< typename Set, typename T > struct apply { typedef typename if_< has_key_impl::apply , T , void_ >::type type; }; }; }} #endif // BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/begin_end_impl.hpp000644 000765 000024 00000002010 12233035540 024116 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2007 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: begin_end_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template<> struct begin_impl< aux::set_tag > { template< typename Set > struct apply : s_iter_get { }; }; template<> struct end_impl< aux::set_tag > { template< typename Set > struct apply { typedef s_iter< Set,set0<> > type; }; }; }} #endif // BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/clear_impl.hpp000644 000765 000024 00000001562 12233035540 023305 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: clear_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct clear_impl< aux::set_tag > { template< typename Set > struct apply { typedef set0<> type; }; }; }} #endif // BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/empty_impl.hpp000644 000765 000024 00000001512 12233035540 023350 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: empty_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct empty_impl< aux::set_tag > { template< typename Set > struct apply : not_< typename Set::size > { }; }; }} #endif // BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/erase_impl.hpp000644 000765 000024 00000001774 12233035540 023323 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: erase_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct erase_impl< aux::set_tag > { template< typename Set , typename Pos , typename unused_ > struct apply : erase_key_impl ::apply { }; }; }} #endif // BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/erase_key_impl.hpp000644 000765 000024 00000002604 12233035540 024164 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2007 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: erase_key_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { template<> struct erase_key_impl< aux::set_tag > { template< typename Set , typename T > struct apply : eval_if< has_key_impl::apply , eval_if< is_same< T,typename Set::item_type_ > , base , identity< s_mask > > , identity > { }; }; }} #endif // BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/has_key_impl.hpp000644 000765 000024 00000003430 12233035540 023636 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_key_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { template<> struct has_key_impl< aux::set_tag > { template< typename Set, typename T > struct apply #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 245) { BOOST_STATIC_CONSTANT(bool, value = ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED( Set , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*, 0) ) ) == sizeof(aux::no_tag) ) ); typedef bool_ type; #else // ISO98 C++ : bool_< ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED( Set , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*, 0) ) ) == sizeof(aux::no_tag) ) > { #endif }; }; }} #endif // BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/include_preprocessed.hpp000644 000765 000024 00000002434 12233035540 025376 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2001-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_HEADER \ plain/BOOST_MPL_PREPROCESSED_HEADER \ /**/ #else # define AUX778076_HEADER \ BOOST_PP_CAT(plain,/)##BOOST_MPL_PREPROCESSED_HEADER \ /**/ #endif #if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) # define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/set/aux_/preprocessed/AUX778076_HEADER) # include AUX778076_INCLUDE_STRING # undef AUX778076_INCLUDE_STRING #else # include BOOST_PP_STRINGIZE(boost/mpl/set/aux_/preprocessed/AUX778076_HEADER) #endif # undef AUX778076_HEADER #undef BOOST_MPL_PREPROCESSED_HEADER passenger-4.0.37/ext/boost/mpl/set/aux_/insert_impl.hpp000644 000765 000024 00000003135 12233035540 023521 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2007 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: insert_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Set, typename T > struct set_insert_impl : eval_if< has_key_impl::apply , identity , eval_if< is_same< T,typename Set::last_masked_ > , base , identity< s_item > > > { }; } template<> struct insert_impl< aux::set_tag > { template< typename Set , typename PosOrKey , typename KeyOrNA > struct apply : aux::set_insert_impl< Set , typename if_na::type > { }; }; }} #endif // BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/item.hpp000644 000765 000024 00000004425 12233035540 022135 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED #define BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2007 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename T, typename Base > struct s_item : Base { typedef s_item item_; typedef void_ last_masked_; typedef T item_type_; typedef Base base; typedef typename next< typename Base::size >::type size; typedef typename next< typename Base::order >::type order; #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) typedef typename aux::weighted_tag::type order_tag_; #else typedef char (&order_tag_)[BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value]; #endif BOOST_MPL_AUX_SET_OVERLOAD( order_tag_, ORDER_BY_KEY, s_item, aux::type_wrapper* ); BOOST_MPL_AUX_SET_OVERLOAD( aux::no_tag, IS_MASKED, s_item, aux::type_wrapper* ); }; template< typename T, typename Base > struct s_mask : Base { typedef s_mask item_; typedef T last_masked_; typedef void_ item_type_; typedef Base base; typedef typename prior< typename Base::size >::type size; BOOST_MPL_AUX_SET_OVERLOAD( aux::yes_tag, IS_MASKED, s_mask, aux::type_wrapper* ); }; template< typename T, typename Base > struct s_unmask : Base { typedef s_unmask item_; typedef void_ last_masked_; typedef T item_type_; typedef Base base; typedef typename next< typename Base::size >::type size; BOOST_MPL_AUX_SET_OVERLOAD( aux::no_tag, IS_MASKED, s_unmask, aux::type_wrapper* ); }; }} #endif // BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/iterator.hpp000644 000765 000024 00000004526 12233035540 023032 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED #define BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2007 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { // used by 's_iter_get' template< typename Set, typename Tail > struct s_iter; template< typename Set, typename Tail > struct s_iter_get : eval_if< has_key< Set,typename Tail::item_type_ > , identity< s_iter > , next< s_iter > > { }; template< typename Set, typename Tail > struct s_iter_impl { typedef Tail tail_; typedef forward_iterator_tag category; typedef typename Tail::item_type_ type; #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) typedef typename s_iter_get< Set,typename Tail::base >::type next; #endif }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Set, typename Tail > struct next< s_iter > : s_iter_get< Set,typename Tail::base > { }; template< typename Set > struct next< s_iter > > { typedef s_iter > type; }; template< typename Set, typename Tail > struct s_iter : s_iter_impl { }; template< typename Set > struct s_iter > { typedef forward_iterator_tag category; }; #else template< typename Set > struct s_end_iter { typedef forward_iterator_tag category; typedef s_iter > next; }; template< typename Set, typename Tail > struct s_iter : if_< is_same< Tail,set0<> > , s_end_iter , s_iter_impl >::type { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION }} #endif // BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/key_type_impl.hpp000644 000765 000024 00000001544 12233035540 024050 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: key_type_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template<> struct key_type_impl< aux::set_tag > { template< typename Set, typename T > struct apply { typedef T type; }; }; }} #endif // BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/numbered.hpp000644 000765 000024 00000002245 12233035540 022776 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION #if defined(BOOST_PP_IS_ITERATING) // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #define i_ BOOST_PP_FRAME_ITERATION(1) # define AUX778076_SET_TAIL(set, i_, T) \ typename BOOST_PP_CAT(set,i_)< \ BOOST_PP_ENUM_PARAMS(i_, T) \ >::item_ \ /**/ #if i_ > 0 template< BOOST_PP_ENUM_PARAMS(i_, typename T) > struct BOOST_PP_CAT(set,i_) : s_item< BOOST_PP_CAT(T,BOOST_PP_DEC(i_)) , AUX778076_SET_TAIL(set,BOOST_PP_DEC(i_),T) > { typedef BOOST_PP_CAT(set,i_) type; }; #endif # undef AUX778076_SET_TAIL #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/set/aux_/numbered_c.hpp000644 000765 000024 00000002433 12233035540 023277 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION #if defined(BOOST_PP_IS_ITERATING) // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #define i_ BOOST_PP_FRAME_ITERATION(1) # define AUX778076_SET_C_TAIL(set, i_, T, C) \ BOOST_PP_CAT(BOOST_PP_CAT(set,i_),_c)< \ T BOOST_PP_ENUM_TRAILING_PARAMS(i_, C) \ > \ /**/ template< typename T , BOOST_PP_ENUM_PARAMS(i_, T C) > struct BOOST_PP_CAT(BOOST_PP_CAT(set,i_),_c) : s_item< integral_c , AUX778076_SET_C_TAIL(set,BOOST_PP_DEC(i_), T, C) > { typedef BOOST_PP_CAT(BOOST_PP_CAT(set,i_),_c) type; }; # undef AUX778076_SET_C_TAIL #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/set/aux_/preprocessed/000755 000765 000024 00000000000 12233035540 023157 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/set/aux_/set0.hpp000644 000765 000024 00000003702 12233035540 022047 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED #define BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) # define BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T) \ friend R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \ /**/ # define BOOST_MPL_AUX_SET_OVERLOAD(R, f, X, T) \ BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T) \ /**/ #else # define BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T) \ static R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \ /**/ # define BOOST_MPL_AUX_SET_OVERLOAD(R, f, X, T) \ BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T); \ using Base::BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f) \ /**/ #endif template< typename Dummy = na > struct set0 { typedef set0<> item_; typedef item_ type; typedef aux::set_tag tag; typedef void_ last_masked_; typedef void_ item_type_; typedef long_<0> size; typedef long_<1> order; BOOST_MPL_AUX_SET0_OVERLOAD( aux::no_tag, ORDER_BY_KEY, set0<>, void const volatile* ); BOOST_MPL_AUX_SET0_OVERLOAD( aux::yes_tag, IS_MASKED, set0<>, void const volatile* ); }; }} #endif // BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/size_impl.hpp000644 000765 000024 00000001426 12233035540 023170 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: size_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template<> struct size_impl< aux::set_tag > { template< typename Set > struct apply : Set::size { }; }; }} #endif // BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/tag.hpp000644 000765 000024 00000001200 12233035540 021736 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED #define BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { namespace aux { struct set_tag; }}} #endif // BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/value_type_impl.hpp000644 000765 000024 00000001560 12233035540 024372 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: value_type_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template<> struct value_type_impl< aux::set_tag > { template< typename Set, typename T > struct apply { typedef T type; }; }; }} #endif // BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/set/aux_/preprocessed/plain/000755 000765 000024 00000000000 12233035540 024262 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/set/aux_/preprocessed/plain/set10.hpp000644 000765 000024 00000005022 12233035540 025726 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set/set10.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 > struct set1 : s_item< T0 , typename set0< >::item_ > { typedef set1 type; }; template< typename T0, typename T1 > struct set2 : s_item< T1 , typename set1::item_ > { typedef set2 type; }; template< typename T0, typename T1, typename T2 > struct set3 : s_item< T2 , typename set2< T0,T1 >::item_ > { typedef set3 type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set4 : s_item< T3 , typename set3< T0,T1,T2 >::item_ > { typedef set4 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set5 : s_item< T4 , typename set4< T0,T1,T2,T3 >::item_ > { typedef set5 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set6 : s_item< T5 , typename set5< T0,T1,T2,T3,T4 >::item_ > { typedef set6 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set7 : s_item< T6 , typename set6< T0,T1,T2,T3,T4,T5 >::item_ > { typedef set7 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set8 : s_item< T7 , typename set7< T0,T1,T2,T3,T4,T5,T6 >::item_ > { typedef set8 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set9 : s_item< T8 , typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::item_ > { typedef set9 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set10 : s_item< T9 , typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::item_ > { typedef set10 type; }; }} passenger-4.0.37/ext/boost/mpl/set/aux_/preprocessed/plain/set10_c.hpp000644 000765 000024 00000004563 12233035540 026241 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set/set10_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0 > struct set1_c : s_item< integral_c< T,C0 > , set0_c > { typedef set1_c type; }; template< typename T , T C0, T C1 > struct set2_c : s_item< integral_c< T,C1 > , set1_c< T,C0 > > { typedef set2_c type; }; template< typename T , T C0, T C1, T C2 > struct set3_c : s_item< integral_c< T,C2 > , set2_c< T,C0,C1 > > { typedef set3_c type; }; template< typename T , T C0, T C1, T C2, T C3 > struct set4_c : s_item< integral_c< T,C3 > , set3_c< T,C0,C1,C2 > > { typedef set4_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4 > struct set5_c : s_item< integral_c< T,C4 > , set4_c< T,C0,C1,C2,C3 > > { typedef set5_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5 > struct set6_c : s_item< integral_c< T,C5 > , set5_c< T,C0,C1,C2,C3,C4 > > { typedef set6_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6 > struct set7_c : s_item< integral_c< T,C6 > , set6_c< T,C0,C1,C2,C3,C4,C5 > > { typedef set7_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7 > struct set8_c : s_item< integral_c< T,C7 > , set7_c< T,C0,C1,C2,C3,C4,C5,C6 > > { typedef set8_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8 > struct set9_c : s_item< integral_c< T,C8 > , set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > > { typedef set9_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9 > struct set10_c : s_item< integral_c< T,C9 > , set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > > { typedef set10_c type; }; }} passenger-4.0.37/ext/boost/mpl/set/aux_/preprocessed/plain/set20.hpp000644 000765 000024 00000010775 12233035540 025742 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set/set20.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set11 : s_item< T10 , typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::item_ > { typedef set11 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set12 : s_item< T11 , typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::item_ > { typedef set12 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set13 : s_item< T12 , typename set12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 , T11 >::item_ > { typedef set13 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set14 : s_item< T13 , typename set13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12 >::item_ > { typedef set14 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set15 : s_item< T14 , typename set14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13 >::item_ > { typedef set15 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set16 : s_item< T15 , typename set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14 >::item_ > { typedef set16 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set17 : s_item< T16 , typename set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15 >::item_ > { typedef set17 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set18 : s_item< T17 , typename set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16 >::item_ > { typedef set18 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set19 : s_item< T18 , typename set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17 >::item_ > { typedef set19 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set20 : s_item< T19 , typename set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18 >::item_ > { typedef set20 type; }; }} passenger-4.0.37/ext/boost/mpl/set/aux_/preprocessed/plain/set20_c.hpp000644 000765 000024 00000006660 12233035540 026242 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set/set20_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 > struct set11_c : s_item< integral_c< T,C10 > , set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > > { typedef set11_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11 > struct set12_c : s_item< integral_c< T,C11 > , set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > > { typedef set12_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12 > struct set13_c : s_item< integral_c< T,C12 > , set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > > { typedef set13_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13 > struct set14_c : s_item< integral_c< T,C13 > , set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > > { typedef set14_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14 > struct set15_c : s_item< integral_c< T,C14 > , set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 > > { typedef set15_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15 > struct set16_c : s_item< integral_c< T,C15 > , set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 > > { typedef set16_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16 > struct set17_c : s_item< integral_c< T,C16 > , set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 > > { typedef set17_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17 > struct set18_c : s_item< integral_c< T,C17 > , set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 > > { typedef set18_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18 > struct set19_c : s_item< integral_c< T,C18 > , set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 > > { typedef set19_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19 > struct set20_c : s_item< integral_c< T,C19 > , set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 > > { typedef set20_c type; }; }} passenger-4.0.37/ext/boost/mpl/set/aux_/preprocessed/plain/set30.hpp000644 000765 000024 00000015037 12233035540 025737 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set/set30.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20 > struct set21 : s_item< T20 , typename set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19 >::item_ > { typedef set21 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21 > struct set22 : s_item< T21 , typename set21< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20 >::item_ > { typedef set22 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22 > struct set23 : s_item< T22 , typename set22< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21 >::item_ > { typedef set23 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23 > struct set24 : s_item< T23 , typename set23< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22 >::item_ > { typedef set24 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 > struct set25 : s_item< T24 , typename set24< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 >::item_ > { typedef set25 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25 > struct set26 : s_item< T25 , typename set25< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23 , T24 >::item_ > { typedef set26 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26 > struct set27 : s_item< T26 , typename set26< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24 , T25 >::item_ > { typedef set27 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27 > struct set28 : s_item< T27 , typename set27< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26 >::item_ > { typedef set28 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28 > struct set29 : s_item< T28 , typename set28< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27 >::item_ > { typedef set29 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 > struct set30 : s_item< T29 , typename set29< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28 >::item_ > { typedef set30 type; }; }} passenger-4.0.37/ext/boost/mpl/set/aux_/preprocessed/plain/set30_c.hpp000644 000765 000024 00000011056 12233035540 026236 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set/set30_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 > struct set21_c : s_item< integral_c< T,C20 > , set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 > > { typedef set21_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21 > struct set22_c : s_item< integral_c< T,C21 > , set21_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 > > { typedef set22_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22 > struct set23_c : s_item< integral_c< T,C22 > , set22_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 > > { typedef set23_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23 > struct set24_c : s_item< integral_c< T,C23 > , set23_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 > > { typedef set24_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24 > struct set25_c : s_item< integral_c< T,C24 > , set24_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 > > { typedef set25_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25 > struct set26_c : s_item< integral_c< T,C25 > , set25_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 > > { typedef set26_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26 > struct set27_c : s_item< integral_c< T,C26 > , set26_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 > > { typedef set27_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27 > struct set28_c : s_item< integral_c< T,C27 > , set27_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 > > { typedef set28_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28 > struct set29_c : s_item< integral_c< T,C28 > , set28_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 > > { typedef set29_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29 > struct set30_c : s_item< integral_c< T,C29 > , set29_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 > > { typedef set30_c type; }; }} passenger-4.0.37/ext/boost/mpl/set/aux_/preprocessed/plain/set40.hpp000644 000765 000024 00000021045 12233035540 025734 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set/set40.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30 > struct set31 : s_item< T30 , typename set30< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29 >::item_ > { typedef set31 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31 > struct set32 : s_item< T31 , typename set31< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30 >::item_ > { typedef set32 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32 > struct set33 : s_item< T32 , typename set32< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31 >::item_ > { typedef set33 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33 > struct set34 : s_item< T33 , typename set33< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32 >::item_ > { typedef set34 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 > struct set35 : s_item< T34 , typename set34< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33 >::item_ > { typedef set35 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35 > struct set36 : s_item< T35 , typename set35< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34 >::item_ > { typedef set36 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36 > struct set37 : s_item< T36 , typename set36< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35 >::item_ > { typedef set37 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37 > struct set38 : s_item< T37 , typename set37< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36 >::item_ > { typedef set38 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38 > struct set39 : s_item< T38 , typename set38< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37 >::item_ > { typedef set39 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 > struct set40 : s_item< T39 , typename set39< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37 , T38 >::item_ > { typedef set40 type; }; }} passenger-4.0.37/ext/boost/mpl/set/aux_/preprocessed/plain/set40_c.hpp000644 000765 000024 00000013254 12233035540 026241 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set/set40_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 > struct set31_c : s_item< integral_c< T,C30 > , set30_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 > > { typedef set31_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31 > struct set32_c : s_item< integral_c< T,C31 > , set31_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 > > { typedef set32_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32 > struct set33_c : s_item< integral_c< T,C32 > , set32_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 > > { typedef set33_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33 > struct set34_c : s_item< integral_c< T,C33 > , set33_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 > > { typedef set34_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34 > struct set35_c : s_item< integral_c< T,C34 > , set34_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 > > { typedef set35_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35 > struct set36_c : s_item< integral_c< T,C35 > , set35_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 > > { typedef set36_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36 > struct set37_c : s_item< integral_c< T,C36 > , set36_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 > > { typedef set37_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37 > struct set38_c : s_item< integral_c< T,C37 > , set37_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 > > { typedef set38_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38 > struct set39_c : s_item< integral_c< T,C38 > , set38_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 > > { typedef set39_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39 > struct set40_c : s_item< integral_c< T,C39 > , set39_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 > > { typedef set40_c type; }; }} passenger-4.0.37/ext/boost/mpl/set/aux_/preprocessed/plain/set50.hpp000644 000765 000024 00000025106 12233035540 025737 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set/set50.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40 > struct set41 : s_item< T40 , typename set40< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38 , T39 >::item_ > { typedef set41 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41 > struct set42 : s_item< T41 , typename set41< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39 , T40 >::item_ > { typedef set42 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42 > struct set43 : s_item< T42 , typename set42< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39 , T40, T41 >::item_ > { typedef set43 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43 > struct set44 : s_item< T43 , typename set43< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39 , T40, T41, T42 >::item_ > { typedef set44 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 > struct set45 : s_item< T44 , typename set44< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39 , T40, T41, T42, T43 >::item_ > { typedef set45 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45 > struct set46 : s_item< T45 , typename set45< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39 , T40, T41, T42, T43, T44 >::item_ > { typedef set46 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46 > struct set47 : s_item< T46 , typename set46< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39 , T40, T41, T42, T43, T44, T45 >::item_ > { typedef set47 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47 > struct set48 : s_item< T47 , typename set47< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39 , T40, T41, T42, T43, T44, T45, T46 >::item_ > { typedef set48 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47, typename T48 > struct set49 : s_item< T48 , typename set48< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39 , T40, T41, T42, T43, T44, T45, T46, T47 >::item_ > { typedef set49 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47, typename T48, typename T49 > struct set50 : s_item< T49 , typename set49< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25 , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39 , T40, T41, T42, T43, T44, T45, T46, T47, T48 >::item_ > { typedef set50 type; }; }} passenger-4.0.37/ext/boost/mpl/set/aux_/preprocessed/plain/set50_c.hpp000644 000765 000024 00000015452 12233035540 026244 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set/set50_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 > struct set41_c : s_item< integral_c< T,C40 > , set40_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 > > { typedef set41_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41 > struct set42_c : s_item< integral_c< T,C41 > , set41_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 > > { typedef set42_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42 > struct set43_c : s_item< integral_c< T,C42 > , set42_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 > > { typedef set43_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43 > struct set44_c : s_item< integral_c< T,C43 > , set43_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 > > { typedef set44_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44 > struct set45_c : s_item< integral_c< T,C44 > , set44_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 > > { typedef set45_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45 > struct set46_c : s_item< integral_c< T,C45 > , set45_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 > > { typedef set46_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46 > struct set47_c : s_item< integral_c< T,C46 > , set46_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 > > { typedef set47_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47 > struct set48_c : s_item< integral_c< T,C47 > , set47_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 > > { typedef set48_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48 > struct set49_c : s_item< integral_c< T,C48 > , set48_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 > > { typedef set49_c type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49 > struct set50_c : s_item< integral_c< T,C49 > , set49_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 > > { typedef set50_c type; }; }} passenger-4.0.37/ext/boost/mpl/multiset/aux_/000755 000765 000024 00000000000 12233035540 021534 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/multiset/multiset0.hpp000644 000765 000024 00000002626 12233035540 023245 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MULTISET_MULTISET0_HPP_INCLUDED #define BOOST_MPL_MULTISET_MULTISET0_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: multiset0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ //#include //#include //#include //#include //#include //#include //#include //#include //#include //#include #include #include //#include //#include //#include #include #include #include #endif // BOOST_MPL_MULTISET_MULTISET0_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/multiset/aux_/count_impl.hpp000644 000765 000024 00000004266 12233035540 024426 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MULTISET_AUX_COUNT_IMPL_HPP_INCLUDED #define BOOST_MPL_MULTISET_AUX_COUNT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: count_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # include # include #endif namespace boost { namespace mpl { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) namespace aux { template< typename S, typename U > struct multiset_count_impl : int_< sizeof(S::key_count(BOOST_MPL_AUX_STATIC_CAST(U*,0))) - 1 > { }; template< typename S, typename U > struct multiset_count_ref_impl { typedef U (* u_)(); typedef int_< sizeof(S::ref_key_count(BOOST_MPL_AUX_STATIC_CAST(u_,0))) - 1 > type_; BOOST_STATIC_CONSTANT(int, value = type_::value); typedef type_ type; }; } template<> struct count_impl< aux::multiset_tag > { template< typename Set, typename Key > struct apply : if_< is_reference , aux::multiset_count_ref_impl , aux::multiset_count_impl >::type { }; }; #else template<> struct count_impl< aux::multiset_tag > { template< typename Set, typename Key > struct apply { enum { msvc71_wknd_ = sizeof(Set::key_count(BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*,0))) - 1 }; typedef int_< msvc71_wknd_ > type; BOOST_STATIC_CONSTANT(int, value = msvc71_wknd_); }; }; #endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300) }} #endif // BOOST_MPL_MULTISET_AUX_COUNT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/multiset/aux_/insert_impl.hpp000644 000765 000024 00000001632 12233035540 024574 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MULTISET_AUX_INSERT_IMPL_HPP_INCLUDED #define BOOST_MPL_MULTISET_AUX_INSERT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: insert_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct insert_impl< aux::multiset_tag > { template< typename Set, typename Key, typename unused_ > struct apply { typedef ms_item type; }; }; }} #endif // BOOST_MPL_MULTISET_AUX_INSERT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/multiset/aux_/item.hpp000644 000765 000024 00000007110 12233035540 023202 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MULTISET_AUX_ITEM_HPP_INCLUDED #define BOOST_MPL_MULTISET_AUX_ITEM_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # include # include # include #endif namespace boost { namespace mpl { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) template< typename T, typename Base > struct ms_item { typedef aux::multiset_tag tag; template< typename U > struct prior_count { enum { msvc70_wknd_ = sizeof(Base::key_count(BOOST_MPL_AUX_STATIC_CAST(U*,0))) }; typedef int_< msvc70_wknd_ > count_; typedef typename eval_if< is_same, next, count_ >::type c_; #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) typedef typename aux::weighted_tag::type type; #else typedef char (&type)[BOOST_MPL_AUX_MSVC_VALUE_WKND(c_)::value]; #endif }; template< typename U > struct prior_ref_count { typedef U (* u_)(); enum { msvc70_wknd_ = sizeof(Base::ref_key_count(BOOST_MPL_AUX_STATIC_CAST(u_,0))) }; typedef int_< msvc70_wknd_ > count_; typedef typename eval_if< is_same, next, count_ >::type c_; #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) typedef typename aux::weighted_tag::type type; #else typedef char (&type)[BOOST_MPL_AUX_MSVC_VALUE_WKND(c_)::value]; #endif }; template< typename U > static typename prior_count::type key_count(U*); template< typename U > static typename prior_ref_count::type ref_key_count(U (*)()); }; #else // BOOST_WORKAROUND(BOOST_MSVC, <= 1300) namespace aux { template< typename U, typename Base > struct prior_key_count { enum { msvc71_wknd_ = sizeof(Base::key_count(BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*,0))) }; typedef int_< msvc71_wknd_ > count_; #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) typedef typename aux::weighted_tag< BOOST_MPL_AUX_VALUE_WKND(count_)::value >::type type; #else typedef char (&type)[count_::value]; #endif }; } template< typename T, typename Base > struct ms_item { typedef aux::multiset_tag tag; enum { msvc71_wknd_ = sizeof(Base::key_count(BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*,0))) + 1 }; typedef int_< msvc71_wknd_ > count_; #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) static typename aux::weighted_tag< BOOST_MPL_AUX_VALUE_WKND(count_)::value >::type key_count(aux::type_wrapper*); #else static char (& key_count(aux::type_wrapper*) )[count_::value]; #endif template< typename U > static typename aux::prior_key_count::type key_count(aux::type_wrapper*); }; #endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300) }} #endif // BOOST_MPL_MULTISET_AUX_ITEM_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/multiset/aux_/multiset0.hpp000644 000765 000024 00000001606 12233035540 024176 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MULTISET_AUX_MULTISET0_HPP_INCLUDED #define BOOST_MPL_MULTISET_AUX_MULTISET0_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: multiset0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template< int dummy_ = 0 > struct multiset0 { typedef aux::multiset_tag tag; typedef int_<1> count_; static char (& key_count(...) )[count_::value]; static char (& ref_key_count(...) )[count_::value]; }; }} #endif // BOOST_MPL_MULTISET_AUX_MULTISET0_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/multiset/aux_/tag.hpp000644 000765 000024 00000001156 12233035540 023023 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MULTISET_AUX_TAG_HPP_INCLUDED #define BOOST_MPL_MULTISET_AUX_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { namespace aux { struct multiset_tag; }}} #endif // BOOST_MPL_MULTISET_AUX_TAG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/math/fixed_c.hpp000644 000765 000024 00000001623 12233035540 021777 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_FIXED_C_HPP_INCLUDED #define BOOST_MPL_FIXED_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: fixed_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { template< long IntegerPart , unsigned long FractionPart > struct fixed_c { BOOST_STATIC_CONSTANT(long, integer_part = IntegerPart); BOOST_STATIC_CONSTANT(unsigned long, fraction_part = FractionPart); typedef fixed_c type; fixed_c() {} }; }} #endif // BOOST_MPL_FIXED_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/math/is_even.hpp000644 000765 000024 00000002352 12233035540 022026 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MATH_IS_EVEN_HPP_INCLUDED #define BOOST_MPL_MATH_IS_EVEN_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: is_even.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) namespace aux { template struct is_even_base { enum { value = (N::value % 2) == 0 }; typedef bool_ type; }; } #endif template< typename BOOST_MPL_AUX_NA_PARAM(N) > struct is_even #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) : aux::is_even_base::type #else : bool_<((N::value % 2) == 0)> #endif { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_even,(N)) }; BOOST_MPL_AUX_NA_SPEC(1, is_even) }} #endif // BOOST_MPL_MATH_IS_EVEN_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/math/rational_c.hpp000644 000765 000024 00000001630 12233035540 022507 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_RATIONAL_C_HPP_INCLUDED #define BOOST_MPL_RATIONAL_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: rational_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { template< typename IntegerType , IntegerType N , IntegerType D = 1 > struct rational_c { BOOST_STATIC_CONSTANT(IntegerType, numerator = N); BOOST_STATIC_CONSTANT(IntegerType, denominator = D); typedef rational_c type; rational_c() {} }; }} #endif // BOOST_MPL_RATIONAL_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/000755 000765 000024 00000000000 12233035540 020443 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/map/map0.hpp000644 000765 000024 00000002451 12233035540 021057 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_MAP0_HPP_INCLUDED #define BOOST_MPL_MAP_MAP0_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: map0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include //#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif // BOOST_MPL_MAP_MAP0_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/map10.hpp000644 000765 000024 00000002236 12233035540 021141 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_MAP10_HPP_INCLUDED #define BOOST_MPL_MAP_MAP10_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: map10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER map10.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, 10, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_MAP_MAP10_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/map20.hpp000644 000765 000024 00000002240 12233035540 021135 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_MAP20_HPP_INCLUDED #define BOOST_MPL_MAP_MAP20_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: map20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER map20.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(11, 20, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_MAP_MAP20_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/map30.hpp000644 000765 000024 00000002240 12233035540 021136 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_MAP30_HPP_INCLUDED #define BOOST_MPL_MAP_MAP30_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: map30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER map30.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(21, 30, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_MAP_MAP30_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/map40.hpp000644 000765 000024 00000002240 12233035540 021137 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_MAP40_HPP_INCLUDED #define BOOST_MPL_MAP_MAP40_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: map40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER map40.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(31, 40, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_MAP_MAP40_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/map50.hpp000644 000765 000024 00000002240 12233035540 021140 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_MAP50_HPP_INCLUDED #define BOOST_MPL_MAP_MAP50_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: map50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER map50.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(41, 50, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_MAP_MAP50_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/at_impl.hpp000644 000765 000024 00000006651 12233035540 022611 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_AT_IMPL_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_AT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: at_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #if !defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) # include # include # include # include #endif namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template< typename Map, typename Key > struct m_at { typedef aux::type_wrapper key_; typedef __typeof__( BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY( Map , BOOST_MPL_AUX_STATIC_CAST(key_*, 0) ) ) type; }; template<> struct at_impl< aux::map_tag > { template< typename Map, typename Key > struct apply : aux::wrapped_type< typename m_at< Map , Key >::type > { }; }; // agurt 31/jan/04: two-step implementation for the sake of GCC 3.x template< typename Map, long order > struct item_by_order_impl { typedef __typeof__( BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER( Map , BOOST_MPL_AUX_STATIC_CAST(long_*, 0) ) ) type; }; template< typename Map, long order > struct item_by_order : aux::wrapped_type< typename item_by_order_impl::type > { }; #else // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Map, long n > struct m_at { typedef void_ type; }; # else template< long n > struct m_at_impl { template< typename Map > struct result_ { typedef void_ type; }; }; template< typename Map, long n > struct m_at { typedef typename m_at_impl::result_::type type; }; # endif template<> struct at_impl< aux::map_tag > { template< typename Map, typename Key > struct apply { typedef typename m_at< Map, (x_order_impl::value - 2) >::type item_; typedef typename eval_if< is_void_ , void_ , second >::type type; }; }; template< typename Map, long order > struct is_item_masked { BOOST_STATIC_CONSTANT(bool, value = sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED( Map , BOOST_MPL_AUX_STATIC_CAST(long_*, 0) ) ) == sizeof(aux::yes_tag) ); }; template< typename Map, long order > struct item_by_order { typedef typename eval_if_c< is_item_masked::value , void_ , m_at >::type type; }; #endif }} #endif // BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/begin_end_impl.hpp000644 000765 000024 00000002500 12233035540 024104 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_BEGIN_END_IMPL_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_BEGIN_END_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: begin_end_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct begin_impl< aux::map_tag > { template< typename Map > struct apply { typedef typename next< typename Map::order >::type max_order_; typedef m_iter< Map , next_order::value , max_order_::value > type; }; }; template<> struct end_impl< aux::map_tag > { template< typename Map > struct apply { typedef typename next< typename Map::order >::type max_order_; typedef m_iter< Map,max_order_::value,max_order_::value > type; }; }; }} #endif // BOOST_MPL_MAP_AUX_BEGIN_END_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/clear_impl.hpp000644 000765 000024 00000001562 12233035540 023267 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_CLEAR_IMPL_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_CLEAR_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: clear_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct clear_impl< aux::map_tag > { template< typename Map > struct apply { typedef map0<> type; }; }; }} #endif // BOOST_MPL_MAP_AUX_CLEAR_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/contains_impl.hpp000644 000765 000024 00000002151 12233035540 024012 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_CONTAINS_IMPL_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_CONTAINS_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: contains_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template<> struct contains_impl< aux::map_tag > { template< typename Map, typename Pair > struct apply : is_same< typename at_impl::apply< Map , typename Pair::first >::type , typename Pair::second > { }; }; }} #endif // BOOST_MPL_MAP_AUX_CONTAINS_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/empty_impl.hpp000644 000765 000024 00000001512 12233035540 023332 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_EMPTY_IMPL_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_EMPTY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: empty_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct empty_impl< aux::map_tag > { template< typename Map > struct apply : not_< typename Map::size > { }; }; }} #endif // BOOST_MPL_MAP_AUX_EMPTY_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/erase_impl.hpp000644 000765 000024 00000002003 12233035540 023267 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_ERASE_IMPL_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_ERASE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: erase_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct erase_impl< aux::map_tag > { template< typename Map , typename Pos , typename unused_ > struct apply : erase_key_impl ::apply { }; }; }} #endif // BOOST_MPL_MAP_AUX_ERASE_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/erase_key_impl.hpp000644 000765 000024 00000002566 12233035540 024155 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_ERASE_KEY_IMPL_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_ERASE_KEY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: erase_key_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { template<> struct erase_key_impl< aux::map_tag > { template< typename Map , typename Key > struct apply : eval_if< has_key_impl::apply , eval_if< is_same< Key,typename Map::key_ > , base , identity< m_mask > > , identity > { }; }; }} #endif // BOOST_MPL_MAP_AUX_ERASE_KEY_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/has_key_impl.hpp000644 000765 000024 00000002256 12233035540 023625 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_HAS_KEY_IMPL_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_HAS_KEY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_key_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { template<> struct has_key_impl< aux::map_tag > { template< typename Map, typename Key > struct apply #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) : is_not_void_< typename at_impl ::apply::type > #else : bool_< ( x_order_impl::value > 1 ) > #endif { }; }; }} #endif // BOOST_MPL_MAP_AUX_HAS_KEY_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/include_preprocessed.hpp000644 000765 000024 00000003251 12233035540 025356 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! #include #include #include #include #include #include #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) # define AUX778076_INCLUDE_DIR typeof_based #elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # define AUX778076_INCLUDE_DIR no_ctps #else # define AUX778076_INCLUDE_DIR plain #endif #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_HEADER \ AUX778076_INCLUDE_DIR/BOOST_MPL_PREPROCESSED_HEADER \ /**/ #else # define AUX778076_HEADER \ BOOST_PP_CAT(AUX778076_INCLUDE_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ /**/ #endif #if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) # define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/map/aux_/preprocessed/AUX778076_HEADER) # include AUX778076_INCLUDE_STRING # undef AUX778076_INCLUDE_STRING #else # include BOOST_PP_STRINGIZE(boost/mpl/map/aux_/preprocessed/AUX778076_HEADER) #endif # undef AUX778076_HEADER # undef AUX778076_INCLUDE_DIR #undef BOOST_MPL_PREPROCESSED_HEADER passenger-4.0.37/ext/boost/mpl/map/aux_/insert_impl.hpp000644 000765 000024 00000003304 12233035540 023501 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: insert_impl.hpp 55751 2009-08-24 04:11:00Z agurtovoy $ // $Date: 2009-08-23 21:11:00 -0700 (Sun, 23 Aug 2009) $ // $Revision: 55751 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Map, typename Pair > struct map_insert_impl : if_< contains_impl::apply , Map #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) , m_item< typename Pair::first , typename Pair::second , Map > #else , m_item< Map::order::value , typename Pair::first , typename Pair::second , Map > #endif > { }; } template<> struct insert_impl< aux::map_tag > { template< typename Map , typename PosOrKey , typename KeyOrNA > struct apply : aux::map_insert_impl< Map , typename if_na::type > { }; }; }} #endif // BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/item.hpp000644 000765 000024 00000007561 12233035540 022123 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_ITEM_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_ITEM_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template< typename Key, typename T, typename Base > struct m_item : Base { typedef Key key_; typedef pair item; typedef Base base; typedef typename next< typename Base::size >::type size; typedef typename next< typename Base::order >::type order; #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) typedef typename aux::weighted_tag::type order_tag_; #else typedef char (&order_tag_)[BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value]; #endif BOOST_MPL_AUX_MAP_OVERLOAD( aux::type_wrapper, VALUE_BY_KEY, m_item, aux::type_wrapper* ); BOOST_MPL_AUX_MAP_OVERLOAD( aux::type_wrapper, ITEM_BY_ORDER, m_item, order* ); BOOST_MPL_AUX_MAP_OVERLOAD( order_tag_, ORDER_BY_KEY, m_item, aux::type_wrapper* ); }; template< typename Key, typename Base > struct m_mask : Base { typedef void_ key_; typedef Base base; typedef typename prior< typename Base::size >::type size; typedef typename x_order_impl::type key_order_; BOOST_MPL_AUX_MAP_OVERLOAD( aux::type_wrapper, VALUE_BY_KEY, m_mask, aux::type_wrapper* ); BOOST_MPL_AUX_MAP_OVERLOAD( aux::type_wrapper, ITEM_BY_ORDER, m_mask, key_order_* ); }; #else // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< long n, typename Key, typename T, typename Base > struct m_item; # else template< long n > struct m_item_impl { template< typename Key, typename T, typename Base > struct result_; }; template< long n, typename Key, typename T, typename Base > struct m_item : m_item_impl::result_ { }; # endif template< typename Key, typename T, typename Base > struct m_item_ : Base { typedef Key key_; typedef Base base; typedef m_item_ type; typedef typename next< typename Base::size >::type size; typedef typename next< typename Base::order >::type order; #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) typedef typename aux::weighted_tag::type order_tag_; #else typedef char (&order_tag_)[BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value]; #endif BOOST_MPL_AUX_MAP_OVERLOAD( order_tag_, ORDER_BY_KEY, m_item_, aux::type_wrapper* ); }; template< typename Key, typename Base > struct m_mask : Base { typedef void_ key_; typedef Base base; typedef typename prior< typename Base::size >::type size; typedef typename x_order_impl::type key_order_; BOOST_MPL_AUX_MAP_OVERLOAD( aux::no_tag, ORDER_BY_KEY, m_mask, aux::type_wrapper* ); BOOST_MPL_AUX_MAP_OVERLOAD( aux::yes_tag, IS_MASKED, m_mask, key_order_* ); }; #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES }} #endif // BOOST_MPL_MAP_AUX_ITEM_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/iterator.hpp000644 000765 000024 00000007177 12233035540 023021 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_ITERATOR_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_ITERATOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Map , long order , long max_order > struct next_order : if_< is_void_< typename item_by_order::type > , next_order , long_ >::type { }; template< typename Map , long max_order > struct next_order : long_ { }; template< typename Map, long order, long max_order > struct m_iter { typedef forward_iterator_tag category; typedef typename item_by_order::type type; }; template< typename Map, long max_order > struct m_iter { typedef forward_iterator_tag category; }; template< typename Map, long order, long max_order > struct next< m_iter > { typedef m_iter< Map , next_order::value , max_order > type; }; template< typename Map, long max_order > struct next< m_iter > { }; #else template< typename Map , BOOST_MPL_AUX_NTTP_DECL(long, order) , BOOST_MPL_AUX_NTTP_DECL(long, max_order) > struct next_order; template< typename Map , BOOST_MPL_AUX_NTTP_DECL(long, order) , BOOST_MPL_AUX_NTTP_DECL(long, max_order) > struct next_order_impl : if_< is_void_< typename item_by_order::type > , next_order , long_ >::type { }; template< typename Map , BOOST_MPL_AUX_NTTP_DECL(long, order) , BOOST_MPL_AUX_NTTP_DECL(long, max_order) > struct next_order : if_c< (order != max_order) , next_order_impl , long_ >::type { }; template< typename Map , BOOST_MPL_AUX_NTTP_DECL(long, order) , BOOST_MPL_AUX_NTTP_DECL(long, max_order) > struct m_iter; struct m_iter_empty_base {}; template< typename Map , BOOST_MPL_AUX_NTTP_DECL(long, order) , BOOST_MPL_AUX_NTTP_DECL(long, max_order) > struct m_iter_base { typedef typename item_by_order::type type; typedef m_iter< Map , next_order::value , max_order > next; }; template< typename Map , BOOST_MPL_AUX_NTTP_DECL(long, order) , BOOST_MPL_AUX_NTTP_DECL(long, max_order) > struct m_iter : if_c< (order == max_order) , m_iter_empty_base , m_iter_base >::type { typedef forward_iterator_tag category; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION }} #endif // BOOST_MPL_MAP_AUX_ITERATOR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/key_type_impl.hpp000644 000765 000024 00000001575 12233035540 024036 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_KEY_TYPE_IMPL_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_KEY_TYPE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: key_type_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct key_type_impl< aux::map_tag > { template< typename Map, typename T > struct apply : first { }; }; }} #endif // BOOST_MPL_MAP_AUX_KEY_TYPE_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/map0.hpp000644 000765 000024 00000004322 12233035540 022012 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_MAP0_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_MAP0_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: map0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) # define BOOST_MPL_AUX_MAP0_OVERLOAD(R, f, X, T) \ friend R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \ /**/ # define BOOST_MPL_AUX_MAP_OVERLOAD(R, f, X, T) \ BOOST_MPL_AUX_MAP0_OVERLOAD(R, f, X, T) \ /**/ #else # define BOOST_MPL_AUX_MAP0_OVERLOAD(R, f, X, T) \ static R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \ /**/ # define BOOST_MPL_AUX_MAP_OVERLOAD(R, f, X, T) \ BOOST_MPL_AUX_MAP0_OVERLOAD(R, f, X, T); \ using Base::BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f) \ /**/ #endif template< typename Dummy = na > struct map0 { typedef map0 type; typedef aux::map_tag tag; typedef void_ key_; typedef long_<1> order; typedef long_<0> size; #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) BOOST_MPL_AUX_MAP0_OVERLOAD( aux::type_wrapper, VALUE_BY_KEY, map0<>, void const volatile* ); BOOST_MPL_AUX_MAP0_OVERLOAD( aux::type_wrapper, ITEM_BY_ORDER, map0<>, long_<1>* ); BOOST_MPL_AUX_MAP0_OVERLOAD( aux::no_tag, ORDER_BY_KEY, map0<>, void const volatile* ); #else BOOST_MPL_AUX_MAP0_OVERLOAD( aux::no_tag, ORDER_BY_KEY, map0<>, void const volatile* ); BOOST_MPL_AUX_MAP0_OVERLOAD( aux::no_tag, IS_MASKED, map0<>, void const volatile* ); #endif }; }} #endif // BOOST_MPL_MAP_AUX_MAP0_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/numbered.hpp000644 000765 000024 00000005005 12233035540 022755 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION #if !defined(BOOST_PP_IS_ITERATING) // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #else #include #include #include #include #include #define i_ BOOST_PP_FRAME_ITERATION(1) # define AUX778076_MAP_TAIL(map, i_, P) \ BOOST_PP_CAT(map,i_)< \ BOOST_PP_ENUM_PARAMS(i_, P) \ > \ /**/ #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) template< BOOST_PP_ENUM_PARAMS(i_, typename P) > struct BOOST_PP_CAT(map,i_) : m_item< typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::first , typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::second , AUX778076_MAP_TAIL(map,BOOST_PP_DEC(i_),P) > { typedef BOOST_PP_CAT(map,i_) type; }; #else // "brute force" implementation # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Map> struct m_at { typedef typename Map::BOOST_PP_CAT(item,BOOST_PP_DEC(i_)) type; }; template< typename Key, typename T, typename Base > struct m_item : m_item_ { typedef pair BOOST_PP_CAT(item,BOOST_PP_DEC(i_)); }; # else template<> struct m_at_impl { template< typename Map > struct result_ { typedef typename Map::BOOST_PP_CAT(item,BOOST_PP_DEC(i_)) type; }; }; template<> struct m_item_impl { template< typename Key, typename T, typename Base > struct result_ : m_item_ { typedef pair BOOST_PP_CAT(item,BOOST_PP_DEC(i_)); }; }; # endif template< BOOST_PP_ENUM_PARAMS(i_, typename P) > struct BOOST_PP_CAT(map,i_) : m_item< i_ , typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::first , typename BOOST_PP_CAT(P,BOOST_PP_DEC(i_))::second , AUX778076_MAP_TAIL(map,BOOST_PP_DEC(i_),P) > { typedef BOOST_PP_CAT(map,i_) type; }; #endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES # undef AUX778076_MAP_TAIL #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/000755 000765 000024 00000000000 12233035540 023141 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/map/aux_/size_impl.hpp000644 000765 000024 00000001426 12233035540 023152 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_SIZE_IMPL_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_SIZE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: size_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template<> struct size_impl< aux::map_tag > { template< typename Map > struct apply : Map::size { }; }; }} #endif // BOOST_MPL_MAP_AUX_SIZE_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/tag.hpp000644 000765 000024 00000001200 12233035540 021720 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_TAG_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { namespace aux { struct map_tag; }}} #endif // BOOST_MPL_MAP_AUX_TAG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/value_type_impl.hpp000644 000765 000024 00000001612 12233035540 024352 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_MAP_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED #define BOOST_MPL_MAP_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: value_type_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct value_type_impl< aux::map_tag > { template< typename Map, typename T > struct apply : second { }; }; }} #endif // BOOST_MPL_MAP_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/no_ctps/000755 000765 000024 00000000000 12233035540 024606 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/plain/000755 000765 000024 00000000000 12233035540 024244 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/typeof_based/000755 000765 000024 00000000000 12233035540 025605 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map10.hpp000644 000765 000024 00000005476 12233035540 027250 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map10.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename P0 > struct map1 : m_item< typename P0::first , typename P0::second , map0< > > { typedef map1 type; }; template< typename P0, typename P1 > struct map2 : m_item< typename P1::first , typename P1::second , map1 > { typedef map2 type; }; template< typename P0, typename P1, typename P2 > struct map3 : m_item< typename P2::first , typename P2::second , map2< P0,P1 > > { typedef map3 type; }; template< typename P0, typename P1, typename P2, typename P3 > struct map4 : m_item< typename P3::first , typename P3::second , map3< P0,P1,P2 > > { typedef map4 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 > struct map5 : m_item< typename P4::first , typename P4::second , map4< P0,P1,P2,P3 > > { typedef map5 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5 > struct map6 : m_item< typename P5::first , typename P5::second , map5< P0,P1,P2,P3,P4 > > { typedef map6 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6 > struct map7 : m_item< typename P6::first , typename P6::second , map6< P0,P1,P2,P3,P4,P5 > > { typedef map7 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7 > struct map8 : m_item< typename P7::first , typename P7::second , map7< P0,P1,P2,P3,P4,P5,P6 > > { typedef map8 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8 > struct map9 : m_item< typename P8::first , typename P8::second , map8< P0,P1,P2,P3,P4,P5,P6,P7 > > { typedef map9 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 > struct map10 : m_item< typename P9::first , typename P9::second , map9< P0,P1,P2,P3,P4,P5,P6,P7,P8 > > { typedef map10 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map20.hpp000644 000765 000024 00000011167 12233035540 027243 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map20.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10 > struct map11 : m_item< typename P10::first , typename P10::second , map10< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9 > > { typedef map11 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11 > struct map12 : m_item< typename P11::first , typename P11::second , map11< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10 > > { typedef map12 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12 > struct map13 : m_item< typename P12::first , typename P12::second , map12< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11 > > { typedef map13 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13 > struct map14 : m_item< typename P13::first , typename P13::second , map13< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12 > > { typedef map14 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 > struct map15 : m_item< typename P14::first , typename P14::second , map14< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13 > > { typedef map15 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15 > struct map16 : m_item< typename P15::first , typename P15::second , map15< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14 > > { typedef map16 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16 > struct map17 : m_item< typename P16::first , typename P16::second , map16< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15 > > { typedef map17 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17 > struct map18 : m_item< typename P17::first , typename P17::second , map17< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16 > > { typedef map18 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18 > struct map19 : m_item< typename P18::first , typename P18::second , map18< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17 > > { typedef map19 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 > struct map20 : m_item< typename P19::first , typename P19::second , map19< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18 > > { typedef map20 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map30.hpp000644 000765 000024 00000014743 12233035540 027247 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map30.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20 > struct map21 : m_item< typename P20::first , typename P20::second , map20< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19 > > { typedef map21 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21 > struct map22 : m_item< typename P21::first , typename P21::second , map21< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20 > > { typedef map22 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22 > struct map23 : m_item< typename P22::first , typename P22::second , map22< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21 > > { typedef map23 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23 > struct map24 : m_item< typename P23::first , typename P23::second , map23< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22 > > { typedef map24 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 > struct map25 : m_item< typename P24::first , typename P24::second , map24< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23 > > { typedef map25 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25 > struct map26 : m_item< typename P25::first , typename P25::second , map25< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24 > > { typedef map26 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26 > struct map27 : m_item< typename P26::first , typename P26::second , map26< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25 > > { typedef map27 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27 > struct map28 : m_item< typename P27::first , typename P27::second , map27< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26 > > { typedef map28 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28 > struct map29 : m_item< typename P28::first , typename P28::second , map28< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27 > > { typedef map29 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 > struct map30 : m_item< typename P29::first , typename P29::second , map29< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28 > > { typedef map30 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map40.hpp000644 000765 000024 00000020517 12233035540 027244 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map40.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30 > struct map31 : m_item< typename P30::first , typename P30::second , map30< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29 > > { typedef map31 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31 > struct map32 : m_item< typename P31::first , typename P31::second , map31< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30 > > { typedef map32 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32 > struct map33 : m_item< typename P32::first , typename P32::second , map32< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31 > > { typedef map33 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33 > struct map34 : m_item< typename P33::first , typename P33::second , map33< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32 > > { typedef map34 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 > struct map35 : m_item< typename P34::first , typename P34::second , map34< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33 > > { typedef map35 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35 > struct map36 : m_item< typename P35::first , typename P35::second , map35< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34 > > { typedef map36 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36 > struct map37 : m_item< typename P36::first , typename P36::second , map36< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35 > > { typedef map37 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37 > struct map38 : m_item< typename P37::first , typename P37::second , map37< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36 > > { typedef map38 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38 > struct map39 : m_item< typename P38::first , typename P38::second , map38< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37 > > { typedef map39 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 > struct map40 : m_item< typename P39::first , typename P39::second , map39< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38 > > { typedef map40 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/typeof_based/map50.hpp000644 000765 000024 00000024273 12233035540 027250 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map50.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40 > struct map41 : m_item< typename P40::first , typename P40::second , map40< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39 > > { typedef map41 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41 > struct map42 : m_item< typename P41::first , typename P41::second , map41< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40 > > { typedef map42 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42 > struct map43 : m_item< typename P42::first , typename P42::second , map42< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41 > > { typedef map43 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43 > struct map44 : m_item< typename P43::first , typename P43::second , map43< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42 > > { typedef map44 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 > struct map45 : m_item< typename P44::first , typename P44::second , map44< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43 > > { typedef map45 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45 > struct map46 : m_item< typename P45::first , typename P45::second , map45< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44 > > { typedef map46 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45, typename P46 > struct map47 : m_item< typename P46::first , typename P46::second , map46< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45 > > { typedef map47 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45, typename P46, typename P47 > struct map48 : m_item< typename P47::first , typename P47::second , map47< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46 > > { typedef map48 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45, typename P46, typename P47, typename P48 > struct map49 : m_item< typename P48::first , typename P48::second , map48< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47 > > { typedef map49 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45, typename P46, typename P47, typename P48, typename P49 > struct map50 : m_item< typename P49::first , typename P49::second , map49< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47,P48 > > { typedef map50 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/plain/map10.hpp000644 000765 000024 00000012404 12233035540 025674 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map10.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Map> struct m_at< Map,0 > { typedef typename Map::item0 type; }; template< typename Key, typename T, typename Base > struct m_item< 1,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item0; }; template< typename P0 > struct map1 : m_item< 1 , typename P0::first , typename P0::second , map0< > > { typedef map1 type; }; template< typename Map> struct m_at< Map,1 > { typedef typename Map::item1 type; }; template< typename Key, typename T, typename Base > struct m_item< 2,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item1; }; template< typename P0, typename P1 > struct map2 : m_item< 2 , typename P1::first , typename P1::second , map1 > { typedef map2 type; }; template< typename Map> struct m_at< Map,2 > { typedef typename Map::item2 type; }; template< typename Key, typename T, typename Base > struct m_item< 3,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item2; }; template< typename P0, typename P1, typename P2 > struct map3 : m_item< 3 , typename P2::first , typename P2::second , map2< P0,P1 > > { typedef map3 type; }; template< typename Map> struct m_at< Map,3 > { typedef typename Map::item3 type; }; template< typename Key, typename T, typename Base > struct m_item< 4,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item3; }; template< typename P0, typename P1, typename P2, typename P3 > struct map4 : m_item< 4 , typename P3::first , typename P3::second , map3< P0,P1,P2 > > { typedef map4 type; }; template< typename Map> struct m_at< Map,4 > { typedef typename Map::item4 type; }; template< typename Key, typename T, typename Base > struct m_item< 5,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item4; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 > struct map5 : m_item< 5 , typename P4::first , typename P4::second , map4< P0,P1,P2,P3 > > { typedef map5 type; }; template< typename Map> struct m_at< Map,5 > { typedef typename Map::item5 type; }; template< typename Key, typename T, typename Base > struct m_item< 6,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item5; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5 > struct map6 : m_item< 6 , typename P5::first , typename P5::second , map5< P0,P1,P2,P3,P4 > > { typedef map6 type; }; template< typename Map> struct m_at< Map,6 > { typedef typename Map::item6 type; }; template< typename Key, typename T, typename Base > struct m_item< 7,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item6; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6 > struct map7 : m_item< 7 , typename P6::first , typename P6::second , map6< P0,P1,P2,P3,P4,P5 > > { typedef map7 type; }; template< typename Map> struct m_at< Map,7 > { typedef typename Map::item7 type; }; template< typename Key, typename T, typename Base > struct m_item< 8,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item7; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7 > struct map8 : m_item< 8 , typename P7::first , typename P7::second , map7< P0,P1,P2,P3,P4,P5,P6 > > { typedef map8 type; }; template< typename Map> struct m_at< Map,8 > { typedef typename Map::item8 type; }; template< typename Key, typename T, typename Base > struct m_item< 9,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item8; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8 > struct map9 : m_item< 9 , typename P8::first , typename P8::second , map8< P0,P1,P2,P3,P4,P5,P6,P7 > > { typedef map9 type; }; template< typename Map> struct m_at< Map,9 > { typedef typename Map::item9 type; }; template< typename Key, typename T, typename Base > struct m_item< 10,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item9; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 > struct map10 : m_item< 10 , typename P9::first , typename P9::second , map9< P0,P1,P2,P3,P4,P5,P6,P7,P8 > > { typedef map10 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/plain/map20.hpp000644 000765 000024 00000016155 12233035540 025704 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map20.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Map> struct m_at< Map,10 > { typedef typename Map::item10 type; }; template< typename Key, typename T, typename Base > struct m_item< 11,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item10; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10 > struct map11 : m_item< 11 , typename P10::first , typename P10::second , map10< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9 > > { typedef map11 type; }; template< typename Map> struct m_at< Map,11 > { typedef typename Map::item11 type; }; template< typename Key, typename T, typename Base > struct m_item< 12,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item11; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11 > struct map12 : m_item< 12 , typename P11::first , typename P11::second , map11< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10 > > { typedef map12 type; }; template< typename Map> struct m_at< Map,12 > { typedef typename Map::item12 type; }; template< typename Key, typename T, typename Base > struct m_item< 13,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item12; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12 > struct map13 : m_item< 13 , typename P12::first , typename P12::second , map12< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11 > > { typedef map13 type; }; template< typename Map> struct m_at< Map,13 > { typedef typename Map::item13 type; }; template< typename Key, typename T, typename Base > struct m_item< 14,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item13; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13 > struct map14 : m_item< 14 , typename P13::first , typename P13::second , map13< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12 > > { typedef map14 type; }; template< typename Map> struct m_at< Map,14 > { typedef typename Map::item14 type; }; template< typename Key, typename T, typename Base > struct m_item< 15,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item14; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 > struct map15 : m_item< 15 , typename P14::first , typename P14::second , map14< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13 > > { typedef map15 type; }; template< typename Map> struct m_at< Map,15 > { typedef typename Map::item15 type; }; template< typename Key, typename T, typename Base > struct m_item< 16,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item15; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15 > struct map16 : m_item< 16 , typename P15::first , typename P15::second , map15< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14 > > { typedef map16 type; }; template< typename Map> struct m_at< Map,16 > { typedef typename Map::item16 type; }; template< typename Key, typename T, typename Base > struct m_item< 17,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item16; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16 > struct map17 : m_item< 17 , typename P16::first , typename P16::second , map16< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15 > > { typedef map17 type; }; template< typename Map> struct m_at< Map,17 > { typedef typename Map::item17 type; }; template< typename Key, typename T, typename Base > struct m_item< 18,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item17; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17 > struct map18 : m_item< 18 , typename P17::first , typename P17::second , map17< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16 > > { typedef map18 type; }; template< typename Map> struct m_at< Map,18 > { typedef typename Map::item18 type; }; template< typename Key, typename T, typename Base > struct m_item< 19,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item18; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18 > struct map19 : m_item< 19 , typename P18::first , typename P18::second , map18< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17 > > { typedef map19 type; }; template< typename Map> struct m_at< Map,19 > { typedef typename Map::item19 type; }; template< typename Key, typename T, typename Base > struct m_item< 20,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item19; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 > struct map20 : m_item< 20 , typename P19::first , typename P19::second , map19< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18 > > { typedef map20 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/plain/map30.hpp000644 000765 000024 00000021731 12233035540 025701 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map30.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Map> struct m_at< Map,20 > { typedef typename Map::item20 type; }; template< typename Key, typename T, typename Base > struct m_item< 21,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item20; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20 > struct map21 : m_item< 21 , typename P20::first , typename P20::second , map20< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19 > > { typedef map21 type; }; template< typename Map> struct m_at< Map,21 > { typedef typename Map::item21 type; }; template< typename Key, typename T, typename Base > struct m_item< 22,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item21; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21 > struct map22 : m_item< 22 , typename P21::first , typename P21::second , map21< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20 > > { typedef map22 type; }; template< typename Map> struct m_at< Map,22 > { typedef typename Map::item22 type; }; template< typename Key, typename T, typename Base > struct m_item< 23,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item22; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22 > struct map23 : m_item< 23 , typename P22::first , typename P22::second , map22< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21 > > { typedef map23 type; }; template< typename Map> struct m_at< Map,23 > { typedef typename Map::item23 type; }; template< typename Key, typename T, typename Base > struct m_item< 24,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item23; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23 > struct map24 : m_item< 24 , typename P23::first , typename P23::second , map23< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22 > > { typedef map24 type; }; template< typename Map> struct m_at< Map,24 > { typedef typename Map::item24 type; }; template< typename Key, typename T, typename Base > struct m_item< 25,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item24; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 > struct map25 : m_item< 25 , typename P24::first , typename P24::second , map24< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23 > > { typedef map25 type; }; template< typename Map> struct m_at< Map,25 > { typedef typename Map::item25 type; }; template< typename Key, typename T, typename Base > struct m_item< 26,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item25; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25 > struct map26 : m_item< 26 , typename P25::first , typename P25::second , map25< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24 > > { typedef map26 type; }; template< typename Map> struct m_at< Map,26 > { typedef typename Map::item26 type; }; template< typename Key, typename T, typename Base > struct m_item< 27,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item26; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26 > struct map27 : m_item< 27 , typename P26::first , typename P26::second , map26< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25 > > { typedef map27 type; }; template< typename Map> struct m_at< Map,27 > { typedef typename Map::item27 type; }; template< typename Key, typename T, typename Base > struct m_item< 28,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item27; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27 > struct map28 : m_item< 28 , typename P27::first , typename P27::second , map27< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26 > > { typedef map28 type; }; template< typename Map> struct m_at< Map,28 > { typedef typename Map::item28 type; }; template< typename Key, typename T, typename Base > struct m_item< 29,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item28; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28 > struct map29 : m_item< 29 , typename P28::first , typename P28::second , map28< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27 > > { typedef map29 type; }; template< typename Map> struct m_at< Map,29 > { typedef typename Map::item29 type; }; template< typename Key, typename T, typename Base > struct m_item< 30,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item29; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 > struct map30 : m_item< 30 , typename P29::first , typename P29::second , map29< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28 > > { typedef map30 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/plain/map40.hpp000644 000765 000024 00000025505 12233035540 025705 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map40.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Map> struct m_at< Map,30 > { typedef typename Map::item30 type; }; template< typename Key, typename T, typename Base > struct m_item< 31,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item30; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30 > struct map31 : m_item< 31 , typename P30::first , typename P30::second , map30< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29 > > { typedef map31 type; }; template< typename Map> struct m_at< Map,31 > { typedef typename Map::item31 type; }; template< typename Key, typename T, typename Base > struct m_item< 32,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item31; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31 > struct map32 : m_item< 32 , typename P31::first , typename P31::second , map31< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30 > > { typedef map32 type; }; template< typename Map> struct m_at< Map,32 > { typedef typename Map::item32 type; }; template< typename Key, typename T, typename Base > struct m_item< 33,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item32; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32 > struct map33 : m_item< 33 , typename P32::first , typename P32::second , map32< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31 > > { typedef map33 type; }; template< typename Map> struct m_at< Map,33 > { typedef typename Map::item33 type; }; template< typename Key, typename T, typename Base > struct m_item< 34,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item33; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33 > struct map34 : m_item< 34 , typename P33::first , typename P33::second , map33< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32 > > { typedef map34 type; }; template< typename Map> struct m_at< Map,34 > { typedef typename Map::item34 type; }; template< typename Key, typename T, typename Base > struct m_item< 35,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item34; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 > struct map35 : m_item< 35 , typename P34::first , typename P34::second , map34< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33 > > { typedef map35 type; }; template< typename Map> struct m_at< Map,35 > { typedef typename Map::item35 type; }; template< typename Key, typename T, typename Base > struct m_item< 36,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item35; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35 > struct map36 : m_item< 36 , typename P35::first , typename P35::second , map35< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34 > > { typedef map36 type; }; template< typename Map> struct m_at< Map,36 > { typedef typename Map::item36 type; }; template< typename Key, typename T, typename Base > struct m_item< 37,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item36; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36 > struct map37 : m_item< 37 , typename P36::first , typename P36::second , map36< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35 > > { typedef map37 type; }; template< typename Map> struct m_at< Map,37 > { typedef typename Map::item37 type; }; template< typename Key, typename T, typename Base > struct m_item< 38,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item37; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37 > struct map38 : m_item< 38 , typename P37::first , typename P37::second , map37< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36 > > { typedef map38 type; }; template< typename Map> struct m_at< Map,38 > { typedef typename Map::item38 type; }; template< typename Key, typename T, typename Base > struct m_item< 39,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item38; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38 > struct map39 : m_item< 39 , typename P38::first , typename P38::second , map38< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37 > > { typedef map39 type; }; template< typename Map> struct m_at< Map,39 > { typedef typename Map::item39 type; }; template< typename Key, typename T, typename Base > struct m_item< 40,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item39; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 > struct map40 : m_item< 40 , typename P39::first , typename P39::second , map39< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38 > > { typedef map40 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/plain/map50.hpp000644 000765 000024 00000031261 12233035540 025702 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map50.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Map> struct m_at< Map,40 > { typedef typename Map::item40 type; }; template< typename Key, typename T, typename Base > struct m_item< 41,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item40; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40 > struct map41 : m_item< 41 , typename P40::first , typename P40::second , map40< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39 > > { typedef map41 type; }; template< typename Map> struct m_at< Map,41 > { typedef typename Map::item41 type; }; template< typename Key, typename T, typename Base > struct m_item< 42,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item41; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41 > struct map42 : m_item< 42 , typename P41::first , typename P41::second , map41< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40 > > { typedef map42 type; }; template< typename Map> struct m_at< Map,42 > { typedef typename Map::item42 type; }; template< typename Key, typename T, typename Base > struct m_item< 43,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item42; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42 > struct map43 : m_item< 43 , typename P42::first , typename P42::second , map42< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41 > > { typedef map43 type; }; template< typename Map> struct m_at< Map,43 > { typedef typename Map::item43 type; }; template< typename Key, typename T, typename Base > struct m_item< 44,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item43; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43 > struct map44 : m_item< 44 , typename P43::first , typename P43::second , map43< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42 > > { typedef map44 type; }; template< typename Map> struct m_at< Map,44 > { typedef typename Map::item44 type; }; template< typename Key, typename T, typename Base > struct m_item< 45,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item44; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 > struct map45 : m_item< 45 , typename P44::first , typename P44::second , map44< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43 > > { typedef map45 type; }; template< typename Map> struct m_at< Map,45 > { typedef typename Map::item45 type; }; template< typename Key, typename T, typename Base > struct m_item< 46,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item45; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45 > struct map46 : m_item< 46 , typename P45::first , typename P45::second , map45< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44 > > { typedef map46 type; }; template< typename Map> struct m_at< Map,46 > { typedef typename Map::item46 type; }; template< typename Key, typename T, typename Base > struct m_item< 47,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item46; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45, typename P46 > struct map47 : m_item< 47 , typename P46::first , typename P46::second , map46< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45 > > { typedef map47 type; }; template< typename Map> struct m_at< Map,47 > { typedef typename Map::item47 type; }; template< typename Key, typename T, typename Base > struct m_item< 48,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item47; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45, typename P46, typename P47 > struct map48 : m_item< 48 , typename P47::first , typename P47::second , map47< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46 > > { typedef map48 type; }; template< typename Map> struct m_at< Map,48 > { typedef typename Map::item48 type; }; template< typename Key, typename T, typename Base > struct m_item< 49,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item48; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45, typename P46, typename P47, typename P48 > struct map49 : m_item< 49 , typename P48::first , typename P48::second , map48< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47 > > { typedef map49 type; }; template< typename Map> struct m_at< Map,49 > { typedef typename Map::item49 type; }; template< typename Key, typename T, typename Base > struct m_item< 50,Key,T,Base > : m_item_< Key,T,Base > { typedef pair< Key,T > item49; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45, typename P46, typename P47, typename P48, typename P49 > struct map50 : m_item< 50 , typename P49::first , typename P49::second , map49< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47,P48 > > { typedef map50 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map10.hpp000644 000765 000024 00000014210 12233035540 026233 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map10.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template<> struct m_at_impl<0> { template< typename Map > struct result_ { typedef typename Map::item0 type; }; }; template<> struct m_item_impl<1> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item0; }; }; template< typename P0 > struct map1 : m_item< 1 , typename P0::first , typename P0::second , map0< > > { typedef map1 type; }; template<> struct m_at_impl<1> { template< typename Map > struct result_ { typedef typename Map::item1 type; }; }; template<> struct m_item_impl<2> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item1; }; }; template< typename P0, typename P1 > struct map2 : m_item< 2 , typename P1::first , typename P1::second , map1 > { typedef map2 type; }; template<> struct m_at_impl<2> { template< typename Map > struct result_ { typedef typename Map::item2 type; }; }; template<> struct m_item_impl<3> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item2; }; }; template< typename P0, typename P1, typename P2 > struct map3 : m_item< 3 , typename P2::first , typename P2::second , map2< P0,P1 > > { typedef map3 type; }; template<> struct m_at_impl<3> { template< typename Map > struct result_ { typedef typename Map::item3 type; }; }; template<> struct m_item_impl<4> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item3; }; }; template< typename P0, typename P1, typename P2, typename P3 > struct map4 : m_item< 4 , typename P3::first , typename P3::second , map3< P0,P1,P2 > > { typedef map4 type; }; template<> struct m_at_impl<4> { template< typename Map > struct result_ { typedef typename Map::item4 type; }; }; template<> struct m_item_impl<5> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item4; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 > struct map5 : m_item< 5 , typename P4::first , typename P4::second , map4< P0,P1,P2,P3 > > { typedef map5 type; }; template<> struct m_at_impl<5> { template< typename Map > struct result_ { typedef typename Map::item5 type; }; }; template<> struct m_item_impl<6> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item5; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5 > struct map6 : m_item< 6 , typename P5::first , typename P5::second , map5< P0,P1,P2,P3,P4 > > { typedef map6 type; }; template<> struct m_at_impl<6> { template< typename Map > struct result_ { typedef typename Map::item6 type; }; }; template<> struct m_item_impl<7> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item6; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6 > struct map7 : m_item< 7 , typename P6::first , typename P6::second , map6< P0,P1,P2,P3,P4,P5 > > { typedef map7 type; }; template<> struct m_at_impl<7> { template< typename Map > struct result_ { typedef typename Map::item7 type; }; }; template<> struct m_item_impl<8> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item7; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7 > struct map8 : m_item< 8 , typename P7::first , typename P7::second , map7< P0,P1,P2,P3,P4,P5,P6 > > { typedef map8 type; }; template<> struct m_at_impl<8> { template< typename Map > struct result_ { typedef typename Map::item8 type; }; }; template<> struct m_item_impl<9> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item8; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8 > struct map9 : m_item< 9 , typename P8::first , typename P8::second , map8< P0,P1,P2,P3,P4,P5,P6,P7 > > { typedef map9 type; }; template<> struct m_at_impl<9> { template< typename Map > struct result_ { typedef typename Map::item9 type; }; }; template<> struct m_item_impl<10> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item9; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 > struct map10 : m_item< 10 , typename P9::first , typename P9::second , map9< P0,P1,P2,P3,P4,P5,P6,P7,P8 > > { typedef map10 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map20.hpp000644 000765 000024 00000017761 12233035540 026252 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map20.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template<> struct m_at_impl<10> { template< typename Map > struct result_ { typedef typename Map::item10 type; }; }; template<> struct m_item_impl<11> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item10; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10 > struct map11 : m_item< 11 , typename P10::first , typename P10::second , map10< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9 > > { typedef map11 type; }; template<> struct m_at_impl<11> { template< typename Map > struct result_ { typedef typename Map::item11 type; }; }; template<> struct m_item_impl<12> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item11; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11 > struct map12 : m_item< 12 , typename P11::first , typename P11::second , map11< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10 > > { typedef map12 type; }; template<> struct m_at_impl<12> { template< typename Map > struct result_ { typedef typename Map::item12 type; }; }; template<> struct m_item_impl<13> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item12; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12 > struct map13 : m_item< 13 , typename P12::first , typename P12::second , map12< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11 > > { typedef map13 type; }; template<> struct m_at_impl<13> { template< typename Map > struct result_ { typedef typename Map::item13 type; }; }; template<> struct m_item_impl<14> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item13; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13 > struct map14 : m_item< 14 , typename P13::first , typename P13::second , map13< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12 > > { typedef map14 type; }; template<> struct m_at_impl<14> { template< typename Map > struct result_ { typedef typename Map::item14 type; }; }; template<> struct m_item_impl<15> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item14; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 > struct map15 : m_item< 15 , typename P14::first , typename P14::second , map14< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13 > > { typedef map15 type; }; template<> struct m_at_impl<15> { template< typename Map > struct result_ { typedef typename Map::item15 type; }; }; template<> struct m_item_impl<16> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item15; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15 > struct map16 : m_item< 16 , typename P15::first , typename P15::second , map15< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14 > > { typedef map16 type; }; template<> struct m_at_impl<16> { template< typename Map > struct result_ { typedef typename Map::item16 type; }; }; template<> struct m_item_impl<17> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item16; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16 > struct map17 : m_item< 17 , typename P16::first , typename P16::second , map16< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15 > > { typedef map17 type; }; template<> struct m_at_impl<17> { template< typename Map > struct result_ { typedef typename Map::item17 type; }; }; template<> struct m_item_impl<18> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item17; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17 > struct map18 : m_item< 18 , typename P17::first , typename P17::second , map17< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16 > > { typedef map18 type; }; template<> struct m_at_impl<18> { template< typename Map > struct result_ { typedef typename Map::item18 type; }; }; template<> struct m_item_impl<19> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item18; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18 > struct map19 : m_item< 19 , typename P18::first , typename P18::second , map18< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17 > > { typedef map19 type; }; template<> struct m_at_impl<19> { template< typename Map > struct result_ { typedef typename Map::item19 type; }; }; template<> struct m_item_impl<20> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item19; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 > struct map20 : m_item< 20 , typename P19::first , typename P19::second , map19< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18 > > { typedef map20 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map30.hpp000644 000765 000024 00000023535 12233035540 026247 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map30.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template<> struct m_at_impl<20> { template< typename Map > struct result_ { typedef typename Map::item20 type; }; }; template<> struct m_item_impl<21> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item20; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20 > struct map21 : m_item< 21 , typename P20::first , typename P20::second , map20< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19 > > { typedef map21 type; }; template<> struct m_at_impl<21> { template< typename Map > struct result_ { typedef typename Map::item21 type; }; }; template<> struct m_item_impl<22> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item21; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21 > struct map22 : m_item< 22 , typename P21::first , typename P21::second , map21< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20 > > { typedef map22 type; }; template<> struct m_at_impl<22> { template< typename Map > struct result_ { typedef typename Map::item22 type; }; }; template<> struct m_item_impl<23> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item22; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22 > struct map23 : m_item< 23 , typename P22::first , typename P22::second , map22< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21 > > { typedef map23 type; }; template<> struct m_at_impl<23> { template< typename Map > struct result_ { typedef typename Map::item23 type; }; }; template<> struct m_item_impl<24> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item23; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23 > struct map24 : m_item< 24 , typename P23::first , typename P23::second , map23< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22 > > { typedef map24 type; }; template<> struct m_at_impl<24> { template< typename Map > struct result_ { typedef typename Map::item24 type; }; }; template<> struct m_item_impl<25> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item24; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 > struct map25 : m_item< 25 , typename P24::first , typename P24::second , map24< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23 > > { typedef map25 type; }; template<> struct m_at_impl<25> { template< typename Map > struct result_ { typedef typename Map::item25 type; }; }; template<> struct m_item_impl<26> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item25; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25 > struct map26 : m_item< 26 , typename P25::first , typename P25::second , map25< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24 > > { typedef map26 type; }; template<> struct m_at_impl<26> { template< typename Map > struct result_ { typedef typename Map::item26 type; }; }; template<> struct m_item_impl<27> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item26; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26 > struct map27 : m_item< 27 , typename P26::first , typename P26::second , map26< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25 > > { typedef map27 type; }; template<> struct m_at_impl<27> { template< typename Map > struct result_ { typedef typename Map::item27 type; }; }; template<> struct m_item_impl<28> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item27; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27 > struct map28 : m_item< 28 , typename P27::first , typename P27::second , map27< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26 > > { typedef map28 type; }; template<> struct m_at_impl<28> { template< typename Map > struct result_ { typedef typename Map::item28 type; }; }; template<> struct m_item_impl<29> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item28; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28 > struct map29 : m_item< 29 , typename P28::first , typename P28::second , map28< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27 > > { typedef map29 type; }; template<> struct m_at_impl<29> { template< typename Map > struct result_ { typedef typename Map::item29 type; }; }; template<> struct m_item_impl<30> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item29; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 > struct map30 : m_item< 30 , typename P29::first , typename P29::second , map29< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28 > > { typedef map30 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map40.hpp000644 000765 000024 00000027311 12233035540 026244 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map40.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template<> struct m_at_impl<30> { template< typename Map > struct result_ { typedef typename Map::item30 type; }; }; template<> struct m_item_impl<31> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item30; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30 > struct map31 : m_item< 31 , typename P30::first , typename P30::second , map30< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29 > > { typedef map31 type; }; template<> struct m_at_impl<31> { template< typename Map > struct result_ { typedef typename Map::item31 type; }; }; template<> struct m_item_impl<32> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item31; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31 > struct map32 : m_item< 32 , typename P31::first , typename P31::second , map31< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30 > > { typedef map32 type; }; template<> struct m_at_impl<32> { template< typename Map > struct result_ { typedef typename Map::item32 type; }; }; template<> struct m_item_impl<33> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item32; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32 > struct map33 : m_item< 33 , typename P32::first , typename P32::second , map32< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31 > > { typedef map33 type; }; template<> struct m_at_impl<33> { template< typename Map > struct result_ { typedef typename Map::item33 type; }; }; template<> struct m_item_impl<34> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item33; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33 > struct map34 : m_item< 34 , typename P33::first , typename P33::second , map33< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32 > > { typedef map34 type; }; template<> struct m_at_impl<34> { template< typename Map > struct result_ { typedef typename Map::item34 type; }; }; template<> struct m_item_impl<35> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item34; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 > struct map35 : m_item< 35 , typename P34::first , typename P34::second , map34< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33 > > { typedef map35 type; }; template<> struct m_at_impl<35> { template< typename Map > struct result_ { typedef typename Map::item35 type; }; }; template<> struct m_item_impl<36> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item35; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35 > struct map36 : m_item< 36 , typename P35::first , typename P35::second , map35< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34 > > { typedef map36 type; }; template<> struct m_at_impl<36> { template< typename Map > struct result_ { typedef typename Map::item36 type; }; }; template<> struct m_item_impl<37> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item36; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36 > struct map37 : m_item< 37 , typename P36::first , typename P36::second , map36< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35 > > { typedef map37 type; }; template<> struct m_at_impl<37> { template< typename Map > struct result_ { typedef typename Map::item37 type; }; }; template<> struct m_item_impl<38> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item37; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37 > struct map38 : m_item< 38 , typename P37::first , typename P37::second , map37< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36 > > { typedef map38 type; }; template<> struct m_at_impl<38> { template< typename Map > struct result_ { typedef typename Map::item38 type; }; }; template<> struct m_item_impl<39> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item38; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38 > struct map39 : m_item< 39 , typename P38::first , typename P38::second , map38< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37 > > { typedef map39 type; }; template<> struct m_at_impl<39> { template< typename Map > struct result_ { typedef typename Map::item39 type; }; }; template<> struct m_item_impl<40> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item39; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 > struct map40 : m_item< 40 , typename P39::first , typename P39::second , map39< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38 > > { typedef map40 type; }; }} passenger-4.0.37/ext/boost/mpl/map/aux_/preprocessed/no_ctps/map50.hpp000644 000765 000024 00000033065 12233035540 026250 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map/map50.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template<> struct m_at_impl<40> { template< typename Map > struct result_ { typedef typename Map::item40 type; }; }; template<> struct m_item_impl<41> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item40; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40 > struct map41 : m_item< 41 , typename P40::first , typename P40::second , map40< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39 > > { typedef map41 type; }; template<> struct m_at_impl<41> { template< typename Map > struct result_ { typedef typename Map::item41 type; }; }; template<> struct m_item_impl<42> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item41; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41 > struct map42 : m_item< 42 , typename P41::first , typename P41::second , map41< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40 > > { typedef map42 type; }; template<> struct m_at_impl<42> { template< typename Map > struct result_ { typedef typename Map::item42 type; }; }; template<> struct m_item_impl<43> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item42; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42 > struct map43 : m_item< 43 , typename P42::first , typename P42::second , map42< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41 > > { typedef map43 type; }; template<> struct m_at_impl<43> { template< typename Map > struct result_ { typedef typename Map::item43 type; }; }; template<> struct m_item_impl<44> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item43; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43 > struct map44 : m_item< 44 , typename P43::first , typename P43::second , map43< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42 > > { typedef map44 type; }; template<> struct m_at_impl<44> { template< typename Map > struct result_ { typedef typename Map::item44 type; }; }; template<> struct m_item_impl<45> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item44; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 > struct map45 : m_item< 45 , typename P44::first , typename P44::second , map44< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43 > > { typedef map45 type; }; template<> struct m_at_impl<45> { template< typename Map > struct result_ { typedef typename Map::item45 type; }; }; template<> struct m_item_impl<46> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item45; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45 > struct map46 : m_item< 46 , typename P45::first , typename P45::second , map45< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44 > > { typedef map46 type; }; template<> struct m_at_impl<46> { template< typename Map > struct result_ { typedef typename Map::item46 type; }; }; template<> struct m_item_impl<47> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item46; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45, typename P46 > struct map47 : m_item< 47 , typename P46::first , typename P46::second , map46< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45 > > { typedef map47 type; }; template<> struct m_at_impl<47> { template< typename Map > struct result_ { typedef typename Map::item47 type; }; }; template<> struct m_item_impl<48> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item47; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45, typename P46, typename P47 > struct map48 : m_item< 48 , typename P47::first , typename P47::second , map47< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46 > > { typedef map48 type; }; template<> struct m_at_impl<48> { template< typename Map > struct result_ { typedef typename Map::item48 type; }; }; template<> struct m_item_impl<49> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item48; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45, typename P46, typename P47, typename P48 > struct map49 : m_item< 49 , typename P48::first , typename P48::second , map48< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47 > > { typedef map49 type; }; template<> struct m_at_impl<49> { template< typename Map > struct result_ { typedef typename Map::item49 type; }; }; template<> struct m_item_impl<50> { template< typename Key, typename T, typename Base > struct result_ : m_item_< Key,T,Base > { typedef pair< Key,T > item49; }; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 , typename P10, typename P11, typename P12, typename P13, typename P14 , typename P15, typename P16, typename P17, typename P18, typename P19 , typename P20, typename P21, typename P22, typename P23, typename P24 , typename P25, typename P26, typename P27, typename P28, typename P29 , typename P30, typename P31, typename P32, typename P33, typename P34 , typename P35, typename P36, typename P37, typename P38, typename P39 , typename P40, typename P41, typename P42, typename P43, typename P44 , typename P45, typename P46, typename P47, typename P48, typename P49 > struct map50 : m_item< 50 , typename P49::first , typename P49::second , map49< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28,P29,P30,P31,P32,P33,P34,P35,P36,P37,P38,P39,P40,P41,P42,P43,P44,P45,P46,P47,P48 > > { typedef map50 type; }; }} passenger-4.0.37/ext/boost/mpl/list/aux_/000755 000765 000024 00000000000 12233035540 020641 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/list/list0.hpp000644 000765 000024 00000002227 12233035540 021454 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_LIST0_HPP_INCLUDED #define BOOST_MPL_LIST_LIST0_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list0.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename Dummy = na > struct list0; template<> struct list0 : l_end { typedef l_end type; }; }} #endif // BOOST_MPL_LIST_LIST0_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/list0_c.hpp000644 000765 000024 00000001362 12233035540 021755 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list0_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template< typename T > struct list0_c : l_end { typedef l_end type; typedef T value_type; }; }} #endif // BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/list10.hpp000644 000765 000024 00000002204 12233035540 021530 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_LIST10_HPP_INCLUDED #define BOOST_MPL_LIST_LIST10_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list10.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list10.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, 10, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST10_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/list10_c.hpp000644 000765 000024 00000002217 12233035540 022036 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list10_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list10_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, 10, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/list20.hpp000644 000765 000024 00000002203 12233035540 021530 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_LIST20_HPP_INCLUDED #define BOOST_MPL_LIST_LIST20_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list20.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list20.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(11, 20, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST20_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/list20_c.hpp000644 000765 000024 00000002221 12233035540 022032 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list20_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list20_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(11, 20, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/list30.hpp000644 000765 000024 00000002203 12233035540 021531 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_LIST30_HPP_INCLUDED #define BOOST_MPL_LIST_LIST30_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list30.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list30.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(21, 30, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST30_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/list30_c.hpp000644 000765 000024 00000002221 12233035540 022033 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list30_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list30_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(21, 30, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/list40.hpp000644 000765 000024 00000002203 12233035540 021532 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_LIST40_HPP_INCLUDED #define BOOST_MPL_LIST_LIST40_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list40.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list40.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(31, 40, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST40_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/list40_c.hpp000644 000765 000024 00000002221 12233035540 022034 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list40_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list40_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(31, 40, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/list50.hpp000644 000765 000024 00000002203 12233035540 021533 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_LIST50_HPP_INCLUDED #define BOOST_MPL_LIST_LIST50_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list50.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list50.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(41, 50, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST50_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/list50_c.hpp000644 000765 000024 00000002221 12233035540 022035 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list50_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list50_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(41, 50, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/begin_end.hpp000644 000765 000024 00000002035 12233035540 023264 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: begin_end.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template<> struct begin_impl< aux::list_tag > { template< typename List > struct apply { typedef l_iter type; }; }; template<> struct end_impl< aux::list_tag > { template< typename > struct apply { typedef l_iter type; }; }; }} #endif // BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/clear.hpp000644 000765 000024 00000001476 12233035540 022450 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: clear.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct clear_impl< aux::list_tag > { template< typename List > struct apply { typedef l_end type; }; }; }} #endif // BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/empty.hpp000644 000765 000024 00000001473 12233035540 022515 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct empty_impl< aux::list_tag > { template< typename List > struct apply : not_ { }; }; }} #endif // BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/front.hpp000644 000765 000024 00000001444 12233035540 022505 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template<> struct front_impl< aux::list_tag > { template< typename List > struct apply { typedef typename List::item type; }; }; }} #endif // BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/include_preprocessed.hpp000644 000765 000024 00000002056 12233035540 025556 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! #include #include #include # define AUX778076_HEADER \ aux_/preprocessed/plain/BOOST_MPL_PREPROCESSED_HEADER \ /**/ #if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) # define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER) # include AUX778076_INCLUDE_STRING # undef AUX778076_INCLUDE_STRING #else # include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER) #endif # undef AUX778076_HEADER #undef BOOST_MPL_PREPROCESSED_HEADER passenger-4.0.37/ext/boost/mpl/list/aux_/item.hpp000644 000765 000024 00000002373 12233035540 022315 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: item.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template< typename Size , typename T , typename Next > struct l_item { // agurt, 17/jul/03: to facilitate the deficient 'is_sequence' implementation #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) typedef int begin; #endif typedef aux::list_tag tag; typedef l_item type; typedef Size size; typedef T item; typedef Next next; }; struct l_end { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) typedef int begin; #endif typedef aux::list_tag tag; typedef l_end type; typedef long_<0> size; }; }} #endif // BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/iterator.hpp000644 000765 000024 00000003377 12233035540 023215 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Node > struct l_iter { typedef aux::l_iter_tag tag; typedef forward_iterator_tag category; }; template< typename Node > struct deref< l_iter > { typedef typename Node::item type; }; template< typename Node > struct next< l_iter > { typedef l_iter< typename Node::next > type; }; #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template< typename Node > struct l_iter { typedef aux::l_iter_tag tag; typedef forward_iterator_tag category; typedef typename Node::item type; typedef l_iter< typename mpl::next::type > next; }; #endif template<> struct l_iter { typedef aux::l_iter_tag tag; typedef forward_iterator_tag category; #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) typedef na type; typedef l_iter next; #endif }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, l_iter) }} #endif // BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/numbered.hpp000644 000765 000024 00000002606 12233035540 023157 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Peter Dimov 2000-2002 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: numbered.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if defined(BOOST_PP_IS_ITERATING) #include #include #include #include #define i BOOST_PP_FRAME_ITERATION(1) #if i == 1 template< BOOST_PP_ENUM_PARAMS(i, typename T) > struct list1 : l_item< long_<1> , T0 , l_end > { typedef list1 type; }; #else # define MPL_AUX_LIST_TAIL(list, i, T) \ BOOST_PP_CAT(list,BOOST_PP_DEC(i))< \ BOOST_PP_ENUM_SHIFTED_PARAMS(i, T) \ > \ /**/ template< BOOST_PP_ENUM_PARAMS(i, typename T) > struct BOOST_PP_CAT(list,i) : l_item< long_ , T0 , MPL_AUX_LIST_TAIL(list,i,T) > { typedef BOOST_PP_CAT(list,i) type; }; # undef MPL_AUX_LIST_TAIL #endif // i == 1 #undef i #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/list/aux_/numbered_c.hpp000644 000765 000024 00000003010 12233035540 023447 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: numbered_c.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if defined(BOOST_PP_IS_ITERATING) #include #include #include #include #define i BOOST_PP_FRAME_ITERATION(1) #if i == 1 template< typename T , BOOST_PP_ENUM_PARAMS(i, T C) > struct list1_c : l_item< long_<1> , integral_c , l_end > { typedef list1_c type; typedef T value_type; }; #else # define MPL_AUX_LIST_C_TAIL(list, i, C) \ BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_PP_DEC(i)),_c) \ /**/ template< typename T , BOOST_PP_ENUM_PARAMS(i, T C) > struct BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) : l_item< long_ , integral_c , MPL_AUX_LIST_C_TAIL(list,i,C) > { typedef BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) type; typedef T value_type; }; # undef MPL_AUX_LIST_C_TAIL #endif // i == 1 #undef i #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/list/aux_/O1_size.hpp000644 000765 000024 00000001433 12233035540 022664 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template<> struct O1_size_impl< aux::list_tag > { template< typename List > struct apply : List::size { }; }; }} #endif // BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/pop_front.hpp000644 000765 000024 00000001553 12233035540 023364 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: pop_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct pop_front_impl< aux::list_tag > { template< typename List > struct apply { typedef typename mpl::next::type type; }; }; }} #endif // BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/preprocessed/000755 000765 000024 00000000000 12233035540 023337 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/list/aux_/push_back.hpp000644 000765 000024 00000001571 12233035540 023315 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: push_back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template< typename Tag > struct has_push_back_impl; template<> struct has_push_back_impl< aux::list_tag > { template< typename Seq > struct apply : false_ { }; }; }} #endif // BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/push_front.hpp000644 000765 000024 00000001777 12233035540 023555 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template<> struct push_front_impl< aux::list_tag > { template< typename List, typename T > struct apply { typedef l_item< typename next::type , T , typename List::type > type; }; }; }} #endif // BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/size.hpp000644 000765 000024 00000001411 12233035540 022321 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template<> struct size_impl< aux::list_tag > { template< typename List > struct apply : List::size { }; }; }} #endif // BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/tag.hpp000644 000765 000024 00000001161 12233035540 022124 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { namespace aux { struct list_tag; struct l_iter_tag; }}} #endif // BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/list/aux_/preprocessed/plain/000755 000765 000024 00000000000 12233035540 024442 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/list/aux_/preprocessed/plain/list10.hpp000644 000765 000024 00000005047 12233035540 026275 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list10.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 > struct list1 : l_item< long_<1> , T0 , l_end > { typedef list1 type; }; template< typename T0, typename T1 > struct list2 : l_item< long_<2> , T0 , list1 > { typedef list2 type; }; template< typename T0, typename T1, typename T2 > struct list3 : l_item< long_<3> , T0 , list2< T1,T2 > > { typedef list3 type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list4 : l_item< long_<4> , T0 , list3< T1,T2,T3 > > { typedef list4 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list5 : l_item< long_<5> , T0 , list4< T1,T2,T3,T4 > > { typedef list5 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list6 : l_item< long_<6> , T0 , list5< T1,T2,T3,T4,T5 > > { typedef list6 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list7 : l_item< long_<7> , T0 , list6< T1,T2,T3,T4,T5,T6 > > { typedef list7 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list8 : l_item< long_<8> , T0 , list7< T1,T2,T3,T4,T5,T6,T7 > > { typedef list8 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list9 : l_item< long_<9> , T0 , list8< T1,T2,T3,T4,T5,T6,T7,T8 > > { typedef list9 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list10 : l_item< long_<10> , T0 , list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 > > { typedef list10 type; }; }} passenger-4.0.37/ext/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp000644 000765 000024 00000005453 12233035540 026600 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list10_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0 > struct list1_c : l_item< long_<1> , integral_c< T,C0 > , l_end > { typedef list1_c type; typedef T value_type; }; template< typename T , T C0, T C1 > struct list2_c : l_item< long_<2> , integral_c< T,C0 > , list1_c< T,C1 > > { typedef list2_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2 > struct list3_c : l_item< long_<3> , integral_c< T,C0 > , list2_c< T,C1,C2 > > { typedef list3_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3 > struct list4_c : l_item< long_<4> , integral_c< T,C0 > , list3_c< T,C1,C2,C3 > > { typedef list4_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4 > struct list5_c : l_item< long_<5> , integral_c< T,C0 > , list4_c< T,C1,C2,C3,C4 > > { typedef list5_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5 > struct list6_c : l_item< long_<6> , integral_c< T,C0 > , list5_c< T,C1,C2,C3,C4,C5 > > { typedef list6_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6 > struct list7_c : l_item< long_<7> , integral_c< T,C0 > , list6_c< T,C1,C2,C3,C4,C5,C6 > > { typedef list7_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7 > struct list8_c : l_item< long_<8> , integral_c< T,C0 > , list7_c< T,C1,C2,C3,C4,C5,C6,C7 > > { typedef list8_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8 > struct list9_c : l_item< long_<9> , integral_c< T,C0 > , list8_c< T,C1,C2,C3,C4,C5,C6,C7,C8 > > { typedef list9_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9 > struct list10_c : l_item< long_<10> , integral_c< T,C0 > , list9_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9 > > { typedef list10_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/list/aux_/preprocessed/plain/list20.hpp000644 000765 000024 00000010543 12233035540 026273 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list20.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list11 : l_item< long_<11> , T0 , list10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > > { typedef list11 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list12 : l_item< long_<12> , T0 , list11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > > { typedef list12 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list13 : l_item< long_<13> , T0 , list12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > > { typedef list13 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list14 : l_item< long_<14> , T0 , list13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > > { typedef list14 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list15 : l_item< long_<15> , T0 , list14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > > { typedef list15 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list16 : l_item< long_<16> , T0 , list15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > > { typedef list16 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list17 : l_item< long_<17> , T0 , list16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > > { typedef list17 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list18 : l_item< long_<18> , T0 , list17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > > { typedef list18 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list19 : l_item< long_<19> , T0 , list18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > > { typedef list19 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list20 : l_item< long_<20> , T0 , list19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 > > { typedef list20 type; }; }} passenger-4.0.37/ext/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp000644 000765 000024 00000007566 12233035540 026610 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list20_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 > struct list11_c : l_item< long_<11> , integral_c< T,C0 > , list10_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > > { typedef list11_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11 > struct list12_c : l_item< long_<12> , integral_c< T,C0 > , list11_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > > { typedef list12_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12 > struct list13_c : l_item< long_<13> , integral_c< T,C0 > , list12_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > > { typedef list13_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13 > struct list14_c : l_item< long_<14> , integral_c< T,C0 > , list13_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 > > { typedef list14_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14 > struct list15_c : l_item< long_<15> , integral_c< T,C0 > , list14_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 > > { typedef list15_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15 > struct list16_c : l_item< long_<16> , integral_c< T,C0 > , list15_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 > > { typedef list16_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16 > struct list17_c : l_item< long_<17> , integral_c< T,C0 > , list16_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 > > { typedef list17_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17 > struct list18_c : l_item< long_<18> , integral_c< T,C0 > , list17_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 > > { typedef list18_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18 > struct list19_c : l_item< long_<19> , integral_c< T,C0 > , list18_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 > > { typedef list19_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19 > struct list20_c : l_item< long_<20> , integral_c< T,C0 > , list19_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 > > { typedef list20_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/list/aux_/preprocessed/plain/list30.hpp000644 000765 000024 00000014317 12233035540 026277 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list30.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20 > struct list21 : l_item< long_<21> , T0 , list20< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 > > { typedef list21 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21 > struct list22 : l_item< long_<22> , T0 , list21< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 > > { typedef list22 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22 > struct list23 : l_item< long_<23> , T0 , list22< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 > > { typedef list23 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23 > struct list24 : l_item< long_<24> , T0 , list23< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 > > { typedef list24 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 > struct list25 : l_item< long_<25> , T0 , list24< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 > > { typedef list25 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25 > struct list26 : l_item< long_<26> , T0 , list25< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 > > { typedef list26 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26 > struct list27 : l_item< long_<27> , T0 , list26< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 > > { typedef list27 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27 > struct list28 : l_item< long_<28> , T0 , list27< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 > > { typedef list28 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28 > struct list29 : l_item< long_<29> , T0 , list28< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 > > { typedef list29 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 > struct list30 : l_item< long_<30> , T0 , list29< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 > > { typedef list30 type; }; }} passenger-4.0.37/ext/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp000644 000765 000024 00000011764 12233035540 026604 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list30_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 > struct list21_c : l_item< long_<21> , integral_c< T,C0 > , list20_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 > > { typedef list21_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21 > struct list22_c : l_item< long_<22> , integral_c< T,C0 > , list21_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 > > { typedef list22_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22 > struct list23_c : l_item< long_<23> , integral_c< T,C0 > , list22_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 > > { typedef list23_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23 > struct list24_c : l_item< long_<24> , integral_c< T,C0 > , list23_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 > > { typedef list24_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24 > struct list25_c : l_item< long_<25> , integral_c< T,C0 > , list24_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 > > { typedef list25_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25 > struct list26_c : l_item< long_<26> , integral_c< T,C0 > , list25_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 > > { typedef list26_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26 > struct list27_c : l_item< long_<27> , integral_c< T,C0 > , list26_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 > > { typedef list27_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27 > struct list28_c : l_item< long_<28> , integral_c< T,C0 > , list27_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 > > { typedef list28_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28 > struct list29_c : l_item< long_<29> , integral_c< T,C0 > , list28_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 > > { typedef list29_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29 > struct list30_c : l_item< long_<30> , integral_c< T,C0 > , list29_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 > > { typedef list30_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/list/aux_/preprocessed/plain/list40.hpp000644 000765 000024 00000020073 12233035540 026274 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list40.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30 > struct list31 : l_item< long_<31> , T0 , list30< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 > > { typedef list31 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31 > struct list32 : l_item< long_<32> , T0 , list31< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 > > { typedef list32 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32 > struct list33 : l_item< long_<33> , T0 , list32< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 > > { typedef list33 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33 > struct list34 : l_item< long_<34> , T0 , list33< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 > > { typedef list34 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 > struct list35 : l_item< long_<35> , T0 , list34< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 > > { typedef list35 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35 > struct list36 : l_item< long_<36> , T0 , list35< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 > > { typedef list36 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36 > struct list37 : l_item< long_<37> , T0 , list36< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 > > { typedef list37 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37 > struct list38 : l_item< long_<38> , T0 , list37< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 > > { typedef list38 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38 > struct list39 : l_item< long_<39> , T0 , list38< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 > > { typedef list39 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 > struct list40 : l_item< long_<40> , T0 , list39< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 > > { typedef list40 type; }; }} passenger-4.0.37/ext/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp000644 000765 000024 00000014162 12233035540 026600 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list40_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 > struct list31_c : l_item< long_<31> , integral_c< T,C0 > , list30_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 > > { typedef list31_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31 > struct list32_c : l_item< long_<32> , integral_c< T,C0 > , list31_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 > > { typedef list32_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32 > struct list33_c : l_item< long_<33> , integral_c< T,C0 > , list32_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 > > { typedef list33_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33 > struct list34_c : l_item< long_<34> , integral_c< T,C0 > , list33_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 > > { typedef list34_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34 > struct list35_c : l_item< long_<35> , integral_c< T,C0 > , list34_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 > > { typedef list35_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35 > struct list36_c : l_item< long_<36> , integral_c< T,C0 > , list35_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 > > { typedef list36_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36 > struct list37_c : l_item< long_<37> , integral_c< T,C0 > , list36_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 > > { typedef list37_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37 > struct list38_c : l_item< long_<38> , integral_c< T,C0 > , list37_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 > > { typedef list38_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38 > struct list39_c : l_item< long_<39> , integral_c< T,C0 > , list38_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 > > { typedef list39_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39 > struct list40_c : l_item< long_<40> , integral_c< T,C0 > , list39_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 > > { typedef list40_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/list/aux_/preprocessed/plain/list50.hpp000644 000765 000024 00000023647 12233035540 026307 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list50.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40 > struct list41 : l_item< long_<41> , T0 , list40< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 > > { typedef list41 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41 > struct list42 : l_item< long_<42> , T0 , list41< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 > > { typedef list42 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42 > struct list43 : l_item< long_<43> , T0 , list42< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 > > { typedef list43 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43 > struct list44 : l_item< long_<44> , T0 , list43< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 > > { typedef list44 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 > struct list45 : l_item< long_<45> , T0 , list44< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 > > { typedef list45 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45 > struct list46 : l_item< long_<46> , T0 , list45< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 > > { typedef list46 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46 > struct list47 : l_item< long_<47> , T0 , list46< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 > > { typedef list47 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47 > struct list48 : l_item< long_<48> , T0 , list47< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 > > { typedef list48 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47, typename T48 > struct list49 : l_item< long_<49> , T0 , list48< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 > > { typedef list49 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47, typename T48, typename T49 > struct list50 : l_item< long_<50> , T0 , list49< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49 > > { typedef list50 type; }; }} passenger-4.0.37/ext/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp000644 000765 000024 00000016360 12233035540 026603 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list50_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 > struct list41_c : l_item< long_<41> , integral_c< T,C0 > , list40_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 > > { typedef list41_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41 > struct list42_c : l_item< long_<42> , integral_c< T,C0 > , list41_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 > > { typedef list42_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42 > struct list43_c : l_item< long_<43> , integral_c< T,C0 > , list42_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 > > { typedef list43_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43 > struct list44_c : l_item< long_<44> , integral_c< T,C0 > , list43_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 > > { typedef list44_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44 > struct list45_c : l_item< long_<45> , integral_c< T,C0 > , list44_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 > > { typedef list45_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45 > struct list46_c : l_item< long_<46> , integral_c< T,C0 > , list45_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 > > { typedef list46_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46 > struct list47_c : l_item< long_<47> , integral_c< T,C0 > , list46_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 > > { typedef list47_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47 > struct list48_c : l_item< long_<48> , integral_c< T,C0 > , list47_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 > > { typedef list48_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48 > struct list49_c : l_item< long_<49> , integral_c< T,C0 > , list48_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 > > { typedef list49_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49 > struct list50_c : l_item< long_<50> , integral_c< T,C0 > , list49_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48,C49 > > { typedef list50_c type; typedef T value_type; }; }} passenger-4.0.37/ext/boost/mpl/limits/arity.hpp000644 000765 000024 00000001177 12233035540 022102 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED #define BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) # define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 5 #endif #endif // BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/limits/list.hpp000644 000765 000024 00000001152 12233035540 021716 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIMITS_LIST_HPP_INCLUDED #define BOOST_MPL_LIMITS_LIST_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: list.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_LIMIT_LIST_SIZE) # define BOOST_MPL_LIMIT_LIST_SIZE 20 #endif #endif // BOOST_MPL_LIMITS_LIST_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/limits/map.hpp000644 000765 000024 00000001144 12233035540 021521 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIMITS_MAP_HPP_INCLUDED #define BOOST_MPL_LIMITS_MAP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: map.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_LIMIT_MAP_SIZE) # define BOOST_MPL_LIMIT_MAP_SIZE 20 #endif #endif // BOOST_MPL_LIMITS_MAP_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/limits/set.hpp000644 000765 000024 00000001144 12233035540 021537 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIMITS_SET_HPP_INCLUDED #define BOOST_MPL_LIMITS_SET_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: set.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_LIMIT_SET_SIZE) # define BOOST_MPL_LIMIT_SET_SIZE 20 #endif #endif // BOOST_MPL_LIMITS_SET_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/limits/string.hpp000644 000765 000024 00000001157 12233035540 022256 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIMITS_STRING_HPP_INCLUDED #define BOOST_MPL_LIMITS_STRING_HPP_INCLUDED // Copyright Eric Niebler 2009 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: string.hpp 49239 2009-04-01 09:10:26Z eric_niebler $ // $Date: 2009-04-01 02:10:26 -0700 (Wed, 1 Apr 2009) $ // $Revision: 49239 $ #if !defined(BOOST_MPL_LIMIT_STRING_SIZE) # define BOOST_MPL_LIMIT_STRING_SIZE 32 #endif #endif // BOOST_MPL_LIMITS_STRING_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/limits/unrolling.hpp000644 000765 000024 00000001175 12233035540 022761 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED #define BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: unrolling.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_LIMIT_UNROLLING) # define BOOST_MPL_LIMIT_UNROLLING 4 #endif #endif // BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/limits/vector.hpp000644 000765 000024 00000001166 12233035540 022252 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_LIMITS_VECTOR_HPP_INCLUDED #define BOOST_MPL_LIMITS_VECTOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: vector.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_LIMIT_VECTOR_SIZE) # define BOOST_MPL_LIMIT_VECTOR_SIZE 20 #endif #endif // BOOST_MPL_LIMITS_VECTOR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/adl_barrier.hpp000644 000765 000024 00000003205 12233035540 022645 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED #define BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: adl_barrier.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) # define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE mpl_ # define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace mpl_ { # define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE } # define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) \ namespace boost { namespace mpl { \ using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ } } \ /**/ #if !defined(BOOST_MPL_PREPROCESSING_MODE) namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE { namespace aux {} } namespace boost { namespace mpl { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE; namespace aux { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux; } }} #endif #else // BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE # define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE boost::mpl # define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace boost { namespace mpl { # define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE }} # define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) /**/ #endif #endif // BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/advance_backward.hpp000644 000765 000024 00000006716 12233035540 023650 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED #define BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: advance_backward.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER advance_backward.hpp # include #else # include # include # include # include # include # include namespace boost { namespace mpl { namespace aux { // forward declaration template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_backward; # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING )> , chunk_result_ >::type type; }; }; }}} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX778076_ADVANCE_BACKWARD_HPP_INCLUDED ///// iteration, depth == 1 // For gcc 4.4 compatability, we must include the // BOOST_PP_ITERATION_DEPTH test inside an #else clause. #else // BOOST_PP_IS_ITERATING #if BOOST_PP_ITERATION_DEPTH() == 1 #define i_ BOOST_PP_FRAME_ITERATION(1) template<> struct advance_backward< BOOST_PP_FRAME_ITERATION(1) > { template< typename Iterator > struct apply { typedef Iterator iter0; #if i_ > 0 # define BOOST_PP_ITERATION_PARAMS_2 \ (3,(1, BOOST_PP_FRAME_ITERATION(1), )) # include BOOST_PP_ITERATE() #endif typedef BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(1)) type; }; #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) /// ETI workaround template<> struct apply { typedef int type; }; #endif }; #undef i_ ///// iteration, depth == 2 #elif BOOST_PP_ITERATION_DEPTH() == 2 # define AUX778076_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2))) # define AUX778076_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2)) typedef typename prior::type AUX778076_ITER_1; # undef AUX778076_ITER_1 # undef AUX778076_ITER_0 #endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/aux_/advance_forward.hpp000644 000765 000024 00000006574 12233035540 023540 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED #define BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: advance_forward.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER advance_forward.hpp # include #else # include # include # include # include # include # include namespace boost { namespace mpl { namespace aux { // forward declaration template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_forward; # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING )> , chunk_result_ >::type type; }; }; }}} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED ///// iteration, depth == 1 // For gcc 4.4 compatability, we must include the // BOOST_PP_ITERATION_DEPTH test inside an #else clause. #else // BOOST_PP_IS_ITERATING #if BOOST_PP_ITERATION_DEPTH() == 1 #define i_ BOOST_PP_FRAME_ITERATION(1) template<> struct advance_forward< BOOST_PP_FRAME_ITERATION(1) > { template< typename Iterator > struct apply { typedef Iterator iter0; #if i_ > 0 # define BOOST_PP_ITERATION_PARAMS_2 \ (3,(1, i_, )) # include BOOST_PP_ITERATE() #endif typedef BOOST_PP_CAT(iter,i_) type; }; #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) /// ETI workaround template<> struct apply { typedef int type; }; #endif }; #undef i_ ///// iteration, depth == 2 #elif BOOST_PP_ITERATION_DEPTH() == 2 # define AUX778076_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2))) # define AUX778076_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2)) typedef typename next::type AUX778076_ITER_1; # undef AUX778076_ITER_1 # undef AUX778076_ITER_0 #endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/aux_/apply_1st.hpp000644 000765 000024 00000001507 12233035540 022316 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_APPLY_1ST_HPP_INCLUDED #define BOOST_MPL_AUX_APPLY_1ST_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: apply_1st.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { namespace aux { struct apply_1st { template< typename Pair, typename T > struct apply : apply2< typename Pair::first , typename Pair::second , T > { }; }; }}} #endif // BOOST_MPL_AUX_APPLY_1ST_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/arg_typedef.hpp000644 000765 000024 00000001566 12233035540 022700 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED #define BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: arg_typedef.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) typedef T name; #else # define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) /**/ #endif #endif // BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/arithmetic_op.hpp000644 000765 000024 00000004771 12233035540 023237 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: arithmetic_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include #endif #if !defined(AUX778076_OP_PREFIX) # define AUX778076_OP_PREFIX AUX778076_OP_NAME #endif #include #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp # include #else # include # include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) namespace aux { template< typename T, T n1, T n2 > struct BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd) { BOOST_STATIC_CONSTANT(T, value = (n1 AUX778076_OP_TOKEN n2)); typedef integral_c type; }; } #endif template<> struct AUX778076_OP_IMPL_NAME { template< typename N1, typename N2 > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > #else : aux::BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type #endif { }; }; }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #undef AUX778076_OP_TAG_NAME #undef AUX778076_OP_IMPL_NAME #undef AUX778076_OP_ARITY #undef AUX778076_OP_PREFIX #undef AUX778076_OP_NAME #undef AUX778076_OP_TOKEN passenger-4.0.37/ext/boost/mpl/aux_/arity.hpp000644 000765 000024 00000002257 12233035540 021535 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_ARITY_HPP_INCLUDED #define BOOST_MPL_AUX_ARITY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: arity.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # include # include namespace boost { namespace mpl { namespace aux { // agurt, 15/mar/02: it's possible to implement the template so that it will // "just work" and do not require any specialization, but not on the compilers // that require the arity workaround in the first place template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity { BOOST_STATIC_CONSTANT(int, value = N); }; }}} #endif // BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES #endif // BOOST_MPL_AUX_ARITY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/arity_spec.hpp000644 000765 000024 00000003625 12233035540 022547 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED #define BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: arity_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) \ namespace aux { \ template< BOOST_MPL_AUX_NTTP_DECL(int, N), BOOST_MPL_PP_PARAMS(i,type T) > \ struct arity< \ name< BOOST_MPL_PP_PARAMS(i,T) > \ , N \ > \ { \ BOOST_STATIC_CONSTANT(int \ , value = BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ ); \ }; \ } \ /**/ #else # define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) /**/ #endif # define BOOST_MPL_AUX_ARITY_SPEC(i,name) \ BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,typename,name) \ /**/ #if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ && !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) \ namespace aux { \ template< BOOST_MPL_PP_PARAMS(i,typename T) > \ struct template_arity< name > \ : int_ \ { \ }; \ } \ /**/ #else # define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/ #endif #endif // BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/at_impl.hpp000644 000765 000024 00000002255 12233035540 022030 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: at_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { // default implementation; conrete sequences might override it by // specializing either the 'at_impl' or the primary 'at' template template< typename Tag > struct at_impl { template< typename Sequence, typename N > struct apply { typedef typename advance< typename begin::type , N >::type iter_; typedef typename deref::type type; }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, at_impl) }} #endif // BOOST_MPL_AUX_AT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/back_impl.hpp000644 000765 000024 00000002315 12233035540 022321 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_BACK_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_BACK_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: back_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { // default implementation, requires at least bi-directional iterators; // conrete sequences might override it by specializing either the // 'back_impl' or the primary 'back' template template< typename Tag > struct back_impl { template< typename Sequence > struct apply { typedef typename end::type end_; typedef typename prior::type last_; typedef typename deref::type type; }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, back_impl) }} #endif // BOOST_MPL_AUX_BACK_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/basic_bind.hpp000644 000765 000024 00000001223 12233035540 022452 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_BASIC_BIND_HPP_INCLUDED #define BOOST_MPL_AUX_BASIC_BIND_HPP_INCLUDED // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: basic_bind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT #include #endif // BOOST_MPL_AUX_BASIC_BIND_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/begin_end_impl.hpp000644 000765 000024 00000005304 12233035540 023334 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: begin_end_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Sequence > struct begin_type { typedef typename Sequence::begin type; }; template< typename Sequence > struct end_type { typedef typename Sequence::end type; }; } // default implementation; conrete sequences might override it by // specializing either the 'begin_impl/end_impl' or the primary // 'begin/end' templates template< typename Tag > struct begin_impl { template< typename Sequence > struct apply { typedef typename eval_if, aux::begin_type, void_>::type type; }; }; template< typename Tag > struct end_impl { template< typename Sequence > struct apply { typedef typename eval_if, aux::end_type, void_>::type type; }; }; // specialize 'begin_trait/end_trait' for two pre-defined tags # define AUX778076_IMPL_SPEC(name, tag, result) \ template<> \ struct name##_impl \ { \ template< typename Sequence > struct apply \ { \ typedef result type; \ }; \ }; \ /**/ // a sequence with nested 'begin/end' typedefs; just query them AUX778076_IMPL_SPEC(begin, nested_begin_end_tag, typename Sequence::begin) AUX778076_IMPL_SPEC(end, nested_begin_end_tag, typename Sequence::end) // if a type 'T' does not contain 'begin/end' or 'tag' members // and doesn't specialize either 'begin/end' or 'begin_impl/end_impl' // templates, then we end up here AUX778076_IMPL_SPEC(begin, non_sequence_tag, void_) AUX778076_IMPL_SPEC(end, non_sequence_tag, void_) AUX778076_IMPL_SPEC(begin, na, void_) AUX778076_IMPL_SPEC(end, na, void_) # undef AUX778076_IMPL_SPEC BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(1,begin_impl) BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(1,end_impl) }} #endif // BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/clear_impl.hpp000644 000765 000024 00000001650 12233035540 022510 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: clear_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { // no default implementation; the definition is needed to make MSVC happy template< typename Tag > struct clear_impl { template< typename Sequence > struct apply; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, clear_impl) }} #endif // BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/common_name_wknd.hpp000644 000765 000024 00000001734 12233035540 023717 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED #define BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: common_name_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if BOOST_WORKAROUND(__BORLANDC__, < 0x561) // agurt, 12/nov/02: to suppress the bogus "Cannot have both a template class // and function named 'xxx'" diagnostic # define BOOST_MPL_AUX_COMMON_NAME_WKND(name) \ namespace name_##wknd { \ template< typename > void name(); \ } \ /**/ #else # define BOOST_MPL_AUX_COMMON_NAME_WKND(name) /**/ #endif // __BORLANDC__ #endif // BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/comparison_op.hpp000644 000765 000024 00000004331 12233035540 023250 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: comparison_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #if !defined(AUX778076_OP_PREFIX) # define AUX778076_OP_PREFIX AUX778076_OP_NAME #endif #define AUX778076_OP_ARITY 2 #include #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp # include #else # include # include namespace boost { namespace mpl { // MSVC workaround: implement less in terms of greater #if 0 AUX778076_OP_TOKEN 1 && !(1 AUX778076_OP_TOKEN 0) && !(0 AUX778076_OP_TOKEN 0) # define AUX778076_OP(N1, N2) \ ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) \ /**/ #else # define AUX778076_OP(N1, N2) \ ( BOOST_MPL_AUX_VALUE_WKND(N1)::value \ AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(N2)::value \ ) \ /**/ #endif template<> struct AUX778076_OP_IMPL_NAME { template< typename N1, typename N2 > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) : bool_< AUX778076_OP(N1, N2) > { #else { BOOST_STATIC_CONSTANT(bool, value = AUX778076_OP(N1, N2)); typedef bool_ type; #endif }; }; #undef AUX778076_OP }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #undef AUX778076_OP_TAG_NAME #undef AUX778076_OP_IMPL_NAME #undef AUX778076_OP_ARITY #undef AUX778076_OP_PREFIX #undef AUX778076_OP_NAME #undef AUX778076_OP_TOKEN passenger-4.0.37/ext/boost/mpl/aux_/config/000755 000765 000024 00000000000 12233035540 021133 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/contains_impl.hpp000644 000765 000024 00000003224 12233035540 023237 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED // Copyright Eric Friedman 2002 // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: contains_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename Tag > struct contains_impl { template< typename Sequence, typename T > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : not_< is_same< typename find::type , typename end::type > > { #else { typedef not_< is_same< typename find::type , typename end::type > > type; BOOST_STATIC_CONSTANT(bool, value = (not_< is_same< typename find::type , typename end::type > >::value) ); #endif }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,contains_impl) }} #endif // BOOST_MPL_AUX_CONTAINS_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/count_args.hpp000644 000765 000024 00000005746 12233035540 022557 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: count_args.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #if !defined(AUX778076_COUNT_ARGS_PARAM_NAME) # define AUX778076_COUNT_ARGS_PARAM_NAME T #endif #if !defined(AUX778076_COUNT_ARGS_TEMPLATE_PARAM) # define AUX778076_COUNT_ARGS_TEMPLATE_PARAM typename AUX778076_COUNT_ARGS_PARAM_NAME #endif // local macros, #undef-ined at the end of the header #if !defined(AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES) # include # include # define AUX778076_COUNT_ARGS_REPEAT BOOST_MPL_PP_REPEAT # define AUX778076_COUNT_ARGS_PARAMS(param) \ BOOST_MPL_PP_PARAMS( \ AUX778076_COUNT_ARGS_ARITY \ , param \ ) \ /**/ #else # include # include # include # define AUX778076_COUNT_ARGS_REPEAT BOOST_PP_REPEAT # define AUX778076_COUNT_ARGS_PARAMS(param) \ BOOST_PP_ENUM_SHIFTED_PARAMS( \ BOOST_PP_INC(AUX778076_COUNT_ARGS_ARITY) \ , param \ ) \ /**/ #endif // AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES #define AUX778076_IS_ARG_TEMPLATE_NAME \ BOOST_PP_CAT(is_,BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_arg)) \ /**/ #define AUX778076_COUNT_ARGS_FUNC(unused, i, param) \ BOOST_PP_EXPR_IF(i, +) \ AUX778076_IS_ARG_TEMPLATE_NAME::value \ /**/ // is__arg template< AUX778076_COUNT_ARGS_TEMPLATE_PARAM > struct AUX778076_IS_ARG_TEMPLATE_NAME { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct AUX778076_IS_ARG_TEMPLATE_NAME { BOOST_STATIC_CONSTANT(bool, value = false); }; // _count_args template< AUX778076_COUNT_ARGS_PARAMS(AUX778076_COUNT_ARGS_TEMPLATE_PARAM) > struct BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_count_args) { BOOST_STATIC_CONSTANT(int, value = AUX778076_COUNT_ARGS_REPEAT( AUX778076_COUNT_ARGS_ARITY , AUX778076_COUNT_ARGS_FUNC , AUX778076_COUNT_ARGS_PARAM_NAME )); }; #undef AUX778076_COUNT_ARGS_FUNC #undef AUX778076_IS_ARG_TEMPLATE_NAME #undef AUX778076_COUNT_ARGS_PARAMS #undef AUX778076_COUNT_ARGS_REPEAT #undef AUX778076_COUNT_ARGS_ARITY #undef AUX778076_COUNT_ARGS_DEFAULT #undef AUX778076_COUNT_ARGS_PREFIX #undef AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES #undef AUX778076_COUNT_ARGS_TEMPLATE_PARAM #undef AUX778076_COUNT_ARGS_PARAM_NAME passenger-4.0.37/ext/boost/mpl/aux_/count_impl.hpp000644 000765 000024 00000002402 12233035540 022546 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_COUNT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_COUNT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: count_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include namespace boost { namespace mpl { template< typename Tag > struct count_impl { template< typename Sequence, typename T > struct apply #if BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x561)) { typedef typename count_if< Sequence,same_as >::type type; BOOST_STATIC_CONSTANT(int, value = BOOST_MPL_AUX_VALUE_WKND(type)::value); #else : count_if< Sequence,same_as > { #endif }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,count_impl) }} #endif // BOOST_MPL_AUX_COUNT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/empty_impl.hpp000644 000765 000024 00000002220 12233035540 022552 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: empty_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { // default implementation; conrete sequences might override it by // specializing either the 'empty_impl' or the primary 'empty' template template< typename Tag > struct empty_impl { template< typename Sequence > struct apply : is_same< typename begin::type , typename end::type > { }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,empty_impl) }} #endif // BOOST_MPL_AUX_EMPTY_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/erase_impl.hpp000644 000765 000024 00000003524 12233035540 022523 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: erase_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include namespace boost { namespace mpl { // default implementation; conrete sequences might override it by // specializing either the 'erase_impl' or the primary 'erase' template template< typename Tag > struct erase_impl { template< typename Sequence , typename First , typename Last > struct apply { typedef typename if_na< Last,typename next::type >::type last_; // 1st half: [begin, first) typedef iterator_range< typename begin::type , First > first_half_; // 2nd half: [last, end) ... that is, [last + 1, end) typedef iterator_range< last_ , typename end::type > second_half_; typedef typename reverse_fold< second_half_ , typename clear::type , push_front<_,_> >::type half_sequence_; typedef typename reverse_fold< first_half_ , half_sequence_ , push_front<_,_> >::type type; }; }; }} #endif // BOOST_MPL_AUX_ERASE_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/erase_key_impl.hpp000644 000765 000024 00000001536 12233035540 023374 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_ERASE_KEY_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_ERASE_KEY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: erase_key_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template< typename Tag > struct erase_key_impl { template< typename Sequence, typename Key > struct apply; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, erase_key_impl) }} #endif // BOOST_MPL_AUX_ERASE_KEY_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/filter_iter.hpp000644 000765 000024 00000006067 12233035540 022720 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_FILTER_ITER_HPP_INCLUDED #define BOOST_MPL_AUX_FILTER_ITER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: filter_iter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Iterator , typename LastIterator , typename Predicate > struct filter_iter; template< typename Iterator , typename LastIterator , typename Predicate > struct next_filter_iter { typedef typename find_if< iterator_range , Predicate >::type base_iter_; typedef filter_iter type; }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Iterator , typename LastIterator , typename Predicate > struct filter_iter { typedef Iterator base; typedef forward_iterator_tag category; typedef typename aux::next_filter_iter< typename mpl::next::type , LastIterator , Predicate >::type next; typedef typename deref::type type; }; template< typename LastIterator , typename Predicate > struct filter_iter< LastIterator,LastIterator,Predicate > { typedef LastIterator base; typedef forward_iterator_tag category; }; #else template< bool > struct filter_iter_impl { template< typename Iterator , typename LastIterator , typename Predicate > struct result_ { typedef Iterator base; typedef forward_iterator_tag category; typedef typename next_filter_iter< typename mpl::next::type , LastIterator , Predicate >::type next; typedef typename deref::type type; }; }; template<> struct filter_iter_impl< true > { template< typename Iterator , typename LastIterator , typename Predicate > struct result_ { typedef Iterator base; typedef forward_iterator_tag category; }; }; template< typename Iterator , typename LastIterator , typename Predicate > struct filter_iter : filter_iter_impl< ::boost::is_same::value >::template result_< Iterator,LastIterator,Predicate > { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace aux BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::filter_iter) }} #endif // BOOST_MPL_AUX_FILTER_ITER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/find_if_pred.hpp000644 000765 000024 00000001364 12233035540 023013 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED #define BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Eric Friedman 2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. #include #include namespace boost { namespace mpl { namespace aux { template< typename Predicate > struct find_if_pred { template< typename Iterator > struct apply { typedef not_< aux::iter_apply1 > type; }; }; }}} #endif // BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/fold_impl.hpp000644 000765 000024 00000002543 12233035540 022350 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # include # include # endif #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER fold_impl.hpp # include #else # define AUX778076_FOLD_IMPL_OP(iter) typename deref::type # define AUX778076_FOLD_IMPL_NAME_PREFIX fold # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/fold_impl_body.hpp000644 000765 000024 00000021533 12233035540 023365 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION #if !defined(BOOST_PP_IS_ITERATING) // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: fold_impl_body.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ # include # include # include # include # include # include # include # include # include // local macros, #undef-ined at the end of the header # define AUX778076_ITER_FOLD_STEP(unused, i, unused2) \ typedef typename apply2< \ ForwardOp \ , BOOST_PP_CAT(state,i) \ , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,i)) \ >::type BOOST_PP_CAT(state,BOOST_PP_INC(i)); \ typedef typename mpl::next::type \ BOOST_PP_CAT(iter,BOOST_PP_INC(i)); \ /**/ # define AUX778076_FOLD_IMPL_NAME \ BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \ /**/ # define AUX778076_FOLD_CHUNK_NAME \ BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \ /**/ namespace boost { namespace mpl { namespace aux { /// forward declaration template< BOOST_MPL_AUX_NTTP_DECL(int, N) , typename First , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< BOOST_MPL_AUX_NTTP_DECL(int, N) , typename First , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME { typedef AUX778076_FOLD_IMPL_NAME< BOOST_MPL_LIMIT_UNROLLING , First , Last , State , ForwardOp > chunk_; typedef AUX778076_FOLD_IMPL_NAME< ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; // fallback implementation for sequences of unknown size template< typename First , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME<-1,First,Last,State,ForwardOp> : AUX778076_FOLD_IMPL_NAME< -1 , typename mpl::next::type , Last , typename apply2::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME<-1,Last,Last,State,ForwardOp> { typedef State state; typedef Last iterator; }; # else // BOOST_WORKAROUND(__BORLANDC__, < 0x600) // Borland have some serious problems with the unrolled version, so // we always use a basic implementation template< BOOST_MPL_AUX_NTTP_DECL(int, N) , typename First , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME { typedef AUX778076_FOLD_IMPL_NAME< -1 , typename mpl::next::type , Last , typename apply2::type , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; typedef state type; }; template< BOOST_MPL_AUX_NTTP_DECL(int, N) , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME { typedef State state; typedef Last iterator; typedef state type; }; # endif // BOOST_WORKAROUND(__BORLANDC__, < 0x600) #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct AUX778076_FOLD_CHUNK_NAME; # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct AUX778076_FOLD_CHUNK_NAME { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef AUX778076_FOLD_IMPL_NAME< BOOST_MPL_LIMIT_UNROLLING , First , Last , State , ForwardOp > chunk_; typedef AUX778076_FOLD_IMPL_NAME< ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; // fallback implementation for sequences of unknown size template< typename First , typename Last , typename State , typename ForwardOp > struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step); template< typename Last , typename State > struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) { typedef Last iterator; typedef State state; }; template<> struct AUX778076_FOLD_CHUNK_NAME<-1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same::type , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) /// ETI workaround template<> struct result_ { typedef int state; typedef int iterator; }; #endif }; template< typename First , typename Last , typename State , typename ForwardOp > struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) { // can't inherit here - it breaks MSVC 7.0 typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_< typename mpl::next::type , Last , typename apply2::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< BOOST_MPL_AUX_NTTP_DECL(int, N) , typename First , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME : AUX778076_FOLD_CHUNK_NAME ::template result_ { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION }}} # undef AUX778076_FOLD_IMPL_NAME # undef AUX778076_FOLD_CHUNK_NAME # undef AUX778076_ITER_FOLD_STEP #undef AUX778076_FOLD_IMPL_OP #undef AUX778076_FOLD_IMPL_NAME_PREFIX ///// iteration #else # define n_ BOOST_PP_FRAME_ITERATION(1) #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename First , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME { typedef First iter0; typedef State state0; BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused) typedef BOOST_PP_CAT(state,n_) state; typedef BOOST_PP_CAT(iter,n_) iterator; }; #else template<> struct AUX778076_FOLD_CHUNK_NAME { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused) typedef BOOST_PP_CAT(state,n_) state; typedef BOOST_PP_CAT(iter,n_) iterator; }; #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) /// ETI workaround template<> struct result_ { typedef int state; typedef int iterator; }; #endif }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # undef n_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/aux_/fold_op.hpp000644 000765 000024 00000001640 12233035540 022022 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_FOLD_OP_HPP_INCLUDED #define BOOST_MPL_AUX_FOLD_OP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: fold_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { namespace aux { // hand-written version is more efficient than bind/lambda expression template< typename Op > struct fold_op { template< typename T1, typename T2 > struct apply { typedef typename apply2< Op , T1 , typename T2::type >::type type; }; }; }}} #endif // BOOST_MPL_AUX_FOLD_OP_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/fold_pred.hpp000644 000765 000024 00000001550 12233035540 022336 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_FOLD_PRED_HPP_INCLUDED #define BOOST_MPL_AUX_FOLD_PRED_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: fold_pred.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { namespace aux { template< typename Last > struct fold_pred { template< typename State , typename Iterator > struct apply : not_same_as::template apply { }; }; }}} #endif // BOOST_MPL_AUX_FOLD_PRED_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/front_impl.hpp000644 000765 000024 00000002165 12233035540 022554 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: front_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { // default implementation; conrete sequences might override it by // specializing either the 'front_impl' or the primary 'front' template template< typename Tag > struct front_impl { template< typename Sequence > struct apply { typedef typename begin::type iter_; typedef typename deref::type type; }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1,front_impl) }} #endif // BOOST_MPL_AUX_FRONT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/full_lambda.hpp000644 000765 000024 00000021312 12233035540 022640 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED #define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: full_lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include # include # include # include # include # if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) # include # endif #endif #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER full_lambda.hpp # include #else # include # include # include # include # include # include # include # include # include # include namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header # define AUX778076_LAMBDA_PARAMS(i_, param) \ BOOST_MPL_PP_PARAMS(i_, param) \ /**/ # define AUX778076_BIND_PARAMS(param) \ BOOST_MPL_PP_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ ) \ /**/ # define AUX778076_BIND_N_PARAMS(i_, param) \ BOOST_PP_COMMA_IF(i_) \ BOOST_MPL_PP_PARAMS(i_, param) \ /**/ # define AUX778076_ARITY_PARAM(param) \ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) \ /**/ #define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY namespace aux { template< BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false) > struct lambda_or : true_ { }; template<> struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) > : false_ { }; } // namespace aux #undef n_ template< typename T , typename Tag AUX778076_ARITY_PARAM(typename Arity) > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg,Tag AUX778076_ARITY_PARAM(int_<-1>) > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect,Tag AUX778076_ARITY_PARAM(int_<1>) > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, AUX778076_BIND_PARAMS(typename T) , typename Tag > struct lambda< bind , Tag AUX778076_ARITY_PARAM(int_) > { typedef false_ is_le; typedef bind result_; typedef result_ type; }; #if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) template< typename F , typename Tag1 , typename Tag2 , typename Arity > struct lambda< lambda , Tag2 , int_<3> > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef bind1< quote1, typename l1::result_ > arity_; typedef lambda< typename if_::type,Tag2 > l3; typedef aux::le_result3 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; #elif !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; #endif # undef AUX778076_ARITY_PARAM # undef AUX778076_BIND_N_PARAMS # undef AUX778076_BIND_PARAMS # undef AUX778076_LAMBDA_PARAMS #if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) BOOST_MPL_AUX_NA_SPEC(2, lambda) #else BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) #endif }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED ///// iteration, depth == 1 // For gcc 4.4 compatability, we must include the // BOOST_PP_ITERATION_DEPTH test inside an #else clause. #else // BOOST_PP_IS_ITERATING #if BOOST_PP_ITERATION_DEPTH() == 1 #define i_ BOOST_PP_FRAME_ITERATION(1) #if i_ > 0 namespace aux { # define AUX778076_RESULT(unused, i_, T) \ BOOST_PP_COMMA_IF(i_) \ typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::result_ \ /**/ # define AUX778076_TYPE(unused, i_, T) \ BOOST_PP_COMMA_IF(i_) \ typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::type \ /**/ template< typename IsLE, typename Tag , template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F , AUX778076_LAMBDA_PARAMS(i_, typename L) > struct BOOST_PP_CAT(le_result,i_) { typedef F< BOOST_MPL_PP_REPEAT(i_, AUX778076_TYPE, L) > result_; typedef result_ type; }; template< typename Tag , template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F , AUX778076_LAMBDA_PARAMS(i_, typename L) > struct BOOST_PP_CAT(le_result,i_)< true_,Tag,F,AUX778076_LAMBDA_PARAMS(i_, L) > { typedef BOOST_PP_CAT(bind,i_)< BOOST_PP_CAT(quote,i_) , BOOST_MPL_PP_REPEAT(i_, AUX778076_RESULT, L) > result_; typedef mpl::protect type; }; # undef AUX778076_TYPE # undef AUX778076_RESULT } // namespace aux # define AUX778076_LAMBDA_TYPEDEF(unused, i_, T) \ typedef lambda< BOOST_PP_CAT(T, BOOST_PP_INC(i_)), Tag > \ BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \ /**/ # define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \ typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \ BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \ /**/ # define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \ BOOST_PP_COMMA_IF(i_) \ BOOST_PP_CAT(is_le,BOOST_PP_INC(i_))::value \ /**/ template< template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F , AUX778076_LAMBDA_PARAMS(i_, typename T) , typename Tag > struct lambda< F , Tag AUX778076_ARITY_PARAM(int_) > { BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, T) BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused) typedef typename aux::lambda_or< BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused) >::type is_le; typedef aux::BOOST_PP_CAT(le_result,i_)< is_le, Tag, F, AUX778076_LAMBDA_PARAMS(i_, l) > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; # undef AUX778076_IS_LAMBDA_EXPR # undef AUX778076_IS_LE_TYPEDEF # undef AUX778076_LAMBDA_TYPEDEF #endif // i_ > 0 template< typename F AUX778076_BIND_N_PARAMS(i_, typename T) , typename Tag > struct lambda< BOOST_PP_CAT(bind,i_) , Tag AUX778076_ARITY_PARAM(int_) > { typedef false_ is_le; typedef BOOST_PP_CAT(bind,i_)< F AUX778076_BIND_N_PARAMS(i_, T) > result_; typedef result_ type; }; #undef i_ #endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/aux_/has_apply.hpp000644 000765 000024 00000001553 12233035540 022363 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { namespace aux { #if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false) #else template< typename T, typename fallback_ = false_ > struct has_apply : fallback_ { }; #endif }}} #endif // BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/has_begin.hpp000644 000765 000024 00000001260 12233035540 022315 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_begin.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { namespace aux { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_begin, begin, true) }}} #endif // BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/has_key_impl.hpp000644 000765 000024 00000001707 12233035540 023050 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // Copyright David Abrahams 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_key_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { // no default implementation; the definition is needed to make MSVC happy template< typename Tag > struct has_key_impl { template< typename AssociativeSequence, typename Key > struct apply; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,has_key_impl) }} #endif // BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/has_rebind.hpp000644 000765 000024 00000005160 12233035540 022477 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_rebind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) # include #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) # include # include # include # include #elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # include # include # include # include # include #else # include # include # include #endif namespace boost { namespace mpl { namespace aux { #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false) #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false) template< typename T > struct has_rebind : if_< msvc_is_class , has_rebind_impl , bool_ >::type { }; #else // the rest template< typename T > struct has_rebind_tag {}; no_tag operator|(has_rebind_tag, void const volatile*); # if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) template< typename T > struct has_rebind { static has_rebind_tag* get(); BOOST_STATIC_CONSTANT(bool, value = sizeof(has_rebind_tag() | get()) == sizeof(yes_tag) ); }; # else // __BORLANDC__ template< typename T > struct has_rebind_impl { static T* get(); BOOST_STATIC_CONSTANT(bool, value = sizeof(has_rebind_tag() | get()) == sizeof(yes_tag) ); }; template< typename T > struct has_rebind : if_< is_class , has_rebind_impl , bool_ >::type { }; # endif // __BORLANDC__ #endif }}} #endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/has_size.hpp000644 000765 000024 00000001224 12233035540 022203 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { namespace aux { BOOST_MPL_HAS_XXX_TRAIT_DEF(size) }}} #endif // BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/has_tag.hpp000644 000765 000024 00000001245 12233035540 022007 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { namespace aux { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false) }}} #endif // BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/has_type.hpp000644 000765 000024 00000001252 12233035540 022213 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { namespace aux { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_type, type, true) }}} #endif // BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/include_preprocessed.hpp000644 000765 000024 00000002654 12233035540 024607 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: include_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_PREPROCESSED_HEADER \ BOOST_MPL_CFG_COMPILER_DIR/BOOST_MPL_PREPROCESSED_HEADER \ /**/ #else # define AUX778076_PREPROCESSED_HEADER \ BOOST_PP_CAT(BOOST_MPL_CFG_COMPILER_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ /**/ #endif #if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) # define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) # include AUX778076_INCLUDE_STRING # undef AUX778076_INCLUDE_STRING #else # include BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) #endif # undef AUX778076_PREPROCESSED_HEADER #undef BOOST_MPL_PREPROCESSED_HEADER passenger-4.0.37/ext/boost/mpl/aux_/insert_impl.hpp000644 000765 000024 00000003440 12233035540 022725 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_INSERT_IMPL_HPP_INCLUDED #define BOOST_MPL_INSERT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: insert_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { // default implementation; conrete sequences might override it by // specializing either the 'insert_impl' or the primary 'insert' template template< typename Tag > struct insert_impl { template< typename Sequence , typename Pos , typename T > struct apply { typedef iterator_range< typename begin::type , Pos > first_half_; typedef iterator_range< Pos , typename end::type > second_half_; typedef typename reverse_fold< second_half_ , typename clear::type , push_front<_,_> >::type half_sequence_; typedef typename reverse_fold< first_half_ , typename push_front::type , push_front<_,_> >::type type; }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_impl) }} #endif // BOOST_MPL_INSERT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/insert_range_impl.hpp000644 000765 000024 00000004313 12233035540 024101 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: insert_range_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { // default implementation; conrete sequences might override it by // specializing either the 'insert_range_impl' or the primary // 'insert_range' template template< typename Tag > struct insert_range_impl { template< typename Sequence , typename Pos , typename Range > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : reverse_copy< joint_view< iterator_range::type,Pos> , joint_view< Range , iterator_range::type> > > , front_inserter< typename clear::type > > { #else { typedef typename reverse_copy< joint_view< iterator_range::type,Pos> , joint_view< Range , iterator_range::type> > > , front_inserter< typename clear::type > >::type type; #endif }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_range_impl) }} #endif // BOOST_MPL_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/inserter_algorithm.hpp000644 000765 000024 00000011505 12233035540 024302 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED #define BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: inserter_algorithm.hpp 55648 2009-08-18 05:16:53Z agurtovoy $ // $Date: 2009-08-17 22:16:53 -0700 (Mon, 17 Aug 2009) $ // $Revision: 55648 $ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \ BOOST_MPL_AUX_COMMON_NAME_WKND(name) \ template< \ BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \ > \ struct name \ : aux::name##_impl \ { \ }; \ \ template< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ > \ struct name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \ : if_< has_push_back< typename clear::type> \ , aux::name##_impl< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ , back_inserter< typename clear::type > \ > \ , aux::reverse_##name##_impl< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ , front_inserter< typename clear::type > \ > \ >::type \ { \ }; \ \ template< \ BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \ > \ struct reverse_##name \ : aux::reverse_##name##_impl \ { \ }; \ \ template< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ > \ struct reverse_##name< BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P),na > \ : if_< has_push_back \ , aux::reverse_##name##_impl< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ , back_inserter< typename clear::type > \ > \ , aux::name##_impl< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ , front_inserter< typename clear::type > \ > \ >::type \ { \ }; \ BOOST_MPL_AUX_NA_SPEC(arity, name) \ BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \ /**/ #else # define BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(arity, name) \ BOOST_MPL_AUX_COMMON_NAME_WKND(name) \ template< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ > \ struct def_##name##_impl \ : if_< has_push_back \ , aux::name##_impl< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ , back_inserter< typename clear::type > \ > \ , aux::reverse_##name##_impl< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ , front_inserter< typename clear::type > \ > \ >::type \ { \ }; \ \ template< \ BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \ > \ struct name \ { \ typedef typename eval_if< \ is_na \ , def_##name##_impl \ , aux::name##_impl \ >::type type; \ }; \ \ template< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), typename P) \ > \ struct def_reverse_##name##_impl \ : if_< has_push_back \ , aux::reverse_##name##_impl< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ , back_inserter< typename clear::type > \ > \ , aux::name##_impl< \ BOOST_MPL_PP_PARAMS(BOOST_PP_DEC(arity), P) \ , front_inserter< typename clear::type > \ > \ >::type \ { \ }; \ template< \ BOOST_MPL_PP_DEFAULT_PARAMS(arity, typename P, na) \ > \ struct reverse_##name \ { \ typedef typename eval_if< \ is_na \ , def_reverse_##name##_impl \ , aux::reverse_##name##_impl \ >::type type; \ }; \ BOOST_MPL_AUX_NA_SPEC(arity, name) \ BOOST_MPL_AUX_NA_SPEC(arity, reverse_##name) \ /**/ #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #endif // BOOST_MPL_AUX_INSERTER_ALGORITHM_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/integral_wrapper.hpp000644 000765 000024 00000007042 12233035540 023747 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: integral_wrapper.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! #include #include #include #include #include #include #if !defined(AUX_WRAPPER_NAME) # define AUX_WRAPPER_NAME BOOST_PP_CAT(AUX_WRAPPER_VALUE_TYPE,_) #endif #if !defined(AUX_WRAPPER_PARAMS) # define AUX_WRAPPER_PARAMS(N) BOOST_MPL_AUX_NTTP_DECL(AUX_WRAPPER_VALUE_TYPE, N) #endif #if !defined(AUX_WRAPPER_INST) # if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) # define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< value > # else # define AUX_WRAPPER_INST(value) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::AUX_WRAPPER_NAME< value > # endif #endif BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< AUX_WRAPPER_PARAMS(N) > struct AUX_WRAPPER_NAME { BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, value = N); // agurt, 08/mar/03: SGI MIPSpro C++ workaround, have to #ifdef because some // other compilers (e.g. MSVC) are not particulary happy about it #if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) typedef struct AUX_WRAPPER_NAME type; #else typedef AUX_WRAPPER_NAME type; #endif typedef AUX_WRAPPER_VALUE_TYPE value_type; typedef integral_c_tag tag; // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), // while some other don't like 'value + 1' (Borland), and some don't like // either #if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) private: BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1))); BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1))); public: typedef AUX_WRAPPER_INST(next_value) next; typedef AUX_WRAPPER_INST(prior_value) prior; #elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \ || (BOOST_WORKAROUND(__HP_aCC, <= 53800) && (BOOST_WORKAROUND(__hpxstd98, != 1))) typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)) ) next; typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)) ) prior; #else typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value + 1)) ) next; typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior; #endif // enables uniform function call syntax for families of overloaded // functions that return objects of both arithmetic ('int', 'long', // 'double', etc.) and wrapped integral types (for an example, see // "mpl/example/power.cpp") operator AUX_WRAPPER_VALUE_TYPE() const { return static_cast(this->value); } }; #if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) template< AUX_WRAPPER_PARAMS(N) > AUX_WRAPPER_VALUE_TYPE const AUX_WRAPPER_INST(N)::value; #endif BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #undef AUX_WRAPPER_NAME #undef AUX_WRAPPER_PARAMS #undef AUX_WRAPPER_INST #undef AUX_WRAPPER_VALUE_TYPE passenger-4.0.37/ext/boost/mpl/aux_/is_msvc_eti_arg.hpp000644 000765 000024 00000002630 12233035540 023535 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED #define BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: is_msvc_eti_arg.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { namespace aux { #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) template< typename T > struct is_msvc_eti_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; #else // BOOST_MPL_CFG_MSVC_60_ETI_BUG struct eti_int_convertible { eti_int_convertible(int); }; template< typename T > struct is_msvc_eti_arg { static no_tag test(...); static yes_tag test(eti_int_convertible); static T& get(); BOOST_STATIC_CONSTANT(bool, value = sizeof(test(get())) == sizeof(yes_tag) ); }; #endif template<> struct is_msvc_eti_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif // BOOST_MPL_CFG_MSVC_ETI_BUG }}} #endif // BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/iter_apply.hpp000644 000765 000024 00000001763 12233035540 022556 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ITER_APPLY_HPP_INCLUDED #define BOOST_MPL_ITER_APPLY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iter_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { namespace aux { template< typename F , typename Iterator > struct iter_apply1 : apply1< F,typename deref::type > { }; template< typename F , typename Iterator1 , typename Iterator2 > struct iter_apply2 : apply2< F , typename deref::type , typename deref::type > { }; }}} #endif // BOOST_MPL_ITER_APPLY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/iter_fold_if_impl.hpp000644 000765 000024 00000013514 12233035540 024051 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iter_fold_if_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER iter_fold_if_impl.hpp # include #else # include # include # include # include # include # include namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; // agurt, 25/jun/02: MSVC 6.5 workaround, had to get rid of inheritance // here and in 'iter_fold_if_backward_step', because sometimes it interfered // with the "early template instantiation bug" in _really_ ugly ways template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp,mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp,identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; // local macros, #undef-ined at the end of the header # define AUX_ITER_FOLD_FORWARD_STEP(unused, i, unused2) \ typedef iter_fold_if_forward_step< \ typename BOOST_PP_CAT(forward_step,i)::iterator \ , typename BOOST_PP_CAT(forward_step,i)::state \ , ForwardOp \ , ForwardPredicate \ > BOOST_PP_CAT(forward_step, BOOST_PP_INC(i)); \ /**/ # define AUX_ITER_FOLD_BACKWARD_STEP_FUNC(i) \ typedef iter_fold_if_backward_step< \ typename BOOST_PP_CAT(forward_step,BOOST_PP_DEC(i))::iterator \ , typename BOOST_PP_CAT(backward_step,i)::state \ , BackwardOp \ , BackwardPredicate \ > BOOST_PP_CAT(backward_step,BOOST_PP_DEC(i)); \ /**/ # define AUX_ITER_FOLD_BACKWARD_STEP(unused, i, unused2) \ AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \ BOOST_PP_SUB_D(1,BOOST_MPL_LIMIT_UNROLLING,i) \ ) \ /**/ # define AUX_LAST_FORWARD_STEP \ BOOST_PP_CAT(forward_step, BOOST_MPL_LIMIT_UNROLLING) \ /**/ # define AUX_LAST_BACKWARD_STEP \ BOOST_PP_CAT(backward_step, BOOST_MPL_LIMIT_UNROLLING) \ /**/ template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step forward_step0; BOOST_PP_REPEAT( BOOST_MPL_LIMIT_UNROLLING , AUX_ITER_FOLD_FORWARD_STEP , unused ) typedef typename if_< typename AUX_LAST_FORWARD_STEP::not_last , iter_fold_if_impl< typename AUX_LAST_FORWARD_STEP::iterator , typename AUX_LAST_FORWARD_STEP::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename AUX_LAST_FORWARD_STEP::iterator , typename AUX_LAST_FORWARD_STEP::state > >::type AUX_LAST_BACKWARD_STEP; BOOST_PP_REPEAT( BOOST_MPL_LIMIT_UNROLLING , AUX_ITER_FOLD_BACKWARD_STEP , unused ) public: typedef typename backward_step0::state state; typedef typename AUX_LAST_BACKWARD_STEP::iterator iterator; }; # undef AUX_LAST_BACKWARD_STEP # undef AUX_LAST_FORWARD_STEP # undef AUX_ITER_FOLD_BACKWARD_STEP # undef AUX_ITER_FOLD_BACKWARD_STEP_FUNC # undef AUX_ITER_FOLD_FORWARD_STEP }}} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/iter_fold_impl.hpp000644 000765 000024 00000002511 12233035540 023366 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iter_fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # include # include # endif #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER iter_fold_impl.hpp # include #else # define AUX778076_FOLD_IMPL_OP(iter) iter # define AUX778076_FOLD_IMPL_NAME_PREFIX iter_fold # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_ITER_FOLD_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/iter_push_front.hpp000644 000765 000024 00000001565 12233035540 023620 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED #define BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iter_push_front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { namespace aux { template< typename Sequence , typename Iterator > struct iter_push_front { typedef typename push_front< Sequence , typename deref::type >::type type; }; }}} #endif // BOOST_MPL_ITER_PUSH_FRONT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/joint_iter.hpp000644 000765 000024 00000005652 12233035540 022555 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED #define BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: joint_iter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # include #endif namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Iterator1 , typename LastIterator1 , typename Iterator2 > struct joint_iter { typedef Iterator1 base; typedef forward_iterator_tag category; }; template< typename LastIterator1 , typename Iterator2 > struct joint_iter { typedef Iterator2 base; typedef forward_iterator_tag category; }; template< typename I1, typename L1, typename I2 > struct deref< joint_iter > { typedef typename joint_iter::base base_; typedef typename deref::type type; }; template< typename I1, typename L1, typename I2 > struct next< joint_iter > { typedef joint_iter< typename mpl::next::type,L1,I2 > type; }; template< typename L1, typename I2 > struct next< joint_iter > { typedef joint_iter< L1,L1,typename mpl::next::type > type; }; #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template< typename Iterator1 , typename LastIterator1 , typename Iterator2 > struct joint_iter; template< bool > struct joint_iter_impl { template< typename I1, typename L1, typename I2 > struct result_ { typedef I1 base; typedef forward_iterator_tag category; typedef joint_iter< typename mpl::next::type,L1,I2 > next; typedef typename deref::type type; }; }; template<> struct joint_iter_impl { template< typename I1, typename L1, typename I2 > struct result_ { typedef I2 base; typedef forward_iterator_tag category; typedef joint_iter< L1,L1,typename mpl::next::type > next; typedef typename deref::type type; }; }; template< typename Iterator1 , typename LastIterator1 , typename Iterator2 > struct joint_iter : joint_iter_impl< is_same::value > ::template result_ { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, joint_iter) }} #endif // BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/lambda_arity_param.hpp000644 000765 000024 00000001455 12233035540 024214 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: lambda_arity_param.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) # define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) #else # define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) , param #endif #endif // BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/lambda_no_ctps.hpp000644 000765 000024 00000011676 12233035540 023357 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: lambda_no_ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include # include # include # include # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER lambda_no_ctps.hpp # include #else # include # include # include # include # include # include # include # include # include # include # include namespace boost { namespace mpl { # define AUX778076_LAMBDA_PARAMS(i_, param) \ BOOST_MPL_PP_PARAMS(i_, param) \ /**/ namespace aux { #define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY template< BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false) > struct lambda_or : true_ { }; template<> struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) > : false_ { }; #undef n_ template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; # undef AUX778076_LAMBDA_PARAMS }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED ///// iteration, depth == 1 #else #define i_ BOOST_PP_FRAME_ITERATION(1) # define AUX778076_LAMBDA_TYPEDEF(unused, i_, F) \ typedef lambda< \ typename F::BOOST_PP_CAT(arg,BOOST_PP_INC(i_)) \ , Tag \ , false_ \ > BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \ /**/ # define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \ typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \ BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \ /**/ # define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \ BOOST_PP_COMMA_IF(i_) \ BOOST_MPL_AUX_MSVC_VALUE_WKND(BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)))::value \ /**/ # define AUX778076_LAMBDA_RESULT(unused, i_, unused2) \ , typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::type \ /**/ template<> struct lambda_impl< int_ > { template< typename F, typename Tag, typename Protect > struct result_ { BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, F) BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused) typedef aux::lambda_or< BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused) > is_le; typedef BOOST_PP_CAT(bind,i_)< typename F::rebind BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_RESULT, unused) > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; # undef AUX778076_LAMBDA_RESULT # undef AUX778076_IS_LAMBDA_EXPR # undef AUX778076_IS_LE_TYPEDEF # undef AUX778076_LAMBDA_TYPEDEF #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/aux_/lambda_spec.hpp000644 000765 000024 00000002454 12233035540 022636 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2007 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: lambda_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) \ template< \ BOOST_MPL_PP_PARAMS(i, typename T) \ , typename Tag \ > \ struct lambda< \ name< BOOST_MPL_PP_PARAMS(i, T) > \ , Tag \ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_) \ > \ { \ typedef false_ is_le; \ typedef name< BOOST_MPL_PP_PARAMS(i, T) > result_; \ typedef result_ type; \ }; \ /**/ #else # define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) /**/ #endif #endif // BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/lambda_support.hpp000644 000765 000024 00000012541 12233035540 023416 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: lambda_support.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) /**/ # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) /**/ #else # include # include # include # include # include # include # include # include # include # include # include # define BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC(R,typedef_,i,param) \ typedef_ param BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \ /**/ // agurt, 07/mar/03: restore an old revision for the sake of SGI MIPSpro C++ #if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_ arity; \ BOOST_PP_LIST_FOR_EACH_I_R( \ 1 \ , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ , typedef \ , BOOST_PP_TUPLE_TO_LIST(i,params) \ ) \ struct rebind \ { \ template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ : name< BOOST_MPL_PP_PARAMS(i,U) > \ { \ }; \ }; \ /**/ # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ /**/ #elif BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) // agurt, 18/jan/03: old EDG-based compilers actually enforce 11.4 para 9 // (in strict mode), so we have to provide an alternative to the // MSVC-optimized implementation # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_ arity; \ BOOST_PP_LIST_FOR_EACH_I_R( \ 1 \ , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ , typedef \ , BOOST_PP_TUPLE_TO_LIST(i,params) \ ) \ struct rebind; \ /**/ # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ }; \ template< BOOST_MPL_PP_PARAMS(i,typename T) > \ struct name::rebind \ { \ template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ : name< BOOST_MPL_PP_PARAMS(i,U) > \ { \ }; \ /**/ #else // __EDG_VERSION__ namespace boost { namespace mpl { namespace aux { template< typename T > struct has_rebind_tag; }}} # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_ arity; \ BOOST_PP_LIST_FOR_EACH_I_R( \ 1 \ , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ , typedef \ , BOOST_PP_TUPLE_TO_LIST(i,params) \ ) \ friend class BOOST_PP_CAT(name,_rebind); \ typedef BOOST_PP_CAT(name,_rebind) rebind; \ /**/ #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ template< BOOST_MPL_PP_PARAMS(i,typename T) > \ ::boost::mpl::aux::yes_tag operator|( \ ::boost::mpl::aux::has_rebind_tag \ , name* \ ); \ ::boost::mpl::aux::no_tag operator|( \ ::boost::mpl::aux::has_rebind_tag \ , name< BOOST_MPL_PP_ENUM(i,::boost::mpl::na) >* \ ); \ /**/ #elif !BOOST_WORKAROUND(BOOST_MSVC, < 1300) # define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ template< BOOST_MPL_PP_PARAMS(i,typename T) > \ ::boost::mpl::aux::yes_tag operator|( \ ::boost::mpl::aux::has_rebind_tag \ , ::boost::mpl::aux::has_rebind_tag< name >* \ ); \ /**/ #else # define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) /**/ #endif # if !defined(__BORLANDC__) # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ }; \ BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ class BOOST_PP_CAT(name,_rebind) \ { \ public: \ template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ : name< BOOST_MPL_PP_PARAMS(i,U) > \ { \ }; \ /**/ # else # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ }; \ BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ class BOOST_PP_CAT(name,_rebind) \ { \ public: \ template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ { \ typedef typename name< BOOST_MPL_PP_PARAMS(i,U) >::type type; \ }; \ /**/ # endif // __BORLANDC__ #endif // __EDG_VERSION__ #endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT #endif // BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/largest_int.hpp000644 000765 000024 00000004051 12233035540 022712 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_LARGEST_INT_HPP_INCLUDED #define BOOST_MPL_AUX_LARGEST_INT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: largest_int.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename T > struct integral_rank; template<> struct integral_rank : int_<1> {}; template<> struct integral_rank : int_<2> {}; template<> struct integral_rank : int_<3> {}; template<> struct integral_rank : int_<4> {}; #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) template<> struct integral_rank : int_<5> {}; #endif template<> struct integral_rank : int_<6> {}; template<> struct integral_rank : int_<7> {}; template<> struct integral_rank : int_<8> {}; template<> struct integral_rank : int_<9> {}; template<> struct integral_rank : int_<10> {}; template<> struct integral_rank : int_<11> {}; #if defined(BOOST_HAS_LONG_LONG) template<> struct integral_rank : int_<12> {}; template<> struct integral_rank: int_<13> {}; #endif template< typename T1, typename T2 > struct largest_int #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) : if_c< ( integral_rank::value >= integral_rank::value ) , T1 , T2 > { #else { enum { rank1 = integral_rank::value }; enum { rank2 = integral_rank::value }; typedef typename if_c< (rank1 >= rank2),T1,T2 >::type type; #endif }; }}} #endif // BOOST_MPL_AUX_LARGEST_INT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/logical_op.hpp000644 000765 000024 00000011044 12233035540 022507 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: logical_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include #endif #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { # define AUX778076_PARAMS(param, sub) \ BOOST_MPL_PP_PARAMS( \ BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, sub) \ , param \ ) \ /**/ # define AUX778076_SHIFTED_PARAMS(param, sub) \ BOOST_MPL_PP_EXT_PARAMS( \ 2, BOOST_MPL_PP_SUB(BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY), sub) \ , param \ ) \ /**/ # define AUX778076_SPEC_PARAMS(param) \ BOOST_MPL_PP_ENUM( \ BOOST_PP_DEC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ , param \ ) \ /**/ namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< bool C_, AUX778076_PARAMS(typename T, 1) > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) : BOOST_PP_CAT(AUX778076_OP_VALUE1,_) { }; template< AUX778076_PARAMS(typename T, 1) > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< AUX778076_OP_VALUE2,AUX778076_PARAMS(T, 1) > : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , AUX778076_SHIFTED_PARAMS(T, 1) , BOOST_PP_CAT(AUX778076_OP_VALUE2,_) > { }; template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< AUX778076_OP_VALUE2 , AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) > : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) { }; #else template< bool C_ > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) { template< AUX778076_PARAMS(typename T, 1) > struct result_ : BOOST_PP_CAT(AUX778076_OP_VALUE1,_) { }; }; template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) { template< AUX778076_PARAMS(typename T, 1) > struct result_ : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< AUX778076_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX778076_OP_VALUE2,_) > { }; #if BOOST_WORKAROUND(BOOST_MSVC, == 1300) template<> struct result_ : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) { }; }; #else }; template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) ::result_< AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) > : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) { }; #endif // BOOST_MSVC == 1300 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename T, BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) > struct AUX778076_OP_NAME #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , AUX778076_SHIFTED_PARAMS(T,0) > #else : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< AUX778076_SHIFTED_PARAMS(T,0) > #endif { BOOST_MPL_AUX_LAMBDA_SUPPORT( BOOST_MPL_LIMIT_METAFUNCTION_ARITY , AUX778076_OP_NAME , (AUX778076_PARAMS(T, 0)) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , BOOST_MPL_LIMIT_METAFUNCTION_ARITY , AUX778076_OP_NAME ) }} #undef AUX778076_SPEC_PARAMS #undef AUX778076_SHIFTED_PARAMS #undef AUX778076_PARAMS #undef AUX778076_OP_NAME #undef AUX778076_OP_VALUE1 #undef AUX778076_OP_VALUE2 passenger-4.0.37/ext/boost/mpl/aux_/msvc_dtw.hpp000644 000765 000024 00000003471 12233035540 022232 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: msvc_dtw.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! #include // local macros, #undef-ined at the end of the header #define AUX778076_DTW_PARAMS(param) \ BOOST_MPL_PP_PARAMS(AUX778076_MSVC_DTW_ARITY, param) \ /**/ #define AUX778076_DTW_ORIGINAL_NAME \ AUX778076_MSVC_DTW_ORIGINAL_NAME \ /**/ // warning: not a well-formed C++ // workaround for MSVC 6.5's "dependent template typedef bug" template< typename F> struct AUX778076_MSVC_DTW_NAME { template< bool > struct f_ : F {}; template<> struct f_ { #if AUX778076_MSVC_DTW_ARITY > 0 template< AUX778076_DTW_PARAMS(typename P) > struct AUX778076_DTW_ORIGINAL_NAME { typedef int type; }; }; template< AUX778076_DTW_PARAMS(typename T) > struct result_ : f_< aux::msvc_never_true::value > ::template AUX778076_DTW_ORIGINAL_NAME< AUX778076_DTW_PARAMS(T) > { }; #else template< typename P = int > struct AUX778076_DTW_ORIGINAL_NAME { typedef int type; }; }; template< typename T = int > struct result_ : f_< aux::msvc_never_true::value > ::template AUX778076_DTW_ORIGINAL_NAME<> { }; #endif }; #undef AUX778076_DTW_ORIGINAL_NAME #undef AUX778076_DTW_PARAMS #undef AUX778076_MSVC_DTW_NAME #undef AUX778076_MSVC_DTW_ORIGINAL_NAME #undef AUX778076_MSVC_DTW_ARITY passenger-4.0.37/ext/boost/mpl/aux_/msvc_eti_base.hpp000644 000765 000024 00000003364 12233035540 023210 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED #define BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: msvc_eti_base.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { namespace aux { #if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) template< bool > struct msvc_eti_base_impl { template< typename T > struct result_ : T { typedef T type; }; }; template<> struct msvc_eti_base_impl { template< typename T > struct result_ { typedef result_ type; typedef result_ first; typedef result_ second; typedef result_ tag; enum { value = 0 }; }; }; template< typename T > struct msvc_eti_base : msvc_eti_base_impl< is_msvc_eti_arg::value > ::template result_ { }; #else // !BOOST_MPL_CFG_MSVC_70_ETI_BUG template< typename T > struct msvc_eti_base : T { #if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) msvc_eti_base(); #endif typedef T type; }; #endif template<> struct msvc_eti_base { typedef msvc_eti_base type; typedef msvc_eti_base first; typedef msvc_eti_base second; typedef msvc_eti_base tag; enum { value = 0 }; }; }}} #endif // BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/msvc_is_class.hpp000644 000765 000024 00000003075 12233035540 023234 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED #define BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: msvc_is_class.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename T > struct is_class_helper { typedef int (T::* type)(); }; // MSVC 6.x-specific lightweight 'is_class' implementation; // Distinguishing feature: does not instantiate the type being tested. template< typename T > struct msvc_is_class_impl { template< typename U> static yes_tag test(type_wrapper*, /*typename*/ is_class_helper::type = 0); static no_tag test(void const volatile*, ...); enum { value = sizeof(test((type_wrapper*)0)) == sizeof(yes_tag) }; typedef bool_ type; }; // agurt, 17/sep/04: have to check for 'is_reference' upfront to avoid ICEs in // complex metaprograms template< typename T > struct msvc_is_class : if_< is_reference , false_ , msvc_is_class_impl >::type { }; }}} #endif // BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/msvc_never_true.hpp000644 000765 000024 00000001531 12233035540 023605 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED #define BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: msvc_never_true.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) namespace boost { namespace mpl { namespace aux { template< typename T > struct msvc_never_true { enum { value = false }; }; }}} #endif // BOOST_MSVC #endif // BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/msvc_type.hpp000644 000765 000024 00000002443 12233035540 022413 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED #define BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: msvc_type.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { namespace aux { #if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) template< bool > struct msvc_type_impl { template< typename T > struct result_ { typedef typename T::type type; }; }; template<> struct msvc_type_impl { template< typename T > struct result_ { typedef result_ type; }; }; template< typename T > struct msvc_type : msvc_type_impl< is_msvc_eti_arg::value > ::template result_ { }; #else // BOOST_MPL_CFG_MSVC_70_ETI_BUG template< typename T > struct msvc_type { typedef typename T::type type; }; template<> struct msvc_type { typedef int type; }; #endif }}} #endif // BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/na.hpp000644 000765 000024 00000003322 12233035540 020775 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_NA_HPP_INCLUDED #define BOOST_MPL_AUX_NA_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: na.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { template< typename T > struct is_na : false_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using false_::value; #endif }; template<> struct is_na : true_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using true_::value; #endif }; template< typename T > struct is_not_na : true_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using true_::value; #endif }; template<> struct is_not_na : false_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using false_::value; #endif }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename T, typename U > struct if_na { typedef T type; }; template< typename U > struct if_na { typedef U type; }; #else template< typename T > struct if_na_impl { template< typename U > struct apply { typedef T type; }; }; template<> struct if_na_impl { template< typename U > struct apply { typedef U type; }; }; template< typename T, typename U > struct if_na : if_na_impl::template apply { }; #endif }} #endif // BOOST_MPL_AUX_NA_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/na_assert.hpp000644 000765 000024 00000002052 12233035540 022355 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED #define BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: na_assert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #if !BOOST_WORKAROUND(_MSC_FULL_VER, <= 140050601) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 243) # include # define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \ BOOST_MPL_ASSERT_NOT((boost::mpl::is_na)) \ /**/ #else # include # define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \ BOOST_STATIC_ASSERT(!boost::mpl::is_na::value) \ /**/ #endif #endif // BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/na_fwd.hpp000644 000765 000024 00000001412 12233035540 021633 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED #define BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: na_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN // n.a. == not available struct na { typedef na type; enum { value = 0 }; }; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(na) #endif // BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/na_spec.hpp000644 000765 000024 00000010713 12233035540 022011 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED #define BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: na_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #endif #include #include #include #include #include #include #include #include #include #include #define BOOST_MPL_AUX_NA_PARAMS(i) \ BOOST_MPL_PP_ENUM(i, na) \ /**/ #if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ namespace aux { \ template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \ struct arity< \ name< BOOST_MPL_AUX_NA_PARAMS(i) > \ , N \ > \ : int_< BOOST_MPL_LIMIT_METAFUNCTION_ARITY > \ { \ }; \ } \ /**/ #else # define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) /**/ #endif #define BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ template<> \ struct name< BOOST_MPL_AUX_NA_PARAMS(i) > \ { \ template< \ BOOST_MPL_PP_PARAMS(i, typename T) \ BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \ > \ struct apply \ : name< BOOST_MPL_PP_PARAMS(i, T) > \ { \ }; \ }; \ /**/ #if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ template<> \ struct lambda< \ name< BOOST_MPL_AUX_NA_PARAMS(i) > \ , void_ \ , true_ \ > \ { \ typedef false_ is_le; \ typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ }; \ template<> \ struct lambda< \ name< BOOST_MPL_AUX_NA_PARAMS(i) > \ , void_ \ , false_ \ > \ { \ typedef false_ is_le; \ typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ }; \ /**/ #else # define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ template< typename Tag > \ struct lambda< \ name< BOOST_MPL_AUX_NA_PARAMS(i) > \ , Tag \ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \ > \ { \ typedef false_ is_le; \ typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > result_; \ typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ }; \ /**/ #endif #if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ || defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ && defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) # define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \ namespace aux { \ template< BOOST_MPL_PP_PARAMS(j, typename T) > \ struct template_arity< \ name< BOOST_MPL_PP_PARAMS(j, T) > \ > \ : int_ \ { \ }; \ \ template<> \ struct template_arity< \ name< BOOST_MPL_PP_ENUM(i, na) > \ > \ : int_<-1> \ { \ }; \ } \ /**/ #else # define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/ #endif #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) # define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ template<> \ struct name< BOOST_MPL_PP_ENUM(i, int) > \ { \ typedef int type; \ enum { value = 0 }; \ }; \ /**/ #else # define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/ #endif #define BOOST_MPL_AUX_NA_PARAM(param) param = na #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \ BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, i, name) \ /**/ #define BOOST_MPL_AUX_NA_SPEC(i, name) \ BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \ BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ /**/ #define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \ BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \ /**/ #endif // BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/nested_type_wknd.hpp000644 000765 000024 00000002543 12233035540 023751 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED #define BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: nested_type_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x530)) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) namespace boost { namespace mpl { namespace aux { template< typename T > struct nested_type_wknd : T::type { }; }}} #if BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \ aux::nested_type_wknd \ /**/ #else # define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \ ::boost::mpl::aux::nested_type_wknd \ /**/ #endif #else // !BOOST_MPL_CFG_GCC et al. # define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) T::type #endif #endif // BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/nttp_decl.hpp000644 000765 000024 00000001670 12233035540 022357 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED #define BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: nttp_decl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if defined(BOOST_MPL_CFG_NTTP_BUG) typedef bool _mpl_nttp_bool; typedef int _mpl_nttp_int; typedef unsigned _mpl_nttp_unsigned; typedef long _mpl_nttp_long; # include # define BOOST_MPL_AUX_NTTP_DECL(T, x) BOOST_PP_CAT(_mpl_nttp_,T) x /**/ #else # define BOOST_MPL_AUX_NTTP_DECL(T, x) T x /**/ #endif #endif // BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/numeric_cast_utils.hpp000644 000765 000024 00000003530 12233035540 024274 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED #define BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: numeric_cast_utils.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { namespace aux { template< typename F , typename Tag1 , typename Tag2 > struct cast1st_impl { template< typename N1, typename N2 > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : apply_wrap2< F , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST,N1 >::type , N2 > { #else { typedef typename apply_wrap2< F , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST,N1 >::type , N2 >::type type; #endif }; }; template< typename F , typename Tag1 , typename Tag2 > struct cast2nd_impl { template< typename N1, typename N2 > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : apply_wrap2< F , N1 , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST,N2 >::type > { #else { typedef typename apply_wrap2< F , N1 , typename apply_wrap1< BOOST_MPL_AUX_NUMERIC_CAST,N2 >::type >::type type; #endif }; }; }}} #endif // BOOST_MPL_AUX_NUMERIC_CAST_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/numeric_op.hpp000644 000765 000024 00000020626 12233035540 022545 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: numeric_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include # include # include # include # include # include # include #endif #include #if defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ || defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include #if !defined(AUX778076_OP_ARITY) # define AUX778076_OP_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY #endif #if !defined(AUX778076_OP_IMPL_NAME) # define AUX778076_OP_IMPL_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_impl) #endif #if !defined(AUX778076_OP_TAG_NAME) # define AUX778076_OP_TAG_NAME BOOST_PP_CAT(AUX778076_OP_PREFIX,_tag) #endif namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct AUX778076_OP_IMPL_NAME : if_c< ( tag1_ > tag2_ ) #else > struct AUX778076_OP_IMPL_NAME : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) #endif , aux::cast2nd_impl< AUX778076_OP_IMPL_NAME,Tag1,Tag2 > , aux::cast1st_impl< AUX778076_OP_IMPL_NAME,Tag1,Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct AUX778076_OP_IMPL_NAME { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Tag > struct AUX778076_OP_IMPL_NAME { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct AUX778076_OP_IMPL_NAME { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; #else template<> struct AUX778076_OP_IMPL_NAME { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct AUX778076_OP_IMPL_NAME { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; #endif #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && BOOST_WORKAROUND(BOOST_MSVC, >= 1300) template< typename T > struct AUX778076_OP_TAG_NAME : tag { }; #else template< typename T > struct AUX778076_OP_TAG_NAME { typedef typename T::tag type; }; #endif #if AUX778076_OP_ARITY != 2 # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # define AUX778076_OP_RIGHT_OPERAND(unused, i, N) , BOOST_PP_CAT(N, BOOST_MPL_PP_ADD(i, 2))> # define AUX778076_OP_N_CALLS(i, N) \ BOOST_MPL_PP_REPEAT( BOOST_PP_DEC(i), BOOST_MPL_PP_REPEAT_IDENTITY_FUNC, AUX778076_OP_NAME< ) \ N1 BOOST_MPL_PP_REPEAT( BOOST_MPL_PP_SUB(i, 1), AUX778076_OP_RIGHT_OPERAND, N ) \ /**/ template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na) > struct AUX778076_OP_NAME : AUX778076_OP_N_CALLS(AUX778076_OP_ARITY, N) { BOOST_MPL_AUX_LAMBDA_SUPPORT( AUX778076_OP_ARITY , AUX778076_OP_NAME , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) ) ) }; #define BOOST_PP_ITERATION_PARAMS_1 \ (3,( BOOST_PP_DEC(AUX778076_OP_ARITY), 2, )) #include BOOST_PP_ITERATE() # undef AUX778076_OP_N_CALLS # undef AUX778076_OP_RIGHT_OPERAND # else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct BOOST_PP_CAT(AUX778076_OP_NAME,2); template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename N, na) > struct AUX778076_OP_NAME #if BOOST_WORKAROUND(BOOST_MSVC, == 1300) : aux::msvc_eti_base< typename if_< #else : if_< #endif is_na , BOOST_PP_CAT(AUX778076_OP_NAME,2) , AUX778076_OP_NAME< BOOST_PP_CAT(AUX778076_OP_NAME,2) , BOOST_MPL_PP_EXT_PARAMS(3, BOOST_PP_INC(AUX778076_OP_ARITY), N) > >::type #if BOOST_WORKAROUND(BOOST_MSVC, == 1300) > #endif { BOOST_MPL_AUX_LAMBDA_SUPPORT( AUX778076_OP_ARITY , AUX778076_OP_NAME , ( BOOST_MPL_PP_PARAMS(AUX778076_OP_ARITY, N) ) ) }; template< typename N1 , typename N2 > struct BOOST_PP_CAT(AUX778076_OP_NAME,2) #endif #else // AUX778076_OP_ARITY == 2 template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct AUX778076_OP_NAME #endif #if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) : AUX778076_OP_IMPL_NAME< typename AUX778076_OP_TAG_NAME::type , typename AUX778076_OP_TAG_NAME::type >::template apply::type #else : aux::msvc_eti_base< typename apply_wrap2< AUX778076_OP_IMPL_NAME< typename AUX778076_OP_TAG_NAME::type , typename AUX778076_OP_TAG_NAME::type > , N1 , N2 >::type >::type #endif { #if AUX778076_OP_ARITY != 2 # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( AUX778076_OP_ARITY , AUX778076_OP_NAME , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(2, N, na) ) ) # else BOOST_MPL_AUX_LAMBDA_SUPPORT(2, BOOST_PP_CAT(AUX778076_OP_NAME,2), (N1, N2)) # endif #else BOOST_MPL_AUX_LAMBDA_SUPPORT(2, AUX778076_OP_NAME, (N1, N2)) #endif }; BOOST_MPL_AUX_NA_SPEC2(2, AUX778076_OP_ARITY, AUX778076_OP_NAME) }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS ///// iteration, depth == 1 // For gcc 4.4 compatability, we must include the // BOOST_PP_ITERATION_DEPTH test inside an #else clause. #else // BOOST_PP_IS_ITERATING #if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) template< BOOST_MPL_PP_PARAMS(i_, typename N) > struct AUX778076_OP_NAME #if i_ != 2 : AUX778076_OP_N_CALLS(i_, N) { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( AUX778076_OP_ARITY , AUX778076_OP_NAME , ( BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(i_, N, na) ) ) }; #endif # undef i_ #endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/aux_/O1_size_impl.hpp000644 000765 000024 00000004247 12233035540 022740 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED #define BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: O1_size_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { // default implementation - returns 'Sequence::size' if sequence has a 'size' // member, and -1 otherwise; conrete sequences might override it by // specializing either the 'O1_size_impl' or the primary 'O1_size' template # if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ && !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) namespace aux { template< typename Sequence > struct O1_size_impl : Sequence::size { }; } template< typename Tag > struct O1_size_impl { template< typename Sequence > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : if_< aux::has_size , aux::O1_size_impl , long_<-1> >::type { #else { typedef typename if_< aux::has_size , aux::O1_size_impl , long_<-1> >::type type; BOOST_STATIC_CONSTANT(long, value = (if_< aux::has_size , aux::O1_size_impl , long_<-1> >::type::value) ); #endif }; }; # else // BOOST_MSVC template< typename Tag > struct O1_size_impl { template< typename Sequence > struct apply : long_<-1> { }; }; # endif }} #endif // BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/order_impl.hpp000644 000765 000024 00000004151 12233035540 022534 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: order_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { // default implementation; requires 'Seq' to provide corresponding overloads // of BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY template< typename Seq, typename Key > struct x_order_impl #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 245) { BOOST_STATIC_CONSTANT(long, value = sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY( Seq , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*, 0) ) ) ); typedef long_ type; #else // ISO98 C++ : long_< sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY( Seq , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*, 0) ) ) > { #endif }; template< typename Tag > struct order_impl { template< typename Seq, typename Key > struct apply : if_< typename has_key_impl::template apply , x_order_impl , void_ >::type { }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,order_impl) }} #endif // BOOST_MPL_AUX_ORDER_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/overload_names.hpp000644 000765 000024 00000004136 12233035540 023401 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED #define BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: overload_names.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) # include # define BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY operator/ # define BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER operator| # define BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY operator|| # define BOOST_MPL_AUX_OVERLOAD_IS_MASKED operator% # define BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) / x # define BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) | x # define BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) || x # define BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) % x #else # define BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY value_by_key_ # define BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER item_by_order_ # define BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY order_by_key_ # define BOOST_MPL_AUX_OVERLOAD_IS_MASKED is_masked_ # define BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY(T, x) T::BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY( BOOST_MPL_AUX_PTR_TO_REF(T), x ) # define BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER(T, x) T::BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER( BOOST_MPL_AUX_PTR_TO_REF(T), x ) # define BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(T, x) T::BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY( BOOST_MPL_AUX_PTR_TO_REF(T), x ) # define BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(T, x) T::BOOST_MPL_AUX_OVERLOAD_IS_MASKED( BOOST_MPL_AUX_PTR_TO_REF(T), x ) #endif #endif // BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/partition_op.hpp000644 000765 000024 00000002735 12233035540 023115 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED #define BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED // Copyright Eric Friedman 2003 // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: partition_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Pred, typename In1Op, typename In2Op > struct partition_op { template< typename State, typename T > struct apply { typedef typename State::first first_; typedef typename State::second second_; typedef typename apply1< Pred,T >::type pred_; typedef typename eval_if< pred_ , apply2 , apply2 >::type result_; typedef typename if_< pred_ , pair< result_,second_ > , pair< first_,result_ > >::type type; }; }; } // namespace aux BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::partition_op) }} #endif // BOOST_MPL_AUX_PARTITION_OP_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/pop_back_impl.hpp000644 000765 000024 00000001624 12233035540 023201 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_POP_BACK_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_POP_BACK_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: pop_back_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { // no default implementation; the definition is needed to make MSVC happy template< typename Tag > struct pop_back_impl { template< typename Sequence > struct apply; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, pop_back_impl) }} #endif // BOOST_MPL_AUX_POP_BACK_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/pop_front_impl.hpp000644 000765 000024 00000002247 12233035540 023433 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: pop_front_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { // no default implementation; the definition is needed to make MSVC happy template< typename Tag > struct pop_front_impl { template< typename Sequence > struct apply // conservatively placed, but maybe should go outside surrounding // braces. #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) { typedef int type; } #endif ; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, pop_front_impl) }} #endif // BOOST_MPL_AUX_POP_FRONT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/000755 000765 000024 00000000000 12233035540 022364 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/000755 000765 000024 00000000000 12233035540 022414 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/ptr_to_ref.hpp000644 000765 000024 00000002264 12233035540 022546 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED #define BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: ptr_to_ref.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ || ( BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \ && !(defined(__STD_STRICT_ANSI) \ || defined(__STD_STRICT_ANSI_ERRORS)) ) # define BOOST_MPL_AUX_PTR_TO_REF(X) \ *BOOST_MPL_AUX_STATIC_CAST(X*, 0) \ /**/ #else # define BOOST_MPL_AUX_PTR_TO_REF(X) \ aux::ptr_to_ref(BOOST_MPL_AUX_STATIC_CAST(X*, 0)) \ /**/ #endif namespace boost { namespace mpl { namespace aux { template< typename T > static T const& ptr_to_ref(T*); }}} #endif // BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/push_back_impl.hpp000644 000765 000024 00000004210 12233035540 023354 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: push_back_impl.hpp 55679 2009-08-20 07:50:16Z agurtovoy $ // $Date: 2009-08-20 00:50:16 -0700 (Thu, 20 Aug 2009) $ // $Revision: 55679 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { struct has_push_back_arg {}; // agurt 05/feb/04: no default implementation; the stub definition is needed // to enable the default 'has_push_back' implementation below template< typename Tag > struct push_back_impl { template< typename Sequence, typename T > struct apply { // should be instantiated only in the context of 'has_push_back_impl'; // if you've got an assert here, you are requesting a 'push_back' // specialization that doesn't exist. BOOST_MPL_ASSERT_MSG( ( boost::is_same< T, has_push_back_arg >::value ) , REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST , ( Sequence ) ); }; }; template< typename Tag > struct has_push_back_impl { template< typename Seq > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : aux::has_type< push_back< Seq, has_push_back_arg > > { #else { typedef aux::has_type< push_back< Seq, has_push_back_arg > > type; BOOST_STATIC_CONSTANT(bool, value = (aux::has_type< push_back< Seq, has_push_back_arg > >::value) ); #endif }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, push_back_impl) BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, has_push_back_impl) }} #endif // BOOST_MPL_AUX_PUSH_BACK_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/push_front_impl.hpp000644 000765 000024 00000004236 12233035540 023614 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: push_front_impl.hpp 55679 2009-08-20 07:50:16Z agurtovoy $ // $Date: 2009-08-20 00:50:16 -0700 (Thu, 20 Aug 2009) $ // $Revision: 55679 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { struct has_push_front_arg {}; // agurt 05/feb/04: no default implementation; the stub definition is needed // to enable the default 'has_push_front' implementation below template< typename Tag > struct push_front_impl { template< typename Sequence, typename T > struct apply { // should be instantiated only in the context of 'has_push_front_impl'; // if you've got an assert here, you are requesting a 'push_front' // specialization that doesn't exist. BOOST_MPL_ASSERT_MSG( ( boost::is_same< T, has_push_front_arg >::value ) , REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST , ( Sequence ) ); }; }; template< typename Tag > struct has_push_front_impl { template< typename Seq > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : aux::has_type< push_front< Seq, has_push_front_arg > > { #else { typedef aux::has_type< push_front< Seq, has_push_front_arg > > type; BOOST_STATIC_CONSTANT(bool, value = (aux::has_type< push_front< Seq, has_push_front_arg > >::value) ); #endif }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, push_front_impl) BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, has_push_front_impl) }} #endif // BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/range_c/000755 000765 000024 00000000000 12233035540 021264 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/reverse_fold_impl.hpp000644 000765 000024 00000002734 12233035540 024105 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: reverse_fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) # include # include # endif #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER reverse_fold_impl.hpp # include #else # define AUX778076_FOLD_IMPL_OP(iter) typename deref::type # define AUX778076_FOLD_IMPL_NAME_PREFIX reverse_fold # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/reverse_fold_impl_body.hpp000644 000765 000024 00000024740 12233035540 025123 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! #if !defined(BOOST_PP_IS_ITERATING) // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: reverse_fold_impl_body.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ # include # include # include # include # include # include # include # include # include // local macros, #undef-ined at the end of the header # define AUX778076_ITER_FOLD_FORWARD_STEP(unused, n_, unused2) \ typedef typename apply2< \ ForwardOp \ , BOOST_PP_CAT(fwd_state,n_) \ , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,n_)) \ >::type BOOST_PP_CAT(fwd_state,BOOST_PP_INC(n_)); \ typedef typename mpl::next::type \ BOOST_PP_CAT(iter,BOOST_PP_INC(n_)); \ /**/ # define AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC(n_) \ typedef typename apply2< \ BackwardOp \ , BOOST_PP_CAT(bkwd_state,n_) \ , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,BOOST_PP_DEC(n_))) \ >::type BOOST_PP_CAT(bkwd_state,BOOST_PP_DEC(n_)); \ /**/ # define AUX778076_ITER_FOLD_BACKWARD_STEP(unused, n_, j) \ AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC( \ BOOST_PP_SUB_D(1,j,n_) \ ) \ /**/ # define AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(n_) \ typedef typename nested_chunk::state BOOST_PP_CAT(bkwd_state,n_); /**/ # define AUX778076_FOLD_IMPL_NAME \ BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \ /**/ # define AUX778076_FOLD_CHUNK_NAME \ BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \ /**/ namespace boost { namespace mpl { namespace aux { /// forward declaration template< BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME { typedef First iter0; typedef State fwd_state0; BOOST_MPL_PP_REPEAT( BOOST_MPL_LIMIT_UNROLLING , AUX778076_ITER_FOLD_FORWARD_STEP , unused ) typedef AUX778076_FOLD_IMPL_NAME< ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) , BOOST_PP_CAT(iter,BOOST_MPL_LIMIT_UNROLLING) , Last , BOOST_PP_CAT(fwd_state,BOOST_MPL_LIMIT_UNROLLING) , BackwardOp , ForwardOp > nested_chunk; AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_LIMIT_UNROLLING) BOOST_MPL_PP_REPEAT( BOOST_MPL_LIMIT_UNROLLING , AUX778076_ITER_FOLD_BACKWARD_STEP , BOOST_MPL_LIMIT_UNROLLING ) typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; // fallback implementation for sequences of unknown size template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME<-1,First,Last,State,BackwardOp,ForwardOp> { typedef AUX778076_FOLD_IMPL_NAME< -1 , typename mpl::next::type , Last , typename apply2::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , AUX778076_FOLD_IMPL_OP(First) >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME<-1,Last,Last,State,BackwardOp,ForwardOp> { typedef State state; typedef Last iterator; }; #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct AUX778076_FOLD_CHUNK_NAME; # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct AUX778076_FOLD_CHUNK_NAME { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; BOOST_MPL_PP_REPEAT( BOOST_MPL_LIMIT_UNROLLING , AUX778076_ITER_FOLD_FORWARD_STEP , unused ) typedef AUX778076_FOLD_IMPL_NAME< ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) , BOOST_PP_CAT(iter,BOOST_MPL_LIMIT_UNROLLING) , Last , BOOST_PP_CAT(fwd_state,BOOST_MPL_LIMIT_UNROLLING) , BackwardOp , ForwardOp > nested_chunk; AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_LIMIT_UNROLLING) BOOST_MPL_PP_REPEAT( BOOST_MPL_LIMIT_UNROLLING , AUX778076_ITER_FOLD_BACKWARD_STEP , BOOST_MPL_LIMIT_UNROLLING ) typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; // fallback implementation for sequences of unknown size template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step); template< typename Last , typename State > struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) { typedef Last iterator; typedef State state; }; template<> struct AUX778076_FOLD_CHUNK_NAME<-1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same::type , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) /// ETI workaround template<> struct result_ { typedef int state; typedef int iterator; }; #endif }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) { typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_< typename mpl::next::type , Last , typename apply2::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , AUX778076_FOLD_IMPL_OP(First) >::type state; typedef typename nested_step::iterator iterator; }; template< BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME : AUX778076_FOLD_CHUNK_NAME ::template result_ { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION }}} # undef AUX778076_FIRST_BACKWARD_STATE_TYPEDEF # undef AUX778076_ITER_FOLD_BACKWARD_STEP # undef AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC # undef AUX778076_ITER_FOLD_FORWARD_STEP #undef AUX778076_FOLD_IMPL_OP #undef AUX778076_FOLD_IMPL_NAME_PREFIX ///// iteration #else # define n_ BOOST_PP_FRAME_ITERATION(1) #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME { typedef First iter0; typedef State fwd_state0; BOOST_MPL_PP_REPEAT( n_ , AUX778076_ITER_FOLD_FORWARD_STEP , unused ) typedef BOOST_PP_CAT(fwd_state,n_) BOOST_PP_CAT(bkwd_state,n_); BOOST_MPL_PP_REPEAT( n_ , AUX778076_ITER_FOLD_BACKWARD_STEP , n_ ) typedef bkwd_state0 state; typedef BOOST_PP_CAT(iter,n_) iterator; }; #else template<> struct AUX778076_FOLD_CHUNK_NAME { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; BOOST_MPL_PP_REPEAT( n_ , AUX778076_ITER_FOLD_FORWARD_STEP , unused ) typedef BOOST_PP_CAT(fwd_state,n_) BOOST_PP_CAT(bkwd_state,n_); BOOST_MPL_PP_REPEAT( n_ , AUX778076_ITER_FOLD_BACKWARD_STEP , n_ ) typedef bkwd_state0 state; typedef BOOST_PP_CAT(iter,n_) iterator; }; #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) /// ETI workaround template<> struct result_ { typedef int state; typedef int iterator; }; #endif }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # undef n_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/aux_/reverse_iter_fold_impl.hpp000644 000765 000024 00000002705 12233035540 025126 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: reverse_iter_fold_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) # include # include # endif #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER reverse_iter_fold_impl.hpp # include #else # define AUX778076_FOLD_IMPL_OP(iter) iter # define AUX778076_FOLD_IMPL_NAME_PREFIX reverse_iter_fold # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/sequence_wrapper.hpp000644 000765 000024 00000020135 12233035540 023750 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION #if !defined(BOOST_PP_IS_ITERATING) ///// header body // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: sequence_wrapper.hpp 49271 2008-10-11 06:46:00Z agurtovoy $ // $Date: 2008-10-10 23:46:00 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49271 $ # include # include # include # include # include # include # include # include # include # include # include #if defined(BOOST_MPL_PREPROCESSING_MODE) # undef LONG_MAX #endif namespace boost { namespace mpl { #if !defined(AUX778076_SEQUENCE_BASE_NAME) # define AUX778076_SEQUENCE_BASE_NAME AUX778076_SEQUENCE_NAME #endif #if !defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER) # define AUX778076_SEQUENCE_PARAM_NAME T # define AUX778076_SEQUENCE_TEMPLATE_PARAM typename T # define AUX778076_SEQUENCE_DEFAULT na # define AUX778076_SEQUENCE_NAME_N(n) \ BOOST_PP_CAT(AUX778076_SEQUENCE_BASE_NAME,n) \ /**/ # define AUX778076_SEQUENCE_PARAMS() \ BOOST_PP_ENUM_PARAMS( \ AUX778076_SEQUENCE_LIMIT \ , AUX778076_SEQUENCE_TEMPLATE_PARAM \ ) \ /**/ # define AUX778076_SEQUENCE_ARGS() \ BOOST_PP_ENUM_PARAMS( \ AUX778076_SEQUENCE_LIMIT \ , T \ ) \ /**/ # define AUX778076_SEQUENCE_DEFAULT_PARAMS() \ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ AUX778076_SEQUENCE_LIMIT \ , AUX778076_SEQUENCE_TEMPLATE_PARAM \ , AUX778076_SEQUENCE_DEFAULT \ ) \ /**/ # define AUX778076_SEQUENCE_N_PARAMS(n) \ BOOST_PP_ENUM_PARAMS(n, AUX778076_SEQUENCE_TEMPLATE_PARAM) \ /**/ # define AUX778076_SEQUENCE_N_ARGS(n) \ BOOST_PP_ENUM_PARAMS(n, T) \ /**/ # define AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(n) \ BOOST_PP_ENUM_PARAMS(n, T) \ BOOST_PP_COMMA_IF(n) \ BOOST_PP_ENUM( \ BOOST_PP_SUB_D(1,AUX778076_SEQUENCE_LIMIT,n) \ , BOOST_PP_TUPLE_ELEM_3_2 \ , AUX778076_SEQUENCE_DEFAULT \ ) \ /**/ #else // AUX778076_SEQUENCE_INTEGRAL_WRAPPER # define AUX778076_SEQUENCE_PARAM_NAME C # define AUX778076_SEQUENCE_TEMPLATE_PARAM BOOST_MPL_AUX_NTTP_DECL(long, C) # define AUX778076_SEQUENCE_DEFAULT LONG_MAX # define AUX778076_SEQUENCE_PARAMS() \ typename T, BOOST_PP_ENUM_PARAMS( \ AUX778076_SEQUENCE_LIMIT \ , AUX778076_SEQUENCE_TEMPLATE_PARAM \ ) \ /**/ # define AUX778076_SEQUENCE_ARGS() \ T, BOOST_PP_ENUM_PARAMS( \ AUX778076_SEQUENCE_LIMIT \ , C \ ) \ /**/ # define AUX778076_SEQUENCE_DEFAULT_PARAMS() \ typename T, \ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ AUX778076_SEQUENCE_LIMIT \ , AUX778076_SEQUENCE_TEMPLATE_PARAM \ , AUX778076_SEQUENCE_DEFAULT \ ) \ /**/ # define AUX778076_SEQUENCE_N_PARAMS(n) \ typename T BOOST_PP_COMMA_IF(n) \ BOOST_PP_ENUM_PARAMS(n, AUX778076_SEQUENCE_TEMPLATE_PARAM) \ /**/ # if !defined(AUX778076_SEQUENCE_CONVERT_CN_TO) # define AUX778076_SEQUENCE_CONVERT_CN_TO(z,n,TARGET) BOOST_PP_CAT(C,n) # endif # define AUX778076_SEQUENCE_N_ARGS(n) \ T BOOST_PP_COMMA_IF(n) \ BOOST_PP_ENUM(n,AUX778076_SEQUENCE_CONVERT_CN_TO,T) \ /**/ # define AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(n) \ T, BOOST_PP_ENUM_PARAMS(n, C) \ BOOST_PP_COMMA_IF(n) \ BOOST_PP_ENUM( \ BOOST_PP_SUB_D(1,AUX778076_SEQUENCE_LIMIT,n) \ , BOOST_PP_TUPLE_ELEM_3_2 \ , AUX778076_SEQUENCE_DEFAULT \ ) \ /**/ #endif // AUX778076_SEQUENCE_INTEGRAL_WRAPPER #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) // forward declaration template< AUX778076_SEQUENCE_DEFAULT_PARAMS() > struct AUX778076_SEQUENCE_NAME; #else namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser); } #endif #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, AUX778076_SEQUENCE_LIMIT, )) #include BOOST_PP_ITERATE() // real C++ version is already taken care of #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace aux { // ???_count_args #define AUX778076_COUNT_ARGS_PREFIX AUX778076_SEQUENCE_NAME #define AUX778076_COUNT_ARGS_DEFAULT AUX778076_SEQUENCE_DEFAULT #define AUX778076_COUNT_ARGS_PARAM_NAME AUX778076_SEQUENCE_PARAM_NAME #define AUX778076_COUNT_ARGS_TEMPLATE_PARAM AUX778076_SEQUENCE_TEMPLATE_PARAM #define AUX778076_COUNT_ARGS_ARITY AUX778076_SEQUENCE_LIMIT #define AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES #include template< AUX778076_SEQUENCE_PARAMS() > struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl) { typedef aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_count_args)< BOOST_PP_ENUM_PARAMS(AUX778076_SEQUENCE_LIMIT, AUX778076_SEQUENCE_PARAM_NAME) > arg_num_; typedef typename aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser)< arg_num_::value > ::template result_< AUX778076_SEQUENCE_ARGS() >::type type; }; } // namespace aux template< AUX778076_SEQUENCE_DEFAULT_PARAMS() > struct AUX778076_SEQUENCE_NAME : aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl)< AUX778076_SEQUENCE_ARGS() >::type { typedef typename aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl)< AUX778076_SEQUENCE_ARGS() >::type type; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # undef AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS # undef AUX778076_SEQUENCE_N_ARGS # undef AUX778076_SEQUENCE_CONVERT_CN_TO # undef AUX778076_SEQUENCE_N_PARAMS # undef AUX778076_SEQUENCE_DEFAULT_PARAMS # undef AUX778076_SEQUENCE_ARGS # undef AUX778076_SEQUENCE_PARAMS # undef AUX778076_SEQUENCE_NAME_N # undef AUX778076_SEQUENCE_DEFAULT # undef AUX778076_SEQUENCE_TEMPLATE_PARAM # undef AUX778076_SEQUENCE_PARAM_NAME # undef AUX778076_SEQUENCE_LIMIT # undef AUX778076_SEQUENCE_BASE_NAME # undef AUX778076_SEQUENCE_NAME # undef AUX778076_SEQUENCE_INTEGRAL_WRAPPER }} ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #if i_ == AUX778076_SEQUENCE_LIMIT /// primary template (not a specialization!) template< AUX778076_SEQUENCE_N_PARAMS(i_) > struct AUX778076_SEQUENCE_NAME : AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) > { typedef typename AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; }; #else template< AUX778076_SEQUENCE_N_PARAMS(i_) > struct AUX778076_SEQUENCE_NAME< AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(i_) > : AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) > { #if i_ > 0 || defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER) typedef typename AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; #else typedef AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; #endif }; #endif // i_ == AUX778076_SEQUENCE_LIMIT # else namespace aux { template<> struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser) { template< AUX778076_SEQUENCE_PARAMS() > struct result_ { #if i_ > 0 || defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER) typedef typename AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; #else typedef AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; #endif }; }; } // namespace aux # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/aux_/shift_op.hpp000644 000765 000024 00000004461 12233035540 022217 0ustar00honglistaff000000 000000 // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: shift_op.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #if !defined(AUX778076_OP_PREFIX) # define AUX778076_OP_PREFIX AUX778076_OP_NAME #endif #define AUX778076_OP_ARITY 2 #include #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER AUX778076_OP_PREFIX.hpp # include #else # include # include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) namespace aux { template< typename T, typename Shift, T n, Shift s > struct BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd) { BOOST_STATIC_CONSTANT(T, value = (n AUX778076_OP_TOKEN s)); typedef integral_c type; }; } #endif template<> struct AUX778076_OP_IMPL_NAME { template< typename N, typename S > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value AUX778076_OP_TOKEN BOOST_MPL_AUX_VALUE_WKND(S)::value ) > #else : aux::BOOST_PP_CAT(AUX778076_OP_PREFIX,_wknd)< typename N::value_type , typename S::value_type , N::value , S::value >::type #endif { }; }; }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #undef AUX778076_OP_TAG_NAME #undef AUX778076_OP_IMPL_NAME #undef AUX778076_OP_ARITY #undef AUX778076_OP_PREFIX #undef AUX778076_OP_NAME #undef AUX778076_OP_TOKEN passenger-4.0.37/ext/boost/mpl/aux_/single_element_iter.hpp000644 000765 000024 00000005533 12233035540 024422 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED #define BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: single_element_iter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace aux { template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, is_last_) > struct sel_iter; template< typename T > struct sel_iter { typedef random_access_iterator_tag category; typedef sel_iter next; typedef T type; }; template< typename T > struct sel_iter { typedef random_access_iterator_tag category; typedef sel_iter prior; }; } // namespace aux template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, is_last_), typename Distance > struct advance< aux::sel_iter,Distance> { typedef aux::sel_iter< T , ( is_last_ + BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Distance) ) > type; }; template< typename T , BOOST_MPL_AUX_NTTP_DECL(int, l1) , BOOST_MPL_AUX_NTTP_DECL(int, l2) > struct distance< aux::sel_iter, aux::sel_iter > : int_<( l2 - l1 )> { }; #else namespace aux { struct sel_iter_tag; template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, is_last_) > struct sel_iter { enum { pos_ = is_last_ }; typedef aux::sel_iter_tag tag; typedef random_access_iterator_tag category; typedef sel_iter next; typedef sel_iter prior; typedef T type; }; } // namespace aux template<> struct advance_impl { template< typename Iterator, typename N > struct apply { enum { pos_ = Iterator::pos_, n_ = N::value }; typedef aux::sel_iter< typename Iterator::type , (pos_ + n_) > type; }; }; template<> struct distance_impl { template< typename Iter1, typename Iter2 > struct apply { enum { pos1_ = Iter1::pos_, pos2_ = Iter2::pos_ }; typedef int_<( pos2_ - pos1_ )> type; BOOST_STATIC_CONSTANT(int, value = ( pos2_ - pos1_ )); }; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION }} #endif // BOOST_MPL_AUX_SINGLE_ELEMENT_ITER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/size_impl.hpp000644 000765 000024 00000002626 12233035540 022400 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: size_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include namespace boost { namespace mpl { // default implementation; conrete sequences might override it by // specializing either the 'size_impl' or the primary 'size' template template< typename Tag > struct size_impl { template< typename Sequence > struct apply #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) : distance< typename begin::type , typename end::type > { #else { typedef typename distance< typename begin::type , typename end::type >::type type; #endif }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, size_impl) }} #endif // BOOST_MPL_AUX_SIZE_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/sort_impl.hpp000644 000765 000024 00000005651 12233035540 022416 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_SORT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_SORT_IMPL_HPP_INCLUDED // Copyright Eric Friedman 2002-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: sort_impl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Seq, typename Pred > struct quick_sort; // agurt, 10/nov/04: for the sake of deficeint compilers template< typename Pred, typename Pivot > struct quick_sort_pred { template< typename T > struct apply { typedef typename apply2::type type; }; }; template< typename Seq , typename Pred > struct quick_sort_impl { typedef typename begin::type pivot; typedef typename partition< iterator_range< typename next::type , typename end::type > , protect< aux::quick_sort_pred< Pred, typename deref::type > > , back_inserter< vector<> > , back_inserter< vector<> > >::type partitioned; typedef typename quick_sort< typename partitioned::first, Pred >::type part1; typedef typename quick_sort< typename partitioned::second, Pred >::type part2; typedef joint_view< joint_view< part1, single_view< typename deref::type > > , part2 > type; }; template< typename Seq , typename Pred > struct quick_sort : eval_if< empty , identity , quick_sort_impl > { }; template < typename Sequence , typename Pred , typename In > struct sort_impl { typedef typename quick_sort< Sequence , typename if_na >::type >::type result_; typedef typename copy::type type; }; template < typename Sequence , typename Pred , typename In > struct reverse_sort_impl { typedef typename quick_sort< Sequence , typename if_na >::type >::type result_; typedef typename reverse_copy::type type; }; }}} #endif // BOOST_MPL_AUX_SORT_IMPL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/static_cast.hpp000644 000765 000024 00000001556 12233035540 022707 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED #define BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: static_cast.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ || BOOST_WORKAROUND(__GNUC__, < 3) \ || BOOST_WORKAROUND(__MWERKS__, <= 0x3001) # define BOOST_MPL_AUX_STATIC_CAST(T, expr) (T)(expr) #else # define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast(expr) #endif #endif // BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/template_arity.hpp000644 000765 000024 00000011360 12233035540 023423 0ustar00honglistaff000000 000000 #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED #define BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: template_arity.hpp 61584 2010-04-26 18:48:26Z agurtovoy $ // $Date: 2010-04-26 11:48:26 -0700 (Mon, 26 Apr 2010) $ // $Revision: 61584 $ #include #include #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) # include # endif # else # include # endif #endif #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER template_arity.hpp # include #else # if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) # include # include # include # include # include # include # include # include # include # include # define AUX778076_ARITY BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) namespace boost { namespace mpl { namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity_tag { typedef char (&type)[N + 1]; }; # define AUX778076_MAX_ARITY_OP(unused, state, i_) \ ( BOOST_PP_CAT(C,i_) > 0 ? BOOST_PP_CAT(C,i_) : state ) \ /**/ template< BOOST_MPL_PP_PARAMS(AUX778076_ARITY, BOOST_MPL_AUX_NTTP_DECL(int, C)) > struct max_arity { BOOST_STATIC_CONSTANT(int, value = BOOST_PP_SEQ_FOLD_LEFT( AUX778076_MAX_ARITY_OP , -1 , BOOST_MPL_PP_RANGE(1, AUX778076_ARITY) ) ); }; # undef AUX778076_MAX_ARITY_OP arity_tag<0>::type arity_helper(...); # define BOOST_PP_ITERATION_LIMITS (1, AUX778076_ARITY) # define BOOST_PP_FILENAME_1 # include BOOST_PP_ITERATE() template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > struct template_arity_impl { BOOST_STATIC_CONSTANT(int, value = sizeof(::boost::mpl::aux::arity_helper(type_wrapper(),arity_tag())) - 1 ); }; # define AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION(unused, i_, F) \ BOOST_PP_COMMA_IF(i_) template_arity_impl::value \ /**/ template< typename F > struct template_arity { BOOST_STATIC_CONSTANT(int, value = ( max_arity< BOOST_MPL_PP_REPEAT( AUX778076_ARITY , AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION , F ) >::value )); typedef mpl::int_ type; }; # undef AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION # undef AUX778076_ARITY }}} # endif // BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING # else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT # include namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_<-1> { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) template<> struct template_arity : mpl::int_<-1> { }; #endif }}} # endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) template< template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F , BOOST_MPL_PP_PARAMS(i_, typename T) > typename arity_tag::type arity_helper(type_wrapper< F >, arity_tag); #undef i_ #endif // BOOST_PP_IS_ITERATING passenger-4.0.37/ext/boost/mpl/aux_/template_arity_fwd.hpp000644 000765 000024 00000001250 12233035540 024260 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED #define BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: template_arity_fwd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { namespace aux { template< typename F > struct template_arity; }}} #endif // BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/test/000755 000765 000024 00000000000 12233035540 020645 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/test.hpp000644 000765 000024 00000001500 12233035540 021352 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_TEST_HPP_INCLUDED #define BOOST_MPL_AUX_TEST_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: test.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include int main() { return boost::report_errors(); } using namespace boost; using namespace mpl; #endif // BOOST_MPL_AUX_TEST_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/traits_lambda_spec.hpp000644 000765 000024 00000003226 12233035540 024222 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED #define BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: traits_lambda_spec.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) /**/ #elif !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) # define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \ template<> struct trait \ { \ template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \ { \ }; \ }; \ /**/ #else # define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \ template<> struct trait \ { \ template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \ { \ }; \ }; \ template<> struct trait \ { \ template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \ { \ typedef int type; \ }; \ }; \ /**/ #endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT #define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(i, trait) \ BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \ template<> struct trait {}; \ /**/ #endif // BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/transform_iter.hpp000644 000765 000024 00000005275 12233035540 023446 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED #define BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: transform_iter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Iterator , typename LastIterator , typename F > struct transform_iter { typedef Iterator base; typedef forward_iterator_tag category; typedef transform_iter< typename mpl::next::type,LastIterator,F > next; typedef typename apply1< F , typename deref::type >::type type; }; template< typename LastIterator , typename F > struct transform_iter< LastIterator,LastIterator,F > { typedef LastIterator base; typedef forward_iterator_tag category; }; #else template< typename Iterator , typename LastIterator , typename F > struct transform_iter; template< bool > struct transform_iter_impl { template< typename Iterator , typename LastIterator , typename F > struct result_ { typedef Iterator base; typedef forward_iterator_tag category; typedef transform_iter< typename mpl::next::type,LastIterator,F > next; typedef typename apply1< F , typename deref::type >::type type; }; }; template<> struct transform_iter_impl { template< typename Iterator , typename LastIterator , typename F > struct result_ { typedef Iterator base; typedef forward_iterator_tag category; }; }; template< typename Iterator , typename LastIterator , typename F > struct transform_iter : transform_iter_impl< ::boost::is_same::value >::template result_< Iterator,LastIterator,F > { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace aux BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::transform_iter) }} #endif // BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/type_wrapper.hpp000644 000765 000024 00000002414 12233035540 023121 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED #define BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Peter Dimov 2000-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: type_wrapper.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { namespace aux { template< typename T > struct type_wrapper { typedef T type; }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) // agurt 08/may/03: a complicated way to extract the wrapped type; need it // mostly for the sake of GCC (3.2.x), which ICEs if you try to extract the // nested 'type' from 'type_wrapper' when the latter was the result of a // 'typeof' expression template< typename T > struct wrapped_type; template< typename T > struct wrapped_type< type_wrapper > { typedef T type; }; #else template< typename W > struct wrapped_type { typedef typename W::type type; }; #endif }}} #endif // BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/unwrap.hpp000644 000765 000024 00000001623 12233035540 021715 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED #define BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED // Copyright Peter Dimov and Multi Media Ltd 2001, 2002 // Copyright David Abrahams 2001 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: unwrap.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include namespace boost { namespace mpl { namespace aux { template< typename F > inline F& unwrap(F& f, long) { return f; } template< typename F > inline F& unwrap(reference_wrapper& f, int) { return f; } template< typename F > inline F& unwrap(reference_wrapper const& f, int) { return f; } }}} #endif // BOOST_MPL_AUX_UNWRAP_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/value_wknd.hpp000644 000765 000024 00000004132 12233035540 022536 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED #define BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: value_wknd.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ || defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) # include namespace boost { namespace mpl { namespace aux { template< typename C_ > struct value_wknd : C_ { }; #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) template<> struct value_wknd : int_<1> { using int_<1>::value; }; #endif }}} #if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) # define BOOST_MPL_AUX_VALUE_WKND(C) \ ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::value_wknd< C > \ /**/ # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C) #else # define BOOST_MPL_AUX_VALUE_WKND(C) C # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) \ ::boost::mpl::aux::value_wknd< C > \ /**/ #endif #else // BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS # define BOOST_MPL_AUX_VALUE_WKND(C) C # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) C #endif #if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) # define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \ BOOST_MPL_AUX_STATIC_CAST(T, C::value) \ /**/ #else # define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \ BOOST_MPL_AUX_VALUE_WKND(C)::value \ /**/ #endif namespace boost { namespace mpl { namespace aux { template< typename T > struct value_type_wknd { typedef typename T::value_type type; }; #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) template<> struct value_type_wknd { typedef int type; }; #endif }}} #endif // BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/yes_no.hpp000644 000765 000024 00000002405 12233035540 021674 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_YES_NO_HPP_INCLUDED #define BOOST_MPL_AUX_YES_NO_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: yes_no.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include namespace boost { namespace mpl { namespace aux { typedef char (&no_tag)[1]; typedef char (&yes_tag)[2]; template< bool C_ > struct yes_no_tag { typedef no_tag type; }; template<> struct yes_no_tag { typedef yes_tag type; }; template< BOOST_MPL_AUX_NTTP_DECL(long, n) > struct weighted_tag { #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) typedef char (&type)[n]; #else char buf[n]; typedef weighted_tag type; #endif }; #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) template<> struct weighted_tag<0> { typedef char (&type)[1]; }; #endif }}} #endif // BOOST_MPL_AUX_YES_NO_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/test/assert.hpp000644 000765 000024 00000001767 12233035540 022672 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_TEST_ASSERT_HPP_INCLUDED #define BOOST_MPL_AUX_TEST_ASSERT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: assert.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #define MPL_ASSERT(pred) BOOST_MPL_ASSERT(pred) #define MPL_ASSERT_NOT(pred) BOOST_MPL_ASSERT_NOT(pred) #define MPL_ASSERT_MSG(c, msg, types) BOOST_MPL_ASSERT_MSG(c, msg, types) #define MPL_ASSERT_RELATION(x, rel, y) BOOST_MPL_ASSERT_RELATION(x, rel, y) #define MPL_ASSERT_INSTANTIATION(x) \ enum { BOOST_PP_CAT(instantiation_test, __LINE__) = sizeof( x ) } \ /**/ #endif // BOOST_MPL_AUX_TEST_ASSERT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/test/data.hpp000644 000765 000024 00000001273 12233035540 022272 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_TEST_DATA_HPP_INCLUDED #define BOOST_MPL_AUX_TEST_DATA_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: data.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include enum enum_ {}; struct UDT {}; struct incomplete; class abstract { public: virtual ~abstract() = 0; }; using boost::noncopyable; #endif // BOOST_MPL_AUX_TEST_DATA_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/test/test_case.hpp000644 000765 000024 00000001217 12233035540 023331 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_TEST_TEST_CASE_HPP_INCLUDED #define BOOST_MPL_AUX_TEST_TEST_CASE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: test_case.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #define MPL_TEST_CASE() void BOOST_PP_CAT(test,__LINE__)() #endif // BOOST_MPL_AUX_TEST_TEST_CASE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/range_c/back.hpp000644 000765 000024 00000001560 12233035540 022677 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_RANGE_C_BACK_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_BACK_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: back.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct back_impl< aux::half_open_range_tag > { template< typename Range > struct apply { typedef typename prior< typename Range::finish >::type type; }; }; }} #endif // BOOST_MPL_AUX_RANGE_C_BACK_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/range_c/empty.hpp000644 000765 000024 00000001637 12233035540 023142 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_RANGE_C_EMPTY_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_EMPTY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: empty.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct empty_impl< aux::half_open_range_tag > { template< typename Range > struct apply : equal_to< typename Range::start , typename Range::finish > { }; }; }} #endif // BOOST_MPL_AUX_RANGE_C_EMPTY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/range_c/front.hpp000644 000765 000024 00000001476 12233035540 023135 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_RANGE_C_FRONT_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: front.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include namespace boost { namespace mpl { template<> struct front_impl< aux::half_open_range_tag > { template< typename Range > struct apply { typedef typename Range::start type; }; }; }} #endif // BOOST_MPL_AUX_RANGE_C_FRONT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/range_c/iterator.hpp000644 000765 000024 00000005311 12233035540 023626 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_RANGE_C_ITERATOR_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_ITERATOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: iterator.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { // theoretically will work on any discrete numeric type template< typename N > struct r_iter { typedef aux::r_iter_tag tag; typedef random_access_iterator_tag category; typedef N type; #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) typedef r_iter< typename mpl::next::type > next; typedef r_iter< typename mpl::prior::type > prior; #endif }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename N > struct next< r_iter > { typedef r_iter< typename mpl::next::type > type; }; template< typename N > struct prior< r_iter > { typedef r_iter< typename mpl::prior::type > type; }; #endif template<> struct advance_impl { template< typename Iter, typename Dist > struct apply { typedef typename deref::type n_; #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) typedef typename plus_impl ::template apply::type m_; #else typedef typename plus::type m_; #endif // agurt, 10/nov/04: to be generic, the code have to do something along // the lines below... // // typedef typename apply_wrap1< // numeric_cast< typename m_::tag, typename n_::tag > // , m_ // >::type result_; // // ... meanwhile: typedef integral_c< typename aux::value_type_wknd::type , BOOST_MPL_AUX_VALUE_WKND(m_)::value > result_; typedef r_iter type; }; }; template<> struct distance_impl { template< typename Iter1, typename Iter2 > struct apply : minus< typename Iter2::type , typename Iter1::type > { }; }; }} #endif // BOOST_MPL_AUX_RANGE_C_ITERATOR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/range_c/O1_size.hpp000644 000765 000024 00000001474 12233035540 023314 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_RANGE_C_O1_SIZE_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_O1_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: O1_size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct O1_size_impl< aux::half_open_range_tag > : size_impl< aux::half_open_range_tag > { }; }} #endif // BOOST_MPL_AUX_RANGE_C_O1_SIZE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/range_c/size.hpp000644 000765 000024 00000001623 12233035540 022751 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_RANGE_C_SIZE_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: size.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include namespace boost { namespace mpl { template<> struct size_impl< aux::half_open_range_tag > { template< typename Range > struct apply : minus< typename Range::finish , typename Range::start > { }; }; }} #endif // BOOST_MPL_AUX_RANGE_C_SIZE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/range_c/tag.hpp000644 000765 000024 00000001205 12233035540 022546 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_RANGE_C_TAG_HPP_INCLUDED #define BOOST_MPL_AUX_RANGE_C_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: tag.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ namespace boost { namespace mpl { namespace aux { struct half_open_range_tag; struct r_iter_tag; }}} #endif // BOOST_MPL_AUX_RANGE_C_TAG_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/add.hpp000644 000765 000024 00000003644 12233035540 023664 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: add.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include #if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) # include # define BOOST_MPL_PP_ADD(i,j) \ BOOST_MPL_PP_ADD_DELAY(i,j) \ /**/ # define BOOST_MPL_PP_ADD_DELAY(i,j) \ BOOST_PP_CAT(BOOST_MPL_PP_TUPLE_11_ELEM_##i,BOOST_MPL_PP_ADD_##j) \ /**/ #else # define BOOST_MPL_PP_ADD(i,j) \ BOOST_MPL_PP_ADD_DELAY(i,j) \ /**/ # define BOOST_MPL_PP_ADD_DELAY(i,j) \ BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_ADD_##j \ /**/ #endif # define BOOST_MPL_PP_ADD_0 (0,1,2,3,4,5,6,7,8,9,10) # define BOOST_MPL_PP_ADD_1 (1,2,3,4,5,6,7,8,9,10,0) # define BOOST_MPL_PP_ADD_2 (2,3,4,5,6,7,8,9,10,0,0) # define BOOST_MPL_PP_ADD_3 (3,4,5,6,7,8,9,10,0,0,0) # define BOOST_MPL_PP_ADD_4 (4,5,6,7,8,9,10,0,0,0,0) # define BOOST_MPL_PP_ADD_5 (5,6,7,8,9,10,0,0,0,0,0) # define BOOST_MPL_PP_ADD_6 (6,7,8,9,10,0,0,0,0,0,0) # define BOOST_MPL_PP_ADD_7 (7,8,9,10,0,0,0,0,0,0,0) # define BOOST_MPL_PP_ADD_8 (8,9,10,0,0,0,0,0,0,0,0) # define BOOST_MPL_PP_ADD_9 (9,10,0,0,0,0,0,0,0,0,0) # define BOOST_MPL_PP_ADD_10 (10,0,0,0,0,0,0,0,0,0,0) #else # include # define BOOST_MPL_PP_ADD(i,j) \ BOOST_PP_ADD(i,j) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/def_params_tail.hpp000644 000765 000024 00000010753 12233035540 026245 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: def_params_tail.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include #include // BOOST_MPL_PP_DEF_PARAMS_TAIL(1,T,value): , T1 = value, .., Tn = value // BOOST_MPL_PP_DEF_PARAMS_TAIL(2,T,value): , T2 = value, .., Tn = value // BOOST_MPL_PP_DEF_PARAMS_TAIL(n,T,value): #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include # include # define BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, value_func) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_1( \ i \ , BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,i) \ , param \ , value_func \ ) \ /**/ # define BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_1(i, n, param, value_func) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_2(i,n,param,value_func) \ /**/ # define BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_2(i, n, param, value_func) \ BOOST_PP_COMMA_IF(BOOST_PP_AND(i,n)) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_##i(n,param,value_func) \ /**/ # define BOOST_MPL_PP_DEF_PARAMS_TAIL_0(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1 v(),p##2 v(),p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v()) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_1(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2 v(),p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_2(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_3(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_4(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_5(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4,p5) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_6(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4,p5,p6) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_7(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##8 v(),p##9 v(),p1,p2,p3,p4,p5,p6,p7) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_8(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##9 v(),p1,p2,p3,p4,p5,p6,p7,p8) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_9(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p1,p2,p3,p4,p5,p6,p7,p8,p9) #else # include # include # include # include # include # include # define BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC(unused, i, op) \ , BOOST_PP_CAT( \ BOOST_PP_TUPLE_ELEM(3, 1, op) \ , BOOST_PP_ADD_D(1, i, BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(3, 0, op))) \ ) BOOST_PP_TUPLE_ELEM(3, 2, op)() \ /**/ # define BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, value_func) \ BOOST_PP_REPEAT( \ BOOST_PP_SUB_D(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, i) \ , BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC \ , (i, param, value_func) \ ) \ /**/ #endif // BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES #define BOOST_MPL_PP_DEF_PARAMS_TAIL(i, param, value) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_IDENTITY(=value)) \ /**/ #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, param, value) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_IDENTITY(=value)) \ /**/ #else # define BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, param, value) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_EMPTY) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/default_params.hpp000644 000765 000024 00000004714 12233035540 026122 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: default_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include // BOOST_MPL_PP_DEFAULT_PARAMS(0,T,int): // BOOST_MPL_PP_DEFAULT_PARAMS(1,T,int): T1 = int // BOOST_MPL_PP_DEFAULT_PARAMS(2,T,int): T1 = int, T2 = int // BOOST_MPL_PP_DEFAULT_PARAMS(n,T,int): T1 = int, T2 = int, .., Tn = int #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include # define BOOST_MPL_PP_DEFAULT_PARAMS(n,p,v) \ BOOST_PP_CAT(BOOST_MPL_PP_DEFAULT_PARAMS_,n)(p,v) \ /**/ # define BOOST_MPL_PP_DEFAULT_PARAMS_0(p,v) # define BOOST_MPL_PP_DEFAULT_PARAMS_1(p,v) p##1=v # define BOOST_MPL_PP_DEFAULT_PARAMS_2(p,v) p##1=v,p##2=v # define BOOST_MPL_PP_DEFAULT_PARAMS_3(p,v) p##1=v,p##2=v,p##3=v # define BOOST_MPL_PP_DEFAULT_PARAMS_4(p,v) p##1=v,p##2=v,p##3=v,p##4=v # define BOOST_MPL_PP_DEFAULT_PARAMS_5(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v # define BOOST_MPL_PP_DEFAULT_PARAMS_6(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v # define BOOST_MPL_PP_DEFAULT_PARAMS_7(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v # define BOOST_MPL_PP_DEFAULT_PARAMS_8(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v,p##8=v # define BOOST_MPL_PP_DEFAULT_PARAMS_9(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v,p##8=v,p##9=v #else # include # include # include # include # include # define BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC(unused, i, pv) \ BOOST_PP_COMMA_IF(i) \ BOOST_PP_CAT( BOOST_PP_TUPLE_ELEM(2,0,pv), BOOST_PP_INC(i) ) \ = BOOST_PP_TUPLE_ELEM(2,1,pv) \ /**/ # define BOOST_MPL_PP_DEFAULT_PARAMS(n, param, value) \ BOOST_PP_REPEAT( \ n \ , BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC \ , (param,value) \ ) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/enum.hpp000644 000765 000024 00000003337 12233035540 024077 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: enum.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include // BOOST_MPL_PP_ENUM(0,int): // BOOST_MPL_PP_ENUM(1,int): int // BOOST_MPL_PP_ENUM(2,int): int, int // BOOST_MPL_PP_ENUM(n,int): int, int, .., int #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include # define BOOST_MPL_PP_ENUM(n, param) \ BOOST_PP_CAT(BOOST_MPL_PP_ENUM_,n)(param) \ /**/ # define BOOST_MPL_PP_ENUM_0(p) # define BOOST_MPL_PP_ENUM_1(p) p # define BOOST_MPL_PP_ENUM_2(p) p,p # define BOOST_MPL_PP_ENUM_3(p) p,p,p # define BOOST_MPL_PP_ENUM_4(p) p,p,p,p # define BOOST_MPL_PP_ENUM_5(p) p,p,p,p,p # define BOOST_MPL_PP_ENUM_6(p) p,p,p,p,p,p # define BOOST_MPL_PP_ENUM_7(p) p,p,p,p,p,p,p # define BOOST_MPL_PP_ENUM_8(p) p,p,p,p,p,p,p,p # define BOOST_MPL_PP_ENUM_9(p) p,p,p,p,p,p,p,p,p #else # include # include # define BOOST_MPL_PP_AUX_ENUM_FUNC(unused, i, param) \ BOOST_PP_COMMA_IF(i) param \ /**/ # define BOOST_MPL_PP_ENUM(n, param) \ BOOST_PP_REPEAT( \ n \ , BOOST_MPL_PP_AUX_ENUM_FUNC \ , param \ ) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/ext_params.hpp000644 000765 000024 00000005722 12233035540 025276 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: ext_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include // BOOST_MPL_PP_EXT_PARAMS(2,2,T): // BOOST_MPL_PP_EXT_PARAMS(2,3,T): T2 // BOOST_MPL_PP_EXT_PARAMS(2,4,T): T2, T3 // BOOST_MPL_PP_EXT_PARAMS(2,n,T): T2, T3, .., Tn-1 #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include # include # define BOOST_MPL_PP_EXT_PARAMS(i,j,p) \ BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,BOOST_MPL_PP_SUB(j,i),p) \ /**/ # define BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,n,p) \ BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \ /**/ # define BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \ BOOST_MPL_PP_EXT_PARAMS_##i(n,p) \ /**/ # define BOOST_MPL_PP_EXT_PARAMS_1(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9) # define BOOST_MPL_PP_EXT_PARAMS_2(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1) # define BOOST_MPL_PP_EXT_PARAMS_3(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1,p2) # define BOOST_MPL_PP_EXT_PARAMS_4(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4,p##5,p##6,p##7,p##8,p##9,p1,p2,p3) # define BOOST_MPL_PP_EXT_PARAMS_5(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##5,p##6,p##7,p##8,p##9,p1,p2,p3,p4) # define BOOST_MPL_PP_EXT_PARAMS_6(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##6,p##7,p##8,p##9,p1,p2,p3,p4,p5) # define BOOST_MPL_PP_EXT_PARAMS_7(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##7,p##8,p##9,p1,p2,p3,p4,p5,p6) # define BOOST_MPL_PP_EXT_PARAMS_8(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##8,p##9,p1,p2,p3,p4,p5,p6,p7) # define BOOST_MPL_PP_EXT_PARAMS_9(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##9,p1,p2,p3,p4,p5,p6,p7,p8) #else # include # include # include # include # include # include # define BOOST_MPL_PP_AUX_EXT_PARAM_FUNC(unused, i, op) \ BOOST_PP_COMMA_IF(i) \ BOOST_PP_CAT( \ BOOST_PP_TUPLE_ELEM(2,1,op) \ , BOOST_PP_ADD_D(1, i, BOOST_PP_TUPLE_ELEM(2,0,op)) \ ) \ /**/ # define BOOST_MPL_PP_EXT_PARAMS(i, j, param) \ BOOST_PP_REPEAT( \ BOOST_PP_SUB_D(1,j,i) \ , BOOST_MPL_PP_AUX_EXT_PARAM_FUNC \ , (i,param) \ ) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/filter_params.hpp000644 000765 000024 00000002547 12233035540 025765 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: filter_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define BOOST_MPL_PP_FILTER_PARAMS_0(p1,p2,p3,p4,p5,p6,p7,p8,p9) #define BOOST_MPL_PP_FILTER_PARAMS_1(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1 #define BOOST_MPL_PP_FILTER_PARAMS_2(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2 #define BOOST_MPL_PP_FILTER_PARAMS_3(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3 #define BOOST_MPL_PP_FILTER_PARAMS_4(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4 #define BOOST_MPL_PP_FILTER_PARAMS_5(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5 #define BOOST_MPL_PP_FILTER_PARAMS_6(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6 #define BOOST_MPL_PP_FILTER_PARAMS_7(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7 #define BOOST_MPL_PP_FILTER_PARAMS_8(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7,p8 #define BOOST_MPL_PP_FILTER_PARAMS_9(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7,p8,p9 #endif // BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/is_seq.hpp000644 000765 000024 00000004203 12233035540 024407 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED // Copyright Paul Mensonides 2003 // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: is_seq.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include // returns 1 if 'seq' is a PP-sequence, 0 otherwise: // // BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_IS_SEQ( int ) ) ) // BOOST_PP_ASSERT( BOOST_MPL_PP_IS_SEQ( (int) ) ) // BOOST_PP_ASSERT( BOOST_MPL_PP_IS_SEQ( (1)(2) ) ) #if (BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC()) || defined(_MSC_VER) && defined(__INTEL_COMPILER) && __INTEL_COMPILER == 1010 # define BOOST_MPL_PP_IS_SEQ(seq) BOOST_PP_DEC( BOOST_PP_SEQ_SIZE( BOOST_MPL_PP_IS_SEQ_(seq) ) ) # define BOOST_MPL_PP_IS_SEQ_(seq) BOOST_MPL_PP_IS_SEQ_SEQ_( BOOST_MPL_PP_IS_SEQ_SPLIT_ seq ) # define BOOST_MPL_PP_IS_SEQ_SEQ_(x) (x) # define BOOST_MPL_PP_IS_SEQ_SPLIT_(unused) unused)((unused) #else # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_MPL_PP_IS_SEQ(seq) BOOST_MPL_PP_IS_SEQ_MWCC_((seq)) # define BOOST_MPL_PP_IS_SEQ_MWCC_(args) BOOST_MPL_PP_IS_SEQ_ ## args # else # define BOOST_MPL_PP_IS_SEQ(seq) BOOST_MPL_PP_IS_SEQ_(seq) # endif # define BOOST_MPL_PP_IS_SEQ_(seq) BOOST_PP_CAT(BOOST_MPL_PP_IS_SEQ_, BOOST_MPL_PP_IS_SEQ_0 seq BOOST_PP_RPAREN()) # define BOOST_MPL_PP_IS_SEQ_0(x) BOOST_MPL_PP_IS_SEQ_1(x # define BOOST_MPL_PP_IS_SEQ_ALWAYS_0(unused) 0 # define BOOST_MPL_PP_IS_SEQ_BOOST_MPL_PP_IS_SEQ_0 BOOST_MPL_PP_IS_SEQ_ALWAYS_0( # define BOOST_MPL_PP_IS_SEQ_BOOST_MPL_PP_IS_SEQ_1(unused) 1 #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_IS_SEQ_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/params.hpp000644 000765 000024 00000003757 12233035540 024424 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include // BOOST_MPL_PP_PARAMS(0,T): // BOOST_MPL_PP_PARAMS(1,T): T1 // BOOST_MPL_PP_PARAMS(2,T): T1, T2 // BOOST_MPL_PP_PARAMS(n,T): T1, T2, .., Tn #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include # define BOOST_MPL_PP_PARAMS(n,p) \ BOOST_PP_CAT(BOOST_MPL_PP_PARAMS_,n)(p) \ /**/ # define BOOST_MPL_PP_PARAMS_0(p) # define BOOST_MPL_PP_PARAMS_1(p) p##1 # define BOOST_MPL_PP_PARAMS_2(p) p##1,p##2 # define BOOST_MPL_PP_PARAMS_3(p) p##1,p##2,p##3 # define BOOST_MPL_PP_PARAMS_4(p) p##1,p##2,p##3,p##4 # define BOOST_MPL_PP_PARAMS_5(p) p##1,p##2,p##3,p##4,p##5 # define BOOST_MPL_PP_PARAMS_6(p) p##1,p##2,p##3,p##4,p##5,p##6 # define BOOST_MPL_PP_PARAMS_7(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7 # define BOOST_MPL_PP_PARAMS_8(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8 # define BOOST_MPL_PP_PARAMS_9(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9 #else # include # include # include # include # define BOOST_MPL_PP_AUX_PARAM_FUNC(unused, i, param) \ BOOST_PP_COMMA_IF(i) \ BOOST_PP_CAT(param, BOOST_PP_INC(i)) \ /**/ # define BOOST_MPL_PP_PARAMS(n, param) \ BOOST_PP_REPEAT( \ n \ , BOOST_MPL_PP_AUX_PARAM_FUNC \ , param \ ) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/partial_spec_params.hpp000644 000765 000024 00000002143 12233035540 027136 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: partial_spec_params.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #define BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ BOOST_MPL_PP_PARAMS(n, param) \ BOOST_PP_COMMA_IF(BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n)) \ BOOST_MPL_PP_ENUM( \ BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n) \ , def \ ) \ /**/ #endif // BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/range.hpp000644 000765 000024 00000001335 12233035540 024223 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: range.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #define BOOST_MPL_PP_RANGE(first, length) \ BOOST_PP_SEQ_SUBSEQ((0)(1)(2)(3)(4)(5)(6)(7)(8)(9), first, length) \ /**/ #endif // BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/repeat.hpp000644 000765 000024 00000003637 12233035540 024416 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: repeat.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include # define BOOST_MPL_PP_REPEAT(n,f,param) \ BOOST_PP_CAT(BOOST_MPL_PP_REPEAT_,n)(f,param) \ /**/ # define BOOST_MPL_PP_REPEAT_0(f,p) # define BOOST_MPL_PP_REPEAT_1(f,p) f(0,0,p) # define BOOST_MPL_PP_REPEAT_2(f,p) f(0,0,p) f(0,1,p) # define BOOST_MPL_PP_REPEAT_3(f,p) f(0,0,p) f(0,1,p) f(0,2,p) # define BOOST_MPL_PP_REPEAT_4(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) # define BOOST_MPL_PP_REPEAT_5(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) # define BOOST_MPL_PP_REPEAT_6(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) # define BOOST_MPL_PP_REPEAT_7(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) # define BOOST_MPL_PP_REPEAT_8(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) # define BOOST_MPL_PP_REPEAT_9(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) # define BOOST_MPL_PP_REPEAT_10(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) f(0,9,p) #else # include # define BOOST_MPL_PP_REPEAT(n,f,param) \ BOOST_PP_REPEAT(n,f,param) \ /**/ #endif #define BOOST_MPL_PP_REPEAT_IDENTITY_FUNC(unused1, unused2, x) x #endif // BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/sub.hpp000644 000765 000024 00000003631 12233035540 023721 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: sub.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include #if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) # include # define BOOST_MPL_PP_SUB(i,j) \ BOOST_MPL_PP_SUB_DELAY(i,j) \ /**/ # define BOOST_MPL_PP_SUB_DELAY(i,j) \ BOOST_PP_CAT(BOOST_MPL_PP_TUPLE_11_ELEM_##i,BOOST_MPL_PP_SUB_##j) \ /**/ #else # define BOOST_MPL_PP_SUB(i,j) \ BOOST_MPL_PP_SUB_DELAY(i,j) \ /**/ # define BOOST_MPL_PP_SUB_DELAY(i,j) \ BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_SUB_##j \ /**/ #endif # define BOOST_MPL_PP_SUB_0 (0,1,2,3,4,5,6,7,8,9,10) # define BOOST_MPL_PP_SUB_1 (0,0,1,2,3,4,5,6,7,8,9) # define BOOST_MPL_PP_SUB_2 (0,0,0,1,2,3,4,5,6,7,8) # define BOOST_MPL_PP_SUB_3 (0,0,0,0,1,2,3,4,5,6,7) # define BOOST_MPL_PP_SUB_4 (0,0,0,0,0,1,2,3,4,5,6) # define BOOST_MPL_PP_SUB_5 (0,0,0,0,0,0,1,2,3,4,5) # define BOOST_MPL_PP_SUB_6 (0,0,0,0,0,0,0,1,2,3,4) # define BOOST_MPL_PP_SUB_7 (0,0,0,0,0,0,0,0,1,2,3) # define BOOST_MPL_PP_SUB_8 (0,0,0,0,0,0,0,0,0,1,2) # define BOOST_MPL_PP_SUB_9 (0,0,0,0,0,0,0,0,0,0,1) # define BOOST_MPL_PP_SUB_10 (0,0,0,0,0,0,0,0,0,0,0) #else # include # define BOOST_MPL_PP_SUB(i,j) \ BOOST_PP_SUB(i,j) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/token_equal.hpp000644 000765 000024 00000003727 12233035540 025445 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_TOKEN_EQUAL_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_TOKEN_EQUAL_HPP_INCLUDED // Copyright Paul Mensonides 2003 // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: token_equal.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include #include #include // compares tokens 'a' and 'b' for equality: // // #define BOOST_MPL_PP_TOKEN_EQUAL_apple(x) x // #define BOOST_MPL_PP_TOKEN_EQUAL_orange(x) x // // BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_TOKEN_EQUAL(apple, abc) ) ) // BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_TOKEN_EQUAL(abc, apple) ) ) // BOOST_PP_ASSERT( BOOST_PP_NOT( BOOST_MPL_PP_TOKEN_EQUAL(apple, orange) ) ) // BOOST_PP_ASSERT( BOOST_MPL_PP_TOKEN_EQUAL(apple, apple) ) // BOOST_PP_ASSERT( BOOST_MPL_PP_TOKEN_EQUAL(orange, orange) ) #define BOOST_MPL_PP_TOKEN_EQUAL(a, b) \ BOOST_PP_IIF( \ BOOST_PP_BITAND( \ BOOST_MPL_PP_IS_SEQ( BOOST_PP_CAT(BOOST_MPL_PP_TOKEN_EQUAL_, a)((unused)) ) \ , BOOST_MPL_PP_IS_SEQ( BOOST_PP_CAT(BOOST_MPL_PP_TOKEN_EQUAL_, b)((unused)) ) \ ) \ , BOOST_MPL_PP_TOKEN_EQUAL_I \ , 0 BOOST_PP_TUPLE_EAT(2) \ )(a, b) \ /**/ #define BOOST_MPL_PP_TOKEN_EQUAL_I(a, b) \ BOOST_PP_COMPL(BOOST_MPL_PP_IS_SEQ( \ BOOST_MPL_PP_TOKEN_EQUAL_ ## a( \ BOOST_MPL_PP_TOKEN_EQUAL_ ## b \ )((unused)) \ )) \ /**/ #endif // BOOST_MPL_AUX_PREPROCESSOR_TOKEN_EQUAL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessor/tuple.hpp000644 000765 000024 00000002560 12233035540 024261 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: tuple.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #define BOOST_MPL_PP_TUPLE_11_ELEM_0(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e0 #define BOOST_MPL_PP_TUPLE_11_ELEM_1(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e1 #define BOOST_MPL_PP_TUPLE_11_ELEM_2(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e2 #define BOOST_MPL_PP_TUPLE_11_ELEM_3(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e3 #define BOOST_MPL_PP_TUPLE_11_ELEM_4(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e4 #define BOOST_MPL_PP_TUPLE_11_ELEM_5(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e5 #define BOOST_MPL_PP_TUPLE_11_ELEM_6(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e6 #define BOOST_MPL_PP_TUPLE_11_ELEM_7(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e7 #define BOOST_MPL_PP_TUPLE_11_ELEM_8(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e8 #define BOOST_MPL_PP_TUPLE_11_ELEM_9(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e9 #define BOOST_MPL_PP_TUPLE_11_ELEM_10(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e10 #endif // BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/000755 000765 000024 00000000000 12233035540 023113 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/000755 000765 000024 00000000000 12233035540 023346 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/000755 000765 000024 00000000000 12233035540 024217 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/000755 000765 000024 00000000000 12233035540 023127 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/000755 000765 000024 00000000000 12233035540 023120 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/000755 000765 000024 00000000000 12233035540 023502 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/000755 000765 000024 00000000000 12233035540 023503 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/000755 000765 000024 00000000000 12233035540 023341 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/000755 000765 000024 00000000000 12233035540 024031 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/000755 000765 000024 00000000000 12233035540 023667 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/000755 000765 000024 00000000000 12233035540 023467 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp000644 000765 000024 00000004236 12233035540 027444 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp000644 000765 000024 00000004212 12233035540 027324 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/and.hpp000644 000765 000024 00000002202 12233035540 024736 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/apply.hpp000644 000765 000024 00000004161 12233035540 025327 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp000644 000765 000024 00000001714 12233035540 026170 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp000644 000765 000024 00000002326 12233035540 026361 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 : F::template apply< > { }; template< typename F > struct apply_wrap0< F,true_ > : F::apply { }; template< typename F, typename T1 > struct apply_wrap1 : F::template apply { }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : F::template apply< T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : F::template apply< T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : F::template apply< T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : F::template apply< T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/arg.hpp000644 000765 000024 00000005515 12233035540 024757 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp000644 000765 000024 00000024024 12233035540 026257 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/bind.hpp000644 000765 000024 00000034111 12233035540 025114 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp000644 000765 000024 00000001704 12233035540 025756 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct bind; template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/bitand.hpp000644 000765 000024 00000006035 12233035540 025445 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/bitor.hpp000644 000765 000024 00000006000 12233035540 025313 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/bitxor.hpp000644 000765 000024 00000006035 12233035540 025513 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/deque.hpp000644 000765 000024 00000022773 12233035540 025316 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/divides.hpp000644 000765 000024 00000006014 12233035540 025630 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/equal_to.hpp000644 000765 000024 00000003770 12233035540 026020 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp000644 000765 000024 00000010402 12233035540 026142 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp000644 000765 000024 00000025717 12233035540 026456 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/greater.hpp000644 000765 000024 00000003750 12233035540 025636 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp000644 000765 000024 00000004075 12233035540 027026 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/inherit.hpp000644 000765 000024 00000004643 12233035540 025651 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp000644 000765 000024 00000010262 12233035540 027647 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp000644 000765 000024 00000010076 12233035540 027174 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp000644 000765 000024 00000014416 12233035540 027153 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/less.hpp000644 000765 000024 00000003676 12233035540 025162 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/less_equal.hpp000644 000765 000024 00000004023 12233035540 026334 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/list.hpp000644 000765 000024 00000022620 12233035540 025155 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/list_c.hpp000644 000765 000024 00000024735 12233035540 025470 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/map.hpp000644 000765 000024 00000022517 12233035540 024764 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/minus.hpp000644 000765 000024 00000005722 12233035540 025341 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/modulus.hpp000644 000765 000024 00000004275 12233035540 025700 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp000644 000765 000024 00000004057 12233035540 026677 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/or.hpp000644 000765 000024 00000002204 12233035540 024616 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/placeholders.hpp000644 000765 000024 00000004243 12233035540 026650 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/plus.hpp000644 000765 000024 00000005665 12233035540 025177 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/quote.hpp000644 000765 000024 00000004213 12233035540 025335 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl : T { }; template< typename T > struct quote_impl< T,false > { typedef T type; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< F , aux::has_type< F >::value > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< F< U1,U2 > , aux::has_type< F< U1,U2 > >::value > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< F< U1,U2,U3 > , aux::has_type< F< U1,U2,U3 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< F< U1,U2,U3,U4 > , aux::has_type< F< U1,U2,U3,U4 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< F< U1,U2,U3,U4,U5 > , aux::has_type< F< U1,U2,U3,U4,U5 > >::value > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp000644 000765 000024 00000016314 12233035540 027705 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp000644 000765 000024 00000015075 12233035540 030733 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/set.hpp000644 000765 000024 00000022517 12233035540 025002 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/set_c.hpp000644 000765 000024 00000024634 12233035540 025306 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/shift_left.hpp000644 000765 000024 00000004221 12233035540 026326 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/shift_right.hpp000644 000765 000024 00000004237 12233035540 026520 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/template_arity.hpp000644 000765 000024 00000000462 12233035540 027225 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/times.hpp000644 000765 000024 00000005722 12233035540 025327 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp000644 000765 000024 00000003562 12233035540 026503 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value,F, Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/vector.hpp000644 000765 000024 00000023022 12233035540 025501 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/plain/vector_c.hpp000644 000765 000024 00000027715 12233035540 026020 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp000644 000765 000024 00000004236 12233035540 027644 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp000644 000765 000024 00000004212 12233035540 027524 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/and.hpp000644 000765 000024 00000002351 12233035540 025143 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp000644 000765 000024 00000005270 12233035540 025531 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp000644 000765 000024 00000001714 12233035540 026370 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp000644 000765 000024 00000002326 12233035540 026561 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 : F::template apply< > { }; template< typename F > struct apply_wrap0< F,true_ > : F::apply { }; template< typename F, typename T1 > struct apply_wrap1 : F::template apply { }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : F::template apply< T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : F::template apply< T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : F::template apply< T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : F::template apply< T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp000644 000765 000024 00000005515 12233035540 025157 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp000644 000765 000024 00000020442 12233035540 026457 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp000644 000765 000024 00000027003 12233035540 025316 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp000644 000765 000024 00000001704 12233035540 026156 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct bind; template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp000644 000765 000024 00000006360 12233035540 025646 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitand_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); typedef integral_c< T,value > type; }; } template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitand_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp000644 000765 000024 00000006320 12233035540 025520 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitor_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 | n2)); typedef integral_c< T,value > type; }; } template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitor_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp000644 000765 000024 00000006360 12233035540 025714 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitxor_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 ^ n2)); typedef integral_c< T,value > type; }; } template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitxor_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp000644 000765 000024 00000022773 12233035540 025516 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp000644 000765 000024 00000006341 12233035540 026033 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct divides_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 / n2)); typedef integral_c< T,value > type; }; } template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::divides_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp000644 000765 000024 00000004225 12233035540 026214 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp000644 000765 000024 00000010402 12233035540 026342 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp000644 000765 000024 00000025717 12233035540 026656 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp000644 000765 000024 00000004205 12233035540 026032 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp000644 000765 000024 00000004340 12233035540 027221 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp000644 000765 000024 00000005420 12233035540 026043 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp000644 000765 000024 00000010262 12233035540 030047 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp000644 000765 000024 00000010076 12233035540 027374 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp000644 000765 000024 00000014515 12233035540 027353 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/less.hpp000644 000765 000024 00000004130 12233035540 025344 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp000644 000765 000024 00000004263 12233035540 026542 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/list.hpp000644 000765 000024 00000022620 12233035540 025355 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp000644 000765 000024 00000024735 12233035540 025670 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/map.hpp000644 000765 000024 00000022517 12233035540 025164 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp000644 000765 000024 00000006241 12233035540 025536 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct minus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 - n2)); typedef integral_c< T,value > type; }; } template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::minus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp000644 000765 000024 00000004537 12233035540 026101 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct modulus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 % n2)); typedef integral_c< T,value > type; }; } template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::modulus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp000644 000765 000024 00000004321 12233035540 027071 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/or.hpp000644 000765 000024 00000002352 12233035540 025022 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp000644 000765 000024 00000004243 12233035540 027050 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp000644 000765 000024 00000006201 12233035540 025362 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct plus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 + n2)); typedef integral_c< T,value > type; }; } template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::plus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp000644 000765 000024 00000000444 12233035540 025537 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp000644 000765 000024 00000016314 12233035540 030105 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp000644 000765 000024 00000015075 12233035540 031133 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/set.hpp000644 000765 000024 00000022517 12233035540 025202 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp000644 000765 000024 00000024634 12233035540 025506 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp000644 000765 000024 00000004561 12233035540 026535 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { namespace aux { template< typename T, typename Shift, T n, Shift s > struct shift_left_wknd { BOOST_STATIC_CONSTANT(T, value = (n << s)); typedef integral_c< T,value > type; }; } template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : aux::shift_left_wknd< typename N::value_type , typename S::value_type , N::value , S::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp000644 000765 000024 00000004602 12233035540 026714 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { namespace aux { template< typename T, typename Shift, T n, Shift s > struct shift_right_wknd { BOOST_STATIC_CONSTANT(T, value = (n >> s)); typedef integral_c< T,value > type; }; } template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : aux::shift_right_wknd< typename N::value_type , typename S::value_type , N::value , S::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp000644 000765 000024 00000001377 12233035540 027433 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/times.hpp000644 000765 000024 00000006241 12233035540 025524 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct times_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 * n2)); typedef integral_c< T,value > type; }; } template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::times_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp000644 000765 000024 00000003562 12233035540 026703 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value,F, Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp000644 000765 000024 00000023022 12233035540 025701 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp000644 000765 000024 00000027715 12233035540 026220 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp000644 000765 000024 00000004236 12233035540 030006 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp000644 000765 000024 00000004212 12233035540 027666 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/and.hpp000644 000765 000024 00000002547 12233035540 025314 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_ > struct and_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : false_ { }; }; template<> struct and_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,true_ > { }; }; template<> struct and_impl ::result_< true_,true_,true_,true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp000644 000765 000024 00000010572 12233035540 025674 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; namespace aux { template<> struct apply_chooser<0> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef apply0< F > type; }; }; } // namespace aux template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; namespace aux { template<> struct apply_chooser<1> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef apply1< F, T1 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; namespace aux { template<> struct apply_chooser<2> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef apply2< F, T1, T2 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; namespace aux { template<> struct apply_chooser<3> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef apply3< F, T1, T2, T3 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; namespace aux { template<> struct apply_chooser<4> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef apply4< F, T1, T2, T3, T4 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; namespace aux { template<> struct apply_chooser<5> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef apply5< F, T1, T2, T3, T4, T5 > type; }; }; } // namespace aux namespace aux { template< typename T > struct is_apply_arg { static bool const value = true; }; template<> struct is_apply_arg { static bool const value = false; }; template< typename T1, typename T2, typename T3, typename T4, typename T5 > struct apply_count_args { static int const value = is_apply_arg::value + is_apply_arg::value + is_apply_arg::value + is_apply_arg::value + is_apply_arg::value; }; } template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply : aux::apply_chooser< aux::apply_count_args< T1,T2,T3,T4,T5 >::value >::template result_< F,T1,T2,T3,T4,T5 >::type { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp000644 000765 000024 00000001623 12233035540 026531 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser; } template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp000644 000765 000024 00000002214 12233035540 026717 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 : F::template apply< > { }; template< typename F, typename T1 > struct apply_wrap1 : F::template apply { }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : F::template apply< T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : F::template apply< T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : F::template apply< T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : F::template apply< T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp000644 000765 000024 00000005515 12233035540 025321 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp000644 000765 000024 00000023441 12233035540 026623 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef typename apply_wrap5< T , U1, U2, U3, U4, U5 >::type type; }; }; template< typename T > struct is_bind_template; template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*); template< int N > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F > aux::yes_tag is_bind_helper(bind0*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) namespace aux { template<> struct bind_chooser<0> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind0 type; }; }; } // namespace aux template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1 > aux::yes_tag is_bind_helper(bind1< F,T1 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) namespace aux { template<> struct bind_chooser<1> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind1< F,T1 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2 > aux::yes_tag is_bind_helper(bind2< F,T1,T2 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) namespace aux { template<> struct bind_chooser<2> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind2< F,T1,T2 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3 > aux::yes_tag is_bind_helper(bind3< F,T1,T2,T3 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) namespace aux { template<> struct bind_chooser<3> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind3< F,T1,T2,T3 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 > aux::yes_tag is_bind_helper(bind4< F,T1,T2,T3,T4 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) namespace aux { template<> struct bind_chooser<4> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind4< F,T1,T2,T3,T4 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) namespace aux { template<> struct bind_chooser<5> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind5< F,T1,T2,T3,T4,T5 > type; }; }; } // namespace aux namespace aux { template< typename T > struct is_bind_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_bind_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 > struct bind_count_args { BOOST_STATIC_CONSTANT(int, value = is_bind_arg::value + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value ); }; } template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : aux::bind_chooser< aux::bind_count_args< T1,T2,T3,T4,T5 >::value >::template result_< F,T1,T2,T3,T4,T5 >::type { }; BOOST_MPL_AUX_ARITY_SPEC( 6 , bind ) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( 6 , bind ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp000644 000765 000024 00000032331 12233035540 025460 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef typename apply_wrap5< T , U1, U2, U3, U4, U5 >::type type; }; }; template< typename T > struct is_bind_template; template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; template< typename T > struct replace_unnamed_arg_impl { template< typename Arg > struct result_ { typedef Arg next; typedef T type; }; }; template<> struct replace_unnamed_arg_impl< arg< -1 > > { template< typename Arg > struct result_ { typedef typename next::type next; typedef Arg type; }; }; template< typename T, typename Arg > struct replace_unnamed_arg : replace_unnamed_arg_impl::template result_ { }; template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*); template< int N > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F > aux::yes_tag is_bind_helper(bind0*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) namespace aux { template<> struct bind_chooser<0> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind0 type; }; }; } // namespace aux template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1 > aux::yes_tag is_bind_helper(bind1< F,T1 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) namespace aux { template<> struct bind_chooser<1> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind1< F,T1 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2 > aux::yes_tag is_bind_helper(bind2< F,T1,T2 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) namespace aux { template<> struct bind_chooser<2> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind2< F,T1,T2 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3 > aux::yes_tag is_bind_helper(bind3< F,T1,T2,T3 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) namespace aux { template<> struct bind_chooser<3> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind3< F,T1,T2,T3 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 > aux::yes_tag is_bind_helper(bind4< F,T1,T2,T3,T4 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) namespace aux { template<> struct bind_chooser<4> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind4< F,T1,T2,T3,T4 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) namespace aux { template<> struct bind_chooser<5> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind5< F,T1,T2,T3,T4,T5 > type; }; }; } // namespace aux namespace aux { template< typename T > struct is_bind_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_bind_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 > struct bind_count_args { BOOST_STATIC_CONSTANT(int, value = is_bind_arg::value + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value ); }; } template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : aux::bind_chooser< aux::bind_count_args< T1,T2,T3,T4,T5 >::value >::template result_< F,T1,T2,T3,T4,T5 >::type { }; BOOST_MPL_AUX_ARITY_SPEC( 6 , bind ) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( 6 , bind ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp000644 000765 000024 00000001704 12233035540 026320 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct bind; template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp000644 000765 000024 00000005447 12233035540 026015 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitand_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitand_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitand_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : if_< is_na , bitand_2< N1,N2 > , bitand_< bitand_2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitand_2 : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp000644 000765 000024 00000005422 12233035540 025664 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitor_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitor_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitor_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : if_< is_na , bitor_2< N1,N2 > , bitor_< bitor_2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitor_2 : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp000644 000765 000024 00000005447 12233035540 026063 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitxor_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitxor_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitxor_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : if_< is_na , bitxor_2< N1,N2 > , bitxor_< bitxor_2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitxor_2 : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp000644 000765 000024 00000034572 12233035540 025660 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct deque_chooser; } namespace aux { template<> struct deque_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_deque_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_deque_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct deque_count_args { BOOST_STATIC_CONSTANT(int, value = is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque_impl { typedef aux::deque_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::deque_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque : aux::deque_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::deque_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp000644 000765 000024 00000005426 12233035540 026200 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct divides_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct divides_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct divides2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : if_< is_na , divides2< N1,N2 > , divides< divides2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct divides2 : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp000644 000765 000024 00000004053 12233035540 026355 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct equal_to_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct equal_to_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp000644 000765 000024 00000013176 12233035540 026517 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< int N > struct fold_chunk; template<> struct fold_chunk<0> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; }; template<> struct fold_chunk<1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; }; template<> struct fold_chunk<2> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; }; template<> struct fold_chunk<3> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; }; template<> struct fold_chunk<4> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; }; template< int N > struct fold_chunk { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_step; template< typename Last , typename State > struct fold_null_step { typedef Last iterator; typedef State state; }; template<> struct fold_chunk< -1 > { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , fold_null_step< Last,State > , fold_step< First,Last,State,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_step { typedef fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl : fold_chunk ::template result_< First,Last,State,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp000644 000765 000024 00000025717 12233035540 027020 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp000644 000765 000024 00000004032 12233035540 026172 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp000644 000765 000024 00000004165 12233035540 027370 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_equal_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_equal_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp000644 000765 000024 00000006301 12233035540 026204 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1, bool C2 > struct inherit2_impl { template< typename Derived, typename T1, typename T2 > struct result_ : T1, T2 { typedef Derived type_; }; }; template<> struct inherit2_impl< false,true > { template< typename Derived, typename T1, typename T2 > struct result_ : T1 { typedef T1 type_; }; }; template<> struct inherit2_impl< true,false > { template< typename Derived, typename T1, typename T2 > struct result_ : T2 { typedef T2 type_; }; }; template<> struct inherit2_impl< true,true > { template< typename Derived, typename T1, typename T2 > struct result_ { typedef T1 type_; }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : aux::inherit2_impl< is_empty_base::value , is_empty_base::value >::template result_< inherit2< T1,T2 >,T1, T2 > { typedef typename inherit2::type_ type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp000644 000765 000024 00000010262 12233035540 030211 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp000644 000765 000024 00000012735 12233035540 027542 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< int N > struct iter_fold_chunk; template<> struct iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; }; template<> struct iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; }; template<> struct iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; }; template<> struct iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; }; template<> struct iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; }; template< int N > struct iter_fold_chunk { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_step; template< typename Last , typename State > struct iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , iter_fold_null_step< Last,State > , iter_fold_step< First,Last,State,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_step { typedef iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl : iter_fold_chunk ::template result_< First,Last,State,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp000644 000765 000024 00000014515 12233035540 027515 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/less.hpp000644 000765 000024 00000003755 12233035540 025522 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp000644 000765 000024 00000004110 12233035540 026673 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_equal_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_equal_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/list.hpp000644 000765 000024 00000034434 12233035540 025525 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct list_chooser; } namespace aux { template<> struct list_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef list0< >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_list_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct list_count_args { BOOST_STATIC_CONSTANT(int, value = is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list_impl { typedef aux::list_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::list_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list : aux::list_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::list_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp000644 000765 000024 00000031511 12233035540 026020 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct list_c_chooser; } namespace aux { template<> struct list_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list1_c< T, C0 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list2_c< T, C0, C1 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list3_c< T, C0, C1, C2 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list4_c< T, C0, C1, C2, C3 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list5_c< T, C0, C1, C2, C3, C4 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list6_c< T, C0, C1, C2, C3, C4, C5 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list11_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list12_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list13_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_list_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct list_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c_impl { typedef aux::list_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::list_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c : aux::list_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::list_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/map.hpp000644 000765 000024 00000034323 12233035540 025324 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct map_chooser; } namespace aux { template<> struct map_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef map0< >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_map_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_map_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct map_count_args { BOOST_STATIC_CONSTANT(int, value = is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map_impl { typedef aux::map_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::map_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map : aux::map_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::map_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp000644 000765 000024 00000005354 12233035540 025704 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct minus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct minus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct minus2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : if_< is_na , minus2< N1,N2 > , minus< minus2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct minus2 : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp000644 000765 000024 00000004357 12233035540 026243 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct modulus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct modulus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp000644 000765 000024 00000004146 12233035540 027240 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct not_equal_to_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct not_equal_to_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/or.hpp000644 000765 000024 00000002550 12233035540 025164 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_ > struct or_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : true_ { }; }; template<> struct or_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,false_ > { }; }; template<> struct or_impl ::result_< false_,false_,false_,false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp000644 000765 000024 00000004243 12233035540 027212 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp000644 000765 000024 00000005327 12233035540 025534 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct plus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct plus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct plus2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : if_< is_na , plus2< N1,N2 > , plus< plus2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct plus2 : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp000644 000765 000024 00000004274 12233035540 025706 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< bool > struct quote_impl { template< typename T > struct result_ : T { }; }; template<> struct quote_impl { template< typename T > struct result_ { typedef T type; }; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< aux::has_type< F >::value > ::template result_< F > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< aux::has_type< F< U1,U2 > >::value > ::template result_< F< U1,U2 > > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< aux::has_type< F< U1,U2,U3 > >::value > ::template result_< F< U1,U2,U3 > > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< aux::has_type< F< U1,U2,U3,U4 > >::value > ::template result_< F< U1,U2,U3,U4 > > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< aux::has_type< F< U1,U2,U3,U4,U5 > >::value > ::template result_< F< U1,U2,U3,U4,U5 > > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp000644 000765 000024 00000021246 12233035540 030247 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< long N > struct reverse_fold_chunk; template<> struct reverse_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step; template< typename Last , typename State > struct reverse_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_fold_null_step< Last,State > , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step { typedef reverse_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl : reverse_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp000644 000765 000024 00000020072 12233035540 031266 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< long N > struct reverse_iter_fold_chunk; template<> struct reverse_iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_iter_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step; template< typename Last , typename State > struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_iter_fold_null_step< Last,State > , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step { typedef reverse_iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl : reverse_iter_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/set.hpp000644 000765 000024 00000034323 12233035540 025342 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct set_chooser; } namespace aux { template<> struct set_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef set0< >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_set_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_set_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct set_count_args { BOOST_STATIC_CONSTANT(int, value = is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set_impl { typedef aux::set_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::set_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set : aux::set_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::set_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp000644 000765 000024 00000031400 12233035540 025635 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct set_c_chooser; } namespace aux { template<> struct set_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set1_c< T, C0 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set2_c< T, C0, C1 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set3_c< T, C0, C1, C2 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set4_c< T, C0, C1, C2, C3 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set5_c< T, C0, C1, C2, C3, C4 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set6_c< T, C0, C1, C2, C3, C4, C5 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set11_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set12_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set13_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_set_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_set_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct set_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c_impl { typedef aux::set_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::set_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c : aux::set_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::set_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp000644 000765 000024 00000004306 12233035540 026674 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_left_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_left_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp000644 000765 000024 00000004325 12233035540 027060 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_right_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_right_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp000644 000765 000024 00000001377 12233035540 027575 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/times.hpp000644 000765 000024 00000005354 12233035540 025672 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct times_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct times_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct times2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : if_< is_na , times2< N1,N2 > , times< times2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct times2 : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp000644 000765 000024 00000004370 12233035540 027043 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl { template< typename F, typename Args > struct apply; }; template<> struct unpack_args_impl<0> { template< typename F, typename Args > struct apply : apply0< F > { }; }; template<> struct unpack_args_impl<1> { template< typename F, typename Args > struct apply : apply1< F , typename at_c< Args,0 >::type > { }; }; template<> struct unpack_args_impl<2> { template< typename F, typename Args > struct apply : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; }; template<> struct unpack_args_impl<3> { template< typename F, typename Args > struct apply : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; }; template<> struct unpack_args_impl<4> { template< typename F, typename Args > struct apply : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; }; template<> struct unpack_args_impl<5> { template< typename F, typename Args > struct apply : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value > ::template apply< F,Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp000644 000765 000024 00000034656 12233035540 026062 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct vector_chooser; } namespace aux { template<> struct vector_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_vector_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct vector_count_args { BOOST_STATIC_CONSTANT(int, value = is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector_impl { typedef aux::vector_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::vector_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector : aux::vector_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::vector_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp000644 000765 000024 00000033121 12233035540 026346 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct vector_c_chooser; } namespace aux { template<> struct vector_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector1_c< T, T(C0) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_vector_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct vector_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c_impl { typedef aux::vector_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::vector_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c : aux::vector_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::vector_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp000644 000765 000024 00000004236 12233035540 027316 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp000644 000765 000024 00000004212 12233035540 027176 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/and.hpp000644 000765 000024 00000002351 12233035540 024615 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/apply.hpp000644 000765 000024 00000005270 12233035540 025203 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp000644 000765 000024 00000001714 12233035540 026042 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp000644 000765 000024 00000015454 12233035540 026241 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< int N, typename F > struct apply_wrap_impl0; template< typename F > struct apply_wrap_impl0< 0 , F > { typedef typename F::template apply< /// since the defaults are "lost", we have to pass *something* even for nullary /// metafunction classes na > type; }; template< typename F > struct apply_wrap_impl0< 1 , F > { typedef typename F::template apply< na > type; }; template< typename F > struct apply_wrap_impl0< 2 , F > { typedef typename F::template apply< na, na > type; }; template< typename F > struct apply_wrap_impl0< 3 , F > { typedef typename F::template apply< na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 4 , F > { typedef typename F::template apply< na, na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 5 , F > { typedef typename F::template apply< na, na, na, na, na > type; }; template< typename F > struct apply_wrap0 : apply_wrap_impl0< ::boost::mpl::aux::arity< F,0 >::value , F >::type { }; template< int N, typename F, typename T1 > struct apply_wrap_impl1; template< typename F, typename T1 > struct apply_wrap_impl1< 1 , F , T1 > { typedef typename F::template apply< T1 > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 2 , F , T1 > { typedef typename F::template apply< T1 , na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 3 , F , T1 > { typedef typename F::template apply< T1 , na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 4 , F , T1 > { typedef typename F::template apply< T1 , na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 5 , F , T1 > { typedef typename F::template apply< T1 , na, na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap1 : apply_wrap_impl1< ::boost::mpl::aux::arity< F,1 >::value , F , T1 >::type { }; template< int N, typename F, typename T1, typename T2 > struct apply_wrap_impl2; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 2 , F , T1, T2 > { typedef typename F::template apply< T1, T2 > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 3 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 4 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 5 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : apply_wrap_impl2< ::boost::mpl::aux::arity< F,2 >::value , F , T1, T2 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 3 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 4 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 5 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na, na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : apply_wrap_impl3< ::boost::mpl::aux::arity< F,3 >::value , F , T1, T2, T3 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 4 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 5 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 , na > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : apply_wrap_impl4< ::boost::mpl::aux::arity< F,4 >::value , F , T1, T2, T3, T4 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5< 5 , F , T1, T2, T3, T4, T5 > { typedef typename F::template apply< T1, T2, T3, T4, T5 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : apply_wrap_impl5< ::boost::mpl::aux::arity< F,5 >::value , F , T1, T2, T3, T4, T5 >::type { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/arg.hpp000644 000765 000024 00000005515 12233035540 024631 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp000644 000765 000024 00000024024 12233035540 026131 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/bind.hpp000644 000765 000024 00000034111 12233035540 024766 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp000644 000765 000024 00000001704 12233035540 025630 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct bind; template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp000644 000765 000024 00000006210 12233035540 025312 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp000644 000765 000024 00000006152 12233035540 025175 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp000644 000765 000024 00000006210 12233035540 025360 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/deque.hpp000644 000765 000024 00000022773 12233035540 025170 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/divides.hpp000644 000765 000024 00000006167 12233035540 025513 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp000644 000765 000024 00000004061 12233035540 025664 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp000644 000765 000024 00000010402 12233035540 026014 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp000644 000765 000024 00000025717 12233035540 026330 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/greater.hpp000644 000765 000024 00000004040 12233035540 025501 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp000644 000765 000024 00000004173 12233035540 026677 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp000644 000765 000024 00000005420 12233035540 025515 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp000644 000765 000024 00000010262 12233035540 027521 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp000644 000765 000024 00000010076 12233035540 027046 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp000644 000765 000024 00000014515 12233035540 027025 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/less.hpp000644 000765 000024 00000003763 12233035540 025031 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp000644 000765 000024 00000004116 12233035540 026211 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/list.hpp000644 000765 000024 00000022620 12233035540 025027 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp000644 000765 000024 00000024735 12233035540 025342 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/map.hpp000644 000765 000024 00000022517 12233035540 024636 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/minus.hpp000644 000765 000024 00000006073 12233035540 025213 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp000644 000765 000024 00000004365 12233035540 025552 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp000644 000765 000024 00000004154 12233035540 026547 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/or.hpp000644 000765 000024 00000002352 12233035540 024474 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp000644 000765 000024 00000004243 12233035540 026522 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/plus.hpp000644 000765 000024 00000006035 12233035540 025041 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/quote.hpp000644 000765 000024 00000004213 12233035540 025207 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl : T { }; template< typename T > struct quote_impl< T,false > { typedef T type; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< F , aux::has_type< F >::value > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< F< U1,U2 > , aux::has_type< F< U1,U2 > >::value > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< F< U1,U2,U3 > , aux::has_type< F< U1,U2,U3 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< F< U1,U2,U3,U4 > , aux::has_type< F< U1,U2,U3,U4 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< F< U1,U2,U3,U4,U5 > , aux::has_type< F< U1,U2,U3,U4,U5 > >::value > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp000644 000765 000024 00000016314 12233035540 027557 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp000644 000765 000024 00000015075 12233035540 030605 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/set.hpp000644 000765 000024 00000022517 12233035540 024654 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp000644 000765 000024 00000024634 12233035540 025160 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp000644 000765 000024 00000004314 12233035540 026203 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp000644 000765 000024 00000004333 12233035540 026367 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp000644 000765 000024 00000000462 12233035540 027077 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/times.hpp000644 000765 000024 00000006073 12233035540 025201 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp000644 000765 000024 00000003562 12233035540 026355 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value,F, Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/vector.hpp000644 000765 000024 00000023022 12233035540 025353 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp000644 000765 000024 00000027715 12233035540 025672 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp000644 000765 000024 00000004236 12233035540 027460 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp000644 000765 000024 00000004212 12233035540 027340 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/and.hpp000644 000765 000024 00000002536 12233035540 024764 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_ > struct and_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : false_ { }; }; template<> struct and_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,true_ > { }; template<> struct result_< true_,true_,true_,true_ > : true_ { }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/apply.hpp000644 000765 000024 00000004723 12233035540 025347 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; /// workaround for ETI bug template<> struct apply0 { typedef int type; }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; /// workaround for ETI bug template<> struct apply1< int,int > { typedef int type; }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; /// workaround for ETI bug template<> struct apply2< int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; /// workaround for ETI bug template<> struct apply3< int,int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; /// workaround for ETI bug template<> struct apply4< int,int,int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// workaround for ETI bug template<> struct apply5< int,int,int,int,int,int > { typedef int type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp000644 000765 000024 00000001475 12233035540 026210 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp000644 000765 000024 00000004007 12233035540 026373 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 { typedef typename F::template apply< >::type type; }; /// workaround for ETI bug template<> struct apply_wrap0 { typedef int type; }; template< typename F, typename T1 > struct apply_wrap1 { typedef typename F::template apply< T1 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap1< int,int > { typedef int type; }; template< typename F, typename T1, typename T2 > struct apply_wrap2 { typedef typename F::template apply< T1, T2 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap2< int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 { typedef typename F::template apply< T1, T2, T3 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap3< int,int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 { typedef typename F::template apply< T1, T2, T3, T4 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap4< int,int,int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 { typedef typename F::template apply< T1, T2, T3, T4, T5 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap5< int,int,int,int,int,int > { typedef int type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/arg.hpp000644 000765 000024 00000005515 12233035540 024773 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp000644 000765 000024 00000016275 12233035540 026304 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef typename apply_wrap5< T , U1, U2, U3, U4, U5 >::type type; }; }; template< typename T > struct is_bind_template; template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); template< int N > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F > aux::yes_tag is_bind_helper(bind0*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1 > aux::yes_tag is_bind_helper(bind1< F,T1 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2 > aux::yes_tag is_bind_helper(bind2< F,T1,T2 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3 > aux::yes_tag is_bind_helper(bind3< F,T1,T2,T3 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 > aux::yes_tag is_bind_helper(bind4< F,T1,T2,T3,T4 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/bind.hpp000644 000765 000024 00000025165 12233035540 025141 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef typename apply_wrap5< T , U1, U2, U3, U4, U5 >::type type; }; }; template< typename T > struct is_bind_template; template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; template< typename T > struct replace_unnamed_arg_impl { template< typename Arg > struct result_ { typedef Arg next; typedef T type; }; }; template<> struct replace_unnamed_arg_impl< arg< -1 > > { template< typename Arg > struct result_ { typedef typename next::type next; typedef Arg type; }; }; template< typename T, typename Arg > struct replace_unnamed_arg : replace_unnamed_arg_impl::template result_ { }; template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); template< int N > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F > aux::yes_tag is_bind_helper(bind0*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1 > aux::yes_tag is_bind_helper(bind1< F,T1 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2 > aux::yes_tag is_bind_helper(bind2< F,T1,T2 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3 > aux::yes_tag is_bind_helper(bind3< F,T1,T2,T3 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 > aux::yes_tag is_bind_helper(bind4< F,T1,T2,T3,T4 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp000644 000765 000024 00000001466 12233035540 025777 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp000644 000765 000024 00000006103 12233035540 025455 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct bitand_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitand_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitand_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitand_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : aux::msvc_eti_base< typename if_< is_na , bitand_2< N1,N2 > , bitand_< bitand_2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitand_2 : aux::msvc_eti_base< typename apply_wrap2< bitand_impl< typename bitand_tag::type , typename bitand_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitand_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); typedef integral_c< T,value > type; }; } template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitand_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp000644 000765 000024 00000006054 12233035540 025340 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct bitor_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitor_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitor_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitor_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : aux::msvc_eti_base< typename if_< is_na , bitor_2< N1,N2 > , bitor_< bitor_2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitor_2 : aux::msvc_eti_base< typename apply_wrap2< bitor_impl< typename bitor_tag::type , typename bitor_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitor_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 | n2)); typedef integral_c< T,value > type; }; } template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitor_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp000644 000765 000024 00000006103 12233035540 025523 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct bitxor_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitxor_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitxor_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitxor_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : aux::msvc_eti_base< typename if_< is_na , bitxor_2< N1,N2 > , bitxor_< bitxor_2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitxor_2 : aux::msvc_eti_base< typename apply_wrap2< bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitxor_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 ^ n2)); typedef integral_c< T,value > type; }; } template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitxor_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/deque.hpp000644 000765 000024 00000034572 12233035540 025332 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct deque_chooser; } namespace aux { template<> struct deque_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_deque_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_deque_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct deque_count_args { BOOST_STATIC_CONSTANT(int, value = is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque_impl { typedef aux::deque_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::deque_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque : aux::deque_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::deque_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/divides.hpp000644 000765 000024 00000006064 12233035540 025651 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct divides_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct divides_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct divides_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct divides2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : aux::msvc_eti_base< typename if_< is_na , divides2< N1,N2 > , divides< divides2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct divides2 : aux::msvc_eti_base< typename apply_wrap2< divides_impl< typename divides_tag::type , typename divides_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct divides_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 / n2)); typedef integral_c< T,value > type; }; } template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::divides_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp000644 000765 000024 00000004436 12233035540 026034 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct equal_to_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct equal_to_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct equal_to_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : aux::msvc_eti_base< typename apply_wrap2< equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp000644 000765 000024 00000013176 12233035540 026171 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< int N > struct fold_chunk; template<> struct fold_chunk<0> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; }; template<> struct fold_chunk<1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; }; template<> struct fold_chunk<2> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; }; template<> struct fold_chunk<3> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; }; template<> struct fold_chunk<4> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; }; template< int N > struct fold_chunk { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_step; template< typename Last , typename State > struct fold_null_step { typedef Last iterator; typedef State state; }; template<> struct fold_chunk< -1 > { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , fold_null_step< Last,State > , fold_step< First,Last,State,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_step { typedef fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl : fold_chunk ::template result_< First,Last,State,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp000644 000765 000024 00000025717 12233035540 026472 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/greater.hpp000644 000765 000024 00000004416 12233035540 025652 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct greater_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : aux::msvc_eti_base< typename apply_wrap2< greater_impl< typename greater_tag::type , typename greater_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp000644 000765 000024 00000004551 12233035540 027041 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct greater_equal_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_equal_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_equal_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : aux::msvc_eti_base< typename apply_wrap2< greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp000644 000765 000024 00000006301 12233035540 025656 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1, bool C2 > struct inherit2_impl { template< typename Derived, typename T1, typename T2 > struct result_ : T1, T2 { typedef Derived type_; }; }; template<> struct inherit2_impl< false,true > { template< typename Derived, typename T1, typename T2 > struct result_ : T1 { typedef T1 type_; }; }; template<> struct inherit2_impl< true,false > { template< typename Derived, typename T1, typename T2 > struct result_ : T2 { typedef T2 type_; }; }; template<> struct inherit2_impl< true,true > { template< typename Derived, typename T1, typename T2 > struct result_ { typedef T1 type_; }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : aux::inherit2_impl< is_empty_base::value , is_empty_base::value >::template result_< inherit2< T1,T2 >,T1, T2 > { typedef typename inherit2::type_ type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp000644 000765 000024 00000010262 12233035540 027663 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp000644 000765 000024 00000012735 12233035540 027214 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< int N > struct iter_fold_chunk; template<> struct iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; }; template<> struct iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; }; template<> struct iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; }; template<> struct iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; }; template<> struct iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; }; template< int N > struct iter_fold_chunk { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_step; template< typename Last , typename State > struct iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , iter_fold_null_step< Last,State > , iter_fold_step< First,Last,State,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_step { typedef iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl : iter_fold_chunk ::template result_< First,Last,State,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp000644 000765 000024 00000014515 12233035540 027167 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/less.hpp000644 000765 000024 00000004341 12233035540 025164 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct less_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : aux::msvc_eti_base< typename apply_wrap2< less_impl< typename less_tag::type , typename less_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp000644 000765 000024 00000004474 12233035540 026362 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct less_equal_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_equal_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_equal_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : aux::msvc_eti_base< typename apply_wrap2< less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/list.hpp000644 000765 000024 00000034434 12233035540 025177 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct list_chooser; } namespace aux { template<> struct list_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef list0< >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_list_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct list_count_args { BOOST_STATIC_CONSTANT(int, value = is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list_impl { typedef aux::list_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::list_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list : aux::list_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::list_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp000644 000765 000024 00000031511 12233035540 025472 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct list_c_chooser; } namespace aux { template<> struct list_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list1_c< T, C0 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list2_c< T, C0, C1 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list3_c< T, C0, C1, C2 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list4_c< T, C0, C1, C2, C3 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list5_c< T, C0, C1, C2, C3, C4 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list6_c< T, C0, C1, C2, C3, C4, C5 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list11_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list12_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list13_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_list_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct list_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c_impl { typedef aux::list_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::list_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c : aux::list_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::list_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/map.hpp000644 000765 000024 00000034323 12233035540 024776 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct map_chooser; } namespace aux { template<> struct map_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef map0< >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_map_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_map_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct map_count_args { BOOST_STATIC_CONSTANT(int, value = is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map_impl { typedef aux::map_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::map_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map : aux::map_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::map_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/minus.hpp000644 000765 000024 00000006006 12233035540 025351 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct minus_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct minus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct minus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct minus2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : aux::msvc_eti_base< typename if_< is_na , minus2< N1,N2 > , minus< minus2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct minus2 : aux::msvc_eti_base< typename apply_wrap2< minus_impl< typename minus_tag::type , typename minus_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct minus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 - n2)); typedef integral_c< T,value > type; }; } template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::minus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp000644 000765 000024 00000004750 12233035540 025712 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct modulus_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct modulus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct modulus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : aux::msvc_eti_base< typename apply_wrap2< modulus_impl< typename modulus_tag::type , typename modulus_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct modulus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 % n2)); typedef integral_c< T,value > type; }; } template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::modulus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp000644 000765 000024 00000004532 12233035540 026711 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct not_equal_to_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct not_equal_to_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct not_equal_to_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : aux::msvc_eti_base< typename apply_wrap2< not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/or.hpp000644 000765 000024 00000002537 12233035540 024643 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_ > struct or_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : true_ { }; }; template<> struct or_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,false_ > { }; template<> struct result_< false_,false_,false_,false_ > : false_ { }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp000644 000765 000024 00000004243 12233035540 026664 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/plus.hpp000644 000765 000024 00000005757 12233035540 025215 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct plus_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct plus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct plus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct plus2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : aux::msvc_eti_base< typename if_< is_na , plus2< N1,N2 > , plus< plus2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct plus2 : aux::msvc_eti_base< typename apply_wrap2< plus_impl< typename plus_tag::type , typename plus_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct plus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 + n2)); typedef integral_c< T,value > type; }; } template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::plus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/quote.hpp000644 000765 000024 00000004274 12233035540 025360 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< bool > struct quote_impl { template< typename T > struct result_ : T { }; }; template<> struct quote_impl { template< typename T > struct result_ { typedef T type; }; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< aux::has_type< F >::value > ::template result_< F > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< aux::has_type< F< U1,U2 > >::value > ::template result_< F< U1,U2 > > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< aux::has_type< F< U1,U2,U3 > >::value > ::template result_< F< U1,U2,U3 > > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< aux::has_type< F< U1,U2,U3,U4 > >::value > ::template result_< F< U1,U2,U3,U4 > > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< aux::has_type< F< U1,U2,U3,U4,U5 > >::value > ::template result_< F< U1,U2,U3,U4,U5 > > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp000644 000765 000024 00000021246 12233035540 027721 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< long N > struct reverse_fold_chunk; template<> struct reverse_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step; template< typename Last , typename State > struct reverse_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_fold_null_step< Last,State > , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step { typedef reverse_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl : reverse_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp000644 000765 000024 00000020072 12233035540 030740 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< long N > struct reverse_iter_fold_chunk; template<> struct reverse_iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_iter_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step; template< typename Last , typename State > struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_iter_fold_null_step< Last,State > , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step { typedef reverse_iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl : reverse_iter_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/set.hpp000644 000765 000024 00000034323 12233035540 025014 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct set_chooser; } namespace aux { template<> struct set_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef set0< >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_set_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_set_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct set_count_args { BOOST_STATIC_CONSTANT(int, value = is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set_impl { typedef aux::set_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::set_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set : aux::set_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::set_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp000644 000765 000024 00000031400 12233035540 025307 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct set_c_chooser; } namespace aux { template<> struct set_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set1_c< T, C0 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set2_c< T, C0, C1 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set3_c< T, C0, C1, C2 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set4_c< T, C0, C1, C2, C3 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set5_c< T, C0, C1, C2, C3, C4 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set6_c< T, C0, C1, C2, C3, C4, C5 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set11_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set12_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set13_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_set_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_set_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct set_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c_impl { typedef aux::set_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::set_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c : aux::set_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::set_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp000644 000765 000024 00000004772 12233035540 026355 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct shift_left_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_left_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_left_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : aux::msvc_eti_base< typename apply_wrap2< shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { namespace aux { template< typename T, typename Shift, T n, Shift s > struct shift_left_wknd { BOOST_STATIC_CONSTANT(T, value = (n << s)); typedef integral_c< T,value > type; }; } template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : aux::shift_left_wknd< typename N::value_type , typename S::value_type , N::value , S::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp000644 000765 000024 00000005013 12233035540 026525 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct shift_right_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_right_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_right_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : aux::msvc_eti_base< typename apply_wrap2< shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { namespace aux { template< typename T, typename Shift, T n, Shift s > struct shift_right_wknd { BOOST_STATIC_CONSTANT(T, value = (n >> s)); typedef integral_c< T,value > type; }; } template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : aux::shift_right_wknd< typename N::value_type , typename S::value_type , N::value , S::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp000644 000765 000024 00000001501 12233035540 027234 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; template<> struct template_arity : mpl::int_< -1 > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/times.hpp000644 000765 000024 00000006006 12233035540 025337 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct times_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct times_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct times_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct times2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : aux::msvc_eti_base< typename if_< is_na , times2< N1,N2 > , times< times2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct times2 : aux::msvc_eti_base< typename apply_wrap2< times_impl< typename times_tag::type , typename times_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct times_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 * n2)); typedef integral_c< T,value > type; }; } template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::times_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp000644 000765 000024 00000004370 12233035540 026515 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl { template< typename F, typename Args > struct apply; }; template<> struct unpack_args_impl<0> { template< typename F, typename Args > struct apply : apply0< F > { }; }; template<> struct unpack_args_impl<1> { template< typename F, typename Args > struct apply : apply1< F , typename at_c< Args,0 >::type > { }; }; template<> struct unpack_args_impl<2> { template< typename F, typename Args > struct apply : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; }; template<> struct unpack_args_impl<3> { template< typename F, typename Args > struct apply : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; }; template<> struct unpack_args_impl<4> { template< typename F, typename Args > struct apply : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; }; template<> struct unpack_args_impl<5> { template< typename F, typename Args > struct apply : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value > ::template apply< F,Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/vector.hpp000644 000765 000024 00000034656 12233035540 025534 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct vector_chooser; } namespace aux { template<> struct vector_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_vector_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct vector_count_args { BOOST_STATIC_CONSTANT(int, value = is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector_impl { typedef aux::vector_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::vector_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector : aux::vector_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::vector_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp000644 000765 000024 00000033121 12233035540 026020 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct vector_c_chooser; } namespace aux { template<> struct vector_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector1_c< T, T(C0) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_vector_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct vector_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c_impl { typedef aux::vector_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::vector_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c : aux::vector_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::vector_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp000644 000765 000024 00000005203 12233035540 027452 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp000644 000765 000024 00000005157 12233035540 027350 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/and.hpp000644 000765 000024 00000002547 12233035540 024765 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_ > struct and_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : false_ { }; }; template<> struct and_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,true_ > { }; }; template<> struct and_impl ::result_< true_,true_,true_,true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/apply.hpp000644 000765 000024 00000005173 12233035540 025346 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 { typedef typename apply_wrap0< typename lambda::type >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; /// workaround for ETI bug template<> struct apply0 { typedef int type; }; template< typename F, typename T1 > struct apply1 { typedef typename apply_wrap1< typename lambda::type , T1 >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; /// workaround for ETI bug template<> struct apply1< int,int > { typedef int type; }; template< typename F, typename T1, typename T2 > struct apply2 { typedef typename apply_wrap2< typename lambda::type , T1, T2 >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; /// workaround for ETI bug template<> struct apply2< int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 { typedef typename apply_wrap3< typename lambda::type , T1, T2, T3 >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; /// workaround for ETI bug template<> struct apply3< int,int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 { typedef typename apply_wrap4< typename lambda::type , T1, T2, T3, T4 >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; /// workaround for ETI bug template<> struct apply4< int,int,int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 { typedef typename apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// workaround for ETI bug template<> struct apply5< int,int,int,int,int,int > { typedef int type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp000644 000765 000024 00000001475 12233035540 026207 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp000644 000765 000024 00000011124 12233035540 026370 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F> struct msvc_apply0 { template< bool > struct f_ : F {}; template<> struct f_ { template< typename P = int > struct apply { typedef int type; }; }; template< typename T = int > struct result_ : f_< aux::msvc_never_true::value > ::template apply<> { }; }; template< typename F > struct apply_wrap0 { typedef typename msvc_apply0::template result_< >::type type; }; /// workaround for ETI bug template<> struct apply_wrap0 { typedef int type; }; template< typename F> struct msvc_apply1 { template< bool > struct f_ : F {}; template<> struct f_ { template< typename P1 > struct apply { typedef int type; }; }; template< typename T1 > struct result_ : f_< aux::msvc_never_true::value > ::template apply { }; }; template< typename F, typename T1 > struct apply_wrap1 { typedef typename msvc_apply1::template result_< T1 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap1< int,int > { typedef int type; }; template< typename F> struct msvc_apply2 { template< bool > struct f_ : F {}; template<> struct f_ { template< typename P1, typename P2 > struct apply { typedef int type; }; }; template< typename T1, typename T2 > struct result_ : f_< aux::msvc_never_true::value > ::template apply< T1,T2 > { }; }; template< typename F, typename T1, typename T2 > struct apply_wrap2 { typedef typename msvc_apply2::template result_< T1, T2 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap2< int,int,int > { typedef int type; }; template< typename F> struct msvc_apply3 { template< bool > struct f_ : F {}; template<> struct f_ { template< typename P1, typename P2, typename P3 > struct apply { typedef int type; }; }; template< typename T1, typename T2, typename T3 > struct result_ : f_< aux::msvc_never_true::value > ::template apply< T1,T2,T3 > { }; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 { typedef typename msvc_apply3::template result_< T1, T2, T3 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap3< int,int,int,int > { typedef int type; }; template< typename F> struct msvc_apply4 { template< bool > struct f_ : F {}; template<> struct f_ { template< typename P1, typename P2, typename P3, typename P4 > struct apply { typedef int type; }; }; template< typename T1, typename T2, typename T3, typename T4 > struct result_ : f_< aux::msvc_never_true::value > ::template apply< T1,T2,T3,T4 > { }; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 { typedef typename msvc_apply4::template result_< T1, T2, T3, T4 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap4< int,int,int,int,int > { typedef int type; }; template< typename F> struct msvc_apply5 { template< bool > struct f_ : F {}; template<> struct f_ { template< typename P1, typename P2, typename P3, typename P4 , typename P5 > struct apply { typedef int type; }; }; template< typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ : f_< aux::msvc_never_true::value > ::template apply< T1,T2,T3,T4,T5 > { }; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 { typedef typename msvc_apply5::template result_< T1, T2, T3, T4, T5 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap5< int,int,int,int,int,int > { typedef int type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/arg.hpp000644 000765 000024 00000005515 12233035540 024772 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp000644 000765 000024 00000016275 12233035540 026303 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef typename apply_wrap5< T , U1, U2, U3, U4, U5 >::type type; }; }; template< typename T > struct is_bind_template; template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); template< int N > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F > aux::yes_tag is_bind_helper(bind0*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1 > aux::yes_tag is_bind_helper(bind1< F,T1 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2 > aux::yes_tag is_bind_helper(bind2< F,T1,T2 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3 > aux::yes_tag is_bind_helper(bind3< F,T1,T2,T3 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 > aux::yes_tag is_bind_helper(bind4< F,T1,T2,T3,T4 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/bind.hpp000644 000765 000024 00000025165 12233035540 025140 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef typename apply_wrap5< T , U1, U2, U3, U4, U5 >::type type; }; }; template< typename T > struct is_bind_template; template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; template< typename T > struct replace_unnamed_arg_impl { template< typename Arg > struct result_ { typedef Arg next; typedef T type; }; }; template<> struct replace_unnamed_arg_impl< arg< -1 > > { template< typename Arg > struct result_ { typedef typename next::type next; typedef Arg type; }; }; template< typename T, typename Arg > struct replace_unnamed_arg : replace_unnamed_arg_impl::template result_ { }; template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); template< int N > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F > aux::yes_tag is_bind_helper(bind0*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1 > aux::yes_tag is_bind_helper(bind1< F,T1 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2 > aux::yes_tag is_bind_helper(bind2< F,T1,T2 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3 > aux::yes_tag is_bind_helper(bind3< F,T1,T2,T3 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 > aux::yes_tag is_bind_helper(bind4< F,T1,T2,T3,T4 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp000644 000765 000024 00000001466 12233035540 025776 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp000644 000765 000024 00000006057 12233035540 025464 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct bitand_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitand_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitand_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitand_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : if_< is_na , bitand_2< N1,N2 > , bitand_< bitand_2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitand_2 : aux::msvc_eti_base< typename apply_wrap2< bitand_impl< typename bitand_tag::type , typename bitand_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitand_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); typedef integral_c< T,value > type; }; } template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitand_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp000644 000765 000024 00000006030 12233035540 025331 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct bitor_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitor_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitor_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitor_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : if_< is_na , bitor_2< N1,N2 > , bitor_< bitor_2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitor_2 : aux::msvc_eti_base< typename apply_wrap2< bitor_impl< typename bitor_tag::type , typename bitor_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitor_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 | n2)); typedef integral_c< T,value > type; }; } template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitor_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp000644 000765 000024 00000006057 12233035540 025532 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct bitxor_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitxor_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitxor_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitxor_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : if_< is_na , bitxor_2< N1,N2 > , bitxor_< bitxor_2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitxor_2 : aux::msvc_eti_base< typename apply_wrap2< bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitxor_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 ^ n2)); typedef integral_c< T,value > type; }; } template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitxor_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/deque.hpp000644 000765 000024 00000034572 12233035540 025331 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct deque_chooser; } namespace aux { template<> struct deque_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_deque_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_deque_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct deque_count_args { BOOST_STATIC_CONSTANT(int, value = is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque_impl { typedef aux::deque_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::deque_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque : aux::deque_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::deque_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/divides.hpp000644 000765 000024 00000006040 12233035540 025642 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct divides_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct divides_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct divides_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct divides2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : if_< is_na , divides2< N1,N2 > , divides< divides2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct divides2 : aux::msvc_eti_base< typename apply_wrap2< divides_impl< typename divides_tag::type , typename divides_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct divides_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 / n2)); typedef integral_c< T,value > type; }; } template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::divides_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp000644 000765 000024 00000004456 12233035540 026035 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct equal_to_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct equal_to_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct equal_to_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : aux::msvc_eti_base< typename apply_wrap2< equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp000644 000765 000024 00000014736 12233035540 026173 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< int N > struct fold_chunk; template<> struct fold_chunk<0> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct fold_chunk<1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct fold_chunk<2> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct fold_chunk<3> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct fold_chunk<4> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template< int N > struct fold_chunk { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_step; template< typename Last , typename State > struct fold_null_step { typedef Last iterator; typedef State state; }; template<> struct fold_chunk< -1 > { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , fold_null_step< Last,State > , fold_step< First,Last,State,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_step { typedef fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl : fold_chunk ::template result_< First,Last,State,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp000644 000765 000024 00000025717 12233035540 026471 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/greater.hpp000644 000765 000024 00000004436 12233035540 025653 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct greater_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : aux::msvc_eti_base< typename apply_wrap2< greater_impl< typename greater_tag::type , typename greater_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp000644 000765 000024 00000004571 12233035540 027042 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct greater_equal_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_equal_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_equal_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : aux::msvc_eti_base< typename apply_wrap2< greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp000644 000765 000024 00000006301 12233035540 025655 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1, bool C2 > struct inherit2_impl { template< typename Derived, typename T1, typename T2 > struct result_ : T1, T2 { typedef Derived type_; }; }; template<> struct inherit2_impl< false,true > { template< typename Derived, typename T1, typename T2 > struct result_ : T1 { typedef T1 type_; }; }; template<> struct inherit2_impl< true,false > { template< typename Derived, typename T1, typename T2 > struct result_ : T2 { typedef T2 type_; }; }; template<> struct inherit2_impl< true,true > { template< typename Derived, typename T1, typename T2 > struct result_ { typedef T1 type_; }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : aux::inherit2_impl< is_empty_base::value , is_empty_base::value >::template result_< inherit2< T1,T2 >,T1, T2 > { typedef typename inherit2::type_ type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp000644 000765 000024 00000010262 12233035540 027662 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp000644 000765 000024 00000014475 12233035540 027216 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< int N > struct iter_fold_chunk; template<> struct iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template< int N > struct iter_fold_chunk { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_step; template< typename Last , typename State > struct iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , iter_fold_null_step< Last,State > , iter_fold_step< First,Last,State,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_step { typedef iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl : iter_fold_chunk ::template result_< First,Last,State,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp000644 000765 000024 00000014515 12233035540 027166 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/less.hpp000644 000765 000024 00000004361 12233035540 025165 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct less_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : aux::msvc_eti_base< typename apply_wrap2< less_impl< typename less_tag::type , typename less_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp000644 000765 000024 00000004514 12233035540 026354 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct less_equal_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_equal_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_equal_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : aux::msvc_eti_base< typename apply_wrap2< less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/list.hpp000644 000765 000024 00000034434 12233035540 025176 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct list_chooser; } namespace aux { template<> struct list_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef list0< >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_list_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct list_count_args { BOOST_STATIC_CONSTANT(int, value = is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list_impl { typedef aux::list_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::list_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list : aux::list_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::list_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp000644 000765 000024 00000031511 12233035540 025471 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct list_c_chooser; } namespace aux { template<> struct list_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list1_c< T, C0 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list2_c< T, C0, C1 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list3_c< T, C0, C1, C2 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list4_c< T, C0, C1, C2, C3 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list5_c< T, C0, C1, C2, C3, C4 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list6_c< T, C0, C1, C2, C3, C4, C5 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list11_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list12_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list13_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_list_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct list_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c_impl { typedef aux::list_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::list_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c : aux::list_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::list_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/map.hpp000644 000765 000024 00000034323 12233035540 024775 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct map_chooser; } namespace aux { template<> struct map_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef map0< >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_map_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_map_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct map_count_args { BOOST_STATIC_CONSTANT(int, value = is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map_impl { typedef aux::map_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::map_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map : aux::map_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::map_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/minus.hpp000644 000765 000024 00000005762 12233035540 025360 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct minus_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct minus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct minus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct minus2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : if_< is_na , minus2< N1,N2 > , minus< minus2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct minus2 : aux::msvc_eti_base< typename apply_wrap2< minus_impl< typename minus_tag::type , typename minus_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct minus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 - n2)); typedef integral_c< T,value > type; }; } template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::minus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp000644 000765 000024 00000004770 12233035540 025713 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct modulus_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct modulus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct modulus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : aux::msvc_eti_base< typename apply_wrap2< modulus_impl< typename modulus_tag::type , typename modulus_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct modulus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 % n2)); typedef integral_c< T,value > type; }; } template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::modulus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp000644 000765 000024 00000004552 12233035540 026712 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct not_equal_to_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct not_equal_to_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct not_equal_to_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : aux::msvc_eti_base< typename apply_wrap2< not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/or.hpp000644 000765 000024 00000002550 12233035540 024635 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_ > struct or_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : true_ { }; }; template<> struct or_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,false_ > { }; }; template<> struct or_impl ::result_< false_,false_,false_,false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp000644 000765 000024 00000004243 12233035540 026663 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/plus.hpp000644 000765 000024 00000005733 12233035540 025206 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct plus_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct plus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct plus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct plus2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : if_< is_na , plus2< N1,N2 > , plus< plus2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct plus2 : aux::msvc_eti_base< typename apply_wrap2< plus_impl< typename plus_tag::type , typename plus_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct plus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 + n2)); typedef integral_c< T,value > type; }; } template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::plus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/quote.hpp000644 000765 000024 00000000444 12233035540 025352 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp000644 000765 000024 00000023036 12233035540 027717 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< long N > struct reverse_fold_chunk; template<> struct reverse_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template< long N > struct reverse_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step; template< typename Last , typename State > struct reverse_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_fold_null_step< Last,State > , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step { typedef reverse_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl : reverse_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp000644 000765 000024 00000021662 12233035540 030745 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< long N > struct reverse_iter_fold_chunk; template<> struct reverse_iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template< long N > struct reverse_iter_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step; template< typename Last , typename State > struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_iter_fold_null_step< Last,State > , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step { typedef reverse_iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl : reverse_iter_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/set.hpp000644 000765 000024 00000034323 12233035540 025013 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct set_chooser; } namespace aux { template<> struct set_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef set0< >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_set_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_set_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct set_count_args { BOOST_STATIC_CONSTANT(int, value = is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set_impl { typedef aux::set_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::set_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set : aux::set_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::set_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp000644 000765 000024 00000031400 12233035540 025306 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct set_c_chooser; } namespace aux { template<> struct set_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set1_c< T, C0 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set2_c< T, C0, C1 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set3_c< T, C0, C1, C2 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set4_c< T, C0, C1, C2, C3 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set5_c< T, C0, C1, C2, C3, C4 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set6_c< T, C0, C1, C2, C3, C4, C5 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set11_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set12_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set13_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_set_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_set_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct set_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c_impl { typedef aux::set_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::set_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c : aux::set_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::set_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp000644 000765 000024 00000005012 12233035540 026340 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct shift_left_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_left_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_left_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : aux::msvc_eti_base< typename apply_wrap2< shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { namespace aux { template< typename T, typename Shift, T n, Shift s > struct shift_left_wknd { BOOST_STATIC_CONSTANT(T, value = (n << s)); typedef integral_c< T,value > type; }; } template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : aux::shift_left_wknd< typename N::value_type , typename S::value_type , N::value , S::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp000644 000765 000024 00000005033 12233035540 026526 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct shift_right_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_right_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_right_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : aux::msvc_eti_base< typename apply_wrap2< shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { namespace aux { template< typename T, typename Shift, T n, Shift s > struct shift_right_wknd { BOOST_STATIC_CONSTANT(T, value = (n >> s)); typedef integral_c< T,value > type; }; } template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : aux::shift_right_wknd< typename N::value_type , typename S::value_type , N::value , S::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp000644 000765 000024 00000001501 12233035540 027233 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; template<> struct template_arity : mpl::int_< -1 > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/times.hpp000644 000765 000024 00000005762 12233035540 025346 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct times_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct times_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct times_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct times2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : if_< is_na , times2< N1,N2 > , times< times2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct times2 : aux::msvc_eti_base< typename apply_wrap2< times_impl< typename times_tag::type , typename times_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct times_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 * n2)); typedef integral_c< T,value > type; }; } template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::times_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp000644 000765 000024 00000004370 12233035540 026514 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl { template< typename F, typename Args > struct apply; }; template<> struct unpack_args_impl<0> { template< typename F, typename Args > struct apply : apply0< F > { }; }; template<> struct unpack_args_impl<1> { template< typename F, typename Args > struct apply : apply1< F , typename at_c< Args,0 >::type > { }; }; template<> struct unpack_args_impl<2> { template< typename F, typename Args > struct apply : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; }; template<> struct unpack_args_impl<3> { template< typename F, typename Args > struct apply : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; }; template<> struct unpack_args_impl<4> { template< typename F, typename Args > struct apply : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; }; template<> struct unpack_args_impl<5> { template< typename F, typename Args > struct apply : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value > ::template apply< F,Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/vector.hpp000644 000765 000024 00000034656 12233035540 025533 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct vector_chooser; } namespace aux { template<> struct vector_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_vector_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct vector_count_args { BOOST_STATIC_CONSTANT(int, value = is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector_impl { typedef aux::vector_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::vector_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector : aux::vector_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::vector_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp000644 000765 000024 00000033121 12233035540 026017 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct vector_c_chooser; } namespace aux { template<> struct vector_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector1_c< T, T(C0) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_vector_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct vector_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c_impl { typedef aux::vector_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::vector_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c : aux::vector_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::vector_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp000644 000765 000024 00000004236 12233035540 027075 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp000644 000765 000024 00000004212 12233035540 026755 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/and.hpp000644 000765 000024 00000002351 12233035540 024374 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/apply.hpp000644 000765 000024 00000005270 12233035540 024762 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp000644 000765 000024 00000001714 12233035540 025621 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp000644 000765 000024 00000002326 12233035540 026012 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 : F::template apply< > { }; template< typename F > struct apply_wrap0< F,true_ > : F::apply { }; template< typename F, typename T1 > struct apply_wrap1 : F::template apply { }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : F::template apply< T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : F::template apply< T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : F::template apply< T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : F::template apply< T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/arg.hpp000644 000765 000024 00000005515 12233035540 024410 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp000644 000765 000024 00000024024 12233035540 025710 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/bind.hpp000644 000765 000024 00000034111 12233035540 024545 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp000644 000765 000024 00000001704 12233035540 025407 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct bind; template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/bitand.hpp000644 000765 000024 00000006210 12233035540 025071 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/bitor.hpp000644 000765 000024 00000006152 12233035540 024754 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp000644 000765 000024 00000006210 12233035540 025137 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/deque.hpp000644 000765 000024 00000022773 12233035540 024747 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/divides.hpp000644 000765 000024 00000006167 12233035540 025272 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp000644 000765 000024 00000004061 12233035540 025443 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp000644 000765 000024 00000010402 12233035540 025573 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp000644 000765 000024 00000026366 12233035540 026110 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag , typename Arity > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg,Tag, int_< -1 > > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag , int_<1> > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag , int_<1> > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag , int_<2> > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag , int_<2> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag , int_<3> > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag , int_<3> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag , int_<4> > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag , int_<4> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag , int_<5> > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag , int_<5> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect,Tag, int_<1> > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; template< typename F , typename Tag1 , typename Tag2 , typename Arity > struct lambda< lambda< F,Tag1,Arity > , Tag2 , int_<3> > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef bind1< quote1, typename l1::result_ > arity_; typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; typedef aux::le_result3 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/greater.hpp000644 000765 000024 00000004040 12233035540 025260 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp000644 000765 000024 00000004173 12233035540 026456 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/inherit.hpp000644 000765 000024 00000005420 12233035540 025274 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp000644 000765 000024 00000010262 12233035540 027300 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp000644 000765 000024 00000010076 12233035540 026625 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp000644 000765 000024 00000014515 12233035540 026604 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/less.hpp000644 000765 000024 00000003763 12233035540 024610 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp000644 000765 000024 00000004116 12233035540 025770 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/list.hpp000644 000765 000024 00000022620 12233035540 024606 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/list_c.hpp000644 000765 000024 00000024735 12233035540 025121 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/map.hpp000644 000765 000024 00000022517 12233035540 024415 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/minus.hpp000644 000765 000024 00000006073 12233035540 024772 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/modulus.hpp000644 000765 000024 00000004365 12233035540 025331 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp000644 000765 000024 00000004154 12233035540 026326 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/or.hpp000644 000765 000024 00000002352 12233035540 024253 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp000644 000765 000024 00000004243 12233035540 026301 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/plus.hpp000644 000765 000024 00000006035 12233035540 024620 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/quote.hpp000644 000765 000024 00000004246 12233035540 024774 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl { typedef typename T::type type; }; template< typename T > struct quote_impl< T,false > { typedef T type; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< F , aux::has_type< F >::value > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< F< U1,U2 > , aux::has_type< F< U1,U2 > >::value > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< F< U1,U2,U3 > , aux::has_type< F< U1,U2,U3 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< F< U1,U2,U3,U4 > , aux::has_type< F< U1,U2,U3,U4 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< F< U1,U2,U3,U4,U5 > , aux::has_type< F< U1,U2,U3,U4,U5 > >::value > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp000644 000765 000024 00000016314 12233035540 027336 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp000644 000765 000024 00000015075 12233035540 030364 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/set.hpp000644 000765 000024 00000022517 12233035540 024433 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/set_c.hpp000644 000765 000024 00000024634 12233035540 024737 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp000644 000765 000024 00000004314 12233035540 025762 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp000644 000765 000024 00000004333 12233035540 026146 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp000644 000765 000024 00000005264 12233035540 026663 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct arity_tag { typedef char (&type)[N + 1]; }; template< int C1, int C2, int C3, int C4, int C5, int C6 > struct max_arity { BOOST_STATIC_CONSTANT(int, value = ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) ) ); }; arity_tag<0>::type arity_helper(...); template< template< typename P1 > class F , typename T1 > typename arity_tag<1>::type arity_helper(type_wrapper< F >, arity_tag<1>); template< template< typename P1, typename P2 > class F , typename T1, typename T2 > typename arity_tag<2>::type arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>); template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 > typename arity_tag<3>::type arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>); template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 > typename arity_tag<4>::type arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>); template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 > typename arity_tag<5>::type arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>); template< template< typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6 > typename arity_tag<6>::type arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>); template< typename F, int N > struct template_arity_impl { BOOST_STATIC_CONSTANT(int, value = sizeof(::boost::mpl::aux::arity_helper(type_wrapper(), arity_tag())) - 1 ); }; template< typename F > struct template_arity { BOOST_STATIC_CONSTANT(int, value = ( max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value )); typedef mpl::int_ type; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/times.hpp000644 000765 000024 00000006073 12233035540 024760 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp000644 000765 000024 00000003562 12233035540 026134 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value,F, Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/vector.hpp000644 000765 000024 00000023022 12233035540 025132 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp000644 000765 000024 00000027715 12233035540 025451 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp000644 000765 000024 00000004236 12233035540 027104 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp000644 000765 000024 00000004212 12233035540 026764 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/and.hpp000644 000765 000024 00000002351 12233035540 024403 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/apply.hpp000644 000765 000024 00000005270 12233035540 024771 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp000644 000765 000024 00000001714 12233035540 025630 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp000644 000765 000024 00000002326 12233035540 026021 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 : F::template apply< > { }; template< typename F > struct apply_wrap0< F,true_ > : F::apply { }; template< typename F, typename T1 > struct apply_wrap1 : F::template apply { }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : F::template apply< T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : F::template apply< T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : F::template apply< T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : F::template apply< T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/arg.hpp000644 000765 000024 00000005515 12233035540 024417 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp000644 000765 000024 00000022472 12233035540 025724 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F, int dummy_ > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, int dummy_ > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1, int dummy_ > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, int dummy_ > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2, int dummy_ > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, int dummy_ > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3, int dummy_ > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, int dummy_ > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , int dummy_ > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , int dummy_ > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, int dummy_ > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, int dummy_ > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/bind.hpp000644 000765 000024 00000031705 12233035540 024562 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F, int dummy_ > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, int dummy_ > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1, int dummy_ > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, int dummy_ > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2, int dummy_ > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, int dummy_ > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3, int dummy_ > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, int dummy_ > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , int dummy_ > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , int dummy_ > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, int dummy_ > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, int dummy_ > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp000644 000765 000024 00000002071 12233035540 025414 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, int dummy_ = 0 > struct bind; template< typename F, int dummy_ = 0 > struct bind0; template< typename F, typename T1, int dummy_ = 0 > struct bind1; template< typename F, typename T1, typename T2, int dummy_ = 0 > struct bind2; template< typename F, typename T1, typename T2, typename T3, int dummy_ = 0 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 , int dummy_ = 0 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, int dummy_ = 0 > struct bind5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/bitand.hpp000644 000765 000024 00000006210 12233035540 025100 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/bitor.hpp000644 000765 000024 00000006152 12233035540 024763 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp000644 000765 000024 00000006210 12233035540 025146 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/deque.hpp000644 000765 000024 00000022773 12233035540 024756 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/divides.hpp000644 000765 000024 00000006167 12233035540 025301 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp000644 000765 000024 00000004061 12233035540 025452 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp000644 000765 000024 00000010402 12233035540 025602 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp000644 000765 000024 00000024750 12233035540 026112 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/greater.hpp000644 000765 000024 00000004040 12233035540 025267 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp000644 000765 000024 00000004173 12233035540 026465 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/inherit.hpp000644 000765 000024 00000005420 12233035540 025303 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp000644 000765 000024 00000010262 12233035540 027307 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp000644 000765 000024 00000010076 12233035540 026634 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp000644 000765 000024 00000014515 12233035540 026613 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/less.hpp000644 000765 000024 00000003763 12233035540 024617 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp000644 000765 000024 00000004116 12233035540 025777 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/list.hpp000644 000765 000024 00000022620 12233035540 024615 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/list_c.hpp000644 000765 000024 00000024735 12233035540 025130 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/map.hpp000644 000765 000024 00000022517 12233035540 024424 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/minus.hpp000644 000765 000024 00000006073 12233035540 025001 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/modulus.hpp000644 000765 000024 00000004365 12233035540 025340 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp000644 000765 000024 00000004154 12233035540 026335 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/or.hpp000644 000765 000024 00000002352 12233035540 024262 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp000644 000765 000024 00000004243 12233035540 026310 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/plus.hpp000644 000765 000024 00000006035 12233035540 024627 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/quote.hpp000644 000765 000024 00000004213 12233035540 024775 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl : T { }; template< typename T > struct quote_impl< T,false > { typedef T type; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< F , aux::has_type< F >::value > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< F< U1,U2 > , aux::has_type< F< U1,U2 > >::value > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< F< U1,U2,U3 > , aux::has_type< F< U1,U2,U3 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< F< U1,U2,U3,U4 > , aux::has_type< F< U1,U2,U3,U4 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< F< U1,U2,U3,U4,U5 > , aux::has_type< F< U1,U2,U3,U4,U5 > >::value > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp000644 000765 000024 00000016314 12233035540 027345 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp000644 000765 000024 00000015075 12233035540 030373 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/set.hpp000644 000765 000024 00000022517 12233035540 024442 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/set_c.hpp000644 000765 000024 00000024634 12233035540 024746 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp000644 000765 000024 00000004314 12233035540 025771 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp000644 000765 000024 00000004333 12233035540 026155 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp000644 000765 000024 00000000462 12233035540 026665 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/times.hpp000644 000765 000024 00000006073 12233035540 024767 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp000644 000765 000024 00000003562 12233035540 026143 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value,F, Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/vector.hpp000644 000765 000024 00000023022 12233035540 025141 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp000644 000765 000024 00000027715 12233035540 025460 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp000644 000765 000024 00000004232 12233035540 030170 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp000644 000765 000024 00000004206 12233035540 030057 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp000644 000765 000024 00000002352 12233035540 025474 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp000644 000765 000024 00000005271 12233035540 026062 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp000644 000765 000024 00000001715 12233035540 026721 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp000644 000765 000024 00000015455 12233035540 027120 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< int N, typename F > struct apply_wrap_impl0; template< typename F > struct apply_wrap_impl0< 0 , F > { typedef typename F::template apply< /// since the defaults are "lost", we have to pass *something* even for nullary /// metafunction classes na > type; }; template< typename F > struct apply_wrap_impl0< 1 , F > { typedef typename F::template apply< na > type; }; template< typename F > struct apply_wrap_impl0< 2 , F > { typedef typename F::template apply< na, na > type; }; template< typename F > struct apply_wrap_impl0< 3 , F > { typedef typename F::template apply< na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 4 , F > { typedef typename F::template apply< na, na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 5 , F > { typedef typename F::template apply< na, na, na, na, na > type; }; template< typename F > struct apply_wrap0 : apply_wrap_impl0< ::boost::mpl::aux::arity< F,0 >::value , F >::type { }; template< int N, typename F, typename T1 > struct apply_wrap_impl1; template< typename F, typename T1 > struct apply_wrap_impl1< 1 , F , T1 > { typedef typename F::template apply< T1 > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 2 , F , T1 > { typedef typename F::template apply< T1 , na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 3 , F , T1 > { typedef typename F::template apply< T1 , na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 4 , F , T1 > { typedef typename F::template apply< T1 , na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 5 , F , T1 > { typedef typename F::template apply< T1 , na, na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap1 : apply_wrap_impl1< ::boost::mpl::aux::arity< F,1 >::value , F , T1 >::type { }; template< int N, typename F, typename T1, typename T2 > struct apply_wrap_impl2; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 2 , F , T1, T2 > { typedef typename F::template apply< T1, T2 > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 3 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 4 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 5 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : apply_wrap_impl2< ::boost::mpl::aux::arity< F,2 >::value , F , T1, T2 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 3 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 4 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 5 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na, na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : apply_wrap_impl3< ::boost::mpl::aux::arity< F,3 >::value , F , T1, T2, T3 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 4 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 5 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 , na > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : apply_wrap_impl4< ::boost::mpl::aux::arity< F,4 >::value , F , T1, T2, T3, T4 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5< 5 , F , T1, T2, T3, T4, T5 > { typedef typename F::template apply< T1, T2, T3, T4, T5 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : apply_wrap_impl5< ::boost::mpl::aux::arity< F,5 >::value , F , T1, T2, T3, T4, T5 >::type { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp000644 000765 000024 00000005202 12233035540 025500 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp000644 000765 000024 00000015716 12233035540 027017 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp000644 000765 000024 00000024264 12233035540 025654 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp000644 000765 000024 00000001467 12233035540 026514 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp000644 000765 000024 00000006211 12233035540 026171 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp000644 000765 000024 00000006153 12233035540 026054 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp000644 000765 000024 00000006211 12233035540 026237 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp000644 000765 000024 00000022774 12233035540 026047 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp000644 000765 000024 00000006170 12233035540 026363 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp000644 000765 000024 00000004062 12233035540 026543 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp000644 000765 000024 00000010376 12233035540 026704 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp000644 000765 000024 00000026362 12233035540 027203 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag , typename Arity > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg,Tag, int_< -1 > > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag , int_<1> > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag , int_<1> > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag , int_<2> > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag , int_<2> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag , int_<3> > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag , int_<3> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag , int_<4> > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag , int_<4> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag , int_<5> > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag , int_<5> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect,Tag, int_<1> > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; template< typename F , typename Tag1 , typename Tag2 , typename Arity > struct lambda< lambda< F,Tag1,Arity > , Tag2 , int_<3> > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef bind1< quote1, typename l1::result_ > arity_; typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; typedef aux::le_result3 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp000644 000765 000024 00000004041 12233035540 026360 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp000644 000765 000024 00000004174 12233035540 027556 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp000644 000765 000024 00000005276 12233035540 026404 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1, typename T2, typename T3, typename T4, typename T5 > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp000644 000765 000024 00000010256 12233035540 030402 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp000644 000765 000024 00000010072 12233035540 027720 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp000644 000765 000024 00000014511 12233035540 027677 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp000644 000765 000024 00000003764 12233035540 025710 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp000644 000765 000024 00000004117 12233035540 027070 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp000644 000765 000024 00000022621 12233035540 025706 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp000644 000765 000024 00000024736 12233035540 026221 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp000644 000765 000024 00000022520 12233035540 025506 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp000644 000765 000024 00000006074 12233035540 026072 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp000644 000765 000024 00000004366 12233035540 026431 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp000644 000765 000024 00000004155 12233035540 027426 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp000644 000765 000024 00000002353 12233035540 025353 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp000644 000765 000024 00000004244 12233035540 027401 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp000644 000765 000024 00000006036 12233035540 025720 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp000644 000765 000024 00000000445 12233035540 026070 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "quote.hpp" header // -- DO NOT modify by hand! passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp000644 000765 000024 00000021242 12233035540 030431 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< long N > struct reverse_fold_chunk; template<> struct reverse_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step; template< typename Last , typename State > struct reverse_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_fold_null_step< Last,State > , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step { typedef reverse_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl : reverse_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp000644 000765 000024 00000020066 12233035540 031457 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< long N > struct reverse_iter_fold_chunk; template<> struct reverse_iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_iter_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step; template< typename Last , typename State > struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_iter_fold_null_step< Last,State > , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step { typedef reverse_iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl : reverse_iter_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp000644 000765 000024 00000022520 12233035540 025524 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp000644 000765 000024 00000024635 12233035540 026037 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp000644 000765 000024 00000004315 12233035540 027062 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp000644 000765 000024 00000004334 12233035540 027246 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp000644 000765 000024 00000001373 12233035540 027757 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp000644 000765 000024 00000006074 12233035540 026060 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp000644 000765 000024 00000003702 12233035540 027227 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply { typedef typename aux::unpack_args_impl< size::value , F , Args >::type type; }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp000644 000765 000024 00000023023 12233035540 026232 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp000644 000765 000024 00000027716 12233035540 026551 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp000644 000765 000024 00000004236 12233035540 027323 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp000644 000765 000024 00000004212 12233035540 027203 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/and.hpp000644 000765 000024 00000002351 12233035540 024622 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/apply.hpp000644 000765 000024 00000005270 12233035540 025210 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp000644 000765 000024 00000001714 12233035540 026047 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp000644 000765 000024 00000015454 12233035540 026246 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< int N, typename F > struct apply_wrap_impl0; template< typename F > struct apply_wrap_impl0< 0 , F > { typedef typename F::template apply< /// since the defaults are "lost", we have to pass *something* even for nullary /// metafunction classes na > type; }; template< typename F > struct apply_wrap_impl0< 1 , F > { typedef typename F::template apply< na > type; }; template< typename F > struct apply_wrap_impl0< 2 , F > { typedef typename F::template apply< na, na > type; }; template< typename F > struct apply_wrap_impl0< 3 , F > { typedef typename F::template apply< na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 4 , F > { typedef typename F::template apply< na, na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 5 , F > { typedef typename F::template apply< na, na, na, na, na > type; }; template< typename F > struct apply_wrap0 : apply_wrap_impl0< ::boost::mpl::aux::arity< F,0 >::value , F >::type { }; template< int N, typename F, typename T1 > struct apply_wrap_impl1; template< typename F, typename T1 > struct apply_wrap_impl1< 1 , F , T1 > { typedef typename F::template apply< T1 > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 2 , F , T1 > { typedef typename F::template apply< T1 , na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 3 , F , T1 > { typedef typename F::template apply< T1 , na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 4 , F , T1 > { typedef typename F::template apply< T1 , na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 5 , F , T1 > { typedef typename F::template apply< T1 , na, na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap1 : apply_wrap_impl1< ::boost::mpl::aux::arity< F,1 >::value , F , T1 >::type { }; template< int N, typename F, typename T1, typename T2 > struct apply_wrap_impl2; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 2 , F , T1, T2 > { typedef typename F::template apply< T1, T2 > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 3 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 4 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 5 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : apply_wrap_impl2< ::boost::mpl::aux::arity< F,2 >::value , F , T1, T2 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 3 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 4 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 5 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na, na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : apply_wrap_impl3< ::boost::mpl::aux::arity< F,3 >::value , F , T1, T2, T3 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 4 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 5 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 , na > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : apply_wrap_impl4< ::boost::mpl::aux::arity< F,4 >::value , F , T1, T2, T3, T4 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5< 5 , F , T1, T2, T3, T4, T5 > { typedef typename F::template apply< T1, T2, T3, T4, T5 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : apply_wrap_impl5< ::boost::mpl::aux::arity< F,5 >::value , F , T1, T2, T3, T4, T5 >::type { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/arg.hpp000644 000765 000024 00000005515 12233035540 024636 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp000644 000765 000024 00000016236 12233035540 026144 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/bind.hpp000644 000765 000024 00000024577 12233035540 025012 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp000644 000765 000024 00000001466 12233035540 025642 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp000644 000765 000024 00000006210 12233035540 025317 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp000644 000765 000024 00000006152 12233035540 025202 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp000644 000765 000024 00000006210 12233035540 025365 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/deque.hpp000644 000765 000024 00000022773 12233035540 025175 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/divides.hpp000644 000765 000024 00000006167 12233035540 025520 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp000644 000765 000024 00000004061 12233035540 025671 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp000644 000765 000024 00000010402 12233035540 026021 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp000644 000765 000024 00000026366 12233035540 026336 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag , typename Arity > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg,Tag, int_< -1 > > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag , int_<1> > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag , int_<1> > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag , int_<2> > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag , int_<2> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag , int_<3> > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag , int_<3> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag , int_<4> > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag , int_<4> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag , int_<5> > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag , int_<5> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect,Tag, int_<1> > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; template< typename F , typename Tag1 , typename Tag2 , typename Arity > struct lambda< lambda< F,Tag1,Arity > , Tag2 , int_<3> > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef bind1< quote1, typename l1::result_ > arity_; typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; typedef aux::le_result3 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/greater.hpp000644 000765 000024 00000004040 12233035540 025506 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp000644 000765 000024 00000004173 12233035540 026704 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp000644 000765 000024 00000005420 12233035540 025522 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp000644 000765 000024 00000010262 12233035540 027526 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp000644 000765 000024 00000010076 12233035540 027053 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp000644 000765 000024 00000014515 12233035540 027032 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/less.hpp000644 000765 000024 00000003763 12233035540 025036 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp000644 000765 000024 00000004116 12233035540 026216 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/list.hpp000644 000765 000024 00000022620 12233035540 025034 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp000644 000765 000024 00000024735 12233035540 025347 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/map.hpp000644 000765 000024 00000022517 12233035540 024643 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/minus.hpp000644 000765 000024 00000006073 12233035540 025220 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp000644 000765 000024 00000004365 12233035540 025557 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp000644 000765 000024 00000004154 12233035540 026554 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/or.hpp000644 000765 000024 00000002352 12233035540 024501 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp000644 000765 000024 00000004243 12233035540 026527 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/plus.hpp000644 000765 000024 00000006035 12233035540 025046 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/quote.hpp000644 000765 000024 00000000444 12233035540 025216 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp000644 000765 000024 00000021246 12233035540 027564 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< long N > struct reverse_fold_chunk; template<> struct reverse_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step; template< typename Last , typename State > struct reverse_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_fold_null_step< Last,State > , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step { typedef reverse_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl : reverse_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp000644 000765 000024 00000020072 12233035540 030603 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< long N > struct reverse_iter_fold_chunk; template<> struct reverse_iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_iter_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step; template< typename Last , typename State > struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_iter_fold_null_step< Last,State > , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step { typedef reverse_iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl : reverse_iter_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/set.hpp000644 000765 000024 00000022517 12233035540 024661 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp000644 000765 000024 00000024634 12233035540 025165 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp000644 000765 000024 00000004314 12233035540 026210 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp000644 000765 000024 00000004333 12233035540 026374 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp000644 000765 000024 00000001377 12233035540 027112 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/times.hpp000644 000765 000024 00000006073 12233035540 025206 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp000644 000765 000024 00000003701 12233035540 026355 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply { typedef typename aux::unpack_args_impl< size::value , F , Args >::type type; }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/vector.hpp000644 000765 000024 00000023022 12233035540 025360 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp000644 000765 000024 00000027715 12233035540 025677 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp000644 000765 000024 00000004232 12233035540 027064 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp000644 000765 000024 00000004206 12233035540 026753 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/and.hpp000644 000765 000024 00000002352 12233035540 024370 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/apply.hpp000644 000765 000024 00000005271 12233035540 024756 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp000644 000765 000024 00000001715 12233035540 025615 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp000644 000765 000024 00000015646 12233035540 026016 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< int N, typename F > struct apply_wrap_impl0; template< typename F, bool F_has_apply > struct apply_wrap_impl0_bcb { typedef typename F::template apply type; }; template< typename F > struct apply_wrap_impl0_bcb< F,true > { typedef typename F::apply type; }; template< typename F > struct apply_wrap_impl0< 0 , F > { typedef apply_wrap_impl0_bcb< F, aux::has_apply::value >::type type; }; template< typename F > struct apply_wrap_impl0< 1 , F > { typedef typename F::template apply< na > type; }; template< typename F > struct apply_wrap_impl0< 2 , F > { typedef typename F::template apply< na, na > type; }; template< typename F > struct apply_wrap_impl0< 3 , F > { typedef typename F::template apply< na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 4 , F > { typedef typename F::template apply< na, na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 5 , F > { typedef typename F::template apply< na, na, na, na, na > type; }; template< typename F > struct apply_wrap0 : apply_wrap_impl0< ::boost::mpl::aux::arity< F,0 >::value , F >::type { }; template< int N, typename F, typename T1 > struct apply_wrap_impl1; template< typename F, typename T1 > struct apply_wrap_impl1< 1 , F , T1 > { typedef typename F::template apply< T1 > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 2 , F , T1 > { typedef typename F::template apply< T1 , na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 3 , F , T1 > { typedef typename F::template apply< T1 , na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 4 , F , T1 > { typedef typename F::template apply< T1 , na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 5 , F , T1 > { typedef typename F::template apply< T1 , na, na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap1 : apply_wrap_impl1< ::boost::mpl::aux::arity< F,1 >::value , F , T1 >::type { }; template< int N, typename F, typename T1, typename T2 > struct apply_wrap_impl2; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 2 , F , T1, T2 > { typedef typename F::template apply< T1, T2 > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 3 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 4 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 5 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : apply_wrap_impl2< ::boost::mpl::aux::arity< F,2 >::value , F , T1, T2 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 3 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 4 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 5 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na, na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : apply_wrap_impl3< ::boost::mpl::aux::arity< F,3 >::value , F , T1, T2, T3 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 4 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 5 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 , na > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : apply_wrap_impl4< ::boost::mpl::aux::arity< F,4 >::value , F , T1, T2, T3, T4 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5< 5 , F , T1, T2, T3, T4, T5 > { typedef typename F::template apply< T1, T2, T3, T4, T5 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : apply_wrap_impl5< ::boost::mpl::aux::arity< F,5 >::value , F , T1, T2, T3, T4, T5 >::type { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/arg.hpp000644 000765 000024 00000005202 12233035540 024374 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp000644 000765 000024 00000015716 12233035540 025713 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/bind.hpp000644 000765 000024 00000024264 12233035540 024550 0ustar00honglistaff000000 000000 // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp000644 000765 000024 00000001467 12233035540 025410 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/bitand.hpp000644 000765 000024 00000006211 12233035540 025065 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/bitor.hpp000644 000765 000024 00000006153 12233035540 024750 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp000644 000765 000024 00000006211 12233035540 025133 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/deque.hpp000644 000765 000024 00000022774 12233035540 024743 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/divides.hpp000644 000765 000024 00000006170 12233035540 025257 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp000644 000765 000024 00000004062 12233035540 025437 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp000644 000765 000024 00000010376 12233035540 025600 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp000644 000765 000024 00000026362 12233035540 026077 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag , typename Arity > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg,Tag, int_< -1 > > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag , int_<1> > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag , int_<1> > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag , int_<2> > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag , int_<2> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag , int_<3> > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag , int_<3> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag , int_<4> > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag , int_<4> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag , int_<5> > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag , int_<5> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect,Tag, int_<1> > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; template< typename F , typename Tag1 , typename Tag2 , typename Arity > struct lambda< lambda< F,Tag1,Arity > , Tag2 , int_<3> > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef bind1< quote1, typename l1::result_ > arity_; typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; typedef aux::le_result3 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/greater.hpp000644 000765 000024 00000004041 12233035540 025254 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp000644 000765 000024 00000004174 12233035540 026452 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/inherit.hpp000644 000765 000024 00000005276 12233035540 025300 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1, typename T2, typename T3, typename T4, typename T5 > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp000644 000765 000024 00000010256 12233035540 027276 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp000644 000765 000024 00000010072 12233035540 026614 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp000644 000765 000024 00000014511 12233035540 026573 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/less.hpp000644 000765 000024 00000003764 12233035540 024604 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp000644 000765 000024 00000004117 12233035540 025764 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/list.hpp000644 000765 000024 00000022621 12233035540 024602 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/list_c.hpp000644 000765 000024 00000024736 12233035540 025115 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/map.hpp000644 000765 000024 00000022520 12233035540 024402 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/minus.hpp000644 000765 000024 00000006074 12233035540 024766 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/modulus.hpp000644 000765 000024 00000004366 12233035540 025325 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp000644 000765 000024 00000004155 12233035540 026322 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/or.hpp000644 000765 000024 00000002353 12233035540 024247 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp000644 000765 000024 00000004244 12233035540 026275 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/plus.hpp000644 000765 000024 00000006036 12233035540 024614 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/quote.hpp000644 000765 000024 00000004452 12233035540 024766 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl { typedef typename T::type type; }; template< typename T > struct quote_impl< T,false > { typedef T type; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply { typedef typename quote_impl< F , aux::has_type< F >::value >::type type; }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply { typedef typename quote_impl< F< U1,U2 > , aux::has_type< F< U1,U2 > >::value >::type type; }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply { typedef typename quote_impl< F< U1,U2,U3 > , aux::has_type< F< U1,U2,U3 > >::value >::type type; }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply { typedef typename quote_impl< F< U1,U2,U3,U4 > , aux::has_type< F< U1,U2,U3,U4 > >::value >::type type; }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply { typedef typename quote_impl< F< U1,U2,U3,U4,U5 > , aux::has_type< F< U1,U2,U3,U4,U5 > >::value >::type type; }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp000644 000765 000024 00000021242 12233035540 027325 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< long N > struct reverse_fold_chunk; template<> struct reverse_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step; template< typename Last , typename State > struct reverse_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_fold_null_step< Last,State > , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step { typedef reverse_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl : reverse_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp000644 000765 000024 00000020066 12233035540 030353 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< long N > struct reverse_iter_fold_chunk; template<> struct reverse_iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_iter_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step; template< typename Last , typename State > struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_iter_fold_null_step< Last,State > , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step { typedef reverse_iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl : reverse_iter_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/set.hpp000644 000765 000024 00000022520 12233035540 024420 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/set_c.hpp000644 000765 000024 00000024635 12233035540 024733 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp000644 000765 000024 00000004315 12233035540 025756 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp000644 000765 000024 00000004334 12233035540 026142 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp000644 000765 000024 00000001373 12233035540 026653 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; }}} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/times.hpp000644 000765 000024 00000006074 12233035540 024754 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp000644 000765 000024 00000003702 12233035540 026123 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply { typedef typename aux::unpack_args_impl< size::value , F , Args >::type type; }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/vector.hpp000644 000765 000024 00000023023 12233035540 025126 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp000644 000765 000024 00000027716 12233035540 025445 0ustar00honglistaff000000 000000 // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} passenger-4.0.37/ext/boost/mpl/aux_/config/adl.hpp000644 000765 000024 00000002756 12233035540 022416 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: adl.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #include // agurt, 25/apr/04: technically, the ADL workaround is only needed for GCC, // but putting everything expect public, user-specializable metafunctions into // a separate global namespace has a nice side effect of reducing the length // of template instantiation symbols, so we apply the workaround on all // platforms that can handle it #if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) \ && ( BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) \ ) # define BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE #endif #endif // BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/arrays.hpp000644 000765 000024 00000001646 12233035540 023154 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: arrays.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if !defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ ) # define BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES #endif #endif // BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/bcc.hpp000644 000765 000024 00000001520 12233035540 022371 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: bcc.hpp 49272 2008-10-11 06:50:46Z agurtovoy $ // $Date: 2004-09-02 10:41:37 -0500 (Thu, 02 Sep 2004) $ // $Revision: 24874 $ #include #if !defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__BORLANDC__, >= 0x590) \ && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_BCC590_WORKAROUNDS #endif #endif // BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/bind.hpp000644 000765 000024 00000001751 12233035540 022564 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED // Copyright David Abrahams 2002 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: bind.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ ) # define BOOST_MPL_CFG_NO_BIND_TEMPLATE #endif //#define BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT #endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/compiler.hpp000644 000765 000024 00000004277 12233035540 023470 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: compiler.hpp 53189 2009-05-22 20:07:55Z hkaiser $ // $Date: 2009-05-22 13:07:55 -0700 (Fri, 22 May 2009) $ // $Revision: 53189 $ #if !defined(BOOST_MPL_CFG_COMPILER_DIR) # include # include # include # include # include # include # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) # define BOOST_MPL_CFG_COMPILER_DIR msvc60 # elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) # define BOOST_MPL_CFG_COMPILER_DIR msvc70 # elif BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) # define BOOST_MPL_CFG_COMPILER_DIR gcc # elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_CFG_COMPILER_DIR bcc551 # elif BOOST_WORKAROUND(__BORLANDC__, >= 0x590) # define BOOST_MPL_CFG_COMPILER_DIR bcc # else # define BOOST_MPL_CFG_COMPILER_DIR bcc_pre590 # endif # elif BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_MPL_CFG_COMPILER_DIR dmc # elif defined(__MWERKS__) # if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_CFG_COMPILER_DIR mwcw # else # define BOOST_MPL_CFG_COMPILER_DIR plain # endif # elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # define BOOST_MPL_CFG_COMPILER_DIR no_ctps # elif defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) # define BOOST_MPL_CFG_COMPILER_DIR no_ttp # else # define BOOST_MPL_CFG_COMPILER_DIR plain # endif #endif // BOOST_MPL_CFG_COMPILER_DIR #endif // BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/ctps.hpp000644 000765 000024 00000001636 12233035540 022623 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__BORLANDC__, < 0x582) # define BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in #endif // BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/dependent_nttp.hpp000644 000765 000024 00000002333 12233035540 024660 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: dependent_nttp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include // GCC and EDG-based compilers incorrectly reject the following code: // template< typename T, T n > struct a; // template< typename T > struct b; // template< typename T, T n > struct b< a > {}; #if !defined(BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(__EDG_VERSION__, BOOST_TESTED_AT(300)) \ || BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ ) # define BOOST_MPL_CFG_NO_DEPENDENT_NONTYPE_PARAMETER_IN_PARTIAL_SPEC #endif #endif // BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp000644 000765 000024 00000001525 12233035540 025516 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: dmc_ambiguous_ctps.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS #endif #endif // BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/dtp.hpp000644 000765 000024 00000003211 12233035540 022430 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: dtp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include // MWCW 7.x-8.0 "losts" default template parameters of nested class // templates when their owner classes are passed as arguments to other // templates; Borland 5.5.1 "forgets" them from the very beginning (if // the owner class is a class template), and Borland 5.6 isn't even // able to compile a definition of nested class template with DTP #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__BORLANDC__, >= 0x560) \ && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES #endif #if !defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(__MWERKS__, <= 0x3001) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ ) # define BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES #endif #endif // BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/eti.hpp000644 000765 000024 00000002471 12233035540 022431 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: eti.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include // flags for MSVC 6.5's so-called "early template instantiation bug" #if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(BOOST_MSVC, < 1300) # define BOOST_MPL_CFG_MSVC_60_ETI_BUG #endif #if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(BOOST_MSVC, == 1300) # define BOOST_MPL_CFG_MSVC_70_ETI_BUG #endif #if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \ || defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \ ) # define BOOST_MPL_CFG_MSVC_ETI_BUG #endif #endif // BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/forwarding.hpp000644 000765 000024 00000001476 12233035540 024016 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: forwarding.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_NO_NESTED_FORWARDING #endif #endif // BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/gcc.hpp000644 000765 000024 00000001265 12233035540 022404 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: gcc.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if defined(__GNUC__) && !defined(__EDG_VERSION__) # define BOOST_MPL_CFG_GCC ((__GNUC__ << 8) | __GNUC_MINOR__) #else # define BOOST_MPL_CFG_GCC 0 #endif #endif // BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/has_apply.hpp000644 000765 000024 00000001765 12233035540 023635 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_apply.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) \ && ( defined(BOOST_MPL_CFG_NO_HAS_XXX) \ || BOOST_WORKAROUND(__EDG_VERSION__, < 300) \ || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ ) # define BOOST_MPL_CFG_NO_HAS_APPLY #endif #endif // BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/has_xxx.hpp000644 000765 000024 00000002067 12233035540 023333 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // Copyright David Abrahams 2002-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: has_xxx.hpp 63518 2010-07-02 08:32:03Z agurtovoy $ // $Date: 2010-07-02 01:32:03 -0700 (Fri, 02 Jul 2010) $ // $Revision: 63518 $ #include #include // agurt, 11/jan/03: signals a stub-only 'has_xxx' implementation #if !defined(BOOST_MPL_CFG_NO_HAS_XXX) \ && ( defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \ || BOOST_WORKAROUND(__GNUC__, <= 2) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ ) # define BOOST_MPL_CFG_NO_HAS_XXX # define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE #endif #endif // BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/integral.hpp000644 000765 000024 00000002200 12233035540 023443 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: integral.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if !defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS #endif #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ ) # define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC #endif #endif // BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/intel.hpp000644 000765 000024 00000001147 12233035540 022762 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: intel.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ // BOOST_INTEL_CXX_VERSION is defined here: #include #endif // BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/lambda.hpp000644 000765 000024 00000001767 12233035540 023077 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: lambda.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include // agurt, 15/jan/02: full-fledged implementation requires both // template template parameters _and_ partial specialization #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ && ( defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ ) # define BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT #endif #endif // BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/msvc.hpp000644 000765 000024 00000001133 12233035540 022612 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: msvc.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ // BOOST_MSVC is defined here: #include #endif // BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/msvc_typename.hpp000644 000765 000024 00000001434 12233035540 024520 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: msvc_typename.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # define BOOST_MSVC_TYPENAME #else # define BOOST_MSVC_TYPENAME typename #endif #endif // BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/nttp.hpp000644 000765 000024 00000002130 12233035540 022625 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: nttp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include // MSVC 6.5 ICE-s on the code as simple as this (see "aux_/nttp_decl.hpp" // for a workaround): // // namespace std { // template< typename Char > struct string; // } // // void foo(std::string); // // namespace boost { namespace mpl { // template< int > struct arg; // }} #if !defined(BOOST_MPL_CFG_NTTP_BUG) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(BOOST_MSVC, < 1300) # define BOOST_MPL_CFG_NTTP_BUG #endif #endif // BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/operators.hpp000644 000765 000024 00000002135 12233035540 023663 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: operators.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #if !defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) \ && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \ || BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) \ || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \ ) # define BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING #endif #endif // BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/overload_resolution.hpp000644 000765 000024 00000001650 12233035540 025744 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: overload_resolution.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if !defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(__BORLANDC__, < 0x590) \ || BOOST_WORKAROUND(__MWERKS__, < 0x3001) \ ) # define BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION #endif #endif // BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/pp_counter.hpp000644 000765 000024 00000001466 12233035540 024031 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: pp_counter.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_AUX_PP_COUNTER) # include # if BOOST_WORKAROUND(BOOST_MSVC, >= 1300) # define BOOST_MPL_AUX_PP_COUNTER() __COUNTER__ # else # define BOOST_MPL_AUX_PP_COUNTER() __LINE__ # endif #endif #endif // BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/preprocessor.hpp000644 000765 000024 00000002304 12233035540 024371 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: preprocessor.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if !defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) \ && ( BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \ || BOOST_WORKAROUND(__BORLANDC__, < 0x582) \ || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \ ) # define BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION #endif #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # define BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES #endif #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) \ && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING #endif #endif // BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/static_constant.hpp000644 000765 000024 00000001432 12233035540 025044 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: static_constant.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #if !defined(BOOST_MPL_PREPROCESSING_MODE) // BOOST_STATIC_CONSTANT is defined here: # include #else // undef the macro for the preprocessing mode # undef BOOST_STATIC_CONSTANT #endif #endif // BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/ttp.hpp000644 000765 000024 00000002366 12233035540 022462 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: ttp.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #include #include #if !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ && ( defined(BOOST_NO_TEMPLATE_TEMPLATES) \ || BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x590) ) \ ) # define BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS #endif #if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ ) # define BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING #endif #endif // BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/typeof.hpp000644 000765 000024 00000002052 12233035540 023151 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_TYPEOF_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_TYPEOF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: typeof.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #if !defined(BOOST_MPL_CFG_HAS_TYPEOF) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( defined(BOOST_MPL_CFG_GCC) && BOOST_MPL_CFG_GCC >= 0x0302 \ || defined(__MWERKS__) && __MWERKS__ >= 0x3000 \ ) # define BOOST_MPL_CFG_HAS_TYPEOF #endif #if !defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && defined(BOOST_MPL_CFG_HAS_TYPEOF) # define BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES #endif #endif // BOOST_MPL_AUX_CONFIG_TYPEOF_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/use_preprocessed.hpp000644 000765 000024 00000001200 12233035540 025207 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: use_preprocessed.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ // #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED passenger-4.0.37/ext/boost/mpl/aux_/config/workaround.hpp000644 000765 000024 00000001136 12233035540 024040 0ustar00honglistaff000000 000000 #ifndef BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id: workaround.hpp 49267 2008-10-11 06:19:02Z agurtovoy $ // $Date: 2008-10-10 23:19:02 -0700 (Fri, 10 Oct 2008) $ // $Revision: 49267 $ #include #endif // BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED passenger-4.0.37/ext/boost/move/algorithm.hpp000644 000765 000024 00000020373 12233035540 021614 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2012-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/move for documentation. // ////////////////////////////////////////////////////////////////////////////// //! \file #ifndef BOOST_MOVE_ALGORITHM_HPP #define BOOST_MOVE_ALGORITHM_HPP #include #include #include #include #include #include //copy, copy_backward #include //uninitialized_copy namespace boost { ////////////////////////////////////////////////////////////////////////////// // // move // ////////////////////////////////////////////////////////////////////////////// #if !defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) //! Effects: Moves elements in the range [first,last) into the range [result,result + (last - //! first)) starting from first and proceeding to last. For each non-negative integer n < (last-first), //! performs *(result + n) = ::boost::move (*(first + n)). //! //! Effects: result + (last - first). //! //! Requires: result shall not be in the range [first,last). //! //! Complexity: Exactly last - first move assignments. template // O models OutputIterator O move(I f, I l, O result) { while (f != l) { *result = ::boost::move(*f); ++f; ++result; } return result; } ////////////////////////////////////////////////////////////////////////////// // // move_backward // ////////////////////////////////////////////////////////////////////////////// //! Effects: Moves elements in the range [first,last) into the range //! [result - (last-first),result) starting from last - 1 and proceeding to //! first. For each positive integer n <= (last - first), //! performs *(result - n) = ::boost::move(*(last - n)). //! //! Requires: result shall not be in the range [first,last). //! //! Returns: result - (last - first). //! //! Complexity: Exactly last - first assignments. template // O models BidirectionalIterator O move_backward(I f, I l, O result) { while (f != l) { --l; --result; *result = ::boost::move(*l); } return result; } #else using ::std::move_backward; #endif //!defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) ////////////////////////////////////////////////////////////////////////////// // // uninitialized_move // ////////////////////////////////////////////////////////////////////////////// //! Effects: //! \code //! for (; first != last; ++result, ++first) //! new (static_cast(&*result)) //! typename iterator_traits::value_type(boost::move(*first)); //! \endcode //! //! Returns: result template // F models ForwardIterator F uninitialized_move(I f, I l, F r /// @cond // ,typename ::boost::move_detail::enable_if::value_type> >::type* = 0 /// @endcond ) { typedef typename std::iterator_traits::value_type input_value_type; F back = r; BOOST_TRY{ while (f != l) { void * const addr = static_cast(::boost::move_detail::addressof(*r)); ::new(addr) input_value_type(::boost::move(*f)); ++f; ++r; } } BOOST_CATCH(...){ for (; back != r; ++back){ back->~input_value_type(); } BOOST_RETHROW; } BOOST_CATCH_END return r; } /// @cond /* template // F models ForwardIterator F uninitialized_move(I f, I l, F r, typename ::boost::move_detail::disable_if::value_type> >::type* = 0) { return std::uninitialized_copy(f, l, r); } */ ////////////////////////////////////////////////////////////////////////////// // // uninitialized_copy_or_move // ////////////////////////////////////////////////////////////////////////////// namespace move_detail { template // F models ForwardIterator inline F uninitialized_move_move_iterator(I f, I l, F r // ,typename ::boost::move_detail::enable_if< has_move_emulation_enabled >::type* = 0 ) { return ::boost::uninitialized_move(f, l, r); } /* template // F models ForwardIterator F uninitialized_move_move_iterator(I f, I l, F r, typename ::boost::move_detail::disable_if< has_move_emulation_enabled >::type* = 0) { return std::uninitialized_copy(f.base(), l.base(), r); } */ } //namespace move_detail { template // F models ForwardIterator inline F uninitialized_copy_or_move(I f, I l, F r, typename ::boost::move_detail::enable_if< move_detail::is_move_iterator >::type* = 0) { return ::boost::move_detail::uninitialized_move_move_iterator(f, l, r); } ////////////////////////////////////////////////////////////////////////////// // // copy_or_move // ////////////////////////////////////////////////////////////////////////////// namespace move_detail { template // F models ForwardIterator inline F move_move_iterator(I f, I l, F r // ,typename ::boost::move_detail::enable_if< has_move_emulation_enabled >::type* = 0 ) { return ::boost::move(f, l, r); } /* template // F models ForwardIterator F move_move_iterator(I f, I l, F r, typename ::boost::move_detail::disable_if< has_move_emulation_enabled >::type* = 0) { return std::copy(f.base(), l.base(), r); } */ } //namespace move_detail { template // F models ForwardIterator inline F copy_or_move(I f, I l, F r, typename ::boost::move_detail::enable_if< move_detail::is_move_iterator >::type* = 0) { return ::boost::move_detail::move_move_iterator(f, l, r); } /// @endcond //! Effects: //! \code //! for (; first != last; ++result, ++first) //! new (static_cast(&*result)) //! typename iterator_traits::value_type(*first); //! \endcode //! //! Returns: result //! //! Note: This function is provided because //! std::uninitialized_copy from some STL implementations //! is not compatible with move_iterator template // F models ForwardIterator inline F uninitialized_copy_or_move(I f, I l, F r /// @cond ,typename ::boost::move_detail::disable_if< move_detail::is_move_iterator >::type* = 0 /// @endcond ) { return std::uninitialized_copy(f, l, r); } //! Effects: //! \code //! for (; first != last; ++result, ++first) //! *result = *first; //! \endcode //! //! Returns: result //! //! Note: This function is provided because //! std::uninitialized_copy from some STL implementations //! is not compatible with move_iterator template // F models ForwardIterator inline F copy_or_move(I f, I l, F r /// @cond ,typename ::boost::move_detail::disable_if< move_detail::is_move_iterator >::type* = 0 /// @endcond ) { return std::copy(f, l, r); } } //namespace boost { #include #endif //#ifndef BOOST_MOVE_MOVE_HPP passenger-4.0.37/ext/boost/move/core.hpp000644 000765 000024 00000023645 12233035540 020563 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2012-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/move for documentation. // ////////////////////////////////////////////////////////////////////////////// //! \file core.hpp //! This header implements macros to define movable classes and //! move-aware functions #ifndef BOOST_MOVE_CORE_HPP #define BOOST_MOVE_CORE_HPP #include #ifdef BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \ private:\ TYPE(TYPE &);\ TYPE& operator=(TYPE &);\ // #else #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \ public:\ TYPE(TYPE const &) = delete;\ TYPE& operator=(TYPE const &) = delete;\ private:\ // #endif //BOOST_NO_CXX11_DELETED_FUNCTIONS #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) #include //Move emulation rv breaks standard aliasing rules so add workarounds for some compilers #if defined(__GNUC__) && (__GNUC__ >= 4) #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS __attribute__((__may_alias__)) #else #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS #endif namespace boost { ////////////////////////////////////////////////////////////////////////////// // // struct rv // ////////////////////////////////////////////////////////////////////////////// template class rv : public ::boost::move_detail::if_c < ::boost::move_detail::is_class_or_union::value , T , ::boost::move_detail::empty >::type { rv(); ~rv(); rv(rv const&); void operator=(rv const&); } BOOST_MOVE_ATTRIBUTE_MAY_ALIAS; ////////////////////////////////////////////////////////////////////////////// // // move_detail::is_rv // ////////////////////////////////////////////////////////////////////////////// namespace move_detail { template struct is_rv : ::boost::move_detail::integral_constant {}; template struct is_rv< rv > : ::boost::move_detail::integral_constant {}; template struct is_rv< const rv > : ::boost::move_detail::integral_constant {}; } //namespace move_detail { ////////////////////////////////////////////////////////////////////////////// // // has_move_emulation_enabled // ////////////////////////////////////////////////////////////////////////////// template struct has_move_emulation_enabled : ::boost::move_detail::is_convertible< T, ::boost::rv& > {}; template struct has_move_emulation_enabled : ::boost::move_detail::integral_constant {}; template struct has_move_emulation_enabled< ::boost::rv > : ::boost::move_detail::integral_constant {}; } //namespace boost { #define BOOST_RV_REF(TYPE)\ ::boost::rv< TYPE >& \ // #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ ::boost::rv< TYPE >& \ // #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ ::boost::rv< TYPE >& \ // #define BOOST_RV_REF_BEG\ ::boost::rv< \ // #define BOOST_RV_REF_END\ >& \ // #define BOOST_FWD_REF(TYPE)\ const TYPE & \ // #define BOOST_COPY_ASSIGN_REF(TYPE)\ const ::boost::rv< TYPE >& \ // #define BOOST_COPY_ASSIGN_REF_BEG \ const ::boost::rv< \ // #define BOOST_COPY_ASSIGN_REF_END \ >& \ // #define BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ const ::boost::rv< TYPE >& \ // #define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ const ::boost::rv< TYPE >& \ // #define BOOST_CATCH_CONST_RLVALUE(TYPE)\ const ::boost::rv< TYPE >& \ // ////////////////////////////////////////////////////////////////////////////// // // BOOST_MOVABLE_BUT_NOT_COPYABLE // ////////////////////////////////////////////////////////////////////////////// #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\ public:\ operator ::boost::rv&() \ { return *static_cast< ::boost::rv* >(this); }\ operator const ::boost::rv&() const \ { return *static_cast* >(this); }\ private:\ // ////////////////////////////////////////////////////////////////////////////// // // BOOST_COPYABLE_AND_MOVABLE // ////////////////////////////////////////////////////////////////////////////// #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\ public:\ TYPE& operator=(TYPE &t)\ { this->operator=(static_cast &>(const_cast(t))); return *this;}\ public:\ operator ::boost::rv&() \ { return *static_cast< ::boost::rv* >(this); }\ operator const ::boost::rv&() const \ { return *static_cast* >(this); }\ private:\ // #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\ public:\ operator ::boost::rv&() \ { return *static_cast< ::boost::rv* >(this); }\ operator const ::boost::rv&() const \ { return *static_cast* >(this); }\ private:\ // #else //BOOST_NO_CXX11_RVALUE_REFERENCES //Compiler workaround detection #if !defined(BOOST_MOVE_DOXYGEN_INVOKED) #if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5) && !defined(__clang__) //Pre-standard rvalue binding rules #define BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES #elif defined(_MSC_VER) && (_MSC_VER == 1600) //Standard rvalue binding rules but with some bugs #define BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG //Use standard library for MSVC to avoid namespace issues as //some move calls in the STL are not fully qualified. //#define BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE #endif #endif //! This macro marks a type as movable but not copyable, disabling copy construction //! and assignment. The user will need to write a move constructor/assignment as explained //! in the documentation to fully write a movable but not copyable class. #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\ BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\ public:\ typedef int boost_move_emulation_t;\ // //! This macro marks a type as copyable and movable. //! The user will need to write a move constructor/assignment and a copy assignment //! as explained in the documentation to fully write a copyable and movable class. #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\ // #if !defined(BOOST_MOVE_DOXYGEN_INVOKED) #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\ // #endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) namespace boost { //!This trait yields to a compile-time true boolean if T was marked as //!BOOST_MOVABLE_BUT_NOT_COPYABLE or BOOST_COPYABLE_AND_MOVABLE and //!rvalue references are not available on the platform. False otherwise. template struct has_move_emulation_enabled { static const bool value = false; }; } //namespace boost{ //!This macro is used to achieve portable syntax in move //!constructors and assignments for classes marked as //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE #define BOOST_RV_REF(TYPE)\ TYPE && \ // //!This macro is used to achieve portable syntax in move //!constructors and assignments for template classes marked as //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE. //!As macros have problems with comma-separatd template arguments, //!the template argument must be preceded with BOOST_RV_REF_START //!and ended with BOOST_RV_REF_END #define BOOST_RV_REF_BEG\ \ // //!This macro is used to achieve portable syntax in move //!constructors and assignments for template classes marked as //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE. //!As macros have problems with comma-separatd template arguments, //!the template argument must be preceded with BOOST_RV_REF_START //!and ended with BOOST_RV_REF_END #define BOOST_RV_REF_END\ && \ //!This macro is used to achieve portable syntax in copy //!assignment for classes marked as BOOST_COPYABLE_AND_MOVABLE. #define BOOST_COPY_ASSIGN_REF(TYPE)\ const TYPE & \ // //! This macro is used to implement portable perfect forwarding //! as explained in the documentation. #define BOOST_FWD_REF(TYPE)\ TYPE && \ // #if !defined(BOOST_MOVE_DOXYGEN_INVOKED) /// @cond #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ TYPE && \ // #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ TYPE && \ // #define BOOST_COPY_ASSIGN_REF_BEG \ const \ // #define BOOST_COPY_ASSIGN_REF_END \ & \ // #define BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\ const TYPE & \ // #define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\ const TYPE& \ // #define BOOST_CATCH_CONST_RLVALUE(TYPE)\ const TYPE & \ // /// @endcond #endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED) #endif //BOOST_NO_CXX11_RVALUE_REFERENCES #include #endif //#ifndef BOOST_MOVE_CORE_HPP passenger-4.0.37/ext/boost/move/detail/000755 000765 000024 00000000000 12233035540 020352 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/move/iterator.hpp000644 000765 000024 00000022444 12233035540 021460 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2012-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/move for documentation. // ////////////////////////////////////////////////////////////////////////////// //! \file #ifndef BOOST_MOVE_ITERATOR_HPP #define BOOST_MOVE_ITERATOR_HPP #include #include #include //std::iterator namespace boost { ////////////////////////////////////////////////////////////////////////////// // // move_iterator // ////////////////////////////////////////////////////////////////////////////// //! Class template move_iterator is an iterator adaptor with the same behavior //! as the underlying iterator except that its dereference operator implicitly //! converts the value returned by the underlying iterator's dereference operator //! to an rvalue reference. Some generic algorithms can be called with move //! iterators to replace copying with moving. template class move_iterator { public: typedef It iterator_type; typedef typename std::iterator_traits::value_type value_type; #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_DOXYGEN_INVOKED) typedef value_type && reference; #else typedef typename ::boost::move_detail::if_ < ::boost::has_move_emulation_enabled , ::boost::rv& , value_type & >::type reference; #endif typedef It pointer; typedef typename std::iterator_traits::difference_type difference_type; typedef typename std::iterator_traits::iterator_category iterator_category; move_iterator() {} explicit move_iterator(It i) : m_it(i) {} template move_iterator(const move_iterator& u) : m_it(u.base()) {} iterator_type base() const { return m_it; } reference operator*() const { #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) return *m_it; #else return ::boost::move(*m_it); #endif } pointer operator->() const { return m_it; } move_iterator& operator++() { ++m_it; return *this; } move_iterator operator++(int) { move_iterator tmp(*this); ++(*this); return tmp; } move_iterator& operator--() { --m_it; return *this; } move_iterator operator--(int) { move_iterator tmp(*this); --(*this); return tmp; } move_iterator operator+ (difference_type n) const { return move_iterator(m_it + n); } move_iterator& operator+=(difference_type n) { m_it += n; return *this; } move_iterator operator- (difference_type n) const { return move_iterator(m_it - n); } move_iterator& operator-=(difference_type n) { m_it -= n; return *this; } reference operator[](difference_type n) const { #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) return m_it[n]; #else return ::boost::move(m_it[n]); #endif } friend bool operator==(const move_iterator& x, const move_iterator& y) { return x.base() == y.base(); } friend bool operator!=(const move_iterator& x, const move_iterator& y) { return x.base() != y.base(); } friend bool operator< (const move_iterator& x, const move_iterator& y) { return x.base() < y.base(); } friend bool operator<=(const move_iterator& x, const move_iterator& y) { return x.base() <= y.base(); } friend bool operator> (const move_iterator& x, const move_iterator& y) { return x.base() > y.base(); } friend bool operator>=(const move_iterator& x, const move_iterator& y) { return x.base() >= y.base(); } friend difference_type operator-(const move_iterator& x, const move_iterator& y) { return x.base() - y.base(); } friend move_iterator operator+(difference_type n, const move_iterator& x) { return move_iterator(x.base() + n); } private: It m_it; }; //is_move_iterator namespace move_detail { template struct is_move_iterator : public ::boost::move_detail::integral_constant { }; template struct is_move_iterator< ::boost::move_iterator > : public ::boost::move_detail::integral_constant { }; } //namespace move_detail { ////////////////////////////////////////////////////////////////////////////// // // move_iterator // ////////////////////////////////////////////////////////////////////////////// //! //! Returns: move_iterator(i). template inline move_iterator make_move_iterator(const It &it) { return move_iterator(it); } ////////////////////////////////////////////////////////////////////////////// // // back_move_insert_iterator // ////////////////////////////////////////////////////////////////////////////// //! A move insert iterator that move constructs elements at the //! back of a container template // C models Container class back_move_insert_iterator : public std::iterator { C* container_m; public: typedef C container_type; typedef typename C::value_type value_type; typedef typename C::reference reference; explicit back_move_insert_iterator(C& x) : container_m(&x) { } back_move_insert_iterator& operator=(reference x) { container_m->push_back(boost::move(x)); return *this; } back_move_insert_iterator& operator=(BOOST_RV_REF(value_type) x) { reference rx = x; return this->operator=(rx); } back_move_insert_iterator& operator*() { return *this; } back_move_insert_iterator& operator++() { return *this; } back_move_insert_iterator& operator++(int) { return *this; } }; //! //! Returns: back_move_insert_iterator(x). template // C models Container inline back_move_insert_iterator back_move_inserter(C& x) { return back_move_insert_iterator(x); } ////////////////////////////////////////////////////////////////////////////// // // front_move_insert_iterator // ////////////////////////////////////////////////////////////////////////////// //! A move insert iterator that move constructs elements int the //! front of a container template // C models Container class front_move_insert_iterator : public std::iterator { C* container_m; public: typedef C container_type; typedef typename C::value_type value_type; typedef typename C::reference reference; explicit front_move_insert_iterator(C& x) : container_m(&x) { } front_move_insert_iterator& operator=(reference x) { container_m->push_front(boost::move(x)); return *this; } front_move_insert_iterator& operator=(BOOST_RV_REF(value_type) x) { reference rx = x; return this->operator=(rx); } front_move_insert_iterator& operator*() { return *this; } front_move_insert_iterator& operator++() { return *this; } front_move_insert_iterator& operator++(int) { return *this; } }; //! //! Returns: front_move_insert_iterator(x). template // C models Container inline front_move_insert_iterator front_move_inserter(C& x) { return front_move_insert_iterator(x); } ////////////////////////////////////////////////////////////////////////////// // // insert_move_iterator // ////////////////////////////////////////////////////////////////////////////// template // C models Container class move_insert_iterator : public std::iterator { C* container_m; typename C::iterator pos_; public: typedef C container_type; typedef typename C::value_type value_type; typedef typename C::reference reference; explicit move_insert_iterator(C& x, typename C::iterator pos) : container_m(&x), pos_(pos) {} move_insert_iterator& operator=(reference x) { pos_ = container_m->insert(pos_, ::boost::move(x)); ++pos_; return *this; } move_insert_iterator& operator=(BOOST_RV_REF(value_type) x) { reference rx = x; return this->operator=(rx); } move_insert_iterator& operator*() { return *this; } move_insert_iterator& operator++() { return *this; } move_insert_iterator& operator++(int) { return *this; } }; //! //! Returns: move_insert_iterator(x, it). template // C models Container inline move_insert_iterator move_inserter(C& x, typename C::iterator it) { return move_insert_iterator(x, it); } } //namespace boost { #include #endif //#ifndef BOOST_MOVE_ITERATOR_HPP passenger-4.0.37/ext/boost/move/move.hpp000644 000765 000024 00000001601 12233035540 020565 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright David Abrahams, Vicente Botet 2009. // (C) Copyright Ion Gaztanaga 2009-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/move for documentation. // ////////////////////////////////////////////////////////////////////////////// //! \file move.hpp //! A general library header that includes //! the rest of top-level headers. #ifndef BOOST_MOVE_MOVE_HPP #define BOOST_MOVE_MOVE_HPP #include #include #include #include #include #include #endif //#ifndef BOOST_MOVE_MOVE_HPP passenger-4.0.37/ext/boost/move/traits.hpp000644 000765 000024 00000013125 12233035540 021131 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2009-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/move for documentation. // ////////////////////////////////////////////////////////////////////////////// //! \file #ifndef BOOST_MOVE_MOVE_TRAITS_HPP #define BOOST_MOVE_MOVE_TRAITS_HPP #include #include #include #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #include #endif namespace boost { //! If this trait yields to true //! (has_trivial_destructor_after_move <T>::value == true) //! means that if T is used as argument of a move construction/assignment, //! there is no need to call T's destructor. //! This optimization tipically is used to improve containers' performance. //! //! By default this trait is true if the type has trivial destructor, //! every class should specialize this trait if it wants to improve performance //! when inserted in containers. template struct has_trivial_destructor_after_move : ::boost::has_trivial_destructor {}; //! By default this traits returns false. Classes with non-throwing move constructor //! and assignment can specialize this trait to obtain some performance improvements. template struct has_nothrow_move : public ::boost::move_detail::integral_constant {}; namespace move_detail { // Code from Jeffrey Lee Hellrung, many thanks #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template< class T> struct forward_type { typedef T type; }; #else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template< class T> struct forward_type { typedef const T &type; }; template< class T> struct forward_type< boost::rv > { typedef T type; }; #endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template< class T > struct is_rvalue_reference : ::boost::move_detail::integral_constant { }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template< class T > struct is_rvalue_reference< T&& > : ::boost::move_detail::integral_constant { }; #else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template< class T > struct is_rvalue_reference< boost::rv& > : ::boost::move_detail::integral_constant {}; template< class T > struct is_rvalue_reference< const boost::rv& > : ::boost::move_detail::integral_constant {}; #endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template< class T > struct add_rvalue_reference { typedef T&& type; }; #else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES namespace detail_add_rvalue_reference { template< class T , bool emulation = ::boost::has_move_emulation_enabled::value , bool rv = ::boost::move_detail::is_rv::value > struct add_rvalue_reference_impl { typedef T type; }; template< class T, bool emulation> struct add_rvalue_reference_impl< T, emulation, true > { typedef T & type; }; template< class T, bool rv > struct add_rvalue_reference_impl< T, true, rv > { typedef ::boost::rv& type; }; } // namespace detail_add_rvalue_reference template< class T > struct add_rvalue_reference : detail_add_rvalue_reference::add_rvalue_reference_impl { }; template< class T > struct add_rvalue_reference { typedef T & type; }; #endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template< class T > struct remove_rvalue_reference { typedef T type; }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template< class T > struct remove_rvalue_reference< T&& > { typedef T type; }; #else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template< class T > struct remove_rvalue_reference< rv > { typedef T type; }; template< class T > struct remove_rvalue_reference< const rv > { typedef T type; }; template< class T > struct remove_rvalue_reference< volatile rv > { typedef T type; }; template< class T > struct remove_rvalue_reference< const volatile rv > { typedef T type; }; template< class T > struct remove_rvalue_reference< rv& > { typedef T type; }; template< class T > struct remove_rvalue_reference< const rv& > { typedef T type; }; template< class T > struct remove_rvalue_reference< volatile rv& > { typedef T type; }; template< class T > struct remove_rvalue_reference< const volatile rv& >{ typedef T type; }; #endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template typename boost::move_detail::add_rvalue_reference::type declval(); } //move_detail { // Ideas from Boost.Move review, Jeffrey Lee Hellrung: // //- TypeTraits metafunctions is_lvalue_reference, add_lvalue_reference, and remove_lvalue_reference ? // Perhaps add_reference and remove_reference can be modified so that they behave wrt emulated rvalue // references the same as wrt real rvalue references, i.e., add_reference< rv& > -> T& rather than // rv& (since T&& & -> T&). // //- Add'l TypeTraits has_[trivial_]move_{constructor,assign}...? // //- An as_lvalue(T& x) function, which amounts to an identity operation in C++0x, but strips emulated // rvalue references in C++03. This may be necessary to prevent "accidental moves". } //namespace boost { #include #endif //#ifndef BOOST_MOVE_MOVE_TRAITS_HPP passenger-4.0.37/ext/boost/move/utility.hpp000644 000765 000024 00000015274 12233035540 021335 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2012-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/move for documentation. // ////////////////////////////////////////////////////////////////////////////// //! \file #ifndef BOOST_MOVE_MOVE_UTILITY_HPP #define BOOST_MOVE_MOVE_UTILITY_HPP #include #include #include #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) namespace boost { template struct enable_move_utility_emulation { static const bool value = true; }; ////////////////////////////////////////////////////////////////////////////// // // move() // ////////////////////////////////////////////////////////////////////////////// template inline typename ::boost::move_detail::enable_if_c < enable_move_utility_emulation::value && !has_move_emulation_enabled::value, T&>::type move(T& x) { return x; } template inline typename ::boost::move_detail::enable_if_c < enable_move_utility_emulation::value && has_move_emulation_enabled::value, rv&>::type move(T& x) { return *static_cast* >(::boost::move_detail::addressof(x)); } template inline typename ::boost::move_detail::enable_if_c < enable_move_utility_emulation::value && has_move_emulation_enabled::value, rv&>::type move(rv& x) { return x; } ////////////////////////////////////////////////////////////////////////////// // // forward() // ////////////////////////////////////////////////////////////////////////////// template inline typename ::boost::move_detail::enable_if_c < enable_move_utility_emulation::value && ::boost::move_detail::is_rv::value, T &>::type forward(const typename ::boost::move_detail::identity::type &x) { return const_cast(x); } template inline typename ::boost::move_detail::enable_if_c < enable_move_utility_emulation::value && !::boost::move_detail::is_rv::value, const T &>::type forward(const typename ::boost::move_detail::identity::type &x) { return x; } } //namespace boost #else //#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED) #if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) #include namespace boost{ using ::std::move; using ::std::forward; } //namespace boost #else //!BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE #include namespace boost { //! This trait's internal boolean `value` is false in compilers with rvalue references //! and true in compilers without rvalue references. //! //! A user can specialize this trait for a type T to false to SFINAE out `move` and `forward` //! so that the user can define a different move emulation for that type in namespace boost //! (e.g. another Boost library for its types) and avoid any overload ambiguity. template struct enable_move_utility_emulation { static const bool value = false; }; ////////////////////////////////////////////////////////////////////////////// // // move // ////////////////////////////////////////////////////////////////////////////// #if defined(BOOST_MOVE_DOXYGEN_INVOKED) //! This function provides a way to convert a reference into a rvalue reference //! in compilers with rvalue references. For other compilers converts T & into //! ::boost::rv & so that move emulation is activated. template rvalue_reference move (input_reference); #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) //Old move approach, lvalues could bind to rvalue references template inline typename remove_reference::type && move(T&& t) { return t; } #else //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES template inline typename remove_reference::type && move(T&& t) { return static_cast::type &&>(t); } #endif //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES ////////////////////////////////////////////////////////////////////////////// // // forward // ////////////////////////////////////////////////////////////////////////////// #if defined(BOOST_MOVE_DOXYGEN_INVOKED) //! This function provides limited form of forwarding that is usually enough for //! in-place construction and avoids the exponential overloading for //! achieve the limited forwarding in C++03. //! //! For compilers with rvalue references this function provides perfect forwarding. //! //! Otherwise: //! * If input_reference binds to const ::boost::rv & then it output_reference is //! ::boost::rv & //! //! * Else, output_reference is equal to input_reference. template output_reference forward(input_reference); #elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) //Old move approach, lvalues could bind to rvalue references template inline T&& forward (typename ::boost::move_detail::identity::type&& t) { return t; } #else //Old move //Implementation #5 from N2951, thanks to Howard Hinnant template inline T&& forward(U&& t , typename ::boost::move_detail::enable_if_c< move_detail::is_lvalue_reference::value ? move_detail::is_lvalue_reference::value : true>::type * = 0/* , typename ::boost::move_detail::enable_if_c< move_detail::is_convertible ::type*, typename remove_reference::type*>::value>::type * = 0*/) { return static_cast(t); } #endif //BOOST_MOVE_DOXYGEN_INVOKED } //namespace boost { #endif //#if defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE) #endif //BOOST_NO_CXX11_RVALUE_REFERENCES #include #endif //#ifndef BOOST_MOVE_MOVE_UTILITY_HPP passenger-4.0.37/ext/boost/move/detail/config_begin.hpp000644 000765 000024 00000001511 12233035540 023472 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2012-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/move for documentation. // ////////////////////////////////////////////////////////////////////////////// #include #ifdef BOOST_MSVC #ifndef _CRT_SECURE_NO_DEPRECATE #define BOOST_MOVE_CRT_SECURE_NO_DEPRECATE #define _CRT_SECURE_NO_DEPRECATE #endif #ifndef _SCL_SECURE_NO_WARNINGS #define BOOST_MOVE_SCL_SECURE_NO_WARNINGS #define _SCL_SECURE_NO_WARNINGS #endif #pragma warning (push) #pragma warning (disable : 4996) // "function": was declared deprecated #endif passenger-4.0.37/ext/boost/move/detail/config_end.hpp000644 000765 000024 00000001406 12233035540 023157 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2012-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/container for documentation. // ////////////////////////////////////////////////////////////////////////////// #if defined BOOST_MSVC #pragma warning (pop) #ifdef BOOST_MOVE_DETAIL_CRT_SECURE_NO_DEPRECATE #undef BOOST_MOVE_DETAIL_CRT_SECURE_NO_DEPRECATE #undef _CRT_SECURE_NO_DEPRECATE #endif #ifndef BOOST_MOVE_SCL_SECURE_NO_WARNINGS #undef BOOST_MOVE_SCL_SECURE_NO_WARNINGS #undef _SCL_SECURE_NO_WARNINGS #endif #endif passenger-4.0.37/ext/boost/move/detail/meta_utils.hpp000644 000765 000024 00000006654 12233035540 023244 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2012-2012. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/move for documentation. // ////////////////////////////////////////////////////////////////////////////// //! \file #ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP #define BOOST_MOVE_DETAIL_META_UTILS_HPP #include //Small meta-typetraits to support move namespace boost { namespace move_detail { //if_ template struct if_c { typedef T1 type; }; template struct if_c { typedef T2 type; }; template struct if_ { typedef typename if_c<0 != T1::value, T2, T3>::type type; }; //enable_if_ template struct enable_if_c { typedef T type; }; template struct enable_if_c {}; template struct enable_if : public enable_if_c {}; template struct disable_if : public enable_if_c {}; //integral_constant template struct integral_constant { static const T value = v; typedef T value_type; typedef integral_constant type; }; //identity template struct identity { typedef T type; }; //is_convertible template class is_convertible { typedef char true_t; class false_t { char dummy[2]; }; static true_t dispatch(U); static false_t dispatch(...); static T &trigger(); public: enum { value = sizeof(dispatch(trigger())) == sizeof(true_t) }; }; //and_ not_ template > struct and_ : public integral_constant {}; template struct not_ : public integral_constant {}; //is_lvalue_reference template struct is_lvalue_reference : public integral_constant {}; template struct is_lvalue_reference : public integral_constant {}; template struct is_class_or_union { struct twochar { char _[2]; }; template static char is_class_or_union_tester(void(U::*)(void)); template static twochar is_class_or_union_tester(...); static const bool value = sizeof(is_class_or_union_tester(0)) == sizeof(char); }; struct empty{}; //addressof template struct addr_impl_ref { T & v_; inline addr_impl_ref( T & v ): v_( v ) {} inline operator T& () const { return v_; } private: addr_impl_ref & operator=(const addr_impl_ref &); }; template struct addressof_impl { static inline T * f( T & v, long ) { return reinterpret_cast( &const_cast(reinterpret_cast(v))); } static inline T * f( T * v, int ) { return v; } }; template inline T * addressof( T & v ) { return ::boost::move_detail::addressof_impl::f ( ::boost::move_detail::addr_impl_ref( v ), 0 ); } } //namespace move_detail { } //namespace boost { #include #endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP passenger-4.0.37/ext/boost/math/policies/000755 000765 000024 00000000000 12233035540 020702 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/math/special_functions/000755 000765 000024 00000000000 12233035540 022603 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/math/tools/000755 000765 000024 00000000000 12233035540 020233 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/math/tools/config.hpp000644 000765 000024 00000024420 12233035540 022213 0ustar00honglistaff000000 000000 // Copyright (c) 2006-7 John Maddock // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_TOOLS_CONFIG_HPP #define BOOST_MATH_TOOLS_CONFIG_HPP #ifdef _MSC_VER #pragma once #endif #include #include // for boost::uintmax_t #include #include // for min and max #include #include #include #if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) # include #endif #include #if (defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__) \ || (defined(__hppa) && !defined(__OpenBSD__)) || (defined(__NO_LONG_DOUBLE_MATH) && (DBL_MANT_DIG != LDBL_MANT_DIG))) \ && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) # define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #endif #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) // // Borland post 5.8.2 uses Dinkumware's std C lib which // doesn't have true long double precision. Earlier // versions are problematic too: // # define BOOST_MATH_NO_REAL_CONCEPT_TESTS # define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS # define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM) # include #endif #ifdef __IBMCPP__ // // For reasons I don't unserstand, the tests with IMB's compiler all // pass at long double precision, but fail with real_concept, those tests // are disabled for now. (JM 2012). # define BOOST_MATH_NO_REAL_CONCEPT_TESTS #endif #if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) // // Darwin's rather strange "double double" is rather hard to // support, it should be possible given enough effort though... // # define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #endif #if defined(unix) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1000) && !defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) // // Intel compiler prior to version 10 has sporadic problems // calling the long double overloads of the std lib math functions: // calling ::powl is OK, but std::pow(long double, long double) // may segfault depending upon the value of the arguments passed // and the specific Linux distribution. // // We'll be conservative and disable long double support for this compiler. // // Comment out this #define and try building the tests to determine whether // your Intel compiler version has this issue or not. // # define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #endif #if defined(unix) && defined(__INTEL_COMPILER) // // Intel compiler has sporadic issues compiling std::fpclassify depending on // the exact OS version used. Use our own code for this as we know it works // well on Intel processors: // #define BOOST_MATH_DISABLE_STD_FPCLASSIFY #endif #if defined(BOOST_MSVC) && !defined(_WIN32_WCE) // Better safe than sorry, our tests don't support hardware exceptions: # define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM) #endif #ifdef __IBMCPP__ # define BOOST_MATH_NO_DEDUCED_FUNCTION_POINTERS #endif #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)) # define BOOST_MATH_USE_C99 #endif #if (defined(__hpux) && !defined(__hppa)) # define BOOST_MATH_USE_C99 #endif #if defined(__GNUC__) && defined(_GLIBCXX_USE_C99) # define BOOST_MATH_USE_C99 #endif #if defined(_LIBCPP_VERSION) && !defined(_MSC_VER) # define BOOST_MATH_USE_C99 #endif #if defined(__CYGWIN__) || defined(__HP_aCC) || defined(BOOST_INTEL) \ || defined(BOOST_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) \ || (defined(__GNUC__) && !defined(BOOST_MATH_USE_C99))\ || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) # define BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY #endif #if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) # include "boost/type.hpp" # include "boost/non_type.hpp" # define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t) boost::type* = 0 # define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type* # define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type* = 0 # define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type* # define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \ , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t) # define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \ , BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t) # define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \ , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v) # define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \ , BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) #else // no workaround needed: expand to nothing # define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(t) # define BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(t) # define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE(t, v) # define BOOST_MATH_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) # define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(t) # define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) # define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) # define BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) #endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS #if (defined(__SUNPRO_CC) || defined(__hppa) || defined(__GNUC__)) && !defined(BOOST_MATH_SMALL_CONSTANT) // Sun's compiler emits a hard error if a constant underflows, // as does aCC on PA-RISC, while gcc issues a large number of warnings: # define BOOST_MATH_SMALL_CONSTANT(x) 0 #else # define BOOST_MATH_SMALL_CONSTANT(x) x #endif #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) // // Define if constants too large for a float cause "bad" // values to be stored in the data, rather than infinity // or a suitably large value. // # define BOOST_MATH_BUGGY_LARGE_FLOAT_CONSTANTS #endif // // Tune performance options for specific compilers: // #ifdef BOOST_MSVC # define BOOST_MATH_POLY_METHOD 2 #elif defined(BOOST_INTEL) # define BOOST_MATH_POLY_METHOD 2 # define BOOST_MATH_RATIONAL_METHOD 2 #elif defined(__GNUC__) # define BOOST_MATH_POLY_METHOD 3 # define BOOST_MATH_RATIONAL_METHOD 3 # define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT # define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L #endif #if defined(BOOST_NO_LONG_LONG) && !defined(BOOST_MATH_INT_TABLE_TYPE) # define BOOST_MATH_INT_TABLE_TYPE(RT, IT) RT # define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##.0L #endif // // The maximum order of polynomial that will be evaluated // via an unrolled specialisation: // #ifndef BOOST_MATH_MAX_POLY_ORDER # define BOOST_MATH_MAX_POLY_ORDER 17 #endif // // Set the method used to evaluate polynomials and rationals: // #ifndef BOOST_MATH_POLY_METHOD # define BOOST_MATH_POLY_METHOD 1 #endif #ifndef BOOST_MATH_RATIONAL_METHOD # define BOOST_MATH_RATIONAL_METHOD 0 #endif // // decide whether to store constants as integers or reals: // #ifndef BOOST_MATH_INT_TABLE_TYPE # define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT #endif #ifndef BOOST_MATH_INT_VALUE_SUFFIX # define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF #endif // // Test whether to support __float128: // #if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) // // Only enable this when the compiler really is GCC as clang and probably // intel too don't support __float128 yet :-( // # define BOOST_MATH_USE_FLOAT128 #endif // // Check for WinCE with no iostream support: // #if defined(_WIN32_WCE) && !defined(__SGI_STL_PORT) # define BOOST_MATH_NO_LEXICAL_CAST #endif // // Helper macro for controlling the FP behaviour: // #ifndef BOOST_MATH_CONTROL_FP # define BOOST_MATH_CONTROL_FP #endif // // Helper macro for using statements: // #define BOOST_MATH_STD_USING_CORE \ using std::abs;\ using std::acos;\ using std::cos;\ using std::fmod;\ using std::modf;\ using std::tan;\ using std::asin;\ using std::cosh;\ using std::frexp;\ using std::pow;\ using std::tanh;\ using std::atan;\ using std::exp;\ using std::ldexp;\ using std::sin;\ using std::atan2;\ using std::fabs;\ using std::log;\ using std::sinh;\ using std::ceil;\ using std::floor;\ using std::log10;\ using std::sqrt; #define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE namespace boost{ namespace math{ namespace tools { template inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c) { return (std::max)((std::max)(a, b), c); } template inline T max BOOST_PREVENT_MACRO_SUBSTITUTION(T a, T b, T c, T d) { return (std::max)((std::max)(a, b), (std::max)(c, d)); } } // namespace tools template void suppress_unused_variable_warning(const T&) { } }} // namespace boost namespace math #if ((defined(__linux__) && !defined(__UCLIBC__)) || defined(__QNX__) || defined(__IBMCPP__)) && !defined(BOOST_NO_FENV_H) #include # ifdef FE_ALL_EXCEPT namespace boost{ namespace math{ namespace detail { struct fpu_guard { fpu_guard() { fegetexceptflag(&m_flags, FE_ALL_EXCEPT); feclearexcept(FE_ALL_EXCEPT); } ~fpu_guard() { fesetexceptflag(&m_flags, FE_ALL_EXCEPT); } private: fexcept_t m_flags; }; } // namespace detail }} // namespaces # define BOOST_FPU_EXCEPTION_GUARD boost::math::detail::fpu_guard local_guard_object; # define BOOST_MATH_INSTRUMENT_FPU do{ fexcept_t cpu_flags; fegetexceptflag(&cpu_flags, FE_ALL_EXCEPT); BOOST_MATH_INSTRUMENT_VARIABLE(cpu_flags); } while(0); # else # define BOOST_FPU_EXCEPTION_GUARD # define BOOST_MATH_INSTRUMENT_FPU # endif #else // All other platforms. # define BOOST_FPU_EXCEPTION_GUARD # define BOOST_MATH_INSTRUMENT_FPU #endif #ifdef BOOST_MATH_INSTRUMENT # include # include # include # define BOOST_MATH_INSTRUMENT_CODE(x) \ std::cout << std::setprecision(35) << __FILE__ << ":" << __LINE__ << " " << x << std::endl; # define BOOST_MATH_INSTRUMENT_VARIABLE(name) BOOST_MATH_INSTRUMENT_CODE(BOOST_STRINGIZE(name) << " = " << name) #else # define BOOST_MATH_INSTRUMENT_CODE(x) # define BOOST_MATH_INSTRUMENT_VARIABLE(name) #endif #endif // BOOST_MATH_TOOLS_CONFIG_HPP passenger-4.0.37/ext/boost/math/tools/promotion.hpp000644 000765 000024 00000015617 12233035540 023004 0ustar00honglistaff000000 000000 // boost\math\tools\promotion.hpp // Copyright John Maddock 2006. // Copyright Paul A. Bristow 2006. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // Promote arguments functions to allow math functions to have arguments // provided as integer OR real (floating-point, built-in or UDT) // (called ArithmeticType in functions that use promotion) // that help to reduce the risk of creating multiple instantiations. // Allows creation of an inline wrapper that forwards to a foo(RT, RT) function, // so you never get to instantiate any mixed foo(RT, IT) functions. #ifndef BOOST_MATH_PROMOTION_HPP #define BOOST_MATH_PROMOTION_HPP #ifdef _MSC_VER #pragma once #endif // Boost type traits: #include #include // for boost::is_floating_point; #include // for boost::is_integral #include // for boost::is_convertible #include // for boost::is_same #include // for boost::remove_cv // Boost Template meta programming: #include // for boost::mpl::if_c. #include // for boost::mpl::if_c. #include // for boost::mpl::if_c. #include // for boost::mpl::if_c. #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #include #endif namespace boost { namespace math { namespace tools { // If either T1 or T2 is an integer type, // pretend it was a double (for the purposes of further analysis). // Then pick the wider of the two floating-point types // as the actual signature to forward to. // For example: // foo(int, short) -> double foo(double, double); // foo(int, float) -> double foo(double, double); // Note: NOT float foo(float, float) // foo(int, double) -> foo(double, double); // foo(double, float) -> double foo(double, double); // foo(double, float) -> double foo(double, double); // foo(any-int-or-float-type, long double) -> foo(long double, long double); // but ONLY float foo(float, float) is unchanged. // So the only way to get an entirely float version is to call foo(1.F, 2.F), // But since most (all?) the math functions convert to double internally, // probably there would not be the hoped-for gain by using float here. // This follows the C-compatible conversion rules of pow, etc // where pow(int, float) is converted to pow(double, double). template struct promote_arg { // If T is integral type, then promote to double. typedef typename mpl::if_, double, T>::type type; }; // These full specialisations reduce mpl::if_ usage and speed up // compilation: template <> struct promote_arg { typedef float type; }; template <> struct promote_arg{ typedef double type; }; template <> struct promote_arg { typedef long double type; }; template <> struct promote_arg { typedef double type; }; template struct promote_args_2 { // Promote, if necessary, & pick the wider of the two floating-point types. // for both parameter types, if integral promote to double. typedef typename promote_arg::type T1P; // T1 perhaps promoted. typedef typename promote_arg::type T2P; // T2 perhaps promoted. typedef typename mpl::if_< typename mpl::and_, is_floating_point >::type, // both T1P and T2P are floating-point? typename mpl::if_< typename mpl::or_, is_same >::type, // either long double? long double, // then result type is long double. typename mpl::if_< typename mpl::or_, is_same >::type, // either double? double, // result type is double. float // else result type is float. >::type >::type, // else one or the other is a user-defined type: typename mpl::if_< typename mpl::and_ >, ::boost::is_convertible >, T2P, T1P>::type>::type type; }; // promote_arg2 // These full specialisations reduce mpl::if_ usage and speed up // compilation: template <> struct promote_args_2 { typedef float type; }; template <> struct promote_args_2{ typedef double type; }; template <> struct promote_args_2 { typedef long double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef long double type; }; template <> struct promote_args_2 { typedef long double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef double type; }; template <> struct promote_args_2 { typedef long double type; }; template <> struct promote_args_2 { typedef long double type; }; template <> struct promote_args_2 { typedef long double type; }; template <> struct promote_args_2 { typedef long double type; }; template struct promote_args { typedef typename promote_args_2< typename remove_cv::type, typename promote_args_2< typename remove_cv::type, typename promote_args_2< typename remove_cv::type, typename promote_args_2< typename remove_cv::type, typename promote_args_2< typename remove_cv::type, typename remove_cv::type >::type >::type >::type >::type >::type type; #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS // // Guard against use of long double if it's not supported: // BOOST_STATIC_ASSERT((0 == ::boost::is_same::value)); #endif }; } // namespace tools } // namespace math } // namespace boost #endif // BOOST_MATH_PROMOTION_HPP passenger-4.0.37/ext/boost/math/tools/real_cast.hpp000644 000765 000024 00000001146 12233035540 022703 0ustar00honglistaff000000 000000 // Copyright John Maddock 2006. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_TOOLS_REAL_CAST_HPP #define BOOST_MATH_TOOLS_REAL_CAST_HPP #ifdef _MSC_VER #pragma once #endif namespace boost{ namespace math { namespace tools { template inline To real_cast(T t) { return static_cast(t); } } // namespace tools } // namespace math } // namespace boost #endif // BOOST_MATH_TOOLS_REAL_CAST_HPP passenger-4.0.37/ext/boost/math/tools/user.hpp000644 000765 000024 00000004547 12233035540 021734 0ustar00honglistaff000000 000000 // Copyright John Maddock 2007. // Copyright Paul A. Bristow 2007. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_TOOLS_USER_HPP #define BOOST_MATH_TOOLS_USER_HPP #ifdef _MSC_VER #pragma once #endif // This file can be modified by the user to change the default policies. // See "Changing the Policy Defaults" in documentation. // define this if the platform has no long double functions, // or if the long double versions have only double precision: // // #define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS // // Performance tuning options: // // #define BOOST_MATH_POLY_METHOD 3 // #define BOOST_MATH_RATIONAL_METHOD 3 // // The maximum order of polynomial that will be evaluated // via an unrolled specialisation: // // #define BOOST_MATH_MAX_POLY_ORDER 17 // // decide whether to store constants as integers or reals: // // #define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT // // Default policies follow: // // Domain errors: // // #define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error // // Pole errors: // // #define BOOST_MATH_POLE_ERROR_POLICY throw_on_error // // Overflow Errors: // // #define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error // // Internal Evaluation Errors: // // #define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error // // Underfow: // // #define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error // // Denorms: // // #define BOOST_MATH_DENORM_ERROR_POLICY ignore_error // // Max digits to use for internal calculations: // // #define BOOST_MATH_DIGITS10_POLICY 0 // // Promote floats to doubles internally? // // #define BOOST_MATH_PROMOTE_FLOAT_POLICY true // // Promote doubles to long double internally: // // #define BOOST_MATH_PROMOTE_DOUBLE_POLICY true // // What do discrete quantiles return? // // #define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards // // If a function is mathematically undefined // (for example the Cauchy distribution has no mean), // then do we stop the code from compiling? // // #define BOOST_MATH_ASSERT_UNDEFINED_POLICY true // // Maximum series iterstions permitted: // // #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000 // // Maximum root finding steps permitted: // // define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200 #endif // BOOST_MATH_TOOLS_USER_HPP passenger-4.0.37/ext/boost/math/special_functions/detail/000755 000765 000024 00000000000 12233035540 024045 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/math/special_functions/fpclassify.hpp000644 000765 000024 00000044107 12233035540 025465 0ustar00honglistaff000000 000000 // Copyright John Maddock 2005-2008. // Copyright (c) 2006-2008 Johan Rade // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_FPCLASSIFY_HPP #define BOOST_MATH_FPCLASSIFY_HPP #ifdef _MSC_VER #pragma once #endif #include #include #include #include #include #include #include /*! \file fpclassify.hpp \brief Classify floating-point value as normal, subnormal, zero, infinite, or NaN. \version 1.0 \author John Maddock */ /* 1. If the platform is C99 compliant, then the native floating point classification functions are used. However, note that we must only define the functions which call std::fpclassify etc if that function really does exist: otherwise a compiler may reject the code even though the template is never instantiated. 2. If the platform is not C99 compliant, and the binary format for a floating point type (float, double or long double) can be determined at compile time, then the following algorithm is used: If all exponent bits, the flag bit (if there is one), and all significand bits are 0, then the number is zero. If all exponent bits and the flag bit (if there is one) are 0, and at least one significand bit is 1, then the number is subnormal. If all exponent bits are 1 and all significand bits are 0, then the number is infinity. If all exponent bits are 1 and at least one significand bit is 1, then the number is a not-a-number. Otherwise the number is normal. This algorithm works for the IEEE 754 representation, and also for several non IEEE 754 formats. Most formats have the structure sign bit + exponent bits + significand bits. A few have the structure sign bit + exponent bits + flag bit + significand bits. The flag bit is 0 for zero and subnormal numbers, and 1 for normal numbers and NaN. It is 0 (Motorola 68K) or 1 (Intel) for infinity. To get the bits, the four or eight most significant bytes are copied into an uint32_t or uint64_t and bit masks are applied. This covers all the exponent bits and the flag bit (if there is one), but not always all the significand bits. Some of the functions below have two implementations, depending on whether all the significand bits are copied or not. 3. If the platform is not C99 compliant, and the binary format for a floating point type (float, double or long double) can not be determined at compile time, then comparison with std::numeric_limits values is used. */ #if defined(_MSC_VER) || defined(__BORLANDC__) #include #endif #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::abs; using ::fabs; } #endif namespace boost{ // // This must not be located in any namespace under boost::math // otherwise we can get into an infinite loop if isnan is // a #define for "isnan" ! // namespace math_detail{ #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4800) #endif template inline bool is_nan_helper(T t, const boost::true_type&) { #ifdef isnan return isnan(t); #elif defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) || !defined(BOOST_HAS_FPCLASSIFY) (void)t; return false; #else // BOOST_HAS_FPCLASSIFY return (BOOST_FPCLASSIFY_PREFIX fpclassify(t) == (int)FP_NAN); #endif } #ifdef BOOST_MSVC #pragma warning(pop) #endif template inline bool is_nan_helper(T, const boost::false_type&) { return false; } } namespace math{ namespace detail{ #ifdef BOOST_MATH_USE_STD_FPCLASSIFY template inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const native_tag&) { return (std::fpclassify)(t); } #endif template inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) { BOOST_MATH_INSTRUMENT_VARIABLE(t); // whenever possible check for Nan's first: #if defined(BOOST_HAS_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) if(::boost::math_detail::is_nan_helper(t, ::boost::is_floating_point())) return FP_NAN; #elif defined(isnan) if(boost::math_detail::is_nan_helper(t, ::boost::is_floating_point())) return FP_NAN; #elif defined(_MSC_VER) || defined(__BORLANDC__) if(::_isnan(boost::math::tools::real_cast(t))) return FP_NAN; #endif // std::fabs broken on a few systems especially for long long!!!! T at = (t < T(0)) ? -t : t; // Use a process of exclusion to figure out // what kind of type we have, this relies on // IEEE conforming reals that will treat // Nan's as unordered. Some compilers // don't do this once optimisations are // turned on, hence the check for nan's above. if(at <= (std::numeric_limits::max)()) { if(at >= (std::numeric_limits::min)()) return FP_NORMAL; return (at != 0) ? FP_SUBNORMAL : FP_ZERO; } else if(at > (std::numeric_limits::max)()) return FP_INFINITE; return FP_NAN; } template inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(T t, const generic_tag&) { #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS if(std::numeric_limits::is_specialized) return fpclassify_imp(t, generic_tag()); #endif // // An unknown type with no numeric_limits support, // so what are we supposed to do we do here? // BOOST_MATH_INSTRUMENT_VARIABLE(t); return t == 0 ? FP_ZERO : FP_NORMAL; } template int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_all_bits_tag) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; BOOST_MATH_INSTRUMENT_VARIABLE(x); BOOST_DEDUCED_TYPENAME traits::bits a; traits::get_bits(x,a); BOOST_MATH_INSTRUMENT_VARIABLE(a); a &= traits::exponent | traits::flag | traits::significand; BOOST_MATH_INSTRUMENT_VARIABLE((traits::exponent | traits::flag | traits::significand)); BOOST_MATH_INSTRUMENT_VARIABLE(a); if(a <= traits::significand) { if(a == 0) return FP_ZERO; else return FP_SUBNORMAL; } if(a < traits::exponent) return FP_NORMAL; a &= traits::significand; if(a == 0) return FP_INFINITE; return FP_NAN; } template int fpclassify_imp BOOST_NO_MACRO_EXPAND(T x, ieee_copy_leading_bits_tag) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; BOOST_MATH_INSTRUMENT_VARIABLE(x); BOOST_DEDUCED_TYPENAME traits::bits a; traits::get_bits(x,a); a &= traits::exponent | traits::flag | traits::significand; if(a <= traits::significand) { if(x == 0) return FP_ZERO; else return FP_SUBNORMAL; } if(a < traits::exponent) return FP_NORMAL; a &= traits::significand; traits::set_bits(x,a); if(x == 0) return FP_INFINITE; return FP_NAN; } #if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && (defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) || defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS)) inline int fpclassify_imp BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) { return boost::math::detail::fpclassify_imp(t, generic_tag()); } #endif } // namespace detail template inline int fpclassify BOOST_NO_MACRO_EXPAND(T t) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; typedef typename tools::promote_args::type value_type; #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS if(std::numeric_limits::is_specialized && detail::is_generic_tag_false(static_cast(0))) return detail::fpclassify_imp(static_cast(t), detail::generic_tag()); return detail::fpclassify_imp(static_cast(t), method()); #else return detail::fpclassify_imp(static_cast(t), method()); #endif } #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template <> inline int fpclassify BOOST_NO_MACRO_EXPAND(long double t) { typedef detail::fp_traits::type traits; typedef traits::method method; typedef long double value_type; #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS if(std::numeric_limits::is_specialized && detail::is_generic_tag_false(static_cast(0))) return detail::fpclassify_imp(static_cast(t), detail::generic_tag()); return detail::fpclassify_imp(static_cast(t), method()); #else return detail::fpclassify_imp(static_cast(t), method()); #endif } #endif namespace detail { #ifdef BOOST_MATH_USE_STD_FPCLASSIFY template inline bool isfinite_impl(T x, native_tag const&) { return (std::isfinite)(x); } #endif template inline bool isfinite_impl(T x, generic_tag const&) { return x >= -(std::numeric_limits::max)() && x <= (std::numeric_limits::max)(); } template inline bool isfinite_impl(T x, generic_tag const&) { #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS if(std::numeric_limits::is_specialized) return isfinite_impl(x, generic_tag()); #endif (void)x; // warning supression. return true; } template inline bool isfinite_impl(T x, ieee_tag const&) { typedef BOOST_DEDUCED_TYPENAME detail::fp_traits::type traits; BOOST_DEDUCED_TYPENAME traits::bits a; traits::get_bits(x,a); a &= traits::exponent; return a != traits::exponent; } #if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) inline bool isfinite_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) { return boost::math::detail::isfinite_impl(t, generic_tag()); } #endif } template inline bool (isfinite)(T x) { //!< \brief return true if floating-point type t is finite. typedef typename detail::fp_traits::type traits; typedef typename traits::method method; // typedef typename boost::is_floating_point::type fp_tag; typedef typename tools::promote_args::type value_type; return detail::isfinite_impl(static_cast(x), method()); } #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template<> inline bool (isfinite)(long double x) { //!< \brief return true if floating-point type t is finite. typedef detail::fp_traits::type traits; typedef traits::method method; typedef boost::is_floating_point::type fp_tag; typedef long double value_type; return detail::isfinite_impl(static_cast(x), method()); } #endif //------------------------------------------------------------------------------ namespace detail { #ifdef BOOST_MATH_USE_STD_FPCLASSIFY template inline bool isnormal_impl(T x, native_tag const&) { return (std::isnormal)(x); } #endif template inline bool isnormal_impl(T x, generic_tag const&) { if(x < 0) x = -x; return x >= (std::numeric_limits::min)() && x <= (std::numeric_limits::max)(); } template inline bool isnormal_impl(T x, generic_tag const&) { #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS if(std::numeric_limits::is_specialized) return isnormal_impl(x, generic_tag()); #endif return !(x == 0); } template inline bool isnormal_impl(T x, ieee_tag const&) { typedef BOOST_DEDUCED_TYPENAME detail::fp_traits::type traits; BOOST_DEDUCED_TYPENAME traits::bits a; traits::get_bits(x,a); a &= traits::exponent | traits::flag; return (a != 0) && (a < traits::exponent); } #if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) inline bool isnormal_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) { return boost::math::detail::isnormal_impl(t, generic_tag()); } #endif } template inline bool (isnormal)(T x) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; //typedef typename boost::is_floating_point::type fp_tag; typedef typename tools::promote_args::type value_type; return detail::isnormal_impl(static_cast(x), method()); } #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template<> inline bool (isnormal)(long double x) { typedef detail::fp_traits::type traits; typedef traits::method method; typedef boost::is_floating_point::type fp_tag; typedef long double value_type; return detail::isnormal_impl(static_cast(x), method()); } #endif //------------------------------------------------------------------------------ namespace detail { #ifdef BOOST_MATH_USE_STD_FPCLASSIFY template inline bool isinf_impl(T x, native_tag const&) { return (std::isinf)(x); } #endif template inline bool isinf_impl(T x, generic_tag const&) { (void)x; // in case the compiler thinks that x is unused because std::numeric_limits::has_infinity is false return std::numeric_limits::has_infinity && ( x == std::numeric_limits::infinity() || x == -std::numeric_limits::infinity()); } template inline bool isinf_impl(T x, generic_tag const&) { #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS if(std::numeric_limits::is_specialized) return isinf_impl(x, generic_tag()); #endif (void)x; // warning supression. return false; } template inline bool isinf_impl(T x, ieee_copy_all_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; BOOST_DEDUCED_TYPENAME traits::bits a; traits::get_bits(x,a); a &= traits::exponent | traits::significand; return a == traits::exponent; } template inline bool isinf_impl(T x, ieee_copy_leading_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; BOOST_DEDUCED_TYPENAME traits::bits a; traits::get_bits(x,a); a &= traits::exponent | traits::significand; if(a != traits::exponent) return false; traits::set_bits(x,0); return x == 0; } #if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && defined(BOOST_MATH_NO_NATIVE_LONG_DOUBLE_FP_CLASSIFY) inline bool isinf_impl BOOST_NO_MACRO_EXPAND(long double t, const native_tag&) { return boost::math::detail::isinf_impl(t, generic_tag()); } #endif } // namespace detail template inline bool (isinf)(T x) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; // typedef typename boost::is_floating_point::type fp_tag; typedef typename tools::promote_args::type value_type; return detail::isinf_impl(static_cast(x), method()); } #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS template<> inline bool (isinf)(long double x) { typedef detail::fp_traits::type traits; typedef traits::method method; typedef boost::is_floating_point::type fp_tag; typedef long double value_type; return detail::isinf_impl(static_cast(x), method()); } #endif //------------------------------------------------------------------------------ namespace detail { #ifdef BOOST_MATH_USE_STD_FPCLASSIFY template inline bool isnan_impl(T x, native_tag const&) { return (std::isnan)(x); } #endif template inline bool isnan_impl(T x, generic_tag const&) { return std::numeric_limits::has_infinity ? !(x <= std::numeric_limits::infinity()) : x != x; } template inline bool isnan_impl(T x, generic_tag const&) { #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS if(std::numeric_limits::is_specialized) return isnan_impl(x, generic_tag()); #endif (void)x; // warning supression return false; } template inline bool isnan_impl(T x, ieee_copy_all_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; BOOST_DEDUCED_TYPENAME traits::bits a; traits::get_bits(x,a); a &= traits::exponent | traits::significand; return a > traits::exponent; } template inline bool isnan_impl(T x, ieee_copy_leading_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; BOOST_DEDUCED_TYPENAME traits::bits a; traits::get_bits(x,a); a &= traits::exponent | traits::significand; if(a < traits::exponent) return false; a &= traits::significand; traits::set_bits(x,a); return x != 0; } } // namespace detail template inline bool (isnan)(T x) { //!< \brief return true if floating-point type t is NaN (Not A Number). typedef typename detail::fp_traits::type traits; typedef typename traits::method method; // typedef typename boost::is_floating_point::type fp_tag; return detail::isnan_impl(x, method()); } #ifdef isnan template <> inline bool isnan BOOST_NO_MACRO_EXPAND(float t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); } template <> inline bool isnan BOOST_NO_MACRO_EXPAND(double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); } template <> inline bool isnan BOOST_NO_MACRO_EXPAND(long double t){ return ::boost::math_detail::is_nan_helper(t, boost::true_type()); } #elif defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) template<> inline bool (isnan)(long double x) { //!< \brief return true if floating-point type t is NaN (Not A Number). typedef detail::fp_traits::type traits; typedef traits::method method; typedef boost::is_floating_point::type fp_tag; return detail::isnan_impl(x, method()); } #endif } // namespace math } // namespace boost #endif // BOOST_MATH_FPCLASSIFY_HPP passenger-4.0.37/ext/boost/math/special_functions/math_fwd.hpp000644 000765 000024 00000161015 12233035540 025111 0ustar00honglistaff000000 000000 // math_fwd.hpp // TODO revise completely for new distribution classes. // Copyright Paul A. Bristow 2006. // Copyright John Maddock 2006. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // Omnibus list of forward declarations of math special functions. // IT = Integer type. // RT = Real type (built-in floating-point types, float, double, long double) & User Defined Types // AT = Integer or Real type #ifndef BOOST_MATH_SPECIAL_MATH_FWD_HPP #define BOOST_MATH_SPECIAL_MATH_FWD_HPP #ifdef _MSC_VER #pragma once #endif #include #include // for argument promotion. #include #include #include #define BOOST_NO_MACRO_EXPAND /**/ namespace boost { namespace math { // Math functions (in roughly alphabetic order). // Beta functions. template typename tools::promote_args::type beta(RT1 a, RT2 b); // Beta function (2 arguments). template typename tools::promote_args::type beta(RT1 a, RT2 b, A x); // Beta function (3 arguments). template typename tools::promote_args::type beta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Beta function (3 arguments). template typename tools::promote_args::type betac(RT1 a, RT2 b, RT3 x); template typename tools::promote_args::type betac(RT1 a, RT2 b, RT3 x, const Policy& pol); template typename tools::promote_args::type ibeta(RT1 a, RT2 b, RT3 x); // Incomplete beta function. template typename tools::promote_args::type ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta function. template typename tools::promote_args::type ibetac(RT1 a, RT2 b, RT3 x); // Incomplete beta complement function. template typename tools::promote_args::type ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta complement function. template typename tools::promote_args::type ibeta_inv(T1 a, T2 b, T3 p, T4* py); template typename tools::promote_args::type ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol); template typename tools::promote_args::type ibeta_inv(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function. template typename tools::promote_args::type ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function. template typename tools::promote_args::type ibeta_inva(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function. template typename tools::promote_args::type ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function. template typename tools::promote_args::type ibeta_invb(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function. template typename tools::promote_args::type ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function. template typename tools::promote_args::type ibetac_inv(T1 a, T2 b, T3 q, T4* py); template typename tools::promote_args::type ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol); template typename tools::promote_args::type ibetac_inv(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function. template typename tools::promote_args::type ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function. template typename tools::promote_args::type ibetac_inva(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function. template typename tools::promote_args::type ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function. template typename tools::promote_args::type ibetac_invb(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function. template typename tools::promote_args::type ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function. template typename tools::promote_args::type ibeta_derivative(RT1 a, RT2 b, RT3 x); // derivative of incomplete beta template typename tools::promote_args::type ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol); // derivative of incomplete beta // erf & erfc error functions. template // Error function. typename tools::promote_args::type erf(RT z); template // Error function. typename tools::promote_args::type erf(RT z, const Policy&); template // Error function complement. typename tools::promote_args::type erfc(RT z); template // Error function complement. typename tools::promote_args::type erfc(RT z, const Policy&); template // Error function inverse. typename tools::promote_args::type erf_inv(RT z); template // Error function inverse. typename tools::promote_args::type erf_inv(RT z, const Policy& pol); template // Error function complement inverse. typename tools::promote_args::type erfc_inv(RT z); template // Error function complement inverse. typename tools::promote_args::type erfc_inv(RT z, const Policy& pol); // Polynomials: template typename tools::promote_args::type legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1); template typename tools::promote_args::type legendre_p(int l, T x); template typename tools::promote_args::type legendre_p(int l, T x, const Policy& pol); template typename tools::promote_args::type legendre_q(unsigned l, T x); template typename tools::promote_args::type legendre_q(unsigned l, T x, const Policy& pol); template typename tools::promote_args::type legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1); template typename tools::promote_args::type legendre_p(int l, int m, T x); template typename tools::promote_args::type legendre_p(int l, int m, T x, const Policy& pol); template typename tools::promote_args::type laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1); template typename tools::promote_args::type laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1); template typename tools::promote_args::type laguerre(unsigned n, T x); template typename tools::promote_args::type laguerre(unsigned n, unsigned m, T x, const Policy& pol); template struct laguerre_result { typedef typename mpl::if_< policies::is_policy, typename tools::promote_args::type, typename tools::promote_args::type >::type type; }; template typename laguerre_result::type laguerre(unsigned n, T1 m, T2 x); template typename tools::promote_args::type hermite(unsigned n, T x); template typename tools::promote_args::type hermite(unsigned n, T x, const Policy& pol); template typename tools::promote_args::type hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1); template std::complex::type> spherical_harmonic(unsigned n, int m, T1 theta, T2 phi); template std::complex::type> spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); template typename tools::promote_args::type spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi); template typename tools::promote_args::type spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); template typename tools::promote_args::type spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi); template typename tools::promote_args::type spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol); // Elliptic integrals: template typename tools::promote_args::type ellint_rf(T1 x, T2 y, T3 z); template typename tools::promote_args::type ellint_rf(T1 x, T2 y, T3 z, const Policy& pol); template typename tools::promote_args::type ellint_rd(T1 x, T2 y, T3 z); template typename tools::promote_args::type ellint_rd(T1 x, T2 y, T3 z, const Policy& pol); template typename tools::promote_args::type ellint_rc(T1 x, T2 y); template typename tools::promote_args::type ellint_rc(T1 x, T2 y, const Policy& pol); template typename tools::promote_args::type ellint_rj(T1 x, T2 y, T3 z, T4 p); template typename tools::promote_args::type ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol); template typename tools::promote_args::type ellint_2(T k); template typename tools::promote_args::type ellint_2(T1 k, T2 phi); template typename tools::promote_args::type ellint_2(T1 k, T2 phi, const Policy& pol); template typename tools::promote_args::type ellint_1(T k); template typename tools::promote_args::type ellint_1(T1 k, T2 phi); template typename tools::promote_args::type ellint_1(T1 k, T2 phi, const Policy& pol); namespace detail{ template struct ellint_3_result { typedef typename mpl::if_< policies::is_policy, typename tools::promote_args::type, typename tools::promote_args::type >::type type; }; } // namespace detail template typename detail::ellint_3_result::type ellint_3(T1 k, T2 v, T3 phi); template typename tools::promote_args::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol); template typename tools::promote_args::type ellint_3(T1 k, T2 v); // Factorial functions. // Note: not for integral types, at present. template struct max_factorial; template RT factorial(unsigned int); template RT factorial(unsigned int, const Policy& pol); template RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT)); template RT double_factorial(unsigned i); template RT double_factorial(unsigned i, const Policy& pol); template typename tools::promote_args::type falling_factorial(RT x, unsigned n); template typename tools::promote_args::type falling_factorial(RT x, unsigned n, const Policy& pol); template typename tools::promote_args::type rising_factorial(RT x, int n); template typename tools::promote_args::type rising_factorial(RT x, int n, const Policy& pol); // Gamma functions. template typename tools::promote_args::type tgamma(RT z); template typename tools::promote_args::type tgamma1pm1(RT z); template typename tools::promote_args::type tgamma1pm1(RT z, const Policy& pol); template typename tools::promote_args::type tgamma(RT1 a, RT2 z); template typename tools::promote_args::type tgamma(RT1 a, RT2 z, const Policy& pol); template typename tools::promote_args::type lgamma(RT z, int* sign); template typename tools::promote_args::type lgamma(RT z, int* sign, const Policy& pol); template typename tools::promote_args::type lgamma(RT x); template typename tools::promote_args::type lgamma(RT x, const Policy& pol); template typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z); template typename tools::promote_args::type tgamma_lower(RT1 a, RT2 z, const Policy&); template typename tools::promote_args::type gamma_q(RT1 a, RT2 z); template typename tools::promote_args::type gamma_q(RT1 a, RT2 z, const Policy&); template typename tools::promote_args::type gamma_p(RT1 a, RT2 z); template typename tools::promote_args::type gamma_p(RT1 a, RT2 z, const Policy&); template typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta); template typename tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&); template typename tools::promote_args::type tgamma_ratio(T1 a, T2 b); template typename tools::promote_args::type tgamma_ratio(T1 a, T2 b, const Policy&); template typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x); template typename tools::promote_args::type gamma_p_derivative(T1 a, T2 x, const Policy&); // gamma inverse. template typename tools::promote_args::type gamma_p_inv(T1 a, T2 p); template typename tools::promote_args::type gamma_p_inva(T1 a, T2 p, const Policy&); template typename tools::promote_args::type gamma_p_inva(T1 a, T2 p); template typename tools::promote_args::type gamma_p_inv(T1 a, T2 p, const Policy&); template typename tools::promote_args::type gamma_q_inv(T1 a, T2 q); template typename tools::promote_args::type gamma_q_inv(T1 a, T2 q, const Policy&); template typename tools::promote_args::type gamma_q_inva(T1 a, T2 q); template typename tools::promote_args::type gamma_q_inva(T1 a, T2 q, const Policy&); // digamma: template typename tools::promote_args::type digamma(T x); template typename tools::promote_args::type digamma(T x, const Policy&); // Hypotenuse function sqrt(x ^ 2 + y ^ 2). template typename tools::promote_args::type hypot(T1 x, T2 y); template typename tools::promote_args::type hypot(T1 x, T2 y, const Policy&); // cbrt - cube root. template typename tools::promote_args::type cbrt(RT z); template typename tools::promote_args::type cbrt(RT z, const Policy&); // log1p is log(x + 1) template typename tools::promote_args::type log1p(T); template typename tools::promote_args::type log1p(T, const Policy&); // log1pmx is log(x + 1) - x template typename tools::promote_args::type log1pmx(T); template typename tools::promote_args::type log1pmx(T, const Policy&); // Exp (x) minus 1 functions. template typename tools::promote_args::type expm1(T); template typename tools::promote_args::type expm1(T, const Policy&); // Power - 1 template typename tools::promote_args::type powm1(const T1 a, const T2 z); template typename tools::promote_args::type powm1(const T1 a, const T2 z, const Policy&); // sqrt(1+x) - 1 template typename tools::promote_args::type sqrt1pm1(const T& val); template typename tools::promote_args::type sqrt1pm1(const T& val, const Policy&); // sinus cardinals: template typename tools::promote_args::type sinc_pi(T x); template typename tools::promote_args::type sinc_pi(T x, const Policy&); template typename tools::promote_args::type sinhc_pi(T x); template typename tools::promote_args::type sinhc_pi(T x, const Policy&); // inverse hyperbolics: template typename tools::promote_args::type asinh(T x); template typename tools::promote_args::type asinh(T x, const Policy&); template typename tools::promote_args::type acosh(T x); template typename tools::promote_args::type acosh(T x, const Policy&); template typename tools::promote_args::type atanh(T x); template typename tools::promote_args::type atanh(T x, const Policy&); namespace detail{ typedef mpl::int_<0> bessel_no_int_tag; // No integer optimisation possible. typedef mpl::int_<1> bessel_maybe_int_tag; // Maybe integer optimisation. typedef mpl::int_<2> bessel_int_tag; // Definite integer optimistaion. template struct bessel_traits { typedef typename tools::promote_args< T1, T2 >::type result_type; typedef typename policies::precision::type precision_type; typedef typename mpl::if_< mpl::or_< mpl::less_equal >, mpl::greater > >, bessel_no_int_tag, typename mpl::if_< is_integral, bessel_int_tag, bessel_maybe_int_tag >::type >::type optimisation_tag; }; } // detail // Bessel functions: template typename detail::bessel_traits::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_bessel_j(T1 v, T2 x); template typename detail::bessel_traits::result_type sph_bessel(unsigned v, T x, const Policy& pol); template typename detail::bessel_traits >::result_type sph_bessel(unsigned v, T x); template typename detail::bessel_traits::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_bessel_i(T1 v, T2 x); template typename detail::bessel_traits::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_bessel_k(T1 v, T2 x); template typename detail::bessel_traits::result_type cyl_neumann(T1 v, T2 x, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_neumann(T1 v, T2 x); template typename detail::bessel_traits::result_type sph_neumann(unsigned v, T x, const Policy& pol); template typename detail::bessel_traits >::result_type sph_neumann(unsigned v, T x); template typename detail::bessel_traits::result_type cyl_bessel_j_zero(T v, int m, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_bessel_j_zero(T v, int m); template OutputIterator cyl_bessel_j_zero(T v, int start_index, unsigned number_of_zeros, OutputIterator out_it); template OutputIterator cyl_bessel_j_zero(T v, int start_index, unsigned number_of_zeros, OutputIterator out_it, const Policy&); template typename detail::bessel_traits::result_type cyl_neumann_zero(T v, int m, const Policy& pol); template typename detail::bessel_traits >::result_type cyl_neumann_zero(T v, int m); template OutputIterator cyl_neumann_zero(T v, int start_index, unsigned number_of_zeros, OutputIterator out_it); template OutputIterator cyl_neumann_zero(T v, int start_index, unsigned number_of_zeros, OutputIterator out_it, const Policy&); template std::complex >::result_type> cyl_hankel_1(T1 v, T2 x); template std::complex::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol); template std::complex::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol); template std::complex >::result_type> cyl_hankel_2(T1 v, T2 x); template std::complex::result_type> sph_hankel_1(T1 v, T2 x, const Policy& pol); template std::complex >::result_type> sph_hankel_1(T1 v, T2 x); template std::complex::result_type> sph_hankel_2(T1 v, T2 x, const Policy& pol); template std::complex >::result_type> sph_hankel_2(T1 v, T2 x); template typename tools::promote_args::type airy_ai(T x, const Policy&); template typename tools::promote_args::type airy_ai(T x); template typename tools::promote_args::type airy_bi(T x, const Policy&); template typename tools::promote_args::type airy_bi(T x); template typename tools::promote_args::type airy_ai_prime(T x, const Policy&); template typename tools::promote_args::type airy_ai_prime(T x); template typename tools::promote_args::type airy_bi_prime(T x, const Policy&); template typename tools::promote_args::type airy_bi_prime(T x); template T airy_ai_zero(unsigned m); template T airy_ai_zero(unsigned m, const Policy&); template OutputIterator airy_ai_zero( unsigned start_index, unsigned number_of_zeros, OutputIterator out_it); template OutputIterator airy_ai_zero( unsigned start_index, unsigned number_of_zeros, OutputIterator out_it, const Policy&); template T airy_bi_zero(unsigned m); template T airy_bi_zero(unsigned m, const Policy&); template OutputIterator airy_bi_zero( unsigned start_index, unsigned number_of_zeros, OutputIterator out_it); template OutputIterator airy_bi_zero( unsigned start_index, unsigned number_of_zeros, OutputIterator out_it, const Policy&); template typename tools::promote_args::type sin_pi(T x, const Policy&); template typename tools::promote_args::type sin_pi(T x); template typename tools::promote_args::type cos_pi(T x, const Policy&); template typename tools::promote_args::type cos_pi(T x); template int fpclassify BOOST_NO_MACRO_EXPAND(T t); template bool isfinite BOOST_NO_MACRO_EXPAND(T z); template bool isinf BOOST_NO_MACRO_EXPAND(T t); template bool isnan BOOST_NO_MACRO_EXPAND(T t); template bool isnormal BOOST_NO_MACRO_EXPAND(T t); template int signbit BOOST_NO_MACRO_EXPAND(T x); template int sign BOOST_NO_MACRO_EXPAND(const T& z); template typename tools::promote_args::type copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y); template typename tools::promote_args::type changesign BOOST_NO_MACRO_EXPAND(const T& z); // Exponential integrals: namespace detail{ template struct expint_result { typedef typename mpl::if_< policies::is_policy, typename tools::promote_args::type, typename tools::promote_args::type >::type type; }; } // namespace detail template typename tools::promote_args::type expint(unsigned n, T z, const Policy&); template typename detail::expint_result::type expint(T const z, U const u); template typename tools::promote_args::type expint(T z); // Zeta: template typename tools::promote_args::type zeta(T s, const Policy&); // Owen's T function: template typename tools::promote_args::type owens_t(T1 h, T2 a, const Policy& pol); template typename tools::promote_args::type owens_t(T1 h, T2 a); // Jacobi Functions: template typename tools::promote_args::type jacobi_elliptic(T k, U theta, V* pcn, V* pdn, const Policy&); template typename tools::promote_args::type jacobi_elliptic(T k, U theta, V* pcn = 0, V* pdn = 0); template typename tools::promote_args::type jacobi_sn(U k, T theta, const Policy& pol); template typename tools::promote_args::type jacobi_sn(U k, T theta); template typename tools::promote_args::type jacobi_cn(T k, U theta, const Policy& pol); template typename tools::promote_args::type jacobi_cn(T k, U theta); template typename tools::promote_args::type jacobi_dn(T k, U theta, const Policy& pol); template typename tools::promote_args::type jacobi_dn(T k, U theta); template typename tools::promote_args::type jacobi_cd(T k, U theta, const Policy& pol); template typename tools::promote_args::type jacobi_cd(T k, U theta); template typename tools::promote_args::type jacobi_dc(T k, U theta, const Policy& pol); template typename tools::promote_args::type jacobi_dc(T k, U theta); template typename tools::promote_args::type jacobi_ns(T k, U theta, const Policy& pol); template typename tools::promote_args::type jacobi_ns(T k, U theta); template typename tools::promote_args::type jacobi_sd(T k, U theta, const Policy& pol); template typename tools::promote_args::type jacobi_sd(T k, U theta); template typename tools::promote_args::type jacobi_ds(T k, U theta, const Policy& pol); template typename tools::promote_args::type jacobi_ds(T k, U theta); template typename tools::promote_args::type jacobi_nc(T k, U theta, const Policy& pol); template typename tools::promote_args::type jacobi_nc(T k, U theta); template typename tools::promote_args::type jacobi_nd(T k, U theta, const Policy& pol); template typename tools::promote_args::type jacobi_nd(T k, U theta); template typename tools::promote_args::type jacobi_sc(T k, U theta, const Policy& pol); template typename tools::promote_args::type jacobi_sc(T k, U theta); template typename tools::promote_args::type jacobi_cs(T k, U theta, const Policy& pol); template typename tools::promote_args::type jacobi_cs(T k, U theta); template typename tools::promote_args::type zeta(T s); // pow: template typename tools::promote_args::type pow(T base, const Policy& policy); template typename tools::promote_args::type pow(T base); // next: template typename tools::promote_args::type nextafter(const T&, const U&, const Policy&); template typename tools::promote_args::type nextafter(const T&, const U&); template typename tools::promote_args::type float_next(const T&, const Policy&); template typename tools::promote_args::type float_next(const T&); template typename tools::promote_args::type float_prior(const T&, const Policy&); template typename tools::promote_args::type float_prior(const T&); template typename tools::promote_args::type float_distance(const T&, const U&, const Policy&); template typename tools::promote_args::type float_distance(const T&, const U&); template typename tools::promote_args::type float_advance(T val, int distance, const Policy& pol); template typename tools::promote_args::type float_advance(const T& val, int distance); } // namespace math } // namespace boost #ifdef BOOST_HAS_LONG_LONG #define BOOST_MATH_DETAIL_LL_FUNC(Policy)\ \ template \ inline T modf(const T& v, boost::long_long_type* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\ \ template \ inline boost::long_long_type lltrunc(const T& v){ using boost::math::lltrunc; return lltrunc(v, Policy()); }\ \ template \ inline boost::long_long_type llround(const T& v){ using boost::math::llround; return llround(v, Policy()); }\ #else #define BOOST_MATH_DETAIL_LL_FUNC(Policy) #endif #define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\ \ BOOST_MATH_DETAIL_LL_FUNC(Policy)\ \ template \ inline typename boost::math::tools::promote_args::type \ beta(RT1 a, RT2 b) { return ::boost::math::beta(a, b, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ beta(RT1 a, RT2 b, A x){ return ::boost::math::beta(a, b, x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ betac(RT1 a, RT2 b, RT3 x) { return ::boost::math::betac(a, b, x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ibeta(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta(a, b, x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ibetac(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibetac(a, b, x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ibeta_inv(T1 a, T2 b, T3 p, T4* py){ return ::boost::math::ibeta_inv(a, b, p, py, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ibeta_inv(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inv(a, b, p, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ibetac_inv(T1 a, T2 b, T3 q, T4* py){ return ::boost::math::ibetac_inv(a, b, q, py, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ibeta_inva(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inva(a, b, p, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ibetac_inva(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_inva(a, b, q, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ibeta_invb(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_invb(a, b, p, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ibetac_invb(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_invb(a, b, q, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ibetac_inv(RT1 a, RT2 b, RT3 q){ return ::boost::math::ibetac_inv(a, b, q, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ibeta_derivative(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta_derivative(a, b, x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type erf(RT z) { return ::boost::math::erf(z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type erfc(RT z){ return ::boost::math::erfc(z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type erf_inv(RT z) { return ::boost::math::erf_inv(z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type erfc_inv(RT z){ return ::boost::math::erfc_inv(z, Policy()); }\ \ using boost::math::legendre_next;\ \ template \ inline typename boost::math::tools::promote_args::type \ legendre_p(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ legendre_q(unsigned l, T x){ return ::boost::math::legendre_q(l, x, Policy()); }\ \ using ::boost::math::legendre_next;\ \ template \ inline typename boost::math::tools::promote_args::type \ legendre_p(int l, int m, T x){ return ::boost::math::legendre_p(l, m, x, Policy()); }\ \ using ::boost::math::laguerre_next;\ \ template \ inline typename boost::math::tools::promote_args::type \ laguerre(unsigned n, T x){ return ::boost::math::laguerre(n, x, Policy()); }\ \ template \ inline typename boost::math::laguerre_result::type \ laguerre(unsigned n, T1 m, T2 x) { return ::boost::math::laguerre(n, m, x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ hermite(unsigned n, T x){ return ::boost::math::hermite(n, x, Policy()); }\ \ using boost::math::hermite_next;\ \ template \ inline std::complex::type> \ spherical_harmonic(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic(n, m, theta, phi, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi){ return ::boost::math::spherical_harmonic_r(n, m, theta, phi, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic_i(n, m, theta, phi, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);\ \ template \ inline typename boost::math::tools::promote_args::type \ ellint_rf(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rf(x, y, z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ellint_rd(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rd(x, y, z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ellint_rc(T1 x, T2 y){ return ::boost::math::ellint_rc(x, y, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ ellint_rj(T1 x, T2 y, T3 z, T4 p){ return boost::math::ellint_rj(x, y, z, p, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type ellint_2(T k){ return boost::math::ellint_2(k, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type ellint_2(T1 k, T2 phi){ return boost::math::ellint_2(k, phi, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type ellint_1(T k){ return boost::math::ellint_1(k, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type ellint_1(T1 k, T2 phi){ return boost::math::ellint_1(k, phi, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type ellint_3(T1 k, T2 v, T3 phi){ return boost::math::ellint_3(k, v, phi, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type ellint_3(T1 k, T2 v){ return boost::math::ellint_3(k, v, Policy()); }\ \ using boost::math::max_factorial;\ template \ inline RT factorial(unsigned int i) { return boost::math::factorial(i, Policy()); }\ using boost::math::unchecked_factorial;\ template \ inline RT double_factorial(unsigned i){ return boost::math::double_factorial(i, Policy()); }\ template \ inline typename boost::math::tools::promote_args::type falling_factorial(RT x, unsigned n){ return boost::math::falling_factorial(x, n, Policy()); }\ template \ inline typename boost::math::tools::promote_args::type rising_factorial(RT x, unsigned n){ return boost::math::rising_factorial(x, n, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type tgamma(RT z){ return boost::math::tgamma(z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type tgamma1pm1(RT z){ return boost::math::tgamma1pm1(z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type tgamma(RT1 a, RT2 z){ return boost::math::tgamma(a, z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type lgamma(RT z, int* sign){ return boost::math::lgamma(z, sign, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type lgamma(RT x){ return boost::math::lgamma(x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type tgamma_lower(RT1 a, RT2 z){ return boost::math::tgamma_lower(a, z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type gamma_q(RT1 a, RT2 z){ return boost::math::gamma_q(a, z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type gamma_p(RT1 a, RT2 z){ return boost::math::gamma_p(a, z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type tgamma_delta_ratio(T1 z, T2 delta){ return boost::math::tgamma_delta_ratio(z, delta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type tgamma_ratio(T1 a, T2 b) { return boost::math::tgamma_ratio(a, b, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type gamma_p_derivative(T1 a, T2 x){ return boost::math::gamma_p_derivative(a, x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type gamma_p_inv(T1 a, T2 p){ return boost::math::gamma_p_inv(a, p, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type gamma_p_inva(T1 a, T2 p){ return boost::math::gamma_p_inva(a, p, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type gamma_q_inv(T1 a, T2 q){ return boost::math::gamma_q_inv(a, q, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type gamma_q_inva(T1 a, T2 q){ return boost::math::gamma_q_inva(a, q, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type digamma(T x){ return boost::math::digamma(x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ hypot(T1 x, T2 y){ return boost::math::hypot(x, y, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type cbrt(RT z){ return boost::math::cbrt(z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type log1p(T x){ return boost::math::log1p(x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type log1pmx(T x){ return boost::math::log1pmx(x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type expm1(T x){ return boost::math::expm1(x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type \ powm1(const T1 a, const T2 z){ return boost::math::powm1(a, z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type sqrt1pm1(const T& val){ return boost::math::sqrt1pm1(val, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type sinc_pi(T x){ return boost::math::sinc_pi(x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type sinhc_pi(T x){ return boost::math::sinhc_pi(x, Policy()); }\ \ template\ inline typename boost::math::tools::promote_args::type asinh(const T x){ return boost::math::asinh(x, Policy()); }\ \ template\ inline typename boost::math::tools::promote_args::type acosh(const T x){ return boost::math::acosh(x, Policy()); }\ \ template\ inline typename boost::math::tools::promote_args::type atanh(const T x){ return boost::math::atanh(x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type cyl_bessel_j(T1 v, T2 x)\ { return boost::math::cyl_bessel_j(v, x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type sph_bessel(unsigned v, T x)\ { return boost::math::sph_bessel(v, x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type \ cyl_bessel_i(T1 v, T2 x) { return boost::math::cyl_bessel_i(v, x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type \ cyl_bessel_k(T1 v, T2 x) { return boost::math::cyl_bessel_k(v, x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type \ cyl_neumann(T1 v, T2 x){ return boost::math::cyl_neumann(v, x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type \ sph_neumann(unsigned v, T x){ return boost::math::sph_neumann(v, x, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type cyl_bessel_j_zero(T v, int m)\ { return boost::math::cyl_bessel_j_zero(v, m, Policy()); }\ \ template \ inline void cyl_bessel_j_zero(T v,\ int start_index,\ unsigned number_of_zeros,\ OutputIterator out_it)\ { boost::math::cyl_bessel_j_zero(v, start_index, number_of_zeros, out_it, Policy()); }\ \ template \ inline typename boost::math::detail::bessel_traits::result_type cyl_neumann_zero(T v, int m)\ { return boost::math::cyl_neumann_zero(v, m, Policy()); }\ \ template \ inline void cyl_neumann_zero(T v,\ int start_index,\ unsigned number_of_zeros,\ OutputIterator out_it)\ { boost::math::cyl_neumann_zero(v, start_index, number_of_zeros, out_it, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type sin_pi(T x){ return boost::math::sin_pi(x); }\ \ template \ inline typename boost::math::tools::promote_args::type cos_pi(T x){ return boost::math::cos_pi(x); }\ \ using boost::math::fpclassify;\ using boost::math::isfinite;\ using boost::math::isinf;\ using boost::math::isnan;\ using boost::math::isnormal;\ using boost::math::signbit;\ using boost::math::sign;\ using boost::math::copysign;\ using boost::math::changesign;\ \ template \ inline typename boost::math::tools::promote_args::type expint(T const& z, U const& u)\ { return boost::math::expint(z, u, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type expint(T z){ return boost::math::expint(z, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type zeta(T s){ return boost::math::zeta(s, Policy()); }\ \ template \ inline T round(const T& v){ using boost::math::round; return round(v, Policy()); }\ \ template \ inline int iround(const T& v){ using boost::math::iround; return iround(v, Policy()); }\ \ template \ inline long lround(const T& v){ using boost::math::lround; return lround(v, Policy()); }\ \ template \ inline T trunc(const T& v){ using boost::math::trunc; return trunc(v, Policy()); }\ \ template \ inline int itrunc(const T& v){ using boost::math::itrunc; return itrunc(v, Policy()); }\ \ template \ inline long ltrunc(const T& v){ using boost::math::ltrunc; return ltrunc(v, Policy()); }\ \ template \ inline T modf(const T& v, T* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\ \ template \ inline T modf(const T& v, int* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\ \ template \ inline T modf(const T& v, long* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type pow(T v){ return boost::math::pow(v, Policy()); }\ \ template T nextafter(const T& a, const T& b){ return boost::math::nextafter(a, b, Policy()); }\ template T float_next(const T& a){ return boost::math::float_next(a, Policy()); }\ template T float_prior(const T& a){ return boost::math::float_prior(a, Policy()); }\ template T float_distance(const T& a, const T& b){ return boost::math::float_distance(a, b, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type owens_t(RT1 a, RT2 z){ return boost::math::owens_t(a, z, Policy()); }\ \ template \ inline std::complex::result_type> cyl_hankel_1(T1 v, T2 x)\ { return boost::math::cyl_hankel_1(v, x, Policy()); }\ \ template \ inline std::complex::result_type> cyl_hankel_2(T1 v, T2 x)\ { return boost::math::cyl_hankel_2(v, x, Policy()); }\ \ template \ inline std::complex::result_type> sph_hankel_1(T1 v, T2 x)\ { return boost::math::sph_hankel_1(v, x, Policy()); }\ \ template \ inline std::complex::result_type> sph_hankel_2(T1 v, T2 x)\ { return boost::math::sph_hankel_2(v, x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn)\ { return boost::math::jacobi_elliptic(k, theta, pcn, pdn, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_sn(U k, T theta)\ { return boost::math::jacobi_sn(k, theta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_cn(T k, U theta)\ { return boost::math::jacobi_cn(k, theta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_dn(T k, U theta)\ { return boost::math::jacobi_dn(k, theta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_cd(T k, U theta)\ { return boost::math::jacobi_cd(k, theta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_dc(T k, U theta)\ { return boost::math::jacobi_dc(k, theta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_ns(T k, U theta)\ { return boost::math::jacobi_ns(k, theta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_sd(T k, U theta)\ { return boost::math::jacobi_sd(k, theta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_ds(T k, U theta)\ { return boost::math::jacobi_ds(k, theta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_nc(T k, U theta)\ { return boost::math::jacobi_nc(k, theta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_nd(T k, U theta)\ { return boost::math::jacobi_nd(k, theta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_sc(T k, U theta)\ { return boost::math::jacobi_sc(k, theta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type jacobi_cs(T k, U theta)\ { return boost::math::jacobi_cs(k, theta, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type airy_ai(T x)\ { return boost::math::airy_ai(x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type airy_bi(T x)\ { return boost::math::airy_bi(x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type airy_ai_prime(T x)\ { return boost::math::airy_ai_prime(x, Policy()); }\ \ template \ inline typename boost::math::tools::promote_args::type airy_bi_prime(T x)\ { return boost::math::airy_bi_prime(x, Policy()); }\ \ template \ inline T airy_ai_zero(int m)\ { return boost::math::airy_ai_zero(m, Policy()); }\ template \ OutputIterator airy_ai_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\ { return boost::math::airy_ai_zero(start_index, number_of_zeros, out_it, Policy()); }\ \ template \ inline T airy_bi_zero(int m)\ { return boost::math::airy_bi_zero(m, Policy()); }\ template \ OutputIterator airy_bi_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\ { return boost::math::airy_bi_zero(start_index, number_of_zeros, out_it, Policy()); }\ \ #endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP passenger-4.0.37/ext/boost/math/special_functions/sign.hpp000644 000765 000024 00000007733 12233035540 024266 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2006. // (C) Copyright Johan Rade 2006. // (C) Copyright Paul A. Bristow 2011 (added changesign). // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_TOOLS_SIGN_HPP #define BOOST_MATH_TOOLS_SIGN_HPP #ifdef _MSC_VER #pragma once #endif #include #include #include namespace boost{ namespace math{ namespace detail { // signbit #ifdef BOOST_MATH_USE_STD_FPCLASSIFY template inline int signbit_impl(T x, native_tag const&) { return (std::signbit)(x); } #endif template inline int signbit_impl(T x, generic_tag const&) { return x < 0; } template inline int signbit_impl(T x, generic_tag const&) { return x < 0; } template inline int signbit_impl(T x, ieee_copy_all_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; BOOST_DEDUCED_TYPENAME traits::bits a; traits::get_bits(x,a); return a & traits::sign ? 1 : 0; } template inline int signbit_impl(T x, ieee_copy_leading_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::type traits; BOOST_DEDUCED_TYPENAME traits::bits a; traits::get_bits(x,a); return a & traits::sign ? 1 : 0; } // Changesign template inline T (changesign_impl)(T x, generic_tag const&) { return -x; } template inline T (changesign_impl)(T x, generic_tag const&) { return -x; } template inline T changesign_impl(T x, ieee_copy_all_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::sign_change_type traits; BOOST_DEDUCED_TYPENAME traits::bits a; traits::get_bits(x,a); a ^= traits::sign; traits::set_bits(x,a); return x; } template inline T (changesign_impl)(T x, ieee_copy_leading_bits_tag const&) { typedef BOOST_DEDUCED_TYPENAME fp_traits::sign_change_type traits; BOOST_DEDUCED_TYPENAME traits::bits a; traits::get_bits(x,a); a ^= traits::sign; traits::set_bits(x,a); return x; } } // namespace detail template int (signbit)(T x) { typedef typename detail::fp_traits::type traits; typedef typename traits::method method; // typedef typename boost::is_floating_point::type fp_tag; typedef typename tools::promote_args::type result_type; return detail::signbit_impl(static_cast(x), method()); } template inline int sign BOOST_NO_MACRO_EXPAND(const T& z) { return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1; } template typename tools::promote_args::type (changesign)(const T& x) { //!< \brief return unchanged binary pattern of x, except for change of sign bit. typedef typename detail::fp_traits::sign_change_type traits; typedef typename traits::method method; // typedef typename boost::is_floating_point::type fp_tag; typedef typename tools::promote_args::type result_type; return detail::changesign_impl(static_cast(x), method()); } template inline typename tools::promote_args::type copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y) { BOOST_MATH_STD_USING typedef typename tools::promote_args::type result_type; return (boost::math::signbit)(static_cast(x)) != (boost::math::signbit)(static_cast(y)) ? (boost::math::changesign)(static_cast(x)) : static_cast(x); } } // namespace math } // namespace boost #endif // BOOST_MATH_TOOLS_SIGN_HPP passenger-4.0.37/ext/boost/math/special_functions/detail/fp_traits.hpp000644 000765 000024 00000040170 12233035540 026553 0ustar00honglistaff000000 000000 // fp_traits.hpp #ifndef BOOST_MATH_FP_TRAITS_HPP #define BOOST_MATH_FP_TRAITS_HPP // Copyright (c) 2006 Johan Rade // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) /* To support old compilers, care has been taken to avoid partial template specialization and meta function forwarding. With these techniques, the code could be simplified. */ #if defined(__vms) && defined(__DECCXX) && !__IEEE_FLOAT // The VAX floating point formats are used (for float and double) # define BOOST_FPCLASSIFY_VAX_FORMAT #endif #include #include #include #include #include #include #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::memcpy; } #endif #ifndef FP_NORMAL #define FP_ZERO 0 #define FP_NORMAL 1 #define FP_INFINITE 2 #define FP_NAN 3 #define FP_SUBNORMAL 4 #else #define BOOST_HAS_FPCLASSIFY #ifndef fpclassify # if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \ && defined(_GLIBCXX_USE_C99_MATH) \ && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \ && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0)) # ifdef _STLP_VENDOR_CSTD # if _STLPORT_VERSION >= 0x520 # define BOOST_FPCLASSIFY_PREFIX ::__std_alias:: # else # define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD:: # endif # else # define BOOST_FPCLASSIFY_PREFIX ::std:: # endif # else # undef BOOST_HAS_FPCLASSIFY # define BOOST_FPCLASSIFY_PREFIX # endif #elif (defined(__HP_aCC) && !defined(__hppa)) // aCC 6 appears to do "#define fpclassify fpclassify" which messes us up a bit! # define BOOST_FPCLASSIFY_PREFIX :: #else # define BOOST_FPCLASSIFY_PREFIX #endif #ifdef __MINGW32__ # undef BOOST_HAS_FPCLASSIFY #endif #endif //------------------------------------------------------------------------------ namespace boost { namespace math { namespace detail { //------------------------------------------------------------------------------ /* The following classes are used to tag the different methods that are used for floating point classification */ struct native_tag {}; template struct generic_tag {}; struct ieee_tag {}; struct ieee_copy_all_bits_tag : public ieee_tag {}; struct ieee_copy_leading_bits_tag : public ieee_tag {}; #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS // // These helper functions are used only when numeric_limits<> // members are not compile time constants: // inline bool is_generic_tag_false(const generic_tag*) { return true; } inline bool is_generic_tag_false(const void*) { return false; } #endif //------------------------------------------------------------------------------ /* Most processors support three different floating point precisions: single precision (32 bits), double precision (64 bits) and extended double precision (80 - 128 bits, depending on the processor) Note that the C++ type long double can be implemented both as double precision and extended double precision. */ struct unknown_precision{}; struct single_precision {}; struct double_precision {}; struct extended_double_precision {}; // native_tag version -------------------------------------------------------------- template struct fp_traits_native { typedef native_tag method; }; // generic_tag version ------------------------------------------------------------- template struct fp_traits_non_native { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS typedef generic_tag::is_specialized> method; #else typedef generic_tag method; #endif }; // ieee_tag versions --------------------------------------------------------------- /* These specializations of fp_traits_non_native contain information needed to "parse" the binary representation of a floating point number. Typedef members: bits -- the target type when copying the leading bytes of a floating point number. It is a typedef for uint32_t or uint64_t. method -- tells us whether all bytes are copied or not. It is a typedef for ieee_copy_all_bits_tag or ieee_copy_leading_bits_tag. Static data members: sign, exponent, flag, significand -- bit masks that give the meaning of the bits in the leading bytes. Static function members: get_bits(), set_bits() -- provide access to the leading bytes. */ // ieee_tag version, float (32 bits) ----------------------------------------------- #ifndef BOOST_FPCLASSIFY_VAX_FORMAT template<> struct fp_traits_non_native { typedef ieee_copy_all_bits_tag method; BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7f800000); BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000); BOOST_STATIC_CONSTANT(uint32_t, significand = 0x007fffff); typedef uint32_t bits; static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); } static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); } }; // ieee_tag version, double (64 bits) ---------------------------------------------- #if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) \ || defined(__BORLANDC__) || defined(__CODEGEAR__) template<> struct fp_traits_non_native { typedef ieee_copy_leading_bits_tag method; BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000); BOOST_STATIC_CONSTANT(uint32_t, flag = 0); BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff); typedef uint32_t bits; static void get_bits(double x, uint32_t& a) { std::memcpy(&a, reinterpret_cast(&x) + offset_, 4); } static void set_bits(double& x, uint32_t a) { std::memcpy(reinterpret_cast(&x) + offset_, &a, 4); } private: #if defined(BOOST_BIG_ENDIAN) BOOST_STATIC_CONSTANT(int, offset_ = 0); #elif defined(BOOST_LITTLE_ENDIAN) BOOST_STATIC_CONSTANT(int, offset_ = 4); #else BOOST_STATIC_ASSERT(false); #endif }; //.............................................................................. #else template<> struct fp_traits_non_native { typedef ieee_copy_all_bits_tag method; static const uint64_t sign = ((uint64_t)0x80000000u) << 32; static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32; static const uint64_t flag = 0; static const uint64_t significand = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu); typedef uint64_t bits; static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); } static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); } }; #endif #endif // #ifndef BOOST_FPCLASSIFY_VAX_FORMAT // long double (64 bits) ------------------------------------------------------- #if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)\ || defined(__BORLANDC__) || defined(__CODEGEAR__) template<> struct fp_traits_non_native { typedef ieee_copy_leading_bits_tag method; BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000); BOOST_STATIC_CONSTANT(uint32_t, flag = 0); BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff); typedef uint32_t bits; static void get_bits(long double x, uint32_t& a) { std::memcpy(&a, reinterpret_cast(&x) + offset_, 4); } static void set_bits(long double& x, uint32_t a) { std::memcpy(reinterpret_cast(&x) + offset_, &a, 4); } private: #if defined(BOOST_BIG_ENDIAN) BOOST_STATIC_CONSTANT(int, offset_ = 0); #elif defined(BOOST_LITTLE_ENDIAN) BOOST_STATIC_CONSTANT(int, offset_ = 4); #else BOOST_STATIC_ASSERT(false); #endif }; //.............................................................................. #else template<> struct fp_traits_non_native { typedef ieee_copy_all_bits_tag method; static const uint64_t sign = (uint64_t)0x80000000u << 32; static const uint64_t exponent = (uint64_t)0x7ff00000 << 32; static const uint64_t flag = 0; static const uint64_t significand = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu; typedef uint64_t bits; static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); } static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); } }; #endif // long double (>64 bits), x86 and x64 ----------------------------------------- #if defined(__i386) || defined(__i386__) || defined(_M_IX86) \ || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) \ || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64) // Intel extended double precision format (80 bits) template<> struct fp_traits_non_native { typedef ieee_copy_leading_bits_tag method; BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000); BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000); BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff); typedef uint32_t bits; static void get_bits(long double x, uint32_t& a) { std::memcpy(&a, reinterpret_cast(&x) + 6, 4); } static void set_bits(long double& x, uint32_t a) { std::memcpy(reinterpret_cast(&x) + 6, &a, 4); } }; // long double (>64 bits), Itanium --------------------------------------------- #elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64) // The floating point format is unknown at compile time // No template specialization is provided. // The generic_tag definition is used. // The Itanium supports both // the Intel extended double precision format (80 bits) and // the IEEE extended double precision format with 15 exponent bits (128 bits). // long double (>64 bits), PowerPC --------------------------------------------- #elif defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) \ || defined(__ppc) || defined(__ppc__) || defined(__PPC__) // PowerPC extended double precision format (128 bits) template<> struct fp_traits_non_native { typedef ieee_copy_leading_bits_tag method; BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000); BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000); BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff); typedef uint32_t bits; static void get_bits(long double x, uint32_t& a) { std::memcpy(&a, reinterpret_cast(&x) + offset_, 4); } static void set_bits(long double& x, uint32_t a) { std::memcpy(reinterpret_cast(&x) + offset_, &a, 4); } private: #if defined(BOOST_BIG_ENDIAN) BOOST_STATIC_CONSTANT(int, offset_ = 0); #elif defined(BOOST_LITTLE_ENDIAN) BOOST_STATIC_CONSTANT(int, offset_ = 12); #else BOOST_STATIC_ASSERT(false); #endif }; // long double (>64 bits), Motorola 68K ---------------------------------------- #elif defined(__m68k) || defined(__m68k__) \ || defined(__mc68000) || defined(__mc68000__) \ // Motorola extended double precision format (96 bits) // It is the same format as the Intel extended double precision format, // except that 1) it is big-endian, 2) the 3rd and 4th byte are padding, and // 3) the flag bit is not set for infinity template<> struct fp_traits_non_native { typedef ieee_copy_leading_bits_tag method; BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000); BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000); BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff); // copy 1st, 2nd, 5th and 6th byte. 3rd and 4th byte are padding. typedef uint32_t bits; static void get_bits(long double x, uint32_t& a) { std::memcpy(&a, &x, 2); std::memcpy(reinterpret_cast(&a) + 2, reinterpret_cast(&x) + 4, 2); } static void set_bits(long double& x, uint32_t a) { std::memcpy(&x, &a, 2); std::memcpy(reinterpret_cast(&x) + 4, reinterpret_cast(&a) + 2, 2); } }; // long double (>64 bits), All other processors -------------------------------- #else // IEEE extended double precision format with 15 exponent bits (128 bits) template<> struct fp_traits_non_native { typedef ieee_copy_leading_bits_tag method; BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u); BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000); BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000); BOOST_STATIC_CONSTANT(uint32_t, significand = 0x0000ffff); typedef uint32_t bits; static void get_bits(long double x, uint32_t& a) { std::memcpy(&a, reinterpret_cast(&x) + offset_, 4); } static void set_bits(long double& x, uint32_t a) { std::memcpy(reinterpret_cast(&x) + offset_, &a, 4); } private: #if defined(BOOST_BIG_ENDIAN) BOOST_STATIC_CONSTANT(int, offset_ = 0); #elif defined(BOOST_LITTLE_ENDIAN) BOOST_STATIC_CONSTANT(int, offset_ = 12); #else BOOST_STATIC_ASSERT(false); #endif }; #endif //------------------------------------------------------------------------------ // size_to_precision is a type switch for converting a C++ floating point type // to the corresponding precision type. template struct size_to_precision { typedef unknown_precision type; }; template<> struct size_to_precision<4, true> { typedef single_precision type; }; template<> struct size_to_precision<8, true> { typedef double_precision type; }; template<> struct size_to_precision<10, true> { typedef extended_double_precision type; }; template<> struct size_to_precision<12, true> { typedef extended_double_precision type; }; template<> struct size_to_precision<16, true> { typedef extended_double_precision type; }; //------------------------------------------------------------------------------ // // Figure out whether to use native classification functions based on // whether T is a built in floating point type or not: // template struct select_native { typedef BOOST_DEDUCED_TYPENAME size_to_precision::value>::type precision; typedef fp_traits_non_native type; }; template<> struct select_native { typedef fp_traits_native type; }; template<> struct select_native { typedef fp_traits_native type; }; template<> struct select_native { typedef fp_traits_native type; }; //------------------------------------------------------------------------------ // fp_traits is a type switch that selects the right fp_traits_non_native #if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \ && !defined(__hpux) \ && !defined(__DECCXX)\ && !defined(__osf__) \ && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\ && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) # define BOOST_MATH_USE_STD_FPCLASSIFY #endif template struct fp_traits { typedef BOOST_DEDUCED_TYPENAME size_to_precision::value>::type precision; #if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY) typedef typename select_native::type type; #else typedef fp_traits_non_native type; #endif typedef fp_traits_non_native sign_change_type; }; //------------------------------------------------------------------------------ } // namespace detail } // namespace math } // namespace boost #endif passenger-4.0.37/ext/boost/math/special_functions/detail/round_fwd.hpp000644 000765 000024 00000005352 12233035540 026552 0ustar00honglistaff000000 000000 // Copyright John Maddock 2008. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_SPECIAL_ROUND_FWD_HPP #define BOOST_MATH_SPECIAL_ROUND_FWD_HPP #include #include #ifdef _MSC_VER #pragma once #endif namespace boost { namespace math { template typename tools::promote_args::type trunc(const T& v, const Policy& pol); template typename tools::promote_args::type trunc(const T& v); template int itrunc(const T& v, const Policy& pol); template int itrunc(const T& v); template long ltrunc(const T& v, const Policy& pol); template long ltrunc(const T& v); #ifdef BOOST_HAS_LONG_LONG template boost::long_long_type lltrunc(const T& v, const Policy& pol); template boost::long_long_type lltrunc(const T& v); #endif template typename tools::promote_args::type round(const T& v, const Policy& pol); template typename tools::promote_args::type round(const T& v); template int iround(const T& v, const Policy& pol); template int iround(const T& v); template long lround(const T& v, const Policy& pol); template long lround(const T& v); #ifdef BOOST_HAS_LONG_LONG template boost::long_long_type llround(const T& v, const Policy& pol); template boost::long_long_type llround(const T& v); #endif template T modf(const T& v, T* ipart, const Policy& pol); template T modf(const T& v, T* ipart); template T modf(const T& v, int* ipart, const Policy& pol); template T modf(const T& v, int* ipart); template T modf(const T& v, long* ipart, const Policy& pol); template T modf(const T& v, long* ipart); #ifdef BOOST_HAS_LONG_LONG template T modf(const T& v, boost::long_long_type* ipart, const Policy& pol); template T modf(const T& v, boost::long_long_type* ipart); #endif } } #undef BOOST_MATH_STD_USING #define BOOST_MATH_STD_USING BOOST_MATH_STD_USING_CORE\ using boost::math::round;\ using boost::math::iround;\ using boost::math::lround;\ using boost::math::trunc;\ using boost::math::itrunc;\ using boost::math::ltrunc;\ using boost::math::modf; #endif // BOOST_MATH_SPECIAL_ROUND_FWD_HPP passenger-4.0.37/ext/boost/math/policies/policy.hpp000644 000765 000024 00000104662 12233035540 022723 0ustar00honglistaff000000 000000 // Copyright John Maddock 2007. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MATH_POLICY_HPP #define BOOST_MATH_POLICY_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // Sadly we do need the .h versions of these to be sure of getting // FLT_MANT_DIG etc. #include #include #include #include namespace boost{ namespace math{ namespace tools{ template int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)); template T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)); } namespace policies{ // // Define macros for our default policies, if they're not defined already: // #ifndef BOOST_MATH_DOMAIN_ERROR_POLICY #define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error #endif #ifndef BOOST_MATH_POLE_ERROR_POLICY #define BOOST_MATH_POLE_ERROR_POLICY throw_on_error #endif #ifndef BOOST_MATH_OVERFLOW_ERROR_POLICY #define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error #endif #ifndef BOOST_MATH_EVALUATION_ERROR_POLICY #define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error #endif #ifndef BOOST_MATH_ROUNDING_ERROR_POLICY #define BOOST_MATH_ROUNDING_ERROR_POLICY throw_on_error #endif #ifndef BOOST_MATH_UNDERFLOW_ERROR_POLICY #define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error #endif #ifndef BOOST_MATH_DENORM_ERROR_POLICY #define BOOST_MATH_DENORM_ERROR_POLICY ignore_error #endif #ifndef BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY #define BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY ignore_error #endif #ifndef BOOST_MATH_DIGITS10_POLICY #define BOOST_MATH_DIGITS10_POLICY 0 #endif #ifndef BOOST_MATH_PROMOTE_FLOAT_POLICY #define BOOST_MATH_PROMOTE_FLOAT_POLICY true #endif #ifndef BOOST_MATH_PROMOTE_DOUBLE_POLICY #ifdef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS #define BOOST_MATH_PROMOTE_DOUBLE_POLICY false #else #define BOOST_MATH_PROMOTE_DOUBLE_POLICY true #endif #endif #ifndef BOOST_MATH_DISCRETE_QUANTILE_POLICY #define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards #endif #ifndef BOOST_MATH_ASSERT_UNDEFINED_POLICY #define BOOST_MATH_ASSERT_UNDEFINED_POLICY true #endif #ifndef BOOST_MATH_MAX_SERIES_ITERATION_POLICY #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000 #endif #ifndef BOOST_MATH_MAX_ROOT_ITERATION_POLICY #define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200 #endif #if !defined(__BORLANDC__) \ && !(defined(__GNUC__) && (__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) #define BOOST_MATH_META_INT(type, name, Default)\ template struct name : public boost::mpl::int_{};\ namespace detail{\ template \ char test_is_valid_arg(const name*);\ char test_is_default_arg(const name*);\ template struct is_##name##_imp\ {\ template static char test(const name*);\ static double test(...);\ BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast(0))) == 1);\ };\ }\ template struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp::value>{}; #define BOOST_MATH_META_BOOL(name, Default)\ template struct name : public boost::mpl::bool_{};\ namespace detail{\ template \ char test_is_valid_arg(const name*);\ char test_is_default_arg(const name*);\ template struct is_##name##_imp\ {\ template static char test(const name*);\ static double test(...);\ BOOST_STATIC_CONSTANT(bool, value = sizeof(test(static_cast(0))) == 1);\ };\ }\ template struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp::value>{}; #else #define BOOST_MATH_META_INT(Type, name, Default)\ template struct name : public boost::mpl::int_{};\ namespace detail{\ template \ char test_is_valid_arg(const name*);\ char test_is_default_arg(const name*);\ template struct is_##name##_tester\ {\ template static char test(const name&);\ static double test(...);\ };\ template struct is_##name##_imp\ {\ static T inst;\ BOOST_STATIC_CONSTANT(bool, value = sizeof( ::boost::math::policies::detail::is_##name##_tester::test(inst)) == 1);\ };\ }\ template struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp::value>\ {\ template struct apply{ typedef is_##name type; };\ }; #define BOOST_MATH_META_BOOL(name, Default)\ template struct name : public boost::mpl::bool_{};\ namespace detail{\ template \ char test_is_valid_arg(const name*);\ char test_is_default_arg(const name*);\ template struct is_##name##_tester\ {\ template static char test(const name&);\ static double test(...);\ };\ template struct is_##name##_imp\ {\ static T inst;\ BOOST_STATIC_CONSTANT(bool, value = sizeof( ::boost::math::policies::detail::is_##name##_tester::test(inst)) == 1);\ };\ }\ template struct is_##name : public boost::mpl::bool_< ::boost::math::policies::detail::is_##name##_imp::value>\ {\ template struct apply{ typedef is_##name type; };\ }; #endif // // Begin by defining policy types for error handling: // enum error_policy_type { throw_on_error = 0, errno_on_error = 1, ignore_error = 2, user_error = 3 }; BOOST_MATH_META_INT(error_policy_type, domain_error, BOOST_MATH_DOMAIN_ERROR_POLICY) BOOST_MATH_META_INT(error_policy_type, pole_error, BOOST_MATH_POLE_ERROR_POLICY) BOOST_MATH_META_INT(error_policy_type, overflow_error, BOOST_MATH_OVERFLOW_ERROR_POLICY) BOOST_MATH_META_INT(error_policy_type, underflow_error, BOOST_MATH_UNDERFLOW_ERROR_POLICY) BOOST_MATH_META_INT(error_policy_type, denorm_error, BOOST_MATH_DENORM_ERROR_POLICY) BOOST_MATH_META_INT(error_policy_type, evaluation_error, BOOST_MATH_EVALUATION_ERROR_POLICY) BOOST_MATH_META_INT(error_policy_type, rounding_error, BOOST_MATH_ROUNDING_ERROR_POLICY) BOOST_MATH_META_INT(error_policy_type, indeterminate_result_error, BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY) // // Policy types for internal promotion: // BOOST_MATH_META_BOOL(promote_float, BOOST_MATH_PROMOTE_FLOAT_POLICY) BOOST_MATH_META_BOOL(promote_double, BOOST_MATH_PROMOTE_DOUBLE_POLICY) BOOST_MATH_META_BOOL(assert_undefined, BOOST_MATH_ASSERT_UNDEFINED_POLICY) // // Policy types for discrete quantiles: // enum discrete_quantile_policy_type { real, integer_round_outwards, integer_round_inwards, integer_round_down, integer_round_up, integer_round_nearest }; BOOST_MATH_META_INT(discrete_quantile_policy_type, discrete_quantile, BOOST_MATH_DISCRETE_QUANTILE_POLICY) // // Precision: // BOOST_MATH_META_INT(int, digits10, BOOST_MATH_DIGITS10_POLICY) BOOST_MATH_META_INT(int, digits2, 0) // // Iterations: // BOOST_MATH_META_INT(unsigned long, max_series_iterations, BOOST_MATH_MAX_SERIES_ITERATION_POLICY) BOOST_MATH_META_INT(unsigned long, max_root_iterations, BOOST_MATH_MAX_ROOT_ITERATION_POLICY) // // Define the names for each possible policy: // #define BOOST_MATH_PARAMETER(name)\ BOOST_PARAMETER_TEMPLATE_KEYWORD(name##_name)\ BOOST_PARAMETER_NAME(name##_name) struct default_policy{}; namespace detail{ // // Trait to work out bits precision from digits10 and digits2: // template struct precision { // // Now work out the precision: // typedef typename mpl::if_c< (Digits10::value == 0), digits2<0>, digits2<((Digits10::value + 1) * 1000L) / 301L> >::type digits2_type; public: #ifdef __BORLANDC__ typedef typename mpl::if_c< (Digits2::value > ::boost::math::policies::detail::precision::digits2_type::value), Digits2, digits2_type>::type type; #else typedef typename mpl::if_c< (Digits2::value > digits2_type::value), Digits2, digits2_type>::type type; #endif }; template struct select_result { typedef A type; }; template struct select_result { typedef typename mpl::deref::type type; }; template struct find_arg { private: typedef typename mpl::find_if::type iter; typedef typename mpl::end::type end_type; public: typedef typename select_result< DefaultType, iter, ::boost::is_same::value>::type type; }; double test_is_valid_arg(...); double test_is_default_arg(...); char test_is_valid_arg(const default_policy*); char test_is_default_arg(const default_policy*); template struct is_valid_policy_imp { BOOST_STATIC_CONSTANT(bool, value = sizeof(::boost::math::policies::detail::test_is_valid_arg(static_cast(0))) == 1); }; template struct is_default_policy_imp { BOOST_STATIC_CONSTANT(bool, value = sizeof(::boost::math::policies::detail::test_is_default_arg(static_cast(0))) == 1); }; template struct is_valid_policy : public mpl::bool_< ::boost::math::policies::detail::is_valid_policy_imp::value> {}; template struct is_default_policy : public mpl::bool_< ::boost::math::policies::detail::is_default_policy_imp::value> { template struct apply { typedef is_default_policy type; }; }; template struct append_N { typedef typename mpl::push_back::type new_seq; typedef typename append_N::type type; }; template struct append_N { typedef Seq type; }; // // Traits class to work out what template parameters our default // policy<> class will have when modified for forwarding: // template struct default_args { typedef promote_float arg1; typedef promote_double arg2; }; template <> struct default_args { typedef default_policy arg1; typedef default_policy arg2; }; template <> struct default_args { typedef promote_float arg1; typedef default_policy arg2; }; template <> struct default_args { typedef promote_double arg1; typedef default_policy arg2; }; typedef default_args::arg1 forwarding_arg1; typedef default_args::arg2 forwarding_arg2; } // detail // // Now define the policy type with enough arguments to handle all // the policies: // template struct policy { private: // // Validate all our arguments: // BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); BOOST_STATIC_ASSERT(::boost::math::policies::detail::is_valid_policy::value); // // Typelist of the arguments: // typedef mpl::list arg_list; public: typedef typename detail::find_arg, domain_error<> >::type domain_error_type; typedef typename detail::find_arg, pole_error<> >::type pole_error_type; typedef typename detail::find_arg, overflow_error<> >::type overflow_error_type; typedef typename detail::find_arg, underflow_error<> >::type underflow_error_type; typedef typename detail::find_arg, denorm_error<> >::type denorm_error_type; typedef typename detail::find_arg, evaluation_error<> >::type evaluation_error_type; typedef typename detail::find_arg, rounding_error<> >::type rounding_error_type; typedef typename detail::find_arg, indeterminate_result_error<> >::type indeterminate_result_error_type; private: // // Now work out the precision: // typedef typename detail::find_arg, digits10<> >::type digits10_type; typedef typename detail::find_arg, digits2<> >::type bits_precision_type; public: typedef typename detail::precision::type precision_type; // // Internal promotion: // typedef typename detail::find_arg, promote_float<> >::type promote_float_type; typedef typename detail::find_arg, promote_double<> >::type promote_double_type; // // Discrete quantiles: // typedef typename detail::find_arg, discrete_quantile<> >::type discrete_quantile_type; // // Mathematically undefined properties: // typedef typename detail::find_arg, assert_undefined<> >::type assert_undefined_type; // // Max iterations: // typedef typename detail::find_arg, max_series_iterations<> >::type max_series_iterations_type; typedef typename detail::find_arg, max_root_iterations<> >::type max_root_iterations_type; }; // // These full specializations are defined to reduce the amount of // template instantiations that have to take place when using the default // policies, they have quite a large impact on compile times: // template <> struct policy { public: typedef domain_error<> domain_error_type; typedef pole_error<> pole_error_type; typedef overflow_error<> overflow_error_type; typedef underflow_error<> underflow_error_type; typedef denorm_error<> denorm_error_type; typedef evaluation_error<> evaluation_error_type; typedef rounding_error<> rounding_error_type; typedef indeterminate_result_error<> indeterminate_result_error_type; #if BOOST_MATH_DIGITS10_POLICY == 0 typedef digits2<> precision_type; #else typedef detail::precision, digits2<> >::type precision_type; #endif typedef promote_float<> promote_float_type; typedef promote_double<> promote_double_type; typedef discrete_quantile<> discrete_quantile_type; typedef assert_undefined<> assert_undefined_type; typedef max_series_iterations<> max_series_iterations_type; typedef max_root_iterations<> max_root_iterations_type; }; template <> struct policy { public: typedef domain_error<> domain_error_type; typedef pole_error<> pole_error_type; typedef overflow_error<> overflow_error_type; typedef underflow_error<> underflow_error_type; typedef denorm_error<> denorm_error_type; typedef evaluation_error<> evaluation_error_type; typedef rounding_error<> rounding_error_type; typedef indeterminate_result_error<> indeterminate_result_error_type; #if BOOST_MATH_DIGITS10_POLICY == 0 typedef digits2<> precision_type; #else typedef detail::precision, digits2<> >::type precision_type; #endif typedef promote_float promote_float_type; typedef promote_double promote_double_type; typedef discrete_quantile<> discrete_quantile_type; typedef assert_undefined<> assert_undefined_type; typedef max_series_iterations<> max_series_iterations_type; typedef max_root_iterations<> max_root_iterations_type; }; template struct normalise { private: typedef mpl::list arg_list; typedef typename detail::find_arg, typename Policy::domain_error_type >::type domain_error_type; typedef typename detail::find_arg, typename Policy::pole_error_type >::type pole_error_type; typedef typename detail::find_arg, typename Policy::overflow_error_type >::type overflow_error_type; typedef typename detail::find_arg, typename Policy::underflow_error_type >::type underflow_error_type; typedef typename detail::find_arg, typename Policy::denorm_error_type >::type denorm_error_type; typedef typename detail::find_arg, typename Policy::evaluation_error_type >::type evaluation_error_type; typedef typename detail::find_arg, typename Policy::rounding_error_type >::type rounding_error_type; typedef typename detail::find_arg, typename Policy::indeterminate_result_error_type >::type indeterminate_result_error_type; // // Now work out the precision: // typedef typename detail::find_arg, digits10<> >::type digits10_type; typedef typename detail::find_arg, typename Policy::precision_type >::type bits_precision_type; typedef typename detail::precision::type precision_type; // // Internal promotion: // typedef typename detail::find_arg, typename Policy::promote_float_type >::type promote_float_type; typedef typename detail::find_arg, typename Policy::promote_double_type >::type promote_double_type; // // Discrete quantiles: // typedef typename detail::find_arg, typename Policy::discrete_quantile_type >::type discrete_quantile_type; // // Mathematically undefined properties: // typedef typename detail::find_arg, typename Policy::assert_undefined_type >::type assert_undefined_type; // // Max iterations: // typedef typename detail::find_arg, typename Policy::max_series_iterations_type>::type max_series_iterations_type; typedef typename detail::find_arg, typename Policy::max_root_iterations_type>::type max_root_iterations_type; // // Define a typelist of the policies: // typedef mpl::vector< domain_error_type, pole_error_type, overflow_error_type, underflow_error_type, denorm_error_type, evaluation_error_type, rounding_error_type, indeterminate_result_error_type, precision_type, promote_float_type, promote_double_type, discrete_quantile_type, assert_undefined_type, max_series_iterations_type, max_root_iterations_type> result_list; // // Remove all the policies that are the same as the default: // typedef typename mpl::remove_if >::type reduced_list; // // Pad out the list with defaults: // typedef typename detail::append_N::value)>::type result_type; public: typedef policy< typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type, typename mpl::at >::type > type; }; // // Full specialisation to speed up compilation of the common case: // template <> struct normalise, promote_float, promote_double, discrete_quantile<>, assert_undefined<>, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy> { typedef policy type; }; template <> struct normalise, promote_float, promote_double, discrete_quantile<>, assert_undefined<>, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy, default_policy> { typedef policy type; }; inline policy<> make_policy() { return policy<>(); } template inline typename normalise, A1>::type make_policy(const A1&) { typedef typename normalise, A1>::type result_type; return result_type(); } template inline typename normalise, A1, A2>::type make_policy(const A1&, const A2&) { typedef typename normalise, A1, A2>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3>::type make_policy(const A1&, const A2&, const A3&) { typedef typename normalise, A1, A2, A3>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4>::type make_policy(const A1&, const A2&, const A3&, const A4&) { typedef typename normalise, A1, A2, A3, A4>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&) { typedef typename normalise, A1, A2, A3, A4, A5>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5, A6>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&) { typedef typename normalise, A1, A2, A3, A4, A5, A6>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5, A6, A7>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&) { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&) { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&) { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&) { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10>::type result_type; return result_type(); } template inline typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type make_policy(const A1&, const A2&, const A3&, const A4&, const A5&, const A6&, const A7&, const A8&, const A9&, const A10&, const A11&) { typedef typename normalise, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11>::type result_type; return result_type(); } // // Traits class to handle internal promotion: // template struct evaluation { typedef Real type; }; template struct evaluation { typedef typename mpl::if_::type type; }; template struct evaluation { typedef typename mpl::if_::type type; }; #ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS template struct basic_digits : public mpl::int_<0>{ }; template <> struct basic_digits : public mpl::int_{ }; template <> struct basic_digits : public mpl::int_{ }; template <> struct basic_digits : public mpl::int_{ }; template struct precision { BOOST_STATIC_ASSERT( ::std::numeric_limits::radix == 2); typedef typename Policy::precision_type precision_type; typedef basic_digits digits_t; typedef typename mpl::if_< mpl::equal_to >, // Possibly unknown precision: precision_type, typename mpl::if_< mpl::or_, mpl::less_equal > >, // Default case, full precision for RealType: digits2< ::std::numeric_limits::digits>, // User customised precision: precision_type >::type >::type type; }; template struct precision { typedef digits2 type; }; template struct precision { typedef digits2 type; }; template struct precision { typedef digits2 type; }; #else template struct precision { BOOST_STATIC_ASSERT((::std::numeric_limits::radix == 2) || ((::std::numeric_limits::is_specialized == 0) || (::std::numeric_limits::digits == 0))); #ifndef __BORLANDC__ typedef typename Policy::precision_type precision_type; typedef typename mpl::if_c< ((::std::numeric_limits::is_specialized == 0) || (::std::numeric_limits::digits == 0)), // Possibly unknown precision: precision_type, typename mpl::if_c< ((::std::numeric_limits::digits <= precision_type::value) || (Policy::precision_type::value <= 0)), // Default case, full precision for RealType: digits2< ::std::numeric_limits::digits>, // User customised precision: precision_type >::type >::type type; #else typedef typename Policy::precision_type precision_type; typedef mpl::int_< ::std::numeric_limits::digits> digits_t; typedef mpl::bool_< ::std::numeric_limits::is_specialized> spec_t; typedef typename mpl::if_< mpl::or_, mpl::equal_to > >, // Possibly unknown precision: precision_type, typename mpl::if_< mpl::or_, mpl::less_equal > >, // Default case, full precision for RealType: digits2< ::std::numeric_limits::digits>, // User customised precision: precision_type >::type >::type type; #endif }; #endif #ifdef BOOST_MATH_USE_FLOAT128 template struct precision<__float128, Policy> { typedef mpl::int_<113> type; }; #endif namespace detail{ template inline int digits_imp(mpl::true_ const&) { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS BOOST_STATIC_ASSERT( ::std::numeric_limits::is_specialized); #else BOOST_ASSERT(::std::numeric_limits::is_specialized); #endif typedef typename boost::math::policies::precision::type p_t; return p_t::value; } template inline int digits_imp(mpl::false_ const&) { return tools::digits(); } } // namespace detail template inline int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) { typedef mpl::bool_< std::numeric_limits::is_specialized > tag_type; return detail::digits_imp(tag_type()); } template inline unsigned long get_max_series_iterations() { typedef typename Policy::max_series_iterations_type iter_type; return iter_type::value; } template inline unsigned long get_max_root_iterations() { typedef typename Policy::max_root_iterations_type iter_type; return iter_type::value; } namespace detail{ template struct series_factor_calc { static T get() { return ldexp(T(1.0), 1 - Digits::value); } }; template struct series_factor_calc { static T get() { return boost::math::tools::epsilon(); } }; template struct series_factor_calc { static T get() { static const boost::uintmax_t v = static_cast(1u) << (Digits::value - 1); return 1 / static_cast(v); } }; template struct series_factor_calc { static T get() { return boost::math::tools::epsilon(); } }; template inline T get_epsilon_imp(mpl::true_ const&) { #ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS BOOST_STATIC_ASSERT( ::std::numeric_limits::is_specialized); BOOST_STATIC_ASSERT( ::std::numeric_limits::radix == 2); #else BOOST_ASSERT(::std::numeric_limits::is_specialized); BOOST_ASSERT(::std::numeric_limits::radix == 2); #endif typedef typename boost::math::policies::precision::type p_t; typedef mpl::bool_::digits> is_small_int; typedef mpl::bool_= std::numeric_limits::digits> is_default_value; return series_factor_calc::get(); } template inline T get_epsilon_imp(mpl::false_ const&) { return tools::epsilon(); } } // namespace detail template inline T get_epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) { typedef mpl::bool_< (std::numeric_limits::is_specialized && (std::numeric_limits::radix == 2)) > tag_type; return detail::get_epsilon_imp(tag_type()); } namespace detail{ template char test_is_policy(const policy*); double test_is_policy(...); template struct is_policy_imp { BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::math::policies::detail::test_is_policy(static_cast(0))) == 1)); }; } template struct is_policy : public mpl::bool_< ::boost::math::policies::detail::is_policy_imp

::value> {}; // // Helper traits class for distribution error handling: // template struct constructor_error_check { typedef typename Policy::domain_error_type domain_error_type; typedef typename mpl::if_c< (domain_error_type::value == throw_on_error) || (domain_error_type::value == user_error), mpl::true_, mpl::false_>::type type; }; template struct method_error_check { typedef typename Policy::domain_error_type domain_error_type; typedef typename mpl::if_c< (domain_error_type::value == throw_on_error) && (domain_error_type::value != user_error), mpl::false_, mpl::true_>::type type; }; }}} // namespaces #endif // BOOST_MATH_POLICY_HPP passenger-4.0.37/ext/boost/libs/atomic/000755 000765 000024 00000000000 12233035540 020347 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/libs/regex/000755 000765 000024 00000000000 12233035540 020205 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/libs/system/000755 000765 000024 00000000000 12233035540 020417 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/libs/thread/000755 000765 000024 00000000000 12233035540 020342 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/libs/thread/src/000755 000765 000024 00000000000 12233035540 021131 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/libs/thread/src/future.cpp000644 000765 000024 00000003471 12233035540 023154 0ustar00honglistaff000000 000000 // (C) Copyright 2012 Vicente J. Botet Escriba // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #ifndef BOOST_NO_EXCEPTIONS #include namespace boost { namespace thread_detail { class future_error_category : public boost::system::error_category { public: virtual const char* name() const BOOST_NOEXCEPT; virtual std::string message(int ev) const; }; const char* future_error_category::name() const BOOST_NOEXCEPT { return "future"; } std::string future_error_category::message(int ev) const { switch (BOOST_SCOPED_ENUM_NATIVE(future_errc)(ev)) { case future_errc::broken_promise: return std::string("The associated promise has been destructed prior " "to the associated state becoming ready."); case future_errc::future_already_retrieved: return std::string("The future has already been retrieved from " "the promise or packaged_task."); case future_errc::promise_already_satisfied: return std::string("The state of the promise has already been set."); case future_errc::no_state: return std::string("Operation not permitted on an object without " "an associated state."); } return std::string("unspecified future_errc value\n"); } future_error_category future_error_category_var; } BOOST_THREAD_DECL const system::error_category& future_category() BOOST_NOEXCEPT { return thread_detail::future_error_category_var; } } #endif passenger-4.0.37/ext/boost/libs/thread/src/pthread/000755 000765 000024 00000000000 12233035540 022560 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/libs/thread/src/tss_null.cpp000644 000765 000024 00000002740 12233035540 023503 0ustar00honglistaff000000 000000 // (C) Copyright Michael Glassford 2004. // (C) Copyright 2007 Anthony Williams // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #if defined(BOOST_HAS_WINTHREADS) && (defined(BOOST_THREAD_BUILD_LIB) || defined(BOOST_THREAD_TEST) || defined(UNDER_CE)) && (!defined(_MSC_VER) || defined(UNDER_CE)) namespace boost { /* This file is a "null" implementation of tss cleanup; it's purpose is to to eliminate link errors in cases where it is known that tss cleanup is not needed. */ void tss_cleanup_implemented(void) { /* This function's sole purpose is to cause a link error in cases where automatic tss cleanup is not implemented by Boost.Threads as a reminder that user code is responsible for calling the necessary functions at the appropriate times (and for implementing an a tss_cleanup_implemented() function to eliminate the linker's missing symbol error). If Boost.Threads later implements automatic tss cleanup in cases where it currently doesn't (which is the plan), the duplicate symbol error will warn the user that their custom solution is no longer needed and can be removed. */ } } #endif //defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_LIB) && !defined(_MSC_VER) passenger-4.0.37/ext/boost/libs/thread/src/pthread/once.cpp000644 000765 000024 00000005121 12233035540 024207 0ustar00honglistaff000000 000000 // Copyright (C) 2007 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #ifdef BOOST_THREAD_ONCE_ATOMIC #include "./once_atomic.cpp" #else #define __STDC_CONSTANT_MACROS #include #include #include #include #include #include namespace boost { namespace thread_detail { BOOST_THREAD_DECL uintmax_atomic_t once_global_epoch=BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C; BOOST_THREAD_DECL pthread_mutex_t once_epoch_mutex=PTHREAD_MUTEX_INITIALIZER; BOOST_THREAD_DECL pthread_cond_t once_epoch_cv = PTHREAD_COND_INITIALIZER; namespace { pthread_key_t epoch_tss_key; pthread_once_t epoch_tss_key_flag=PTHREAD_ONCE_INIT; extern "C" { static void delete_epoch_tss_data(void* data) { free(data); } static void create_epoch_tss_key() { BOOST_VERIFY(!pthread_key_create(&epoch_tss_key,delete_epoch_tss_data)); } } #if defined BOOST_THREAD_PATCH const pthread_once_t pthread_once_init_value=PTHREAD_ONCE_INIT; struct BOOST_THREAD_DECL delete_epoch_tss_key_on_dlclose_t { delete_epoch_tss_key_on_dlclose_t() { } ~delete_epoch_tss_key_on_dlclose_t() { if(memcmp(&epoch_tss_key_flag, &pthread_once_init_value, sizeof(pthread_once_t))) { pthread_key_delete(epoch_tss_key); } } }; delete_epoch_tss_key_on_dlclose_t delete_epoch_tss_key_on_dlclose; #endif } uintmax_atomic_t& get_once_per_thread_epoch() { BOOST_VERIFY(!pthread_once(&epoch_tss_key_flag,create_epoch_tss_key)); void* data=pthread_getspecific(epoch_tss_key); if(!data) { data=malloc(sizeof(thread_detail::uintmax_atomic_t)); BOOST_VERIFY(!pthread_setspecific(epoch_tss_key,data)); *static_cast(data)=BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C; } return *static_cast(data); } } } #endif // passenger-4.0.37/ext/boost/libs/thread/src/pthread/once_atomic.cpp000644 000765 000024 00000005351 12233035540 025550 0ustar00honglistaff000000 000000 // (C) Copyright 2013 Andrey Semashev // (C) Copyright 2013 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) //#define __STDC_CONSTANT_MACROS #include #include #include #include #include #include #include #include namespace boost { namespace thread_detail { enum flag_states { uninitialized, in_progress, initialized }; #ifndef BOOST_THREAD_PROVIDES_ONCE_CXX11 BOOST_STATIC_ASSERT_MSG(sizeof(atomic_int_type) == sizeof(atomic_type), "Boost.Thread: unsupported platform"); #endif static pthread_mutex_t once_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t once_cv = PTHREAD_COND_INITIALIZER; BOOST_THREAD_DECL bool enter_once_region(once_flag& flag) BOOST_NOEXCEPT { atomic_type& f = get_atomic_storage(flag); if (f.load(memory_order_acquire) != initialized) { pthread::pthread_mutex_scoped_lock lk(&once_mutex); if (f.load(memory_order_acquire) != initialized) { while (true) { atomic_int_type expected = uninitialized; if (f.compare_exchange_strong(expected, in_progress, memory_order_acq_rel, memory_order_acquire)) { // We have set the flag to in_progress return true; } else if (expected == initialized) { // Another thread managed to complete the initialization return false; } else { // Wait until the initialization is complete //pthread::pthread_mutex_scoped_lock lk(&once_mutex); BOOST_VERIFY(!pthread_cond_wait(&once_cv, &once_mutex)); } } } } return false; } BOOST_THREAD_DECL void commit_once_region(once_flag& flag) BOOST_NOEXCEPT { atomic_type& f = get_atomic_storage(flag); { pthread::pthread_mutex_scoped_lock lk(&once_mutex); f.store(initialized, memory_order_release); } BOOST_VERIFY(!pthread_cond_broadcast(&once_cv)); } BOOST_THREAD_DECL void rollback_once_region(once_flag& flag) BOOST_NOEXCEPT { atomic_type& f = get_atomic_storage(flag); { pthread::pthread_mutex_scoped_lock lk(&once_mutex); f.store(uninitialized, memory_order_release); } BOOST_VERIFY(!pthread_cond_broadcast(&once_cv)); } } // namespace thread_detail } // namespace boost passenger-4.0.37/ext/boost/libs/thread/src/pthread/thread.cpp000644 000765 000024 00000057243 12233035540 024546 0ustar00honglistaff000000 000000 // Copyright (C) 2001-2003 // William E. Kempf // Copyright (C) 2007-8 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #include #if defined BOOST_THREAD_USES_DATETIME #include #endif #include #include #include #include #include #ifdef __GLIBC__ #include #elif defined(__APPLE__) || defined(__FreeBSD__) #include #include #elif defined BOOST_HAS_UNISTD_H #include #endif #include "./timeconv.inl" namespace boost { namespace detail { thread_data_base::~thread_data_base() { for (notify_list_t::iterator i = notify.begin(), e = notify.end(); i != e; ++i) { i->second->unlock(); i->first->notify_all(); } for (async_states_t::iterator i = async_states_.begin(), e = async_states_.end(); i != e; ++i) { (*i)->make_ready(); } } struct thread_exit_callback_node { boost::detail::thread_exit_function_base* func; thread_exit_callback_node* next; thread_exit_callback_node(boost::detail::thread_exit_function_base* func_, thread_exit_callback_node* next_): func(func_),next(next_) {} }; namespace { #ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11 boost::once_flag current_thread_tls_init_flag; #else boost::once_flag current_thread_tls_init_flag=BOOST_ONCE_INIT; #endif pthread_key_t current_thread_tls_key; extern "C" { static void tls_destructor(void* data) { boost::detail::thread_data_base* thread_info=static_cast(data); if(thread_info) { while(!thread_info->tss_data.empty() || thread_info->thread_exit_callbacks) { while(thread_info->thread_exit_callbacks) { detail::thread_exit_callback_node* const current_node=thread_info->thread_exit_callbacks; thread_info->thread_exit_callbacks=current_node->next; if(current_node->func) { (*current_node->func)(); delete current_node->func; } delete current_node; } for(std::map::iterator next=thread_info->tss_data.begin(), current, end=thread_info->tss_data.end(); next!=end;) { current=next; ++next; if(current->second.func && (current->second.value!=0)) { (*current->second.func)(current->second.value); } thread_info->tss_data.erase(current); } } if (thread_info) // fixme: should we test this? { thread_info->self.reset(); } } } } #if defined BOOST_THREAD_PATCH struct delete_current_thread_tls_key_on_dlclose_t { delete_current_thread_tls_key_on_dlclose_t() { } ~delete_current_thread_tls_key_on_dlclose_t() { if (current_thread_tls_init_flag.epoch!=BOOST_ONCE_INITIAL_FLAG_VALUE) { pthread_key_delete(current_thread_tls_key); } } }; delete_current_thread_tls_key_on_dlclose_t delete_current_thread_tls_key_on_dlclose; #endif void create_current_thread_tls_key() { BOOST_VERIFY(!pthread_key_create(¤t_thread_tls_key,&tls_destructor)); } } boost::detail::thread_data_base* get_current_thread_data() { boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key); return (boost::detail::thread_data_base*)pthread_getspecific(current_thread_tls_key); } void set_current_thread_data(detail::thread_data_base* new_data) { boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key); BOOST_VERIFY(!pthread_setspecific(current_thread_tls_key,new_data)); } } namespace { extern "C" { static void* thread_proxy(void* param) { boost::detail::thread_data_ptr thread_info = static_cast(param)->self; thread_info->self.reset(); detail::set_current_thread_data(thread_info.get()); #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS BOOST_TRY { #endif thread_info->run(); #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS } BOOST_CATCH (thread_interrupted const&) { } // Removed as it stops the debugger identifying the cause of the exception // Unhandled exceptions still cause the application to terminate // BOOST_CATCH(...) // { // throw; // // std::terminate(); // } BOOST_CATCH_END #endif detail::tls_destructor(thread_info.get()); detail::set_current_thread_data(0); boost::lock_guard lock(thread_info->data_mutex); thread_info->done=true; thread_info->done_condition.notify_all(); return 0; } } struct externally_launched_thread: detail::thread_data_base { externally_launched_thread() { #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS interrupt_enabled=false; #endif } void run() {} void notify_all_at_thread_exit(condition_variable*, mutex*) {} private: externally_launched_thread(externally_launched_thread&); void operator=(externally_launched_thread&); }; detail::thread_data_base* make_external_thread_data() { detail::thread_data_base* const me(new externally_launched_thread()); me->self.reset(me); set_current_thread_data(me); return me; } detail::thread_data_base* get_or_make_current_thread_data() { detail::thread_data_base* current_thread_data(detail::get_current_thread_data()); if(!current_thread_data) { current_thread_data=make_external_thread_data(); } return current_thread_data; } } thread::thread() BOOST_NOEXCEPT {} bool thread::start_thread_noexcept() { thread_info->self=thread_info; int const res = pthread_create(&thread_info->thread_handle, 0, &thread_proxy, thread_info.get()); if (res != 0) { thread_info->self.reset(); return false; // boost::throw_exception(thread_resource_error(res, "boost thread: failed in pthread_create")); } return true; } bool thread::start_thread_noexcept(const attributes& attr) { thread_info->self=thread_info; const attributes::native_handle_type* h = attr.native_handle(); int res = pthread_create(&thread_info->thread_handle, h, &thread_proxy, thread_info.get()); if (res != 0) { thread_info->self.reset(); return false; // boost::throw_exception(thread_resource_error(res, "boost thread: failed in pthread_create")); } int detached_state; res = pthread_attr_getdetachstate(h, &detached_state); if (res != 0) { thread_info->self.reset(); return false; // boost::throw_exception(thread_resource_error(res, "boost thread: failed in pthread_attr_getdetachstate")); } if (PTHREAD_CREATE_DETACHED==detached_state) { detail::thread_data_ptr local_thread_info; thread_info.swap(local_thread_info); if(local_thread_info) { //lock_guard lock(local_thread_info->data_mutex); if(!local_thread_info->join_started) { //BOOST_VERIFY(!pthread_detach(local_thread_info->thread_handle)); local_thread_info->join_started=true; local_thread_info->joined=true; } } } return true; } detail::thread_data_ptr thread::get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const { return thread_info; } bool thread::join_noexcept() { detail::thread_data_ptr const local_thread_info=(get_thread_info)(); if(local_thread_info) { bool do_join=false; { unique_lock lock(local_thread_info->data_mutex); while(!local_thread_info->done) { local_thread_info->done_condition.wait(lock); } do_join=!local_thread_info->join_started; if(do_join) { local_thread_info->join_started=true; } else { while(!local_thread_info->joined) { local_thread_info->done_condition.wait(lock); } } } if(do_join) { void* result=0; BOOST_VERIFY(!pthread_join(local_thread_info->thread_handle,&result)); lock_guard lock(local_thread_info->data_mutex); local_thread_info->joined=true; local_thread_info->done_condition.notify_all(); } if(thread_info==local_thread_info) { thread_info.reset(); } return true; } else { return false; } } bool thread::do_try_join_until_noexcept(struct timespec const &timeout, bool& res) { detail::thread_data_ptr const local_thread_info=(get_thread_info)(); if(local_thread_info) { bool do_join=false; { unique_lock lock(local_thread_info->data_mutex); while(!local_thread_info->done) { if(!local_thread_info->done_condition.do_wait_until(lock,timeout)) { res=false; return true; } } do_join=!local_thread_info->join_started; if(do_join) { local_thread_info->join_started=true; } else { while(!local_thread_info->joined) { local_thread_info->done_condition.wait(lock); } } } if(do_join) { void* result=0; BOOST_VERIFY(!pthread_join(local_thread_info->thread_handle,&result)); lock_guard lock(local_thread_info->data_mutex); local_thread_info->joined=true; local_thread_info->done_condition.notify_all(); } if(thread_info==local_thread_info) { thread_info.reset(); } res=true; return true; } else { return false; } } bool thread::joinable() const BOOST_NOEXCEPT { return (get_thread_info)()?true:false; } void thread::detach() { detail::thread_data_ptr local_thread_info; thread_info.swap(local_thread_info); if(local_thread_info) { lock_guard lock(local_thread_info->data_mutex); if(!local_thread_info->join_started) { BOOST_VERIFY(!pthread_detach(local_thread_info->thread_handle)); local_thread_info->join_started=true; local_thread_info->joined=true; } } } namespace this_thread { namespace hiden { void BOOST_THREAD_DECL sleep_for(const timespec& ts) { boost::detail::thread_data_base* const thread_info=boost::detail::get_current_thread_data(); if(thread_info) { unique_lock lk(thread_info->sleep_mutex); while( thread_info->sleep_condition.do_wait_for(lk,ts)) {} } else { if (boost::detail::timespec_ge(ts, boost::detail::timespec_zero())) { # if defined(BOOST_HAS_PTHREAD_DELAY_NP) # if defined(__IBMCPP__) BOOST_VERIFY(!pthread_delay_np(const_cast(&ts))); # else BOOST_VERIFY(!pthread_delay_np(&ts)); # endif # elif defined(BOOST_HAS_NANOSLEEP) // nanosleep takes a timespec that is an offset, not // an absolute time. nanosleep(&ts, 0); # else mutex mx; unique_lock lock(mx); condition_variable cond; cond.do_wait_for(lock, ts); # endif } } } void BOOST_THREAD_DECL sleep_until(const timespec& ts) { boost::detail::thread_data_base* const thread_info=boost::detail::get_current_thread_data(); if(thread_info) { unique_lock lk(thread_info->sleep_mutex); while(thread_info->sleep_condition.do_wait_until(lk,ts)) {} } else { timespec now = boost::detail::timespec_now(); if (boost::detail::timespec_gt(ts, now)) { for (int foo=0; foo < 5; ++foo) { # if defined(BOOST_HAS_PTHREAD_DELAY_NP) timespec d = boost::detail::timespec_minus(ts, now); BOOST_VERIFY(!pthread_delay_np(&d)); # elif defined(BOOST_HAS_NANOSLEEP) // nanosleep takes a timespec that is an offset, not // an absolute time. timespec d = boost::detail::timespec_minus(ts, now); nanosleep(&d, 0); # else mutex mx; unique_lock lock(mx); condition_variable cond; cond.do_wait_until(lock, ts); # endif timespec now2 = boost::detail::timespec_now(); if (boost::detail::timespec_ge(now2, ts)) { return; } } } } } } // hiden } // this_thread namespace this_thread { void yield() BOOST_NOEXCEPT { # if defined(BOOST_HAS_SCHED_YIELD) BOOST_VERIFY(!sched_yield()); # elif defined(BOOST_HAS_PTHREAD_YIELD) BOOST_VERIFY(!pthread_yield()); //# elif defined BOOST_THREAD_USES_DATETIME // xtime xt; // xtime_get(&xt, TIME_UTC_); // sleep(xt); // sleep_for(chrono::milliseconds(0)); # else #error timespec ts; ts.tv_sec= 0; ts.tv_nsec= 0; hiden::sleep_for(ts); # endif } } unsigned thread::hardware_concurrency() BOOST_NOEXCEPT { #if defined(PTW32_VERSION) || defined(__hpux) return pthread_num_processors_np(); #elif defined(__APPLE__) || defined(__FreeBSD__) int count; size_t size=sizeof(count); return sysctlbyname("hw.ncpu",&count,&size,NULL,0)?0:count; #elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN) int const count=sysconf(_SC_NPROCESSORS_ONLN); return (count>0)?count:0; #elif defined(__GLIBC__) return get_nprocs(); #else return 0; #endif } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS void thread::interrupt() { detail::thread_data_ptr const local_thread_info=(get_thread_info)(); if(local_thread_info) { lock_guard lk(local_thread_info->data_mutex); local_thread_info->interrupt_requested=true; if(local_thread_info->current_cond) { boost::pthread::pthread_mutex_scoped_lock internal_lock(local_thread_info->cond_mutex); BOOST_VERIFY(!pthread_cond_broadcast(local_thread_info->current_cond)); } } } bool thread::interruption_requested() const BOOST_NOEXCEPT { detail::thread_data_ptr const local_thread_info=(get_thread_info)(); if(local_thread_info) { lock_guard lk(local_thread_info->data_mutex); return local_thread_info->interrupt_requested; } else { return false; } } #endif thread::native_handle_type thread::native_handle() { detail::thread_data_ptr const local_thread_info=(get_thread_info)(); if(local_thread_info) { lock_guard lk(local_thread_info->data_mutex); return local_thread_info->thread_handle; } else { return pthread_t(); } } #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS namespace this_thread { void interruption_point() { #ifndef BOOST_NO_EXCEPTIONS boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data(); if(thread_info && thread_info->interrupt_enabled) { lock_guard lg(thread_info->data_mutex); if(thread_info->interrupt_requested) { thread_info->interrupt_requested=false; throw thread_interrupted(); } } #endif } bool interruption_enabled() BOOST_NOEXCEPT { boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data(); return thread_info && thread_info->interrupt_enabled; } bool interruption_requested() BOOST_NOEXCEPT { boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data(); if(!thread_info) { return false; } else { lock_guard lg(thread_info->data_mutex); return thread_info->interrupt_requested; } } disable_interruption::disable_interruption() BOOST_NOEXCEPT: interruption_was_enabled(interruption_enabled()) { if(interruption_was_enabled) { detail::get_current_thread_data()->interrupt_enabled=false; } } disable_interruption::~disable_interruption() BOOST_NOEXCEPT { if(detail::get_current_thread_data()) { detail::get_current_thread_data()->interrupt_enabled=interruption_was_enabled; } } restore_interruption::restore_interruption(disable_interruption& d) BOOST_NOEXCEPT { if(d.interruption_was_enabled) { detail::get_current_thread_data()->interrupt_enabled=true; } } restore_interruption::~restore_interruption() BOOST_NOEXCEPT { if(detail::get_current_thread_data()) { detail::get_current_thread_data()->interrupt_enabled=false; } } } #endif namespace detail { void add_thread_exit_function(thread_exit_function_base* func) { detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data()); thread_exit_callback_node* const new_node= new thread_exit_callback_node(func,current_thread_data->thread_exit_callbacks); current_thread_data->thread_exit_callbacks=new_node; } tss_data_node* find_tss_data(void const* key) { detail::thread_data_base* const current_thread_data(get_current_thread_data()); if(current_thread_data) { std::map::iterator current_node= current_thread_data->tss_data.find(key); if(current_node!=current_thread_data->tss_data.end()) { return ¤t_node->second; } } return 0; } void* get_tss_data(void const* key) { if(tss_data_node* const current_node=find_tss_data(key)) { return current_node->value; } return 0; } void add_new_tss_node(void const* key, boost::shared_ptr func, void* tss_data) { detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data()); current_thread_data->tss_data.insert(std::make_pair(key,tss_data_node(func,tss_data))); } void erase_tss_node(void const* key) { detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data()); current_thread_data->tss_data.erase(key); } void set_tss_data(void const* key, boost::shared_ptr func, void* tss_data,bool cleanup_existing) { if(tss_data_node* const current_node=find_tss_data(key)) { if(cleanup_existing && current_node->func && (current_node->value!=0)) { (*current_node->func)(current_node->value); } if(func || (tss_data!=0)) { current_node->func=func; current_node->value=tss_data; } else { erase_tss_node(key); } } else if(func || (tss_data!=0)) { add_new_tss_node(key,func,tss_data); } } } BOOST_THREAD_DECL void notify_all_at_thread_exit(condition_variable& cond, unique_lock lk) { detail::thread_data_base* const current_thread_data(detail::get_current_thread_data()); if(current_thread_data) { current_thread_data->notify_all_at_thread_exit(&cond, lk.release()); } } } passenger-4.0.37/ext/boost/libs/thread/src/pthread/timeconv.inl000644 000765 000024 00000007663 12233035540 025124 0ustar00honglistaff000000 000000 // Copyright (C) 2001-2003 // William E. Kempf // Copyright (C) 2009 Anthony Williams // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // boostinspect:nounnamed #include namespace { const int MILLISECONDS_PER_SECOND = 1000; const int NANOSECONDS_PER_SECOND = 1000000000; const int NANOSECONDS_PER_MILLISECOND = 1000000; const int MICROSECONDS_PER_SECOND = 1000000; const int NANOSECONDS_PER_MICROSECOND = 1000; #if defined BOOST_THREAD_USES_DATETIME inline void to_time(int milliseconds, boost::xtime& xt) { int res = 0; res = boost::xtime_get(&xt, boost::TIME_UTC_); BOOST_ASSERT(res == boost::TIME_UTC_); (void)res; xt.sec += (milliseconds / MILLISECONDS_PER_SECOND); xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) * NANOSECONDS_PER_MILLISECOND); if (xt.nsec >= NANOSECONDS_PER_SECOND) { ++xt.sec; xt.nsec -= NANOSECONDS_PER_SECOND; } } #endif #if defined(BOOST_HAS_PTHREADS) #if defined BOOST_THREAD_USES_DATETIME inline void to_timespec(const boost::xtime& xt, timespec& ts) { ts.tv_sec = static_cast(xt.sec); ts.tv_nsec = static_cast(xt.nsec); if(ts.tv_nsec >= NANOSECONDS_PER_SECOND) { ts.tv_sec += ts.tv_nsec / NANOSECONDS_PER_SECOND; ts.tv_nsec %= NANOSECONDS_PER_SECOND; } } #endif inline void to_time(int milliseconds, timespec& ts) { #if defined BOOST_THREAD_USES_DATETIME boost::xtime xt; to_time(milliseconds, xt); to_timespec(xt, ts); #else ts.tv_sec += (milliseconds / MILLISECONDS_PER_SECOND); ts.tv_nsec += ((milliseconds % MILLISECONDS_PER_SECOND) * NANOSECONDS_PER_MILLISECOND); if (ts.tv_nsec >= NANOSECONDS_PER_SECOND) { ++ts.tv_sec; ts.tv_nsec -= NANOSECONDS_PER_SECOND; } #endif } #if defined BOOST_THREAD_USES_DATETIME inline void to_timespec_duration(const boost::xtime& xt, timespec& ts) { boost::xtime cur; int res = 0; res = boost::xtime_get(&cur, boost::TIME_UTC_); BOOST_ASSERT(res == boost::TIME_UTC_); (void)res; if (boost::xtime_cmp(xt, cur) <= 0) { ts.tv_sec = 0; ts.tv_nsec = 0; } else { ts.tv_sec = xt.sec - cur.sec; ts.tv_nsec = xt.nsec - cur.nsec; if( ts.tv_nsec < 0 ) { ts.tv_sec -= 1; ts.tv_nsec += NANOSECONDS_PER_SECOND; } if(ts.tv_nsec >= NANOSECONDS_PER_SECOND) { ts.tv_sec += ts.tv_nsec / NANOSECONDS_PER_SECOND; ts.tv_nsec %= NANOSECONDS_PER_SECOND; } } } #endif #endif #if defined BOOST_THREAD_USES_DATETIME inline void to_duration(boost::xtime xt, int& milliseconds) { boost::xtime cur; int res = 0; res = boost::xtime_get(&cur, boost::TIME_UTC_); BOOST_ASSERT(res == boost::TIME_UTC_); (void)res; if (boost::xtime_cmp(xt, cur) <= 0) milliseconds = 0; else { if (cur.nsec > xt.nsec) { xt.nsec += NANOSECONDS_PER_SECOND; --xt.sec; } milliseconds = (int)((xt.sec - cur.sec) * MILLISECONDS_PER_SECOND) + (((xt.nsec - cur.nsec) + (NANOSECONDS_PER_MILLISECOND/2)) / NANOSECONDS_PER_MILLISECOND); } } inline void to_microduration(boost::xtime xt, int& microseconds) { boost::xtime cur; int res = 0; res = boost::xtime_get(&cur, boost::TIME_UTC_); BOOST_ASSERT(res == boost::TIME_UTC_); (void)res; if (boost::xtime_cmp(xt, cur) <= 0) microseconds = 0; else { if (cur.nsec > xt.nsec) { xt.nsec += NANOSECONDS_PER_SECOND; --xt.sec; } microseconds = (int)((xt.sec - cur.sec) * MICROSECONDS_PER_SECOND) + (((xt.nsec - cur.nsec) + (NANOSECONDS_PER_MICROSECOND/2)) / NANOSECONDS_PER_MICROSECOND); } } #endif } // Change Log: // 1 Jun 01 Initial creation. passenger-4.0.37/ext/boost/libs/system/src/000755 000765 000024 00000000000 12233035540 021206 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/libs/system/src/error_code.cpp000644 000765 000024 00000047347 12233035540 024054 0ustar00honglistaff000000 000000 // error_code support implementation file ----------------------------------// // Copyright Beman Dawes 2002, 2006 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See library home page at http://www.boost.org/libs/system //----------------------------------------------------------------------------// #include // define BOOST_SYSTEM_SOURCE so that knows // the library is being built (possibly exporting rather than importing code) #define BOOST_SYSTEM_SOURCE #include #include #include #include #include #include #include // for strerror/strerror_r # if defined( BOOST_WINDOWS_API ) # include # include "local_free_on_destruction.hpp" # ifndef ERROR_INCORRECT_SIZE # define ERROR_INCORRECT_SIZE ERROR_BAD_ARGUMENTS # endif # endif //----------------------------------------------------------------------------// namespace boost { namespace system { namespace { // standard error categories ---------------------------------------------// class generic_error_category : public error_category { public: generic_error_category(){} const char * name() const BOOST_SYSTEM_NOEXCEPT; std::string message( int ev ) const; }; class system_error_category : public error_category { public: system_error_category(){} const char * name() const BOOST_SYSTEM_NOEXCEPT; std::string message( int ev ) const; error_condition default_error_condition( int ev ) const BOOST_SYSTEM_NOEXCEPT; }; // generic_error_category implementation ---------------------------------// const char * generic_error_category::name() const BOOST_SYSTEM_NOEXCEPT { return "generic"; } std::string generic_error_category::message( int ev ) const { using namespace boost::system::errc; #if defined(__PGI) using boost::system::errc::invalid_argument; #endif static std::string unknown_err( "Unknown error" ); // strerror_r is preferred because it is always thread safe, // however, we fallback to strerror in certain cases because: // -- Windows doesn't provide strerror_r. // -- HP and Sun do provide strerror_r on newer systems, but there is // no way to tell if is available at runtime and in any case their // versions of strerror are thread safe anyhow. // -- Linux only sometimes provides strerror_r. // -- Tru64 provides strerror_r only when compiled -pthread. // -- VMS doesn't provide strerror_r, but on this platform, strerror is // thread safe. # if defined(BOOST_WINDOWS_API) || defined(__hpux) || defined(__sun)\ || (defined(__linux) && (!defined(__USE_XOPEN2K) || defined(BOOST_SYSTEM_USE_STRERROR)))\ || (defined(__osf__) && !defined(_REENTRANT))\ || (defined(__INTEGRITY))\ || (defined(__vms))\ || (defined(__QNXNTO__)) const char * c_str = std::strerror( ev ); return c_str ? std::string( c_str ) : unknown_err; # else // use strerror_r char buf[64]; char * bp = buf; std::size_t sz = sizeof(buf); # if defined(__CYGWIN__) || defined(__USE_GNU) // Oddball version of strerror_r const char * c_str = strerror_r( ev, bp, sz ); return c_str ? std::string( c_str ) : unknown_err; # else // POSIX version of strerror_r int result; for (;;) { // strerror_r returns 0 on success, otherwise ERANGE if buffer too small, // invalid_argument if ev not a valid error number # if defined (__sgi) const char * c_str = strerror( ev ); result = 0; return c_str ? std::string( c_str ) : unknown_err; # else result = strerror_r( ev, bp, sz ); # endif if (result == 0 ) break; else { # if defined(__linux) // Linux strerror_r returns -1 on error, with error number in errno result = errno; # endif if ( result != ERANGE ) break; if ( sz > sizeof(buf) ) std::free( bp ); sz *= 2; if ( (bp = static_cast(std::malloc( sz ))) == 0 ) return std::string( "ENOMEM" ); } } std::string msg; # ifndef BOOST_NO_EXCEPTIONS try # endif { msg = ( ( result == invalid_argument ) ? "Unknown error" : bp ); } # ifndef BOOST_NO_EXCEPTIONS // See ticket #2098 catch(...) { // just eat the exception } # endif if ( sz > sizeof(buf) ) std::free( bp ); sz = 0; return msg; # endif // else POSIX version of strerror_r # endif // else use strerror_r } // system_error_category implementation --------------------------------// const char * system_error_category::name() const BOOST_SYSTEM_NOEXCEPT { return "system"; } error_condition system_error_category::default_error_condition( int ev ) const BOOST_SYSTEM_NOEXCEPT { using namespace boost::system::errc; #if defined(__PGI) using boost::system::errc::invalid_argument; #endif switch ( ev ) { case 0: return make_error_condition( success ); # if defined(BOOST_POSIX_API) // POSIX-like O/S -> posix_errno decode table ---------------------------// case E2BIG: return make_error_condition( argument_list_too_long ); case EACCES: return make_error_condition( permission_denied ); case EADDRINUSE: return make_error_condition( address_in_use ); case EADDRNOTAVAIL: return make_error_condition( address_not_available ); case EAFNOSUPPORT: return make_error_condition( address_family_not_supported ); case EAGAIN: return make_error_condition( resource_unavailable_try_again ); # if EALREADY != EBUSY // EALREADY and EBUSY are the same on QNX Neutrino case EALREADY: return make_error_condition( connection_already_in_progress ); # endif case EBADF: return make_error_condition( bad_file_descriptor ); case EBADMSG: return make_error_condition( bad_message ); case EBUSY: return make_error_condition( device_or_resource_busy ); case ECANCELED: return make_error_condition( operation_canceled ); case ECHILD: return make_error_condition( no_child_process ); case ECONNABORTED: return make_error_condition( connection_aborted ); case ECONNREFUSED: return make_error_condition( connection_refused ); case ECONNRESET: return make_error_condition( connection_reset ); case EDEADLK: return make_error_condition( resource_deadlock_would_occur ); case EDESTADDRREQ: return make_error_condition( destination_address_required ); case EDOM: return make_error_condition( argument_out_of_domain ); case EEXIST: return make_error_condition( file_exists ); case EFAULT: return make_error_condition( bad_address ); case EFBIG: return make_error_condition( file_too_large ); case EHOSTUNREACH: return make_error_condition( host_unreachable ); case EIDRM: return make_error_condition( identifier_removed ); case EILSEQ: return make_error_condition( illegal_byte_sequence ); case EINPROGRESS: return make_error_condition( operation_in_progress ); case EINTR: return make_error_condition( interrupted ); case EINVAL: return make_error_condition( invalid_argument ); case EIO: return make_error_condition( io_error ); case EISCONN: return make_error_condition( already_connected ); case EISDIR: return make_error_condition( is_a_directory ); case ELOOP: return make_error_condition( too_many_symbolic_link_levels ); case EMFILE: return make_error_condition( too_many_files_open ); case EMLINK: return make_error_condition( too_many_links ); case EMSGSIZE: return make_error_condition( message_size ); case ENAMETOOLONG: return make_error_condition( filename_too_long ); case ENETDOWN: return make_error_condition( network_down ); case ENETRESET: return make_error_condition( network_reset ); case ENETUNREACH: return make_error_condition( network_unreachable ); case ENFILE: return make_error_condition( too_many_files_open_in_system ); case ENOBUFS: return make_error_condition( no_buffer_space ); case ENODATA: return make_error_condition( no_message_available ); case ENODEV: return make_error_condition( no_such_device ); case ENOENT: return make_error_condition( no_such_file_or_directory ); case ENOEXEC: return make_error_condition( executable_format_error ); case ENOLCK: return make_error_condition( no_lock_available ); case ENOLINK: return make_error_condition( no_link ); case ENOMEM: return make_error_condition( not_enough_memory ); case ENOMSG: return make_error_condition( no_message ); case ENOPROTOOPT: return make_error_condition( no_protocol_option ); case ENOSPC: return make_error_condition( no_space_on_device ); case ENOSR: return make_error_condition( no_stream_resources ); case ENOSTR: return make_error_condition( not_a_stream ); case ENOSYS: return make_error_condition( function_not_supported ); case ENOTCONN: return make_error_condition( not_connected ); case ENOTDIR: return make_error_condition( not_a_directory ); # if ENOTEMPTY != EEXIST // AIX treats ENOTEMPTY and EEXIST as the same value case ENOTEMPTY: return make_error_condition( directory_not_empty ); # endif // ENOTEMPTY != EEXIST # if ENOTRECOVERABLE != ECONNRESET // the same on some Broadcom chips case ENOTRECOVERABLE: return make_error_condition( state_not_recoverable ); # endif // ENOTRECOVERABLE != ECONNRESET case ENOTSOCK: return make_error_condition( not_a_socket ); case ENOTSUP: return make_error_condition( not_supported ); case ENOTTY: return make_error_condition( inappropriate_io_control_operation ); case ENXIO: return make_error_condition( no_such_device_or_address ); # if EOPNOTSUPP != ENOTSUP case EOPNOTSUPP: return make_error_condition( operation_not_supported ); # endif // EOPNOTSUPP != ENOTSUP case EOVERFLOW: return make_error_condition( value_too_large ); # if EOWNERDEAD != ECONNABORTED // the same on some Broadcom chips case EOWNERDEAD: return make_error_condition( owner_dead ); # endif // EOWNERDEAD != ECONNABORTED case EPERM: return make_error_condition( operation_not_permitted ); case EPIPE: return make_error_condition( broken_pipe ); case EPROTO: return make_error_condition( protocol_error ); case EPROTONOSUPPORT: return make_error_condition( protocol_not_supported ); case EPROTOTYPE: return make_error_condition( wrong_protocol_type ); case ERANGE: return make_error_condition( result_out_of_range ); case EROFS: return make_error_condition( read_only_file_system ); case ESPIPE: return make_error_condition( invalid_seek ); case ESRCH: return make_error_condition( no_such_process ); case ETIME: return make_error_condition( stream_timeout ); case ETIMEDOUT: return make_error_condition( timed_out ); case ETXTBSY: return make_error_condition( text_file_busy ); # if EAGAIN != EWOULDBLOCK case EWOULDBLOCK: return make_error_condition( operation_would_block ); # endif // EAGAIN != EWOULDBLOCK case EXDEV: return make_error_condition( cross_device_link ); #else // Windows system -> posix_errno decode table ---------------------------// // see WinError.h comments for descriptions of errors case ERROR_ACCESS_DENIED: return make_error_condition( permission_denied ); case ERROR_ALREADY_EXISTS: return make_error_condition( file_exists ); case ERROR_BAD_UNIT: return make_error_condition( no_such_device ); case ERROR_BUFFER_OVERFLOW: return make_error_condition( filename_too_long ); case ERROR_BUSY: return make_error_condition( device_or_resource_busy ); case ERROR_BUSY_DRIVE: return make_error_condition( device_or_resource_busy ); case ERROR_CANNOT_MAKE: return make_error_condition( permission_denied ); case ERROR_CANTOPEN: return make_error_condition( io_error ); case ERROR_CANTREAD: return make_error_condition( io_error ); case ERROR_CANTWRITE: return make_error_condition( io_error ); case ERROR_CURRENT_DIRECTORY: return make_error_condition( permission_denied ); case ERROR_DEV_NOT_EXIST: return make_error_condition( no_such_device ); case ERROR_DEVICE_IN_USE: return make_error_condition( device_or_resource_busy ); case ERROR_DIR_NOT_EMPTY: return make_error_condition( directory_not_empty ); case ERROR_DIRECTORY: return make_error_condition( invalid_argument ); // WinError.h: "The directory name is invalid" case ERROR_DISK_FULL: return make_error_condition( no_space_on_device ); case ERROR_FILE_EXISTS: return make_error_condition( file_exists ); case ERROR_FILE_NOT_FOUND: return make_error_condition( no_such_file_or_directory ); case ERROR_HANDLE_DISK_FULL: return make_error_condition( no_space_on_device ); case ERROR_INVALID_ACCESS: return make_error_condition( permission_denied ); case ERROR_INVALID_DRIVE: return make_error_condition( no_such_device ); case ERROR_INVALID_FUNCTION: return make_error_condition( function_not_supported ); case ERROR_INVALID_HANDLE: return make_error_condition( invalid_argument ); case ERROR_INVALID_NAME: return make_error_condition( invalid_argument ); case ERROR_LOCK_VIOLATION: return make_error_condition( no_lock_available ); case ERROR_LOCKED: return make_error_condition( no_lock_available ); case ERROR_NEGATIVE_SEEK: return make_error_condition( invalid_argument ); case ERROR_NOACCESS: return make_error_condition( permission_denied ); case ERROR_NOT_ENOUGH_MEMORY: return make_error_condition( not_enough_memory ); case ERROR_NOT_READY: return make_error_condition( resource_unavailable_try_again ); case ERROR_NOT_SAME_DEVICE: return make_error_condition( cross_device_link ); case ERROR_OPEN_FAILED: return make_error_condition( io_error ); case ERROR_OPEN_FILES: return make_error_condition( device_or_resource_busy ); case ERROR_OPERATION_ABORTED: return make_error_condition( operation_canceled ); case ERROR_OUTOFMEMORY: return make_error_condition( not_enough_memory ); case ERROR_PATH_NOT_FOUND: return make_error_condition( no_such_file_or_directory ); case ERROR_READ_FAULT: return make_error_condition( io_error ); case ERROR_RETRY: return make_error_condition( resource_unavailable_try_again ); case ERROR_SEEK: return make_error_condition( io_error ); case ERROR_SHARING_VIOLATION: return make_error_condition( permission_denied ); case ERROR_TOO_MANY_OPEN_FILES: return make_error_condition( too_many_files_open ); case ERROR_WRITE_FAULT: return make_error_condition( io_error ); case ERROR_WRITE_PROTECT: return make_error_condition( permission_denied ); case WSAEACCES: return make_error_condition( permission_denied ); case WSAEADDRINUSE: return make_error_condition( address_in_use ); case WSAEADDRNOTAVAIL: return make_error_condition( address_not_available ); case WSAEAFNOSUPPORT: return make_error_condition( address_family_not_supported ); case WSAEALREADY: return make_error_condition( connection_already_in_progress ); case WSAEBADF: return make_error_condition( bad_file_descriptor ); case WSAECONNABORTED: return make_error_condition( connection_aborted ); case WSAECONNREFUSED: return make_error_condition( connection_refused ); case WSAECONNRESET: return make_error_condition( connection_reset ); case WSAEDESTADDRREQ: return make_error_condition( destination_address_required ); case WSAEFAULT: return make_error_condition( bad_address ); case WSAEHOSTUNREACH: return make_error_condition( host_unreachable ); case WSAEINPROGRESS: return make_error_condition( operation_in_progress ); case WSAEINTR: return make_error_condition( interrupted ); case WSAEINVAL: return make_error_condition( invalid_argument ); case WSAEISCONN: return make_error_condition( already_connected ); case WSAEMFILE: return make_error_condition( too_many_files_open ); case WSAEMSGSIZE: return make_error_condition( message_size ); case WSAENAMETOOLONG: return make_error_condition( filename_too_long ); case WSAENETDOWN: return make_error_condition( network_down ); case WSAENETRESET: return make_error_condition( network_reset ); case WSAENETUNREACH: return make_error_condition( network_unreachable ); case WSAENOBUFS: return make_error_condition( no_buffer_space ); case WSAENOPROTOOPT: return make_error_condition( no_protocol_option ); case WSAENOTCONN: return make_error_condition( not_connected ); case WSAENOTSOCK: return make_error_condition( not_a_socket ); case WSAEOPNOTSUPP: return make_error_condition( operation_not_supported ); case WSAEPROTONOSUPPORT: return make_error_condition( protocol_not_supported ); case WSAEPROTOTYPE: return make_error_condition( wrong_protocol_type ); case WSAETIMEDOUT: return make_error_condition( timed_out ); case WSAEWOULDBLOCK: return make_error_condition( operation_would_block ); #endif default: return error_condition( ev, system_category() ); } } # if !defined( BOOST_WINDOWS_API ) std::string system_error_category::message( int ev ) const { return generic_category().message( ev ); } # else std::string system_error_category::message( int ev ) const { # ifndef BOOST_NO_ANSI_APIS LPVOID lpMsgBuf = 0; DWORD retval = ::FormatMessageA( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, ev, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language (LPSTR) &lpMsgBuf, 0, NULL ); detail::local_free_on_destruction lfod(lpMsgBuf); if (retval == 0) return std::string("Unknown error"); std::string str( static_cast(lpMsgBuf) ); # else // WinCE workaround LPVOID lpMsgBuf = 0; DWORD retval = ::FormatMessageW( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, ev, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language (LPWSTR) &lpMsgBuf, 0, NULL ); detail::local_free_on_destruction lfod(lpMsgBuf); if (retval == 0) return std::string("Unknown error"); int num_chars = (wcslen( static_cast(lpMsgBuf) ) + 1) * 2; LPSTR narrow_buffer = (LPSTR)_alloca( num_chars ); if (::WideCharToMultiByte(CP_ACP, 0, static_cast(lpMsgBuf), -1, narrow_buffer, num_chars, NULL, NULL) == 0) return std::string("Unknown error"); std::string str( narrow_buffer ); # endif while ( str.size() && (str[str.size()-1] == '\n' || str[str.size()-1] == '\r') ) str.erase( str.size()-1 ); if ( str.size() && str[str.size()-1] == '.' ) { str.erase( str.size()-1 ); } return str; } # endif } // unnamed namespace # ifndef BOOST_SYSTEM_NO_DEPRECATED BOOST_SYSTEM_DECL error_code throws; // "throw on error" special error_code; // note that it doesn't matter if this // isn't initialized before use since // the only use is to take its // address for comparison purposes # endif BOOST_SYSTEM_DECL const error_category & system_category() BOOST_SYSTEM_NOEXCEPT { static const system_error_category system_category_const; return system_category_const; } BOOST_SYSTEM_DECL const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT { static const generic_error_category generic_category_const; return generic_category_const; } } // namespace system } // namespace boost passenger-4.0.37/ext/boost/libs/system/src/local_free_on_destruction.hpp000644 000765 000024 00000002075 12233035540 027135 0ustar00honglistaff000000 000000 // local_free_on_exit.hpp ------------------------------------------------------------// // Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2010 Beman Dawes // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // This is derived from boost/asio/detail/local_free_on_block_exit.hpp to avoid // a dependency on asio. Thanks to Chris Kohlhoff for pointing it out. #ifndef BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP #define BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP namespace boost { namespace system { namespace detail { class local_free_on_destruction { public: explicit local_free_on_destruction(void* p) : p_(p) {} ~local_free_on_destruction() { ::LocalFree(p_); } private: void* p_; local_free_on_destruction(const local_free_on_destruction&); // = deleted local_free_on_destruction& operator=(const local_free_on_destruction&); // = deleted }; } // namespace detail } // namespace system } // namespace boost #endif // BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP passenger-4.0.37/ext/boost/libs/regex/src/000755 000765 000024 00000000000 12233035540 020774 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/libs/regex/src/c_regex_traits.cpp000644 000765 000024 00000014156 12233035540 024511 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: c_regex_traits.cpp * VERSION: see * DESCRIPTION: Implements out of line c_regex_traits members */ #define BOOST_REGEX_SOURCE #include #include #include "internals.hpp" #if !BOOST_WORKAROUND(__BORLANDC__, < 0x560) #include #include #include #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::strxfrm; using ::isspace; using ::ispunct; using ::isalpha; using ::isalnum; using ::iscntrl; using ::isprint; using ::isupper; using ::islower; using ::isdigit; using ::isxdigit; using ::strtol; } #endif #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif namespace boost{ c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::transform(const char* p1, const char* p2) { std::string result(10, ' '); std::size_t s = result.size(); std::size_t r; std::string src(p1, p2); while(s < (r = std::strxfrm(&*result.begin(), src.c_str(), s))) { result.append(r - s + 3, ' '); s = result.size(); } result.erase(r); return result; } c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::transform_primary(const char* p1, const char* p2) { static char s_delim; static const int s_collate_type = ::boost::re_detail::find_sort_syntax(static_cast*>(0), &s_delim); std::string result; // // What we do here depends upon the format of the sort key returned by // sort key returned by this->transform: // switch(s_collate_type) { case ::boost::re_detail::sort_C: case ::boost::re_detail::sort_unknown: // the best we can do is translate to lower case, then get a regular sort key: { result.assign(p1, p2); for(std::string::size_type i = 0; i < result.size(); ++i) result[i] = static_cast((std::tolower)(static_cast(result[i]))); result = transform(&*result.begin(), &*result.begin() + result.size()); break; } case ::boost::re_detail::sort_fixed: { // get a regular sort key, and then truncate it: result = transform(p1, p2); result.erase(s_delim); break; } case ::boost::re_detail::sort_delim: // get a regular sort key, and then truncate everything after the delim: result = transform(p1, p2); if(result.size() && (result[0] == s_delim)) break; std::size_t i; for(i = 0; i < result.size(); ++i) { if(result[i] == s_delim) break; } result.erase(i); break; } if(result.empty()) result = std::string(1, char(0)); return result; } c_regex_traits::char_class_type BOOST_REGEX_CALL c_regex_traits::lookup_classname(const char* p1, const char* p2) { static const char_class_type masks[] = { 0, char_class_alnum, char_class_alpha, char_class_blank, char_class_cntrl, char_class_digit, char_class_digit, char_class_graph, char_class_horizontal, char_class_lower, char_class_lower, char_class_print, char_class_punct, char_class_space, char_class_space, char_class_upper, char_class_unicode, char_class_upper, char_class_vertical, char_class_alnum | char_class_word, char_class_alnum | char_class_word, char_class_xdigit, }; int idx = ::boost::re_detail::get_default_class_id(p1, p2); if(idx < 0) { std::string s(p1, p2); for(std::string::size_type i = 0; i < s.size(); ++i) s[i] = static_cast((std::tolower)(static_cast(s[i]))); idx = ::boost::re_detail::get_default_class_id(&*s.begin(), &*s.begin() + s.size()); } BOOST_ASSERT(std::size_t(idx+1) < sizeof(masks) / sizeof(masks[0])); return masks[idx+1]; } bool BOOST_REGEX_CALL c_regex_traits::isctype(char c, char_class_type mask) { return ((mask & char_class_space) && (std::isspace)(static_cast(c))) || ((mask & char_class_print) && (std::isprint)(static_cast(c))) || ((mask & char_class_cntrl) && (std::iscntrl)(static_cast(c))) || ((mask & char_class_upper) && (std::isupper)(static_cast(c))) || ((mask & char_class_lower) && (std::islower)(static_cast(c))) || ((mask & char_class_alpha) && (std::isalpha)(static_cast(c))) || ((mask & char_class_digit) && (std::isdigit)(static_cast(c))) || ((mask & char_class_punct) && (std::ispunct)(static_cast(c))) || ((mask & char_class_xdigit) && (std::isxdigit)(static_cast(c))) || ((mask & char_class_blank) && (std::isspace)(static_cast(c)) && !::boost::re_detail::is_separator(c)) || ((mask & char_class_word) && (c == '_')) || ((mask & char_class_vertical) && (::boost::re_detail::is_separator(c) || (c == '\v'))) || ((mask & char_class_horizontal) && (std::isspace)(static_cast(c)) && !::boost::re_detail::is_separator(c) && (c != '\v')); } c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::lookup_collatename(const char* p1, const char* p2) { std::string s(p1, p2); s = ::boost::re_detail::lookup_default_collate_name(s); if(s.empty() && (p2-p1 == 1)) s.append(1, *p1); return s; } int BOOST_REGEX_CALL c_regex_traits::value(char c, int radix) { char b[2] = { c, '\0', }; char* ep; int result = std::strtol(b, &ep, radix); if(ep == b) return -1; return result; } } #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #endif passenger-4.0.37/ext/boost/libs/regex/src/cpp_regex_traits.cpp000644 000765 000024 00000006052 12233035540 025045 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE cpp_regex_traits.cpp * VERSION see * DESCRIPTION: Implements cpp_regex_traits (and associated helper classes). */ #define BOOST_REGEX_SOURCE #include #ifndef BOOST_NO_STD_LOCALE #include #include #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::memset; } #endif namespace boost{ namespace re_detail{ void cpp_regex_traits_char_layer::init() { // we need to start by initialising our syntax map so we know which // character is used for which purpose: std::memset(m_char_map, 0, sizeof(m_char_map)); #ifndef BOOST_NO_STD_MESSAGES #ifndef __IBMCPP__ std::messages::catalog cat = static_cast::catalog>(-1); #else std::messages::catalog cat = reinterpret_cast::catalog>(-1); #endif std::string cat_name(cpp_regex_traits::get_catalog_name()); if(cat_name.size() && (m_pmessages != 0)) { cat = this->m_pmessages->open( cat_name, this->m_locale); if((int)cat < 0) { std::string m("Unable to open message catalog: "); std::runtime_error err(m + cat_name); boost::re_detail::raise_runtime_error(err); } } // // if we have a valid catalog then load our messages: // if((int)cat >= 0) { #ifndef BOOST_NO_EXCEPTIONS try{ #endif for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i) { string_type mss = this->m_pmessages->get(cat, 0, i, get_default_syntax(i)); for(string_type::size_type j = 0; j < mss.size(); ++j) { m_char_map[static_cast(mss[j])] = i; } } this->m_pmessages->close(cat); #ifndef BOOST_NO_EXCEPTIONS } catch(...) { this->m_pmessages->close(cat); throw; } #endif } else { #endif for(regex_constants::syntax_type j = 1; j < regex_constants::syntax_max; ++j) { const char* ptr = get_default_syntax(j); while(ptr && *ptr) { m_char_map[static_cast(*ptr)] = j; ++ptr; } } #ifndef BOOST_NO_STD_MESSAGES } #endif // // finish off by calculating our escape types: // unsigned char i = 'A'; do { if(m_char_map[i] == 0) { if(this->m_pctype->is(std::ctype_base::lower, i)) m_char_map[i] = regex_constants::escape_type_class; else if(this->m_pctype->is(std::ctype_base::upper, i)) m_char_map[i] = regex_constants::escape_type_not_class; } }while(0xFF != i++); } } // re_detail } // boost #endif passenger-4.0.37/ext/boost/libs/regex/src/cregex.cpp000644 000765 000024 00000037602 12233035540 022765 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: cregex.cpp * VERSION: see * DESCRIPTION: Implements high level class boost::RexEx */ #define BOOST_REGEX_SOURCE #include #include #if !defined(BOOST_NO_STD_STRING) #include #include #include typedef boost::match_flag_type match_flag_type; #include #ifdef BOOST_MSVC #pragma warning(disable:4309) #endif #ifdef BOOST_INTEL #pragma warning(disable:981 383) #endif namespace boost{ #ifdef __BORLANDC__ #if __BORLANDC__ < 0x530 // // we need to instantiate the vector classes we use // since declaring a reference to type doesn't seem to // do the job... std::vector inst1; std::vector inst2; #endif #endif namespace{ template std::string to_string(iterator i, iterator j) { std::string s; while(i != j) { s.append(1, *i); ++i; } return s; } inline std::string to_string(const char* i, const char* j) { return std::string(i, j); } } namespace re_detail{ class RegExData { public: enum type { type_pc, type_pf, type_copy }; regex e; cmatch m; #ifndef BOOST_REGEX_NO_FILEITER match_results fm; #endif type t; const char* pbase; #ifndef BOOST_REGEX_NO_FILEITER mapfile::iterator fbase; #endif std::map > strings; std::map > positions; void update(); void clean(); RegExData() : e(), m(), #ifndef BOOST_REGEX_NO_FILEITER fm(), #endif t(type_copy), pbase(0), #ifndef BOOST_REGEX_NO_FILEITER fbase(), #endif strings(), positions() {} }; void RegExData::update() { strings.erase(strings.begin(), strings.end()); positions.erase(positions.begin(), positions.end()); if(t == type_pc) { for(unsigned int i = 0; i < m.size(); ++i) { if(m[i].matched) strings[i] = std::string(m[i].first, m[i].second); positions[i] = m[i].matched ? m[i].first - pbase : -1; } } #ifndef BOOST_REGEX_NO_FILEITER else { for(unsigned int i = 0; i < fm.size(); ++i) { if(fm[i].matched) strings[i] = to_string(fm[i].first, fm[i].second); positions[i] = fm[i].matched ? fm[i].first - fbase : -1; } } #endif t = type_copy; } void RegExData::clean() { #ifndef BOOST_REGEX_NO_FILEITER fbase = mapfile::iterator(); fm = match_results(); #endif } } // namespace RegEx::RegEx() { pdata = new re_detail::RegExData(); } RegEx::RegEx(const RegEx& o) { pdata = new re_detail::RegExData(*(o.pdata)); } RegEx::~RegEx() { delete pdata; } RegEx::RegEx(const char* c, bool icase) { pdata = new re_detail::RegExData(); SetExpression(c, icase); } RegEx::RegEx(const std::string& s, bool icase) { pdata = new re_detail::RegExData(); SetExpression(s.c_str(), icase); } RegEx& RegEx::operator=(const RegEx& o) { *pdata = *(o.pdata); return *this; } RegEx& RegEx::operator=(const char* p) { SetExpression(p, false); return *this; } unsigned int RegEx::SetExpression(const char* p, bool icase) { boost::uint_fast32_t f = icase ? regex::normal | regex::icase : regex::normal; return pdata->e.set_expression(p, f); } unsigned int RegEx::error_code()const { return pdata->e.error_code(); } std::string RegEx::Expression()const { return pdata->e.expression(); } // // now matching operators: // bool RegEx::Match(const char* p, match_flag_type flags) { pdata->t = re_detail::RegExData::type_pc; pdata->pbase = p; const char* end = p; while(*end)++end; if(regex_match(p, end, pdata->m, pdata->e, flags)) { pdata->update(); return true; } return false; } bool RegEx::Search(const char* p, match_flag_type flags) { pdata->t = re_detail::RegExData::type_pc; pdata->pbase = p; const char* end = p; while(*end)++end; if(regex_search(p, end, pdata->m, pdata->e, flags)) { pdata->update(); return true; } return false; } namespace re_detail{ struct pred1 { GrepCallback cb; RegEx* pe; pred1(GrepCallback c, RegEx* i) : cb(c), pe(i) {} bool operator()(const cmatch& m) { pe->pdata->m = m; return cb(*pe); } }; } unsigned int RegEx::Grep(GrepCallback cb, const char* p, match_flag_type flags) { pdata->t = re_detail::RegExData::type_pc; pdata->pbase = p; const char* end = p; while(*end)++end; unsigned int result = regex_grep(re_detail::pred1(cb, this), p, end, pdata->e, flags); if(result) pdata->update(); return result; } namespace re_detail{ struct pred2 { std::vector& v; RegEx* pe; pred2(std::vector& o, RegEx* e) : v(o), pe(e) {} bool operator()(const cmatch& m) { pe->pdata->m = m; v.push_back(std::string(m[0].first, m[0].second)); return true; } private: pred2& operator=(const pred2&); }; } unsigned int RegEx::Grep(std::vector& v, const char* p, match_flag_type flags) { pdata->t = re_detail::RegExData::type_pc; pdata->pbase = p; const char* end = p; while(*end)++end; unsigned int result = regex_grep(re_detail::pred2(v, this), p, end, pdata->e, flags); if(result) pdata->update(); return result; } namespace re_detail{ struct pred3 { std::vector& v; const char* base; RegEx* pe; pred3(std::vector& o, const char* pb, RegEx* p) : v(o), base(pb), pe(p) {} bool operator()(const cmatch& m) { pe->pdata->m = m; v.push_back(static_cast(m[0].first - base)); return true; } private: pred3& operator=(const pred3&); }; } unsigned int RegEx::Grep(std::vector& v, const char* p, match_flag_type flags) { pdata->t = re_detail::RegExData::type_pc; pdata->pbase = p; const char* end = p; while(*end)++end; unsigned int result = regex_grep(re_detail::pred3(v, p, this), p, end, pdata->e, flags); if(result) pdata->update(); return result; } #ifndef BOOST_REGEX_NO_FILEITER namespace re_detail{ struct pred4 { GrepFileCallback cb; RegEx* pe; const char* file; bool ok; pred4(GrepFileCallback c, RegEx* i, const char* f) : cb(c), pe(i), file(f), ok(true) {} bool operator()(const match_results& m) { pe->pdata->t = RegExData::type_pf; pe->pdata->fm = m; pe->pdata->update(); ok = cb(file, *pe); return ok; } }; } namespace{ void BuildFileList(std::list* pl, const char* files, bool recurse) { file_iterator start(files); file_iterator end; if(recurse) { // go through sub directories: char buf[MAX_PATH]; re_detail::overflow_error_if_not_zero(re_detail::strcpy_s(buf, MAX_PATH, start.root())); if(*buf == 0) { re_detail::overflow_error_if_not_zero(re_detail::strcpy_s(buf, MAX_PATH, ".")); re_detail::overflow_error_if_not_zero(re_detail::strcat_s(buf, MAX_PATH, directory_iterator::separator())); re_detail::overflow_error_if_not_zero(re_detail::strcat_s(buf, MAX_PATH, "*")); } else { re_detail::overflow_error_if_not_zero(re_detail::strcat_s(buf, MAX_PATH, directory_iterator::separator())); re_detail::overflow_error_if_not_zero(re_detail::strcat_s(buf, MAX_PATH, "*")); } directory_iterator dstart(buf); directory_iterator dend; // now get the file mask bit of "files": const char* ptr = files; while(*ptr) ++ptr; while((ptr != files) && (*ptr != *directory_iterator::separator()) && (*ptr != '/'))--ptr; if(ptr != files) ++ptr; while(dstart != dend) { // Verify that sprintf will not overflow: if(std::strlen(dstart.path()) + std::strlen(directory_iterator::separator()) + std::strlen(ptr) >= MAX_PATH) { // Oops overflow, skip this item: ++dstart; continue; } #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE) int r = (::sprintf_s)(buf, sizeof(buf), "%s%s%s", dstart.path(), directory_iterator::separator(), ptr); #else int r = (std::sprintf)(buf, "%s%s%s", dstart.path(), directory_iterator::separator(), ptr); #endif if(r < 0) { // sprintf failed, skip this item: ++dstart; continue; } BuildFileList(pl, buf, recurse); ++dstart; } } while(start != end) { pl->push_back(*start); ++start; } } } unsigned int RegEx::GrepFiles(GrepFileCallback cb, const char* files, bool recurse, match_flag_type flags) { unsigned int result = 0; std::list file_list; BuildFileList(&file_list, files, recurse); std::list::iterator start, end; start = file_list.begin(); end = file_list.end(); while(start != end) { mapfile map((*start).c_str()); pdata->t = re_detail::RegExData::type_pf; pdata->fbase = map.begin(); re_detail::pred4 pred(cb, this, (*start).c_str()); int r = regex_grep(pred, map.begin(), map.end(), pdata->e, flags); result += r; ++start; pdata->clean(); if(pred.ok == false) return result; } return result; } unsigned int RegEx::FindFiles(FindFilesCallback cb, const char* files, bool recurse, match_flag_type flags) { unsigned int result = 0; std::list file_list; BuildFileList(&file_list, files, recurse); std::list::iterator start, end; start = file_list.begin(); end = file_list.end(); while(start != end) { mapfile map((*start).c_str()); pdata->t = re_detail::RegExData::type_pf; pdata->fbase = map.begin(); if(regex_search(map.begin(), map.end(), pdata->fm, pdata->e, flags)) { ++result; if(false == cb((*start).c_str())) return result; } //pdata->update(); ++start; //pdata->clean(); } return result; } #endif #ifdef BOOST_REGEX_V3 #define regex_replace regex_merge #endif std::string RegEx::Merge(const std::string& in, const std::string& fmt, bool copy, match_flag_type flags) { std::string result; re_detail::string_out_iterator i(result); if(!copy) flags |= format_no_copy; regex_replace(i, in.begin(), in.end(), pdata->e, fmt.c_str(), flags); return result; } std::string RegEx::Merge(const char* in, const char* fmt, bool copy, match_flag_type flags) { std::string result; if(!copy) flags |= format_no_copy; re_detail::string_out_iterator i(result); regex_replace(i, in, in + std::strlen(in), pdata->e, fmt, flags); return result; } std::size_t RegEx::Split(std::vector& v, std::string& s, match_flag_type flags, unsigned max_count) { return regex_split(std::back_inserter(v), s, pdata->e, flags, max_count); } // // now operators for returning what matched in more detail: // std::size_t RegEx::Position(int i)const { switch(pdata->t) { case re_detail::RegExData::type_pc: return pdata->m[i].matched ? pdata->m[i].first - pdata->pbase : RegEx::npos; #ifndef BOOST_REGEX_NO_FILEITER case re_detail::RegExData::type_pf: return pdata->fm[i].matched ? pdata->fm[i].first - pdata->fbase : RegEx::npos; #endif case re_detail::RegExData::type_copy: { std::map >::iterator pos = pdata->positions.find(i); if(pos == pdata->positions.end()) return RegEx::npos; return (*pos).second; } } return RegEx::npos; } std::size_t RegEx::Marks()const { return pdata->e.mark_count(); } std::size_t RegEx::Length(int i)const { switch(pdata->t) { case re_detail::RegExData::type_pc: return pdata->m[i].matched ? pdata->m[i].second - pdata->m[i].first : RegEx::npos; #ifndef BOOST_REGEX_NO_FILEITER case re_detail::RegExData::type_pf: return pdata->fm[i].matched ? pdata->fm[i].second - pdata->fm[i].first : RegEx::npos; #endif case re_detail::RegExData::type_copy: { std::map >::iterator pos = pdata->strings.find(i); if(pos == pdata->strings.end()) return RegEx::npos; return (*pos).second.size(); } } return RegEx::npos; } bool RegEx::Matched(int i)const { switch(pdata->t) { case re_detail::RegExData::type_pc: return pdata->m[i].matched; #ifndef BOOST_REGEX_NO_FILEITER case re_detail::RegExData::type_pf: return pdata->fm[i].matched; #endif case re_detail::RegExData::type_copy: { std::map >::iterator pos = pdata->strings.find(i); if(pos == pdata->strings.end()) return false; return true; } } return false; } std::string RegEx::What(int i)const { std::string result; switch(pdata->t) { case re_detail::RegExData::type_pc: if(pdata->m[i].matched) result.assign(pdata->m[i].first, pdata->m[i].second); break; case re_detail::RegExData::type_pf: if(pdata->m[i].matched) result.assign(to_string(pdata->m[i].first, pdata->m[i].second)); break; case re_detail::RegExData::type_copy: { std::map >::iterator pos = pdata->strings.find(i); if(pos != pdata->strings.end()) result = (*pos).second; break; } } return result; } const std::size_t RegEx::npos = ~static_cast(0); } // namespace boost #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) && (__BORLANDC__ <= 0x551) && !defined(_RWSTD_COMPILE_INSTANTIATE) // // this is an ugly hack to work around an ugly problem: // by default this file will produce unresolved externals during // linking unless _RWSTD_COMPILE_INSTANTIATE is defined (Borland bug). // However if _RWSTD_COMPILE_INSTANTIATE is defined then we get separate // copies of basic_string's static data in the RTL and this DLL, this messes // with basic_string's memory management and results in run-time crashes, // Oh sweet joy of Catch 22.... // namespace std{ template<> template<> basic_string& BOOST_REGEX_DECL basic_string::replace(char* f1, char* f2, const char* i1, const char* i2) { unsigned insert_pos = f1 - begin(); unsigned remove_len = f2 - f1; unsigned insert_len = i2 - i1; unsigned org_size = size(); if(insert_len > remove_len) { append(insert_len-remove_len, ' '); std::copy_backward(begin() + insert_pos + remove_len, begin() + org_size, end()); std::copy(i1, i2, begin() + insert_pos); } else { std::copy(begin() + insert_pos + remove_len, begin() + org_size, begin() + insert_pos + insert_len); std::copy(i1, i2, begin() + insert_pos); erase(size() + insert_len - remove_len); } return *this; } template<> template<> basic_string& BOOST_REGEX_DECL basic_string::replace(wchar_t* f1, wchar_t* f2, const wchar_t* i1, const wchar_t* i2) { unsigned insert_pos = f1 - begin(); unsigned remove_len = f2 - f1; unsigned insert_len = i2 - i1; unsigned org_size = size(); if(insert_len > remove_len) { append(insert_len-remove_len, ' '); std::copy_backward(begin() + insert_pos + remove_len, begin() + org_size, end()); std::copy(i1, i2, begin() + insert_pos); } else { std::copy(begin() + insert_pos + remove_len, begin() + org_size, begin() + insert_pos + insert_len); std::copy(i1, i2, begin() + insert_pos); erase(size() + insert_len - remove_len); } return *this; } } // namespace std #endif #endif passenger-4.0.37/ext/boost/libs/regex/src/instances.cpp000644 000765 000024 00000001271 12233035540 023470 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: instances.cpp * VERSION: see * DESCRIPTION: regex narrow character template instances. */ #define BOOST_REGEX_SOURCE #include #if !defined(BOOST_REGEX_NO_EXTERNAL_TEMPLATES) #define BOOST_REGEX_NARROW_INSTANTIATE #ifdef __BORLANDC__ #pragma hrdstop #endif #include #endif passenger-4.0.37/ext/boost/libs/regex/src/internals.hpp000644 000765 000024 00000001544 12233035540 023510 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2011 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ #ifndef BOOST_REGEX_SRC_INTERNALS_HPP #define BOOST_REGEX_SRC_INTERNALS_HPP enum { char_class_space=1<<0, char_class_print=1<<1, char_class_cntrl=1<<2, char_class_upper=1<<3, char_class_lower=1<<4, char_class_alpha=1<<5, char_class_digit=1<<6, char_class_punct=1<<7, char_class_xdigit=1<<8, char_class_alnum=char_class_alpha|char_class_digit, char_class_graph=char_class_alnum|char_class_punct, char_class_blank=1<<9, char_class_word=1<<10, char_class_unicode=1<<11, char_class_horizontal=1<<12, char_class_vertical=1<<13 }; #endif // BOOST_REGEX_SRC_INTERNALS_HPP passenger-4.0.37/ext/boost/libs/regex/src/posix_api.cpp000644 000765 000024 00000016022 12233035540 023474 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: posix_api.cpp * VERSION: see * DESCRIPTION: Implements the Posix API wrappers. */ #define BOOST_REGEX_SOURCE #include #include #include #include #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::sprintf; using ::strcpy; using ::strcmp; } #endif namespace boost{ namespace{ unsigned int magic_value = 25631; const char* names[] = { "REG_NOERROR", "REG_NOMATCH", "REG_BADPAT", "REG_ECOLLATE", "REG_ECTYPE", "REG_EESCAPE", "REG_ESUBREG", "REG_EBRACK", "REG_EPAREN", "REG_EBRACE", "REG_BADBR", "REG_ERANGE", "REG_ESPACE", "REG_BADRPT", "REG_EEND", "REG_ESIZE", "REG_ERPAREN", "REG_EMPTY", "REG_ECOMPLEXITY", "REG_ESTACK", "REG_E_PERL", "REG_E_UNKNOWN", }; } // namespace typedef boost::basic_regex > c_regex_type; BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA* expression, const char* ptr, int f) { if(expression->re_magic != magic_value) { expression->guts = 0; #ifndef BOOST_NO_EXCEPTIONS try{ #endif expression->guts = new c_regex_type(); #ifndef BOOST_NO_EXCEPTIONS } catch(...) { return REG_ESPACE; } #else if(0 == expression->guts) return REG_E_MEMORY; #endif } // set default flags: boost::uint_fast32_t flags = (f & REG_PERLEX) ? 0 : ((f & REG_EXTENDED) ? regex::extended : regex::basic); expression->eflags = (f & REG_NEWLINE) ? match_not_dot_newline : match_default; // and translate those that are actually set: if(f & REG_NOCOLLATE) { flags |= regex::nocollate; #ifndef BOOST_REGEX_V3 flags &= ~regex::collate; #endif } if(f & REG_NOSUB) { //expression->eflags |= match_any; flags |= regex::nosubs; } if(f & REG_NOSPEC) flags |= regex::literal; if(f & REG_ICASE) flags |= regex::icase; if(f & REG_ESCAPE_IN_LISTS) flags &= ~regex::no_escape_in_lists; if(f & REG_NEWLINE_ALT) flags |= regex::newline_alt; const char* p2; if(f & REG_PEND) p2 = expression->re_endp; else p2 = ptr + std::strlen(ptr); int result; #ifndef BOOST_NO_EXCEPTIONS try{ #endif expression->re_magic = magic_value; static_cast(expression->guts)->set_expression(ptr, p2, flags); expression->re_nsub = static_cast(expression->guts)->mark_count() - 1; result = static_cast(expression->guts)->error_code(); #ifndef BOOST_NO_EXCEPTIONS } catch(const boost::regex_error& be) { result = be.code(); } catch(...) { result = REG_E_UNKNOWN; } #endif if(result) regfreeA(expression); return result; } BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int code, const regex_tA* e, char* buf, regsize_t buf_size) { std::size_t result = 0; if(code & REG_ITOA) { code &= ~REG_ITOA; if(code <= (int)REG_E_UNKNOWN) { result = std::strlen(names[code]) + 1; if(buf_size >= result) re_detail::strcpy_s(buf, buf_size, names[code]); return result; } return result; } if(code == REG_ATOI) { char localbuf[5]; if(e == 0) return 0; for(int i = 0; i <= (int)REG_E_UNKNOWN; ++i) { if(std::strcmp(e->re_endp, names[i]) == 0) { // // We're converting an integer i to a string, and since i <= REG_E_UNKNOWN // a five character string is *always* large enough: // #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE) int r = (::sprintf_s)(localbuf, 5, "%d", i); #else int r = (std::sprintf)(localbuf, "%d", i); #endif if(r < 0) return 0; // sprintf failed if(std::strlen(localbuf) < buf_size) re_detail::strcpy_s(buf, buf_size, localbuf); return std::strlen(localbuf) + 1; } } #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE) (::sprintf_s)(localbuf, 5, "%d", 0); #else (std::sprintf)(localbuf, "%d", 0); #endif if(std::strlen(localbuf) < buf_size) re_detail::strcpy_s(buf, buf_size, localbuf); return std::strlen(localbuf) + 1; } if(code <= (int)REG_E_UNKNOWN) { std::string p; if((e) && (e->re_magic == magic_value)) p = static_cast(e->guts)->get_traits().error_string(static_cast< ::boost::regex_constants::error_type>(code)); else { p = re_detail::get_default_error_string(static_cast< ::boost::regex_constants::error_type>(code)); } std::size_t len = p.size(); if(len < buf_size) { re_detail::strcpy_s(buf, buf_size, p.c_str()); } return len + 1; } if(buf_size) *buf = 0; return 0; } BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA* expression, const char* buf, regsize_t n, regmatch_t* array, int eflags) { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4267) #endif bool result = false; match_flag_type flags = match_default | expression->eflags; const char* end; const char* start; cmatch m; if(eflags & REG_NOTBOL) flags |= match_not_bol; if(eflags & REG_NOTEOL) flags |= match_not_eol; if(eflags & REG_STARTEND) { start = buf + array[0].rm_so; end = buf + array[0].rm_eo; } else { start = buf; end = buf + std::strlen(buf); } #ifndef BOOST_NO_EXCEPTIONS try{ #endif if(expression->re_magic == magic_value) { result = regex_search(start, end, m, *static_cast(expression->guts), flags); } else return result; #ifndef BOOST_NO_EXCEPTIONS } catch(...) { return REG_E_UNKNOWN; } #endif if(result) { // extract what matched: std::size_t i; for(i = 0; (i < n) && (i < expression->re_nsub + 1); ++i) { array[i].rm_so = (m[i].matched == false) ? -1 : (m[i].first - buf); array[i].rm_eo = (m[i].matched == false) ? -1 : (m[i].second - buf); } // and set anything else to -1: for(i = expression->re_nsub + 1; i < n; ++i) { array[i].rm_so = -1; array[i].rm_eo = -1; } return 0; } return REG_NOMATCH; #ifdef BOOST_MSVC #pragma warning(pop) #endif } BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeA(regex_tA* expression) { if(expression->re_magic == magic_value) { delete static_cast(expression->guts); } expression->re_magic = 0; } } // namespace boost passenger-4.0.37/ext/boost/libs/regex/src/regex.cpp000644 000765 000024 00000012372 12233035540 022617 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: regex.cpp * VERSION: see * DESCRIPTION: Misc boost::regbase member funnctions. */ #define BOOST_REGEX_SOURCE #include #include #include #include #if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && defined(_MSC_VER) && (_MSC_VER >= 1300) # include #endif #ifdef BOOST_REGEX_HAS_MS_STACK_GUARD #define WIN32_LEAN_AND_MEAN #ifndef NOMINMAX # define NOMINMAX #endif #define NOGDI #define NOUSER #include #endif #if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_REGEX_V3) #if BOOST_REGEX_MAX_CACHE_BLOCKS == 0 #include #else #include #endif #endif #ifdef BOOST_INTEL #pragma warning(disable:383) #endif namespace boost{ // // fix: these are declared out of line here to ensure // that dll builds contain the Virtual table for these // types - this ensures that exceptions can be thrown // from the dll and caught in an exe. regex_error::regex_error(const std::string& s, regex_constants::error_type err, std::ptrdiff_t pos) : std::runtime_error(s) , m_error_code(err) , m_position(pos) { } regex_error::regex_error(regex_constants::error_type err) : std::runtime_error(::boost::re_detail::get_default_error_string(err)) , m_error_code(err) , m_position(0) { } regex_error::~regex_error() throw() { } void regex_error::raise()const { #ifndef BOOST_NO_EXCEPTIONS ::boost::throw_exception(*this); #endif } namespace re_detail{ BOOST_REGEX_DECL void BOOST_REGEX_CALL raise_runtime_error(const std::runtime_error& ex) { ::boost::throw_exception(ex); } // // error checking API: // BOOST_REGEX_DECL void BOOST_REGEX_CALL verify_options(boost::regex::flag_type /*ef*/, match_flag_type mf) { #ifndef BOOST_REGEX_V3 // // can't mix match_extra with POSIX matching rules: // if((mf & match_extra) && (mf & match_posix)) { std::logic_error msg("Usage Error: Can't mix regular expression captures with POSIX matching rules"); throw_exception(msg); } #endif } #ifdef BOOST_REGEX_HAS_MS_STACK_GUARD static void execute_eror() { // we only get here after a stack overflow, // this has to be a separate proceedure because we // can't mix __try{}__except block with local objects // that have destructors: reset_stack_guard_page(); std::runtime_error err("Out of stack space, while attempting to match a regular expression."); raise_runtime_error(err); } bool BOOST_REGEX_CALL abstract_protected_call::execute()const { __try{ return this->call(); }__except(EXCEPTION_STACK_OVERFLOW == GetExceptionCode()) { execute_eror(); } // We never really get here at all: return false; } BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page() { #if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && defined(_MSC_VER) && (_MSC_VER >= 1300) _resetstkoflw(); #else // // We need to locate the current page being used by the stack, // move to the page below it and then deallocate and protect // that page. Note that ideally we would protect only the lowest // stack page that has been allocated: in practice there // seems to be no easy way to locate this page, in any case as // long as the next page is protected, then Windows will figure // the rest out for us... // SYSTEM_INFO si; GetSystemInfo(&si); MEMORY_BASIC_INFORMATION mi; DWORD previous_protection_status; // // this is an address in our stack space: // LPBYTE page = (LPBYTE)&page; // // Get the current memory page in use: // VirtualQuery(page, &mi, sizeof(mi)); // // Go to the page one below this: // page = (LPBYTE)(mi.BaseAddress)-si.dwPageSize; // // Free and protect everything from the start of the // allocation range, to the end of the page below the // one in use: // if (!VirtualFree(mi.AllocationBase, (LPBYTE)page - (LPBYTE)mi.AllocationBase, MEM_DECOMMIT) || !VirtualProtect(page, si.dwPageSize, PAGE_GUARD | PAGE_READWRITE, &previous_protection_status)) { throw std::bad_exception(); } #endif } #endif #if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_REGEX_V3) #if BOOST_REGEX_MAX_CACHE_BLOCKS == 0 BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block() { return ::operator new(BOOST_REGEX_BLOCKSIZE); } BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void* p) { ::operator delete(p); } #else #ifdef BOOST_HAS_THREADS mem_block_cache block_cache = { 0, 0, BOOST_STATIC_MUTEX_INIT, }; #else mem_block_cache block_cache = { 0, 0, }; #endif BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block() { return block_cache.get(); } BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void* p) { block_cache.put(p); } #endif #endif } // namespace re_detail } // namespace boost #if defined(BOOST_RE_USE_VCL) && defined(BOOST_REGEX_DYN_LINK) int WINAPI DllEntryPoint(HINSTANCE , unsigned long , void*) { return 1; } #endif passenger-4.0.37/ext/boost/libs/regex/src/regex_debug.cpp000644 000765 000024 00000002760 12233035540 023765 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: regex_debug.cpp * VERSION: see * DESCRIPTION: Misc. debugging helpers. */ #define BOOST_REGEX_SOURCE #include // // regex configuration information: this prints out the settings used // when the library was built - include in debugging builds only: // #ifdef BOOST_REGEX_CONFIG_INFO #define print_macro regex_lib_print_macro #define print_expression regex_lib_print_expression #define print_byte_order regex_lib_print_byte_order #define print_sign regex_lib_print_sign #define print_compiler_macros regex_lib_print_compiler_macros #define print_stdlib_macros regex_lib_print_stdlib_macros #define print_platform_macros regex_lib_print_platform_macros #define print_boost_macros regex_lib_print_boost_macros #define print_separator regex_lib_print_separator #define OLD_MAIN regex_lib_main #define NEW_MAIN regex_lib_main2 #define NO_RECURSE #include BOOST_REGEX_DECL void BOOST_REGEX_CALL print_regex_library_info() { std::cout << "\n\n"; print_separator(); std::cout << "Regex library build configuration:\n\n"; regex_lib_main2(); } #endif passenger-4.0.37/ext/boost/libs/regex/src/regex_raw_buffer.cpp000644 000765 000024 00000003360 12233035540 025016 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_raw_buffer.cpp * VERSION see * DESCRIPTION: Member functions for class raw_storage. */ #define BOOST_REGEX_SOURCE #include #include #include #include #include #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::memcpy; using ::memmove; } #endif namespace boost{ namespace re_detail{ void BOOST_REGEX_CALL raw_storage::resize(size_type n) { register size_type newsize = start ? last - start : 1024; while(newsize < n) newsize *= 2; register size_type datasize = end - start; // extend newsize to WORD/DWORD boundary: newsize = (newsize + padding_mask) & ~(padding_mask); // allocate and copy data: register pointer ptr = static_cast(::operator new(newsize)); BOOST_REGEX_NOEH_ASSERT(ptr) if(start) std::memcpy(ptr, start, datasize); // get rid of old buffer: ::operator delete(start); // and set up pointers: start = ptr; end = ptr + datasize; last = ptr + newsize; } void* BOOST_REGEX_CALL raw_storage::insert(size_type pos, size_type n) { BOOST_ASSERT(pos <= size_type(end - start)); if(size_type(last - end) < n) resize(n + (end - start)); register void* result = start + pos; std::memmove(start + pos + n, start + pos, (end - start) - pos); end += n; return result; } }} // namespaces passenger-4.0.37/ext/boost/libs/regex/src/regex_traits_defaults.cpp000644 000765 000024 00000072606 12233035540 026102 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_traits_defaults.cpp * VERSION see * DESCRIPTION: Declares API's for access to regex_traits default properties. */ #define BOOST_REGEX_SOURCE #include #include #ifndef BOOST_NO_WREGEX #include #endif #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::tolower; using ::toupper; #ifndef BOOST_NO_WREGEX using ::towlower; using ::towupper; #endif } #endif namespace boost{ namespace re_detail{ BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_syntax(regex_constants::syntax_type n) { // if the user hasn't supplied a message catalog, then this supplies // default "messages" for us to load in the range 1-100. const char* messages[] = { "", "(", ")", "$", "^", ".", "*", "+", "?", "[", "]", "|", "\\", "#", "-", "{", "}", "0123456789", "b", "B", "<", ">", "", "", "A`", "z'", "\n", ",", "a", "f", "n", "r", "t", "v", "x", "c", ":", "=", "e", "", "", "", "", "", "", "", "", "E", "Q", "X", "C", "Z", "G", "!", "p", "P", "N", "gk", "K", "R", }; return ((n >= (sizeof(messages) / sizeof(messages[1]))) ? "" : messages[n]); } BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_error_string(regex_constants::error_type n) { static const char* const s_default_error_messages[] = { "Success", /* REG_NOERROR 0 error_ok */ "No match", /* REG_NOMATCH 1 error_no_match */ "Invalid regular expression.", /* REG_BADPAT 2 error_bad_pattern */ "Invalid collation character.", /* REG_ECOLLATE 3 error_collate */ "Invalid character class name, collating name, or character range.", /* REG_ECTYPE 4 error_ctype */ "Invalid or unterminated escape sequence.", /* REG_EESCAPE 5 error_escape */ "Invalid back reference: specified capturing group does not exist.", /* REG_ESUBREG 6 error_backref */ "Unmatched [ or [^ in character class declaration.", /* REG_EBRACK 7 error_brack */ "Unmatched marking parenthesis ( or \\(.", /* REG_EPAREN 8 error_paren */ "Unmatched quantified repeat operator { or \\{.", /* REG_EBRACE 9 error_brace */ "Invalid content of repeat range.", /* REG_BADBR 10 error_badbrace */ "Invalid range end in character class", /* REG_ERANGE 11 error_range */ "Out of memory.", /* REG_ESPACE 12 error_space NOT USED */ "Invalid preceding regular expression prior to repetition operator.", /* REG_BADRPT 13 error_badrepeat */ "Premature end of regular expression", /* REG_EEND 14 error_end NOT USED */ "Regular expression is too large.", /* REG_ESIZE 15 error_size NOT USED */ "Unmatched ) or \\)", /* REG_ERPAREN 16 error_right_paren NOT USED */ "Empty regular expression.", /* REG_EMPTY 17 error_empty */ "The complexity of matching the regular expression exceeded predefined bounds. " "Try refactoring the regular expression to make each choice made by the state machine unambiguous. " "This exception is thrown to prevent \"eternal\" matches that take an " "indefinite period time to locate.", /* REG_ECOMPLEXITY 18 error_complexity */ "Ran out of stack space trying to match the regular expression.", /* REG_ESTACK 19 error_stack */ "Invalid or unterminated Perl (?...) sequence.", /* REG_E_PERL 20 error_perl */ "Unknown error.", /* REG_E_UNKNOWN 21 error_unknown */ }; return (n > ::boost::regex_constants::error_unknown) ? s_default_error_messages[ ::boost::regex_constants::error_unknown] : s_default_error_messages[n]; } BOOST_REGEX_DECL bool BOOST_REGEX_CALL is_combining_implementation(boost::uint_least16_t c) { const boost::uint_least16_t combining_ranges[] = { 0x0300, 0x0361, 0x0483, 0x0486, 0x0903, 0x0903, 0x093E, 0x0940, 0x0949, 0x094C, 0x0982, 0x0983, 0x09BE, 0x09C0, 0x09C7, 0x09CC, 0x09D7, 0x09D7, 0x0A3E, 0x0A40, 0x0A83, 0x0A83, 0x0ABE, 0x0AC0, 0x0AC9, 0x0ACC, 0x0B02, 0x0B03, 0x0B3E, 0x0B3E, 0x0B40, 0x0B40, 0x0B47, 0x0B4C, 0x0B57, 0x0B57, 0x0B83, 0x0B83, 0x0BBE, 0x0BBF, 0x0BC1, 0x0BCC, 0x0BD7, 0x0BD7, 0x0C01, 0x0C03, 0x0C41, 0x0C44, 0x0C82, 0x0C83, 0x0CBE, 0x0CBE, 0x0CC0, 0x0CC4, 0x0CC7, 0x0CCB, 0x0CD5, 0x0CD6, 0x0D02, 0x0D03, 0x0D3E, 0x0D40, 0x0D46, 0x0D4C, 0x0D57, 0x0D57, 0x0F7F, 0x0F7F, 0x20D0, 0x20E1, 0x3099, 0x309A, 0xFE20, 0xFE23, 0xffff, 0xffff, }; const boost::uint_least16_t* p = combining_ranges + 1; while(*p < c) p += 2; --p; if((c >= *p) && (c <= *(p+1))) return true; return false; } // // these are the POSIX collating names: // BOOST_REGEX_DECL const char* def_coll_names[] = { "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "alert", "backspace", "tab", "newline", "vertical-tab", "form-feed", "carriage-return", "SO", "SI", "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "IS4", "IS3", "IS2", "IS1", "space", "exclamation-mark", "quotation-mark", "number-sign", "dollar-sign", "percent-sign", "ampersand", "apostrophe", "left-parenthesis", "right-parenthesis", "asterisk", "plus-sign", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less-than-sign", "equals-sign", "greater-than-sign", "question-mark", "commercial-at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "left-square-bracket", "backslash", "right-square-bracket", "circumflex", "underscore", "grave-accent", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "left-curly-bracket", "vertical-line", "right-curly-bracket", "tilde", "DEL", "", }; // these multi-character collating elements // should keep most Western-European locales // happy - we should really localise these a // little more - but this will have to do for // now: BOOST_REGEX_DECL const char* def_multi_coll[] = { "ae", "Ae", "AE", "ch", "Ch", "CH", "ll", "Ll", "LL", "ss", "Ss", "SS", "nj", "Nj", "NJ", "dz", "Dz", "DZ", "lj", "Lj", "LJ", "", }; BOOST_REGEX_DECL std::string BOOST_REGEX_CALL lookup_default_collate_name(const std::string& name) { unsigned int i = 0; while(*def_coll_names[i]) { if(def_coll_names[i] == name) { return std::string(1, char(i)); } ++i; } i = 0; while(*def_multi_coll[i]) { if(def_multi_coll[i] == name) { return def_multi_coll[i]; } ++i; } return std::string(); } BOOST_REGEX_DECL char BOOST_REGEX_CALL do_global_lower(char c) { return static_cast((std::tolower)((unsigned char)c)); } BOOST_REGEX_DECL char BOOST_REGEX_CALL do_global_upper(char c) { return static_cast((std::toupper)((unsigned char)c)); } #ifndef BOOST_NO_WREGEX BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL do_global_lower(wchar_t c) { return (std::towlower)(c); } BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL do_global_upper(wchar_t c) { return (std::towupper)(c); } #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL do_global_lower(unsigned short c) { return (std::towlower)(c); } BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL do_global_upper(unsigned short c) { return (std::towupper)(c); } #endif #endif BOOST_REGEX_DECL regex_constants::escape_syntax_type BOOST_REGEX_CALL get_default_escape_syntax_type(char c) { // // char_syntax determines how the compiler treats a given character // in a regular expression. // static regex_constants::escape_syntax_type char_syntax[] = { regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /* */ // 32 regex_constants::escape_type_identity, /*!*/ regex_constants::escape_type_identity, /*"*/ regex_constants::escape_type_identity, /*#*/ regex_constants::escape_type_identity, /*$*/ regex_constants::escape_type_identity, /*%*/ regex_constants::escape_type_identity, /*&*/ regex_constants::escape_type_end_buffer, /*'*/ regex_constants::syntax_open_mark, /*(*/ regex_constants::syntax_close_mark, /*)*/ regex_constants::escape_type_identity, /***/ regex_constants::syntax_plus, /*+*/ regex_constants::escape_type_identity, /*,*/ regex_constants::escape_type_identity, /*-*/ regex_constants::escape_type_identity, /*.*/ regex_constants::escape_type_identity, /*/*/ regex_constants::escape_type_decimal, /*0*/ regex_constants::escape_type_backref, /*1*/ regex_constants::escape_type_backref, /*2*/ regex_constants::escape_type_backref, /*3*/ regex_constants::escape_type_backref, /*4*/ regex_constants::escape_type_backref, /*5*/ regex_constants::escape_type_backref, /*6*/ regex_constants::escape_type_backref, /*7*/ regex_constants::escape_type_backref, /*8*/ regex_constants::escape_type_backref, /*9*/ regex_constants::escape_type_identity, /*:*/ regex_constants::escape_type_identity, /*;*/ regex_constants::escape_type_left_word, /*<*/ regex_constants::escape_type_identity, /*=*/ regex_constants::escape_type_right_word, /*>*/ regex_constants::syntax_question, /*?*/ regex_constants::escape_type_identity, /*@*/ regex_constants::escape_type_start_buffer, /*A*/ regex_constants::escape_type_not_word_assert, /*B*/ regex_constants::escape_type_C, /*C*/ regex_constants::escape_type_not_class, /*D*/ regex_constants::escape_type_E, /*E*/ regex_constants::escape_type_not_class, /*F*/ regex_constants::escape_type_G, /*G*/ regex_constants::escape_type_not_class, /*H*/ regex_constants::escape_type_not_class, /*I*/ regex_constants::escape_type_not_class, /*J*/ regex_constants::escape_type_reset_start_mark, /*K*/ regex_constants::escape_type_not_class, /*L*/ regex_constants::escape_type_not_class, /*M*/ regex_constants::escape_type_named_char, /*N*/ regex_constants::escape_type_not_class, /*O*/ regex_constants::escape_type_not_property, /*P*/ regex_constants::escape_type_Q, /*Q*/ regex_constants::escape_type_line_ending, /*R*/ regex_constants::escape_type_not_class, /*S*/ regex_constants::escape_type_not_class, /*T*/ regex_constants::escape_type_not_class, /*U*/ regex_constants::escape_type_not_class, /*V*/ regex_constants::escape_type_not_class, /*W*/ regex_constants::escape_type_X, /*X*/ regex_constants::escape_type_not_class, /*Y*/ regex_constants::escape_type_Z, /*Z*/ regex_constants::escape_type_identity, /*[*/ regex_constants::escape_type_identity, /*\*/ regex_constants::escape_type_identity, /*]*/ regex_constants::escape_type_identity, /*^*/ regex_constants::escape_type_identity, /*_*/ regex_constants::escape_type_start_buffer, /*`*/ regex_constants::escape_type_control_a, /*a*/ regex_constants::escape_type_word_assert, /*b*/ regex_constants::escape_type_ascii_control, /*c*/ regex_constants::escape_type_class, /*d*/ regex_constants::escape_type_e, /*e*/ regex_constants::escape_type_control_f, /*f*/ regex_constants::escape_type_extended_backref, /*g*/ regex_constants::escape_type_class, /*h*/ regex_constants::escape_type_class, /*i*/ regex_constants::escape_type_class, /*j*/ regex_constants::escape_type_extended_backref, /*k*/ regex_constants::escape_type_class, /*l*/ regex_constants::escape_type_class, /*m*/ regex_constants::escape_type_control_n, /*n*/ regex_constants::escape_type_class, /*o*/ regex_constants::escape_type_property, /*p*/ regex_constants::escape_type_class, /*q*/ regex_constants::escape_type_control_r, /*r*/ regex_constants::escape_type_class, /*s*/ regex_constants::escape_type_control_t, /*t*/ regex_constants::escape_type_class, /*u*/ regex_constants::escape_type_control_v, /*v*/ regex_constants::escape_type_class, /*w*/ regex_constants::escape_type_hex, /*x*/ regex_constants::escape_type_class, /*y*/ regex_constants::escape_type_end_buffer, /*z*/ regex_constants::syntax_open_brace, /*{*/ regex_constants::syntax_or, /*|*/ regex_constants::syntax_close_brace, /*}*/ regex_constants::escape_type_identity, /*~*/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ regex_constants::escape_type_identity, /**/ }; return char_syntax[(unsigned char)c]; } BOOST_REGEX_DECL regex_constants::syntax_type BOOST_REGEX_CALL get_default_syntax_type(char c) { // // char_syntax determines how the compiler treats a given character // in a regular expression. // static regex_constants::syntax_type char_syntax[] = { regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_newline, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /* */ // 32 regex_constants::syntax_not, /*!*/ regex_constants::syntax_char, /*"*/ regex_constants::syntax_hash, /*#*/ regex_constants::syntax_dollar, /*$*/ regex_constants::syntax_char, /*%*/ regex_constants::syntax_char, /*&*/ regex_constants::escape_type_end_buffer, /*'*/ regex_constants::syntax_open_mark, /*(*/ regex_constants::syntax_close_mark, /*)*/ regex_constants::syntax_star, /***/ regex_constants::syntax_plus, /*+*/ regex_constants::syntax_comma, /*,*/ regex_constants::syntax_dash, /*-*/ regex_constants::syntax_dot, /*.*/ regex_constants::syntax_char, /*/*/ regex_constants::syntax_digit, /*0*/ regex_constants::syntax_digit, /*1*/ regex_constants::syntax_digit, /*2*/ regex_constants::syntax_digit, /*3*/ regex_constants::syntax_digit, /*4*/ regex_constants::syntax_digit, /*5*/ regex_constants::syntax_digit, /*6*/ regex_constants::syntax_digit, /*7*/ regex_constants::syntax_digit, /*8*/ regex_constants::syntax_digit, /*9*/ regex_constants::syntax_colon, /*:*/ regex_constants::syntax_char, /*;*/ regex_constants::escape_type_left_word, /*<*/ regex_constants::syntax_equal, /*=*/ regex_constants::escape_type_right_word, /*>*/ regex_constants::syntax_question, /*?*/ regex_constants::syntax_char, /*@*/ regex_constants::syntax_char, /*A*/ regex_constants::syntax_char, /*B*/ regex_constants::syntax_char, /*C*/ regex_constants::syntax_char, /*D*/ regex_constants::syntax_char, /*E*/ regex_constants::syntax_char, /*F*/ regex_constants::syntax_char, /*G*/ regex_constants::syntax_char, /*H*/ regex_constants::syntax_char, /*I*/ regex_constants::syntax_char, /*J*/ regex_constants::syntax_char, /*K*/ regex_constants::syntax_char, /*L*/ regex_constants::syntax_char, /*M*/ regex_constants::syntax_char, /*N*/ regex_constants::syntax_char, /*O*/ regex_constants::syntax_char, /*P*/ regex_constants::syntax_char, /*Q*/ regex_constants::syntax_char, /*R*/ regex_constants::syntax_char, /*S*/ regex_constants::syntax_char, /*T*/ regex_constants::syntax_char, /*U*/ regex_constants::syntax_char, /*V*/ regex_constants::syntax_char, /*W*/ regex_constants::syntax_char, /*X*/ regex_constants::syntax_char, /*Y*/ regex_constants::syntax_char, /*Z*/ regex_constants::syntax_open_set, /*[*/ regex_constants::syntax_escape, /*\*/ regex_constants::syntax_close_set, /*]*/ regex_constants::syntax_caret, /*^*/ regex_constants::syntax_char, /*_*/ regex_constants::syntax_char, /*`*/ regex_constants::syntax_char, /*a*/ regex_constants::syntax_char, /*b*/ regex_constants::syntax_char, /*c*/ regex_constants::syntax_char, /*d*/ regex_constants::syntax_char, /*e*/ regex_constants::syntax_char, /*f*/ regex_constants::syntax_char, /*g*/ regex_constants::syntax_char, /*h*/ regex_constants::syntax_char, /*i*/ regex_constants::syntax_char, /*j*/ regex_constants::syntax_char, /*k*/ regex_constants::syntax_char, /*l*/ regex_constants::syntax_char, /*m*/ regex_constants::syntax_char, /*n*/ regex_constants::syntax_char, /*o*/ regex_constants::syntax_char, /*p*/ regex_constants::syntax_char, /*q*/ regex_constants::syntax_char, /*r*/ regex_constants::syntax_char, /*s*/ regex_constants::syntax_char, /*t*/ regex_constants::syntax_char, /*u*/ regex_constants::syntax_char, /*v*/ regex_constants::syntax_char, /*w*/ regex_constants::syntax_char, /*x*/ regex_constants::syntax_char, /*y*/ regex_constants::syntax_char, /*z*/ regex_constants::syntax_open_brace, /*{*/ regex_constants::syntax_or, /*|*/ regex_constants::syntax_close_brace, /*}*/ regex_constants::syntax_char, /*~*/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ regex_constants::syntax_char, /**/ }; return char_syntax[(unsigned char)c]; } } // re_detail } // boost passenger-4.0.37/ext/boost/libs/regex/src/static_mutex.cpp000644 000765 000024 00000007147 12233035540 024222 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE static_mutex.cpp * VERSION see * DESCRIPTION: Declares static_mutex lock type. */ #define BOOST_REGEX_SOURCE #include #ifdef BOOST_HAS_THREADS #include #if defined(BOOST_HAS_WINTHREADS) #ifndef NOMINMAX # define NOMINMAX #endif #define WIN32_LEAN_AND_MEAN #include #include #endif namespace boost{ #if defined(BOOST_HAS_PTHREADS) && defined(PTHREAD_MUTEX_INITIALIZER) scoped_static_mutex_lock::scoped_static_mutex_lock(static_mutex& m, bool lk) : m_mutex(m), m_have_lock(false) { if(lk) lock(); } scoped_static_mutex_lock::~scoped_static_mutex_lock() { if(m_have_lock) unlock(); } void scoped_static_mutex_lock::lock() { if(0 == m_have_lock) { pthread_mutex_lock(&(m_mutex.m_mutex)); m_have_lock = true; } } void scoped_static_mutex_lock::unlock() { if(m_have_lock) { pthread_mutex_unlock(&(m_mutex.m_mutex)); m_have_lock = false; } } #elif defined(BOOST_HAS_WINTHREADS) BOOST_STATIC_ASSERT(sizeof(LONG) == sizeof(boost::int32_t)); scoped_static_mutex_lock::scoped_static_mutex_lock(static_mutex& m, bool lk) : m_mutex(m), m_have_lock(false) { if(lk) lock(); } scoped_static_mutex_lock::~scoped_static_mutex_lock() { if(m_have_lock) unlock(); } void scoped_static_mutex_lock::lock() { if(0 == m_have_lock) { #if !defined(InterlockedCompareExchangePointer) while(0 != InterlockedCompareExchange(reinterpret_cast((boost::uint_least16_t*)&(m_mutex.m_mutex)), (void*)1, 0)) #else while(0 != InterlockedCompareExchange(reinterpret_cast(&(m_mutex.m_mutex)), 1, 0)) #endif { Sleep(0); } m_have_lock = true; } } void scoped_static_mutex_lock::unlock() { if(m_have_lock) { #if !defined(InterlockedCompareExchangePointer) InterlockedExchange((LONG*)&(m_mutex.m_mutex), 0); #else InterlockedExchange(reinterpret_cast(&(m_mutex.m_mutex)), 0); #endif m_have_lock = false; } } #else // // Portable version of a static mutex based on Boost.Thread library: // #include #include boost::recursive_mutex* static_mutex::m_pmutex = 0; boost::once_flag static_mutex::m_once = BOOST_ONCE_INIT; extern "C" BOOST_REGEX_DECL void boost_regex_free_static_mutex() { delete static_mutex::m_pmutex; static_mutex::m_pmutex = 0; } void static_mutex::init() { m_pmutex = new boost::recursive_mutex(); int r = atexit(boost_regex_free_static_mutex); BOOST_ASSERT(0 == r); } scoped_static_mutex_lock::scoped_static_mutex_lock(static_mutex& , bool lk) : m_plock(0), m_have_lock(false) { if(lk) lock(); } scoped_static_mutex_lock::~scoped_static_mutex_lock() { if(m_have_lock) unlock(); delete m_plock; } void scoped_static_mutex_lock::lock() { if(0 == m_have_lock) { boost::call_once(static_mutex::m_once,&static_mutex::init); if(0 == m_plock) m_plock = new boost::recursive_mutex::scoped_lock(*static_mutex::m_pmutex, boost::defer_lock); m_plock->lock(); m_have_lock = true; } } void scoped_static_mutex_lock::unlock() { if(m_have_lock) { m_plock->unlock(); m_have_lock = false; } } #endif } #endif // BOOST_HAS_THREADS passenger-4.0.37/ext/boost/libs/regex/src/wc_regex_traits.cpp000644 000765 000024 00000025045 12233035540 024677 0ustar00honglistaff000000 000000 /* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: wc_regex_traits.cpp * VERSION: see * DESCRIPTION: Implements out of line members for c_regex_traits */ #define BOOST_REGEX_SOURCE #include #include #include #include "internals.hpp" #if defined(_DLL_CPPLIB) && !defined(_M_CEE_PURE) && defined(_NATIVE_WCHAR_T_DEFINED) \ && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER))\ && BOOST_WORKAROUND(BOOST_MSVC, <1600) // // This is a horrible workaround, but without declaring these symbols extern we get // duplicate symbol errors when linking if the application is built without // /Zc:wchar_t // #ifdef _CRTIMP2_PURE # define BOOST_REGEX_STDLIB_DECL _CRTIMP2_PURE #else # define BOOST_REGEX_STDLIB_DECL _CRTIMP2 #endif namespace std{ #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) template class BOOST_REGEX_STDLIB_DECL allocator; template class BOOST_REGEX_STDLIB_DECL _String_val >; template class BOOST_REGEX_STDLIB_DECL basic_string, allocator >; #endif #if BOOST_WORKAROUND(BOOST_MSVC, > 1300) && BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) template<> BOOST_REGEX_STDLIB_DECL std::size_t __cdecl char_traits::length(unsigned short const*); #endif template BOOST_REGEX_STDLIB_DECL bool __cdecl operator==( const basic_string, allocator >&, const basic_string, allocator >&); template BOOST_REGEX_STDLIB_DECL bool __cdecl operator==( const unsigned short *, const basic_string, allocator >&); template BOOST_REGEX_STDLIB_DECL bool __cdecl operator==( const basic_string, allocator >&, const unsigned short *); template BOOST_REGEX_STDLIB_DECL bool __cdecl operator<( const basic_string, allocator >&, const basic_string, allocator >&); template BOOST_REGEX_STDLIB_DECL bool __cdecl operator>( const basic_string, allocator >&, const basic_string, allocator >&); } #endif #include #include #if !BOOST_WORKAROUND(__BORLANDC__, < 0x560) #include #ifndef BOOST_NO_WREGEX #include #include #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::wcstol; } #endif namespace boost{ c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::transform(const wchar_t* p1, const wchar_t* p2) { std::size_t r; std::size_t s = 10; std::wstring src(p1, p2); std::wstring result(s, L' '); while(s < (r = std::wcsxfrm(&*result.begin(), src.c_str(), s))) { result.append(r - s + 3, L' '); s = result.size(); } result.erase(r); return result; } c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::transform_primary(const wchar_t* p1, const wchar_t* p2) { static wchar_t s_delim; static const int s_collate_type = ::boost::re_detail::find_sort_syntax(static_cast*>(0), &s_delim); std::wstring result; // // What we do here depends upon the format of the sort key returned by // sort key returned by this->transform: // switch(s_collate_type) { case ::boost::re_detail::sort_C: case ::boost::re_detail::sort_unknown: // the best we can do is translate to lower case, then get a regular sort key: { result.assign(p1, p2); for(std::wstring::size_type i = 0; i < result.size(); ++i) result[i] = (std::towlower)(result[i]); result = c_regex_traits::transform(&*result.begin(), &*result.begin() + result.size()); break; } case ::boost::re_detail::sort_fixed: { // get a regular sort key, and then truncate it: result = c_regex_traits::transform(&*result.begin(), &*result.begin() + result.size()); result.erase(s_delim); break; } case ::boost::re_detail::sort_delim: // get a regular sort key, and then truncate everything after the delim: result = c_regex_traits::transform(&*result.begin(), &*result.begin() + result.size()); if(result.size() && (result[0] == s_delim)) break; std::size_t i; for(i = 0; i < result.size(); ++i) { if(result[i] == s_delim) break; } result.erase(i); break; } if(result.empty()) result = std::wstring(1, char(0)); return result; } c_regex_traits::char_class_type BOOST_REGEX_CALL c_regex_traits::lookup_classname(const wchar_t* p1, const wchar_t* p2) { static const char_class_type masks[] = { 0, char_class_alnum, char_class_alpha, char_class_blank, char_class_cntrl, char_class_digit, char_class_digit, char_class_graph, char_class_horizontal, char_class_lower, char_class_lower, char_class_print, char_class_punct, char_class_space, char_class_space, char_class_upper, char_class_unicode, char_class_upper, char_class_vertical, char_class_alnum | char_class_word, char_class_alnum | char_class_word, char_class_xdigit, }; int idx = ::boost::re_detail::get_default_class_id(p1, p2); if(idx < 0) { std::wstring s(p1, p2); for(std::wstring::size_type i = 0; i < s.size(); ++i) s[i] = (std::towlower)(s[i]); idx = ::boost::re_detail::get_default_class_id(&*s.begin(), &*s.begin() + s.size()); } BOOST_ASSERT(idx+1 < static_cast(sizeof(masks) / sizeof(masks[0]))); return masks[idx+1]; } bool BOOST_REGEX_CALL c_regex_traits::isctype(wchar_t c, char_class_type mask) { return ((mask & char_class_space) && (std::iswspace)(c)) || ((mask & char_class_print) && (std::iswprint)(c)) || ((mask & char_class_cntrl) && (std::iswcntrl)(c)) || ((mask & char_class_upper) && (std::iswupper)(c)) || ((mask & char_class_lower) && (std::iswlower)(c)) || ((mask & char_class_alpha) && (std::iswalpha)(c)) || ((mask & char_class_digit) && (std::iswdigit)(c)) || ((mask & char_class_punct) && (std::iswpunct)(c)) || ((mask & char_class_xdigit) && (std::iswxdigit)(c)) || ((mask & char_class_blank) && (std::iswspace)(c) && !::boost::re_detail::is_separator(c)) || ((mask & char_class_word) && (c == '_')) || ((mask & char_class_unicode) && (c & ~static_cast(0xff))) || ((mask & char_class_vertical) && (::boost::re_detail::is_separator(c) || (c == L'\v'))) || ((mask & char_class_horizontal) && (std::iswspace)(c) && !::boost::re_detail::is_separator(c) && (c != L'\v')); } c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::lookup_collatename(const wchar_t* p1, const wchar_t* p2) { #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) std::string name(p1, p2); #else std::string name; const wchar_t* p0 = p1; while(p0 != p2) name.append(1, char(*p0++)); #endif name = ::boost::re_detail::lookup_default_collate_name(name); #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551) if(name.size()) return string_type(name.begin(), name.end()); #else if(name.size()) { string_type result; typedef std::string::const_iterator iter; iter b = name.begin(); iter e = name.end(); while(b != e) result.append(1, wchar_t(*b++)); return result; } #endif if(p2 - p1 == 1) return string_type(1, *p1); return string_type(); } int BOOST_REGEX_CALL c_regex_traits::value(wchar_t c, int radix) { #ifdef __BORLANDC__ // workaround for broken wcstol: if((std::iswxdigit)(c) == 0) return -1; #endif wchar_t b[2] = { c, '\0', }; wchar_t* ep; int result = std::wcstol(b, &ep, radix); if(ep == b) return -1; return result; } #ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::transform(const unsigned short* p1, const unsigned short* p2) { std::wstring result = c_regex_traits::transform((const wchar_t*)p1, (const wchar_t*)p2); return string_type(result.begin(), result.end()); } c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::transform_primary(const unsigned short* p1, const unsigned short* p2) { std::wstring result = c_regex_traits::transform_primary((const wchar_t*)p1, (const wchar_t*)p2); return string_type(result.begin(), result.end()); } c_regex_traits::char_class_type BOOST_REGEX_CALL c_regex_traits::lookup_classname(const unsigned short* p1, const unsigned short* p2) { return c_regex_traits::lookup_classname((const wchar_t*)p1, (const wchar_t*)p2); } c_regex_traits::string_type BOOST_REGEX_CALL c_regex_traits::lookup_collatename(const unsigned short* p1, const unsigned short* p2) { std::wstring result = c_regex_traits::lookup_collatename((const wchar_t*)p1, (const wchar_t*)p2); return string_type(result.begin(), result.end()); } bool BOOST_REGEX_CALL c_regex_traits::isctype(unsigned short c, char_class_type m) { return c_regex_traits::isctype(c, m); } int BOOST_REGEX_CALL c_regex_traits::value(unsigned short c, int radix) { return c_regex_traits::value(c, radix); } #endif } #endif // BOOST_NO_WREGEX #endif // __BORLANDC__ passenger-4.0.37/ext/boost/libs/regex/src/wide_posix_api.cpp000644 000765 000024 00000016615 12233035540 024514 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: wide_posix_api.cpp * VERSION: see * DESCRIPTION: Implements the wide character POSIX API wrappers. */ #define BOOST_REGEX_SOURCE #include #ifndef BOOST_NO_WREGEX #include #include #include #include #include #ifdef BOOST_INTEL #pragma warning(disable:981) #endif #if defined(BOOST_NO_STDC_NAMESPACE) || defined(__NetBSD__) namespace std{ # ifndef BOOST_NO_SWPRINTF using ::swprintf; # endif } #endif namespace boost{ namespace { unsigned int wmagic_value = 28631; const wchar_t* wnames[] = { L"REG_NOERROR", L"REG_NOMATCH", L"REG_BADPAT", L"REG_ECOLLATE", L"REG_ECTYPE", L"REG_EESCAPE", L"REG_ESUBREG", L"REG_EBRACK", L"REG_EPAREN", L"REG_EBRACE", L"REG_BADBR", L"REG_ERANGE", L"REG_ESPACE", L"REG_BADRPT", L"REG_EEND", L"REG_ESIZE", L"REG_ERPAREN", L"REG_EMPTY", L"REG_ECOMPLEXITY", L"REG_ESTACK", L"REG_E_PERL", L"REG_E_UNKNOWN", }; } typedef boost::basic_regex > wc_regex_type; BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW* expression, const wchar_t* ptr, int f) { if(expression->re_magic != wmagic_value) { expression->guts = 0; #ifndef BOOST_NO_EXCEPTIONS try{ #endif expression->guts = new wc_regex_type(); #ifndef BOOST_NO_EXCEPTIONS } catch(...) { return REG_ESPACE; } #else if(0 == expression->guts) return REG_E_MEMORY; #endif } // set default flags: boost::uint_fast32_t flags = (f & REG_PERLEX) ? 0 : ((f & REG_EXTENDED) ? wregex::extended : wregex::basic); expression->eflags = (f & REG_NEWLINE) ? match_not_dot_newline : match_default; // and translate those that are actually set: if(f & REG_NOCOLLATE) { flags |= wregex::nocollate; #ifndef BOOST_REGEX_V3 flags &= ~wregex::collate; #endif } if(f & REG_NOSUB) { //expression->eflags |= match_any; flags |= wregex::nosubs; } if(f & REG_NOSPEC) flags |= wregex::literal; if(f & REG_ICASE) flags |= wregex::icase; if(f & REG_ESCAPE_IN_LISTS) flags &= ~wregex::no_escape_in_lists; if(f & REG_NEWLINE_ALT) flags |= wregex::newline_alt; const wchar_t* p2; if(f & REG_PEND) p2 = expression->re_endp; else p2 = ptr + std::wcslen(ptr); int result; #ifndef BOOST_NO_EXCEPTIONS try{ #endif expression->re_magic = wmagic_value; static_cast(expression->guts)->set_expression(ptr, p2, flags); expression->re_nsub = static_cast(expression->guts)->mark_count() - 1; result = static_cast(expression->guts)->error_code(); #ifndef BOOST_NO_EXCEPTIONS } catch(const boost::regex_error& be) { result = be.code(); } catch(...) { result = REG_E_UNKNOWN; } #endif if(result) regfreeW(expression); return result; } BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int code, const regex_tW* e, wchar_t* buf, regsize_t buf_size) { std::size_t result = 0; if(code & REG_ITOA) { code &= ~REG_ITOA; if((code <= (int)REG_E_UNKNOWN) && (code >= 0)) { result = std::wcslen(wnames[code]) + 1; if(buf_size >= result) #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE) ::wcscpy_s(buf, buf_size, wnames[code]); #else std::wcscpy(buf, wnames[code]); #endif return result; } return result; } #if !defined(BOOST_NO_SWPRINTF) if(code == REG_ATOI) { wchar_t localbuf[5]; if(e == 0) return 0; for(int i = 0; i <= (int)REG_E_UNKNOWN; ++i) { if(std::wcscmp(e->re_endp, wnames[i]) == 0) { #if defined(_WIN32_WCE) && !defined(UNDER_CE) (std::swprintf)(localbuf, L"%d", i); #else (std::swprintf)(localbuf, 5, L"%d", i); #endif if(std::wcslen(localbuf) < buf_size) #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE) ::wcscpy_s(buf, buf_size, localbuf); #else std::wcscpy(buf, localbuf); #endif return std::wcslen(localbuf) + 1; } } #if defined(_WIN32_WCE) && !defined(UNDER_CE) (std::swprintf)(localbuf, L"%d", 0); #else (std::swprintf)(localbuf, 5, L"%d", 0); #endif if(std::wcslen(localbuf) < buf_size) #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE) ::wcscpy_s(buf, buf_size, localbuf); #else std::wcscpy(buf, localbuf); #endif return std::wcslen(localbuf) + 1; } #endif if(code <= (int)REG_E_UNKNOWN) { std::string p; if((e) && (e->re_magic == wmagic_value)) p = static_cast(e->guts)->get_traits().error_string(static_cast< ::boost::regex_constants::error_type>(code)); else { p = re_detail::get_default_error_string(static_cast< ::boost::regex_constants::error_type>(code)); } std::size_t len = p.size(); if(len < buf_size) { re_detail::copy(p.c_str(), p.c_str() + p.size() + 1, buf); } return len + 1; } if(buf_size) *buf = 0; return 0; } BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecW(const regex_tW* expression, const wchar_t* buf, regsize_t n, regmatch_t* array, int eflags) { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4267) #endif bool result = false; match_flag_type flags = match_default | expression->eflags; const wchar_t* end; const wchar_t* start; wcmatch m; if(eflags & REG_NOTBOL) flags |= match_not_bol; if(eflags & REG_NOTEOL) flags |= match_not_eol; if(eflags & REG_STARTEND) { start = buf + array[0].rm_so; end = buf + array[0].rm_eo; } else { start = buf; end = buf + std::wcslen(buf); } #ifndef BOOST_NO_EXCEPTIONS try{ #endif if(expression->re_magic == wmagic_value) { result = regex_search(start, end, m, *static_cast(expression->guts), flags); } else return result; #ifndef BOOST_NO_EXCEPTIONS } catch(...) { return REG_E_UNKNOWN; } #endif if(result) { // extract what matched: std::size_t i; for(i = 0; (i < n) && (i < expression->re_nsub + 1); ++i) { array[i].rm_so = (m[i].matched == false) ? -1 : (m[i].first - buf); array[i].rm_eo = (m[i].matched == false) ? -1 : (m[i].second - buf); } // and set anything else to -1: for(i = expression->re_nsub + 1; i < n; ++i) { array[i].rm_so = -1; array[i].rm_eo = -1; } return 0; } return REG_NOMATCH; #ifdef BOOST_MSVC #pragma warning(pop) #endif } BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeW(regex_tW* expression) { if(expression->re_magic == wmagic_value) { delete static_cast(expression->guts); } expression->re_magic = 0; } } // namespace boost; #endif passenger-4.0.37/ext/boost/libs/regex/src/winstances.cpp000644 000765 000024 00000001326 12233035540 023660 0ustar00honglistaff000000 000000 /* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE: winstances.cpp * VERSION: see * DESCRIPTION: regex wide character template instances. */ #define BOOST_REGEX_SOURCE #include #if !defined(BOOST_NO_WREGEX) && !defined(BOOST_REGEX_NO_EXTERNAL_TEMPLATES) #define BOOST_REGEX_WIDE_INSTANTIATE #ifdef __BORLANDC__ #pragma hrdstop #endif #include #endif passenger-4.0.37/ext/boost/libs/atomic/lockpool.cpp000644 000765 000024 00000001305 12233035540 022674 0ustar00honglistaff000000 000000 #include // Copyright (c) 2011 Helge Bahmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) namespace boost { namespace atomics { namespace detail { static lockpool::lock_type lock_pool_[41]; // NOTE: This function must NOT be inline. Otherwise MSVC 9 will sometimes generate broken code for modulus operation which result in crashes. BOOST_ATOMIC_DECL lockpool::lock_type& lockpool::get_lock_for(const volatile void* addr) { std::size_t index = reinterpret_cast(addr) % (sizeof(lock_pool_) / sizeof(*lock_pool_)); return lock_pool_[index]; } } } } passenger-4.0.37/ext/boost/iterator/detail/000755 000765 000024 00000000000 12233035540 021235 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/iterator/interoperable.hpp000644 000765 000024 00000002703 12233035540 023341 0ustar00honglistaff000000 000000 // (C) Copyright David Abrahams 2002. // (C) Copyright Jeremy Siek 2002. // (C) Copyright Thomas Witt 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_INTEROPERABLE_23022003THW_HPP # define BOOST_INTEROPERABLE_23022003THW_HPP # include # include # include # include // must appear last namespace boost { // // Meta function that determines whether two // iterator types are considered interoperable. // // Two iterator types A,B are considered interoperable if either // A is convertible to B or vice versa. // This interoperability definition is in sync with the // standards requirements on constant/mutable container // iterators (23.1 [lib.container.requirements]). // // For compilers that don't support is_convertible // is_interoperable gives false positives. See comments // on operator implementation for consequences. // template struct is_interoperable # ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY : mpl::true_ # else : mpl::or_< is_convertible< A, B > , is_convertible< B, A > > # endif { }; } // namespace boost # include #endif // BOOST_INTEROPERABLE_23022003THW_HPP passenger-4.0.37/ext/boost/iterator/iterator_adaptor.hpp000644 000765 000024 00000026151 12233035540 024054 0ustar00honglistaff000000 000000 // (C) Copyright David Abrahams 2002. // (C) Copyright Jeremy Siek 2002. // (C) Copyright Thomas Witt 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_ITERATOR_ADAPTOR_23022003THW_HPP #define BOOST_ITERATOR_ADAPTOR_23022003THW_HPP #include #include #include #include #include #include #include #include #include #include #include #ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY # include #endif #include #include #include namespace boost { // Used as a default template argument internally, merely to // indicate "use the default", this can also be passed by users // explicitly in order to specify that the default should be used. struct use_default; # ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // the incompleteness of use_default causes massive problems for // is_convertible (naturally). This workaround is fortunately not // needed for vc6/vc7. template struct is_convertible : mpl::false_ {}; # endif namespace detail { // // Result type used in enable_if_convertible meta function. // This can be an incomplete type, as only pointers to // enable_if_convertible< ... >::type are used. // We could have used void for this, but conversion to // void* is just to easy. // struct enable_type; } // // enable_if for use in adapted iterators constructors. // // In order to provide interoperability between adapted constant and // mutable iterators, adapted iterators will usually provide templated // conversion constructors of the following form // // template // class adapted_iterator : // public iterator_adaptor< adapted_iterator, Iterator > // { // public: // // ... // // template // adapted_iterator( // OtherIterator const& it // , typename enable_if_convertible::type* = 0); // // ... // }; // // enable_if_convertible is used to remove those overloads from the overload // set that cannot be instantiated. For all practical purposes only overloads // for constant/mutable interaction will remain. This has the advantage that // meta functions like boost::is_convertible do not return false positives, // as they can only look at the signature of the conversion constructor // and not at the actual instantiation. // // enable_if_interoperable can be safely used in user code. It falls back to // always enabled for compilers that don't support enable_if or is_convertible. // There is no need for compiler specific workarounds in user code. // // The operators implementation relies on boost::is_convertible not returning // false positives for user/library defined iterator types. See comments // on operator implementation for consequences. // # if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) template struct enable_if_convertible { typedef typename mpl::if_< mpl::or_< is_same , is_convertible > , boost::detail::enable_type , int& >::type type; }; # elif defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE) template struct enable_if_convertible { typedef boost::detail::enable_type type; }; # elif BOOST_WORKAROUND(_MSC_FULL_VER, BOOST_TESTED_AT(13102292)) && BOOST_MSVC > 1300 // For some reason vc7.1 needs us to "cut off" instantiation // of is_convertible in a few cases. template struct enable_if_convertible : iterators::enable_if< mpl::or_< is_same , is_convertible > , boost::detail::enable_type > {}; # else template struct enable_if_convertible : iterators::enable_if< is_convertible , boost::detail::enable_type > {}; # endif // // Default template argument handling for iterator_adaptor // namespace detail { // If T is use_default, return the result of invoking // DefaultNullaryFn, otherwise return T. template struct ia_dflt_help : mpl::eval_if< is_same , DefaultNullaryFn , mpl::identity > { }; // A metafunction which computes an iterator_adaptor's base class, // a specialization of iterator_facade. template < class Derived , class Base , class Value , class Traversal , class Reference , class Difference > struct iterator_adaptor_base { typedef iterator_facade< Derived # ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY , typename boost::detail::ia_dflt_help< Value , mpl::eval_if< is_same , iterator_value , remove_reference > >::type # else , typename boost::detail::ia_dflt_help< Value, iterator_value >::type # endif , typename boost::detail::ia_dflt_help< Traversal , iterator_traversal >::type , typename boost::detail::ia_dflt_help< Reference , mpl::eval_if< is_same , iterator_reference , add_reference > >::type , typename boost::detail::ia_dflt_help< Difference, iterator_difference >::type > type; }; // workaround for aC++ CR JAGaf33512 template inline void iterator_adaptor_assert_traversal () { BOOST_STATIC_ASSERT((is_convertible::value)); } } // // Iterator Adaptor // // The parameter ordering changed slightly with respect to former // versions of iterator_adaptor The idea is that when the user needs // to fiddle with the reference type it is highly likely that the // iterator category has to be adjusted as well. Any of the // following four template arguments may be ommitted or explicitly // replaced by use_default. // // Value - if supplied, the value_type of the resulting iterator, unless // const. If const, a conforming compiler strips constness for the // value_type. If not supplied, iterator_traits::value_type is used // // Category - the traversal category of the resulting iterator. If not // supplied, iterator_traversal::type is used. // // Reference - the reference type of the resulting iterator, and in // particular, the result type of operator*(). If not supplied but // Value is supplied, Value& is used. Otherwise // iterator_traits::reference is used. // // Difference - the difference_type of the resulting iterator. If not // supplied, iterator_traits::difference_type is used. // template < class Derived , class Base , class Value = use_default , class Traversal = use_default , class Reference = use_default , class Difference = use_default > class iterator_adaptor : public boost::detail::iterator_adaptor_base< Derived, Base, Value, Traversal, Reference, Difference >::type { friend class iterator_core_access; protected: typedef typename boost::detail::iterator_adaptor_base< Derived, Base, Value, Traversal, Reference, Difference >::type super_t; public: iterator_adaptor() {} explicit iterator_adaptor(Base const &iter) : m_iterator(iter) { } typedef Base base_type; Base const& base() const { return m_iterator; } protected: // for convenience in derived classes typedef iterator_adaptor iterator_adaptor_; // // lvalue access to the Base object for Derived // Base const& base_reference() const { return m_iterator; } Base& base_reference() { return m_iterator; } private: // // Core iterator interface for iterator_facade. This is private // to prevent temptation for Derived classes to use it, which // will often result in an error. Derived classes should use // base_reference(), above, to get direct access to m_iterator. // typename super_t::reference dereference() const { return *m_iterator; } template < class OtherDerived, class OtherIterator, class V, class C, class R, class D > bool equal(iterator_adaptor const& x) const { // Maybe readd with same_distance // BOOST_STATIC_ASSERT( // (detail::same_category_and_difference::value) // ); return m_iterator == x.base(); } typedef typename iterator_category_to_traversal< typename super_t::iterator_category >::type my_traversal; # define BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(cat) \ boost::detail::iterator_adaptor_assert_traversal(); void advance(typename super_t::difference_type n) { BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag) m_iterator += n; } void increment() { ++m_iterator; } void decrement() { BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(bidirectional_traversal_tag) --m_iterator; } template < class OtherDerived, class OtherIterator, class V, class C, class R, class D > typename super_t::difference_type distance_to( iterator_adaptor const& y) const { BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(random_access_traversal_tag) // Maybe readd with same_distance // BOOST_STATIC_ASSERT( // (detail::same_category_and_difference::value) // ); return y.base() - m_iterator; } # undef BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL private: // data members Base m_iterator; }; } // namespace boost #include #endif // BOOST_ITERATOR_ADAPTOR_23022003THW_HPP passenger-4.0.37/ext/boost/iterator/iterator_categories.hpp000644 000765 000024 00000012313 12233035540 024542 0ustar00honglistaff000000 000000 // (C) Copyright Jeremy Siek 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_ITERATOR_CATEGORIES_HPP # define BOOST_ITERATOR_CATEGORIES_HPP # include # include # include # include # include # include # include # include # include # include namespace boost { // // Traversal Categories // struct no_traversal_tag {}; struct incrementable_traversal_tag : no_traversal_tag { // incrementable_traversal_tag() {} // incrementable_traversal_tag(std::output_iterator_tag const&) {}; }; struct single_pass_traversal_tag : incrementable_traversal_tag { // single_pass_traversal_tag() {} // single_pass_traversal_tag(std::input_iterator_tag const&) {}; }; struct forward_traversal_tag : single_pass_traversal_tag { // forward_traversal_tag() {} // forward_traversal_tag(std::forward_iterator_tag const&) {}; }; struct bidirectional_traversal_tag : forward_traversal_tag { // bidirectional_traversal_tag() {}; // bidirectional_traversal_tag(std::bidirectional_iterator_tag const&) {}; }; struct random_access_traversal_tag : bidirectional_traversal_tag { // random_access_traversal_tag() {}; // random_access_traversal_tag(std::random_access_iterator_tag const&) {}; }; namespace detail { // // Convert a "strictly old-style" iterator category to a traversal // tag. This is broken out into a separate metafunction to reduce // the cost of instantiating iterator_category_to_traversal, below, // for new-style types. // template struct old_category_to_traversal : mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , void > > > > > {}; # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) template <> struct old_category_to_traversal { typedef int type; }; # endif template struct pure_traversal_tag : mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , mpl::eval_if< is_convertible , mpl::identity , void > > > > > { }; # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) template <> struct pure_traversal_tag { typedef int type; }; # endif } // namespace detail // // Convert an iterator category into a traversal tag // template struct iterator_category_to_traversal : mpl::eval_if< // if already convertible to a traversal tag, we're done. is_convertible , mpl::identity , boost::detail::old_category_to_traversal > {}; // Trait to get an iterator's traversal category template struct iterator_traversal : iterator_category_to_traversal< typename boost::detail::iterator_traits::iterator_category > {}; # ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT // Hack because BOOST_MPL_AUX_LAMBDA_SUPPORT doesn't seem to work // out well. Instantiating the nested apply template also // requires instantiating iterator_traits on the // placeholder. Instead we just specialize it as a metafunction // class. template <> struct iterator_traversal { template struct apply : iterator_traversal {}; }; template <> struct iterator_traversal : iterator_traversal {}; # endif } // namespace boost #include #endif // BOOST_ITERATOR_CATEGORIES_HPP passenger-4.0.37/ext/boost/iterator/iterator_concepts.hpp000644 000765 000024 00000017130 12233035540 024235 0ustar00honglistaff000000 000000 // (C) Copyright Jeremy Siek 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_ITERATOR_CONCEPTS_HPP #define BOOST_ITERATOR_CONCEPTS_HPP #include #include // Use boost::detail::iterator_traits to work around some MSVC/Dinkumware problems. #include #include #include #include #include #include #include #include // Use boost/limits to work around missing limits headers on some compilers #include #include #include #include namespace boost_concepts { // Used a different namespace here (instead of "boost") so that the // concept descriptions do not take for granted the names in // namespace boost. //=========================================================================== // Iterator Access Concepts BOOST_concept(ReadableIterator,(Iterator)) : boost::Assignable , boost::CopyConstructible { typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type value_type; typedef BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::reference reference; BOOST_CONCEPT_USAGE(ReadableIterator) { value_type v = *i; boost::ignore_unused_variable_warning(v); } private: Iterator i; }; template < typename Iterator , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type > struct WritableIterator : boost::CopyConstructible { BOOST_CONCEPT_USAGE(WritableIterator) { *i = v; } private: ValueType v; Iterator i; }; template < typename Iterator , typename ValueType = BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits::value_type > struct WritableIteratorConcept : WritableIterator {}; BOOST_concept(SwappableIterator,(Iterator)) { BOOST_CONCEPT_USAGE(SwappableIterator) { std::iter_swap(i1, i2); } private: Iterator i1; Iterator i2; }; BOOST_concept(LvalueIterator,(Iterator)) { typedef typename boost::detail::iterator_traits::value_type value_type; BOOST_CONCEPT_USAGE(LvalueIterator) { value_type& r = const_cast(*i); boost::ignore_unused_variable_warning(r); } private: Iterator i; }; //=========================================================================== // Iterator Traversal Concepts BOOST_concept(IncrementableIterator,(Iterator)) : boost::Assignable , boost::CopyConstructible { typedef typename boost::iterator_traversal::type traversal_category; BOOST_CONCEPT_ASSERT(( boost::Convertible< traversal_category , boost::incrementable_traversal_tag >)); BOOST_CONCEPT_USAGE(IncrementableIterator) { ++i; (void)i++; } private: Iterator i; }; BOOST_concept(SinglePassIterator,(Iterator)) : IncrementableIterator , boost::EqualityComparable { BOOST_CONCEPT_ASSERT(( boost::Convertible< BOOST_DEDUCED_TYPENAME SinglePassIterator::traversal_category , boost::single_pass_traversal_tag > )); }; BOOST_concept(ForwardTraversal,(Iterator)) : SinglePassIterator , boost::DefaultConstructible { typedef typename boost::detail::iterator_traits::difference_type difference_type; BOOST_MPL_ASSERT((boost::is_integral)); BOOST_MPL_ASSERT_RELATION(std::numeric_limits::is_signed, ==, true); BOOST_CONCEPT_ASSERT(( boost::Convertible< BOOST_DEDUCED_TYPENAME ForwardTraversal::traversal_category , boost::forward_traversal_tag > )); }; BOOST_concept(BidirectionalTraversal,(Iterator)) : ForwardTraversal { BOOST_CONCEPT_ASSERT(( boost::Convertible< BOOST_DEDUCED_TYPENAME BidirectionalTraversal::traversal_category , boost::bidirectional_traversal_tag > )); BOOST_CONCEPT_USAGE(BidirectionalTraversal) { --i; (void)i--; } private: Iterator i; }; BOOST_concept(RandomAccessTraversal,(Iterator)) : BidirectionalTraversal { BOOST_CONCEPT_ASSERT(( boost::Convertible< BOOST_DEDUCED_TYPENAME RandomAccessTraversal::traversal_category , boost::random_access_traversal_tag > )); BOOST_CONCEPT_USAGE(RandomAccessTraversal) { i += n; i = i + n; i = n + i; i -= n; i = i - n; n = i - j; } private: typename BidirectionalTraversal::difference_type n; Iterator i, j; }; //=========================================================================== // Iterator Interoperability namespace detail { template void interop_single_pass_constraints(Iterator1 const& i1, Iterator2 const& i2) { bool b; b = i1 == i2; b = i1 != i2; b = i2 == i1; b = i2 != i1; boost::ignore_unused_variable_warning(b); } template void interop_rand_access_constraints( Iterator1 const& i1, Iterator2 const& i2, boost::random_access_traversal_tag, boost::random_access_traversal_tag) { bool b; typename boost::detail::iterator_traits::difference_type n; b = i1 < i2; b = i1 <= i2; b = i1 > i2; b = i1 >= i2; n = i1 - i2; b = i2 < i1; b = i2 <= i1; b = i2 > i1; b = i2 >= i1; n = i2 - i1; boost::ignore_unused_variable_warning(b); boost::ignore_unused_variable_warning(n); } template void interop_rand_access_constraints( Iterator1 const&, Iterator2 const&, boost::single_pass_traversal_tag, boost::single_pass_traversal_tag) { } } // namespace detail BOOST_concept(InteroperableIterator,(Iterator)(ConstIterator)) { private: typedef typename boost::detail::pure_traversal_tag< typename boost::iterator_traversal< Iterator >::type >::type traversal_category; typedef typename boost::detail::pure_traversal_tag< typename boost::iterator_traversal< ConstIterator >::type >::type const_traversal_category; public: BOOST_CONCEPT_ASSERT((SinglePassIterator)); BOOST_CONCEPT_ASSERT((SinglePassIterator)); BOOST_CONCEPT_USAGE(InteroperableIterator) { detail::interop_single_pass_constraints(i, ci); detail::interop_rand_access_constraints(i, ci, traversal_category(), const_traversal_category()); ci = i; } private: Iterator i; ConstIterator ci; }; } // namespace boost_concepts #include #endif // BOOST_ITERATOR_CONCEPTS_HPP passenger-4.0.37/ext/boost/iterator/iterator_facade.hpp000644 000765 000024 00000070643 12233035540 023632 0ustar00honglistaff000000 000000 // (C) Copyright David Abrahams 2002. // (C) Copyright Jeremy Siek 2002. // (C) Copyright Thomas Witt 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_ITERATOR_FACADE_23022003THW_HPP #define BOOST_ITERATOR_FACADE_23022003THW_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // this goes last namespace boost { // This forward declaration is required for the friend declaration // in iterator_core_access template class iterator_facade; namespace detail { // A binary metafunction class that always returns bool. VC6 // ICEs on mpl::always, probably because of the default // parameters. struct always_bool2 { template struct apply { typedef bool type; }; }; // // enable if for use in operator implementation. // template < class Facade1 , class Facade2 , class Return > struct enable_if_interoperable #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) { typedef typename mpl::if_< mpl::or_< is_convertible , is_convertible > , Return , int[3] >::type type; }; #else : ::boost::iterators::enable_if< mpl::or_< is_convertible , is_convertible > , Return > {}; #endif // // Generates associated types for an iterator_facade with the // given parameters. // template < class ValueParam , class CategoryOrTraversal , class Reference , class Difference > struct iterator_facade_types { typedef typename facade_iterator_category< CategoryOrTraversal, ValueParam, Reference >::type iterator_category; typedef typename remove_const::type value_type; // Not the real associated pointer type typedef typename mpl::eval_if< boost::detail::iterator_writability_disabled , add_pointer , add_pointer >::type pointer; # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && (BOOST_WORKAROUND(_STLPORT_VERSION, BOOST_TESTED_AT(0x452)) \ || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, BOOST_TESTED_AT(310))) \ || BOOST_WORKAROUND(BOOST_RWSTD_VER, BOOST_TESTED_AT(0x20101)) \ || BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, <= 310) // To interoperate with some broken library/compiler // combinations, user-defined iterators must be derived from // std::iterator. It is possible to implement a standard // library for broken compilers without this limitation. # define BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE 1 typedef iterator base; # endif }; // iterators whose dereference operators reference the same value // for all iterators into the same sequence (like many input // iterators) need help with their postfix ++: the referenced // value must be read and stored away before the increment occurs // so that *a++ yields the originally referenced element and not // the next one. template class postfix_increment_proxy { typedef typename iterator_value::type value_type; public: explicit postfix_increment_proxy(Iterator const& x) : stored_value(*x) {} // Returning a mutable reference allows nonsense like // (*r++).mutate(), but it imposes fewer assumptions about the // behavior of the value_type. In particular, recall that // (*r).mutate() is legal if operator* returns by value. value_type& operator*() const { return this->stored_value; } private: mutable value_type stored_value; }; // // In general, we can't determine that such an iterator isn't // writable -- we also need to store a copy of the old iterator so // that it can be written into. template class writable_postfix_increment_proxy { typedef typename iterator_value::type value_type; public: explicit writable_postfix_increment_proxy(Iterator const& x) : stored_value(*x) , stored_iterator(x) {} // Dereferencing must return a proxy so that both *r++ = o and // value_type(*r++) can work. In this case, *r is the same as // *r++, and the conversion operator below is used to ensure // readability. writable_postfix_increment_proxy const& operator*() const { return *this; } // Provides readability of *r++ operator value_type&() const { return stored_value; } // Provides writability of *r++ template T const& operator=(T const& x) const { *this->stored_iterator = x; return x; } // This overload just in case only non-const objects are writable template T& operator=(T& x) const { *this->stored_iterator = x; return x; } // Provides X(r++) operator Iterator const&() const { return stored_iterator; } private: mutable value_type stored_value; Iterator stored_iterator; }; # ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_non_proxy_reference_impl { static Reference r; template static typename mpl::if_< is_convertible< R const volatile* , Value const volatile* > , char[1] , char[2] >::type& helper(R const&); BOOST_STATIC_CONSTANT(bool, value = sizeof(helper(r)) == 1); }; template struct is_non_proxy_reference : mpl::bool_< is_non_proxy_reference_impl::value > {}; # else template struct is_non_proxy_reference : is_convertible< typename remove_reference::type const volatile* , Value const volatile* > {}; # endif // A metafunction to choose the result type of postfix ++ // // Because the C++98 input iterator requirements say that *r++ has // type T (value_type), implementations of some standard // algorithms like lexicographical_compare may use constructions // like: // // *r++ < *s++ // // If *r++ returns a proxy (as required if r is writable but not // multipass), this sort of expression will fail unless the proxy // supports the operator<. Since there are any number of such // operations, we're not going to try to support them. Therefore, // even if r++ returns a proxy, *r++ will only return a proxy if // *r also returns a proxy. template struct postfix_increment_result : mpl::eval_if< mpl::and_< // A proxy is only needed for readable iterators is_convertible // No multipass iterator can have values that disappear // before positions can be re-visited , mpl::not_< is_convertible< typename iterator_category_to_traversal::type , forward_traversal_tag > > > , mpl::if_< is_non_proxy_reference , postfix_increment_proxy , writable_postfix_increment_proxy > , mpl::identity > {}; // operator->() needs special support for input iterators to strictly meet the // standard's requirements. If *i is not a reference type, we must still // produce an lvalue to which a pointer can be formed. We do that by // returning a proxy object containing an instance of the reference object. template struct operator_arrow_dispatch // proxy references { struct proxy { explicit proxy(Reference const & x) : m_ref(x) {} Reference* operator->() { return boost::addressof(m_ref); } // This function is needed for MWCW and BCC, which won't call // operator-> again automatically per 13.3.1.2 para 8 operator Reference*() { return boost::addressof(m_ref); } Reference m_ref; }; typedef proxy result_type; static result_type apply(Reference const & x) { return result_type(x); } }; template struct operator_arrow_dispatch // "real" references { typedef Pointer result_type; static result_type apply(T& x) { return boost::addressof(x); } }; # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // Deal with ETI template<> struct operator_arrow_dispatch { typedef int result_type; }; # endif // A proxy return type for operator[], needed to deal with // iterators that may invalidate referents upon destruction. // Consider the temporary iterator in *(a + n) template class operator_brackets_proxy { // Iterator is actually an iterator_facade, so we do not have to // go through iterator_traits to access the traits. typedef typename Iterator::reference reference; typedef typename Iterator::value_type value_type; public: operator_brackets_proxy(Iterator const& iter) : m_iter(iter) {} operator reference() const { return *m_iter; } operator_brackets_proxy& operator=(value_type const& val) { *m_iter = val; return *this; } private: Iterator m_iter; }; // A metafunction that determines whether operator[] must return a // proxy, or whether it can simply return a copy of the value_type. template struct use_operator_brackets_proxy : mpl::not_< mpl::and_< // Really we want an is_copy_constructible trait here, // but is_POD will have to suffice in the meantime. boost::is_POD , iterator_writability_disabled > > {}; template struct operator_brackets_result { typedef typename mpl::if_< use_operator_brackets_proxy , operator_brackets_proxy , Value >::type type; }; template operator_brackets_proxy make_operator_brackets_result(Iterator const& iter, mpl::true_) { return operator_brackets_proxy(iter); } template typename Iterator::value_type make_operator_brackets_result(Iterator const& iter, mpl::false_) { return *iter; } struct choose_difference_type { template struct apply : # ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP iterator_difference # elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) mpl::if_< is_convertible , typename I1::difference_type , typename I2::difference_type > # else mpl::eval_if< is_convertible , iterator_difference , iterator_difference > # endif {}; }; } // namespace detail // Macros which describe the declarations of binary operators # ifdef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY # define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ template < \ class Derived1, class V1, class TC1, class Reference1, class Difference1 \ , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ > \ prefix typename mpl::apply2::type \ operator op( \ iterator_facade const& lhs \ , iterator_facade const& rhs) # else # define BOOST_ITERATOR_FACADE_INTEROP_HEAD(prefix, op, result_type) \ template < \ class Derived1, class V1, class TC1, class Reference1, class Difference1 \ , class Derived2, class V2, class TC2, class Reference2, class Difference2 \ > \ prefix typename boost::detail::enable_if_interoperable< \ Derived1, Derived2 \ , typename mpl::apply2::type \ >::type \ operator op( \ iterator_facade const& lhs \ , iterator_facade const& rhs) # endif # define BOOST_ITERATOR_FACADE_PLUS_HEAD(prefix,args) \ template \ prefix Derived operator+ args // // Helper class for granting access to the iterator core interface. // // The simple core interface is used by iterator_facade. The core // interface of a user/library defined iterator type should not be made public // so that it does not clutter the public interface. Instead iterator_core_access // should be made friend so that iterator_facade can access the core // interface through iterator_core_access. // class iterator_core_access { # if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) // Tasteless as this may seem, making all members public allows member templates // to work in the absence of member template friends. public: # else template friend class iterator_facade; # define BOOST_ITERATOR_FACADE_RELATION(op) \ BOOST_ITERATOR_FACADE_INTEROP_HEAD(friend,op, boost::detail::always_bool2); BOOST_ITERATOR_FACADE_RELATION(==) BOOST_ITERATOR_FACADE_RELATION(!=) BOOST_ITERATOR_FACADE_RELATION(<) BOOST_ITERATOR_FACADE_RELATION(>) BOOST_ITERATOR_FACADE_RELATION(<=) BOOST_ITERATOR_FACADE_RELATION(>=) # undef BOOST_ITERATOR_FACADE_RELATION BOOST_ITERATOR_FACADE_INTEROP_HEAD( friend, -, boost::detail::choose_difference_type) ; BOOST_ITERATOR_FACADE_PLUS_HEAD( friend inline , (iterator_facade const& , typename Derived::difference_type) ) ; BOOST_ITERATOR_FACADE_PLUS_HEAD( friend inline , (typename Derived::difference_type , iterator_facade const&) ) ; # endif template static typename Facade::reference dereference(Facade const& f) { return f.dereference(); } template static void increment(Facade& f) { f.increment(); } template static void decrement(Facade& f) { f.decrement(); } template static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::true_) { return f1.equal(f2); } template static bool equal(Facade1 const& f1, Facade2 const& f2, mpl::false_) { return f2.equal(f1); } template static void advance(Facade& f, typename Facade::difference_type n) { f.advance(n); } template static typename Facade1::difference_type distance_from( Facade1 const& f1, Facade2 const& f2, mpl::true_) { return -f1.distance_to(f2); } template static typename Facade2::difference_type distance_from( Facade1 const& f1, Facade2 const& f2, mpl::false_) { return f2.distance_to(f1); } // // Curiously Recurring Template interface. // template static I& derived(iterator_facade& facade) { return *static_cast(&facade); } template static I const& derived(iterator_facade const& facade) { return *static_cast(&facade); } private: // objects of this class are useless iterator_core_access(); //undefined }; // // iterator_facade - use as a public base class for defining new // standard-conforming iterators. // template < class Derived // The derived iterator type being constructed , class Value , class CategoryOrTraversal , class Reference = Value& , class Difference = std::ptrdiff_t > class iterator_facade # ifdef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE : public boost::detail::iterator_facade_types< Value, CategoryOrTraversal, Reference, Difference >::base # undef BOOST_ITERATOR_FACADE_NEEDS_ITERATOR_BASE # endif { private: // // Curiously Recurring Template interface. // Derived& derived() { return *static_cast(this); } Derived const& derived() const { return *static_cast(this); } typedef boost::detail::iterator_facade_types< Value, CategoryOrTraversal, Reference, Difference > associated_types; typedef boost::detail::operator_arrow_dispatch< Reference , typename associated_types::pointer > operator_arrow_dispatch_; protected: // For use by derived classes typedef iterator_facade iterator_facade_; public: typedef typename associated_types::value_type value_type; typedef Reference reference; typedef Difference difference_type; typedef typename operator_arrow_dispatch_::result_type pointer; typedef typename associated_types::iterator_category iterator_category; reference operator*() const { return iterator_core_access::dereference(this->derived()); } pointer operator->() const { return operator_arrow_dispatch_::apply(*this->derived()); } typename boost::detail::operator_brackets_result::type operator[](difference_type n) const { typedef boost::detail::use_operator_brackets_proxy use_proxy; return boost::detail::make_operator_brackets_result( this->derived() + n , use_proxy() ); } Derived& operator++() { iterator_core_access::increment(this->derived()); return this->derived(); } # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) typename boost::detail::postfix_increment_result::type operator++(int) { typename boost::detail::postfix_increment_result::type tmp(this->derived()); ++*this; return tmp; } # endif Derived& operator--() { iterator_core_access::decrement(this->derived()); return this->derived(); } Derived operator--(int) { Derived tmp(this->derived()); --*this; return tmp; } Derived& operator+=(difference_type n) { iterator_core_access::advance(this->derived(), n); return this->derived(); } Derived& operator-=(difference_type n) { iterator_core_access::advance(this->derived(), -n); return this->derived(); } Derived operator-(difference_type x) const { Derived result(this->derived()); return result -= x; } # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // There appears to be a bug which trashes the data of classes // derived from iterator_facade when they are assigned unless we // define this assignment operator. This bug is only revealed // (so far) in STLPort debug mode, but it's clearly a codegen // problem so we apply the workaround for all MSVC6. iterator_facade& operator=(iterator_facade const&) { return *this; } # endif }; # if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) template inline typename boost::detail::postfix_increment_result::type operator++( iterator_facade& i , int ) { typename boost::detail::postfix_increment_result::type tmp(*static_cast(&i)); ++i; return tmp; } # endif // // Comparison operator implementation. The library supplied operators // enables the user to provide fully interoperable constant/mutable // iterator types. I.e. the library provides all operators // for all mutable/constant iterator combinations. // // Note though that this kind of interoperability for constant/mutable // iterators is not required by the standard for container iterators. // All the standard asks for is a conversion mutable -> constant. // Most standard library implementations nowadays provide fully interoperable // iterator implementations, but there are still heavily used implementations // that do not provide them. (Actually it's even worse, they do not provide // them for only a few iterators.) // // ?? Maybe a BOOST_ITERATOR_NO_FULL_INTEROPERABILITY macro should // enable the user to turn off mixed type operators // // The library takes care to provide only the right operator overloads. // I.e. // // bool operator==(Iterator, Iterator); // bool operator==(ConstIterator, Iterator); // bool operator==(Iterator, ConstIterator); // bool operator==(ConstIterator, ConstIterator); // // ... // // In order to do so it uses c++ idioms that are not yet widely supported // by current compiler releases. The library is designed to degrade gracefully // in the face of compiler deficiencies. In general compiler // deficiencies result in less strict error checking and more obscure // error messages, functionality is not affected. // // For full operation compiler support for "Substitution Failure Is Not An Error" // (aka. enable_if) and boost::is_convertible is required. // // The following problems occur if support is lacking. // // Pseudo code // // --------------- // AdaptorA a1; // AdaptorA a2; // // // This will result in a no such overload error in full operation // // If enable_if or is_convertible is not supported // // The instantiation will fail with an error hopefully indicating that // // there is no operator== for Iterator1, Iterator2 // // The same will happen if no enable_if is used to remove // // false overloads from the templated conversion constructor // // of AdaptorA. // // a1 == a2; // ---------------- // // AdaptorA a; // AdaptorB b; // // // This will result in a no such overload error in full operation // // If enable_if is not supported the static assert used // // in the operator implementation will fail. // // This will accidently work if is_convertible is not supported. // // a == b; // ---------------- // # ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP # define BOOST_ITERATOR_CONVERTIBLE(a,b) mpl::true_() # else # define BOOST_ITERATOR_CONVERTIBLE(a,b) is_convertible() # endif # define BOOST_ITERATOR_FACADE_INTEROP(op, result_type, return_prefix, base_op) \ BOOST_ITERATOR_FACADE_INTEROP_HEAD(inline, op, result_type) \ { \ /* For those compilers that do not support enable_if */ \ BOOST_STATIC_ASSERT(( \ is_interoperable< Derived1, Derived2 >::value \ )); \ return_prefix iterator_core_access::base_op( \ *static_cast(&lhs) \ , *static_cast(&rhs) \ , BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \ ); \ } # define BOOST_ITERATOR_FACADE_RELATION(op, return_prefix, base_op) \ BOOST_ITERATOR_FACADE_INTEROP( \ op \ , boost::detail::always_bool2 \ , return_prefix \ , base_op \ ) BOOST_ITERATOR_FACADE_RELATION(==, return, equal) BOOST_ITERATOR_FACADE_RELATION(!=, return !, equal) BOOST_ITERATOR_FACADE_RELATION(<, return 0 >, distance_from) BOOST_ITERATOR_FACADE_RELATION(>, return 0 <, distance_from) BOOST_ITERATOR_FACADE_RELATION(<=, return 0 >=, distance_from) BOOST_ITERATOR_FACADE_RELATION(>=, return 0 <=, distance_from) # undef BOOST_ITERATOR_FACADE_RELATION // operator- requires an additional part in the static assertion BOOST_ITERATOR_FACADE_INTEROP( - , boost::detail::choose_difference_type , return , distance_from ) # undef BOOST_ITERATOR_FACADE_INTEROP # undef BOOST_ITERATOR_FACADE_INTEROP_HEAD # define BOOST_ITERATOR_FACADE_PLUS(args) \ BOOST_ITERATOR_FACADE_PLUS_HEAD(inline, args) \ { \ Derived tmp(static_cast(i)); \ return tmp += n; \ } BOOST_ITERATOR_FACADE_PLUS(( iterator_facade const& i , typename Derived::difference_type n )) BOOST_ITERATOR_FACADE_PLUS(( typename Derived::difference_type n , iterator_facade const& i )) # undef BOOST_ITERATOR_FACADE_PLUS # undef BOOST_ITERATOR_FACADE_PLUS_HEAD } // namespace boost #include #endif // BOOST_ITERATOR_FACADE_23022003THW_HPP passenger-4.0.37/ext/boost/iterator/iterator_traits.hpp000644 000765 000024 00000003762 12233035540 023733 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2003. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef ITERATOR_TRAITS_DWA200347_HPP # define ITERATOR_TRAITS_DWA200347_HPP # include # include namespace boost { // Unfortunately, g++ 2.95.x chokes when we define a class template // iterator_category which has the same name as its // std::iterator_category() function, probably due in part to the // "std:: is visible globally" hack it uses. Use // BOOST_ITERATOR_CATEGORY to write code that's portable to older // GCCs. # if BOOST_WORKAROUND(__GNUC__, <= 2) # define BOOST_ITERATOR_CATEGORY iterator_category_ # else # define BOOST_ITERATOR_CATEGORY iterator_category # endif template struct iterator_value { typedef typename boost::detail::iterator_traits::value_type type; }; template struct iterator_reference { typedef typename boost::detail::iterator_traits::reference type; }; template struct iterator_pointer { typedef typename boost::detail::iterator_traits::pointer type; }; template struct iterator_difference { typedef typename boost::detail::iterator_traits::difference_type type; }; template struct BOOST_ITERATOR_CATEGORY { typedef typename boost::detail::iterator_traits::iterator_category type; }; # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) template <> struct iterator_value { typedef void type; }; template <> struct iterator_reference { typedef void type; }; template <> struct iterator_pointer { typedef void type; }; template <> struct iterator_difference { typedef void type; }; template <> struct BOOST_ITERATOR_CATEGORY { typedef void type; }; # endif } // namespace boost::iterator #endif // ITERATOR_TRAITS_DWA200347_HPP passenger-4.0.37/ext/boost/iterator/reverse_iterator.hpp000644 000765 000024 00000003612 12233035540 024072 0ustar00honglistaff000000 000000 // (C) Copyright David Abrahams 2002. // (C) Copyright Jeremy Siek 2002. // (C) Copyright Thomas Witt 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP #define BOOST_REVERSE_ITERATOR_23022003THW_HPP #include #include #include namespace boost { // // // template class reverse_iterator : public iterator_adaptor< reverse_iterator, Iterator > { typedef iterator_adaptor< reverse_iterator, Iterator > super_t; friend class iterator_core_access; public: reverse_iterator() {} explicit reverse_iterator(Iterator x) : super_t(x) {} template reverse_iterator( reverse_iterator const& r , typename enable_if_convertible::type* = 0 ) : super_t(r.base()) {} private: typename super_t::reference dereference() const { return *boost::prior(this->base()); } void increment() { --this->base_reference(); } void decrement() { ++this->base_reference(); } void advance(typename super_t::difference_type n) { this->base_reference() += -n; } template typename super_t::difference_type distance_to(reverse_iterator const& y) const { return this->base_reference() - y.base(); } }; template reverse_iterator make_reverse_iterator(BidirectionalIterator x) { return reverse_iterator(x); } } // namespace boost #endif // BOOST_REVERSE_ITERATOR_23022003THW_HPP passenger-4.0.37/ext/boost/iterator/transform_iterator.hpp000644 000765 000024 00000013210 12233035540 024425 0ustar00honglistaff000000 000000 // (C) Copyright David Abrahams 2002. // (C) Copyright Jeremy Siek 2002. // (C) Copyright Thomas Witt 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_TRANSFORM_ITERATOR_23022003THW_HPP #define BOOST_TRANSFORM_ITERATOR_23022003THW_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) # include #endif #include namespace boost { template class transform_iterator; namespace detail { // Compute the iterator_adaptor instantiation to be used for transform_iterator template struct transform_iterator_base { private: // By default, dereferencing the iterator yields the same as // the function. typedef typename ia_dflt_help< Reference , result_of::reference)> >::type reference; // To get the default for Value: remove any reference on the // result type, but retain any constness to signal // non-writability. Note that if we adopt Thomas' suggestion // to key non-writability *only* on the Reference argument, // we'd need to strip constness here as well. typedef typename ia_dflt_help< Value , remove_reference >::type cv_value_type; public: typedef iterator_adaptor< transform_iterator , Iterator , cv_value_type , use_default // Leave the traversal category alone , reference > type; }; } template class transform_iterator : public boost::detail::transform_iterator_base::type { typedef typename boost::detail::transform_iterator_base::type super_t; friend class iterator_core_access; public: transform_iterator() { } transform_iterator(Iterator const& x, UnaryFunc f) : super_t(x), m_f(f) { } explicit transform_iterator(Iterator const& x) : super_t(x) { // Pro8 is a little too aggressive about instantiating the // body of this function. #if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) // don't provide this constructor if UnaryFunc is a // function pointer type, since it will be 0. Too dangerous. BOOST_STATIC_ASSERT(is_class::value); #endif } template < class OtherUnaryFunction , class OtherIterator , class OtherReference , class OtherValue> transform_iterator( transform_iterator const& t , typename enable_if_convertible::type* = 0 #if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) , typename enable_if_convertible::type* = 0 #endif ) : super_t(t.base()), m_f(t.functor()) {} UnaryFunc functor() const { return m_f; } private: typename super_t::reference dereference() const { return m_f(*this->base()); } // Probably should be the initial base class so it can be // optimized away via EBO if it is an empty class. UnaryFunc m_f; }; template transform_iterator make_transform_iterator(Iterator it, UnaryFunc fun) { return transform_iterator(it, fun); } // Version which allows explicit specification of the UnaryFunc // type. // // This generator is not provided if UnaryFunc is a function // pointer type, because it's too dangerous: the default-constructed // function pointer in the iterator be 0, leading to a runtime // crash. template #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) typename mpl::if_< #else typename iterators::enable_if< #endif is_class // We should probably find a cheaper test than is_class<> , transform_iterator #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) , int[3] #endif >::type make_transform_iterator(Iterator it) { return transform_iterator(it, UnaryFunc()); } #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) template transform_iterator< Return (*)(Argument), Iterator, Return> make_transform_iterator(Iterator it, Return (*fun)(Argument)) { return transform_iterator(it, fun); } #endif } // namespace boost #include #endif // BOOST_TRANSFORM_ITERATOR_23022003THW_HPP passenger-4.0.37/ext/boost/iterator/detail/config_def.hpp000644 000765 000024 00000010562 12233035540 024035 0ustar00honglistaff000000 000000 // (C) Copyright David Abrahams 2002. // (C) Copyright Jeremy Siek 2002. // (C) Copyright Thomas Witt 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // no include guard multiple inclusion intended // // This is a temporary workaround until the bulk of this is // available in boost config. // 23/02/03 thw // #include // for prior #include #ifdef BOOST_ITERATOR_CONFIG_DEF # error you have nested config_def #inclusion. #else # define BOOST_ITERATOR_CONFIG_DEF #endif // We enable this always now. Otherwise, the simple case in // libs/iterator/test/constant_iterator_arrow.cpp fails to compile // because the operator-> return is improperly deduced as a non-const // pointer. #if 1 || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531)) // Recall that in general, compilers without partial specialization // can't strip constness. Consider counting_iterator, which normally // passes a const Value to iterator_facade. As a result, any code // which makes a std::vector of the iterator's value_type will fail // when its allocator declares functions overloaded on reference and // const_reference (the same type). // // Furthermore, Borland 5.5.1 drops constness in enough ways that we // end up using a proxy for operator[] when we otherwise shouldn't. // Using reference constness gives it an extra hint that it can // return the value_type from operator[] directly, but is not // strictly necessary. Not sure how best to resolve this one. # define BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY 1 #endif #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x5A0)) \ || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \ || BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) \ || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) # define BOOST_NO_LVALUE_RETURN_DETECTION # if 0 // test code struct v {}; typedef char (&no)[3]; template no foo(T const&, ...); template char foo(T&, int); struct value_iterator { v operator*() const; }; template struct lvalue_deref_helper { static T& x; enum { value = (sizeof(foo(*x,0)) == 1) }; }; int z2[(lvalue_deref_helper::value == 1) ? 1 : -1]; int z[(lvalue_deref_helper::value) == 1 ? -1 : 1 ]; # endif #endif #if BOOST_WORKAROUND(__MWERKS__, <=0x2407) # define BOOST_NO_IS_CONVERTIBLE // "is_convertible doesn't work for simple types" #endif #if BOOST_WORKAROUND(__GNUC__, == 2) \ || BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4) && !defined(__EDG_VERSION__) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) # define BOOST_NO_IS_CONVERTIBLE_TEMPLATE // The following program fails to compile: # if 0 // test code #include template struct foo { foo(T); template foo(foo const& other) : p(other.p) { } T p; }; bool x = boost::is_convertible, foo >::value; # endif #endif #if !defined(BOOST_MSVC) && (defined(BOOST_NO_SFINAE) || defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_IS_CONVERTIBLE_TEMPLATE)) # define BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY #endif # if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # define BOOST_ARG_DEPENDENT_TYPENAME typename # else # define BOOST_ARG_DEPENDENT_TYPENAME # endif # if BOOST_WORKAROUND(__GNUC__, == 2) && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(95)) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // GCC-2.95 eagerly instantiates templated constructors and conversion // operators in convertibility checks, causing premature errors. // // Borland's problems are harder to diagnose due to lack of an // instantiation stack backtrace. They may be due in part to the fact // that it drops cv-qualification willy-nilly in templates. # define BOOST_NO_ONE_WAY_ITERATOR_INTEROP # endif // no include guard; multiple inclusion intended passenger-4.0.37/ext/boost/iterator/detail/config_undef.hpp000644 000765 000024 00000001322 12233035540 024372 0ustar00honglistaff000000 000000 // (C) Copyright Thomas Witt 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // no include guard multiple inclusion intended // // This is a temporary workaround until the bulk of this is // available in boost config. // 23/02/03 thw // #undef BOOST_NO_IS_CONVERTIBLE #undef BOOST_NO_IS_CONVERTIBLE_TEMPLATE #undef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY #undef BOOST_ARG_DEPENDENT_TYPENAME #undef BOOST_NO_LVALUE_RETURN_DETECTION #undef BOOST_NO_ONE_WAY_ITERATOR_INTEROP #ifdef BOOST_ITERATOR_CONFIG_DEF # undef BOOST_ITERATOR_CONFIG_DEF #else # error missing or nested #include config_def #endif passenger-4.0.37/ext/boost/iterator/detail/enable_if.hpp000644 000765 000024 00000003733 12233035540 023660 0ustar00honglistaff000000 000000 // (C) Copyright David Abrahams 2002. // (C) Copyright Jeremy Siek 2002. // (C) Copyright Thomas Witt 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_ENABLE_IF_23022003THW_HPP #define BOOST_ENABLE_IF_23022003THW_HPP #include #include #include // // Boost iterators uses its own enable_if cause we need // special semantics for deficient compilers. // 23/02/03 thw // namespace boost { namespace iterators { // // Base machinery for all kinds of enable if // template struct enabled { template struct base { typedef T type; }; }; // // For compilers that don't support "Substitution Failure Is Not An Error" // enable_if falls back to always enabled. See comments // on operator implementation for consequences. // template<> struct enabled { template struct base { #ifdef BOOST_NO_SFINAE typedef T type; // This way to do it would give a nice error message containing // invalid overload, but has the big disadvantage that // there is no reference to user code in the error message. // // struct invalid_overload; // typedef invalid_overload type; // #endif }; }; template struct enable_if # if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_IS_CONVERTIBLE) : enabled<(Cond::value)>::template base # else : mpl::identity # endif { # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) typedef Return type; # endif }; } // namespace iterators } // namespace boost #include #endif // BOOST_ENABLE_IF_23022003THW_HPP passenger-4.0.37/ext/boost/iterator/detail/facade_iterator_category.hpp000644 000765 000024 00000014304 12233035540 026761 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2003. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef FACADE_ITERATOR_CATEGORY_DWA20031118_HPP # define FACADE_ITERATOR_CATEGORY_DWA20031118_HPP # include # include // used in iterator_tag inheritance logic # include # include # include # include # include # include # include # include # include # include # include // try to keep this last # ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY # include # endif // // iterator_category deduction for iterator_facade // // forward declaration namespace boost { struct use_default; } namespace boost { namespace detail { struct input_output_iterator_tag : std::input_iterator_tag { // Using inheritance for only input_iterator_tag helps to avoid // ambiguities when a stdlib implementation dispatches on a // function which is overloaded on both input_iterator_tag and // output_iterator_tag, as STLPort does, in its __valid_range // function. I claim it's better to avoid the ambiguity in these // cases. operator std::output_iterator_tag() const { return std::output_iterator_tag(); } }; // // True iff the user has explicitly disabled writability of this // iterator. Pass the iterator_facade's Value parameter and its // nested ::reference type. // template struct iterator_writability_disabled # ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY // Adding Thomas' logic? : mpl::or_< is_const , boost::detail::indirect_traits::is_reference_to_const , is_const > # else : is_const # endif {}; // // Convert an iterator_facade's traversal category, Value parameter, // and ::reference type to an appropriate old-style category. // // If writability has been disabled per the above metafunction, the // result will not be convertible to output_iterator_tag. // // Otherwise, if Traversal == single_pass_traversal_tag, the following // conditions will result in a tag that is convertible both to // input_iterator_tag and output_iterator_tag: // // 1. Reference is a reference to non-const // 2. Reference is not a reference and is convertible to Value // template struct iterator_facade_default_category : mpl::eval_if< mpl::and_< is_reference , is_convertible > , mpl::eval_if< is_convertible , mpl::identity , mpl::if_< is_convertible , std::bidirectional_iterator_tag , std::forward_iterator_tag > > , typename mpl::eval_if< mpl::and_< is_convertible // check for readability , is_convertible > , mpl::identity , mpl::identity > > { }; // True iff T is convertible to an old-style iterator category. template struct is_iterator_category : mpl::or_< is_convertible , is_convertible > { }; template struct is_iterator_traversal : is_convertible {}; // // A composite iterator_category tag convertible to Category (a pure // old-style category) and Traversal (a pure traversal tag). // Traversal must be a strict increase of the traversal power given by // Category. // template struct iterator_category_with_traversal : Category, Traversal { # if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) // Make sure this isn't used to build any categories where // convertibility to Traversal is redundant. Should just use the // Category element in that case. BOOST_MPL_ASSERT_NOT(( is_convertible< typename iterator_category_to_traversal::type , Traversal >)); BOOST_MPL_ASSERT((is_iterator_category)); BOOST_MPL_ASSERT_NOT((is_iterator_category)); BOOST_MPL_ASSERT_NOT((is_iterator_traversal)); # if !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) BOOST_MPL_ASSERT((is_iterator_traversal)); # endif # endif }; // Computes an iterator_category tag whose traversal is Traversal and // which is appropriate for an iterator template struct facade_iterator_category_impl { # if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) BOOST_MPL_ASSERT_NOT((is_iterator_category)); # endif typedef typename iterator_facade_default_category< Traversal,ValueParam,Reference >::type category; typedef typename mpl::if_< is_same< Traversal , typename iterator_category_to_traversal::type > , category , iterator_category_with_traversal >::type type; }; // // Compute an iterator_category for iterator_facade // template struct facade_iterator_category : mpl::eval_if< is_iterator_category , mpl::identity // old-style categories are fine as-is , facade_iterator_category_impl > { }; }} // namespace boost::detail # include #endif // FACADE_ITERATOR_CATEGORY_DWA20031118_HPP passenger-4.0.37/ext/boost/iterator/detail/minimum_category.hpp000644 000765 000024 00000005327 12233035540 025325 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2003. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef MINIMUM_CATEGORY_DWA20031119_HPP # define MINIMUM_CATEGORY_DWA20031119_HPP # include # include # include namespace boost { namespace detail { // // Returns the minimum category type or error_type // if T1 and T2 are unrelated. // // For compilers not supporting is_convertible this only // works with the new boost return and traversal category // types. The exact boost _types_ are required. No derived types // will work. // // template struct minimum_category_impl # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) { template struct apply { typedef T2 type; }; typedef void type; } # endif ; template struct error_not_related_by_convertibility; template <> struct minimum_category_impl { template struct apply { typedef T2 type; }; }; template <> struct minimum_category_impl { template struct apply { typedef T1 type; }; }; template <> struct minimum_category_impl { template struct apply { BOOST_STATIC_ASSERT((is_same::value)); typedef T1 type; }; }; template <> struct minimum_category_impl { template struct apply : error_not_related_by_convertibility { }; }; template struct minimum_category { typedef minimum_category_impl< # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround is_same::value || # endif ::boost::is_convertible::value , ::boost::is_convertible::value # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround || is_same::value # endif > outer; typedef typename outer::template apply inner; typedef typename inner::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,minimum_category,(T1,T2)) }; template <> struct minimum_category { template struct apply : minimum_category {}; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,minimum_category,(mpl::_1,mpl::_2)) }; # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround template <> struct minimum_category { typedef int type; }; # endif }} // namespace boost::detail #endif // MINIMUM_CATEGORY_DWA20031119_HPP passenger-4.0.37/ext/boost/io/ios_state.hpp000644 000765 000024 00000027025 12233035540 021262 0ustar00honglistaff000000 000000 // Boost io/ios_state.hpp header file --------------------------------------// // Copyright 2002, 2005 Daryle Walker. Use, modification, and distribution // are subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or a copy at .) // See for the library's home page. #ifndef BOOST_IO_IOS_STATE_HPP #define BOOST_IO_IOS_STATE_HPP #include // self include #include #include // for std::ios_base, std::basic_ios, etc. #ifndef BOOST_NO_STD_LOCALE #include // for std::locale #endif #include // for std::basic_ostream #include // for std::basic_streambuf #include // for std::char_traits namespace boost { namespace io { // Basic stream state saver class declarations -----------------------------// class ios_flags_saver { public: typedef ::std::ios_base state_type; typedef ::std::ios_base::fmtflags aspect_type; explicit ios_flags_saver( state_type &s ) : s_save_( s ), a_save_( s.flags() ) {} ios_flags_saver( state_type &s, aspect_type const &a ) : s_save_( s ), a_save_( s.flags(a) ) {} ~ios_flags_saver() { this->restore(); } void restore() { s_save_.flags( a_save_ ); } private: state_type & s_save_; aspect_type const a_save_; ios_flags_saver& operator=(const ios_flags_saver&); }; class ios_precision_saver { public: typedef ::std::ios_base state_type; typedef ::std::streamsize aspect_type; explicit ios_precision_saver( state_type &s ) : s_save_( s ), a_save_( s.precision() ) {} ios_precision_saver( state_type &s, aspect_type const &a ) : s_save_( s ), a_save_( s.precision(a) ) {} ~ios_precision_saver() { this->restore(); } void restore() { s_save_.precision( a_save_ ); } private: state_type & s_save_; aspect_type const a_save_; ios_precision_saver& operator=(const ios_precision_saver&); }; class ios_width_saver { public: typedef ::std::ios_base state_type; typedef ::std::streamsize aspect_type; explicit ios_width_saver( state_type &s ) : s_save_( s ), a_save_( s.width() ) {} ios_width_saver( state_type &s, aspect_type const &a ) : s_save_( s ), a_save_( s.width(a) ) {} ~ios_width_saver() { this->restore(); } void restore() { s_save_.width( a_save_ ); } private: state_type & s_save_; aspect_type const a_save_; ios_width_saver& operator=(const ios_width_saver&); }; // Advanced stream state saver class template declarations -----------------// template < typename Ch, class Tr > class basic_ios_iostate_saver { public: typedef ::std::basic_ios state_type; typedef ::std::ios_base::iostate aspect_type; explicit basic_ios_iostate_saver( state_type &s ) : s_save_( s ), a_save_( s.rdstate() ) {} basic_ios_iostate_saver( state_type &s, aspect_type const &a ) : s_save_( s ), a_save_( s.rdstate() ) { s.clear(a); } ~basic_ios_iostate_saver() { this->restore(); } void restore() { s_save_.clear( a_save_ ); } private: state_type & s_save_; aspect_type const a_save_; basic_ios_iostate_saver& operator=(const basic_ios_iostate_saver&); }; template < typename Ch, class Tr > class basic_ios_exception_saver { public: typedef ::std::basic_ios state_type; typedef ::std::ios_base::iostate aspect_type; explicit basic_ios_exception_saver( state_type &s ) : s_save_( s ), a_save_( s.exceptions() ) {} #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) basic_ios_exception_saver( state_type &s, aspect_type a ) #else basic_ios_exception_saver( state_type &s, aspect_type const &a ) #endif : s_save_( s ), a_save_( s.exceptions() ) { s.exceptions(a); } ~basic_ios_exception_saver() { this->restore(); } void restore() { s_save_.exceptions( a_save_ ); } private: state_type & s_save_; aspect_type const a_save_; basic_ios_exception_saver& operator=(const basic_ios_exception_saver&); }; template < typename Ch, class Tr > class basic_ios_tie_saver { public: typedef ::std::basic_ios state_type; typedef ::std::basic_ostream * aspect_type; explicit basic_ios_tie_saver( state_type &s ) : s_save_( s ), a_save_( s.tie() ) {} basic_ios_tie_saver( state_type &s, aspect_type const &a ) : s_save_( s ), a_save_( s.tie(a) ) {} ~basic_ios_tie_saver() { this->restore(); } void restore() { s_save_.tie( a_save_ ); } private: state_type & s_save_; aspect_type const a_save_; basic_ios_tie_saver& operator=(const basic_ios_tie_saver&); }; template < typename Ch, class Tr > class basic_ios_rdbuf_saver { public: typedef ::std::basic_ios state_type; typedef ::std::basic_streambuf * aspect_type; explicit basic_ios_rdbuf_saver( state_type &s ) : s_save_( s ), a_save_( s.rdbuf() ) {} basic_ios_rdbuf_saver( state_type &s, aspect_type const &a ) : s_save_( s ), a_save_( s.rdbuf(a) ) {} ~basic_ios_rdbuf_saver() { this->restore(); } void restore() { s_save_.rdbuf( a_save_ ); } private: state_type & s_save_; aspect_type const a_save_; basic_ios_rdbuf_saver& operator=(const basic_ios_rdbuf_saver&); }; template < typename Ch, class Tr > class basic_ios_fill_saver { public: typedef ::std::basic_ios state_type; typedef typename state_type::char_type aspect_type; explicit basic_ios_fill_saver( state_type &s ) : s_save_( s ), a_save_( s.fill() ) {} basic_ios_fill_saver( state_type &s, aspect_type const &a ) : s_save_( s ), a_save_( s.fill(a) ) {} ~basic_ios_fill_saver() { this->restore(); } void restore() { s_save_.fill( a_save_ ); } private: state_type & s_save_; aspect_type const a_save_; basic_ios_fill_saver& operator=(const basic_ios_fill_saver&); }; #ifndef BOOST_NO_STD_LOCALE template < typename Ch, class Tr > class basic_ios_locale_saver { public: typedef ::std::basic_ios state_type; typedef ::std::locale aspect_type; explicit basic_ios_locale_saver( state_type &s ) : s_save_( s ), a_save_( s.getloc() ) {} basic_ios_locale_saver( state_type &s, aspect_type const &a ) : s_save_( s ), a_save_( s.imbue(a) ) {} ~basic_ios_locale_saver() { this->restore(); } void restore() { s_save_.imbue( a_save_ ); } private: state_type & s_save_; aspect_type const a_save_; basic_ios_locale_saver& operator=(const basic_ios_locale_saver&); }; #endif // User-defined stream state saver class declarations ----------------------// class ios_iword_saver { public: typedef ::std::ios_base state_type; typedef int index_type; typedef long aspect_type; explicit ios_iword_saver( state_type &s, index_type i ) : s_save_( s ), a_save_( s.iword(i) ), i_save_( i ) {} ios_iword_saver( state_type &s, index_type i, aspect_type const &a ) : s_save_( s ), a_save_( s.iword(i) ), i_save_( i ) { s.iword(i) = a; } ~ios_iword_saver() { this->restore(); } void restore() { s_save_.iword( i_save_ ) = a_save_; } private: state_type & s_save_; aspect_type const a_save_; index_type const i_save_; ios_iword_saver& operator=(const ios_iword_saver&); }; class ios_pword_saver { public: typedef ::std::ios_base state_type; typedef int index_type; typedef void * aspect_type; explicit ios_pword_saver( state_type &s, index_type i ) : s_save_( s ), a_save_( s.pword(i) ), i_save_( i ) {} ios_pword_saver( state_type &s, index_type i, aspect_type const &a ) : s_save_( s ), a_save_( s.pword(i) ), i_save_( i ) { s.pword(i) = a; } ~ios_pword_saver() { this->restore(); } void restore() { s_save_.pword( i_save_ ) = a_save_; } private: state_type & s_save_; aspect_type const a_save_; index_type const i_save_; ios_pword_saver operator=(const ios_pword_saver&); }; // Combined stream state saver class (template) declarations ---------------// class ios_base_all_saver { public: typedef ::std::ios_base state_type; explicit ios_base_all_saver( state_type &s ) : s_save_( s ), a1_save_( s.flags() ), a2_save_( s.precision() ) , a3_save_( s.width() ) {} ~ios_base_all_saver() { this->restore(); } void restore() { s_save_.width( a3_save_ ); s_save_.precision( a2_save_ ); s_save_.flags( a1_save_ ); } private: state_type & s_save_; state_type::fmtflags const a1_save_; ::std::streamsize const a2_save_; ::std::streamsize const a3_save_; ios_base_all_saver& operator=(const ios_base_all_saver&); }; template < typename Ch, class Tr > class basic_ios_all_saver { public: typedef ::std::basic_ios state_type; explicit basic_ios_all_saver( state_type &s ) : s_save_( s ), a1_save_( s.flags() ), a2_save_( s.precision() ) , a3_save_( s.width() ), a4_save_( s.rdstate() ) , a5_save_( s.exceptions() ), a6_save_( s.tie() ) , a7_save_( s.rdbuf() ), a8_save_( s.fill() ) #ifndef BOOST_NO_STD_LOCALE , a9_save_( s.getloc() ) #endif {} ~basic_ios_all_saver() { this->restore(); } void restore() { #ifndef BOOST_NO_STD_LOCALE s_save_.imbue( a9_save_ ); #endif s_save_.fill( a8_save_ ); s_save_.rdbuf( a7_save_ ); s_save_.tie( a6_save_ ); s_save_.exceptions( a5_save_ ); s_save_.clear( a4_save_ ); s_save_.width( a3_save_ ); s_save_.precision( a2_save_ ); s_save_.flags( a1_save_ ); } private: state_type & s_save_; typename state_type::fmtflags const a1_save_; ::std::streamsize const a2_save_; ::std::streamsize const a3_save_; typename state_type::iostate const a4_save_; typename state_type::iostate const a5_save_; ::std::basic_ostream * const a6_save_; ::std::basic_streambuf * const a7_save_; typename state_type::char_type const a8_save_; #ifndef BOOST_NO_STD_LOCALE ::std::locale const a9_save_; #endif basic_ios_all_saver& operator=(const basic_ios_all_saver&); }; class ios_all_word_saver { public: typedef ::std::ios_base state_type; typedef int index_type; ios_all_word_saver( state_type &s, index_type i ) : s_save_( s ), i_save_( i ), a1_save_( s.iword(i) ) , a2_save_( s.pword(i) ) {} ~ios_all_word_saver() { this->restore(); } void restore() { s_save_.pword( i_save_ ) = a2_save_; s_save_.iword( i_save_ ) = a1_save_; } private: state_type & s_save_; index_type const i_save_; long const a1_save_; void * const a2_save_; ios_all_word_saver& operator=(const ios_all_word_saver&); }; } // namespace io } // namespace boost #endif // BOOST_IO_IOS_STATE_HPP passenger-4.0.37/ext/boost/integer/static_log2.hpp000644 000765 000024 00000006724 12233035540 022533 0ustar00honglistaff000000 000000 // -------------- Boost static_log2.hpp header file ----------------------- // // // Copyright (C) 2001 Daryle Walker. // Copyright (C) 2003 Vesa Karvonen. // Copyright (C) 2003 Gennaro Prota. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // --------------------------------------------------- // See http://www.boost.org/libs/integer for documentation. // ------------------------------------------------------------------------- // #ifndef BOOST_INTEGER_STATIC_LOG2_HPP #define BOOST_INTEGER_STATIC_LOG2_HPP #include "boost/integer_fwd.hpp" // for boost::intmax_t namespace boost { namespace detail { namespace static_log2_impl { // choose_initial_n<> // // Recursively doubles its integer argument, until it // becomes >= of the "width" (C99, 6.2.6.2p4) of // static_log2_argument_type. // // Used to get the maximum power of two less then the width. // // Example: if on your platform argument_type has 48 value // bits it yields n=32. // // It's easy to prove that, starting from such a value // of n, the core algorithm works correctly for any width // of static_log2_argument_type and that recursion always // terminates with x = 1 and n = 0 (see the algorithm's // invariant). typedef boost::static_log2_argument_type argument_type; typedef boost::static_log2_result_type result_type; template struct choose_initial_n { BOOST_STATIC_CONSTANT(bool, c = (argument_type(1) << n << n) != 0); BOOST_STATIC_CONSTANT( result_type, value = !c*n + choose_initial_n<2*c*n>::value ); }; template <> struct choose_initial_n<0> { BOOST_STATIC_CONSTANT(result_type, value = 0); }; // start computing from n_zero - must be a power of two const result_type n_zero = 16; const result_type initial_n = choose_initial_n::value; // static_log2_impl<> // // * Invariant: // 2n // 1 <= x && x < 2 at the start of each recursion // (see also choose_initial_n<>) // // * Type requirements: // // argument_type maybe any unsigned type with at least n_zero + 1 // value bits. (Note: If larger types will be standardized -e.g. // unsigned long long- then the argument_type typedef can be // changed without affecting the rest of the code.) // template struct static_log2_impl { BOOST_STATIC_CONSTANT(bool, c = (x >> n) > 0); // x >= 2**n ? BOOST_STATIC_CONSTANT( result_type, value = c*n + (static_log2_impl< (x>>c*n), n/2 >::value) ); }; template <> struct static_log2_impl<1, 0> { BOOST_STATIC_CONSTANT(result_type, value = 0); }; } } // detail // -------------------------------------- // static_log2 // ---------------------------------------- template struct static_log2 { BOOST_STATIC_CONSTANT( static_log2_result_type, value = detail::static_log2_impl::static_log2_impl::value ); }; template <> struct static_log2<0> { }; } #endif // include guard passenger-4.0.37/ext/boost/functional/hash/000755 000765 000024 00000000000 12233035540 021227 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/functional/hash.hpp000644 000765 000024 00000000353 12233035540 021741 0ustar00honglistaff000000 000000 // Copyright 2005-2009 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include passenger-4.0.37/ext/boost/functional/hash_fwd.hpp000644 000765 000024 00000000357 12233035540 022605 0ustar00honglistaff000000 000000 // Copyright 2005-2009 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include passenger-4.0.37/ext/boost/functional/hash/detail/000755 000765 000024 00000000000 12233035540 022471 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/functional/hash/extensions.hpp000644 000765 000024 00000025143 12233035540 024144 0ustar00honglistaff000000 000000 // Copyright 2005-2009 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf // issue 6.18. // This implements the extensions to the standard. // It's undocumented, so you shouldn't use it.... #if !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP) #define BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP #include #include #include #include #include #include #if !defined(BOOST_NO_CXX11_HDR_ARRAY) # include #endif #if !defined(BOOST_NO_CXX11_HDR_TUPLE) # include #endif #if !defined(BOOST_NO_CXX11_HDR_MEMORY) # include #endif #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) #include #endif #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) #include #endif namespace boost { template std::size_t hash_value(std::pair const&); template std::size_t hash_value(std::vector const&); template std::size_t hash_value(std::list const& v); template std::size_t hash_value(std::deque const& v); template std::size_t hash_value(std::set const& v); template std::size_t hash_value(std::multiset const& v); template std::size_t hash_value(std::map const& v); template std::size_t hash_value(std::multimap const& v); template std::size_t hash_value(std::complex const&); template std::size_t hash_value(std::pair const& v) { std::size_t seed = 0; boost::hash_combine(seed, v.first); boost::hash_combine(seed, v.second); return seed; } template std::size_t hash_value(std::vector const& v) { return boost::hash_range(v.begin(), v.end()); } template std::size_t hash_value(std::list const& v) { return boost::hash_range(v.begin(), v.end()); } template std::size_t hash_value(std::deque const& v) { return boost::hash_range(v.begin(), v.end()); } template std::size_t hash_value(std::set const& v) { return boost::hash_range(v.begin(), v.end()); } template std::size_t hash_value(std::multiset const& v) { return boost::hash_range(v.begin(), v.end()); } template std::size_t hash_value(std::map const& v) { return boost::hash_range(v.begin(), v.end()); } template std::size_t hash_value(std::multimap const& v) { return boost::hash_range(v.begin(), v.end()); } template std::size_t hash_value(std::complex const& v) { boost::hash hasher; std::size_t seed = hasher(v.imag()); seed ^= hasher(v.real()) + (seed<<6) + (seed>>2); return seed; } #if !defined(BOOST_NO_CXX11_HDR_ARRAY) template std::size_t hash_value(std::array const& v) { return boost::hash_range(v.begin(), v.end()); } #endif #if !defined(BOOST_NO_CXX11_HDR_TUPLE) namespace hash_detail { template inline typename boost::enable_if_c<(I == std::tuple_size::value), void>::type hash_combine_tuple(std::size_t&, T const&) { } template inline typename boost::enable_if_c<(I < std::tuple_size::value), void>::type hash_combine_tuple(std::size_t& seed, T const& v) { boost::hash_combine(seed, std::get(v)); boost::hash_detail::hash_combine_tuple(seed, v); } template inline std::size_t hash_tuple(T const& v) { std::size_t seed = 0; boost::hash_detail::hash_combine_tuple<0>(seed, v); return seed; } } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template inline std::size_t hash_value(std::tuple const& v) { return boost::hash_detail::hash_tuple(v); } #else inline std::size_t hash_value(std::tuple<> const& v) { return boost::hash_detail::hash_tuple(v); } # define BOOST_HASH_TUPLE_F(z, n, _) \ template< \ BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \ > \ inline std::size_t hash_value(std::tuple< \ BOOST_PP_ENUM_PARAMS_Z(z, n, A) \ > const& v) \ { \ return boost::hash_detail::hash_tuple(v); \ } BOOST_PP_REPEAT_FROM_TO(1, 11, BOOST_HASH_TUPLE_F, _) # undef BOOST_HASH_TUPLE_F #endif #endif #if !defined(BOOST_NO_CXX11_SMART_PTR) template inline std::size_t hash_value(std::shared_ptr const& x) { return boost::hash_value(x.get()); } template inline std::size_t hash_value(std::unique_ptr const& x) { return boost::hash_value(x.get()); } #endif // // call_hash_impl // // On compilers without function template ordering, this deals with arrays. #if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) namespace hash_detail { template struct call_hash_impl { template struct inner { static std::size_t call(T const& v) { using namespace boost; return hash_value(v); } }; }; template <> struct call_hash_impl { template struct inner { #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) static std::size_t call(Array const& v) #else static std::size_t call(Array& v) #endif { const int size = sizeof(v) / sizeof(*v); return boost::hash_range(v, v + size); } }; }; template struct call_hash : public call_hash_impl::value> ::BOOST_NESTED_TEMPLATE inner { }; } #endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING // // boost::hash // #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct hash : std::unary_function { #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) std::size_t operator()(T const& val) const { return hash_value(val); } #else std::size_t operator()(T const& val) const { return hash_detail::call_hash::call(val); } #endif }; #if BOOST_WORKAROUND(__DMC__, <= 0x848) template struct hash : std::unary_function { std::size_t operator()(const T* val) const { return boost::hash_range(val, val+n); } }; #endif #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // On compilers without partial specialization, boost::hash // has already been declared to deal with pointers, so just // need to supply the non-pointer version of hash_impl. namespace hash_detail { template struct hash_impl; #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) template <> struct hash_impl { template struct inner : std::unary_function { #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) std::size_t operator()(T const& val) const { return hash_value(val); } #else std::size_t operator()(T const& val) const { return hash_detail::call_hash::call(val); } #endif }; }; #else // Visual C++ 6.5 // Visual C++ 6.5 has problems with nested member functions and // applying const to const types in templates. So we get this: template struct hash_impl_msvc { template struct inner : public std::unary_function { std::size_t operator()(T const& val) const { return hash_detail::call_hash::call(val); } std::size_t operator()(T& val) const { return hash_detail::call_hash::call(val); } }; }; template <> struct hash_impl_msvc { template struct inner : public std::unary_function { std::size_t operator()(T& val) const { return hash_detail::call_hash::call(val); } }; }; template struct hash_impl_msvc2 : public hash_impl_msvc::value> ::BOOST_NESTED_TEMPLATE inner {}; template <> struct hash_impl { template struct inner : public hash_impl_msvc2 {}; }; #endif // Visual C++ 6.5 } #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } #endif passenger-4.0.37/ext/boost/functional/hash/hash.hpp000644 000765 000024 00000036740 12233035540 022675 0ustar00honglistaff000000 000000 // Copyright 2005-2009 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf // issue 6.18. #if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP) #define BOOST_FUNCTIONAL_HASH_HASH_HPP #include #include #include #include #include #include #include #include #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #include #endif #if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) #include #endif #if BOOST_WORKAROUND(__GNUC__, < 3) \ && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) #define BOOST_HASH_CHAR_TRAITS string_char_traits #else #define BOOST_HASH_CHAR_TRAITS char_traits #endif namespace boost { namespace hash_detail { struct enable_hash_value { typedef std::size_t type; }; template struct basic_numbers {}; template struct long_numbers; template struct ulong_numbers; template struct float_numbers {}; template <> struct basic_numbers : boost::hash_detail::enable_hash_value {}; template <> struct basic_numbers : boost::hash_detail::enable_hash_value {}; template <> struct basic_numbers : boost::hash_detail::enable_hash_value {}; template <> struct basic_numbers : boost::hash_detail::enable_hash_value {}; template <> struct basic_numbers : boost::hash_detail::enable_hash_value {}; template <> struct basic_numbers : boost::hash_detail::enable_hash_value {}; template <> struct basic_numbers : boost::hash_detail::enable_hash_value {}; template <> struct basic_numbers : boost::hash_detail::enable_hash_value {}; template <> struct basic_numbers : boost::hash_detail::enable_hash_value {}; template <> struct basic_numbers : boost::hash_detail::enable_hash_value {}; #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) template <> struct basic_numbers : boost::hash_detail::enable_hash_value {}; #endif // long_numbers is defined like this to allow for separate // specialization for long_long and int128_type, in case // they conflict. template struct long_numbers2 {}; template struct ulong_numbers2 {}; template struct long_numbers : long_numbers2 {}; template struct ulong_numbers : ulong_numbers2 {}; #if !defined(BOOST_NO_LONG_LONG) template <> struct long_numbers : boost::hash_detail::enable_hash_value {}; template <> struct ulong_numbers : boost::hash_detail::enable_hash_value {}; #endif #if defined(BOOST_HAS_INT128) template <> struct long_numbers2 : boost::hash_detail::enable_hash_value {}; template <> struct ulong_numbers2 : boost::hash_detail::enable_hash_value {}; #endif template <> struct float_numbers : boost::hash_detail::enable_hash_value {}; template <> struct float_numbers : boost::hash_detail::enable_hash_value {}; template <> struct float_numbers : boost::hash_detail::enable_hash_value {}; } template typename boost::hash_detail::basic_numbers::type hash_value(T); template typename boost::hash_detail::long_numbers::type hash_value(T); template typename boost::hash_detail::ulong_numbers::type hash_value(T); template typename boost::enable_if, std::size_t>::type hash_value(T); #if !BOOST_WORKAROUND(__DMC__, <= 0x848) template std::size_t hash_value(T* const&); #else template std::size_t hash_value(T*); #endif #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) template< class T, unsigned N > std::size_t hash_value(const T (&x)[N]); template< class T, unsigned N > std::size_t hash_value(T (&x)[N]); #endif template std::size_t hash_value( std::basic_string, A> const&); template typename boost::hash_detail::float_numbers::type hash_value(T); #if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) std::size_t hash_value(std::type_index); #endif // Implementation namespace hash_detail { template inline std::size_t hash_value_signed(T val) { const int size_t_bits = std::numeric_limits::digits; // ceiling(std::numeric_limits::digits / size_t_bits) - 1 const int length = (std::numeric_limits::digits - 1) / size_t_bits; std::size_t seed = 0; T positive = val < 0 ? -1 - val : val; // Hopefully, this loop can be unrolled. for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) { seed ^= (std::size_t) (positive >> i) + (seed<<6) + (seed>>2); } seed ^= (std::size_t) val + (seed<<6) + (seed>>2); return seed; } template inline std::size_t hash_value_unsigned(T val) { const int size_t_bits = std::numeric_limits::digits; // ceiling(std::numeric_limits::digits / size_t_bits) - 1 const int length = (std::numeric_limits::digits - 1) / size_t_bits; std::size_t seed = 0; // Hopefully, this loop can be unrolled. for(unsigned int i = length * size_t_bits; i > 0; i -= size_t_bits) { seed ^= (std::size_t) (val >> i) + (seed<<6) + (seed>>2); } seed ^= (std::size_t) val + (seed<<6) + (seed>>2); return seed; } } template typename boost::hash_detail::basic_numbers::type hash_value(T v) { return static_cast(v); } template typename boost::hash_detail::long_numbers::type hash_value(T v) { return hash_detail::hash_value_signed(v); } template typename boost::hash_detail::ulong_numbers::type hash_value(T v) { return hash_detail::hash_value_unsigned(v); } template typename boost::enable_if, std::size_t>::type hash_value(T v) { return static_cast(v); } // Implementation by Alberto Barbati and Dave Harris. #if !BOOST_WORKAROUND(__DMC__, <= 0x848) template std::size_t hash_value(T* const& v) #else template std::size_t hash_value(T* v) #endif { #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 // for some reason ptrdiff_t on OpenVMS compiler with // 64 bit is not 64 bit !!! std::size_t x = static_cast( reinterpret_cast(v)); #else std::size_t x = static_cast( reinterpret_cast(v)); #endif return x + (x >> 3); } #if defined(BOOST_MSVC) #pragma warning(push) #if BOOST_MSVC <= 1400 #pragma warning(disable:4267) // 'argument' : conversion from 'size_t' to // 'unsigned int', possible loss of data // A misguided attempt to detect 64-bit // incompatability. #endif #endif #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) template inline void hash_combine(std::size_t& seed, T& v) #else template inline void hash_combine(std::size_t& seed, T const& v) #endif { boost::hash hasher; seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2); } #if defined(BOOST_MSVC) #pragma warning(pop) #endif template inline std::size_t hash_range(It first, It last) { std::size_t seed = 0; for(; first != last; ++first) { hash_combine(seed, *first); } return seed; } template inline void hash_range(std::size_t& seed, It first, It last) { for(; first != last; ++first) { hash_combine(seed, *first); } } #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) template inline std::size_t hash_range(T* first, T* last) { std::size_t seed = 0; for(; first != last; ++first) { boost::hash hasher; seed ^= hasher(*first) + 0x9e3779b9 + (seed<<6) + (seed>>2); } return seed; } template inline void hash_range(std::size_t& seed, T* first, T* last) { for(; first != last; ++first) { boost::hash hasher; seed ^= hasher(*first) + 0x9e3779b9 + (seed<<6) + (seed>>2); } } #endif #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) template< class T, unsigned N > inline std::size_t hash_value(const T (&x)[N]) { return hash_range(x, x + N); } template< class T, unsigned N > inline std::size_t hash_value(T (&x)[N]) { return hash_range(x, x + N); } #endif template inline std::size_t hash_value( std::basic_string, A> const& v) { return hash_range(v.begin(), v.end()); } template typename boost::hash_detail::float_numbers::type hash_value(T v) { return boost::hash_detail::float_hash_value(v); } #if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) inline std::size_t hash_value(std::type_index v) { return v.hash_code(); } #endif // // boost::hash // // Define the specializations required by the standard. The general purpose // boost::hash is defined later in extensions.hpp if // BOOST_HASH_NO_EXTENSIONS is not defined. // BOOST_HASH_SPECIALIZE - define a specialization for a type which is // passed by copy. // // BOOST_HASH_SPECIALIZE_REF - define a specialization for a type which is // passed by copy. // // These are undefined later. #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) #define BOOST_HASH_SPECIALIZE(type) \ template <> struct hash \ : public std::unary_function \ { \ std::size_t operator()(type v) const \ { \ return boost::hash_value(v); \ } \ }; #define BOOST_HASH_SPECIALIZE_REF(type) \ template <> struct hash \ : public std::unary_function \ { \ std::size_t operator()(type const& v) const \ { \ return boost::hash_value(v); \ } \ }; #else #define BOOST_HASH_SPECIALIZE(type) \ template <> struct hash \ : public std::unary_function \ { \ std::size_t operator()(type v) const \ { \ return boost::hash_value(v); \ } \ }; \ \ template <> struct hash \ : public std::unary_function \ { \ std::size_t operator()(const type v) const \ { \ return boost::hash_value(v); \ } \ }; #define BOOST_HASH_SPECIALIZE_REF(type) \ template <> struct hash \ : public std::unary_function \ { \ std::size_t operator()(type const& v) const \ { \ return boost::hash_value(v); \ } \ }; \ \ template <> struct hash \ : public std::unary_function \ { \ std::size_t operator()(type const& v) const \ { \ return boost::hash_value(v); \ } \ }; #endif BOOST_HASH_SPECIALIZE(bool) BOOST_HASH_SPECIALIZE(char) BOOST_HASH_SPECIALIZE(signed char) BOOST_HASH_SPECIALIZE(unsigned char) #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) BOOST_HASH_SPECIALIZE(wchar_t) #endif BOOST_HASH_SPECIALIZE(short) BOOST_HASH_SPECIALIZE(unsigned short) BOOST_HASH_SPECIALIZE(int) BOOST_HASH_SPECIALIZE(unsigned int) BOOST_HASH_SPECIALIZE(long) BOOST_HASH_SPECIALIZE(unsigned long) BOOST_HASH_SPECIALIZE(float) BOOST_HASH_SPECIALIZE(double) BOOST_HASH_SPECIALIZE(long double) BOOST_HASH_SPECIALIZE_REF(std::string) #if !defined(BOOST_NO_STD_WSTRING) BOOST_HASH_SPECIALIZE_REF(std::wstring) #endif #if !defined(BOOST_NO_LONG_LONG) BOOST_HASH_SPECIALIZE(boost::long_long_type) BOOST_HASH_SPECIALIZE(boost::ulong_long_type) #endif #if defined(BOOST_HAS_INT128) BOOST_HASH_SPECIALIZE(boost::int128_type) BOOST_HASH_SPECIALIZE(boost::uint128_type) #endif #if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) BOOST_HASH_SPECIALIZE(std::type_index) #endif #undef BOOST_HASH_SPECIALIZE #undef BOOST_HASH_SPECIALIZE_REF // Specializing boost::hash for pointers. #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct hash : public std::unary_function { std::size_t operator()(T* v) const { #if !BOOST_WORKAROUND(__SUNPRO_CC, <= 0x590) return boost::hash_value(v); #else std::size_t x = static_cast( reinterpret_cast(v)); return x + (x >> 3); #endif } }; #else // For compilers without partial specialization, we define a // boost::hash for all remaining types. But hash_impl is only defined // for pointers in 'extensions.hpp' - so when BOOST_HASH_NO_EXTENSIONS // is defined there will still be a compile error for types not supported // in the standard. namespace hash_detail { template struct hash_impl; template <> struct hash_impl { template struct inner : public std::unary_function { std::size_t operator()(T val) const { #if !BOOST_WORKAROUND(__SUNPRO_CC, <= 590) return boost::hash_value(val); #else std::size_t x = static_cast( reinterpret_cast(val)); return x + (x >> 3); #endif } }; }; } template struct hash : public boost::hash_detail::hash_impl::value> ::BOOST_NESTED_TEMPLATE inner { }; #endif } #undef BOOST_HASH_CHAR_TRAITS #endif // BOOST_FUNCTIONAL_HASH_HASH_HPP // Include this outside of the include guards in case the file is included // twice - once with BOOST_HASH_NO_EXTENSIONS defined, and then with it // undefined. #if !defined(BOOST_HASH_NO_EXTENSIONS) \ && !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP) #include #endif passenger-4.0.37/ext/boost/functional/hash/hash_fwd.hpp000644 000765 000024 00000002151 12233035540 023522 0ustar00honglistaff000000 000000 // Copyright 2005-2009 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf // issue 6.18. #if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP) #define BOOST_FUNCTIONAL_HASH_FWD_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include namespace boost { template struct hash; #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) template void hash_combine(std::size_t& seed, T& v); #else template void hash_combine(std::size_t& seed, T const& v); #endif template std::size_t hash_range(It, It); template void hash_range(std::size_t&, It, It); #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) template inline std::size_t hash_range(T*, T*); template inline void hash_range(std::size_t&, T*, T*); #endif } #endif passenger-4.0.37/ext/boost/functional/hash/detail/float_functions.hpp000644 000765 000024 00000032575 12233035540 026413 0ustar00honglistaff000000 000000 // Copyright 2005-2009 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP) #define BOOST_FUNCTIONAL_HASH_DETAIL_FLOAT_FUNCTIONS_HPP #include #include #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // Set BOOST_HASH_CONFORMANT_FLOATS to 1 for libraries known to have // sufficiently good floating point support to not require any // workarounds. // // When set to 0, the library tries to automatically // use the best available implementation. This normally works well, but // breaks when ambiguities are created by odd namespacing of the functions. // // Note that if this is set to 0, the library should still take full // advantage of the platform's floating point support. #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) # define BOOST_HASH_CONFORMANT_FLOATS 0 #elif defined(__LIBCOMO__) # define BOOST_HASH_CONFORMANT_FLOATS 0 #elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) // Rogue Wave library: # define BOOST_HASH_CONFORMANT_FLOATS 0 #elif defined(_LIBCPP_VERSION) // libc++ # define BOOST_HASH_CONFORMANT_FLOATS 1 #elif defined(__GLIBCPP__) || defined(__GLIBCXX__) // GNU libstdc++ 3 # if defined(__GNUC__) && __GNUC__ >= 4 # define BOOST_HASH_CONFORMANT_FLOATS 1 # else # define BOOST_HASH_CONFORMANT_FLOATS 0 # endif #elif defined(__STL_CONFIG_H) // generic SGI STL # define BOOST_HASH_CONFORMANT_FLOATS 0 #elif defined(__MSL_CPP__) // MSL standard lib: # define BOOST_HASH_CONFORMANT_FLOATS 0 #elif defined(__IBMCPP__) // VACPP std lib (probably conformant for much earlier version). # if __IBMCPP__ >= 1210 # define BOOST_HASH_CONFORMANT_FLOATS 1 # else # define BOOST_HASH_CONFORMANT_FLOATS 0 # endif #elif defined(MSIPL_COMPILE_H) // Modena C++ standard library # define BOOST_HASH_CONFORMANT_FLOATS 0 #elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) // Dinkumware Library (this has to appear after any possible replacement libraries): # if _CPPLIB_VER >= 405 # define BOOST_HASH_CONFORMANT_FLOATS 1 # else # define BOOST_HASH_CONFORMANT_FLOATS 0 # endif #else # define BOOST_HASH_CONFORMANT_FLOATS 0 #endif #if BOOST_HASH_CONFORMANT_FLOATS // The standard library is known to be compliant, so don't use the // configuration mechanism. namespace boost { namespace hash_detail { template struct call_ldexp { typedef Float float_type; inline Float operator()(Float x, int y) const { return std::ldexp(x, y); } }; template struct call_frexp { typedef Float float_type; inline Float operator()(Float x, int* y) const { return std::frexp(x, y); } }; template struct select_hash_type { typedef Float type; }; } } #else // BOOST_HASH_CONFORMANT_FLOATS == 0 // The C++ standard requires that the C float functions are overloarded // for float, double and long double in the std namespace, but some of the older // library implementations don't support this. On some that don't, the C99 // float functions (frexpf, frexpl, etc.) are available. // // The following tries to automatically detect which are available. namespace boost { namespace hash_detail { // Returned by dummy versions of the float functions. struct not_found { // Implicitly convertible to float and long double in order to avoid // a compile error when the dummy float functions are used. inline operator float() const { return 0; } inline operator long double() const { return 0; } }; // A type for detecting the return type of functions. template struct is; template <> struct is { char x[10]; }; template <> struct is { char x[20]; }; template <> struct is { char x[30]; }; template <> struct is { char x[40]; }; // Used to convert the return type of a function to a type for sizeof. template is float_type(T); // call_ldexp // // This will get specialized for float and long double template struct call_ldexp { typedef double float_type; inline double operator()(double a, int b) const { using namespace std; return ldexp(a, b); } }; // call_frexp // // This will get specialized for float and long double template struct call_frexp { typedef double float_type; inline double operator()(double a, int* b) const { using namespace std; return frexp(a, b); } }; } } // A namespace for dummy functions to detect when the actual function we want // isn't available. ldexpl, ldexpf etc. might be added tby the macros below. // // AFAICT these have to be outside of the boost namespace, as if they're in // the boost namespace they'll always be preferable to any other function // (since the arguments are built in types, ADL can't be used). namespace boost_hash_detect_float_functions { template boost::hash_detail::not_found ldexp(Float, int); template boost::hash_detail::not_found frexp(Float, int*); } // Macros for generating specializations of call_ldexp and call_frexp. // // check_cpp and check_c99 check if the C++ or C99 functions are available. // // Then the call_* functions select an appropriate implementation. // // I used c99_func in a few places just to get a unique name. // // Important: when using 'using namespace' at namespace level, include as // little as possible in that namespace, as Visual C++ has an odd bug which // can cause the namespace to be imported at the global level. This seems to // happen mainly when there's a template in the same namesapce. #define BOOST_HASH_CALL_FLOAT_FUNC(cpp_func, c99_func, type1, type2) \ namespace boost_hash_detect_float_functions { \ template \ boost::hash_detail::not_found c99_func(Float, type2); \ } \ \ namespace boost { \ namespace hash_detail { \ namespace c99_func##_detect { \ using namespace std; \ using namespace boost_hash_detect_float_functions; \ \ struct check { \ static type1 x; \ static type2 y; \ BOOST_STATIC_CONSTANT(bool, cpp = \ sizeof(float_type(cpp_func(x,y))) \ == sizeof(is)); \ BOOST_STATIC_CONSTANT(bool, c99 = \ sizeof(float_type(c99_func(x,y))) \ == sizeof(is)); \ }; \ } \ \ template \ struct call_c99_##c99_func : \ boost::hash_detail::call_##cpp_func {}; \ \ template <> \ struct call_c99_##c99_func { \ typedef type1 float_type; \ \ template \ inline type1 operator()(type1 a, T b) const \ { \ using namespace std; \ return c99_func(a, b); \ } \ }; \ \ template \ struct call_cpp_##c99_func : \ call_c99_##c99_func< \ ::boost::hash_detail::c99_func##_detect::check::c99 \ > {}; \ \ template <> \ struct call_cpp_##c99_func { \ typedef type1 float_type; \ \ template \ inline type1 operator()(type1 a, T b) const \ { \ using namespace std; \ return cpp_func(a, b); \ } \ }; \ \ template <> \ struct call_##cpp_func : \ call_cpp_##c99_func< \ ::boost::hash_detail::c99_func##_detect::check::cpp \ > {}; \ } \ } #define BOOST_HASH_CALL_FLOAT_MACRO(cpp_func, c99_func, type1, type2) \ namespace boost { \ namespace hash_detail { \ \ template <> \ struct call_##cpp_func { \ typedef type1 float_type; \ inline type1 operator()(type1 x, type2 y) const { \ return c99_func(x, y); \ } \ }; \ } \ } #if defined(ldexpf) BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpf, float, int) #else BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpf, float, int) #endif #if defined(ldexpl) BOOST_HASH_CALL_FLOAT_MACRO(ldexp, ldexpl, long double, int) #else BOOST_HASH_CALL_FLOAT_FUNC(ldexp, ldexpl, long double, int) #endif #if defined(frexpf) BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpf, float, int*) #else BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpf, float, int*) #endif #if defined(frexpl) BOOST_HASH_CALL_FLOAT_MACRO(frexp, frexpl, long double, int*) #else BOOST_HASH_CALL_FLOAT_FUNC(frexp, frexpl, long double, int*) #endif #undef BOOST_HASH_CALL_FLOAT_MACRO #undef BOOST_HASH_CALL_FLOAT_FUNC namespace boost { namespace hash_detail { template struct select_hash_type_impl { typedef double type; }; template <> struct select_hash_type_impl { typedef float type; }; template <> struct select_hash_type_impl { typedef long double type; }; // select_hash_type // // If there is support for a particular floating point type, use that // otherwise use double (there's always support for double). template struct select_hash_type : select_hash_type_impl< BOOST_DEDUCED_TYPENAME call_ldexp::float_type, BOOST_DEDUCED_TYPENAME call_frexp::float_type > {}; } } #endif // BOOST_HASH_CONFORMANT_FLOATS #endif passenger-4.0.37/ext/boost/functional/hash/detail/hash_float.hpp000644 000765 000024 00000020223 12233035540 025311 0ustar00honglistaff000000 000000 // Copyright 2005-2012 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER) #define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_HEADER #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include #include #include #include #include #include #include #include #include #if defined(BOOST_MSVC) #pragma warning(push) #if BOOST_MSVC >= 1400 #pragma warning(disable:6294) // Ill-defined for-loop: initial condition does // not satisfy test. Loop body not executed #endif #endif // Can we use fpclassify? // STLport #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) #define BOOST_HASH_USE_FPCLASSIFY 0 // GNU libstdc++ 3 #elif defined(__GLIBCPP__) || defined(__GLIBCXX__) # if (defined(__USE_ISOC99) || defined(_GLIBCXX_USE_C99_MATH)) && \ !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) # define BOOST_HASH_USE_FPCLASSIFY 1 # else # define BOOST_HASH_USE_FPCLASSIFY 0 # endif // Everything else #else # define BOOST_HASH_USE_FPCLASSIFY 0 #endif namespace boost { namespace hash_detail { inline void hash_float_combine(std::size_t& seed, std::size_t value) { seed ^= value + (seed<<6) + (seed>>2); } //////////////////////////////////////////////////////////////////////// // Binary hash function // // Only used for floats with known iec559 floats, and certain values in // numeric_limits inline std::size_t hash_binary(char* ptr, std::size_t length) { std::size_t seed = 0; if (length >= sizeof(std::size_t)) { seed = *(std::size_t*) ptr; length -= sizeof(std::size_t); ptr += sizeof(std::size_t); while(length >= sizeof(std::size_t)) { std::size_t buffer = 0; std::memcpy(&buffer, ptr, sizeof(std::size_t)); hash_float_combine(seed, buffer); length -= sizeof(std::size_t); ptr += sizeof(std::size_t); } } if (length > 0) { std::size_t buffer = 0; std::memcpy(&buffer, ptr, length); hash_float_combine(seed, buffer); } return seed; } template inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< std::numeric_limits::is_iec559 && std::numeric_limits::digits == 24 && std::numeric_limits::radix == 2 && std::numeric_limits::max_exponent == 128, int>::type ) { return hash_binary((char*) &v, 4); } template inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< std::numeric_limits::is_iec559 && std::numeric_limits::digits == 53 && std::numeric_limits::radix == 2 && std::numeric_limits::max_exponent == 1024, int>::type ) { return hash_binary((char*) &v, 8); } template inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< std::numeric_limits::is_iec559 && std::numeric_limits::digits == 64 && std::numeric_limits::radix == 2 && std::numeric_limits::max_exponent == 16384, int>::type ) { return hash_binary((char*) &v, 10); } template inline std::size_t float_hash_impl(Float v, BOOST_DEDUCED_TYPENAME boost::enable_if_c< std::numeric_limits::is_iec559 && std::numeric_limits::digits == 113 && std::numeric_limits::radix == 2 && std::numeric_limits::max_exponent == 16384, int>::type ) { return hash_binary((char*) &v, 16); } //////////////////////////////////////////////////////////////////////// // Portable hash function // // Used as a fallback when the binary hash function isn't supported. template inline std::size_t float_hash_impl2(T v) { boost::hash_detail::call_frexp frexp; boost::hash_detail::call_ldexp ldexp; int exp = 0; v = frexp(v, &exp); // A postive value is easier to hash, so combine the // sign with the exponent and use the absolute value. if(v < 0) { v = -v; exp += limits::max_exponent - limits::min_exponent; } v = ldexp(v, limits::digits); std::size_t seed = static_cast(v); v -= static_cast(seed); // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1; std::size_t const length = (limits::digits * boost::static_log2::radix>::value + limits::digits - 1) / limits::digits; for(std::size_t i = 0; i != length; ++i) { v = ldexp(v, limits::digits); std::size_t part = static_cast(v); v -= static_cast(part); hash_float_combine(seed, part); } hash_float_combine(seed, exp); return seed; } #if !defined(BOOST_HASH_DETAIL_TEST_WITHOUT_GENERIC) template inline std::size_t float_hash_impl(T v, ...) { typedef BOOST_DEDUCED_TYPENAME select_hash_type::type type; return float_hash_impl2(static_cast(v)); } #endif } } #if BOOST_HASH_USE_FPCLASSIFY #include namespace boost { namespace hash_detail { template inline std::size_t float_hash_value(T v) { #if defined(fpclassify) switch (fpclassify(v)) #elif BOOST_HASH_CONFORMANT_FLOATS switch (std::fpclassify(v)) #else using namespace std; switch (fpclassify(v)) #endif { case FP_ZERO: return 0; case FP_INFINITE: return (std::size_t)(v > 0 ? -1 : -2); case FP_NAN: return (std::size_t)(-3); case FP_NORMAL: case FP_SUBNORMAL: return float_hash_impl(v, 0); default: BOOST_ASSERT(0); return 0; } } } } #else // !BOOST_HASH_USE_FPCLASSIFY namespace boost { namespace hash_detail { template inline bool is_zero(T v) { #if !defined(__GNUC__) return v == 0; #else // GCC's '-Wfloat-equal' will complain about comparing // v to 0, but because it disables warnings for system // headers it won't complain if you use std::equal_to to // compare with 0. Resulting in this silliness: return std::equal_to()(v, 0); #endif } template inline std::size_t float_hash_value(T v) { return boost::hash_detail::is_zero(v) ? 0 : float_hash_impl(v, 0); } } } #endif // BOOST_HASH_USE_FPCLASSIFY #undef BOOST_HASH_USE_FPCLASSIFY #if defined(BOOST_MSVC) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/functional/hash/detail/limits.hpp000644 000765 000024 00000003211 12233035540 024500 0ustar00honglistaff000000 000000 // Copyright 2005-2009 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // On some platforms std::limits gives incorrect values for long double. // This tries to work around them. #if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER) #define BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include // On OpenBSD, numeric_limits is not reliable for long doubles, but // the macros defined in are and support long double when STLport // doesn't. #if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE) #include #endif namespace boost { namespace hash_detail { template struct limits : std::numeric_limits {}; #if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE) template <> struct limits : std::numeric_limits { static long double epsilon() { return LDBL_EPSILON; } static long double (max)() { return LDBL_MAX; } static long double (min)() { return LDBL_MIN; } BOOST_STATIC_CONSTANT(int, digits = LDBL_MANT_DIG); BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP); BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP); #if defined(_STLP_NO_LONG_DOUBLE) BOOST_STATIC_CONSTANT(int, radix = FLT_RADIX); #endif }; #endif // __OpenBSD__ } } #endif passenger-4.0.37/ext/boost/function/detail/000755 000765 000024 00000000000 12233035540 021231 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/function/function_base.hpp000644 000765 000024 00000076543 12233035540 023336 0ustar00honglistaff000000 000000 // Boost.Function library // Copyright Douglas Gregor 2001-2006 // Copyright Emil Dotchevski 2007 // Use, modification and distribution is subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org #ifndef BOOST_FUNCTION_BASE_HEADER #define BOOST_FUNCTION_BASE_HEADER #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef BOOST_NO_SFINAE # include "boost/utility/enable_if.hpp" #else # include "boost/mpl/bool.hpp" #endif #include #include #if defined(BOOST_MSVC) # pragma warning( push ) # pragma warning( disable : 4793 ) // complaint about native code generation # pragma warning( disable : 4127 ) // "conditional expression is constant" #endif // Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info. #ifdef BOOST_NO_STD_TYPEINFO // Embedded VC++ does not have type_info in namespace std # define BOOST_FUNCTION_STD_NS #else # define BOOST_FUNCTION_STD_NS std #endif // Borrowed from Boost.Python library: determines the cases where we // need to use std::type_info::name to compare instead of operator==. #if defined( BOOST_NO_TYPEID ) # define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) #elif (defined(__GNUC__) && __GNUC__ >= 3) \ || defined(_AIX) \ || ( defined(__sgi) && defined(__host_mips)) # include # define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) \ (std::strcmp((X).name(),(Y).name()) == 0) # else # define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) #endif #if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 || defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG) # define BOOST_FUNCTION_TARGET_FIX(x) x #else # define BOOST_FUNCTION_TARGET_FIX(x) #endif // not MSVC #if !BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) # define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \ typename ::boost::enable_if_c<(::boost::type_traits::ice_not< \ (::boost::is_integral::value)>::value), \ Type>::type #else // BCC doesn't recognize this depends on a template argument and complains // about the use of 'typename' # define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \ ::boost::enable_if_c<(::boost::type_traits::ice_not< \ (::boost::is_integral::value)>::value), \ Type>::type #endif namespace boost { namespace detail { namespace function { class X; /** * A buffer used to store small function objects in * boost::function. It is a union containing function pointers, * object pointers, and a structure that resembles a bound * member function pointer. */ union function_buffer { // For pointers to function objects mutable void* obj_ptr; // For pointers to std::type_info objects struct type_t { // (get_functor_type_tag, check_functor_type_tag). const detail::sp_typeinfo* type; // Whether the type is const-qualified. bool const_qualified; // Whether the type is volatile-qualified. bool volatile_qualified; } type; // For function pointers of all kinds mutable void (*func_ptr)(); // For bound member pointers struct bound_memfunc_ptr_t { void (X::*memfunc_ptr)(int); void* obj_ptr; } bound_memfunc_ptr; // For references to function objects. We explicitly keep // track of the cv-qualifiers on the object referenced. struct obj_ref_t { mutable void* obj_ptr; bool is_const_qualified; bool is_volatile_qualified; } obj_ref; // To relax aliasing constraints mutable char data; }; /** * The unusable class is a placeholder for unused function arguments * It is also completely unusable except that it constructable from * anything. This helps compilers without partial specialization to * handle Boost.Function objects returning void. */ struct unusable { unusable() {} template unusable(const T&) {} }; /* Determine the return type. This supports compilers that do not support * void returns or partial specialization by silently changing the return * type to "unusable". */ template struct function_return_type { typedef T type; }; template<> struct function_return_type { typedef unusable type; }; // The operation type to perform on the given functor/function pointer enum functor_manager_operation_type { clone_functor_tag, move_functor_tag, destroy_functor_tag, check_functor_type_tag, get_functor_type_tag }; // Tags used to decide between different types of functions struct function_ptr_tag {}; struct function_obj_tag {}; struct member_ptr_tag {}; struct function_obj_ref_tag {}; template class get_function_tag { typedef typename mpl::if_c<(is_pointer::value), function_ptr_tag, function_obj_tag>::type ptr_or_obj_tag; typedef typename mpl::if_c<(is_member_pointer::value), member_ptr_tag, ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag; typedef typename mpl::if_c<(is_reference_wrapper::value), function_obj_ref_tag, ptr_or_obj_or_mem_tag>::type or_ref_tag; public: typedef or_ref_tag type; }; // The trivial manager does nothing but return the same pointer (if we // are cloning) or return the null pointer (if we are deleting). template struct reference_manager { static inline void manage(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op) { switch (op) { case clone_functor_tag: out_buffer.obj_ref = in_buffer.obj_ref; return; case move_functor_tag: out_buffer.obj_ref = in_buffer.obj_ref; in_buffer.obj_ref.obj_ptr = 0; return; case destroy_functor_tag: out_buffer.obj_ref.obj_ptr = 0; return; case check_functor_type_tag: { const detail::sp_typeinfo& check_type = *out_buffer.type.type; // Check whether we have the same type. We can add // cv-qualifiers, but we can't take them away. if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(F)) && (!in_buffer.obj_ref.is_const_qualified || out_buffer.type.const_qualified) && (!in_buffer.obj_ref.is_volatile_qualified || out_buffer.type.volatile_qualified)) out_buffer.obj_ptr = in_buffer.obj_ref.obj_ptr; else out_buffer.obj_ptr = 0; } return; case get_functor_type_tag: out_buffer.type.type = &BOOST_SP_TYPEID(F); out_buffer.type.const_qualified = in_buffer.obj_ref.is_const_qualified; out_buffer.type.volatile_qualified = in_buffer.obj_ref.is_volatile_qualified; return; } } }; /** * Determine if boost::function can use the small-object * optimization with the function object type F. */ template struct function_allows_small_object_optimization { BOOST_STATIC_CONSTANT (bool, value = ((sizeof(F) <= sizeof(function_buffer) && (alignment_of::value % alignment_of::value == 0)))); }; template struct functor_wrapper: public F, public A { functor_wrapper( F f, A a ): F(f), A(a) { } functor_wrapper(const functor_wrapper& f) : F(static_cast(f)), A(static_cast(f)) { } }; /** * The functor_manager class contains a static function "manage" which * can clone or destroy the given function/function object pointer. */ template struct functor_manager_common { typedef Functor functor_type; // Function pointers static inline void manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op) { if (op == clone_functor_tag) out_buffer.func_ptr = in_buffer.func_ptr; else if (op == move_functor_tag) { out_buffer.func_ptr = in_buffer.func_ptr; in_buffer.func_ptr = 0; } else if (op == destroy_functor_tag) out_buffer.func_ptr = 0; else if (op == check_functor_type_tag) { const detail::sp_typeinfo& check_type = *out_buffer.type.type; if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) out_buffer.obj_ptr = &in_buffer.func_ptr; else out_buffer.obj_ptr = 0; } else /* op == get_functor_type_tag */ { out_buffer.type.type = &BOOST_SP_TYPEID(Functor); out_buffer.type.const_qualified = false; out_buffer.type.volatile_qualified = false; } } // Function objects that fit in the small-object buffer. static inline void manage_small(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op) { if (op == clone_functor_tag || op == move_functor_tag) { const functor_type* in_functor = reinterpret_cast(&in_buffer.data); new (reinterpret_cast(&out_buffer.data)) functor_type(*in_functor); if (op == move_functor_tag) { functor_type* f = reinterpret_cast(&in_buffer.data); (void)f; // suppress warning about the value of f not being used (MSVC) f->~Functor(); } } else if (op == destroy_functor_tag) { // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type. functor_type* f = reinterpret_cast(&out_buffer.data); (void)f; // suppress warning about the value of f not being used (MSVC) f->~Functor(); } else if (op == check_functor_type_tag) { const detail::sp_typeinfo& check_type = *out_buffer.type.type; if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) out_buffer.obj_ptr = &in_buffer.data; else out_buffer.obj_ptr = 0; } else /* op == get_functor_type_tag */ { out_buffer.type.type = &BOOST_SP_TYPEID(Functor); out_buffer.type.const_qualified = false; out_buffer.type.volatile_qualified = false; } } }; template struct functor_manager { private: typedef Functor functor_type; // Function pointers static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, function_ptr_tag) { functor_manager_common::manage_ptr(in_buffer,out_buffer,op); } // Function objects that fit in the small-object buffer. static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, mpl::true_) { functor_manager_common::manage_small(in_buffer,out_buffer,op); } // Function objects that require heap allocation static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, mpl::false_) { if (op == clone_functor_tag) { // Clone the functor // GCC 2.95.3 gets the CV qualifiers wrong here, so we // can't do the static_cast that we should do. // jewillco: Changing this to static_cast because GCC 2.95.3 is // obsolete. const functor_type* f = static_cast(in_buffer.obj_ptr); functor_type* new_f = new functor_type(*f); out_buffer.obj_ptr = new_f; } else if (op == move_functor_tag) { out_buffer.obj_ptr = in_buffer.obj_ptr; in_buffer.obj_ptr = 0; } else if (op == destroy_functor_tag) { /* Cast from the void pointer to the functor pointer type */ functor_type* f = static_cast(out_buffer.obj_ptr); delete f; out_buffer.obj_ptr = 0; } else if (op == check_functor_type_tag) { const detail::sp_typeinfo& check_type = *out_buffer.type.type; if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) out_buffer.obj_ptr = in_buffer.obj_ptr; else out_buffer.obj_ptr = 0; } else /* op == get_functor_type_tag */ { out_buffer.type.type = &BOOST_SP_TYPEID(Functor); out_buffer.type.const_qualified = false; out_buffer.type.volatile_qualified = false; } } // For function objects, we determine whether the function // object can use the small-object optimization buffer or // whether we need to allocate it on the heap. static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, function_obj_tag) { manager(in_buffer, out_buffer, op, mpl::bool_<(function_allows_small_object_optimization::value)>()); } // For member pointers, we use the small-object optimization buffer. static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, member_ptr_tag) { manager(in_buffer, out_buffer, op, mpl::true_()); } public: /* Dispatch to an appropriate manager based on whether we have a function pointer or a function object pointer. */ static inline void manage(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op) { typedef typename get_function_tag::type tag_type; switch (op) { case get_functor_type_tag: out_buffer.type.type = &BOOST_SP_TYPEID(functor_type); out_buffer.type.const_qualified = false; out_buffer.type.volatile_qualified = false; return; default: manager(in_buffer, out_buffer, op, tag_type()); return; } } }; template struct functor_manager_a { private: typedef Functor functor_type; // Function pointers static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, function_ptr_tag) { functor_manager_common::manage_ptr(in_buffer,out_buffer,op); } // Function objects that fit in the small-object buffer. static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, mpl::true_) { functor_manager_common::manage_small(in_buffer,out_buffer,op); } // Function objects that require heap allocation static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, mpl::false_) { typedef functor_wrapper functor_wrapper_type; typedef typename Allocator::template rebind::other wrapper_allocator_type; typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; if (op == clone_functor_tag) { // Clone the functor // GCC 2.95.3 gets the CV qualifiers wrong here, so we // can't do the static_cast that we should do. const functor_wrapper_type* f = static_cast(in_buffer.obj_ptr); wrapper_allocator_type wrapper_allocator(static_cast(*f)); wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); wrapper_allocator.construct(copy, *f); // Get back to the original pointer type functor_wrapper_type* new_f = static_cast(copy); out_buffer.obj_ptr = new_f; } else if (op == move_functor_tag) { out_buffer.obj_ptr = in_buffer.obj_ptr; in_buffer.obj_ptr = 0; } else if (op == destroy_functor_tag) { /* Cast from the void pointer to the functor_wrapper_type */ functor_wrapper_type* victim = static_cast(in_buffer.obj_ptr); wrapper_allocator_type wrapper_allocator(static_cast(*victim)); wrapper_allocator.destroy(victim); wrapper_allocator.deallocate(victim,1); out_buffer.obj_ptr = 0; } else if (op == check_functor_type_tag) { const detail::sp_typeinfo& check_type = *out_buffer.type.type; if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) out_buffer.obj_ptr = in_buffer.obj_ptr; else out_buffer.obj_ptr = 0; } else /* op == get_functor_type_tag */ { out_buffer.type.type = &BOOST_SP_TYPEID(Functor); out_buffer.type.const_qualified = false; out_buffer.type.volatile_qualified = false; } } // For function objects, we determine whether the function // object can use the small-object optimization buffer or // whether we need to allocate it on the heap. static inline void manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, function_obj_tag) { manager(in_buffer, out_buffer, op, mpl::bool_<(function_allows_small_object_optimization::value)>()); } public: /* Dispatch to an appropriate manager based on whether we have a function pointer or a function object pointer. */ static inline void manage(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op) { typedef typename get_function_tag::type tag_type; switch (op) { case get_functor_type_tag: out_buffer.type.type = &BOOST_SP_TYPEID(functor_type); out_buffer.type.const_qualified = false; out_buffer.type.volatile_qualified = false; return; default: manager(in_buffer, out_buffer, op, tag_type()); return; } } }; // A type that is only used for comparisons against zero struct useless_clear_type {}; #ifdef BOOST_NO_SFINAE // These routines perform comparisons between a Boost.Function // object and an arbitrary function object (when the last // parameter is mpl::bool_) or against zero (when the // last parameter is mpl::bool_). They are only necessary // for compilers that don't support SFINAE. template bool compare_equal(const Function& f, const Functor&, int, mpl::bool_) { return f.empty(); } template bool compare_not_equal(const Function& f, const Functor&, int, mpl::bool_) { return !f.empty(); } template bool compare_equal(const Function& f, const Functor& g, long, mpl::bool_) { if (const Functor* fp = f.template target()) return function_equal(*fp, g); else return false; } template bool compare_equal(const Function& f, const reference_wrapper& g, int, mpl::bool_) { if (const Functor* fp = f.template target()) return fp == g.get_pointer(); else return false; } template bool compare_not_equal(const Function& f, const Functor& g, long, mpl::bool_) { if (const Functor* fp = f.template target()) return !function_equal(*fp, g); else return true; } template bool compare_not_equal(const Function& f, const reference_wrapper& g, int, mpl::bool_) { if (const Functor* fp = f.template target()) return fp != g.get_pointer(); else return true; } #endif // BOOST_NO_SFINAE /** * Stores the "manager" portion of the vtable for a * boost::function object. */ struct vtable_base { void (*manager)(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op); }; } // end namespace function } // end namespace detail /** * The function_base class contains the basic elements needed for the * function1, function2, function3, etc. classes. It is common to all * functions (and as such can be used to tell if we have one of the * functionN objects). */ class function_base { public: function_base() : vtable(0) { } /** Determine if the function is empty (i.e., has no target). */ bool empty() const { return !vtable; } /** Retrieve the type of the stored function object, or BOOST_SP_TYPEID(void) if this is empty. */ const detail::sp_typeinfo& target_type() const { if (!vtable) return BOOST_SP_TYPEID(void); detail::function::function_buffer type; get_vtable()->manager(functor, type, detail::function::get_functor_type_tag); return *type.type.type; } template Functor* target() { if (!vtable) return 0; detail::function::function_buffer type_result; type_result.type.type = &BOOST_SP_TYPEID(Functor); type_result.type.const_qualified = is_const::value; type_result.type.volatile_qualified = is_volatile::value; get_vtable()->manager(functor, type_result, detail::function::check_functor_type_tag); return static_cast(type_result.obj_ptr); } template #if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300) const Functor* target( Functor * = 0 ) const #else const Functor* target() const #endif { if (!vtable) return 0; detail::function::function_buffer type_result; type_result.type.type = &BOOST_SP_TYPEID(Functor); type_result.type.const_qualified = true; type_result.type.volatile_qualified = is_volatile::value; get_vtable()->manager(functor, type_result, detail::function::check_functor_type_tag); // GCC 2.95.3 gets the CV qualifiers wrong here, so we // can't do the static_cast that we should do. return static_cast(type_result.obj_ptr); } template bool contains(const F& f) const { #if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, < 1300) if (const F* fp = this->target( (F*)0 )) #else if (const F* fp = this->template target()) #endif { return function_equal(*fp, f); } else { return false; } } #if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3 // GCC 3.3 and newer cannot copy with the global operator==, due to // problems with instantiation of function return types before it // has been verified that the argument types match up. template BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator==(Functor g) const { if (const Functor* fp = target()) return function_equal(*fp, g); else return false; } template BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator!=(Functor g) const { if (const Functor* fp = target()) return !function_equal(*fp, g); else return true; } #endif public: // should be protected, but GCC 2.95.3 will fail to allow access detail::function::vtable_base* get_vtable() const { return reinterpret_cast( reinterpret_cast(vtable) & ~static_cast(0x01)); } bool has_trivial_copy_and_destroy() const { return reinterpret_cast(vtable) & 0x01; } detail::function::vtable_base* vtable; mutable detail::function::function_buffer functor; }; /** * The bad_function_call exception class is thrown when a boost::function * object is invoked */ class bad_function_call : public std::runtime_error { public: bad_function_call() : std::runtime_error("call to empty boost::function") {} }; #ifndef BOOST_NO_SFINAE inline bool operator==(const function_base& f, detail::function::useless_clear_type*) { return f.empty(); } inline bool operator!=(const function_base& f, detail::function::useless_clear_type*) { return !f.empty(); } inline bool operator==(detail::function::useless_clear_type*, const function_base& f) { return f.empty(); } inline bool operator!=(detail::function::useless_clear_type*, const function_base& f) { return !f.empty(); } #endif #ifdef BOOST_NO_SFINAE // Comparisons between boost::function objects and arbitrary function objects template inline bool operator==(const function_base& f, Functor g) { typedef mpl::bool_<(is_integral::value)> integral; return detail::function::compare_equal(f, g, 0, integral()); } template inline bool operator==(Functor g, const function_base& f) { typedef mpl::bool_<(is_integral::value)> integral; return detail::function::compare_equal(f, g, 0, integral()); } template inline bool operator!=(const function_base& f, Functor g) { typedef mpl::bool_<(is_integral::value)> integral; return detail::function::compare_not_equal(f, g, 0, integral()); } template inline bool operator!=(Functor g, const function_base& f) { typedef mpl::bool_<(is_integral::value)> integral; return detail::function::compare_not_equal(f, g, 0, integral()); } #else # if !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) // Comparisons between boost::function objects and arbitrary function // objects. GCC 3.3 and before has an obnoxious bug that prevents this // from working. template BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator==(const function_base& f, Functor g) { if (const Functor* fp = f.template target()) return function_equal(*fp, g); else return false; } template BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator==(Functor g, const function_base& f) { if (const Functor* fp = f.template target()) return function_equal(g, *fp); else return false; } template BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator!=(const function_base& f, Functor g) { if (const Functor* fp = f.template target()) return !function_equal(*fp, g); else return true; } template BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator!=(Functor g, const function_base& f) { if (const Functor* fp = f.template target()) return !function_equal(g, *fp); else return true; } # endif template BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator==(const function_base& f, reference_wrapper g) { if (const Functor* fp = f.template target()) return fp == g.get_pointer(); else return false; } template BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator==(reference_wrapper g, const function_base& f) { if (const Functor* fp = f.template target()) return g.get_pointer() == fp; else return false; } template BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator!=(const function_base& f, reference_wrapper g) { if (const Functor* fp = f.template target()) return fp != g.get_pointer(); else return true; } template BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool) operator!=(reference_wrapper g, const function_base& f) { if (const Functor* fp = f.template target()) return g.get_pointer() != fp; else return true; } #endif // Compiler supporting SFINAE namespace detail { namespace function { inline bool has_empty_target(const function_base* f) { return f->empty(); } #if BOOST_WORKAROUND(BOOST_MSVC, <= 1310) inline bool has_empty_target(const void*) { return false; } #else inline bool has_empty_target(...) { return false; } #endif } // end namespace function } // end namespace detail } // end namespace boost #undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL #undef BOOST_FUNCTION_COMPARE_TYPE_ID #if defined(BOOST_MSVC) # pragma warning( pop ) #endif #endif // BOOST_FUNCTION_BASE_HEADER passenger-4.0.37/ext/boost/function/function_fwd.hpp000644 000765 000024 00000005155 12233035540 023173 0ustar00honglistaff000000 000000 // Boost.Function library // Copyright (C) Douglas Gregor 2008 // // Use, modification and distribution is subject to the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // For more information, see http://www.boost.org #ifndef BOOST_FUNCTION_FWD_HPP #define BOOST_FUNCTION_FWD_HPP #include #if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 && !defined(BOOST_STRICT_CONFIG) // Work around a compiler bug. // boost::python::objects::function has to be seen by the compiler before the // boost::function class template. namespace boost { namespace python { namespace objects { class function; }}} #endif #if defined (BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ || defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) \ || !(defined(BOOST_STRICT_CONFIG) || !defined(__SUNPRO_CC) || __SUNPRO_CC > 0x540) # define BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX #endif namespace boost { class bad_function_call; #if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) // Preferred syntax template class function; template inline void swap(function& f1, function& f2) { f1.swap(f2); } #endif // have partial specialization // Portable syntax template class function0; template class function1; template class function2; template class function3; template class function4; template class function5; template class function6; template class function7; template class function8; template class function9; template class function10; } #endif passenger-4.0.37/ext/boost/function/function_template.hpp000644 000765 000024 00000114673 12233035540 024234 0ustar00honglistaff000000 000000 // Boost.Function library // Copyright Douglas Gregor 2001-2006 // Copyright Emil Dotchevski 2007 // Use, modification and distribution is subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org // Note: this header is a header template and must NOT have multiple-inclusion // protection. #include #include #if defined(BOOST_MSVC) # pragma warning( push ) # pragma warning( disable : 4127 ) // "conditional expression is constant" #endif #define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T) #define BOOST_FUNCTION_TEMPLATE_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, T) #define BOOST_FUNCTION_PARM(J,I,D) BOOST_PP_CAT(T,I) BOOST_PP_CAT(a,I) #define BOOST_FUNCTION_PARMS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_PARM,BOOST_PP_EMPTY) #define BOOST_FUNCTION_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, a) #define BOOST_FUNCTION_ARG_TYPE(J,I,D) \ typedef BOOST_PP_CAT(T,I) BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(I)),_type); #define BOOST_FUNCTION_ARG_TYPES BOOST_PP_REPEAT(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG_TYPE,BOOST_PP_EMPTY) // Comma if nonzero number of arguments #if BOOST_FUNCTION_NUM_ARGS == 0 # define BOOST_FUNCTION_COMMA #else # define BOOST_FUNCTION_COMMA , #endif // BOOST_FUNCTION_NUM_ARGS > 0 // Class names used in this version of the code #define BOOST_FUNCTION_FUNCTION BOOST_JOIN(function,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_FUNCTION_INVOKER \ BOOST_JOIN(function_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_VOID_FUNCTION_INVOKER \ BOOST_JOIN(void_function_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER \ BOOST_JOIN(function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER \ BOOST_JOIN(void_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_FUNCTION_REF_INVOKER \ BOOST_JOIN(function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER \ BOOST_JOIN(void_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_MEMBER_INVOKER \ BOOST_JOIN(function_mem_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_VOID_MEMBER_INVOKER \ BOOST_JOIN(function_void_mem_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_GET_FUNCTION_INVOKER \ BOOST_JOIN(get_function_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER \ BOOST_JOIN(get_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER \ BOOST_JOIN(get_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_GET_MEMBER_INVOKER \ BOOST_JOIN(get_member_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_GET_INVOKER \ BOOST_JOIN(get_invoker,BOOST_FUNCTION_NUM_ARGS) #define BOOST_FUNCTION_VTABLE BOOST_JOIN(basic_vtable,BOOST_FUNCTION_NUM_ARGS) #ifndef BOOST_NO_VOID_RETURNS # define BOOST_FUNCTION_VOID_RETURN_TYPE void # define BOOST_FUNCTION_RETURN(X) X #else # define BOOST_FUNCTION_VOID_RETURN_TYPE boost::detail::function::unusable # define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE () #endif namespace boost { namespace detail { namespace function { template< typename FunctionPtr, typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > struct BOOST_FUNCTION_FUNCTION_INVOKER { static R invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA BOOST_FUNCTION_PARMS) { FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); return f(BOOST_FUNCTION_ARGS); } }; template< typename FunctionPtr, typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > struct BOOST_FUNCTION_VOID_FUNCTION_INVOKER { static BOOST_FUNCTION_VOID_RETURN_TYPE invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA BOOST_FUNCTION_PARMS) { FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); BOOST_FUNCTION_RETURN(f(BOOST_FUNCTION_ARGS)); } }; template< typename FunctionObj, typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > struct BOOST_FUNCTION_FUNCTION_OBJ_INVOKER { static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA BOOST_FUNCTION_PARMS) { FunctionObj* f; if (function_allows_small_object_optimization::value) f = reinterpret_cast(&function_obj_ptr.data); else f = reinterpret_cast(function_obj_ptr.obj_ptr); return (*f)(BOOST_FUNCTION_ARGS); } }; template< typename FunctionObj, typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > struct BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER { static BOOST_FUNCTION_VOID_RETURN_TYPE invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA BOOST_FUNCTION_PARMS) { FunctionObj* f; if (function_allows_small_object_optimization::value) f = reinterpret_cast(&function_obj_ptr.data); else f = reinterpret_cast(function_obj_ptr.obj_ptr); BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS)); } }; template< typename FunctionObj, typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > struct BOOST_FUNCTION_FUNCTION_REF_INVOKER { static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA BOOST_FUNCTION_PARMS) { FunctionObj* f = reinterpret_cast(function_obj_ptr.obj_ptr); return (*f)(BOOST_FUNCTION_ARGS); } }; template< typename FunctionObj, typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > struct BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER { static BOOST_FUNCTION_VOID_RETURN_TYPE invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA BOOST_FUNCTION_PARMS) { FunctionObj* f = reinterpret_cast(function_obj_ptr.obj_ptr); BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS)); } }; #if BOOST_FUNCTION_NUM_ARGS > 0 /* Handle invocation of member pointers. */ template< typename MemberPtr, typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > struct BOOST_FUNCTION_MEMBER_INVOKER { static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA BOOST_FUNCTION_PARMS) { MemberPtr* f = reinterpret_cast(&function_obj_ptr.data); return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS); } }; template< typename MemberPtr, typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > struct BOOST_FUNCTION_VOID_MEMBER_INVOKER { static BOOST_FUNCTION_VOID_RETURN_TYPE invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA BOOST_FUNCTION_PARMS) { MemberPtr* f = reinterpret_cast(&function_obj_ptr.data); BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS)); } }; #endif template< typename FunctionPtr, typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > struct BOOST_FUNCTION_GET_FUNCTION_INVOKER { typedef typename mpl::if_c<(is_void::value), BOOST_FUNCTION_VOID_FUNCTION_INVOKER< FunctionPtr, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >, BOOST_FUNCTION_FUNCTION_INVOKER< FunctionPtr, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS > >::type type; }; template< typename FunctionObj, typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > struct BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER { typedef typename mpl::if_c<(is_void::value), BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER< FunctionObj, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >, BOOST_FUNCTION_FUNCTION_OBJ_INVOKER< FunctionObj, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS > >::type type; }; template< typename FunctionObj, typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > struct BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER { typedef typename mpl::if_c<(is_void::value), BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER< FunctionObj, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >, BOOST_FUNCTION_FUNCTION_REF_INVOKER< FunctionObj, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS > >::type type; }; #if BOOST_FUNCTION_NUM_ARGS > 0 /* Retrieve the appropriate invoker for a member pointer. */ template< typename MemberPtr, typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > struct BOOST_FUNCTION_GET_MEMBER_INVOKER { typedef typename mpl::if_c<(is_void::value), BOOST_FUNCTION_VOID_MEMBER_INVOKER< MemberPtr, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >, BOOST_FUNCTION_MEMBER_INVOKER< MemberPtr, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS > >::type type; }; #endif /* Given the tag returned by get_function_tag, retrieve the actual invoker that will be used for the given function object. Each specialization contains an "apply" nested class template that accepts the function object, return type, function argument types, and allocator. The resulting "apply" class contains two typedefs, "invoker_type" and "manager_type", which correspond to the invoker and manager types. */ template struct BOOST_FUNCTION_GET_INVOKER { }; /* Retrieve the invoker for a function pointer. */ template<> struct BOOST_FUNCTION_GET_INVOKER { template struct apply { typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER< FunctionPtr, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >::type invoker_type; typedef functor_manager manager_type; }; template struct apply_a { typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER< FunctionPtr, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >::type invoker_type; typedef functor_manager manager_type; }; }; #if BOOST_FUNCTION_NUM_ARGS > 0 /* Retrieve the invoker for a member pointer. */ template<> struct BOOST_FUNCTION_GET_INVOKER { template struct apply { typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER< MemberPtr, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >::type invoker_type; typedef functor_manager manager_type; }; template struct apply_a { typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER< MemberPtr, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >::type invoker_type; typedef functor_manager manager_type; }; }; #endif /* Retrieve the invoker for a function object. */ template<> struct BOOST_FUNCTION_GET_INVOKER { template struct apply { typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER< FunctionObj, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >::type invoker_type; typedef functor_manager manager_type; }; template struct apply_a { typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER< FunctionObj, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >::type invoker_type; typedef functor_manager_a manager_type; }; }; /* Retrieve the invoker for a reference to a function object. */ template<> struct BOOST_FUNCTION_GET_INVOKER { template struct apply { typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER< typename RefWrapper::type, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >::type invoker_type; typedef reference_manager manager_type; }; template struct apply_a { typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER< typename RefWrapper::type, R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >::type invoker_type; typedef reference_manager manager_type; }; }; /** * vtable for a specific boost::function instance. This * structure must be an aggregate so that we can use static * initialization in boost::function's assign_to and assign_to_a * members. It therefore cannot have any constructors, * destructors, base classes, etc. */ template struct BOOST_FUNCTION_VTABLE { #ifndef BOOST_NO_VOID_RETURNS typedef R result_type; #else typedef typename function_return_type::type result_type; #endif // BOOST_NO_VOID_RETURNS typedef result_type (*invoker_type)(function_buffer& BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS); template bool assign_to(F f, function_buffer& functor) const { typedef typename get_function_tag::type tag; return assign_to(f, functor, tag()); } template bool assign_to_a(F f, function_buffer& functor, Allocator a) const { typedef typename get_function_tag::type tag; return assign_to_a(f, functor, a, tag()); } void clear(function_buffer& functor) const { if (base.manager) base.manager(functor, functor, destroy_functor_tag); } private: // Function pointers template bool assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const { this->clear(functor); if (f) { // should be a reinterpret cast, but some compilers insist // on giving cv-qualifiers to free functions functor.func_ptr = reinterpret_cast(f); return true; } else { return false; } } template bool assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const { return assign_to(f,functor,function_ptr_tag()); } // Member pointers #if BOOST_FUNCTION_NUM_ARGS > 0 template bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const { // DPG TBD: Add explicit support for member function // objects, so we invoke through mem_fn() but we retain the // right target_type() values. if (f) { this->assign_to(boost::mem_fn(f), functor); return true; } else { return false; } } template bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const { // DPG TBD: Add explicit support for member function // objects, so we invoke through mem_fn() but we retain the // right target_type() values. if (f) { this->assign_to_a(boost::mem_fn(f), functor, a); return true; } else { return false; } } #endif // BOOST_FUNCTION_NUM_ARGS > 0 // Function objects // Assign to a function object using the small object optimization template void assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const { new (reinterpret_cast(&functor.data)) FunctionObj(f); } template void assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const { assign_functor(f,functor,mpl::true_()); } // Assign to a function object allocated on the heap. template void assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const { functor.obj_ptr = new FunctionObj(f); } template void assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const { typedef functor_wrapper functor_wrapper_type; typedef typename Allocator::template rebind::other wrapper_allocator_type; typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; wrapper_allocator_type wrapper_allocator(a); wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); wrapper_allocator.construct(copy, functor_wrapper_type(f,a)); functor_wrapper_type* new_f = static_cast(copy); functor.obj_ptr = new_f; } template bool assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const { if (!boost::detail::function::has_empty_target(boost::addressof(f))) { assign_functor(f, functor, mpl::bool_<(function_allows_small_object_optimization::value)>()); return true; } else { return false; } } template bool assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const { if (!boost::detail::function::has_empty_target(boost::addressof(f))) { assign_functor_a(f, functor, a, mpl::bool_<(function_allows_small_object_optimization::value)>()); return true; } else { return false; } } // Reference to a function object template bool assign_to(const reference_wrapper& f, function_buffer& functor, function_obj_ref_tag) const { functor.obj_ref.obj_ptr = (void *)(f.get_pointer()); functor.obj_ref.is_const_qualified = is_const::value; functor.obj_ref.is_volatile_qualified = is_volatile::value; return true; } template bool assign_to_a(const reference_wrapper& f, function_buffer& functor, Allocator, function_obj_ref_tag) const { return assign_to(f,functor,function_obj_ref_tag()); } public: vtable_base base; invoker_type invoker; }; } // end namespace function } // end namespace detail template< typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS > class BOOST_FUNCTION_FUNCTION : public function_base #if BOOST_FUNCTION_NUM_ARGS == 1 , public std::unary_function #elif BOOST_FUNCTION_NUM_ARGS == 2 , public std::binary_function #endif { public: #ifndef BOOST_NO_VOID_RETURNS typedef R result_type; #else typedef typename boost::detail::function::function_return_type::type result_type; #endif // BOOST_NO_VOID_RETURNS private: typedef boost::detail::function::BOOST_FUNCTION_VTABLE< R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS> vtable_type; vtable_type* get_vtable() const { return reinterpret_cast( reinterpret_cast(vtable) & ~static_cast(0x01)); } struct clear_type {}; public: BOOST_STATIC_CONSTANT(int, args = BOOST_FUNCTION_NUM_ARGS); // add signature for boost::lambda template struct sig { typedef result_type type; }; #if BOOST_FUNCTION_NUM_ARGS == 1 typedef T0 argument_type; #elif BOOST_FUNCTION_NUM_ARGS == 2 typedef T0 first_argument_type; typedef T1 second_argument_type; #endif BOOST_STATIC_CONSTANT(int, arity = BOOST_FUNCTION_NUM_ARGS); BOOST_FUNCTION_ARG_TYPES typedef BOOST_FUNCTION_FUNCTION self_type; BOOST_FUNCTION_FUNCTION() : function_base() { } // MSVC chokes if the following two constructors are collapsed into // one with a default parameter. template BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f #ifndef BOOST_NO_SFINAE ,typename enable_if_c< (boost::type_traits::ice_not< (is_integral::value)>::value), int>::type = 0 #endif // BOOST_NO_SFINAE ) : function_base() { this->assign_to(f); } template BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a #ifndef BOOST_NO_SFINAE ,typename enable_if_c< (boost::type_traits::ice_not< (is_integral::value)>::value), int>::type = 0 #endif // BOOST_NO_SFINAE ) : function_base() { this->assign_to_a(f,a); } #ifndef BOOST_NO_SFINAE BOOST_FUNCTION_FUNCTION(clear_type*) : function_base() { } #else BOOST_FUNCTION_FUNCTION(int zero) : function_base() { BOOST_ASSERT(zero == 0); } #endif BOOST_FUNCTION_FUNCTION(const BOOST_FUNCTION_FUNCTION& f) : function_base() { this->assign_to_own(f); } #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base() { this->move_assign(f); } #endif ~BOOST_FUNCTION_FUNCTION() { clear(); } result_type operator()(BOOST_FUNCTION_PARMS) const { if (this->empty()) boost::throw_exception(bad_function_call()); return get_vtable()->invoker (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS); } // The distinction between when to use BOOST_FUNCTION_FUNCTION and // when to use self_type is obnoxious. MSVC cannot handle self_type as // the return type of these assignment operators, but Borland C++ cannot // handle BOOST_FUNCTION_FUNCTION as the type of the temporary to // construct. template #ifndef BOOST_NO_SFINAE typename enable_if_c< (boost::type_traits::ice_not< (is_integral::value)>::value), BOOST_FUNCTION_FUNCTION&>::type #else BOOST_FUNCTION_FUNCTION& #endif operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) { this->clear(); BOOST_TRY { this->assign_to(f); } BOOST_CATCH (...) { vtable = 0; BOOST_RETHROW; } BOOST_CATCH_END return *this; } template void assign(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a) { this->clear(); BOOST_TRY{ this->assign_to_a(f,a); } BOOST_CATCH (...) { vtable = 0; BOOST_RETHROW; } BOOST_CATCH_END } #ifndef BOOST_NO_SFINAE BOOST_FUNCTION_FUNCTION& operator=(clear_type*) { this->clear(); return *this; } #else BOOST_FUNCTION_FUNCTION& operator=(int zero) { BOOST_ASSERT(zero == 0); this->clear(); return *this; } #endif // Assignment from another BOOST_FUNCTION_FUNCTION BOOST_FUNCTION_FUNCTION& operator=(const BOOST_FUNCTION_FUNCTION& f) { if (&f == this) return *this; this->clear(); BOOST_TRY { this->assign_to_own(f); } BOOST_CATCH (...) { vtable = 0; BOOST_RETHROW; } BOOST_CATCH_END return *this; } #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES // Move assignment from another BOOST_FUNCTION_FUNCTION BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f) { if (&f == this) return *this; this->clear(); BOOST_TRY { this->move_assign(f); } BOOST_CATCH (...) { vtable = 0; BOOST_RETHROW; } BOOST_CATCH_END return *this; } #endif void swap(BOOST_FUNCTION_FUNCTION& other) { if (&other == this) return; BOOST_FUNCTION_FUNCTION tmp; tmp.move_assign(*this); this->move_assign(other); other.move_assign(tmp); } // Clear out a target, if there is one void clear() { if (vtable) { if (!this->has_trivial_copy_and_destroy()) get_vtable()->clear(this->functor); vtable = 0; } } #if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG) // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it operator bool () const { return !this->empty(); } #else private: struct dummy { void nonnull() {} }; typedef void (dummy::*safe_bool)(); public: operator safe_bool () const { return (this->empty())? 0 : &dummy::nonnull; } bool operator!() const { return this->empty(); } #endif private: void assign_to_own(const BOOST_FUNCTION_FUNCTION& f) { if (!f.empty()) { this->vtable = f.vtable; if (this->has_trivial_copy_and_destroy()) this->functor = f.functor; else get_vtable()->base.manager(f.functor, this->functor, boost::detail::function::clone_functor_tag); } } template void assign_to(Functor f) { using detail::function::vtable_base; typedef typename detail::function::get_function_tag::type tag; typedef detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; typedef typename get_invoker:: template apply handler_type; typedef typename handler_type::invoker_type invoker_type; typedef typename handler_type::manager_type manager_type; // Note: it is extremely important that this initialization use // static initialization. Otherwise, we will have a race // condition here in multi-threaded code. See // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/. static const vtable_type stored_vtable = { { &manager_type::manage }, &invoker_type::invoke }; if (stored_vtable.assign_to(f, functor)) { std::size_t value = reinterpret_cast(&stored_vtable.base); if (boost::has_trivial_copy_constructor::value && boost::has_trivial_destructor::value && detail::function::function_allows_small_object_optimization::value) value |= static_cast(0x01); vtable = reinterpret_cast(value); } else vtable = 0; } template void assign_to_a(Functor f,Allocator a) { using detail::function::vtable_base; typedef typename detail::function::get_function_tag::type tag; typedef detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; typedef typename get_invoker:: template apply_a handler_type; typedef typename handler_type::invoker_type invoker_type; typedef typename handler_type::manager_type manager_type; // Note: it is extremely important that this initialization use // static initialization. Otherwise, we will have a race // condition here in multi-threaded code. See // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/. static const vtable_type stored_vtable = { { &manager_type::manage }, &invoker_type::invoke }; if (stored_vtable.assign_to_a(f, functor, a)) { std::size_t value = reinterpret_cast(&stored_vtable.base); if (boost::has_trivial_copy_constructor::value && boost::has_trivial_destructor::value && detail::function::function_allows_small_object_optimization::value) value |= static_cast(0x01); vtable = reinterpret_cast(value); } else vtable = 0; } // Moves the value from the specified argument to *this. If the argument // has its function object allocated on the heap, move_assign will pass // its buffer to *this, and set the argument's buffer pointer to NULL. void move_assign(BOOST_FUNCTION_FUNCTION& f) { if (&f == this) return; BOOST_TRY { if (!f.empty()) { this->vtable = f.vtable; if (this->has_trivial_copy_and_destroy()) this->functor = f.functor; else get_vtable()->base.manager(f.functor, this->functor, boost::detail::function::move_functor_tag); f.vtable = 0; } else { clear(); } } BOOST_CATCH (...) { vtable = 0; BOOST_RETHROW; } BOOST_CATCH_END } }; template inline void swap(BOOST_FUNCTION_FUNCTION< R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >& f1, BOOST_FUNCTION_FUNCTION< R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS >& f2) { f1.swap(f2); } // Poison comparisons between boost::function objects of the same type. template void operator==(const BOOST_FUNCTION_FUNCTION< R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>&, const BOOST_FUNCTION_FUNCTION< R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>&); template void operator!=(const BOOST_FUNCTION_FUNCTION< R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>&, const BOOST_FUNCTION_FUNCTION< R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>& ); #if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX) #if BOOST_FUNCTION_NUM_ARGS == 0 #define BOOST_FUNCTION_PARTIAL_SPEC R (void) #else #define BOOST_FUNCTION_PARTIAL_SPEC R (BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS,T)) #endif template class function : public BOOST_FUNCTION_FUNCTION { typedef BOOST_FUNCTION_FUNCTION base_type; typedef function self_type; struct clear_type {}; public: function() : base_type() {} template function(Functor f #ifndef BOOST_NO_SFINAE ,typename enable_if_c< (boost::type_traits::ice_not< (is_integral::value)>::value), int>::type = 0 #endif ) : base_type(f) { } template function(Functor f, Allocator a #ifndef BOOST_NO_SFINAE ,typename enable_if_c< (boost::type_traits::ice_not< (is_integral::value)>::value), int>::type = 0 #endif ) : base_type(f,a) { } #ifndef BOOST_NO_SFINAE function(clear_type*) : base_type() {} #endif function(const self_type& f) : base_type(static_cast(f)){} function(const base_type& f) : base_type(static_cast(f)){} #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES // Move constructors function(self_type&& f): base_type(static_cast(f)){} function(base_type&& f): base_type(static_cast(f)){} #endif self_type& operator=(const self_type& f) { self_type(f).swap(*this); return *this; } #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES self_type& operator=(self_type&& f) { self_type(static_cast(f)).swap(*this); return *this; } #endif template #ifndef BOOST_NO_SFINAE typename enable_if_c< (boost::type_traits::ice_not< (is_integral::value)>::value), self_type&>::type #else self_type& #endif operator=(Functor f) { self_type(f).swap(*this); return *this; } #ifndef BOOST_NO_SFINAE self_type& operator=(clear_type*) { this->clear(); return *this; } #endif self_type& operator=(const base_type& f) { self_type(f).swap(*this); return *this; } #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES self_type& operator=(base_type&& f) { self_type(static_cast(f)).swap(*this); return *this; } #endif }; #undef BOOST_FUNCTION_PARTIAL_SPEC #endif // have partial specialization } // end namespace boost // Cleanup after ourselves... #undef BOOST_FUNCTION_VTABLE #undef BOOST_FUNCTION_COMMA #undef BOOST_FUNCTION_FUNCTION #undef BOOST_FUNCTION_FUNCTION_INVOKER #undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER #undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER #undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER #undef BOOST_FUNCTION_FUNCTION_REF_INVOKER #undef BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER #undef BOOST_FUNCTION_MEMBER_INVOKER #undef BOOST_FUNCTION_VOID_MEMBER_INVOKER #undef BOOST_FUNCTION_GET_FUNCTION_INVOKER #undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER #undef BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER #undef BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER #undef BOOST_FUNCTION_GET_INVOKER #undef BOOST_FUNCTION_TEMPLATE_PARMS #undef BOOST_FUNCTION_TEMPLATE_ARGS #undef BOOST_FUNCTION_PARMS #undef BOOST_FUNCTION_PARM #undef BOOST_FUNCTION_ARGS #undef BOOST_FUNCTION_ARG_TYPE #undef BOOST_FUNCTION_ARG_TYPES #undef BOOST_FUNCTION_VOID_RETURN_TYPE #undef BOOST_FUNCTION_RETURN #if defined(BOOST_MSVC) # pragma warning( pop ) #endif passenger-4.0.37/ext/boost/function/detail/function_iterate.hpp000644 000765 000024 00000001026 12233035540 025303 0ustar00honglistaff000000 000000 // Boost.Function library // Copyright Douglas Gregor 2003. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org #if !defined(BOOST_PP_IS_ITERATING) # error Boost.Function - do not include this file! #endif #define BOOST_FUNCTION_NUM_ARGS BOOST_PP_ITERATION() #include #undef BOOST_FUNCTION_NUM_ARGS passenger-4.0.37/ext/boost/function/detail/maybe_include.hpp000644 000765 000024 00000020120 12233035540 024535 0ustar00honglistaff000000 000000 // Boost.Function library // Copyright Douglas Gregor 2003. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org #if BOOST_FUNCTION_NUM_ARGS == 0 # ifndef BOOST_FUNCTION_0 # define BOOST_FUNCTION_0 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 1 # ifndef BOOST_FUNCTION_1 # define BOOST_FUNCTION_1 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 2 # ifndef BOOST_FUNCTION_2 # define BOOST_FUNCTION_2 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 3 # ifndef BOOST_FUNCTION_3 # define BOOST_FUNCTION_3 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 4 # ifndef BOOST_FUNCTION_4 # define BOOST_FUNCTION_4 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 5 # ifndef BOOST_FUNCTION_5 # define BOOST_FUNCTION_5 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 6 # ifndef BOOST_FUNCTION_6 # define BOOST_FUNCTION_6 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 7 # ifndef BOOST_FUNCTION_7 # define BOOST_FUNCTION_7 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 8 # ifndef BOOST_FUNCTION_8 # define BOOST_FUNCTION_8 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 9 # ifndef BOOST_FUNCTION_9 # define BOOST_FUNCTION_9 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 10 # ifndef BOOST_FUNCTION_10 # define BOOST_FUNCTION_10 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 11 # ifndef BOOST_FUNCTION_11 # define BOOST_FUNCTION_11 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 12 # ifndef BOOST_FUNCTION_12 # define BOOST_FUNCTION_12 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 13 # ifndef BOOST_FUNCTION_13 # define BOOST_FUNCTION_13 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 14 # ifndef BOOST_FUNCTION_14 # define BOOST_FUNCTION_14 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 15 # ifndef BOOST_FUNCTION_15 # define BOOST_FUNCTION_15 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 16 # ifndef BOOST_FUNCTION_16 # define BOOST_FUNCTION_16 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 17 # ifndef BOOST_FUNCTION_17 # define BOOST_FUNCTION_17 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 18 # ifndef BOOST_FUNCTION_18 # define BOOST_FUNCTION_18 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 19 # ifndef BOOST_FUNCTION_19 # define BOOST_FUNCTION_19 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 20 # ifndef BOOST_FUNCTION_20 # define BOOST_FUNCTION_20 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 21 # ifndef BOOST_FUNCTION_21 # define BOOST_FUNCTION_21 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 22 # ifndef BOOST_FUNCTION_22 # define BOOST_FUNCTION_22 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 23 # ifndef BOOST_FUNCTION_23 # define BOOST_FUNCTION_23 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 24 # ifndef BOOST_FUNCTION_24 # define BOOST_FUNCTION_24 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 25 # ifndef BOOST_FUNCTION_25 # define BOOST_FUNCTION_25 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 26 # ifndef BOOST_FUNCTION_26 # define BOOST_FUNCTION_26 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 27 # ifndef BOOST_FUNCTION_27 # define BOOST_FUNCTION_27 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 28 # ifndef BOOST_FUNCTION_28 # define BOOST_FUNCTION_28 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 29 # ifndef BOOST_FUNCTION_29 # define BOOST_FUNCTION_29 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 30 # ifndef BOOST_FUNCTION_30 # define BOOST_FUNCTION_30 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 31 # ifndef BOOST_FUNCTION_31 # define BOOST_FUNCTION_31 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 32 # ifndef BOOST_FUNCTION_32 # define BOOST_FUNCTION_32 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 33 # ifndef BOOST_FUNCTION_33 # define BOOST_FUNCTION_33 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 34 # ifndef BOOST_FUNCTION_34 # define BOOST_FUNCTION_34 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 35 # ifndef BOOST_FUNCTION_35 # define BOOST_FUNCTION_35 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 36 # ifndef BOOST_FUNCTION_36 # define BOOST_FUNCTION_36 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 37 # ifndef BOOST_FUNCTION_37 # define BOOST_FUNCTION_37 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 38 # ifndef BOOST_FUNCTION_38 # define BOOST_FUNCTION_38 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 39 # ifndef BOOST_FUNCTION_39 # define BOOST_FUNCTION_39 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 40 # ifndef BOOST_FUNCTION_40 # define BOOST_FUNCTION_40 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 41 # ifndef BOOST_FUNCTION_41 # define BOOST_FUNCTION_41 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 42 # ifndef BOOST_FUNCTION_42 # define BOOST_FUNCTION_42 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 43 # ifndef BOOST_FUNCTION_43 # define BOOST_FUNCTION_43 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 44 # ifndef BOOST_FUNCTION_44 # define BOOST_FUNCTION_44 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 45 # ifndef BOOST_FUNCTION_45 # define BOOST_FUNCTION_45 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 46 # ifndef BOOST_FUNCTION_46 # define BOOST_FUNCTION_46 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 47 # ifndef BOOST_FUNCTION_47 # define BOOST_FUNCTION_47 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 48 # ifndef BOOST_FUNCTION_48 # define BOOST_FUNCTION_48 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 49 # ifndef BOOST_FUNCTION_49 # define BOOST_FUNCTION_49 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 50 # ifndef BOOST_FUNCTION_50 # define BOOST_FUNCTION_50 # include # endif #else # error Cannot handle Boost.Function objects that accept more than 50 arguments! #endif passenger-4.0.37/ext/boost/function/detail/prologue.hpp000644 000765 000024 00000001741 12233035540 023601 0ustar00honglistaff000000 000000 // Boost.Function library // Copyright Douglas Gregor 2002-2003. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org #ifndef BOOST_FUNCTION_PROLOGUE_HPP #define BOOST_FUNCTION_PROLOGUE_HPP # include # include # include // unary_function, binary_function # include # include # include # include # include # include # include # include # include # include # include #endif // BOOST_FUNCTION_PROLOGUE_HPP passenger-4.0.37/ext/boost/exception/current_exception_cast.hpp000644 000765 000024 00000001711 12233035540 025423 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_7E83C166200811DE885E826156D89593 #define UUID_7E83C166200811DE885E826156D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif namespace boost { template inline E * current_exception_cast() { try { throw; } catch( E & e ) { return &e; } catch( ...) { return 0; } } } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/exception/detail/000755 000765 000024 00000000000 12233035540 021402 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/exception/diagnostic_information.hpp000644 000765 000024 00000014075 12233035540 025411 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_0552D49838DD11DD90146B8956D89593 #define UUID_0552D49838DD11DD90146B8956D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif #include #include #include #include #ifndef BOOST_NO_RTTI #include #endif #include #include #include #ifndef BOOST_NO_EXCEPTIONS #include namespace boost { namespace exception_detail { std::string diagnostic_information_impl( boost::exception const *, std::exception const *, bool, bool ); } inline std::string current_exception_diagnostic_information( bool verbose=true) { boost::exception const * be=current_exception_cast(); std::exception const * se=current_exception_cast(); if( be || se ) return exception_detail::diagnostic_information_impl(be,se,true,verbose); else return "No diagnostic information available."; } } #endif namespace boost { namespace exception_detail { inline exception const * get_boost_exception( exception const * e ) { return e; } inline exception const * get_boost_exception( ... ) { return 0; } inline std::exception const * get_std_exception( std::exception const * e ) { return e; } inline std::exception const * get_std_exception( ... ) { return 0; } inline char const * get_diagnostic_information( exception const & x, char const * header ) { #ifndef BOOST_NO_EXCEPTIONS try { #endif error_info_container * c=x.data_.get(); if( !c ) x.data_.adopt(c=new exception_detail::error_info_container_impl); char const * di=c->diagnostic_information(header); BOOST_ASSERT(di!=0); return di; #ifndef BOOST_NO_EXCEPTIONS } catch(...) { return 0; } #endif } inline std::string diagnostic_information_impl( boost::exception const * be, std::exception const * se, bool with_what, bool verbose ) { if( !be && !se ) return "Unknown exception."; #ifndef BOOST_NO_RTTI if( !be ) be=dynamic_cast(se); if( !se ) se=dynamic_cast(be); #endif char const * wh=0; if( with_what && se ) { wh=se->what(); if( be && exception_detail::get_diagnostic_information(*be,0)==wh ) return wh; } std::ostringstream tmp; if( be && verbose ) { char const * const * f=get_error_info(*be); int const * l=get_error_info(*be); char const * const * fn=get_error_info(*be); if( !f && !l && !fn ) tmp << "Throw location unknown (consider using BOOST_THROW_EXCEPTION)\n"; else { if( f ) { tmp << *f; if( int const * l=get_error_info(*be) ) tmp << '(' << *l << "): "; } tmp << "Throw in function "; if( char const * const * fn=get_error_info(*be) ) tmp << *fn; else tmp << "(unknown)"; tmp << '\n'; } } #ifndef BOOST_NO_RTTI if ( verbose ) tmp << std::string("Dynamic exception type: ") << units::detail::demangle((be?(BOOST_EXCEPTION_DYNAMIC_TYPEID(*be)):(BOOST_EXCEPTION_DYNAMIC_TYPEID(*se))).type_->name()) << '\n'; #endif if( with_what && se && verbose ) tmp << "std::exception::what: " << wh << '\n'; if( be ) if( char const * s=exception_detail::get_diagnostic_information(*be,tmp.str().c_str()) ) if( *s ) return std::string(s); return tmp.str(); } } template std::string diagnostic_information( T const & e, bool verbose=true ) { return exception_detail::diagnostic_information_impl(exception_detail::get_boost_exception(&e),exception_detail::get_std_exception(&e),true,verbose); } inline char const * diagnostic_information_what( exception const & e, bool verbose=true ) throw() { char const * w=0; #ifndef BOOST_NO_EXCEPTIONS try { #endif (void) exception_detail::diagnostic_information_impl(&e,0,false,verbose); if( char const * di=exception_detail::get_diagnostic_information(e,0) ) return di; else return "Failed to produce boost::diagnostic_information_what()"; #ifndef BOOST_NO_EXCEPTIONS } catch( ... ) { } #endif return w; } } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/exception/exception.hpp000644 000765 000024 00000027543 12233035540 022662 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_274DA366004E11DCB1DDFE2E56D89593 #define UUID_274DA366004E11DCB1DDFE2E56D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif namespace boost { namespace exception_detail { template class refcount_ptr { public: refcount_ptr(): px_(0) { } ~refcount_ptr() { release(); } refcount_ptr( refcount_ptr const & x ): px_(x.px_) { add_ref(); } refcount_ptr & operator=( refcount_ptr const & x ) { adopt(x.px_); return *this; } void adopt( T * px ) { release(); px_=px; add_ref(); } T * get() const { return px_; } private: T * px_; void add_ref() { if( px_ ) px_->add_ref(); } void release() { if( px_ && px_->release() ) px_=0; } }; } //////////////////////////////////////////////////////////////////////// template class error_info; typedef error_info throw_function; typedef error_info throw_file; typedef error_info throw_line; template <> class error_info { public: typedef char const * value_type; value_type v_; explicit error_info( value_type v ): v_(v) { } }; template <> class error_info { public: typedef char const * value_type; value_type v_; explicit error_info( value_type v ): v_(v) { } }; template <> class error_info { public: typedef int value_type; value_type v_; explicit error_info( value_type v ): v_(v) { } }; #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility push (default) # endif #endif class exception; #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility pop # endif #endif template class shared_ptr; namespace exception_detail { class error_info_base; struct type_info_; struct error_info_container { virtual char const * diagnostic_information( char const * ) const = 0; virtual shared_ptr get( type_info_ const & ) const = 0; virtual void set( shared_ptr const &, type_info_ const & ) = 0; virtual void add_ref() const = 0; virtual bool release() const = 0; virtual refcount_ptr clone() const = 0; protected: ~error_info_container() throw() { } }; template struct get_info; template <> struct get_info; template <> struct get_info; template <> struct get_info; char const * get_diagnostic_information( exception const &, char const * ); void copy_boost_exception( exception *, exception const * ); template E const & set_info( E const &, error_info const & ); template E const & set_info( E const &, throw_function const & ); template E const & set_info( E const &, throw_file const & ); template E const & set_info( E const &, throw_line const & ); } #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility push (default) # endif #endif class exception { protected: exception(): throw_function_(0), throw_file_(0), throw_line_(-1) { } #ifdef __HP_aCC //On HP aCC, this protected copy constructor prevents throwing boost::exception. //On all other platforms, the same effect is achieved by the pure virtual destructor. exception( exception const & x ) throw(): data_(x.data_), throw_function_(x.throw_function_), throw_file_(x.throw_file_), throw_line_(x.throw_line_) { } #endif virtual ~exception() throw() #ifndef __HP_aCC = 0 //Workaround for HP aCC, =0 incorrectly leads to link errors. #endif ; #if (defined(__MWERKS__) && __MWERKS__<=0x3207) || (defined(_MSC_VER) && _MSC_VER<=1310) public: #else private: template friend E const & exception_detail::set_info( E const &, throw_function const & ); template friend E const & exception_detail::set_info( E const &, throw_file const & ); template friend E const & exception_detail::set_info( E const &, throw_line const & ); template friend E const & exception_detail::set_info( E const &, error_info const & ); friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); template friend struct exception_detail::get_info; friend struct exception_detail::get_info; friend struct exception_detail::get_info; friend struct exception_detail::get_info; friend void exception_detail::copy_boost_exception( exception *, exception const * ); #endif mutable exception_detail::refcount_ptr data_; mutable char const * throw_function_; mutable char const * throw_file_; mutable int throw_line_; }; #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility pop # endif #endif inline exception:: ~exception() throw() { } namespace exception_detail { template E const & set_info( E const & x, throw_function const & y ) { x.throw_function_=y.v_; return x; } template E const & set_info( E const & x, throw_file const & y ) { x.throw_file_=y.v_; return x; } template E const & set_info( E const & x, throw_line const & y ) { x.throw_line_=y.v_; return x; } } //////////////////////////////////////////////////////////////////////// namespace exception_detail { #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility push (default) # endif #endif template struct error_info_injector: public T, public exception { explicit error_info_injector( T const & x ): T(x) { } ~error_info_injector() throw() { } }; #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility pop # endif #endif struct large_size { char c[256]; }; large_size dispatch_boost_exception( exception const * ); struct small_size { }; small_size dispatch_boost_exception( void const * ); template struct enable_error_info_helper; template struct enable_error_info_helper { typedef T type; }; template struct enable_error_info_helper { typedef error_info_injector type; }; template struct enable_error_info_return_type { typedef typename enable_error_info_helper(0)))>::type type; }; } template inline typename exception_detail::enable_error_info_return_type::type enable_error_info( T const & x ) { typedef typename exception_detail::enable_error_info_return_type::type rt; return rt(x); } //////////////////////////////////////////////////////////////////////// namespace exception_detail { #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility push (default) # endif #endif class clone_base { public: virtual clone_base const * clone() const = 0; virtual void rethrow() const = 0; virtual ~clone_base() throw() { } }; #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility pop # endif #endif inline void copy_boost_exception( exception * a, exception const * b ) { refcount_ptr data; if( error_info_container * d=b->data_.get() ) data = d->clone(); a->throw_file_ = b->throw_file_; a->throw_line_ = b->throw_line_; a->throw_function_ = b->throw_function_; a->data_ = data; } inline void copy_boost_exception( void *, void const * ) { } template class clone_impl: public T, public virtual clone_base { struct clone_tag { }; clone_impl( clone_impl const & x, clone_tag ): T(x) { copy_boost_exception(this,&x); } public: explicit clone_impl( T const & x ): T(x) { copy_boost_exception(this,&x); } ~clone_impl() throw() { } private: clone_base const * clone() const { return new clone_impl(*this,clone_tag()); } void rethrow() const { throw*this; } }; } template inline exception_detail::clone_impl enable_current_exception( T const & x ) { return exception_detail::clone_impl(x); } } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/exception/get_error_info.hpp000644 000765 000024 00000007053 12233035540 023661 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_1A590226753311DD9E4CCF6156D89593 #define UUID_1A590226753311DD9E4CCF6156D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif #include #include #include #include namespace boost { namespace exception_detail { template struct get_info { static typename ErrorInfo::value_type * get( exception const & x ) { if( exception_detail::error_info_container * c=x.data_.get() ) if( shared_ptr eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) ) { #ifndef BOOST_NO_RTTI BOOST_ASSERT( 0!=dynamic_cast(eib.get()) ); #endif ErrorInfo * w = static_cast(eib.get()); return &w->value(); } return 0; } }; template <> struct get_info { static char const * * get( exception const & x ) { return x.throw_function_ ? &x.throw_function_ : 0; } }; template <> struct get_info { static char const * * get( exception const & x ) { return x.throw_file_ ? &x.throw_file_ : 0; } }; template <> struct get_info { static int * get( exception const & x ) { return x.throw_line_!=-1 ? &x.throw_line_ : 0; } }; template struct get_error_info_return_type { typedef R * type; }; template struct get_error_info_return_type { typedef R const * type; }; } #ifdef BOOST_NO_RTTI template inline typename ErrorInfo::value_type const * get_error_info( boost::exception const & x ) { return exception_detail::get_info::get(x); } template inline typename ErrorInfo::value_type * get_error_info( boost::exception & x ) { return exception_detail::get_info::get(x); } #else template inline typename exception_detail::get_error_info_return_type::type get_error_info( E & some_exception ) { if( exception const * x = dynamic_cast(&some_exception) ) return exception_detail::get_info::get(*x); else return 0; } #endif } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/exception/info.hpp000644 000765 000024 00000013124 12233035540 021605 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_8D22C4CA9CC811DCAA9133D256D89593 #define UUID_8D22C4CA9CC811DCAA9133D256D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif #include #include #include #include #include #include namespace boost { template inline std::string error_info_name( error_info const & x ) { return tag_type_name(); } template inline std::string to_string( error_info const & x ) { return '[' + error_info_name(x) + "] = " + to_string_stub(x.value()) + '\n'; } template inline error_info:: error_info( value_type const & value ): value_(value) { } template inline error_info:: ~error_info() throw() { } template inline std::string error_info:: name_value_string() const { return to_string_stub(*this); } namespace exception_detail { class error_info_container_impl: public error_info_container { public: error_info_container_impl(): count_(0) { } ~error_info_container_impl() throw() { } void set( shared_ptr const & x, type_info_ const & typeid_ ) { BOOST_ASSERT(x); info_[typeid_] = x; diagnostic_info_str_.clear(); } shared_ptr get( type_info_ const & ti ) const { error_info_map::const_iterator i=info_.find(ti); if( info_.end()!=i ) { shared_ptr const & p = i->second; #ifndef BOOST_NO_RTTI BOOST_ASSERT( *BOOST_EXCEPTION_DYNAMIC_TYPEID(*p).type_==*ti.type_ ); #endif return p; } return shared_ptr(); } char const * diagnostic_information( char const * header ) const { if( header ) { std::ostringstream tmp; tmp << header; for( error_info_map::const_iterator i=info_.begin(),end=info_.end(); i!=end; ++i ) { error_info_base const & x = *i->second; tmp << x.name_value_string(); } tmp.str().swap(diagnostic_info_str_); } return diagnostic_info_str_.c_str(); } private: friend class boost::exception; typedef std::map< type_info_, shared_ptr > error_info_map; error_info_map info_; mutable std::string diagnostic_info_str_; mutable int count_; error_info_container_impl( error_info_container_impl const & ); error_info_container_impl & operator=( error_info_container const & ); void add_ref() const { ++count_; } bool release() const { if( --count_ ) return false; else { delete this; return true; } } refcount_ptr clone() const { refcount_ptr p; error_info_container_impl * c=new error_info_container_impl; p.adopt(c); c->info_ = info_; return p; } }; template inline E const & set_info( E const & x, error_info const & v ) { typedef error_info error_info_tag_t; shared_ptr p( new error_info_tag_t(v) ); exception_detail::error_info_container * c=x.data_.get(); if( !c ) x.data_.adopt(c=new exception_detail::error_info_container_impl); c->set(p,BOOST_EXCEPTION_STATIC_TYPEID(error_info_tag_t)); return x; } template struct derives_boost_exception { enum e { value = (sizeof(dispatch_boost_exception((T*)0))==sizeof(large_size)) }; }; } template inline typename enable_if,E const &>::type operator<<( E const & x, error_info const & v ) { return exception_detail::set_info(x,v); } } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/exception/to_string.hpp000644 000765 000024 00000004333 12233035540 022664 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_7E48761AD92811DC9011477D56D89593 #define UUID_7E48761AD92811DC9011477D56D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif #include #include #include namespace boost { template std::string to_string( std::pair const & ); std::string to_string( std::exception const & ); namespace to_string_detail { template typename disable_if,char>::type to_string( T const & ); using boost::to_string; template struct has_to_string_impl; template struct has_to_string_impl { enum e { value=1 }; }; template struct has_to_string_impl { static T const & f(); enum e { value=1!=sizeof(to_string(f())) }; }; } template inline typename enable_if,std::string>::type to_string( T const & x ) { std::ostringstream out; out << x; return out.str(); } template struct has_to_string { enum e { value=to_string_detail::has_to_string_impl::value>::value }; }; template inline std::string to_string( std::pair const & x ) { return std::string("(") + to_string(x.first) + ',' + to_string(x.second) + ')'; } inline std::string to_string( std::exception const & x ) { return x.what(); } } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/exception/to_string_stub.hpp000644 000765 000024 00000005727 12233035540 023731 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_E788439ED9F011DCB181F25B55D89593 #define UUID_E788439ED9F011DCB181F25B55D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif #include #include #include namespace boost { namespace exception_detail { template struct to_string_dispatcher { template static std::string convert( T const & x, Stub ) { return to_string(x); } }; template <> struct to_string_dispatcher { template static std::string convert( T const & x, Stub s ) { return s(x); } template static std::string convert( T const & x, std::string s ) { return s; } template static std::string convert( T const & x, char const * s ) { BOOST_ASSERT(s!=0); return s; } }; namespace to_string_dispatch { template inline std::string dispatch( T const & x, Stub s ) { return to_string_dispatcher::value>::convert(x,s); } } template inline std::string string_stub_dump( T const & x ) { return "[ " + exception_detail::object_hex_dump(x) + " ]"; } } template inline std::string to_string_stub( T const & x ) { return exception_detail::to_string_dispatch::dispatch(x,&exception_detail::string_stub_dump); } template inline std::string to_string_stub( T const & x, Stub s ) { return exception_detail::to_string_dispatch::dispatch(x,s); } template inline std::string to_string_stub( std::pair const & x, Stub s ) { return std::string("(") + to_string_stub(x.first,s) + ',' + to_string_stub(x.second,s) + ')'; } } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/exception/detail/attribute_noreturn.hpp000644 000765 000024 00000001016 12233035540 026050 0ustar00honglistaff000000 000000 //Copyright (c) 2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_61531AB0680611DEADD5846855D89593 #define UUID_61531AB0680611DEADD5846855D89593 #if defined(_MSC_VER) #define BOOST_ATTRIBUTE_NORETURN __declspec(noreturn) #elif defined(__GNUC__) #define BOOST_ATTRIBUTE_NORETURN __attribute__((__noreturn__)) #else #define BOOST_ATTRIBUTE_NORETURN #endif #endif passenger-4.0.37/ext/boost/exception/detail/clone_current_exception.hpp000644 000765 000024 00000002276 12233035540 027042 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_81522C0EB56511DFAB613DB0DFD72085 #define UUID_81522C0EB56511DFAB613DB0DFD72085 #ifdef BOOST_NO_EXCEPTIONS # error This header requires exception handling to be enabled. #endif namespace boost { namespace exception_detail { class clone_base; #ifdef BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR int clone_current_exception_non_intrusive( clone_base const * & cloned ); #endif namespace clone_current_exception_result { int const success=0; int const bad_alloc=1; int const bad_exception=2; int const not_supported=3; } inline int clone_current_exception( clone_base const * & cloned ) { #ifdef BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR return clone_current_exception_non_intrusive(cloned); #else return clone_current_exception_result::not_supported; #endif } } } #endif passenger-4.0.37/ext/boost/exception/detail/error_info_impl.hpp000644 000765 000024 00000003021 12233035540 025274 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_CE6983AC753411DDA764247956D89593 #define UUID_CE6983AC753411DDA764247956D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif #include namespace boost { namespace exception_detail { class error_info_base { public: virtual std::string name_value_string() const = 0; protected: virtual ~error_info_base() throw() { } }; } template class error_info: public exception_detail::error_info_base { public: typedef T value_type; error_info( value_type const & value ); ~error_info() throw(); value_type const & value() const { return value_; } value_type & value() { return value_; } private: std::string name_value_string() const; value_type value_; }; } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/exception/detail/exception_ptr.hpp000644 000765 000024 00000035120 12233035540 024777 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_618474C2DE1511DEB74A388C56D89593 #define UUID_618474C2DE1511DEB74A388C56D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif #include #ifdef BOOST_NO_EXCEPTIONS #error This header requires exception handling to be enabled. #endif #include #include #include #include #include #include #include #include #include #include namespace boost { class exception_ptr; BOOST_ATTRIBUTE_NORETURN void rethrow_exception( exception_ptr const & ); exception_ptr current_exception(); class exception_ptr { typedef boost::shared_ptr impl; impl ptr_; friend void rethrow_exception( exception_ptr const & ); typedef exception_detail::clone_base const * (impl::*unspecified_bool_type)() const; public: exception_ptr() { } explicit exception_ptr( impl const & ptr ): ptr_(ptr) { } bool operator==( exception_ptr const & other ) const { return ptr_==other.ptr_; } bool operator!=( exception_ptr const & other ) const { return ptr_!=other.ptr_; } operator unspecified_bool_type() const { return ptr_?&impl::get:0; } }; template inline exception_ptr copy_exception( T const & e ) { try { throw enable_current_exception(e); } catch( ... ) { return current_exception(); } } #ifndef BOOST_NO_RTTI typedef error_info original_exception_type; inline std::string to_string( original_exception_type const & x ) { return x.value()->name(); } #endif namespace exception_detail { struct bad_alloc_: boost::exception, std::bad_alloc { ~bad_alloc_() throw() { } }; struct bad_exception_: boost::exception, std::bad_exception { ~bad_exception_() throw() { } }; template exception_ptr get_static_exception_object() { Exception ba; exception_detail::clone_impl c(ba); c << throw_function(BOOST_CURRENT_FUNCTION) << throw_file(__FILE__) << throw_line(__LINE__); static exception_ptr ep(shared_ptr(new exception_detail::clone_impl(c))); return ep; } template struct exception_ptr_static_exception_object { static exception_ptr const e; }; template exception_ptr const exception_ptr_static_exception_object:: e = get_static_exception_object(); } #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility push (default) # endif #endif class unknown_exception: public boost::exception, public std::exception { public: unknown_exception() { } explicit unknown_exception( std::exception const & e ) { add_original_type(e); } explicit unknown_exception( boost::exception const & e ): boost::exception(e) { add_original_type(e); } ~unknown_exception() throw() { } private: template void add_original_type( E const & e ) { #ifndef BOOST_NO_RTTI (*this) << original_exception_type(&typeid(e)); #endif } }; #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility pop # endif #endif namespace exception_detail { template class current_exception_std_exception_wrapper: public T, public boost::exception { public: explicit current_exception_std_exception_wrapper( T const & e1 ): T(e1) { add_original_type(e1); } current_exception_std_exception_wrapper( T const & e1, boost::exception const & e2 ): T(e1), boost::exception(e2) { add_original_type(e1); } ~current_exception_std_exception_wrapper() throw() { } private: template void add_original_type( E const & e ) { #ifndef BOOST_NO_RTTI (*this) << original_exception_type(&typeid(e)); #endif } }; #ifdef BOOST_NO_RTTI template boost::exception const * get_boost_exception( T const * ) { try { throw; } catch( boost::exception & x ) { return &x; } catch(...) { return 0; } } #else template boost::exception const * get_boost_exception( T const * x ) { return dynamic_cast(x); } #endif template inline exception_ptr current_exception_std_exception( T const & e1 ) { if( boost::exception const * e2 = get_boost_exception(&e1) ) return boost::copy_exception(current_exception_std_exception_wrapper(e1,*e2)); else return boost::copy_exception(current_exception_std_exception_wrapper(e1)); } inline exception_ptr current_exception_unknown_exception() { return boost::copy_exception(unknown_exception()); } inline exception_ptr current_exception_unknown_boost_exception( boost::exception const & e ) { return boost::copy_exception(unknown_exception(e)); } inline exception_ptr current_exception_unknown_std_exception( std::exception const & e ) { if( boost::exception const * be = get_boost_exception(&e) ) return current_exception_unknown_boost_exception(*be); else return boost::copy_exception(unknown_exception(e)); } inline exception_ptr current_exception_impl() { exception_detail::clone_base const * e=0; switch( exception_detail::clone_current_exception(e) ) { case exception_detail::clone_current_exception_result:: success: { BOOST_ASSERT(e!=0); return exception_ptr(shared_ptr(e)); } case exception_detail::clone_current_exception_result:: bad_alloc: { BOOST_ASSERT(!e); return exception_detail::exception_ptr_static_exception_object::e; } case exception_detail::clone_current_exception_result:: bad_exception: { BOOST_ASSERT(!e); return exception_detail::exception_ptr_static_exception_object::e; } default: BOOST_ASSERT(0); case exception_detail::clone_current_exception_result:: not_supported: { BOOST_ASSERT(!e); try { throw; } catch( exception_detail::clone_base & e ) { return exception_ptr(shared_ptr(e.clone())); } catch( std::domain_error & e ) { return exception_detail::current_exception_std_exception(e); } catch( std::invalid_argument & e ) { return exception_detail::current_exception_std_exception(e); } catch( std::length_error & e ) { return exception_detail::current_exception_std_exception(e); } catch( std::out_of_range & e ) { return exception_detail::current_exception_std_exception(e); } catch( std::logic_error & e ) { return exception_detail::current_exception_std_exception(e); } catch( std::range_error & e ) { return exception_detail::current_exception_std_exception(e); } catch( std::overflow_error & e ) { return exception_detail::current_exception_std_exception(e); } catch( std::underflow_error & e ) { return exception_detail::current_exception_std_exception(e); } catch( std::ios_base::failure & e ) { return exception_detail::current_exception_std_exception(e); } catch( std::runtime_error & e ) { return exception_detail::current_exception_std_exception(e); } catch( std::bad_alloc & e ) { return exception_detail::current_exception_std_exception(e); } #ifndef BOOST_NO_TYPEID catch( std::bad_cast & e ) { return exception_detail::current_exception_std_exception(e); } catch( std::bad_typeid & e ) { return exception_detail::current_exception_std_exception(e); } #endif catch( std::bad_exception & e ) { return exception_detail::current_exception_std_exception(e); } catch( std::exception & e ) { return exception_detail::current_exception_unknown_std_exception(e); } catch( boost::exception & e ) { return exception_detail::current_exception_unknown_boost_exception(e); } catch( ... ) { return exception_detail::current_exception_unknown_exception(); } } } } } inline exception_ptr current_exception() { exception_ptr ret; try { ret=exception_detail::current_exception_impl(); } catch( std::bad_alloc & ) { ret=exception_detail::exception_ptr_static_exception_object::e; } catch( ... ) { ret=exception_detail::exception_ptr_static_exception_object::e; } BOOST_ASSERT(ret); return ret; } BOOST_ATTRIBUTE_NORETURN inline void rethrow_exception( exception_ptr const & p ) { BOOST_ASSERT(p); p.ptr_->rethrow(); BOOST_ASSERT(0); #if defined(UNDER_CE) // some CE platforms don't define ::abort() exit(-1); #else abort(); #endif } inline std::string diagnostic_information( exception_ptr const & p, bool verbose=true ) { if( p ) try { rethrow_exception(p); } catch( ... ) { return current_exception_diagnostic_information(verbose); } return ""; } inline std::string to_string( exception_ptr const & p ) { std::string s='\n'+diagnostic_information(p); std::string padding(" "); std::string r; bool f=false; for( std::string::const_iterator i=s.begin(),e=s.end(); i!=e; ++i ) { if( f ) r+=padding; char c=*i; r+=c; f=(c=='\n'); } return r; } } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/exception/detail/is_output_streamable.hpp000644 000765 000024 00000003222 12233035540 026344 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_898984B4076411DD973EDFA055D89593 #define UUID_898984B4076411DD973EDFA055D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif #include namespace boost { namespace to_string_detail { struct partial_ordering_helper1 { template partial_ordering_helper1( std::basic_ostream & ); }; struct partial_ordering_helper2 { template partial_ordering_helper2( T const & ); }; char operator<<( partial_ordering_helper1, partial_ordering_helper2 ); template struct is_output_streamable_impl { static std::basic_ostream & f(); static T const & g(); enum e { value=1!=(sizeof(f()< > struct is_output_streamable { enum e { value=to_string_detail::is_output_streamable_impl::value }; }; } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/exception/detail/object_hex_dump.hpp000644 000765 000024 00000003007 12233035540 025252 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_6F463AC838DF11DDA3E6909F56D89593 #define UUID_6F463AC838DF11DDA3E6909F56D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif #include #include #include #include #include #include namespace boost { namespace exception_detail { template inline std::string object_hex_dump( T const & x, std::size_t max_size=16 ) { std::ostringstream s; s << "type: " << type_name() << ", size: " << sizeof(T) << ", dump: "; std::size_t n=sizeof(T)>max_size?max_size:sizeof(T); s.fill('0'); s.width(2); unsigned char const * b=reinterpret_cast(&x); s << std::setw(2) << std::hex << (unsigned int)*b; for( unsigned char const * e=b+n; ++b!=e; ) s << " " << std::setw(2) << std::hex << (unsigned int)*b; return s.str(); } } } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/exception/detail/type_info.hpp000644 000765 000024 00000003757 12233035540 024123 0ustar00honglistaff000000 000000 //Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_C3E1741C754311DDB2834CCA55D89593 #define UUID_C3E1741C754311DDB2834CCA55D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif #include #include #include #ifndef BOOST_NO_TYPEID #include #endif #include namespace boost { template inline std::string tag_type_name() { #ifdef BOOST_NO_TYPEID return BOOST_CURRENT_FUNCTION; #else return units::detail::demangle(typeid(T*).name()); #endif } template inline std::string type_name() { #ifdef BOOST_NO_TYPEID return BOOST_CURRENT_FUNCTION; #else return units::detail::demangle(typeid(T).name()); #endif } namespace exception_detail { struct type_info_ { detail::sp_typeinfo const * type_; explicit type_info_( detail::sp_typeinfo const & type ): type_(&type) { } friend bool operator<( type_info_ const & a, type_info_ const & b ) { return 0!=(a.type_->before(*b.type_)); } }; } } #define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_SP_TYPEID(T)) #ifndef BOOST_NO_RTTI #define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x)) #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif passenger-4.0.37/ext/boost/detail/atomic_redef_macros.hpp000644 000765 000024 00000001204 12233035540 024077 0ustar00honglistaff000000 000000 // Copyright (C) 2013 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #if defined(BOOST_INTEL) #pragma pop_macro("atomic_compare_exchange") #pragma pop_macro("atomic_compare_exchange_explicit") #pragma pop_macro("atomic_exchange") #pragma pop_macro("atomic_exchange_explicit") #pragma pop_macro("atomic_is_lock_free") #pragma pop_macro("atomic_load") #pragma pop_macro("atomic_load_explicit") #pragma pop_macro("atomic_store") #pragma pop_macro("atomic_store_explicit") #endif // #if defined(BOOST_INTEL) passenger-4.0.37/ext/boost/detail/atomic_undef_macros.hpp000644 000765 000024 00000001621 12233035540 024116 0ustar00honglistaff000000 000000 // Copyright (C) 2013 Vicente J. Botet Escriba // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #if defined(BOOST_INTEL) #pragma push_macro("atomic_compare_exchange") #undef atomic_compare_exchange #pragma push_macro("atomic_compare_exchange_explicit") #undef atomic_compare_exchange_explicit #pragma push_macro("atomic_exchange") #undef atomic_exchange #pragma push_macro("atomic_exchange_explicit") #undef atomic_exchange_explicit #pragma push_macro("atomic_is_lock_free") #undef atomic_is_lock_free #pragma push_macro("atomic_load") #undef atomic_load #pragma push_macro("atomic_load_explicit") #undef atomic_load_explicit #pragma push_macro("atomic_store") #undef atomic_store #pragma push_macro("atomic_store_explicit") #undef atomic_store_explicit #endif // #if defined(BOOST_INTEL) passenger-4.0.37/ext/boost/detail/container_fwd.hpp000644 000765 000024 00000012340 12233035540 022737 0ustar00honglistaff000000 000000 // Copyright 2005-2011 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Note: if you change this include guard, you also need to change // container_fwd_compile_fail.cpp #if !defined(BOOST_DETAIL_CONTAINER_FWD_HPP) #define BOOST_DETAIL_CONTAINER_FWD_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1020) && \ !defined(BOOST_DETAIL_TEST_CONFIG_ONLY) # pragma once #endif #include #include //////////////////////////////////////////////////////////////////////////////// // // // Define BOOST_DETAIL_NO_CONTAINER_FWD if you don't want this header to // // forward declare standard containers. // // // // BOOST_DETAIL_CONTAINER_FWD to make it foward declare containers even if it // // normally doesn't. // // // // BOOST_DETAIL_NO_CONTAINER_FWD overrides BOOST_DETAIL_CONTAINER_FWD. // // // //////////////////////////////////////////////////////////////////////////////// #if !defined(BOOST_DETAIL_NO_CONTAINER_FWD) # if defined(BOOST_DETAIL_CONTAINER_FWD) // Force forward declarations. # elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) // STLport # define BOOST_DETAIL_NO_CONTAINER_FWD # elif defined(__LIBCOMO__) // Comeau STL: # define BOOST_DETAIL_NO_CONTAINER_FWD # elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) // Rogue Wave library: # define BOOST_DETAIL_NO_CONTAINER_FWD # elif defined(_LIBCPP_VERSION) // libc++ # define BOOST_DETAIL_NO_CONTAINER_FWD # elif defined(__GLIBCPP__) || defined(__GLIBCXX__) // GNU libstdc++ 3 // // Disable forwarding for all recent versions, as the library has a // versioned namespace mode, and I don't know how to detect it. # if __GLIBCXX__ >= 20070513 \ || defined(_GLIBCXX_DEBUG) \ || defined(_GLIBCXX_PARALLEL) \ || defined(_GLIBCXX_PROFILE) # define BOOST_DETAIL_NO_CONTAINER_FWD # else # if defined(__GLIBCXX__) && __GLIBCXX__ >= 20040530 # define BOOST_CONTAINER_FWD_COMPLEX_STRUCT # endif # endif # elif defined(__STL_CONFIG_H) // generic SGI STL // // Forward declaration seems to be okay, but it has a couple of odd // implementations. # define BOOST_CONTAINER_FWD_BAD_BITSET # if !defined(__STL_NON_TYPE_TMPL_PARAM_BUG) # define BOOST_CONTAINER_FWD_BAD_DEQUE # endif # elif defined(__MSL_CPP__) // MSL standard lib: # define BOOST_DETAIL_NO_CONTAINER_FWD # elif defined(__IBMCPP__) // The default VACPP std lib, forward declaration seems to be fine. # elif defined(MSIPL_COMPILE_H) // Modena C++ standard library # define BOOST_DETAIL_NO_CONTAINER_FWD # elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) // Dinkumware Library (this has to appear after any possible replacement // libraries) # else # define BOOST_DETAIL_NO_CONTAINER_FWD # endif #endif #if !defined(BOOST_DETAIL_TEST_CONFIG_ONLY) #if defined(BOOST_DETAIL_NO_CONTAINER_FWD) && \ !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD) #include #include #include #include #include #include #include #include #else #include #if defined(BOOST_CONTAINER_FWD_BAD_DEQUE) #include #endif #if defined(BOOST_CONTAINER_FWD_BAD_BITSET) #include #endif #if defined(BOOST_MSVC) #pragma warning(push) #pragma warning(disable:4099) // struct/class mismatch in fwd declarations #endif namespace std { template class allocator; template class basic_string; #if BOOST_WORKAROUND(__GNUC__, < 3) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) template struct string_char_traits; #else template struct char_traits; #endif #if defined(BOOST_CONTAINER_FWD_COMPLEX_STRUCT) template struct complex; #else template class complex; #endif #if !defined(BOOST_CONTAINER_FWD_BAD_DEQUE) template class deque; #endif template class list; template class vector; template class map; template class multimap; template class set; template class multiset; #if !defined(BOOST_CONTAINER_FWD_BAD_BITSET) template class bitset; #endif template struct pair; } #if defined(BOOST_MSVC) #pragma warning(pop) #endif #endif // BOOST_DETAIL_NO_CONTAINER_FWD && // !defined(BOOST_DETAIL_TEST_FORCE_CONTAINER_FWD) #endif // BOOST_DETAIL_TEST_CONFIG_ONLY #endif passenger-4.0.37/ext/boost/detail/endian.hpp000644 000765 000024 00000010236 12233035540 021355 0ustar00honglistaff000000 000000 // Copyright 2005 Caleb Epstein // Copyright 2006 John Maddock // Copyright 2010 Rene Rivera // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) /* * Copyright (c) 1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /* * Copyright notice reproduced from , from * which this code was originally taken. * * Modified by Caleb Epstein to use with GNU libc and to * defined the BOOST_ENDIAN macro. */ #ifndef BOOST_DETAIL_ENDIAN_HPP #define BOOST_DETAIL_ENDIAN_HPP // // Special cases come first: // #if defined (__GLIBC__) // GNU libc offers the helpful header which defines // __BYTE_ORDER # include # if (__BYTE_ORDER == __LITTLE_ENDIAN) # define BOOST_LITTLE_ENDIAN # elif (__BYTE_ORDER == __BIG_ENDIAN) # define BOOST_BIG_ENDIAN # elif (__BYTE_ORDER == __PDP_ENDIAN) # define BOOST_PDP_ENDIAN # else # error Unknown machine endianness detected. # endif # define BOOST_BYTE_ORDER __BYTE_ORDER #elif defined(__NetBSD__) || defined(__FreeBSD__) || \ defined(__OpenBSD__) || (__DragonFly__) // // BSD has endian.h, see https://svn.boost.org/trac/boost/ticket/6013 # if defined(__OpenBSD__) # include # else # include # endif # if (_BYTE_ORDER == _LITTLE_ENDIAN) # define BOOST_LITTLE_ENDIAN # elif (_BYTE_ORDER == _BIG_ENDIAN) # define BOOST_BIG_ENDIAN # elif (_BYTE_ORDER == _PDP_ENDIAN) # define BOOST_PDP_ENDIAN # else # error Unknown machine endianness detected. # endif # define BOOST_BYTE_ORDER _BYTE_ORDER #elif defined( __ANDROID__ ) // Adroid specific code, see: https://svn.boost.org/trac/boost/ticket/7528 // Here we can use machine/_types.h, see: // http://stackoverflow.com/questions/6212951/endianness-of-android-ndk # include "machine/_types.h" # ifdef __ARMEB__ # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 # else # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 # endif // __ARMEB__ #elif defined( _XBOX ) // // XBox is always big endian?? // # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 #elif defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN) || \ defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) || \ defined(__BIGENDIAN__) && !defined(__LITTLEENDIAN__) || \ defined(_STLP_BIG_ENDIAN) && !defined(_STLP_LITTLE_ENDIAN) # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 #elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN) || \ defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) || \ defined(__LITTLEENDIAN__) && !defined(__BIGENDIAN__) || \ defined(_STLP_LITTLE_ENDIAN) && !defined(_STLP_BIG_ENDIAN) # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 #elif defined(__sparc) || defined(__sparc__) \ || defined(_POWER) || defined(__powerpc__) \ || defined(__ppc__) || defined(__hpux) || defined(__hppa) \ || defined(_MIPSEB) || defined(_POWER) \ || defined(__s390__) || defined(__ARMEB__) # define BOOST_BIG_ENDIAN # define BOOST_BYTE_ORDER 4321 #elif defined(__i386__) || defined(__alpha__) \ || defined(__ia64) || defined(__ia64__) \ || defined(_M_IX86) || defined(_M_IA64) \ || defined(_M_ALPHA) || defined(__amd64) \ || defined(__amd64__) || defined(_M_AMD64) \ || defined(__x86_64) || defined(__x86_64__) \ || defined(_M_X64) || defined(__bfin__) \ || defined(__ARMEL__) \ || (defined(_WIN32) && defined(__ARM__) && defined(_MSC_VER)) // ARM Windows CE don't define anything reasonably unique, but there are no big-endian Windows versions # define BOOST_LITTLE_ENDIAN # define BOOST_BYTE_ORDER 1234 #else # error The file boost/detail/endian.hpp needs to be set up for your CPU type. #endif #endif passenger-4.0.37/ext/boost/detail/fenv.hpp000644 000765 000024 00000004302 12233035540 021052 0ustar00honglistaff000000 000000 /*============================================================================= Copyright (c) 2010 Bryce Lelbach Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #include #if defined(BOOST_NO_FENV_H) #error This platform does not have a floating point environment #endif #if !defined(BOOST_DETAIL_FENV_HPP) #define BOOST_DETAIL_FENV_HPP /* If we're using clang + glibc, we have to get hacky. * See http://llvm.org/bugs/show_bug.cgi?id=6907 */ #if defined(__clang__) && (__clang_major__ < 3) && \ defined(__GNU_LIBRARY__) && /* up to version 5 */ \ defined(__GLIBC__) && /* version 6 + */ \ !defined(_FENV_H) #define _FENV_H #include #include extern "C" { extern int fegetexceptflag (fexcept_t*, int) __THROW; extern int fesetexceptflag (__const fexcept_t*, int) __THROW; extern int feclearexcept (int) __THROW; extern int feraiseexcept (int) __THROW; extern int fetestexcept (int) __THROW; extern int fegetround (void) __THROW; extern int fesetround (int) __THROW; extern int fegetenv (fenv_t*) __THROW; extern int fesetenv (__const fenv_t*) __THROW; extern int feupdateenv (__const fenv_t*) __THROW; extern int feholdexcept (fenv_t*) __THROW; #ifdef __USE_GNU extern int feenableexcept (int) __THROW; extern int fedisableexcept (int) __THROW; extern int fegetexcept (void) __THROW; #endif } namespace std { namespace tr1 { using ::fenv_t; using ::fexcept_t; using ::fegetexceptflag; using ::fesetexceptflag; using ::feclearexcept; using ::feraiseexcept; using ::fetestexcept; using ::fegetround; using ::fesetround; using ::fegetenv; using ::fesetenv; using ::feupdateenv; using ::feholdexcept; } } #else /* if we're not using GNU's C stdlib, fenv.h should work with clang */ #if defined(__SUNPRO_CC) /* lol suncc */ #include #endif #include #endif #endif /* BOOST_DETAIL_FENV_HPP */ passenger-4.0.37/ext/boost/detail/indirect_traits.hpp000644 000765 000024 00000025624 12233035540 023315 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef INDIRECT_TRAITS_DWA2002131_HPP # define INDIRECT_TRAITS_DWA2002131_HPP # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include # endif namespace boost { namespace detail { namespace indirect_traits { # ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_reference_to_const : mpl::false_ { }; template struct is_reference_to_const : mpl::true_ { }; # if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround template struct is_reference_to_const : mpl::true_ { }; # endif template struct is_reference_to_function : mpl::false_ { }; template struct is_reference_to_function : is_function { }; template struct is_pointer_to_function : mpl::false_ { }; // There's no such thing as a pointer-to-cv-function, so we don't need // specializations for those template struct is_pointer_to_function : is_function { }; template struct is_reference_to_member_function_pointer_impl : mpl::false_ { }; template struct is_reference_to_member_function_pointer_impl : is_member_function_pointer::type> { }; template struct is_reference_to_member_function_pointer : is_reference_to_member_function_pointer_impl { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T)) }; template struct is_reference_to_function_pointer_aux : mpl::and_< is_reference , is_pointer_to_function< typename remove_cv< typename remove_reference::type >::type > > { // There's no such thing as a pointer-to-cv-function, so we don't need specializations for those }; template struct is_reference_to_function_pointer : mpl::if_< is_reference_to_function , mpl::false_ , is_reference_to_function_pointer_aux >::type { }; template struct is_reference_to_non_const : mpl::and_< is_reference , mpl::not_< is_reference_to_const > > { }; template struct is_reference_to_volatile : mpl::false_ { }; template struct is_reference_to_volatile : mpl::true_ { }; # if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround template struct is_reference_to_volatile : mpl::true_ { }; # endif template struct is_reference_to_pointer : mpl::false_ { }; template struct is_reference_to_pointer : mpl::true_ { }; template struct is_reference_to_pointer : mpl::true_ { }; template struct is_reference_to_pointer : mpl::true_ { }; template struct is_reference_to_pointer : mpl::true_ { }; template struct is_reference_to_class : mpl::and_< is_reference , is_class< typename remove_cv< typename remove_reference::type >::type > > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T)) }; template struct is_pointer_to_class : mpl::and_< is_pointer , is_class< typename remove_cv< typename remove_pointer::type >::type > > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_class,(T)) }; # else using namespace boost::detail::is_function_ref_tester_; typedef char (&inner_yes_type)[3]; typedef char (&inner_no_type)[2]; typedef char (&outer_no_type)[1]; template struct is_const_help { typedef typename mpl::if_< is_const , inner_yes_type , inner_no_type >::type type; }; template struct is_volatile_help { typedef typename mpl::if_< is_volatile , inner_yes_type , inner_no_type >::type type; }; template struct is_pointer_help { typedef typename mpl::if_< is_pointer , inner_yes_type , inner_no_type >::type type; }; template struct is_class_help { typedef typename mpl::if_< is_class , inner_yes_type , inner_no_type >::type type; }; template struct is_reference_to_function_aux { static T t; BOOST_STATIC_CONSTANT( bool, value = sizeof(detail::is_function_ref_tester(t,0)) == sizeof(::boost::type_traits::yes_type)); typedef mpl::bool_ type; }; template struct is_reference_to_function : mpl::if_, is_reference_to_function_aux, mpl::bool_ >::type { }; template struct is_pointer_to_function_aux { static T t; BOOST_STATIC_CONSTANT( bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t)) == sizeof(::boost::type_traits::yes_type)); typedef mpl::bool_ type; }; template struct is_pointer_to_function : mpl::if_, is_pointer_to_function_aux, mpl::bool_ >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_function,(T)) }; struct false_helper1 { template struct apply : mpl::false_ { }; }; template typename is_const_help::type reference_to_const_helper(V&); outer_no_type reference_to_const_helper(...); struct true_helper1 { template struct apply { static T t; BOOST_STATIC_CONSTANT( bool, value = sizeof(reference_to_const_helper(t)) == sizeof(inner_yes_type)); typedef mpl::bool_ type; }; }; template struct is_reference_to_const_helper1 : true_helper1 { }; template <> struct is_reference_to_const_helper1 : false_helper1 { }; template struct is_reference_to_const : is_reference_to_const_helper1::value>::template apply { }; template struct is_reference_to_non_const_helper1 { template struct apply { static T t; BOOST_STATIC_CONSTANT( bool, value = sizeof(reference_to_const_helper(t)) == sizeof(inner_no_type)); typedef mpl::bool_ type; }; }; template <> struct is_reference_to_non_const_helper1 : false_helper1 { }; template struct is_reference_to_non_const : is_reference_to_non_const_helper1::value>::template apply { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_non_const,(T)) }; template typename is_volatile_help::type reference_to_volatile_helper(V&); outer_no_type reference_to_volatile_helper(...); template struct is_reference_to_volatile_helper1 { template struct apply { static T t; BOOST_STATIC_CONSTANT( bool, value = sizeof(reference_to_volatile_helper(t)) == sizeof(inner_yes_type)); typedef mpl::bool_ type; }; }; template <> struct is_reference_to_volatile_helper1 : false_helper1 { }; template struct is_reference_to_volatile : is_reference_to_volatile_helper1::value>::template apply { }; template typename is_pointer_help::type reference_to_pointer_helper(V&); outer_no_type reference_to_pointer_helper(...); template struct reference_to_pointer_impl { static T t; BOOST_STATIC_CONSTANT( bool, value = (sizeof((reference_to_pointer_helper)(t)) == sizeof(inner_yes_type)) ); typedef mpl::bool_ type; }; template struct is_reference_to_pointer : mpl::eval_if, reference_to_pointer_impl, mpl::false_>::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_pointer,(T)) }; template struct is_reference_to_function_pointer : mpl::eval_if, is_pointer_to_function_aux, mpl::false_>::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_function_pointer,(T)) }; template struct is_member_function_pointer_help : mpl::if_, inner_yes_type, inner_no_type> {}; template typename is_member_function_pointer_help::type member_function_pointer_helper(V&); outer_no_type member_function_pointer_helper(...); template struct is_pointer_to_member_function_aux { static T t; BOOST_STATIC_CONSTANT( bool, value = sizeof((member_function_pointer_helper)(t)) == sizeof(inner_yes_type)); typedef mpl::bool_ type; }; template struct is_reference_to_member_function_pointer : mpl::if_< is_reference , is_pointer_to_member_function_aux , mpl::bool_ >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T)) }; template typename is_class_help::type reference_to_class_helper(V const volatile&); outer_no_type reference_to_class_helper(...); template struct is_reference_to_class { static T t; BOOST_STATIC_CONSTANT( bool, value = (is_reference::value & (sizeof(reference_to_class_helper(t)) == sizeof(inner_yes_type))) ); typedef mpl::bool_ type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T)) }; template typename is_class_help::type pointer_to_class_helper(V const volatile*); outer_no_type pointer_to_class_helper(...); template struct is_pointer_to_class { static T t; BOOST_STATIC_CONSTANT( bool, value = (is_pointer::value && sizeof(pointer_to_class_helper(t)) == sizeof(inner_yes_type)) ); typedef mpl::bool_ type; }; # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } using namespace indirect_traits; }} // namespace boost::python::detail #endif // INDIRECT_TRAITS_DWA2002131_HPP passenger-4.0.37/ext/boost/detail/is_incrementable.hpp000644 000765 000024 00000007231 12233035540 023423 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2004. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef IS_INCREMENTABLE_DWA200415_HPP # define IS_INCREMENTABLE_DWA200415_HPP # include # include # include # include # include // Must be the last include # include namespace boost { namespace detail { // is_incrementable metafunction // // Requires: Given x of type T&, if the expression ++x is well-formed // it must have complete type; otherwise, it must neither be ambiguous // nor violate access. // This namespace ensures that ADL doesn't mess things up. namespace is_incrementable_ { // a type returned from operator++ when no increment is found in the // type's own namespace struct tag {}; // any soaks up implicit conversions and makes the following // operator++ less-preferred than any other such operator that // might be found via ADL. struct any { template any(T const&); }; // This is a last-resort operator++ for when none other is found # if BOOST_WORKAROUND(__GNUC__, == 4) && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 2 } namespace is_incrementable_2 { is_incrementable_::tag operator++(is_incrementable_::any const&); is_incrementable_::tag operator++(is_incrementable_::any const&,int); } using namespace is_incrementable_2; namespace is_incrementable_ { # else tag operator++(any const&); tag operator++(any const&,int); # endif # if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # define BOOST_comma(a,b) (a) # else // In case an operator++ is found that returns void, we'll use ++x,0 tag operator,(tag,int); # define BOOST_comma(a,b) (a,b) # endif # if defined(BOOST_MSVC) # pragma warning(push) # pragma warning(disable:4913) // Warning about operator, # endif // two check overloads help us identify which operator++ was picked char (& check_(tag) )[2]; template char check_(T const&); template struct impl { static typename boost::remove_cv::type& x; BOOST_STATIC_CONSTANT( bool , value = sizeof(is_incrementable_::check_(BOOST_comma(++x,0))) == 1 ); }; template struct postfix_impl { static typename boost::remove_cv::type& x; BOOST_STATIC_CONSTANT( bool , value = sizeof(is_incrementable_::check_(BOOST_comma(x++,0))) == 1 ); }; # if defined(BOOST_MSVC) # pragma warning(pop) # endif } # undef BOOST_comma template struct is_incrementable BOOST_TT_AUX_BOOL_C_BASE(::boost::detail::is_incrementable_::impl::value) { BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(::boost::detail::is_incrementable_::impl::value) BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_incrementable,(T)) }; template struct is_postfix_incrementable BOOST_TT_AUX_BOOL_C_BASE(::boost::detail::is_incrementable_::impl::value) { BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(::boost::detail::is_incrementable_::postfix_impl::value) BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_postfix_incrementable,(T)) }; } // namespace detail BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1, ::boost::detail::is_incrementable) BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1, ::boost::detail::is_postfix_incrementable) } // namespace boost # include #endif // IS_INCREMENTABLE_DWA200415_HPP passenger-4.0.37/ext/boost/detail/iterator.hpp000644 000765 000024 00000036730 12233035540 021757 0ustar00honglistaff000000 000000 // (C) Copyright David Abrahams 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Boost versions of // // std::iterator_traits<>::iterator_category // std::iterator_traits<>::difference_type // std::distance() // // ...for all compilers and iterators // // Additionally, if X is a pointer // std::iterator_traits::pointer // Otherwise, if partial specialization is supported or X is not a pointer // std::iterator_traits::value_type // std::iterator_traits::pointer // std::iterator_traits::reference // // See http://www.boost.org for most recent version including documentation. // Revision History // 04 Mar 2001 - More attempted fixes for Intel C++ (David Abrahams) // 03 Mar 2001 - Put all implementation into namespace // boost::detail::iterator_traits_. Some progress made on fixes // for Intel compiler. (David Abrahams) // 02 Mar 2001 - Changed BOOST_MSVC to BOOST_MSVC_STD_ITERATOR in a few // places. (Jeremy Siek) // 19 Feb 2001 - Improved workarounds for stock MSVC6; use yes_type and // no_type from type_traits.hpp; stopped trying to remove_cv // before detecting is_pointer, in honor of the new type_traits // semantics. (David Abrahams) // 13 Feb 2001 - Make it work with nearly all standard-conforming iterators // under raw VC6. The one category remaining which will fail is // that of iterators derived from std::iterator but not // boost::iterator and which redefine difference_type. // 11 Feb 2001 - Clean away code which can never be used (David Abrahams) // 09 Feb 2001 - Always have a definition for each traits member, even if it // can't be properly deduced. These will be incomplete types in // some cases (undefined), but it helps suppress MSVC errors // elsewhere (David Abrahams) // 07 Feb 2001 - Support for more of the traits members where possible, making // this useful as a replacement for std::iterator_traits when // used as a default template parameter. // 06 Feb 2001 - Removed useless #includes of standard library headers // (David Abrahams) #ifndef ITERATOR_DWA122600_HPP_ # define ITERATOR_DWA122600_HPP_ # include # include // STLPort 4.0 and betas have a bug when debugging is enabled and there is no // partial specialization: instead of an iterator_category typedef, the standard // container iterators have _Iterator_category. // // Also, whether debugging is enabled or not, there is a broken specialization // of std::iterator which has no // typedefs but iterator_category. # if defined(__SGI_STL_PORT) # if (__SGI_STL_PORT <= 0x410) && !defined(__STL_CLASS_PARTIAL_SPECIALIZATION) && defined(__STL_DEBUG) # define BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF # endif # define BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION # endif // STLPort <= 4.1b4 && no partial specialization # if !defined(BOOST_NO_STD_ITERATOR_TRAITS) \ && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_MSVC_STD_ITERATOR) namespace boost { namespace detail { // Define a new template so it can be specialized template struct iterator_traits : std::iterator_traits {}; using std::distance; }} // namespace boost::detail # else # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_MSVC_STD_ITERATOR) // This is the case where everything conforms except BOOST_NO_STD_ITERATOR_TRAITS namespace boost { namespace detail { // Rogue Wave Standard Library fools itself into thinking partial // specialization is missing on some platforms (e.g. Sun), so fails to // supply iterator_traits! template struct iterator_traits { typedef typename Iterator::value_type value_type; typedef typename Iterator::reference reference; typedef typename Iterator::pointer pointer; typedef typename Iterator::difference_type difference_type; typedef typename Iterator::iterator_category iterator_category; }; template struct iterator_traits { typedef T value_type; typedef T& reference; typedef T* pointer; typedef std::ptrdiff_t difference_type; typedef std::random_access_iterator_tag iterator_category; }; template struct iterator_traits { typedef T value_type; typedef T const& reference; typedef T const* pointer; typedef std::ptrdiff_t difference_type; typedef std::random_access_iterator_tag iterator_category; }; }} // namespace boost::detail # else # include # include # include # ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include # include # endif # ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION # include # endif # include # include # include // should be the last #include # include "boost/type_traits/detail/bool_trait_def.hpp" namespace boost { namespace detail { BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type) BOOST_MPL_HAS_XXX_TRAIT_DEF(reference) BOOST_MPL_HAS_XXX_TRAIT_DEF(pointer) BOOST_MPL_HAS_XXX_TRAIT_DEF(difference_type) BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator_category) // is_mutable_iterator -- // // A metafunction returning true iff T is a mutable iterator type // with a nested value_type. Will only work portably with iterators // whose operator* returns a reference, but that seems to be OK for // the iterators supplied by Dinkumware. Some input iterators may // compile-time if they arrive here, and if the compiler is strict // about not taking the address of an rvalue. // This one detects ordinary mutable iterators - the result of // operator* is convertible to the value_type. template type_traits::yes_type is_mutable_iterator_helper(T const*, BOOST_DEDUCED_TYPENAME T::value_type*); // Since you can't take the address of an rvalue, the guts of // is_mutable_iterator_impl will fail if we use &*t directly. This // makes sure we can still work with non-lvalue iterators. template T* mutable_iterator_lvalue_helper(T& x); int mutable_iterator_lvalue_helper(...); // This one detects output iterators such as ostream_iterator which // return references to themselves. template type_traits::yes_type is_mutable_iterator_helper(T const*, T const*); type_traits::no_type is_mutable_iterator_helper(...); template struct is_mutable_iterator_impl { static T t; BOOST_STATIC_CONSTANT( bool, value = sizeof( detail::is_mutable_iterator_helper( (T*)0 , mutable_iterator_lvalue_helper(*t) // like &*t )) == sizeof(type_traits::yes_type) ); }; BOOST_TT_AUX_BOOL_TRAIT_DEF1( is_mutable_iterator,T,::boost::detail::is_mutable_iterator_impl::value) // is_full_iterator_traits -- // // A metafunction returning true iff T has all the requisite nested // types to satisfy the requirements for a fully-conforming // iterator_traits implementation. template struct is_full_iterator_traits_impl { enum { value = has_value_type::value & has_reference::value & has_pointer::value & has_difference_type::value & has_iterator_category::value }; }; BOOST_TT_AUX_BOOL_TRAIT_DEF1( is_full_iterator_traits,T,::boost::detail::is_full_iterator_traits_impl::value) # ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF BOOST_MPL_HAS_XXX_TRAIT_DEF(_Iterator_category) // is_stlport_40_debug_iterator -- // // A metafunction returning true iff T has all the requisite nested // types to satisfy the requirements of an STLPort 4.0 debug iterator // iterator_traits implementation. template struct is_stlport_40_debug_iterator_impl { enum { value = has_value_type::value & has_reference::value & has_pointer::value & has_difference_type::value & has__Iterator_category::value }; }; BOOST_TT_AUX_BOOL_TRAIT_DEF1( is_stlport_40_debug_iterator,T,::boost::detail::is_stlport_40_debug_iterator_impl::value) template struct stlport_40_debug_iterator_traits { typedef typename T::value_type value_type; typedef typename T::reference reference; typedef typename T::pointer pointer; typedef typename T::difference_type difference_type; typedef typename T::_Iterator_category iterator_category; }; # endif // BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF template struct pointer_iterator_traits; # ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct pointer_iterator_traits { typedef typename remove_const::type value_type; typedef T* pointer; typedef T& reference; typedef std::random_access_iterator_tag iterator_category; typedef std::ptrdiff_t difference_type; }; # else // In case of no template partial specialization, and if T is a // pointer, iterator_traits::value_type can still be computed. For // some basic types, remove_pointer is manually defined in // type_traits/broken_compiler_spec.hpp. For others, do it yourself. template class please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee; template struct pointer_value_type : mpl::if_< is_same::type> , please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee

, typename remove_const< typename remove_pointer

::type >::type > { }; template struct pointer_reference : mpl::if_< is_same::type> , please_invoke_BOOST_TT_BROKEN_COMPILER_SPEC_on_cv_unqualified_pointee

, typename remove_pointer

::type& > { }; template struct pointer_iterator_traits { typedef T pointer; typedef std::random_access_iterator_tag iterator_category; typedef std::ptrdiff_t difference_type; typedef typename pointer_value_type::type value_type; typedef typename pointer_reference::type reference; }; # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // We'll sort iterator types into one of these classifications, from which we // can determine the difference_type, pointer, reference, and value_type template struct standard_iterator_traits { typedef typename Iterator::difference_type difference_type; typedef typename Iterator::value_type value_type; typedef typename Iterator::pointer pointer; typedef typename Iterator::reference reference; typedef typename Iterator::iterator_category iterator_category; }; template struct msvc_stdlib_mutable_traits : std::iterator_traits { typedef typename std::iterator_traits::distance_type difference_type; typedef typename std::iterator_traits::value_type* pointer; typedef typename std::iterator_traits::value_type& reference; }; template struct msvc_stdlib_const_traits : std::iterator_traits { typedef typename std::iterator_traits::distance_type difference_type; typedef const typename std::iterator_traits::value_type* pointer; typedef const typename std::iterator_traits::value_type& reference; }; # ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION template struct is_bad_output_iterator : is_base_and_derived< std::iterator , Iterator> { }; struct bad_output_iterator_traits { typedef void value_type; typedef void difference_type; typedef std::output_iterator_tag iterator_category; typedef void pointer; typedef void reference; }; # endif // If we're looking at an MSVC6 (old Dinkumware) ``standard'' // iterator, this will generate an appropriate traits class. template struct msvc_stdlib_iterator_traits : mpl::if_< is_mutable_iterator , msvc_stdlib_mutable_traits , msvc_stdlib_const_traits >::type {}; template struct non_pointer_iterator_traits : mpl::if_< // if the iterator contains all the right nested types... is_full_iterator_traits // Use a standard iterator_traits implementation , standard_iterator_traits # ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF // Check for STLPort 4.0 broken _Iterator_category type , mpl::if_< is_stlport_40_debug_iterator , stlport_40_debug_iterator_traits # endif // Otherwise, assume it's a Dinkum iterator , msvc_stdlib_iterator_traits # ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF >::type # endif >::type { }; template struct iterator_traits_aux : mpl::if_< is_pointer , pointer_iterator_traits , non_pointer_iterator_traits >::type { }; template struct iterator_traits { // Explicit forwarding from base class needed to keep MSVC6 happy // under some circumstances. private: # ifdef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION typedef typename mpl::if_< is_bad_output_iterator , bad_output_iterator_traits , iterator_traits_aux >::type base; # else typedef iterator_traits_aux base; # endif public: typedef typename base::value_type value_type; typedef typename base::pointer pointer; typedef typename base::reference reference; typedef typename base::difference_type difference_type; typedef typename base::iterator_category iterator_category; }; // This specialization cuts off ETI (Early Template Instantiation) for MSVC. template <> struct iterator_traits { typedef int value_type; typedef int pointer; typedef int reference; typedef int difference_type; typedef int iterator_category; }; }} // namespace boost::detail # endif // workarounds namespace boost { namespace detail { namespace iterator_traits_ { template struct distance_select { static Difference execute(Iterator i1, const Iterator i2, ...) { Difference result = 0; while (i1 != i2) { ++i1; ++result; } return result; } static Difference execute(Iterator i1, const Iterator i2, std::random_access_iterator_tag*) { return i2 - i1; } }; } // namespace boost::detail::iterator_traits_ template inline typename iterator_traits::difference_type distance(Iterator first, Iterator last) { typedef typename iterator_traits::difference_type diff_t; typedef typename ::boost::detail::iterator_traits::iterator_category iterator_category; return iterator_traits_::distance_select::execute( first, last, (iterator_category*)0); } }} # endif # undef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF # undef BOOST_BAD_OUTPUT_ITERATOR_SPECIALIZATION #endif // ITERATOR_DWA122600_HPP_ passenger-4.0.37/ext/boost/detail/lcast_precision.hpp000644 000765 000024 00000013606 12233035540 023304 0ustar00honglistaff000000 000000 // Copyright Alexander Nasonov & Paul A. Bristow 2006. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED #define BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED #include #include #include #include #include #ifndef BOOST_NO_IS_ABSTRACT // Fix for SF:1358600 - lexical_cast & pure virtual functions & VC 8 STL #include #include #endif #if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || \ (defined(BOOST_MSVC) && (BOOST_MSVC<1310)) #define BOOST_LCAST_NO_COMPILE_TIME_PRECISION #endif #ifdef BOOST_LCAST_NO_COMPILE_TIME_PRECISION #include #else #include #endif namespace boost { namespace detail { class lcast_abstract_stub {}; #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION // Calculate an argument to pass to std::ios_base::precision from // lexical_cast. See alternative implementation for broken standard // libraries in lcast_get_precision below. Keep them in sync, please. template struct lcast_precision { #ifdef BOOST_NO_IS_ABSTRACT typedef std::numeric_limits limits; // No fix for SF:1358600. #else typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< boost::is_abstract , std::numeric_limits , std::numeric_limits >::type limits; #endif BOOST_STATIC_CONSTANT(bool, use_default_precision = !limits::is_specialized || limits::is_exact ); BOOST_STATIC_CONSTANT(bool, is_specialized_bin = !use_default_precision && limits::radix == 2 && limits::digits > 0 ); BOOST_STATIC_CONSTANT(bool, is_specialized_dec = !use_default_precision && limits::radix == 10 && limits::digits10 > 0 ); BOOST_STATIC_CONSTANT(std::streamsize, streamsize_max = boost::integer_traits::const_max ); BOOST_STATIC_CONSTANT(unsigned int, precision_dec = limits::digits10 + 1U); BOOST_STATIC_ASSERT(!is_specialized_dec || precision_dec <= streamsize_max + 0UL ); BOOST_STATIC_CONSTANT(unsigned long, precision_bin = 2UL + limits::digits * 30103UL / 100000UL ); BOOST_STATIC_ASSERT(!is_specialized_bin || (limits::digits + 0UL < ULONG_MAX / 30103UL && precision_bin > limits::digits10 + 0UL && precision_bin <= streamsize_max + 0UL) ); BOOST_STATIC_CONSTANT(std::streamsize, value = is_specialized_bin ? precision_bin : is_specialized_dec ? precision_dec : 6 ); }; #endif template inline std::streamsize lcast_get_precision(T* = 0) { #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION return lcast_precision::value; #else // Follow lcast_precision algorithm at run-time: #ifdef BOOST_NO_IS_ABSTRACT typedef std::numeric_limits limits; // No fix for SF:1358600. #else typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< boost::is_abstract , std::numeric_limits , std::numeric_limits >::type limits; #endif bool const use_default_precision = !limits::is_specialized || limits::is_exact; if(!use_default_precision) { // Includes all built-in floating-point types, float, double ... // and UDT types for which digits (significand bits) is defined (not zero) bool const is_specialized_bin = limits::radix == 2 && limits::digits > 0; bool const is_specialized_dec = limits::radix == 10 && limits::digits10 > 0; std::streamsize const streamsize_max = (boost::integer_traits::max)(); if(is_specialized_bin) { // Floating-point types with // limits::digits defined by the specialization. unsigned long const digits = limits::digits; unsigned long const precision = 2UL + digits * 30103UL / 100000UL; // unsigned long is selected because it is at least 32-bits // and thus ULONG_MAX / 30103UL is big enough for all types. BOOST_ASSERT( digits < ULONG_MAX / 30103UL && precision > limits::digits10 + 0UL && precision <= streamsize_max + 0UL ); return precision; } else if(is_specialized_dec) { // Decimal Floating-point type, most likely a User Defined Type // rather than a real floating-point hardware type. unsigned int const precision = limits::digits10 + 1U; BOOST_ASSERT(precision <= streamsize_max + 0UL); return precision; } } // Integral type (for which precision has no effect) // or type T for which limits is NOT specialized, // so assume stream precision remains the default 6 decimal digits. // Warning: if your User-defined Floating-point type T is NOT specialized, // then you may lose accuracy by only using 6 decimal digits. // To avoid this, you need to specialize T with either // radix == 2 and digits == the number of significand bits, // OR // radix = 10 and digits10 == the number of decimal digits. return 6; #endif } template inline void lcast_set_precision(std::ios_base& stream, T*) { stream.precision(lcast_get_precision()); } template inline void lcast_set_precision(std::ios_base& stream, Source*, Target*) { std::streamsize const s = lcast_get_precision(static_cast(0)); std::streamsize const t = lcast_get_precision(static_cast(0)); stream.precision(s > t ? s : t); } }} #endif // BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED passenger-4.0.37/ext/boost/detail/limits.hpp000644 000765 000024 00000040306 12233035540 021421 0ustar00honglistaff000000 000000 // Copyright 2001 John Maddock // Distributed under the Boost Software License, Version 1.0. (See accompany- // ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) /* * Copyright (c) 1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */ /* NOTE: This is not portable code. Parts of numeric_limits<> are * inherently machine-dependent, and this file is written for the MIPS * architecture and the SGI MIPSpro C++ compiler. Parts of it (in * particular, some of the characteristics of floating-point types) * are almost certainly incorrect for any other platform. */ /* The above comment is almost certainly out of date. This file works * on systems other than SGI MIPSpro C++ now. */ /* * Revision history: * 21 Sep 2001: * Only include if BOOST_NO_CWCHAR is defined. (Darin Adler) * 10 Aug 2001: * Added MIPS (big endian) to the big endian family. (Jens Maurer) * 13 Apr 2001: * Added powerpc to the big endian family. (Jeremy Siek) * 5 Apr 2001: * Added sparc (big endian) processor support (John Maddock). * Initial sub: * Modified by Jens Maurer for gcc 2.95 on x86. */ #ifndef BOOST_SGI_CPP_LIMITS #define BOOST_SGI_CPP_LIMITS #include #include #include #include #ifndef BOOST_NO_CWCHAR #include // for WCHAR_MIN and WCHAR_MAX #endif namespace std { enum float_round_style { round_indeterminate = -1, round_toward_zero = 0, round_to_nearest = 1, round_toward_infinity = 2, round_toward_neg_infinity = 3 }; enum float_denorm_style { denorm_indeterminate = -1, denorm_absent = 0, denorm_present = 1 }; // The C++ standard (section 18.2.1) requires that some of the members of // numeric_limits be static const data members that are given constant- // initializers within the class declaration. On compilers where the // BOOST_NO_INCLASS_MEMBER_INITIALIZATION macro is defined, it is impossible to write // a standard-conforming numeric_limits class. // // There are two possible workarounds: either initialize the data // members outside the class, or change them from data members to // enums. Neither workaround is satisfactory: the former makes it // impossible to use the data members in constant-expressions, and the // latter means they have the wrong type and that it is impossible to // take their addresses. We choose the former workaround. #ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_STL_DECLARE_LIMITS_MEMBER(__mem_type, __mem_name, __mem_value) \ enum { __mem_name = __mem_value } #else /* BOOST_NO_INCLASS_MEMBER_INITIALIZATION */ # define BOOST_STL_DECLARE_LIMITS_MEMBER(__mem_type, __mem_name, __mem_value) \ static const __mem_type __mem_name = __mem_value #endif /* BOOST_NO_INCLASS_MEMBER_INITIALIZATION */ // Base class for all specializations of numeric_limits. template class _Numeric_limits_base { public: BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_specialized, false); static __number min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return __number(); } static __number max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return __number(); } BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits, 0); BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, 0); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_signed, false); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_integer, false); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_exact, false); BOOST_STL_DECLARE_LIMITS_MEMBER(int, radix, 0); static __number epsilon() throw() { return __number(); } static __number round_error() throw() { return __number(); } BOOST_STL_DECLARE_LIMITS_MEMBER(int, min_exponent, 0); BOOST_STL_DECLARE_LIMITS_MEMBER(int, min_exponent10, 0); BOOST_STL_DECLARE_LIMITS_MEMBER(int, max_exponent, 0); BOOST_STL_DECLARE_LIMITS_MEMBER(int, max_exponent10, 0); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_infinity, false); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_quiet_NaN, false); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_signaling_NaN, false); BOOST_STL_DECLARE_LIMITS_MEMBER(float_denorm_style, has_denorm, denorm_absent); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_denorm_loss, false); static __number infinity() throw() { return __number(); } static __number quiet_NaN() throw() { return __number(); } static __number signaling_NaN() throw() { return __number(); } static __number denorm_min() throw() { return __number(); } BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_iec559, false); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_bounded, false); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_modulo, false); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, traps, false); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, tinyness_before, false); BOOST_STL_DECLARE_LIMITS_MEMBER(float_round_style, round_style, round_toward_zero); }; // Base class for integers. template class _Integer_limits : public _Numeric_limits_base<_Int> { public: BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_specialized, true); static _Int min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return __imin; } static _Int max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return __imax; } BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits, (__idigits < 0) ? (int)(sizeof(_Int) * CHAR_BIT) - (__imin == 0 ? 0 : 1) : __idigits); BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, (digits * 301) / 1000); // log 2 = 0.301029995664... BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_signed, __imin != 0); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_integer, true); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_exact, true); BOOST_STL_DECLARE_LIMITS_MEMBER(int, radix, 2); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_bounded, true); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_modulo, true); }; #if defined(BOOST_BIG_ENDIAN) template struct float_helper{ static Number get_word() throw() { // sizeof(long double) == 16 const unsigned int _S_word[4] = { Word, 0, 0, 0 }; return *reinterpret_cast(&_S_word); } }; #else template struct float_helper{ static Number get_word() throw() { // sizeof(long double) == 12, but only 10 bytes significant const unsigned int _S_word[4] = { 0, 0, 0, Word }; return *reinterpret_cast( reinterpret_cast(&_S_word)+16- (sizeof(Number) == 12 ? 10 : sizeof(Number))); } }; #endif // Base class for floating-point numbers. template class _Floating_limits : public _Numeric_limits_base<__number> { public: BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_specialized, true); BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits, __Digits); BOOST_STL_DECLARE_LIMITS_MEMBER(int, digits10, __Digits10); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_signed, true); BOOST_STL_DECLARE_LIMITS_MEMBER(int, radix, 2); BOOST_STL_DECLARE_LIMITS_MEMBER(int, min_exponent, __MinExp); BOOST_STL_DECLARE_LIMITS_MEMBER(int, max_exponent, __MaxExp); BOOST_STL_DECLARE_LIMITS_MEMBER(int, min_exponent10, __MinExp10); BOOST_STL_DECLARE_LIMITS_MEMBER(int, max_exponent10, __MaxExp10); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_infinity, true); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_quiet_NaN, true); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_signaling_NaN, true); BOOST_STL_DECLARE_LIMITS_MEMBER(float_denorm_style, has_denorm, denorm_indeterminate); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, has_denorm_loss, false); static __number infinity() throw() { return float_helper<__number, __InfinityWord>::get_word(); } static __number quiet_NaN() throw() { return float_helper<__number,__QNaNWord>::get_word(); } static __number signaling_NaN() throw() { return float_helper<__number,__SNaNWord>::get_word(); } BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_iec559, __IsIEC559); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, is_bounded, true); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, traps, false /* was: true */ ); BOOST_STL_DECLARE_LIMITS_MEMBER(bool, tinyness_before, false); BOOST_STL_DECLARE_LIMITS_MEMBER(float_round_style, round_style, __RoundStyle); }; // Class numeric_limits // The unspecialized class. template class numeric_limits : public _Numeric_limits_base {}; // Specializations for all built-in integral types. template<> class numeric_limits : public _Integer_limits {}; template<> class numeric_limits : public _Integer_limits {}; template<> class numeric_limits : public _Integer_limits {}; template<> class numeric_limits : public _Integer_limits {}; #ifndef BOOST_NO_INTRINSIC_WCHAR_T template<> class numeric_limits #if !defined(WCHAR_MAX) || !defined(WCHAR_MIN) #if defined(_WIN32) || defined(__CYGWIN__) : public _Integer_limits #elif defined(__hppa) // wchar_t has "unsigned int" as the underlying type : public _Integer_limits #else // assume that wchar_t has "int" as the underlying type : public _Integer_limits #endif #else // we have WCHAR_MIN and WCHAR_MAX defined, so use it : public _Integer_limits #endif {}; #endif template<> class numeric_limits : public _Integer_limits {}; template<> class numeric_limits : public _Integer_limits {}; template<> class numeric_limits : public _Integer_limits {}; template<> class numeric_limits : public _Integer_limits {}; template<> class numeric_limits : public _Integer_limits {}; template<> class numeric_limits : public _Integer_limits {}; #ifdef __GNUC__ // Some compilers have long long, but don't define the // LONGLONG_MIN and LONGLONG_MAX macros in limits.h. This // assumes that long long is 64 bits. #if !defined(LONGLONG_MAX) && !defined(ULONGLONG_MAX) # define ULONGLONG_MAX 0xffffffffffffffffLLU # define LONGLONG_MAX 0x7fffffffffffffffLL #endif #if !defined(LONGLONG_MIN) # define LONGLONG_MIN (-LONGLONG_MAX - 1) #endif #if !defined(ULONGLONG_MIN) # define ULONGLONG_MIN 0 #endif #endif /* __GNUC__ */ // Specializations for all built-in floating-point type. template<> class numeric_limits : public _Floating_limits { public: static float min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return FLT_MIN; } static float denorm_min() throw() { return FLT_MIN; } static float max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return FLT_MAX; } static float epsilon() throw() { return FLT_EPSILON; } static float round_error() throw() { return 0.5f; } // Units: ulps. }; template<> class numeric_limits : public _Floating_limits { public: static double min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return DBL_MIN; } static double denorm_min() throw() { return DBL_MIN; } static double max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return DBL_MAX; } static double epsilon() throw() { return DBL_EPSILON; } static double round_error() throw() { return 0.5; } // Units: ulps. }; template<> class numeric_limits : public _Floating_limits { public: static long double min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return LDBL_MIN; } static long double denorm_min() throw() { return LDBL_MIN; } static long double max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return LDBL_MAX; } static long double epsilon() throw() { return LDBL_EPSILON; } static long double round_error() throw() { return 4; } // Units: ulps. }; } // namespace std #endif /* BOOST_SGI_CPP_LIMITS */ // Local Variables: // mode:C++ // End: passenger-4.0.37/ext/boost/detail/no_exceptions_support.hpp000644 000765 000024 00000003715 12233035540 024574 0ustar00honglistaff000000 000000 #ifndef BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP_ #define BOOST_DETAIL_NO_EXCEPTIONS_SUPPORT_HPP_ #if (defined _MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif //---------------------------------------------------------------------- // (C) Copyright 2004 Pavel Vozenilek. // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt // or copy at http://www.boost.org/LICENSE_1_0.txt) // // // This file contains helper macros used when exception support may be // disabled (as indicated by macro BOOST_NO_EXCEPTIONS). // // Before picking up these macros you may consider using RAII techniques // to deal with exceptions - their syntax can be always the same with // or without exception support enabled. // /* Example of use: void foo() { BOOST_TRY { ... } BOOST_CATCH(const std::bad_alloc&) { ... BOOST_RETHROW } BOOST_CATCH(const std::exception& e) { ... } BOOST_CATCH_END } With exception support enabled it will expand into: void foo() { { try { ... } catch (const std::bad_alloc&) { ... throw; } catch (const std::exception& e) { ... } } } With exception support disabled it will expand into: void foo() { { if(true) { ... } else if (false) { ... } else if (false) { ... } } } */ //---------------------------------------------------------------------- #include #include #if !(defined BOOST_NO_EXCEPTIONS) # define BOOST_TRY { try # define BOOST_CATCH(x) catch(x) # define BOOST_RETHROW throw; # define BOOST_CATCH_END } #else # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # define BOOST_TRY { if ("") # define BOOST_CATCH(x) else if (!"") # else # define BOOST_TRY { if (true) # define BOOST_CATCH(x) else if (false) # endif # define BOOST_RETHROW # define BOOST_CATCH_END } #endif #endif passenger-4.0.37/ext/boost/detail/reference_content.hpp000644 000765 000024 00000005716 12233035540 023616 0ustar00honglistaff000000 000000 //----------------------------------------------------------------------------- // boost detail/reference_content.hpp header file // See http://www.boost.org for updates, documentation, and revision history. //----------------------------------------------------------------------------- // // Copyright (c) 2003 // Eric Friedman // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_DETAIL_REFERENCE_CONTENT_HPP #define BOOST_DETAIL_REFERENCE_CONTENT_HPP #include "boost/config.hpp" #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # include "boost/mpl/bool.hpp" # include "boost/type_traits/has_nothrow_copy.hpp" #else # include "boost/mpl/if.hpp" # include "boost/type_traits/is_reference.hpp" #endif #include "boost/mpl/void.hpp" namespace boost { namespace detail { /////////////////////////////////////////////////////////////////////////////// // (detail) class template reference_content // // Non-Assignable wrapper for references. // template class reference_content { private: // representation RefT content_; public: // structors ~reference_content() { } reference_content(RefT r) : content_( r ) { } reference_content(const reference_content& operand) : content_( operand.content_ ) { } private: // non-Assignable reference_content& operator=(const reference_content&); public: // queries RefT get() const { return content_; } }; /////////////////////////////////////////////////////////////////////////////// // (detail) metafunction make_reference_content // // Wraps with reference_content if specified type is reference. // template struct make_reference_content; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct make_reference_content { typedef T type; }; template struct make_reference_content< T& > { typedef reference_content type; }; #else // defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct make_reference_content : mpl::if_< is_reference , reference_content , T > { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION workaround template <> struct make_reference_content< mpl::void_ > { template struct apply : make_reference_content { }; typedef mpl::void_ type; }; } // namespace detail /////////////////////////////////////////////////////////////////////////////// // reference_content type traits specializations // #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct has_nothrow_copy< ::boost::detail::reference_content< T& > > : mpl::true_ { }; #endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) } // namespace boost #endif // BOOST_DETAIL_REFERENCE_CONTENT_HPP passenger-4.0.37/ext/boost/detail/scoped_enum_emulation.hpp000644 000765 000024 00000026577 12233035540 024514 0ustar00honglistaff000000 000000 // scoped_enum_emulation.hpp ---------------------------------------------------------// // Copyright Beman Dawes, 2009 // Copyright (C) 2011-2012 Vicente J. Botet Escriba // Copyright (C) 2012 Anthony Williams // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt /* [section:scoped_enums Scoped Enums] Generates C++0x scoped enums if the feature is present, otherwise emulates C++0x scoped enums with C++03 namespaces and enums. The Boost.Config BOOST_NO_CXX11_SCOPED_ENUMS macro is used to detect feature support. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf for a description of the scoped enum feature. Note that the committee changed the name from strongly typed enum to scoped enum. Some of the enumerations defined in the standard library are scoped enums. enum class future_errc { broken_promise, future_already_retrieved, promise_already_satisfied, no_state }; On compilers that don't support them, the library provides two emulations: [heading Strict] * Able to specify the underlying type. * explicit conversion to/from underlying type. * The wrapper is not a C++03 enum type. The user can declare declare these types as BOOST_SCOPED_ENUM_DECLARE_BEGIN(future_errc) { broken_promise, future_already_retrieved, promise_already_satisfied, no_state } BOOST_SCOPED_ENUM_DECLARE_END(future_errc) These macros allows to use 'future_errc' in almost all the cases as an scoped enum. future_errc err = future_errc::no_state; There are however some limitations: * The type is not a C++ enum, so 'is_enum' will be false_type. * The emulated scoped enum can not be used in switch nor in template arguments. For these cases the user needs to use some macros. Instead of switch (ev) { case future_errc::broken_promise: // ... use switch (boost::native_value(ev)) { case future_errc::broken_promise: And instead of #ifdef BOOST_NO_CXX11_SCOPED_ENUMS template <> struct BOOST_SYMBOL_VISIBLE is_error_code_enum : public true_type { }; #endif use #ifdef BOOST_NO_CXX11_SCOPED_ENUMS template <> struct BOOST_SYMBOL_VISIBLE is_error_code_enum : public true_type { }; #endif Sample usage: BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(algae, char) { green, red, cyan }; BOOST_SCOPED_ENUM_DECLARE_END(algae) ... algae sample( algae::red ); void foo( algae color ); ... sample = algae::green; foo( algae::cyan ); Light Caution: only the syntax is emulated; the semantics are not emulated and the syntax emulation doesn't include being able to specify the underlying representation type. The literal scoped emulation is via struct rather than namespace to allow use within classes. Thanks to Andrey Semashev for pointing that out. However the type is an real C++03 enum and so convertible implicitly to an int. Sample usage: BOOST_SCOPED_ENUM_START(algae) { green, red, cyan }; BOOST_SCOPED_ENUM_END ... BOOST_SCOPED_ENUM(algae) sample( algae::red ); void foo( BOOST_SCOPED_ENUM(algae) color ); ... sample = algae::green; foo( algae::cyan ); Helpful comments and suggestions were also made by Kjell Elster, Phil Endecott, Joel Falcou, Mathias Gaunard, Felipe Magno de Almeida, Matt Calabrese, Vicente Botet, and Daniel James. [endsect] */ #ifndef BOOST_SCOPED_ENUM_EMULATION_HPP #define BOOST_SCOPED_ENUM_EMULATION_HPP #include #include namespace boost { #ifdef BOOST_NO_CXX11_SCOPED_ENUMS /** * Meta-function to get the underlying type of a scoped enum. * * Requires EnumType must be an enum type or the emulation of a scoped enum */ template struct underlying_type { /** * The member typedef type names the underlying type of EnumType. It is EnumType::underlying_type when the EnumType is an emulated scoped enum, * std::underlying_type::type when the standard library std::underlying_type is provided. * * The user will need to specialize it when the compiler supports scoped enums but don't provides std::underlying_type. */ typedef typename EnumType::underlying_type type; }; /** * Meta-function to get the native enum type associated to an enum class or its emulation. */ template struct native_type { /** * The member typedef type names the native enum type associated to the scoped enum, * which is it self if the compiler supports scoped enums or EnumType::enum_type if it is an emulated scoped enum. */ typedef typename EnumType::enum_type type; }; /** * Casts a scoped enum to its underlying type. * * This function is useful when working with scoped enum classes, which doens't implicitly convert to the underlying type. * @param v A scoped enum. * @returns The underlying type. * @throws No-throws. */ template UnderlyingType underlying_cast(EnumType v) { return v.get_underlying_value_(); } /** * Casts a scoped enum to its native enum type. * * This function is useful to make programs portable when the scoped enum emulation can not be use where native enums can. * * EnumType the scoped enum type * * @param v A scoped enum. * @returns The native enum value. * @throws No-throws. */ template inline typename EnumType::enum_type native_value(EnumType e) { return e.native_value_(); } #else // BOOST_NO_CXX11_SCOPED_ENUMS template struct underlying_type { //typedef typename std::underlying_type::type type; }; template struct native_type { typedef EnumType type; }; template UnderlyingType underlying_cast(EnumType v) { return static_cast(v); } template inline EnumType native_value(EnumType e) { return e; } #endif } #ifdef BOOST_NO_CXX11_SCOPED_ENUMS #ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR \ explicit operator underlying_type() const { return get_underlying_value_(); } #else #define BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR #endif /** * Start a declaration of a scoped enum. * * @param EnumType The new scoped enum. * @param UnderlyingType The underlying type. */ #define BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType, UnderlyingType) \ struct EnumType { \ typedef UnderlyingType underlying_type; \ EnumType() BOOST_NOEXCEPT {} \ explicit EnumType(underlying_type v) : v_(v) {} \ underlying_type get_underlying_value_() const { return v_; } \ BOOST_SCOPED_ENUM_UT_DECLARE_CONVERSION_OPERATOR \ private: \ underlying_type v_; \ typedef EnumType self_type; \ public: \ enum enum_type #define BOOST_SCOPED_ENUM_DECLARE_END2() \ enum_type get_native_value_() const BOOST_NOEXCEPT { return enum_type(v_); } \ operator enum_type() const BOOST_NOEXCEPT { return get_native_value_(); } \ friend bool operator ==(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)==enum_type(rhs.v_); } \ friend bool operator ==(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)==rhs; } \ friend bool operator ==(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs==enum_type(rhs.v_); } \ friend bool operator !=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)!=enum_type(rhs.v_); } \ friend bool operator !=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)!=rhs; } \ friend bool operator !=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs!=enum_type(rhs.v_); } \ friend bool operator <(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>enum_type(rhs.v_); } \ friend bool operator >(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>rhs; } \ friend bool operator >(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs>enum_type(rhs.v_); } \ friend bool operator >=(self_type lhs, self_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>=enum_type(rhs.v_); } \ friend bool operator >=(self_type lhs, enum_type rhs) BOOST_NOEXCEPT { return enum_type(lhs.v_)>=rhs; } \ friend bool operator >=(enum_type lhs, self_type rhs) BOOST_NOEXCEPT { return lhs>=enum_type(rhs.v_); } \ }; #define BOOST_SCOPED_ENUM_DECLARE_END(EnumType) \ ; \ EnumType(enum_type v) BOOST_NOEXCEPT : v_(v) {} \ BOOST_SCOPED_ENUM_DECLARE_END2() /** * Starts a declaration of a scoped enum with the default int underlying type. * * @param EnumType The new scoped enum. */ #define BOOST_SCOPED_ENUM_DECLARE_BEGIN(EnumType) \ BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType,int) /** * Name of the native enum type. * * @param NT The new scoped enum. */ #define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType::enum_type /** * Forward declares an scoped enum. * * @param NT The scoped enum. */ #define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) struct EnumType #else // BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_SCOPED_ENUM_UT_DECLARE_BEGIN(EnumType,UnderlyingType) enum class EnumType:UnderlyingType #define BOOST_SCOPED_ENUM_DECLARE_BEGIN(EnumType) enum class EnumType #define BOOST_SCOPED_ENUM_DECLARE_END2() #define BOOST_SCOPED_ENUM_DECLARE_END(EnumType) ; #define BOOST_SCOPED_ENUM_NATIVE(EnumType) EnumType #define BOOST_SCOPED_ENUM_FORWARD_DECLARE(EnumType) enum class EnumType #endif // BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_SCOPED_ENUM_START(name) BOOST_SCOPED_ENUM_DECLARE_BEGIN(name) #define BOOST_SCOPED_ENUM_END BOOST_SCOPED_ENUM_DECLARE_END2() #define BOOST_SCOPED_ENUM(name) BOOST_SCOPED_ENUM_NATIVE(name) //#ifdef BOOST_NO_CXX11_SCOPED_ENUMS // //# define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_type //# define BOOST_SCOPED_ENUM_END }; //# define BOOST_SCOPED_ENUM(name) name::enum_type // //#else // //# define BOOST_SCOPED_ENUM_START(name) enum class name //# define BOOST_SCOPED_ENUM_END //# define BOOST_SCOPED_ENUM(name) name // //#endif #endif // BOOST_SCOPED_ENUM_EMULATION_HPP passenger-4.0.37/ext/boost/detail/select_type.hpp000644 000765 000024 00000002152 12233035540 022435 0ustar00honglistaff000000 000000 // (C) Copyright David Abrahams 2001. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org for most recent version including documentation. // Revision History // 09 Feb 01 Applied John Maddock's Borland patch Moving // specialization to unspecialized template (David Abrahams) // 06 Feb 01 Created (David Abrahams) #ifndef SELECT_TYPE_DWA20010206_HPP # define SELECT_TYPE_DWA20010206_HPP namespace boost { namespace detail { // Template class if_true -- select among 2 types based on a bool constant expression // Usage: // typename if_true<(bool_const_expression)>::template then::type // HP aCC cannot deal with missing names for template value parameters template struct if_true { template struct then { typedef T type; }; }; template <> struct if_true { template struct then { typedef F type; }; }; }} #endif // SELECT_TYPE_DWA20010206_HPP passenger-4.0.37/ext/boost/detail/sp_typeinfo.hpp000644 000765 000024 00000004567 12233035540 022470 0ustar00honglistaff000000 000000 #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED #define BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // detail/sp_typeinfo.hpp // // Copyright 2007 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #if defined( BOOST_NO_TYPEID ) #include #include namespace boost { namespace detail { class sp_typeinfo { private: sp_typeinfo( sp_typeinfo const& ); sp_typeinfo& operator=( sp_typeinfo const& ); char const * name_; public: explicit sp_typeinfo( char const * name ): name_( name ) { } bool operator==( sp_typeinfo const& rhs ) const { return this == &rhs; } bool operator!=( sp_typeinfo const& rhs ) const { return this != &rhs; } bool before( sp_typeinfo const& rhs ) const { return std::less< sp_typeinfo const* >()( this, &rhs ); } char const* name() const { return name_; } }; template struct sp_typeid_ { static sp_typeinfo ti_; static char const * name() { return BOOST_CURRENT_FUNCTION; } }; #if defined(__SUNPRO_CC) // see #4199, the Sun Studio compiler gets confused about static initialization // constructor arguments. But an assignment works just fine. template sp_typeinfo sp_typeid_< T >::ti_ = sp_typeid_< T >::name(); #else template sp_typeinfo sp_typeid_< T >::ti_(sp_typeid_< T >::name()); #endif template struct sp_typeid_< T & >: sp_typeid_< T > { }; template struct sp_typeid_< T const >: sp_typeid_< T > { }; template struct sp_typeid_< T volatile >: sp_typeid_< T > { }; template struct sp_typeid_< T const volatile >: sp_typeid_< T > { }; } // namespace detail } // namespace boost #define BOOST_SP_TYPEID(T) (boost::detail::sp_typeid_::ti_) #else #include namespace boost { namespace detail { #if defined( BOOST_NO_STD_TYPEINFO ) typedef ::type_info sp_typeinfo; #else typedef std::type_info sp_typeinfo; #endif } // namespace detail } // namespace boost #define BOOST_SP_TYPEID(T) typeid(T) #endif #endif // #ifndef BOOST_DETAIL_SP_TYPEINFO_HPP_INCLUDED passenger-4.0.37/ext/boost/detail/workaround.hpp000644 000765 000024 00000016165 12233035540 022321 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef WORKAROUND_DWA2002126_HPP # define WORKAROUND_DWA2002126_HPP // Compiler/library version workaround macro // // Usage: // // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // // workaround for eVC4 and VC6 // ... // workaround code here // #endif // // When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the // first argument must be undefined or expand to a numeric // value. The above expands to: // // (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300 // // When used for workarounds that apply to the latest known version // and all earlier versions of a compiler, the following convention // should be observed: // // #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301)) // // The version number in this case corresponds to the last version in // which the workaround was known to have been required. When // BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro // BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates // the workaround for any version of the compiler. When // BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or // error will be issued if the compiler version exceeds the argument // to BOOST_TESTED_AT(). This can be used to locate workarounds which // may be obsoleted by newer versions. # ifndef BOOST_STRICT_CONFIG #include #ifndef __BORLANDC__ #define __BORLANDC___WORKAROUND_GUARD 1 #else #define __BORLANDC___WORKAROUND_GUARD 0 #endif #ifndef __CODEGEARC__ #define __CODEGEARC___WORKAROUND_GUARD 1 #else #define __CODEGEARC___WORKAROUND_GUARD 0 #endif #ifndef _MSC_VER #define _MSC_VER_WORKAROUND_GUARD 1 #else #define _MSC_VER_WORKAROUND_GUARD 0 #endif #ifndef _MSC_FULL_VER #define _MSC_FULL_VER_WORKAROUND_GUARD 1 #else #define _MSC_FULL_VER_WORKAROUND_GUARD 0 #endif #ifndef BOOST_MSVC #define BOOST_MSVC_WORKAROUND_GUARD 1 #else #define BOOST_MSVC_WORKAROUND_GUARD 0 #endif #ifndef BOOST_MSVC_FULL_VER #define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1 #else #define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0 #endif #ifndef __GNUC__ #define __GNUC___WORKAROUND_GUARD 1 #else #define __GNUC___WORKAROUND_GUARD 0 #endif #ifndef __GNUC_MINOR__ #define __GNUC_MINOR___WORKAROUND_GUARD 1 #else #define __GNUC_MINOR___WORKAROUND_GUARD 0 #endif #ifndef __GNUC_PATCHLEVEL__ #define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1 #else #define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0 #endif #ifndef __IBMCPP__ #define __IBMCPP___WORKAROUND_GUARD 1 #else #define __IBMCPP___WORKAROUND_GUARD 0 #endif #ifndef __SUNPRO_CC #define __SUNPRO_CC_WORKAROUND_GUARD 1 #else #define __SUNPRO_CC_WORKAROUND_GUARD 0 #endif #ifndef __DECCXX_VER #define __DECCXX_VER_WORKAROUND_GUARD 1 #else #define __DECCXX_VER_WORKAROUND_GUARD 0 #endif #ifndef __MWERKS__ #define __MWERKS___WORKAROUND_GUARD 1 #else #define __MWERKS___WORKAROUND_GUARD 0 #endif #ifndef __EDG__ #define __EDG___WORKAROUND_GUARD 1 #else #define __EDG___WORKAROUND_GUARD 0 #endif #ifndef __EDG_VERSION__ #define __EDG_VERSION___WORKAROUND_GUARD 1 #else #define __EDG_VERSION___WORKAROUND_GUARD 0 #endif #ifndef __HP_aCC #define __HP_aCC_WORKAROUND_GUARD 1 #else #define __HP_aCC_WORKAROUND_GUARD 0 #endif #ifndef __hpxstd98 #define __hpxstd98_WORKAROUND_GUARD 1 #else #define __hpxstd98_WORKAROUND_GUARD 0 #endif #ifndef _CRAYC #define _CRAYC_WORKAROUND_GUARD 1 #else #define _CRAYC_WORKAROUND_GUARD 0 #endif #ifndef __DMC__ #define __DMC___WORKAROUND_GUARD 1 #else #define __DMC___WORKAROUND_GUARD 0 #endif #ifndef MPW_CPLUS #define MPW_CPLUS_WORKAROUND_GUARD 1 #else #define MPW_CPLUS_WORKAROUND_GUARD 0 #endif #ifndef __COMO__ #define __COMO___WORKAROUND_GUARD 1 #else #define __COMO___WORKAROUND_GUARD 0 #endif #ifndef __COMO_VERSION__ #define __COMO_VERSION___WORKAROUND_GUARD 1 #else #define __COMO_VERSION___WORKAROUND_GUARD 0 #endif #ifndef __INTEL_COMPILER #define __INTEL_COMPILER_WORKAROUND_GUARD 1 #else #define __INTEL_COMPILER_WORKAROUND_GUARD 0 #endif #ifndef __ICL #define __ICL_WORKAROUND_GUARD 1 #else #define __ICL_WORKAROUND_GUARD 0 #endif #ifndef _COMPILER_VERSION #define _COMPILER_VERSION_WORKAROUND_GUARD 1 #else #define _COMPILER_VERSION_WORKAROUND_GUARD 0 #endif #ifndef _RWSTD_VER #define _RWSTD_VER_WORKAROUND_GUARD 1 #else #define _RWSTD_VER_WORKAROUND_GUARD 0 #endif #ifndef BOOST_RWSTD_VER #define BOOST_RWSTD_VER_WORKAROUND_GUARD 1 #else #define BOOST_RWSTD_VER_WORKAROUND_GUARD 0 #endif #ifndef __GLIBCPP__ #define __GLIBCPP___WORKAROUND_GUARD 1 #else #define __GLIBCPP___WORKAROUND_GUARD 0 #endif #ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC #define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1 #else #define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0 #endif #ifndef __SGI_STL_PORT #define __SGI_STL_PORT_WORKAROUND_GUARD 1 #else #define __SGI_STL_PORT_WORKAROUND_GUARD 0 #endif #ifndef _STLPORT_VERSION #define _STLPORT_VERSION_WORKAROUND_GUARD 1 #else #define _STLPORT_VERSION_WORKAROUND_GUARD 0 #endif #ifndef __LIBCOMO_VERSION__ #define __LIBCOMO_VERSION___WORKAROUND_GUARD 1 #else #define __LIBCOMO_VERSION___WORKAROUND_GUARD 0 #endif #ifndef _CPPLIB_VER #define _CPPLIB_VER_WORKAROUND_GUARD 1 #else #define _CPPLIB_VER_WORKAROUND_GUARD 0 #endif #ifndef BOOST_INTEL_CXX_VERSION #define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1 #else #define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0 #endif #ifndef BOOST_INTEL_WIN #define BOOST_INTEL_WIN_WORKAROUND_GUARD 1 #else #define BOOST_INTEL_WIN_WORKAROUND_GUARD 0 #endif #ifndef BOOST_DINKUMWARE_STDLIB #define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1 #else #define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0 #endif #ifndef BOOST_INTEL #define BOOST_INTEL_WORKAROUND_GUARD 1 #else #define BOOST_INTEL_WORKAROUND_GUARD 0 #endif // Always define to zero, if it's used it'll be defined my MPL: #define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0 # define BOOST_WORKAROUND(symbol, test) \ ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \ (symbol != 0) && (1 % (( (symbol test) ) + 1))) // ^ ^ ^ ^ // The extra level of parenthesis nesting above, along with the // BOOST_OPEN_PAREN indirection below, is required to satisfy the // broken preprocessor in MWCW 8.3 and earlier. // // The basic mechanism works as follows: // (symbol test) + 1 => if (symbol test) then 2 else 1 // 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0 // // The complication with % is for cooperation with BOOST_TESTED_AT(). // When "test" is BOOST_TESTED_AT(x) and // BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined, // // symbol test => if (symbol <= x) then 1 else -1 // (symbol test) + 1 => if (symbol <= x) then 2 else 0 // 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero // # ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS # define BOOST_OPEN_PAREN ( # define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1 # else # define BOOST_TESTED_AT(value) != ((value)-(value)) # endif # else # define BOOST_WORKAROUND(symbol, test) 0 # endif #endif // WORKAROUND_DWA2002126_HPP passenger-4.0.37/ext/boost/date_time/adjust_functors.hpp000644 000765 000024 00000013406 12233035540 024027 0ustar00honglistaff000000 000000 #ifndef _DATE_TIME_ADJUST_FUNCTORS_HPP___ #define _DATE_TIME_ADJUST_FUNCTORS_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/date.hpp" #include "boost/date_time/wrapping_int.hpp" namespace boost { namespace date_time { //! Functor to iterate a fixed number of days template class day_functor { public: typedef typename date_type::duration_type duration_type; day_functor(int f) : f_(f) {} duration_type get_offset(const date_type& d) const { // why is 'd' a parameter??? // fix compiler warnings d.year(); return duration_type(f_); } duration_type get_neg_offset(const date_type& d) const { // fix compiler warnings d.year(); return duration_type(-f_); } private: int f_; }; //! Provides calculation to find next nth month given a date /*! This adjustment function provides the logic for 'month-based' * advancement on a ymd based calendar. The policy it uses * to handle the non existant end of month days is to back * up to the last day of the month. Also, if the starting * date is the last day of a month, this functor will attempt * to adjust to the end of the month. */ template class month_functor { public: typedef typename date_type::duration_type duration_type; typedef typename date_type::calendar_type cal_type; typedef typename cal_type::ymd_type ymd_type; typedef typename cal_type::day_type day_type; month_functor(int f) : f_(f), origDayOfMonth_(0) {} duration_type get_offset(const date_type& d) const { ymd_type ymd(d.year_month_day()); if (origDayOfMonth_ == 0) { origDayOfMonth_ = ymd.day; day_type endOfMonthDay(cal_type::end_of_month_day(ymd.year,ymd.month)); if (endOfMonthDay == ymd.day) { origDayOfMonth_ = -1; //force the value to the end of month } } typedef date_time::wrapping_int2 wrap_int2; typedef typename wrap_int2::int_type int_type; wrap_int2 wi(ymd.month); //calc the year wrap around, add() returns 0 or 1 if wrapped int_type year = wi.add(static_cast(f_)); year = static_cast(year + ymd.year); //calculate resulting year // std::cout << "trace wi: " << wi.as_int() << std::endl; // std::cout << "trace year: " << year << std::endl; //find the last day for the new month day_type resultingEndOfMonthDay(cal_type::end_of_month_day(year, wi.as_int())); //original was the end of month -- force to last day of month if (origDayOfMonth_ == -1) { return date_type(year, wi.as_int(), resultingEndOfMonthDay) - d; } day_type dayOfMonth = origDayOfMonth_; if (dayOfMonth > resultingEndOfMonthDay) { dayOfMonth = resultingEndOfMonthDay; } return date_type(year, wi.as_int(), dayOfMonth) - d; } //! Returns a negative duration_type duration_type get_neg_offset(const date_type& d) const { ymd_type ymd(d.year_month_day()); if (origDayOfMonth_ == 0) { origDayOfMonth_ = ymd.day; day_type endOfMonthDay(cal_type::end_of_month_day(ymd.year,ymd.month)); if (endOfMonthDay == ymd.day) { origDayOfMonth_ = -1; //force the value to the end of month } } typedef date_time::wrapping_int2 wrap_int2; typedef typename wrap_int2::int_type int_type; wrap_int2 wi(ymd.month); //calc the year wrap around, add() returns 0 or 1 if wrapped int_type year = wi.subtract(static_cast(f_)); year = static_cast(year + ymd.year); //calculate resulting year //find the last day for the new month day_type resultingEndOfMonthDay(cal_type::end_of_month_day(year, wi.as_int())); //original was the end of month -- force to last day of month if (origDayOfMonth_ == -1) { return date_type(year, wi.as_int(), resultingEndOfMonthDay) - d; } day_type dayOfMonth = origDayOfMonth_; if (dayOfMonth > resultingEndOfMonthDay) { dayOfMonth = resultingEndOfMonthDay; } return date_type(year, wi.as_int(), dayOfMonth) - d; } private: int f_; mutable short origDayOfMonth_; }; //! Functor to iterate a over weeks template class week_functor { public: typedef typename date_type::duration_type duration_type; typedef typename date_type::calendar_type calendar_type; week_functor(int f) : f_(f) {} duration_type get_offset(const date_type& d) const { // why is 'd' a parameter??? // fix compiler warnings d.year(); return duration_type(f_*calendar_type::days_in_week()); } duration_type get_neg_offset(const date_type& d) const { // fix compiler warnings d.year(); return duration_type(-f_*calendar_type::days_in_week()); } private: int f_; }; //! Functor to iterate by a year adjusting for leap years template class year_functor { public: //typedef typename date_type::year_type year_type; typedef typename date_type::duration_type duration_type; year_functor(int f) : _mf(f * 12) {} duration_type get_offset(const date_type& d) const { return _mf.get_offset(d); } duration_type get_neg_offset(const date_type& d) const { return _mf.get_neg_offset(d); } private: month_functor _mf; }; } }//namespace date_time #endif passenger-4.0.37/ext/boost/date_time/c_time.hpp000644 000765 000024 00000010247 12233035540 022052 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_C_TIME_HPP___ #define DATE_TIME_C_TIME_HPP___ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 09:04:10 -0700 (Sat, 22 Sep 2012) $ */ /*! @file c_time.hpp Provide workarounds related to the ctime header */ #include #include // to be able to convert from string literals to exceptions #include #include #include //Work around libraries that don't put time_t and time in namespace std #ifdef BOOST_NO_STDC_NAMESPACE namespace std { using ::time_t; using ::time; using ::localtime; using ::tm; using ::gmtime; } #endif // BOOST_NO_STDC_NAMESPACE //The following is used to support high precision time clocks #ifdef BOOST_HAS_GETTIMEOFDAY #include #endif #ifdef BOOST_HAS_FTIME #include #endif namespace boost { namespace date_time { //! Provides a uniform interface to some 'ctime' functions /*! Provides a uniform interface to some ctime functions and * their '_r' counterparts. The '_r' functions require a pointer to a * user created std::tm struct whereas the regular functions use a * staticly created struct and return a pointer to that. These wrapper * functions require the user to create a std::tm struct and send in a * pointer to it. This struct may be used to store the resulting time. * The returned pointer may or may not point to this struct, however, * it will point to the result of the corresponding function. * All functions do proper checking of the C function results and throw * exceptions on error. Therefore the functions will never return NULL. */ struct c_time { public: #if defined(BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS) //! requires a pointer to a user created std::tm struct inline static std::tm* localtime(const std::time_t* t, std::tm* result) { // localtime_r() not in namespace std??? #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 std::tm tmp; if(!localtime_r(t,&tmp)) result = 0; else *result = tmp; #else result = localtime_r(t, result); #endif if (!result) boost::throw_exception(std::runtime_error("could not convert calendar time to local time")); return result; } //! requires a pointer to a user created std::tm struct inline static std::tm* gmtime(const std::time_t* t, std::tm* result) { // gmtime_r() not in namespace std??? #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 std::tm tmp; if(!gmtime_r(t,&tmp)) result = 0; else *result = tmp; #else result = gmtime_r(t, result); #endif if (!result) boost::throw_exception(std::runtime_error("could not convert calendar time to UTC time")); return result; } #else // BOOST_HAS_THREADS #if (defined(_MSC_VER) && (_MSC_VER >= 1400)) #pragma warning(push) // preserve warning settings #pragma warning(disable : 4996) // disable depricated localtime/gmtime warning on vc8 #endif // _MSC_VER >= 1400 //! requires a pointer to a user created std::tm struct inline static std::tm* localtime(const std::time_t* t, std::tm* result) { result = std::localtime(t); if (!result) boost::throw_exception(std::runtime_error("could not convert calendar time to local time")); return result; } //! requires a pointer to a user created std::tm struct inline static std::tm* gmtime(const std::time_t* t, std::tm* result) { result = std::gmtime(t); if (!result) boost::throw_exception(std::runtime_error("could not convert calendar time to UTC time")); return result; } #if (defined(_MSC_VER) && (_MSC_VER >= 1400)) #pragma warning(pop) // restore warnings to previous state #endif // _MSC_VER >= 1400 #endif // BOOST_HAS_THREADS }; }} // namespaces #endif // DATE_TIME_C_TIME_HPP___ passenger-4.0.37/ext/boost/date_time/compiler_config.hpp000644 000765 000024 00000014147 12233035540 023754 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_COMPILER_CONFIG_HPP___ #define DATE_TIME_COMPILER_CONFIG_HPP___ /* Copyright (c) 2002-2004 CrystalClear Software, Inc. * Subject to the Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2011-07-26 10:40:21 -0700 (Tue, 26 Jul 2011) $ */ #include #include #include // With boost release 1.33, date_time will be using a different, // more flexible, IO system. This new system is not compatible with // old compilers. The original date_time IO system remains for those // compilers. They must define this macro to use the legacy IO. // (defined(__BORLANDC__) && (__BORLANDC__ <= 0x0581) ) ) && #if( BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) \ || BOOST_WORKAROUND( __GNUC__, < 3) \ || (BOOST_WORKAROUND( _MSC_VER, <= 1300) ) \ ) \ && !defined(USE_DATE_TIME_PRE_1_33_FACET_IO) # define USE_DATE_TIME_PRE_1_33_FACET_IO #endif // This file performs some local compiler configurations #include //set up locale configurations //Set up a configuration parameter for platforms that have //GetTimeOfDay #if defined(BOOST_HAS_GETTIMEOFDAY) || defined(BOOST_HAS_FTIME) #define BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK #endif // To Force no default constructors for date & ptime, un-comment following //#define DATE_TIME_NO_DEFAULT_CONSTRUCTOR // Include extensions to date_duration - comment out to remove this feature #define BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES // these extensions are known to cause problems with gcc295 #if defined(__GNUC__) && (__GNUC__ < 3) #undef BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES #endif #if (defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) || BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) ) #define BOOST_DATE_TIME_NO_MEMBER_INIT #endif // include these types before we try to re-define them #include //Define INT64_C for compilers that don't have it #if (!defined(INT64_C)) #define INT64_C(value) int64_t(value) #endif /* Workaround for Borland iterator error. Error was "Cannot convert 'istream *' to 'wistream *' in function istream_iterator<>::istream_iterator() */ #if defined(__BORLANDC__) && defined(BOOST_BCB_WITH_RW_LIB) #define BOOST_DATE_TIME_NO_WISTREAM_ITERATOR #endif // Borland v5.64 does not have the following in std namespace; v5.5.1 does #if defined(__BORLANDC__) && defined(BOOST_BCB_WITH_STLPORT) #include namespace std { using stlport::tolower; using stlport::ctype; using stlport::use_facet; } #endif // workaround for errors associated with output for date classes // modifications and input streaming for time classes. // Compilers affected are: // gcc295, msvc (neither with STLPort), any borland // #if (((defined(__GNUC__) && (__GNUC__ < 3)) || \ (defined(_MSC_VER) && (_MSC_VER < 1300)) ) && \ !defined(_STLP_OWN_IOSTREAMS) ) || \ BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) #define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS #endif // The macro marks up places where compiler complains for missing return statement or // uninitialized variables after calling to boost::throw_exception. // BOOST_UNREACHABLE_RETURN doesn't work since even compilers that support // unreachable statements detection emit such warnings. #if defined(_MSC_VER) // Use special MSVC extension to markup unreachable code # define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) __assume(false) #elif !defined(BOOST_NO_UNREACHABLE_RETURN_DETECTION) // Call to a non-returning function should suppress the warning # if defined(BOOST_NO_STDC_NAMESPACE) namespace std { using ::abort; } # endif // defined(BOOST_NO_STDC_NAMESPACE) # define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) std::abort() #else // For other poor compilers the specified expression is compiled. Usually, this would be a return statement. # define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) x #endif /* The following handles the definition of the necessary macros * for dll building on Win32 platforms. * * For code that will be placed in the date_time .dll, * it must be properly prefixed with BOOST_DATE_TIME_DECL. * The corresponding .cpp file must have BOOST_DATE_TIME_SOURCE * defined before including its header. For examples see: * greg_month.hpp & greg_month.cpp * */ // we need to import/export our code only if the user has specifically // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost // libraries to be dynamically linked, or BOOST_DATE_TIME_DYN_LINK // if they want just this one to be dynamically liked: #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK) // export if this is our own source, otherwise import: # ifdef BOOST_DATE_TIME_SOURCE # define BOOST_DATE_TIME_DECL BOOST_SYMBOL_EXPORT # else # define BOOST_DATE_TIME_DECL BOOST_SYMBOL_IMPORT # endif // BOOST_DATE_TIME_SOURCE #endif // DYN_LINK // // if BOOST_WHATEVER_DECL isn't defined yet define it now: #ifndef BOOST_DATE_TIME_DECL # define BOOST_DATE_TIME_DECL #endif // // Automatically link to the correct build variant where possible. // #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_DATE_TIME_NO_LIB) && !defined(BOOST_DATE_TIME_SOURCE) // // Set the name of our library, this will get undef'ed by auto_link.hpp // once it's done with it: // #define BOOST_LIB_NAME boost_date_time // // If we're importing code from a dll, then tell auto_link.hpp about it: // #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK) # define BOOST_DYN_LINK #endif // // And include the header that does the work: // #include #endif // auto-linking disabled #if defined(BOOST_HAS_THREADS) # if defined(_MSC_VER) || defined(__MWERKS__) || defined(__MINGW32__) || defined(__BORLANDC__) //no reentrant posix functions (eg: localtime_r) # elif (!defined(__hpux) || (defined(__hpux) && defined(_REENTRANT))) # define BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS # endif #endif #endif passenger-4.0.37/ext/boost/date_time/constrained_value.hpp000644 000765 000024 00000007651 12233035540 024324 0ustar00honglistaff000000 000000 #ifndef CONSTRAINED_VALUE_HPP___ #define CONSTRAINED_VALUE_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $ */ #include #include #include #include #include #include namespace boost { //! Namespace containing constrained_value template and types namespace CV { //! Represent a min or max violation type enum violation_enum {min_violation, max_violation}; //! A template to specify a constrained basic value type /*! This template provides a quick way to generate * an integer type with a constrained range. The type * provides for the ability to specify the min, max, and * and error handling policy. * * value policies * A class that provides the range limits via the min and * max functions as well as a function on_error that * determines how errors are handled. A common strategy * would be to assert or throw and exception. The on_error * is passed both the current value and the new value that * is in error. * */ template class constrained_value { public: typedef typename value_policies::value_type value_type; // typedef except_type exception_type; constrained_value(value_type value) : value_((min)()) { assign(value); } constrained_value& operator=(value_type v) { assign(v); return *this; } //! Return the max allowed value (traits method) static value_type max BOOST_PREVENT_MACRO_SUBSTITUTION () {return (value_policies::max)();} //! Return the min allowed value (traits method) static value_type min BOOST_PREVENT_MACRO_SUBSTITUTION () {return (value_policies::min)();} //! Coerce into the representation type operator value_type() const {return value_;} protected: value_type value_; private: void assign(value_type value) { //adding 1 below gets rid of a compiler warning which occurs when the //min_value is 0 and the type is unsigned.... if (value+1 < (min)()+1) { value_policies::on_error(value_, value, min_violation); return; } if (value > (max)()) { value_policies::on_error(value_, value, max_violation); return; } value_ = value; } }; //! Template to shortcut the constrained_value policy creation process template class simple_exception_policy { struct exception_wrapper : public exception_type { // In order to support throw_exception mechanism in the BOOST_NO_EXCEPTIONS mode, // we'll have to provide a way to acquire std::exception from the exception being thrown. // However, we cannot derive from it, since it would make it interceptable by this class, // which might not be what the user wanted. operator std::out_of_range () const { // TODO: Make the message more descriptive by using arguments to on_error return std::out_of_range("constrained value boundary has been violated"); } }; typedef typename mpl::if_< is_base_of< std::exception, exception_type >, exception_type, exception_wrapper >::type actual_exception_type; public: typedef rep_type value_type; static rep_type min BOOST_PREVENT_MACRO_SUBSTITUTION () { return min_value; } static rep_type max BOOST_PREVENT_MACRO_SUBSTITUTION () { return max_value; } static void on_error(rep_type, rep_type, violation_enum) { boost::throw_exception(actual_exception_type()); } }; } } //namespace CV #endif passenger-4.0.37/ext/boost/date_time/date.hpp000644 000765 000024 00000015254 12233035540 021532 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_DATE_HPP___ #define DATE_TIME_DATE_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $ */ #include #include #include namespace boost { namespace date_time { //!Representation of timepoint at the one day level resolution. /*! The date template represents an interface shell for a date class that is based on a year-month-day system such as the gregorian or iso systems. It provides basic operations to enable calculation and comparisons. Theory This date representation fundamentally departs from the C tm struct approach. The goal for this type is to provide efficient date operations (add, subtract) and storage (minimize space to represent) in a concrete class. Thus, the date uses a count internally to represent a particular date. The calendar parameter defines the policies for converting the the year-month-day and internal counted form here. Applications that need to perform heavy formatting of the same date repeatedly will perform better by using the year-month-day representation. Internally the date uses a day number to represent the date. This is a monotonic time representation. This representation allows for fast comparison as well as simplifying the creation of writing numeric operations. Essentially, the internal day number is like adjusted julian day. The adjustment is determined by the Epoch date which is represented as day 1 of the calendar. Day 0 is reserved for negative infinity so that any actual date is automatically greater than negative infinity. When a date is constructed from a date or formatted for output, the appropriate conversions are applied to create the year, month, day representations. */ template class date : private boost::less_than_comparable > { public: typedef T date_type; typedef calendar calendar_type; typedef typename calendar::date_traits_type traits_type; typedef duration_type_ duration_type; typedef typename calendar::year_type year_type; typedef typename calendar::month_type month_type; typedef typename calendar::day_type day_type; typedef typename calendar::ymd_type ymd_type; typedef typename calendar::date_rep_type date_rep_type; typedef typename calendar::date_int_type date_int_type; typedef typename calendar::day_of_week_type day_of_week_type; date(year_type y, month_type m, day_type d) : days_(calendar::day_number(ymd_type(y, m, d))) {} date(const ymd_type& ymd) : days_(calendar::day_number(ymd)) {} //let the compiler write copy, assignment, and destructor year_type year() const { ymd_type ymd = calendar::from_day_number(days_); return ymd.year; } month_type month() const { ymd_type ymd = calendar::from_day_number(days_); return ymd.month; } day_type day() const { ymd_type ymd = calendar::from_day_number(days_); return ymd.day; } day_of_week_type day_of_week() const { ymd_type ymd = calendar::from_day_number(days_); return calendar::day_of_week(ymd); } ymd_type year_month_day() const { return calendar::from_day_number(days_); } bool operator<(const date_type& rhs) const { return days_ < rhs.days_; } bool operator==(const date_type& rhs) const { return days_ == rhs.days_; } //! check to see if date is a special value bool is_special()const { return(is_not_a_date() || is_infinity()); } //! check to see if date is not a value bool is_not_a_date() const { return traits_type::is_not_a_number(days_); } //! check to see if date is one of the infinity values bool is_infinity() const { return traits_type::is_inf(days_); } //! check to see if date is greater than all possible dates bool is_pos_infinity() const { return traits_type::is_pos_inf(days_); } //! check to see if date is greater than all possible dates bool is_neg_infinity() const { return traits_type::is_neg_inf(days_); } //! return as a special value or a not_special if a normal date special_values as_special() const { return traits_type::to_special(days_); } duration_type operator-(const date_type& d) const { if (!this->is_special() && !d.is_special()) { // The duration underlying type may be wider than the date underlying type. // Thus we calculate the difference in terms of two durations from some common fixed base date. typedef typename duration_type::duration_rep_type duration_rep_type; return duration_type(static_cast< duration_rep_type >(days_) - static_cast< duration_rep_type >(d.days_)); } else { // In this case the difference will be a special value, too date_rep_type val = date_rep_type(days_) - date_rep_type(d.days_); return duration_type(val.as_special()); } } date_type operator-(const duration_type& dd) const { if(dd.is_special()) { return date_type(date_rep_type(days_) - dd.get_rep()); } return date_type(date_rep_type(days_) - dd.days()); } date_type operator-=(const duration_type& dd) { *this = *this - dd; return date_type(days_); } date_rep_type day_count() const { return days_; } //allow internal access from operators date_type operator+(const duration_type& dd) const { if(dd.is_special()) { return date_type(date_rep_type(days_) + dd.get_rep()); } return date_type(date_rep_type(days_) + dd.days()); } date_type operator+=(const duration_type& dd) { *this = *this + dd; return date_type(days_); } //see reference protected: /*! This is a private constructor which allows for the creation of new dates. It is not exposed to users since that would require class users to understand the inner workings of the date class. */ explicit date(date_int_type days) : days_(days) {} explicit date(date_rep_type days) : days_(days.as_number()) {} date_int_type days_; }; } } // namespace date_time #endif passenger-4.0.37/ext/boost/date_time/date_clock_device.hpp000644 000765 000024 00000004200 12233035540 024211 0ustar00honglistaff000000 000000 #ifndef DATE_CLOCK_DEVICE_HPP___ #define DATE_CLOCK_DEVICE_HPP___ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/c_time.hpp" namespace boost { namespace date_time { //! A clock providing day level services based on C time_t capabilities /*! This clock uses Posix interfaces as its implementation and hence * uses the timezone settings of the operating system. Incorrect * user settings will result in incorrect results for the calls * to local_day. */ template class day_clock { public: typedef typename date_type::ymd_type ymd_type; //! Get the local day as a date type static date_type local_day() { return date_type(local_day_ymd()); } //! Get the local day as a ymd_type static typename date_type::ymd_type local_day_ymd() { ::std::tm result; ::std::tm* curr = get_local_time(result); return ymd_type(curr->tm_year + 1900, curr->tm_mon + 1, curr->tm_mday); } //! Get the current day in universal date as a ymd_type static typename date_type::ymd_type universal_day_ymd() { ::std::tm result; ::std::tm* curr = get_universal_time(result); return ymd_type(curr->tm_year + 1900, curr->tm_mon + 1, curr->tm_mday); } //! Get the UTC day as a date type static date_type universal_day() { return date_type(universal_day_ymd()); } private: static ::std::tm* get_local_time(std::tm& result) { ::std::time_t t; ::std::time(&t); return c_time::localtime(&t, &result); } static ::std::tm* get_universal_time(std::tm& result) { ::std::time_t t; ::std::time(&t); return c_time::gmtime(&t, &result); } }; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/date_defs.hpp000644 000765 000024 00000001354 12233035540 022527 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_DATE_DEFS_HPP #define DATE_TIME_DATE_DEFS_HPP /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ namespace boost { namespace date_time { //! An enumeration of weekday names enum weekdays {Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday}; //! Simple enum to allow for nice programming with Jan, Feb, etc enum months_of_year {Jan=1,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec,NotAMonth,NumMonths}; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/date_duration.hpp000644 000765 000024 00000010412 12233035540 023426 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_DATE_DURATION__ #define DATE_TIME_DATE_DURATION__ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $ */ #include #include namespace boost { namespace date_time { //! Duration type with date level resolution template class date_duration : private boost::less_than_comparable1< date_duration< duration_rep_traits > , boost::equality_comparable1< date_duration< duration_rep_traits > , boost::addable1< date_duration< duration_rep_traits > , boost::subtractable1< date_duration< duration_rep_traits > , boost::dividable2< date_duration< duration_rep_traits >, int > > > > > { public: typedef typename duration_rep_traits::int_type duration_rep_type; typedef typename duration_rep_traits::impl_type duration_rep; //! Construct from a day count explicit date_duration(duration_rep day_count) : days_(day_count) {} /*! construct from special_values - only works when * instantiated with duration_traits_adapted */ date_duration(special_values sv) : days_(duration_rep::from_special(sv)) {} // copy constructor required for addable<> & subtractable<> //! Construct from another date_duration (Copy Constructor) date_duration(const date_duration& other) : days_(other.days_) {} //! returns days_ as it's instantiated type - used for streaming duration_rep get_rep()const { return days_; } bool is_special()const { return days_.is_special(); } //! returns days as value, not object. duration_rep_type days() const { return duration_rep_traits::as_number(days_); } //! Returns the smallest duration -- used by to calculate 'end' static date_duration unit() { return date_duration(1); } //! Equality bool operator==(const date_duration& rhs) const { return days_ == rhs.days_; } //! Less bool operator<(const date_duration& rhs) const { return days_ < rhs.days_; } /* For shortcut operators (+=, -=, etc) simply using * "days_ += days_" may not work. If instantiated with * an int_adapter, shortcut operators are not present, * so this will not compile */ //! Subtract another duration -- result is signed date_duration& operator-=(const date_duration& rhs) { //days_ -= rhs.days_; days_ = days_ - rhs.days_; return *this; } //! Add a duration -- result is signed date_duration& operator+=(const date_duration& rhs) { days_ = days_ + rhs.days_; return *this; } //! unary- Allows for dd = -date_duration(2); -> dd == -2 date_duration operator-() const { return date_duration(get_rep() * (-1)); } //! Division operations on a duration with an integer. date_duration& operator/=(int divisor) { days_ = days_ / divisor; return *this; } //! return sign information bool is_negative() const { return days_ < 0; } private: duration_rep days_; }; /*! Struct for instantiating date_duration with NO special values * functionality. Allows for transparent implementation of either * date_duration or date_duration > */ struct duration_traits_long { typedef long int_type; typedef long impl_type; static int_type as_number(impl_type i) { return i; } }; /*! Struct for instantiating date_duration WITH special values * functionality. Allows for transparent implementation of either * date_duration or date_duration > */ struct duration_traits_adapted { typedef long int_type; typedef boost::date_time::int_adapter impl_type; static int_type as_number(impl_type i) { return i.as_number(); } }; } } //namspace date_time #endif passenger-4.0.37/ext/boost/date_time/date_duration_types.hpp000644 000765 000024 00000020061 12233035540 024653 0ustar00honglistaff000000 000000 #ifndef DATE_DURATION_TYPES_HPP___ #define DATE_DURATION_TYPES_HPP___ /* Copyright (c) 2004 CrystalClear Software, Inc. * Subject to the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or * http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include #include #include namespace boost { namespace date_time { //! Additional duration type that represents a number of n*7 days template class weeks_duration : public date_duration { public: weeks_duration(typename duration_config::impl_type w) : date_duration(w * 7) {} weeks_duration(special_values sv) : date_duration(sv) {} }; // predeclare template class years_duration; //! additional duration type that represents a logical month /*! A logical month enables things like: "date(2002,Mar,2) + months(2) -> * 2002-May2". If the date is a last day-of-the-month, the result will * also be a last-day-of-the-month. */ template class months_duration { private: typedef typename base_config::int_rep int_rep; typedef typename int_rep::int_type int_type; typedef typename base_config::date_type date_type; typedef typename date_type::duration_type duration_type; typedef typename base_config::month_adjustor_type month_adjustor_type; typedef months_duration months_type; typedef years_duration years_type; public: months_duration(int_rep num) : _m(num) {} months_duration(special_values sv) : _m(sv) { _m = int_rep::from_special(sv); } int_rep number_of_months() const { return _m; } //! returns a negative duration duration_type get_neg_offset(const date_type& d) const { month_adjustor_type m_adj(_m.as_number()); return duration_type(m_adj.get_neg_offset(d)); } duration_type get_offset(const date_type& d) const { month_adjustor_type m_adj(_m.as_number()); return duration_type(m_adj.get_offset(d)); } bool operator==(const months_type& rhs) const { return(_m == rhs._m); } bool operator!=(const months_type& rhs) const { return(_m != rhs._m); } months_type operator+(const months_type& rhs)const { return months_type(_m + rhs._m); } months_type& operator+=(const months_type& rhs) { _m = _m + rhs._m; return *this; } months_type operator-(const months_type& rhs)const { return months_type(_m - rhs._m); } months_type& operator-=(const months_type& rhs) { _m = _m - rhs._m; return *this; } months_type operator*(const int_type rhs)const { return months_type(_m * rhs); } months_type& operator*=(const int_type rhs) { _m = _m * rhs; return *this; } months_type operator/(const int_type rhs)const { return months_type(_m / rhs); } months_type& operator/=(const int_type rhs) { _m = _m / rhs; return *this; } months_type operator+(const years_type& y)const { return months_type(y.number_of_years() * 12 + _m); } months_type& operator+=(const years_type& y) { _m = y.number_of_years() * 12 + _m; return *this; } months_type operator-(const years_type& y) const { return months_type(_m - y.number_of_years() * 12); } months_type& operator-=(const years_type& y) { _m = _m - y.number_of_years() * 12; return *this; } // friend date_type operator+(const date_type& d, const months_type& m) { return d + m.get_offset(d); } friend date_type operator+=(date_type& d, const months_type& m) { return d += m.get_offset(d); } friend date_type operator-(const date_type& d, const months_type& m) { // get_neg_offset returns a negative duration, so we add return d + m.get_neg_offset(d); } friend date_type operator-=(date_type& d, const months_type& m) { // get_neg_offset returns a negative duration, so we add return d += m.get_neg_offset(d); } private: int_rep _m; }; //! additional duration type that represents a logical year /*! A logical year enables things like: "date(2002,Mar,2) + years(2) -> * 2004-Mar-2". If the date is a last day-of-the-month, the result will * also be a last-day-of-the-month (ie date(2001-Feb-28) + years(3) -> * 2004-Feb-29). */ template class years_duration { private: typedef typename base_config::int_rep int_rep; typedef typename int_rep::int_type int_type; typedef typename base_config::date_type date_type; typedef typename date_type::duration_type duration_type; typedef typename base_config::month_adjustor_type month_adjustor_type; typedef years_duration years_type; typedef months_duration months_type; public: years_duration(int_rep num) : _y(num) {} years_duration(special_values sv) : _y(sv) { _y = int_rep::from_special(sv); } int_rep number_of_years() const { return _y; } //! returns a negative duration duration_type get_neg_offset(const date_type& d) const { month_adjustor_type m_adj(_y.as_number() * 12); return duration_type(m_adj.get_neg_offset(d)); } duration_type get_offset(const date_type& d) const { month_adjustor_type m_adj(_y.as_number() * 12); return duration_type(m_adj.get_offset(d)); } bool operator==(const years_type& rhs) const { return(_y == rhs._y); } bool operator!=(const years_type& rhs) const { return(_y != rhs._y); } years_type operator+(const years_type& rhs)const { return years_type(_y + rhs._y); } years_type& operator+=(const years_type& rhs) { _y = _y + rhs._y; return *this; } years_type operator-(const years_type& rhs)const { return years_type(_y - rhs._y); } years_type& operator-=(const years_type& rhs) { _y = _y - rhs._y; return *this; } years_type operator*(const int_type rhs)const { return years_type(_y * rhs); } years_type& operator*=(const int_type rhs) { _y = _y * rhs; return *this; } years_type operator/(const int_type rhs)const { return years_type(_y / rhs); } years_type& operator/=(const int_type rhs) { _y = _y / rhs; return *this; } months_type operator+(const months_type& m) const { return(months_type(_y * 12 + m.number_of_months())); } months_type operator-(const months_type& m) const { return(months_type(_y * 12 - m.number_of_months())); } // friend date_type operator+(const date_type& d, const years_type& y) { return d + y.get_offset(d); } friend date_type operator+=(date_type& d, const years_type& y) { return d += y.get_offset(d); } friend date_type operator-(const date_type& d, const years_type& y) { // get_neg_offset returns a negative duration, so we add return d + y.get_neg_offset(d); } friend date_type operator-=(date_type& d, const years_type& y) { // get_neg_offset returns a negative duration, so we add return d += y.get_neg_offset(d); } private: int_rep _y; }; }} // namespace boost::date_time #endif // DATE_DURATION_TYPES_HPP___ passenger-4.0.37/ext/boost/date_time/date_facet.hpp000644 000765 000024 00000071200 12233035540 022665 0ustar00honglistaff000000 000000 #ifndef _DATE_TIME_DATE_FACET__HPP___ #define _DATE_TIME_DATE_FACET__HPP___ /* Copyright (c) 2004-2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Martin Andrian, Jeff Garland, Bart Garst * $Date: 2012-09-30 16:25:22 -0700 (Sun, 30 Sep 2012) $ */ #include #include #include #include // ostreambuf_iterator #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace date_time { /*! Class that provides format based I/O facet for date types. * * This class allows the formatting of dates by using format string. * Format strings are: * * - %A => long_weekday_format - Full name Ex: Tuesday * - %a => short_weekday_format - Three letter abbreviation Ex: Tue * - %B => long_month_format - Full name Ex: October * - %b => short_month_format - Three letter abbreviation Ex: Oct * - %x => standard_format_specifier - defined by the locale * - %Y-%b-%d => default_date_format - YYYY-Mon-dd * * Default month format == %b * Default weekday format == %a */ template > > class date_facet : public std::locale::facet { public: typedef typename date_type::duration_type duration_type; // greg_weekday is gregorian_calendar::day_of_week_type typedef typename date_type::day_of_week_type day_of_week_type; typedef typename date_type::day_type day_type; typedef typename date_type::month_type month_type; typedef boost::date_time::period period_type; typedef std::basic_string string_type; typedef CharT char_type; typedef boost::date_time::period_formatter period_formatter_type; typedef boost::date_time::special_values_formatter special_values_formatter_type; typedef std::vector > input_collection_type; // used for the output of the date_generators typedef date_generator_formatter date_gen_formatter_type; typedef partial_date partial_date_type; typedef nth_kday_of_month nth_kday_type; typedef first_kday_of_month first_kday_type; typedef last_kday_of_month last_kday_type; typedef first_kday_after kday_after_type; typedef first_kday_before kday_before_type; static const char_type long_weekday_format[3]; static const char_type short_weekday_format[3]; static const char_type long_month_format[3]; static const char_type short_month_format[3]; static const char_type default_period_separator[4]; static const char_type standard_format_specifier[3]; static const char_type iso_format_specifier[7]; static const char_type iso_format_extended_specifier[9]; static const char_type default_date_format[9]; // YYYY-Mon-DD static std::locale::id id; #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) std::locale::id& __get_id (void) const { return id; } #endif explicit date_facet(::size_t a_ref = 0) : std::locale::facet(a_ref), //m_format(standard_format_specifier) m_format(default_date_format), m_month_format(short_month_format), m_weekday_format(short_weekday_format) {} explicit date_facet(const char_type* format_str, const input_collection_type& short_names, ::size_t ref_count = 0) : std::locale::facet(ref_count), m_format(format_str), m_month_format(short_month_format), m_weekday_format(short_weekday_format), m_month_short_names(short_names) {} explicit date_facet(const char_type* format_str, period_formatter_type per_formatter = period_formatter_type(), special_values_formatter_type sv_formatter = special_values_formatter_type(), date_gen_formatter_type dg_formatter = date_gen_formatter_type(), ::size_t ref_count = 0) : std::locale::facet(ref_count), m_format(format_str), m_month_format(short_month_format), m_weekday_format(short_weekday_format), m_period_formatter(per_formatter), m_date_gen_formatter(dg_formatter), m_special_values_formatter(sv_formatter) {} void format(const char_type* const format_str) { m_format = format_str; } virtual void set_iso_format() { m_format = iso_format_specifier; } virtual void set_iso_extended_format() { m_format = iso_format_extended_specifier; } void month_format(const char_type* const format_str) { m_month_format = format_str; } void weekday_format(const char_type* const format_str) { m_weekday_format = format_str; } void period_formatter(period_formatter_type per_formatter) { m_period_formatter= per_formatter; } void special_values_formatter(const special_values_formatter_type& svf) { m_special_values_formatter = svf; } void short_weekday_names(const input_collection_type& short_names) { m_weekday_short_names = short_names; } void long_weekday_names(const input_collection_type& long_names) { m_weekday_long_names = long_names; } void short_month_names(const input_collection_type& short_names) { m_month_short_names = short_names; } void long_month_names(const input_collection_type& long_names) { m_month_long_names = long_names; } void date_gen_phrase_strings(const input_collection_type& new_strings, typename date_gen_formatter_type::phrase_elements beg_pos=date_gen_formatter_type::first) { m_date_gen_formatter.elements(new_strings, beg_pos); } OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const date_type& d) const { if (d.is_special()) { return do_put_special(next, a_ios, fill_char, d.as_special()); } //The following line of code required the date to support a to_tm function return do_put_tm(next, a_ios, fill_char, to_tm(d), m_format); } OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const duration_type& dd) const { if (dd.is_special()) { return do_put_special(next, a_ios, fill_char, dd.get_rep().as_special()); } typedef std::num_put num_put; if (std::has_facet(a_ios.getloc())) { return std::use_facet(a_ios.getloc()).put(next, a_ios, fill_char, dd.get_rep().as_number()); } else { num_put* f = new num_put(); std::locale l = std::locale(a_ios.getloc(), f); a_ios.imbue(l); return f->put(next, a_ios, fill_char, dd.get_rep().as_number()); } } OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const month_type& m) const { //if (d.is_special()) { // return do_put_special(next, a_ios, fill_char, d.as_special()); //} //The following line of code required the date to support a to_tm function std::tm dtm; std::memset(&dtm, 0, sizeof(dtm)); dtm.tm_mon = m - 1; return do_put_tm(next, a_ios, fill_char, dtm, m_month_format); } //! puts the day of month OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const day_type& day) const { std::tm dtm; std::memset(&dtm, 0, sizeof(dtm)); dtm.tm_mday = day.as_number(); char_type tmp[3] = {'%','d'}; string_type temp_format(tmp); return do_put_tm(next, a_ios, fill_char, dtm, temp_format); } OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const day_of_week_type& dow) const { //if (d.is_special()) { // return do_put_special(next, a_ios, fill_char, d.as_special()); //} //The following line of code required the date to support a to_tm function std::tm dtm; std::memset(&dtm, 0, sizeof(dtm)); dtm.tm_wday = dow; return do_put_tm(next, a_ios, fill_char, dtm, m_weekday_format); } OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const period_type& p) const { return m_period_formatter.put_period(next, a_ios, fill_char, p, *this); } OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const partial_date_type& pd) const { return m_date_gen_formatter.put_partial_date(next, a_ios, fill_char, pd, *this); } OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const nth_kday_type& nkd) const { return m_date_gen_formatter.put_nth_kday(next, a_ios, fill_char, nkd, *this); } OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const first_kday_type& fkd) const { return m_date_gen_formatter.put_first_kday(next, a_ios, fill_char, fkd, *this); } OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const last_kday_type& lkd) const { return m_date_gen_formatter.put_last_kday(next, a_ios, fill_char, lkd, *this); } OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const kday_before_type& fkb) const { return m_date_gen_formatter.put_kday_before(next, a_ios, fill_char, fkb, *this); } OutItrT put(OutItrT next, std::ios_base& a_ios, char_type fill_char, const kday_after_type& fka) const { return m_date_gen_formatter.put_kday_after(next, a_ios, fill_char, fka, *this); } protected: virtual OutItrT do_put_special(OutItrT next, std::ios_base& /*a_ios*/, char_type /*fill_char*/, const boost::date_time::special_values sv) const { m_special_values_formatter.put_special(next, sv); return next; } virtual OutItrT do_put_tm(OutItrT next, std::ios_base& a_ios, char_type fill_char, const tm& tm_value, string_type a_format) const { // update format string with custom names if (m_weekday_long_names.size()) { boost::algorithm::replace_all(a_format, long_weekday_format, m_weekday_long_names[tm_value.tm_wday]); } if (m_weekday_short_names.size()) { boost::algorithm::replace_all(a_format, short_weekday_format, m_weekday_short_names[tm_value.tm_wday]); } if (m_month_long_names.size()) { boost::algorithm::replace_all(a_format, long_month_format, m_month_long_names[tm_value.tm_mon]); } if (m_month_short_names.size()) { boost::algorithm::replace_all(a_format, short_month_format, m_month_short_names[tm_value.tm_mon]); } // use time_put facet to create final string const char_type* p_format = a_format.c_str(); return std::use_facet >(a_ios.getloc()).put(next, a_ios, fill_char, &tm_value, p_format, p_format + a_format.size()); } protected: string_type m_format; string_type m_month_format; string_type m_weekday_format; period_formatter_type m_period_formatter; date_gen_formatter_type m_date_gen_formatter; special_values_formatter_type m_special_values_formatter; input_collection_type m_month_short_names; input_collection_type m_month_long_names; input_collection_type m_weekday_short_names; input_collection_type m_weekday_long_names; private: }; template std::locale::id date_facet::id; template const typename date_facet::char_type date_facet::long_weekday_format[3] = {'%','A'}; template const typename date_facet::char_type date_facet::short_weekday_format[3] = {'%','a'}; template const typename date_facet::char_type date_facet::long_month_format[3] = {'%','B'}; template const typename date_facet::char_type date_facet::short_month_format[3] = {'%','b'}; template const typename date_facet::char_type date_facet::default_period_separator[4] = { ' ', '/', ' '}; template const typename date_facet::char_type date_facet::standard_format_specifier[3] = {'%', 'x' }; template const typename date_facet::char_type date_facet::iso_format_specifier[7] = {'%', 'Y', '%', 'm', '%', 'd' }; template const typename date_facet::char_type date_facet::iso_format_extended_specifier[9] = {'%', 'Y', '-', '%', 'm', '-', '%', 'd' }; template const typename date_facet::char_type date_facet::default_date_format[9] = {'%','Y','-','%','b','-','%','d'}; //! Input facet template > > class date_input_facet : public std::locale::facet { public: typedef typename date_type::duration_type duration_type; // greg_weekday is gregorian_calendar::day_of_week_type typedef typename date_type::day_of_week_type day_of_week_type; typedef typename date_type::day_type day_type; typedef typename date_type::month_type month_type; typedef typename date_type::year_type year_type; typedef boost::date_time::period period_type; typedef std::basic_string string_type; typedef CharT char_type; typedef boost::date_time::period_parser period_parser_type; typedef boost::date_time::special_values_parser special_values_parser_type; typedef std::vector > input_collection_type; typedef format_date_parser format_date_parser_type; // date_generators stuff goes here typedef date_generator_parser date_gen_parser_type; typedef partial_date partial_date_type; typedef nth_kday_of_month nth_kday_type; typedef first_kday_of_month first_kday_type; typedef last_kday_of_month last_kday_type; typedef first_kday_after kday_after_type; typedef first_kday_before kday_before_type; static const char_type long_weekday_format[3]; static const char_type short_weekday_format[3]; static const char_type long_month_format[3]; static const char_type short_month_format[3]; static const char_type four_digit_year_format[3]; static const char_type two_digit_year_format[3]; static const char_type default_period_separator[4]; static const char_type standard_format_specifier[3]; static const char_type iso_format_specifier[7]; static const char_type iso_format_extended_specifier[9]; static const char_type default_date_format[9]; // YYYY-Mon-DD static std::locale::id id; explicit date_input_facet(::size_t a_ref = 0) : std::locale::facet(a_ref), m_format(default_date_format), m_month_format(short_month_format), m_weekday_format(short_weekday_format), m_year_format(four_digit_year_format), m_parser(m_format, std::locale::classic()) // default period_parser & special_values_parser used {} explicit date_input_facet(const string_type& format_str, ::size_t a_ref = 0) : std::locale::facet(a_ref), m_format(format_str), m_month_format(short_month_format), m_weekday_format(short_weekday_format), m_year_format(four_digit_year_format), m_parser(m_format, std::locale::classic()) // default period_parser & special_values_parser used {} explicit date_input_facet(const string_type& format_str, const format_date_parser_type& date_parser, const special_values_parser_type& sv_parser, const period_parser_type& per_parser, const date_gen_parser_type& date_gen_parser, ::size_t ref_count = 0) : std::locale::facet(ref_count), m_format(format_str), m_month_format(short_month_format), m_weekday_format(short_weekday_format), m_year_format(four_digit_year_format), m_parser(date_parser), m_date_gen_parser(date_gen_parser), m_period_parser(per_parser), m_sv_parser(sv_parser) {} void format(const char_type* const format_str) { m_format = format_str; } virtual void set_iso_format() { m_format = iso_format_specifier; } virtual void set_iso_extended_format() { m_format = iso_format_extended_specifier; } void month_format(const char_type* const format_str) { m_month_format = format_str; } void weekday_format(const char_type* const format_str) { m_weekday_format = format_str; } void year_format(const char_type* const format_str) { m_year_format = format_str; } void period_parser(period_parser_type per_parser) { m_period_parser = per_parser; } void short_weekday_names(const input_collection_type& weekday_names) { m_parser.short_weekday_names(weekday_names); } void long_weekday_names(const input_collection_type& weekday_names) { m_parser.long_weekday_names(weekday_names); } void short_month_names(const input_collection_type& month_names) { m_parser.short_month_names(month_names); } void long_month_names(const input_collection_type& month_names) { m_parser.long_month_names(month_names); } void date_gen_element_strings(const input_collection_type& col) { m_date_gen_parser.element_strings(col); } void date_gen_element_strings(const string_type& first, const string_type& second, const string_type& third, const string_type& fourth, const string_type& fifth, const string_type& last, const string_type& before, const string_type& after, const string_type& of) { m_date_gen_parser.element_strings(first,second,third,fourth,fifth,last,before,after,of); } void special_values_parser(special_values_parser_type sv_parser) { m_sv_parser = sv_parser; } InItrT get(InItrT& from, InItrT& to, std::ios_base& /*a_ios*/, date_type& d) const { d = m_parser.parse_date(from, to, m_format, m_sv_parser); return from; } InItrT get(InItrT& from, InItrT& to, std::ios_base& /*a_ios*/, month_type& m) const { m = m_parser.parse_month(from, to, m_month_format); return from; } InItrT get(InItrT& from, InItrT& to, std::ios_base& /*a_ios*/, day_of_week_type& wd) const { wd = m_parser.parse_weekday(from, to, m_weekday_format); return from; } //! Expects 1 or 2 digit day range: 1-31 InItrT get(InItrT& from, InItrT& to, std::ios_base& /*a_ios*/, day_type& d) const { d = m_parser.parse_var_day_of_month(from, to); return from; } InItrT get(InItrT& from, InItrT& to, std::ios_base& /*a_ios*/, year_type& y) const { y = m_parser.parse_year(from, to, m_year_format); return from; } InItrT get(InItrT& from, InItrT& to, std::ios_base& a_ios, duration_type& dd) const { // skip leading whitespace while(std::isspace(*from) && from != to) { ++from; } /* num_get.get() will always consume the first character if it * is a sign indicator (+/-). Special value strings may begin * with one of these signs so we'll need a copy of it * in case num_get.get() fails. */ char_type c = '\0'; // TODO Are these characters somewhere in the locale? if(*from == '-' || *from == '+') { c = *from; } typedef std::num_get num_get; typename duration_type::duration_rep_type val = 0; std::ios_base::iostate err = std::ios_base::goodbit; if (std::has_facet(a_ios.getloc())) { from = std::use_facet(a_ios.getloc()).get(from, to, a_ios, err, val); } else { num_get* ng = new num_get(); std::locale l = std::locale(a_ios.getloc(), ng); a_ios.imbue(l); from = ng->get(from, to, a_ios, err, val); } if(err & std::ios_base::failbit){ typedef typename special_values_parser_type::match_results match_results; match_results mr; if(c == '-' || c == '+') { // was the first character consumed? mr.cache += c; } m_sv_parser.match(from, to, mr); if(mr.current_match == match_results::PARSE_ERROR) { boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + mr.cache + "'")); BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return from); // should never reach } dd = duration_type(static_cast(mr.current_match)); } else { dd = duration_type(val); } return from; } InItrT get(InItrT& from, InItrT& to, std::ios_base& a_ios, period_type& p) const { p = m_period_parser.get_period(from, to, a_ios, p, duration_type::unit(), *this); return from; } InItrT get(InItrT& from, InItrT& to, std::ios_base& a_ios, nth_kday_type& nkd) const { nkd = m_date_gen_parser.get_nth_kday_type(from, to, a_ios, *this); return from; } InItrT get(InItrT& from, InItrT& to, std::ios_base& a_ios, partial_date_type& pd) const { pd = m_date_gen_parser.get_partial_date_type(from, to, a_ios, *this); return from; } InItrT get(InItrT& from, InItrT& to, std::ios_base& a_ios, first_kday_type& fkd) const { fkd = m_date_gen_parser.get_first_kday_type(from, to, a_ios, *this); return from; } InItrT get(InItrT& from, InItrT& to, std::ios_base& a_ios, last_kday_type& lkd) const { lkd = m_date_gen_parser.get_last_kday_type(from, to, a_ios, *this); return from; } InItrT get(InItrT& from, InItrT& to, std::ios_base& a_ios, kday_before_type& fkb) const { fkb = m_date_gen_parser.get_kday_before_type(from, to, a_ios, *this); return from; } InItrT get(InItrT& from, InItrT& to, std::ios_base& a_ios, kday_after_type& fka) const { fka = m_date_gen_parser.get_kday_after_type(from, to, a_ios, *this); return from; } protected: string_type m_format; string_type m_month_format; string_type m_weekday_format; string_type m_year_format; format_date_parser_type m_parser; date_gen_parser_type m_date_gen_parser; period_parser_type m_period_parser; special_values_parser_type m_sv_parser; private: }; template std::locale::id date_input_facet::id; template const typename date_input_facet::char_type date_input_facet::long_weekday_format[3] = {'%','A'}; template const typename date_input_facet::char_type date_input_facet::short_weekday_format[3] = {'%','a'}; template const typename date_input_facet::char_type date_input_facet::long_month_format[3] = {'%','B'}; template const typename date_input_facet::char_type date_input_facet::short_month_format[3] = {'%','b'}; template const typename date_input_facet::char_type date_input_facet::four_digit_year_format[3] = {'%','Y'}; template const typename date_input_facet::char_type date_input_facet::two_digit_year_format[3] = {'%','y'}; template const typename date_input_facet::char_type date_input_facet::default_period_separator[4] = { ' ', '/', ' '}; template const typename date_input_facet::char_type date_input_facet::standard_format_specifier[3] = {'%', 'x' }; template const typename date_input_facet::char_type date_input_facet::iso_format_specifier[7] = {'%', 'Y', '%', 'm', '%', 'd' }; template const typename date_input_facet::char_type date_input_facet::iso_format_extended_specifier[9] = {'%', 'Y', '-', '%', 'm', '-', '%', 'd' }; template const typename date_input_facet::char_type date_input_facet::default_date_format[9] = {'%','Y','-','%','b','-','%','d'}; } } // namespaces #endif passenger-4.0.37/ext/boost/date_time/date_format_simple.hpp000644 000765 000024 00000006147 12233035540 024454 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_SIMPLE_FORMAT_HPP___ #define DATE_TIME_SIMPLE_FORMAT_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/parse_format_base.hpp" namespace boost { namespace date_time { //! Class to provide simple basic formatting rules template class simple_format { public: //! String used printed is date is invalid static const charT* not_a_date() { return "not-a-date-time"; } //! String used to for positive infinity value static const charT* pos_infinity() { return "+infinity"; } //! String used to for positive infinity value static const charT* neg_infinity() { return "-infinity"; } //! Describe month format static month_format_spec month_format() { return month_as_short_string; } static ymd_order_spec date_order() { return ymd_order_iso; //YYYY-MM-DD } //! This format uses '-' to separate date elements static bool has_date_sep_chars() { return true; } //! Char to sep? static charT year_sep_char() { return '-'; } //! char between year-month static charT month_sep_char() { return '-'; } //! Char to separate month-day static charT day_sep_char() { return '-'; } //! char between date-hours static charT hour_sep_char() { return ' '; } //! char between hour and minute static charT minute_sep_char() { return ':'; } //! char for second static charT second_sep_char() { return ':'; } }; #ifndef BOOST_NO_STD_WSTRING //! Specialization of formmating rules for wchar_t template<> class simple_format { public: //! String used printed is date is invalid static const wchar_t* not_a_date() { return L"not-a-date-time"; } //! String used to for positive infinity value static const wchar_t* pos_infinity() { return L"+infinity"; } //! String used to for positive infinity value static const wchar_t* neg_infinity() { return L"-infinity"; } //! Describe month format static month_format_spec month_format() { return month_as_short_string; } static ymd_order_spec date_order() { return ymd_order_iso; //YYYY-MM-DD } //! This format uses '-' to separate date elements static bool has_date_sep_chars() { return true; } //! Char to sep? static wchar_t year_sep_char() { return '-'; } //! char between year-month static wchar_t month_sep_char() { return '-'; } //! Char to separate month-day static wchar_t day_sep_char() { return '-'; } //! char between date-hours static wchar_t hour_sep_char() { return ' '; } //! char between hour and minute static wchar_t minute_sep_char() { return ':'; } //! char for second static wchar_t second_sep_char() { return ':'; } }; #endif // BOOST_NO_STD_WSTRING } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/date_formatting.hpp000644 000765 000024 00000010103 12233035540 023750 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_DATE_FORMATTING_HPP___ #define DATE_TIME_DATE_FORMATTING_HPP___ /* Copyright (c) 2002-2004 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-30 16:25:22 -0700 (Sun, 30 Sep 2012) $ */ #include "boost/date_time/iso_format.hpp" #include "boost/date_time/compiler_config.hpp" #include #include #include /* NOTE: "formatter" code for older compilers, ones that define * BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS, is located in * date_formatting_limited.hpp */ namespace boost { namespace date_time { //! Formats a month as as string into an ostream template class month_formatter { typedef std::basic_ostream ostream_type; public: //! Formats a month as as string into an ostream /*! This function demands that month_type provide * functions for converting to short and long strings * if that capability is used. */ static ostream_type& format_month(const month_type& month, ostream_type &os) { switch (format_type::month_format()) { case month_as_short_string: { os << month.as_short_string(); break; } case month_as_long_string: { os << month.as_long_string(); break; } case month_as_integer: { os << std::setw(2) << std::setfill(os.widen('0')) << month.as_number(); break; } default: break; } return os; } // format_month }; //! Convert ymd to a standard string formatting policies template class ymd_formatter { public: //! Convert ymd to a standard string formatting policies /*! This is standard code for handling date formatting with * year-month-day based date information. This function * uses the format_type to control whether the string will * contain separator characters, and if so what the character * will be. In addtion, it can format the month as either * an integer or a string as controled by the formatting * policy */ static std::basic_string ymd_to_string(ymd_type ymd) { typedef typename ymd_type::month_type month_type; std::basic_ostringstream ss; // Temporarily switch to classic locale to prevent possible formatting // of year with comma or other character (for example 2,008). ss.imbue(std::locale::classic()); ss << ymd.year; ss.imbue(std::locale()); if (format_type::has_date_sep_chars()) { ss << format_type::month_sep_char(); } //this name is a bit ugly, oh well.... month_formatter::format_month(ymd.month, ss); if (format_type::has_date_sep_chars()) { ss << format_type::day_sep_char(); } ss << std::setw(2) << std::setfill(ss.widen('0')) << ymd.day; return ss.str(); } }; //! Convert a date to string using format policies template class date_formatter { public: typedef std::basic_string string_type; //! Convert to a date to standard string using format policies static string_type date_to_string(date_type d) { typedef typename date_type::ymd_type ymd_type; if (d.is_not_a_date()) { return string_type(format_type::not_a_date()); } if (d.is_neg_infinity()) { return string_type(format_type::neg_infinity()); } if (d.is_pos_infinity()) { return string_type(format_type::pos_infinity()); } ymd_type ymd = d.year_month_day(); return ymd_formatter::ymd_to_string(ymd); } }; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/date_formatting_limited.hpp000644 000765 000024 00000006664 12233035540 025500 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_DATE_FORMATTING_LIMITED_HPP___ #define DATE_TIME_DATE_FORMATTING_LIMITED_HPP___ /* Copyright (c) 2002-2004 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/iso_format.hpp" #include "boost/date_time/compiler_config.hpp" #include #include #include namespace boost { namespace date_time { //! Formats a month as as string into an ostream template class month_formatter { public: //! Formats a month as as string into an ostream /*! This function demands that month_type provide * functions for converting to short and long strings * if that capability is used. */ static std::ostream& format_month(const month_type& month, std::ostream& os) { switch (format_type::month_format()) { case month_as_short_string: { os << month.as_short_string(); break; } case month_as_long_string: { os << month.as_long_string(); break; } case month_as_integer: { os << std::setw(2) << std::setfill('0') << month.as_number(); break; } } return os; } // format_month }; //! Convert ymd to a standard string formatting policies template class ymd_formatter { public: //! Convert ymd to a standard string formatting policies /*! This is standard code for handling date formatting with * year-month-day based date information. This function * uses the format_type to control whether the string will * contain separator characters, and if so what the character * will be. In addtion, it can format the month as either * an integer or a string as controled by the formatting * policy */ static std::string ymd_to_string(ymd_type ymd) { typedef typename ymd_type::month_type month_type; std::ostringstream ss; ss << ymd.year; if (format_type::has_date_sep_chars()) { ss << format_type::month_sep_char(); } //this name is a bit ugly, oh well.... month_formatter::format_month(ymd.month, ss); if (format_type::has_date_sep_chars()) { ss << format_type::day_sep_char(); } ss << std::setw(2) << std::setfill('0') << ymd.day; return ss.str(); } }; //! Convert a date to string using format policies template class date_formatter { public: //! Convert to a date to standard string using format policies static std::string date_to_string(date_type d) { typedef typename date_type::ymd_type ymd_type; if (d.is_not_a_date()) { return format_type::not_a_date(); } if (d.is_neg_infinity()) { return format_type::neg_infinity(); } if (d.is_pos_infinity()) { return format_type::pos_infinity(); } ymd_type ymd = d.year_month_day(); return ymd_formatter::ymd_to_string(ymd); } }; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/date_formatting_locales.hpp000644 000765 000024 00000015047 12233035540 025466 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_DATE_FORMATTING_LOCALES_HPP___ #define DATE_TIME_DATE_FORMATTING_LOCALES_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/locale_config.hpp" // set BOOST_DATE_TIME_NO_LOCALE #ifndef BOOST_DATE_TIME_NO_LOCALE #include "boost/date_time/iso_format.hpp" #include "boost/date_time/date_names_put.hpp" #include "boost/date_time/parse_format_base.hpp" //#include #include #include namespace boost { namespace date_time { //! Formats a month as as string into an ostream template class ostream_month_formatter { public: typedef typename facet_type::month_type month_type; typedef std::basic_ostream ostream_type; //! Formats a month as as string into an output iterator static void format_month(const month_type& month, ostream_type& os, const facet_type& f) { switch (f.month_format()) { case month_as_short_string: { std::ostreambuf_iterator oitr(os); f.put_month_short(oitr, month.as_enum()); break; } case month_as_long_string: { std::ostreambuf_iterator oitr(os); f.put_month_long(oitr, month.as_enum()); break; } case month_as_integer: { charT fill_char = '0'; os << std::setw(2) << std::setfill(fill_char) << month.as_number(); break; } } } // format_month }; //! Formats a weekday template class ostream_weekday_formatter { public: typedef typename facet_type::month_type month_type; typedef std::basic_ostream ostream_type; //! Formats a month as as string into an output iterator static void format_weekday(const weekday_type& wd, ostream_type& os, const facet_type& f, bool as_long_string) { std::ostreambuf_iterator oitr(os); if (as_long_string) { f.put_weekday_long(oitr, wd.as_enum()); } else { f.put_weekday_short(oitr, wd.as_enum()); } } // format_weekday }; //! Convert ymd to a standard string formatting policies template class ostream_ymd_formatter { public: typedef typename ymd_type::month_type month_type; typedef ostream_month_formatter month_formatter_type; typedef std::basic_ostream ostream_type; typedef std::basic_string foo_type; //! Convert ymd to a standard string formatting policies /*! This is standard code for handling date formatting with * year-month-day based date information. This function * uses the format_type to control whether the string will * contain separator characters, and if so what the character * will be. In addtion, it can format the month as either * an integer or a string as controled by the formatting * policy */ // static string_type ymd_to_string(ymd_type ymd) // { // std::ostringstream ss; // facet_type dnp; // ymd_put(ymd, ss, dnp); // return ss.str(); // } // Put ymd to ostream -- part of ostream refactor static void ymd_put(ymd_type ymd, ostream_type& os, const facet_type& f) { std::ostreambuf_iterator oitr(os); charT fill_char = '0'; switch (f.date_order()) { case ymd_order_iso: { os << ymd.year; if (f.has_date_sep_chars()) { f.month_sep_char(oitr); } month_formatter_type::format_month(ymd.month, os, f); if (f.has_date_sep_chars()) { f.day_sep_char(oitr); } os << std::setw(2) << std::setfill(fill_char) << ymd.day; break; } case ymd_order_us: { month_formatter_type::format_month(ymd.month, os, f); if (f.has_date_sep_chars()) { f.day_sep_char(oitr); } os << std::setw(2) << std::setfill(fill_char) << ymd.day; if (f.has_date_sep_chars()) { f.month_sep_char(oitr); } os << ymd.year; break; } case ymd_order_dmy: { os << std::setw(2) << std::setfill(fill_char) << ymd.day; if (f.has_date_sep_chars()) { f.day_sep_char(oitr); } month_formatter_type::format_month(ymd.month, os, f); if (f.has_date_sep_chars()) { f.month_sep_char(oitr); } os << ymd.year; break; } } } }; //! Convert a date to string using format policies template class ostream_date_formatter { public: typedef std::basic_ostream ostream_type; typedef typename date_type::ymd_type ymd_type; //! Put date into an ostream static void date_put(const date_type& d, ostream_type& os, const facet_type& f) { special_values sv = d.as_special(); if (sv == not_special) { ymd_type ymd = d.year_month_day(); ostream_ymd_formatter::ymd_put(ymd, os, f); } else { // output a special value std::ostreambuf_iterator coi(os); f.put_special_value(coi, sv); } } //! Put date into an ostream static void date_put(const date_type& d, ostream_type& os) { //retrieve the local from the ostream std::locale locale = os.getloc(); if (std::has_facet(locale)) { const facet_type& f = std::use_facet(locale); date_put(d, os, f); } else { //default to something sensible if no facet installed facet_type default_facet; date_put(d, os, default_facet); } } // date_to_ostream }; //class date_formatter } } //namespace date_time #endif #endif passenger-4.0.37/ext/boost/date_time/date_generator_formatter.hpp000644 000765 000024 00000026762 12233035540 025671 0ustar00honglistaff000000 000000 #ifndef _DATE_TIME_DATE_GENERATOR_FORMATTER__HPP___ #define _DATE_TIME_DATE_GENERATOR_FORMATTER__HPP___ /* Copyright (c) 2004 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-13 11:05:31 -0800 (Thu, 13 Nov 2008) $ */ #include #include #include #include #include "boost/date_time/date_generators.hpp" namespace boost { namespace date_time { //! Formats date_generators for output /*! Formatting of date_generators follows specific orders for the * various types of date_generators. * - partial_date => "dd Month" * - nth_day_of_the_week_in_month => "nth weekday of month" * - first_day_of_the_week_in_month => "first weekday of month" * - last_day_of_the_week_in_month => "last weekday of month" * - first_day_of_the_week_after => "weekday after" * - first_day_of_the_week_before => "weekday before" * While the order of the elements in these phrases cannot be changed, * the elements themselves can be. Weekday and Month get their formats * and names from the date_facet. The remaining elements are stored in * the date_generator_formatter and can be customized upon construction * or via a member function. The default elements are those shown in the * examples above. */ template > > class date_generator_formatter { public: typedef partial_date partial_date_type; typedef nth_kday_of_month nth_kday_type; typedef first_kday_of_month first_kday_type; typedef last_kday_of_month last_kday_type; typedef first_kday_after kday_after_type; typedef first_kday_before kday_before_type; typedef CharT char_type; typedef std::basic_string string_type; typedef std::vector collection_type; static const char_type first_string[6]; static const char_type second_string[7]; static const char_type third_string[6]; static const char_type fourth_string[7]; static const char_type fifth_string[6]; static const char_type last_string[5]; static const char_type before_string[8]; static const char_type after_string[6]; static const char_type of_string[3]; enum phrase_elements {first=0, second, third, fourth, fifth, last, before, after, of, number_of_phrase_elements}; //! Default format elements used date_generator_formatter() { phrase_strings.reserve(number_of_phrase_elements); phrase_strings.push_back(string_type(first_string)); phrase_strings.push_back(string_type(second_string)); phrase_strings.push_back(string_type(third_string)); phrase_strings.push_back(string_type(fourth_string)); phrase_strings.push_back(string_type(fifth_string)); phrase_strings.push_back(string_type(last_string)); phrase_strings.push_back(string_type(before_string)); phrase_strings.push_back(string_type(after_string)); phrase_strings.push_back(string_type(of_string)); } //! Constructor that allows for a custom set of phrase elements date_generator_formatter(const string_type& first_str, const string_type& second_str, const string_type& third_str, const string_type& fourth_str, const string_type& fifth_str, const string_type& last_str, const string_type& before_str, const string_type& after_str, const string_type& of_str) { phrase_strings.reserve(number_of_phrase_elements); phrase_strings.push_back(first_str); phrase_strings.push_back(second_str); phrase_strings.push_back(third_str); phrase_strings.push_back(fourth_str); phrase_strings.push_back(fifth_str); phrase_strings.push_back(last_str); phrase_strings.push_back(before_str); phrase_strings.push_back(after_str); phrase_strings.push_back(of_str); } //! Replace the set of phrase elements with those contained in new_strings /*! The order of the strings in the given collection is important. * They must follow: * - first, second, third, fourth, fifth, last, before, after, of. * * It is not necessary to send in a complete set if only a few * elements are to be replaced as long as the correct beg_pos is used. * * Ex: To keep the default first through fifth elements, but replace * the rest with a collection of: * - "final", "prior", "following", "in". * The beg_pos of date_generator_formatter::last would be used. */ void elements(const collection_type& new_strings, phrase_elements beg_pos=first) { if(beg_pos < number_of_phrase_elements) { typename collection_type::iterator itr = phrase_strings.begin(); itr += beg_pos; std::copy(new_strings.begin(), new_strings.end(), itr); //phrase_strings.begin()); } } //!Put a partial_date => "dd Month" template OutItrT put_partial_date(OutItrT next, std::ios_base& a_ios, CharT a_fill, const partial_date_type& pd, const facet_type& facet) const { facet.put(next, a_ios, a_fill, pd.day()); next = a_fill; //TODO change this ??? facet.put(next, a_ios, a_fill, pd.month()); return next; } //! Put an nth_day_of_the_week_in_month => "nth weekday of month" template OutItrT put_nth_kday(OutItrT next, std::ios_base& a_ios, CharT a_fill, const nth_kday_type& nkd, const facet_type& facet) const { put_string(next, phrase_strings[nkd.nth_week() -1]); next = a_fill; //TODO change this ??? facet.put(next, a_ios, a_fill, nkd.day_of_week()); next = a_fill; //TODO change this ??? put_string(next, string_type(of_string)); next = a_fill; //TODO change this ??? facet.put(next, a_ios, a_fill, nkd.month()); return next; } //! Put a first_day_of_the_week_in_month => "first weekday of month" template OutItrT put_first_kday(OutItrT next, std::ios_base& a_ios, CharT a_fill, const first_kday_type& fkd, const facet_type& facet) const { put_string(next, phrase_strings[first]); next = a_fill; //TODO change this ??? facet.put(next, a_ios, a_fill, fkd.day_of_week()); next = a_fill; //TODO change this ??? put_string(next, string_type(of_string)); next = a_fill; //TODO change this ??? facet.put(next, a_ios, a_fill, fkd.month()); return next; } //! Put a last_day_of_the_week_in_month => "last weekday of month" template OutItrT put_last_kday(OutItrT next, std::ios_base& a_ios, CharT a_fill, const last_kday_type& lkd, const facet_type& facet) const { put_string(next, phrase_strings[last]); next = a_fill; //TODO change this ??? facet.put(next, a_ios, a_fill, lkd.day_of_week()); next = a_fill; //TODO change this ??? put_string(next, string_type(of_string)); next = a_fill; //TODO change this ??? facet.put(next, a_ios, a_fill, lkd.month()); return next; } //! Put a first_day_of_the_week_before => "weekday before" template OutItrT put_kday_before(OutItrT next, std::ios_base& a_ios, CharT a_fill, const kday_before_type& fkb, const facet_type& facet) const { facet.put(next, a_ios, a_fill, fkb.day_of_week()); next = a_fill; //TODO change this ??? put_string(next, phrase_strings[before]); return next; } //! Put a first_day_of_the_week_after => "weekday after" template OutItrT put_kday_after(OutItrT next, std::ios_base& a_ios, CharT a_fill, const kday_after_type& fka, const facet_type& facet) const { facet.put(next, a_ios, a_fill, fka.day_of_week()); next = a_fill; //TODO change this ??? put_string(next, phrase_strings[after]); return next; } private: collection_type phrase_strings; //! helper function to put the various member string into stream OutItrT put_string(OutItrT next, const string_type& str) const { typename string_type::const_iterator itr = str.begin(); while(itr != str.end()) { *next = *itr; ++itr; ++next; } return next; } }; template const typename date_generator_formatter::char_type date_generator_formatter::first_string[6] = {'f','i','r','s','t'}; template const typename date_generator_formatter::char_type date_generator_formatter::second_string[7] = {'s','e','c','o','n','d'}; template const typename date_generator_formatter::char_type date_generator_formatter::third_string[6] = {'t','h','i','r','d'}; template const typename date_generator_formatter::char_type date_generator_formatter::fourth_string[7] = {'f','o','u','r','t','h'}; template const typename date_generator_formatter::char_type date_generator_formatter::fifth_string[6] = {'f','i','f','t','h'}; template const typename date_generator_formatter::char_type date_generator_formatter::last_string[5] = {'l','a','s','t'}; template const typename date_generator_formatter::char_type date_generator_formatter::before_string[8] = {'b','e','f','o','r','e'}; template const typename date_generator_formatter::char_type date_generator_formatter::after_string[6] = {'a','f','t','e','r'}; template const typename date_generator_formatter::char_type date_generator_formatter::of_string[3] = {'o','f'}; } } // namespaces #endif // _DATE_TIME_DATE_GENERATOR_FORMATTER__HPP___ passenger-4.0.37/ext/boost/date_time/date_generator_parser.hpp000644 000765 000024 00000031467 12233035540 025160 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_DATE_GENERATOR_PARSER_HPP__ #define DATE_TIME_DATE_GENERATOR_PARSER_HPP__ /* Copyright (c) 2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $ */ #include #include #include // istreambuf_iterator #include #include #include #include #include namespace boost { namespace date_time { //! Class for date_generator parsing /*! The elements of a date_generator "phrase" are parsed from the input stream in a * particular order. All elements are required and the order in which they appear * cannot change, however, the elements themselves can be changed. The default * elements and their order are as follows: * * - partial_date => "dd Month" * - nth_day_of_the_week_in_month => "nth weekday of month" * - first_day_of_the_week_in_month => "first weekday of month" * - last_day_of_the_week_in_month => "last weekday of month" * - first_day_of_the_week_after => "weekday after" * - first_day_of_the_week_before => "weekday before" * * Weekday and Month names and formats are handled via the date_input_facet. * */ template class date_generator_parser { public: typedef std::basic_string string_type; typedef std::istreambuf_iterator stream_itr_type; typedef typename date_type::month_type month_type; typedef typename date_type::day_of_week_type day_of_week_type; typedef typename date_type::day_type day_type; typedef string_parse_tree parse_tree_type; typedef typename parse_tree_type::parse_match_result_type match_results; typedef std::vector > collection_type; typedef partial_date partial_date_type; typedef nth_kday_of_month nth_kday_type; typedef first_kday_of_month first_kday_type; typedef last_kday_of_month last_kday_type; typedef first_kday_after kday_after_type; typedef first_kday_before kday_before_type; typedef charT char_type; static const char_type first_string[6]; static const char_type second_string[7]; static const char_type third_string[6]; static const char_type fourth_string[7]; static const char_type fifth_string[6]; static const char_type last_string[5]; static const char_type before_string[8]; static const char_type after_string[6]; static const char_type of_string[3]; enum phrase_elements {first=0, second, third, fourth, fifth, last, before, after, of, number_of_phrase_elements}; //! Creates a date_generator_parser with the default set of "element_strings" date_generator_parser() { element_strings(string_type(first_string), string_type(second_string), string_type(third_string), string_type(fourth_string), string_type(fifth_string), string_type(last_string), string_type(before_string), string_type(after_string), string_type(of_string)); } //! Creates a date_generator_parser using a user defined set of element strings date_generator_parser(const string_type& first_str, const string_type& second_str, const string_type& third_str, const string_type& fourth_str, const string_type& fifth_str, const string_type& last_str, const string_type& before_str, const string_type& after_str, const string_type& of_str) { element_strings(first_str, second_str, third_str, fourth_str, fifth_str, last_str, before_str, after_str, of_str); } //! Replace strings that determine nth week for generator void element_strings(const string_type& first_str, const string_type& second_str, const string_type& third_str, const string_type& fourth_str, const string_type& fifth_str, const string_type& last_str, const string_type& before_str, const string_type& after_str, const string_type& of_str) { collection_type phrases; phrases.push_back(first_str); phrases.push_back(second_str); phrases.push_back(third_str); phrases.push_back(fourth_str); phrases.push_back(fifth_str); phrases.push_back(last_str); phrases.push_back(before_str); phrases.push_back(after_str); phrases.push_back(of_str); m_element_strings = parse_tree_type(phrases, this->first); // enum first } void element_strings(const collection_type& col) { m_element_strings = parse_tree_type(col, this->first); // enum first } //! returns partial_date parsed from stream template partial_date_type get_partial_date_type(stream_itr_type& sitr, stream_itr_type& stream_end, std::ios_base& a_ios, const facet_type& facet) const { // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } day_type d(1); month_type m(1); facet.get(sitr, stream_end, a_ios, d); facet.get(sitr, stream_end, a_ios, m); return partial_date_type(d,m); } //! returns nth_kday_of_week parsed from stream template nth_kday_type get_nth_kday_type(stream_itr_type& sitr, stream_itr_type& stream_end, std::ios_base& a_ios, const facet_type& facet) const { // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } typename nth_kday_type::week_num wn; day_of_week_type wd(0); // no default constructor month_type m(1); // no default constructor match_results mr = m_element_strings.match(sitr, stream_end); switch(mr.current_match) { case first : { wn = nth_kday_type::first; break; } case second : { wn = nth_kday_type::second; break; } case third : { wn = nth_kday_type::third; break; } case fourth : { wn = nth_kday_type::fourth; break; } case fifth : { wn = nth_kday_type::fifth; break; } default: { boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + mr.cache + "'")); BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(wn = nth_kday_type::first); } } // week num facet.get(sitr, stream_end, a_ios, wd); // day_of_week extract_element(sitr, stream_end, of); // "of" element facet.get(sitr, stream_end, a_ios, m); // month return nth_kday_type(wn, wd, m); } //! returns first_kday_of_week parsed from stream template first_kday_type get_first_kday_type(stream_itr_type& sitr, stream_itr_type& stream_end, std::ios_base& a_ios, const facet_type& facet) const { // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } day_of_week_type wd(0); // no default constructor month_type m(1); // no default constructor extract_element(sitr, stream_end, first); // "first" element facet.get(sitr, stream_end, a_ios, wd); // day_of_week extract_element(sitr, stream_end, of); // "of" element facet.get(sitr, stream_end, a_ios, m); // month return first_kday_type(wd, m); } //! returns last_kday_of_week parsed from stream template last_kday_type get_last_kday_type(stream_itr_type& sitr, stream_itr_type& stream_end, std::ios_base& a_ios, const facet_type& facet) const { // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } day_of_week_type wd(0); // no default constructor month_type m(1); // no default constructor extract_element(sitr, stream_end, last); // "last" element facet.get(sitr, stream_end, a_ios, wd); // day_of_week extract_element(sitr, stream_end, of); // "of" element facet.get(sitr, stream_end, a_ios, m); // month return last_kday_type(wd, m); } //! returns first_kday_of_week parsed from stream template kday_before_type get_kday_before_type(stream_itr_type& sitr, stream_itr_type& stream_end, std::ios_base& a_ios, const facet_type& facet) const { // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } day_of_week_type wd(0); // no default constructor facet.get(sitr, stream_end, a_ios, wd); // day_of_week extract_element(sitr, stream_end, before);// "before" element return kday_before_type(wd); } //! returns first_kday_of_week parsed from stream template kday_after_type get_kday_after_type(stream_itr_type& sitr, stream_itr_type& stream_end, std::ios_base& a_ios, const facet_type& facet) const { // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } day_of_week_type wd(0); // no default constructor facet.get(sitr, stream_end, a_ios, wd); // day_of_week extract_element(sitr, stream_end, after); // "after" element return kday_after_type(wd); } private: parse_tree_type m_element_strings; //! Extracts phrase element from input. Throws ios_base::failure on error. void extract_element(stream_itr_type& sitr, stream_itr_type& stream_end, typename date_generator_parser::phrase_elements ele) const { // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } match_results mr = m_element_strings.match(sitr, stream_end); if(mr.current_match != ele) { boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + mr.cache + "'")); } } }; template const typename date_generator_parser::char_type date_generator_parser::first_string[6] = {'f','i','r','s','t'}; template const typename date_generator_parser::char_type date_generator_parser::second_string[7] = {'s','e','c','o','n','d'}; template const typename date_generator_parser::char_type date_generator_parser::third_string[6] = {'t','h','i','r','d'}; template const typename date_generator_parser::char_type date_generator_parser::fourth_string[7] = {'f','o','u','r','t','h'}; template const typename date_generator_parser::char_type date_generator_parser::fifth_string[6] = {'f','i','f','t','h'}; template const typename date_generator_parser::char_type date_generator_parser::last_string[5] = {'l','a','s','t'}; template const typename date_generator_parser::char_type date_generator_parser::before_string[8] = {'b','e','f','o','r','e'}; template const typename date_generator_parser::char_type date_generator_parser::after_string[6] = {'a','f','t','e','r'}; template const typename date_generator_parser::char_type date_generator_parser::of_string[3] = {'o','f'}; } } //namespace #endif // DATE_TIME_DATE_GENERATOR_PARSER_HPP__ passenger-4.0.37/ext/boost/date_time/date_generators.hpp000644 000765 000024 00000037513 12233035540 023765 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_DATE_GENERATORS_HPP__ #define DATE_TIME_DATE_GENERATORS_HPP__ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $ */ /*! @file date_generators.hpp Definition and implementation of date algorithm templates */ #include #include #include #include #include namespace boost { namespace date_time { //! Base class for all generators that take a year and produce a date. /*! This class is a base class for polymorphic function objects that take a year and produce a concrete date. @param date_type The type representing a date. This type must export a calender_type which defines a year_type. */ template class year_based_generator { public: typedef typename date_type::calendar_type calendar_type; typedef typename calendar_type::year_type year_type; year_based_generator() {} virtual ~year_based_generator() {} virtual date_type get_date(year_type y) const = 0; //! Returns a string for use in a POSIX time_zone string virtual std::string to_string() const =0; }; //! Generates a date by applying the year to the given month and day. /*! Example usage: @code partial_date pd(1, Jan); partial_date pd2(70); date d = pd.get_date(2002); //2002-Jan-01 date d2 = pd2.get_date(2002); //2002-Mar-10 @endcode \ingroup date_alg */ template class partial_date : public year_based_generator { public: typedef typename date_type::calendar_type calendar_type; typedef typename calendar_type::day_type day_type; typedef typename calendar_type::month_type month_type; typedef typename calendar_type::year_type year_type; typedef typename date_type::duration_type duration_type; typedef typename duration_type::duration_rep duration_rep; partial_date(day_type d, month_type m) : day_(d), month_(m) {} //! Partial date created from number of days into year. Range 1-366 /*! Allowable values range from 1 to 366. 1=Jan1, 366=Dec31. If argument * exceeds range, partial_date will be created with closest in-range value. * 60 will always be Feb29, if get_date() is called with a non-leap year * an exception will be thrown */ partial_date(duration_rep days) : day_(1), // default values month_(1) { date_type d1(2000,1,1); if(days > 1) { if(days > 366) // prevents wrapping { days = 366; } days = days - 1; duration_type dd(days); d1 = d1 + dd; } day_ = d1.day(); month_ = d1.month(); } //! Return a concrete date when provided with a year specific year. /*! Will throw an 'invalid_argument' exception if a partial_date object, * instantiated with Feb-29, has get_date called with a non-leap year. * Example: * @code * partial_date pd(29, Feb); * pd.get_date(2003); // throws invalid_argument exception * pg.get_date(2000); // returns 2000-2-29 * @endcode */ date_type get_date(year_type y) const { if((day_ == 29) && (month_ == 2) && !(calendar_type::is_leap_year(y))) { std::ostringstream ss; ss << "No Feb 29th in given year of " << y << "."; boost::throw_exception(std::invalid_argument(ss.str())); } return date_type(y, month_, day_); } date_type operator()(year_type y) const { return get_date(y); //return date_type(y, month_, day_); } bool operator==(const partial_date& rhs) const { return (month_ == rhs.month_) && (day_ == rhs.day_); } bool operator<(const partial_date& rhs) const { if (month_ < rhs.month_) return true; if (month_ > rhs.month_) return false; //months are equal return (day_ < rhs.day_); } // added for streaming purposes month_type month() const { return month_; } day_type day() const { return day_; } //! Returns string suitable for use in POSIX time zone string /*! Returns string formatted with up to 3 digits: * Jan-01 == "0" * Feb-29 == "58" * Dec-31 == "365" */ virtual std::string to_string() const { std::ostringstream ss; date_type d(2004, month_, day_); unsigned short c = d.day_of_year(); c--; // numbered 0-365 while day_of_year is 1 based... ss << c; return ss.str(); } private: day_type day_; month_type month_; }; //! Returns nth arg as string. 1 -> "first", 2 -> "second", max is 5. BOOST_DATE_TIME_DECL const char* nth_as_str(int n); //! Useful generator functor for finding holidays /*! Based on the idea in Cal. Calc. for finding holidays that are * the 'first Monday of September'. When instantiated with * 'fifth' kday of month, the result will be the last kday of month * which can be the fourth or fifth depending on the structure of * the month. * * The algorithm here basically guesses for the first * day of the month. Then finds the first day of the correct * type. That is, if the first of the month is a Tuesday * and it needs Wenesday then we simply increment by a day * and then we can add the length of a week until we get * to the 'nth kday'. There are probably more efficient * algorithms based on using a mod 7, but this one works * reasonably well for basic applications. * \ingroup date_alg */ template class nth_kday_of_month : public year_based_generator { public: typedef typename date_type::calendar_type calendar_type; typedef typename calendar_type::day_of_week_type day_of_week_type; typedef typename calendar_type::month_type month_type; typedef typename calendar_type::year_type year_type; typedef typename date_type::duration_type duration_type; enum week_num {first=1, second, third, fourth, fifth}; nth_kday_of_month(week_num week_no, day_of_week_type dow, month_type m) : month_(m), wn_(week_no), dow_(dow) {} //! Return a concrete date when provided with a year specific year. date_type get_date(year_type y) const { date_type d(y, month_, 1); //first day of month duration_type one_day(1); duration_type one_week(7); while (dow_ != d.day_of_week()) { d = d + one_day; } int week = 1; while (week < wn_) { d = d + one_week; week++; } // remove wrapping to next month behavior if(d.month() != month_) { d = d - one_week; } return d; } // added for streaming month_type month() const { return month_; } week_num nth_week() const { return wn_; } day_of_week_type day_of_week() const { return dow_; } const char* nth_week_as_str() const { return nth_as_str(wn_); } //! Returns string suitable for use in POSIX time zone string /*! Returns a string formatted as "M4.3.0" ==> 3rd Sunday in April. */ virtual std::string to_string() const { std::ostringstream ss; ss << 'M' << static_cast(month_) << '.' << static_cast(wn_) << '.' << static_cast(dow_); return ss.str(); } private: month_type month_; week_num wn_; day_of_week_type dow_; }; //! Useful generator functor for finding holidays and daylight savings /*! Similar to nth_kday_of_month, but requires less paramters * \ingroup date_alg */ template class first_kday_of_month : public year_based_generator { public: typedef typename date_type::calendar_type calendar_type; typedef typename calendar_type::day_of_week_type day_of_week_type; typedef typename calendar_type::month_type month_type; typedef typename calendar_type::year_type year_type; typedef typename date_type::duration_type duration_type; //!Specify the first 'Sunday' in 'April' spec /*!@param dow The day of week, eg: Sunday, Monday, etc * @param m The month of the year, eg: Jan, Feb, Mar, etc */ first_kday_of_month(day_of_week_type dow, month_type m) : month_(m), dow_(dow) {} //! Return a concrete date when provided with a year specific year. date_type get_date(year_type year) const { date_type d(year, month_,1); duration_type one_day(1); while (dow_ != d.day_of_week()) { d = d + one_day; } return d; } // added for streaming month_type month() const { return month_; } day_of_week_type day_of_week() const { return dow_; } //! Returns string suitable for use in POSIX time zone string /*! Returns a string formatted as "M4.1.0" ==> 1st Sunday in April. */ virtual std::string to_string() const { std::ostringstream ss; ss << 'M' << static_cast(month_) << '.' << 1 << '.' << static_cast(dow_); return ss.str(); } private: month_type month_; day_of_week_type dow_; }; //! Calculate something like Last Sunday of January /*! Useful generator functor for finding holidays and daylight savings * Get the last day of the month and then calculate the difference * to the last previous day. * @param date_type A date class that exports day_of_week, month_type, etc. * \ingroup date_alg */ template class last_kday_of_month : public year_based_generator { public: typedef typename date_type::calendar_type calendar_type; typedef typename calendar_type::day_of_week_type day_of_week_type; typedef typename calendar_type::month_type month_type; typedef typename calendar_type::year_type year_type; typedef typename date_type::duration_type duration_type; //!Specify the date spec like last 'Sunday' in 'April' spec /*!@param dow The day of week, eg: Sunday, Monday, etc * @param m The month of the year, eg: Jan, Feb, Mar, etc */ last_kday_of_month(day_of_week_type dow, month_type m) : month_(m), dow_(dow) {} //! Return a concrete date when provided with a year specific year. date_type get_date(year_type year) const { date_type d(year, month_, calendar_type::end_of_month_day(year,month_)); duration_type one_day(1); while (dow_ != d.day_of_week()) { d = d - one_day; } return d; } // added for streaming month_type month() const { return month_; } day_of_week_type day_of_week() const { return dow_; } //! Returns string suitable for use in POSIX time zone string /*! Returns a string formatted as "M4.5.0" ==> last Sunday in April. */ virtual std::string to_string() const { std::ostringstream ss; ss << 'M' << static_cast(month_) << '.' << 5 << '.' << static_cast(dow_); return ss.str(); } private: month_type month_; day_of_week_type dow_; }; //! Calculate something like "First Sunday after Jan 1,2002 /*! Date generator that takes a date and finds kday after *@code typedef boost::date_time::first_kday_after firstkdayafter; firstkdayafter fkaf(Monday); fkaf.get_date(date(2002,Feb,1)); @endcode * \ingroup date_alg */ template class first_kday_after { public: typedef typename date_type::calendar_type calendar_type; typedef typename calendar_type::day_of_week_type day_of_week_type; typedef typename date_type::duration_type duration_type; first_kday_after(day_of_week_type dow) : dow_(dow) {} //! Return next kday given. date_type get_date(date_type start_day) const { duration_type one_day(1); date_type d = start_day + one_day; while (dow_ != d.day_of_week()) { d = d + one_day; } return d; } // added for streaming day_of_week_type day_of_week() const { return dow_; } private: day_of_week_type dow_; }; //! Calculate something like "First Sunday before Jan 1,2002 /*! Date generator that takes a date and finds kday after *@code typedef boost::date_time::first_kday_before firstkdaybefore; firstkdaybefore fkbf(Monday); fkbf.get_date(date(2002,Feb,1)); @endcode * \ingroup date_alg */ template class first_kday_before { public: typedef typename date_type::calendar_type calendar_type; typedef typename calendar_type::day_of_week_type day_of_week_type; typedef typename date_type::duration_type duration_type; first_kday_before(day_of_week_type dow) : dow_(dow) {} //! Return next kday given. date_type get_date(date_type start_day) const { duration_type one_day(1); date_type d = start_day - one_day; while (dow_ != d.day_of_week()) { d = d - one_day; } return d; } // added for streaming day_of_week_type day_of_week() const { return dow_; } private: day_of_week_type dow_; }; //! Calculates the number of days until the next weekday /*! Calculates the number of days until the next weekday. * If the date given falls on a Sunday and the given weekday * is Tuesday the result will be 2 days */ template inline typename date_type::duration_type days_until_weekday(const date_type& d, const weekday_type& wd) { typedef typename date_type::duration_type duration_type; duration_type wks(0); duration_type dd(wd.as_number() - d.day_of_week().as_number()); if(dd.is_negative()){ wks = duration_type(7); } return dd + wks; } //! Calculates the number of days since the previous weekday /*! Calculates the number of days since the previous weekday * If the date given falls on a Sunday and the given weekday * is Tuesday the result will be 5 days. The answer will be a positive * number because Tuesday is 5 days before Sunday, not -5 days before. */ template inline typename date_type::duration_type days_before_weekday(const date_type& d, const weekday_type& wd) { typedef typename date_type::duration_type duration_type; duration_type wks(0); duration_type dd(wd.as_number() - d.day_of_week().as_number()); if(dd.days() > 0){ wks = duration_type(7); } // we want a number of days, not an offset. The value returned must // be zero or larger. return (-dd + wks); } //! Generates a date object representing the date of the following weekday from the given date /*! Generates a date object representing the date of the following * weekday from the given date. If the date given is 2004-May-9 * (a Sunday) and the given weekday is Tuesday then the resulting date * will be 2004-May-11. */ template inline date_type next_weekday(const date_type& d, const weekday_type& wd) { return d + days_until_weekday(d, wd); } //! Generates a date object representing the date of the previous weekday from the given date /*! Generates a date object representing the date of the previous * weekday from the given date. If the date given is 2004-May-9 * (a Sunday) and the given weekday is Tuesday then the resulting date * will be 2004-May-4. */ template inline date_type previous_weekday(const date_type& d, const weekday_type& wd) { return d - days_before_weekday(d, wd); } } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/date_iterator.hpp000644 000765 000024 00000006430 12233035540 023437 0ustar00honglistaff000000 000000 #ifndef DATE_ITERATOR_HPP___ #define DATE_ITERATOR_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $ */ #include namespace boost { namespace date_time { //! An iterator over dates with varying resolution (day, week, month, year, etc) enum date_resolutions {day, week, months, year, decade, century, NumDateResolutions}; //! Base date iterator type /*! This class provides the skeleton for the creation of iterators. * New and interesting interators can be created by plugging in a new * function that derives the next value from the current state. * generation of various types of -based information. * * Template Parameters * * date_type * * The date_type is a concrete date_type. The date_type must * define a duration_type and a calendar_type. */ template class date_itr_base { // works, but benefit unclear at the moment // class date_itr_base : public std::iterator{ public: typedef typename date_type::duration_type duration_type; typedef date_type value_type; typedef std::input_iterator_tag iterator_category; date_itr_base(date_type d) : current_(d) {} virtual ~date_itr_base() {} date_itr_base& operator++() { current_ = current_ + get_offset(current_); return *this; } date_itr_base& operator--() { current_ = current_ + get_neg_offset(current_); return *this; } virtual duration_type get_offset(const date_type& current) const=0; virtual duration_type get_neg_offset(const date_type& current) const=0; date_type operator*() {return current_;} date_type* operator->() {return ¤t_;} bool operator< (const date_type& d) {return current_ < d;} bool operator<= (const date_type& d) {return current_ <= d;} bool operator> (const date_type& d) {return current_ > d;} bool operator>= (const date_type& d) {return current_ >= d;} bool operator== (const date_type& d) {return current_ == d;} bool operator!= (const date_type& d) {return current_ != d;} private: date_type current_; }; //! Overrides the base date iterator providing hook for functors /* * offset_functor * * The offset functor must define a get_offset function that takes the * current point in time and calculates and offset. * */ template class date_itr : public date_itr_base { public: typedef typename date_type::duration_type duration_type; date_itr(date_type d, int factor=1) : date_itr_base(d), of_(factor) {} private: virtual duration_type get_offset(const date_type& current) const { return of_.get_offset(current); } virtual duration_type get_neg_offset(const date_type& current) const { return of_.get_neg_offset(current); } offset_functor of_; }; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/date_names_put.hpp000644 000765 000024 00000024730 12233035540 023604 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_DATE_NAMES_PUT_HPP___ #define DATE_TIME_DATE_NAMES_PUT_HPP___ /* Copyright (c) 2002-2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $ */ #include "boost/date_time/locale_config.hpp" // set BOOST_DATE_TIME_NO_LOCALE #ifndef BOOST_DATE_TIME_NO_LOCALE #include "boost/date_time/special_defs.hpp" #include "boost/date_time/date_defs.hpp" #include "boost/date_time/parse_format_base.hpp" #include "boost/lexical_cast.hpp" #include namespace boost { namespace date_time { //! Output facet base class for gregorian dates. /*! This class is a base class for date facets used to localize the * names of months and the names of days in the week. * * Requirements of Config * - define an enumeration month_enum that enumerates the months. * The enumeration should be '1' based eg: Jan==1 * - define as_short_string and as_long_string * * (see langer & kreft p334). * */ template > class date_names_put : public std::locale::facet { public: date_names_put() {} typedef OutputIterator iter_type; typedef typename Config::month_type month_type; typedef typename Config::month_enum month_enum; typedef typename Config::weekday_enum weekday_enum; typedef typename Config::special_value_enum special_value_enum; //typedef typename Config::format_type format_type; typedef std::basic_string string_type; typedef charT char_type; static const char_type default_special_value_names[3][17]; static const char_type separator[2]; static std::locale::id id; #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) std::locale::id& __get_id (void) const { return id; } #endif void put_special_value(iter_type& oitr, special_value_enum sv) const { do_put_special_value(oitr, sv); } void put_month_short(iter_type& oitr, month_enum moy) const { do_put_month_short(oitr, moy); } void put_month_long(iter_type& oitr, month_enum moy) const { do_put_month_long(oitr, moy); } void put_weekday_short(iter_type& oitr, weekday_enum wd) const { do_put_weekday_short(oitr, wd); } void put_weekday_long(iter_type& oitr, weekday_enum wd) const { do_put_weekday_long(oitr, wd); } bool has_date_sep_chars() const { return do_has_date_sep_chars(); } void year_sep_char(iter_type& oitr) const { do_year_sep_char(oitr); } //! char between year-month void month_sep_char(iter_type& oitr) const { do_month_sep_char(oitr); } //! Char to separate month-day void day_sep_char(iter_type& oitr) const { do_day_sep_char(oitr); } //! Determines the order to put the date elements ymd_order_spec date_order() const { return do_date_order(); } //! Determines if month is displayed as integer, short or long string month_format_spec month_format() const { return do_month_format(); } protected: //! Default facet implementation uses month_type defaults virtual void do_put_month_short(iter_type& oitr, month_enum moy) const { month_type gm(moy); charT c = '\0'; put_string(oitr, gm.as_short_string(c)); } //! Default facet implementation uses month_type defaults virtual void do_put_month_long(iter_type& oitr, month_enum moy) const { month_type gm(moy); charT c = '\0'; put_string(oitr, gm.as_long_string(c)); } //! Default facet implementation for special value types virtual void do_put_special_value(iter_type& oitr, special_value_enum sv) const { if(sv <= 2) { // only output not_a_date_time, neg_infin, or pos_infin string_type s(default_special_value_names[sv]); put_string(oitr, s); } } virtual void do_put_weekday_short(iter_type&, weekday_enum) const { } virtual void do_put_weekday_long(iter_type&, weekday_enum) const { } virtual bool do_has_date_sep_chars() const { return true; } virtual void do_year_sep_char(iter_type& oitr) const { string_type s(separator); put_string(oitr, s); } //! char between year-month virtual void do_month_sep_char(iter_type& oitr) const { string_type s(separator); put_string(oitr, s); } //! Char to separate month-day virtual void do_day_sep_char(iter_type& oitr) const { string_type s(separator); //put in '-' put_string(oitr, s); } //! Default for date order virtual ymd_order_spec do_date_order() const { return ymd_order_iso; } //! Default month format virtual month_format_spec do_month_format() const { return month_as_short_string; } void put_string(iter_type& oi, const charT* const s) const { string_type s1(boost::lexical_cast(s)); typename string_type::iterator si,end; for (si=s1.begin(), end=s1.end(); si!=end; si++, oi++) { *oi = *si; } } void put_string(iter_type& oi, const string_type& s1) const { typename string_type::const_iterator si,end; for (si=s1.begin(), end=s1.end(); si!=end; si++, oi++) { *oi = *si; } } }; template const typename date_names_put::char_type date_names_put::default_special_value_names[3][17] = { {'n','o','t','-','a','-','d','a','t','e','-','t','i','m','e'}, {'-','i','n','f','i','n','i','t','y'}, {'+','i','n','f','i','n','i','t','y'} }; template const typename date_names_put::char_type date_names_put::separator[2] = {'-', '\0'} ; //! Generate storage location for a std::locale::id template std::locale::id date_names_put::id; //! A date name output facet that takes an array of char* to define strings template > class all_date_names_put : public date_names_put { public: all_date_names_put(const charT* const month_short_names[], const charT* const month_long_names[], const charT* const special_value_names[], const charT* const weekday_short_names[], const charT* const weekday_long_names[], charT separator_char = '-', ymd_order_spec order_spec = ymd_order_iso, month_format_spec month_format = month_as_short_string) : month_short_names_(month_short_names), month_long_names_(month_long_names), special_value_names_(special_value_names), weekday_short_names_(weekday_short_names), weekday_long_names_(weekday_long_names), order_spec_(order_spec), month_format_spec_(month_format) { separator_char_[0] = separator_char; separator_char_[1] = '\0'; } typedef OutputIterator iter_type; typedef typename Config::month_enum month_enum; typedef typename Config::weekday_enum weekday_enum; typedef typename Config::special_value_enum special_value_enum; const charT* const* get_short_month_names() const { return month_short_names_; } const charT* const* get_long_month_names() const { return month_long_names_; } const charT* const* get_special_value_names() const { return special_value_names_; } const charT* const* get_short_weekday_names()const { return weekday_short_names_; } const charT* const* get_long_weekday_names()const { return weekday_long_names_; } protected: //! Generic facet that takes array of chars virtual void do_put_month_short(iter_type& oitr, month_enum moy) const { this->put_string(oitr, month_short_names_[moy-1]); } //! Long month names virtual void do_put_month_long(iter_type& oitr, month_enum moy) const { this->put_string(oitr, month_long_names_[moy-1]); } //! Special values names virtual void do_put_special_value(iter_type& oitr, special_value_enum sv) const { this->put_string(oitr, special_value_names_[sv]); } virtual void do_put_weekday_short(iter_type& oitr, weekday_enum wd) const { this->put_string(oitr, weekday_short_names_[wd]); } virtual void do_put_weekday_long(iter_type& oitr, weekday_enum wd) const { this->put_string(oitr, weekday_long_names_[wd]); } //! char between year-month virtual void do_month_sep_char(iter_type& oitr) const { this->put_string(oitr, separator_char_); } //! Char to separate month-day virtual void do_day_sep_char(iter_type& oitr) const { this->put_string(oitr, separator_char_); } //! Set the date ordering virtual ymd_order_spec do_date_order() const { return order_spec_; } //! Set the date ordering virtual month_format_spec do_month_format() const { return month_format_spec_; } private: const charT* const* month_short_names_; const charT* const* month_long_names_; const charT* const* special_value_names_; const charT* const* weekday_short_names_; const charT* const* weekday_long_names_; charT separator_char_[2]; ymd_order_spec order_spec_; month_format_spec month_format_spec_; }; } } //namespace boost::date_time #endif //BOOST_NO_STD_LOCALE #endif passenger-4.0.37/ext/boost/date_time/date_parsing.hpp000644 000765 000024 00000027245 12233035540 023260 0ustar00honglistaff000000 000000 #ifndef _DATE_TIME_DATE_PARSING_HPP___ #define _DATE_TIME_DATE_PARSING_HPP___ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-30 16:25:22 -0700 (Sun, 30 Sep 2012) $ */ #include #include #include #include #include #include #include #if defined(BOOST_DATE_TIME_NO_LOCALE) #include // ::tolower(int) #else #include // std::tolower(char, locale) #endif namespace boost { namespace date_time { //! A function to replace the std::transform( , , ,tolower) construct /*! This function simply takes a string, and changes all the characters * in that string to lowercase (according to the default system locale). * In the event that a compiler does not support locales, the old * C style tolower() is used. */ inline std::string convert_to_lower(std::string inp) { #if !defined(BOOST_DATE_TIME_NO_LOCALE) const std::locale loc(std::locale::classic()); #endif std::string::size_type i = 0, n = inp.length(); for (; i < n; ++i) { inp[i] = #if defined(BOOST_DATE_TIME_NO_LOCALE) static_cast(std::tolower(inp[i])); #else // tolower and others were brought in to std for borland >= v564 // in compiler_config.hpp std::tolower(inp[i], loc); #endif } return inp; } //! Helper function for parse_date. /* Used by-value parameter because we change the string and may * want to preserve the original argument */ template inline unsigned short month_str_to_ushort(std::string const& s) { if((s.at(0) >= '0') && (s.at(0) <= '9')) { return boost::lexical_cast(s); } else { std::string str = convert_to_lower(s); typename month_type::month_map_ptr_type ptr = month_type::get_month_map_ptr(); typename month_type::month_map_type::iterator iter = ptr->find(str); if(iter != ptr->end()) { // required for STLport return iter->second; } } return 13; // intentionally out of range - name not found } //! Find index of a string in either of 2 arrays /*! find_match searches both arrays for a match to 's'. Both arrays * must contain 'size' elements. The index of the match is returned. * If no match is found, 'size' is returned. * Ex. "Jan" returns 0, "Dec" returns 11, "Tue" returns 2. * 'size' can be sent in with: (greg_month::max)() (which 12), * (greg_weekday::max)() + 1 (which is 7) or date_time::NumSpecialValues */ template short find_match(const charT* const* short_names, const charT* const* long_names, short size, const std::basic_string& s) { for(short i = 0; i < size; ++i){ if(short_names[i] == s || long_names[i] == s){ return i; } } return size; // not-found, return a value out of range } //! Generic function to parse a delimited date (eg: 2002-02-10) /*! Accepted formats are: "2003-02-10" or " 2003-Feb-10" or * "2003-Feburary-10" * The order in which the Month, Day, & Year appear in the argument * string can be accomodated by passing in the appropriate ymd_order_spec */ template date_type parse_date(const std::string& s, int order_spec = ymd_order_iso) { std::string spec_str; if(order_spec == ymd_order_iso) { spec_str = "ymd"; } else if(order_spec == ymd_order_dmy) { spec_str = "dmy"; } else { // (order_spec == ymd_order_us) spec_str = "mdy"; } typedef typename date_type::year_type year_type; typedef typename date_type::month_type month_type; unsigned pos = 0; unsigned short year(0), month(0), day(0); typedef typename std::basic_string::traits_type traits_type; typedef boost::char_separator char_separator_type; typedef boost::tokenizer::const_iterator, std::basic_string > tokenizer; typedef boost::tokenizer::const_iterator, std::basic_string >::iterator tokenizer_iterator; // may need more delimiters, these work for the regression tests const char sep_char[] = {',','-','.',' ','/','\0'}; char_separator_type sep(sep_char); tokenizer tok(s,sep); for(tokenizer_iterator beg=tok.begin(); beg!=tok.end() && pos < spec_str.size(); ++beg, ++pos) { switch(spec_str.at(pos)) { case 'y': { year = boost::lexical_cast(*beg); break; } case 'm': { month = month_str_to_ushort(*beg); break; } case 'd': { day = boost::lexical_cast(*beg); break; } default: break; } //switch } return date_type(year, month, day); } //! Generic function to parse undelimited date (eg: 20020201) template date_type parse_undelimited_date(const std::string& s) { int offsets[] = {4,2,2}; int pos = 0; typedef typename date_type::year_type year_type; //typename date_type::ymd_type ymd((year_type::min)(),1,1); unsigned short y = 0, m = 0, d = 0; /* The two bool arguments state that parsing will not wrap * (only the first 8 characters will be parsed) and partial * strings will not be parsed. * Ex: * "2005121" will parse 2005 & 12, but not the "1" */ boost::offset_separator osf(offsets, offsets+3, false, false); typedef typename boost::tokenizer::const_iterator, std::basic_string > tokenizer_type; tokenizer_type tok(s, osf); for(typename tokenizer_type::iterator ti=tok.begin(); ti!=tok.end();++ti) { unsigned short i = boost::lexical_cast(*ti); switch(pos) { case 0: y = i; break; case 1: m = i; break; case 2: d = i; break; default: break; } pos++; } return date_type(y,m,d); } //! Helper function for 'date gregorian::from_stream()' /*! Creates a string from the iterators that reference the * begining & end of a char[] or string. All elements are * used in output string */ template inline date_type from_stream_type(iterator_type& beg, iterator_type const& end, char) { std::ostringstream ss; while(beg != end) { ss << *beg++; } return parse_date(ss.str()); } //! Helper function for 'date gregorian::from_stream()' /*! Returns the first string found in the stream referenced by the * begining & end iterators */ template inline date_type from_stream_type(iterator_type& beg, iterator_type const& /* end */, std::string const&) { return parse_date(*beg); } /* I believe the wchar stuff would be best elsewhere, perhaps in * parse_date<>()? In the mean time this gets us started... */ //! Helper function for 'date gregorian::from_stream()' /*! Creates a string from the iterators that reference the * begining & end of a wstring. All elements are * used in output string */ template inline date_type from_stream_type(iterator_type& beg, iterator_type const& end, wchar_t) { std::ostringstream ss; #if !defined(BOOST_DATE_TIME_NO_LOCALE) std::locale loc; std::ctype const& fac = std::use_facet >(loc); while(beg != end) { ss << fac.narrow(*beg++, 'X'); // 'X' will cause exception to be thrown } #else while(beg != end) { char c = 'X'; // 'X' will cause exception to be thrown const wchar_t wc = *beg++; if (wc >= 0 && wc <= 127) c = static_cast< char >(wc); ss << c; } #endif return parse_date(ss.str()); } #ifndef BOOST_NO_STD_WSTRING //! Helper function for 'date gregorian::from_stream()' /*! Creates a string from the first wstring found in the stream * referenced by the begining & end iterators */ template inline date_type from_stream_type(iterator_type& beg, iterator_type const& /* end */, std::wstring const&) { std::wstring ws = *beg; std::ostringstream ss; std::wstring::iterator wsb = ws.begin(), wse = ws.end(); #if !defined(BOOST_DATE_TIME_NO_LOCALE) std::locale loc; std::ctype const& fac = std::use_facet >(loc); while(wsb != wse) { ss << fac.narrow(*wsb++, 'X'); // 'X' will cause exception to be thrown } #else while(wsb != wse) { char c = 'X'; // 'X' will cause exception to be thrown const wchar_t wc = *wsb++; if (wc >= 0 && wc <= 127) c = static_cast< char >(wc); ss << c; } #endif return parse_date(ss.str()); } #endif // BOOST_NO_STD_WSTRING #if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) // This function cannot be compiled with MSVC 6.0 due to internal compiler shorcomings #else //! function called by wrapper functions: date_period_from_(w)string() template period from_simple_string_type(const std::basic_string& s){ typedef typename std::basic_string::traits_type traits_type; typedef typename boost::char_separator char_separator; typedef typename boost::tokenizer::const_iterator, std::basic_string > tokenizer; const charT sep_list[4] = {'[','/',']','\0'}; char_separator sep(sep_list); tokenizer tokens(s, sep); typename tokenizer::iterator tok_it = tokens.begin(); std::basic_string date_string = *tok_it; // get 2 string iterators and generate a date from them typename std::basic_string::iterator date_string_start = date_string.begin(), date_string_end = date_string.end(); typedef typename std::iterator_traits::iterator>::value_type value_type; date_type d1 = from_stream_type(date_string_start, date_string_end, value_type()); date_string = *(++tok_it); // next token date_string_start = date_string.begin(), date_string_end = date_string.end(); date_type d2 = from_stream_type(date_string_start, date_string_end, value_type()); return period(d1, d2); } #endif } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/dst_rules.hpp000644 000765 000024 00000036200 12233035540 022613 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_DST_RULES_HPP__ #define DATE_TIME_DST_RULES_HPP__ /* Copyright (c) 2002,2003, 2007 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-30 16:25:22 -0700 (Sun, 30 Sep 2012) $ */ /*! @file dst_rules.hpp Contains template class to provide static dst rule calculations */ #include "boost/date_time/date_generators.hpp" #include "boost/date_time/period.hpp" #include "boost/date_time/date_defs.hpp" #include namespace boost { namespace date_time { enum time_is_dst_result {is_not_in_dst, is_in_dst, ambiguous, invalid_time_label}; //! Dynamic class used to caluclate dst transition information template class dst_calculator { public: typedef time_duration_type_ time_duration_type; typedef date_type_ date_type; //! Check the local time offset when on dst start day /*! On this dst transition, the time label between * the transition boundary and the boudary + the offset * are invalid times. If before the boundary then still * not in dst. *@param time_of_day Time offset in the day for the local time *@param dst_start_offset_minutes Local day offset for start of dst *@param dst_length_minutes Number of minutes to adjust clock forward *@retval status of time label w.r.t. dst */ static time_is_dst_result process_local_dst_start_day(const time_duration_type& time_of_day, unsigned int dst_start_offset_minutes, long dst_length_minutes) { //std::cout << "here" << std::endl; if (time_of_day < time_duration_type(0,dst_start_offset_minutes,0)) { return is_not_in_dst; } long offset = dst_start_offset_minutes + dst_length_minutes; if (time_of_day >= time_duration_type(0,offset,0)) { return is_in_dst; } return invalid_time_label; } //! Check the local time offset when on the last day of dst /*! This is the calculation for the DST end day. On that day times * prior to the conversion time - dst_length (1 am in US) are still * in dst. Times between the above and the switch time are * ambiguous. Times after the start_offset are not in dst. *@param time_of_day Time offset in the day for the local time *@param dst_end_offset_minutes Local time of day for end of dst *@retval status of time label w.r.t. dst */ static time_is_dst_result process_local_dst_end_day(const time_duration_type& time_of_day, unsigned int dst_end_offset_minutes, long dst_length_minutes) { //in US this will be 60 so offset in day is 1,0,0 int offset = dst_end_offset_minutes-dst_length_minutes; if (time_of_day < time_duration_type(0,offset,0)) { return is_in_dst; } if (time_of_day >= time_duration_type(0,dst_end_offset_minutes,0)) { return is_not_in_dst; } return ambiguous; } //! Calculates if the given local time is dst or not /*! Determines if the time is really in DST or not. Also checks for * invalid and ambiguous. * @param current_day The day to check for dst * @param time_of_day Time offset within the day to check * @param dst_start_day Starting day of dst for the given locality * @param dst_start_offset Time offset within day for dst boundary * @param dst_end_day Ending day of dst for the given locality * @param dst_end_offset Time offset within day given in dst for dst boundary * @param dst_length lenght of dst adjusment * @retval The time is either ambiguous, invalid, in dst, or not in dst */ static time_is_dst_result local_is_dst(const date_type& current_day, const time_duration_type& time_of_day, const date_type& dst_start_day, const time_duration_type& dst_start_offset, const date_type& dst_end_day, const time_duration_type& dst_end_offset, const time_duration_type& dst_length_minutes) { unsigned int start_minutes = dst_start_offset.hours() * 60 + dst_start_offset.minutes(); unsigned int end_minutes = dst_end_offset.hours() * 60 + dst_end_offset.minutes(); long length_minutes = dst_length_minutes.hours() * 60 + dst_length_minutes.minutes(); return local_is_dst(current_day, time_of_day, dst_start_day, start_minutes, dst_end_day, end_minutes, length_minutes); } //! Calculates if the given local time is dst or not /*! Determines if the time is really in DST or not. Also checks for * invalid and ambiguous. * @param current_day The day to check for dst * @param time_of_day Time offset within the day to check * @param dst_start_day Starting day of dst for the given locality * @param dst_start_offset_minutes Offset within day for dst * boundary (eg 120 for US which is 02:00:00) * @param dst_end_day Ending day of dst for the given locality * @param dst_end_offset_minutes Offset within day given in dst for dst * boundary (eg 120 for US which is 02:00:00) * @param dst_length_minutes Length of dst adjusment (eg: 60 for US) * @retval The time is either ambiguous, invalid, in dst, or not in dst */ static time_is_dst_result local_is_dst(const date_type& current_day, const time_duration_type& time_of_day, const date_type& dst_start_day, unsigned int dst_start_offset_minutes, const date_type& dst_end_day, unsigned int dst_end_offset_minutes, long dst_length_minutes) { //in northern hemisphere dst is in the middle of the year if (dst_start_day < dst_end_day) { if ((current_day > dst_start_day) && (current_day < dst_end_day)) { return is_in_dst; } if ((current_day < dst_start_day) || (current_day > dst_end_day)) { return is_not_in_dst; } } else {//southern hemisphere dst is at begining /end of year if ((current_day < dst_start_day) && (current_day > dst_end_day)) { return is_not_in_dst; } if ((current_day > dst_start_day) || (current_day < dst_end_day)) { return is_in_dst; } } if (current_day == dst_start_day) { return process_local_dst_start_day(time_of_day, dst_start_offset_minutes, dst_length_minutes); } if (current_day == dst_end_day) { return process_local_dst_end_day(time_of_day, dst_end_offset_minutes, dst_length_minutes); } //you should never reach this statement return invalid_time_label; } }; //! Compile-time configurable daylight savings time calculation engine /* This template provides the ability to configure a daylight savings * calculation at compile time covering all the cases. Unfortunately * because of the number of dimensions related to daylight savings * calculation the number of parameters is high. In addition, the * start and end transition rules are complex types that specify * an algorithm for calculation of the starting day and ending * day of daylight savings time including the month and day * specifications (eg: last sunday in October). * * @param date_type A type that represents dates, typically gregorian::date * @param time_duration_type Used for the offset in the day calculations * @param dst_traits A set of traits that define the rules of dst * calculation. The dst_trait must include the following: * start_rule_functor - Rule to calculate the starting date of a * dst transition (eg: last_kday_of_month). * start_day - static function that returns month of dst start for * start_rule_functor * start_month -static function that returns day or day of week for * dst start of dst * end_rule_functor - Rule to calculate the end of dst day. * end_day - static fucntion that returns end day for end_rule_functor * end_month - static function that returns end month for end_rule_functor * dst_start_offset_minutes - number of minutes from start of day to transition to dst -- 120 (or 2:00 am) is typical for the U.S. and E.U. * dst_start_offset_minutes - number of minutes from start of day to transition off of dst -- 180 (or 3:00 am) is typical for E.U. * dst_length_minutes - number of minutes that dst shifts clock */ template class dst_calc_engine { public: typedef typename date_type::year_type year_type; typedef typename date_type::calendar_type calendar_type; typedef dst_calculator dstcalc; //! Calculates if the given local time is dst or not /*! Determines if the time is really in DST or not. Also checks for * invalid and ambiguous. * @retval The time is either ambiguous, invalid, in dst, or not in dst */ static time_is_dst_result local_is_dst(const date_type& d, const time_duration_type& td) { year_type y = d.year(); date_type dst_start = local_dst_start_day(y); date_type dst_end = local_dst_end_day(y); return dstcalc::local_is_dst(d,td, dst_start, dst_traits::dst_start_offset_minutes(), dst_end, dst_traits::dst_end_offset_minutes(), dst_traits::dst_shift_length_minutes()); } static bool is_dst_boundary_day(date_type d) { year_type y = d.year(); return ((d == local_dst_start_day(y)) || (d == local_dst_end_day(y))); } //! The time of day for the dst transition (eg: typically 01:00:00 or 02:00:00) static time_duration_type dst_offset() { return time_duration_type(0,dst_traits::dst_shift_length_minutes(),0); } static date_type local_dst_start_day(year_type year) { return dst_traits::local_dst_start_day(year); } static date_type local_dst_end_day(year_type year) { return dst_traits::local_dst_end_day(year); } }; //! Depricated: Class to calculate dst boundaries for US time zones /* Use dst_calc_engine instead. * In 2007 US/Canada DST rules changed * (http://en.wikipedia.org/wiki/Energy_Policy_Act_of_2005#Change_to_daylight_saving_time). */ template //1 hour == 60 min in US class us_dst_rules { public: typedef time_duration_type_ time_duration_type; typedef date_type_ date_type; typedef typename date_type::year_type year_type; typedef typename date_type::calendar_type calendar_type; typedef date_time::last_kday_of_month lkday; typedef date_time::first_kday_of_month fkday; typedef date_time::nth_kday_of_month nkday; typedef dst_calculator dstcalc; //! Calculates if the given local time is dst or not /*! Determines if the time is really in DST or not. Also checks for * invalid and ambiguous. * @retval The time is either ambiguous, invalid, in dst, or not in dst */ static time_is_dst_result local_is_dst(const date_type& d, const time_duration_type& td) { year_type y = d.year(); date_type dst_start = local_dst_start_day(y); date_type dst_end = local_dst_end_day(y); return dstcalc::local_is_dst(d,td, dst_start,dst_start_offset_minutes, dst_end, dst_start_offset_minutes, dst_length_minutes); } static bool is_dst_boundary_day(date_type d) { year_type y = d.year(); return ((d == local_dst_start_day(y)) || (d == local_dst_end_day(y))); } static date_type local_dst_start_day(year_type year) { if (year >= year_type(2007)) { //second sunday in march nkday ssim(nkday::second, Sunday, gregorian::Mar); return ssim.get_date(year); } else { //first sunday in april fkday fsia(Sunday, gregorian::Apr); return fsia.get_date(year); } } static date_type local_dst_end_day(year_type year) { if (year >= year_type(2007)) { //first sunday in november fkday fsin(Sunday, gregorian::Nov); return fsin.get_date(year); } else { //last sunday in october lkday lsio(Sunday, gregorian::Oct); return lsio.get_date(year); } } static time_duration_type dst_offset() { return time_duration_type(0,dst_length_minutes,0); } private: }; //! Used for local time adjustments in places that don't use dst template class null_dst_rules { public: typedef time_duration_type_ time_duration_type; typedef date_type_ date_type; //! Calculates if the given local time is dst or not /*! @retval Always is_not_in_dst since this is for zones without dst */ static time_is_dst_result local_is_dst(const date_type&, const time_duration_type&) { return is_not_in_dst; } //! Calculates if the given utc time is in dst static time_is_dst_result utc_is_dst(const date_type&, const time_duration_type&) { return is_not_in_dst; } static bool is_dst_boundary_day(date_type /*d*/) { return false; } static time_duration_type dst_offset() { return time_duration_type(0,0,0); } }; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/filetime_functions.hpp000644 000765 000024 00000013446 12233035540 024504 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_FILETIME_FUNCTIONS_HPP__ #define DATE_TIME_FILETIME_FUNCTIONS_HPP__ /* Copyright (c) 2004 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 09:04:10 -0700 (Sat, 22 Sep 2012) $ */ /*! @file filetime_functions.hpp * Function(s) for converting between a FILETIME structure and a * time object. This file is only available on systems that have * BOOST_HAS_FTIME defined. */ #include #if defined(BOOST_HAS_FTIME) // skip this file if no FILETIME #if defined(BOOST_USE_WINDOWS_H) # include #endif #include #include #include namespace boost { namespace date_time { namespace winapi { #if !defined(BOOST_USE_WINDOWS_H) extern "C" { struct FILETIME { boost::uint32_t dwLowDateTime; boost::uint32_t dwHighDateTime; }; struct SYSTEMTIME { boost::uint16_t wYear; boost::uint16_t wMonth; boost::uint16_t wDayOfWeek; boost::uint16_t wDay; boost::uint16_t wHour; boost::uint16_t wMinute; boost::uint16_t wSecond; boost::uint16_t wMilliseconds; }; __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(FILETIME* lpFileTime); __declspec(dllimport) int __stdcall FileTimeToLocalFileTime(const FILETIME* lpFileTime, FILETIME* lpLocalFileTime); __declspec(dllimport) void __stdcall GetSystemTime(SYSTEMTIME* lpSystemTime); __declspec(dllimport) int __stdcall SystemTimeToFileTime(const SYSTEMTIME* lpSystemTime, FILETIME* lpFileTime); } // extern "C" #endif // defined(BOOST_USE_WINDOWS_H) typedef FILETIME file_time; typedef SYSTEMTIME system_time; inline void get_system_time_as_file_time(file_time& ft) { #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) // Some runtime library implementations expect local times as the norm for ctime. file_time ft_utc; GetSystemTimeAsFileTime(&ft_utc); FileTimeToLocalFileTime(&ft_utc, &ft); #elif defined(BOOST_HAS_GETSYSTEMTIMEASFILETIME) GetSystemTimeAsFileTime(&ft); #else system_time st; GetSystemTime(&st); SystemTimeToFileTime(&st, &ft); #endif } /*! * The function converts file_time into number of microseconds elapsed since 1970-Jan-01 * * \note Only dates after 1970-Jan-01 are supported. Dates before will be wrapped. * * \note The function is templated on the FILETIME type, so that * it can be used with both native FILETIME and the ad-hoc * boost::date_time::winapi::file_time type. */ template< typename FileTimeT > inline boost::uint64_t file_time_to_microseconds(FileTimeT const& ft) { /* shift is difference between 1970-Jan-01 & 1601-Jan-01 * in 100-nanosecond intervals */ const uint64_t shift = 116444736000000000ULL; // (27111902 << 32) + 3577643008 union { FileTimeT as_file_time; uint64_t as_integer; // 100-nanos since 1601-Jan-01 } caster; caster.as_file_time = ft; caster.as_integer -= shift; // filetime is now 100-nanos since 1970-Jan-01 return (caster.as_integer / 10); // truncate to microseconds } } // namespace winapi //! Create a time object from an initialized FILETIME struct. /*! * Create a time object from an initialized FILETIME struct. * A FILETIME struct holds 100-nanosecond units (0.0000001). When * built with microsecond resolution the file_time's sub second value * will be truncated. Nanosecond resolution has no truncation. * * \note The function is templated on the FILETIME type, so that * it can be used with both native FILETIME and the ad-hoc * boost::date_time::winapi::file_time type. */ template< typename TimeT, typename FileTimeT > inline TimeT time_from_ftime(const FileTimeT& ft) { typedef typename TimeT::date_type date_type; typedef typename TimeT::date_duration_type date_duration_type; typedef typename TimeT::time_duration_type time_duration_type; // https://svn.boost.org/trac/boost/ticket/2523 // Since this function can be called with arbitrary times, including ones that // are before 1970-Jan-01, we'll have to cast the time a bit differently, // than it is done in the file_time_to_microseconds function. This allows to // avoid integer wrapping for dates before 1970-Jan-01. union { FileTimeT as_file_time; uint64_t as_integer; // 100-nanos since 1601-Jan-01 } caster; caster.as_file_time = ft; uint64_t sec = caster.as_integer / 10000000UL; uint32_t sub_sec = (caster.as_integer % 10000000UL) // 100-nanoseconds since the last second #if !defined(BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG) / 10; // microseconds since the last second #else * 100; // nanoseconds since the last second #endif // split sec into usable chunks: days, hours, minutes, & seconds const uint32_t sec_per_day = 86400; // seconds per day uint32_t days = static_cast< uint32_t >(sec / sec_per_day); uint32_t tmp = static_cast< uint32_t >(sec % sec_per_day); uint32_t hours = tmp / 3600; // sec_per_hour tmp %= 3600; uint32_t minutes = tmp / 60; // sec_per_min tmp %= 60; uint32_t seconds = tmp; // seconds date_duration_type dd(days); date_type d = date_type(1601, Jan, 01) + dd; return TimeT(d, time_duration_type(hours, minutes, seconds, sub_sec)); } }} // boost::date_time #endif // BOOST_HAS_FTIME #endif // DATE_TIME_FILETIME_FUNCTIONS_HPP__ passenger-4.0.37/ext/boost/date_time/format_date_parser.hpp000644 000765 000024 00000057107 12233035540 024461 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_FORMAT_DATE_PARSER_HPP__ #define DATE_TIME_FORMAT_DATE_PARSER_HPP__ /* Copyright (c) 2004-2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2013-06-21 08:04:12 -0700 (Fri, 21 Jun 2013) $ */ #include "boost/lexical_cast.hpp" #include "boost/date_time/string_parse_tree.hpp" #include "boost/date_time/strings_from_facet.hpp" #include "boost/date_time/special_values_parser.hpp" #include #include #include #include #ifndef BOOST_NO_STDC_NAMESPACE # include #else # include #endif #ifdef BOOST_NO_STDC_NAMESPACE namespace std { using ::isspace; using ::isdigit; } #endif namespace boost { namespace date_time { //! Helper function for parsing fixed length strings into integers /*! Will consume 'length' number of characters from stream. Consumed * character are transfered to parse_match_result struct. * Returns '-1' if no number can be parsed or incorrect number of * digits in stream. */ template inline int_type fixed_string_to_int(std::istreambuf_iterator& itr, std::istreambuf_iterator& stream_end, parse_match_result& mr, unsigned int length, const charT& fill_char) { //typedef std::basic_string string_type; unsigned int j = 0; //string_type s; while (j < length && itr != stream_end && (std::isdigit(*itr) || *itr == fill_char)) { if(*itr == fill_char) { /* Since a fill_char can be anything, we convert it to a zero. * lexical_cast will behave predictably when zero is used as fill. */ mr.cache += ('0'); } else { mr.cache += (*itr); } itr++; j++; } int_type i = -1; // mr.cache will hold leading zeros. size() tells us when input is too short. if(mr.cache.size() < length) { return i; } try { i = boost::lexical_cast(mr.cache); }catch(bad_lexical_cast&){ // we want to return -1 if the cast fails so nothing to do here } return i; } //! Helper function for parsing fixed length strings into integers /*! Will consume 'length' number of characters from stream. Consumed * character are transfered to parse_match_result struct. * Returns '-1' if no number can be parsed or incorrect number of * digits in stream. */ template inline int_type fixed_string_to_int(std::istreambuf_iterator& itr, std::istreambuf_iterator& stream_end, parse_match_result& mr, unsigned int length) { return fixed_string_to_int(itr, stream_end, mr, length, '0'); } //! Helper function for parsing varied length strings into integers /*! Will consume 'max_length' characters from stream only if those * characters are digits. Returns '-1' if no number can be parsed. * Will not parse a number preceeded by a '+' or '-'. */ template inline int_type var_string_to_int(std::istreambuf_iterator& itr, const std::istreambuf_iterator& stream_end, unsigned int max_length) { typedef std::basic_string string_type; unsigned int j = 0; string_type s; while (itr != stream_end && (j < max_length) && std::isdigit(*itr)) { s += (*itr); ++itr; ++j; } int_type i = -1; if(!s.empty()) { i = boost::lexical_cast(s); } return i; } //! Class with generic date parsing using a format string /*! The following is the set of recognized format specifiers - %a - Short weekday name - %A - Long weekday name - %b - Abbreviated month name - %B - Full month name - %d - Day of the month as decimal 01 to 31 - %j - Day of year as decimal from 001 to 366 - %m - Month name as a decimal 01 to 12 - %U - Week number 00 to 53 with first Sunday as the first day of week 1? - %w - Weekday as decimal number 0 to 6 where Sunday == 0 - %W - Week number 00 to 53 where Monday is first day of week 1 - %x - facet default date representation - %y - Year without the century - eg: 04 for 2004 - %Y - Year with century The weekday specifiers (%a and %A) do not add to the date construction, but they provide a way to skip over the weekday names for formats that provide them. todo -- Another interesting feature that this approach could provide is an option to fill in any missing fields with the current values from the clock. So if you have %m-%d the parser would detect the missing year value and fill it in using the clock. todo -- What to do with the %x. %x in the classic facet is just bad... */ template class format_date_parser { public: typedef std::basic_string string_type; typedef std::basic_istringstream stringstream_type; typedef std::istreambuf_iterator stream_itr_type; typedef typename string_type::const_iterator const_itr; typedef typename date_type::year_type year_type; typedef typename date_type::month_type month_type; typedef typename date_type::day_type day_type; typedef typename date_type::duration_type duration_type; typedef typename date_type::day_of_week_type day_of_week_type; typedef typename date_type::day_of_year_type day_of_year_type; typedef string_parse_tree parse_tree_type; typedef typename parse_tree_type::parse_match_result_type match_results; typedef std::vector > input_collection_type; // TODO sv_parser uses its default constructor - write the others format_date_parser(const string_type& format_str, const input_collection_type& month_short_names, const input_collection_type& month_long_names, const input_collection_type& weekday_short_names, const input_collection_type& weekday_long_names) : m_format(format_str), m_month_short_names(month_short_names, 1), m_month_long_names(month_long_names, 1), m_weekday_short_names(weekday_short_names), m_weekday_long_names(weekday_long_names) {} format_date_parser(const string_type& format_str, const std::locale& locale) : m_format(format_str), m_month_short_names(gather_month_strings(locale), 1), m_month_long_names(gather_month_strings(locale, false), 1), m_weekday_short_names(gather_weekday_strings(locale)), m_weekday_long_names(gather_weekday_strings(locale, false)) {} format_date_parser(const format_date_parser& fdp) { this->m_format = fdp.m_format; this->m_month_short_names = fdp.m_month_short_names; this->m_month_long_names = fdp.m_month_long_names; this->m_weekday_short_names = fdp.m_weekday_short_names; this->m_weekday_long_names = fdp.m_weekday_long_names; } string_type format() const { return m_format; } void format(string_type format_str) { m_format = format_str; } void short_month_names(const input_collection_type& month_names) { m_month_short_names = parse_tree_type(month_names, 1); } void long_month_names(const input_collection_type& month_names) { m_month_long_names = parse_tree_type(month_names, 1); } void short_weekday_names(const input_collection_type& weekday_names) { m_weekday_short_names = parse_tree_type(weekday_names); } void long_weekday_names(const input_collection_type& weekday_names) { m_weekday_long_names = parse_tree_type(weekday_names); } date_type parse_date(const string_type& value, const string_type& format_str, const special_values_parser& sv_parser) const { stringstream_type ss(value); stream_itr_type sitr(ss); stream_itr_type stream_end; return parse_date(sitr, stream_end, format_str, sv_parser); } date_type parse_date(std::istreambuf_iterator& sitr, std::istreambuf_iterator& stream_end, const special_values_parser& sv_parser) const { return parse_date(sitr, stream_end, m_format, sv_parser); } /*! Of all the objects that the format_date_parser can parse, only a * date can be a special value. Therefore, only parse_date checks * for special_values. */ date_type parse_date(std::istreambuf_iterator& sitr, std::istreambuf_iterator& stream_end, string_type format_str, const special_values_parser& sv_parser) const { bool use_current_char = false; // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } short year(0), month(0), day(0), day_of_year(0);// wkday(0); /* Initialized the following to their minimum values. These intermediate * objects are used so we get specific exceptions when part of the input * is unparsable. * Ex: "205-Jan-15" will throw a bad_year, "2005-Jsn-15"- bad_month, etc.*/ year_type t_year(1400); month_type t_month(1); day_type t_day(1); day_of_week_type wkday(0); const_itr itr(format_str.begin()); while (itr != format_str.end() && (sitr != stream_end)) { if (*itr == '%') { itr++; if (*itr != '%') { switch(*itr) { case 'a': { //this value is just throw away. It could be used for //error checking potentially, but it isn't helpful in //actually constructing the date - we just need to get it //out of the stream match_results mr = m_weekday_short_names.match(sitr, stream_end); if(mr.current_match == match_results::PARSE_ERROR) { // check special_values if(sv_parser.match(sitr, stream_end, mr)) { return date_type(static_cast(mr.current_match)); } } wkday = mr.current_match; if (mr.has_remaining()) { use_current_char = true; } break; } case 'A': { //this value is just throw away. It could be used for //error checking potentially, but it isn't helpful in //actually constructing the date - we just need to get it //out of the stream match_results mr = m_weekday_long_names.match(sitr, stream_end); if(mr.current_match == match_results::PARSE_ERROR) { // check special_values if(sv_parser.match(sitr, stream_end, mr)) { return date_type(static_cast(mr.current_match)); } } wkday = mr.current_match; if (mr.has_remaining()) { use_current_char = true; } break; } case 'b': { match_results mr = m_month_short_names.match(sitr, stream_end); if(mr.current_match == match_results::PARSE_ERROR) { // check special_values if(sv_parser.match(sitr, stream_end, mr)) { return date_type(static_cast(mr.current_match)); } } t_month = month_type(mr.current_match); if (mr.has_remaining()) { use_current_char = true; } break; } case 'B': { match_results mr = m_month_long_names.match(sitr, stream_end); if(mr.current_match == match_results::PARSE_ERROR) { // check special_values if(sv_parser.match(sitr, stream_end, mr)) { return date_type(static_cast(mr.current_match)); } } t_month = month_type(mr.current_match); if (mr.has_remaining()) { use_current_char = true; } break; } case 'd': { match_results mr; day = fixed_string_to_int(sitr, stream_end, mr, 2); if(day == -1) { if(sv_parser.match(sitr, stream_end, mr)) { return date_type(static_cast(mr.current_match)); } } t_day = day_type(day); break; } case 'e': { match_results mr; day = fixed_string_to_int(sitr, stream_end, mr, 2, ' '); if(day == -1) { if(sv_parser.match(sitr, stream_end, mr)) { return date_type(static_cast(mr.current_match)); } } t_day = day_type(day); break; } case 'j': { match_results mr; day_of_year = fixed_string_to_int(sitr, stream_end, mr, 3); if(day_of_year == -1) { if(sv_parser.match(sitr, stream_end, mr)) { return date_type(static_cast(mr.current_match)); } } // these next two lines are so we get an exception with bad input day_of_year_type t_day_of_year(1); t_day_of_year = day_of_year_type(day_of_year); break; } case 'm': { match_results mr; month = fixed_string_to_int(sitr, stream_end, mr, 2); if(month == -1) { if(sv_parser.match(sitr, stream_end, mr)) { return date_type(static_cast(mr.current_match)); } } t_month = month_type(month); break; } case 'Y': { match_results mr; year = fixed_string_to_int(sitr, stream_end, mr, 4); if(year == -1) { if(sv_parser.match(sitr, stream_end, mr)) { return date_type(static_cast(mr.current_match)); } } t_year = year_type(year); break; } case 'y': { match_results mr; year = fixed_string_to_int(sitr, stream_end, mr, 2); if(year == -1) { if(sv_parser.match(sitr, stream_end, mr)) { return date_type(static_cast(mr.current_match)); } } year += 2000; //make 2 digit years in this century t_year = year_type(year); break; } default: {} //ignore those we don't understand }//switch } else { // itr == '%', second consecutive sitr++; } itr++; //advance past format specifier } else { //skip past chars in format and in buffer itr++; if (use_current_char) { use_current_char = false; } else { sitr++; } } } if (day_of_year > 0) { date_type d(static_cast(year-1),12,31); //end of prior year return d + duration_type(day_of_year); } return date_type(t_year, t_month, t_day); // exceptions were thrown earlier // if input was no good } //! Throws bad_month if unable to parse month_type parse_month(std::istreambuf_iterator& sitr, std::istreambuf_iterator& stream_end, string_type format_str) const { match_results mr; return parse_month(sitr, stream_end, format_str, mr); } //! Throws bad_month if unable to parse month_type parse_month(std::istreambuf_iterator& sitr, std::istreambuf_iterator& stream_end, string_type format_str, match_results& mr) const { bool use_current_char = false; // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } short month(0); const_itr itr(format_str.begin()); while (itr != format_str.end() && (sitr != stream_end)) { if (*itr == '%') { itr++; if (*itr != '%') { switch(*itr) { case 'b': { mr = m_month_short_names.match(sitr, stream_end); month = mr.current_match; if (mr.has_remaining()) { use_current_char = true; } break; } case 'B': { mr = m_month_long_names.match(sitr, stream_end); month = mr.current_match; if (mr.has_remaining()) { use_current_char = true; } break; } case 'm': { month = var_string_to_int(sitr, stream_end, 2); // var_string_to_int returns -1 if parse failed. That will // cause a bad_month exception to be thrown so we do nothing here break; } default: {} //ignore those we don't understand }//switch } else { // itr == '%', second consecutive sitr++; } itr++; //advance past format specifier } else { //skip past chars in format and in buffer itr++; if (use_current_char) { use_current_char = false; } else { sitr++; } } } return month_type(month); // throws bad_month exception when values are zero } //! Expects 1 or 2 digits 1-31. Throws bad_day_of_month if unable to parse day_type parse_var_day_of_month(std::istreambuf_iterator& sitr, std::istreambuf_iterator& stream_end) const { // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } return day_type(var_string_to_int(sitr, stream_end, 2)); } //! Expects 2 digits 01-31. Throws bad_day_of_month if unable to parse day_type parse_day_of_month(std::istreambuf_iterator& sitr, std::istreambuf_iterator& stream_end) const { // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } //return day_type(var_string_to_int(sitr, stream_end, 2)); match_results mr; return day_type(fixed_string_to_int(sitr, stream_end, mr, 2)); } day_of_week_type parse_weekday(std::istreambuf_iterator& sitr, std::istreambuf_iterator& stream_end, string_type format_str) const { match_results mr; return parse_weekday(sitr, stream_end, format_str, mr); } day_of_week_type parse_weekday(std::istreambuf_iterator& sitr, std::istreambuf_iterator& stream_end, string_type format_str, match_results& mr) const { bool use_current_char = false; // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } short wkday(0); const_itr itr(format_str.begin()); while (itr != format_str.end() && (sitr != stream_end)) { if (*itr == '%') { itr++; if (*itr != '%') { switch(*itr) { case 'a': { //this value is just throw away. It could be used for //error checking potentially, but it isn't helpful in //actually constructing the date - we just need to get it //out of the stream mr = m_weekday_short_names.match(sitr, stream_end); wkday = mr.current_match; if (mr.has_remaining()) { use_current_char = true; } break; } case 'A': { //this value is just throw away. It could be used for //error checking potentially, but it isn't helpful in //actually constructing the date - we just need to get it //out of the stream mr = m_weekday_long_names.match(sitr, stream_end); wkday = mr.current_match; if (mr.has_remaining()) { use_current_char = true; } break; } case 'w': { // weekday as number 0-6, Sunday == 0 wkday = var_string_to_int(sitr, stream_end, 2); break; } default: {} //ignore those we don't understand }//switch } else { // itr == '%', second consecutive sitr++; } itr++; //advance past format specifier } else { //skip past chars in format and in buffer itr++; if (use_current_char) { use_current_char = false; } else { sitr++; } } } return day_of_week_type(wkday); // throws bad_day_of_month exception // when values are zero } //! throws bad_year if unable to parse year_type parse_year(std::istreambuf_iterator& sitr, std::istreambuf_iterator& stream_end, string_type format_str) const { match_results mr; return parse_year(sitr, stream_end, format_str, mr); } //! throws bad_year if unable to parse year_type parse_year(std::istreambuf_iterator& sitr, std::istreambuf_iterator& stream_end, string_type format_str, match_results& mr) const { bool use_current_char = false; // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } unsigned short year(0); const_itr itr(format_str.begin()); while (itr != format_str.end() && (sitr != stream_end)) { if (*itr == '%') { itr++; if (*itr != '%') { //match_results mr; switch(*itr) { case 'Y': { // year from 4 digit string year = fixed_string_to_int(sitr, stream_end, mr, 4); break; } case 'y': { // year from 2 digit string (no century) year = fixed_string_to_int(sitr, stream_end, mr, 2); year += 2000; //make 2 digit years in this century break; } default: {} //ignore those we don't understand }//switch } else { // itr == '%', second consecutive sitr++; } itr++; //advance past format specifier } else { //skip past chars in format and in buffer itr++; if (use_current_char) { use_current_char = false; } else { sitr++; } } } return year_type(year); // throws bad_year exception when values are zero } private: string_type m_format; parse_tree_type m_month_short_names; parse_tree_type m_month_long_names; parse_tree_type m_weekday_short_names; parse_tree_type m_weekday_long_names; }; } } //namespace #endif passenger-4.0.37/ext/boost/date_time/gregorian/000755 000765 000024 00000000000 12233035540 022052 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/date_time/gregorian_calendar.hpp000644 000765 000024 00000004733 12233035540 024423 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_GREGORIAN_CALENDAR_HPP__ #define DATE_TIME_GREGORIAN_CALENDAR_HPP__ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2010-01-10 11:17:23 -0800 (Sun, 10 Jan 2010) $ */ namespace boost { namespace date_time { //! An implementation of the Gregorian calendar /*! This is a parameterized implementation of a proleptic Gregorian Calendar that can be used in the creation of date systems or just to perform calculations. All the methods of this class are static functions, so the intent is to never create instances of this class. @param ymd_type_ Struct type representing the year, month, day. The ymd_type must define a of types for the year, month, and day. These types need to be arithmetic types. @param date_int_type_ Underlying type for the date count. Must be an arithmetic type. */ template class gregorian_calendar_base { public: //! define a type a date split into components typedef ymd_type_ ymd_type; //! define a type for representing months typedef typename ymd_type::month_type month_type; //! define a type for representing days typedef typename ymd_type::day_type day_type; //! Type to hold a stand alone year value (eg: 2002) typedef typename ymd_type::year_type year_type; //! Define the integer type to use for internal calculations typedef date_int_type_ date_int_type; static unsigned short day_of_week(const ymd_type& ymd); static int week_number(const ymd_type&ymd); //static unsigned short day_of_year(date_int_type); static date_int_type day_number(const ymd_type& ymd); static date_int_type julian_day_number(const ymd_type& ymd); static date_int_type modjulian_day_number(const ymd_type& ymd); static ymd_type from_day_number(date_int_type); static ymd_type from_julian_day_number(date_int_type); static ymd_type from_modjulian_day_number(date_int_type); static bool is_leap_year(year_type); static unsigned short end_of_month_day(year_type y, month_type m); static ymd_type epoch(); static unsigned short days_in_week(); }; } } //namespace #ifndef NO_BOOST_DATE_TIME_INLINE #include "boost/date_time/gregorian_calendar.ipp" #endif #endif passenger-4.0.37/ext/boost/date_time/gregorian_calendar.ipp000644 000765 000024 00000017354 12233035540 024427 0ustar00honglistaff000000 000000 /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 09:04:10 -0700 (Sat, 22 Sep 2012) $ */ #ifndef NO_BOOST_DATE_TIME_INLINE #undef BOOST_DATE_TIME_INLINE #define BOOST_DATE_TIME_INLINE inline #endif namespace boost { namespace date_time { //! Return the day of the week (0==Sunday, 1==Monday, etc) /*! Converts a year-month-day into a day of the week number */ template BOOST_DATE_TIME_INLINE unsigned short gregorian_calendar_base::day_of_week(const ymd_type& ymd) { unsigned short a = static_cast((14-ymd.month)/12); unsigned short y = static_cast(ymd.year - a); unsigned short m = static_cast(ymd.month + 12*a - 2); unsigned short d = static_cast((ymd.day + y + (y/4) - (y/100) + (y/400) + (31*m)/12) % 7); //std::cout << year << "-" << month << "-" << day << " is day: " << d << "\n"; return d; } //!Return the iso week number for the date /*!Implements the rules associated with the iso 8601 week number. Basically the rule is that Week 1 of the year is the week that contains January 4th or the week that contains the first Thursday in January. Reference for this algorithm is the Calendar FAQ by Claus Tondering, April 2000. */ template BOOST_DATE_TIME_INLINE int gregorian_calendar_base::week_number(const ymd_type& ymd) { unsigned long julianbegin = julian_day_number(ymd_type(ymd.year,1,1)); unsigned long juliantoday = julian_day_number(ymd); unsigned long day = (julianbegin + 3) % 7; unsigned long week = (juliantoday + day - julianbegin + 4)/7; if ((week >= 1) && (week <= 52)) { return week; } if (week == 53) { if((day==6) ||(day == 5 && is_leap_year(ymd.year))) { return week; //under these circumstances week == 53. } else { return 1; //monday - wednesday is in week 1 of next year } } //if the week is not in current year recalculate using the previous year as the beginning year else if (week == 0) { julianbegin = julian_day_number(ymd_type(static_cast(ymd.year-1),1,1)); juliantoday = julian_day_number(ymd); day = (julianbegin + 3) % 7; week = (juliantoday + day - julianbegin + 4)/7; return week; } return week; //not reachable -- well except if day == 5 and is_leap_year != true } //! Convert a ymd_type into a day number /*! The day number is an absolute number of days since the start of count */ template BOOST_DATE_TIME_INLINE date_int_type_ gregorian_calendar_base::day_number(const ymd_type& ymd) { unsigned short a = static_cast((14-ymd.month)/12); unsigned short y = static_cast(ymd.year + 4800 - a); unsigned short m = static_cast(ymd.month + 12*a - 3); unsigned long d = ymd.day + ((153*m + 2)/5) + 365*y + (y/4) - (y/100) + (y/400) - 32045; return d; } //! Convert a year-month-day into the julian day number /*! Since this implementation uses julian day internally, this is the same as the day_number. */ template BOOST_DATE_TIME_INLINE date_int_type_ gregorian_calendar_base::julian_day_number(const ymd_type& ymd) { return day_number(ymd); } //! Convert year-month-day into a modified julian day number /*! The day number is an absolute number of days. * MJD 0 thus started on 17 Nov 1858(Gregorian) at 00:00:00 UTC */ template BOOST_DATE_TIME_INLINE date_int_type_ gregorian_calendar_base::modjulian_day_number(const ymd_type& ymd) { return julian_day_number(ymd)-2400001; //prerounded } //! Change a day number into a year-month-day template BOOST_DATE_TIME_INLINE ymd_type_ gregorian_calendar_base::from_day_number(date_int_type dayNumber) { date_int_type a = dayNumber + 32044; date_int_type b = (4*a + 3)/146097; date_int_type c = a-((146097*b)/4); date_int_type d = (4*c + 3)/1461; date_int_type e = c - (1461*d)/4; date_int_type m = (5*e + 2)/153; unsigned short day = static_cast(e - ((153*m + 2)/5) + 1); unsigned short month = static_cast(m + 3 - 12 * (m/10)); year_type year = static_cast(100*b + d - 4800 + (m/10)); //std::cout << year << "-" << month << "-" << day << "\n"; return ymd_type(static_cast(year),month,day); } //! Change a day number into a year-month-day template BOOST_DATE_TIME_INLINE ymd_type_ gregorian_calendar_base::from_julian_day_number(date_int_type dayNumber) { date_int_type a = dayNumber + 32044; date_int_type b = (4*a+3)/146097; date_int_type c = a - ((146097*b)/4); date_int_type d = (4*c + 3)/1461; date_int_type e = c - ((1461*d)/4); date_int_type m = (5*e + 2)/153; unsigned short day = static_cast(e - ((153*m + 2)/5) + 1); unsigned short month = static_cast(m + 3 - 12 * (m/10)); year_type year = static_cast(100*b + d - 4800 + (m/10)); //std::cout << year << "-" << month << "-" << day << "\n"; return ymd_type(year,month,day); } //! Change a modified julian day number into a year-month-day template BOOST_DATE_TIME_INLINE ymd_type_ gregorian_calendar_base::from_modjulian_day_number(date_int_type dayNumber) { date_int_type jd = dayNumber + 2400001; //is 2400000.5 prerounded return from_julian_day_number(jd); } //! Determine if the provided year is a leap year /*! *@return true if year is a leap year, false otherwise */ template BOOST_DATE_TIME_INLINE bool gregorian_calendar_base::is_leap_year(year_type year) { //divisible by 4, not if divisible by 100, but true if divisible by 400 return (!(year % 4)) && ((year % 100) || (!(year % 400))); } //! Calculate the last day of the month /*! Find the day which is the end of the month given year and month * No error checking is performed. */ template BOOST_DATE_TIME_INLINE unsigned short gregorian_calendar_base::end_of_month_day(year_type year, month_type month) { switch (month) { case 2: if (is_leap_year(year)) { return 29; } else { return 28; }; case 4: case 6: case 9: case 11: return 30; default: return 31; }; } //! Provide the ymd_type specification for the calandar start template BOOST_DATE_TIME_INLINE ymd_type_ gregorian_calendar_base::epoch() { return ymd_type(1400,1,1); } //! Defines length of a week for week calculations template BOOST_DATE_TIME_INLINE unsigned short gregorian_calendar_base::days_in_week() { return 7; } } } //namespace gregorian passenger-4.0.37/ext/boost/date_time/int_adapter.hpp000644 000765 000024 00000032765 12233035540 023115 0ustar00honglistaff000000 000000 #ifndef _DATE_TIME_INT_ADAPTER_HPP__ #define _DATE_TIME_INT_ADAPTER_HPP__ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $ */ #include "boost/config.hpp" #include "boost/limits.hpp" //work around compilers without limits #include "boost/date_time/special_defs.hpp" #include "boost/date_time/locale_config.hpp" #ifndef BOOST_DATE_TIME_NO_LOCALE # include #endif namespace boost { namespace date_time { //! Adapter to create integer types with +-infinity, and not a value /*! This class is used internally in counted date/time representations. * It adds the floating point like features of infinities and * not a number. It also provides mathmatical operations with * consideration to special values following these rules: *@code * +infinity - infinity == Not A Number (NAN) * infinity * non-zero == infinity * infinity * zero == NAN * +infinity * -integer == -infinity * infinity / infinity == NAN * infinity * infinity == infinity *@endcode */ template class int_adapter { public: typedef int_type_ int_type; int_adapter(int_type v) : value_(v) {} static bool has_infinity() { return true; } static const int_adapter pos_infinity() { return (::std::numeric_limits::max)(); } static const int_adapter neg_infinity() { return (::std::numeric_limits::min)(); } static const int_adapter not_a_number() { return (::std::numeric_limits::max)()-1; } static int_adapter max BOOST_PREVENT_MACRO_SUBSTITUTION () { return (::std::numeric_limits::max)()-2; } static int_adapter min BOOST_PREVENT_MACRO_SUBSTITUTION () { return (::std::numeric_limits::min)()+1; } static int_adapter from_special(special_values sv) { switch (sv) { case not_a_date_time: return not_a_number(); case neg_infin: return neg_infinity(); case pos_infin: return pos_infinity(); case max_date_time: return (max)(); case min_date_time: return (min)(); default: return not_a_number(); } } static bool is_inf(int_type v) { return (v == neg_infinity().as_number() || v == pos_infinity().as_number()); } static bool is_neg_inf(int_type v) { return (v == neg_infinity().as_number()); } static bool is_pos_inf(int_type v) { return (v == pos_infinity().as_number()); } static bool is_not_a_number(int_type v) { return (v == not_a_number().as_number()); } //! Returns either special value type or is_not_special static special_values to_special(int_type v) { if (is_not_a_number(v)) return not_a_date_time; if (is_neg_inf(v)) return neg_infin; if (is_pos_inf(v)) return pos_infin; return not_special; } //-3 leaves room for representations of infinity and not a date static int_type maxcount() { return (::std::numeric_limits::max)()-3; } bool is_infinity() const { return (value_ == neg_infinity().as_number() || value_ == pos_infinity().as_number()); } bool is_pos_infinity()const { return(value_ == pos_infinity().as_number()); } bool is_neg_infinity()const { return(value_ == neg_infinity().as_number()); } bool is_nan() const { return (value_ == not_a_number().as_number()); } bool is_special() const { return(is_infinity() || is_nan()); } bool operator==(const int_adapter& rhs) const { return (compare(rhs) == 0); } bool operator==(const int& rhs) const { // quiets compiler warnings bool is_signed = std::numeric_limits::is_signed; if(!is_signed) { if(is_neg_inf(value_) && rhs == 0) { return false; } } return (compare(rhs) == 0); } bool operator!=(const int_adapter& rhs) const { return (compare(rhs) != 0); } bool operator!=(const int& rhs) const { // quiets compiler warnings bool is_signed = std::numeric_limits::is_signed; if(!is_signed) { if(is_neg_inf(value_) && rhs == 0) { return true; } } return (compare(rhs) != 0); } bool operator<(const int_adapter& rhs) const { return (compare(rhs) == -1); } bool operator<(const int& rhs) const { // quiets compiler warnings bool is_signed = std::numeric_limits::is_signed; if(!is_signed) { if(is_neg_inf(value_) && rhs == 0) { return true; } } return (compare(rhs) == -1); } bool operator>(const int_adapter& rhs) const { return (compare(rhs) == 1); } int_type as_number() const { return value_; } //! Returns either special value type or is_not_special special_values as_special() const { return int_adapter::to_special(value_); } //creates nasty ambiguities // operator int_type() const // { // return value_; // } /*! Operator allows for adding dissimilar int_adapter types. * The return type will match that of the the calling object's type */ template inline int_adapter operator+(const int_adapter& rhs) const { if(is_special() || rhs.is_special()) { if (is_nan() || rhs.is_nan()) { return int_adapter::not_a_number(); } if((is_pos_inf(value_) && rhs.is_neg_inf(rhs.as_number())) || (is_neg_inf(value_) && rhs.is_pos_inf(rhs.as_number())) ) { return int_adapter::not_a_number(); } if (is_infinity()) { return *this; } if (rhs.is_pos_inf(rhs.as_number())) { return int_adapter::pos_infinity(); } if (rhs.is_neg_inf(rhs.as_number())) { return int_adapter::neg_infinity(); } } return int_adapter(value_ + rhs.as_number()); } int_adapter operator+(const int_type rhs) const { if(is_special()) { if (is_nan()) { return int_adapter(not_a_number()); } if (is_infinity()) { return *this; } } return int_adapter(value_ + rhs); } /*! Operator allows for subtracting dissimilar int_adapter types. * The return type will match that of the the calling object's type */ template inline int_adapter operator-(const int_adapter& rhs)const { if(is_special() || rhs.is_special()) { if (is_nan() || rhs.is_nan()) { return int_adapter::not_a_number(); } if((is_pos_inf(value_) && rhs.is_pos_inf(rhs.as_number())) || (is_neg_inf(value_) && rhs.is_neg_inf(rhs.as_number())) ) { return int_adapter::not_a_number(); } if (is_infinity()) { return *this; } if (rhs.is_pos_inf(rhs.as_number())) { return int_adapter::neg_infinity(); } if (rhs.is_neg_inf(rhs.as_number())) { return int_adapter::pos_infinity(); } } return int_adapter(value_ - rhs.as_number()); } int_adapter operator-(const int_type rhs) const { if(is_special()) { if (is_nan()) { return int_adapter(not_a_number()); } if (is_infinity()) { return *this; } } return int_adapter(value_ - rhs); } // should templatize this to be consistant with op +- int_adapter operator*(const int_adapter& rhs)const { if(this->is_special() || rhs.is_special()) { return mult_div_specials(rhs); } return int_adapter(value_ * rhs.value_); } /*! Provided for cases when automatic conversion from * 'int' to 'int_adapter' causes incorrect results. */ int_adapter operator*(const int rhs) const { if(is_special()) { return mult_div_specials(rhs); } return int_adapter(value_ * rhs); } // should templatize this to be consistant with op +- int_adapter operator/(const int_adapter& rhs)const { if(this->is_special() || rhs.is_special()) { if(is_infinity() && rhs.is_infinity()) { return int_adapter(not_a_number()); } if(rhs != 0) { return mult_div_specials(rhs); } else { // let divide by zero blow itself up return int_adapter(value_ / rhs.value_); } } return int_adapter(value_ / rhs.value_); } /*! Provided for cases when automatic conversion from * 'int' to 'int_adapter' causes incorrect results. */ int_adapter operator/(const int rhs) const { if(is_special() && rhs != 0) { return mult_div_specials(rhs); } return int_adapter(value_ / rhs); } // should templatize this to be consistant with op +- int_adapter operator%(const int_adapter& rhs)const { if(this->is_special() || rhs.is_special()) { if(is_infinity() && rhs.is_infinity()) { return int_adapter(not_a_number()); } if(rhs != 0) { return mult_div_specials(rhs); } else { // let divide by zero blow itself up return int_adapter(value_ % rhs.value_); } } return int_adapter(value_ % rhs.value_); } /*! Provided for cases when automatic conversion from * 'int' to 'int_adapter' causes incorrect results. */ int_adapter operator%(const int rhs) const { if(is_special() && rhs != 0) { return mult_div_specials(rhs); } return int_adapter(value_ % rhs); } private: int_type value_; //! returns -1, 0, 1, or 2 if 'this' is <, ==, >, or 'nan comparison' rhs int compare(const int_adapter& rhs)const { if(this->is_special() || rhs.is_special()) { if(this->is_nan() || rhs.is_nan()) { if(this->is_nan() && rhs.is_nan()) { return 0; // equal } else { return 2; // nan } } if((is_neg_inf(value_) && !is_neg_inf(rhs.value_)) || (is_pos_inf(rhs.value_) && !is_pos_inf(value_)) ) { return -1; // less than } if((is_pos_inf(value_) && !is_pos_inf(rhs.value_)) || (is_neg_inf(rhs.value_) && !is_neg_inf(value_)) ) { return 1; // greater than } } if(value_ < rhs.value_) return -1; if(value_ > rhs.value_) return 1; // implied-> if(value_ == rhs.value_) return 0; } /* When multiplying and dividing with at least 1 special value * very simmilar rules apply. In those cases where the rules * are different, they are handled in the respective operator * function. */ //! Assumes at least 'this' or 'rhs' is a special value int_adapter mult_div_specials(const int_adapter& rhs)const { int min_value; // quiets compiler warnings bool is_signed = std::numeric_limits::is_signed; if(is_signed) { min_value = 0; } else { min_value = 1;// there is no zero with unsigned } if(this->is_nan() || rhs.is_nan()) { return int_adapter(not_a_number()); } if((*this > 0 && rhs > 0) || (*this < min_value && rhs < min_value)) { return int_adapter(pos_infinity()); } if((*this > 0 && rhs < min_value) || (*this < min_value && rhs > 0)) { return int_adapter(neg_infinity()); } //implied -> if(this->value_ == 0 || rhs.value_ == 0) return int_adapter(not_a_number()); } /* Overloaded function necessary because of special * situation where int_adapter is instantiated with * 'unsigned' and func is called with negative int. * It would produce incorrect results since 'unsigned' * wraps around when initialized with a negative value */ //! Assumes 'this' is a special value int_adapter mult_div_specials(const int& rhs) const { int min_value; // quiets compiler warnings bool is_signed = std::numeric_limits::is_signed; if(is_signed) { min_value = 0; } else { min_value = 1;// there is no zero with unsigned } if(this->is_nan()) { return int_adapter(not_a_number()); } if((*this > 0 && rhs > 0) || (*this < min_value && rhs < 0)) { return int_adapter(pos_infinity()); } if((*this > 0 && rhs < 0) || (*this < min_value && rhs > 0)) { return int_adapter(neg_infinity()); } //implied -> if(this->value_ == 0 || rhs.value_ == 0) return int_adapter(not_a_number()); } }; #ifndef BOOST_DATE_TIME_NO_LOCALE /*! Expected output is either a numeric representation * or a special values representation.
* Ex. "12", "+infinity", "not-a-number", etc. */ //template, typename int_type> template inline std::basic_ostream& operator<<(std::basic_ostream& os, const int_adapter& ia) { if(ia.is_special()) { // switch copied from date_names_put.hpp switch(ia.as_special()) { case not_a_date_time: os << "not-a-number"; break; case pos_infin: os << "+infinity"; break; case neg_infin: os << "-infinity"; break; default: os << ""; } } else { os << ia.as_number(); } return os; } #endif } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/iso_format.hpp000644 000765 000024 00000013067 12233035540 022757 0ustar00honglistaff000000 000000 #ifndef ISO_FORMAT_HPP___ #define ISO_FORMAT_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/parse_format_base.hpp" namespace boost { namespace date_time { //! Class to provide common iso formatting spec template class iso_format_base { public: //! Describe month format -- its an integer in iso format static month_format_spec month_format() { return month_as_integer; } //! String used printed is date is invalid static const charT* not_a_date() { return "not-a-date-time"; } //! String used to for positive infinity value static const charT* pos_infinity() { return "+infinity"; } //! String used to for positive infinity value static const charT* neg_infinity() { return "-infinity"; } //! ISO char for a year -- used in durations static charT year_sep_char() { return 'Y'; } //! ISO char for a month static charT month_sep_char() { return '-'; } //! ISO char for a day static charT day_sep_char() { return '-'; } //! char for minute static charT hour_sep_char() { return ':'; } //! char for minute static charT minute_sep_char() { return ':'; } //! char for second static charT second_sep_char() { return ':'; } //! ISO char for a period static charT period_start_char() { return 'P'; } //! Used in time in mixed strings to set start of time static charT time_start_char() { return 'T'; } //! Used in mixed strings to identify start of a week number static charT week_start_char() { return 'W'; } //! Separators for periods static charT period_sep_char() { return '/'; } //! Separator for hh:mm:ss static charT time_sep_char() { return ':'; } //! Preferred Separator for hh:mm:ss,decimal_fraction static charT fractional_time_sep_char() { return ','; } static bool is_component_sep(charT sep) { switch(sep) { case 'H': case 'M': case 'S': case 'W': case 'T': case 'Y': case 'D':return true; default: return false; } } static bool is_fractional_time_sep(charT sep) { switch(sep) { case ',': case '.': return true; default: return false; } } static bool is_timezone_sep(charT sep) { switch(sep) { case '+': case '-': return true; default: return false; } } static charT element_sep_char() { return '-'; } }; #ifndef BOOST_NO_STD_WSTRING //! Class to provide common iso formatting spec template<> class iso_format_base { public: //! Describe month format -- its an integer in iso format static month_format_spec month_format() { return month_as_integer; } //! String used printed is date is invalid static const wchar_t* not_a_date() { return L"not-a-date-time"; } //! String used to for positive infinity value static const wchar_t* pos_infinity() { return L"+infinity"; } //! String used to for positive infinity value static const wchar_t* neg_infinity() { return L"-infinity"; } //! ISO char for a year -- used in durations static wchar_t year_sep_char() { return 'Y'; } //! ISO char for a month static wchar_t month_sep_char() { return '-'; } //! ISO char for a day static wchar_t day_sep_char() { return '-'; } //! char for minute static wchar_t hour_sep_char() { return ':'; } //! char for minute static wchar_t minute_sep_char() { return ':'; } //! char for second static wchar_t second_sep_char() { return ':'; } //! ISO char for a period static wchar_t period_start_char() { return 'P'; } //! Used in time in mixed strings to set start of time static wchar_t time_start_char() { return 'T'; } //! Used in mixed strings to identify start of a week number static wchar_t week_start_char() { return 'W'; } //! Separators for periods static wchar_t period_sep_char() { return '/'; } //! Separator for hh:mm:ss static wchar_t time_sep_char() { return ':'; } //! Preferred Separator for hh:mm:ss,decimal_fraction static wchar_t fractional_time_sep_char() { return ','; } static bool is_component_sep(wchar_t sep) { switch(sep) { case 'H': case 'M': case 'S': case 'W': case 'T': case 'Y': case 'D':return true; default: return false; } } static bool is_fractional_time_sep(wchar_t sep) { switch(sep) { case ',': case '.': return true; default: return false; } } static bool is_timezone_sep(wchar_t sep) { switch(sep) { case '+': case '-': return true; default: return false; } } static wchar_t element_sep_char() { return '-'; } }; #endif // BOOST_NO_STD_WSTRING //! Format description for iso normal YYYYMMDD template class iso_format : public iso_format_base { public: //! The ios standard format doesn't use char separators static bool has_date_sep_chars() { return false; } }; //! Extended format uses seperators YYYY-MM-DD template class iso_extended_format : public iso_format_base { public: //! Extended format needs char separators static bool has_date_sep_chars() { return true; } }; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/locale_config.hpp000644 000765 000024 00000002121 12233035540 023366 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_LOCALE_CONFIG_HPP___ #define DATE_TIME_LOCALE_CONFIG_HPP___ /* Copyright (c) 2002-2006 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ // This file configures whether the library will support locales and hence // iostream based i/o. Even if a compiler has some support for locales, // any failure to be compatible gets the compiler on the exclusion list. // // At the moment this is defined for MSVC 6 and any compiler that // defines BOOST_NO_STD_LOCALE (gcc 2.95.x) #include "boost/config.hpp" //sets BOOST_NO_STD_LOCALE #include "boost/detail/workaround.hpp" //This file basically becomes a noop if locales are not properly supported #if (defined(BOOST_NO_STD_LOCALE) \ || (BOOST_WORKAROUND( BOOST_MSVC, < 1300)) \ || (BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x581 )) ) ) #define BOOST_DATE_TIME_NO_LOCALE #endif #endif passenger-4.0.37/ext/boost/date_time/microsec_time_clock.hpp000644 000765 000024 00000011765 12233035540 024615 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_HIGHRES_TIME_CLOCK_HPP___ #define DATE_TIME_HIGHRES_TIME_CLOCK_HPP___ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2010-05-10 02:15:48 -0700 (Mon, 10 May 2010) $ */ /*! @file microsec_time_clock.hpp This file contains a high resolution time clock implementation. */ #include #include #include #include #include #include #include #ifdef BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK namespace boost { namespace date_time { //! A clock providing microsecond level resolution /*! A high precision clock that measures the local time * at a resolution up to microseconds and adjusts to the * resolution of the time system. For example, for the * a library configuration with nano second resolution, * the last 3 places of the fractional seconds will always * be 000 since there are 1000 nano-seconds in a micro second. */ template class microsec_clock { private: //! Type for the function used to convert time_t to tm typedef std::tm* (*time_converter)(const std::time_t*, std::tm*); public: typedef typename time_type::date_type date_type; typedef typename time_type::time_duration_type time_duration_type; typedef typename time_duration_type::rep_type resolution_traits_type; //! return a local time object for the given zone, based on computer clock //JKG -- looks like we could rewrite this against universal_time template static time_type local_time(shared_ptr tz_ptr) { typedef typename time_type::utc_time_type utc_time_type; typedef second_clock second_clock; // we'll need to know the utc_offset this machine has // in order to get a utc_time_type set to utc utc_time_type utc_time = second_clock::universal_time(); time_duration_type utc_offset = second_clock::local_time() - utc_time; // use micro clock to get a local time with sub seconds // and adjust it to get a true utc time reading with sub seconds utc_time = microsec_clock::local_time() - utc_offset; return time_type(utc_time, tz_ptr); } //! Returns the local time based on computer clock settings static time_type local_time() { return create_time(&c_time::localtime); } //! Returns the UTC time based on computer settings static time_type universal_time() { return create_time(&c_time::gmtime); } private: static time_type create_time(time_converter converter) { #ifdef BOOST_HAS_GETTIMEOFDAY timeval tv; gettimeofday(&tv, 0); //gettimeofday does not support TZ adjust on Linux. std::time_t t = tv.tv_sec; boost::uint32_t sub_sec = tv.tv_usec; #elif defined(BOOST_HAS_FTIME) winapi::file_time ft; winapi::get_system_time_as_file_time(ft); uint64_t micros = winapi::file_time_to_microseconds(ft); // it will not wrap, since ft is the current time // and cannot be before 1970-Jan-01 std::time_t t = static_cast(micros / 1000000UL); // seconds since epoch // microseconds -- static casts supress warnings boost::uint32_t sub_sec = static_cast(micros % 1000000UL); #else #error Internal Boost.DateTime error: BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK is defined, however neither gettimeofday nor FILETIME support is detected. #endif std::tm curr; std::tm* curr_ptr = converter(&t, &curr); date_type d(static_cast< typename date_type::year_type::value_type >(curr_ptr->tm_year + 1900), static_cast< typename date_type::month_type::value_type >(curr_ptr->tm_mon + 1), static_cast< typename date_type::day_type::value_type >(curr_ptr->tm_mday)); //The following line will adjust the fractional second tick in terms //of the current time system. For example, if the time system //doesn't support fractional seconds then res_adjust returns 0 //and all the fractional seconds return 0. int adjust = static_cast< int >(resolution_traits_type::res_adjust() / 1000000); time_duration_type td(static_cast< typename time_duration_type::hour_type >(curr_ptr->tm_hour), static_cast< typename time_duration_type::min_type >(curr_ptr->tm_min), static_cast< typename time_duration_type::sec_type >(curr_ptr->tm_sec), sub_sec * adjust); return time_type(d,td); } }; } } //namespace date_time #endif //BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK #endif passenger-4.0.37/ext/boost/date_time/parse_format_base.hpp000644 000765 000024 00000001760 12233035540 024266 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_PARSE_FORMAT_BASE__ #define DATE_TIME_PARSE_FORMAT_BASE__ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ namespace boost { namespace date_time { //! Enum for distinguishing parsing and formatting options enum month_format_spec {month_as_integer, month_as_short_string, month_as_long_string}; //! Enum for distinguishing the order of Month, Day, & Year. /*! Enum for distinguishing the order in which Month, Day, & Year * will appear in a date string */ enum ymd_order_spec {ymd_order_iso, //order is year-month-day ymd_order_dmy, //day-month-year ymd_order_us}; //order is month-day-year } }//namespace date_time #endif passenger-4.0.37/ext/boost/date_time/period.hpp000644 000765 000024 00000025450 12233035540 022076 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_PERIOD_HPP___ #define DATE_TIME_PERIOD_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ /*! \file period.hpp This file contain the implementation of the period abstraction. This is basically the same idea as a range. Although this class is intended for use in the time library, it is pretty close to general enough for other numeric uses. */ #include "boost/operators.hpp" namespace boost { namespace date_time { //!Provides generalized period type useful in date-time systems /*!This template uses a class to represent a time point within the period and another class to represent a duration. As a result, this class is not appropriate for use when the number and duration representation are the same (eg: in the regular number domain). A period can be specified by providing either the begining point and a duration or the begining point and the end point( end is NOT part of the period but 1 unit past it. A period will be "invalid" if either end_point <= begin_point or the given duration is <= 0. Any valid period will return false for is_null(). Zero length periods are also considered invalid. Zero length periods are periods where the begining and end points are the same, or, the given duration is zero. For a zero length period, the last point will be one unit less than the begining point. In the case that the begin and last are the same, the period has a length of one unit. The best way to handle periods is usually to provide a begining point and a duration. So, day1 + 7 days is a week period which includes all of the first day and 6 more days (eg: Sun to Sat). */ template class period : private boost::less_than_comparable , boost::equality_comparable< period > > { public: typedef point_rep point_type; typedef duration_rep duration_type; period(point_rep first_point, point_rep end_point); period(point_rep first_point, duration_rep len); point_rep begin() const; point_rep end() const; point_rep last() const; duration_rep length() const; bool is_null() const; bool operator==(const period& rhs) const; bool operator<(const period& rhs) const; void shift(const duration_rep& d); void expand(const duration_rep& d); bool contains(const point_rep& point) const; bool contains(const period& other) const; bool intersects(const period& other) const; bool is_adjacent(const period& other) const; bool is_before(const point_rep& point) const; bool is_after(const point_rep& point) const; period intersection(const period& other) const; period merge(const period& other) const; period span(const period& other) const; private: point_rep begin_; point_rep last_; }; //! create a period from begin to last eg: [begin,end) /*! If end <= begin then the period will be invalid */ template inline period::period(point_rep first_point, point_rep end_point) : begin_(first_point), last_(end_point - duration_rep::unit()) {} //! create a period as [begin, begin+len) /*! If len is <= 0 then the period will be invalid */ template inline period::period(point_rep first_point, duration_rep len) : begin_(first_point), last_(first_point + len-duration_rep::unit()) { } //! Return the first element in the period template inline point_rep period::begin() const { return begin_; } //! Return one past the last element template inline point_rep period::end() const { return last_ + duration_rep::unit(); } //! Return the last item in the period template inline point_rep period::last() const { return last_; } //! True if period is ill formed (length is zero or less) template inline bool period::is_null() const { return end() <= begin_; } //! Return the length of the period template inline duration_rep period::length() const { if(last_ < begin_){ // invalid period return last_+duration_rep::unit() - begin_; } else{ return end() - begin_; // normal case } } //! Equality operator template inline bool period::operator==(const period& rhs) const { return ((begin_ == rhs.begin_) && (last_ == rhs.last_)); } //! Strict as defined by rhs.last <= lhs.last template inline bool period::operator<(const period& rhs) const { return (last_ < rhs.begin_); } //! Shift the start and end by the specified amount template inline void period::shift(const duration_rep& d) { begin_ = begin_ + d; last_ = last_ + d; } /** Expands the size of the period by the duration on both ends. * *So before expand *@code * * [-------] * ^ ^ ^ ^ ^ ^ ^ * 1 2 3 4 5 6 7 * *@endcode * After expand(2) *@code * * [----------------------] * ^ ^ ^ ^ ^ ^ ^ * 1 2 3 4 5 6 7 * *@endcode */ template inline void period::expand(const duration_rep& d) { begin_ = begin_ - d; last_ = last_ + d; } //! True if the point is inside the period, zero length periods contain no points template inline bool period::contains(const point_rep& point) const { return ((point >= begin_) && (point <= last_)); } //! True if this period fully contains (or equals) the other period template inline bool period::contains(const period& other) const { return ((begin_ <= other.begin_) && (last_ >= other.last_)); } //! True if periods are next to each other without a gap. /* In the example below, p1 and p2 are adjacent, but p3 is not adjacent * with either of p1 or p2. *@code * [-p1-) * [-p2-) * [-p3-) *@endcode */ template inline bool period::is_adjacent(const period& other) const { return (other.begin() == end() || begin_ == other.end()); } //! True if all of the period is prior or t < start /* In the example below only point 1 would evaluate to true. *@code * [---------]) * ^ ^ ^ ^ ^ * 1 2 3 4 5 * *@endcode */ template inline bool period::is_after(const point_rep& t) const { if (is_null()) { return false; //null period isn't after } return t < begin_; } //! True if all of the period is prior to the passed point or end <= t /* In the example below points 4 and 5 return true. *@code * [---------]) * ^ ^ ^ ^ ^ * 1 2 3 4 5 * *@endcode */ template inline bool period::is_before(const point_rep& t) const { if (is_null()) { return false; //null period isn't before anything } return last_ < t; } //! True if the periods overlap in any way /* In the example below p1 intersects with p2, p4, and p6. *@code * [---p1---) * [---p2---) * [---p3---) * [---p4---) * [-p5-) * [-p6-) *@endcode */ template inline bool period::intersects(const period& other) const { return ( contains(other.begin_) || other.contains(begin_) || ((other.begin_ < begin_) && (other.last_ >= begin_))); } //! Returns the period of intersection or invalid range no intersection template inline period period::intersection(const period& other) const { if (begin_ > other.begin_) { if (last_ <= other.last_) { //case2 return *this; } //case 1 return period(begin_, other.end()); } else { if (last_ <= other.last_) { //case3 return period(other.begin_, this->end()); } //case4 return other; } //unreachable } //! Returns the union of intersecting periods -- or null period /*! */ template inline period period::merge(const period& other) const { if (this->intersects(other)) { if (begin_ < other.begin_) { return period(begin_, last_ > other.last_ ? this->end() : other.end()); } return period(other.begin_, last_ > other.last_ ? this->end() : other.end()); } return period(begin_,begin_); // no intersect return null } //! Combine two periods with earliest start and latest end. /*! Combines two periods and any gap between them such that * start = min(p1.start, p2.start) * end = max(p1.end , p2.end) *@code * [---p1---) * [---p2---) * result: * [-----------p3----------) *@endcode */ template inline period period::span(const period& other) const { point_rep start((begin_ < other.begin_) ? begin() : other.begin()); point_rep newend((last_ < other.last_) ? other.end() : this->end()); return period(start, newend); } } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/period_formatter.hpp000644 000765 000024 00000015702 12233035540 024160 0ustar00honglistaff000000 000000 #ifndef DATETIME_PERIOD_FORMATTER_HPP___ #define DATETIME_PERIOD_FORMATTER_HPP___ /* Copyright (c) 2002-2004 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $ */ namespace boost { namespace date_time { //! Not a facet, but a class used to specify and control period formats /*! Provides settings for the following: * - period_separator -- default '/' * - period_open_start_delimeter -- default '[' * - period_open_range_end_delimeter -- default ')' * - period_closed_range_end_delimeter -- default ']' * - display_as_open_range, display_as_closed_range -- default closed_range * * Thus the default formatting for a period is as follows: *@code * [period.start()/period.last()] *@endcode * So for a typical date_period this would be *@code * [2004-Jan-04/2004-Feb-01] *@endcode * where the date formatting is controlled by the date facet */ template > > class period_formatter { public: typedef std::basic_string string_type; typedef CharT char_type; typedef typename std::basic_string::const_iterator const_itr_type; typedef std::vector > collection_type; static const char_type default_period_separator[2]; static const char_type default_period_start_delimeter[2]; static const char_type default_period_open_range_end_delimeter[2]; static const char_type default_period_closed_range_end_delimeter[2]; enum range_display_options { AS_OPEN_RANGE, AS_CLOSED_RANGE }; //! Constructor that sets up period formatter options -- default should suffice most cases. period_formatter(range_display_options range_option_in = AS_CLOSED_RANGE, const char_type* const period_separator = default_period_separator, const char_type* const period_start_delimeter = default_period_start_delimeter, const char_type* const period_open_range_end_delimeter = default_period_open_range_end_delimeter, const char_type* const period_closed_range_end_delimeter = default_period_closed_range_end_delimeter) : m_range_option(range_option_in), m_period_separator(period_separator), m_period_start_delimeter(period_start_delimeter), m_open_range_end_delimeter(period_open_range_end_delimeter), m_closed_range_end_delimeter(period_closed_range_end_delimeter) {} //! Puts the characters between period elements into stream -- default is / OutItrT put_period_separator(OutItrT& oitr) const { const_itr_type ci = m_period_separator.begin(); while (ci != m_period_separator.end()) { *oitr = *ci; ci++; } return oitr; } //! Puts the period start characters into stream -- default is [ OutItrT put_period_start_delimeter(OutItrT& oitr) const { const_itr_type ci = m_period_start_delimeter.begin(); while (ci != m_period_start_delimeter.end()) { *oitr = *ci; ci++; } return oitr; } //! Puts the period end characters into stream as controled by open/closed range setting. OutItrT put_period_end_delimeter(OutItrT& oitr) const { const_itr_type ci, end; if (m_range_option == AS_OPEN_RANGE) { ci = m_open_range_end_delimeter.begin(); end = m_open_range_end_delimeter.end(); } else { ci = m_closed_range_end_delimeter.begin(); end = m_closed_range_end_delimeter.end(); } while (ci != end) { *oitr = *ci; ci++; } return oitr; } range_display_options range_option() const { return m_range_option; } //! Reset the range_option control void range_option(range_display_options option) const { m_range_option = option; } void delimiter_strings(const string_type& , const string_type& , const string_type& , const string_type& ) { m_period_separator; m_period_start_delimeter; m_open_range_end_delimeter; m_closed_range_end_delimeter; } //! Generic code to output a period -- no matter the period type. /*! This generic code will output any period using a facet to * to output the 'elements'. For example, in the case of a date_period * the elements will be instances of a date which will be formatted * according the to setup in the passed facet parameter. * * The steps for formatting a period are always the same: * - put the start delimiter * - put start element * - put the separator * - put either last or end element depending on range settings * - put end delimeter depending on range settings * * Thus for a typical date period the result might look like this: *@code * * [March 01, 2004/June 07, 2004] <-- closed range * [March 01, 2004/June 08, 2004) <-- open range * *@endcode */ template OutItrT put_period(OutItrT next, std::ios_base& a_ios, char_type a_fill, const period_type& p, const facet_type& facet) const { put_period_start_delimeter(next); next = facet.put(next, a_ios, a_fill, p.begin()); put_period_separator(next); if (m_range_option == AS_CLOSED_RANGE) { facet.put(next, a_ios, a_fill, p.last()); } else { facet.put(next, a_ios, a_fill, p.end()); } put_period_end_delimeter(next); return next; } private: range_display_options m_range_option; string_type m_period_separator; string_type m_period_start_delimeter; string_type m_open_range_end_delimeter; string_type m_closed_range_end_delimeter; }; template const typename period_formatter::char_type period_formatter::default_period_separator[2] = {'/'}; template const typename period_formatter::char_type period_formatter::default_period_start_delimeter[2] = {'['}; template const typename period_formatter::char_type period_formatter::default_period_open_range_end_delimeter[2] = {')'}; template const typename period_formatter::char_type period_formatter::default_period_closed_range_end_delimeter[2] = {']'}; } } //namespace boost::date_time #endif passenger-4.0.37/ext/boost/date_time/period_parser.hpp000644 000765 000024 00000017605 12233035540 023455 0ustar00honglistaff000000 000000 #ifndef DATETIME_PERIOD_PARSER_HPP___ #define DATETIME_PERIOD_PARSER_HPP___ /* Copyright (c) 2002-2004 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-13 12:10:23 -0800 (Thu, 13 Nov 2008) $ */ #include #include #include namespace boost { namespace date_time { //! Not a facet, but a class used to specify and control period parsing /*! Provides settings for the following: * - period_separator -- default '/' * - period_open_start_delimeter -- default '[' * - period_open_range_end_delimeter -- default ')' * - period_closed_range_end_delimeter -- default ']' * - display_as_open_range, display_as_closed_range -- default closed_range * * For a typical date_period, the contents of the input stream would be *@code * [2004-Jan-04/2004-Feb-01] *@endcode * where the date format is controlled by the date facet */ template class period_parser { public: typedef std::basic_string string_type; typedef CharT char_type; //typedef typename std::basic_string::const_iterator const_itr_type; typedef std::istreambuf_iterator stream_itr_type; typedef string_parse_tree parse_tree_type; typedef typename parse_tree_type::parse_match_result_type match_results; typedef std::vector > collection_type; static const char_type default_period_separator[2]; static const char_type default_period_start_delimeter[2]; static const char_type default_period_open_range_end_delimeter[2]; static const char_type default_period_closed_range_end_delimeter[2]; enum period_range_option { AS_OPEN_RANGE, AS_CLOSED_RANGE }; //! Constructor that sets up period parser options period_parser(period_range_option range_opt = AS_CLOSED_RANGE, const char_type* const period_separator = default_period_separator, const char_type* const period_start_delimeter = default_period_start_delimeter, const char_type* const period_open_range_end_delimeter = default_period_open_range_end_delimeter, const char_type* const period_closed_range_end_delimeter = default_period_closed_range_end_delimeter) : m_range_option(range_opt) { delimiters.push_back(string_type(period_separator)); delimiters.push_back(string_type(period_start_delimeter)); delimiters.push_back(string_type(period_open_range_end_delimeter)); delimiters.push_back(string_type(period_closed_range_end_delimeter)); } period_parser(const period_parser& p_parser) { this->delimiters = p_parser.delimiters; this->m_range_option = p_parser.m_range_option; } period_range_option range_option() const { return m_range_option; } void range_option(period_range_option option) { m_range_option = option; } collection_type delimiter_strings() const { return delimiters; } void delimiter_strings(const string_type& separator, const string_type& start_delim, const string_type& open_end_delim, const string_type& closed_end_delim) { delimiters.clear(); delimiters.push_back(separator); delimiters.push_back(start_delim); delimiters.push_back(open_end_delim); delimiters.push_back(closed_end_delim); } //! Generic code to parse a period -- no matter the period type. /*! This generic code will parse any period using a facet to * to get the 'elements'. For example, in the case of a date_period * the elements will be instances of a date which will be parsed * according the to setup in the passed facet parameter. * * The steps for parsing a period are always the same: * - consume the start delimiter * - get start element * - consume the separator * - get either last or end element depending on range settings * - consume the end delimeter depending on range settings * * Thus for a typical date period the contents of the input stream * might look like this: *@code * * [March 01, 2004/June 07, 2004] <-- closed range * [March 01, 2004/June 08, 2004) <-- open range * *@endcode */ template period_type get_period(stream_itr_type& sitr, stream_itr_type& stream_end, std::ios_base& a_ios, const period_type& /* p */, const duration_type& dur_unit, const facet_type& facet) const { // skip leading whitespace while(std::isspace(*sitr) && sitr != stream_end) { ++sitr; } typedef typename period_type::point_type point_type; point_type p1(not_a_date_time), p2(not_a_date_time); consume_delim(sitr, stream_end, delimiters[START]); // start delim facet.get(sitr, stream_end, a_ios, p1); // first point consume_delim(sitr, stream_end, delimiters[SEPARATOR]); // separator facet.get(sitr, stream_end, a_ios, p2); // second point // period construction parameters are always open range [begin, end) if (m_range_option == AS_CLOSED_RANGE) { consume_delim(sitr, stream_end, delimiters[CLOSED_END]);// end delim // add 1 duration unit to p2 to make range open p2 += dur_unit; } else { consume_delim(sitr, stream_end, delimiters[OPEN_END]); // end delim } return period_type(p1, p2); } private: collection_type delimiters; period_range_option m_range_option; enum delim_ids { SEPARATOR, START, OPEN_END, CLOSED_END }; //! throws ios_base::failure if delimiter and parsed data do not match void consume_delim(stream_itr_type& sitr, stream_itr_type& stream_end, const string_type& delim) const { /* string_parse_tree will not parse a string of punctuation characters * without knowing exactly how many characters to process * Ex [2000. Will not parse out the '[' string without knowing * to process only one character. By using length of the delimiter * string we can safely iterate past it. */ string_type s; for(unsigned int i = 0; i < delim.length() && sitr != stream_end; ++i) { s += *sitr; ++sitr; } if(s != delim) { boost::throw_exception(std::ios_base::failure("Parse failed. Expected '" + convert_string_type(delim) + "' but found '" + convert_string_type(s) + "'")); } } }; template const typename period_parser::char_type period_parser::default_period_separator[2] = {'/'}; template const typename period_parser::char_type period_parser::default_period_start_delimeter[2] = {'['}; template const typename period_parser::char_type period_parser::default_period_open_range_end_delimeter[2] = {')'}; template const typename period_parser::char_type period_parser::default_period_closed_range_end_delimeter[2] = {']'}; } } //namespace boost::date_time #endif // DATETIME_PERIOD_PARSER_HPP___ passenger-4.0.37/ext/boost/date_time/posix_time/000755 000765 000024 00000000000 12233035540 022255 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/date_time/special_defs.hpp000644 000765 000024 00000001250 12233035540 023225 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_SPECIAL_DEFS_HPP__ #define DATE_TIME_SPECIAL_DEFS_HPP__ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ namespace boost { namespace date_time { enum special_values {not_a_date_time, neg_infin, pos_infin, min_date_time, max_date_time, not_special, NumSpecialValues}; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/special_values_formatter.hpp000644 000765 000024 00000007144 12233035540 025676 0ustar00honglistaff000000 000000 #ifndef DATETIME_SPECIAL_VALUE_FORMATTER_HPP___ #define DATETIME_SPECIAL_VALUE_FORMATTER_HPP___ /* Copyright (c) 2004 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include #include #include "boost/date_time/special_defs.hpp" namespace boost { namespace date_time { //! Class that provides generic formmatting ostream formatting for special values /*! This class provides for the formmating of special values to an output stream. * In particular, it produces strings for the values of negative and positive * infinity as well as not_a_date_time. * * While not a facet, this class is used by the date and time facets for formatting * special value types. * */ template > > class special_values_formatter { public: typedef std::basic_string string_type; typedef CharT char_type; typedef std::vector collection_type; static const char_type default_special_value_names[3][17]; //! Construct special values formatter using default strings. /*! Default strings are not-a-date-time -infinity +infinity */ special_values_formatter() { std::copy(&default_special_value_names[0], &default_special_value_names[3], std::back_inserter(m_special_value_names)); } //! Construct special values formatter from array of strings /*! This constructor will take pair of iterators from an array of strings * that represent the special values and copy them for use in formatting * special values. *@code * const char* const special_value_names[]={"nadt","-inf","+inf" }; * * special_value_formatter svf(&special_value_names[0], &special_value_names[3]); *@endcode */ special_values_formatter(const char_type* const* begin, const char_type* const* end) { std::copy(begin, end, std::back_inserter(m_special_value_names)); } special_values_formatter(typename collection_type::iterator beg, typename collection_type::iterator end) { std::copy(beg, end, std::back_inserter(m_special_value_names)); } OutItrT put_special(OutItrT next, const boost::date_time::special_values& value) const { unsigned int index = value; if (index < m_special_value_names.size()) { std::copy(m_special_value_names[index].begin(), m_special_value_names[index].end(), next); } return next; } protected: collection_type m_special_value_names; }; //! Storage for the strings used to indicate special values /* using c_strings to initialize these worked fine in testing, however, * a project that compiled its objects separately, then linked in a separate * step wound up with redefinition errors for the values in this array. * Initializing individual characters eliminated this problem */ template const typename special_values_formatter::char_type special_values_formatter::default_special_value_names[3][17] = { {'n','o','t','-','a','-','d','a','t','e','-','t','i','m','e'}, {'-','i','n','f','i','n','i','t','y'}, {'+','i','n','f','i','n','i','t','y'} }; } } //namespace boost::date_time #endif passenger-4.0.37/ext/boost/date_time/special_values_parser.hpp000644 000765 000024 00000014116 12233035540 025164 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_SPECIAL_VALUES_PARSER_HPP__ #define DATE_TIME_SPECIAL_VALUES_PARSER_HPP__ /* Copyright (c) 2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: */ #include "boost/date_time/string_parse_tree.hpp" #include "boost/date_time/special_defs.hpp" #include #include namespace boost { namespace date_time { //! Class for special_value parsing /*! * TODO: add doc-comments for which elements can be changed * Parses input stream for strings representing special_values. * Special values parsed are: * - not_a_date_time * - neg_infin * - pod_infin * - min_date_time * - max_date_time */ template class special_values_parser { public: typedef std::basic_string string_type; //typedef std::basic_stringstream stringstream_type; typedef std::istreambuf_iterator stream_itr_type; //typedef typename string_type::const_iterator const_itr; //typedef typename date_type::year_type year_type; //typedef typename date_type::month_type month_type; typedef typename date_type::duration_type duration_type; //typedef typename date_type::day_of_week_type day_of_week_type; //typedef typename date_type::day_type day_type; typedef string_parse_tree parse_tree_type; typedef typename parse_tree_type::parse_match_result_type match_results; typedef std::vector > collection_type; typedef charT char_type; static const char_type nadt_string[16]; static const char_type neg_inf_string[10]; static const char_type pos_inf_string[10]; static const char_type min_date_time_string[18]; static const char_type max_date_time_string[18]; //! Creates a special_values_parser with the default set of "sv_strings" special_values_parser() { sv_strings(string_type(nadt_string), string_type(neg_inf_string), string_type(pos_inf_string), string_type(min_date_time_string), string_type(max_date_time_string)); } //! Creates a special_values_parser using a user defined set of element strings special_values_parser(const string_type& nadt_str, const string_type& neg_inf_str, const string_type& pos_inf_str, const string_type& min_dt_str, const string_type& max_dt_str) { sv_strings(nadt_str, neg_inf_str, pos_inf_str, min_dt_str, max_dt_str); } special_values_parser(typename collection_type::iterator beg, typename collection_type::iterator end) { collection_type phrases; std::copy(beg, end, std::back_inserter(phrases)); m_sv_strings = parse_tree_type(phrases, static_cast(not_a_date_time)); } special_values_parser(const special_values_parser& svp) { this->m_sv_strings = svp.m_sv_strings; } //! Replace special value strings void sv_strings(const string_type& nadt_str, const string_type& neg_inf_str, const string_type& pos_inf_str, const string_type& min_dt_str, const string_type& max_dt_str) { collection_type phrases; phrases.push_back(nadt_str); phrases.push_back(neg_inf_str); phrases.push_back(pos_inf_str); phrases.push_back(min_dt_str); phrases.push_back(max_dt_str); m_sv_strings = parse_tree_type(phrases, static_cast(not_a_date_time)); } /* Does not return a special_value because if the parsing fails, * the return value will always be not_a_date_time * (mr.current_match retains its default value of -1 on a failed * parse and that casts to not_a_date_time). */ //! Sets match_results.current_match to the corresponding special_value or -1 bool match(stream_itr_type& sitr, stream_itr_type& str_end, match_results& mr) const { unsigned int level = 0; m_sv_strings.match(sitr, str_end, mr, level); return (mr.current_match != match_results::PARSE_ERROR); } /*special_values match(stream_itr_type& sitr, stream_itr_type& str_end, match_results& mr) const { unsigned int level = 0; m_sv_strings.match(sitr, str_end, mr, level); if(mr.current_match == match_results::PARSE_ERROR) { throw std::ios_base::failure("Parse failed. No match found for '" + mr.cache + "'"); } return static_cast(mr.current_match); }*/ private: parse_tree_type m_sv_strings; }; template const typename special_values_parser::char_type special_values_parser::nadt_string[16] = {'n','o','t','-','a','-','d','a','t','e','-','t','i','m','e'}; template const typename special_values_parser::char_type special_values_parser::neg_inf_string[10] = {'-','i','n','f','i','n','i','t','y'}; template const typename special_values_parser::char_type special_values_parser::pos_inf_string[10] = {'+','i','n','f','i','n','i','t','y'}; template const typename special_values_parser::char_type special_values_parser::min_date_time_string[18] = {'m','i','n','i','m','u','m','-','d','a','t','e','-','t','i','m','e'}; template const typename special_values_parser::char_type special_values_parser::max_date_time_string[18] = {'m','a','x','i','m','u','m','-','d','a','t','e','-','t','i','m','e'}; } } //namespace #endif // DATE_TIME_SPECIAL_VALUES_PARSER_HPP__ passenger-4.0.37/ext/boost/date_time/string_convert.hpp000644 000765 000024 00000002113 12233035540 023651 0ustar00honglistaff000000 000000 #ifndef _STRING_CONVERT_HPP___ #define _STRING_CONVERT_HPP___ /* Copyright (c) 2005 CrystalClear Software, Inc. * Subject to the Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/compiler_config.hpp" #include namespace boost { namespace date_time { //! Converts a string from one value_type to another /*! Converts a wstring to a string (or a string to wstring). If both template parameters * are of same type, a copy of the input string is returned. */ template inline std::basic_string convert_string_type(const std::basic_string& inp_str) { typedef std::basic_string input_type; typedef std::basic_string output_type; output_type result; result.insert(result.begin(), inp_str.begin(), inp_str.end()); return result; } }} // namespace boost::date_time #endif // _STRING_CONVERT_HPP___ passenger-4.0.37/ext/boost/date_time/string_parse_tree.hpp000644 000765 000024 00000020261 12233035540 024326 0ustar00honglistaff000000 000000 #ifndef BOOST_DATE_TIME_STRING_PARSE_TREE___HPP__ #define BOOST_DATE_TIME_STRING_PARSE_TREE___HPP__ /* Copyright (c) 2004-2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $ */ #include "boost/lexical_cast.hpp" //error without? #include "boost/algorithm/string/case_conv.hpp" #include #include #include #include namespace boost { namespace date_time { template struct parse_match_result { parse_match_result() : match_depth(0), current_match(-1)// -1 is match_not-found value {} typedef std::basic_string string_type; string_type remaining() const { if (match_depth == cache.size()) { return string_type(); } if (current_match == -1) { return cache; } //some of the cache was used return the rest return string_type(cache, match_depth); } charT last_char() const { return cache[cache.size()-1]; } //! Returns true if more characters were parsed than was necessary /*! Should be used in conjunction with last_char() * to get the remaining character. */ bool has_remaining() const { return (cache.size() > match_depth); } // cache will hold characters that have been read from the stream string_type cache; unsigned short match_depth; short current_match; enum PARSE_STATE { PARSE_ERROR= -1 }; }; //for debug -- really only char streams... template std::basic_ostream& operator<<(std::basic_ostream& os, parse_match_result& mr) { os << "cm: " << mr.current_match << " C: '" << mr.cache << "' md: " << mr.match_depth << " R: " << mr.remaining(); return os; } //! Recursive data structure to allow efficient parsing of various strings /*! This class provides a quick lookup by building what amounts to a * tree data structure. It also features a match function which can * can handle nasty input interators by caching values as it recurses * the tree so that it can backtrack as needed. */ template struct string_parse_tree { #if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) typedef std::multimap > ptree_coll; #else typedef std::multimap ptree_coll; #endif typedef typename ptree_coll::value_type value_type; typedef typename ptree_coll::iterator iterator; typedef typename ptree_coll::const_iterator const_iterator; typedef std::basic_string string_type; typedef std::vector > collection_type; typedef parse_match_result parse_match_result_type; /*! Parameter "starting_point" designates where the numbering begins. * A starting_point of zero will start the numbering at zero * (Sun=0, Mon=1, ...) were a starting_point of one starts the * numbering at one (Jan=1, Feb=2, ...). The default is zero, * negative vaules are not allowed */ string_parse_tree(collection_type names, unsigned int starting_point=0) { // iterate thru all the elements and build the tree unsigned short index = 0; while (index != names.size() ) { string_type s = boost::algorithm::to_lower_copy(names[index]); insert(s, static_cast(index + starting_point)); index++; } //set the last tree node = index+1 indicating a value index++; } string_parse_tree(short value = -1) : m_value(value) {} ptree_coll m_next_chars; short m_value; void insert(const string_type& s, unsigned short value) { unsigned int i = 0; iterator ti; while(i < s.size()) { if (i==0) { if (i == (s.size()-1)) { ti = m_next_chars.insert(value_type(s[i], string_parse_tree(value))); } else { ti = m_next_chars.insert(value_type(s[i], string_parse_tree())); } } else { if (i == (s.size()-1)) { ti = ti->second.m_next_chars.insert(value_type(s[i], string_parse_tree(value))); } else { ti = ti->second.m_next_chars.insert(value_type(s[i], string_parse_tree())); } } i++; } } //! Recursive function that finds a matching string in the tree. /*! Must check match_results::has_remaining() after match() is * called. This is required so the user can determine if * stream iterator is already pointing to the expected * character or not (match() might advance sitr to next char in stream). * * A parse_match_result that has been returned from a failed match * attempt can be sent in to the match function of a different * string_parse_tree to attempt a match there. Use the iterators * for the partially consumed stream, the parse_match_result object, * and '0' for the level parameter. */ short match(std::istreambuf_iterator& sitr, std::istreambuf_iterator& stream_end, parse_match_result_type& result, unsigned int& level) const { level++; charT c; // if we conditionally advance sitr, we won't have // to consume the next character past the input bool adv_itr = true; if (level > result.cache.size()) { if (sitr == stream_end) return 0; //bail - input exhausted c = static_cast(std::tolower(*sitr)); //result.cache += c; //sitr++; } else { // if we're looking for characters from the cache, // we don't want to increment sitr adv_itr = false; c = static_cast(std::tolower(result.cache[level-1])); } const_iterator litr = m_next_chars.lower_bound(c); const_iterator uitr = m_next_chars.upper_bound(c); while (litr != uitr) { // equal if not found if(adv_itr) { sitr++; result.cache += c; } if (litr->second.m_value != -1) { // -1 is default value if (result.match_depth < level) { result.current_match = litr->second.m_value; result.match_depth = static_cast(level); } litr->second.match(sitr, stream_end, result, level); level--; } else { litr->second.match(sitr, stream_end, result, level); level--; } if(level <= result.cache.size()) { adv_itr = false; } litr++; } return result.current_match; } /*! Must check match_results::has_remaining() after match() is * called. This is required so the user can determine if * stream iterator is already pointing to the expected * character or not (match() might advance sitr to next char in stream). */ parse_match_result_type match(std::istreambuf_iterator& sitr, std::istreambuf_iterator& stream_end) const { // lookup to_lower of char in tree. unsigned int level = 0; // string_type cache; parse_match_result_type result; match(sitr, stream_end, result, level); return result; } void printme(std::ostream& os, int& level) { level++; iterator itr = m_next_chars.begin(); iterator end = m_next_chars.end(); // os << "starting level: " << level << std::endl; while (itr != end) { os << "level: " << level << " node: " << itr->first << " value: " << itr->second.m_value << std::endl; itr->second.printme(os, level); itr++; } level--; } void print(std::ostream& os) { int level = 0; printme(os, level); } void printmatch(std::ostream& os, charT c) { iterator litr = m_next_chars.lower_bound(c); iterator uitr = m_next_chars.upper_bound(c); os << "matches for: " << c << std::endl; while (litr != uitr) { os << " node: " << litr->first << " value: " << litr->second.m_value << std::endl; litr++; } } }; } } //namespace #endif passenger-4.0.37/ext/boost/date_time/strings_from_facet.hpp000644 000765 000024 00000011007 12233035540 024463 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_STRINGS_FROM_FACET__HPP___ #define DATE_TIME_STRINGS_FROM_FACET__HPP___ /* Copyright (c) 2004 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2013-06-21 08:04:12 -0700 (Fri, 21 Jun 2013) $ */ #include #include #include #include namespace boost { namespace date_time { //! This function gathers up all the month strings from a std::locale /*! Using the time_put facet, this function creates a collection of * all the month strings from a locale. This is handy when building * custom date parsers or formatters that need to be localized. * *@param charT The type of char to use when gathering typically char * or wchar_t. *@param locale The locale to use when gathering the strings *@param short_strings True(default) to gather short strings, * false for long strings. *@return A vector of strings containing the strings in order. eg: * Jan, Feb, Mar, etc. */ template std::vector > gather_month_strings(const std::locale& locale, bool short_strings=true) { typedef std::basic_string string_type; typedef std::vector collection_type; typedef std::basic_ostringstream ostream_type; typedef std::ostreambuf_iterator ostream_iter_type; typedef std::basic_ostringstream stringstream_type; typedef std::time_put time_put_facet_type; charT short_fmt[3] = { '%', 'b' }; charT long_fmt[3] = { '%', 'B' }; collection_type months; string_type outfmt(short_fmt); if (!short_strings) { outfmt = long_fmt; } { //grab the needed strings by using the locale to //output each month const charT* p_outfmt = outfmt.c_str(), *p_outfmt_end = p_outfmt + outfmt.size(); tm tm_value; memset(&tm_value, 0, sizeof(tm_value)); for (int m=0; m < 12; m++) { tm_value.tm_mon = m; stringstream_type ss; ostream_iter_type oitr(ss); std::use_facet(locale).put(oitr, ss, ss.fill(), &tm_value, p_outfmt, p_outfmt_end); months.push_back(ss.str()); } } return months; } //! This function gathers up all the weekday strings from a std::locale /*! Using the time_put facet, this function creates a collection of * all the weekday strings from a locale starting with the string for * 'Sunday'. This is handy when building custom date parsers or * formatters that need to be localized. * *@param charT The type of char to use when gathering typically char * or wchar_t. *@param locale The locale to use when gathering the strings *@param short_strings True(default) to gather short strings, * false for long strings. *@return A vector of strings containing the weekdays in order. eg: * Sun, Mon, Tue, Wed, Thu, Fri, Sat */ template std::vector > gather_weekday_strings(const std::locale& locale, bool short_strings=true) { typedef std::basic_string string_type; typedef std::vector collection_type; typedef std::basic_ostringstream ostream_type; typedef std::ostreambuf_iterator ostream_iter_type; typedef std::basic_ostringstream stringstream_type; typedef std::time_put time_put_facet_type; charT short_fmt[3] = { '%', 'a' }; charT long_fmt[3] = { '%', 'A' }; collection_type weekdays; string_type outfmt(short_fmt); if (!short_strings) { outfmt = long_fmt; } { //grab the needed strings by using the locale to //output each month / weekday const charT* p_outfmt = outfmt.c_str(), *p_outfmt_end = p_outfmt + outfmt.size(); tm tm_value; memset(&tm_value, 0, sizeof(tm_value)); for (int i=0; i < 7; i++) { tm_value.tm_wday = i; stringstream_type ss; ostream_iter_type oitr(ss); std::use_facet(locale).put(oitr, ss, ss.fill(), &tm_value, p_outfmt, p_outfmt_end); weekdays.push_back(ss.str()); } } return weekdays; } } } //namespace #endif passenger-4.0.37/ext/boost/date_time/time.hpp000644 000765 000024 00000014013 12233035540 021543 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_TIME_HPP___ #define DATE_TIME_TIME_HPP___ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $ */ /*! @file time.hpp This file contains the interface for the time associated classes. */ #include #include #include #include namespace boost { namespace date_time { //! Representation of a precise moment in time, including the date. /*! This class is a skeleton for the interface of a temporal type with a resolution that is higher than a day. It is intended that this class be the base class and that the actual time class be derived using the BN pattern. In this way, the derived class can make decisions such as 'should there be a default constructor' and what should it set its value to, should there be optional constructors say allowing only an time_durations that generate a time from a clock,etc. So, in fact multiple time types can be created for a time_system with different construction policies, and all of them can perform basic operations by only writing a copy constructor. Finally, compiler errors are also shorter. The real behavior of the time class is provided by the time_system template parameter. This class must provide all the logic for addition, subtraction, as well as define all the interface types. */ template class base_time : private boost::less_than_comparable > { public: typedef T time_type; typedef typename time_system::time_rep_type time_rep_type; typedef typename time_system::date_type date_type; typedef typename time_system::date_duration_type date_duration_type; typedef typename time_system::time_duration_type time_duration_type; //typedef typename time_system::hms_type hms_type; base_time(const date_type& day, const time_duration_type& td, dst_flags dst=not_dst) : time_(time_system::get_time_rep(day, td, dst)) {} base_time(special_values sv) : time_(time_system::get_time_rep(sv)) {} base_time(const time_rep_type& rhs) : time_(rhs) {} date_type date() const { return time_system::get_date(time_); } time_duration_type time_of_day() const { return time_system::get_time_of_day(time_); } /*! Optional bool parameter will return time zone as an offset * (ie "+07:00"). Empty string is returned for classes that do * not use a time_zone */ std::string zone_name(bool /*as_offset*/=false) const { return time_system::zone_name(time_); } /*! Optional bool parameter will return time zone as an offset * (ie "+07:00"). Empty string is returned for classes that do * not use a time_zone */ std::string zone_abbrev(bool /*as_offset*/=false) const { return time_system::zone_name(time_); } //! An empty string is returned for classes that do not use a time_zone std::string zone_as_posix_string() const { return std::string(); } //! check to see if date is not a value bool is_not_a_date_time() const { return time_.is_not_a_date_time(); } //! check to see if date is one of the infinity values bool is_infinity() const { return (is_pos_infinity() || is_neg_infinity()); } //! check to see if date is greater than all possible dates bool is_pos_infinity() const { return time_.is_pos_infinity(); } //! check to see if date is greater than all possible dates bool is_neg_infinity() const { return time_.is_neg_infinity(); } //! check to see if time is a special value bool is_special() const { return(is_not_a_date_time() || is_infinity()); } //!Equality operator -- others generated by boost::equality_comparable bool operator==(const time_type& rhs) const { return time_system::is_equal(time_,rhs.time_); } //!Equality operator -- others generated by boost::less_than_comparable bool operator<(const time_type& rhs) const { return time_system::is_less(time_,rhs.time_); } //! difference between two times time_duration_type operator-(const time_type& rhs) const { return time_system::subtract_times(time_, rhs.time_); } //! add date durations time_type operator+(const date_duration_type& dd) const { return time_system::add_days(time_, dd); } time_type operator+=(const date_duration_type& dd) { time_ = (time_system::get_time_rep(date() + dd, time_of_day())); return time_type(time_); } //! subtract date durations time_type operator-(const date_duration_type& dd) const { return time_system::subtract_days(time_, dd); } time_type operator-=(const date_duration_type& dd) { time_ = (time_system::get_time_rep(date() - dd, time_of_day())); return time_type(time_); } //! add time durations time_type operator+(const time_duration_type& td) const { return time_type(time_system::add_time_duration(time_, td)); } time_type operator+=(const time_duration_type& td) { time_ = (time_system::get_time_rep(date(), time_of_day() + td)); return time_type(time_); } //! subtract time durations time_type operator-(const time_duration_type& rhs) const { return time_system::subtract_time_duration(time_, rhs); } time_type operator-=(const time_duration_type& td) { time_ = (time_system::get_time_rep(date(), time_of_day() - td)); return time_type(time_); } protected: time_rep_type time_; }; } } //namespace date_time::boost #endif passenger-4.0.37/ext/boost/date_time/time_clock.hpp000644 000765 000024 00000004364 12233035540 022726 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_TIME_CLOCK_HPP___ #define DATE_TIME_TIME_CLOCK_HPP___ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ /*! @file time_clock.hpp This file contains the interface for clock devices. */ #include "boost/date_time/c_time.hpp" #include "boost/shared_ptr.hpp" namespace boost { namespace date_time { //! A clock providing time level services based on C time_t capabilities /*! This clock provides resolution to the 1 second level */ template class second_clock { public: typedef typename time_type::date_type date_type; typedef typename time_type::time_duration_type time_duration_type; static time_type local_time() { ::std::time_t t; ::std::time(&t); ::std::tm curr, *curr_ptr; //curr_ptr = ::std::localtime(&t); curr_ptr = c_time::localtime(&t, &curr); return create_time(curr_ptr); } //! Get the current day in universal date as a ymd_type static time_type universal_time() { ::std::time_t t; ::std::time(&t); ::std::tm curr, *curr_ptr; //curr_ptr = ::std::gmtime(&t); curr_ptr = c_time::gmtime(&t, &curr); return create_time(curr_ptr); } template static time_type local_time(boost::shared_ptr tz_ptr) { typedef typename time_type::utc_time_type utc_time_type; utc_time_type utc_time = second_clock::universal_time(); return time_type(utc_time, tz_ptr); } private: static time_type create_time(::std::tm* current) { date_type d(static_cast(current->tm_year + 1900), static_cast(current->tm_mon + 1), static_cast(current->tm_mday)); time_duration_type td(current->tm_hour, current->tm_min, current->tm_sec); return time_type(d,td); } }; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/time_defs.hpp000644 000765 000024 00000001735 12233035540 022553 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_TIME_PRECISION_LIMITS_HPP #define DATE_TIME_TIME_PRECISION_LIMITS_HPP /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $ */ /*! \file time_defs.hpp This file contains nice definitions for handling the resoluion of various time reprsentations. */ namespace boost { namespace date_time { //!Defines some nice types for handling time level resolutions enum time_resolutions { sec, tenth, hundreth, // deprecated misspelled version of hundredth hundredth = hundreth, milli, ten_thousandth, micro, nano, NumResolutions }; //! Flags for daylight savings or summer time enum dst_flags {not_dst, is_dst, calculate}; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/time_duration.hpp000644 000765 000024 00000021760 12233035540 023457 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_TIME_DURATION_HPP___ #define DATE_TIME_TIME_DURATION_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-10-10 12:05:03 -0700 (Wed, 10 Oct 2012) $ */ #include #include #include #include #include #include namespace boost { namespace date_time { //! Represents some amount of elapsed time measure to a given resolution /*! This class represents a standard set of capabilities for all counted time durations. Time duration implementations should derive from this class passing their type as the first template parameter. This design allows the subclass duration types to provide custom construction policies or other custom features not provided here. @param T The subclass type @param rep_type The time resolution traits for this duration type. */ template class time_duration : private boost::less_than_comparable > /* dividable, addable, and subtractable operator templates * won't work with this class (MSVC++ 6.0). return type * from '+=' is different than expected return type * from '+'. multipliable probably wont work * either (haven't tried) */ { public: typedef T duration_type; //the subclass typedef rep_type traits_type; typedef typename rep_type::day_type day_type; typedef typename rep_type::hour_type hour_type; typedef typename rep_type::min_type min_type; typedef typename rep_type::sec_type sec_type; typedef typename rep_type::fractional_seconds_type fractional_seconds_type; typedef typename rep_type::tick_type tick_type; typedef typename rep_type::impl_type impl_type; time_duration() : ticks_(0) {} time_duration(hour_type hours_in, min_type minutes_in, sec_type seconds_in=0, fractional_seconds_type frac_sec_in = 0) : ticks_(rep_type::to_tick_count(hours_in,minutes_in,seconds_in,frac_sec_in)) {} // copy constructor required for dividable<> //! Construct from another time_duration (Copy constructor) time_duration(const time_duration& other) : ticks_(other.ticks_) {} //! Construct from special_values time_duration(special_values sv) : ticks_(impl_type::from_special(sv)) {} //! Returns smallest representable duration static duration_type unit() { return duration_type(0,0,0,1); } //! Return the number of ticks in a second static tick_type ticks_per_second() { return rep_type::res_adjust(); } //! Provide the resolution of this duration type static time_resolutions resolution() { return rep_type::resolution(); } //! Returns number of hours in the duration hour_type hours() const { return static_cast(ticks() / (3600*ticks_per_second())); } //! Returns normalized number of minutes min_type minutes() const { return static_cast((ticks() / (60*ticks_per_second())) % 60); } //! Returns normalized number of seconds (0..60) sec_type seconds() const { return static_cast((ticks()/ticks_per_second()) % 60); } //! Returns total number of seconds truncating any fractional seconds sec_type total_seconds() const { return static_cast(ticks() / ticks_per_second()); } //! Returns total number of milliseconds truncating any fractional seconds tick_type total_milliseconds() const { if (ticks_per_second() < 1000) { return ticks() * (static_cast(1000) / ticks_per_second()); } return ticks() / (ticks_per_second() / static_cast(1000)) ; } //! Returns total number of nanoseconds truncating any sub millisecond values tick_type total_nanoseconds() const { if (ticks_per_second() < 1000000000) { return ticks() * (static_cast(1000000000) / ticks_per_second()); } return ticks() / (ticks_per_second() / static_cast(1000000000)) ; } //! Returns total number of microseconds truncating any sub microsecond values tick_type total_microseconds() const { if (ticks_per_second() < 1000000) { return ticks() * (static_cast(1000000) / ticks_per_second()); } return ticks() / (ticks_per_second() / static_cast(1000000)) ; } //! Returns count of fractional seconds at given resolution fractional_seconds_type fractional_seconds() const { return (ticks() % ticks_per_second()); } //! Returns number of possible digits in fractional seconds static unsigned short num_fractional_digits() { return rep_type::num_fractional_digits(); } duration_type invert_sign() const { return duration_type(ticks_ * (-1)); } bool is_negative() const { return ticks_ < 0; } bool operator<(const time_duration& rhs) const { return ticks_ < rhs.ticks_; } bool operator==(const time_duration& rhs) const { return ticks_ == rhs.ticks_; } //! unary- Allows for time_duration td = -td1 duration_type operator-()const { return duration_type(ticks_ * (-1)); } duration_type operator-(const duration_type& d) const { return duration_type(ticks_ - d.ticks_); } duration_type operator+(const duration_type& d) const { return duration_type(ticks_ + d.ticks_); } duration_type operator/(int divisor) const { return duration_type(ticks_ / divisor); } duration_type operator-=(const duration_type& d) { ticks_ = ticks_ - d.ticks_; return duration_type(ticks_); } duration_type operator+=(const duration_type& d) { ticks_ = ticks_ + d.ticks_; return duration_type(ticks_); } //! Division operations on a duration with an integer. duration_type operator/=(int divisor) { ticks_ = ticks_ / divisor; return duration_type(ticks_); } //! Multiplication operations an a duration with an integer duration_type operator*(int rhs) const { return duration_type(ticks_ * rhs); } duration_type operator*=(int divisor) { ticks_ = ticks_ * divisor; return duration_type(ticks_); } tick_type ticks() const { return traits_type::as_number(ticks_); } //! Is ticks_ a special value? bool is_special()const { if(traits_type::is_adapted()) { return ticks_.is_special(); } else{ return false; } } //! Is duration pos-infinity bool is_pos_infinity()const { if(traits_type::is_adapted()) { return ticks_.is_pos_infinity(); } else{ return false; } } //! Is duration neg-infinity bool is_neg_infinity()const { if(traits_type::is_adapted()) { return ticks_.is_neg_infinity(); } else{ return false; } } //! Is duration not-a-date-time bool is_not_a_date_time()const { if(traits_type::is_adapted()) { return ticks_.is_nan(); } else{ return false; } } //! Used for special_values output impl_type get_rep()const { return ticks_; } protected: explicit time_duration(impl_type in) : ticks_(in) {} impl_type ticks_; }; //! Template for instantiating derived adjusting durations /* These templates are designed to work with multiples of * 10 for frac_of_second and resoultion adjustment */ template class subsecond_duration : public base_duration { public: typedef typename base_duration::impl_type impl_type; typedef typename base_duration::traits_type traits_type; private: // To avoid integer overflow we precompute the duration resolution conversion coefficient (ticket #3471) BOOST_STATIC_ASSERT_MSG((traits_type::ticks_per_second >= frac_of_second ? traits_type::ticks_per_second % frac_of_second : frac_of_second % traits_type::ticks_per_second) == 0,\ "The base duration resolution must be a multiple of the subsecond duration resolution"); BOOST_STATIC_CONSTANT(boost::int64_t, adjustment_ratio = (traits_type::ticks_per_second >= frac_of_second ? traits_type::ticks_per_second / frac_of_second : frac_of_second / traits_type::ticks_per_second)); public: explicit subsecond_duration(boost::int64_t ss) : base_duration(impl_type(traits_type::ticks_per_second >= frac_of_second ? ss * adjustment_ratio : ss / adjustment_ratio)) { } }; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/time_facet.hpp000644 000765 000024 00000162333 12233035540 022716 0ustar00honglistaff000000 000000 #ifndef _DATE_TIME_FACET__HPP__ #define _DATE_TIME_FACET__HPP__ /* Copyright (c) 2004-2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Martin Andrian, Jeff Garland, Bart Garst * $Date: 2012-09-22 09:04:10 -0700 (Sat, 22 Sep 2012) $ */ #include #include #include #include #include #include #include // i/ostreambuf_iterator #include #include #include #include #include #include #include #include #include #include #include #include // absolute_value namespace boost { namespace date_time { template struct time_formats { public: typedef CharT char_type; static const char_type fractional_seconds_format[3]; // f static const char_type fractional_seconds_or_none_format[3]; // F static const char_type seconds_with_fractional_seconds_format[3]; // s static const char_type seconds_format[3]; // S static const char_type hours_format[3]; // H static const char_type unrestricted_hours_format[3]; // O static const char_type full_24_hour_time_format[3]; // T static const char_type full_24_hour_time_expanded_format[9]; // HH:MM:SS static const char_type short_24_hour_time_format[3]; // R static const char_type short_24_hour_time_expanded_format[6]; // HH:MM static const char_type standard_format[9]; // x X static const char_type zone_abbrev_format[3]; // z static const char_type zone_name_format[3]; // Z static const char_type zone_iso_format[3]; // q static const char_type zone_iso_extended_format[3]; // Q static const char_type posix_zone_string_format[4]; // ZP static const char_type duration_sign_negative_only[3]; // - static const char_type duration_sign_always[3]; // + static const char_type duration_seperator[2]; static const char_type negative_sign[2]; //- static const char_type positive_sign[2]; //+ static const char_type iso_time_format_specifier[18]; static const char_type iso_time_format_extended_specifier[22]; //default ptime format is YYYY-Mon-DD HH:MM:SS[.fff...][ zzz] static const char_type default_time_format[23]; // default_time_input_format uses a posix_time_zone_string instead of a time zone abbrev static const char_type default_time_input_format[24]; //default time_duration format is HH:MM:SS[.fff...] static const char_type default_time_duration_format[11]; }; template const typename time_formats::char_type time_formats::fractional_seconds_format[3] = {'%','f'}; template const typename time_formats::char_type time_formats::fractional_seconds_or_none_format[3] = {'%','F'}; template const typename time_formats::char_type time_formats::seconds_with_fractional_seconds_format[3] = {'%','s'}; template const typename time_formats::char_type time_formats::seconds_format[3] = {'%','S'}; template const typename time_formats::char_type time_formats::hours_format[3] = {'%','H'}; template const typename time_formats::char_type time_formats::unrestricted_hours_format[3] = {'%','O'}; template const typename time_formats::char_type time_formats::full_24_hour_time_format[3] = {'%','T'}; template const typename time_formats::char_type time_formats::full_24_hour_time_expanded_format[9] = {'%','H',':','%','M',':','%','S'}; template const typename time_formats::char_type time_formats::short_24_hour_time_format[3] = {'%','R'}; template const typename time_formats::char_type time_formats::short_24_hour_time_expanded_format[6] = {'%','H',':','%','M'}; template const typename time_formats::char_type //time_formats::standard_format[5] = {'%','c',' ','%','z'}; time_formats::standard_format[9] = {'%','x',' ','%','X',' ','%','z'}; template const typename time_formats::char_type time_formats::zone_abbrev_format[3] = {'%','z'}; template const typename time_formats::char_type time_formats::zone_name_format[3] = {'%','Z'}; template const typename time_formats::char_type time_formats::zone_iso_format[3] = {'%','q'}; template const typename time_formats::char_type time_formats::zone_iso_extended_format[3] ={'%','Q'}; template const typename time_formats::char_type time_formats::posix_zone_string_format[4] ={'%','Z','P'}; template const typename time_formats::char_type time_formats::duration_seperator[2] = {':'}; template const typename time_formats::char_type time_formats::negative_sign[2] = {'-'}; template const typename time_formats::char_type time_formats::positive_sign[2] = {'+'}; template const typename time_formats::char_type time_formats::duration_sign_negative_only[3] ={'%','-'}; template const typename time_formats::char_type time_formats::duration_sign_always[3] ={'%','+'}; template const typename time_formats::char_type time_formats::iso_time_format_specifier[18] = {'%', 'Y', '%', 'm', '%', 'd', 'T', '%', 'H', '%', 'M', '%', 'S', '%', 'F', '%','q' }; template const typename time_formats::char_type time_formats::iso_time_format_extended_specifier[22] = {'%', 'Y', '-', '%', 'm', '-', '%', 'd', ' ', '%', 'H', ':', '%', 'M', ':', '%', 'S', '%', 'F','%','Q'}; template const typename time_formats::char_type time_formats::default_time_format[23] = {'%','Y','-','%','b','-','%','d',' ', '%','H',':','%','M',':','%','S','%','F',' ','%','z'}; template const typename time_formats::char_type time_formats::default_time_input_format[24] = {'%','Y','-','%','b','-','%','d',' ', '%','H',':','%','M',':','%','S','%','F',' ','%','Z','P'}; template const typename time_formats::char_type time_formats::default_time_duration_format[11] = {'%','O',':','%','M',':','%','S','%','F'}; /*! Facet used for format-based output of time types * This class provides for the use of format strings to output times. In addition * to the flags for formatting date elements, the following are the allowed format flags: * - %x %X => default format - enables addition of more flags to default (ie. "%x %X %z") * - %f => fractional seconds ".123456" * - %F => fractional seconds or none: like frac sec but empty if frac sec == 0 * - %s => seconds w/ fractional sec "02.123" (this is the same as "%S%f) * - %S => seconds "02" * - %z => abbreviated time zone "EDT" * - %Z => full time zone name "Eastern Daylight Time" */ template > > class time_facet : public boost::date_time::date_facet { typedef time_formats< CharT > formats_type; public: typedef typename time_type::date_type date_type; typedef typename time_type::time_duration_type time_duration_type; typedef boost::date_time::period period_type; typedef boost::date_time::date_facet base_type; typedef typename base_type::string_type string_type; typedef typename base_type::char_type char_type; typedef typename base_type::period_formatter_type period_formatter_type; typedef typename base_type::special_values_formatter_type special_values_formatter_type; typedef typename base_type::date_gen_formatter_type date_gen_formatter_type; static const char_type* fractional_seconds_format; // %f static const char_type* fractional_seconds_or_none_format; // %F static const char_type* seconds_with_fractional_seconds_format; // %s static const char_type* seconds_format; // %S static const char_type* hours_format; // %H static const char_type* unrestricted_hours_format; // %O static const char_type* standard_format; // %x X static const char_type* zone_abbrev_format; // %z static const char_type* zone_name_format; // %Z static const char_type* zone_iso_format; // %q static const char_type* zone_iso_extended_format; // %Q static const char_type* posix_zone_string_format; // %ZP static const char_type* duration_seperator; static const char_type* duration_sign_always; // %+ static const char_type* duration_sign_negative_only; // %- static const char_type* negative_sign; //- static const char_type* positive_sign; //+ static const char_type* iso_time_format_specifier; static const char_type* iso_time_format_extended_specifier; //default ptime format is YYYY-Mon-DD HH:MM:SS[.fff...][ zzz] static const char_type* default_time_format; //default time_duration format is HH:MM:SS[.fff...] static const char_type* default_time_duration_format; static std::locale::id id; #if defined (__SUNPRO_CC) && defined (_RWSTD_VER) std::locale::id& __get_id (void) const { return id; } #endif //! sets default formats for ptime, local_date_time, and time_duration explicit time_facet(::size_t ref_arg = 0) : base_type(default_time_format, period_formatter_type(), special_values_formatter_type(), date_gen_formatter_type(), ref_arg), m_time_duration_format(string_type(duration_sign_negative_only) + default_time_duration_format) {} //! Construct the facet with an explicitly specified format explicit time_facet(const char_type* format_arg, period_formatter_type period_formatter_arg = period_formatter_type(), const special_values_formatter_type& special_value_formatter = special_values_formatter_type(), date_gen_formatter_type dg_formatter = date_gen_formatter_type(), ::size_t ref_arg = 0) : base_type(format_arg, period_formatter_arg, special_value_formatter, dg_formatter, ref_arg), m_time_duration_format(string_type(duration_sign_negative_only) + default_time_duration_format) {} //! Changes format for time_duration void time_duration_format(const char_type* const format) { m_time_duration_format = format; } virtual void set_iso_format() { this->m_format = iso_time_format_specifier; } virtual void set_iso_extended_format() { this->m_format = iso_time_format_extended_specifier; } OutItrT put(OutItrT next_arg, std::ios_base& ios_arg, char_type fill_arg, const time_type& time_arg) const { if (time_arg.is_special()) { return this->do_put_special(next_arg, ios_arg, fill_arg, time_arg.date().as_special()); } string_type local_format(this->m_format); // %T and %R have to be replaced here since they are not standard boost::algorithm::replace_all(local_format, boost::as_literal(formats_type::full_24_hour_time_format), boost::as_literal(formats_type::full_24_hour_time_expanded_format)); boost::algorithm::replace_all(local_format, boost::as_literal(formats_type::short_24_hour_time_format), boost::as_literal(formats_type::short_24_hour_time_expanded_format)); string_type frac_str; if (local_format.find(seconds_with_fractional_seconds_format) != string_type::npos) { // replace %s with %S.nnn frac_str = fractional_seconds_as_string(time_arg.time_of_day(), false); char_type sep = std::use_facet >(ios_arg.getloc()).decimal_point(); string_type replace_string(seconds_format); replace_string += sep; replace_string += frac_str; boost::algorithm::replace_all(local_format, seconds_with_fractional_seconds_format, replace_string); } /* NOTE: replacing posix_zone_string_format must be done BEFORE * zone_name_format: "%ZP" & "%Z", if Z is checked first it will * incorrectly replace a zone_name where a posix_string should go */ if (local_format.find(posix_zone_string_format) != string_type::npos) { if(time_arg.zone_abbrev().empty()) { // if zone_abbrev() returns an empty string, we want to // erase posix_zone_string_format from format boost::algorithm::erase_all(local_format, posix_zone_string_format); } else{ boost::algorithm::replace_all(local_format, posix_zone_string_format, time_arg.zone_as_posix_string()); } } if (local_format.find(zone_name_format) != string_type::npos) { if(time_arg.zone_name().empty()) { /* TODO: this'll probably create problems if a user places * the zone_*_format flag in the format with a ptime. This * code removes the flag from the default formats */ // if zone_name() returns an empty string, we want to // erase zone_name_format & one preceeding space std::basic_ostringstream ss; ss << ' ' << zone_name_format; boost::algorithm::erase_all(local_format, ss.str()); } else{ boost::algorithm::replace_all(local_format, zone_name_format, time_arg.zone_name()); } } if (local_format.find(zone_abbrev_format) != string_type::npos) { if(time_arg.zone_abbrev(false).empty()) { /* TODO: this'll probably create problems if a user places * the zone_*_format flag in the format with a ptime. This * code removes the flag from the default formats */ // if zone_abbrev() returns an empty string, we want to // erase zone_abbrev_format & one preceeding space std::basic_ostringstream ss; ss << ' ' << zone_abbrev_format; boost::algorithm::erase_all(local_format, ss.str()); } else{ boost::algorithm::replace_all(local_format, zone_abbrev_format, time_arg.zone_abbrev(false)); } } if (local_format.find(zone_iso_extended_format) != string_type::npos) { if(time_arg.zone_name(true).empty()) { /* TODO: this'll probably create problems if a user places * the zone_*_format flag in the format with a ptime. This * code removes the flag from the default formats */ // if zone_name() returns an empty string, we want to // erase zone_iso_extended_format from format boost::algorithm::erase_all(local_format, zone_iso_extended_format); } else{ boost::algorithm::replace_all(local_format, zone_iso_extended_format, time_arg.zone_name(true)); } } if (local_format.find(zone_iso_format) != string_type::npos) { if(time_arg.zone_abbrev(true).empty()) { /* TODO: this'll probably create problems if a user places * the zone_*_format flag in the format with a ptime. This * code removes the flag from the default formats */ // if zone_abbrev() returns an empty string, we want to // erase zone_iso_format from format boost::algorithm::erase_all(local_format, zone_iso_format); } else{ boost::algorithm::replace_all(local_format, zone_iso_format, time_arg.zone_abbrev(true)); } } if (local_format.find(fractional_seconds_format) != string_type::npos) { // replace %f with nnnnnnn if (frac_str.empty()) { frac_str = fractional_seconds_as_string(time_arg.time_of_day(), false); } boost::algorithm::replace_all(local_format, fractional_seconds_format, frac_str); } if (local_format.find(fractional_seconds_or_none_format) != string_type::npos) { // replace %F with nnnnnnn or nothing if fs == 0 frac_str = fractional_seconds_as_string(time_arg.time_of_day(), true); if (frac_str.size()) { char_type sep = std::use_facet >(ios_arg.getloc()).decimal_point(); string_type replace_string; replace_string += sep; replace_string += frac_str; boost::algorithm::replace_all(local_format, fractional_seconds_or_none_format, replace_string); } else { boost::algorithm::erase_all(local_format, fractional_seconds_or_none_format); } } return this->do_put_tm(next_arg, ios_arg, fill_arg, to_tm(time_arg), local_format); } //! put function for time_duration OutItrT put(OutItrT next_arg, std::ios_base& ios_arg, char_type fill_arg, const time_duration_type& time_dur_arg) const { if (time_dur_arg.is_special()) { return this->do_put_special(next_arg, ios_arg, fill_arg, time_dur_arg.get_rep().as_special()); } string_type format(m_time_duration_format); if (time_dur_arg.is_negative()) { // replace %- with minus sign. Should we use the numpunct facet? boost::algorithm::replace_all(format, duration_sign_negative_only, negative_sign); // remove all the %+ in the string with '-' boost::algorithm::replace_all(format, duration_sign_always, negative_sign); } else { //duration is positive // remove all the %- combos from the string boost::algorithm::erase_all(format, duration_sign_negative_only); // remove all the %+ in the string with '+' boost::algorithm::replace_all(format, duration_sign_always, positive_sign); } // %T and %R have to be replaced here since they are not standard boost::algorithm::replace_all(format, boost::as_literal(formats_type::full_24_hour_time_format), boost::as_literal(formats_type::full_24_hour_time_expanded_format)); boost::algorithm::replace_all(format, boost::as_literal(formats_type::short_24_hour_time_format), boost::as_literal(formats_type::short_24_hour_time_expanded_format)); /* * It is possible for a time duration to span more then 24 hours. * Standard time_put::put is obliged to behave the same as strftime * (See ISO 14882-2003 22.2.5.3.1 par. 1) and strftime's behavior is * unspecified for the case when tm_hour field is outside 0-23 range * (See ISO 9899-1999 7.23.3.5 par. 3). So we must output %H and %O * here ourself. */ string_type hours_str; if (format.find(unrestricted_hours_format) != string_type::npos) { hours_str = hours_as_string(time_dur_arg); boost::algorithm::replace_all(format, unrestricted_hours_format, hours_str); } // We still have to process restricted hours format specifier. In order to // support parseability of durations in ISO format (%H%M%S), we'll have to // restrict the stringified hours length to 2 characters. if (format.find(hours_format) != string_type::npos) { if (hours_str.empty()) hours_str = hours_as_string(time_dur_arg); BOOST_ASSERT(hours_str.length() <= 2); boost::algorithm::replace_all(format, hours_format, hours_str); } string_type frac_str; if (format.find(seconds_with_fractional_seconds_format) != string_type::npos) { // replace %s with %S.nnn frac_str = fractional_seconds_as_string(time_dur_arg, false); char_type sep = std::use_facet >(ios_arg.getloc()).decimal_point(); string_type replace_string(seconds_format); replace_string += sep; replace_string += frac_str; boost::algorithm::replace_all(format, seconds_with_fractional_seconds_format, replace_string); } if (format.find(fractional_seconds_format) != string_type::npos) { // replace %f with nnnnnnn if (!frac_str.size()) { frac_str = fractional_seconds_as_string(time_dur_arg, false); } boost::algorithm::replace_all(format, fractional_seconds_format, frac_str); } if (format.find(fractional_seconds_or_none_format) != string_type::npos) { // replace %F with nnnnnnn or nothing if fs == 0 frac_str = fractional_seconds_as_string(time_dur_arg, true); if (frac_str.size()) { char_type sep = std::use_facet >(ios_arg.getloc()).decimal_point(); string_type replace_string; replace_string += sep; replace_string += frac_str; boost::algorithm::replace_all(format, fractional_seconds_or_none_format, replace_string); } else { boost::algorithm::erase_all(format, fractional_seconds_or_none_format); } } return this->do_put_tm(next_arg, ios_arg, fill_arg, to_tm(time_dur_arg), format); } OutItrT put(OutItrT next, std::ios_base& ios_arg, char_type fill, const period_type& p) const { return this->m_period_formatter.put_period(next, ios_arg, fill,p,*this); } protected: static string_type fractional_seconds_as_string(const time_duration_type& time_arg, bool null_when_zero) { typename time_duration_type::fractional_seconds_type frac_sec = time_arg.fractional_seconds(); if (null_when_zero && (frac_sec == 0)) { return string_type(); } //make sure there is no sign return integral_as_string( date_time::absolute_value(frac_sec), time_duration_type::num_fractional_digits()); } static string_type hours_as_string(const time_duration_type& time_arg, int width = 2) { return integral_as_string(date_time::absolute_value(time_arg.hours()), width); } template< typename IntT > static string_type integral_as_string(IntT val, int width = 2) { std::basic_ostringstream ss; ss.imbue(std::locale::classic()); // don't want any formatting ss << std::setw(width) << std::setfill(static_cast('0')); #if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) // JDG [7/6/02 VC++ compatibility] char_type buff[34]; ss << _i64toa(static_cast(val), buff, 10); #else ss << val; #endif return ss.str(); } private: string_type m_time_duration_format; }; template std::locale::id time_facet::id; template const typename time_facet::char_type* time_facet::fractional_seconds_format = time_formats::fractional_seconds_format; template const typename time_facet::char_type* time_facet::fractional_seconds_or_none_format = time_formats::fractional_seconds_or_none_format; template const typename time_facet::char_type* time_facet::seconds_with_fractional_seconds_format = time_formats::seconds_with_fractional_seconds_format; template const typename time_facet::char_type* time_facet::zone_name_format = time_formats::zone_name_format; template const typename time_facet::char_type* time_facet::zone_abbrev_format = time_formats::zone_abbrev_format; template const typename time_facet::char_type* time_facet::zone_iso_extended_format =time_formats::zone_iso_extended_format; template const typename time_facet::char_type* time_facet::posix_zone_string_format =time_formats::posix_zone_string_format; template const typename time_facet::char_type* time_facet::zone_iso_format = time_formats::zone_iso_format; template const typename time_facet::char_type* time_facet::seconds_format = time_formats::seconds_format; template const typename time_facet::char_type* time_facet::hours_format = time_formats::hours_format; template const typename time_facet::char_type* time_facet::unrestricted_hours_format = time_formats::unrestricted_hours_format; template const typename time_facet::char_type* time_facet::standard_format = time_formats::standard_format; template const typename time_facet::char_type* time_facet::duration_seperator = time_formats::duration_seperator; template const typename time_facet::char_type* time_facet::negative_sign = time_formats::negative_sign; template const typename time_facet::char_type* time_facet::positive_sign = time_formats::positive_sign; template const typename time_facet::char_type* time_facet::duration_sign_negative_only = time_formats::duration_sign_negative_only; template const typename time_facet::char_type* time_facet::duration_sign_always = time_formats::duration_sign_always; template const typename time_facet::char_type* time_facet::iso_time_format_specifier = time_formats::iso_time_format_specifier; template const typename time_facet::char_type* time_facet::iso_time_format_extended_specifier = time_formats::iso_time_format_extended_specifier; template const typename time_facet::char_type* time_facet::default_time_format = time_formats::default_time_format; template const typename time_facet::char_type* time_facet::default_time_duration_format = time_formats::default_time_duration_format; //! Facet for format-based input. /*! */ template > > class time_input_facet : public boost::date_time::date_input_facet { public: typedef typename time_type::date_type date_type; typedef typename time_type::time_duration_type time_duration_type; typedef typename time_duration_type::fractional_seconds_type fracional_seconds_type; typedef boost::date_time::period period_type; typedef boost::date_time::date_input_facet base_type; typedef typename base_type::duration_type date_duration_type; typedef typename base_type::year_type year_type; typedef typename base_type::month_type month_type; typedef typename base_type::day_type day_type; typedef typename base_type::string_type string_type; typedef typename string_type::const_iterator const_itr; typedef typename base_type::char_type char_type; typedef typename base_type::format_date_parser_type format_date_parser_type; typedef typename base_type::period_parser_type period_parser_type; typedef typename base_type::special_values_parser_type special_values_parser_type; typedef typename base_type::date_gen_parser_type date_gen_parser_type; typedef typename base_type::special_values_parser_type::match_results match_results; static const char_type* fractional_seconds_format; // f static const char_type* fractional_seconds_or_none_format; // F static const char_type* seconds_with_fractional_seconds_format; // s static const char_type* seconds_format; // S static const char_type* standard_format; // x X static const char_type* zone_abbrev_format; // z static const char_type* zone_name_format; // Z static const char_type* zone_iso_format; // q static const char_type* zone_iso_extended_format; // Q static const char_type* duration_seperator; static const char_type* iso_time_format_specifier; static const char_type* iso_time_format_extended_specifier; static const char_type* default_time_input_format; static const char_type* default_time_duration_format; static std::locale::id id; //! Constructor that takes a format string for a ptime explicit time_input_facet(const string_type& format, ::size_t ref_arg = 0) : base_type(format, ref_arg), m_time_duration_format(default_time_duration_format) { } explicit time_input_facet(const string_type& format, const format_date_parser_type& date_parser, const special_values_parser_type& sv_parser, const period_parser_type& per_parser, const date_gen_parser_type& date_gen_parser, ::size_t ref_arg = 0) : base_type(format, date_parser, sv_parser, per_parser, date_gen_parser, ref_arg), m_time_duration_format(default_time_duration_format) {} //! sets default formats for ptime, local_date_time, and time_duration explicit time_input_facet(::size_t ref_arg = 0) : base_type(default_time_input_format, ref_arg), m_time_duration_format(default_time_duration_format) { } //! Set the format for time_duration void time_duration_format(const char_type* const format) { m_time_duration_format = format; } virtual void set_iso_format() { this->m_format = iso_time_format_specifier; } virtual void set_iso_extended_format() { this->m_format = iso_time_format_extended_specifier; } InItrT get(InItrT& sitr, InItrT& stream_end, std::ios_base& ios_arg, period_type& p) const { p = this->m_period_parser.get_period(sitr, stream_end, ios_arg, p, time_duration_type::unit(), *this); return sitr; } //default ptime format is YYYY-Mon-DD HH:MM:SS[.fff...][ zzz] //default time_duration format is %H:%M:%S%F HH:MM:SS[.fff...] InItrT get(InItrT& sitr, InItrT& stream_end, std::ios_base& ios_arg, time_duration_type& td) const { // skip leading whitespace while((sitr != stream_end) && std::isspace(*sitr)) { ++sitr; } bool use_current_char = false; // num_get will consume the +/-, we may need a copy if special_value char_type c = '\0'; if((sitr != stream_end) && (*sitr == '-' || *sitr == '+')) { c = *sitr; } typedef typename time_duration_type::hour_type hour_type; typedef typename time_duration_type::min_type min_type; typedef typename time_duration_type::sec_type sec_type; hour_type hour = 0; min_type min = 0; sec_type sec = 0; typename time_duration_type::fractional_seconds_type frac(0); typedef std::num_get num_get; if(!std::has_facet(ios_arg.getloc())) { num_get* ng = new num_get(); std::locale loc = std::locale(ios_arg.getloc(), ng); ios_arg.imbue(loc); } const_itr itr(m_time_duration_format.begin()); while (itr != m_time_duration_format.end() && (sitr != stream_end)) { if (*itr == '%') { ++itr; if (*itr != '%') { switch(*itr) { case 'O': { // A period may span more than 24 hours. In that case the format // string should be composed with the unrestricted hours specifier. hour = var_string_to_int(sitr, stream_end, std::numeric_limits::digits10 + 1); if(hour == -1){ return check_special_value(sitr, stream_end, td, c); } break; } case 'H': { match_results mr; hour = fixed_string_to_int(sitr, stream_end, mr, 2); if(hour == -1){ return check_special_value(sitr, stream_end, td, c); } break; } case 'M': { match_results mr; min = fixed_string_to_int(sitr, stream_end, mr, 2); if(min == -1){ return check_special_value(sitr, stream_end, td, c); } break; } case 's': case 'S': { match_results mr; sec = fixed_string_to_int(sitr, stream_end, mr, 2); if(sec == -1){ return check_special_value(sitr, stream_end, td, c); } if (*itr == 'S') break; // %s is the same as %S%f so we drop through into %f } case 'f': { // check for decimal, check special_values if missing if(*sitr == '.') { ++sitr; parse_frac_type(sitr, stream_end, frac); // sitr will point to next expected char after this parsing // is complete so no need to advance it use_current_char = true; } else { return check_special_value(sitr, stream_end, td, c); } break; } case 'F': { // check for decimal, skip if missing if(*sitr == '.') { ++sitr; parse_frac_type(sitr, stream_end, frac); // sitr will point to next expected char after this parsing // is complete so no need to advance it use_current_char = true; } else { // nothing was parsed so we don't want to advance sitr use_current_char = true; } break; } default: {} // ignore what we don't understand? }// switch } else { // itr == '%', second consecutive ++sitr; } ++itr; //advance past format specifier } else { //skip past chars in format and in buffer ++itr; // set use_current_char when sitr is already // pointing at the next character to process if (use_current_char) { use_current_char = false; } else { ++sitr; } } } td = time_duration_type(hour, min, sec, frac); return sitr; } //! Parses a time object from the input stream InItrT get(InItrT& sitr, InItrT& stream_end, std::ios_base& ios_arg, time_type& t) const { string_type tz_str; return get(sitr, stream_end, ios_arg, t, tz_str, false); } //! Expects a time_zone in the input stream InItrT get_local_time(InItrT& sitr, InItrT& stream_end, std::ios_base& ios_arg, time_type& t, string_type& tz_str) const { return get(sitr, stream_end, ios_arg, t, tz_str, true); } protected: InItrT get(InItrT& sitr, InItrT& stream_end, std::ios_base& ios_arg, time_type& t, string_type& tz_str, bool time_is_local) const { // skip leading whitespace while((sitr != stream_end) && std::isspace(*sitr)) { ++sitr; } bool use_current_char = false; bool use_current_format_char = false; // used whith two character flags // num_get will consume the +/-, we may need a copy if special_value char_type c = '\0'; if((sitr != stream_end) && (*sitr == '-' || *sitr == '+')) { c = *sitr; } typedef typename time_duration_type::hour_type hour_type; typedef typename time_duration_type::min_type min_type; typedef typename time_duration_type::sec_type sec_type; // time elements hour_type hour = 0; min_type min = 0; sec_type sec = 0; typename time_duration_type::fractional_seconds_type frac(0); // date elements short day_of_year(0); /* Initialized the following to their minimum values. These intermediate * objects are used so we get specific exceptions when part of the input * is unparsable. * Ex: "205-Jan-15" will throw a bad_year, "2005-Jsn-15"- bad_month, etc.*/ year_type t_year(1400); month_type t_month(1); day_type t_day(1); typedef std::num_get num_get; if(!std::has_facet(ios_arg.getloc())) { num_get* ng = new num_get(); std::locale loc = std::locale(ios_arg.getloc(), ng); ios_arg.imbue(loc); } const_itr itr(this->m_format.begin()); while (itr != this->m_format.end() && (sitr != stream_end)) { if (*itr == '%') { ++itr; if (*itr != '%') { // the cases are grouped by date & time flags - not alphabetical order switch(*itr) { // date flags case 'Y': case 'y': { char_type cs[3] = { '%', *itr }; string_type s(cs); match_results mr; try { t_year = this->m_parser.parse_year(sitr, stream_end, s, mr); } catch(std::out_of_range&) { // base class for bad_year exception if(this->m_sv_parser.match(sitr, stream_end, mr)) { t = time_type(static_cast(mr.current_match)); return sitr; } else { throw; // rethrow bad_year } } break; } case 'B': case 'b': case 'm': { char_type cs[3] = { '%', *itr }; string_type s(cs); match_results mr; try { t_month = this->m_parser.parse_month(sitr, stream_end, s, mr); } catch(std::out_of_range&) { // base class for bad_month exception if(this->m_sv_parser.match(sitr, stream_end, mr)) { t = time_type(static_cast(mr.current_match)); return sitr; } else { throw; // rethrow bad_month } } // did m_parser already advance sitr to next char? if(mr.has_remaining()) { use_current_char = true; } break; } case 'a': case 'A': case 'w': { // weekday is not used in construction but we need to get it out of the stream char_type cs[3] = { '%', *itr }; string_type s(cs); match_results mr; typename date_type::day_of_week_type wd(0); try { wd = this->m_parser.parse_weekday(sitr, stream_end, s, mr); } catch(std::out_of_range&) { // base class for bad_weekday exception if(this->m_sv_parser.match(sitr, stream_end, mr)) { t = time_type(static_cast(mr.current_match)); return sitr; } else { throw; // rethrow bad_weekday } } // did m_parser already advance sitr to next char? if(mr.has_remaining()) { use_current_char = true; } break; } case 'j': { // code that gets julian day (from format_date_parser) match_results mr; day_of_year = fixed_string_to_int(sitr, stream_end, mr, 3); if(day_of_year == -1) { if(this->m_sv_parser.match(sitr, stream_end, mr)) { t = time_type(static_cast(mr.current_match)); return sitr; } } // these next two lines are so we get an exception with bad input typedef typename time_type::date_type::day_of_year_type day_of_year_type; day_of_year_type t_day_of_year(day_of_year); break; } case 'd': { try { t_day = this->m_parser.parse_day_of_month(sitr, stream_end); } catch(std::out_of_range&) { // base class for exception bad_day_of_month match_results mr; if(this->m_sv_parser.match(sitr, stream_end, mr)) { t = time_type(static_cast(mr.current_match)); return sitr; } else { throw; // rethrow bad_day_of_month } } break; } // time flags case 'H': { match_results mr; hour = fixed_string_to_int(sitr, stream_end, mr, 2); if(hour == -1){ return check_special_value(sitr, stream_end, t, c); } break; } case 'M': { match_results mr; min = fixed_string_to_int(sitr, stream_end, mr, 2); if(min == -1){ return check_special_value(sitr, stream_end, t, c); } break; } case 's': case 'S': { match_results mr; sec = fixed_string_to_int(sitr, stream_end, mr, 2); if(sec == -1){ return check_special_value(sitr, stream_end, t, c); } if (*itr == 'S') break; // %s is the same as %S%f so we drop through into %f } case 'f': { // check for decimal, check SV if missing if(*sitr == '.') { ++sitr; parse_frac_type(sitr, stream_end, frac); // sitr will point to next expected char after this parsing // is complete so no need to advance it use_current_char = true; } else { return check_special_value(sitr, stream_end, t, c); } break; } case 'F': { // check for decimal, skip if missing if(*sitr == '.') { ++sitr; parse_frac_type(sitr, stream_end, frac); // sitr will point to next expected char after this parsing // is complete so no need to advance it use_current_char = true; } else { // nothing was parsed so we don't want to advance sitr use_current_char = true; } break; } // time_zone flags //case 'q': //case 'Q': //case 'z': case 'Z': { if(time_is_local) { // skip if 't' is a ptime ++itr; if(*itr == 'P') { // skip leading whitespace while((sitr != stream_end) && std::isspace(*sitr)) { ++sitr; } // parse zone while((sitr != stream_end) && (!std::isspace(*sitr))) { tz_str += *sitr; ++sitr; } } else { use_current_format_char = true; } } else { // nothing was parsed so we don't want to advance sitr use_current_char = true; } break; } default: {} // ignore what we don't understand? }// switch } else { // itr == '%', second consecutive ++sitr; } if(use_current_format_char) { use_current_format_char = false; } else { ++itr; //advance past format specifier } } else { //skip past chars in format and in buffer ++itr; // set use_current_char when sitr is already // pointing at the next character to process if (use_current_char) { use_current_char = false; } else { ++sitr; } } } date_type d(not_a_date_time); if (day_of_year > 0) { d = date_type(static_cast(t_year-1),12,31) + date_duration_type(day_of_year); } else { d = date_type(t_year, t_month, t_day); } time_duration_type td(hour, min, sec, frac); t = time_type(d, td); return sitr; } //! Helper function to check for special_value /*! First character may have been consumed during original parse * attempt. Parameter 'c' should be a copy of that character. * Throws ios_base::failure if parse fails. */ template inline InItrT check_special_value(InItrT& sitr,InItrT& stream_end, temporal_type& tt, char_type c='\0') const { match_results mr; if((c == '-' || c == '+') && (*sitr != c)) { // was the first character consumed? mr.cache += c; } this->m_sv_parser.match(sitr, stream_end, mr); if(mr.current_match == match_results::PARSE_ERROR) { std::string tmp = convert_string_type(mr.cache); boost::throw_exception(std::ios_base::failure("Parse failed. No match found for '" + tmp + "'")); BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(return sitr); // should never reach } tt = temporal_type(static_cast(mr.current_match)); return sitr; } //! Helper function for parsing a fractional second type from the stream void parse_frac_type(InItrT& sitr, InItrT& stream_end, fracional_seconds_type& frac) const { string_type cache; while((sitr != stream_end) && std::isdigit(*sitr)) { cache += *sitr; ++sitr; } if(cache.size() > 0) { unsigned short precision = time_duration_type::num_fractional_digits(); // input may be only the first few decimal places if(cache.size() < precision) { frac = lexical_cast(cache); frac = decimal_adjust(frac, static_cast(precision - cache.size())); } else { // if input has too many decimal places, drop excess digits frac = lexical_cast(cache.substr(0, precision)); } } } private: string_type m_time_duration_format; //! Helper function to adjust trailing zeros when parsing fractional digits template inline int_type decimal_adjust(int_type val, const unsigned short places) const { unsigned long factor = 1; for(int i = 0; i < places; ++i){ factor *= 10; // shift decimal to the right } return val * factor; } }; template std::locale::id time_input_facet::id; template const typename time_input_facet::char_type* time_input_facet::fractional_seconds_format = time_formats::fractional_seconds_format; template const typename time_input_facet::char_type* time_input_facet::fractional_seconds_or_none_format = time_formats::fractional_seconds_or_none_format; template const typename time_input_facet::char_type* time_input_facet::seconds_with_fractional_seconds_format = time_formats::seconds_with_fractional_seconds_format; template const typename time_input_facet::char_type* time_input_facet::seconds_format = time_formats::seconds_format; template const typename time_input_facet::char_type* time_input_facet::standard_format = time_formats::standard_format; template const typename time_input_facet::char_type* time_input_facet::zone_abbrev_format = time_formats::zone_abbrev_format; template const typename time_input_facet::char_type* time_input_facet::zone_name_format = time_formats::zone_name_format; template const typename time_input_facet::char_type* time_input_facet::zone_iso_format = time_formats::zone_iso_format; template const typename time_input_facet::char_type* time_input_facet::zone_iso_extended_format = time_formats::zone_iso_extended_format; template const typename time_input_facet::char_type* time_input_facet::duration_seperator = time_formats::duration_seperator; template const typename time_input_facet::char_type* time_input_facet::iso_time_format_specifier = time_formats::iso_time_format_specifier; template const typename time_input_facet::char_type* time_input_facet::iso_time_format_extended_specifier = time_formats::iso_time_format_extended_specifier; template const typename time_input_facet::char_type* time_input_facet::default_time_input_format = time_formats::default_time_input_format; template const typename time_input_facet::char_type* time_input_facet::default_time_duration_format = time_formats::default_time_duration_format; } } // namespaces #endif passenger-4.0.37/ext/boost/date_time/time_formatting_streams.hpp000644 000765 000024 00000007327 12233035540 025545 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_TIME_FORMATTING_STREAMS_HPP___ #define DATE_TIME_TIME_FORMATTING_STREAMS_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $ */ #include #ifndef BOOST_DATE_TIME_NO_LOCALE #include #include #include #include #include namespace boost { namespace date_time { //! Put a time type into a stream using appropriate facets template class ostream_time_duration_formatter { public: typedef std::basic_ostream ostream_type; typedef typename time_duration_type::fractional_seconds_type fractional_seconds_type; //! Put time into an ostream static void duration_put(const time_duration_type& td, ostream_type& os) { if(td.is_special()) { os << td.get_rep(); } else { charT fill_char = '0'; if(td.is_negative()) { os << '-'; } os << std::setw(2) << std::setfill(fill_char) << absolute_value(td.hours()) << ":"; os << std::setw(2) << std::setfill(fill_char) << absolute_value(td.minutes()) << ":"; os << std::setw(2) << std::setfill(fill_char) << absolute_value(td.seconds()); fractional_seconds_type frac_sec = absolute_value(td.fractional_seconds()); if (frac_sec != 0) { os << "." << std::setw(time_duration_type::num_fractional_digits()) << std::setfill(fill_char) << frac_sec; } } // else } // duration_put }; //class ostream_time_duration_formatter //! Put a time type into a stream using appropriate facets template class ostream_time_formatter { public: typedef std::basic_ostream ostream_type; typedef typename time_type::date_type date_type; typedef typename time_type::time_duration_type time_duration_type; typedef ostream_time_duration_formatter duration_formatter; //! Put time into an ostream static void time_put(const time_type& t, ostream_type& os) { date_type d = t.date(); os << d; if(!d.is_infinity() && !d.is_not_a_date()) { os << " "; //TODO: fix the separator here. duration_formatter::duration_put(t.time_of_day(), os); } } // time_to_ostream }; //class ostream_time_formatter //! Put a time period into a stream using appropriate facets template class ostream_time_period_formatter { public: typedef std::basic_ostream ostream_type; typedef typename time_period_type::point_type time_type; typedef ostream_time_formatter time_formatter; //! Put time into an ostream static void period_put(const time_period_type& tp, ostream_type& os) { os << '['; //TODO: facet or manipulator for periods? time_formatter::time_put(tp.begin(), os); os << '/'; //TODO: facet or manipulator for periods? time_formatter::time_put(tp.last(), os); os << ']'; } // period_put }; //class ostream_time_period_formatter } } //namespace date_time #endif //BOOST_DATE_TIME_NO_LOCALE #endif passenger-4.0.37/ext/boost/date_time/time_iterator.hpp000644 000765 000024 00000002715 12233035540 023462 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_TIME_ITERATOR_HPP___ #define DATE_TIME_TIME_ITERATOR_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $ */ namespace boost { namespace date_time { //! Simple time iterator skeleton class template class time_itr { public: typedef typename time_type::time_duration_type time_duration_type; time_itr(time_type t, time_duration_type d) : current_(t), offset_(d) {} time_itr& operator++() { current_ = current_ + offset_; return *this; } time_itr& operator--() { current_ = current_ - offset_; return *this; } time_type operator*() {return current_;} time_type* operator->() {return ¤t_;} bool operator< (const time_type& t) {return current_ < t;} bool operator<= (const time_type& t) {return current_ <= t;} bool operator!= (const time_type& t) {return current_ != t;} bool operator== (const time_type& t) {return current_ == t;} bool operator> (const time_type& t) {return current_ > t;} bool operator>= (const time_type& t) {return current_ >= t;} private: time_type current_; time_duration_type offset_; }; } }//namespace date_time #endif passenger-4.0.37/ext/boost/date_time/time_parsing.hpp000644 000765 000024 00000025404 12233035540 023274 0ustar00honglistaff000000 000000 #ifndef _DATE_TIME_TIME_PARSING_HPP___ #define _DATE_TIME_TIME_PARSING_HPP___ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-10-10 12:05:03 -0700 (Wed, 10 Oct 2012) $ */ #include "boost/tokenizer.hpp" #include "boost/lexical_cast.hpp" #include "boost/date_time/date_parsing.hpp" #include "boost/cstdint.hpp" #include namespace boost { namespace date_time { //! computes exponential math like 2^8 => 256, only works with positive integers //Not general purpose, but needed b/c std::pow is not available //everywehere. Hasn't been tested with negatives and zeros template inline int_type power(int_type base, int_type exponent) { int_type result = 1; for(int i = 0; i < exponent; ++i){ result *= base; } return result; } //! Creates a time_duration object from a delimited string /*! Expected format for string is "[-]h[h][:mm][:ss][.fff]". * If the number of fractional digits provided is greater than the * precision of the time duration type then the extra digits are * truncated. * * A negative duration will be created if the first character in * string is a '-', all other '-' will be treated as delimiters. * Accepted delimiters are "-:,.". */ template inline time_duration str_from_delimited_time_duration(const std::basic_string& s) { unsigned short min=0, sec =0; int hour =0; bool is_neg = (s.at(0) == '-'); boost::int64_t fs=0; int pos = 0; typedef typename std::basic_string::traits_type traits_type; typedef boost::char_separator char_separator_type; typedef boost::tokenizer::const_iterator, std::basic_string > tokenizer; typedef typename boost::tokenizer::const_iterator, typename std::basic_string >::iterator tokenizer_iterator; char_type sep_chars[5] = {'-',':',',','.'}; char_separator_type sep(sep_chars); tokenizer tok(s,sep); for(tokenizer_iterator beg=tok.begin(); beg!=tok.end();++beg){ switch(pos) { case 0: { hour = boost::lexical_cast(*beg); break; } case 1: { min = boost::lexical_cast(*beg); break; } case 2: { sec = boost::lexical_cast(*beg); break; }; case 3: { int digits = static_cast(beg->length()); //Works around a bug in MSVC 6 library that does not support //operator>> thus meaning lexical_cast will fail to compile. #if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) // msvc wouldn't compile 'time_duration::num_fractional_digits()' // (required template argument list) as a workaround a temp // time_duration object was used time_duration td(hour,min,sec,fs); int precision = td.num_fractional_digits(); // _atoi64 is an MS specific function if(digits >= precision) { // drop excess digits fs = _atoi64(beg->substr(0, precision).c_str()); } else { fs = _atoi64(beg->c_str()); } #else int precision = time_duration::num_fractional_digits(); if(digits >= precision) { // drop excess digits fs = boost::lexical_cast(beg->substr(0, precision)); } else { fs = boost::lexical_cast(*beg); } #endif if(digits < precision){ // trailing zeros get dropped from the string, // "1:01:01.1" would yield .000001 instead of .100000 // the power() compensates for the missing decimal places fs *= power(10, precision - digits); } break; } default: break; }//switch pos++; } if(is_neg) { return -time_duration(hour, min, sec, fs); } else { return time_duration(hour, min, sec, fs); } } //! Creates a time_duration object from a delimited string /*! Expected format for string is "[-]h[h][:mm][:ss][.fff]". * If the number of fractional digits provided is greater than the * precision of the time duration type then the extra digits are * truncated. * * A negative duration will be created if the first character in * string is a '-', all other '-' will be treated as delimiters. * Accepted delimiters are "-:,.". */ template inline time_duration parse_delimited_time_duration(const std::string& s) { return str_from_delimited_time_duration(s); } //! Utility function to split appart string inline bool split(const std::string& s, char sep, std::string& first, std::string& second) { std::string::size_type sep_pos = s.find(sep); first = s.substr(0,sep_pos); if (sep_pos!=std::string::npos) second = s.substr(sep_pos+1); return true; } template inline time_type parse_delimited_time(const std::string& s, char sep) { typedef typename time_type::time_duration_type time_duration; typedef typename time_type::date_type date_type; //split date/time on a unique delimiter char such as ' ' or 'T' std::string date_string, tod_string; split(s, sep, date_string, tod_string); //call parse_date with first string date_type d = parse_date(date_string); //call parse_time_duration with remaining string time_duration td = parse_delimited_time_duration(tod_string); //construct a time return time_type(d, td); } //! Parse time duration part of an iso time of form: [-]hhmmss[.fff...] (eg: 120259.123 is 12 hours, 2 min, 59 seconds, 123000 microseconds) template inline time_duration parse_undelimited_time_duration(const std::string& s) { int precision = 0; { // msvc wouldn't compile 'time_duration::num_fractional_digits()' // (required template argument list) as a workaround, a temp // time_duration object was used time_duration tmp(0,0,0,1); precision = tmp.num_fractional_digits(); } // 'precision+1' is so we grab all digits, plus the decimal int offsets[] = {2,2,2, precision+1}; int pos = 0, sign = 0; int hours = 0; short min=0, sec=0; boost::int64_t fs=0; // increment one position if the string was "signed" if(s.at(sign) == '-') { ++sign; } // stlport choked when passing s.substr() to tokenizer // using a new string fixed the error std::string remain = s.substr(sign); /* We do not want the offset_separator to wrap the offsets, we * will never want to process more than: * 2 char, 2 char, 2 char, frac_sec length. * We *do* want the offset_separator to give us a partial for the * last characters if there were not enough provided in the input string. */ bool wrap_off = false; bool ret_part = true; boost::offset_separator osf(offsets, offsets+4, wrap_off, ret_part); typedef boost::tokenizer::const_iterator, std::basic_string > tokenizer; typedef boost::tokenizer::const_iterator, std::basic_string >::iterator tokenizer_iterator; tokenizer tok(remain, osf); for(tokenizer_iterator ti=tok.begin(); ti!=tok.end();++ti){ switch(pos) { case 0: { hours = boost::lexical_cast(*ti); break; } case 1: { min = boost::lexical_cast(*ti); break; } case 2: { sec = boost::lexical_cast(*ti); break; } case 3: { std::string char_digits(ti->substr(1)); // digits w/no decimal int digits = static_cast(char_digits.length()); //Works around a bug in MSVC 6 library that does not support //operator>> thus meaning lexical_cast will fail to compile. #if (defined(BOOST_MSVC) && (_MSC_VER <= 1200)) // 1200 == VC++ 6.0 // _atoi64 is an MS specific function if(digits >= precision) { // drop excess digits fs = _atoi64(char_digits.substr(0, precision).c_str()); } else if(digits == 0) { fs = 0; // just in case _atoi64 doesn't like an empty string } else { fs = _atoi64(char_digits.c_str()); } #else if(digits >= precision) { // drop excess digits fs = boost::lexical_cast(char_digits.substr(0, precision)); } else if(digits == 0) { fs = 0; // lexical_cast doesn't like empty strings } else { fs = boost::lexical_cast(char_digits); } #endif if(digits < precision){ // trailing zeros get dropped from the string, // "1:01:01.1" would yield .000001 instead of .100000 // the power() compensates for the missing decimal places fs *= power(10, precision - digits); } break; } default: break; }; pos++; } if(sign) { return -time_duration(hours, min, sec, fs); } else { return time_duration(hours, min, sec, fs); } } //! Parse time string of form YYYYMMDDThhmmss where T is delimeter between date and time template inline time_type parse_iso_time(const std::string& s, char sep) { typedef typename time_type::time_duration_type time_duration; typedef typename time_type::date_type date_type; //split date/time on a unique delimiter char such as ' ' or 'T' std::string date_string, tod_string; split(s, sep, date_string, tod_string); //call parse_date with first string date_type d = parse_undelimited_date(date_string); //call parse_time_duration with remaining string time_duration td = parse_undelimited_time_duration(tod_string); //construct a time return time_type(d, td); } } }//namespace date_time #endif passenger-4.0.37/ext/boost/date_time/time_resolution_traits.hpp000644 000765 000024 00000011753 12233035540 025424 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_TIME_RESOLUTION_TRAITS_HPP #define DATE_TIME_TIME_RESOLUTION_TRAITS_HPP /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2009-06-06 04:25:55 -0700 (Sat, 06 Jun 2009) $ */ #include #include #include #include namespace boost { namespace date_time { //! Simple function to calculate absolute value of a numeric type template // JDG [7/6/02 made a template], // moved here from time_duration.hpp 2003-Sept-4. inline T absolute_value(T x) { return x < 0 ? -x : x; } //! traits struct for time_resolution_traits implementation type struct time_resolution_traits_bi32_impl { typedef boost::int32_t int_type; typedef boost::int32_t impl_type; static int_type as_number(impl_type i){ return i;} //! Used to determine if implemented type is int_adapter or int static bool is_adapted() { return false;} }; //! traits struct for time_resolution_traits implementation type struct time_resolution_traits_adapted32_impl { typedef boost::int32_t int_type; typedef boost::date_time::int_adapter impl_type; static int_type as_number(impl_type i){ return i.as_number();} //! Used to determine if implemented type is int_adapter or int static bool is_adapted() { return true;} }; //! traits struct for time_resolution_traits implementation type struct time_resolution_traits_bi64_impl { typedef boost::int64_t int_type; typedef boost::int64_t impl_type; static int_type as_number(impl_type i){ return i;} //! Used to determine if implemented type is int_adapter or int static bool is_adapted() { return false;} }; //! traits struct for time_resolution_traits implementation type struct time_resolution_traits_adapted64_impl { typedef boost::int64_t int_type; typedef boost::date_time::int_adapter impl_type; static int_type as_number(impl_type i){ return i.as_number();} //! Used to determine if implemented type is int_adapter or int static bool is_adapted() { return true;} }; template class time_resolution_traits { public: typedef typename frac_sec_type::int_type fractional_seconds_type; typedef typename frac_sec_type::int_type tick_type; typedef typename frac_sec_type::impl_type impl_type; typedef v_type day_type; typedef v_type hour_type; typedef v_type min_type; typedef v_type sec_type; // bring in function from frac_sec_type traits structs static fractional_seconds_type as_number(impl_type i) { return frac_sec_type::as_number(i); } static bool is_adapted() { return frac_sec_type::is_adapted(); } //Would like this to be frac_sec_type, but some compilers complain #if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) BOOST_STATIC_CONSTANT(boost::int64_t, ticks_per_second = resolution_adjust); #else BOOST_STATIC_CONSTANT(fractional_seconds_type, ticks_per_second = resolution_adjust); #endif static time_resolutions resolution() { return res; } static unsigned short num_fractional_digits() { return frac_digits; } static fractional_seconds_type res_adjust() { return resolution_adjust; } //! Any negative argument results in a negative tick_count static tick_type to_tick_count(hour_type hours, min_type minutes, sec_type seconds, fractional_seconds_type fs) { if(hours < 0 || minutes < 0 || seconds < 0 || fs < 0) { hours = absolute_value(hours); minutes = absolute_value(minutes); seconds = absolute_value(seconds); fs = absolute_value(fs); return (((((fractional_seconds_type(hours)*3600) + (fractional_seconds_type(minutes)*60) + seconds)*res_adjust()) + fs) * -1); } return (((fractional_seconds_type(hours)*3600) + (fractional_seconds_type(minutes)*60) + seconds)*res_adjust()) + fs; } }; typedef time_resolution_traits milli_res; typedef time_resolution_traits micro_res; typedef time_resolution_traits nano_res; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/time_system_counted.hpp000644 000765 000024 00000020364 12233035540 024676 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_TIME_SYSTEM_COUNTED_HPP #define DATE_TIME_TIME_SYSTEM_COUNTED_HPP /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/time_defs.hpp" #include namespace boost { namespace date_time { //! Time representation that uses a single integer count template struct counted_time_rep { typedef typename config::int_type int_type; typedef typename config::date_type date_type; typedef typename config::impl_type impl_type; typedef typename date_type::duration_type date_duration_type; typedef typename date_type::calendar_type calendar_type; typedef typename date_type::ymd_type ymd_type; typedef typename config::time_duration_type time_duration_type; typedef typename config::resolution_traits resolution_traits; counted_time_rep(const date_type& d, const time_duration_type& time_of_day) : time_count_(1) { if(d.is_infinity() || d.is_not_a_date() || time_of_day.is_special()) { time_count_ = time_of_day.get_rep() + d.day_count(); //std::cout << time_count_ << std::endl; } else { time_count_ = (d.day_number() * frac_sec_per_day()) + time_of_day.ticks(); } } explicit counted_time_rep(int_type count) : time_count_(count) {} explicit counted_time_rep(impl_type count) : time_count_(count) {} date_type date() const { if(time_count_.is_special()) { return date_type(time_count_.as_special()); } else { typename calendar_type::date_int_type dc = day_count(); //std::cout << "time_rep here:" << dc << std::endl; ymd_type ymd = calendar_type::from_day_number(dc); return date_type(ymd); } } //int_type day_count() const unsigned long day_count() const { /* resolution_traits::as_number returns a boost::int64_t & * frac_sec_per_day is also a boost::int64_t so, naturally, * the division operation returns a boost::int64_t. * The static_cast to an unsigned long is ok (results in no data loss) * because frac_sec_per_day is either the number of * microseconds per day, or the number of nanoseconds per day. * Worst case scenario: resolution_traits::as_number returns the * maximum value an int64_t can hold and frac_sec_per_day * is microseconds per day (lowest possible value). * The division operation will then return a value of 106751991 - * easily fitting in an unsigned long. */ return static_cast(resolution_traits::as_number(time_count_) / frac_sec_per_day()); } int_type time_count() const { return resolution_traits::as_number(time_count_); } int_type tod() const { return resolution_traits::as_number(time_count_) % frac_sec_per_day(); } static int_type frac_sec_per_day() { int_type seconds_per_day = 60*60*24; int_type fractional_sec_per_sec(resolution_traits::res_adjust()); return seconds_per_day*fractional_sec_per_sec; } bool is_pos_infinity()const { return impl_type::is_pos_inf(time_count_.as_number()); } bool is_neg_infinity()const { return impl_type::is_neg_inf(time_count_.as_number()); } bool is_not_a_date_time()const { return impl_type::is_not_a_number(time_count_.as_number()); } bool is_special()const { return time_count_.is_special(); } impl_type get_rep()const { return time_count_; } private: impl_type time_count_; }; //! An unadjusted time system implementation. template class counted_time_system { public: typedef time_rep time_rep_type; typedef typename time_rep_type::impl_type impl_type; typedef typename time_rep_type::time_duration_type time_duration_type; typedef typename time_duration_type::fractional_seconds_type fractional_seconds_type; typedef typename time_rep_type::date_type date_type; typedef typename time_rep_type::date_duration_type date_duration_type; template static void unused_var(const T&) {} static time_rep_type get_time_rep(const date_type& day, const time_duration_type& tod, date_time::dst_flags dst=not_dst) { unused_var(dst); return time_rep_type(day, tod); } static time_rep_type get_time_rep(special_values sv) { switch (sv) { case not_a_date_time: return time_rep_type(date_type(not_a_date_time), time_duration_type(not_a_date_time)); case pos_infin: return time_rep_type(date_type(pos_infin), time_duration_type(pos_infin)); case neg_infin: return time_rep_type(date_type(neg_infin), time_duration_type(neg_infin)); case max_date_time: { time_duration_type td = time_duration_type(24,0,0,0) - time_duration_type(0,0,0,1); return time_rep_type(date_type(max_date_time), td); } case min_date_time: return time_rep_type(date_type(min_date_time), time_duration_type(0,0,0,0)); default: return time_rep_type(date_type(not_a_date_time), time_duration_type(not_a_date_time)); } } static date_type get_date(const time_rep_type& val) { return val.date(); } static time_duration_type get_time_of_day(const time_rep_type& val) { if(val.is_special()) { return time_duration_type(val.get_rep().as_special()); } else{ return time_duration_type(0,0,0,val.tod()); } } static std::string zone_name(const time_rep_type&) { return ""; } static bool is_equal(const time_rep_type& lhs, const time_rep_type& rhs) { return (lhs.time_count() == rhs.time_count()); } static bool is_less(const time_rep_type& lhs, const time_rep_type& rhs) { return (lhs.time_count() < rhs.time_count()); } static time_rep_type add_days(const time_rep_type& base, const date_duration_type& dd) { if(base.is_special() || dd.is_special()) { return(time_rep_type(base.get_rep() + dd.get_rep())); } else { return time_rep_type(base.time_count() + (dd.days() * time_rep_type::frac_sec_per_day())); } } static time_rep_type subtract_days(const time_rep_type& base, const date_duration_type& dd) { if(base.is_special() || dd.is_special()) { return(time_rep_type(base.get_rep() - dd.get_rep())); } else{ return time_rep_type(base.time_count() - (dd.days() * time_rep_type::frac_sec_per_day())); } } static time_rep_type subtract_time_duration(const time_rep_type& base, const time_duration_type& td) { if(base.is_special() || td.is_special()) { return(time_rep_type(base.get_rep() - td.get_rep())); } else { return time_rep_type(base.time_count() - td.ticks()); } } static time_rep_type add_time_duration(const time_rep_type& base, time_duration_type td) { if(base.is_special() || td.is_special()) { return(time_rep_type(base.get_rep() + td.get_rep())); } else { return time_rep_type(base.time_count() + td.ticks()); } } static time_duration_type subtract_times(const time_rep_type& lhs, const time_rep_type& rhs) { if(lhs.is_special() || rhs.is_special()) { return(time_duration_type( impl_type::to_special((lhs.get_rep() - rhs.get_rep()).as_number()))); } else { fractional_seconds_type fs = lhs.time_count() - rhs.time_count(); return time_duration_type(0,0,0,fs); } } }; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/time_system_split.hpp000644 000765 000024 00000016757 12233035540 024403 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_TIME_SYSTEM_SPLIT_HPP #define DATE_TIME_TIME_SYSTEM_SPLIT_HPP /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-13 12:10:23 -0800 (Thu, 13 Nov 2008) $ */ #include #include "boost/date_time/compiler_config.hpp" #include "boost/date_time/special_defs.hpp" namespace boost { namespace date_time { //! An unadjusted time system implementation. #if (defined(BOOST_DATE_TIME_NO_MEMBER_INIT)) template #else template #endif class split_timedate_system { public: typedef typename config::time_rep_type time_rep_type; typedef typename config::date_type date_type; typedef typename config::time_duration_type time_duration_type; typedef typename config::date_duration_type date_duration_type; typedef typename config::int_type int_type; typedef typename config::resolution_traits resolution_traits; //86400 is number of seconds in a day... #if (defined(BOOST_DATE_TIME_NO_MEMBER_INIT)) typedef date_time::wrapping_int wrap_int_type; #else private: BOOST_STATIC_CONSTANT(int_type, ticks_per_day = INT64_C(86400) * config::tick_per_second); public: # if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0X581) ) typedef date_time::wrapping_int< split_timedate_system::int_type, split_timedate_system::ticks_per_day> wrap_int_type; # else typedef date_time::wrapping_int wrap_int_type; #endif #endif static time_rep_type get_time_rep(special_values sv) { switch (sv) { case not_a_date_time: return time_rep_type(date_type(not_a_date_time), time_duration_type(not_a_date_time)); case pos_infin: return time_rep_type(date_type(pos_infin), time_duration_type(pos_infin)); case neg_infin: return time_rep_type(date_type(neg_infin), time_duration_type(neg_infin)); case max_date_time: { time_duration_type td = time_duration_type(24,0,0,0) - time_duration_type(0,0,0,1); return time_rep_type(date_type(max_date_time), td); } case min_date_time: return time_rep_type(date_type(min_date_time), time_duration_type(0,0,0,0)); default: return time_rep_type(date_type(not_a_date_time), time_duration_type(not_a_date_time)); } } static time_rep_type get_time_rep(const date_type& day, const time_duration_type& tod, date_time::dst_flags /* dst */ = not_dst) { if(day.is_special() || tod.is_special()) { if(day.is_not_a_date() || tod.is_not_a_date_time()) { return time_rep_type(date_type(not_a_date_time), time_duration_type(not_a_date_time)); } else if(day.is_pos_infinity()) { if(tod.is_neg_infinity()) { return time_rep_type(date_type(not_a_date_time), time_duration_type(not_a_date_time)); } else { return time_rep_type(day, time_duration_type(pos_infin)); } } else if(day.is_neg_infinity()) { if(tod.is_pos_infinity()) { return time_rep_type(date_type(not_a_date_time), time_duration_type(not_a_date_time)); } else { return time_rep_type(day, time_duration_type(neg_infin)); } } else if(tod.is_pos_infinity()) { if(day.is_neg_infinity()) { return time_rep_type(date_type(not_a_date_time), time_duration_type(not_a_date_time)); } else { return time_rep_type(date_type(pos_infin), tod); } } else if(tod.is_neg_infinity()) { if(day.is_pos_infinity()) { return time_rep_type(date_type(not_a_date_time), time_duration_type(not_a_date_time)); } else { return time_rep_type(date_type(neg_infin), tod); } } } return time_rep_type(day, tod); } static date_type get_date(const time_rep_type& val) { return date_type(val.day); } static time_duration_type get_time_of_day(const time_rep_type& val) { return time_duration_type(val.time_of_day); } static std::string zone_name(const time_rep_type&) { return std::string(); } static bool is_equal(const time_rep_type& lhs, const time_rep_type& rhs) { return ((lhs.day == rhs.day) && (lhs.time_of_day == rhs.time_of_day)); } static bool is_less(const time_rep_type& lhs, const time_rep_type& rhs) { if (lhs.day < rhs.day) return true; if (lhs.day > rhs.day) return false; return (lhs.time_of_day < rhs.time_of_day); } static time_rep_type add_days(const time_rep_type& base, const date_duration_type& dd) { return time_rep_type(base.day+dd, base.time_of_day); } static time_rep_type subtract_days(const time_rep_type& base, const date_duration_type& dd) { return split_timedate_system::get_time_rep(base.day-dd, base.time_of_day); } static time_rep_type subtract_time_duration(const time_rep_type& base, const time_duration_type& td) { if(base.day.is_special() || td.is_special()) { return split_timedate_system::get_time_rep(base.day, -td); } if (td.is_negative()) { time_duration_type td1 = td.invert_sign(); return add_time_duration(base,td1); } wrap_int_type day_offset(base.time_of_day.ticks()); date_duration_type day_overflow(static_cast(day_offset.subtract(td.ticks()))); return time_rep_type(base.day-day_overflow, time_duration_type(0,0,0,day_offset.as_int())); } static time_rep_type add_time_duration(const time_rep_type& base, time_duration_type td) { if(base.day.is_special() || td.is_special()) { return split_timedate_system::get_time_rep(base.day, td); } if (td.is_negative()) { time_duration_type td1 = td.invert_sign(); return subtract_time_duration(base,td1); } wrap_int_type day_offset(base.time_of_day.ticks()); date_duration_type day_overflow(static_cast< typename date_duration_type::duration_rep_type >(day_offset.add(td.ticks()))); return time_rep_type(base.day+day_overflow, time_duration_type(0,0,0,day_offset.as_int())); } static time_duration_type subtract_times(const time_rep_type& lhs, const time_rep_type& rhs) { date_duration_type dd = lhs.day - rhs.day; time_duration_type td(dd.days()*24,0,0); //days * 24 hours time_duration_type td2 = lhs.time_of_day - rhs.time_of_day; return td+td2; // return time_rep_type(base.day-dd, base.time_of_day); } }; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/wrapping_int.hpp000644 000765 000024 00000012663 12233035540 023317 0ustar00honglistaff000000 000000 #ifndef _DATE_TIME_WRAPPING_INT_HPP__ #define _DATE_TIME_WRAPPING_INT_HPP__ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-09-22 15:33:33 -0700 (Sat, 22 Sep 2012) $ */ namespace boost { namespace date_time { //! A wrapping integer used to support time durations (WARNING: only instantiate with a signed type) /*! In composite date and time types this type is used to * wrap at the day boundary. * Ex: * A wrapping_int will roll over after nine, and * roll under below zero. This gives a range of [0,9] * * NOTE: it is strongly recommended that wrapping_int2 be used * instead of wrapping_int as wrapping_int is to be depricated * at some point soon. * * Also Note that warnings will occur if instantiated with an * unsigned type. Only a signed type should be used! */ template class wrapping_int { public: typedef int_type_ int_type; //typedef overflow_type_ overflow_type; static int_type wrap_value() {return wrap_val;} //!Add, return true if wrapped wrapping_int(int_type v) : value_(v) {} //! Explicit converion method int_type as_int() const {return value_;} operator int_type() const {return value_;} //!Add, return number of wraps performed /*! The sign of the returned value will indicate which direction the * wraps went. Ex: add a negative number and wrapping under could occur, * this would be indicated by a negative return value. If wrapping over * took place, a positive value would be returned */ template< typename IntT > IntT add(IntT v) { int_type remainder = static_cast(v % (wrap_val)); IntT overflow = static_cast(v / (wrap_val)); value_ = static_cast(value_ + remainder); return calculate_wrap(overflow); } //! Subtract will return '+d' if wrapping under took place ('d' is the number of wraps) /*! The sign of the returned value will indicate which direction the * wraps went (positive indicates wrap under, negative indicates wrap over). * Ex: subtract a negative number and wrapping over could * occur, this would be indicated by a negative return value. If * wrapping under took place, a positive value would be returned. */ template< typename IntT > IntT subtract(IntT v) { int_type remainder = static_cast(v % (wrap_val)); IntT underflow = static_cast(-(v / (wrap_val))); value_ = static_cast(value_ - remainder); return calculate_wrap(underflow) * -1; } private: int_type value_; template< typename IntT > IntT calculate_wrap(IntT wrap) { if ((value_) >= wrap_val) { ++wrap; value_ -= (wrap_val); } else if(value_ < 0) { --wrap; value_ += (wrap_val); } return wrap; } }; //! A wrapping integer used to wrap around at the top (WARNING: only instantiate with a signed type) /*! Bad name, quick impl to fix a bug -- fix later!! * This allows the wrap to restart at a value other than 0. */ template class wrapping_int2 { public: typedef int_type_ int_type; static int_type wrap_value() {return wrap_max;} static int_type min_value() {return wrap_min;} /*! If initializing value is out of range of [wrap_min, wrap_max], * value will be initialized to closest of min or max */ wrapping_int2(int_type v) : value_(v) { if(value_ < wrap_min) { value_ = wrap_min; } if(value_ > wrap_max) { value_ = wrap_max; } } //! Explicit converion method int_type as_int() const {return value_;} operator int_type() const {return value_;} //!Add, return number of wraps performed /*! The sign of the returned value will indicate which direction the * wraps went. Ex: add a negative number and wrapping under could occur, * this would be indicated by a negative return value. If wrapping over * took place, a positive value would be returned */ template< typename IntT > IntT add(IntT v) { int_type remainder = static_cast(v % (wrap_max - wrap_min + 1)); IntT overflow = static_cast(v / (wrap_max - wrap_min + 1)); value_ = static_cast(value_ + remainder); return calculate_wrap(overflow); } //! Subtract will return '-d' if wrapping under took place ('d' is the number of wraps) /*! The sign of the returned value will indicate which direction the * wraps went. Ex: subtract a negative number and wrapping over could * occur, this would be indicated by a positive return value. If * wrapping under took place, a negative value would be returned */ template< typename IntT > IntT subtract(IntT v) { int_type remainder = static_cast(v % (wrap_max - wrap_min + 1)); IntT underflow = static_cast(-(v / (wrap_max - wrap_min + 1))); value_ = static_cast(value_ - remainder); return calculate_wrap(underflow); } private: int_type value_; template< typename IntT > IntT calculate_wrap(IntT wrap) { if ((value_) > wrap_max) { ++wrap; value_ -= (wrap_max - wrap_min + 1); } else if((value_) < wrap_min) { --wrap; value_ += (wrap_max - wrap_min + 1); } return wrap; } }; } } //namespace date_time #endif passenger-4.0.37/ext/boost/date_time/year_month_day.hpp000644 000765 000024 00000002437 12233035540 023616 0ustar00honglistaff000000 000000 #ifndef YearMonthDayBase_HPP__ #define YearMonthDayBase_HPP__ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ namespace boost { namespace date_time { //! Allow rapid creation of ymd triples of different types template struct year_month_day_base { year_month_day_base(YearType year, MonthType month, DayType day); YearType year; MonthType month; DayType day; typedef YearType year_type; typedef MonthType month_type; typedef DayType day_type; }; //! A basic constructor template inline year_month_day_base::year_month_day_base(YearType y, MonthType m, DayType d) : year(y), month(m), day(d) {} } }//namespace date_time #endif passenger-4.0.37/ext/boost/date_time/posix_time/conversion.hpp000644 000765 000024 00000006117 12233035540 025160 0ustar00honglistaff000000 000000 #ifndef POSIX_TIME_CONVERSION_HPP___ #define POSIX_TIME_CONVERSION_HPP___ /* Copyright (c) 2002-2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2010-06-09 11:10:13 -0700 (Wed, 09 Jun 2010) $ */ #include #include #include #include #include #include // absolute_value #include namespace boost { namespace posix_time { //! Function that converts a time_t into a ptime. inline ptime from_time_t(std::time_t t) { ptime start(gregorian::date(1970,1,1)); return start + seconds(static_cast(t)); } //! Convert a time to a tm structure truncating any fractional seconds inline std::tm to_tm(const boost::posix_time::ptime& t) { std::tm timetm = boost::gregorian::to_tm(t.date()); boost::posix_time::time_duration td = t.time_of_day(); timetm.tm_hour = td.hours(); timetm.tm_min = td.minutes(); timetm.tm_sec = td.seconds(); timetm.tm_isdst = -1; // -1 used when dst info is unknown return timetm; } //! Convert a time_duration to a tm structure truncating any fractional seconds and zeroing fields for date components inline std::tm to_tm(const boost::posix_time::time_duration& td) { std::tm timetm; std::memset(&timetm, 0, sizeof(timetm)); timetm.tm_hour = date_time::absolute_value(td.hours()); timetm.tm_min = date_time::absolute_value(td.minutes()); timetm.tm_sec = date_time::absolute_value(td.seconds()); timetm.tm_isdst = -1; // -1 used when dst info is unknown return timetm; } //! Convert a tm struct to a ptime ignoring is_dst flag inline ptime ptime_from_tm(const std::tm& timetm) { boost::gregorian::date d = boost::gregorian::date_from_tm(timetm); return ptime(d, time_duration(timetm.tm_hour, timetm.tm_min, timetm.tm_sec)); } #if defined(BOOST_HAS_FTIME) //! Function to create a time object from an initialized FILETIME struct. /*! Function to create a time object from an initialized FILETIME struct. * A FILETIME struct holds 100-nanosecond units (0.0000001). When * built with microsecond resolution the FILETIME's sub second value * will be truncated. Nanosecond resolution has no truncation. * * \note FILETIME is part of the Win32 API, so it is not portable to non-windows * platforms. * * \note The function is templated on the FILETIME type, so that * it can be used with both native FILETIME and the ad-hoc * boost::date_time::winapi::file_time type. */ template< typename TimeT, typename FileTimeT > inline TimeT from_ftime(const FileTimeT& ft) { return boost::date_time::time_from_ftime(ft); } #endif // BOOST_HAS_FTIME } } //namespace boost::posix_time #endif passenger-4.0.37/ext/boost/date_time/posix_time/date_duration_operators.hpp000644 000765 000024 00000007421 12233035540 027712 0ustar00honglistaff000000 000000 #ifndef DATE_DURATION_OPERATORS_HPP___ #define DATE_DURATION_OPERATORS_HPP___ /* Copyright (c) 2004 CrystalClear Software, Inc. * Subject to the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or * http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/gregorian/greg_duration_types.hpp" #include "boost/date_time/posix_time/ptime.hpp" namespace boost { namespace posix_time { /*!@file date_duration_operators.hpp Operators for ptime and * optional gregorian types. Operators use snap-to-end-of-month behavior. * Further details on this behavior can be found in reference for * date_time/date_duration_types.hpp and documentation for * month and year iterators. */ /*! Adds a months object and a ptime. Result will be same * day-of-month as ptime unless original day was the last day of month. * see date_time::months_duration for more details */ inline ptime operator+(const ptime& t, const boost::gregorian::months& m) { return t + m.get_offset(t.date()); } /*! Adds a months object to a ptime. Result will be same * day-of-month as ptime unless original day was the last day of month. * see date_time::months_duration for more details */ inline ptime operator+=(ptime& t, const boost::gregorian::months& m) { // get_neg_offset returns a negative duration, so we add return t += m.get_offset(t.date()); } /*! Subtracts a months object and a ptime. Result will be same * day-of-month as ptime unless original day was the last day of month. * see date_time::months_duration for more details */ inline ptime operator-(const ptime& t, const boost::gregorian::months& m) { // get_neg_offset returns a negative duration, so we add return t + m.get_neg_offset(t.date()); } /*! Subtracts a months object from a ptime. Result will be same * day-of-month as ptime unless original day was the last day of month. * see date_time::months_duration for more details */ inline ptime operator-=(ptime& t, const boost::gregorian::months& m) { return t += m.get_neg_offset(t.date()); } // ptime & years /*! Adds a years object and a ptime. Result will be same * month and day-of-month as ptime unless original day was the * last day of month. see date_time::years_duration for more details */ inline ptime operator+(const ptime& t, const boost::gregorian::years& y) { return t + y.get_offset(t.date()); } /*! Adds a years object to a ptime. Result will be same * month and day-of-month as ptime unless original day was the * last day of month. see date_time::years_duration for more details */ inline ptime operator+=(ptime& t, const boost::gregorian::years& y) { return t += y.get_offset(t.date()); } /*! Subtracts a years object and a ptime. Result will be same * month and day-of-month as ptime unless original day was the * last day of month. see date_time::years_duration for more details */ inline ptime operator-(const ptime& t, const boost::gregorian::years& y) { // get_neg_offset returns a negative duration, so we add return t + y.get_neg_offset(t.date()); } /*! Subtracts a years object from a ptime. Result will be same * month and day-of-month as ptime unless original day was the * last day of month. see date_time::years_duration for more details */ inline ptime operator-=(ptime& t, const boost::gregorian::years& y) { // get_neg_offset returns a negative duration, so we add return t += y.get_neg_offset(t.date()); } }} // namespaces #endif // DATE_DURATION_OPERATORS_HPP___ passenger-4.0.37/ext/boost/date_time/posix_time/posix_time.hpp000644 000765 000024 00000002421 12233035540 025145 0ustar00honglistaff000000 000000 #ifndef POSIX_TIME_HPP___ #define POSIX_TIME_HPP___ /* Copyright (c) 2002-2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ /*!@file posix_time.hpp Global header file to get all of posix time types */ #include "boost/date_time/compiler_config.hpp" #include "boost/date_time/posix_time/ptime.hpp" #if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES) #include "boost/date_time/posix_time/date_duration_operators.hpp" #endif // output functions #if defined(BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS) #include "boost/date_time/posix_time/time_formatters_limited.hpp" #else #include "boost/date_time/posix_time/time_formatters.hpp" #endif // BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS // streaming operators #if defined(USE_DATE_TIME_PRE_1_33_FACET_IO) #include "boost/date_time/posix_time/posix_time_legacy_io.hpp" #else #include "boost/date_time/posix_time/posix_time_io.hpp" #endif // USE_DATE_TIME_PRE_1_33_FACET_IO #include "boost/date_time/posix_time/time_parsers.hpp" #include "boost/date_time/posix_time/conversion.hpp" #endif passenger-4.0.37/ext/boost/date_time/posix_time/posix_time_config.hpp000644 000765 000024 00000013501 12233035540 026473 0ustar00honglistaff000000 000000 #ifndef POSIX_TIME_CONFIG_HPP___ #define POSIX_TIME_CONFIG_HPP___ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2012-10-10 12:05:03 -0700 (Wed, 10 Oct 2012) $ */ #include //for MCW 7.2 std::abs(long long) #include #include #include #include #include #include #include #include namespace boost { namespace posix_time { //Remove the following line if you want 64 bit millisecond resolution time //#define BOOST_GDTL_POSIX_TIME_STD_CONFIG #ifdef BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG // set up conditional test compilations #define BOOST_DATE_TIME_HAS_MILLISECONDS #define BOOST_DATE_TIME_HAS_MICROSECONDS #define BOOST_DATE_TIME_HAS_NANOSECONDS typedef date_time::time_resolution_traits time_res_traits; #else // set up conditional test compilations #define BOOST_DATE_TIME_HAS_MILLISECONDS #define BOOST_DATE_TIME_HAS_MICROSECONDS #undef BOOST_DATE_TIME_HAS_NANOSECONDS typedef date_time::time_resolution_traits< boost::date_time::time_resolution_traits_adapted64_impl, boost::date_time::micro, 1000000, 6 > time_res_traits; // #undef BOOST_DATE_TIME_HAS_MILLISECONDS // #undef BOOST_DATE_TIME_HAS_MICROSECONDS // #undef BOOST_DATE_TIME_HAS_NANOSECONDS // typedef date_time::time_resolution_traits time_res_traits; #endif //! Base time duration type /*! \ingroup time_basics */ class time_duration : public date_time::time_duration { public: typedef time_res_traits rep_type; typedef time_res_traits::day_type day_type; typedef time_res_traits::hour_type hour_type; typedef time_res_traits::min_type min_type; typedef time_res_traits::sec_type sec_type; typedef time_res_traits::fractional_seconds_type fractional_seconds_type; typedef time_res_traits::tick_type tick_type; typedef time_res_traits::impl_type impl_type; time_duration(hour_type hour, min_type min, sec_type sec, fractional_seconds_type fs=0) : date_time::time_duration(hour,min,sec,fs) {} time_duration() : date_time::time_duration(0,0,0) {} //! Construct from special_values time_duration(boost::date_time::special_values sv) : date_time::time_duration(sv) {} //Give duration access to ticks constructor -- hide from users friend class date_time::time_duration; protected: explicit time_duration(impl_type tick_count) : date_time::time_duration(tick_count) {} }; #ifdef BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG //! Simple implementation for the time rep struct simple_time_rep { typedef gregorian::date date_type; typedef time_duration time_duration_type; simple_time_rep(date_type d, time_duration_type tod) : day(d), time_of_day(tod) { // make sure we have sane values for date & time if(!day.is_special() && !time_of_day.is_special()){ if(time_of_day >= time_duration_type(24,0,0)) { while(time_of_day >= time_duration_type(24,0,0)) { day += date_type::duration_type(1); time_of_day -= time_duration_type(24,0,0); } } else if(time_of_day.is_negative()) { while(time_of_day.is_negative()) { day -= date_type::duration_type(1); time_of_day += time_duration_type(24,0,0); } } } } date_type day; time_duration_type time_of_day; bool is_special()const { return(is_pos_infinity() || is_neg_infinity() || is_not_a_date_time()); } bool is_pos_infinity()const { return(day.is_pos_infinity() || time_of_day.is_pos_infinity()); } bool is_neg_infinity()const { return(day.is_neg_infinity() || time_of_day.is_neg_infinity()); } bool is_not_a_date_time()const { return(day.is_not_a_date() || time_of_day.is_not_a_date_time()); } }; class posix_time_system_config { public: typedef simple_time_rep time_rep_type; typedef gregorian::date date_type; typedef gregorian::date_duration date_duration_type; typedef time_duration time_duration_type; typedef time_res_traits::tick_type int_type; typedef time_res_traits resolution_traits; #if (defined(BOOST_DATE_TIME_NO_MEMBER_INIT)) //help bad compilers #else BOOST_STATIC_CONSTANT(boost::int64_t, tick_per_second = 1000000000); #endif }; #else class millisec_posix_time_system_config { public: typedef boost::int64_t time_rep_type; //typedef time_res_traits::tick_type time_rep_type; typedef gregorian::date date_type; typedef gregorian::date_duration date_duration_type; typedef time_duration time_duration_type; typedef time_res_traits::tick_type int_type; typedef time_res_traits::impl_type impl_type; typedef time_res_traits resolution_traits; #if (defined(BOOST_DATE_TIME_NO_MEMBER_INIT)) //help bad compilers #else BOOST_STATIC_CONSTANT(boost::int64_t, tick_per_second = 1000000); #endif }; #endif } }//namespace posix_time #endif passenger-4.0.37/ext/boost/date_time/posix_time/posix_time_duration.hpp000644 000765 000024 00000003670 12233035540 027061 0ustar00honglistaff000000 000000 #ifndef POSIX_TIME_DURATION_HPP___ #define POSIX_TIME_DURATION_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/posix_time/posix_time_config.hpp" namespace boost { namespace posix_time { //! Allows expression of durations as an hour count /*! \ingroup time_basics */ class hours : public time_duration { public: explicit hours(long h) : time_duration(h,0,0) {} }; //! Allows expression of durations as a minute count /*! \ingroup time_basics */ class minutes : public time_duration { public: explicit minutes(long m) : time_duration(0,m,0) {} }; //! Allows expression of durations as a seconds count /*! \ingroup time_basics */ class seconds : public time_duration { public: explicit seconds(long s) : time_duration(0,0,s) {} }; //! Allows expression of durations as milli seconds /*! \ingroup time_basics */ typedef date_time::subsecond_duration millisec; typedef date_time::subsecond_duration milliseconds; //! Allows expression of durations as micro seconds /*! \ingroup time_basics */ typedef date_time::subsecond_duration microsec; typedef date_time::subsecond_duration microseconds; //This is probably not needed anymore... #if defined(BOOST_DATE_TIME_HAS_NANOSECONDS) //! Allows expression of durations as nano seconds /*! \ingroup time_basics */ typedef date_time::subsecond_duration nanosec; typedef date_time::subsecond_duration nanoseconds; #endif } }//namespace posix_time #endif passenger-4.0.37/ext/boost/date_time/posix_time/posix_time_io.hpp000644 000765 000024 00000022256 12233035540 025644 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_POSIX_TIME_IO_HPP__ #define DATE_TIME_POSIX_TIME_IO_HPP__ /* Copyright (c) 2004-2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-13 11:05:31 -0800 (Thu, 13 Nov 2008) $ */ #include #include #include // i/ostreambuf_iterator #include #include #include #include #include #include #include // to_tm will be needed in the facets namespace boost { namespace posix_time { //! wptime_facet is depricated and will be phased out. use wtime_facet instead //typedef boost::date_time::time_facet wptime_facet; //! ptime_facet is depricated and will be phased out. use time_facet instead //typedef boost::date_time::time_facet ptime_facet; //! wptime_input_facet is depricated and will be phased out. use wtime_input_facet instead //typedef boost::date_time::time_input_facet wptime_input_facet; //! ptime_input_facet is depricated and will be phased out. use time_input_facet instead //typedef boost::date_time::time_input_facet ptime_input_facet; typedef boost::date_time::time_facet wtime_facet; typedef boost::date_time::time_facet time_facet; typedef boost::date_time::time_input_facet wtime_input_facet; typedef boost::date_time::time_input_facet time_input_facet; template inline std::basic_ostream& operator<<(std::basic_ostream& os, const ptime& p) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_ptime_facet; typedef std::time_put std_ptime_facet; std::ostreambuf_iterator oitr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(oitr, os, os.fill(), p); else { //instantiate a custom facet for dealing with times since the user //has not put one in the stream so far. This is for efficiency //since we would always need to reconstruct for every time period //if the locale did not already exist. Of course this will be overridden //if the user imbues as some later point. custom_ptime_facet* f = new custom_ptime_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(oitr, os, os.fill(), p); } return os; } //! input operator for ptime template inline std::basic_istream& operator>>(std::basic_istream& is, ptime& pt) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::time_input_facet time_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, pt); } else { time_input_facet* f = new time_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, pt); } } catch(...) { // mask tells us what exceptions are turned on std::ios_base::iostate exception_mask = is.exceptions(); // if the user wants exceptions on failbit, we'll rethrow our // date_time exception & set the failbit if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} // ignore this one throw; // rethrow original exception } else { // if the user want's to fail quietly, we simply set the failbit is.setstate(std::ios_base::failbit); } } } return is; } template inline std::basic_ostream& operator<<(std::basic_ostream& os, const boost::posix_time::time_period& p) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_ptime_facet; typedef std::time_put std_time_facet; std::ostreambuf_iterator oitr(os); if (std::has_facet(os.getloc())) { std::use_facet(os.getloc()).put(oitr, os, os.fill(), p); } else { //instantiate a custom facet for dealing with periods since the user //has not put one in the stream so far. This is for efficiency //since we would always need to reconstruct for every time period //if the local did not already exist. Of course this will be overridden //if the user imbues as some later point. custom_ptime_facet* f = new custom_ptime_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(oitr, os, os.fill(), p); } return os; } //! input operator for time_period template inline std::basic_istream& operator>>(std::basic_istream& is, time_period& tp) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::time_input_facet time_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, tp); } else { time_input_facet* f = new time_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, tp); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } //! ostream operator for posix_time::time_duration // todo fix to use facet -- place holder for now... template inline std::basic_ostream& operator<<(std::basic_ostream& os, const time_duration& td) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::time_facet custom_ptime_facet; typedef std::time_put std_ptime_facet; std::ostreambuf_iterator oitr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(oitr, os, os.fill(), td); else { //instantiate a custom facet for dealing with times since the user //has not put one in the stream so far. This is for efficiency //since we would always need to reconstruct for every time period //if the locale did not already exist. Of course this will be overridden //if the user imbues as some later point. custom_ptime_facet* f = new custom_ptime_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(oitr, os, os.fill(), td); } return os; } //! input operator for time_duration template inline std::basic_istream& operator>>(std::basic_istream& is, time_duration& td) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::time_input_facet time_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, td); } else { time_input_facet* f = new time_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, td); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } } } // namespaces #endif // DATE_TIME_POSIX_TIME_IO_HPP__ passenger-4.0.37/ext/boost/date_time/posix_time/posix_time_system.hpp000644 000765 000024 00000002261 12233035540 026553 0ustar00honglistaff000000 000000 #ifndef POSIX_TIME_SYSTEM_HPP___ #define POSIX_TIME_SYSTEM_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/posix_time/posix_time_config.hpp" #include "boost/date_time/time_system_split.hpp" #include "boost/date_time/time_system_counted.hpp" #include "boost/date_time/compiler_config.hpp" namespace boost { namespace posix_time { #ifdef BOOST_DATE_TIME_POSIX_TIME_STD_CONFIG #if (defined(BOOST_DATE_TIME_NO_MEMBER_INIT)) //help bad compilers typedef date_time::split_timedate_system posix_time_system; #else typedef date_time::split_timedate_system posix_time_system; #endif #else typedef date_time::counted_time_rep int64_time_rep; typedef date_time::counted_time_system posix_time_system; #endif } }//namespace posix_time #endif passenger-4.0.37/ext/boost/date_time/posix_time/posix_time_types.hpp000644 000765 000024 00000003406 12233035540 026375 0ustar00honglistaff000000 000000 /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland */ #ifndef POSIX_TIME_TYPES_HPP___ #define POSIX_TIME_TYPES_HPP___ #include "boost/date_time/time_clock.hpp" #include "boost/date_time/microsec_time_clock.hpp" #include "boost/date_time/posix_time/ptime.hpp" #if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES) #include "boost/date_time/posix_time/date_duration_operators.hpp" #endif #include "boost/date_time/posix_time/posix_time_duration.hpp" #include "boost/date_time/posix_time/posix_time_system.hpp" #include "boost/date_time/posix_time/time_period.hpp" #include "boost/date_time/time_iterator.hpp" #include "boost/date_time/dst_rules.hpp" namespace boost { //!Defines a non-adjusted time system with nano-second resolution and stable calculation properties namespace posix_time { //! Iterator over a defined time duration /*! \ingroup time_basics */ typedef date_time::time_itr time_iterator; //! A time clock that has a resolution of one second /*! \ingroup time_basics */ typedef date_time::second_clock second_clock; #ifdef BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK //! A time clock that has a resolution of one microsecond /*! \ingroup time_basics */ typedef date_time::microsec_clock microsec_clock; #endif //! Define a dst null dst rule for the posix_time system typedef date_time::null_dst_rules no_dst; //! Define US dst rule calculator for the posix_time system typedef date_time::us_dst_rules us_dst; } } //namespace posix_time #endif passenger-4.0.37/ext/boost/date_time/posix_time/ptime.hpp000644 000765 000024 00000004122 12233035540 024103 0ustar00honglistaff000000 000000 #ifndef POSIX_PTIME_HPP___ #define POSIX_PTIME_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/posix_time/posix_time_system.hpp" #include "boost/date_time/time.hpp" namespace boost { namespace posix_time { //bring special enum values into the namespace using date_time::special_values; using date_time::not_special; using date_time::neg_infin; using date_time::pos_infin; using date_time::not_a_date_time; using date_time::max_date_time; using date_time::min_date_time; //! Time type with no timezone or other adjustments /*! \ingroup time_basics */ class ptime : public date_time::base_time { public: typedef posix_time_system time_system_type; typedef time_system_type::time_rep_type time_rep_type; typedef time_system_type::time_duration_type time_duration_type; typedef ptime time_type; //! Construct with date and offset in day ptime(gregorian::date d,time_duration_type td) : date_time::base_time(d,td) {} //! Construct a time at start of the given day (midnight) explicit ptime(gregorian::date d) : date_time::base_time(d,time_duration_type(0,0,0)) {} //! Copy from time_rep ptime(const time_rep_type& rhs): date_time::base_time(rhs) {} //! Construct from special value ptime(const special_values sv) : date_time::base_time(sv) {} #if !defined(DATE_TIME_NO_DEFAULT_CONSTRUCTOR) // Default constructor constructs to not_a_date_time ptime() : date_time::base_time(gregorian::date(not_a_date_time), time_duration_type(not_a_date_time)) {} #endif // DATE_TIME_NO_DEFAULT_CONSTRUCTOR }; } }//namespace posix_time #endif passenger-4.0.37/ext/boost/date_time/posix_time/time_formatters.hpp000644 000765 000024 00000022203 12233035540 026171 0ustar00honglistaff000000 000000 #ifndef POSIXTIME_FORMATTERS_HPP___ #define POSIXTIME_FORMATTERS_HPP___ /* Copyright (c) 2002-2004 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2010-01-10 11:17:23 -0800 (Sun, 10 Jan 2010) $ */ #include #include #include #include #include #include #include // absolute_value #include /* NOTE: The "to_*_string" code for older compilers, ones that define * BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS, is located in * formatters_limited.hpp */ namespace boost { namespace posix_time { // template function called by wrapper functions: // to_*_string(time_duration) & to_*_wstring(time_duration) template inline std::basic_string to_simple_string_type(time_duration td) { std::basic_ostringstream ss; if(td.is_special()) { /* simply using 'ss << td.get_rep()' won't work on compilers * that don't support locales. This way does. */ // switch copied from date_names_put.hpp switch(td.get_rep().as_special()) { case not_a_date_time: //ss << "not-a-number"; ss << "not-a-date-time"; break; case pos_infin: ss << "+infinity"; break; case neg_infin: ss << "-infinity"; break; default: ss << ""; } } else { charT fill_char = '0'; if(td.is_negative()) { ss << '-'; } ss << std::setw(2) << std::setfill(fill_char) << date_time::absolute_value(td.hours()) << ":"; ss << std::setw(2) << std::setfill(fill_char) << date_time::absolute_value(td.minutes()) << ":"; ss << std::setw(2) << std::setfill(fill_char) << date_time::absolute_value(td.seconds()); //TODO the following is totally non-generic, yelling FIXME #if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) boost::int64_t frac_sec = date_time::absolute_value(td.fractional_seconds()); // JDG [7/6/02 VC++ compatibility] charT buff[32]; _i64toa(frac_sec, buff, 10); #else time_duration::fractional_seconds_type frac_sec = date_time::absolute_value(td.fractional_seconds()); #endif if (frac_sec != 0) { ss << "." << std::setw(time_duration::num_fractional_digits()) << std::setfill(fill_char) // JDG [7/6/02 VC++ compatibility] #if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) << buff; #else << frac_sec; #endif } }// else return ss.str(); } //! Time duration to string -hh::mm::ss.fffffff. Example: 10:09:03.0123456 /*!\ingroup time_format */ inline std::string to_simple_string(time_duration td) { return to_simple_string_type(td); } // template function called by wrapper functions: // to_*_string(time_duration) & to_*_wstring(time_duration) template inline std::basic_string to_iso_string_type(time_duration td) { std::basic_ostringstream ss; if(td.is_special()) { /* simply using 'ss << td.get_rep()' won't work on compilers * that don't support locales. This way does. */ // switch copied from date_names_put.hpp switch(td.get_rep().as_special()) { case not_a_date_time: //ss << "not-a-number"; ss << "not-a-date-time"; break; case pos_infin: ss << "+infinity"; break; case neg_infin: ss << "-infinity"; break; default: ss << ""; } } else { charT fill_char = '0'; if(td.is_negative()) { ss << '-'; } ss << std::setw(2) << std::setfill(fill_char) << date_time::absolute_value(td.hours()); ss << std::setw(2) << std::setfill(fill_char) << date_time::absolute_value(td.minutes()); ss << std::setw(2) << std::setfill(fill_char) << date_time::absolute_value(td.seconds()); //TODO the following is totally non-generic, yelling FIXME #if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) boost::int64_t frac_sec = date_time::absolute_value(td.fractional_seconds()); // JDG [7/6/02 VC++ compatibility] charT buff[32]; _i64toa(frac_sec, buff, 10); #else time_duration::fractional_seconds_type frac_sec = date_time::absolute_value(td.fractional_seconds()); #endif if (frac_sec != 0) { ss << "." << std::setw(time_duration::num_fractional_digits()) << std::setfill(fill_char) // JDG [7/6/02 VC++ compatibility] #if (defined(BOOST_MSVC) && (_MSC_VER < 1300)) << buff; #else << frac_sec; #endif } }// else return ss.str(); } //! Time duration in iso format -hhmmss,fffffff Example: 10:09:03,0123456 /*!\ingroup time_format */ inline std::string to_iso_string(time_duration td){ return to_iso_string_type(td); } //! Time to simple format CCYY-mmm-dd hh:mm:ss.fffffff /*!\ingroup time_format */ template inline std::basic_string to_simple_string_type(ptime t) { // can't use this w/gcc295, no to_simple_string_type<>(td) available std::basic_string ts = gregorian::to_simple_string_type(t.date());// + " "; if(!t.time_of_day().is_special()) { charT space = ' '; return ts + space + to_simple_string_type(t.time_of_day()); } else { return ts; } } inline std::string to_simple_string(ptime t){ return to_simple_string_type(t); } // function called by wrapper functions to_*_string(time_period) // & to_*_wstring(time_period) template inline std::basic_string to_simple_string_type(time_period tp) { charT beg = '[', mid = '/', end = ']'; std::basic_string d1(to_simple_string_type(tp.begin())); std::basic_string d2(to_simple_string_type(tp.last())); return std::basic_string(beg + d1 + mid + d2 + end); } //! Convert to string of form [YYYY-mmm-DD HH:MM::SS.ffffff/YYYY-mmm-DD HH:MM::SS.fffffff] /*!\ingroup time_format */ inline std::string to_simple_string(time_period tp){ return to_simple_string_type(tp); } // function called by wrapper functions to_*_string(time_period) // & to_*_wstring(time_period) template inline std::basic_string to_iso_string_type(ptime t) { std::basic_string ts = gregorian::to_iso_string_type(t.date());// + "T"; if(!t.time_of_day().is_special()) { charT sep = 'T'; return ts + sep + to_iso_string_type(t.time_of_day()); } else { return ts; } } //! Convert iso short form YYYYMMDDTHHMMSS where T is the date-time separator /*!\ingroup time_format */ inline std::string to_iso_string(ptime t){ return to_iso_string_type(t); } // function called by wrapper functions to_*_string(time_period) // & to_*_wstring(time_period) template inline std::basic_string to_iso_extended_string_type(ptime t) { std::basic_string ts = gregorian::to_iso_extended_string_type(t.date());// + "T"; if(!t.time_of_day().is_special()) { charT sep = 'T'; return ts + sep + to_simple_string_type(t.time_of_day()); } else { return ts; } } //! Convert to form YYYY-MM-DDTHH:MM:SS where T is the date-time separator /*!\ingroup time_format */ inline std::string to_iso_extended_string(ptime t){ return to_iso_extended_string_type(t); } #if !defined(BOOST_NO_STD_WSTRING) //! Time duration to wstring -hh::mm::ss.fffffff. Example: 10:09:03.0123456 /*!\ingroup time_format */ inline std::wstring to_simple_wstring(time_duration td) { return to_simple_string_type(td); } //! Time duration in iso format -hhmmss,fffffff Example: 10:09:03,0123456 /*!\ingroup time_format */ inline std::wstring to_iso_wstring(time_duration td){ return to_iso_string_type(td); } inline std::wstring to_simple_wstring(ptime t){ return to_simple_string_type(t); } //! Convert to wstring of form [YYYY-mmm-DD HH:MM::SS.ffffff/YYYY-mmm-DD HH:MM::SS.fffffff] /*!\ingroup time_format */ inline std::wstring to_simple_wstring(time_period tp){ return to_simple_string_type(tp); } //! Convert iso short form YYYYMMDDTHHMMSS where T is the date-time separator /*!\ingroup time_format */ inline std::wstring to_iso_wstring(ptime t){ return to_iso_string_type(t); } //! Convert to form YYYY-MM-DDTHH:MM:SS where T is the date-time separator /*!\ingroup time_format */ inline std::wstring to_iso_extended_wstring(ptime t){ return to_iso_extended_string_type(t); } #endif // BOOST_NO_STD_WSTRING } } //namespace posix_time #endif passenger-4.0.37/ext/boost/date_time/posix_time/time_parsers.hpp000644 000765 000024 00000002427 12233035540 025470 0ustar00honglistaff000000 000000 #ifndef POSIXTIME_PARSERS_HPP___ #define POSIXTIME_PARSERS_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/gregorian/gregorian.hpp" #include "boost/date_time/time_parsing.hpp" #include "boost/date_time/posix_time/posix_time_types.hpp" namespace boost { namespace posix_time { //! Creates a time_duration object from a delimited string /*! Expected format for string is "[-]h[h][:mm][:ss][.fff]". * A negative duration will be created if the first character in * string is a '-', all other '-' will be treated as delimiters. * Accepted delimiters are "-:,.". */ inline time_duration duration_from_string(const std::string& s) { return date_time::parse_delimited_time_duration(s); } inline ptime time_from_string(const std::string& s) { return date_time::parse_delimited_time(s, ' '); } inline ptime from_iso_string(const std::string& s) { return date_time::parse_iso_time(s, 'T'); } } } //namespace posix_time #endif passenger-4.0.37/ext/boost/date_time/posix_time/time_period.hpp000644 000765 000024 00000001341 12233035540 025265 0ustar00honglistaff000000 000000 #ifndef POSIX_TIME_PERIOD_HPP___ #define POSIX_TIME_PERIOD_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/period.hpp" #include "boost/date_time/posix_time/posix_time_duration.hpp" #include "boost/date_time/posix_time/ptime.hpp" namespace boost { namespace posix_time { //! Time period type /*! \ingroup time_basics */ typedef date_time::period time_period; } }//namespace posix_time #endif passenger-4.0.37/ext/boost/date_time/gregorian/conversion.hpp000644 000765 000024 00000004102 12233035540 024745 0ustar00honglistaff000000 000000 #ifndef _GREGORIAN__CONVERSION_HPP___ #define _GREGORIAN__CONVERSION_HPP___ /* Copyright (c) 2004-2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2010-06-09 11:10:13 -0700 (Wed, 09 Jun 2010) $ */ #include #include #include #include #include #include #include namespace boost { namespace gregorian { //! Converts a date to a tm struct. Throws out_of_range exception if date is a special value inline std::tm to_tm(const date& d) { if (d.is_special()) { std::string s = "tm unable to handle "; switch (d.as_special()) { case date_time::not_a_date_time: s += "not-a-date-time value"; break; case date_time::neg_infin: s += "-infinity date value"; break; case date_time::pos_infin: s += "+infinity date value"; break; default: s += "a special date value"; break; } boost::throw_exception(std::out_of_range(s)); } std::tm datetm; std::memset(&datetm, 0, sizeof(datetm)); boost::gregorian::date::ymd_type ymd = d.year_month_day(); datetm.tm_year = ymd.year - 1900; datetm.tm_mon = ymd.month - 1; datetm.tm_mday = ymd.day; datetm.tm_wday = d.day_of_week(); datetm.tm_yday = d.day_of_year() - 1; datetm.tm_isdst = -1; // negative because not enough info to set tm_isdst return datetm; } //! Converts a tm structure into a date dropping the any time values. inline date date_from_tm(const std::tm& datetm) { return date(static_cast(datetm.tm_year+1900), static_cast(datetm.tm_mon+1), static_cast(datetm.tm_mday)); } } } //namespace boost::gregorian #endif passenger-4.0.37/ext/boost/date_time/gregorian/formatters.hpp000644 000765 000024 00000013052 12233035540 024752 0ustar00honglistaff000000 000000 #ifndef GREGORIAN_FORMATTERS_HPP___ #define GREGORIAN_FORMATTERS_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/compiler_config.hpp" #include "boost/date_time/gregorian/gregorian_types.hpp" #if defined(BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS) #include "boost/date_time/date_formatting_limited.hpp" #else #include "boost/date_time/date_formatting.hpp" #endif #include "boost/date_time/iso_format.hpp" #include "boost/date_time/date_format_simple.hpp" /* NOTE: "to_*_string" code for older compilers, ones that define * BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS, is located in * formatters_limited.hpp */ namespace boost { namespace gregorian { // wrapper function for to_simple_(w)string(date) template inline std::basic_string to_simple_string_type(const date& d) { return date_time::date_formatter,charT>::date_to_string(d); } //! To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01 /*!\ingroup date_format */ inline std::string to_simple_string(const date& d) { return to_simple_string_type(d); } // wrapper function for to_simple_(w)string(date_period) template inline std::basic_string to_simple_string_type(const date_period& d) { typedef std::basic_string string_type; charT b = '[', m = '/', e=']'; string_type d1(date_time::date_formatter,charT>::date_to_string(d.begin())); string_type d2(date_time::date_formatter,charT>::date_to_string(d.last())); return string_type(b + d1 + m + d2 + e); } //! Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02] /*!\ingroup date_format */ inline std::string to_simple_string(const date_period& d) { return to_simple_string_type(d); } // wrapper function for to_iso_(w)string(date_period) template inline std::basic_string to_iso_string_type(const date_period& d) { charT sep = '/'; std::basic_string s(date_time::date_formatter,charT>::date_to_string(d.begin())); return s + sep + date_time::date_formatter,charT>::date_to_string(d.last()); } //! Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231 /*!\ingroup date_format */ inline std::string to_iso_string(const date_period& d) { return to_iso_string_type(d); } // wrapper function for to_iso_extended_(w)string(date) template inline std::basic_string to_iso_extended_string_type(const date& d) { return date_time::date_formatter,charT>::date_to_string(d); } //! Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31 /*!\ingroup date_format */ inline std::string to_iso_extended_string(const date& d) { return to_iso_extended_string_type(d); } // wrapper function for to_iso_(w)string(date) template inline std::basic_string to_iso_string_type(const date& d) { return date_time::date_formatter,charT>::date_to_string(d); } //! Convert to iso standard string YYYYMMDD. Example: 20021231 /*!\ingroup date_format */ inline std::string to_iso_string(const date& d) { return to_iso_string_type(d); } // wrapper function for to_sql_(w)string(date) template inline std::basic_string to_sql_string_type(const date& d) { date::ymd_type ymd = d.year_month_day(); std::basic_ostringstream ss; ss << ymd.year << "-" << std::setw(2) << std::setfill(ss.widen('0')) << ymd.month.as_number() //solves problem with gcc 3.1 hanging << "-" << std::setw(2) << std::setfill(ss.widen('0')) << ymd.day; return ss.str(); } inline std::string to_sql_string(const date& d) { return to_sql_string_type(d); } #if !defined(BOOST_NO_STD_WSTRING) //! Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02] /*!\ingroup date_format */ inline std::wstring to_simple_wstring(const date_period& d) { return to_simple_string_type(d); } //! To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01 /*!\ingroup date_format */ inline std::wstring to_simple_wstring(const date& d) { return to_simple_string_type(d); } //! Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231 /*!\ingroup date_format */ inline std::wstring to_iso_wstring(const date_period& d) { return to_iso_string_type(d); } //! Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31 /*!\ingroup date_format */ inline std::wstring to_iso_extended_wstring(const date& d) { return to_iso_extended_string_type(d); } //! Convert to iso standard string YYYYMMDD. Example: 20021231 /*!\ingroup date_format */ inline std::wstring to_iso_wstring(const date& d) { return to_iso_string_type(d); } inline std::wstring to_sql_wstring(const date& d) { return to_sql_string_type(d); } #endif // BOOST_NO_STD_WSTRING } } //namespace gregorian #endif passenger-4.0.37/ext/boost/date_time/gregorian/formatters_limited.hpp000644 000765 000024 00000005351 12233035540 026464 0ustar00honglistaff000000 000000 #ifndef GREGORIAN_FORMATTERS_LIMITED_HPP___ #define GREGORIAN_FORMATTERS_LIMITED_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/gregorian/gregorian_types.hpp" #include "boost/date_time/date_formatting_limited.hpp" #include "boost/date_time/iso_format.hpp" #include "boost/date_time/date_format_simple.hpp" #include "boost/date_time/compiler_config.hpp" namespace boost { namespace gregorian { //! To YYYY-mmm-DD string where mmm 3 char month name. Example: 2002-Jan-01 /*!\ingroup date_format */ inline std::string to_simple_string(const date& d) { return date_time::date_formatter >::date_to_string(d); } //! Convert date period to simple string. Example: [2002-Jan-01/2002-Jan-02] /*!\ingroup date_format */ inline std::string to_simple_string(const date_period& d) { std::string s("["); std::string d1(date_time::date_formatter >::date_to_string(d.begin())); std::string d2(date_time::date_formatter >::date_to_string(d.last())); return std::string("[" + d1 + "/" + d2 + "]"); } //! Date period to iso standard format CCYYMMDD/CCYYMMDD. Example: 20021225/20021231 /*!\ingroup date_format */ inline std::string to_iso_string(const date_period& d) { std::string s(date_time::date_formatter >::date_to_string(d.begin())); return s + "/" + date_time::date_formatter >::date_to_string(d.last()); } //! Convert to iso extended format string CCYY-MM-DD. Example 2002-12-31 /*!\ingroup date_format */ inline std::string to_iso_extended_string(const date& d) { return date_time::date_formatter >::date_to_string(d); } //! Convert to iso standard string YYYYMMDD. Example: 20021231 /*!\ingroup date_format */ inline std::string to_iso_string(const date& d) { return date_time::date_formatter >::date_to_string(d); } inline std::string to_sql_string(const date& d) { date::ymd_type ymd = d.year_month_day(); std::ostringstream ss; ss << ymd.year << "-" << std::setw(2) << std::setfill('0') << ymd.month.as_number() //solves problem with gcc 3.1 hanging << "-" << std::setw(2) << std::setfill('0') << ymd.day; return ss.str(); } } } //namespace gregorian #endif passenger-4.0.37/ext/boost/date_time/gregorian/greg_calendar.hpp000644 000765 000024 00000003037 12233035540 025343 0ustar00honglistaff000000 000000 #ifndef GREGORIAN_GREGORIAN_CALENDAR_HPP__ #define GREGORIAN_GREGORIAN_CALENDAR_HPP__ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2010-01-10 11:17:23 -0800 (Sun, 10 Jan 2010) $ */ #include #include #include #include #include #include namespace boost { namespace gregorian { //!An internal date representation that includes infinities, not a date typedef date_time::int_adapter fancy_date_rep; //! Gregorian calendar for this implementation, hard work in the base class gregorian_calendar : public date_time::gregorian_calendar_base { public: //! Type to hold a weekday (eg: Sunday, Monday,...) typedef greg_weekday day_of_week_type; //! Counter type from 1 to 366 for gregorian dates. typedef greg_day_of_year_rep day_of_year_type; //! Internal date representation that handles infinity, not a date typedef fancy_date_rep date_rep_type; //! Date rep implements the traits stuff as well typedef fancy_date_rep date_traits_type; private: }; } } //namespace gregorian #endif passenger-4.0.37/ext/boost/date_time/gregorian/greg_date.hpp000644 000765 000024 00000010620 12233035540 024503 0ustar00honglistaff000000 000000 #ifndef GREG_DATE_HPP___ #define GREG_DATE_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2010-01-10 11:17:23 -0800 (Sun, 10 Jan 2010) $ */ #include #include #include #include #include namespace boost { namespace gregorian { //bring special enum values into the namespace using date_time::special_values; using date_time::not_special; using date_time::neg_infin; using date_time::pos_infin; using date_time::not_a_date_time; using date_time::max_date_time; using date_time::min_date_time; //! A date type based on gregorian_calendar /*! This class is the primary interface for programming with greogorian dates. The is a lightweight type that can be freely passed by value. All comparison operators are supported. \ingroup date_basics */ class date : public date_time::date { public: typedef gregorian_calendar::year_type year_type; typedef gregorian_calendar::month_type month_type; typedef gregorian_calendar::day_type day_type; typedef gregorian_calendar::day_of_year_type day_of_year_type; typedef gregorian_calendar::ymd_type ymd_type; typedef gregorian_calendar::date_rep_type date_rep_type; typedef gregorian_calendar::date_int_type date_int_type; typedef date_duration duration_type; #if !defined(DATE_TIME_NO_DEFAULT_CONSTRUCTOR) //! Default constructor constructs with not_a_date_time date(): date_time::date(date_rep_type::from_special(not_a_date_time)) {} #endif // DATE_TIME_NO_DEFAULT_CONSTRUCTOR //! Main constructor with year, month, day date(year_type y, month_type m, day_type d) : date_time::date(y, m, d) { if (gregorian_calendar::end_of_month_day(y, m) < d) { boost::throw_exception(bad_day_of_month(std::string("Day of month is not valid for year"))); } } //! Constructor from a ymd_type structure explicit date(const ymd_type& ymd) : date_time::date(ymd) {} //! Needed copy constructor explicit date(const date_int_type& rhs): date_time::date(rhs) {} //! Needed copy constructor explicit date(date_rep_type rhs): date_time::date(rhs) {} //! Constructor for infinities, not a date, max and min date explicit date(special_values sv): date_time::date(date_rep_type::from_special(sv)) { if (sv == min_date_time) { *this = date(1400, 1, 1); } if (sv == max_date_time) { *this = date(9999, 12, 31); } } //!Return the Julian Day number for the date. date_int_type julian_day() const { ymd_type ymd = year_month_day(); return gregorian_calendar::julian_day_number(ymd); } //!Return the day of year 1..365 or 1..366 (for leap year) day_of_year_type day_of_year() const { date start_of_year(year(), 1, 1); unsigned short doy = static_cast((*this-start_of_year).days() + 1); return day_of_year_type(doy); } //!Return the Modified Julian Day number for the date. date_int_type modjulian_day() const { ymd_type ymd = year_month_day(); return gregorian_calendar::modjulian_day_number(ymd); } //!Return the iso 8601 week number 1..53 int week_number() const { ymd_type ymd = year_month_day(); return gregorian_calendar::week_number(ymd); } //! Return the day number from the calendar date_int_type day_number() const { return days_; } //! Return the last day of the current month date end_of_month() const { ymd_type ymd = year_month_day(); short eom_day = gregorian_calendar::end_of_month_day(ymd.year, ymd.month); return date(ymd.year, ymd.month, eom_day); } private: }; } } //namespace gregorian #endif passenger-4.0.37/ext/boost/date_time/gregorian/greg_day.hpp000644 000765 000024 00000003412 12233035540 024344 0ustar00honglistaff000000 000000 #ifndef GREG_DAY_HPP___ #define GREG_DAY_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/constrained_value.hpp" #include #include namespace boost { namespace gregorian { //! Exception type for gregorian day of month (1..31) struct bad_day_of_month : public std::out_of_range { bad_day_of_month() : std::out_of_range(std::string("Day of month value is out of range 1..31")) {} //! Allow other classes to throw with unique string for bad day like Feb 29 bad_day_of_month(const std::string& s) : std::out_of_range(s) {} }; //! Policy class that declares error handling and day of month ranges typedef CV::simple_exception_policy greg_day_policies; //! Generated represetation for gregorian day of month typedef CV::constrained_value greg_day_rep; //! Represent a day of the month (range 1 - 31) /*! This small class allows for simple conversion an integer value into a day of the month for a standard gregorian calendar. The type is automatically range checked so values outside of the range 1-31 will cause a bad_day_of_month exception */ class greg_day : public greg_day_rep { public: greg_day(unsigned short day_of_month) : greg_day_rep(day_of_month) {} unsigned short as_number() const {return value_;} operator unsigned short() const {return value_;} private: }; } } //namespace gregorian #endif passenger-4.0.37/ext/boost/date_time/gregorian/greg_day_of_year.hpp000644 000765 000024 00000002061 12233035540 026047 0ustar00honglistaff000000 000000 #ifndef GREG_DAY_OF_YEAR_HPP___ #define GREG_DAY_OF_YEAR_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/constrained_value.hpp" #include #include namespace boost { namespace gregorian { //! Exception type for day of year (1..366) struct bad_day_of_year : public std::out_of_range { bad_day_of_year() : std::out_of_range(std::string("Day of year value is out of range 1..366")) {} }; //! A day of the year range (1..366) typedef CV::simple_exception_policy greg_day_of_year_policies; //! Define a range representation type for the day of the year 1..366 typedef CV::constrained_value greg_day_of_year_rep; } } //namespace gregorian #endif passenger-4.0.37/ext/boost/date_time/gregorian/greg_duration.hpp000644 000765 000024 00000007472 12233035540 025426 0ustar00honglistaff000000 000000 #ifndef GREG_DURATION_HPP___ #define GREG_DURATION_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $ */ #include #include #include namespace boost { namespace gregorian { //!An internal date representation that includes infinities, not a date typedef boost::date_time::duration_traits_adapted date_duration_rep; //! Durations in days for gregorian system /*! \ingroup date_basics */ class date_duration : public boost::date_time::date_duration< date_duration_rep > { typedef boost::date_time::date_duration< date_duration_rep > base_type; public: typedef base_type::duration_rep duration_rep; //! Construct from a day count explicit date_duration(duration_rep day_count = 0) : base_type(day_count) {} //! construct from special_values date_duration(date_time::special_values sv) : base_type(sv) {} //! Copy constructor date_duration(const date_duration& other) : base_type(static_cast< base_type const& >(other)) {} //! Construct from another date_duration date_duration(const base_type& other) : base_type(other) {} // Relational operators // NOTE: Because of date_time::date_duration< T > design choice we don't use Boost.Operators here, // because we need the class to be a direct base. Either lose EBO, or define operators by hand. // The latter is more effecient. bool operator== (const date_duration& rhs) const { return base_type::operator== (rhs); } bool operator!= (const date_duration& rhs) const { return !operator== (rhs); } bool operator< (const date_duration& rhs) const { return base_type::operator< (rhs); } bool operator> (const date_duration& rhs) const { return !(base_type::operator< (rhs) || base_type::operator== (rhs)); } bool operator<= (const date_duration& rhs) const { return (base_type::operator< (rhs) || base_type::operator== (rhs)); } bool operator>= (const date_duration& rhs) const { return !base_type::operator< (rhs); } //! Subtract another duration -- result is signed date_duration& operator-= (const date_duration& rhs) { base_type::operator-= (rhs); return *this; } friend date_duration operator- (date_duration rhs, date_duration const& lhs) { rhs -= lhs; return rhs; } //! Add a duration -- result is signed date_duration& operator+= (const date_duration& rhs) { base_type::operator+= (rhs); return *this; } friend date_duration operator+ (date_duration rhs, date_duration const& lhs) { rhs += lhs; return rhs; } //! unary- Allows for dd = -date_duration(2); -> dd == -2 date_duration operator- ()const { return date_duration(get_rep() * (-1)); } //! Division operations on a duration with an integer. date_duration& operator/= (int divisor) { base_type::operator/= (divisor); return *this; } friend date_duration operator/ (date_duration rhs, int lhs) { rhs /= lhs; return rhs; } //! Returns the smallest duration -- used by to calculate 'end' static date_duration unit() { return date_duration(base_type::unit().get_rep()); } }; //! Shorthand for date_duration typedef date_duration days; } } //namespace gregorian #if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES) #include #endif #endif passenger-4.0.37/ext/boost/date_time/gregorian/greg_duration_types.hpp000644 000765 000024 00000002653 12233035540 026646 0ustar00honglistaff000000 000000 #ifndef GREG_DURATION_TYPES_HPP___ #define GREG_DURATION_TYPES_HPP___ /* Copyright (c) 2004 CrystalClear Software, Inc. * Subject to Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $ */ #include #include #include #include #include namespace boost { namespace gregorian { //! config struct for additional duration types (ie months_duration<> & years_duration<>) struct greg_durations_config { typedef date date_type; typedef date_time::int_adapter int_rep; typedef date_time::month_functor month_adjustor_type; }; typedef date_time::months_duration months; typedef date_time::years_duration years; class weeks_duration : public date_duration { public: weeks_duration(duration_rep w) : date_duration(w * 7) {} weeks_duration(date_time::special_values sv) : date_duration(sv) {} }; typedef weeks_duration weeks; }} // namespace boost::gregorian #endif // GREG_DURATION_TYPES_HPP___ passenger-4.0.37/ext/boost/date_time/gregorian/greg_month.hpp000644 000765 000024 00000006637 12233035540 024730 0ustar00honglistaff000000 000000 #ifndef GREG_MONTH_HPP___ #define GREG_MONTH_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/constrained_value.hpp" #include "boost/date_time/date_defs.hpp" #include "boost/shared_ptr.hpp" #include "boost/date_time/compiler_config.hpp" #include #include #include #include #include namespace boost { namespace gregorian { typedef date_time::months_of_year months_of_year; //bring enum values into the namespace using date_time::Jan; using date_time::Feb; using date_time::Mar; using date_time::Apr; using date_time::May; using date_time::Jun; using date_time::Jul; using date_time::Aug; using date_time::Sep; using date_time::Oct; using date_time::Nov; using date_time::Dec; using date_time::NotAMonth; using date_time::NumMonths; //! Exception thrown if a greg_month is constructed with a value out of range struct bad_month : public std::out_of_range { bad_month() : std::out_of_range(std::string("Month number is out of range 1..12")) {} }; //! Build a policy class for the greg_month_rep typedef CV::simple_exception_policy greg_month_policies; //! A constrained range that implements the gregorian_month rules typedef CV::constrained_value greg_month_rep; //! Wrapper class to represent months in gregorian based calendar class BOOST_DATE_TIME_DECL greg_month : public greg_month_rep { public: typedef date_time::months_of_year month_enum; typedef std::map month_map_type; typedef boost::shared_ptr month_map_ptr_type; //! Construct a month from the months_of_year enumeration greg_month(month_enum theMonth) : greg_month_rep(static_cast(theMonth)) {} //! Construct from a short value greg_month(unsigned short theMonth) : greg_month_rep(theMonth) {} //! Convert the value back to a short operator unsigned short() const {return value_;} //! Returns month as number from 1 to 12 unsigned short as_number() const {return value_;} month_enum as_enum() const {return static_cast(value_);} const char* as_short_string() const; const char* as_long_string() const; #ifndef BOOST_NO_STD_WSTRING const wchar_t* as_short_wstring() const; const wchar_t* as_long_wstring() const; #endif // BOOST_NO_STD_WSTRING //! Shared pointer to a map of Month strings (Names & Abbrev) & numbers static month_map_ptr_type get_month_map_ptr(); /* parameterized as_*_string functions are intended to be called * from a template function: "... as_short_string(charT c='\0');" */ const char* as_short_string(char) const { return as_short_string(); } const char* as_long_string(char) const { return as_long_string(); } #ifndef BOOST_NO_STD_WSTRING const wchar_t* as_short_string(wchar_t) const { return as_short_wstring(); } const wchar_t* as_long_string(wchar_t) const { return as_long_wstring(); } #endif // BOOST_NO_STD_WSTRING }; } } //namespace gregorian #endif passenger-4.0.37/ext/boost/date_time/gregorian/greg_weekday.hpp000644 000765 000024 00000003606 12233035540 025225 0ustar00honglistaff000000 000000 #ifndef GREG_WEEKDAY_HPP___ #define GREG_WEEKDAY_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $ */ #include "boost/date_time/constrained_value.hpp" #include "boost/date_time/date_defs.hpp" #include "boost/date_time/compiler_config.hpp" #include #include namespace boost { namespace gregorian { //bring enum values into the namespace using date_time::Sunday; using date_time::Monday; using date_time::Tuesday; using date_time::Wednesday; using date_time::Thursday; using date_time::Friday; using date_time::Saturday; //! Exception that flags that a weekday number is incorrect struct bad_weekday : public std::out_of_range { bad_weekday() : std::out_of_range(std::string("Weekday is out of range 0..6")) {} }; typedef CV::simple_exception_policy greg_weekday_policies; typedef CV::constrained_value greg_weekday_rep; //! Represent a day within a week (range 0==Sun to 6==Sat) class BOOST_DATE_TIME_DECL greg_weekday : public greg_weekday_rep { public: typedef boost::date_time::weekdays weekday_enum; greg_weekday(unsigned short day_of_week_num) : greg_weekday_rep(day_of_week_num) {} unsigned short as_number() const {return value_;} const char* as_short_string() const; const char* as_long_string() const; #ifndef BOOST_NO_STD_WSTRING const wchar_t* as_short_wstring() const; const wchar_t* as_long_wstring() const; #endif // BOOST_NO_STD_WSTRING weekday_enum as_enum() const {return static_cast(value_);} }; } } //namespace gregorian #endif passenger-4.0.37/ext/boost/date_time/gregorian/greg_year.hpp000644 000765 000024 00000003134 12233035540 024530 0ustar00honglistaff000000 000000 #ifndef GREG_YEAR_HPP___ #define GREG_YEAR_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/constrained_value.hpp" #include #include namespace boost { namespace gregorian { //! Exception type for gregorian year struct bad_year : public std::out_of_range { bad_year() : std::out_of_range(std::string("Year is out of valid range: 1400..10000")) {} }; //! Policy class that declares error handling gregorian year type typedef CV::simple_exception_policy greg_year_policies; //! Generated representation for gregorian year typedef CV::constrained_value greg_year_rep; //! Represent a day of the month (range 1900 - 10000) /*! This small class allows for simple conversion an integer value into a year for the gregorian calendar. This currently only allows a range of 1900 to 10000. Both ends of the range are a bit arbitrary at the moment, but they are the limits of current testing of the library. As such they may be increased in the future. */ class greg_year : public greg_year_rep { public: greg_year(unsigned short year) : greg_year_rep(year) {} operator unsigned short() const {return value_;} private: }; } } //namespace gregorian #endif passenger-4.0.37/ext/boost/date_time/gregorian/greg_ymd.hpp000644 000765 000024 00000001610 12233035540 024356 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_GREG_YMD_HPP__ #define DATE_TIME_GREG_YMD_HPP__ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/year_month_day.hpp" #include "boost/date_time/special_defs.hpp" #include "boost/date_time/gregorian/greg_day.hpp" #include "boost/date_time/gregorian/greg_year.hpp" #include "boost/date_time/gregorian/greg_month.hpp" namespace boost { namespace gregorian { typedef date_time::year_month_day_base greg_year_month_day; } } //namespace gregorian #endif passenger-4.0.37/ext/boost/date_time/gregorian/gregorian.hpp000644 000765 000024 00000002272 12233035540 024543 0ustar00honglistaff000000 000000 #ifndef GREGORIAN_HPP__ #define GREGORIAN_HPP__ /* Copyright (c) 2002-2004 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ /*! @file gregorian.hpp Single file header that provides overall include for all elements of the gregorian date-time system. This includes the various types defined, but also other functions for formatting and parsing. */ #include "boost/date_time/compiler_config.hpp" #include "boost/date_time/gregorian/gregorian_types.hpp" #include "boost/date_time/gregorian/conversion.hpp" #if defined(BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS) #include "boost/date_time/gregorian/formatters_limited.hpp" #else #include "boost/date_time/gregorian/formatters.hpp" #endif #if defined(USE_DATE_TIME_PRE_1_33_FACET_IO) #include "boost/date_time/gregorian/greg_facet.hpp" #else #include "boost/date_time/gregorian/gregorian_io.hpp" #endif // USE_DATE_TIME_PRE_1_33_FACET_IO #include "boost/date_time/gregorian/parsers.hpp" #endif passenger-4.0.37/ext/boost/date_time/gregorian/gregorian_io.hpp000644 000765 000024 00000067122 12233035540 025237 0ustar00honglistaff000000 000000 #ifndef DATE_TIME_GREGORIAN_IO_HPP__ #define DATE_TIME_GREGORIAN_IO_HPP__ /* Copyright (c) 2004-2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-11-12 11:37:53 -0800 (Wed, 12 Nov 2008) $ */ #include #include #include // i/ostreambuf_iterator #include #include #include #include #include #include #include #include // to_tm will be needed in the facets namespace boost { namespace gregorian { typedef boost::date_time::period_formatter wperiod_formatter; typedef boost::date_time::period_formatter period_formatter; typedef boost::date_time::date_facet wdate_facet; typedef boost::date_time::date_facet date_facet; typedef boost::date_time::period_parser period_parser; typedef boost::date_time::period_parser wperiod_parser; typedef boost::date_time::special_values_formatter special_values_formatter; typedef boost::date_time::special_values_formatter wspecial_values_formatter; typedef boost::date_time::special_values_parser special_values_parser; typedef boost::date_time::special_values_parser wspecial_values_parser; typedef boost::date_time::date_input_facet date_input_facet; typedef boost::date_time::date_input_facet wdate_input_facet; template inline std::basic_ostream& operator<<(std::basic_ostream& os, const boost::gregorian::date& d) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::date_facet custom_date_facet; std::ostreambuf_iterator output_itr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(output_itr, os, os.fill(), d); else { //instantiate a custom facet for dealing with dates since the user //has not put one in the stream so far. This is for efficiency //since we would always need to reconstruct for every date //if the locale did not already exist. Of course this will be overridden //if the user imbues at some later point. With the default settings //for the facet the resulting format will be the same as the //std::time_facet settings. custom_date_facet* f = new custom_date_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(output_itr, os, os.fill(), d); } return os; } //! input operator for date template inline std::basic_istream& operator>>(std::basic_istream& is, date& d) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, d); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, d); } } catch(...) { // mask tells us what exceptions are turned on std::ios_base::iostate exception_mask = is.exceptions(); // if the user wants exceptions on failbit, we'll rethrow our // date_time exception & set the failbit if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} // ignore this one throw; // rethrow original exception } else { // if the user want's to fail quietly, we simply set the failbit is.setstate(std::ios_base::failbit); } } } return is; } template inline std::basic_ostream& operator<<(std::basic_ostream& os, const boost::gregorian::date_duration& dd) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::date_facet custom_date_facet; std::ostreambuf_iterator output_itr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(output_itr, os, os.fill(), dd); else { custom_date_facet* f = new custom_date_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(output_itr, os, os.fill(), dd); } return os; } //! input operator for date_duration template inline std::basic_istream& operator>>(std::basic_istream& is, date_duration& dd) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, dd); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, dd); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } template inline std::basic_ostream& operator<<(std::basic_ostream& os, const boost::gregorian::date_period& dp) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::date_facet custom_date_facet; std::ostreambuf_iterator output_itr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(output_itr, os, os.fill(), dp); else { //instantiate a custom facet for dealing with date periods since the user //has not put one in the stream so far. This is for efficiency //since we would always need to reconstruct for every time period //if the local did not already exist. Of course this will be overridden //if the user imbues at some later point. With the default settings //for the facet the resulting format will be the same as the //std::time_facet settings. custom_date_facet* f = new custom_date_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(output_itr, os, os.fill(), dp); } return os; } //! input operator for date_period template inline std::basic_istream& operator>>(std::basic_istream& is, date_period& dp) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, dp); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, dp); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } /********** small gregorian types **********/ template inline std::basic_ostream& operator<<(std::basic_ostream& os, const boost::gregorian::greg_month& gm) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::date_facet custom_date_facet; std::ostreambuf_iterator output_itr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(output_itr, os, os.fill(), gm); else { custom_date_facet* f = new custom_date_facet();//-> 10/1074199752/32 because year & day not initialized in put(...) //custom_date_facet* f = new custom_date_facet("%B"); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(output_itr, os, os.fill(), gm); } return os; } //! input operator for greg_month template inline std::basic_istream& operator>>(std::basic_istream& is, greg_month& m) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, m); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, m); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } template inline std::basic_ostream& operator<<(std::basic_ostream& os, const boost::gregorian::greg_weekday& gw) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::date_facet custom_date_facet; std::ostreambuf_iterator output_itr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(output_itr, os, os.fill(), gw); else { custom_date_facet* f = new custom_date_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(output_itr, os, os.fill(), gw); } return os; } //! input operator for greg_weekday template inline std::basic_istream& operator>>(std::basic_istream& is, greg_weekday& wd) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, wd); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, wd); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } //NOTE: output operator for greg_day was not necessary //! input operator for greg_day template inline std::basic_istream& operator>>(std::basic_istream& is, greg_day& gd) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, gd); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, gd); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } //NOTE: output operator for greg_year was not necessary //! input operator for greg_year template inline std::basic_istream& operator>>(std::basic_istream& is, greg_year& gy) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, gy); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, gy); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } /********** date generator types **********/ template inline std::basic_ostream& operator<<(std::basic_ostream& os, const boost::gregorian::partial_date& pd) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::date_facet custom_date_facet; std::ostreambuf_iterator output_itr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(output_itr, os, os.fill(), pd); else { custom_date_facet* f = new custom_date_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(output_itr, os, os.fill(), pd); } return os; } //! input operator for partial_date template inline std::basic_istream& operator>>(std::basic_istream& is, partial_date& pd) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, pd); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, pd); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } template inline std::basic_ostream& operator<<(std::basic_ostream& os, const boost::gregorian::nth_day_of_the_week_in_month& nkd) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::date_facet custom_date_facet; std::ostreambuf_iterator output_itr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(output_itr, os, os.fill(), nkd); else { custom_date_facet* f = new custom_date_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(output_itr, os, os.fill(), nkd); } return os; } //! input operator for nth_day_of_the_week_in_month template inline std::basic_istream& operator>>(std::basic_istream& is, nth_day_of_the_week_in_month& nday) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, nday); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, nday); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } template inline std::basic_ostream& operator<<(std::basic_ostream& os, const boost::gregorian::first_day_of_the_week_in_month& fkd) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::date_facet custom_date_facet; std::ostreambuf_iterator output_itr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(output_itr, os, os.fill(), fkd); else { custom_date_facet* f = new custom_date_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(output_itr, os, os.fill(), fkd); } return os; } //! input operator for first_day_of_the_week_in_month template inline std::basic_istream& operator>>(std::basic_istream& is, first_day_of_the_week_in_month& fkd) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, fkd); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, fkd); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } template inline std::basic_ostream& operator<<(std::basic_ostream& os, const boost::gregorian::last_day_of_the_week_in_month& lkd) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::date_facet custom_date_facet; std::ostreambuf_iterator output_itr(os); if (std::has_facet(os.getloc())) std::use_facet(os.getloc()).put(output_itr, os, os.fill(), lkd); else { custom_date_facet* f = new custom_date_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(output_itr, os, os.fill(), lkd); } return os; } //! input operator for last_day_of_the_week_in_month template inline std::basic_istream& operator>>(std::basic_istream& is, last_day_of_the_week_in_month& lkd) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, lkd); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, lkd); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } template inline std::basic_ostream& operator<<(std::basic_ostream& os, const boost::gregorian::first_day_of_the_week_after& fda) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::date_facet custom_date_facet; std::ostreambuf_iterator output_itr(os); if (std::has_facet(os.getloc())) { std::use_facet(os.getloc()).put(output_itr, os, os.fill(), fda); } else { custom_date_facet* f = new custom_date_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(output_itr, os, os.fill(), fda); } return os; } //! input operator for first_day_of_the_week_after template inline std::basic_istream& operator>>(std::basic_istream& is, first_day_of_the_week_after& fka) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, fka); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, fka); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } template inline std::basic_ostream& operator<<(std::basic_ostream& os, const boost::gregorian::first_day_of_the_week_before& fdb) { boost::io::ios_flags_saver iflags(os); typedef boost::date_time::date_facet custom_date_facet; std::ostreambuf_iterator output_itr(os); if (std::has_facet(os.getloc())) { std::use_facet(os.getloc()).put(output_itr, os, os.fill(), fdb); } else { custom_date_facet* f = new custom_date_facet(); std::locale l = std::locale(os.getloc(), f); os.imbue(l); f->put(output_itr, os, os.fill(), fdb); } return os; } //! input operator for first_day_of_the_week_before template inline std::basic_istream& operator>>(std::basic_istream& is, first_day_of_the_week_before& fkb) { boost::io::ios_flags_saver iflags(is); typename std::basic_istream::sentry strm_sentry(is, false); if (strm_sentry) { try { typedef typename date_time::date_input_facet date_input_facet; std::istreambuf_iterator sit(is), str_end; if(std::has_facet(is.getloc())) { std::use_facet(is.getloc()).get(sit, str_end, is, fkb); } else { date_input_facet* f = new date_input_facet(); std::locale l = std::locale(is.getloc(), f); is.imbue(l); f->get(sit, str_end, is, fkb); } } catch(...) { std::ios_base::iostate exception_mask = is.exceptions(); if(std::ios_base::failbit & exception_mask) { try { is.setstate(std::ios_base::failbit); } catch(std::ios_base::failure&) {} throw; // rethrow original exception } else { is.setstate(std::ios_base::failbit); } } } return is; } } } // namespaces #endif // DATE_TIME_GREGORIAN_IO_HPP__ passenger-4.0.37/ext/boost/date_time/gregorian/gregorian_types.hpp000644 000765 000024 00000007136 12233035540 025773 0ustar00honglistaff000000 000000 #ifndef _GREGORIAN_TYPES_HPP__ #define _GREGORIAN_TYPES_HPP__ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ /*! @file gregorian_types.hpp Single file header that defines most of the types for the gregorian date-time system. */ #include "boost/date_time/date.hpp" #include "boost/date_time/period.hpp" #include "boost/date_time/gregorian/greg_calendar.hpp" #include "boost/date_time/gregorian/greg_duration.hpp" #if defined(BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES) #include "boost/date_time/gregorian/greg_duration_types.hpp" #endif #include "boost/date_time/gregorian/greg_date.hpp" #include "boost/date_time/date_generators.hpp" #include "boost/date_time/date_clock_device.hpp" #include "boost/date_time/date_iterator.hpp" #include "boost/date_time/adjust_functors.hpp" namespace boost { //! Gregorian date system based on date_time components /*! This date system defines a full complement of types including * a date, date_duration, date_period, day_clock, and a * day_iterator. */ namespace gregorian { //! Date periods for the gregorian system /*!\ingroup date_basics */ typedef date_time::period date_period; //! A unifying date_generator base type /*! A unifying date_generator base type for: * partial_date, nth_day_of_the_week_in_month, * first_day_of_the_week_in_month, and last_day_of_the_week_in_month */ typedef date_time::year_based_generator year_based_generator; //! A date generation object type typedef date_time::partial_date partial_date; typedef date_time::nth_kday_of_month nth_kday_of_month; typedef nth_kday_of_month nth_day_of_the_week_in_month; typedef date_time::first_kday_of_month first_kday_of_month; typedef first_kday_of_month first_day_of_the_week_in_month; typedef date_time::last_kday_of_month last_kday_of_month; typedef last_kday_of_month last_day_of_the_week_in_month; typedef date_time::first_kday_after first_kday_after; typedef first_kday_after first_day_of_the_week_after; typedef date_time::first_kday_before first_kday_before; typedef first_kday_before first_day_of_the_week_before; //! A clock to get the current day from the local computer /*!\ingroup date_basics */ typedef date_time::day_clock day_clock; //! Base date_iterator type for gregorian types. /*!\ingroup date_basics */ typedef date_time::date_itr_base date_iterator; //! A day level iterator /*!\ingroup date_basics */ typedef date_time::date_itr, date> day_iterator; //! A week level iterator /*!\ingroup date_basics */ typedef date_time::date_itr, date> week_iterator; //! A month level iterator /*!\ingroup date_basics */ typedef date_time::date_itr, date> month_iterator; //! A year level iterator /*!\ingroup date_basics */ typedef date_time::date_itr, date> year_iterator; // bring in these date_generator functions from date_time namespace using date_time::days_until_weekday; using date_time::days_before_weekday; using date_time::next_weekday; using date_time::previous_weekday; } } //namespace gregorian #endif passenger-4.0.37/ext/boost/date_time/gregorian/parsers.hpp000644 000765 000024 00000007071 12233035540 024247 0ustar00honglistaff000000 000000 #ifndef GREGORIAN_PARSERS_HPP___ #define GREGORIAN_PARSERS_HPP___ /* Copyright (c) 2002,2003,2005 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) * Author: Jeff Garland, Bart Garst * $Date: 2008-02-27 12:00:24 -0800 (Wed, 27 Feb 2008) $ */ #include "boost/date_time/gregorian/gregorian_types.hpp" #include "boost/date_time/date_parsing.hpp" #include "boost/date_time/compiler_config.hpp" #include "boost/date_time/parse_format_base.hpp" #include #include namespace boost { namespace gregorian { //! Return special_value from string argument /*! Return special_value from string argument. If argument is * not one of the special value names (defined in src/gregorian/names.hpp), * return 'not_special' */ BOOST_DATE_TIME_DECL special_values special_value_from_string(const std::string& s); //! Deprecated: Use from_simple_string inline date from_string(std::string s) { return date_time::parse_date(s); } //! From delimited date string where with order year-month-day eg: 2002-1-25 or 2003-Jan-25 (full month name is also accepted) inline date from_simple_string(std::string s) { return date_time::parse_date(s, date_time::ymd_order_iso); } //! From delimited date string where with order year-month-day eg: 1-25-2003 or Jan-25-2003 (full month name is also accepted) inline date from_us_string(std::string s) { return date_time::parse_date(s, date_time::ymd_order_us); } //! From delimited date string where with order day-month-year eg: 25-1-2002 or 25-Jan-2003 (full month name is also accepted) inline date from_uk_string(std::string s) { return date_time::parse_date(s, date_time::ymd_order_dmy); } //! From iso type date string where with order year-month-day eg: 20020125 inline date from_undelimited_string(std::string s) { return date_time::parse_undelimited_date(s); } //! From iso type date string where with order year-month-day eg: 20020125 inline date date_from_iso_string(const std::string& s) { return date_time::parse_undelimited_date(s); } #if !(defined(BOOST_NO_STD_ITERATOR_TRAITS)) //! Stream should hold a date in the form of: 2002-1-25. Month number, abbrev, or name are accepted /* Arguments passed in by-value for convertability of char[] * to iterator_type. Calls to from_stream_type are by-reference * since conversion is already done */ template inline date from_stream(iterator_type beg, iterator_type end) { if(beg == end) { return date(not_a_date_time); } typedef typename std::iterator_traits::value_type value_type; return date_time::from_stream_type(beg, end, value_type()); } #endif //BOOST_NO_STD_ITERATOR_TRAITS #if (defined(_MSC_VER) && (_MSC_VER < 1300)) // This function cannot be compiled with MSVC 6.0 due to internal compiler shorcomings #else //! Function to parse a date_period from a string (eg: [2003-Oct-31/2003-Dec-25]) inline date_period date_period_from_string(const std::string& s){ return date_time::from_simple_string_type(s); } # if !defined(BOOST_NO_STD_WSTRING) //! Function to parse a date_period from a wstring (eg: [2003-Oct-31/2003-Dec-25]) inline date_period date_period_from_wstring(const std::wstring& s){ return date_time::from_simple_string_type(s); } # endif // BOOST_NO_STD_WSTRING #endif } } //namespace gregorian #endif passenger-4.0.37/ext/boost/container/container_fwd.hpp000644 000765 000024 00000010255 12233035540 023462 0ustar00honglistaff000000 000000 ////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/container for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP #define BOOST_CONTAINER_CONTAINER_FWD_HPP #if (defined _MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif ////////////////////////////////////////////////////////////////////////////// // Standard predeclarations ////////////////////////////////////////////////////////////////////////////// /// @cond namespace boost{ namespace intrusive{ //Create namespace to avoid compilation errors }} namespace boost{ namespace container{ namespace container_detail{ namespace bi = boost::intrusive; }}} #include #include #include #include #include /// @endcond ////////////////////////////////////////////////////////////////////////////// // Containers ////////////////////////////////////////////////////////////////////////////// namespace boost { namespace container { //vector class template > class vector; //vector class template > class stable_vector; //vector class template > class deque; //list class template > class list; //slist class template > class slist; //set class template ,class Allocator = std::allocator > class set; //multiset class template ,class Allocator = std::allocator > class multiset; //map class template ,class Allocator = std::allocator > > class map; //multimap class template ,class Allocator = std::allocator > > class multimap; //flat_set class template ,class Allocator = std::allocator > class flat_set; //flat_multiset class template ,class Allocator = std::allocator > class flat_multiset; //flat_map class template ,class Allocator = std::allocator > > class flat_map; //flat_multimap class template ,class Allocator = std::allocator > > class flat_multimap; //basic_string class template ,class Allocator = std::allocator > class basic_string; //! Type used to tag that the input range is //! guaranteed to be ordered struct ordered_range_t {}; //! Type used to tag that the input range is //! guaranteed to be ordered and unique struct ordered_unique_range_t : public ordered_range_t {}; //! Value used to tag that the input range is //! guaranteed to be ordered static const ordered_range_t ordered_range = ordered_range_t(); //! Value used to tag that the input range is //! guaranteed to be ordered and unique static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t(); /// @cond namespace detail_really_deep_namespace { //Otherwise, gcc issues a warning of previously defined //anonymous_instance and unique_instance struct dummy { dummy() { (void)ordered_range; (void)ordered_unique_range; } }; } //detail_really_deep_namespace { /// @endcond }} //namespace boost { namespace container { #endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP passenger-4.0.37/ext/boost/config/abi/000755 000765 000024 00000000000 12233035540 020142 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/config/abi_prefix.hpp000644 000765 000024 00000001272 12233035540 022232 0ustar00honglistaff000000 000000 // abi_prefix header -------------------------------------------------------// // (c) Copyright John Maddock 2003 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). #ifndef BOOST_CONFIG_ABI_PREFIX_HPP # define BOOST_CONFIG_ABI_PREFIX_HPP #else # error double inclusion of header boost/config/abi_prefix.hpp is an error #endif #include // this must occur after all other includes and before any code appears: #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #if defined( __BORLANDC__ ) #pragma nopushoptwarn #endif passenger-4.0.37/ext/boost/config/abi_suffix.hpp000644 000765 000024 00000001415 12233035540 022240 0ustar00honglistaff000000 000000 // abi_sufffix header -------------------------------------------------------// // (c) Copyright John Maddock 2003 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // This header should be #included AFTER code that was preceded by a #include // . #ifndef BOOST_CONFIG_ABI_PREFIX_HPP # error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp #else # undef BOOST_CONFIG_ABI_PREFIX_HPP #endif // the suffix header occurs after all of our code: #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #if defined( __BORLANDC__ ) #pragma nopushoptwarn #endif passenger-4.0.37/ext/boost/config/auto_link.hpp000644 000765 000024 00000033674 12233035540 022122 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) /* * LOCATION: see http://www.boost.org for most recent version. * FILE auto_link.hpp * VERSION see * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers. */ /************************************************************************* USAGE: ~~~~~~ Before including this header you must define one or more of define the following macros: BOOST_LIB_NAME: Required: A string containing the basename of the library, for example boost_regex. BOOST_LIB_TOOLSET: Optional: the base name of the toolset. BOOST_DYN_LINK: Optional: when set link to dll rather than static library. BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name of the library selected (useful for debugging). BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib, rather than a mangled-name version. BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option. This is essentially the same as the default name-mangled version, but without the compiler name and version, or the Boost version. Just the build options. These macros will be undef'ed at the end of the header, further this header has no include guards - so be sure to include it only once from your library! Algorithm: ~~~~~~~~~~ Libraries for Borland and Microsoft compilers are automatically selected here, the name of the lib is selected according to the following formula: BOOST_LIB_PREFIX + BOOST_LIB_NAME + "_" + BOOST_LIB_TOOLSET + BOOST_LIB_THREAD_OPT + BOOST_LIB_RT_OPT "-" + BOOST_LIB_VERSION These are defined as: BOOST_LIB_PREFIX: "lib" for static libraries otherwise "". BOOST_LIB_NAME: The base name of the lib ( for example boost_regex). BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc). BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing. BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, contains one or more of the following letters after a hyphen: s static runtime (dynamic if not present). g debug/diagnostic runtime (release if not present). y Python debug/diagnostic runtime (release if not present). d debug build (release if not present). p STLport build. n STLport build without its IOStreams. BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. ***************************************************************************/ #ifdef __cplusplus # ifndef BOOST_CONFIG_HPP # include # endif #elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__) // // C language compatability (no, honestly) // # define BOOST_MSVC _MSC_VER # define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) # define BOOST_DO_STRINGIZE(X) #X #endif // // Only include what follows for known and supported compilers: // #if defined(BOOST_MSVC) \ || defined(__BORLANDC__) \ || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \ || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) #ifndef BOOST_VERSION_HPP # include #endif #ifndef BOOST_LIB_NAME # error "Macro BOOST_LIB_NAME not set (internal error)" #endif // // error check: // #if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG) # pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors") # pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes") # error "Incompatible build options" #endif // // select toolset if not defined already: // #ifndef BOOST_LIB_TOOLSET # if defined(BOOST_MSVC) && (BOOST_MSVC < 1200) // Note: no compilers before 1200 are supported # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300) # ifdef UNDER_CE // eVC4: # define BOOST_LIB_TOOLSET "evc4" # else // vc6: # define BOOST_LIB_TOOLSET "vc6" # endif # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310) // vc7: # define BOOST_LIB_TOOLSET "vc7" # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400) // vc71: # define BOOST_LIB_TOOLSET "vc71" # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500) // vc80: # define BOOST_LIB_TOOLSET "vc80" # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600) // vc90: # define BOOST_LIB_TOOLSET "vc90" # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700) // vc10: # define BOOST_LIB_TOOLSET "vc100" # elif defined(BOOST_MSVC) // vc11: # define BOOST_LIB_TOOLSET "vc110" # elif defined(__BORLANDC__) // CBuilder 6: # define BOOST_LIB_TOOLSET "bcb" # elif defined(__ICL) // Intel C++, no version number: # define BOOST_LIB_TOOLSET "iw" # elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF ) // Metrowerks CodeWarrior 8.x # define BOOST_LIB_TOOLSET "cw8" # elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF ) // Metrowerks CodeWarrior 9.x # define BOOST_LIB_TOOLSET "cw9" # endif #endif // BOOST_LIB_TOOLSET // // select thread opt: // #if defined(_MT) || defined(__MT__) # define BOOST_LIB_THREAD_OPT "-mt" #else # define BOOST_LIB_THREAD_OPT #endif #if defined(_MSC_VER) || defined(__MWERKS__) # ifdef _DLL # if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) # if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-gydp" # elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) # define BOOST_LIB_RT_OPT "-gdp" # elif defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-gydp" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-gdp" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # else # define BOOST_LIB_RT_OPT "-p" # endif # elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) # if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-gydpn" # elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) # define BOOST_LIB_RT_OPT "-gdpn" # elif defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-gydpn" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-gdpn" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # else # define BOOST_LIB_RT_OPT "-pn" # endif # else # if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-gyd" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-gd" # else # define BOOST_LIB_RT_OPT # endif # endif # else # if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) # if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sgydp" # elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) # define BOOST_LIB_RT_OPT "-sgdp" # elif defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sgydp" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-sgdp" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # else # define BOOST_LIB_RT_OPT "-sp" # endif # elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) # if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sgydpn" # elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) # define BOOST_LIB_RT_OPT "-sgdpn" # elif defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sgydpn" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-sgdpn" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # else # define BOOST_LIB_RT_OPT "-spn" # endif # else # if defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sgyd" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-sgd" # else # define BOOST_LIB_RT_OPT "-s" # endif # endif # endif #elif defined(__BORLANDC__) // // figure out whether we want the debug builds or not: // #if __BORLANDC__ > 0x561 #pragma defineonoption BOOST_BORLAND_DEBUG -v #endif // // sanity check: // #if defined(__STL_DEBUG) || defined(_STLP_DEBUG) #error "Pre-built versions of the Boost libraries are not provided in STLport-debug form" #endif # ifdef _RTLDLL # if defined(BOOST_BORLAND_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-yd" # elif defined(BOOST_BORLAND_DEBUG) # define BOOST_LIB_RT_OPT "-d" # elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT -y # else # define BOOST_LIB_RT_OPT # endif # else # if defined(BOOST_BORLAND_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-syd" # elif defined(BOOST_BORLAND_DEBUG) # define BOOST_LIB_RT_OPT "-sd" # elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sy" # else # define BOOST_LIB_RT_OPT "-s" # endif # endif #endif // // select linkage opt: // #if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK) # define BOOST_LIB_PREFIX #elif defined(BOOST_DYN_LINK) # error "Mixing a dll boost library with a static runtime is a really bad idea..." #else # define BOOST_LIB_PREFIX "lib" #endif // // now include the lib: // #if defined(BOOST_LIB_NAME) \ && defined(BOOST_LIB_PREFIX) \ && defined(BOOST_LIB_TOOLSET) \ && defined(BOOST_LIB_THREAD_OPT) \ && defined(BOOST_LIB_RT_OPT) \ && defined(BOOST_LIB_VERSION) #ifdef BOOST_AUTO_LINK_TAGGED # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") # endif #elif defined(BOOST_AUTO_LINK_NOMANGLE) # pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # endif #else # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") # endif #endif #else # error "some required macros where not defined (internal logic error)." #endif #endif // _MSC_VER || __BORLANDC__ // // finally undef any macros we may have set: // #ifdef BOOST_LIB_PREFIX # undef BOOST_LIB_PREFIX #endif #if defined(BOOST_LIB_NAME) # undef BOOST_LIB_NAME #endif // Don't undef this one: it can be set by the user and should be the // same for all libraries: //#if defined(BOOST_LIB_TOOLSET) //# undef BOOST_LIB_TOOLSET //#endif #if defined(BOOST_LIB_THREAD_OPT) # undef BOOST_LIB_THREAD_OPT #endif #if defined(BOOST_LIB_RT_OPT) # undef BOOST_LIB_RT_OPT #endif #if defined(BOOST_LIB_LINK_OPT) # undef BOOST_LIB_LINK_OPT #endif #if defined(BOOST_LIB_DEBUG_OPT) # undef BOOST_LIB_DEBUG_OPT #endif #if defined(BOOST_DYN_LINK) # undef BOOST_DYN_LINK #endif passenger-4.0.37/ext/boost/config/compiler/000755 000765 000024 00000000000 12233035540 021221 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/config/no_tr1/000755 000765 000024 00000000000 12233035540 020611 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/config/platform/000755 000765 000024 00000000000 12233035540 021233 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/config/posix_features.hpp000644 000765 000024 00000007230 12233035540 023162 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // All POSIX feature tests go in this file, // Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well // _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's // may be present but none-functional unless _POSIX_C_SOURCE and // _XOPEN_SOURCE have been defined to the right value (it's up // to the user to do this *before* including any header, although // in most cases the compiler will do this for you). # if defined(BOOST_HAS_UNISTD_H) # include // XOpen has , but is this the correct version check? # if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3) # define BOOST_HAS_NL_TYPES_H # endif // POSIX version 6 requires # if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100) # define BOOST_HAS_STDINT_H # endif // POSIX version 2 requires # if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L) # define BOOST_HAS_DIRENT_H # endif // POSIX version 3 requires to have sigaction: # if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L) # define BOOST_HAS_SIGACTION # endif // POSIX defines _POSIX_THREADS > 0 for pthread support, // however some platforms define _POSIX_THREADS without // a value, hence the (_POSIX_THREADS+0 >= 0) check. // Strictly speaking this may catch platforms with a // non-functioning stub , but such occurrences should // occur very rarely if at all. # if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS) # define BOOST_HAS_PTHREADS # endif // BOOST_HAS_NANOSLEEP: // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME: # if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \ || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) # define BOOST_HAS_NANOSLEEP # endif // BOOST_HAS_CLOCK_GETTIME: // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME // but at least one platform - linux - defines that flag without // defining clock_gettime): # if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) # define BOOST_HAS_CLOCK_GETTIME # endif // BOOST_HAS_SCHED_YIELD: // This is predicated on _POSIX_PRIORITY_SCHEDULING or // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME. # if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\ || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\ || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) # define BOOST_HAS_SCHED_YIELD # endif // BOOST_HAS_GETTIMEOFDAY: // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE: // These are predicated on _XOPEN_VERSION, and appears to be first released // in issue 4, version 2 (_XOPEN_VERSION > 500). // Likewise for the functions log1p and expm1. # if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500) # define BOOST_HAS_GETTIMEOFDAY # if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500) # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # endif # ifndef BOOST_HAS_LOG1P # define BOOST_HAS_LOG1P # endif # ifndef BOOST_HAS_EXPM1 # define BOOST_HAS_EXPM1 # endif # endif # endif passenger-4.0.37/ext/boost/config/requires_threads.hpp000644 000765 000024 00000006663 12233035540 023504 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP #define BOOST_CONFIG_REQUIRES_THREADS_HPP #ifndef BOOST_CONFIG_HPP # include #endif #if defined(BOOST_DISABLE_THREADS) // // special case to handle versions of gcc which don't currently support threads: // #if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG)) // // this is checked up to gcc 3.3: // #if defined(__sgi) || defined(__hpux) # error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)" #endif #endif # error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" #elif !defined(BOOST_HAS_THREADS) # if defined __COMO__ // Comeau C++ # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)" #elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) // Intel #ifdef _WIN32 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" #else # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp" #endif # elif defined __GNUC__ // GNU C++: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" #elif defined __sgi // SGI MIPSpro C++ # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE" #elif defined __DECCXX // Compaq Tru64 Unix cxx # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread" #elif defined __BORLANDC__ // Borland # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM" #elif defined __MWERKS__ // Metrowerks CodeWarrior # error "Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd" #elif defined __SUNPRO_CC // Sun Workshop Compiler C++ # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" #elif defined __HP_aCC // HP aCC # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" #elif defined(__IBMCPP__) // IBM Visual Age # error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler" #elif defined _MSC_VER // Microsoft Visual C++ // // Must remain the last #elif since some other vendors (Metrowerks, for // example) also #define _MSC_VER # error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" #else # error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use" #endif // compilers #endif // BOOST_HAS_THREADS #endif // BOOST_CONFIG_REQUIRES_THREADS_HPP passenger-4.0.37/ext/boost/config/select_compiler_config.hpp000644 000765 000024 00000007165 12233035540 024627 0ustar00honglistaff000000 000000 // Boost compiler configuration selection header file // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Martin Wille 2003. // (C) Copyright Guillaume Melquiond 2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for most recent version. // locate which compiler we are using and define // BOOST_COMPILER_CONFIG as needed: #if defined(__GCCXML__) // GCC-XML emulates other compilers, it has to appear first here! # define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp" #elif defined(_CRAYC) // EDG based Cray compiler: # define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp" #elif defined __CUDACC__ // NVIDIA CUDA C++ compiler for GPU # define BOOST_COMPILER_CONFIG "boost/config/compiler/nvcc.hpp" #elif defined __COMO__ // Comeau C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp" #elif defined(__PATHSCALE__) && (__PATHCC__ >= 4) // PathScale EKOPath compiler (has to come before clang and gcc) # define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp" #elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) // Intel # define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" #elif defined __clang__ // Clang C++ emulates GCC, so it has to appear early. # define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" #elif defined __DMC__ // Digital Mars C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp" # elif defined __GNUC__ // GNU C++: # define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp" #elif defined __KCC // Kai C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp" #elif defined __sgi // SGI MIPSpro C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp" #elif defined __DECCXX // Compaq Tru64 Unix cxx # define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp" #elif defined __ghs // Greenhills C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp" #elif defined __CODEGEARC__ // CodeGear - must be checked for before Borland # define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp" #elif defined __BORLANDC__ // Borland # define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp" #elif defined __MWERKS__ // Metrowerks CodeWarrior # define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp" #elif defined __SUNPRO_CC // Sun Workshop Compiler C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp" #elif defined __HP_aCC // HP aCC # define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp" #elif defined(__MRC__) || defined(__SC__) // MPW MrCpp or SCpp # define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp" #elif defined(__IBMCPP__) // IBM Visual Age # define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp" #elif defined(__PGI) // Portland Group Inc. # define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp" #elif defined _MSC_VER // Microsoft Visual C++ // // Must remain the last #elif since some other vendors (Metrowerks, for // example) also #define _MSC_VER # define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp" #elif defined (BOOST_ASSERT_CONFIG) // this must come last - generate an error if we don't // recognise the compiler: # error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)" #endif passenger-4.0.37/ext/boost/config/select_platform_config.hpp000644 000765 000024 00000006227 12233035540 024637 0ustar00honglistaff000000 000000 // Boost compiler configuration selection header file // (C) Copyright John Maddock 2001 - 2002. // (C) Copyright Jens Maurer 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed. // Note that we define the headers to include using "header_name" not // in order to prevent macro expansion within the header // name (for example "linux" is a macro on linux systems). #if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC) // linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though? # define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp" #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) // BSD: # define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp" #elif defined(sun) || defined(__sun) // solaris: # define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp" #elif defined(__sgi) // SGI Irix: # define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp" #elif defined(__hpux) // hp unix: # define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp" #elif defined(__CYGWIN__) // cygwin is not win32: # define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp" #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) // win32: # define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" #elif defined(__BEOS__) // BeOS # define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) // MacOS # define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp" #elif defined(__IBMCPP__) || defined(_AIX) // IBM # define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp" #elif defined(__amigaos__) // AmigaOS # define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp" #elif defined(__QNXNTO__) // QNX: # define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp" #elif defined(__VXWORKS__) // vxWorks: # define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp" #elif defined(__SYMBIAN32__) // Symbian: # define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" #elif defined(_CRAYC) // Cray: # define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp" #elif defined(__VMS) // VMS: # define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" #else # if defined(unix) \ || defined(__unix) \ || defined(_XOPEN_SOURCE) \ || defined(_POSIX_SOURCE) // generic unix platform: # ifndef BOOST_HAS_UNISTD_H # define BOOST_HAS_UNISTD_H # endif # include # endif # if defined (BOOST_ASSERT_CONFIG) // this must come last - generate an error if we don't // recognise the platform: # error "Unknown platform - please configure and report the results to boost.org" # endif #endif passenger-4.0.37/ext/boost/config/select_stdlib_config.hpp000644 000765 000024 00000005650 12233035540 024273 0ustar00honglistaff000000 000000 // Boost compiler configuration selection header file // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed: // First include to determine if some version of STLport is in use as the std lib // (do not rely on this header being included since users can short-circuit this header // if they know whose std lib they are using.) #ifdef __cplusplus # include #else # include #endif #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) // STLPort library; this _must_ come first, otherwise since // STLport typically sits on top of some other library, we // can end up detecting that first rather than STLport: # define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp" #else // If our std lib was not some version of STLport, then include as it is about // the smallest of the std lib headers that includes real C++ stuff. (Some std libs do not // include their C++-related macros in so this additional include makes sure // we get those definitions) // (again do not rely on this header being included since users can short-circuit this // header if they know whose std lib they are using.) #include #if defined(__LIBCOMO__) // Comeau STL: #define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp" #elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) // Rogue Wave library: # define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp" #elif defined(_LIBCPP_VERSION) // libc++ # define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp" #elif defined(__GLIBCPP__) || defined(__GLIBCXX__) // GNU libstdc++ 3 # define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp" #elif defined(__STL_CONFIG_H) // generic SGI STL # define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp" #elif defined(__MSL_CPP__) // MSL standard lib: # define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp" #elif defined(__IBMCPP__) // take the default VACPP std lib # define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp" #elif defined(MSIPL_COMPILE_H) // Modena C++ standard library # define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp" #elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) // Dinkumware Library (this has to appear after any possible replacement libraries): # define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp" #elif defined (BOOST_ASSERT_CONFIG) // this must come last - generate an error if we don't // recognise the library: # error "Unknown standard library - please configure and report the results to boost.org" #endif #endif passenger-4.0.37/ext/boost/config/stdlib/000755 000765 000024 00000000000 12233035540 020670 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/config/suffix.hpp000644 000765 000024 00000100277 12233035540 021433 0ustar00honglistaff000000 000000 // Boost config.hpp configuration header file ------------------------------// // boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file // Copyright (c) 2001-2003 John Maddock // Copyright (c) 2001 Darin Adler // Copyright (c) 2001 Peter Dimov // Copyright (c) 2002 Bill Kempf // Copyright (c) 2002 Jens Maurer // Copyright (c) 2002-2003 David Abrahams // Copyright (c) 2003 Gennaro Prota // Copyright (c) 2003 Eric Friedman // Copyright (c) 2010 Eric Jourdanneau, Joel Falcou // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for most recent version. // Boost config.hpp policy and rationale documentation has been moved to // http://www.boost.org/libs/config/ // // This file is intended to be stable, and relatively unchanging. // It should contain boilerplate code only - no compiler specific // code unless it is unavoidable - no changes unless unavoidable. #ifndef BOOST_CONFIG_SUFFIX_HPP #define BOOST_CONFIG_SUFFIX_HPP #if defined(__GNUC__) && (__GNUC__ >= 4) // // Some GCC-4.x versions issue warnings even when __extension__ is used, // so use this as a workaround: // #pragma GCC system_header #endif // // ensure that visibility macros are always defined, thus symplifying use // #ifndef BOOST_SYMBOL_EXPORT # define BOOST_SYMBOL_EXPORT #endif #ifndef BOOST_SYMBOL_IMPORT # define BOOST_SYMBOL_IMPORT #endif #ifndef BOOST_SYMBOL_VISIBLE # define BOOST_SYMBOL_VISIBLE #endif // // look for long long by looking for the appropriate macros in . // Note that we use limits.h rather than climits for maximal portability, // remember that since these just declare a bunch of macros, there should be // no namespace issues from this. // #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \ && !defined(BOOST_MSVC) && !defined(__BORLANDC__) # include # if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) # define BOOST_HAS_LONG_LONG # else # define BOOST_NO_LONG_LONG # endif #endif // GCC 3.x will clean up all of those nasty macro definitions that // BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine // it under GCC 3.x. #if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS) # undef BOOST_NO_CTYPE_FUNCTIONS #endif // // Assume any extensions are in namespace std:: unless stated otherwise: // # ifndef BOOST_STD_EXTENSION_NAMESPACE # define BOOST_STD_EXTENSION_NAMESPACE std # endif // // If cv-qualified specializations are not allowed, then neither are cv-void ones: // # if defined(BOOST_NO_CV_SPECIALIZATIONS) \ && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) # define BOOST_NO_CV_VOID_SPECIALIZATIONS # endif // // If there is no numeric_limits template, then it can't have any compile time // constants either! // # if defined(BOOST_NO_LIMITS) \ && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_NO_MS_INT64_NUMERIC_LIMITS # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS # endif // // if there is no long long then there is no specialisation // for numeric_limits either: // #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS) # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS #endif // // if there is no __int64 then there is no specialisation // for numeric_limits<__int64> either: // #if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS) # define BOOST_NO_MS_INT64_NUMERIC_LIMITS #endif // // if member templates are supported then so is the // VC6 subset of member templates: // # if !defined(BOOST_NO_MEMBER_TEMPLATES) \ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) # define BOOST_MSVC6_MEMBER_TEMPLATES # endif // // Without partial specialization, can't test for partial specialisation bugs: // # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) # define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG # endif // // Without partial specialization, we can't have array-type partial specialisations: // # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) # define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS # endif // // Without partial specialization, std::iterator_traits can't work: // # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_NO_STD_ITERATOR_TRAITS) # define BOOST_NO_STD_ITERATOR_TRAITS # endif // // Without partial specialization, partial // specialization with default args won't work either: // # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) # define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS # endif // // Without member template support, we can't have template constructors // in the standard library either: // # if defined(BOOST_NO_MEMBER_TEMPLATES) \ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS # endif // // Without member template support, we can't have a conforming // std::allocator template either: // # if defined(BOOST_NO_MEMBER_TEMPLATES) \ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ && !defined(BOOST_NO_STD_ALLOCATOR) # define BOOST_NO_STD_ALLOCATOR # endif // // without ADL support then using declarations will break ADL as well: // #if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #endif // // Without typeid support we have no dynamic RTTI either: // #if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI) # define BOOST_NO_RTTI #endif // // If we have a standard allocator, then we have a partial one as well: // #if !defined(BOOST_NO_STD_ALLOCATOR) # define BOOST_HAS_PARTIAL_STD_ALLOCATOR #endif // // We can't have a working std::use_facet if there is no std::locale: // # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET) # define BOOST_NO_STD_USE_FACET # endif // // We can't have a std::messages facet if there is no std::locale: // # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES) # define BOOST_NO_STD_MESSAGES # endif // // We can't have a working std::wstreambuf if there is no std::locale: // # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF) # define BOOST_NO_STD_WSTREAMBUF # endif // // We can't have a if there is no : // # if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE) # define BOOST_NO_CWCTYPE # endif // // We can't have a swprintf if there is no : // # if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF) # define BOOST_NO_SWPRINTF # endif // // If Win32 support is turned off, then we must turn off // threading support also, unless there is some other // thread API enabled: // #if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \ && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS) # define BOOST_DISABLE_THREADS #endif // // Turn on threading support if the compiler thinks that it's in // multithreaded mode. We put this here because there are only a // limited number of macros that identify this (if there's any missing // from here then add to the appropriate compiler section): // #if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \ || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \ && !defined(BOOST_HAS_THREADS) # define BOOST_HAS_THREADS #endif // // Turn threading support off if BOOST_DISABLE_THREADS is defined: // #if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS) # undef BOOST_HAS_THREADS #endif // // Turn threading support off if we don't recognise the threading API: // #if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\ && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\ && !defined(BOOST_HAS_MPTASKS) # undef BOOST_HAS_THREADS #endif // // Turn threading detail macros off if we don't (want to) use threading // #ifndef BOOST_HAS_THREADS # undef BOOST_HAS_PTHREADS # undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # undef BOOST_HAS_PTHREAD_YIELD # undef BOOST_HAS_PTHREAD_DELAY_NP # undef BOOST_HAS_WINTHREADS # undef BOOST_HAS_BETHREADS # undef BOOST_HAS_MPTASKS #endif // // If the compiler claims to be C99 conformant, then it had better // have a : // # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) # define BOOST_HAS_STDINT_H # ifndef BOOST_HAS_LOG1P # define BOOST_HAS_LOG1P # endif # ifndef BOOST_HAS_EXPM1 # define BOOST_HAS_EXPM1 # endif # endif // // Define BOOST_NO_SLIST and BOOST_NO_HASH if required. // Note that this is for backwards compatibility only. // # if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST) # define BOOST_NO_SLIST # endif # if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH) # define BOOST_NO_HASH # endif // // Set BOOST_SLIST_HEADER if not set already: // #if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER) # define BOOST_SLIST_HEADER #endif // // Set BOOST_HASH_SET_HEADER if not set already: // #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER) # define BOOST_HASH_SET_HEADER #endif // // Set BOOST_HASH_MAP_HEADER if not set already: // #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER) # define BOOST_HASH_MAP_HEADER #endif // BOOST_HAS_ABI_HEADERS // This macro gets set if we have headers that fix the ABI, // and prevent ODR violations when linking to external libraries: #if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS) # define BOOST_HAS_ABI_HEADERS #endif #if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS) # undef BOOST_HAS_ABI_HEADERS #endif // BOOST_NO_STDC_NAMESPACE workaround --------------------------------------// // Because std::size_t usage is so common, even in boost headers which do not // otherwise use the C library, the workaround is included here so // that ugly workaround code need not appear in many other boost headers. // NOTE WELL: This is a workaround for non-conforming compilers; // must still be #included in the usual places so that inclusion // works as expected with standard conforming compilers. The resulting // double inclusion of is harmless. # if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus) # include namespace std { using ::ptrdiff_t; using ::size_t; } # endif // Workaround for the unfortunate min/max macros defined by some platform headers #define BOOST_PREVENT_MACRO_SUBSTITUTION #ifndef BOOST_USING_STD_MIN # define BOOST_USING_STD_MIN() using std::min #endif #ifndef BOOST_USING_STD_MAX # define BOOST_USING_STD_MAX() using std::max #endif // BOOST_NO_STD_MIN_MAX workaround -----------------------------------------// # if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus) namespace std { template inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { return __b < __a ? __b : __a; } template inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { return __a < __b ? __b : __a; } } # endif // BOOST_STATIC_CONSTANT workaround --------------------------------------- // // On compilers which don't allow in-class initialization of static integral // constant members, we must use enums as a workaround if we want the constants // to be available at compile-time. This macro gives us a convenient way to // declare such constants. # ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment } # else # define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment # endif // BOOST_USE_FACET / HAS_FACET workaround ----------------------------------// // When the standard library does not have a conforming std::use_facet there // are various workarounds available, but they differ from library to library. // The same problem occurs with has_facet. // These macros provide a consistent way to access a locale's facets. // Usage: // replace // std::use_facet(loc); // with // BOOST_USE_FACET(Type, loc); // Note do not add a std:: prefix to the front of BOOST_USE_FACET! // Use for BOOST_HAS_FACET is analogous. #if defined(BOOST_NO_STD_USE_FACET) # ifdef BOOST_HAS_TWO_ARG_USE_FACET # define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast(0)) # define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast(0)) # elif defined(BOOST_HAS_MACRO_USE_FACET) # define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type) # define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type) # elif defined(BOOST_HAS_STLP_USE_FACET) # define BOOST_USE_FACET(Type, loc) (*std::_Use_facet(loc)) # define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) # endif #else # define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc) # define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) #endif // BOOST_NESTED_TEMPLATE workaround ------------------------------------------// // Member templates are supported by some compilers even though they can't use // the A::template member syntax, as a workaround replace: // // typedef typename A::template rebind binder; // // with: // // typedef typename A::BOOST_NESTED_TEMPLATE rebind binder; #ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD # define BOOST_NESTED_TEMPLATE template #else # define BOOST_NESTED_TEMPLATE #endif // BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------// // Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION // is defined, in which case it evaluates to return x; Use when you have a return // statement that can never be reached. #ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION # define BOOST_UNREACHABLE_RETURN(x) return x; #else # define BOOST_UNREACHABLE_RETURN(x) #endif // BOOST_DEDUCED_TYPENAME workaround ------------------------------------------// // // Some compilers don't support the use of `typename' for dependent // types in deduced contexts, e.g. // // template void f(T, typename T::type); // ^^^^^^^^ // Replace these declarations with: // // template void f(T, BOOST_DEDUCED_TYPENAME T::type); #ifndef BOOST_NO_DEDUCED_TYPENAME # define BOOST_DEDUCED_TYPENAME typename #else # define BOOST_DEDUCED_TYPENAME #endif #ifndef BOOST_NO_TYPENAME_WITH_CTOR # define BOOST_CTOR_TYPENAME typename #else # define BOOST_CTOR_TYPENAME #endif // long long workaround ------------------------------------------// // On gcc (and maybe other compilers?) long long is alway supported // but it's use may generate either warnings (with -ansi), or errors // (with -pedantic -ansi) unless it's use is prefixed by __extension__ // #if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus) namespace boost{ # ifdef __GNUC__ __extension__ typedef long long long_long_type; __extension__ typedef unsigned long long ulong_long_type; # else typedef long long long_long_type; typedef unsigned long long ulong_long_type; # endif } #endif // same again for __int128: #if defined(BOOST_HAS_INT128) && defined(__cplusplus) namespace boost{ # ifdef __GNUC__ __extension__ typedef __int128 int128_type; __extension__ typedef unsigned __int128 uint128_type; # else typedef __int128 int128_type; typedef unsigned __int128 uint128_type; # endif } #endif // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// // // Some compilers have problems with function templates whose template // parameters don't appear in the function parameter list (basically // they just link one instantiation of the template in the final // executable). These macros provide a uniform way to cope with the // problem with no effects on the calling syntax. // Example: // // #include // #include // #include // // template // void f() { std::cout << n << ' '; } // // template // void g() { std::cout << typeid(T).name() << ' '; } // // int main() { // f<1>(); // f<2>(); // // g(); // g(); // } // // With VC++ 6.0 the output is: // // 2 2 double double // // To fix it, write // // template // void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... } // // template // void g(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) { ... } // #if defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS) && defined(__cplusplus) # include "boost/type.hpp" # include "boost/non_type.hpp" # define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type* = 0 # define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type* # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type* = 0 # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type* # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \ , BOOST_EXPLICIT_TEMPLATE_TYPE(t) # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \ , BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \ , BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \ , BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) #else // no workaround needed: expand to nothing # define BOOST_EXPLICIT_TEMPLATE_TYPE(t) # define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) #endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS // When BOOST_NO_STD_TYPEINFO is defined, we can just import // the global definition into std namespace: #if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus) #include namespace std{ using ::type_info; } #endif // ---------------------------------------------------------------------------// // // Helper macro BOOST_STRINGIZE: // Converts the parameter X to a string after macro replacement // on X has been performed. // #define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) #define BOOST_DO_STRINGIZE(X) #X // // Helper macro BOOST_JOIN: // The following piece of macro magic joins the two // arguments together, even when one of the arguments is // itself a macro (see 16.3.1 in C++ standard). The key // is that macro expansion of macro arguments does not // occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN. // #define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y ) #define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y) #define BOOST_DO_JOIN2( X, Y ) X##Y // // Set some default values for compiler/library/platform names. // These are for debugging config setup only: // # ifndef BOOST_COMPILER # define BOOST_COMPILER "Unknown ISO C++ Compiler" # endif # ifndef BOOST_STDLIB # define BOOST_STDLIB "Unknown ISO standard library" # endif # ifndef BOOST_PLATFORM # if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \ || defined(_POSIX_SOURCE) # define BOOST_PLATFORM "Generic Unix" # else # define BOOST_PLATFORM "Unknown" # endif # endif // // Set some default values GPU support // # ifndef BOOST_GPU_ENABLED # define BOOST_GPU_ENABLED # endif // BOOST_FORCEINLINE ---------------------------------------------// // Macro to use in place of 'inline' to force a function to be inline #if !defined(BOOST_FORCEINLINE) # if defined(_MSC_VER) # define BOOST_FORCEINLINE __forceinline # elif defined(__GNUC__) && __GNUC__ > 3 // Clang also defines __GNUC__ (as 4) # define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__)) # else # define BOOST_FORCEINLINE inline # endif #endif // // Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined // #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276) #define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE #endif // -------------------- Deprecated macros for 1.50 --------------------------- // These will go away in a future release // Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP // instead of BOOST_NO_STD_UNORDERED #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET) # ifndef BOOST_NO_CXX11_STD_UNORDERED # define BOOST_NO_CXX11_STD_UNORDERED # endif #endif // Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS #if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS) # define BOOST_NO_INITIALIZER_LISTS #endif // Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY #if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY) # define BOOST_NO_0X_HDR_ARRAY #endif // Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO #if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO) # define BOOST_NO_0X_HDR_CHRONO #endif // Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT #if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT) # define BOOST_NO_0X_HDR_CODECVT #endif // Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE #if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE) # define BOOST_NO_0X_HDR_CONDITION_VARIABLE #endif // Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST #if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST) # define BOOST_NO_0X_HDR_FORWARD_LIST #endif // Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE #if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE) # define BOOST_NO_0X_HDR_FUTURE #endif // Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST // instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS #ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST # ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST # define BOOST_NO_0X_HDR_INITIALIZER_LIST # endif # ifndef BOOST_NO_INITIALIZER_LISTS # define BOOST_NO_INITIALIZER_LISTS # endif #endif // Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX #if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX) # define BOOST_NO_0X_HDR_MUTEX #endif // Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM #if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM) # define BOOST_NO_0X_HDR_RANDOM #endif // Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO #if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO) # define BOOST_NO_0X_HDR_RATIO #endif // Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX #if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX) # define BOOST_NO_0X_HDR_REGEX #endif // Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR #if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR) # define BOOST_NO_0X_HDR_SYSTEM_ERROR #endif // Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD #if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD) # define BOOST_NO_0X_HDR_THREAD #endif // Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE #if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE) # define BOOST_NO_0X_HDR_TUPLE #endif // Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS #if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS) # define BOOST_NO_0X_HDR_TYPE_TRAITS #endif // Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX #if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX) # define BOOST_NO_0X_HDR_TYPEINDEX #endif // Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP) # define BOOST_NO_0X_HDR_UNORDERED_MAP #endif // Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET #if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET) # define BOOST_NO_0X_HDR_UNORDERED_SET #endif // ------------------ End of deprecated macros for 1.50 --------------------------- // -------------------- Deprecated macros for 1.51 --------------------------- // These will go away in a future release // Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS #if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS) # define BOOST_NO_AUTO_DECLARATIONS #endif // Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS #if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS) # define BOOST_NO_AUTO_MULTIDECLARATIONS #endif // Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T #if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T) # define BOOST_NO_CHAR16_T #endif // Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T #if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T) # define BOOST_NO_CHAR32_T #endif // Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES #if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES) # define BOOST_NO_TEMPLATE_ALIASES #endif // Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR #if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR) # define BOOST_NO_CONSTEXPR #endif // Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276 #if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276) # define BOOST_NO_DECLTYPE_N3276 #endif // Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE) # define BOOST_NO_DECLTYPE #endif // Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS #if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS) # define BOOST_NO_DEFAULTED_FUNCTIONS #endif // Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS #if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS) # define BOOST_NO_DELETED_FUNCTIONS #endif // Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS) # define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS #endif // Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE #if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE) # define BOOST_NO_EXTERN_TEMPLATE #endif // Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS #if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS) # define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS #endif // Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS #if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS) # define BOOST_NO_LAMBDAS #endif // Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS #if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS) # define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS #endif // Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT #if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT) # define BOOST_NO_NOEXCEPT #endif // Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR #if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR) # define BOOST_NO_NULLPTR #endif // Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS #if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS) # define BOOST_NO_RAW_LITERALS #endif // Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES) # define BOOST_NO_RVALUE_REFERENCES #endif // Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS #if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS) # define BOOST_NO_SCOPED_ENUMS #endif // Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT #if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT) # define BOOST_NO_STATIC_ASSERT #endif // Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED #if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED) # define BOOST_NO_STD_UNORDERED #endif // Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS #if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS) # define BOOST_NO_UNICODE_LITERALS #endif // Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX #if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX) # define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX #endif // Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES) # define BOOST_NO_VARIADIC_TEMPLATES #endif // Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS #if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS) # define BOOST_NO_VARIADIC_MACROS #endif // Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST #if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST) # define BOOST_NO_NUMERIC_LIMITS_LOWEST #endif // ------------------ End of deprecated macros for 1.51 --------------------------- // // Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR // These aid the transition to C++11 while still supporting C++03 compilers // #ifdef BOOST_NO_CXX11_NOEXCEPT # define BOOST_NOEXCEPT # define BOOST_NOEXCEPT_OR_NOTHROW throw() # define BOOST_NOEXCEPT_IF(Predicate) # define BOOST_NOEXCEPT_EXPR(Expression) false #else # define BOOST_NOEXCEPT noexcept # define BOOST_NOEXCEPT_OR_NOTHROW noexcept # define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate)) # define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression)) #endif // // Helper macro BOOST_FALLTHROUGH // Fallback definition of BOOST_FALLTHROUGH macro used to mark intended // fall-through between case labels in a switch statement. We use a definition // that requires a semicolon after it to avoid at least one type of misuse even // on unsupported compilers. // #ifndef BOOST_FALLTHROUGH # define BOOST_FALLTHROUGH ((void)0) #endif // // constexpr workarounds // #if defined(BOOST_NO_CXX11_CONSTEXPR) #define BOOST_CONSTEXPR #define BOOST_CONSTEXPR_OR_CONST const #else #define BOOST_CONSTEXPR constexpr #define BOOST_CONSTEXPR_OR_CONST constexpr #endif #define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST // // Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined // #if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT) # define BOOST_HAS_STATIC_ASSERT #endif // // Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined // #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS) #define BOOST_HAS_RVALUE_REFS #endif // // Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL) #define BOOST_HAS_VARIADIC_TMPL #endif #endif passenger-4.0.37/ext/boost/config/user.hpp000644 000765 000024 00000012045 12233035540 021100 0ustar00honglistaff000000 000000 // boost/config/user.hpp ---------------------------------------------------// // (C) Copyright John Maddock 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Do not check in modified versions of this file, // This file may be customized by the end user, but not by boost. // // Use this file to define a site and compiler specific // configuration policy: // // define this to locate a compiler config file: // #define BOOST_COMPILER_CONFIG // define this to locate a stdlib config file: // #define BOOST_STDLIB_CONFIG // define this to locate a platform config file: // #define BOOST_PLATFORM_CONFIG // define this to disable compiler config, // use if your compiler config has nothing to set: // #define BOOST_NO_COMPILER_CONFIG // define this to disable stdlib config, // use if your stdlib config has nothing to set: // #define BOOST_NO_STDLIB_CONFIG // define this to disable platform config, // use if your platform config has nothing to set: // #define BOOST_NO_PLATFORM_CONFIG // define this to disable all config options, // excluding the user config. Use if your // setup is fully ISO compliant, and has no // useful extensions, or for autoconf generated // setups: // #define BOOST_NO_CONFIG // define this to make the config "optimistic" // about unknown compiler versions. Normally // unknown compiler versions are assumed to have // all the defects of the last known version, however // setting this flag, causes the config to assume // that unknown compiler versions are fully conformant // with the standard: // #define BOOST_STRICT_CONFIG // define this to cause the config to halt compilation // with an #error if it encounters anything unknown -- // either an unknown compiler version or an unknown // compiler/platform/library: // #define BOOST_ASSERT_CONFIG // define if you want to disable threading support, even // when available: // #define BOOST_DISABLE_THREADS // define when you want to disable Win32 specific features // even when available: // #define BOOST_DISABLE_WIN32 // BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any // prefix/suffix headers that normally control things like struct // packing and alignment. // #define BOOST_DISABLE_ABI_HEADERS // BOOST_ABI_PREFIX: A prefix header to include in place of whatever // boost.config would normally select, any replacement should set up // struct packing and alignment options as required. // #define BOOST_ABI_PREFIX my-header-name // BOOST_ABI_SUFFIX: A suffix header to include in place of whatever // boost.config would normally select, any replacement should undo // the effects of the prefix header. // #define BOOST_ABI_SUFFIX my-header-name // BOOST_ALL_DYN_LINK: Forces all libraries that have separate source, // to be linked as dll's rather than static libraries on Microsoft Windows // (this macro is used to turn on __declspec(dllimport) modifiers, so that // the compiler knows which symbols to look for in a dll rather than in a // static library). Note that there may be some libraries that can only // be statically linked (Boost.Test for example) and others which may only // be dynamically linked (Boost.Threads for example), in these cases this // macro has no effect. // #define BOOST_ALL_DYN_LINK // BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll // rather than a static library on Microsoft Windows: replace the WHATEVER // part of the macro name with the name of the library that you want to // dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or // BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) // modifiers, so that the compiler knows which symbols to look for in a dll // rather than in a static library). // Note that there may be some libraries that can only be statically linked // (Boost.Test for example) and others which may only be dynamically linked // (Boost.Threads for example), in these cases this macro is unsupported. // #define BOOST_WHATEVER_DYN_LINK // BOOST_ALL_NO_LIB: Tells the config system not to automatically select // which libraries to link against. // Normally if a compiler supports #pragma lib, then the correct library // build variant will be automatically selected and linked against, // simply by the act of including one of that library's headers. // This macro turns that feature off. // #define BOOST_ALL_NO_LIB // BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically // select which library to link against for library "whatever", // replace WHATEVER in the macro name with the name of the library; // for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB. // Normally if a compiler supports #pragma lib, then the correct library // build variant will be automatically selected and linked against, simply // by the act of including one of that library's headers. This macro turns // that feature off. // #define BOOST_WHATEVER_NO_LIB passenger-4.0.37/ext/boost/config/warning_disable.hpp000644 000765 000024 00000003434 12233035540 023254 0ustar00honglistaff000000 000000 // Copyright John Maddock 2008 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // This file exists to turn off some overly-pedantic warning emitted // by certain compilers. You should include this header only in: // // * A test case, before any other headers, or, // * A library source file before any other headers. // // IT SHOULD NOT BE INCLUDED BY ANY BOOST HEADER. // // YOU SHOULD NOT INCLUDE IT IF YOU CAN REASONABLY FIX THE WARNING. // // The only warnings disabled here are those that are: // // * Quite unreasonably pedantic. // * Generally only emitted by a single compiler. // * Can't easily be fixed: for example if the vendors own std lib // code emits these warnings! // // Note that THIS HEADER MUST NOT INCLUDE ANY OTHER HEADERS: // not even std library ones! Doing so may turn the warning // off too late to be of any use. For example the VC++ C4996 // warning can be emitted from if that header is included // before or by this one :-( // #ifndef BOOST_CONFIG_WARNING_DISABLE_HPP #define BOOST_CONFIG_WARNING_DISABLE_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1400) // Error 'function': was declared deprecated // http://msdn2.microsoft.com/en-us/library/ttcz0bys(VS.80).aspx // This error is emitted when you use some perfectly conforming // std lib functions in a perfectly correct way, and also by // some of Microsoft's own std lib code ! # pragma warning(disable:4996) #endif #if defined(__INTEL_COMPILER) || defined(__ICL) // As above: gives warning when a "deprecated" // std library function is encountered. # pragma warning(disable:1786) #endif #endif // BOOST_CONFIG_WARNING_DISABLE_HPP passenger-4.0.37/ext/boost/config/stdlib/dinkumware.hpp000644 000765 000024 00000012170 12233035540 023550 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001. // (C) Copyright Peter Dimov 2001. // (C) Copyright David Abrahams 2002. // (C) Copyright Guillaume Melquiond 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Dinkumware standard library config: #if !defined(_YVALS) && !defined(_CPPLIB_VER) #include #if !defined(_YVALS) && !defined(_CPPLIB_VER) #error This is not the Dinkumware lib! #endif #endif #if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306) // full dinkumware 3.06 and above // fully conforming provided the compiler supports it: # if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h # define BOOST_NO_STDC_NAMESPACE # endif # if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC) # define BOOST_NO_STD_ALLOCATOR # endif # define BOOST_HAS_PARTIAL_STD_ALLOCATOR # if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) // if this lib version is set up for vc6 then there is no std::use_facet: # define BOOST_NO_STD_USE_FACET # define BOOST_HAS_TWO_ARG_USE_FACET // C lib functions aren't in namespace std either: # define BOOST_NO_STDC_NAMESPACE // and nor is # define BOOST_NO_EXCEPTION_STD_NAMESPACE # endif // There's no numeric_limits support unless _LONGLONG is defined: # if !defined(_LONGLONG) && (_CPPLIB_VER <= 310) # define BOOST_NO_MS_INT64_NUMERIC_LIMITS # endif // 3.06 appears to have (non-sgi versions of) & , // and no at all #else # define BOOST_MSVC_STD_ITERATOR 1 # define BOOST_NO_STD_ITERATOR # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS # define BOOST_NO_STD_ALLOCATOR # define BOOST_NO_STDC_NAMESPACE # define BOOST_NO_STD_USE_FACET # define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN # define BOOST_HAS_MACRO_USE_FACET # ifndef _CPPLIB_VER // Updated Dinkum library defines this, and provides // its own min and max definitions, as does MTA version. # ifndef __MTA__ # define BOOST_NO_STD_MIN_MAX # endif # define BOOST_NO_MS_INT64_NUMERIC_LIMITS # endif #endif // // std extension namespace is stdext for vc7.1 and later, // the same applies to other compilers that sit on top // of vc7.1 (Intel and Comeau): // #if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__) # define BOOST_STD_EXTENSION_NAMESPACE stdext #endif #if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306) // if we're using a dinkum lib that's // been configured for VC6/7 then there is // no iterator traits (true even for icl) # define BOOST_NO_STD_ITERATOR_TRAITS #endif #if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310) // Intel C++ chokes over any non-trivial use of // this may be an overly restrictive define, but regex fails without it: # define BOOST_NO_STD_LOCALE #endif #include #if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) # define BOOST_NO_STD_TYPEINFO #endif // C++0x headers implemented in 520 (as shipped by Microsoft) // #if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520 # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_SMART_PTR #endif #if (!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_CXX11_HDR_TUPLE) # define BOOST_NO_CXX11_HDR_TUPLE #endif // C++0x headers implemented in 540 (as shipped by Microsoft) // #if !defined(_CPPLIB_VER) || _CPPLIB_VER < 540 # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR #endif // // C++0x headers not yet (fully) implemented: // # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #ifdef _CPPLIB_VER # define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER #else # define BOOST_DINKUMWARE_STDLIB 1 #endif #ifdef _CPPLIB_VER # define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER) #else # define BOOST_STDLIB "Dinkumware standard library version 1.x" #endif passenger-4.0.37/ext/boost/config/stdlib/libcomo.hpp000644 000765 000024 00000004257 12233035540 023035 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2002 - 2003. // (C) Copyright Jens Maurer 2002 - 2003. // (C) Copyright Beman Dawes 2002 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Comeau STL: #if !defined(__LIBCOMO__) # include # if !defined(__LIBCOMO__) # error "This is not the Comeau STL!" # endif #endif // // std::streambuf is non-standard // NOTE: versions of libcomo prior to beta28 have octal version numbering, // e.g. version 25 is 21 (dec) #if __LIBCOMO_VERSION__ <= 22 # define BOOST_NO_STD_WSTREAMBUF #endif #if (__LIBCOMO_VERSION__ <= 31) && defined(_WIN32) #define BOOST_NO_SWPRINTF #endif #if __LIBCOMO_VERSION__ >= 31 # define BOOST_HAS_HASH # define BOOST_HAS_SLIST #endif // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL // // Intrinsic type_traits support. // The SGI STL has it's own __type_traits class, which // has intrinsic compiler support with SGI's compilers. // Whatever map SGI style type traits to boost equivalents: // #define BOOST_HAS_SGI_TYPE_TRAITS #define BOOST_STDLIB "Comeau standard library " BOOST_STRINGIZE(__LIBCOMO_VERSION__) passenger-4.0.37/ext/boost/config/stdlib/libcpp.hpp000644 000765 000024 00000001706 12233035540 022656 0ustar00honglistaff000000 000000 // (C) Copyright Christopher Jefferson 2011. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // config for libc++ // Might need more in here later. #if !defined(_LIBCPP_VERSION) # include # if !defined(_LIBCPP_VERSION) # error "This is not libc++!" # endif #endif #define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION) #define BOOST_HAS_THREADS #ifdef _LIBCPP_HAS_NO_VARIADICS # define BOOST_NO_CXX11_HDR_TUPLE #endif // // These appear to be unusable/incomplete so far: // # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_ATOMIC_SMART_PTR // libc++ uses a non-standard messages_base #define BOOST_NO_STD_MESSAGES // --- end --- passenger-4.0.37/ext/boost/config/stdlib/libstdcpp3.hpp000644 000765 000024 00000014024 12233035540 023451 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001. // (C) Copyright Jens Maurer 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // config for libstdc++ v3 // not much to go in here: #define BOOST_GNU_STDLIB 1 #ifdef __GLIBCXX__ #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) #else #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__) #endif #if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T) # define BOOST_NO_CWCHAR # define BOOST_NO_CWCTYPE # define BOOST_NO_STD_WSTRING # define BOOST_NO_STD_WSTREAMBUF #endif #if defined(__osf__) && !defined(_REENTRANT) \ && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) ) // GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header // file is included, therefore for consistency we define it here as well. # define _REENTRANT #endif #ifdef __GLIBCXX__ // gcc 3.4 and greater: # if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ || defined(_GLIBCXX__PTHREADS) \ || defined(_GLIBCXX_HAS_GTHREADS) \ || defined(_WIN32) \ || defined(_AIX) // // If the std lib has thread support turned on, then turn it on in Boost // as well. We do this because some gcc-3.4 std lib headers define _REENTANT // while others do not... // # define BOOST_HAS_THREADS # else # define BOOST_DISABLE_THREADS # endif #elif defined(__GLIBCPP__) \ && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \ && !defined(_GLIBCPP__PTHREADS) // disable thread support if the std lib was built single threaded: # define BOOST_DISABLE_THREADS #endif #if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT) // linux on arm apparently doesn't define _REENTRANT // so just turn on threading support whenever the std lib is thread safe: # define BOOST_HAS_THREADS #endif #if !defined(_GLIBCPP_USE_LONG_LONG) \ && !defined(_GLIBCXX_USE_LONG_LONG)\ && defined(BOOST_HAS_LONG_LONG) // May have been set by compiler/*.hpp, but "long long" without library // support is useless. # undef BOOST_HAS_LONG_LONG #endif // Apple doesn't seem to reliably defined a *unix* macro #if !defined(CYGWIN) && ( defined(__unix__) \ || defined(__unix) \ || defined(unix) \ || defined(__APPLE__) \ || defined(__APPLE) \ || defined(APPLE)) # include #endif #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx # define BOOST_HAS_SLIST # define BOOST_HAS_HASH # define BOOST_SLIST_HEADER # if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) # define BOOST_HASH_SET_HEADER # define BOOST_HASH_MAP_HEADER # else # define BOOST_HASH_SET_HEADER # define BOOST_HASH_MAP_HEADER # endif #endif // stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly // __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++ // developers. He also commented: // // "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in // GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305. // Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support // than any release in the 4.2 series." // // Another resource for understanding stdlibc++ features is: // http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x // C++0x headers in GCC 4.3.0 and later // #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_FUNCTIONAL #endif // C++0x headers in GCC 4.4.0 and later // #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_SMART_PTR #else # define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG # define BOOST_HAS_TR1_COMPLEX_OVERLOADS #endif #if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) && (!defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) || !defined(BOOST_NO_CXX11_HDR_MUTEX)) # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_MUTEX #endif // C++0x features in GCC 4.5.0 and later // #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_RANDOM #endif // C++0x features in GCC 4.6.0 and later // #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_NO_CXX11_HDR_TYPEINDEX #endif // C++0x features in GCC 4.7.0 and later // #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__) // Note that although existed prior to 4.7, "stead_clock" is spelled "monotonic_clock" // so 4.7.0 is the first truely conforming one. # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_ALLOCATOR #endif // C++0x headers not yet (fully!) implemented // # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_ATOMIC_SMART_PTR // --- end --- passenger-4.0.37/ext/boost/config/stdlib/modena.hpp000644 000765 000024 00000003132 12233035540 022643 0ustar00honglistaff000000 000000 // (C) Copyright Jens Maurer 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Modena C++ standard library (comes with KAI C++) #if !defined(MSIPL_COMPILE_H) # include # if !defined(__MSIPL_COMPILE_H) # error "This is not the Modena C++ library!" # endif #endif #ifndef MSIPL_NL_TYPES #define BOOST_NO_STD_MESSAGES #endif #ifndef MSIPL_WCHART #define BOOST_NO_STD_WSTRING #endif // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL #define BOOST_STDLIB "Modena C++ standard library" passenger-4.0.37/ext/boost/config/stdlib/msl.hpp000644 000765 000024 00000004265 12233035540 022203 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001. // (C) Copyright Darin Adler 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Metrowerks standard library: #ifndef __MSL_CPP__ # include # ifndef __MSL_CPP__ # error This is not the MSL standard library! # endif #endif #if __MSL_CPP__ >= 0x6000 // Pro 6 # define BOOST_HAS_HASH # define BOOST_STD_EXTENSION_NAMESPACE Metrowerks #endif #define BOOST_HAS_SLIST #if __MSL_CPP__ < 0x6209 # define BOOST_NO_STD_MESSAGES #endif // check C lib version for #include #if defined(__MSL__) && (__MSL__ >= 0x5000) # define BOOST_HAS_STDINT_H # if !defined(__PALMOS_TRAPS__) # define BOOST_HAS_UNISTD_H # endif // boilerplate code: # include #endif #if defined(_MWMT) || _MSL_THREADSAFE # define BOOST_HAS_THREADS #endif #ifdef _MSL_NO_EXPLICIT_FUNC_TEMPLATE_ARG # define BOOST_NO_STD_USE_FACET # define BOOST_HAS_TWO_ARG_USE_FACET #endif // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL #define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) passenger-4.0.37/ext/boost/config/stdlib/roguewave.hpp000644 000765 000024 00000013022 12233035540 023403 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001. // (C) Copyright David Abrahams 2003. // (C) Copyright Boris Gubenko 2007. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Rogue Wave std lib: #define BOOST_RW_STDLIB 1 #if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) # include # if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) # error This is not the Rogue Wave standard library # endif #endif // // figure out a consistent version number: // #ifndef _RWSTD_VER # define BOOST_RWSTD_VER 0x010000 #elif _RWSTD_VER < 0x010000 # define BOOST_RWSTD_VER (_RWSTD_VER << 8) #else # define BOOST_RWSTD_VER _RWSTD_VER #endif #ifndef _RWSTD_VER # define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)" #elif _RWSTD_VER < 0x04010200 # define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER) #else # ifdef _RWSTD_VER_STR # define BOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR # else # define BOOST_STDLIB "Apache STDCXX standard library version " BOOST_STRINGIZE(_RWSTD_VER) # endif #endif // // Prior to version 2.2.0 the primary template for std::numeric_limits // does not have compile time constants, even though specializations of that // template do: // #if BOOST_RWSTD_VER < 0x020200 # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS #endif // Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the // library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817): #if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550)) # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS # endif // // Borland version of numeric_limits lacks __int64 specialisation: // #ifdef __BORLANDC__ # define BOOST_NO_MS_INT64_NUMERIC_LIMITS #endif // // No std::iterator if it can't figure out default template args: // #if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000) # define BOOST_NO_STD_ITERATOR #endif // // No iterator traits without partial specialization: // #if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC) # define BOOST_NO_STD_ITERATOR_TRAITS #endif // // Prior to version 2.0, std::auto_ptr was buggy, and there were no // new-style iostreams, and no conformant std::allocator: // #if (BOOST_RWSTD_VER < 0x020000) # define BOOST_NO_AUTO_PTR # define BOOST_NO_STRINGSTREAM # define BOOST_NO_STD_ALLOCATOR # define BOOST_NO_STD_LOCALE #endif // // No template iterator constructors without member template support: // #if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES) # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS #endif // // RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use // (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR // on HP aCC systems even though the allocator is in fact broken): // #if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100) # define BOOST_NO_STD_ALLOCATOR #endif // // If we have a std::locale, we still may not have std::use_facet: // #if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE) # define BOOST_NO_STD_USE_FACET # define BOOST_HAS_TWO_ARG_USE_FACET #endif // // There's no std::distance prior to version 2, or without // partial specialization support: // #if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) #define BOOST_NO_STD_DISTANCE #endif // // Some versions of the rogue wave library don't have assignable // OutputIterators: // #if BOOST_RWSTD_VER < 0x020100 # define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN #endif // // Disable BOOST_HAS_LONG_LONG when the library has no support for it. // #if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG) # undef BOOST_HAS_LONG_LONG #endif // // check that on HP-UX, the proper RW library is used // #if defined(__HP_aCC) && !defined(_HP_NAMESPACE_STD) # error "Boost requires Standard RW library. Please compile and link with -AA" #endif // // Define macros specific to RW V2.2 on HP-UX // #if defined(__HP_aCC) && (BOOST_RWSTD_VER == 0x02020100) # ifndef __HP_TC1_MAKE_PAIR # define __HP_TC1_MAKE_PAIR # endif # ifndef _HP_INSTANTIATE_STD2_VL # define _HP_INSTANTIATE_STD2_VL # endif #endif #if _RWSTD_VER < 0x05000000 # define BOOST_NO_CXX11_HDR_ARRAY #endif // type_traits header is incomplete: # define BOOST_NO_CXX11_HDR_TYPE_TRAITS // // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL passenger-4.0.37/ext/boost/config/stdlib/sgi.hpp000644 000765 000024 00000010547 12233035540 022172 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001. // (C) Copyright Jens Maurer 2001 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // generic SGI STL: #if !defined(__STL_CONFIG_H) # include # if !defined(__STL_CONFIG_H) # error "This is not the SGI STL!" # endif #endif // // No std::iterator traits without partial specialisation: // #if !defined(__STL_CLASS_PARTIAL_SPECIALIZATION) # define BOOST_NO_STD_ITERATOR_TRAITS #endif // // No std::stringstream with gcc < 3 // #if defined(__GNUC__) && (__GNUC__ < 3) && \ ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \ !defined(__STL_USE_NEW_IOSTREAMS) || \ defined(__APPLE_CC__) // Note that we only set this for GNU C++ prior to 2.95 since the // latest patches for that release do contain a minimal // If you are running a 2.95 release prior to 2.95.3 then this will need // setting, but there is no way to detect that automatically (other // than by running the configure script). // Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't // have . # define BOOST_NO_STRINGSTREAM #endif // Apple doesn't seem to reliably defined a *unix* macro #if !defined(CYGWIN) && ( defined(__unix__) \ || defined(__unix) \ || defined(unix) \ || defined(__APPLE__) \ || defined(__APPLE) \ || defined(APPLE)) # include #endif // // Assume no std::locale without own iostreams (this may be an // incorrect assumption in some cases): // #if !defined(__SGI_STL_OWN_IOSTREAMS) && !defined(__STL_USE_NEW_IOSTREAMS) # define BOOST_NO_STD_LOCALE #endif // // Original native SGI streams have non-standard std::messages facet: // #if defined(__sgi) && (_COMPILER_VERSION <= 650) && !defined(__SGI_STL_OWN_IOSTREAMS) # define BOOST_NO_STD_LOCALE #endif // // SGI's new iostreams have missing "const" in messages<>::open // #if defined(__sgi) && (_COMPILER_VERSION <= 740) && defined(__STL_USE_NEW_IOSTREAMS) # define BOOST_NO_STD_MESSAGES #endif // // No template iterator constructors, or std::allocator // without member templates: // #if !defined(__STL_MEMBER_TEMPLATES) # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS # define BOOST_NO_STD_ALLOCATOR #endif // // We always have SGI style hash_set, hash_map, and slist: // #define BOOST_HAS_HASH #define BOOST_HAS_SLIST // // If this is GNU libstdc++2, then no and no std::wstring: // #if (defined(__GNUC__) && (__GNUC__ < 3)) # include # if defined(__BASTRING__) # define BOOST_NO_LIMITS // Note: will provide compile-time constants # undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_NO_STD_WSTRING # endif #endif // // There is no standard iterator unless we have namespace support: // #if !defined(__STL_USE_NAMESPACES) # define BOOST_NO_STD_ITERATOR #endif // // Intrinsic type_traits support. // The SGI STL has it's own __type_traits class, which // has intrinsic compiler support with SGI's compilers. // Whatever map SGI style type traits to boost equivalents: // #define BOOST_HAS_SGI_TYPE_TRAITS // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL #define BOOST_STDLIB "SGI standard library" passenger-4.0.37/ext/boost/config/stdlib/stlport.hpp000644 000765 000024 00000017442 12233035540 023120 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2002. // (C) Copyright Darin Adler 2001. // (C) Copyright Jens Maurer 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // STLPort standard library config: #if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) # include # if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) # error "This is not STLPort!" # endif #endif // Apple doesn't seem to reliably defined a *unix* macro #if !defined(CYGWIN) && ( defined(__unix__) \ || defined(__unix) \ || defined(unix) \ || defined(__APPLE__) \ || defined(__APPLE) \ || defined(APPLE)) # include #endif // // __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS // for versions prior to 4.1(beta) // #if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400) # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS #endif // // If STLport thinks that there is no partial specialisation, then there is no // std::iterator traits: // #if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION)) # define BOOST_NO_STD_ITERATOR_TRAITS #endif // // No new style iostreams on GCC without STLport's iostreams enabled: // #if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS)) # define BOOST_NO_STRINGSTREAM #endif // // No new iostreams implies no std::locale, and no std::stringstream: // #if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS) # define BOOST_NO_STD_LOCALE # define BOOST_NO_STRINGSTREAM #endif // // If the streams are not native, and we have a "using ::x" compiler bug // then the io stream facets are not available in namespace std:: // #ifdef _STLPORT_VERSION # if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) # define BOOST_NO_STD_LOCALE # endif #else # if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) # define BOOST_NO_STD_LOCALE # endif #endif #if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520) # define BOOST_HAS_TR1_UNORDERED_SET # define BOOST_HAS_TR1_UNORDERED_MAP #endif // // Without member template support enabled, their are no template // iterate constructors, and no std::allocator: // #if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES)) # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS # define BOOST_NO_STD_ALLOCATOR #endif // // however we always have at least a partial allocator: // #define BOOST_HAS_PARTIAL_STD_ALLOCATOR #if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) # define BOOST_NO_STD_ALLOCATOR #endif #if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) # define BOOST_NO_STD_ALLOCATOR #endif // // If STLport thinks there is no wchar_t at all, then we have to disable // the support for the relevant specilazations of std:: templates. // #if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT) # ifndef BOOST_NO_STD_WSTRING # define BOOST_NO_STD_WSTRING # endif # ifndef BOOST_NO_STD_WSTREAMBUF # define BOOST_NO_STD_WSTREAMBUF # endif #endif // // We always have SGI style hash_set, hash_map, and slist: // #ifndef _STLP_NO_EXTENSIONS #define BOOST_HAS_HASH #define BOOST_HAS_SLIST #endif // // STLport does a good job of importing names into namespace std::, // but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our // workaround does not conflict with STLports: // // // Harold Howe says: // Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with // BCB6 does cause problems. If we detect C++ Builder, then don't define // BOOST_NO_STDC_NAMESPACE // #if !defined(__BORLANDC__) && !defined(__DMC__) // // If STLport is using it's own namespace, and the real names are in // the global namespace, then we duplicate STLport's using declarations // (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't // necessarily import all the names we need into namespace std:: // # if (defined(__STL_IMPORT_VENDOR_CSTD) \ || defined(__STL_USE_OWN_NAMESPACE) \ || defined(_STLP_IMPORT_VENDOR_CSTD) \ || defined(_STLP_USE_OWN_NAMESPACE)) \ && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD)) # define BOOST_NO_STDC_NAMESPACE # define BOOST_NO_EXCEPTION_STD_NAMESPACE # endif #elif defined(__BORLANDC__) && __BORLANDC__ < 0x560 // STLport doesn't import std::abs correctly: #include namespace std { using ::abs; } // and strcmp/strcpy don't get imported either ('cos they are macros) #include #ifdef strcpy # undef strcpy #endif #ifdef strcmp # undef strcmp #endif #ifdef _STLP_VENDOR_CSTD namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; } #endif #endif // // std::use_facet may be non-standard, uses a class instead: // #if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) # define BOOST_NO_STD_USE_FACET # define BOOST_HAS_STLP_USE_FACET #endif // // If STLport thinks there are no wide functions, etc. is not working; but // only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import // into std:: ourselves). // #if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE) # define BOOST_NO_CWCHAR # define BOOST_NO_CWCTYPE #endif // // If STLport for some reason was configured so that it thinks that wchar_t // is not an intrinsic type, then we have to disable the support for it as // well (we would be missing required specializations otherwise). // #if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT) # undef BOOST_NO_INTRINSIC_WCHAR_T # define BOOST_NO_INTRINSIC_WCHAR_T #endif // // Borland ships a version of STLport with C++ Builder 6 that lacks // hashtables and the like: // #if defined(__BORLANDC__) && (__BORLANDC__ == 0x560) # undef BOOST_HAS_HASH #endif // // gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max // #if defined(__GNUC__) && (__GNUC__ < 3) # include // for std::min and std::max # define BOOST_USING_STD_MIN() ((void)0) # define BOOST_USING_STD_MAX() ((void)0) namespace boost { using std::min; using std::max; } #endif // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) passenger-4.0.37/ext/boost/config/stdlib/vacpp.hpp000644 000765 000024 00000003374 12233035540 022521 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. #if __IBMCPP__ <= 501 # define BOOST_NO_STD_ALLOCATOR #endif #define BOOST_HAS_MACRO_USE_FACET #define BOOST_NO_STD_MESSAGES // Apple doesn't seem to reliably defined a *unix* macro #if !defined(CYGWIN) && ( defined(__unix__) \ || defined(__unix) \ || defined(unix) \ || defined(__APPLE__) \ || defined(__APPLE) \ || defined(APPLE)) # include #endif // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL #define BOOST_STDLIB "Visual Age default standard library" passenger-4.0.37/ext/boost/config/platform/aix.hpp000644 000765 000024 00000001561 12233035540 022530 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // IBM/Aix specific config options: #define BOOST_PLATFORM "IBM Aix" #define BOOST_HAS_UNISTD_H #define BOOST_HAS_NL_TYPES_H #define BOOST_HAS_NANOSLEEP #define BOOST_HAS_CLOCK_GETTIME // This needs support in "boost/cstdint.hpp" exactly like FreeBSD. // This platform has header named which includes all // the things needed. #define BOOST_HAS_STDINT_H // Threading API's: #define BOOST_HAS_PTHREADS #define BOOST_HAS_PTHREAD_DELAY_NP #define BOOST_HAS_SCHED_YIELD //#define BOOST_HAS_PTHREAD_YIELD // boilerplate code: #include passenger-4.0.37/ext/boost/config/platform/amigaos.hpp000644 000765 000024 00000000672 12233035540 023371 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. #define BOOST_PLATFORM "AmigaOS" #define BOOST_DISABLE_THREADS #define BOOST_NO_CWCHAR #define BOOST_NO_STD_WSTRING #define BOOST_NO_INTRINSIC_WCHAR_T passenger-4.0.37/ext/boost/config/platform/beos.hpp000644 000765 000024 00000001121 12233035540 022667 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // BeOS specific config options: #define BOOST_PLATFORM "BeOS" #define BOOST_NO_CWCHAR #define BOOST_NO_CWCTYPE #define BOOST_HAS_UNISTD_H #define BOOST_HAS_BETHREADS #ifndef BOOST_DISABLE_THREADS # define BOOST_HAS_THREADS #endif // boilerplate code: #include passenger-4.0.37/ext/boost/config/platform/bsd.hpp000644 000765 000024 00000004702 12233035540 022517 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001. // (C) Copyright Douglas Gregor 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // generic BSD config options: #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) #error "This platform is not BSD" #endif #ifdef __FreeBSD__ #define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) #elif defined(__NetBSD__) #define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) #elif defined(__OpenBSD__) #define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) #elif defined(__DragonFly__) #define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) #endif // // is this the correct version check? // FreeBSD has but does not // advertise the fact in : // #if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__) # define BOOST_HAS_NL_TYPES_H #endif // // FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in // and not in // #if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\ || defined(__OpenBSD__) || defined(__DragonFly__) # define BOOST_HAS_PTHREADS #endif // // No wide character support in the BSD header files: // #if defined(__NetBSD__) #define __NetBSD_GCC__ (__GNUC__ * 1000000 \ + __GNUC_MINOR__ * 1000 \ + __GNUC_PATCHLEVEL__) // XXX - the following is required until c++config.h // defines _GLIBCXX_HAVE_SWPRINTF and friends // or the preprocessor conditionals are removed // from the cwchar header. #define _GLIBCXX_HAVE_SWPRINTF 1 #endif #if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \ || (defined(__NetBSD_GCC__) && (__NetBSD_GCC__ >= 2095003)) || defined(__DragonFly__)) # define BOOST_NO_CWCHAR #endif // // The BSD has macros only, no functions: // #if !defined(__OpenBSD__) || defined(__DragonFly__) # define BOOST_NO_CTYPE_FUNCTIONS #endif // // thread API's not auto detected: // #define BOOST_HAS_SCHED_YIELD #define BOOST_HAS_NANOSLEEP #define BOOST_HAS_GETTIMEOFDAY #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE #define BOOST_HAS_SIGACTION // boilerplate code: #define BOOST_HAS_UNISTD_H #include passenger-4.0.37/ext/boost/config/platform/cray.hpp000644 000765 000024 00000000701 12233035540 022700 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2011. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // SGI Irix specific config options: #define BOOST_PLATFORM "Cray" // boilerplate code: #define BOOST_HAS_UNISTD_H #include passenger-4.0.37/ext/boost/config/platform/cygwin.hpp000644 000765 000024 00000002560 12233035540 023247 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // cygwin specific config options: #define BOOST_PLATFORM "Cygwin" #define BOOST_HAS_DIRENT_H #define BOOST_HAS_LOG1P #define BOOST_HAS_EXPM1 // // Threading API: // See if we have POSIX threads, if we do use them, otherwise // revert to native Win threads. #define BOOST_HAS_UNISTD_H #include #if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) # define BOOST_HAS_PTHREADS # define BOOST_HAS_SCHED_YIELD # define BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # define BOOST_HAS_SIGACTION #else # if !defined(BOOST_HAS_WINTHREADS) # define BOOST_HAS_WINTHREADS # endif # define BOOST_HAS_FTIME #endif // // find out if we have a stdint.h, there should be a better way to do this: // #include #ifdef _STDINT_H #define BOOST_HAS_STDINT_H #endif /// Cygwin has no fenv.h #define BOOST_NO_FENV_H // boilerplate code: #include // // Cygwin lies about XSI conformance, there is no nl_types.h: // #ifdef BOOST_HAS_NL_TYPES_H # undef BOOST_HAS_NL_TYPES_H #endif passenger-4.0.37/ext/boost/config/platform/hpux.hpp000644 000765 000024 00000004655 12233035540 022742 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2003. // (C) Copyright David Abrahams 2002. // (C) Copyright Toon Knapen 2003. // (C) Copyright Boris Gubenko 2006 - 2007. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // hpux specific config options: #define BOOST_PLATFORM "HP-UX" // In principle, HP-UX has a nice under the name // However, it has the following problem: // Use of UINT32_C(0) results in "0u l" for the preprocessed source // (verifyable with gcc 2.95.3) #if (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__HP_aCC) # define BOOST_HAS_STDINT_H #endif #if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE)) # define BOOST_NO_SWPRINTF #endif #if defined(__HP_aCC) && !defined(_INCLUDE__STDC_A1_SOURCE) # define BOOST_NO_CWCTYPE #endif #if defined(__GNUC__) # if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)) // GNU C on HP-UX does not support threads (checked up to gcc 3.3) # define BOOST_DISABLE_THREADS # elif !defined(BOOST_DISABLE_THREADS) // threads supported from gcc-3.3 onwards: # define BOOST_HAS_THREADS # define BOOST_HAS_PTHREADS # endif #elif defined(__HP_aCC) && !defined(BOOST_DISABLE_THREADS) # define BOOST_HAS_PTHREADS #endif // boilerplate code: #define BOOST_HAS_UNISTD_H #include // the following are always available: #ifndef BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_GETTIMEOFDAY #endif #ifndef BOOST_HAS_SCHED_YIELD # define BOOST_HAS_SCHED_YIELD #endif #ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE #endif #ifndef BOOST_HAS_NL_TYPES_H # define BOOST_HAS_NL_TYPES_H #endif #ifndef BOOST_HAS_NANOSLEEP # define BOOST_HAS_NANOSLEEP #endif #ifndef BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_GETTIMEOFDAY #endif #ifndef BOOST_HAS_DIRENT_H # define BOOST_HAS_DIRENT_H #endif #ifndef BOOST_HAS_CLOCK_GETTIME # define BOOST_HAS_CLOCK_GETTIME #endif #ifndef BOOST_HAS_SIGACTION # define BOOST_HAS_SIGACTION #endif #ifndef BOOST_HAS_NRVO # ifndef __parisc # define BOOST_HAS_NRVO # endif #endif #ifndef BOOST_HAS_LOG1P # define BOOST_HAS_LOG1P #endif #ifndef BOOST_HAS_EXPM1 # define BOOST_HAS_EXPM1 #endif passenger-4.0.37/ext/boost/config/platform/irix.hpp000644 000765 000024 00000001425 12233035540 022721 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // SGI Irix specific config options: #define BOOST_PLATFORM "SGI Irix" #define BOOST_NO_SWPRINTF // // these are not auto detected by POSIX feature tests: // #define BOOST_HAS_GETTIMEOFDAY #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE #ifdef __GNUC__ // GNU C on IRIX does not support threads (checked up to gcc 3.3) # define BOOST_DISABLE_THREADS #endif // boilerplate code: #define BOOST_HAS_UNISTD_H #include passenger-4.0.37/ext/boost/config/platform/linux.hpp000644 000765 000024 00000004774 12233035540 023117 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // linux specific config options: #define BOOST_PLATFORM "linux" // make sure we have __GLIBC_PREREQ if available at all #ifdef __cplusplus #include #else #include #endif // // added to glibc 2.1.1 // We can only test for 2.1 though: // #if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))) // defines int64_t unconditionally, but defines // int64_t only if __GNUC__. Thus, assume a fully usable // only when using GCC. # if defined __GNUC__ # define BOOST_HAS_STDINT_H # endif #endif #if defined(__LIBCOMO__) // // como on linux doesn't have std:: c functions: // NOTE: versions of libcomo prior to beta28 have octal version numbering, // e.g. version 25 is 21 (dec) // # if __LIBCOMO_VERSION__ <= 20 # define BOOST_NO_STDC_NAMESPACE # endif # if __LIBCOMO_VERSION__ <= 21 # define BOOST_NO_SWPRINTF # endif #endif // // If glibc is past version 2 then we definitely have // gettimeofday, earlier versions may or may not have it: // #if defined(__GLIBC__) && (__GLIBC__ >= 2) # define BOOST_HAS_GETTIMEOFDAY #endif #ifdef __USE_POSIX199309 # define BOOST_HAS_NANOSLEEP #endif #if defined(__GLIBC__) && defined(__GLIBC_PREREQ) // __GLIBC_PREREQ is available since 2.1.2 // swprintf is available since glibc 2.2.0 # if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98)) # define BOOST_NO_SWPRINTF # endif #else # define BOOST_NO_SWPRINTF #endif // boilerplate code: #define BOOST_HAS_UNISTD_H #include #define BOOST_HAS_PTHREAD_YIELD #ifndef __GNUC__ // // if the compiler is not gcc we still need to be able to parse // the GNU system headers, some of which (mainly ) // use GNU specific extensions: // # ifndef __extension__ # define __extension__ # endif # ifndef __const__ # define __const__ const # endif # ifndef __volatile__ # define __volatile__ volatile # endif # ifndef __signed__ # define __signed__ signed # endif # ifndef __typeof__ # define __typeof__ typeof # endif # ifndef __inline__ # define __inline__ inline # endif #endif passenger-4.0.37/ext/boost/config/platform/macos.hpp000644 000765 000024 00000004447 12233035540 023057 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001 - 2002. // (C) Copyright Bill Kempf 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Mac OS specific config options: #define BOOST_PLATFORM "Mac OS" #if __MACH__ && !defined(_MSL_USING_MSL_C) // Using the Mac OS X system BSD-style C library. # ifndef BOOST_HAS_UNISTD_H # define BOOST_HAS_UNISTD_H # endif // // Begin by including our boilerplate code for POSIX // feature detection, this is safe even when using // the MSL as Metrowerks supply their own // to replace the platform-native BSD one. G++ users // should also always be able to do this on MaxOS X. // # include # ifndef BOOST_HAS_STDINT_H # define BOOST_HAS_STDINT_H # endif // // BSD runtime has pthreads, sigaction, sched_yield and gettimeofday, // of these only pthreads are advertised in , so set the // other options explicitly: // # define BOOST_HAS_SCHED_YIELD # define BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_SIGACTION # if (__GNUC__ < 3) && !defined( __APPLE_CC__) // GCC strange "ignore std" mode works better if you pretend everything // is in the std namespace, for the most part. # define BOOST_NO_STDC_NAMESPACE # endif # if (__GNUC__ == 4) // Both gcc and intel require these. # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # define BOOST_HAS_NANOSLEEP # endif #else // Using the MSL C library. // We will eventually support threads in non-Carbon builds, but we do // not support this yet. # if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON ) # if !defined(BOOST_HAS_PTHREADS) // MPTasks support is deprecated/removed from Boost: //# define BOOST_HAS_MPTASKS # elif ( __dest_os == __mac_os_x ) // We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the // gettimeofday and no posix. # define BOOST_HAS_GETTIMEOFDAY # endif #ifdef BOOST_HAS_PTHREADS # define BOOST_HAS_THREADS #endif // The remote call manager depends on this. # define BOOST_BIND_ENABLE_PASCAL # endif #endif passenger-4.0.37/ext/boost/config/platform/qnxnto.hpp000644 000765 000024 00000001376 12233035540 023302 0ustar00honglistaff000000 000000 // (C) Copyright Jim Douglas 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // QNX specific config options: #define BOOST_PLATFORM "QNX" #define BOOST_HAS_UNISTD_H #include // QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h // or log1p and expm1: #undef BOOST_HAS_NL_TYPES_H #undef BOOST_HAS_LOG1P #undef BOOST_HAS_EXPM1 #define BOOST_HAS_PTHREADS #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE #define BOOST_HAS_GETTIMEOFDAY #define BOOST_HAS_CLOCK_GETTIME #define BOOST_HAS_NANOSLEEP passenger-4.0.37/ext/boost/config/platform/solaris.hpp000644 000765 000024 00000001311 12233035540 023414 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // sun specific config options: #define BOOST_PLATFORM "Sun Solaris" #define BOOST_HAS_GETTIMEOFDAY // boilerplate code: #define BOOST_HAS_UNISTD_H #include // // pthreads don't actually work with gcc unless _PTHREADS is defined: // #if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS) # undef BOOST_HAS_PTHREADS #endif passenger-4.0.37/ext/boost/config/platform/symbian.hpp000644 000765 000024 00000005066 12233035540 023415 0ustar00honglistaff000000 000000 // (C) Copyright Yuriy Krasnoschek 2009. // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // symbian specific config options: #define BOOST_PLATFORM "Symbian" #define BOOST_SYMBIAN 1 #if defined(__S60_3X__) // Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL # define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK // make sure we have __GLIBC_PREREQ if available at all #ifdef __cplusplus #include #else #include #endif// boilerplate code: # define BOOST_HAS_UNISTD_H # include // S60 SDK defines _POSIX_VERSION as POSIX.1 # ifndef BOOST_HAS_STDINT_H # define BOOST_HAS_STDINT_H # endif # ifndef BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_GETTIMEOFDAY # endif # ifndef BOOST_HAS_DIRENT_H # define BOOST_HAS_DIRENT_H # endif # ifndef BOOST_HAS_SIGACTION # define BOOST_HAS_SIGACTION # endif # ifndef BOOST_HAS_PTHREADS # define BOOST_HAS_PTHREADS # endif # ifndef BOOST_HAS_NANOSLEEP # define BOOST_HAS_NANOSLEEP # endif # ifndef BOOST_HAS_SCHED_YIELD # define BOOST_HAS_SCHED_YIELD # endif # ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # endif # ifndef BOOST_HAS_LOG1P # define BOOST_HAS_LOG1P # endif # ifndef BOOST_HAS_EXPM1 # define BOOST_HAS_EXPM1 # endif # ifndef BOOST_POSIX_API # define BOOST_POSIX_API # endif // endianess support # include // Symbian SDK provides _BYTE_ORDER instead of __BYTE_ORDER # ifndef __LITTLE_ENDIAN # ifdef _LITTLE_ENDIAN # define __LITTLE_ENDIAN _LITTLE_ENDIAN # else # define __LITTLE_ENDIAN 1234 # endif # endif # ifndef __BIG_ENDIAN # ifdef _BIG_ENDIAN # define __BIG_ENDIAN _BIG_ENDIAN # else # define __BIG_ENDIAN 4321 # endif # endif # ifndef __BYTE_ORDER # define __BYTE_ORDER __LITTLE_ENDIAN // Symbian is LE # endif // Known limitations # define BOOST_ASIO_DISABLE_SERIAL_PORT # define BOOST_DATE_TIME_NO_LOCALE # define BOOST_NO_STD_WSTRING # define BOOST_EXCEPTION_DISABLE # define BOOST_NO_EXCEPTIONS #else // TODO: More platform support e.g. UIQ # error "Unsuppoted Symbian SDK" #endif #if defined(__WINSCW__) && !defined(BOOST_DISABLE_WIN32) # define BOOST_DISABLE_WIN32 // winscw defines WIN32 macro #endif passenger-4.0.37/ext/boost/config/platform/vms.hpp000644 000765 000024 00000001355 12233035540 022555 0ustar00honglistaff000000 000000 // (C) Copyright Artyom Beilis 2010. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_CONFIG_PLATFORM_VMS_HPP #define BOOST_CONFIG_PLATFORM_VMS_HPP #define BOOST_PLATFORM "OpenVMS" #undef BOOST_HAS_STDINT_H #define BOOST_HAS_UNISTD_H #define BOOST_HAS_NL_TYPES_H #define BOOST_HAS_GETTIMEOFDAY #define BOOST_HAS_DIRENT_H #define BOOST_HAS_PTHREADS #define BOOST_HAS_NANOSLEEP #define BOOST_HAS_CLOCK_GETTIME #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE #define BOOST_HAS_LOG1P #define BOOST_HAS_EXPM1 #define BOOST_HAS_THREADS #undef BOOST_HAS_SCHED_YIELD #endif passenger-4.0.37/ext/boost/config/platform/vxworks.hpp000644 000765 000024 00000035500 12233035540 023472 0ustar00honglistaff000000 000000 // (C) Copyright Dustin Spicuzza 2009. // Adapted to vxWorks 6.9 by Peter Brockamp 2012. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Since WRS does not yet properly support boost under vxWorks // and this file was badly outdated, but I was keen on using it, // I patched boost myself to make things work. This has been tested // and adapted by me for vxWorks 6.9 *only*, as I'm lacking access // to earlier 6.X versions! The only thing I know for sure is that // very old versions of vxWorks (namely everything below 6.x) are // absolutely unable to use boost. This is mainly due to the completely // outdated libraries and ancient compiler (GCC 2.96 or worse). Do // not even think of getting this to work, a miserable failure will // be guaranteed! // Equally, this file has been tested for RTPs (Real Time Processes) // only, not for DKMs (Downloadable Kernel Modules). These two types // of executables differ largely in the available functionality of // the C-library, STL, and so on. A DKM uses a library similar to those // of vxWorks 5.X - with all its limitations and incompatibilities // with respect to ANSI C++ and STL. So probably there might be problems // with the usage of boost from DKMs. WRS or any voluteers are free to // prove the opposite! // ==================================================================== // // Some important information regarding the usage of POSIX semaphores: // ------------------------------------------------------------------- // // VxWorks as a real time operating system handles threads somewhat // different from what "normal" OSes do, regarding their scheduling! // This could lead to a scenario called "priority inversion" when using // semaphores, see http://en.wikipedia.org/wiki/Priority_inversion. // // Now, VxWorks POSIX-semaphores for DKM's default to the usage of // priority inverting semaphores, which is fine. On the other hand, // for RTP's it defaults to using non priority inverting semaphores, // which could easily pose a serious problem for a real time process, // i.e. deadlocks! To overcome this two possibilities do exist: // // a) Patch every piece of boost that uses semaphores to instanciate // the proper type of semaphores. This is non-intrusive with respect // to the OS and could relatively easy been done by giving all // semaphores attributes deviating from the default (for in-depth // information see the POSIX functions pthread_mutexattr_init() // and pthread_mutexattr_setprotocol()). However this breaks all // too easily, as with every new version some boost library could // all in a sudden start using semaphores, resurrecting the very // same, hard to locate problem over and over again! // // b) We could change the default properties for POSIX-semaphores // that VxWorks uses for RTP's and this is being suggested here, // as it will more or less seamlessly integrate with boost. I got // the following information from WRS how to do this, compare // Wind River TSR# 1209768: // // Instructions for changing the default properties of POSIX- // semaphores for RTP's in VxWorks 6.9: // - Edit the file /vxworks-6.9/target/usr/src/posix/pthreadLib.c // in the root of your Workbench-installation. // - Around line 917 there should be the definition of the default // mutex attributes: // // LOCAL pthread_mutexattr_t defaultMutexAttr = // { // PTHREAD_INITIALIZED_OBJ, PTHREAD_PRIO_NONE, 0, // PTHREAD_MUTEX_DEFAULT // }; // // Here, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. // - Around line 1236 there should be a definition for the function // pthread_mutexattr_init(). A couple of lines below you should // find a block of code like this: // // pAttr->mutexAttrStatus = PTHREAD_INITIALIZED_OBJ; // pAttr->mutexAttrProtocol = PTHREAD_PRIO_NONE; // pAttr->mutexAttrPrioceiling = 0; // pAttr->mutexAttrType = PTHREAD_MUTEX_DEFAULT; // // Here again, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. // - Finally, rebuild your VSB. This will create a new VxWorks kernel // with the changed properties. That's it! Now, using boost should // no longer cause any problems with task deadlocks! // // And here's another useful piece of information concerning VxWorks' // POSIX-functionality in general: // VxWorks is not a genuine POSIX-OS in itself, rather it is using a // kind of compatibility layer (sort of a wrapper) to emulate the // POSIX-functionality by using its own resources and functions. // At the time a task (thread) calls it's first POSIX-function during // runtime it is being transformed by the OS into a POSIX-thread. // This transformation does include a call to malloc() to allocate the // memory required for the housekeeping of POSIX-threads. In a high // priority RTP this malloc() call may be highly undesirable, as its // timing is more or less unpredictable (depending on what your actual // heap looks like). You can circumvent this problem by calling the // function thread_self() at a well defined point in the code of the // task, e.g. shortly after the task spawns up. Thereby you are able // to define the time when the task-transformation will take place and // you could shift it to an uncritical point where a malloc() call is // tolerable. So, if this could pose a problem for your code, remember // to call thread_self() from the affected task at an early stage. // // ==================================================================== // Block out all versions before vxWorks 6.x, as these don't work: // Include header with the vxWorks version information and query them #include #if !defined(_WRS_VXWORKS_MAJOR) || (_WRS_VXWORKS_MAJOR < 6) # error "The vxWorks version you're using is so badly outdated,\ it doesn't work at all with boost, sorry, no chance!" #endif // Handle versions above 5.X but below 6.9 #if (_WRS_VXWORKS_MAJOR == 6) && (_WRS_VXWORKS_MINOR < 9) // TODO: Starting from what version does vxWorks work with boost? // We can't reasonably insert a #warning "" as a user hint here, // as this will show up with every file including some boost header, // badly bugging the user... So for the time being we just leave it. #endif // vxWorks specific config options: // -------------------------------- #define BOOST_PLATFORM "vxWorks" // Special behaviour for DKMs: #ifdef _WRS_KERNEL // DKMs do not have the -header, // but apparently they do have an intrinsic wchar_t meanwhile! # define BOOST_NO_CWCHAR // Lots of wide-functions and -headers are unavailable for DKMs as well: # define BOOST_NO_CWCTYPE # define BOOST_NO_SWPRINTF # define BOOST_NO_STD_WSTRING # define BOOST_NO_STD_WSTREAMBUF #endif // Generally available headers: #define BOOST_HAS_UNISTD_H #define BOOST_HAS_STDINT_H #define BOOST_HAS_DIRENT_H #define BOOST_HAS_SLIST // vxWorks does not have installed an iconv-library by default, // so unfortunately no Unicode support from scratch is available! // Thus, instead it is suggested to switch to ICU, as this seems // to be the most complete and portable option... #define BOOST_LOCALE_WITH_ICU // Generally available functionality: #define BOOST_HAS_THREADS #define BOOST_HAS_NANOSLEEP #define BOOST_HAS_GETTIMEOFDAY #define BOOST_HAS_CLOCK_GETTIME #define BOOST_HAS_MACRO_USE_FACET // Generally unavailable functionality, delivered by boost's test function: //#define BOOST_NO_DEDUCED_TYPENAME // Commented this out, boost's test gives an errorneous result! #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_VARIADIC_MACROS // Generally available threading API's: #define BOOST_HAS_PTHREADS #define BOOST_HAS_SCHED_YIELD #define BOOST_HAS_SIGACTION // Functionality available for RTPs only: #ifdef __RTP__ # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # define BOOST_HAS_LOG1P # define BOOST_HAS_EXPM1 #endif // Functionality available for DKMs only: #ifdef _WRS_KERNEL // Luckily, at the moment there seems to be none! #endif // These #defines allow posix_features to work, since vxWorks doesn't // #define them itself for DKMs (for RTPs on the contrary it does): #ifdef _WRS_KERNEL # ifndef _POSIX_TIMERS # define _POSIX_TIMERS 1 # endif # ifndef _POSIX_THREADS # define _POSIX_THREADS 1 # endif #endif // vxWorks doesn't work with asio serial ports: #define BOOST_ASIO_DISABLE_SERIAL_PORT // TODO: The problem here seems to bee that vxWorks uses its own, very specific // ways to handle serial ports, incompatible with POSIX or anything... // Maybe a specific implementation would be possible, but until the // straight need arises... This implementation would presumably consist // of some vxWorks specific ioctl-calls, etc. Any voluteers? // vxWorks-around: #defines CLOCKS_PER_SEC as sysClkRateGet() but // miserably fails to #include the required to make // sysClkRateGet() available! So we manually include it here. #ifdef __RTP__ # include # include #endif // vxWorks-around: In the macros INT32_C(), UINT32_C(), INT64_C() and // UINT64_C() are defined errorneously, yielding not a signed/ // unsigned long/long long type, but a signed/unsigned int/long // type. Eventually this leads to compile errors in ratio_fwd.hpp, // when trying to define several constants which do not fit into a // long type! We correct them here by redefining. #include // Some macro-magic to do the job #define VX_JOIN(X, Y) VX_DO_JOIN(X, Y) #define VX_DO_JOIN(X, Y) VX_DO_JOIN2(X, Y) #define VX_DO_JOIN2(X, Y) X##Y // Correctly setup the macros #undef INT32_C #undef UINT32_C #undef INT64_C #undef UINT64_C #define INT32_C(x) VX_JOIN(x, L) #define UINT32_C(x) VX_JOIN(x, UL) #define INT64_C(x) VX_JOIN(x, LL) #define UINT64_C(x) VX_JOIN(x, ULL) // #include Libraries required for the following function adaption #include #include #include // Use C-linkage for the following helper functions extern "C" { // vxWorks-around: The required functions getrlimit() and getrlimit() are missing. // But we have the similar functions getprlimit() and setprlimit(), // which may serve the purpose. // Problem: The vxWorks-documentation regarding these functions // doesn't deserve its name! It isn't documented what the first two // parameters idtype and id mean, so we must fall back to an educated // guess - null, argh... :-/ // TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason. // Thus for DKMs there would have to be another implementation. #ifdef __RTP__ inline int getrlimit(int resource, struct rlimit *rlp){ return getprlimit(0, 0, resource, rlp); } inline int setrlimit(int resource, const struct rlimit *rlp){ return setprlimit(0, 0, resource, const_cast(rlp)); } #endif // vxWorks has ftruncate() only, so we do simulate truncate(): inline int truncate(const char *p, off_t l){ int fd = open(p, O_WRONLY); if (fd == -1){ errno = EACCES; return -1; } if (ftruncate(fd, l) == -1){ close(fd); errno = EACCES; return -1; } return close(fd); } // Fake symlink handling by dummy functions: inline int symlink(const char*, const char*){ // vxWorks has no symlinks -> always return an error! errno = EACCES; return -1; } inline ssize_t readlink(const char*, char*, size_t){ // vxWorks has no symlinks -> always return an error! errno = EACCES; return -1; } // vxWorks claims to implement gettimeofday in sys/time.h // but nevertheless does not provide it! See // https://support.windriver.com/olsPortal/faces/maintenance/techtipDetail_noHeader.jspx?docId=16442&contentId=WR_TECHTIP_006256 // We implement a surrogate version here via clock_gettime: inline int gettimeofday(struct timeval *tv, void * /*tzv*/) { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); tv->tv_sec = ts.tv_sec; tv->tv_usec = ts.tv_nsec / 1000; return 0; } // vxWorks does provide neither struct tms nor function times()! // We implement an empty dummy-function, simply setting the user // and system time to the half of thew actual system ticks-value // and the child user and system time to 0. // Rather ugly but at least it suppresses compiler errors... // Unfortunately, this of course *does* have an severe impact on // dependant libraries, actually this is chrono only! Here it will // not be possible to correctly use user and system times! But // as vxWorks is lacking the ability to calculate user and system // process times there seems to be no other possible solution. struct tms{ clock_t tms_utime; // User CPU time clock_t tms_stime; // System CPU time clock_t tms_cutime; // User CPU time of terminated child processes clock_t tms_cstime; // System CPU time of terminated child processes }; inline clock_t times(struct tms *t){ struct timespec ts; clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); clock_t ticks(static_cast(static_cast(ts.tv_sec) * CLOCKS_PER_SEC + static_cast(ts.tv_nsec) * CLOCKS_PER_SEC / 1000000.0)); t->tms_utime = ticks/2U; t->tms_stime = ticks/2U; t->tms_cutime = 0; // vxWorks is lacking the concept of a child process! t->tms_cstime = 0; // -> Set the wait times for childs to 0 return ticks; } } // extern "C" // Put the selfmade functions into the std-namespace, just in case namespace std { # ifdef __RTP__ using ::getrlimit; using ::setrlimit; # endif using ::truncate; using ::symlink; using ::readlink; using ::times; using ::gettimeofday; } // Some more macro-magic: // vxWorks-around: Some functions are not present or broken in vxWorks // but may be patched to life via helper macros... // Include signal.h which might contain a typo to be corrected here #include #define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway! #ifndef S_ISSOCK # define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket? #endif #define lstat(p, b) stat(p, b) // lstat() == stat(), as vxWorks has no symlinks! #ifndef FPE_FLTINV # define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy #endif #if !defined(BUS_ADRALN) && defined(BUS_ADRALNR) # define BUS_ADRALN BUS_ADRALNR // Correct a supposed typo in vxWorks' #endif //typedef int locale_t; // locale_t is a POSIX-extension, currently unpresent in vxWorks! // #include boilerplate code: #include // vxWorks lies about XSI conformance, there is no nl_types.h: #undef BOOST_HAS_NL_TYPES_H passenger-4.0.37/ext/boost/config/no_tr1/cmath.hpp000644 000765 000024 00000001506 12233035540 022420 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2008. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // The aim of this header is just to include but to do // so in a way that does not result in recursive inclusion of // the Boost TR1 components if boost/tr1/tr1/cmath is in the // include search path. We have to do this to avoid circular // dependencies: // #ifndef BOOST_CONFIG_CMATH # define BOOST_CONFIG_CMATH # ifndef BOOST_TR1_NO_RECURSION # define BOOST_TR1_NO_RECURSION # define BOOST_CONFIG_NO_CMATH_RECURSION # endif # include # ifdef BOOST_CONFIG_NO_CMATH_RECURSION # undef BOOST_TR1_NO_RECURSION # undef BOOST_CONFIG_NO_CMATH_RECURSION # endif #endif passenger-4.0.37/ext/boost/config/no_tr1/complex.hpp000644 000765 000024 00000001526 12233035540 022775 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // The aim of this header is just to include but to do // so in a way that does not result in recursive inclusion of // the Boost TR1 components if boost/tr1/tr1/complex is in the // include search path. We have to do this to avoid circular // dependencies: // #ifndef BOOST_CONFIG_COMPLEX # define BOOST_CONFIG_COMPLEX # ifndef BOOST_TR1_NO_RECURSION # define BOOST_TR1_NO_RECURSION # define BOOST_CONFIG_NO_COMPLEX_RECURSION # endif # include # ifdef BOOST_CONFIG_NO_COMPLEX_RECURSION # undef BOOST_TR1_NO_RECURSION # undef BOOST_CONFIG_NO_COMPLEX_RECURSION # endif #endif passenger-4.0.37/ext/boost/config/no_tr1/functional.hpp000644 000765 000024 00000001556 12233035540 023473 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // The aim of this header is just to include but to do // so in a way that does not result in recursive inclusion of // the Boost TR1 components if boost/tr1/tr1/functional is in the // include search path. We have to do this to avoid circular // dependencies: // #ifndef BOOST_CONFIG_FUNCTIONAL # define BOOST_CONFIG_FUNCTIONAL # ifndef BOOST_TR1_NO_RECURSION # define BOOST_TR1_NO_RECURSION # define BOOST_CONFIG_NO_FUNCTIONAL_RECURSION # endif # include # ifdef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION # undef BOOST_TR1_NO_RECURSION # undef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION # endif #endif passenger-4.0.37/ext/boost/config/no_tr1/memory.hpp000644 000765 000024 00000001516 12233035540 022635 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // The aim of this header is just to include but to do // so in a way that does not result in recursive inclusion of // the Boost TR1 components if boost/tr1/tr1/memory is in the // include search path. We have to do this to avoid circular // dependencies: // #ifndef BOOST_CONFIG_MEMORY # define BOOST_CONFIG_MEMORY # ifndef BOOST_TR1_NO_RECURSION # define BOOST_TR1_NO_RECURSION # define BOOST_CONFIG_NO_MEMORY_RECURSION # endif # include # ifdef BOOST_CONFIG_NO_MEMORY_RECURSION # undef BOOST_TR1_NO_RECURSION # undef BOOST_CONFIG_NO_MEMORY_RECURSION # endif #endif passenger-4.0.37/ext/boost/config/no_tr1/utility.hpp000644 000765 000024 00000001526 12233035540 023031 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // The aim of this header is just to include but to do // so in a way that does not result in recursive inclusion of // the Boost TR1 components if boost/tr1/tr1/utility is in the // include search path. We have to do this to avoid circular // dependencies: // #ifndef BOOST_CONFIG_UTILITY # define BOOST_CONFIG_UTILITY # ifndef BOOST_TR1_NO_RECURSION # define BOOST_TR1_NO_RECURSION # define BOOST_CONFIG_NO_UTILITY_RECURSION # endif # include # ifdef BOOST_CONFIG_NO_UTILITY_RECURSION # undef BOOST_TR1_NO_RECURSION # undef BOOST_CONFIG_NO_UTILITY_RECURSION # endif #endif passenger-4.0.37/ext/boost/config/compiler/borland.hpp000644 000765 000024 00000021013 12233035540 023350 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Aleksey Gurtovoy 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Borland C++ compiler setup: // // versions check: // we don't support Borland prior to version 5.4: #if __BORLANDC__ < 0x540 # error "Compiler not supported or configured - please reconfigure" #endif // last known compiler version: #if (__BORLANDC__ > 0x613) //# if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" //# else //# pragma message( "Unknown compiler version - please run the configure tests and report the results") //# endif #elif (__BORLANDC__ == 0x600) # error "CBuilderX preview compiler is no longer supported" #endif // // Support macros to help with standard library detection #if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL) # define BOOST_BCB_WITH_ROGUE_WAVE #elif __BORLANDC__ < 0x570 # define BOOST_BCB_WITH_STLPORT #else # define BOOST_BCB_WITH_DINKUMWARE #endif // // Version 5.0 and below: # if __BORLANDC__ <= 0x0550 // Borland C++Builder 4 and 5: # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # if __BORLANDC__ == 0x0550 // Borland C++Builder 5, command-line compiler 5.5: # define BOOST_NO_OPERATORS_IN_NAMESPACE # endif // Variadic macros do not exist for C++ Builder versions 5 and below #define BOOST_NO_CXX11_VARIADIC_MACROS # endif // Version 5.51 and below: #if (__BORLANDC__ <= 0x551) # define BOOST_NO_CV_SPECIALIZATIONS # define BOOST_NO_CV_VOID_SPECIALIZATIONS # define BOOST_NO_DEDUCED_TYPENAME // workaround for missing WCHAR_MAX/WCHAR_MIN: #ifdef __cplusplus #include #include #else #include #include #endif // __cplusplus #ifndef WCHAR_MAX # define WCHAR_MAX 0xffff #endif #ifndef WCHAR_MIN # define WCHAR_MIN 0 #endif #endif // Borland C++ Builder 6 and below: #if (__BORLANDC__ <= 0x564) # if defined(NDEBUG) && defined(__cplusplus) // fix broken so that Boost.test works: # include # undef strcmp # endif // fix broken errno declaration: # include # ifndef errno # define errno errno # endif #endif // // new bug in 5.61: #if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580) // this seems to be needed by the command line compiler, but not the IDE: # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS #endif // Borland C++ Builder 2006 Update 2 and below: #if (__BORLANDC__ <= 0x582) # define BOOST_NO_SFINAE # define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG # define BOOST_NO_TEMPLATE_TEMPLATES # define BOOST_NO_PRIVATE_IN_AGGREGATE # ifdef _WIN32 # define BOOST_NO_SWPRINTF # elif defined(linux) || defined(__linux__) || defined(__linux) // we should really be able to do without this // but the wcs* functions aren't imported into std:: # define BOOST_NO_STDC_NAMESPACE // _CPPUNWIND doesn't get automatically set for some reason: # pragma defineonoption BOOST_CPPUNWIND -x # endif #endif #if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info // we shouldn't really need this - but too many things choke // without it, this needs more investigation: # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_NO_IS_ABSTRACT # define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS # define BOOST_NO_USING_TEMPLATE # define BOOST_SP_NO_SP_CONVERTIBLE // Temporary workaround #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // Borland C++ Builder 2008 and below: # define BOOST_NO_INTEGRAL_INT64_T # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_TWO_PHASE_NAME_LOOKUP # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE # define BOOST_NO_NESTED_FRIENDSHIP # define BOOST_NO_TYPENAME_WITH_CTOR #if (__BORLANDC__ < 0x600) # define BOOST_ILLEGAL_CV_REFERENCES #endif // // Positive Feature detection // // Borland C++ Builder 2008 and below: #if (__BORLANDC__ >= 0x599) # pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax #endif // // C++0x Macros: // #if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610) # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T # define BOOST_NO_CXX11_DECLTYPE # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_EXTERN_TEMPLATE # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_CXX11_STATIC_ASSERT #else # define BOOST_HAS_ALIGNOF # define BOOST_HAS_CHAR16_T # define BOOST_HAS_CHAR32_T # define BOOST_HAS_DECLTYPE # define BOOST_HAS_EXPLICIT_CONVERSION_OPS # define BOOST_HAS_REF_QUALIFIER # define BOOST_HAS_RVALUE_REFS # define BOOST_HAS_STATIC_ASSERT #endif #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #if __BORLANDC__ >= 0x590 # define BOOST_HAS_TR1_HASH # define BOOST_HAS_MACRO_USE_FACET #endif // // Post 0x561 we have long long and stdint.h: #if __BORLANDC__ >= 0x561 # ifndef __NO_LONG_LONG # define BOOST_HAS_LONG_LONG # else # define BOOST_NO_LONG_LONG # endif // On non-Win32 platforms let the platform config figure this out: # ifdef _WIN32 # define BOOST_HAS_STDINT_H # endif #endif // Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is // defined, then we have 0x560 or greater with the Rogue Wave implementation // which presumably has the std::DBL_MAX bug. #if defined( BOOST_BCB_WITH_ROGUE_WAVE ) // is partly broken, some macros define symbols that are really in // namespace std, so you end up having to use illegal constructs like // std::DBL_MAX, as a fix we'll just include float.h and have done with: #include #endif // // __int64: // #if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__) # define BOOST_HAS_MS_INT64 #endif // // check for exception handling support: // #if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif // // all versions have a : // #ifndef __STRICT_ANSI__ # define BOOST_HAS_DIRENT_H #endif // // all versions support __declspec: // #if defined(__STRICT_ANSI__) // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined # define BOOST_SYMBOL_EXPORT #endif // // ABI fixing headers: // #if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet #ifndef BOOST_ABI_PREFIX # define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" #endif #ifndef BOOST_ABI_SUFFIX # define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" #endif #endif // // Disable Win32 support in ANSI mode: // #if __BORLANDC__ < 0x600 # pragma defineonoption BOOST_DISABLE_WIN32 -A #elif defined(__STRICT_ANSI__) # define BOOST_DISABLE_WIN32 #endif // // MSVC compatibility mode does some nasty things: // TODO: look up if this doesn't apply to the whole 12xx range // #if defined(_MSC_VER) && (_MSC_VER <= 1200) # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP # define BOOST_NO_VOID_RETURNS #endif // Borland did not implement value-initialization completely, as I reported // in 2007, Borland Report 51854, "Value-initialization: POD struct should be // zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854 // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues // (Niels Dekker, LKEB, April 2010) #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) passenger-4.0.37/ext/boost/config/compiler/clang.hpp000644 000765 000024 00000007617 12233035540 023031 0ustar00honglistaff000000 000000 // (C) Copyright Douglas Gregor 2010 // // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Clang compiler setup. #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif #if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) # define BOOST_NO_RTTI #endif #if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) # define BOOST_NO_TYPEID #endif #if defined(__int64) && !defined(__GNUC__) # define BOOST_HAS_MS_INT64 #endif #define BOOST_HAS_NRVO // Clang supports "long long" in all compilation modes. #define BOOST_HAS_LONG_LONG // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // #if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) # define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) # define BOOST_SYMBOL_IMPORT # define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) #endif // // The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through // between switch labels. // #if __cplusplus >= 201103L && defined(__has_warning) # if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") # define BOOST_FALLTHROUGH [[clang::fallthrough]] # endif #endif #if !__has_feature(cxx_auto_type) # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #endif #if !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T #endif #if !__has_feature(cxx_constexpr) # define BOOST_NO_CXX11_CONSTEXPR #endif #if !__has_feature(cxx_decltype) # define BOOST_NO_CXX11_DECLTYPE #endif #if !__has_feature(cxx_decltype_incomplete_return_types) # define BOOST_NO_CXX11_DECLTYPE_N3276 #endif #if !__has_feature(cxx_defaulted_functions) # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #endif #if !__has_feature(cxx_deleted_functions) # define BOOST_NO_CXX11_DELETED_FUNCTIONS #endif #if !__has_feature(cxx_explicit_conversions) # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #endif #if !__has_feature(cxx_default_function_template_args) # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #endif #if !__has_feature(cxx_generalized_initializers) # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #endif #if !__has_feature(cxx_lambdas) # define BOOST_NO_CXX11_LAMBDAS #endif #if !__has_feature(cxx_local_type_template_args) # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #endif #if !__has_feature(cxx_noexcept) # define BOOST_NO_CXX11_NOEXCEPT #endif #if !__has_feature(cxx_nullptr) # define BOOST_NO_CXX11_NULLPTR #endif #if !__has_feature(cxx_range_for) # define BOOST_NO_CXX11_RANGE_BASED_FOR #endif #if !__has_feature(cxx_raw_string_literals) # define BOOST_NO_CXX11_RAW_LITERALS #endif #if !__has_feature(cxx_generalized_initializers) # define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif #if !__has_feature(cxx_rvalue_references) # define BOOST_NO_CXX11_RVALUE_REFERENCES #endif #if !__has_feature(cxx_strong_enums) # define BOOST_NO_CXX11_SCOPED_ENUMS #endif #if !__has_feature(cxx_static_assert) # define BOOST_NO_CXX11_STATIC_ASSERT #endif #if !__has_feature(cxx_alias_templates) # define BOOST_NO_CXX11_TEMPLATE_ALIASES #endif #if !__has_feature(cxx_unicode_literals) # define BOOST_NO_CXX11_UNICODE_LITERALS #endif #if !__has_feature(cxx_variadic_templates) # define BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif #if !__has_feature(cxx_user_literals) # define BOOST_NO_CXX11_USER_DEFINED_LITERALS #endif // Clang always supports variadic macros // Clang always supports extern templates #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ #endif // Macro used to identify the Clang compiler. #define BOOST_CLANG 1 passenger-4.0.37/ext/boost/config/compiler/codegear.hpp000644 000765 000024 00000013253 12233035540 023507 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Aleksey Gurtovoy 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // CodeGear C++ compiler setup: #if !defined( BOOST_WITH_CODEGEAR_WARNINGS ) // these warnings occur frequently in optimized template code # pragma warn -8004 // var assigned value, but never used # pragma warn -8008 // condition always true/false # pragma warn -8066 // dead code can never execute # pragma warn -8104 // static members with ctors not threadsafe # pragma warn -8105 // reference member in class without ctors #endif // // versions check: // last known and checked version is 0x621 #if (__CODEGEARC__ > 0x621) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else # pragma message( "Unknown compiler version - please run the configure tests and report the results") # endif #endif // CodeGear C++ Builder 2009 #if (__CODEGEARC__ <= 0x613) # define BOOST_NO_INTEGRAL_INT64_T # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS # define BOOST_NO_PRIVATE_IN_AGGREGATE # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE // we shouldn't really need this - but too many things choke // without it, this needs more investigation: # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_SP_NO_SP_CONVERTIBLE #endif // CodeGear C++ Builder 2010 #if (__CODEGEARC__ <= 0x621) # define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member # define BOOST_NO_USING_TEMPLATE # define BOOST_NO_TWO_PHASE_NAME_LOOKUP // Temporary hack, until specific MPL preprocessed headers are generated # define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS // CodeGear has not yet completely implemented value-initialization, for // example for array types, as I reported in 2010: Embarcadero Report 83751, // "Value-initialization: arrays should have each element value-initialized", // http://qc.embarcadero.com/wc/qcmain.aspx?d=83751 // Last checked version: Embarcadero C++ 6.21 // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues // (Niels Dekker, LKEB, April 2010) # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION # if defined(NDEBUG) && defined(__cplusplus) // fix broken so that Boost.test works: # include # undef strcmp # endif // fix broken errno declaration: # include # ifndef errno # define errno errno # endif #endif // // C++0x macros: // #if (__CODEGEARC__ <= 0x620) #define BOOST_NO_CXX11_STATIC_ASSERT #else #define BOOST_HAS_STATIC_ASSERT #endif #define BOOST_HAS_CHAR16_T #define BOOST_HAS_CHAR32_T #define BOOST_HAS_LONG_LONG // #define BOOST_HAS_ALIGNOF #define BOOST_HAS_DECLTYPE #define BOOST_HAS_EXPLICIT_CONVERSION_OPS // #define BOOST_HAS_RVALUE_REFS #define BOOST_HAS_SCOPED_ENUM // #define BOOST_HAS_STATIC_ASSERT #define BOOST_HAS_STD_TYPE_TRAITS #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS // // TR1 macros: // #define BOOST_HAS_TR1_HASH #define BOOST_HAS_TR1_TYPE_TRAITS #define BOOST_HAS_TR1_UNORDERED_MAP #define BOOST_HAS_TR1_UNORDERED_SET #define BOOST_HAS_MACRO_USE_FACET #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST // On non-Win32 platforms let the platform config figure this out: #ifdef _WIN32 # define BOOST_HAS_STDINT_H #endif // // __int64: // #if !defined(__STRICT_ANSI__) # define BOOST_HAS_MS_INT64 #endif // // check for exception handling support: // #if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif // // all versions have a : // #if !defined(__STRICT_ANSI__) # define BOOST_HAS_DIRENT_H #endif // // all versions support __declspec: // #if defined(__STRICT_ANSI__) // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined # define BOOST_SYMBOL_EXPORT #endif // // ABI fixing headers: // #ifndef BOOST_ABI_PREFIX # define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" #endif #ifndef BOOST_ABI_SUFFIX # define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" #endif // // Disable Win32 support in ANSI mode: // # pragma defineonoption BOOST_DISABLE_WIN32 -A // // MSVC compatibility mode does some nasty things: // TODO: look up if this doesn't apply to the whole 12xx range // #if defined(_MSC_VER) && (_MSC_VER <= 1200) # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP # define BOOST_NO_VOID_RETURNS #endif #define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__) passenger-4.0.37/ext/boost/config/compiler/comeau.hpp000644 000765 000024 00000003137 12233035540 023207 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001. // (C) Copyright Douglas Gregor 2001. // (C) Copyright Peter Dimov 2001. // (C) Copyright Aleksey Gurtovoy 2003. // (C) Copyright Beman Dawes 2003. // (C) Copyright Jens Maurer 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Comeau C++ compiler setup: #include "boost/config/compiler/common_edg.hpp" #if (__COMO_VERSION__ <= 4245) # if defined(_MSC_VER) && _MSC_VER <= 1300 # if _MSC_VER > 100 // only set this in non-strict mode: # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP # endif # endif // Void returns don't work when emulating VC 6 (Peter Dimov) // TODO: look up if this doesn't apply to the whole 12xx range # if defined(_MSC_VER) && (_MSC_VER < 1300) # define BOOST_NO_VOID_RETURNS # endif #endif // version 4245 // // enable __int64 support in VC emulation mode // # if defined(_MSC_VER) && (_MSC_VER >= 1200) # define BOOST_HAS_MS_INT64 # endif #define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__) // // versions check: // we don't know Comeau prior to version 4245: #if __COMO_VERSION__ < 4245 # error "Compiler not configured - please reconfigure" #endif // // last known and checked version is 4245: #if (__COMO_VERSION__ > 4245) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif passenger-4.0.37/ext/boost/config/compiler/common_edg.hpp000644 000765 000024 00000006160 12233035540 024044 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2002. // (C) Copyright Jens Maurer 2001. // (C) Copyright David Abrahams 2002. // (C) Copyright Aleksey Gurtovoy 2002. // (C) Copyright Markus Schoepflin 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // // Options common to all edg based compilers. // // This is included from within the individual compiler mini-configs. #ifndef __EDG_VERSION__ # error This file requires that __EDG_VERSION__ be defined. #endif #if (__EDG_VERSION__ <= 238) # define BOOST_NO_INTEGRAL_INT64_T # define BOOST_NO_SFINAE #endif #if (__EDG_VERSION__ <= 240) # define BOOST_NO_VOID_RETURNS #endif #if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP #endif #if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES) # define BOOST_NO_TEMPLATE_TEMPLATES #endif #if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT) # define BOOST_NO_IS_ABSTRACT #endif #if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #endif // See also kai.hpp which checks a Kai-specific symbol for EH # if !defined(__KCC) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS # endif # if !defined(__NO_LONG_LONG) # define BOOST_HAS_LONG_LONG # else # define BOOST_NO_LONG_LONG # endif // // C++0x features // // See above for BOOST_NO_LONG_LONG // #if (__EDG_VERSION__ < 310) # define BOOST_NO_CXX11_EXTERN_TEMPLATE #endif #if (__EDG_VERSION__ <= 310) // No support for initializer lists # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #endif #if (__EDG_VERSION__ < 400) # define BOOST_NO_CXX11_VARIADIC_MACROS #endif #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #ifdef c_plusplus // EDG has "long long" in non-strict mode // However, some libraries have insufficient "long long" support // #define BOOST_HAS_LONG_LONG #endif passenger-4.0.37/ext/boost/config/compiler/compaq_cxx.hpp000644 000765 000024 00000000765 12233035540 024104 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Tru64 C++ compiler setup (now HP): #define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER) #include "boost/config/compiler/common_edg.hpp" // // versions check: // Nothing to do here? passenger-4.0.37/ext/boost/config/compiler/cray.hpp000644 000765 000024 00000004172 12233035540 022674 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2011. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Greenhills C compiler setup: #define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE) #if _RELEASE < 7 # error "Boost is not configured for Cray compilers prior to version 7, please try the configure script." #endif // // Check this is a recent EDG based compiler, otherwise we don't support it here: // #ifndef __EDG_VERSION__ # error "Unsupported Cray compiler, please try running the configure script." #endif #include "boost/config/compiler/common_edg.hpp" // // Cray peculiarities, probably version 7 specific: // #undef BOOST_NO_CXX11_AUTO_DECLARATIONS #undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_HAS_NRVO #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #define BOOST_HAS_NRVO #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CHAR16_T //#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG #define BOOST_MATH_DISABLE_STD_FPCLASSIFY //#define BOOST_HAS_FPCLASSIFY #define BOOST_SP_USE_PTHREADS #define BOOST_AC_USE_PTHREADS passenger-4.0.37/ext/boost/config/compiler/digitalmars.hpp000644 000765 000024 00000006060 12233035540 024234 0ustar00honglistaff000000 000000 // Copyright (C) Christof Meerwald 2003 // Copyright (C) Dan Watkins 2003 // // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Digital Mars C++ compiler setup: #define BOOST_COMPILER __DMC_VERSION_STRING__ #define BOOST_HAS_LONG_LONG #define BOOST_HAS_PRAGMA_ONCE #if (__DMC__ <= 0x833) #define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #define BOOST_NO_TEMPLATE_TEMPLATES #define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING #define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS #define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS #endif #if (__DMC__ <= 0x840) || !defined(BOOST_STRICT_CONFIG) #define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS #define BOOST_NO_MEMBER_TEMPLATE_FRIENDS #define BOOST_NO_OPERATORS_IN_NAMESPACE #define BOOST_NO_UNREACHABLE_RETURN_DETECTION #define BOOST_NO_SFINAE #define BOOST_NO_USING_TEMPLATE #define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #endif // // has macros: #if (__DMC__ >= 0x840) #define BOOST_HAS_DIRENT_H #define BOOST_HAS_STDINT_H #define BOOST_HAS_WINTHREADS #endif #if (__DMC__ >= 0x847) #define BOOST_HAS_EXPM1 #define BOOST_HAS_LOG1P #endif // // Is this really the best way to detect whether the std lib is in namespace std? // #ifdef __cplusplus #include #endif #if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD) # define BOOST_NO_STDC_NAMESPACE #endif // check for exception handling support: #if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif // // C++0x features // #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #if (__DMC__ < 0x812) #define BOOST_NO_CXX11_VARIADIC_MACROS #endif #if __DMC__ < 0x800 #error "Compiler not supported or configured - please reconfigure" #endif // // last known and checked version is ...: #if (__DMC__ > 0x848) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif passenger-4.0.37/ext/boost/config/compiler/gcc.hpp000644 000765 000024 00000022176 12233035540 022476 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001 - 2002. // (C) Copyright Jens Maurer 2001 - 2002. // (C) Copyright Beman Dawes 2001 - 2003. // (C) Copyright Douglas Gregor 2002. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Synge Todo 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // GNU C++ compiler setup. // // Define BOOST_GCC so we know this is "real" GCC and not some pretender: // #if !defined(__CUDACC__) #define BOOST_GCC (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #endif #if __GNUC__ < 3 # if __GNUC_MINOR__ == 91 // egcs 1.1 won't parse shared_ptr.hpp without this: # define BOOST_NO_AUTO_PTR # endif # if __GNUC_MINOR__ < 95 // // Prior to gcc 2.95 member templates only partly // work - define BOOST_MSVC6_MEMBER_TEMPLATES // instead since inline member templates mostly work. // # define BOOST_NO_MEMBER_TEMPLATES # if __GNUC_MINOR__ >= 9 # define BOOST_MSVC6_MEMBER_TEMPLATES # endif # endif # if __GNUC_MINOR__ < 96 # define BOOST_NO_SFINAE # endif # if __GNUC_MINOR__ <= 97 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_OPERATORS_IN_NAMESPACE # endif # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # define BOOST_NO_IS_ABSTRACT # define BOOST_NO_CXX11_EXTERN_TEMPLATE // Variadic macros do not exist for gcc versions before 3.0 # define BOOST_NO_CXX11_VARIADIC_MACROS #elif __GNUC__ == 3 # if defined (__PATHSCALE__) # define BOOST_NO_TWO_PHASE_NAME_LOOKUP # define BOOST_NO_IS_ABSTRACT # endif // // gcc-3.x problems: // // Bug specific to gcc 3.1 and 3.2: // # if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2)) # define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS # endif # if __GNUC_MINOR__ < 4 # define BOOST_NO_IS_ABSTRACT # endif # define BOOST_NO_CXX11_EXTERN_TEMPLATE #endif #if __GNUC__ < 4 // // All problems to gcc-3.x and earlier here: // #define BOOST_NO_TWO_PHASE_NAME_LOOKUP # ifdef __OPEN64__ # define BOOST_NO_IS_ABSTRACT # endif #endif #if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 4 ) // Previous versions of GCC did not completely implement value-initialization: // GCC Bug 30111, "Value-initialization of POD base class doesn't initialize // members", reported by Jonathan Wakely in 2006, // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4) // GCC Bug 33916, "Default constructor fails to initialize array members", // reported by Michael Elizabeth Chastain in 2007, // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4) // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #endif #if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif // // Threading support: Turn this on unconditionally here (except for // those platforms where we can know for sure). It will get turned off again // later if no threading API is detected. // #if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) # define BOOST_HAS_THREADS #endif // // gcc has "long long" // #define BOOST_HAS_LONG_LONG // // gcc implements the named return value optimization since version 3.1 // #if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) #define BOOST_HAS_NRVO #endif // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // #if __GNUC__ >= 4 # if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) // All Win32 development environments, including 64-bit Windows and MinGW, define // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, // so does not define _WIN32 or its variants. # define BOOST_HAS_DECLSPEC # define BOOST_SYMBOL_EXPORT __attribute__((dllexport)) # define BOOST_SYMBOL_IMPORT __attribute__((dllimport)) # else # define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) # define BOOST_SYMBOL_IMPORT # endif # define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) #else // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined # define BOOST_SYMBOL_EXPORT #endif // // RTTI and typeinfo detection is possible post gcc-4.3: // #if __GNUC__ * 100 + __GNUC_MINOR__ >= 403 # ifndef __GXX_RTTI # ifndef BOOST_NO_TYPEID # define BOOST_NO_TYPEID # endif # ifndef BOOST_NO_RTTI # define BOOST_NO_RTTI # endif # endif #endif // // Recent GCC versions have __int128 when in 64-bit mode. // // We disable this if the compiler is really nvcc as it // doesn't actually support __int128 as of CUDA_VERSION=5000 // even though it defines __SIZEOF_INT128__. // See https://svn.boost.org/trac/boost/ticket/8048 // Only re-enable this for nvcc if you're absolutely sure // of the circumstances under which it's supported: // #if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) # define BOOST_HAS_INT128 #endif // C++0x features in 4.3.n and later // #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__) // C++0x features are only enabled when -std=c++0x or -std=gnu++0x are // passed on the command line, which in turn defines // __GXX_EXPERIMENTAL_CXX0X__. # define BOOST_HAS_DECLTYPE # define BOOST_HAS_RVALUE_REFS # define BOOST_HAS_STATIC_ASSERT # define BOOST_HAS_VARIADIC_TMPL #else # define BOOST_NO_CXX11_DECLTYPE # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_STATIC_ASSERT // Variadic templates compiler: // http://www.generic-programming.org/~dgregor/cpp/variadic-templates.html # if defined(__VARIADIC_TEMPLATES) || (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4) && defined(__GXX_EXPERIMENTAL_CXX0X__)) # define BOOST_HAS_VARIADIC_TMPL # else # define BOOST_NO_CXX11_VARIADIC_TEMPLATES # endif #endif // C++0x features in 4.4.n and later // #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS # define BOOST_NO_CXX11_DELETED_FUNCTIONS #endif #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) # define BOOST_NO_SFINAE_EXPR #endif // C++0x features in 4.5.0 and later // #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_LAMBDAS # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS # define BOOST_NO_CXX11_RAW_LITERALS # define BOOST_NO_CXX11_UNICODE_LITERALS #endif // C++0x features in 4.5.1 and later // #if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40501) || !defined(__GXX_EXPERIMENTAL_CXX0X__) // scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1 // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 # define BOOST_NO_CXX11_SCOPED_ENUMS #endif // C++0x features in 4.6.n and later // #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__) #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif // C++0x features in 4.7.n and later // #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_NO_CXX11_TEMPLATE_ALIASES # define BOOST_NO_CXX11_USER_DEFINED_LITERALS #endif // C++0x features in 4.8.1 and later // #if (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40801) || !defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_NO_CXX11_DECLTYPE_N3276 #endif #ifndef BOOST_COMPILER # define BOOST_COMPILER "GNU C++ version " __VERSION__ #endif // ConceptGCC compiler: // http://www.generic-programming.org/software/ConceptGCC/ #ifdef __GXX_CONCEPTS__ # define BOOST_HAS_CONCEPTS # define BOOST_COMPILER "ConceptGCC version " __VERSION__ #endif // versions check: // we don't know gcc prior to version 2.90: #if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90) # error "Compiler not configured - please reconfigure" #endif // // last known and checked version is 4.6 (Pre-release): #if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6)) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else // we don't emit warnings here anymore since there are no defect macros defined for // gcc post 3.4, so any failures are gcc regressions... //# warning "Unknown compiler version - please run the configure tests and report the results" # endif #endif passenger-4.0.37/ext/boost/config/compiler/gcc_xml.hpp000644 000765 000024 00000004075 12233035540 023354 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2006. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // GCC-XML C++ compiler setup: # if !defined(__GCCXML_GNUC__) || ((__GCCXML_GNUC__ <= 3) && (__GCCXML_GNUC_MINOR__ <= 3)) # define BOOST_NO_IS_ABSTRACT # endif // // Threading support: Turn this on unconditionally here (except for // those platforms where we can know for sure). It will get turned off again // later if no threading API is detected. // #if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__) # define BOOST_HAS_THREADS #endif // // gcc has "long long" // #define BOOST_HAS_LONG_LONG // C++0x features: // # define BOOST_NO_CXX11_CONSTEXPR # define BOOST_NO_CXX11_NULLPTR # define BOOST_NO_CXX11_TEMPLATE_ALIASES # define BOOST_NO_CXX11_DECLTYPE # define BOOST_NO_CXX11_DECLTYPE_N3276 # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_STATIC_ASSERT # define BOOST_NO_CXX11_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS # define BOOST_NO_CXX11_DELETED_FUNCTIONS # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_SFINAE_EXPR # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_LAMBDAS # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS # define BOOST_NO_CXX11_RANGE_BASED_FOR # define BOOST_NO_CXX11_RAW_LITERALS # define BOOST_NO_CXX11_UNICODE_LITERALS # define BOOST_NO_CXX11_NOEXCEPT # define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX # define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__ passenger-4.0.37/ext/boost/config/compiler/greenhills.hpp000644 000765 000024 00000001457 12233035540 024075 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Greenhills C++ compiler setup: #define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs) #include "boost/config/compiler/common_edg.hpp" // // versions check: // we don't support Greenhills prior to version 0: #if __ghs < 0 # error "Compiler not supported or configured - please reconfigure" #endif // // last known and checked version is 0: #if (__ghs > 0) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif passenger-4.0.37/ext/boost/config/compiler/hp_acc.hpp000644 000765 000024 00000011137 12233035540 023152 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2003. // (C) Copyright Aleksey Gurtovoy 2002. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Toon Knapen 2003. // (C) Copyright Boris Gubenko 2006 - 2007. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // HP aCC C++ compiler setup: #if defined(__EDG__) #include "boost/config/compiler/common_edg.hpp" #endif #if (__HP_aCC <= 33100) # define BOOST_NO_INTEGRAL_INT64_T # define BOOST_NO_OPERATORS_IN_NAMESPACE # if !defined(_NAMESPACE_STD) # define BOOST_NO_STD_LOCALE # define BOOST_NO_STRINGSTREAM # endif #endif #if (__HP_aCC <= 33300) // member templates are sufficiently broken that we disable them for now # define BOOST_NO_MEMBER_TEMPLATES # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE #endif #if (__HP_aCC <= 38000) # define BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif #if (__HP_aCC > 50000) && (__HP_aCC < 60000) # define BOOST_NO_UNREACHABLE_RETURN_DETECTION # define BOOST_NO_TEMPLATE_TEMPLATES # define BOOST_NO_SWPRINTF # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS # define BOOST_NO_IS_ABSTRACT # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS #endif // optional features rather than defects: #if (__HP_aCC >= 33900) # define BOOST_HAS_LONG_LONG # define BOOST_HAS_PARTIAL_STD_ALLOCATOR #endif #if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 ) # define BOOST_NO_MEMBER_TEMPLATE_KEYWORD #endif // This macro should not be defined when compiling in strict ansi // mode, but, currently, we don't have the ability to determine // what standard mode we are compiling with. Some future version // of aCC6 compiler will provide predefined macros reflecting the // compilation options, including the standard mode. #if (__HP_aCC >= 60000) || ((__HP_aCC > 38000) && defined(__hpxstd98)) # define BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif #define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC) // // versions check: // we don't support HP aCC prior to version 33000: #if __HP_aCC < 33000 # error "Compiler not supported or configured - please reconfigure" #endif // // Extended checks for supporting aCC on PA-RISC #if __HP_aCC > 30000 && __HP_aCC < 50000 # if __HP_aCC < 38000 // versions prior to version A.03.80 not supported # error "Compiler version not supported - version A.03.80 or higher is required" # elif !defined(__hpxstd98) // must compile using the option +hpxstd98 with version A.03.80 and above # error "Compiler option '+hpxstd98' is required for proper support" # endif //PA-RISC #endif // // C++0x features // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // #if !defined(__EDG__) #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_USER_DEFINED_LITERALS /* See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436 */ #if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE) #define BOOST_NO_CXX11_VARIADIC_MACROS #endif #endif // // last known and checked version for HP-UX/ia64 is 61300 // last known and checked version for PA-RISC is 38000 #if ((__HP_aCC > 61300) || ((__HP_aCC > 38000) && defined(__hpxstd98))) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif passenger-4.0.37/ext/boost/config/compiler/intel.hpp000644 000765 000024 00000023650 12233035540 023053 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001-8. // (C) Copyright Peter Dimov 2001. // (C) Copyright Jens Maurer 2001. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Aleksey Gurtovoy 2002 - 2003. // (C) Copyright Guillaume Melquiond 2002 - 2003. // (C) Copyright Beman Dawes 2003. // (C) Copyright Martin Wille 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Intel compiler setup: #include "boost/config/compiler/common_edg.hpp" #if defined(__INTEL_COMPILER) # define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER #elif defined(__ICL) # define BOOST_INTEL_CXX_VERSION __ICL #elif defined(__ICC) # define BOOST_INTEL_CXX_VERSION __ICC #elif defined(__ECC) # define BOOST_INTEL_CXX_VERSION __ECC #endif // Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' #if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) # define BOOST_INTEL_STDCXX0X #endif #if defined(_MSC_VER) && (_MSC_VER >= 1600) # define BOOST_INTEL_STDCXX0X #endif #ifdef BOOST_INTEL_STDCXX0X #define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) #else #define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) #endif #define BOOST_INTEL BOOST_INTEL_CXX_VERSION #if defined(_WIN32) || defined(_WIN64) # define BOOST_INTEL_WIN BOOST_INTEL #else # define BOOST_INTEL_LINUX BOOST_INTEL #endif #if (BOOST_INTEL_CXX_VERSION <= 500) && defined(_MSC_VER) # define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS # define BOOST_NO_TEMPLATE_TEMPLATES #endif #if (BOOST_INTEL_CXX_VERSION <= 600) # if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov) // Boost libraries assume strong standard conformance unless otherwise // indicated by a config macro. As configured by Intel, the EDG front-end // requires certain compiler options be set to achieve that strong conformance. // Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt) // and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for // details as they apply to particular versions of the compiler. When the // compiler does not predefine a macro indicating if an option has been set, // this config file simply assumes the option has been set. // Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if // the compiler option is not enabled. # define BOOST_NO_SWPRINTF # endif // Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov) # if defined(_MSC_VER) && (_MSC_VER <= 1200) # define BOOST_NO_VOID_RETURNS # define BOOST_NO_INTEGRAL_INT64_T # endif #endif #if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32) # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS #endif // See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864 #if BOOST_INTEL_CXX_VERSION < 600 # define BOOST_NO_INTRINSIC_WCHAR_T #else // We should test the macro _WCHAR_T_DEFINED to check if the compiler // supports wchar_t natively. *BUT* there is a problem here: the standard // headers define this macro if they typedef wchar_t. Anyway, we're lucky // because they define it without a value, while Intel C++ defines it // to 1. So we can check its value to see if the macro was defined natively // or not. // Under UNIX, the situation is exactly the same, but the macro _WCHAR_T // is used instead. # if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0) # define BOOST_NO_INTRINSIC_WCHAR_T # endif #endif #if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) // // Figure out when Intel is emulating this gcc bug // (All Intel versions prior to 9.0.26, and versions // later than that if they are set up to emulate gcc 3.2 // or earlier): // # if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912) # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # endif #endif #if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32) || (BOOST_INTEL_CXX_VERSION <= 1200) // GCC or VC emulation: #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif // // Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T // set correctly, if we don't do this now, we will get errors later // in type_traits code among other things, getting this correct // for the Intel compiler is actually remarkably fragile and tricky: // #ifdef __cplusplus #if defined(BOOST_NO_INTRINSIC_WCHAR_T) #include template< typename T > struct assert_no_intrinsic_wchar_t; template<> struct assert_no_intrinsic_wchar_t { typedef void type; }; // if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T // where it is defined above: typedef assert_no_intrinsic_wchar_t::type assert_no_intrinsic_wchar_t_; #else template< typename T > struct assert_intrinsic_wchar_t; template<> struct assert_intrinsic_wchar_t {}; // if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line: template<> struct assert_intrinsic_wchar_t {}; #endif #endif #if defined(_MSC_VER) && (_MSC_VER+0 >= 1000) # if _MSC_VER >= 1200 # define BOOST_HAS_MS_INT64 # endif # define BOOST_NO_SWPRINTF # define BOOST_NO_TWO_PHASE_NAME_LOOKUP #elif defined(_WIN32) # define BOOST_DISABLE_WIN32 #endif // I checked version 6.0 build 020312Z, it implements the NRVO. // Correct this as you find out which version of the compiler // implemented the NRVO first. (Daniel Frey) #if (BOOST_INTEL_CXX_VERSION >= 600) # define BOOST_HAS_NRVO #endif // // versions check: // we don't support Intel prior to version 5.0: #if BOOST_INTEL_CXX_VERSION < 500 # error "Compiler not supported or configured - please reconfigure" #endif // Intel on MacOS requires #if defined(__APPLE__) && defined(__INTEL_COMPILER) # define BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif // Intel on Altix Itanium #if defined(__itanium__) && defined(__INTEL_COMPILER) # define BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif // // An attempt to value-initialize a pointer-to-member may trigger an // internal error on Intel <= 11.1 (last checked version), as was // reported by John Maddock, Intel support issue 589832, May 2010. // Moreover, according to test results from Huang-Vista-x86_32_intel, // intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some // cases when it should be value-initialized. // (Niels Dekker, LKEB, May 2010) // Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression). #if defined(__INTEL_COMPILER) # if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1500)) # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION # endif #endif // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // #if defined(__GNUC__) && (__GNUC__ >= 4) # define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) # define BOOST_SYMBOL_IMPORT # define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) #endif // // C++0x features // - ICC added static_assert in 11.0 (first version with C++0x support) // #if defined(BOOST_INTEL_STDCXX0X) # undef BOOST_NO_CXX11_STATIC_ASSERT // // These pass our test cases, but aren't officially supported according to: // http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ // //# undef BOOST_NO_CXX11_LAMBDAS //# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS //# undef BOOST_NO_CXX11_DECLTYPE //# undef BOOST_NO_CXX11_AUTO_DECLARATIONS //# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #endif #if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION >= 1200) //# undef BOOST_NO_CXX11_RVALUE_REFERENCES // Enabling this breaks Filesystem and Exception libraries //# undef BOOST_NO_CXX11_SCOPED_ENUMS // doesn't really work!! # undef BOOST_NO_CXX11_DELETED_FUNCTIONS # undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS # undef BOOST_NO_CXX11_LAMBDAS # undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS # undef BOOST_NO_CXX11_DECLTYPE # undef BOOST_NO_CXX11_AUTO_DECLARATIONS # undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #endif // icl Version 12.1.0.233 Build 20110811 and possibly some other builds // had an incorrect __INTEL_COMPILER value of 9999. Intel say this has been fixed. #if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION > 1200) # undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS # undef BOOST_NO_CXX11_NULLPTR # undef BOOST_NO_CXX11_RVALUE_REFERENCES # undef BOOST_NO_SFINAE_EXPR # undef BOOST_NO_CXX11_TEMPLATE_ALIASES # undef BOOST_NO_CXX11_VARIADIC_TEMPLATES // http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ // continues to list scoped enum support as "Partial" //# undef BOOST_NO_CXX11_SCOPED_ENUMS #endif #if defined(_MSC_VER) && (_MSC_VER <= 1700) // // Although the Intel compiler is capable of supporting these, it appears not to in MSVC compatibility mode: // # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_DELETED_FUNCTIONS # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS # define BOOST_NO_CXX11_TEMPLATE_ALIASES #endif #if (BOOST_INTEL_CXX_VERSION < 1200) // // fenv.h appears not to work with Intel prior to 12.0: // # define BOOST_NO_FENV_H #endif // // last known and checked version: #if (BOOST_INTEL_CXX_VERSION > 1200) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # elif defined(_MSC_VER) // // We don't emit this warning any more, since we have so few // defect macros set anyway (just the one). // //# pragma message("Unknown compiler version - please run the configure tests and report the results") # endif #endif passenger-4.0.37/ext/boost/config/compiler/kai.hpp000644 000765 000024 00000001777 12233035540 022512 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001. // (C) Copyright David Abrahams 2002. // (C) Copyright Aleksey Gurtovoy 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Kai C++ compiler setup: #include "boost/config/compiler/common_edg.hpp" # if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG) // at least on Sun, the contents of is not in namespace std # define BOOST_NO_STDC_NAMESPACE # endif // see also common_edg.hpp which needs a special check for __KCC # if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS # endif // // last known and checked version is 4001: #if (__KCC_VERSION > 4001) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif passenger-4.0.37/ext/boost/config/compiler/metrowerks.hpp000644 000765 000024 00000010565 12233035540 024143 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001. // (C) Copyright Darin Adler 2001. // (C) Copyright Peter Dimov 2001. // (C) Copyright David Abrahams 2001 - 2002. // (C) Copyright Beman Dawes 2001 - 2003. // (C) Copyright Stefan Slapeta 2004. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Metrowerks C++ compiler setup: // locale support is disabled when linking with the dynamic runtime # ifdef _MSL_NO_LOCALE # define BOOST_NO_STD_LOCALE # endif # if __MWERKS__ <= 0x2301 // 5.3 # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING # define BOOST_NO_POINTER_TO_MEMBER_CONST # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS # define BOOST_NO_MEMBER_TEMPLATE_KEYWORD # endif # if __MWERKS__ <= 0x2401 // 6.2 //# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING # endif # if(__MWERKS__ <= 0x2407) // 7.x # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS # define BOOST_NO_UNREACHABLE_RETURN_DETECTION # endif # if(__MWERKS__ <= 0x3003) // 8.x # define BOOST_NO_SFINAE # endif // the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last // tested version *only*: # if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_IS_ABSTRACT # endif #if !__option(wchar_type) # define BOOST_NO_INTRINSIC_WCHAR_T #endif #if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif #if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh) # if __MWERKS__ == 0x3000 # define BOOST_COMPILER_VERSION 8.0 # elif __MWERKS__ == 0x3001 # define BOOST_COMPILER_VERSION 8.1 # elif __MWERKS__ == 0x3002 # define BOOST_COMPILER_VERSION 8.2 # elif __MWERKS__ == 0x3003 # define BOOST_COMPILER_VERSION 8.3 # elif __MWERKS__ == 0x3200 # define BOOST_COMPILER_VERSION 9.0 # elif __MWERKS__ == 0x3201 # define BOOST_COMPILER_VERSION 9.1 # elif __MWERKS__ == 0x3202 # define BOOST_COMPILER_VERSION 9.2 # elif __MWERKS__ == 0x3204 # define BOOST_COMPILER_VERSION 9.3 # elif __MWERKS__ == 0x3205 # define BOOST_COMPILER_VERSION 9.4 # elif __MWERKS__ == 0x3206 # define BOOST_COMPILER_VERSION 9.5 # elif __MWERKS__ == 0x3207 # define BOOST_COMPILER_VERSION 9.6 # else # define BOOST_COMPILER_VERSION __MWERKS__ # endif #else # define BOOST_COMPILER_VERSION __MWERKS__ #endif // // C++0x features // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // #if __MWERKS__ > 0x3206 && __option(rvalue_refs) # define BOOST_HAS_RVALUE_REFS #else # define BOOST_NO_CXX11_RVALUE_REFERENCES #endif #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_VARIADIC_MACROS #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) // // versions check: // we don't support Metrowerks prior to version 5.3: #if __MWERKS__ < 0x2301 # error "Compiler not supported or configured - please reconfigure" #endif // // last known and checked version: #if (__MWERKS__ > 0x3205) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif passenger-4.0.37/ext/boost/config/compiler/mpw.hpp000644 000765 000024 00000005445 12233035540 022545 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2002. // (C) Copyright Aleksey Gurtovoy 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // MPW C++ compilers setup: # if defined(__SC__) # define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__) # elif defined(__MRC__) # define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__) # else # error "Using MPW compiler configuration by mistake. Please update." # endif // // MPW 8.90: // #if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG) # define BOOST_NO_CV_SPECIALIZATIONS # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_NO_INTRINSIC_WCHAR_T # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # define BOOST_NO_USING_TEMPLATE # define BOOST_NO_CWCHAR # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */ #endif // // C++0x features // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_VARIADIC_MACROS #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS // // versions check: // we don't support MPW prior to version 8.9: #if MPW_CPLUS < 0x890 # error "Compiler not supported or configured - please reconfigure" #endif // // last known and checked version is 0x890: #if (MPW_CPLUS > 0x890) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif passenger-4.0.37/ext/boost/config/compiler/nvcc.hpp000644 000765 000024 00000001477 12233035540 022674 0ustar00honglistaff000000 000000 // (C) Copyright Eric Jourdanneau, Joel Falcou 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // NVIDIA CUDA C++ compiler setup #ifndef BOOST_COMPILER # define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" #endif // NVIDIA Specific support // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device #define BOOST_GPU_ENABLED __host__ __device__ // Boost support macro for NVCC // NVCC Basically behaves like some flavor of MSVC6 + some specific quirks #ifdef __GNUC__ #include #elif defined(_MSC_VER) #include #endif passenger-4.0.37/ext/boost/config/compiler/pathscale.hpp000644 000765 000024 00000005530 12233035540 023701 0ustar00honglistaff000000 000000 // (C) Copyright Bryce Lelbach 2011 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // PathScale EKOPath C++ Compiler #ifndef BOOST_COMPILER # define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__ #endif #if __PATHCC__ >= 4 # define BOOST_MSVC6_MEMBER_TEMPLATES # define BOOST_HAS_UNISTD_H # define BOOST_HAS_STDINT_H # define BOOST_HAS_SIGACTION # define BOOST_HAS_SCHED_YIELD # define BOOST_HAS_THREADS # define BOOST_HAS_PTHREADS # define BOOST_HAS_PTHREAD_YIELD # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # define BOOST_HAS_PARTIAL_STD_ALLOCATOR # define BOOST_HAS_NRVO # define BOOST_HAS_NL_TYPES_H # define BOOST_HAS_NANOSLEEP # define BOOST_HAS_LONG_LONG # define BOOST_HAS_LOG1P # define BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_EXPM1 # define BOOST_HAS_DIRENT_H # define BOOST_HAS_CLOCK_GETTIME # define BOOST_NO_CXX11_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_UNICODE_LITERALS # define BOOST_NO_CXX11_TEMPLATE_ALIASES # define BOOST_NO_CXX11_STATIC_ASSERT # define BOOST_NO_SFINAE_EXPR # define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_RANGE_BASED_FOR # define BOOST_NO_CXX11_RAW_LITERALS # define BOOST_NO_CXX11_NULLPTR # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_NOEXCEPT # define BOOST_NO_CXX11_LAMBDAS # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS # define BOOST_NO_MS_INT64_NUMERIC_LIMITS # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_DELETED_FUNCTIONS # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS # define BOOST_NO_CXX11_DECLTYPE # define BOOST_NO_CXX11_DECLTYPE_N3276 # define BOOST_NO_CXX11_CONSTEXPR # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION # define BOOST_NO_CXX11_CHAR32_T # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_USER_DEFINED_LITERALS #endif passenger-4.0.37/ext/boost/config/compiler/pgi.hpp000644 000765 000024 00000007041 12233035540 022513 0ustar00honglistaff000000 000000 // (C) Copyright Noel Belcourt 2007. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // PGI C++ compiler setup: #define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__ #define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) // // Threading support: // Turn this on unconditionally here, it will get turned off again later // if no threading API is detected. // #if __PGIC__ >= 11 // options requested by configure --enable-test #define BOOST_HAS_PTHREADS #define BOOST_HAS_THREADS #define BOOST_HAS_PTHREAD_YIELD #define BOOST_HAS_NRVO #define BOOST_HAS_LONG_LONG // options --enable-test wants undefined #undef BOOST_NO_STDC_NAMESPACE #undef BOOST_NO_EXCEPTION_STD_NAMESPACE #undef BOOST_DEDUCED_TYPENAME #define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_AUTO_DECLARATIONS #elif __PGIC__ >= 10 // options requested by configure --enable-test #define BOOST_HAS_THREADS #define BOOST_HAS_NRVO #define BOOST_HAS_LONG_LONG // options --enable-test wants undefined #undef BOOST_NO_STDC_NAMESPACE #undef BOOST_NO_EXCEPTION_STD_NAMESPACE #undef BOOST_DEDUCED_TYPENAME #elif __PGIC__ >= 7 #define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #define BOOST_NO_SWPRINTF #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_AUTO_DECLARATIONS #else # error "Pgi compiler not configured - please reconfigure" #endif // // C++0x features // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_NUMERIC_LIMITS #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_SWPRINTF #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_VARIADIC_MACROS #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_HDR_UNORDERED_SET #define BOOST_NO_CXX11_HDR_UNORDERED_MAP #define BOOST_NO_CXX11_HDR_TYPEINDEX #define BOOST_NO_CXX11_HDR_TYPE_TRAITS #define BOOST_NO_CXX11_HDR_TUPLE #define BOOST_NO_CXX11_HDR_THREAD #define BOOST_NO_CXX11_HDR_SYSTEM_ERROR #define BOOST_NO_CXX11_HDR_REGEX #define BOOST_NO_CXX11_HDR_RATIO #define BOOST_NO_CXX11_HDR_RANDOM #define BOOST_NO_CXX11_HDR_MUTEX #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_HDR_FUTURE #define BOOST_NO_CXX11_HDR_FORWARD_LIST #define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE #define BOOST_NO_CXX11_HDR_CODECVT #define BOOST_NO_CXX11_HDR_CHRONO #define BOOST_NO_CXX11_HDR_ARRAY #define BOOST_NO_CXX11_USER_DEFINED_LITERALS // // version check: // probably nothing to do here? passenger-4.0.37/ext/boost/config/compiler/sgi_mipspro.hpp000644 000765 000024 00000001406 12233035540 024266 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // SGI C++ compiler setup: #define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION) #include "boost/config/compiler/common_edg.hpp" // // Threading support: // Turn this on unconditionally here, it will get turned off again later // if no threading API is detected. // #define BOOST_HAS_THREADS #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #undef BOOST_NO_SWPRINTF #undef BOOST_DEDUCED_TYPENAME // // version check: // probably nothing to do here? passenger-4.0.37/ext/boost/config/compiler/sunpro_cc.hpp000644 000765 000024 00000011636 12233035540 023734 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001. // (C) Copyright Jens Maurer 2001 - 2003. // (C) Copyright Peter Dimov 2002. // (C) Copyright Aleksey Gurtovoy 2002 - 2003. // (C) Copyright David Abrahams 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Sun C++ compiler setup: # if __SUNPRO_CC <= 0x500 # define BOOST_NO_MEMBER_TEMPLATES # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING # endif # if (__SUNPRO_CC <= 0x520) // // Sunpro 5.2 and earler: // // although sunpro 5.2 supports the syntax for // inline initialization it often gets the value // wrong, especially where the value is computed // from other constants (J Maddock 6th May 2001) # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION // Although sunpro 5.2 supports the syntax for // partial specialization, it often seems to // bind to the wrong specialization. Better // to disable it until suppport becomes more stable // (J Maddock 6th May 2001). # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif # if (__SUNPRO_CC <= 0x530) // Requesting debug info (-g) with Boost.Python results // in an internal compiler error for "static const" // initialized in-class. // >> Assertion: (../links/dbg_cstabs.cc, line 611) // while processing ../test.cpp at line 0. // (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002) # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION // SunPro 5.3 has better support for partial specialization, // but breaks when compiling std::less > // (Jens Maurer 4 Nov 2001). // std::less specialization fixed as reported by George // Heintzelman; partial specialization re-enabled // (Peter Dimov 17 Jan 2002) //# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // integral constant expressions with 64 bit numbers fail # define BOOST_NO_INTEGRAL_INT64_T # endif # if (__SUNPRO_CC < 0x570) # define BOOST_NO_TEMPLATE_TEMPLATES // see http://lists.boost.org/MailArchives/boost/msg47184.php // and http://lists.boost.org/MailArchives/boost/msg47220.php # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_NO_SFINAE # define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS # endif # if (__SUNPRO_CC <= 0x580) # define BOOST_NO_IS_ABSTRACT # endif # if (__SUNPRO_CC <= 0x5100) // Sun 5.10 may not correctly value-initialize objects of // some user defined types, as was reported in April 2010 // (CR 6947016), and confirmed by Steve Clamage. // (Niels Dekker, LKEB, May 2010). # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION # endif // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // #if __SUNPRO_CC > 0x500 # define BOOST_SYMBOL_EXPORT __global # define BOOST_SYMBOL_IMPORT __global # define BOOST_SYMBOL_VISIBLE __global #endif // // Issues that effect all known versions: // #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #define BOOST_NO_ADL_BARRIER // // C++0x features // # define BOOST_HAS_LONG_LONG #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_VARIADIC_MACROS #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS // // Version // #define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC) // // versions check: // we don't support sunpro prior to version 4: #if __SUNPRO_CC < 0x400 #error "Compiler not supported or configured - please reconfigure" #endif // // last known and checked version is 0x590: #if (__SUNPRO_CC > 0x590) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif passenger-4.0.37/ext/boost/config/compiler/vacpp.hpp000644 000765 000024 00000007735 12233035540 023057 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Toon Knapen 2001 - 2003. // (C) Copyright Lie-Quan Lee 2001. // (C) Copyright Markus Schoepflin 2002 - 2003. // (C) Copyright Beman Dawes 2002 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Visual Age (IBM) C++ compiler setup: #if __IBMCPP__ <= 501 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS #endif #if (__IBMCPP__ <= 502) // Actually the compiler supports inclass member initialization but it // requires a definition for the class member and it doesn't recognize // it as an integral constant expression when used as a template argument. # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_NO_INTEGRAL_INT64_T # define BOOST_NO_MEMBER_TEMPLATE_KEYWORD #endif #if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG) # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS #endif #if (__IBMCPP__ <= 1110) // XL C++ V11.1 and earlier versions may not always value-initialize // a temporary object T(), when T is a non-POD aggregate class type. // Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it // high priority. -- Niels Dekker (LKEB), May 2010. # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #endif // // On AIX thread support seems to be indicated by _THREAD_SAFE: // #ifdef _THREAD_SAFE # define BOOST_HAS_THREADS #endif #define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__) // // versions check: // we don't support Visual age prior to version 5: #if __IBMCPP__ < 500 #error "Compiler not supported or configured - please reconfigure" #endif // // last known and checked version is 1210: #if (__IBMCPP__ > 1210) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif // Some versions of the compiler have issues with default arguments on partial specializations #if __IBMCPP__ <= 1010 #define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS #endif // // C++0x features // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // #if ! __IBMCPP_AUTO_TYPEDEDUCTION # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #endif #if ! __IBMCPP_UTF_LITERAL__ # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T #endif #if ! __IBMCPP_CONSTEXPR # define BOOST_NO_CXX11_CONSTEXPR #endif #if ! __IBMCPP_DECLTYPE # define BOOST_NO_CXX11_DECLTYPE #else # define BOOST_HAS_DECLTYPE #endif #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #if ! __IBMCPP_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #endif #if ! __IBMCPP_EXTERN_TEMPLATE # define BOOST_NO_CXX11_EXTERN_TEMPLATE #endif #if ! __IBMCPP_VARIADIC_TEMPLATES // not enabled separately at this time # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #endif #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #if ! __IBMCPP_RVALUE_REFERENCES # define BOOST_NO_CXX11_RVALUE_REFERENCES #endif #if ! __IBMCPP_SCOPED_ENUM # define BOOST_NO_CXX11_SCOPED_ENUMS #endif #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #if ! __IBMCPP_STATIC_ASSERT # define BOOST_NO_CXX11_STATIC_ASSERT #endif #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #if ! __IBMCPP_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif #if ! __C99_MACRO_WITH_VA_ARGS # define BOOST_NO_CXX11_VARIADIC_MACROS #endif passenger-4.0.37/ext/boost/config/compiler/visualc.hpp000644 000765 000024 00000025132 12233035540 023403 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001 - 2002. // (C) Copyright Peter Dimov 2001. // (C) Copyright Aleksey Gurtovoy 2002. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Beman Dawes 2002 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // // Microsoft Visual C++ compiler setup: // // We need to be careful with the checks in this file, as contrary // to popular belief there are versions with _MSC_VER with the final // digit non-zero (mainly the MIPS cross compiler). // // So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX. // No other comparisons (==, >, or <=) are safe. // #define BOOST_MSVC _MSC_VER // // Helper macro BOOST_MSVC_FULL_VER for use in Boost code: // #if _MSC_FULL_VER > 100000000 # define BOOST_MSVC_FULL_VER _MSC_FULL_VER #else # define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10) #endif // Attempt to suppress VC6 warnings about the length of decorated names (obsolete): #pragma warning( disable : 4503 ) // warning: decorated name length exceeded // // versions check: // we don't support Visual C++ prior to version 6: #if _MSC_VER < 1200 # error "Compiler not supported or configured - please reconfigure" #endif #if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1200-1202 == eVC++4 # pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS # define BOOST_NO_VOID_RETURNS # define BOOST_NO_EXCEPTION_STD_NAMESPACE # if _MSC_VER == 1202 # define BOOST_NO_STD_TYPEINFO # endif #endif /// Visual Studio has no fenv.h #define BOOST_NO_FENV_H #if (_MSC_VER < 1310) // 130X == VC++ 7.0 # if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS # endif # define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_NO_PRIVATE_IN_AGGREGATE # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP # define BOOST_NO_INTEGRAL_INT64_T # define BOOST_NO_DEDUCED_TYPENAME # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE // VC++ 6/7 has member templates but they have numerous problems including // cases of silent failure, so for safety we define: # define BOOST_NO_MEMBER_TEMPLATES // For VC++ experts wishing to attempt workarounds, we define: # define BOOST_MSVC6_MEMBER_TEMPLATES # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # define BOOST_NO_CV_VOID_SPECIALIZATIONS # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING # define BOOST_NO_USING_TEMPLATE # define BOOST_NO_SWPRINTF # define BOOST_NO_TEMPLATE_TEMPLATES # define BOOST_NO_SFINAE # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS # define BOOST_NO_IS_ABSTRACT # define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS // TODO: what version is meant here? Have there really been any fixes in cl 12.01 (as e.g. shipped with eVC4)? # if (_MSC_VER >= 1300) # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS # endif #endif #if _MSC_VER < 1400 // although a conforming signature for swprint exists in VC7.1 // it appears not to actually work: # define BOOST_NO_SWPRINTF // Our extern template tests also fail for this compiler: # define BOOST_NO_CXX11_EXTERN_TEMPLATE // Variadic macros do not exist for VC7.1 and lower # define BOOST_NO_CXX11_VARIADIC_MACROS #endif #if defined(UNDER_CE) // Windows CE does not have a conforming signature for swprintf # define BOOST_NO_SWPRINTF #endif #if _MSC_VER < 1500 // 140X == VC++ 8.0 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS #endif #if _MSC_VER < 1600 // 150X == VC++ 9.0 // A bug in VC9: # define BOOST_NO_ADL_BARRIER #endif // MSVC (including the latest checked version) has not yet completely // implemented value-initialization, as is reported: // "VC++ does not value-initialize members of derived classes without // user-declared constructor", reported in 2009 by Sylvester Hesp: // https://connect.microsoft.com/VisualStudio/feedback/details/484295 // "Presence of copy constructor breaks member class initialization", // reported in 2009 by Alex Vakulenko: // https://connect.microsoft.com/VisualStudio/feedback/details/499606 // "Value-initialization in new-expression", reported in 2005 by // Pavel Kuznetsov (MetaCommunications Engineering): // https://connect.microsoft.com/VisualStudio/feedback/details/100744 // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues // (Niels Dekker, LKEB, May 2010) # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #ifndef _NATIVE_WCHAR_T_DEFINED # define BOOST_NO_INTRINSIC_WCHAR_T #endif #if defined(_WIN32_WCE) || defined(UNDER_CE) # define BOOST_NO_SWPRINTF #endif // we have ThreadEx or GetSystemTimeAsFileTime unless we're running WindowsCE #if !defined(_WIN32_WCE) && !defined(UNDER_CE) # define BOOST_HAS_THREADEX # define BOOST_HAS_GETSYSTEMTIMEASFILETIME #endif // // check for exception handling support: #if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif // // __int64 support: // #if (_MSC_VER >= 1200) # define BOOST_HAS_MS_INT64 #endif #if (_MSC_VER >= 1310) && (defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400)) # define BOOST_HAS_LONG_LONG #else # define BOOST_NO_LONG_LONG #endif #if (_MSC_VER >= 1400) && !defined(_DEBUG) # define BOOST_HAS_NRVO #endif // // disable Win32 API's if compiler extentions are // turned off: // #if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32) # define BOOST_DISABLE_WIN32 #endif #if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI) # define BOOST_NO_RTTI #endif // // TR1 features: // #if _MSC_VER >= 1700 // # define BOOST_HAS_TR1_HASH // don't know if this is true yet. // # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet. # define BOOST_HAS_TR1_UNORDERED_MAP # define BOOST_HAS_TR1_UNORDERED_SET #endif // // C++0x features // // See above for BOOST_NO_LONG_LONG // C++ features supported by VC++ 10 (aka 2010) // #if _MSC_VER < 1600 # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS # define BOOST_NO_CXX11_LAMBDAS # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_STATIC_ASSERT # define BOOST_NO_CXX11_NULLPTR # define BOOST_NO_CXX11_DECLTYPE #endif // _MSC_VER < 1600 #if _MSC_VER >= 1600 # define BOOST_HAS_STDINT_H #endif // C++ features supported by VC++ 11 (aka 2012) // #if _MSC_VER < 1700 # define BOOST_NO_CXX11_RANGE_BASED_FOR # define BOOST_NO_CXX11_SCOPED_ENUMS #endif // _MSC_VER < 1700 // C++11 features supported by VC++ 11 (aka 2012) November 2012 CTP // Because the CTP is unsupported, unrelease, and only alpha quality, // it is only supported if BOOST_MSVC_ENABLE_2012_NOV_CTP is defined. // #if _MSC_FULL_VER < 170051025 || !defined(BOOST_MSVC_ENABLE_2012_NOV_CTP) # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS # define BOOST_NO_CXX11_RAW_LITERALS # define BOOST_NO_CXX11_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif // C++11 features not supported by any versions #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #define BOOST_NO_CXX11_USER_DEFINED_LITERALS // // prefix and suffix headers: // #ifndef BOOST_ABI_PREFIX # define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp" #endif #ifndef BOOST_ABI_SUFFIX # define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp" #endif #ifndef BOOST_COMPILER // TODO: // these things are mostly bogus. 1200 means version 12.0 of the compiler. The // artificial versions assigned to them only refer to the versions of some IDE // these compilers have been shipped with, and even that is not all of it. Some // were shipped with freely downloadable SDKs, others as crosscompilers in eVC. // IOW, you can't use these 'versions' in any sensible way. Sorry. # if defined(UNDER_CE) # if _MSC_VER < 1200 // Note: these are so far off, they are not really supported # elif _MSC_VER < 1300 // eVC++ 4 comes with 1200-1202 # define BOOST_COMPILER_VERSION evc4.0 # elif _MSC_VER < 1400 // Note: I'm not aware of any CE compiler with version 13xx # if defined(BOOST_ASSERT_CONFIG) # error "Unknown EVC++ compiler version - please run the configure tests and report the results" # else # pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") # endif # elif _MSC_VER < 1500 # define BOOST_COMPILER_VERSION evc8 # elif _MSC_VER < 1600 # define BOOST_COMPILER_VERSION evc9 # elif _MSC_VER < 1700 # define BOOST_COMPILER_VERSION evc10 # elif _MSC_VER < 1800 # define BOOST_COMPILER_VERSION evc11 # else # if defined(BOOST_ASSERT_CONFIG) # error "Unknown EVC++ compiler version - please run the configure tests and report the results" # else # pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") # endif # endif # else # if _MSC_VER < 1200 // Note: these are so far off, they are not really supported # define BOOST_COMPILER_VERSION 5.0 # elif _MSC_VER < 1300 # define BOOST_COMPILER_VERSION 6.0 # elif _MSC_VER < 1310 # define BOOST_COMPILER_VERSION 7.0 # elif _MSC_VER < 1400 # define BOOST_COMPILER_VERSION 7.1 # elif _MSC_VER < 1500 # define BOOST_COMPILER_VERSION 8.0 # elif _MSC_VER < 1600 # define BOOST_COMPILER_VERSION 9.0 # elif _MSC_VER < 1700 # define BOOST_COMPILER_VERSION 10.0 # elif _MSC_VER < 1800 # define BOOST_COMPILER_VERSION 11.0 # else # define BOOST_COMPILER_VERSION _MSC_VER # endif # endif # define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) #endif // // last known and checked version is 1700 (VC11, aka 2011): #if (_MSC_VER > 1700) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else # pragma message("Unknown compiler version - please run the configure tests and report the results") # endif #endif passenger-4.0.37/ext/boost/config/abi/borland_prefix.hpp000644 000765 000024 00000001752 12233035540 023656 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // for C++ Builder the following options effect the ABI: // // -b (on or off - effect emum sizes) // -Vx (on or off - empty members) // -Ve (on or off - empty base classes) // -aX (alignment - 5 options). // -pX (Calling convention - 4 options) // -VmX (member pointer size and layout - 5 options) // -VC (on or off, changes name mangling) // -Vl (on or off, changes struct layout). // In addition the following warnings are sufficiently annoying (and // unfixable) to have them turned off by default: // // 8027 - functions containing [for|while] loops are not expanded inline // 8026 - functions taking class by value arguments are not expanded inline #pragma nopushoptwarn # pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026 passenger-4.0.37/ext/boost/config/abi/borland_suffix.hpp000644 000765 000024 00000000430 12233035540 023655 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # pragma option pop #pragma nopushoptwarn passenger-4.0.37/ext/boost/config/abi/msvc_prefix.hpp000644 000765 000024 00000001463 12233035540 023204 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // Boost binaries are built with the compiler's default ABI settings, // if the user changes their default alignment in the VS IDE then their // code will no longer be binary compatible with the bjam built binaries // unless this header is included to force Boost code into a consistent ABI. // // Note that inclusion of this header is only necessary for libraries with // separate source, header only libraries DO NOT need this as long as all // translation units are built with the same options. // #if defined(_M_X64) # pragma pack(push,16) #else # pragma pack(push,8) #endif passenger-4.0.37/ext/boost/config/abi/msvc_suffix.hpp000644 000765 000024 00000000374 12233035540 023213 0ustar00honglistaff000000 000000 // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #pragma pack(pop) passenger-4.0.37/ext/boost/concept/assert.hpp000644 000765 000024 00000003510 12233035540 021606 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2006. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP # define BOOST_CONCEPT_ASSERT_DWA2006430_HPP # include # include // The old protocol used a constraints() member function in concept // checking classes. If the compiler supports SFINAE, we can detect // that function and seamlessly support the old concept checking // classes. In this release, backward compatibility with the old // concept checking classes is enabled by default, where available. // The old protocol is deprecated, though, and backward compatibility // will no longer be the default in the next release. # if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \ && !defined(BOOST_NO_SFINAE) \ \ && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) \ && !(BOOST_WORKAROUND(__GNUC__, == 2)) // Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to // check for the presence of particularmember functions. # define BOOST_OLD_CONCEPT_SUPPORT # endif # ifdef BOOST_MSVC # include # elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # include # else # include # endif // Usage, in class or function context: // // BOOST_CONCEPT_ASSERT((UnaryFunctionConcept)); // # define BOOST_CONCEPT_ASSERT(ModelInParens) \ BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens) #endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP passenger-4.0.37/ext/boost/concept/detail/000755 000765 000024 00000000000 12233035540 021037 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/concept/usage.hpp000644 000765 000024 00000002275 12233035540 021420 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2006. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_CONCEPT_USAGE_DWA2006919_HPP # define BOOST_CONCEPT_USAGE_DWA2006919_HPP # include # include # include namespace boost { namespace concepts { # if BOOST_WORKAROUND(__GNUC__, == 2) # define BOOST_CONCEPT_USAGE(model) ~model() # else template struct usage_requirements { ~usage_requirements() { ((Model*)0)->~Model(); } }; # if BOOST_WORKAROUND(__GNUC__, <= 3) # define BOOST_CONCEPT_USAGE(model) \ model(); /* at least 2.96 and 3.4.3 both need this :( */ \ BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements)); \ ~model() # else # define BOOST_CONCEPT_USAGE(model) \ BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements)); \ ~model() # endif # endif }} // namespace boost::concepts #endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP passenger-4.0.37/ext/boost/concept/detail/backward_compatibility.hpp000644 000765 000024 00000001063 12233035540 026257 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2009. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP # define BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP namespace boost { namespace concepts {} # if defined(BOOST_HAS_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD) namespace concept = concepts; # endif } // namespace boost::concept #endif // BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP passenger-4.0.37/ext/boost/concept/detail/concept_def.hpp000644 000765 000024 00000006064 12233035540 024027 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2006. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP # define BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP # include # include # include # include #endif // BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP // BOOST_concept(SomeName, (p1)(p2)...(pN)) // // Expands to "template struct SomeName" // // Also defines an equivalent SomeNameConcept for backward compatibility. // Maybe in the next release we can kill off the "Concept" suffix for good. #if BOOST_WORKAROUND(__GNUC__, <= 3) # define BOOST_concept(name, params) \ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ struct name; /* forward declaration */ \ \ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ struct BOOST_PP_CAT(name,Concept) \ : name< BOOST_PP_SEQ_ENUM(params) > \ { \ /* at least 2.96 and 3.4.3 both need this */ \ BOOST_PP_CAT(name,Concept)(); \ }; \ \ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ struct name #else # define BOOST_concept(name, params) \ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ struct name; /* forward declaration */ \ \ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ struct BOOST_PP_CAT(name,Concept) \ : name< BOOST_PP_SEQ_ENUM(params) > \ { \ }; \ \ template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ struct name #endif // Helper for BOOST_concept, above. # define BOOST_CONCEPT_typename(r, ignored, index, t) \ BOOST_PP_COMMA_IF(index) typename t passenger-4.0.37/ext/boost/concept/detail/concept_undef.hpp000644 000765 000024 00000000360 12233035540 024363 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2006. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # undef BOOST_concept_typename # undef BOOST_concept passenger-4.0.37/ext/boost/concept/detail/general.hpp000644 000765 000024 00000003507 12233035540 023172 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2006. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP # define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP # include # include # ifdef BOOST_OLD_CONCEPT_SUPPORT # include # include # endif // This implementation works on Comeau and GCC, all the way back to // 2.95 namespace boost { namespace concepts { template struct requirement_; namespace detail { template struct instantiate {}; } template struct requirement { static void failed() { ((Model*)0)->~Model(); } }; struct failed {}; template struct requirement { static void failed() { ((Model*)0)->~Model(); } }; # ifdef BOOST_OLD_CONCEPT_SUPPORT template struct constraint { static void failed() { ((Model*)0)->constraints(); } }; template struct requirement_ : mpl::if_< concepts::not_satisfied , constraint , requirement >::type {}; # else // For GCC-2.x, these can't have exactly the same name template struct requirement_ : requirement {}; # endif # define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ typedef ::boost::concepts::detail::instantiate< \ &::boost::concepts::requirement_::failed> \ BOOST_PP_CAT(boost_concept_check,__LINE__) }} #endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP passenger-4.0.37/ext/boost/concept/detail/has_constraints.hpp000644 000765 000024 00000003144 12233035540 024754 0ustar00honglistaff000000 000000 // Copyright David Abrahams 2006. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP # define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP # include # include # include namespace boost { namespace concepts { namespace detail { // Here we implement the metafunction that detects whether a // constraints metafunction exists typedef char yes; typedef char (&no)[2]; template struct wrap_constraints {}; #if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__) // Work around the following bogus error in Sun Studio 11, by // turning off the has_constraints function entirely: // Error: complex expression not allowed in dependent template // argument expression inline no has_constraints_(...); #else template inline yes has_constraints_(Model*, wrap_constraints* = 0); inline no has_constraints_(...); #endif } // This would be called "detail::has_constraints," but it has a strong // tendency to show up in error messages. template struct not_satisfied { BOOST_STATIC_CONSTANT( bool , value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) ); typedef mpl::bool_ type; }; }} // namespace boost::concepts::detail #endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP passenger-4.0.37/ext/boost/chrono/ceil.hpp000644 000765 000024 00000001453 12233035540 021062 0ustar00honglistaff000000 000000 // boost/chrono/round.hpp ------------------------------------------------------------// // (C) Copyright Howard Hinnant // Copyright 2011 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/chrono for documentation. #ifndef BOOST_CHRONO_CEIL_HPP #define BOOST_CHRONO_CEIL_HPP #include namespace boost { namespace chrono { /** * rounds up */ template To ceil(const duration& d) { To t = duration_cast(d); if (t < d) ++t; return t; } } // namespace chrono } // namespace boost #endif passenger-4.0.37/ext/boost/chrono/clock_string.hpp000644 000765 000024 00000001013 12233035540 022617 0ustar00honglistaff000000 000000 // // (C) Copyright 2010-2011 Vicente J. Botet Escriba // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // #ifndef BOOST_CHRONO_CLOCK_STRING_HPP #define BOOST_CHRONO_CLOCK_STRING_HPP #include namespace boost { namespace chrono { template struct clock_string; } // chrono } // boost #endif // BOOST_CHRONO_CLOCK_STRING_HPP passenger-4.0.37/ext/boost/chrono/config.hpp000644 000765 000024 00000016374 12233035540 021423 0ustar00honglistaff000000 000000 // boost/chrono/config.hpp -------------------------------------------------// // Copyright Beman Dawes 2003, 2006, 2008 // Copyright 2009-2011 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/chrono for documentation. #ifndef BOOST_CHRONO_CONFIG_HPP #define BOOST_CHRONO_CONFIG_HPP #include #if !defined BOOST_CHRONO_VERSION #define BOOST_CHRONO_VERSION 1 #else #if BOOST_CHRONO_VERSION!=1 && BOOST_CHRONO_VERSION!=2 #error "BOOST_CHRONO_VERSION must be 1 or 2" #endif #endif #if defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_USE_WINDOWS_H) #define BOOST_USE_WINDOWS_H #endif #if ! defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT \ && ! defined BOOST_CHRONO_DONT_PROVIDE_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT # define BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT #endif // BOOST_CHRONO_POSIX_API, BOOST_CHRONO_MAC_API, or BOOST_CHRONO_WINDOWS_API // can be defined by the user to specify which API should be used #if defined(BOOST_CHRONO_WINDOWS_API) # warning Boost.Chrono will use the Windows API #elif defined(BOOST_CHRONO_MAC_API) # warning Boost.Chrono will use the Mac API #elif defined(BOOST_CHRONO_POSIX_API) # warning Boost.Chrono will use the POSIX API #endif # if defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_POSIX_API ) # error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_POSIX_API are defined # elif defined( BOOST_CHRONO_WINDOWS_API ) && defined( BOOST_CHRONO_MAC_API ) # error both BOOST_CHRONO_WINDOWS_API and BOOST_CHRONO_MAC_API are defined # elif defined( BOOST_CHRONO_MAC_API ) && defined( BOOST_CHRONO_POSIX_API ) # error both BOOST_CHRONO_MAC_API and BOOST_CHRONO_POSIX_API are defined # elif !defined( BOOST_CHRONO_WINDOWS_API ) && !defined( BOOST_CHRONO_MAC_API ) && !defined( BOOST_CHRONO_POSIX_API ) # if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) # define BOOST_CHRONO_WINDOWS_API # elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) # define BOOST_CHRONO_MAC_API # else # define BOOST_CHRONO_POSIX_API # endif # endif # if defined( BOOST_CHRONO_WINDOWS_API ) # ifndef UNDER_CE # define BOOST_CHRONO_HAS_PROCESS_CLOCKS # endif # define BOOST_CHRONO_HAS_CLOCK_STEADY # define BOOST_CHRONO_HAS_THREAD_CLOCK # define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true # endif # if defined( BOOST_CHRONO_MAC_API ) # define BOOST_CHRONO_HAS_PROCESS_CLOCKS # define BOOST_CHRONO_HAS_CLOCK_STEADY # define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true # endif # if defined( BOOST_CHRONO_POSIX_API ) # define BOOST_CHRONO_HAS_PROCESS_CLOCKS # include //to check for CLOCK_REALTIME and CLOCK_MONOTONIC and _POSIX_THREAD_CPUTIME # if defined(CLOCK_MONOTONIC) # define BOOST_CHRONO_HAS_CLOCK_STEADY # endif # if defined(_POSIX_THREAD_CPUTIME) && !defined(BOOST_DISABLE_THREADS) # define BOOST_CHRONO_HAS_THREAD_CLOCK # define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true # endif # if defined(CLOCK_THREAD_CPUTIME_ID) && !defined(BOOST_DISABLE_THREADS) # define BOOST_CHRONO_HAS_THREAD_CLOCK # define BOOST_CHRONO_THREAD_CLOCK_IS_STEADY true # endif # if defined(sun) || defined(__sun) # undef BOOST_CHRONO_HAS_THREAD_CLOCK # undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY # endif # if defined(__HP_aCC) && defined(__hpux) # undef BOOST_CHRONO_HAS_THREAD_CLOCK # undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY # endif # if defined(__VXWORKS__) # undef BOOST_CHRONO_HAS_PROCESS_CLOCKS # endif # endif #if defined(BOOST_CHRONO_THREAD_DISABLED) && defined(BOOST_CHRONO_HAS_THREAD_CLOCK) #undef BOOST_CHRONO_HAS_THREAD_CLOCK #undef BOOST_CHRONO_THREAD_CLOCK_IS_STEADY #endif //#undef BOOST_CHRONO_HAS_PROCESS_CLOCKS // unicode support ------------------------------// #if defined(BOOST_NO_CXX11_UNICODE_LITERALS) || defined(BOOST_NO_CXX11_CHAR16_T) || defined(BOOST_NO_CXX11_CHAR32_T) //~ #define BOOST_CHRONO_HAS_UNICODE_SUPPORT #else #define BOOST_CHRONO_HAS_UNICODE_SUPPORT 1 #endif #if ! defined BOOST_NOEXCEPT #if defined(BOOST_NO_CXX11_NOEXCEPT) #define BOOST_NOEXCEPT #else #define BOOST_NOEXCEPT noexcept #endif #endif #if defined( BOOST_NO_CXX11_NUMERIC_LIMITS ) #define BOOST_CHRONO_LIB_CONSTEXPR #elif defined(_LIBCPP_VERSION) && !defined(_LIBCPP_CONSTEXPR) #define BOOST_CHRONO_LIB_CONSTEXPR #else #define BOOST_CHRONO_LIB_CONSTEXPR BOOST_CONSTEXPR #endif #if defined( BOOST_NO_CXX11_NUMERIC_LIMITS ) # define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw() #else #ifdef BOOST_NO_CXX11_NOEXCEPT # define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW throw() #else # define BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW noexcept #endif #endif #if defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \ && defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING #error "BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING && BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING defined" #endif #if defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \ && defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 #error "BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 && BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 defined" #endif #if ! defined BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING \ && ! defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING #define BOOST_CHRONO_PROVIDE_HYBRID_ERROR_HANDLING #endif #if (BOOST_CHRONO_VERSION == 2) #if ! defined BOOST_CHRONO_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 \ && ! defined BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 #define BOOST_CHRONO_DONT_PROVIDES_DEPRECATED_IO_SINCE_V2_0_0 #endif #endif #ifdef BOOST_CHRONO_HEADER_ONLY #define BOOST_CHRONO_INLINE inline #define BOOST_CHRONO_STATIC inline #define BOOST_CHRONO_DECL #else #define BOOST_CHRONO_INLINE #define BOOST_CHRONO_STATIC static // enable dynamic linking on Windows ---------------------------------------// // we need to import/export our code only if the user has specifically // asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost // libraries to be dynamically linked, or BOOST_CHRONO_DYN_LINK // if they want just this one to be dynamically liked: #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK) // export if this is our own source, otherwise import: #ifdef BOOST_CHRONO_SOURCE # define BOOST_CHRONO_DECL BOOST_SYMBOL_EXPORT #else # define BOOST_CHRONO_DECL BOOST_SYMBOL_IMPORT #endif // BOOST_CHRONO_SOURCE #endif // DYN_LINK // // if BOOST_CHRONO_DECL isn't defined yet define it now: #ifndef BOOST_CHRONO_DECL #define BOOST_CHRONO_DECL #endif // enable automatic library variant selection ------------------------------// #if !defined(BOOST_CHRONO_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_CHRONO_NO_LIB) // // Set the name of our library; this will get undef'ed by auto_link.hpp // once it's done with it: // #define BOOST_LIB_NAME boost_chrono // // If we're importing code from a dll, then tell auto_link.hpp about it: // #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CHRONO_DYN_LINK) # define BOOST_DYN_LINK #endif // // And include the header that does the work: // #include #endif // auto-linking disabled #endif // BOOST_CHRONO_HEADER_ONLY #endif // BOOST_CHRONO_CONFIG_HPP passenger-4.0.37/ext/boost/chrono/detail/000755 000765 000024 00000000000 12233035540 020674 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/chrono/duration.hpp000644 000765 000024 00000071611 12233035540 021776 0ustar00honglistaff000000 000000 // duration.hpp --------------------------------------------------------------// // Copyright 2008 Howard Hinnant // Copyright 2008 Beman Dawes // Copyright 2009-2011 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt /* This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype. Many thanks to Howard for making his code available under the Boost license. The original code was modified to conform to Boost conventions and to section 20.9 Time utilities [time] of the C++ committee's working paper N2798. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf. time2_demo contained this comment: Much thanks to Andrei Alexandrescu, Walter Brown, Peter Dimov, Jeff Garland, Terry Golubiewski, Daniel Krugler, Anthony Williams. */ #ifndef BOOST_CHRONO_DURATION_HPP #define BOOST_CHRONO_DURATION_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_CHRONO_USES_MPL_ASSERT) #define BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION "A duration representation can not be a duration" #define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO "Second template parameter of duration must be a boost::ratio" #define BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE "duration period must be positive" #define BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION "Second template parameter of time_point must be a boost::chrono::duration" #endif #ifndef BOOST_CHRONO_HEADER_ONLY // this must occur after all of the includes and before any code appears: #include // must be the last #include #endif //----------------------------------------------------------------------------// // // // 20.9 Time utilities [time] // // synopsis // // // //----------------------------------------------------------------------------// namespace boost { namespace chrono { template > class duration; namespace detail { template struct is_duration : boost::false_type {}; template struct is_duration > : boost::true_type {}; template ::value> struct duration_divide_result { }; template ::type>::value)) && ((boost::is_convertible::type>::value)) ) > struct duration_divide_imp { }; template struct duration_divide_imp, Rep2, true> { typedef duration::type, Period> type; }; template struct duration_divide_result, Rep2, false> : duration_divide_imp, Rep2> { }; /// template ::value> struct duration_divide_result2 { }; template ::type>::value)) && ((boost::is_convertible::type>::value)) ) > struct duration_divide_imp2 { }; template struct duration_divide_imp2, true> { //typedef typename common_type::type type; typedef double type; }; template struct duration_divide_result2, false> : duration_divide_imp2 > { }; /// template ::value> struct duration_modulo_result { }; template ::type>::value //&& boost::is_convertible::type>::value ) > struct duration_modulo_imp { }; template struct duration_modulo_imp, Rep2, true> { typedef duration::type, Period> type; }; template struct duration_modulo_result, Rep2, false> : duration_modulo_imp, Rep2> { }; } // namespace detail } // namespace chrono // common_type trait specializations template struct common_type, chrono::duration >; namespace chrono { // customization traits template struct treat_as_floating_point; template struct duration_values; // convenience typedefs typedef duration nanoseconds; // at least 64 bits needed typedef duration microseconds; // at least 55 bits needed typedef duration milliseconds; // at least 45 bits needed typedef duration seconds; // at least 35 bits needed typedef duration > minutes; // at least 29 bits needed typedef duration > hours; // at least 23 bits needed //----------------------------------------------------------------------------// // duration helpers // //----------------------------------------------------------------------------// namespace detail { // duration_cast // duration_cast is the heart of this whole prototype. It can convert any // duration to any other. It is also (implicitly) used in converting // time_points. The conversion is always exact if possible. And it is // always as efficient as hand written code. If different representations // are involved, care is taken to never require implicit conversions. // Instead static_cast is used explicitly for every required conversion. // If there are a mixture of integral and floating point representations, // the use of common_type ensures that the most logical "intermediate" // representation is used. template struct duration_cast_aux; // When the two periods are the same, all that is left to do is static_cast from // the source representation to the target representation (which may be a no-op). // This conversion is always exact as long as the static_cast from the source // representation to the destination representation is exact. template struct duration_cast_aux { BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const { return ToDuration(static_cast(fd.count())); } }; // When the numerator of FromPeriod / ToPeriod is 1, then all we need to do is // divide by the denominator of FromPeriod / ToPeriod. The common_type of // the two representations is used for the intermediate computation before // static_cast'ing to the destination. // This conversion is generally not exact because of the division (but could be // if you get lucky on the run time value of fd.count()). template struct duration_cast_aux { BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const { typedef typename common_type< typename ToDuration::rep, typename FromDuration::rep, boost::intmax_t>::type C; return ToDuration(static_cast( static_cast(fd.count()) / static_cast(Period::den))); } }; // When the denominator of FromPeriod / ToPeriod is 1, then all we need to do is // multiply by the numerator of FromPeriod / ToPeriod. The common_type of // the two representations is used for the intermediate computation before // static_cast'ing to the destination. // This conversion is always exact as long as the static_cast's involved are exact. template struct duration_cast_aux { BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const { typedef typename common_type< typename ToDuration::rep, typename FromDuration::rep, boost::intmax_t>::type C; return ToDuration(static_cast( static_cast(fd.count()) * static_cast(Period::num))); } }; // When neither the numerator or denominator of FromPeriod / ToPeriod is 1, then we need to // multiply by the numerator and divide by the denominator of FromPeriod / ToPeriod. The // common_type of the two representations is used for the intermediate computation before // static_cast'ing to the destination. // This conversion is generally not exact because of the division (but could be // if you get lucky on the run time value of fd.count()). template struct duration_cast_aux { BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const { typedef typename common_type< typename ToDuration::rep, typename FromDuration::rep, boost::intmax_t>::type C; return ToDuration(static_cast( static_cast(fd.count()) * static_cast(Period::num) / static_cast(Period::den))); } }; template struct duration_cast { typedef typename ratio_divide::type Period; typedef duration_cast_aux< FromDuration, ToDuration, Period, Period::num == 1, Period::den == 1 > Aux; BOOST_CONSTEXPR ToDuration operator()(const FromDuration& fd) const { return Aux()(fd); } }; } // namespace detail //----------------------------------------------------------------------------// // // // 20.9.2 Time-related traits [time.traits] // // // //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// // 20.9.2.1 treat_as_floating_point [time.traits.is_fp] // // Probably should have been treat_as_floating_point. Editor notifed. // //----------------------------------------------------------------------------// // Support bidirectional (non-exact) conversions for floating point rep types // (or user defined rep types which specialize treat_as_floating_point). template struct treat_as_floating_point : boost::is_floating_point {}; //----------------------------------------------------------------------------// // 20.9.2.2 duration_values [time.traits.duration_values] // //----------------------------------------------------------------------------// namespace detail { template ::value> struct chrono_numeric_limits { static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits::min) ();} }; template struct chrono_numeric_limits { static BOOST_CHRONO_LIB_CONSTEXPR T lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW {return (std::numeric_limits::min) ();} }; template <> struct chrono_numeric_limits { static BOOST_CHRONO_LIB_CONSTEXPR float lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW { return -(std::numeric_limits::max) (); } }; template <> struct chrono_numeric_limits { static BOOST_CHRONO_LIB_CONSTEXPR double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW { return -(std::numeric_limits::max) (); } }; template <> struct chrono_numeric_limits { static BOOST_CHRONO_LIB_CONSTEXPR long double lowest() BOOST_CHRONO_LIB_NOEXCEPT_OR_THROW { return -(std::numeric_limits::max)(); } }; template struct numeric_limits : chrono_numeric_limits::type> {}; } template struct duration_values { static BOOST_CONSTEXPR Rep zero() {return Rep(0);} static BOOST_CHRONO_LIB_CONSTEXPR Rep max BOOST_PREVENT_MACRO_SUBSTITUTION () { return (std::numeric_limits::max)(); } static BOOST_CHRONO_LIB_CONSTEXPR Rep min BOOST_PREVENT_MACRO_SUBSTITUTION () { return detail::numeric_limits::lowest(); } }; } // namespace chrono //----------------------------------------------------------------------------// // 20.9.2.3 Specializations of common_type [time.traits.specializations] // //----------------------------------------------------------------------------// template struct common_type, chrono::duration > { typedef chrono::duration::type, typename boost::ratio_gcd::type> type; }; //----------------------------------------------------------------------------// // // // 20.9.3 Class template duration [time.duration] // // // //----------------------------------------------------------------------------// namespace chrono { template class BOOST_SYMBOL_VISIBLE duration { //BOOST_CHRONO_STATIC_ASSERT(boost::is_integral::value, BOOST_CHRONO_A_DURATION_REPRESENTATION_MUST_BE_INTEGRAL, ()); BOOST_CHRONO_STATIC_ASSERT(!boost::chrono::detail::is_duration::value, BOOST_CHRONO_A_DURATION_REPRESENTATION_CAN_NOT_BE_A_DURATION, ()); BOOST_CHRONO_STATIC_ASSERT(boost::ratio_detail::is_ratio::value, BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_DURATION_MUST_BE_A_STD_RATIO, ()); BOOST_CHRONO_STATIC_ASSERT(Period::num>0, BOOST_CHRONO_DURATION_PERIOD_MUST_BE_POSITIVE, ()); public: typedef Rep rep; typedef Period period; private: rep rep_; public: BOOST_FORCEINLINE BOOST_CONSTEXPR duration() : rep_(duration_values::zero()) { } template BOOST_SYMBOL_VISIBLE BOOST_FORCEINLINE BOOST_CONSTEXPR explicit duration(const Rep2& r , typename boost::enable_if < mpl::and_ < boost::is_convertible, mpl::or_ < treat_as_floating_point, mpl::and_ < mpl::not_ < treat_as_floating_point >, mpl::not_ < treat_as_floating_point > > > > >::type* = 0 ) : rep_(r) { } //~duration() {} //= default; // BOOST_CONSTEXPR duration(const duration& rhs) : rep_(rhs.rep_) {} // = default; duration& operator=(const duration& rhs) // = default; { if (&rhs != this) rep_= rhs.rep_; return *this; } // conversions template BOOST_FORCEINLINE BOOST_CONSTEXPR duration(const duration& d , typename boost::enable_if < mpl::or_ < treat_as_floating_point, mpl::and_ < chrono_detail::is_evenly_divisible_by, mpl::not_ < treat_as_floating_point > > > >::type* = 0 ) : rep_(chrono::detail::duration_cast, duration>()(d).count()) {} // observer BOOST_CONSTEXPR rep count() const {return rep_;} // arithmetic BOOST_CONSTEXPR duration operator+() const {return duration(rep_);;} BOOST_CONSTEXPR duration operator-() const {return duration(-rep_);} duration& operator++() {++rep_; return *this;} duration operator++(int) {return duration(rep_++);} duration& operator--() {--rep_; return *this;} duration operator--(int) {return duration(rep_--);} duration& operator+=(const duration& d) { rep_ += d.count(); return *this; } duration& operator-=(const duration& d) { rep_ -= d.count(); return *this; } duration& operator*=(const rep& rhs) {rep_ *= rhs; return *this;} duration& operator/=(const rep& rhs) {rep_ /= rhs; return *this;} duration& operator%=(const rep& rhs) {rep_ %= rhs; return *this;} duration& operator%=(const duration& rhs) { rep_ %= rhs.count(); return *this; } // 20.9.3.4 duration special values [time.duration.special] static BOOST_CONSTEXPR duration zero() { return duration(duration_values::zero()); } static BOOST_CHRONO_LIB_CONSTEXPR duration min BOOST_PREVENT_MACRO_SUBSTITUTION () { return duration((duration_values::min)()); } static BOOST_CHRONO_LIB_CONSTEXPR duration max BOOST_PREVENT_MACRO_SUBSTITUTION () { return duration((duration_values::max)()); } }; //----------------------------------------------------------------------------// // 20.9.3.5 duration non-member arithmetic [time.duration.nonmember] // //----------------------------------------------------------------------------// // Duration + template inline BOOST_CONSTEXPR typename common_type, duration >::type operator+(const duration& lhs, const duration& rhs) { typedef typename common_type, duration >::type CD; return CD(CD(lhs).count()+CD(rhs).count()); } // Duration - template inline BOOST_CONSTEXPR typename common_type, duration >::type operator-(const duration& lhs, const duration& rhs) { typedef typename common_type, duration >::type CD; return CD(CD(lhs).count()-CD(rhs).count()); } // Duration * template inline BOOST_CONSTEXPR typename boost::enable_if < mpl::and_ < boost::is_convertible::type>, boost::is_convertible::type> >, duration::type, Period> >::type operator*(const duration& d, const Rep2& s) { typedef typename common_type::type CR; typedef duration CD; return CD(CD(d).count()*static_cast(s)); } template inline BOOST_CONSTEXPR typename boost::enable_if < mpl::and_ < boost::is_convertible::type>, boost::is_convertible::type> >, duration::type, Period> >::type operator*(const Rep1& s, const duration& d) { return d * s; } // Duration / template inline BOOST_CONSTEXPR typename boost::disable_if , typename boost::chrono::detail::duration_divide_result< duration, Rep2>::type >::type operator/(const duration& d, const Rep2& s) { typedef typename common_type::type CR; typedef duration CD; return CD(CD(d).count()/static_cast(s)); } template inline BOOST_CONSTEXPR typename common_type::type operator/(const duration& lhs, const duration& rhs) { typedef typename common_type, duration >::type CD; return CD(lhs).count() / CD(rhs).count(); } #ifdef BOOST_CHRONO_EXTENSIONS template inline BOOST_CONSTEXPR typename boost::disable_if , typename boost::chrono::detail::duration_divide_result2< Rep1, duration >::type >::type operator/(const Rep1& s, const duration& d) { typedef typename common_type::type CR; typedef duration CD; return static_cast(s)/CD(d).count(); } #endif // Duration % template inline BOOST_CONSTEXPR typename boost::disable_if , typename boost::chrono::detail::duration_modulo_result< duration, Rep2>::type >::type operator%(const duration& d, const Rep2& s) { typedef typename common_type::type CR; typedef duration CD; return CD(CD(d).count()%static_cast(s)); } template inline BOOST_CONSTEXPR typename common_type, duration >::type operator%(const duration& lhs, const duration& rhs) { typedef typename common_type, duration >::type CD; return CD(CD(lhs).count()%CD(rhs).count()); } //----------------------------------------------------------------------------// // 20.9.3.6 duration comparisons [time.duration.comparisons] // //----------------------------------------------------------------------------// namespace detail { template struct duration_eq { BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) const { typedef typename common_type::type CD; return CD(lhs).count() == CD(rhs).count(); } }; template struct duration_eq { BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) const { return lhs.count() == rhs.count(); } }; template struct duration_lt { BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const RhsDuration& rhs) const { typedef typename common_type::type CD; return CD(lhs).count() < CD(rhs).count(); } }; template struct duration_lt { BOOST_CONSTEXPR bool operator()(const LhsDuration& lhs, const LhsDuration& rhs) const { return lhs.count() < rhs.count(); } }; } // namespace detail // Duration == template inline BOOST_CONSTEXPR bool operator==(const duration& lhs, const duration& rhs) { return boost::chrono::detail::duration_eq< duration, duration >()(lhs, rhs); } // Duration != template inline BOOST_CONSTEXPR bool operator!=(const duration& lhs, const duration& rhs) { return !(lhs == rhs); } // Duration < template inline BOOST_CONSTEXPR bool operator< (const duration& lhs, const duration& rhs) { return boost::chrono::detail::duration_lt< duration, duration >()(lhs, rhs); } // Duration > template inline BOOST_CONSTEXPR bool operator> (const duration& lhs, const duration& rhs) { return rhs < lhs; } // Duration <= template inline BOOST_CONSTEXPR bool operator<=(const duration& lhs, const duration& rhs) { return !(rhs < lhs); } // Duration >= template inline BOOST_CONSTEXPR bool operator>=(const duration& lhs, const duration& rhs) { return !(lhs < rhs); } //----------------------------------------------------------------------------// // 20.9.3.7 duration_cast [time.duration.cast] // //----------------------------------------------------------------------------// // Compile-time select the most efficient algorithm for the conversion... template inline BOOST_CONSTEXPR typename boost::enable_if < boost::chrono::detail::is_duration, ToDuration>::type duration_cast(const duration& fd) { return boost::chrono::detail::duration_cast< duration, ToDuration>()(fd); } } // namespace chrono } // namespace boost #ifndef BOOST_CHRONO_HEADER_ONLY // the suffix header occurs after all of our code: #include // pops abi_prefix.hpp pragmas #endif #endif // BOOST_CHRONO_DURATION_HPP passenger-4.0.37/ext/boost/chrono/system_clocks.hpp000644 000765 000024 00000021041 12233035540 023023 0ustar00honglistaff000000 000000 // boost/chrono/system_clocks.hpp --------------------------------------------------------------// // Copyright 2008 Howard Hinnant // Copyright 2008 Beman Dawes // Copyright 2009-2011 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt /* This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype. Many thanks to Howard for making his code available under the Boost license. The original code was modified to conform to Boost conventions and to section 20.9 Time utilities [time] of the C++ committee's working paper N2798. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf. time2_demo contained this comment: Much thanks to Andrei Alexandrescu, Walter Brown, Peter Dimov, Jeff Garland, Terry Golubiewski, Daniel Krugler, Anthony Williams. */ /* TODO: * Fully implement error handling, with test cases. * Consider issues raised by Michael Marcin: > In the past I've seen QueryPerformanceCounter give incorrect results, > especially with SpeedStep processors on laptops. This was many years ago and > might have been fixed by service packs and drivers. > > Typically you check the results of QPC against GetTickCount to see if the > results are reasonable. > http://support.microsoft.com/kb/274323 > > I've also heard of problems with QueryPerformanceCounter in multi-processor > systems. > > I know some people SetThreadAffinityMask to 1 for the current thread call > their QueryPerformance* functions then restore SetThreadAffinityMask. This > seems horrible to me because it forces your program to jump to another > physical processor if it isn't already on cpu0 but they claim it worked well > in practice because they called the timing functions infrequently. > > In the past I have chosen to use timeGetTime with timeBeginPeriod(1) for > high resolution timers to avoid these issues. */ #ifndef BOOST_CHRONO_SYSTEM_CLOCKS_HPP #define BOOST_CHRONO_SYSTEM_CLOCKS_HPP #include #include #include #include #include #include # if defined( BOOST_CHRONO_POSIX_API ) # if ! defined(CLOCK_REALTIME) && ! defined (__hpux__) # error does not supply CLOCK_REALTIME # endif # endif #ifdef BOOST_CHRONO_WINDOWS_API // The system_clock tick is 100 nanoseconds # define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::duration > #else # define BOOST_SYSTEM_CLOCK_DURATION boost::chrono::nanoseconds #endif // this must occur after all of the includes and before any code appears: #ifndef BOOST_CHRONO_HEADER_ONLY #include // must be the last #include #endif //----------------------------------------------------------------------------// // // // 20.9 Time utilities [time] // // synopsis // // // //----------------------------------------------------------------------------// namespace boost { namespace chrono { // Clocks class BOOST_CHRONO_DECL system_clock; #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY class BOOST_CHRONO_DECL steady_clock; #endif #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY typedef steady_clock high_resolution_clock; // as permitted by [time.clock.hires] #else typedef system_clock high_resolution_clock; // as permitted by [time.clock.hires] #endif //----------------------------------------------------------------------------// // // // 20.9.5 Clocks [time.clock] // // // //----------------------------------------------------------------------------// // If you're porting, clocks are the system-specific (non-portable) part. // You'll need to know how to get the current time and implement that under now(). // You'll need to know what units (tick period) and representation makes the most // sense for your clock and set those accordingly. // If you know how to map this clock to time_t (perhaps your clock is std::time, which // makes that trivial), then you can fill out system_clock's to_time_t() and from_time_t(). //----------------------------------------------------------------------------// // 20.9.5.1 Class system_clock [time.clock.system] // //----------------------------------------------------------------------------// class BOOST_CHRONO_DECL system_clock { public: typedef BOOST_SYSTEM_CLOCK_DURATION duration; typedef duration::rep rep; typedef duration::period period; typedef chrono::time_point time_point; BOOST_STATIC_CONSTEXPR bool is_steady = false; static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT; #if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING static BOOST_CHRONO_INLINE time_point now(system::error_code & ec); #endif static BOOST_CHRONO_INLINE std::time_t to_time_t(const time_point& t) BOOST_NOEXCEPT; static BOOST_CHRONO_INLINE time_point from_time_t(std::time_t t) BOOST_NOEXCEPT; }; //----------------------------------------------------------------------------// // 20.9.5.2 Class steady_clock [time.clock.steady] // //----------------------------------------------------------------------------// // As permitted by [time.clock.steady] // The class steady_clock is conditionally supported. #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY class BOOST_CHRONO_DECL steady_clock { public: typedef nanoseconds duration; typedef duration::rep rep; typedef duration::period period; typedef chrono::time_point time_point; BOOST_STATIC_CONSTEXPR bool is_steady = true; static BOOST_CHRONO_INLINE time_point now() BOOST_NOEXCEPT; #if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING static BOOST_CHRONO_INLINE time_point now(system::error_code & ec); #endif }; #endif //----------------------------------------------------------------------------// // 20.9.5.3 Class high_resolution_clock [time.clock.hires] // //----------------------------------------------------------------------------// // As permitted, steady_clock or system_clock is a typedef for high_resolution_clock. // See synopsis. template struct clock_string { static std::basic_string name() { static const CharT u[] = { 's', 'y', 's', 't', 'e', 'm', '_', 'c', 'l', 'o', 'c', 'k' }; static const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); return str; } static std::basic_string since() { static const CharT u[] = { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'J', 'a', 'n', ' ', '1', ',', ' ', '1', '9', '7', '0' }; static const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); return str; } }; #ifdef BOOST_CHRONO_HAS_CLOCK_STEADY template struct clock_string { static std::basic_string name() { static const CharT u[] = { 's', 't', 'e', 'a', 'd', 'y', '_', 'c', 'l', 'o', 'c', 'k' }; static const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); return str; } static std::basic_string since() { const CharT u[] = { ' ', 's', 'i', 'n', 'c', 'e', ' ', 'b', 'o', 'o', 't' }; const std::basic_string str(u, u + sizeof(u) / sizeof(u[0])); return str; } }; #endif } // namespace chrono } // namespace boost #ifndef BOOST_CHRONO_HEADER_ONLY // the suffix header occurs after all of our code: #include // pops abi_prefix.hpp pragmas #else #include #endif #endif // BOOST_CHRONO_SYSTEM_CLOCKS_HPP passenger-4.0.37/ext/boost/chrono/time_point.hpp000644 000765 000024 00000031411 12233035540 022312 0ustar00honglistaff000000 000000 // duration.hpp --------------------------------------------------------------// // Copyright 2008 Howard Hinnant // Copyright 2008 Beman Dawes // Copyright 2009-2012 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt /* This code was derived by Beman Dawes from Howard Hinnant's time2_demo prototype. Many thanks to Howard for making his code available under the Boost license. The original code was modified to conform to Boost conventions and to section 20.9 Time utilities [time] of the C++ committee's working paper N2798. See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2798.pdf. time2_demo contained this comment: Much thanks to Andrei Alexandrescu, Walter Brown, Peter Dimov, Jeff Garland, Terry Golubiewski, Daniel Krugler, Anthony Williams. */ #ifndef BOOST_CHRONO_TIME_POINT_HPP #define BOOST_CHRONO_TIME_POINT_HPP #include #include #ifndef BOOST_CHRONO_HEADER_ONLY // this must occur after all of the includes and before any code appears: #include // must be the last #include #endif //----------------------------------------------------------------------------// // // // 20.9 Time utilities [time] // // synopsis // // // //----------------------------------------------------------------------------// namespace boost { namespace chrono { template class time_point; } // namespace chrono // common_type trait specializations template struct common_type, chrono::time_point >; //----------------------------------------------------------------------------// // 20.9.2.3 Specializations of common_type [time.traits.specializations] // //----------------------------------------------------------------------------// template struct common_type, chrono::time_point > { typedef chrono::time_point::type> type; }; namespace chrono { // time_point arithmetic template inline BOOST_CONSTEXPR time_point >::type> operator+( const time_point& lhs, const duration& rhs); template inline BOOST_CONSTEXPR time_point, Duration2>::type> operator+( const duration& lhs, const time_point& rhs); template inline BOOST_CONSTEXPR time_point >::type> operator-( const time_point& lhs, const duration& rhs); template inline BOOST_CONSTEXPR typename common_type::type operator-( const time_point& lhs, const time_point& rhs); // time_point comparisons template inline BOOST_CONSTEXPR bool operator==( const time_point& lhs, const time_point& rhs); template inline BOOST_CONSTEXPR bool operator!=( const time_point& lhs, const time_point& rhs); template inline BOOST_CONSTEXPR bool operator< ( const time_point& lhs, const time_point& rhs); template inline BOOST_CONSTEXPR bool operator<=( const time_point& lhs, const time_point& rhs); template inline BOOST_CONSTEXPR bool operator> ( const time_point& lhs, const time_point& rhs); template inline BOOST_CONSTEXPR bool operator>=( const time_point& lhs, const time_point& rhs); // time_point_cast template inline BOOST_CONSTEXPR time_point time_point_cast(const time_point& t); //----------------------------------------------------------------------------// // // // 20.9.4 Class template time_point [time.point] // // // //----------------------------------------------------------------------------// template class time_point { BOOST_CHRONO_STATIC_ASSERT(boost::chrono::detail::is_duration::value, BOOST_CHRONO_SECOND_TEMPLATE_PARAMETER_OF_TIME_POINT_MUST_BE_A_BOOST_CHRONO_DURATION, (Duration)); public: typedef Clock clock; typedef Duration duration; typedef typename duration::rep rep; typedef typename duration::period period; typedef Duration difference_type; private: duration d_; public: BOOST_FORCEINLINE BOOST_CONSTEXPR time_point() : d_(duration::zero()) {} BOOST_FORCEINLINE BOOST_CONSTEXPR explicit time_point(const duration& d) : d_(d) {} // conversions template BOOST_FORCEINLINE BOOST_CONSTEXPR time_point(const time_point& t , typename boost::enable_if < boost::is_convertible >::type* = 0 ) : d_(t.time_since_epoch()) { } // observer BOOST_CONSTEXPR duration time_since_epoch() const { return d_; } // arithmetic #ifdef BOOST_CHRONO_EXTENSIONS BOOST_CONSTEXPR time_point operator+() const {return *this;} BOOST_CONSTEXPR time_point operator-() const {return time_point(-d_);} time_point& operator++() {++d_; return *this;} time_point operator++(int) {return time_point(d_++);} time_point& operator--() {--d_; return *this;} time_point operator--(int) {return time_point(d_--);} time_point& operator+=(const rep& r) {d_ += duration(r); return *this;} time_point& operator-=(const rep& r) {d_ -= duration(r); return *this;} #endif time_point& operator+=(const duration& d) {d_ += d; return *this;} time_point& operator-=(const duration& d) {d_ -= d; return *this;} // special values static BOOST_CHRONO_LIB_CONSTEXPR time_point min BOOST_PREVENT_MACRO_SUBSTITUTION () { return time_point((duration::min)()); } static BOOST_CHRONO_LIB_CONSTEXPR time_point max BOOST_PREVENT_MACRO_SUBSTITUTION () { return time_point((duration::max)()); } }; //----------------------------------------------------------------------------// // 20.9.4.5 time_point non-member arithmetic [time.point.nonmember] // //----------------------------------------------------------------------------// // time_point operator+(time_point x, duration y); template inline BOOST_CONSTEXPR time_point >::type> operator+(const time_point& lhs, const duration& rhs) { typedef typename common_type >::type CDuration; typedef time_point< Clock, CDuration > TimeResult; return TimeResult(lhs.time_since_epoch() + CDuration(rhs)); } // time_point operator+(duration x, time_point y); template inline BOOST_CONSTEXPR time_point, Duration2>::type> operator+(const duration& lhs, const time_point& rhs) { return rhs + lhs; } // time_point operator-(time_point x, duration y); template inline BOOST_CONSTEXPR time_point >::type> operator-(const time_point& lhs, const duration& rhs) { return lhs + (-rhs); } // duration operator-(time_point x, time_point y); template inline BOOST_CONSTEXPR typename common_type::type operator-(const time_point& lhs, const time_point& rhs) { return lhs.time_since_epoch() - rhs.time_since_epoch(); } //----------------------------------------------------------------------------// // 20.9.4.6 time_point comparisons [time.point.comparisons] // //----------------------------------------------------------------------------// // time_point == template inline BOOST_CONSTEXPR bool operator==(const time_point& lhs, const time_point& rhs) { return lhs.time_since_epoch() == rhs.time_since_epoch(); } // time_point != template inline BOOST_CONSTEXPR bool operator!=(const time_point& lhs, const time_point& rhs) { return !(lhs == rhs); } // time_point < template inline BOOST_CONSTEXPR bool operator<(const time_point& lhs, const time_point& rhs) { return lhs.time_since_epoch() < rhs.time_since_epoch(); } // time_point > template inline BOOST_CONSTEXPR bool operator>(const time_point& lhs, const time_point& rhs) { return rhs < lhs; } // time_point <= template inline BOOST_CONSTEXPR bool operator<=(const time_point& lhs, const time_point& rhs) { return !(rhs < lhs); } // time_point >= template inline BOOST_CONSTEXPR bool operator>=(const time_point& lhs, const time_point& rhs) { return !(lhs < rhs); } //----------------------------------------------------------------------------// // 20.9.4.7 time_point_cast [time.point.cast] // //----------------------------------------------------------------------------// template inline BOOST_CONSTEXPR time_point time_point_cast(const time_point& t) { return time_point( duration_cast(t.time_since_epoch())); } } // namespace chrono } // namespace boost #ifndef BOOST_CHRONO_HEADER_ONLY // the suffix header occurs after all of our code: #include // pops abi_prefix.hpp pragmas #endif #endif // BOOST_CHRONO_TIME_POINT_HPP passenger-4.0.37/ext/boost/chrono/detail/is_evenly_divisible_by.hpp000644 000765 000024 00000001700 12233035540 026124 0ustar00honglistaff000000 000000 // is_evenly_divisible_by.hpp --------------------------------------------------------------// // Copyright 2009-2010 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP #define BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP #include #include #include namespace boost { namespace chrono { namespace chrono_detail { // template // struct is_evenly_divisible_by : public boost::mpl::bool_ < ratio_divide::type::den == 1 > // {}; template struct is_evenly_divisible_by : public boost::ratio_detail::is_evenly_divisible_by {}; } // namespace chrono_detail } // namespace detail } // namespace chrono #endif // BOOST_CHRONO_DETAIL_IS_EVENLY_DIVISIBLE_BY_HPP passenger-4.0.37/ext/boost/chrono/detail/static_assert.hpp000644 000765 000024 00000002263 12233035540 024260 0ustar00honglistaff000000 000000 // static_assert.hpp --------------------------------------------------------------// // Copyright 2009-2010 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP #define BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP #include #ifndef BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG) #elif defined(BOOST_CHRONO_USES_STATIC_ASSERT) #include #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND) #elif defined(BOOST_CHRONO_USES_MPL_ASSERT) #include #include #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) \ BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES) #else //~ #elif defined(BOOST_CHRONO_USES_ARRAY_ASSERT) #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_JOIN(boost_chrono_test_,__LINE__)[(CND)?1:-1] //~ #define BOOST_CHRONO_STATIC_ASSERT(CND, MSG, TYPES) #endif #endif // BOOST_CHRONO_DETAIL_STATIC_ASSERT_HPP passenger-4.0.37/ext/boost/chrono/detail/system.hpp000644 000765 000024 00000001553 12233035540 022735 0ustar00honglistaff000000 000000 // Copyright 2009-2010 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_CHRONO_DETAIL_SYSTEM_HPP #define BOOST_CHRONO_DETAIL_SYSTEM_HPP #if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING #include #include #if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44) #define BOOST_CHRONO_SYSTEM_CATEGORY boost::system::system_category #else #define BOOST_CHRONO_SYSTEM_CATEGORY boost::system::system_category() #endif #ifdef BOOST_SYSTEM_NO_DEPRECATED #define BOOST_CHRONO_THROWS boost::throws() #define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::throws()) #else #define BOOST_CHRONO_THROWS boost::system::throws #define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::system::throws) #endif #endif #endif passenger-4.0.37/ext/boost/bind/arg.hpp000644 000765 000024 00000002332 12233035540 020340 0ustar00honglistaff000000 000000 #ifndef BOOST_BIND_ARG_HPP_INCLUDED #define BOOST_BIND_ARG_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // bind/arg.hpp // // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/bind/bind.html for documentation. // #include #include namespace boost { template< int I > struct arg { arg() { } template< class T > arg( T const & /* t */ ) { // static assert I == is_placeholder::value typedef char T_must_be_placeholder[ I == is_placeholder::value? 1: -1 ]; } }; template< int I > bool operator==( arg const &, arg const & ) { return true; } #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template< int I > struct is_placeholder< arg > { enum _vt { value = I }; }; template< int I > struct is_placeholder< arg (*) () > { enum _vt { value = I }; }; #endif } // namespace boost #endif // #ifndef BOOST_BIND_ARG_HPP_INCLUDED passenger-4.0.37/ext/boost/bind/bind.hpp000644 000765 000024 00000160135 12233035540 020511 0ustar00honglistaff000000 000000 #ifndef BOOST_BIND_BIND_HPP_INCLUDED #define BOOST_BIND_BIND_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // bind.hpp - binds function objects to arguments // // Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd. // Copyright (c) 2001 David Abrahams // Copyright (c) 2005 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/bind/bind.html for documentation. // #include #include #include #include #include #include #include #include // Borland-specific bug, visit_each() silently fails to produce code #if defined(__BORLANDC__) # define BOOST_BIND_VISIT_EACH boost::visit_each #else # define BOOST_BIND_VISIT_EACH visit_each #endif #include #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4512) // assignment operator could not be generated #endif namespace boost { template class weak_ptr; namespace _bi // implementation details { // result_traits template struct result_traits { typedef R type; }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) struct unspecified {}; template struct result_traits { typedef typename F::result_type type; }; template struct result_traits< unspecified, reference_wrapper > { typedef typename F::result_type type; }; #endif // ref_compare template bool ref_compare( T const & a, T const & b, long ) { return a == b; } template bool ref_compare( arg const &, arg const &, int ) { return true; } template bool ref_compare( arg (*) (), arg (*) (), int ) { return true; } template bool ref_compare( reference_wrapper const & a, reference_wrapper const & b, int ) { return a.get_pointer() == b.get_pointer(); } // bind_t forward declaration for listN template class bind_t; template bool ref_compare( bind_t const & a, bind_t const & b, int ) { return a.compare( b ); } // value template class value { public: value(T const & t): t_(t) {} T & get() { return t_; } T const & get() const { return t_; } bool operator==(value const & rhs) const { return t_ == rhs.t_; } private: T t_; }; // ref_compare for weak_ptr template bool ref_compare( value< weak_ptr > const & a, value< weak_ptr > const & b, int ) { return !(a.get() < b.get()) && !(b.get() < a.get()); } // type template class type {}; // unwrap template struct unwrapper { static inline F & unwrap( F & f, long ) { return f; } template static inline F2 & unwrap( reference_wrapper rf, int ) { return rf.get(); } template static inline _mfi::dm unwrap( R T::* pm, int ) { return _mfi::dm( pm ); } }; // listN class list0 { public: list0() {} template T & operator[] (_bi::value & v) const { return v.get(); } template T const & operator[] (_bi::value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F & f, A &, long) { return unwrapper::unwrap(f, 0)(); } template R operator()(type, F const & f, A &, long) const { return unwrapper::unwrap(f, 0)(); } template void operator()(type, F & f, A &, int) { unwrapper::unwrap(f, 0)(); } template void operator()(type, F const & f, A &, int) const { unwrapper::unwrap(f, 0)(); } template void accept(V &) const { } bool operator==(list0 const &) const { return true; } }; #ifdef BOOST_MSVC // MSVC is bright enough to realise that the parameter rhs // in operator==may be unused for some template argument types: #pragma warning(push) #pragma warning(disable:4100) #endif template< class A1 > class list1: private storage1< A1 > { private: typedef storage1< A1 > base_type; public: explicit list1( A1 a1 ): base_type( a1 ) {} A1 operator[] (boost::arg<1>) const { return base_type::a1_; } A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } template T & operator[] ( _bi::value & v ) const { return v.get(); } template T const & operator[] ( _bi::value const & v ) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F & f, A & a, long) { return unwrapper::unwrap(f, 0)(a[base_type::a1_]); } template R operator()(type, F const & f, A & a, long) const { return unwrapper::unwrap(f, 0)(a[base_type::a1_]); } template void operator()(type, F & f, A & a, int) { unwrapper::unwrap(f, 0)(a[base_type::a1_]); } template void operator()(type, F const & f, A & a, int) const { unwrapper::unwrap(f, 0)(a[base_type::a1_]); } template void accept(V & v) const { base_type::accept(v); } bool operator==(list1 const & rhs) const { return ref_compare(base_type::a1_, rhs.a1_, 0); } }; struct logical_and; struct logical_or; template< class A1, class A2 > class list2: private storage2< A1, A2 > { private: typedef storage2< A1, A2 > base_type; public: list2( A1 a1, A2 a2 ): base_type( a1, a2 ) {} A1 operator[] (boost::arg<1>) const { return base_type::a1_; } A2 operator[] (boost::arg<2>) const { return base_type::a2_; } A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } template T & operator[] (_bi::value & v) const { return v.get(); } template T const & operator[] (_bi::value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F & f, A & a, long) { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); } template R operator()(type, F const & f, A & a, long) const { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); } template void operator()(type, F & f, A & a, int) { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); } template void operator()(type, F const & f, A & a, int) const { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); } template bool operator()( type, logical_and & /*f*/, A & a, int ) { return a[ base_type::a1_ ] && a[ base_type::a2_ ]; } template bool operator()( type, logical_and const & /*f*/, A & a, int ) const { return a[ base_type::a1_ ] && a[ base_type::a2_ ]; } template bool operator()( type, logical_or & /*f*/, A & a, int ) { return a[ base_type::a1_ ] || a[ base_type::a2_ ]; } template bool operator()( type, logical_or const & /*f*/, A & a, int ) const { return a[ base_type::a1_ ] || a[ base_type::a2_ ]; } template void accept(V & v) const { base_type::accept(v); } bool operator==(list2 const & rhs) const { return ref_compare(base_type::a1_, rhs.a1_, 0) && ref_compare(base_type::a2_, rhs.a2_, 0); } }; template< class A1, class A2, class A3 > class list3: private storage3< A1, A2, A3 > { private: typedef storage3< A1, A2, A3 > base_type; public: list3( A1 a1, A2 a2, A3 a3 ): base_type( a1, a2, a3 ) {} A1 operator[] (boost::arg<1>) const { return base_type::a1_; } A2 operator[] (boost::arg<2>) const { return base_type::a2_; } A3 operator[] (boost::arg<3>) const { return base_type::a3_; } A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } template T & operator[] (_bi::value & v) const { return v.get(); } template T const & operator[] (_bi::value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F & f, A & a, long) { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); } template R operator()(type, F const & f, A & a, long) const { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); } template void operator()(type, F & f, A & a, int) { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); } template void operator()(type, F const & f, A & a, int) const { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); } template void accept(V & v) const { base_type::accept(v); } bool operator==(list3 const & rhs) const { return ref_compare( base_type::a1_, rhs.a1_, 0 ) && ref_compare( base_type::a2_, rhs.a2_, 0 ) && ref_compare( base_type::a3_, rhs.a3_, 0 ); } }; template< class A1, class A2, class A3, class A4 > class list4: private storage4< A1, A2, A3, A4 > { private: typedef storage4< A1, A2, A3, A4 > base_type; public: list4( A1 a1, A2 a2, A3 a3, A4 a4 ): base_type( a1, a2, a3, a4 ) {} A1 operator[] (boost::arg<1>) const { return base_type::a1_; } A2 operator[] (boost::arg<2>) const { return base_type::a2_; } A3 operator[] (boost::arg<3>) const { return base_type::a3_; } A4 operator[] (boost::arg<4>) const { return base_type::a4_; } A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } template T & operator[] (_bi::value & v) const { return v.get(); } template T const & operator[] (_bi::value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F & f, A & a, long) { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); } template R operator()(type, F const & f, A & a, long) const { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); } template void operator()(type, F & f, A & a, int) { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); } template void operator()(type, F const & f, A & a, int) const { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); } template void accept(V & v) const { base_type::accept(v); } bool operator==(list4 const & rhs) const { return ref_compare( base_type::a1_, rhs.a1_, 0 ) && ref_compare( base_type::a2_, rhs.a2_, 0 ) && ref_compare( base_type::a3_, rhs.a3_, 0 ) && ref_compare( base_type::a4_, rhs.a4_, 0 ); } }; template< class A1, class A2, class A3, class A4, class A5 > class list5: private storage5< A1, A2, A3, A4, A5 > { private: typedef storage5< A1, A2, A3, A4, A5 > base_type; public: list5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): base_type( a1, a2, a3, a4, a5 ) {} A1 operator[] (boost::arg<1>) const { return base_type::a1_; } A2 operator[] (boost::arg<2>) const { return base_type::a2_; } A3 operator[] (boost::arg<3>) const { return base_type::a3_; } A4 operator[] (boost::arg<4>) const { return base_type::a4_; } A5 operator[] (boost::arg<5>) const { return base_type::a5_; } A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } template T & operator[] (_bi::value & v) const { return v.get(); } template T const & operator[] (_bi::value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F & f, A & a, long) { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); } template R operator()(type, F const & f, A & a, long) const { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); } template void operator()(type, F & f, A & a, int) { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); } template void operator()(type, F const & f, A & a, int) const { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); } template void accept(V & v) const { base_type::accept(v); } bool operator==(list5 const & rhs) const { return ref_compare( base_type::a1_, rhs.a1_, 0 ) && ref_compare( base_type::a2_, rhs.a2_, 0 ) && ref_compare( base_type::a3_, rhs.a3_, 0 ) && ref_compare( base_type::a4_, rhs.a4_, 0 ) && ref_compare( base_type::a5_, rhs.a5_, 0 ); } }; template class list6: private storage6< A1, A2, A3, A4, A5, A6 > { private: typedef storage6< A1, A2, A3, A4, A5, A6 > base_type; public: list6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): base_type( a1, a2, a3, a4, a5, a6 ) {} A1 operator[] (boost::arg<1>) const { return base_type::a1_; } A2 operator[] (boost::arg<2>) const { return base_type::a2_; } A3 operator[] (boost::arg<3>) const { return base_type::a3_; } A4 operator[] (boost::arg<4>) const { return base_type::a4_; } A5 operator[] (boost::arg<5>) const { return base_type::a5_; } A6 operator[] (boost::arg<6>) const { return base_type::a6_; } A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } template T & operator[] (_bi::value & v) const { return v.get(); } template T const & operator[] (_bi::value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F & f, A & a, long) { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); } template R operator()(type, F const & f, A & a, long) const { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); } template void operator()(type, F & f, A & a, int) { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); } template void operator()(type, F const & f, A & a, int) const { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); } template void accept(V & v) const { base_type::accept(v); } bool operator==(list6 const & rhs) const { return ref_compare( base_type::a1_, rhs.a1_, 0 ) && ref_compare( base_type::a2_, rhs.a2_, 0 ) && ref_compare( base_type::a3_, rhs.a3_, 0 ) && ref_compare( base_type::a4_, rhs.a4_, 0 ) && ref_compare( base_type::a5_, rhs.a5_, 0 ) && ref_compare( base_type::a6_, rhs.a6_, 0 ); } }; template class list7: private storage7< A1, A2, A3, A4, A5, A6, A7 > { private: typedef storage7< A1, A2, A3, A4, A5, A6, A7 > base_type; public: list7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): base_type( a1, a2, a3, a4, a5, a6, a7 ) {} A1 operator[] (boost::arg<1>) const { return base_type::a1_; } A2 operator[] (boost::arg<2>) const { return base_type::a2_; } A3 operator[] (boost::arg<3>) const { return base_type::a3_; } A4 operator[] (boost::arg<4>) const { return base_type::a4_; } A5 operator[] (boost::arg<5>) const { return base_type::a5_; } A6 operator[] (boost::arg<6>) const { return base_type::a6_; } A7 operator[] (boost::arg<7>) const { return base_type::a7_; } A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } template T & operator[] (_bi::value & v) const { return v.get(); } template T const & operator[] (_bi::value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F & f, A & a, long) { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); } template R operator()(type, F const & f, A & a, long) const { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); } template void operator()(type, F & f, A & a, int) { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); } template void operator()(type, F const & f, A & a, int) const { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); } template void accept(V & v) const { base_type::accept(v); } bool operator==(list7 const & rhs) const { return ref_compare( base_type::a1_, rhs.a1_, 0 ) && ref_compare( base_type::a2_, rhs.a2_, 0 ) && ref_compare( base_type::a3_, rhs.a3_, 0 ) && ref_compare( base_type::a4_, rhs.a4_, 0 ) && ref_compare( base_type::a5_, rhs.a5_, 0 ) && ref_compare( base_type::a6_, rhs.a6_, 0 ) && ref_compare( base_type::a7_, rhs.a7_, 0 ); } }; template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class list8: private storage8< A1, A2, A3, A4, A5, A6, A7, A8 > { private: typedef storage8< A1, A2, A3, A4, A5, A6, A7, A8 > base_type; public: list8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8 ) {} A1 operator[] (boost::arg<1>) const { return base_type::a1_; } A2 operator[] (boost::arg<2>) const { return base_type::a2_; } A3 operator[] (boost::arg<3>) const { return base_type::a3_; } A4 operator[] (boost::arg<4>) const { return base_type::a4_; } A5 operator[] (boost::arg<5>) const { return base_type::a5_; } A6 operator[] (boost::arg<6>) const { return base_type::a6_; } A7 operator[] (boost::arg<7>) const { return base_type::a7_; } A8 operator[] (boost::arg<8>) const { return base_type::a8_; } A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } template T & operator[] (_bi::value & v) const { return v.get(); } template T const & operator[] (_bi::value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F & f, A & a, long) { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); } template R operator()(type, F const & f, A & a, long) const { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); } template void operator()(type, F & f, A & a, int) { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); } template void operator()(type, F const & f, A & a, int) const { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); } template void accept(V & v) const { base_type::accept(v); } bool operator==(list8 const & rhs) const { return ref_compare( base_type::a1_, rhs.a1_, 0 ) && ref_compare( base_type::a2_, rhs.a2_, 0 ) && ref_compare( base_type::a3_, rhs.a3_, 0 ) && ref_compare( base_type::a4_, rhs.a4_, 0 ) && ref_compare( base_type::a5_, rhs.a5_, 0 ) && ref_compare( base_type::a6_, rhs.a6_, 0 ) && ref_compare( base_type::a7_, rhs.a7_, 0 ) && ref_compare( base_type::a8_, rhs.a8_, 0 ); } }; template class list9: private storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > { private: typedef storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > base_type; public: list9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) {} A1 operator[] (boost::arg<1>) const { return base_type::a1_; } A2 operator[] (boost::arg<2>) const { return base_type::a2_; } A3 operator[] (boost::arg<3>) const { return base_type::a3_; } A4 operator[] (boost::arg<4>) const { return base_type::a4_; } A5 operator[] (boost::arg<5>) const { return base_type::a5_; } A6 operator[] (boost::arg<6>) const { return base_type::a6_; } A7 operator[] (boost::arg<7>) const { return base_type::a7_; } A8 operator[] (boost::arg<8>) const { return base_type::a8_; } A9 operator[] (boost::arg<9>) const { return base_type::a9_; } A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } A9 operator[] (boost::arg<9> (*) ()) const { return base_type::a9_; } template T & operator[] (_bi::value & v) const { return v.get(); } template T const & operator[] (_bi::value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F & f, A & a, long) { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); } template R operator()(type, F const & f, A & a, long) const { return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); } template void operator()(type, F & f, A & a, int) { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); } template void operator()(type, F const & f, A & a, int) const { unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); } template void accept(V & v) const { base_type::accept(v); } bool operator==(list9 const & rhs) const { return ref_compare( base_type::a1_, rhs.a1_, 0 ) && ref_compare( base_type::a2_, rhs.a2_, 0 ) && ref_compare( base_type::a3_, rhs.a3_, 0 ) && ref_compare( base_type::a4_, rhs.a4_, 0 ) && ref_compare( base_type::a5_, rhs.a5_, 0 ) && ref_compare( base_type::a6_, rhs.a6_, 0 ) && ref_compare( base_type::a7_, rhs.a7_, 0 ) && ref_compare( base_type::a8_, rhs.a8_, 0 ) && ref_compare( base_type::a9_, rhs.a9_, 0 ); } }; #ifdef BOOST_MSVC #pragma warning(pop) #endif // bind_t #ifndef BOOST_NO_VOID_RETURNS template class bind_t { public: typedef bind_t this_type; bind_t(F f, L const & l): f_(f), l_(l) {} #define BOOST_BIND_RETURN return #include #undef BOOST_BIND_RETURN }; #else template struct bind_t_generator { template class implementation { public: typedef implementation this_type; implementation(F f, L const & l): f_(f), l_(l) {} #define BOOST_BIND_RETURN return #include #undef BOOST_BIND_RETURN }; }; template<> struct bind_t_generator { template class implementation { private: typedef void R; public: typedef implementation this_type; implementation(F f, L const & l): f_(f), l_(l) {} #define BOOST_BIND_RETURN #include #undef BOOST_BIND_RETURN }; }; template class bind_t: public bind_t_generator::BOOST_NESTED_TEMPLATE implementation { public: bind_t(F f, L const & l): bind_t_generator::BOOST_NESTED_TEMPLATE implementation(f, l) {} }; #endif // function_equal #ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP // put overloads in _bi, rely on ADL # ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template bool function_equal( bind_t const & a, bind_t const & b ) { return a.compare(b); } # else template bool function_equal_impl( bind_t const & a, bind_t const & b, int ) { return a.compare(b); } # endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING #else // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP // put overloads in boost } // namespace _bi # ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING template bool function_equal( _bi::bind_t const & a, _bi::bind_t const & b ) { return a.compare(b); } # else template bool function_equal_impl( _bi::bind_t const & a, _bi::bind_t const & b, int ) { return a.compare(b); } # endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING namespace _bi { #endif // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP // add_value #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || (__SUNPRO_CC >= 0x530) #if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x582) ) template struct add_value { typedef _bi::value type; }; #else template< class T, int I > struct add_value_2 { typedef boost::arg type; }; template< class T > struct add_value_2< T, 0 > { typedef _bi::value< T > type; }; template struct add_value { typedef typename add_value_2< T, boost::is_placeholder< T >::value >::type type; }; #endif template struct add_value< value > { typedef _bi::value type; }; template struct add_value< reference_wrapper > { typedef reference_wrapper type; }; template struct add_value< arg > { typedef boost::arg type; }; template struct add_value< arg (*) () > { typedef boost::arg (*type) (); }; template struct add_value< bind_t > { typedef bind_t type; }; #else template struct _avt_0; template<> struct _avt_0<1> { template struct inner { typedef T type; }; }; template<> struct _avt_0<2> { template struct inner { typedef value type; }; }; typedef char (&_avt_r1) [1]; typedef char (&_avt_r2) [2]; template _avt_r1 _avt_f(value); template _avt_r1 _avt_f(reference_wrapper); template _avt_r1 _avt_f(arg); template _avt_r1 _avt_f(arg (*) ()); template _avt_r1 _avt_f(bind_t); _avt_r2 _avt_f(...); template struct add_value { static T t(); typedef typename _avt_0::template inner::type type; }; #endif // list_av_N template struct list_av_1 { typedef typename add_value::type B1; typedef list1 type; }; template struct list_av_2 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef list2 type; }; template struct list_av_3 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef list3 type; }; template struct list_av_4 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef typename add_value::type B4; typedef list4 type; }; template struct list_av_5 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef typename add_value::type B4; typedef typename add_value::type B5; typedef list5 type; }; template struct list_av_6 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef typename add_value::type B4; typedef typename add_value::type B5; typedef typename add_value::type B6; typedef list6 type; }; template struct list_av_7 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef typename add_value::type B4; typedef typename add_value::type B5; typedef typename add_value::type B6; typedef typename add_value::type B7; typedef list7 type; }; template struct list_av_8 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef typename add_value::type B4; typedef typename add_value::type B5; typedef typename add_value::type B6; typedef typename add_value::type B7; typedef typename add_value::type B8; typedef list8 type; }; template struct list_av_9 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef typename add_value::type B4; typedef typename add_value::type B5; typedef typename add_value::type B6; typedef typename add_value::type B7; typedef typename add_value::type B8; typedef typename add_value::type B9; typedef list9 type; }; // operator! struct logical_not { template bool operator()(V const & v) const { return !v; } }; template bind_t< bool, logical_not, list1< bind_t > > operator! (bind_t const & f) { typedef list1< bind_t > list_type; return bind_t ( logical_not(), list_type(f) ); } // relational operators #define BOOST_BIND_OPERATOR( op, name ) \ \ struct name \ { \ template bool operator()(V const & v, W const & w) const { return v op w; } \ }; \ \ template \ bind_t< bool, name, list2< bind_t, typename add_value::type > > \ operator op (bind_t const & f, A2 a2) \ { \ typedef typename add_value::type B2; \ typedef list2< bind_t, B2> list_type; \ return bind_t ( name(), list_type(f, a2) ); \ } BOOST_BIND_OPERATOR( ==, equal ) BOOST_BIND_OPERATOR( !=, not_equal ) BOOST_BIND_OPERATOR( <, less ) BOOST_BIND_OPERATOR( <=, less_equal ) BOOST_BIND_OPERATOR( >, greater ) BOOST_BIND_OPERATOR( >=, greater_equal ) BOOST_BIND_OPERATOR( &&, logical_and ) BOOST_BIND_OPERATOR( ||, logical_or ) #undef BOOST_BIND_OPERATOR #if defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) // resolve ambiguity with rel_ops #define BOOST_BIND_OPERATOR( op, name ) \ \ template \ bind_t< bool, name, list2< bind_t, bind_t > > \ operator op (bind_t const & f, bind_t const & g) \ { \ typedef list2< bind_t, bind_t > list_type; \ return bind_t ( name(), list_type(f, g) ); \ } BOOST_BIND_OPERATOR( !=, not_equal ) BOOST_BIND_OPERATOR( <=, less_equal ) BOOST_BIND_OPERATOR( >, greater ) BOOST_BIND_OPERATOR( >=, greater_equal ) #endif // visit_each, ADL #if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) \ && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) template void visit_each( V & v, value const & t, int ) { using boost::visit_each; BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); } template void visit_each( V & v, bind_t const & t, int ) { t.accept( v ); } #endif } // namespace _bi // visit_each, no ADL #if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( __BORLANDC__ ) \ || (defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) template void visit_each( V & v, _bi::value const & t, int ) { BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); } template void visit_each( V & v, _bi::bind_t const & t, int ) { t.accept( v ); } #endif // is_bind_expression template< class T > struct is_bind_expression { enum _vt { value = 0 }; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template< class R, class F, class L > struct is_bind_expression< _bi::bind_t< R, F, L > > { enum _vt { value = 1 }; }; #endif // bind #ifndef BOOST_BIND #define BOOST_BIND bind #endif // generic function objects template _bi::bind_t BOOST_BIND(F f) { typedef _bi::list0 list_type; return _bi::bind_t (f, list_type()); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1) { typedef typename _bi::list_av_1::type list_type; return _bi::bind_t (f, list_type(a1)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2) { typedef typename _bi::list_av_2::type list_type; return _bi::bind_t (f, list_type(a1, a2)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) { typedef typename _bi::list_av_3::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) { typedef typename _bi::list_av_4::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef typename _bi::list_av_5::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef typename _bi::list_av_6::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef typename _bi::list_av_7::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef typename _bi::list_av_8::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef typename _bi::list_av_9::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } // generic function objects, alternative syntax template _bi::bind_t BOOST_BIND(boost::type, F f) { typedef _bi::list0 list_type; return _bi::bind_t (f, list_type()); } template _bi::bind_t::type> BOOST_BIND(boost::type, F f, A1 a1) { typedef typename _bi::list_av_1::type list_type; return _bi::bind_t (f, list_type(a1)); } template _bi::bind_t::type> BOOST_BIND(boost::type, F f, A1 a1, A2 a2) { typedef typename _bi::list_av_2::type list_type; return _bi::bind_t (f, list_type(a1, a2)); } template _bi::bind_t::type> BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3) { typedef typename _bi::list_av_3::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3)); } template _bi::bind_t::type> BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4) { typedef typename _bi::list_av_4::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4)); } template _bi::bind_t::type> BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef typename _bi::list_av_5::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); } template _bi::bind_t::type> BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef typename _bi::list_av_6::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); } template _bi::bind_t::type> BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef typename _bi::list_av_7::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); } template _bi::bind_t::type> BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef typename _bi::list_av_8::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); } template _bi::bind_t::type> BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef typename _bi::list_av_9::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) // adaptable function objects template _bi::bind_t<_bi::unspecified, F, _bi::list0> BOOST_BIND(F f) { typedef _bi::list0 list_type; return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type()); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1::type> BOOST_BIND(F f, A1 a1) { typedef typename _bi::list_av_1::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2::type> BOOST_BIND(F f, A1 a1, A2 a2) { typedef typename _bi::list_av_2::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) { typedef typename _bi::list_av_3::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) { typedef typename _bi::list_av_4::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef typename _bi::list_av_5::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef typename _bi::list_av_6::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef typename _bi::list_av_7::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef typename _bi::list_av_8::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef typename _bi::list_av_9::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } #endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) // function pointers #define BOOST_BIND_CC #define BOOST_BIND_ST #include #undef BOOST_BIND_CC #undef BOOST_BIND_ST #ifdef BOOST_BIND_ENABLE_STDCALL #define BOOST_BIND_CC __stdcall #define BOOST_BIND_ST #include #undef BOOST_BIND_CC #undef BOOST_BIND_ST #endif #ifdef BOOST_BIND_ENABLE_FASTCALL #define BOOST_BIND_CC __fastcall #define BOOST_BIND_ST #include #undef BOOST_BIND_CC #undef BOOST_BIND_ST #endif #ifdef BOOST_BIND_ENABLE_PASCAL #define BOOST_BIND_ST pascal #define BOOST_BIND_CC #include #undef BOOST_BIND_ST #undef BOOST_BIND_CC #endif // member function pointers #define BOOST_BIND_MF_NAME(X) X #define BOOST_BIND_MF_CC #include #include #undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_CC #ifdef BOOST_MEM_FN_ENABLE_CDECL #define BOOST_BIND_MF_NAME(X) X##_cdecl #define BOOST_BIND_MF_CC __cdecl #include #include #undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_CC #endif #ifdef BOOST_MEM_FN_ENABLE_STDCALL #define BOOST_BIND_MF_NAME(X) X##_stdcall #define BOOST_BIND_MF_CC __stdcall #include #include #undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_CC #endif #ifdef BOOST_MEM_FN_ENABLE_FASTCALL #define BOOST_BIND_MF_NAME(X) X##_fastcall #define BOOST_BIND_MF_CC __fastcall #include #include #undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_CC #endif // data member pointers #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ || ( defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x620 ) ) ) template _bi::bind_t< R, _mfi::dm, typename _bi::list_av_1::type > BOOST_BIND(R T::*f, A1 a1) { typedef _mfi::dm F; typedef typename _bi::list_av_1::type list_type; return _bi::bind_t( F(f), list_type(a1) ); } #else namespace _bi { template< class Pm, int I > struct add_cref; template< class M, class T > struct add_cref< M T::*, 0 > { typedef M type; }; template< class M, class T > struct add_cref< M T::*, 1 > { #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4180) #endif typedef M const & type; #ifdef BOOST_MSVC #pragma warning(pop) #endif }; template< class R, class T > struct add_cref< R (T::*) (), 1 > { typedef void type; }; #if !defined(__IBMCPP__) || __IBMCPP_FUNC_CV_TMPL_ARG_DEDUCTION template< class R, class T > struct add_cref< R (T::*) () const, 1 > { typedef void type; }; #endif // __IBMCPP__ template struct isref { enum value_type { value = 0 }; }; template struct isref< R& > { enum value_type { value = 1 }; }; template struct isref< R* > { enum value_type { value = 1 }; }; template struct dm_result { typedef typename add_cref< Pm, 1 >::type type; }; template struct dm_result< Pm, bind_t > { typedef typename bind_t::result_type result_type; typedef typename add_cref< Pm, isref< result_type >::value >::type type; }; } // namespace _bi template< class A1, class M, class T > _bi::bind_t< typename _bi::dm_result< M T::*, A1 >::type, _mfi::dm, typename _bi::list_av_1::type > BOOST_BIND( M T::*f, A1 a1 ) { typedef typename _bi::dm_result< M T::*, A1 >::type result_type; typedef _mfi::dm F; typedef typename _bi::list_av_1::type list_type; return _bi::bind_t< result_type, F, list_type >( F( f ), list_type( a1 ) ); } #endif } // namespace boost #ifndef BOOST_BIND_NO_PLACEHOLDERS # include #endif #ifdef BOOST_MSVC # pragma warning(default: 4512) // assignment operator could not be generated # pragma warning(pop) #endif #endif // #ifndef BOOST_BIND_BIND_HPP_INCLUDED passenger-4.0.37/ext/boost/bind/bind_cc.hpp000644 000765 000024 00000013424 12233035540 021154 0ustar00honglistaff000000 000000 // // bind/bind_cc.hpp - support for different calling conventions // // Do not include this header directly. // // Copyright (c) 2001 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/bind/bind.html for documentation. // template _bi::bind_t BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) ()) { typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (); typedef _bi::list0 list_type; return _bi::bind_t (f, list_type()); } template _bi::bind_t::type> BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1), A1 a1) { typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1); typedef typename _bi::list_av_1::type list_type; return _bi::bind_t (f, list_type(a1)); } template _bi::bind_t::type> BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2), A1 a1, A2 a2) { typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2); typedef typename _bi::list_av_2::type list_type; return _bi::bind_t (f, list_type(a1, a2)); } template _bi::bind_t::type> BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3) { typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3); typedef typename _bi::list_av_3::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3)); } template _bi::bind_t::type> BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4) { typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4); typedef typename _bi::list_av_4::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4)); } template _bi::bind_t::type> BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5); typedef typename _bi::list_av_5::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); } template _bi::bind_t::type> BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6); typedef typename _bi::list_av_6::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); } template _bi::bind_t::type> BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7); typedef typename _bi::list_av_7::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); } template _bi::bind_t::type> BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8); typedef typename _bi::list_av_8::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); } template _bi::bind_t::type> BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9); typedef typename _bi::list_av_9::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } passenger-4.0.37/ext/boost/bind/bind_mf2_cc.hpp000644 000765 000024 00000026112 12233035540 021716 0ustar00honglistaff000000 000000 // // bind/bind_mf2_cc.hpp - member functions, type<> syntax // // Do not include this header directly. // // Copyright (c) 2001 Peter Dimov and Multi Media Ltd. // Copyright (c) 2008 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // See http://www.boost.org/libs/bind/bind.html for documentation. // // 0 template _bi::bind_t, typename _bi::list_av_1::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (), A1 a1) { typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; typedef typename _bi::list_av_1::type list_type; return _bi::bind_t(F(f), list_type(a1)); } template _bi::bind_t, typename _bi::list_av_1::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) { typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; typedef typename _bi::list_av_1::type list_type; return _bi::bind_t(F(f), list_type(a1)); } // 1 template _bi::bind_t, typename _bi::list_av_2::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) { typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; typedef typename _bi::list_av_2::type list_type; return _bi::bind_t(F(f), list_type(a1, a2)); } template _bi::bind_t, typename _bi::list_av_2::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) { typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; typedef typename _bi::list_av_2::type list_type; return _bi::bind_t(F(f), list_type(a1, a2)); } // 2 template _bi::bind_t, typename _bi::list_av_3::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) { typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; typedef typename _bi::list_av_3::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3)); } template _bi::bind_t, typename _bi::list_av_3::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) { typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; typedef typename _bi::list_av_3::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3)); } // 3 template _bi::bind_t, typename _bi::list_av_4::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) { typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; typedef typename _bi::list_av_4::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); } template _bi::bind_t, typename _bi::list_av_4::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) { typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; typedef typename _bi::list_av_4::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); } // 4 template _bi::bind_t, typename _bi::list_av_5::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; typedef typename _bi::list_av_5::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); } template _bi::bind_t, typename _bi::list_av_5::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; typedef typename _bi::list_av_5::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); } // 5 template _bi::bind_t, typename _bi::list_av_6::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; typedef typename _bi::list_av_6::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); } template _bi::bind_t, typename _bi::list_av_6::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; typedef typename _bi::list_av_6::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); } // 6 template _bi::bind_t, typename _bi::list_av_7::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; typedef typename _bi::list_av_7::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); } template _bi::bind_t, typename _bi::list_av_7::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; typedef typename _bi::list_av_7::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); } // 7 template _bi::bind_t, typename _bi::list_av_8::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; typedef typename _bi::list_av_8::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); } template _bi::bind_t, typename _bi::list_av_8::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; typedef typename _bi::list_av_8::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); } // 8 template _bi::bind_t, typename _bi::list_av_9::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; typedef typename _bi::list_av_9::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } template _bi::bind_t, typename _bi::list_av_9::type> BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; typedef typename _bi::list_av_9::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } passenger-4.0.37/ext/boost/bind/bind_mf_cc.hpp000644 000765 000024 00000024735 12233035540 021645 0ustar00honglistaff000000 000000 // // bind/bind_mf_cc.hpp - support for different calling conventions // // Do not include this header directly. // // Copyright (c) 2001 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/bind/bind.html for documentation. // // 0 template _bi::bind_t, typename _bi::list_av_1::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1) { typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; typedef typename _bi::list_av_1::type list_type; return _bi::bind_t(F(f), list_type(a1)); } template _bi::bind_t, typename _bi::list_av_1::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) { typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; typedef typename _bi::list_av_1::type list_type; return _bi::bind_t(F(f), list_type(a1)); } // 1 template _bi::bind_t, typename _bi::list_av_2::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) { typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; typedef typename _bi::list_av_2::type list_type; return _bi::bind_t(F(f), list_type(a1, a2)); } template _bi::bind_t, typename _bi::list_av_2::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) { typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; typedef typename _bi::list_av_2::type list_type; return _bi::bind_t(F(f), list_type(a1, a2)); } // 2 template _bi::bind_t, typename _bi::list_av_3::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) { typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; typedef typename _bi::list_av_3::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3)); } template _bi::bind_t, typename _bi::list_av_3::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) { typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; typedef typename _bi::list_av_3::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3)); } // 3 template _bi::bind_t, typename _bi::list_av_4::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) { typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; typedef typename _bi::list_av_4::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); } template _bi::bind_t, typename _bi::list_av_4::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) { typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; typedef typename _bi::list_av_4::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); } // 4 template _bi::bind_t, typename _bi::list_av_5::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; typedef typename _bi::list_av_5::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); } template _bi::bind_t, typename _bi::list_av_5::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; typedef typename _bi::list_av_5::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); } // 5 template _bi::bind_t, typename _bi::list_av_6::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; typedef typename _bi::list_av_6::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); } template _bi::bind_t, typename _bi::list_av_6::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; typedef typename _bi::list_av_6::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); } // 6 template _bi::bind_t, typename _bi::list_av_7::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; typedef typename _bi::list_av_7::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); } template _bi::bind_t, typename _bi::list_av_7::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; typedef typename _bi::list_av_7::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); } // 7 template _bi::bind_t, typename _bi::list_av_8::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; typedef typename _bi::list_av_8::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); } template _bi::bind_t, typename _bi::list_av_8::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; typedef typename _bi::list_av_8::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); } // 8 template _bi::bind_t, typename _bi::list_av_9::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; typedef typename _bi::list_av_9::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } template _bi::bind_t, typename _bi::list_av_9::type> BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; typedef typename _bi::list_av_9::type list_type; return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } passenger-4.0.37/ext/boost/bind/bind_template.hpp000644 000765 000024 00000033367 12233035540 022412 0ustar00honglistaff000000 000000 // // bind/bind_template.hpp // // Do not include this header directly. // // Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/bind/bind.html for documentation. // typedef typename result_traits::type result_type; result_type operator()() { list0 a; BOOST_BIND_RETURN l_(type(), f_, a, 0); } result_type operator()() const { list0 a; BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 & a1) { list1 a(a1); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 & a1) const { list1 a(a1); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) template result_type operator()(A1 const & a1) { list1 a(a1); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1) const { list1 a(a1); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #endif template result_type operator()(A1 & a1, A2 & a2) { list2 a(a1, a2); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2) const { list2 a(a1, a2); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) template result_type operator()(A1 const & a1, A2 & a2) { list2 a(a1, a2); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 & a2) const { list2 a(a1, a2); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 const & a2) { list2 a(a1, a2); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 const & a2) const { list2 a(a1, a2); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2) { list2 a(a1, a2); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2) const { list2 a(a1, a2); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #endif template result_type operator()(A1 & a1, A2 & a2, A3 & a3) { list3 a(a1, a2, a3); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const { list3 a(a1, a2, a3); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) { list3 a(a1, a2, a3); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const { list3 a(a1, a2, a3); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #endif template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) { list4 a(a1, a2, a3, a4); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const { list4 a(a1, a2, a3, a4); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) { list4 a(a1, a2, a3, a4); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const { list4 a(a1, a2, a3, a4); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #endif template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) { list5 a(a1, a2, a3, a4, a5); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const { list5 a(a1, a2, a3, a4, a5); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) { list5 a(a1, a2, a3, a4, a5); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const { list5 a(a1, a2, a3, a4, a5); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #endif template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) { list6 a(a1, a2, a3, a4, a5, a6); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const { list6 a(a1, a2, a3, a4, a5, a6); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) { list6 a(a1, a2, a3, a4, a5, a6); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const { list6 a(a1, a2, a3, a4, a5, a6); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #endif template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) { list7 a(a1, a2, a3, a4, a5, a6, a7); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const { list7 a(a1, a2, a3, a4, a5, a6, a7); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) { list7 a(a1, a2, a3, a4, a5, a6, a7); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const { list7 a(a1, a2, a3, a4, a5, a6, a7); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #endif template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) { list8 a(a1, a2, a3, a4, a5, a6, a7, a8); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const { list8 a(a1, a2, a3, a4, a5, a6, a7, a8); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) { list8 a(a1, a2, a3, a4, a5, a6, a7, a8); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const { list8 a(a1, a2, a3, a4, a5, a6, a7, a8); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #endif template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) { list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const { list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) { list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const { list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); BOOST_BIND_RETURN l_(type(), f_, a, 0); } #endif template result_type eval(A & a) { BOOST_BIND_RETURN l_(type(), f_, a, 0); } template result_type eval(A & a) const { BOOST_BIND_RETURN l_(type(), f_, a, 0); } template void accept(V & v) const { #if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) using boost::visit_each; #endif BOOST_BIND_VISIT_EACH(v, f_, 0); l_.accept(v); } bool compare(this_type const & rhs) const { return ref_compare(f_, rhs.f_, 0) && l_ == rhs.l_; } private: F f_; L l_; passenger-4.0.37/ext/boost/bind/mem_fn.hpp000644 000765 000024 00000015611 12233035540 021034 0ustar00honglistaff000000 000000 #ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED #define BOOST_BIND_MEM_FN_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // mem_fn.hpp - a generalization of std::mem_fun[_ref] // // Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. // Copyright (c) 2001 David Abrahams // Copyright (c) 2003-2005 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/bind/mem_fn.html for documentation. // #include #include #include namespace boost { #if defined(BOOST_NO_VOID_RETURNS) #define BOOST_MEM_FN_CLASS_F , class F #define BOOST_MEM_FN_TYPEDEF(X) namespace _mfi // mem_fun_impl { template struct mf { #define BOOST_MEM_FN_RETURN return #define BOOST_MEM_FN_NAME(X) inner_##X #define BOOST_MEM_FN_CC #include #undef BOOST_MEM_FN_CC #undef BOOST_MEM_FN_NAME #ifdef BOOST_MEM_FN_ENABLE_CDECL #define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl #define BOOST_MEM_FN_CC __cdecl #include #undef BOOST_MEM_FN_CC #undef BOOST_MEM_FN_NAME #endif #ifdef BOOST_MEM_FN_ENABLE_STDCALL #define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall #define BOOST_MEM_FN_CC __stdcall #include #undef BOOST_MEM_FN_CC #undef BOOST_MEM_FN_NAME #endif #ifdef BOOST_MEM_FN_ENABLE_FASTCALL #define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall #define BOOST_MEM_FN_CC __fastcall #include #undef BOOST_MEM_FN_CC #undef BOOST_MEM_FN_NAME #endif #undef BOOST_MEM_FN_RETURN }; // struct mf template<> struct mf { #define BOOST_MEM_FN_RETURN #define BOOST_MEM_FN_NAME(X) inner_##X #define BOOST_MEM_FN_CC #include #undef BOOST_MEM_FN_CC #undef BOOST_MEM_FN_NAME #ifdef BOOST_MEM_FN_ENABLE_CDECL #define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl #define BOOST_MEM_FN_CC __cdecl #include #undef BOOST_MEM_FN_CC #undef BOOST_MEM_FN_NAME #endif #ifdef BOOST_MEM_FN_ENABLE_STDCALL #define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall #define BOOST_MEM_FN_CC __stdcall #include #undef BOOST_MEM_FN_CC #undef BOOST_MEM_FN_NAME #endif #ifdef BOOST_MEM_FN_ENABLE_FASTCALL #define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall #define BOOST_MEM_FN_CC __fastcall #include #undef BOOST_MEM_FN_CC #undef BOOST_MEM_FN_NAME #endif #undef BOOST_MEM_FN_RETURN }; // struct mf #undef BOOST_MEM_FN_CLASS_F #undef BOOST_MEM_FN_TYPEDEF_F #define BOOST_MEM_FN_NAME(X) X #define BOOST_MEM_FN_NAME2(X) inner_##X #define BOOST_MEM_FN_CC #include #undef BOOST_MEM_FN_NAME #undef BOOST_MEM_FN_NAME2 #undef BOOST_MEM_FN_CC #ifdef BOOST_MEM_FN_ENABLE_CDECL #define BOOST_MEM_FN_NAME(X) X##_cdecl #define BOOST_MEM_FN_NAME2(X) inner_##X##_cdecl #define BOOST_MEM_FN_CC __cdecl #include #undef BOOST_MEM_FN_NAME #undef BOOST_MEM_FN_NAME2 #undef BOOST_MEM_FN_CC #endif #ifdef BOOST_MEM_FN_ENABLE_STDCALL #define BOOST_MEM_FN_NAME(X) X##_stdcall #define BOOST_MEM_FN_NAME2(X) inner_##X##_stdcall #define BOOST_MEM_FN_CC __stdcall #include #undef BOOST_MEM_FN_NAME #undef BOOST_MEM_FN_NAME2 #undef BOOST_MEM_FN_CC #endif #ifdef BOOST_MEM_FN_ENABLE_FASTCALL #define BOOST_MEM_FN_NAME(X) X##_fastcall #define BOOST_MEM_FN_NAME2(X) inner_##X##_fastcall #define BOOST_MEM_FN_CC __fastcall #include #undef BOOST_MEM_FN_NAME #undef BOOST_MEM_FN_NAME2 #undef BOOST_MEM_FN_CC #endif } // namespace _mfi #else // #ifdef BOOST_NO_VOID_RETURNS #define BOOST_MEM_FN_CLASS_F #define BOOST_MEM_FN_TYPEDEF(X) typedef X; namespace _mfi { #define BOOST_MEM_FN_RETURN return #define BOOST_MEM_FN_NAME(X) X #define BOOST_MEM_FN_CC #include #undef BOOST_MEM_FN_CC #undef BOOST_MEM_FN_NAME #ifdef BOOST_MEM_FN_ENABLE_CDECL #define BOOST_MEM_FN_NAME(X) X##_cdecl #define BOOST_MEM_FN_CC __cdecl #include #undef BOOST_MEM_FN_CC #undef BOOST_MEM_FN_NAME #endif #ifdef BOOST_MEM_FN_ENABLE_STDCALL #define BOOST_MEM_FN_NAME(X) X##_stdcall #define BOOST_MEM_FN_CC __stdcall #include #undef BOOST_MEM_FN_CC #undef BOOST_MEM_FN_NAME #endif #ifdef BOOST_MEM_FN_ENABLE_FASTCALL #define BOOST_MEM_FN_NAME(X) X##_fastcall #define BOOST_MEM_FN_CC __fastcall #include #undef BOOST_MEM_FN_CC #undef BOOST_MEM_FN_NAME #endif #undef BOOST_MEM_FN_RETURN } // namespace _mfi #undef BOOST_MEM_FN_CLASS_F #undef BOOST_MEM_FN_TYPEDEF #endif // #ifdef BOOST_NO_VOID_RETURNS #define BOOST_MEM_FN_NAME(X) X #define BOOST_MEM_FN_CC #include #undef BOOST_MEM_FN_NAME #undef BOOST_MEM_FN_CC #ifdef BOOST_MEM_FN_ENABLE_CDECL #define BOOST_MEM_FN_NAME(X) X##_cdecl #define BOOST_MEM_FN_CC __cdecl #include #undef BOOST_MEM_FN_NAME #undef BOOST_MEM_FN_CC #endif #ifdef BOOST_MEM_FN_ENABLE_STDCALL #define BOOST_MEM_FN_NAME(X) X##_stdcall #define BOOST_MEM_FN_CC __stdcall #include #undef BOOST_MEM_FN_NAME #undef BOOST_MEM_FN_CC #endif #ifdef BOOST_MEM_FN_ENABLE_FASTCALL #define BOOST_MEM_FN_NAME(X) X##_fastcall #define BOOST_MEM_FN_CC __fastcall #include #undef BOOST_MEM_FN_NAME #undef BOOST_MEM_FN_CC #endif // data member support namespace _mfi { template class dm { public: typedef R const & result_type; typedef T const * argument_type; private: typedef R (T::*F); F f_; template R const & call(U & u, T const *) const { return (u.*f_); } template R const & call(U & u, void const *) const { return (get_pointer(u)->*f_); } public: explicit dm(F f): f_(f) {} R & operator()(T * p) const { return (p->*f_); } R const & operator()(T const * p) const { return (p->*f_); } template R const & operator()(U const & u) const { return call(u, &u); } #if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__MWERKS__, < 0x3200) R & operator()(T & t) const { return (t.*f_); } R const & operator()(T const & t) const { return (t.*f_); } #endif bool operator==(dm const & rhs) const { return f_ == rhs.f_; } bool operator!=(dm const & rhs) const { return f_ != rhs.f_; } }; } // namespace _mfi template _mfi::dm mem_fn(R T::*f) { return _mfi::dm(f); } } // namespace boost #endif // #ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED passenger-4.0.37/ext/boost/bind/mem_fn_cc.hpp000644 000765 000024 00000011304 12233035540 021474 0ustar00honglistaff000000 000000 // // bind/mem_fn_cc.hpp - support for different calling conventions // // Do not include this header directly. // // Copyright (c) 2001 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/bind/mem_fn.html for documentation. // template _mfi::BOOST_MEM_FN_NAME(mf0) mem_fn(R (BOOST_MEM_FN_CC T::*f) ()) { return _mfi::BOOST_MEM_FN_NAME(mf0)(f); } template _mfi::BOOST_MEM_FN_NAME(cmf0) mem_fn(R (BOOST_MEM_FN_CC T::*f) () const) { return _mfi::BOOST_MEM_FN_NAME(cmf0)(f); } template _mfi::BOOST_MEM_FN_NAME(mf1) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1)) { return _mfi::BOOST_MEM_FN_NAME(mf1)(f); } template _mfi::BOOST_MEM_FN_NAME(cmf1) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1) const) { return _mfi::BOOST_MEM_FN_NAME(cmf1)(f); } template _mfi::BOOST_MEM_FN_NAME(mf2) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2)) { return _mfi::BOOST_MEM_FN_NAME(mf2)(f); } template _mfi::BOOST_MEM_FN_NAME(cmf2) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2) const) { return _mfi::BOOST_MEM_FN_NAME(cmf2)(f); } template _mfi::BOOST_MEM_FN_NAME(mf3) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3)) { return _mfi::BOOST_MEM_FN_NAME(mf3)(f); } template _mfi::BOOST_MEM_FN_NAME(cmf3) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3) const) { return _mfi::BOOST_MEM_FN_NAME(cmf3)(f); } template _mfi::BOOST_MEM_FN_NAME(mf4) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4)) { return _mfi::BOOST_MEM_FN_NAME(mf4)(f); } template _mfi::BOOST_MEM_FN_NAME(cmf4) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4) const) { return _mfi::BOOST_MEM_FN_NAME(cmf4)(f); } template _mfi::BOOST_MEM_FN_NAME(mf5) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5)) { return _mfi::BOOST_MEM_FN_NAME(mf5)(f); } template _mfi::BOOST_MEM_FN_NAME(cmf5) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5) const) { return _mfi::BOOST_MEM_FN_NAME(cmf5)(f); } template _mfi::BOOST_MEM_FN_NAME(mf6) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6)) { return _mfi::BOOST_MEM_FN_NAME(mf6)(f); } template _mfi::BOOST_MEM_FN_NAME(cmf6) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6) const) { return _mfi::BOOST_MEM_FN_NAME(cmf6)(f); } template _mfi::BOOST_MEM_FN_NAME(mf7) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7)) { return _mfi::BOOST_MEM_FN_NAME(mf7)(f); } template _mfi::BOOST_MEM_FN_NAME(cmf7) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7) const) { return _mfi::BOOST_MEM_FN_NAME(cmf7)(f); } template _mfi::BOOST_MEM_FN_NAME(mf8) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8)) { return _mfi::BOOST_MEM_FN_NAME(mf8)(f); } template _mfi::BOOST_MEM_FN_NAME(cmf8) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8) const) { return _mfi::BOOST_MEM_FN_NAME(cmf8)(f); } passenger-4.0.37/ext/boost/bind/mem_fn_template.hpp000644 000765 000024 00000063641 12233035540 022735 0ustar00honglistaff000000 000000 // // bind/mem_fn_template.hpp // // Do not include this header directly // // Copyright (c) 2001 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/bind/mem_fn.html for documentation. // #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) # define BOOST_MEM_FN_ENABLE_CONST_OVERLOADS #endif // mf0 template class BOOST_MEM_FN_NAME(mf0) { public: typedef R result_type; typedef T * argument_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) ()) F f_; template R call(U & u, T const *) const { BOOST_MEM_FN_RETURN (u.*f_)(); } template R call(U & u, void const *) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(); } public: explicit BOOST_MEM_FN_NAME(mf0)(F f): f_(f) {} R operator()(T * p) const { BOOST_MEM_FN_RETURN (p->*f_)(); } template R operator()(U & u) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p); } #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS template R operator()(U const & u) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p); } #endif R operator()(T & t) const { BOOST_MEM_FN_RETURN (t.*f_)(); } bool operator==(BOOST_MEM_FN_NAME(mf0) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(mf0) const & rhs) const { return f_ != rhs.f_; } }; // cmf0 template class BOOST_MEM_FN_NAME(cmf0) { public: typedef R result_type; typedef T const * argument_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) () const) F f_; template R call(U & u, T const *) const { BOOST_MEM_FN_RETURN (u.*f_)(); } template R call(U & u, void const *) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(); } public: explicit BOOST_MEM_FN_NAME(cmf0)(F f): f_(f) {} template R operator()(U const & u) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p); } R operator()(T const & t) const { BOOST_MEM_FN_RETURN (t.*f_)(); } bool operator==(BOOST_MEM_FN_NAME(cmf0) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(cmf0) const & rhs) const { return f_ != rhs.f_; } }; // mf1 template class BOOST_MEM_FN_NAME(mf1) { public: typedef R result_type; typedef T * first_argument_type; typedef A1 second_argument_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1)) F f_; template R call(U & u, T const *, B1 & b1) const { BOOST_MEM_FN_RETURN (u.*f_)(b1); } template R call(U & u, void const *, B1 & b1) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1); } public: explicit BOOST_MEM_FN_NAME(mf1)(F f): f_(f) {} R operator()(T * p, A1 a1) const { BOOST_MEM_FN_RETURN (p->*f_)(a1); } template R operator()(U & u, A1 a1) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1); } #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS template R operator()(U const & u, A1 a1) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1); } #endif R operator()(T & t, A1 a1) const { BOOST_MEM_FN_RETURN (t.*f_)(a1); } bool operator==(BOOST_MEM_FN_NAME(mf1) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(mf1) const & rhs) const { return f_ != rhs.f_; } }; // cmf1 template class BOOST_MEM_FN_NAME(cmf1) { public: typedef R result_type; typedef T const * first_argument_type; typedef A1 second_argument_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1) const) F f_; template R call(U & u, T const *, B1 & b1) const { BOOST_MEM_FN_RETURN (u.*f_)(b1); } template R call(U & u, void const *, B1 & b1) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1); } public: explicit BOOST_MEM_FN_NAME(cmf1)(F f): f_(f) {} template R operator()(U const & u, A1 a1) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1); } R operator()(T const & t, A1 a1) const { BOOST_MEM_FN_RETURN (t.*f_)(a1); } bool operator==(BOOST_MEM_FN_NAME(cmf1) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(cmf1) const & rhs) const { return f_ != rhs.f_; } }; // mf2 template class BOOST_MEM_FN_NAME(mf2) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2)) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2); } template R call(U & u, void const *, B1 & b1, B2 & b2) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2); } public: explicit BOOST_MEM_FN_NAME(mf2)(F f): f_(f) {} R operator()(T * p, A1 a1, A2 a2) const { BOOST_MEM_FN_RETURN (p->*f_)(a1, a2); } template R operator()(U & u, A1 a1, A2 a2) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2); } #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS template R operator()(U const & u, A1 a1, A2 a2) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2); } #endif R operator()(T & t, A1 a1, A2 a2) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2); } bool operator==(BOOST_MEM_FN_NAME(mf2) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(mf2) const & rhs) const { return f_ != rhs.f_; } }; // cmf2 template class BOOST_MEM_FN_NAME(cmf2) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2) const) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2); } template R call(U & u, void const *, B1 & b1, B2 & b2) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2); } public: explicit BOOST_MEM_FN_NAME(cmf2)(F f): f_(f) {} template R operator()(U const & u, A1 a1, A2 a2) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2); } R operator()(T const & t, A1 a1, A2 a2) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2); } bool operator==(BOOST_MEM_FN_NAME(cmf2) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(cmf2) const & rhs) const { return f_ != rhs.f_; } }; // mf3 template class BOOST_MEM_FN_NAME(mf3) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3)) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3); } template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3); } public: explicit BOOST_MEM_FN_NAME(mf3)(F f): f_(f) {} R operator()(T * p, A1 a1, A2 a2, A3 a3) const { BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3); } template R operator()(U & u, A1 a1, A2 a2, A3 a3) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); } #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); } #endif R operator()(T & t, A1 a1, A2 a2, A3 a3) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3); } bool operator==(BOOST_MEM_FN_NAME(mf3) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(mf3) const & rhs) const { return f_ != rhs.f_; } }; // cmf3 template class BOOST_MEM_FN_NAME(cmf3) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3); } template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3); } public: explicit BOOST_MEM_FN_NAME(cmf3)(F f): f_(f) {} template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); } R operator()(T const & t, A1 a1, A2 a2, A3 a3) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3); } bool operator==(BOOST_MEM_FN_NAME(cmf3) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(cmf3) const & rhs) const { return f_ != rhs.f_; } }; // mf4 template class BOOST_MEM_FN_NAME(mf4) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4)) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4); } template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4); } public: explicit BOOST_MEM_FN_NAME(mf4)(F f): f_(f) {} R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4) const { BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4); } template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); } #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); } #endif R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4); } bool operator==(BOOST_MEM_FN_NAME(mf4) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(mf4) const & rhs) const { return f_ != rhs.f_; } }; // cmf4 template class BOOST_MEM_FN_NAME(cmf4) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4); } template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4); } public: explicit BOOST_MEM_FN_NAME(cmf4)(F f): f_(f) {} template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); } R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4); } bool operator==(BOOST_MEM_FN_NAME(cmf4) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(cmf4) const & rhs) const { return f_ != rhs.f_; } }; // mf5 template class BOOST_MEM_FN_NAME(mf5) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5)) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5); } template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); } public: explicit BOOST_MEM_FN_NAME(mf5)(F f): f_(f) {} R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const { BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5); } template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); } #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); } #endif R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5); } bool operator==(BOOST_MEM_FN_NAME(mf5) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(mf5) const & rhs) const { return f_ != rhs.f_; } }; // cmf5 template class BOOST_MEM_FN_NAME(cmf5) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5); } template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); } public: explicit BOOST_MEM_FN_NAME(cmf5)(F f): f_(f) {} template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); } R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5); } bool operator==(BOOST_MEM_FN_NAME(cmf5) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(cmf5) const & rhs) const { return f_ != rhs.f_; } }; // mf6 template class BOOST_MEM_FN_NAME(mf6) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6)) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6); } template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); } public: explicit BOOST_MEM_FN_NAME(mf6)(F f): f_(f) {} R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const { BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6); } template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); } #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); } #endif R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6); } bool operator==(BOOST_MEM_FN_NAME(mf6) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(mf6) const & rhs) const { return f_ != rhs.f_; } }; // cmf6 template class BOOST_MEM_FN_NAME(cmf6) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6); } template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); } public: explicit BOOST_MEM_FN_NAME(cmf6)(F f): f_(f) {} template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); } R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6); } bool operator==(BOOST_MEM_FN_NAME(cmf6) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(cmf6) const & rhs) const { return f_ != rhs.f_; } }; // mf7 template class BOOST_MEM_FN_NAME(mf7) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7)) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7); } template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); } public: explicit BOOST_MEM_FN_NAME(mf7)(F f): f_(f) {} R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const { BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7); } template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); } #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); } #endif R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7); } bool operator==(BOOST_MEM_FN_NAME(mf7) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(mf7) const & rhs) const { return f_ != rhs.f_; } }; // cmf7 template class BOOST_MEM_FN_NAME(cmf7) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7); } template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); } public: explicit BOOST_MEM_FN_NAME(cmf7)(F f): f_(f) {} template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); } R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7); } bool operator==(BOOST_MEM_FN_NAME(cmf7) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(cmf7) const & rhs) const { return f_ != rhs.f_; } }; // mf8 template class BOOST_MEM_FN_NAME(mf8) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8)) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); } template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); } public: explicit BOOST_MEM_FN_NAME(mf8)(F f): f_(f) {} R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const { BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); } template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); } #ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); } #endif R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); } bool operator==(BOOST_MEM_FN_NAME(mf8) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(mf8) const & rhs) const { return f_ != rhs.f_; } }; // cmf8 template class BOOST_MEM_FN_NAME(cmf8) { public: typedef R result_type; private: BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const) F f_; template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const { BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); } template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const { BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); } public: explicit BOOST_MEM_FN_NAME(cmf8)(F f): f_(f) {} R operator()(T const * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const { BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); } template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const { U const * p = 0; BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); } R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const { BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); } bool operator==(BOOST_MEM_FN_NAME(cmf8) const & rhs) const { return f_ == rhs.f_; } bool operator!=(BOOST_MEM_FN_NAME(cmf8) const & rhs) const { return f_ != rhs.f_; } }; #undef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS passenger-4.0.37/ext/boost/bind/placeholders.hpp000644 000765 000024 00000003543 12233035540 022241 0ustar00honglistaff000000 000000 #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED #define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // bind/placeholders.hpp - _N definitions // // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/bind/bind.html for documentation. // #include #include namespace { #if defined(__BORLANDC__) || defined(__GNUC__) && (__GNUC__ < 4) static inline boost::arg<1> _1() { return boost::arg<1>(); } static inline boost::arg<2> _2() { return boost::arg<2>(); } static inline boost::arg<3> _3() { return boost::arg<3>(); } static inline boost::arg<4> _4() { return boost::arg<4>(); } static inline boost::arg<5> _5() { return boost::arg<5>(); } static inline boost::arg<6> _6() { return boost::arg<6>(); } static inline boost::arg<7> _7() { return boost::arg<7>(); } static inline boost::arg<8> _8() { return boost::arg<8>(); } static inline boost::arg<9> _9() { return boost::arg<9>(); } #elif defined(BOOST_MSVC) || (defined(__DECCXX_VER) && __DECCXX_VER <= 60590031) || defined(__MWERKS__) || \ defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ < 2) static boost::arg<1> _1; static boost::arg<2> _2; static boost::arg<3> _3; static boost::arg<4> _4; static boost::arg<5> _5; static boost::arg<6> _6; static boost::arg<7> _7; static boost::arg<8> _8; static boost::arg<9> _9; #else boost::arg<1> _1; boost::arg<2> _2; boost::arg<3> _3; boost::arg<4> _4; boost::arg<5> _5; boost::arg<6> _6; boost::arg<7> _7; boost::arg<8> _8; boost::arg<9> _9; #endif } // unnamed namespace #endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED passenger-4.0.37/ext/boost/bind/storage.hpp000644 000765 000024 00000032074 12233035540 021241 0ustar00honglistaff000000 000000 #ifndef BOOST_BIND_STORAGE_HPP_INCLUDED #define BOOST_BIND_STORAGE_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // bind/storage.hpp // // boost/bind.hpp support header, optimized storage // // Copyright (c) 2006 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // See http://www.boost.org/libs/bind/bind.html for documentation. // #include #include #ifdef BOOST_MSVC # pragma warning(push) # pragma warning(disable: 4512) // assignment operator could not be generated #endif namespace boost { namespace _bi { // 1 template struct storage1 { explicit storage1( A1 a1 ): a1_( a1 ) {} template void accept(V & v) const { BOOST_BIND_VISIT_EACH(v, a1_, 0); } A1 a1_; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( __BORLANDC__ ) template struct storage1< boost::arg > { explicit storage1( boost::arg ) {} template void accept(V &) const { } static boost::arg a1_() { return boost::arg(); } }; template struct storage1< boost::arg (*) () > { explicit storage1( boost::arg (*) () ) {} template void accept(V &) const { } static boost::arg a1_() { return boost::arg(); } }; #endif // 2 template struct storage2: public storage1 { typedef storage1 inherited; storage2( A1 a1, A2 a2 ): storage1( a1 ), a2_( a2 ) {} template void accept(V & v) const { inherited::accept(v); BOOST_BIND_VISIT_EACH(v, a2_, 0); } A2 a2_; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template struct storage2< A1, boost::arg >: public storage1 { typedef storage1 inherited; storage2( A1 a1, boost::arg ): storage1( a1 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a2_() { return boost::arg(); } }; template struct storage2< A1, boost::arg (*) () >: public storage1 { typedef storage1 inherited; storage2( A1 a1, boost::arg (*) () ): storage1( a1 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a2_() { return boost::arg(); } }; #endif // 3 template struct storage3: public storage2< A1, A2 > { typedef storage2 inherited; storage3( A1 a1, A2 a2, A3 a3 ): storage2( a1, a2 ), a3_( a3 ) {} template void accept(V & v) const { inherited::accept(v); BOOST_BIND_VISIT_EACH(v, a3_, 0); } A3 a3_; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template struct storage3< A1, A2, boost::arg >: public storage2< A1, A2 > { typedef storage2 inherited; storage3( A1 a1, A2 a2, boost::arg ): storage2( a1, a2 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a3_() { return boost::arg(); } }; template struct storage3< A1, A2, boost::arg (*) () >: public storage2< A1, A2 > { typedef storage2 inherited; storage3( A1 a1, A2 a2, boost::arg (*) () ): storage2( a1, a2 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a3_() { return boost::arg(); } }; #endif // 4 template struct storage4: public storage3< A1, A2, A3 > { typedef storage3 inherited; storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3( a1, a2, a3 ), a4_( a4 ) {} template void accept(V & v) const { inherited::accept(v); BOOST_BIND_VISIT_EACH(v, a4_, 0); } A4 a4_; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template struct storage4< A1, A2, A3, boost::arg >: public storage3< A1, A2, A3 > { typedef storage3 inherited; storage4( A1 a1, A2 a2, A3 a3, boost::arg ): storage3( a1, a2, a3 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a4_() { return boost::arg(); } }; template struct storage4< A1, A2, A3, boost::arg (*) () >: public storage3< A1, A2, A3 > { typedef storage3 inherited; storage4( A1 a1, A2 a2, A3 a3, boost::arg (*) () ): storage3( a1, a2, a3 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a4_() { return boost::arg(); } }; #endif // 5 template struct storage5: public storage4< A1, A2, A3, A4 > { typedef storage4 inherited; storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4( a1, a2, a3, a4 ), a5_( a5 ) {} template void accept(V & v) const { inherited::accept(v); BOOST_BIND_VISIT_EACH(v, a5_, 0); } A5 a5_; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template struct storage5< A1, A2, A3, A4, boost::arg >: public storage4< A1, A2, A3, A4 > { typedef storage4 inherited; storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg ): storage4( a1, a2, a3, a4 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a5_() { return boost::arg(); } }; template struct storage5< A1, A2, A3, A4, boost::arg (*) () >: public storage4< A1, A2, A3, A4 > { typedef storage4 inherited; storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg (*) () ): storage4( a1, a2, a3, a4 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a5_() { return boost::arg(); } }; #endif // 6 template struct storage6: public storage5< A1, A2, A3, A4, A5 > { typedef storage5 inherited; storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5( a1, a2, a3, a4, a5 ), a6_( a6 ) {} template void accept(V & v) const { inherited::accept(v); BOOST_BIND_VISIT_EACH(v, a6_, 0); } A6 a6_; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template struct storage6< A1, A2, A3, A4, A5, boost::arg >: public storage5< A1, A2, A3, A4, A5 > { typedef storage5 inherited; storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg ): storage5( a1, a2, a3, a4, a5 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a6_() { return boost::arg(); } }; template struct storage6< A1, A2, A3, A4, A5, boost::arg (*) () >: public storage5< A1, A2, A3, A4, A5 > { typedef storage5 inherited; storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg (*) () ): storage5( a1, a2, a3, a4, a5 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a6_() { return boost::arg(); } }; #endif // 7 template struct storage7: public storage6< A1, A2, A3, A4, A5, A6 > { typedef storage6 inherited; storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {} template void accept(V & v) const { inherited::accept(v); BOOST_BIND_VISIT_EACH(v, a7_, 0); } A7 a7_; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg >: public storage6< A1, A2, A3, A4, A5, A6 > { typedef storage6 inherited; storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg ): storage6( a1, a2, a3, a4, a5, a6 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a7_() { return boost::arg(); } }; template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg (*) () >: public storage6< A1, A2, A3, A4, A5, A6 > { typedef storage6 inherited; storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg (*) () ): storage6( a1, a2, a3, a4, a5, a6 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a7_() { return boost::arg(); } }; #endif // 8 template struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 > { typedef storage7 inherited; storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): storage7( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {} template void accept(V & v) const { inherited::accept(v); BOOST_BIND_VISIT_EACH(v, a8_, 0); } A8 a8_; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg >: public storage7< A1, A2, A3, A4, A5, A6, A7 > { typedef storage7 inherited; storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a8_() { return boost::arg(); } }; template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 > { typedef storage7 inherited; storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg (*) () ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a8_() { return boost::arg(); } }; #endif // 9 template struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > { typedef storage8 inherited; storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {} template void accept(V & v) const { inherited::accept(v); BOOST_BIND_VISIT_EACH(v, a9_, 0); } A9 a9_; }; #if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > { typedef storage8 inherited; storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a9_() { return boost::arg(); } }; template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > { typedef storage8 inherited; storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg (*) () ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} template void accept(V & v) const { inherited::accept(v); } static boost::arg a9_() { return boost::arg(); } }; #endif } // namespace _bi } // namespace boost #ifdef BOOST_MSVC # pragma warning(default: 4512) // assignment operator could not be generated # pragma warning(pop) #endif #endif // #ifndef BOOST_BIND_STORAGE_HPP_INCLUDED passenger-4.0.37/ext/boost/atomic/atomic.hpp000644 000765 000024 00000015615 12233035540 021413 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_ATOMIC_HPP #define BOOST_ATOMIC_ATOMIC_HPP // Copyright (c) 2011 Helge Bahmann // Copyright (c) 2013 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include #include #include #include #if defined(BOOST_MSVC) && BOOST_MSVC < 1400 #include #include #endif #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { #ifndef BOOST_ATOMIC_CHAR_LOCK_FREE #define BOOST_ATOMIC_CHAR_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_CHAR16_T_LOCK_FREE #define BOOST_ATOMIC_CHAR16_T_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_CHAR32_T_LOCK_FREE #define BOOST_ATOMIC_CHAR32_T_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_WCHAR_T_LOCK_FREE #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_SHORT_LOCK_FREE #define BOOST_ATOMIC_SHORT_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_INT_LOCK_FREE #define BOOST_ATOMIC_INT_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_LONG_LOCK_FREE #define BOOST_ATOMIC_LONG_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_LLONG_LOCK_FREE #define BOOST_ATOMIC_LLONG_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_POINTER_LOCK_FREE #define BOOST_ATOMIC_POINTER_LOCK_FREE 0 #endif #define BOOST_ATOMIC_ADDRESS_LOCK_FREE BOOST_ATOMIC_POINTER_LOCK_FREE #ifndef BOOST_ATOMIC_BOOL_LOCK_FREE #define BOOST_ATOMIC_BOOL_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_THREAD_FENCE #define BOOST_ATOMIC_THREAD_FENCE 0 inline void atomic_thread_fence(memory_order) { } #endif #ifndef BOOST_ATOMIC_SIGNAL_FENCE #define BOOST_ATOMIC_SIGNAL_FENCE 0 inline void atomic_signal_fence(memory_order order) { atomic_thread_fence(order); } #endif template class atomic : public atomics::detail::base_atomic< T, typename atomics::detail::classify::type, atomics::detail::storage_size_of::value, #if !defined(BOOST_MSVC) || BOOST_MSVC >= 1400 boost::is_signed::value #else // MSVC 2003 has problems instantiating is_signed on non-integral types mpl::and_< boost::is_integral, boost::is_signed >::value #endif > { private: typedef T value_type; typedef atomics::detail::base_atomic< T, typename atomics::detail::classify::type, atomics::detail::storage_size_of::value, #if !defined(BOOST_MSVC) || BOOST_MSVC >= 1400 boost::is_signed::value #else // MSVC 2003 has problems instantiating is_signed on non-itegral types mpl::and_< boost::is_integral, boost::is_signed >::value #endif > super; public: atomic(void) BOOST_NOEXCEPT : super() {} BOOST_CONSTEXPR atomic(value_type v) BOOST_NOEXCEPT : super(v) {} value_type operator=(value_type v) volatile BOOST_NOEXCEPT { this->store(v); return v; } operator value_type(void) volatile const BOOST_NOEXCEPT { return this->load(); } #ifdef BOOST_NO_CXX11_DELETED_FUNCTIONS private: atomic(const atomic &) /* =delete */ ; atomic & operator=(const atomic &) volatile /* =delete */ ; #else atomic(const atomic &) = delete; atomic & operator=(const atomic &) volatile = delete; #endif }; typedef atomic atomic_char; typedef atomic atomic_uchar; typedef atomic atomic_schar; typedef atomic atomic_uint8_t; typedef atomic atomic_int8_t; typedef atomic atomic_ushort; typedef atomic atomic_short; typedef atomic atomic_uint16_t; typedef atomic atomic_int16_t; typedef atomic atomic_uint; typedef atomic atomic_int; typedef atomic atomic_uint32_t; typedef atomic atomic_int32_t; typedef atomic atomic_ulong; typedef atomic atomic_long; typedef atomic atomic_uint64_t; typedef atomic atomic_int64_t; #ifdef BOOST_HAS_LONG_LONG typedef atomic atomic_ullong; typedef atomic atomic_llong; #endif typedef atomic atomic_address; typedef atomic atomic_bool; typedef atomic atomic_wchar_t; #if !defined(BOOST_NO_CXX11_CHAR16_T) typedef atomic atomic_char16_t; #endif #if !defined(BOOST_NO_CXX11_CHAR32_T) typedef atomic atomic_char32_t; #endif typedef atomic atomic_int_least8_t; typedef atomic atomic_uint_least8_t; typedef atomic atomic_int_least16_t; typedef atomic atomic_uint_least16_t; typedef atomic atomic_int_least32_t; typedef atomic atomic_uint_least32_t; typedef atomic atomic_int_least64_t; typedef atomic atomic_uint_least64_t; typedef atomic atomic_int_fast8_t; typedef atomic atomic_uint_fast8_t; typedef atomic atomic_int_fast16_t; typedef atomic atomic_uint_fast16_t; typedef atomic atomic_int_fast32_t; typedef atomic atomic_uint_fast32_t; typedef atomic atomic_int_fast64_t; typedef atomic atomic_uint_fast64_t; typedef atomic atomic_intmax_t; typedef atomic atomic_uintmax_t; typedef atomic atomic_size_t; typedef atomic atomic_ptrdiff_t; // PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config. #if !defined(__PGIC__) #if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \ || (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__) && !defined(__GLIBC__)) \ || defined(__CYGWIN__) \ || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \ || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) typedef atomic atomic_intptr_t; typedef atomic atomic_uintptr_t; #elif defined(__GNUC__) || defined(__clang__) #if defined(__INTPTR_TYPE__) typedef atomic< __INTPTR_TYPE__ > atomic_intptr_t; #endif #if defined(__UINTPTR_TYPE__) typedef atomic< __UINTPTR_TYPE__ > atomic_uintptr_t; #endif #endif #endif #ifndef BOOST_ATOMIC_FLAG_LOCK_FREE #define BOOST_ATOMIC_FLAG_LOCK_FREE 0 class atomic_flag { public: BOOST_CONSTEXPR atomic_flag(void) BOOST_NOEXCEPT : v_(false) {} bool test_and_set(memory_order order = memory_order_seq_cst) BOOST_NOEXCEPT { return v_.exchange(true, order); } void clear(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { v_.store(false, order); } private: atomic_flag(const atomic_flag &) /* = delete */ ; atomic_flag & operator=(const atomic_flag &) /* = delete */ ; atomic v_; }; #endif } #endif passenger-4.0.37/ext/boost/atomic/detail/000755 000765 000024 00000000000 12233035540 020660 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/atomic/detail/base.hpp000644 000765 000024 00000035625 12233035540 022316 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_BASE_HPP #define BOOST_ATOMIC_DETAIL_BASE_HPP // Copyright (c) 2009 Helge Bahmann // Copyright (c) 2013 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Base class definition and fallback implementation. // To be overridden (through partial specialization) by // platform implementations. #include #include #include #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif #define BOOST_ATOMIC_DECLARE_BASE_OPERATORS \ bool \ compare_exchange_strong( \ value_type & expected, \ value_type desired, \ memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT \ { \ return compare_exchange_strong(expected, desired, order, calculate_failure_order(order)); \ } \ \ bool \ compare_exchange_weak( \ value_type & expected, \ value_type desired, \ memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT \ { \ return compare_exchange_weak(expected, desired, order, calculate_failure_order(order)); \ } \ #define BOOST_ATOMIC_DECLARE_ADDITIVE_OPERATORS \ value_type \ operator++(int) volatile BOOST_NOEXCEPT \ { \ return fetch_add(1); \ } \ \ value_type \ operator++(void) volatile BOOST_NOEXCEPT \ { \ return fetch_add(1) + 1; \ } \ \ value_type \ operator--(int) volatile BOOST_NOEXCEPT \ { \ return fetch_sub(1); \ } \ \ value_type \ operator--(void) volatile BOOST_NOEXCEPT \ { \ return fetch_sub(1) - 1; \ } \ \ value_type \ operator+=(difference_type v) volatile BOOST_NOEXCEPT \ { \ return fetch_add(v) + v; \ } \ \ value_type \ operator-=(difference_type v) volatile BOOST_NOEXCEPT \ { \ return fetch_sub(v) - v; \ } \ #define BOOST_ATOMIC_DECLARE_VOID_POINTER_ADDITIVE_OPERATORS \ value_type \ operator++(int) volatile BOOST_NOEXCEPT \ { \ return fetch_add(1); \ } \ \ value_type \ operator++(void) volatile BOOST_NOEXCEPT \ { \ return (char*)fetch_add(1) + 1; \ } \ \ value_type \ operator--(int) volatile BOOST_NOEXCEPT \ { \ return fetch_sub(1); \ } \ \ value_type \ operator--(void) volatile BOOST_NOEXCEPT \ { \ return (char*)fetch_sub(1) - 1; \ } \ \ value_type \ operator+=(difference_type v) volatile BOOST_NOEXCEPT \ { \ return (char*)fetch_add(v) + v; \ } \ \ value_type \ operator-=(difference_type v) volatile BOOST_NOEXCEPT \ { \ return (char*)fetch_sub(v) - v; \ } \ #define BOOST_ATOMIC_DECLARE_BIT_OPERATORS \ value_type \ operator&=(difference_type v) volatile BOOST_NOEXCEPT \ { \ return fetch_and(v) & v; \ } \ \ value_type \ operator|=(difference_type v) volatile BOOST_NOEXCEPT \ { \ return fetch_or(v) | v; \ } \ \ value_type \ operator^=(difference_type v) volatile BOOST_NOEXCEPT\ { \ return fetch_xor(v) ^ v; \ } \ #define BOOST_ATOMIC_DECLARE_POINTER_OPERATORS \ BOOST_ATOMIC_DECLARE_BASE_OPERATORS \ BOOST_ATOMIC_DECLARE_ADDITIVE_OPERATORS \ #define BOOST_ATOMIC_DECLARE_VOID_POINTER_OPERATORS \ BOOST_ATOMIC_DECLARE_BASE_OPERATORS \ BOOST_ATOMIC_DECLARE_VOID_POINTER_ADDITIVE_OPERATORS \ #define BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS \ BOOST_ATOMIC_DECLARE_BASE_OPERATORS \ BOOST_ATOMIC_DECLARE_ADDITIVE_OPERATORS \ BOOST_ATOMIC_DECLARE_BIT_OPERATORS \ namespace boost { namespace atomics { namespace detail { inline memory_order calculate_failure_order(memory_order order) { switch(order) { case memory_order_acq_rel: return memory_order_acquire; case memory_order_release: return memory_order_relaxed; default: return order; } } template class base_atomic { private: typedef base_atomic this_type; typedef T value_type; typedef lockpool::scoped_lock guard_type; typedef char storage_type[sizeof(value_type)]; public: base_atomic(void) {} BOOST_CONSTEXPR explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(v) {} void store(value_type const& v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { char * storage = storage_ptr(); guard_type guard(storage); memcpy(storage, &v, sizeof(value_type)); } value_type load(memory_order /*order*/ = memory_order_seq_cst) volatile const BOOST_NOEXCEPT { char * storage = storage_ptr(); guard_type guard(storage); value_type v; memcpy(&v, storage, sizeof(value_type)); return v; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order /*success_order*/, memory_order /*failure_order*/) volatile BOOST_NOEXCEPT { char * storage = storage_ptr(); guard_type guard(storage); if (memcmp(storage, &expected, sizeof(value_type)) == 0) { memcpy(storage, &desired, sizeof(value_type)); return true; } else { memcpy(&expected, storage, sizeof(value_type)); return false; } } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type exchange(value_type const& v, memory_order /*order*/=memory_order_seq_cst) volatile BOOST_NOEXCEPT { char * storage = storage_ptr(); guard_type guard(storage); value_type tmp; memcpy(&tmp, storage, sizeof(value_type)); memcpy(storage, &v, sizeof(value_type)); return tmp; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return false; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: char * storage_ptr() volatile const BOOST_NOEXCEPT { return const_cast(&reinterpret_cast(v_)); } base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; T v_; }; template class base_atomic { private: typedef base_atomic this_type; typedef T value_type; typedef T difference_type; typedef lockpool::scoped_lock guard_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); v_ = v; } value_type load(memory_order /*order*/ = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type v = const_cast(v_); return v; } value_type exchange(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type old = v_; v_ = v; return old; } bool compare_exchange_strong(value_type & expected, value_type desired, memory_order /*success_order*/, memory_order /*failure_order*/) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); if (v_ == expected) { v_ = desired; return true; } else { expected = v_; return false; } } bool compare_exchange_weak(value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_add(difference_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type old = v_; v_ += v; return old; } value_type fetch_sub(difference_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type old = v_; v_ -= v; return old; } value_type fetch_and(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type old = v_; v_ &= v; return old; } value_type fetch_or(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type old = v_; v_ |= v; return old; } value_type fetch_xor(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type old = v_; v_ ^= v; return old; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return false; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; template class base_atomic { private: typedef base_atomic this_type; typedef T * value_type; typedef ptrdiff_t difference_type; typedef lockpool::scoped_lock guard_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); v_ = v; } value_type load(memory_order /*order*/ = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type v = const_cast(v_); return v; } value_type exchange(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type old = v_; v_ = v; return old; } bool compare_exchange_strong(value_type & expected, value_type desired, memory_order /*success_order*/, memory_order /*failure_order*/) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); if (v_ == expected) { v_ = desired; return true; } else { expected = v_; return false; } } bool compare_exchange_weak(value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_add(difference_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type old = v_; v_ += v; return old; } value_type fetch_sub(difference_type v, memory_order /*order*/ = memory_order_seq_cst) volatile { guard_type guard(const_cast(&v_)); value_type old = v_; v_ -= v; return old; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return false; } BOOST_ATOMIC_DECLARE_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; template class base_atomic { private: typedef base_atomic this_type; typedef ptrdiff_t difference_type; typedef void * value_type; typedef lockpool::scoped_lock guard_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); v_ = v; } value_type load(memory_order /*order*/ = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type v = const_cast(v_); return v; } value_type exchange(value_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type old = v_; v_ = v; return old; } bool compare_exchange_strong(value_type & expected, value_type desired, memory_order /*success_order*/, memory_order /*failure_order*/) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); if (v_ == expected) { v_ = desired; return true; } else { expected = v_; return false; } } bool compare_exchange_weak(value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return false; } value_type fetch_add(difference_type v, memory_order /*order*/ = memory_order_seq_cst) volatile BOOST_NOEXCEPT { guard_type guard(const_cast(&v_)); value_type old = v_; char * cv = reinterpret_cast(old); cv += v; v_ = cv; return old; } value_type fetch_sub(difference_type v, memory_order /*order*/ = memory_order_seq_cst) volatile { guard_type guard(const_cast(&v_)); value_type old = v_; char * cv = reinterpret_cast(old); cv -= v; v_ = cv; return old; } BOOST_ATOMIC_DECLARE_VOID_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; } } } #endif passenger-4.0.37/ext/boost/atomic/detail/cas32strong.hpp000644 000765 000024 00000061726 12233035540 023555 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_CAS32STRONG_HPP #define BOOST_ATOMIC_DETAIL_CAS32STRONG_HPP // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Copyright (c) 2011 Helge Bahmann // Copyright (c) 2013 Tim Blechmann // Build 8-, 16- and 32-bit atomic operations from // a platform_cmpxchg32_strong primitive. #include #include #include #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { /* integral types */ template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; typedef uint32_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); storage_type expected_s = (storage_type) expected; storage_type desired_s = (storage_type) desired; bool success = platform_cmpxchg32_strong(expected_s, desired_s, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); expected = (value_type) expected_s; } return success; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed)); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original & v, order, memory_order_relaxed)); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original | v, order, memory_order_relaxed)); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original ^ v, order, memory_order_relaxed)); return original; } bool is_lock_free(void) const volatile { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; typedef uint32_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); storage_type expected_s = (storage_type) expected; storage_type desired_s = (storage_type) desired; bool success = platform_cmpxchg32_strong(expected_s, desired_s, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); expected = (value_type) expected_s; } return success; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed)); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original & v, order, memory_order_relaxed)); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original | v, order, memory_order_relaxed)); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original ^ v, order, memory_order_relaxed)); return original; } bool is_lock_free(void) const volatile { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); bool success = platform_cmpxchg32_strong(expected, desired, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); } return success; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed)); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original & v, order, memory_order_relaxed)); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original | v, order, memory_order_relaxed)); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original ^ v, order, memory_order_relaxed)); return original; } bool is_lock_free(void) const volatile { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; /* pointer types */ template class base_atomic { typedef base_atomic this_type; typedef void * value_type; typedef ptrdiff_t difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); bool success = platform_cmpxchg32_strong(expected, desired, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); } return success; } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, (char*)original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, (char*)original - v, order, memory_order_relaxed)); return original; } bool is_lock_free(void) const volatile { return true; } BOOST_ATOMIC_DECLARE_VOID_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T * value_type; typedef ptrdiff_t difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); bool success = platform_cmpxchg32_strong(expected, desired, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); } return success; } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed)); return original; } bool is_lock_free(void) const volatile { return true; } BOOST_ATOMIC_DECLARE_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; /* generic types */ template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) ) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before_store(order); const_cast(v_) = tmp; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) ) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) ) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) ) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); platform_fence_before(success_order); bool success = platform_cmpxchg32_strong(expected_s, desired_s, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); } return success; } bool is_lock_free(void) const volatile { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) ) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before_store(order); const_cast(v_) = tmp; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) ) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); platform_fence_before(success_order); bool success = platform_cmpxchg32_strong(expected_s, desired_s, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); } return success; } bool is_lock_free(void) const volatile { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before_store(order); const_cast(v_) = tmp; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); platform_fence_before(success_order); bool success = platform_cmpxchg32_strong(expected_s, desired_s, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); } return success; } bool is_lock_free(void) const volatile { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; } } } #endif passenger-4.0.37/ext/boost/atomic/detail/cas32weak.hpp000644 000765 000024 00000065151 12233035540 023164 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_CAS32WEAK_HPP #define BOOST_ATOMIC_DETAIL_CAS32WEAK_HPP // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Copyright (c) 2011 Helge Bahmann // Copyright (c) 2013 Tim Blechmann #include #include #include #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { /* integral types */ template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; typedef uint32_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); storage_type expected_s = (storage_type) expected; storage_type desired_s = (storage_type) desired; bool success = platform_cmpxchg32(expected_s, desired_s, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); expected = (value_type) expected_s; } return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { for(;;) { value_type tmp = expected; if (compare_exchange_weak(tmp, desired, success_order, failure_order)) return true; if (tmp != expected) { expected = tmp; return false; } } } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed)); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original & v, order, memory_order_relaxed)); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original | v, order, memory_order_relaxed)); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original ^ v, order, memory_order_relaxed)); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; typedef uint32_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); storage_type expected_s = (storage_type) expected; storage_type desired_s = (storage_type) desired; bool success = platform_cmpxchg32(expected_s, desired_s, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); expected = (value_type) expected_s; } return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { for(;;) { value_type tmp = expected; if (compare_exchange_weak(tmp, desired, success_order, failure_order)) return true; if (tmp != expected) { expected = tmp; return false; } } } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed)); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original & v, order, memory_order_relaxed)); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original | v, order, memory_order_relaxed)); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original ^ v, order, memory_order_relaxed)); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); bool success = platform_cmpxchg32(expected, desired, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); } return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { for(;;) { value_type tmp = expected; if (compare_exchange_weak(tmp, desired, success_order, failure_order)) return true; if (tmp != expected) { expected = tmp; return false; } } } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed)); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original & v, order, memory_order_relaxed)); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original | v, order, memory_order_relaxed)); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original ^ v, order, memory_order_relaxed)); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; /* pointer types */ template class base_atomic { typedef base_atomic this_type; typedef void * value_type; typedef ptrdiff_t difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); bool success = platform_cmpxchg32(expected, desired, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); } return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { for(;;) { value_type tmp = expected; if (compare_exchange_weak(tmp, desired, success_order, failure_order)) return true; if (tmp != expected) { expected = tmp; return false; } } } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, (char*)original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, (char*)original - v, order, memory_order_relaxed)); return original; } BOOST_ATOMIC_DECLARE_VOID_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T * value_type; typedef ptrdiff_t difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); bool success = platform_cmpxchg32(expected, desired, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); } return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { for(;;) { value_type tmp = expected; if (compare_exchange_weak(tmp, desired, success_order, failure_order)) return true; if (tmp != expected) { expected = tmp; return false; } } } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed)); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; /* generic types */ template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before_store(order); const_cast(v_) = tmp; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); platform_fence_before(success_order); bool success = platform_cmpxchg32(expected_s, desired_s, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); } return success; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { for(;;) { value_type tmp = expected; if (compare_exchange_weak(tmp, desired, success_order, failure_order)) return true; if (tmp != expected) { expected = tmp; return false; } } } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before_store(order); const_cast(v_) = tmp; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); platform_fence_before(success_order); bool success = platform_cmpxchg32(expected_s, desired_s, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); } return success; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { for(;;) { value_type tmp = expected; if (compare_exchange_weak(tmp, desired, success_order, failure_order)) return true; if (tmp != expected) { expected = tmp; return false; } } } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before_store(order); const_cast(v_) = tmp; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); platform_fence_before(success_order); bool success = platform_cmpxchg32(expected_s, desired_s, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); } return success; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { for(;;) { value_type tmp = expected; if (compare_exchange_weak(tmp, desired, success_order, failure_order)) return true; if (tmp != expected) { expected = tmp; return false; } } } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; } } } #endif passenger-4.0.37/ext/boost/atomic/detail/cas64strong.hpp000644 000765 000024 00000030601 12233035540 023546 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_CAS64STRONG_HPP #define BOOST_ATOMIC_DETAIL_CAS64STRONG_HPP // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Copyright (c) 2011 Helge Bahmann // Copyright (c) 2013 Tim Blechmann // Build 64-bit atomic operation from platform_cmpxchg64_strong // primitive. It is assumed that 64-bit loads/stores are not // atomic, so they are funnelled through cmpxchg as well. #include #include #include #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { /* integral types */ template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); platform_store64(v, &v_); platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = platform_load64(&v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); bool success = platform_cmpxchg64_strong(expected, desired, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); } return success; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed)); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original & v, order, memory_order_relaxed)); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original | v, order, memory_order_relaxed)); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original ^ v, order, memory_order_relaxed)); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; /* pointer types */ template class base_atomic { typedef base_atomic this_type; typedef void * value_type; typedef ptrdiff_t difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); platform_store64(v, &v_); platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = platform_load64(&v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); bool success = platform_cmpxchg64_strong(expected, desired, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); } return success; } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, (char*)original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, (char*)original - v, order, memory_order_relaxed)); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_VOID_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T * value_type; typedef ptrdiff_t difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before_store(order); platform_store64(v, &v_); platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = platform_load64(&v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); bool success = platform_cmpxchg64_strong(expected, desired, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); } return success; } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original + v, order, memory_order_relaxed)); return original; } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, original - v, order, memory_order_relaxed)); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; /* generic types */ template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint64_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& value, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type value_s = 0; memcpy(&value_s, &value, sizeof(value_type)); platform_fence_before_store(order); platform_store64(value_s, &v_); platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { storage_type value_s = platform_load64(&v_); platform_fence_after_load(order); value_type value; memcpy(&value, &value_s, sizeof(value_type)); return value; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original = load(memory_order_relaxed); do { } while (!compare_exchange_weak(original, v, order, memory_order_relaxed)); return original; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); platform_fence_before(success_order); bool success = platform_cmpxchg64_strong(expected_s, desired_s, &v_); if (success) { platform_fence_after(success_order); } else { platform_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); } return success; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; } } } #endif passenger-4.0.37/ext/boost/atomic/detail/config.hpp000644 000765 000024 00000003007 12233035540 022636 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_CONFIG_HPP #define BOOST_ATOMIC_DETAIL_CONFIG_HPP // Copyright (c) 2012 Hartmut Kaiser // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #if (defined(_MSC_VER) && (_MSC_VER >= 1020)) || defined(__GNUC__) || defined(BOOST_CLANG) || defined(BOOST_INTEL) || defined(__COMO__) || defined(__DMC__) #define BOOST_ATOMIC_HAS_PRAGMA_ONCE #endif #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif /////////////////////////////////////////////////////////////////////////////// // Set up dll import/export options #if (defined(BOOST_ATOMIC_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \ !defined(BOOST_ATOMIC_STATIC_LINK) #if defined(BOOST_ATOMIC_SOURCE) #define BOOST_ATOMIC_DECL BOOST_SYMBOL_EXPORT #define BOOST_ATOMIC_BUILD_DLL #else #define BOOST_ATOMIC_DECL BOOST_SYMBOL_IMPORT #endif #endif // building a shared library #ifndef BOOST_ATOMIC_DECL #define BOOST_ATOMIC_DECL #endif /////////////////////////////////////////////////////////////////////////////// // Auto library naming #if !defined(BOOST_ATOMIC_SOURCE) && !defined(BOOST_ALL_NO_LIB) && \ !defined(BOOST_ATOMIC_NO_LIB) #define BOOST_LIB_NAME boost_atomic // tell the auto-link code to select a dll when required: #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ATOMIC_DYN_LINK) #define BOOST_DYN_LINK #endif #include #endif // auto-linking disabled #endif passenger-4.0.37/ext/boost/atomic/detail/gcc-alpha.hpp000644 000765 000024 00000023152 12233035540 023213 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_GCC_ALPHA_HPP #define BOOST_ATOMIC_DETAIL_GCC_ALPHA_HPP // Copyright (c) 2009 Helge Bahmann // Copyright (c) 2013 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif /* Refer to http://h71000.www7.hp.com/doc/82final/5601/5601pro_004.html (HP OpenVMS systems documentation) and the alpha reference manual. */ /* NB: The most natural thing would be to write the increment/decrement operators along the following lines: __asm__ __volatile__( "1: ldl_l %0,%1 \n" "addl %0,1,%0 \n" "stl_c %0,%1 \n" "beq %0,1b\n" : "=&b" (tmp) : "m" (value) : "cc" ); However according to the comments on the HP website and matching comments in the Linux kernel sources this defies branch prediction, as the cpu assumes that backward branches are always taken; so instead copy the trick from the Linux kernel, introduce a forward branch and back again. I have, however, had a hard time measuring the difference between the two versions in microbenchmarks -- I am leaving it in nevertheless as it apparently does not hurt either. */ namespace boost { namespace atomics { namespace detail { inline void fence_before(memory_order order) { switch(order) { case memory_order_consume: case memory_order_release: case memory_order_acq_rel: case memory_order_seq_cst: __asm__ __volatile__ ("mb" ::: "memory"); default:; } } inline void fence_after(memory_order order) { switch(order) { case memory_order_acquire: case memory_order_acq_rel: case memory_order_seq_cst: __asm__ __volatile__ ("mb" ::: "memory"); default:; } } template<> inline void platform_atomic_thread_fence(memory_order order) { switch(order) { case memory_order_acquire: case memory_order_consume: case memory_order_release: case memory_order_acq_rel: case memory_order_seq_cst: __asm__ __volatile__ ("mb" ::: "memory"); default:; } } template class atomic_alpha_32 { public: typedef T integral_type; BOOST_CONSTEXPR atomic_alpha_32(T v) BOOST_NOEXCEPT: i(v) {} atomic_alpha_32() {} T load(memory_order order=memory_order_seq_cst) const volatile BOOST_NOEXCEPT { T v=*reinterpret_cast(&i); fence_after(order); return v; } void store(T v, memory_order order=memory_order_seq_cst) volatile BOOST_NOEXCEPT { fence_before(order); *reinterpret_cast(&i)=(int)v; } bool compare_exchange_weak( T &expected, T desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { fence_before(success_order); int current, success; __asm__ __volatile__( "1: ldl_l %2, %4\n" "cmpeq %2, %0, %3\n" "mov %2, %0\n" "beq %3, 3f\n" "stl_c %1, %4\n" "2:\n" ".subsection 2\n" "3: mov %3, %1\n" "br 2b\n" ".previous\n" : "+&r" (expected), "+&r" (desired), "=&r"(current), "=&r"(success) : "m" (i) : ); if (desired) fence_after(success_order); else fence_after(failure_order); return desired; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT {return true;} protected: inline T fetch_add_var(T c, memory_order order) volatile BOOST_NOEXCEPT { fence_before(order); T original, modified; __asm__ __volatile__( "1: ldl_l %0, %2\n" "addl %0, %3, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), "=&r" (modified) : "m" (i), "r" (c) : ); fence_after(order); return original; } inline T fetch_inc(memory_order order) volatile BOOST_NOEXCEPT { fence_before(order); int original, modified; __asm__ __volatile__( "1: ldl_l %0, %2\n" "addl %0, 1, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), "=&r" (modified) : "m" (i) : ); fence_after(order); return original; } inline T fetch_dec(memory_order order) volatile BOOST_NOEXCEPT { fence_before(order); int original, modified; __asm__ __volatile__( "1: ldl_l %0, %2\n" "subl %0, 1, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), "=&r" (modified) : "m" (i) : ); fence_after(order); return original; } private: T i; }; template class atomic_alpha_64 { public: typedef T integral_type; BOOST_CONSTEXPR atomic_alpha_64(T v) BOOST_NOEXCEPT: i(v) {} atomic_alpha_64() {} T load(memory_order order=memory_order_seq_cst) const volatile { T v=*reinterpret_cast(&i); fence_after(order); return v; } void store(T v, memory_order order=memory_order_seq_cst) volatile BOOST_NOEXCEPT { fence_before(order); *reinterpret_cast(&i)=v; } bool compare_exchange_weak( T &expected, T desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { fence_before(success_order); int current, success; __asm__ __volatile__( "1: ldq_l %2, %4\n" "cmpeq %2, %0, %3\n" "mov %2, %0\n" "beq %3, 3f\n" "stq_c %1, %4\n" "2:\n" ".subsection 2\n" "3: mov %3, %1\n" "br 2b\n" ".previous\n" : "+&r" (expected), "+&r" (desired), "=&r"(current), "=&r"(success) : "m" (i) : ); if (desired) fence_after(success_order); else fence_after(failure_order); return desired; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT {return true;} protected: inline T fetch_add_var(T c, memory_order order) volatile BOOST_NOEXCEPT { fence_before(order); T original, modified; __asm__ __volatile__( "1: ldq_l %0, %2\n" "addq %0, %3, %1\n" "stq_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), "=&r" (modified) : "m" (i), "r" (c) : ); fence_after(order); return original; } inline T fetch_inc(memory_order order) volatile BOOST_NOEXCEPT { fence_before(order); T original, modified; __asm__ __volatile__( "1: ldq_l %0, %2\n" "addq %0, 1, %1\n" "stq_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), "=&r" (modified) : "m" (i) : ); fence_after(order); return original; } inline T fetch_dec(memory_order order) volatile BOOST_NOEXCEPT { fence_before(order); T original, modified; __asm__ __volatile__( "1: ldq_l %0, %2\n" "subq %0, 1, %1\n" "stq_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), "=&r" (modified) : "m" (i) : ); fence_after(order); return original; } private: T i; }; template class platform_atomic_integral : public build_atomic_from_typical > > { public: typedef build_atomic_from_typical > > super; BOOST_CONSTEXPR platform_atomic_integral(T v) BOOST_NOEXCEPT: super(v) {} platform_atomic_integral(void) {} }; template class platform_atomic_integral : public build_atomic_from_typical > > { public: typedef build_atomic_from_typical > > super; BOOST_CONSTEXPR platform_atomic_integral(T v) BOOST_NOEXCEPT: super(v) {} platform_atomic_integral(void) {} }; template class platform_atomic_integral : public build_atomic_from_larger_type, T> { public: typedef build_atomic_from_larger_type, T> super; BOOST_CONSTEXPR platform_atomic_integral(T v) BOOST_NOEXCEPT: super(v) {} platform_atomic_integral(void) {} }; template class platform_atomic_integral : public build_atomic_from_larger_type, T> { public: typedef build_atomic_from_larger_type, T> super; BOOST_CONSTEXPR platform_atomic_integral(T v) BOOST_NOEXCEPT: super(v) {} platform_atomic_integral(void) {} }; } } } #endif passenger-4.0.37/ext/boost/atomic/detail/gcc-armv6plus.hpp000644 000765 000024 00000017272 12233035540 024073 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_GCC_ARMV6PLUS_HPP #define BOOST_ATOMIC_DETAIL_GCC_ARMV6PLUS_HPP // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Copyright (c) 2009 Helge Bahmann // Copyright (c) 2009 Phil Endecott // Copyright (c) 2013 Tim Blechmann // ARM Code by Phil Endecott, based on other architectures. #include #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif // From the ARM Architecture Reference Manual for architecture v6: // // LDREX{} , [] // Specifies the destination register for the memory word addressed by // Specifies the register containing the address. // // STREX{} , , [] // Specifies the destination register for the returned status value. // 0 if the operation updates memory // 1 if the operation fails to update memory // Specifies the register containing the word to be stored to memory. // Specifies the register containing the address. // Rd must not be the same register as Rm or Rn. // // ARM v7 is like ARM v6 plus: // There are half-word and byte versions of the LDREX and STREX instructions, // LDREXH, LDREXB, STREXH and STREXB. // There are also double-word versions, LDREXD and STREXD. // (Actually it looks like these are available from version 6k onwards.) // FIXME these are not yet used; should be mostly a matter of copy-and-paste. // I think you can supply an immediate offset to the address. // // A memory barrier is effected using a "co-processor 15" instruction, // though a separate assembler mnemonic is available for it in v7. namespace boost { namespace atomics { namespace detail { // "Thumb 1" is a subset of the ARM instruction set that uses a 16-bit encoding. It // doesn't include all instructions and in particular it doesn't include the co-processor // instruction used for the memory barrier or the load-locked/store-conditional // instructions. So, if we're compiling in "Thumb 1" mode, we need to wrap all of our // asm blocks with code to temporarily change to ARM mode. // // You can only change between ARM and Thumb modes when branching using the bx instruction. // bx takes an address specified in a register. The least significant bit of the address // indicates the mode, so 1 is added to indicate that the destination code is Thumb. // A temporary register is needed for the address and is passed as an argument to these // macros. It must be one of the "low" registers accessible to Thumb code, specified // using the "l" attribute in the asm statement. // // Architecture v7 introduces "Thumb 2", which does include (almost?) all of the ARM // instruction set. So in v7 we don't need to change to ARM mode; we can write "universal // assembler" which will assemble to Thumb 2 or ARM code as appropriate. The only thing // we need to do to make this "universal" assembler mode work is to insert "IT" instructions // to annotate the conditional instructions. These are ignored in other modes (e.g. v6), // so they can always be present. #if defined(__thumb__) && !defined(__ARM_ARCH_7A__) // FIXME also other v7 variants. #define BOOST_ATOMIC_ARM_ASM_START(TMPREG) "adr " #TMPREG ", 1f\n" "bx " #TMPREG "\n" ".arm\n" ".align 4\n" "1: " #define BOOST_ATOMIC_ARM_ASM_END(TMPREG) "adr " #TMPREG ", 1f + 1\n" "bx " #TMPREG "\n" ".thumb\n" ".align 2\n" "1: " #else // The tmpreg is wasted in this case, which is non-optimal. #define BOOST_ATOMIC_ARM_ASM_START(TMPREG) #define BOOST_ATOMIC_ARM_ASM_END(TMPREG) #endif #if defined(__ARM_ARCH_7A__) // FIXME ditto. #define BOOST_ATOMIC_ARM_DMB "dmb\n" #else #define BOOST_ATOMIC_ARM_DMB "mcr\tp15, 0, r0, c7, c10, 5\n" #endif inline void arm_barrier(void) { int brtmp; __asm__ __volatile__ ( BOOST_ATOMIC_ARM_ASM_START(%0) BOOST_ATOMIC_ARM_DMB BOOST_ATOMIC_ARM_ASM_END(%0) : "=&l" (brtmp) :: "memory" ); } inline void platform_fence_before(memory_order order) { switch(order) { case memory_order_release: case memory_order_acq_rel: case memory_order_seq_cst: arm_barrier(); case memory_order_consume: default:; } } inline void platform_fence_after(memory_order order) { switch(order) { case memory_order_acquire: case memory_order_acq_rel: case memory_order_seq_cst: arm_barrier(); default:; } } inline void platform_fence_before_store(memory_order order) { platform_fence_before(order); } inline void platform_fence_after_store(memory_order order) { if (order == memory_order_seq_cst) arm_barrier(); } inline void platform_fence_after_load(memory_order order) { platform_fence_after(order); } template inline bool platform_cmpxchg32(T & expected, T desired, volatile T * ptr) { int success; int tmp; __asm__ ( BOOST_ATOMIC_ARM_ASM_START(%2) "mov %1, #0\n" // success = 0 "ldrex %0, %3\n" // expected' = *(&i) "teq %0, %4\n" // flags = expected'==expected "ittt eq\n" "strexeq %2, %5, %3\n" // if (flags.equal) *(&i) = desired, tmp = !OK "teqeq %2, #0\n" // if (flags.equal) flags = tmp==0 "moveq %1, #1\n" // if (flags.equal) success = 1 BOOST_ATOMIC_ARM_ASM_END(%2) : "=&r" (expected), // %0 "=&r" (success), // %1 "=&l" (tmp), // %2 "+Q" (*ptr) // %3 : "r" (expected), // %4 "r" (desired) // %5 : "cc" ); return success; } } } #define BOOST_ATOMIC_THREAD_FENCE 2 inline void atomic_thread_fence(memory_order order) { switch(order) { case memory_order_acquire: case memory_order_release: case memory_order_acq_rel: case memory_order_seq_cst: atomics::detail::arm_barrier(); default:; } } #define BOOST_ATOMIC_SIGNAL_FENCE 2 inline void atomic_signal_fence(memory_order) { __asm__ __volatile__ ("" ::: "memory"); } class atomic_flag { private: atomic_flag(const atomic_flag &) /* = delete */ ; atomic_flag & operator=(const atomic_flag &) /* = delete */ ; uint32_t v_; public: BOOST_CONSTEXPR atomic_flag(void) BOOST_NOEXCEPT : v_(0) {} void clear(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { atomics::detail::platform_fence_before_store(order); const_cast(v_) = 0; atomics::detail::platform_fence_after_store(order); } bool test_and_set(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { atomics::detail::platform_fence_before(order); uint32_t expected = v_; do { if (expected == 1) break; } while (!atomics::detail::platform_cmpxchg32(expected, (uint32_t)1, &v_)); atomics::detail::platform_fence_after(order); return expected; } }; #define BOOST_ATOMIC_FLAG_LOCK_FREE 2 } #undef BOOST_ATOMIC_ARM_ASM_START #undef BOOST_ATOMIC_ARM_ASM_END #include #if !defined(BOOST_ATOMIC_FORCE_FALLBACK) #define BOOST_ATOMIC_CHAR_LOCK_FREE 2 #define BOOST_ATOMIC_CHAR16_T_LOCK_FREE 2 #define BOOST_ATOMIC_CHAR32_T_LOCK_FREE 2 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 2 #define BOOST_ATOMIC_SHORT_LOCK_FREE 2 #define BOOST_ATOMIC_INT_LOCK_FREE 2 #define BOOST_ATOMIC_LONG_LOCK_FREE 2 #define BOOST_ATOMIC_LLONG_LOCK_FREE 0 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_BOOL_LOCK_FREE 2 #include #endif /* !defined(BOOST_ATOMIC_FORCE_FALLBACK) */ #endif passenger-4.0.37/ext/boost/atomic/detail/gcc-cas.hpp000644 000765 000024 00000007527 12233035540 022704 0ustar00honglistaff000000 000000 // Copyright (c) 2011 Helge Bahmann // Copyright (c) 2013 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Use the gnu builtin __sync_val_compare_and_swap to build // atomic operations for 32 bit and smaller. #ifndef BOOST_ATOMIC_DETAIL_GENERIC_CAS_HPP #define BOOST_ATOMIC_DETAIL_GENERIC_CAS_HPP #include #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { #define BOOST_ATOMIC_THREAD_FENCE 2 inline void atomic_thread_fence(memory_order order) { switch(order) { case memory_order_relaxed: break; case memory_order_release: case memory_order_consume: case memory_order_acquire: case memory_order_acq_rel: case memory_order_seq_cst: __sync_synchronize(); break; } } namespace atomics { namespace detail { inline void platform_fence_before(memory_order) { /* empty, as compare_and_swap is synchronizing already */ } inline void platform_fence_after(memory_order) { /* empty, as compare_and_swap is synchronizing already */ } inline void platform_fence_before_store(memory_order order) { switch(order) { case memory_order_relaxed: case memory_order_acquire: case memory_order_consume: break; case memory_order_release: case memory_order_acq_rel: case memory_order_seq_cst: __sync_synchronize(); break; } } inline void platform_fence_after_store(memory_order order) { if (order == memory_order_seq_cst) __sync_synchronize(); } inline void platform_fence_after_load(memory_order order) { switch(order) { case memory_order_relaxed: case memory_order_release: break; case memory_order_consume: case memory_order_acquire: case memory_order_acq_rel: case memory_order_seq_cst: __sync_synchronize(); break; } } template inline bool platform_cmpxchg32_strong(T & expected, T desired, volatile T * ptr) { T found = __sync_val_compare_and_swap(ptr, expected, desired); bool success = (found == expected); expected = found; return success; } class atomic_flag { private: atomic_flag(const atomic_flag &) /* = delete */ ; atomic_flag & operator=(const atomic_flag &) /* = delete */ ; uint32_t v_; public: BOOST_CONSTEXPR atomic_flag(void) BOOST_NOEXCEPT : v_(0) {} void clear(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { atomics::detail::platform_fence_before_store(order); const_cast(v_) = 0; atomics::detail::platform_fence_after_store(order); } bool test_and_set(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { atomics::detail::platform_fence_before(order); uint32_t expected = v_; do { if (expected == 1) break; } while (!atomics::detail::platform_cmpxchg32(expected, (uint32_t)1, &v_)); atomics::detail::platform_fence_after(order); return expected; } }; #define BOOST_ATOMIC_FLAG_LOCK_FREE 2 } } } #include #if !defined(BOOST_ATOMIC_FORCE_FALLBACK) #define BOOST_ATOMIC_CHAR_LOCK_FREE 2 #define BOOST_ATOMIC_SHORT_LOCK_FREE 2 #define BOOST_ATOMIC_INT_LOCK_FREE 2 #define BOOST_ATOMIC_LONG_LOCK_FREE (sizeof(long) <= 4 ? 2 : 0) #define BOOST_ATOMIC_LLONG_LOCK_FREE (sizeof(long long) <= 4 ? 2 : 0) #define BOOST_ATOMIC_POINTER_LOCK_FREE (sizeof(void *) <= 4 ? 2 : 0) #define BOOST_ATOMIC_BOOL_LOCK_FREE 2 #include #endif /* !defined(BOOST_ATOMIC_FORCE_FALLBACK) */ #endif passenger-4.0.37/ext/boost/atomic/detail/gcc-ppc.hpp000644 000765 000024 00000222305 12233035540 022711 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_GCC_PPC_HPP #define BOOST_ATOMIC_DETAIL_GCC_PPC_HPP // Copyright (c) 2009 Helge Bahmann // Copyright (c) 2013 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif /* Refer to: Motorola: "Programming Environments Manual for 32-Bit Implementations of the PowerPC Architecture", Appendix E: "Synchronization Programming Examples" for an explanation of what is going on here (can be found on the web at various places by the name "MPCFPE32B.pdf", Google is your friend...) Most of the atomic operations map to instructions in a relatively straight-forward fashion, but "load"s may at first glance appear a bit strange as they map to: lwz %rX, addr cmpw %rX, %rX bne- 1f 1: That is, the CPU is forced to perform a branch that "formally" depends on the value retrieved from memory. This scheme has an overhead of about 1-2 clock cycles per load, but it allows to map "acquire" to the "isync" instruction instead of "sync" uniformly and for all type of atomic operations. Since "isync" has a cost of about 15 clock cycles, while "sync" hast a cost of about 50 clock cycles, the small penalty to atomic loads more than compensates for this. Byte- and halfword-sized atomic values are realized by encoding the value to be represented into a word, performing sign/zero extension as appropriate. This means that after add/sub operations the value needs fixing up to accurately preserve the wrap-around semantic of the smaller type. (Nothing special needs to be done for the bit-wise and the "exchange type" operators as the compiler already sees to it that values carried in registers are extended appropriately and everything falls into place naturally). The register constraint "b" instructs gcc to use any register except r0; this is sometimes required because the encoding for r0 is used to signify "constant zero" in a number of instructions, making r0 unusable in this place. For simplicity this constraint is used everywhere since I am to lazy to look this up on a per-instruction basis, and ppc has enough registers for this not to pose a problem. */ namespace boost { namespace atomics { namespace detail { inline void ppc_fence_before(memory_order order) { switch(order) { case memory_order_release: case memory_order_acq_rel: #if defined(__powerpc64__) __asm__ __volatile__ ("lwsync" ::: "memory"); break; #endif case memory_order_seq_cst: __asm__ __volatile__ ("sync" ::: "memory"); default:; } } inline void ppc_fence_after(memory_order order) { switch(order) { case memory_order_acquire: case memory_order_acq_rel: case memory_order_seq_cst: __asm__ __volatile__ ("isync"); case memory_order_consume: __asm__ __volatile__ ("" ::: "memory"); default:; } } inline void ppc_fence_after_store(memory_order order) { switch(order) { case memory_order_seq_cst: __asm__ __volatile__ ("sync"); default:; } } } } class atomic_flag { private: atomic_flag(const atomic_flag &) /* = delete */ ; atomic_flag & operator=(const atomic_flag &) /* = delete */ ; uint32_t v_; public: BOOST_CONSTEXPR atomic_flag(void) BOOST_NOEXCEPT : v_(0) {} void clear(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { atomics::detail::ppc_fence_before(order); const_cast(v_) = 0; atomics::detail::ppc_fence_after_store(order); } bool test_and_set(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { uint32_t original; atomics::detail::ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y1\n" "stwcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (1) : "cr0" ); atomics::detail::ppc_fence_after(order); return original; } }; } /* namespace boost */ #define BOOST_ATOMIC_FLAG_LOCK_FREE 2 #include #if !defined(BOOST_ATOMIC_FORCE_FALLBACK) #define BOOST_ATOMIC_CHAR_LOCK_FREE 2 #define BOOST_ATOMIC_CHAR16_T_LOCK_FREE 2 #define BOOST_ATOMIC_CHAR32_T_LOCK_FREE 2 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 2 #define BOOST_ATOMIC_SHORT_LOCK_FREE 2 #define BOOST_ATOMIC_INT_LOCK_FREE 2 #define BOOST_ATOMIC_LONG_LOCK_FREE 2 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #if defined(__powerpc64__) #define BOOST_ATOMIC_LLONG_LOCK_FREE 2 #else #define BOOST_ATOMIC_LLONG_LOCK_FREE 0 #endif #define BOOST_ATOMIC_BOOL_LOCK_FREE 2 /* Would like to move the slow-path of failed compare_exchange (that clears the "success" bit) out-of-line. gcc can in principle do that using ".subsection"/".previous", but Apple's binutils seemingly does not understand that. Therefore wrap the "clear" of the flag in a macro and let it remain in-line for Apple */ #if !defined(__APPLE__) #define BOOST_ATOMIC_ASM_SLOWPATH_CLEAR \ "9:\n" \ ".subsection 2\n" \ "2: addi %1,0,0\n" \ "b 9b\n" \ ".previous\n" \ #else #define BOOST_ATOMIC_ASM_SLOWPATH_CLEAR \ "b 9f\n" \ "2: addi %1,0,0\n" \ "9:\n" \ #endif namespace boost { namespace atomics { namespace detail { /* integral types */ template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef int32_t storage_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { ppc_fence_before(order); __asm__ ( "stw %1, %0\n" : "+m"(v_) : "r" (v) ); ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v; __asm__ __volatile__ ( "lwz %0, %1\n" "cmpw %0, %0\n" "bne- 1f\n" "1:\n" : "=&r" (v) : "m" (v_) ); ppc_fence_after(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y1\n" "stwcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (v) : "cr0" ); ppc_fence_after(order); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "0: lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "add %1,%0,%3\n" "extsb %1, %1\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "sub %1,%0,%3\n" "extsb %1, %1\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "and %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "or %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "xor %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { ppc_fence_before(order); __asm__ ( "stw %1, %0\n" : "+m"(v_) : "r" (v) ); ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v; __asm__ __volatile__ ( "lwz %0, %1\n" "cmpw %0, %0\n" "bne- 1f\n" "1:\n" : "=&r" (v) : "m" (v_) ); ppc_fence_after(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y1\n" "stwcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (v) : "cr0" ); ppc_fence_after(order); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "0: lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "add %1,%0,%3\n" "rlwinm %1, %1, 0, 0xff\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "sub %1,%0,%3\n" "rlwinm %1, %1, 0, 0xff\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "and %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "or %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "xor %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef int32_t storage_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { ppc_fence_before(order); __asm__ ( "stw %1, %0\n" : "+m"(v_) : "r" (v) ); ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v; __asm__ __volatile__ ( "lwz %0, %1\n" "cmpw %0, %0\n" "bne- 1f\n" "1:\n" : "=&r" (v) : "m" (v_) ); ppc_fence_after(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y1\n" "stwcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (v) : "cr0" ); ppc_fence_after(order); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "0: lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "add %1,%0,%3\n" "extsh %1, %1\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "sub %1,%0,%3\n" "extsh %1, %1\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "and %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "or %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "xor %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { ppc_fence_before(order); __asm__ ( "stw %1, %0\n" : "+m"(v_) : "r" (v) ); ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v; __asm__ __volatile__ ( "lwz %0, %1\n" "cmpw %0, %0\n" "bne- 1f\n" "1:\n" : "=&r" (v) : "m" (v_) ); ppc_fence_after(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y1\n" "stwcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (v) : "cr0" ); ppc_fence_after(order); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "0: lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "add %1,%0,%3\n" "rlwinm %1, %1, 0, 0xffff\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "sub %1,%0,%3\n" "rlwinm %1, %1, 0, 0xffff\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "and %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "or %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "xor %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { ppc_fence_before(order); const_cast(v_) = v; ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); __asm__ __volatile__ ( "cmpw %0, %0\n" "bne- 1f\n" "1:\n" : "+b"(v) : : "cr0" ); ppc_fence_after(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y1\n" "stwcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (v) : "cr0" ); ppc_fence_after(order); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "0: lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "add %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "sub %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "and %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "or %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "xor %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; #if defined(__powerpc64__) template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { ppc_fence_before(order); const_cast(v_) = v; ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); __asm__ __volatile__ ( "cmpd %0, %0\n" "bne- 1f\n" "1:\n" : "+b"(v) : : "cr0" ); ppc_fence_after(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original; ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y1\n" "stdcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (v) : "cr0" ); ppc_fence_after(order); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "ldarx %0,%y2\n" "cmpd %0, %3\n" "bne- 2f\n" "stdcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "0: ldarx %0,%y2\n" "cmpd %0, %3\n" "bne- 2f\n" "stdcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y2\n" "add %1,%0,%3\n" "stdcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y2\n" "sub %1,%0,%3\n" "stdcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y2\n" "and %1,%0,%3\n" "stdcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y2\n" "or %1,%0,%3\n" "stdcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y2\n" "xor %1,%0,%3\n" "stdcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; #endif /* pointer types */ #if !defined(__powerpc64__) template class base_atomic { typedef base_atomic this_type; typedef ptrdiff_t difference_type; typedef void * value_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { ppc_fence_before(order); __asm__ ( "stw %1, %0\n" : "+m" (v_) : "r" (v) ); ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v; __asm__ ( "lwz %0, %1\n" "cmpw %0, %0\n" "bne- 1f\n" "1:\n" : "=r"(v) : "m"(v_) : "cr0" ); ppc_fence_after(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y1\n" "stwcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (v) : "cr0" ); ppc_fence_after(order); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "0: lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "add %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "sub %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } BOOST_ATOMIC_DECLARE_VOID_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T * value_type; typedef ptrdiff_t difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { ppc_fence_before(order); __asm__ ( "stw %1, %0\n" : "+m" (v_) : "r" (v) ); ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v; __asm__ ( "lwz %0, %1\n" "cmpw %0, %0\n" "bne- 1f\n" "1:\n" : "=r"(v) : "m"(v_) : "cr0" ); ppc_fence_after(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y1\n" "stwcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (v) : "cr0" ); ppc_fence_after(order); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "0: lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { v = v * sizeof(*v_); value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "add %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { v = v * sizeof(*v_); value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y2\n" "sub %1,%0,%3\n" "stwcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; #else template class base_atomic { typedef base_atomic this_type; typedef ptrdiff_t difference_type; typedef void * value_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { ppc_fence_before(order); __asm__ ( "std %1, %0\n" : "+m" (v_) : "r" (v) ); ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v; __asm__ ( "ld %0, %1\n" "cmpd %0, %0\n" "bne- 1f\n" "1:\n" : "=r"(v) : "m"(v_) : "cr0" ); ppc_fence_after(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original; ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y1\n" "stdcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (v) : "cr0" ); ppc_fence_after(order); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "ldarx %0,%y2\n" "cmpd %0, %3\n" "bne- 2f\n" "stdcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "0: ldarx %0,%y2\n" "cmpd %0, %3\n" "bne- 2f\n" "stdcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y2\n" "add %1,%0,%3\n" "stdcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y2\n" "sub %1,%0,%3\n" "stdcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } BOOST_ATOMIC_DECLARE_VOID_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T * value_type; typedef ptrdiff_t difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { ppc_fence_before(order); __asm__ ( "std %1, %0\n" : "+m" (v_) : "r" (v) ); ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v; __asm__ ( "ld %0, %1\n" "cmpd %0, %0\n" "bne- 1f\n" "1:\n" : "=r"(v) : "m"(v_) : "cr0" ); ppc_fence_after(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type original; ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y1\n" "stdcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (v) : "cr0" ); ppc_fence_after(order); return original; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "ldarx %0,%y2\n" "cmpd %0, %3\n" "bne- 2f\n" "stdcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { int success; ppc_fence_before(success_order); __asm__( "0: ldarx %0,%y2\n" "cmpd %0, %3\n" "bne- 2f\n" "stdcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected), "=&b" (success), "+Z"(v_) : "b" (expected), "b" (desired) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); return success; } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { v = v * sizeof(*v_); value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y2\n" "add %1,%0,%3\n" "stdcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { v = v * sizeof(*v_); value_type original, tmp; ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y2\n" "sub %1,%0,%3\n" "stdcx. %1,%y2\n" "bne- 1b\n" : "=&b" (original), "=&b" (tmp), "+Z"(v_) : "b" (v) : "cc"); ppc_fence_after(order); return original; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; #endif /* generic */ template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); ppc_fence_before(order); __asm__ ( "stw %1, %0\n" : "+m" (v_) : "r" (tmp) ); ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { storage_type tmp; __asm__ __volatile__ ( "lwz %0, %1\n" "cmpw %0, %0\n" "bne- 1f\n" "1:\n" : "=r"(tmp) : "m"(v_) : "cr0" ); ppc_fence_after(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0, original; memcpy(&tmp, &v, sizeof(value_type)); ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y1\n" "stwcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (tmp) : "cr0" ); ppc_fence_after(order); value_type res; memcpy(&res, &original, sizeof(value_type)); return res; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); int success; ppc_fence_before(success_order); __asm__( "lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected_s), "=&b" (success), "+Z"(v_) : "b" (expected_s), "b" (desired_s) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); return success; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); int success; ppc_fence_before(success_order); __asm__( "0: lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected_s), "=&b" (success), "+Z"(v_) : "b" (expected_s), "b" (desired_s) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); return success; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); ppc_fence_before(order); __asm__ ( "stw %1, %0\n" : "+m" (v_) : "r" (tmp) ); ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { storage_type tmp; __asm__ __volatile__ ( "lwz %0, %1\n" "cmpw %0, %0\n" "bne- 1f\n" "1:\n" : "=r"(tmp) : "m"(v_) : "cr0" ); ppc_fence_after(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0, original; memcpy(&tmp, &v, sizeof(value_type)); ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y1\n" "stwcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (tmp) : "cr0" ); ppc_fence_after(order); value_type res; memcpy(&res, &original, sizeof(value_type)); return res; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); int success; ppc_fence_before(success_order); __asm__( "lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected_s), "=&b" (success), "+Z"(v_) : "b" (expected_s), "b" (desired_s) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); return success; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); int success; ppc_fence_before(success_order); __asm__( "0: lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected_s), "=&b" (success), "+Z"(v_) : "b" (expected_s), "b" (desired_s) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); return success; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); ppc_fence_before(order); __asm__ ( "stw %1, %0\n" : "+m" (v_) : "r" (tmp) ); ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { storage_type tmp; __asm__ __volatile__ ( "lwz %0, %1\n" "cmpw %0, %0\n" "bne- 1f\n" "1:\n" : "=r"(tmp) : "m"(v_) : "cr0" ); ppc_fence_after(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0, original; memcpy(&tmp, &v, sizeof(value_type)); ppc_fence_before(order); __asm__ ( "1:\n" "lwarx %0,%y1\n" "stwcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (tmp) : "cr0" ); ppc_fence_after(order); value_type res; memcpy(&res, &original, sizeof(value_type)); return res; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); int success; ppc_fence_before(success_order); __asm__( "lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected_s), "=&b" (success), "+Z"(v_) : "b" (expected_s), "b" (desired_s) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); return success; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); int success; ppc_fence_before(success_order); __asm__( "0: lwarx %0,%y2\n" "cmpw %0, %3\n" "bne- 2f\n" "stwcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected_s), "=&b" (success), "+Z"(v_) : "b" (expected_s), "b" (desired_s) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); return success; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; #if defined(__powerpc64__) template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint64_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp; memcpy(&tmp, &v, sizeof(value_type)); ppc_fence_before(order); __asm__ ( "std %1, %0\n" : "+m" (v_) : "r" (tmp) ); ppc_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { storage_type tmp; __asm__ __volatile__ ( "ld %0, %1\n" "cmpd %0, %0\n" "bne- 1f\n" "1:\n" : "=r"(tmp) : "m"(v_) : "cr0" ); ppc_fence_after(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0, original; memcpy(&tmp, &v, sizeof(value_type)); ppc_fence_before(order); __asm__ ( "1:\n" "ldarx %0,%y1\n" "stdcx. %2,%y1\n" "bne- 1b\n" : "=&b" (original), "+Z"(v_) : "b" (tmp) : "cr0" ); ppc_fence_after(order); value_type res; memcpy(&res, &original, sizeof(value_type)); return res; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s, desired_s; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); int success; ppc_fence_before(success_order); __asm__( "ldarx %0,%y2\n" "cmpd %0, %3\n" "bne- 2f\n" "stdcx. %4,%y2\n" "bne- 2f\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected_s), "=&b" (success), "+Z"(v_) : "b" (expected_s), "b" (desired_s) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); return success; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s, desired_s; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); int success; ppc_fence_before(success_order); __asm__( "0: ldarx %0,%y2\n" "cmpd %0, %3\n" "bne- 2f\n" "stdcx. %4,%y2\n" "bne- 0b\n" "addi %1,0,1\n" "1:" BOOST_ATOMIC_ASM_SLOWPATH_CLEAR : "=&b" (expected_s), "=&b" (success), "+Z"(v_) : "b" (expected_s), "b" (desired_s) : "cr0" ); if (success) ppc_fence_after(success_order); else ppc_fence_after(failure_order); memcpy(&expected, &expected_s, sizeof(value_type)); return success; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; #endif } } #define BOOST_ATOMIC_THREAD_FENCE 2 inline void atomic_thread_fence(memory_order order) { switch(order) { case memory_order_acquire: __asm__ __volatile__ ("isync" ::: "memory"); break; case memory_order_release: #if defined(__powerpc64__) __asm__ __volatile__ ("lwsync" ::: "memory"); break; #endif case memory_order_acq_rel: case memory_order_seq_cst: __asm__ __volatile__ ("sync" ::: "memory"); default:; } } #define BOOST_ATOMIC_SIGNAL_FENCE 2 inline void atomic_signal_fence(memory_order order) { switch(order) { case memory_order_acquire: case memory_order_release: case memory_order_acq_rel: case memory_order_seq_cst: __asm__ __volatile__ ("" ::: "memory"); break; default:; } } } #endif /* !defined(BOOST_ATOMIC_FORCE_FALLBACK) */ #endif passenger-4.0.37/ext/boost/atomic/detail/gcc-sparcv9.hpp000644 000765 000024 00000110333 12233035540 023513 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_GCC_SPARC_HPP #define BOOST_ATOMIC_DETAIL_GCC_SPARC_HPP // Copyright (c) 2010 Helge Bahmann // Copyright (c) 2013 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { inline void platform_fence_before(memory_order order) { switch(order) { case memory_order_relaxed: case memory_order_acquire: case memory_order_consume: break; case memory_order_release: case memory_order_acq_rel: __asm__ __volatile__ ("membar #StoreStore | #LoadStore" ::: "memory"); /* release */ break; case memory_order_seq_cst: __asm__ __volatile__ ("membar #Sync" ::: "memory"); /* seq */ break; } } inline void platform_fence_after(memory_order order) { switch(order) { case memory_order_relaxed: case memory_order_release: break; case memory_order_acquire: case memory_order_acq_rel: __asm__ __volatile__ ("membar #LoadLoad | #LoadStore" ::: "memory"); /* acquire */ break; case memory_order_consume: /* consume */ break; case memory_order_seq_cst: __asm__ __volatile__ ("membar #Sync" ::: "memory"); /* seq */ break; default:; } } inline void platform_fence_after_store(memory_order order) { switch(order) { case memory_order_seq_cst: __asm__ __volatile__ ("membar #Sync" ::: "memory"); default:; } } inline void platform_fence_after_load(memory_order order) { platform_fence_after(order); } } } class atomic_flag { private: atomic_flag(const atomic_flag &) /* = delete */ ; atomic_flag & operator=(const atomic_flag &) /* = delete */ ; uint32_t v_; public: BOOST_CONSTEXPR atomic_flag(void) BOOST_NOEXCEPT : v_(0) {} void clear(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { atomics::detail::platform_fence_before(order); const_cast(v_) = 0; atomics::detail::platform_fence_after_store(order); } bool test_and_set(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { atomics::detail::platform_fence_before(order); uint32_t tmp = 1; __asm__ ( "cas [%1], %2, %0" : "+r" (tmp) : "r" (&v_), "r" (0) : "memory" ); atomics::detail::platform_fence_after(order); return tmp; } }; } /* namespace boost */ #define BOOST_ATOMIC_FLAG_LOCK_FREE 2 #include #if !defined(BOOST_ATOMIC_FORCE_FALLBACK) #define BOOST_ATOMIC_CHAR_LOCK_FREE 2 #define BOOST_ATOMIC_CHAR16_T_LOCK_FREE 2 #define BOOST_ATOMIC_CHAR32_T_LOCK_FREE 2 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 2 #define BOOST_ATOMIC_SHORT_LOCK_FREE 2 #define BOOST_ATOMIC_INT_LOCK_FREE 2 #define BOOST_ATOMIC_LONG_LOCK_FREE 2 #define BOOST_ATOMIC_LLONG_LOCK_FREE 0 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_BOOL_LOCK_FREE 2 namespace boost { #define BOOST_ATOMIC_THREAD_FENCE 2 inline void atomic_thread_fence(memory_order order) { switch(order) { case memory_order_relaxed: break; case memory_order_release: __asm__ __volatile__ ("membar #StoreStore | #LoadStore" ::: "memory"); break; case memory_order_acquire: __asm__ __volatile__ ("membar #LoadLoad | #LoadStore" ::: "memory"); break; case memory_order_acq_rel: __asm__ __volatile__ ("membar #LoadLoad | #LoadStore | #StoreStore" ::: "memory"); break; case memory_order_consume: break; case memory_order_seq_cst: __asm__ __volatile__ ("membar #Sync" ::: "memory"); break; default:; } } #define BOOST_ATOMIC_SIGNAL_FENCE 2 inline void atomic_signal_fence(memory_order) { __asm__ __volatile__ ("" ::: "memory"); } namespace atomics { namespace detail { /* integral types */ template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; typedef int32_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp + v, order, memory_order_relaxed)); return tmp; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp - v, order, memory_order_relaxed)); return tmp; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, v, order, memory_order_relaxed)); return tmp; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); storage_type desired_s = desired; __asm__ ( "cas [%1], %2, %0" : "+r" (desired_s) : "r" (&v_), "r" ((storage_type)expected) : "memory" ); desired = desired_s; bool success = (desired == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = desired; return success; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp & v, order, memory_order_relaxed)); return tmp; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp | v, order, memory_order_relaxed)); return tmp; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp ^ v, order, memory_order_relaxed)); return tmp; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; typedef uint32_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp + v, order, memory_order_relaxed)); return tmp; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp - v, order, memory_order_relaxed)); return tmp; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, v, order, memory_order_relaxed)); return tmp; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); storage_type desired_s = desired; __asm__ ( "cas [%1], %2, %0" : "+r" (desired_s) : "r" (&v_), "r" ((storage_type)expected) : "memory" ); desired = desired_s; bool success = (desired == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = desired; return success; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp & v, order, memory_order_relaxed)); return tmp; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp | v, order, memory_order_relaxed)); return tmp; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp ^ v, order, memory_order_relaxed)); return tmp; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; typedef int32_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp + v, order, memory_order_relaxed)); return tmp; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp - v, order, memory_order_relaxed)); return tmp; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, v, order, memory_order_relaxed)); return tmp; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); storage_type desired_s = desired; __asm__ ( "cas [%1], %2, %0" : "+r" (desired_s) : "r" (&v_), "r" ((storage_type)expected) : "memory" ); desired = desired_s; bool success = (desired == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = desired; return success; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp & v, order, memory_order_relaxed)); return tmp; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp | v, order, memory_order_relaxed)); return tmp; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp ^ v, order, memory_order_relaxed)); return tmp; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; typedef uint32_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp + v, order, memory_order_relaxed)); return tmp; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp - v, order, memory_order_relaxed)); return tmp; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, v, order, memory_order_relaxed)); return tmp; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); storage_type desired_s = desired; __asm__ ( "cas [%1], %2, %0" : "+r" (desired_s) : "r" (&v_), "r" ((storage_type)expected) : "memory" ); desired = desired_s; bool success = (desired == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = desired; return success; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp & v, order, memory_order_relaxed)); return tmp; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp | v, order, memory_order_relaxed)); return tmp; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp ^ v, order, memory_order_relaxed)); return tmp; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst)const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp + v, order, memory_order_relaxed)); return tmp; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp - v, order, memory_order_relaxed)); return tmp; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, v, order, memory_order_relaxed)); return tmp; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); __asm__ ( "cas [%1], %2, %0" : "+r" (desired) : "r" (&v_), "r" (expected) : "memory" ); bool success = (desired == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = desired; return success; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp & v, order, memory_order_relaxed)); return tmp; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp | v, order, memory_order_relaxed)); return tmp; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp ^ v, order, memory_order_relaxed)); return tmp; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; /* pointer types */ template class base_atomic { typedef base_atomic this_type; typedef ptrdiff_t difference_type; typedef void * value_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst)const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, v, order, memory_order_relaxed)); return tmp; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); __asm__ ( "cas [%1], %2, %0" : "+r" (desired) : "r" (&v_), "r" (expected) : "memory" ); bool success = (desired == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = desired; return success; } bool compare_exchange_weak(value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, (char*)tmp + v, order, memory_order_relaxed)); return tmp; } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, (char*)tmp - v, order, memory_order_relaxed)); return tmp; } BOOST_ATOMIC_DECLARE_VOID_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T * value_type; typedef ptrdiff_t difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); const_cast(v_) = v; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst)const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, v, order, memory_order_relaxed)); return tmp; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { platform_fence_before(success_order); __asm__ ( "cas [%1], %2, %0" : "+r" (desired) : "r" (&v_), "r" (expected) : "memory" ); bool success = (desired == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = desired; return success; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp + v, order, memory_order_relaxed)); return tmp; } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, tmp - v, order, memory_order_relaxed)); return tmp; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; /* generic types */ template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before(order); const_cast(v_) = tmp; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst)const volatile BOOST_NOEXCEPT { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, v, order, memory_order_relaxed)); return tmp; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); platform_fence_before(success_order); __asm__ ( "cas [%1], %2, %0" : "+r" (desired_s) : "r" (&v_), "r" (expected_s) : "memory" ); bool success = (desired_s == expected_s); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); memcpy(&expected, &desired_s, sizeof(value_type)); return success; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before(order); const_cast(v_) = tmp; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst)const volatile BOOST_NOEXCEPT { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, v, order, memory_order_relaxed)); return tmp; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); platform_fence_before(success_order); __asm__ ( "cas [%1], %2, %0" : "+r" (desired_s) : "r" (&v_), "r" (expected_s) : "memory" ); bool success = (desired_s == expected_s); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); memcpy(&expected, &desired_s, sizeof(value_type)); return success; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before(order); const_cast(v_) = tmp; platform_fence_after_store(order); } value_type load(memory_order order = memory_order_seq_cst)const volatile BOOST_NOEXCEPT { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); do {} while(!compare_exchange_weak(tmp, v, order, memory_order_relaxed)); return tmp; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); platform_fence_before(success_order); __asm__ ( "cas [%1], %2, %0" : "+r" (desired_s) : "r" (&v_), "r" (expected_s) : "memory" ); bool success = (desired_s == expected_s); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); memcpy(&expected, &desired_s, sizeof(value_type)); return success; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; #endif /* !defined(BOOST_ATOMIC_FORCE_FALLBACK) */ } } } #endif passenger-4.0.37/ext/boost/atomic/detail/gcc-x86.hpp000644 000765 000024 00000137565 12233035540 022571 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_GCC_X86_HPP #define BOOST_ATOMIC_DETAIL_GCC_X86_HPP // Copyright (c) 2009 Helge Bahmann // Copyright (c) 2012 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { #if defined(__x86_64__) || defined(__SSE2__) # define BOOST_ATOMIC_X86_FENCE_INSTR "mfence\n" #else # define BOOST_ATOMIC_X86_FENCE_INSTR "lock ; addl $0, (%%esp)\n" #endif #define BOOST_ATOMIC_X86_PAUSE() __asm__ __volatile__ ("pause\n") #if defined(__i386__) &&\ (\ defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) ||\ defined(__i586__) || defined(__i686__) || defined(__pentium4__) || defined(__nocona__) || defined(__core2__) || defined(__corei7__) ||\ defined(__k6__) || defined(__athlon__) || defined(__k8__) || defined(__amdfam10__) || defined(__bdver1__) || defined(__bdver2__) || defined(__bdver3__) || defined(__btver1__) || defined(__btver2__)\ ) #define BOOST_ATOMIC_X86_HAS_CMPXCHG8B 1 #endif inline void platform_fence_before(memory_order order) { switch(order) { case memory_order_relaxed: case memory_order_acquire: case memory_order_consume: break; case memory_order_release: case memory_order_acq_rel: __asm__ __volatile__ ("" ::: "memory"); /* release */ break; case memory_order_seq_cst: __asm__ __volatile__ ("" ::: "memory"); /* seq */ break; default:; } } inline void platform_fence_after(memory_order order) { switch(order) { case memory_order_relaxed: case memory_order_release: break; case memory_order_acquire: case memory_order_acq_rel: __asm__ __volatile__ ("" ::: "memory"); /* acquire */ break; case memory_order_consume: /* consume */ break; case memory_order_seq_cst: __asm__ __volatile__ ("" ::: "memory"); /* seq */ break; default:; } } inline void platform_fence_after_load(memory_order order) { switch(order) { case memory_order_relaxed: case memory_order_release: break; case memory_order_acquire: case memory_order_acq_rel: __asm__ __volatile__ ("" ::: "memory"); break; case memory_order_consume: break; case memory_order_seq_cst: __asm__ __volatile__ ("" ::: "memory"); break; default:; } } inline void platform_fence_before_store(memory_order order) { switch(order) { case memory_order_relaxed: case memory_order_acquire: case memory_order_consume: break; case memory_order_release: case memory_order_acq_rel: __asm__ __volatile__ ("" ::: "memory"); /* release */ break; case memory_order_seq_cst: __asm__ __volatile__ ("" ::: "memory"); /* seq */ break; default:; } } inline void platform_fence_after_store(memory_order order) { switch(order) { case memory_order_relaxed: case memory_order_release: break; case memory_order_acquire: case memory_order_acq_rel: __asm__ __volatile__ ("" ::: "memory"); /* acquire */ break; case memory_order_consume: /* consume */ break; case memory_order_seq_cst: __asm__ __volatile__ ("" ::: "memory"); /* seq */ break; default:; } } } } class atomic_flag { private: atomic_flag(const atomic_flag &) /* = delete */ ; atomic_flag & operator=(const atomic_flag &) /* = delete */ ; uint32_t v_; public: BOOST_CONSTEXPR atomic_flag(void) BOOST_NOEXCEPT : v_(0) {} bool test_and_set(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { uint32_t v = 1; atomics::detail::platform_fence_before(order); __asm__ __volatile__ ( "xchgl %0, %1" : "+r" (v), "+m" (v_) ); atomics::detail::platform_fence_after(order); return v; } void clear(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order == memory_order_seq_cst) { uint32_t v = 0; __asm__ __volatile__ ( "xchgl %0, %1" : "+r" (v), "+m" (v_) ); } else { atomics::detail::platform_fence_before(order); v_ = 0; } } }; } /* namespace boost */ #define BOOST_ATOMIC_FLAG_LOCK_FREE 2 #include #if !defined(BOOST_ATOMIC_FORCE_FALLBACK) #define BOOST_ATOMIC_CHAR_LOCK_FREE 2 #define BOOST_ATOMIC_CHAR16_T_LOCK_FREE 2 #define BOOST_ATOMIC_CHAR32_T_LOCK_FREE 2 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 2 #define BOOST_ATOMIC_SHORT_LOCK_FREE 2 #define BOOST_ATOMIC_INT_LOCK_FREE 2 #define BOOST_ATOMIC_LONG_LOCK_FREE 2 #if defined(__x86_64__) || defined(BOOST_ATOMIC_X86_HAS_CMPXCHG8B) #define BOOST_ATOMIC_LLONG_LOCK_FREE 2 #else #define BOOST_ATOMIC_LLONG_LOCK_FREE 0 #endif #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_BOOL_LOCK_FREE 2 namespace boost { #define BOOST_ATOMIC_THREAD_FENCE 2 inline void atomic_thread_fence(memory_order order) { switch(order) { case memory_order_relaxed: break; case memory_order_release: __asm__ __volatile__ ("" ::: "memory"); break; case memory_order_acquire: __asm__ __volatile__ ("" ::: "memory"); break; case memory_order_acq_rel: __asm__ __volatile__ ("" ::: "memory"); break; case memory_order_consume: break; case memory_order_seq_cst: __asm__ __volatile__ (BOOST_ATOMIC_X86_FENCE_INSTR ::: "memory"); break; default:; } } #define BOOST_ATOMIC_SIGNAL_FENCE 2 inline void atomic_signal_fence(memory_order) { __asm__ __volatile__ ("" ::: "memory"); } namespace atomics { namespace detail { template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { platform_fence_before(order); const_cast(v_) = v; } else { exchange(v, order); } } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "lock ; xaddb %0, %1" : "+q" (v), "+m" (v_) ); platform_fence_after(order); return v; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return fetch_add(-v, order); } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "xchgb %0, %1" : "+q" (v), "+m" (v_) ); platform_fence_after(order); return v; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { value_type previous = expected; platform_fence_before(success_order); __asm__ ( "lock ; cmpxchgb %2, %1" : "+a" (previous), "+m" (v_) : "q" (desired) ); bool success = (previous == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = previous; return success; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); for(; !compare_exchange_weak(tmp, tmp & v, order, memory_order_relaxed);) { BOOST_ATOMIC_X86_PAUSE(); } return tmp; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); for (; !compare_exchange_weak(tmp, tmp | v, order, memory_order_relaxed);) { BOOST_ATOMIC_X86_PAUSE(); } return tmp; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); for (; !compare_exchange_weak(tmp, tmp ^ v, order, memory_order_relaxed);) { BOOST_ATOMIC_X86_PAUSE(); } return tmp; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { platform_fence_before(order); const_cast(v_) = v; } else { exchange(v, order); } } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "lock ; xaddw %0, %1" : "+q" (v), "+m" (v_) ); platform_fence_after(order); return v; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return fetch_add(-v, order); } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "xchgw %0, %1" : "+q" (v), "+m" (v_) ); platform_fence_after(order); return v; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { value_type previous = expected; platform_fence_before(success_order); __asm__ ( "lock ; cmpxchgw %2, %1" : "+a" (previous), "+m" (v_) : "q" (desired) ); bool success = (previous == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = previous; return success; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); for (; !compare_exchange_weak(tmp, tmp & v, order, memory_order_relaxed);) { BOOST_ATOMIC_X86_PAUSE(); } return tmp; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); for (; !compare_exchange_weak(tmp, tmp | v, order, memory_order_relaxed);) { BOOST_ATOMIC_X86_PAUSE(); } return tmp; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); for (; !compare_exchange_weak(tmp, tmp ^ v, order, memory_order_relaxed);) { BOOST_ATOMIC_X86_PAUSE(); } return tmp; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { platform_fence_before(order); const_cast(v_) = v; } else { exchange(v, order); } } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "lock ; xaddl %0, %1" : "+r" (v), "+m" (v_) ); platform_fence_after(order); return v; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return fetch_add(-v, order); } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "xchgl %0, %1" : "+r" (v), "+m" (v_) ); platform_fence_after(order); return v; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { value_type previous = expected; platform_fence_before(success_order); __asm__ ( "lock ; cmpxchgl %2, %1" : "+a" (previous), "+m" (v_) : "r" (desired) ); bool success = (previous == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = previous; return success; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); for (; !compare_exchange_weak(tmp, tmp & v, order, memory_order_relaxed);) { BOOST_ATOMIC_X86_PAUSE(); } return tmp; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); for (; !compare_exchange_weak(tmp, tmp | v, order, memory_order_relaxed);) { BOOST_ATOMIC_X86_PAUSE(); } return tmp; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); for (; !compare_exchange_weak(tmp, tmp ^ v, order, memory_order_relaxed);) { BOOST_ATOMIC_X86_PAUSE(); } return tmp; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; #if defined(__x86_64__) template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef T difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { platform_fence_before(order); const_cast(v_) = v; } else { exchange(v, order); } } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "lock ; xaddq %0, %1" : "+r" (v), "+m" (v_) ); platform_fence_after(order); return v; } value_type fetch_sub(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return fetch_add(-v, order); } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "xchgq %0, %1" : "+r" (v), "+m" (v_) ); platform_fence_after(order); return v; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { value_type previous = expected; platform_fence_before(success_order); __asm__ ( "lock ; cmpxchgq %2, %1" : "+a" (previous), "+m" (v_) : "r" (desired) ); bool success = (previous == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = previous; return success; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); for (; !compare_exchange_weak(tmp, tmp & v, order, memory_order_relaxed);) { BOOST_ATOMIC_X86_PAUSE(); } return tmp; } value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); for (; !compare_exchange_weak(tmp, tmp | v, order, memory_order_relaxed);) { BOOST_ATOMIC_X86_PAUSE(); } return tmp; } value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { value_type tmp = load(memory_order_relaxed); for (; !compare_exchange_weak(tmp, tmp ^ v, order, memory_order_relaxed);) { BOOST_ATOMIC_X86_PAUSE(); } return tmp; } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_INTEGRAL_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; #endif /* pointers */ #if !defined(__x86_64__) template class base_atomic { typedef base_atomic this_type; typedef ptrdiff_t difference_type; typedef void * value_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { platform_fence_before(order); const_cast(v_) = v; } else { exchange(v, order); } } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "xchgl %0, %1" : "+r" (v), "+m" (v_) ); platform_fence_after(order); return v; } bool compare_exchange_strong(value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { value_type previous = expected; platform_fence_before(success_order); __asm__ ( "lock ; cmpxchgl %2, %1" : "+a" (previous), "+m" (v_) : "r" (desired) ); bool success = (previous == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = previous; return success; } bool compare_exchange_weak(value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "lock ; xaddl %0, %1" : "+r" (v), "+m" (v_) ); platform_fence_after(order); return reinterpret_cast(v); } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return fetch_add(-v, order); } BOOST_ATOMIC_DECLARE_VOID_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T * value_type; typedef ptrdiff_t difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { platform_fence_before(order); const_cast(v_) = v; } else { exchange(v, order); } } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "xchgl %0, %1" : "+r" (v), "+m" (v_) ); platform_fence_after(order); return v; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { value_type previous = expected; platform_fence_before(success_order); __asm__ ( "lock ; cmpxchgl %2, %1" : "+a" (previous), "+m" (v_) : "r" (desired) ); bool success = (previous == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = previous; return success; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { v = v * sizeof(*v_); platform_fence_before(order); __asm__ ( "lock ; xaddl %0, %1" : "+r" (v), "+m" (v_) ); platform_fence_after(order); return reinterpret_cast(v); } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return fetch_add(-v, order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; #else template class base_atomic { typedef base_atomic this_type; typedef ptrdiff_t difference_type; typedef void * value_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { platform_fence_before(order); const_cast(v_) = v; } else { exchange(v, order); } } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "xchgq %0, %1" : "+r" (v), "+m" (v_) ); platform_fence_after(order); return v; } bool compare_exchange_strong(value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { value_type previous = expected; platform_fence_before(success_order); __asm__ ( "lock ; cmpxchgq %2, %1" : "+a" (previous), "+m" (v_) : "r" (desired) ); bool success = (previous == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = previous; return success; } bool compare_exchange_weak(value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "lock ; xaddq %0, %1" : "+r" (v), "+m" (v_) ); platform_fence_after(order); return reinterpret_cast(v); } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return fetch_add(-v, order); } BOOST_ATOMIC_DECLARE_VOID_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T * value_type; typedef ptrdiff_t difference_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : v_(v) {} base_atomic(void) {} void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { platform_fence_before(order); const_cast(v_) = v; } else { exchange(v, order); } } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { value_type v = const_cast(v_); platform_fence_after_load(order); return v; } value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { platform_fence_before(order); __asm__ ( "xchgq %0, %1" : "+r" (v), "+m" (v_) ); platform_fence_after(order); return v; } bool compare_exchange_strong( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { value_type previous = expected; platform_fence_before(success_order); __asm__ ( "lock ; cmpxchgq %2, %1" : "+a" (previous), "+m" (v_) : "r" (desired) ); bool success = (previous == expected); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); expected = previous; return success; } bool compare_exchange_weak( value_type & expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { v = v * sizeof(*v_); platform_fence_before(order); __asm__ ( "lock ; xaddq %0, %1" : "+r" (v), "+m" (v_) ); platform_fence_after(order); return reinterpret_cast(v); } value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return fetch_add(-v, order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_POINTER_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; value_type v_; }; #endif template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint8_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(reinterpret_cast(v)) {} base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { storage_type tmp; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before(order); const_cast(v_) = tmp; } else { exchange(v, order); } } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before(order); __asm__ ( "xchgb %0, %1" : "+q" (tmp), "+m" (v_) ); platform_fence_after(order); value_type res; memcpy(&res, &tmp, sizeof(value_type)); return res; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s, desired_s; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); storage_type previous_s = expected_s; platform_fence_before(success_order); __asm__ ( "lock ; cmpxchgb %2, %1" : "+a" (previous_s), "+m" (v_) : "q" (desired_s) ); bool success = (previous_s == expected_s); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); memcpy(&expected, &previous_s, sizeof(value_type)); return success; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint16_t storage_type; public: BOOST_CONSTEXPR explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(reinterpret_cast(v)) {} base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { storage_type tmp; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before(order); const_cast(v_) = tmp; } else { exchange(v, order); } } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before(order); __asm__ ( "xchgw %0, %1" : "+q" (tmp), "+m" (v_) ); platform_fence_after(order); value_type res; memcpy(&res, &tmp, sizeof(value_type)); return res; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s, desired_s; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); storage_type previous_s = expected_s; platform_fence_before(success_order); __asm__ ( "lock ; cmpxchgw %2, %1" : "+a" (previous_s), "+m" (v_) : "q" (desired_s) ); bool success = (previous_s == expected_s); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); memcpy(&expected, &previous_s, sizeof(value_type)); return success; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint32_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before(order); const_cast(v_) = tmp; } else { exchange(v, order); } } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before(order); __asm__ ( "xchgl %0, %1" : "+q" (tmp), "+m" (v_) ); platform_fence_after(order); value_type res; memcpy(&res, &tmp, sizeof(value_type)); return res; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); storage_type previous_s = expected_s; platform_fence_before(success_order); __asm__ ( "lock ; cmpxchgl %2, %1" : "+a" (previous_s), "+m" (v_) : "q" (desired_s) ); bool success = (previous_s == expected_s); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); memcpy(&expected, &previous_s, sizeof(value_type)); return success; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; #if defined(__x86_64__) template class base_atomic { typedef base_atomic this_type; typedef T value_type; typedef uint64_t storage_type; public: explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0) { memcpy(&v_, &v, sizeof(value_type)); } base_atomic(void) {} void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before(order); const_cast(v_) = tmp; } else { exchange(v, order); } } value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { storage_type tmp = const_cast(v_); platform_fence_after_load(order); value_type v; memcpy(&v, &tmp, sizeof(value_type)); return v; } value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { storage_type tmp = 0; memcpy(&tmp, &v, sizeof(value_type)); platform_fence_before(order); __asm__ ( "xchgq %0, %1" : "+q" (tmp), "+m" (v_) ); platform_fence_after(order); value_type res; memcpy(&res, &tmp, sizeof(value_type)); return res; } bool compare_exchange_strong( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { storage_type expected_s = 0, desired_s = 0; memcpy(&expected_s, &expected, sizeof(value_type)); memcpy(&desired_s, &desired, sizeof(value_type)); storage_type previous_s = expected_s; platform_fence_before(success_order); __asm__ ( "lock ; cmpxchgq %2, %1" : "+a" (previous_s), "+m" (v_) : "q" (desired_s) ); bool success = (previous_s == expected_s); if (success) platform_fence_after(success_order); else platform_fence_after(failure_order); memcpy(&expected, &previous_s, sizeof(value_type)); return success; } bool compare_exchange_weak( value_type & expected, value_type const& desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, success_order, failure_order); } bool is_lock_free(void) const volatile BOOST_NOEXCEPT { return true; } BOOST_ATOMIC_DECLARE_BASE_OPERATORS private: base_atomic(const base_atomic &) /* = delete */ ; void operator=(const base_atomic &) /* = delete */ ; storage_type v_; }; #endif #if !defined(__x86_64__) && defined(BOOST_ATOMIC_X86_HAS_CMPXCHG8B) template inline bool platform_cmpxchg64_strong(T & expected, T desired, volatile T * ptr) BOOST_NOEXCEPT { #ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 const T oldval = __sync_val_compare_and_swap(ptr, expected, desired); const bool result = (oldval == expected); expected = oldval; return result; #else uint32_t scratch; T prev = expected; /* Make sure ebx is saved and restored properly in case this object is compiled as "position independent". Since programmers on x86 tend to forget specifying -DPIC or similar, always assume PIC. To make this work uniformly even in the non-PIC case, setup register constraints such that ebx can not be used by accident e.g. as base address for the variable to be modified. Accessing "scratch" should always be okay, as it can only be placed on the stack (and therefore accessed through ebp or esp only). In theory, could push/pop ebx onto/off the stack, but movs to a prepared stack slot turn out to be faster. */ __asm__ __volatile__ ( "movl %%ebx, %1\n" "movl %2, %%ebx\n" "lock; cmpxchg8b 0(%4)\n" "movl %1, %%ebx\n" : "=A" (prev), "=m" (scratch) : "D" ((uint32_t)desired), "c" ((uint32_t)(desired >> 32)), "S" (ptr), "0" (prev) : "memory"); bool success = (prev == expected); expected = prev; return success; #endif } // Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3A, 8.1.1. Guaranteed Atomic Operations: // // The Pentium processor (and newer processors since) guarantees that the following additional memory operations will always be carried out atomically: // * Reading or writing a quadword aligned on a 64-bit boundary // // Luckily, the memory is almost always 8-byte aligned in our case because atomic<> uses 64 bit native types for storage and dynamic memory allocations // have at least 8 byte alignment. The only unfortunate case is when atomic is placeod on the stack and it is not 8-byte aligned (like on 32 bit Windows). template inline void platform_store64(T value, volatile T * ptr) BOOST_NOEXCEPT { if (((uint32_t)ptr & 0x00000007) == 0) { #if defined(__SSE2__) __asm__ __volatile__ ( "movq %1, %%xmm0\n\t" "movq %%xmm0, %0\n\t" : "=m" (*ptr) : "m" (value) : "memory", "xmm0" ); #else __asm__ __volatile__ ( "fildll %1\n\t" "fistpll %0\n\t" : "=m" (*ptr) : "m" (value) : "memory" ); #endif } else { T expected = *ptr; while (!platform_cmpxchg64_strong(expected, value, ptr)) { BOOST_ATOMIC_X86_PAUSE(); } } } template inline T platform_load64(const volatile T * ptr) BOOST_NOEXCEPT { T value = T(); if (((uint32_t)ptr & 0x00000007) == 0) { #if defined(__SSE2__) __asm__ __volatile__ ( "movq %1, %%xmm0\n\t" "movq %%xmm0, %0\n\t" : "=m" (value) : "m" (*ptr) : "memory", "xmm0" ); #else __asm__ __volatile__ ( "fildll %1\n\t" "fistpll %0\n\t" : "=m" (value) : "m" (*ptr) : "memory" ); #endif } else { // We don't care for comparison result here; the previous value will be stored into value anyway. platform_cmpxchg64_strong(value, value, const_cast(ptr)); } return value; } #endif } } } /* pull in 64-bit atomic type using cmpxchg8b above */ #if !defined(__x86_64__) && defined(BOOST_ATOMIC_X86_HAS_CMPXCHG8B) #include #endif #endif /* !defined(BOOST_ATOMIC_FORCE_FALLBACK) */ #endif passenger-4.0.37/ext/boost/atomic/detail/generic-cas.hpp000644 000765 000024 00000014060 12233035540 023552 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_GENERIC_CAS_HPP #define BOOST_ATOMIC_DETAIL_GENERIC_CAS_HPP // Copyright (c) 2009 Helge Bahmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include #include #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif /* fallback implementation for various compilation targets; this is *not* efficient, particularly because all operations are fully fenced (full memory barriers before and after each operation) */ #if defined(__GNUC__) namespace boost { namespace atomics { namespace detail { inline int32_t fenced_compare_exchange_strong_32(volatile int32_t *ptr, int32_t expected, int32_t desired) { return __sync_val_compare_and_swap_4(ptr, expected, desired); } #define BOOST_ATOMIC_HAVE_CAS32 1 #if defined(__amd64__) || defined(__i686__) inline int64_t fenced_compare_exchange_strong_64(int64_t *ptr, int64_t expected, int64_t desired) { return __sync_val_compare_and_swap_8(ptr, expected, desired); } #define BOOST_ATOMIC_HAVE_CAS64 1 #endif }}} #elif defined(__ICL) || defined(_MSC_VER) #if defined(_MSC_VER) #include #include #endif namespace boost { namespace atomics { namespace detail { inline int32_t fenced_compare_exchange_strong(int32_t *ptr, int32_t expected, int32_t desired) { return _InterlockedCompareExchange(reinterpret_cast(ptr), desired, expected); } #define BOOST_ATOMIC_HAVE_CAS32 1 #if defined(_WIN64) inline int64_t fenced_compare_exchange_strong(int64_t *ptr, int64_t expected, int64_t desired) { return _InterlockedCompareExchange64(ptr, desired, expected); } #define BOOST_ATOMIC_HAVE_CAS64 1 #endif }}} #elif (defined(__ICC) || defined(__ECC)) namespace boost { namespace atomics { namespace detail { inline int32_t fenced_compare_exchange_strong_32(int32_t *ptr, int32_t expected, int32_t desired) { return _InterlockedCompareExchange((void*)ptr, desired, expected); } #define BOOST_ATOMIC_HAVE_CAS32 1 #if defined(__x86_64) inline int64_t fenced_compare_exchange_strong(int64_t *ptr, int64_t expected, int64_t desired) { return cas64(ptr, expected, desired); } #define BOOST_ATOMIC_HAVE_CAS64 1 #elif defined(__ECC) //IA-64 version inline int64_t fenced_compare_exchange_strong(int64_t *ptr, int64_t expected, int64_t desired) { return _InterlockedCompareExchange64((void*)ptr, desired, expected); } #define BOOST_ATOMIC_HAVE_CAS64 1 #endif }}} #elif (defined(__SUNPRO_CC) && defined(__sparc)) #include namespace boost { namespace atomics { namespace detail { inline int32_t fenced_compare_exchange_strong_32(int32_t *ptr, int32_t expected, int32_t desired) { return atomic_cas_32((volatile unsigned int*)ptr, expected, desired); } #define BOOST_ATOMIC_HAVE_CAS32 1 /* FIXME: check for 64 bit mode */ inline int64_t fenced_compare_exchange_strong_64(int64_t *ptr, int64_t expected, int64_t desired) { return atomic_cas_64((volatile unsigned long long*)ptr, expected, desired); } #define BOOST_ATOMIC_HAVE_CAS64 1 }}} #endif namespace boost { namespace atomics { namespace detail { #ifdef BOOST_ATOMIC_HAVE_CAS32 template class atomic_generic_cas32 { private: typedef atomic_generic_cas32 this_type; public: explicit atomic_generic_cas32(T v) : i((int32_t)v) {} atomic_generic_cas32() {} T load(memory_order order=memory_order_seq_cst) const volatile { T expected=(T)i; do { } while(!const_cast(this)->compare_exchange_weak(expected, expected, order, memory_order_relaxed)); return expected; } void store(T v, memory_order order=memory_order_seq_cst) volatile { exchange(v); } bool compare_exchange_strong( T &expected, T desired, memory_order success_order, memory_order failure_order) volatile { T found; found=(T)fenced_compare_exchange_strong_32(&i, (int32_t)expected, (int32_t)desired); bool success=(found==expected); expected=found; return success; } bool compare_exchange_weak( T &expected, T desired, memory_order success_order, memory_order failure_order) volatile { return compare_exchange_strong(expected, desired, success_order, failure_order); } T exchange(T r, memory_order order=memory_order_seq_cst) volatile { T expected=(T)i; do { } while(!compare_exchange_weak(expected, r, order, memory_order_relaxed)); return expected; } bool is_lock_free(void) const volatile {return true;} typedef T integral_type; private: mutable int32_t i; }; template class platform_atomic_integral : public build_atomic_from_exchange > { public: typedef build_atomic_from_exchange > super; explicit platform_atomic_integral(T v) : super(v) {} platform_atomic_integral(void) {} }; template class platform_atomic_integral : public build_atomic_from_larger_type, T> { public: typedef build_atomic_from_larger_type, T> super; explicit platform_atomic_integral(T v) : super(v) {} platform_atomic_integral(void) {} }; template class platform_atomic_integral : public build_atomic_from_larger_type, T> { public: typedef build_atomic_from_larger_type, T> super; explicit platform_atomic_integral(T v) : super(v) {} platform_atomic_integral(void) {} }; #endif } } } #endif passenger-4.0.37/ext/boost/atomic/detail/interlocked.hpp000644 000765 000024 00000026322 12233035540 023701 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_INTERLOCKED_HPP #define BOOST_ATOMIC_DETAIL_INTERLOCKED_HPP // Copyright (c) 2009 Helge Bahmann // Copyright (c) 2012, 2013 Andrey Semashev // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif #if defined(_WIN32_WCE) || (defined(_MSC_VER) && _MSC_VER < 1400) #include #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) BOOST_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest), exchange, compare) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval) BOOST_INTERLOCKED_EXCHANGE((long*)(dest), newval) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, addend) BOOST_INTERLOCKED_EXCHANGE_ADD((long*)(dest), addend) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) BOOST_INTERLOCKED_EXCHANGE_POINTER(dest, newval) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_INTERLOCKED_EXCHANGE_ADD((long*)(dest), byte_offset)) #elif defined(_MSC_VER) && _MSC_VER >= 1400 #include #pragma intrinsic(_InterlockedCompareExchange) #pragma intrinsic(_InterlockedExchangeAdd) #pragma intrinsic(_InterlockedExchange) #pragma intrinsic(_InterlockedAnd) #pragma intrinsic(_InterlockedOr) #pragma intrinsic(_InterlockedXor) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) _InterlockedCompareExchange((long*)(dest), (long)(exchange), (long)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, addend) _InterlockedExchangeAdd((long*)(dest), (long)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval) _InterlockedExchange((long*)(dest), (long)(newval)) #define BOOST_ATOMIC_INTERLOCKED_AND(dest, arg) _InterlockedAnd((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR(dest, arg) _InterlockedOr((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR(dest, arg) _InterlockedXor((long*)(dest), (long)(arg)) #if _MSC_VER >= 1600 // MSVC 2010 and later provide intrinsics for 8 and 16 bit integers. // Note that for each bit count these macros must be either all defined or all not defined. // Otherwise atomic<> operations will be implemented inconsistently. #pragma intrinsic(_InterlockedCompareExchange8) #pragma intrinsic(_InterlockedExchangeAdd8) #pragma intrinsic(_InterlockedExchange8) #pragma intrinsic(_InterlockedAnd8) #pragma intrinsic(_InterlockedOr8) #pragma intrinsic(_InterlockedXor8) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8(dest, exchange, compare) _InterlockedCompareExchange8((char*)(dest), (char)(exchange), (char)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD8(dest, addend) _InterlockedExchangeAdd8((char*)(dest), (char)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE8(dest, newval) _InterlockedExchange8((char*)(dest), (char)(newval)) #define BOOST_ATOMIC_INTERLOCKED_AND8(dest, arg) _InterlockedAnd8((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR8(dest, arg) _InterlockedOr8((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR8(dest, arg) _InterlockedXor8((char*)(dest), (char)(arg)) #pragma intrinsic(_InterlockedCompareExchange16) #pragma intrinsic(_InterlockedExchangeAdd16) #pragma intrinsic(_InterlockedExchange16) #pragma intrinsic(_InterlockedAnd16) #pragma intrinsic(_InterlockedOr16) #pragma intrinsic(_InterlockedXor16) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16(dest, exchange, compare) _InterlockedCompareExchange16((short*)(dest), (short)(exchange), (short)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD16(dest, addend) _InterlockedExchangeAdd16((short*)(dest), (short)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE16(dest, newval) _InterlockedExchange16((short*)(dest), (short)(newval)) #define BOOST_ATOMIC_INTERLOCKED_AND16(dest, arg) _InterlockedAnd16((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR16(dest, arg) _InterlockedOr16((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR16(dest, arg) _InterlockedXor16((short*)(dest), (short)(arg)) #endif // _MSC_VER >= 1600 #if defined(_M_AMD64) || defined(_M_IA64) #pragma intrinsic(_InterlockedCompareExchange64) #pragma intrinsic(_InterlockedExchangeAdd64) #pragma intrinsic(_InterlockedExchange64) #pragma intrinsic(_InterlockedAnd64) #pragma intrinsic(_InterlockedOr64) #pragma intrinsic(_InterlockedXor64) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) _InterlockedCompareExchange64((__int64*)(dest), (__int64)(exchange), (__int64)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) _InterlockedExchangeAdd64((__int64*)(dest), (__int64)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) _InterlockedExchange64((__int64*)(dest), (__int64)(newval)) #define BOOST_ATOMIC_INTERLOCKED_AND64(dest, arg) _InterlockedAnd64((__int64*)(dest), (__int64)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR64(dest, arg) _InterlockedOr64((__int64*)(dest), (__int64)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR64(dest, arg) _InterlockedXor64((__int64*)(dest), (__int64)(arg)) #pragma intrinsic(_InterlockedCompareExchangePointer) #pragma intrinsic(_InterlockedExchangePointer) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) _InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) _InterlockedExchangePointer((void**)(dest), (void*)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64((long*)(dest), byte_offset)) #else // defined(_M_AMD64) || defined(_M_IA64) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) ((void*)_InterlockedCompareExchange((long*)(dest), (long)(exchange), (long)(compare))) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) ((void*)_InterlockedExchange((long*)(dest), (long)(newval))) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD((long*)(dest), byte_offset)) #endif // defined(_M_AMD64) || defined(_M_IA64) #else // defined(_MSC_VER) && _MSC_VER >= 1400 #if defined(BOOST_USE_WINDOWS_H) #include #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) InterlockedCompareExchange((long*)(dest), (long)(exchange), (long)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval) InterlockedExchange((long*)(dest), (long)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, addend) InterlockedExchangeAdd((long*)(dest), (long)(addend)) #if defined(_WIN64) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) InterlockedCompareExchange64((__int64*)(dest), (__int64)(exchange), (__int64)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) InterlockedExchange64((__int64*)(dest), (__int64)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) InterlockedExchangeAdd64((__int64*)(dest), (__int64)(addend)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) InterlockedExchangePointer((void**)(dest), (void*)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, byte_offset)) #else // defined(_WIN64) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) ((void*)BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, byte_offset)) #endif // defined(_WIN64) #else // defined(BOOST_USE_WINDOWS_H) #if defined(__MINGW64__) #define BOOST_ATOMIC_INTERLOCKED_IMPORT #else #define BOOST_ATOMIC_INTERLOCKED_IMPORT __declspec(dllimport) #endif namespace boost { namespace atomics { namespace detail { extern "C" { BOOST_ATOMIC_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange(long volatile*, long, long); BOOST_ATOMIC_INTERLOCKED_IMPORT long __stdcall InterlockedExchange(long volatile*, long); BOOST_ATOMIC_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd(long volatile*, long); #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) boost::atomics::detail::InterlockedCompareExchange((long*)(dest), (long)(exchange), (long)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval) boost::atomics::detail::InterlockedExchange((long*)(dest), (long)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, addend) boost::atomics::detail::InterlockedExchangeAdd((long*)(dest), (long)(addend)) #if defined(_WIN64) BOOST_ATOMIC_INTERLOCKED_IMPORT __int64 __stdcall InterlockedCompareExchange64(__int64 volatile*, __int64, __int64); BOOST_ATOMIC_INTERLOCKED_IMPORT __int64 __stdcall InterlockedExchange64(__int64 volatile*, __int64); BOOST_ATOMIC_INTERLOCKED_IMPORT __int64 __stdcall InterlockedExchangeAdd64(__int64 volatile*, __int64); BOOST_ATOMIC_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer(void* volatile *, void*, void*); BOOST_ATOMIC_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer(void* volatile *, void*); #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) boost::atomics::detail::InterlockedCompareExchange64((__int64*)(dest), (__int64)(exchange), (__int64)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) boost::atomics::detail::InterlockedExchange64((__int64*)(dest), (__int64)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) boost::atomics::detail::InterlockedExchangeAdd64((__int64*)(dest), (__int64)(addend)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) boost::atomics::detail::InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) boost::atomics::detail::InterlockedExchangePointer((void**)(dest), (void*)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, byte_offset)) #else // defined(_WIN64) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) ((void*)BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, byte_offset)) #endif // defined(_WIN64) } // extern "C" } // namespace detail } // namespace atomics } // namespace boost #undef BOOST_ATOMIC_INTERLOCKED_IMPORT #endif // defined(BOOST_USE_WINDOWS_H) #endif // defined(_MSC_VER) #endif passenger-4.0.37/ext/boost/atomic/detail/linux-arm.hpp000644 000765 000024 00000012246 12233035540 023312 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_LINUX_ARM_HPP #define BOOST_ATOMIC_DETAIL_LINUX_ARM_HPP // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Copyright (c) 2009, 2011 Helge Bahmann // Copyright (c) 2009 Phil Endecott // Copyright (c) 2013 Tim Blechmann // Linux-specific code by Phil Endecott // Different ARM processors have different atomic instructions. In particular, // architecture versions before v6 (which are still in widespread use, e.g. the // Intel/Marvell XScale chips like the one in the NSLU2) have only atomic swap. // On Linux the kernel provides some support that lets us abstract away from // these differences: it provides emulated CAS and barrier functions at special // addresses that are guaranteed not to be interrupted by the kernel. Using // this facility is slightly slower than inline assembler would be, but much // faster than a system call. // // While this emulated CAS is "strong" in the sense that it does not fail // "spuriously" (i.e.: it never fails to perform the exchange when the value // found equals the value expected), it does not return the found value on // failure. To satisfy the atomic API, compare_exchange_{weak|strong} must // return the found value on failure, and we have to manually load this value // after the emulated CAS reports failure. This in turn introduces a race // between the CAS failing (due to the "wrong" value being found) and subsequently // loading (which might turn up the "right" value). From an application's // point of view this looks like "spurious failure", and therefore the // emulated CAS is only good enough to provide compare_exchange_weak // semantics. #include #include #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { inline void arm_barrier(void) { void (*kernel_dmb)(void) = (void (*)(void)) 0xffff0fa0; kernel_dmb(); } inline void platform_fence_before(memory_order order) { switch(order) { case memory_order_release: case memory_order_acq_rel: case memory_order_seq_cst: arm_barrier(); case memory_order_consume: default:; } } inline void platform_fence_after(memory_order order) { switch(order) { case memory_order_acquire: case memory_order_acq_rel: case memory_order_seq_cst: arm_barrier(); default:; } } inline void platform_fence_before_store(memory_order order) { platform_fence_before(order); } inline void platform_fence_after_store(memory_order order) { if (order == memory_order_seq_cst) arm_barrier(); } inline void platform_fence_after_load(memory_order order) { platform_fence_after(order); } template inline bool platform_cmpxchg32(T & expected, T desired, volatile T * ptr) { typedef T (*kernel_cmpxchg32_t)(T oldval, T newval, volatile T * ptr); if (((kernel_cmpxchg32_t) 0xffff0fc0)(expected, desired, ptr) == 0) { return true; } else { expected = *ptr; return false; } } } } #define BOOST_ATOMIC_THREAD_FENCE 2 inline void atomic_thread_fence(memory_order order) { switch(order) { case memory_order_acquire: case memory_order_release: case memory_order_acq_rel: case memory_order_seq_cst: atomics::detail::arm_barrier(); default:; } } #define BOOST_ATOMIC_SIGNAL_FENCE 2 inline void atomic_signal_fence(memory_order) { __asm__ __volatile__ ("" ::: "memory"); } class atomic_flag { private: atomic_flag(const atomic_flag &) /* = delete */ ; atomic_flag & operator=(const atomic_flag &) /* = delete */ ; uint32_t v_; public: BOOST_CONSTEXPR atomic_flag(void) BOOST_NOEXCEPT : v_(0) {} void clear(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { atomics::detail::platform_fence_before_store(order); const_cast(v_) = 0; atomics::detail::platform_fence_after_store(order); } bool test_and_set(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { atomics::detail::platform_fence_before(order); uint32_t expected = v_; do { if (expected == 1) break; } while (!atomics::detail::platform_cmpxchg32(expected, (uint32_t)1, &v_)); atomics::detail::platform_fence_after(order); return expected; } }; #define BOOST_ATOMIC_FLAG_LOCK_FREE 2 } #include #if !defined(BOOST_ATOMIC_FORCE_FALLBACK) #define BOOST_ATOMIC_CHAR_LOCK_FREE 2 #define BOOST_ATOMIC_CHAR16_T_LOCK_FREE 2 #define BOOST_ATOMIC_CHAR32_T_LOCK_FREE 2 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 2 #define BOOST_ATOMIC_SHORT_LOCK_FREE 2 #define BOOST_ATOMIC_INT_LOCK_FREE 2 #define BOOST_ATOMIC_LONG_LOCK_FREE 2 #define BOOST_ATOMIC_LLONG_LOCK_FREE 0 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_BOOL_LOCK_FREE 2 #include #endif /* !defined(BOOST_ATOMIC_FORCE_FALLBACK) */ #endif passenger-4.0.37/ext/boost/atomic/detail/lockpool.hpp000644 000765 000024 00000003645 12233035540 023223 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_LOCKPOOL_HPP #define BOOST_ATOMIC_DETAIL_LOCKPOOL_HPP // Copyright (c) 2011 Helge Bahmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #ifndef BOOST_ATOMIC_FLAG_LOCK_FREE #include #endif #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { #ifndef BOOST_ATOMIC_FLAG_LOCK_FREE class lockpool { public: typedef mutex lock_type; class scoped_lock { private: lock_type& mtx_; scoped_lock(scoped_lock const&) /* = delete */; scoped_lock& operator=(scoped_lock const&) /* = delete */; public: explicit scoped_lock(const volatile void * addr) : mtx_(get_lock_for(addr)) { mtx_.lock(); } ~scoped_lock() { mtx_.unlock(); } }; private: static BOOST_ATOMIC_DECL lock_type& get_lock_for(const volatile void * addr); }; #else class lockpool { public: typedef atomic_flag lock_type; class scoped_lock { private: atomic_flag& flag_; uint8_t padding[128 - sizeof(atomic_flag)]; scoped_lock(const scoped_lock &) /* = delete */; scoped_lock& operator=(const scoped_lock &) /* = delete */; public: explicit scoped_lock(const volatile void * addr) : flag_(get_lock_for(addr)) { for (; flag_.test_and_set(memory_order_acquire);) { #if defined(BOOST_ATOMIC_X86_PAUSE) BOOST_ATOMIC_X86_PAUSE(); #endif } } ~scoped_lock(void) { flag_.clear(memory_order_release); } }; private: static BOOST_ATOMIC_DECL lock_type& get_lock_for(const volatile void * addr); }; #endif } } } #endif passenger-4.0.37/ext/boost/atomic/detail/platform.hpp000644 000765 000024 00000003357 12233035540 023225 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_PLATFORM_HPP #define BOOST_ATOMIC_DETAIL_PLATFORM_HPP // Copyright (c) 2009 Helge Bahmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Platform selection file #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) #include #elif 0 && defined(__GNUC__) && defined(__alpha__) /* currently does not work correctly */ #include #include #elif defined(__GNUC__) && (defined(__POWERPC__) || defined(__PPC__)) #include // This list of ARM architecture versions comes from Apple's arm/arch.h header. // I don't know how complete it is. #elif defined(__GNUC__) && (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \ || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \ || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_7A__)) #include #elif defined(__linux__) && defined(__arm__) #include #elif defined(__GNUC__) && defined(__sparc_v9__) #include #elif defined(BOOST_WINDOWS) || defined(_WIN32_CE) #include #elif 0 && defined(__GNUC__) /* currently does not work correctly */ #include #include #else #include #endif #endif passenger-4.0.37/ext/boost/atomic/detail/type-classification.hpp000644 000765 000024 00000001667 12233035540 025355 0ustar00honglistaff000000 000000 #ifndef BOOST_ATOMIC_DETAIL_TYPE_CLASSIFICATION_HPP #define BOOST_ATOMIC_DETAIL_TYPE_CLASSIFICATION_HPP // Copyright (c) 2011 Helge Bahmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #ifdef BOOST_ATOMIC_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { template::value> struct classify { typedef void type; }; template struct classify {typedef int type;}; template struct classify {typedef void* type;}; template struct storage_size_of { enum _ { size = sizeof(T), value = (size == 3 ? 4 : (size == 5 || size == 6 || size == 7 ? 8 : size)) }; }; }}} #endif passenger-4.0.37/ext/boost/algorithm/string/000755 000765 000024 00000000000 12233035540 021436 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/algorithm/string/case_conv.hpp000644 000765 000024 00000014031 12233035540 024106 0ustar00honglistaff000000 000000 // Boost string_algo library case_conv.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_CASE_CONV_HPP #define BOOST_STRING_CASE_CONV_HPP #include #include #include #include #include #include #include #include #include /*! \file Defines sequence case-conversion algorithms. Algorithms convert each element in the input sequence to the desired case using provided locales. */ namespace boost { namespace algorithm { // to_lower -----------------------------------------------// //! Convert to lower case /*! Each element of the input sequence is converted to lower case. The result is a copy of the input converted to lower case. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input range \param Loc A locale used for conversion \return An output iterator pointing just after the last inserted character or a copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template inline OutputIteratorT to_lower_copy( OutputIteratorT Output, const RangeT& Input, const std::locale& Loc=std::locale()) { return ::boost::algorithm::detail::transform_range_copy( Output, ::boost::as_literal(Input), ::boost::algorithm::detail::to_lowerF< typename range_value::type >(Loc)); } //! Convert to lower case /*! \overload */ template inline SequenceT to_lower_copy( const SequenceT& Input, const std::locale& Loc=std::locale()) { return ::boost::algorithm::detail::transform_range_copy( Input, ::boost::algorithm::detail::to_lowerF< typename range_value::type >(Loc)); } //! Convert to lower case /*! Each element of the input sequence is converted to lower case. The input sequence is modified in-place. \param Input A range \param Loc a locale used for conversion */ template inline void to_lower( WritableRangeT& Input, const std::locale& Loc=std::locale()) { ::boost::algorithm::detail::transform_range( ::boost::as_literal(Input), ::boost::algorithm::detail::to_lowerF< typename range_value::type >(Loc)); } // to_upper -----------------------------------------------// //! Convert to upper case /*! Each element of the input sequence is converted to upper case. The result is a copy of the input converted to upper case. It is returned as a sequence or copied to the output iterator \param Output An output iterator to which the result will be copied \param Input An input range \param Loc A locale used for conversion \return An output iterator pointing just after the last inserted character or a copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template inline OutputIteratorT to_upper_copy( OutputIteratorT Output, const RangeT& Input, const std::locale& Loc=std::locale()) { return ::boost::algorithm::detail::transform_range_copy( Output, ::boost::as_literal(Input), ::boost::algorithm::detail::to_upperF< typename range_value::type >(Loc)); } //! Convert to upper case /*! \overload */ template inline SequenceT to_upper_copy( const SequenceT& Input, const std::locale& Loc=std::locale()) { return ::boost::algorithm::detail::transform_range_copy( Input, ::boost::algorithm::detail::to_upperF< typename range_value::type >(Loc)); } //! Convert to upper case /*! Each element of the input sequence is converted to upper case. The input sequence is modified in-place. \param Input An input range \param Loc a locale used for conversion */ template inline void to_upper( WritableRangeT& Input, const std::locale& Loc=std::locale()) { ::boost::algorithm::detail::transform_range( ::boost::as_literal(Input), ::boost::algorithm::detail::to_upperF< typename range_value::type >(Loc)); } } // namespace algorithm // pull names to the boost namespace using algorithm::to_lower; using algorithm::to_lower_copy; using algorithm::to_upper; using algorithm::to_upper_copy; } // namespace boost #endif // BOOST_STRING_CASE_CONV_HPP passenger-4.0.37/ext/boost/algorithm/string/compare.hpp000644 000765 000024 00000014345 12233035540 023604 0ustar00honglistaff000000 000000 // Boost string_algo library compare.hpp header file -------------------------// // Copyright Pavol Droba 2002-2006. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_COMPARE_HPP #define BOOST_STRING_COMPARE_HPP #include #include /*! \file Defines element comparison predicates. Many algorithms in this library can take an additional argument with a predicate used to compare elements. This makes it possible, for instance, to have case insensitive versions of the algorithms. */ namespace boost { namespace algorithm { // is_equal functor -----------------------------------------------// //! is_equal functor /*! Standard STL equal_to only handle comparison between arguments of the same type. This is a less restrictive version which wraps operator ==. */ struct is_equal { //! Function operator /*! Compare two operands for equality */ template< typename T1, typename T2 > bool operator()( const T1& Arg1, const T2& Arg2 ) const { return Arg1==Arg2; } }; //! case insensitive version of is_equal /*! Case insensitive comparison predicate. Comparison is done using specified locales. */ struct is_iequal { //! Constructor /*! \param Loc locales used for comparison */ is_iequal( const std::locale& Loc=std::locale() ) : m_Loc( Loc ) {} //! Function operator /*! Compare two operands. Case is ignored. */ template< typename T1, typename T2 > bool operator()( const T1& Arg1, const T2& Arg2 ) const { #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) return std::toupper(Arg1)==std::toupper(Arg2); #else return std::toupper(Arg1,m_Loc)==std::toupper(Arg2,m_Loc); #endif } private: std::locale m_Loc; }; // is_less functor -----------------------------------------------// //! is_less functor /*! Convenient version of standard std::less. Operation is templated, therefore it is not required to specify the exact types upon the construction */ struct is_less { //! Functor operation /*! Compare two operands using > operator */ template< typename T1, typename T2 > bool operator()( const T1& Arg1, const T2& Arg2 ) const { return Arg1 bool operator()( const T1& Arg1, const T2& Arg2 ) const { #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) return std::toupper(Arg1)(Arg1,m_Loc)(Arg2,m_Loc); #endif } private: std::locale m_Loc; }; // is_not_greater functor -----------------------------------------------// //! is_not_greater functor /*! Convenient version of standard std::not_greater_to. Operation is templated, therefore it is not required to specify the exact types upon the construction */ struct is_not_greater { //! Functor operation /*! Compare two operands using > operator */ template< typename T1, typename T2 > bool operator()( const T1& Arg1, const T2& Arg2 ) const { return Arg1<=Arg2; } }; //! case insensitive version of is_not_greater /*! Case insensitive comparison predicate. Comparison is done using specified locales. */ struct is_not_igreater { //! Constructor /*! \param Loc locales used for comparison */ is_not_igreater( const std::locale& Loc=std::locale() ) : m_Loc( Loc ) {} //! Function operator /*! Compare two operands. Case is ignored. */ template< typename T1, typename T2 > bool operator()( const T1& Arg1, const T2& Arg2 ) const { #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) return std::toupper(Arg1)<=std::toupper(Arg2); #else return std::toupper(Arg1,m_Loc)<=std::toupper(Arg2,m_Loc); #endif } private: std::locale m_Loc; }; } // namespace algorithm // pull names to the boost namespace using algorithm::is_equal; using algorithm::is_iequal; using algorithm::is_less; using algorithm::is_iless; using algorithm::is_not_greater; using algorithm::is_not_igreater; } // namespace boost #endif // BOOST_STRING_COMPARE_HPP passenger-4.0.37/ext/boost/algorithm/string/concept.hpp000644 000765 000024 00000004443 12233035540 023607 0ustar00honglistaff000000 000000 // Boost string_algo library concept.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_CONCEPT_HPP #define BOOST_STRING_CONCEPT_HPP #include #include #include #include /*! \file Defines concepts used in string_algo library */ namespace boost { namespace algorithm { //! Finder concept /*! Defines the Finder concept. Finder is a functor which selects an arbitrary part of a string. Search is performed on the range specified by starting and ending iterators. Result of the find operation must be convertible to iterator_range. */ template struct FinderConcept { private: typedef iterator_range range; public: void constraints() { // Operation r=(*pF)(i,i); } private: range r; IteratorT i; FinderT* pF; }; // Finder_concept //! Formatter concept /*! Defines the Formatter concept. Formatter is a functor, which takes a result from a finder operation and transforms it in a specific way. Result must be a container supported by container_traits, or a reference to it. */ template struct FormatterConcept { public: void constraints() { // Operation ::boost::begin((*pFo)( (*pF)(i,i) )); ::boost::end((*pFo)( (*pF)(i,i) )); } private: IteratorT i; FinderT* pF; FormatterT *pFo; }; // FormatterConcept; } // namespace algorithm } // namespace boost #endif // BOOST_STRING_CONCEPT_HPP passenger-4.0.37/ext/boost/algorithm/string/config.hpp000644 000765 000024 00000001426 12233035540 023417 0ustar00honglistaff000000 000000 // Boost string_algo library config.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_CONFIG_HPP #define BOOST_STRING_CONFIG_HPP #include #include #ifdef BOOST_STRING_DEDUCED_TYPENAME # error "macro already defined!" #endif #define BOOST_STRING_TYPENAME BOOST_DEDUCED_TYPENAME // Metrowerks workaround #if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // 8.x #pragma parse_func_templ off #endif #endif // BOOST_STRING_CONFIG_HPP passenger-4.0.37/ext/boost/algorithm/string/constants.hpp000644 000765 000024 00000001747 12233035540 024174 0ustar00honglistaff000000 000000 // Boost string_algo library constants.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_CONSTANTS_HPP #define BOOST_STRING_CONSTANTS_HPP namespace boost { namespace algorithm { //! Token compression mode /*! Specifies token compression mode for the token_finder. */ enum token_compress_mode_type { token_compress_on, //!< Compress adjacent tokens token_compress_off //!< Do not compress adjacent tokens }; } // namespace algorithm // pull the names to the boost namespace using algorithm::token_compress_on; using algorithm::token_compress_off; } // namespace boost #endif // BOOST_STRING_CONSTANTS_HPP passenger-4.0.37/ext/boost/algorithm/string/detail/000755 000765 000024 00000000000 12233035540 022700 5ustar00honglistaff000000 000000 passenger-4.0.37/ext/boost/algorithm/string/erase.hpp000644 000765 000024 00000076100 12233035540 023252 0ustar00honglistaff000000 000000 // Boost string_algo library erase.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2006. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_ERASE_HPP #define BOOST_STRING_ERASE_HPP #include #include #include #include #include #include #include #include #include /*! \file Defines various erase algorithms. Each algorithm removes part(s) of the input according to a searching criteria. */ namespace boost { namespace algorithm { // erase_range -------------------------------------------------------// //! Erase range algorithm /*! Remove the given range from the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input sequence \param SearchRange A range in the input to be removed \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template inline OutputIteratorT erase_range_copy( OutputIteratorT Output, const RangeT& Input, const iterator_range< BOOST_STRING_TYPENAME range_const_iterator::type>& SearchRange ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::range_finder(SearchRange), ::boost::algorithm::empty_formatter(Input) ); } //! Erase range algorithm /*! \overload */ template inline SequenceT erase_range_copy( const SequenceT& Input, const iterator_range< BOOST_STRING_TYPENAME range_const_iterator::type>& SearchRange ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::range_finder(SearchRange), ::boost::algorithm::empty_formatter(Input) ); } //! Erase range algorithm /*! Remove the given range from the input. The input sequence is modified in-place. \param Input An input sequence \param SearchRange A range in the input to be removed */ template inline void erase_range( SequenceT& Input, const iterator_range< BOOST_STRING_TYPENAME range_iterator::type>& SearchRange ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::range_finder(SearchRange), ::boost::algorithm::empty_formatter(Input) ); } // erase_first --------------------------------------------------------// //! Erase first algorithm /*! Remove the first occurrence of the substring from the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T> inline OutputIteratorT erase_first_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::first_finder(Search), ::boost::algorithm::empty_formatter(Input) ); } //! Erase first algorithm /*! \overload */ template inline SequenceT erase_first_copy( const SequenceT& Input, const RangeT& Search ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::first_finder(Search), ::boost::algorithm::empty_formatter(Input) ); } //! Erase first algorithm /*! Remove the first occurrence of the substring from the input. The input sequence is modified in-place. \param Input An input string \param Search A substring to be searched for. */ template inline void erase_first( SequenceT& Input, const RangeT& Search ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::first_finder(Search), ::boost::algorithm::empty_formatter(Input) ); } // erase_first ( case insensitive ) ------------------------------------// //! Erase first algorithm ( case insensitive ) /*! Remove the first occurrence of the substring from the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. Searching is case insensitive. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \param Loc A locale used for case insensitive comparison \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T> inline OutputIteratorT ierase_first_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::first_finder(Search, is_iequal(Loc)), ::boost::algorithm::empty_formatter(Input) ); } //! Erase first algorithm ( case insensitive ) /*! \overload */ template inline SequenceT ierase_first_copy( const SequenceT& Input, const RangeT& Search, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::first_finder(Search, is_iequal(Loc)), ::boost::algorithm::empty_formatter(Input) ); } //! Erase first algorithm ( case insensitive ) /*! Remove the first occurrence of the substring from the input. The input sequence is modified in-place. Searching is case insensitive. \param Input An input string \param Search A substring to be searched for \param Loc A locale used for case insensitive comparison */ template inline void ierase_first( SequenceT& Input, const RangeT& Search, const std::locale& Loc=std::locale() ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::first_finder(Search, is_iequal(Loc)), ::boost::algorithm::empty_formatter(Input) ); } // erase_last --------------------------------------------------------// //! Erase last algorithm /*! Remove the last occurrence of the substring from the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for. \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T> inline OutputIteratorT erase_last_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::last_finder(Search), ::boost::algorithm::empty_formatter(Input) ); } //! Erase last algorithm /*! \overload */ template inline SequenceT erase_last_copy( const SequenceT& Input, const RangeT& Search ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::last_finder(Search), ::boost::algorithm::empty_formatter(Input) ); } //! Erase last algorithm /*! Remove the last occurrence of the substring from the input. The input sequence is modified in-place. \param Input An input string \param Search A substring to be searched for */ template inline void erase_last( SequenceT& Input, const RangeT& Search ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::last_finder(Search), ::boost::algorithm::empty_formatter(Input) ); } // erase_last ( case insensitive ) ------------------------------------// //! Erase last algorithm ( case insensitive ) /*! Remove the last occurrence of the substring from the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. Searching is case insensitive. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \param Loc A locale used for case insensitive comparison \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T> inline OutputIteratorT ierase_last_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::last_finder(Search, is_iequal(Loc)), ::boost::algorithm::empty_formatter(Input) ); } //! Erase last algorithm ( case insensitive ) /*! \overload */ template inline SequenceT ierase_last_copy( const SequenceT& Input, const RangeT& Search, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::last_finder(Search, is_iequal(Loc)), ::boost::algorithm::empty_formatter(Input) ); } //! Erase last algorithm ( case insensitive ) /*! Remove the last occurrence of the substring from the input. The input sequence is modified in-place. Searching is case insensitive. \param Input An input string \param Search A substring to be searched for \param Loc A locale used for case insensitive comparison */ template inline void ierase_last( SequenceT& Input, const RangeT& Search, const std::locale& Loc=std::locale() ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::last_finder(Search, is_iequal(Loc)), ::boost::algorithm::empty_formatter(Input) ); } // erase_nth --------------------------------------------------------------------// //! Erase nth algorithm /*! Remove the Nth occurrence of the substring in the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \param Nth An index of the match to be replaced. The index is 0-based. For negative N, matches are counted from the end of string. \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T> inline OutputIteratorT erase_nth_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, int Nth ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::nth_finder(Search, Nth), ::boost::algorithm::empty_formatter(Input) ); } //! Erase nth algorithm /*! \overload */ template inline SequenceT erase_nth_copy( const SequenceT& Input, const RangeT& Search, int Nth ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::nth_finder(Search, Nth), ::boost::algorithm::empty_formatter(Input) ); } //! Erase nth algorithm /*! Remove the Nth occurrence of the substring in the input. The input sequence is modified in-place. \param Input An input string \param Search A substring to be searched for. \param Nth An index of the match to be replaced. The index is 0-based. For negative N, matches are counted from the end of string. */ template inline void erase_nth( SequenceT& Input, const RangeT& Search, int Nth ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::nth_finder(Search, Nth), ::boost::algorithm::empty_formatter(Input) ); } // erase_nth ( case insensitive ) ---------------------------------------------// //! Erase nth algorithm ( case insensitive ) /*! Remove the Nth occurrence of the substring in the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. Searching is case insensitive. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for. \param Nth An index of the match to be replaced. The index is 0-based. For negative N, matches are counted from the end of string. \param Loc A locale used for case insensitive comparison \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T> inline OutputIteratorT ierase_nth_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, int Nth, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), ::boost::algorithm::empty_formatter(Input) ); } //! Erase nth algorithm /*! \overload */ template inline SequenceT ierase_nth_copy( const SequenceT& Input, const RangeT& Search, int Nth, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), empty_formatter(Input) ); } //! Erase nth algorithm /*! Remove the Nth occurrence of the substring in the input. The input sequence is modified in-place. Searching is case insensitive. \param Input An input string \param Search A substring to be searched for. \param Nth An index of the match to be replaced. The index is 0-based. For negative N, matches are counted from the end of string. \param Loc A locale used for case insensitive comparison */ template inline void ierase_nth( SequenceT& Input, const RangeT& Search, int Nth, const std::locale& Loc=std::locale() ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), ::boost::algorithm::empty_formatter(Input) ); } // erase_all --------------------------------------------------------// //! Erase all algorithm /*! Remove all the occurrences of the string from the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input sequence \param Search A substring to be searched for. \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T> inline OutputIteratorT erase_all_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search ) { return ::boost::algorithm::find_format_all_copy( Output, Input, ::boost::algorithm::first_finder(Search), ::boost::algorithm::empty_formatter(Input) ); } //! Erase all algorithm /*! \overload */ template inline SequenceT erase_all_copy( const SequenceT& Input, const RangeT& Search ) { return ::boost::algorithm::find_format_all_copy( Input, ::boost::algorithm::first_finder(Search), ::boost::algorithm::empty_formatter(Input) ); } //! Erase all algorithm /*! Remove all the occurrences of the string from the input. The input sequence is modified in-place. \param Input An input string \param Search A substring to be searched for. */ template inline void erase_all( SequenceT& Input, const RangeT& Search ) { ::boost::algorithm::find_format_all( Input, ::boost::algorithm::first_finder(Search), ::boost::algorithm::empty_formatter(Input) ); } // erase_all ( case insensitive ) ------------------------------------// //! Erase all algorithm ( case insensitive ) /*! Remove all the occurrences of the string from the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. Searching is case insensitive. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \param Loc A locale used for case insensitive comparison \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T> inline OutputIteratorT ierase_all_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_all_copy( Output, Input, ::boost::algorithm::first_finder(Search, is_iequal(Loc)), ::boost::algorithm::empty_formatter(Input) ); } //! Erase all algorithm ( case insensitive ) /*! \overload */ template inline SequenceT ierase_all_copy( const SequenceT& Input, const RangeT& Search, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_all_copy( Input, ::boost::algorithm::first_finder(Search, is_iequal(Loc)), ::boost::algorithm::empty_formatter(Input) ); } //! Erase all algorithm ( case insensitive ) /*! Remove all the occurrences of the string from the input. The input sequence is modified in-place. Searching is case insensitive. \param Input An input string \param Search A substring to be searched for. \param Loc A locale used for case insensitive comparison */ template inline void ierase_all( SequenceT& Input, const RangeT& Search, const std::locale& Loc=std::locale() ) { ::boost::algorithm::find_format_all( Input, ::boost::algorithm::first_finder(Search, is_iequal(Loc)), ::boost::algorithm::empty_formatter(Input) ); } // erase_head --------------------------------------------------------------------// //! Erase head algorithm /*! Remove the head from the input. The head is a prefix of a sequence of given size. If the sequence is shorter then required, the whole string is considered to be the head. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input string \param N Length of the head. For N>=0, at most N characters are extracted. For N<0, size(Input)-|N| characters are extracted. \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename RangeT> inline OutputIteratorT erase_head_copy( OutputIteratorT Output, const RangeT& Input, int N ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::head_finder(N), ::boost::algorithm::empty_formatter( Input ) ); } //! Erase head algorithm /*! \overload */ template inline SequenceT erase_head_copy( const SequenceT& Input, int N ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::head_finder(N), ::boost::algorithm::empty_formatter( Input ) ); } //! Erase head algorithm /*! Remove the head from the input. The head is a prefix of a sequence of given size. If the sequence is shorter then required, the whole string is considered to be the head. The input sequence is modified in-place. \param Input An input string \param N Length of the head For N>=0, at most N characters are extracted. For N<0, size(Input)-|N| characters are extracted. */ template inline void erase_head( SequenceT& Input, int N ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::head_finder(N), ::boost::algorithm::empty_formatter( Input ) ); } // erase_tail --------------------------------------------------------------------// //! Erase tail algorithm /*! Remove the tail from the input. The tail is a suffix of a sequence of given size. If the sequence is shorter then required, the whole string is considered to be the tail. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input string \param N Length of the tail. For N>=0, at most N characters are extracted. For N<0, size(Input)-|N| characters are extracted. \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename RangeT> inline OutputIteratorT erase_tail_copy( OutputIteratorT Output, const RangeT& Input, int N ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::tail_finder(N), ::boost::algorithm::empty_formatter( Input ) ); } //! Erase tail algorithm /*! \overload */ template inline SequenceT erase_tail_copy( const SequenceT& Input, int N ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::tail_finder(N), ::boost::algorithm::empty_formatter( Input ) ); } //! Erase tail algorithm /*! Remove the tail from the input. The tail is a suffix of a sequence of given size. If the sequence is shorter then required, the whole string is considered to be the tail. The input sequence is modified in-place. \param Input An input string \param N Length of the tail For N>=0, at most N characters are extracted. For N<0, size(Input)-|N| characters are extracted. */ template inline void erase_tail( SequenceT& Input, int N ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::tail_finder(N), ::boost::algorithm::empty_formatter( Input ) ); } } // namespace algorithm // pull names into the boost namespace using algorithm::erase_range_copy; using algorithm::erase_range; using algorithm::erase_first_copy; using algorithm::erase_first; using algorithm::ierase_first_copy; using algorithm::ierase_first; using algorithm::erase_last_copy; using algorithm::erase_last; using algorithm::ierase_last_copy; using algorithm::ierase_last; using algorithm::erase_nth_copy; using algorithm::erase_nth; using algorithm::ierase_nth_copy; using algorithm::ierase_nth; using algorithm::erase_all_copy; using algorithm::erase_all; using algorithm::ierase_all_copy; using algorithm::ierase_all; using algorithm::erase_head_copy; using algorithm::erase_head; using algorithm::erase_tail_copy; using algorithm::erase_tail; } // namespace boost #endif // BOOST_ERASE_HPP passenger-4.0.37/ext/boost/algorithm/string/find_format.hpp000644 000765 000024 00000024047 12233035540 024446 0ustar00honglistaff000000 000000 // Boost string_algo library find_format.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_FIND_FORMAT_HPP #define BOOST_STRING_FIND_FORMAT_HPP #include #include #include #include #include #include #include #include #include #include /*! \file Defines generic replace algorithms. Each algorithm replaces part(s) of the input. The part to be replaced is looked up using a Finder object. Result of finding is then used by a Formatter object to generate the replacement. */ namespace boost { namespace algorithm { // generic replace -----------------------------------------------------------------// //! Generic replace algorithm /*! Use the Finder to search for a substring. Use the Formatter to format this substring and replace it in the input. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input sequence \param Finder A Finder object used to search for a match to be replaced \param Formatter A Formatter object used to format a match \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename RangeT, typename FinderT, typename FormatterT> inline OutputIteratorT find_format_copy( OutputIteratorT Output, const RangeT& Input, FinderT Finder, FormatterT Formatter ) { // Concept check BOOST_CONCEPT_ASSERT(( FinderConcept< FinderT, BOOST_STRING_TYPENAME range_const_iterator::type> )); BOOST_CONCEPT_ASSERT(( FormatterConcept< FormatterT, FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> )); iterator_range::type> lit_input(::boost::as_literal(Input)); return detail::find_format_copy_impl( Output, lit_input, Formatter, Finder( ::boost::begin(lit_input), ::boost::end(lit_input) ) ); } //! Generic replace algorithm /*! \overload */ template< typename SequenceT, typename FinderT, typename FormatterT> inline SequenceT find_format_copy( const SequenceT& Input, FinderT Finder, FormatterT Formatter ) { // Concept check BOOST_CONCEPT_ASSERT(( FinderConcept< FinderT, BOOST_STRING_TYPENAME range_const_iterator::type> )); BOOST_CONCEPT_ASSERT(( FormatterConcept< FormatterT, FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> )); return detail::find_format_copy_impl( Input, Formatter, Finder(::boost::begin(Input), ::boost::end(Input))); } //! Generic replace algorithm /*! Use the Finder to search for a substring. Use the Formatter to format this substring and replace it in the input. The input is modified in-place. \param Input An input sequence \param Finder A Finder object used to search for a match to be replaced \param Formatter A Formatter object used to format a match */ template< typename SequenceT, typename FinderT, typename FormatterT> inline void find_format( SequenceT& Input, FinderT Finder, FormatterT Formatter) { // Concept check BOOST_CONCEPT_ASSERT(( FinderConcept< FinderT, BOOST_STRING_TYPENAME range_const_iterator::type> )); BOOST_CONCEPT_ASSERT(( FormatterConcept< FormatterT, FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> )); detail::find_format_impl( Input, Formatter, Finder(::boost::begin(Input), ::boost::end(Input))); } // find_format_all generic ----------------------------------------------------------------// //! Generic replace all algorithm /*! Use the Finder to search for a substring. Use the Formatter to format this substring and replace it in the input. Repeat this for all matching substrings. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input sequence \param Finder A Finder object used to search for a match to be replaced \param Formatter A Formatter object used to format a match \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename RangeT, typename FinderT, typename FormatterT> inline OutputIteratorT find_format_all_copy( OutputIteratorT Output, const RangeT& Input, FinderT Finder, FormatterT Formatter) { // Concept check BOOST_CONCEPT_ASSERT(( FinderConcept< FinderT, BOOST_STRING_TYPENAME range_const_iterator::type> )); BOOST_CONCEPT_ASSERT(( FormatterConcept< FormatterT, FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> )); iterator_range::type> lit_input(::boost::as_literal(Input)); return detail::find_format_all_copy_impl( Output, lit_input, Finder, Formatter, Finder(::boost::begin(lit_input), ::boost::end(lit_input))); } //! Generic replace all algorithm /*! \overload */ template< typename SequenceT, typename FinderT, typename FormatterT > inline SequenceT find_format_all_copy( const SequenceT& Input, FinderT Finder, FormatterT Formatter ) { // Concept check BOOST_CONCEPT_ASSERT(( FinderConcept< FinderT, BOOST_STRING_TYPENAME range_const_iterator::type> )); BOOST_CONCEPT_ASSERT(( FormatterConcept< FormatterT, FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> )); return detail::find_format_all_copy_impl( Input, Finder, Formatter, Finder( ::boost::begin(Input), ::boost::end(Input) ) ); } //! Generic replace all algorithm /*! Use the Finder to search for a substring. Use the Formatter to format this substring and replace it in the input. Repeat this for all matching substrings.The input is modified in-place. \param Input An input sequence \param Finder A Finder object used to search for a match to be replaced \param Formatter A Formatter object used to format a match */ template< typename SequenceT, typename FinderT, typename FormatterT > inline void find_format_all( SequenceT& Input, FinderT Finder, FormatterT Formatter ) { // Concept check BOOST_CONCEPT_ASSERT(( FinderConcept< FinderT, BOOST_STRING_TYPENAME range_const_iterator::type> )); BOOST_CONCEPT_ASSERT(( FormatterConcept< FormatterT, FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> )); detail::find_format_all_impl( Input, Finder, Formatter, Finder(::boost::begin(Input), ::boost::end(Input))); } } // namespace algorithm // pull the names to the boost namespace using algorithm::find_format_copy; using algorithm::find_format; using algorithm::find_format_all_copy; using algorithm::find_format_all; } // namespace boost #endif // BOOST_STRING_FIND_FORMAT_HPP passenger-4.0.37/ext/boost/algorithm/string/finder.hpp000644 000765 000024 00000022561 12233035540 023424 0ustar00honglistaff000000 000000 // Boost string_algo library finder.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2006. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_FINDER_HPP #define BOOST_STRING_FINDER_HPP #include #include #include #include #include #include #include #include #include /*! \file Defines Finder generators. Finder object is a functor which is able to find a substring matching a specific criteria in the input. Finders are used as a pluggable components for replace, find and split facilities. This header contains generator functions for finders provided in this library. */ namespace boost { namespace algorithm { // Finder generators ------------------------------------------// //! "First" finder /*! Construct the \c first_finder. The finder searches for the first occurrence of the string in a given input. The result is given as an \c iterator_range delimiting the match. \param Search A substring to be searched for. \param Comp An element comparison predicate \return An instance of the \c first_finder object */ template inline detail::first_finderF< BOOST_STRING_TYPENAME range_const_iterator::type, is_equal> first_finder( const RangeT& Search ) { return detail::first_finderF< BOOST_STRING_TYPENAME range_const_iterator::type, is_equal>( ::boost::as_literal(Search), is_equal() ) ; } //! "First" finder /*! \overload */ template inline detail::first_finderF< BOOST_STRING_TYPENAME range_const_iterator::type, PredicateT> first_finder( const RangeT& Search, PredicateT Comp ) { return detail::first_finderF< BOOST_STRING_TYPENAME range_const_iterator::type, PredicateT>( ::boost::as_literal(Search), Comp ); } //! "Last" finder /*! Construct the \c last_finder. The finder searches for the last occurrence of the string in a given input. The result is given as an \c iterator_range delimiting the match. \param Search A substring to be searched for. \param Comp An element comparison predicate \return An instance of the \c last_finder object */ template inline detail::last_finderF< BOOST_STRING_TYPENAME range_const_iterator::type, is_equal> last_finder( const RangeT& Search ) { return detail::last_finderF< BOOST_STRING_TYPENAME range_const_iterator::type, is_equal>( ::boost::as_literal(Search), is_equal() ); } //! "Last" finder /*! \overload */ template inline detail::last_finderF< BOOST_STRING_TYPENAME range_const_iterator::type, PredicateT> last_finder( const RangeT& Search, PredicateT Comp ) { return detail::last_finderF< BOOST_STRING_TYPENAME range_const_iterator::type, PredicateT>( ::boost::as_literal(Search), Comp ) ; } //! "Nth" finder /*! Construct the \c nth_finder. The finder searches for the n-th (zero-indexed) occurrence of the string in a given input. The result is given as an \c iterator_range delimiting the match. \param Search A substring to be searched for. \param Nth An index of the match to be find \param Comp An element comparison predicate \return An instance of the \c nth_finder object */ template inline detail::nth_finderF< BOOST_STRING_TYPENAME range_const_iterator::type, is_equal> nth_finder( const RangeT& Search, int Nth) { return detail::nth_finderF< BOOST_STRING_TYPENAME range_const_iterator::type, is_equal>( ::boost::as_literal(Search), Nth, is_equal() ) ; } //! "Nth" finder /*! \overload */ template inline detail::nth_finderF< BOOST_STRING_TYPENAME range_const_iterator::type, PredicateT> nth_finder( const RangeT& Search, int Nth, PredicateT Comp ) { return detail::nth_finderF< BOOST_STRING_TYPENAME range_const_iterator::type, PredicateT>( ::boost::as_literal(Search), Nth, Comp ); } //! "Head" finder /*! Construct the \c head_finder. The finder returns a head of a given input. The head is a prefix of a string up to n elements in size. If an input has less then n elements, whole input is considered a head. The result is given as an \c iterator_range delimiting the match. \param N The size of the head \return An instance of the \c head_finder object */ inline detail::head_finderF head_finder( int N ) { return detail::head_finderF(N); } //! "Tail" finder /*! Construct the \c tail_finder. The finder returns a tail of a given input. The tail is a suffix of a string up to n elements in size. If an input has less then n elements, whole input is considered a head. The result is given as an \c iterator_range delimiting the match. \param N The size of the head \return An instance of the \c tail_finder object */ inline detail::tail_finderF tail_finder( int N ) { return detail::tail_finderF(N); } //! "Token" finder /*! Construct the \c token_finder. The finder searches for a token specified by a predicate. It is similar to std::find_if algorithm, with an exception that it return a range of instead of a single iterator. If "compress token mode" is enabled, adjacent matching tokens are concatenated into one match. Thus the finder can be used to search for continuous segments of characters satisfying the given predicate. The result is given as an \c iterator_range delimiting the match. \param Pred An element selection predicate \param eCompress Compress flag \return An instance of the \c token_finder object */ template< typename PredicateT > inline detail::token_finderF token_finder( PredicateT Pred, token_compress_mode_type eCompress=token_compress_off ) { return detail::token_finderF( Pred, eCompress ); } //! "Range" finder /*! Construct the \c range_finder. The finder does not perform any operation. It simply returns the given range for any input. \param Begin Beginning of the range \param End End of the range \param Range The range. \return An instance of the \c range_finger object */ template< typename ForwardIteratorT > inline detail::range_finderF range_finder( ForwardIteratorT Begin, ForwardIteratorT End ) { return detail::range_finderF( Begin, End ); } //! "Range" finder /*! \overload */ template< typename ForwardIteratorT > inline detail::range_finderF range_finder( iterator_range Range ) { return detail::range_finderF( Range ); } } // namespace algorithm // pull the names to the boost namespace using algorithm::first_finder; using algorithm::last_finder; using algorithm::nth_finder; using algorithm::head_finder; using algorithm::tail_finder; using algorithm::token_finder; using algorithm::range_finder; } // namespace boost #endif // BOOST_STRING_FINDER_HPP passenger-4.0.37/ext/boost/algorithm/string/formatter.hpp000644 000765 000024 00000010237 12233035540 024155 0ustar00honglistaff000000 000000 // Boost string_algo library formatter.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_FORMATTER_HPP #define BOOST_STRING_FORMATTER_HPP #include #include #include #include #include /*! \file Defines Formatter generators. Formatter is a functor which formats a string according to given parameters. A Formatter works in conjunction with a Finder. A Finder can provide additional information for a specific Formatter. An example of such a cooperation is regex_finder and regex_formatter. Formatters are used as pluggable components for replace facilities. This header contains generator functions for the Formatters provided in this library. */ namespace boost { namespace algorithm { // generic formatters ---------------------------------------------------------------// //! Constant formatter /*! Constructs a \c const_formatter. Const formatter always returns the same value, regardless of the parameter. \param Format A predefined value used as a result for formatting \return An instance of the \c const_formatter object. */ template inline detail::const_formatF< iterator_range< BOOST_STRING_TYPENAME range_const_iterator::type> > const_formatter(const RangeT& Format) { return detail::const_formatF< iterator_range< BOOST_STRING_TYPENAME range_const_iterator::type> >(::boost::as_literal(Format)); } //! Identity formatter /*! Constructs an \c identity_formatter. Identity formatter always returns the parameter. \return An instance of the \c identity_formatter object. */ template inline detail::identity_formatF< iterator_range< BOOST_STRING_TYPENAME range_const_iterator::type> > identity_formatter() { return detail::identity_formatF< iterator_range< BOOST_STRING_TYPENAME range_const_iterator::type> >(); } //! Empty formatter /*! Constructs an \c empty_formatter. Empty formatter always returns an empty sequence. \param Input container used to select a correct value_type for the resulting empty_container<>. \return An instance of the \c empty_formatter object. */ template inline detail::empty_formatF< BOOST_STRING_TYPENAME range_value::type> empty_formatter(const RangeT&) { return detail::empty_formatF< BOOST_STRING_TYPENAME range_value::type>(); } //! Empty formatter /*! Constructs a \c dissect_formatter. Dissect formatter uses a specified finder to extract a portion of the formatted sequence. The first finder's match is returned as a result \param Finder a finder used to select a portion of the formatted sequence \return An instance of the \c dissect_formatter object. */ template inline detail::dissect_formatF< FinderT > dissect_formatter(const FinderT& Finder) { return detail::dissect_formatF(Finder); } } // namespace algorithm // pull the names to the boost namespace using algorithm::const_formatter; using algorithm::identity_formatter; using algorithm::empty_formatter; using algorithm::dissect_formatter; } // namespace boost #endif // BOOST_FORMATTER_HPP passenger-4.0.37/ext/boost/algorithm/string/replace.hpp000644 000765 000024 00000106322 12233035540 023566 0ustar00honglistaff000000 000000 // Boost string_algo library replace.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2006. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_REPLACE_HPP #define BOOST_STRING_REPLACE_HPP #include #include #include #include #include #include #include #include #include #include /*! \file Defines various replace algorithms. Each algorithm replaces part(s) of the input according to set of searching and replace criteria. */ namespace boost { namespace algorithm { // replace_range --------------------------------------------------------------------// //! Replace range algorithm /*! Replace the given range in the input string. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input string \param SearchRange A range in the input to be substituted \param Format A substitute string \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T> inline OutputIteratorT replace_range_copy( OutputIteratorT Output, const Range1T& Input, const iterator_range< BOOST_STRING_TYPENAME range_const_iterator::type>& SearchRange, const Range2T& Format) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::range_finder(SearchRange), ::boost::algorithm::const_formatter(Format)); } //! Replace range algorithm /*! \overload */ template inline SequenceT replace_range_copy( const SequenceT& Input, const iterator_range< BOOST_STRING_TYPENAME range_const_iterator::type>& SearchRange, const RangeT& Format) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::range_finder(SearchRange), ::boost::algorithm::const_formatter(Format)); } //! Replace range algorithm /*! Replace the given range in the input string. The input sequence is modified in-place. \param Input An input string \param SearchRange A range in the input to be substituted \param Format A substitute string */ template inline void replace_range( SequenceT& Input, const iterator_range< BOOST_STRING_TYPENAME range_iterator::type>& SearchRange, const RangeT& Format) { ::boost::algorithm::find_format( Input, ::boost::algorithm::range_finder(SearchRange), ::boost::algorithm::const_formatter(Format)); } // replace_first --------------------------------------------------------------------// //! Replace first algorithm /*! Replace the first match of the search substring in the input with the format string. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \param Format A substitute string \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T, typename Range3T> inline OutputIteratorT replace_first_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, const Range3T& Format) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::first_finder(Search), ::boost::algorithm::const_formatter(Format) ); } //! Replace first algorithm /*! \overload */ template inline SequenceT replace_first_copy( const SequenceT& Input, const Range1T& Search, const Range2T& Format ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::first_finder(Search), ::boost::algorithm::const_formatter(Format) ); } //! Replace first algorithm /*! replace the first match of the search substring in the input with the format string. The input sequence is modified in-place. \param Input An input string \param Search A substring to be searched for \param Format A substitute string */ template inline void replace_first( SequenceT& Input, const Range1T& Search, const Range2T& Format ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::first_finder(Search), ::boost::algorithm::const_formatter(Format) ); } // replace_first ( case insensitive ) ---------------------------------------------// //! Replace first algorithm ( case insensitive ) /*! Replace the first match of the search substring in the input with the format string. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. Searching is case insensitive. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \param Format A substitute string \param Loc A locale used for case insensitive comparison \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T, typename Range3T> inline OutputIteratorT ireplace_first_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, const Range3T& Format, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::first_finder(Search, is_iequal(Loc)), ::boost::algorithm::const_formatter(Format) ); } //! Replace first algorithm ( case insensitive ) /*! \overload */ template inline SequenceT ireplace_first_copy( const SequenceT& Input, const Range2T& Search, const Range1T& Format, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::first_finder(Search, is_iequal(Loc)), ::boost::algorithm::const_formatter(Format) ); } //! Replace first algorithm ( case insensitive ) /*! Replace the first match of the search substring in the input with the format string. Input sequence is modified in-place. Searching is case insensitive. \param Input An input string \param Search A substring to be searched for \param Format A substitute string \param Loc A locale used for case insensitive comparison */ template inline void ireplace_first( SequenceT& Input, const Range1T& Search, const Range2T& Format, const std::locale& Loc=std::locale() ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::first_finder(Search, is_iequal(Loc)), ::boost::algorithm::const_formatter(Format) ); } // replace_last --------------------------------------------------------------------// //! Replace last algorithm /*! Replace the last match of the search string in the input with the format string. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \param Format A substitute string \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T, typename Range3T> inline OutputIteratorT replace_last_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, const Range3T& Format ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::last_finder(Search), ::boost::algorithm::const_formatter(Format) ); } //! Replace last algorithm /*! \overload */ template inline SequenceT replace_last_copy( const SequenceT& Input, const Range1T& Search, const Range2T& Format ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::last_finder(Search), ::boost::algorithm::const_formatter(Format) ); } //! Replace last algorithm /*! Replace the last match of the search string in the input with the format string. Input sequence is modified in-place. \param Input An input string \param Search A substring to be searched for \param Format A substitute string */ template inline void replace_last( SequenceT& Input, const Range1T& Search, const Range2T& Format ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::last_finder(Search), ::boost::algorithm::const_formatter(Format) ); } // replace_last ( case insensitive ) -----------------------------------------------// //! Replace last algorithm ( case insensitive ) /*! Replace the last match of the search string in the input with the format string. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. Searching is case insensitive. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \param Format A substitute string \param Loc A locale used for case insensitive comparison \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T, typename Range3T> inline OutputIteratorT ireplace_last_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, const Range3T& Format, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::last_finder(Search, is_iequal(Loc)), ::boost::algorithm::const_formatter(Format) ); } //! Replace last algorithm ( case insensitive ) /*! \overload */ template inline SequenceT ireplace_last_copy( const SequenceT& Input, const Range1T& Search, const Range2T& Format, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::last_finder(Search, is_iequal(Loc)), ::boost::algorithm::const_formatter(Format) ); } //! Replace last algorithm ( case insensitive ) /*! Replace the last match of the search string in the input with the format string.The input sequence is modified in-place. Searching is case insensitive. \param Input An input string \param Search A substring to be searched for \param Format A substitute string \param Loc A locale used for case insensitive comparison \return A reference to the modified input */ template inline void ireplace_last( SequenceT& Input, const Range1T& Search, const Range2T& Format, const std::locale& Loc=std::locale() ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::last_finder(Search, is_iequal(Loc)), ::boost::algorithm::const_formatter(Format) ); } // replace_nth --------------------------------------------------------------------// //! Replace nth algorithm /*! Replace an Nth (zero-indexed) match of the search string in the input with the format string. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \param Nth An index of the match to be replaced. The index is 0-based. For negative N, matches are counted from the end of string. \param Format A substitute string \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T, typename Range3T> inline OutputIteratorT replace_nth_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, int Nth, const Range3T& Format ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::nth_finder(Search, Nth), ::boost::algorithm::const_formatter(Format) ); } //! Replace nth algorithm /*! \overload */ template inline SequenceT replace_nth_copy( const SequenceT& Input, const Range1T& Search, int Nth, const Range2T& Format ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::nth_finder(Search, Nth), ::boost::algorithm::const_formatter(Format) ); } //! Replace nth algorithm /*! Replace an Nth (zero-indexed) match of the search string in the input with the format string. Input sequence is modified in-place. \param Input An input string \param Search A substring to be searched for \param Nth An index of the match to be replaced. The index is 0-based. For negative N, matches are counted from the end of string. \param Format A substitute string */ template inline void replace_nth( SequenceT& Input, const Range1T& Search, int Nth, const Range2T& Format ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::nth_finder(Search, Nth), ::boost::algorithm::const_formatter(Format) ); } // replace_nth ( case insensitive ) -----------------------------------------------// //! Replace nth algorithm ( case insensitive ) /*! Replace an Nth (zero-indexed) match of the search string in the input with the format string. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. Searching is case insensitive. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \param Nth An index of the match to be replaced. The index is 0-based. For negative N, matches are counted from the end of string. \param Format A substitute string \param Loc A locale used for case insensitive comparison \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T, typename Range3T> inline OutputIteratorT ireplace_nth_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, int Nth, const Range3T& Format, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc) ), ::boost::algorithm::const_formatter(Format) ); } //! Replace nth algorithm ( case insensitive ) /*! \overload */ template inline SequenceT ireplace_nth_copy( const SequenceT& Input, const Range1T& Search, int Nth, const Range2T& Format, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), ::boost::algorithm::const_formatter(Format) ); } //! Replace nth algorithm ( case insensitive ) /*! Replace an Nth (zero-indexed) match of the search string in the input with the format string. Input sequence is modified in-place. Searching is case insensitive. \param Input An input string \param Search A substring to be searched for \param Nth An index of the match to be replaced. The index is 0-based. For negative N, matches are counted from the end of string. \param Format A substitute string \param Loc A locale used for case insensitive comparison */ template inline void ireplace_nth( SequenceT& Input, const Range1T& Search, int Nth, const Range2T& Format, const std::locale& Loc=std::locale() ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), ::boost::algorithm::const_formatter(Format) ); } // replace_all --------------------------------------------------------------------// //! Replace all algorithm /*! Replace all occurrences of the search string in the input with the format string. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \param Format A substitute string \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T, typename Range3T> inline OutputIteratorT replace_all_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, const Range3T& Format ) { return ::boost::algorithm::find_format_all_copy( Output, Input, ::boost::algorithm::first_finder(Search), ::boost::algorithm::const_formatter(Format) ); } //! Replace all algorithm /*! \overload */ template inline SequenceT replace_all_copy( const SequenceT& Input, const Range1T& Search, const Range2T& Format ) { return ::boost::algorithm::find_format_all_copy( Input, ::boost::algorithm::first_finder(Search), ::boost::algorithm::const_formatter(Format) ); } //! Replace all algorithm /*! Replace all occurrences of the search string in the input with the format string. The input sequence is modified in-place. \param Input An input string \param Search A substring to be searched for \param Format A substitute string \return A reference to the modified input */ template inline void replace_all( SequenceT& Input, const Range1T& Search, const Range2T& Format ) { ::boost::algorithm::find_format_all( Input, ::boost::algorithm::first_finder(Search), ::boost::algorithm::const_formatter(Format) ); } // replace_all ( case insensitive ) -----------------------------------------------// //! Replace all algorithm ( case insensitive ) /*! Replace all occurrences of the search string in the input with the format string. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. Searching is case insensitive. \param Output An output iterator to which the result will be copied \param Input An input string \param Search A substring to be searched for \param Format A substitute string \param Loc A locale used for case insensitive comparison \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T, typename Range3T> inline OutputIteratorT ireplace_all_copy( OutputIteratorT Output, const Range1T& Input, const Range2T& Search, const Range3T& Format, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_all_copy( Output, Input, ::boost::algorithm::first_finder(Search, is_iequal(Loc)), ::boost::algorithm::const_formatter(Format) ); } //! Replace all algorithm ( case insensitive ) /*! \overload */ template inline SequenceT ireplace_all_copy( const SequenceT& Input, const Range1T& Search, const Range2T& Format, const std::locale& Loc=std::locale() ) { return ::boost::algorithm::find_format_all_copy( Input, ::boost::algorithm::first_finder(Search, is_iequal(Loc)), ::boost::algorithm::const_formatter(Format) ); } //! Replace all algorithm ( case insensitive ) /*! Replace all occurrences of the search string in the input with the format string.The input sequence is modified in-place. Searching is case insensitive. \param Input An input string \param Search A substring to be searched for \param Format A substitute string \param Loc A locale used for case insensitive comparison */ template inline void ireplace_all( SequenceT& Input, const Range1T& Search, const Range2T& Format, const std::locale& Loc=std::locale() ) { ::boost::algorithm::find_format_all( Input, ::boost::algorithm::first_finder(Search, is_iequal(Loc)), ::boost::algorithm::const_formatter(Format) ); } // replace_head --------------------------------------------------------------------// //! Replace head algorithm /*! Replace the head of the input with the given format string. The head is a prefix of a string of given size. If the sequence is shorter then required, whole string if considered to be the head. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input string \param N Length of the head. For N>=0, at most N characters are extracted. For N<0, size(Input)-|N| characters are extracted. \param Format A substitute string \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T> inline OutputIteratorT replace_head_copy( OutputIteratorT Output, const Range1T& Input, int N, const Range2T& Format ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::head_finder(N), ::boost::algorithm::const_formatter(Format) ); } //! Replace head algorithm /*! \overload */ template inline SequenceT replace_head_copy( const SequenceT& Input, int N, const RangeT& Format ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::head_finder(N), ::boost::algorithm::const_formatter(Format) ); } //! Replace head algorithm /*! Replace the head of the input with the given format string. The head is a prefix of a string of given size. If the sequence is shorter then required, the whole string is considered to be the head. The input sequence is modified in-place. \param Input An input string \param N Length of the head. For N>=0, at most N characters are extracted. For N<0, size(Input)-|N| characters are extracted. \param Format A substitute string */ template inline void replace_head( SequenceT& Input, int N, const RangeT& Format ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::head_finder(N), ::boost::algorithm::const_formatter(Format) ); } // replace_tail --------------------------------------------------------------------// //! Replace tail algorithm /*! Replace the tail of the input with the given format string. The tail is a suffix of a string of given size. If the sequence is shorter then required, whole string is considered to be the tail. The result is a modified copy of the input. It is returned as a sequence or copied to the output iterator. \param Output An output iterator to which the result will be copied \param Input An input string \param N Length of the tail. For N>=0, at most N characters are extracted. For N<0, size(Input)-|N| characters are extracted. \param Format A substitute string \return An output iterator pointing just after the last inserted character or a modified copy of the input \note The second variant of this function provides the strong exception-safety guarantee */ template< typename OutputIteratorT, typename Range1T, typename Range2T> inline OutputIteratorT replace_tail_copy( OutputIteratorT Output, const Range1T& Input, int N, const Range2T& Format ) { return ::boost::algorithm::find_format_copy( Output, Input, ::boost::algorithm::tail_finder(N), ::boost::algorithm::const_formatter(Format) ); } //! Replace tail algorithm /*! \overload */ template inline SequenceT replace_tail_copy( const SequenceT& Input, int N, const RangeT& Format ) { return ::boost::algorithm::find_format_copy( Input, ::boost::algorithm::tail_finder(N), ::boost::algorithm::const_formatter(Format) ); } //! Replace tail algorithm /*! Replace the tail of the input with the given format sequence. The tail is a suffix of a string of given size. If the sequence is shorter then required, the whole string is considered to be the tail. The input sequence is modified in-place. \param Input An input string \param N Length of the tail. For N>=0, at most N characters are extracted. For N<0, size(Input)-|N| characters are extracted. \param Format A substitute string */ template inline void replace_tail( SequenceT& Input, int N, const RangeT& Format ) { ::boost::algorithm::find_format( Input, ::boost::algorithm::tail_finder(N), ::boost::algorithm::const_formatter(Format) ); } } // namespace algorithm // pull names to the boost namespace using algorithm::replace_range_copy; using algorithm::replace_range; using algorithm::replace_first_copy; using algorithm::replace_first; using algorithm::ireplace_first_copy; using algorithm::ireplace_first; using algorithm::replace_last_copy; using algorithm::replace_last; using algorithm::ireplace_last_copy; using algorithm::ireplace_last; using algorithm::replace_nth_copy; using algorithm::replace_nth; using algorithm::ireplace_nth_copy; using algorithm::ireplace_nth; using algorithm::replace_all_copy; using algorithm::replace_all; using algorithm::ireplace_all_copy; using algorithm::ireplace_all; using algorithm::replace_head_copy; using algorithm::replace_head; using algorithm::replace_tail_copy; using algorithm::replace_tail; } // namespace boost #endif // BOOST_REPLACE_HPP passenger-4.0.37/ext/boost/algorithm/string/sequence_traits.hpp000644 000765 000024 00000015162 12233035540 025352 0ustar00honglistaff000000 000000 // Boost string_algo library sequence_traits.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_SEQUENCE_TRAITS_HPP #define BOOST_STRING_SEQUENCE_TRAITS_HPP #include #include #include /*! \file Traits defined in this header are used by various algorithms to achieve better performance for specific containers. Traits provide fail-safe defaults. If a container supports some of these features, it is possible to specialize the specific trait for this container. For lacking compilers, it is possible of define an override for a specific tester function. Due to a language restriction, it is not currently possible to define specializations for stl containers without including the corresponding header. To decrease the overhead needed by this inclusion, user can selectively include a specialization header for a specific container. They are located in boost/algorithm/string/stl directory. Alternatively she can include boost/algorithm/string/std_collection_traits.hpp header which contains specializations for all stl containers. */ namespace boost { namespace algorithm { // sequence traits -----------------------------------------------// #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //! Native replace tester /*! Declare an override of this tester function with return type boost::string_algo::yes_type for a sequence with this property. \return yes_type if the container has basic_string like native replace method. */ no_type has_native_replace_tester(...); //! Stable iterators tester /*! Declare an override of this tester function with return type boost::string_algo::yes_type for a sequence with this property. \return yes_type if the sequence's insert/replace/erase methods do not invalidate existing iterators. */ no_type has_stable_iterators_tester(...); //! const time insert tester /*! Declare an override of this tester function with return type boost::string_algo::yes_type for a sequence with this property. \return yes_type if the sequence's insert method is working in constant time */ no_type has_const_time_insert_tester(...); //! const time erase tester /*! Declare an override of this tester function with return type boost::string_algo::yes_type for a sequence with this property. \return yes_type if the sequence's erase method is working in constant time */ no_type has_const_time_erase_tester(...); #endif //BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION //! Native replace trait /*! This trait specifies that the sequence has \c std::string like replace method */ template< typename T > class has_native_replace { #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION private: static T* t; public: BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_native_replace_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: # if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) enum { value = false }; # else BOOST_STATIC_CONSTANT(bool, value=false); # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION typedef mpl::bool_::value> type; }; //! Stable iterators trait /*! This trait specifies that the sequence has stable iterators. It means that operations like insert/erase/replace do not invalidate iterators. */ template< typename T > class has_stable_iterators { #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION private: static T* t; public: BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_stable_iterators_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: # if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) enum { value = false }; # else BOOST_STATIC_CONSTANT(bool, value=false); # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION typedef mpl::bool_::value> type; }; //! Const time insert trait /*! This trait specifies that the sequence's insert method has constant time complexity. */ template< typename T > class has_const_time_insert { #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION private: static T* t; public: BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_const_time_insert_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: # if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) enum { value = false }; # else BOOST_STATIC_CONSTANT(bool, value=false); # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION typedef mpl::bool_::value> type; }; //! Const time erase trait /*! This trait specifies that the sequence's erase method has constant time complexity. */ template< typename T > class has_const_time_erase { #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION private: static T* t; public: BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_const_time_erase_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION public: # if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) enum { value = false }; # else BOOST_STATIC_CONSTANT(bool, value=false); # endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION typedef mpl::bool_::value> type; }; } // namespace algorithm } // namespace boost #endif // BOOST_STRING_SEQUENCE_TRAITS_HPP passenger-4.0.37/ext/boost/algorithm/string/yes_no_type.hpp000644 000765 000024 00000001747 12233035540 024515 0ustar00honglistaff000000 000000 // Boost string_algo library yes_no_type.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_YES_NO_TYPE_DETAIL_HPP #define BOOST_STRING_YES_NO_TYPE_DETAIL_HPP namespace boost { namespace algorithm { // taken from boost mailing-list // when yes_no_type will become officially // a part of boost distribution, this header // will be deprecated template struct size_descriptor { typedef char (& type)[I]; }; typedef size_descriptor<1>::type yes_type; typedef size_descriptor<2>::type no_type; } // namespace algorithm } // namespace boost #endif // BOOST_STRING_YES_NO_TYPE_DETAIL_HPP passenger-4.0.37/ext/boost/algorithm/string/detail/case_conv.hpp000644 000765 000024 00000010267 12233035540 025357 0ustar00honglistaff000000 000000 // Boost string_algo library string_funct.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_CASE_CONV_DETAIL_HPP #define BOOST_STRING_CASE_CONV_DETAIL_HPP #include #include #include #include namespace boost { namespace algorithm { namespace detail { // case conversion functors -----------------------------------------------// #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) #pragma warning(push) #pragma warning(disable:4512) //assignment operator could not be generated #endif // a tolower functor template struct to_lowerF : public std::unary_function { // Constructor to_lowerF( const std::locale& Loc ) : m_Loc( &Loc ) {} // Operation CharT operator ()( CharT Ch ) const { #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) return std::tolower( static_cast::type> ( Ch )); #else return std::tolower( Ch, *m_Loc ); #endif } private: const std::locale* m_Loc; }; // a toupper functor template struct to_upperF : public std::unary_function { // Constructor to_upperF( const std::locale& Loc ) : m_Loc( &Loc ) {} // Operation CharT operator ()( CharT Ch ) const { #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) return std::toupper( static_cast::type> ( Ch )); #else return std::toupper( Ch, *m_Loc ); #endif } private: const std::locale* m_Loc; }; #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) #pragma warning(pop) #endif // algorithm implementation ------------------------------------------------------------------------- // Transform a range template OutputIteratorT transform_range_copy( OutputIteratorT Output, const RangeT& Input, FunctorT Functor) { return std::transform( ::boost::begin(Input), ::boost::end(Input), Output, Functor); } // Transform a range (in-place) template void transform_range( const RangeT& Input, FunctorT Functor) { std::transform( ::boost::begin(Input), ::boost::end(Input), ::boost::begin(Input), Functor); } template inline SequenceT transform_range_copy( const RangeT& Input, FunctorT Functor) { return SequenceT( ::boost::make_transform_iterator( ::boost::begin(Input), Functor), ::boost::make_transform_iterator( ::boost::end(Input), Functor)); } } // namespace detail } // namespace algorithm } // namespace boost #endif // BOOST_STRING_CASE_CONV_DETAIL_HPP passenger-4.0.37/ext/boost/algorithm/string/detail/find_format.hpp000644 000765 000024 00000017016 12233035540 025706 0ustar00honglistaff000000 000000 // Boost string_algo library find_format.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_FIND_FORMAT_DETAIL_HPP #define BOOST_STRING_FIND_FORMAT_DETAIL_HPP #include #include #include #include #include #include namespace boost { namespace algorithm { namespace detail { // find_format_copy (iterator variant) implementation -------------------------------// template< typename OutputIteratorT, typename InputT, typename FormatterT, typename FindResultT, typename FormatResultT > inline OutputIteratorT find_format_copy_impl2( OutputIteratorT Output, const InputT& Input, FormatterT Formatter, const FindResultT& FindResult, const FormatResultT& FormatResult ) { typedef find_format_store< BOOST_STRING_TYPENAME range_const_iterator::type, FormatterT, FormatResultT > store_type; // Create store for the find result store_type M( FindResult, FormatResult, Formatter ); if ( !M ) { // Match not found - return original sequence Output = std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); return Output; } // Copy the beginning of the sequence Output = std::copy( ::boost::begin(Input), ::boost::begin(M), Output ); // Format find result // Copy formatted result Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); // Copy the rest of the sequence Output = std::copy( M.end(), ::boost::end(Input), Output ); return Output; } template< typename OutputIteratorT, typename InputT, typename FormatterT, typename FindResultT > inline OutputIteratorT find_format_copy_impl( OutputIteratorT Output, const InputT& Input, FormatterT Formatter, const FindResultT& FindResult ) { if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { return ::boost::algorithm::detail::find_format_copy_impl2( Output, Input, Formatter, FindResult, Formatter(FindResult) ); } else { return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); } } // find_format_copy implementation --------------------------------------------------// template< typename InputT, typename FormatterT, typename FindResultT, typename FormatResultT > inline InputT find_format_copy_impl2( const InputT& Input, FormatterT Formatter, const FindResultT& FindResult, const FormatResultT& FormatResult) { typedef find_format_store< BOOST_STRING_TYPENAME range_const_iterator::type, FormatterT, FormatResultT > store_type; // Create store for the find result store_type M( FindResult, FormatResult, Formatter ); if ( !M ) { // Match not found - return original sequence return InputT( Input ); } InputT Output; // Copy the beginning of the sequence boost::algorithm::detail::insert( Output, ::boost::end(Output), ::boost::begin(Input), M.begin() ); // Copy formatted result boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() ); // Copy the rest of the sequence boost::algorithm::detail::insert( Output, ::boost::end(Output), M.end(), ::boost::end(Input) ); return Output; } template< typename InputT, typename FormatterT, typename FindResultT > inline InputT find_format_copy_impl( const InputT& Input, FormatterT Formatter, const FindResultT& FindResult) { if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { return ::boost::algorithm::detail::find_format_copy_impl2( Input, Formatter, FindResult, Formatter(FindResult) ); } else { return Input; } } // replace implementation ----------------------------------------------------// template< typename InputT, typename FormatterT, typename FindResultT, typename FormatResultT > inline void find_format_impl2( InputT& Input, FormatterT Formatter, const FindResultT& FindResult, const FormatResultT& FormatResult) { typedef find_format_store< BOOST_STRING_TYPENAME range_iterator::type, FormatterT, FormatResultT > store_type; // Create store for the find result store_type M( FindResult, FormatResult, Formatter ); if ( !M ) { // Search not found - return original sequence return; } // Replace match ::boost::algorithm::detail::replace( Input, M.begin(), M.end(), M.format_result() ); } template< typename InputT, typename FormatterT, typename FindResultT > inline void find_format_impl( InputT& Input, FormatterT Formatter, const FindResultT& FindResult) { if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { ::boost::algorithm::detail::find_format_impl2( Input, Formatter, FindResult, Formatter(FindResult) ); } } } // namespace detail } // namespace algorithm } // namespace boost #endif // BOOST_STRING_FIND_FORMAT_DETAIL_HPP passenger-4.0.37/ext/boost/algorithm/string/detail/find_format_all.hpp000644 000765 000024 00000024027 12233035540 026536 0ustar00honglistaff000000 000000 // Boost string_algo library find_format_all.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP #define BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP #include #include #include #include #include #include namespace boost { namespace algorithm { namespace detail { // find_format_all_copy (iterator variant) implementation ---------------------------// template< typename OutputIteratorT, typename InputT, typename FinderT, typename FormatterT, typename FindResultT, typename FormatResultT > inline OutputIteratorT find_format_all_copy_impl2( OutputIteratorT Output, const InputT& Input, FinderT Finder, FormatterT Formatter, const FindResultT& FindResult, const FormatResultT& FormatResult ) { typedef BOOST_STRING_TYPENAME range_const_iterator::type input_iterator_type; typedef find_format_store< input_iterator_type, FormatterT, FormatResultT > store_type; // Create store for the find result store_type M( FindResult, FormatResult, Formatter ); // Initialize last match input_iterator_type LastMatch=::boost::begin(Input); // Iterate through all matches while( M ) { // Copy the beginning of the sequence Output = std::copy( LastMatch, M.begin(), Output ); // Copy formatted result Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); // Proceed to the next match LastMatch=M.end(); M=Finder( LastMatch, ::boost::end(Input) ); } // Copy the rest of the sequence Output = std::copy( LastMatch, ::boost::end(Input), Output ); return Output; } template< typename OutputIteratorT, typename InputT, typename FinderT, typename FormatterT, typename FindResultT > inline OutputIteratorT find_format_all_copy_impl( OutputIteratorT Output, const InputT& Input, FinderT Finder, FormatterT Formatter, const FindResultT& FindResult ) { if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { return ::boost::algorithm::detail::find_format_all_copy_impl2( Output, Input, Finder, Formatter, FindResult, Formatter(FindResult) ); } else { return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); } } // find_format_all_copy implementation ----------------------------------------------// template< typename InputT, typename FinderT, typename FormatterT, typename FindResultT, typename FormatResultT > inline InputT find_format_all_copy_impl2( const InputT& Input, FinderT Finder, FormatterT Formatter, const FindResultT& FindResult, const FormatResultT& FormatResult) { typedef BOOST_STRING_TYPENAME range_const_iterator::type input_iterator_type; typedef find_format_store< input_iterator_type, FormatterT, FormatResultT > store_type; // Create store for the find result store_type M( FindResult, FormatResult, Formatter ); // Initialize last match input_iterator_type LastMatch=::boost::begin(Input); // Output temporary InputT Output; // Iterate through all matches while( M ) { // Copy the beginning of the sequence boost::algorithm::detail::insert( Output, ::boost::end(Output), LastMatch, M.begin() ); // Copy formatted result boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() ); // Proceed to the next match LastMatch=M.end(); M=Finder( LastMatch, ::boost::end(Input) ); } // Copy the rest of the sequence ::boost::algorithm::detail::insert( Output, ::boost::end(Output), LastMatch, ::boost::end(Input) ); return Output; } template< typename InputT, typename FinderT, typename FormatterT, typename FindResultT > inline InputT find_format_all_copy_impl( const InputT& Input, FinderT Finder, FormatterT Formatter, const FindResultT& FindResult) { if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { return ::boost::algorithm::detail::find_format_all_copy_impl2( Input, Finder, Formatter, FindResult, Formatter(FindResult) ); } else { return Input; } } // find_format_all implementation ------------------------------------------------// template< typename InputT, typename FinderT, typename FormatterT, typename FindResultT, typename FormatResultT > inline void find_format_all_impl2( InputT& Input, FinderT Finder, FormatterT Formatter, FindResultT FindResult, FormatResultT FormatResult) { typedef BOOST_STRING_TYPENAME range_iterator::type input_iterator_type; typedef find_format_store< input_iterator_type, FormatterT, FormatResultT > store_type; // Create store for the find result store_type M( FindResult, FormatResult, Formatter ); // Instantiate replacement storage std::deque< BOOST_STRING_TYPENAME range_value::type> Storage; // Initialize replacement iterators input_iterator_type InsertIt=::boost::begin(Input); input_iterator_type SearchIt=::boost::begin(Input); while( M ) { // process the segment InsertIt=process_segment( Storage, Input, InsertIt, SearchIt, M.begin() ); // Adjust search iterator SearchIt=M.end(); // Copy formatted replace to the storage ::boost::algorithm::detail::copy_to_storage( Storage, M.format_result() ); // Find range for a next match M=Finder( SearchIt, ::boost::end(Input) ); } // process the last segment InsertIt=::boost::algorithm::detail::process_segment( Storage, Input, InsertIt, SearchIt, ::boost::end(Input) ); if ( Storage.empty() ) { // Truncate input ::boost::algorithm::detail::erase( Input, InsertIt, ::boost::end(Input) ); } else { // Copy remaining data to the end of input ::boost::algorithm::detail::insert( Input, ::boost::end(Input), Storage.begin(), Storage.end() ); } } template< typename InputT, typename FinderT, typename FormatterT, typename FindResultT > inline void find_format_all_impl( InputT& Input, FinderT Finder, FormatterT Formatter, FindResultT FindResult) { if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { ::boost::algorithm::detail::find_format_all_impl2( Input, Finder, Formatter, FindResult, Formatter(FindResult) ); } } } // namespace detail } // namespace algorithm } // namespace boost #endif // BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP passenger-4.0.37/ext/boost/algorithm/string/detail/find_format_store.hpp000644 000765 000024 00000006121 12233035540 027115 0ustar00honglistaff000000 000000 // Boost string_algo library find_format_store.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP #define BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP #include #include namespace boost { namespace algorithm { namespace detail { // temporary format and find result storage --------------------------------// #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) #pragma warning(push) #pragma warning(disable:4512) //assignment operator could not be generated #endif template< typename ForwardIteratorT, typename FormatterT, typename FormatResultT > class find_format_store : public iterator_range { public: // typedefs typedef iterator_range base_type; typedef FormatterT formatter_type; typedef FormatResultT format_result_type; public: // Construction find_format_store( const base_type& FindResult, const format_result_type& FormatResult, const formatter_type& Formatter ) : base_type(FindResult), m_FormatResult(FormatResult), m_Formatter(Formatter) {} // Assignment template< typename FindResultT > find_format_store& operator=( FindResultT FindResult ) { iterator_range::operator=(FindResult); if( !this->empty() ) { m_FormatResult=m_Formatter(FindResult); } return *this; } // Retrieve format result const format_result_type& format_result() { return m_FormatResult; } private: format_result_type m_FormatResult; const formatter_type& m_Formatter; }; template bool check_find_result(InputT&, FindResultT& FindResult) { typedef BOOST_STRING_TYPENAME range_const_iterator::type input_iterator_type; iterator_range ResultRange(FindResult); return !ResultRange.empty(); } #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) #pragma warning(pop) #endif } // namespace detail } // namespace algorithm } // namespace boost #endif // BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP passenger-4.0.37/ext/boost/algorithm/string/detail/finder.hpp000644 000765 000024 00000055611 12233035540 024670 0ustar00honglistaff000000 000000 // Boost string_algo library finder.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2006. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_FINDER_DETAIL_HPP #define BOOST_STRING_FINDER_DETAIL_HPP #include #include #include #include #include #include #include #include namespace boost { namespace algorithm { namespace detail { // find first functor -----------------------------------------------// // find a subsequence in the sequence ( functor ) /* Returns a pair marking the subsequence in the sequence. If the find fails, functor returns */ template struct first_finderF { typedef SearchIteratorT search_iterator_type; // Construction template< typename SearchT > first_finderF( const SearchT& Search, PredicateT Comp ) : m_Search(::boost::begin(Search), ::boost::end(Search)), m_Comp(Comp) {} first_finderF( search_iterator_type SearchBegin, search_iterator_type SearchEnd, PredicateT Comp ) : m_Search(SearchBegin, SearchEnd), m_Comp(Comp) {} // Operation template< typename ForwardIteratorT > iterator_range operator()( ForwardIteratorT Begin, ForwardIteratorT End ) const { typedef iterator_range result_type; typedef ForwardIteratorT input_iterator_type; // Outer loop for(input_iterator_type OuterIt=Begin; OuterIt!=End; ++OuterIt) { // Sanity check if( boost::empty(m_Search) ) return result_type( End, End ); input_iterator_type InnerIt=OuterIt; search_iterator_type SubstrIt=m_Search.begin(); for(; InnerIt!=End && SubstrIt!=m_Search.end(); ++InnerIt,++SubstrIt) { if( !( m_Comp(*InnerIt,*SubstrIt) ) ) break; } // Substring matching succeeded if ( SubstrIt==m_Search.end() ) return result_type( OuterIt, InnerIt ); } return result_type( End, End ); } private: iterator_range m_Search; PredicateT m_Comp; }; // find last functor -----------------------------------------------// // find the last match a subsequence in the sequence ( functor ) /* Returns a pair marking the subsequence in the sequence. If the find fails, returns */ template struct last_finderF { typedef SearchIteratorT search_iterator_type; typedef first_finderF< search_iterator_type, PredicateT> first_finder_type; // Construction template< typename SearchT > last_finderF( const SearchT& Search, PredicateT Comp ) : m_Search(::boost::begin(Search), ::boost::end(Search)), m_Comp(Comp) {} last_finderF( search_iterator_type SearchBegin, search_iterator_type SearchEnd, PredicateT Comp ) : m_Search(SearchBegin, SearchEnd), m_Comp(Comp) {} // Operation template< typename ForwardIteratorT > iterator_range operator()( ForwardIteratorT Begin, ForwardIteratorT End ) const { typedef iterator_range result_type; if( boost::empty(m_Search) ) return result_type( End, End ); typedef BOOST_STRING_TYPENAME boost::detail:: iterator_traits::iterator_category category; return findit( Begin, End, category() ); } private: // forward iterator template< typename ForwardIteratorT > iterator_range findit( ForwardIteratorT Begin, ForwardIteratorT End, std::forward_iterator_tag ) const { typedef ForwardIteratorT input_iterator_type; typedef iterator_range result_type; first_finder_type first_finder( m_Search.begin(), m_Search.end(), m_Comp ); result_type M=first_finder( Begin, End ); result_type Last=M; while( M ) { Last=M; M=first_finder( ::boost::end(M), End ); } return Last; } // bidirectional iterator template< typename ForwardIteratorT > iterator_range findit( ForwardIteratorT Begin, ForwardIteratorT End, std::bidirectional_iterator_tag ) const { typedef iterator_range result_type; typedef ForwardIteratorT input_iterator_type; // Outer loop for(input_iterator_type OuterIt=End; OuterIt!=Begin; ) { input_iterator_type OuterIt2=--OuterIt; input_iterator_type InnerIt=OuterIt2; search_iterator_type SubstrIt=m_Search.begin(); for(; InnerIt!=End && SubstrIt!=m_Search.end(); ++InnerIt,++SubstrIt) { if( !( m_Comp(*InnerIt,*SubstrIt) ) ) break; } // Substring matching succeeded if( SubstrIt==m_Search.end() ) return result_type( OuterIt2, InnerIt ); } return result_type( End, End ); } private: iterator_range m_Search; PredicateT m_Comp; }; // find n-th functor -----------------------------------------------// // find the n-th match of a subsequence in the sequence ( functor ) /* Returns a pair marking the subsequence in the sequence. If the find fails, returns */ template struct nth_finderF { typedef SearchIteratorT search_iterator_type; typedef first_finderF< search_iterator_type, PredicateT> first_finder_type; typedef last_finderF< search_iterator_type, PredicateT> last_finder_type; // Construction template< typename SearchT > nth_finderF( const SearchT& Search, int Nth, PredicateT Comp) : m_Search(::boost::begin(Search), ::boost::end(Search)), m_Nth(Nth), m_Comp(Comp) {} nth_finderF( search_iterator_type SearchBegin, search_iterator_type SearchEnd, int Nth, PredicateT Comp) : m_Search(SearchBegin, SearchEnd), m_Nth(Nth), m_Comp(Comp) {} // Operation template< typename ForwardIteratorT > iterator_range operator()( ForwardIteratorT Begin, ForwardIteratorT End ) const { if(m_Nth>=0) { return find_forward(Begin, End, m_Nth); } else { return find_backward(Begin, End, -m_Nth); } } private: // Implementation helpers template< typename ForwardIteratorT > iterator_range find_forward( ForwardIteratorT Begin, ForwardIteratorT End, unsigned int N) const { typedef ForwardIteratorT input_iterator_type; typedef iterator_range result_type; // Sanity check if( boost::empty(m_Search) ) return result_type( End, End ); // Instantiate find functor first_finder_type first_finder( m_Search.begin(), m_Search.end(), m_Comp ); result_type M( Begin, Begin ); for( unsigned int n=0; n<=N; ++n ) { // find next match M=first_finder( ::boost::end(M), End ); if ( !M ) { // Subsequence not found, return return M; } } return M; } template< typename ForwardIteratorT > iterator_range find_backward( ForwardIteratorT Begin, ForwardIteratorT End, unsigned int N) const { typedef ForwardIteratorT input_iterator_type; typedef iterator_range result_type; // Sanity check if( boost::empty(m_Search) ) return result_type( End, End ); // Instantiate find functor last_finder_type last_finder( m_Search.begin(), m_Search.end(), m_Comp ); result_type M( End, End ); for( unsigned int n=1; n<=N; ++n ) { // find next match M=last_finder( Begin, ::boost::begin(M) ); if ( !M ) { // Subsequence not found, return return M; } } return M; } private: iterator_range m_Search; int m_Nth; PredicateT m_Comp; }; // find head/tail implementation helpers ---------------------------// template iterator_range find_head_impl( ForwardIteratorT Begin, ForwardIteratorT End, unsigned int N, std::forward_iterator_tag ) { typedef ForwardIteratorT input_iterator_type; typedef iterator_range result_type; input_iterator_type It=Begin; for( unsigned int Index=0; Index iterator_range find_head_impl( ForwardIteratorT Begin, ForwardIteratorT End, unsigned int N, std::random_access_iterator_tag ) { typedef ForwardIteratorT input_iterator_type; typedef iterator_range result_type; if ( (End<=Begin) || ( static_cast(End-Begin) < N ) ) return result_type( Begin, End ); return result_type(Begin,Begin+N); } // Find head implementation template iterator_range find_head_impl( ForwardIteratorT Begin, ForwardIteratorT End, unsigned int N ) { typedef BOOST_STRING_TYPENAME boost::detail:: iterator_traits::iterator_category category; return ::boost::algorithm::detail::find_head_impl( Begin, End, N, category() ); } template< typename ForwardIteratorT > iterator_range find_tail_impl( ForwardIteratorT Begin, ForwardIteratorT End, unsigned int N, std::forward_iterator_tag ) { typedef ForwardIteratorT input_iterator_type; typedef iterator_range result_type; unsigned int Index=0; input_iterator_type It=Begin; input_iterator_type It2=Begin; // Advance It2 by N increments for( Index=0; Index iterator_range find_tail_impl( ForwardIteratorT Begin, ForwardIteratorT End, unsigned int N, std::bidirectional_iterator_tag ) { typedef ForwardIteratorT input_iterator_type; typedef iterator_range result_type; input_iterator_type It=End; for( unsigned int Index=0; Index iterator_range find_tail_impl( ForwardIteratorT Begin, ForwardIteratorT End, unsigned int N, std::random_access_iterator_tag ) { typedef ForwardIteratorT input_iterator_type; typedef iterator_range result_type; if ( (End<=Begin) || ( static_cast(End-Begin) < N ) ) return result_type( Begin, End ); return result_type( End-N, End ); } // Operation template< typename ForwardIteratorT > iterator_range find_tail_impl( ForwardIteratorT Begin, ForwardIteratorT End, unsigned int N ) { typedef BOOST_STRING_TYPENAME boost::detail:: iterator_traits::iterator_category category; return ::boost::algorithm::detail::find_tail_impl( Begin, End, N, category() ); } // find head functor -----------------------------------------------// // find a head in the sequence ( functor ) /* This functor find a head of the specified range. For a specified N, the head is a subsequence of N starting elements of the range. */ struct head_finderF { // Construction head_finderF( int N ) : m_N(N) {} // Operation template< typename ForwardIteratorT > iterator_range operator()( ForwardIteratorT Begin, ForwardIteratorT End ) const { if(m_N>=0) { return ::boost::algorithm::detail::find_head_impl( Begin, End, m_N ); } else { iterator_range Res= ::boost::algorithm::detail::find_tail_impl( Begin, End, -m_N ); return ::boost::make_iterator_range(Begin, Res.begin()); } } private: int m_N; }; // find tail functor -----------------------------------------------// // find a tail in the sequence ( functor ) /* This functor find a tail of the specified range. For a specified N, the head is a subsequence of N starting elements of the range. */ struct tail_finderF { // Construction tail_finderF( int N ) : m_N(N) {} // Operation template< typename ForwardIteratorT > iterator_range operator()( ForwardIteratorT Begin, ForwardIteratorT End ) const { if(m_N>=0) { return ::boost::algorithm::detail::find_tail_impl( Begin, End, m_N ); } else { iterator_range Res= ::boost::algorithm::detail::find_head_impl( Begin, End, -m_N ); return ::boost::make_iterator_range(Res.end(), End); } } private: int m_N; }; // find token functor -----------------------------------------------// // find a token in a sequence ( functor ) /* This find functor finds a token specified be a predicate in a sequence. It is equivalent of std::find algorithm, with an exception that it return range instead of a single iterator. If bCompress is set to true, adjacent matching tokens are concatenated into one match. */ template< typename PredicateT > struct token_finderF { // Construction token_finderF( PredicateT Pred, token_compress_mode_type eCompress=token_compress_off ) : m_Pred(Pred), m_eCompress(eCompress) {} // Operation template< typename ForwardIteratorT > iterator_range operator()( ForwardIteratorT Begin, ForwardIteratorT End ) const { typedef iterator_range result_type; ForwardIteratorT It=std::find_if( Begin, End, m_Pred ); if( It==End ) { return result_type( End, End ); } else { ForwardIteratorT It2=It; if( m_eCompress==token_compress_on ) { // Find first non-matching character while( It2!=End && m_Pred(*It2) ) ++It2; } else { // Advance by one position ++It2; } return result_type( It, It2 ); } } private: PredicateT m_Pred; token_compress_mode_type m_eCompress; }; // find range functor -----------------------------------------------// // find a range in the sequence ( functor ) /* This functor actually does not perform any find operation. It always returns given iterator range as a result. */ template struct range_finderF { typedef ForwardIterator1T input_iterator_type; typedef iterator_range result_type; // Construction range_finderF( input_iterator_type Begin, input_iterator_type End ) : m_Range(Begin, End) {} range_finderF(const iterator_range& Range) : m_Range(Range) {} // Operation template< typename ForwardIterator2T > iterator_range operator()( ForwardIterator2T, ForwardIterator2T ) const { #if BOOST_WORKAROUND( __MWERKS__, <= 0x3003 ) return iterator_range(this->m_Range); #elif BOOST_WORKAROUND(BOOST_MSVC, <= 1300) return iterator_range(m_Range.begin(), m_Range.end()); #else return m_Range; #endif } private: iterator_range m_Range; }; } // namespace detail } // namespace algorithm } // namespace boost #endif // BOOST_STRING_FINDER_DETAIL_HPP passenger-4.0.37/ext/boost/algorithm/string/detail/formatter.hpp000644 000765 000024 00000007345 12233035540 025425 0ustar00honglistaff000000 000000 // Boost string_algo library formatter.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for updates, documentation, and revision history. #ifndef BOOST_STRING_FORMATTER_DETAIL_HPP #define BOOST_STRING_FORMATTER_DETAIL_HPP #include #include #include #include #include // generic replace functors -----------------------------------------------// namespace boost { namespace algorithm { namespace detail { // const format functor ----------------------------------------------------// // constant format functor template struct const_formatF { private: typedef BOOST_STRING_TYPENAME range_const_iterator::type format_iterator; typedef iterator_range result_type; public: // Construction const_formatF(const RangeT& Format) : m_Format(::boost::begin(Format), ::boost::end(Format)) {} // Operation #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template result_type& operator()(const Range2T&) { return m_Format; } #endif template const result_type& operator()(const Range2T&) const { return m_Format; } private: result_type m_Format; }; // identity format functor ----------------------------------------------------// // identity format functor template struct identity_formatF { // Operation template< typename Range2T > const RangeT& operator()(const Range2T& Replace) const { return RangeT(::boost::begin(Replace), ::boost::end(Replace)); } }; // empty format functor ( used by erase ) ------------------------------------// // empty format functor template< typename CharT > struct empty_formatF { template< typename ReplaceT > empty_container operator()(const ReplaceT&) const { return empty_container(); } }; // dissect format functor ----------------------------------------------------// // dissect format functor template struct dissect_formatF { public: // Construction dissect_formatF(FinderT Finder) : m_Finder(Finder) {} // Operation template inline iterator_range< BOOST_STRING_TYPENAME range_const_iterator::type> operator()(const RangeT& Replace) const { return m_Finder(::boost::begin(Replace), ::boost::end(Replace)); } private: FinderT m_Finder; }; } // namespace detail } // namespace algorithm } // namespace boost #endif // BOOST_STRING_FORMATTER_DETAIL_HPP passenger-4.0.37/ext/boost/algorithm/string/detail/replace_storage.hpp000644 000765 000024 00000013470 12233035540 026555 0ustar00honglistaff000000 000000 // Boost string_algo library replace_storage.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP #define BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP #include #include #include #include #include namespace boost { namespace algorithm { namespace detail { // storage handling routines -----------------------------------------------// template< typename StorageT, typename OutputIteratorT > inline OutputIteratorT move_from_storage( StorageT& Storage, OutputIteratorT DestBegin, OutputIteratorT DestEnd ) { OutputIteratorT OutputIt=DestBegin; while( !Storage.empty() && OutputIt!=DestEnd ) { *OutputIt=Storage.front(); Storage.pop_front(); ++OutputIt; } return OutputIt; } template< typename StorageT, typename WhatT > inline void copy_to_storage( StorageT& Storage, const WhatT& What ) { Storage.insert( Storage.end(), ::boost::begin(What), ::boost::end(What) ); } // process segment routine -----------------------------------------------// template< bool HasStableIterators > struct process_segment_helper { // Optimized version of process_segment for generic sequence template< typename StorageT, typename InputT, typename ForwardIteratorT > ForwardIteratorT operator()( StorageT& Storage, InputT& /*Input*/, ForwardIteratorT InsertIt, ForwardIteratorT SegmentBegin, ForwardIteratorT SegmentEnd ) { // Copy data from the storage until the beginning of the segment ForwardIteratorT It=::boost::algorithm::detail::move_from_storage( Storage, InsertIt, SegmentBegin ); // 3 cases are possible : // a) Storage is empty, It==SegmentBegin // b) Storage is empty, It!=SegmentBegin // c) Storage is not empty if( Storage.empty() ) { if( It==SegmentBegin ) { // Case a) everything is grand, just return end of segment return SegmentEnd; } else { // Case b) move the segment backwards return std::copy( SegmentBegin, SegmentEnd, It ); } } else { // Case c) -> shift the segment to the left and keep the overlap in the storage while( It!=SegmentEnd ) { // Store value into storage Storage.push_back( *It ); // Get the top from the storage and put it here *It=Storage.front(); Storage.pop_front(); // Advance ++It; } return It; } } }; template<> struct process_segment_helper< true > { // Optimized version of process_segment for list-like sequence template< typename StorageT, typename InputT, typename ForwardIteratorT > ForwardIteratorT operator()( StorageT& Storage, InputT& Input, ForwardIteratorT InsertIt, ForwardIteratorT SegmentBegin, ForwardIteratorT SegmentEnd ) { // Call replace to do the job ::boost::algorithm::detail::replace( Input, InsertIt, SegmentBegin, Storage ); // Empty the storage Storage.clear(); // Iterators were not changed, simply return the end of segment return SegmentEnd; } }; // Process one segment in the replace_all algorithm template< typename StorageT, typename InputT, typename ForwardIteratorT > inline ForwardIteratorT process_segment( StorageT& Storage, InputT& Input, ForwardIteratorT InsertIt, ForwardIteratorT SegmentBegin, ForwardIteratorT SegmentEnd ) { return process_segment_helper< has_stable_iterators::value>()( Storage, Input, InsertIt, SegmentBegin, SegmentEnd ); } } // namespace detail } // namespace algorithm } // namespace boost #endif // BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP passenger-4.0.37/ext/boost/algorithm/string/detail/sequence.hpp000644 000765 000024 00000016551 12233035540 025231 0ustar00honglistaff000000 000000 // Boost string_algo library sequence.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_DETAIL_SEQUENCE_HPP #define BOOST_STRING_DETAIL_SEQUENCE_HPP #include #include #include #include #include #include namespace boost { namespace algorithm { namespace detail { // insert helpers -------------------------------------------------// template< typename InputT, typename ForwardIteratorT > inline void insert( InputT& Input, BOOST_STRING_TYPENAME InputT::iterator At, ForwardIteratorT Begin, ForwardIteratorT End ) { Input.insert( At, Begin, End ); } template< typename InputT, typename InsertT > inline void insert( InputT& Input, BOOST_STRING_TYPENAME InputT::iterator At, const InsertT& Insert ) { ::boost::algorithm::detail::insert( Input, At, ::boost::begin(Insert), ::boost::end(Insert) ); } // erase helper ---------------------------------------------------// // Erase a range in the sequence /* Returns the iterator pointing just after the erase subrange */ template< typename InputT > inline typename InputT::iterator erase( InputT& Input, BOOST_STRING_TYPENAME InputT::iterator From, BOOST_STRING_TYPENAME InputT::iterator To ) { return Input.erase( From, To ); } // replace helper implementation ----------------------------------// // Optimized version of replace for generic sequence containers // Assumption: insert and erase are expensive template< bool HasConstTimeOperations > struct replace_const_time_helper { template< typename InputT, typename ForwardIteratorT > void operator()( InputT& Input, BOOST_STRING_TYPENAME InputT::iterator From, BOOST_STRING_TYPENAME InputT::iterator To, ForwardIteratorT Begin, ForwardIteratorT End ) { // Copy data to the container ( as much as possible ) ForwardIteratorT InsertIt=Begin; BOOST_STRING_TYPENAME InputT::iterator InputIt=From; for(; InsertIt!=End && InputIt!=To; InsertIt++, InputIt++ ) { *InputIt=*InsertIt; } if ( InsertIt!=End ) { // Replace sequence is longer, insert it Input.insert( InputIt, InsertIt, End ); } else { if ( InputIt!=To ) { // Replace sequence is shorter, erase the rest Input.erase( InputIt, To ); } } } }; template<> struct replace_const_time_helper< true > { // Const-time erase and insert methods -> use them template< typename InputT, typename ForwardIteratorT > void operator()( InputT& Input, BOOST_STRING_TYPENAME InputT::iterator From, BOOST_STRING_TYPENAME InputT::iterator To, ForwardIteratorT Begin, ForwardIteratorT End ) { BOOST_STRING_TYPENAME InputT::iterator At=Input.erase( From, To ); if ( Begin!=End ) { if(!Input.empty()) { Input.insert( At, Begin, End ); } else { Input.insert( Input.begin(), Begin, End ); } } } }; // No native replace method template< bool HasNative > struct replace_native_helper { template< typename InputT, typename ForwardIteratorT > void operator()( InputT& Input, BOOST_STRING_TYPENAME InputT::iterator From, BOOST_STRING_TYPENAME InputT::iterator To, ForwardIteratorT Begin, ForwardIteratorT End ) { replace_const_time_helper< boost::mpl::and_< has_const_time_insert, has_const_time_erase >::value >()( Input, From, To, Begin, End ); } }; // Container has native replace method template<> struct replace_native_helper< true > { template< typename InputT, typename ForwardIteratorT > void operator()( InputT& Input, BOOST_STRING_TYPENAME InputT::iterator From, BOOST_STRING_TYPENAME InputT::iterator To, ForwardIteratorT Begin, ForwardIteratorT End ) { Input.replace( From, To, Begin, End ); } }; // replace helper -------------------------------------------------// template< typename InputT, typename ForwardIteratorT > inline void replace( InputT& Input, BOOST_STRING_TYPENAME InputT::iterator From, BOOST_STRING_TYPENAME InputT::iterator To, ForwardIteratorT Begin, ForwardIteratorT End ) { replace_native_helper< has_native_replace::value >()( Input, From, To, Begin, End ); } template< typename InputT, typename InsertT > inline void replace( InputT& Input, BOOST_STRING_TYPENAME InputT::iterator From, BOOST_STRING_TYPENAME InputT::iterator To, const InsertT& Insert ) { if(From!=To) { ::boost::algorithm::detail::replace( Input, From, To, ::boost::begin(Insert), ::boost::end(Insert) ); } else { ::boost::algorithm::detail::insert( Input, From, ::boost::begin(Insert), ::boost::end(Insert) ); } } } // namespace detail } // namespace algorithm } // namespace boost #endif // BOOST_STRING_DETAIL_SEQUENCE_HPP passenger-4.0.37/ext/boost/algorithm/string/detail/util.hpp000644 000765 000024 00000006600 12233035540 024370 0ustar00honglistaff000000 000000 // Boost string_algo library util.hpp header file ---------------------------// // Copyright Pavol Droba 2002-2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for updates, documentation, and revision history. #ifndef BOOST_STRING_UTIL_DETAIL_HPP #define BOOST_STRING_UTIL_DETAIL_HPP #include #include #include namespace boost { namespace algorithm { namespace detail { // empty container -----------------------------------------------// // empty_container /* This class represents always empty container, containing elements of type CharT. It is supposed to be used in a const version only */ template< typename CharT > struct empty_container { typedef empty_container type; typedef CharT value_type; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef const value_type& reference; typedef const value_type& const_reference; typedef const value_type* iterator; typedef const value_type* const_iterator; // Operations const_iterator begin() const { return reinterpret_cast(0); } const_iterator end() const { return reinterpret_cast(0); } bool empty() const { return false; } size_type size() const { return 0; } }; // bounded copy algorithm -----------------------------------------------// // Bounded version of the std::copy algorithm template inline OutputIteratorT bounded_copy( InputIteratorT First, InputIteratorT Last, OutputIteratorT DestFirst, OutputIteratorT DestLast ) { InputIteratorT InputIt=First; OutputIteratorT OutputIt=DestFirst; for(; InputIt!=Last && OutputIt!=DestLast; InputIt++, OutputIt++ ) { *OutputIt=*InputIt; } return OutputIt; } // iterator range utilities -----------------------------------------// // copy range functor template< typename SeqT, typename IteratorT=BOOST_STRING_TYPENAME SeqT::const_iterator > struct copy_iterator_rangeF : public std::unary_function< iterator_range, SeqT > { SeqT operator()( const iterator_range& Range ) const { return copy_range(Range); } }; } // namespace detail } // namespace algorithm } // namespace boost #endif // BOOST_STRING_UTIL_DETAIL_HPP passenger-4.0.37/ext/apache2/Bucket.cpp000644 000765 000024 00000012535 12233035540 020246 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include "Bucket.h" namespace Passenger { static void bucket_destroy(void *data); static apr_status_t bucket_read(apr_bucket *a, const char **str, apr_size_t *len, apr_read_type_e block); static const apr_bucket_type_t apr_bucket_type_passenger_pipe = { "PASSENGER_PIPE", 5, apr_bucket_type_t::APR_BUCKET_DATA, bucket_destroy, bucket_read, apr_bucket_setaside_notimpl, apr_bucket_split_notimpl, apr_bucket_copy_notimpl }; struct BucketData { FileDescriptor fd; PassengerBucketStatePtr state; bool bufferResponse; }; static void bucket_destroy(void *data) { BucketData *bucket_data = (BucketData *) data; if (data != NULL) { delete bucket_data; } } static apr_status_t bucket_read(apr_bucket *bucket, const char **str, apr_size_t *len, apr_read_type_e block) { char *buf; ssize_t ret; BucketData *data; data = (BucketData *) bucket->data; *str = NULL; *len = 0; if (!data->bufferResponse && block == APR_NONBLOCK_READ) { /* * The bucket brigade that Hooks::handleRequest() passes using * ap_pass_brigade() is always passed through ap_content_length_filter, * which is a filter which attempts to read all data from the * bucket brigade and computes the Content-Length header from * that. We don't want this to happen; because suppose that the * Rails application sends back 1 GB of data, then * ap_content_length_filter will buffer this entire 1 GB of data * in memory before passing it to the HTTP client. * * ap_content_length_filter aborts and passes the bucket brigade * down the filter chain when it encounters an APR_EAGAIN, except * for the first read. So by returning APR_EAGAIN on every * non-blocking read request, we can prevent ap_content_length_filter * from buffering all data. */ return APR_EAGAIN; } buf = (char *) apr_bucket_alloc(APR_BUCKET_BUFF_SIZE, bucket->list); if (buf == NULL) { return APR_ENOMEM; } do { ret = read(data->state->connection, buf, APR_BUCKET_BUFF_SIZE); } while (ret == -1 && errno == EINTR); if (ret > 0) { apr_bucket_heap *h; data->state->bytesRead += ret; *str = buf; *len = ret; bucket->data = NULL; /* Change the current bucket (which is a Passenger Bucket) into a heap bucket * that contains the data that we just read. This newly created heap bucket * will be the first in the bucket list. */ bucket = apr_bucket_heap_make(bucket, buf, *len, apr_bucket_free); h = (apr_bucket_heap *) bucket->data; h->alloc_len = APR_BUCKET_BUFF_SIZE; /* note the real buffer size */ /* And after this newly created bucket we insert a new Passenger Bucket * which can read the next chunk from the stream. */ APR_BUCKET_INSERT_AFTER(bucket, passenger_bucket_create( data->state, bucket->list, data->bufferResponse)); /* The newly created Passenger Bucket has a reference to the session * object, so we can delete data here. */ delete data; return APR_SUCCESS; } else if (ret == 0) { data->state->completed = true; delete data; bucket->data = NULL; apr_bucket_free(buf); bucket = apr_bucket_immortal_make(bucket, "", 0); *str = (const char *) bucket->data; *len = 0; return APR_SUCCESS; } else /* ret == -1 */ { int e = errno; data->state->completed = true; data->state->errorCode = e; delete data; bucket->data = NULL; apr_bucket_free(buf); return APR_FROM_OS_ERROR(e); } } static apr_bucket * passenger_bucket_make(apr_bucket *bucket, const PassengerBucketStatePtr &state, bool bufferResponse) { BucketData *data = new BucketData(); data->state = state; data->bufferResponse = bufferResponse; bucket->type = &apr_bucket_type_passenger_pipe; bucket->length = (apr_size_t)(-1); bucket->start = -1; bucket->data = data; return bucket; } apr_bucket * passenger_bucket_create(const PassengerBucketStatePtr &state, apr_bucket_alloc_t *list, bool bufferResponse) { apr_bucket *bucket; bucket = (apr_bucket *) apr_bucket_alloc(sizeof(*bucket), list); APR_BUCKET_INIT(bucket); bucket->free = apr_bucket_free; bucket->list = list; return passenger_bucket_make(bucket, state, bufferResponse); } } // namespace Passenger passenger-4.0.37/ext/apache2/Bucket.h000644 000765 000024 00000006605 12233035540 017714 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_BUCKET_H_ #define _PASSENGER_BUCKET_H_ #include #include #include namespace Passenger { using namespace boost; struct PassengerBucketState { /** The number of bytes that this PassengerBucket has read so far. */ unsigned long bytesRead; /** Whether this PassengerBucket is completed, i.e. no more data * can be read from the underlying file descriptor. When true, * this can either mean that EOF has been reached, or that an I/O * error occured. Use errorCode to check whether an error occurred. */ bool completed; /** When completed is true, errorCode contains the errno value of * the last read() call. * * A value of 0 means that no error occured. */ int errorCode; /** Connection to the helper agent. */ FileDescriptor connection; PassengerBucketState(const FileDescriptor &conn) { bytesRead = 0; completed = false; errorCode = 0; connection = conn; } }; typedef boost::shared_ptr PassengerBucketStatePtr; /** * We used to use an apr_bucket_pipe for forwarding the backend process's * response to the HTTP client. However, apr_bucket_pipe has a number of * issues: * - It closes the pipe's file descriptor when it has reached * end-of-stream, but not when an error has occurred. This behavior is * undesirable because it can easily cause file descriptor leaks. * - It does weird non-blocking-I/O related things which can cause it * to read less data than can actually be read. * * PassengerBucket is like apr_bucket_pipe, but: * - It also holds a reference to the helper agent connection. When a read * error has occured or when end-of-stream has been reached this connection * will be closed. * - It ignores the APR_NONBLOCK_READ flag because that's known to cause * strange I/O problems. * - It can store its current state in a PassengerBucketState data structure. */ apr_bucket *passenger_bucket_create(const PassengerBucketStatePtr &state, apr_bucket_alloc_t *list, bool bufferResponse); } // namespace Passenger #endif /* _PASSENGER_BUCKET_H_ */ passenger-4.0.37/ext/apache2/Configuration.cpp000644 000765 000024 00000066245 12233035540 021647 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include /* ap_config.h checks whether the compiler has support for C99's designated * initializers, and defines AP_HAVE_DESIGNATED_INITIALIZER if it does. However, * g++ does not support designated initializers, even when ap_config.h thinks * it does. Here we undefine the macro to force httpd_config.h to not use * designated initializers. This should fix compilation problems on some systems. */ #include #undef AP_HAVE_DESIGNATED_INITIALIZER #include "Configuration.hpp" #include "Utils.h" #include "Constants.h" #include /* The APR headers must come after the Passenger headers. See Hooks.cpp * to learn why. */ #include using namespace Passenger; extern "C" module AP_MODULE_DECLARE_DATA passenger_module; namespace Passenger { ServerConfig serverConfig; } #define MERGE_THREEWAY_CONFIG(field) \ config->field = (add->field == DirConfig::UNSET) ? base->field : add->field #define MERGE_STR_CONFIG(field) \ config->field = (add->field == NULL) ? base->field : add->field #define MERGE_STRING_CONFIG(field) \ config->field = (add->field.empty()) ? base->field : add->field #define MERGE_INT_CONFIG(field) \ config->field = (add->field ## Specified) ? add->field : base->field; \ config->field ## Specified = base->field ## Specified || add->field ## Specified #define DEFINE_DIR_STR_CONFIG_SETTER(functionName, fieldName) \ static const char * \ functionName(cmd_parms *cmd, void *pcfg, const char *arg) { \ DirConfig *config = (DirConfig *) pcfg; \ config->fieldName = arg; \ return NULL; \ } #define DEFINE_DIR_INT_CONFIG_SETTER(functionName, fieldName, integerType, minValue) \ static const char * \ functionName(cmd_parms *cmd, void *pcfg, const char *arg) { \ DirConfig *config = (DirConfig *) pcfg; \ char *end; \ long int result; \ \ result = strtol(arg, &end, 10); \ if (*end != '\0') { \ string message = "Invalid number specified for "; \ message.append(cmd->directive->directive); \ message.append("."); \ \ char *messageStr = (char *) apr_palloc(cmd->temp_pool, \ message.size() + 1); \ memcpy(messageStr, message.c_str(), message.size() + 1); \ return messageStr; \ } else if (result < minValue) { \ string message = "Value for "; \ message.append(cmd->directive->directive); \ message.append(" must be greater than or equal to " #minValue "."); \ \ char *messageStr = (char *) apr_palloc(cmd->temp_pool, \ message.size() + 1); \ memcpy(messageStr, message.c_str(), message.size() + 1); \ return messageStr; \ } else { \ config->fieldName = (integerType) result; \ config->fieldName ## Specified = true; \ return NULL; \ } \ } #define DEFINE_DIR_THREEWAY_CONFIG_SETTER(functionName, fieldName) \ static const char * \ functionName(cmd_parms *cmd, void *pcfg, const char *arg) { \ DirConfig *config = (DirConfig *) pcfg; \ if (arg) { \ config->fieldName = DirConfig::ENABLED; \ } else { \ config->fieldName = DirConfig::DISABLED; \ } \ return NULL; \ } #define DEFINE_SERVER_STR_CONFIG_SETTER(functionName, fieldName) \ static const char * \ functionName(cmd_parms *cmd, void *dummy, const char *arg) { \ serverConfig.fieldName = arg; \ return NULL; \ } #define DEFINE_SERVER_BOOLEAN_CONFIG_SETTER(functionName, fieldName) \ static const char * \ functionName(cmd_parms *cmd, void *dummy, int arg) { \ serverConfig.fieldName = arg; \ return NULL; \ } #define DEFINE_SERVER_INT_CONFIG_SETTER(functionName, fieldName, integerType, minValue) \ static const char * \ functionName(cmd_parms *cmd, void *pcfg, const char *arg) { \ char *end; \ long int result; \ \ result = strtol(arg, &end, 10); \ if (*end != '\0') { \ string message = "Invalid number specified for "; \ message.append(cmd->directive->directive); \ message.append("."); \ \ char *messageStr = (char *) apr_palloc(cmd->temp_pool, \ message.size() + 1); \ memcpy(messageStr, message.c_str(), message.size() + 1); \ return messageStr; \ } else if (result < minValue) { \ string message = "Value for "; \ message.append(cmd->directive->directive); \ message.append(" must be greater than or equal to " #minValue "."); \ \ char *messageStr = (char *) apr_palloc(cmd->temp_pool, \ message.size() + 1); \ memcpy(messageStr, message.c_str(), message.size() + 1); \ return messageStr; \ } else { \ serverConfig.fieldName = (integerType) result; \ return NULL; \ } \ } template static apr_status_t destroy_config_struct(void *x) { delete (T *) x; return APR_SUCCESS; } template static bool contains(const Collection &coll, const T &item) { typename Collection::const_iterator it; for (it = coll.begin(); it != coll.end(); it++) { if (*it == item) { return true; } } return false; } extern "C" { static DirConfig * create_dir_config_struct(apr_pool_t *pool) { DirConfig *config = new DirConfig(); apr_pool_cleanup_register(pool, config, destroy_config_struct, apr_pool_cleanup_null); return config; } void * passenger_config_create_dir(apr_pool_t *p, char *dirspec) { DirConfig *config = create_dir_config_struct(p); #include "CreateDirConfig.cpp" config->appRoot = NULL; config->spawnMethod = DirConfig::SM_UNSET; config->maxPreloaderIdleTime = -1; config->resolveSymlinksInDocRoot = DirConfig::UNSET; config->allowEncodedSlashes = DirConfig::UNSET; config->statThrottleRate = 0; config->statThrottleRateSpecified = false; config->restartDir = NULL; config->uploadBufferDir = NULL; config->friendlyErrorPages = DirConfig::UNSET; config->unionStationSupport = DirConfig::UNSET; config->bufferResponse = DirConfig::UNSET; /*************************************/ return config; } void * passenger_config_merge_dir(apr_pool_t *p, void *basev, void *addv) { DirConfig *config = create_dir_config_struct(p); DirConfig *base = (DirConfig *) basev; DirConfig *add = (DirConfig *) addv; #include "MergeDirConfig.cpp" config->baseURIs = base->baseURIs; for (set::const_iterator it(add->baseURIs.begin()); it != add->baseURIs.end(); it++) { config->baseURIs.insert(*it); } MERGE_STR_CONFIG(appRoot); MERGE_STRING_CONFIG(appGroupName); config->spawnMethod = (add->spawnMethod == DirConfig::SM_UNSET) ? base->spawnMethod : add->spawnMethod; config->maxPreloaderIdleTime = (add->maxPreloaderIdleTime == -1) ? base->maxPreloaderIdleTime : add->maxPreloaderIdleTime; MERGE_INT_CONFIG(statThrottleRate); MERGE_STR_CONFIG(restartDir); MERGE_STR_CONFIG(uploadBufferDir); MERGE_STRING_CONFIG(unionStationKey); config->unionStationFilters = base->unionStationFilters; for (vector::const_iterator it = add->unionStationFilters.begin(); it != add->unionStationFilters.end(); it++) { if (!contains(config->unionStationFilters, *it)) { config->unionStationFilters.push_back(*it); } } MERGE_THREEWAY_CONFIG(resolveSymlinksInDocRoot); MERGE_THREEWAY_CONFIG(allowEncodedSlashes); MERGE_THREEWAY_CONFIG(friendlyErrorPages); MERGE_THREEWAY_CONFIG(unionStationSupport); MERGE_THREEWAY_CONFIG(bufferResponse); /*************************************/ return config; } /************************************************* * Passenger settings *************************************************/ DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_root, root) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_default_ruby, defaultRuby) DEFINE_SERVER_INT_CONFIG_SETTER(cmd_passenger_log_level, logLevel, unsigned int, 0) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_debug_log_file, debugLogFile) DEFINE_SERVER_INT_CONFIG_SETTER(cmd_passenger_max_pool_size, maxPoolSize, unsigned int, 1) DEFINE_SERVER_INT_CONFIG_SETTER(cmd_passenger_pool_idle_time, poolIdleTime, unsigned int, 0) DEFINE_SERVER_BOOLEAN_CONFIG_SETTER(cmd_passenger_user_switching, userSwitching) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_default_user, defaultUser) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_default_group, defaultGroup) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_temp_dir, tempDir) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_gateway_address, unionStationGatewayAddress) DEFINE_SERVER_INT_CONFIG_SETTER(cmd_union_station_gateway_port, unionStationGatewayPort, int, 1) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_gateway_cert, unionStationGatewayCert) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_union_station_proxy_address, unionStationProxyAddress) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_user, analyticsLogUser) DEFINE_SERVER_STR_CONFIG_SETTER(cmd_passenger_analytics_log_group, analyticsLogGroup) static const char * cmd_passenger_ctl(cmd_parms *cmd, void *dummy, const char *name, const char *value) { serverConfig.ctl.set(name, value); return NULL; } static const char * cmd_passenger_pre_start(cmd_parms *cmd, void *pcfg, const char *arg) { serverConfig.prestartURLs.insert(arg); return NULL; } #include "ConfigurationSetters.cpp" DEFINE_DIR_INT_CONFIG_SETTER(cmd_passenger_stat_throttle_rate, statThrottleRate, unsigned long, 0) DEFINE_DIR_STR_CONFIG_SETTER(cmd_passenger_app_root, appRoot) DEFINE_DIR_STR_CONFIG_SETTER(cmd_passenger_app_group_name, appGroupName) DEFINE_DIR_STR_CONFIG_SETTER(cmd_passenger_restart_dir, restartDir) DEFINE_DIR_STR_CONFIG_SETTER(cmd_passenger_upload_buffer_dir, uploadBufferDir) DEFINE_DIR_STR_CONFIG_SETTER(cmd_union_station_key, unionStationKey) DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_resolve_symlinks_in_document_root, resolveSymlinksInDocRoot) DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_allow_encoded_slashes, allowEncodedSlashes) DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_friendly_error_pages, friendlyErrorPages) DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_union_station_support, unionStationSupport) DEFINE_DIR_THREEWAY_CONFIG_SETTER(cmd_passenger_buffer_response, bufferResponse) #ifndef PASSENGER_IS_ENTERPRISE static const char * cmd_passenger_enterprise_only(cmd_parms *cmd, void *pcfg, const char *arg) { return "this feature is only available in Phusion Passenger Enterprise. " "You are currently running the open source Phusion Passenger Enterprise. " "Please learn more about and/or buy Phusion Passenger Enterprise at https://www.phusionpassenger.com/enterprise"; } #endif static const char * cmd_passenger_spawn_method(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; if (strcmp(arg, "smart") == 0 || strcmp(arg, "smart-lv2") == 0) { config->spawnMethod = DirConfig::SM_SMART; } else if (strcmp(arg, "conservative") == 0 || strcmp(arg, "direct") == 0) { config->spawnMethod = DirConfig::SM_DIRECT; } else { return "PassengerSpawnMethod may only be 'smart', 'direct'."; } return NULL; } static const char * cmd_passenger_base_uri(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; if (strlen(arg) == 0) { return "PassengerBaseURI may not be set to the empty string"; } else if (arg[0] != '/') { return "PassengerBaseURI must start with a slash (/)"; } else if (strlen(arg) > 1 && arg[strlen(arg) - 1] == '/') { return "PassengerBaseURI must not end with a slash (/)"; } else { config->baseURIs.insert(arg); return NULL; } } static const char * cmd_union_station_filter(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; if (strlen(arg) == 0) { return "UnionStationFilter may not be set to the empty string"; } else { try { FilterSupport::Filter f(arg); config->unionStationFilters.push_back(arg); return NULL; } catch (const SyntaxError &e) { string message = "Syntax error in Union Station filter: "; message.append(e.what()); return strdup(message.c_str()); } } } /************************************************* * Rack-specific settings *************************************************/ static const char * cmd_passenger_max_preloader_idle_time(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; char *end; long int result; result = strtol(arg, &end, 10); if (*end != '\0') { return "Invalid number specified for PassengerMaxPreloaderIdleTime."; } else if (result < 0) { return "Value for PassengerMaxPreloaderIdleTime must be at least 0."; } else { config->maxPreloaderIdleTime = result; return NULL; } } /************************************************* * Obsolete settings *************************************************/ static const char * cmd_rails_spawn_server(cmd_parms *cmd, void *pcfg, const char *arg) { fprintf(stderr, "WARNING: The 'RailsSpawnServer' option is obsolete. " "Please specify 'PassengerRoot' instead. The correct value was " "given to you by 'passenger-install-apache2-module'.\n"); fflush(stderr); return NULL; } static const char * cmd_rails_allow_mod_rewrite(cmd_parms *cmd, void *pcfg, int arg) { fprintf(stderr, "WARNING: The 'RailsAllowModRewrite' option is obsolete: " "Phusion Passenger now fully supports mod_rewrite. " "Please remove this option from your configuration file.\n"); fflush(stderr); return NULL; } static const char * cmd_rails_framework_spawner_idle_time(cmd_parms *cmd, void *pcfg, const char *arg) { fprintf(stderr, "WARNING: The 'RailsFrameworkSpawnerIdleTime' option is obsolete. " "Please use 'PassengerMaxPreloaderIdleTime' instead.\n"); fflush(stderr); return NULL; } static const char * cmd_passenger_use_global_queue(cmd_parms *cmd, void *pcfg, int arg) { fprintf(stderr, "WARNING: The 'PassengerUseGlobalQueue' option is obsolete: " "global queueing is now always turned on. " "Please remove this option from your configuration file.\n"); fflush(stderr); return NULL; } typedef const char * (*Take1Func)(); typedef const char * (*Take2Func)(); typedef const char * (*FlagFunc)(); const command_rec passenger_commands[] = { // Passenger settings. AP_INIT_TAKE1("PassengerRoot", (Take1Func) cmd_passenger_root, NULL, RSRC_CONF, "The Passenger root folder."), AP_INIT_TAKE2("PassengerCtl", (Take2Func) cmd_passenger_ctl, NULL, RSRC_CONF, "Set advanced options."), AP_INIT_TAKE1("PassengerDefaultRuby", (Take1Func) cmd_passenger_default_ruby, NULL, RSRC_CONF, "The default Ruby interpreter to use."), AP_INIT_TAKE1("PassengerLogLevel", (Take1Func) cmd_passenger_log_level, NULL, RSRC_CONF, "Passenger log verbosity."), AP_INIT_TAKE1("PassengerDebugLogFile", (Take1Func) cmd_passenger_debug_log_file, NULL, RSRC_CONF, "Passenger debug log file."), AP_INIT_TAKE1("PassengerMaxPoolSize", (Take1Func) cmd_passenger_max_pool_size, NULL, RSRC_CONF, "The maximum number of simultaneously alive application instances."), AP_INIT_TAKE1("PassengerPoolIdleTime", (Take1Func) cmd_passenger_pool_idle_time, NULL, RSRC_CONF, "The maximum number of seconds that an application may be idle before it gets terminated."), AP_INIT_FLAG("PassengerUserSwitching", (FlagFunc) cmd_passenger_user_switching, NULL, RSRC_CONF, "Whether to enable user switching support."), AP_INIT_TAKE1("PassengerDefaultUser", (Take1Func) cmd_passenger_default_user, NULL, RSRC_CONF, "The user that Ruby applications must run as when user switching fails or is disabled."), AP_INIT_TAKE1("PassengerDefaultGroup", (Take1Func) cmd_passenger_default_group, NULL, RSRC_CONF, "The group that Ruby applications must run as when user switching fails or is disabled."), AP_INIT_TAKE1("PassengerTempDir", (Take1Func) cmd_passenger_temp_dir, NULL, RSRC_CONF, "The temp directory that Passenger should use."), AP_INIT_TAKE1("PassengerMaxPreloaderIdleTime", (Take1Func) cmd_passenger_max_preloader_idle_time, NULL, RSRC_CONF, "The maximum number of seconds that a preloader process may be idle before it is shutdown."), AP_INIT_TAKE1("UnionStationGatewayAddress", (Take1Func) cmd_union_station_gateway_address, NULL, RSRC_CONF, "The Union Station Gateway host name."), AP_INIT_TAKE1("UnionStationGatewayPort", (Take1Func) cmd_union_station_gateway_port, NULL, RSRC_CONF, "The Union Station Gateway port number."), AP_INIT_TAKE1("UnionStationGatewayCert", (Take1Func) cmd_union_station_gateway_cert, NULL, RSRC_CONF, "The Union Station Gateway certificate."), AP_INIT_TAKE1("UnionStationProxyAddress", (Take1Func) cmd_union_station_proxy_address, NULL, RSRC_CONF, "The address of the proxy that should be used for sending data to Union Station."), AP_INIT_TAKE1("PassengerAnalyticsLogUser", (Take1Func) cmd_passenger_analytics_log_user, NULL, RSRC_CONF, "The owner of analytics files."), AP_INIT_TAKE1("PassengerAnalyticsLogGroup", (Take1Func) cmd_passenger_analytics_log_group, NULL, RSRC_CONF, "The group of analytics files."), AP_INIT_TAKE1("PassengerPreStart", (Take1Func) cmd_passenger_pre_start, NULL, RSRC_CONF, "Prestart the given web applications during startup."), AP_INIT_TAKE1("PassengerSpawnMethod", (Take1Func) cmd_passenger_spawn_method, NULL, RSRC_CONF, "The spawn method to use."), #include "ConfigurationCommands.cpp" AP_INIT_TAKE1("PassengerAppGroupName", (Take1Func) cmd_passenger_app_group_name, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "The temp directory that Passenger should use."), AP_INIT_TAKE1("PassengerStatThrottleRate", (Take1Func) cmd_passenger_stat_throttle_rate, NULL, OR_LIMIT | ACCESS_CONF | RSRC_CONF, "Limit the number of stat calls to once per given seconds."), AP_INIT_TAKE1("PassengerRestartDir", (Take1Func) cmd_passenger_restart_dir, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "The directory in which Passenger should look for restart.txt."), AP_INIT_TAKE1("PassengerAppRoot", (Take1Func) cmd_passenger_app_root, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "The application's root directory."), AP_INIT_TAKE1("PassengerUploadBufferDir", (Take1Func) cmd_passenger_upload_buffer_dir, NULL, OR_OPTIONS, "The directory in which upload buffer files should be placed."), AP_INIT_TAKE1("UnionStationKey", (Take1Func) cmd_union_station_key, NULL, OR_ALL, "The Union Station key."), AP_INIT_TAKE1("UnionStationFilter", (Take1Func) cmd_union_station_filter, NULL, OR_ALL, "A filter for Union Station data."), AP_INIT_FLAG("PassengerBufferResponse", (FlagFunc) cmd_passenger_buffer_response, NULL, OR_ALL, "Whether to enable buffering response."), AP_INIT_FLAG("PassengerResolveSymlinksInDocumentRoot", (FlagFunc) cmd_passenger_resolve_symlinks_in_document_root, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Whether to resolve symlinks in the DocumentRoot path"), AP_INIT_FLAG("PassengerAllowEncodedSlashes", (FlagFunc) cmd_passenger_allow_encoded_slashes, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Whether to support encoded slashes in the URL"), AP_INIT_FLAG("PassengerFriendlyErrorPages", (FlagFunc) cmd_passenger_friendly_error_pages, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Whether to display friendly error pages when something goes wrong"), AP_INIT_TAKE1("PassengerBaseURI", (Take1Func) cmd_passenger_base_uri, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Declare the given base URI as belonging to an application."), AP_INIT_FLAG("UnionStationSupport", (Take1Func) cmd_union_station_support, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Whether to enable logging through Union Station."), /*****************************/ AP_INIT_TAKE1("PassengerMemoryLimit", (Take1Func) cmd_passenger_enterprise_only, NULL, OR_LIMIT | ACCESS_CONF | RSRC_CONF, "The maximum amount of memory in MB that an application instance may use."), AP_INIT_TAKE1("PassengerMaxInstances", (Take1Func) cmd_passenger_enterprise_only, NULL, OR_LIMIT | ACCESS_CONF | RSRC_CONF, "The maximum number of instances for the current application that Passenger may spawn."), AP_INIT_TAKE1("PassengerMaxRequestTime", (Take1Func) cmd_passenger_enterprise_only, NULL, OR_ALL, "The maximum time (in seconds) that the current application may spend on a request."), AP_INIT_FLAG("PassengerRollingRestarts", (FlagFunc) cmd_passenger_enterprise_only, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Whether to turn on rolling restarts"), AP_INIT_FLAG("PassengerResistDeploymentErrors", (FlagFunc) cmd_passenger_enterprise_only, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Whether to turn on deployment error resistance"), AP_INIT_FLAG("PassengerDebugger", (FlagFunc) cmd_passenger_enterprise_only, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Whether to turn on debugger support"), AP_INIT_TAKE1("PassengerConcurrencyModel", (Take1Func) cmd_passenger_enterprise_only, NULL, OR_ALL, "The concurrency model that should be used for applications."), AP_INIT_TAKE1("PassengerThreadCount", (Take1Func) cmd_passenger_enterprise_only, NULL, OR_ALL, "The number of threads that Phusion Passenger should spawn per application."), // Backwards compatibility options. AP_INIT_TAKE1("RailsRuby", (Take1Func) cmd_passenger_ruby, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Deprecated option."), AP_INIT_TAKE1("RailsMaxPoolSize", (Take1Func) cmd_passenger_max_pool_size, NULL, RSRC_CONF, "Deprecated option."), AP_INIT_TAKE1("RailsMaxInstancesPerApp", (Take1Func) cmd_passenger_max_instances_per_app, NULL, RSRC_CONF, "Deprecated option"), AP_INIT_TAKE1("RailsPoolIdleTime", (Take1Func) cmd_passenger_pool_idle_time, NULL, RSRC_CONF, "Deprecated option."), AP_INIT_FLAG("RailsUserSwitching", (FlagFunc) cmd_passenger_user_switching, NULL, RSRC_CONF, "Deprecated option."), AP_INIT_TAKE1("RailsDefaultUser", (Take1Func) cmd_passenger_default_user, NULL, RSRC_CONF, "Deprecated option."), AP_INIT_TAKE1("RailsSpawnMethod", (Take1Func) cmd_passenger_spawn_method, NULL, RSRC_CONF, "Deprecated option."), AP_INIT_TAKE1("RailsAppSpawnerIdleTime", (Take1Func) cmd_passenger_max_preloader_idle_time, NULL, RSRC_CONF, "Deprecated option."), AP_INIT_TAKE1("RailsBaseURI", (Take1Func) cmd_passenger_base_uri, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Deprecated option."), AP_INIT_TAKE1("RackBaseURI", (Take1Func) cmd_passenger_base_uri, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Deprecated option."), // Obsolete options. AP_INIT_TAKE1("RailsSpawnServer", (Take1Func) cmd_rails_spawn_server, NULL, RSRC_CONF, "Obsolete option."), AP_INIT_FLAG("RailsAllowModRewrite", (FlagFunc) cmd_rails_allow_mod_rewrite, NULL, RSRC_CONF, "Obsolete option."), AP_INIT_TAKE1("RailsFrameworkSpawnerIdleTime", (Take1Func) cmd_rails_framework_spawner_idle_time, NULL, RSRC_CONF, "Obsolete option."), AP_INIT_FLAG("PassengerUseGlobalQueue", (FlagFunc) cmd_passenger_use_global_queue, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Obsolete option."), { NULL } }; } // extern "C" passenger-4.0.37/ext/apache2/Configuration.h000644 000765 000024 00000003542 12233035540 021303 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_CONFIGURATION_H_ #define _PASSENGER_CONFIGURATION_H_ #include #include #include #ifdef __cplusplus extern "C" { #endif /** Configuration hook for per-directory configuration structure creation. */ void *passenger_config_create_dir(apr_pool_t *p, char *dirspec); /** Configuration hook for per-directory configuration structure merging. */ void *passenger_config_merge_dir(apr_pool_t *p, void *basev, void *addv); /** Apache module commands array. */ extern const command_rec passenger_commands[]; #ifdef __cplusplus } #endif #endif /* _PASSENGER_CONFIGURATION_H_ */ passenger-4.0.37/ext/apache2/Configuration.hpp000644 000765 000024 00000021502 12233035540 021637 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_CONFIGURATION_HPP_ #define _PASSENGER_CONFIGURATION_HPP_ #include #include #include #include #include /* The APR headers must come after the Passenger headers. See Hooks.cpp * to learn why. */ #include "Configuration.h" #include #include #include #include #include /** * @defgroup Configuration Apache module configuration * @ingroup Core * @{ */ namespace Passenger { using namespace std; #define UNSET_INT_VALUE INT_MIN /** * Per-directory configuration information. * * Use the getter methods to query information, because those will return * the default value if the value is not specified. */ struct DirConfig { enum Threeway { ENABLED, DISABLED, UNSET }; enum SpawnMethod { SM_UNSET, SM_SMART, SM_DIRECT }; #include "ConfigurationFields.hpp" std::set baseURIs; /** The path to the application's root (for example: RAILS_ROOT * for Rails applications, directory containing 'config.ru' * for Rack applications). If this value is NULL, the default * autodetected path will be used. */ const char *appRoot; string appGroupName; /** The spawn method to use. */ SpawnMethod spawnMethod; /** * The idle timeout, in seconds, of preloader processes. * May also be 0 (which indicates that the application spawner should * never idle timeout) or -1 (which means that the value is not specified, * and the default value should be used). */ long maxPreloaderIdleTime; /** Whether symlinks in the document root path should be resolved. * The implication of this is documented in the users guide, section * "How Phusion Passenger detects whether a virtual host is a web application". */ Threeway resolveSymlinksInDocRoot; /** * Whether encoded slashes in URLs should be supported. This however conflicts * with mod_rewrite support because of a bug/limitation in Apache, so it's one * or the other. */ Threeway allowEncodedSlashes; /** * Throttle the number of stat() calls on files like * restart.txt to the once per given number of seconds. */ unsigned long statThrottleRate; /** Indicates whether the statThrottleRate option was * explicitly specified in the directory configuration. */ bool statThrottleRateSpecified; /** The directory in which Passenger should look for * restart.txt. NULL means that the default directory * should be used. */ const char *restartDir; /** * The directory in which Passenger should place upload buffer * files. NULL means that the default directory should be used. */ const char *uploadBufferDir; string unionStationKey; vector unionStationFilters; /** * Whether Phusion Passenger should show friendly error pages. */ Threeway friendlyErrorPages; /** * Whether analytics logging should be enabled. */ Threeway unionStationSupport; /** * Whether response buffering support is enabled. */ Threeway bufferResponse; /*************************************/ /*************************************/ bool isEnabled() const { return enabled != DISABLED; } StaticString getAppGroupName(const StaticString &appRoot) const { if (appGroupName.empty()) { return appRoot; } else { return appGroupName; } } StaticString getSpawnMethodString() const { switch (spawnMethod) { case SM_SMART: return "smart"; case SM_DIRECT: return "direct"; default: return "smart"; } } bool highPerformanceMode() const { return highPerformance == ENABLED; } bool allowsEncodedSlashes() const { return allowEncodedSlashes == ENABLED; } unsigned long getStatThrottleRate() const { if (statThrottleRateSpecified) { return statThrottleRate; } else { return 0; } } StaticString getRestartDir() const { if (restartDir != NULL) { return restartDir; } else { return ""; } } string getUploadBufferDir(const ServerInstanceDir::GenerationPtr &generation) const { if (uploadBufferDir != NULL) { return uploadBufferDir; } else { return generation->getPath() + "/buffered_uploads"; } } bool showFriendlyErrorPages() const { return friendlyErrorPages != DISABLED; } bool useUnionStation() const { return unionStationSupport == ENABLED; } bool getBufferResponse() const { return bufferResponse == ENABLED; } string getUnionStationFilterString() const { if (unionStationFilters.empty()) { return string(); } else { string result; vector::const_iterator it; for (it = unionStationFilters.begin(); it != unionStationFilters.end(); it++) { if (it != unionStationFilters.begin()) { result.append(1, '\1'); } result.append(*it); } return result; } } /*************************************/ }; /** * Server-wide (global, not per-virtual host) configuration information. * * Use the getter methods to query information, because those will return * the default value if the value is not specified. */ struct ServerConfig { /** The Passenger root folder. */ const char *root; VariantMap ctl; /** The default Ruby interpreter to use. */ const char *defaultRuby; /** The log verbosity. */ int logLevel; /** A file to print debug messages to, or NULL to just use STDERR. */ const char *debugLogFile; /** The maximum number of simultaneously alive application * instances. */ unsigned int maxPoolSize; /** The maximum number of seconds that an application may be * idle before it gets terminated. */ unsigned int poolIdleTime; /** Whether user switching support is enabled. */ bool userSwitching; /** See PoolOptions for more info. */ string defaultUser; /** See PoolOptions for more info. */ string defaultGroup; /** The temp directory that Passenger should use. */ string tempDir; string unionStationGatewayAddress; int unionStationGatewayPort; string unionStationGatewayCert; string unionStationProxyAddress; /** Directory in which analytics logs should be saved. */ string analyticsLogUser; string analyticsLogGroup; set prestartURLs; ServerConfig() { root = NULL; defaultRuby = DEFAULT_RUBY; logLevel = DEFAULT_LOG_LEVEL; debugLogFile = NULL; maxPoolSize = DEFAULT_MAX_POOL_SIZE; poolIdleTime = DEFAULT_POOL_IDLE_TIME; userSwitching = true; defaultUser = DEFAULT_WEB_APP_USER; tempDir = getSystemTempDir(); unionStationGatewayAddress = DEFAULT_UNION_STATION_GATEWAY_ADDRESS; unionStationGatewayPort = DEFAULT_UNION_STATION_GATEWAY_PORT; unionStationGatewayCert = string(); unionStationProxyAddress = string(); analyticsLogUser = DEFAULT_ANALYTICS_LOG_USER; analyticsLogGroup = DEFAULT_ANALYTICS_LOG_GROUP; } /** Called after the configuration files have been loaded, inside * the control process. */ void finalize() { if (defaultGroup.empty()) { struct passwd *userEntry = getpwnam(defaultUser.c_str()); if (userEntry == NULL) { throw ConfigurationException( string("The user that PassengerDefaultUser refers to, '") + defaultUser + "', does not exist."); } struct group *groupEntry = getgrgid(userEntry->pw_gid); if (groupEntry == NULL) { throw ConfigurationException( string("The option PassengerDefaultUser is set to '" + defaultUser + "', but its primary group doesn't exist. " "In other words, your system's user account database " "is broken. Please fix it.")); } defaultGroup = groupEntry->gr_name; } } }; extern ServerConfig serverConfig; } // namespace Passenger /** * @} */ #endif /* _PASSENGER_CONFIGURATION_HPP_ */ passenger-4.0.37/ext/apache2/ConfigurationCommands.cpp000644 000765 000024 00000011735 12233035540 023323 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * ConfigurationCommands.cpp is automatically generated from ConfigurationCommands.cpp.erb, * using definitions from lib/phusion_passenger/apache2/config_options.rb. * Edits to ConfigurationCommands.cpp will be lost. * * To update ConfigurationCommands.cpp: * rake apache2 * * To force regeneration of ConfigurationCommands.c: * rm -f ext/apache2/ConfigurationCommands.cpp * rake ext/apache2/ConfigurationCommands.cpp */ AP_INIT_TAKE1("PassengerRuby", (Take1Func) cmd_passenger_ruby, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "The Ruby interpreter to use."), AP_INIT_TAKE1("PassengerPython", (Take1Func) cmd_passenger_python, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "The Python interpreter to use."), AP_INIT_TAKE1("PassengerNodejs", (Take1Func) cmd_passenger_nodejs, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "The Node.js command to use."), AP_INIT_TAKE1("PassengerAppEnv", (Take1Func) cmd_passenger_app_env, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "The environment under which applications are run."), AP_INIT_TAKE1("RailsEnv", (Take1Func) cmd_passenger_app_env, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "The environment under which applications are run."), AP_INIT_TAKE1("RackEnv", (Take1Func) cmd_passenger_app_env, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "The environment under which applications are run."), AP_INIT_TAKE1("PassengerMinInstances", (Take1Func) cmd_passenger_min_instances, NULL, OR_LIMIT | ACCESS_CONF | RSRC_CONF, "The minimum number of application instances to keep when cleaning idle instances."), AP_INIT_TAKE1("PassengerMaxInstancesPerApp", (Take1Func) cmd_passenger_max_instances_per_app, NULL, RSRC_CONF, "The maximum number of simultaneously alive application instances a single application may occupy."), AP_INIT_TAKE1("PassengerUser", (Take1Func) cmd_passenger_user, NULL, ACCESS_CONF | RSRC_CONF, "The user that Ruby applications must run as."), AP_INIT_TAKE1("PassengerGroup", (Take1Func) cmd_passenger_group, NULL, ACCESS_CONF | RSRC_CONF, "The group that Ruby applications must run as."), AP_INIT_FLAG("PassengerErrorOverride", (FlagFunc) cmd_passenger_error_override, NULL, OR_ALL, "Allow Apache to handle error response."), AP_INIT_TAKE1("PassengerMaxRequests", (Take1Func) cmd_passenger_max_requests, NULL, OR_LIMIT | ACCESS_CONF | RSRC_CONF, "The maximum number of requests that an application instance may process."), AP_INIT_TAKE1("PassengerStartTimeout", (Take1Func) cmd_passenger_start_timeout, NULL, OR_LIMIT | ACCESS_CONF | RSRC_CONF, "A timeout for application startup."), AP_INIT_FLAG("PassengerHighPerformance", (FlagFunc) cmd_passenger_high_performance, NULL, OR_ALL, "Enable or disable Passenger's high performance mode."), AP_INIT_FLAG("PassengerEnabled", (FlagFunc) cmd_passenger_enabled, NULL, OR_ALL, "Enable or disable Phusion Passenger."), AP_INIT_TAKE1("PassengerMaxRequestQueueSize", (Take1Func) cmd_passenger_max_request_queue_size, NULL, OR_ALL, "The maximum number of queued requests."), AP_INIT_FLAG("PassengerLoadShellEnvvars", (FlagFunc) cmd_passenger_load_shell_envvars, NULL, OR_OPTIONS | ACCESS_CONF | RSRC_CONF, "Whether to load environment variables from the shell before running the application."), AP_INIT_FLAG("PassengerBufferUpload", (FlagFunc) cmd_passenger_buffer_upload, NULL, OR_ALL, "Whether to buffer file uploads."), AP_INIT_TAKE1("PassengerAppType", (Take1Func) cmd_passenger_app_type, NULL, OR_ALL, "Force specific application type."), AP_INIT_TAKE1("PassengerStartupFile", (Take1Func) cmd_passenger_startup_file, NULL, OR_ALL, "Force specific startup file."), passenger-4.0.37/ext/apache2/ConfigurationCommands.cpp.erb000644 000765 000024 00000006145 12233035540 024071 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * ConfigurationCommands.cpp is automatically generated from ConfigurationCommands.cpp.erb, * using definitions from lib/phusion_passenger/apache2/config_options.rb. * Edits to ConfigurationCommands.cpp will be lost. * * To update ConfigurationCommands.cpp: * rake apache2 * * To force regeneration of ConfigurationCommands.c: * rm -f ext/apache2/ConfigurationCommands.cpp * rake ext/apache2/ConfigurationCommands.cpp */ <% require 'phusion_passenger/apache2/config_options' def resolve_possible_alias(option) if option[:alias_for] the_alias = APACHE2_DIRECTORY_CONFIGURATION_OPTIONS.find do |o| o[:name] == option[:alias_for] end.dup the_alias[:aliased_for] = option[:name] return the_alias else return option end end def macro_for(option) case option[:type] when :string, :integer return "AP_INIT_TAKE1" when :flag return "AP_INIT_FLAG" else raise "Unknown type #{option[:type].inspect} for option #{option[:name].inspect}" end end def name_for(option) return (option[:aliased_for] || option[:name]).inspect end def function_type_for(option) case option[:type] when :string, :integer return "Take1Func" when :flag return "FlagFunc" else raise "Unknown type #{option[:type].inspect}" end end def function_for(option) function_name = option[:name].gsub(/[A-Z]/) do |letter| "_" + letter[0..0].downcase end return "cmd#{function_name}" end def context_for(option) context = option[:context] || ["OR_OPTIONS", "ACCESS_CONF", "RSRC_CONF"] return context.join(" | ") end def description_for(option) return option[:desc].inspect end %> <% for option in APACHE2_DIRECTORY_CONFIGURATION_OPTIONS %> <% option = resolve_possible_alias(option) %> <%= macro_for(option) %>(<%= name_for(option) %>, (<%= function_type_for(option) %>) <%= function_for(option) %>, NULL, <%= context_for(option) %>, <%= description_for(option) %>), <% end %> passenger-4.0.37/ext/apache2/ConfigurationFields.hpp000644 000765 000024 00000006033 12233035540 022770 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * ConfigurationFields.hpp is automatically generated from ConfigurationFields.hpp.erb, * using definitions from lib/phusion_passenger/apache2/config_options.rb. * Edits to ConfigurationFields.hpp will be lost. * * To update ConfigurationFields.hpp: * rake apache2 * * To force regeneration of ConfigurationFields.hpp: * rm -f ext/apache2/ConfigurationFields.hpp * rake ext/apache2/ConfigurationFields.hpp */ /** Whether to buffer file uploads. */ Threeway bufferUpload; /** Enable or disable Phusion Passenger. */ Threeway enabled; /** Allow Apache to handle error response. */ Threeway errorOverride; /** Enable or disable Passenger's high performance mode. */ Threeway highPerformance; /** Whether to load environment variables from the shell before running the application. */ Threeway loadShellEnvvars; /** The maximum number of simultaneously alive application instances a single application may occupy. */ int maxInstancesPerApp; /** The maximum number of queued requests. */ int maxRequestQueueSize; /** The maximum number of requests that an application instance may process. */ int maxRequests; /** The minimum number of application instances to keep when cleaning idle instances. */ int minInstances; /** A timeout for application startup. */ int startTimeout; /** The environment under which applications are run. */ const char *appEnv; /** Force specific application type. */ const char *appType; /** The group that Ruby applications must run as. */ const char *group; /** The Node.js command to use. */ const char *nodejs; /** The Python interpreter to use. */ const char *python; /** The Ruby interpreter to use. */ const char *ruby; /** Force specific startup file. */ const char *startupFile; /** The user that Ruby applications must run as. */ const char *user; passenger-4.0.37/ext/apache2/ConfigurationFields.hpp.erb000644 000765 000024 00000006145 12233035540 023543 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * ConfigurationFields.hpp is automatically generated from ConfigurationFields.hpp.erb, * using definitions from lib/phusion_passenger/apache2/config_options.rb. * Edits to ConfigurationFields.hpp will be lost. * * To update ConfigurationFields.hpp: * rake apache2 * * To force regeneration of ConfigurationFields.hpp: * rm -f ext/apache2/ConfigurationFields.hpp * rake ext/apache2/ConfigurationFields.hpp */ <% require 'phusion_passenger/apache2/config_options' def filter_eligible_options(options) return options.reject do |option| option[:alias_for] || option.fetch(:field, true).nil? || option[:field].to_s =~ /\./ end end def struct_field_for(option) if option.has_key?(:field) return option[:field] else result = option[:name].sub(/^Passenger/, '') result[0] = result[0..0].downcase return result end end # Returns [definition_source, estimated_size_on_x86_64, description] def definition_for(option) field = struct_field_for(option) case option[:type] when :string result = ["const char *#{field}", 8 + 4, field, option[:desc]] when :integer result = ["int #{field}", 4, field, option[:desc]] when :flag result = ["Threeway #{field}", 1, field, option[:desc]] else raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" end return result + [option[:desc]] end eligible_options = filter_eligible_options(APACHE2_DIRECTORY_CONFIGURATION_OPTIONS) definitions = eligible_options.map { |o| definition_for(o) } # Sort the definitions by size in order to make the struct smaller. # It's possible to make it even smaller with a smarter algorithm but for now # I don't bother. definitions.sort! do |d1, d2| if d1[1] == d2[1] # After sorting on size, sort alphabetically. d1[2] <=> d2[2] else d1[1] <=> d2[1] end end %> <% for definition in definitions -%> /** <%= definition[3] %> */ <%= definition[0] %>; <% end %> passenger-4.0.37/ext/apache2/ConfigurationSetters.cpp000644 000765 000024 00000021364 12233035540 023212 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * ConfigurationSetters.cpp is automatically generated from ConfigurationSetters.cpp.erb, * using definitions from lib/phusion_passenger/apache2/config_options.rb. * Edits to ConfigurationSetters.cpp will be lost. * * To update ConfigurationSetters.cpp: * rake apache2 * * To force regeneration of ConfigurationSetters.cpp: * rm -f ext/apache2/ConfigurationSetters.cpp * rake ext/apache2/ConfigurationSetters.cpp */ static const char * cmd_passenger_ruby(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->ruby = arg; return NULL; } static const char * cmd_passenger_python(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->python = arg; return NULL; } static const char * cmd_passenger_nodejs(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->nodejs = arg; return NULL; } static const char * cmd_passenger_app_env(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->appEnv = arg; return NULL; } static const char * cmd_passenger_min_instances(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; char *end; long result; result = strtol(arg, &end, 10); if (*end != '\0') { string message = "Invalid number specified for "; message.append(cmd->directive->directive); message.append("."); char *messageStr = (char *) apr_palloc(cmd->temp_pool, message.size() + 1); memcpy(messageStr, message.c_str(), message.size() + 1); return messageStr; } else if (result < 0) { string message = "Value for "; message.append(cmd->directive->directive); message.append(" must be greater than or equal to 0."); char *messageStr = (char *) apr_palloc(cmd->temp_pool, message.size() + 1); memcpy(messageStr, message.c_str(), message.size() + 1); return messageStr; } else { config->minInstances = (int) result; return NULL; } } static const char * cmd_passenger_max_instances_per_app(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; char *end; long result; result = strtol(arg, &end, 10); if (*end != '\0') { string message = "Invalid number specified for "; message.append(cmd->directive->directive); message.append("."); char *messageStr = (char *) apr_palloc(cmd->temp_pool, message.size() + 1); memcpy(messageStr, message.c_str(), message.size() + 1); return messageStr; } else { config->maxInstancesPerApp = (int) result; return NULL; } } static const char * cmd_passenger_user(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->user = arg; return NULL; } static const char * cmd_passenger_group(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->group = arg; return NULL; } static const char * cmd_passenger_error_override(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->errorOverride = arg ? DirConfig::ENABLED : DirConfig::DISABLED; return NULL; } static const char * cmd_passenger_max_requests(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; char *end; long result; result = strtol(arg, &end, 10); if (*end != '\0') { string message = "Invalid number specified for "; message.append(cmd->directive->directive); message.append("."); char *messageStr = (char *) apr_palloc(cmd->temp_pool, message.size() + 1); memcpy(messageStr, message.c_str(), message.size() + 1); return messageStr; } else if (result < 0) { string message = "Value for "; message.append(cmd->directive->directive); message.append(" must be greater than or equal to 0."); char *messageStr = (char *) apr_palloc(cmd->temp_pool, message.size() + 1); memcpy(messageStr, message.c_str(), message.size() + 1); return messageStr; } else { config->maxRequests = (int) result; return NULL; } } static const char * cmd_passenger_start_timeout(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; char *end; long result; result = strtol(arg, &end, 10); if (*end != '\0') { string message = "Invalid number specified for "; message.append(cmd->directive->directive); message.append("."); char *messageStr = (char *) apr_palloc(cmd->temp_pool, message.size() + 1); memcpy(messageStr, message.c_str(), message.size() + 1); return messageStr; } else if (result < 1) { string message = "Value for "; message.append(cmd->directive->directive); message.append(" must be greater than or equal to 1."); char *messageStr = (char *) apr_palloc(cmd->temp_pool, message.size() + 1); memcpy(messageStr, message.c_str(), message.size() + 1); return messageStr; } else { config->startTimeout = (int) result; return NULL; } } static const char * cmd_passenger_high_performance(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->highPerformance = arg ? DirConfig::ENABLED : DirConfig::DISABLED; return NULL; } static const char * cmd_passenger_enabled(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->enabled = arg ? DirConfig::ENABLED : DirConfig::DISABLED; return NULL; } static const char * cmd_passenger_max_request_queue_size(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; char *end; long result; result = strtol(arg, &end, 10); if (*end != '\0') { string message = "Invalid number specified for "; message.append(cmd->directive->directive); message.append("."); char *messageStr = (char *) apr_palloc(cmd->temp_pool, message.size() + 1); memcpy(messageStr, message.c_str(), message.size() + 1); return messageStr; } else if (result < 0) { string message = "Value for "; message.append(cmd->directive->directive); message.append(" must be greater than or equal to 0."); char *messageStr = (char *) apr_palloc(cmd->temp_pool, message.size() + 1); memcpy(messageStr, message.c_str(), message.size() + 1); return messageStr; } else { config->maxRequestQueueSize = (int) result; return NULL; } } static const char * cmd_passenger_load_shell_envvars(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->loadShellEnvvars = arg ? DirConfig::ENABLED : DirConfig::DISABLED; return NULL; } static const char * cmd_passenger_buffer_upload(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->bufferUpload = arg ? DirConfig::ENABLED : DirConfig::DISABLED; return NULL; } static const char * cmd_passenger_app_type(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->appType = arg; return NULL; } static const char * cmd_passenger_startup_file(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config->startupFile = arg; return NULL; } passenger-4.0.37/ext/apache2/ConfigurationSetters.cpp.erb000644 000765 000024 00000010136 12233035540 023754 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * ConfigurationSetters.cpp is automatically generated from ConfigurationSetters.cpp.erb, * using definitions from lib/phusion_passenger/apache2/config_options.rb. * Edits to ConfigurationSetters.cpp will be lost. * * To update ConfigurationSetters.cpp: * rake apache2 * * To force regeneration of ConfigurationSetters.cpp: * rm -f ext/apache2/ConfigurationSetters.cpp * rake ext/apache2/ConfigurationSetters.cpp */ <% require 'phusion_passenger/apache2/config_options' def filter_eligible_options(options) return options.reject do |option| option[:alias_for] || option.fetch(:field, true).nil? || option[:field].to_s =~ /\./ end end def struct_field_for(option) if option.has_key?(:field) return option[:field] else result = option[:name].sub(/^Passenger/, '') result[0] = result[0..0].downcase return result end end def min_value_for(option) return option[:min_value] || 0 end def function_for(option) function_name = option[:name].gsub(/[A-Z]/) do |letter| "_" + letter[0..0].downcase end return "cmd#{function_name}" end %> <% for option in filter_eligible_options(APACHE2_DIRECTORY_CONFIGURATION_OPTIONS) -%> <% if option[:type] == :string %> static const char * <%= function_for(option) %>(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config-><%= struct_field_for(option) %> = arg; return NULL; } <% elsif option[:type] == :integer %> static const char * <%= function_for(option) %>(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; char *end; long result; result = strtol(arg, &end, 10); if (*end != '\0') { string message = "Invalid number specified for "; message.append(cmd->directive->directive); message.append("."); char *messageStr = (char *) apr_palloc(cmd->temp_pool, message.size() + 1); memcpy(messageStr, message.c_str(), message.size() + 1); return messageStr; <% if option[:min_value] %> } else if (result < <%= option[:min_value] %>) { string message = "Value for "; message.append(cmd->directive->directive); message.append(" must be greater than or equal to <%= option[:min_value] %>."); char *messageStr = (char *) apr_palloc(cmd->temp_pool, message.size() + 1); memcpy(messageStr, message.c_str(), message.size() + 1); return messageStr; <% end %> } else { config-><%= struct_field_for(option) %> = (int) result; return NULL; } } <% elsif option[:type] == :flag %> static const char * <%= function_for(option) %>(cmd_parms *cmd, void *pcfg, const char *arg) { DirConfig *config = (DirConfig *) pcfg; config-><%= struct_field_for(option) %> = arg ? DirConfig::ENABLED : DirConfig::DISABLED; return NULL; } <% else raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" end %> <% end %> passenger-4.0.37/ext/apache2/CreateDirConfig.cpp000644 000765 000024 00000004445 12233035540 022022 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * CreateDirConfig.cpp is automatically generated from CreateDirConfig.cpp.erb, * using definitions from lib/phusion_passenger/apache2/config_options.rb. * Edits to CreateDirConfig.cpp will be lost. * * To update CreateDirConfig.cpp: * rake apache2 * * To force regeneration of CreateDirConfig.cpp: * rm -f ext/apache2/CreateDirConfig.cpp * rake ext/apache2/CreateDirConfig.cpp */ config->ruby = NULL; config->python = NULL; config->nodejs = NULL; config->appEnv = NULL; config->minInstances = UNSET_INT_VALUE; config->maxInstancesPerApp = UNSET_INT_VALUE; config->user = NULL; config->group = NULL; config->errorOverride = DirConfig::UNSET; config->maxRequests = UNSET_INT_VALUE; config->startTimeout = UNSET_INT_VALUE; config->highPerformance = DirConfig::UNSET; config->enabled = DirConfig::UNSET; config->maxRequestQueueSize = UNSET_INT_VALUE; config->loadShellEnvvars = DirConfig::UNSET; config->bufferUpload = DirConfig::UNSET; config->appType = NULL; config->startupFile = NULL; passenger-4.0.37/ext/apache2/CreateDirConfig.cpp.erb000644 000765 000024 00000005015 12233035540 022563 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * CreateDirConfig.cpp is automatically generated from CreateDirConfig.cpp.erb, * using definitions from lib/phusion_passenger/apache2/config_options.rb. * Edits to CreateDirConfig.cpp will be lost. * * To update CreateDirConfig.cpp: * rake apache2 * * To force regeneration of CreateDirConfig.cpp: * rm -f ext/apache2/CreateDirConfig.cpp * rake ext/apache2/CreateDirConfig.cpp */ <% require 'phusion_passenger/apache2/config_options' def filter_eligible_options(options) return options.reject do |option| option[:alias_for] || option.fetch(:field, true).nil? || option[:field].to_s =~ /\./ end end def struct_field_for(option) if option.has_key?(:field) return option[:field] else result = option[:name].sub(/^Passenger/, '') result[0] = result[0..0].downcase return result end end %> <% for option in filter_eligible_options(APACHE2_DIRECTORY_CONFIGURATION_OPTIONS) -%> <% if option[:type] == :string -%> config-><%= struct_field_for(option) %> = NULL; <% elsif option[:type] == :integer -%> config-><%= struct_field_for(option) %> = UNSET_INT_VALUE; <% elsif option[:type] == :flag -%> config-><%= struct_field_for(option) %> = DirConfig::UNSET; <% else raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" end -%> <% end %> passenger-4.0.37/ext/apache2/DirectoryMapper.h000644 000765 000024 00000020151 12233035540 021600 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_DIRECTORY_MAPPER_H_ #define _PASSENGER_DIRECTORY_MAPPER_H_ #include #include #include #include #include "Configuration.hpp" #include #include #include // The Apache/APR headers *must* come after the Boost headers, otherwise // compilation will fail on OpenBSD. #include #include namespace Passenger { using namespace std; using namespace oxt; using namespace Passenger::ApplicationPool2; class DocumentRootDeterminationError: public oxt::tracable_exception { private: string msg; public: DocumentRootDeterminationError(const string &message): msg(message) {} virtual ~DocumentRootDeterminationError() throw() {} virtual const char *what() const throw() { return msg.c_str(); } }; /** * Utility class for determining URI-to-application directory mappings. * Given a URI, it will determine whether that URI belongs to a Phusion * Passenger-handled application, what the base URI of that application is, * and what the associated 'public' directory is. * * @note This class is not thread-safe, but is reentrant. * @ingroup Core */ class DirectoryMapper { private: DirConfig *config; request_rec *r; CachedFileStat *cstat; const char *baseURI; string publicDir; string appRoot; unsigned int throttleRate; PassengerAppType appType: 7; bool autoDetectionDone: 1; const char *findBaseURI() const { set::const_iterator it, end = config->baseURIs.end(); const char *uri = r->uri; size_t uri_len = strlen(uri); for (it = config->baseURIs.begin(); it != end; it++) { const string &base = *it; if (base == "/") { /* Ignore 'PassengerBaseURI /' options. Users usually * specify this out of ignorance. */ continue; } if ( base == "/" || ( uri_len == base.size() && memcmp(uri, base.c_str(), uri_len) == 0 ) || ( uri_len > base.size() && memcmp(uri, base.c_str(), base.size()) == 0 && uri[base.size()] == '/' ) ) { return base.c_str(); } } return NULL; } /** * @throws FileSystemException An error occured while examening the filesystem. * @throws DocumentRootDeterminationError Unable to query the location of the document root. * @throws TimeRetrievalException * @throws boost::thread_interrupted */ void autoDetect() { if (autoDetectionDone) { return; } TRACE_POINT(); /* Determine the document root without trailing slashes. */ StaticString docRoot = ap_document_root(r); if (docRoot.size() > 1 && docRoot[docRoot.size() - 1] == '/') { docRoot = docRoot.substr(0, docRoot.size() - 1); } if (docRoot.empty()) { throw DocumentRootDeterminationError("Cannot determine the document root"); } /* Find the base URI for this web application, if any. */ const char *baseURI = findBaseURI(); if (baseURI != NULL) { /* We infer that the 'public' directory of the web application * is document root + base URI. */ publicDir = docRoot + baseURI; } else { /* No base URI directives are applicable for this request. So assume that * the web application's public directory is the document root. */ publicDir = docRoot; } UPDATE_TRACE_POINT(); AppTypeDetector detector(cstat, throttleRate); PassengerAppType appType; string appRoot; if (config->appType == NULL) { if (config->appRoot == NULL) { appType = detector.checkDocumentRoot(publicDir, baseURI != NULL || config->resolveSymlinksInDocRoot == DirConfig::ENABLED, &appRoot); } else { appRoot = config->appRoot; appType = detector.checkAppRoot(appRoot); } } else { if (config->appRoot == NULL) { appType = PAT_NONE; } else { appRoot = config->appRoot; appType = getAppType(config->appType); } } this->appRoot = appRoot; this->baseURI = baseURI; this->appType = appType; autoDetectionDone = true; } public: /** * Create a new DirectoryMapper object. * * @param cstat A CachedFileStat object used for statting files. * @param throttleRate A throttling rate for cstat. * @warning Do not use this object after the destruction of r, * config or cstat. */ DirectoryMapper(request_rec *r, DirConfig *config, CachedFileStat *cstat, unsigned int throttleRate) { this->r = r; this->config = config; this->cstat = cstat; this->throttleRate = throttleRate; appType = PAT_NONE; baseURI = NULL; autoDetectionDone = false; } /** * Determines whether the given HTTP request falls under one of the specified * PassengerBaseURIs. If yes, then the first matching base URI will be returned. * Otherwise, NULL will be returned. * * @throws FileSystemException An error occured while examening the filesystem. * @throws DocumentRoot * @throws TimeRetrievalException * @throws boost::thread_interrupted * @warning The return value may only be used as long as config * hasn't been destroyed. */ const char *getBaseURI() { TRACE_POINT(); autoDetect(); return baseURI; } /** * Returns the filename of the 'public' directory of the application * that's associated with the HTTP request. * * @throws FileSystemException An error occured while examening the filesystem. * @throws DocumentRootDeterminationError Unable to query the location of the document root. * @throws TimeRetrievalException * @throws boost::thread_interrupted */ string getPublicDirectory() { autoDetect(); return publicDir; } /** * Returns the application root, or the empty string if this request does not * belong to an application. * * @throws FileSystemException An error occured while examening the filesystem. * @throws DocumentRootDeterminationError Unable to query the location of the document root. * @throws TimeRetrievalException * @throws boost::thread_interrupted */ string getAppRoot() { autoDetect(); return appRoot; } /** * Returns the application type that's associated with the HTTP request. * * @throws FileSystemException An error occured while examening the filesystem. * @throws DocumentRootDeterminationError Unable to query the location of the document root. * @throws TimeRetrievalException * @throws boost::thread_interrupted */ PassengerAppType getApplicationType() { autoDetect(); return appType; } /** * Returns the application type (as a string) that's associated * with the HTTP request. * * @throws FileSystemException An error occured while examening the filesystem. * @throws DocumentRootDeterminationError Unable to query the location of the document root. * @throws TimeRetrievalException * @throws boost::thread_interrupted */ const char *getApplicationTypeName() { autoDetect(); return getAppTypeName(appType); } }; } // namespace Passenger #endif /* _PASSENGER_DIRECTORY_MAPPER_H_ */ passenger-4.0.37/ext/apache2/Hooks.cpp000644 000765 000024 00000160657 12233035540 020125 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * This is the main source file which interfaces directly with Apache by * installing hooks. The code here can look a bit convoluted, but it'll make * more sense if you read: * http://httpd.apache.org/docs/2.2/developer/request.html * * Scroll all the way down to passenger_register_hooks to get an idea of * what we're hooking into and what we do in those hooks. There are many * hooks but the gist is implemented in just two methods: prepareRequest() * and handleRequest(). Most hooks exist for implementing compatibility * with other Apache modules. These hooks create an environment in which * prepareRequest() and handleRequest() can be comfortably run. */ #include #include #include #include #include #include #include #include #include #include #include "Hooks.h" #include "Bucket.h" #include "Configuration.hpp" #include "Utils.h" #include "Utils/IOUtils.h" #include "Utils/Timer.h" #include "Logging.h" #include "AgentsStarter.h" #include "DirectoryMapper.h" #include "Constants.h" /* The Apache/APR headers *must* come after the Boost headers, otherwise * compilation will fail on OpenBSD. */ #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace Passenger; extern "C" module AP_MODULE_DECLARE_DATA passenger_module; #ifdef APLOG_USE_MODULE APLOG_USE_MODULE(passenger); #endif /** * If the HTTP client sends POST data larger than this value (in bytes), * then the POST data will be fully buffered into a temporary file, before * allocating a Ruby web application session. * File uploads smaller than this are buffered into memory instead. */ #define LARGE_UPLOAD_THRESHOLD 1024 * 8 #if HTTP_VERSION(AP_SERVER_MAJORVERSION_NUMBER, AP_SERVER_MINORVERSION_NUMBER) > 2002 // Apache > 2.2.x #define AP_GET_SERVER_VERSION_DEPRECATED #elif HTTP_VERSION(AP_SERVER_MAJORVERSION_NUMBER, AP_SERVER_MINORVERSION_NUMBER) == 2002 // Apache == 2.2.x #if AP_SERVER_PATCHLEVEL_NUMBER >= 14 #define AP_GET_SERVER_VERSION_DEPRECATED #endif #endif #if HTTP_VERSION(AP_SERVER_MAJORVERSION_NUMBER, AP_SERVER_MINORVERSION_NUMBER) >= 2004 // Apache >= 2.4 #define unixd_config ap_unixd_config #endif /** * Apache hook functions, wrapped in a class. * * @ingroup Core */ class Hooks { private: class ErrorReport { public: virtual ~ErrorReport() { } virtual int report(request_rec *r) = 0; }; class ReportFileSystemError: public ErrorReport { private: FileSystemException e; public: ReportFileSystemError(const FileSystemException &ex): e(ex) { } int report(request_rec *r) { r->status = 500; ap_set_content_type(r, "text/html; charset=UTF-8"); ap_rputs("

Passenger error #2

\n", r); ap_rputs("An error occurred while trying to access '", r); ap_rputs(ap_escape_html(r->pool, e.filename().c_str()), r); ap_rputs("': ", r); ap_rputs(ap_escape_html(r->pool, e.what()), r); if (e.code() == EACCES || e.code() == EPERM) { ap_rputs("

", r); ap_rputs("Apache doesn't have read permissions to that file. ", r); ap_rputs("Please fix the relevant file permissions.", r); ap_rputs("

", r); } P_ERROR("A filesystem exception occured.\n" << " Message: " << e.what() << "\n" << " Backtrace:\n" << e.backtrace()); return OK; } }; class ReportDocumentRootDeterminationError: public ErrorReport { private: DocumentRootDeterminationError e; public: ReportDocumentRootDeterminationError(const DocumentRootDeterminationError &ex): e(ex) { } int report(request_rec *r) { r->status = 500; ap_set_content_type(r, "text/html; charset=UTF-8"); ap_rputs("

Passenger error #1

\n", r); ap_rputs("Cannot determine the document root for the current request.", r); P_ERROR("Cannot determine the document root for the current request.\n" << " Backtrace:\n" << e.backtrace()); return OK; } }; struct RequestNote { DirectoryMapper mapper; DirConfig *config; ErrorReport *errorReport; const char *handlerBeforeModRewrite; char *filenameBeforeModRewrite; apr_filetype_e oldFileType; const char *handlerBeforeModAutoIndex; bool enabled; RequestNote(const DirectoryMapper &m, DirConfig *c) : mapper(m), config(c) { errorReport = NULL; handlerBeforeModRewrite = NULL; filenameBeforeModRewrite = NULL; oldFileType = APR_NOFILE; handlerBeforeModAutoIndex = NULL; enabled = true; } ~RequestNote() { delete errorReport; } static apr_status_t cleanup(void *p) { delete (RequestNote *) p; return APR_SUCCESS; } }; enum Threeway { YES, NO, UNKNOWN }; Threeway m_hasModRewrite, m_hasModDir, m_hasModAutoIndex, m_hasModXsendfile; CachedFileStat cstat; AgentsStarter agentsStarter; inline DirConfig *getDirConfig(request_rec *r) { return (DirConfig *) ap_get_module_config(r->per_dir_config, &passenger_module); } /** * The existance of a request note means that the handler should be run. */ inline RequestNote *getRequestNote(request_rec *r) { void *pointer = 0; apr_pool_userdata_get(&pointer, "Phusion Passenger", r->pool); if (pointer != NULL) { RequestNote *note = (RequestNote *) pointer; if (OXT_LIKELY(note->enabled)) { return note; } else { return 0; } } else { return 0; } } void disableRequestNote(request_rec *r) { RequestNote *note = getRequestNote(r); if (note != NULL) { note->enabled = false; } } /** * Connect to the helper agent. If it looks like the helper agent crashed, * wait and retry for a short period of time until the helper agent has been * restarted. */ FileDescriptor connectToHelperAgent() { TRACE_POINT(); FileDescriptor conn; try { conn = connectToUnixServer(agentsStarter.getRequestSocketFilename()); writeExact(conn, agentsStarter.getRequestSocketPassword()); } catch (const SystemException &e) { if (e.code() == EPIPE || e.code() == ECONNREFUSED || e.code() == ENOENT) { UPDATE_TRACE_POINT(); bool connected = false; // Maybe the helper agent crashed. First wait 50 ms. usleep(50000); // Then try to reconnect to the helper agent for the // next 5 seconds. time_t deadline = time(NULL) + 5; while (!connected && time(NULL) < deadline) { try { conn = connectToUnixServer(agentsStarter.getRequestSocketFilename()); writeExact(conn, agentsStarter.getRequestSocketPassword()); connected = true; } catch (const SystemException &e) { if (e.code() == EPIPE || e.code() == ECONNREFUSED || e.code() == ENOENT) { // Looks like the helper agent hasn't been // restarted yet. Wait between 20 and 100 ms. usleep(20000 + rand() % 80000); // Don't care about thread-safety of rand() } else { throw; } } } if (!connected) { UPDATE_TRACE_POINT(); throw IOException("Cannot connect to the helper agent at " + agentsStarter.getRequestSocketFilename()); } } else { throw; } } return conn; } bool hasModRewrite() { if (m_hasModRewrite == UNKNOWN) { if (ap_find_linked_module("mod_rewrite.c")) { m_hasModRewrite = YES; } else { m_hasModRewrite = NO; } } return m_hasModRewrite == YES; } bool hasModDir() { if (m_hasModDir == UNKNOWN) { if (ap_find_linked_module("mod_dir.c")) { m_hasModDir = YES; } else { m_hasModDir = NO; } } return m_hasModDir == YES; } bool hasModAutoIndex() { if (m_hasModAutoIndex == UNKNOWN) { if (ap_find_linked_module("mod_autoindex.c")) { m_hasModAutoIndex = YES; } else { m_hasModAutoIndex = NO; } } return m_hasModAutoIndex == YES; } bool hasModXsendfile() { if (m_hasModXsendfile == UNKNOWN) { if (ap_find_linked_module("mod_xsendfile.c")) { m_hasModXsendfile = YES; } else { m_hasModXsendfile = NO; } } return m_hasModXsendfile == YES; } int reportBusyException(request_rec *r) { ap_custom_response(r, HTTP_SERVICE_UNAVAILABLE, "This website is too busy right now. Please try again later."); return HTTP_SERVICE_UNAVAILABLE; } /** * Gather some information about the request and do some preparations. * * This method will determine whether the Phusion Passenger handler method * should be run for this request, through the following checks: * (B) There is a backend application defined for this URI. * (C) r->filename already exists, meaning that this URI already maps to an existing file. * (D) There is a page cache file for this URI. * * - If B is not true, or if C is true, then the handler shouldn't be run. * - If D is true, then we first transform r->filename to the page cache file's * filename, and then we let Apache serve it statically. The Phusion Passenger * handler shouldn't be run. * - If D is not true, then the handler should be run. * * @pre config->isEnabled() * @param coreModuleWillBeRun Whether the core.c map_to_storage hook might be called after this. * @return Whether the Phusion Passenger handler hook method should be run. * When true, this method will save a request note object so that future hooks * can store request-specific information. */ bool prepareRequest(request_rec *r, DirConfig *config, const char *filename, bool coreModuleWillBeRun = false) { TRACE_POINT(); DirectoryMapper mapper(r, config, &cstat, config->getStatThrottleRate()); try { if (mapper.getApplicationType() == PAT_NONE) { // (B) is not true. disableRequestNote(r); return false; } } catch (const DocumentRootDeterminationError &e) { auto_ptr note(new RequestNote(mapper, config)); note->errorReport = new ReportDocumentRootDeterminationError(e); apr_pool_userdata_set(note.release(), "Phusion Passenger", RequestNote::cleanup, r->pool); return true; } catch (const FileSystemException &e) { /* DirectoryMapper tried to examine the filesystem in order * to autodetect the application type (e.g. by checking whether * environment.rb exists. But something went wrong, probably * because of a permission problem. This usually * means that the user is trying to deploy an application, but * set the wrong permissions on the relevant folders. * Later, in the handler hook, we inform the user about this * problem so that he can either disable Phusion Passenger's * autodetection routines, or fix the permissions. * * If it's not a permission problem then we'll disable * Phusion Passenger for the rest of the request. */ if (e.code() == EACCES || e.code() == EPERM) { auto_ptr note(new RequestNote(mapper, config)); note->errorReport = new ReportFileSystemError(e); apr_pool_userdata_set(note.release(), "Phusion Passenger", RequestNote::cleanup, r->pool); return true; } else { disableRequestNote(r); return false; } } // (B) is true. try { FileType fileType = getFileType(filename); if (fileType == FT_REGULAR) { // (C) is true. disableRequestNote(r); return false; } // (C) is not true. Check whether (D) is true. char *pageCacheFile; /* Only GET requests may hit the page cache. This is * important because of REST conventions, e.g. * 'POST /foo' maps to 'FooController#create', * while 'GET /foo' maps to 'FooController#index'. * We wouldn't want our page caching support to interfere * with that. */ if (r->method_number == M_GET) { if (fileType == FT_DIRECTORY) { size_t len; len = strlen(filename); if (len > 0 && filename[len - 1] == '/') { pageCacheFile = apr_pstrcat(r->pool, filename, "index.html", (char *) NULL); } else { pageCacheFile = apr_pstrcat(r->pool, filename, ".html", (char *) NULL); } } else { pageCacheFile = apr_pstrcat(r->pool, filename, ".html", (char *) NULL); } if (!fileExists(pageCacheFile)) { pageCacheFile = NULL; } } else { pageCacheFile = NULL; } if (pageCacheFile != NULL) { // (D) is true. r->filename = pageCacheFile; r->canonical_filename = pageCacheFile; if (!coreModuleWillBeRun) { r->finfo.filetype = APR_NOFILE; ap_set_content_type(r, "text/html"); ap_directory_walk(r); ap_file_walk(r); } return false; } else { // (D) is not true. RequestNote *note = new RequestNote(mapper, config); apr_pool_userdata_set(note, "Phusion Passenger", RequestNote::cleanup, r->pool); return true; } } catch (const FileSystemException &e) { /* Something went wrong while accessing the directory in which * r->filename lives. We already know that this URI belongs to * a backend application, so this error probably means that the * user set the wrong permissions for his 'public' folder. We * don't let the handler hook run so that Apache can decide how * to display the error. */ disableRequestNote(r); return false; } } /** * Most of the high-level logic for forwarding a request to a backend application * is contained in this method. */ int handleRequest(request_rec *r) { /********** Step 1: preparation work **********/ /* Initialize OXT backtrace support if not already done for this thread */ if (oxt::get_thread_local_context() == NULL) { /* There is no need to cleanup the context. Apache uses a static * number of threads per process. */ thread_local_context_ptr context = thread_local_context::make_shared_ptr(); unsigned long tid = (unsigned long) pthread_self(); context->thread_name = "Worker " + integerToHex(tid); oxt::set_thread_local_context(context); } /* Check whether an error occured in prepareRequest() that should be reported * to the browser. */ RequestNote *note = getRequestNote(r); if (note == NULL) { return DECLINED; } else if (note->errorReport != NULL) { /* Did an error occur in any of the previous hook methods during * this request? If so, show the error and stop here. */ return note->errorReport->report(r); } else if (r->handler != NULL && strcmp(r->handler, "redirect-handler") == 0) { // mod_rewrite is at work. return DECLINED; } TRACE_POINT(); DirConfig *config = note->config; DirectoryMapper &mapper = note->mapper; try { mapper.getPublicDirectory(); } catch (const DocumentRootDeterminationError &e) { return ReportDocumentRootDeterminationError(e).report(r); } catch (const FileSystemException &e) { /* The application root cannot be determined. This could * happen if, for example, the user specified 'RailsBaseURI /foo' * while there is no filesystem entry called "foo" in the virtual * host's document root. */ return ReportFileSystemError(e).report(r); } UPDATE_TRACE_POINT(); try { /********** Step 2: handle HTTP upload data, if any **********/ int httpStatus = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK); if (httpStatus != OK) { return httpStatus; } this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; bool expectingUploadData; bool shouldBufferUploads; string uploadDataMemory; boost::shared_ptr uploadDataFile; const char *contentLength; expectingUploadData = ap_should_client_block(r); contentLength = lookupHeader(r, "Content-Length"); shouldBufferUploads = config->bufferUpload != DirConfig::DISABLED; /* If the HTTP upload data is larger than a threshold, or if the HTTP * client sent HTTP upload data using the "chunked" transfer encoding * (which implies Content-Length == NULL), then buffer the upload * data into a tempfile. Otherwise, buffer it into memory. * * We never forward the data directly to the backend process because * the HTTP client might block indefinitely until it's done uploading. * This would quickly exhaust the application pool. */ if (expectingUploadData && shouldBufferUploads) { if (contentLength == NULL || atol(contentLength) > LARGE_UPLOAD_THRESHOLD) { uploadDataFile = receiveRequestBody(r); } else { receiveRequestBody(r, contentLength, uploadDataMemory); } /* We'll set the Content-Length header to the length of the * received upload data. Rails 2 requires this header for its * HTTP upload data multipart parsing process. * There are two reasons why we don't rely on the Content-Length * header as sent by the client: * - The client doesn't always send Content-Length, e.g. in case * of "chunked" transfer encoding. * - mod_deflate input compression can make it so that the * amount of upload we receive doesn't match Content-Length: * http://httpd.apache.org/docs/2.0/mod/mod_deflate.html#enable */ if (uploadDataFile != NULL) { apr_table_set(r->headers_in, "Content-Length", toString(ftell(uploadDataFile->handle)).c_str()); } else { apr_table_set(r->headers_in, "Content-Length", toString(uploadDataMemory.size()).c_str()); } } /********** Step 3: forwarding the request and request body to the HelperAgent **********/ vector requestData; string headerData; unsigned int size; char sizeString[16]; int ret; requestData.reserve(3); headerData.reserve(1024 * 2); requestData.push_back(StaticString()); size = constructHeaders(r, config, requestData, mapper, headerData); requestData.push_back(","); ret = snprintf(sizeString, sizeof(sizeString) - 1, "%u:", size); sizeString[ret] = '\0'; requestData[0] = StaticString(sizeString, ret); if (expectingUploadData && shouldBufferUploads && uploadDataFile == NULL) { requestData.push_back(uploadDataMemory); } FileDescriptor conn = connectToHelperAgent(); gatheredWrite(conn, &requestData[0], requestData.size()); if (expectingUploadData) { if (shouldBufferUploads && uploadDataFile != NULL) { sendRequestBody(conn, uploadDataFile); uploadDataFile.reset(); } else if (!shouldBufferUploads) { sendRequestBody(conn, r); } } do { ret = shutdown(conn, SHUT_WR); } while (ret == -1 && errno == EINTR); if (ret == -1 && errno != ENOTCONN) { // FreeBSD has a kernel bug which causes shutdown() // to harmlessly return ENOTCONN sometimes. See comment // in safelyClose(). int e = errno; throw SystemException("Cannot shutdown(SHUT_WR) HelperAgent connection", e); } /********** Step 4: forwarding the response from the backend process back to the HTTP client **********/ UPDATE_TRACE_POINT(); apr_bucket_brigade *bb; apr_bucket *b; PassengerBucketStatePtr bucketState; /* Setup the bucket brigade. */ bb = apr_brigade_create(r->connection->pool, r->connection->bucket_alloc); bucketState = boost::make_shared(conn); b = passenger_bucket_create(bucketState, r->connection->bucket_alloc, config->getBufferResponse()); APR_BRIGADE_INSERT_TAIL(bb, b); b = apr_bucket_eos_create(r->connection->bucket_alloc); APR_BRIGADE_INSERT_TAIL(bb, b); /* Now read the HTTP response header, parse it and fill relevant * information in our request_rec structure. */ /* I know the required size for backendData because I read * util_script.c's source. :-( */ char backendData[MAX_STRING_LEN]; Timer timer; int result = ap_scan_script_header_err_brigade(r, bb, backendData); if (result == OK) { // The API documentation for ap_scan_script_err_brigade() says it // returns HTTP_OK on success, but it actually returns OK. /* We were able to parse the HTTP response header sent by the * backend process! Proceed with passing the bucket brigade, * for forwarding the response body to the HTTP client. */ /* Manually set the Status header because * ap_scan_script_header_err_brigade() filters it * out. Some broken HTTP clients depend on the * Status header for retrieving the HTTP status. */ if (!r->status_line || *r->status_line == '\0') { r->status_line = apr_psprintf(r->pool, "%d Unknown Status", r->status); } apr_table_setn(r->headers_out, "Status", r->status_line); UPDATE_TRACE_POINT(); if (config->errorOverride == DirConfig::ENABLED && ap_is_HTTP_ERROR(r->status)) { /* Send ErrorDocument. * Clear r->status for override error, otherwise ErrorDocument * thinks that this is a recursive error, and doesn't find the * custom error page. */ int originalStatus = r->status; r->status = HTTP_OK; return originalStatus; } else if (ap_pass_brigade(r->output_filters, bb) == APR_SUCCESS) { apr_brigade_cleanup(bb); } return OK; } else { // HelperAgent sent an empty response, or an invalid response. apr_brigade_cleanup(bb); apr_table_setn(r->err_headers_out, "Status", "500 Internal Server Error"); return HTTP_INTERNAL_SERVER_ERROR; } } catch (const thread_interrupted &e) { P_TRACE(3, "A system call was interrupted during an HTTP request. Apache " "is probably restarting or shutting down. Backtrace:\n" << e.backtrace()); return HTTP_INTERNAL_SERVER_ERROR; } catch (const tracable_exception &e) { P_ERROR("Unexpected error in mod_passenger: " << e.what() << "\n" << " Backtrace:\n" << e.backtrace()); return HTTP_INTERNAL_SERVER_ERROR; } catch (const std::exception &e) { P_ERROR("Unexpected error in mod_passenger: " << e.what() << "\n" << " Backtrace: not available"); return HTTP_INTERNAL_SERVER_ERROR; } } unsigned int escapeUri(unsigned char *dst, const unsigned char *src, size_t size) { static const char hex[] = "0123456789abcdef"; /* " ", "#", "%", "?", %00-%1F, %7F-%FF */ static uint32_t escape[] = { 0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */ /* ?>=< ;:98 7654 3210 /.-, +*)( '&%$ #"! */ 0x80000029, /* 1000 0000 0000 0000 0000 0000 0010 1001 */ /* _^]\ [ZYX WVUT SRQP ONML KJIH GFED CBA@ */ 0x00000000, /* 0000 0000 0000 0000 0000 0000 0000 0000 */ /* ~}| {zyx wvut srqp onml kjih gfed cba` */ 0x80000000, /* 1000 0000 0000 0000 0000 0000 0000 0000 */ 0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */ 0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */ 0xffffffff, /* 1111 1111 1111 1111 1111 1111 1111 1111 */ 0xffffffff /* 1111 1111 1111 1111 1111 1111 1111 1111 */ }; if (dst == NULL) { /* find the number of the characters to be escaped */ unsigned int n = 0; while (size > 0) { if (escape[*src >> 5] & (1 << (*src & 0x1f))) { n++; } src++; size--; } return n; } while (size > 0) { if (escape[*src >> 5] & (1 << (*src & 0x1f))) { *dst++ = '%'; *dst++ = hex[*src >> 4]; *dst++ = hex[*src & 0xf]; src++; } else { *dst++ = *src++; } size--; } return 0; } /** * Convert an HTTP header name to a CGI environment name. */ char *httpToEnv(apr_pool_t *p, const char *headerName) { char *result = apr_pstrcat(p, "HTTP_", headerName, (char *) NULL); char *current = result + sizeof("HTTP_") - 1; while (*current != '\0') { if (*current == '-') { *current = '_'; } else { *current = apr_toupper(*current); } current++; } return result; } const char *lookupInTable(apr_table_t *table, const char *name) { const apr_array_header_t *headers = apr_table_elts(table); apr_table_entry_t *elements = (apr_table_entry_t *) headers->elts; for (int i = 0; i < headers->nelts; i++) { if (elements[i].key != NULL && strcasecmp(elements[i].key, name) == 0) { return elements[i].val; } } return NULL; } const char *lookupHeader(request_rec *r, const char *name) { return lookupInTable(r->headers_in, name); } const char *lookupEnv(request_rec *r, const char *name) { return lookupInTable(r->subprocess_env, name); } void addHeader(string &headers, const char *name, const char *value) { if (name != NULL && value != NULL) { headers.append(name); headers.append(1, '\0'); headers.append(value); headers.append(1, '\0'); } } void addHeader(string &headers, const char *name, const StaticString &value) { if (name != NULL) { headers.append(name); headers.append(1, '\0'); headers.append(value.c_str(), value.size()); headers.append(1, '\0'); } } void addHeader(request_rec *r, string &headers, const char *name, int value) { if (value != UNSET_INT_VALUE) { headers.append(name); headers.append(1, '\0'); headers.append(apr_psprintf(r->pool, "%d", value)); headers.append(1, '\0'); } } void addHeader(request_rec *r, string &headers, const char *name, DirConfig::Threeway value) { if (value != DirConfig::UNSET) { headers.append(name); if (value == DirConfig::ENABLED) { headers.append("\0true\0", 6); } else { headers.append("\0false\0", 7); } } } unsigned int constructHeaders(request_rec *r, DirConfig *config, vector &requestData, DirectoryMapper &mapper, string &output) { const char *baseURI = mapper.getBaseURI(); /* * Apache unescapes URI's before passing them to Phusion Passenger, * but backend processes expect the escaped version. * http://code.google.com/p/phusion-passenger/issues/detail?id=404 */ size_t uriLen = strlen(r->uri); unsigned int escaped = escapeUri(NULL, (const unsigned char *) r->uri, uriLen); char *escapedUri = (char *) apr_palloc(r->pool, uriLen + 2 * escaped + 1); escapeUri((unsigned char *) escapedUri, (const unsigned char *) r->uri, uriLen); escapedUri[uriLen + 2 * escaped] = '\0'; // Set standard CGI variables. #ifdef AP_GET_SERVER_VERSION_DEPRECATED addHeader(output, "SERVER_SOFTWARE", ap_get_server_banner()); #else addHeader(output, "SERVER_SOFTWARE", ap_get_server_version()); #endif addHeader(output, "SERVER_PROTOCOL", r->protocol); addHeader(output, "SERVER_NAME", ap_get_server_name(r)); addHeader(output, "SERVER_ADMIN", r->server->server_admin); addHeader(output, "SERVER_ADDR", r->connection->local_ip); addHeader(output, "SERVER_PORT", apr_psprintf(r->pool, "%u", ap_get_server_port(r))); #if HTTP_VERSION(AP_SERVER_MAJORVERSION_NUMBER, AP_SERVER_MINORVERSION_NUMBER) >= 2004 addHeader(output, "REMOTE_ADDR", r->connection->client_ip); addHeader(output, "REMOTE_PORT", apr_psprintf(r->pool, "%d", r->connection->client_addr->port)); #else addHeader(output, "REMOTE_ADDR", r->connection->remote_ip); addHeader(output, "REMOTE_PORT", apr_psprintf(r->pool, "%d", r->connection->remote_addr->port)); #endif addHeader(output, "REMOTE_USER", r->user); addHeader(output, "REQUEST_METHOD", r->method); addHeader(output, "QUERY_STRING", r->args ? r->args : ""); addHeader(output, "HTTPS", lookupEnv(r, "HTTPS")); addHeader(output, "CONTENT_TYPE", lookupHeader(r, "Content-type")); addHeader(output, "DOCUMENT_ROOT", ap_document_root(r)); if (config->allowsEncodedSlashes()) { /* * Apache decodes encoded slashes in r->uri, so we must use r->unparsed_uri * if we are to support encoded slashes. However mod_rewrite doesn't change * r->unparsed_uri, so the user must make a choice between mod_rewrite * support or encoded slashes support. Sucks. :-( * * http://code.google.com/p/phusion-passenger/issues/detail?id=113 * http://code.google.com/p/phusion-passenger/issues/detail?id=230 */ addHeader(output, "REQUEST_URI", r->unparsed_uri); } else { const char *request_uri; if (r->args != NULL) { request_uri = apr_pstrcat(r->pool, escapedUri, "?", r->args, (char *) NULL); } else { request_uri = escapedUri; } addHeader(output, "REQUEST_URI", request_uri); } if (baseURI == NULL) { addHeader(output, "SCRIPT_NAME", ""); addHeader(output, "PATH_INFO", escapedUri); } else { addHeader(output, "SCRIPT_NAME", baseURI); addHeader(output, "PATH_INFO", escapedUri + strlen(baseURI)); } // Set HTTP headers. const apr_array_header_t *hdrs_arr; apr_table_entry_t *hdrs; int i; hdrs_arr = apr_table_elts(r->headers_in); hdrs = (apr_table_entry_t *) hdrs_arr->elts; for (i = 0; i < hdrs_arr->nelts; ++i) { if (hdrs[i].key) { addHeader(output, httpToEnv(r->pool, hdrs[i].key), hdrs[i].val); } } // Add other environment variables. const apr_array_header_t *env_arr; apr_table_entry_t *env; env_arr = apr_table_elts(r->subprocess_env); env = (apr_table_entry_t*) env_arr->elts; for (i = 0; i < env_arr->nelts; ++i) { addHeader(output, env[i].key, env[i].val); } // Phusion Passenger options. addHeader(output, "PASSENGER_STATUS_LINE", "false"); addHeader(output, "PASSENGER_APP_ROOT", mapper.getAppRoot()); addHeader(output, "PASSENGER_APP_GROUP_NAME", config->getAppGroupName(mapper.getAppRoot())); #include "SetHeaders.cpp" addHeader(output, "PASSENGER_SPAWN_METHOD", config->getSpawnMethodString()); addHeader(r, output, "PASSENGER_MAX_REQUEST_QUEUE_SIZE", config->maxRequestQueueSize); addHeader(output, "PASSENGER_APP_TYPE", mapper.getApplicationTypeName()); addHeader(output, "PASSENGER_MAX_PRELOADER_IDLE_TIME", apr_psprintf(r->pool, "%ld", config->maxPreloaderIdleTime)); addHeader(output, "PASSENGER_DEBUGGER", "false"); addHeader(output, "PASSENGER_SHOW_VERSION_IN_HEADER", "true"); addHeader(output, "PASSENGER_STAT_THROTTLE_RATE", apr_psprintf(r->pool, "%ld", config->getStatThrottleRate())); addHeader(output, "PASSENGER_RESTART_DIR", config->getRestartDir()); addHeader(output, "PASSENGER_FRIENDLY_ERROR_PAGES", config->showFriendlyErrorPages() ? "true" : "false"); if (config->useUnionStation() && !config->unionStationKey.empty()) { addHeader(output, "UNION_STATION_SUPPORT", "true"); addHeader(output, "UNION_STATION_KEY", config->unionStationKey); if (!config->unionStationFilters.empty()) { addHeader(output, "UNION_STATION_FILTERS", config->getUnionStationFilterString()); } } /*********************/ /*********************/ requestData.push_back(output); return output.size(); } void throwUploadBufferingException(request_rec *r, int code) { DirConfig *config = getDirConfig(r); string message("An error occured while " "buffering HTTP upload data to " "a temporary file in "); ServerInstanceDir::GenerationPtr generation = agentsStarter.getGeneration(); message.append(config->getUploadBufferDir(generation)); switch (code) { case ENOSPC: message.append(". Disk directory doesn't have enough disk space, " "so please make sure that it has " "enough disk space for buffering file uploads, " "or set the 'PassengerUploadBufferDir' directive " "to a directory that has enough disk space."); throw RuntimeException(message); break; case EDQUOT: message.append(". The current Apache worker process (which is " "running as "); message.append(getProcessUsername()); message.append(") cannot write to this directory because of " "disk quota limits. Please make sure that the volume " "that this directory resides on has enough disk space " "quota for the Apache worker process, or set the " "'PassengerUploadBufferDir' directive to a different " "directory that has enough disk space quota."); throw RuntimeException(message); break; case ENOENT: message.append(". This directory doesn't exist, so please make " "sure that this directory exists, or set the " "'PassengerUploadBufferDir' directive to a " "directory that exists and can be written to."); throw RuntimeException(message); break; case EACCES: message.append(". The current Apache worker process (which is " "running as "); message.append(getProcessUsername()); message.append(") doesn't have permissions to write to this " "directory. Please change the permissions for this " "directory (as well as all parent directories) so that " "it is writable by the Apache worker process, or set " "the 'PassengerUploadBufferDir' directive to a directory " "that Apache can write to."); throw RuntimeException(message); break; default: throw SystemException(message, code); break; } } /** * Reads the next chunk of the request body and put it into a buffer. * * This is like ap_get_client_block(), but can actually report errors * in a sane way. ap_get_client_block() tells you that something went * wrong, but not *what* went wrong. * * @param r The current request. * @param buffer A buffer to put the read data into. * @param bufsiz The size of the buffer. * @return The number of bytes read, or 0 on EOF. * @throws RuntimeException Something non-I/O related went wrong, e.g. * failure to allocate memory and stuff. * @throws IOException An I/O error occurred while trying to read the * request body data. */ unsigned long readRequestBodyFromApache(request_rec *r, char *buffer, apr_size_t bufsiz) { apr_status_t rv; apr_bucket_brigade *bb; if (r->remaining < 0 || (!r->read_chunked && r->remaining == 0)) { return 0; } bb = apr_brigade_create(r->pool, r->connection->bucket_alloc); if (bb == NULL) { r->connection->keepalive = AP_CONN_CLOSE; throw RuntimeException("An error occurred while receiving HTTP upload data: " "unable to create a bucket brigade. Maybe the system doesn't have " "enough free memory."); } rv = ap_get_brigade(r->input_filters, bb, AP_MODE_READBYTES, APR_BLOCK_READ, bufsiz); /* We lose the failure code here. This is why ap_get_client_block should * not be used. */ if (rv != APR_SUCCESS) { /* if we actually fail here, we want to just return and * stop trying to read data from the client. */ r->connection->keepalive = AP_CONN_CLOSE; apr_brigade_destroy(bb); char buf[150], *errorString, message[1024]; errorString = apr_strerror(rv, buf, sizeof(buf)); if (errorString != NULL) { snprintf(message, sizeof(message), "An error occurred while receiving HTTP upload data: %s (%d)", errorString, rv); } else { snprintf(message, sizeof(message), "An error occurred while receiving HTTP upload data: unknown error %d", rv); } message[sizeof(message) - 1] = '\0'; throw RuntimeException(message); } /* If this fails, it means that a filter is written incorrectly and that * it needs to learn how to properly handle APR_BLOCK_READ requests by * returning data when requested. */ if (APR_BRIGADE_EMPTY(bb)) { throw RuntimeException("An error occurred while receiving HTTP upload data: " "the next filter in the input filter chain has " "a bug. Please contact the author who wrote this filter about " "this. This problem is not caused by Phusion Passenger."); } /* Check to see if EOS in the brigade. * * If so, we have to leave a nugget for the *next* readRequestBodyFromApache() * call to return 0. */ if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(bb))) { if (r->read_chunked) { r->remaining = -1; } else { r->remaining = 0; } } rv = apr_brigade_flatten(bb, buffer, &bufsiz); if (rv != APR_SUCCESS) { apr_brigade_destroy(bb); char buf[150], *errorString, message[1024]; errorString = apr_strerror(rv, buf, sizeof(buf)); if (errorString != NULL) { snprintf(message, sizeof(message), "An error occurred while receiving HTTP upload data: %s (%d)", errorString, rv); } else { snprintf(message, sizeof(message), "An error occurred while receiving HTTP upload data: unknown error %d", rv); } message[sizeof(message) - 1] = '\0'; throw IOException(message); } /* XXX yank me? */ r->read_length += bufsiz; apr_brigade_destroy(bb); return bufsiz; } /** * Receive the HTTP upload data and buffer it into a BufferedUpload temp file. * * @param r The request. * @throws RuntimeException * @throws SystemException * @throws IOException */ boost::shared_ptr receiveRequestBody(request_rec *r) { TRACE_POINT(); DirConfig *config = getDirConfig(r); boost::shared_ptr tempFile; try { ServerInstanceDir::GenerationPtr generation = agentsStarter.getGeneration(); string uploadBufferDir = config->getUploadBufferDir(generation); tempFile.reset(new BufferedUpload(uploadBufferDir)); } catch (const SystemException &e) { throwUploadBufferingException(r, e.code()); } char buf[1024 * 32]; apr_off_t len; size_t total_written = 0; while ((len = readRequestBodyFromApache(r, buf, sizeof(buf))) > 0) { size_t written = 0; do { size_t ret = fwrite(buf, 1, len - written, tempFile->handle); if (ret <= 0 || fflush(tempFile->handle) == EOF) { throwUploadBufferingException(r, errno); } written += ret; } while (written < (size_t) len); total_written += written; } return tempFile; } /** * Receive the HTTP upload data and buffer it into a string. * * @param r The request. * @param contentLength The value of the HTTP Content-Length header. This is used * to check whether the HTTP client has sent complete upload * data. NULL indicates that there is no Content-Length header, * i.e. that the HTTP client used chunked transfer encoding. * @param string The string to buffer into. * @throws RuntimeException * @throws IOException */ void receiveRequestBody(request_rec *r, const char *contentLength, string &buffer) { TRACE_POINT(); unsigned long l_contentLength = 0; char buf[1024 * 32]; apr_off_t len; buffer.clear(); if (contentLength != NULL) { l_contentLength = atol(contentLength); buffer.reserve(l_contentLength); } while ((len = readRequestBodyFromApache(r, buf, sizeof(buf))) > 0) { buffer.append(buf, len); } } void sendRequestBody(const FileDescriptor &fd, boost::shared_ptr &uploadData) { TRACE_POINT(); rewind(uploadData->handle); while (!feof(uploadData->handle)) { char buf[1024 * 32]; size_t size; size = fread(buf, 1, sizeof(buf), uploadData->handle); try { writeExact(fd, buf, size); } catch (const SystemException &e) { if (e.code() == EPIPE || e.code() == ECONNRESET) { // The HelperAgent stopped reading the body, probably // because the application already sent EOF. return; } else { throw e; } } } } void sendRequestBody(const FileDescriptor &fd, request_rec *r) { TRACE_POINT(); char buf[1024 * 32]; apr_off_t len; try { while ((len = readRequestBodyFromApache(r, buf, sizeof(buf))) > 0) { writeExact(fd, buf, len); } } catch (const SystemException &e) { if (e.code() == EPIPE || e.code() == ECONNRESET) { // The HelperAgent stopped reading the body, probably // because the application already sent EOF. return; } else { throw e; } } } public: Hooks(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) : cstat(1024), agentsStarter(AS_APACHE) { serverConfig.finalize(); Passenger::setLogLevel(serverConfig.logLevel); if (serverConfig.debugLogFile != NULL) { Passenger::setDebugFile(serverConfig.debugLogFile); } m_hasModRewrite = UNKNOWN; m_hasModDir = UNKNOWN; m_hasModAutoIndex = UNKNOWN; m_hasModXsendfile = UNKNOWN; P_DEBUG("Initializing Phusion Passenger..."); ap_add_version_component(pconf, "Phusion_Passenger/" PASSENGER_VERSION); if (serverConfig.root == NULL) { throw ConfigurationException("The 'PassengerRoot' configuration option " "is not specified. This option is required, so please specify it. " "TIP: The correct value for this option was given to you by " "'passenger-install-apache2-module'."); } VariantMap params; params .setPid ("web_server_pid", getpid()) .setUid ("web_server_worker_uid", unixd_config.user_id) .setGid ("web_server_worker_gid", unixd_config.group_id) .setInt ("log_level", serverConfig.logLevel) .set ("debug_log_file", (serverConfig.debugLogFile == NULL) ? "" : serverConfig.debugLogFile) .set ("temp_dir", serverConfig.tempDir) .setBool("user_switching", serverConfig.userSwitching) .set ("default_user", serverConfig.defaultUser) .set ("default_group", serverConfig.defaultGroup) .set ("default_ruby", serverConfig.defaultRuby) .setInt ("max_pool_size", serverConfig.maxPoolSize) .setInt ("pool_idle_time", serverConfig.poolIdleTime) .set ("analytics_log_user", serverConfig.analyticsLogUser) .set ("analytics_log_group", serverConfig.analyticsLogGroup) .set ("union_station_gateway_address", serverConfig.unionStationGatewayAddress) .setInt ("union_station_gateway_port", serverConfig.unionStationGatewayPort) .set ("union_station_gateway_cert", serverConfig.unionStationGatewayCert) .set ("union_station_proxy_address", serverConfig.unionStationProxyAddress) .setStrSet("prestart_urls", serverConfig.prestartURLs); serverConfig.ctl.addTo(params); agentsStarter.start(serverConfig.root, params); // Store some relevant information in the generation directory. string generationPath = agentsStarter.getGeneration()->getPath(); server_rec *server; string configFiles; #ifdef AP_GET_SERVER_VERSION_DEPRECATED createFile(generationPath + "/web_server.txt", ap_get_server_description()); #else createFile(generationPath + "/web_server.txt", ap_get_server_version()); #endif for (server = s; server != NULL; server = server->next) { if (server->defn_name != NULL) { configFiles.append(server->defn_name); configFiles.append(1, '\n'); } } createFile(generationPath + "/config_files.txt", configFiles); } void childInit(apr_pool_t *pchild, server_rec *s) { agentsStarter.detach(); } int prepareRequestWhenInHighPerformanceMode(request_rec *r) { DirConfig *config = getDirConfig(r); if (config->isEnabled() && config->highPerformanceMode()) { if (prepareRequest(r, config, r->filename, true)) { return OK; } else { return DECLINED; } } else { return DECLINED; } } /** * This is the hook method for the map_to_storage hook. Apache's final map_to_storage hook * method (defined in core.c) will do the following: * * If r->filename doesn't exist, then it will change the filename to the * following form: * * A/B * * A is top-most directory that exists. B is the first filename piece that * normally follows A. For example, suppose that a website's DocumentRoot * is /website, on server http://test.com/. Suppose that there's also a * directory /website/images. No other files or directories exist in /website. * * If we access: then r->filename will be: * http://test.com/foo/bar /website/foo * http://test.com/foo/bar/baz /website/foo * http://test.com/images/foo/bar /website/images/foo * * We obviously don't want this to happen because it'll interfere with our page * cache file search code. So here we save the original value of r->filename so * that we can use it later. */ int saveOriginalFilename(request_rec *r) { apr_table_set(r->notes, "Phusion Passenger: original filename", r->filename); return DECLINED; } int prepareRequestWhenNotInHighPerformanceMode(request_rec *r) { DirConfig *config = getDirConfig(r); if (config->isEnabled()) { if (config->highPerformanceMode()) { /* Preparations have already been done in the map_to_storage hook. * Prevent other modules' fixups hooks from being run. */ return OK; } else { /* core.c's map_to_storage hook will transform the filename, as * described by saveOriginalFilename(). Here we restore the * original filename. */ const char *filename = apr_table_get(r->notes, "Phusion Passenger: original filename"); if (filename == NULL) { return DECLINED; } else { prepareRequest(r, config, filename); /* Always return declined in order to let other modules' * hooks run, regardless of what prepareRequest()'s * result is. */ return DECLINED; } } } else { return DECLINED; } } /** * The default .htaccess provided by on Rails on Rails (that is, before version 2.1.0) * has the following mod_rewrite rules in it: * * RewriteEngine on * RewriteRule ^$ index.html [QSA] * RewriteRule ^([^.]+)$ $1.html [QSA] * RewriteCond %{REQUEST_FILENAME} !-f * RewriteRule ^(.*)$ dispatch.cgi [QSA,L] * * As a result, all requests that do not map to a filename will be redirected to * dispatch.cgi (or dispatch.fcgi, if the user so specified). We don't want that * to happen, so before mod_rewrite applies its rules, we save the current state. * After mod_rewrite has applied its rules, undoRedirectionToDispatchCgi() will * check whether mod_rewrite attempted to perform an internal redirection to * dispatch.(f)cgi. If so, then it will revert the state to the way it was before * mod_rewrite took place. */ int saveStateBeforeRewriteRules(request_rec *r) { RequestNote *note = getRequestNote(r); if (note != 0 && hasModRewrite()) { note->handlerBeforeModRewrite = r->handler; note->filenameBeforeModRewrite = r->filename; } return DECLINED; } int undoRedirectionToDispatchCgi(request_rec *r) { RequestNote *note = getRequestNote(r); if (note == 0 || !hasModRewrite()) { return DECLINED; } if (r->handler != NULL && strcmp(r->handler, "redirect-handler") == 0) { // Check whether r->filename looks like "redirect:.../dispatch.(f)cgi" size_t len = strlen(r->filename); // 22 == strlen("redirect:/dispatch.cgi") if (len >= 22 && memcmp(r->filename, "redirect:", 9) == 0 && (memcmp(r->filename + len - 13, "/dispatch.cgi", 13) == 0 || memcmp(r->filename + len - 14, "/dispatch.fcgi", 14) == 0)) { if (note->filenameBeforeModRewrite != NULL) { r->filename = note->filenameBeforeModRewrite; r->canonical_filename = note->filenameBeforeModRewrite; r->handler = note->handlerBeforeModRewrite; } } } return DECLINED; } /** * mod_dir does the following: * If r->filename is a directory, and the URI doesn't end with a slash, * then it will redirect the browser to an URI with a slash. For example, * if you go to http://foo.com/images, then it will redirect you to * http://foo.com/images/. * * This behavior is undesired. Suppose that there is an ImagesController, * and there's also a 'public/images' folder used for storing page cache * files. Then we don't want mod_dir to perform the redirection. * * So in startBlockingModDir(), we temporarily change some fields in the * request structure in order to block mod_dir. In endBlockingModDir() we * revert those fields to their old value. */ int startBlockingModDir(request_rec *r) { RequestNote *note = getRequestNote(r); if (note != 0 && hasModDir()) { note->oldFileType = r->finfo.filetype; r->finfo.filetype = APR_NOFILE; } return DECLINED; } int endBlockingModDir(request_rec *r) { RequestNote *note = getRequestNote(r); if (note != 0 && hasModDir()) { r->finfo.filetype = note->oldFileType; } return DECLINED; } /** * mod_autoindex will try to display a directory index for URIs that map to a directory. * This is undesired because of page caching semantics. Suppose that a Rails application * has an ImagesController which has page caching enabled, and thus also a 'public/images' * directory. When the visitor visits /images we'll want the request to be forwarded to * the Rails application, instead of displaying a directory index. * * So in this hook method, we temporarily change some fields in the request structure * in order to block mod_autoindex. In endBlockingModAutoIndex(), we restore the request * structure to its former state. */ int startBlockingModAutoIndex(request_rec *r) { RequestNote *note = getRequestNote(r); if (note != 0 && hasModAutoIndex()) { note->handlerBeforeModAutoIndex = r->handler; r->handler = ""; } return DECLINED; } int endBlockingModAutoIndex(request_rec *r) { RequestNote *note = getRequestNote(r); if (note != 0 && hasModAutoIndex()) { r->handler = note->handlerBeforeModAutoIndex; } return DECLINED; } int handleRequestWhenInHighPerformanceMode(request_rec *r) { DirConfig *config = getDirConfig(r); if (config->highPerformanceMode()) { return handleRequest(r); } else { return DECLINED; } } int handleRequestWhenNotInHighPerformanceMode(request_rec *r) { DirConfig *config = getDirConfig(r); if (config->highPerformanceMode()) { return DECLINED; } else { return handleRequest(r); } } }; /****************************************************************** * Below follows lightweight C wrappers around the C++ Hook class. ******************************************************************/ /** * @ingroup Hooks * @{ */ static Hooks *hooks = NULL; static apr_status_t destroy_hooks(void *arg) { try { this_thread::disable_interruption di; this_thread::disable_syscall_interruption dsi; P_DEBUG("Shutting down Phusion Passenger..."); delete hooks; hooks = NULL; } catch (const thread_interrupted &) { // Ignore interruptions, we're shutting down anyway. P_TRACE(3, "A system call was interrupted during shutdown of mod_passenger."); } catch (const std::exception &e) { // Ignore other exceptions, we're shutting down anyway. P_TRACE(3, "Exception during shutdown of mod_passenger: " << e.what()); } return APR_SUCCESS; } static int init_module(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) { /* * HISTORICAL NOTE: * * The Apache initialization process has the following properties: * * 1. Apache on Unix calls the post_config hook twice, once before detach() and once * after. On Windows it never calls detach(). * 2. When Apache is compiled to use DSO modules, the modules are unloaded between the * two post_config hook calls. * 3. On Unix, if the -X commandline option is given (the 'DEBUG' config is set), * detach() will not be called. * * Because of property #2, the post_config hook is called twice. We initially tried * to avoid this with all kinds of hacks and workarounds, but none of them are * universal, i.e. it works for some people but not for others. So we got rid of the * hacks, and now we always initialize in the post_config hook. */ if (hooks == NULL) { oxt::initialize(); } else { P_DEBUG("Restarting Phusion Passenger...."); delete hooks; hooks = NULL; } try { hooks = new Hooks(pconf, plog, ptemp, s); apr_pool_cleanup_register(pconf, NULL, destroy_hooks, apr_pool_cleanup_null); return OK; } catch (const thread_interrupted &e) { P_TRACE(2, "A system call was interrupted during mod_passenger " "initialization. Apache might be restarting or shutting " "down. Backtrace:\n" << e.backtrace()); return DECLINED; } catch (const thread_resource_error &e) { struct rlimit lim; string pthread_threads_max; int ret; lim.rlim_cur = 0; lim.rlim_max = 0; /* Solaris does not define the RLIMIT_NPROC limit. Setting it to infinity... */ #ifdef RLIMIT_NPROC getrlimit(RLIMIT_NPROC, &lim); #else lim.rlim_cur = lim.rlim_max = RLIM_INFINITY; #endif #ifdef PTHREAD_THREADS_MAX pthread_threads_max = toString(PTHREAD_THREADS_MAX); #else pthread_threads_max = "unknown"; #endif ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "*** Passenger could not be initialize because a " "threading resource could not be allocated or initialized. " "The error message is:"); fprintf(stderr, " %s\n\n" "System settings:\n" " RLIMIT_NPROC: soft = %d, hard = %d\n" " PTHREAD_THREADS_MAX: %s\n" "\n", e.what(), (int) lim.rlim_cur, (int) lim.rlim_max, pthread_threads_max.c_str()); fprintf(stderr, "Output of 'uname -a' follows:\n"); fflush(stderr); ret = ::system("uname -a >&2"); (void) ret; // Ignore compiler warning. fprintf(stderr, "\nOutput of 'ulimit -a' follows:\n"); fflush(stderr); ret = ::system("ulimit -a >&2"); (void) ret; // Ignore compiler warning. return DECLINED; } catch (const std::exception &e) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "*** Passenger could not be initialized because of this error: %s", e.what()); hooks = NULL; return DECLINED; } } static void child_init(apr_pool_t *pchild, server_rec *s) { if (OXT_LIKELY(hooks != NULL)) { hooks->childInit(pchild, s); } } #define DEFINE_REQUEST_HOOK(c_name, cpp_name) \ static int c_name(request_rec *r) { \ if (OXT_LIKELY(hooks != NULL)) { \ return hooks->cpp_name(r); \ } else { \ return DECLINED; \ } \ } DEFINE_REQUEST_HOOK(prepare_request_when_in_high_performance_mode, prepareRequestWhenInHighPerformanceMode) DEFINE_REQUEST_HOOK(save_original_filename, saveOriginalFilename) DEFINE_REQUEST_HOOK(prepare_request_when_not_in_high_performance_mode, prepareRequestWhenNotInHighPerformanceMode) DEFINE_REQUEST_HOOK(save_state_before_rewrite_rules, saveStateBeforeRewriteRules) DEFINE_REQUEST_HOOK(undo_redirection_to_dispatch_cgi, undoRedirectionToDispatchCgi) DEFINE_REQUEST_HOOK(start_blocking_mod_dir, startBlockingModDir) DEFINE_REQUEST_HOOK(end_blocking_mod_dir, endBlockingModDir) DEFINE_REQUEST_HOOK(start_blocking_mod_autoindex, startBlockingModAutoIndex) DEFINE_REQUEST_HOOK(end_blocking_mod_autoindex, endBlockingModAutoIndex) DEFINE_REQUEST_HOOK(handle_request_when_in_high_performance_mode, handleRequestWhenInHighPerformanceMode) DEFINE_REQUEST_HOOK(handle_request_when_not_in_high_performance_mode, handleRequestWhenNotInHighPerformanceMode) /** * Apache hook registration function. */ void passenger_register_hooks(apr_pool_t *p) { static const char * const rewrite_module[] = { "mod_rewrite.c", NULL }; static const char * const dir_module[] = { "mod_dir.c", NULL }; static const char * const autoindex_module[] = { "mod_autoindex.c", NULL }; ap_hook_post_config(init_module, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_child_init(child_init, NULL, NULL, APR_HOOK_MIDDLE); // The hooks here are defined in the order that they're called. ap_hook_map_to_storage(prepare_request_when_in_high_performance_mode, NULL, NULL, APR_HOOK_FIRST); ap_hook_map_to_storage(save_original_filename, NULL, NULL, APR_HOOK_LAST); ap_hook_fixups(prepare_request_when_not_in_high_performance_mode, NULL, rewrite_module, APR_HOOK_FIRST); ap_hook_fixups(save_state_before_rewrite_rules, NULL, rewrite_module, APR_HOOK_LAST); ap_hook_fixups(undo_redirection_to_dispatch_cgi, rewrite_module, NULL, APR_HOOK_FIRST); ap_hook_fixups(start_blocking_mod_dir, NULL, dir_module, APR_HOOK_LAST); ap_hook_fixups(end_blocking_mod_dir, dir_module, NULL, APR_HOOK_LAST); ap_hook_handler(handle_request_when_in_high_performance_mode, NULL, NULL, APR_HOOK_FIRST); ap_hook_handler(start_blocking_mod_autoindex, NULL, autoindex_module, APR_HOOK_LAST); ap_hook_handler(end_blocking_mod_autoindex, autoindex_module, NULL, APR_HOOK_FIRST); ap_hook_handler(handle_request_when_not_in_high_performance_mode, NULL, NULL, APR_HOOK_LAST); } /** * @} */ passenger-4.0.37/ext/apache2/Hooks.h000644 000765 000024 00000003015 12233035540 017552 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef _PASSENGER_HOOKS_H_ #define _PASSENGER_HOOKS_H_ #include #ifdef __cplusplus extern "C" { #endif /** * @defgroup Hooks Apache hooks * @ingroup Core */ extern void passenger_register_hooks(apr_pool_t *p); #ifdef __cplusplus } #endif #endif /* _PASSENGER_HOOKS_H_ */ passenger-4.0.37/ext/apache2/MergeDirConfig.cpp000644 000765 000024 00000007026 12233035540 021654 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * MergeDirConfig.cpp is automatically generated from MergeDirConfig.cpp.erb, * using definitions from lib/phusion_passenger/apache2/config_options.rb. * Edits to MergeDirConfig.cpp will be lost. * * To update MergeDirConfig.cpp: * rake apache2 * * To force regeneration of MergeDirConfig.cpp: * rm -f ext/apache2/MergeDirConfig.cpp * rake ext/apache2/MergeDirConfig.cpp */ config->ruby = (add->ruby == NULL) ? base->ruby : add->ruby; config->python = (add->python == NULL) ? base->python : add->python; config->nodejs = (add->nodejs == NULL) ? base->nodejs : add->nodejs; config->appEnv = (add->appEnv == NULL) ? base->appEnv : add->appEnv; config->minInstances = (add->minInstances == UNSET_INT_VALUE) ? base->minInstances : add->minInstances; config->maxInstancesPerApp = (add->maxInstancesPerApp == UNSET_INT_VALUE) ? base->maxInstancesPerApp : add->maxInstancesPerApp; config->user = (add->user == NULL) ? base->user : add->user; config->group = (add->group == NULL) ? base->group : add->group; config->errorOverride = (add->errorOverride == DirConfig::UNSET) ? base->errorOverride : add->errorOverride; config->maxRequests = (add->maxRequests == UNSET_INT_VALUE) ? base->maxRequests : add->maxRequests; config->startTimeout = (add->startTimeout == UNSET_INT_VALUE) ? base->startTimeout : add->startTimeout; config->highPerformance = (add->highPerformance == DirConfig::UNSET) ? base->highPerformance : add->highPerformance; config->enabled = (add->enabled == DirConfig::UNSET) ? base->enabled : add->enabled; config->maxRequestQueueSize = (add->maxRequestQueueSize == UNSET_INT_VALUE) ? base->maxRequestQueueSize : add->maxRequestQueueSize; config->loadShellEnvvars = (add->loadShellEnvvars == DirConfig::UNSET) ? base->loadShellEnvvars : add->loadShellEnvvars; config->bufferUpload = (add->bufferUpload == DirConfig::UNSET) ? base->bufferUpload : add->bufferUpload; config->appType = (add->appType == NULL) ? base->appType : add->appType; config->startupFile = (add->startupFile == NULL) ? base->startupFile : add->startupFile; passenger-4.0.37/ext/apache2/MergeDirConfig.cpp.erb000644 000765 000024 00000005702 12233035540 022422 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * MergeDirConfig.cpp is automatically generated from MergeDirConfig.cpp.erb, * using definitions from lib/phusion_passenger/apache2/config_options.rb. * Edits to MergeDirConfig.cpp will be lost. * * To update MergeDirConfig.cpp: * rake apache2 * * To force regeneration of MergeDirConfig.cpp: * rm -f ext/apache2/MergeDirConfig.cpp * rake ext/apache2/MergeDirConfig.cpp */ <% require 'phusion_passenger/apache2/config_options' def filter_eligible_options(options) return options.reject do |option| option[:alias_for] || option.fetch(:field, true).nil? || option[:field].to_s =~ /\./ || !option.fetch(:auto_generate_nginx_merge_code, true) end end def struct_field_for(option) if option.has_key?(:field) return option[:field] else result = option[:name].sub(/^Passenger/, '') result[0] = result[0..0].downcase return result end end %> <% for option in filter_eligible_options(APACHE2_DIRECTORY_CONFIGURATION_OPTIONS) %> <% if option[:type] == :string %> config-><%= struct_field_for(option) %> = (add-><%= struct_field_for(option) %> == NULL) ? base-><%= struct_field_for(option) %> : add-><%= struct_field_for(option) %>; <% elsif option[:type] == :integer %> config-><%= struct_field_for(option) %> = (add-><%= struct_field_for(option) %> == UNSET_INT_VALUE) ? base-><%= struct_field_for(option) %> : add-><%= struct_field_for(option) %>; <% elsif option[:type] == :flag %> config-><%= struct_field_for(option) %> = (add-><%= struct_field_for(option) %> == DirConfig::UNSET) ? base-><%= struct_field_for(option) %> : add-><%= struct_field_for(option) %>; <% else raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" end %> <% end %> passenger-4.0.37/ext/apache2/mod_passenger.c000644 000765 000024 00000003740 12233035540 021315 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010, 2011, 2012 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include #include #include "Configuration.h" #include "Hooks.h" #ifdef VISIBILITY_ATTRIBUTE_SUPPORTED #define PUBLIC_SYMBOL __attribute__ ((visibility("default"))) #else #define PUBLIC_SYMBOL #endif PUBLIC_SYMBOL module AP_MODULE_DECLARE_DATA passenger_module = { STANDARD20_MODULE_STUFF, passenger_config_create_dir, /* create per-dir config structs */ passenger_config_merge_dir, /* merge per-dir config structs */ NULL, /* create per-server config structs */ NULL, /* merge per-server config structs */ passenger_commands, /* table of config file commands */ passenger_register_hooks, /* register hooks */ }; passenger-4.0.37/ext/apache2/SetHeaders.cpp000644 000765 000024 00000005054 12233035540 021056 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * SetHeaders.cpp is automatically generated from SetHeaders.cpp.erb, * using definitions from lib/phusion_passenger/apache2/config_options.rb. * Edits to SetHeaders.cpp will be lost. * * To update SetHeaders.cpp: * rake apache2 * * To force regeneration of SetHeaders.cpp: * rm -f ext/apache2/SetHeaders.cpp * rake ext/apache2/SetHeaders.cpp */ addHeader(output, "PASSENGER_RUBY", config->ruby ? config->ruby : serverConfig.defaultRuby); addHeader(output, "PASSENGER_PYTHON", config->python); addHeader(output, "PASSENGER_NODEJS", config->nodejs); addHeader(output, "PASSENGER_APP_ENV", config->appEnv); addHeader(r, output, "PASSENGER_MIN_PROCESSES", config->minInstances); addHeader(r, output, "PASSENGER_MAX_PROCESSES", config->maxInstancesPerApp); addHeader(output, "PASSENGER_USER", config->user); addHeader(output, "PASSENGER_GROUP", config->group); addHeader(r, output, "PASSENGER_MAX_REQUESTS", config->maxRequests); addHeader(r, output, "PASSENGER_START_TIMEOUT", config->startTimeout); addHeader(r, output, "PASSENGER_MAX_REQUEST_QUEUE_SIZE", config->maxRequestQueueSize); addHeader(r, output, "PASSENGER_LOAD_SHELL_ENVVARS", config->loadShellEnvvars); addHeader(output, "PASSENGER_STARTUP_FILE", config->startupFile); passenger-4.0.37/ext/apache2/SetHeaders.cpp.erb000644 000765 000024 00000005652 12233035540 021631 0ustar00honglistaff000000 000000 /* * Phusion Passenger - https://www.phusionpassenger.com/ * Copyright (c) 2010-2013 Phusion * * "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /* * SetHeaders.cpp is automatically generated from SetHeaders.cpp.erb, * using definitions from lib/phusion_passenger/apache2/config_options.rb. * Edits to SetHeaders.cpp will be lost. * * To update SetHeaders.cpp: * rake apache2 * * To force regeneration of SetHeaders.cpp: * rm -f ext/apache2/SetHeaders.cpp * rake ext/apache2/SetHeaders.cpp */ <% require 'phusion_passenger/apache2/config_options' def filter_eligible_options(options) return options.reject do |option| option[:alias_for] || option.fetch(:field, true).nil? || option[:field].to_s =~ /\./ || (option.has_key?(:header) && !option[:header]) end end def struct_field_for(option) if option.has_key?(:field) return option[:field] else result = option[:name].sub(/^Passenger/, '') result[0] = result[0..0].downcase return result end end def header_name_for(option) if option[:header] return option[:header].inspect else result = option[:name].sub(/^Passenger/, '') result.gsub!(/([A-Z])/, '_\1') return "PASSENGER#{result.upcase}".inspect end end def header_expression_for(option) if option[:header_expression] return option[:header_expression] else return "config->" + struct_field_for(option) end end %> <% for option in filter_eligible_options(APACHE2_DIRECTORY_CONFIGURATION_OPTIONS) %> <% if option[:type] == :string %> addHeader(output, <%= header_name_for(option) %>, <%= header_expression_for(option) %>); <% elsif option[:type] == :integer || option[:type] == :flag %> addHeader(r, output, <%= header_name_for(option) %>, <%= header_expression_for(option) %>); <% else %> <% raise "Unknown option type #{option[:type].inspect} for option #{option[:name]}" %> <% end %> <% end %> passenger-4.0.37/doc/Architectural overview.html000644 000765 000024 00000472152 12233035540 022303 0ustar00honglistaff000000 000000 Phusion Passenger design & architecture

1. Introduction to related technologies

1.1. Web application models

Before we describe Phusion Passenger, it is important to understand how typical web applications work from the viewpoint of someone who wants to connect the application to a web server.

A typical, isolated, web application accepts an HTTP request from some I/O channel, processes it internally, and outputs an HTTP response, which is sent back to the client. This is done in a loop, until the application is commanded to exit. This does not necessarily mean that the web application speaks HTTP directly: it just means that the web application accepts some kind of representation of an HTTP request.

Architecture of a typical web application in isolation

Few web applications are accessible directly by HTTP clients. Common models are:

  1. The web application is contained in an application server. This application server may or may not be able to contain multiple web applications. The application server is then connected to the web server through some kind of protocol. This protocol may be HTTP, FastCGI, SCGI, AJP or whatever. The web server dispatches requests to the application server, which in turn dispatches requests to the correct web application, in a format that the web application understands. Conversely, HTTP responses outputted by the web application are sent to the application server, which in turn sends them to the web server, and eventually to the HTTP client.

    Typical examples of such a model:

    • A J2EE application, contained in the Tomcat application server, proxied behind the Apache web server. Tomcat can contain multiple web applications in a single Tomcat instance.

    • Most Ruby application servers besides Phusion Passenger (Thin, Unicorn, Goliath, etc). These application servers can only contain a single Ruby web application per instance. They load the web application into their own process and are put behind a web server (Apache, Nginx) in a reverse proxy setup.

  2. The web application is contained in a web server. In this case, the web server acts like an application server. This is the case for PHP applications on Apache servers with mod_php. Note that this does not necessarily mean that the web application is run inside the same process as the web server: it just means that the web server manages applications. In case of mod_php however PHP does run directly inside the Apache worker processes.

    Phusion Passenger for Apache and Phusion Passenger for Nginx implement this model.

  3. The web application is a web server, and can accept HTTP requests directly. This is the case for the Trac bug tracking system, running in its standalone server. In most setups they are reverse proxied behind a real web server such as Apache or Nginx, instead of accepting HTTP requests directly.

    Phusion Passenger Standalone implements this model. You can expose Phusion Passenger Standalone directly to the Internet because it uses Nginx internally.

  4. The web application does not speak HTTP directly, but is connected directly to the web server through some communication adapter. CGI, FastCGI and SCGI are good examples of this.

These descriptions are true for virtually all web applications, whether they’re based on PHP, Django, J2EE, ASP.NET, Ruby on Rails, or whatever. Note that all of these models provide the same functionality, i.e. no model can do something that a different model can’t. The critical reader will notice that all of these models are identical to the one described in the first diagram, if the combination of web servers, application servers, web applications etc. are considered to be a single entity; a black box if you will.

It should also be noted that these models do not enforce any particular I/O processing implementation. The web servers, application servers, web applications, etc. could process I/O serially (i.e. one request at a time), could multiplex I/O with a single thread (e.g. by using select(2) or poll(2)) or it could process I/O with multiple threads and/or multiple processes.

Of course, there are many variations possible. For example, load balancers could be used. But that is outside the scope of this document.

1.1.1. Why reverse proxy?

As you’ve seen, it is often necessary to put the web application or its application server behind a real web server in a reverse proxy setup even when the web app/app server already speaks HTTP. This is because implementing HTTP in a proper, secure way involves more than just speaking the protocol. The public Internet is a hostile environment where clients can send any arbitrary data and can exhibit any arbitrary I/O patterns. Web servers like Apache and Nginx have already implemented world-class I/O and connection handling code and it would be a waste to reinvent their wheel. In the end, putting the application in a reverse proxying setup makes the whole system more robust and and more secure.

A typical problem involves dealing with slow clients. These clients may send HTTP requests slowly and read HTTP responses slowly, perhaps taking many seconds to complete their work. A naive single-threaded HTTP server implementation that reads an HTTP requests, processes, and sends the HTTP response in a loop may end up spending so much time waiting for I/O that spends very little time doing actual work. Worse: suppose that the client is malicious, just leaves the socket open and never reads the HTTP response, then the server will spend forever waiting for the client, not being able to handle any more requests.

An example of a naive HTTP server implementation
while true
    client = accept_next_client()
    request = read_http_request(client)
    response = process_request(request)
    send_http_response(client, response)
end

There are many ways to solve this problem. One could use one thread per client, one could implement I/O timeouts, one could use an evented I/O architecture, one could have a dedicated I/O thread or process buffer requests and responses. The point is, implementing all this properly is non-trivial. Instead of reimplementing these over and over in each application server, it’s better to let a real web server deal with all the details and let the application server and the web application do what they’re best at: their own core business logic.

1.2. Ruby Rack and Ruby on Rails

The de-facto standard interface for Ruby web applications is Rack. Rack specifies an programming interface for web application developers to implement. This interface covers HTTP request and response handling, and is not dependent on any particular application server. The idea is that any Rack-compliant application server can implement the Rack specification and work with all Rack-compliant web applications.

images/rack.png

In the distant past, each Ruby web framework had its own interface, so application servers needed to explicitly add support for each web framework. Nowadays application servers just support Rack.

images/many_web_framework_protocols.png

Ruby on Rails has been fully Rack compliant since version 3.0. Rails 2.3 was partially Rack-compliant while earlier versions were not Rack-compliant at all. Phusion Passenger supports Rack as well as all Rails 1.x and 2.x versions.

A particularly interesting thing to note is that a lot of the memory occupied by Ruby on Rails applications is spent on storing the program code (i.e. the abstract syntax tree (AST)) in memory. This is observed through the use of the memory statistics function in Ruby Enterprise Edition. Also, a lot of the startup time of a Ruby on Rails application is spent on bootstrapping the Rails framework.

1.3. Apache

The Apache web server has a dynamic module system and a pluggable I/O multiprocessing (the ability to handle more than 1 concurrent HTTP client at the same time) architecture. An Apache module which implements a particular multiprocessing strategy, is called a Multi-Processing Module (MPM). The single-threaded multi-process prefork MPM had been the default and the most popular one for a long time, but in recent times the hybrid multi-threaded/multi-process worker MPM is becoming increasingly popular because of its better performance and scalability. Furthermore, Apache 2.4 introduced the event MPM which is a hybrid evented/multi-threaded/multi-process MPM and offers even more scalability benefits.

The prefork MPM remains in wide use today because it’s the only MPM that works well with mod_php.

The prefork MPM spawns multiple worker child processes. HTTP requests are first accepted by a so-called control process, and then forwarded to one of the worker processes. The next section contains a diagram which shows the prefork MPM’s architecture.

1.4. Nginx

Nginx is a lightweight web server that is becoming increasingly popular. It is known to be smaller, lighter weight and more scalable than Apache thanks to its evented I/O architecture. That said, Nginx is less flexible than Apache. For example it has no dynamic module system: all modules must be statically compiled into Nginx.

2. Phusion Passenger architecture

2.1. Overview

Phusion Passenger’s architecture is a lot like model #2 described in Web application models. In other words, Phusion Passenger extends Apache/Nginx and allows it to act like an application server. This is shown in the following diagram:

Passenger’s architecture

Phusion Passenger consists of:

  • an Apache module, mod_passenger. This is written in C++, and can be found in the directory ext/apache2.

  • an Nginx module ngx_http_passenger_module. This is written in C, and can be found in the directory ext/nginx.

  • Common code used by both the Apache and the Nginx module. For example the helper agent is among this code. This code is mostly C++ and can be found in the directory ext/common.

The module is active all Apache/Nginx processes. When an HTTP request comes in, the Phusion Passenger module checks whether the request should be handled by a Phusion Passenger-served application. If so, then the module spawns one or more processes for the corresponding application (if necessary), forwards the request to that application process and forwards its generated response back to the client. This is all done with the assistance of the Phusion Passenger helper agent, which stores state that must be shared among all web server worker processes and handles much of the internal I/O between the web server and the application processes.

It should be noted that applications do not run in the same address space as the web server. This differentiates Passenger from other application-server-inside-web-server software such as mod_php, mod_perl and mod_ruby. If the application crashes or leak memory, it will have no effect on the web server. In fact, stability is one of our highest goals. Phusion Passenger is carefully designed and implemented so that the web server shouldn’t crash because of Phusion Passenger.

2.2. Spawning and caching of code and applications

A very naive implementation of an application server would spawn an application process every time an HTTP request is received, just like CGI would. However, spawning Ruby applications is typically expensive. It can take a few seconds on a modern computer, and possibly much longer on a heavily loaded server. A less naive implementation would keep spawned application processes alive, similar to how Lighttpd’s FastCGI implementation works. However, this still has several problems:

  1. The first request to a Rails website will be slow, and subsequent requests will be fast. But the first request to a different Rails website - on the same web server - will still be slow.

  2. As we’ve explained earlier in this article, a lot of memory in a Rails application is spent on storing the AST of the Ruby on Rails framework and the application. Especially on shared hosts and on memory-constrained Virtual Private Servers (VPS), this can be a problem.

Both of these problems are very much solvable, and we’ve chosen to do just that.

The first problem can be solved by preloading Rails applications, i.e. by running the Rails application before a request is ever made to that website. This is the approach taken by most Rails hosts, for example in the form of a Mongrel cluster which is running all the time. However, this is unacceptable for a shared host: such an application would just sit there and waste memory even if it’s not doing anything. Instead, we’ve chosen to take a different approach, which solves both of the aforementioned problems.

We spawn Rails applications via a spawn server. The spawn server caches Ruby on Rails framework code and application code in memory. Spawning a Rails application for the first time will still be slow, but subsequent spawn attempts will be very fast. Furthermore, because the framework code is cached independently from the application code, spawning a different Rails application will also be very fast, as long as that application is using a Rails framework version that has already been cached.

Another implication of the spawn server is that different Ruby on Rails will share memory with each other, thus solving problem #2. This is described in detail in the next section.

But despite the caching of framework code and application code, spawning is still expensive compared to an HTTP request. We want to avoid spawning whenever possible. This is why we’ve introduced the application pool. Spawned application instances are kept alive, and their handles are stored into this pool, allowing each application instance to be reused later. Thus, Passenger has very good average case performance.

The application pool is shared between different worker processes. Because the worker processes cannot share memory with each other, either shared memory must be used to implement the application pool, or a client/server architecture must be implemented. We’ve chosen the latter because it is easier to implement. The Apache control process acts like a server for the application pool. However, this does not mean that all HTTP request/response data go through the control process. A worker process queries the pool for a connection session with a Rails application. Once this session has been obtained, the worker process will communicate directly with the Rails application.

The application pool is implemented inside mod_passenger. One can find detailed documentation about it in the C++ API documentation, in particular the documentation about the ApplicationPool, StandardApplicationPool and ApplicationPoolServer classes.

The application pool is responsible for spawning applications, caching spawned applications' handles, and cleaning up applications which have been idle for an extended period of time.

2.3. The spawn server

The spawn server is written in Ruby, and its code can be found in the directory lib/passenger. Its main executable is bin/passenger-spawn-server. The spawn server’s RDoc documentation documents the implementation in detail.

The spawn server consists of 3 logical layers:

  1. The spawn manager. This is the topmost layer, and acts like a fascade for all the underlying layers. Clients who use the spawn server only communicate with this layer.

  2. The framework spawner server. The spawn manager spawns a framework spawner server for each unique Ruby on Rails framework version. Each framework spawner server caches the code for exactly one Ruby on Rails framework version. A spawn request for an application is forwarded to the framework spawner server that contains the correct Ruby on Rails version for the application.

  3. The application spawner server. This is to the framework spawner server what the framework spawner server is to the spawn manager. The framework spawner server spawns an application spawner server for each unique Ruby on Rails application (here “application” does not mean a running process, but a set of (source code) files). An application spawner server caches the code for exactly one application.

The spawn server’s architecture

As you can see, we have two layers of code caching: when the spawn server receives a request to spawn a new application instance, it will forward the request to the correct framework spawner server (and will spawn that framework spawner server if it doesn’t already exist), which — in turn — will forward it to the correct application spawner server (which will, again, be created if it doesn’t already exist).

Each layer is only responsible for the layer directly below. The spawn manager only knows about framework spawner servers, and a framework spawner server only knows about its application spawner servers. The application spawner server is, however, not responsible for managing spawned application instances. If an application instance is spawned by mod_passenger, its information will be sent back to mod_passenger, which will be fully responsible for managing the application instance’s life time (through the application pool).

Also note that each layer is a seperate process. This is required because a single Ruby process can only load a single Ruby on Rails framework and a single application.

2.3.1. Memory sharing

On most modern Unix operating systems, when a child process is created, it will share most of its memory with the parent process. Processes are not supposed to be able to access each others' memory, so the operating system makes a copy of a piece of memory when it is written to by the parent process or the child process. This is called copy-on-write (COW). Detailed background information can be found on Ruby Enterprise Edition’s website.

The spawn server makes use of this useful fact. Each layer shares its Ruby AST memory with all of its lower layers, as long as the AST nodes in question haven’t been written to. This means that all spawned Rails applications will — if possible — share the Ruby on Rails framework’s code, as well as its own application code, with each other. This results in a dramatic reduction in memory usage.

Note

Sharing memory only works if Ruby Enterprise Edition is used. This is because the standard Ruby interpreter’s garbage collector isn’t copy-on-write friendly. Please visit the Ruby Enterprise Edition website for technical details.

Passenger works fine with standard Ruby. You still get to enjoy reduced Rails startup times. You just won’t be able to benefit from memory sharing.

Note that Rubinius's garbage collector is already copy-on-write friendly.

2.4. Handling of concurrent requests

As explained earlier, a single Rails application instance can only handle a single request at the same time. This is obviously undesirable. But before we dive into the solution, let us take a look how the “competition” solves this problem. PHP has similar problems: a single PHP script can also process only one HTTP request at a time.

  • mod_php “solves” this problem by using Apache’s MPM. In other words, mod_php doesn’t do anything by itself at all. A single Apache worker process/thread can only handle 1 PHP request at a time, but Apache spawns multiple worker processes/threads.

  • PHP-FastCGI solves the problem by spawning multiple persistent PHP servers. The number of PHP servers is independent from the number of Apache worker processes/threads. This approach is a lot like existing Rails setups, in which a frontend web server proxies requests to a persistent Mongrel cluster.

Passenger cannot use the mod_php way because it would force us to spawn a new Rails application for each request, which is — as explained earlier — unacceptably slow. Instead, Passenger uses the PHP-FastCGI approach. We maintain a pool of application instances, and whenever a request is received, we forward the request to one of the application instances in the pool. The size of the pool is configurable, which is useful for administrators of servers that are either heavily loaded or have little memory.

The reader might also be interested in studying the application pool’s algorithm, which is non-trivial. The algorithm is documented in detail in ApplicationPool algorithm.txt.

3. Appendix A: About this document

The text of this document is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License.


passenger-4.0.37/doc/Architectural overview.idmap.txt000644 000765 000024 00000002615 12233035540 023240 0ustar00honglistaff000000 000000 ###### Autogenerated by Mizuho, DO NOT EDIT ###### # This file maps section names to IDs so that the commenting system knows which # comments belong to which section. Section names may be changed at will but # IDs always stay the same, allowing one to retain old comments even if you # rename a section. # # This file is autogenerated but is not a cache; you MUST NOT DELETE this # file and you must check it into your version control system. If you lose # this file you may lose the ability to identity old comments. # # Entries marked with "fuzzy" indicate that the section title has changed # and that Mizuho has found an ID which appears to be associated with that # section. You should check whether it is correct, and if not, fix it. 1. About the involved technologies => about-the-involved-technologies-14ot82u 1.1. Typical web applications => typical-web-applications-1yd1iav 1.2. Ruby on Rails => ruby-on-rails-5v776m 1.3. Apache => apache-123bbrn 2. Passenger architecture => passenger-architecture-ehq6p7 2.1. Overview => overview-1ickxaj 2.2. Spawning and caching of code and applications => spawning-and-caching-of-code-and-applications-rtkxsp 2.3. The spawn server => the-spawn-server-ktu9q0 2.3.1. Memory sharing => memory-sharing-30wsnk 2.4. Handling of concurrent requests => handling-of-concurrent-requests-1ud4gns 3. Appendix A: About this document => appendix-a-about-this-document-fo5ufe passenger-4.0.37/doc/Architectural overview.txt000644 000765 000024 00000052706 12233035540 022155 0ustar00honglistaff000000 000000 Phusion Passenger design & architecture ======================================= image:images/phusion_banner.png[link="http://www.phusion.nl/"] Last updated: June 5, 2012. This document describes Phusion Passenger's design and architure in a global way. Its purpose is to lower the barrier to entry for new contributors, to explain some of the design choices we have made and to educate people about how Phusion Passenger works. Introduction to related technologies ------------------------------------ [[web_app_models]] === Web application models === Before we describe Phusion Passenger, it is important to understand how typical web applications work from the viewpoint of someone who wants to connect the application to a web server. A typical, isolated, web application accepts an HTTP request from some I/O channel, processes it internally, and outputs an HTTP response, which is sent back to the client. This is done in a loop, until the application is commanded to exit. This does not necessarily mean that the web application speaks HTTP directly: it just means that the web application accepts some kind of representation of an HTTP request. image:images/typical_isolated_web_application.png[Architecture of a typical web application in isolation] Few web applications are accessible directly by HTTP clients. Common models are: 1. The web application is contained in an application server. This application server may or may not be able to contain multiple web applications. The application server is then connected to the web server through some kind of protocol. This protocol may be HTTP, FastCGI, SCGI, AJP or whatever. The web server dispatches requests to the application server, which in turn dispatches requests to the correct web application, in a format that the web application understands. Conversely, HTTP responses outputted by the web application are sent to the application server, which in turn sends them to the web server, and eventually to the HTTP client. + Typical examples of such a model: + * A J2EE application, contained in the Tomcat application server, proxied behind the Apache web server. Tomcat can contain multiple web applications in a single Tomcat instance. * Most Ruby application servers besides Phusion Passenger (Thin, Unicorn, Goliath, etc). These application servers can only contain a single Ruby web application per instance. They load the web application into their own process and are put behind a web server (Apache, Nginx) in a reverse proxy setup. 2. The web application is contained in a web server. In this case, the web server acts like an application server. This is the case for PHP applications on Apache servers with 'mod_php'. Note that this does not necessarily mean that the web application is run inside the same process as the web server: it just means that the web server manages applications. In case of mod_php however PHP does run directly inside the Apache worker processes. + Phusion Passenger for Apache and Phusion Passenger for Nginx implement this model. 3. The web application *is* a web server, and can accept HTTP requests directly. This is the case for the Trac bug tracking system, running in its standalone server. In most setups they are reverse proxied behind a real web server such as Apache or Nginx, instead of accepting HTTP requests directly. + Phusion Passenger Standalone implements this model. You can expose Phusion Passenger Standalone directly to the Internet because it uses Nginx internally. 4. The web application does not speak HTTP directly, but is connected directly to the web server through some communication adapter. CGI, FastCGI and SCGI are good examples of this. These descriptions are true for virtually all web applications, whether they're based on PHP, Django, J2EE, ASP.NET, Ruby on Rails, or whatever. Note that all of these models provide the same functionality, i.e. no model can do something that a different model can't. The critical reader will notice that all of these models are identical to the one described in the first diagram, if the combination of web servers, application servers, web applications etc. are considered to be a single entity; a black box if you will. It should also be noted that these models do not enforce any particular I/O processing implementation. The web servers, application servers, web applications, etc. could process I/O serially (i.e. one request at a time), could multiplex I/O with a single thread (e.g. by using `select(2)` or `poll(2)`) or it could process I/O with multiple threads and/or multiple processes. Of course, there are many variations possible. For example, load balancers could be used. But that is outside the scope of this document. ==== Why reverse proxy? ==== As you've seen, it is often necessary to put the web application or its application server behind a real web server in a reverse proxy setup even when the web app/app server already speaks HTTP. This is because implementing HTTP in a proper, secure way involves more than just speaking the protocol. The public Internet is a hostile environment where clients can send any arbitrary data and can exhibit any arbitrary I/O patterns. Web servers like Apache and Nginx have already implemented world-class I/O and connection handling code and it would be a waste to reinvent their wheel. In the end, putting the application in a reverse proxying setup makes the whole system more robust and and more secure. A typical problem involves dealing with *slow clients*. These clients may send HTTP requests slowly and read HTTP responses slowly, perhaps taking many seconds to complete their work. A naive single-threaded HTTP server implementation that reads an HTTP requests, processes, and sends the HTTP response in a loop may end up spending so much time waiting for I/O that spends very little time doing actual work. Worse: suppose that the client is malicious, just leaves the socket open and never reads the HTTP response, then the server will spend forever waiting for the client, not being able to handle any more requests. .An example of a naive HTTP server implementation ------------------- while true client = accept_next_client() request = read_http_request(client) response = process_request(request) send_http_response(client, response) end ------------------- There are many ways to solve this problem. One could use one thread per client, one could implement I/O timeouts, one could use an evented I/O architecture, one could have a dedicated I/O thread or process buffer requests and responses. The point is, implementing all this properly is non-trivial. Instead of reimplementing these over and over in each application server, it's better to let a real web server deal with all the details and let the application server and the web application do what they're best at: their own core business logic. === Ruby Rack and Ruby on Rails === The de-facto standard interface for Ruby web applications is link:http://rack.rubyforge.org/[Rack]. Rack specifies an programming interface for web application developers to implement. This interface covers HTTP request and response handling, and is not dependent on any particular application server. The idea is that any Rack-compliant application server can implement the Rack specification and work with all Rack-compliant web applications. image:images/rack.png[] In the distant past, each Ruby web framework had its own interface, so application servers needed to explicitly add support for each web framework. Nowadays application servers just support Rack. image:images/many_web_framework_protocols.png[] Ruby on Rails has been fully Rack compliant since version 3.0. Rails 2.3 was partially Rack-compliant while earlier versions were not Rack-compliant at all. Phusion Passenger supports Rack as well as all Rails 1.x and 2.x versions. A particularly interesting thing to note is that a lot of the memory occupied by Ruby on Rails applications is spent on storing the program code (i.e. the link:http://en.wikipedia.org/wiki/Abstract_syntax_tree[abstract syntax tree (AST)]) in memory. This is observed through the use of the memory statistics function in link:http://www.rubyenterpriseedition.com/[Ruby Enterprise Edition]. Also, a lot of the startup time of a Ruby on Rails application is spent on bootstrapping the Rails framework. === Apache === The Apache web server has a dynamic module system and a pluggable I/O multiprocessing (the ability to handle more than 1 concurrent HTTP client at the same time) architecture. An Apache module which implements a particular multiprocessing strategy, is called a Multi-Processing Module (MPM). The single-threaded multi-process link:http://httpd.apache.org/docs/2.4/mod/prefork.html[prefork MPM] had been the default and the most popular one for a long time, but in recent times the hybrid multi-threaded/multi-process link:http://httpd.apache.org/docs/2.4/mod/worker.html[worker MPM] is becoming increasingly popular because of its better performance and scalability. Furthermore, Apache 2.4 introduced the link:http://httpd.apache.org/docs/2.4/mod/event.html[event MPM] which is a hybrid evented/multi-threaded/multi-process MPM and offers even more scalability benefits. The prefork MPM remains in wide use today because it's the only MPM that works well with mod_php. The prefork MPM spawns multiple worker child processes. HTTP requests are first accepted by a so-called control process, and then forwarded to one of the worker processes. The next section contains a diagram which shows the prefork MPM's architecture. === Nginx === Nginx is a lightweight web server that is becoming increasingly popular. It is known to be smaller, lighter weight and more scalable than Apache thanks to its evented I/O architecture. That said, Nginx is less flexible than Apache. For example it has no dynamic module system: all modules must be statically compiled into Nginx. Phusion Passenger architecture ------------------------------ === Overview === Phusion Passenger's architecture is a lot like model #2 described in <>. In other words, Phusion Passenger extends Apache/Nginx and allows it to act like an application server. This is shown in the following diagram: image:images/passenger_architecture.png[Passenger's architecture] Phusion Passenger consists of: * an Apache module, 'mod_passenger'. This is written in C++, and can be found in the directory 'ext/apache2'. * an Nginx module 'ngx_http_passenger_module'. This is written in C, and can be found in the directory 'ext/nginx'. * Common code used by both the Apache and the Nginx module. For example the helper agent is among this code. This code is mostly C++ and can be found in the directory 'ext/common'. The module is active all Apache/Nginx processes. When an HTTP request comes in, the Phusion Passenger module checks whether the request should be handled by a Phusion Passenger-served application. If so, then the module spawns one or more processes for the corresponding application (if necessary), forwards the request to that application process and forwards its generated response back to the client. This is all done with the assistance of the Phusion Passenger helper agent, which stores state that must be shared among all web server worker processes and handles much of the internal I/O between the web server and the application processes. It should be noted that applications do *not* run in the same address space as the web server. This differentiates Passenger from other application-server-inside-web-server software such as mod_php, mod_perl and mod_ruby. If the application crashes or leak memory, it will have no effect on the web server. In fact, stability is one of our highest goals. Phusion Passenger is carefully designed and implemented so that the web server shouldn't crash because of Phusion Passenger. === Spawning and caching of code and applications === A very naive implementation of an application server would spawn an application process every time an HTTP request is received, just like CGI would. However, spawning Ruby applications is typically expensive. It can take a few seconds on a modern computer, and possibly much longer on a heavily loaded server. A less naive implementation would keep spawned application processes alive, similar to how Lighttpd's FastCGI implementation works. However, this still has several problems: 1. The first request to a Rails website will be slow, and subsequent requests will be fast. But the first request to a different Rails website - on the same web server - will still be slow. 2. As we've explained earlier in this article, a lot of memory in a Rails application is spent on storing the AST of the Ruby on Rails framework and the application. Especially on shared hosts and on memory-constrained Virtual Private Servers (VPS), this can be a problem. Both of these problems are very much solvable, and we've chosen to do just that. The first problem can be solved by preloading Rails applications, i.e. by running the Rails application before a request is ever made to that website. This is the approach taken by most Rails hosts, for example in the form of a Mongrel cluster which is running all the time. However, this is unacceptable for a shared host: such an application would just sit there and waste memory even if it's not doing anything. Instead, we've chosen to take a different approach, which solves both of the aforementioned problems. We spawn Rails applications via a 'spawn server'. The spawn server caches Ruby on Rails framework code and application code in memory. Spawning a Rails application for the first time will still be slow, but subsequent spawn attempts will be very fast. Furthermore, because the framework code is cached independently from the application code, spawning a different Rails application will also be very fast, as long as that application is using a Rails framework version that has already been cached. Another implication of the spawn server is that different Ruby on Rails will share memory with each other, thus solving problem #2. This is described in detail in <>. But despite the caching of framework code and application code, spawning is still expensive compared to an HTTP request. We want to avoid spawning whenever possible. This is why we've introduced the *application pool*. Spawned application instances are kept alive, and their handles are stored into this pool, allowing each application instance to be reused later. Thus, Passenger has very good average case performance. The application pool is shared between different worker processes. Because the worker processes cannot share memory with each other, either shared memory must be used to implement the application pool, or a client/server architecture must be implemented. We've chosen the latter because it is easier to implement. The Apache control process acts like a server for the application pool. However, this does not mean that all HTTP request/response data go through the control process. A worker process queries the pool for a connection session with a Rails application. Once this session has been obtained, the worker process will communicate directly with the Rails application. The application pool is implemented inside 'mod_passenger'. One can find detailed documentation about it in link:cxxapi/index.html[+++the C++ API documentation+++], in particular the documentation about the `ApplicationPool`, `StandardApplicationPool` and `ApplicationPoolServer` classes. The application pool is responsible for spawning applications, caching spawned applications' handles, and cleaning up applications which have been idle for an extended period of time. [[spawn_server]] === The spawn server === The spawn server is written in Ruby, and its code can be found in the directory 'lib/passenger'. Its main executable is 'bin/passenger-spawn-server'. link:rdoc/index.html[The spawn server's RDoc documentation] documents the implementation in detail. The spawn server consists of 3 logical layers: 1. *The spawn manager.* This is the topmost layer, and acts like a fascade for all the underlying layers. Clients who use the spawn server only communicate with this layer. 2. *The framework spawner server.* The spawn manager spawns a framework spawner server for each unique Ruby on Rails framework version. Each framework spawner server caches the code for exactly one Ruby on Rails framework version. A spawn request for an application is forwarded to the framework spawner server that contains the correct Ruby on Rails version for the application. 3. *The application spawner server.* This is to the framework spawner server what the framework spawner server is to the spawn manager. The framework spawner server spawns an application spawner server for each unique Ruby on Rails application (here ``application'' does not mean a running process, but a set of (source code) files). An application spawner server caches the code for exactly one application. image:images/spawn_server_architecture.png[The spawn server's architecture] As you can see, we have two layers of code caching: when the spawn server receives a request to spawn a new application instance, it will forward the request to the correct framework spawner server (and will spawn that framework spawner server if it doesn't already exist), which -- in turn -- will forward it to the correct application spawner server (which will, again, be created if it doesn't already exist). Each layer is only responsible for the layer directly below. The spawn manager only knows about framework spawner servers, and a framework spawner server only knows about its application spawner servers. The application spawner server is, however, not responsible for managing spawned application instances. If an application instance is spawned by mod_passenger, its information will be sent back to mod_passenger, which will be fully responsible for managing the application instance's life time (through the application pool). Also note that each layer is a seperate process. This is required because a single Ruby process can only load a single Ruby on Rails framework and a single application. ==== Memory sharing ==== On most modern Unix operating systems, when a child process is created, it will share most of its memory with the parent process. Processes are not supposed to be able to access each others' memory, so the operating system makes a copy of a piece of memory when it is written to by the parent process or the child process. This is called copy-on-write (COW). Detailed background information can be found on link:http://www.rubyenterpriseedition.com/[Ruby Enterprise Edition's website]. The spawn server makes use of this useful fact. Each layer shares its Ruby AST memory with all of its lower layers, as long as the AST nodes in question haven't been written to. This means that all spawned Rails applications will -- if possible -- share the Ruby on Rails framework's code, as well as its own application code, with each other. This results in a dramatic reduction in memory usage. [NOTE] ================================================================== Sharing memory only works if link:http://www.rubyenterpriseedition.com/[Ruby Enterprise Edition] is used. This is because the standard Ruby interpreter's garbage collector isn't copy-on-write friendly. Please visit the Ruby Enterprise Edition website for technical details. Passenger works fine with standard Ruby. You still get to enjoy reduced Rails startup times. You just won't be able to benefit from memory sharing. ================================================================== Note that link:http://rubini.us/[Rubinius]'s garbage collector is already copy-on-write friendly. [[concurrent_requests]] === Handling of concurrent requests === As explained earlier, a single Rails application instance can only handle a single request at the same time. This is obviously undesirable. But before we dive into the solution, let us take a look how the ``competition'' solves this problem. PHP has similar problems: a single PHP script can also process only one HTTP request at a time. - mod_php ``solves'' this problem by using Apache's MPM. In other words, mod_php doesn't do anything by itself at all. A single Apache worker process/thread can only handle 1 PHP request at a time, but Apache spawns multiple worker processes/threads. - PHP-FastCGI solves the problem by spawning multiple persistent PHP servers. The number of PHP servers is independent from the number of Apache worker processes/threads. This approach is a lot like existing Rails setups, in which a frontend web server proxies requests to a persistent Mongrel cluster. Passenger cannot use the mod_php way because it would force us to spawn a new Rails application for each request, which is -- as explained earlier -- unacceptably slow. Instead, Passenger uses the PHP-FastCGI approach. We maintain a pool of application instances, and whenever a request is received, we forward the request to one of the application instances in the pool. The size of the pool is configurable, which is useful for administrators of servers that are either heavily loaded or have little memory. The reader might also be interested in studying the application pool's algorithm, which is non-trivial. The algorithm is documented in detail in link:ApplicationPool%20algorithm.txt[ApplicationPool algorithm.txt]. == Appendix A: About this document == The text of this document is licensed under the link:http://creativecommons.org/licenses/by-sa/3.0/[Creative Commons Attribution-Share Alike 3.0 Unported License]. image:images/by_sa.png[link="link:http://creativecommons.org/licenses/by-sa/3.0/"] passenger-4.0.37/doc/DebuggingAndStressTesting.md000644 000765 000024 00000012066 12233035540 022370 0ustar00honglistaff000000 000000 # Debugging and Stress Testing Phusion Passenger This guide tells you: * How to debug Phusion Passenger in case of any serious problems, e.g. crashes and mysterious connection problems. * How to stress test Phusion Passenger. ## Process output All Phusion Passenger agent processes (PassengerWatchdog, PassengerHelperAgent, PassengerLoggingAgent) as well as all spawned application processes have their stdout and stderr redirected to the _global web server error log_ (that is, _not_ the per-virtual host error log). This is usually '/var/log/apache2/error.log' or '/var/log/nginx/error.log'. Note that in case of Nginx, Phusion Passenger prints to the error log specified in the server context, not the "http" context. If the server context does not contain an `error_log` directive then the default error log location will be used. The default location depends on how Nginx is configured during compilation, but it is usually either '$PREFIX/logs/error.log' or '/var/log/nginx/error.log'. For example, if your Nginx configuration looks like this: worker_processes 2; http { error_log /home/nginx/error.log; ... } then Phusion Passenger will print to the default error log location, *not* '/home/nginx/error.log'! ## Crash behavior Whenever a Phusion Passenger agent process crashes because of a signal (SIGABRT, SIGBUS, SIGSEGV and similar signals), its default behavior is to attempt to write a crash report to its stderr. This crash report contains: * A simple libc-level backtrace of the current thread. This backtrace may or may not correspond to the thread that caused the crash. * A detailed backtrace report, covering all threads. This report even contains the values of variables on the stack. The report is obtained through the [crash-watch](https://github.com/FooBarWidget/crash-watch) tool so you must have it installed. Crash-watch in turn requires gdb, which must also be installed. * Agent-specific diagnostics information. For example the HelperAgent will report the status of its process pool and its connected clients. You can change the crash behavior with the following environment variables: * `PASSENGER_ABORT_HANDLER` (default: true) - Whether agent processes should install their crash handlers. When disabled, crashes will be handled by the default signal handler, meaning that they will likely just crash without dumping any crash report. * `PASSENGER_DUMP_WITH_CRASH_WATCH` (default: true) - Whether [crash-watch](https://github.com/FooBarWidget/crash-watch) should be used to obtain detailed backtraces. * `PASSENGER_BEEP_ON_ABORT` (default: false) - Whether agent processes should beep when they crash. This is useful during development, e.g. when you're stress testing the system and want to be notified when a crash occurs. On OS X, it will execute `osascript -e "beep 2"` to trigger the beep. On Linux it will execute the `beep` command. * `PASSENGER_STOP_ON_ABORT` (default: false) - When enabled, causes agent processes to stop themselves on crash, by raising SIGSTOP. This gives you the opportunity to attach gdb on them. ## Behavior logging Increase PassengerLogLevel to print more debugging messages. ## Debugging with AddressSanitizer [AddressSanitizer](http://code.google.com/p/address-sanitizer/) is an excellent tool created by Google to detect memory problems in C and C++ programs. It is for example used for detecting memory errors in Google Chrome. Unlike [Valgrind](http://www.valgrind.org/), which is an x86 emulator and makes everything 100 times slower, AddressSanitizer's performance penalty is only about 10%. Recompile Phusion Passenger with the environment variable `USE_ASAN=1` to enable support for AddressSanitizer. ## Simulating system call failures Error conditions are sometimes hard to test. Things like network errors are usually hard to simulate using real equipment. In order to facilitate with error testing, we've developed a system call failure simulation framework, inspired by sqlite's failure test suite. You specify which system call errors should be simulated, and with what probability they should occur. By running normal tests multiple times you can see how Phusion Passenger behaves under these simulated error conditions. To enable, set the environment variable `PASSENGER_SIMULATE_SYSCALL_FAILURES`. The format is: program_name1=error1:probability1,error2:probability2,...;program_name2=... `program_nameN` specifies the name of the Phusion Passenger process for which system call failure simulation should be enabled. This is followed by a list of system call `errno` names and the respective probabilities (between 0 and 1). For example: export PASSENGER_SIMULATE_SYSCALL_FAILURES='PassengerWatchdog=ENOSPC:0.01;PassengerHelperAgent=EMFILE:0.001,ECONNREFUSED:0.02' This will enable system call failure simulation only for PassengerWatchdog and PassengerHelperAgent, but not for PassengerLoggingAgent. All system calls in PassengerWatchdog will have a 1% probability of throwing ENOSPC. All system calls in PassengerHelperAgent will have a 0.1% probability of throwing EMFILE, and a 2% probability of throwing ECONNREFUSED. passenger-4.0.37/doc/definitions.h000644 000765 000024 00000000243 12233035540 017444 0ustar00honglistaff000000 000000 // Some definitions for Doxygen. /** @defgroup Core Core Apache-related classes and functions @defgroup Support Apache-independent support classes and function */ passenger-4.0.37/doc/images/000755 000765 000024 00000000000 12233035540 016226 5ustar00honglistaff000000 000000 passenger-4.0.37/doc/Packaging.html000644 000765 000024 00000153362 12233035540 017545 0ustar00honglistaff000000 000000 Packaging
Packaging

Introduction

This document describes how packagers can package Phusion Passenger binaries for their operating system.

Phusion Passenger can be configured in 2 ways, the "originally packaged" configuration where everything is in the same directory, and the "natively packaged" configuration where files are scattered across the filesystem, e.g. in a FHS-compliant configuration. This document describes how you can configure Phusion Passenger to locate its own files when they're scattered across the filesystem.

Phusion Passenger files are also called assets in this document.

Originally packaged

This is the configuration you get when you checkout Phusion Passenger from git, when you install Phusion Passenger from a gem or when you extract it from a tarball. All the original files are stored in a single directory tree, which we call the source root.

The git repository, gems and tarballs do not come with any binaries; they have to be compiled by the user. Phusion Passenger looks for binaries in, and (if the user initiates the compilation process) stores binaries in, the following directories:

  • Normally, binaries are to be located in the agents and libout subdirectories under the source root.
  • Phusion Passenger Standalone does things a little differently. Binaries are to be located in one of the following directories, whichever it finds first:

    • ~/.passenger/standalone/<VERSION>/<TYPE-AND-ARCH> (a)
    • /var/lib/passenger-standalone/<VERSION-AND-ARCH> (b)

    If neither directories exist, then Passenger Standalone compiles the binaries and stores them in (b) (when running as root) or in (a). It still looks for everything else (like the .rb files) in the source root.

Natively packaged

Phusion Passenger is packaged, usually (but not necessarily) through a DEB or RPM package. This configuration comes not only with all necessary binaries, but also with some (but not all) source files. This is because when you run Phusion Passenger with a different Ruby interpreter than the packager intended, Phusion Passenger must be able to compile a new Ruby extension for that Ruby interpreter. This configuration does not however allow compiling against a different Apache version than the packager intended (but does allow compiling against a different Nginx version).

In this configuration, files can be scattered anywhere throughout the filesystem. This way Phusion Passenger can be packaged in an FHS-compliant way. The exact locations of the different types of files can be specified through a location configuration file. The existance and usage of a location configuration file does not automatically imply that Phusion Passenger is natively packaged.

If Phusion Passenger needs to have a new Ruby extension compiled, then it will store that in ~/.passenger/native_support/<VERSION>/<ARCH>.

The location configuration file

The Phusion Passenger administration tools, such as passenger-status, look for a location configuration file in the following places, in the given order:

  • The environment variable $PASSENGER_LOCATION_CONFIGURATION_FILE.
  • <RUBYLIBDIR>/phusion_passenger/locations.ini, where is the Ruby library directory that contains phusion_passenger.rb. For example, /usr/lib/ruby/1.9.0/phusion_passenger/locations.ini.
  • ~/.passenger/locations.ini
  • /etc/phusion-passenger/locations.ini

If it cannot find a location configuration file, then it assumes that Phusion Passenger is originally packaged. If a location configuration file is found then the configuration is determined by the natively_packaged option in the location configuration file, which can be either "true" or "false".

The Apache module and the Nginx module expect PassengerRoot/passenger_root to refer to either a directory or a file. If the value refers to a directory, then it assumes that Phusion Passenger is originally packaged, where the source root is the specified directory. If the value refers to a file, then it will use it as the location configuration file, and the configuration depends on the natively_packaged setting.

The location configuration file is an ini file that looks as follows:

[locations]
natively_packaged=true
bin_dir=/usr/bin
agents_dir=/usr/lib/phusion-passenger/agents
lib_dir=/usr/lib/phusion-passenger
helper_scripts_dir=/usr/share/phusion-passenger/helper-scripts
resources_dir=/usr/share/phusion-passenger
include_dir=/usr/share/phusion-passenger/include
doc_dir=/usr/share/doc/phusion-passenger
ruby_libdir=/usr/lib/ruby/vendor_ruby
apache2_module_path=/usr/lib/apache2/modules/mod_passenger.so
ruby_extension_source_dir=/usr/share/phusion-passenger/ruby_extension_source
nginx_module_source_dir=/usr/share/phusion-passenger/ngx_http_passenger_module

All keys except fo natively_packaged specify the locations of assets and asset directories. The "Asset types" section provides a description of all asset types.

Thus, if you're packaging Phusion Passenger, then we recommend the following:

  • Put a locations.ini file in <RUBYLIBDIR>/phusion_passenger/locations.ini and set PassengerRoot/passenger_root to that filename. We don't recommend using ~/.passenger or /etc/phusion-passenger because if the user wants to install a different Phusion Passenger version alongside the one that you've packaged, then that other version will incorrectly locate your packaged files instead of its own files.
  • Always set natively_packaged to "true". The "false" value is used internally for implementing Phusion Passenger Standalone and should never be used by packagers.

The Phusion Passenger Ruby libraries

phusion_passenger.rb

The Phusion Passenger administration tools are written in Ruby. So the first thing they do is trying to load phusion_passenger.rb, which is the source file responsible for figuring out where all the other Phusion Passenger files are. It tries to look for phusionpassenger.rb in <OWN_DIRECTORY>/../lib where <OWN_DIRECTORY> is the directory that the tool is located in. If phusionpassenger.rb is not there, then it tries to load it from the normal Ruby load path.

Ruby extension

The Phusion Passenger loader scripts try to load the Phusion Passenger Ruby extension (passenger_native_support.so) from the following places, in the given order:

  • If Phusion Passenger is originally packaged, it will look for the Ruby extension in <SOURCE_ROOT>/libout/ruby/<ARCH>. Otherwise, this step is skipped.
  • The Ruby library load path.
  • ~/.passenger/native_support/<VERSION>/<ARCH>

If it cannot find the Ruby extension in any of the above places, then it will attempt to compile the Ruby extension and store it in ~/.passenger/native_support/<VERSION>/<ARCH>.

Conclusion for packagers

If you're packaging Phusion Passenger then you should put both phusion_passenger.rb and passenger_native_support.so somewhere in the Ruby load path, or make sure that that directory is included in the $RUBYLIB environment variable. You cannot specify a custom directory though the location configuration file.

Asset types

Throughout the Phusion Passenger codebase, we refer to all kinds of assets. Here's a list of all possible assets and asset directories.

  • source_root

    When Phusion Passenger is originally packaged, this refers to the directory that contains the entire Phusion passenger source tree. Not available when natively packaged.

  • bin_dir

    A directory containing administration binaries and scripts and like passenger-status; tools that the user may directly invoke on the command line.

    Value when originally packaged: <SOURCE_ROOT>/bin

  • agents_dir

    A directory that contains (platform-dependent) binaries that Phusion Passenger uses, but that should not be directly invoked from the command line. Things like PassengerHelperAgent are located here.

    Value when originally packaged:

    • Normally: <SOURCE_ROOT>/buildout/agents
    • Passenger Standalone: ~/.passenger/standalone/<VERSION>/support-<ARCH>
  • helper_scripts_dir

    A directory that contains non-binary scripts that Phusion Passenger uses, but that should not be directly invoked from the command line. Things like rack-loader.rb are located here.

    Value when originally packaged: <SOURCE_ROOT>/helper-scripts

  • resources_dir

    A directory that contains non-executable, platform-independent resource files that the user should not directly access, like error page templates and configuration file templates.

    Value when originally packaged: <SOURCE_ROOT>/resources.

  • doc_dir

    A directory that contains documentation.

    Value when originally packaged: <SOURCE_ROOT>/doc.

  • include_dir

    A directory that contains the Phusion Passenger header files that are necessary for compiling Nginx.

    Value when originally packaged: <SOURCE_ROOT>/ext

  • lib_dir

    A directory that contains the Phusion Passenger library files, e.g. libboost_oxt.a and various .o files.

    Value when originally packaged: <SOURCE_ROOT>/buildout

  • ruby_libdir

    A directory that contains the Phusion Passenger Ruby library files. Note that the Phusion Passenger administration tools still locate phusion_passenger.rb as described in the section "The Phusion Passenger Ruby libraries", irregardless of the value of this key in the location configuration file. The value is only useful to non-Ruby Phusion Passenger code.

    Value when originally packaged: <SOURCE_ROOT>/lib.

  • apache2_module_path

    The filename of the Apache 2 module, or the filename that the Apache 2 module will be stored after it's compiled. Used by passenger-install-module to print an example configuration snippet.

    Value when originally packaged: <SOURCE_ROOT>/buildout/apache2/mod_passenger.so.

  • ruby_extension_source_dir

    The directory that contains the source code for the Phusion Passenger Ruby extension. Phusion Passenger uses these sources to build a Ruby extension, when it detects that the user is using a new Ruby interpeter for which no Ruby extension has been compiled.

    Value when originally packaged: <SOURCE_ROOT>/ext/ruby.

  • nginx_module_source_dir

    The directory that contains the source code for the Phusion Passenger Nginx module. passenger-install-nginx-module uses these sources to build Nginx with Phusion Passenger support.

    Value when originally packaged: <SOURCE_ROOT>/ext/nginx.

Vendoring of libraries

Phusion Passenger vendors libev and libeio in order to make installation easier for users on operating systems without proper package management, like OS X. If you want Phusion Passenger to compile against the system-provided libev and/or libeio instead, then set the following environment variables before compiling:

  • export USE_VENDORED_LIBEV=no
  • export USE_VENDORED_LIBEIO=no

Note that we require at least libev 4.11 and libeio 1.0.

Generating gem and tarball

Use the following commands to generate a gem and tarball, in which Phusion Passenger is originally packaged and without any binaries:

rake package:gem
rake package:tarball

The files will be stored in pkg/.

Fakeroot

You can generate a fakeroot with the command rake fakeroot. This will generate an FHS-compliant directory tree in pkg/fakeroot, which you can directly package or with minor modifications. The fakeroot even contains a location configuration file.

© Phusion

passenger-4.0.37/doc/Packaging.txt.md000644 000765 000024 00000026500 12233035540 020010 0ustar00honglistaff000000 000000 # Introduction This document describes how packagers can package Phusion Passenger binaries for their operating system. Phusion Passenger can be configured in 2 ways, the "originally packaged" configuration where everything is in the same directory, and the "natively packaged" configuration where files are scattered across the filesystem, e.g. in a FHS-compliant configuration. This document describes how you can configure Phusion Passenger to locate its own files when they're scattered across the filesystem. Phusion Passenger files are also called _assets_ in this document. ## Originally packaged This is the configuration you get when you checkout Phusion Passenger from git, when you install Phusion Passenger from a gem or when you extract it from a tarball. All the original files are stored in a single directory tree, which we call the _source root_. The git repository, gems and tarballs do not come with any binaries; they have to be compiled by the user. Phusion Passenger looks for binaries in, and (if the user initiates the compilation process) stores binaries in, the following directories: * Normally, binaries are to be located in the `agents` and `libout` subdirectories under the source root. * Phusion Passenger Standalone does things a little differently. Binaries are to be located in one of the following directories, whichever it finds first: - `~/.passenger/standalone//` (a) - `/var/lib/passenger-standalone/` (b) If neither directories exist, then Passenger Standalone compiles the binaries and stores them in (b) (when running as root) or in (a). It still looks for everything else (like the .rb files) in the source root. ## Natively packaged Phusion Passenger is packaged, usually (but not necessarily) through a DEB or RPM package. This configuration comes not only with all necessary binaries, but also with some (but not all) source files. This is because when you run Phusion Passenger with a different Ruby interpreter than the packager intended, Phusion Passenger must be able to compile a new Ruby extension for that Ruby interpreter. This configuration does not however allow compiling against a different Apache version than the packager intended (but does allow compiling against a different Nginx version). In this configuration, files can be scattered anywhere throughout the filesystem. This way Phusion Passenger can be packaged in an FHS-compliant way. The exact locations of the different types of files can be specified through a _location configuration file_. The existance and usage of a location configuration file does not automatically imply that Phusion Passenger is natively packaged. If Phusion Passenger needs to have a new Ruby extension compiled, then it will store that in `~/.passenger/native_support//`. # The location configuration file The Phusion Passenger administration tools, such as `passenger-status`, look for a location configuration file in the following places, in the given order: * The environment variable `$PASSENGER_LOCATION_CONFIGURATION_FILE`. * `/phusion_passenger/locations.ini`, where is the Ruby library directory that contains phusion_passenger.rb. For example, `/usr/lib/ruby/1.9.0/phusion_passenger/locations.ini`. * `~/.passenger/locations.ini` * `/etc/phusion-passenger/locations.ini` If it cannot find a location configuration file, then it assumes that Phusion Passenger is originally packaged. If a location configuration file is found then the configuration is determined by the `natively_packaged` option in the location configuration file, which can be either "true" or "false". The Apache module and the Nginx module expect `PassengerRoot`/`passenger_root` to refer to either a directory or a file. If the value refers to a directory, then it assumes that Phusion Passenger is originally packaged, where the source root is the specified directory. If the value refers to a file, then it will use it as the location configuration file, and the configuration depends on the `natively_packaged` setting. The location configuration file is an ini file that looks as follows: [locations] natively_packaged=true bin_dir=/usr/bin agents_dir=/usr/lib/phusion-passenger/agents lib_dir=/usr/lib/phusion-passenger helper_scripts_dir=/usr/share/phusion-passenger/helper-scripts resources_dir=/usr/share/phusion-passenger include_dir=/usr/share/phusion-passenger/include doc_dir=/usr/share/doc/phusion-passenger ruby_libdir=/usr/lib/ruby/vendor_ruby apache2_module_path=/usr/lib/apache2/modules/mod_passenger.so ruby_extension_source_dir=/usr/share/phusion-passenger/ruby_extension_source nginx_module_source_dir=/usr/share/phusion-passenger/ngx_http_passenger_module All keys except fo `natively_packaged` specify the locations of assets and asset directories. The "Asset types" section provides a description of all asset types. Thus, if you're packaging Phusion Passenger, then we recommend the following: * Put a locations.ini file in `/phusion_passenger/locations.ini` and set `PassengerRoot`/`passenger_root` to that filename. We don't recommend using `~/.passenger` or `/etc/phusion-passenger` because if the user wants to install a different Phusion Passenger version alongside the one that you've packaged, then that other version will incorrectly locate your packaged files instead of its own files. * Always set `natively_packaged` to "true". The "false" value is used internally for implementing Phusion Passenger Standalone and should never be used by packagers. # The Phusion Passenger Ruby libraries ## phusion_passenger.rb The Phusion Passenger administration tools are written in Ruby. So the first thing they do is trying to load `phusion_passenger.rb`, which is the source file responsible for figuring out where all the other Phusion Passenger files are. It tries to look for phusion_passenger.rb in `/../lib` where `` is the directory that the tool is located in. If phusion_passenger.rb is not there, then it tries to load it from the normal Ruby load path. ## Ruby extension The Phusion Passenger loader scripts try to load the Phusion Passenger Ruby extension (`passenger_native_support.so`) from the following places, in the given order: * If Phusion Passenger is originally packaged, it will look for the Ruby extension in `/libout/ruby/`. Otherwise, this step is skipped. * The Ruby library load path. * `~/.passenger/native_support//` If it cannot find the Ruby extension in any of the above places, then it will attempt to compile the Ruby extension and store it in `~/.passenger/native_support//`. ## Conclusion for packagers If you're packaging Phusion Passenger then you should put both phusion_passenger.rb and `passenger_native_support.so` somewhere in the Ruby load path, or make sure that that directory is included in the `$RUBYLIB` environment variable. You cannot specify a custom directory though the location configuration file. # Asset types Throughout the Phusion Passenger codebase, we refer to all kinds of assets. Here's a list of all possible assets and asset directories. * `source_root` When Phusion Passenger is originally packaged, this refers to the directory that contains the entire Phusion passenger source tree. Not available when natively packaged. * `bin_dir` A directory containing administration binaries and scripts and like `passenger-status`; tools that the user may directly invoke on the command line. Value when originally packaged: `/bin` * `agents_dir` A directory that contains (platform-dependent) binaries that Phusion Passenger uses, but that should not be directly invoked from the command line. Things like PassengerHelperAgent are located here. Value when originally packaged: - Normally: `/buildout/agents` - Passenger Standalone: `~/.passenger/standalone//support-` * `helper_scripts_dir` A directory that contains non-binary scripts that Phusion Passenger uses, but that should not be directly invoked from the command line. Things like rack-loader.rb are located here. Value when originally packaged: `/helper-scripts` * `resources_dir` A directory that contains non-executable, platform-independent resource files that the user should not directly access, like error page templates and configuration file templates. Value when originally packaged: `/resources`. * `doc_dir` A directory that contains documentation. Value when originally packaged: `/doc`. * `include_dir` A directory that contains the Phusion Passenger header files that are necessary for compiling Nginx. Value when originally packaged: `/ext` * `lib_dir` A directory that contains the Phusion Passenger library files, e.g. libboost_oxt.a and various .o files. Value when originally packaged: `/buildout` * `ruby_libdir` A directory that contains the Phusion Passenger Ruby library files. Note that the Phusion Passenger administration tools still locate phusion_passenger.rb as described in the section "The Phusion Passenger Ruby libraries", irregardless of the value of this key in the location configuration file. The value is only useful to non-Ruby Phusion Passenger code. Value when originally packaged: `/lib`. * `apache2_module_path` The filename of the Apache 2 module, or the filename that the Apache 2 module will be stored after it's compiled. Used by `passenger-install-module` to print an example configuration snippet. Value when originally packaged: `/buildout/apache2/mod_passenger.so`. * `ruby_extension_source_dir` The directory that contains the source code for the Phusion Passenger Ruby extension. Phusion Passenger uses these sources to build a Ruby extension, when it detects that the user is using a new Ruby interpeter for which no Ruby extension has been compiled. Value when originally packaged: `/ext/ruby`. * `nginx_module_source_dir` The directory that contains the source code for the Phusion Passenger Nginx module. passenger-install-nginx-module uses these sources to build Nginx with Phusion Passenger support. Value when originally packaged: `/ext/nginx`. # Vendoring of libraries Phusion Passenger vendors libev and libeio in order to make installation easier for users on operating systems without proper package management, like OS X. If you want Phusion Passenger to compile against the system-provided libev and/or libeio instead, then set the following environment variables before compiling: * `export USE_VENDORED_LIBEV=no` * `export USE_VENDORED_LIBEIO=no` Note that we require at least libev 4.11 and libeio 1.0. # Generating gem and tarball Use the following commands to generate a gem and tarball, in which Phusion Passenger is originally packaged and without any binaries: rake package:gem rake package:tarball The files will be stored in `pkg/`. # Fakeroot You can generate a fakeroot with the command `rake fakeroot`. This will generate an FHS-compliant directory tree in `pkg/fakeroot`, which you can directly package or with minor modifications. The fakeroot even contains a location configuration file. passenger-4.0.37/doc/Security of user switching support.html000644 000765 000024 00000434163 12233035540 024472 0ustar00honglistaff000000 000000 Security of user switching support in Passenger

1. Problem description

Tip It is strongly recommended that you first read our Architectural Overview.

A straightforward implementation of Passenger will spawn Rails applications in the same user context as Apache itself. On server machines which host multiple websites for multiple users, this may not be desired. All Rails applications spawned by Passenger will be able to read and write to all directories that the web server can. So for example, Joe’s Rails applications could read Jane’s Rails application’s database.yml or delete her application files. This is also a problem that typically plagues PHP web hosts.

There are multiple ways to solve this problem. The goal of this document is to inform the reader about the solutions have we have analyzed, so that Passenger’s security may be peer reviewed.

2. Analysis of possible solutions

It seems that the only way to solve this problem on Unix, is to run each Rails application server as its owner’s user and group. Passenger can make use of one of the following methods to implement this:

  1. Apache (and thus Passenger) must already be running as root.

  2. Using Apache’s suEXEC.

  3. A setuid root wrapper application must exist, to allow non-root processes to obtain root privileges (or at least, the privilege to switch user).

  4. For each user $X that Passenger will need to switch to, there must exist a setuid $X wrapper application.

  5. Using su.

  6. Using sudo.

Let us take a look at each method in detail.

2.1. Apache must already be running as root

First, let us take a look at the typical Apache setup, in which Apache is bound to port 80, and uses the prefork MPM. Binding to any port lower than 1024 requires root privileges, so Apache is typically run as root. This poses an unacceptable security risk, so Apache’s prefork MPM will, upon receiving an HTTP request, spawn a child process with the privileges of a normal user, typically www-data or nobody. See the documentation for the prefork MPM - in particular the “User” and “Group” directives - for details. The process which is responsible for spawning child processes (also called the control process) is run as root. This is also true for the worker MPM.

Since Passenger has access to the control process, in the typical Apache setup, Passenger can already launch Rails applications as a different user. But now we have to ask this question:

If Apache is not running as root, are there still any Passenger users who want to run Rails applications as different users?

If the answer is yes, then we cannot use this method.

The advantage of this method is that setting up Apache to run as root is incredibly easy, and requires no new framework to be written. However, testing this method in automated unit tests will require running the unit test suit as root.

2.2. Using Apache’s suEXEC

Apache’s suEXEC allows one to run CGI processes as different users. But it seems that suEXEC can only be used for CGI, and is not a general-purpose mechanism. The PHP-suEXEC software allows one to run PHP applications via suEXEC, but it requires patching suEXEC. If Passenger is to use suEXEC, then it is likely that we’ll have to patch suEXEC. The suEXEC website strongly discourages patching.

2.3. Using a setuid root wrapper application

If we use this method, we must be extremely careful. It must not be possible for arbitrary processes to gain root privileges. We want Passenger, and only Passenger, to be able to gain root privileges.

There are multiple ways to implement this security. The first one is to use a password file, which only Apache and the wrapper can read, through the use of proper file permissions. The password file must never be world readable or writable.

It works as follows:

  1. Passenger runs the wrapper.

  2. Passenger passes the content of the password file to the wrapper, via an anonymous pipe (or some other anonymous channel, that no other processes can access).

  3. The wrapper checks whether the passed content is the same as what is in the password file. If it is, then it is proven that whatever application ran the wrapper has read access to the password file, and thus is authorized to use the wrapper.

An obvious problem that arises is: how does the wrapper locate its own password file? We obviously do not want to be able to specify the password filename as an argument to the wrapper: that would defeat the point of the password file. The solution is that the filename is to be hardcoded into the binary during compile time.

Another way to implement security is to use a whitelist of users that are allowed to use the wrapper. The wrapper can then check whether the calling process’s user is in the whitelist.

Writing a wrapper is not too hard. Furthermore, unit tests do not have to be run as root, in contrast to the run-Apache-as-root method.

2.4. Using a setuid $X wrapper application

A setuid $X wrapper will work in a fashion similar to the setuid root wrapper, i.e. it will use a password file for authorization.

Passenger does not spawn Rails applications itself, but does so via the spawn server. This spawn server is also responsible for preloading the Rails framework and the Rails application code, in order to speed up the spawning of Rails applications. See the design document of the spawn server for details. The spawn server never calls exec(): doing so will make preloading useless. If Passenger is to use a setuid $X wrapper, then it must start the spawn server via the wrapper. The spawn server itself cannot use the wrapper.

However, doing so will make preloading less efficient. Passenger will be forced to run a spawn server for each user. The different spawn servers do not share memory with each other, so a lot of memory is wasted compared to the other methods.

Implementing this will also take more work. One has to create a different wrapper for each user, and to install it.

2.5. Using su

The standard Unix su tool asks for the root password. It’s a bad idea for Apache to know the root password, so using su is not a viable alternative.

2.6. Using sudo

It might be possible to use the sudo utility. sudo can be configured in such a way that the user Apache runs as can use sudo without having to enter a password.

However, Passenger uses an anonymous communication channel (an unnamed Unix socket) to communicate with the spawn server. sudo seems to close all file descriptors before executing an application, so Passenger will have to communicate with the spawn server via a non-anonymous channel, such as a named Unix socket. Because other processes can access this channel, it can introduce potential security problems. Note that passing information via program arguments is not secure: it is possible to view that information with tools like ps, or (on Linux) by reading the file /proc/$PID/cmdline.

So it seems sudo is not a viable alternative.

2.7. Common security issues

Whatever method Passenger will use, the following security principles must be honored:

  • Rails applications must never be run as root.

It might also be worthy to look into suEXEC’s security model for inspiration.

Also, the following questions remain:

  • Is there a need for a user whitelist/blacklist? That is, is there a need for the ability to restrict the set of users that Passenger can switch to?

3. Chosen solution

Running Apache as root and writing a setuid root wrapper are the main contestants. The former is preferred, because it’s easier to implement.

We have had some conversations with people on the IRC channel #rubyonrails. Among those people, nobody has ever run Apache as non-root. Because of this we have chosen to implement the Running Apache as root solution, until a significant number of users request us to implement the setuid root wrapper solution.

Please read the Ruby API documentation — in particular that of the ApplicationSpawner class — for implementation details. But to make a long story short: it will switch to the owner of the file config/environment.rb. User whitelisting/blacklisting is currently not implemented. We rely on the system administrator to set the correct owner on that file.

We have also not implemented suEXEC’s security model. suEXEC’s model is quite paranoid, and although paranoia is good to a certain extend, it can be in the way of usability while proving little extra security. We are not entirely convinced that implementing suEXEC’s full security model will provide significant benefits, but if you have good reasons to think otherwise, please feel free to discuss it with us.


passenger-4.0.37/doc/Security of user switching support.idmap.txt000644 000765 000024 00000002571 12233035540 025430 0ustar00honglistaff000000 000000 ###### Autogenerated by Mizuho, DO NOT EDIT ###### # This file maps section names to IDs so that the commenting system knows which # comments belong to which section. Section names may be changed at will but # IDs always stay the same, allowing one to retain old comments even if you # rename a section. # # This file is autogenerated but is not a cache; you MUST NOT DELETE this # file and you must check it into your version control system. If you lose # this file you may lose the ability to identity old comments. # # Entries marked with "fuzzy" indicate that the section title has changed # and that Mizuho has found an ID which appears to be associated with that # section. You should check whether it is correct, and if not, fix it. 1. Problem description => problem-description-lvxgz1 2. Analysis of possible solutions => analysis-of-possible-solutions-1ca8rx2 2.1. Apache must already be running as root => apache-must-already-be-running-as-root-17kidbt 2.2. Using Apache’s suEXEC => using-apache-s-suexec-1smlb2z 2.3. Using a setuid root wrapper application => using-a-setuid-root-wrapper-application-1g15zaq 2.4. Using a setuid $X wrapper application => using-a-setuid-x-wrapper-application-1mycuib 2.5. Using su => using-su-13r1zdf 2.6. Using sudo => using-sudo-ry6q7h 2.7. Common security issues => common-security-issues-25g9co 3. Chosen solution => chosen-solution-1wovtue passenger-4.0.37/doc/Security of user switching support.txt000644 000765 000024 00000022110 12233035540 024326 0ustar00honglistaff000000 000000 Security of user switching support in Passenger =============================================== Problem description ------------------- TIP: It is strongly recommended that you first read our link:Architectural%20overview.html[Architectural Overview]. A straightforward implementation of Passenger will spawn Rails applications in the same user context as Apache itself. On server machines which host multiple websites for multiple users, this may not be desired. All Rails applications spawned by Passenger will be able to read and write to all directories that the web server can. So for example, Joe's Rails applications could read Jane's Rails application's 'database.yml' or delete her application files. This is also a problem that typically plagues PHP web hosts. There are multiple ways to solve this problem. The goal of this document is to inform the reader about the solutions have we have analyzed, so that Passenger's security may be peer reviewed. Analysis of possible solutions ------------------------------ It seems that the only way to solve this problem on Unix, is to run each Rails application server as its owner's user and group. Passenger can make use of one of the following methods to implement this: 1. Apache (and thus Passenger) must already be running as root. 2. Using Apache's suEXEC. 3. A setuid root wrapper application must exist, to allow non-root processes to obtain root privileges (or at least, the privilege to switch user). 4. For each user $X that Passenger will need to switch to, there must exist a setuid $X wrapper application. 5. Using 'su'. 6. Using 'sudo'. Let us take a look at each method in detail. [[apache_root]] Apache must already be running as root ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ First, let us take a look at the typical Apache setup, in which Apache is bound to port 80, and uses the prefork MPM. Binding to any port lower than 1024 requires root privileges, so Apache is typically run as root. This poses an unacceptable security risk, so Apache's prefork MPM will, upon receiving an HTTP request, spawn a child process with the privileges of a normal user, typically 'www-data' or 'nobody'. See http://httpd.apache.org/docs/2.2/mod/prefork.html[the documentation for the prefork MPM] - in particular the ``User'' and ``Group'' directives - for details. The process which is responsible for spawning child processes (also called the control process) is run as root. This is also true for http://httpd.apache.org/docs/2.2/mod/worker.html[the worker MPM]. Since Passenger has access to the control process, in the typical Apache setup, Passenger can already launch Rails applications as a different user. But now we have to ask this question: ================================= If Apache is not running as root, are there still any Passenger users who want to run Rails applications as different users? ================================= If the answer is yes, then we cannot use this method. The advantage of this method is that setting up Apache to run as root is incredibly easy, and requires no new framework to be written. However, testing this method in automated unit tests will require running the unit test suit as root. Using Apache's suEXEC ~~~~~~~~~~~~~~~~~~~~~ Apache's http://httpd.apache.org/docs/2.0/suexec.html[suEXEC] allows one to run CGI processes as different users. But it seems that suEXEC can only be used for CGI, and is not a general-purpose mechanism. The http://alain.knaff.lu/howto/PhpSuexec/[PHP-suEXEC] software allows one to run PHP applications via suEXEC, but it requires patching suEXEC. If Passenger is to use suEXEC, then it is likely that we'll have to patch suEXEC. The suEXEC website strongly discourages patching. Using a setuid root wrapper application ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If we use this method, we must be extremely careful. It must not be possible for arbitrary processes to gain root privileges. We want Passenger, and only Passenger, to be able to gain root privileges. There are multiple ways to implement this security. The first one is to use a password file, which only Apache and the wrapper can read, through the use of proper file permissions. The password file must never be world readable or writable. It works as follows: 1. Passenger runs the wrapper. 2. Passenger passes the content of the password file to the wrapper, via an anonymous pipe (or some other anonymous channel, that no other processes can access). 3. The wrapper checks whether the passed content is the same as what is in the password file. If it is, then it is proven that whatever application ran the wrapper has read access to the password file, and thus is authorized to use the wrapper. An obvious problem that arises is: how does the wrapper locate its own password file? We obviously do not want to be able to specify the password filename as an argument to the wrapper: that would defeat the point of the password file. The solution is that the filename is to be hardcoded into the binary during compile time. Another way to implement security is to use a whitelist of users that are allowed to use the wrapper. The wrapper can then check whether the calling process's user is in the whitelist. Writing a wrapper is not too hard. Furthermore, unit tests do not have to be run as root, in contrast to the run-Apache-as-root method. [[setuid_root]] Using a setuid $X wrapper application ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A setuid $X wrapper will work in a fashion similar to the setuid root wrapper, i.e. it will use a password file for authorization. Passenger does not spawn Rails applications itself, but does so via the spawn server. This spawn server is also responsible for preloading the Rails framework and the Rails application code, in order to speed up the spawning of Rails applications. See the design document of the spawn server for details. The spawn server never calls `exec()`: doing so will make preloading useless. If Passenger is to use a setuid $X wrapper, then it must start the spawn server via the wrapper. The spawn server itself cannot use the wrapper. However, doing so will make preloading less efficient. Passenger will be forced to run a spawn server for each user. The different spawn servers do not share memory with each other, so a lot of memory is wasted compared to the other methods. Implementing this will also take more work. One has to create a different wrapper for each user, and to install it. Using 'su' ~~~~~~~~~~ The standard Unix 'su' tool asks for the root password. It's a bad idea for Apache to know the root password, so using 'su' is not a viable alternative. Using 'sudo' ~~~~~~~~~~~~ It might be possible to use the 'sudo' utility. sudo can be configured in such a way that the user Apache runs as can use sudo without having to enter a password. However, Passenger uses an anonymous communication channel (an unnamed Unix socket) to communicate with the spawn server. sudo seems to close all file descriptors before executing an application, so Passenger will have to communicate with the spawn server via a non-anonymous channel, such as a named Unix socket. Because other processes can access this channel, it can introduce potential security problems. Note that passing information via program arguments is not secure: it is possible to view that information with tools like 'ps', or (on Linux) by reading the file `/proc/$PID/cmdline`. So it seems 'sudo' is not a viable alternative. Common security issues ~~~~~~~~~~~~~~~~~~~~~~ Whatever method Passenger will use, the following security principles must be honored: - Rails applications must never be run as root. It might also be worthy to look into suEXEC's security model for inspiration. Also, the following questions remain: - Is there a need for a user whitelist/blacklist? That is, is there a need for the ability to restrict the set of users that Passenger can switch to? Chosen solution --------------- Running Apache as root and writing a setuid root wrapper are the main contestants. The former is preferred, because it's easier to implement. We have had some conversations with people on the IRC channel #rubyonrails. Among those people, nobody has ever run Apache as non-root. Because of this we have chosen to implement the <> solution, until a significant number of users request us to implement the <> solution. Please read link:rdoc/index.html[the Ruby API documentation] -- in particular that of the 'ApplicationSpawner' class -- for implementation details. But to make a long story short: it will switch to the owner of the file 'config/environment.rb'. User whitelisting/blacklisting is currently not implemented. We rely on the system administrator to set the correct owner on that file. We have also not implemented suEXEC's security model. suEXEC's model is quite paranoid, and although paranoia is good to a certain extend, it can be in the way of usability while proving little extra security. We are not entirely convinced that implementing suEXEC's full security model will provide significant benefits, but if you have good reasons to think otherwise, please feel free to discuss it with us. passenger-4.0.37/doc/templates/000755 000765 000024 00000000000 12233035540 016757 5ustar00honglistaff000000 000000 passenger-4.0.37/doc/Users guide Apache.html000644 000765 000024 00002074235 12233035540 021205 0ustar00honglistaff000000 000000 Phusion Passenger users guide, Apache version

1. Support information

1.1. Supported operating systems

Phusion Passenger works on any POSIX-compliant operating system. In other words: practically any operating system on earth, except Microsoft Windows.

Phusion Passenger is confirmed on a large number of operating systems and Linux distributions, including, but not limited to, Ubuntu, Debian, CentOS/Fedora/RHEL, Gentoo, Mac OS X, FreeBSD and Solaris. OpenBSD is supported since version 5.2. Both 32-bit and 64-bit platforms are supported.

Please report a bug or join our discussion forum if it doesn’t work on your POSIX-compliant operating system.

1.2. Where to get support

  • Community discussion forum - post a message here if you’re experiencing problems. Support on this forum is provided by the community on a best-effort basis, so a (timely) response is not guaranteed.

  • Issue tracker - report bugs here.

  • Email support@phusion.nl if you are a Phusion Passenger Enterprise customer. Please mention your order reference. If you are not an Enterprise customer, we kindly redirect you to the community discussion forum instead.

  • Commercial support contracts are also available.

  • Report security vulnerabilities to security@phusion.nl. We will do our best to respond to you as quickly as we can, so please do not disclose the vulnerability until then.

Please consult the Phusion Passenger website for a full list of support resources.

2. Installation

2.1. Synopsis

Because Phusion Passenger is designed to run in a wide variety of operating systems and configurations, there are multiple ways to install it. Most users  — especially first-time users — will prefer OS-specific installation instructions. These are not only the easiest, but also allow Phusion Passenger to integrate into the operating system in the best way possible. Other users should consult the generic installation instructions.

The steps for upgrading or downgrading Phusion Passenger is almost the same as the steps for installing. All the installation guides in this section will also teach you how to upgrade and downgrade.

2.2. Installing or upgrading on Mac OS X with Homebrew

Open source

Every time we release a new Phusion Passenger version, we make it available through Homebrew. Please note that the Homebrew maintainers have to merge our pull requests manually, so it may take a day or two before a new version shows up in the official Homebrew repository.

  1. Update the Homebrew recipes:

    brew update
  2. Run one of the following, and follow the instructions:

    brew install passenger
    -OR-
    brew upgrade passenger
Enterprise

Phusion Passenger Enterprise is currently not available through Homebrew. Please try one of the other installation methods instead.

2.3. Installing or upgrading on Debian or Ubuntu

We provide and official Phusion Passenger APT repository. This APT repository contains Phusion Passenger packages for multiple versions of Debian and Ubuntu. These packages are automatically built by our build server after we push out a source release, and thus are always up to date with the official source releases.

If you use these packages to install Phusion Passenger then you do not need to run passenger-install-apache2-module or passenger-install-nginx-module. These packages contain all the binaries that you need.

Packages are available for the x86 and x86_64 architectures. Our policy is to support all Ubuntu LTS releases that are still supported by Canonical, plus the latest non-LTS Ubuntu release, plus all Debian releases that are still supported by Debian.

2.3.1. Adding our APT repository

  1. Install our PGP key. Packages are signed by "Phusion Automated Software Signing (auto-software-signing@phusion.nl)", fingerprint 1637 8A33 A6EF 1676 2922 526E 561F 9B9C AC40 B2F7.

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
  2. Add HTTPS support for APT. Our APT repository is stored on an HTTPS server.

    sudo apt-get install apt-transport-https ca-certificates
  3. Create a file /etc/apt/sources.list.d/passenger.list and insert one of the following lines, depending on your distribution.

    Open source
    ##### !!!! Only add ONE of these lines, not all of them !!!! #####
    # Ubuntu 13.10
    deb https://oss-binaries.phusionpassenger.com/apt/passenger saucy main
    # Ubuntu 12.04
    deb https://oss-binaries.phusionpassenger.com/apt/passenger precise main
    # Ubuntu 10.04
    deb https://oss-binaries.phusionpassenger.com/apt/passenger lucid main
    # Debian 7
    deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main
    # Debian 6
    deb https://oss-binaries.phusionpassenger.com/apt/passenger squeeze main
    Enterprise
    ##### !!!! Only add ONE of these lines, not all of them !!!! #####
    # Ubuntu 13.10
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt saucy main
    # Ubuntu 12.04
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt precise main
    # Ubuntu 10.04
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt lucid main
    # Debian 7
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt wheezy main
    # Debian 6
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt squeeze main

    You can find the correct value for YOUR_DOWNLOAD_TOKEN in the Customer Area.

  4. Secure passenger.list and update your APT cache:

    sudo chown root: /etc/apt/sources.list.d/passenger.list
    sudo chmod 600 /etc/apt/sources.list.d/passenger.list
    sudo apt-get update

2.3.2. Installing packages

Open source
  1. Add our APT repository.

  2. Install the package:

    sudo apt-get install libapache2-mod-passenger
Enterprise
  1. Download your license key from the Customer Area and save it as /etc/passenger-enterprise-license.

  2. Add our APT repository.

  3. Install the packages:

    sudo apt-get install libapache2-mod-passenger-enterprise

2.4. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux

Warning The RPMs are currently unmaintained. As such, the repository only contains Phusion Passenger 3.x (the latest version is 4.x), which did not support Node.js, Meteor, multiple Rubies, etc. For more recent versions of Phusion Passenger, you are suggested to install from gem or tarball instead.

YUM repositories with RPMs are maintained by Erik Ogan and Stealthy Monkeys Consulting. Only packages for the open source version of Phusion Passenger are provided. Phusion Passenger Enterprise customers should use the generic RubyGems installation method or the generic tarball installation method instead.

If you use YUM to install Phusion Passenger then you do not need to run passenger-install-apache2-module or passenger-install-nginx-module. The YUM packages contain all the binaries that you need. You also don’t need to modify any Apache or Nginx configuration to get them to load Phusion Passenger, the packages provide configuration snippets for you as well.

Step 1: Import the Stealthy Monkeys Consulting’s GPG key

rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc

Step 2: Install the release package

Install the passenger-release package from the main repository.

Fedora Core 17:

yum install http://passenger.stealthymonkeys.com/fedora/17/passenger-release.noarch.rpm

Fedora Core 16:

yum install http://passenger.stealthymonkeys.com/fedora/16/passenger-release.noarch.rpm

Fedora Core 15:

yum install http://passenger.stealthymonkeys.com/fedora/15/passenger-release.noarch.rpm

Fedora Core 14:

yum install http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm

RHEL 6 / CentOS 6 / ScientificLinux 6: (Note: these packages depend on EPEL.)

yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm

RHEL 5 / CentOS 5 / ScientificLinux 5: (Note: these packages depend on EPEL.)

rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm

Step 3: Install the right Phusion Passenger package

From there you can use YUM to install packages. For example, try one of these:

Phusion Passenger for Apache:

yum install mod_passenger

Phusion Passenger for Nginx:

yum install nginx-passenger

Phusion Passenger Standalone:

yum install passenger-standalone

Building your own packages

There are instructions for building your own packages and Yum repositories in the rpm directory ReadMe within the GitHub repository.

2.5. Generic installation, upgrade and downgrade method: via RubyGems

RubyGems is only used as a method to obtain the Phusion Passenger files, so in case you have multiple Ruby versions it does not matter which Ruby’s RubyGems you use for installation. Once installed, Phusion Passenger can work with all other Ruby versions on your system. This is explained in Phusion Passenger and its relationship with Ruby.

Step 1: figuring out whether your Ruby is installed in the home directory or system-wide

Ruby may either be installed in the home directory, or system-wide. If it’s installed system-wide then we will want to install gems system-wide as well, so you need to switch to a root prompt first. If Ruby is installed in the home directory then we will want to install gems to the home directory as well, as a normal user.

To find out which case applies, run the following command to find out where the ruby command is:

which ruby

Do you see a filename that references /home or /Users? If so then your Ruby interpreter is installed in your home directory and you can proceed to step 2. Otherwise, you need to switch to a root prompt by running one of the following commands:

  • Are you using RVM? Run rvmsudo -s

  • Are you not using RVM, or do you not know what RVM is? Run sudo -s

  • Is sudo not installed on your system? Run su -c bash

You must maintain this root prompt throughout this installation guide.

Step 2: install the gem

Open Source

Install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger:

gem install passenger
Previous versions and beta versions

Sometimes you will want to obtain the latest beta version of Phusion Passenger. Beta versions are not normally selected by gem install, so to opt-in for beta versions you have to add the --pre argument:

gem install passenger --pre

If you want to obtain a specific version of Phusion Passenger, e.g. because you are downgrading, then specify the version number with --version:

gem install passenger --version 3.0.0

If you want to obtain a specific beta version of Phusion Passenger then you must also pass --pre:

gem install passenger --version 3.9.1.beta --pre
Enterprise

First, download the license key from the Customer Area and save it as /etc/passenger-enterprise-license.

Next, add the Phusion Passenger Enterprise gem server to your RubyGems source list:

gem source --add https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_gems/

Substitute YOUR_DOWNLOAD_TOKEN with the one you find in the Customer Area. And notice the trailing slash in the URL! It is very important.

Finally, install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger:

gem install passenger-enterprise-server
Previous versions and beta versions

Sometimes you will want to obtain the latest beta version of Phusion Passenger Enterprise. Beta versions are not normally selected by gem install, so to opt-in for beta versions you have to add the --pre argument:

gem install passenger-enterprise-server --pre

If you want to obtain a specific version of Phusion Passenger Enterprise, e.g. because you are downgrading, then specify the version number with --version:

gem install passenger-enterprise-server --version 3.0.0

If you want to obtain a specific beta version of Phusion Passenger then you must also pass --pre:

gem install passenger-enterprise-server --version 3.9.1.beta --pre

Step 3: run the Phusion Passenger installer

The Phusion Passenger gem only contains source files. In this step we will use the installer to compile the Phusion Passenger binaries, which include the various Phusion Passenger agent executables and the Apache module.

Run the following command and follow the on-screen instructions.

passenger-install-apache2-module

At the end of the installation process, you will be asked to copy and paste a configuration snippet (containing LoadModule, PassengerRoot, etc.) into your Apache configuration file. If you’re upgrading, then you already had a similar configuration snippet. Be sure to remove the old one before pasting the new one.

Different operating systems and Apache installations have different conventions with regard to where the Apache configuration file is and how it is organized. Please read Working with the Apache configuration file if you’re not familiar with it. That section is especially of interest for OS X Server >= 10.8 users because the configuration file may not be at a surprising location.

If compilation doesn’t succeed, then please consult the Troubleshooting section.

What does the installer do?

Despite the name, this "installer" doesn’t actually install anything. The installer checks whether all required dependencies are installed, invokes the compiler, and tells you how to modify the Apache configuration file. However, it doesn’t copy any files to outside the Phusion Passenger source directory.

passenger-install-apache2-module is actually just a user-friendly frontend around the command rake apache2, which performs the actual compilation of Phusion Passenger.

Step 4: restarting the Flying Passenger daemon

If you are using Flying Passenger then you must restart the Flying Passenger daemon by sending it the SIGTERM signal:

kill `cat /path-to/flying-passenger.pid`

Or, if Flying Passenger is not running with a PID file, look up its PID us ps and then send it SIGTERM:

ps aux | grep flying-passenger
kill PID_OF_FLYING_PASSENGER

Step 5: verifying that Phusion Passenger is running

Restart your web server and run:

passenger-memory-stats

You should see the web server processes as well as a number of Phusion Passenger processes (e.g. PassengerWatchdog, PassengerHelperAgent). Congratulations, Phusion Passenger is now installed and running!

If the output is not as expected, then please refer to the Troubleshooting section.

2.6. Generic installation, upgrade and downgrade method: via tarball

Step 1: installing Ruby

Phusion Passenger supports multiple languages and its core is written in C++, but its installer and administration tools are written in Ruby, so you must install Ruby.

Even though Ruby is required, Ruby will normally not be loaded during normal operation unless you deploy a Ruby web application on Phusion Passenger. Phusion Passenger’s dependency on Ruby is very minimal. See Phusion Passenger and its relationship with Ruby for details.

Debian, Ubuntu

sudo apt-get update
sudo apt-get install ruby rake

Red Hat, CentOS, ScientificLinux, Amazon Linux

Enable EPEL, then run as root:
yum install ruby rubygem-rake

Mac OS X

No action needed. Ruby is installed by default.

Other operating systems

Install Ruby from the Ruby website.

Step 2: download and extract the tarball

Open Source

Download the open source Phusion Passenger tarball from the Phusion Passenger website.

Older versions can be found in the release archive.

Enterprise

Phusion Passenger Enterprise customers can download the Phusion Passenger Enterprise tarball from the Customer Area.

Also be sure to download the license key and save it as /etc/passenger-enterprise-license.

Once you have downloaded the tarball, pick a location to extract it to. You can pick any location. A good location is /opt/passenger. Create this directory and extract the tarball as follows:

mkdir /opt/passenger
cd /opt/passenger
tar xzvf /location-to/passenger-x.x.x.tar.gz
cd /opt/passenger/passenger-x.x.x

Note that passenger-x.x.x should be passenger-enterprise-server-x.x.x if you’re using Phusion Passenger Enterprise.

Step 3: run the Phusion Passenger installer

The Phusion Passenger gem only contains source files. In this step we will use the installer to compile the Phusion Passenger binaries, which include the various Phusion Passenger agent executables and the Apache module.

Run the following command and follow the on-screen instructions.

./bin/passenger-install-apache2-module

At the end of the installation process, you will be asked to copy and paste a configuration snippet (containing LoadModule, PassengerRoot, etc.) into your Apache configuration file. If you’re upgrading, then you already had a similar configuration snippet. Be sure to remove the old one before pasting the new one.

Different operating systems and Apache installations have different conventions with regard to where the Apache configuration file is and how it is organized. Please read Working with the Apache configuration file if you’re not familiar with it. That section is especially of interest for OS X Server >= 10.8 users because the configuration file may not be at a surprising location.

If compilation doesn’t succeed, then please consult the Troubleshooting section.

What does the installer do?

Despite the name, this "installer" doesn’t actually install anything. The installer checks whether all required dependencies are installed, invokes the compiler, and tells you how to modify the Apache configuration file. However, it doesn’t copy any files to outside the Phusion Passenger source directory.

passenger-install-apache2-module is actually just a user-friendly frontend around the command rake apache2, which performs the actual compilation of Phusion Passenger.

Step 4: verifying that Phusion Passenger is running

Restart your web server and run:

./bin/passenger-memory-stats

You should see the web server processes as well as a number of Phusion Passenger processes (e.g. PassengerWatchdog, PassengerHelperAgent). Congratulations, Phusion Passenger is now installed and running!

If the output is not as expected, then please refer to the Troubleshooting section.

2.7. Upgrading from open source to Enterprise

Phusion Passenger comes in two variants: an open source version, as well as an Enterprise version which introduces a myriad of useful features that can improve stability and performance and efficiency.

Customers who have bought Phusion Passenger Enterprise can upgrade their open source installation to Enterprise as follows:

  1. Uninstall the open source Phusion Passenger.

  2. Install the Enterprise version by following one of the installation guides in this section (e.g. RubyGems generic installation or tarball generic installation).

The uninstallation is necessary because the Enterprise Ruby gem has a different gem name (passenger-enterprise-server instead of passenger), but the same administration command names (e.g. passenger-status). Uninstalling the open source version avoids any conflicts.

2.8. Cryptographic verification of installation files

2.8.1. Synopsis

We digitally sign various files with our GPG key so that you can check whether they’re legit, i.e. whether they really came from Phusion and haven’t been tampered with by a third party. We apply signing since the open source version 4.0.0 RC 4, or the Enterprise version 4.0.0 RC 1.

2.8.2. Importing the Phusion Software Signing key

Phusion’s GPG key for signing software is as follows:

Phusion Software Signing (software-signing@phusion.nl)
Short key ID: 0x0A212A8C
Long key ID: 0x2AC745A50A212A8C
Fingerprint: D5F0 8514 2693 9232 F437  AB72 2AC7 45A5 0A21 2A8C

This key is stored at the Phusion website and at the key servers sks-keyservers.net and keyserver.ubuntu.com. You can import it to your keyring with one of these command:

gpg --keyserver pool.sks-keyservers.net --search-keys 0x2AC745A50A212A8C
# -OR-
gpg --keyserver keyserver.ubuntu.com --search-keys 0x2AC745A50A212A8C

The Phusion Software Signing key is only used for signing software. It’s never used for signing emails or for encrypting files, so please be suspicious if you encounter usage of this key outside the context of signing software, and alert us at support@phusion.nl. Include "notspam" in the message to bypass our spam filter.

The email address software-signing@phusion.nl redirects to info@phusion.nl so it’s safe to send email there.

2.8.3. Verifying the Phusion Software Signing key

The Phusion Software Signing key is also signed by the Phusion founders. Their keys are as follows:

Hongli Lai (hongli@phusion.nl)
Short key ID: 4B6F4332
Long key ID: 06A131094B6F4332
Fingerprint: 64E8 0420 FC6A 499F 9E1F  81FA 06A1 3109 4B6F 4332
Ninh Bui (ninh@phusion.nl)
Short key ID: 6FAF3782
Long key ID: BA8DA3F46FAF3782
Fingerprint: 353A 398C 49AF 5CD5 74A0  656C BA8D A3F4 6FAF 3782

Both keys are stored at both sks-servers.net and keyserver.ubuntu.com. Import them with:

gpg --keyserver pool.sks-servers.net --search-keys 0x06A131094B6F4332
gpg --keyserver pool.sks-servers.net --search-keys 0xBA8DA3F46FAF3782
# -OR-
gpg --keyserver keyserver.ubuntu.com --search-keys 0x06A131094B6F4332
gpg --keyserver keyserver.ubuntu.com --search-keys 0xBA8DA3F46FAF3782

2.8.4. Verifying the gem and tarball

You can find the open source version’s gem and tarball GPG signatures at https://www.phusionpassenger.com/file_releases. The Enterprise version’s GPG signatures can be found in the Customer Area. All signatures have the .asc extension. Once you have imported our key, you can verify the validity of a file against its signature as follows:

$ gpg --verify passenger-x.x.x.tar.gz.asc passenger-x.x.x.tar.gz
gpg: Signature made Mon Mar 11 09:45:46 2013 CET using RSA key ID 0A212A8C
gpg: Good signature from "Phusion Software Signing <software-signing@phusion.nl>"

2.8.5. Verifying Git signatures

Tags in the Git repository for the open source version are also tagged. You can verify a Git tag as follows:

$ git tag --verify release-x.x.x
object d886f34b5705e4314feccaf0d77b9a38416e15e0
type commit
tag release-4.0.0.rc5
tagger Hongli Lai (Phusion) <hongli@phusion.nl> 1362993117 +0100

This is a tag message.
gpg: Signature made Mon Mar 11 10:12:02 2013 CET using RSA key ID 0A212A8C
gpg: Good signature from "Phusion Software Signing <software-signing@phusion.nl>"

2.8.6. Verifying DEB and RPM packages

The DEB and RPM packages are signed with the signatures of the respective packagers. They are automatically checked upon installation.

2.8.7. Revocation

In the event our key is compromised, we will revoke the key and upload the revocation information to sks-servers.net and keyserver.ubuntu.com. However your system will not know about the revocation until you update the keys from the keyservers. You should update your keys regularly (e.g. once a week) by invoking:

gpg --refresh-keys --keyserver pool.sks-servers.net
# -OR-
gpg --refresh-keys --keyserver keyserver.ubuntu.com

If you installed Phusion Passenger through our APT repository, then you should update APT’s keyring from time to time as well:

sudo apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com

2.9. Non-interactive, automatic, headless installs or upgrades

By default, the installer (passenger-install-apache2-module) is interactive. If you want to automate installation then you can do so by passing --auto to the installer. See also passenger-install-apache2-module --help for more options.

2.10. Customizing the compilation process

The Phusion Passenger compilation process can be customized with environment variables. You can learn more about environment variables in About environment variables.

2.10.1. Setting the compiler

You can force the Phusion Passenger build system to use a specific C or C++ compiler by setting the CC and CXX environment variables. These may be set to any arbitrary shell commands.

For example, contributors who want to hack on Phusion Passenger may want to use Clang for faster compilation and ccache for faster recompilation, and may want to enable more error-catching compilation flags:

export CC='ccache clang -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
export CXX='ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
Note If you run the installer with sudo then environment variables may not be passed properly. Learn more at Environment variables and sudo.

2.10.2. Adding additional compiler or linker flags

On some systems, C/C++ libraries and headers that Phusion Passenger requires may be located in a non-standard directory. You can force the Phusion Passenger build system to look in those locations by injecting compiler and linker flags using the following environment variables:

EXTRA_PRE_CFLAGS

These flags are injected into all C compiler invocations that involve compiling C source files. This also covers compiler invocations that compile and link. The flags are injected at the beginning of the command string, even before EXTRA_PRE_LDFLAGS.

EXTRA_CFLAGS

Similar to EXTRA_PRE_CFLAGS, but injected at the end of the command string, before EXTRA_LDFLAGS.

EXTRA_PRE_CXXFLAGS

Similar to EXTRA_PRE_CFLAGS, but for C++ compiler invocations.

EXTRA_CXXFLAGS

Similar to EXTRA_CFLAGS, but for C++ compiler invocations.

EXTRA_PRE_LDFLAGS

These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile and link. The flags are injected at the beginning of the command string, but after EXTRA_PRE_CFLAGS/EXTRA_PRE_CXXFLAGS.

EXTRA_PRE_C_LDFLAGS

These flags are injected into all C compiler invocations that involve linking, right after EXTRA_PRE_LDFLAGS.

EXTRA_PRE_CXX_LDFLAGS

Similar to EXTRA_PRE_CXX_LDFLAGS, but for C++ compiler invocations.

EXTRA_LDFLAGS

Similar to EXTRA_PRE_LDFLAGS, but injected at the very end of the command string, even after EXTRA_CFLAGS and EXTRA_CXXFLAGS.

EXTRA_C_LDFLAGS

Similar to EXTRA_LDFLAGS, but only injected for C executable linking commands. Injected right after EXTRA_LDFLAGS.

EXTRA_CXX_LDFLAGS

Similar to EXTRA_LDFLAGS, but only injected for C++ executable linking commands. Injected right after EXTRA_LDFLAGS.

PASSENGER_THREAD_LOCAL_STORAGE

Setting this to 1 will enable the PASSENGER_THREAD_LOCAL_STORAGE macro, which forcefully disables the use of thread-local storage inside the Phusion Passenger codebase. Setting this environment variable is useful on systems that have broken support for thread-local storage, despite passing our build system’s check for proper thread-local storage support. At the time of writing, one user has reported that Ubuntu 12.04 32-bit has broken thread-local storage report although neither the reporter nor us were able to reproduce the problem on any other systems running Ubuntu 12.04 32-bit. Note that this flag has no effect on non-Phusion Passenger code.

Note If you run the installer with sudo then environment variables may not be passed properly. Learn more at Environment variables and sudo.

2.10.3. Forcing location of command line tools and dependencies

The Phusion Passenger build system attempts to autodetect many things by locating relevant helper tools. For example, to find out which compiler flags it should use for compiling Apache modules, it locates the apxs2 command and queries it. To find out which compiler flags it should use for libcurl, it queries the curl-config command. These commands may not be in $PATH, or even when they are you may want to use a different one.

You can force the build to find certain command line tools at certain locations by using the following environment variables:

HTTPD

The location of the httpd executable (the Apache server executable).

APXS2

The location of the apxs2 executable (the Apache module developer tool). Only used by passenger-install-apache2-module.

This environment variable, together with HTTPD, are what you need to customize if you have multiple Apache installations on your system, or if your Apache is located in a non-standard location which Phusion Passenger cannot detect. By setting APXS2 and HTTP to the right paths, you can force Phusion Passenger to be compiled against that specific Apache installation.

For example, if your Apache installation is located in /opt/lamp/apache2, then you can run the installer as follows:

$ sudo bash
# export HTTPD=/opt/lampp/apache2/bin/apache
# export APXS2=/opt/lampp/apache2/bin/apxs
# passenger-install-apache2-module
APR_CONFIG

The location of the apr-config executable (the Apache Portable Runtime developer tool).

APU_CONFIG

The location of the apu-config executable (the Apache Portable Runtime Utility developer tool).

MAKE

The location of a make tool. It does not matter which implementation of make this is.

GMAKE

The location of the GNU-compatible make tool.

Tip If you do not know what environment variables are, or how to use them, then please read Environment variables and sudo.
Note If you run the installer with sudo then environment variables may not be passed properly. Learn more at Environment variables and sudo.

2.11. Dealing with multiple Apache installations

Some systems have multiple Apache installations. Maybe you already know about that, and you installed multiple Apaches for a reason. Or maybe you did so in the past but then forgot about the other installs. Or maybe someone else — or some other software — installed another Apache for you without your knowledge.

Whatever the reason might be, it is important that you know about the existance of multiple Apache installations, and that you decide which one you want to use. Unless you know exactly what you are doing, we recommend that you remove all the Apache installations that you don’t intend to use, in order to avoid confusion and problems. You should end up with only a single Apache installation. Unfortunately, this manual cannot tell you how to remove the other Apache installs: it depends on how you originally installed them. Usually it’s a matter of removing the directories that they’re located in, and removing their configuration files. But some Apache distributions might bundle an uninstaller. You need to do the proper research on how they ended up there in the first place.

Phusion Passenger provides a tool to check whether you have multiple Apache installations on your system. You can invoke the tool by running passenger-config --detect-apache2.

If the existance of multiple Apache installations is intentional, then Phusion Passenger can happily go along with your choice: you simply have to tell passenger-install-apache2-module which Apache to install against. There are several ways to specify which Apache you want to install against:

  • By passing the --apxs2-path parameter. The passenger-config --detect-apache2 command will tell you how to use this parameter.

  • By setting APXS2, HTTPD and other kinds of environment variables. Please refer to Forcing location of command line tools and dependencies for more information.

2.12. Working with the Apache configuration file

On most systems the Apache configuration file is located in either /etc/apache2/httpd.conf or /etc/apache2/apache2.conf. However, to allow better organization, many operating systems and Apache distributions also read configuration files in the conf.d, mods-enabled and sites-enabled subdirectories.

mods-enabled contains symlinks to files in mods-available. This latter subdirectory contains config files for all available modules, while mods-enabled contains only a subset, namely the modules that should actually be enabled. The symlinks are created using the a2enmod tool. .load files contain LoadModule directives, while .conf files contain all other configuration directives.

Use mods-enabled/mods-available to store Phusion Passenger configuration if you can:

  • Create /etc/apache2/mods-available/passenger.load and paste the LoadModule ... directive that passenger-install-apache2-module outputs.

  • Create /etc/apache2/mods-available/passenger.conf and paste the PassengerRoot and other Phusion Passenger options.

  • Enable by running sudo a2enmod passenger.

If the mods-enabled mechanism is not available then you can paste configuration snippets into httpd.conf or apache2.conf directly.

On OS X Server >= 10.8 Mountain Lion the location of the Apache configuration file depends on whether you use Web Services or not. If you do, then the configuration file is in /Library/Server/Web/Config/apache2/httpd_server_app.conf. If you do not, then the configuration file is in /etc/apache2/httpd.conf.

2.13. Disabling without uninstalling

You can temporarily unload (disable) Phusion Passenger from the web server, without uninstalling the Phusion Passenger files, so that the web server behaves as if Phusion Passenger was never installed in the first place. This might be useful to you if - for example - you seem to be experiencing a problem caused by Phusion Passenger, but you want to make sure whether that’s actually the case without having to go through the hassle of uninstalling Phusion Passenger completely. When disabled, Phusion Passenger will not occupy any memory or CPU or otherwise interfere with the web server.

To unload Phusion Passenger from the web server, edit your Apache configuration file(s) and comment out:

  • all Phusion Passenger configuration directives.

  • the LoadModule passenger_module directive.

For example, if your configuration file looks like this


Listen *:80
NameVirtualHosts *:80
....

LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so

PassengerRoot /somewhere/passenger/x.x.x
PassengerDefaultRuby /usr/bin/ruby
PassengerMaxPoolSize 10

<VirtualHost *:80>
    ServerName www.foo.com
    DocumentRoot /webapps/foo/public
    RailsBaseURI /rails
</VirtualHost>


then comment out the relevant directives, so that it looks like this:

Listen *:80
NameVirtualHosts *:80
....

# LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so

# PassengerRoot /somewhere/passenger/x.x.x
# PassengerDefaultRuby /usr/bin/ruby
# PassengerMaxPoolSize 10

<VirtualHost *:80>
    ServerName www.foo.com
    DocumentRoot /webapps/foo/public
    # RailsBaseURI /rails
</VirtualHost>

After you’ve done this, save the configuration file and restart the web server.

2.14. Uninstalling

To uninstall Phusion Passenger, please first remove all Phusion Passenger configuration directives from your web server configuration file(s). After you’ve done this, you need to remove the Phusion Passenger files.

  • If you installed Phusion Passenger via a Ruby gem, then run gem uninstall passenger (or, if you’re a Phusion Passenger Enterprise user, gem uninstall passenger-enterprise-server). You might have to run this as root.

  • If you installed Phusion Passenger via a source tarball, then remove the directory in which you placed the extracted Phusion Passenger files. This directory is the same as the one pointed to the by PassengerRoot/passenger_root configuration directive.

  • If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger.

  • If you installed Phusion Passenger through Homebrew, then run brew uninstall passenger.

2.15. Moving to a different directory

If you installed Phusion Passenger through a tarball then you can move the Phusion Passenger directory to another location. This is not possible if you used any of the other installation methods.

First, move the directory to whereever you like:

mv /opt/passenger/passenger-4.0.0 /usr/local/passenger-4.0.0

Next you must tell Apache that Phusion Passenger has moved. Open your Apache configuration file and set the PassengerRoot directive to the new location:

PassengerRoot /usr/local/passenger-4.0.0

Restart your web server to finalize the change.

If you used the tarball installation method and you added Phusion Passenger’s bin subdirectory to PATH, then you must update your PATH with the new location. Open /etc/bashrc (or /etc/bash.bashrc on some systems) and change:

export PATH=/opt/passenger/passenger-4.0.0/bin:$PATH

to:

export PATH=/usr/local/passenger-4.0.0/bin:$PATH

Finally, restart all your shell sessions to activate the PATH change.

3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3.x) application

Suppose you have a Ruby on Rails application in /webapps/mycook, and you own the domain www.mycook.com. You can either deploy your application to the virtual host’s root (i.e. the application will be accessible from the root URL, http://www.mycook.com/), or in a sub URI (i.e. the application will be accessible from a sub URL, such as http://www.mycook.com/railsapplication).

Note The default RAILS_ENV environment in which deployed Rails applications are run, is “production”. You can change this by changing the RailsEnv configuration option.

3.1. Deploying to a virtual host’s root

Add a virtual host entry to your Apache configuration file. Make sure that the following conditions are met:

  • The virtual host’s document root must point to your Ruby on Rails application’s public folder.

  • The Apache per-directory permissions must allow access to this folder.

  • MultiViews must be disabled for this folder.

For example:

<VirtualHost *:80>
    ServerName www.mycook.com
    DocumentRoot /webapps/mycook/public
    <Directory /webapps/mycook/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

You may also need to tweak your file/folder permissions. Make sure that the following folders are readable and executable by Apache:

  • this public folder.

  • the application’s config folder.

  • all parent folders. That is, /webapps/mycook and /webapps must also be readable and executable by Apache.

Then restart Apache. The application has now been deployed.

3.2. Deploying to a sub URI

Suppose that you already have a virtual host:

<VirtualHost *:80>
    ServerName www.phusion.nl
    DocumentRoot /websites/phusion
    <Directory /websites/phusion>
        Allow from all
    </Directory>
</VirtualHost>

And you want your Rails application, located in /websites/rails, to be accessible from the URL http://www.phusion.nl/subapp.

To do this, you need to perform the following:

  1. Set Alias {SUBURI} {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}.

  2. Create a <Location /{SUBURI}> block.

  3. Inside the Location block, set PassengerBaseURI /{SUBURI}.

  4. Inside the Location block, set PassengerAppRoot {PATH TO YOUR APPLICATION ROOT}.

  5. Create a <Directory {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}> block.

  6. Inside the Directory block, set Allow from all.

  7. Inside the Directory block, disable MultiViews.

Here is an example:

<VirtualHost *:80>
    ServerName www.phusion.nl
    DocumentRoot /websites/phusion
    <Directory /websites/phusion>
        Allow from all
    </Directory>

    # These have been added:
    Alias /subapp /websites/rails/public
    <Location /subapp>
        PassengerBaseURI /subapp
        PassengerAppRoot /websites/rails
    </Location>
    <Directory /websites/rails/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

Then restart Apache. The application has now been deployed to the sub-URI.

Note If you’re deploying to a sub-URI then please make sure that your view templates correctly handles references to sub-URI static assets! Otherwise you may find broken links to images, CSS files, JavaScripts, etc. Please read How to fix broken images/CSS/JavaScript URIs in sub-URI deployments for more information.

3.3. Redeploying (restarting the Ruby on Rails application)

Deploying a new version of a Ruby on Rails application is as simple as re-uploading the application files, and restarting the application.

There are two ways to restart the application:

  1. By restarting Apache.

  2. By creating or modifying the file tmp/restart.txt in the Rails application’s root folder. Phusion Passenger will automatically restart the application during the next request.

For example, to restart our example MyCook application, we type this in the command line:

touch /webapps/mycook/tmp/restart.txt

Please note that, unlike earlier versions of Phusion Passenger, restart.txt is not automatically deleted. Phusion Passenger checks whether the timestamp of this file has changed in order to determine whether the application should be restarted.

3.4. Migrations

Phusion Passenger is not related to Ruby on Rails migrations in any way. To run migrations on your deployment server, please login to your deployment server (e.g. with ssh) and type rake db:migrate RAILS_ENV=production in a shell console, just like one would normally run migrations.

3.5. Capistrano integration

4. Deploying a Rack-based Ruby application (including Rails >= 3)

Phusion Passenger supports arbitrary Ruby web applications that follow the Rack interface.

Phusion Passenger assumes that Rack application directories have a certain layout. Suppose that you have a Rack application in /webapps/rackapp. Then that folder must contain at least three entries:

  • config.ru, a Rackup file for starting the Rack application. This file must contain the complete logic for initializing the application.

  • public/, a folder containing public static web assets, like images and stylesheets.

  • tmp/, used for restart.txt (our application restart mechanism). This will be explained in a following subsection.

So /webapps/rackapp must, at minimum, look like this:

/webapps/rackapp
  |
  +-- config.ru
  |
  +-- public/
  |
  +-- tmp/

Suppose you own the domain www.rackapp.com. You can either deploy your application to the virtual host’s root (i.e. the application will be accessible from the root URL, http://www.rackapp.com/), or in a sub URI (i.e. the application will be accessible from a sub URL, such as http://www.rackapp.com/rackapp).

Note The default RACK_ENV environment in which deployed Rack applications are run, is “production”. You can change this by changing the RackEnv configuration option.

4.1. Tutorial/example: writing and deploying a Hello World Rack application

First we create a Phusion Passenger-compliant Rack directory structure:

$ mkdir /webapps/rack_example
$ mkdir /webapps/rack_example/public
$ mkdir /webapps/rack_example/tmp

Next, we write a minimal "hello world" Rack application:

$ cd /webapps/rack_example
$ some_awesome_editor config.ru
...type in some source code...
$ cat config.ru
app = proc do |env|
    [200, { "Content-Type" => "text/html" }, ["hello <b>world</b>"]]
end
run app

Finally, we deploy it by adding the following configuration options to the Apache configuration file:

<VirtualHost *:80>
    ServerName www.rackexample.com
    DocumentRoot /webapps/rack_example/public
    <Directory /webapps/rack_example/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

And we’re done! After an Apache restart, the above Rack application will be available under the URL http://www.rackexample.com/.

4.2. Deploying to a virtual host’s root

Add a virtual host entry to your Apache configuration file. Make sure that the following conditions are met:

  • The virtual host’s document root must point to your Rack application’s public folder.

  • The Apache per-directory permissions must allow access to this folder.

  • MultiViews must be disabled for this folder.

For example:

<VirtualHost *:80>
    ServerName www.rackapp.com
    DocumentRoot /webapps/rackapp/public
    <Directory /webapps/rackapp/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

You may also need to tweak your file/folder permissions. Make sure that the following folders are readable and executable by Apache:

  • this public folder.

  • the application’s config folder.

  • all parent folders. That is, /webapps/rackapp and /webapps must also be readable and executable by Apache.

Then restart Apache. The application has now been deployed.

4.3. Deploying to a sub URI

Suppose that you already have a virtual host:

<VirtualHost *:80>
    ServerName www.phusion.nl
    DocumentRoot /websites/phusion
    <Directory /websites/phusion>
        Allow from all
    </Directory>
</VirtualHost>

And you want your Rack application, located in /websites/rack, to be accessible from the URL http://www.phusion.nl/subapp.

To do this, you need to perform the following:

  1. Set Alias {SUBURI} {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}.

  2. Create a <Location /{SUBURI}> block.

  3. Inside the Location block, set PassengerBaseURI /{SUBURI}.

  4. Inside the Location block, set PassengerAppRoot {PATH TO YOUR APPLICATION ROOT}.

  5. Create a <Directory {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}> block.

  6. Inside the Directory block, set Allow from all.

  7. Inside the Directory block, disable MultiViews.

Here is an example:

<VirtualHost *:80>
    ServerName www.phusion.nl
    DocumentRoot /websites/phusion
    <Directory /websites/phusion>
        Allow from all
    </Directory>

    # These have been added:
    Alias /subapp /websites/rack/public
    <Location /subapp>
        PassengerBaseURI /subapp
        PassengerAppRoot /websites/rack
    </Location>
    <Directory /websites/rack/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

Then restart Apache. The application has now been deployed to the sub-URI.

4.4. Redeploying (restarting the Rack application)

Deploying a new version of a Rack application is as simple as re-uploading the application files, and restarting the application.

There are two ways to restart the application:

  1. By restarting Apache.

  2. By creating or modifying the file tmp/restart.txt in the Rack application’s root folder. Phusion Passenger will automatically restart the application.

For example, to restart our example application, we type this in the command line:

touch /webapps/rackapp/tmp/restart.txt

4.5. Rackup specifications for various web frameworks

This subsection shows example config.ru files for various web frameworks.

4.5.1. Camping

require 'rubygems'
require 'rack'
require 'camping'

##### Begin Camping application
Camping.goes :Blog

...your application code here...
##### End Camping application

run Rack::Adapter::Camping.new(Blog)

For Camping versions 2.0 and up, using run Blog as the final line will do.

4.5.2. Halcyon

require 'rubygems'
require 'halcyon'
$LOAD_PATH.unshift(Halcyon.root / 'lib')
Halcyon::Runner.load_config Halcyon.root/'config'/'config.yml'
run Halcyon::Runner.new

4.5.3. Mack

ENV["MACK_ENV"] = ENV["RACK_ENV"]
load("Rakefile")
require 'rubygems'
require 'mack'
run Mack::Utils::Server.build_app

4.5.4. Merb

require 'rubygems'
require 'merb-core'

Merb::Config.setup(
  :merb_root   => ::File.expand_path(::File.dirname(__FILE__)),
  :environment => ENV['RACK_ENV']
)
Merb.environment = Merb::Config[:environment]
Merb.root = Merb::Config[:merb_root]
Merb::BootLoader.run

run Merb::Rack::Application.new

4.5.5. Ramaze

require "rubygems"
require "ramaze"
Ramaze.trait[:essentials].delete Ramaze::Adapter
require "start"
Ramaze.start!
run Ramaze::Adapter::Base

4.5.6. Sinatra

require 'rubygems'
require 'sinatra'

set :environment, ENV['RACK_ENV'].to_sym
disable :run, :reload

require 'app.rb'

run Sinatra::Application

5. Deploying a WSGI (Python) application

Phusion Passenger supports all WSGI-compliant Python web applications. Suppose that you have a WSGI application in /webapps/wsgiapp. Then that folder must contain at least three entries:

  • passenger_wsgi.py, which Phusion Passenger will use as the main entry point for your application. This file must export a WSGI object called application.

  • public/, a folder containing public static web assets, like images and stylesheets.

  • tmp/, used for restart.txt (our application restart mechanism). This will be explained in a following subsection.

So /webapps/wsgiapp must, at minimum, look like this:

/webapps/wsgiapp
  |
  +-- config.ru
  |
  +-- public/
  |
  +-- tmp/

5.1. Tutorial/example: writing and deploying a Hello World WSGI application

First we create a Phusion Passenger-compliant WSGI directory structure:

$ mkdir /webapps/wsgi_example
$ mkdir /webapps/wsgi_example/public
$ mkdir /webapps/wsgi_example/tmp

Next, we write a minimal "hello world" WSGI application:

$ cd /webapps/wsgi_example
$ some_awesome_editor passenger_wsgi.py
...type in some source code...
$ cat passenger_wsgi.py
def application(environ, start_response):
  start_response('200 OK', [('Content-Type', 'text/plain')])
  return [b"hello world!\n"]

Finally, we deploy it by adding the following configuration options to the Apache configuration file:

<VirtualHost *:80>
    ServerName www.wsgiexample.com
    DocumentRoot /webapps/wsgi_example/public
    <Directory /webapps/wsgi_example/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

And we’re done! After an Apache restart, the above WSGI application will be available under the URL http://www.wsgiexample.com/.

5.2. Deploying to a virtual host’s root

Add a virtual host entry to your Apache configuration file. Make sure that the following conditions are met:

  • The virtual host’s document root must point to your WSGI application’s public folder.

  • The WSGI per-directory permissions must allow access to this folder.

  • MultiViews must be disabled for this folder.

For example:

<VirtualHost *:80>
    ServerName www.wsgiapp.com
    DocumentRoot /webapps/wsgiapp/public
    <Directory /webapps/wsgiapp/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

You may also need to tweak your file/folder permissions. Make sure that the following folders are readable and executable by Apache:

  • this public folder.

  • the application’s config folder.

  • all parent folders. That is, /webapps/wsgiapp and /webapps must also be readable and executable by Apache.

Then restart Apache. The application has now been deployed.

5.3. Deploying to a sub URI

Suppose that you already have a virtual host:

<VirtualHost *:80>
    ServerName www.phusion.nl
    DocumentRoot /websites/phusion
    <Directory /websites/phusion>
        Allow from all
    </Directory>
</VirtualHost>

And you want your Python application, located in /websites/python, to be accessible from the URL http://www.phusion.nl/subapp.

To do this, you need to perform the following:

  1. Set Alias {SUBURI} {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}.

  2. Create a <Location /{SUBURI}> block.

  3. Inside the Location block, set PassengerBaseURI /{SUBURI}.

  4. Inside the Location block, set PassengerAppRoot {PATH TO YOUR APPLICATION ROOT}.

  5. Create a <Directory {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}> block.

  6. Inside the Directory block, set Allow from all.

  7. Inside the Directory block, disable MultiViews.

Here is an example:

<VirtualHost *:80>
    ServerName www.phusion.nl
    DocumentRoot /websites/phusion
    <Directory /websites/phusion>
        Allow from all
    </Directory>

    # These have been added:
    Alias /subapp /websites/python/public
    <Location /subapp>
        PassengerBaseURI /subapp
        PassengerAppRoot /websites/python
    </Location>
    <Directory /websites/python/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

Then restart Apache. The application has now been deployed to the sub-URI.

5.4. Redeploying (restarting the WSGI application)

Deploying a new version of a WSGI application is as simple as re-uploading the application files, and restarting the application.

There are two ways to restart the application:

  1. By restarting Apache.

  2. By creating or modifying the file tmp/restart.txt in the WSGI application’s root folder. Phusion Passenger will automatically restart the application.

For example, to restart our example application, we type this in the command line:

touch /webapps/wsgiapp/tmp/restart.txt

6. Deploying a Node.js application

Please refer to the Node.js tutorial.

7. Deploying a Meteor application

Please refer to the Meteor tutorial.

8. Configuring Phusion Passenger

After installation, Phusion Passenger does not need any further configurations. Nevertheless, the system administrator may be interested in changing Phusion Passenger’s behavior. Phusion Passenger’s Apache module supports the following configuration options:

8.1. PassengerRoot <directory>

The location to the Phusion Passenger root directory. This configuration option is essential to Phusion Passenger, and allows Phusion Passenger to locate its own data files. The correct value is given by the installer.

If you’ve moved Phusion Passenger to a different directory then you need to update this option as well. Please read Moving Phusion Passenger to a different directory for more information.

This required option may only occur once, in the global server configuration.

8.2. PassengerDefaultRuby <filename>

Introduced in version 4.0.0.

This option specifies the default Ruby interpreter to use for web apps as well as for all sorts of internal Phusion Passenger helper scripts, e.g. the one used by PassengerPreStart. Please see PassengerRuby for more information, as well as how it relates to PassengerRuby.

This option may occur in the global server configuration. The default value is ruby, meaning that the Ruby interpreter will be looked up according to the PATH environment variable.

8.3. Deployment options

8.3.1. PassengerEnabled <on|off>

You can set this option to off to completely disable Phusion Passenger for a certain location. This is useful if, for example, you want to integrate a PHP application into the same virtual host as a Rails application.

Suppose that you have a Rails application in /apps/foo. Suppose that you’ve dropped Wordpress — a blogging application written in PHP — in /apps/foo/public/wordpress. You can then configure Phusion Passenger as follows:

<VirtualHost *:80>
    ServerName www.foo.com
    DocumentRoot /apps/foo/public
    <Directory /apps/foo/public/wordpress>
        PassengerEnabled off
        AllowOverride all      # <-- Makes Wordpress's .htaccess file work.
    </Directory>
</VirtualHost>

This way, Phusion Passenger will not interfere with Wordpress.

PassengerEnabled may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess.

In each place, it may be specified at most once. The default value is on.

8.3.2. PassengerRuby <filename>

The PassengerDefaultRuby and PassengerRuby directives specify the Ruby interpreter to use. Similarly, the PassengerPython and PassengerNodejs directives are for specifying the Python interpreter and the Node.js command, respectively.

The relationship between PassengerDefaultRuby and PassengerRuby is as follows:

  • PassengerDefaultRuby may only occur in the global server configuration.

  • PassengerRuby may occur everywhere: in the global server configuration, in <VirtualHost>, in <Directory>, in <Location>, and in .htaccess if AllowOverride Options is on.

  • You don’t have to specify PassengerRuby. In this case PassengerDefaultRuby is used as the Ruby interpreter. But if you do specify PassengerRuby then it will override PassengerDefaultRuby in that context. This allows you to use PassengerRuby to specify a different Ruby interpreter on a per-application basis.

Phusion Passenger not only uses Ruby to run web apps, but also for running certain helper tools that are written in Ruby, e.g. the internal helper script used by PassengerPreStart. These tools are always run using PassengerDefaultRuby, never by PassengerRuby. PassengerRuby is only used for running web apps. You can learn more about the internal helper scripts in Phusion Passenger and its relationship with Ruby.

It is okay if PassengerDefaultRuby refers to a different Ruby interpreter than the one you originally installed Phusion Passenger with. This too is explained in Phusion Passenger and its relationship with Ruby.

The reason why PassengerDefaultRuby exists at all is because limitations in the Apache API prevents us from implementing the same behavior using only the PassengerRuby directive.

There is no PassengerDefaultPython etc because there are no Phusion Passenger tools written in Python. As such, having PassengerPython is enough.

The following example illustrates how it works and how you can use these options to specify different interpreters for different web apps.

# Use Ruby 1.8.7 by default.
PassengerDefaultRuby /usr/bin/ruby1.8
# Use Python 2.6 by default.
PassengerPython /usr/bin/python2.6
# Use /usr/bin/node by default.
PassengerNodejs /usr/bin/node;

<VirtualHost *:80>
    # This Rails web app will use Ruby 1.8.7
    ServerName www.foo.com
    DocumentRoot /webapps/foo/public
</VirtualHost>

<VirtualHost *:80>
    # This Rails web app will use Ruby 1.9.3, as installed by RVM
    PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3/ruby
    ServerName www.bar.com
    DocumentRoot /webapps/bar/public

    # If you have a web app deployed in a sub-URI, customize
    # PassengerRuby/PassengerPython inside a <Location> block.
    # The web app under www.bar.com/blog will use JRuby 1.7.1
    Alias /blog /websites/blog/public
    <Location /blog>
        PassengerBaseURI /blog
        PassengerAppRoot /websites/blog

        PassengerRuby /usr/local/rvm/wrappers/jruby-1.7.1/ruby
    </Location>
    <Directory /websites/blog/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    # This Flask web app will use Python 3.0
    PassengerPython /usr/bin/python3.0
    ServerName www.baz.com
    DocumentRoot /webapps/baz/public
</VirtualHost>
RVM helper tool

Phusion Passenger provides the passenger-config --ruby-command tool for figuring out the correct command for invoking a specific Ruby interpreter. This is especially useful for RVM users. Suppose that you have both Ruby 1.8.7 and Ruby 1.9.3 installed through RVM, and you want to know the correct commands for each Ruby interpreter.

For this purpose we’ll want to invoke passenger-config using its full path, because each time you rvm use a different Ruby interpreter, RVM changes $PATH. If you did not install Phusion Passenger through the generic tarball installation method, then here’s how you can figure out where passenger-config is:

$ which passenger-config
/opt/passenger/bin/passenger-config

Now, switch to all the RVM Ruby interpreters you want to use. In each interpreter, invoke passenger-config --ruby-command. For Ruby 1.8.7:

$ rvm use 1.8.7
$ /opt/passenger/bin/passenger-config --ruby-command
passenger-config was invoked through the following Ruby interpreter:
  Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
  Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start


## Notes for RVM users
Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.

Then, for Ruby 1.9.3:

$ rvm use 1.9.3
$ /opt/passenger/bin/passenger-config --ruby-command
passenger-config was invoked through the following Ruby interpreter:
  Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
  Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start


## Notes for RVM users
Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.

8.3.3. PassengerPython <filename>

Introduced in version 4.0.0.

This option allows one to specify the Python interpreter to use. See PassengerRuby for more information. The default value is python, meaning that the Python interpreter will be looked up according to the PATH environment variable.

8.3.4. PassengerNodejs <filename>

Introduced in version 4.0.24.

This option allows one to specify the Node.js command to use. See PassengerRuby for more information. The default value is node, meaning that the Node.js command will be looked up according to the PATH environment variable.

8.3.5. PassengerAppEnv <string>

This option sets the value of the following environment variables:

  • RAILS_ENV

  • RACK_ENV

  • WSGI_ENV

  • NODE_ENV

  • PASSENGER_APP_ENV

Some web frameworks, for example Rails and Connect.js, adjust their behavior according to the value in one of these environment variables.

Phusion Passenger for Apache sets the default value to production. If you’re developing an Rails application then you should set this to development.

If you want to set other environment variables, please refer to Setting environment variables for Phusion Passenger-served apps.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Options is on.

In each place, it may be specified at most once.

8.3.6. RailsEnv <string>

An alias for PassengerAppEnv.

8.3.7. RackEnv <string>

An alias for PassengerAppEnv.

8.3.8. PassengerAppRoot <path/to/root>

By default, Phusion Passenger assumes that the application’s root directory is the parent directory of the public directory. This option allows one to specify the application’s root independently from the DocumentRoot, which is useful if the public directory lives in a non-standard place.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Options is on.

In each place, it may be specified at most once.

Example:

<VirtualHost test.host>
    DocumentRoot /var/rails/zena/sites/example.com/public
    PassengerAppRoot /var/rails/zena   # <-- normally Phusion Passenger would
                                       #     have assumed that the application
                                       #     root is "/var/rails/zena/sites/example.com"
</VirtualHost>

8.3.9. PassengerBaseURI <uri>

Used to specify that the given URI is a Phusion Passenger-served application. Please refer to the following sections for examples:

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Options is on.

8.3.10. PassengerRestartDir <directory>

As described in the deployment chapters of this document, Phusion Passenger checks the file tmp/restart.txt in the applications' root directory for restarting applications. Sometimes it may be desirable for Phusion Passenger to look in a different directory instead, for example for security reasons (see below). This option allows you to customize the directory in which restart.txt is searched for.

You may specify PassengerRestartDir in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverrides Options is enabled.

In each place, it may be specified at most once.

You can either set it to an absolute directory, or to a directory relative to the application root. Examples:

<VirtualHost *:80>
    ServerName www.foo.com
    # Phusion Passenger will check for /apps/foo/public/tmp/restart.txt
    DocumentRoot /apps/foo/public
</VirtualHost>

<VirtualHost *:80>
    ServerName www.bar.com
    DocumentRoot /apps/bar/public
    # An absolute filename is given; Phusion Passenger will
    # check for /restart_files/bar/restart.txt
    PassengerRestartDir /restart_files/bar
</VirtualHost>

<VirtualHost *:80>
    ServerName www.baz.com
    DocumentRoot /apps/baz/public
    # A relative filename is given; Phusion Passenger will
    # check for /apps/baz/restart_files/restart.txt
    #
    # Note that this directory is relative to the APPLICATION ROOT, *not*
    # the value of DocumentRoot!
    PassengerRestartDir restart_files
</VirtualHost>
What are the security reasons for wanting to customize PassengerRestartDir?

Touching restart.txt will cause Phusion Passenger to restart the application. So anybody who can touch restart.txt can effectively cause a Denial-of-Service attack by touching restart.txt over and over. If your web server or one of your web applications has the permission to touch restart.txt, and one of them has a security flaw which allows an attacker to touch restart.txt, then that will allow the attacker to cause a Denial-of-Service.

You can prevent this from happening by pointing PassengerRestartDir to a directory that’s readable by Apache, but only writable by administrators.

8.3.11. PassengerRollingRestarts <on|off>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

Enables or disables support for rolling restarts through restart.txt. Normally when you restart an application by touching restart.txt, Phusion Passenger would shut down all application processes and spawn a new one. The spawning of a new application process could take a while, and any requests that come in during this time will be blocked until this first application process has spawned.

But when rolling restarts are enabled, Phusion Passenger Enterprise will:

  1. Spawn a new process in the background.

  2. When it’s done spawning, Phusion Passenger Enterprise will replace one of the old processes with this newly spawned one.

  3. Step 1 and 2 are repeated until all processes have been replaced.

This way, visitors will not experience any delays when you are restarting your application. This allows you to, for example, upgrade your application often without degrading user experience.

Rolling restarts have a few caveat however that you should be aware of:

  • Upgrading an application sometimes involves upgrading the database schema. With rolling restarts, there may be a point in time during which processes belonging to the previous version and processes belonging to the new version both exist at the same time. Any database schema upgrades you perform must therefore be backwards-compatible with the old application version.

  • Because there’s no telling which process will serve a request, users may not see changes brought about by the new version until all processes have been restarted. It is for this reason that you should not use rolling restarts in development, only in production.

If Passenger Enterprise could not rolling restart a process (let’s call it A) because it is unable to spawn a new process (let’s call it B), then Passenger Enterprise will give up trying to rolling restart that particular process A. What happens next depends on whether deployment error resistance is enabled:

  • If deployment error resistance is disabled (the default), then Passenger Enterprise will proceed with trying to restart the remaining processes.

  • If deployment error resistance is enabled, the Passenger Enterprise will give up rolling restarting immediately. The application group will be put into Deployment Error Resistance Mode.

Please note that PassengerRollingRestarts is completely unrelated to the passenger-config restart-app command. That command always initiates a blocking restart, unless --rolling-restart is given.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Options is on.

In each place, it may be specified at most once. The default value is off.

8.3.12. PassengerResistDeploymentErrors <on|off>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

Enables or disables resistance against deployment errors.

Suppose you’ve upgraded your application and you’ve issues a command to restart it (by touching restart.txt), but the application code contains an error that prevents Phusion Passenger from successfully spawning a process (e.g. a syntax error). Phusion Passenger would normally display an error message in response to this.

By enabling deployment error resistance, Phusion Passenger Enterprise would instead do this:

  • It passes the request to one of the existing application processes (that belong to the previous version of the application). The visitor will not see a Phusion Passenger process spawning error message.

  • It logs the error to the global web server error log file.

  • It sets an internal flag (Deployment Error Resistance Mode) so that no processes for this application will be spawned (even when the current traffic would normally result in more processes being spawned) and no processes will be idle cleaned. Processes could still be shutdown because of other events, e.g. because their memory limit have been reached. You can see whether the flag is set by invoking passenger-status. If you see the message "Resisting deployment error" then the flag is set.

This way, visitors will suffer minimally from deployment errors. Phusion Passenger will attempt to restart the application again next time restart.txt is touched.

Enabling deployment error resistance only works if rolling restart is also enabled.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Options is on.

In each place, it may be specified at most once. The default value is off.

8.4. Process spawning options

8.4.1. PassengerSpawnMethod <string>

Tip
"What spawn method should I use?"

This subsection attempts to describe spawn methods, but it’s okay if you don’t (want to) understand it, as it’s mostly a technical detail. You can basically follow this rule of thumb:

If your application works on Mongrel or Thin, but not on Phusion Passenger, then set PassengerSpawnMethod to direct. Otherwise, leave it at smart (the default).

However, we do recommend you to try to understand it. The smart spawn method bring many benefits.

Internally, Phusion Passenger spawns multiple Ruby application processes in order to handle requests. But there are multiple ways with which processes can be spawned, each having its own set of pros and cons. Supported spawn methods are:

smart

This spawning method caches code using the app preloader. Framework code is not cached between multiple applications, although it is cached within instances of the same application. Please read Spawning methods explained for a more detailed explanation of what smart spawning exactly does.

Pros: Smart spawning caches code where possible to speed up the respawn process and is compatible with most applications

Cons: It is possible that it may be incompatible with some applications

direct

This spawning method is similar to the one used in Mongrel Cluster. It does not perform any code caching at all. Please read Spawning methods explained for a more detailed explanation of what direct spawning exactly does.

Pros: Direct spawning is guaranteed to be compatible with all applications and libraries.

Cons: Much slower than smart spawning. Every spawn action will be equally slow, though no slower than the startup time of a single server in Mongrel Cluster. Direct spawning will also render Ruby Enterprise Edition’s memory reduction technology useless.

As of Phusion Passenger 4.0, conservative spawning was renamed to direct and smart-lv2 was renamed to smart. The old smart spawning has been removed in favor of the new version.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

In each place, it may be specified at most once. The default value is smart.

8.4.2. PassengerLoadShellEnvvars <on|off>

Introduced in version 4.0.20.

Enables or disables the loading of shell environment variables before spawning the application.

If this option is turned on, and the user’s shell is bash, then applications are loaded by running them with bash -l -c. Otherwise, they are loaded by running them directly from the PassengerHelperAgent process.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Options is on.

In each place, it may be specified at most once. The default value is on.

8.5. Security options

8.5.1. PassengerUserSwitching <on|off>

Whether to enable user switching support.

This option may only occur once, in the global server configuration. The default value is on.

8.5.2. PassengerUser <username>

If user switching support is enabled, then Phusion Passenger will by default run the web application as the owner of the file config/environment.rb (for Rails apps) or config.ru (for Rack apps). This option allows you to override that behavior and explicitly set a user to run the web application as, regardless of the ownership of environment.rb/config.ru.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

In each place, it may be specified at most once.

8.5.3. PassengerGroup <group name>

If user switching support is enabled, then Phusion Passenger will by default run the web application as the primary group of the owner of the file config/environment.rb (for Rails apps) or config.ru (for Rack apps). This option allows you to override that behavior and explicitly set a group to run the web application as, regardless of the ownership of environment.rb/config.ru.

<group name> may also be set to the special value !STARTUP_FILE!, in which case the web application’s group will be set to environment.rb/config.ru's group.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

In each place, it may be specified at most once.

8.5.4. PassengerDefaultUser <username>

Phusion Passenger enables user switching support by default. This configuration option allows one to specify the user that applications must run as, if user switching fails or is disabled.

This option may only occur once, in the global server configuration. The default value is nobody.

8.5.5. PassengerDefaultGroup <group name>

Phusion Passenger enables user switching support by default. This configuration option allows one to specify the group that applications must run as, if user switching fails or is disabled.

This option may only occur once, in the global server configuration. The default value is the primary group of the user specifified by PassengerDefaultUser.

8.5.6. PassengerFriendlyErrorPages <on|off>

Phusion Passenger can display friendly error pages whenever an application fails to start. This friendly error page presents the startup error message, some suggestions for solving the problem, and a backtrace. This feature is very useful during application development and useful for less experienced system administrators, but the page might reveal potentially sensitive information, depending on the application. Experienced system administrators who are using Phusion Passenger on serious production servers should consider turning this feature off.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Options is on.

In each place, it may be specified at most once. The default value is on.

8.6. Resource control and optimization options

8.6.1. PassengerMaxPoolSize <integer>

The maximum number of application processes that may simultaneously exist. A larger number results in higher memory usage, but improves the ability to handle concurrent HTTP requests.

The optimal value depends on your system’s hardware and your workload. You can learn more at the Phusion article Tuning Phusion Passenger’s concurrency settings.

If you find that your server is running out of memory then you should lower this value.

This option may only occur once, in the global server configuration. The default value is 6.

8.6.2. PassengerMinInstances <integer>

This specifies the minimum number of application processes that should exist for a given application. You should set this option to a non-zero value if you want to avoid potentially long startup times after a website has been idle for an extended period.

Please note that this option does not pre-start application processes during Apache startup. It just makes sure that when the application is first accessed:

  1. at least the given number of processes will be spawned.

  2. the given number of processes will be kept around even when processes are being idle cleaned (see PassengerPoolIdleTime).

If you want to pre-start application processes during Apache startup, then you should use the PassengerPreStart directive, possibly in combination with PassengerMinInstances. This behavior might seem counter-intuitive at first sight, but PassengerPreStart explains the rationale behind it.

For example, suppose that you have the following configuration:

PassengerMaxPoolSize 15
PassengerPoolIdleTime 10

<VirtualHost *:80>
    ServerName foobar.com
    DocumentRoot /webapps/foobar/public
    PassengerMinInstances 3
</VirtualHost>

When you start Apache, there are 0 application processes for foobar.com. Things will stay that way until someone visits foobar.com. Suppose that there is only 1 visitor. 1 application process will be started immediately to serve the visitor, while 2 will be spawned in the background. After 10 seconds, when the idle timeout has been reached, these 3 application processes will not be cleaned up.

Now suppose that there’s a sudden spike of traffic, and 100 users visit foobar.com simultanously. Phusion Passenger will start 12 more application processes. After the idle timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application processes, keeping 3 processes around.

The PassengerMinInstances option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Limits is on.

In each place, it may be specified at most once. The default value is 1.

8.6.3. PassengerMaxInstances <integer>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

The maximum number of application processes that may simultaneously exist for an application. This helps to make sure that a single application will not occupy all available slots in the application pool.

This value must be less than PassengerMaxPoolSize. A value of 0 means that there is no limit placed on the number of processes a single application may spawn, i.e. only the global limit of PassengerMaxPoolSize will be enforced.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

In each place, it may be specified at most once. The default value is 0.

Tip
Practical usage example

Suppose that you’re hosting two web applications on your server, a personal blog and an e-commerce website. You’ve set PassengerMaxPoolSize to 10. The e-commerce website is more important to you. You can then set PassengerMaxInstances to 3 for your blog, so that it will never spawn more than 3 processes, even if it suddenly gets a lot of traffic. Your e-commerce website on the other hand will be free to spawn up to 10 processes if it gets a lot of traffic.

8.6.4. PassengerMaxInstancesPerApp <integer>

The maximum number of application processes that may simultaneously exist for a single application. This helps to make sure that a single application will not occupy all available slots in the application pool.

This value must be less than PassengerMaxPoolSize. A value of 0 means that there is no limit placed on the number of processes a single application may use, i.e. only the global limit of PassengerMaxPoolSize will be enforced.

This option may only occur once, in the global server configuration. The default value is 0.

Tip
Practical usage example

Suppose that you’re hosting two blogs (blog A and B) on your server, and that you’ve set PassengerMaxPoolSize to 10. Under normal circumstances, if blog A suddenly gets a lot of traffic, then A will use all 10 pool slots. If blog B suddenly gets some traffic, then it will only be able to use 1 pool slot (forcefully releasing 1 slot from A) until A’s traffic has settled down and it has released more pool slots.

If you consider both blogs equally important, then you can set PassengerMaxInstancesPerApp to 5. This way, both blogs will never use more than 5 pool slots.

Note
Relation with PassengerMaxInstances

Unlike PassengerMaxInstances, this configuration option is global and applies to all applications. PassengerMaxInstances on the other hand is per-virtual host.

Suppose that you’re hosting two web applications on your server, a personal blog and an e-commerce website. You’ve set PassengerMaxPoolSize to 10. The e-commerce website is more important to you. You can then set PassengerMaxInstances to 3 for your blog, so that it will never use more than 3 pool slots, even if it suddenly gets a lot of traffic. Your e-commerce website on the other hand will be free to use up all 10 slots if it gets a lot of traffic.

In summary, PassengerMaxInstancesPerApp divides the pool equally among the different web applications, while PassengerMaxInstances allows one to divide the pool unequally, according to each web application’s relative importance.

8.6.5. PassengerPoolIdleTime <integer>

The maximum number of seconds that an application process may be idle. That is, if an application process hasn’t received any traffic after the given number of seconds, then it will be shutdown in order to conserve memory.

Decreasing this value means that applications will have to be spawned more often. Since spawning is a relatively slow operation, some visitors may notice a small delay when they visit your Rails/Rack website. However, it will also free up resources used by applications more quickly.

The optimal value depends on the average time that a visitor spends on a single Rails/Rack web page. We recommend a value of 2 * x, where x is the average number of seconds that a visitor spends on a single Rails/Rack web page. But your mileage may vary.

When this value is set to 0, application processes will not be shutdown unless it’s really necessary, i.e. when Phusion Passenger is out of application processes for a given application and one of the inactive application processes needs to make place for another application process. Setting the value to 0 is recommended if you’re on a non-shared host that’s only running a few applications, each which must be available at all times.

This option may only occur once, in the global server configuration. The default value is 300.

8.6.6. PassengerMaxPreloaderIdleTime <integer>

The ApplicationSpawner server (explained in Spawning methods explained) has an idle timeout, just like the backend processes spawned by Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done anything for a given period.

This option allows you to set the ApplicationSpawner server’s idle timeout, in seconds. A value of 0 means that it should never idle timeout.

Setting a higher value will mean that the ApplicationSpawner server is kept around longer, which may slightly increase memory usage. But as long as the ApplicationSpawner server is running, the time to spawn a Ruby on Rails backend process only takes about 10% of the time that is normally needed, assuming that you’re using the smart or smart-lv2 spawning method. So if your system has enough memory, is it recommended that you set this option to a high value or to 0.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

In each place, it may be specified at most once. The default value is 300 (5 minutes).

8.6.7. PassengerStartTimeout <seconds>

Introduced in version 4.0.15.

Specifies a timeout for the startup of application processes. If an application process fails to start within the timeout period then it will be forcefully killed with SIGKILL, and the error will be logged.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Limits is on.

In each place, it may be specified at most once. The default value is 90.

8.6.8. PassengerConcurrencyModel <process|thread>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 4.0.0. Buy Phusion Passenger Enterprise here.

Specifies the I/O concurrency model that should be used for application processes. Phusion Passenger supports two concurrency models:

  • process - single-threaded, multi-processed I/O concurrency. Each application process only has a single thread and can only handle 1 request at a time. This is the concurrency model that Ruby applications traditionally used. It has excellent compatiblity (can work with applications that are not designed to be thread-safe) but is unsuitable for workloads in which the application has to wait for a lot of external I/O (e.g. HTTP API calls), and uses more memory because each process has a large memory overhead.

  • thread - multi-threaded, multi-processed I/O concurrency. Each application process has multiple threads (customizable via PassengerThreadCount). This model provides much better I/O concurrency and uses less memory because threads share memory with each other within the same process. However, using this model may cause compatibility problems if the application is not designed to be thread-safe.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess.

In each place, it may be specified at most once. The default value is process.

8.6.9. PassengerThreadCount <number>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 4.0.0. Buy Phusion Passenger Enterprise here.

Specifies the number of threads that Phusion Passenger should spawn per application process. This option only has effect if PassengerConcurrencyModel is thread.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess.

In each place, it may be specified at most once. The default value is 1.

8.6.10. PassengerMaxRequests <integer>

The maximum number of requests an application process will process. After serving that many requests, the application process will be shut down and Phusion Passenger will restart it. A value of 0 means that there is no maximum: an application process will thus be shut down when its idle timeout has been reached.

This option is useful if your application is leaking memory. By shutting it down after a certain number of requests, all of its memory is guaranteed to be freed by the operating system.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Limits is on.

In each place, it may be specified at most once. The default value is 0.

Caution

The PassengerMaxRequests directive should be considered as a workaround for misbehaving applications. It is advised that you fix the problem in your application rather than relying on these directives as a measure to avoid memory leaks.

8.6.11. PassengerMaxRequestTime <seconds>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

The maximum amount of time, in seconds, that an application process may take to process a request. If the request takes longer than this amount of time, then the application process will be forcefully shut down, and possibly restarted upon the next request. A value of 0 means that there is no time limit.

This option is useful for preventing your application from freezing for an indefinite period of time.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Limits is on.

In each place, it may be specified at most once. The default value is 0.

Example

Suppose that most of your requests are known to finish within 2 seconds. However, there is one URI, /expensive_computation, which is known to take up to 10 seconds. You can then configure Phusion Passenger as follows:

<VirtualHost *:80>
    ServerName www.example.com
    DocumentRoot /webapps/my_app/public

    PassengerMaxRequestTime 2
    <Location /expensive_computation>
        PassengerMaxRequestTime 10
    </Location>
</VirtualHost>

If a request to /expensive_computation takes more than 10 seconds, or if a request to any other URI takes more than 2 seconds, then the corresponding application process will be forced to shutdown.

Caution

The PassengerMaxRequestTime directive should be considered as a workaround for misbehaving applications. It is advised that you fix the problem in your application rather than relying on these directives as a measure to avoid freezing applications.

8.6.12. PassengerMemoryLimit <integer>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

The maximum amount of memory that an application process may use, in megabytes. Once an application process has surpassed its memory limit, it will process all the requests currently present in its queue and then shut down. A value of 0 means that there is no maximum: the application’s memory usage will not be checked.

This option is useful if your application is leaking memory. By shutting it down, all of its memory is guaranteed to be freed by the operating system.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Limits is on.

In each place, it may be specified at most once. The default value is 0.

Note
A word about permissions

The PassengerMemoryLimit directive uses ps command to query memory usage information. On Linux, it further queries /proc to obtain additional memory usage information that’s not obtainable through ps. You should ensure that the ps works correctly and that the /proc filesystem is accessible by the PassengerHelperAgent process.

Caution

The PassengerMaxRequests and PassengerMemoryLimit directives should be considered as workarounds for misbehaving applications. It is advised that you fix the problem in your application rather than relying on these directives as a measure to avoid memory leaks.

8.6.13. PassengerStatThrottleRate <integer>

By default, Phusion Passenger performs several filesystem checks (or, in programmers jargon, stat() calls) each time a request is processed:

  • It checks whether config/environment.rb, config.ru or passenger_wsgi.py is present, in order to autodetect Rails, Rack and WSGI applications.

  • It checks whether restart.txt has changed or whether always_restart.txt exists, in order to determine whether the application should be restarted.

On some systems where disk I/O is expensive, e.g. systems where the harddisk is already being heavily loaded, or systems where applications are stored on NFS shares, these filesystem checks can incur a lot of overhead.

You can decrease or almost entirely eliminate this overhead by setting PassengerStatThrottleRate. Setting this option to a value of x means that the above list of filesystem checks will be performed at most once every x seconds. Setting it to a value of 0 means that no throttling will take place, or in other words, that the above list of filesystem checks will be performed on every request.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Limits is on.

In each place, it may be specified at most once. The default value is 0.

8.6.14. PassengerPreStart <url>

By default, Phusion Passenger does not start any application processes until said web application is first accessed. The result is that the first visitor of said web application might experience a small delay as Phusion Passenger is starting the web application on demand. If that is undesirable, then this directive can be used to pre-started application processes during Apache startup.

A few things to be careful of:

  • This directive accepts the URL of the web application you want to pre-start, not a on/off value! This might seem a bit weird, but read on for rationale. As for the specifics of the URL:

    • The domain part of the URL must be equal to the value of the ServerName directive of the VirtualHost block that defines the web application.

    • Unless the web application is deployed on port 80, the URL should contain the web application’s port number too.

    • The path part of the URL must point to some URI that the web application handles.

  • You will probably want to combine this option with PassengerMinInstances because application processes started with PassengerPreStart are subject to the usual idle timeout rules. See the example below for an explanation.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

In each place, it may be specified any number of times.

Example 1: basic usage

Suppose that you have the following web applications.

<VirtualHost *:80>
   ServerName foo.com
   DocumentRoot /webapps/foo/public
</VirtualHost>

<VirtualHost *:3500>
   ServerName bar.com
   DocumentRoot /webapps/bar/public
</VirtualHost>

You want both of them to be pre-started during Apache startup. The URL for foo.com is http://foo.com/ (or, equivalently, http://foo.com:80/) and the URL for bar.com is http://bar.com:3500/. So we add two PassengerPreStart directives, like this:

<VirtualHost *:80>
   ServerName foo.com
   DocumentRoot /webapps/foo/public
</VirtualHost>

<VirtualHost *:3500>
   ServerName bar.com
   DocumentRoot /webapps/bar/public
</VirtualHost>

PassengerPreStart http://foo.com/           # <--- added
PassengerPreStart http://bar.com:3500/      # <--- added
Example 2: pre-starting apps that are deployed in sub-URIs

Suppose that you have a web application deployed in a sub-URI /store, like this:

<VirtualHost *:80>
   ServerName myblog.com
   DocumentRoot /webapps/wordpress

   Alias /store /websites/store/public
    <Location /store>
        PassengerBaseURI /store
        PassengerAppRoot /websites/store
    </Location>
    <Directory /websites/store/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

Then specify the domain name of its containing virtual host followed by the sub-URI, like this:

<VirtualHost *:80>
   ServerName myblog.com
   DocumentRoot /webapps/wordpress

   Alias /store /websites/store/public
    <Location /store>
        PassengerBaseURI /store
        PassengerAppRoot /websites/store
    </Location>
    <Directory /websites/store/public>
        Allow from all
        Options -MultiViews
    </Directory>
</VirtualHost>

PassengerPreStart http://myblog.com/store    # <----- added

The sub-URI must be included; if you don’t then the directive will have no effect. The following example is wrong and won’t pre-start the store web application:

PassengerPreStart http://myblog.com/    # <----- WRONG! Missing "/store" part.
Example 3: combining with PassengerMinInstances

Application processes started with PassengerPreStart are also subject to the idle timeout rules as specified by PassengerPoolIdleTime! That means that by default, the pre-started application processes for foo.com are bar.com are shut down after a few minutes of inactivity. If you don’t want that to happen, then you should combine PassengerPreStart with PassengerMinInstances, like this:

<VirtualHost *:80>
   ServerName foo.com
   DocumentRoot /webapps/foo/public
   # Added!
   PassengerMinInstances 1
</VirtualHost>

<VirtualHost *:3500>
   ServerName bar.com
   DocumentRoot /webapps/bar/public
   # Added!
   PassengerMinInstances 1
</VirtualHost>

PassengerPreStart http://foo.com/
PassengerPreStart http://bar.com:3500/
So why a URL? Why not just an on/off flag?

A directive that accepts a simple on/off flag is definitely more intuitive, but due technical difficulties w.r.t. the way Apache works, it’s very hard to implement it like that:

  • It is very hard to obtain a full list of web applications defined in the Apache configuration file(s). In other words, it’s hard for Phusion Passenger to know which web applications are deployed on Apache until a web application is first accessed, and without such a list Phusion Passenger wouldn’t know which web applications to pre-start. It’s probably not completely impossible to obtain such a list, but this brings us to the following point;

  • Users expect things like mod_env to work even in combination with Phusion Passenger. For example some people put “SetEnv PATH=
.” in their virtual host block and they expect the web application to pick that environment variable up when it’s started. Information like this is stored in module-specific locations that Phusion Passenger cannot access directly. Even if the previous bullet point is solved and we can obtain a list of web applications, we cannot start the application with the correct mod_env information. mod_env is just one such example; there are probably many other Apache modules, all of which people expect to work, but we cannot answer to those expectations if PassengerPreStart is implemented as a simple on/off flag.

So as a compromise, we made it accept a URL. This is easier to implement for us and altough it looks weird, it behaves consistently w.r.t. cooperation with other Apache modules.

What does Phusion Passenger do with the URL?

During Apache startup, Phusion Passenger will send a dummy HEAD request to the given URL and discard the result. In other words, Phusion Passenger simulates a web access at the given URL. However this simulated request is always sent to localhost, not to the IP that the domain resolves to. Suppose that bar.com in example 1 resolves to 209.85.227.99; Phusion Passenger will send the following HTTP request to 127.0.0.1 port 3500 (and not to 209.85.227.99 port 3500):

HEAD / HTTP/1.1
Host: bar.com
Connection: close

Similarly, for example 2, Phusion Passenger will send the following HTTP request to 127.0.0.1 port 80:

HEAD /store HTTP/1.1
Host: myblog.com
Connection: close
Do I need to edit /etc/hosts and point the domain in the URL to 127.0.0.1?

No. See previous subsection.

My web application consists of multiple web servers. What URL do I need to specify, and in which web server’s Apache config file?

Put the web application’s virtual host’s ServerName value and the virtual host’s port in the URL, and put PassengerPreStart on all machines that you want to pre-start the web application on. The simulated web request is always sent to 127.0.0.1, with the domain name in the URL as value for the Host HTTP header, so you don’t need to worry about the request ending up at a different web server in the cluster.

Does PassengerPreStart support https:// URLs?

Yes. And it does not perform any certificate validation.

8.6.15. PassengerHighPerformance <on|off>

By default, Phusion Passenger is compatible with mod_rewrite and most other Apache modules. However, a lot of effort is required in order to be compatible. If you turn PassengerHighPerformance to on, then Phusion Passenger will be a little faster, in return for reduced compatibility with other Apache modules.

In places where PassengerHighPerformance is turned on, mod_rewrite rules will likely not work. mod_autoindex (the module which displays a directory index) will also not work. Other Apache modules may or may not work, depending on what they exactly do. We recommend you to find out how other modules behave in high performance mode via testing.

This option is not an all-or-nothing global option: you can enable high performance mode for certain virtual hosts or certain URLs only. The PassengerHighPerformance option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess.

In each place, it may be specified at most once. The default value is off, so high performance mode is disabled by default, and you have to explicitly enable it.

When to enable high performance mode?

If you do not use mod_rewrite or other Apache modules then it might make sense to enable high performance mode.

It’s likely that some of your applications depend on mod_rewrite or other Apache modules, while some do not. In that case you can enable high performance for only those applications that don’t use other Apache modules. For example:

<VirtualHost *:80>
    ServerName www.foo.com
    DocumentRoot /apps/foo/public
    .... mod_rewrite rules or options for other Apache modules here ...
</VirtualHost>

<VirtualHost *:80>
    ServerName www.bar.com
    DocumentRoot /apps/bar/public
    PassengerHighPerformance on
</VirtualHost>

In the above example, high performance mode is only enabled for www.bar.com. It is disabled for everything else.

If your application generally depends on mod_rewrite or other Apache modules, but a certain URL that’s accessed often doesn’t depend on those other modules, then you can enable high performance mode for a certain URL only. For example:

<VirtualHost *:80>
    ServerName www.foo.com
    DocumentRoot /apps/foo/public
    .... mod_rewrite rules or options for other Apache modules here ...

    <Location /chatroom/ajax_update_poll>
        PassengerHighPerformance on
    </Location>
</VirtualHost>

This enables high performance mode for http://www.foo.com/chatroom/ajax_update_poll only.

8.7. Connection handling options

8.7.1. PassengerBufferUpload <on|off>

Introduced in version 4.0.26.

When turned on, HTTP request uploads (HTTP POST request bodies) will be buffered before sending the request to the application. Enabling upload buffering protects the application from slow clients, but will also prevent the ability to track upload progress.

If you want to allow your application to track upload progress, it is recommended that you disable upload buffering for specific URIs only. For example:

# Disable upload buffering for /upload_video only.
<Location /upload_video>
    PassengerBufferUpload off
</Location>

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess.

In each place, it may be specified at most once. The default value is on.

8.7.2. PassengerBufferResponse <on|off>

When turned on, application-generated responses are buffered by Apache. Buffering will happen in memory.

Before we proceed with explaining this configuration option, we want to state the following to avoid confusion. If you use Phusion Passenger for Apache, there are in fact two response buffering systems active:

  1. The Apache response buffering system. PassengerBufferResponse turns this on or off.

  2. The Phusion Passenger response buffering system, a.k.a. real-time disk-backed response buffering. This buffering system is always on, regardless of the value of PassengerBufferResponse.

Response buffering is useful because it protects against slow HTTP clients that do not read responses immediately or quickly enough. Buffering prevents such slow clients from blocking web applications that have limited concurrency. Because Phusion Passenger’s response buffering is always turned on, you are always protected. Therefore, PassengerBufferResponse is off by default, and you never should have to turn it on.

If for whatever reason you want to turn Apache-level response buffering on, you can do so with this option.

Apache’s response buffering works differently from Phusion Passenger’s. Apache’s buffering system buffers the entire response before attempting to send it to the client, while Phusion Passenger’s attempts to send the data to the client immediately. Therefore, if you turn on PassengerBufferResponse, you may interfere with applications that want to stream responses to the client. Apache’s version also buffers to memory only, making it problematic for large responses. Phusion Passenger’s version buffers to disk when the response exceeds a certain threshold.

How does response buffering - whether it’s done by Apache or by Phusion Passenger - exactly protect against slow clients? Consider an HTTP client that’s on a dial-up modem link, and your application process generates a 2 MB response. If the response is buffered then your application process will be blocked until the entire 2 MB has been sent out to the HTTP client. This disallows your application process to do any useful work in the mean time. By buffering responses, Phusion Passenger or Apache will read the application response as quickly as possible and will take care of forwarding the data to slow clients.

So keep in mind that enabling passenger_buffering_response will make streaming responses impossible. Consider for example this piece of Rails code:

render :text => lambda { |response, output|
    10.times do |i|
        output.write("entry #{i}\n")
        output.flush
        sleep 1
    end
}


or this piece of Rack code:

class Response
    def each
        10.times do |i|
            yield("entry #{i}\n")
            sleep 1
        end
    end
end

app = lambda do |env|
    [200, { "Content-Type" => "text/plain" }, Response.new]
end

When PassengerBufferResponse is turned on, Apache will wait until the application is done sending the entire response before forwarding it to the client. The client will not receive anything for 10 seconds, after which it receives the entire response at once. When PassengerBufferResponse is turned off, it works as expected: the client receives an "entry X" message every second for 10 seconds.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess.

In each place, it may be specified at most once. The default value is off.

Note

The PassengerBufferResponse directive should be turned off if responses can be huge. Because entire responses are buffered in memory when turned on.

8.7.3. PassengerErrorOverride <on|off>

Introduced in version 4.0.24.

Decides whether Apache will intercept and handle responses with HTTP status codes of 400 and higher. This directive is useful where you want to have a common look and feel on the error pages seen by the end user. This also allows for included files (via mod_include’s SSI) to get the error code and act accordingly (default behavior would display the error page of the proxied server, turning this on shows the SSI Error message).

This directive does not affect the processing of informational (1xx), normal success (2xx), or redirect (3xx) responses.

By default, all responses are sent as-is from the application or from the Phusion Passenger core. If you turn this option on then Apache will be able to handle such responses using the Apache ErrorDocument option.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess.

In each place, it may be specified at most once. The default value is off.

8.7.4. PassengerMaxRequestQueueSize <number>

Introduced in version 4.0.15.

When all application processes are already handling their maximum number of concurrent requests, Phusion Passenger will queue all incoming requests. This option specifies the maximum size for that queue. If the queue is already at this specified limit, then Phusion Passenger will immediately send a "503 Service Unavailable" error to any incoming requests.

A value of 0 means that the queue is unbounded.

This article on StackOverflow explains how the request queue works, what it means for the queue to grow or become full, why that is bad, and what you can do about it.

You may combine this option with PassengerErrorOverride and ErrorDocument to set a custom error page whenever the queue is full. In the following example, Apache will serve /error503.html whenever the queue is full:

PassengerErrorOverride on
ErrorDocument 504 /error504.html

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess.

In each place, it may be specified at most once. The default value is 100.

8.8. Compatibility options

8.8.1. PassengerResolveSymlinksInDocumentRoot <on|off>

Configures whether Phusion Passenger should resolve symlinks in the document root. Please refer to How Phusion Passenger detects whether a virtual host is a web application for more information.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Options is on.

In each place, it may be specified at most once. It is off by default.

8.8.2. PassengerAllowEncodedSlashes <on|off>

By default, Apache doesn’t support URLs with encoded slashes (%2f), e.g. URLs like this: /users/fujikura%2fyuu. If you access such an URL then Apache will return a 404 Not Found error. This can be solved by turning on PassengerAllowEncodedSlashes as well as Apache’s AllowEncodedSlashes.

Is it important that you turn on both AllowEncodedSlashes and PassengerAllowEncodedSlashes, otherwise this feature will not work properly.

PassengerAllowEncodedSlashes may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Options is on.

In each place, it may be specified at most once. It is off by default.

Please note however that turning on support for encoded slashes will break support for mod_rewrite passthrough rules. Because of bugs/limitations in Apache, Phusion Passenger can support either encoded slashes or mod_rewrite passthrough rules, but not both at the same time. Luckily this option can be specified anywhere, so you can enable it only for virtual hosts or URLs that need it:

<VirtualHost *:80>
    ServerName www.example.com
    DocumentRoot /webapps/example/public
    AllowEncodedSlashes on
    RewriteEngine on

    # Check for maintenance file and redirect all requests
    RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
    RewriteCond %{SCRIPT_FILENAME} !maintenance.html
    RewriteRule ^.*$ /system/maintenance.html [L]

    # Make /about an alias for /info/about.
    RewriteRule ^/about$ /info/about [PT,L]

    <Location ~ "^/users/">
        # In a location block so that it doesn't interfere with the
        # above /about mod_rewrite rule.
        PassengerAllowEncodedSlashes on
    </Location>
</VirtualHost>

With this, http://www.example.com/users/fujikura%2fyuu will work properly, and accessing http://www.example.com/about will properly display the result of http://www.example.com/info/about. Notice that PassengerAllowEncodedSlashes only interferes with passthrough rules, not with any other mod_rewrite rules. The rules for displaying maintenance.html will work fine even for URLs starting with "/users".

8.9. Logging and debugging options

8.9.1. PassengerLogLevel <integer>

This option allows one to specify how much information Phusion Passenger should write to the Apache error log file. A higher log level value means that more information will be logged.

Possible values are:

  • 0: Show only errors and warnings.

  • 1: Show the most important debugging information. This might be useful for system administrators who are trying to figure out the cause of a problem.

  • 2: Show more debugging information. This is typically only useful for developers.

  • 3: Show even more debugging information.

This option may only occur once, in the global server configuration. The default is 0.

8.9.2. PassengerDebugLogFile <filename>

By default Phusion Passenger debugging and error messages are written to the global web server error log. This option allows one to specify the file that debugging and error messages should be written to instead.

This option may only occur once, in the global server configuration.

8.9.3. PassengerDebugger <on|off>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

Turns support for application debugging on or off. In case of Ruby applications, turning this option on will cause them to load the ruby-debug gem (when on Ruby 1.8), the debugger gem (when on Ruby 1.9) or the byebug gem (when on Ruby 2.0). If you’re using Bundler, you should add this to your Gemfile:

gem 'ruby-debug', :platforms => :ruby_18
gem 'debugger', :platforms => :ruby_19
gem 'byebug', :platforms => :ruby_20

Once debugging is turned on, you can use the command passenger-irb --debug <PID> to attach an rdebug console to the application process with the given PID. Attaching will succeed once the application process executes a debugger command.

This option may occur in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverride Options is on.

In each place, it may be specified at most once. The default value is off.

8.10. Advanced options

8.10.1. PassengerTempDir <directory>

Specifies the directory that Phusion Passenger should use for storing temporary files. This includes things such as Unix socket files, buffered file uploads (see also PassengerUploadBufferDir), etc.

This option may be specified once, in the global server configuration. The default temp directory that Phusion Passenger uses is /tmp.

This option is especially useful if Apache is not allowed to write to /tmp (which is the case on some systems with strict SELinux policies) or if the partition that /tmp lives on doesn’t have enough disk space.

Command line tools

Some Phusion Passenger command line administration tools, such as passenger-status, must know what Phusion Passenger’s temp directory is in order to function properly. You can pass the directory through the PASSENGER_TMPDIR environment variable, or the TMPDIR environment variable (the former will be used if both are specified).

For example, if you set PassengerTempDir to /my_temp_dir, then invoke passenger-status after you’ve set the PASSENGER_TMPDIR or TMPDIR environment variable, like this:

export PASSENGER_TMPDIR=/my_temp-dir
sudo -E passenger-status
# The -E option tells 'sudo' to preserve environment variables.

8.10.2. PassengerUploadBufferDir <directory>

Phusion Passenger buffers large file uploads to disk in order prevent slow file uploads from blocking web applications. By default, a subdirectory in the system’s temporary files directory (or a subdirectory in the directory specified in PassengerTempDir, if set) is automatically created for storing these buffered file uploads.

This configuration directive allows you to specify a different directory for storing buffered file uploads. If you’ve specified such a directory (as opposed to using Phusion Passenger’s default) then you must ensure that this directory exists.

This configuration directive is also useful if you’re using apache2-mpm-itk. The buffered file upload directory that Phusion Passenger creates by default has very strict permissions: it can only be accessed by the Apache worker processes. However, Phusion Passenger assumes that all Apache worker processes are running as the same user. apache2-mpm-itk breaks this assumption by running multiple Apache worker processes as different users. So if you’re using apace2-mpm-itk, you should set this option to a directory that is writable by all Apache worker processes, such as /tmp.

You may specify PassengerUploadBufferDir in the following places:

  • In the global server configuration.

  • In a virtual host configuration block.

  • In a <Directory> or <Location> block.

  • In .htaccess, if AllowOverrides Options is enabled.

In each place, it may be specified at most once.

8.11. Deprecated or removed options

The following options have been deprecated, but are still supported for backwards compatibility reasons.

8.11.1. RailsRuby

Deprecated in favor of PassengerRuby.

8.11.2. RailsBaseURI and RackBaseURI

Deprecated in favor of PassengerBaseURI.

8.11.3. RailsUserSwitching

Deprecated in favor of PassengerUserSwitching.

8.11.4. RailsDefaultUser

Deprecated in favor of PassengerDefaultUser.

8.11.5. RailsAllowModRewrite

This option doesn’t do anything anymore in recent versions of Phusion Passenger.

8.11.6. RailsSpawnMethod

Deprecated in favor of PassengerSpawnMethod.

8.11.7. RailsAutoDetect, RackAutoDetect and WsgiAutoDetect

These options have been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead.

8.11.8. RailsAppSpawnerIdleTime

This option has been removed in version 4.0.0, and replaced with PassengerMaxPreloaderIdleTime.

8.11.9. RailsFrameworkSpawnerIdleTime

This option is no longer available in version 4.0.0. There is no alternative because framework spawning has been removed altogether. You should use smart spawning instead.

9. Troubleshooting

9.1. Generic troubleshooting tips

One of the first things you should do upon encountering a problem, is to check the global (not the per-vhost) Apache error log file. This is typically located in /var/log/apache2/error_log. You can find out the exact location of the error log by running passenger-config --detect-apache2. This log file contains:

  • Phusion Passenger error messages.

  • Everything that the application writes to STDERR. This typically consists of errors that the application encounters during startup, but not errors that it encounters when it’s handling requests.

If you’re using Ruby on Rails, then you should also check out log/development.log and log/production.log. When an error occurs during request handling, it is typically logged here. This file does not contain errors that Rails encounters during startup.

Finally, you should be aware that Phusion Passenger runs your application under the production environment by default, not development. You can change this using the RailsEnv option.

If neither the logs nor this troubleshooting guide can help you, then please check out our support resources.

9.2. Why does the first request take a long time?

Symptoms

The first request to your application takes more time than usual. Subsequent requests have the normal speed.

Cause

Phusion Passenger starts your application the first time it is accessed, not during web server startup. Some applications can take several seconds to start. If you’re using Ruby on Rails, then needing 10 seconds to start your application is normal. On slow or heavily loaded servers, or in case of large and heavy applications, the startup time may be even longer.

Solution

Use the PassengerPreStart configuration option.

9.3. OS X: The installer cannot locate MAMP’s Apache

Symptoms

The installer finds Apache 2 development headers at /Applications/MAMP/Library/bin/apxs. However, Apache cannot be found. The installer also outputs the following error:

cannot open /Applications/MAMP/Library/build/config_vars.mk:
No such file or directory at /Applications/MAMP/Library/bin/apxs line 218.
Cause

Your MAMP installation seems to be broken. In particular, config_vars.mk is missing.

Solution

Please read this forum topic to learn how to fix this problem. See also this bug report.

9.4. Apache reports a "403 Forbidden" error

See next subsection.

9.5. Static assets such as images and stylesheets aren’t being displayed

Static assets are accelerated, i.e. they are served directly by Apache and do not go through the Rails stack. There are two reasons why Apache doesn’t serve static assets correctly:

  1. Your Apache configuration is too strict, and does not allow HTTP clients to access static assets. This can be achieved with an Allow from all directive in the correct place. For example:

    <Directory "/webapps/mycook/public">
       Options FollowSymLinks
       AllowOverride None
       Order allow,deny
       Allow from all
    </Directory>

    See also this discussion.

  2. The Apache process doesn’t have permission to access your Rails application’s folder. Please make sure that the Rails application’s folder, as well as all of its parent folders, have the correct permissions and/or ownerships.

9.6. The Apache error log says that the spawn manager script does not exist, or that it does not have permission to execute it

If you are sure that the PassengerRoot configuration option is set correctly, then this problem is most likely caused by the fact that you’re running Apache with SELinux. On Fedora, CentOS and RedHat Enterprise Linux, Apache is locked down by SELinux policies.

To solve this problem, you must set some permissions on the Phusion Passenger files and folders, so that Apache can access them.

  • If you’ve installed Phusion Passenger via a gem, then run this command to determine Phusion Passenger’s root folder:

    passenger-config --root

    Next, run the following command:

    chcon -R -h -t httpd_sys_content_t /path-to-passenger-root

    where /path-to-passenger-root should be replaced with whatever passenger-config --root printed.

  • If you’ve installed Phusion Passenger via the source tarball, then run the following command:

    chcon -R -h -t httpd_sys_content_t /path/to/passenger/folder

Once the permissions are fixed, restart Apache.

9.7. The application thinks its not on SSL even though it is

Rails and many other frameworks infers whether it’s running on SSL through the CGI environment variable HTTPS. Apache always sets this variable when on SSL, except when SSL is incorrectly configured.

Most Apache installations already configure SSL by default on port 443 (conf/extra/httpd-ssl.conf). Some people think they can save some typing in subsequent SSL vhost blocks, and omit important options like SSLEngine on, like this:

# httpd-ssl.conf contains something like:
# <VirtualHost _default_:443>
#     SSLEngine on
#     ...
# </VirtualHost>
Include conf/extra/httpd-ssl.conf

<VirtualHost *:443>
    ServerName www.example.com
    DocumentRoot /webapps/example/public
</Virtualhost>

This is wrong! In each SSL vhost block you must re-specify all the SSL options. Otherwise Apache won’t properly detect the vhost as an SSL vhost block. Here’s the corrected example:

Include conf/extra/httpd-ssl.conf

<VirtualHost *:443>
    ServerName www.example.com
    DocumentRoot /webapps/example/public
    SSLEngine on
    ...more SSL options here...
</Virtualhost>

9.8. Ruby on Rails-specific troubleshooting

9.8.1. The "About your application’s environment" link does not work

The "About your application’s environment" link only works if the application is started in the development environment. Phusion Passenger starts the application in the production environment by default. Please use RailsEnv to change it.

9.8.2. The Rails application reports that it’s unable to start because of a permission error

Please check whether your Rails application’s folder has the correct permissions. By default, Rails applications are started as the owner of the file config.ru, except if the file is owned by root. If the file is owned by root, then the Rails application will be started as nobody (or as the user specify by RailsDefaultUser, if that’s specified).

Please read User switching (security) for details.

9.8.3. The Rails application’s log file is not being written to

There are a couple things that you should be aware of:

  • By default, Phusion Passenger runs Rails applications in production mode, so please be sure to check production.log instead of development.log.

    See RailsEnv for configuration. - By default, Phusion Passenger runs Rails applications as the owner of config.ru. So the log file can only be written to if that user has write permission to the log file. Please chmod or chown your log file accordingly.

    See User switching (security) for details.

If you’re using a RedHat-derived Linux distribution (such as Fedora or CentOS) then it is possible that SELinux is interfering. RedHat’s SELinux policy only allows Apache to read/write directories that have the httpd_sys_content_t security context. Please run the following command to give your Rails application folder that context:

chcon -R -h -t httpd_sys_content_t /path/to/your/rails/app

9.9. Conflicting Apache modules

9.9.1. mod_userdir

mod_userdir is not compatible with Phusion Passenger at the moment.

9.9.2. MultiViews (mod_negotiation)

MultiViews is not compatible with Phusion Passenger. You should disable MultiViews for all Phusion Passenger hosts.

9.9.3. VirtualDocumentRoot

VirtualDocumentRoot is not compatible with Phusion Passenger at the moment.

10. Analysis and system maintenance

Phusion Passenger provides a set of tools, which are useful for system analysis, maintenance and troubleshooting.

10.1. Inspecting memory usage

Process inspection tools such as ps and top are useful, but they rarely show the correct memory usage. The real memory usage is usually lower than what ps and top report.

There are many technical reasons why this is so, but an explanation is beyond the scope of this Users Guide. We kindly refer the interested reader to operating systems literature about virtual memory and copy-on-write.

The tool passenger-memory-stats allows one to easily analyze Phusion Passenger’s and the web server’s real memory usage. For example:

[bash@localhost root]# passenger-memory-stats
------------- Apache processes --------------.
PID    PPID  Threads  VMSize   Private  Name
---------------------------------------------.
5947   1     9        90.6 MB  0.5 MB   /usr/sbin/apache2 -k start
5948   5947  1        18.9 MB  0.7 MB   /usr/sbin/fcgi-pm -k start
6029   5947  1        42.7 MB  0.5 MB   /usr/sbin/apache2 -k start
6030   5947  1        42.7 MB  0.5 MB   /usr/sbin/apache2 -k start
6031   5947  1        42.5 MB  0.3 MB   /usr/sbin/apache2 -k start
6033   5947  1        42.5 MB  0.4 MB   /usr/sbin/apache2 -k start
6034   5947  1        50.5 MB  0.4 MB   /usr/sbin/apache2 -k start
23482  5947  1        82.6 MB  0.4 MB   /usr/sbin/apache2 -k start
### Processes: 8
### Total private dirty RSS: 3.50 MB

----------- Nginx processes ------------.
PID    PPID   VMSize     Resident  Name
----------------------------------------.
51766  51764  82.7 MB    3.9 MB    nginx: master process ./objs/nginx
51773  51766  82.9 MB    0.9 MB    nginx: worker process

--------- Passenger processes ---------.
PID    Threads  VMSize   Private  Name
---------------------------------------.
6026   1        10.9 MB  4.7 MB   Passenger spawn server
23481  1        26.7 MB  3.0 MB   Passenger FrameworkSpawner: 2.0.2
23791  1        26.8 MB  2.9 MB   Passenger ApplicationSpawner: /var/www/projects/app1-foobar
23793  1        26.9 MB  17.1 MB  Rails: /var/www/projects/app1-foobar
### Processes: 4
### Total private dirty RSS: 27.76 M

The Private or private dirty RSS field shows the real memory usage of processes. Here, we see that all the Apache and Nginx worker processes only take less than 1 MB memory each. This is a lot less than the 50-80 MB-ish memory usage as shown in the VMSize column (which is what a lot of people think is the real memory usage, but is actually not).

Note Private dirty RSS reporting only works on Linux. Unfortunately other operating systems don’t provide facilities for determining processes' private dirty RSS. On non-Linux systems, the Resident Set Size is reported instead.

10.2. Inspecting Phusion Passenger’s internal status

One can inspect Phusion Passenger’s internal status with the tool passenger-status. This tool must typically be run as root. For example:

[bash@localhost root]# passenger-status
----------- General information -----------
max      = 6
count    = 1
active   = 0
inactive = 1

----------- Domains -----------
/var/www/projects/app1-foobar:
  PID: 9617      Sessions: 0    Processed: 7       Uptime: 2m 23s

The general information section shows the following information:

max

The maximum number of application instances that Phusion Passenger will spawn. This equals the value given for PassengerMaxPoolSize (Apache) or passenger_max_pool_size (Nginx).

count

The number of application instances that are currently alive. This value is always less than or equal to max.

active

The number of application instances that are currently processing requests. This value is always less than or equal to count.

inactive

The number of application instances that are currently not processing requests, i.e. are idle. Idle application instances will be shutdown after a while, as can be specified with PassengerPoolIdleTime (Apache)/passenger_pool_idle_time (Nginx) (unless this value is set to 0, in which case application instances are never shut down via idle time). The value of inactive equals count - active.

The domains section shows, for each application directory, information about running application instances:

Sessions

Shows how many HTTP client are currently in the queue of that application Instance, waiting to be processed.

Processed

Indicates how many requests the instance has served until now. Tip: it’s possible to limit this number with the PassengerMaxRequests configuration directive.

Uptime

Shows for how long the application instance has been running.

Since Phusion Passenger uses fair load balancing by default, the number of sessions for the application instances should be fairly close to each other. For example, this is fairly normal:

  PID: 4281      Sessions: 2      Processed: 7      Uptime: 5m 11s
  PID: 4268      Sessions: 0      Processed: 5      Uptime: 4m 52s
  PID: 4265      Sessions: 1      Processed: 6      Uptime: 5m 38s
  PID: 4275      Sessions: 1      Processed: 7      Uptime: 3m 14s

But if you see a "spike", i.e. an application instance has an unusually high number of sessions compared to the others, then there might be a problem:

  PID: 4281      Sessions: 2      Processed: 7      Uptime: 5m 11s
  PID: 17468     Sessions: 8 <-+  Processed: 2      Uptime: 4m 47s
  PID: 4265      Sessions: 1   |  Processed: 6      Uptime: 5m 38s
  PID: 4275      Sessions: 1   |  Processed: 7      Uptime: 3m 14s
                               |
                               +---- "spike"

The most likely reason why a spike occurs is because your application is frozen, i.e. it has stopped responding. See Debugging frozen applications for tips.

10.3. Debugging frozen applications

If one of your application instances is frozen (stopped responding), then you can figure out where it is frozen by killing it with SIGABRT. This will cause the application to raise an exception, with a backtrace.

The exception (with full backtrace information) is normally logged into the web server error log. But if your application or if its web framework has its own exception logging routines, then exceptions might be logged into the application’s log files instead. This is the case with Ruby on Rails. So if you kill a Ruby on Rails application with SIGABRT, please check the application’s production.log first (assuming that you’re running it in a production environment). If you don’t see a backtrace there, check the web server error log.

Note It is safe to kill application instances, even in live environments. Phusion Passenger will restart killed application instances, as if nothing bad happened.

10.4. Accessing individual application processes

When a request is sent to the web server, Phusion Passenger will automatically forward the request to the most suitable application process, but sometimes it is desirable to be able to directly access the individual application processes. Use cases include, but are not limited to:

  • One wants to debug a memory leak or memory bloat problem that only seems to appear on certain URIs. One can send a request to a specific process to see whether that request causes the process’s memory usage to rise.

  • The application caches data in local memory, and one wants to tell a specific application process to clear that local data.

  • Other debugging use cases.

All individual application processes are accessible via HTTP, so you can use standard HTTP tools like curl. The exact addresses can be obtained with the command passenger-status --verbose. These sockets are all bound to 127.0.0.1, but the port number is dynamically assigned. As a security measure, the sockets are also protected with a process-specific random password, which you can see in the passenger-status --verbose output. This password must be sent through the “X-Passenger-Connect-Password” HTTP header.

Example:

bash# passenger-status --verbose
----------- General information -----------
max      = 6
count    = 2
active   = 0
inactive = 2
Waiting on global queue: 0

----------- Application groups -----------
/Users/hongli/Sites/rack.test:
  App root: /Users/hongli/Sites/rack.test
  * PID: 24235   Sessions: 0    Processed: 7       Uptime: 17s
      URL     : http://127.0.0.1:58122
      Password: nFfVOX1F8LjZ90HJh28Sd_htJOsgRsNne2QXKf8NIXw
  * PID: 24250   Sessions: 0    Processed: 4       Uptime: 1s
      URL     : http://127.0.0.1:57933
      Password: _RGXlQ9EGDGJKLevQ_qflUtF1KmxEo2UiRzMwIE1sBY

Here we see that the web application rack.test has two processes. Process 24235 is accessible via http://127.0.0.1:58122, and process 24250 is accessible via http://127.0.0.1:57933.

To access 24235 we must send its password, nFfVOX1F8LjZ90HJh28Sd_htJOsgRsNne2QXKf8NIXw, through the X-Passenger-Connect-Password HTTP header, like this:

bash# curl -H "X-Passenger-Connect-Password: nFfVOX1F8LjZ90HJh28Sd_htJOsgRsNne2QXKf8NIXw" http://127.0.0.1:58122/

10.5. Attaching an IRB console to an application process

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

You can attach an IRB console to any application process and inspect its state by executing arbitrary Ruby code. Do this by invoking passenger-irb <PID> where <PID> is the PID of the application process you wish to inspect. Note that the IRB console is currently only available for Ruby apps, not for apps in any other languages.

11. Tips

11.1. User Switching (security feature)

Phusion Passenger supports automatic user switching: by default, it attempts to run applications as the "right" user, instead of running all applications as the same user.

To better understand the problem, let us consider the situation with PHP. There is a problem that plagues most PHP web hosts, namely the fact that all PHP applications are run in the same user context as the web server. So for example, Joe’s PHP application will be able to read Jane’s PHP application’s passwords. This is obviously undesirable on many servers.

Phusion Passenger’s user switching feature solves this problem. Applications are run as the owner of their "startup file". For Ruby apps, the startup file is config.ru (Rack and Rails >= 3) or config/environment.rb (Rails 1 and 2). For Python apps, the startup file is passenger_wsgi.py. So suppose that config.ru is owned by user joe, then Phusion Passenger will spawn the corresponding application as joe as well. The exact rules are a little bit more complicated, and they’re explained further down in this section.

11.1.1. Requirements

User switching is only enabled when all of the following conditions are met:

  • When not using Flying Passenger (this is probably the case):

    • The PassengerUserSwitching option must be enabled.

    • The web server’s control process must have root privileges. This is the case on most installations.

  • When using Flying Passenger:

    • The Flying Passenger daemon must be run with root privileges.

11.1.2. Effects

When not using Flying Passenger, the following table illustrates the effect for different combinations of the requirements.

PassengerUserSwitching on

PassengerUserSwitching off

Web server has root privileges

User switching enabled.

User switching disabled. Apps are run as PassengerDefaultUser and PassengerDefaultGroup.

Web server has no root privileges

User switching disabled. Apps are run as the web server’s user.

User switching disabled. Apps are run as the web server’s user.

When using Flying Passenger, the effect is as follows:

Daemon run with root privileges

User switching enabled.

Daemon run without root privileges

User switching disabled. Apps are run as the daemon’s user.

When user switching is enabled, the following rules are followed to determine what user an application should be run as. The first matching rule is the rule that will be followed.

  1. If PassengerUser or PassengerGroup are set, then the application will be run as the specified user/group. Thus, these options are a good way to override user switching settings.

  2. If the startup file is owned by root or an unknown user, then the application will run as the user specified by PassengerDefaultUser and PassengerDefaultGroup.

  3. Otherwise, the application is run as the owner of the startup file.

11.1.3. Caveats & troubleshooting

If your application regularly encounters permission errors or fails to find certain files, then this is an indication that your application is started as a user that you did not intent it to be run as. Other symptoms include:

  • The application fails to start because Bundler complains that it cannot find gems. This probably indicates that Bundler does not have read access to the directory that contains Bundler-installed gems.

  • The application fails to start and its error message mentions the path /nonexistent. This probably indicates that your application is started as the nobody user. This is because on many systems, the nobody user’s home directory is /nonexistent.

To check whether it is indeed the case that your application is started as a different user than you intended to, see Finding out what user an application is running as.

The most likely reason why your application is started as nobody is probably because your startup file is owned by root, by nobody or by an unknown user. To fix this, change the owner of the startup file to the owner that you want to run the application as.

Whatever user your application runs as, it must have read access to the application root, and read/write access to the application’s logs directory.

11.1.4. Finding out what user an application is running as

To find our what user an application is started as, first access its URL in your browser so that Phusion Passenger starts the application. For example:

http://www.example.local/

The application will now either successfully start or fail to start. If it fails to start then you will see an error page that tells you what user the application was being started as. If you do not see the error page in the browser then set PassengerFriendlyErrorPages on.

If the application successfully started, then run passenger-status to find the process’s PID:

.---------- General information -----------
Max pool size : 6
Processes     : 1
Requests in top-level queue : 0

.---------- Application groups -----------
/webapps/example.local#default:
  App root: /webapps/example.local
  Requests in queue: 0
  * PID: 16915   Sessions: 0       Processed: 1       Uptime: 2s
    CPU: 0%      Memory  : 9M      Last used: 2s ago

In the above example we see that the PID is 16915. Next, use ps to find out the user that it is running as:

# ps -o pid,user,comm -p 16915
  PID USER    COMM
16915 phusion Passenger RackApp: /webapps/example.local

As you can see, the application in this example is being run as user phusion.

11.2. Copy-on-write memory support (reducing memory consumption of Ruby applications)

Phusion Passenger automatically leverages operating system virtual memory copy-on-write features in order to reduce the memory usage of Ruby applications. Experience has shown that this reduces memory usage by 33% on average. For this mechanism to work, a Ruby interpreter with a copy-on-write friendly garbage collector is required. The following Ruby interpreters have copy-on-write friendly garbage collectors:

  • MRI Ruby >= 2.0. Versions prior to 2.0 did not have a copy-on-write friendly garbage collector.

  • Ruby Enterprise Edition, which was Phusion’s branch of MRI Ruby 1.8 with a copy-on-write friendly garbage collector and other enhancement. It has reached End-Of-Life as of 2012, but remains available for legacy systems.

11.3. Capistrano recipe

Phusion Passenger can be combined with Capistrano. The following Capistrano recipe demonstrates Phusion Passenger support. It assumes that you’re using Git as version control system.

set :application, "myapp"
set :domain,      "example.com"
set :repository,  "ssh://#{domain}/path-to-your-git-repo/#{application}.git"
set :use_sudo,    false
set :deploy_to,   "/path-to-your-web-app-directory/#{application}"
set :scm,         "git"

role :app, domain
role :web, domain
role :db,  domain, :primary => true

namespace :deploy do
  task :start, :roles => :app do
    run "touch #{current_release}/tmp/restart.txt"
  end

  task :stop, :roles => :app do
    # Do nothing.
  end

  desc "Restart Application"
  task :restart, :roles => :app do
    run "touch #{current_release}/tmp/restart.txt"
  end
end

11.4. Bundler support

Phusion Passenger has automatic support for Bundler. The support consists of loading your application under the environment defined by your Gemfile. In other words, Phusion Passenger loads your application as if bundle exec was used.

The Bundler support works as follows:

  • If you have a .bundle/environment.rb in your application root, then Phusion Passenger will require that file before loading your application.

  • Otherwise, if you have a Gemfile, then Phusion Passenger will automatically call Bundler.setup() before loading your application.

It’s possible that your application also calls Bundler.setup during loading, e.g. in config.ru or in config/boot.rb. This is the case with Rails 3, and is also the case if you modified your config/boot.rb according to the Bundler Rails 2.3 instructions. This leads to Bundler.setup being called twice, once before the application startup file is required and once during application startup. However this is harmless and doesn’t have any negative effects.

Phusion Passenger assumes that you’re using Bundler >= 0.9.5. If you don’t want Phusion Passenger to run its Bundler support code, e.g. because you need to use an older version of Bundler with an incompatible API or because you use a system other than Bundler, then you can override Phusion Passenger’s Bundler support code by creating an empty file config/setup_load_paths.rb. If this file exists then it will be required before loading the application startup file. In this file you can do whatever you need to setup Bundler or a similar system.

11.4.1. Does Phusion Passenger itself need to be added to the Gemfile?

It is never necessary to add Phusion Passenger to the application’s Gemfile. In case of Phusion Passenger Standalone, it is not necessary to execute the passenger command through bundle exec. The reason for this is because Phusion Passenger automatically loads the Gemfile environment. Most other Ruby application servers do not automatically load the Gemfile environment, which is why they must be added to the Gemfile and be executed with bundle exec.

Even when your application uses any of the Phusion Passenger APIs, you still do not need to add Phusion Passenger to the Gemfile. The only thing you need to do is to put Phusion Passenger API calls inside if blocks that check whether Phusion Passenger is active, by checking whether the PhusionPassenger namespace is defined:

if defined?(PhusionPassenger)
    ...
end

11.5. Installing multiple Ruby on Rails versions

Each Ruby on Rails applications that are going to be deployed may require a specific Ruby on Rails version. You can install a specific version with this command:

gem install rails -v X.X.X

where X.X.X is the version number of Ruby on Rails.

All of these versions will exist in parallel, and will not conflict with each other. Phusion Passenger will automatically make use of the correct version.

11.6. Making the application restart after each request

In some situations it might be desirable to restart the web application after each request, for example when developing a non-Rails application that doesn’t support code reloading, or when developing a web framework.

To achieve this, simply create the file tmp/always_restart.txt in your application’s root folder. Unlike restart.txt, Phusion Passenger does not check for this file’s timestamp: Phusion Passenger will always restart the application, as long as always_restart.txt exists.

Note If you’re just developing a Rails application then you probably don’t need this feature. If you set RailsEnv development in your web server configuration, then Rails will automatically reload your application code after each request. always_restart.txt is mostly useful when you’re using a web framework that doesn’t support code reloading by itself, of when you’re working on a web framework yourself.

11.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments

Some people experience broken images and other broken static assets when they deploy their application to a sub-URI (i.e. http://mysite.com/railsapp/). The reason for this usually is that you used a static URI for your image in the views. This means your img source probably refers to something like /images/foo.jpg. The leading slash means that it’s an absolute URI: you’re telling the browser to always load http://mysite.com/images/foo.jpg no matter what. The problem is that the image is actually at http://mysite.com/railsapp/images/foo.jpg. There are two ways to fix this.

The first way (not recommended) is to change your view templates to refer to images/foo.jpg. This is a relative URI: note the lack of a leading slash). What this does is making the path relative to the current URI. The problem is that if you use restful URIs, then your images will probably break again when you add a level to the URI. For example, when you’re at http://mysite.com/railsapp the browser will look for http://mysite.com/railsapp/images/foo.jpg. But when you’re at http://mysite.com/railsapp/controller. the browser will look for http://mysite.com/railsapp/controller/images/foo.jpg. So relative URIs usually don’t work well with layout templates.

The second and highly recommended way is to always use Rails helper methods to output tags for static assets. These helper methods automatically take care of prepending the base URI that you’ve deployed the application to. For images there is image_tag, for JavaScript there is javascript_include_tag and for CSS there is stylesheet_link_tag. In the above example you would simply remove the <img> HTML tag and replace it with inline Ruby like this:

<%= image_tag("foo.jpg") %>

This will generate the proper image tag to $RAILS_ROOT/public/images/foo.jpg so that your images will always work no matter what sub-URI you’ve deployed to.

These helper methods are more valuable than you may think. For example they also append a timestamp to the URI to better facilitate HTTP caching. For more information, please refer to the Rails API docs.

11.8. Out-of-Band Work and Out-of-Band Garbage Collection

Available since Phusion Passenger 4.0.0.

At this time, this feature is only available on Ruby.

The Out-of-Band Work feature allows you to run arbitrary long-running tasks outside normal request cycles. This works by letting current requests to the process finish, then telling the process to perform the out-of-band work, then resuming passing requests to the process after said work is finished.

A specific (and perhaps primary) use case of of Out-of-Band Work is Out-of-Band Garbage Collection. The garbage collector is run outside normal request cycles so that garbage collection runs inside normal request cycles can finish a lot faster. This can potentially save tens to hundreds of milliseconds of latency in requests.

Because Out-of-Band Work is implemented at the Phusion Passenger inter-process request routing level, and not by, say, spawning a thread inside the application process, Out-of-Band Work has the following useful properties:

  • It works well even with tasks that can pause all threads. The MRI Ruby garbage collector is a stop-the-world mark-and-sweep garbage collector.

  • Phusion Passenger can spawn more processes as necessary, in order to prevent situations in which all application processes are busy performing out-of-band work. Phusion Passenger guarantees that there’s at least one process that’s ready to process requests.

  • Phusion Passenger guarantees that no more than 1 process is performing out-of-band work at the same time.

Applications can use Out-of-Band Work as follows:

  1. Ensure that PassengerMaxPoolSize and PassengerMinInstances are both larger than 1. Out-of-band work only works if there are at least 2 application processes.

  2. Request out-of-band work by outputting the X-Passenger-Request-OOB-Work header during a request. It does not matter what the value is. At this time, it is not possible to request out-of-band work from outside requests.

  3. You can actually perform out-of-band work when you receive a :oob_work Phusion Passenger event.

Note that even though you can request out-of-band work, there’s no guarantee that Phusion Passenger will send an oob_work event in a timely manner, if at all. It is also possible that Phusion Passenger sends an oob_work event without you ever having requested one. This latter could for example happen if the OOB work is administrator-initiated. Do not make any assumptions in your code.

Here’s an example which implements out-of-band garbage collection using the Out-of-Band framework. This example code doesn’t do anything when the code is not being run in Phusion Passenger, thanks to the if block.

# Somewhere in a controller method:
# Tell Phusion Passenger we want to perform OOB work.
response.headers["X-Passenger-Request-OOB-Work"] = "true"

# Somewhere during application initialization:
if defined?(PhusionPassenger)
    PhusionPassenger.on_event(:oob_work) do
        # Phusion Passenger has told us that we're ready to perform OOB work.
        t0 = Time.now
        GC.start
        Rails.logger.info "Out-Of-Bound GC finished in #{Time.now - t0} sec"
    end
end

For your convenience, Phusion Passenger provides a Rack middleware for out-of-band garbage collection. Add the following to your config.ru. Likewise, this example code doesn’t do anything when the code is not being run in Phusion Passenger, thanks to the if block.

if defined?(PhusionPassenger)
    PhusionPassenger.require_passenger_lib 'rack/out_of_band_gc'

    # Trigger out-of-band GC every 5 requests.
    use PhusionPassenger::Rack::OutOfBandGc, 5
end

It should be noted that, although the application uses the Phusion Passenger API, it is not necessary to add Phusion Passenger to the Gemfile.

References:

11.9. Hooks

Introduced in version 4.0.28.

Phusion Passenger provides a powerful but simple hooking system, which allows you to extend many aspects of Phusion Passenger’s behavior. The hooking system works by executing commands during certain events. Event parameters are passed to the command in the form of environment variables.

You can define hooks by setting the configuration option PassengerCtl hook_<HOOK NAME> <COMMAND TO EXECUTE>.

11.9.1. Example

The hook system is best demonstrated with a simple example. In the following example we will hook into the attached_process event. This event is called whenever Phusion Passenger has successfully spawned an application processes and added it to the process pool. We print the process’s PID and application root.

First, let’s create a script /home/phusion/attached.sh which is to be called during the hook.

#!/bin/sh
echo "Attached process $PASSENGER_PROCESS_PID for app $PASSENGER_APP_ROOT."

Then we make it executable:

chmod +x /home/phusion/attached.sh

And we define the hook in the configuration file:

PassengerCtl hook_attached_process /home/phusion/attached.sh

Now restart the web server and access a web app hosted by Phusion Passenger. You should see our message in the web server error log:

[ 2013-12-10 16:12:21.6456 28934/0x1064cb000 Hooks.h:129 ]: Running attached_process hook script: /home/phusion/attached.sh
Attached process 28303 for app /webapps/foobar.
[ 2013-12-10 16:12:21.6580 28934/0x1064cb000 Hooks.h:161 ]: Hook script /home/phusion/attached.sh (PID 28948) exited with status 0

11.9.2. Environment

A lot of information is passed to hook scripts in the form of environment variables. They are all uppercase and begin with PASSENGER_. Some environment variables are passed to all hook scripts, others are passed depending on the hook.

Here are some of the environment variables which are passed to all hooks, unless documented otherwise:

  • PASSENGER_VERSION

  • PASSENGER_PASSENGER_ROOT

  • PASSENGER_SERVER_INSTANCE_DIR

  • PASSENGER_GENERATION_PATH

11.9.3. Blocking and concurrency

All hooks block. That is, Phusion Passenger waits until your hook command is finished. You should therefore be careful when writing hook scripts: if your script never finishes, so Phusion Passenger does not do that either.

If you have a bug in your script and it blocks, then you will be able to see that using the command passenger-status --show=backtraces which prints the backtraces of all threads in the Phusion Passenger HelperAgent. Look for the runSingleHookScript function in the backtrace. The following example shows at line 2 that Phusion Passenger is waiting for the hook script /home/phusion/badscript.sh.

Thread 'Group process spawner: /home/phusion/webapp.test#default' (0x1062d4000):
     in 'bool Passenger::runSingleHookScript(Passenger::HookScriptOptions &, const string &, const vector<pair<string, string> > &)' (Hooks.h:116) -- /home/phusion/badscript.sh
     in 'bool Passenger::runHookScripts(Passenger::HookScriptOptions &)' (Hooks.h:159)
     in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr &, const Passenger::ApplicationPool2::Options &, unsigned int)' (Implementation.cpp:878)

Hooks may be called concurrently. For example, while the attached_process hook is being called, a detached_process hook may be called, perhaps even for the same application. It is your responsibility to ensure that your hook scripts are concurrency-safe, e.g. by employing locks and other concurrency control techniques.

11.9.4. Error handling

If a hook script fails — that is, if it exits with anything other than exit code 0 — then the error handling depends on the hook. Some hooks will abort, other hooks will ignore the error. In all cases, the result of the hook script is printed to the log.

11.9.5. Compatibility

Because hooks are inherently tied to the implementation of Phusion Passenger, there is no guarantee that hooks that currently work will continue to be available in the future versions of Phusion Passenger. The availability of hooks is very much tied to the specific version of Phusion Passenger.

11.9.6. Available hooks

before_watchdog_initialization

Called at the very beginning of Phusion Passenger’s life cycle, during the start of the Watchdog process. The first hook is called before initialization is performed (before the HelperAgent is started). Errors in the hook script cause Phusion Passenger to abort.

after_watchdog_initialization

Like before_watchdog_initialization, but called after initialization of all Phusion Passenger agent processes. Errors in the hook script cause Phusion Passenger to abort.

attached_process

Called when Phusion Passenger has successfully spawned an application processes and added it to the process pool. Extra environment variables: PASSENGER_PROCESS_PID, PASSENGER_APP_ROOT. Errors in the hook script are ignored.

detached_process

Called when Phusion Passenger has removed an application process from the process pool. This could happen when:

  • The process has crashed, and Phusion Passenger noticed it.

  • Phusion Passenger has shut down a process because it’s been idle for too long.

  • The administrator configured different resource limits, and Phusion Passenger is starting or shutting down processes in response.

  • Phusion Passenger itself is shutting down.

    Extra environment variables: PASSENGER_PROCESS_PID, PASSENGER_APP_ROOT. Errors in the hook script are ignored.

after_initialize_supergroup

Called right after Phusion Passenger has allocated data structures for an application, and is about to spawn a process for the first time for this application. Errors in the hook script are ignored. Extra environment variables: PASSENGER_APP_ROOT.

before_destroy_supergroup

Called right before Phusion Passenger decallocates data structures for an application. Errors in the hook script are ignored.

Note that the after_initialize_supergroup hook may be called while this hook is still being executed, so make sure that operations don’t conflict with each other.

Extra environment variables: PASSENGER_APP_ROOT.

11.10. Flying Passenger

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 4.0.6. Buy Phusion Passenger Enterprise here.

Flying Passenger allows one to decouple Phusion Passenger’s life time from the web server’s life time, so that the web server can be independently restarted from Phusion Passenger, and from any of the application processes served by Phusion Passenger.

Normally, Phusion Passenger starts together with the web server, and shuts down together with the web server. The advantages of this default behavior is that it makes Phusion Passenger easy to administer: one only has to deal with the web server process and can expect all relevant processes to be cleaned up after a web server shut down. However this also brings about a disadvantage: every time one restarts the web server (e.g. to make a minor configuration change), Phusion Passenger and all its application processes also get restarted.

This problem is solved by Flying Passenger, which is an advanced mode of operation in Phusion Passenger that allows the web server to be indepedently restarted from Phusion Passenger. When this mode is enabled:

  • One must start Phusion Passenger separately from the web server, namely by starting the Flying Passenger daemon. This daemon must - to an extent - be separately configured and managed from the web server.

  • The web server must be configured to forward requests to the Flying Passenger daemon.

  • You should beware of the caveats and limitations.

11.10.1. Requirements

At this time, this feature is only available in the Enterprise version of Phusion Passenger for Nginx. You must have Phusion Passenger for Nginx properly installed.

11.10.2. Basic usage

Start the Flying Passenger daemon by invoking the flying-passenger command. The only required option is --socket-file. Depending on whether you wish to enable User Switching, you have to start flying-passenger with root privileges or not.

$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock
I, [2013-06-14T09:10:13.095339 #77179]  INFO -- : Welcome to Flying Passenger 4.1.0
I, [2013-06-14T09:10:13.095339 #77179]  INFO -- : Starting PassengerWatchdog...
I, [2013-06-14T09:10:13.097036 #77179]  INFO -- : PassengerWatchdog started on PID 77181
...
I, [2013-06-14T09:10:13.129017 #77179]  INFO -- : PassengerWatchdog initialized properly
I, [2013-06-14T09:10:13.129127 #77179]  INFO -- : Flying Passenger up and listening on /var/run/flying-passenger.sock!

Now configure Phusion Passenger for Nginx to make use of the Flying Passenger daemon, by setting the passenger_fly_with option to the socket filename:

http {
    ...
    passenger_fly_with /var/run/flying-passenger.sock;
    ...
}

After (re)starting Nginx, Nginx + Flying Passenger is fully operational:

$ sudo /path-to/nginx

You can test it by adding a virtual host for a web app:

http {
    ...

    server {
        listen 80;
        server_name www.foo.local;
        root /webapps/foo/public;
        passenger_enabled on;
    }
}

Verify that it works by making an HTTP request to it:

$ curl http://www.foo.local/

Now let’s verify that restarting the web server does not restart the just-spawned application process. Run passenger-status to obtain the PID of the application process:

$ sudo passenger-status
Version: 4.1.0
Date   : 2013-06-14 09:21:51 -0400
.---------- General information -----------
Max pool size : 6
Processes     : 1
Requests in top-level queue : 0

.---------- Application groups -----------
/webapps/foo#default:
  App root: /webapps/foo
  Requests in queue: 0
  * PID: 77283   Sessions: 0       Processed: 1       Uptime: 2s
    CPU: 1%      Memory  : 8M      Last used: 2s ago

As you can see, the PID of the application process is 77283. Now let’s see what happens if we restart Nginx:

$ sudo /path-to/nginx -s stop
$ sudo /path-to/nginx
$ sudo passenger-status

The application process should remain there, unchanged:

$ sudo passenger-status
Version: 4.1.0
Date   : 2013-06-14 09:21:51 -0400
.---------- General information -----------
Max pool size : 6
Processes     : 1
Requests in top-level queue : 0

.---------- Application groups -----------
/webapps/foo#default:
  App root: /webapps/foo
  Requests in queue: 0
  * PID: 77283   Sessions: 0       Processed: 1       Uptime: 18s
    CPU: 1%      Memory  : 8M      Last used: 18s ago

11.10.3. Configuring Flying Passenger

Flying Passenger gets some configuration from the web server, but not all. In particular, most web server directives that are only valid in the http context, e.g. passenger_log_level, have no effect when using Flying Passenger. Instead, you are supposed to pass these configuration directives through command line options to the Flying Passenger daemon. Configuration directives that have no effect on Flying Passenger are documented as such. You can assume that configuration directives that are not documented as such, work fine on Flying Passenger.

For example, to achieve the same effect as setting passenger_log_level to 2, run the Flying Passenger daemon as follows:

$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock --log-level=2

Currently, not all configuration directives have a Flying Passenger equivalent. Run the following command to see an overview of available options:

$ flying-passenger --help

11.10.4. Managing the Flying Passenger daemon

The Flying Passenger daemon runs in the foreground by default. This is undesirable on server environments. You can make it go into the background by passing --daemonize, --log-file and --pid-file:

$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock \
    --daemonize --log-file=/var/log/flying-passenger.log \
    --pid-file=/var/run/flying-passenger.pid

You can shut down a Flying Passenger daemon by sending SIGINT or SIGTERM to it:

$ kill `cat /var/run/flying-passenger.pid`

We recommend using daemontools or runit for managing the Flying Passenger daemon. These tools will allow automatically starting the Flying Passenger daemon at boot, and will automatically restart the daemon if it crashes. You can create and enable a daemontools/runit service as folows:

$ sudo mkdir /etc/service/flying-passenger
$ sudo nano /etc/service/flying-passenger/run
#!/bin/sh
exec /path-to/flying-passenger \
    --socket-file=/var/run/flying-passenger.sock \
    --log-file=/var/log/flying-passenger.log \
    --pid-file=/var/run/flying-passenger.pid

Immediately after creating the run file, daemontools/runit automatically runs it to start the daemon. Note that the location (/etc/service) depends on the OS or Linux distros. Sometimes it’s /service. Also note that we start the Flying Passenger daemon without --daemonize.

To shut down a daemontools/runit-managed daemon, you need to use svc -d /etc/service/flying-passenger (daemontools) or sv stop /etc/service/flying-passenger (runit) instead of sending a signal to the process.

11.10.5. Using Flying Passenger with MRI 1.8 or JRuby

Using Flying Passenger in combination with MRI Ruby 1.8 or with JRuby requires special attention. This is because the Flying Passenger daemon is written in Ruby, and requires proper Process.spawn support, which neither MRI 1.8 nor JRuby support.

It is however possible to use Flying Passenger with MRI Ruby 1.8 and JRuby. You can’t run the Flying Passenger daemon in MRI 1.8 or JRuby, but you can still run the web applications - hosted under Flying Passenger - in MRI 1.8 or JRuby.

First, edit your Nginx configuration file and specify a Ruby interpreter for your web applications. For example:

# Connect to the Flying Passenger daemon on the following socket
passenger_fly_with /var/run/flying-passenger.sock;
...

server {
    listen 80;
    server_name www.foo.com;
    root /webapps/foo/public;
    passenger_enabled on;
    # Use JRuby for this web application
    passenger_ruby /opt/jruby/bin/jruby;
}

Then you need to install a Ruby 1.9-compatible Ruby interpeter with POSIX spawn support, alongside JRuby/MRI 1.8. Ruby interpreters which can be used for running the Flying Passenger daemon include:

  • MRI Ruby >= 1.9.

  • Rubinius.

The following example demonstrates how you can install MRI Ruby 1.9 in parallel with your MRI Ruby 1.8 or JRuby installation.

Example for Debian/Ubuntu users:

# Install Ruby 1.9
sudo apt-get install ruby1.9.3
# Run the Flying Passenger daemon in Ruby 1.9
ruby1.9 -S flying-passenger --socket-file=/var/run/flying-passenger.sock

Example for RVM users:

# Install Ruby 1.9
rvm install 1.9.3
# Run the Flying Passenger daemon in Ruby 1.9
$ rvm-exec 1.9.3 ruby -S flying-passenger --socket-file=/var/run/flying-passenger.sock

The Flying Passenger daemon will now be run on Ruby 1.9, while the web application www.foo.com will be run on JRuby.

11.10.6. Caveats and limitations

Beware of the following caveats and limitations when using Flying Passenger:

  • The Nginx executable must be compiled with the same version of Phusion Passenger as the Flying Passenger daemon. Failing to meet this requirement may result in cryptic errors, or may result in certain features not working, until you’ve fixed the situation. When upgrading Phusion Passenger, you must restart both Nginx and the Flying Passenger daemon.

  • The passenger_root directive has no effect. When using Flying Passenger, you are not supposed to set passenger_root.

  • The Flying Passenger daemon is written in Ruby. It requires a Ruby interpreter with proper Process#spawn support. At the time of writing, all Ruby interpreters in existance satisfy this requirement, except for MRI Ruby 1.8 and JRuby. See Using Flying Passenger with MRI 1.8 or JRuby for more information.

  • When you add a new application to the web server configuration, Flying Passenger will automatically pick up the application’s settings and spawn this new application upon the first request to it. However it is not capable of automatically starting the new app before a request has been sent to it (i.e. passenger_pre_start-like behavior is not available in this case). As a workaround, you can send an HTTP request to your application after starting the daemon, which forces it to spawn application processes.

  • When you remove an application from the web server configuration, Flying Passenger will not detect the removal and will not shut down the associated application processes. Killing the application processes will also not help, because Flying Passenger will restart them per the (now-removed, but still in the Flying Passenger daemon’s memory) passenger_min_instances settings. At the moment, there are two ways to get rid of those processes:

    • Before removing the application from the web server configuration, explicitly set its passenger_min_instances to 0. Next, send a request to it, which will cause the Flying Passenger daemon to take over the new passenger_min_instances 0 option. You can then proceed with removing the application from the web server configuration, and restarting the web server. Finally, kill the PIDs associated to those application processes and remove the application configuration.

    • Restart the Flying Passenger daemon.

11.11. X-Sendfile support

Phusion Passenger does not provide X-Sendfile support by itself. Please install mod_xsendfile for X-Sendfile support.

11.12. Upload progress

Phusion Passenger does not provide upload progress support by itself. Please try drogus’s Apache upload progress module instead.

12. Under the hood

Phusion Passenger hides a lot of complexity for the end user (i.e. the web server system administrator), but sometimes it is desirable to know what is going on. This section describes a few things that Phusion Passenger does under the hood.

12.1. Page caching support

For each HTTP request, Phusion Passenger will automatically look for a corresponding page cache file, and serve that if it exists. It does this by appending ".html" to the filename that the URI normally maps to, and checking whether that file exists. This check occurs after checking whether the original mapped filename exists (as part of static asset serving). All this is done without the need for special mod_rewrite rules.

For example, suppose that the browser requests /foo/bar.

  1. Phusion Passenger will first check whether this URI maps to a static file, i.e. whether the file foo/bar exists in the web application’s public directory. If it does then Phusion Passenger will serve this file through the web server immediately.

  2. If that doesn’t exist, then Phusion Passenger will check whether the file foo/bar.html exists. If it does then Phusion Passenger will serve this file through the web server immediately.

  3. If foo/bar.html doesn’t exist either, then Phusion Passenger will forward the request to the underlying web application.

Note that Phusion Passenger’s page caching support doesn’t work if your web application uses a non-standard page cache directory, i.e. if it doesn’t cache to the public directory. In that case you’ll need to use mod_rewrite to serve such page cache files.

12.2. Phusion Passenger and its relationship with Ruby

12.2.1. How Ruby is used

Phusion Passenger’s core is written in C++ for performance and memory efficiency. It supports web applications written in any language. Phusion Passenger requires Ruby, its usage of Ruby is minimal in order to maximize performance and to minimize memory usage.

  • Phusion Passenger’s installer, build system and administration tools are written in Ruby.

  • Certain internally used tools, such as the crash handler (which generates a backtrace in case Phusion Passenger crash) and the prespawn script (used to implement PassengerPreStart) are written in Ruby as well.

  • Ruby web application support is implemented in Ruby.

  • If you use Flying Passenger, then the Flying Passenger daemon is written in Ruby. The daemon is a small (less than 500 lines of code) and offloads most tasks to the C++ core.

  • If you use Phusion Passenger Standalone, then the frontend (the passenger command) is written in Ruby. The frontend is small (less than 1500 lines of code) and offloads most tasks to the C++ core.

Other than the aforementioned aspects, Phusion Passenger does not use Ruby during normal operation. For example, if you run Python WSGI web applications on Phusion Passenger, then there will be (almost) no Ruby code running on the system.

12.2.2. When the system has multiple Ruby interpreters

Phusion Passenger may be installed with any Ruby interpreter. Once installed, you can run Phusion Passenger’s Ruby parts under any Ruby interpreter you want, even if that Ruby interpreter was not the one you originally installed Phusion Passenger with.

The reason for this is that Phusion Passenger does not dynamically link to Ruby: Phusion Passenger uses Ruby entirely out-of-process. Thus you can switch to any Ruby interpreter you want during runtime, without recompiling Phusion Passenger, and without worrying about what Ruby you used to install Phusion Passenger.

Phusion Passenger is also capable of running Ruby web applications under any Ruby interpreter you want. So it is not important which Ruby you use to install Phusion Passenger: it will work regardless. Please refer to the documentation for the PassengerRuby directive to learn how run different web applications under different Ruby interpreters.

Caveat: RVM and RVM gemsets

There is however one caveat if you happen to be using RVM or RVM gemsets. When you gem install Phusion Passenger using RVM, then RVM will install Phusion Passenger into the currently active RVM Ruby and gemset. This means that Phusion Passenger commands - such as passenger, passenger-install-xxx-module and passenger-status - are available in that same RVM Ruby and gemset only. When you switch Ruby interpreter, or when you switch gemset, the Phusion Passenger commands will no longer be available, and you will get a command not found error. Here’s an example which demonstrates the problem.

"Command not found" problem demonstration
## Install Phusion Passenger (open source edition) using Ruby 1.9.3
## and the 'business' gemset
$ rvm use 1.9.3
Using /home/phusion/.rvm/gems/ruby-1.9.3-p429
$ rvm gemset create business
$ rvm gemset use business
Using ruby-1.9.3-p429 with gemset business
$ curl -O https://s3.amazonaws.com/phusion-passenger/releases/gem_bootstrap.sh
$ eval "`sh gem_bootstrap.sh`"
$ gem install passenger

## Verify that passenger works
$ passenger --version
Phusion Passenger version 4.0.14

## Switch to a different RVM gemset. You will get a `command not found`
$ rvm gemset use default
Using ruby-1.9.3-p429 with gemset default
$ passenger --version
bash: passenger: command not found

## Switch to a different Ruby interpreter. You will also get
## a `command not found`
$ rvm use 2.0.0
Using /home/phusion/.rvm/gems/ruby-2.0.0-p195
$ passenger --version
bash: passenger: command not found

## Switch back to the Ruby and gemset that you installed Phusion
## Passenger with, and verify that it works again
$ rvm use 1.9.3
Using /home/phusion/.rvm/gems/ruby-2.0.0-p195
$ rvm gemset use business
Using ruby-1.9.3-p429 with gemset business
$ passenger --version
Phusion Passenger version 4.0.14
Solutions

There are several ways to solve this problem:

  1. Permanently add Phusion Passenger’s command directory to your PATH, so that your shell can always find them even when you switch RVM Ruby or gemset. If you don’t know what PATH means, please read About environment variables first.

    The drawback is that you have to redo this every time you upgrade Phusion Passenger, because the Phusion Passenger directory filename is dependent on the version number.

    First, identify the location of the Phusion Passenger command directory, like this:

    $ echo `passenger-config --root`/bin
    /home/phusion/.rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.15/bin

    Next, add the directory that you’ve found to your current shell’s PATH:

    $ export PATH=/home/phusion/.rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.15/bin:$PATH

    Finally, make the change permanent by appending the above command to your bash startup file:

    $ echo 'export PATH=/home/phusion/.rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.15/bin:$PATH' >> ~/.bashrc
  2. Switch back to the RVM Ruby and gemset that you installed Phusion Passenger with, before running any Phusion Passenger command.

  3. Prepend any Phusion Passenger command with rvm-exec RUBY_NAME@GEMSET_NAME ruby -S. If the relevant Phusion Passenger command also needs root privileges, then prepend rvmsudo before that. For example:

    rvm-exec 1.9.3@business ruby -S passenger --version
    rvmsudo rvm-exec 1.9.3@business ruby -S passenger-install-apache2-module

12.3. Static assets serving

Phusion Passenger accelerates serving of static files. This means that, if an URI maps to a file that exists, then Phusion Passenger will let Apache serve that file directly, without hitting the web application.

Phusion Passenger does all this without the need for any mod_rewrite rules. People who are switching from an old Mongrel-based setup might have mod_rewrite rules such as these:

# Check whether this request has a corresponding file; if that
# exists, let Apache serve it, otherwise forward the request to
# Mongrel.
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ balancer://mongrel%{REQUEST_URI} [P,QSA,L]

These kind of mod_rewrite rules are no longer required, and you can safely remove them.

12.4. How Phusion Passenger detects whether a virtual host is a web application

After you’ve read the deployment instructions you might wonder how Phusion Passenger knows that the DocumentRoot points to a web application that Phusion Passenger is able to serve, and how it knows what kind of web application it is (e.g. Rails or Rack).

Phusion Passenger checks whether the virtual host is a Rails application by checking whether the following file exists:

dirname(DocumentRoot) + "/config/environment.rb"

If you’re not a programmer and don’t understand the above pseudo-code snippet, it means that Phusion Passenger will:

  1. Extract the parent directory filename from the value of the DocumentRoot directory.

  2. Append the text "/config/environment.rb" to the result, and check whether the resulting filename exists.

So suppose that your document root is /webapps/foo/public. Phusion Passenger will check whether the file /webapps/foo/config/environment.rb exists.

Note that Phusion Passenger does not resolve any symlinks in the document root path by default since version 2.2.0 — in contrast to versions earlier than 2.2.0, which do resolve symlinks. So for example, suppose that your DocumentRoot points to /home/www/example.com, which in turn is a symlink to /webapps/example.com/public. In versions earlier than 2.2.0, Phusion Passenger will check whether /webapps/example.com/config/environment.rb exists because it resolves all symlinks. Phusion Passenger 2.2.0 and later however will check for /home/www/config/environment.rb. This file of course doesn’t exist, and as a result Phusion Passenger will not activate itself for this virtual host, and you’ll most likely see an Apache mod_dirindex directory listing.

If you need the old symlink-resolving behavior for whatever reason, then you can turn on PassengerResolveSymlinksInDocumentRoot.

Another way to solve this situation is to explicitly tell Phusion Passenger what the correct application root is through the PassengerAppRoot configuration directive.

Autodetection of Rack applications happens through the same mechanism, exception that Phusion Passenger will look for config.ru instead of config/environment.rb.

13. Appendix A: About this document

The text of this document is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License.

Phusion Passenger is brought to you by Phusion.

Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.

14. Appendix B: Terminology

14.1. Application root

The root directory of an application that’s served by Phusion Passenger.

In case of Ruby on Rails applications, this is the directory that contains Rakefile, app/, config/, public/, etc. In other words, the directory pointed to by RAILS_ROOT. For example, take the following directory structure:

/apps/foo/       <------ This is the Rails application's application root!
   |
   +- app/
   |   |
   |   +- controllers/
   |   |
   |   +- models/
   |   |
   |   +- views/
   |
   +- config/
   |   |
   |   +- environment.rb
   |   |
   |   +- ...
   |
   +- public/
   |   |
   |   +- ...
   |
   +- ...

In case of Rack applications, this is the directory that contains config.ru. For example, take the following directory structure:

/apps/bar/      <----- This is the Rack application's application root!
   |
   +- public/
   |    |
   |    +- ...
   |
   +- config.ru
   |
   +- ...

In case of Python (WSGI) applications, this is the directory that contains passenger_wsgi.py. For example, take the following directory structure:

/apps/baz/      <----- This is the WSGI application's application root!
   |
   +- public/
   |    |
   |    +- ...
   |
   +- passenger_wsgi.py
   |
   +- ...

14.2. Idle process

An "idle process" refers to a process that hasn’t processed any requests for a while.

14.3. Inactive process

An "inactive process" refers to a process that’s current not processing any requests. An idle process is always inactive, but an inactive process is not always considered idle.

15. Appendix C: Spawning methods explained

At its core, Phusion Passenger is an HTTP proxy and process manager. It spawns Ruby on Rails/Rack/WSGI worker processes (which may also be referred to as backend processes), and forwards incoming HTTP request to one of the worker processes.

While this may sound simple, there’s not just one way to spawn worker processes. Let’s go over the different spawning methods. For simplicity’s sake, let’s assume that we’re only talking about Ruby on Rails applications.

15.1. The most straightforward and traditional way: direct spawning

Phusion Passenger could create a new Ruby process, which will then load the Rails application along with the entire Rails framework. This process will then enter an request handling main loop.

This is the most straightforward way to spawn worker processes. If you’re familiar with the Mongrel application server, then this approach is exactly what mongrel_cluster performs: it creates N worker processes, each which loads a full copy of the Rails application and the Rails framework in memory. The Thin application server employs pretty much the same approach.

Note that Phusion Passenger’s version of direct spawning differs slightly from mongrel_cluster. Mongrel_cluster creates entirely new Ruby processes. In programmers jargon, mongrel_cluster creates new Ruby processes by forking the current process and exec()-ing a new Ruby interpreter. Phusion Passenger on the other hand creates processes that reuse the already loaded Ruby interpreter. In programmers jargon, Phusion Passenger calls fork(), but not exec().

15.2. The smart spawning method

Note Smart spawning is supported for all Ruby applications but not for WSGI applications.

While direct spawning works well, it’s not as efficient as it could be because each worker process has its own private copy of the Rails application as well as the Rails framework. This wastes memory as well as startup time.

Worker processes and direct spawning
Figure: Worker processes and direct spawning. Each worker process has its own private copy of the application code and Rails framework code.

It is possible to make the different worker processes share the memory occupied by application and Rails framework code, by utilizing so-called copy-on-write semantics of the virtual memory system on modern operating systems. As a side effect, the startup time is also reduced. This is technique is exploited by Phusion Passenger’s smart spawn method.

15.2.1. How it works

When the smart spawn method is being used, Phusion Passenger will first create a so-called ApplicationSpawner server process. This process loads the entire Rails application along with the Rails framework, by loading environment.rb. Then, whenever Phusion Passenger needs a new worker process, it will instruct the ApplicationSpawner server to do so. The ApplicationSpawner server will create a worker new process that reuses the already loaded Rails application/framework. Creating a worker process through an already running ApplicationSpawner server is very fast, about 10 times faster than loading the Rails application/framework from scratch. If the Ruby interpreter is copy-on-write friendly (that is, if you’re running Ruby Enterprise Edition) then all created worker processes will share as much common memory as possible. That is, they will all share the same application and Rails framework code.

images/smart.png
Figure: Worker processes and the smart spawn method. All worker processes, as well as the ApplicationSpawner, share the same application code and Rails framework code.

The smart method allows different worker processes that belong to the same application to share memory.

Notes:

  • Vendored Rails frameworks cannot be shared by different applications, even if both vendored Rails frameworks are the same version. So for efficiency reasons we don’t recommend vendoring Rails.

  • ApplicationSpawner servers have an idle timeout just like worker processes. If an ApplicationSpawner/FrameworkSpawner server hasn’t been instructed to do anything for a while, it will be shutdown in order to conserve memory. This idle timeout is configurable.

15.2.2. Summary of benefits

Suppose that Phusion Passenger needs a new worker process for an application that uses Rails 2.2.1.

If the smart spawning method is used, and an ApplicationSpawner server for this application is already running, then worker process creation time is about 10 times faster than direct spawning. This worker process will also share application and Rails framework code memory with the ApplicationSpawner server and the worker processes that had been spawned by this ApplicationSpawner server.

In practice, the smart spawning method could mean a memory saving of about 33%, assuming that your Ruby interpreter is copy-on-write friendly.

Of course, smart spawning is not without gotchas. But if you understand the gotchas you can easily reap the benefits of smart spawning.

15.3. Smart spawning gotcha #1: unintentional file descriptor sharing

Because worker processes are created by forking from an ApplicationSpawner server, it will share all file descriptors that are opened by the ApplicationSpawner server. (This is part of the semantics of the Unix fork() system call. You might want to Google it if you’re not familiar with it.) A file descriptor is a handle which can be an opened file, an opened socket connection, a pipe, etc. If different worker processes write to such a file descriptor at the same time, then their write calls will be interleaved, which may potentially cause problems.

The problem commonly involves socket connections that are unintentionally being shared. You can fix it by closing and reestablishing the connection when Phusion Passenger is creating a new worker process. Phusion Passenger provides the API call PhusionPassenger.on_event(:starting_worker_process) to do so. So you could insert the following code in your environment.rb:

if defined?(PhusionPassenger)
    PhusionPassenger.on_event(:starting_worker_process) do |forked|
        if forked
            # We're in smart spawning mode.
            ... code to reestablish socket connections here ...
        else
            # We're in direct spawning mode. We don't need to do anything.
        end
    end
end

Note that Phusion Passenger automatically reestablishes the connection to the database upon creating a new worker process, which is why you normally do not encounter any database issues when using smart spawning mode.

15.3.1. Example 1: Memcached connection sharing (harmful)

Suppose we have a Rails application that connects to a Memcached server in environment.rb. This causes the ApplicationSpawner to have a socket connection (file descriptor) to the Memcached server, as shown in the following figure:

+--------------------+
| ApplicationSpawner |-----------[Memcached server]
+--------------------+

Phusion Passenger then proceeds with creating a new Rails worker process, which is to process incoming HTTP requests. The result will look like this:

+--------------------+
| ApplicationSpawner |------+----[Memcached server]
+--------------------+      |
                            |
+--------------------+      |
| Worker process 1   |-----/
+--------------------+

Since a fork() makes a (virtual) complete copy of a process, all its file descriptors will be copied as well. What we see here is that ApplicationSpawner and Worker process 1 both share the same connection to Memcached.

Now supposed that your site gets Slashdotted and Phusion Passenger needs to spawn another worker process. It does so by forking ApplicationSpawner. The result is now as follows:

+--------------------+
| ApplicationSpawner |------+----[Memcached server]
+--------------------+      |
                            |
+--------------------+      |
| Worker process 1   |-----/|
+--------------------+      |
                            |
+--------------------+      |
| Worker process 2   |-----/
+--------------------+

As you can see, Worker process 1 and Worker process 2 have the same Memcached connection.

Suppose that users Joe and Jane visit your website at the same time. Joe’s request is handled by Worker process 1, and Jane’s request is handled by Worker process 2. Both worker processes want to fetch something from Memcached. Suppose that in order to do that, both handlers need to send a "FETCH" command to Memcached.

But suppose that, after worker process 1 having only sent "FE", a context switch occurs, and worker process 2 starts sending a "FETCH" command to Memcached as well. If worker process 2 succeeds in sending only one bye, F, then Memcached will receive a command which begins with "FEF", a command that it does not recognize. In other words: the data from both handlers get interleaved. And thus Memcached is forced to handle this as an error.

This problem can be solved by reestablishing the connection to Memcached after forking:

+--------------------+
| ApplicationSpawner |------+----[Memcached server]
+--------------------+      |                   |
                            |                   |
+--------------------+      |                   |
| Worker process 1   |-----/|                   |
+--------------------+      |                   |  <--- created this
                            X                   |       new
                                                |       connection
                            X <-- closed this   |
+--------------------+      |     old           |
| Worker process 2   |-----/      connection    |
+--------------------+                          |
          |                                     |
          +-------------------------------------+

Worker process 2 now has its own, separate communication channel with Memcached. The code in environment.rb looks like this:

if defined?(PhusionPassenger)
    PhusionPassenger.on_event(:starting_worker_process) do |forked|
        if forked
            # We're in smart spawning mode.
            reestablish_connection_to_memcached
        else
            # We're in direct spawning mode. We don't need to do anything.
        end
    end
end

15.3.2. Example 2: Log file sharing (not harmful)

There are also cases in which unintentional file descriptor sharing is not harmful. One such case is log file file descriptor sharing. Even if two processes write to the log file at the same time, the worst thing that can happen is that the data in the log file is interleaved.

To guarantee that the data written to the log file is never interleaved, you must synchronize write access via an inter-process synchronization mechanism, such as file locks. Reopening the log file, like you would have done in the Memcached example, doesn’t help.

15.4. Smart spawning gotcha #2: the need to revive threads

Another part of the fork() system call’s semantics is the fact that threads disappear after a fork call. So if you’ve created any threads in environment.rb, then those threads will no longer be running in newly created worker process. You need to revive them when a new worker process is created. Use the :starting_worker_process event that Phusion Passenger provides, like this:

if defined?(PhusionPassenger)
    PhusionPassenger.on_event(:starting_worker_process) do |forked|
        if forked
            # We're in smart spawning mode.
            ... code to revive threads here ...
        else
            # We're in direct spawning mode. We don't need to do anything.
        end
    end
end

15.5. Smart spawning gotcha #3: code load order

This gotcha is only applicable to the smart spawn method, not the smart-lv2 spawn method.

If your application expects the Rails framework to be not loaded during the beginning of environment.rb, then it can cause problems when an ApplicationSpawner is created from a FrameworkSpawner, which already has the Rails framework loaded. The most common case is when applications try to patch Rails by dropping a modified file that has the same name as Rails’s own file, in a path that comes earlier in the Ruby search path.

For example, suppose that we have an application which has a patched version of active_record/base.rb located in RAILS_ROOT/lib/patches, and RAILS_ROOT/lib/patches comes first in the Ruby load path. When conservative spawning is used, the patched version of base.rb is properly loaded. When smart (not smart-lv2) spawning is used, the original base.rb is used because it was already loaded, so a subsequent require "active_record/base" has no effect.

16. Appendix D: About environment variables

The Phusion Passenger compilation process can be customized with environment variables.

Environment variables are named values that affect how the system works. For example they tell the system where to look for commands (the PATH variable) or where to look for libraries (LD_LIBRARY_PATH). Their names are often in all-uppercase. Sometimes people refer to an environment variable with a dollar sign $ in front, but that’s the same thing: when people say "the $PATH environment variable" they mean "the PATH environment variable". This is because the dollar sign $ is a shell syntax for refering to an environment variable, as you will learn later.

Environment variables are set on a per-process basis, but they are inherited by child processes. This means that if you set environment variables in process A, another already running process B will not see these new environment variables. But if A spawns a child process C, then C will have all environment variables that A had. If you once again change the environment variables in A, then C will not see the changes.

The per-process nature of environment variables some implications. When you set environment variables in your bashrc or other bash startup files


  • 
only newly spawned bash shells see them.

  • 
the web server usually does not see them, because the web server tends to be started from init scripts, not from bash.

  • 
cron jobs do not see them, because cron jobs' environment variables are entirely dictated by their crontabs.

Note Because this chapter is meant for beginners, it assumes that the reader uses the bash shell. This chapter does not describe instructions for zsh, csh or other shells. We assume that users of other shells are familiar with the Bourne shell syntax, and know how to apply the instructions in this chapter in their shells' native syntaxes.

16.1. Working with environment variables

You can see all environment variables in your shell by running the following command:

env

You can set an evironment variable with the syntax export <NAME>=<VALUE>. For example, to set the APXS2 variable to the value /usr/sbin/apxs2:

export APXS2=/usr/sbin/apxs2

Any process that you run from your shell from that point on will have said environment variable:

export APXS2=/usr/sbin/apxs2
ruby -e 'p ENV["APXS2"]'
# => "/usr/sbin/apxs2"
Note
The "export" keyword is important

You must set the export keyword. If you omit the export keyword then the environment variable will not be visible to other processes:

APXS2=/usr/sbin/apxs2
ruby -e 'p ENV["APXS2"]'
# => nil

You can reference an environment variable in your shell by typing the $ sign followed by the environment variable’s name. For example, to see the value of the PATH variable:

echo $PATH

You can also use this trick to extend the value of an environment variable:

export PATH=/usr/bin

# Prepends '/opt/local/bin', so that it becomes /opt/local/bin:/usr/bin
export PATH=/opt/local/bin:$PATH
# Appends '/usr/local/bin', so that it becomes /opt/local/bin:/usr/bin:/usr/local/bin
export PATH=$PATH:/usr/local/bin

16.2. The PATH environment variable

The PATH environment variable dictates where the system looks for command. It is a colon-separated list of directories. If you get a "command not found" error while you know that the command is installed, then setting PATH will help. For example suppose that the command frobnicator is in /opt/local/bin:

user@localhost bash$ frobnicator
bash: frobnicator: command not found

We verify that /opt/local/bin is not in PATH:

user@localhost bash$ echo $PATH
/bin:/usr/bin:/usr/local/bin

We can run frobnicator through it’s full path


user@localhost bash$ /opt/local/bin/frobnicator
# => success!


or we can add /opt/local/bin to PATH.

user@localhost bash$ export PATH=$PATH:/opt/local/bin
user@localhost bash$ frobnicator
# => success!

16.2.1. Adding Phusion Passenger’s administration tools to PATH

If you get a "command not found" error when invoking one of the Phusion Passenger administration tools (e.g. passenger-status or passenger-memory-stats then that means the tools are not in PATH, so you need to add them.

  • If you installed Phusion Passenger with RubyGems, then the tools are in your RubyGems executable path. You can view the gem path using the command gem env:

    $ gem env
    RubyGems Environment:
      - RUBYGEMS VERSION: 1.8.15
      - RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [i686-darwin10.8.0]
      - INSTALLATION DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
      - RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby
      - EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/bin    <--------- !!
      - RUBYGEMS PLATFORMS:
        - ruby
        - x86-darwin-10
      - GEM PATHS:
         - /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
         - /Users/hongli/.gem/ruby/1.8
      - GEM CONFIGURATION:
         - :update_sources => true
         - :verbose => true
         - :benchmark => false
         - :backtrace => false
         - :bulk_threshold => 1000
         - "gem" => "--no-ri --no-rdoc"
      - REMOTE SOURCES:
         - http://rubygems.org/

    As you can see, the RubyGems executable path in the example happens to be /opt/ruby-enterprise-1.8.7-2010.01/bin. So that directory must be added to PATH.

  • If you installed Phusion Passenger using the tarball, then the tools are in the bin subdirectory of the Phusion Passenger tarball directory that you extracted. For example, if you extracted passenger-4.9.0.tar.gz inside /opt, then the tools are located in /opt/passenger-4.0.9/bin. In that case, you need to add /opt/passenger-4.0.9/bin to your PATH.

  • If you installed Phusion Passenger using native OS packages, then some Phusion Passenger administration tools are in /usr/bin, while others are in /usr/sbin. If you are not logged in as root, then /usr/sbin may not be in PATH, which would explain why you get a "command not found" when trying to invoke some of the tools. You should /usr/sbin to PATH.

  • If you are unsure where your Phusion Passenger directory is then you can use the find command to look them up. Go to the root directory and invoke find with sudo:

    $ cd /
    $ sudo find . -name passenger-status
    /usr/local/passenger/bin/passenger-status

    In this example, the administration tools happen to be in /usr/local/passenger/bin, so you must add that to PATH.

Note You may still get a "command not found" when invoking the tools through sudo, even after you’ve added the relevant directory to PATH. Please read Environment variables and sudo to learn more.

16.3. Making environment variables permanent

When you exit your shell, the evironment variable changes are lost. There is no standard method to set environment variables system-wide, so you have to set them in different configuration files for different services.

16.3.1. bash

To make environment variables permanent for future bash sessions for the current user, add them to your ~/.bashrc:

echo 'export FOO=bar' >> ~/.bashrc
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc

To make them permanent for future bash sessions for all users, add them to /etc/bashrc.

Note Depending on the system, the bashrc file may have a different filename. On Debian and Ubuntu, it’s /etc/bash.bashrc.

16.3.2. Apache

Note This subsection describes how to set environment variables on Apache itself, not on apps served through Phusion Passenger for Apache. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also Setting environment variables on Phusion Passenger-served apps.

On Debian and Ubuntu, with an Apache installed through apt, Apache environment variables are defined in the file /etc/apache2/envvars. This is a shell script so environment variables must be specified with the shell syntax.

On Red Hat, Fedora, CentOS and ScientificLinux, with an Apache installed through YUM, Apache environment variables are defined in /etc/sysconfig/httpd.

On OS X they are defined in /System/Library/LaunchDaemons/org.apache.httpd.plist, as explained here on Stack Overflow.

On other systems, or if you did not install Apache through the system’s package manager, the configuration file for environment variables is specific to the vendor that supplied Apache. There may not even be such a configuration file. You should contact the vendor for support.

16.3.3. Nginx

Note This subsection describes how to set environment variables on Nginx itself, not on apps served through Phusion Passenger for Nginx. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also Setting environment variables on Phusion Passenger-served apps.

If you installed Nginx through the Debian or Ubuntu packages, then you can define environment variables in /etc/default/nginx. This is a shell script so you must use the export FOO=bar syntax.

Otherwise, environment variables are best set through the script which starts Nginx. For example, if you installed Nginx from source and you used the Nginx init script described in the Phusion Passenger Users Guide, Nginx version, then you should edit that script to define the environment variables. Those init scripts are regular shell scripts, so use the export FOO=bar syntax. Just make sure your set your environment variables before the script starts Nginx.

Note Setting environment variables on Nginx has no effect on the Flying Passenger daemon because the daemon is started seperately. You should set the environment variables in the shell right before starting the daemon.

16.3.4. cron

To make environment variables permanent for cron jobs, add those variables to the relevant crontab. But note that inside crontabs you cannot refer to existing environment variables with the $ syntax because crontabs are not shell scripts. You have to specify the entire value.

What to put in "crontab -e"
# Environment variable definitions
FOO=bar
APXS2=/usr/sbin/apxs2

# **WRONG!** You cannot refer to existing variables with the `$` syntax!
PATH=/usr/bin:$PATH
# **WRONG!** You cannot use the 'export' keyword!
export PATH=/usr/bin:/usr/local/bin
# Correct:
PATH=/usr/bin:/usr/local/bin

# Jobs:
# m h  dom mon dow   command
  * *  *   *   *     frobnicator

16.3.5. Phusion Passenger-served apps

You can pass environment variables to Phusion Passenger-served apps through various methods:

  • When running Apache, use the PassEnv and SetEnv directives of mod_env. This is supported starting from Phusion Passenger 4.0.

  • When running Nginx, use the passenger_set_cgi_param directive.

  • Through your bashrc. Starting from version 4.0, Phusion Passenger 4.0 spawns applications through bash and inherit all bash environment variables. Phusion Passenger Standalone tends to be started from the shell and thus inherits all environment variables set by the shell.

  • Through Apache and Nginx, as described earlier in this chapter. Any environment variables that you set on Apache and Nginx itself are inherited by Phusion Passenger, and thus by Phusion Passenger-served apps as well.

  • Through the application itself. Most programming languages provide APIs for setting environment variables. For example in Ruby you can write:

    ENV['FOO'] = 'bar'

    In Python you can write:

    import os
    os.environ['FOO'] = 'bar'

16.4. Environment variables and sudo

Note RVM users should always use the rvmsudo command instead of sudo. However all information in this section apply to rvmsudo as well.

The sudo command resets all environment variables before running the specified command, for security reasons. So if you set environment variables before running sudo passenger-install-xxx-module, sudo passenger-status or any other commands, then the environment variables are not correctly passed to the command. You can solve this by running sudo with -E (preserve environment variables):

user@localhost bash$ export APXS2=/usr/sbin/apxs2
user@localhost bash$ sudo -E passenger-install-apache2-module

Alternatively, you can obtain a root prompt with sudo first, and then set the environment variables, before running any further commands:

user@localhost bash$ sudo -s
Password: ...
root@localhost bash# export APXS2=/usr/sbin/apxs2
root@localhost bash# passenger-install-apache2-module

Note that for security reasons, sudo always resets the PATH environment variable, even if you pass -E! You can get around this problem by obtaining a root prompt first, and then set the environment variables:

user@localhost bash$ sudo -s
Password: ...
root@localhost bash# export PATH=$PATH:/opt/myruby/bin
root@localhost bash# passenger-install-apache2-module

passenger-4.0.37/doc/Users guide Apache.idmap.txt000644 000765 000024 00000042462 12233035540 022144 0ustar00honglistaff000000 000000 ###### Autogenerated by Mizuho, DO NOT EDIT ###### # This file maps section names to IDs so that the commenting system knows which # comments belong to which section. Section names may be changed at will but # IDs always stay the same, allowing one to retain old comments even if you # rename a section. # # This file is autogenerated but is not a cache; you MUST NOT DELETE this # file and you must check it into your version control system. If you lose # this file you may lose the ability to identity old comments. # # Entries marked with "fuzzy" indicate that the section title has changed # and that Mizuho has found an ID which appears to be associated with that # section. You should check whether it is correct, and if not, fix it. 1. Support information => support-information-zkewk3 1.1. Supported operating systems => supported-operating-systems-rhbg35 1.2. Where to get support => where-to-get-support-f3pbrb 2. Installation => installing-upgrading-and-uninstalling-phusion-passenger-laryvs 2.1. Synopsis => synopsis-l0om5d 2.2. Installing or upgrading on Mac OS X with Homebrew => installing-or-upgrading-on-mac-os-x-with-homebrew-1pia1cx 2.3. Installing or upgrading on Debian or Ubuntu => installing-or-upgrading-on-ubuntu-1xg22xs 2.3.1. Adding our APT repository => adding-our-apt-repository-1l8plxk 2.3.2. Installing packages => installing-packages-1jxn722 2.4. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux => installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1y5ie8b 2.5. Generic installation, upgrade and downgrade method: via RubyGems => installing-via-the-gem-39jw1u 2.6. Generic installation, upgrade and downgrade method: via tarball => installing-via-the-source-tarball-1cgxrqc 2.7. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-b17h8g 2.8. Cryptographic verification of installation files => cryptographic-verification-of-installation-files-ed3r9v 2.8.1. Synopsis => synopsis-uwnz2o 2.8.2. Importing the Phusion Software Signing key => importing-the-phusion-software-signing-key-1x0rhv 2.8.3. Verifying the Phusion Software Signing key => verifying-the-phusion-software-signing-key-10430lg 2.8.4. Verifying the gem and tarball => verifying-the-gem-and-tarball-1nf0uov 2.8.5. Verifying Git signatures => verifying-git-signatures-oaafwd 2.8.6. Verifying DEB and RPM packages => verifying-deb-and-rpm-packages-vgtv04 2.8.7. Revocation => revocation-4o01n2 2.9. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-1arnxii 2.10. Customizing the compilation process => customizing-the-compilation-process-1sds3od 2.10.1. Setting the compiler => setting-the-compiler-1symq7h 2.10.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-wzu0ey 2.10.3. Forcing location of command line tools and dependencies => forcing-location-of-certain-command-line-tools-1hym30u 2.11. Dealing with multiple Apache installations => dealing-with-multiple-apache-installations-ks5nkz 2.12. Working with the Apache configuration file => locating-the-apache-configuration-file-1fterqv 2.13. Disabling without uninstalling => unloading-disabling-phusion-passenger-from-apache-without-uninstalling-it-s1axnx 2.14. Uninstalling => uninstalling-phusion-passenger-1qb4ssq 2.15. Moving to a different directory => moving-to-a-different-directory-1n0gkwh 3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3.x) application => deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-x-application-9r92hi 3.1. Deploying to a virtual host’s root => deploying-to-a-virtual-host-s-root-ab4zj6 3.2. Deploying to a sub URI => deploying-to-a-sub-uri-13rfygg 3.3. Redeploying (restarting the Ruby on Rails application) => redeploying-restarting-the-ruby-on-rails-application--m5zqc6 3.4. Migrations => migrations-15238b4 3.5. Capistrano integration => capistrano-integration-1o4cbyq 4. Deploying a Rack-based Ruby application (including Rails >= 3) => deploying-a-rack-based-ruby-application-including-rails-3--hcs66f 4.1. Tutorial/example: writing and deploying a Hello World Rack application => tutorial-example-writing-and-deploying-a-hello-world-rack-application-axp5z5 4.2. Deploying to a virtual host’s root => deploying-to-a-virtual-host-s-root-u9bfax 4.3. Deploying to a sub URI => deploying-to-a-sub-uri-zekba6 4.4. Redeploying (restarting the Rack application) => redeploying-restarting-the-rack-application--18m41m1 4.5. Rackup specifications for various web frameworks => rackup-specifications-for-various-web-frameworks-ndsqc2 4.5.1. Camping => camping-1kxexk0 4.5.2. Halcyon => halcyon-1ghnpmz 4.5.3. Mack => mack-miht6b 4.5.4. Merb => merb-iyj7qy 4.5.5. Ramaze => ramaze-boddtj 4.5.6. Sinatra => sinatra-1hubto4 5. Deploying a WSGI (Python) application => deploying-a-wsgi-python-application-7aygdl 5.1. Tutorial/example: writing and deploying a Hello World WSGI application => tutorial-example-writing-and-deploying-a-hello-world-wsgi-application-9ziqy8 5.2. Deploying to a virtual host’s root => deploying-to-a-virtual-host-s-root-zzo4v7 5.3. Deploying to a sub URI => deploying-to-a-sub-uri-ayqz96 5.4. Redeploying (restarting the WSGI application) => redeploying-restarting-the-wsgi-application--na7pmf 6. Deploying a Node.js application => deploying-a-node-js-application-882ecy 7. Deploying a Meteor application => deploying-a-meteor-application-mxfmir 8. Configuring Phusion Passenger => configuring-phusion-passenger-11oztoe 8.1. PassengerRoot => passengerroot-directory--sere8l 8.2. PassengerDefaultRuby => passengerdefaultruby-and-passengerruby-7zblp8 8.3. Deployment options => deployment-options-1unzrll 8.3.1. PassengerEnabled => passengerenabled-on-off--74rzth 8.3.2. PassengerRuby => passengerruby-filename--1r3fv73 8.3.3. PassengerPython => passengerpython-filename--1ssesv3 8.3.4. PassengerNodejs => passengernodejs-filename--2mjb1j 8.3.5. PassengerAppEnv => passengerappenv-string--s3ojlc 8.3.6. RailsEnv => railsenv-string--1b0xxvu 8.3.7. RackEnv => rackenv-string--vve9py 8.3.8. PassengerAppRoot => passengerapproot-path-to-root--uf24yd 8.3.9. PassengerBaseURI => passengerbaseuri-uri--97i9mm 8.3.10. PassengerRestartDir => passengerrestartdir-directory--1fmhmv0 8.3.11. PassengerRollingRestarts => passengerrollingrestarts 8.3.12. PassengerResistDeploymentErrors => passengerresistdeploymenterrors 8.4. Process spawning options => process-spawning-options-v2vscm 8.4.1. PassengerSpawnMethod => passengerspawnmethod-string--sodg2y 8.4.2. PassengerLoadShellEnvvars => passengerloadshellenvvars-on-off--1290yz1 8.5. Security options => security-options-1pb75ho 8.5.1. PassengerUserSwitching => passengeruserswitching 8.5.2. PassengerUser => passengeruser 8.5.3. PassengerGroup => passengergroup 8.5.4. PassengerDefaultUser => passengerdefaultuser 8.5.5. PassengerDefaultGroup => passengerdefaultgroup 8.5.6. PassengerFriendlyErrorPages => passengerfriendlyerrorpages 8.6. Resource control and optimization options => resource-control-and-optimization-options-zu2f7u 8.6.1. PassengerMaxPoolSize => passengermaxpoolsize-integer--am64q8 8.6.2. PassengerMinInstances => passengermininstances-integer--wegq6b 8.6.3. PassengerMaxInstances => passengermaxinstances 8.6.4. PassengerMaxInstancesPerApp => passengermaxinstancesperapp 8.6.5. PassengerPoolIdleTime => passengerpoolidletime-integer--a3gunq 8.6.6. PassengerMaxPreloaderIdleTime => railsappspawneridletime-integer--1awgog1 8.6.7. PassengerStartTimeout => passengerstarttimeout-seconds--ihnfku 8.6.8. PassengerConcurrencyModel => passengerconcurrencymodel-process-thread--1eipofj 8.6.9. PassengerThreadCount => passengerthreadcount-number--10jl64a 8.6.10. PassengerMaxRequests => passengermaxrequests-integer--17qkw9n 8.6.11. PassengerMaxRequestTime => passengermaxrequesttime-seconds--127v1i2 8.6.12. PassengerMemoryLimit => passengermemorylimit-integer--18irza1 8.6.13. PassengerStatThrottleRate => passengerstatthrottlerate-integer--1dcfda3 8.6.14. PassengerPreStart => passengerprestart-url--1utb57k 8.6.15. PassengerHighPerformance => passengerhighperformance-on-off--nvfa86 8.7. Connection handling options => connection-handling-options-1k3zd1a 8.7.1. PassengerBufferUpload => passengerbufferupload-on-off--1lsjr93 8.7.2. PassengerBufferResponse => passengerbufferresponse-on-off--1y7ilka 8.7.3. PassengerErrorOverride => passengererroroverride-on-off--1pq9nez 8.7.4. PassengerMaxRequestQueueSize => passenger-max-request-queue-size-number--1f1uocd 8.8. Compatibility options => compatibility-options-8jve5a 8.8.1. PassengerResolveSymlinksInDocumentRoot => passengerresolvesymlinksindocumentroot-on-off--1r0qcp8 8.8.2. PassengerAllowEncodedSlashes => passengerallowencodedslashes-on-off--1y3s1ww 8.9. Logging and debugging options => logging-and-debugging-options-el2cuc 8.9.1. PassengerLogLevel => passengerloglevel-integer--s3kbil 8.9.2. PassengerDebugLogFile => passengerdebuglogfile-filename--1wjm2j1 8.9.3. PassengerDebugger => passengerdebugger-on-off--19you7e 8.10. Advanced options => advanced-options-1ab1jkq 8.10.1. PassengerTempDir => passengertempdir-directory--68h2ng 8.10.2. PassengerUploadBufferDir => passengeruploadbufferdir-directory--kdr8at 8.11. Deprecated or removed options => deprecated-options-pm9m57 8.11.1. RailsRuby => railsruby-ht09ei 8.11.2. RailsBaseURI and RackBaseURI => railsbaseuri-uri--1txrw3k 8.11.3. RailsUserSwitching => railsuserswitching-1npx8y4 8.11.4. RailsDefaultUser => railsdefaultuser-19j7n3m 8.11.5. RailsAllowModRewrite => railsallowmodrewrite-1vkziro 8.11.6. RailsSpawnMethod => railsspawnmethod-1aljgpa 8.11.7. RailsAutoDetect, RackAutoDetect and WsgiAutoDetect => railsautodetect-rackautodetect-and-wsgiautodetect-1qgakzs 8.11.8. RailsAppSpawnerIdleTime => railsappspawneridletime-heh41r 8.11.9. RailsFrameworkSpawnerIdleTime => railsframeworkspawneridletime-adcf9k 9. Troubleshooting => troubleshooting-2ihihi 9.1. Generic troubleshooting tips => generic-troubleshooting-tips-130iuhe 9.2. Why does the first request take a long time? => why-does-the-first-request-take-a-long-time--12mg452 9.3. OS X: The installer cannot locate MAMP’s Apache => macos-x-the-installer-cannot-locate-mamp-s-apache-or908n 9.4. Apache reports a "403 Forbidden" error => apache-reports-a-403-forbidden-error-140tb4p 9.5. Static assets such as images and stylesheets aren’t being displayed => static-assets-such-as-images-and-stylesheets-aren-t-being-displayed-uaptpi 9.6. The Apache error log says that the spawn manager script does not exist, or that it does not have permission to execute it => the-apache-error-log-says-that-the-spawn-manager-script-does-not-exist-or-that-it-does-not-have-permission-to-execute-it-1fmoozk 9.7. The application thinks its not on SSL even though it is => the-application-thinks-its-not-on-ssl-even-though-it-is-u9fcp1 9.8. Ruby on Rails-specific troubleshooting => ruby-on-rails-specific-problems-6umss5 9.8.1. The "About your application’s environment" link does not work => the-about-your-application-s-environment-link-does-not-work-7k4tlm 9.8.2. The Rails application reports that it’s unable to start because of a permission error => the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error-v53i6s 9.8.3. The Rails application’s log file is not being written to => my-rails-application-s-log-file-is-not-being-written-to-3i747l 9.9. Conflicting Apache modules => conflicting-apache-modules-1uwpixk 9.9.1. mod_userdir => mod-userdir-x5e2te 9.9.2. MultiViews (mod_negotiation) => multiviews-mod-negotiation--zchfg0 9.9.3. VirtualDocumentRoot => virtualdocumentroot-14cwd7l 10. Analysis and system maintenance => analysis-and-system-maintenance-qvkwzr 10.1. Inspecting memory usage => inspecting-memory-usage-1bkis6i 10.2. Inspecting Phusion Passenger’s internal status => inspecting-phusion-passenger-s-internal-status-ukekf7 10.3. Debugging frozen applications => debugging-frozen-applications-1qsjqq7 10.4. Accessing individual application processes => accessing-individual-application-processes-1p0j4jb 10.5. Attaching an IRB console to an application process => attaching-an-irb-console-to-an-application-process-1cma32j 11. Tips => tips-19cwwf7 11.1. User Switching (security feature) => user-switching-security--8njx1x 11.1.1. Requirements => requirements-yxvtxo 11.1.2. Effects => effects-1lko7vo 11.1.3. Caveats & troubleshooting => caveats-troubleshooting-161hgge 11.1.4. Finding out what user an application is running as => finding-out-what-user-an-application-is-running-as-7uwrol 11.2. Copy-on-write memory support (reducing memory consumption of Ruby applications) => reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1ubxnq0 11.3. Capistrano recipe => capistrano-recipe-syzgo7 11.4. Bundler support => bundler-support-cf72ih 11.4.1. Does Phusion Passenger itself need to be added to the Gemfile? => does-phusion-passenger-itself-need-to-be-added-to-the-gemfile--17whimp 11.5. Installing multiple Ruby on Rails versions => installing-multiple-ruby-on-rails-versions-mi5j14 11.6. Making the application restart after each request => making-the-application-restart-after-each-request-183bezx 11.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments => how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-a63b6r 11.8. Out-of-Band Work and Out-of-Band Garbage Collection => out-of-band-work-and-out-of-band-garbage-collection-kav2p8 11.9. Hooks => hooks-bcltgp 11.9.1. Example => example-icjf0z 11.9.2. Environment => environment-1amls4v 11.9.3. Blocking and concurrency => blocking-and-concurrency-cxpbyu 11.9.4. Error handling => error-handling-1a1uvod 11.9.5. Compatibility => compatibility-18tl6g3 11.9.6. Available hooks => available-hooks-159anc3 11.10. Flying Passenger => flying-passenger-q916f7 11.10.1. Requirements => requirements-1ntkin3 11.10.2. Basic usage => basic-usage-joifsk 11.10.3. Configuring Flying Passenger => configuring-flying-passenger-1v35vgg 11.10.4. Managing the Flying Passenger daemon => managing-the-flying-passenger-daemon-1bng2bu 11.10.5. Using Flying Passenger with MRI 1.8 or JRuby => using-flying-passenger-with-mri-1-8-or-jruby-f5tbvs 11.10.6. Caveats and limitations => caveats-and-limitations-lz3rbb 11.11. X-Sendfile support => x-sendfile-support-1cgyykw 11.12. Upload progress => upload-progress-71cyl7 12. Under the hood => under-the-hood-21ue5t 12.1. Page caching support => page-caching-support-kwq9b9 12.2. Phusion Passenger and its relationship with Ruby => phusion-passenger-and-its-relationship-with-ruby-1eq08ff 12.2.1. How Ruby is used => how-ruby-is-used-14r83nr 12.2.2. When the system has multiple Ruby interpreters => when-the-system-has-multiple-ruby-interpreters-10tm1fq 12.3. Static assets serving => static-assets-serving-wo2d9v 12.4. How Phusion Passenger detects whether a virtual host is a web application => how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-179mp8m 13. Appendix A: About this document => appendix-a-about-this-document-103toqs 14. Appendix B: Terminology => appendix-b-terminology-h4eaf4 14.1. Application root => application-root-otx6xf 14.2. Idle process => idle-process-potb6g 14.3. Inactive process => inactive-process-16gjv2e 15. Appendix C: Spawning methods explained => appendix-c-spawning-methods-explained-owghi9 15.1. The most straightforward and traditional way: direct spawning => the-most-straightforward-and-traditional-way-conservative-spawning-1ybbli2 15.2. The smart spawning method => the-smart-spawning-method-1cvu9dd 15.2.1. How it works => how-it-works-672zja 15.2.2. Summary of benefits => summary-of-benefits-1yrihfb 15.3. Smart spawning gotcha #1: unintentional file descriptor sharing => smart-spawning-gotcha-1-unintentional-file-descriptor-sharing-z1y55l 15.3.1. Example 1: Memcached connection sharing (harmful) => example-1-memcached-connection-sharing-harmful--c71wqw 15.3.2. Example 2: Log file sharing (not harmful) => example-2-log-file-sharing-not-harmful--1p2yuol 15.4. Smart spawning gotcha #2: the need to revive threads => smart-spawning-gotcha-2-the-need-to-revive-threads-1k6cj7d 15.5. Smart spawning gotcha #3: code load order => smart-spawning-gotcha-3-code-load-order-nkotiy 16. Appendix D: About environment variables => appendix-d-about-environment-variables-1lebv1u 16.1. Working with environment variables => working-with-environment-variables-85e6aa 16.2. The PATH environment variable => the-path-environment-variable-p8e32r 16.2.1. Adding Phusion Passenger’s administration tools to PATH => adding-phusion-passenger-s-administration-tools-to-path-xwppud 16.3. Making environment variables permanent => making-environment-variables-permanent-13x0l4h 16.3.1. bash => bash-1pktn63 16.3.2. Apache => apache-15zqjvi 16.3.3. Nginx => nginx-l7ztbb 16.3.4. cron => cron-1kjp7ck 16.3.5. Phusion Passenger-served apps => phusion-passenger-served-apps-478vyt 16.4. Environment variables and sudo => environment-variables-and-sudo-1odzcpz passenger-4.0.37/doc/Users guide Apache.txt000644 000765 000024 00000276557 12233035540 021071 0ustar00honglistaff000000 000000 Phusion Passenger users guide, Apache version ============================================= image:images/phusion_banner.png[link="http://www.phusion.nl/"] Phusion Passenger is an application server which can directly integrate into Apache. It is designed to be easy to use, fast, stable and reliable and is used by link:http://trends.builtwith.com/Web-Server/Phusion-Passenger[hundreds of thousands of websites] all over the world. Phusion Passenger is a so-called polyglot application server because it supports applications written in multiple programming languages. At this time, Ruby and Python are supported. This users guide will teach you: - How to install Phusion Passenger. - How to configure Phusion Passenger. - How to deploy Ruby and Python applications. - How to solve common problems. This guide assumes that the reader is somewhat familiar with Apache and with using the command line. == Support information include::users_guide_snippets/support_information.txt[] [[installation]] == Installation include::users_guide_snippets/installation.txt[] == Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3.x) application == Suppose you have a Ruby on Rails application in '/webapps/mycook', and you own the domain 'www.mycook.com'. You can either deploy your application to the virtual host's root (i.e. the application will be accessible from the root URL, 'http://www.mycook.com/'), or in a sub URI (i.e. the application will be accessible from a sub URL, such as 'http://www.mycook.com/railsapplication'). NOTE: The default `RAILS_ENV` environment in which deployed Rails applications are run, is ``production''. You can change this by changing the <> configuration option. === Deploying to a virtual host's root === Add a virtual host entry to your Apache configuration file. Make sure that the following conditions are met: - The virtual host's document root must point to your Ruby on Rails application's 'public' folder. - The Apache per-directory permissions must allow access to this folder. - MultiViews must be disabled for this folder. For example: ------------------------------------------- ServerName www.mycook.com DocumentRoot /webapps/mycook/public Allow from all Options -MultiViews ------------------------------------------- You may also need to tweak your file/folder permissions. Make sure that the following folders are readable and executable by Apache: * this 'public' folder. * the application's 'config' folder. * all parent folders. That is, /webapps/mycook and /webapps must also be readable and executable by Apache. Then restart Apache. The application has now been deployed. [[deploying_rails_to_sub_uri]] === Deploying to a sub URI === Suppose that you already have a virtual host: ------------------------------------------- ServerName www.phusion.nl DocumentRoot /websites/phusion Allow from all ------------------------------------------- And you want your Rails application, located in `/websites/rails`, to be accessible from the URL 'http://www.phusion.nl/subapp'. To do this, you need to perform the following: 1. Set `Alias {SUBURI} {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}`. 2. Create a `` block. 3. Inside the Location block, set `PassengerBaseURI /{SUBURI}`. 4. Inside the Location block, set `PassengerAppRoot {PATH TO YOUR APPLICATION ROOT}`. 5. Create a `` block. 6. Inside the Directory block, set `Allow from all`. 7. Inside the Directory block, disable MultiViews. Here is an example: ------------------------------------------- ServerName www.phusion.nl DocumentRoot /websites/phusion Allow from all # These have been added: Alias /subapp /websites/rails/public PassengerBaseURI /subapp PassengerAppRoot /websites/rails Allow from all Options -MultiViews ------------------------------------------- Then restart Apache. The application has now been deployed to the sub-URI. NOTE: If you're deploying to a sub-URI then please make sure that your view templates correctly handles references to sub-URI static assets! Otherwise you may find broken links to images, CSS files, JavaScripts, etc. Please read <> for more information. === Redeploying (restarting the Ruby on Rails application) === Deploying a new version of a Ruby on Rails application is as simple as re-uploading the application files, and restarting the application. There are two ways to restart the application: 1. By restarting Apache. 2. By creating or modifying the file 'tmp/restart.txt' in the Rails application's <>. Phusion Passenger will automatically restart the application during the next request. For example, to restart our example MyCook application, we type this in the command line: ------------------------------------------- touch /webapps/mycook/tmp/restart.txt ------------------------------------------- Please note that, unlike earlier versions of Phusion Passenger, 'restart.txt' is not automatically deleted. Phusion Passenger checks whether the timestamp of this file has changed in order to determine whether the application should be restarted. === Migrations === Phusion Passenger is not related to Ruby on Rails migrations in any way. To run migrations on your deployment server, please login to your deployment server (e.g. with 'ssh') and type `rake db:migrate RAILS_ENV=production` in a shell console, just like one would normally run migrations. === Capistrano integration === See <>. == Deploying a Rack-based Ruby application (including Rails >= 3) == Phusion Passenger supports arbitrary Ruby web applications that follow the link:http://rack.rubyforge.org/[Rack] interface. Phusion Passenger assumes that Rack application directories have a certain layout. Suppose that you have a Rack application in '/webapps/rackapp'. Then that folder must contain at least three entries: - 'config.ru', a Rackup file for starting the Rack application. This file must contain the complete logic for initializing the application. - 'public/', a folder containing public static web assets, like images and stylesheets. - 'tmp/', used for 'restart.txt' (our application restart mechanism). This will be explained in a following subsection. So '/webapps/rackapp' must, at minimum, look like this: ---------------------- /webapps/rackapp | +-- config.ru | +-- public/ | +-- tmp/ ---------------------- Suppose you own the domain 'www.rackapp.com'. You can either deploy your application to the virtual host's root (i.e. the application will be accessible from the root URL, 'http://www.rackapp.com/'), or in a sub URI (i.e. the application will be accessible from a sub URL, such as 'http://www.rackapp.com/rackapp'). NOTE: The default `RACK_ENV` environment in which deployed Rack applications are run, is ``production''. You can change this by changing the <> configuration option. === Tutorial/example: writing and deploying a Hello World Rack application === First we create a Phusion Passenger-compliant Rack directory structure: ------------------------------------------- $ mkdir /webapps/rack_example $ mkdir /webapps/rack_example/public $ mkdir /webapps/rack_example/tmp ------------------------------------------- Next, we write a minimal "hello world" Rack application: ------------------------------------------- $ cd /webapps/rack_example $ some_awesome_editor config.ru ...type in some source code... $ cat config.ru app = proc do |env| [200, { "Content-Type" => "text/html" }, ["hello world"]] end run app ------------------------------------------- Finally, we deploy it by adding the following configuration options to the Apache configuration file: ------------------------------------------- ServerName www.rackexample.com DocumentRoot /webapps/rack_example/public Allow from all Options -MultiViews ------------------------------------------- And we're done! After an Apache restart, the above Rack application will be available under the URL 'http://www.rackexample.com/'. === Deploying to a virtual host's root === Add a virtual host entry to your Apache configuration file. Make sure that the following conditions are met: - The virtual host's document root must point to your Rack application's 'public' folder. - The Apache per-directory permissions must allow access to this folder. - MultiViews must be disabled for this folder. For example: ------------------------------------------- ServerName www.rackapp.com DocumentRoot /webapps/rackapp/public Allow from all Options -MultiViews ------------------------------------------- You may also need to tweak your file/folder permissions. Make sure that the following folders are readable and executable by Apache: * this 'public' folder. * the application's 'config' folder. * all parent folders. That is, /webapps/rackapp and /webapps must also be readable and executable by Apache. Then restart Apache. The application has now been deployed. [[deploying_rack_to_sub_uri]] === Deploying to a sub URI === Suppose that you already have a virtual host: ------------------------------------------- ServerName www.phusion.nl DocumentRoot /websites/phusion Allow from all ------------------------------------------- And you want your Rack application, located in `/websites/rack`, to be accessible from the URL 'http://www.phusion.nl/subapp'. To do this, you need to perform the following: 1. Set `Alias {SUBURI} {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}`. 2. Create a `` block. 3. Inside the Location block, set `PassengerBaseURI /{SUBURI}`. 4. Inside the Location block, set `PassengerAppRoot {PATH TO YOUR APPLICATION ROOT}`. 5. Create a `` block. 6. Inside the Directory block, set `Allow from all`. 7. Inside the Directory block, disable MultiViews. Here is an example: ------------------------------------------- ServerName www.phusion.nl DocumentRoot /websites/phusion Allow from all # These have been added: Alias /subapp /websites/rack/public PassengerBaseURI /subapp PassengerAppRoot /websites/rack Allow from all Options -MultiViews ------------------------------------------- Then restart Apache. The application has now been deployed to the sub-URI. === Redeploying (restarting the Rack application) === Deploying a new version of a Rack application is as simple as re-uploading the application files, and restarting the application. There are two ways to restart the application: 1. By restarting Apache. 2. By creating or modifying the file 'tmp/restart.txt' in the Rack application's <>. Phusion Passenger will automatically restart the application. For example, to restart our example application, we type this in the command line: ------------------------------------------- touch /webapps/rackapp/tmp/restart.txt ------------------------------------------- === Rackup specifications for various web frameworks === include::users_guide_snippets/rackup_specifications.txt[] == Deploying a WSGI (Python) application Phusion Passenger supports all WSGI-compliant Python web applications. Suppose that you have a WSGI application in '/webapps/wsgiapp'. Then that folder must contain at least three entries: - 'passenger_wsgi.py', which Phusion Passenger will use as the main entry point for your application. This file must export a WSGI object called `application`. - 'public/', a folder containing public static web assets, like images and stylesheets. - 'tmp/', used for 'restart.txt' (our application restart mechanism). This will be explained in a following subsection. So '/webapps/wsgiapp' must, at minimum, look like this: ---------------------- /webapps/wsgiapp | +-- config.ru | +-- public/ | +-- tmp/ ---------------------- === Tutorial/example: writing and deploying a Hello World WSGI application === First we create a Phusion Passenger-compliant WSGI directory structure: ------------------------------------------- $ mkdir /webapps/wsgi_example $ mkdir /webapps/wsgi_example/public $ mkdir /webapps/wsgi_example/tmp ------------------------------------------- Next, we write a minimal "hello world" WSGI application: ------------------------------------------- $ cd /webapps/wsgi_example $ some_awesome_editor passenger_wsgi.py ...type in some source code... $ cat passenger_wsgi.py def application(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) return [b"hello world!\n"] ------------------------------------------- Finally, we deploy it by adding the following configuration options to the Apache configuration file: ------------------------------------------- ServerName www.wsgiexample.com DocumentRoot /webapps/wsgi_example/public Allow from all Options -MultiViews ------------------------------------------- And we're done! After an Apache restart, the above WSGI application will be available under the URL 'http://www.wsgiexample.com/'. === Deploying to a virtual host's root === Add a virtual host entry to your Apache configuration file. Make sure that the following conditions are met: - The virtual host's document root must point to your WSGI application's 'public' folder. - The WSGI per-directory permissions must allow access to this folder. - MultiViews must be disabled for this folder. For example: ------------------------------------------- ServerName www.wsgiapp.com DocumentRoot /webapps/wsgiapp/public Allow from all Options -MultiViews ------------------------------------------- You may also need to tweak your file/folder permissions. Make sure that the following folders are readable and executable by Apache: * this 'public' folder. * the application's 'config' folder. * all parent folders. That is, /webapps/wsgiapp and /webapps must also be readable and executable by Apache. Then restart Apache. The application has now been deployed. [[deploying_python_to_sub_uri]] === Deploying to a sub URI === Suppose that you already have a virtual host: ------------------------------------------- ServerName www.phusion.nl DocumentRoot /websites/phusion Allow from all ------------------------------------------- And you want your Python application, located in `/websites/python`, to be accessible from the URL 'http://www.phusion.nl/subapp'. To do this, you need to perform the following: 1. Set `Alias {SUBURI} {PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY}`. 2. Create a `` block. 3. Inside the Location block, set `PassengerBaseURI /{SUBURI}`. 4. Inside the Location block, set `PassengerAppRoot {PATH TO YOUR APPLICATION ROOT}`. 5. Create a `` block. 6. Inside the Directory block, set `Allow from all`. 7. Inside the Directory block, disable MultiViews. Here is an example: ------------------------------------------- ServerName www.phusion.nl DocumentRoot /websites/phusion Allow from all # These have been added: Alias /subapp /websites/python/public PassengerBaseURI /subapp PassengerAppRoot /websites/python Allow from all Options -MultiViews ------------------------------------------- Then restart Apache. The application has now been deployed to the sub-URI. === Redeploying (restarting the WSGI application) === Deploying a new version of a WSGI application is as simple as re-uploading the application files, and restarting the application. There are two ways to restart the application: 1. By restarting Apache. 2. By creating or modifying the file 'tmp/restart.txt' in the WSGI application's <>. Phusion Passenger will automatically restart the application. For example, to restart our example application, we type this in the command line: ------------------------------------------- touch /webapps/wsgiapp/tmp/restart.txt ------------------------------------------- == Deploying a Node.js application Please refer to link:https://github.com/phusion/passenger/wiki/Phusion-Passenger%3A-Node.js-tutorial[the Node.js tutorial]. == Deploying a Meteor application Please refer to link:https://github.com/phusion/passenger/wiki/Phusion-Passenger:-Meteor-tutorial[the Meteor tutorial]. == Configuring Phusion Passenger == After installation, Phusion Passenger does not need any further configurations. Nevertheless, the system administrator may be interested in changing Phusion Passenger's behavior. Phusion Passenger's Apache module supports the following configuration options: === PassengerRoot === The location to the Phusion Passenger root directory. This configuration option is essential to Phusion Passenger, and allows Phusion Passenger to locate its own data files. The correct value is given by the installer. If you've moved Phusion Passenger to a different directory then you need to update this option as well. Please read <> for more information. This required option may only occur once, in the global server configuration. [[PassengerDefaultRuby]] === PassengerDefaultRuby === :version: 4.0.0 include::users_guide_snippets/since_version.txt[] This option specifies the default Ruby interpreter to use for web apps as well as for all sorts of internal Phusion Passenger helper scripts, e.g. the one used by <>. Please see <> for more information, as well as how it relates to <>. This option may occur in the global server configuration. The default value is 'ruby', meaning that the Ruby interpreter will be looked up according to the `PATH` environment variable. === Deployment options [[PassengerEnabled]] ==== PassengerEnabled You can set this option to 'off' to completely disable Phusion Passenger for a certain location. This is useful if, for example, you want to integrate a PHP application into the same virtual host as a Rails application. Suppose that you have a Rails application in '/apps/foo'. Suppose that you've dropped Wordpress -- a blogging application written in PHP -- in '/apps/foo/public/wordpress'. You can then configure Phusion Passenger as follows: ------------------------------------ ServerName www.foo.com DocumentRoot /apps/foo/public PassengerEnabled off AllowOverride all # <-- Makes Wordpress's .htaccess file work. ------------------------------------ This way, Phusion Passenger will not interfere with Wordpress. 'PassengerEnabled' may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess'. In each place, it may be specified at most once. The default value is 'on'. [[PassengerRuby]] ==== PassengerRuby The `PassengerDefaultRuby` and `PassengerRuby` directives specify the Ruby interpreter to use. Similarly, the `PassengerPython` and `PassengerNodejs` directives are for specifying the Python interpreter and the Node.js command, respectively. The relationship between `PassengerDefaultRuby` and `PassengerRuby` is as follows: * `PassengerDefaultRuby` may only occur in the global server configuration. * `PassengerRuby` may occur everywhere: in the global server configuration, in ``, in ``, in ``, and in '.htaccess' if `AllowOverride Options` is on. * You don't *have* to specify `PassengerRuby`. In this case `PassengerDefaultRuby` is used as the Ruby interpreter. But if you do specify `PassengerRuby` then it will override `PassengerDefaultRuby` in that context. This allows you to use `PassengerRuby` to specify a different Ruby interpreter on a per-application basis. Phusion Passenger not only uses Ruby to run web apps, but also for running certain helper tools that are written in Ruby, e.g. the internal helper script used by <>. These tools are always run using `PassengerDefaultRuby`, never by `PassengerRuby`. `PassengerRuby` is only used for running web apps. You can learn more about the internal helper scripts in <>. It is okay if `PassengerDefaultRuby` refers to a different Ruby interpreter than the one you originally installed Phusion Passenger with. This too is explained in <>. The reason why `PassengerDefaultRuby` exists at all is because limitations in the Apache API prevents us from implementing the same behavior using only the `PassengerRuby` directive. There is no `PassengerDefaultPython` etc because there are no Phusion Passenger tools written in Python. As such, having `PassengerPython` is enough. The following example illustrates how it works and how you can use these options to specify different interpreters for different web apps. ------------------------------ # Use Ruby 1.8.7 by default. PassengerDefaultRuby /usr/bin/ruby1.8 # Use Python 2.6 by default. PassengerPython /usr/bin/python2.6 # Use /usr/bin/node by default. PassengerNodejs /usr/bin/node; # This Rails web app will use Ruby 1.8.7 ServerName www.foo.com DocumentRoot /webapps/foo/public # This Rails web app will use Ruby 1.9.3, as installed by RVM PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3/ruby ServerName www.bar.com DocumentRoot /webapps/bar/public # If you have a web app deployed in a sub-URI, customize # PassengerRuby/PassengerPython inside a block. # The web app under www.bar.com/blog will use JRuby 1.7.1 Alias /blog /websites/blog/public PassengerBaseURI /blog PassengerAppRoot /websites/blog PassengerRuby /usr/local/rvm/wrappers/jruby-1.7.1/ruby Allow from all Options -MultiViews # This Flask web app will use Python 3.0 PassengerPython /usr/bin/python3.0 ServerName www.baz.com DocumentRoot /webapps/baz/public ------------------------------ include::users_guide_snippets/rvm_helper_tool.txt[] ==== PassengerPython :version: 4.0.0 include::users_guide_snippets/since_version.txt[] This option allows one to specify the Python interpreter to use. See <> for more information. The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable. ==== PassengerNodejs :version: 4.0.24 include::users_guide_snippets/since_version.txt[] This option allows one to specify the Node.js command to use. See <> for more information. The default value is 'node', meaning that the Node.js command will be looked up according to the `PATH` environment variable. [[PassengerAppEnv]] ==== PassengerAppEnv ==== This option sets the value of the following environment variables: * `RAILS_ENV` * `RACK_ENV` * `WSGI_ENV` * `NODE_ENV` * `PASSENGER_APP_ENV` Some web frameworks, for example Rails and Connect.js, adjust their behavior according to the value in one of these environment variables. Phusion Passenger for Apache sets the default value to **production**. If you're developing an Rails application then you should set this to `development`. If you want to set other environment variables, please refer to <>. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Options` is on. In each place, it may be specified at most once. [[rails_env]] ==== RailsEnv ==== An alias for <>. [[rack_env]] ==== RackEnv ==== An alias for <>. [[PassengerAppRoot]] ==== PassengerAppRoot By default, Phusion Passenger assumes that the application's root directory is the parent directory of the 'public' directory. This option allows one to specify the application's root independently from the DocumentRoot, which is useful if the 'public' directory lives in a non-standard place. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Options` is on. In each place, it may be specified at most once. Example: ----------------------------- DocumentRoot /var/rails/zena/sites/example.com/public PassengerAppRoot /var/rails/zena # <-- normally Phusion Passenger would # have assumed that the application # root is "/var/rails/zena/sites/example.com" ----------------------------- [[PassengerBaseURI]] ==== PassengerBaseURI ==== Used to specify that the given URI is a Phusion Passenger-served application. Please refer to the following sections for examples: * <> * <= 3) to a sub URI>> * <> This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Options` is on. ==== PassengerRestartDir As described in the deployment chapters of this document, Phusion Passenger checks the file 'tmp/restart.txt' in the applications' <> for restarting applications. Sometimes it may be desirable for Phusion Passenger to look in a different directory instead, for example for security reasons (see below). This option allows you to customize the directory in which 'restart.txt' is searched for. You may specify 'PassengerRestartDir' in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverrides Options` is enabled. In each place, it may be specified at most once. You can either set it to an absolute directory, or to a directory relative to the <>. Examples: ----------------------------------- ServerName www.foo.com # Phusion Passenger will check for /apps/foo/public/tmp/restart.txt DocumentRoot /apps/foo/public ServerName www.bar.com DocumentRoot /apps/bar/public # An absolute filename is given; Phusion Passenger will # check for /restart_files/bar/restart.txt PassengerRestartDir /restart_files/bar ServerName www.baz.com DocumentRoot /apps/baz/public # A relative filename is given; Phusion Passenger will # check for /apps/baz/restart_files/restart.txt # # Note that this directory is relative to the APPLICATION ROOT, *not* # the value of DocumentRoot! PassengerRestartDir restart_files ----------------------------------- .What are the security reasons for wanting to customize PassengerRestartDir? Touching restart.txt will cause Phusion Passenger to restart the application. So anybody who can touch restart.txt can effectively cause a Denial-of-Service attack by touching restart.txt over and over. If your web server or one of your web applications has the permission to touch restart.txt, and one of them has a security flaw which allows an attacker to touch restart.txt, then that will allow the attacker to cause a Denial-of-Service. You can prevent this from happening by pointing PassengerRestartDir to a directory that's readable by Apache, but only writable by administrators. [[PassengerRollingRestarts]] ==== PassengerRollingRestarts :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] Enables or disables support for rolling restarts through restart.txt. Normally when you restart an application by touching restart.txt, Phusion Passenger would shut down all application processes and spawn a new one. The spawning of a new application process could take a while, and any requests that come in during this time will be blocked until this first application process has spawned. But when rolling restarts are enabled, Phusion Passenger Enterprise will: 1. Spawn a new process in the background. 2. When it's done spawning, Phusion Passenger Enterprise will replace one of the old processes with this newly spawned one. 3. Step 1 and 2 are repeated until all processes have been replaced. This way, visitors will not experience any delays when you are restarting your application. This allows you to, for example, upgrade your application often without degrading user experience. Rolling restarts have a few caveat however that you should be aware of: - Upgrading an application sometimes involves upgrading the database schema. With rolling restarts, there may be a point in time during which processes belonging to the previous version and processes belonging to the new version both exist at the same time. Any database schema upgrades you perform must therefore be backwards-compatible with the old application version. - Because there's no telling which process will serve a request, users may not see changes brought about by the new version until all processes have been restarted. It is for this reason that you should not use rolling restarts in development, only in production. If Passenger Enterprise could not rolling restart a process (let's call it 'A') because it is unable to spawn a new process (let's call it 'B'), then Passenger Enterprise will give up trying to rolling restart that particular process 'A'. What happens next depends on whether <> is enabled: - If deployment error resistance is disabled (the default), then Passenger Enterprise will proceed with trying to restart the remaining processes. - If deployment error resistance is enabled, the Passenger Enterprise will give up rolling restarting immediately. The application group will be put into Deployment Error Resistance Mode. Please note that `PassengerRollingRestarts` is completely unrelated to the `passenger-config restart-app` command. That command always initiates a blocking restart, unless `--rolling-restart` is given. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Options` is on. In each place, it may be specified at most once. The default value is 'off'. [[PassengerResistDeploymentErrors]] ==== PassengerResistDeploymentErrors :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] Enables or disables resistance against deployment errors. Suppose you've upgraded your application and you've issues a command to restart it (by touching restart.txt), but the application code contains an error that prevents Phusion Passenger from successfully spawning a process (e.g. a syntax error). Phusion Passenger would normally display an error message in response to this. By enabling deployment error resistance, Phusion Passenger Enterprise would instead do this: - It passes the request to one of the existing application processes (that belong to the previous version of the application). The visitor will not see a Phusion Passenger process spawning error message. - It logs the error to the global web server error log file. - It sets an internal flag (Deployment Error Resistance Mode) so that no processes for this application will be spawned (even when the current traffic would normally result in more processes being spawned) and no processes will be idle cleaned. Processes *could* still be shutdown because of other events, e.g. because their <> have been reached. You can see whether the flag is set by invoking `passenger-status`. If you see the message "Resisting deployment error" then the flag is set. This way, visitors will suffer minimally from deployment errors. Phusion Passenger will attempt to restart the application again next time restart.txt is touched. Enabling deployment error resistance only works if <> is also enabled. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Options` is on. In each place, it may be specified at most once. The default value is 'off'. === Process spawning options [[PassengerSpawnMethod]] ==== PassengerSpawnMethod [TIP] ."What spawn method should I use?" ========================================================= This subsection attempts to describe spawn methods, but it's okay if you don't (want to) understand it, as it's mostly a technical detail. You can basically follow this rule of thumb: ************************************************ If your application works on Mongrel or Thin, but not on Phusion Passenger, then set `PassengerSpawnMethod` to 'direct'. Otherwise, leave it at 'smart' (the default). ************************************************ However, we do recommend you to try to understand it. The 'smart' spawn method bring many benefits. ========================================================= include::users_guide_snippets/passenger_spawn_method.txt[] This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. In each place, it may be specified at most once. The default value is 'smart'. [[PassengerLoadShellEnvvars]] ==== PassengerLoadShellEnvvars :version: 4.0.20 include::users_guide_snippets/since_version.txt[] Enables or disables the loading of shell environment variables before spawning the application. If this option is turned on, and the user's shell is `bash`, then applications are loaded by running them with `bash -l -c`. Otherwise, they are loaded by running them directly from the `PassengerHelperAgent` process. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Options` is on. In each place, it may be specified at most once. The default value is 'on'. === Security options === [[PassengerUserSwitching]] ==== PassengerUserSwitching ==== Whether to enable <>. This option may only occur once, in the global server configuration. The default value is 'on'. [[PassengerUser]] ==== PassengerUser ==== If <> is enabled, then Phusion Passenger will by default run the web application as the owner of the file 'config/environment.rb' (for Rails apps) or 'config.ru' (for Rack apps). This option allows you to override that behavior and explicitly set a user to run the web application as, regardless of the ownership of 'environment.rb'/'config.ru'. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. In each place, it may be specified at most once. [[PassengerGroup]] ==== PassengerGroup ==== If <> is enabled, then Phusion Passenger will by default run the web application as the primary group of the owner of the file 'config/environment.rb' (for Rails apps) or 'config.ru' (for Rack apps). This option allows you to override that behavior and explicitly set a group to run the web application as, regardless of the ownership of 'environment.rb'/'config.ru'. '' may also be set to the special value '!STARTUP_FILE!', in which case the web application's group will be set to 'environment.rb'/'config.ru''s group. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. In each place, it may be specified at most once. [[PassengerDefaultUser]] ==== PassengerDefaultUser ==== Phusion Passenger enables <> by default. This configuration option allows one to specify the user that applications must run as, if user switching fails or is disabled. This option may only occur once, in the global server configuration. The default value is 'nobody'. [[PassengerDefaultGroup]] ==== PassengerDefaultGroup ==== Phusion Passenger enables <> by default. This configuration option allows one to specify the group that applications must run as, if user switching fails or is disabled. This option may only occur once, in the global server configuration. The default value is the primary group of the user specifified by <>. [[PassengerFriendlyErrorPages]] ==== PassengerFriendlyErrorPages ==== Phusion Passenger can display friendly error pages whenever an application fails to start. This friendly error page presents the startup error message, some suggestions for solving the problem, and a backtrace. This feature is very useful during application development and useful for less experienced system administrators, but the page might reveal potentially sensitive information, depending on the application. Experienced system administrators who are using Phusion Passenger on serious production servers should consider turning this feature off. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Options` is on. In each place, it may be specified at most once. The default value is 'on'. === Resource control and optimization options === [[PassengerMaxPoolSize]] ==== PassengerMaxPoolSize ==== The maximum number of <> that may simultaneously exist. A larger number results in higher memory usage, but improves the ability to handle concurrent HTTP requests. The optimal value depends on your system's hardware and your workload. You can learn more at the Phusion article link:http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/[Tuning Phusion Passenger's concurrency settings]. If you find that your server is running out of memory then you should lower this value. This option may only occur once, in the global server configuration. The default value is '6'. [[PassengerMinInstances]] ==== PassengerMinInstances ==== This specifies the minimum number of application processes that should exist for a given application. You should set this option to a non-zero value if you want to avoid potentially long startup times after a website has been <> for an extended period. Please note that this option does *not* pre-start application processes during Apache startup. It just makes sure that when the application is first accessed: 1. at least the given number of processes will be spawned. 2. the given number of processes will be kept around even when processes are being idle cleaned (see <>). If you want to pre-start application processes during Apache startup, then you should use the <> directive, possibly in combination with 'PassengerMinInstances'. This behavior might seem counter-intuitive at first sight, but <> explains the rationale behind it. For example, suppose that you have the following configuration: --------------------------------- PassengerMaxPoolSize 15 PassengerPoolIdleTime 10 ServerName foobar.com DocumentRoot /webapps/foobar/public PassengerMinInstances 3 --------------------------------- When you start Apache, there are 0 application processes for 'foobar.com'. Things will stay that way until someone visits 'foobar.com'. Suppose that there is only 1 visitor. 1 application process will be started immediately to serve the visitor, while 2 will be spawned in the background. After 10 seconds, when the idle timeout has been reached, these 3 application processes will not be cleaned up. Now suppose that there's a sudden spike of traffic, and 100 users visit 'foobar.com' simultanously. Phusion Passenger will start 12 more application processes. After the idle timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application processes, keeping 3 processes around. The PassengerMinInstances option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Limits` is on. In each place, it may be specified at most once. The default value is '1'. [[PassengerMaxInstances]] ==== PassengerMaxInstances ==== :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] The maximum number of application processes that may simultaneously exist for an application. This helps to make sure that a single application will not occupy all available slots in the application pool. This value must be less than <>. A value of 0 means that there is no limit placed on the number of processes a single application may spawn, i.e. only the global limit of <> will be enforced. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. In each place, it may be specified at most once. The default value is '0'. .Practical usage example [TIP] =========================================================================== Suppose that you're hosting two web applications on your server, a personal blog and an e-commerce website. You've set <> to 10. The e-commerce website is more important to you. You can then set 'PassengerMaxInstances' to 3 for your blog, so that it will never spawn more than 3 processes, even if it suddenly gets a lot of traffic. Your e-commerce website on the other hand will be free to spawn up to 10 processes if it gets a lot of traffic. =========================================================================== ==== PassengerMaxInstancesPerApp ==== The maximum number of application processes that may simultaneously exist for a single application. This helps to make sure that a single application will not occupy all available slots in the application pool. This value must be less than <>. A value of 0 means that there is no limit placed on the number of processes a single application may use, i.e. only the global limit of <> will be enforced. This option may only occur once, in the global server configuration. The default value is '0'. .Practical usage example [TIP] =========================================================================== Suppose that you're hosting two blogs (blog A and B) on your server, and that you've set <> to 10. Under normal circumstances, if blog A suddenly gets a lot of traffic, then A will use all 10 pool slots. If blog B suddenly gets some traffic, then it will only be able to use 1 pool slot (forcefully releasing 1 slot from A) until A's traffic has settled down and it has released more pool slots. If you consider both blogs equally important, then you can set 'PassengerMaxInstancesPerApp' to 5. This way, both blogs will never use more than 5 pool slots. =========================================================================== .Relation with PassengerMaxInstances [NOTE] =========================================================================== Unlike <>, this configuration option is global and applies to all applications. 'PassengerMaxInstances' on the other hand is per-virtual host. Suppose that you're hosting two web applications on your server, a personal blog and an e-commerce website. You've set <> to 10. The e-commerce website is more important to you. You can then set 'PassengerMaxInstances' to 3 for your blog, so that it will never use more than 3 pool slots, even if it suddenly gets a lot of traffic. Your e-commerce website on the other hand will be free to use up all 10 slots if it gets a lot of traffic. In summary, 'PassengerMaxInstancesPerApp' divides the pool equally among the different web applications, while 'PassengerMaxInstances' allows one to divide the pool unequally, according to each web application's relative importance. =========================================================================== [[PassengerPoolIdleTime]] ==== PassengerPoolIdleTime ==== The maximum number of seconds that an application process may be idle. That is, if an application process hasn't received any traffic after the given number of seconds, then it will be shutdown in order to conserve memory. Decreasing this value means that applications will have to be spawned more often. Since spawning is a relatively slow operation, some visitors may notice a small delay when they visit your Rails/Rack website. However, it will also free up resources used by applications more quickly. The optimal value depends on the average time that a visitor spends on a single Rails/Rack web page. We recommend a value of `2 * x`, where `x` is the average number of seconds that a visitor spends on a single Rails/Rack web page. But your mileage may vary. When this value is set to '0', application processes will not be shutdown unless it's really necessary, i.e. when Phusion Passenger is out of application processes for a given application and one of the <> needs to make place for another application process. Setting the value to 0 is recommended if you're on a non-shared host that's only running a few applications, each which must be available at all times. This option may only occur once, in the global server configuration. The default value is '300'. [[PassengerMaxPreloaderIdleTime]] ==== PassengerMaxPreloaderIdleTime ==== The ApplicationSpawner server (explained in <>) has an idle timeout, just like the backend processes spawned by Phusion Passenger do. That is, it will automatically shutdown if it hasn't done anything for a given period. This option allows you to set the ApplicationSpawner server's idle timeout, in seconds. A value of '0' means that it should never idle timeout. Setting a higher value will mean that the ApplicationSpawner server is kept around longer, which may slightly increase memory usage. But as long as the ApplicationSpawner server is running, the time to spawn a Ruby on Rails backend process only takes about 10% of the time that is normally needed, assuming that you're using the 'smart' or 'smart-lv2' <>. So if your system has enough memory, is it recommended that you set this option to a high value or to '0'. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. In each place, it may be specified at most once. The default value is '300' (5 minutes). ==== PassengerStartTimeout ==== :version: 4.0.15 include::users_guide_snippets/since_version.txt[] Specifies a timeout for the startup of application processes. If an application process fails to start within the timeout period then it will be forcefully killed with SIGKILL, and the error will be logged. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Limits` is on. In each place, it may be specified at most once. The default value is '90'. [[PassengerConcurrencyModel]] ==== PassengerConcurrencyModel ==== :version: 4.0.0 include::users_guide_snippets/enterprise_only.txt[] Specifies the I/O concurrency model that should be used for application processes. Phusion Passenger supports two concurrency models: * 'process' - single-threaded, multi-processed I/O concurrency. Each application process only has a single thread and can only handle 1 request at a time. This is the concurrency model that Ruby applications traditionally used. It has excellent compatiblity (can work with applications that are not designed to be thread-safe) but is unsuitable for workloads in which the application has to wait for a lot of external I/O (e.g. HTTP API calls), and uses more memory because each process has a large memory overhead. * 'thread' - multi-threaded, multi-processed I/O concurrency. Each application process has multiple threads (customizable via <>). This model provides much better I/O concurrency and uses less memory because threads share memory with each other within the same process. However, using this model may cause compatibility problems if the application is not designed to be thread-safe. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess'. In each place, it may be specified at most once. The default value is 'process'. [[PassengerThreadCount]] ==== PassengerThreadCount ==== :version: 4.0.0 include::users_guide_snippets/enterprise_only.txt[] Specifies the number of threads that Phusion Passenger should spawn per application process. This option only has effect if <> is 'thread'. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess'. In each place, it may be specified at most once. The default value is '1'. [[PassengerMaxRequests]] ==== PassengerMaxRequests ==== The maximum number of requests an application process will process. After serving that many requests, the application process will be shut down and Phusion Passenger will restart it. A value of 0 means that there is no maximum: an application process will thus be shut down when its idle timeout has been reached. This option is useful if your application is leaking memory. By shutting it down after a certain number of requests, all of its memory is guaranteed to be freed by the operating system. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Limits` is on. In each place, it may be specified at most once. The default value is '0'. [CAUTION] ===================================================== The <> directive should be considered as a workaround for misbehaving applications. It is advised that you fix the problem in your application rather than relying on these directives as a measure to avoid memory leaks. ===================================================== [[PassengerMaxRequestTime]] ==== PassengerMaxRequestTime ==== :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] The maximum amount of time, in seconds, that an application process may take to process a request. If the request takes longer than this amount of time, then the application process will be forcefully shut down, and possibly restarted upon the next request. A value of 0 means that there is no time limit. This option is useful for preventing your application from freezing for an indefinite period of time. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Limits` is on. In each place, it may be specified at most once. The default value is '0'. .Example Suppose that most of your requests are known to finish within 2 seconds. However, there is one URI, '/expensive_computation', which is known to take up to 10 seconds. You can then configure Phusion Passenger as follows: ---------------------------------------------- ServerName www.example.com DocumentRoot /webapps/my_app/public PassengerMaxRequestTime 2 PassengerMaxRequestTime 10 ---------------------------------------------- If a request to '/expensive_computation' takes more than 10 seconds, or if a request to any other URI takes more than 2 seconds, then the corresponding application process will be forced to shutdown. [CAUTION] ===================================================== The <> directive should be considered as a workaround for misbehaving applications. It is advised that you fix the problem in your application rather than relying on these directives as a measure to avoid freezing applications. ===================================================== [[PassengerMemoryLimit]] ==== PassengerMemoryLimit ==== :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] The maximum amount of memory that an application process may use, in megabytes. Once an application process has surpassed its memory limit, it will process all the requests currently present in its queue and then shut down. A value of 0 means that there is no maximum: the application's memory usage will not be checked. This option is useful if your application is leaking memory. By shutting it down, all of its memory is guaranteed to be freed by the operating system. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Limits` is on. In each place, it may be specified at most once. The default value is '0'. [NOTE] .A word about permissions ===================================================== The <> directive uses `ps` command to query memory usage information. On Linux, it further queries `/proc` to obtain additional memory usage information that's not obtainable through `ps`. You should ensure that the `ps` works correctly and that the `/proc` filesystem is accessible by the `PassengerHelperAgent` process. ===================================================== [CAUTION] ===================================================== The <> and <> directives should be considered as workarounds for misbehaving applications. It is advised that you fix the problem in your application rather than relying on these directives as a measure to avoid memory leaks. ===================================================== ==== PassengerStatThrottleRate ==== By default, Phusion Passenger performs several filesystem checks (or, in programmers jargon, 'stat() calls') each time a request is processed: - It checks whether 'config/environment.rb', 'config.ru' or 'passenger_wsgi.py' is present, in order to autodetect Rails, Rack and WSGI applications. - It checks whether 'restart.txt' has changed or whether 'always_restart.txt' exists, in order to determine whether the application should be restarted. On some systems where disk I/O is expensive, e.g. systems where the harddisk is already being heavily loaded, or systems where applications are stored on NFS shares, these filesystem checks can incur a lot of overhead. You can decrease or almost entirely eliminate this overhead by setting 'PassengerStatThrottleRate'. Setting this option to a value of 'x' means that the above list of filesystem checks will be performed at most once every 'x' seconds. Setting it to a value of '0' means that no throttling will take place, or in other words, that the above list of filesystem checks will be performed on every request. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Limits` is on. In each place, it may be specified at most once. The default value is '0'. [[PassengerPreStart]] ==== PassengerPreStart ==== By default, Phusion Passenger does not start any application processes until said web application is first accessed. The result is that the first visitor of said web application might experience a small delay as Phusion Passenger is starting the web application on demand. If that is undesirable, then this directive can be used to pre-started application processes during Apache startup. A few things to be careful of: - This directive accepts the *URL* of the web application you want to pre-start, not a on/off value! This might seem a bit weird, but read on for rationale. As for the specifics of the URL: * The domain part of the URL must be equal to the value of the 'ServerName' directive of the VirtualHost block that defines the web application. * Unless the web application is deployed on port 80, the URL should contain the web application's port number too. * The path part of the URL must point to some URI that the web application handles. - You will probably want to combine this option with <> because application processes started with 'PassengerPreStart' are subject to the usual idle timeout rules. See the example below for an explanation. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. In each place, it may be specified any number of times. ===== Example 1: basic usage ===== Suppose that you have the following web applications. --------------------------- ServerName foo.com DocumentRoot /webapps/foo/public ServerName bar.com DocumentRoot /webapps/bar/public --------------------------- You want both of them to be pre-started during Apache startup. The URL for foo.com is 'http://foo.com/' (or, equivalently, 'http://foo.com:80/') and the URL for bar.com is 'http://bar.com:3500/'. So we add two PassengerPreStart directives, like this: --------------------------- ServerName foo.com DocumentRoot /webapps/foo/public ServerName bar.com DocumentRoot /webapps/bar/public PassengerPreStart http://foo.com/ # <--- added PassengerPreStart http://bar.com:3500/ # <--- added --------------------------- ===== Example 2: pre-starting apps that are deployed in sub-URIs ===== Suppose that you have a web application deployed in a sub-URI '/store', like this: --------------------------- ServerName myblog.com DocumentRoot /webapps/wordpress Alias /store /websites/store/public PassengerBaseURI /store PassengerAppRoot /websites/store Allow from all Options -MultiViews --------------------------- Then specify the domain name of its containing virtual host followed by the sub-URI, like this: --------------------------- ServerName myblog.com DocumentRoot /webapps/wordpress Alias /store /websites/store/public PassengerBaseURI /store PassengerAppRoot /websites/store Allow from all Options -MultiViews PassengerPreStart http://myblog.com/store # <----- added --------------------------- The sub-URI *must* be included; if you don't then the directive will have no effect. The following example is wrong and won't pre-start the store web application: --------------------------- PassengerPreStart http://myblog.com/ # <----- WRONG! Missing "/store" part. --------------------------- ===== Example 3: combining with PassengerMinInstances ===== Application processes started with PassengerPreStart are also subject to the idle timeout rules as specified by <>! That means that by default, the pre-started application processes for foo.com are bar.com are shut down after a few minutes of inactivity. If you don't want that to happen, then you should combine PassengerPreStart with <>, like this: --------------------------- ServerName foo.com DocumentRoot /webapps/foo/public # Added! PassengerMinInstances 1 ServerName bar.com DocumentRoot /webapps/bar/public # Added! PassengerMinInstances 1 PassengerPreStart http://foo.com/ PassengerPreStart http://bar.com:3500/ --------------------------- ===== So why a URL? Why not just an on/off flag? ===== A directive that accepts a simple on/off flag is definitely more intuitive, but due technical difficulties w.r.t. the way Apache works, it's very hard to implement it like that: - It is very hard to obtain a full list of web applications defined in the Apache configuration file(s). In other words, it's hard for Phusion Passenger to know which web applications are deployed on Apache until a web application is first accessed, and without such a list Phusion Passenger wouldn't know which web applications to pre-start. It's probably not completely impossible to obtain such a list, but this brings us to the following point; - Users expect things like 'mod_env' to work even in combination with Phusion Passenger. For example some people put ``SetEnv PATH=....'' in their virtual host block and they expect the web application to pick that environment variable up when it's started. Information like this is stored in module-specific locations that Phusion Passenger cannot access directly. Even if the previous bullet point is solved and we can obtain a list of web applications, we cannot start the application with the correct mod_env information. mod_env is just one such example; there are probably many other Apache modules, all of which people expect to work, but we cannot answer to those expectations if PassengerPreStart is implemented as a simple on/off flag. So as a compromise, we made it accept a URL. This is easier to implement for us and altough it looks weird, it behaves consistently w.r.t. cooperation with other Apache modules. ===== What does Phusion Passenger do with the URL? ===== During Apache startup, Phusion Passenger will send a dummy HEAD request to the given URL and discard the result. In other words, Phusion Passenger simulates a web access at the given URL. However this simulated request is always sent to localhost, *not* to the IP that the domain resolves to. Suppose that bar.com in example 1 resolves to 209.85.227.99; Phusion Passenger will send the following HTTP request to 127.0.0.1 port 3500 (and not to 209.85.227.99 port 3500): ---------------------- HEAD / HTTP/1.1 Host: bar.com Connection: close ---------------------- Similarly, for example 2, Phusion Passenger will send the following HTTP request to 127.0.0.1 port 80: ---------------------- HEAD /store HTTP/1.1 Host: myblog.com Connection: close ---------------------- ===== Do I need to edit /etc/hosts and point the domain in the URL to 127.0.0.1? ===== No. See previous subsection. ===== My web application consists of multiple web servers. What URL do I need to specify, and in which web server's Apache config file? ===== Put the web application's virtual host's ServerName value and the virtual host's port in the URL, and put PassengerPreStart on all machines that you want to pre-start the web application on. The simulated web request is always sent to 127.0.0.1, with the domain name in the URL as value for the 'Host' HTTP header, so you don't need to worry about the request ending up at a different web server in the cluster. ===== Does PassengerPreStart support https:// URLs? ===== Yes. And it does not perform any certificate validation. [[PassengerHighPerformance]] ==== PassengerHighPerformance ==== By default, Phusion Passenger is compatible with mod_rewrite and most other Apache modules. However, a lot of effort is required in order to be compatible. If you turn 'PassengerHighPerformance' to 'on', then Phusion Passenger will be a little faster, in return for reduced compatibility with other Apache modules. In places where 'PassengerHighPerformance' is turned on, mod_rewrite rules will likely not work. mod_autoindex (the module which displays a directory index) will also not work. Other Apache modules may or may not work, depending on what they exactly do. We recommend you to find out how other modules behave in high performance mode via testing. This option is *not* an all-or-nothing global option: you can enable high performance mode for certain virtual hosts or certain URLs only. The 'PassengerHighPerformance' option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess'. In each place, it may be specified at most once. The default value is 'off', so high performance mode is disabled by default, and you have to explicitly enable it. .When to enable high performance mode? If you do not use mod_rewrite or other Apache modules then it might make sense to enable high performance mode. It's likely that some of your applications depend on mod_rewrite or other Apache modules, while some do not. In that case you can enable high performance for only those applications that don't use other Apache modules. For example: ------------------------------------ ServerName www.foo.com DocumentRoot /apps/foo/public .... mod_rewrite rules or options for other Apache modules here ... ServerName www.bar.com DocumentRoot /apps/bar/public PassengerHighPerformance on ------------------------------------ In the above example, high performance mode is only enabled for www.bar.com. It is disabled for everything else. If your application generally depends on mod_rewrite or other Apache modules, but a certain URL that's accessed often doesn't depend on those other modules, then you can enable high performance mode for a certain URL only. For example: ------------------------------------ ServerName www.foo.com DocumentRoot /apps/foo/public .... mod_rewrite rules or options for other Apache modules here ... PassengerHighPerformance on ------------------------------------ This enables high performance mode for http://www.foo.com/chatroom/ajax_update_poll only. ///////////////////////////////////////// ///////////////////////////////////////// === Connection handling options === [[PassengerBufferUpload]] ==== PassengerBufferUpload ==== :version: 4.0.26 include::users_guide_snippets/since_version.txt[] When turned on, HTTP request uploads (HTTP POST request bodies) will be buffered before sending the request to the application. Enabling upload buffering protects the application from slow clients, but will also prevent the ability to track upload progress. If you want to allow your application to track upload progress, it is recommended that you disable upload buffering for specific URIs only. For example: ------------------------ # Disable upload buffering for /upload_video only. PassengerBufferUpload off ------------------------ This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess'. In each place, it may be specified at most once. The default value is 'on'. [[PassengerBufferResponse]] ==== PassengerBufferResponse ==== When turned on, application-generated responses are buffered by Apache. Buffering will happen in memory. Before we proceed with explaining this configuration option, we want to state the following to avoid confusion. If you use Phusion Passenger for Apache, there are in fact two response buffering systems active: 1. The Apache response buffering system. `PassengerBufferResponse` turns this on or off. 2. The Phusion Passenger response buffering system, a.k.a. 'real-time disk-backed response buffering'. This buffering system is always on, regardless of the value of `PassengerBufferResponse`. Response buffering is useful because it protects against slow HTTP clients that do not read responses immediately or quickly enough. Buffering prevents such slow clients from blocking web applications that have limited concurrency. Because Phusion Passenger's response buffering is always turned on, you are always protected. Therefore, `PassengerBufferResponse` is off by default, and you never should have to turn it on. If for whatever reason you want to turn Apache-level response buffering on, you can do so with this option. Apache's response buffering works differently from Phusion Passenger's. Apache's buffering system buffers the entire response before attempting to send it to the client, while Phusion Passenger's attempts to send the data to the client immediately. Therefore, if you turn on `PassengerBufferResponse`, you may interfere with applications that want to stream responses to the client. Apache's version also buffers to memory only, making it problematic for large responses. Phusion Passenger's version buffers to disk when the response exceeds a certain threshold. How does response buffering - whether it's done by Apache or by Phusion Passenger - exactly protect against slow clients? Consider an HTTP client that's on a dial-up modem link, and your application process generates a 2 MB response. If the response is buffered then your application process will be blocked until the entire 2 MB has been sent out to the HTTP client. This disallows your application process to do any useful work in the mean time. By buffering responses, Phusion Passenger or Apache will read the application response as quickly as possible and will take care of forwarding the data to slow clients. So keep in mind that enabling `passenger_buffering_response` will make streaming responses impossible. Consider for example this piece of Rails code: -------------------------------- render :text => lambda { |response, output| 10.times do |i| output.write("entry #{i}\n") output.flush sleep 1 end } -------------------------------- ...or this piece of Rack code: -------------------------------- class Response def each 10.times do |i| yield("entry #{i}\n") sleep 1 end end end app = lambda do |env| [200, { "Content-Type" => "text/plain" }, Response.new] end -------------------------------- When `PassengerBufferResponse` is turned on, Apache will wait until the application is done sending the entire response before forwarding it to the client. The client will not receive anything for 10 seconds, after which it receives the entire response at once. When `PassengerBufferResponse` is turned off, it works as expected: the client receives an "entry X" message every second for 10 seconds. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess'. In each place, it may be specified at most once. The default value is 'off'. [NOTE] ===================================================== The <> directive should be turned off if responses can be huge. Because entire responses are buffered in memory when turned on. ===================================================== [[PassengerErrorOverride]] ==== PassengerErrorOverride ==== :version: 4.0.24 include::users_guide_snippets/since_version.txt[] Decides whether Apache will intercept and handle responses with HTTP status codes of 400 and higher. This directive is useful where you want to have a common look and feel on the error pages seen by the end user. This also allows for included files (via mod_include's SSI) to get the error code and act accordingly (default behavior would display the error page of the proxied server, turning this on shows the SSI Error message). This directive does not affect the processing of informational (1xx), normal success (2xx), or redirect (3xx) responses. By default, all responses are sent as-is from the application or from the Phusion Passenger core. If you turn this option on then Apache will be able to handle such responses using the Apache `ErrorDocument` option. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess'. In each place, it may be specified at most once. The default value is 'off'. [[PassengerMaxRequestQueueSize]] ==== PassengerMaxRequestQueueSize ==== :version: 4.0.15 include::users_guide_snippets/since_version.txt[] When all application processes are already handling their maximum number of concurrent requests, Phusion Passenger will queue all incoming requests. This option specifies the maximum size for that queue. If the queue is already at this specified limit, then Phusion Passenger will immediately send a "503 Service Unavailable" error to any incoming requests. A value of 0 means that the queue is unbounded. link:http://stackoverflow.com/questions/20402801/what-is-optimal-value-for-phusion-passenger-passengermaxrequestqueuesize[This article on StackOverflow] explains how the request queue works, what it means for the queue to grow or become full, why that is bad, and what you can do about it. You may combine this option with <> and `ErrorDocument` to set a custom error page whenever the queue is full. In the following example, Apache will serve /error503.html whenever the queue is full: --------------------------------- PassengerErrorOverride on ErrorDocument 504 /error504.html --------------------------------- This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess'. In each place, it may be specified at most once. The default value is '100'. === Compatibility options === [[PassengerResolveSymlinksInDocumentRoot]] ==== PassengerResolveSymlinksInDocumentRoot ==== Configures whether Phusion Passenger should resolve symlinks in the document root. Please refer to <> for more information. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Options` is on. In each place, it may be specified at most once. It is off by default. ==== PassengerAllowEncodedSlashes ==== By default, Apache doesn't support URLs with encoded slashes (%2f), e.g. URLs like this: `/users/fujikura%2fyuu`. If you access such an URL then Apache will return a 404 Not Found error. This can be solved by turning on PassengerAllowEncodedSlashes as well as Apache's link:http://httpd.apache.org/docs/2.0/mod/core.html#allowencodedslashes[AllowEncodedSlashes]. Is it important that you turn on both AllowEncodedSlashes *and* PassengerAllowEncodedSlashes, otherwise this feature will not work properly. PassengerAllowEncodedSlashes may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Options` is on. In each place, it may be specified at most once. It is off by default. Please note however that turning on support for encoded slashes will break support for mod_rewrite passthrough rules. Because of bugs/limitations in Apache, Phusion Passenger can support either encoded slashes or mod_rewrite passthrough rules, but not both at the same time. Luckily this option can be specified anywhere, so you can enable it only for virtual hosts or URLs that need it: ---------------------------------- ServerName www.example.com DocumentRoot /webapps/example/public AllowEncodedSlashes on RewriteEngine on # Check for maintenance file and redirect all requests RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] # Make /about an alias for /info/about. RewriteRule ^/about$ /info/about [PT,L] # In a location block so that it doesn't interfere with the # above /about mod_rewrite rule. PassengerAllowEncodedSlashes on ---------------------------------- With this, http://www.example.com/users/fujikura%2fyuu will work properly, and accessing http://www.example.com/about will properly display the result of http://www.example.com/info/about. Notice that PassengerAllowEncodedSlashes only interferes with passthrough rules, not with any other mod_rewrite rules. The rules for displaying maintenance.html will work fine even for URLs starting with "/users". === Logging and debugging options === [[PassengerLogLevel]] ==== PassengerLogLevel ==== This option allows one to specify how much information Phusion Passenger should write to the Apache error log file. A higher log level value means that more information will be logged. Possible values are: - '0': Show only errors and warnings. - '1': Show the most important debugging information. This might be useful for system administrators who are trying to figure out the cause of a problem. - '2': Show more debugging information. This is typically only useful for developers. - '3': Show even more debugging information. This option may only occur once, in the global server configuration. The default is '0'. ==== PassengerDebugLogFile ==== By default Phusion Passenger debugging and error messages are written to the global web server error log. This option allows one to specify the file that debugging and error messages should be written to instead. This option may only occur once, in the global server configuration. ==== PassengerDebugger ==== :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] Turns support for application debugging on or off. In case of Ruby applications, turning this option on will cause them to load the `ruby-debug` gem (when on Ruby 1.8), the `debugger` gem (when on Ruby 1.9) or the `byebug` gem (when on Ruby 2.0). If you're using Bundler, you should add this to your Gemfile: ------------------------------------------- gem 'ruby-debug', :platforms => :ruby_18 gem 'debugger', :platforms => :ruby_19 gem 'byebug', :platforms => :ruby_20 ------------------------------------------- Once debugging is turned on, you can use the command `passenger-irb --debug ` to attach an rdebug console to the application process with the given PID. Attaching will succeed once the application process executes a `debugger` command. This option may occur in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverride Options` is on. In each place, it may be specified at most once. The default value is 'off'. === Advanced options [[PassengerTempDir]] ==== PassengerTempDir Specifies the directory that Phusion Passenger should use for storing temporary files. This includes things such as Unix socket files, buffered file uploads (see also <>), etc. This option may be specified once, in the global server configuration. The default temp directory that Phusion Passenger uses is '/tmp'. This option is especially useful if Apache is not allowed to write to /tmp (which is the case on some systems with strict SELinux policies) or if the partition that /tmp lives on doesn't have enough disk space. .Command line tools Some Phusion Passenger command line administration tools, such as `passenger-status`, must know what Phusion Passenger's temp directory is in order to function properly. You can pass the directory through the `PASSENGER_TMPDIR` environment variable, or the `TMPDIR` environment variable (the former will be used if both are specified). For example, if you set 'PassengerTempDir' to '/my_temp_dir', then invoke `passenger-status` after you've set the `PASSENGER_TMPDIR` or `TMPDIR` environment variable, like this: ---------------------------------------------------------- export PASSENGER_TMPDIR=/my_temp-dir sudo -E passenger-status # The -E option tells 'sudo' to preserve environment variables. ---------------------------------------------------------- [[PassengerUploadBufferDir]] ==== PassengerUploadBufferDir Phusion Passenger buffers large file uploads to disk in order prevent slow file uploads from blocking web applications. By default, a subdirectory in the system's temporary files directory (or a subdirectory in the directory specified in <>, if set) is automatically created for storing these buffered file uploads. This configuration directive allows you to specify a different directory for storing buffered file uploads. If you've specified such a directory (as opposed to using Phusion Passenger's default) then you *must* ensure that this directory exists. This configuration directive is also useful if you're using apache2-mpm-itk. The buffered file upload directory that Phusion Passenger creates by default has very strict permissions: it can only be accessed by the Apache worker processes. However, Phusion Passenger assumes that all Apache worker processes are running as the same user. apache2-mpm-itk breaks this assumption by running multiple Apache worker processes as different users. So if you're using apace2-mpm-itk, you should set this option to a directory that is writable by all Apache worker processes, such as '/tmp'. You may specify 'PassengerUploadBufferDir' in the following places: * In the global server configuration. * In a virtual host configuration block. * In a `` or `` block. * In '.htaccess', if `AllowOverrides Options` is enabled. In each place, it may be specified at most once. === Deprecated or removed options === The following options have been deprecated, but are still supported for backwards compatibility reasons. ==== RailsRuby ==== Deprecated in favor of <>. ==== RailsBaseURI and RackBaseURI ==== Deprecated in favor of <>. ==== RailsUserSwitching ==== Deprecated in favor of <>. ==== RailsDefaultUser ==== Deprecated in favor of <>. ==== RailsAllowModRewrite ==== This option doesn't do anything anymore in recent versions of Phusion Passenger. ==== RailsSpawnMethod ==== Deprecated in favor of <>. ==== RailsAutoDetect, RackAutoDetect and WsgiAutoDetect ==== These options have been removed in version 4.0.0 as part of an optimization. You should use <> instead. ==== RailsAppSpawnerIdleTime ==== This option has been removed in version 4.0.0, and replaced with <>. ==== RailsFrameworkSpawnerIdleTime ==== This option is no longer available in version 4.0.0. There is no alternative because framework spawning has been removed altogether. You should use smart spawning instead. [[troubleshooting]] == Troubleshooting include::users_guide_snippets/troubleshooting/default.txt[] === OS X: The installer cannot locate MAMP's Apache **Symptoms**:: The installer finds Apache 2 development headers at `/Applications/MAMP/Library/bin/apxs`. However, Apache cannot be found. The installer also outputs the following error: + ------------------------------------ cannot open /Applications/MAMP/Library/build/config_vars.mk: No such file or directory at /Applications/MAMP/Library/bin/apxs line 218. ------------------------------------ **Cause**:: Your MAMP installation seems to be broken. In particular, 'config_vars.mk' is missing. **Solution**:: Please read link:http://forum.mamp.info/viewtopic.php?t=1866[this forum topic] to learn how to fix this problem. See also link:http://code.google.com/p/phusion-passenger/issues/detail?id=12[this bug report]. === Apache reports a "403 Forbidden" error See next subsection. === Static assets such as images and stylesheets aren't being displayed Static assets are accelerated, i.e. they are served directly by Apache and do not go through the Rails stack. There are two reasons why Apache doesn't serve static assets correctly: 1. Your Apache configuration is too strict, and does not allow HTTP clients to access static assets. This can be achieved with an `Allow from all` directive in the correct place. For example: + ----------------------------------------- Options FollowSymLinks AllowOverride None Order allow,deny Allow from all ----------------------------------------- + See also link:http://groups.google.com/group/phusion-passenger/browse_thread/thread/9699a639a87f85f4/b9d71a03bf2670a5[this discussion]. 2. The Apache process doesn't have permission to access your Rails application's folder. Please make sure that the Rails application's folder, as well as all of its parent folders, have the correct permissions and/or ownerships. === The Apache error log says that the spawn manager script does not exist, or that it does not have permission to execute it If you are sure that the 'PassengerRoot' configuration option is set correctly, then this problem is most likely caused by the fact that you're running Apache with SELinux. On Fedora, CentOS and RedHat Enterprise Linux, Apache is locked down by SELinux policies. To solve this problem, you must set some permissions on the Phusion Passenger files and folders, so that Apache can access them. - If you've installed Phusion Passenger via a gem, then run this command to determine Phusion Passenger's root folder: + ------------------------------------------------------------------ passenger-config --root ------------------------------------------------------------------ + Next, run the following command: + ------------------------------------------------------------------ chcon -R -h -t httpd_sys_content_t /path-to-passenger-root ------------------------------------------------------------------ + where '/path-to-passenger-root' should be replaced with whatever `passenger-config --root` printed. - If you've installed Phusion Passenger via the source tarball, then run the following command: + ------------------------------------------------------------------ chcon -R -h -t httpd_sys_content_t /path/to/passenger/folder ------------------------------------------------------------------ Once the permissions are fixed, restart Apache. === The application thinks its not on SSL even though it is Rails and many other frameworks infers whether it's running on SSL through the CGI environment variable `HTTPS`. Apache always sets this variable when on SSL, except when SSL is incorrectly configured. Most Apache installations already configure SSL by default on port 443 (conf/extra/httpd-ssl.conf). Some people think they can save some typing in subsequent SSL vhost blocks, and omit important options like 'SSLEngine on', like this: -------------------------------------- # httpd-ssl.conf contains something like: # # SSLEngine on # ... # Include conf/extra/httpd-ssl.conf ServerName www.example.com DocumentRoot /webapps/example/public -------------------------------------- *This is wrong!* In each SSL vhost block you must re-specify all the SSL options. Otherwise Apache won't properly detect the vhost as an SSL vhost block. Here's the corrected example: -------------------------------------- Include conf/extra/httpd-ssl.conf ServerName www.example.com DocumentRoot /webapps/example/public SSLEngine on ...more SSL options here... -------------------------------------- include::users_guide_snippets/troubleshooting/rails.txt[] [[conflicting_apache_modules]] === Conflicting Apache modules === ==== mod_userdir ==== 'mod_userdir' is not compatible with Phusion Passenger at the moment. ==== MultiViews (mod_negotiation) ==== MultiViews is not compatible with Phusion Passenger. You should disable MultiViews for all Phusion Passenger hosts. ==== VirtualDocumentRoot ==== VirtualDocumentRoot is not compatible with Phusion Passenger at the moment. == Analysis and system maintenance == include::users_guide_snippets/analysis_and_system_maintenance.txt[] == Tips == include::users_guide_snippets/tips.txt[] === X-Sendfile support === Phusion Passenger does not provide X-Sendfile support by itself. Please install link:http://tn123.ath.cx/mod_xsendfile/[mod_xsendfile] for X-Sendfile support. === Upload progress === Phusion Passenger does not provide upload progress support by itself. Please try drogus's link:http://github.com/drogus/apache-upload-progress-module/tree/master[ Apache upload progress module] instead. == Under the hood == Phusion Passenger hides a lot of complexity for the end user (i.e. the web server system administrator), but sometimes it is desirable to know what is going on. This section describes a few things that Phusion Passenger does under the hood. include::users_guide_snippets/under_the_hood/page_caching_support.txt[] include::users_guide_snippets/under_the_hood/relationship_with_ruby.txt[] === Static assets serving === Phusion Passenger accelerates serving of static files. This means that, if an URI maps to a file that exists, then Phusion Passenger will let Apache serve that file directly, without hitting the web application. Phusion Passenger does all this without the need for any mod_rewrite rules. People who are switching from an old Mongrel-based setup might have mod_rewrite rules such as these: ------------------------------------------------------------ # Check whether this request has a corresponding file; if that # exists, let Apache serve it, otherwise forward the request to # Mongrel. RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ balancer://mongrel%{REQUEST_URI} [P,QSA,L] ------------------------------------------------------------ These kind of mod_rewrite rules are no longer required, and you can safely remove them. [[application_detection]] === How Phusion Passenger detects whether a virtual host is a web application === After you've read the deployment instructions you might wonder how Phusion Passenger knows that the DocumentRoot points to a web application that Phusion Passenger is able to serve, and how it knows what kind of web application it is (e.g. Rails or Rack). Phusion Passenger checks whether the virtual host is a Rails application by checking whether the following file exists: ------------------------------------------------ dirname(DocumentRoot) + "/config/environment.rb" ------------------------------------------------ If you're not a programmer and don't understand the above pseudo-code snippet, it means that Phusion Passenger will: 1. Extract the parent directory filename from the value of the DocumentRoot directory. 2. Append the text "/config/environment.rb" to the result, and check whether the resulting filename exists. So suppose that your document root is '/webapps/foo/public'. Phusion Passenger will check whether the file '/webapps/foo/config/environment.rb' exists. Note that Phusion Passenger does *not* resolve any symlinks in the document root path by default since version 2.2.0 -- in contrast to versions earlier than 2.2.0, which do resolve symlinks. So for example, suppose that your DocumentRoot points to '/home/www/example.com', which in turn is a symlink to '/webapps/example.com/public'. In versions earlier than 2.2.0, Phusion Passenger will check whether '/webapps/example.com/config/environment.rb' exists because it resolves all symlinks. Phusion Passenger 2.2.0 and later however will check for '/home/www/config/environment.rb'. This file of course doesn't exist, and as a result Phusion Passenger will not activate itself for this virtual host, and you'll most likely see an Apache mod_dirindex directory listing. If you need the old symlink-resolving behavior for whatever reason, then you can turn on <>. Another way to solve this situation is to explicitly tell Phusion Passenger what the correct application root is through the <> configuration directive. Autodetection of Rack applications happens through the same mechanism, exception that Phusion Passenger will look for 'config.ru' instead of 'config/environment.rb'. include::users_guide_snippets/appendix_a_about.txt[] include::users_guide_snippets/appendix_b_terminology.txt[] include::users_guide_snippets/appendix_c_spawning_methods.txt[] [[about_environment_variables]] == Appendix D: About environment variables include::users_guide_snippets/environment_variables.txt[] passenger-4.0.37/doc/Users guide Nginx.html000644 000765 000024 00002013574 12233035540 021106 0ustar00honglistaff000000 000000 Phusion Passenger users guide, Nginx version

1. Support information

1.1. Supported operating systems

Phusion Passenger works on any POSIX-compliant operating system. In other words: practically any operating system on earth, except Microsoft Windows.

Phusion Passenger is confirmed on a large number of operating systems and Linux distributions, including, but not limited to, Ubuntu, Debian, CentOS/Fedora/RHEL, Gentoo, Mac OS X, FreeBSD and Solaris. OpenBSD is supported since version 5.2. Both 32-bit and 64-bit platforms are supported.

Please report a bug or join our discussion forum if it doesn’t work on your POSIX-compliant operating system.

1.2. Where to get support

  • Community discussion forum - post a message here if you’re experiencing problems. Support on this forum is provided by the community on a best-effort basis, so a (timely) response is not guaranteed.

  • Issue tracker - report bugs here.

  • Email support@phusion.nl if you are a Phusion Passenger Enterprise customer. Please mention your order reference. If you are not an Enterprise customer, we kindly redirect you to the community discussion forum instead.

  • Commercial support contracts are also available.

  • Report security vulnerabilities to security@phusion.nl. We will do our best to respond to you as quickly as we can, so please do not disclose the vulnerability until then.

Please consult the Phusion Passenger website for a full list of support resources.

2. Installation

2.1. Synopsis

Because Phusion Passenger is designed to run in a wide variety of operating systems and configurations, there are multiple ways to install it. Most users  — especially first-time users — will prefer OS-specific installation instructions. These are not only the easiest, but also allow Phusion Passenger to integrate into the operating system in the best way possible. Other users should consult the generic installation instructions.

The steps for upgrading or downgrading Phusion Passenger is almost the same as the steps for installing. All the installation guides in this section will also teach you how to upgrade and downgrade.

2.2. Installing or upgrading on Mac OS X with Homebrew

Open source

Every time we release a new Phusion Passenger version, we make it available through Homebrew. Please note that the Homebrew maintainers have to merge our pull requests manually, so it may take a day or two before a new version shows up in the official Homebrew repository.

  1. Update the Homebrew recipes:

    brew update
  2. Run one of the following, and follow the instructions:

    brew install passenger nginx --with-passenger
    -OR-
    brew upgrade passenger nginx --with-passenger
    Note
    Upgrade note

    If Phusion Passenger has been updated, but no new Nginx version has been released, then you must also reinstall Nginx against the latest version of Phusion Passenger:

    brew reinstall nginx --with-passenger
Enterprise

Phusion Passenger Enterprise is currently not available through Homebrew. Please try one of the other installation methods instead.

2.3. Installing or upgrading on Debian or Ubuntu

We provide and official Phusion Passenger APT repository. This APT repository contains Phusion Passenger packages for multiple versions of Debian and Ubuntu. These packages are automatically built by our build server after we push out a source release, and thus are always up to date with the official source releases.

If you use these packages to install Phusion Passenger then you do not need to run passenger-install-apache2-module or passenger-install-nginx-module. These packages contain all the binaries that you need.

Packages are available for the x86 and x86_64 architectures. Our policy is to support all Ubuntu LTS releases that are still supported by Canonical, plus the latest non-LTS Ubuntu release, plus all Debian releases that are still supported by Debian.

2.3.1. Adding our APT repository

  1. Install our PGP key. Packages are signed by "Phusion Automated Software Signing (auto-software-signing@phusion.nl)", fingerprint 1637 8A33 A6EF 1676 2922 526E 561F 9B9C AC40 B2F7.

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
  2. Add HTTPS support for APT. Our APT repository is stored on an HTTPS server.

    sudo apt-get install apt-transport-https ca-certificates
  3. Create a file /etc/apt/sources.list.d/passenger.list and insert one of the following lines, depending on your distribution.

    Open source
    ##### !!!! Only add ONE of these lines, not all of them !!!! #####
    # Ubuntu 13.10
    deb https://oss-binaries.phusionpassenger.com/apt/passenger saucy main
    # Ubuntu 12.04
    deb https://oss-binaries.phusionpassenger.com/apt/passenger precise main
    # Ubuntu 10.04
    deb https://oss-binaries.phusionpassenger.com/apt/passenger lucid main
    # Debian 7
    deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main
    # Debian 6
    deb https://oss-binaries.phusionpassenger.com/apt/passenger squeeze main
    Enterprise
    ##### !!!! Only add ONE of these lines, not all of them !!!! #####
    # Ubuntu 13.10
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt saucy main
    # Ubuntu 12.04
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt precise main
    # Ubuntu 10.04
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt lucid main
    # Debian 7
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt wheezy main
    # Debian 6
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt squeeze main

    You can find the correct value for YOUR_DOWNLOAD_TOKEN in the Customer Area.

  4. Secure passenger.list and update your APT cache:

    sudo chown root: /etc/apt/sources.list.d/passenger.list
    sudo chmod 600 /etc/apt/sources.list.d/passenger.list
    sudo apt-get update

2.3.2. Installing packages

Note You should install nginx-extras even if you have already installed an Nginx package from the official Debian/Ubuntu repository. This is because the Nginx binary that our packages supply is compiled with the Passenger module.
Open source
  1. Add our APT repository.

  2. Install the packages:

    sudo apt-get install nginx-extras passenger
  3. Edit /etc/nginx/nginx.conf and uncomment passenger_root and passenger_ruby.

  4. Restart Nginx:

    sudo service nginx restart
Enterprise
  1. Download your license key from the Customer Area and save it as /etc/passenger-enterprise-license.

  2. Add our APT repository.

  3. Install the packages:

    sudo apt-get install nginx-extras passenger-enterprise
  4. Edit /etc/nginx/nginx.conf and uncomment passenger_root and passenger_ruby.

  5. Restart Nginx:

    sudo service nginx restart

2.4. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux

Warning The RPMs are currently unmaintained. As such, the repository only contains Phusion Passenger 3.x (the latest version is 4.x), which did not support Node.js, Meteor, multiple Rubies, etc. For more recent versions of Phusion Passenger, you are suggested to install from gem or tarball instead.

YUM repositories with RPMs are maintained by Erik Ogan and Stealthy Monkeys Consulting. Only packages for the open source version of Phusion Passenger are provided. Phusion Passenger Enterprise customers should use the generic RubyGems installation method or the generic tarball installation method instead.

If you use YUM to install Phusion Passenger then you do not need to run passenger-install-apache2-module or passenger-install-nginx-module. The YUM packages contain all the binaries that you need. You also don’t need to modify any Apache or Nginx configuration to get them to load Phusion Passenger, the packages provide configuration snippets for you as well.

Step 1: Import the Stealthy Monkeys Consulting’s GPG key

rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc

Step 2: Install the release package

Install the passenger-release package from the main repository.

Fedora Core 17:

yum install http://passenger.stealthymonkeys.com/fedora/17/passenger-release.noarch.rpm

Fedora Core 16:

yum install http://passenger.stealthymonkeys.com/fedora/16/passenger-release.noarch.rpm

Fedora Core 15:

yum install http://passenger.stealthymonkeys.com/fedora/15/passenger-release.noarch.rpm

Fedora Core 14:

yum install http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm

RHEL 6 / CentOS 6 / ScientificLinux 6: (Note: these packages depend on EPEL.)

yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm

RHEL 5 / CentOS 5 / ScientificLinux 5: (Note: these packages depend on EPEL.)

rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm

Step 3: Install the right Phusion Passenger package

From there you can use YUM to install packages. For example, try one of these:

Phusion Passenger for Apache:

yum install mod_passenger

Phusion Passenger for Nginx:

yum install nginx-passenger

Phusion Passenger Standalone:

yum install passenger-standalone

Building your own packages

There are instructions for building your own packages and Yum repositories in the rpm directory ReadMe within the GitHub repository.

2.5. Generic installation, upgrade and downgrade method: via RubyGems

RubyGems is only used as a method to obtain the Phusion Passenger files, so in case you have multiple Ruby versions it does not matter which Ruby’s RubyGems you use for installation. Once installed, Phusion Passenger can work with all other Ruby versions on your system. This is explained in Phusion Passenger and its relationship with Ruby.

Step 1: figuring out whether your Ruby is installed in the home directory or system-wide

Ruby may either be installed in the home directory, or system-wide. If it’s installed system-wide then we will want to install gems system-wide as well, so you need to switch to a root prompt first. If Ruby is installed in the home directory then we will want to install gems to the home directory as well, as a normal user.

To find out which case applies, run the following command to find out where the ruby command is:

which ruby

Do you see a filename that references /home or /Users? If so then your Ruby interpreter is installed in your home directory and you can proceed to step 2. Otherwise, you need to switch to a root prompt by running one of the following commands:

  • Are you using RVM? Run rvmsudo -s

  • Are you not using RVM, or do you not know what RVM is? Run sudo -s

  • Is sudo not installed on your system? Run su -c bash

You must maintain this root prompt throughout this installation guide.

Step 2: install the gem

Open Source

Install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger:

gem install passenger
Previous versions and beta versions

Sometimes you will want to obtain the latest beta version of Phusion Passenger. Beta versions are not normally selected by gem install, so to opt-in for beta versions you have to add the --pre argument:

gem install passenger --pre

If you want to obtain a specific version of Phusion Passenger, e.g. because you are downgrading, then specify the version number with --version:

gem install passenger --version 3.0.0

If you want to obtain a specific beta version of Phusion Passenger then you must also pass --pre:

gem install passenger --version 3.9.1.beta --pre
Enterprise

First, download the license key from the Customer Area and save it as /etc/passenger-enterprise-license.

Next, add the Phusion Passenger Enterprise gem server to your RubyGems source list:

gem source --add https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_gems/

Substitute YOUR_DOWNLOAD_TOKEN with the one you find in the Customer Area. And notice the trailing slash in the URL! It is very important.

Finally, install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger:

gem install passenger-enterprise-server
Previous versions and beta versions

Sometimes you will want to obtain the latest beta version of Phusion Passenger Enterprise. Beta versions are not normally selected by gem install, so to opt-in for beta versions you have to add the --pre argument:

gem install passenger-enterprise-server --pre

If you want to obtain a specific version of Phusion Passenger Enterprise, e.g. because you are downgrading, then specify the version number with --version:

gem install passenger-enterprise-server --version 3.0.0

If you want to obtain a specific beta version of Phusion Passenger then you must also pass --pre:

gem install passenger-enterprise-server --version 3.9.1.beta --pre

Step 3: run the Phusion Passenger installer

Nginx is a different from other web servers in that it does not support loadable modules. The only way to extend Nginx is to recompile it entirely from source. Since Phusion Passenger consists of some external executables plus an Nginx module, you must recompile Nginx when first installing Phusion Passenger, but also when upgrading Nginx itself or when upgrading the Phusion Passenger version.

Recompiling Nginx and the Phusion Passenger executables is what we will do in this step. The good news is that Phusion Passenger provides a tool to make this easy for you.

If you’ve already installed Nginx before, but without Phusion Passenger support, then you should uninstall it first. You don’t have to, because you can also install another Nginx with Phusion Passenger support, in parallel to the existing Nginx. We merely recommend uninstalling the existing in order to avoid user confusion, but the choice is yours.

If you had previously installed Nginx with Phusion Passenger support, and you are upgrading, then you don’t have to uninstall your existing Nginx first. Instead we’ll overwrite it this step. But it is important that you recompile Nginx with the configure parameters that you used last time.

Here’s how you can uninstall the original Nginx:

  • If you installed the existing Nginx through APT, run: sudo apt-get remove nginx nginx-full nginx-light nginx-naxsi nginx-common

  • If you installed the existing Nginx through YUM, run yum remove nginx as root.

To proceed with installing or upgrading Phusion Passenger, run the Phusion Passenger Nginx installer and follow the on-screen instructions:

passenger-install-nginx-module

At some point it will ask you which prefix to install Nginx to. If you’re upgrading, then specify the same prefix that you used last time, as well as the same configuration parameters that you used last time.

Step 4: restarting the Flying Passenger daemon

If you are using Flying Passenger then you must restart the Flying Passenger daemon by sending it the SIGTERM signal:

kill `cat /path-to/flying-passenger.pid`

Or, if Flying Passenger is not running with a PID file, look up its PID us ps and then send it SIGTERM:

ps aux | grep flying-passenger
kill PID_OF_FLYING_PASSENGER

Step 5: verifying that Phusion Passenger is running

Restart your web server and run:

passenger-memory-stats

You should see the web server processes as well as a number of Phusion Passenger processes (e.g. PassengerWatchdog, PassengerHelperAgent). Congratulations, Phusion Passenger is now installed and running! At this point you may be interested in creating an Nginx init script.

If the output is not as expected, then please refer to the Troubleshooting section.

2.6. Generic installation, upgrade and downgrade method: via tarball

Step 1: installing Ruby

Phusion Passenger supports multiple languages and its core is written in C++, but its installer and administration tools are written in Ruby, so you must install Ruby.

Even though Ruby is required, Ruby will normally not be loaded during normal operation unless you deploy a Ruby web application on Phusion Passenger. Phusion Passenger’s dependency on Ruby is very minimal. See Phusion Passenger and its relationship with Ruby for details.

Debian, Ubuntu

sudo apt-get update
sudo apt-get install ruby rake

Red Hat, CentOS, ScientificLinux, Amazon Linux

Enable EPEL, then run as root:
yum install ruby rubygem-rake

Mac OS X

No action needed. Ruby is installed by default.

Other operating systems

Install Ruby from the Ruby website.

Step 2: download and extract the tarball

Open Source

Download the open source Phusion Passenger tarball from the Phusion Passenger website.

Older versions can be found in the release archive.

Enterprise

Phusion Passenger Enterprise customers can download the Phusion Passenger Enterprise tarball from the Customer Area.

Also be sure to download the license key and save it as /etc/passenger-enterprise-license.

Once you have downloaded the tarball, pick a location to extract it to. You can pick any location. A good location is /opt/passenger. Create this directory and extract the tarball as follows:

mkdir /opt/passenger
cd /opt/passenger
tar xzvf /location-to/passenger-x.x.x.tar.gz
cd /opt/passenger/passenger-x.x.x

Note that passenger-x.x.x should be passenger-enterprise-server-x.x.x if you’re using Phusion Passenger Enterprise.

Step 3: run the Phusion Passenger installer

Nginx is a different from other web servers in that it does not support loadable modules. The only way to extend Nginx is to recompile it entirely from source. Since Phusion Passenger consists of some external executables plus an Nginx module, you must recompile Nginx when first installing Phusion Passenger, but also when upgrading Nginx itself or when upgrading the Phusion Passenger version.

Recompiling Nginx and the Phusion Passenger executables is what we will do in this step. The good news is that Phusion Passenger provides a tool to make this easy for you.

If you’ve already installed Nginx before, but without Phusion Passenger support, then you should uninstall it first. You don’t have to, because you can also install another Nginx with Phusion Passenger support, in parallel to the existing Nginx. We merely recommend uninstalling the existing in order to avoid user confusion, but the choice is yours.

If you had previously installed Nginx with Phusion Passenger support, and you are upgrading, then you don’t have to uninstall your existing Nginx first. Instead we’ll overwrite it this step. But it is important that you recompile Nginx with the configure parameters that you used last time.

Here’s how you can uninstall the original Nginx:

  • If you installed the existing Nginx through APT, run: sudo apt-get remove nginx nginx-full nginx-light nginx-naxsi nginx-common

  • If you installed the existing Nginx through YUM, run yum remove nginx as root.

To proceed with installing or upgrading Phusion Passenger, run the Phusion Passenger Nginx installer and follow the on-screen instructions:

./bin/passenger-install-nginx-module

At some point it will ask you which prefix to install Nginx to. If you’re upgrading, then specify the same prefix that you used last time, as well as the same configuration parameters that you used last time.

Step 4: restarting the Flying Passenger daemon

If you are using Flying Passenger then you must restart the Flying Passenger daemon by sending it the SIGTERM signal:

kill `cat /path-to/flying-passenger.pid`

Or, if Flying Passenger is not running with a PID file, look up its PID us ps and then send it SIGTERM:

ps aux | grep flying-passenger
kill PID_OF_FLYING_PASSENGER

Step 5: verifying that Phusion Passenger is running

Restart your web server and run:

./bin/passenger-memory-stats

You should see the web server processes as well as a number of Phusion Passenger processes (e.g. PassengerWatchdog, PassengerHelperAgent). Congratulations, Phusion Passenger is now installed and running! At this point you may be interested in creating an Nginx init script.

If the output is not as expected, then please refer to the Troubleshooting section.

2.7. Upgrading from open source to Enterprise

Phusion Passenger comes in two variants: an open source version, as well as an Enterprise version which introduces a myriad of useful features that can improve stability and performance and efficiency.

Customers who have bought Phusion Passenger Enterprise can upgrade their open source installation to Enterprise as follows:

  1. Uninstall the open source Phusion Passenger.

  2. Install the Enterprise version by following one of the installation guides in this section (e.g. RubyGems generic installation or tarball generic installation).

The uninstallation is necessary because the Enterprise Ruby gem has a different gem name (passenger-enterprise-server instead of passenger), but the same administration command names (e.g. passenger-status). Uninstalling the open source version avoids any conflicts.

2.8. Cryptographic verification of installation files

2.8.1. Synopsis

We digitally sign various files with our GPG key so that you can check whether they’re legit, i.e. whether they really came from Phusion and haven’t been tampered with by a third party. We apply signing since the open source version 4.0.0 RC 4, or the Enterprise version 4.0.0 RC 1.

2.8.2. Importing the Phusion Software Signing key

Phusion’s GPG key for signing software is as follows:

Phusion Software Signing (software-signing@phusion.nl)
Short key ID: 0x0A212A8C
Long key ID: 0x2AC745A50A212A8C
Fingerprint: D5F0 8514 2693 9232 F437  AB72 2AC7 45A5 0A21 2A8C

This key is stored at the Phusion website and at the key servers sks-keyservers.net and keyserver.ubuntu.com. You can import it to your keyring with one of these command:

gpg --keyserver pool.sks-keyservers.net --search-keys 0x2AC745A50A212A8C
# -OR-
gpg --keyserver keyserver.ubuntu.com --search-keys 0x2AC745A50A212A8C

The Phusion Software Signing key is only used for signing software. It’s never used for signing emails or for encrypting files, so please be suspicious if you encounter usage of this key outside the context of signing software, and alert us at support@phusion.nl. Include "notspam" in the message to bypass our spam filter.

The email address software-signing@phusion.nl redirects to info@phusion.nl so it’s safe to send email there.

2.8.3. Verifying the Phusion Software Signing key

The Phusion Software Signing key is also signed by the Phusion founders. Their keys are as follows:

Hongli Lai (hongli@phusion.nl)
Short key ID: 4B6F4332
Long key ID: 06A131094B6F4332
Fingerprint: 64E8 0420 FC6A 499F 9E1F  81FA 06A1 3109 4B6F 4332
Ninh Bui (ninh@phusion.nl)
Short key ID: 6FAF3782
Long key ID: BA8DA3F46FAF3782
Fingerprint: 353A 398C 49AF 5CD5 74A0  656C BA8D A3F4 6FAF 3782

Both keys are stored at both sks-servers.net and keyserver.ubuntu.com. Import them with:

gpg --keyserver pool.sks-servers.net --search-keys 0x06A131094B6F4332
gpg --keyserver pool.sks-servers.net --search-keys 0xBA8DA3F46FAF3782
# -OR-
gpg --keyserver keyserver.ubuntu.com --search-keys 0x06A131094B6F4332
gpg --keyserver keyserver.ubuntu.com --search-keys 0xBA8DA3F46FAF3782

2.8.4. Verifying the gem and tarball

You can find the open source version’s gem and tarball GPG signatures at https://www.phusionpassenger.com/file_releases. The Enterprise version’s GPG signatures can be found in the Customer Area. All signatures have the .asc extension. Once you have imported our key, you can verify the validity of a file against its signature as follows:

$ gpg --verify passenger-x.x.x.tar.gz.asc passenger-x.x.x.tar.gz
gpg: Signature made Mon Mar 11 09:45:46 2013 CET using RSA key ID 0A212A8C
gpg: Good signature from "Phusion Software Signing <software-signing@phusion.nl>"

2.8.5. Verifying Git signatures

Tags in the Git repository for the open source version are also tagged. You can verify a Git tag as follows:

$ git tag --verify release-x.x.x
object d886f34b5705e4314feccaf0d77b9a38416e15e0
type commit
tag release-4.0.0.rc5
tagger Hongli Lai (Phusion) <hongli@phusion.nl> 1362993117 +0100

This is a tag message.
gpg: Signature made Mon Mar 11 10:12:02 2013 CET using RSA key ID 0A212A8C
gpg: Good signature from "Phusion Software Signing <software-signing@phusion.nl>"

2.8.6. Verifying DEB and RPM packages

The DEB and RPM packages are signed with the signatures of the respective packagers. They are automatically checked upon installation.

2.8.7. Revocation

In the event our key is compromised, we will revoke the key and upload the revocation information to sks-servers.net and keyserver.ubuntu.com. However your system will not know about the revocation until you update the keys from the keyservers. You should update your keys regularly (e.g. once a week) by invoking:

gpg --refresh-keys --keyserver pool.sks-servers.net
# -OR-
gpg --refresh-keys --keyserver keyserver.ubuntu.com

If you installed Phusion Passenger through our APT repository, then you should update APT’s keyring from time to time as well:

sudo apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com

2.9. Non-interactive, automatic, headless installs or upgrades

By default, the installer (passenger-install-nginx-module) is interactive. If you want to automate installation then you can do so by passing various answers to the installer through command line options. Please run the installer with --help for a list of available command line options.

2.10. Customizing the compilation process

The Phusion Passenger compilation process can be customized with environment variables. You can learn more about environment variables in About environment variables.

2.10.1. Setting the compiler

You can force the Phusion Passenger build system to use a specific C or C++ compiler by setting the CC and CXX environment variables. These may be set to any arbitrary shell commands.

For example, contributors who want to hack on Phusion Passenger may want to use Clang for faster compilation and ccache for faster recompilation, and may want to enable more error-catching compilation flags:

export CC='ccache clang -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
export CXX='ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
Note If you run the installer with sudo then environment variables may not be passed properly. Learn more at Environment variables and sudo.

2.10.2. Adding additional compiler or linker flags

On some systems, C/C++ libraries and headers that Phusion Passenger requires may be located in a non-standard directory. You can force the Phusion Passenger build system to look in those locations by injecting compiler and linker flags using the following environment variables:

EXTRA_PRE_CFLAGS

These flags are injected into all C compiler invocations that involve compiling C source files. This also covers compiler invocations that compile and link. The flags are injected at the beginning of the command string, even before EXTRA_PRE_LDFLAGS.

EXTRA_CFLAGS

Similar to EXTRA_PRE_CFLAGS, but injected at the end of the command string, before EXTRA_LDFLAGS.

EXTRA_PRE_CXXFLAGS

Similar to EXTRA_PRE_CFLAGS, but for C++ compiler invocations.

EXTRA_CXXFLAGS

Similar to EXTRA_CFLAGS, but for C++ compiler invocations.

EXTRA_PRE_LDFLAGS

These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile and link. The flags are injected at the beginning of the command string, but after EXTRA_PRE_CFLAGS/EXTRA_PRE_CXXFLAGS.

EXTRA_PRE_C_LDFLAGS

These flags are injected into all C compiler invocations that involve linking, right after EXTRA_PRE_LDFLAGS.

EXTRA_PRE_CXX_LDFLAGS

Similar to EXTRA_PRE_CXX_LDFLAGS, but for C++ compiler invocations.

EXTRA_LDFLAGS

Similar to EXTRA_PRE_LDFLAGS, but injected at the very end of the command string, even after EXTRA_CFLAGS and EXTRA_CXXFLAGS.

EXTRA_C_LDFLAGS

Similar to EXTRA_LDFLAGS, but only injected for C executable linking commands. Injected right after EXTRA_LDFLAGS.

EXTRA_CXX_LDFLAGS

Similar to EXTRA_LDFLAGS, but only injected for C++ executable linking commands. Injected right after EXTRA_LDFLAGS.

PASSENGER_THREAD_LOCAL_STORAGE

Setting this to 1 will enable the PASSENGER_THREAD_LOCAL_STORAGE macro, which forcefully disables the use of thread-local storage inside the Phusion Passenger codebase. Setting this environment variable is useful on systems that have broken support for thread-local storage, despite passing our build system’s check for proper thread-local storage support. At the time of writing, one user has reported that Ubuntu 12.04 32-bit has broken thread-local storage report although neither the reporter nor us were able to reproduce the problem on any other systems running Ubuntu 12.04 32-bit. Note that this flag has no effect on non-Phusion Passenger code.

Note If you run the installer with sudo then environment variables may not be passed properly. Learn more at Environment variables and sudo.

2.10.3. Forcing location of command line tools and dependencies

The Phusion Passenger build system attempts to autodetect many things by locating relevant helper tools. For example, to find out which compiler flags it should use for compiling Apache modules, it locates the apxs2 command and queries it. To find out which compiler flags it should use for libcurl, it queries the curl-config command. These commands may not be in $PATH, or even when they are you may want to use a different one.

You can force the build to find certain command line tools at certain locations by using the following environment variables:

HTTPD

The location of the httpd executable (the Apache server executable).

APXS2

The location of the apxs2 executable (the Apache module developer tool). Only used by passenger-install-apache2-module.

This environment variable, together with HTTPD, are what you need to customize if you have multiple Apache installations on your system, or if your Apache is located in a non-standard location which Phusion Passenger cannot detect. By setting APXS2 and HTTP to the right paths, you can force Phusion Passenger to be compiled against that specific Apache installation.

For example, if your Apache installation is located in /opt/lamp/apache2, then you can run the installer as follows:

$ sudo bash
# export HTTPD=/opt/lampp/apache2/bin/apache
# export APXS2=/opt/lampp/apache2/bin/apxs
# passenger-install-apache2-module
APR_CONFIG

The location of the apr-config executable (the Apache Portable Runtime developer tool).

APU_CONFIG

The location of the apu-config executable (the Apache Portable Runtime Utility developer tool).

MAKE

The location of a make tool. It does not matter which implementation of make this is.

GMAKE

The location of the GNU-compatible make tool.

Tip If you do not know what environment variables are, or how to use them, then please read Environment variables and sudo.
Note If you run the installer with sudo then environment variables may not be passed properly. Learn more at Environment variables and sudo.

2.11. Installing as a normal Nginx module without using the installer

You can also install Phusion Passenger the way you install any other Nginx module, e.g. with --add-module. This installation mode is useful if you already have an Nginx tarball somewhere.

You need to run Nginx’s configure script with --add-module=/path-to-passenger-nginx-addon-dir. The right value for /path-to-passenger-nginx-addon-dir can be obtained with the command:

passenger-config --nginx-addon-dir

After having installed Nginx with Phusion Passenger support, you must paste the following line into your Nginx configuration file:

passenger_root /path-to-passenger-root;

The right value for /path-to-passenger-root can be obtained by running the following command:

passenger-config --root

After having modified the Nginx configuration file, restart Nginx.

2.12. Creating an Nginx init script

If you installed Nginx with one of the generic installation methods then you won’t have an init script to start, stop and restart Nginx with. A bare Nginx installation works with signals: you start it by invoking it from the command line, you stop it by sending SIGTERM to it and you gracefully restart it by sending SIGHUP to it.

If you prefer to use an init script then please refer to the following resources:

When using one of those init scripts, please make sure that the paths inside the init script are correct. In particular, the paths to the Nginx binary, to the PID file and to the configuration file must match the actual locations of your Nginx installation.

2.13. Disabling without uninstalling

You can temporarily unload (disable) Phusion Passenger from the web server, without uninstalling the Phusion Passenger files, so that the web server behaves as if Phusion Passenger was never installed in the first place. This might be useful to you if - for example - you seem to be experiencing a problem caused by Phusion Passenger, but you want to make sure whether that’s actually the case without having to go through the hassle of uninstalling Phusion Passenger completely. When disabled, Phusion Passenger will not occupy any memory or CPU or otherwise interfere with the web server.

To unload Phusion Passenger, edit your Nginx configuration file(s) and comment out all Phusion Passenger configuration directives.

For example, if your configuration file looks like this


...

http {
    passenger_root /somewhere/passenger-x.x.x;
    passenger_ruby /usr/bin/ruby;
    passenger_max_pool_size 10;

    gzip on;

    server {
        server_name www.foo.com;
        listen 80;
        root /webapps/foo/public;
        passenger_enabled on;
    }
}


then comment out the relevant directives, so that it looks like this:

...

http {
    # passenger_root /somewhere/passenger-x.x.x;
    # passenger_ruby /usr/bin/ruby;
    # passenger_max_pool_size 10;

    gzip on;

    server {
        server_name www.foo.com;
        listen 80;
        root /webapps/foo/public;
        # passenger_enabled on;
    }
}

After you’ve done this, save the configuration file and restart the web server.

2.14. Uninstalling

To uninstall Phusion Passenger, please first remove all Phusion Passenger configuration directives from your web server configuration file(s). After you’ve done this, you need to remove the Phusion Passenger files.

  • If you installed Phusion Passenger via a Ruby gem, then run gem uninstall passenger (or, if you’re a Phusion Passenger Enterprise user, gem uninstall passenger-enterprise-server). You might have to run this as root.

  • If you installed Phusion Passenger via a source tarball, then remove the directory in which you placed the extracted Phusion Passenger files. This directory is the same as the one pointed to the by PassengerRoot/passenger_root configuration directive.

  • If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger.

  • If you installed Phusion Passenger through Homebrew, then run brew uninstall passenger.

Nginx does not have to be recompiled. Altough it contains Phusion Passenger code, it will not do anything when all Phusion Passenger configuration directives are removed.

2.15. Moving to a different directory

If you installed Phusion Passenger through a tarball then you can move the Phusion Passenger directory to another location. This is not possible if you used any of the other installation methods.

First, move the directory to whereever you like:

mv /opt/passenger/passenger-4.0.0 /usr/local/passenger-4.0.0

Next you must tell Nginx that Phusion Passenger has moved. Open your Nginx configuration file and set the passenger_root directive to the new location:

passenger_root /usr/local/passenger-4.0.0;

Restart your web server to finalize the change.

If you used the tarball installation method and you added Phusion Passenger’s bin subdirectory to PATH, then you must update your PATH with the new location. Open /etc/bashrc (or /etc/bash.bashrc on some systems) and change:

export PATH=/opt/passenger/passenger-4.0.0/bin:$PATH

to:

export PATH=/usr/local/passenger-4.0.0/bin:$PATH

Finally, restart all your shell sessions to activate the PATH change.

3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3) application

Suppose you have a Ruby on Rails application in /webapps/mycook, and you own the domain www.mycook.com. You can either deploy your application to the virtual host’s root (i.e. the application will be accessible from the root URL, http://www.mycook.com/), or in a sub URI (i.e. the application will be accessible from a sub URL, such as http://www.mycook.com/railsapplication).

Note The default RAILS_ENV environment in which deployed Rails applications are run, is “production”. You can change this by changing the rails_env configuration option.

3.1. Deploying to a virtual host’s root

Add a server virtual host entry to your Nginx configuration file. The virtual host’s root must point to your Ruby on Rails application’s public folder.

Inside the server block, set passenger_enabled on.

For example:

http {
    ...

    server {
        listen 80;
        server_name www.mycook.com;
        root /webapps/mycook/public;
        passenger_enabled on;
    }

    ...
}

Then restart Nginx. The application has now been deployed.

3.2. Deploying to a sub URI

Suppose that you already have a virtual host for the application /websites/phusion:

http {
    ...

    server {
        listen 80;
        server_name www.phusion.nl;
        root /websites/phusion;
        passenger_enabled on;
    }

    ...
}

And you want your Rails application, located in /websites/rails, to be accessible from the URL http://www.phusion.nl/subapp.

To do this, you need to perform the following:

  1. Create a location with parameter ~ ^/<SUBURI>(/.*|$). This is a regular expression that says: "match everything that is exactly <SUBURI>, or starts with <SUBDURI>/".

  2. Inside the location block, set alias <PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY>$1.

  3. Inside the location block, set passenger_base_uri <SUBURI>.

  4. Inside the location block, set passenger_app_root <PATH TO YOUR APPLICATION ROOT>.

  5. Inside the location block, set passenger_document_root <PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY>.

  6. Inside the location block, re-specify passenger_enabled on.

Here is an example:

http {
    ...

    server {
        listen 80;
        server_name www.phusion.nl;
        root /websites/phusion;

        # This block has been added.
        location ~ ^/subapp(/.*|$) {
            alias /websites/rails/public$1;  # <-- be sure to point to 'public'!
            passenger_base_uri /subapp;
            passenger_app_root /websites/rails;
            passenger_document_root /websites/rails/public;
            passenger_enabled on;
        }
    }

    ...
}

Then restart Nginx. The application has now been deployed on the sub-URI.

3.3. Redeploying (restarting the Ruby on Rails application)

Deploying a new version of a Ruby on Rails application is as simple as re-uploading the application files, and restarting the application.

There are two ways to restart the application:

  1. By restarting Nginx.

  2. By creating or modifying the file tmp/restart.txt in the Rails application’s root folder. Phusion Passenger will automatically restart the application during the next request.

For example, to restart our example MyCook application, we type this in the command line:

touch /webapps/mycook/tmp/restart.txt

Please note that, unlike earlier versions of Phusion Passenger, restart.txt is not automatically deleted. Phusion Passenger checks whether the timestamp of this file has changed in order to determine whether the application should be restarted.

3.4. Migrations

Phusion Passenger is not related to Ruby on Rails migrations in any way. To run migrations on your deployment server, please login to your deployment server (e.g. with ssh) and type rake db:migrate RAILS_ENV=production in a shell console, just like one would normally run migrations.

3.5. Capistrano integration

4. Deploying a Rack-based Ruby application (including Rails >= 3)

Phusion Passenger supports arbitrary Ruby web applications that follow the Rack interface.

Phusion Passenger assumes that Rack application directories have a certain layout. Suppose that you have a Rack application in /webapps/rackapp. Then that folder must contain at least three entries:

  • config.ru, a Rackup file for starting the Rack application. This file must contain the complete logic for initializing the application.

  • public/, a folder containing public static web assets, like images and stylesheets.

  • tmp/, used for restart.txt (our application restart mechanism). This will be explained in a following subsection.

So /webapps/rackapp must, at minimum, look like this:

/webapps/rackapp
  |
  +-- config.ru
  |
  +-- public/
  |
  +-- tmp/

Suppose you own the domain www.rackapp.com. You can either deploy your application to the virtual host’s root (i.e. the application will be accessible from the root URL, http://www.rackapp.com/), or in a sub URI (i.e. the application will be accessible from a sub URL, such as http://www.rackapp.com/rackapp).

Note The default RACK_ENV environment in which deployed Rack applications are run, is “production”. You can change this by changing the rack_env configuration option.

4.1. Tutorial/example: writing and deploying a Hello World Rack application

First we create a Phusion Passenger-compliant Rack directory structure:

$ mkdir /webapps/rack_example
$ mkdir /webapps/rack_example/public
$ mkdir /webapps/rack_example/tmp

Next, we write a minimal "hello world" Rack application:

$ cd /webapps/rack_example
$ some_awesome_editor config.ru
...type in some source code...
$ cat config.ru
app = proc do |env|
    [200, { "Content-Type" => "text/html" }, ["hello <b>world</b>"]]
end
run app

Finally, we deploy it by adding the following configuration options to the Nginx configuration file:

http {
    ...
    server {
        listen 80;
        server_name www.rackexample.com;
        root /webapps/rack_example/public;
        passenger_enabled on;
    }
    ...
}

And we’re done! After an Nginx restart, the above Rack application will be available under the URL http://www.rackexample.com/.

4.2. Deploying to a virtual host’s root

Add a server virtual host entry to your Nginx configuration file. The virtual host’s root must point to your Rack application’s public folder. You must also set passenger_enabled on in the server block.

For example:

http {
    ...
    server {
        listen 80;
        server_name www.rackapp.com;
        root /webapps/rackapp/public;
        passenger_enabled on;
    }
    ...
}

Then restart Nginx. The application has now been deployed.

4.3. Deploying to a sub URI

Suppose that you already have a virtual host for the application /websites/phusion:

http {
    ...

    server {
        listen 80;
        server_name www.phusion.nl;
        root /websites/phusion;
        passenger_enabled on;
    }

    ...
}

And you want your Rack application, located in /websites/rack, to be accessible from the URL http://www.phusion.nl/subapp.

To do this, you need to perform the following:

  1. Create a location with parameter ~ ^/<SUBURI>(/.*|$). This is a regular expression that says: "match everything that is exactly <SUBURI>, or starts with <SUBDURI>/".

  2. Inside the location block, set alias <PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY>$1.

  3. Inside the location block, set passenger_base_uri <SUBURI>.

  4. Inside the location block, set passenger_app_root <PATH TO YOUR APPLICATION ROOT>.

  5. Inside the location block, set passenger_document_root <PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY>.

  6. Inside the location block, re-specify passenger_enabled on.

Here is an example:

http {
    ...

    server {
        listen 80;
        server_name www.phusion.nl;
        root /websites/phusion;

        # This block has been added.
        location ~ ^/subapp(/.*|$) {
            alias /websites/rack/public$1;  # <-- be sure to point to 'public'!
            passenger_base_uri /subapp;
            passenger_app_root /websites/rack;
            passenger_document_root /websites/rack/public;
            passenger_enabled on;
        }
    }

    ...
}

Then restart Nginx. The application has now been deployed on the sub-URI.

4.4. Redeploying (restarting the Rack application)

Deploying a new version of a Rack application is as simple as re-uploading the application files, and restarting the application.

There are two ways to restart the application:

  1. By restarting Nginx.

  2. By creating or modifying the file tmp/restart.txt in the Rack application’s root folder. Phusion Passenger will automatically restart the application.

For example, to restart our example application, we type this in the command line:

touch /webapps/rackapp/tmp/restart.txt

4.5. Rackup specifications for various web frameworks

This subsection shows example config.ru files for various web frameworks.

4.5.1. Camping

require 'rubygems'
require 'rack'
require 'camping'

##### Begin Camping application
Camping.goes :Blog

...your application code here...
##### End Camping application

run Rack::Adapter::Camping.new(Blog)

For Camping versions 2.0 and up, using run Blog as the final line will do.

4.5.2. Halcyon

require 'rubygems'
require 'halcyon'
$LOAD_PATH.unshift(Halcyon.root / 'lib')
Halcyon::Runner.load_config Halcyon.root/'config'/'config.yml'
run Halcyon::Runner.new

4.5.3. Mack

ENV["MACK_ENV"] = ENV["RACK_ENV"]
load("Rakefile")
require 'rubygems'
require 'mack'
run Mack::Utils::Server.build_app

4.5.4. Merb

require 'rubygems'
require 'merb-core'

Merb::Config.setup(
  :merb_root   => ::File.expand_path(::File.dirname(__FILE__)),
  :environment => ENV['RACK_ENV']
)
Merb.environment = Merb::Config[:environment]
Merb.root = Merb::Config[:merb_root]
Merb::BootLoader.run

run Merb::Rack::Application.new

4.5.5. Ramaze

require "rubygems"
require "ramaze"
Ramaze.trait[:essentials].delete Ramaze::Adapter
require "start"
Ramaze.start!
run Ramaze::Adapter::Base

4.5.6. Sinatra

require 'rubygems'
require 'sinatra'

set :environment, ENV['RACK_ENV'].to_sym
disable :run, :reload

require 'app.rb'

run Sinatra::Application

5. Deploying a WSGI (Python) application

Phusion Passenger supports all WSGI-compliant Python web applications. Suppose that you have a WSGI application in /webapps/wsgiapp. Then that folder must contain at least three entries:

  • passenger_wsgi.py, which Phusion Passenger will use as the main entry point for your application. This file must export a WSGI object called application.

  • public/, a folder containing public static web assets, like images and stylesheets.

  • tmp/, used for restart.txt (our application restart mechanism). This will be explained in a following subsection.

So /webapps/wsgiapp must, at minimum, look like this:

/webapps/wsgiapp
  |
  +-- config.ru
  |
  +-- public/
  |
  +-- tmp/

5.1. Tutorial/example: writing and deploying a Hello World WSGI application

First we create a Phusion Passenger-compliant WSGI directory structure:

$ mkdir /webapps/wsgi_example
$ mkdir /webapps/wsgi_example/public
$ mkdir /webapps/wsgi_example/tmp

Next, we write a minimal "hello world" WSGI application:

$ cd /webapps/wsgi_example
$ some_awesome_editor passenger_wsgi.py
...type in some source code...
$ cat passenger_wsgi.py
def application(environ, start_response):
  start_response('200 OK', [('Content-Type', 'text/plain')])
  return [b"hello world!\n"]

Finally, we deploy it by adding the following configuration options to the Nginx configuration file:

http {
    ...
    server {
        listen 80;
        server_name www.wsgiexample.com;
        root /webapps/wsgi_example/public;
        passenger_enabled on;
    }
    ...
}

And we’re done! After an Nginx restart, the above WSGI application will be available under the URL http://www.wsgiexample.com/.

5.2. Deploying to a virtual host’s root

Add a server virtual host entry to your Nginx configuration file. The virtual host’s root must point to your WSGI application’s public folder. You must also set passenger_enabled on in the server block.

For example:

http {
    ...
    server {
        listen 80;
        server_name www.wsgiapp.com;
        root /webapps/wsgiapp/public;
        passenger_enabled on;
    }
    ...
}

Then restart Nginx. The application has now been deployed.

5.3. Deploying to a sub URI

Suppose that you already have a virtual host for the application /websites/phusion:

http {
    ...

    server {
        listen 80;
        server_name www.phusion.nl;
        root /websites/phusion;
        passenger_enabled on;
    }

    ...
}

And you want your WSGI application, located in /websites/wsgi, to be accessible from the URL http://www.phusion.nl/subapp.

To do this, you need to perform the following:

  1. Create a location with parameter ~ ^/<SUBURI>(/.*|$). This is a regular expression that says: "match everything that is exactly <SUBURI>, or starts with <SUBDURI>/".

  2. Inside the location block, set alias <PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY>$1.

  3. Inside the location block, set passenger_base_uri <SUBURI>.

  4. Inside the location block, set passenger_app_root <PATH TO YOUR APPLICATION ROOT>.

  5. Inside the location block, set passenger_document_root <PATH TO YOUR APPLICATION'S PUBLIC DIRECTORY>.

  6. Inside the location block, re-specify passenger_enabled on.

Here is an example:

http {
    ...

    server {
        listen 80;
        server_name www.phusion.nl;
        root /websites/phusion;

        # This block has been added.
        location ~ ^/subapp(/.*|$) {
            alias /websites/wsgi/public$1;  # <-- be sure to point to 'public'!
            passenger_base_uri /subapp;
            passenger_app_root /websites/wsgi;
            passenger_document_root /websites/wsgi/public;
            passenger_enabled on;
        }
    }

    ...
}

Then restart Nginx. The application has now been deployed on the sub-URI.

5.4. Redeploying (restarting the WSGI application)

Deploying a new version of a WSGI application is as simple as re-uploading the application files, and restarting the application.

There are two ways to restart the application:

  1. By restarting Nginx.

  2. By creating or modifying the file tmp/restart.txt in the WSGI application’s root folder. Phusion Passenger will automatically restart the application.

For example, to restart our example application, we type this in the command line:

touch /webapps/wsgiapp/tmp/restart.txt

6. Deploying a Node.js application

Please refer to the Node.js tutorial.

7. Deploying a Meteor application

Please refer to the Meteor tutorial.

8. Configuring Phusion Passenger

After installation, Phusion Passenger does not need any further configurations. Nevertheless, the system administrator may be interested in changing Phusion Passenger’s behavior. Phusion Passenger supports the following configuration options in the Nginx configuration file:

8.1. passenger_root <directory>

The location to the Phusion Passenger root directory. This configuration option is essential to Phusion Passenger, and allows Phusion Passenger to locate its own data files. The correct value is given by the installer.

If you’ve moved Phusion Passenger to a different directory then you need to update this option as well. Please read Moving Phusion Passenger to a different directory for more information.

This required option may only occur once, in the http configuration block.

Note This option has no effect when you are using Flying Passenger.

8.2. Deployment options

8.2.1. passenger_enabled <on|off>

This option may be specified in the http configuration block, a server configuration block, a location configuration block or an if configuration scope, to enable or disable Phusion Passenger for that server or that location.

Phusion Passenger is disabled by default, so you must explicitly enable it for server blocks that you wish to serve through Phusion Passenger. Please see Deploying a Rack-based Ruby application and Deploying a WSGI (Python) application for examples.

When using location blocks, you must re-specify passenger_enabled in each location block that you want to enable Phusion Passenger. This is because each location block has passenger_enabled turned off by default. For example:

server {
    listen 80;
    server_name www.foo.com;
    root /webapps/foo/public;
    passenger_enabled on;

    location /attachments {
        # Re-specify passenger_enabled here!
        passenger_enabled on;
    }
}

8.2.2. passenger_ruby <filename>

The passenger_ruby option allows one to specify the Ruby interpreter to use. Similarly, the passenger_python and passenger_nodejs options are for specifying the Python interpreter and Node.js commands, respectively.

In versions prior to 4.0.0, only a single Ruby version was supported for the entire Nginx instance, so passenger_ruby may only occur in the global server configuration. Also, the passenger_python/passenger_nodejs options were not supported.

Since version 4.0.0, Phusion Passenger supports multiple Ruby interpreters in the same Nginx instance. And so, since version 4.0.0, this option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

The passenger_ruby in the http block - that is, the one that passenger-install-nginx-module outputs - is used for invoking certain Phusion Passenger tools that are written in Ruby, e.g. the internal helper script used by passenger_pre_start. It is okay if the value refers to a different Ruby interpreter than the one you originally installed Phusion Passenger with. You can learn more about all this in Phusion Passenger and its relationship with Ruby.

The passenger_ruby directive in the http block is also used as the default Ruby interpreter for Ruby web apps. You don’t have to specify a passenger_ruby in the http block though, because the default is to use the first ruby command found in $PATH.

The passenger_python and passenger_nodejs options work in a similar manner, but apply to Python and Node.js instead.

You can also override passenger_ruby and other directives in specific contexts if you want to use a different interpreter for that web app. For example:

http {
    passenger_root ...;

    # Use Ruby 1.8.7 by default.
    passenger_ruby /usr/bin/ruby1.8;
    # Use Python 2.6 by default.
    passenger_python /usr/bin/python2.6;
    # Use /usr/bin/node by default.
    passenger_nodejs /usr/bin/node;

    server {
        # This Rails web app will use Ruby 1.8.7
        listen 80;
        server_name www.foo.com;
        root /webapps/foo/public;
    }

    server {
        # This Rails web app will use Ruby 1.9.3, as installed by RVM
        passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3/ruby;

        listen 80;
        server_name www.bar.com;
        root /webapps/bar/public;

        # If you have a web app deployed in a sub-URI, customize
        # passenger_ruby/passenger_python inside a `location` block.
        # The web app under www.bar.com/blog will use JRuby 1.7.1
        location ~ ^/blog(/.*|$) {
            alias /websites/blog/public$1;
            passenger_base_uri /blog;
            passenger_app_root /websites/blog;
            passenger_document_root /websites/blog/public;
            passenger_enabled on;
            passenger_ruby /usr/local/rvm/wrappers/jruby-1.7.1/ruby;
        }
    }

    server {
        # This Flask web app will use Python 3.0
        passenger_python /usr/bin/python3.0;

        listen 80;
        server_name www.baz.com;
        root /webapps/baz/public;
    }
}
RVM helper tool

Phusion Passenger provides the passenger-config --ruby-command tool for figuring out the correct command for invoking a specific Ruby interpreter. This is especially useful for RVM users. Suppose that you have both Ruby 1.8.7 and Ruby 1.9.3 installed through RVM, and you want to know the correct commands for each Ruby interpreter.

For this purpose we’ll want to invoke passenger-config using its full path, because each time you rvm use a different Ruby interpreter, RVM changes $PATH. If you did not install Phusion Passenger through the generic tarball installation method, then here’s how you can figure out where passenger-config is:

$ which passenger-config
/opt/passenger/bin/passenger-config

Now, switch to all the RVM Ruby interpreters you want to use. In each interpreter, invoke passenger-config --ruby-command. For Ruby 1.8.7:

$ rvm use 1.8.7
$ /opt/passenger/bin/passenger-config --ruby-command
passenger-config was invoked through the following Ruby interpreter:
  Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
  Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby
  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start


## Notes for RVM users
Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.

Then, for Ruby 1.9.3:

$ rvm use 1.9.3
$ /opt/passenger/bin/passenger-config --ruby-command
passenger-config was invoked through the following Ruby interpreter:
  Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
  Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
  To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
  To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby
  To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start


## Notes for RVM users
Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'.

8.2.3. passenger_python <filename>

Introduced in version 4.0.0.

This option allows one to specify the Python interpreter to use. See passenger_ruby for more information. The default value is python, meaning that the Python interpreter will be looked up according to the PATH environment variable.

8.2.4. passenger_nodejs <filename>

Introduced in version 4.0.24.

This option allows one to specify the Node.js command to use. See passenger_ruby for more information. The default value is node, meaning that the Node.js command will be looked up according to the PATH environment variable.

8.2.5. passenger_app_env <string>

This option sets the value of the following environment variables:

  • RAILS_ENV

  • RACK_ENV

  • WSGI_ENV

  • NODE_ENV

  • PASSENGER_APP_ENV

Some web frameworks, for example Rails and Connect.js, adjust their behavior according to the value in one of these environment variables.

Phusion Passenger for Nginx sets the default value to production. If you’re developing an Rails application then you should set this to development.

If you want to set other environment variables, please refer to Setting environment variables for Phusion Passenger-served apps.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is production.

8.2.6. rails_env <string>

An alias for passenger_app_env.

8.2.7. rack_env <string>

An alias for passenger_app_env.

8.2.8. passenger_app_root <path/to/root>

Introduced in version 4.0.0. By default, Phusion Passenger assumes that the application’s root directory is the parent directory of the public directory. This option allows one to specify the application’s root independently from the Nginx root, which is useful if the public directory lives in a non-standard place.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once.

Example:

server {
    server_name test.host;
    root /var/rails/zena/sites/example.com/public;
    # normally Phusion Passenger would
    # have assumed that the application
    # root is "/var/rails/zena/sites/example.com"
    passenger_app_root /var/rails/zena;
}

8.2.9. passenger_base_uri <uri>

Used to specify that the given URI is an distinct application that should be served by Phusion Passenger. Please refer to the following sections for more information:

It is allowed to specify this option multiple times. Do this to deploy multiple applications in different sub-URIs under the same virtual host.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

8.2.10. passenger_document_root <path>

Used in sub-URI deployment scenarios to tell Phusion Passenger where it should look for static files. Please refer to the following sections for more information:

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once.

8.2.11. passenger_spawn_method <string>

Tip
"What spawn method should I use?"

This subsection attempts to describe spawn methods, but it’s okay if you don’t (want to) understand it, as it’s mostly a technical detail. You can basically follow this rule of thumb:

If your application works on Mongrel or Thin, but not on Phusion Passenger, then set passenger_spawn_method to direct. Otherwise, leave it at smart (the default).

However, we do recommend you to try to understand it. The smart spawn method brings many benefits.

Internally, Phusion Passenger spawns multiple Ruby application processes in order to handle requests. But there are multiple ways with which processes can be spawned, each having its own set of pros and cons. Supported spawn methods are:

smart

This spawning method caches code using the app preloader. Framework code is not cached between multiple applications, although it is cached within instances of the same application. Please read Spawning methods explained for a more detailed explanation of what smart spawning exactly does.

Pros: Smart spawning caches code where possible to speed up the respawn process and is compatible with most applications

Cons: It is possible that it may be incompatible with some applications

direct

This spawning method is similar to the one used in Mongrel Cluster. It does not perform any code caching at all. Please read Spawning methods explained for a more detailed explanation of what direct spawning exactly does.

Pros: Direct spawning is guaranteed to be compatible with all applications and libraries.

Cons: Much slower than smart spawning. Every spawn action will be equally slow, though no slower than the startup time of a single server in Mongrel Cluster. Direct spawning will also render Ruby Enterprise Edition’s memory reduction technology useless.

As of Phusion Passenger 4.0, conservative spawning was renamed to direct and smart-lv2 was renamed to smart. The old smart spawning has been removed in favor of the new version.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is smart.

8.2.12. passenger_load_shell_envvars <on|off>

Introduced in version 4.0.20.

Enables or disables the loading of shell environment variables before spawning the application.

If this option is turned on, and the user’s shell is bash, then applications are loaded by running them with bash -l -c. Otherwise, they are loaded by running them directly from the PassengerHelperAgent process.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is on.

8.2.13. passenger_rolling_restarts <on|off>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

Enables or disables support for rolling restarts through restart.txt. Normally when you restart an application by touching restart.txt, Phusion Passenger would shut down all application processes and spawn a new one. The spawning of a new application process could take a while, and any requests that come in during this time will be blocked until this first application process has spawned.

But when rolling restarts are enabled, Phusion Passenger Enterprise will:

  1. Spawn a new process in the background.

  2. When it’s done spawning, Phusion Passenger Enterprise will replace one of the old processes with this newly spawned one.

  3. Step 1 and 2 are repeated until all processes have been replaced.

This way, visitors will not experience any delays when you are restarting your application. This allows you to, for example, upgrade your application often without degrading user experience.

Rolling restarts have a few caveat however that you should be aware of:

  • Upgrading an application sometimes involves upgrading the database schema. With rolling restarts, there may be a point in time during which processes belonging to the previous version and processes belonging to the new version both exist at the same time. Any database schema upgrades you perform must therefore be backwards-compatible with the old application version.

  • Because there’s no telling which process will serve a request, users may not see changes brought about by the new version until all processes have been restarted. It is for this reason that you should not use rolling restarts in development, only in production.

If Passenger Enterprise could not rolling restart a process (let’s call it A) because it is unable to spawn a new process (let’s call it B), then Passenger Enterprise will give up trying to rolling restart that particular process A. What happens next depends on whether deployment error resistance is enabled:

  • If deployment error resistance is disabled (the default), then Passenger Enterprise will proceed with trying to restart the remaining processes.

  • If deployment error resistance is enabled, the Passenger Enterprise will give up rolling restarting immediately. The application group will be put into Deployment Error Resistance Mode.

Please note that passenger_rolling_restarts is completely unrelated to the passenger-config restart-app command. That command always initiates a blocking restart, unless --rolling-restart is given.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is off.

8.2.14. passenger_resist_deployment_errors <on|off>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

Enables or disables resistance against deployment errors.

Suppose you’ve upgraded your application and you’ve issues a command to restart it (by touching restart.txt), but the application code contains an error that prevents Phusion Passenger from successfully spawning a process (e.g. a syntax error). Phusion Passenger would normally display an error message in response to this.

By enabling deployment error resistance, Phusion Passenger Enterprise would instead do this:

  • It passes the request to one of the existing application processes (that belong to the previous version of the application). The visitor will not see a Phusion Passenger process spawning error message.

  • It logs the error to the global web server error log file.

  • It sets an internal flag so that no processes for this application will be spawned (even when the current traffic would normally result in more processes being spawned) and no processes will be idle cleaned. Processes could still be shutdown because of other events, e.g. because their memory limit have been reached. You can see whether the flag is set by invoking passenger-status. If you see the message "Resisting deployment error" then the flag is set.

This way, visitors will suffer minimally from deployment errors. Phusion Passenger will attempt to restart the application again next time restart.txt is touched.

Enabling deployment error resistance only works if rolling restart is also enabled.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is off.

8.3. Connection handling options

8.3.1. passenger_ignore_client_abort <on|off>

Normally, when the HTTP client aborts the connection (e.g. when the user clicked on "Stop" in the browser), the connection with the application process will be closed too. If the application process continues to send its response, then that will result in EPIPE errors in the application, which will be printed in the error log if the application doesn’t handle them gracefully.

If this option is turned on then upon client abort Phusion Passenger will continue to read the application process’s response while discarding all the read data. This prevents EPIPE errors but it’ll also mean the backend process will be unavailable for new requests until it is done sending its response.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is off.

8.3.2. passenger_set_cgi_param <CGI environment name> <value>

Allows one to define additional CGI environment variables to pass to the web application. This is comparable to ngx_http_fastcgi_module’s fastcgi_param directive, and to ngx_http_proxy_module’s proxy_set_header option. Nginx variables in the value are interpolated.

These variables passed in the following manner:

  • On every request, in the form of a request variable.

  • During application spawning, in the form of a system environment variable that can be looked up through getenv().

Example usage:

# Application will see a CGI environment "APP_NAME" with value "my super blog".
passenger_set_cgi_param APP_NAME "my super blog";

# Nginx variables are interpolated.
passenger_set_cgi_param EXTRA_REQUEST_METHOD method=$request_method;
Note
Use CGI environment names

If you want to set an HTTP header, then you must set it in the CGI environment name format, i.e. HTTP_*:

# !!!THIS IS WRONG!!! Don't do this!
passenger_set_cgi_param X-Forwarded-For 127.0.0.2;

# Instead, write it like this:
passenger_set_cgi_param HTTP_X_FORWARDED_FOR 127.0.0.2;
Warning
This configuration option is NOT inherited across contexts

In each new context (e.g. in each new location block), you must re-specify passenger_set_cgi_param. Values set in parent contexts have no effect on subcontexts. For example:

server {
    ...
    passenger_set_cgi_param FOO foo;

    location /users {
        passenger_enabled_on;
        # !!!THIS IS WRONG!!! The 'FOO' CGI variable will not
        # be passed URLs beginning with /users because you didn't
        # re-specify passenger_set_cgi_param.
    }

    location /apps {
        passenger_enabled on;
        # This is correct. Here we re-specify passenger_set_cgi_param,
        # so the 'FOO' CGI variable will be correctly passed to URLs
        # starting with /apps.
        passenger_set_cgi_param FOO foo;
    }
}

This option may occur in the following places:

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

8.3.3. passenger_pass_header <header name>

Some headers generated by backend applications are not forwarded to the HTTP client, e.g. X-Accel-Redirect which is directly processed by Nginx and then discarded from the final response. This directive allows one to force Nginx to pass those headers anyway, similar to how proxy_pass_header works.

For example:

location / {
   passenger_pass_header X-Accel-Redirect;
}

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

8.3.4. passenger_buffer_response <on|off>

When turned on, application-generated responses are buffered by Nginx. Buffering will happen in memory and also on disk if the response is larger than a certain threshold.

Before we proceed with explaining this configuration option, we want to state the following to avoid confusion. If you use Phusion Passenger for Nginx, there are in fact two response buffering systems active:

  1. The Nginx response buffering system. passenger_buffer_response turns this on or off.

  2. The Phusion Passenger response buffering system, a.k.a. real-time disk-backed response buffering. This buffering system is always on, regardless of the value of passenger_buffer_response.

Response buffering is useful because it protects against slow HTTP clients that do not read responses immediately or quickly enough. Buffering prevents such slow clients from blocking web applications that have limited concurrency. Because Phusion Passenger’s response buffering is always turned on, you are always protected. Therefore, passenger_buffer_response is off by default, and you never should have to turn it on.

If for whatever reason you want to turn Nginx-level response buffering on, you can do so with this option.

Nginx’s response buffering works differently from Phusion Passenger’s. Nginx’s buffering system buffers the entire response before attempting to send it to the client, while Phusion Passenger’s attempts to send the data to the client immediately. Therefore, if you turn on passenger_buffer_response, you may interfere with applications that want to stream responses to the client.

How does response buffering - whether it’s done by Nginx or by Phusion Passenger - exactly protect against slow clients? Consider an HTTP client that’s on a dial-up modem link, and your application process generates a 2 MB response. If the response is buffered then your application process will be blocked until the entire 2 MB has been sent out to the HTTP client. This disallows your application process to do any useful work in the mean time. By buffering responses, Phusion Passenger or Nginx will read the application response as quickly as possible and will take care of forwarding the data to slow clients.

So keep in mind that enabling passenger_buffering_response will make streaming responses impossible. Consider for example this piece of Rails code:

render :text => lambda { |response, output|
    10.times do |i|
        output.write("entry #{i}\n")
        output.flush
        sleep 1
    end
}


or this piece of Rack code:

class Response
    def each
        10.times do |i|
            yield("entry #{i}\n")
            sleep 1
        end
    end
end

app = lambda do |env|
    [200, { "Content-Type" => "text/plain" }, Response.new]
end

When passenger_buffer_response is turned on, Nginx will wait until the application is done sending the entire response before forwarding it to the client. The client will not receive anything for 10 seconds, after which it receives the entire response at once. When passenger_buffer_response is turned off, it works as expected: the client receives an "entry X" message every second for 10 seconds.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is off.

8.3.5. passenger_buffer_size

8.3.6. passenger_buffers

8.3.7. passenger_busy_buffer_size

These options have the same effect as proxy_module’s similarly named options. They can be used to modify the maximum allowed HTTP header size.

8.3.8. passenger_intercept_errors <on|off>

Introduced in version 4.0.15.

Decides if Nginx will intercept responses with HTTP status codes of 400 and higher.

By default, all responses are sent as-is from the application or from the Phusion Passenger core. If you turn this option on then Nginx will be able to handle such responses using the Nginx error_page option. Responses with status codes that do not match an error_page option are sent as-is.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is off.

8.3.9. passenger_max_request_queue_size <number>

Introduced in version 4.0.15.

When all application processes are already handling their maximum number of concurrent requests, Phusion Passenger will queue all incoming requests. This option specifies the maximum size for that queue. If the queue is already at this specified limit, then Phusion Passenger will immediately send a "503 Service Unavailable" error to any incoming requests. You may use passenger_request_queue_overflow_status_code to customize the response status.

A value of 0 means that the queue is unbounded.

This article on StackOverflow explains how the request queue works, what it means for the queue to grow or become full, why that is bad, and what you can do about it.

You may combine this option with passenger_intercept_errors and error_page to set a custom error page whenever the queue is full. In the following example, Nginx will serve /error503.html whenever the queue is full:

passenger_intercept_errors on;
error_page 503 /error503.html;

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is 100.

8.3.10. passenger_request_queue_overflow_status_code <code>

Introduced in version 4.0.15.

This option allows you to customize the HTTP status code that is sent back when the request queue is full. See passenger_max_request_queue_size for more information.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is 503.

8.4. Security options

8.4.1. passenger_user_switching <on|off>

Whether to enable user switching support.

This option may only occur once, in the http configuration block. The default value is on.

Note This option has no effect when you are using Flying Passenger. You can disable user switching for Flying Passenger by starting the Flying Passenger daemon as a non-root user.

8.4.2. passenger_user <username>

If user switching support is enabled, then Phusion Passenger will by default run the web application as the owner of the file config/environment.rb (for Rails apps) or config.ru (for Rack apps). This option allows you to override that behavior and explicitly set a user to run the web application as, regardless of the ownership of environment.rb/config.ru.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once.

8.4.3. passenger_group <group name>

If user switching support is enabled, then Phusion Passenger will by default run the web application as the primary group of the owner of the file config/environment.rb (for Rails apps) or config.ru (for Rack apps). This option allows you to override that behavior and explicitly set a group to run the web application as, regardless of the ownership of environment.rb/config.ru.

<group name> may also be set to the special value !STARTUP_FILE!, in which case the web application’s group will be set to environment.rb/config.ru's group.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once.

8.4.4. passenger_default_user <username>

Phusion Passenger enables user switching support by default. This configuration option allows one to specify the user that applications must run as, if user switching fails or is disabled.

This option may only occur once, in the http configuration block. The default value is nobody.

Note This option has no effect when you are using Flying Passenger. There is currently no way to set this option when using Flying Passenger, but if you want to disable user switching for Flying Passenger then you can do so by starting the Flying Passenger daemon as a non-root user.

8.4.5. Passenger_default_group <group name>

Phusion Passenger enables user switching support by default. This configuration option allows one to specify the group that applications must run as, if user switching fails or is disabled.

This option may only occur once, in the http configuration block. The default value is the primary group of the user specifified by passenger_default_user.

Note This option has no effect when you are using Flying Passenger. There is currently no way to set this option when using Flying Passenger, but if you want to disable user switching for Flying Passenger then you can do so by starting the Flying Passenger daemon as a non-root user.

8.4.6. passenger_show_version_in_header <on|off>

When turned on, Phusion Passenger will output its version number in the Server and X-Powered-By header in all Phusion Passenger-served requests:

Server: nginx/1.3.11 + Phusion Passenger 4.0.0
X-Powered-By: Phusion Passenger 4.0.0

When turned off, the version number will be hidden:

Server: nginx/1.3.11 + Phusion Passenger
X-Powered-By: Phusion Passenger

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is on.

8.4.7. passenger_friendly_error_pages <on|off>

Phusion Passenger can display friendly error pages whenever an application fails to start. This friendly error page presents the startup error message, some suggestions for solving the problem, and a backtrace. This feature is very useful during application development and useful for less experienced system administrators, but the page might reveal potentially sensitive information, depending on the application. Experienced system administrators who are using Phusion Passenger on serious production servers should consider turning this feature off.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is on.

8.5. Resource control and optimization options

8.5.1. passenger_max_pool_size <integer>

The maximum number of application processes that may simultanously exist. A larger number results in higher memory usage, but improves the ability to handle concurrent HTTP requests.

The optimal value depends on your system’s hardware and your workload. You can learn more at the Phusion article Tuning Phusion Passenger’s concurrency settings.

If you find that your server is running out of memory then you should lower this value.

This option may only occur once, in the http configuration block. The default value is 6.

Note This option has no effect when you are using Flying Passenger. Instead, you should configure this by passing the --max-pool-size command line option to the Flying Passenger daemon.

8.5.2. passenger_min_instances <integer>

This specifies the minimum number of application processes that should exist for a given application. You should set this option to a non-zero value if you want to avoid potentially long startup times after a website has been idle for an extended period.

Please note that this option does not pre-start application processes during Nginx startup. It just makes sure that when the application is first accessed:

  1. at least the given number of processes will be spawned.

  2. the given number of processes will be kept around even when processes are being idle cleaned (see passenger_pool_idle_time).

If you want to pre-start application processes during Nginx startup, then you should use the passenger_pre_start directive, possibly in combination with passenger_min_instances. This behavior might seem counter-intuitive at first sight, but passenger_pre_start explains the rationale behind it.

For example, suppose that you have the following configuration:

http {
    ...
    passenger_max_pool_size 15;
    passenger_pool_idle_time 10;

    server {
        listen 80;
        server_name foobar.com;
        root /webapps/foobar/public;
        passenger_min_instances 3;
    }
}

When you start Nginx, there are 0 application processes for foobar.com. Things will stay that way until someone visits foobar.com. Suppose that there is only 1 visitor. 1 application process will be started immediately to serve the visitor, while 2 will be spawned in the background. After 10 seconds, when the idle timeout has been reached, these 3 application processes will not be cleaned up.

Now suppose that there’s a sudden spike of traffic, and 100 users visit foobar.com simultanously. Phusion Passenger will start 12 more application processes. After the idle timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application processes, keeping 3 processes around.

The passenger_min_instances option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is 1.

8.5.3. passenger_max_instances <integer>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

The maximum number of application processes that may simultaneously exist for an application. This helps to make sure that a single application will not occupy all available slots in the application pool.

This value must be less than passenger_max_pool_size. A value of 0 means that there is no limit placed on the number of processes a single application may spawn, i.e. only the global limit of passenger_max_pool_size will be enforced.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is 0.

Tip
Practical usage example

Suppose that you’re hosting two web applications on your server, a personal blog and an e-commerce website. You’ve set passenger_max_pool_size to 10. The e-commerce website is more important to you. You can then set passenger_max_instances to 3 for your blog, so that it will never spawn more than 3 processes, even if it suddenly gets a lot of traffic. Your e-commerce website on the other hand will be free to spawn up to 10 processes if it gets a lot of traffic.

8.5.4. passenger_max_instances_per_app <integer>

The maximum number of application processes that may simultaneously exist for a single application. This helps to make sure that a single application will not occupy all available slots in the application pool.

This value must be less than passenger_max_pool_size. A value of 0 means that there is no limit placed on the number of processes a single application may use, i.e. only the global limit of passenger_max_pool_size will be enforced.

This option may only occur once, in the http configuration block. The default value is 0.

8.5.5. passenger_pool_idle_time <integer>

The maximum number of seconds that an application process may be idle. That is, if an application process hasn’t received any traffic after the given number of seconds, then it will be shutdown in order to conserve memory.

Decreasing this value means that applications will have to be spawned more often. Since spawning is a relatively slow operation, some visitors may notice a small delay when they visit your Rails/Rack website. However, it will also free up resources used by applications more quickly.

The optimal value depends on the average time that a visitor spends on a single Rails/Rack web page. We recommend a value of 2 * x, where x is the average number of seconds that a visitor spends on a single Rails/Rack web page. But your mileage may vary.

When this value is set to 0, application processes will not be shutdown unless it’s really necessary, i.e. when Phusion Passenger is out of worker processes for a given application and one of the inactive application processes needs to make place for another application process. Setting the value to 0 is recommended if you’re on a non-shared host that’s only running a few applications, each which must be available at all times.

This option may only occur once, in the http configuration block. The default value is 300.

Note This option has no effect when you are using Flying Passenger. Instead, you should configure this by passing the --pool-idle-time command line option to the Flying Passenger daemon.

8.5.6. passenger_max_preloader_idle_time <integer>

The ApplicationSpawner server (explained in Spawning methods explained) has an idle timeout, just like the backend processes spawned by Phusion Passenger do. That is, it will automatically shutdown if it hasn’t done anything for a given period.

This option allows you to set the ApplicationSpawner server’s idle timeout, in seconds. A value of 0 means that it should never idle timeout.

Setting a higher value will mean that the ApplicationSpawner server is kept around longer, which may slightly increase memory usage. But as long as the ApplicationSpawner server is running, the time to spawn a Ruby on Rails backend process only takes about 10% of the time that is normally needed, assuming that you’re using the smart or smart-lv2 spawning method. So if your system has enough memory, is it recommended that you set this option to a high value or to 0.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is 300 (5 minutes).

Note This option has no effect when you are using Flying Passenger. Instead, you should configure this by passing the --max-preloader-idle-time command line option to the Flying Passenger daemon.

8.5.7. passenger_start_timeout <seconds>

Introduced in version 4.0.15.

Specifies a timeout for the startup of application processes. If an application process fails to start within the timeout period then it will be forcefully killed with SIGKILL, and the error will be logged.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is 90.

8.5.8. passenger_concurrency_model <process|thread>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 4.0.0. Buy Phusion Passenger Enterprise here.

Specifies the I/O concurrency model that should be used for application processes. Phusion Passenger supports two concurrency models:

  • process - single-threaded, multi-processed I/O concurrency. Each application process only has a single thread and can only handle 1 request at a time. This is the concurrency model that Ruby applications traditionally used. It has excellent compatiblity (can work with applications that are not designed to be thread-safe) but is unsuitable for workloads in which the application has to wait for a lot of external I/O (e.g. HTTP API calls), and uses more memory because each process has a large memory overhead.

  • thread - multi-threaded, multi-processed I/O concurrency. Each application process has multiple threads (customizable via passenger_thread_count). This model provides much better I/O concurrency and uses less memory because threads share memory with each other within the same process. However, using this model may cause compatibility problems if the application is not designed to be thread-safe.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is process.

8.5.9. passenger_thread_count <number>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 4.0.0. Buy Phusion Passenger Enterprise here.

Specifies the number of threads that Phusion Passenger should spawn per application process. This option only has effect if passenger_concurrency_model is thread.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is 1.

8.5.10. passenger_max_requests <integer>

The maximum number of requests an application process will process. After serving that many requests, the application process will be shut down and Phusion Passenger will restart it. A value of 0 means that there is no maximum: an application process will thus be shut down when its idle timeout has been reached.

This option is useful if your application is leaking memory. By shutting it down after a certain number of requests, all of its memory is guaranteed to be freed by the operating system.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is 0.

Caution

The passenger_max_requests directive should be considered as a workaround for misbehaving applications. It is advised that you fix the problem in your application rather than relying on these directives as a measure to avoid memory leaks.

8.5.11. passenger_max_request_time <seconds>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

The maximum amount of time, in seconds, that an application process may take to process a request. If the request takes longer than this amount of time, then the application process will be forcefully shut down, and possibly restarted upon the next request. A value of 0 means that there is no time limit.

This option is useful for preventing your application from freezing for an indefinite period of time.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is 0.

Example

Suppose that most of your requests are known to finish within 2 seconds. However, there is one URI, /expensive_computation, which is known to take up to 10 seconds. You can then configure Phusion Passenger as follows:

server {
    listen 80;
    server_name www.example.com;
    root /webapps/my_app/public;
    passenger_enabled on;
    passenger_max_request_time 2;
    location /expensive_compuation {
        passenger_enabled on;
        passenger_max_request_time 10;
    }
}

If a request to /expensive_computation takes more than 10 seconds, or if a request to any other URI takes more than 2 seconds, then the corresponding application process will be forced to shutdown.

Caution

The passenger_max_request_time directive should be considered as a workaround for misbehaving applications. It is advised that you fix the problem in your application rather than relying on these directives as a measure to avoid freezing applications.

8.5.12. passenger_memory_limit <integer>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

The maximum amount of memory that an application process may use, in megabytes. Once an application process has surpassed its memory limit, it will process all the requests currently present in its queue and then shut down. A value of 0 means that there is no maximum: the application’s memory usage will not be checked.

This option is useful if your application is leaking memory. By shutting it down, all of its memory is guaranteed to be freed by the operating system.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is 0.

Note
A word about permissions

The passenger_memory_limit directive uses the ps command to query memory usage information. On Linux, it further queries /proc to obtain additional memory usage information that’s not obtainable through ps. You should ensure that the ps works correctly and that the /proc filesystem is accessible by the PassengerHelperAgent process.

Caution

The passenger_max_requests and passenger_memory_limit directives should be considered as workarounds for misbehaving applications. It is advised that you fix the problem in your application rather than relying on these directives as a measure to avoid memory leaks.

8.5.13. passenger_pre_start <url>

By default, Phusion Passenger does not start any application processes until said web application is first accessed. The result is that the first visitor of said web application might experience a small delay as Phusion Passenger is starting the web application on demand. If that is undesirable, then this directive can be used to pre-started application processes during Nginx startup.

A few things to be careful of:

  • This directive accepts the URL of the web application you want to pre-start, not a on/off value! This might seem a bit weird, but read on for rationale. As for the specifics of the URL:

    • The domain part of the URL must be equal to the value of the server_name directive of the server block that defines the web application.

    • Unless the web application is deployed on port 80, the URL should contain the web application’s port number too.

    • The path part of the URL must point to some URI that the web application handles.

  • You will probably want to combine this option with passenger_min_instances because application processes started with passenger_pre_start are subject to the usual idle timeout rules. See the example below for an explanation.

This option may only occur in the http configuration block. It may be specified any number of times.

Note This option is currently not available when using Flying Passenger.
Example 1: basic usage

Suppose that you have the following web applications.

server {
    listen 80;
    server_name foo.com;
    root /webapps/foo/public;
    passenger_enabled on;
}

server {
    listen 3500;
    server_name bar.com;
    root /webapps/bar/public;
    passenger_enabled on;
}

You want both of them to be pre-started during Nginx startup. The URL for foo.com is http://foo.com/ (or, equivalently, http://foo.com:80/) and the URL for bar.com is http://bar.com:3500/. So we add two passenger_pre_start directives, like this:

server {
    listen 80;
    server_name foo.com;
    root /webapps/foo/public;
    passenger_enabled on;
}

server {
    listen 3500;
    server_name bar.com;
    root /webapps/bar/public;
    passenger_enabled on;
}

passenger_pre_start http://foo.com/;           # <--- added
passenger_pre_start http://bar.com:3500/;      # <--- added
Example 2: pre-starting apps that are deployed in sub-URIs

Suppose that you have a web application deployed in a sub-URI /store, like this:

server {
    listen 80;
    server_name myblog.com;
    root /webapps/wordpress;
    passenger_base_uri /store;
}

Then specify the server_name value followed by the sub-URI, like this:

server {
    listen 80;
    server_name myblog.com;
    root /webapps/wordpress;
    passenger_base_uri /store;
}

passenger_pre_start http://myblog.com/store;    # <----- added

The sub-URI must be included; if you don’t then the directive will have no effect. The following example is wrong and won’t pre-start the store web application:

passenger_pre_start http://myblog.com/;    # <----- WRONG! Missing "/store" part.
Example 3: combining with passenger_min_instances

Application processes started with passenger_pre_start are also subject to the idle timeout rules as specified by passenger_pool_idle_time! That means that by default, the pre-started application processes for foo.com are bar.com are shut down after a few minutes of inactivity. If you don’t want that to happen, then you should combine passenger_pre_start with passenger_min_instances, like this:

server {
    listen 80;
    server_name foo.com;
    root /webapps/foo/public;
    passenger_enabled on;
    passenger_min_instances 1;      # <--- added
}

server {
    listen 3500;
    server_name bar.com;
    root /webapps/bar/public;
    passenger_enabled on;
    passenger_min_instances 1;      # <--- added
}

passenger_pre_start http://foo.com/;
passenger_pre_start http://bar.com:3500/;
So why a URL? Why not just an on/off flag?

A directive that accepts a simple on/off flag is definitely more intuitive, but due technical difficulties w.r.t. the way Nginx works, it’s very hard to implement it like that:

It is very hard to obtain a full list of web applications defined in the Nginx configuration file(s). In other words, it’s hard for Phusion Passenger to know which web applications are deployed on Nginx until a web application is first accessed, and without such a list Phusion Passenger wouldn’t know which web applications to pre-start. So as a compromise, we made it accept a URL.

What does Phusion Passenger do with the URL?

During Nginx startup, Phusion Passenger will send a dummy HEAD request to the given URL and discard the result. In other words, Phusion Passenger simulates a web access at the given URL. However this simulated request is always sent to localhost, not to the IP that the domain resolves to. Suppose that bar.com in example 1 resolves to 209.85.227.99; Phusion Passenger will send the following HTTP request to 127.0.0.1 port 3500 (and not to 209.85.227.99 port 3500):

HEAD / HTTP/1.1
Host: bar.com
Connection: close

Similarly, for example 2, Phusion Passenger will send the following HTTP request to 127.0.0.1 port 80:

HEAD /store HTTP/1.1
Host: myblog.com
Connection: close
Do I need to edit /etc/hosts and point the domain in the URL to 127.0.0.1?

No. See previous subsection.

My web application consists of multiple web servers. What URL do I need to specify, and in which web server’s Nginx config file?

Put the web application’s server_name value and the server block’s port in the URL, and put passenger_pre_start on all machines that you want to pre-start the web application on. The simulated web request is always sent to 127.0.0.1, with the domain name in the URL as value for the Host HTTP header, so you don’t need to worry about the request ending up at a different web server in the cluster.

Does passenger_pre_start support https:// URLs?

Yes. And it does not perform any certificate validation.

8.6. Logging and debugging options

8.6.1. passenger_log_level <integer>

This option allows one to specify how much information Phusion Passenger should write to the Nginx error log file. A higher log level value means that more information will be logged.

Possible values are:

  • 0: Show only errors and warnings.

  • 1: Show the most important debugging information. This might be useful for system administrators who are trying to figure out the cause of a problem.

  • 2: Show more debugging information. This is typically only useful for developers.

  • 3: Show even more debugging information.

This option may only occur once, in the http configuration block. The default is 0.

8.6.2. passenger_debug_log_file <filename>

By default Phusion Passenger debugging and error messages are written to the global web server error log. This option allows one to specify the file that debugging and error messages should be written to instead.

This option may only occur once, in the http configuration block.

Note This option has no effect when you are using Flying Passenger. Instead, you should configure this by passing the --log-file command line option to the Flying Passenger daemon.

8.6.3. passenger_debugger <on|off>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

Turns support for application debugging on or off. In case of Ruby applications, turning this option on will cause them to load the ruby-debug gem (when on Ruby 1.8), the debugger gem (when on Ruby 1.9) or the byebug gem (when on Ruby 2.0). If you’re using Bundler, you should add this to your Gemfile:

gem 'ruby-debug', :platforms => :ruby_18
gem 'debugger', :platforms => :ruby_19
gem 'byebug', :platforms => :ruby_20

Once debugging is turned on, you can use the command passenger-irb --debug <PID> to attach an rdebug console to the application process with the given PID. Attaching will succeed once the application process executes a debugger command.

This option may occur in the following places:

  • In the http configuration block.

  • In a server configuration block.

  • In a location configuration block.

  • In an if configuration scope.

In each place, it may be specified at most once. The default value is off.

8.7. Advanced options

8.7.1. passenger_temp_dir <directory>

Specifies the directory that Phusion Passenger should use for storing temporary files. This includes things such as Unix socket files.

This option may only be specified in the http configuration block. The default temp directory that Phusion Passenger uses is /tmp.

This option is especially useful if Nginx is not allowed to write to /tmp (which is the case on some systems with strict SELinux policies) or if the partition that /tmp lives on doesn’t have enough disk space.

Command line tools

Some Phusion Passenger command line administration tools, such as passenger-status, must know what Phusion Passenger’s temp directory is in order to function properly. You can pass the directory through the PASSENGER_TMPDIR environment variable, or the TMPDIR environment variable (the former will be used if both are specified).

For example, if you set passenger_temp_dir to /my_temp_dir, then invoke passenger-status after you’ve set the PASSENGER_TMPDIR or TMPDIR environment variable, like this:

export PASSENGER_TMPDIR=/my_temp-dir
sudo -E passenger-status
# The -E option tells 'sudo' to preserve environment variables.
Note This option has no effect when you are using Flying Passenger. Instead, you should configure this by passing the --temp-dir command line option to the Flying Passenger daemon.

8.7.2. passenger_fly_with <socket filename>

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 4.1.0. Buy Phusion Passenger Enterprise here.

Enables Flying Passenger mode, and configures Nginx to connect to the Flying Passenger daemon that’s listening on the given socket filename.

This option may only occur once, in the http configuration block. When not set, Flying Passenger is not enabled.

8.8. Deprecated options

The following options have been deprecated, but are still supported for backwards compatibility reasons.

8.8.1. rails_spawn_method

Deprecated in favor of passenger_spawn_method.

9. Troubleshooting

9.1. Generic troubleshooting tips

One of the first things you should do upon encountering a problem, is to check the global Nginx error log file. This is one specified by the error_log directive in the main context (not the one inside the http context). The file is typically located in /var/log/nginx/error.log. This log file contains:

  • Phusion Passenger error messages.

  • Everything that the application writes to STDERR. This typically consists of errors that the application encounters during startup, but not errors that it encounters when it’s handling requests.

If you’re using Ruby on Rails, then you should also check out log/development.log and log/production.log. When an error occurs during request handling, it is typically logged here. This file does not contain errors that Rails encounters during startup.

Finally, you should be aware that Phusion Passenger runs your application under the production environment by default, not development. You can change this using the rails_env option.

If neither the logs nor this troubleshooting guide can help you, then please check out our support resources.

9.2. Why does the first request take a long time?

Symptoms

The first request to your application takes more time than usual. Subsequent requests have the normal speed.

Cause

Phusion Passenger starts your application the first time it is accessed, not during web server startup. Some applications can take several seconds to start. If you’re using Ruby on Rails, then needing 10 seconds to start your application is normal. On slow or heavily loaded servers, or in case of large and heavy applications, the startup time may be even longer.

Solution

Use the passenger_pre_start configuration option.

9.3. Upon accessing the web app, Nginx reports a "Permission denied" error

Symptoms

A typical error message looks like this:

2013/10/21 17:16:03 [alert] 98687#0: *1 Cannot stat
'/Users/phusion/Sites/rack.test/config.ru': Permission denied (errno=13); This
error means that the Nginx worker process (PID 99064, running as UID 70) does
not have permission to access this file. Please read the manual to learn how to
fix this problem: section 'Troubleshooting' -> 'Upon accessing the web app,
Nginx reports a "Permission denied" error'; Extra info, client: 127.0.0.1,
server: www.foo.com, request: "GET / HTTP/1.1", host: "www.foo.com"
Cause

Phusion Passenger tries to access your application directory in order to find out what language it’s written in. This access is initiated from inside an Nginx worker process. This error indicates that the Nginx worker process does not have the proper permissions to access your application’s root directory.

Solution

You need to relax permissions to that the Nginx worker process can access your application directory, by making the directory group- and world-executable:

sudo chmod g+x,o+x /Users/phusion/Sites/rack.test

You also need to ensure that all parent directories are also executable by the Nginx process:

sudo chmod g+x,o+x /Users/phusion/Sites
sudo chmod g+x,o+x /Users/phusion
sudo chmod g+x,o+x /Users
Note
Why executable permission and not readable?
On Unix, the executable permission on directories dictates whether a process is allowed to access files or subdirectories within that directory. The readable permission dictates whether a process is allowed to see what files are inside the directory, but does not necessarily allow access to them. You can learn more at Wikipedia.

9.4. The application thinks its not on SSL even though it is

Rails and many other frameworks infers whether it’s running on SSL through the CGI environment variable HTTPS. This variable is only set if you set ssl on. Setting just listen 443 ssl is not enough.

9.5. Ruby on Rails-specific troubleshooting

9.5.1. The "About your application’s environment" link does not work

The "About your application’s environment" link only works if the application is started in the development environment. Phusion Passenger starts the application in the production environment by default. Please use rails_env to change it.

9.5.2. The Rails application reports that it’s unable to start because of a permission error

Please check whether your Rails application’s folder has the correct permissions. By default, Rails applications are started as the owner of the file config.ru, except if the file is owned by root. If the file is owned by root, then the Rails application will be started as nobody (or as the user specify by RailsDefaultUser, if that’s specified).

Please read User switching (security) for details.

9.5.3. The Rails application’s log file is not being written to

There are a couple things that you should be aware of:

  • By default, Phusion Passenger runs Rails applications in production mode, so please be sure to check production.log instead of development.log.

    See rails_env for configuration. - By default, Phusion Passenger runs Rails applications as the owner of config.ru. So the log file can only be written to if that user has write permission to the log file. Please chmod or chown your log file accordingly.

    See User switching (security) for details.

If you’re using a RedHat-derived Linux distribution (such as Fedora or CentOS) then it is possible that SELinux is interfering. RedHat’s SELinux policy only allows Apache to read/write directories that have the httpd_sys_content_t security context. Please run the following command to give your Rails application folder that context:

chcon -R -h -t httpd_sys_content_t /path/to/your/rails/app

10. Analysis and system maintenance

Phusion Passenger provides a set of tools, which are useful for system analysis, maintenance and troubleshooting.

10.1. Inspecting memory usage

Process inspection tools such as ps and top are useful, but they rarely show the correct memory usage. The real memory usage is usually lower than what ps and top report.

There are many technical reasons why this is so, but an explanation is beyond the scope of this Users Guide. We kindly refer the interested reader to operating systems literature about virtual memory and copy-on-write.

The tool passenger-memory-stats allows one to easily analyze Phusion Passenger’s and the web server’s real memory usage. For example:

[bash@localhost root]# passenger-memory-stats
------------- Apache processes --------------.
PID    PPID  Threads  VMSize   Private  Name
---------------------------------------------.
5947   1     9        90.6 MB  0.5 MB   /usr/sbin/apache2 -k start
5948   5947  1        18.9 MB  0.7 MB   /usr/sbin/fcgi-pm -k start
6029   5947  1        42.7 MB  0.5 MB   /usr/sbin/apache2 -k start
6030   5947  1        42.7 MB  0.5 MB   /usr/sbin/apache2 -k start
6031   5947  1        42.5 MB  0.3 MB   /usr/sbin/apache2 -k start
6033   5947  1        42.5 MB  0.4 MB   /usr/sbin/apache2 -k start
6034   5947  1        50.5 MB  0.4 MB   /usr/sbin/apache2 -k start
23482  5947  1        82.6 MB  0.4 MB   /usr/sbin/apache2 -k start
### Processes: 8
### Total private dirty RSS: 3.50 MB

----------- Nginx processes ------------.
PID    PPID   VMSize     Resident  Name
----------------------------------------.
51766  51764  82.7 MB    3.9 MB    nginx: master process ./objs/nginx
51773  51766  82.9 MB    0.9 MB    nginx: worker process

--------- Passenger processes ---------.
PID    Threads  VMSize   Private  Name
---------------------------------------.
6026   1        10.9 MB  4.7 MB   Passenger spawn server
23481  1        26.7 MB  3.0 MB   Passenger FrameworkSpawner: 2.0.2
23791  1        26.8 MB  2.9 MB   Passenger ApplicationSpawner: /var/www/projects/app1-foobar
23793  1        26.9 MB  17.1 MB  Rails: /var/www/projects/app1-foobar
### Processes: 4
### Total private dirty RSS: 27.76 M

The Private or private dirty RSS field shows the real memory usage of processes. Here, we see that all the Apache and Nginx worker processes only take less than 1 MB memory each. This is a lot less than the 50-80 MB-ish memory usage as shown in the VMSize column (which is what a lot of people think is the real memory usage, but is actually not).

Note Private dirty RSS reporting only works on Linux. Unfortunately other operating systems don’t provide facilities for determining processes' private dirty RSS. On non-Linux systems, the Resident Set Size is reported instead.

10.2. Inspecting Phusion Passenger’s internal status

One can inspect Phusion Passenger’s internal status with the tool passenger-status. This tool must typically be run as root. For example:

[bash@localhost root]# passenger-status
----------- General information -----------
max      = 6
count    = 1
active   = 0
inactive = 1

----------- Domains -----------
/var/www/projects/app1-foobar:
  PID: 9617      Sessions: 0    Processed: 7       Uptime: 2m 23s

The general information section shows the following information:

max

The maximum number of application instances that Phusion Passenger will spawn. This equals the value given for PassengerMaxPoolSize (Apache) or passenger_max_pool_size (Nginx).

count

The number of application instances that are currently alive. This value is always less than or equal to max.

active

The number of application instances that are currently processing requests. This value is always less than or equal to count.

inactive

The number of application instances that are currently not processing requests, i.e. are idle. Idle application instances will be shutdown after a while, as can be specified with PassengerPoolIdleTime (Apache)/passenger_pool_idle_time (Nginx) (unless this value is set to 0, in which case application instances are never shut down via idle time). The value of inactive equals count - active.

The domains section shows, for each application directory, information about running application instances:

Sessions

Shows how many HTTP client are currently in the queue of that application Instance, waiting to be processed.

Processed

Indicates how many requests the instance has served until now. Tip: it’s possible to limit this number with the PassengerMaxRequests configuration directive.

Uptime

Shows for how long the application instance has been running.

Since Phusion Passenger uses fair load balancing by default, the number of sessions for the application instances should be fairly close to each other. For example, this is fairly normal:

  PID: 4281      Sessions: 2      Processed: 7      Uptime: 5m 11s
  PID: 4268      Sessions: 0      Processed: 5      Uptime: 4m 52s
  PID: 4265      Sessions: 1      Processed: 6      Uptime: 5m 38s
  PID: 4275      Sessions: 1      Processed: 7      Uptime: 3m 14s

But if you see a "spike", i.e. an application instance has an unusually high number of sessions compared to the others, then there might be a problem:

  PID: 4281      Sessions: 2      Processed: 7      Uptime: 5m 11s
  PID: 17468     Sessions: 8 <-+  Processed: 2      Uptime: 4m 47s
  PID: 4265      Sessions: 1   |  Processed: 6      Uptime: 5m 38s
  PID: 4275      Sessions: 1   |  Processed: 7      Uptime: 3m 14s
                               |
                               +---- "spike"

The most likely reason why a spike occurs is because your application is frozen, i.e. it has stopped responding. See Debugging frozen applications for tips.

10.3. Debugging frozen applications

If one of your application instances is frozen (stopped responding), then you can figure out where it is frozen by killing it with SIGABRT. This will cause the application to raise an exception, with a backtrace.

The exception (with full backtrace information) is normally logged into the web server error log. But if your application or if its web framework has its own exception logging routines, then exceptions might be logged into the application’s log files instead. This is the case with Ruby on Rails. So if you kill a Ruby on Rails application with SIGABRT, please check the application’s production.log first (assuming that you’re running it in a production environment). If you don’t see a backtrace there, check the web server error log.

Note It is safe to kill application instances, even in live environments. Phusion Passenger will restart killed application instances, as if nothing bad happened.

10.4. Accessing individual application processes

When a request is sent to the web server, Phusion Passenger will automatically forward the request to the most suitable application process, but sometimes it is desirable to be able to directly access the individual application processes. Use cases include, but are not limited to:

  • One wants to debug a memory leak or memory bloat problem that only seems to appear on certain URIs. One can send a request to a specific process to see whether that request causes the process’s memory usage to rise.

  • The application caches data in local memory, and one wants to tell a specific application process to clear that local data.

  • Other debugging use cases.

All individual application processes are accessible via HTTP, so you can use standard HTTP tools like curl. The exact addresses can be obtained with the command passenger-status --verbose. These sockets are all bound to 127.0.0.1, but the port number is dynamically assigned. As a security measure, the sockets are also protected with a process-specific random password, which you can see in the passenger-status --verbose output. This password must be sent through the “X-Passenger-Connect-Password” HTTP header.

Example:

bash# passenger-status --verbose
----------- General information -----------
max      = 6
count    = 2
active   = 0
inactive = 2
Waiting on global queue: 0

----------- Application groups -----------
/Users/hongli/Sites/rack.test:
  App root: /Users/hongli/Sites/rack.test
  * PID: 24235   Sessions: 0    Processed: 7       Uptime: 17s
      URL     : http://127.0.0.1:58122
      Password: nFfVOX1F8LjZ90HJh28Sd_htJOsgRsNne2QXKf8NIXw
  * PID: 24250   Sessions: 0    Processed: 4       Uptime: 1s
      URL     : http://127.0.0.1:57933
      Password: _RGXlQ9EGDGJKLevQ_qflUtF1KmxEo2UiRzMwIE1sBY

Here we see that the web application rack.test has two processes. Process 24235 is accessible via http://127.0.0.1:58122, and process 24250 is accessible via http://127.0.0.1:57933.

To access 24235 we must send its password, nFfVOX1F8LjZ90HJh28Sd_htJOsgRsNne2QXKf8NIXw, through the X-Passenger-Connect-Password HTTP header, like this:

bash# curl -H "X-Passenger-Connect-Password: nFfVOX1F8LjZ90HJh28Sd_htJOsgRsNne2QXKf8NIXw" http://127.0.0.1:58122/

10.5. Attaching an IRB console to an application process

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

You can attach an IRB console to any application process and inspect its state by executing arbitrary Ruby code. Do this by invoking passenger-irb <PID> where <PID> is the PID of the application process you wish to inspect. Note that the IRB console is currently only available for Ruby apps, not for apps in any other languages.

11. Tips

11.1. User Switching (security feature)

Phusion Passenger supports automatic user switching: by default, it attempts to run applications as the "right" user, instead of running all applications as the same user.

To better understand the problem, let us consider the situation with PHP. There is a problem that plagues most PHP web hosts, namely the fact that all PHP applications are run in the same user context as the web server. So for example, Joe’s PHP application will be able to read Jane’s PHP application’s passwords. This is obviously undesirable on many servers.

Phusion Passenger’s user switching feature solves this problem. Applications are run as the owner of their "startup file". For Ruby apps, the startup file is config.ru (Rack and Rails >= 3) or config/environment.rb (Rails 1 and 2). For Python apps, the startup file is passenger_wsgi.py. So suppose that config.ru is owned by user joe, then Phusion Passenger will spawn the corresponding application as joe as well. The exact rules are a little bit more complicated, and they’re explained further down in this section.

11.1.1. Requirements

User switching is only enabled when all of the following conditions are met:

  • When not using Flying Passenger (this is probably the case):

    • The passenger_user_switching option must be enabled.

    • The web server’s control process must have root privileges. This is the case on most installations.

  • When using Flying Passenger:

    • The Flying Passenger daemon must be run with root privileges.

11.1.2. Effects

When not using Flying Passenger, the following table illustrates the effect for different combinations of the requirements.

passenger_user_switching on

passenger_user_switching off

Web server has root privileges

User switching enabled.

User switching disabled. Apps are run as passenger_default_user and passenger_default_group.

Web server has no root privileges

User switching disabled. Apps are run as the web server’s user.

User switching disabled. Apps are run as the web server’s user.

When using Flying Passenger, the effect is as follows:

Daemon run with root privileges

User switching enabled.

Daemon run without root privileges

User switching disabled. Apps are run as the daemon’s user.

When user switching is enabled, the following rules are followed to determine what user an application should be run as. The first matching rule is the rule that will be followed.

  1. If passenger_user or passenger_group are set, then the application will be run as the specified user/group. Thus, these options are a good way to override user switching settings.

  2. If the startup file is owned by root or an unknown user, then the application will run as the user specified by passenger_default_user and passenger_default_group.

  3. Otherwise, the application is run as the owner of the startup file.

11.1.3. Caveats & troubleshooting

If your application regularly encounters permission errors or fails to find certain files, then this is an indication that your application is started as a user that you did not intent it to be run as. Other symptoms include:

  • The application fails to start because Bundler complains that it cannot find gems. This probably indicates that Bundler does not have read access to the directory that contains Bundler-installed gems.

  • The application fails to start and its error message mentions the path /nonexistent. This probably indicates that your application is started as the nobody user. This is because on many systems, the nobody user’s home directory is /nonexistent.

To check whether it is indeed the case that your application is started as a different user than you intended to, see Finding out what user an application is running as.

The most likely reason why your application is started as nobody is probably because your startup file is owned by root, by nobody or by an unknown user. To fix this, change the owner of the startup file to the owner that you want to run the application as.

Whatever user your application runs as, it must have read access to the application root, and read/write access to the application’s logs directory.

11.1.4. Finding out what user an application is running as

To find our what user an application is started as, first access its URL in your browser so that Phusion Passenger starts the application. For example:

http://www.example.local/

The application will now either successfully start or fail to start. If it fails to start then you will see an error page that tells you what user the application was being started as. If you do not see the error page in the browser then set passenger_friendly_error_pages on.

If the application successfully started, then run passenger-status to find the process’s PID:

.---------- General information -----------
Max pool size : 6
Processes     : 1
Requests in top-level queue : 0

.---------- Application groups -----------
/webapps/example.local#default:
  App root: /webapps/example.local
  Requests in queue: 0
  * PID: 16915   Sessions: 0       Processed: 1       Uptime: 2s
    CPU: 0%      Memory  : 9M      Last used: 2s ago

In the above example we see that the PID is 16915. Next, use ps to find out the user that it is running as:

# ps -o pid,user,comm -p 16915
  PID USER    COMM
16915 phusion Passenger RackApp: /webapps/example.local

As you can see, the application in this example is being run as user phusion.

11.2. Copy-on-write memory support (reducing memory consumption of Ruby applications)

Phusion Passenger automatically leverages operating system virtual memory copy-on-write features in order to reduce the memory usage of Ruby applications. Experience has shown that this reduces memory usage by 33% on average. For this mechanism to work, a Ruby interpreter with a copy-on-write friendly garbage collector is required. The following Ruby interpreters have copy-on-write friendly garbage collectors:

  • MRI Ruby >= 2.0. Versions prior to 2.0 did not have a copy-on-write friendly garbage collector.

  • Ruby Enterprise Edition, which was Phusion’s branch of MRI Ruby 1.8 with a copy-on-write friendly garbage collector and other enhancement. It has reached End-Of-Life as of 2012, but remains available for legacy systems.

11.3. Capistrano recipe

Phusion Passenger can be combined with Capistrano. The following Capistrano recipe demonstrates Phusion Passenger support. It assumes that you’re using Git as version control system.

set :application, "myapp"
set :domain,      "example.com"
set :repository,  "ssh://#{domain}/path-to-your-git-repo/#{application}.git"
set :use_sudo,    false
set :deploy_to,   "/path-to-your-web-app-directory/#{application}"
set :scm,         "git"

role :app, domain
role :web, domain
role :db,  domain, :primary => true

namespace :deploy do
  task :start, :roles => :app do
    run "touch #{current_release}/tmp/restart.txt"
  end

  task :stop, :roles => :app do
    # Do nothing.
  end

  desc "Restart Application"
  task :restart, :roles => :app do
    run "touch #{current_release}/tmp/restart.txt"
  end
end

11.4. Bundler support

Phusion Passenger has automatic support for Bundler. The support consists of loading your application under the environment defined by your Gemfile. In other words, Phusion Passenger loads your application as if bundle exec was used.

The Bundler support works as follows:

  • If you have a .bundle/environment.rb in your application root, then Phusion Passenger will require that file before loading your application.

  • Otherwise, if you have a Gemfile, then Phusion Passenger will automatically call Bundler.setup() before loading your application.

It’s possible that your application also calls Bundler.setup during loading, e.g. in config.ru or in config/boot.rb. This is the case with Rails 3, and is also the case if you modified your config/boot.rb according to the Bundler Rails 2.3 instructions. This leads to Bundler.setup being called twice, once before the application startup file is required and once during application startup. However this is harmless and doesn’t have any negative effects.

Phusion Passenger assumes that you’re using Bundler >= 0.9.5. If you don’t want Phusion Passenger to run its Bundler support code, e.g. because you need to use an older version of Bundler with an incompatible API or because you use a system other than Bundler, then you can override Phusion Passenger’s Bundler support code by creating an empty file config/setup_load_paths.rb. If this file exists then it will be required before loading the application startup file. In this file you can do whatever you need to setup Bundler or a similar system.

11.4.1. Does Phusion Passenger itself need to be added to the Gemfile?

It is never necessary to add Phusion Passenger to the application’s Gemfile. In case of Phusion Passenger Standalone, it is not necessary to execute the passenger command through bundle exec. The reason for this is because Phusion Passenger automatically loads the Gemfile environment. Most other Ruby application servers do not automatically load the Gemfile environment, which is why they must be added to the Gemfile and be executed with bundle exec.

Even when your application uses any of the Phusion Passenger APIs, you still do not need to add Phusion Passenger to the Gemfile. The only thing you need to do is to put Phusion Passenger API calls inside if blocks that check whether Phusion Passenger is active, by checking whether the PhusionPassenger namespace is defined:

if defined?(PhusionPassenger)
    ...
end

11.5. Installing multiple Ruby on Rails versions

Each Ruby on Rails applications that are going to be deployed may require a specific Ruby on Rails version. You can install a specific version with this command:

gem install rails -v X.X.X

where X.X.X is the version number of Ruby on Rails.

All of these versions will exist in parallel, and will not conflict with each other. Phusion Passenger will automatically make use of the correct version.

11.6. Making the application restart after each request

In some situations it might be desirable to restart the web application after each request, for example when developing a non-Rails application that doesn’t support code reloading, or when developing a web framework.

To achieve this, simply create the file tmp/always_restart.txt in your application’s root folder. Unlike restart.txt, Phusion Passenger does not check for this file’s timestamp: Phusion Passenger will always restart the application, as long as always_restart.txt exists.

Note If you’re just developing a Rails application then you probably don’t need this feature. If you set rails_env development in your web server configuration, then Rails will automatically reload your application code after each request. always_restart.txt is mostly useful when you’re using a web framework that doesn’t support code reloading by itself, of when you’re working on a web framework yourself.

11.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments

Some people experience broken images and other broken static assets when they deploy their application to a sub-URI (i.e. http://mysite.com/railsapp/). The reason for this usually is that you used a static URI for your image in the views. This means your img source probably refers to something like /images/foo.jpg. The leading slash means that it’s an absolute URI: you’re telling the browser to always load http://mysite.com/images/foo.jpg no matter what. The problem is that the image is actually at http://mysite.com/railsapp/images/foo.jpg. There are two ways to fix this.

The first way (not recommended) is to change your view templates to refer to images/foo.jpg. This is a relative URI: note the lack of a leading slash). What this does is making the path relative to the current URI. The problem is that if you use restful URIs, then your images will probably break again when you add a level to the URI. For example, when you’re at http://mysite.com/railsapp the browser will look for http://mysite.com/railsapp/images/foo.jpg. But when you’re at http://mysite.com/railsapp/controller. the browser will look for http://mysite.com/railsapp/controller/images/foo.jpg. So relative URIs usually don’t work well with layout templates.

The second and highly recommended way is to always use Rails helper methods to output tags for static assets. These helper methods automatically take care of prepending the base URI that you’ve deployed the application to. For images there is image_tag, for JavaScript there is javascript_include_tag and for CSS there is stylesheet_link_tag. In the above example you would simply remove the <img> HTML tag and replace it with inline Ruby like this:

<%= image_tag("foo.jpg") %>

This will generate the proper image tag to $RAILS_ROOT/public/images/foo.jpg so that your images will always work no matter what sub-URI you’ve deployed to.

These helper methods are more valuable than you may think. For example they also append a timestamp to the URI to better facilitate HTTP caching. For more information, please refer to the Rails API docs.

11.8. Out-of-Band Work and Out-of-Band Garbage Collection

Available since Phusion Passenger 4.0.0.

At this time, this feature is only available on Ruby.

The Out-of-Band Work feature allows you to run arbitrary long-running tasks outside normal request cycles. This works by letting current requests to the process finish, then telling the process to perform the out-of-band work, then resuming passing requests to the process after said work is finished.

A specific (and perhaps primary) use case of of Out-of-Band Work is Out-of-Band Garbage Collection. The garbage collector is run outside normal request cycles so that garbage collection runs inside normal request cycles can finish a lot faster. This can potentially save tens to hundreds of milliseconds of latency in requests.

Because Out-of-Band Work is implemented at the Phusion Passenger inter-process request routing level, and not by, say, spawning a thread inside the application process, Out-of-Band Work has the following useful properties:

  • It works well even with tasks that can pause all threads. The MRI Ruby garbage collector is a stop-the-world mark-and-sweep garbage collector.

  • Phusion Passenger can spawn more processes as necessary, in order to prevent situations in which all application processes are busy performing out-of-band work. Phusion Passenger guarantees that there’s at least one process that’s ready to process requests.

  • Phusion Passenger guarantees that no more than 1 process is performing out-of-band work at the same time.

Applications can use Out-of-Band Work as follows:

  1. Ensure that passenger_max_pool_size and passenger_min_instances are both larger than 1. Out-of-band work only works if there are at least 2 application processes.

  2. Request out-of-band work by outputting the X-Passenger-Request-OOB-Work header during a request. It does not matter what the value is. At this time, it is not possible to request out-of-band work from outside requests.

  3. You can actually perform out-of-band work when you receive a :oob_work Phusion Passenger event.

Note that even though you can request out-of-band work, there’s no guarantee that Phusion Passenger will send an oob_work event in a timely manner, if at all. It is also possible that Phusion Passenger sends an oob_work event without you ever having requested one. This latter could for example happen if the OOB work is administrator-initiated. Do not make any assumptions in your code.

Here’s an example which implements out-of-band garbage collection using the Out-of-Band framework. This example code doesn’t do anything when the code is not being run in Phusion Passenger, thanks to the if block.

# Somewhere in a controller method:
# Tell Phusion Passenger we want to perform OOB work.
response.headers["X-Passenger-Request-OOB-Work"] = "true"

# Somewhere during application initialization:
if defined?(PhusionPassenger)
    PhusionPassenger.on_event(:oob_work) do
        # Phusion Passenger has told us that we're ready to perform OOB work.
        t0 = Time.now
        GC.start
        Rails.logger.info "Out-Of-Bound GC finished in #{Time.now - t0} sec"
    end
end

For your convenience, Phusion Passenger provides a Rack middleware for out-of-band garbage collection. Add the following to your config.ru. Likewise, this example code doesn’t do anything when the code is not being run in Phusion Passenger, thanks to the if block.

if defined?(PhusionPassenger)
    PhusionPassenger.require_passenger_lib 'rack/out_of_band_gc'

    # Trigger out-of-band GC every 5 requests.
    use PhusionPassenger::Rack::OutOfBandGc, 5
end

It should be noted that, although the application uses the Phusion Passenger API, it is not necessary to add Phusion Passenger to the Gemfile.

References:

11.9. Hooks

Introduced in version 4.0.28.

Phusion Passenger provides a powerful but simple hooking system, which allows you to extend many aspects of Phusion Passenger’s behavior. The hooking system works by executing commands during certain events. Event parameters are passed to the command in the form of environment variables.

You can define hooks by setting the configuration option passenger_ctl hook_<HOOK NAME> <COMMAND TO EXECUTE>;.

11.9.1. Example

The hook system is best demonstrated with a simple example. In the following example we will hook into the attached_process event. This event is called whenever Phusion Passenger has successfully spawned an application processes and added it to the process pool. We print the process’s PID and application root.

First, let’s create a script /home/phusion/attached.sh which is to be called during the hook.

#!/bin/sh
echo "Attached process $PASSENGER_PROCESS_PID for app $PASSENGER_APP_ROOT."

Then we make it executable:

chmod +x /home/phusion/attached.sh

And we define the hook in the configuration file:

passenger_ctl hook_attached_process /home/phusion/attached.sh;

Now restart the web server and access a web app hosted by Phusion Passenger. You should see our message in the web server error log:

[ 2013-12-10 16:12:21.6456 28934/0x1064cb000 Hooks.h:129 ]: Running attached_process hook script: /home/phusion/attached.sh
Attached process 28303 for app /webapps/foobar.
[ 2013-12-10 16:12:21.6580 28934/0x1064cb000 Hooks.h:161 ]: Hook script /home/phusion/attached.sh (PID 28948) exited with status 0

11.9.2. Environment

A lot of information is passed to hook scripts in the form of environment variables. They are all uppercase and begin with PASSENGER_. Some environment variables are passed to all hook scripts, others are passed depending on the hook.

Here are some of the environment variables which are passed to all hooks, unless documented otherwise:

  • PASSENGER_VERSION

  • PASSENGER_PASSENGER_ROOT

  • PASSENGER_SERVER_INSTANCE_DIR

  • PASSENGER_GENERATION_PATH

11.9.3. Blocking and concurrency

All hooks block. That is, Phusion Passenger waits until your hook command is finished. You should therefore be careful when writing hook scripts: if your script never finishes, so Phusion Passenger does not do that either.

If you have a bug in your script and it blocks, then you will be able to see that using the command passenger-status --show=backtraces which prints the backtraces of all threads in the Phusion Passenger HelperAgent. Look for the runSingleHookScript function in the backtrace. The following example shows at line 2 that Phusion Passenger is waiting for the hook script /home/phusion/badscript.sh.

Thread 'Group process spawner: /home/phusion/webapp.test#default' (0x1062d4000):
     in 'bool Passenger::runSingleHookScript(Passenger::HookScriptOptions &, const string &, const vector<pair<string, string> > &)' (Hooks.h:116) -- /home/phusion/badscript.sh
     in 'bool Passenger::runHookScripts(Passenger::HookScriptOptions &)' (Hooks.h:159)
     in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr &, const Passenger::ApplicationPool2::Options &, unsigned int)' (Implementation.cpp:878)

Hooks may be called concurrently. For example, while the attached_process hook is being called, a detached_process hook may be called, perhaps even for the same application. It is your responsibility to ensure that your hook scripts are concurrency-safe, e.g. by employing locks and other concurrency control techniques.

11.9.4. Error handling

If a hook script fails — that is, if it exits with anything other than exit code 0 — then the error handling depends on the hook. Some hooks will abort, other hooks will ignore the error. In all cases, the result of the hook script is printed to the log.

11.9.5. Compatibility

Because hooks are inherently tied to the implementation of Phusion Passenger, there is no guarantee that hooks that currently work will continue to be available in the future versions of Phusion Passenger. The availability of hooks is very much tied to the specific version of Phusion Passenger.

11.9.6. Available hooks

before_watchdog_initialization

Called at the very beginning of Phusion Passenger’s life cycle, during the start of the Watchdog process. The first hook is called before initialization is performed (before the HelperAgent is started). Errors in the hook script cause Phusion Passenger to abort.

after_watchdog_initialization

Like before_watchdog_initialization, but called after initialization of all Phusion Passenger agent processes. Errors in the hook script cause Phusion Passenger to abort.

attached_process

Called when Phusion Passenger has successfully spawned an application processes and added it to the process pool. Extra environment variables: PASSENGER_PROCESS_PID, PASSENGER_APP_ROOT. Errors in the hook script are ignored.

detached_process

Called when Phusion Passenger has removed an application process from the process pool. This could happen when:

  • The process has crashed, and Phusion Passenger noticed it.

  • Phusion Passenger has shut down a process because it’s been idle for too long.

  • The administrator configured different resource limits, and Phusion Passenger is starting or shutting down processes in response.

  • Phusion Passenger itself is shutting down.

    Extra environment variables: PASSENGER_PROCESS_PID, PASSENGER_APP_ROOT. Errors in the hook script are ignored.

after_initialize_supergroup

Called right after Phusion Passenger has allocated data structures for an application, and is about to spawn a process for the first time for this application. Errors in the hook script are ignored. Extra environment variables: PASSENGER_APP_ROOT.

before_destroy_supergroup

Called right before Phusion Passenger decallocates data structures for an application. Errors in the hook script are ignored.

Note that the after_initialize_supergroup hook may be called while this hook is still being executed, so make sure that operations don’t conflict with each other.

Extra environment variables: PASSENGER_APP_ROOT.

11.10. Flying Passenger

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 4.0.6. Buy Phusion Passenger Enterprise here.

Flying Passenger allows one to decouple Phusion Passenger’s life time from the web server’s life time, so that the web server can be independently restarted from Phusion Passenger, and from any of the application processes served by Phusion Passenger.

Normally, Phusion Passenger starts together with the web server, and shuts down together with the web server. The advantages of this default behavior is that it makes Phusion Passenger easy to administer: one only has to deal with the web server process and can expect all relevant processes to be cleaned up after a web server shut down. However this also brings about a disadvantage: every time one restarts the web server (e.g. to make a minor configuration change), Phusion Passenger and all its application processes also get restarted.

This problem is solved by Flying Passenger, which is an advanced mode of operation in Phusion Passenger that allows the web server to be indepedently restarted from Phusion Passenger. When this mode is enabled:

  • One must start Phusion Passenger separately from the web server, namely by starting the Flying Passenger daemon. This daemon must - to an extent - be separately configured and managed from the web server.

  • The web server must be configured to forward requests to the Flying Passenger daemon.

  • You should beware of the caveats and limitations.

11.10.1. Requirements

At this time, this feature is only available in the Enterprise version of Phusion Passenger for Nginx. You must have Phusion Passenger for Nginx properly installed.

11.10.2. Basic usage

Start the Flying Passenger daemon by invoking the flying-passenger command. The only required option is --socket-file. Depending on whether you wish to enable User Switching, you have to start flying-passenger with root privileges or not.

$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock
I, [2013-06-14T09:10:13.095339 #77179]  INFO -- : Welcome to Flying Passenger 4.1.0
I, [2013-06-14T09:10:13.095339 #77179]  INFO -- : Starting PassengerWatchdog...
I, [2013-06-14T09:10:13.097036 #77179]  INFO -- : PassengerWatchdog started on PID 77181
...
I, [2013-06-14T09:10:13.129017 #77179]  INFO -- : PassengerWatchdog initialized properly
I, [2013-06-14T09:10:13.129127 #77179]  INFO -- : Flying Passenger up and listening on /var/run/flying-passenger.sock!

Now configure Phusion Passenger for Nginx to make use of the Flying Passenger daemon, by setting the passenger_fly_with option to the socket filename:

http {
    ...
    passenger_fly_with /var/run/flying-passenger.sock;
    ...
}

After (re)starting Nginx, Nginx + Flying Passenger is fully operational:

$ sudo /path-to/nginx

You can test it by adding a virtual host for a web app:

http {
    ...

    server {
        listen 80;
        server_name www.foo.local;
        root /webapps/foo/public;
        passenger_enabled on;
    }
}

Verify that it works by making an HTTP request to it:

$ curl http://www.foo.local/

Now let’s verify that restarting the web server does not restart the just-spawned application process. Run passenger-status to obtain the PID of the application process:

$ sudo passenger-status
Version: 4.1.0
Date   : 2013-06-14 09:21:51 -0400
.---------- General information -----------
Max pool size : 6
Processes     : 1
Requests in top-level queue : 0

.---------- Application groups -----------
/webapps/foo#default:
  App root: /webapps/foo
  Requests in queue: 0
  * PID: 77283   Sessions: 0       Processed: 1       Uptime: 2s
    CPU: 1%      Memory  : 8M      Last used: 2s ago

As you can see, the PID of the application process is 77283. Now let’s see what happens if we restart Nginx:

$ sudo /path-to/nginx -s stop
$ sudo /path-to/nginx
$ sudo passenger-status

The application process should remain there, unchanged:

$ sudo passenger-status
Version: 4.1.0
Date   : 2013-06-14 09:21:51 -0400
.---------- General information -----------
Max pool size : 6
Processes     : 1
Requests in top-level queue : 0

.---------- Application groups -----------
/webapps/foo#default:
  App root: /webapps/foo
  Requests in queue: 0
  * PID: 77283   Sessions: 0       Processed: 1       Uptime: 18s
    CPU: 1%      Memory  : 8M      Last used: 18s ago

11.10.3. Configuring Flying Passenger

Flying Passenger gets some configuration from the web server, but not all. In particular, most web server directives that are only valid in the http context, e.g. passenger_log_level, have no effect when using Flying Passenger. Instead, you are supposed to pass these configuration directives through command line options to the Flying Passenger daemon. Configuration directives that have no effect on Flying Passenger are documented as such. You can assume that configuration directives that are not documented as such, work fine on Flying Passenger.

For example, to achieve the same effect as setting passenger_log_level to 2, run the Flying Passenger daemon as follows:

$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock --log-level=2

Currently, not all configuration directives have a Flying Passenger equivalent. Run the following command to see an overview of available options:

$ flying-passenger --help

11.10.4. Managing the Flying Passenger daemon

The Flying Passenger daemon runs in the foreground by default. This is undesirable on server environments. You can make it go into the background by passing --daemonize, --log-file and --pid-file:

$ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock \
    --daemonize --log-file=/var/log/flying-passenger.log \
    --pid-file=/var/run/flying-passenger.pid

You can shut down a Flying Passenger daemon by sending SIGINT or SIGTERM to it:

$ kill `cat /var/run/flying-passenger.pid`

We recommend using daemontools or runit for managing the Flying Passenger daemon. These tools will allow automatically starting the Flying Passenger daemon at boot, and will automatically restart the daemon if it crashes. You can create and enable a daemontools/runit service as folows:

$ sudo mkdir /etc/service/flying-passenger
$ sudo nano /etc/service/flying-passenger/run
#!/bin/sh
exec /path-to/flying-passenger \
    --socket-file=/var/run/flying-passenger.sock \
    --log-file=/var/log/flying-passenger.log \
    --pid-file=/var/run/flying-passenger.pid

Immediately after creating the run file, daemontools/runit automatically runs it to start the daemon. Note that the location (/etc/service) depends on the OS or Linux distros. Sometimes it’s /service. Also note that we start the Flying Passenger daemon without --daemonize.

To shut down a daemontools/runit-managed daemon, you need to use svc -d /etc/service/flying-passenger (daemontools) or sv stop /etc/service/flying-passenger (runit) instead of sending a signal to the process.

11.10.5. Using Flying Passenger with MRI 1.8 or JRuby

Using Flying Passenger in combination with MRI Ruby 1.8 or with JRuby requires special attention. This is because the Flying Passenger daemon is written in Ruby, and requires proper Process.spawn support, which neither MRI 1.8 nor JRuby support.

It is however possible to use Flying Passenger with MRI Ruby 1.8 and JRuby. You can’t run the Flying Passenger daemon in MRI 1.8 or JRuby, but you can still run the web applications - hosted under Flying Passenger - in MRI 1.8 or JRuby.

First, edit your Nginx configuration file and specify a Ruby interpreter for your web applications. For example:

# Connect to the Flying Passenger daemon on the following socket
passenger_fly_with /var/run/flying-passenger.sock;
...

server {
    listen 80;
    server_name www.foo.com;
    root /webapps/foo/public;
    passenger_enabled on;
    # Use JRuby for this web application
    passenger_ruby /opt/jruby/bin/jruby;
}

Then you need to install a Ruby 1.9-compatible Ruby interpeter with POSIX spawn support, alongside JRuby/MRI 1.8. Ruby interpreters which can be used for running the Flying Passenger daemon include:

  • MRI Ruby >= 1.9.

  • Rubinius.

The following example demonstrates how you can install MRI Ruby 1.9 in parallel with your MRI Ruby 1.8 or JRuby installation.

Example for Debian/Ubuntu users:

# Install Ruby 1.9
sudo apt-get install ruby1.9.3
# Run the Flying Passenger daemon in Ruby 1.9
ruby1.9 -S flying-passenger --socket-file=/var/run/flying-passenger.sock

Example for RVM users:

# Install Ruby 1.9
rvm install 1.9.3
# Run the Flying Passenger daemon in Ruby 1.9
$ rvm-exec 1.9.3 ruby -S flying-passenger --socket-file=/var/run/flying-passenger.sock

The Flying Passenger daemon will now be run on Ruby 1.9, while the web application www.foo.com will be run on JRuby.

11.10.6. Caveats and limitations

Beware of the following caveats and limitations when using Flying Passenger:

  • The Nginx executable must be compiled with the same version of Phusion Passenger as the Flying Passenger daemon. Failing to meet this requirement may result in cryptic errors, or may result in certain features not working, until you’ve fixed the situation. When upgrading Phusion Passenger, you must restart both Nginx and the Flying Passenger daemon.

  • The passenger_root directive has no effect. When using Flying Passenger, you are not supposed to set passenger_root.

  • The Flying Passenger daemon is written in Ruby. It requires a Ruby interpreter with proper Process#spawn support. At the time of writing, all Ruby interpreters in existance satisfy this requirement, except for MRI Ruby 1.8 and JRuby. See Using Flying Passenger with MRI 1.8 or JRuby for more information.

  • When you add a new application to the web server configuration, Flying Passenger will automatically pick up the application’s settings and spawn this new application upon the first request to it. However it is not capable of automatically starting the new app before a request has been sent to it (i.e. passenger_pre_start-like behavior is not available in this case). As a workaround, you can send an HTTP request to your application after starting the daemon, which forces it to spawn application processes.

  • When you remove an application from the web server configuration, Flying Passenger will not detect the removal and will not shut down the associated application processes. Killing the application processes will also not help, because Flying Passenger will restart them per the (now-removed, but still in the Flying Passenger daemon’s memory) passenger_min_instances settings. At the moment, there are two ways to get rid of those processes:

    • Before removing the application from the web server configuration, explicitly set its passenger_min_instances to 0. Next, send a request to it, which will cause the Flying Passenger daemon to take over the new passenger_min_instances 0 option. You can then proceed with removing the application from the web server configuration, and restarting the web server. Finally, kill the PIDs associated to those application processes and remove the application configuration.

    • Restart the Flying Passenger daemon.

12. Under the hood

Phusion Passenger hides a lot of complexity for the end user (i.e. the web server system administrator), but sometimes it is desirable to know what is going on. This section describes a few things that Phusion Passenger does under the hood.

12.1. Page caching support

For each HTTP request, Phusion Passenger will automatically look for a corresponding page cache file, and serve that if it exists. It does this by appending ".html" to the filename that the URI normally maps to, and checking whether that file exists. This check occurs after checking whether the original mapped filename exists (as part of static asset serving). All this is done without the need for special mod_rewrite rules.

For example, suppose that the browser requests /foo/bar.

  1. Phusion Passenger will first check whether this URI maps to a static file, i.e. whether the file foo/bar exists in the web application’s public directory. If it does then Phusion Passenger will serve this file through the web server immediately.

  2. If that doesn’t exist, then Phusion Passenger will check whether the file foo/bar.html exists. If it does then Phusion Passenger will serve this file through the web server immediately.

  3. If foo/bar.html doesn’t exist either, then Phusion Passenger will forward the request to the underlying web application.

Note that Phusion Passenger’s page caching support doesn’t work if your web application uses a non-standard page cache directory, i.e. if it doesn’t cache to the public directory. In that case you’ll need to use mod_rewrite to serve such page cache files.

12.2. Phusion Passenger and its relationship with Ruby

12.2.1. How Ruby is used

Phusion Passenger’s core is written in C++ for performance and memory efficiency. It supports web applications written in any language. Phusion Passenger requires Ruby, its usage of Ruby is minimal in order to maximize performance and to minimize memory usage.

  • Phusion Passenger’s installer, build system and administration tools are written in Ruby.

  • Certain internally used tools, such as the crash handler (which generates a backtrace in case Phusion Passenger crash) and the prespawn script (used to implement passenger_pre_start) are written in Ruby as well.

  • Ruby web application support is implemented in Ruby.

  • If you use Flying Passenger, then the Flying Passenger daemon is written in Ruby. The daemon is a small (less than 500 lines of code) and offloads most tasks to the C++ core.

  • If you use Phusion Passenger Standalone, then the frontend (the passenger command) is written in Ruby. The frontend is small (less than 1500 lines of code) and offloads most tasks to the C++ core.

Other than the aforementioned aspects, Phusion Passenger does not use Ruby during normal operation. For example, if you run Python WSGI web applications on Phusion Passenger, then there will be (almost) no Ruby code running on the system.

12.2.2. When the system has multiple Ruby interpreters

Phusion Passenger may be installed with any Ruby interpreter. Once installed, you can run Phusion Passenger’s Ruby parts under any Ruby interpreter you want, even if that Ruby interpreter was not the one you originally installed Phusion Passenger with.

The reason for this is that Phusion Passenger does not dynamically link to Ruby: Phusion Passenger uses Ruby entirely out-of-process. Thus you can switch to any Ruby interpreter you want during runtime, without recompiling Phusion Passenger, and without worrying about what Ruby you used to install Phusion Passenger.

Phusion Passenger is also capable of running Ruby web applications under any Ruby interpreter you want. So it is not important which Ruby you use to install Phusion Passenger: it will work regardless. Please refer to the documentation for the passenger_ruby directive to learn how run different web applications under different Ruby interpreters.

Caveat: RVM and RVM gemsets

There is however one caveat if you happen to be using RVM or RVM gemsets. When you gem install Phusion Passenger using RVM, then RVM will install Phusion Passenger into the currently active RVM Ruby and gemset. This means that Phusion Passenger commands - such as passenger, passenger-install-xxx-module and passenger-status - are available in that same RVM Ruby and gemset only. When you switch Ruby interpreter, or when you switch gemset, the Phusion Passenger commands will no longer be available, and you will get a command not found error. Here’s an example which demonstrates the problem.

"Command not found" problem demonstration
## Install Phusion Passenger (open source edition) using Ruby 1.9.3
## and the 'business' gemset
$ rvm use 1.9.3
Using /home/phusion/.rvm/gems/ruby-1.9.3-p429
$ rvm gemset create business
$ rvm gemset use business
Using ruby-1.9.3-p429 with gemset business
$ curl -O https://s3.amazonaws.com/phusion-passenger/releases/gem_bootstrap.sh
$ eval "`sh gem_bootstrap.sh`"
$ gem install passenger

## Verify that passenger works
$ passenger --version
Phusion Passenger version 4.0.14

## Switch to a different RVM gemset. You will get a `command not found`
$ rvm gemset use default
Using ruby-1.9.3-p429 with gemset default
$ passenger --version
bash: passenger: command not found

## Switch to a different Ruby interpreter. You will also get
## a `command not found`
$ rvm use 2.0.0
Using /home/phusion/.rvm/gems/ruby-2.0.0-p195
$ passenger --version
bash: passenger: command not found

## Switch back to the Ruby and gemset that you installed Phusion
## Passenger with, and verify that it works again
$ rvm use 1.9.3
Using /home/phusion/.rvm/gems/ruby-2.0.0-p195
$ rvm gemset use business
Using ruby-1.9.3-p429 with gemset business
$ passenger --version
Phusion Passenger version 4.0.14
Solutions

There are several ways to solve this problem:

  1. Permanently add Phusion Passenger’s command directory to your PATH, so that your shell can always find them even when you switch RVM Ruby or gemset. If you don’t know what PATH means, please read About environment variables first.

    The drawback is that you have to redo this every time you upgrade Phusion Passenger, because the Phusion Passenger directory filename is dependent on the version number.

    First, identify the location of the Phusion Passenger command directory, like this:

    $ echo `passenger-config --root`/bin
    /home/phusion/.rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.15/bin

    Next, add the directory that you’ve found to your current shell’s PATH:

    $ export PATH=/home/phusion/.rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.15/bin:$PATH

    Finally, make the change permanent by appending the above command to your bash startup file:

    $ echo 'export PATH=/home/phusion/.rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.15/bin:$PATH' >> ~/.bashrc
  2. Switch back to the RVM Ruby and gemset that you installed Phusion Passenger with, before running any Phusion Passenger command.

  3. Prepend any Phusion Passenger command with rvm-exec RUBY_NAME@GEMSET_NAME ruby -S. If the relevant Phusion Passenger command also needs root privileges, then prepend rvmsudo before that. For example:

    rvm-exec 1.9.3@business ruby -S passenger --version
    rvmsudo rvm-exec 1.9.3@business ruby -S passenger-install-apache2-module

12.3. How Phusion Passenger detects whether a virtual host is a web application

After you’ve read the deployment instructions you might wonder how Phusion Passenger knows that the server root points to a web application that Phusion Passenger is able to serve, and how it knows what kind of web application it is (e.g. Rails or Rack).

Phusion Passenger checks whether the virtual host is a Rails application by checking whether the following file exists:

dirname(DocumentRoot) + "/config/environment.rb"

If you’re not a programmer and don’t understand the above pseudo-code snippet, it means that Phusion Passenger will:

  1. Extract the parent directory filename from the value of the “root” directive.

  2. Append the text "/config/environment.rb" to the result, and check whether the resulting filename exists.

So suppose that your server root is /webapps/foo/public. Phusion Passenger will check whether the file /webapps/foo/config/environment.rb exists.

Note that Phusion Passenger for Nginx does not resolve any symlinks in the root path. So for example, suppose that your root points to /home/www/example.com, which in turn is a symlink to /webapps/example.com/public. Phusion Passenger for Nginx will check for /home/www/config/environment.rb, not /webapps/example.com/config/environment.rb. This file of course doesn’t exist, and as a result Phusion Passenger will not activate itself for this virtual host, and you’ll most likely see some output generated by the Nginx default directory handler such as a Forbidden error message.

Detection of Rack applications happens through the same mechanism, exception that Phusion Passenger will look for config.ru instead of config/environment.rb.

13. Appendix A: About this document

The text of this document is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License.

Phusion Passenger is brought to you by Phusion.

Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.

14. Appendix B: Terminology

14.1. Application root

The root directory of an application that’s served by Phusion Passenger.

In case of Ruby on Rails applications, this is the directory that contains Rakefile, app/, config/, public/, etc. In other words, the directory pointed to by RAILS_ROOT. For example, take the following directory structure:

/apps/foo/       <------ This is the Rails application's application root!
   |
   +- app/
   |   |
   |   +- controllers/
   |   |
   |   +- models/
   |   |
   |   +- views/
   |
   +- config/
   |   |
   |   +- environment.rb
   |   |
   |   +- ...
   |
   +- public/
   |   |
   |   +- ...
   |
   +- ...

In case of Rack applications, this is the directory that contains config.ru. For example, take the following directory structure:

/apps/bar/      <----- This is the Rack application's application root!
   |
   +- public/
   |    |
   |    +- ...
   |
   +- config.ru
   |
   +- ...

In case of Python (WSGI) applications, this is the directory that contains passenger_wsgi.py. For example, take the following directory structure:

/apps/baz/      <----- This is the WSGI application's application root!
   |
   +- public/
   |    |
   |    +- ...
   |
   +- passenger_wsgi.py
   |
   +- ...

14.2. Idle process

An "idle process" refers to a process that hasn’t processed any requests for a while.

14.3. Inactive process

An "inactive process" refers to a process that’s current not processing any requests. An idle process is always inactive, but an inactive process is not always considered idle.

15. Appendix C: Spawning methods explained

At its core, Phusion Passenger is an HTTP proxy and process manager. It spawns Ruby on Rails/Rack/WSGI worker processes (which may also be referred to as backend processes), and forwards incoming HTTP request to one of the worker processes.

While this may sound simple, there’s not just one way to spawn worker processes. Let’s go over the different spawning methods. For simplicity’s sake, let’s assume that we’re only talking about Ruby on Rails applications.

15.1. The most straightforward and traditional way: direct spawning

Phusion Passenger could create a new Ruby process, which will then load the Rails application along with the entire Rails framework. This process will then enter an request handling main loop.

This is the most straightforward way to spawn worker processes. If you’re familiar with the Mongrel application server, then this approach is exactly what mongrel_cluster performs: it creates N worker processes, each which loads a full copy of the Rails application and the Rails framework in memory. The Thin application server employs pretty much the same approach.

Note that Phusion Passenger’s version of direct spawning differs slightly from mongrel_cluster. Mongrel_cluster creates entirely new Ruby processes. In programmers jargon, mongrel_cluster creates new Ruby processes by forking the current process and exec()-ing a new Ruby interpreter. Phusion Passenger on the other hand creates processes that reuse the already loaded Ruby interpreter. In programmers jargon, Phusion Passenger calls fork(), but not exec().

15.2. The smart spawning method

Note Smart spawning is supported for all Ruby applications but not for WSGI applications.

While direct spawning works well, it’s not as efficient as it could be because each worker process has its own private copy of the Rails application as well as the Rails framework. This wastes memory as well as startup time.

Worker processes and direct spawning
Figure: Worker processes and direct spawning. Each worker process has its own private copy of the application code and Rails framework code.

It is possible to make the different worker processes share the memory occupied by application and Rails framework code, by utilizing so-called copy-on-write semantics of the virtual memory system on modern operating systems. As a side effect, the startup time is also reduced. This is technique is exploited by Phusion Passenger’s smart spawn method.

15.2.1. How it works

When the smart spawn method is being used, Phusion Passenger will first create a so-called ApplicationSpawner server process. This process loads the entire Rails application along with the Rails framework, by loading environment.rb. Then, whenever Phusion Passenger needs a new worker process, it will instruct the ApplicationSpawner server to do so. The ApplicationSpawner server will create a worker new process that reuses the already loaded Rails application/framework. Creating a worker process through an already running ApplicationSpawner server is very fast, about 10 times faster than loading the Rails application/framework from scratch. If the Ruby interpreter is copy-on-write friendly (that is, if you’re running Ruby Enterprise Edition) then all created worker processes will share as much common memory as possible. That is, they will all share the same application and Rails framework code.

images/smart.png
Figure: Worker processes and the smart spawn method. All worker processes, as well as the ApplicationSpawner, share the same application code and Rails framework code.

The smart method allows different worker processes that belong to the same application to share memory.

Notes:

  • Vendored Rails frameworks cannot be shared by different applications, even if both vendored Rails frameworks are the same version. So for efficiency reasons we don’t recommend vendoring Rails.

  • ApplicationSpawner servers have an idle timeout just like worker processes. If an ApplicationSpawner/FrameworkSpawner server hasn’t been instructed to do anything for a while, it will be shutdown in order to conserve memory. This idle timeout is configurable.

15.2.2. Summary of benefits

Suppose that Phusion Passenger needs a new worker process for an application that uses Rails 2.2.1.

If the smart spawning method is used, and an ApplicationSpawner server for this application is already running, then worker process creation time is about 10 times faster than direct spawning. This worker process will also share application and Rails framework code memory with the ApplicationSpawner server and the worker processes that had been spawned by this ApplicationSpawner server.

In practice, the smart spawning method could mean a memory saving of about 33%, assuming that your Ruby interpreter is copy-on-write friendly.

Of course, smart spawning is not without gotchas. But if you understand the gotchas you can easily reap the benefits of smart spawning.

15.3. Smart spawning gotcha #1: unintentional file descriptor sharing

Because worker processes are created by forking from an ApplicationSpawner server, it will share all file descriptors that are opened by the ApplicationSpawner server. (This is part of the semantics of the Unix fork() system call. You might want to Google it if you’re not familiar with it.) A file descriptor is a handle which can be an opened file, an opened socket connection, a pipe, etc. If different worker processes write to such a file descriptor at the same time, then their write calls will be interleaved, which may potentially cause problems.

The problem commonly involves socket connections that are unintentionally being shared. You can fix it by closing and reestablishing the connection when Phusion Passenger is creating a new worker process. Phusion Passenger provides the API call PhusionPassenger.on_event(:starting_worker_process) to do so. So you could insert the following code in your environment.rb:

if defined?(PhusionPassenger)
    PhusionPassenger.on_event(:starting_worker_process) do |forked|
        if forked
            # We're in smart spawning mode.
            ... code to reestablish socket connections here ...
        else
            # We're in direct spawning mode. We don't need to do anything.
        end
    end
end

Note that Phusion Passenger automatically reestablishes the connection to the database upon creating a new worker process, which is why you normally do not encounter any database issues when using smart spawning mode.

15.3.1. Example 1: Memcached connection sharing (harmful)

Suppose we have a Rails application that connects to a Memcached server in environment.rb. This causes the ApplicationSpawner to have a socket connection (file descriptor) to the Memcached server, as shown in the following figure:

+--------------------+
| ApplicationSpawner |-----------[Memcached server]
+--------------------+

Phusion Passenger then proceeds with creating a new Rails worker process, which is to process incoming HTTP requests. The result will look like this:

+--------------------+
| ApplicationSpawner |------+----[Memcached server]
+--------------------+      |
                            |
+--------------------+      |
| Worker process 1   |-----/
+--------------------+

Since a fork() makes a (virtual) complete copy of a process, all its file descriptors will be copied as well. What we see here is that ApplicationSpawner and Worker process 1 both share the same connection to Memcached.

Now supposed that your site gets Slashdotted and Phusion Passenger needs to spawn another worker process. It does so by forking ApplicationSpawner. The result is now as follows:

+--------------------+
| ApplicationSpawner |------+----[Memcached server]
+--------------------+      |
                            |
+--------------------+      |
| Worker process 1   |-----/|
+--------------------+      |
                            |
+--------------------+      |
| Worker process 2   |-----/
+--------------------+

As you can see, Worker process 1 and Worker process 2 have the same Memcached connection.

Suppose that users Joe and Jane visit your website at the same time. Joe’s request is handled by Worker process 1, and Jane’s request is handled by Worker process 2. Both worker processes want to fetch something from Memcached. Suppose that in order to do that, both handlers need to send a "FETCH" command to Memcached.

But suppose that, after worker process 1 having only sent "FE", a context switch occurs, and worker process 2 starts sending a "FETCH" command to Memcached as well. If worker process 2 succeeds in sending only one bye, F, then Memcached will receive a command which begins with "FEF", a command that it does not recognize. In other words: the data from both handlers get interleaved. And thus Memcached is forced to handle this as an error.

This problem can be solved by reestablishing the connection to Memcached after forking:

+--------------------+
| ApplicationSpawner |------+----[Memcached server]
+--------------------+      |                   |
                            |                   |
+--------------------+      |                   |
| Worker process 1   |-----/|                   |
+--------------------+      |                   |  <--- created this
                            X                   |       new
                                                |       connection
                            X <-- closed this   |
+--------------------+      |     old           |
| Worker process 2   |-----/      connection    |
+--------------------+                          |
          |                                     |
          +-------------------------------------+

Worker process 2 now has its own, separate communication channel with Memcached. The code in environment.rb looks like this:

if defined?(PhusionPassenger)
    PhusionPassenger.on_event(:starting_worker_process) do |forked|
        if forked
            # We're in smart spawning mode.
            reestablish_connection_to_memcached
        else
            # We're in direct spawning mode. We don't need to do anything.
        end
    end
end

15.3.2. Example 2: Log file sharing (not harmful)

There are also cases in which unintentional file descriptor sharing is not harmful. One such case is log file file descriptor sharing. Even if two processes write to the log file at the same time, the worst thing that can happen is that the data in the log file is interleaved.

To guarantee that the data written to the log file is never interleaved, you must synchronize write access via an inter-process synchronization mechanism, such as file locks. Reopening the log file, like you would have done in the Memcached example, doesn’t help.

15.4. Smart spawning gotcha #2: the need to revive threads

Another part of the fork() system call’s semantics is the fact that threads disappear after a fork call. So if you’ve created any threads in environment.rb, then those threads will no longer be running in newly created worker process. You need to revive them when a new worker process is created. Use the :starting_worker_process event that Phusion Passenger provides, like this:

if defined?(PhusionPassenger)
    PhusionPassenger.on_event(:starting_worker_process) do |forked|
        if forked
            # We're in smart spawning mode.
            ... code to revive threads here ...
        else
            # We're in direct spawning mode. We don't need to do anything.
        end
    end
end

15.5. Smart spawning gotcha #3: code load order

This gotcha is only applicable to the smart spawn method, not the smart-lv2 spawn method.

If your application expects the Rails framework to be not loaded during the beginning of environment.rb, then it can cause problems when an ApplicationSpawner is created from a FrameworkSpawner, which already has the Rails framework loaded. The most common case is when applications try to patch Rails by dropping a modified file that has the same name as Rails’s own file, in a path that comes earlier in the Ruby search path.

For example, suppose that we have an application which has a patched version of active_record/base.rb located in RAILS_ROOT/lib/patches, and RAILS_ROOT/lib/patches comes first in the Ruby load path. When conservative spawning is used, the patched version of base.rb is properly loaded. When smart (not smart-lv2) spawning is used, the original base.rb is used because it was already loaded, so a subsequent require "active_record/base" has no effect.

16. Appendix D: About environment variables

The Phusion Passenger compilation process can be customized with environment variables.

Environment variables are named values that affect how the system works. For example they tell the system where to look for commands (the PATH variable) or where to look for libraries (LD_LIBRARY_PATH). Their names are often in all-uppercase. Sometimes people refer to an environment variable with a dollar sign $ in front, but that’s the same thing: when people say "the $PATH environment variable" they mean "the PATH environment variable". This is because the dollar sign $ is a shell syntax for refering to an environment variable, as you will learn later.

Environment variables are set on a per-process basis, but they are inherited by child processes. This means that if you set environment variables in process A, another already running process B will not see these new environment variables. But if A spawns a child process C, then C will have all environment variables that A had. If you once again change the environment variables in A, then C will not see the changes.

The per-process nature of environment variables some implications. When you set environment variables in your bashrc or other bash startup files


  • 
only newly spawned bash shells see them.

  • 
the web server usually does not see them, because the web server tends to be started from init scripts, not from bash.

  • 
cron jobs do not see them, because cron jobs' environment variables are entirely dictated by their crontabs.

Note Because this chapter is meant for beginners, it assumes that the reader uses the bash shell. This chapter does not describe instructions for zsh, csh or other shells. We assume that users of other shells are familiar with the Bourne shell syntax, and know how to apply the instructions in this chapter in their shells' native syntaxes.

16.1. Working with environment variables

You can see all environment variables in your shell by running the following command:

env

You can set an evironment variable with the syntax export <NAME>=<VALUE>. For example, to set the APXS2 variable to the value /usr/sbin/apxs2:

export APXS2=/usr/sbin/apxs2

Any process that you run from your shell from that point on will have said environment variable:

export APXS2=/usr/sbin/apxs2
ruby -e 'p ENV["APXS2"]'
# => "/usr/sbin/apxs2"
Note
The "export" keyword is important

You must set the export keyword. If you omit the export keyword then the environment variable will not be visible to other processes:

APXS2=/usr/sbin/apxs2
ruby -e 'p ENV["APXS2"]'
# => nil

You can reference an environment variable in your shell by typing the $ sign followed by the environment variable’s name. For example, to see the value of the PATH variable:

echo $PATH

You can also use this trick to extend the value of an environment variable:

export PATH=/usr/bin

# Prepends '/opt/local/bin', so that it becomes /opt/local/bin:/usr/bin
export PATH=/opt/local/bin:$PATH
# Appends '/usr/local/bin', so that it becomes /opt/local/bin:/usr/bin:/usr/local/bin
export PATH=$PATH:/usr/local/bin

16.2. The PATH environment variable

The PATH environment variable dictates where the system looks for command. It is a colon-separated list of directories. If you get a "command not found" error while you know that the command is installed, then setting PATH will help. For example suppose that the command frobnicator is in /opt/local/bin:

user@localhost bash$ frobnicator
bash: frobnicator: command not found

We verify that /opt/local/bin is not in PATH:

user@localhost bash$ echo $PATH
/bin:/usr/bin:/usr/local/bin

We can run frobnicator through it’s full path


user@localhost bash$ /opt/local/bin/frobnicator
# => success!


or we can add /opt/local/bin to PATH.

user@localhost bash$ export PATH=$PATH:/opt/local/bin
user@localhost bash$ frobnicator
# => success!

16.2.1. Adding Phusion Passenger’s administration tools to PATH

If you get a "command not found" error when invoking one of the Phusion Passenger administration tools (e.g. passenger-status or passenger-memory-stats then that means the tools are not in PATH, so you need to add them.

  • If you installed Phusion Passenger with RubyGems, then the tools are in your RubyGems executable path. You can view the gem path using the command gem env:

    $ gem env
    RubyGems Environment:
      - RUBYGEMS VERSION: 1.8.15
      - RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [i686-darwin10.8.0]
      - INSTALLATION DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
      - RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby
      - EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/bin    <--------- !!
      - RUBYGEMS PLATFORMS:
        - ruby
        - x86-darwin-10
      - GEM PATHS:
         - /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
         - /Users/hongli/.gem/ruby/1.8
      - GEM CONFIGURATION:
         - :update_sources => true
         - :verbose => true
         - :benchmark => false
         - :backtrace => false
         - :bulk_threshold => 1000
         - "gem" => "--no-ri --no-rdoc"
      - REMOTE SOURCES:
         - http://rubygems.org/

    As you can see, the RubyGems executable path in the example happens to be /opt/ruby-enterprise-1.8.7-2010.01/bin. So that directory must be added to PATH.

  • If you installed Phusion Passenger using the tarball, then the tools are in the bin subdirectory of the Phusion Passenger tarball directory that you extracted. For example, if you extracted passenger-4.9.0.tar.gz inside /opt, then the tools are located in /opt/passenger-4.0.9/bin. In that case, you need to add /opt/passenger-4.0.9/bin to your PATH.

  • If you installed Phusion Passenger using native OS packages, then some Phusion Passenger administration tools are in /usr/bin, while others are in /usr/sbin. If you are not logged in as root, then /usr/sbin may not be in PATH, which would explain why you get a "command not found" when trying to invoke some of the tools. You should /usr/sbin to PATH.

  • If you are unsure where your Phusion Passenger directory is then you can use the find command to look them up. Go to the root directory and invoke find with sudo:

    $ cd /
    $ sudo find . -name passenger-status
    /usr/local/passenger/bin/passenger-status

    In this example, the administration tools happen to be in /usr/local/passenger/bin, so you must add that to PATH.

Note You may still get a "command not found" when invoking the tools through sudo, even after you’ve added the relevant directory to PATH. Please read Environment variables and sudo to learn more.

16.3. Making environment variables permanent

When you exit your shell, the evironment variable changes are lost. There is no standard method to set environment variables system-wide, so you have to set them in different configuration files for different services.

16.3.1. bash

To make environment variables permanent for future bash sessions for the current user, add them to your ~/.bashrc:

echo 'export FOO=bar' >> ~/.bashrc
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc

To make them permanent for future bash sessions for all users, add them to /etc/bashrc.

Note Depending on the system, the bashrc file may have a different filename. On Debian and Ubuntu, it’s /etc/bash.bashrc.

16.3.2. Apache

Note This subsection describes how to set environment variables on Apache itself, not on apps served through Phusion Passenger for Apache. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also Setting environment variables on Phusion Passenger-served apps.

On Debian and Ubuntu, with an Apache installed through apt, Apache environment variables are defined in the file /etc/apache2/envvars. This is a shell script so environment variables must be specified with the shell syntax.

On Red Hat, Fedora, CentOS and ScientificLinux, with an Apache installed through YUM, Apache environment variables are defined in /etc/sysconfig/httpd.

On OS X they are defined in /System/Library/LaunchDaemons/org.apache.httpd.plist, as explained here on Stack Overflow.

On other systems, or if you did not install Apache through the system’s package manager, the configuration file for environment variables is specific to the vendor that supplied Apache. There may not even be such a configuration file. You should contact the vendor for support.

16.3.3. Nginx

Note This subsection describes how to set environment variables on Nginx itself, not on apps served through Phusion Passenger for Nginx. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also Setting environment variables on Phusion Passenger-served apps.

If you installed Nginx through the Debian or Ubuntu packages, then you can define environment variables in /etc/default/nginx. This is a shell script so you must use the export FOO=bar syntax.

Otherwise, environment variables are best set through the script which starts Nginx. For example, if you installed Nginx from source and you used the Nginx init script described earlier in this manual, then you should edit that script to define the environment variables. Those init scripts are regular shell scripts, so use the export FOO=bar syntax. Just make sure your set your environment variables before the script starts Nginx.

Note Setting environment variables on Nginx has no effect on the Flying Passenger daemon because the daemon is started seperately. You should set the environment variables in the shell right before starting the daemon.

16.3.4. cron

To make environment variables permanent for cron jobs, add those variables to the relevant crontab. But note that inside crontabs you cannot refer to existing environment variables with the $ syntax because crontabs are not shell scripts. You have to specify the entire value.

What to put in "crontab -e"
# Environment variable definitions
FOO=bar
APXS2=/usr/sbin/apxs2

# **WRONG!** You cannot refer to existing variables with the `$` syntax!
PATH=/usr/bin:$PATH
# **WRONG!** You cannot use the 'export' keyword!
export PATH=/usr/bin:/usr/local/bin
# Correct:
PATH=/usr/bin:/usr/local/bin

# Jobs:
# m h  dom mon dow   command
  * *  *   *   *     frobnicator

16.3.5. Phusion Passenger-served apps

You can pass environment variables to Phusion Passenger-served apps through various methods:

  • When running Apache, use the PassEnv and SetEnv directives of mod_env. This is supported starting from Phusion Passenger 4.0.

  • When running Nginx, use the passenger_set_cgi_param directive.

  • Through your bashrc. Starting from version 4.0, Phusion Passenger 4.0 spawns applications through bash and inherit all bash environment variables. Phusion Passenger Standalone tends to be started from the shell and thus inherits all environment variables set by the shell.

  • Through Apache and Nginx, as described earlier in this chapter. Any environment variables that you set on Apache and Nginx itself are inherited by Phusion Passenger, and thus by Phusion Passenger-served apps as well.

  • Through the application itself. Most programming languages provide APIs for setting environment variables. For example in Ruby you can write:

    ENV['FOO'] = 'bar'

    In Python you can write:

    import os
    os.environ['FOO'] = 'bar'

16.4. Environment variables and sudo

Note RVM users should always use the rvmsudo command instead of sudo. However all information in this section apply to rvmsudo as well.

The sudo command resets all environment variables before running the specified command, for security reasons. So if you set environment variables before running sudo passenger-install-xxx-module, sudo passenger-status or any other commands, then the environment variables are not correctly passed to the command. You can solve this by running sudo with -E (preserve environment variables):

user@localhost bash$ export APXS2=/usr/sbin/apxs2
user@localhost bash$ sudo -E passenger-install-apache2-module

Alternatively, you can obtain a root prompt with sudo first, and then set the environment variables, before running any further commands:

user@localhost bash$ sudo -s
Password: ...
root@localhost bash# export APXS2=/usr/sbin/apxs2
root@localhost bash# passenger-install-apache2-module

Note that for security reasons, sudo always resets the PATH environment variable, even if you pass -E! You can get around this problem by obtaining a root prompt first, and then set the environment variables:

user@localhost bash$ sudo -s
Password: ...
root@localhost bash# export PATH=$PATH:/opt/myruby/bin
root@localhost bash# passenger-install-apache2-module

passenger-4.0.37/doc/Users guide Nginx.idmap.txt000644 000765 000024 00000040333 12233035540 022041 0ustar00honglistaff000000 000000 ###### Autogenerated by Mizuho, DO NOT EDIT ###### # This file maps section names to IDs so that the commenting system knows which # comments belong to which section. Section names may be changed at will but # IDs always stay the same, allowing one to retain old comments even if you # rename a section. # # This file is autogenerated but is not a cache; you MUST NOT DELETE this # file and you must check it into your version control system. If you lose # this file you may lose the ability to identity old comments. # # Entries marked with "fuzzy" indicate that the section title has changed # and that Mizuho has found an ID which appears to be associated with that # section. You should check whether it is correct, and if not, fix it. 1. Support information => support-information-nl5gdn 1.1. Supported operating systems => supported-operating-systems-a5n2x4 1.2. Where to get support => where-to-get-support-2s9na5 2. Installation => installing-phusion-passenger-hn03ac 2.1. Synopsis => synopsis-1uu3sqp 2.2. Installing or upgrading on Mac OS X with Homebrew => installing-or-upgrading-on-mac-os-x-with-homebrew-13ovvy9 2.3. Installing or upgrading on Debian or Ubuntu => installing-or-upgrading-on-ubuntu-fw5fvp 2.3.1. Adding our APT repository => adding-our-apt-repository-p60cki 2.3.2. Installing packages => installing-packages-j9glez 2.4. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux => installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-1uus5a1 2.5. Generic installation, upgrade and downgrade method: via RubyGems => generic-installation-upgrade-and-downgrade-method-via-rubygems-76uol7 2.6. Generic installation, upgrade and downgrade method: via tarball => generic-installation-upgrade-and-downgrade-method-via-tarball-2gkx43 2.7. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-1a58c2b 2.8. Cryptographic verification of installation files => cryptographic-verification-of-installation-files-2goray 2.8.1. Synopsis => synopsis-4fv6zw 2.8.2. Importing the Phusion Software Signing key => importing-the-phusion-software-signing-key-1qfpaj4 2.8.3. Verifying the Phusion Software Signing key => verifying-the-phusion-software-signing-key-i7f1vj 2.8.4. Verifying the gem and tarball => verifying-the-gem-and-tarball-dr9466 2.8.5. Verifying Git signatures => verifying-git-signatures-dyo4fk 2.8.6. Verifying DEB and RPM packages => verifying-deb-and-rpm-packages-1ed36d5 2.8.7. Revocation => revocation-xwvhea 2.9. Non-interactive, automatic, headless installs or upgrades => non-interactive-automatic-headless-installs-or-upgrades-834ymv 2.10. Customizing the compilation process => customizing-the-compilation-process-u4cdcf 2.10.1. Setting the compiler => setting-the-compiler-1l6dpe1 2.10.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-1jehjon 2.10.3. Forcing location of command line tools and dependencies => forcing-location-of-certain-command-line-tools-1j93cki 2.11. Installing as a normal Nginx module without using the installer => installing-as-a-normal-nginx-module-without-using-the-installer-1kkpes5 2.12. Creating an Nginx init script => creating-an-nginx-init-script-1kd8zg5 2.13. Disabling without uninstalling => disabling-without-uninstalling-1t5tqan 2.14. Uninstalling => uninstalling-phusion-passenger-wuycvb 2.15. Moving to a different directory => moving-to-a-different-directory-gif3wo 3. Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3) application => deploying-a-ruby-on-rails-1-x-or-2-x-but-not-rails-3-application-b69gqa 3.1. Deploying to a virtual host’s root => deploying-to-a-virtual-host-s-root-1mh24z5 3.2. Deploying to a sub URI => deploying-to-a-sub-uri-1il2qj7 3.3. Redeploying (restarting the Ruby on Rails application) => redeploying-restarting-the-ruby-on-rails-application--1eso761 3.4. Migrations => migrations-9yyb8w 3.5. Capistrano integration => capistrano-integration-1ktunm6 4. Deploying a Rack-based Ruby application (including Rails >= 3) => deploying-a-rack-based-ruby-application-including-rails-3--12benx3 4.1. Tutorial/example: writing and deploying a Hello World Rack application => tutorial-example-writing-and-deploying-a-hello-world-rack-application-1wstx99 4.2. Deploying to a virtual host’s root => deploying-to-a-virtual-host-s-root-f02erj 4.3. Deploying to a sub URI => deploying-to-a-sub-uri-37q0ou 4.4. Redeploying (restarting the Rack application) => redeploying-restarting-the-rack-application--xnbfam 4.5. Rackup specifications for various web frameworks => rackup-specifications-for-various-web-frameworks-1a2cs41 4.5.1. Camping => camping-16vz2yb 4.5.2. Halcyon => halcyon-1benlfl 4.5.3. Mack => mack-1ezijq6 4.5.4. Merb => merb-ddsh55 4.5.5. Ramaze => ramaze-1p2zod 4.5.6. Sinatra => sinatra-a7u9ag 5. Deploying a WSGI (Python) application => deploying-a-wsgi-python-application-1or2efo 5.1. Tutorial/example: writing and deploying a Hello World WSGI application => tutorial-example-writing-and-deploying-a-hello-world-wsgi-application-k5ron2 5.2. Deploying to a virtual host’s root => deploying-to-a-virtual-host-s-root-1chcpbj 5.3. Deploying to a sub URI => deploying-to-a-sub-uri-5v6zmg 5.4. Redeploying (restarting the WSGI application) => redeploying-restarting-the-wsgi-application--10zdh2k 6. Deploying a Node.js application => deploying-a-node-js-application-15wbczd 7. Deploying a Meteor application => deploying-a-meteor-application-1b51wl9 8. Configuring Phusion Passenger => configuring-phusion-passenger-1g1svey 8.1. passenger_root => passenger-root-directory--bqvhhz 8.2. Deployment options => deployment-options-1a1vxsp 8.2.1. passenger_enabled => passenger-enabled-on-off--1rpb2t7 8.2.2. passenger_ruby => passenger-ruby-filename--1gnok5k 8.2.3. passenger_python => passenger-python-filename--14p554 8.2.4. passenger_nodejs => passenger-nodejs-filename--16hzjsv 8.2.5. passenger_app_env => passenger-app-env-string--qjeimp 8.2.6. rails_env => rails-env-string--jlh7v9 8.2.7. rack_env => rack-env-string--tqmrt0 8.2.8. passenger_app_root => passenger-app-root-path-to-root--1dbudc6 8.2.9. passenger_base_uri => passenger-base-uri-uri--1xtuo50 8.2.10. passenger_document_root => passenger-document-root-path--1pge8kd 8.2.11. passenger_spawn_method => passenger-spawn-method-string--1sc6njl 8.2.12. passenger_load_shell_envvars => passenger-load-shell-envvars-on-off--fw5u4l 8.2.13. passenger_rolling_restarts => passenger-rolling-restarts 8.2.14. passenger_resist_deployment_errors => passenger-resist-deployment-errors-on-off--k9yf1 8.3. Connection handling options => connection-handling-options-8jgq90 8.3.1. passenger_ignore_client_abort => passenger-ignore-client-abort 8.3.2. passenger_set_cgi_param => passenger-set-cgi-param-cgi-environment-name-value--rx9gc0 8.3.3. passenger_pass_header
=> passenger-pass-header-header-name--1cg31je 8.3.4. passenger_buffer_response => passenger-buffer-response 8.3.5. passenger_buffer_size => passenger-buffer-size-1jfkq87 8.3.6. passenger_buffers => passenger-busy-buffers 8.3.7. passenger_busy_buffer_size => passenger-busy-buffer-size-124sj61 8.3.8. passenger_intercept_errors => passenger-intercept-errors-1uvcb9x 8.3.9. passenger_max_request_queue_size => passenger-max-request-queue-size-number--i0te1b 8.3.10. passenger_request_queue_overflow_status_code => passenger-request-queue-overflow-status-code-code--1wcwuxl 8.4. Security options => security-options-1bv93g4 8.4.1. passenger_user_switching => passenger-user-switching-on-off--1p37u3l 8.4.2. passenger_user => passenger-user-username--b06ur7 8.4.3. passenger_group => passenger-user-group-name--1fco4j7 8.4.4. passenger_default_user => passenger-default-user-username--1h6cdmf 8.4.5. Passenger_default_group => passenger-default-group-group-name--1qxn2qa 8.4.6. passenger_show_version_in_header => passenger-show-version-in-header-on-off--2h49av 8.4.7. passenger_friendly_error_pages => passenger-friendly-error-pages-on-off--1ti1a0e 8.5. Resource control and optimization options => resource-control-and-optimization-options-xd7evs 8.5.1. passenger_max_pool_size => passenger-max-pool-size-integer--3jzefs 8.5.2. passenger_min_instances => passenger-min-instances-integer--uclykt 8.5.3. passenger_max_instances => passenger-max-instances 8.5.4. passenger_max_instances_per_app => passenger-max-instances-per-app-integer--1xhbbne 8.5.5. passenger_pool_idle_time => passenger-pool-idle-time-integer--xcw65o 8.5.6. passenger_max_preloader_idle_time => rails-app-spawner-idle-time-integer--1xjqe4b 8.5.7. passenger_start_timeout => passenger-start-timeout-seconds--8xn504 8.5.8. passenger_concurrency_model => passenger-concurrency-model-process-thread--brcvkk 8.5.9. passenger_thread_count => passenger-thread-count-number--1kd6ffy 8.5.10. passenger_max_requests => passenger-max-requests-integer--sgzint 8.5.11. passenger_max_request_time => passenger-max-request-time-seconds--1htog2g 8.5.12. passenger_memory_limit => passenger-memory-limit-integer--1ry7dwx 8.5.13. passenger_pre_start => passenger-pre-start-url--npldeb 8.6. Logging and debugging options => logging-and-debugging-options-14e91ni 8.6.1. passenger_log_level => passenger-log-level-integer--17snhon 8.6.2. passenger_debug_log_file => passenger-debug-log-file-filename--21ubaj 8.6.3. passenger_debugger => passenger-debugger-on-off--1wkuq85 8.7. Advanced options => advanced-options-hnuhqz 8.7.1. passenger_temp_dir => passenger-temp-dir-directory--1t3opri 8.7.2. passenger_fly_with => passenger-fly-with-socket-filename--1amd1xn 8.8. Deprecated options => deprecated-options-1dtzo0g 8.8.1. rails_spawn_method => rails-spawn-method-17vdnpt 9. Troubleshooting => troubleshooting-1pt0c76 9.1. Generic troubleshooting tips => generic-troubleshooting-tips-xhe4nu 9.2. Why does the first request take a long time? => why-does-the-first-request-take-a-long-time--1knj9fp 9.3. Upon accessing the web app, Nginx reports a "Permission denied" error => upon-accessing-the-web-app-nginx-reports-a-permission-denied-error-1wgatlk 9.4. The application thinks its not on SSL even though it is => the-application-thinks-its-not-on-ssl-even-though-it-is-1e2m21h 9.5. Ruby on Rails-specific troubleshooting => ruby-on-rails-specific-troubleshooting-n8u5u1 9.5.1. The "About your application’s environment" link does not work => the-about-your-application-s-environment-link-does-not-work-9p7b2g 9.5.2. The Rails application reports that it’s unable to start because of a permission error => the-rails-application-reports-that-it-s-unable-to-start-because-of-a-permission-error-58ww8s 9.5.3. The Rails application’s log file is not being written to => the-rails-application-s-log-file-is-not-being-written-to-9m2i5h 10. Analysis and system maintenance => analysis-and-system-maintenance-1nnlnj8 10.1. Inspecting memory usage => inspecting-memory-usage-1k6y8v0 10.2. Inspecting Phusion Passenger’s internal status => inspecting-phusion-passenger-s-internal-status-v36wbc 10.3. Debugging frozen applications => debugging-frozen-applications-qoctl8 10.4. Accessing individual application processes => accessing-individual-application-processes-1qe4fqk 10.5. Attaching an IRB console to an application process => attaching-an-irb-console-to-an-application-process-d36enw 11. Tips => tips-n4c22d 11.1. User Switching (security feature) => user-switching-security--zmsy9o 11.1.1. Requirements => requirements-15ozqdj 11.1.2. Effects => effects-nd2m44 11.1.3. Caveats & troubleshooting => caveats-troubleshooting-mbw582 11.1.4. Finding out what user an application is running as => finding-out-what-user-an-application-is-running-as-1ni7zk6 11.2. Copy-on-write memory support (reducing memory consumption of Ruby applications) => reducing-memory-consumption-of-ruby-on-rails-applications-by-33--1o3z66q 11.3. Capistrano recipe => capistrano-recipe-pfn4qu 11.4. Bundler support => bundler-support-19v1h43 11.4.1. Does Phusion Passenger itself need to be added to the Gemfile? => does-phusion-passenger-itself-need-to-be-added-to-the-gemfile--xn1a11 11.5. Installing multiple Ruby on Rails versions => installing-multiple-ruby-on-rails-versions-1bp1fff 11.6. Making the application restart after each request => making-the-application-restart-after-each-request-vimy48 11.7. How to fix broken images/CSS/JavaScript URIs in sub-URI deployments => how-to-fix-broken-images-css-javascript-uris-in-sub-uri-deployments-11mzwt6 11.8. Out-of-Band Work and Out-of-Band Garbage Collection => out-of-band-work-and-out-of-band-garbage-collection-v89lu2 11.9. Hooks => hooks-qrxle1 11.9.1. Example => example-1orara9 11.9.2. Environment => environment-10uhg8m 11.9.3. Blocking and concurrency => blocking-and-concurrency-g5njp1 11.9.4. Error handling => error-handling-m78oxs 11.9.5. Compatibility => compatibility-132b3ns 11.9.6. Available hooks => available-hooks-11w1prq 11.10. Flying Passenger => flying-passenger-137qg5e 11.10.1. Requirements => requirements-194ysj6 11.10.2. Basic usage => basic-usage-1qtgvwx 11.10.3. Configuring Flying Passenger => configuring-flying-passenger-n558np 11.10.4. Managing the Flying Passenger daemon => managing-the-flying-passenger-daemon-vjmzdh 11.10.5. Using Flying Passenger with MRI 1.8 or JRuby => using-flying-passenger-with-mri-1-8-or-jruby-pxho35 11.10.6. Caveats and limitations => caveats-and-limitations-15wakf 12. Under the hood => under-the-hood-8uney 12.1. Page caching support => page-caching-support-nafhf6 12.2. Phusion Passenger and its relationship with Ruby => phusion-passenger-and-its-relationship-with-ruby-1hub1pa 12.2.1. How Ruby is used => how-ruby-is-used-j7g2a4 12.2.2. When the system has multiple Ruby interpreters => when-the-system-has-multiple-ruby-interpreters-fwn3t 12.3. How Phusion Passenger detects whether a virtual host is a web application => how-phusion-passenger-detects-whether-a-virtual-host-is-a-web-application-13qbmhn 13. Appendix A: About this document => appendix-a-about-this-document-zfvixm 14. Appendix B: Terminology => appendix-b-terminology-wzv5ro 14.1. Application root => application-root-1fd6bqv 14.2. Idle process => idle-process-13byfw9 14.3. Inactive process => inactive-process-1d2h0po 15. Appendix C: Spawning methods explained => appendix-c-spawning-methods-explained-tcp8e6 15.1. The most straightforward and traditional way: direct spawning => the-most-straightforward-and-traditional-way-conservative-spawning-civ29z 15.2. The smart spawning method => the-smart-spawning-method-7nhgtj 15.2.1. How it works => how-it-works-f9umga 15.2.2. Summary of benefits => summary-of-benefits-qovyvk 15.3. Smart spawning gotcha #1: unintentional file descriptor sharing => smart-spawning-gotcha-1-unintentional-file-descriptor-sharing-cebw6q 15.3.1. Example 1: Memcached connection sharing (harmful) => example-1-memcached-connection-sharing-harmful--1wfs3ad 15.3.2. Example 2: Log file sharing (not harmful) => example-2-log-file-sharing-not-harmful--ox4yfy 15.4. Smart spawning gotcha #2: the need to revive threads => smart-spawning-gotcha-2-the-need-to-revive-threads-1ey176o 15.5. Smart spawning gotcha #3: code load order => smart-spawning-gotcha-3-code-load-order-12ydsn8 16. Appendix D: About environment variables => appendix-d-about-environment-variables-1t2cuff 16.1. Working with environment variables => working-with-environment-variables-1kmvq8w 16.2. The PATH environment variable => the-path-environment-variable-vlp05e 16.2.1. Adding Phusion Passenger’s administration tools to PATH => adding-phusion-passenger-s-administration-tools-to-path-1flz2tu 16.3. Making environment variables permanent => making-environment-variables-permanent-1wjyhzt 16.3.1. bash => bash-19xsxec 16.3.2. Apache => apache-9hqtyj 16.3.3. Nginx => nginx-157dpwy 16.3.4. cron => cron-1nuc9cz 16.3.5. Phusion Passenger-served apps => phusion-passenger-served-apps-uiewl5 16.4. Environment variables and sudo => environment-variables-and-sudo-10lphxn passenger-4.0.37/doc/Users guide Nginx.txt000644 000765 000024 00000234330 12233035540 020752 0ustar00honglistaff000000 000000 = Phusion Passenger users guide, Nginx version = image:images/phusion_banner.png[link="http://www.phusion.nl/"] Phusion Passenger is an application server which can directly integrate into Nginx. It is designed to be easy to use, fast, stable and reliable and is used by link:http://trends.builtwith.com/Web-Server/Phusion-Passenger[hundreds of thousands of websites] all over the world. Phusion Passenger is a so-called polyglot application server because it supports applications written in multiple programming languages. At this time, Ruby and Python are supported. This users guide will teach you: - How to install Nginx with Phusion Passenger support. - How to configure Phusion Passenger. - How to deploy Ruby and Python applications. - How to solve common problems. This guide assumes that the reader is somewhat familiar with Nginx and with using the command line. == Support information include::users_guide_snippets/support_information.txt[] [[installation]] == Installation include::users_guide_snippets/installation.txt[] [[deploying_a_ror_app]] == Deploying a Ruby on Rails 1.x or 2.x (but NOT Rails >= 3) application == Suppose you have a Ruby on Rails application in '/webapps/mycook', and you own the domain 'www.mycook.com'. You can either deploy your application to the virtual host's root (i.e. the application will be accessible from the root URL, 'http://www.mycook.com/'), or in a sub URI (i.e. the application will be accessible from a sub URL, such as 'http://www.mycook.com/railsapplication'). NOTE: The default `RAILS_ENV` environment in which deployed Rails applications are run, is ``production''. You can change this by changing the <> configuration option. === Deploying to a virtual host's root === Add a 'server' virtual host entry to your Nginx configuration file. The virtual host's root must point to your Ruby on Rails application's 'public' folder. Inside the 'server' block, set 'passenger_enabled on'. For example: ------------------------------------------- http { ... server { listen 80; server_name www.mycook.com; root /webapps/mycook/public; passenger_enabled on; } ... } ------------------------------------------- Then restart Nginx. The application has now been deployed. [[deploying_rails_to_sub_uri]] === Deploying to a sub URI === Suppose that you already have a virtual host for the application `/websites/phusion`: ------------------------------------------- http { ... server { listen 80; server_name www.phusion.nl; root /websites/phusion; passenger_enabled on; } ... } ------------------------------------------- And you want your Rails application, located in `/websites/rails`, to be accessible from the URL 'http://www.phusion.nl/subapp'. To do this, you need to perform the following: 1. Create a `location` with parameter `~ ^/(/.*|$)`. This is a regular expression that says: "match everything that is exactly , or starts with /". 2. Inside the location block, set `alias $1`. 3. Inside the location block, set `passenger_base_uri `. 4. Inside the location block, set `passenger_app_root `. 5. Inside the location block, set `passenger_document_root `. 6. Inside the location block, re-specify `passenger_enabled on`. Here is an example: ------------------------------------------- http { ... server { listen 80; server_name www.phusion.nl; root /websites/phusion; # This block has been added. location ~ ^/subapp(/.*|$) { alias /websites/rails/public$1; # <-- be sure to point to 'public'! passenger_base_uri /subapp; passenger_app_root /websites/rails; passenger_document_root /websites/rails/public; passenger_enabled on; } } ... } ------------------------------------------- Then restart Nginx. The application has now been deployed on the sub-URI. === Redeploying (restarting the Ruby on Rails application) === Deploying a new version of a Ruby on Rails application is as simple as re-uploading the application files, and restarting the application. There are two ways to restart the application: 1. By restarting Nginx. 2. By creating or modifying the file 'tmp/restart.txt' in the Rails application's <>. Phusion Passenger will automatically restart the application during the next request. For example, to restart our example MyCook application, we type this in the command line: ------------------------------------------- touch /webapps/mycook/tmp/restart.txt ------------------------------------------- Please note that, unlike earlier versions of Phusion Passenger, 'restart.txt' is not automatically deleted. Phusion Passenger checks whether the timestamp of this file has changed in order to determine whether the application should be restarted. === Migrations === Phusion Passenger is not related to Ruby on Rails migrations in any way. To run migrations on your deployment server, please login to your deployment server (e.g. with 'ssh') and type `rake db:migrate RAILS_ENV=production` in a shell console, just like one would normally run migrations. === Capistrano integration === See <>. [[deploying_a_rack_app]] == Deploying a Rack-based Ruby application (including Rails >= 3) == Phusion Passenger supports arbitrary Ruby web applications that follow the link:http://rack.rubyforge.org/[Rack] interface. Phusion Passenger assumes that Rack application directories have a certain layout. Suppose that you have a Rack application in '/webapps/rackapp'. Then that folder must contain at least three entries: - 'config.ru', a Rackup file for starting the Rack application. This file must contain the complete logic for initializing the application. - 'public/', a folder containing public static web assets, like images and stylesheets. - 'tmp/', used for 'restart.txt' (our application restart mechanism). This will be explained in a following subsection. So '/webapps/rackapp' must, at minimum, look like this: ---------------------- /webapps/rackapp | +-- config.ru | +-- public/ | +-- tmp/ ---------------------- Suppose you own the domain 'www.rackapp.com'. You can either deploy your application to the virtual host's root (i.e. the application will be accessible from the root URL, 'http://www.rackapp.com/'), or in a sub URI (i.e. the application will be accessible from a sub URL, such as 'http://www.rackapp.com/rackapp'). NOTE: The default `RACK_ENV` environment in which deployed Rack applications are run, is ``production''. You can change this by changing the <> configuration option. === Tutorial/example: writing and deploying a Hello World Rack application === First we create a Phusion Passenger-compliant Rack directory structure: ------------------------------------------- $ mkdir /webapps/rack_example $ mkdir /webapps/rack_example/public $ mkdir /webapps/rack_example/tmp ------------------------------------------- Next, we write a minimal "hello world" Rack application: ------------------------------------------- $ cd /webapps/rack_example $ some_awesome_editor config.ru ...type in some source code... $ cat config.ru app = proc do |env| [200, { "Content-Type" => "text/html" }, ["hello world"]] end run app ------------------------------------------- Finally, we deploy it by adding the following configuration options to the Nginx configuration file: ------------------------------------------- http { ... server { listen 80; server_name www.rackexample.com; root /webapps/rack_example/public; passenger_enabled on; } ... } ------------------------------------------- And we're done! After an Nginx restart, the above Rack application will be available under the URL 'http://www.rackexample.com/'. === Deploying to a virtual host's root === Add a 'server' virtual host entry to your Nginx configuration file. The virtual host's root must point to your Rack application's 'public' folder. You must also set 'passenger_enabled on' in the 'server' block. For example: ------------------------------------------- http { ... server { listen 80; server_name www.rackapp.com; root /webapps/rackapp/public; passenger_enabled on; } ... } ------------------------------------------- Then restart Nginx. The application has now been deployed. [[deploying_rack_to_sub_uri]] === Deploying to a sub URI === Suppose that you already have a virtual host for the application `/websites/phusion`: ------------------------------------------- http { ... server { listen 80; server_name www.phusion.nl; root /websites/phusion; passenger_enabled on; } ... } ------------------------------------------- And you want your Rack application, located in `/websites/rack`, to be accessible from the URL 'http://www.phusion.nl/subapp'. To do this, you need to perform the following: 1. Create a `location` with parameter `~ ^/(/.*|$)`. This is a regular expression that says: "match everything that is exactly , or starts with /". 2. Inside the location block, set `alias $1`. 3. Inside the location block, set `passenger_base_uri `. 4. Inside the location block, set `passenger_app_root `. 5. Inside the location block, set `passenger_document_root `. 6. Inside the location block, re-specify `passenger_enabled on`. Here is an example: ------------------------------------------- http { ... server { listen 80; server_name www.phusion.nl; root /websites/phusion; # This block has been added. location ~ ^/subapp(/.*|$) { alias /websites/rack/public$1; # <-- be sure to point to 'public'! passenger_base_uri /subapp; passenger_app_root /websites/rack; passenger_document_root /websites/rack/public; passenger_enabled on; } } ... } ------------------------------------------- Then restart Nginx. The application has now been deployed on the sub-URI. === Redeploying (restarting the Rack application) === Deploying a new version of a Rack application is as simple as re-uploading the application files, and restarting the application. There are two ways to restart the application: 1. By restarting Nginx. 2. By creating or modifying the file 'tmp/restart.txt' in the Rack application's <>. Phusion Passenger will automatically restart the application. For example, to restart our example application, we type this in the command line: ------------------------------------------- touch /webapps/rackapp/tmp/restart.txt ------------------------------------------- === Rackup specifications for various web frameworks === include::users_guide_snippets/rackup_specifications.txt[] [[deploying_a_wsgi_app]] == Deploying a WSGI (Python) application Phusion Passenger supports all WSGI-compliant Python web applications. Suppose that you have a WSGI application in '/webapps/wsgiapp'. Then that folder must contain at least three entries: - 'passenger_wsgi.py', which Phusion Passenger will use as the main entry point for your application. This file must export a WSGI object called `application`. - 'public/', a folder containing public static web assets, like images and stylesheets. - 'tmp/', used for 'restart.txt' (our application restart mechanism). This will be explained in a following subsection. So '/webapps/wsgiapp' must, at minimum, look like this: ---------------------- /webapps/wsgiapp | +-- config.ru | +-- public/ | +-- tmp/ ---------------------- === Tutorial/example: writing and deploying a Hello World WSGI application === First we create a Phusion Passenger-compliant WSGI directory structure: ------------------------------------------- $ mkdir /webapps/wsgi_example $ mkdir /webapps/wsgi_example/public $ mkdir /webapps/wsgi_example/tmp ------------------------------------------- Next, we write a minimal "hello world" WSGI application: ------------------------------------------- $ cd /webapps/wsgi_example $ some_awesome_editor passenger_wsgi.py ...type in some source code... $ cat passenger_wsgi.py def application(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) return [b"hello world!\n"] ------------------------------------------- Finally, we deploy it by adding the following configuration options to the Nginx configuration file: ------------------------------------------- http { ... server { listen 80; server_name www.wsgiexample.com; root /webapps/wsgi_example/public; passenger_enabled on; } ... } ------------------------------------------- And we're done! After an Nginx restart, the above WSGI application will be available under the URL 'http://www.wsgiexample.com/'. === Deploying to a virtual host's root === Add a 'server' virtual host entry to your Nginx configuration file. The virtual host's root must point to your WSGI application's 'public' folder. You must also set 'passenger_enabled on' in the 'server' block. For example: ------------------------------------------- http { ... server { listen 80; server_name www.wsgiapp.com; root /webapps/wsgiapp/public; passenger_enabled on; } ... } ------------------------------------------- Then restart Nginx. The application has now been deployed. [[deploying_wsgi_to_sub_uri]] === Deploying to a sub URI === Suppose that you already have a virtual host for the application `/websites/phusion`: ------------------------------------------- http { ... server { listen 80; server_name www.phusion.nl; root /websites/phusion; passenger_enabled on; } ... } ------------------------------------------- And you want your WSGI application, located in `/websites/wsgi`, to be accessible from the URL 'http://www.phusion.nl/subapp'. To do this, you need to perform the following: 1. Create a `location` with parameter `~ ^/(/.*|$)`. This is a regular expression that says: "match everything that is exactly , or starts with /". 2. Inside the location block, set `alias $1`. 3. Inside the location block, set `passenger_base_uri `. 4. Inside the location block, set `passenger_app_root `. 5. Inside the location block, set `passenger_document_root `. 6. Inside the location block, re-specify `passenger_enabled on`. Here is an example: ------------------------------------------- http { ... server { listen 80; server_name www.phusion.nl; root /websites/phusion; # This block has been added. location ~ ^/subapp(/.*|$) { alias /websites/wsgi/public$1; # <-- be sure to point to 'public'! passenger_base_uri /subapp; passenger_app_root /websites/wsgi; passenger_document_root /websites/wsgi/public; passenger_enabled on; } } ... } ------------------------------------------- Then restart Nginx. The application has now been deployed on the sub-URI. === Redeploying (restarting the WSGI application) === Deploying a new version of a WSGI application is as simple as re-uploading the application files, and restarting the application. There are two ways to restart the application: 1. By restarting Nginx. 2. By creating or modifying the file 'tmp/restart.txt' in the WSGI application's <>. Phusion Passenger will automatically restart the application. For example, to restart our example application, we type this in the command line: ------------------------------------------- touch /webapps/wsgiapp/tmp/restart.txt ------------------------------------------- == Deploying a Node.js application Please refer to link:https://github.com/phusion/passenger/wiki/Phusion-Passenger%3A-Node.js-tutorial[the Node.js tutorial]. == Deploying a Meteor application Please refer to link:https://github.com/phusion/passenger/wiki/Phusion-Passenger:-Meteor-tutorial[the Meteor tutorial]. == Configuring Phusion Passenger == After installation, Phusion Passenger does not need any further configurations. Nevertheless, the system administrator may be interested in changing Phusion Passenger's behavior. Phusion Passenger supports the following configuration options in the Nginx configuration file: === passenger_root === The location to the Phusion Passenger root directory. This configuration option is essential to Phusion Passenger, and allows Phusion Passenger to locate its own data files. The correct value is given by the installer. If you've moved Phusion Passenger to a different directory then you need to update this option as well. Please read <> for more information. This required option may only occur once, in the 'http' configuration block. NOTE: This option has no effect when you are using <>. === Deployment options ==== passenger_enabled This option may be specified in the 'http' configuration block, a 'server' configuration block, a 'location' configuration block or an 'if' configuration scope, to enable or disable Phusion Passenger for that server or that location. Phusion Passenger is disabled by default, so you must explicitly enable it for server blocks that you wish to serve through Phusion Passenger. Please see <> and <> for examples. When using `location` blocks, you must re-specify `passenger_enabled` in each `location` block that you want to enable Phusion Passenger. This is because each `location` block has `passenger_enabled` turned off by default. For example: ---------------------------- server { listen 80; server_name www.foo.com; root /webapps/foo/public; passenger_enabled on; location /attachments { # Re-specify passenger_enabled here! passenger_enabled on; } } ---------------------------- [[PassengerRuby]] ==== passenger_ruby The `passenger_ruby` option allows one to specify the Ruby interpreter to use. Similarly, the `passenger_python` and `passenger_nodejs` options are for specifying the Python interpreter and Node.js commands, respectively. In versions prior to 4.0.0, only a single Ruby version was supported for the entire Nginx instance, so `passenger_ruby` may only occur in the global server configuration. Also, the `passenger_python`/`passenger_nodejs` options were not supported. Since version 4.0.0, Phusion Passenger supports multiple Ruby interpreters in the same Nginx instance. And so, since version 4.0.0, this option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. The `passenger_ruby` in the `http` block - that is, the one that `passenger-install-nginx-module` outputs - is used for invoking certain Phusion Passenger tools that are written in Ruby, e.g. the internal helper script used by <>. It is okay if the value refers to a different Ruby interpreter than the one you originally installed Phusion Passenger with. You can learn more about all this in <>. The `passenger_ruby` directive in the `http` block is also used as the default Ruby interpreter for Ruby web apps. You don't *have* to specify a `passenger_ruby` in the `http` block though, because the default is to use the first `ruby` command found in `$PATH`. The `passenger_python` and `passenger_nodejs` options work in a similar manner, but apply to Python and Node.js instead. You can also override `passenger_ruby` and other directives in specific contexts if you want to use a different interpreter for that web app. For example: ------------------------------ http { passenger_root ...; # Use Ruby 1.8.7 by default. passenger_ruby /usr/bin/ruby1.8; # Use Python 2.6 by default. passenger_python /usr/bin/python2.6; # Use /usr/bin/node by default. passenger_nodejs /usr/bin/node; server { # This Rails web app will use Ruby 1.8.7 listen 80; server_name www.foo.com; root /webapps/foo/public; } server { # This Rails web app will use Ruby 1.9.3, as installed by RVM passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3/ruby; listen 80; server_name www.bar.com; root /webapps/bar/public; # If you have a web app deployed in a sub-URI, customize # passenger_ruby/passenger_python inside a `location` block. # The web app under www.bar.com/blog will use JRuby 1.7.1 location ~ ^/blog(/.*|$) { alias /websites/blog/public$1; passenger_base_uri /blog; passenger_app_root /websites/blog; passenger_document_root /websites/blog/public; passenger_enabled on; passenger_ruby /usr/local/rvm/wrappers/jruby-1.7.1/ruby; } } server { # This Flask web app will use Python 3.0 passenger_python /usr/bin/python3.0; listen 80; server_name www.baz.com; root /webapps/baz/public; } } ------------------------------ include::users_guide_snippets/rvm_helper_tool.txt[] ==== passenger_python :version: 4.0.0 include::users_guide_snippets/since_version.txt[] This option allows one to specify the Python interpreter to use. See <> for more information. The default value is 'python', meaning that the Python interpreter will be looked up according to the `PATH` environment variable. ==== passenger_nodejs :version: 4.0.24 include::users_guide_snippets/since_version.txt[] This option allows one to specify the Node.js command to use. See <> for more information. The default value is 'node', meaning that the Node.js command will be looked up according to the `PATH` environment variable. [[PassengerAppEnv]] ==== passenger_app_env This option sets the value of the following environment variables: * `RAILS_ENV` * `RACK_ENV` * `WSGI_ENV` * `NODE_ENV` * `PASSENGER_APP_ENV` Some web frameworks, for example Rails and Connect.js, adjust their behavior according to the value in one of these environment variables. Phusion Passenger for Nginx sets the default value to **production**. If you're developing an Rails application then you should set this to `development`. If you want to set other environment variables, please refer to <>. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is 'production'. [[RailsEnv]] ==== rails_env An alias for <>. [[RackEnv]] ==== rack_env An alias for <>. [[PassengerAppRoot]] ==== passenger_app_root :version: 4.0.0 include::users_guide_snippets/since_version.txt[] By default, Phusion Passenger assumes that the application's root directory is the parent directory of the 'public' directory. This option allows one to specify the application's root independently from the Nginx 'root', which is useful if the 'public' directory lives in a non-standard place. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. Example: ----------------------------- server { server_name test.host; root /var/rails/zena/sites/example.com/public; # normally Phusion Passenger would # have assumed that the application # root is "/var/rails/zena/sites/example.com" passenger_app_root /var/rails/zena; } ----------------------------- [[PassengerBaseURI]] ==== passenger_base_uri Used to specify that the given URI is an distinct application that should be served by Phusion Passenger. Please refer to the following sections for more information: * <> * <> * <> It is allowed to specify this option multiple times. Do this to deploy multiple applications in different sub-URIs under the same virtual host. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. [[PassengerDocumentRoot]] ==== passenger_document_root Used in sub-URI deployment scenarios to tell Phusion Passenger where it should look for static files. Please refer to the following sections for more information: * <> * <> * <> This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. [[PassengerSpawnMethod]] ==== passenger_spawn_method [TIP] ."What spawn method should I use?" ========================================================= This subsection attempts to describe spawn methods, but it's okay if you don't (want to) understand it, as it's mostly a technical detail. You can basically follow this rule of thumb: ************************************************ If your application works on Mongrel or Thin, but not on Phusion Passenger, then set `passenger_spawn_method` to 'direct'. Otherwise, leave it at 'smart' (the default). ************************************************ However, we do recommend you to try to understand it. The 'smart' spawn method brings many benefits. ========================================================= include::users_guide_snippets/passenger_spawn_method.txt[] This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is 'smart'. [[PassengerLoadShellEnvvars]] ==== passenger_load_shell_envvars :version: 4.0.20 include::users_guide_snippets/since_version.txt[] Enables or disables the loading of shell environment variables before spawning the application. If this option is turned on, and the user's shell is `bash`, then applications are loaded by running them with `bash -l -c`. Otherwise, they are loaded by running them directly from the `PassengerHelperAgent` process. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is 'on'. [[PassengerRollingRestarts]] ==== passenger_rolling_restarts :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] Enables or disables support for rolling restarts through restart.txt. Normally when you restart an application by touching restart.txt, Phusion Passenger would shut down all application processes and spawn a new one. The spawning of a new application process could take a while, and any requests that come in during this time will be blocked until this first application process has spawned. But when rolling restarts are enabled, Phusion Passenger Enterprise will: 1. Spawn a new process in the background. 2. When it's done spawning, Phusion Passenger Enterprise will replace one of the old processes with this newly spawned one. 3. Step 1 and 2 are repeated until all processes have been replaced. This way, visitors will not experience any delays when you are restarting your application. This allows you to, for example, upgrade your application often without degrading user experience. Rolling restarts have a few caveat however that you should be aware of: - Upgrading an application sometimes involves upgrading the database schema. With rolling restarts, there may be a point in time during which processes belonging to the previous version and processes belonging to the new version both exist at the same time. Any database schema upgrades you perform must therefore be backwards-compatible with the old application version. - Because there's no telling which process will serve a request, users may not see changes brought about by the new version until all processes have been restarted. It is for this reason that you should not use rolling restarts in development, only in production. If Passenger Enterprise could not rolling restart a process (let's call it 'A') because it is unable to spawn a new process (let's call it 'B'), then Passenger Enterprise will give up trying to rolling restart that particular process 'A'. What happens next depends on whether <> is enabled: - If deployment error resistance is disabled (the default), then Passenger Enterprise will proceed with trying to restart the remaining processes. - If deployment error resistance is enabled, the Passenger Enterprise will give up rolling restarting immediately. The application group will be put into Deployment Error Resistance Mode. Please note that `passenger_rolling_restarts` is completely unrelated to the `passenger-config restart-app` command. That command always initiates a blocking restart, unless `--rolling-restart` is given. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is 'off'. [[PassengerResistDeploymentErrors]] ==== passenger_resist_deployment_errors :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] Enables or disables resistance against deployment errors. Suppose you've upgraded your application and you've issues a command to restart it (by touching restart.txt), but the application code contains an error that prevents Phusion Passenger from successfully spawning a process (e.g. a syntax error). Phusion Passenger would normally display an error message in response to this. By enabling deployment error resistance, Phusion Passenger Enterprise would instead do this: - It passes the request to one of the existing application processes (that belong to the previous version of the application). The visitor will not see a Phusion Passenger process spawning error message. - It logs the error to the global web server error log file. - It sets an internal flag so that no processes for this application will be spawned (even when the current traffic would normally result in more processes being spawned) and no processes will be idle cleaned. Processes *could* still be shutdown because of other events, e.g. because their <> have been reached. You can see whether the flag is set by invoking `passenger-status`. If you see the message "Resisting deployment error" then the flag is set. This way, visitors will suffer minimally from deployment errors. Phusion Passenger will attempt to restart the application again next time restart.txt is touched. Enabling deployment error resistance only works if <> is also enabled. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is 'off'. === Connection handling options === ==== passenger_ignore_client_abort ==== Normally, when the HTTP client aborts the connection (e.g. when the user clicked on "Stop" in the browser), the connection with the application process will be closed too. If the application process continues to send its response, then that will result in EPIPE errors in the application, which will be printed in the error log if the application doesn't handle them gracefully. If this option is turned on then upon client abort Phusion Passenger will continue to read the application process's response while discarding all the read data. This prevents EPIPE errors but it'll also mean the backend process will be unavailable for new requests until it is done sending its response. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is 'off'. [[passenger_set_cgi_param]] ==== passenger_set_cgi_param ==== Allows one to define additional CGI environment variables to pass to the web application. This is comparable to ngx_http_fastcgi_module's 'fastcgi_param' directive, and to ngx_http_proxy_module's 'proxy_set_header' option. Nginx variables in the value are interpolated. These variables passed in the following manner: * On every request, in the form of a request variable. * During application spawning, in the form of a system environment variable that can be looked up through `getenv()`. Example usage: ------------------------------ # Application will see a CGI environment "APP_NAME" with value "my super blog". passenger_set_cgi_param APP_NAME "my super blog"; # Nginx variables are interpolated. passenger_set_cgi_param EXTRA_REQUEST_METHOD method=$request_method; ------------------------------ .Use CGI environment names [NOTE] =============================================== If you want to set an HTTP header, then you must set it in the CGI environment name format, i.e. 'HTTP_*': ------------------------------ # !!!THIS IS WRONG!!! Don't do this! passenger_set_cgi_param X-Forwarded-For 127.0.0.2; # Instead, write it like this: passenger_set_cgi_param HTTP_X_FORWARDED_FOR 127.0.0.2; ------------------------------ =============================================== .This configuration option is NOT inherited across contexts [WARNING] =============================================== In each new context (e.g. in each new 'location' block), you must re-specify `passenger_set_cgi_param`. Values set in parent contexts have no effect on subcontexts. For example: ------------------------------ server { ... passenger_set_cgi_param FOO foo; location /users { passenger_enabled_on; # !!!THIS IS WRONG!!! The 'FOO' CGI variable will not # be passed URLs beginning with /users because you didn't # re-specify passenger_set_cgi_param. } location /apps { passenger_enabled on; # This is correct. Here we re-specify passenger_set_cgi_param, # so the 'FOO' CGI variable will be correctly passed to URLs # starting with /apps. passenger_set_cgi_param FOO foo; } } ------------------------------ =============================================== This option may occur in the following places: * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. ==== passenger_pass_header
==== Some headers generated by backend applications are not forwarded to the HTTP client, e.g. 'X-Accel-Redirect' which is directly processed by Nginx and then discarded from the final response. This directive allows one to force Nginx to pass those headers anyway, similar to how 'proxy_pass_header' works. For example: ------------------------------ location / { passenger_pass_header X-Accel-Redirect; } ------------------------------ This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. ==== passenger_buffer_response ==== When turned on, application-generated responses are buffered by Nginx. Buffering will happen in memory and also on disk if the response is larger than a certain threshold. Before we proceed with explaining this configuration option, we want to state the following to avoid confusion. If you use Phusion Passenger for Nginx, there are in fact two response buffering systems active: 1. The Nginx response buffering system. `passenger_buffer_response` turns this on or off. 2. The Phusion Passenger response buffering system, a.k.a. 'real-time disk-backed response buffering'. This buffering system is always on, regardless of the value of `passenger_buffer_response`. Response buffering is useful because it protects against slow HTTP clients that do not read responses immediately or quickly enough. Buffering prevents such slow clients from blocking web applications that have limited concurrency. Because Phusion Passenger's response buffering is always turned on, you are always protected. Therefore, `passenger_buffer_response` is off by default, and you never should have to turn it on. If for whatever reason you want to turn Nginx-level response buffering on, you can do so with this option. Nginx's response buffering works differently from Phusion Passenger's. Nginx's buffering system buffers the entire response before attempting to send it to the client, while Phusion Passenger's attempts to send the data to the client immediately. Therefore, if you turn on `passenger_buffer_response`, you may interfere with applications that want to stream responses to the client. How does response buffering - whether it's done by Nginx or by Phusion Passenger - exactly protect against slow clients? Consider an HTTP client that's on a dial-up modem link, and your application process generates a 2 MB response. If the response is buffered then your application process will be blocked until the entire 2 MB has been sent out to the HTTP client. This disallows your application process to do any useful work in the mean time. By buffering responses, Phusion Passenger or Nginx will read the application response as quickly as possible and will take care of forwarding the data to slow clients. So keep in mind that enabling `passenger_buffering_response` will make streaming responses impossible. Consider for example this piece of Rails code: -------------------------------- render :text => lambda { |response, output| 10.times do |i| output.write("entry #{i}\n") output.flush sleep 1 end } -------------------------------- ...or this piece of Rack code: -------------------------------- class Response def each 10.times do |i| yield("entry #{i}\n") sleep 1 end end end app = lambda do |env| [200, { "Content-Type" => "text/plain" }, Response.new] end -------------------------------- When `passenger_buffer_response` is turned on, Nginx will wait until the application is done sending the entire response before forwarding it to the client. The client will not receive anything for 10 seconds, after which it receives the entire response at once. When `passenger_buffer_response` is turned off, it works as expected: the client receives an "entry X" message every second for 10 seconds. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is 'off'. ==== passenger_buffer_size ==== ==== passenger_buffers ==== ==== passenger_busy_buffer_size ==== These options have the same effect as proxy_module's similarly named options. They can be used to modify the maximum allowed HTTP header size. [[passenger_intercept_errors]] ==== passenger_intercept_errors ==== :version: 4.0.15 include::users_guide_snippets/since_version.txt[] Decides if Nginx will intercept responses with HTTP status codes of 400 and higher. By default, all responses are sent as-is from the application or from the Phusion Passenger core. If you turn this option on then Nginx will be able to handle such responses using the Nginx `error_page` option. Responses with status codes that do not match an `error_page` option are sent as-is. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is 'off'. [[passenger_max_request_queue_size]] ==== passenger_max_request_queue_size ==== :version: 4.0.15 include::users_guide_snippets/since_version.txt[] When all application processes are already handling their maximum number of concurrent requests, Phusion Passenger will queue all incoming requests. This option specifies the maximum size for that queue. If the queue is already at this specified limit, then Phusion Passenger will immediately send a "503 Service Unavailable" error to any incoming requests. You may use <> to customize the response status. A value of 0 means that the queue is unbounded. link:http://stackoverflow.com/questions/20402801/what-is-optimal-value-for-phusion-passenger-passengermaxrequestqueuesize[This article on StackOverflow] explains how the request queue works, what it means for the queue to grow or become full, why that is bad, and what you can do about it. You may combine this option with <> and `error_page` to set a custom error page whenever the queue is full. In the following example, Nginx will serve /error503.html whenever the queue is full: --------------------------------- passenger_intercept_errors on; error_page 503 /error503.html; --------------------------------- This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is '100'. [[passenger_request_queue_overflow_status_code]] ==== passenger_request_queue_overflow_status_code ==== :version: 4.0.15 include::users_guide_snippets/since_version.txt[] This option allows you to customize the HTTP status code that is sent back when the request queue is full. See <> for more information. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is '503'. === Security options === [[PassengerUserSwitching]] ==== passenger_user_switching ==== Whether to enable <>. This option may only occur once, in the 'http' configuration block. The default value is 'on'. NOTE: This option has no effect when you are using <>. You can disable user switching for Flying Passenger by starting the Flying Passenger daemon as a non-root user. [[PassengerUser]] ==== passenger_user ==== If <> is enabled, then Phusion Passenger will by default run the web application as the owner of the file 'config/environment.rb' (for Rails apps) or 'config.ru' (for Rack apps). This option allows you to override that behavior and explicitly set a user to run the web application as, regardless of the ownership of 'environment.rb'/'config.ru'. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. [[PassengerGroup]] ==== passenger_group ==== If <> is enabled, then Phusion Passenger will by default run the web application as the primary group of the owner of the file 'config/environment.rb' (for Rails apps) or 'config.ru' (for Rack apps). This option allows you to override that behavior and explicitly set a group to run the web application as, regardless of the ownership of 'environment.rb'/'config.ru'. '' may also be set to the special value '!STARTUP_FILE!', in which case the web application's group will be set to 'environment.rb'/'config.ru''s group. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. [[PassengerDefaultUser]] ==== passenger_default_user ==== Phusion Passenger enables <> by default. This configuration option allows one to specify the user that applications must run as, if user switching fails or is disabled. This option may only occur once, in the 'http' configuration block. The default value is 'nobody'. NOTE: This option has no effect when you are using <>. There is currently no way to set this option when using Flying Passenger, but if you want to disable user switching for Flying Passenger then you can do so by starting the Flying Passenger daemon as a non-root user. [[PassengerDefaultGroup]] ==== Passenger_default_group ==== Phusion Passenger enables <> by default. This configuration option allows one to specify the group that applications must run as, if user switching fails or is disabled. This option may only occur once, in the 'http' configuration block. The default value is the primary group of the user specifified by <>. NOTE: This option has no effect when you are using <>. There is currently no way to set this option when using Flying Passenger, but if you want to disable user switching for Flying Passenger then you can do so by starting the Flying Passenger daemon as a non-root user. ==== passenger_show_version_in_header ==== When turned on, Phusion Passenger will output its version number in the `Server` and `X-Powered-By` header in all Phusion Passenger-served requests: ---------------------------------------------------- Server: nginx/1.3.11 + Phusion Passenger 4.0.0 X-Powered-By: Phusion Passenger 4.0.0 ---------------------------------------------------- When turned off, the version number will be hidden: ---------------------------------------------------- Server: nginx/1.3.11 + Phusion Passenger X-Powered-By: Phusion Passenger ---------------------------------------------------- This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is 'on'. [[PassengerFriendlyErrorPages]] ==== passenger_friendly_error_pages ==== Phusion Passenger can display friendly error pages whenever an application fails to start. This friendly error page presents the startup error message, some suggestions for solving the problem, and a backtrace. This feature is very useful during application development and useful for less experienced system administrators, but the page might reveal potentially sensitive information, depending on the application. Experienced system administrators who are using Phusion Passenger on serious production servers should consider turning this feature off. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is 'on'. === Resource control and optimization options === [[PassengerMaxPoolSize]] ==== passenger_max_pool_size ==== The maximum number of <> that may simultanously exist. A larger number results in higher memory usage, but improves the ability to handle concurrent HTTP requests. The optimal value depends on your system's hardware and your workload. You can learn more at the Phusion article link:http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/[Tuning Phusion Passenger's concurrency settings]. If you find that your server is running out of memory then you should lower this value. This option may only occur once, in the 'http' configuration block. The default value is '6'. :option: `--max-pool-size` include::users_guide_snippets/alternative_for_flying_passenger.txt[] [[PassengerMinInstances]] ==== passenger_min_instances ==== This specifies the minimum number of application processes that should exist for a given application. You should set this option to a non-zero value if you want to avoid potentially long startup times after a website has been <> for an extended period. Please note that this option does *not* pre-start application processes during Nginx startup. It just makes sure that when the application is first accessed: 1. at least the given number of processes will be spawned. 2. the given number of processes will be kept around even when processes are being idle cleaned (see <>). If you want to pre-start application processes during Nginx startup, then you should use the <> directive, possibly in combination with 'passenger_min_instances'. This behavior might seem counter-intuitive at first sight, but <> explains the rationale behind it. For example, suppose that you have the following configuration: --------------------------------- http { ... passenger_max_pool_size 15; passenger_pool_idle_time 10; server { listen 80; server_name foobar.com; root /webapps/foobar/public; passenger_min_instances 3; } } --------------------------------- When you start Nginx, there are 0 application processes for 'foobar.com'. Things will stay that way until someone visits 'foobar.com'. Suppose that there is only 1 visitor. 1 application process will be started immediately to serve the visitor, while 2 will be spawned in the background. After 10 seconds, when the idle timeout has been reached, these 3 application processes will not be cleaned up. Now suppose that there's a sudden spike of traffic, and 100 users visit 'foobar.com' simultanously. Phusion Passenger will start 12 more application processes. After the idle timeout of 10 seconds have passed, Phusion Passenger will clean up 12 application processes, keeping 3 processes around. The passenger_min_instances option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is '1'. [[PassengerMaxInstances]] ==== passenger_max_instances ==== :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] The maximum number of application processes that may simultaneously exist for an application. This helps to make sure that a single application will not occupy all available slots in the application pool. This value must be less than <>. A value of 0 means that there is no limit placed on the number of processes a single application may spawn, i.e. only the global limit of <> will be enforced. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is '0'. .Practical usage example [TIP] =========================================================================== Suppose that you're hosting two web applications on your server, a personal blog and an e-commerce website. You've set <> to 10. The e-commerce website is more important to you. You can then set 'passenger_max_instances' to 3 for your blog, so that it will never spawn more than 3 processes, even if it suddenly gets a lot of traffic. Your e-commerce website on the other hand will be free to spawn up to 10 processes if it gets a lot of traffic. =========================================================================== ==== passenger_max_instances_per_app ==== The maximum number of application processes that may simultaneously exist for a single application. This helps to make sure that a single application will not occupy all available slots in the application pool. This value must be less than <>. A value of 0 means that there is no limit placed on the number of processes a single application may use, i.e. only the global limit of <> will be enforced. This option may only occur once, in the 'http' configuration block. The default value is '0'. [[PassengerPoolIdleTime]] ==== passenger_pool_idle_time ==== The maximum number of seconds that an application process may be idle. That is, if an application process hasn't received any traffic after the given number of seconds, then it will be shutdown in order to conserve memory. Decreasing this value means that applications will have to be spawned more often. Since spawning is a relatively slow operation, some visitors may notice a small delay when they visit your Rails/Rack website. However, it will also free up resources used by applications more quickly. The optimal value depends on the average time that a visitor spends on a single Rails/Rack web page. We recommend a value of `2 * x`, where `x` is the average number of seconds that a visitor spends on a single Rails/Rack web page. But your mileage may vary. When this value is set to '0', application processes will not be shutdown unless it's really necessary, i.e. when Phusion Passenger is out of worker processes for a given application and one of the <> needs to make place for another application process. Setting the value to 0 is recommended if you're on a non-shared host that's only running a few applications, each which must be available at all times. This option may only occur once, in the 'http' configuration block. The default value is '300'. :option: `--pool-idle-time` include::users_guide_snippets/alternative_for_flying_passenger.txt[] ==== passenger_max_preloader_idle_time ==== The ApplicationSpawner server (explained in <>) has an idle timeout, just like the backend processes spawned by Phusion Passenger do. That is, it will automatically shutdown if it hasn't done anything for a given period. This option allows you to set the ApplicationSpawner server's idle timeout, in seconds. A value of '0' means that it should never idle timeout. Setting a higher value will mean that the ApplicationSpawner server is kept around longer, which may slightly increase memory usage. But as long as the ApplicationSpawner server is running, the time to spawn a Ruby on Rails backend process only takes about 10% of the time that is normally needed, assuming that you're using the 'smart' or 'smart-lv2' <>. So if your system has enough memory, is it recommended that you set this option to a high value or to '0'. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is '300' (5 minutes). :option: `--max-preloader-idle-time` include::users_guide_snippets/alternative_for_flying_passenger.txt[] ==== passenger_start_timeout ==== :version: 4.0.15 include::users_guide_snippets/since_version.txt[] Specifies a timeout for the startup of application processes. If an application process fails to start within the timeout period then it will be forcefully killed with SIGKILL, and the error will be logged. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is '90'. [[PassengerConcurrencyModel]] ==== passenger_concurrency_model ==== :version: 4.0.0 include::users_guide_snippets/enterprise_only.txt[] Specifies the I/O concurrency model that should be used for application processes. Phusion Passenger supports two concurrency models: * 'process' - single-threaded, multi-processed I/O concurrency. Each application process only has a single thread and can only handle 1 request at a time. This is the concurrency model that Ruby applications traditionally used. It has excellent compatiblity (can work with applications that are not designed to be thread-safe) but is unsuitable for workloads in which the application has to wait for a lot of external I/O (e.g. HTTP API calls), and uses more memory because each process has a large memory overhead. * 'thread' - multi-threaded, multi-processed I/O concurrency. Each application process has multiple threads (customizable via <>). This model provides much better I/O concurrency and uses less memory because threads share memory with each other within the same process. However, using this model may cause compatibility problems if the application is not designed to be thread-safe. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is 'process'. [[PassengerThreadCount]] ==== passenger_thread_count ==== :version: 4.0.0 include::users_guide_snippets/enterprise_only.txt[] Specifies the number of threads that Phusion Passenger should spawn per application process. This option only has effect if <> is 'thread'. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is '1'. [[PassengerMaxRequests]] ==== passenger_max_requests ==== The maximum number of requests an application process will process. After serving that many requests, the application process will be shut down and Phusion Passenger will restart it. A value of 0 means that there is no maximum: an application process will thus be shut down when its idle timeout has been reached. This option is useful if your application is leaking memory. By shutting it down after a certain number of requests, all of its memory is guaranteed to be freed by the operating system. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is '0'. [CAUTION] ===================================================== The <> directive should be considered as a workaround for misbehaving applications. It is advised that you fix the problem in your application rather than relying on these directives as a measure to avoid memory leaks. ===================================================== [[PassengerMaxRequestTime]] ==== passenger_max_request_time ==== :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] The maximum amount of time, in seconds, that an application process may take to process a request. If the request takes longer than this amount of time, then the application process will be forcefully shut down, and possibly restarted upon the next request. A value of 0 means that there is no time limit. This option is useful for preventing your application from freezing for an indefinite period of time. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is '0'. .Example Suppose that most of your requests are known to finish within 2 seconds. However, there is one URI, '/expensive_computation', which is known to take up to 10 seconds. You can then configure Phusion Passenger as follows: ---------------------------------------------- server { listen 80; server_name www.example.com; root /webapps/my_app/public; passenger_enabled on; passenger_max_request_time 2; location /expensive_compuation { passenger_enabled on; passenger_max_request_time 10; } } ---------------------------------------------- If a request to '/expensive_computation' takes more than 10 seconds, or if a request to any other URI takes more than 2 seconds, then the corresponding application process will be forced to shutdown. [CAUTION] ===================================================== The <> directive should be considered as a workaround for misbehaving applications. It is advised that you fix the problem in your application rather than relying on these directives as a measure to avoid freezing applications. ===================================================== [[PassengerMemoryLimit]] ==== passenger_memory_limit ==== :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] The maximum amount of memory that an application process may use, in megabytes. Once an application process has surpassed its memory limit, it will process all the requests currently present in its queue and then shut down. A value of 0 means that there is no maximum: the application's memory usage will not be checked. This option is useful if your application is leaking memory. By shutting it down, all of its memory is guaranteed to be freed by the operating system. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is '0'. [NOTE] .A word about permissions ===================================================== The <> directive uses the `ps` command to query memory usage information. On Linux, it further queries `/proc` to obtain additional memory usage information that's not obtainable through `ps`. You should ensure that the `ps` works correctly and that the `/proc` filesystem is accessible by the `PassengerHelperAgent` process. ===================================================== [CAUTION] ===================================================== The <> and <> directives should be considered as workarounds for misbehaving applications. It is advised that you fix the problem in your application rather than relying on these directives as a measure to avoid memory leaks. ===================================================== [[PassengerPreStart]] ==== passenger_pre_start ==== By default, Phusion Passenger does not start any application processes until said web application is first accessed. The result is that the first visitor of said web application might experience a small delay as Phusion Passenger is starting the web application on demand. If that is undesirable, then this directive can be used to pre-started application processes during Nginx startup. A few things to be careful of: - This directive accepts the *URL* of the web application you want to pre-start, not a on/off value! This might seem a bit weird, but read on for rationale. As for the specifics of the URL: * The domain part of the URL must be equal to the value of the 'server_name' directive of the server block that defines the web application. * Unless the web application is deployed on port 80, the URL should contain the web application's port number too. * The path part of the URL must point to some URI that the web application handles. - You will probably want to combine this option with <> because application processes started with 'passenger_pre_start' are subject to the usual idle timeout rules. See the example below for an explanation. This option may only occur in the 'http' configuration block. It may be specified any number of times. NOTE: This option is currently not available when using <>. ===== Example 1: basic usage ===== Suppose that you have the following web applications. --------------------------- server { listen 80; server_name foo.com; root /webapps/foo/public; passenger_enabled on; } server { listen 3500; server_name bar.com; root /webapps/bar/public; passenger_enabled on; } --------------------------- You want both of them to be pre-started during Nginx startup. The URL for foo.com is 'http://foo.com/' (or, equivalently, 'http://foo.com:80/') and the URL for bar.com is 'http://bar.com:3500/'. So we add two passenger_pre_start directives, like this: --------------------------- server { listen 80; server_name foo.com; root /webapps/foo/public; passenger_enabled on; } server { listen 3500; server_name bar.com; root /webapps/bar/public; passenger_enabled on; } passenger_pre_start http://foo.com/; # <--- added passenger_pre_start http://bar.com:3500/; # <--- added --------------------------- ===== Example 2: pre-starting apps that are deployed in sub-URIs ===== Suppose that you have a web application deployed in a sub-URI '/store', like this: --------------------------- server { listen 80; server_name myblog.com; root /webapps/wordpress; passenger_base_uri /store; } --------------------------- Then specify the 'server_name' value followed by the sub-URI, like this: --------------------------- server { listen 80; server_name myblog.com; root /webapps/wordpress; passenger_base_uri /store; } passenger_pre_start http://myblog.com/store; # <----- added --------------------------- The sub-URI *must* be included; if you don't then the directive will have no effect. The following example is wrong and won't pre-start the store web application: --------------------------- passenger_pre_start http://myblog.com/; # <----- WRONG! Missing "/store" part. --------------------------- ===== Example 3: combining with passenger_min_instances ===== Application processes started with passenger_pre_start are also subject to the idle timeout rules as specified by <>! That means that by default, the pre-started application processes for foo.com are bar.com are shut down after a few minutes of inactivity. If you don't want that to happen, then you should combine passenger_pre_start with <>, like this: --------------------------- server { listen 80; server_name foo.com; root /webapps/foo/public; passenger_enabled on; passenger_min_instances 1; # <--- added } server { listen 3500; server_name bar.com; root /webapps/bar/public; passenger_enabled on; passenger_min_instances 1; # <--- added } passenger_pre_start http://foo.com/; passenger_pre_start http://bar.com:3500/; --------------------------- ===== So why a URL? Why not just an on/off flag? ===== A directive that accepts a simple on/off flag is definitely more intuitive, but due technical difficulties w.r.t. the way Nginx works, it's very hard to implement it like that: It is very hard to obtain a full list of web applications defined in the Nginx configuration file(s). In other words, it's hard for Phusion Passenger to know which web applications are deployed on Nginx until a web application is first accessed, and without such a list Phusion Passenger wouldn't know which web applications to pre-start. So as a compromise, we made it accept a URL. ===== What does Phusion Passenger do with the URL? ===== During Nginx startup, Phusion Passenger will send a dummy HEAD request to the given URL and discard the result. In other words, Phusion Passenger simulates a web access at the given URL. However this simulated request is always sent to localhost, *not* to the IP that the domain resolves to. Suppose that bar.com in example 1 resolves to 209.85.227.99; Phusion Passenger will send the following HTTP request to 127.0.0.1 port 3500 (and not to 209.85.227.99 port 3500): ---------------------- HEAD / HTTP/1.1 Host: bar.com Connection: close ---------------------- Similarly, for example 2, Phusion Passenger will send the following HTTP request to 127.0.0.1 port 80: ---------------------- HEAD /store HTTP/1.1 Host: myblog.com Connection: close ---------------------- ===== Do I need to edit /etc/hosts and point the domain in the URL to 127.0.0.1? ===== No. See previous subsection. ===== My web application consists of multiple web servers. What URL do I need to specify, and in which web server's Nginx config file? ===== Put the web application's 'server_name' value and the server block's port in the URL, and put passenger_pre_start on all machines that you want to pre-start the web application on. The simulated web request is always sent to 127.0.0.1, with the domain name in the URL as value for the 'Host' HTTP header, so you don't need to worry about the request ending up at a different web server in the cluster. ===== Does passenger_pre_start support https:// URLs? ===== Yes. And it does not perform any certificate validation. === Logging and debugging options === [[PassengerLogLevel]] ==== passenger_log_level ==== This option allows one to specify how much information Phusion Passenger should write to the Nginx error log file. A higher log level value means that more information will be logged. Possible values are: - '0': Show only errors and warnings. - '1': Show the most important debugging information. This might be useful for system administrators who are trying to figure out the cause of a problem. - '2': Show more debugging information. This is typically only useful for developers. - '3': Show even more debugging information. This option may only occur once, in the 'http' configuration block. The default is '0'. ==== passenger_debug_log_file ==== By default Phusion Passenger debugging and error messages are written to the global web server error log. This option allows one to specify the file that debugging and error messages should be written to instead. This option may only occur once, in the 'http' configuration block. :option: `--log-file` include::users_guide_snippets/alternative_for_flying_passenger.txt[] ==== passenger_debugger ==== :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] Turns support for application debugging on or off. In case of Ruby applications, turning this option on will cause them to load the `ruby-debug` gem (when on Ruby 1.8), the `debugger` gem (when on Ruby 1.9) or the `byebug` gem (when on Ruby 2.0). If you're using Bundler, you should add this to your Gemfile: ------------------------------------------- gem 'ruby-debug', :platforms => :ruby_18 gem 'debugger', :platforms => :ruby_19 gem 'byebug', :platforms => :ruby_20 ------------------------------------------- Once debugging is turned on, you can use the command `passenger-irb --debug ` to attach an rdebug console to the application process with the given PID. Attaching will succeed once the application process executes a `debugger` command. This option may occur in the following places: * In the 'http' configuration block. * In a 'server' configuration block. * In a 'location' configuration block. * In an 'if' configuration scope. In each place, it may be specified at most once. The default value is 'off'. === Advanced options [[PassengerTempDir]] ==== passenger_temp_dir Specifies the directory that Phusion Passenger should use for storing temporary files. This includes things such as Unix socket files. This option may only be specified in the 'http' configuration block. The default temp directory that Phusion Passenger uses is '/tmp'. This option is especially useful if Nginx is not allowed to write to /tmp (which is the case on some systems with strict SELinux policies) or if the partition that /tmp lives on doesn't have enough disk space. .Command line tools Some Phusion Passenger command line administration tools, such as `passenger-status`, must know what Phusion Passenger's temp directory is in order to function properly. You can pass the directory through the `PASSENGER_TMPDIR` environment variable, or the `TMPDIR` environment variable (the former will be used if both are specified). For example, if you set 'passenger_temp_dir' to '/my_temp_dir', then invoke `passenger-status` after you've set the `PASSENGER_TMPDIR` or `TMPDIR` environment variable, like this: ---------------------------------------------------------- export PASSENGER_TMPDIR=/my_temp-dir sudo -E passenger-status # The -E option tells 'sudo' to preserve environment variables. ---------------------------------------------------------- :option: `--temp-dir` include::users_guide_snippets/alternative_for_flying_passenger.txt[] ==== passenger_fly_with :version: 4.1.0 include::users_guide_snippets/enterprise_only.txt[] Enables <> mode, and configures Nginx to connect to the Flying Passenger daemon that's listening on the given socket filename. This option may only occur once, in the 'http' configuration block. When not set, Flying Passenger is not enabled. === Deprecated options === The following options have been deprecated, but are still supported for backwards compatibility reasons. ==== rails_spawn_method ==== Deprecated in favor of <>. [[troubleshooting]] == Troubleshooting == include::users_guide_snippets/troubleshooting/default.txt[] === The application thinks its not on SSL even though it is Rails and many other frameworks infers whether it's running on SSL through the CGI environment variable `HTTPS`. This variable is *only* set if you set `ssl on`. Setting just `listen 443 ssl` is not enough. include::users_guide_snippets/troubleshooting/rails.txt[] == Analysis and system maintenance == include::users_guide_snippets/analysis_and_system_maintenance.txt[] == Tips == include::users_guide_snippets/tips.txt[] == Under the hood == Phusion Passenger hides a lot of complexity for the end user (i.e. the web server system administrator), but sometimes it is desirable to know what is going on. This section describes a few things that Phusion Passenger does under the hood. include::users_guide_snippets/under_the_hood/page_caching_support.txt[] include::users_guide_snippets/under_the_hood/relationship_with_ruby.txt[] [[application_detection]] === How Phusion Passenger detects whether a virtual host is a web application === After you've read the deployment instructions you might wonder how Phusion Passenger knows that the server root points to a web application that Phusion Passenger is able to serve, and how it knows what kind of web application it is (e.g. Rails or Rack). Phusion Passenger checks whether the virtual host is a Rails application by checking whether the following file exists: ------------------------------------------------ dirname(DocumentRoot) + "/config/environment.rb" ------------------------------------------------ If you're not a programmer and don't understand the above pseudo-code snippet, it means that Phusion Passenger will: 1. Extract the parent directory filename from the value of the ``root'' directive. 2. Append the text "/config/environment.rb" to the result, and check whether the resulting filename exists. So suppose that your server root is '/webapps/foo/public'. Phusion Passenger will check whether the file '/webapps/foo/config/environment.rb' exists. Note that Phusion Passenger for Nginx does *not* resolve any symlinks in the root path. So for example, suppose that your root points to '/home/www/example.com', which in turn is a symlink to '/webapps/example.com/public'. Phusion Passenger for Nginx will check for '/home/www/config/environment.rb', *not* '/webapps/example.com/config/environment.rb'. This file of course doesn't exist, and as a result Phusion Passenger will not activate itself for this virtual host, and you'll most likely see some output generated by the Nginx default directory handler such as a Forbidden error message. Detection of Rack applications happens through the same mechanism, exception that Phusion Passenger will look for 'config.ru' instead of 'config/environment.rb'. include::users_guide_snippets/appendix_a_about.txt[] include::users_guide_snippets/appendix_b_terminology.txt[] include::users_guide_snippets/appendix_c_spawning_methods.txt[] [[about_environment_variables]] == Appendix D: About environment variables include::users_guide_snippets/environment_variables.txt[] passenger-4.0.37/doc/Users guide Standalone.html000644 000765 000024 00001005267 12233035540 022112 0ustar00honglistaff000000 000000 Phusion Passenger Standalone users guide

1. Support information

1.1. Supported operating systems

Phusion Passenger works on any POSIX-compliant operating system. In other words: practically any operating system on earth, except Microsoft Windows.

Phusion Passenger is confirmed on a large number of operating systems and Linux distributions, including, but not limited to, Ubuntu, Debian, CentOS/Fedora/RHEL, Gentoo, Mac OS X, FreeBSD and Solaris. OpenBSD is supported since version 5.2. Both 32-bit and 64-bit platforms are supported.

Please report a bug or join our discussion forum if it doesn’t work on your POSIX-compliant operating system.

1.2. Where to get support

  • Community discussion forum - post a message here if you’re experiencing problems. Support on this forum is provided by the community on a best-effort basis, so a (timely) response is not guaranteed.

  • Issue tracker - report bugs here.

  • Email support@phusion.nl if you are a Phusion Passenger Enterprise customer. Please mention your order reference. If you are not an Enterprise customer, we kindly redirect you to the community discussion forum instead.

  • Commercial support contracts are also available.

  • Report security vulnerabilities to security@phusion.nl. We will do our best to respond to you as quickly as we can, so please do not disclose the vulnerability until then.

Please consult the Phusion Passenger website for a full list of support resources.

2. Installation

2.1. Synopsis

Because Phusion Passenger is designed to run in a wide variety of operating systems and configurations, there are multiple ways to install it. Most users  — especially first-time users — will prefer OS-specific installation instructions. These are not only the easiest, but also allow Phusion Passenger to integrate into the operating system in the best way possible. Other users should consult the generic installation instructions.

The steps for upgrading or downgrading Phusion Passenger is almost the same as the steps for installing. All the installation guides in this section will also teach you how to upgrade and downgrade.

2.2. Installing or upgrading on Mac OS X with Homebrew

Open source

Every time we release a new Phusion Passenger version, we make it available through Homebrew. Please note that the Homebrew maintainers have to merge our pull requests manually, so it may take a day or two before a new version shows up in the official Homebrew repository.

  1. Update the Homebrew recipes:

    brew update
  2. Run one of the following, and follow the instructions:

    brew install passenger
    -OR-
    brew upgrade passenger
Enterprise

Phusion Passenger Enterprise is currently not available through Homebrew. Please try one of the other installation methods instead.

2.3. Installing or upgrading on Debian or Ubuntu

We provide and official Phusion Passenger APT repository. This APT repository contains Phusion Passenger packages for multiple versions of Debian and Ubuntu. These packages are automatically built by our build server after we push out a source release, and thus are always up to date with the official source releases.

If you use these packages to install Phusion Passenger then you do not need to run passenger-install-apache2-module or passenger-install-nginx-module. These packages contain all the binaries that you need.

Packages are available for the x86 and x86_64 architectures. Our policy is to support all Ubuntu LTS releases that are still supported by Canonical, plus the latest non-LTS Ubuntu release, plus all Debian releases that are still supported by Debian.

2.3.1. Adding our APT repository

  1. Install our PGP key. Packages are signed by "Phusion Automated Software Signing (auto-software-signing@phusion.nl)", fingerprint 1637 8A33 A6EF 1676 2922 526E 561F 9B9C AC40 B2F7.

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7
  2. Add HTTPS support for APT. Our APT repository is stored on an HTTPS server.

    sudo apt-get install apt-transport-https ca-certificates
  3. Create a file /etc/apt/sources.list.d/passenger.list and insert one of the following lines, depending on your distribution.

    Open source
    ##### !!!! Only add ONE of these lines, not all of them !!!! #####
    # Ubuntu 13.10
    deb https://oss-binaries.phusionpassenger.com/apt/passenger saucy main
    # Ubuntu 12.04
    deb https://oss-binaries.phusionpassenger.com/apt/passenger precise main
    # Ubuntu 10.04
    deb https://oss-binaries.phusionpassenger.com/apt/passenger lucid main
    # Debian 7
    deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main
    # Debian 6
    deb https://oss-binaries.phusionpassenger.com/apt/passenger squeeze main
    Enterprise
    ##### !!!! Only add ONE of these lines, not all of them !!!! #####
    # Ubuntu 13.10
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt saucy main
    # Ubuntu 12.04
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt precise main
    # Ubuntu 10.04
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt lucid main
    # Debian 7
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt wheezy main
    # Debian 6
    deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt squeeze main

    You can find the correct value for YOUR_DOWNLOAD_TOKEN in the Customer Area.

  4. Secure passenger.list and update your APT cache:

    sudo chown root: /etc/apt/sources.list.d/passenger.list
    sudo chmod 600 /etc/apt/sources.list.d/passenger.list
    sudo apt-get update

2.3.2. Installing packages

Open source
  1. Add our APT repository.

  2. Install the package:

    sudo apt-get install passenger
Enterprise
  1. Download your license key from the Customer Area and save it as /etc/passenger-enterprise-license.

  2. Add our APT repository.

  3. Install the packages:

    sudo apt-get install passenger-enterprise

2.4. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux

Warning The RPMs are currently unmaintained. As such, the repository only contains Phusion Passenger 3.x (the latest version is 4.x), which did not support Node.js, Meteor, multiple Rubies, etc. For more recent versions of Phusion Passenger, you are suggested to install from gem or tarball instead.

YUM repositories with RPMs are maintained by Erik Ogan and Stealthy Monkeys Consulting. Only packages for the open source version of Phusion Passenger are provided. Phusion Passenger Enterprise customers should use the generic RubyGems installation method or the generic tarball installation method instead.

If you use YUM to install Phusion Passenger then you do not need to run passenger-install-apache2-module or passenger-install-nginx-module. The YUM packages contain all the binaries that you need. You also don’t need to modify any Apache or Nginx configuration to get them to load Phusion Passenger, the packages provide configuration snippets for you as well.

Step 1: Import the Stealthy Monkeys Consulting’s GPG key

rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc

Step 2: Install the release package

Install the passenger-release package from the main repository.

Fedora Core 17:

yum install http://passenger.stealthymonkeys.com/fedora/17/passenger-release.noarch.rpm

Fedora Core 16:

yum install http://passenger.stealthymonkeys.com/fedora/16/passenger-release.noarch.rpm

Fedora Core 15:

yum install http://passenger.stealthymonkeys.com/fedora/15/passenger-release.noarch.rpm

Fedora Core 14:

yum install http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm

RHEL 6 / CentOS 6 / ScientificLinux 6: (Note: these packages depend on EPEL.)

yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm

RHEL 5 / CentOS 5 / ScientificLinux 5: (Note: these packages depend on EPEL.)

rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm

Step 3: Install the right Phusion Passenger package

From there you can use YUM to install packages. For example, try one of these:

Phusion Passenger for Apache:

yum install mod_passenger

Phusion Passenger for Nginx:

yum install nginx-passenger

Phusion Passenger Standalone:

yum install passenger-standalone

Building your own packages

There are instructions for building your own packages and Yum repositories in the rpm directory ReadMe within the GitHub repository.

2.5. Generic installation, upgrade and downgrade method: via RubyGems

RubyGems is only used as a method to obtain the Phusion Passenger files, so in case you have multiple Ruby versions it does not matter which Ruby’s RubyGems you use for installation. Once installed, Phusion Passenger can work with all other Ruby versions on your system. This is explained in Phusion Passenger and its relationship with Ruby.

Step 1: figuring out whether your Ruby is installed in the home directory or system-wide

Ruby may either be installed in the home directory, or system-wide. If it’s installed system-wide then we will want to install gems system-wide as well, so you need to switch to a root prompt first. If Ruby is installed in the home directory then we will want to install gems to the home directory as well, as a normal user.

To find out which case applies, run the following command to find out where the ruby command is:

which ruby

Do you see a filename that references /home or /Users? If so then your Ruby interpreter is installed in your home directory and you can proceed to step 2. Otherwise, you need to switch to a root prompt by running one of the following commands:

  • Are you using RVM? Run rvmsudo -s

  • Are you not using RVM, or do you not know what RVM is? Run sudo -s

  • Is sudo not installed on your system? Run su -c bash

You must maintain this root prompt throughout this installation guide.

Step 2: install the gem

Open Source

Install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger:

gem install passenger
Previous versions and beta versions

Sometimes you will want to obtain the latest beta version of Phusion Passenger. Beta versions are not normally selected by gem install, so to opt-in for beta versions you have to add the --pre argument:

gem install passenger --pre

If you want to obtain a specific version of Phusion Passenger, e.g. because you are downgrading, then specify the version number with --version:

gem install passenger --version 3.0.0

If you want to obtain a specific beta version of Phusion Passenger then you must also pass --pre:

gem install passenger --version 3.9.1.beta --pre
Enterprise

First, download the license key from the Customer Area and save it as /etc/passenger-enterprise-license.

Next, add the Phusion Passenger Enterprise gem server to your RubyGems source list:

gem source --add https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_gems/

Substitute YOUR_DOWNLOAD_TOKEN with the one you find in the Customer Area. And notice the trailing slash in the URL! It is very important.

Finally, install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger:

gem install passenger-enterprise-server
Previous versions and beta versions

Sometimes you will want to obtain the latest beta version of Phusion Passenger Enterprise. Beta versions are not normally selected by gem install, so to opt-in for beta versions you have to add the --pre argument:

gem install passenger-enterprise-server --pre

If you want to obtain a specific version of Phusion Passenger Enterprise, e.g. because you are downgrading, then specify the version number with --version:

gem install passenger-enterprise-server --version 3.0.0

If you want to obtain a specific beta version of Phusion Passenger then you must also pass --pre:

gem install passenger-enterprise-server --version 3.9.1.beta --pre

2.6. Generic installation, upgrade and downgrade method: via tarball

Step 1: installing Ruby

Phusion Passenger supports multiple languages and its core is written in C++, but its installer and administration tools are written in Ruby, so you must install Ruby.

Even though Ruby is required, Ruby will normally not be loaded during normal operation unless you deploy a Ruby web application on Phusion Passenger. Phusion Passenger’s dependency on Ruby is very minimal. See Phusion Passenger and its relationship with Ruby for details.

Debian, Ubuntu

sudo apt-get update
sudo apt-get install ruby rake

Red Hat, CentOS, ScientificLinux, Amazon Linux

Enable EPEL, then run as root:
yum install ruby rubygem-rake

Mac OS X

No action needed. Ruby is installed by default.

Other operating systems

Install Ruby from the Ruby website.

Step 2: download and extract the tarball

Open Source

Download the open source Phusion Passenger tarball from the Phusion Passenger website.

Older versions can be found in the release archive.

Enterprise

Phusion Passenger Enterprise customers can download the Phusion Passenger Enterprise tarball from the Customer Area.

Also be sure to download the license key and save it as /etc/passenger-enterprise-license.

Once you have downloaded the tarball, pick a location to extract it to. You can pick any location. A good location is /opt/passenger. Create this directory and extract the tarball as follows:

mkdir /opt/passenger
cd /opt/passenger
tar xzvf /location-to/passenger-x.x.x.tar.gz
cd /opt/passenger/passenger-x.x.x

Note that passenger-x.x.x should be passenger-enterprise-server-x.x.x if you’re using Phusion Passenger Enterprise.

Step 3: adding the Phusion Passenger tools to PATH

Edit /etc/bashrc (or /etc/bash.bashrc on some systems) and append the following to the end of the file:

export PATH=/opt/passenger/passenger-x.x.x/bin:$PATH

Finally, restart all your shell sessions in order to activate this change. The installation is now complete.

2.7. Upgrading from open source to Enterprise

Phusion Passenger comes in two variants: an open source version, as well as an Enterprise version which introduces a myriad of useful features that can improve stability and performance and efficiency.

Customers who have bought Phusion Passenger Enterprise can upgrade their open source installation to Enterprise as follows:

  1. Uninstall the open source Phusion Passenger.

  2. Install the Enterprise version by following one of the installation guides in this section (e.g. RubyGems generic installation or tarball generic installation).

The uninstallation is necessary because the Enterprise Ruby gem has a different gem name (passenger-enterprise-server instead of passenger), but the same administration command names (e.g. passenger-status). Uninstalling the open source version avoids any conflicts.

2.8. Cryptographic verification of installation files

2.8.1. Synopsis

We digitally sign various files with our GPG key so that you can check whether they’re legit, i.e. whether they really came from Phusion and haven’t been tampered with by a third party. We apply signing since the open source version 4.0.0 RC 4, or the Enterprise version 4.0.0 RC 1.

2.8.2. Importing the Phusion Software Signing key

Phusion’s GPG key for signing software is as follows:

Phusion Software Signing (software-signing@phusion.nl)
Short key ID: 0x0A212A8C
Long key ID: 0x2AC745A50A212A8C
Fingerprint: D5F0 8514 2693 9232 F437  AB72 2AC7 45A5 0A21 2A8C

This key is stored at the Phusion website and at the key servers sks-keyservers.net and keyserver.ubuntu.com. You can import it to your keyring with one of these command:

gpg --keyserver pool.sks-keyservers.net --search-keys 0x2AC745A50A212A8C
# -OR-
gpg --keyserver keyserver.ubuntu.com --search-keys 0x2AC745A50A212A8C

The Phusion Software Signing key is only used for signing software. It’s never used for signing emails or for encrypting files, so please be suspicious if you encounter usage of this key outside the context of signing software, and alert us at support@phusion.nl. Include "notspam" in the message to bypass our spam filter.

The email address software-signing@phusion.nl redirects to info@phusion.nl so it’s safe to send email there.

2.8.3. Verifying the Phusion Software Signing key

The Phusion Software Signing key is also signed by the Phusion founders. Their keys are as follows:

Hongli Lai (hongli@phusion.nl)
Short key ID: 4B6F4332
Long key ID: 06A131094B6F4332
Fingerprint: 64E8 0420 FC6A 499F 9E1F  81FA 06A1 3109 4B6F 4332
Ninh Bui (ninh@phusion.nl)
Short key ID: 6FAF3782
Long key ID: BA8DA3F46FAF3782
Fingerprint: 353A 398C 49AF 5CD5 74A0  656C BA8D A3F4 6FAF 3782

Both keys are stored at both sks-servers.net and keyserver.ubuntu.com. Import them with:

gpg --keyserver pool.sks-servers.net --search-keys 0x06A131094B6F4332
gpg --keyserver pool.sks-servers.net --search-keys 0xBA8DA3F46FAF3782
# -OR-
gpg --keyserver keyserver.ubuntu.com --search-keys 0x06A131094B6F4332
gpg --keyserver keyserver.ubuntu.com --search-keys 0xBA8DA3F46FAF3782

2.8.4. Verifying the gem and tarball

You can find the open source version’s gem and tarball GPG signatures at https://www.phusionpassenger.com/file_releases. The Enterprise version’s GPG signatures can be found in the Customer Area. All signatures have the .asc extension. Once you have imported our key, you can verify the validity of a file against its signature as follows:

$ gpg --verify passenger-x.x.x.tar.gz.asc passenger-x.x.x.tar.gz
gpg: Signature made Mon Mar 11 09:45:46 2013 CET using RSA key ID 0A212A8C
gpg: Good signature from "Phusion Software Signing <software-signing@phusion.nl>"

2.8.5. Verifying Git signatures

Tags in the Git repository for the open source version are also tagged. You can verify a Git tag as follows:

$ git tag --verify release-x.x.x
object d886f34b5705e4314feccaf0d77b9a38416e15e0
type commit
tag release-4.0.0.rc5
tagger Hongli Lai (Phusion) <hongli@phusion.nl> 1362993117 +0100

This is a tag message.
gpg: Signature made Mon Mar 11 10:12:02 2013 CET using RSA key ID 0A212A8C
gpg: Good signature from "Phusion Software Signing <software-signing@phusion.nl>"

2.8.6. Verifying DEB and RPM packages

The DEB and RPM packages are signed with the signatures of the respective packagers. They are automatically checked upon installation.

2.8.7. Revocation

In the event our key is compromised, we will revoke the key and upload the revocation information to sks-servers.net and keyserver.ubuntu.com. However your system will not know about the revocation until you update the keys from the keyservers. You should update your keys regularly (e.g. once a week) by invoking:

gpg --refresh-keys --keyserver pool.sks-servers.net
# -OR-
gpg --refresh-keys --keyserver keyserver.ubuntu.com

If you installed Phusion Passenger through our APT repository, then you should update APT’s keyring from time to time as well:

sudo apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com

2.9. Customizing the compilation process

The Phusion Passenger compilation process can be customized with environment variables. You can learn more about environment variables in About environment variables.

2.9.1. Setting the compiler

You can force the Phusion Passenger build system to use a specific C or C++ compiler by setting the CC and CXX environment variables. These may be set to any arbitrary shell commands.

For example, contributors who want to hack on Phusion Passenger may want to use Clang for faster compilation and ccache for faster recompilation, and may want to enable more error-catching compilation flags:

export CC='ccache clang -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
export CXX='ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv'
Note If you run the installer with sudo then environment variables may not be passed properly. Learn more at Environment variables and sudo.

2.9.2. Adding additional compiler or linker flags

On some systems, C/C++ libraries and headers that Phusion Passenger requires may be located in a non-standard directory. You can force the Phusion Passenger build system to look in those locations by injecting compiler and linker flags using the following environment variables:

EXTRA_PRE_CFLAGS

These flags are injected into all C compiler invocations that involve compiling C source files. This also covers compiler invocations that compile and link. The flags are injected at the beginning of the command string, even before EXTRA_PRE_LDFLAGS.

EXTRA_CFLAGS

Similar to EXTRA_PRE_CFLAGS, but injected at the end of the command string, before EXTRA_LDFLAGS.

EXTRA_PRE_CXXFLAGS

Similar to EXTRA_PRE_CFLAGS, but for C++ compiler invocations.

EXTRA_CXXFLAGS

Similar to EXTRA_CFLAGS, but for C++ compiler invocations.

EXTRA_PRE_LDFLAGS

These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile and link. The flags are injected at the beginning of the command string, but after EXTRA_PRE_CFLAGS/EXTRA_PRE_CXXFLAGS.

EXTRA_PRE_C_LDFLAGS

These flags are injected into all C compiler invocations that involve linking, right after EXTRA_PRE_LDFLAGS.

EXTRA_PRE_CXX_LDFLAGS

Similar to EXTRA_PRE_CXX_LDFLAGS, but for C++ compiler invocations.

EXTRA_LDFLAGS

Similar to EXTRA_PRE_LDFLAGS, but injected at the very end of the command string, even after EXTRA_CFLAGS and EXTRA_CXXFLAGS.

EXTRA_C_LDFLAGS

Similar to EXTRA_LDFLAGS, but only injected for C executable linking commands. Injected right after EXTRA_LDFLAGS.

EXTRA_CXX_LDFLAGS

Similar to EXTRA_LDFLAGS, but only injected for C++ executable linking commands. Injected right after EXTRA_LDFLAGS.

PASSENGER_THREAD_LOCAL_STORAGE

Setting this to 1 will enable the PASSENGER_THREAD_LOCAL_STORAGE macro, which forcefully disables the use of thread-local storage inside the Phusion Passenger codebase. Setting this environment variable is useful on systems that have broken support for thread-local storage, despite passing our build system’s check for proper thread-local storage support. At the time of writing, one user has reported that Ubuntu 12.04 32-bit has broken thread-local storage report although neither the reporter nor us were able to reproduce the problem on any other systems running Ubuntu 12.04 32-bit. Note that this flag has no effect on non-Phusion Passenger code.

Note If you run the installer with sudo then environment variables may not be passed properly. Learn more at Environment variables and sudo.

2.9.3. Forcing location of command line tools and dependencies

The Phusion Passenger build system attempts to autodetect many things by locating relevant helper tools. For example, to find out which compiler flags it should use for compiling Apache modules, it locates the apxs2 command and queries it. To find out which compiler flags it should use for libcurl, it queries the curl-config command. These commands may not be in $PATH, or even when they are you may want to use a different one.

You can force the build to find certain command line tools at certain locations by using the following environment variables:

HTTPD

The location of the httpd executable (the Apache server executable).

APXS2

The location of the apxs2 executable (the Apache module developer tool). Only used by passenger-install-apache2-module.

This environment variable, together with HTTPD, are what you need to customize if you have multiple Apache installations on your system, or if your Apache is located in a non-standard location which Phusion Passenger cannot detect. By setting APXS2 and HTTP to the right paths, you can force Phusion Passenger to be compiled against that specific Apache installation.

For example, if your Apache installation is located in /opt/lamp/apache2, then you can run the installer as follows:

$ sudo bash
# export HTTPD=/opt/lampp/apache2/bin/apache
# export APXS2=/opt/lampp/apache2/bin/apxs
# passenger-install-apache2-module
APR_CONFIG

The location of the apr-config executable (the Apache Portable Runtime developer tool).

APU_CONFIG

The location of the apu-config executable (the Apache Portable Runtime Utility developer tool).

MAKE

The location of a make tool. It does not matter which implementation of make this is.

GMAKE

The location of the GNU-compatible make tool.

Tip If you do not know what environment variables are, or how to use them, then please read Environment variables and sudo.
Note If you run the installer with sudo then environment variables may not be passed properly. Learn more at Environment variables and sudo.

2.10. Uninstalling

  • If you installed Phusion Passenger via a Ruby gem, then run gem uninstall passenger (or, if you’re a Phusion Passenger Enterprise user, gem uninstall passenger-enterprise-server). You might have to run this as root.

  • If you installed Phusion Passenger via a source tarball, then remove the directory in which you placed the extracted Phusion Passenger files. This directory is the same as the one pointed to the by PassengerRoot/passenger_root configuration directive.

  • If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger.

  • If you installed Phusion Passenger through Homebrew, then run brew uninstall passenger.

2.11. Moving to a different directory

If you installed Phusion Passenger through a tarball then you can move the Phusion Passenger directory to another location. This is not possible if you used any of the other installation methods.

First, move the directory to whereever you like:

mv /opt/passenger/passenger-4.0.0 /usr/local/passenger-4.0.0

If you used the tarball installation method and you added Phusion Passenger’s bin subdirectory to PATH, then you must update your PATH with the new location. Open /etc/bashrc (or /etc/bash.bashrc on some systems) and change:

export PATH=/opt/passenger/passenger-4.0.0/bin:$PATH

to:

export PATH=/usr/local/passenger-4.0.0/bin:$PATH

Finally, restart all your shell sessions to activate the PATH change.

3. Usage

Go to your application’s root directory, and run:

passenger start

4. Configuration

4.1. Command line options

Most configuration is done by customizing the arguments passed to the passenger command. The most important ones are:

--port NUMBER

The port number that Phusion Passenger Standalone should listen on. If not given, port 3000 is assumed.

--environment NAME

Customizes the value of the RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV environment variables. Some web frameworks, for example Rails and Connect.js, adjust their behavior according to the environment. The default value is development.

--max-pool-size NUMBER

The maximum number of application processes to run. The maximum number that you can run depends on the amount of memory your server has. The article Tuning Phusion Passenger’s concurrency settings explains how you can infer a good number for this option.

--min-instances NUMBER

If you don’t want the number of application processes to scale dynamically, then use this option to set it to a value equal to --max-pool-size.

--spawn-method NAME

When set to "smart" (the default), Phusion Passenger preloads your app and utilizes copy-on-write in order to save memory. You can disable this by setting this option to "direct". Preloading is only supported for Ruby apps. For apps written in other languages, it is as if "direct" is always used.

--no-friendly-error-pages

If your app fails to start, Phusion Passenger will tell you by showing a friendly error page in the browser. This option disables it.

--ssl

Enables SSL support. If this is set, you must also set --ssl-certificate and --ssl-certificate-key to the SSL certificate and key files, respectively.

--ssl-port

If --ssl is given, and you set this option, then Phusion Passenger Standalone will listen for HTTP on the regular --port number, as well as listen for HTTPS on the port you specified with this option. For example:

# Listen for HTTP on port 3000, HTTPS on port 3001.
passenger start --ssl --ssl-certificate ... --ssl-certificate-key ... --ssl-port 3001

See --help for all available options.

4.2. Configuration file

Introduced in version 4.0.24.

It is possible to store some options in a configuration file passenger-standalone.json in the application directory. Configuration in this file overrides command line options. The configuration file format is JSON.

In case Passenger Standalone is in mass deployment mode, such a configuration file allows customizing options on a per-application basis.

The following configuration options are supported:

port

Equivalent to the --port command line option.

environment

Equivalent to the --environment command line option.

max_pool_size

Equivalent to the --max-pool-size command line option. But when in mass deployment mode, this option in the configuration file has no effect; the command line option should be used to customize this.

min_instances

Equivalent to the --min-instances command line option.

spawn_method

Equivalent to the --spawn-method command line option.

ssl

Equivalent to the --ssl command line option. When given, you must also set ssl_certificate and ssl_certificate_key in the configuration file.

ssl_port

Equivalent to the --ssl-port command line option.

When in mass deployment mode, you will probably want to set a different port too. If you don’t, and you end up in a situation in which a port is used for both HTTP and HTTPS traffic, then the builtin Nginx core will abort with an error.

Here is an example configuration file:

{
        "port": 8000,
        "environment": "production",
        "ssl": true,
        "ssl_certificate": "/path-to-cert.crt",
        "ssl_certificate_key": "/path-to-cert.key"
}

4.3. Advanced configuration

Phusion Passenger Standalone is built on the same technology that powers Phusion Passenger for Nginx, so any configuration option supported by Phusion Passenger for Nginx can be applied to Standalone as well. You can do this by editing the Standalone configuration template directly.

First, go to the directory where Phusion Passenger is installed:

cd $(passenger-config --root)

Then open the file resources/templates/standalone/config.erb.

Note If you installed Phusion Passenger using the Debian or Ubuntu packages, then the filename is /usr/share/passenger/templates/standalone/config.erb or /usr/share/passenger-enterprise/templates/standalone/config.erb.

Please note that changes to this file only last until you reinstall or upgrade Phusion Passenger. We are currently working on a mechanism for permanently editing the configuration file.

5. Using Passenger Standalone in production

5.1. Starting Passenger Standalone at system boot

The easiest way to have Passenger Standalone started during system boot is add it to the file /etc/rc.local. This script is called during system boot.

Here’s an example of what you may want to add to /etc/rc.local. If there is an exit command in rc.local, make sure you add these before the exit command.

# If you installed Phusion Passenger from tarball, add its `bin` directory to PATH.
#export PATH=/path-to-passenger/bin:$PATH

# Change working directory to your webapp.
cd /path-to-your-webapp

# Start Passenger Standalone in daemonized mode. Passenger will be started as
# root when run from this file, so we also tell it to drop its privileges to a
# normal user. Replace 'someusername' with the user you want to run your
# application under.
passenger start --daemonize --port 80 --user someusername

To stop Passenger Standalone, run:

cd /path-to-your-webapp

# If you use RVM, use 'rvmsudo' instead of 'sudo'
sudo passenger stop

5.2. Sharing the same port between multiple Passenger Standalone instances

If you have multiple applications on your server then it is desirable to have all of them listen on the same port (e.g. port 80), with the HTTP request’s host name determining which Passenger Standalone instance should handle the request. There are three ways to achieve this.

  1. The first way is to use the Mass deployment feature, which allows Passenger Standalone to directly host multiple applications at the same time. Please refer to that section to learn more.

  2. The second way is to run multiple Passenger Standalone instances — one for each application — and to put all of them behind a reverse proxy or load balancer. The reverse proxy/load balancer can for example be Nginx, Apache or HAProxy. The reverse proxy/load balancer listens on port 80, determines which Passenger Standalone instance should handle the request, and forwards the request to that instance.

  3. The third way is to use Phusion Passenger for Nginx or Phusion Passenger for Apache. These are two modes of Phusion Passenger that are distinct from the Standalone mode, which this document describes. In the Nginx and Apache modes, Phusion Passenger integrates directly into Nginx and Apache, and makes it very easy to host multiple applications directly on Nginx or Apache.

    Compared method 2 — putting Passenger Standalone behind a reverse proxy or load balancer — the Nginx or Apache modes are easier to use and require less configuration. On the other hand, the Nginx modes requires reinstalling or recompiling Nginx, while the Apache mode requires that the Phusion Passenger Apache module is installed.

The rest of this subsection describes method 2.

Step 1: starting all applications

Putting Passenger Standalone behind a reverse proxy requires three steps. First, you must start all Passenger Standalone instances that you want. Each one must be listening on a different port, because two applications can’t listen on the same port. Suppose that you have two applications, /webapps/foo and /webapps/bar. Here’s how you may start them:

# Start foo on port 4000
cd /webapps/foo
passenger start --daemonize --address 127.0.0.1 --port 4000

# Start bar on port 4010
cd /webapps/bar
passenger start --daemonize --address 127.0.0.1 --port 4010

Notice the fact that we pass --address 127.0.0.1, which tells Passenger Standalone to only listen for requests that originate from the local machine. This is because the reverse proxy/load balancer, not Passenger Standalone, is supposed to be responsible for receiving external HTTP requests. The reverse proxy/load balancer will be running on the same machine only, so limiting Passenger Standalone in this manner improves security.

Step 2: install and configure the reverse proxy/load balancer

The next step is to install a reverse proxy/load balancer, and to configure it to do the following:

  • To listen on port 80.

  • To forward requests to either foo or bar, depending on the request’s HTTP host name.

You can use any reverse proxy/load balancer you want, but we’re going to show an example using Nginx because it’s a pretty popular choice. Install Nginx as follows:

Debian, Ubuntu

sudo apt-get update
sudo apt-get install nginx-extras

Red Hat, CentOS, ScientificLinux, Amazon Linux

Enable EPEL, then run as root:
yum install nginx

Mac OS X (Homebrew)

brew install nginx

Other operating systems

Install Nginx from the Nginx website.

Open the Nginx configuration file:

Debian, Ubuntu

/etc/nginx/nginx.conf

Red Hat, CentOS, ScientificLinux, Amazon Linux

/etc/nginx/nginx.conf

Mac OS X (Homebrew)

/usr/local/etc/nginx/nginx.conf

Other operating systems

It depends on how you installed Nginx, but it’s usually $PREFIX/conf/nginx.conf, where $PREFIX is the prefix you installed Nginx to.

Add virtual host entries for your applications foo and bar. While making the virtual host entries, you must determine what host names foo and bar should respond to. Let’s say that foo should respond to www.foo.com and bar should respond to www.bar.com. Then the following entries will tell Nginx to listen on port 80, and to handle requests for the domains www.foo.com and www.bar.com differently.

http {
    ...

    # These are some "magic" Nginx configuration options that aid in making
    # WebSockets work properly with Passenger Standalone. Please learn more
    # at http://nginx.org/en/docs/http/websocket.html
    map $http_upgrade $connection_upgrade {
        default upgrade;
        ''      close;
    }

    server {
        listen 80;
        server_name www.foo.com;

        # Tells Nginx to serve static assets from this directory.
        root /webapps/foo/public;

        location / {
            # Tells Nginx to forward all requests for www.foo.com
            # to the Passenger Standalone instance listening on port 4000.
            proxy_pass http://127.0.0.1:4000;

            # These are "magic" Nginx configuration options that
            # should be present in order to make the reverse proxying
            # work properly. Also contains some options that make WebSockets
            # work properly with Passenger Standalone. Please learn more at
            # http://nginx.org/en/docs/http/ngx_http_proxy_module.html
            proxy_http_version 1.1;
            proxy_set_header Host $http_host;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
            proxy_buffering off;
        }
    }

    # We handle bar in a similar manner.
    server {
        listen 80;
        server_name www.bar.com;

        root /webapps/bar/public;

        location / {
            # bar is listening on port 4010 instead of 4000, we
            # change the URL here.
            proxy_pass http://127.0.0.1:4010;

            proxy_http_version 1.1;
            proxy_set_header Host $http_host;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection $connection_upgrade;
            proxy_buffering off;
        }
    }
}

Once you’re done editing the Nginx configuration file, restart Nginx:

Debian, Ubuntu

sudo /etc/init.d/nginx restart

Red Hat, CentOS, ScientificLinux, Amazon Linux

sudo service nginx restart

Mac OS X (Homebrew)

1. Run sudo kill $(cat /usr/local/var/run/nginx.pid)
2. You you installed the Nginx launchd plist that Homebrew provides (see brew info nginx to learn more), then you don’t have to do anything, and launchd will automatically restart Nginx. Otherwise, you have to manually start Nginx again: sudo /usr/local/bin/nginx.

Other operating systems

It depends on how you installed Nginx, but it’s usually as follows:

1. Lookup the PID of the Nginx master process using ps aux.
2. Run sudo kill <PID>
3. Start Nginx again: sudo $PREFIX/sbin/nginx, where $PREFIX is the prefix you installed Nginx to.

Step 3: testing

Nginx should now be listening on port 80, and should forward requests to foo and bar respectively. Let’s test it out by accessing http://www.foo.com and http://www.bar.com. But first, we need to ensure that any requests to www.foo.com and www.bar.com, that originate from the local machine, actually end up at the local host, and not at the IP address specified in the DNS records. To do this, edit /etc/hosts and add:

127.0.0.1  www.foo.com www.bar.com

Now visit http://www.foo.com and http://www.bar.com, and verify that it works.

Step 4: making all apps start at system boot

Once you restart the server, the reverse proxy/load balancer will no longer be able to serve www.foo.com or www.bar.com because the Passenger Standalone instances that host them are no longer running. You must therefore configure the system to start Passenger Standalone at system boot. Please refer to Starting Passenger Standalone at system boot for more information.

For example, you can put this in /etc/rc.local to make the system start foo and bar at system boot:

# If you installed Phusion Passenger from tarball, add its `bin` directory to PATH.
#export PATH=/path-to-passenger/bin:$PATH

cd /webapps/foo
passenger start --daemonize --port 4000 --user someusername1

cd /webapps/bar
passenger start --daemonize --port 4010 --user someusername2

Step 5: wrapping up

Edit /etc/hosts and remove the entry that you added in step 3.

5.3. Installing Passenger Standalone behind Nginx

6. Mass deployment

This feature is only available in Phusion Passenger Enterprise. It was introduced in version 3.0.0. Buy Phusion Passenger Enterprise here.

Mass deployment is a special mode in Phusion Passenger Standalone that allows you to deploy multiple web applications without having to create configuration entries for each one of them. Given a directory with multiple web applications, Passenger Standalone will automatically give each web application its own virtual host entry, and serve all of them from a single server. The virtual host’s server name is equal to the web application’s directory name. Whenever a new web application is added or removed, Passenger Standalone automatically reconfigures itself without administrator intervention. This makes the mass deployment mode especially useful when there are a large number of web applications.

For example, suppose we have a directory /webapps with three web applications: Ruby app, a Python app and a Node.js app.

/webapps
  |
  +-- rubyapp.com
  |    |
  |    +-- config.ru
  |
  +-- pythonapp.com
  |    |
  |    +-- passenger_wsgi.py
  |
  +-- nodeapp.com
       |
       +-- app.js

You can activate Passenger Standalone in mass deployment mode by changing the working directory to /webapps and running passenger start:

$ cd /webapps
$ passenger start
=============== Phusion Passenger Standalone web server started ===============
PID file: /webapps/passenger.3000.pid
Log file: /webapps/passenger.3000.log
Environment: development

Serving these applications on 0.0.0.0 port 3000:
 Host name                     Directory
.-----------------------------------------------------------
 rubyapp.com                   /webapps/rubyapp.com
 pythonapp.com                 /webapps/pythonapp.com
 nodeapp.com                   /webapps/nodeapp.com
.-----------------------------------------------------------

If you for example remove /webapps/rubyapp.com, Passenger Standalone will reconfigure itself without that web application. Or if you add a new web applications /webapps/newapp.org, Passenger Standalone will reconfigure itself with that web application.

Any options that you pass to the passenger command will affect all deployed web applications. It is also possible to change options on a per-application basis through the use of a passenger-standalone.json file inside each application’s directory.

7. Troubleshooting

7.1. Generic troubleshooting tips

One of the first things you should do upon encountering a problem, is to check Phusion Passenger Standalone log file. This is typically located in log/passenger.[PORT NUMBER].log. Most problems are logged to this log file.

If neither the logs nor this troubleshooting guide can help you, then please check out our support resources.

7.2. Upon uploading a file, Phusion Passenger reports "client_body_temp/00000000xx failed (2: No such file or directory)"

Symptoms

When performing an HTTP POST call, the request sometimes fails, with Phusion Passenger reporting an error along the lines of:

/tmp/passenger-standalone.8583/client_body_temp/0000000022" failed (2: No such
file or directory), client: 127.0.0.1, server: www.foo.com
Cause

Phusion Passenger buffers HTTP POST bodies (file uploads) to a temporary directory, by default /tmp/passenger-standalone.xxx. This error means that Phusion Passenger that that directory has been removed, probably by some other program.

Solution

Tell Phusion Passenger to use a different directory to store its temporary files passing the --temp-dir command line option. For example:

mkdir $HOME/tmp
cd /path-to-your-app
passenger start --temp-dir=$HOME/tmp

8. Appendix: About environment variables

The Phusion Passenger compilation process can be customized with environment variables.

Environment variables are named values that affect how the system works. For example they tell the system where to look for commands (the PATH variable) or where to look for libraries (LD_LIBRARY_PATH). Their names are often in all-uppercase. Sometimes people refer to an environment variable with a dollar sign $ in front, but that’s the same thing: when people say "the $PATH environment variable" they mean "the PATH environment variable". This is because the dollar sign $ is a shell syntax for refering to an environment variable, as you will learn later.

Environment variables are set on a per-process basis, but they are inherited by child processes. This means that if you set environment variables in process A, another already running process B will not see these new environment variables. But if A spawns a child process C, then C will have all environment variables that A had. If you once again change the environment variables in A, then C will not see the changes.

The per-process nature of environment variables some implications. When you set environment variables in your bashrc or other bash startup files


  • 
only newly spawned bash shells see them.

  • 
the web server usually does not see them, because the web server tends to be started from init scripts, not from bash.

  • 
cron jobs do not see them, because cron jobs' environment variables are entirely dictated by their crontabs.

Note Because this chapter is meant for beginners, it assumes that the reader uses the bash shell. This chapter does not describe instructions for zsh, csh or other shells. We assume that users of other shells are familiar with the Bourne shell syntax, and know how to apply the instructions in this chapter in their shells' native syntaxes.

8.1. Working with environment variables

You can see all environment variables in your shell by running the following command:

env

You can set an evironment variable with the syntax export <NAME>=<VALUE>. For example, to set the APXS2 variable to the value /usr/sbin/apxs2:

export APXS2=/usr/sbin/apxs2

Any process that you run from your shell from that point on will have said environment variable:

export APXS2=/usr/sbin/apxs2
ruby -e 'p ENV["APXS2"]'
# => "/usr/sbin/apxs2"
Note
The "export" keyword is important

You must set the export keyword. If you omit the export keyword then the environment variable will not be visible to other processes:

APXS2=/usr/sbin/apxs2
ruby -e 'p ENV["APXS2"]'
# => nil

You can reference an environment variable in your shell by typing the $ sign followed by the environment variable’s name. For example, to see the value of the PATH variable:

echo $PATH

You can also use this trick to extend the value of an environment variable:

export PATH=/usr/bin

# Prepends '/opt/local/bin', so that it becomes /opt/local/bin:/usr/bin
export PATH=/opt/local/bin:$PATH
# Appends '/usr/local/bin', so that it becomes /opt/local/bin:/usr/bin:/usr/local/bin
export PATH=$PATH:/usr/local/bin

8.2. The PATH environment variable

The PATH environment variable dictates where the system looks for command. It is a colon-separated list of directories. If you get a "command not found" error while you know that the command is installed, then setting PATH will help. For example suppose that the command frobnicator is in /opt/local/bin:

user@localhost bash$ frobnicator
bash: frobnicator: command not found

We verify that /opt/local/bin is not in PATH:

user@localhost bash$ echo $PATH
/bin:/usr/bin:/usr/local/bin

We can run frobnicator through it’s full path


user@localhost bash$ /opt/local/bin/frobnicator
# => success!


or we can add /opt/local/bin to PATH.

user@localhost bash$ export PATH=$PATH:/opt/local/bin
user@localhost bash$ frobnicator
# => success!

8.2.1. Adding Phusion Passenger’s administration tools to PATH

If you get a "command not found" error when invoking one of the Phusion Passenger administration tools (e.g. passenger-status or passenger-memory-stats then that means the tools are not in PATH, so you need to add them.

  • If you installed Phusion Passenger with RubyGems, then the tools are in your RubyGems executable path. You can view the gem path using the command gem env:

    $ gem env
    RubyGems Environment:
      - RUBYGEMS VERSION: 1.8.15
      - RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [i686-darwin10.8.0]
      - INSTALLATION DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
      - RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby
      - EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/bin    <--------- !!
      - RUBYGEMS PLATFORMS:
        - ruby
        - x86-darwin-10
      - GEM PATHS:
         - /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8
         - /Users/hongli/.gem/ruby/1.8
      - GEM CONFIGURATION:
         - :update_sources => true
         - :verbose => true
         - :benchmark => false
         - :backtrace => false
         - :bulk_threshold => 1000
         - "gem" => "--no-ri --no-rdoc"
      - REMOTE SOURCES:
         - http://rubygems.org/

    As you can see, the RubyGems executable path in the example happens to be /opt/ruby-enterprise-1.8.7-2010.01/bin. So that directory must be added to PATH.

  • If you installed Phusion Passenger using the tarball, then the tools are in the bin subdirectory of the Phusion Passenger tarball directory that you extracted. For example, if you extracted passenger-4.9.0.tar.gz inside /opt, then the tools are located in /opt/passenger-4.0.9/bin. In that case, you need to add /opt/passenger-4.0.9/bin to your PATH.

  • If you installed Phusion Passenger using native OS packages, then some Phusion Passenger administration tools are in /usr/bin, while others are in /usr/sbin. If you are not logged in as root, then /usr/sbin may not be in PATH, which would explain why you get a "command not found" when trying to invoke some of the tools. You should /usr/sbin to PATH.

  • If you are unsure where your Phusion Passenger directory is then you can use the find command to look them up. Go to the root directory and invoke find with sudo:

    $ cd /
    $ sudo find . -name passenger-status
    /usr/local/passenger/bin/passenger-status

    In this example, the administration tools happen to be in /usr/local/passenger/bin, so you must add that to PATH.

Note You may still get a "command not found" when invoking the tools through sudo, even after you’ve added the relevant directory to PATH. Please read Environment variables and sudo to learn more.

8.3. Making environment variables permanent

When you exit your shell, the evironment variable changes are lost. There is no standard method to set environment variables system-wide, so you have to set them in different configuration files for different services.

8.3.1. bash

To make environment variables permanent for future bash sessions for the current user, add them to your ~/.bashrc:

echo 'export FOO=bar' >> ~/.bashrc
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc

To make them permanent for future bash sessions for all users, add them to /etc/bashrc.

Note Depending on the system, the bashrc file may have a different filename. On Debian and Ubuntu, it’s /etc/bash.bashrc.

8.3.2. Apache

Note This subsection describes how to set environment variables on Apache itself, not on apps served through Phusion Passenger for Apache. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also Setting environment variables on Phusion Passenger-served apps.

On Debian and Ubuntu, with an Apache installed through apt, Apache environment variables are defined in the file /etc/apache2/envvars. This is a shell script so environment variables must be specified with the shell syntax.

On Red Hat, Fedora, CentOS and ScientificLinux, with an Apache installed through YUM, Apache environment variables are defined in /etc/sysconfig/httpd.

On OS X they are defined in /System/Library/LaunchDaemons/org.apache.httpd.plist, as explained here on Stack Overflow.

On other systems, or if you did not install Apache through the system’s package manager, the configuration file for environment variables is specific to the vendor that supplied Apache. There may not even be such a configuration file. You should contact the vendor for support.

8.3.3. Nginx

Note This subsection describes how to set environment variables on Nginx itself, not on apps served through Phusion Passenger for Nginx. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also Setting environment variables on Phusion Passenger-served apps.

If you installed Nginx through the Debian or Ubuntu packages, then you can define environment variables in /etc/default/nginx. This is a shell script so you must use the export FOO=bar syntax.

Otherwise, environment variables are best set through the script which starts Nginx. For example, if you installed Nginx from source and you used then you should edit that script to define the environment variables. Those init scripts are regular shell scripts, so use the export FOO=bar syntax. Just make sure your set your environment variables before the script starts Nginx.

Note Setting environment variables on Nginx has no effect on the Flying Passenger daemon because the daemon is started seperately. You should set the environment variables in the shell right before starting the daemon.

8.3.4. cron

To make environment variables permanent for cron jobs, add those variables to the relevant crontab. But note that inside crontabs you cannot refer to existing environment variables with the $ syntax because crontabs are not shell scripts. You have to specify the entire value.

What to put in "crontab -e"
# Environment variable definitions
FOO=bar
APXS2=/usr/sbin/apxs2

# **WRONG!** You cannot refer to existing variables with the `$` syntax!
PATH=/usr/bin:$PATH
# **WRONG!** You cannot use the 'export' keyword!
export PATH=/usr/bin:/usr/local/bin
# Correct:
PATH=/usr/bin:/usr/local/bin

# Jobs:
# m h  dom mon dow   command
  * *  *   *   *     frobnicator

8.3.5. Phusion Passenger-served apps

You can pass environment variables to Phusion Passenger-served apps through various methods:

  • When running Apache, use the PassEnv and SetEnv directives of mod_env. This is supported starting from Phusion Passenger 4.0.

  • When running Nginx, use the passenger_set_cgi_param directive.

  • Through your bashrc. Starting from version 4.0, Phusion Passenger 4.0 spawns applications through bash and inherit all bash environment variables. Phusion Passenger Standalone tends to be started from the shell and thus inherits all environment variables set by the shell.

  • Through Apache and Nginx, as described earlier in this chapter. Any environment variables that you set on Apache and Nginx itself are inherited by Phusion Passenger, and thus by Phusion Passenger-served apps as well.

  • Through the application itself. Most programming languages provide APIs for setting environment variables. For example in Ruby you can write:

    ENV['FOO'] = 'bar'

    In Python you can write:

    import os
    os.environ['FOO'] = 'bar'

8.4. Environment variables and sudo

Note RVM users should always use the rvmsudo command instead of sudo. However all information in this section apply to rvmsudo as well.

The sudo command resets all environment variables before running the specified command, for security reasons. So if you set environment variables before running sudo passenger-install-xxx-module, sudo passenger-status or any other commands, then the environment variables are not correctly passed to the command. You can solve this by running sudo with -E (preserve environment variables):

user@localhost bash$ export APXS2=/usr/sbin/apxs2
user@localhost bash$ sudo -E passenger-install-apache2-module

Alternatively, you can obtain a root prompt with sudo first, and then set the environment variables, before running any further commands:

user@localhost bash$ sudo -s
Password: ...
root@localhost bash# export APXS2=/usr/sbin/apxs2
root@localhost bash# passenger-install-apache2-module

Note that for security reasons, sudo always resets the PATH environment variable, even if you pass -E! You can get around this problem by obtaining a root prompt first, and then set the environment variables:

user@localhost bash$ sudo -s
Password: ...
root@localhost bash# export PATH=$PATH:/opt/myruby/bin
root@localhost bash# passenger-install-apache2-module

passenger-4.0.37/doc/Users guide Standalone.idmap.txt000644 000765 000024 00000011447 12233035540 023052 0ustar00honglistaff000000 000000 ###### Autogenerated by Mizuho, DO NOT EDIT ###### # This file maps section names to IDs so that the commenting system knows which # comments belong to which section. Section names may be changed at will but # IDs always stay the same, allowing one to retain old comments even if you # rename a section. # # This file is autogenerated but is not a cache; you MUST NOT DELETE this # file and you must check it into your version control system. If you lose # this file you may lose the ability to identity old comments. # # Entries marked with "fuzzy" indicate that the section title has changed # and that Mizuho has found an ID which appears to be associated with that # section. You should check whether it is correct, and if not, fix it. 1. Support information => support-information-1x8e9ee 1.1. Supported operating systems => supported-operating-systems-1387080 1.2. Where to get support => where-to-get-support-xkx7rx 2. Installation => installation-2vrmef 2.1. Synopsis => synopsis-92sr34 2.2. Installing or upgrading on Mac OS X with Homebrew => installing-or-upgrading-on-mac-os-x-with-homebrew-fxjdi1 2.3. Installing or upgrading on Debian or Ubuntu => installing-or-upgrading-on-debian-or-ubuntu-gme2a9 2.3.1. Adding our APT repository => adding-our-apt-repository-1qu2se8 2.3.2. Installing packages => installing-packages-k1zxbg 2.4. Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux => installing-or-upgrading-on-red-hat-fedora-centos-or-scientificlinux-16cek45 2.5. Generic installation, upgrade and downgrade method: via RubyGems => generic-installation-upgrade-and-downgrade-method-via-rubygems-1229ugi 2.6. Generic installation, upgrade and downgrade method: via tarball => generic-installation-upgrade-and-downgrade-method-via-tarball-1rwvasy 2.7. Upgrading from open source to Enterprise => upgrading-from-open-source-to-enterprise-1kezors 2.8. Cryptographic verification of installation files => cryptographic-verification-of-installation-files-85nwoi 2.8.1. Synopsis => synopsis-1ij8j9r 2.8.2. Importing the Phusion Software Signing key => importing-the-phusion-software-signing-key-1u5hkcr 2.8.3. Verifying the Phusion Software Signing key => verifying-the-phusion-software-signing-key-qor1n1 2.8.4. Verifying the gem and tarball => verifying-the-gem-and-tarball-i7tj7a 2.8.5. Verifying Git signatures => verifying-git-signatures-dltpan 2.8.6. Verifying DEB and RPM packages => verifying-deb-and-rpm-packages-uga0ho 2.8.7. Revocation => revocation-ukzeg9 2.9. Customizing the compilation process => customizing-the-compilation-process-j4xj2t 2.9.1. Setting the compiler => setting-the-compiler-1fxfulc 2.9.2. Adding additional compiler or linker flags => adding-additional-compiler-or-linker-flags-nxfour 2.9.3. Forcing location of command line tools and dependencies => forcing-location-of-command-line-tools-and-dependencies-xajpg1 2.10. Uninstalling => uninstalling-3hpprb 2.11. Moving to a different directory => moving-to-a-different-directory-b3lpy1 3. Usage => usage-1eyt33o 4. Configuration => configuration-10trfau 4.1. Command line options => command-line-options-1njv6kt 4.2. Configuration file => configuration-file-xng7yp 4.3. Advanced configuration => advanced-configuration-e3v4pk 5. Using Passenger Standalone in production => using-passenger-standalone-in-production-1i7yjcz 5.1. Starting Passenger Standalone at system boot => starting-passenger-standalone-at-system-boot-jpem2b 5.2. Sharing the same port between multiple Passenger Standalone instances => sharing-the-same-port-between-multiple-passenger-standalone-instances-3lcmc5 5.3. Installing Passenger Standalone behind Nginx => installing-passenger-standalone-behind-nginx-1xylsfk 6. Mass deployment => mass-deployment-1xqriy4 7. Troubleshooting => troubleshooting-o7g75o 7.1. Generic troubleshooting tips => generic-troubleshooting-tips-2vokcr 7.2. Upon uploading a file, Phusion Passenger reports "client_body_temp/00000000xx failed (2: No such file or directory)" => upon-uploading-a-file-phusion-passenger-reports-client-body-temp-00000000xx-failed-2-no-such-file-or-directory--d01goe 8. Appendix: About environment variables => appendix-about-environment-variables-1ct91x3 8.1. Working with environment variables => working-with-environment-variables-11cmwlv 8.2. The PATH environment variable => the-path-environment-variable-yzfn3k 8.2.1. Adding Phusion Passenger’s administration tools to PATH => adding-phusion-passenger-s-administration-tools-to-path-d7k5mh 8.3. Making environment variables permanent => making-environment-variables-permanent-mkq46d 8.3.1. bash => bash-hmcscc 8.3.2. Apache => apache-15y3bm0 8.3.3. Nginx => nginx-uarf27 8.3.4. cron => cron-6272ar 8.3.5. Phusion Passenger-served apps => phusion-passenger-served-apps-127wbl2 8.4. Environment variables and sudo => environment-variables-and-sudo-znzmif passenger-4.0.37/doc/Users guide Standalone.txt000644 000765 000024 00000047237 12233035540 021767 0ustar00honglistaff000000 000000 = Phusion Passenger Standalone users guide image:images/phusion_banner.png[link="http://www.phusion.nl/"] link:https://www.phusionpassenger.com/[Phusion Passenger] is a web server and application server, designed to be fast, robust and lightweight. It runs your web apps with the least amount of hassle by taking care of almost all administrative heavy lifting for you. Advanced administration tools allow you to gain deep insight into your web applications' operations and to keep your servers healthy. Phusion Passenger is polyglot by design, and currently supports Ruby (Rack), Python (WSGI) and Node.js. In the Standalone mode, Phusion Passenger operates as a fully-featured, secure standalone HTTP server. You do not need to have an existing web server like Apache or Nginx. This mode is ideal... * ...if you are not familiar with Apache or Nginx * ...when you want to quickly start up a server without editing configuration files (e.g. during development) * ...or when you want to decouple the web server from the application server, by setting up reverse proxies. == Support information include::users_guide_snippets/support_information.txt[] [[installation]] == Installation include::users_guide_snippets/installation.txt[] == Usage Go to your application's root directory, and run: ------------------------------ passenger start ------------------------------ == Configuration === Command line options Most configuration is done by customizing the arguments passed to the `passenger` command. The most important ones are: `--port NUMBER`:: The port number that Phusion Passenger Standalone should listen on. If not given, port 3000 is assumed. `--environment NAME`:: Customizes the value of the `RAILS_ENV`, `RACK_ENV`, `WSGI_ENV`, `NODE_ENV` and `PASSENGER_APP_ENV` environment variables. Some web frameworks, for example Rails and Connect.js, adjust their behavior according to the environment. The default value is 'development'. `--max-pool-size NUMBER`:: The maximum number of application processes to run. The maximum number that you can run depends on the amount of memory your server has. The article link:http://blog.phusion.nl/2013/03/12/tuning-phusion-passengers-concurrency-settings/[Tuning Phusion Passenger's concurrency settings] explains how you can infer a good number for this option. `--min-instances NUMBER`:: If you don't want the number of application processes to scale dynamically, then use this option to set it to a value equal to `--max-pool-size`. `--spawn-method NAME`:: When set to "smart" (the default), Phusion Passenger preloads your app and utilizes copy-on-write in order to save memory. You can disable this by setting this option to "direct". Preloading is only supported for Ruby apps. For apps written in other languages, it is as if "direct" is always used. `--no-friendly-error-pages`:: If your app fails to start, Phusion Passenger will tell you by showing a friendly error page in the browser. This option disables it. `--ssl`:: Enables SSL support. If this is set, you must also set `--ssl-certificate` and `--ssl-certificate-key` to the SSL certificate and key files, respectively. `--ssl-port`:: If `--ssl` is given, and you set this option, then Phusion Passenger Standalone will listen for HTTP on the regular `--port` number, *as well as* listen for HTTPS on the port you specified with this option. For example: + ------------------------------------------------------------------------------ # Listen for HTTP on port 3000, HTTPS on port 3001. passenger start --ssl --ssl-certificate ... --ssl-certificate-key ... --ssl-port 3001 ------------------------------------------------------------------------------ See `--help` for all available options. [[config_file]] === Configuration file :version: 4.0.24 include::users_guide_snippets/since_version.txt[] It is possible to store some options in a configuration file `passenger-standalone.json` in the application directory. Configuration in this file overrides command line options. The configuration file format is JSON. In case Passenger Standalone is in <>, such a configuration file allows customizing options on a per-application basis. The following configuration options are supported: `port`:: Equivalent to the `--port` command line option. `environment`:: Equivalent to the `--environment` command line option. `max_pool_size`:: Equivalent to the `--max-pool-size` command line option. But when in mass deployment mode, this option in the configuration file has no effect; the command line option should be used to customize this. `min_instances`:: Equivalent to the `--min-instances` command line option. `spawn_method`:: Equivalent to the `--spawn-method` command line option. `ssl`:: Equivalent to the `--ssl` command line option. When given, you must also set `ssl_certificate` and `ssl_certificate_key` in the configuration file. `ssl_port`:: Equivalent to the `--ssl-port` command line option. + When in mass deployment mode, you will probably want to set a different `port` too. If you don't, and you end up in a situation in which a port is used for both HTTP and HTTPS traffic, then the builtin Nginx core will abort with an error. Here is an example configuration file: [source,javascript] ------------------ { "port": 8000, "environment": "production", "ssl": true, "ssl_certificate": "/path-to-cert.crt", "ssl_certificate_key": "/path-to-cert.key" } ------------------ [[advanced_configuration]] === Advanced configuration Phusion Passenger Standalone is built on the same technology that powers link:Users%20guide%20Nginx.html[Phusion Passenger for Nginx], so any configuration option supported by Phusion Passenger for Nginx can be applied to Standalone as well. You can do this by editing the Standalone configuration template directly. First, go to the directory where Phusion Passenger is installed: ------------------------------------- cd $(passenger-config --root) ------------------------------------- Then open the file `resources/templates/standalone/config.erb`. NOTE: If you installed Phusion Passenger using the Debian or Ubuntu packages, then the filename is `/usr/share/passenger/templates/standalone/config.erb` or `/usr/share/passenger-enterprise/templates/standalone/config.erb`. Please note that changes to this file only last until you reinstall or upgrade Phusion Passenger. We are currently working on a mechanism for permanently editing the configuration file. == Using Passenger Standalone in production [[starting_at_system_boot]] === Starting Passenger Standalone at system boot The easiest way to have Passenger Standalone started during system boot is add it to the file `/etc/rc.local`. This script is called during system boot. Here's an example of what you may want to add to `/etc/rc.local`. If there is an `exit` command in `rc.local`, make sure you add these _before_ the `exit` command. [source,sh] ------------------------------------------ # If you installed Phusion Passenger from tarball, add its `bin` directory to PATH. #export PATH=/path-to-passenger/bin:$PATH # Change working directory to your webapp. cd /path-to-your-webapp # Start Passenger Standalone in daemonized mode. Passenger will be started as # root when run from this file, so we also tell it to drop its privileges to a # normal user. Replace 'someusername' with the user you want to run your # application under. passenger start --daemonize --port 80 --user someusername ------------------------------------------ To stop Passenger Standalone, run: [source,sh] ------------------------------------------ cd /path-to-your-webapp # If you use RVM, use 'rvmsudo' instead of 'sudo' sudo passenger stop ------------------------------------------ [[sharing_port]] === Sharing the same port between multiple Passenger Standalone instances If you have multiple applications on your server then it is desirable to have all of them listen on the same port (e.g. port 80), with the HTTP request's host name determining which Passenger Standalone instance should handle the request. There are three ways to achieve this. 1. The first way is to use the <> feature, which allows Passenger Standalone to directly host multiple applications at the same time. Please refer to that section to learn more. 2. The second way is to run multiple Passenger Standalone instances -- one for each application -- and to put all of them behind a *reverse proxy* or *load balancer*. The reverse proxy/load balancer can for example be Nginx, Apache or HAProxy. The reverse proxy/load balancer listens on port 80, determines which Passenger Standalone instance should handle the request, and forwards the request to that instance. 3. The third way is to use link:Users%20guide%20Nginx.html[Phusion Passenger for Nginx] or link:Users%20guide%20Apache.html[Phusion Passenger for Apache]. These are two modes of Phusion Passenger that are distinct from the Standalone mode, which this document describes. In the Nginx and Apache modes, Phusion Passenger integrates directly into Nginx and Apache, and makes it very easy to host multiple applications directly on Nginx or Apache. + Compared method 2 -- putting Passenger Standalone behind a reverse proxy or load balancer -- the Nginx or Apache modes are easier to use and require less configuration. On the other hand, the Nginx modes requires reinstalling or recompiling Nginx, while the Apache mode requires that the Phusion Passenger Apache module is installed. **The rest of this subsection describes method 2.** [float] ==== Step 1: starting all applications Putting Passenger Standalone behind a reverse proxy requires three steps. First, you must start all Passenger Standalone instances that you want. Each one must be listening on a different port, because two applications can't listen on the same port. Suppose that you have two applications, `/webapps/foo` and `/webapps/bar`. Here's how you may start them: [source,sh] ------------------------------ # Start foo on port 4000 cd /webapps/foo passenger start --daemonize --address 127.0.0.1 --port 4000 # Start bar on port 4010 cd /webapps/bar passenger start --daemonize --address 127.0.0.1 --port 4010 ------------------------------ Notice the fact that we pass `--address 127.0.0.1`, which tells Passenger Standalone to only listen for requests that originate from the local machine. This is because the reverse proxy/load balancer, not Passenger Standalone, is supposed to be responsible for receiving external HTTP requests. The reverse proxy/load balancer will be running on the same machine only, so limiting Passenger Standalone in this manner improves security. [float] ==== Step 2: install and configure the reverse proxy/load balancer The next step is to **install a reverse proxy/load balancer**, and to **configure** it to do the following: * To listen on port 80. * To forward requests to either 'foo' or 'bar', depending on the request's HTTP host name. You can use any reverse proxy/load balancer you want, but we're going to show an example using link:http://www.nginx.org/[Nginx] because it's a pretty popular choice. Install Nginx as follows: |====================================================================== | Debian, Ubuntu | `sudo apt-get update` + `sudo apt-get install nginx-extras` | Red Hat, CentOS, ScientificLinux, Amazon Linux | Enable link:http://fedoraproject.org/wiki/EPEL[EPEL], then run as root: + `yum install nginx` | Mac OS X (Homebrew) | `brew install nginx` | Other operating systems | Install Nginx from link:http://www.nginx.org/[the Nginx website]. |====================================================================== Open the Nginx configuration file: |====================================================================== | Debian, Ubuntu | `/etc/nginx/nginx.conf` | Red Hat, CentOS, ScientificLinux, Amazon Linux | `/etc/nginx/nginx.conf` | Mac OS X (Homebrew) | `/usr/local/etc/nginx/nginx.conf` | Other operating systems | It depends on how you installed Nginx, but it's usually `$PREFIX/conf/nginx.conf`, where `$PREFIX` is the prefix you installed Nginx to. |====================================================================== Add virtual host entries for your applications foo and bar. While making the virtual host entries, you must determine what host names foo and bar should respond to. Let's say that foo should respond to 'www.foo.com' and bar should respond to 'www.bar.com'. Then the following entries will tell Nginx to listen on port 80, and to handle requests for the domains 'www.foo.com' and 'www.bar.com' differently. -------------------------- http { ... # These are some "magic" Nginx configuration options that aid in making # WebSockets work properly with Passenger Standalone. Please learn more # at http://nginx.org/en/docs/http/websocket.html map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen 80; server_name www.foo.com; # Tells Nginx to serve static assets from this directory. root /webapps/foo/public; location / { # Tells Nginx to forward all requests for www.foo.com # to the Passenger Standalone instance listening on port 4000. proxy_pass http://127.0.0.1:4000; # These are "magic" Nginx configuration options that # should be present in order to make the reverse proxying # work properly. Also contains some options that make WebSockets # work properly with Passenger Standalone. Please learn more at # http://nginx.org/en/docs/http/ngx_http_proxy_module.html proxy_http_version 1.1; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_buffering off; } } # We handle bar in a similar manner. server { listen 80; server_name www.bar.com; root /webapps/bar/public; location / { # bar is listening on port 4010 instead of 4000, we # change the URL here. proxy_pass http://127.0.0.1:4010; proxy_http_version 1.1; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_buffering off; } } } -------------------------- Once you're done editing the Nginx configuration file, restart Nginx: |====================================================================== | Debian, Ubuntu | `sudo /etc/init.d/nginx restart` | Red Hat, CentOS, ScientificLinux, Amazon Linux | `sudo service nginx restart` | Mac OS X (Homebrew) | 1. Run `sudo kill $(cat /usr/local/var/run/nginx.pid)` + 2. You you installed the Nginx launchd plist that Homebrew provides (see `brew info nginx` to learn more), then you don't have to do anything, and launchd will automatically restart Nginx. Otherwise, you have to manually start Nginx again: `sudo /usr/local/bin/nginx`. | Other operating systems | It depends on how you installed Nginx, but it's usually as follows: 1. Lookup the PID of the Nginx master process using `ps aux`. + 2. Run `sudo kill ` + 3. Start Nginx again: `sudo $PREFIX/sbin/nginx`, where `$PREFIX` is the prefix you installed Nginx to. |====================================================================== [float] ==== Step 3: testing Nginx should now be listening on port 80, and should forward requests to foo and bar respectively. Let's test it out by accessing http://www.foo.com and http://www.bar.com. But first, we need to ensure that any requests to 'www.foo.com' and 'www.bar.com', that originate from the local machine, actually end up at the local host, and not at the IP address specified in the DNS records. To do this, edit `/etc/hosts` and add: -------------------------------- 127.0.0.1 www.foo.com www.bar.com -------------------------------- Now visit http://www.foo.com and http://www.bar.com, and verify that it works. [float] ==== Step 4: making all apps start at system boot Once you restart the server, the reverse proxy/load balancer will no longer be able to serve 'www.foo.com' or 'www.bar.com' because the Passenger Standalone instances that host them are no longer running. You must therefore configure the system to start Passenger Standalone at system boot. Please refer to <> for more information. For example, you can put this in `/etc/rc.local` to make the system start foo and bar at system boot: [source,sh] ----------------------------------- # If you installed Phusion Passenger from tarball, add its `bin` directory to PATH. #export PATH=/path-to-passenger/bin:$PATH cd /webapps/foo passenger start --daemonize --port 4000 --user someusername1 cd /webapps/bar passenger start --daemonize --port 4010 --user someusername2 ----------------------------------- [float] ==== Step 5: wrapping up Edit `/etc/hosts` and remove the entry that you added in step 3. === Installing Passenger Standalone behind Nginx This is described in <>. [[mass_deployment]] == Mass deployment :version: 3.0.0 include::users_guide_snippets/enterprise_only.txt[] Mass deployment is a special mode in Phusion Passenger Standalone that allows you to deploy multiple web applications without having to create configuration entries for each one of them. Given a directory with multiple web applications, Passenger Standalone will automatically give each web application its own virtual host entry, and serve all of them from a single server. The virtual host's server name is equal to the web application's directory name. Whenever a new web application is added or removed, Passenger Standalone automatically reconfigures itself without administrator intervention. This makes the mass deployment mode especially useful when there are a large number of web applications. For example, suppose we have a directory `/webapps` with three web applications: Ruby app, a Python app and a Node.js app. ---------------------------- /webapps | +-- rubyapp.com | | | +-- config.ru | +-- pythonapp.com | | | +-- passenger_wsgi.py | +-- nodeapp.com | +-- app.js ---------------------------- You can activate Passenger Standalone in mass deployment mode by changing the working directory to `/webapps` and running `passenger start`: ---------------------------- $ cd /webapps $ passenger start =============== Phusion Passenger Standalone web server started =============== PID file: /webapps/passenger.3000.pid Log file: /webapps/passenger.3000.log Environment: development Serving these applications on 0.0.0.0 port 3000: Host name Directory .----------------------------------------------------------- rubyapp.com /webapps/rubyapp.com pythonapp.com /webapps/pythonapp.com nodeapp.com /webapps/nodeapp.com .----------------------------------------------------------- ---------------------------- If you for example remove `/webapps/rubyapp.com`, Passenger Standalone will reconfigure itself without that web application. Or if you add a new web applications `/webapps/newapp.org`, Passenger Standalone will reconfigure itself with that web application. Any options that you pass to the `passenger` command will affect all deployed web applications. It is also possible to change options on a per-application basis through the use of <>. [[troubleshooting]] == Troubleshooting include::users_guide_snippets/troubleshooting/default.txt[] [[about_environment_variables]] == Appendix: About environment variables include::users_guide_snippets/environment_variables.txt[] passenger-4.0.37/doc/Users guide.html000644 000765 000024 00000421362 12233035540 020036 0ustar00honglistaff000000 000000 Phusion Passenger users guide index

1. Overview

1.1. Nginx integration mode

In this mode, Phusion Passenger integrates directly into Nginx as an Nginx module. You operate Phusion Passenger mostly through Nginx and through Nginx configuration files. The Nginx integration mode is, along with the Standalone mode, highly optimized for performance.

1.2. Apache integration mode

In this mode, Phusion Passenger integrates directly into Apache as an Apache module. You operate Phusion Passenger mostly through Apache and through Apache configuration files.

1.3. Standalone mode

In this mode, Phusion Passenger operates as a fully-featured, secure standalone HTTP server. You do not need to have an existing web server like Apache or Nginx. This mode is ideal


  • 
if you are not familiar with Apache or Nginx

  • 
when you want to quickly start up a server without editing configuration files (e.g. during development)

  • 
or when you want to decouple the web server from the application server, by setting up reverse proxies.

Along with the Nginx mode, the Standalone mode is highly optimized for performance.

4. Where to get support

  • Community discussion forum - post a message here if you’re experiencing problems. Support on this forum is provided by the community on a best-effort basis, so a (timely) response is not guaranteed.

  • Issue tracker - report bugs here.

  • Email support@phusion.nl if you are a Phusion Passenger Enterprise customer. Please mention your order reference. If you are not an Enterprise customer, we kindly redirect you to the community discussion forum instead.

  • Commercial support contracts are also available.

  • Report security vulnerabilities to security@phusion.nl. We will do our best to respond to you as quickly as we can, so please do not disclose the vulnerability until then.

Please consult the Phusion Passenger website for a full list of support resources.

5. Appendix A: About this document

The text of this document is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License.

Phusion Passenger is brought to you by Phusion.

Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.


passenger-4.0.37/doc/Users guide.txt000644 000765 000024 00000005641 12233035540 017707 0ustar00honglistaff000000 000000 Phusion Passenger users guide index =================================== image:images/phusion_banner.png[link="http://www.phusion.nl/"] link:https://www.phusionpassenger.com/[Phusion Passenger] is a web server and application server, designed to be fast, robust and lightweight. It runs your web apps with the least amount of hassle by taking care of almost all administrative heavy lifting for you. Advanced administration tools allow you to gain deep insight into your web applications' operations and to keep your servers healthy. Phusion Passenger is polyglot by design, and currently supports Ruby (Rack), Python (WSGI) and Node.js. Phusion Passenger has several integration modes, each mode with its own documentation, covering *installation*, *usage*, *troubleshooting* and more. [[overview]] == Overview === Nginx integration mode In this mode, Phusion Passenger integrates directly into Nginx as an Nginx module. You operate Phusion Passenger mostly through Nginx and through Nginx configuration files. The Nginx integration mode is, along with the Standalone mode, highly optimized for performance. link:Users%20guide%20Nginx.html[**Read the documentation for the Nginx integration mode >>**] === Apache integration mode In this mode, Phusion Passenger integrates directly into Apache as an Apache module. You operate Phusion Passenger mostly through Apache and through Apache configuration files. link:Users%20guide%20Apache.html[**Read the documentation for the Apache integration mode >>**] === Standalone mode In this mode, Phusion Passenger operates as a fully-featured, secure standalone HTTP server. You do not need to have an existing web server like Apache or Nginx. This mode is ideal... * ...if you are not familiar with Apache or Nginx * ...when you want to quickly start up a server without editing configuration files (e.g. during development) * ...or when you want to decouple the web server from the application server, by setting up reverse proxies. Along with the Nginx mode, the Standalone mode is highly optimized for performance. link:Users%20guide%20Standalone.html[**Read the documentation for the Standalone mode >>**] [[installation]] == Installation and upgrade Please refer to: * link:Users%20guide%20Nginx.html#installation[**Nginx** mode installation & upgrade] * link:Users%20guide%20Apache.html#installation[**Apache** mode installation & upgrade] * link:Users%20guide%20Standalone.html#installation[**Standalone** mode installation & upgrade] [[troubleshooting]] == Troubleshooting Please refer to: * link:Users%20guide%20Nginx.html#troubleshooting[**Nginx** mode troubleshooting] * link:Users%20guide%20Apache.html#troubleshooting[**Apache** mode troubleshooting] * link:Users%20guide%20Standalone.html#troubleshooting[**Standalone** mode troubleshooting] [[support]] == Where to get support include::users_guide_snippets/where_to_get_support.txt[] include::users_guide_snippets/appendix_a_about.txt[] passenger-4.0.37/doc/users_guide_snippets/000755 000765 000024 00000000000 12233035540 021224 5ustar00honglistaff000000 000000 passenger-4.0.37/doc/users_guide_snippets/alternative_for_flying_passenger.txt000644 000765 000024 00000000310 12233035540 030562 0ustar00honglistaff000000 000000 NOTE: This option has no effect when you are using <>. Instead, you should configure this by passing the {option} command line option to the Flying Passenger daemon.passenger-4.0.37/doc/users_guide_snippets/analysis_and_system_maintenance.txt000644 000765 000024 00000023754 12233035540 030413 0ustar00honglistaff000000 000000 Phusion Passenger provides a set of tools, which are useful for system analysis, maintenance and troubleshooting. === Inspecting memory usage === Process inspection tools such as `ps` and `top` are useful, but they link:http://groups.google.com/group/phusion-passenger/msg/1fd1c233456d3180[rarely show the correct memory usage]. The real memory usage is usually lower than what `ps` and `top` report. There are many technical reasons why this is so, but an explanation is beyond the scope of this Users Guide. We kindly refer the interested reader to operating systems literature about 'virtual memory' and 'copy-on-write'. The tool `passenger-memory-stats` allows one to easily analyze Phusion Passenger's and the web server's real memory usage. For example: ------------------------------------------------------- [bash@localhost root]# passenger-memory-stats ------------- Apache processes --------------. PID PPID Threads VMSize Private Name ---------------------------------------------. 5947 1 9 90.6 MB 0.5 MB /usr/sbin/apache2 -k start 5948 5947 1 18.9 MB 0.7 MB /usr/sbin/fcgi-pm -k start 6029 5947 1 42.7 MB 0.5 MB /usr/sbin/apache2 -k start 6030 5947 1 42.7 MB 0.5 MB /usr/sbin/apache2 -k start 6031 5947 1 42.5 MB 0.3 MB /usr/sbin/apache2 -k start 6033 5947 1 42.5 MB 0.4 MB /usr/sbin/apache2 -k start 6034 5947 1 50.5 MB 0.4 MB /usr/sbin/apache2 -k start 23482 5947 1 82.6 MB 0.4 MB /usr/sbin/apache2 -k start ### Processes: 8 ### Total private dirty RSS: 3.50 MB ----------- Nginx processes ------------. PID PPID VMSize Resident Name ----------------------------------------. 51766 51764 82.7 MB 3.9 MB nginx: master process ./objs/nginx 51773 51766 82.9 MB 0.9 MB nginx: worker process --------- Passenger processes ---------. PID Threads VMSize Private Name ---------------------------------------. 6026 1 10.9 MB 4.7 MB Passenger spawn server 23481 1 26.7 MB 3.0 MB Passenger FrameworkSpawner: 2.0.2 23791 1 26.8 MB 2.9 MB Passenger ApplicationSpawner: /var/www/projects/app1-foobar 23793 1 26.9 MB 17.1 MB Rails: /var/www/projects/app1-foobar ### Processes: 4 ### Total private dirty RSS: 27.76 M ------------------------------------------------------- The 'Private' or 'private dirty RSS' field shows the *real* memory usage of processes. Here, we see that all the Apache and Nginx worker processes only take less than 1 MB memory each. This is a lot less than the 50-80 MB-ish memory usage as shown in the 'VMSize' column (which is what a lot of people think is the real memory usage, but is actually not). NOTE: Private dirty RSS reporting only works on Linux. Unfortunately other operating systems don't provide facilities for determining processes' private dirty RSS. On non-Linux systems, the Resident Set Size is reported instead. === Inspecting Phusion Passenger's internal status === One can inspect Phusion Passenger's internal status with the tool `passenger-status`. This tool must typically be run as root. For example: -------------------------------------------------- [bash@localhost root]# passenger-status ----------- General information ----------- max = 6 count = 1 active = 0 inactive = 1 ----------- Domains ----------- /var/www/projects/app1-foobar: PID: 9617 Sessions: 0 Processed: 7 Uptime: 2m 23s -------------------------------------------------- The 'general information' section shows the following information: max:: The maximum number of application instances that Phusion Passenger will spawn. This equals the value given for <> (Apache) or <> (Nginx). count:: The number of application instances that are currently alive. This value is always less than or equal to 'max'. active:: The number of application instances that are currently processing requests. This value is always less than or equal to 'count'. inactive:: The number of application instances that are currently *not* processing requests, i.e. are idle. Idle application instances will be shutdown after a while, as can be specified with <>/<> (unless this value is set to 0, in which case application instances are never shut down via idle time). The value of 'inactive' equals `count - active`. The 'domains' section shows, for each application directory, information about running application instances: Sessions:: Shows how many HTTP client are currently in the queue of that application Instance, waiting to be processed. Processed:: Indicates how many requests the instance has served until now. *Tip:* it's possible to limit this number with the <> configuration directive. Uptime:: Shows for how long the application instance has been running. Since Phusion Passenger uses fair load balancing by default, the number of sessions for the application instances should be fairly close to each other. For example, this is fairly normal: -------------------------------- PID: 4281 Sessions: 2 Processed: 7 Uptime: 5m 11s PID: 4268 Sessions: 0 Processed: 5 Uptime: 4m 52s PID: 4265 Sessions: 1 Processed: 6 Uptime: 5m 38s PID: 4275 Sessions: 1 Processed: 7 Uptime: 3m 14s -------------------------------- But if you see a "spike", i.e. an application instance has an unusually high number of sessions compared to the others, then there might be a problem: -------------------------------- PID: 4281 Sessions: 2 Processed: 7 Uptime: 5m 11s PID: 17468 Sessions: 8 <-+ Processed: 2 Uptime: 4m 47s PID: 4265 Sessions: 1 | Processed: 6 Uptime: 5m 38s PID: 4275 Sessions: 1 | Processed: 7 Uptime: 3m 14s | +---- "spike" -------------------------------- The most likely reason why a spike occurs is because your application is frozen, i.e. it has stopped responding. See <> for tips. [[debugging_frozen]] === Debugging frozen applications === If one of your application instances is frozen (stopped responding), then you can figure out where it is frozen by killing it with 'SIGABRT'. This will cause the application to raise an exception, with a backtrace. The exception (with full backtrace information) is normally logged into the web server error log. But if your application or if its web framework has its own exception logging routines, then exceptions might be logged into the application's log files instead. This is the case with Ruby on Rails. So if you kill a Ruby on Rails application with 'SIGABRT', please check the application's 'production.log' first (assuming that you're running it in a 'production' environment). If you don't see a backtrace there, check the web server error log. NOTE: It is safe to kill application instances, even in live environments. Phusion Passenger will restart killed application instances, as if nothing bad happened. === Accessing individual application processes === When a request is sent to the web server, Phusion Passenger will automatically forward the request to the most suitable application process, but sometimes it is desirable to be able to directly access the individual application processes. Use cases include, but are not limited to: * One wants to debug a memory leak or memory bloat problem that only seems to appear on certain URIs. One can send a request to a specific process to see whether that request causes the process's memory usage to rise. * The application caches data in local memory, and one wants to tell a specific application process to clear that local data. * Other debugging use cases. All individual application processes are accessible via HTTP, so you can use standard HTTP tools like 'curl'. The exact addresses can be obtained with the command `passenger-status --verbose`. These sockets are all bound to 127.0.0.1, but the port number is dynamically assigned. As a security measure, the sockets are also protected with a process-specific random password, which you can see in the `passenger-status --verbose` output. This password must be sent through the ``X-Passenger-Connect-Password'' HTTP header. Example: [listing] ...................................... bash# passenger-status --verbose ----------- General information ----------- max = 6 count = 2 active = 0 inactive = 2 Waiting on global queue: 0 ----------- Application groups ----------- /Users/hongli/Sites/rack.test: App root: /Users/hongli/Sites/rack.test * PID: 24235 Sessions: 0 Processed: 7 Uptime: 17s URL : http://127.0.0.1:58122 Password: nFfVOX1F8LjZ90HJh28Sd_htJOsgRsNne2QXKf8NIXw * PID: 24250 Sessions: 0 Processed: 4 Uptime: 1s URL : http://127.0.0.1:57933 Password: _RGXlQ9EGDGJKLevQ_qflUtF1KmxEo2UiRzMwIE1sBY ...................................... Here we see that the web application 'rack.test' has two processes. Process 24235 is accessible via http://127.0.0.1:58122, and process 24250 is accessible via http://127.0.0.1:57933. To access 24235 we must send its password, 'nFfVOX1F8LjZ90HJh28Sd_htJOsgRsNne2QXKf8NIXw', through the 'X-Passenger-Connect-Password' HTTP header, like this: ------------------------------------------- bash# curl -H "X-Passenger-Connect-Password: nFfVOX1F8LjZ90HJh28Sd_htJOsgRsNne2QXKf8NIXw" http://127.0.0.1:58122/ ------------------------------------------- === Attaching an IRB console to an application process === :version: 3.0.0 include::enterprise_only.txt[] You can attach an IRB console to any application process and inspect its state by executing arbitrary Ruby code. Do this by invoking `passenger-irb ` where '' is the PID of the application process you wish to inspect. Note that the IRB console is currently only available for Ruby apps, not for apps in any other languages. passenger-4.0.37/doc/users_guide_snippets/appendix_a_about.txt000644 000765 000024 00000000744 12233035540 025274 0ustar00honglistaff000000 000000 == Appendix A: About this document == The text of this document is licensed under the link:http://creativecommons.org/licenses/by-sa/3.0/[Creative Commons Attribution-Share Alike 3.0 Unported License]. image:images/by_sa.png[link="http://creativecommons.org/licenses/by-sa/3.0/"] Phusion Passenger is brought to you by link:http://www.phusion.nl/[Phusion]. image:images/phusion_banner.png[link="http://www.phusion.nl/"] Phusion Passenger is a trademark of Hongli Lai & Ninh Bui. passenger-4.0.37/doc/users_guide_snippets/appendix_b_terminology.txt000644 000765 000024 00000003544 12233035540 026534 0ustar00honglistaff000000 000000 == Appendix B: Terminology == [[application_root]] === Application root === The root directory of an application that's served by Phusion Passenger. In case of Ruby on Rails applications, this is the directory that contains 'Rakefile', 'app/', 'config/', 'public/', etc. In other words, the directory pointed to by `RAILS_ROOT`. For example, take the following directory structure: ----------------------------------------- /apps/foo/ <------ This is the Rails application's application root! | +- app/ | | | +- controllers/ | | | +- models/ | | | +- views/ | +- config/ | | | +- environment.rb | | | +- ... | +- public/ | | | +- ... | +- ... ----------------------------------------- In case of Rack applications, this is the directory that contains 'config.ru'. For example, take the following directory structure: ----------------------------------------- /apps/bar/ <----- This is the Rack application's application root! | +- public/ | | | +- ... | +- config.ru | +- ... ----------------------------------------- In case of Python (WSGI) applications, this is the directory that contains 'passenger_wsgi.py'. For example, take the following directory structure: ----------------------------------------- /apps/baz/ <----- This is the WSGI application's application root! | +- public/ | | | +- ... | +- passenger_wsgi.py | +- ... ----------------------------------------- [[idle_process]] === Idle process === An "idle process" refers to a process that hasn't processed any requests for a while. [[inactive_process]] === Inactive process === An "inactive process" refers to a process that's current not processing any requests. An idle process is always inactive, but an inactive process is not always considered idle. passenger-4.0.37/doc/users_guide_snippets/appendix_c_spawning_methods.txt000644 000765 000024 00000031470 12233035540 027535 0ustar00honglistaff000000 000000 [[spawning_methods_explained]] == Appendix C: Spawning methods explained == At its core, Phusion Passenger is an HTTP proxy and process manager. It spawns Ruby on Rails/Rack/WSGI worker processes (which may also be referred to as 'backend processes'), and forwards incoming HTTP request to one of the worker processes. While this may sound simple, there's not just one way to spawn worker processes. Let's go over the different spawning methods. For simplicity's sake, let's assume that we're only talking about Ruby on Rails applications. === The most straightforward and traditional way: direct spawning === Phusion Passenger could create a new Ruby process, which will then load the Rails application along with the entire Rails framework. This process will then enter an request handling main loop. This is the most straightforward way to spawn worker processes. If you're familiar with the Mongrel application server, then this approach is exactly what mongrel_cluster performs: it creates N worker processes, each which loads a full copy of the Rails application and the Rails framework in memory. The Thin application server employs pretty much the same approach. Note that Phusion Passenger's version of direct spawning differs slightly from mongrel_cluster. Mongrel_cluster creates entirely new Ruby processes. In programmers jargon, mongrel_cluster creates new Ruby processes by forking the current process and exec()-ing a new Ruby interpreter. Phusion Passenger on the other hand creates processes that reuse the already loaded Ruby interpreter. In programmers jargon, Phusion Passenger calls fork(), but not exec(). === The smart spawning method === NOTE: Smart spawning is supported for all Ruby applications but not for WSGI applications. While direct spawning works well, it's not as efficient as it could be because each worker process has its own private copy of the Rails application as well as the Rails framework. This wastes memory as well as startup time. image:images/direct_spawning.png[Worker processes and direct spawning] + 'Figure: Worker processes and direct spawning. Each worker process has its own private copy of the application code and Rails framework code.' It is possible to make the different worker processes share the memory occupied by application and Rails framework code, by utilizing so-called copy-on-write semantics of the virtual memory system on modern operating systems. As a side effect, the startup time is also reduced. This is technique is exploited by Phusion Passenger's 'smart' spawn method. ==== How it works ==== When the 'smart' spawn method is being used, Phusion Passenger will first create a so-called 'ApplicationSpawner server' process. This process loads the entire Rails application along with the Rails framework, by loading 'environment.rb'. Then, whenever Phusion Passenger needs a new worker process, it will instruct the ApplicationSpawner server to do so. The ApplicationSpawner server will create a worker new process that reuses the already loaded Rails application/framework. Creating a worker process through an already running ApplicationSpawner server is very fast, about 10 times faster than loading the Rails application/framework from scratch. If the Ruby interpreter is copy-on-write friendly (that is, if you're running <>) then all created worker processes will share as much common memory as possible. That is, they will all share the same application and Rails framework code. image:images/smart.png[] + 'Figure: Worker processes and the smart spawn method. All worker processes, as well as the ApplicationSpawner, share the same application code and Rails framework code.' The 'smart' method allows different worker processes that belong to the same application to share memory. Notes: - Vendored Rails frameworks cannot be shared by different applications, even if both vendored Rails frameworks are the same version. So for efficiency reasons we don't recommend vendoring Rails. - ApplicationSpawner servers have an idle timeout just like worker processes. If an ApplicationSpawner/FrameworkSpawner server hasn't been instructed to do anything for a while, it will be shutdown in order to conserve memory. This idle timeout is configurable. ==== Summary of benefits ==== Suppose that Phusion Passenger needs a new worker process for an application that uses Rails 2.2.1. If the 'smart' spawning method is used, and an ApplicationSpawner server for this application is already running, then worker process creation time is about 10 times faster than direct spawning. This worker process will also share application and Rails framework code memory with the ApplicationSpawner server and the worker processes that had been spawned by this ApplicationSpawner server. In practice, the smart spawning method could mean a memory saving of about 33%, assuming that your Ruby interpreter is <>. Of course, smart spawning is not without gotchas. But if you understand the gotchas you can easily reap the benefits of smart spawning. === Smart spawning gotcha #1: unintentional file descriptor sharing === Because worker processes are created by forking from an ApplicationSpawner server, it will share all file descriptors that are opened by the ApplicationSpawner server. (This is part of the semantics of the Unix 'fork()' system call. You might want to Google it if you're not familiar with it.) A file descriptor is a handle which can be an opened file, an opened socket connection, a pipe, etc. If different worker processes write to such a file descriptor at the same time, then their write calls will be interleaved, which may potentially cause problems. The problem commonly involves socket connections that are unintentionally being shared. You can fix it by closing and reestablishing the connection when Phusion Passenger is creating a new worker process. Phusion Passenger provides the API call `PhusionPassenger.on_event(:starting_worker_process)` to do so. So you could insert the following code in your 'environment.rb': [source, ruby] ----------------------------------------- if defined?(PhusionPassenger) PhusionPassenger.on_event(:starting_worker_process) do |forked| if forked # We're in smart spawning mode. ... code to reestablish socket connections here ... else # We're in direct spawning mode. We don't need to do anything. end end end ----------------------------------------- Note that Phusion Passenger automatically reestablishes the connection to the database upon creating a new worker process, which is why you normally do not encounter any database issues when using smart spawning mode. ==== Example 1: Memcached connection sharing (harmful) ==== Suppose we have a Rails application that connects to a Memcached server in 'environment.rb'. This causes the ApplicationSpawner to have a socket connection (file descriptor) to the Memcached server, as shown in the following figure: +--------------------+ | ApplicationSpawner |-----------[Memcached server] +--------------------+ Phusion Passenger then proceeds with creating a new Rails worker process, which is to process incoming HTTP requests. The result will look like this: +--------------------+ | ApplicationSpawner |------+----[Memcached server] +--------------------+ | | +--------------------+ | | Worker process 1 |-----/ +--------------------+ Since a 'fork()' makes a (virtual) complete copy of a process, all its file descriptors will be copied as well. What we see here is that ApplicationSpawner and Worker process 1 both share the same connection to Memcached. Now supposed that your site gets Slashdotted and Phusion Passenger needs to spawn another worker process. It does so by forking ApplicationSpawner. The result is now as follows: +--------------------+ | ApplicationSpawner |------+----[Memcached server] +--------------------+ | | +--------------------+ | | Worker process 1 |-----/| +--------------------+ | | +--------------------+ | | Worker process 2 |-----/ +--------------------+ As you can see, Worker process 1 and Worker process 2 have the same Memcached connection. Suppose that users Joe and Jane visit your website at the same time. Joe's request is handled by Worker process 1, and Jane's request is handled by Worker process 2. Both worker processes want to fetch something from Memcached. Suppose that in order to do that, both handlers need to send a "FETCH" command to Memcached. But suppose that, after worker process 1 having only sent "FE", a context switch occurs, and worker process 2 starts sending a "FETCH" command to Memcached as well. If worker process 2 succeeds in sending only one bye, 'F', then Memcached will receive a command which begins with "FEF", a command that it does not recognize. In other words: the data from both handlers get interleaved. And thus Memcached is forced to handle this as an error. This problem can be solved by reestablishing the connection to Memcached after forking: +--------------------+ | ApplicationSpawner |------+----[Memcached server] +--------------------+ | | | | +--------------------+ | | | Worker process 1 |-----/| | +--------------------+ | | <--- created this X | new | connection X <-- closed this | +--------------------+ | old | | Worker process 2 |-----/ connection | +--------------------+ | | | +-------------------------------------+ Worker process 2 now has its own, separate communication channel with Memcached. The code in 'environment.rb' looks like this: [source, ruby] ----------------------------------------- if defined?(PhusionPassenger) PhusionPassenger.on_event(:starting_worker_process) do |forked| if forked # We're in smart spawning mode. reestablish_connection_to_memcached else # We're in direct spawning mode. We don't need to do anything. end end end ----------------------------------------- ==== Example 2: Log file sharing (not harmful) ==== There are also cases in which unintentional file descriptor sharing is not harmful. One such case is log file file descriptor sharing. Even if two processes write to the log file at the same time, the worst thing that can happen is that the data in the log file is interleaved. To guarantee that the data written to the log file is never interleaved, you must synchronize write access via an inter-process synchronization mechanism, such as file locks. Reopening the log file, like you would have done in the Memcached example, doesn't help. === Smart spawning gotcha #2: the need to revive threads === Another part of the 'fork()' system call's semantics is the fact that threads disappear after a fork call. So if you've created any threads in environment.rb, then those threads will no longer be running in newly created worker process. You need to revive them when a new worker process is created. Use the `:starting_worker_process` event that Phusion Passenger provides, like this: [source, ruby] ----------------------------------------- if defined?(PhusionPassenger) PhusionPassenger.on_event(:starting_worker_process) do |forked| if forked # We're in smart spawning mode. ... code to revive threads here ... else # We're in direct spawning mode. We don't need to do anything. end end end ----------------------------------------- === Smart spawning gotcha #3: code load order === This gotcha is only applicable to the 'smart' spawn method, not the 'smart-lv2' spawn method. If your application expects the Rails framework to be not loaded during the beginning of 'environment.rb', then it can cause problems when an ApplicationSpawner is created from a FrameworkSpawner, which already has the Rails framework loaded. The most common case is when applications try to patch Rails by dropping a modified file that has the same name as Rails's own file, in a path that comes earlier in the Ruby search path. For example, suppose that we have an application which has a patched version of 'active_record/base.rb' located in 'RAILS_ROOT/lib/patches', and 'RAILS_ROOT/lib/patches' comes first in the Ruby load path. When conservative spawning is used, the patched version of 'base.rb' is properly loaded. When 'smart' (not 'smart-lv2') spawning is used, the original 'base.rb' is used because it was already loaded, so a subsequent `require "active_record/base"` has no effect. passenger-4.0.37/doc/users_guide_snippets/deployment_basics.txt000644 000765 000024 00000001745 12233035540 025500 0ustar00honglistaff000000 000000 == Deploying a web application: the basics === Anatomy of a web application ==== Ruby ==== Python ===== Django For Django >= 1.4, `passenger_wsgi.py` should contain the following. Replace "mysite" with your application's actual module name. -------------------------------------------------------------------- from mysite.wsgi import application -------------------------------------------------------------------- For earlier Django versions, it should contain: -------------------------------------------------------------------- import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings") from django.core.wsgi import get_wsgi_application application = get_wsgi_application() -------------------------------------------------------------------- ==== Node.js === Attaching to a virtual host's root URI === Attaching to a sub-URI ==== How to fix broken images/CSS/JavaScript URIs in sub-URI deployments === Restarting the web application === Inspecting the status passenger-4.0.37/doc/users_guide_snippets/enterprise_only.txt000644 000765 000024 00000000364 12233035540 025211 0ustar00honglistaff000000 000000 **This feature is only available in link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise]. It was introduced in version {version}. link:https://www.phusionpassenger.com/download[Buy Phusion Passenger Enterprise here.]**passenger-4.0.37/doc/users_guide_snippets/environment_variables.txt000644 000765 000024 00000034562 12233035540 026373 0ustar00honglistaff000000 000000 The Phusion Passenger compilation process can be customized with environment variables. Environment variables are named values that affect how the system works. For example they tell the system where to look for commands (the `PATH` variable) or where to look for libraries (`LD_LIBRARY_PATH`). Their names are often in all-uppercase. Sometimes people refer to an environment variable with a dollar sign `$` in front, but that's the same thing: when people say "the $PATH environment variable" they mean "the PATH environment variable". This is because the dollar sign `$` is a shell syntax for refering to an environment variable, as you will learn later. Environment variables are set on a **per-process** basis, but they are **inherited** by child processes. This means that if you set environment variables in process A, another already running process B will not see these new environment variables. But if A spawns a child process C, then C will have all environment variables that A had. If you once again change the environment variables in A, then C will not see the changes. The per-process nature of environment variables some implications. When you set environment variables in your `bashrc` or other bash startup files... * ...only newly spawned bash shells see them. * ...the web server usually does not see them, because the web server tends to be started from init scripts, not from bash. * ...cron jobs do not see them, because cron jobs' environment variables are entirely dictated by their crontabs. NOTE: Because this chapter is meant for beginners, it assumes that the reader uses the bash shell. This chapter does not describe instructions for zsh, csh or other shells. We assume that users of other shells are familiar with the Bourne shell syntax, and know how to apply the instructions in this chapter in their shells' native syntaxes. === Working with environment variables You can see all environment variables in your shell by running the following command: [source,sh] --------------------------------- env --------------------------------- You can set an evironment variable with the syntax `export =`. For example, to set the `APXS2` variable to the value `/usr/sbin/apxs2`: [source,sh] --------------------------------- export APXS2=/usr/sbin/apxs2 --------------------------------- Any process that you run from your shell from that point on will have said environment variable: [source,sh] --------------------------------- export APXS2=/usr/sbin/apxs2 ruby -e 'p ENV["APXS2"]' # => "/usr/sbin/apxs2" --------------------------------- .The "export" keyword is important [NOTE] =================================================== You **must** set the `export` keyword. If you omit the `export` keyword then the environment variable will not be visible to other processes: [source,sh] --------------------------------- APXS2=/usr/sbin/apxs2 ruby -e 'p ENV["APXS2"]' # => nil --------------------------------- =================================================== You can reference an environment variable in your shell by typing the `$` sign followed by the environment variable's name. For example, to see the value of the `PATH` variable: [source,sh] --------------------------------- echo $PATH --------------------------------- You can also use this trick to extend the value of an environment variable: [source,sh] --------------------------------- export PATH=/usr/bin # Prepends '/opt/local/bin', so that it becomes /opt/local/bin:/usr/bin export PATH=/opt/local/bin:$PATH # Appends '/usr/local/bin', so that it becomes /opt/local/bin:/usr/bin:/usr/local/bin export PATH=$PATH:/usr/local/bin --------------------------------- === The PATH environment variable The `PATH` environment variable dictates where the system looks for command. It is a colon-separated list of directories. If you get a "command not found" error while you know that the command is installed, then setting `PATH` will help. For example suppose that the command `frobnicator` is in `/opt/local/bin`: [source,sh] ---------------------- user@localhost bash$ frobnicator bash: frobnicator: command not found ---------------------- We verify that `/opt/local/bin` is not in `PATH`: [source,sh] ---------------------- user@localhost bash$ echo $PATH /bin:/usr/bin:/usr/local/bin ---------------------- We can run `frobnicator` through it's full path... [source,sh] ---------------------- user@localhost bash$ /opt/local/bin/frobnicator # => success! ---------------------- ...or we can add `/opt/local/bin` to `PATH`. [source,sh] ---------------------- user@localhost bash$ export PATH=$PATH:/opt/local/bin user@localhost bash$ frobnicator # => success! ---------------------- ==== Adding Phusion Passenger's administration tools to PATH If you get a "command not found" error when invoking one of the Phusion Passenger administration tools (e.g. `passenger-status` or `passenger-memory-stats` then that means the tools are not in `PATH`, so you need to add them. * If you <>, then the tools are in your RubyGems executable path. You can view the gem path using the command `gem env`: + ------------------------------ $ gem env RubyGems Environment: - RUBYGEMS VERSION: 1.8.15 - RUBY VERSION: 1.8.7 (2011-12-28 patchlevel 357) [i686-darwin10.8.0] - INSTALLATION DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8 - RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby - EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.01/bin <--------- !! - RUBYGEMS PLATFORMS: - ruby - x86-darwin-10 - GEM PATHS: - /opt/ruby-enterprise-1.8.7-2010.01/lib/ruby/gems/1.8 - /Users/hongli/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - "gem" => "--no-ri --no-rdoc" - REMOTE SOURCES: - http://rubygems.org/ ------------------------------ + As you can see, the RubyGems executable path in the example happens to be `/opt/ruby-enterprise-1.8.7-2010.01/bin`. So that directory must be added to `PATH`. * If you <>, then the tools are in the `bin` subdirectory of the Phusion Passenger tarball directory that you extracted. For example, if you extracted `passenger-4.9.0.tar.gz` inside `/opt`, then the tools are located in `/opt/passenger-4.0.9/bin`. In that case, you need to add `/opt/passenger-4.0.9/bin` to your `PATH`. * If you installed Phusion Passenger using native OS packages, then some Phusion Passenger administration tools are in `/usr/bin`, while others are in `/usr/sbin`. If you are not logged in as root, then `/usr/sbin` may not be in `PATH`, which would explain why you get a "command not found" when trying to invoke some of the tools. You should `/usr/sbin` to `PATH`. * If you are unsure where your Phusion Passenger directory is then you can use the `find` command to look them up. Go to the root directory and invoke `find` with `sudo`: + -------------------------------- $ cd / $ sudo find . -name passenger-status /usr/local/passenger/bin/passenger-status -------------------------------- + In this example, the administration tools happen to be in `/usr/local/passenger/bin`, so you must add that to `PATH`. NOTE: You may still get a "command not found" when invoking the tools through sudo, even after you've added the relevant directory to `PATH`. Please read <> to learn more. === Making environment variables permanent When you exit your shell, the evironment variable changes are lost. There is no standard method to set environment variables system-wide, so you have to set them in different configuration files for different services. ==== bash To make environment variables permanent for future bash sessions **for the current user**, add them to your `~/.bashrc`: [source,sh] --------------------------------- echo 'export FOO=bar' >> ~/.bashrc echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc --------------------------------- To make them permanent for future bash sessions **for all users**, add them to `/etc/bashrc`. NOTE: Depending on the system, the bashrc file may have a different filename. On Debian and Ubuntu, it's `/etc/bash.bashrc`. ==== Apache NOTE: This subsection describes how to set environment variables on Apache itself, not on apps served through Phusion Passenger for Apache. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also <>. On Debian and Ubuntu, with an Apache installed through apt, Apache environment variables are defined in the file `/etc/apache2/envvars`. This is a shell script so environment variables must be specified with the shell syntax. On Red Hat, Fedora, CentOS and ScientificLinux, with an Apache installed through YUM, Apache environment variables are defined in `/etc/sysconfig/httpd`. On OS X they are defined in `/System/Library/LaunchDaemons/org.apache.httpd.plist`, as explained link:/System/Library/LaunchDaemons/org.apache.httpd.plist[here on Stack Overflow]. On other systems, or if you did not install Apache through the system's package manager, the configuration file for environment variables is specific to the vendor that supplied Apache. There may not even be such a configuration file. You should contact the vendor for support. ==== Nginx NOTE: This subsection describes how to set environment variables on Nginx itself, not on apps served through Phusion Passenger for Nginx. The environment variables you set here will be passed to all apps, but you cannot customize them on a per-app basis. See also <>. If you installed Nginx through <>, then you can define environment variables in `/etc/default/nginx`. This is a shell script so you must use the `export FOO=bar` syntax. Otherwise, environment variables are best set through the script which starts Nginx. For example, if you installed Nginx from source and you used ifdef::apache[] the Nginx init script described in the link:http://www.modrails.com/documentation/Users%20guide%20Nginx.html[Phusion Passenger Users Guide, Nginx version], endif::apache[] ifdef::nginx[] <>, endif::nginx[] then you should edit that script to define the environment variables. Those init scripts are regular shell scripts, so use the `export FOO=bar` syntax. Just make sure your set your environment variables before the script starts Nginx. NOTE: Setting environment variables on Nginx has no effect on the <> because the daemon is started seperately. You should set the environment variables in the shell right before starting the daemon. ==== cron To make environment variables permanent for cron jobs, add those variables to the relevant crontab. But note that inside crontabs you cannot refer to existing environment variables with the `$` syntax because crontabs are not shell scripts. You have to specify the entire value. .What to put in "crontab -e" ------------------------- # Environment variable definitions FOO=bar APXS2=/usr/sbin/apxs2 # **WRONG!** You cannot refer to existing variables with the `$` syntax! PATH=/usr/bin:$PATH # **WRONG!** You cannot use the 'export' keyword! export PATH=/usr/bin:/usr/local/bin # Correct: PATH=/usr/bin:/usr/local/bin # Jobs: # m h dom mon dow command * * * * * frobnicator ------------------------- [[env_vars_passenger_apps]] ==== Phusion Passenger-served apps You can pass environment variables to Phusion Passenger-served apps through various methods: * When running Apache, use the `PassEnv` and `SetEnv` directives of link:http://httpd.apache.org/docs/2.4/mod/mod_env.html[mod_env]. This is supported starting from Phusion Passenger 4.0. * When running Nginx, use the <> directive. * Through your `bashrc`. Starting from version 4.0, Phusion Passenger 4.0 spawns applications through bash and inherit all bash environment variables. Phusion Passenger Standalone tends to be started from the shell and thus inherits all environment variables set by the shell. * Through Apache and Nginx, as described earlier in this chapter. Any environment variables that you set on Apache and Nginx itself are inherited by Phusion Passenger, and thus by Phusion Passenger-served apps as well. * Through the application itself. Most programming languages provide APIs for setting environment variables. For example in Ruby you can write: + [source,ruby] ------------------- ENV['FOO'] = 'bar' ------------------- + In Python you can write: + [source,python] ------------------- import os os.environ['FOO'] = 'bar' ------------------- [[env_vars_and_sudo]] === Environment variables and sudo NOTE: RVM users should always use the `rvmsudo` command instead of `sudo`. However all information in this section apply to `rvmsudo` as well. The `sudo` command resets all environment variables before running the specified command, for security reasons. So if you set environment variables before running `sudo passenger-install-xxx-module`, `sudo passenger-status` or any other commands, then the environment variables are not correctly passed to the command. You can solve this by running sudo with `-E` (preserve environment variables): [source,sh] ------------------------- user@localhost bash$ export APXS2=/usr/sbin/apxs2 user@localhost bash$ sudo -E passenger-install-apache2-module ------------------------- Alternatively, you can obtain a root prompt with sudo first, and *then* set the environment variables, before running any further commands: ------------------------- user@localhost bash$ sudo -s Password: ... root@localhost bash# export APXS2=/usr/sbin/apxs2 root@localhost bash# passenger-install-apache2-module ------------------------- Note that for security reasons, `sudo` **always resets the `PATH` environment variable**, even if you pass `-E`! You can get around this problem by obtaining a root prompt first, and then set the environment variables: ------------------------- user@localhost bash$ sudo -s Password: ... root@localhost bash# export PATH=$PATH:/opt/myruby/bin root@localhost bash# passenger-install-apache2-module ------------------------- passenger-4.0.37/doc/users_guide_snippets/global_queueing_explained.txt000644 000765 000024 00000006622 12233035540 027166 0ustar00honglistaff000000 000000 .What does this option do? Recall that Phusion Passenger spawns multiple backend processes (e.g. multiple Ruby on Rails processes), each which processes HTTP requests serially. One of Phusion Passenger's jobs is to forward HTTP requests to a suitable backend process. A backend process may take an arbitrary amount of time to process a specific HTTP request. If the websites are (temporarily) under high load, and the backend processes cannot process the requests fast enough, then some requests may have to be queued. If global queuing is turned off, then Phusion Passenger will use 'fair load balancing'. This means that each backend process will have its own private queue. Phusion Passenger will forward an HTTP request to the backend process that has the least amount of requests in its queue. If global queuing is turned on, then Phusion Passenger will use a global queue that's shared between all backend processes. If an HTTP request comes in, and all the backend processes are still busy, then Phusion Passenger will wait until at least one backend process is done, and will then forward the request to that process. .When to turn on global queuing? You should turn on global queuing if one of your web applications may have long-running requests. For example suppose that: - global queuing is turned off. - we're currently in a state where all backend processes have 3 requests in their queue, except for a single backend process, which has 1 request in its queue. The situation looks like this: -------------------------------------------------- Backend process A: [* ] (1 request in queue) Backend process B: [*** ] (3 requests in queue) Backend process C: [*** ] (3 requests in queue) Backend process D: [*** ] (3 requests in queue) -------------------------------------------------- Each process is currently serving short-running requests. Phusion Passenger will forward the next request to backend process A. A will now have 2 items in its queue. We'll mark this new request with an X: -------------------------------------------------- Backend process A: [*X ] (2 request in queue) Backend process B: [*** ] (3 requests in queue) Backend process C: [*** ] (3 requests in queue) Backend process D: [*** ] (3 requests in queue) -------------------------------------------------- Assuming that B, C and D still aren't done with their current request, the next HTTP request - let's call this Y - will be forwarded to backend process A as well, because it has the least number of items in its queue: -------------------------------------------------- Backend process A: [*XY ] (3 requests in queue) Backend process B: [*** ] (3 requests in queue) Backend process C: [*** ] (3 requests in queue) Backend process D: [*** ] (3 requests in queue) -------------------------------------------------- But if request X happens to be a long-running request that needs 60 seconds to complete, then we'll have a problem. Y won't be processed for at least 60 seconds. It would have been a better idea if Y was forward to processes B, C or D instead, because they only have short-living requests in their queues. This problem will be avoided entirely if you turn global queuing on. With global queuing, all backend processes will share the same queue. The first backend process that becomes available will take from the queue, and so this ``queuing-behind-long-running-request'' problem will never occur.passenger-4.0.37/doc/users_guide_snippets/installation/000755 000765 000024 00000000000 12233035540 023725 5ustar00honglistaff000000 000000 passenger-4.0.37/doc/users_guide_snippets/installation.txt000644 000765 000024 00000132471 12233035540 024476 0ustar00honglistaff000000 000000 === Synopsis Because Phusion Passenger is designed to run in a wide variety of operating systems and configurations, there are multiple ways to install it. Most users -- especially first-time users -- will prefer _OS-specific installation instructions_. These are not only the easiest, but also allow Phusion Passenger to integrate into the operating system in the best way possible. Other users should consult the _generic installation instructions_. The steps for upgrading or downgrading Phusion Passenger is almost the same as the steps for installing. All the installation guides in this section will also teach you how to upgrade and downgrade. [[install_osx_homebrew]] === Installing or upgrading on Mac OS X with Homebrew **Open source**:: Every time we release a new Phusion Passenger version, we make it available through link:http://brew.sh/[Homebrew]. Please note that the Homebrew maintainers have to merge our pull requests manually, so it may take a day or two before a new version shows up in the official Homebrew repository. + 1. Update the Homebrew recipes: + --------------------------- brew update --------------------------- 2. Run one of the following, and follow the instructions: + ifdef::nginx[] --------------------------- brew install passenger nginx --with-passenger -OR- brew upgrade passenger nginx --with-passenger --------------------------- + .Upgrade note [NOTE] ======================================= If Phusion Passenger has been updated, but no new Nginx version has been released, then you must also reinstall Nginx against the latest version of Phusion Passenger: --------------------------- brew reinstall nginx --with-passenger --------------------------- ======================================= endif::[] ifdef::apache[] --------------------------- brew install passenger -OR- brew upgrade passenger --------------------------- endif::[] ifdef::standalone[] --------------------------- brew install passenger -OR- brew upgrade passenger --------------------------- endif::[] **Enterprise**:: link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] is currently not available through Homebrew. Please try one of the other installation methods instead. [[install_on_debian_ubuntu]] === Installing or upgrading on Debian or Ubuntu We provide and official Phusion Passenger APT repository. This APT repository contains Phusion Passenger packages for multiple versions of Debian and Ubuntu. These packages are automatically built by our build server after we push out a source release, and thus are always up to date with the official source releases. If you use these packages to install Phusion Passenger then you do not need to run `passenger-install-apache2-module` or `passenger-install-nginx-module`. These packages contain all the binaries that you need. Packages are available for the x86 and x86_64 architectures. Our policy is to support all Ubuntu LTS releases that are still supported by Canonical, plus the latest non-LTS Ubuntu release, plus all Debian releases that are still supported by Debian. [[install_add_apt_repo]] ==== Adding our APT repository 1. Install our PGP key. Packages are signed by "Phusion Automated Software Signing (auto-software-signing@phusion.nl)", fingerprint 1637 8A33 A6EF 1676 2922 526E 561F 9B9C AC40 B2F7. + -------------------------------------------------------------- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 561F9B9CAC40B2F7 -------------------------------------------------------------- 2. Add HTTPS support for APT. Our APT repository is stored on an HTTPS server. + -------------------------------------------------------------- sudo apt-get install apt-transport-https ca-certificates -------------------------------------------------------------- 3. Create a file `/etc/apt/sources.list.d/passenger.list` and insert **one of** the following lines, depending on your distribution. + **Open source**::: + [source,sh] -------------------------------------------------------------- ##### !!!! Only add ONE of these lines, not all of them !!!! ##### # Ubuntu 13.10 deb https://oss-binaries.phusionpassenger.com/apt/passenger saucy main # Ubuntu 12.04 deb https://oss-binaries.phusionpassenger.com/apt/passenger precise main # Ubuntu 10.04 deb https://oss-binaries.phusionpassenger.com/apt/passenger lucid main # Debian 7 deb https://oss-binaries.phusionpassenger.com/apt/passenger wheezy main # Debian 6 deb https://oss-binaries.phusionpassenger.com/apt/passenger squeeze main -------------------------------------------------------------- + **Enterprise**::: + [source,sh] -------------------------------------------------------------- ##### !!!! Only add ONE of these lines, not all of them !!!! ##### # Ubuntu 13.10 deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt saucy main # Ubuntu 12.04 deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt precise main # Ubuntu 10.04 deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt lucid main # Debian 7 deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt wheezy main # Debian 6 deb https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_apt squeeze main -------------------------------------------------------------- + You can find the correct value for 'YOUR_DOWNLOAD_TOKEN' in the link:https://www.phusionpassenger.com/orders[Customer Area]. 4. Secure `passenger.list` and update your APT cache: + -------------------------------------------------------------- sudo chown root: /etc/apt/sources.list.d/passenger.list sudo chmod 600 /etc/apt/sources.list.d/passenger.list sudo apt-get update -------------------------------------------------------------- ==== Installing packages ifdef::nginx[] NOTE: You should install `nginx-extras` even if you have already installed an Nginx package from the official Debian/Ubuntu repository. This is because the Nginx binary that our packages supply is compiled with the Passenger module. endif::nginx[] **Open source**:: + 1. <> ifdef::nginx[] 2. Install the packages: + -------------------------------------------------------------- sudo apt-get install nginx-extras passenger -------------------------------------------------------------- + 3. Edit `/etc/nginx/nginx.conf` and uncomment `passenger_root` and `passenger_ruby`. 4. Restart Nginx: + -------------------------------------------------------------- sudo service nginx restart -------------------------------------------------------------- endif::[] ifdef::apache[] 2. Install the package: + -------------------------------------------------------------- sudo apt-get install libapache2-mod-passenger -------------------------------------------------------------- endif::[] ifdef::standalone[] 2. Install the package: + -------------------------------------------------------------- sudo apt-get install passenger -------------------------------------------------------------- endif::[] **Enterprise**:: + 1. Download your license key from the link:https://www.phusionpassenger.com/orders[Customer Area] and save it as `/etc/passenger-enterprise-license`. 2. <> 3. Install the packages: + ifdef::nginx[] -------------------------------------------------------------- sudo apt-get install nginx-extras passenger-enterprise -------------------------------------------------------------- 4. Edit `/etc/nginx/nginx.conf` and uncomment `passenger_root` and `passenger_ruby`. 5. Restart Nginx: + -------------------------------------------------------------- sudo service nginx restart -------------------------------------------------------------- endif::[] ifdef::apache[] -------------------------------------------------------------- sudo apt-get install libapache2-mod-passenger-enterprise -------------------------------------------------------------- endif::[] ifdef::standalone[] -------------------------------------------------------------- sudo apt-get install passenger-enterprise -------------------------------------------------------------- endif::[] === Installing or upgrading on Red Hat, Fedora, CentOS or ScientificLinux WARNING: The RPMs are currently unmaintained. As such, the repository only contains Phusion Passenger 3.x (the latest version is 4.x), which did not support Node.js, Meteor, multiple Rubies, etc. For more recent versions of Phusion Passenger, you are suggested to install from gem or tarball instead. YUM repositories with RPMs are maintained by link:https://github.com/erikogan/passenger[Erik Ogan] and link:http://stealthymonkeys.com/[Stealthy Monkeys Consulting]. Only packages for the open source version of Phusion Passenger are provided. link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] customers should use the <> or <> instead. If you use YUM to install Phusion Passenger then you do not need to run `passenger-install-apache2-module` or `passenger-install-nginx-module`. The YUM packages contain all the binaries that you need. You also don't need to modify any Apache or Nginx configuration to get them to load Phusion Passenger, the packages provide configuration snippets for you as well. [float] ==== Step 1: Import the Stealthy Monkeys Consulting's GPG key --------------------------------------------- rpm --import http://passenger.stealthymonkeys.com/RPM-GPG-KEY-stealthymonkeys.asc --------------------------------------------- [float] ==== Step 2: Install the release package Install the passenger-release package from the link:http://passenger.stealthymonkeys.com/[main repository]. Fedora Core 17: --------------------------------------------- yum install http://passenger.stealthymonkeys.com/fedora/17/passenger-release.noarch.rpm --------------------------------------------- Fedora Core 16: --------------------------------------------- yum install http://passenger.stealthymonkeys.com/fedora/16/passenger-release.noarch.rpm --------------------------------------------- Fedora Core 15: --------------------------------------------- yum install http://passenger.stealthymonkeys.com/fedora/15/passenger-release.noarch.rpm --------------------------------------------- Fedora Core 14: --------------------------------------------- yum install http://passenger.stealthymonkeys.com/fedora/14/passenger-release.noarch.rpm --------------------------------------------- RHEL 6 / CentOS 6 / ScientificLinux 6: (Note: these packages depend on link:http://fedoraproject.org/wiki/EPEL[EPEL].) --------------------------------------------- yum install http://passenger.stealthymonkeys.com/rhel/6/passenger-release.noarch.rpm --------------------------------------------- RHEL 5 / CentOS 5 / ScientificLinux 5: (Note: these packages depend on link:http://fedoraproject.org/wiki/EPEL[EPEL].) --------------------------------------------- rpm -Uvh http://passenger.stealthymonkeys.com/rhel/5/passenger-release.noarch.rpm --------------------------------------------- [float] ==== Step 3: Install the right Phusion Passenger package From there you can use link:http://prefetch.net/articles/yum.html[YUM] to install packages. For example, try one of these: Phusion Passenger for Apache: --------------------------------------------- yum install mod_passenger --------------------------------------------- Phusion Passenger for Nginx: --------------------------------------------- yum install nginx-passenger --------------------------------------------- Phusion Passenger Standalone: --------------------------------------------- yum install passenger-standalone --------------------------------------------- [float] ==== Building your own packages There are instructions for building your own packages and Yum repositories in the link:https://github.com/phusion/passenger/tree/master/rpm#readme[rpm directory ReadMe] within the link:https://github.com/phusion/passenger[GitHub repository]. [[rubygems_generic_install]] === Generic installation, upgrade and downgrade method: via RubyGems RubyGems is only used as a method to obtain the Phusion Passenger files, so in case you have multiple Ruby versions it does not matter which Ruby's RubyGems you use for installation. Once installed, Phusion Passenger can work with all other Ruby versions on your system. This is explained in <>. [[is_ruby_home_or_system_wide_installed]] [float] ==== Step 1: figuring out whether your Ruby is installed in the home directory or system-wide Ruby may either be installed in the home directory, or system-wide. If it's installed system-wide then we will want to install gems system-wide as well, so you need to switch to a root prompt first. If Ruby is installed in the home directory then we will want to install gems to the home directory as well, as a normal user. To find out which case applies, run the following command to find out where the `ruby` command is: -------------- which ruby -------------- Do you see a filename that references '/home' or '/Users'? If so then your Ruby interpreter is installed in your home directory and you can proceed to step 2. Otherwise, you need to switch to a root prompt by running one of the following commands: * Are you using RVM? Run `rvmsudo -s` * Are you not using RVM, or do you not know what RVM is? Run `sudo -s` * Is 'sudo' not installed on your system? Run `su -c bash` You must maintain this root prompt throughout this installation guide. [float] ==== Step 2: install the gem **Open Source**:: Install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger: + ---------------------- gem install passenger ---------------------- + .Previous versions and beta versions ******************************************************** Sometimes you will want to obtain the latest beta version of Phusion Passenger. Beta versions are not normally selected by `gem install`, so to opt-in for beta versions you have to add the `--pre` argument: ----------------------------------- gem install passenger --pre ----------------------------------- If you want to obtain a specific version of Phusion Passenger, e.g. because you are downgrading, then specify the version number with `--version`: ----------------------------------- gem install passenger --version 3.0.0 ----------------------------------- If you want to obtain a specific *beta* version of Phusion Passenger then you must also pass `--pre`: ---------------------------------------------------- gem install passenger --version 3.9.1.beta --pre ---------------------------------------------------- ******************************************************** **Enterprise**:: First, download the *license key* from the link:https://www.phusionpassenger.com/orders[Customer Area] and save it as `/etc/passenger-enterprise-license`. + Next, add the Phusion Passenger Enterprise gem server to your RubyGems source list: + ------------------------------------------ gem source --add https://download:YOUR_DOWNLOAD_TOKEN@www.phusionpassenger.com/enterprise_gems/ ------------------------------------------ + Substitute 'YOUR_DOWNLOAD_TOKEN' with the one you find in the link:https://www.phusionpassenger.com/orders[Customer Area]. And notice the **trailing slash** in the URL! It is very important. + Finally, install the latest gem to obtain the files for the latest stable version of the open source Phusion Passenger: + ---------------------- gem install passenger-enterprise-server ---------------------- + .Previous versions and beta versions ******************************************************** Sometimes you will want to obtain the latest beta version of Phusion Passenger Enterprise. Beta versions are not normally selected by `gem install`, so to opt-in for beta versions you have to add the `--pre` argument: ----------------------------------- gem install passenger-enterprise-server --pre ----------------------------------- If you want to obtain a specific version of Phusion Passenger Enterprise, e.g. because you are downgrading, then specify the version number with `--version`: ----------------------------------- gem install passenger-enterprise-server --version 3.0.0 ----------------------------------- If you want to obtain a specific *beta* version of Phusion Passenger then you must also pass `--pre`: ---------------------------------------------------- gem install passenger-enterprise-server --version 3.9.1.beta --pre ---------------------------------------------------- ******************************************************** ifndef::standalone[] [[run_passenger_installer]] [float] ==== Step 3: run the Phusion Passenger installer :gem: true include::installation/run_installer.txt[] :gem!: [float] ==== Step 4: restarting the Flying Passenger daemon If you are using <> then you must restart the Flying Passenger daemon by sending it the SIGTERM signal: ------------------------------- kill `cat /path-to/flying-passenger.pid` ------------------------------- Or, if Flying Passenger is not running with a PID file, look up its PID us `ps` and then send it SIGTERM: ------------------------------- ps aux | grep flying-passenger kill PID_OF_FLYING_PASSENGER ------------------------------- [[verify_passenger_running]] [float] ==== Step 5: verifying that Phusion Passenger is running Restart your web server and run: --------------------------- passenger-memory-stats --------------------------- include::installation/verify_running_epilogue.txt[] endif::[] [[tarball_generic_install]] === Generic installation, upgrade and downgrade method: via tarball [float] ==== Step 1: installing Ruby Phusion Passenger supports multiple languages and its core is written in C++, but its installer and administration tools are written in Ruby, so you must install Ruby. Even though Ruby is required, Ruby will normally not be loaded during normal operation unless you deploy a Ruby web application on Phusion Passenger. Phusion Passenger's dependency on Ruby is very minimal. See <> for details. |========================================================== | Debian, Ubuntu | `sudo apt-get update` + `sudo apt-get install ruby rake` | Red Hat, CentOS, ScientificLinux, Amazon Linux | Enable link:http://fedoraproject.org/wiki/EPEL[EPEL], then run as root: + `yum install ruby rubygem-rake` | Mac OS X | No action needed. Ruby is installed by default. | Other operating systems | Install Ruby from link:http://www.ruby-lang.org/[the Ruby website]. |========================================================== [float] ==== Step 2: download and extract the tarball **Open Source**:: Download the open source Phusion Passenger tarball from link:https://www.phusionpassenger.com/download#open_source[the Phusion Passenger website]. + Older versions can be found in link:https://www.phusionpassenger.com/file_releases[the release archive]. **Enterprise**:: link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] customers can download the Phusion Passenger Enterprise tarball from the link:https://www.phusionpassenger.com/orders[Customer Area]. + Also be sure to download the *license key* and save it as `/etc/passenger-enterprise-license`. Once you have downloaded the tarball, pick a location to extract it to. You can pick any location. A good location is '/opt/passenger'. Create this directory and extract the tarball as follows: -------------------------------------------------- mkdir /opt/passenger cd /opt/passenger tar xzvf /location-to/passenger-x.x.x.tar.gz cd /opt/passenger/passenger-x.x.x -------------------------------------------------- Note that `passenger-x.x.x` should be `passenger-enterprise-server-x.x.x` if you're using Phusion Passenger Enterprise. ifdef::standalone[] [float] ==== Step 3: adding the Phusion Passenger tools to PATH Edit `/etc/bashrc` (or `/etc/bash.bashrc` on some systems) and append the following to the end of the file: --------------------- export PATH=/opt/passenger/passenger-x.x.x/bin:$PATH --------------------- Finally, restart all your shell sessions in order to activate this change. The installation is now complete. endif::[] ifndef::standalone[] [float] ==== Step 3: run the Phusion Passenger installer :tarball: true include::installation/run_installer.txt[] :tarball!: ifdef::nginx[] [float] ==== Step 4: restarting the Flying Passenger daemon If you are using <> then you must restart the Flying Passenger daemon by sending it the SIGTERM signal: ------------------------------- kill `cat /path-to/flying-passenger.pid` ------------------------------- Or, if Flying Passenger is not running with a PID file, look up its PID us `ps` and then send it SIGTERM: ------------------------------- ps aux | grep flying-passenger kill PID_OF_FLYING_PASSENGER ------------------------------- endif::[] [float] ifdef::apache[] ==== Step 4: verifying that Phusion Passenger is running endif::[] ifdef::nginx[] ==== Step 5: verifying that Phusion Passenger is running endif::[] Restart your web server and run: --------------------------- ./bin/passenger-memory-stats --------------------------- include::installation/verify_running_epilogue.txt[] endif::[] === Upgrading from open source to Enterprise Phusion Passenger comes in two variants: an open source version, as well as an link:https://www.phusionpassenger.com/enterprise[Enterprise version] which introduces a myriad of useful features that can improve stability and performance and efficiency. Customers who have bought Phusion Passenger Enterprise can upgrade their open source installation to Enterprise as follows: 1. <>. 2. Install the Enterprise version by following one of the installation guides in this section (e.g. <> or <>). The uninstallation is necessary because the Enterprise Ruby gem has a different gem name ('passenger-enterprise-server' instead of 'passenger'), but the same administration command names (e.g. `passenger-status`). Uninstalling the open source version avoids any conflicts. === Cryptographic verification of installation files ==== Synopsis We digitally sign various files with our GPG key so that you can check whether they're legit, i.e. whether they really came from Phusion and haven't been tampered with by a third party. We apply signing since the open source version 4.0.0 RC 4, or the Enterprise version 4.0.0 RC 1. ==== Importing the Phusion Software Signing key Phusion's GPG key for signing software is as follows: Phusion Software Signing (software-signing@phusion.nl) Short key ID: 0x0A212A8C Long key ID: 0x2AC745A50A212A8C Fingerprint: D5F0 8514 2693 9232 F437 AB72 2AC7 45A5 0A21 2A8C This key is stored at link:http://www.phusion.nl/about/gpg[the Phusion website] and at the key servers link:http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x2AC745A50A212A8C[sks-keyservers.net] and link:http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2AC745A50A212A8C[keyserver.ubuntu.com]. You can import it to your keyring with one of these command: ------------------------------------------------------------------------- gpg --keyserver pool.sks-keyservers.net --search-keys 0x2AC745A50A212A8C # -OR- gpg --keyserver keyserver.ubuntu.com --search-keys 0x2AC745A50A212A8C ------------------------------------------------------------------------- The Phusion Software Signing key is only used for signing software. It's never used for signing emails or for encrypting files, so please be suspicious if you encounter usage of this key outside the context of signing software, and alert us at support@phusion.nl. Include "notspam" in the message to bypass our spam filter. The email address software-signing@phusion.nl redirects to info@phusion.nl so it's safe to send email there. ==== Verifying the Phusion Software Signing key The Phusion Software Signing key is also *signed by the Phusion founders*. Their keys are as follows: Hongli Lai (hongli@phusion.nl) Short key ID: 4B6F4332 Long key ID: 06A131094B6F4332 Fingerprint: 64E8 0420 FC6A 499F 9E1F 81FA 06A1 3109 4B6F 4332 Ninh Bui (ninh@phusion.nl) Short key ID: 6FAF3782 Long key ID: BA8DA3F46FAF3782 Fingerprint: 353A 398C 49AF 5CD5 74A0 656C BA8D A3F4 6FAF 3782 Both keys are stored at both sks-servers.net and keyserver.ubuntu.com. Import them with: ------------------------------------------ gpg --keyserver pool.sks-servers.net --search-keys 0x06A131094B6F4332 gpg --keyserver pool.sks-servers.net --search-keys 0xBA8DA3F46FAF3782 # -OR- gpg --keyserver keyserver.ubuntu.com --search-keys 0x06A131094B6F4332 gpg --keyserver keyserver.ubuntu.com --search-keys 0xBA8DA3F46FAF3782 ------------------------------------------ ==== Verifying the gem and tarball You can find the open source version's gem and tarball GPG signatures at https://www.phusionpassenger.com/file_releases. The Enterprise version's GPG signatures can be found in the link:https://www.phusionpassenger.com/orders[Customer Area]. All signatures have the '.asc' extension. Once you have imported our key, you can verify the validity of a file against its signature as follows: ----------------------------------------- $ gpg --verify passenger-x.x.x.tar.gz.asc passenger-x.x.x.tar.gz gpg: Signature made Mon Mar 11 09:45:46 2013 CET using RSA key ID 0A212A8C gpg: Good signature from "Phusion Software Signing " ----------------------------------------- ==== Verifying Git signatures Tags in the link:https://github.com/phusion/passenger[Git repository for the open source version] are also tagged. You can verify a Git tag as follows: ------------------------------------------------------- $ git tag --verify release-x.x.x object d886f34b5705e4314feccaf0d77b9a38416e15e0 type commit tag release-4.0.0.rc5 tagger Hongli Lai (Phusion) 1362993117 +0100 This is a tag message. gpg: Signature made Mon Mar 11 10:12:02 2013 CET using RSA key ID 0A212A8C gpg: Good signature from "Phusion Software Signing " ------------------------------------------------------- ==== Verifying DEB and RPM packages The DEB and RPM packages are signed with the signatures of the respective packagers. They are automatically checked upon installation. ==== Revocation In the event our key is compromised, we will revoke the key and upload the revocation information to sks-servers.net and keyserver.ubuntu.com. However your system will not know about the revocation until you update the keys from the keyservers. You should update your keys regularly (e.g. once a week) by invoking: ------------------------------------------------------- gpg --refresh-keys --keyserver pool.sks-servers.net # -OR- gpg --refresh-keys --keyserver keyserver.ubuntu.com ------------------------------------------------------- If you installed Phusion Passenger through our APT repository, then you should update APT's keyring from time to time as well: ------------------------------------------------------- sudo apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com ------------------------------------------------------- ifndef::standalone[] === Non-interactive, automatic, headless installs or upgrades ifdef::apache[] By default, the installer (`passenger-install-apache2-module`) is interactive. If you want to automate installation then you can do so by passing `--auto` to the installer. See also `passenger-install-apache2-module --help` for more options. endif::[] ifdef::nginx[] By default, the installer (`passenger-install-nginx-module`) is interactive. If you want to automate installation then you can do so by passing various answers to the installer through command line options. Please run the installer with `--help` for a list of available command line options. endif::[] endif::[] === Customizing the compilation process The Phusion Passenger compilation process can be customized with environment variables. You can learn more about environment variables in <>. ==== Setting the compiler You can force the Phusion Passenger build system to use a specific C or C++ compiler by setting the `CC` and `CXX` environment variables. These may be set to any arbitrary shell commands. For example, contributors who want to hack on Phusion Passenger may want to use Clang for faster compilation and link:http://ccache.samba.org/[ccache] for faster recompilation, and may want to enable more error-catching compilation flags: [source,sh] ---------------------- export CC='ccache clang -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv' export CXX='ccache clang++ -fcolor-diagnostics -Qunused-arguments -fcatch-undefined-behavior -ftrapv' ---------------------- NOTE: If you run the installer with `sudo` then environment variables may not be passed properly. Learn more at <>. ==== Adding additional compiler or linker flags On some systems, C/C++ libraries and headers that Phusion Passenger requires may be located in a non-standard directory. You can force the Phusion Passenger build system to look in those locations by injecting compiler and linker flags using the following environment variables: `EXTRA_PRE_CFLAGS`:: These flags are injected into all C compiler invocations that involve compiling C source files. This also covers compiler invocations that compile *and* link. The flags are injected at the beginning of the command string, even before `EXTRA_PRE_LDFLAGS`. `EXTRA_CFLAGS`:: Similar to `EXTRA_PRE_CFLAGS`, but injected at the end of the command string, before `EXTRA_LDFLAGS`. `EXTRA_PRE_CXXFLAGS`:: Similar to `EXTRA_PRE_CFLAGS`, but for C++ compiler invocations. `EXTRA_CXXFLAGS`:: Similar to `EXTRA_CFLAGS`, but for C++ compiler invocations. `EXTRA_PRE_LDFLAGS`:: These flags are injected into all C/C++ compiler invocations that involve linking. This includes compiler invocations that compile *and* link. The flags are injected at the beginning of the command string, but after `EXTRA_PRE_CFLAGS`/`EXTRA_PRE_CXXFLAGS`. `EXTRA_PRE_C_LDFLAGS`:: These flags are injected into all C compiler invocations that involve linking, right after `EXTRA_PRE_LDFLAGS`. `EXTRA_PRE_CXX_LDFLAGS`:: Similar to `EXTRA_PRE_CXX_LDFLAGS`, but for C++ compiler invocations. `EXTRA_LDFLAGS`:: Similar to `EXTRA_PRE_LDFLAGS`, but injected at the very end of the command string, even after `EXTRA_CFLAGS` and `EXTRA_CXXFLAGS`. `EXTRA_C_LDFLAGS`:: Similar to `EXTRA_LDFLAGS`, but only injected for C executable linking commands. Injected right after `EXTRA_LDFLAGS`. `EXTRA_CXX_LDFLAGS`:: Similar to `EXTRA_LDFLAGS`, but only injected for C++ executable linking commands. Injected right after `EXTRA_LDFLAGS`. `PASSENGER_THREAD_LOCAL_STORAGE`:: Setting this to 1 will enable the `PASSENGER_THREAD_LOCAL_STORAGE` macro, which forcefully disables the use of thread-local storage inside the Phusion Passenger codebase. Setting this environment variable is useful on systems that have broken support for thread-local storage, despite passing our build system's check for proper thread-local storage support. At the time of writing, one user has reported that Ubuntu 12.04 32-bit has broken thread-local storage report although neither the reporter nor us were able to reproduce the problem on any other systems running Ubuntu 12.04 32-bit. Note that this flag has no effect on non-Phusion Passenger code. NOTE: If you run the installer with `sudo` then environment variables may not be passed properly. Learn more at <>. [[forcing_location_of_command_line_tools_and_dependencies]] ==== Forcing location of command line tools and dependencies The Phusion Passenger build system attempts to autodetect many things by locating relevant helper tools. For example, to find out which compiler flags it should use for compiling Apache modules, it locates the `apxs2` command and queries it. To find out which compiler flags it should use for libcurl, it queries the `curl-config` command. These commands may not be in `$PATH`, or even when they are you may want to use a different one. You can force the build to find certain command line tools at certain locations by using the following environment variables: `HTTPD`:: The location of the `httpd` executable (the Apache server executable). `APXS2`:: The location of the `apxs2` executable (the Apache module developer tool). Only used by `passenger-install-apache2-module`. + This environment variable, together with `HTTPD`, are what you need to customize if you have multiple Apache installations on your system, or if your Apache is located in a non-standard location which Phusion Passenger cannot detect. By setting `APXS2` and `HTTP` to the right paths, you can force Phusion Passenger to be compiled against that specific Apache installation. + For example, if your Apache installation is located in `/opt/lamp/apache2`, then you can run the installer as follows: + --------------------------------------- $ sudo bash # export HTTPD=/opt/lampp/apache2/bin/apache # export APXS2=/opt/lampp/apache2/bin/apxs # passenger-install-apache2-module --------------------------------------- `APR_CONFIG`:: The location of the `apr-config` executable (the Apache Portable Runtime developer tool). `APU_CONFIG`:: The location of the `apu-config` executable (the Apache Portable Runtime Utility developer tool). `MAKE`:: The location of a `make` tool. It does not matter which implementation of `make` this is. `GMAKE`:: The location of the GNU-compatible `make` tool. TIP: If you do not know what environment variables are, or how to use them, then please read <>. NOTE: If you run the installer with `sudo` then environment variables may not be passed properly. Learn more at <>. ifdef::apache[] [[multiple_apache_installs]] === Dealing with multiple Apache installations Some systems have multiple Apache installations. Maybe you already know about that, and you installed multiple Apaches for a reason. Or maybe you did so in the past but then forgot about the other installs. Or maybe someone else -- or some other software -- installed another Apache for you without your knowledge. Whatever the reason might be, it is important that you know about the existance of multiple Apache installations, and that you decide *which one* you want to use. **Unless you know exactly what you are doing, we recommend that you remove all the Apache installations that you don't intend to use, in order to avoid confusion and problems**. You should end up with only a single Apache installation. Unfortunately, this manual cannot tell you how to remove the other Apache installs: it depends on how you originally installed them. Usually it's a matter of removing the directories that they're located in, and removing their configuration files. But some Apache distributions might bundle an uninstaller. You need to do the proper research on how they ended up there in the first place. Phusion Passenger provides a tool to check whether you have multiple Apache installations on your system. You can invoke the tool by running `passenger-config --detect-apache2`. If the existance of multiple Apache installations is intentional, then Phusion Passenger can happily go along with your choice: you simply have to tell `passenger-install-apache2-module` which Apache to install against. There are several ways to specify which Apache you want to install against: * By passing the `--apxs2-path` parameter. The `passenger-config --detect-apache2` command will tell you how to use this parameter. * By setting `APXS2`, `HTTPD` and other kinds of environment variables. Please refer to <> for more information. [[working_with_apache_conf]] === Working with the Apache configuration file On most systems the Apache configuration file is located in either '/etc/apache2/httpd.conf' or '/etc/apache2/apache2.conf'. However, to allow better organization, many operating systems and Apache distributions also read configuration files in the 'conf.d', 'mods-enabled' and 'sites-enabled' subdirectories. 'mods-enabled' contains symlinks to files in 'mods-available'. This latter subdirectory contains config files for all available modules, while 'mods-enabled' contains only a subset, namely the modules that should actually be enabled. The symlinks are created using the `a2enmod` tool. '*.load' files contain `LoadModule` directives, while '*.conf' files contain all other configuration directives. Use 'mods-enabled'/'mods-available' to store Phusion Passenger configuration if you can: - Create '/etc/apache2/mods-available/passenger.load' and paste the `LoadModule ...` directive that `passenger-install-apache2-module` outputs. - Create '/etc/apache2/mods-available/passenger.conf' and paste the `PassengerRoot` and other Phusion Passenger options. - Enable by running `sudo a2enmod passenger`. If the 'mods-enabled' mechanism is not available then you can paste configuration snippets into 'httpd.conf' or 'apache2.conf' directly. On OS X Server >= 10.8 Mountain Lion the location of the Apache configuration file depends on whether you use Web Services or not. If you do, then the configuration file is in '/Library/Server/Web/Config/apache2/httpd_server_app.conf'. If you do not, then the configuration file is in '/etc/apache2/httpd.conf'. endif::[] ifdef::nginx[] === Installing as a normal Nginx module without using the installer You can also install Phusion Passenger the way you install any other Nginx module, e.g. with `--add-module`. This installation mode is useful if you already have an Nginx tarball somewhere. You need to run Nginx's configure script with `--add-module=/path-to-passenger-nginx-addon-dir`. The right value for `/path-to-passenger-nginx-addon-dir` can be obtained with the command: ------------------------------------- passenger-config --nginx-addon-dir ------------------------------------- After having installed Nginx with Phusion Passenger support, you must paste the following line into your Nginx configuration file: ------------------------------------------ passenger_root /path-to-passenger-root; ------------------------------------------ The right value for `/path-to-passenger-root` can be obtained by running the following command: ------------------------------------- passenger-config --root ------------------------------------- After having modified the Nginx configuration file, restart Nginx. [[nginx_init_script]] === Creating an Nginx init script If you installed Nginx with one of the generic installation methods then you won't have an init script to start, stop and restart Nginx with. A bare Nginx installation works with signals: you start it by invoking it from the command line, you stop it by sending SIGTERM to it and you gracefully restart it by sending SIGHUP to it. If you prefer to use an init script then please refer to the following resources: - link:http://wiki.nginx.org/Nginx-init-ubuntu[Init script for Ubuntu 8.04-9.10] - link:http://library.linode.com/web-servers/nginx/installation/ubuntu-12.04-precise-pangolin#sph_create-an-init-script-to-manage-nginx[Init script for Ubuntu 12.04] - link:http://wiki.nginx.org/RedHatNginxInitScript[Init script for Red Hat, Fedora and CentOS] When using one of those init scripts, please make sure that the paths inside the init script are correct. In particular, the paths to the Nginx binary, to the PID file and to the configuration file must match the actual locations of your Nginx installation. endif::[] ifndef::standalone[] === Disabling without uninstalling You can temporarily unload (disable) Phusion Passenger from the web server, without uninstalling the Phusion Passenger files, so that the web server behaves as if Phusion Passenger was never installed in the first place. This might be useful to you if - for example - you seem to be experiencing a problem caused by Phusion Passenger, but you want to make sure whether that's actually the case without having to go through the hassle of uninstalling Phusion Passenger completely. When disabled, Phusion Passenger will not occupy any memory or CPU or otherwise interfere with the web server. ifdef::apache[] To unload Phusion Passenger from the web server, edit your Apache configuration file(s) and comment out: - all Phusion Passenger configuration directives. - the `LoadModule passenger_module` directive. For example, if your configuration file looks like this... ----------------------------------- Listen *:80 NameVirtualHosts *:80 .... LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so PassengerRoot /somewhere/passenger/x.x.x PassengerDefaultRuby /usr/bin/ruby PassengerMaxPoolSize 10 ServerName www.foo.com DocumentRoot /webapps/foo/public RailsBaseURI /rails ----------------------------------- ...then comment out the relevant directives, so that it looks like this: ----------------------------------- Listen *:80 NameVirtualHosts *:80 .... # LoadModule passenger_module /somewhere/passenger-x.x.x/ext/apache2/mod_passenger.so # PassengerRoot /somewhere/passenger/x.x.x # PassengerDefaultRuby /usr/bin/ruby # PassengerMaxPoolSize 10 ServerName www.foo.com DocumentRoot /webapps/foo/public # RailsBaseURI /rails ----------------------------------- endif::[] ifdef::nginx[] To unload Phusion Passenger, edit your Nginx configuration file(s) and comment out all Phusion Passenger configuration directives. For example, if your configuration file looks like this... ----------------------------------- ... http { passenger_root /somewhere/passenger-x.x.x; passenger_ruby /usr/bin/ruby; passenger_max_pool_size 10; gzip on; server { server_name www.foo.com; listen 80; root /webapps/foo/public; passenger_enabled on; } } ----------------------------------- ...then comment out the relevant directives, so that it looks like this: ----------------------------------- ... http { # passenger_root /somewhere/passenger-x.x.x; # passenger_ruby /usr/bin/ruby; # passenger_max_pool_size 10; gzip on; server { server_name www.foo.com; listen 80; root /webapps/foo/public; # passenger_enabled on; } } ----------------------------------- endif::[] After you've done this, save the configuration file and restart the web server. endif::[] [[uninstalling]] === Uninstalling ifndef::standalone[] To uninstall Phusion Passenger, please first remove all Phusion Passenger configuration directives from your web server configuration file(s). After you've done this, you need to remove the Phusion Passenger files. endif::[] - If you installed Phusion Passenger via a Ruby gem, then run `gem uninstall passenger` (or, if you're a link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] user, `gem uninstall passenger-enterprise-server`). You <>. - If you installed Phusion Passenger via a source tarball, then remove the directory in which you placed the extracted Phusion Passenger files. This directory is the same as the one pointed to the by `PassengerRoot`/`passenger_root` configuration directive. - If you installed Phusion Passenger through APT or YUM, then use them to uninstall Phusion Passenger. - If you installed Phusion Passenger through Homebrew, then run `brew uninstall passenger`. ifdef::nginx[] Nginx does not have to be recompiled. Altough it contains Phusion Passenger code, it will not do anything when all Phusion Passenger configuration directives are removed. endif::[] [[moving_phusion_passenger]] === Moving to a different directory If you installed Phusion Passenger through a tarball then you can move the Phusion Passenger directory to another location. This is not possible if you used any of the other installation methods. First, move the directory to whereever you like: -------------------------------------------------------------- mv /opt/passenger/passenger-4.0.0 /usr/local/passenger-4.0.0 -------------------------------------------------------------- ifdef::apache[] Next you must tell Apache that Phusion Passenger has moved. Open your <> and set the 'PassengerRoot' directive to the new location: --------------------------------------------- PassengerRoot /usr/local/passenger-4.0.0 --------------------------------------------- Restart your web server to finalize the change. endif::[] ifdef::nginx[] Next you must tell Nginx that Phusion Passenger has moved. Open your Nginx configuration file and set the 'passenger_root' directive to the new location: --------------------------------------------- passenger_root /usr/local/passenger-4.0.0; --------------------------------------------- Restart your web server to finalize the change. endif::[] If you used <> and you added Phusion Passenger's `bin` subdirectory to `PATH`, then you must update your PATH with the new location. Open `/etc/bashrc` (or `/etc/bash.bashrc` on some systems) and change: --------------------- export PATH=/opt/passenger/passenger-4.0.0/bin:$PATH --------------------- to: --------------------- export PATH=/usr/local/passenger-4.0.0/bin:$PATH --------------------- Finally, restart all your shell sessions to activate the PATH change. passenger-4.0.37/doc/users_guide_snippets/passenger_spawn_method.txt000644 000765 000024 00000003245 12233035540 026530 0ustar00honglistaff000000 000000 Internally, Phusion Passenger spawns multiple Ruby application processes in order to handle requests. But there are multiple ways with which processes can be spawned, each having its own set of pros and cons. Supported spawn methods are: 'smart':: This spawning method caches code using the app preloader. Framework code is not cached between multiple applications, although it is cached within instances of the same application. Please read <> for a more detailed explanation of what smart spawning exactly does. + *Pros:* Smart spawning caches code where possible to speed up the respawn process and is compatible with most applications + *Cons:* It is possible that it may be incompatible with some applications 'direct':: This spawning method is similar to the one used in Mongrel Cluster. It does not perform any code caching at all. Please read <> for a more detailed explanation of what direct spawning exactly does. + *Pros:* Direct spawning is guaranteed to be compatible with all applications and libraries. + *Cons:* Much slower than smart spawning. Every spawn action will be equally slow, though no slower than the startup time of a single server in Mongrel Cluster. Direct spawning will also render <> useless. ************************************************ As of Phusion Passenger 4.0, 'conservative' spawning was renamed to 'direct' and 'smart-lv2' was renamed to 'smart'. The old 'smart' spawning has been removed in favor of the new version. ************************************************ passenger-4.0.37/doc/users_guide_snippets/rackup_specifications.txt000644 000765 000024 00000003712 12233035540 026340 0ustar00honglistaff000000 000000 This subsection shows example 'config.ru' files for various web frameworks. ==== Camping ==== ------------------------------------------------------ require 'rubygems' require 'rack' require 'camping' ##### Begin Camping application Camping.goes :Blog ...your application code here... ##### End Camping application run Rack::Adapter::Camping.new(Blog) ------------------------------------------------------ For Camping versions 2.0 and up, using `run Blog` as the final line will do. ==== Halcyon ==== ------------------------------------------------------ require 'rubygems' require 'halcyon' $LOAD_PATH.unshift(Halcyon.root / 'lib') Halcyon::Runner.load_config Halcyon.root/'config'/'config.yml' run Halcyon::Runner.new ------------------------------------------------------ ==== Mack ==== ------------------------------------------------------ ENV["MACK_ENV"] = ENV["RACK_ENV"] load("Rakefile") require 'rubygems' require 'mack' run Mack::Utils::Server.build_app ------------------------------------------------------ ==== Merb ==== ------------------------------------------------------ require 'rubygems' require 'merb-core' Merb::Config.setup( :merb_root => ::File.expand_path(::File.dirname(__FILE__)), :environment => ENV['RACK_ENV'] ) Merb.environment = Merb::Config[:environment] Merb.root = Merb::Config[:merb_root] Merb::BootLoader.run run Merb::Rack::Application.new ------------------------------------------------------ ==== Ramaze ==== ------------------------------------------------------ require "rubygems" require "ramaze" Ramaze.trait[:essentials].delete Ramaze::Adapter require "start" Ramaze.start! run Ramaze::Adapter::Base ------------------------------------------------------ ==== Sinatra ==== ------------------------------------------------------ require 'rubygems' require 'sinatra' set :environment, ENV['RACK_ENV'].to_sym disable :run, :reload require 'app.rb' run Sinatra::Application ------------------------------------------------------ passenger-4.0.37/doc/users_guide_snippets/rvm_helper_tool.txt000644 000765 000024 00000004716 12233035540 025175 0ustar00honglistaff000000 000000 .RVM helper tool Phusion Passenger provides the `passenger-config --ruby-command` tool for figuring out the correct command for invoking a specific Ruby interpreter. This is especially useful for RVM users. Suppose that you have both Ruby 1.8.7 and Ruby 1.9.3 installed through RVM, and you want to know the correct commands for each Ruby interpreter. For this purpose we'll want to invoke `passenger-config` using its full path, because each time you `rvm use` a different Ruby interpreter, RVM changes `$PATH`. If you did not install Phusion Passenger through the generic tarball installation method, then here's how you can figure out where `passenger-config` is: ------------------------------ $ which passenger-config /opt/passenger/bin/passenger-config ------------------------------ Now, switch to all the RVM Ruby interpreters you want to use. In each interpreter, invoke `passenger-config --ruby-command`. For Ruby 1.8.7: ------------------------------ $ rvm use 1.8.7 $ /opt/passenger/bin/passenger-config --ruby-command passenger-config was invoked through the following Ruby interpreter: Command: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby Version: ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0] To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby To use with Standalone: /usr/local/rvm/wrappers/ruby-1.8.7-p358/ruby /opt/passenger/bin/passenger start ## Notes for RVM users Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'. ------------------------------ Then, for Ruby 1.9.3: ------------------------------ $ rvm use 1.9.3 $ /opt/passenger/bin/passenger-config --ruby-command passenger-config was invoked through the following Ruby interpreter: Command: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby Version: ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1] To use in Apache: PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby To use in Nginx : passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby To use with Standalone: /usr/local/rvm/wrappers/ruby-1.9.3-p392/ruby /opt/passenger/bin/passenger start ## Notes for RVM users Do you want to know which command to use for a different Ruby interpreter? 'rvm use' that Ruby interpreter, then re-run 'passenger-config --ruby-command'. ------------------------------passenger-4.0.37/doc/users_guide_snippets/since_version.txt000644 000765 000024 00000000044 12233035540 024631 0ustar00honglistaff000000 000000 **Introduced in version {version}.**passenger-4.0.37/doc/users_guide_snippets/support_information.txt000644 000765 000024 00000001434 12233035540 026110 0ustar00honglistaff000000 000000 === Supported operating systems === Phusion Passenger works on any POSIX-compliant operating system. In other words: practically any operating system on earth, except Microsoft Windows. Phusion Passenger is confirmed on a large number of operating systems and Linux distributions, including, but not limited to, Ubuntu, Debian, CentOS/Fedora/RHEL, Gentoo, Mac OS X, FreeBSD and Solaris. OpenBSD is supported since version 5.2. Both 32-bit and 64-bit platforms are supported. Please link:http://code.google.com/p/phusion-passenger/issues/list[report a bug] or link:http://groups.google.com/group/phusion-passenger[join our discussion forum] if it doesn't work on your POSIX-compliant operating system. [[where_to_get_support]] === Where to get support === include::where_to_get_support.txt[] passenger-4.0.37/doc/users_guide_snippets/tips.txt000644 000765 000024 00000116674 12233035540 022763 0ustar00honglistaff000000 000000 [[user_switching]] === User Switching (security feature) === Phusion Passenger supports automatic 'user switching': by default, it attempts to run applications as the "right" user, instead of running all applications as the same user. To better understand the problem, let us consider the situation with PHP. There is a problem that plagues most PHP web hosts, namely the fact that all PHP applications are run in the same user context as the web server. So for example, Joe's PHP application will be able to read Jane's PHP application's passwords. This is obviously undesirable on many servers. Phusion Passenger's 'user switching' feature solves this problem. Applications are run as the owner of their "startup file". For Ruby apps, the startup file is `config.ru` (Rack and Rails >= 3) or `config/environment.rb` (Rails 1 and 2). For Python apps, the startup file is `passenger_wsgi.py`. So suppose that `config.ru` is owned by user 'joe', then Phusion Passenger will spawn the corresponding application as 'joe' as well. The exact rules are a little bit more complicated, and they're explained further down in this section. ==== Requirements User switching is only enabled when all of the following conditions are met: - When not using <> (this is probably the case): * The ifdef::apache[] <> endif::[] ifdef::nginx[] <> endif::[] option must be enabled. * The web server's control process must have root privileges. This is the case on most installations. - When using <>: * The Flying Passenger daemon must be run with root privileges. ==== Effects When not using Flying Passenger, the following table illustrates the effect for different combinations of the requirements. |========================================================== ifdef::apache[] | | **PassengerUserSwitching on** | **PassengerUserSwitching off** endif::[] ifdef::nginx[] | | **passenger_user_switching on** | **passenger_user_switching off** endif::[] | **Web server has root privileges** | User switching enabled. | User switching disabled. Apps are run as ifdef::apache[] <> and <>. endif::[] ifdef::nginx[] <> and <>. endif::[] | **Web server has no root privileges** | User switching disabled. Apps are run as the web server's user. | User switching disabled. Apps are run as the web server's user. |========================================================== When using Flying Passenger, the effect is as follows: |========================================================== | **Daemon run with root privileges** | User switching enabled. | **Daemon run without root privileges** | User switching disabled. Apps are run as the daemon's user. |========================================================== When user switching is enabled, the following rules are followed to determine what user an application should be run as. The first matching rule is the rule that will be followed. 1. If ifdef::apache[] <> or <> endif::[] ifdef::nginx[] <> or <> endif::[] are set, then the application will be run as the specified user/group. Thus, these options are a good way to override user switching settings. 2. If the startup file is owned by root or an unknown user, then the application will run as the user specified by ifdef::apache[] <> and <>. endif::[] ifdef::nginx[] <> and <>. endif::[] 3. Otherwise, the application is run as the owner of the startup file. ==== Caveats & troubleshooting If your application regularly encounters permission errors or fails to find certain files, then this is an indication that your application is started as a user that you did not intent it to be run as. Other symptoms include: - The application fails to start because Bundler complains that it cannot find gems. This probably indicates that Bundler does not have read access to the directory that contains Bundler-installed gems. - The application fails to start and its error message mentions the path '/nonexistent'. This probably indicates that your application is started as the 'nobody' user. This is because on many systems, the 'nobody' user's home directory is '/nonexistent'. To check whether it is indeed the case that your application is started as a different user than you intended to, see <>. The most likely reason why your application is started as 'nobody' is probably because your startup file is owned by 'root', by 'nobody' or by an unknown user. To fix this, change the owner of the startup file to the owner that you want to run the application as. Whatever user your application runs as, it must have read access to the <>, and read/write access to the application's 'logs' directory. [[finding_out_app_user]] ==== Finding out what user an application is running as To find our what user an application is started as, first access its URL in your browser so that Phusion Passenger starts the application. For example: ---------------------------------- http://www.example.local/ ---------------------------------- The application will now either successfully start or fail to start. If it fails to start then you will see an error page that tells you what user the application was being started as. If you do not see the error page in the browser then set ifdef::apache[] <> endif::[] ifdef::nginx[] <> endif::[] on. If the application successfully started, then run `passenger-status` to find the process's PID: ------------------------------------------------ .---------- General information ----------- Max pool size : 6 Processes : 1 Requests in top-level queue : 0 .---------- Application groups ----------- /webapps/example.local#default: App root: /webapps/example.local Requests in queue: 0 * PID: 16915 Sessions: 0 Processed: 1 Uptime: 2s CPU: 0% Memory : 9M Last used: 2s ago ------------------------------------------------ In the above example we see that the PID is 16915. Next, use 'ps' to find out the user that it is running as: -------------------------------------------------- # ps -o pid,user,comm -p 16915 PID USER COMM 16915 phusion Passenger RackApp: /webapps/example.local -------------------------------------------------- As you can see, the application in this example is being run as user 'phusion'. [[reducing_memory_usage]] === Copy-on-write memory support (reducing memory consumption of Ruby applications) === Phusion Passenger automatically leverages operating system virtual memory copy-on-write features in order to reduce the memory usage of Ruby applications. Experience has shown that this reduces memory usage by 33% on average. For this mechanism to work, a Ruby interpreter with a copy-on-write friendly garbage collector is required. The following Ruby interpreters have copy-on-write friendly garbage collectors: - MRI Ruby >= 2.0. Versions prior to 2.0 did not have a copy-on-write friendly garbage collector. - http://www.rubyenterpriseedition.com/[Ruby Enterprise Edition], which was Phusion's branch of MRI Ruby 1.8 with a copy-on-write friendly garbage collector and other enhancement. It has reached End-Of-Life as of 2012, but remains available for legacy systems. [[capistrano]] === Capistrano recipe === Phusion Passenger can be combined with link:http://capify.org/[Capistrano]. The following Capistrano recipe demonstrates Phusion Passenger support. It assumes that you're using Git as version control system. -------------------------------------------------- set :application, "myapp" set :domain, "example.com" set :repository, "ssh://#{domain}/path-to-your-git-repo/#{application}.git" set :use_sudo, false set :deploy_to, "/path-to-your-web-app-directory/#{application}" set :scm, "git" role :app, domain role :web, domain role :db, domain, :primary => true namespace :deploy do task :start, :roles => :app do run "touch #{current_release}/tmp/restart.txt" end task :stop, :roles => :app do # Do nothing. end desc "Restart Application" task :restart, :roles => :app do run "touch #{current_release}/tmp/restart.txt" end end -------------------------------------------------- [[bundler_support]] === Bundler support === Phusion Passenger has automatic support for link:http://gembundler.com/git.html[Bundler]. The support consists of loading your application under the environment defined by your Gemfile. In other words, Phusion Passenger loads your application as if 'bundle exec' was used. The Bundler support works as follows: - If you have a '.bundle/environment.rb' in your application root, then Phusion Passenger will require that file before loading your application. - Otherwise, if you have a 'Gemfile', then Phusion Passenger will automatically call `Bundler.setup()` before loading your application. It's possible that your application also calls `Bundler.setup` during loading, e.g. in 'config.ru' or in 'config/boot.rb'. This is the case with Rails 3, and is also the case if you modified your 'config/boot.rb' according to the link:http://gembundler.com/rails23.html[Bundler Rails 2.3 instructions]. This leads to `Bundler.setup` being called twice, once before the application startup file is required and once during application startup. However this is harmless and doesn't have any negative effects. Phusion Passenger assumes that you're using Bundler >= 0.9.5. If you don't want Phusion Passenger to run its Bundler support code, e.g. because you need to use an older version of Bundler with an incompatible API or because you use a system other than Bundler, then you can override Phusion Passenger's Bundler support code by creating an empty file 'config/setup_load_paths.rb'. If this file exists then it will be required before loading the application startup file. In this file you can do whatever you need to setup Bundler or a similar system. [[add_passenger_to_gemfile]] ==== Does Phusion Passenger itself need to be added to the Gemfile? It is never necessary to add Phusion Passenger to the application's Gemfile. In case of Phusion Passenger Standalone, it is not necessary to execute the `passenger` command through `bundle exec`. The reason for this is because Phusion Passenger automatically loads the Gemfile environment. Most other Ruby application servers do not automatically load the Gemfile environment, which is why they must be added to the Gemfile and be executed with `bundle exec`. Even when your application uses any of the Phusion Passenger APIs, you still do not need to add Phusion Passenger to the Gemfile. The only thing you need to do is to put Phusion Passenger API calls inside `if` blocks that check whether Phusion Passenger is active, by checking whether the `PhusionPassenger` namespace is defined: [code,ruby] ------------------------------------ if defined?(PhusionPassenger) ... end ------------------------------------ === Installing multiple Ruby on Rails versions === Each Ruby on Rails applications that are going to be deployed may require a specific Ruby on Rails version. You can install a specific version with this command: ----------------------------- gem install rails -v X.X.X ----------------------------- where 'X.X.X' is the version number of Ruby on Rails. All of these versions will exist in parallel, and will not conflict with each other. Phusion Passenger will automatically make use of the correct version. === Making the application restart after each request === In some situations it might be desirable to restart the web application after each request, for example when developing a non-Rails application that doesn't support code reloading, or when developing a web framework. To achieve this, simply create the file 'tmp/always_restart.txt' in your application's root folder. Unlike 'restart.txt', Phusion Passenger does not check for this file's timestamp: Phusion Passenger will always restart the application, as long as 'always_restart.txt' exists. NOTE: If you're just developing a Rails application then you probably don't need this feature. If you set ifdef::apache['RailsEnv development'] ifdef::nginx['rails_env development'] in your web server configuration, then Rails will automatically reload your application code after each request. 'always_restart.txt' is mostly useful when you're using a web framework that doesn't support code reloading by itself, of when you're working on a web framework yourself. [[sub_uri_deployment_uri_fix]] === How to fix broken images/CSS/JavaScript URIs in sub-URI deployments Some people experience broken images and other broken static assets when they deploy their application to a sub-URI (i.e. 'http://mysite.com/railsapp/'). The reason for this usually is that you used a static URI for your image in the views. This means your 'img' source probably refers to something like '/images/foo.jpg'. The leading slash means that it's an absolute URI: you're telling the browser to always load 'http://mysite.com/images/foo.jpg' no matter what. The problem is that the image is actually at 'http://mysite.com/railsapp/images/foo.jpg'. There are two ways to fix this. The first way (not recommended) is to change your view templates to refer to 'images/foo.jpg'. This is a relative URI: note the lack of a leading slash). What this does is making the path relative to the current URI. The problem is that if you use restful URIs, then your images will probably break again when you add a level to the URI. For example, when you're at 'http://mysite.com/railsapp' the browser will look for 'http://mysite.com/railsapp/images/foo.jpg'. But when you're at 'http://mysite.com/railsapp/controller'. the browser will look for 'http://mysite.com/railsapp/controller/images/foo.jpg'. So relative URIs usually don't work well with layout templates. The second and highly recommended way is to always use Rails helper methods to output tags for static assets. These helper methods automatically take care of prepending the base URI that you've deployed the application to. For images there is `image_tag`, for JavaScript there is `javascript_include_tag` and for CSS there is `stylesheet_link_tag`. In the above example you would simply remove the '' HTML tag and replace it with inline Ruby like this: --------------------------------------- <%= image_tag("foo.jpg") %> --------------------------------------- This will generate the proper image tag to `$RAILS_ROOT/public/images/foo.jpg` so that your images will always work no matter what sub-URI you've deployed to. These helper methods are more valuable than you may think. For example they also append a timestamp to the URI to better facilitate HTTP caching. For more information, please refer to link:http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html[the Rails API docs]. === Out-of-Band Work and Out-of-Band Garbage Collection **Available since Phusion Passenger 4.0.0.** **At this time, this feature is only available on Ruby.** The Out-of-Band Work feature allows you to run arbitrary long-running tasks outside normal request cycles. This works by letting current requests to the process finish, then telling the process to perform the out-of-band work, then resuming passing requests to the process after said work is finished. A specific (and perhaps primary) use case of of Out-of-Band Work is *Out-of-Band Garbage Collection*. The garbage collector is run outside normal request cycles so that garbage collection runs inside normal request cycles can finish a lot faster. This can potentially save tens to hundreds of milliseconds of latency in requests. Because Out-of-Band Work is implemented at the Phusion Passenger inter-process request routing level, and not by, say, spawning a thread inside the application process, Out-of-Band Work has the following useful properties: - It works well even with tasks that can pause all threads. The MRI Ruby garbage collector is a stop-the-world mark-and-sweep garbage collector. - Phusion Passenger can spawn more processes as necessary, in order to prevent situations in which all application processes are busy performing out-of-band work. Phusion Passenger guarantees that there's at least one process that's ready to process requests. - Phusion Passenger guarantees that no more than 1 process is performing out-of-band work at the same time. Applications can use Out-of-Band Work as follows: 1. Ensure that ifdef::apache[] <> and <> endif::[] ifdef::nginx[] <> and <> endif::[] are both larger than 1. Out-of-band work only works if there are at least 2 application processes. 2. Request out-of-band work by outputting the `X-Passenger-Request-OOB-Work` header during a request. It does not matter what the value is. At this time, it is not possible to request out-of-band work from outside requests. 3. You can actually perform out-of-band work when you receive a `:oob_work` Phusion Passenger event. Note that even though you can request out-of-band work, there's no guarantee that Phusion Passenger will send an `oob_work` event in a timely manner, if at all. It is also possible that Phusion Passenger sends an `oob_work` event without you ever having requested one. This latter could for example happen if the OOB work is administrator-initiated. Do not make any assumptions in your code. Here's an example which implements out-of-band garbage collection using the Out-of-Band framework. This example code doesn't do anything when the code is not being run in Phusion Passenger, thanks to the `if` block. [source, ruby] ------------------------------------------------- # Somewhere in a controller method: # Tell Phusion Passenger we want to perform OOB work. response.headers["X-Passenger-Request-OOB-Work"] = "true" # Somewhere during application initialization: if defined?(PhusionPassenger) PhusionPassenger.on_event(:oob_work) do # Phusion Passenger has told us that we're ready to perform OOB work. t0 = Time.now GC.start Rails.logger.info "Out-Of-Bound GC finished in #{Time.now - t0} sec" end end ------------------------------------------------- For your convenience, Phusion Passenger provides a Rack middleware for out-of-band garbage collection. Add the following to your `config.ru`. Likewise, this example code doesn't do anything when the code is not being run in Phusion Passenger, thanks to the `if` block. [source, ruby] ---------------------------------------------------- if defined?(PhusionPassenger) PhusionPassenger.require_passenger_lib 'rack/out_of_band_gc' # Trigger out-of-band GC every 5 requests. use PhusionPassenger::Rack::OutOfBandGc, 5 end ---------------------------------------------------- It should be noted that, although the application uses the Phusion Passenger API, it is <>. References: - link:http://blog.phusion.nl/2013/01/22/phusion-passenger-4-technology-preview-out-of-band-work/[The Phusion Blog article which first introduced this feature.] === Hooks :version: 4.0.28 include::since_version.txt[] Phusion Passenger provides a powerful but simple hooking system, which allows you to extend many aspects of Phusion Passenger's behavior. The hooking system works by executing commands during certain events. Event parameters are passed to the command in the form of environment variables. ifdef::apache[] You can define hooks by setting the configuration option `PassengerCtl hook_ `. endif::apache[] ifdef::nginx[] You can define hooks by setting the configuration option `passenger_ctl hook_ ;`. endif::nginx[] ifdef::standalone[] You can define hooks by <>, and adding the configuration option `passenger_ctl hook_ ;`. endif::standalone[] ==== Example The hook system is best demonstrated with a simple example. In the following example we will hook into the `attached_process` event. This event is called whenever Phusion Passenger has successfully spawned an application processes and added it to the process pool. We print the process's PID and application root. First, let's create a script `/home/phusion/attached.sh` which is to be called during the hook. [source,sh] --------------------------------------------------- #!/bin/sh echo "Attached process $PASSENGER_PROCESS_PID for app $PASSENGER_APP_ROOT." --------------------------------------------------- Then we make it executable: --------------------------------------------------- chmod +x /home/phusion/attached.sh --------------------------------------------------- And we define the hook in the configuration file: ifdef::apache[] --------------------------------------------------- PassengerCtl hook_attached_process /home/phusion/attached.sh --------------------------------------------------- endif::apache[] ifdef::nginx[] --------------------------------------------------- passenger_ctl hook_attached_process /home/phusion/attached.sh; --------------------------------------------------- endif::nginx[] ifdef::standalone[] --------------------------------------------------- passenger_ctl hook_attached_process /home/phusion/attached.sh; --------------------------------------------------- endif::standalone[] Now restart the web server and access a web app hosted by Phusion Passenger. You should see our message in the web server error log: --------------------------------------------------- [ 2013-12-10 16:12:21.6456 28934/0x1064cb000 Hooks.h:129 ]: Running attached_process hook script: /home/phusion/attached.sh Attached process 28303 for app /webapps/foobar. [ 2013-12-10 16:12:21.6580 28934/0x1064cb000 Hooks.h:161 ]: Hook script /home/phusion/attached.sh (PID 28948) exited with status 0 --------------------------------------------------- ==== Environment A lot of information is passed to hook scripts in the form of environment variables. They are all uppercase and begin with `PASSENGER_`. Some environment variables are passed to all hook scripts, others are passed depending on the hook. Here are some of the environment variables which are passed to all hooks, unless documented otherwise: * `PASSENGER_VERSION` * `PASSENGER_PASSENGER_ROOT` * `PASSENGER_SERVER_INSTANCE_DIR` * `PASSENGER_GENERATION_PATH` ==== Blocking and concurrency All hooks block. That is, Phusion Passenger waits until your hook command is finished. You should therefore be careful when writing hook scripts: if your script never finishes, so Phusion Passenger does not do that either. If you have a bug in your script and it blocks, then you will be able to see that using the command `passenger-status --show=backtraces` which prints the backtraces of all threads in the Phusion Passenger HelperAgent. Look for the `runSingleHookScript` function in the backtrace. The following example shows at line 2 that Phusion Passenger is waiting for the hook script `/home/phusion/badscript.sh`. --------------------------------------------------------------------------------------------------- Thread 'Group process spawner: /home/phusion/webapp.test#default' (0x1062d4000): in 'bool Passenger::runSingleHookScript(Passenger::HookScriptOptions &, const string &, const vector > &)' (Hooks.h:116) -- /home/phusion/badscript.sh in 'bool Passenger::runHookScripts(Passenger::HookScriptOptions &)' (Hooks.h:159) in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const SpawnerPtr &, const Passenger::ApplicationPool2::Options &, unsigned int)' (Implementation.cpp:878) --------------------------------------------------------------------------------------------------- Hooks may be called concurrently. For example, while the `attached_process` hook is being called, a `detached_process` hook may be called, perhaps even for the same application. It is your responsibility to ensure that your hook scripts are concurrency-safe, e.g. by employing locks and other concurrency control techniques. ==== Error handling If a hook script fails -- that is, if it exits with anything other than exit code 0 -- then the error handling depends on the hook. Some hooks will abort, other hooks will ignore the error. In all cases, the result of the hook script is printed to the log. ==== Compatibility Because hooks are inherently tied to the implementation of Phusion Passenger, there is no guarantee that hooks that currently work will continue to be available in the future versions of Phusion Passenger. The availability of hooks is very much tied to the specific version of Phusion Passenger. ==== Available hooks `before_watchdog_initialization`:: Called at the very beginning of Phusion Passenger's life cycle, during the start of the Watchdog process. The first hook is called before initialization is performed (before the HelperAgent is started). Errors in the hook script cause Phusion Passenger to abort. `after_watchdog_initialization`:: Like `before_watchdog_initialization`, but called after initialization of all Phusion Passenger agent processes. Errors in the hook script cause Phusion Passenger to abort. `attached_process`:: Called when Phusion Passenger has successfully spawned an application processes and added it to the process pool. Extra environment variables: `PASSENGER_PROCESS_PID`, `PASSENGER_APP_ROOT`. Errors in the hook script are ignored. `detached_process`:: Called when Phusion Passenger has removed an application process from the process pool. This could happen when: + - The process has crashed, and Phusion Passenger noticed it. - Phusion Passenger has shut down a process because it's been idle for too long. - The administrator configured different resource limits, and Phusion Passenger is starting or shutting down processes in response. - Phusion Passenger itself is shutting down. + Extra environment variables: `PASSENGER_PROCESS_PID`, `PASSENGER_APP_ROOT`. Errors in the hook script are ignored. `after_initialize_supergroup`:: Called right after Phusion Passenger has allocated data structures for an application, and is about to spawn a process for the first time for this application. Errors in the hook script are ignored. Extra environment variables: `PASSENGER_APP_ROOT`. `before_destroy_supergroup`:: Called right before Phusion Passenger decallocates data structures for an application. Errors in the hook script are ignored. + Note that the `after_initialize_supergroup` hook may be called while this hook is still being executed, so make sure that operations don't conflict with each other. + Extra environment variables: `PASSENGER_APP_ROOT`. [[flying_passenger]] === Flying Passenger :version: 4.0.6 include::enterprise_only.txt[] Flying Passenger allows one to decouple Phusion Passenger's life time from the web server's life time, so that the web server can be independently restarted from Phusion Passenger, and from any of the application processes served by Phusion Passenger. Normally, Phusion Passenger starts together with the web server, and shuts down together with the web server. The advantages of this default behavior is that it makes Phusion Passenger easy to administer: one only has to deal with the web server process and can expect all relevant processes to be cleaned up after a web server shut down. However this also brings about a disadvantage: every time one restarts the web server (e.g. to make a minor configuration change), Phusion Passenger and all its application processes also get restarted. This problem is solved by 'Flying Passenger', which is an advanced mode of operation in Phusion Passenger that allows the web server to be indepedently restarted from Phusion Passenger. When this mode is enabled: - One must start Phusion Passenger separately from the web server, namely by starting the Flying Passenger daemon. This daemon must - to an extent - be separately configured and managed from the web server. - The web server must be configured to forward requests to the Flying Passenger daemon. - You should beware of the <>. ==== Requirements At this time, this feature is **only available in the Enterprise version of Phusion Passenger for Nginx**. You must have Phusion Passenger for Nginx properly installed. ==== Basic usage Start the Flying Passenger daemon by invoking the `flying-passenger` command. The only required option is `--socket-file`. Depending on whether you wish to enable <>, you have to start `flying-passenger` with root privileges or not. ------------------- $ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock I, [2013-06-14T09:10:13.095339 #77179] INFO -- : Welcome to Flying Passenger 4.1.0 I, [2013-06-14T09:10:13.095339 #77179] INFO -- : Starting PassengerWatchdog... I, [2013-06-14T09:10:13.097036 #77179] INFO -- : PassengerWatchdog started on PID 77181 ... I, [2013-06-14T09:10:13.129017 #77179] INFO -- : PassengerWatchdog initialized properly I, [2013-06-14T09:10:13.129127 #77179] INFO -- : Flying Passenger up and listening on /var/run/flying-passenger.sock! ------------------- Now configure Phusion Passenger for Nginx to make use of the Flying Passenger daemon, by setting the `passenger_fly_with` option to the socket filename: ------------------- http { ... passenger_fly_with /var/run/flying-passenger.sock; ... } ------------------- After (re)starting Nginx, Nginx + Flying Passenger is fully operational: ------------------- $ sudo /path-to/nginx ------------------- You can test it by adding a virtual host for a web app: ------------------- http { ... server { listen 80; server_name www.foo.local; root /webapps/foo/public; passenger_enabled on; } } ------------------- Verify that it works by making an HTTP request to it: --------------------------------- $ curl http://www.foo.local/ --------------------------------- Now let's verify that restarting the web server does not restart the just-spawned application process. Run `passenger-status` to obtain the PID of the application process: --------------------------------- $ sudo passenger-status Version: 4.1.0 Date : 2013-06-14 09:21:51 -0400 .---------- General information ----------- Max pool size : 6 Processes : 1 Requests in top-level queue : 0 .---------- Application groups ----------- /webapps/foo#default: App root: /webapps/foo Requests in queue: 0 * PID: 77283 Sessions: 0 Processed: 1 Uptime: 2s CPU: 1% Memory : 8M Last used: 2s ago --------------------------------- As you can see, the PID of the application process is **77283**. Now let's see what happens if we restart Nginx: ------------------------ $ sudo /path-to/nginx -s stop $ sudo /path-to/nginx $ sudo passenger-status ------------------------ The application process should remain there, unchanged: --------------------------------- $ sudo passenger-status Version: 4.1.0 Date : 2013-06-14 09:21:51 -0400 .---------- General information ----------- Max pool size : 6 Processes : 1 Requests in top-level queue : 0 .---------- Application groups ----------- /webapps/foo#default: App root: /webapps/foo Requests in queue: 0 * PID: 77283 Sessions: 0 Processed: 1 Uptime: 18s CPU: 1% Memory : 8M Last used: 18s ago --------------------------------- [[configuring_flying_passenger]] ==== Configuring Flying Passenger Flying Passenger gets *some* configuration from the web server, but not all. In particular, most web server directives that are only valid in the `http` context, e.g. <>, have no effect when using Flying Passenger. Instead, you are supposed to pass these configuration directives through command line options to the Flying Passenger daemon. Configuration directives that have no effect on Flying Passenger are documented as such. You can assume that configuration directives that are not documented as such, work fine on Flying Passenger. For example, to achieve the same effect as setting passenger_log_level to 2, run the Flying Passenger daemon as follows: ---------------------------------- $ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock --log-level=2 ---------------------------------- Currently, not all configuration directives have a Flying Passenger equivalent. Run the following command to see an overview of available options: ---------------------------- $ flying-passenger --help ---------------------------- ==== Managing the Flying Passenger daemon The Flying Passenger daemon runs in the foreground by default. This is undesirable on server environments. You can make it go into the background by passing `--daemonize`, `--log-file` and `--pid-file`: -------------------------------------------------------------------------------- $ sudo flying-passenger --socket-file=/var/run/flying-passenger.sock \ --daemonize --log-file=/var/log/flying-passenger.log \ --pid-file=/var/run/flying-passenger.pid -------------------------------------------------------------------------------- You can shut down a Flying Passenger daemon by sending SIGINT or SIGTERM to it: -------------------------------------------------------------------------------- $ kill `cat /var/run/flying-passenger.pid` -------------------------------------------------------------------------------- We recommend using link:http://cr.yp.to/daemontools.html[daemontools] or link:http://smarden.org/runit/[runit] for managing the Flying Passenger daemon. These tools will allow automatically starting the Flying Passenger daemon at boot, and will automatically restart the daemon if it crashes. You can create and enable a daemontools/runit service as folows: -------------------------------- $ sudo mkdir /etc/service/flying-passenger $ sudo nano /etc/service/flying-passenger/run #!/bin/sh exec /path-to/flying-passenger \ --socket-file=/var/run/flying-passenger.sock \ --log-file=/var/log/flying-passenger.log \ --pid-file=/var/run/flying-passenger.pid -------------------------------- Immediately after creating the `run` file, daemontools/runit automatically runs it to start the daemon. Note that the location (`/etc/service`) depends on the OS or Linux distros. Sometimes it's `/service`. Also note that we start the Flying Passenger daemon without `--daemonize`. To shut down a daemontools/runit-managed daemon, you need to use `svc -d /etc/service/flying-passenger` (daemontools) or `sv stop /etc/service/flying-passenger` (runit) instead of sending a signal to the process. [[using_flying_passenger_with_mri_18_or_jruby]] ==== Using Flying Passenger with MRI 1.8 or JRuby Using Flying Passenger in combination with MRI Ruby 1.8 or with JRuby requires special attention. This is because the Flying Passenger daemon is written in Ruby, and requires proper `Process.spawn` support, which neither MRI 1.8 nor JRuby support. It is however possible to use Flying Passenger with MRI Ruby 1.8 and JRuby. You can't run the Flying Passenger daemon in MRI 1.8 or JRuby, but you can still run the web applications - hosted under Flying Passenger - in MRI 1.8 or JRuby. First, edit your Nginx configuration file and specify a Ruby interpreter for your web applications. For example: -------------------- # Connect to the Flying Passenger daemon on the following socket passenger_fly_with /var/run/flying-passenger.sock; ... server { listen 80; server_name www.foo.com; root /webapps/foo/public; passenger_enabled on; # Use JRuby for this web application passenger_ruby /opt/jruby/bin/jruby; } -------------------- Then you need to install a Ruby 1.9-compatible Ruby interpeter with POSIX spawn support, alongside JRuby/MRI 1.8. Ruby interpreters which can be used for running the Flying Passenger daemon include: * MRI Ruby >= 1.9. * Rubinius. The following example demonstrates how you can install MRI Ruby 1.9 in parallel with your MRI Ruby 1.8 or JRuby installation. Example for Debian/Ubuntu users: [source,sh] -------------------------------- # Install Ruby 1.9 sudo apt-get install ruby1.9.3 # Run the Flying Passenger daemon in Ruby 1.9 ruby1.9 -S flying-passenger --socket-file=/var/run/flying-passenger.sock -------------------------------- Example for RVM users: [source,sh] -------------------------------- # Install Ruby 1.9 rvm install 1.9.3 # Run the Flying Passenger daemon in Ruby 1.9 $ rvm-exec 1.9.3 ruby -S flying-passenger --socket-file=/var/run/flying-passenger.sock -------------------------------- The Flying Passenger daemon will now be run on Ruby 1.9, while the web application 'www.foo.com' will be run on JRuby. [[flying_passenger_caveats]] ==== Caveats and limitations Beware of the following caveats and limitations when using Flying Passenger: - The Nginx executable **must** be compiled with the same version of Phusion Passenger as the Flying Passenger daemon. Failing to meet this requirement may result in cryptic errors, or may result in certain features not working, until you've fixed the situation. When upgrading Phusion Passenger, you must restart both Nginx and the Flying Passenger daemon. - The <> directive has no effect. When using Flying Passenger, you are not supposed to set `passenger_root`. - The Flying Passenger daemon is written in Ruby. It requires a Ruby interpreter with proper `Process#spawn` support. At the time of writing, all Ruby interpreters in existance satisfy this requirement, except for MRI Ruby 1.8 and JRuby. See <> for more information. - When you add a new application to the web server configuration, Flying Passenger will automatically pick up the application's settings and spawn this new application upon the first request to it. However it is not capable of automatically starting the new app before a request has been sent to it (i.e. <>-like behavior is not available in this case). As a workaround, you can send an HTTP request to your application after starting the daemon, which forces it to spawn application processes. - When you remove an application from the web server configuration, Flying Passenger will not detect the removal and will not shut down the associated application processes. Killing the application processes will also not help, because Flying Passenger will restart them per the (now-removed, but still in the Flying Passenger daemon's memory) <> settings. At the moment, there are two ways to get rid of those processes: * Before removing the application from the web server configuration, explicitly set its `passenger_min_instances` to 0. Next, send a request to it, which will cause the Flying Passenger daemon to take over the new `passenger_min_instances 0` option. You can then proceed with removing the application from the web server configuration, and restarting the web server. Finally, kill the PIDs associated to those application processes and remove the application configuration. * Restart the Flying Passenger daemon. passenger-4.0.37/doc/users_guide_snippets/troubleshooting/000755 000765 000024 00000000000 12233035540 024453 5ustar00honglistaff000000 000000 passenger-4.0.37/doc/users_guide_snippets/under_the_hood/000755 000765 000024 00000000000 12233035540 024212 5ustar00honglistaff000000 000000 passenger-4.0.37/doc/users_guide_snippets/where_to_get_support.txt000644 000765 000024 00000002022 12233035540 026230 0ustar00honglistaff000000 000000 * link:http://groups.google.com/group/phusion-passenger[Community discussion forum] - post a message here if you're experiencing problems. Support on this forum is provided by the community on a best-effort basis, so a (timely) response is not guaranteed. * link:http://code.google.com/p/phusion-passenger/issues/list[Issue tracker] - report bugs here. * Email support@phusion.nl if you are a link:https://www.phusionpassenger.com/enterprise[Phusion Passenger Enterprise] customer. Please mention your order reference. If you are not an Enterprise customer, we kindly redirect you to the community discussion forum instead. * link:https://www.phusionpassenger.com/commercial_support[Commercial support contracts] are also available. * Report security vulnerabilities to security@phusion.nl. We will do our best to respond to you as quickly as we can, so please do not disclose the vulnerability until then. Please consult link:https://www.phusionpassenger.com/support[the Phusion Passenger website] for a full list of support resources. passenger-4.0.37/doc/users_guide_snippets/under_the_hood/page_caching_support.txt000644 000765 000024 00000002516 12233035540 031143 0ustar00honglistaff000000 000000 === Page caching support For each HTTP request, Phusion Passenger will automatically look for a corresponding page cache file, and serve that if it exists. It does this by appending ".html" to the filename that the URI normally maps to, and checking whether that file exists. This check occurs after checking whether the original mapped filename exists (as part of static asset serving). All this is done without the need for special mod_rewrite rules. For example, suppose that the browser requests '/foo/bar'. 1. Phusion Passenger will first check whether this URI maps to a static file, i.e. whether the file 'foo/bar' exists in the web application's 'public' directory. If it does then Phusion Passenger will serve this file through the web server immediately. 2. If that doesn't exist, then Phusion Passenger will check whether the file 'foo/bar.html' exists. If it does then Phusion Passenger will serve this file through the web server immediately. 3. If 'foo/bar.html' doesn't exist either, then Phusion Passenger will forward the request to the underlying web application. Note that Phusion Passenger's page caching support doesn't work if your web application uses a non-standard page cache directory, i.e. if it doesn't cache to the 'public' directory. In that case you'll need to use mod_rewrite to serve such page cache files.passenger-4.0.37/doc/users_guide_snippets/under_the_hood/relationship_with_ruby.txt000644 000765 000024 00000014665 12233035540 031564 0ustar00honglistaff000000 000000 [[relationship_with_ruby]] === Phusion Passenger and its relationship with Ruby ==== How Ruby is used Phusion Passenger's core is written in C++ for performance and memory efficiency. It supports web applications written in any language. Phusion Passenger requires Ruby, its usage of Ruby is minimal in order to maximize performance and to minimize memory usage. * Phusion Passenger's installer, build system and administration tools are written in Ruby. * Certain internally used tools, such as the crash handler (which generates a backtrace in case Phusion Passenger crash) and the prespawn script (used to implement ifdef::apache[] <>) endif::[] ifdef::nginx[] <>) endif::[] are written in Ruby as well. * Ruby web application support is implemented in Ruby. * If you use <>, then the Flying Passenger daemon is written in Ruby. The daemon is a small (less than 500 lines of code) and offloads most tasks to the C++ core. * If you use link:Users%20guide%20Standalone.html[Phusion Passenger Standalone], then the frontend (the `passenger` command) is written in Ruby. The frontend is small (less than 1500 lines of code) and offloads most tasks to the C++ core. Other than the aforementioned aspects, Phusion Passenger does not use Ruby during normal operation. For example, if you run Python WSGI web applications on Phusion Passenger, then there will be (almost) no Ruby code running on the system. ==== When the system has multiple Ruby interpreters Phusion Passenger may be installed with any Ruby interpreter. Once installed, you can run Phusion Passenger's Ruby parts under any Ruby interpreter you want, even if that Ruby interpreter was not the one you originally installed Phusion Passenger with. The reason for this is that Phusion Passenger does not dynamically link to Ruby: Phusion Passenger uses Ruby entirely out-of-process. Thus you can switch to any Ruby interpreter you want during runtime, without recompiling Phusion Passenger, and without worrying about what Ruby you used to install Phusion Passenger. Phusion Passenger is also capable of running Ruby web applications under any Ruby interpreter you want. So it is not important which Ruby you use to install Phusion Passenger: it will work regardless. Please refer to the documentation for the ifdef::apache[] <> endif::[] ifdef::nginx[] <> endif::[] directive to learn how run different web applications under different Ruby interpreters. .Caveat: RVM and RVM gemsets There is however one caveat if you happen to be using RVM or RVM gemsets. When you `gem install` Phusion Passenger using RVM, then RVM will install Phusion Passenger into the *currently active RVM Ruby and gemset*. This means that Phusion Passenger commands - such as `passenger`, `passenger-install-xxx-module` and `passenger-status` - are available in that same RVM Ruby and gemset only. When you switch Ruby interpreter, or when you switch gemset, the Phusion Passenger commands will no longer be available, and you will get a `command not found` error. Here's an example which demonstrates the problem. ."Command not found" problem demonstration [source,sh] ------------------------ ## Install Phusion Passenger (open source edition) using Ruby 1.9.3 ## and the 'business' gemset $ rvm use 1.9.3 Using /home/phusion/.rvm/gems/ruby-1.9.3-p429 $ rvm gemset create business $ rvm gemset use business Using ruby-1.9.3-p429 with gemset business $ curl -O https://s3.amazonaws.com/phusion-passenger/releases/gem_bootstrap.sh $ eval "`sh gem_bootstrap.sh`" $ gem install passenger ## Verify that passenger works $ passenger --version Phusion Passenger version 4.0.14 ## Switch to a different RVM gemset. You will get a `command not found` $ rvm gemset use default Using ruby-1.9.3-p429 with gemset default $ passenger --version bash: passenger: command not found ## Switch to a different Ruby interpreter. You will also get ## a `command not found` $ rvm use 2.0.0 Using /home/phusion/.rvm/gems/ruby-2.0.0-p195 $ passenger --version bash: passenger: command not found ## Switch back to the Ruby and gemset that you installed Phusion ## Passenger with, and verify that it works again $ rvm use 1.9.3 Using /home/phusion/.rvm/gems/ruby-2.0.0-p195 $ rvm gemset use business Using ruby-1.9.3-p429 with gemset business $ passenger --version Phusion Passenger version 4.0.14 ------------------------ .Solutions There are several ways to solve this problem: 1. Permanently add Phusion Passenger's command directory to your PATH, so that your shell can always find them even when you switch RVM Ruby or gemset. If you don't know what PATH means, please read <> first. + The drawback is that you have to redo this every time you upgrade Phusion Passenger, because the Phusion Passenger directory filename is dependent on the version number. + First, identify the location of the Phusion Passenger command directory, like this: + ------------------------------------------------------------------ $ echo `passenger-config --root`/bin /home/phusion/.rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.15/bin ------------------------------------------------------------------ + Next, add the directory that you've found to your current shell's PATH: + ------------------------------------------------------------------ $ export PATH=/home/phusion/.rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.15/bin:$PATH ------------------------------------------------------------------ + Finally, make the change permanent by appending the above command to your bash startup file: + ------------------------------------------------------------------ $ echo 'export PATH=/home/phusion/.rvm/gems/ruby-1.9.3-p429/gems/passenger-4.0.15/bin:$PATH' >> ~/.bashrc ------------------------------------------------------------------ 2. Switch back to the RVM Ruby and gemset that you installed Phusion Passenger with, before running any Phusion Passenger command. 3. Prepend any Phusion Passenger command with `rvm-exec RUBY_NAME@GEMSET_NAME ruby -S`. If the relevant Phusion Passenger command also needs root privileges, then prepend `rvmsudo` before that. For example: + ------------------------------------------------------------------ rvm-exec 1.9.3@business ruby -S passenger --version rvmsudo rvm-exec 1.9.3@business ruby -S passenger-install-apache2-module ------------------------------------------------------------------ passenger-4.0.37/doc/users_guide_snippets/troubleshooting/default.txt000644 000765 000024 00000013203 12233035540 026637 0ustar00honglistaff000000 000000 === Generic troubleshooting tips One of the first things you should do upon encountering a problem, is to check ifdef::apache[] the *global* (not the per-vhost) Apache error log file. This is typically located in `/var/log/apache2/error_log`. You can find out the exact location of the error log by running `passenger-config --detect-apache2`. endif::[] ifdef::nginx[] the global Nginx error log file. This is one specified by the `error_log` directive in the main context (*not* the one inside the `http` context). The file is typically located in /var/log/nginx/error.log. endif::[] ifndef::standalone[] This log file contains: * Phusion Passenger error messages. * Everything that the application writes to STDERR. This typically consists of errors that the application encounters during startup, but not errors that it encounters when it's handling requests. endif::[] ifdef::standalone[] Phusion Passenger Standalone log file. This is typically located in `log/passenger.[PORT NUMBER].log`. Most problems are logged to this log file. endif::[] ifndef::standalone[] If you're using Ruby on Rails, then you should also check out `log/development.log` and `log/production.log`. When an error occurs during request handling, it is typically logged here. This file does **not** contain errors that Rails encounters during startup. Finally, you should be aware that Phusion Passenger runs your application under the 'production' environment by default, not 'development'. You can change this using the ifdef::apache[] <> endif::[] ifdef::nginx[] <> endif::[] option. endif::[] If neither the logs nor this troubleshooting guide can help you, then please check out our <>. ifndef::standalone[] === Why does the first request take a long time? **Symptoms**:: The first request to your application takes more time than usual. Subsequent requests have the normal speed. **Cause**:: Phusion Passenger starts your application the first time it is accessed, not during web server startup. Some applications can take several seconds to start. If you're using Ruby on Rails, then needing 10 seconds to start your application is normal. On slow or heavily loaded servers, or in case of large and heavy applications, the startup time may be even longer. **Solution**:: Use the ifdef::nginx[] <> endif::[] ifdef::apache[] <> endif::[] configuration option. endif::[] ifdef::nginx[] === Upon accessing the web app, Nginx reports a "Permission denied" error **Symptoms**:: A typical error message looks like this: + --------------------------------------------- 2013/10/21 17:16:03 [alert] 98687#0: *1 Cannot stat '/Users/phusion/Sites/rack.test/config.ru': Permission denied (errno=13); This error means that the Nginx worker process (PID 99064, running as UID 70) does not have permission to access this file. Please read the manual to learn how to fix this problem: section 'Troubleshooting' -> 'Upon accessing the web app, Nginx reports a "Permission denied" error'; Extra info, client: 127.0.0.1, server: www.foo.com, request: "GET / HTTP/1.1", host: "www.foo.com" --------------------------------------------- **Cause**:: Phusion Passenger tries to access your application directory in order to find out what language it's written in. This access is initiated from inside an Nginx worker process. This error indicates that the Nginx worker process does not have the proper permissions to access your application's root directory. **Solution**:: You need to relax permissions to that the Nginx worker process can access your application directory, by making the directory group- and world-*executable*: + --------------------------------------------------- sudo chmod g+x,o+x /Users/phusion/Sites/rack.test --------------------------------------------------- + You *also* need to ensure that all parent directories are also 'executable' by the Nginx process: + --------------------------------------------------- sudo chmod g+x,o+x /Users/phusion/Sites sudo chmod g+x,o+x /Users/phusion sudo chmod g+x,o+x /Users --------------------------------------------------- + .Why 'executable' permission and not 'readable'? [NOTE] On Unix, the 'executable' permission on directories dictates whether a process is allowed to *access* files or subdirectories within that directory. The 'readable' permission dictates whether a process is allowed to see what files are inside the directory, but does not necessarily allow access to them. You can learn more at link:http://en.wikipedia.org/wiki/File_system_permissions#Permissions[Wikipedia]. endif::[] ifdef::standalone[] === Upon uploading a file, Phusion Passenger reports "client_body_temp/00000000xx failed (2: No such file or directory)" **Symptoms**:: When performing an HTTP POST call, the request sometimes fails, with Phusion Passenger reporting an error along the lines of: + ------------------------- /tmp/passenger-standalone.8583/client_body_temp/0000000022" failed (2: No such file or directory), client: 127.0.0.1, server: www.foo.com ------------------------- **Cause**:: Phusion Passenger buffers HTTP POST bodies (file uploads) to a temporary directory, by default `/tmp/passenger-standalone.xxx`. This error means that Phusion Passenger that that directory has been removed, probably by some other program. **Solution**:: Tell Phusion Passenger to use a different directory to store its temporary files passing the `--temp-dir` command line option. For example: + --------------------------------------- mkdir $HOME/tmp cd /path-to-your-app passenger start --temp-dir=$HOME/tmp --------------------------------------- endif::[] passenger-4.0.37/doc/users_guide_snippets/troubleshooting/rails.txt000644 000765 000024 00000004320 12233035540 026325 0ustar00honglistaff000000 000000 === Ruby on Rails-specific troubleshooting ==== The "About your application's environment" link does not work The "About your application's environment" link only works if the application is started in the 'development' environment. Phusion Passenger starts the application in the 'production' environment by default. Please use ifdef::apache[] <> endif::[] ifdef::nginx[] <> endif::[] to change it. ==== The Rails application reports that it's unable to start because of a permission error Please check whether your Rails application's folder has the correct permissions. By default, Rails applications are started as the owner of the file `config.ru`, except if the file is owned by root. If the file is owned by root, then the Rails application will be started as 'nobody' (or as the user specify by <>, if that's specified). Please read <> for details. ==== The Rails application's log file is not being written to There are a couple things that you should be aware of: - By default, Phusion Passenger runs Rails applications in 'production' mode, so please be sure to check `production.log` instead of `development.log`. + See ifdef::apache[] <> endif::[] ifdef::nginx[] <> endif::[] for configuration. - By default, Phusion Passenger runs Rails applications as the owner of `config.ru`. So the log file can only be written to if that user has write permission to the log file. Please `chmod` or `chown` your log file accordingly. + See <> for details. If you're using a RedHat-derived Linux distribution (such as Fedora or CentOS) then it is link:http://code.google.com/p/phusion-passenger/issues/detail?id=4[possible that SELinux is interfering]. RedHat's SELinux policy only allows Apache to read/write directories that have the 'httpd_sys_content_t' security context. Please run the following command to give your Rails application folder that context: ----------------------------------------------------------- chcon -R -h -t httpd_sys_content_t /path/to/your/rails/app ----------------------------------------------------------- passenger-4.0.37/doc/users_guide_snippets/installation/run_installer.txt000644 000765 000024 00000007705 12233035540 027360 0ustar00honglistaff000000 000000 ifdef::apache[] The Phusion Passenger gem only contains source files. In this step we will use the installer to compile the Phusion Passenger binaries, which include the various Phusion Passenger agent executables and the Apache module. Run the following command and follow the on-screen instructions. ifdef::gem[] ---------------------------------- passenger-install-apache2-module ---------------------------------- endif::[] ifdef::tarball[] ---------------------------------- ./bin/passenger-install-apache2-module ---------------------------------- endif::[] At the end of the installation process, you will be asked to copy and paste a configuration snippet (containing `LoadModule`, `PassengerRoot`, etc.) into your Apache configuration file. If you're upgrading, then you already had a similar configuration snippet. Be sure to remove the old one before pasting the new one. Different operating systems and Apache installations have different conventions with regard to where the Apache configuration file is and how it is organized. Please read <> if you're not familiar with it. That section is especially of interest for OS X Server >= 10.8 users because the configuration file may not be at a surprising location. If compilation doesn't succeed, then please consult the <> section. .What does the installer do? Despite the name, this "installer" doesn't actually install anything. The installer checks whether all required dependencies are installed, invokes the compiler, and tells you how to modify the Apache configuration file. However, it doesn't copy any files to outside the Phusion Passenger source directory. `passenger-install-apache2-module` is actually just a user-friendly frontend around the command `rake apache2`, which performs the actual compilation of Phusion Passenger. endif::[] ifdef::nginx[] Nginx is a different from other web servers in that it does not support loadable modules. The only way to extend Nginx is to recompile it entirely from source. Since Phusion Passenger consists of some external executables plus an Nginx module, you must recompile Nginx when first installing Phusion Passenger, but also when upgrading Nginx itself or when upgrading the Phusion Passenger version. Recompiling Nginx and the Phusion Passenger executables is what we will do in this step. The good news is that Phusion Passenger provides a tool to make this easy for you. If you've already installed Nginx before, but without Phusion Passenger support, then you *should* uninstall it first. You don't have to, because you can also install another Nginx with Phusion Passenger support, in parallel to the existing Nginx. We merely recommend uninstalling the existing in order to avoid user confusion, but the choice is yours. If you had previously installed Nginx with Phusion Passenger support, and you are upgrading, then you don't have to uninstall your existing Nginx first. Instead we'll overwrite it this step. But it is important that you recompile Nginx with the configure parameters that you used last time. Here's how you can uninstall the original Nginx: - If you installed the existing Nginx through APT, run: `sudo apt-get remove nginx nginx-full nginx-light nginx-naxsi nginx-common` - If you installed the existing Nginx through YUM, run `yum remove nginx` as root. To proceed with installing or upgrading Phusion Passenger, run the Phusion Passenger Nginx installer and follow the on-screen instructions: ifdef::gem[] ---------------------------------- passenger-install-nginx-module ---------------------------------- endif::[] ifdef::tarball[] ---------------------------------- ./bin/passenger-install-nginx-module ---------------------------------- endif::[] At some point it will ask you which prefix to install Nginx to. If you're upgrading, then specify the same prefix that you used last time, as well as the same configuration parameters that you used last time. endif::[]passenger-4.0.37/doc/users_guide_snippets/installation/verify_running_epilogue.txt000644 000765 000024 00000000651 12233035540 031425 0ustar00honglistaff000000 000000 You should see the web server processes as well as a number of Phusion Passenger processes (e.g. PassengerWatchdog, PassengerHelperAgent). Congratulations, Phusion Passenger is now installed and running! ifdef::nginx[] At this point you may be interested in <>. endif::[] If the output is not as expected, then please refer to the <> section.passenger-4.0.37/doc/templates/bootstrap.min.css000644 000765 000024 00000114725 12233035540 022302 0ustar00honglistaff000000 000000 /*! * Bootstrap v2.0.3 * * Copyright 2012 Twitter, Inc * Licensed under the Apache License v2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Designed and built with all the love in the world @twitter by @mdo and @fat. */ .clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";} .clearfix:after{clear:both;} .hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;} .input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;} article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;} audio,canvas,video{display:inline-block;*display:inline;*zoom:1;} audio:not([controls]){display:none;} html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;} a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} a:hover,a:active{outline:0;} sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;} sup{top:-0.5em;} sub{bottom:-0.25em;} img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;} button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;} button,input{*overflow:visible;line-height:normal;} button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;} button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;} input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;} input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;} textarea{overflow:auto;vertical-align:top;} body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333333;background-color:#ffffff;} a{color:#0088cc;text-decoration:none;} a:hover{color:#005580;text-decoration:underline;} p{margin:0 0 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;}p small{font-size:11px;color:#999999;} .lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px;} h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999999;} h1{font-size:30px;line-height:36px;}h1 small{font-size:18px;} h2{font-size:24px;line-height:36px;}h2 small{font-size:18px;} h3{font-size:18px;line-height:27px;}h3 small{font-size:14px;} h4,h5,h6{line-height:18px;} h4{font-size:14px;}h4 small{font-size:12px;} h5{font-size:12px;} h6{font-size:11px;color:#999999;text-transform:uppercase;} .page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eeeeee;} .page-header h1{line-height:1;} ul,ol{padding:0;margin:0 0 9px 25px;} ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} ul{list-style:disc;} ol{list-style:decimal;} li{line-height:18px;} ul.unstyled,ol.unstyled{margin-left:0;list-style:none;} dl{margin-bottom:18px;} dt,dd{line-height:18px;} dt{font-weight:bold;line-height:17px;} dd{margin-left:9px;} .dl-horizontal dt{float:left;width:120px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} .dl-horizontal dd{margin-left:130px;} hr{margin:18px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;} strong{font-weight:bold;} em{font-style:italic;} .muted{color:#999999;} abbr[title]{cursor:help;border-bottom:1px dotted #ddd;} abbr.initialism{font-size:90%;text-transform:uppercase;} blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px;} blockquote small{display:block;line-height:18px;color:#999999;}blockquote small:before{content:'\2014 \00A0';} blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;} q:before,q:after,blockquote:before,blockquote:after{content:"";} address{display:block;margin-bottom:18px;font-style:normal;line-height:18px;} small{font-size:100%;} cite{font-style:normal;} code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;} pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:18px;} pre code{padding:0;color:inherit;background-color:transparent;border:0;} .pre-scrollable{max-height:340px;overflow-y:scroll;} .label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;} .label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;} a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;} .label-important,.badge-important{background-color:#b94a48;} .label-important[href],.badge-important[href]{background-color:#953b39;} .label-warning,.badge-warning{background-color:#f89406;} .label-warning[href],.badge-warning[href]{background-color:#c67605;} .label-success,.badge-success{background-color:#468847;} .label-success[href],.badge-success[href]{background-color:#356635;} .label-info,.badge-info{background-color:#3a87ad;} .label-info[href],.badge-info[href]{background-color:#2d6987;} .label-inverse,.badge-inverse{background-color:#333333;} .label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;} table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;} .table{width:100%;margin-bottom:18px;}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;} .table th{font-weight:bold;} .table thead th{vertical-align:bottom;} .table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;} .table tbody+tbody{border-top:2px solid #dddddd;} .table-condensed th,.table-condensed td{padding:4px 5px;} .table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;} .table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;} .table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px;} .table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px;} .table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;} .table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;} .table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;} .table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5;} table .span1{float:none;width:44px;margin-left:0;} table .span2{float:none;width:124px;margin-left:0;} table .span3{float:none;width:204px;margin-left:0;} table .span4{float:none;width:284px;margin-left:0;} table .span5{float:none;width:364px;margin-left:0;} table .span6{float:none;width:444px;margin-left:0;} table .span7{float:none;width:524px;margin-left:0;} table .span8{float:none;width:604px;margin-left:0;} table .span9{float:none;width:684px;margin-left:0;} table .span10{float:none;width:764px;margin-left:0;} table .span11{float:none;width:844px;margin-left:0;} table .span12{float:none;width:924px;margin-left:0;} table .span13{float:none;width:1004px;margin-left:0;} table .span14{float:none;width:1084px;margin-left:0;} table .span15{float:none;width:1164px;margin-left:0;} table .span16{float:none;width:1244px;margin-left:0;} table .span17{float:none;width:1324px;margin-left:0;} table .span18{float:none;width:1404px;margin-left:0;} table .span19{float:none;width:1484px;margin-left:0;} table .span20{float:none;width:1564px;margin-left:0;} table .span21{float:none;width:1644px;margin-left:0;} table .span22{float:none;width:1724px;margin-left:0;} table .span23{float:none;width:1804px;margin-left:0;} table .span24{float:none;width:1884px;margin-left:0;} form{margin:0 0 18px;} fieldset{padding:0;margin:0;border:0;} legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333333;border:0;border-bottom:1px solid #eee;}legend small{font-size:13.5px;color:#999999;} label,input,button,select,textarea{font-size:13px;font-weight:normal;line-height:18px;} input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;} label{display:block;margin-bottom:5px;color:#333333;} input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555555;background-color:#ffffff;border:1px solid #cccccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .uneditable-textarea{width:auto;height:auto;} label input,label textarea,label select{display:block;} input[type="image"],input[type="checkbox"],input[type="radio"]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer;background-color:transparent;border:0 \9;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} input[type="image"]{border:0;} input[type="file"]{width:auto;padding:initial;line-height:initial;background-color:#ffffff;background-color:initial;border:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} input[type="button"],input[type="reset"],input[type="submit"]{width:auto;height:auto;} select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px;} input[type="file"]{line-height:18px \9;} select{width:220px;background-color:#ffffff;} select[multiple],select[size]{height:auto;} input[type="image"]{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} textarea{height:auto;} input[type="hidden"]{display:none;} .radio,.checkbox{min-height:18px;padding-left:18px;} .radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px;} .controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;} .radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;} .radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;} input,textarea{-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;} input:focus,textarea:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);} input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus,select:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .input-mini{width:60px;} .input-small{width:90px;} .input-medium{width:150px;} .input-large{width:210px;} .input-xlarge{width:270px;} .input-xxlarge{width:530px;} input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;} input,textarea,.uneditable-input{margin-left:0;} input.span12, textarea.span12, .uneditable-input.span12{width:930px;} input.span11, textarea.span11, .uneditable-input.span11{width:850px;} input.span10, textarea.span10, .uneditable-input.span10{width:770px;} input.span9, textarea.span9, .uneditable-input.span9{width:690px;} input.span8, textarea.span8, .uneditable-input.span8{width:610px;} input.span7, textarea.span7, .uneditable-input.span7{width:530px;} input.span6, textarea.span6, .uneditable-input.span6{width:450px;} input.span5, textarea.span5, .uneditable-input.span5{width:370px;} input.span4, textarea.span4, .uneditable-input.span4{width:290px;} input.span3, textarea.span3, .uneditable-input.span3{width:210px;} input.span2, textarea.span2, .uneditable-input.span2{width:130px;} input.span1, textarea.span1, .uneditable-input.span1{width:50px;} input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;border-color:#ddd;} input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;} .control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;} .control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853;}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e;} .control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;} .control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;} .control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48;}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392;} .control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;} .control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;} .control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847;}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b;} .control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;} input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;} .form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #ddd;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";} .form-actions:after{clear:both;} .uneditable-input{overflow:hidden;white-space:nowrap;cursor:not-allowed;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);} :-moz-placeholder{color:#999999;} ::-webkit-input-placeholder{color:#999999;} .help-block,.help-inline{color:#555555;} .help-block{display:block;margin-bottom:9px;} .help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;} .input-prepend,.input-append{margin-bottom:5px;}.input-prepend input,.input-append input,.input-prepend select,.input-append select,.input-prepend .uneditable-input,.input-append .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:middle;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}.input-prepend input:focus,.input-append input:focus,.input-prepend select:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{z-index:2;} .input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc;} .input-prepend .add-on,.input-append .add-on{display:inline-block;width:auto;height:18px;min-width:16px;padding:4px 5px;font-weight:normal;line-height:18px;text-align:center;text-shadow:0 1px 0 #ffffff;vertical-align:middle;background-color:#eeeeee;border:1px solid #ccc;} .input-prepend .add-on,.input-append .add-on,.input-prepend .btn,.input-append .btn{margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} .input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546;} .input-prepend .add-on,.input-prepend .btn{margin-right:-1px;} .input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} .input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} .input-append .uneditable-input{border-right-color:#ccc;border-left-color:#eee;} .input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} .input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;} .input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} .input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} .search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;} .form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;} .form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;} .form-search label,.form-inline label{display:inline-block;} .form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;} .form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;} .form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;} .control-group{margin-bottom:9px;} legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate;} .form-horizontal .control-group{margin-bottom:18px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";} .form-horizontal .control-group:after{clear:both;} .form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right;} .form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:160px;*margin-left:0;}.form-horizontal .controls:first-child{*padding-left:160px;} .form-horizontal .help-block{margin-top:9px;margin-bottom:0;} .form-horizontal .form-actions{padding-left:160px;} .btn{display:inline-block;*display:inline;*zoom:1;padding:4px 10px 4px;margin-bottom:0;font-size:13px;line-height:18px;*line-height:20px;color:#333333;text-align:center;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-ms-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(top, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #cccccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{background-color:#e6e6e6;*background-color:#d9d9d9;} .btn:active,.btn.active{background-color:#cccccc \9;} .btn:first-child{*margin-left:0;} .btn:hover{color:#333333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-ms-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;} .btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;} .btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);} .btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} .btn-large [class^="icon-"]{margin-top:1px;} .btn-small{padding:5px 9px;font-size:11px;line-height:16px;} .btn-small [class^="icon-"]{margin-top:-1px;} .btn-mini{padding:2px 6px;font-size:11px;line-height:14px;} .btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover,.btn-inverse,.btn-inverse:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} .btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);} .btn{border-color:#ccc;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);} .btn-primary{background-color:#0074cc;background-image:-moz-linear-gradient(top, #0088cc, #0055cc);background-image:-ms-linear-gradient(top, #0088cc, #0055cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0055cc));background-image:-webkit-linear-gradient(top, #0088cc, #0055cc);background-image:-o-linear-gradient(top, #0088cc, #0055cc);background-image:linear-gradient(top, #0088cc, #0055cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0055cc', GradientType=0);border-color:#0055cc #0055cc #003580;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#0055cc;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#0055cc;*background-color:#004ab3;} .btn-primary:active,.btn-primary.active{background-color:#004099 \9;} .btn-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-ms-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(top, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;*background-color:#df8505;} .btn-warning:active,.btn-warning.active{background-color:#c67605 \9;} .btn-danger{background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-ms-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(top, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;*background-color:#a9302a;} .btn-danger:active,.btn-danger.active{background-color:#942a25 \9;} .btn-success{background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-ms-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(top, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351;*background-color:#499249;} .btn-success:active,.btn-success.active{background-color:#408140 \9;} .btn-info{background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-ms-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(top, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;*background-color:#2a85a0;} .btn-info:active,.btn-info.active{background-color:#24748c \9;} .btn-inverse{background-color:#414141;background-image:-moz-linear-gradient(top, #555555, #222222);background-image:-ms-linear-gradient(top, #555555, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#555555), to(#222222));background-image:-webkit-linear-gradient(top, #555555, #222222);background-image:-o-linear-gradient(top, #555555, #222222);background-image:linear-gradient(top, #555555, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#555555', endColorstr='#222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#222222;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{background-color:#222222;*background-color:#151515;} .btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;} button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;} button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;} button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;} button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;} [class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("images/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0;} .icon-white{background-image:url("images/glyphicons-halflings-white.png");} .icon-glass{background-position:0 0;} .icon-music{background-position:-24px 0;} .icon-search{background-position:-48px 0;} .icon-envelope{background-position:-72px 0;} .icon-heart{background-position:-96px 0;} .icon-star{background-position:-120px 0;} .icon-star-empty{background-position:-144px 0;} .icon-user{background-position:-168px 0;} .icon-film{background-position:-192px 0;} .icon-th-large{background-position:-216px 0;} .icon-th{background-position:-240px 0;} .icon-th-list{background-position:-264px 0;} .icon-ok{background-position:-288px 0;} .icon-remove{background-position:-312px 0;} .icon-zoom-in{background-position:-336px 0;} .icon-zoom-out{background-position:-360px 0;} .icon-off{background-position:-384px 0;} .icon-signal{background-position:-408px 0;} .icon-cog{background-position:-432px 0;} .icon-trash{background-position:-456px 0;} .icon-home{background-position:0 -24px;} .icon-file{background-position:-24px -24px;} .icon-time{background-position:-48px -24px;} .icon-road{background-position:-72px -24px;} .icon-download-alt{background-position:-96px -24px;} .icon-download{background-position:-120px -24px;} .icon-upload{background-position:-144px -24px;} .icon-inbox{background-position:-168px -24px;} .icon-play-circle{background-position:-192px -24px;} .icon-repeat{background-position:-216px -24px;} .icon-refresh{background-position:-240px -24px;} .icon-list-alt{background-position:-264px -24px;} .icon-lock{background-position:-287px -24px;} .icon-flag{background-position:-312px -24px;} .icon-headphones{background-position:-336px -24px;} .icon-volume-off{background-position:-360px -24px;} .icon-volume-down{background-position:-384px -24px;} .icon-volume-up{background-position:-408px -24px;} .icon-qrcode{background-position:-432px -24px;} .icon-barcode{background-position:-456px -24px;} .icon-tag{background-position:0 -48px;} .icon-tags{background-position:-25px -48px;} .icon-book{background-position:-48px -48px;} .icon-bookmark{background-position:-72px -48px;} .icon-print{background-position:-96px -48px;} .icon-camera{background-position:-120px -48px;} .icon-font{background-position:-144px -48px;} .icon-bold{background-position:-167px -48px;} .icon-italic{background-position:-192px -48px;} .icon-text-height{background-position:-216px -48px;} .icon-text-width{background-position:-240px -48px;} .icon-align-left{background-position:-264px -48px;} .icon-align-center{background-position:-288px -48px;} .icon-align-right{background-position:-312px -48px;} .icon-align-justify{background-position:-336px -48px;} .icon-list{background-position:-360px -48px;} .icon-indent-left{background-position:-384px -48px;} .icon-indent-right{background-position:-408px -48px;} .icon-facetime-video{background-position:-432px -48px;} .icon-picture{background-position:-456px -48px;} .icon-pencil{background-position:0 -72px;} .icon-map-marker{background-position:-24px -72px;} .icon-adjust{background-position:-48px -72px;} .icon-tint{background-position:-72px -72px;} .icon-edit{background-position:-96px -72px;} .icon-share{background-position:-120px -72px;} .icon-check{background-position:-144px -72px;} .icon-move{background-position:-168px -72px;} .icon-step-backward{background-position:-192px -72px;} .icon-fast-backward{background-position:-216px -72px;} .icon-backward{background-position:-240px -72px;} .icon-play{background-position:-264px -72px;} .icon-pause{background-position:-288px -72px;} .icon-stop{background-position:-312px -72px;} .icon-forward{background-position:-336px -72px;} .icon-fast-forward{background-position:-360px -72px;} .icon-step-forward{background-position:-384px -72px;} .icon-eject{background-position:-408px -72px;} .icon-chevron-left{background-position:-432px -72px;} .icon-chevron-right{background-position:-456px -72px;} .icon-plus-sign{background-position:0 -96px;} .icon-minus-sign{background-position:-24px -96px;} .icon-remove-sign{background-position:-48px -96px;} .icon-ok-sign{background-position:-72px -96px;} .icon-question-sign{background-position:-96px -96px;} .icon-info-sign{background-position:-120px -96px;} .icon-screenshot{background-position:-144px -96px;} .icon-remove-circle{background-position:-168px -96px;} .icon-ok-circle{background-position:-192px -96px;} .icon-ban-circle{background-position:-216px -96px;} .icon-arrow-left{background-position:-240px -96px;} .icon-arrow-right{background-position:-264px -96px;} .icon-arrow-up{background-position:-289px -96px;} .icon-arrow-down{background-position:-312px -96px;} .icon-share-alt{background-position:-336px -96px;} .icon-resize-full{background-position:-360px -96px;} .icon-resize-small{background-position:-384px -96px;} .icon-plus{background-position:-408px -96px;} .icon-minus{background-position:-433px -96px;} .icon-asterisk{background-position:-456px -96px;} .icon-exclamation-sign{background-position:0 -120px;} .icon-gift{background-position:-24px -120px;} .icon-leaf{background-position:-48px -120px;} .icon-fire{background-position:-72px -120px;} .icon-eye-open{background-position:-96px -120px;} .icon-eye-close{background-position:-120px -120px;} .icon-warning-sign{background-position:-144px -120px;} .icon-plane{background-position:-168px -120px;} .icon-calendar{background-position:-192px -120px;} .icon-random{background-position:-216px -120px;} .icon-comment{background-position:-240px -120px;} .icon-magnet{background-position:-264px -120px;} .icon-chevron-up{background-position:-288px -120px;} .icon-chevron-down{background-position:-313px -119px;} .icon-retweet{background-position:-336px -120px;} .icon-shopping-cart{background-position:-360px -120px;} .icon-folder-close{background-position:-384px -120px;} .icon-folder-open{background-position:-408px -120px;} .icon-resize-vertical{background-position:-432px -119px;} .icon-resize-horizontal{background-position:-456px -118px;} .icon-hdd{background-position:0 -144px;} .icon-bullhorn{background-position:-24px -144px;} .icon-bell{background-position:-48px -144px;} .icon-certificate{background-position:-72px -144px;} .icon-thumbs-up{background-position:-96px -144px;} .icon-thumbs-down{background-position:-120px -144px;} .icon-hand-right{background-position:-144px -144px;} .icon-hand-left{background-position:-168px -144px;} .icon-hand-up{background-position:-192px -144px;} .icon-hand-down{background-position:-216px -144px;} .icon-circle-arrow-right{background-position:-240px -144px;} .icon-circle-arrow-left{background-position:-264px -144px;} .icon-circle-arrow-up{background-position:-288px -144px;} .icon-circle-arrow-down{background-position:-312px -144px;} .icon-globe{background-position:-336px -144px;} .icon-wrench{background-position:-360px -144px;} .icon-tasks{background-position:-384px -144px;} .icon-filter{background-position:-408px -144px;} .icon-briefcase{background-position:-432px -144px;} .icon-fullscreen{background-position:-456px -144px;} passenger-4.0.37/doc/templates/markdown.html.erb000644 000765 000024 00000005135 12233035540 022242 0ustar00honglistaff000000 000000 <%= title %>
<%= title %>
<%= content %>

© Phusion

passenger-4.0.37/doc/images/by_sa.png000644 000765 000024 00000011733 12233035540 020036 0ustar00honglistaff000000 000000 ‰PNG  IHDRXcÈ à pHYs  šœ OiCCPPhotoshop ICC profilexڝSgTSé=śȚôBKˆ€”KoR RB‹€‘&*! Jˆ!ĄÙQÁEEÈ ˆŽŽ€ŒQ, Š Űä!ąŽƒŁˆŠÊûá{ŁkÖŒśæÍț”Ś>çŹółÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $płd!sę#ű~<<+"ÀŸxÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽBŠ@F€˜&S `ËcbăP-`'æÓ€ű™{[”! ‘ eˆDh;ŹÏVŠEX0fKÄ9Ű-0IWfH°·ÀÎ Č 0Qˆ…){`È##x„™FòW<ń+źç*x™Č<č$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóęxÎźÎÎ6޶_-êżÿ"bbățćÏ«p@át~Ńț,/ł€;€mțą%îh^  uś‹fČ@” éÚWópű~<ß5°j>{‘-š]cöK'XtÀâśò»oÁÔ(€hƒáÏwÿï?ęG %€fI’q^D$.TÊł?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)Ź‚B(†Í°*`/Ô@4ÀQh†“p.ÂUž=púažÁ(Œ AÈa!ڈbŠX#Ž™…ű!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fș‘;È2‚ü†ŒG1”ČQ=Ô ”Cčš7„Fą Đdt1š ›ĐrŽ=Œ6ĄçĐ«hڏ>CÇ0Àè3Äl0.ÆĂB±8, “c˱"Ź «Æ°VŹ»‰őcϱwEÀ 6wB aAHXLXNŰHš $4Ú 7 „QÂ'"“šKŽ&șùÄb21‡XH,#֏/{ˆCÄ7$‰C2'čI±€TÒÒFÒnR#é,©›4H#“ÉÚdkČ9”, +ȅääĂä3ää!ò[ b@q€űSâ(RÊjJćć4će˜2AUٚRĘšĄT5ZB­Ą¶RŻQ‡š4uš9̓IK„­ą•ÓhhśiŻètșʕN—ĐWÒËéGè—èôw †ƒÇˆg(›gwݘLŠӋÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ȘŠȘȚȘ UóUËT©^S}źFU3Să© Ô–«UȘPëSSg©;š‡ȘgšoT?€~Yę‰YĂLĂOC€Q ±_ăŒÆ cłx,!k «†u5Ä&±ÍÙ|v*»˜ę»‹=Ș©Ą9C3J3WłRó”f?ă˜qűœtN ç(§—ó~ŠȚï)â)Š4Lč1e\kȘ–—–X«H«Q«Gëœ6źí§ŠœE»YûAÇJ'\'GgÎçSÙSʧ §M=:őź.Șk„Ą»Dwżn§î˜žŸ^€žLo§Țyœçú}/ęTęmú§őG Xł $Û Î<Ć5qo</ÇÛńQC]Ă@C„a•a—á„‘čŃ<ŁŐFFŒiÆ\ă$ămÆmÆŁ&&!&KMêMîšRMčŠ)Š;L;LÇÍÌÍąÍ֙5›=1Ś2ç›ç›Ś›ß·`ZxZ,¶š¶žeIČäZŠYî¶Œn…Z9Y„XUZ]łF­­%Ö»­»§§čN“N«žÖgðń¶É¶©·°ćŰÛź¶m¶}agbg·ĆźĂ“}ș}ę= ‡Ù«Z~sŽr:V:ȚšÎœî?}Ćô–é/gXÏÏŰ3ă¶Ë)ÄiS›ÓGggčsƒóˆ‹‰K‚Ë.—>.›ÆĘÈœäJtőq]ázÒő›ł›ÂíšÛŻî6îiî‡ÜŸÌ4Ÿ)žY3sĐĂÈCàQćŃ? Ÿ•0kߏ~OCOg”ç#/c/‘W­Ś°·„wȘśaï>ö>rŸă>ă<7Ț2ȚY_Ì7À·È·ËOĂož_…ßC#ÿdÿzÿѧ€%g‰A[ûűz|!żŽ?:ÛeöČÙíAŒ čAA‚­‚ćÁ­!hÈ쐭!śç˜Î‘Îi…P~èÖĐaæa‹Ă~ '…‡…W†?ŽpˆXŃ1—5wŃÜCsßDúD–DȚ›g1O9Ż-J5*>Ș.j<Ú7ș4ș?Æ.fYÌŐXXIlK9.*ź6nlŸßüíó‡ââ ă{˜/È]pyĄÎÂô…§©.,:–@LˆN8”đA*šŒ%òw%Ž yÂÂg"/Ń6шŰC\*NòH*Mz’쑌5y$Ć3„,ćč„'©ŒL Lʛ:žšv m2=:œ1ƒ’‘qBȘ!M“¶gêgæfvËŹe…ČțĆn‹·/•ÉkłŹY- ¶BŠèTZ(Ś*ČgeWfżÍ‰Ê9–«ž+ÍíÌłÊې7œïŸÿíÂᒶ„†KW-XæœŹj9Č‰ŠźÛ—Ű(Üxć‡oÊż™Ü”Ž©«ÄčdÏfÒféæȚ-ž[–Ș—æ—n ÙÚŽ ßVŽíőöEÛ/—Í(Û»ƒ¶C裿<žŒe§ÉÎÍ;?T€TôTúT6îÒĘ”aŚűnŃî{Œö4ìŐÛ[Œśę>ÉŸÛUUMŐfŐeûIûłś?ź‰Șéű–ûm]­NmqíÇÒę#¶ŚčÔŐÒ=TRÖ+ëGÇŸțïw- 6 UœÆâ#pDyäéś ßś :ÚvŒ{ŹáÓvg/jBšòšF›Sšû[b[șOÌ>ŃÖêȚzüGÛœ499â?ręéü§CÏdÏ&žțąțËź/~űŐëŚÎјѥ—ò—“żm|„ęêÀëŻÛÆÂÆŸÉx31^ôVûíÁwÜwïŁßOä| (ÿhù±őSЧû“““ÿ˜óüc3-ÛgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ĆFöIDATxÚìZKlÇțö!Ł2"v}JȘˆtuńúyJ,ČiSžŽíe-»vÜÔ€ Ł •ÚrÚHą([©ŁÚĄŰÂ1Ú&ăôhę§0Wj€Z”mRpêFPç$…J[ÜĘéaw‡»ő Aăű†;;wżùæŸțCq1 óžÈš !„ažqó:X–ËČà8,ˁcY°œyeY0 –aÀ0 À0–@':tĘHšŠW]ƒŠéĐuÖéD§í !ÖËĐüă ś0ˆ.ÇqFbčRžăŒ:–3AfÀ0Ź_XĘSÓÌdÏkNu]§Àځ~œ@æ8ÁćxđŽ«‘ź]čŽd2‰T*…ÙÂŹCQ«;wî„ï‡>ìĘś24ËȘƀh,0æXÚŠNŒ™s1‹ƒ{o, ùcÙlÖQîńx °uǖU±^úä“[ÿÏóTžçÄńVFĐwźSSSËRèv»Ńț»vŽŽì‚ȘiĐ4Șj&M…Șj”ᕘ\Îâÿùă1‘xœ^ˆąÈd2PĐäi‰Р<óìÓU°žúî?düÏáOÁs| XŸ5<Hg7ä!™v’$ĄĄĄ---€ááaäóyÈȌ™™ÚVòK8Ùț[ÔnŹ…ȘȘ(Ș*T”UU&ĂX7mč èŻ _#t"ŒBĄI’‹ĆĐĐĐàűˆ|>¶¶6ÈČ —Ë…ȚŸȚeƒ°Țú)À·țu 5°5ïó/àӛ7W€ßXË-ă8 +#p“ÉäŒił˜‚€d2IA–‡d €ăűÊ ł–ÛÈòÇÆ;Äb1xš›Ëęˊ b,sô]LÊőȚŸîźêŸy^ŻZ[żțŐkűSŐú 6XÜwź588ž$kÙêÛś‡>ӗ6ÁeLŸš5= %ÍéŸÍfáőzç n0€ÌƒŽș††xœȚyž@%±ë/ ÈŠïöK?Ăû‰Œsțx««Ó0ƒUëw2ŰüűkWźSo!SźDA #>55…kWŻÓ ‹òÂ&’JÏO$ó‹őYHìm{ß5ˆőŚ? e?~é%@ĄPÀ—T­Ÿl±)™LRpBĄm€( ü~?|>|>ąŃè‚uęætČì–Ćâä­€œ%ÓÀ0•MÄ7).— ńx]užtéRĆ6>Z‘ncŁÁ0`©TÊp±$‰Ł( |>ŸŁ“ą(PĄP~ż^Ęűű8]•%IB"‘@*•2v€6`ž%ŻŒ€+“ÉT\Ì,æyő•ú,$ö¶5<ö“'±±¶––ȚŸMóÏ5ï(·»köŒćł*ŠÇłä‡—럜œDwWŻüü0z{Π·ç ș::§NŸźZż`ûâRngŹ ÔÈçr9Zgm>$Iąuö…§ä~џ%_L: 9x9b””úVŁ?xü8‚Ǐ70€ÁmKț+ęYÖ˝ț};\.‰ü~?Őeśƒóù<ü~?úûûárčp"tbÙ_IÿöÛq ”Z[áin^•~Ê`ë…ë\u˜-Ìb||œ6ˆD"ôá›6mrgŐe2™yu–Xșê\u ́5ŠæĘŒ—{ÊőâûńÎÛ}eČ,CEˆąA ( %ĂJ‚1뭟źÛŁwG±aĂD»ą‡d‚€ééi‡gÇiŒÁëő"‰PöÆăqÚÖ^ÈçóxńG/âBì<ÍÍĄXœCQ-ąXTĄYq ]ƒźé4_ŸSû6†+i°çöŁŠf>ù Ąß„è¶0Żê„­ œ}û,~șg7æŠs˜+Ą‹(ȘeWű|Ûî,z€ăő”ÀívąŃè<©™™™Ą«źÛí6ńVhR‡nÚbË\<źÂ€NthšqŽvŠ·‡äśû1ȚjÀőù|Žoû›íf€]+l QÒE–<^GFtq@:"dì^Šdî§É«ż|ŐZê‰(Š$N“ćJ.—#ą(Òț’_"™ûi2v/Ezz{hùw(•nÂo„ȝôÉ|ž!’_ąć‚ îîn2==œ °ÓÓÓ€»»›‚@ûíŰ背ž!w2c€#Òń]—0ćNig€ûęxžÇ…Ÿ űèòG+>2Šžé†ȘȘMáőŚ^_ùł™ ûi†}śY~żVÏ°ßŻÊDŰSg€Ă`òę4H|@ÜnśČGÌív“űŸă$s?MîdÆÈ{yoŐ, „,š·—­VÿRÏ\5ƒ- żÂŃ_„§JrWŻ\]ôŰ~ŸŽ^o =k»rć*ÎFÏź~‘šÀź”bnù3*ś­†ĆÌbûÖ­Û¶ 3҅úžm§öp#~«ő'S““xś| #Ă#kł Û@\kÓ°Đł{æšlÉź–]Űłw¶m߆ï»\ÎźéZ}U(àžqíÆšûM1x)żî?‘• CÙÈ0ÌŸ@± B˜ÿ đE»Ź|•ÁŃIENDźB`‚passenger-4.0.37/doc/images/direct_spawning.png000644 000765 000024 00000110115 12233035540 022113 0ustar00honglistaff000000 000000 ‰PNG  IHDRXâ’ščæsBIT|dˆ pHYs ` `‰>ÉBtEXtSoftwarewww.inkscape.org›î< IDATxœìwtTĆû‡ŸĘMïœ7HBH(Ą„&UPEED ą(š ąàWETŹÈ± E”ĄśÒ €ś^öțțXČÉf$ÙlۅyÎÉ9ÙœsçÎŒwî;ŸûNY™$I@ ZùÍ.€@ Á­†X@ -ŒX@ -ŒX@ -ŒX@ -ŒX@ -ŒX@ -ŒX@ -ŒX@ -ŒX@ -ŒX@ -ŒX@ -ŒIk\äX2.À@Àđ,ntŽL߅2Bôj“ÛÀà·A›ŒLE ÜŸ”W€`wžč-™čL’€–ÌOƒŁIÜÌîz»`Ž}•Ü@ŠaPQ­·A›ŒŐAƒT{€čá>ìm‰ ő"°'b | LińÌuDűM„łŐ Ł5ŸÜ@ŠaPQ­·A›ŒđóMB |ÌśĄL—ŒZ\`L`0đ#àߏ”hiŒáluç6©fŁÎV7ŒÖ|Rp)†A!üŒn詊ŃÀ“]|9ÒÜ ZT`žÈ]ÀżÜ·Ž٭ʁÜ@Ša0g«;·I5ŐșaŽæ3‚H1šC%Đ«›'šsr‹ ŹÈxl3€_‹dۂńÍŐÂáê†ŃšÏ@ n Ć0„šÖÛ€šFűxĘšcŸ3@śîțT45[Eš”XD3ƕŸÛțŠńë};\=źm0D›ÒF&Ă` n ĆhúlSÆhŠ"žIM„ŚVz&;ïo45‰`í‰ć`‹ÎFûr` 7b"ŠĄ·A›Œˆbè†ŃšÏ@ n Ćh ȘțœÚp )'”HK)1»%òiiħ&"‚ĄFûn śĘhí§GDC7D›ÒFűyĘžF›Ro4)/]#X;.à€ŃŒ}źn!uÛbèÍ&·‰±o“j6ÁĐ Ł5ŸÜ@ŠaPˆH”nÜÄ*–.wRÒŰtŽ`Iiæ&ැșm1ŒŃ&MAŰO››$_<ώ~ æŒêW$ú}˜ÁśżšFbÓo_±ÛzR.àЎnwÜÍĂOœ†BQër~X4‹”„ Žï܋Ž=ű~Ń,LÍÌypÂ+ žgLƒöùxÖxJKŠ4|,^~ŹûżÏ8wr?î^ {pCxB6!æ4+–ŒÀ€W>dęÿ}ƉÛëzÏÏ^‚­Êêjölꃓ‡vulŠŠæ†váቯѩ]'­ëg„_âçŻȚ'.ú89™Wpóò§ÿЇńèTÌ-,5ÒțûçOìțç7ăÎâéۖđƒ;ćMÌÌk}Ž$IìüûțYóé©ITWUáêáC݁#=~–Ö¶êŽĆ…ùŹțqÇ"ÿ%+ă2–Öxû1tÔDȚûè EÒś‹ȚäìńHLLÍèÚ{GönV•ĂńăŚă6éÀ›„!ùy)F“Đw›j5%m„(ԍ[±M…uëŻț?úÔAúßó(§î„Čą€‡ŸšÉùӇ(*ÈćÔá]ô6–˜łÇšȘȘ SśêŽvçßż°űíIês2ź$stßvlZĆŒe›±”w îÜ ìű '7ŽíÛJÚćòr25:n •ÈZ·b+Ÿ˜@DÿáôŠêà%„’·§Ț˱ȭêsČÒ/qòĐ"·­çăć;1·°àôŃ=œ?uËI±üöʇ”P9ö…kú•C»ÿŠž0’âB.œ>DYi1é—9}d‰ńçxjú‡äfgr`Ç_WÿOçü©ƒ(%%–Öö”••ńösĂ9}d—Æ5bNłëï_yfæ"xìEőśgïăçGP\”Żț.;#•è“8žs#ó—mV‹§f>Æź~Ő°AÔŃ=ìęo-Ÿ,߅Ł ?.~“Ő?|ŹN'“ÉÈJżDô©ƒŰčE?GąP˜PQ^Êk©…ŽL&C’$R“ă8Čo )I1<öÜÛ ­ÎÍëĐ­ÏÎZ€:ŻF`”àĄđišˆéșaì>^źk5áćę)đݱukîŸȚÊÎÍ·QÛï&ÚÄ?°#Ö¶œ?uI‚TÖքvéKxOŐäśS‡w"I}ČvțU‡îPJžšÌçïNĄČąs +FŒ{™ÿB‡«îBÔaŸțđćÚr]=?/'ƒ‚ül|r}bĐ}k , voYÍś _S]Ż[f/^‹\aŠR‚ÍkżW‹«»G=Ćâ_3aÚÈär.DfĂ/_ȘŻYsŃäűsXÛŰóÈä7éÖśzȚ9òšö«áÔĄxù1óă_xfæbœ\US#Öüű ‰±gUöŹă§ÎŸ:Hß»däăÓž܋€Œ•KßQ‹«€àNLÿÆ=;;gȘȘ*ùæăWˆ9w„•UU|ńțsćcecÇžgßæăć»|ż*bvúÈ.¶ź_ŽR‚}ÛÖ«ĆUÿĄcXŽêS^_„™čIqgYœü””——łîÿT«3GOx…_śdđÛȚ,ž4P‰·ó§Ł”àОÍjqőȚWłțH1ßÿKûđȚ(&۱ÊŠŠë¶­WæÿÈÂÿÛKp‡ZśT<“FæŁ ÄÇ­ętűk F=DhìêVˆ±nÜô6%“Ö„/GöțMüùTTTpâà6:F DnbFç^CˆÜ¶–ËI1de^!ú”J`YÙŰĐź J íù›ò2Őv-Ż/ű•^ƒTûăő>ŽùÓFrhŚvnú™qSçâéšQźGŸ™Ăƒ_WÎŒ’Źțÿ܉HÖüű1’$ڍw–nÂÄÌRí6ŹZ€œŁ+/Íęč\Ap‡œ8đQGv±aŐyŚđâ»ßŃox­ŃxȚYČ_lìX4ûI”Êjvlú™'_țP# °îŒńédW7SJ°śß5ű†±ä“ÈäȘśÍțĂÆńâC©źźâ·o?à­Ek‰:ș—€žł >ŽÇ_x€À°@†o›öŽiß„~QÙÀÌܒ—ßÿK+B:ő&úÔöęû›~ę’'§ęÊŠ ”ŐŐ‹ÜŠł›=ÜÇÄi2fÒŰŰ9ȘmQ^VȘźË?«żĄš î}‡1ÿÛÿ055ĂÄÔL]Żkáèê­>^_`ĘL?~#nú3i`’ƒ*JŁi­œŽô.°DÈX2֍ÛÁنvëϑœSYQÎŃ}[HŒ9 @xŻ»PJĐčŚ]ꎧïâüiŐĐWXŚ~ “#IpæÈnLL͈èŸF»è;t ‡vm 1& Ÿ@Š‡uíŻŐŚpêPí0fæ–XZÛ©+•Ő\NŠÀÜÂŠŻæż N[3ü—•~‰òòrLÍÌ5lÚ„_“:yżÀ8čûȘÏ©k“ŽK Zo›Ą]újÌMËJK!ęê0hρšíàÛ6 ż $Ɯ&1& I‚”‹ŃêŒ:śŹNknaÍ+óWšI’*"*Á[éÈÉŒ@Yi1ٙi8»yÓsĐęÜń'Éńçű~á Ÿ_8Oż zÁă§ăæé@—ȚwcïäF~N‡vmàĐź Èć BÂ{Óśî‡>æ9č]7ąź©ką!Íćvx&›ŠèśtăViS-±ŠđúÇuœÀMÀ(z«1Jû鑩Ú#Źkí<ŹŐß@ÍŻ-tîy’žŸÁžzű‘™–ÌŽ+ÈÉLUŚm€șŁÌLKÀÊÆd ÔÊÖQęA~Ž*Ì_çú–6é•őÊgfnIEy)Ń'#ÙęÏŻô>N•W^U•ȘœÏž’Ä–5ß4XżŹôËžûŽUV(L0·Čœf'ߐęÜŒ4|Ł‹VÖv”PR\ bš­łƒÆçŒ:Q9{'­kÛ\”QA~6J òóČŐÇê »úHJ%ùč™äe§_Ó™i—ptőæ•~fŐÒ9lßđƅy\IŽăݟ?có˘śĘÚwŁóŸÙÆȘ/ßæÈžM(•Ő(•ŐDŸˆ$úD$ÿźęžO9Źžßv#4ü¶€Û‹ÙíđL6•[ĘÏ­ęZŁ"7WCú…a?Mšj¶Ąj{æ0ÎűuR?ozadžćœŰ_;™<ŽŽÀrró  7“ŒœLì]Őé’bÏšÿś hŻ:§ž«û\Śí|œ=xïÛí|:ëQ’ăÎđÓg3‰4 +lì]Ôćnß„/ïł­Áú™˜šk ëzâ§> ș’§QÆaàâáŻ%­ëŐÉŃŐ[ęrü9cŐŐU\J<€ÏUûxú«§„\€]§>êϛ~ù;Bșš"kź^d§_ÂËżŸ­>Ő`LM̐$UlÒk‹yrúbąqêĐ6ìXGRlćeüčâSf-Œ:”ԉ7ÿIQa.QGvrêĐ6öÿûyY$ǟeÿ¶u Œoü” Y‡șönÎÜ}#|Œ6†44h Ćh7ŁÔy’{kOz3ԉo7s" tûp+ęĘNmJnbFPǞÏY§žC4ÒtȘ3$Ș!čÀĐu}șȚ1L}ì‡OŠS—$ALÔ!6źú P‰„€àpuȘÍËZË>5Üęà|ڄ1aú'd§_bʏ©î2BÂïàÂéäfg 0”@ź0ăÓGńÁËđëŚsŐuP_ÏÒșѶ©árâ¶źęŽj„DeUkŸÿŸúX›öĘÔmŠ3 ÍkžxàĐ€œ[~ćŰȚ$(+-áç%o‘—šì(IÖč\”­Ćßż-%7+ I‚Ű3Gűá“é,ž=žő?-@’ }x_R“bH‰ÆÄÔS >›3ś_Œ—ŸÍąȘșš3Çö0gÊÈźźäè;ì1țùm) N°wó/Țù'Ÿˆ;{D}ÎÓł–bzUxÔ”Ż„LÑÔężæXxŸatés'lćŻÿ[ȝ#ŸÆŐӟ‡'żÍ™Ł;‘”JŠ=FŸ!“–ÇùSȘÍ-ęƒĂ5æB5tndżeóŸaÓ/ŸQQVBFj"^țížóț‰ZÂP”­æùă§}̂ŁšŹ(gțŽûđ ìHnv…yYűŽ ć 3QJàæÈЇŸcËê/‰‰:ÈłśÔĄ'1QȘùo Sî; „Nz‹ƒ;ÖQ]UÉûĐ{đCäçfpú*ąçâî‡LaŠ_p8Iqg(ÌËâç„o{ön^œ9ș‹Č’"z ~„>mˆ?w€śŠ„Ś QTWWqtÏF@%RĂ{mĐ7HĘ{*5ìǛ…Ń`H‘êFc >ŒÔ~7Ł"7W2Ö C…í»ôŚűܱç]”Ϛ lĘń ìHJŒjžŻ}ŚÏąÂԂ7—láûŠrlśÊËJÔâÊȚɍIłŸ€çà‡jÏ©'šź%°ê~~búBNÚFEy)+?{W>ZMh·Œ±x#_ÌyœâÂàf,XËò…/“žBr|íĐi#™òÖ2ŠæêóŸ¶ űśŻšŹ('úÄ^Źí™<ëKÚwG’À/š3s—í`á̇ÉÏIgï–_Ôùöò0ÏŒ” IKk{Țęz;ŸÎÕäöüS253gÄăŻ2dÔ$ șőÁ3o-cćç3ÉžœÀÆU‹ŐiÜŒyvηžx4ÚkˆæfŒ™ë C~&obú‡nÜLûÉ€æŒșÔaŐa>^Ăj†€ŸW ȚÜ&ŐԹȹœŰ(Őö … !]úWEőU.%œŁ 'Ÿ¶4æYŐ„Ź€ˆŰš€„ÄáĘ6Œ¶í»«‡ jHMș@^–j•[hŚê- ê—ĆŐ+WÏő±‹ŃGUŃ™ŒĐ.ęŐç•ć“s’KÏbnaM»Î}đôk§qÍÄ '()ÊÇÔ̂àNœe—§;R\˜GÄÀ‘Œ¶đOΟÜGrÜi<|‚hß”?fæ”»©æ‘ŁÚ;ÊË?Ïk¶§Ž”8Ο܋©™íșàĘæÚ?~œ–G…ăäg§ăâáGXśAȘĆő(+)")öÉqQ˜š™Ó64ż íĘá%I"úűnÒ.ĆS^ZŒ«§?a=ptőȘMt”à„%…œ9ŒœŒË(LLqónChŚț˜š5íËòs2žœ ZíèÔ [{çFw»>ŚCűyĘ0Č*ŸśP7æ66±ÎëçC”Ë1ț[‹Ü@Ša0g«;Ś«æÓC)č*°f|òg«•éf"»M0ZóHÁ €†Â{cș7^`üĄk#†uC 5ë†!<“·Í°Öm°·ˆgČ>ÂÇ놡ˆBœïƒ„sțúÍ^/‡«†ĐÂáj"Ń4%:pĘÏ€&ÂÇëÎíđL|K­ł0NÖhí§G„ĂՍÆÚoÙżčêÿ›bc4ŸŐșq;tàúDűymšjƒXâáĐD8[Ę0Zga śĘhí§G„šÖ ŃŠŽ~^7 ­MìĄžčšßê΄šźp¶șahζŃÈ}7Zûé!ȘuăvkSÁÒ·ÛÍmi„ꎹP7„ę4ąZ7ŒÖGÈ}7Zûé]lbPKÜ\m„ĂŐ ŁmSrߍÖ~zDˆBĘöÓDűxĘ0dePC„âæjg.BÆșaŒæW7Œ¶MÈ}7Zûé! uăv”ŸAE°ô…QȚ\q¶`€öÓ#BTë†èÀ”ąZ7Œ¶MÈ}7Zû鑖°‰A,qs51$g U”Fc”ąĐ€î»QÚOQ­ÂÇkcH~Ț@ŠŃ$ŒĄMĘÔ!€èb r*u-‚À1”vëăƒË܊›] A30Ô6u]ŒČЍŁÀ/äàƒ7»†É-|ßk0Ä*šËléjőx«]ïŠF°țę%3ûót-‚@ĐbŒÔĘ ûcč7N(źKÂäClt}őfC Păšđ'ÜòÚ«„EáMX†šn@ ܚH\Ô­„‡JoÚĄ„qŽû  /0@ZsaȚ͝ä.@q«O6Z ń( ‘†4‹ŸFÔZ]`Ő­ˆx@ Ž œDëK‹ŽúĄUCFŽO eŃ`!rÛ ŠP Ak Q«YZcĄ]« ,±jP`Ń/·&Rm`§5\}« 6”LôeCCŽI@ žučm†Eo&·&œ ‘Öœš€WuŁaAń Ń&àÖĆš"X­č+Ș@ oÄ  eϒÀĐš;Éœ5žč«uœž@ A#1ú!ÂFŻ K ÍÄȚ́Žq”pçRq2Qč')W–7ú|sWŹLŹI.NÔ_!EkF°äșf IÚÊFțéZÏ”kILìěozèZ&áćeJbb'Ț}ŚSęƚ5m9s&LïŚ0À3łZ ûȚ{^$&vÂßßLïŚŸ™ŒăHbb'îșËNŻŚŃćíÆŻŻ-]'șiꅏw%`€v>fÈtxâŠ2șNt#``­ ÚĘëH§G]šŸis`èGț [€Gžu‹æ}«ăŰÆ‚źĘp ŽžÙEč.NȘrÚû™ëíúŒ„;ucßđ$?œË?wífEżŐlżç ŃŁ/1§ó%©(Gv ź0F}ìżÔÍÌ9ń_śț‰1ńżnŸ2ęđsêă Î* ôŃMroÍ]QkP(d<ù€3Gł|yìÍÔ©ź ,++9&&2 Ș13“Ńčł%IIdfVi„”łSPU%QRąÄÖVAX˜gΔR\Üаææ2șv”"'§šžž2” d'—ƒżż9ŸŸŠ€€T’”Tź‘ÎÎNĄŽ·W “AQŃőËćèš $ĂŒŒjbcË©źÖŒKææ2,-ćäçW#Iàëk†——)QQ„””4­Î …ŒđpK*+%.\(SGŰê"“©źáïoF\\9WźT^7ÏN,),Ź&1ńúŃ…BFHˆ9ÖÖ Îœ)„ŽT·û„+yIćdž/Őű.=Ș„#ËÒxélÜÂŹđްáÒአ„Ș2%ÿLOhÉąjaëeƕĆd]P•_ŹŸt_‚‰Ì„ŚŽŸš!źjšTVò⥧éîܓ§‚žeIô§ÄÆrŻÏžš»!—+á3Š+„©Ë>Źqn˜CGîp€‰Ü„C™û9‘sŽÁ2„9t€‡soœ-\9—ƞô‘2sč9w{ çLȚidÈžÏg$Qy§ŰŸ±‡J„¶Ïł7s żÛ ŽfąŹșŒțîwhÄáŹÎ<@•T…ƒ™#ÜlÂčŒ(¶\Ț„Ô@Żá܋.Nʱ6±&*ï{Ówj\łæZÇČSR]Âś; Ž æpÖŽd€RY‰œ™ÜÓÎź=ŃùgŰ|icƒŚêë6€ÎŽ]1“›5x-3Gúč äHÖA\,Üâ9”C™û)W–ăcćËŸŒĘäUhöَfNôuÀùüs ȚߖÀšÖÍXExÏ=vx{›òć—+Ù°!±chßȚ‚óç5Ăò?ÿ܆îĘ­˜5ë2˗ûca!G©„ŁG‹™:5™ăÇKÔiϜ ăèŃΟ/cÖ,är(/—Ű”«ńăÈÊÒe5lÙLxž¶¶'Ôß”ooÁgŸù2`€ ––ȘÉ7.”1yrûö©:W™ ŠOwgț|/ŹŹj'èäæVóÊ+)ŹX‘ ÀčsđöVÍ+ž|č3ûöŃżÿ,đæĆĘ>C\œ*ÔïéiÊąE>Œë€ÎŻ  šŚ^»ÄwßŐ%M›æÆ‚>DDDóÿچ°0Ő^u”Äǧóöۗƒuqs3áóÏ}6Ìii•LŸžÂïżŚ><ƒÙČt©/:XȘż;}ș”'ŸLääɍ<§OwcÆ w||Tó"Ž/᯿Șzæ>ęÔčșì_~™ÉŹY—)+kșĐÒśłęgnaVxŐX6ŠôxÆ—KlT•*‰\” šžÇNă\ꀜ9Ù±„\ű;— ›4;‚ł}(ž\Á•Ć |˛’ì*Ž}ŸȚ mć ęßđÆÚՔŁßŠ“qź€Át5ž†ZÒnž#ƒT¶HÜSÀ‘oÒ©ȘŚž;<ìL»{qđ7''źŒžó8»VÛfV.Š„Žt"xž•ĆJέÓNSƒ™”‚^/xàŐĘ3i§K8úm:č 7žÓĆܕ~îƒ8‘s”WțœfșČê2țJYĂ+ao0Úïžę€ÿë·F=/kՀőlLYÇűœ©Ï™Ęù}Š…ŸŽ„„BŠòcßÄ,aæŃiê4fr3Țëò1SÛżŒ …•ۚڑPÏӑ©›Łč«ŹçłsóXۉžYžpÇ?áœÍ;­UȚ@Û`V XÏŒSsx:x*–žÈŻNÖü-a%Ÿžę ȚŠńę_Ék˜°oŒ:[S;>ïù ùEBąžČS[NäeRä8.ÆĐÆ&UÖ3ÿôÛL zO+odÈXžŠgæ±ađ6<,œÔŚȘo+7 w~ìû+ęĘï€BYA„ČkąrOòtäc\(ˆ Ű.D]ŻŚ:Œ…„‰•ÊJȚ:ț*ŸD,áíŻóEôB [<ü,ï†ÿ{țë§7Őš/z™äȚŰżæöf“&9ŁTÂʕ9j2uȘkƒé==MYŸÜŸ·ȚJ„M›(x oo3Ö­ ÄÙYScnÇ3Ïž0vìEüęŁxé„d °á·ßÚ6iĐŐՄÈÈîžĂšŚ_żD—.çxțùdœœLŰž1H-–fÌpgŃ"¶l)`Ôšxúô9ÏŒyW$‰ïżśWO^?>; =:ž3.5x]…BƟòÈ#N|űaŃÜ}w,Ǐ—đí·ț̜©œ `ëÖ`Ë;ö"cÇ^$6¶œ·Țò`Ô(‡ëÖŃÔTÆöííxűaGŸű"ƒîĘŁyüńòòȘùùç6ô飚 jÁæÍA8;›0aB";ŸăÉ'ńđ0ćàÁöCŸŁG;°h‘/gÏ–Ń·ï ž@ZZ%sçzi]ÿőŚĘùæΞ-ć駓èŃ#šE‹2xé%7Vź žńMj=>|rmïŽ «N„+`€/éÊ ·}p TÍă •–2así s}^ö€ĘœŽŚŒ†oo[ŠëLÄwäŠ2ŹĘLđŠ7/œ Ç;ÂæšçÙz˜áÛÛ™Ìíűö¶Á„œwLś€ûdwûł=Ą#èśšæv ÌŹLÚّ—<̑ʒjÚ1p¶ÓÎuĆ„]­˜čߑÏy0as(ƒßóĆÆĘ”đ'\»&„ˆ)îLű'”ĄûcíjJđp]B·IšóÙÏőćé]éùŒ’RÂŁ‹5­f–0L,TźÌÁόoùàTÛŠüÍ4LJŸ3ŒđèR;ißÆĂ”!óü°őV=c SOmïÀ˜UíđímKY~Aś80~c(­Ö.íö”Ę&ș1~c{:>âBÏ©8¶Ő‚’ÉáÁŸ‚žkŸ„čU7Wœ^ôäĆš. œí€[G+îęŹ SöuÄôê ˜Lă7…2öú«„jÛÁöŒ]ÂŰ?B›ÔÔÜNÁ”}y`Y[,ìM°ó1ăŃŐ!ô~IÛ8[0őxg†~ìoo[$ z>çÎ §Âiż“VúÖ&Ű.€˜‚ó7L{*GőąîÔïŐ¶ìNÛNiU îż[òTäXô“ƒŸç‰œáœÚ–aÿőçl^϶{‰Țź}Ői^›Éóí§ó{ÂÏôĘÜŸ?ìčëß>˜ÈLűeÀŸX™h.y1tGČòèîûyăŰôĆU]æ„ÏcMÒŻ­s'bS{fF2¶Íìv”Ő‰«èŽĄ !ëœ8ž}„‘~áÜK}î‡ĘóÿX–DJŚ ÁűüaÏ#»FĐÆ&ŸúțźK5Ìîü>ë’WžÖˆí9čGgϰcü‘ô+7Ž%dœGłqżïƒôrčC}î’^ßÓŚm łÏÀg”>ŰóÄȚ‡icÈïƒ6j ĆŸÙy.k’~ăŃĘśóꑩü|q9ĆUE<0^ˏŒ'Ÿ0–ƒ™‘Ś”•.è4Éœ‰Ś2ș–«« <àÀöí\șú†üß…€ŠV2a‚3oŸyYkxËÔTÆÜč©,^ŹzĂLLŹàńÇŰ”«ïŒăÉË/§šÓZXÈ92žÿUM"țî»,ìì,\èĂc9±rć”ßțêòÌ3ź89™0n\żęŠ‚§N•ąTÂČe~ŒăÈgŸe0r€II<ńD‚șÜce%gÆ wúô±!))‡]» ™<Ùćj} ź9lùüóźôìiÍ;ï€2oȚőś»vÆÜ螬Z•ÍćË”ĄÜ; 3æąús||9GŽ„rß}öŹ[wíIÎśĘgOǎ–ÌŸ…wßUEŽ/!%„‚={B˜4ɅŠY¶ÌSSwß˙3*aUJTT)ǎ…Čt©C†Ä “Á?œ\ÁęśÇ©-DFÆqæL !æéiÊ;ïx‘šZIż~šșć9zŽGG“'»pÇ6ìßߎaž–ĐWžĘŹŐ>€™”‡sÂwĆ·-‰» HۙŻ>~ÏÌm|v‚ìXU€ÀÂ^Á”ÈNȚe[+2Î^żcźĄïk^HJX|œą4Ő=öímË3:Ńw†«Ç5üVő{Qżg1;ŻWNńăg5އŽtâÀçWŰńn2Îí,črą˜žÏ«"QÛßNfŚ|•à—Éađ{~ šăCśÉnl™€ÎĂÁߜąôJ>r;BU™§ ŠÇtc䷁Dÿ•ĂBߣ„WâÚȚ’NuĄçTŽÿ˜š"lwŸëKì–<ÖOŠŁđŠêÙïę’'ś}ц;^ńbχ—ˆȚKŻ= êÀáž4ïv@Y-!WÈbϕȘáœvś:"“©ąŠƒȚń„͝öìțß%¶ÏIF’TąűŻÛÒ}Č;) 9üušș>í8»&›ŻșÆȚnjŒs%txŰY}\&‡Ń?>Ț•ÿȚLbÏG—Ż{,Ÿ(€ôšV =GqŠêțĘőßòĄÏ4Oö|t™~ŻyrŸ#>żÂæW”Șk _Ԇ>/{Òśˆ{šźőЊ`œƒ-Y1ìńÿ©žeżŸ¶<”œƒÖőG~ˆs°%żŒ:Ïù9HJ°ő4câ¶0F}Èâà|ʛ0Śł„#AvíH.JŒaڹܓxZȘ"4ćÊr”W»ÇČjíhÜŹc/łéҟÈÜNJžïXń!vĄ̌ÄÉܙao’Y–ÁK‡&SĄT”ż#YYpfKz}ϔàçù<úužù<œÿ1J«śìFćžä3‘È.Ïbuâ*z»ö%2c„N·<îș9ś Ű.„ŁÙ‡sèÈűÀ§8{‚9'^S§Ûšú7?Ä~͌o1Âg4RÖȘÍ=ÍœăŻ©Żő[ÂJúžöă`f$©Nścì2"œ{lÂĄŹęôsÈ0ïü|q9KÏ/R§ÛČ–›6Ìëú “ƒŸŚ8WĂŽĂSP֙tș>ùÆ·}ŠPûDç«|MžS7Úۇńț©ÙČWsiźf‘ÉhrĄsK5ۜz>ń„3ŠŠ2~ú©VèTWKŹ\™ƒƒBcXŹ._}„9€Č{w! ćôèĄùÖ_źW5,_źșVD„UŁËaEQ‘’Ő«s4Ÿÿțû,œOńÙgȘŽŁÿ Ži„W2ŽkgĄšł”mÚ-êÛW„šÉż†Ș*‰ŻżÎÄÒRNŸ>š‘ŒúĂoçِƒĂőőw=~űAsÛȚœEžčbʔ$ œ{[łm[ĄZ\ŐpâD ûö1`€ &&2‚‚ÌqpP°bE¶ÆŠP„Re·șôïoƒœożÍT‹«~ęUeó!ClŻ[~}qÿ—m™ŽłƒúoüŠPF,m‹s;Kö/Neć}ŃêÎGa*ăŰŹy"V-źÊò«9»FŐîlœż„ÜÜFÜD†­gí9) YÚé$›^Œx3ŻOe©’­Ż'R–_Íć#*њuŸ”ßHbßÂTu:I Ǘ«Ú^Ę2Ô°ufązš+'źŒÌhUçóïŹ$ŠÒU‚"ó|)9ńe8ÔÙB`Đ_vŸ—ąW‡ŸŒBQZ%}_Um™’ž[%‚†ÖF_ƒî¶çò‘"Č.”ÒvHíś!#œ(ÉȘ$eż*2ÜçeO2ŁKÙńNŠúț(«$țy%‘’ì*Œá­UŸÍ3)ÉȘäÊÉbȘëÌ;”ÉeŒü6źĘŰ2#ń†â đ.Š2¶œ•ŹW{>ŒÌáŻÒÈčXź.g^R9[g&ȘJHJ• .WĐ–Șœf6 ڏtâÜșl”žHŽ,ÔböïgG›AöÄmÍ#úŻuŸ…W*8üUÖnŠ„ox„àZŽt0ŰôêV ÍȘčBŐvÊȘKoRĆĄŹęŸśeìÀŚÚ€PûXšXq03’žźwĐÏ}ú/·Bćoșiäq>ÿ\ŁĆšąnuëv!ÿP+kH-Q”%k•ïê ‡2śk”«Ÿû uÚ.őÊv:śdƒŚ:{B#]Íù5Ńč0‡NŹMúM«ükź~ŚÉ±‹fœrkˆ+€U—đh›Ú(Öۀ'PJJ~KX©•wK!ŃÌ7nÒ6 :œ„4ăÜI“Toˆ&8óÈ#”C%îîȘ!·©S]ùńGÍÎ8+«ŠŒ<í7Żűűrúô±A&«­GlŹö<•œŐù]ș4^`uëfEbbčÖŠêj‰œÍč\ÚòèŁŽtìhIxž%¶¶ őyryӖq…„˜“•UEaĄv}cbTxPævÉɚ“ÈKJ”(•Üpë‡îĘ­©Ș’HIўžYłˆ À 33 Ïÿ‰‰)ŁÌWÙ7)I{R{lŹæ[gMæÎőjpű°nš&ŃœÂöw’ÉŽ-CźáŰ֜>/{!)%~}žäÈBŽŐ•GżSEVí|Ìpïh…gWŒșYăŚW%MÌߎęNàĘL=Nê±"bțÎ%úÏźœ,ŸńÉŚ!'ŸŒêzÛ \ܑÏĆù˜Û*đ·Ć#Ü Żn6xśP9țșQŒČc4ïcAJnaVä^ÔüŸ8ł[ÏÚœŒ\C-©(ź&x˜ÁĂ4‡źKČ+që`…•ł %ÙUÄnÉ%xž#r’RąíŽ,KĂÆĘ”Nă\P˜Ê@Š^gțÈFY-aëe†č­‚äÈ”őƒT©DeĐ=˜ZÊ©ŒșˆąČDIÁ5攩†{-(ÉȘäŰ ÏÍȘwwU'–|@łTUłń•86·U`ëeFÔïY‚ Ș\IòțB:ŽqÆÚŐ§ d2•ÀźOÂź|"Šž«?»†Ș†s•Uƒçúj€”rQĘŚö–ÜLRKTQÒ¶¶A7L`Ó€Ë% O„šOJq’ÆçȘ«“”kæcŐäwżïhîśĘ`ml5ó,Ij0]cËPq+ȘҌÂWKšŸœŠlSÚœÀ”v/4«l5b«ț””őĆjl„Dû…áJÉeȘ„jümÚh|ßPÄqÆ^.Æ1Æÿ1Ț;ùr™œ‡Ʊ;};—KRŽÒ·$MŽ`5#rUƒQíƒŐ«—5:X’’RquB”BăxVVVDDXqôhí›Ă”&j›™É))QjˆDć5*df&Łžžńáq ù Wù,\èÌîdeU±wosç^aïȚ":t°`ùò€F_ŻIR­Hl“«s3êÛŁêÚsśŻ‹…… ™ŒF-ćżVš§Tą^yې°«ż*±Š.‹§Óp'—˜Űôę}Zą9Çÿ—ŻŃ©[›ĂÓ»;đÔ¶ü0đŒÖêAßȚ¶ŒXÚŻî*aRœYIrd!éQ% FźÇ™?Č©(ŠŠç ±Ç;†;ßő%;¶Œ?‹áòŃæmńP˜Ș-zÍŹŒűČ sEa*ŁșBâòŃ".,Ä«[Ă”„5Œ"ŽŸx«{#drUOY)Ńăč†7.JŻÄÖˌ’ì*ÎoÈ„ă#.űö±„ČD‰•ł ńÛó±q7„ûdw|zÛbb!ÇÌFÁùżTŃû« *êFŽ4óŻ@&kwŐPEwźő‚éŰւӿdŃù1îęŒ ë&Æ5œ°.í-©ź(Ë»öiï«zi(čF9‹ÓUö”ń0Ćéꜰ’líü S5ÏŻÉŚï[”@źKQz%æ¶ ­ïŻK ś ‘{(«.Łk?,–”^':5ÄóvŠęŚšŒëGXêS#<>ŒšËș€ßLSè±ĄƒŚŁJjž#.ŸZ¶=ÍĄÌę Š)ȘÒÙM-[ ùȘHš­©ö†Ï¶Šv(d Š*5Żu­z꒰‚9çŃÇ­– +Ü,ÜyëâOÍ*WŁibȘ9Âu1Ș9X“&©æ =őT"Û·kż•MžìÂwßù3uȘ+O?]«ĐĘÜL°łShì%“©"ǎi†pŠzxy™be%ŚJ{=ââÊèÒĆ …Bб=‚••œ/żôcϞBví*bÆ wŽ)æÎ;c4æU ȘjÀuwmo ńńćtíj…ƒƒB+jŚźÊኀ4}“ˆˆ‹+gĐ [üę͈Ś3ŸîKzz% €SU%Űp4©]; ȘȘ$ź\©TŻúkŚN;mp°æÄɚHcLL9˖iwŰŰÈ 0o–ÀÒçJűsr<ęٞÇțlÏŚĘO«‡člÜM™°9d26Ÿp‘„ùê-†Ìó#hšČ&F1c6çł93kÁĂèđ°3ua–0>v?ąĄi œ2ê‡@:=ê±ïÓ9č2“K‡‹š*SâlAÏç=Ü”Ÿ9oI Ćé•gVČŽóÉŠù'e•DĐP*‹«©,U’Čżs{’Cì±p0ĄČD©ȚH”àrÍęhXĐÚy_6uW_§.;犰óęÌlät}ҍłkČ”V"Ö§đJ% 3–N&”Ö‹rÛy«Äcț%U›¶vÓȚ©À¶N9k&ÔÛ50ÄlíȘéúkÚ㟓ă8·>G+œ!PXYÀš€_ßö)^éđÆ57 sèÈÄ gÈ«ÈecÊzőś’Ă-ń…±x[ùjMČw2wfl›'8•süŠüäNMÙÜ,<ŽÊÖÖ6ˆ»<‡q03R=ܧ Eń€jđp֍cŻ.(hìêż_.źà­Nï1Âg4Ö&ÖTæł©ÎęÒMișŸ#Í*B++9cÇ:’šZ©^MWŸßÏ„žXÉžqNê-jxúi͟9Ò//Sőv 5ŽkgAÿțšop/Œ ZÍT?íőŰŸœ++9ăÆiźűzòIg&NtÆÇnj•3ŒŠÒÜkËÊJź^ÁgaQÛč©S͖ Q3lÆ wïÍÌd<ÿŒ+[·4tj“©čőm;p -ÓŠčŃ©“%UU;v2dˆ]»j±öêeMïȚÖlß^Hi©’ÔÔJ+˜0ÁYœíš"rÏ<Ły}ûŠ(+S2mš›–]ŽÈ—šš0” o úZÂęWǗg`ëiÆę_”Ux—&D~ȘšgSwÿ,·0ՐLCCm !7‘ńÀČ@F,Q…è+Š«9»6›Őăbˆ^Ÿ•ł ÎÁ-łÙąÂTFûœÈ‰+ăÏ)ń$î)PÏ­r SĘg…čÎîEMæù\C-Ց–d2ő] ŁŸÄôêsQš[Erd!ACh;۞äÈBȘʕgT’UBÛ!ö„ÜçHÜyêáŸÂÔ Ê « `§± T Œ#ŹÉŽ-ŁąšqQìšm 6>‘ČüjF~ˆ„Óőßgköóï§°p0áćó]yîpgÊ Ș)ŒR__;­vaj)Çï[ S+(J« ăL UeJÚ¶ŚșVÀÍkÔŽ»șsŚjh;D”B±ĂCÎZÇź‡>„ÙÇgZr™Ś;ÌaNçyê!Œžfęÿą)˜~ű9ut ·" Ëfm8z./ŠÓč'Śf]"4Ž}Űm1v[LwçžÍ«”ŽìLÛÆ•ÒT^ Ąž3Ș­ŸêœœO"–h Û5—-—7‘]žĆŒoâb^;'ÏBaÁìNïS-UóGâ/ÊërI »Ó·3ÂgśúŒd]ÒïŚJ¶MY1šëOćÍ$ś1c±łSđÛo9Śò+,Źfőê\,-ć<ù€Š3űè#ofÏö€ŠMscćÊ6ìĘ[Ä'Ÿ€ićłn] “'»0`€ }äÍoxđ旙M& €qùr%ß|ăÏkŻč3h-ïżïĆ{ïy‘’RÁČe™=ZBq±’GuâÙg] ”à‘GÙŒ9XĆ©+Š.]R…u—.őăÙgžpúĂY?^Âìٞ,ZäÝwÚ2j”»v…`Ƅ ZsÀšËïżç°łfyđńÇȚ dˌîüđƒ?ĆĆJțś?•m_y%…ÊJ‰ÿ æÙg]éÛŚ†çžsćŸ‚HJȘà™gjŁăÆ]ÄÆFΞ=!ŒéÀĐĄvlÚ€KI©àÿK#4Ԃœ{Cxè!GîčǎÏ?śeòdΟ/S/N0¶ÌH€(œ’ĐQN„=šjŸćWçÊùôԜßęiwBG«Ò˜X4.‚„Ź’đèlEŻ=i7ŒVŰ[8˜àaCIv•ÆDz]PVIT—+±ś3ŚÆt0gÄR•€4m€0l {>șŒÜDÆC+‚ÔBE&SMűî>Ù?s”X8ż!ïüûÛż­v‚wü¶<üî°Ă)ÈBœzTÂzïǗq Č`èGțêè›ÂLÆ}_ŽĆÂÁ„}Ÿ4=Pp肭3±ő4cǶŚM{űë4*Š«čkŸŸÚŠ SȚđÆÌFÁ©UȘHíȚ.cçmÆœ‹ÔbPn"cűąlÜM‰ü4IR »_žAÛ!öt™Pë/üûÙŃ}Šæ Xâ.Ő°vś)îê¶ ȘùWŁżąĂCÎ40LÜÚäUä2|Ûb /đzÇ9œ}™”wnfyßß8tßY6 نƒ™#Ó?ĂúäŐç&'"CƞáÇù°Ûâ&]W))™~ű9J«KŰ:t_ôúŽÙßgëĘûÛæ eíç»ŰŻZČȘŠšČŚŽŒ€•‰5‘ĂOòIÄævù}ĂOĐÇ”%Żáï«+$u%Ż"—7ŽMÇĘғ}śžd~Ś…Ìé<śĄ·k_ž?ű”ÖźŚcŐßđ·iƒ›…;«ô=<ˆædői“k†š€Ń ÖD#V­ș~űúÇłxê)gž{ΕÏ?Ż]IśÌ3I|ń…/óç{QXX͖-ù<ś\ČÖܞS§JÙŒ9Ÿ/żôĂÌLFZZ%K—fđ꫍›,YCQ‘’^œąùá‡,đQÏAÚ賐©S“Ő“À<eËüX¶ÌPmlúí·™<ôP<‰‰<ۖśßWm·°re6ăÇ;ńèŁŽ jÇ7ßho6©TwÆđé§>LêÊ+ŻžŁT©S%ŒŸš±ù§źH ÇçŸûòê«îê=¶Îœ)e۰XąąTo#çΕѳg4ß|ăÏŚ_û!“Aq±’ÈÈ"ž>Yc’ęÁƒĆŒ›Àœ9žŹ_ˆL‡3eJ«ViŸ…Í›w…K—*űàoÖŹi«źÿš5čŒòJJƒęoX§æŁ”æVńÏôù”#–Ș6ïŒÛšGÚéBF82#Ą;—âaƒčœ û„Òw†ö>ŸŹżaêE&ïíÈÿ„’Ÿ\NᕠŒ"lšźX71źyà I°ï“TîúÀé±]čž=kWSŒșÛpremÛcçÓr? ·5]ó/1àMo^œŰ+'Šp ±ÄÖӌœž2Ö֛ăœ!‡aŸ`b!çâöÚ-1.n˧ï«^(«%­!»È…©xGŰĐw†Ç8“[†k˜êÿœ•Ź^ŒĐTŽ}—Nç±.t~̅łkČź9W˜ZÁ†g/2òÛ@^ŸĐ•+Njqïd…„“ ç7æyu”æĄŻÒđémKç<áDæùR\Û[bçcƞ/©7Mű{Z.í,yhE0}_őąČD‰W„ 6ć6șvĆ”$ÁúIqŒ[ŚžqkCÈ8[ByA5Ț=mÉel™Dʁ†Gź…Ÿž„Äą‹ ÜܝGgl› tv슍‰ IƉ,‰ț”bż&±H{ĆìąłáaéEžc7|­Uț6:ï,ź»”V&Wł/c7‰Ć êïŽeŠŚßxłÓ{D8śÄËʇKĆÉÌ;5‡Ż/|ź^1XĄŹ`_Ænb±_šÒŸŒĘZ“Üó+òü>Ż"—}»čRZ+ű7]ú“țÿteV§wäq.æź$Ć3ăÈ ŹˆÿN=ÇìZŚ*šlü”V'źâBA4Żw˜ÍßQȑ™±‡č'ß`kêßêt…•ìËŰ}ĘaÓM)ë)­*áRIŠÖŁŸžĄH’”ÜH†L—qi€I+ű xč9çnÿ"žäăúę1Ùuë=Účü2™j.OBByƒ?撜܉ÌÌ*șwÆÜ\†żż9±±e:ÛÊJN۶怊V6=21‘`†\.#>^û'mêăè“ IDATš ŽTșáNć …jëƒôôÊWQ¶$ffȘkćæV_ś'pŹ­ćűû›Sź”œB}<éJQz„Æ^Z ábIçÇ\pmoIY^5qÿć©ïw]‚îQ :¶±àʉbw瓌_[™˜Ë ŒËžvś©ąš1«ÚB·§Üˆú-KcXÚÄ\N—']ńêj•«)čË8č2“ôšÆÏ?­áì„ClżçŐ&Ÿ'ž}ČmDZû/0çÄk,‰țTïŚłÆŸ‘Râ”Üx°àœŻcncݧłÀšűSó֎/âI9ŃzëFU­+°·';ZáÓL%j9ûÄ!¶KpmŸîęú?JûőȚêęÄô‰5țÜŻLŒæńFʈoÙăX7mˆ°iëą‚Vą·neÄŁ$žï;ƒ‹č+źnÌ;5§UÄU Ś ŽŽàĐ` 7mŁŃÖzű.]Șà…ÆM썋+'7WżCi@ ÜÎìÏŰC˜C'ŸˆțDëŸőIÍ$w-tÜïêZÜÜIî­ ČŠMkü갃ë猻ƃxëZ†ÖđïăäŐ#Ïߜ 7°Ő‚ꛉ^VXbXP`đˆNA nY4„ż†ëÒȘC„ő“ŠŸL`hˆ6)·.­ùó~·üĄ@ ZáȚ†FĘ9XúŹĄU– ąW‚[IBïCƒ5ŽÊá”’ˆŸL`hˆ6)·.Jh5GS‡Eo&·(Âż Öœš€WuŁĄAńü Ń&‚–AźúŒąà&ӈt܀ƘĐÄÑ%žz/‹Àűi-ŻŹ+‚U_ 6„ìÖ–XëZ€@8\Ę0Zó5Pđ ûæă¶§5Eő­ˆaTŃ—òЛ]@űű–À(MŰ@Ą•­xù–ˆ`é]êÛÙȚêĄl}?ÆhŸÖŰdź±H1š„Ѷ)čïFk?=ąO›Ł=šŠhSšèÉÇ7)ǖXč`€‡8[0Rûé!ȘuC8[m„šÖ ŁmSrߍÖ~zÄûœÜŠ$n‰!ÂT7WW„ę4č՝-©ęôˆŐș!:pm„šÖ ŁmSú»ï©MIÜŹ]óžÂáê†Ń>zDˆjĘ0JQh@ŹQÚOŻÂÇkŁgQĘ$œÓŹę@à€k^Zy·t†5ˆĂ‡6Âáê†hSÚQ­F) Äǃ‘ÚO±OÚ2ÓM9Ag”sUČ˜Źk^­ë†ŃvàrߍÖ~zĈźA ڔ6BTë†QŠBęûű?šz‚Î @)1žèš—p¶șc”‡ąZ7Œ¶7ûnŽöÓ#ÂÏë†hSÚèÙ&ÉÀŒŠž$“Zš%ö[À`u‹dŠ/ 䔯@Ša0ˆ=tç6©fŁûé†ŃšÏ@ n Ć0(ŒŰÏKÀ]Û_aGSOl1pÇÇü<Òb¶ Âáê†ŃšÏ@ n Ć0(ôf“ÛÄŰ·I5đńșaŽæÓÁ—î|•—šsb‹ Ö ”xhtnêč"dŹ"dŹÔ ŃŠtCŰO}Šê[Ęǃ˜țQŸVđń‘ÀŹæžÜą,€^bÌȚ€…\ł0Yn Ć0(Œ8dlÜUl2"ŠĄFk>)žĂ 0ÒHuđ6°hÏkÍÿuX5ôünÀršÍFë, €àR ƒBˆjĘž ȘŰd„šțöÎ;<ŠȘ‹ĂïîfÓ{Ż€jĄw*" €€ Ò°Ąą€RAá“"‚"ą *ą HW:„&RCKB „ôȚË&Ùòę±d“e$l˜śyöÌÎÜ{ç̝;ż9çÜ»úQgÍW{ ?Œvì#ąô-šÖ@ëùHçÀ3€ ©” ôBlőĂ@šaPąZ?ž‚SŹ65,Șć@°Űü}| Šš(žVÖĘŽžpLY„ś€Î>À €áÒ ƒą‰êB ęß©ŒT` < ˆwž4% PĂK@@@@@@@ †–€€€€€€€@ #,FX5Œ °jA` Ô0‚Àša% PĂK@@@@@@@ †1Șí ÎÆÒèxî€emŚYÂrêRk6yJŒę”œf•©á_žšMJ€d 8 „5óD^“Ôڏ=ŸŽa°HÄÀżV*x šłÏ+iž4Ă D”~<%§YeQ-đ‘ |ÌmæIIMXăëÔ-€o1ŽF 6@„±EaÀՏ:k>iž4Ă D”~<%§Yež‚1țđZ3OÎë[P Ź“7éŹB„KȘO~?š>”j“§ÀàOÁ)V›§`À­UêŹù €áÒ ƒBŐú!9đ907Ä ĆÖSc9X'ąi ü%!ĄvąŽŐÆ@šQ-j»ÿ֚MD”YxŐ©łö«Ej[TŚR–Á ô)]DrżƒÁ4ŁZ}J?ęŒ€ORÔB륚Öń˜ç€FOƒÂ} N±Z ęšłæ3†H3 ÁS­OÁ)V›§tœ/Z”ôæâĂ\#,„Š9”‰+ÎÂہ.”i“șhê"ŰOÁƒĄuvŒ2ë^gíW‹žj꾇ꌁŸOÇĐș•„Ő.S_VŰ5Z'E"$zô”Sg_ €áÒ ƒBđbèÇSpŠŐâ)ő`ÔuÖ|ÔđÇ۔9m|™]ʃôX‡ŻČŁő*€`@}Ì`\ęšłæ3†H3 ATëÇSpŠŐBă5€źíüPVç œB„ِ âyCń§ am—±~a]„Đ ~ÔÙ>e ŚœÎÚŻž{úQEû9­“Ő)[/„‚úšpÔ§Œš€.v†:ysÈ` uÔ~•“•ÎìwÔŽŠ,ÔúțóGž’@›.}6nŠæ»Ò’bŠŸț,*„’úCysڒmÛÇúQTOp«NŒ™4·FË64žäx^n[Ö}ĂőˆóäćàæéKŚg_ąUÇ^ś=NŐúQgû”\wČ_;„ÀRȘpŚçűș€]\ƒÁŒÆOŠęŹm‰čFFZ·Ł#ÿQčÀÊHKâÀÎőšżł3Ó:¶\`]»rŽđÿĐ(€Ê6Ê„łÇ(ÈËÁÒÆźÆË~žQ]STĆń1Śxó„¶äćfimß”i5ƒ^Ä۟,œgႧZ?êąùQ])ŐÖ;ú ,W}ŽŻ „›C!4š«O5iщ°ĘÉÎL#>6w/őŻL=±_kżÛŃdf€bkï Àćóÿ–—ŃČsí‰ •a\{hB”yÜąpțÔŚÈËÍB"1ąkߥž{ùłgËZR“bÙüËŚtè>f­»jd@ÙÇm?CCăőă!íWmœŁ_ˆP…TŸăk‚șŰêŹ(4·ÎÚï” ,€ˆđ“žzȚXÿȘ–‘‘č\=S8üżĂtîó‘Ô^k±DBă:ƒŁJ©$91'OŒ€Æl‡B!';#gí6TYŒ©T*Rb°stĆÄÔìûˊ`cWœŒƒÌŽ$Ì,Ź03đoȧ§$`ïèŠXą;áč /›YöNn,§€XFjR,öNn˜[XĘwߔ„ŹíïÛ>•RIfz2…y88»ß·ÌҒbÒR⑈%88»Wézfe€q§Ž{Š?Óț·Pś·©c{pêŰš¶êȘuœà©Ö:) dŒƒŽ_”őŽŸŹ'’'őź‚ËX?ȘÒ§‡vÒü?òÂIș=7€ówVç>C9yx;…ùč\8u˜NœŐ+"\íÁò ÁÔÂZs_ž9¶›ŹàòÙŁäçecd$%(ž oMÿż fšșțȚű=«—LàóU{˜őV?rłÒi܆„żk§”•œlÎÂțù€Ț/Žć)‹(‘±ú«iìÛș–Âü\Ä ț BxçӕÔoÜRSÎÊï±oëZ\=|ùÖlæ4œÒb=Žâƒyk*”ß̉ÏqćüqÚv}žgúà»ù“ˆč†H,&Žm>šÿ3vŽê—ÌœŹtF?À-&lśΝۇ•=óŰK`ăȊ XżrgŽíææ”‹š”Jlìè;űuFLœ…ÔŰD« 7"Î±ìł‰\8‹RĄțőŒÁmxcÊb7ï ÙO./eƊ9ìüă;òr2‰Dx4æ­éË ź b” ëVÌáŻ_Ÿąš0_ł= Q(cß_@hûžšmiÉq|7'l„læ·DbD»nęykúr1\±Űˆiÿ[Gfz2MB;jž{œÀò6—–j sÁ‹Ą7uŃ|‚šźYêŹÀ2@uûX\Æúaƒ­w@S,Źl)ÈË&òÂI”*ž}ă ©‰Žèۇ‚üț;Œƒ §ŁTAzJ<é)ń€vxpÏæY6ç *.Ă"——rćÜ1ȚڊO–üIÛn(.)Š ?€9ï$7+€zțÔŚ]U~*Ź_9—ż7~@§ȚC7y!*•Úk5m\O"ÎÀÌÜYQŚŻœćƒ—Û3ÿÇę4iÙYQ!y9$ÆEłàŁ—)‘ʱA“Jûš (,̧ /‡ §öÏäòRÄb J„‚ł'öòȚËíù~{Æ&Š(U* òÔçŽvÙ Čғ”š©Đ™LÆû#;r3*\«žœÌ4~_ő§ífÉș‘qț8SFuEĄ`$5F^ZBÔĆÿűx\/țFà9ïę!ü{p&Šæ”–sę2SÆtgæW›iß} Š]~\€H$ÂÍÓ+[nF…s#â3ßìÇČ?NáÔ …BΌ }‰č~#©1Ț‘scûÿ"öV+·\D,ź|)BKșȚëP>nĘś—f[@ŁćăčŒLÂ=ihăŒ~Zs\ŁĐòwO?ÍöÈđ8ô.ś]9wTó/żÆŐ;.žÌęá0{6­dóê/űwÿf.ž>L“;^1_2RâQ*•ÌZ±ł;Ë äbllȘYR@y—š3·Ž­RX°ì œÌTғă5ąM^ZBâíëê6žûjò-ʰ°¶ÓúÛÈŰ{'w2Óčvù„r9‰z(T)•D†«óÈl\0·¶ÇʧæŰ˜ë—ŽÚșzá{äçdâ]?˜Ż~ˆł‡/7ŁÎŁTÈùhá&œ= ‘H›–Û@„ÂÎѝQ,fÒÜ_ˆŽ:Çé°l_·Ya>aŻç”śŐK!WàŚ ”9}†SZZBÄč#Úù+GwÿŽJ©äèž 4 œ·ÀÊHM`î;ę(ÌÏAjlÂŽĆŃąc_”]/†ȚÔEó ąșöŃ+É]H|{“áu}"íWmkŰŒ“Ö}V?žÆŠšï›Žêźs/6hȚYó}«ź/hò~^ú‡vțJQQ!û·źaĘȏ°±w&€C_”-*”SæĄ©ű)ĂżQK\ŒxaÔ4lî,rșúËI( T*hĘU=;źŽDÆÎő_#/-E.—óÙÄȚ ogÁ{CšR—Łó07’šVÉ~e‡©T*Ÿž5Š[Ś/‘•‘Êÿ{—Œœ ‚ï„R•ȘŠć›è”UÚKMŒá«OFw+ŠÄžhŸž5Šž›të?„ \œńòo À‘żcÏæUË8wb»țXÎá]żrńżšTĐæŽ T*Û~YLI± „BÉą©CÚ΂7Ô'=9ž”„†··äŸ>,œò*ű7lÉĐ7>Մ]Í-mP©àŸ +x©9ïiʎߗcljAHûgyéO5çhnisß>ő͜qädŠjźcÂíklÿm©úłn)çŽïybïGaŒ:ÇùÚ°[u©!ÂGTM"Œ1éÇÓlż mŐŽ”:ę^ùˆÉ ÿąI«g015GĄ#‹ńkےčkNĐșÛ ­vßïž.CUáûnÇáé§öêü±by9YHM̙·ö$í{ ĂÄԜœÌòr2°°ČeèÄ茘ŽP«ŻĘ]gUȚșœ=™șd;–Öö”–#‰hÚș;Ÿ­>Šć «Űđ»ígfiË?ŸąïđIwûU(• Ì,Źé7âŸűù?$RSÍț C»2śÇcxߙčX&źŒü›0ő«ű7nٶ•H§ßąû ŻcfnE~n&Ùɘ˜Y0àŐ)L˜čZSæű™?2hì ,­íÉÏÍ$âlyÙŰ;{đú'+é9űMT*uŰvÎȘ0Úő‚X,!)ö:Ś/ÿ‡B^JƒŽÌ\±·zAśŽÛ‰œQ)•<ˆÇ}ÿò=ùČQÂŻŚ§șˆ*.DX]~;Ć(ে.à>R|ŰPšíÙ$O:OÁ)VŠB^JRÜuœÜ|015ŚúNTKFQ)•€$D"]ëUé']Ĝ7șyțÎîŸ,ÛvSę@ń7°¶uÂ⼄ò꒓™B±Ź'7D0JQA.i‰1Ű:șacçtÏęT*iI1ÈKKpróŃYŸ …BNVZ"ùč™Ű;y`}Ÿ2‹‹ ÈHG©«Ż§™E•ÎOč €E­Ùä)1v-žæ†AĄ {đnćlˆ°‹ź5êŹËSp,5a±DЇO#àź{¶6“›Ebœ=ËŠćaȚțîFUá_„J]‡‹Węû–_UûYÛ蔌󀶚š[ă|ßzËjwtóŐüuÏ6Š°w©‡œKœ–)5”À”^ĐËŒo« ä~ƒiF”Æ)ęxšìśÔÍ"f j# ¶úQg čîkżȘ C8Ćj#Ź{€uöžŹE„q^?¶OœÀn]Qš‚ꎩ«ƒ­»o#JKбsòxŹ/wuvŒ2 ë.ܓÚąZ? őž4ža]ì†zqˆ žuÖ~”ˆđÒć”ŸÓüÿAK°Ÿ6†$ȘÁ šR%êìe@ŚęiŒ' ΃UÔٛŁ1€Ś@šQ-êlŸ2ë^gíW‹< šD°Ÿ6†4ƃA5„JÔD2%ÜÚ.cęàșҀk Íšu¶OÈuŻłö«E„çž~șę &DX;ƒĄ_ÜJ1ÁêšęjATë‡đŚEŐúQgû”\ś:kżÂ`ŰB”_-"ˆjęÆx]Q­5Ù§«Àn]„W?„>„‹ ȘőŁNŠBzÈÖIûŐ"ÂŻuiŒŹ!ÂșŰêÒĆŐÂ@Ü:kżZDpőCèSșąZ?ê€(41êšęj'.D( ¶ș.cęšł}Ê@ź{”_-"ˆjęú”.‚šÖÚ°ßcX"àæć|n^ÊŚ§zȘ`Hw]-QS§`)Â1¶°†JšËÔÙÛÆ@.sÉáTŻ”»…\š§šgmæ#™Uú]mˆÂÇ"TQgsÙóK’>Ő Ô(ĂÛXbț_Æăn†€@'74…ăíż~ÜÍĐą»Ől$âÊVmđŰB„Oș [ îl7/Ö IDAT!tIšAž— •J[·Ô¶Wń‘ ,Á=*`đO'•JÛčSÛCț# Țœ«àÁ04„.) đäąT=ÚÉy/DšOĆŐ@‰Z·<ȘˆZ­ Ź{ˆàÁx2ÆwCD„R;wUśŹőáœvî?CCx(<č(Uj/ÖŁB˜E( đÄSæÁzTԊÀf ÔEŃ/ đäR§) đäR§C„Ő ,CCè’O.ȘșäÁș[$Uç%<ÌOOˆPO…em-ÁȚ^Bnź’ÌLč~…U“zőŒ).V‘’R €œœÖÖbâăK‘˝tŽŽăèhDjȘœÂÂGÙm-ÆÆ"ÜĘ„de)ÈÉQÔ^E‚êšjûVȖÚĐÒ± Áv!Ôłđ!č(‰Óé'9œŒUkolLˆ}(ÿ$ì łXű‘ś§:"|łüћ!Cì8{¶–-#iĘ/6âüùBșu»À矻3a‚ŸŸ—ˆ‰)©•:E"=ڑ“'󉈐0|ž=«Vy3hP4ę•]+őÁÁfœ>ʐ3ùüó€Z«GŸÏč‘9­-uËTȘÈK*%3ZFNl1J=xăÁ(ć*"·fàŐÎ Ç 3.ꑎ\V3Ûłœm1s0âÚź,nì}rûUMcjkDÁö€^.$áLțănÎ=1ł7ąA{’ΐ|Ąàq7§ÚôőìÏČÖ?àdê €\%ÇH€~”ĘȻƞă#8ŸyFë/ oŽXʌsr+?€g=žgfłytĘĘJXO uʃUæ…z˜G†>,GG# °ćúőbZŽ0§U+ NŸ~|E\\ .QRR{ÚűĘwYșԋöíŁ4Û22ä\žPDvv-zuȘD@o[ž]âsß}ò“KYś|äC?|Ÿ]ìCIR#°šżæL«ń.\ÿ'‹üXœmyőïFˆÄ (Q‘W,Źj`ăi̋?plQąA ,[o^ü)€ƒŸÆŐ9őaăéÌl6TY ăÿ}•°äd§ÓȚč3}<ú16p"ÿô<ÂàCÏr,5LsÜűúïĐÏs 3Î}ű[/đž©SëqÍ"9ÒccoŸËîĘLœèôXÖ_$óĆÉ”Z‡‰‰XgÛ_e?ў«șÈÁOăžŒ1œ|ƒÜC- èmKđpGƆ5aięsä&TßÓyvu*Š’ÚšżæŒH 랏äêÎ,D‚vD€U}Š6Ć­ühșínMVIŠæ»ĂÉû9œŒŸĘ ;ù«ÛnV”ÿ•6»šWšû[,`hÔ©Ą>^(}Ž3Ƒ„„RöïÏćđá|† łăƒât<9 ˜Ò );wæĐš‘)]șX‘—§`śî\’“K”ömÛÖKK ûśçÒ„‹­[›săF1ûśç‘—wQłffűúš°woźV.”X !!ætíjEi©ŠŁGó /Ô9ŸQ#SBBÌńś7!-MNd€Œ#Gò46jŚÎ‚ƍMèÜÙ {{#víÊÁÛۘæÍÍùïż’’ÊÏG$‚=ŹiÚÔ • ÂĂ ËCYáÙììlDûö–=Ș~ÓîÚՊ  ""dìߟK~~ŐäAAŠ<óŒææbΜQŚu7vvzőČ&0Д„„țę·€š(Y„ćčșJyöYkÌÍĆ<š[VE40„]; ÜÜ€\č"ăĐĄôYœț ŒÖîÆ”ä+ž¶+ fú <<”Ńuæ….ÂXlÌôs“”ÄUE'ïç§ß3.đM†űŒÌšë+y§ád:»tàŁ&3ž™wƒEW>Ś:n@œÁôqï‡Ł©gÒÿă·[k‰/ˆŐ)ÿEïĄtu큷…7òź±#n ‡“śkí3łÙ<źd_"6?†I>"±0”7V™sE§<#‘óB±/ńâ nóČßk4” árÖ6ÄŹ#"û2ÖAŒôM3ûPb nł,b!7òźi•#IxĆ,íœ:âbæJdö6ÆüŠ*•ˆ$|ș˜I{ž•ÍżQÛ7çrÖE6ÆŹăJö%Źê3Ò4!ö-ˆ-žÍòÈE\ÏœȘU—‰Ű„сăiíŰ{"łŻ°éöïœÍ8„ÙÇXlÌgÍżdoâ߈36p"Ws#8›qŠÎ]Ű·EËĂ`%”fzđgœJÿ—żnošôúê‹àÁz­ZYĐŽ©K—а~}&Ę»[1j”ƒf[ÆÙóé§nLŸžÀŒy$%•bm-ÁÂB̂É|òI‚fß3ÜhŰДƒó7Α˜˜ÜĘ„ˆD0rä-6nÌșg›&LpÒÉÁêĐÁ’?țđĆÓӘÜ\––Äbűî»4Ț|S}ă‹XŽÈ“·ßvF$‚Ü\ÖÖÂÂòèÓç2™’™3ĘxöY,đ 7WM8œzYëä`ùù™°aƒ-[šST€îJffbŽÍgäÈ[ÄÆȘÛjΖ-țŒóNÓ§»âê*E©T‹Â릋éÓç:7oßśZ˜°i“?͚™QT€D"al,bϞ\ žAq±ú*bÇwßŐĂÁÁˆìl66T*XŒ8…O>IКđùç|ü±+ …Šą"%ææbÖŹŃ͏HD̝ëÎÔ©źˆĆć¶‹-aäÈ[áXj[ODnÉ€éPG“ ź`oÎ…)šđńÇźś=G‰DğúŃ )ŻŸƒ•U8źźXŸ<•Țœ­™=ÛP{˜~ùƇŒ 9ĄĄ‘ŰمcoÎúő™|ô‘ ~èą)ó„—ìűäW~ÿ=›plmĂ1â–Æ^yûm'>țەM›ČhŐ*›pBC#).V±u«?vv’Ș]ʊÔČ èm @úŐr—Ÿ)o…‡Đ{‘­,)-RÒp =œxóöĆ€fćŹĆXgB^uŸgù֞ÆL<LçižX8IKDŽyۍń'ƒi:ÔńžÇ™ÚáŐÖc+ b#^m-qoĄ~5éDè(gFlo@ÓaŽŽ|ĂÇ ”7ő…5ŒÜѐàáŽ(ć*\›ZĐaČ;Nô\ùœćŐȚŠv“ÜžÚŸț+ę°ő1!è9;úçG/ê1`•?/Ź ÀȚÏŻvV<·Ì—>‹}ŽÚüČ#Ï6ŁÓLŹ%X{Ó{‘Îcíi šĆD»Inű=cŁ9N,Ńó‹zŽ›äŠ±?šœŒ=żđÆ-ÄB3=żÂQûÔÏYź·PK^XÀ˜CM0”)ïOAęìi1ΙaŃbŹ ÍF:QŻœU„¶í<̓?űcé*ćÖáû‡«ûŰ2)Č9}—úbfg„„ł”nŸzńÎćæŰÔ3ŃìŚûKoÆiBŁ(ÉWàÒĜț+ęyęx,œ€ćç(†á›0tC}ë›ad&ŠÏ"úŻôÓí¶FŒ9Ԅ«ü êgGi‘’ŠCxăDSÚżï~ßv? \L]±’Zs;ÿÖśœu€@« &žß1ëxćè`^=6Dkÿ†6iÿw0w· áOŸú / o{Óì31hÏ{œÀ·Q_ű—ĂÂúșŁ>ënțÄ; 'ÓĆ”»V™ĘĘzł'aȚ›ìéș»GRȚ·ÍÏz<ÏČÈEośŁÍźÆ|va:Ί.üȚyó.Ì€ŃV/:ïnÁœđO°’Zó’Ïͱłš}N;§ŽL?7™[<~dÍwr$ù óš/"ÀȘŸV]}<ú±âêRšnó„ÍźÆ|> 'Sg~—æĐh«]v·dvű4,„VZu}Ęz~VŒ=ț2]w·âć# ĘQŸSòiÈŽsêšUWŻA|”Ï?mèș»ÇSp8y?]]{àbȘęŒæó ĆéìNŰy_[éƒJUęOEĘR]ôXÓŰČÏĂ`f&fűp{.\(҄ÚòòlȚœEP)ĘșU>È-[–ÊöíjOi©Š·ȚŠ%5UΌș"âęśăčxQęÌȐóúë·13óȚ{ś~°ĘMߟ6891cFšßôJyûíX""dűúȘK;; »vć0yr<‰‰„šTpæL!‹©ĂGAA&š6—–ȘVRąÔx†îfđ`[Ú¶”`ɒÖŹIG.W!—«Xł&ćËSiŐʂaĂŽĆʁčLžÏŐ«2rrL™O~Ÿ’V­,î{ŽÁÁf„„˜łreżțšBĄ"+KÁÔ© œ:U€««z Ÿ;Ś1#FÜâüyő5ËÎV0zt 7n3k–6w^łf葚Ș¶yaĄ„6lÈbÊ4­ș-,Ä̙ăNnź‚1cb8sF]îùó…̘‘€œœïœçBu© }ćXß ßź6šO@o[ZŸîÂđÍA„Žv&'ź˜ł«Ë=­§yàhÊoÏGòMÓp~}.’ùާ‰Ű’‰­ êŠË{ŃbŒ VîÆŹyæ2«Ú]âç>,ń=‹ŒXIŚ™žś<.áL>ß·œDrxĆč Ÿo{‰uϗÏÌőjgEZd \NóMp8W6eàĘњĐŃÎ\Ț˜Î—ÓüÖ?ŠĆŸgÙ8üb#”°»›€ž¶,ń=Ç.ń„ÇòKè4Ćś––,kpžïÛ^⫀säÄÓjŒ‹&ÌÚӘ«üÉŸ]ÌȆçùĄĂ%~ìt™Ÿ{GàÔЌȚ_úpug*ô.wî--1”5B©Páßœ\`č·°ÄÒUJä6uš©ÉZOtćÊŠ Ÿ 8Çï/FńmłpvOŽÁ§ł5=ç{k‹Ż)Ffbûœe‰ÿ9țûF7łă‡îôœïͅuilqęŸ3H„fb^ü)ÒB%߅^àçȚŹl}‘ĂŻaé*„ŚuęőŸ”ŁăG\û;‹Żαț…(V„^`ÛŃx¶±ÒšhŃíS/ûŰòÏ1Źj‰uę"ù6äVnÆ:őwÿÌ ŸÎÖì™r›/ĘÏđۀ(Ÿ 8Ǎ}ÙôțÒ§†UÁŹ üŹˆ+žęÀ} ă)çădV”1ૈÿ‘}…JÁș›k°ÒìóaăéÊ Xpir”GOź’óżKŸđNƒÉ:ć~|î}ČKČ8Ÿy„êț~“äą$ŸșČ@óś? Ûž”ΏŚWPȘT{^ś&îÀÓąŽ&NŒÏíü[Źžș”b„:êP(/`IÄ€b)‚ȚŐȘ+M–ÊąËć!ÒĘ ;ž’}‰ïŻ-§D©öÄîIžS—čș.oK_úzög[ì&6Ęț]s|niÀ€FSŽêÊ*ÉdîĆ䕿j•ënț„D$aOč€ő0śąƒK6ÆüŠ9ŚÚ@…~ŽĄêR§ÖÁ<Ű kŚŠkmÿùç ^yƁ‰8tH7gçîđ^Q‘’r4È©T€/„„*¶lŃȚ72RFtt1!!æUng‹ê}wìĐÄÆ–Đžqč›xáÂ.T‹)‰DDƒŠ„†šÓ”«Ú{`aQ=/LÓŠêAđ?tó6lÈäĂ]hȚܜőëËżÿś_ĘpA\\ VVśŚȚĄĄe皝d_T€€M›ò™ŽM›šqăF±F•!—«ŰŒ9‹©S] 2ć…B‚‚LÙž1KgMŻM›Č˜<č|° 2ĆÆFÂîĘč:B0?_‰BĄÒŽŻ:ԄÀê0ٝ“ußűK \ü=>ž„ö‹ȚŸCò…źî*ïwr™’‹ż„ŃèûJ†śÂŰR}ÍlŒLő}ŸRÊw-.PR _æÁž)1€–RȘüŠóìù(†KŽĂ·W6e [©ÀÊ]·ĘaóÈKRȚČl91Gri:̑°ÏăIżV€Ù{"ŠC±p–’ŸRJûśĘ1¶pbiąV~ÛÍ9ÄÎ%xž#»?Œ!/±„Ä3ùô*ś`ôŽĄ8WÁ̓9űu/ßÔO-ÂÊV»śÜ)ÉW°}âM­%/Ž/I€é0GZMpeß'±ÈČËCu?%ûvyĘÒ„Ü{Ôț=7z/ôáܚT¶Ÿ~ƒ<_q ”ÀÒUÊȚi·”ÎńÒ龅XhìÖn’òb%ÛȚˆŠ€ Œù!…àáŽ4éÄȚi·ÉM(!d€iQEü»4Qł_ÖMG$ĐočŻf›™œ­ßt%'¶˜K5aÆÒB%G$PÿY;ÚœëÆö‰7ïšig°LĄÎŚŽ–Ú<`O0“˜andĄ Ą=ˆˆìKwę}…Jë°ą«™6ƶÜÈ»Æ[ ȚŚ9>»$‹À b E–LNIŐ' ĘÌ»Ą”~WĐdÌ]»t™úeS*Rś”ëúˆEbҊS™Úd–ÖŸb‘„JI}ëÚućkŚ_w§.íë›^ŹźËXŹŸ—Ë<‚w‡öźćF‘R”Źc‡èŒë:ârWüVrJČê3’QKxÉg"Düvs­NÙ5IuB„51ǧNć`•…çÎőЄ Í›îÀ¶žșJuŰoßÖ͍ˆ‹+ÁŰXD@€ ‘‘ê›7>ŸD+ŒâŸmÛȚߣS‘sJKU:힉DĄ ŽŒăHŁFИšŠ).VqíšLëŒȘJ@€:t“˜š[o™ ||Ž|“ăË()Qafvąsqqś>G‘üęM8vŹòŽŠm’É”‰*mûĘk‹ùù©={}úXÓ§u„eûû›Tșœ¶9óC 7æ „«1mßvĆÊØíăorá·4ęËfš;Jqnl†{s ÜB-©ŚNí52­ș“ùâïéŽ~ӕ—~ŻÏ3łœžș+‹šm™ÄÏÓÉÍ©J…ŠÌÚ’/šŚP22ăÚÌŚ`sÜB-ńha±„#ĘΛq];ù?'^}]łniçúŠ©û€XȘ.ŁÌ{âhÆ3łœŽ œScy‰%DmÏ€ûÜzŰ˜’yC†O[nÎáæÁŽÇ1Ȍô«Eőł#ńl>čwÚàdFê•B ÓuûßÍC9xŽČÄ!ĐT+éîÉ e4~Ń;?STJ”@{žőLS€žu_śN+śÚ8™‘-«têÍC9űvłÁ1Ȍâ\¶ŸŠ\ű5Mçe6&LûĆϱŸb‰ˆü”R]O§H}ę<^VlA *TOÖęđ¶ôE„šJáDP{tń0Wś9w3ÆNĐÙ·DY‚±X{ŒI.LÔÙï~€È*ƒ%ÊûçÁ–”-Èș!ő,|tŸO/NĂÌHûeó^m+Ujś)Ő]ÇĂB]WF±¶ƒŁŒ4Y >–Úáç€Jê’)dlŸęc'hÄőÜ« ó}…KYá\Ê ŻŽìšą:łkâ%ĄÎÌ"ôś7ĄK+.^,âŸtE›53§OkƍsdȚ<íÎje%&ó.§Žƒƒ*ÄǗVŰŻr‘ƒƒ‘&9Œ*äç+‘JE˜›‹)žç`éRu‚ûéÓ|öYGæsútMš˜qæLĂ*ŚWFö·k++ ééÚI±ööêK—§Ęž‡œ†eçecso/›J99ć‰ûwSÖŠü|„FXÙÛëîknź-2Êfu~ùe2?ęTù”&Y ÜQ gòčôGùțkc5fđș@‘eëmBÿ•țöQ‡ŻJòÄę›G™|ìïæȘ’tŸ€;]ŠăGÔïkG‡Üéđ;i„lMĖÊg^=ˆÂ49ŠRmăˆDĐ}n=ÚŸă†‰”•R.pûXź!•żŒä'U~)ŠïŻ@lŒLP)!ä•Êó,óSJ5čGe+ —-áÉix”łbχ1Ü< 3üș«=ZnĄ–œ„žl"5cî`DÜÉÊąÌkw·71/±òó±ó3ć҆tràßXŐîÒźÓS1 ż2Ź=‰=QùÌÚČc-]„Űú˜ AA%‚ńnqV–ĂædŠ•ëUFaș©ùCä4Ö ĆéœH=JçÎŽwîĉԣśÜw„ßh@í)© Êgɉ­žM@śM óǞt™îÉőĘÙüûu"qÿæ!ËQ ©gىÄș}ś!Ÿ!ä'•àdÆązgP<@8'_,$;И€^¶dÇ#‘Šˆ>CjD!yI%űś°EQŹB$*–))ʒcé,­ŽÌČp§ŽwëMčČ9ƒĂźŃc^=șLś€ÓTŸˆżo»ó’Ő㓕›±Ö$ g)ò"%Ćy òK°žG;­Ëڙ!'ăș „\…”‡nšöîó, ?_’ÈĄ9”»ˆ>,‹\HçÎ,jù-=ö¶ŁPź›ȚĐŰ6˜‰A“È.Éâ[żj¶+ïoŸ˜ĂÉûùțÚrœëș–«NęèâÒ]33±ŒÆ¶Mq2uf[ìŠ*•u6ăQ9ôó@©Č”1żéĘÆń UÓKÿՉY„‰ˆQŁ)(PČm[ćBçöíÈĆˢçžÓŽÓO™âбqčéúś·„eKsMâ{EŠOŚNΝ:Ő q„ûȚ‹őë3Q©àă]‘HÊë<ێs’’J17cl,B*ĄŹ Tml$L™ąNŸ7­Êž3MÛÎîȚšxăÆ,ŠŠ”Ì™ăźć5ȶ–0}ș+2™’?ÿŒśrŐaûörsŒśž3ćí 6cà@[ ”ÈdJÖźÍÀÚZąÒőșcÚòïżÁŽsg6͛›ó ćÉÈŠŠb>ùD{2Btt1ǎć3dˆ;kOčțßÿșž&ÿ¶š”^€\ŠnŻwkM+Ă»“vX=ăšL=9 §-wcçgʈm h7IwÒÂ깍5Ôv'ìä‡kßÒ۶)Gúœ„œs'€bőőȒZóȘÿXöő:Ž‘ŰˆśNM UVŸÖ\j‘zB›FˆȘùUĄbiėűXú± ĆRMR±”ÿ”űšçœ^x(áV€È’Yóg:8wæęFÓ4çf&1cyëèëٟBEÍ,““-±éëٟ‘wŒ„vÆö,iő%ÊV^[vŸŽYs-MìšńȘÿ8ö$îșgè±&©ÎŒÁšHrŻł{ś¶ÆĂCÊÖ­Ùś č­^­vONœšJhȚܜ“'0{¶;?țèÍæÍ~ìߟËôéÚńa• FràŸ™9ӍmÛü™1ÍƋSȘ%LNŸ.`ÙČTúś·ćűń fÏvgûö~ùƇ[·Š™5+‘ôt9ûöćâïož=ŒóŽ3 zrútC”J(.Vak[.’Ê̙ăÎáĂő™0Á‰óç YČ€ú yÖæ2 ÿ~HÂé|œšŃćužKɝĆ\ĘC-•_OŸÎÖtœâT/ËÊ͘ƃh7É ńțad*Æ»ŁúZY~ÏĂR’§@$–ćŚÄJÂKżV»ĘâÄÒ$ä2%ęŸńĂȚż\HôČć™9őđíj­ć™‹Úž‰‰•„cčy°< zfvF4xȚ^ăœ*ăè‚€æb|ïq…É%?öÄ-Ăł?€P\ÍlćĆJ¶ŽœŰHċk”źńĘDnË$ó†ŒöïčiĘHÍ^qÂč‘9ePZ€^M"1p•?&^ąÚŸăFœV„ÿ’Ș žY•‚”§1=æŐÓäsÚû›Òm–v[AZ)çV§P݃]Š{jö•š‰žÊŸęí)-2Œ“ÿđÌÛ|~qȚ–ŸüÓă‰/ć90žű!9,oó#EŠ"†~Ž-±”Ž»”­^ÚæśÎÛž=žúĄòŻ#ŸdGÜÆŸÉ„1ìì~˜A ó}…ƒI{ùòÒÜ9ż‡aÖù)œH=Êìù\èÍß=ˆœIG—źüœ†uŃ?ŐX]Ÿœû€ó™gű¶íț{î ;»äBÿhZ:¶aô±Ąś ĘȚÍ·~Eź’ănîÁo7kźśC§Đ;‹08ی°°<~űáț w˖,öîuÀÄD€%N^|1šW_u`ÌâăKùôÓDŸę6M+, Pšhß>Šùó=xóMőƒzâÄXV­ÒΛ9v,ŸëŚËôkڊ ËC&+/ïœśâ8sŠ€qă™8щìl9«V„3gNąÆőòË·˜7ϝ^œŹ™5ˍš(˗§òí·©|ę”țț&‰ËUìߟËìىôëg‹­­''#’’J Ë#-­tšæIZd!î-,12s`f,9q5#źŽ-JÄ»“5ŻímDL˜z}'Żv–ÄË#&,ŻvV˜XIŽfL>,Y7elÍó+üxçr‰g °p–âhŠ,[Îúźj-–‹,G©„èćžçČÿ‹Äh~ϱŒš™_œHûÜùàV() ±ő6Á>À”‹ëÓÙ5©j Ów{"ÿŸMąí;nt™îyÏœąDĆæQŚŸčÏ4#áL>6žÆŰÔ3!ćr!;ßVŚëP‡æÄŃe†'“o” )ŒkcƒÔžĐ­Ż—ż°œú.çÆætüȃF/:_‚{K nìÉŠ‘§ƒVę{§ĘÆ!ЌóêŃrœ Ù·‹ńhm‰ÔLÌùŸS9ûĂCŒ°Ô_^žËÚ«xÙï5Ú4ÁŃԉ}‰s"í([cÿÔÌ8ŹHXò†…ő§“K7ä*9ŠSN€aÁ„9$é&bÿïÒgš…(V3òè‹ôt–ŽÎ]ń· à˜_9”Ž]ńÛŽòšŸŽű’œÒû/([†\)gÁ„9\čk&c±BVéö|y> .Íá\ÆiͶôâ4úîï Ț/ŃÊĄ-^ȚŹœ±Šń[8–rXłŸB„`Á„9: ž–(Š+Ę^ P/KžyVł-±0î{Ú2Ôw$Ąö­°3±gîĆNȚŻ”â»\YʂKsˆÊ‰žçč§È’čyŽz>ìMűûÁÆȘî"Ź-ÿŁšČüŠȘ2úgFՒže'r~k"á[«6öa™=۝O?u#$$‚ *ŸńSÆÎôîmTzźVÛ$`ž<ŚÌ’æ*Oš^m­ìcKԎ,ÏȚ{ćëàáŽ8™‘xź€ší™ˆD4ćŒO'k$&"Ò"Ő«gg\—Ńæ-W€æŽ-T'—¶Ï E©ŠÿŸU‡;‚úÙáŃҒc 5Sö-$Ž|ĘŚf[IHœRHôțn}đoȅŽvÆÂIÊŃ/ËWŠo5Ác 1Çë>„<[[òȘ3VîÆdÇȈ Ë%r[&Ț­ńïaCűș42oÈđífƒokț[‘ŹIđïi‹w+íőŸ”Ăł%Ǘ$jyl}LæˆssP©ó­ÎźNĄ(S79=äU'ìęL9”2™ü ły;~èŽÔ\BŰçń•&ž{””ąțsvêنQEÜ:œCLXźÖŸM‡:âÔЌĂó┄…ł”6oșrûxŃûʅ±„„žŁ”«8¶0AgÂ@E,œ€ŽëŒssT ˆ=‘Ëč5©:Çž·°€A;œš“qœˆ˜°\nÊѝŒ †zŹ êg‡„‹z±ÓËÓé4ƃ›‡r4âÔłÆCńjg…­· 9qĆDmËÔòV•ôf)ʟòb”xzp2u&r`<Ë#1çÂ'€ÎÁȘ,ŒŃ …W‘ ߍ`ۃw+G/5jmőVá[č°MX†ƒ>K@@ œŽf)ü.,JđČđF"’0łÙ<^Ź7”àí~UZ@¶&xQ©ŸÀú~dőV™E( PÛ?n, P»,oóĘ\{0óüGL\ÁDö ŚöԄÿ·wś.R]aÇ3Ć(h „|ÁŽ6aM‚€Č±JeaaLákąÂ*ą•[XŹÒ€0,žšA1±[± ¶«ž*ˆl”šs-tљëźsæ9çÎsæ|?íî=ś9Ï=śÌ3çŸLcV­# |˜ÍÎ.èìÙy=~üéû@.\xúŃ’ńeK8óïiĘzrCŚ^ÓĆčfîœZÔÿąŃÔĂŽ±öÿkçßôôSMOvÿÀÔTę-Û( Ÿ Öćû3ș|f$û.çEŁ|š€†t«fżH'-°–»ŸI}w”0¶úïÁJ-é%ÂćțÌ ŒaHÀűêÊvć-O‹”@œJđh˜_’±HR` ôè#g œaHÀűö'o†•äá ńóao“@$œLp(«‹§@ČœDúFTê+Д*§Ź+ÁИYÁ‚7ŒI N%xTÌ%ÂM?|©őÛŚ~òÿRÿVPŽ‚vŠ ËćcĆëJwÖ„i|LĐĆ`-’RóȘóRß<»9Đÿf›>'; # íîgyœhtۃÛîŽŐéŽ-»w‹ ŚfTéëJZűŒ3ÜÆŽŽčŁP\Hš’=lWœÚ5O˜ămF•ŸJœÉœȘ]m‹&ő„;RŸ9ŠÏÓ|Kțz%ËG+eăaČÌ_BÌń6Ìńu­VűKà­+X,Û/%ۃëdÂÍ6 1áÚ0Šê(ȘmČ, ÌńRŠùKš9>žȚ±ź`ÍY¶_Čʍ&Örtâ9 #H¶àNŽ{¶ùKˆąÚ†1UGQm“yQ\ïXW°îJz!i„„Š$;žL¶Rö'GtŐ6Ù~€;9îÙæ/!ŠjÆTĘóüíàm+ăˆÙqJJÚejd1˜Œ‚“À„áJÊąș…ts`ÜÜl“múœî$ Wzˆćč€/föëyÈæŠ,IȘ*S€+óêv䜄„oL6䯎•jVȘ{1ÇÛd;Gőś?.+ź€+X’ôĘÉx«X±ńˆ¶M] Æ*†M¶ésž“0\a„ÚŠnŹoŽŸ—ŽùÒA͇¶c^Á’€n„Ÿ$}+iMè¶cRʎß8{q†M¶çdBŹbŰ0ŠlÈ_]ƒ+Őûț:^\I‘V°$iÛ í‘t.Jcα‚a“múî(X©¶) ‹Á˜çmČM_oàż_9ŹĘC7«À’€­ÇuRÒ9È-źM] Âdk“múî(˜ăm èb°ŸyțȘ€ŻѓĄÛ‹Y`IÒÄ€Ÿ—ô›€Ż—ĘqÔœ6ÈIàNÂp… ŚŠ€.Ąš¶É6}ŽwŠ ÍńÿI:&iêÚ/¶«§Ń ,Iš˜Ô*I'$ę,ÆȚÉv 8 ÜIźPTÛĐĆ Ő6ÙŠï}àKÚûÏŻș„ÙÖą‰ImĐÛ§ wJÚ(é+I«“í€+c0᎔“0\Ąš¶) ‹ƒú_҃VKsz[Xż~Tł1wŽÀ(Q{ÔŒ ,€È(°"ŁÀˆŒ 2 ,€È(°"ŁÀˆŒ 2 ,€È(°"{ƒqđ0ÎIENDźB`‚passenger-4.0.37/doc/images/direct_spawning.svg000644 000765 000024 00000022546 12233035540 022140 0ustar00honglistaff000000 000000 image/svg+xml Application code Rails framework code Other memory Worker process 1 Application code Rails framework code Other memory Worker process 2 passenger-4.0.37/doc/images/glyphicons-halflings-white.png000644 000765 000024 00000021111 12233035540 024172 0ustar00honglistaff000000 000000 ‰PNG  IHDR՟˜Ół{ÙPLTEÿÿÿùùùÿÿÿÿÿÿęęęmmmÿÿÿÿÿÿÿÿÿÿÿÿđđđțțțöööüüüÿÿÿÿÿÿÚÚÚÂÂÂôôôÿÿÿÿÿÿôôôśśśÿÿÿłłłęęęâââ°°°ÿÿÿÿÿÿûûûçççțțțÿÿÿíííÏÏÏęęęöööíííûûûçççúúúááᒒ’țțțțțțÁÁÁ˜˜˜tttáááĐĐĐóóó»»»ĄĄĄ€€€ęęęÔÔÔbbbÿÿÿŐŐŐűűűÜÜÜúúúûûûéééûûûęęęęęęŃŃŃòòòüüüűűűëëëüüü¶¶¶ÆÆÆćććîîîőőőęęęeeegggđđđ¶¶¶àààśśśúúúéééćććúúúűűűËËËÿÿÿ„„„ńńńxxxśśśĘĘĘùùùÈÈÈÒÒÒìììúúúȚȚȚâââæææóóó›››ššš„„„ÜÜÜîîîÿÿÿńńńÉÉÉđđđÿÿÿÿÿÿȚȚȚÆÆÆŒŒŒëëëÖÖÖĐĐĐâââùùùôôôâââìììőőőŽŽŽÿÿÿęęęûûûüüüúúúæææäääüüüśśś°°°™™™ęęęìììüüüÁÁÁéééÿÿÿÚÚÚđđđđđđőőőńńńțțțűűűțțțŽŽŽâââûûûùùùÜÜÜÿÿÿòòòúúúŸŸŸíííśśśöööèèèóóóúúúőőőőőőŠŠŠËËËúúúűűűÓÓÓëëëúúúëëëȘȘȘóóóíííąąąÏÏÏÚÚÚÖÖÖąąąëëëâââùùùUUUÍÍÍÿÿÿÖÖÖăăăáááêêêüüüÿÿÿöööûûûóóóôôôÌÌÌÿÿÿÿÿÿùùùőőőÿÿÿòòòęęęÙÙÙüüüûûûüüüéééżżżûûûêêêéééțțțÿÿÿűrOæòtRNSÔÏń#ïŸ_ /©đÆâżoS·ß?†ĆCá kDŻÂÀOS_ „šČŒÓ6Đà>4!~a §@1Ń_'oÄnąÒ‹‘€M†Ą“3±BQj™¶p&%!l”Ă"Xqr;€— A[‚<`‰am}4…3/0IˆšPCM!6(*gK&YQŠGDP,ć`’{VP€-êxÁ)hĘ7‡e1]ôˆßWżł$—‡1ƒbÄzSܕcOÙÍ]ÀŠ–U;Zié»'yÜ"€âĐĐ‘Ęۆ‰K 64ÖYœ*.vè@ČžîŽc.};‡ïŸtN%šDIȘ˜ÊĐ !Z¶Đ5LńHŁ2Ú6 ŒƒÉŻŽÖ"Š Ô-b±E,,)ÊÀ BŒ·Š>mčȘĂăúnűö6pmŸRöO wm@°ĘÌVĘ#?É'C…È‘Z#©Žqž‡ìÀbÒÓ|$œ:Ü)‰Â/EŸ%śânRčq—Càhn”É%őiÓ̓­ș¶¶ß}lƒm ?iÿdâdĂ"€,Ű­Ç`ŹHń"r.zĄŒ‹ŽÁ~ęìü(bđQÜU&ꜗ)–5őêX#•§ òé™EMȘæÜR<Í*p[€[%.©OÉÌŁ˜„k7“lIo°ęšę“¶ßJ°F  „lV!ÌĄÄƒuH‚`ÆŒ™€—›ç‚&ą,ÇzŽÉRk$€òš|$ölŠ»ŒXbüąâéÇjßȘÈdU±û?ÎŁ$H”îž©W±Ÿ$Uû'…ÆĆHÜE3*Ő­ș€””U\}ê­ę†(Ò €zhVk}gÇu«Rk$€ò%š|‰Tš|ÚêckŠ獳"ăžä±Dç”ę«ƒ_W+‹ź”Ê.QòÒĆ)Ő@«ę“Æœ€HąÀ›Íb”sžÔlžŽTŽ©·Dÿô­RÄ2XmŁ#a Ęêș3lYĂÎzÌj莝Ô㒚#!Ț 4țJŽÄ8Ń(Œòc”v™‰Ÿt]­a·˜T™Çàű ÒśD ΅àŒáQ?^-‹Ő_^$:\ÿìȚV  $«•N|ì=(vˆZ'q6čZ𦆇ŚüB5VìÌî!y†ŽŒ3äßKœÿ㱿bàv4ŒńxđëêŁâR]al—í!ÔțIÛo‡P‰@Ćt„äVy”șîàLïÿÙȘml”ÚżIšUb|[*°¶lke'*ŸWdîÀĘdàłđïD·Ó}\W›ƒ_WߝŽù¶€rĐNÚ?™űÛvȚ«ÁÛČX%§Ž0u‡öoui*„üJV·€ÆŠ‡b%†}ôăˆi5I„YlNŸE-wĐςûf_W3mțIćà…Ä꓅—-ŒmƒÊŹČQ)“S ”ÖkŽ«TC7êím€<"Äô܌‡b‹T|ìÆ'ŠŐ$”ҘŸŁóóÖR&>„êO pœőșšŸù…ê6ĘŹÒöçúœt±šî„S­ŽN\©ŚŻLŒîmŐű\ÈÎŃÊÄr@Š3žuT b7úÓt.5.q©ôÈ3Čr0ü=™8TÂżȘi­J©\ëÈ6uF ”ČRž32^śíń'ĆȘŠóÀí±xˆâI« ïÒF„8O{%8­žkJšÓMSÈŽdâBEdæŃè ïW‚CYĂśO:/OŒN/—I‹ê_=œ€xFE”Ń! Í=„æi:oÁ~’Ą· yț?¶š'·š'·š[͓[͓[͓[͓[Í­–è».čU>±$śP–ÆŠŠc%†] Û\c©Ž:é| ę,eŻSœZ,‘ošżXríäÎËXș!ëRæ”ÇÆò@áZűv‚ ‡0Ôç>?Á*çź Ô<đțŐ|ű«ŒN6ț0úč;{Żaždłê2Ôév+Däó^tààúŃ[q!ò۞V}Èűf«œÛšÏŽÎŚYÿêeà„—€Ë)Vyl|" fśUÇČqˆ@ëˆÇŒ˜4Y-˜łYęÍ-!¶6a“žŠB:o%ńJ€ÛI±Ž—UQ|ŁUÆKšO `ąź=\ ꎭò:ë0Ÿ°Àx …±Paó‰Ìuˆ@œ»!ç»K†âPÏdŐxhw1>Ś$j΍ł“vöZdàè™xń«ŐSšUAĆ&[URßd•ę7đĂžÂz·kę«/˜œđrąU^ŹŽä Łó—w:I.àVÇźëôÿc>qí.!·zSÛr&«łŐ2…)Wgù Ÿ…R -ÎiăQ 8żçŰûPa\ОŚU%•iĘĄŠțUï_=àĂpÊű ›Lu ê(îžNč?†Ÿ 0?Ă†:]œÎŹä†ÔÏtŹB%“U|™úùČĄNsorNÿčf¶ú ű,»P !­v" YŹ6ŒhLï_­@@…bé·sŻc¶ŹŁqg˜v4|Â|0lϟĐëÔ$SŒő9ŽîòbʱšŃj#ŽŸŁ~žƒÁÒÏ?oČś}‘‘ƒđ}7sAPm:IVč=n•śŻ !ôțŐ{±›{ÍĘhŒÎEàąȘŁ8€sèu€ÍoLźëÈTđ$ń„ő;VĘúč­sőöcqìDŠ3đűžń üÛàŒ‚3.D«Bˆ«éꫳB4Ì&ìV'ŰÜ TĆ `őàœDï6ÿ™žšÏ·óqęyùjû8V‰Őæ*ëÖíX%ęł›@s«\ȚjrN”$à|ö=5țΆ 'ìmU«ię«Kęi€%C™ÉIđ:ssaƅ`*`ó”=úlœś)>Èu՘MeuSš›·šIò_ÎOśˆLüŁ_©}o&©íÀjzÿêĘpèșț{š€ÖáÜlu:OńÁꫯÌ)«s€%Q@ăÍ$Ț<]f› € xO%…śPCbhr2ŁŐôțŐŒŸèęPK·Êëpžf5œNĂ«3^o«ù©úŒ]êeČJÊêÁ€iĐB˜œ464†€^tuÙČțU֌:G4'żò22YêpÎëˆÌuŠG'/PyÙ4?Ąțè.ŐæSB„P_>‘ŃëšI 1t3ΓśBäÉ­æÉ­æÉ­æÉ­æVóäVóäVóäVóäVs«æĂ]îł!Ś67(ȘÇg Ż€„‹Šyƒ°@†” 4>QÚò ßŐV«F­}^XڇìÚŒˆ’Őj”Šeś26 LžłĐ%žòYŽGâh ûłšl‰C­}­)Óâ< ˆ!ÚE ôđÇEœPçZWZ™œŒV+ț@†ÏR 5{@ou—ɐ†4ȂČ&…„˜ŽH…ŃŹ6śe”y V‹ˆĘ€˜VĆ„ÖÁŹŸácqZ„Ț’©rìÓJÆçyBêæyžÓˆFzŃőFNą$ąHbÈÈŐł*+jՏqòэÎÀ Ú«˜kĘżUàX„Żlșe·ìÄöŸÄ1“ŐÊÚdà0d^ő-‘B%‰ƒ}ê œűž{YőĄ™%rÇ*Òj5Ak5Šu«ł"Ì,·:~éÒžáYŸÜ~ h™śûÄSA~ż­6ì ŒfuÁlՇf”Š{È”QtATHĐZˆkÀȘŠÆ­/_°žŐSŸîŒnáûč ±u']bù]|m`«B…ńāÁÏÀĄJ,O$íÁdu]·Zsź ÀFLß:©Äùúú›aőű‹À‹Ç™ŐÂÌT4Ïoà~by?wpÇj滄ÖAœ…Ű(€xù]„†Šú…ȘfŐí¶~anÖ§/ž©žż^ÈdŐÚČöcŰÚú˜Ő‡,!ÄĐ1©űi&–xi_VK@ip«Íƒ9ŻĐȚVi%a; ŐŻL?‰0J“*蒚ĆȘ5ܶžUŃ·Š“'ÁŹșx^îČ6âV[„^ à{öeU™ÈÒ|—:0ű=0‡»ÈdÛ«o‡šç*J“q%•[­ÆőYĂNž˜.sQ„L‹udš[2Śđ9țIęó:WÁn—ÔÈÿĐÙŽÊm™Xl„ڃŸ6Ś!lNl‡ÙVÙŐ§KUŒ€€jVă\J%©UߊßB°ŽLcKfábŚö>a“=Òb›~čR]aG%[úśŚjs@«/9đM۷ʘUŚ>yÉČXÇ@}ł ” ëëFąŽtÜg^‚ÛvO\°žÓžwv‚p•ÏŻz3›K5i€!$P>”āĆ€č'Ò”VÆ›Ź”ąLž2rŽú@€UMĂÉKĂúZŻő‰čć6ÖŚÀtwŒë§ŸÂŠbä„mß1âh|ô|É]}~č0űÀMjAąÀŽÒ(JâŠĘÁ­JP68ÌC&yrÈÌŚ‰e}­jŽ_cËJœ?êI0ŹŻkêÛ>š«W™‹áű Æû‹™Żé|ĄBŸȚá."TEXd  Ô8”Ä!cw”*E(ÎJ)ÊćÉ!Î[W"­j_ÔĂáĐąeX_ŚĐXB;€śŻo°†O0~?Ź:PœCă (.Čí¶±[·Ž‘‘ò!WqŁ%ßÔ*leĂÀY)E™<^ˆKćZčT•60Ö.đő#«”űA\ę€Á5;RmÆtkdÂ/8§)5~‚ż Ź^0Ú #ćCkg–жeÍÌy)Č—±Í¶ż‘ÔșÒ°6Ä„Ș<€(?ÆŚ&ÉőőuîA„áVŸ’őm0^h.—tÌxR*ôŚaô©'ö:,„H§|èƍ–ȘÏ l5z„;8+eŠ#b'#|û}2Æw(|Kc–Jœ Èl6 뀶Ÿźwù‹^‚ՏŒoŚ—iúœ3HÓ êR –ŽÌ”9Š,Y“gP«Ö°:N œ[5SĂöû‰R‡!ą§ä[)•ç]€úœi}`úúșmŹ’žN±4Đ„čČăvŃ`|;fŹ(źŽFïlt©„ąLÔ8”ÄĂ·Z#œAï–€O%ŐÀY)NčUź5YêŃeœŒd–JÎE3dZ۰’țÇ<Èx·ÇńŰɝńä¶e •@ùPÚ§ÏțÎFúTR œ•2SĄÂ·ßüΊ/uˆZ°~đšCæ3ÇÔXÊzŒÍÓUšžâxő\2s«ńä¶e •DùD.çÉćfBO&enĘ'iÈćR%™?FyžVsS~$uˆźmœw()ÁŽr”șoł0*Dí˜Ői!3œ:On[B”!sʇBäp>ĘŁHTÙ1òè ;ö8MŚjnʏ€‘Ó€ïŒäqpȚ 1hò^ˆ<čŐ<čŐ<čŐÜjžÜjžÜjžÜjžÜjnŐÜßû–qŐ(qpőOkȘ’Ô}žßűI?TY8H«źmhyKž̝u5ÍÏÂÎIœtśeŐnQBȚ—`”RÄÂ`Ż·EÀPË ­ÚŠö˜œčxû™«žœ>č>€â‘ĄytŸ{?|œŚ'j)”ÉÆ€”}YUÛÏäUùÛÜ{ç@Vć‡/€J1ìF+€Źż7䀉[OW«O[æù ű葉yłÇUY«Ș•ˆő!?BôÈD%D™WjŒ>-Ai6xŁz)»ŐÎU RœùȘ±’7 dőÙŠ@”g‡ˆëï•\†soŰ)œaÏ4ßzfŒ[«W+•±>čž« œÿPô>ä |•ÛqLăŃG8vâžâêÈŁ„˜lŽj©”2ZíÆtÜß+ćŒV„ÔAŹ6g<„/ŽæQ ‚H­çSrÎŁ“ŃçÖd}ŰùYqàÔg]€sY]ç;]FëCȘ@5ŒYÓՖ5ÎC©3ć8oÙ)kš1'ûüd6«>T *Ëʆ’§Uz(„m)ûâźCD `‡ÖHe/Ÿ.ń:ç—zN„È9pgo &NCŠŚƒŒȚ‡Œ>¶WÓűŐ°_’ńHj ń)€Xe6F„ 7p’mŸ-è`'Öc†»Ü.Ő«‹ÂAZ=łț^Ée8śÂFŚ;<ËûÄJ1{óăŠ+8'€ÉȘ'„Ö‡\A”*żÒű[Č ‹ńR$UăY)Vč óAyɃŒw)ŽEc#<ŐT‡ƒ”»\vW<U1ïIۘCDo‹ÆYoÈ·]ßwmÎawŠæ:Bč :'§Z+Čvé}ÈÁ|Ą0Ńëq†«Ă1ŽPȘ΃á*€€u•T«Í7 óF3ޱ9œÒëA}$Ęćf»+îoÈüç[ĆèœI±5öśÊ°țȚœx(&Í”Ęńi”»ÊŒYȚń:cżPp*Ž»bœœÂžJˆČ‘j•V7lŹjtsNkМv—Ë[șfy3ÀŒg]êśś‚őśŸuœœÂàéȱčÈægçJűŒE†0)ViƂ”ąĂčèÁƒ”»\vW<°Ugűt§eï~Bï[ÂŐÀàAÖ†‰‡ÙH”J—È'ć.—Ęn•œ& 1Ԕœû ęœo%gͱ_Ÿ‰Næ Š›”5ê.WŚìő3y/Džïd«yr«čŐ<čŐ<čŐ<čŐ<čŐ<čŐÜjžÜȘ{•Ÿ­“śwawˆ:6șdJ§;&Őțí3‹p tlŒŒ±asőŐŸČäŐW_UßȚÄT€_'9{?đa«†…ÔŹĂÄì•l/0«śádHgqll±cæÿúÏ8ÄR‚yù耔žm=Ëąš_ŒÍșć–[Ô·71Żx"Ü"ÛÆSÖIfV“ûrńüŒx3Ï3y•)h ÔđÇhÌŐ »ˆ0‹ź‘?ŃrÙó©5—xšû°Šț_ü -ÚÆùÈjŐőĘäÆśő ő‹ŹŃ‡oO:çë$›­–XBXJŹêŃŁ1ŒˆăĂ#ֈu7œ`ózu2àü{ï“\;äëuܗ±9@š0ÛĆV$2X››SßűâËæ&úŠÓBaÌę[ïOÚ~‘ŃjŽN2ß ÈȘ/­Žšüjz_ź€ÛnA±ŹȚÙé§żèˆ~À ÚuűÚh@GLüOęeÉ” ÏÇ?TˆĆàf•{R­ź«ÉëÉęștÛn(–ÏzÏ!SŚ7o Śï€ŚIeźŽî™wő3]ÔçbܗüäÇ8č5|Æi·Ï æêRÛÚJkʱZ‘RO+ê8ŁU&”:]•Z‰ieR‰’Źą‰(üóJËMŠȚ—7—ł«ÒZ@ŒČ5Ęa^äș\G˜z™ŻsȘŸéρU‚Ò*„rMÏełzTŹ^Ê:ÉŹ‚őÍŠX=>Ü$ bi>łU&XŹQoybbčGÄűkűÍ8Ż – ĆҘóęÿn).Ս€òœÙđoă „À^MmádłZƒÊóië$s«Șo–oȚê*{»4ììŃeLb€LÙł""mx: `:mÉkž[ŰgeTˆŃ‡ȚŹ)Á„'0*T˜›Bá€{!úîIȚ ‘'·š'·š'·š'·š[͓[͓[͓[͓[]˜ZˆƒÜj QŠ.e '/žźyśvQ€71ű(Z&†óÒX‘ő?(_œšZ”œÇș”){tÄڀm˜ZíÿÀWŃϏ)­«-C“ŠÓò޶ jqání,̋Ÿ"áIv‹ŠœULŰ!hą™Ùê›żîń©ŻĘsçk’óAcrN‚ôțäœšŃ„€…VE4ö0úy˜XÜÒ~ć4zÊžVăł°%·ń,éčßû)fűĂÀqtĂp˜uŠ~ă  Țű©ŽŃ*ę“©^æÖ0:ćęÏéÜČö3ÿ3…ĂÏJÎâOô(Š·öŁ›ZB?K™^ Àv]’un ŸlçúÿôWțÀ‚¶i0Žp6­ˆ[ì°©àC_5Xę#ú[żöwX3ábńÎ滫ÄRœ{ùÎâąNKđAîÏÿŒée S«èÓeȘ|ĘăčwńąÇxâșÊȚsôńo>ÖP\愔ԕ6Ò;nVÛmŻfëI$àű‰ÇûV͓J-ÛJ%֌ŒŽ0ŻóUwûYЎÉSőóóŚn‘uÿÒmÿè—źÆù«xz”Ò˗VŸÆ«ÚI”vnôWÿÚ_ÿqLZŰÇòé"_—Xźz‡ĂśÆ 8Ç]Ap—‰ƒˆÍ?†¶CÍ‹Ž‘ž5È4ˆ·3ńŽzw(Ü{7eČ*ÈČ`Û°Ź!AÔQ“:ńKUnő•żÂÿzë]ú1y†V„ű›Ga°úCÿêm0îPY ٚUx6TT&·hVï9V§ țîßÓŹžzÑ  1[śXźz‡ZœËŐî„Đ9Șeąr›qóJžłžNDß/ùŹčg·țXŠë*9o—đíN6«DĂĂ` Ë{àśȘIï%ËMŽz9—ăTûQŽŸà–ˆțț7fö\"jțĂ_3ÙțÖç~xBá'€ŸùÜ·ˆˆY›]*KЌă%"úÔç5«"đÈqxq~ü’Æ•=·‘šjŒŽșSá>j€Vç·&~]2 xzÀFžŐíŸ1X•§_yȚùDÀÎ<#N’ŐîïRBśÔ}KôÏÿĆ/ói‰Šy†ùżőË !V^ąńËżeČJŸ‰‡}/FkïńAßú7Ÿû· âëS©ÈŚ+.–(ec—ˆJ:˜zđƒȘóW“ZšŠ°ëȘ–wïÒÙQ™țáđĆž~aÛÒê„Ű̈́öpç6,e5íŻ,Ź+ą–”Á,ęûÿđ­óńśÿt±vő%O^OűüO}㦟 -Oüú7>eČÚkCŠ6Łwaô_țëC ą‹|œâ›9‘‘Ś*•šÎ‡ŰWÆńžAȘ)ŚU¶Jgê8<ęZ€Žšx^?„ÿŸ2Ču¶­Yęíłőè*^?ûÛڇKC­Z€[‚ÿ©ÿù0.’–àC”Ż@mŸçÓçß$-ßÄ/~ž|Y„ć[ețwƒeQęŸÙڶ&cëÊOž4s|‰œc’§JćûŸwsïûXÍ8/ńšŒÎ6Ï/ ÚŒ;ç'FŻLN^8]ہeadëZ 1'źÜ°žś^†Úü™ûŒ‡Lł‘sBdü%Ó+Mą·`ĘăSKö8Ś€Čś«ìș*ƒȘ)gl#Ž3"Ä’gъ˜S Ç㋎©qtcxxƒš|H>–ŹÆű=đŒ:łĆçęÎmÊjŐćŹßÿìŐUßòÁóvŁqìys©Ü’žLglțC6+[FÍSWg…ö“9ő˜ƒwV3Œ1”A ë N”ßDŸ<Íû«ËÂ$5eÿ(s„úĄ ÿ[Đ Ûšbú—ł‡žaF.”š]±KĄîÇIENDźB`‚passenger-4.0.37/doc/images/glyphicons-halflings.png000644 000765 000024 00000033002 12233035540 023056 0ustar00honglistaff000000 000000 ‰PNG  IHDR՟‹ÂtEXtSoftwareAdobe ImageReadyqÉe<śiTXtXML:com.adobe.xmp glyphicons_small_dark 5kÒ1ĄIDATxÚí}ol\E¶§WČŽ^ÉzŽD$|_w'țCwìțG;ă4¶ÁäÏ<ă1ËÆÉœu˜ÄłŒ6C‚È"À ÆÒæEÊŒ0 "=ń€ś,á· ïûÀ’f3oÒ 0 `àęôìžőŸì—ÚsnuőœĘŸ·êT§;1K«ÄmûwëÖ­{~U§ÎuęȘȘʘ1cKÎŹ:kÎbö1çü0“ûQá‘!8dM` \Ż5e]‹OYœKȘAŠ*…‡–9c·ă«Î8Ț ?'MÿŃś7kț1ôcü€]?Šb€ŠŃœà¶c}x$œ’/ôőÌ$YáŃ3sĄOqY›ą+Ű*bQ8CȚ AÖÆâ,ÿ™•V”ŹÙuXx ĐśXđù ĘMYRÇژ5€ń@4đ ïE얌°†śÔÙë àjt(üJÆźàŃM„ćü>Ă€Í(=BËJÀCšàț’¶71Q7ș% àWY}¶ù„dlíP"oś€ÓțŹș˜ŹHTV-/NPÎŹŹąVo öŽcqhOg6ŹpwœźĂȘkŒÚˆÔÇșÒ _“đ€ç)MÒú+ÀŸI :űHŸîŠzÌŹ/ɞ{Æ9űOdnÁVă|–»‘ƒ_©xÊŠŸHĂĆ0kžèÿŹt|ˆČ°”NșțŁ‹‡nêĐ3#Ś3ƒu+/Ua9ł%XàqŸNČözùșg†Š§;yÒî9ïyÈ9űOÔ%~–ă„áu©Êɗ*ú=±ȘȘÄçIŃp‘cáy}źöY(țŁëoÖ(•u±$«^ŹjŸŸ îź»ïe\ő‰iXíńœŹÙă;X-„r‡öŚăŹŃȊ&Ÿ>ș>„eŰȒìŹœšaŸsș»?șû?1aÛ€^‘›Œû=7țÈ65^ŸȘ8†R•6ȘÒš*úäâŻ4|QŻN$*>”skUqS”E Ó-î?–DČȘüGàùĄÆŻù ÏŐMž#Û  ŸÖ™„ʟ€U±ïòôÖÓ[û3HVUwŸd#ż)üç~@@VŒ š¶ƒ-s'A…Ç]—ćΛdnČ ąú3đ„7UžđuĆúS›‹CìžžïzŸ{vì(8l-ëÛ;Ț™•áč裔[;ȘV~ź é’)t>7QeSšÂ)—jșĆęÇčO„ÿhâc YîóąCb”ÙÄ7:ă©ì Xœ ïáï'Y «9ŸÂÏ ïY1y©=G ÿ6`­=G©„VŃÿ»B[\ŻŚyŹQÖ=«șùuoóÇÉăș·ę›‚Őc?U|ôgdD‚&ëžtĐÓŹCv߈z«ĆŠŹĄ&öÿAŽ·ÏIćg”)ÊšșÊuÈGUś8Gó*=W”bù6œyhDćùM$?ș.Ü&ĂrÿÁÁvQûÀóCïšíXԙvd“ÙrQőÔ]ÄßolćwŽŸïúcśŠ *-”˜œ˜‚–7ö3pÄyNV+ŒÔxU^òà4 YiYqD”Ò,48í…ó©Ćcäù”ȘțÏÜïà~T}żˆÿ›֙{·Óđî~2ȘŠ•dŁȘnžÒsŐŠS ;˜]ÉšDuF_1g•„ÂlâüGŚßzț”`…cœKç“ȘČZ>’ß·Óhö{>ćŽIoUR—Ε–N'0iž±2üq†źË†NÔ°cè‹ùA$+-œąćŻy6fŽłű?%«‹xïŸY­ïőźˆúÀûœȚÊÌUiàJÏU?ìÒm}gôsVYÆUŚtńŁÏ&ÙêłîŸŹ†qyôYńTńȘù uĂ,°óU«Ê. Uáê§Śæc,Žw'śŠŒ€aÀóțÇ‰Š„"MùW$«Ź)ČÒˆÊłż#iÖ5vłÀ:ű„}çDčóÒà6țăÆw}źȘßúëO Ź8sę©òù¶żŐśÌDđJ,#ž‰`Fž^gë°wŒ?ӑíšĘtțxąC~úTćWyfçá-Žê̶B‰Î?WÔȘó-Ś_5T•lŹöÔfúc%—Z}h ”î«ĂŁȘ-ȚûoMüÛŽt<-|sȚ«B›„ÊęDËć?<ŒĂ0ځ”Ë_Â9/uÿŻspƔ­M‘&—xÓ€=_Șžhî9ńă`e†šù8ŠŸkŠ»iâ±ü_^—˜é ó„gaYĘ«-(xźł ‹jłÙŁèŹźț1–Ț;Ń;_Wÿ˜Ò$t]=Ęúè⣿.^•"_Œ^j}PV€ ńsaF-ń+X”Ńž/meUŚê”Șq™œű;â˜đ>EęÏ4d,ŠsÚś»ÄdĐćȘÓɜô¶Xă|燠bŐNÁÊg(…ŹîÇGÁăȘÿț АČԉę”ÎjèS,}Ëۖ1{”ç§ć„Șn}tńž Ęœ.tŸź\}p5ŠüŸ‹ńȘv*ŹœÊ”„^”ș»4‰БžoR7ąFÆ+VÔ?ËúOoĆzœȚ:’ސtza‘xF‹p6ž&öîÆ[•R)ÒdndŽ…KûÜߕ@ŐÂĆÜjòź˜TáQg$*⏫ËÉâèŒČ›ł\ЃŻĘDAJR©êźˆO*ëăÂOX| n @;Ö3gț*NùűN}đ»–ŚȘ1υ·êÔxÇčÜÁš|ičĐcËšTMäŚńF»3X٠֐ùGX#Ü;U†ÙÖÁF;vàžŁö_Ɉ[mäđó‘áÁéÖŻäw‹Kä’Ì!l‰T]Źș "Ÿ›Șêeßšłzx‹šÚá-rŐ;öńÒíáœt’ʱŻ|Tuڇăćőx«7„ țœ*<ÖŸP€JڞTŚßœ>9š„T«IĘx{U©rő©p'śZU‰,ۜ[” śiNU>=Œ_•ˆ‚5€Ź~p:|M>7ä!9ńŹŃ•’ÎȚGU“Öw(sOßöZèw/< 늝–„”Ò>Tő’GQ‘ŐÁQRŽÎȘšžJg5t—ț@ꁜDgèšąù2–S#EŰ㟯‘Œ>;Ž|iϛżŽêűÿ™d?ú„û'?ú%ˆ`}šźOƒȘú$żxš9ćSMoTMxűO‚•ȘqöŰöâŸ=¶=NPÉ@ٙœăM0»…Q膂ŻȘzôĄÈ5ŠDü·¶1”ćő uжŻÙ“ YgéKUìe7”|€ÔI9žuV“yZËtV­˜<`°V„Ir‰ăB!.yS‹úX¶0'¶Ź>ăQ—]§.\€,Ăă:#›Ę?Ù,ÛčÆĘ>đÈ_SŐ“C#Ûßđ4”XCU„Ê5Șê&ĄŒš*SêMȉÆâŸM4ÒêSUuÏcűőžÇšÔ»o #«CŐûűĘÜ7àÛț}îŒ.ïödÛtźȘŚĐșxGgUŻű+Ù5t„žD}p»Ÿ‚Œ>NęƝÊń¶æ+֝+ŃöZ¶űȘ9ćwÏÂæ"ÍȘòû.xéÖöżŻ“@‘ëÜêȘ„PŐȘëÏŰzëę\FïŰvi’«ÚíÚv†ĄšV+€#*ŽŹțpa­Ś[V‡ȘkŽm:gĆ0”ÌܗĘyàäPUdúÊMU]U̟òžëÕzaTúZ>wXÁűŠF+”!čš«Iƒ\h­Ș>NęƝÊńùm„Æí»W”‘S>H­-S—ïʞïWŸÙKÓÚÿfŒȘŁÄÙrH-WËèˌ9ì7Šá1’æ0äëY=ü_CÁőźïÛ!śțB|ä뱟”ŒŸZKyY#Ú¶€ž8!S~ȘêéŹZC"üíùsò!đ­6<E© wA”î« ooŹ Â;ïôƒT}Ę)żšąC«Ż[˕š_x€ŽŻôšȘ3sI{QuDń–‚OìÄ<ŒÈ«ź"đ§6Ëuï‹ńS<‘h_xôŽ—5b|!ńŁȘžÎjۛąÌ»țˆßóę>dFP\— Bí__śUïíșČU¶>X#|śȘƒŻü\•nšŸŒ˜ȘűSĆy”žŁÆul^WŚśêӅȘíĘڐoŚŃčŐĐ%Ny Sòò”Éàș>uŻŚ%CäBĘæep•˜èŠÊ˜1cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3fŹÀ\”ÖÇ[i‚m ȘĐueő4hsç€óè+k)T»i”ł&È„æÎÈšîÔ»dÊČ„Žš±%gžRap:©„ìàYhĘÛȘł.ÆPz’*V©»rÍY‘gtH= _S©Qpăâm‡öŰß3"KXłú±ŁI¶éœ|é–5¶éŻłvGSŐ·J—Ò€,gɍĐíœ cKï”űÌ ĆőOąôdš?CW.Ä«ÉeöjIF«Ô§*JžDÜvé5± ‡’°ÜkÍuél‰MXA±ütIíŠ>€ÎW“L©AĐ %7Ł`)ˆ»ô‰őšÀ[(hê6lqëÓ»{ĘłXMé _\6ea'uy]1*Ét©§*ßk]S’S5"*ÀĆxYœš­ŒTm{ҍ– —r1L« tK)‡‰úĘÀ鞙ŁlÄ êŒbÖń*Uđ’üòr*pôŸ‚1ŻșžÌ4ÖÁ/#F}7~”l ^ĄŠRĄŐZ‡ȘȚȚìÏŸgEń†"9Ș"ùôT€‹ńrČV–ȘH4ôtŽœ—ő]ÎűÛ3ĂuG~Ł’ĂÄp­œđÀ¶żUunȘZ±Æ“  |–JUlU•ˆ[qËé,Ž&JškîXŁ Jh+'5Ò*F•BU”ô•ŐÄȚ”æZ.ÏcKóŰWáóNș °7^FÖÊRŐÖęŠ Xű†PퟜÜ;žÌË/ËìŽ}(uőKm#̅ùXĘȰÉU!­ÄăԂBžÊRUWĂB7@ő NomÌçțĆZ„”úäI>ĄÓ>\{[ö|‘cĂŻ"QqÀŒUgăYHŹ~xČVžȘń‚ț3Nxô=3:Vȕì@‡PV„żŚ6œcőÆŚ#șùEŠ»ăț*˜(jú˜¶Rüż&ÙœÿăÖSUWĂB_őB? ­\Œț©żŽŁ$šS{ȚȘV:$‰{óș·UâąöA$jÔ@ož˜Ă{‘oĘےÊúàŚœí}Vć©ȘßKw]Țۊ_7¶v]&ÙœqèŽP`-šMÔ€‰Ź†áÉ( Œ@"Òń$ÛpôÖS”€Wešgèš• €‘pÓ,ä€iśêJ… _z{âÛü‘†âuđb0Đô`4w†kWŸbòp–t/Œ•^ś¶śY„Q”gæôVʈWUِ'>œőôÖđź(Ą;ę=ÈqöńÈì1Œ—JŠ!áûˆB€Űgžś]ćšjÚÁŚ(…Đșù\Ę3tÔÊÀ˜QwÀŽ{-›őÚùă·b W[!â»ăyÖßM>QœđțD-Ș¶N~ŰàBl§¶ŐŸ‰..5‘ö ł]Ï 'ÛtöĐù{RZ)`¶\OČ»OĄvőVŽȘMč»Ö€+‘^*pq˜.š›îuI~pțűăsSžˆ_W#ÈG!j1^FToȘNËnNlh!6ž ĐbÎì’$1Ì(‹’ä01{ ÿzcàïìčč䯖Ź=<­Žˆ‘ &–ű9Ïț”›C;I ÚHÉńn“„AJ 8—ț†3ÀÔúš©êš8íŁ”Ž^ŃU|TąșńÖšŒš~!€?Țœó '«Ș)ŠÿB[ S"‡iÄ|]ăŒPłçùâÀŒZ 6N‚??Pê”[~NĂUe›7C‹7댔"éá>BLçŐZùÔ„•T-„>„š—Șvæ)€S,ǃÆlšœ!UáQ(P­ŹGmAùőćlșœq*żU±Ré¶ .]”àrhJ›ûcȚxžôp˜H)gÀčÔđú>·űZ}JQ5.%żD•€Ő`L«=›Ő?1f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3fìÖŹ– ,‰zL™ga̘„š ƧKqŁÖèŸLQdÁlôë Ź9CĂărnF*čłZ-™Š)+3V’“ŻmêșœźánŰ*CűŚ€Ô8DÉî&\}—MÀÿ€ÏP$Lš>i”Ż(Hk:æ^cgłJČüۅ?ƒ«J”ʟĂN ÖèŚ©‰&*+»”e±­ô±êłôđpżœKÆ#óȚBó›ĆxŸ$ŽvëjÏ4MŒÇiuzç eËîđB°|CÁéskŁŰDőX§ÂÊænžŰ–SìOæż¶)f[âb”,Ăć`)gč‹vç9E1N«GČÊR•»,^xȘž ënOJô‰*!«Q«Ș֟ćÛa@zĆȚCvÍvd=QV6NăX`čFŸ»qąÊˆ!đk'Oo…09Ț™Ę;áj”ÿÌꝐkZR’đ}ę)/č yÀ,$©TșÜD}VăI=|1•ÂJ!™ÊS”đžęc o<]‡‚-$Ș:û"ÚDß55Vșg‹îW—šUUûvpE”֜ȘÚń{ę±=JäEÜ›ë» Ż7íp°qFĄjàńhźțò€I~ç–«Áݧ6łzőrZP”Çw`,Á‰*S3âœĄ{;'uoÊ۞NUK9ëÜZ=|1•§?ŸïÖSŐ}ț17žNU 6/Żă>:Ôígz/ïŹtŒđ~ùëąâEÓN3CÒ„Æ;ú,Ì7Ï?ąŃgeáuûŸŻs”“$ȘvȚ;ÎëU>ú‚{©ÁOjYč&Q“ąFBćUœ©{)„T)Nć`)g ĘGúU’ź}}@Æ-€òŠÊS}3INŒđTȘÒ°ș»ú8íf:/kÂĆśxœżžĄíʄxäĘ J·ŸgÆ–cîŸK&U¶țl”­úm߁–ïä‚Af*aRUÏȘQ—C 5>ŸEB$КŐćsČâ^^ččjZöŰăo5EőžK;K/WáuVEÆ­ÒTćŸINŒđÔX…ŽŐSDÔ'«Qafű©x=Ł#?ÆȘlĂqŻ{ö|J…ĆjFp‡Ő9§ï’áOnè̆ó‚ƝY‘?ö ÆŸÄ ąDß¶ÂȚ,jߓ·_˜ %rA6Aőx1–v–ݱéL –ÂË៎žÏ OĄ[Šą CV—5śkp†·íoUŻg<.aśì±íêóPtïxŠ#Û=»é$q:ä簚S›ńÏ ž«ƒĂÔJŃËìçÓoĄŒ{`?[~ëđnČR3~ù [©zì…„œ%Pök~%ȚV/n—MkŒœŚùJĂÓ]ž«UG‹û”óIM?liÆ[]çeMŃęîŸĘ΃6”"è a—œFî0fŐ)À·STzacŠPNZ;€v¶Êu+ï.ż”x§č©?ÇYŐȘÇ^XŠV2GńçŹÂÓԋoŽčëLńRćú€ő4°7BV—5E4@M•1cÆnF·S]9Ž1cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ•ÙtuzżoxûČìäÒŹĆ}(5ŠéŽŠĆnB­ÒșWČbÖÄR„iN§7Îh:œß7Œ8‹ËˆŃÛ3™íÈêÔ§Rű›eK ay‰Zê‚č‚;ÏèïûđÂzWČbyĐɜž•] ßß"'Űp”h±VŒJ§·4<_ԆÿWŠüd^ÔŹÜćsqæ6vÜZ·ßŃ=f©;û3”ú”Šß;NÓU¶yFÛe4šaMD•șG7JŐ( žj훀ģ_ F`À'ÀKŸčżő§•ïoa ±ÆùŒ êôòË = čN݃w;» ß3óÉF\żùÉF\`K/_A©ń°ŠDÍNì€ŚŸvżh'ېIöÈË v*Ś0Îéož żÛp‹#ùäő:ÉöÂB ŒkčN©? 7ÎG”‹N k(”MŁ…äșźnőZ{Pżrه§‚x'vNSđa@@< łß:ȘźmŠ/àțX>Ö?Ÿ°¶Éțêô:—Uëô:xś!ÇwfqíźßÄ5{8ČÒÊï™ùű>N$`–[{Ź«ćkí)ć P•.±Uf»_bő6œyčćșŹĄčî1ô†(ʙ†ÿc‡·šê#t.űÖ TŒpDl!čźČ5± \Pß±šÔ°«ç§Ör2ëž:(cÎAZ=/ăNí[%ˆG_âą~;(«°+GUVƒ’{‰œŽź]ŸP5¶ F–iüuzŒ8Ôű„+,j<™ ”ò[ę$űX?R[…‡q……źuoČêąŒRqj]biI⌐Úsh“ÎRžî1«œÆ=k`Ő?|††ÿFއë챞”BăI">GTxő2<Ÿ!W瀒írcšÔ\Jžșm.•ÓŐqă‘DQŚx•äôÍÓ4âčëÔòșzŽj”(e^KMCtŁë~(uÄń]łĆM&Śé- ï(ÊpŐ~r-ƒ ݚ;€ŸŽŰČÆ“*a· ąŒă PŁej5 Ą{Ìï“ßwGVVÄ[{ZŰJÍ IđQkćűÆ«Q-Ù./ʊ\nÓŐv(fÀ…ź.ßêȘ7Œš>=3ǶÓČžŹ™BT‘%Î >!5uDĐôŽ€ŒŻ`ÿąçOąÉÿć:œȚĘżÈńYGčőÜZ%UćìLbžšJ<Ș±°RgŰÁ»›ĆÏú>°gÂ}–=Čąê“Lԃë[1QqdĆÏ i}?ÆÀ«éđŁnąÊńǶ;Šž„RUM qrrĐ-ۙ”±ï`ÆbxcĄK ­T[Ž,n)YâÊS•őŰéŽPś,$č·ĄNïbŚőŚéuđîCŽOŰbț8wĂìV‚PŸ-ÿß+ˆJ«; UăEÀŻÖ%fՃӘLBÜڟ¶/ì~IÖĐ\ś˜ŐBĂÜțŻ]}VUÀĂȚvAéP㛠’r<«Ć’ĘAż\xŹxjCĄ†UYÍSO;žóÔÓrÉ 6ԙî‚ŃюiT{!èeqKɶ QŻPKßĐ đúóŽ,ްđéêô§Yd:œȚĘëȘđQx́s·sQbùž[JB«>zőwÇr]bŒN7ćR&˜`’>–œî±ÈăV!Șú >t'ș ŒÁ<Öêaš*Œ­ŸÚ;Ž^?­€ŠF)łO¶\HŸƒșBTˆÌG383/_·”,qćÓJ»oO}őç)źÎlê‹Ę·ç~ć(źÓtzKˌV„ÊŻž;;†ÁIöÉF”⹣{lÍ5Č©>șx;ŃEÄs‚ߥ ]lšQšóČfđłf%2èŸsêKz2I7K|2ÀaĄ€ź=jŚžÚìR.:œTȚï^œĆŐé)HĄ{Ü„UŸJá@XŚihoiÎ{d[śŹ|–êuçćÉâȚH–žòT:ą9m暱»ÖÓéęțá̃Œ]ŠőŻÖw-tŸV ĄŠt„m)YÜbČêUśn3f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3fÌX –Íí1­`ÌX!-4teAé%vĄ<ç?|ㇶÔ&i_Ÿq†zë Ïđ”É] eČR_ÄŚ ©|& c*kր4fÔńÈ,J «U—űÜ_Äh“ű\1A€„îîèù•żéőĆśșeL·ę-‰L\śŹ^çê~ÔPčhrĂÉ*tqa0݃fTêâ:ßMUùĆÛpÔ>”ydłu„UÙÏYCÖA>†Ž€ákț).,ù°+ÉŠ@ÚbśÚjE)űÔW°âŸÙÏ …ÆFÒ+Ațs$ąeą6\ä”Q9oI}4Èx<ś“U.ŐB?ą–BŐÂß«ë#ˆš$‘ćHxì.x%,•Ìa!źRThwgd5zđÉĆśúDB·ęeŠŽțČ.L7@„*ïž AsduttWëâVUaà‹RU|–I xG¶߇$TźüĂëüń-ŸŹÄë™#_œùIFśNÀŒö_XufŐośÙÂQ°IDÍșIČȚ ?|ŚeŽżÿć$Û|ê „îÙi{œŸŽtÏFÔÛNÄžÜwȚsČqqń?ŐíîäDßœm}o—/`ÓŁȘCT±i Źńjś·HÁ}ù2ŸȚo^՟Áń|Șăí’ϧpä„+ęđP§ă;昭Ž?^$”^ü)«ȚtnÓ9VęâOí­êdDĆÀTŒń›ÎÙóʘÿäYßÂȘź #jÓǍvÙțàÊRŐ!*Œë]|6©ȚîÊ!«œš~.«îMPx§ęïëG5țćØÚś9G6Q©Êçä…Żč˜IWG·ȘjăRT|–^|Y߅&—Žgö|JuKŰwÿž-w”íęĐçS=3­,đœ‚7<Ț ßÿ ˆ‡È{oü…-ł†„xL(Eáúïx?Ț ’O¶ßY`Ÿ# ßí蚷Űߑ ̗kTƐHÈgŽEp#ąFižŰqĆ3đżßO2źœ_NóîÆŸtëOćˆrR?Ț ./ČȘˆșŰÁ1œ‡őIEæ”ËŃ;łWNȘ˜úŽśĐ5昫b+șżÏOntutuçȘűÖ6RôNéĂăŃŸ|ă:ßéêâêQ”ábŚćÓ[Aò–˜«T @ŸÜ€ÄŃÌe-Żóú8Ûhx?tÖ›QœŸűCâęïÚS˜‚đÄCșâ>Hêo=ޱđ’5}Œ ·•ùn żźŽ#„Š}ËoÇȚU(¶ăx ‘íćUŐò›<Š ‚$ŸkšG/śžÁÇUŚt„^ń""䶝ê9šë伉óÚFv·đ+OîF8k౜Tm:ꍇám™*Ź„v0Č&ÓÒĆŐŁjŚep’šœ[‘DYÍÇśčëqÖ3CÓč…mÚ!ŽĂÿËHŚX¶șŸm-“őÉQæś(ي—6]ö^#'vvÍȘ\QźșŰ€ź[§CT>Iž1 Oʧ+•¶ą—"!uwÏŽÏÙéőŃŒ™JŐ5Śœń»žW‡”7HTѓÒueóÍvÊ·JzN’ïUW}çLŽ ș%uÿąp&ì:ÔŒ •šmŽïàƒ6f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘±ÿ WYŠŒÉœ$P,;AUžÓșJ]v†ë‚€ŒŽóÚúÄsßŐ§ ™ŻÚĆą{%kććđšówÆnكeőd--ŹüY™Ą•Ÿűjö7‘ábáÉŠ”ˆŸÉź@„ –-/É7p]·ábĂĆłŻ@ŃÁ« ];š`1“k†ƒÁÙ”æôրÔà?*šȘĂäè<'ˆ:ÏKßúUß? żșïÉû~«Æ;ÖđꔆeŽAIéÚ:É„-݈Úk}ą±ÙÂòÄ !^ÈŻ-đú5ŃÙĄo\ÉÂ_íŸ]ć0Á/čn xIUîÚ&XšÁefžÍÊŹdk›Ô” ŒĐ‘ęeW’$‘mœ‚jźëO±Ÿçžžl%e ‰pćÎ~êé&RgĐĞzúΆQ —NUĐŐùÖ^ OšÍÈoœC鰚:Ï„â{f„4mùËÁœPìŁèŻ#_Sa„ąDĐĐ[žÌŃŸÜ ænK<Č.dúЉ=€î ’Ź@œ}Næ|ü”ŁÊ Qs~ûʘȘ±ÏŽ›^±Đúeâÿtękœ±j•Š]ÜœÎSŃ'Țž™š ‹v•ckeŒŒńeńM’ęà<ÿÜü"E§:ŚĄćäŸčä̱í曫âsß-Êß]^• Ž }(ą”#Jü,œkÜ« Èžw!=3B5ŸđČòKŻùԍ^ó©Ęj…3FÒŹïłœărčS7QŐ3ÚRæȘ<¶'J9"Ą”]|È_ìˆĐ—‡Á%ÇêŰ/Țÿ# TÇé­cGqn"Łê[­cGQ љ†śgƎŸŐ*iêVÔ!jTú2%ĐąÈtuhcä•(;ČMÙĐ”Œ|Çő' RÆžçHge-ƒ«S»ÚÙ1㠘cœí,”+žšjȘą ©†ęç25{ŸČ©zuÍ”Żcx'-čȚiË6‚Îłƒosw–-Ă딎čȘă4”–ΰg۞^'“1 KËđœ¶ű\d@ăf#iÿȚ0 †űÙÀĄ=‡ö@Ò%ß5ÈzŁĘ·ƒûuˆśtŰ!ìŸ]âŠŰ±·M|țŚđ![@QDL§ÂÙ;ö7U ßŃŸ€3ÔՊM<ÄëŠțÌj[=GHŹú%čûuí-,Œ$ë‚SY]ç›…Čšfù­_Á‹—̝ŸËđzD]ü^•6WćπòâNww|Čv`ȘikMÚŸcûiqQ–Ț–ŸWÂùX°85ąVÍŻš§èriŃáI †'ívVG.x R«ȚöZ aN"Fá| 'áă…ÒÚzœ/é=bĘó:ÏŃšu•—&~ÓčîÙÎoCżÛőŒá±ŽȚnń{Uê\Uźœ\z€ôüĂBûY—«ë\IŁTԟE=ÚȘŠ™=ÚĘR9êEŁ7ùÏԆ'źb7F.ëïŃ5@ÇWšă˜I`Țò]5Ÿ‘Ÿ˜–;V! ÏA'ô@§Š{Nș\..ƅGÖĂ_!ÁȚ7ÚëÿsuV©§$žBlW=}ńi€”©;ź ȚFùđ)ßAÜń<â.&ˆXax–ă,Ă38Sê(b–‹€Ś”*â%Äę31ùl ó‚”#O-êșÌzQvíšaÒXșOPÿÏ5o6Zńzńéòæ&â»Ő^wÇÔźkčIÄ/#Ÿæű&ńœÆ\%x/@ò™š{€ÂùÉ7ëSï Ț‰žjű…©PŸh͔&žmryÎ>Ș†œkș7Š=ƒßȘÓB‘ç#@•fsŹ_ˆ{ë±Đż0î-LæZ~ëŁ%îGpßÓÆËˆ{èÚêÏYXŠf^ćț…+Ž_sÖ-łTä>‰Dœ Æ@îŚ§Æž-9àă!r[2]3ŽBț’cłˆč‘ónC­„œš›Ës?ä>”*ĄÏÔźȘ–eœD|Ž%4 `Ă î:X°2𐇠ŸpQSL”PÔR”‰§aeíyć€ĂqĘ ŹŚ™5FiÏáî„›t…ìÇç )’Cd˜Œ€LȚ$o‘Ă$‹ÒrpÓ¶‹ÏbĘÙôó>4Đ+ăƒÌčžF_ïŹ{ÒĐŻôśkû‘œi+ŸxÀĂޘńúŻ.ę°+ò±B.Œ{łëêL<©ż©Û©őÔ î«©”ˆ‘ú=”†żUHcnfŃ<>F‡Ë ^Ăe||ĐpÿyvŒ·%bÍ:ŚiX'脇%8ÛI•ß”?•ć ćŒrw[—ÛvIűTűVűQűNű^űdá’pYűIž"|#\ŒŐăçcóìƒz[Ő2M»^S0„ŒŽ[zIÊJ/HŻHĆȟÔ- IcÒÔìȚ<·xŒx-œÀœŐŐö±8Ż‚ZNxA‡-8łmțCkÒK†HaÛÔłYn1Ĝ˜Ó ‹{ĆqHgž•Ÿžu#žç¶Lț˜ hŒŻs ˜:6«Ìz!Đy@}zÚgíšíœqÙș/ïS”Ść4~Șš\°ôÁ~Y3M9PyČK=ê.Đê °ï żąšÁś-±óz$óß8ôȚY7"Ùtàk û”Hևwⳟ\8 7܅đÎO$~đjûśń]Œ›n5›đŸêű`ăăfóŸćfsăKôżpÉüYqxÄ(Â@ pHYsttȚfx IDATxœìœyxUŸÿÿê- d„„„,$‘E0ŠPPeLa”!AgPT0‚ł\Ń{/d‚ŚæÎŚ‹‘€âŒĂöàê("‰.ąhE0 ¶‘l’twŐ*ʝKÒI'ጞ§žtWW:”äŒëłœs4Č,ˁ@ĐÉĐzș@ Ž!`@ è”A§D˜@ :%BÀ@Đ)&‚N‰0@ tJ„€  S"L !`@ è”A§Dïé ‚ź‹jőÖCŁŃŽÛ±„€ ‚Vc/T’$č\/èú8‹—V«mö7·OŒF/ZŠ,ËH’€ •,Ëêg{!Ü:(ą„–FŁAŁŃ ŐjĘ.bÂ7œp)‹$Iê:EŒźő~,Ț;/Í ‘Č^+­V«~–eÙíB&L Üöâ%IV«Uę[__ÏûïżÏȘU+).>íéȘ , çÀ j*źĐ\$VÎ,„Šâ wÿrÇ>;©–ćàMțÎb≠2ŸțĄ>ê5ë?ź/ÇśœĄïОí|Šíƒ»FĄW&ZLWJ*tpÎșę—žmt„zŽęÇEpű_'é?.€šáĄHČDٙ*.Ur„üȘZVšź”_Uśś òvž^^~¶æűÇÂÊ.uEGf@ĐaéȘYˆ=D撟sšłG.2ęÍ ê9™×ïfÇÿû–š`üz{#ÉVâ àŸ§sÇ/bÔČŸÿžŸ@/uÿóßÿèpœ~?ƒŸ–`żîŰFlzî?-ƒ&G4ÙŚŸŒà˜îÇtï’ŚÇÇI Ę čî6/^äâĆ‹êśź»t|„€ łÙLÎÎÖ­]Gvvö ïçííM}}=ČÔuÒżîÇ9‘Ł”V™0àÇ^ŽÖŻ_ŻźïŐ«„„„ŚÜwÔšQüö·żćÙgŸ„ŸŸŸKő_žç~`" Q Ž“ÉÄąE‹ÈÈÈPŚĆÆÄòēOđôÓOcȘ61hà —û>őÔSL›6°°0êêêÔő]5Ž#h ą˜@ pÎÂe4™?>O?ę4aav™p%Mś}îčçXžp!^^^ÔÖÖR__V«%::šÚ†+ÈÂ8a?œ»&Ü"8 WlL,+Vź`üžń †&ÛۋYjj*‹/ÆÇLJ††êëë\Aƒ«ŐuíæBޚ%Žn>Kćé+DĘߓèșæŰźŰżò#æĘv-©Ż±°ęw™đ_wàŚË§-ȘÖ Â­ 33“ŽŽ4ÊÊÊTáJJLșî~+VŹ %%…îĘ»c±X0›ÍŚÜŸœ\ˆ—~š"çżÓïțP"ï7ȚRźË’CÀÍ_ëOś§ö^€ŸfĘz5}ai+ìGŁwÿjMLL˜@Ѕ)))á‘G!77ŁŃȆ ˜1cÆ ïÿüóÏ#Ë2V«ëÆR‰Łq>°ö±À.­`òÛCÛőž‰=ç­ÏäÔ^ûź’Gź—òŒžÓ•(L èą,YČ„ŽŽ4ÙŽimzÌöˆm{ˆÒŁ&>~î;Æ„"ï[À.áč~œűô·=ܛŸ^"ëJšèëKż1!$<ڀܷOŸÁžŚ žZiæț—n# —]‹òžZiŠêt-wΊäŽ}Őă7ÔX8Čî,ù_ zLߏÁËOOĆ©+ìęó †ÏíGïű@őW‘űßCÔŃæś.;ŽO A­Ç„#U|żńWqçŹHLU·Ę:śwŠD9Șßo<‡O A”h”k}„Žžiyű˜đúà&Ś+jŽ‘šŃFȘÎÔrpĘ)dYjŚXesóč!`AĂl63räHŐêÚ¶m#FŒpûq”čF٧íÆèŃFȘNŚâíïOôh#șn.ź€êôUNퟌéÜU&,Ä·ońuæ ąïïĆđyę(Țs™Ż2Ówd0œâžpž’ÒŁŐ|•yœ“úRŒśĆ{/áO}”…ÈQFŠÏVóߎŃs°œâ(=bbsò~B‡ôààșS\wŠ_Œ}7á#‚)Ț{‰ h_zÆûÿń*ÎVSŒ'”ž‡{ŃPcáàșSÜûümHHl›{˜âœ„Gű5ÆÈ:Æ:FòGŁŠéFńȚKűŰżąP=/%Š$!QzÄĶçĐŚ—‰o qyęϰĆ2+‹“Ûć>5Òvæțށ@à1JJJèÓ§ččč$&&rá…6/çű…,[Û|čęńP"} ˆôćöÇC1tŚ ËPq¶šżèÍŻśÜGߑA||‘à^9„ÛeÌmI„ÇL?•”•WylĘ0ÆœȚŸÉ«lîȊłŐÌÊÁžŚûsgr”Ă>G6œ`òȘĄ<șá.&ŻJp„?‡ŚžCŁ“0)ŒăŸ\B–­ÔWŚSq¶€â=?"ËV.Čč>LéE}u=Ć{K1/–ۆ1ò„ž=đ ʂ|9șéòOٚäo;GüŹ0őŒddÎìœÌæäęôőá‘5ńhtò”ŻĘO13™¶żGŽKăłâîင€ ]„Źì,ÂĂĂ)++#==ŹŹ,—Ù…­Ćč!rœLn—ĆöVïűœ[턟›țIÓ?I úRG7žg̈́/›ë­± èy‡’,>2ˆĐ!Á„ FŁŚ É2śœă°OÁ¶‚#ü©:SËэç©:SK@€§ż,E’eâ&ő€¶ò*՗êžpÈ6żŚèWpöËr$Yæű'6 Ï·§§ś”ĐJo”Μ†ˆQÁœŰvI‘>8Ÿ˜€žçúă1[ç`ä”ŸŚżníwï•ëçš”ą@ĐX°`FÖ­_wC†mÜnـČÓńdzöCcŐu…Û/łoi}G3aéíìxùd”mœËï@]“u¶ï2ő5őêçÓ{Ê~•ҫôșÓ6Hï…•”~_MÔšúŒ öő:ź”^ćì—ć žŃ+—Ÿ· œw°Öáx‘ȚÔn«SéíT™ÚÊ:úOêĂč/+ŰùïLęđ.—Łá;žƒ€țmżûd;ą=b$@ b/^GŽqìŒìfì3ÈŽ-­ÆÉkŸŰŠÒ$*Çsțšâ5ăó»ŃŽTșúÓ¶2’,čÜÇŐ:e}w-œíØŚâÔß~üŸ†Ë?\Aç«Q·9Ÿ”ә:†€ô! Ú€C ϔžHČDL’‘#ëÏr9݆žwű©ćÙSAïÁAè»kŐ:9ڱśà ÆŒKŃö2r^ÉăđßÎsŚłáŚŸfÊ”’„vòKčŠÍYí­Až‚NŠÙlf۰adddÀ… ÚTŒnY’ÚeQAÍ}ŻŻ6S[Y‡ž”e T]áà»ç8ńńX,(Á™k•« N,ÿŽ.â@Žo»ÈÁ·ÏRs±Žł_–óŻY‡8ł»}7 Č$18„7gŸŒLćÙB‡ù!K‘#|żń,A~ű†è‘%‰ÁĘèäĂWK‹)=bąŸÚÌÿßE.«$âÀƁ‘ë#Ëxê%‰~‰ÁDŽ4òíȘST]čæ5SDK’Ûç9\Ó6BX`A'Ä>Ó0!!}ûö”IŒëFĐj”ê”ÜNÙmČúWrùĘĐ]ÐáĘxžIčEűŃkp —ŽUrüƒÒ&ûž*§ ‰Û“{QWe!śíÓäŸ}ß o†ÿ!Bʧïę]Łœ‘‘ˆș}eÄN2:”=ú”Ÿ[yžž8ąź2#œÛ“{9œÛ”êűàČ6OźaǂLùßÁhőÍY7{¶Ś}Č?*4fźș 1#ł@Đ 6lX»‰—Ò‘Y’$Ìf3őőőêRW_‡ĆláÙgŸeߟ}Ì>0ŒÍêaϕRۈ ĘQÂù»BeqŸ©ŠÏpüĂmźŒêóőt 1`ź•0ŚZ Šöi¶\„Œn!Œütê:«YæôÎJz đuŰß~C7ZŽŐ,S}Ÿÿpot†Šű•R3•'Ż:Ìßáwçrš«ă•R3æZkłćßHڊÏ_8ÉÙ}ćüđĂxûxăă탷·7^^^êŒÌ:NÌÈ,Ü ,X° Ę-Żæ­F둘oOĂńœż+Dyeü雬źĐwŚá‹ÎaWć(ÛÛŻÓè!úĄ@—Çt”FŻŹkÌt>ߞ~M~wulWuôíi;—æÊż‘:Ž5î¶Ÿ@˜@Đ©P6<í6ŚąÖžź)@˜@ĐIÈÌÌ$##ƒŰ˜Ű%^öŸĆt*g”(•VŁmb±·!`A' +;‹ÔÔTŒF#{țoGĆËçYvŐÌ9@Ed! ·,%%%LLšĐæęŒZ‹p! œqŐÌ]:0fł™űűx¶gmïâćèBIÍg„&ܒŒ9’ČČ2æÏŸï±áĄšĂŐàŹí9ƒ “`§_î¶Â„€ ”%K–šŁÊżù曞źNł8ŠG Làˆ2˜p! ·ûśï'-- ŁŃÈÖ­[=]ìÇCtNâ˜àFp—˜ :&“‰I“&°śËœ&ă°9Ž»!UE LàL3τę‹PK&t0ŠM›FYY+VŹ`à€žźŽKœGĄWYˆgìłĘ=©„0 ‘™™Ivv6 <ÿüóžźÎuŃh5ŰO-%KÂ8#Č‚.OII‰ÚY9''ÇÓŐčaDœÀS:<òoœőŚÙșcĄŽÄ!’8N(/5b0_ ‹’™™Inn.ÉÉÉ̘1ĂÓŐč!ŽZÛŰv’Æ^Ž„&hŃL èbŰ»ßÿ}OWçš\Ż.DASD L èČ(źĂuëŚuű”ùë!Lp=ì]‰­M„&xĆu˜˜˜ŰᆊjFăŰśËK­„Ÿ[ûÍö+èŰXje.~SKdd€Ă3ăŽ>`î)E Ü4&“ImcÓŠMžźNłÜHÜbì۱œùŹYF,bA–mÏÀìÙłś —‚0ÀC̛7ČČ2ÒÓÓ;]Ö!8vL>}:y7QôŻÌ5VÏ·žbńŰbź±RôŻòțn`úăÓŐ!ĆsGB‡FNk ĘÙż?śȚ{/ |ûí·žźÎu±Z­H’„ĆbÁl6ÓĐĐ ț”X,H’ÄÚ”kyőŐW=]UAcńâĆ<ńÄèőz ^^^  zœN‡VÛșš…€  .6ŽÂąBòòó:ìpQöŰ ˜Ćbq0«É*!I lȚŒ™]»v9 Ô#‘ :ŠŒŰÿ}đÁ™>}:^^^èô:ô:ŚŠŐj…€ …ÌÌLRSS™?~‡ž&ĆY–±Z­X,ŹV+fł™ú†z,f›Ef±XeYmÀ4­QÒÚ>Ü=ž ă ÜwI–„Ÿ>K¶ŸÊ}WŹ/œAAoPL§ÓĄŚë[ülފü‚|ü<:S°Édê41$“ÉDLL EEEŠȚŠ€Ù»íĆ S3ûű˜’6Ę\æą óc/^ÎπV§EŻÓ7q!j”ZՅŰRO” U 8HÍ0șL&™™™˜LŠV·€€„žŰ84 kŚźmUY­%))‰€€K_ŽhQ§Mܰ%ĆíŁŐÙ!œNV§uéRű•dI,]tQçC§”YY:}cŹKŁŃŽJžD?0A»RrÁ6êÄű ă[ՀïȚœ[!…őiëÏl6SXTÈȘ•«ÈÎÎ&11ńșûä䓑‘AlLl§iȚ„QRȚŹu:’$5‰}HÉ怖ÂúêÚHÚÆ{źĄŃâVŹ,­¶Ń S„ËńQ!`·Ą4ê±1± ò òŐÏ`łš~w€ƒßlâz4™LÔÔÔ8Źs.Ód2QrĄ„5kÖ €ŻŻŻș}II gϞ%""ąY·f~A>a}šPçz»bőêŐ€ŠŠȚà•±ńâ‚XżaęM팑PÄ @Żwl>ŽZ-’$©Âæ*:!â`] ćë4:uK+]§Wă]Z­V±Öö ŻE·QXTÈ ƒXœz5Æ cĐÀAxyy±`ÁÀ֙qæÌ™Ìœ9Su=æ䓒’B`` áááÄĆÆ‘•ćPæwß}Gff& 8ˆììlő·ÂąBJJJ6láááÜ{‡‡‚ÙllB˜™™I\lƒ"00žŰ8ò òŐúÛÿźÔ»9WçŹYłÈËÏ#/?„„„ë^›Źì,ŐR1bDË/ČQ3ì§ŸȚ°•ÀŒȚ WłËì3Íì?‹„ë,źî±zŸz úÆßíĆË-Ï€H⎍FCbb"YYYää3hà ŒF#ëÖŻ#țŽxfϞMvv6UUUÔÔÔ°{śnfΜɆ 3f aaajJùüùó1€„„—Ÿ –™œœÌć'ÍŹ”YŹ]·–Ű˜X&OžLvv6_ę5wß}·j!m۰3f°qăFfΜIrr2/Œđoœő댯WëźôËRêŸü–«‚“••uÍk Äżź”]gK›o%ĂLù«,J‚‡Őjuä n=ìc„J/e±ïóŐÒÔy{„ Qàv’““ŐqꖿčœA±mÛ6f̘ÁĐ»‡0ô……a2™TńRRÊ_|ńEîz79;r?a< )çFŁ@ƒÉ“'óâo_dĈ˜ÍfÊÊÊ(//P]ŽëÖ­`ĈLš4‰òòrÌf36lÀh4räÈÂÂÂHJLRÓĘÍfs«ÙÍÌÌTϱ3‹4Za’$5iˆdYVădα1AŚÇ9ŠeŸšáüÙâBÀmÀÜysŐÏJƒ­‰3Û¶m ##ƒŒŒ ‡ß¶nĘȘ Xzzú59kÖ,ö}” °~ęzUÀÀæ>ÌÎÎfțüùûŰÏ»„ìȚ€ìïŸûźĆn?łÙŹZ”]e” ûۅb5'` BÈș6Îbä,TöIî/&đ0Á=‚۰aƒjč"0(đšćL›6ììlÒÓÓÙûć^üT1jÎzRBbcb ą_ż~Ź]Ś4%ż5YŽ«WŻŠŹŹŒ+VtșŽùkaßI’ÔDÀ‡­‚[%ÉÇÙ"S^zܙÈ#’8eü8›…uâÄ ÈÀ đàĆ/’ł#ç†Ê())!;;›ääd/^ÌÀ9{ö,€j‰%''łí“mûÄÄÄpÿšûxâÉ'ÈÍÍ%6&V­ÇŠnR3[‚ÉdR'Ș|æ™gZ\NGÆ>+Qd œł ­.w?#BÀíJ€żÍ yqÁ‹dega0HLL$--aƱdÉâăăÉÎÎfʔ)7TfXXFŁ‘ő댳`ÁRRRžśȚ{HKKŁ€€„”Y)‚ ˆW; ž~úiúôéCJJ )))Ș믄–ÓąE‹ÔctE”:ì7”uźÖ‹„k/Ê}Wîœ},»ß,\ˆ‚v%,,ŒùóçSPPÀöO·“”˜DVVYÙY,ÿŸć€„„©™‚aaa˜ nlĎmÛ¶‘<3Yí(ŒbĆ U„’“ÈËÏcŐÊUdddÀ[oœĆÔ©SŐzUUU±|ùr222 "==W^y„Eçi2™ÈÈÈèČ֗}Ł€,ö}ÀŚá”­¶hĐíCs–”łkÙ~dY–ĘšÀ"^ h,X@FFÛł¶wš™–oç7kûúúúzȚÿ}V­ZIqńiOWUà!ąŁŁ™7ołgÏÆÇǧIçew‰˜0À͔””NlL,' Ozș:nĆȚÒržbćĘwßćć—_V·ùPçì°-h=û>ÛŻ~^¶lÏ=ś:N]Ü%bBÀ7“””Dvvv—ŽŸ”ۆ2­Š22}mm-QQQőäÙŽß01eĘș{șșqĆt…íëvđNúûT–WQRR‚ŻŻŻ:…Š»DLÄÀ7’_Ovv6±1±]NŒœc]ÊĖ ŹYł€9iOòŰŒÉ¶í)ô·*Ę|ylȚd$$ț{AïœśOÏyÚaáB:]ĘúȟŹĄĄúúzêêêűőŻÍȚœ{ÙqùCșûwótU„+Ő”L™BdT$ûŸÜ‡———șŰìÛR„&ž‰[ÁúR,0ûI-°Z­űűyc•­ź­ Łàăç͈ ìߑK]]šu%mX IDATÄĄŚë±Z­ى-A˜@à&”Nϟ|ú‰‡kÒv(ÉJüK±ÂGŽ‹‡k(èx۞ łĆŒÁb­Țb±8ŒÚÒR„€ n@±Ÿ;ę€œÍáÜaŐliŽÀ”~_ź&łÜÚÈ? XC}ƒ:íŽÁ`PĆK’€»…€ n@±Ÿ–żčÜĂ5iì;-+±0ÉÚèJT-0IžŽ(6–bč;O»ŽŰ(L h%·‚ő„ 4lnWáB8ŁÄÀ2YeÉ-"&L h·šőe«Ȋ03Öč$IMŹôֈ˜0 …Ü ֗+”·gŚż‰˜ÀWOŠ,čgü !`A č•­Żæ103m9ۓ0 ÜȘ֗‚ótń "&hŠMÀŽśÏŸ,L h·Čő„4DźDL10ȝ±5)óź&Ü$·șőu-„ QĐö/:­{fd&Ü$·ČőćŒ28«‚U$qœ10 ƒ Ź/Ś(oŚÂ…(ž na}5â*&’8Î(10Fă–I,í&Ü ÂújŠsƒ$b`‚Šą@àq„őՈC@^d! ź,L đ,Âúș1$1łÀ %‰ĂĘîC&ÜÂújŠFۘš4N"&ž"&Ž3Âúș6ö’LډmăKNćžcȚ†é대~̕ò«<łf*zƒîșÛ»bćÌÒ/Ą/7Êíőîhą@àA~țđÏa})4ÿ°v!bMĆŽ}q‚ò •†úPW]Ï7àÌśˆÚGĘ~śßŸĆtCŚàŰ'čK]Żæqt!șÓ &\ƒŹì, ‹ …őu ’8șPƒ<ô‘|ń·o8ŸWŠïnÛqÿ`?r?8FÄ]œšșXCuE IżyĂŚÀ6/VŚč^ÍáȘ#ł»ú‚ źAêŒT@X_Î4ś-u!bŰ!äí,ąÿƒ‘Ë)"êÎ0zÆôà‡œ"Y2€“_Ÿ öțŸê5(=YÎWÿ8Â9§xô”±ÄŠ@gçr”‹'/óQÚnFÏʀŁÛéìÚEŸŽZ­ˆ 텰ŸźVck4ÚÆȘRJâĐè *>ŒrN1ùPđE1ŁfßIHt č„¶ê*>ț^äí8…°!1H’•ÿž‡=ï g”‘:S=ï€lÁ?ۏ?›A`o?òv’ś`!ŁgßĂéÜ Œ“Č…žQFțßž<í6@ÄÀ‚vG±ŸȚ{ï=Ś€ăpœ7èźæ8!šì7öQkșŠ©ô Ő5 ™C@Żî瞧ÿƒ‘äï.fÀ˜Hőüżû0żàî<łé—ű}ùfă1>ă ż:Ç]ÜŠ–ÿûŸ"0ÔVÖĄN°ațvŠż;OäĐĐö?Ù6ąč$wXcBÀ(ÖŚüùó ótu:4öńŒźÖ‘9nt8Ùo@ńÊÏTáܝŰzFőà» è90ˆšŠ+ô‰„•łK©©žÂĘżıÏNȘeùx“żł˜űGbˆŒïƒšzÍúë Àń=gè;Žg;ŸiûàźQè„€ N˜ÍfR’SxőŐW=\›ŽMWJ*tpÎșę—žmt„zŽęÇEpű_'é?.€šáĄHČDٙ*.Ur„üȘZVšź”_Uśś òvž^^~¶æűÇÂÊ.uEGf Yœz5eee̟?Ÿ€€OW§ĂÓUł4zˆˆ%?ç4g\dú›Ôs29†/ß?̎ÿś-!QÁűőöF’­Ä=hłŰï{j0wü"F-ëû‹đ ôRś?ÿꏦëǓ6áë?źo»Ž"&Ž fł™ŽŽ4@X_7n$&&†ĄC‡6™IŚ9ŁŹŸŸŁ_kxmôŚ—œćčD 艹cè .ŸźàŸ_ߥźśòÓJΐè?¶/;ß8ÈWÿžŸ§"V¶ő«©žÂ–ż`Ò«śR}©–ŹWż nlX—șŽČè&ŽŠő”bÊ[ȚúZłf ÙÙÙÜsÏ=̚5‹x€šš(ueŠŒsçÎQ]VƒÔ†“zŠ˜úłB"ƒńë櫞ŁF§Ąo|oÎčDܘp‡sOJÆîć‡ÙŒ`§șźo|oRšÛ…DS[^ÇkńÿPżÿ<}$†îúźuíNƝsh䶜.S èD˜L&1\žpƒÁàé*y”€€$UÀì bì۱Lš4‰A·BŻÓóđĂSVVÆâ“Oz Šm‹Ő,Qy¶ŻnzüC»9üV_cŠŠô*A~è Mçú3'w'nl8Ț~ÏSY‘I-ŻŹÈDćčbGwÍdĄżÙƉÿ;ĂÁƒéÖ­>>>űúúâííÁ`@ŻŚŁŚë[d™ L ű‰E‹žž~Ë‹Ś”šŹŹäĂ?äĂ? 44”șș: ëe!h cKuw>?ƒŸ–`żîŰFlzî?-ƒ&G4ÙŚŸŒà˜îÇtï’ŚÇÇIA‘_OFF±1±<ÿüóžźN»a6›),*€žž˜Â“…”••±oß>—Ö—+.^Œš~îJ±AÇG˜@@ăt)+VźđpMڎü‚|rväpüűq ź+PęúőăÔ©S7T¶uuuÈRŚIÿžçDŽÖZeBÀ·<ûśïW§KIJLòtu܂ÉdbßWûŰțévöíÛGnnn“mbcb‰»-ŽÉ“'ÓŁG†Ț=@6+33“ÔÔÔfqÇw0oȚ<îșë.~țóŸSWWŚ„ú/ ܃s?°N•…(rD:/máłîˆ$ÏL:ś€œfł™œ9lÿt;Û>ÙFaQĄĂ‰Œ9’á#†Ęâ±{ś`Î3s˜6mÔŐŐ©ń/èš10Aké$ęÀ±’œÜBÄ:'öfßš+ [ffŠ:dTg°Śd2±mÛ6¶mÛÆúőë~KLLäÉ'ŸdèĘC[|^±q±êç3f0wî\îșë.šŻŻ§¶¶Æ6+stt4” W…&pÂ~4zwÓjł-ćł,ËMÄLˆXçÁ•pI’€öùqžFŸłb2™HKKĂh4všNˊ„”è?9žccbyâÉ'˜6}šÛ„8țŽx6lŰÀc=†V«Ćb±`6›ŐßíïżÁ`àjuûč­f‰Ł›ÏRyú Qśś$úź9v +öŻ<Àˆy·]gKVłDŐÙZÎ~]ÀÀ_„ă팞ѣjÉČŹ —ČX­Vőłłš :ŠXèt:ń’eYęܙElŃąEŠÓr~A>«Vź"##C]—Àï~ś;ƌÓ&‡……1cÆ őÿúFh/â„ȘÈùŻĂô»?”Èû·”ëČäPpăŚúăçpjïEșùr„ò*9ÿu˜qÿOü̈¶ŹŠŠęhôźÚ‹ÖŽ!-0E ‘ČZ­H’„ĆbĄźŸŽ5_Ăʕ+9}út‹+'đ<ŃŃŃ̝;—ÙłgăííN§C«ŐąÓéeY·ÎFgH›7›ÍlÙȅEÿčHi)–Ö‹/ŸŰ!DWy±iœŹ},°KG+˜üöĐv=nGâFÎùű§9”ś"cÿcẅàґ*¶Î;ÈŚ+N0äńđvše#Ê3âNWb‹Ì^ŒŹV+V«‹Ć‚ĆbáĘwßć•W^Q·MLLt[eíOvv6 .dá…,]ș”gŸ}ÖAŒ€N)błRf°~ĂúëlÙț˜L&-ZÄúőë)+łč}’““yá…1b„‡kwmÚ#¶uî!Jšűűčï—>ˆŒJHxź'>œÀmśæÄ§—ÈßzÒŁ&úúÒoL Ïő śm[ű”öŒVÀŐJ3śżtŸìZ”ÇŐJ3U§kčsV$wÌè«żĄÆÂ‘ugÉÿűŃcBț| ^~z*N]aïŸO0|n?zÇȘÇžpžŠÄÿąŽ6żwÙq| j=.©âûçžxžŠ;gE2`ršșíÖ臾3%’ÈQ=ű~ă9| ȘEŁ\ë+„őìLËĂ7ÈÀ„Ś;\«Ó{~`ĐÔ>ÈČDŻ;üč39‚Ż2S^TMpżîîŒ5.in>0wpÓæJŒÌf3fł™+WźđÊ+Ż`4IOOgÖŹYâ-QĐrL&kŚź%--—_~™™3gÒ­[7‡ÔXI’:•;133“ÜÜ\’““;” („ž •ÿŁŽbm9ŁÌíä0=m/`ŃŁTźĆÛߟèŃFtĘ4\8\IŐ髜Ú}Óč«LX:ˆoß.âëÌDßߋáóúQŒç2_e§ïÈ`zĆpáp%„G«ù*ó8'ő„xï%Šś^"8Ÿúj ‘ŁŒŸ­æ‹?Łç`?zĆPzÄÄæäę„éÁÁu§8žîżxûnÂGSŒśAŃŸôŒś ÿă Tœ­ŠxO(qśąĄÆÂÁu§žśùېŰ6ś0Ć{K Žđ'jŒ‘/țtŒ/țtŒäFӍ✗đ 4°EĄz^JLIBąôˆ‰mÏ! Ż/ßÒäúűm #~ƒFßxoNíŸ €„w»ÜŻłw™Ífêêêhhh`͚5üńdȚŒy궂΋żż?óæÍC–e^xáțțśżóÔSO9lŁŚÛ#Ć"ëÈŰ'nŹ\čÒÓŐšźgžyŠĂićüÒ"·ĂH·?Ș6·?úÓqĄâl5cf bđă¶ŃȚÿï”GűóđÊ!D ŠxB)„ÇLôŒŁ;Č ”•WylĘ0zÇûsÛÏ{ČuîA*ÎVóìŃŽxé8ŒțŽșϑ g˜Œj(Ł‚9ûe{ÿt’ĂkÏŃwd&…qü“KŒ|)†† g«(Țó#±\0č]Û[œăśnA> xŽ—șnú' Lÿ$êKuĘxž5Ÿlź·Æ2 ç~HČLűÈ B‡:$^ƒ$ËÜśRŒĂ>ÛJŽđ§êL-G7ž§êL-‘>œțČI–‰›Ô“ÚÊ«T_ȘăÂ!Ûü^Ł_ÀÙ/ˑd™ăŸŰ,<ߞ^œȚS@ÿ)œŐ:kô"FsbÛ%uDúàb’z:œëÇLl{€‘ cÔú6·XŹl›û=Ÿ-<ʀIaŒűmt;ß+ŚÏQkč) ÌŸĄR6”ÆìêŐ«jPŃÏÏï– ȘveüüüxèĄ‡űìłÏžzőȘ- Q§U“::ƒû0+;‹ììl<šža6›Yœz5iii”••a4yë­·˜1c†Çêä.ävË”Ž'Ós°ƒŹź+Ü~™}K‹è;*˜ KogÇË? Łlă\xêšŹł}—©Ż©W?ŸȚSæđ{Ôšź”^„Ś¶˜Ò…•”~_MÔšúŒ öő:ź”^ćì—ć žŃ+—Ÿ· œw°Öáx‘ȚÔn«SéíT™ÚÊ:úOêĂč/+ŰùïLęđ.—ŁáԖ6đżż:À„„·;1ä§łhß{„àń‘8Ô€ «Í«ŻŻ§ŸŸ^ˆÖ-B}}=zœƒÁ€UoU­0I’:ŹŃl6“’œÀG}ä±zdeg‘:/•ÂąBŒF#+VŹèźBû 2­F‹F«qČÀÚ§ PšDćxÎßUŒf|~7Zƒ–ȘSWÚVF’%—ûžZ§ìŁïź„śà Ł}óZœúÛßŚpù‡+è|5ê6Ç·–b:Sǐ”>D{pèœó6á™ÒI–ˆI2rdęY.çŐĐó?”Œ3{*è=8}w­Z'ç:öĘŚb)Ú^FÎ+yțÛyîzÖuVáî?žÄË_Ï/7ȚÁOŚîĂ})ŚŽ9«œ5ܔ€Ù»‹ŹV+V‹ŐÁ…šôé ź$ÁÍŁÜŚúúz ^^^ 5©ÇŸXGă7żùÚç«-úL]’’fϞ­ ;ț|țò—żtáșQÚm0_„©r<§ï WŹÔVÖŃ{p”e ˜k­țëN|ü#·M16-ĂUčêjY’ˆx Ü·OáÍmżìIEa-YÏÿ@äH#ŐY’œÒ›Ż:ÌY’ˆiäûg ŠđĂ7D,I„ îF· ŸZZÌœ # ìçKá¶2.«$áč(‡ssźŁw Y’è—LäV#ßź:EÔςŠöušweńUÎ|y™Y è»i<3ŰrêA‹Č•EIWČ…pĘ˜ÍfőȚ+ęÿ:òœßžq#댯śˆëĐl6óú믓––Űș•ŒśȚ{ѶÂȚ…,·KV[ă[œr<çï†î†ÌçèÆólLȍXáGŻÁ\:VÉńJ›ìăȘœF$d$nOîE]•…Ü·O“û¶­«o7ĂÿĄîÓśțÆŰj`Ž72Ł9łŻŒŰIF‡ČGżĂw+ÏóŃGÔuCf„s{r/‡s»V\ĂæÉ5ìXp‚)ÿ;­Ÿńrÿ_ΚŚÀž©ÜE`ŽO“őîÆŸeP2WĘE‹\ˆÎ˜Íf3fKŁ€uäÆLĐz”ûç Ł&q˜L&^xá ę]‡ûśïgÒ€IjœkĘúuzŽ{­V{Ę9Úk,đ‹"Žçü`űÂé?ŐȅoȘé3Üÿp›+Żú|=ĘB ôˆč6ÜaWć<úżńt 1 Ëún†ÿ!œ{„qzg%=űô“(ûè»ixôă1tÓ©ëâ~i€ś0?üĂœÊ»Ś°{p„ÔLćÉ«„óGgĐšć9—ăȘŽún~±ńvÌ”¶—IÜ(Ă~ΰ߻v-v3ŽÓęê˜ó˜‡’,a•Ź#p˜-"v‹ dZ%«ûꚌ?ŸĘ]‡&“‰yóæ©슧§óÊ+Żtjwasna­F둘oOĂńœż+Dyeü雬źĐwŚá‹cLÈU9Êööë4zˆ~(Đć1]íŁŃ+ë”ÌŒŠçăÛÓŻÉïźŽíȘŽŸ=mçÒÜțźq]—¶ÂĘÖŽ Qę,ɶƟcł«í]őž[%‡±/•ÈĄtXNLLl7Śáƍyá…(++#!!”ëÖvșQîoWąÖ^.DZłÿÜŃc śb”ZmY\N.ăŽô ä䓚šŠŃhdÓŠMm~<“ÉÄŽiÓÔ$+VtŰ1ĘAseb:3J» Őh›Xì­ĆmÓ©Ű7^Ù„$h9/.’ÜÄòê(˜Ífîu?Û¶mkóËÎVŚG}Ô„’4ź…ó,»Értp:@ Ìç·íŽôö-ž”™#ÓÌ3aÿ"ÔRZ%`qĐVAûâÉgÀl63räH ‹ ™?Ÿ[û]ćä3+e–juu•éN܅ó(ô " QàŒ}ą»'”l Ź#ő tMńÊÍÍețüùŒùæ›n+Ś~đĘäädVź\)ŹźfĐh5ŰO+%KÂ8#Č{ńJHHp›xeeg‘’œąŸ»mÛ¶6íGÖU \O!b`‚N…łxč#]Țyź.eđĘÂąB233™5k–G,°ü‚|Š‹‹=:‚œÉdąșșšĐĐĐkn§ŽÄ!’8N(zĐƒù¶>Š&ŽźÄ«5éòfł™ Nvv6‰‰‰œ?žĆ‹c0ÈّCjj*%JnžÌ€€$ČČłZ\'…žŰ8 €v hoČČł !00Ÿ}û2bÄòóó¶Ńj]m'‹E,NK#·‰€ÙÏŐVËêŐ«™2e ß~ûm›cʔ)|țùçÈČÌçŸΔ)SÚìXçϟgʔ)œ?Ÿ]ź_KOQRRBŸ>}Ô˜Ś·ß~Ûbń2›ÍdffÒ§O222ˆ‰e{ÖvČČČZ‚ŸMáÉÂV•a6›),*dÆ čæJŸș„„ŸțúkfΜɁ˜2eÊu O?Ÿbéx‹łˆč“N3›ÍŒț§Ś)Ż(§ąą‚]»v”ÉqvîÜÉĉ¶7àS§N±sçN·•ęèŁČsçN*++š©©açΝÔÔÔží]ûŰTk6ì;#FVŹXÁ3Ïú(cǎeǎÛ<úèŁŚĘÆț\vìŰÁŁ>êđ»Čnì۱,]ș”ȘȘ*ő·ȘȘ*æÌ™Ă۱c‰éÜ9s(((P}èà!Àf‰í۱ƒ’’}ôQJJJÔ2 Xžp!wĘuW“ò•c744°zőjîșë..\谍û]í‡Ùl&))‰ŽŽ4ŒF#çϟżińR\…!!!LLššö«ȘȘâÍ7ßlQbÆúőë™|87n$11‘wȚy‡_țò—nčΞdÿțęôéÓGUț… 7ea›L&–,YBŸ>}HMMU]­.ŁŃšZ= $!!‚‚‚f·ă70€§§SrĄ„čóæȘ"f_æŠM›ščyä}#ÉËÏcƌ˜Íf–,YBaQĄjMíûʖ‰©žüÂÂÂÈËÏ#/?°>aìßż_œŃŃŃ|òé'Frvä\ó|śïßOLLŒZŸ=öS§OŸ@ȚßMę«sŐó­§X<¶˜kŹ꫆Œż›˜țűtŐSŁXbîđÜŽ:ŠŃhššj[vd^łf `sËH’ÄŒyó˜3g;vì`ÜžqÛ~ęőŚÜvÛm€M°~ő«_qèĐ!îčçu›cǎ©)Â|đsæÌáÛożU·‘eǧ%IâÀłyófƍ‡ÙbfńąĆŹ^œš;vHyEčú;Ű\0[¶lA’$žzê)ČČČ(..æ©§žàĉÇÛŒi3S§NćwȚ }I:“&ČrćJŐ˜>}:/œôAAA,[¶ŒȘȘ*üęęĘ|ćŃh4m’ë<«qzzúMM‰Čÿ~Țzë-ÖŻ_ۄĄ%źÂk‘àđ}òäÉjÌËłÙŹÆŹîœśȚ&ż+ÖOBBÂ5ëÀÚ”kyqÁ‹ê(űFŁQ°ukm֒œÈ U•:ddd‘‘áPöÖ­[]Ž`b6›ùĂț@FF |đÁ„††b±X\Žš`0XŽhŻŸú*G2Ș8’QŐbа^ IDATìùn-/^ŒAo‹·șzvZ#dm2}[òîêwé܃țóŸÚâ«V­r°èèhUŒę[¶lQĆ)::ÚĄËä_L†9““ă rÎäää8”iĐxęőŚyęőŚŐmÊÊÊ0[Ì8p€… rđàÁ>ÇP^QÎ3Ï<Łź3è <ôĐC,[¶L”ÒŠL™âđyÙČe\Œx±MŹ-héŹÆ&“‰ć˗ó5ÿPcC±1±Œú_Ż^3QĄ=0 ÄÆÄrï}ś:žän–Źì,RSSIOOWÇbLJJR…Ÿÿț€íZ(Bh6›Yœz5 ÄÆÙŒ çϟżaKvőêŐdddšq6«ŐȘŸ˜Ú7BÊˌF֐’’ÂŽiÓŰŒy3»vírhšÄ°s]û‹òśÁdúôéxyy©CčZZC§êȜ““CyE9 .tűmç͘L&üęę‘e™~ęú9ÔCŻÓÓ#ž'NœPŚ»Úl.HûőΟżùæzś@ŻÓ»čBÉ ŒȚ˜†%%%ìȚœ›7ȚxC”.À–˜1wȚÜf]qíĆńăÇŐÏO<ùją‘Ò—íÔ©Sê}0`À5Ë[ț?Ëxúé§ Àd2©âe6›yúé§IKKcíÚ”<ÿüóŁççćç©ÏÍČeËűË_ț‚Á` +;‹‰I]^ołÙLZZšĂoZ­Y–U‹N§Ăb” Óé$ Fƒ——ÉÉÉ€€€ ŐjŃh5j_1!b]„œ‘d Y’U/4Ÿìh5¶gF«Ó6/­Öč/áÓ©b`ożę6`kÀ/_ŸŹ.Š5Šü°kŚ.5Ț¶@tyE9II‰‡v(ÿâƋŚŽuƌ”W”;XB999üêWżâÀìÙł‡ƒČlÙ2>ÿüsțíßțMuśÜ?ûÙÏÔtj…Í›7Ó#ž‡ƒeéIZúЙÍfČČłˆ‹sHź(**jVŒò òYČd q±q„‡‡3sæL”CóöŹí444đæ›o¶»x9»“““ÉÈÈ ))‰’’ŠMŸ@xx8q±qj_¶ôôtŐ:ŒV àÉ'Ÿ >>žaƈŃhà7żù aaa$$$ššJ\lńńńjÆâÀ1 ̟?ŸŒŒ ŒŒŒHJJbbÒDŒFك•ݰzőjÊÊÊŰșu+IIIêòđĂsńâE”ńŃiu¶ÎÌZ­CĂ€ Ë2ČdkŰŹ’Í‚KŚ[œĆKyŃUĆK§UEJ2N§nÓ:fȘ6±kŚ.æÌ™ƒ^ïhùŒ7Nu+țáPŚżđ ,ûó2J/•òïÿțï<üđĂêŸćć<śÜsM¶?a|kÆț»’ęoÿöoüțśżçȑ#<ûìł€-KMÉ“e™††¶nĘȘŠćŽ;?~ŒÚU™ȘđwŒűùùÍË _& €ŃŁGóüƒ9;ylêcő‰‹‹syœÛâŰ7œ-Ą€€„żțőŻdddš‚Ț\Œ*ż Ÿƒßd͚5 `‰I“&1iÒ€6â)6.–ÄÄDőțŒ9ČÉ6Îëțüç?sß}ś©VŰÀč|ù2YÙYŹ[»ŁŃÈ̙3ŐŁÄÄÄ&eű8wêÔ©@cüwÆ L:•É“'sß}śđí·ß’_ÏȘ•«(++#eV ăǍWË|óÍ7yőŐWYŸ|9ûöícÆ Lš4É„‹ő«ŻŸ"11±Ézû7g{áÒ˶fĂEmÄì‘%V#æ ëÂ(ƒ8Û»ŒśČN«CŻŚŁÓëT!Óh4ètșŽ)`m’iűècșü걩ńî»ï’{ÀæRŠŽŽŠŹŹLÍ*ì܃„K—:ÄŒœ·‰ŽŽféÒ„Mƙÿ^zé%țúî_ŐŹÀÁ=xiáK ^~ćeȚ}ś]^~ùe^~ùeÀÖmÙȅÇœü‘ßÿțślÙȅۘX‡ F…UoŻâÏËțÌă?źź›:uȘšIæ ȘȘȘnʒ„FŃȏQŁpćäłï«}|łÿöíÛŚD°bcb™ôóIL|x"ăǍo·žVRb’C꟫„çuaaa.­HçČ”~ZÎeŰŻ7 ̘1ىgÀy߁^ł“w@@À %Ć4Ż“e«ŐŠĆÒè:tv_KÉ„P5ŚoLĐ5Žś\Cc¶ĄV«EŻŚÛțêô6!ûIžÜŐÈ7űȘź<Œfł™††ź^œJMM ŐŐ՘L&*++IKKăđáԖ–¶žBÍqáÂjźÔp[œkś™ÉdâRé%zśê­v8țç?ÿɉ“'8sú ăǏwŰŸWŻ^Œ;öšÛœ8y‚Țœz«q‡K„—šÿÀwšŹšlČŻÙlfϞ=Ü~ûíôéÓ§É9(ß{śêŻŻ/Ƨ‹‰ŽŠvh M&Ÿț9?ûÙÏŹ Wő1›Í.ËpÓ§OgŚź]|ú駈ŸŸĘ»wÇÛûÿoïíăŁ(Ïęÿś>ć‰d %1AŠ 6 VŃršM)UȘŐBP+”–B ÚöÛÖó«DĐóëé9ęZImmç(VÀbEE XM@Jx!O»;óęc™Éìf!ÙÍî&ŚÛŚę ;3;sïîxæșîëŸźhąŁŁ9zô(Ÿ~ö)eŻ•±țŸëœDkƌ\yć• >œŚ^{œŸïőÚŻ‘••Evv6čßÍ%û›ÙRÊ$LĐæ6EÁívëbærčpč](no·’żĄEæÁúęÆŹt‹Gžl6›—šődț "HÀ.mMŠ67æŁ€ ]C°ńăÇë~얖šÎ4ŃÒÚÂĄC‡.űœ999Œ=šQŁFuHł$„Ú8 ‰˜ËćÒÿ­(žč.UiŸÄŚȚ#ÂŐ·1țÆzp†ĆŹÏ“Z,]Ž,–vWbO,8-ĂĦʕ~„K_#‰;wžÿ łh.Û+źž‚!C†pŐUWqÍ5ŚpĂ 7Ź. AÄžöÓd2Ą( fłÙóŚmî0o,ô/Œs„šXi-â4v!üéO:ï1›6m">>ŸzÓś?~Œț4ŐÚÚʙ3ghińoi‘Ú__‹W,°ÈBx4Ń2DȘȘêáöŸscBßÇŚ3jűț;âÁŠB qYń‹/ŸűŒęÈÈÈ8ï1‚~ÿûßlLK|kDæÀÂŁŠÍwu&`"d}_1òȘ@­ûò„OZ`BèHNNæÒK/Ƒă`éÒ„^QˆŻŸúȘŸnȘ  @Ï*ĄU6F!VVVêiB…(tŽq0R„ƒ€A{Їпđ]ăeŒWŒŻAÀ‚8N:ĆąE‹Űčs'‡wœ‚­9Üwß}l۰—_~čS ÌžHїH[&t·Û tÌ #Öż0ZWÁČșŒźđ3 }–3gÎĐÜÜÜíś'''łhŃ"êêê(+/##=ƒąą"È… ihhЏÍÉŹYł(//G+]Čxńb2Ò3(--eöìÙ 8‰'R^Qî•uEè=Ž[ßÒ;Z˜}°JûH ÏŠęîÚoŻgê0Ź $A±ÀșN-„?yyylÜžńœëÀÎeùĂ7ââƋ#>bÀ8(iÍ+”ĐYËë\ĂK04Ąwè̚ò”žŒkœÀ"`  XYyv»= ŠŃłŃśU|ŸŹëÂZ[[Y¶lO=ő$ûśuW…‘––Æüùó™;w.111zœŻšő” ۗ_~Ù㎓5kÖ°zőj6nÜÈ̙3čőÖ[™:uȘŸżĄĄgžy†Ő«Wóӟț”üàú\˜9sžśȚ{™2e ĆĆĆžĘn>țűc–-[Š–N§“{îč‡Ûn»[nč§ÓÉûïżÏÿś3hĐ yäFŽ އü?űàƒlÛ¶”kŚČdɒȚęBșȜ9s‚&`œz`yyy­Öß1ZZšpiÙ8ŽôiÙߙž Ądóë[ôÿá`ȚŒyúŰ`\ÖSëw¶wï^ŠNÊÔ©S™6mûÛß8pàŸ}öv»5k֐ŸŸÏ Aƒ°Ûí8àyŠ\±bS§Nć’K.aêÔ©ìÛ·€_țò—èû6nÜȜ9sX»v-ăÆăškźáĉŒ?^_}șnmȚŒù‚,)Í*ëJ°ˆpahs.—KÏÄát:ijj"55•Ä‹òłÂ{ȝ3öĄîź"Î4œĄlƛüuń2N?ĆáljĆfłTĂÄêôțçjZČÓE‹qŚ]wńÖÛoqĂ 7°aĂEá„—Kk[+N§Ó+ÈŁ§DÀ")ÏÙÿï?~<7Ęt3fÌà”őŻńìČgčùæ›qșœŒóÎ;Œ?žđ /pàÀÒÒÒŰžqŁ~ŽńăÇë.@›ŐŠ ’ÓćÄéròÊ+Żpë­·žșdà)žù /đÊ+ŻpÙe—°}ûv꜏=öX/}‘ÍfŁŒŒœĆ‹S__OJJ ć3·Ÿï ,à۱cçzΏöcŽŒÚÚÚhiiáőŚ_ 'ïF܊Kš4܊‹œŒxúoOărzî—Ëćő0Ôú]œÍjăŻüƒ™3grđàAîżÿ~~0ó8]NêyÜM'Ožä7ȚĐxŠ j,űĂzóæ›o`óû›Ùüțf~ò“ŸPSSĂ AƒŰ¶m›~ŸmÛ¶u(Ÿ’ŒÁ,ZވČò2’’’ÈuäČpáÂnÇ‘ă`oÍ^Vź\©[déé锔”H~đ6ÔL1mXL|4nŐ-MnŐML|4“ŠeqđÀAZZZtÓæP”{Ș»ô8‡?ë+œĂc_xáF€Žà‰'Æ#NMMć±ÇÓ?—?łwîÜč<țűăäææêû/Ÿűb–,YÂ3Ï<Ú5kô㋊Š0 =J+œżłpÁfł±yófČłł©ŹŹ$;;û‚#}Ï·téR~ó›ß0wî\***HIIańâĆ<ôĐCČ†Ì€qŃČ>ŻžÛ]‰șŠžCÜS!ÜĐF6Írśç>TŐîՌëwÉ|ăăăÙ±c‡îœ2eŠž™<‚SXXÈżÿûżSVVÆ€I“Œ,„ 6ű”œâăăÙ°ańńńŸ»îș‹»îș‹;vpêÔ)ŠL™ąó_ÿő_466éÓö=ü‰ŰÖ­[{tÎäädÊËË)Ż(gNȚ )**bęúőtú;ÚÀăv»qč]"Êq! đÜÚÒ cš)­,Ow N9•°&źŸújźŸújÀ­V+3fÌè°?==œÓśœkŸvM 혥C‡2tèЈű΄Ÿ"¶páÂnωqä8š««ăśżÿ=………Lž<™ŒŒ<ž|òIY?f@w%*j‡'iE•䜂7FWĄoú±žÒï,0ĄçôfGgEʧŸç]Žh·ßq;wÎč“ÒÒRÊËËùóŸÿÌŹYłz|țHÄ}ŰYW q! Ÿhs`^‘ŹȘ Š€ÉS˜Đh"6&s EEEŒ5ꌉ€»JæèL¶nĘJII ùùù̞=›çŸ^Ża&űŸ v#&űÒn+ŠÒABF/ĄÄfłńî{ï2nÜ8òóóÉ™Đpű 0sæLnŸùf***HOOïŚÖ ?=ûß's`‚7țîU ÌtDpæÀÔ9Aè ÉÉÉìÚ”‹””rč:tšK™ì/äü[·nŐ3æ‹5Ö9â}| æÜčX`BŸ 99™Čò2rčŒ7Žșșș€‡ÁϚ5‹éÓ§ëóûł5æ[.^CæÀ„Žx,sç=Łv3śvPiœŚÂGŽƒ‚‚êëëÉÎÎÊ5ìv;ćććŹ\č€Ùłgăp8úU^Em ò'b niÒŒšjp"ö$dȚïœŰ“7GR_!8„Û=°téR=‹}0ëȘ͚5‹ÚÚZrrrtklŐȘUA»^€êŹÒÂŻiÇ “90ăFż]&ô]^}őU†Naa!999A[ŒŹYcÆč±ÇŒËŐ€ûZ…] ·q>SBż GˆXÂÍúÒ°ÙllzÓ§Oș{ÏhUVV’’’BIIIPŻnhśBšĘUÒÂŻùÈ谀Y`ÆÁL,0!ÔdŽÎ€žž˜üü|nżęvÊË/Ź–Ű…âkćççóÜsϱ|Ćr2GgőÚĄÂߘqŸhs`&“)àœęź „ĐX°`YYYTTTôšE€YcyyyTVV2&s K–,éł5Ç|ÿßő|‹ŽđkțW‚ÉÄ!t™HŽŹ7lŰ@zz:ùùù̜9łWæŠìv;+VŹàțûïgúôézrà„+úLÍ1Ż yŸ(DA0ąQÀdLž`"Éâ¶ÛíüùÏÚ+gś“&MąźźŽĆ‹S__ß/jŽ)Ș[š4ŻŠ=űcܐLB·ˆ$›5k댯§ŽŽ”’’’€ćKì Zrà{ïœŚ«æXAAüă#șæ˜É܁šĘ2&œ‹°œ„pgÙČe$%%‘ŸŸ H«9VV^FFzEEE >œ’’’ˆŸó àB‘&ͧ…± џą†:[„ŽàfáđęÍ}Ś…#6›„+€Țw%qä8šȘźąžž€üü|†Q‹ ;›ÿp«niÒŒšÄŃYú±žpÁŁŽżPHßmRažïŃŰŰÈŠM›>|8Đț›G’+ёăĐŚj…r–ÍfcÁ‚ÔÖÖê©ŻfϞÍȌ‘”W7Ü?xqšĄŸs‘^Í_đW Ö‚uû,&łÉÓ Șš••ÀșuëBn-H l[·nßÿțśÛĆëìH0žŹ‚Ć‹/ŸHRR………!Ï_h·ÛYșt)§Ną  €šÚrč <8ì]‹ę֊ü'ÿùü§É—qŹ$`Ƌ›MfO3›1[ÌX,ŠM›@II «V­KŹĐŰŰÈȘU«t‹%''łÙó{›MĆ+Ü]‰v»] œ?~š»tČúúzĘ”ždɒ mghżżńAVQÜÒ€y”`ź3©țì»Np»ĘžĘnZ[[imm„©©‰ÆÆFNŸ>­·uëÖńÜsÏ­ĂBèžśȚ{™9s& $$$πˆ%::«ŐŠŐjKlâĉTVVòá‡-Wbwihhàá‡ŠŽŽ”úúzòòòžÿțûCÒWUUq»Ęž\.œN'­­­477ÓÜÜLSSMÍM<űÀƒ|ôŃGüځ‚^ïŸȚ<{Ś«TżłmÛ¶K\\qqqDGGcłÙz4nt+Œ^3M&“n}Ùl6l6‡ƒ)SŠđÖ[o±sçNę= “B`ŽŹ&L˜ÀŽiÓ°ÛíúïŹĘtfKdč5–ŻXΘÌ1äÍÎcoÍȚPwÇ Í"ûăÿÈêŐ«yűw1+--%#=ƒ»îŸ‹x lŠiç3d!łp.•…^ă‚L.‹ĆâÄ,V}@‹ŽŽÆét2`Àțíßț©S§ârčP„C$›žƒ3Ž“èèhbbbˆŽŽ&** «Őêq!šÍX̖ ű¶ƒMæèL (**êő”a]Ćfł1kÖ,f͚Eőîjžzò)ŠŠŠ(,,€°°ŹŹ,~ń‹_pĂ 7„,ûœżTR‚`Dśƒ1F\ QUU\.—îJhniŠ„č…3gÎx\ gĘ ÍMÍŽ¶¶êlj€Eșem6c±Z°Z<&ŃŃŃșé§»cbbˆ‰‰ŃEÍb±„ú#t™††ÒÓÓš­­ ‹æ\8N6Œ”‡ś0•••úvÍ2»ęŽÛ–<űđáĂŒóÎ;Üz뭘Ífż.ÄææfZZZ(((àŁ>â±}śäÚBßaùĘì~śÛ·o'6.–Ű˜ŰĐčOèšő…ą((ŠçéËlòž5±Ó ĕîx ŰY+;**Êc…ĆÆè‚„č-‹Ś{" - #??Ÿ‡~˜„K—†șKçĆfłáÈqàÈńT^ż~œžeDłÌÀlsśĘw3ᚠĘŽ]Ÿìböìـ'›ÉÏțsźŸúj cDYkk+ Iń(ȘžoÔ ź»` L*—ËE[[mmm477ëOeZ€‡Óéô0ăû…đĘH0ŁQ±Ű˜XĘ­š ™v|€čFfŒ€Š¶†ȘêȘˆ-}ąYfeŻ•±țŸë©©­ńڟ““Cvv6ŚNș–ŽŽŽ.}Β’òóóœ¶]4è"~zßOčí¶Û8p n}ś»ß„ŸŸžGjæôs ‘ÏÊżÉžśČcÇââ∉‰Ńżzj]€A{D’ą(8NœN'---șkA5§Ó©G-Š 1r0ZŰf‹Y·Č5K[›Ӛf…i‰lÙȅɓ'“““ôșaœECC›?ŰLÙkelȚŒÙËĘš‘‘žÁÈËG2cÆ .șè"&\3@7fdìŰ±ÌŸ?ŸqăÆqóÍ7S__Ïąœwç ËȘ{Țæóp0Łærčp»Ę8N]ž4ëKQ/3žC?Œ&ŸÄa6›="e”`ł¶ ™ŐjŐĆK;.­/ ‡ĂAEEeće}Šä‰/Ő»«ÙđæöìÙĂîĘ»©šš8çń—]vûöíëÒčcbbhiiáw{çą«BâîÙÈȚśŸäă?ÖçÍ%`ƚÓ\MÚE”ÁËl6c”Y‰rE銚 ȘÒ1ŸžžEÌhYéQ§gƒ5Œ‘ˆ‘.^O,}‚1™cȟŸvaő"stfŚĄÓ逊¶†ęûśSł·†úúz6oȚ p^3ÒÒÒ s`BŻÒ­u`ț&ìuSŹž­íV—QÀ„È@1łI“ŚšŐjőšïŠÔy/_"!Ź>Űl¶vaËńȚ§Y„çc۰aœ>}š3gΠÊ·p|9z:vt»˜QÄL&ȘȘb6›œ\ŒŸV—ˆXűă›iÜŚÂ6Z\}Áò2òèŁêëŹî»ïŸˆźŐLčńÆùȚśŸÇW\ŐjĆáppæÌY&tÀwX njŽ4Š˜ą(șwÄĄˆXdàŻÊxg^ńĘ֗°Û퓟ŸÏÓO?Ęoʰźđo|ƒ;o}ë[€ŠŠê©äZZZtś!ôÏLÇś5rđƒcŒù~ Ńń6ęőˆoæąËâimtR” í[CBĘĘŒ1żÇ™”AÌb±èâ€Y_F7ŁWäp.!ó·ż/qß}śQXXH~~>wȚygD,nwß}7‹/f„ ^ ™ÛÚÚôcŽ‡ŰŽŽ4šÚΠöC ìÀû_óæc;žtÒED °èݧęnƒÒâh<ÚÌK¶“~]2©Ś%…ș»œŽ1} é±€ń'fBäӗË›Íq‹›ƒĆŹYł€ö„3Ÿï ›ÍFóé–~éBęęá\2y —Ä šŠțzÀPÏë„Kbűń?o"*ȚÚ/żŸ°¶À:Ł? zBßBłÂŠŠŠxôŃGû”vĄôGą-ȚDb|, ąà6Œö|&$Š·żîošó§ =ъ  ˜ D*6›„+Èuäö{+ì|ű΍JŠĄ3‚Q3PLüàÈq‘žAQQżùÍoB–í=Òès`ÂčQ#х(‘Nń“Ćä:r™;wnŸI1HŽÚNF‚˜à‹˜ ô:šVQQAőîê°HôÛĐĐÀáșĂd€g`łÙôŚÉÓ±Ûízf {‚œWŹFßù U2q>hń|FWs ˆŹú‚ĐË?Y À qO<,_î©$­e›Ś^/_Ÿ€šÚÆdŽaîÜàe…śˆŒ,0U•&Í«ufBÌÄ„snVXÆÈ rrr°'Űœ^gŒÌÀž`ŚK§„”FÙ çĂ[ÀBVLú#Ő»«“9ŠO•[čŽu`Zć ­æ_kk+-­-Ž”¶1oȚ<>űà~úńuĄîźš/Sæ IDATfT,šæàûÇűìłÏˆŠŠÒ3Ńk明Äàœ’^ú™Ł3ÉÉÉ +,œ‘dŸB‚h#‰€ BĐÊ­<°đ~i… c^LUąŒò„Eź 0Aèb…y„Ê_J)#ČLèˆX`‚rúłÖÙü„Ùdö‰Bühë DÀĄËˆæ?QąĐ›ˆ€ ÂП­0#­ąà‹èn6™;Xì=EL.±ÂŒń­Č+QˆBGdL±Â:G\ˆ‚/š|ŁÄ–˜ \ b…yăíB”Œ‚/b BX!V˜ÿ䏅(tÀ _¶ÂDÀĄˆ֎wxŽX`‚7Z=0q! BŃ_­0cE]ß ±À„ź(1„n"V˜łÉP•IæÀ_:č'ŒBĘELz@”ÂLfÿĆ % QđĆ…èą–"`‚Đú»f2›0–S±À_$ Q–țj…iHœ*DÀĄ‡ôw+ ™8$ˆCđA{š F2ßžÏą ‚ÀKŸà…„ž'œ‡Ùì/·*MšOkGց BÒ_ʰó @âB:Œ{BL„6öœï~œ5{Cʝ &œŁ+±§ĄôâB„ĄYa5”5”WôĘ`“Éäœöˀ«I!ô.+iáÒ\M G>jbĈ^śL ր˜ m.,~~ˆ{8ș2oqă7pđő&TiÒPUÏę0wî\ p„ߛȘŰü‚P”•—áÈq„ș;Áívăv»qč\8NÚÚÚp:8N\.­­­\yć•D 4“yw—N‹Ć6@žû+Î3 _ŒÙLőó§i;„PU]ElL,V«•šš(l6QQQX­VÌf3‹„["`‚`>LJJ é}f.ÌívŁ(JkkkĂćrĄ( ˗/çŃG uW…0cŃąEÜuŚ]X­V]žl66› «ŐŠĆbÁlî^„f0A .€šššÏXaFsč\ȚævĄžEĄ­­—^z‰·ß~Û+mP02‘ áƒ&#ÆżS§NćŽ;î ** ‹Ő‚Őâ_ÀÌfł˜ „ 8€€$êêê°ÙlĄîRPUUw!șĘnœN'­m­žœ.ʍšȘȘ>€™L&Ï d6ékĆDÄú&Úïźš ȘröߊgA»ö»k֗ŐfĆf”éf±X°Z­ĘŸ7$Œ^‚€Ęn§  €ąą"ž~úi,Xê.łÙŒą(˜L&,f ŠYń“â·š„X_}ĆÜț››đˆ‘Ùä'MšŹ«ŽšùQ±À!ˆ8N†N}}=§NÂn·‡șKĘÆh…Ăê5ëK äЄÍßĐ"ó`}‹Î~cíGs/[-áČÙl^ąÖë DÀ!蔔”ŸŸOAAK—. uwz„ÌĄ‰˜BŻoSÜšJû$ŸöźŸń7Öțš-f,f‹ŸÎËžæKŸ„đgdÆHjjkšȘźŠèDżšfŽÆŒÌíÖ­/Zú'ÆÊ˚Xi-â"`‚Đ+”W”“ëÈ%'''â‹^ELkšpL;VèűZ`š€ĆÌè^ „U.&œ„–bêĂ?dÒ€IĄîNĐƒ6|„Źłù/fú6Ÿbä+TÆ @‰ˆ€ BŻQœ»š1™cúTŠ)ăąUÙŒsaBÿÀw—QžŒŻÄ¶ B/‘9:“‚‚jjk()) uw‚æÒț-ôo|łÍûZ]ŸGÄ„^€ĄĄôôtjkk#:ŹŒçĂŽŚŸÛ„ț…&RÆ›@Î{y]KLz—ŸVï/ĂžÌŚ­ŰÙ9„È€3!ò”žŒkœ‚!d"`‚"9ŹȚ7”ȚBßÚÚÊČeËxê©'Ùżÿ@š»*„ˆŽŽ4æÏŸÏÜčs‰‰‰ńȘùˆÌ"`‚¶lÙÂäɓÉÊÊbëÖ­ĄîN—ńÍÆa̍ű·żęßțö·ú±Ù߉ìHKĄûl~}‹țï?üá̛7OOâk\&ëÀ!B™3g„„„GLžDm—VVEKêÛÔÔDjj*‰ äg…ś;gìBĘ]!Dœi8Cي7ùëâeœ<~ŠĂ‡«—P ”ˆ‰€ BˆˆŽ€c)ceæ¶¶6ž}öY-ZÄÿYZÀçßêź aÂKOźćżńŰcqïOï%:*Ú«˜æVì."`‚BŽ€ŽHÈĐáOŒZ[[iiiáÇ?ț1›6mâÍcŻ0 !.Ô]„3§›˜6x&#RG°ùęÍDEEé͘±»H9A! ,àčçžŁąą‚òŠr9ŽPwÉ/ŸŃ†z=°łBæv»ˆ‰Æ­șCÜ[!\ˆ‰fÒŽ,¶ŒYIKK‹Äa”Zq»Ę˜LŠ%{„łvíZRRR˜“7'ì _ú–RŃŹ0͑ăÆâ á‡çȚpșœŰ\žb–.—KŻ/ŚDÀ!Ä$''ë…/ïčçVŹXê.ùĆ7yŻÓŐniëŸüłú7êYkkmĂf”降ù4»ëF„0@s%–––2}útf͚ê.ya\ŽŹÍ…)îvWąn)â>ŒŃl,Írś-»ĘŻ'&a‚æJŒÿțû™>}zXF%ËŠžÜ.}PҟŠĆ…(tÀsohK/ŽûE[Oè›?ńB„0ÁèJüö·ż¶ œuWąÒ±ț—ž_ŒźBßôc=ELˆ đê«ŻRQQAIIIX,pöWëËw>LC\ˆ‚/Ú˜W$«êżn܅"&aƋ/ŸHzzșÇ›öí°Í•èor#&űÒn+ŠÒÁJ‰€ œJCC‡ë“‘ž’pqíúœ- N§“šÚì v’““;ìŻȚ]­ïłÛíŹ_żžÉ“'sʔëÂ.Ž^{zöżOæÀoüĘ)Ș˜üRĐRèU–/_ΘÌ1ÔÔÖtù=‡ƒòŠžg©™1’2&sLÏuĄÔÔÖ0&s ăÆŁĄĄĄĂț1™c˜;wźțzÒ€I,^Œ˜úúzfÌ˜Ń›]íŠȘH“æŐ‚™ìI,0!쩚šđ â9Ę?‡f­\č’éÓ§źsH}}=·ß~{—ÒF-ZŽHŸ[žpaXŐó-Ż!s`BG<f6Ț^ L)Ő»«u‹€zw”—„ćt:©Ț] Àž={šȚ]ÓéÔś744°jŐȘńœ Œû^œZßßŰŰèuìȘU«())áđáĂ~ûžeËÊ+ÊęZNÆę]!))IOŐ6oȚLRREEE±B6ù1·4i^M58{2ïś^ èÙá“9†ùóçăp8“9†\G.ƒæđáĂșÛ  ššHw=644°páBÈìÙł8p sæÌŃhLæ–/_ÎȘU«HOOgțüù̞=€Ùłg3wî\œN§~ÍÙłg“ŸŸOJJ «V­ÒûVRRÂȌ‘Lž<™\Gź~òŠrŻę#3FRRRrÎÏ[PP@Fzsòæx‰qgŰl6víÚ@ź#·S‘ Bíź’~MĂű c2Š"ł˜rJKK™1cmmm|űá‡ÔŚŚóśżÿÌљșÿŒžžUUɝÉúőë)**"++‹Șê*rrr(--挿ț”~Îüü|žțyV”ź`ǎTUWPU]Eyy9«WŻŠąąB?o[[é<ü»‡ć–ŸŸÏ ‹QU]EUuIII”––êVᜌ9ș[Čžž˜“§N’ŸŸN‘IJJ⟯ę“úúzîčçž.}?ÉÉɔ•—0nÜž°1-9«†[uI“æŐdLèÓ$%%éë&MšDNN›7oîôűÇœ€€$Š‹‹xbé<öècæ•^|ńĆNłYLŸ>Șê*2Ggât:yúé§9yê$őőőlțÀsę”kŚêQƒ”””,_Ÿđž ëëë)((`Â5ÈÊÊbòäÉŒóÎ;çL•9:“Ć‹SXXÈęśßÏ€IçŻ\ìÈq苜ŻÿÖőTUW…Udąöt­ s`Âč ä\˜˜rČČČŒ^gggw*` TVV0yòäû5ë$''眩˜ŽPuMűêëëIJJÒśŻXîIšk y·ÛíșĐ.YČđž6‹ŠŠŒÎœ~ęúóæ2|èĄ‡xáù˜>}:uuuçŃaÿ!C©»5ńr:Ü~ÇílxkƒŸ-;;›1™cšȘȘÒCń?Úò™Ł3ɝÉțęû“9†żÿęï]úœ“&M"//݃w>–.]JVV•••dggw)$ĐxMÈKąŽs4ULèÏäääPTT„ĂáàđáĂü|țÏ©ŻŻ'**Љ'’Mee%‹/îrwmqpzz: .$**JßwÏ=ś9:“€€$rč8†ꋿ€I“°ÛíäääPXXÈàÁƒ™3gčŽ\’’’xèĄ‡șüٖ-[æćșì*›7očˆùCQĘÒ€y5-ˆ#ĐîCz™Œ‘žù©łn¶œœČłłœŽÉÎÎöÚöìłÏ’——§żÎI[[+WźäÄńŒ=šČò2î»ï>ęœŸŰì^ŚœïŸûXŒx1‰Ùœ{7‹/æĐĄCäääèîĂcǎéŃ—]v+WźdûŽíú9ËËË©Șź"//?űĆ‹łkŚ.ż.=íú#3Œ¶Ûl6ÖŻ_ïś{86›-ä"f2·G jƒ“[qK“æŐŒî™‹˜I fŒŁ Agá…‘””Äź]»üæZì zę/—‹¶¶6Z[[innŠ©č‰Š3M455ń‹_ü‚­[·Rrűwœv(){ü}öU~Éü•wxm>gŽ7sßó·a”YÎ{Œ?žœęż\–u 还đ~‡OÎț_>Ęű9}ô ..ŽŰžXbącˆŠŠÂj”b”Z„ „ ôGŒăƍcEé 9Ž ]Żłù/·ÚwąOœáӍŸsŒî$‡%Đrș•țáYX~đ“:R' Ś癭$HìÒwđéÆÏ”O}_ăíB €&.DAè,]ș”Čò2êëëÉuäêațœWGÌčȘMžy4‡ȘŸÒ·}úæ^ĆSùOőí'êNqúD#xE—Î œ­‹úÏÙ[s`F”LLúއ"))‰ÂÂBGĐæĆ:{ŠVúĐÉWy–bTœU«oûtC-©ă“=5Ï6ŽoßûáA2ź»Dßvdï1^Yôÿ1ćȘ6Öât:ő}à±KŽì=Æ_ó^æŻy/S”±öŒ}ŠÄÿ4ù2›ÍČL„ÎINNŠźźŽììl***>|8댯ïR¶ Ćlò H&sûUEé;.1“RÇ%óن}Ìxä[ìȚžŸ)sÇ38m •Żü‹ŠSÍÄ$DQőæ>Ć38} ŠâfĘ#ïòîłÛ’šDKC+łš„Ań<đú,^@Ő;5TM­áúčßà@ełš!©Iü朻Bù±ƒ€€’Ą‹Űl6¶nĘʒ%K(,,dòäÉäääœ3”VW9ߎæë+dNKŁâńÍ454ÓđŐNŸhdìôtìC°żòŁŠŽ úęŒŸa„țù·żRMü Üśâ-Ä'ĆòŃȘOyăńšùàKźŸùręüÿߖŸ0p˜ç\Żęœ•eìß~ˆ†őț‡ ­ „5&.DAèŁ,ZވC‡‘••EEEééé^Ùö…q>#ԋfĘF^ŸÀțm‡ÙûțAâ `p†š CR/bû+»9q€ÆguÓÜŰQçy}Ă>}}/[V}‚ŠBŹ=šê·öŁàč㆓0,FżÖš›.`Ï»Cțčٌ* œ~ïôl‚ „ÉÉÉlĘșUO|<{ölFfŒìrm±’’’N렁ÿTR}© »ò"Ÿűű(Uoàòë/ŐśșéRöŒs}[<ù7S݆ą*Ô<À±Ú“Tœq@o„Ú9sŒ-ĘVlbŽŚ”ąâ=±ŻkN†üsČÉBfAzĂ š­­„  €šÚœ~YyEù9=òóóILLäÁäôéÓ~é«QˆŠêÆdUčtÜ0Ș7`ś»ûuÓ%úŸ±3Òi6mÆćtńȚVsŒöôÙïXՏѼ»kćA?ߙÇòI»îböm:žőu^û}ÏŽ&É|A7ŽÚN^ÙèƒűŸ%ÎDÚőI ›@ÚőI((ìßt”+°êûRœźë3Żț|”ì!f ©ÿ~§4±vȚVZÛôśŒńÛń»¶*;VìcyîfțçÖ-ÙyŠ˜D+Gțuœó>ÄćrĄ đÉȘ/xöÛÙęOObߍÿÿ§9–ńy©4l&:ÁÊŹőÉYzĂÆàÔÁ3šȘ›Ëż .1–źŸ†Yë'ò?Œ êćC čjq‰±ì?{ț#ŸÔż“Ă•ÇQU7{^;B\b,CźÀ—§éd33žšÀwŸËwŸË씓i:ÙìŐÇK>ç–çÇ3kęDâ†xf|TT6ęç*~ł“ńy©dÿ:“Eíű77ęÇ(šN6óúŻ>=»Ï­Ÿ+˜ż™§”ß+ź &s`‚ \Ÿ‘w=°ȚI­ȘȘŠŚ”†„=͓)Țd51o獯=Îż}ÁîőžÒ0-'úûR§ Ád5Ąš*ßüu:;Kpùś†êç˜úŰ(țç–-(ȘÊéŁ-œűâ4©S†°oC{†’è+Ț=΄ŸàòéCù|ęQUćàŠă€NńDśxś8éŽ!|ś8—OśœÏ?—CJvąȚ{Z,q‰1ì^w”t‡çœăóRőÏ„±őÉ}4l`҃i~皛PQU/‹ăڟgđŃS5ÙyŠš«ßï18ű? ÄL,0A†Š;èÍsŐëőć3†xłí/ûùËű·)żÿSą-ŒË»Ôë}èŻŒÏh1l;;O„ÂńÏh9ćäÀ»őzłˆ&z ç=éŽ$šN¶pb_#Ț­gÄőƒqę Ÿxÿ8gŸjæÄ§Iw$Ąâæèź.‰éđÙ.‰áëOOëę±ˆîĐÇŠ“-úçÙXžçߕȘś_ĆÍžŸ 'ńÒxÊïÿ”ÖÓÎßcđ~/o“L‚ „c™ÙdÆd6ùX`œŃŠąz]ËűÚÙèfëSû1e09%™Ô–Őw8NőÓ_Żę†żĂ&Æ06o8éčIúń”eőŽ6žPT…ÁWĆ—Îż}ÁÉ/~mMżoáăg—Ăà«âPT…Ëż7„­OíĂŐæÂ|¶ ‹âT8úŻ“\5ëRCŐ}œűóËžúg)ޜtČg}Wüèb†\ïś;ÒúŻš &+|§h4/ÎÜÆÛÿŸ§ÓóMŸ:łÚ{‚X`‚  UQ‚Țàlô\'ŻìÊźąSì*:ž áÄąE‹°Ym€ÿl=‰L L„óâv»Q—Ë…ËćÒ-°¶¶6\nŠ[AQÚÚÚxé„—xûí·œȘ`d"ÂMFŒ§NÊwÜATT««ĆȘ[^6› ›ÍŠ[`fłč[śˆ˜ çEUUʅèv»q:Ž¶”ârșt7ąȘȘúf2™<ƒ’ÙđèxBű ęîŠȘ *gÿ­xÖjż»Őê/«ÍŠÍjÓÌb±`”Z»}oˆ Q„.c6›Q“É„ĆlA1+ž'h‹Ć펌žÆPÌ štč(D>Fń2>ĘL&̖v ËlòÌwY,ꘞ &B—0Î_hnłĆŒUő #.\ú fDUTLf“Ô ëĂhIœ.c“É„ÉìyбZ­XŹ]ÈL&S·7Œˆ€ ‚p^4ŃRUU|Eé0śĄ˜żB%ÖWßF1·ÿæ&<ąd6yrŽy.«ĆêČłÂˆùQ0AșŒ&^V«śđĄč5aó7œ.ó`} í7¶˜,ú6żVșĆȘÏwĂæ%‡ œ‚Ń 3țŐ&áł‚[qŁ*í“ű€n” }ăoŹę5[ÌXÌ]°zșæË"`‚ \Æ'g“É„ą(șőev›uëKœû'ÆčR‹ĆÒn‰/= Ł›ĄóFDÀAè2ÚÀى–q 2ZfŸscBßÇŚ3jűț;âČL„n m滎ő?țŹ/fú6Ÿbä+TÆ @‰ˆ€ ‚ĐŒ‹Vęecúț,1ÀËí°k‰€ ‚ĐSŒ™ï6Ąá+XÆmż–˜ F†Ą7"O%ˆC„€#aóBo ËăA„ˆDLAˆHDÀA„ˆDLAˆHDÀA„ˆDLAˆHDÀA„ˆDLAˆHDÀA„ˆDLAˆHDÀA„ˆDLAˆHDÀA„ˆäÿ„K±j&9IENDźB`‚passenger-4.0.37/doc/images/passenger_architecture.png000644 000765 000024 00000115514 12233035540 023474 0ustar00honglistaff000000 000000 ‰PNG  IHDRĄ,ódjĆsBIT|dˆ pHYs Ś ŚB(›xtEXtSoftwarewww.inkscape.org›î< IDATxœìwxUۇïíéœĄś.ˆH»€XÄ^°śŚ†ŠŠß«ŸbÇP,ˆ ÒTŠôȚ[„ôȚ“ÍÖùțXvČe6 JàÜŚ5ŚîÎ9sæÌîìÌožó<ÏQI’$!@ œAÔg»@ ‚ íÙî€@p*CŸàBA„Rí.AŁ"Dš Ip*bSUÁčLCĆ„Òy,„©@ hÊš„Ošà\ĆŚ©Yß)+NiASŠ!ÂÒW!JASBXBçJÒu]}ćASçD-žźeÎm…Ma œxž†JÂӗ§°à|ÆSP:?{ŸÖUW ÎE„%TpVń%>•^}•)”#œ( L„W_âSXFÁčŒĄ‚łBCħëâčNi„v‚ŠH}âÓUxș~–$Iq[!FÁčˆĄ‚3N]CížâłŸE© „ęç:u „Ś%<Őj”Wy]bTQ@pź DšàŒâK€z.v»ĘíŐó}C…š@Đ©Ëúé)>ív»›uŸśŐŠąà\AˆPÁĂS€Ö'>‹ósa„™ĘYŐäWX(5Z)­¶Qjt,f›Ÿ‚ЉF­"ÔOM˜żF~ ÔĐ!֏ž`­Ońéúê\\‡ä]…©+JĂö@p6Ńń‚3B]ĂîJÂÓč€ٞQĆöÌjÒKÌgó‚3NT †źqzșÆHŽĐŁV»‹N„EŁŃ( UÏá|'BŒ ‚ł…Ą‚ÓŽ/ê)>m6›üș)­‚ù»JÈ-·œÍź ç !C[ûqq ?ôZ›èt OÏWO+©Z­đ)HàL"DšàŽą$@•,Ÿ6› ›ÍÆțœ*~ĘVDZ±°z JDű«žČžî Y€ș.Z­ÖMŒș R%ßRBT œ„œ6ê ź–Ï‚òŸßXÀźlŁÏöT@Xp‘aĄűôôzüô: :=zpo4M,V&ł“ĆBÙŒÉlĄžŒœąČrìvߗçÄ`#:èiГçsqŁžBTÉ*êú*g !B§…†Pçr0·’ÏVçS^cójG„RJlD81atș3zÁÙÂjłQPRF~q yĆ%ŰìvŻ::5\ßVE·8:­V+ż*‰R„!zBT œ„4:JQđJÔj”ČêP)ł6aU°űÄF„ÓźE3‚üęÏdś‚sŽł™”Œ,Čò Ӑ]œ qyČœÎ!F]O1ȘdJàl Dš Ńńï*@-+?mÎ篃ć^ۇŃŸeáÁAgșëÁ9Me”‘ƒéä—z•” ”3Č­D ŸœȚ±èt:ôzœ›…ÔuˆŸŸÈy@ 8*hT"@­V+?oÎgÙoÚșY풚én MŠŹüBö9êć3šleT[~zœĂńW§ u”Œú X!DÁ™ADsN+źBÔ)@ÿM)ő šnmZq–z*4cąôścÛÁLæÚ4fG+ŽŹ8fepłjŻÆ\ń57œHb/Î$B„ †XASòȘű~S‘ÛvœŽ‹:”'8 àlt[ h’„1 [g¶ì?DyU”Œ~{‘aș șF» ŃúŠu­#Äš@ 8*8-ž#9hQ…‰ÏVç»!©Őjzwh'š@pôzútjÏș{©1ŚæÖ]•D°Š”á”VĐșDšÓ êDĐŠ‹đ°;9ÿ—êłĘÁù’ÔÓ:{[!ei˜șŽnIhPàÙèČ@p^`ĐéèŐĄ­œśÀ.©XHUu5FŁŁŃHMM fłłÙŒŐj•ÿQOń"Ä̙Çóúy2‹àüć|©yEĆۏßTŒv{ËüèŠ6ú Îőv»]€i: ( Éú\„k„àTP˜uęŸÏŠ =·î˜‚&K]VĐù»ĘkG††z–zÚ8ì\5Ÿ‚ÌÚĄÏòâ<önXJŚŚžĆ^y łŽČ}5ƒoz“±’òâ<č|Ńô7žíùÏäÏĆùT”äŁ3œü,X!‘qDÄ·„PòÄßÏ@R|,iÙčòșC5QŽ6ŠÊąSi%›Í&‹Q§őSXAOș„€ÒûúÊČÁ…‡ŻÿšçzχK_ÿï°§ŠĄ‚FCIˆæ•›8Vbq«Śá<†ß°h*”éűœȚÎh­ź(„șŒ˜šÄVŠć“‘Ò‚lŒ•e…E“ˆZ­ńٞ$I”äŠcŹ*#,Ё!uçZ-+ÌÁf1ËBN ›ŐBAæa ț„ÇúțœvŹú€ƒG*–Ż™?aăž!șYë:ûä€$?ÿÀüC|Öčÿÿ~iP[V‹™‚ÌTą’OIô65Ú4K +ż‹ŐhFKf•ŽdŃK„j”ZŹVkĂòBŒž Ÿž.LŸÊÒŠ@PŸ˜ô̌á|_Śç™ŁB„ N „‹Ł«%t{F•[yxp!M;ŸŹ0‡}CÜ.șœȘČbÒleçżP]QB@pž\wÁWݱhúÜśÖÏŹ_űû6,E’$"â[pï›?ÒșÛ%rę·ïêKúmŰí”Ytz?.čáF<ôÁaòúÊÒB|ù*ë~‡ĆT|ÒeÀ”<òțŻ~ç„â‡ÿ{€ŒƒÛhȚŸ'ȚKd|KčNAF*ł?xŠœë–È} ‰à† o2hôC^Ą+' 8Œvœ‡xíO­ŃbłZűăËWžśÍëüNîÙÈ7ŻŽŁ ó0*”šöœ/cđè‡űò…›ž|ìSÜüäû€cűß9ÿéZZžƒ[WđÁCCžòŽçŃhu,Ÿ5‹ÉˆV§gôïqÙ-°jÎgüôî#\uŚ‹Œ|űÿűćœÇY1ûîš4ƒ‹ŻčŁÎ>Ÿ«èŽZâŁ"IÏ͗Śe›ƒˆ3æÊÓw*͠䌐w˟ +ÈùFCŹžÂłŸÏJí)}\žÔgőTJÏæùčĄ–ŃÆŸ*8e”Ò@8‡âweĘêÆF„ûh„é°qÉČ@»èŠ1T–‘~`+Vł‰-ËaЍ·û~òœXL5ű†`Ź,Ł8ç>2Œ7犝@D7kMdB2·SQ’ÏȘ9Ÿa1čă•o‡Oê{ $7í€Ü~lR;ʋóÜÜ\yÿĄË°ÔQ«5Űí62ngÎGÏòàÛs(/Êćí»ûQU^ @ËNQV˜CI~&?œûUćĆ\sÏDčœŠ’ïZËEWŒAŁŐyíï’ëïfÍïÓŰČìgźŒăyš”íźŰŻČÂ>|ärLFÇ‹Á?ˆCÛV‘¶w“_ nVɊ©ș­Ț8,ążŸÿú '¶E{ßô06ÿÍösY6ó]ș Œžšê Vțú©ÜïŠ*@ÄF„»‰ĐBÂ1Ö€ÉÔu^yN'ÿ_>ą‚×@T—'’JǗ Uú,žpńeőtŸÖ7Q…§­KŒ6¶"TĐhxƗW›9Rä>sˆPçPŒV§§ÇeŁš©Ș`Ț§Ï#IÍô)BĂc›óĐ{ó ‹Jà—)łnÁ·XLF–ÿđ7?őÏM[Cb›źò6Vł‰Śnî@QN›–țÈű—§ŁR«YțĂ{ČmÓăRniq-;`·Ye+­'ɝûqûËÓĐhuŒ~kgjȘÊÙżqč\>ÿó‰Čœ{ÒLú]3Énç{.&mßfę&—ŽžO4ÚőïHv;=†ŒRÜ_ÇŸĂ(Ê>ÊțMńûÔyôĂÊőțš5E }źž•Û_úŠÊČ"Ÿxn™);·© K‘ûÿïzÍ/ï=ÎȘ9Ÿa·Û8°ùob[Ž`üÄŻ9v`+Ć9ÇűvÒ˜kȘ‘$‰„Vóܧ'ŒÏsˆĐŽ V›ăaÉąÒS`2`Đ›š©©‘ç•·X,rÎPŚ|ĄÎEXAë§!Ă힋«ŐYiœ$ITÛ ©Žçc” ©– ©‘J‘${íŸÎìa Î1T€žüUšąńWE€ŠE„r.8u„lóŽ”6æ(‰Ą‚FÁS€Úívöćq™‰ ęęÎ^'cû·}d/û ' 8œ€àp’»\̑Ęë9Č{=y釈Mjç”mïËo–Śőë| @ÚŸÍr•ZÍOï>BÎŃ}T–błZš*s€Ü±šM”fӌÔkäm.ó$q-;Ž!đ.źQìûĐ['êž…5>čGśl ŠȘ“± ƒ Gślûptß&ŽŰ [}­3™©»èt\„îXù;ZœÎęŻòù}|äżŰü7{Ö-‘‡Đ=I?îàü^üŽû„ö>æ€DhËÎ}é=ì:őÎȘ9ŽÀšČÂčN@pśMț‰śDAF*ÿ@xûWô~Mö.”JEtx˜[șŠB)„šš<ôzœœŽȚ)B•„(ÔZ=„ UŠŸ!śș„§ë”R’$lv+y¶]dŰ֐i_G…”u¶KĐDń#œ.&Qu ±ȘžhU/k§kź`ŚÌž9„}ˆ4öđŒĄ‚“ÆŚEŚéš_án őlÒTXÜ `6V1ïÓŒêlX4“MöZŸÜI~ïŽÈcbtʃƒeÿÎĐšx‚ĂcPkjƒ’Ì5Ž„ÿÎܟà] !čkùœëđčt\d–dÿlgćlek`qn:&c6ęENj†aòčÏûĐsèh¶ę=‡ß§ŸšX§șąD~ïêŸí#p«>Zù8NW?[pžÄ&”#çè>Zw%6©=ç Qa!n"Ô(0™LČuĄźł'yZB…UŠ!TIpz.f{{-?sÈț;&ÊÏÖáÎj(áK8"-A#ù‘dżŒŽÒXüU‘nąłźE’$·W„‰, ń†ç…œžbWZjtżéûšv>G«ĆÌæ„?ɟn]ÁÁ­+Œêm\ò=7LxÓëyxŚ:ú 8qœ8Łä7,ž) ĐÛ_úŠKGȚÀÿĘћôÛÜڊmŃ^O»Ś.òéàŠîž$(ŁÄ4oCÚŸÍš5Zžț|AaȚłY9‡âś­ÿ‹č†îC”Łâ]1a2;VÌăđźuŠćQ Ér°TʎćïăÀ–êm[ ­ËqRÇĆqțçćïàèž ü9ămźŸû„“Úï膿ÁàöٌĂêą‹„Țáx2ő P%ńéúÛl6,6)¶…챏‰R_»N 5U/!H¶\G[óhôê 9W°ç«kÎ`Wßp%«šÒđüÉ Q!B‚Òp|yĘ­ŽAïŒÒ”ŰœfĄ<4ŸÜ‰–.r+wĆçŠshÛJÚśŸÌ­|ËòŸIêۛèÄVrÄ<8|'ÁaYuĆn·±uùl/ ĐmàőìX9€eßÿ”FK·KŻŁŹ0‡]kríœŻœđńuîiû6c·YYûÇŚŒxh2aщ˜ŒUÜò+Êăÿ Àö•óP©ŐttCœíƶhïRš?]±ŒÇQl_1€yŸŸ@EqĆčéŹ_űĘ CCÙ·a)ËŸ€KGÜGUy1ÛWÌeÁWŻŃźś·ŒMƒÎęÿfQûÉâÓs(^ű…6„oç{_–O§„Ùč”ŰŽ°ÆțdűÚ *• ƒF‡NŁE§ŃąUkQ‹ßBpI’°ŰmXlV,6+f›»dśȘgĂDȘî7Ò”Ëéf|Œh{OŻ +<§Ž.1ÚXŁ$B„ N_țOć5–P}Ó¶„șƏ|űÿè>x„[ùÆĆßóí$GTő†…3ŒDšP3^żËm]Tb+†Üü(àcN?Ńțïfżÿ$’ĘNtłÖ^ï—\7»Ś,dûŠčfᇷî—ËâZv<)ző=Ùœv1é¶Č~áwŹ_űĄ‘Čđv^llV {Ö.ąu·KiPÛŚ=0‰K~Àbźń*ë{Ő86.ù}–R^”ËÜOžG„RŃmĐ ì\5ÿ„Ł>Ê sűö”ńH’Dl‹öÜüô‡X-&Òöną$?“Ż'ȚÆÄY;ÜRm5E<úŹ7ZŸ%TàŻ”IJÔSxÚl6ŹV+¶ulRœƒŁWûZ”†ż@Bę‚6 V‰L‚†!I•f#ć5•”ŐTa¶č»Ă™Ućl ű/­+ÇŃÂx”œ3Ű5w°óœĘnG«Ő"I’›(| ѓ€B„  Ï pčÉęF֔-Ąs –šjÚőŒVg ó%W{Őé>xí{_†$Ù©,+’“Ű;čőُIÛ»‰mÿÌĄȘʘ¶œqËÓɁ0Ę^Ïí/Oăï? ą$ŸÄ6ĘžöŸWIÙ¶ŠƒÇ‡Šő.IŚ|ç76ę9‹5ó§S˜u„šȘrÂc›»%ŽoÖź;V‹cÊT•KÂûæí{ÖF>_ŻŐéyț›őŹüu*ÛWüFAÖŹf ­:ÓŹmw9àéжUTW”Ò]!A}TB2íz  (íu|M V‹Z­Â~<:PRk1ÙÀj”z Pçą±-ŹĄȚxÁ» P§ wŠNç«ŐjeŸę'ö©g"yĶ«Ujbƒ"ˆ ÖNÁIĄR©6l 1Š«ËÉ©(ÄbłÊu$ì€}OEŐ1ÚV܉NksÛl6EȘ„§•Û?‰k…JŒ‚“Äyv}Ê7™)`Ș««™ôW UæÚúC/êé5DxŸăšŹțńO–Ò©ßđłÜŁSççÿ=ÊÊ_§òæÜÔτT·üCëndΊ’ȚŸ0DöÙ|nÚZwĐ(ûșűgóvL–Z‹HóôčD %,,ŒđđpBCC %((ˆÀÀ@üüü0 ČuÄé'vâz_é—<šëőĐuÙkÿ‘ڌڍ %>$ młą 'ƒ]’(š,!·ąÈëÁ'ąČ/íJî—Ešëâ\ç9œŻ«ßšRZ'''r–PÁIáyAvŸwœ0‹Dvç'nž—>WŒi4 0oê‹d€ÒŹmwL5UÛżE¶$śœrŹ „ÍfwóőŒŒśŽ6 žßƒŻŒ žÔiqΰŻć€~–[*•ŠfĄ1D„žÉC\@šU*bƒ#Đû‘V’ƒÍ%CHqĐ&ŽăHšžȘÎë€Ò5ÀuF5Ïő'ŠĄ‚FÁó‚l·{;H Κ·ïÙèm&ŽîBfÊN·lÁá1\qû3òt›‚SÇn·ał©Ę“gŸJï%ńé€ä*@Íf3ƶĂl7|€ëSčV­!9"@œżï D°!€öŃI.ÊÂd­žÌ‰^€¶:šcś‹PW«§Óêɉ Ë *8i| O‰X-WĘő"—ßö~uäÓŒĐčc⦌}țsÊ s0›Œ„E'àŰôóʞk8n4jEê+0éBś őu-«Ë ê &ł‰m~S°©jòT*-…œaô­"8T˜ŽM6Id%țˆî@țÖpŸ#"žł'9qqÉuʉ Dš QPò“€Nï‡Nߎg‰:Shuz"â[œínœŚŰíîÁƒźŻJY.ÄĂd-uYA•, fł™cüE„Æ= SbH AB€ έž–á )ʔíòv­‘üÈeÄdßàvN»â)<=§ÿTÊÚĐW!B†žy ç6Ÿ,Ÿ"Iœ2Ÿ|ß}„crM}Uc©âpđl·öÂęCˆ > ‚łG°!€ű(ČË ću•±[đÏìƒĘç6mŻ„9ç]O«é‰ Dš QP PB.Ì!<à\ÄU8)œ’Ÿńe U F2›ÍŐ,€)–·W«T$„xÏB&œiąĂ)Ź*«Í%Ș¶QÚìÔ)ŁŒ†à]癶œ[ȚSˆșÒPkšĄ‚SÂWtŒž çȚSKzțgĆŚÒśPŸuZAÍf3Ù»mŽN#n肳J„".$’ô’\y%î ŐûKŒarOêčžǟŹßžűGN_k‘ą©ńX=ś ʋrŚĘÿÚÙ‰ądÍS BˆÖąä'ëüȚ|YAK„Ł˜Ž”Ăj•š˜ ˆłx;ț!äWS㌖WÙ©=ˆȘ°»—đôÌêúÙn·{YCEžPÁYCXAO«æ|NVê.T*!B§€˧ŻQ ńź„Ÿáxç T‹…ĂV·mƒ hÔb NÁčE˜0čEògkÌj2Û»‰PŚDőź‰ëeÎèxWkš«­ÏB*ț‚FÁóFu>Ęž,æò3RŒÖ—äePVís»ÊÒBrÓö“™Č“ȘòbŸőœu3Sv’›¶ceÙ)ő5ûÈ^Ê sŒMuE هśœĐ~ìvčiç‚WÂù]xRU^LVênjȘÊëmĂT]IVê. 2cwIșìÖ/›•üŒ łÖyÖTWstY©»)/ÎSŹ#Ùí”d‘~`© >Ös™șț§çÓ¶±PČ+Í ï™œŸ$`‡[;Ą~"=›àÜ#Ä/Đíł*>“„“É䶘ÍfŸSę6$č}]Kš Ń8nb…ÙG™8Č=†Œ"©C/3«ÙDHdŸ=‡ˆXŸx~4Y©»hŚk0śÿśW‚Ï•~hÛ*Šż<æűđy-Q É\śÀ$.Ÿæy]ÚȚMüűÎC€ŰæUśĄś~ÇnłńÖű^òzI’˜ĐW%Ś™üûČRwń˔'HÙŸZži(4*žŃOŒGß+ÇÊÛϞòÿüò1à˜FtéŒw8ŽuțAaŒÿ·ČP.+Ìáùkäï€ĂE—óûÔ©©ź@«Ó3lÜ3Œ˜0ŐqKÏw“îdĂâ™<ûŐżÌęä?ĘłÈű–r7-ę‘ß?{‰âœcò~âZv䖧? ÓĆWșíŚê?˜7őEy Oÿ P&Œ;—ö}†PZĆo?Ƕżç`ł:œí A\}ŚK ÿêăŸxćĆyÌ|ănönX*OàHŒóÓÈßŐúE3űăó‰”ägÊuÔ- ­:3q–»Àhj44Óùđ>Y”Äy]é™\}BM–jŒ~îi™ șŒ˜êòb’»\LHd,eÙd„îŠ0û(3^ż‹ˆžŽë5€/_ž‰’Œ ü‚iŐ”?€lÉ«ź(Ć/ žȚ~æ„âí»úa1Ś R©hĘíò3R)+Ìá›WÆaꩿÒśymśĘ€;œ„r}ìßžŒ+çâđołZÌüùĘ1űqőĘ/yŐÿêƛœö±bö'üòȚăòçĐšxÊ sÈMÛÏǏ_Ć#,€ë€kXżđ;fŒq·\7 8ŒÀĐH łRYêđč3UWòî}dA›ŰŠfS5©üțÙK”dÉżÍ/ÿ{Œ=떠VkhĘc țAĄ怑sd/„Çg~F 3ߌÉn',:‘€œ0V–·œî:Ąï«©rŸü‡ _~ĄJ–PŁTŒ«CŒNŁó ÎY :=“Uțl՗Ł*5»Í!ïšzL§Óa”ZŃj”nBŽź!ùș"TpZ8nbæšjÆOœNŸa·òɓڐșă_*J ˆJlĆĶŁŃêxęÖÎH’ÄŸ Ëä풻\ÌۋČ «MÇČoă2>~ìJ$IbӟłhŚk0ÆÊ2Jò“Ën}œM–ëçĘG`h€ĂêșIâͱĘeŸĐÏ7ș'žóÁÓòPńă/„cż+°Y-Œ2ș-Ć9ÇűíŁgéwŐ8tśÙVs 7>ö}źCEI~ƒŸ“±ŠÛ_žÆ€ëïáÀæżùű‰«ìv–}ÿ.WŒ{­ȚàV_ČÛčćéé9t4Ćù+Ëű}ꋀ#9ę“SÿąMlYö3Ó'ȚÀOïcĐè‡HhՙŹănízáÉ©Ém—dSS]@îŃęȕôÎŚŸŁcßaò±€î\Ó ï©©r>=D6ž–P„©:]…hÊ}DA§·YÁč‹ȚăüŽë+1›ĘEš^Ż—‡â=‡ă5âCš«űŹË2*țBŁâpĂœ$uèEêŽè>x‰mșœF— IDATߒÂìŁ”Őú`†DƱíï_ÙŒìgÊ s0V–ș ęf9†€ęƒBiŚ{‡¶źäÏïț=ëÓŒ]ZtìC!ىˆmP?ìـÎàÏî”‹ŰœvúăąÓXYF~FŠÜg'}ŻÇđńÿ ".©Aû aÀ śąR©èŰï [w%3e§Œ„Ö]Üê_:ò~†Žy€đ˜f€îXƒÉX8Äz›è3| ł?xŠòą\ŠsÓ)+ÈŠ8/]öMhĘĆ͚ÓŒ­üțèńăÈO?$ Wăq?SI’H?°•„Vé1xŠíçÀæżyćÆ6$uèM‹Ž}èrÉŐrßÛśŠ! Su%Ÿ=}=-;ś„y»ŽìҏžCF5è{:Wń5/ħ7uo) Pç«Iç.B”aœ»x„ óŻvł|șú‚zŠPÏĂ'ƒĄ’ÚŚúbș BŚő­»­6PfîÇϱ|ÖTj5±IíĐșLĘiź©–ßßđà|7éN ł’qp;·łnÁ·Ìùđ^űnŁ—pôÄj6QUæˆnޘŒüóóGŠőŠsÓœÚêrÉ5u¶­D|rG·'ÚŰíÉLÙ @YQź—í2À}e…”\qÉĘÊb“ÚÉCśeE9çŐúŐ”ìÜŚgŸJ]‚ĂÖ̟źX§87€Á7=ÌĄm«8Č{=™‡)È<ÌÖżf3ïÓçčăŐoé흂žńŃw˜7őEjȘÊIÙŸš”í«á‡XsnȘü» . â*É*ʶ՞KhU™Ăï90ÔśyhʰbłI†ê8‰ô2ßżyĂ;ËùÏ7= ’á|Cë)Bő&Ù”ÄUx* P„ $_ÖPŸû?MÇ%4y4:œâz­őàžIę;ï+Àáżűúœƒ‡Ç•ș›7Çz Ê6=òæŒĂäg€q`©»ÖČrö§XÌ5Ź[ű7?ù>êăA?’$!ÙírVo <¶čìWú̗«Œ†ĘÁa…ôÄŐ] ĄÛż›Ő"‹°Ł{7Êeщ­êĘGtł6òû#»ÖËïívékƒłą[» œœë–ž·+1ÍÛȑśOùĂÍJêÄ4ۜÿ|œŽČ‚lŽíß±ę[X1ûȘ+Jùwî—ôżöNÀ!V/y?™);É8ރ+gśÚE犳wĘș șĄŽoIДń•A@)OšS€șEË{dn8è‹[š/ĂbČłÌtœÏ:\ò/™‡*ù>e±I'?WęȚő%lû»‹É^eAŁòÏOYĘSÎ-ÏŽ!8âô<űȘ}Vł‰yŸŸÀŒO_ËęƒBčóŐo‡«ĂʓfòŃŁW`2V±fțt·áöûÿï~ˆ«æłoă2vźšÏÎUó €șŒXŸđ{éK¶ț5›”í«Q©T…EQUV,çu~ߕ„…üúÁSüúÁSèô~è țTW”+xçțWŸôś'hZűș™Ö€$Dš )ă™ùÁsń<çëąb8^ 8Aô9}RB«ÎòúˆűÚŽJALJvZvéGhTßqœĄ*MÍi±Xä™dŒF#FŁ‘ȘȘ*ȘȘȘššš (l-Ǝ”éż"CiÚ°L ćڐEőú„ȚÓu…ąOhi‰ÿĘ»ƒÍKóŃÔÄ4ś§ ӈčÆÎà›xnzOô~”ò…k6°íï~ÍŒ’Đh‡ÚęoÏ [Çő¶€0«† ‹r‰I  (§«ÙN·A‘ŒöËE^~Œ«ËæĂGvQYb!,Ú€Î Š ÓHPžŽçżéIżkjż§« ynűzF<”Lqn ÿÎËÁ/PƒčÆÎô—ŃŹ­ï ~ęà0Ó^ۇJ‘ń~htjò3ŒHv‰áw4çÙi=Œ¶™ûńŸzav›Dl’?„$ žùČ;“Çneàšx^ùčû6Ÿá뗶c1ىJôĂf‘(É7›äÏğúĐŸO˜\wńŚé|űđNî™Ü‘MKòŰł¶˜ÀPdÖśȘ&Ïï'Śż!b1&ŁÉ.ĄŐ«eßâ„ցLÛ>Ä籟(…Ued–ŐÎWČ%–âż:@@@AAA^K`` \îçç‡Á`@ŻŚËi\§ötœn(]?„%T ê PrŸz)i›NqžÉg™ĘȘܧœkRnyŠ5Zœ«ÙÎçÏíeÁi$w aì ȚÁ}J,ù6ÖĘBűńèDÆûa2Úűè‘]ü5+“Ż'îăÉÏșËuï,çÿÆo#±M o/ș˜vœ-uG“nÚÌ;woçÛœC rü\üÍ1Zu aÚö!$u ŠŠÊŠF[·ëO‹ŽÁŒ8ł—\‡!À‘"«8·†ȚĆșôÍe·&Êőm-ć‹çö’Ű&7çő„Y» $ țü6ÿʧ§/Aá:¶ÿSÀ—ÿÙÇŠ?óYż0—țŚĆđGń5Œ9f ÿÎËaúÎ!rû§_–~%+šë{ç¶'ŠL |ć UągĐ'tLÒ2ŸKö‘*Żú›—æłyi>WȚٜ±/¶•’VŻæŃșÜ%„ŸßMip$ŒĘ&ńòŹȚDÆ;†Ò țžùȘ±-X63“‚LŁ\śógś Iđê/}d ĐŠG(}ҕÊR ó>9â””FĆëż]D‹NÁšTà€ułÔ*ŃśȘ.»5Q q~Œ8łZœšĆ_§»Őÿ~ò!û€+ÍÚ9‚8U*žúž$Žòö©·Y%Ÿxn/Aá:^ûć"7Ű{X4wŒÚŽŹÔ*țù9ËkÛž–<;­ÁŽÔYœ.æșZ°eyWę3„oŸgÏó”Îä¶ J…%T ÔIhT<_l^;‚ _7Ô:“țŸÁțzÔ;-š“ćł2š,±ž­Ûú—Cä\6&Ń«ŸJ­ąçĐ(Ž~\NVj-;Śï3ȚőÒHâZž­ÓhU\~["?ŸÂM„D7óÇbČł{M1­»‡ĐąŁw»=/‹F„V‘șŁÌ«ŹÇ("âüŒÖ7„ü #™‡*)ÈŹ‘…u`ˆ–ÜŁîęàæR‚#tôíŐÆ[ùkVŠÛșŹÔ*òŽU3űŠÙEÁ•ȚĂb€œ€î(óòßìwM,­û°tŻËûÍK«æ\ ŸI-âê˜TW’Ą@ ű .ˎçP€$Ip‡äšÒÙgÙæeù^"4ă # Úë·lA­ö“#SDCEhl ćüŁ1Iašs\ìeŠT"Ù%ÒöT0*æOćÆ$‰ŹToëmtł Ćč5|0a›țÌSü9Ș ”–Tc„•Ò­ș…(¶Ÿà”Îù=ź[«x<ÎsBéxbr¶:żÇêJ«WÙGjŰÌjJ9AëŁJ*Ań•”ûlXBOłŃ!2ox°%AៃD›·oX^a•‚pfksz&˜Ž7I‚­°N‚œ%‰Țïħ=}ę–-ìßXÂŰÚr٘Dąüq ßŐńò]Ü4ZGЏͱüËYÌȚź Šăßc§‹#è3ÜÛzêDi’u îkšćSI|žˆošĄ@ œ§’šælĐŒC;WŃmp$ oX:Šș(È0*Ż?.òœVDWQ{ëłÊ9“‹ü #û7–ĐïšXîzœƒ[™d—Ü(€ȚOMd‚ùFlVÉkš<+Ćۚ™ÔÁq<ÁáșÓ~zjśpűű‰íĐêŐ|ü˜#œTy‘™Ì”*>zt‡w–{Ő7űk˜đż.+­Œ~ËfŽíŻp+//23ś“#ÜRzJÇ⎠ÿóSyÇÎnĐÒé:ÿĆpŒ@ …ä.rÎ%íȘRÁ‹3zńî=;˜=%•_ŠßÊ1džwÌHU™…ˆ8?î~ŁC=-9~gY©•ÜÚbÉ]BÈ9RMi‰¶œByàś ©."xúË|ńÜ^žč|-‘ ~D%úS’gą0Ë1>á=߁V %(\ÇŰÛńę›y€ÿjš” BŁQ‘qš’;_kÏß?f’}Ä]ĐƶàÍy}ykÜVȚœg»Œ>>9€W~îĂÓCŚâä.—źžœùéŐÌúo ôZEl’?a1 3㚐ìoÎë{JÇr՝IüțéQ–ÍÌ`ÙÌ À‘Źț»}CO©]WŒŒ˜„“óY=Y‘*Dš@ őĐĐÙąTśhn«œń#žÇœŰ›­î›țˆ‡[R^h&(Ôę6Ę̟ÿ-ëÏêßČÙ·Ÿ„ôšT*Úś ŁSżp.>ž,ĘɰqÍèÜ?ż@ï!ÿ@ oÍïÇČï3Ű»ź„ˆ8]DrĘ-0ű{ŚżòÎæôÍòï3H?PIA†‘ö}žì–ú^KçțárĘž–ŒŸŰŽŽûžfÓă'¶#čK0ÿÎÍĄŹÀLrŚ`î»}݊!0Tç•5ù=żÙs{Ö;ŠíìJ»>a:n͌SÈ0î„v ÀÊ_łI?PAiž‰ź#iÖ.ˆțŚĆÒŠGš\·]ŻPÆOlG;—Y”œh4*ÆOl'gpąeúÎËŰž8ü #ŐVŻYšN«ÍęüŽVŸx 4üÿብ@ ÔAƒšJ…ȘÆ}f«ÍÖèęûbę3x(čÎòAŁ4:ĄȚv†kVg萖%Ś»?'‘ń~ŒùOęęmÀűWÚ7šM%.Ï„#œÍß0Ą„ÏmÂą ^Ûü;/€–•S85oÄű‰íêíO›žĄŽéȘXŠR«|«ȚOÍÀœŁ±°xˆPKč»ÈuN»yșŠì"TĐäń?0_ŽbzzAĂfS ˜ŒŽ„șâÜÆ(ăzƒvȚ€Ő&śôF–Ó` 4>‹żN§ûàHÛ8"Ź;|žÆ_€‘Ô!ˆ#âêiĄibö8?-:ŸÂSé|śäDĆȘĄ‚&‹V1‰àfŠÔN-9‹ ò2‚TpnątłU©TšÍî$‹ÍŠŐnC«>čaNÁ™ańŚÇűđᝅëÔ“ẅŐb'±M ÏÛK1 é|Àd1»}¶VžÏU—đl ©Ą‚&IHDÆŐ&EÎ'tHl„PR Źąçź7^ĆŽ]ĆQQ(oS^SED€òpnS$4ÚÀà›äLç/ÌèƎ…dŠTRQbaà~$ubàńŠț­çՖ7KœÍ€Š&/ƒÖ[t*óžeŸ>Ś…Ą‚&Gp8DŚïÊ$4iT*•ŠrÏvo.LêșÙúą*• Č[ž‰ĐȚÊóJ„&uâćzŸín4*ÍÚÒŹí…5ŹV^㞈żüP0’U…JW{.«ŐjÔj”âyźô@æÄu}];’ IĄŐAÔùéš#(~ȚÓW Î0u‰N϶:Ç=H§ÂTÍî$] 8›”Ęó›–î ő:Ÿ}}†† Íșʅ4)ąAžV .4bš Ś“3M]V%AêvĂźˆ@Șš PČKvò+ĘŽ g“bc95ÖZPÉźąì`š|»ŸșZC=_}YFĄaĂòâČ&h2ük7‚ ‚Îś»&‰§đôucv.¶śŽ=U%^ép‚ł$Iä–č­+Ú‚œFëuûZꊒ?ŸP!BMƒwź`à‚AœÿgOkN]Cńž7gFƒFفÔNŰ«j4»$‘]^è”/àLSPU‚ÙV›°_Č©Èü3V>]ÏćŁ'-/Dš É n‚ qțŸy”Äš/êŸògô˜·uukŻÄXNaU™çn‚3F…©š‡ĄÜ”áXJęÏeç{ÏóÛWà’“†ŠQ/h2œêMxŐołÉ9zœŸńÉ­žhűŐhuŽìößżő:%Ć<üȚG§ÚUE*ËJ™ĐŻS–ź$¶EËÓČ€Eß|EE±ĂÿÌ/0æmÛÓëò+N9Ÿ› ~Țșc úőgÔ#O4zÛz?GÄŒHŚtæiˆÔő†­ŐjŃh4Hi­±v:€6Č\n+«<?ž œxȘœYLV3i%ÙnłĆ[«5dęă%6]ÏcOZڰü‰Ń *h2hOńlęsÆ7dŠąCŸŸ”±kÍjâ[&óÁßkŒąą€˜Ò‚ÆéŹ–ÖĘz 3NÛ>æ|4­NOËN)ÌÎbï†utŸűȚ]ôŚißś…Nq^.•„„§„m•Ê”'Ü ÏžAHžâÓőÆ­ŐjŃš”Wô#hÄ?štŽé;%I"­8›äˆ…œ!Ì6 GŠłĘł4Hpè‡x€=œû9ìv{œÛžCő"0I h Ęæć™?óÎÂćÌ۝BÖáT~ęđ=ŻzŠêj*JN>šŐj±w,šȘÚûw"âŒç.ÊÉÆf­[]”äça”XêŹădđ7óò̟ùàŻ™Čt%{Ö­aÙŹryei ™Hu€)ÈÌ ŒžH±Ź87‡Ò‚|Ć2»ÍFavVmKv;Ćč9>Ë«ÊË0UWû,0ç՝@Ój6S”“]g€Âì,*˔ĆcyqÆÊJŸÛV”cź©©łęšȘ*ÊN㎠ńPJŒ]—%ÔóÆíșèt:T”/ïćÖŠŐn#”(“ąj14/8ęT˜Ș9XŽÉê>;RڂhʆÖyțș~źkX^)u“ç{%„\°Ä4O"čsWČRSäuv›}›ZÄpcb$/žÚM ]ÈțMÜÚ•ÁÎŐ+‡Ű˜të(njÍŁƒú1*1‚YoOÂïšp?ȧÊÛ.úæ+F7‹b|§VÜÌgÏ=‰Ő\{ĄΒïŠsoŻNŒmۜ±!,ùnú gŚ %+5…ŒôcÜÛ«cZ'roŻNŒˆ őá3ߚÄŰvILžž'·”iÆSĂÊe Š}ÎĘĘÛsoÏNŒïԊ±í’ä2«Ù̗/>Ë 1ÁÜŐ­#ăĂűă«Ïäò--ćÖäx–ÏšÉÍąÛ.‰;:·&mÿ^čNuy9ŻĘ2’QńáܒÇ{îáÍq7óć ÏÈuŠss˜xăuÜ̝ZqGçÖì^ûŻ\țÍk/ńæí·đŃc™ÎËŁźUü^$»_Ț—QńáÜĘœ=·ŽŒă•›nËśoÚÀęœ»pk«FƇńÂőĂ)ÈʔË+JŠyyä5ŒnĆÍ-cùìč'‘<ÆÊóŽ„ńÜŐCÊŰvIÜŚ»3);¶Őû› Î>JV† Ă{ȚŒu:öÌæTŹw–—$‰ŒÒ<2Jó°ÚmgúđvI"Żą˜#EYŰ<αüÍ!䬌öź‹ë:%1Zß°|C"TpÁRœ›CÚŸ=Ä'·’Ś­™?—Đèh~<”ΧÿnbïÆu,v}æšì>‹Ù$[ę–|7ÒÂ~LÉàŚcyÌÍ,bÀ #ÇMÇb2ÉBeçê•|ű背}țeæe—đҌŸX1û'~ûä·¶gœ=™ߞÂïčeÜôÄ3L}æńČÒŰȉȘò2â“[ađśçÙ/ŸaaQ5słŠyᛘöòdaqè s>šÂ; —ó[f! «xđí)€CDOćžțl:órJXPPÉ+?̖ś3còklXŒ€w.珌rț3}&Ÿ=û„,Đív;%ùŹúm6ŻXÇ҈ŒO`ڋÏÉm|3ée2àƒżțeÖĄtÂąąYóÇ<Ù,IŻß6­NÇ·;đë±|†Ț:–I·Ž’ż›ŐÊÚ?æĄ3˜±;…ÿ^ŁűœÌÿr*?Ÿ3™{'żÍŻiy,(šä–'Ÿbű•ŃŚÓȘ[w~Ű”ÏŚoŁŠȘŠwïżSȚț‹çŸŠ0;‹Wm`ÆîjȘ*Ù»~­\n”XxùÆk‰LHäû}Gűćh=‡\΀[GŐkćœ;Ôe ő†wœ™ëőzôzœ|ŻÙȚČ5mÁç·šșŒ}yGÉ«(Æ.~Dqu9ûó’SQˆäqÒćź ćÈìDŸâÓ辞ż  '!/Dšà‚bÿÆő|ôŰȚ{wvmKD\<7=Qke ‰ˆäΉŻAûȚŃsÈć€îÜȚàöK ò‘ìvȘŽíúŃČSĆșKŸ›NR‡ŽŒ~ì) țț ž~$—Žž‘Eß|ćVoè­cé;üj țțÜűȘkjH?x Î~Ź_Œ€›ÀËŁźć©aiĘ­ĂÇĘIXt û^Lq^.Gśî&<&–;łëßU”"I•„%šÔj:ôé @uEŠêjȘÊJeŃʱïƀÂ<śÓčőéçéÜj†Ś€śĐ+űûçYrż$»;_yæí;•È°±ăĘ,ƒËœÉđÛïąsÿ…†qŚ«oșù±îÛ°Žę›7òÀß#Ąuüƒ‚śüDlV+[–/•ëé îë]"ăđ TžŠoî§rń5ŚsĘœâˆF«„넃X·p>eE…Ü7ù"ăhŐ„7?ő;VțCö‘ĂXÍfțțyŚĘ?}úĂ}“ßqsAŰŒl ÙG3áí)Ä4O"(4Œ;_}ƒâŒ\vŻûW±O‚s_QńuY“œbTŻŚcÜȚŽüyʱ›ĘgܰKvr* ٗw„ôÒ\Êj*±Kb†%AÑ$‰ S5YeùìË;JziźW^Zɇ‹áèœD4*ßÂÓóʗUŁJÔ%JE`’à‚BïçOx\±-Z2xô-\|Íőükƒș ŒZS{ƒhÖŠ-™.ĂőőqĂsxÇvÆuhINjúqíœrÙÍc‚rӎÒcĐenëz ŸŒEß|…Őb‘Łö{ *—‡FEFUyĘŸdțAA„ÇĆßȘ5ŚĘś ęźș”FC#.# IDATYQ!oŒœ‰=ëÖŸÜŠÈűJòó(ÉÏ sÿ\}Ś}6«ÍńŽ Îß*(4LȚwQNŽlé–$‰’ŒŒÚ6‚‚aږĘh\~O?1üčŒJ„B’$ŸyB}YB=Ƨs±ÛíŰl6$IB’$j*#Èùź?ț]Žqi:Ú@ï€CI’š±šĘŠVN»YMöȘprVÆ ™”èő”V{%êčž Ńń m(b8^ 8"ââÙ”v”üyÍüyŰmȚA ­Ûpó“ÏrëÓÿa·K}WÚśčˆ«Wž‰Ű-Ëÿ€Ł‹ć°±)/.ąÓƗÈ4+5…Ă»vxŐ àò1ăxî«ï(ÈÌ ÇĆÊèÄ„#ndâśż`·Û9Žm aŃ1$¶iËêys s[| ‡{ąŃjéÜëę!§‡¶mq êЧ/v›--őÚÏ‰ŠŸê:`kÿ˜§XÖŸśETWTžùxnYö'ÁÁŽìÔE¶ ïXő\~dśN·l/Ÿ„ÊÒöŹ[ăŐW­^B}mLNÖbqĄÓŸPW+šó&îçççöê|ŻŚùaܝLúę(\Ő[”° ›YMȚúpvŸĘŽœć‰hì~Čšô<]ÏKçâ*Bë’WJT"ˆł^pZ8_oj—Ęrż}òÆÊJʋ‹ÈJ9ä&(ȚŸçvB"ŁHî܅ČÂB;‘=ŠŰÖèǟfùŹ™ÜŐ­ŚĘ7u 瓶oS–źù‚äÎ]ëÙC-țś=žŒüRîîȚž«îŒ•JƱûxîËoérÉ„ u/ș†ëïˆâÜVÎù…ÿûÇ­ śLz‹wž‹ì#‡IlӖł"6©…Ü~ën=žő™çùï=·sńŐŚŃkè0ŠČłYżxoü:Ÿš„Äś”±šëyŸțgWËš/KšsÈ]ŻŚËïCđv»]mđČfłšò m(^ÛCb)m‹n_Œ!ÒTOŻw,ZJś…Pș/„ŠÔ°;DąÁ œÁÁóaÉU€z Qœ^RÁIő]W„4*ź'ŸÖĂÎn±Z1x KžI†Ęv»Śź+]y”[^O€^CŻ MÚśLz‹š„DlÙDł6í˜đöNû‚ž–É\ÿÀĂlüs;V­ ŠyO}úĘțšă_~ÈHÀ1ŹûĆÆüńĆTŽíßKśACűÏWßč‰Â±ÿy™űăm;óÌó4kĘÖçqŒ|è1Ÿbìą+źâÍ9 űwȚüƒƒyăŚùdŠŠÈÂȘßUŚbŹŹ$uçvŽZWßu}†  cżțäKăÈî]Űí6ú]}Œÿ *”ă‡î>hÓ·îćÏßphÛ‚‚é}ù 9€f­Û2æÿÙ;ï0'Ș6ŠŸôd“íô^—*UT–*],ˆą(‚ )*XQPĆ ?”fGi6DTȘґȚËÒaiËČœdSçû#Îìdv&;ÉŠmòțž'O’É”;É͜猷=ÿą[zj6hˆa/ŒÊœoÚŸ#æț»»Öü­NqÏÆŰźÜúf}îŽNíŠmż/ÇÁMP­:îś,ê4Iá~ł”7J~?,u›5ǂʇ°òËy8sèŒqń\Z`Ê„XőĘŚ8șcLń ˜țóïž©ßmÜ眎űȘU±é—Ÿ`łXđÆČć8”o/—àŃ7ßAÇ^}]ybĂßHȘQĂ_~3F80N;é.-…/<ùÏJ„’{V©TœÈÔh4ÜkV|ČÍï©»„‘T”Z »]{†藓‘ő· ƒê8 TF Ô±Všbl€âżóđN'ùLD Œł¶ lùŰ ”°æjĄ€ë?ŹU+œŠŰ{Š„ GÉ˙š^. Fűï °+[àÚl6Űl6˜ÍfŁ  óśXp„šT‰ȚÔȘ9’ăă|Ÿf&€NïÔáJIQ”*Žz=†Áæ_Âôáścöæn”ą†Î•żl§ÍnÇșŒ9I6Ä퟇ŰŰXÄÇÇ#11‰‰‰HJJBBBââ⇘˜ źâa+ŻhšlőÈ“ürÏáppę>­V+l6, ś())áfł%%%Üv«Ő ‹ĆÂÇïCʏ  Ć,żÊކê{ÿțęŰżßŐeš]»vhŚź]ˆS^#ŽRóÙòW@Ž‚çG> ƒ›őÔ4ï)"*LŸ %ü‚Ű*#F”{Yb­X{‹™Dh€“~â8^ŒŁšŽk‹'O ëÊe ćőš `-ńnĘx‹Ő}°‹ÂZà1b!öŽvÄ(±ïوšJ„Ă0P«Őœ@•bą@ŁŃp&^J„òÏÉŠÿÉšyë5«Őj ŽÔ)Ąűë·,ÌoüAIRŃP1á)52^jz&O~gŒœVŠȚb1HŹĐ)ˆ0§iûŽűlË.\H;•ZF­Ûˆ.sXÌćïă¶żp‰W«««‰§IȚF1ąțw%ąbMïìŸüèżožT$T۟”߯4šDš†Ś…KŁŃ &†f–à#%BË[ŃKjz&©©šŒéê $B‰ #怌A$ÔRńH(ùÔlŰÈm+…·ùßlqŰ"Œ„z!OBޱh(»]LˆČđ_ š°ož*]Șć üÔj”0ʜm#šBL˜ßĚă…MòŹć?ˉ‚J•rË Ą„ßț uîdV^~…Îo1ƅ@Œç) "â°YBÏë”ázźûÿMQ’_źÆ~ŸȚÂ~?JeÙĆ ±û EšFفŐj…FفĘn‡Ífăú˜ú DQ*Œ„FłőÔäíM$T(DĆ)ÿł@EAĄD›†ÍŒ „pțW.šÍ(2—Àhđœcgæ% nÀÜçq\»8œXĆŃÉ0ÈÌÉuÛŠÌ;çևËS%BbÔáyțvVŒČęBƎ›ÒÉfłyŒ‚òGŰKő3DŃ)DǛÿW§Ó!ÖĂ 'цԠ$)ʏ„J­/ꔳJ’Xșä@"”đÂLiP+PĂ`ĂćâR'{-; kûȚÇÏnź_ȘŠE‚ 茁’bïŽÉѝżˆ‚”ê«Pcd QB©h+FŐj”GQ ŒFI Pv…%±&y’Mÿ‘†°9ȚdąŠ0©ź!ìkáœ/B…}CĆD©Px šXsŒX@J$B ż",tšJÜDhFE(ä \i#ˆˆ€a€ÜL 'Óûc3ČsÜ7d‚RY¶Ÿ˜T„B‚Ž,ü(šđ{kšgśóÔ4Ê O1*Ö/g`R€ RĄ.Êë{)öߕІ ›æĆ"žüæśŠNĂä Ą„Ï𛚀2Ł8¶^+=&§ ùEEˆ«`żžülWÿĐj”Côv""›ÈžèÛ`<›ĘŽ+ŚłÜ¶)łNșUDÂŚžÖ&!ZŠXs< +DĆș5°eą˜{H Đòšâ#M€$B…Èí*Öâ!ą|±)bćƒXôłąe‰PÂoˆ‰Đ=PEkĆukiArü\:njŐÜÙäa·—Ï 7șÿêĐ-ÊD>á°–—èޘâïæćsêâeŰìüŠűbšò/@©Ś•©xűQQ~ĆĐùòà›pv€<ĄP*•p8nK}ČÂSj’zç‚ćô4!J“\xúʍ†òÿïBĄ)öŸŒV”$B ŸŠˆ9݉…X“‘Ä훕—ÌÜá › {Ÿäݜv í/šŐ*ѕQĖâ+Ż9ž‡ęžÄšçÚíù"T,ÒéÍ| ‘&8Ć *ŰTJ8ÊšrħÔu}…D(Q!„…Ź0ʟ7NŻDGĘYüki'\ә8Nì9~Z6ClLŒ§K!Àb”bś±(±Zʶ;ęMq4zœÛ’|ü5ĄùKò §c!!ê=bÍóžÄ(ûčTŽSJ|Fƒđä#ĄüŃòD)RBQJŒ–śZìœRÛ*‰PÂg„ŽßS$”­ôȘéÍhn=ƒŁLî<« ÛE›&P#9ÉĂ ‚`É-(ÄȚŽ“°Xmn۝ç¶B}ę4‚” YÊ>Kő ŠOąò‹ŠČïùbTűÌ?†Ä§;ü…ۧÏH5ÍKm …űdĄ_“đÂ~ĄÂæx¶ŹŻËG~ńE\TÖáŽu8œŰ—v ëÔBJœ:źBÄ„kŚqűÌY8‚æÙÌ4šÎo.ęÔëőÜłX$ÔÓșĐ Qo‘ŁÂ}űęGę!>#Qš ƓÔêTтÜÿą§&t9ŻœœžŻ%ü‚°Łł°)^X!ŠX/ÁnuâȘșžÛyN_ŒŒìŒ|4kP‰±Ńœ2A),6#íB:źeç–ùŒÉ<ćńߥć>Ąć?K5ÇSSŒÿ˜Rß«XsŸđŰhD(’űÍó„gäˆJOù1%*Œ°Y^ŹO([)Z­VX­Vôz4ł§CoÎÇy}K0ŠRw›SPˆEő€D€ÔŻÍ GD9%V+NŠ_„kŚĆ—k<·Șó[ ŃšĘÌû0 ÜkVœ E( ĐÀ!%*ć|ÏÂ}ąM” E(ćMi|ÉOȚïoH„~/D=5ÇëőzŰl6nĘä:Žlh‹vâLL{ە:·sfdçàZN.Ș$ÄŁzR"Ș%%@GÒ‰(Áîp 3'ŚČs‘ô;‹ĂÿšìPkËF@ ƒ›FA=ő „ ?0xŠrz#"ąMŒČPž,‹ŻßI8|—$B‰ !lB‹†ČÔn·Ăn·»‰P‡Ă*Î"h ¶âŒź ő5ĘÎÏ0 2sr‘™“ Ći !քä„xtZèŽZè”è4Zh5”•‰Ê‰Íî€Ćj…ĆfC‰Ő ‹Ő†ìü|dćć—éóéFțe(Oź†ș$ Î­ß5_€òB!êiŠ&–pšš"Oßmy"3Z~Š„VœpțΚæ&ü‚pš~$Ôáp”ąü”“]…m1šïCvŃId˜ZÁąK.s źŠúœZ(žˆbÌ9PžÛuöI—ˆüo&Fă‰‰q{°"T ő$@‰ĐAżƒ8ôœD$B żÂ Pv5~“<ùd(ûàŁ,)†)w3ČTՐŚ 6m|ˆî„  k!Tw@síTJTz}™ÁÂ((+>ù‘PaP6*l†§Êž ˆ@C"”š0ü&yöœÔ|ĄB*<ŽkÆ·d!>s-Š1(ĐՂÙX6=-ïIDŠ’šČOC{êąkP*PêŽefŸàśčæFFA„FÆÓĄA„Ą„ßàWXü5‘Őj”[䓿>ČŰjKnŹŐ cÉ)Ű ŽÁŠ 5`S›`WĆÀ©ŽCcŁ1‚QRV&*)ŒJk¶"(Ź…Pڊ Ž@S•%·ÔÔéuœ`dĆ#_€Č"T§ÓčE?„šâi@AĄ†jnÂ/ˆECY!ʊJáșÈüu”Ćú’ČQ›Í›ÍĘŽëE8ÌeŁ©BQ DïèQòĂ?Àl6zè!hșŹ€!6Ca0ž4±ÿ‡Fd^P~4”•Zź“?Ç/AD° Jű±Ő-X!*%= Pv^QvD=TœXd_țŽđ țïÉFՈÀ *B @ˆęG„Ksò'„çG@هX_PZ%‰ ˆP@"”đbÓ5ńE(I*ćaš”e…(Ă0Ü'11Jű_ˆÄÄÄÀh4†05‘PüńĆ!ÿÿ!&Bّńü&yŸ •ŒÄoŠ'‚6$B żĂŸž€ÛZżbÂPČ?(Ż©Q*ÊNńÄäD"ÔEšÉDK© ±Hš˜ćś•Š†Čą“}k†ç7ńS” ˆP@"”đ+BÊnă7· śśÔߍ/@m6‡Û<ŁRHˆúțïh4I„©Šx±ÿÿ?"4kÂ?R*„ÁHA„ĄD@a+QOŸ{šÒ‰/@Úâ= N"ZqűÂÄd2!666„©‰l|iŽ QĄè”ŸRS2ńŻOhH„~‡ ć~ŁbË|òE𔕠ćCąÔ{(X€`y“€„šŰłP€Š­ŽDÍđA„ĄD@ą€{ÿP±fG~Ëöe'č·Ûí\?P±ț ő?üߋ"ĄGL„J5Éóû‡ ©pMxțҜRÍđ$@ ‚6$B‰€#ŹÜ„Q©Š–ąÂè§pŽP©)š„Ż‰ŠAŁă‡Ű*ER"T(DĆD©”ű€~ A„$B‰€ÁVpJD+C~eˊN”Z-Úü.Ąìu(ê_hŠŠà"Ö<.Ö7”ߏ.&8ÚȚ= PŁA„ĄDĐàWŹÂ%;هÓéä*OĄđÎ *&@…â“ÄhĆà‹vòs"0ˆçżą|Ą)ö^J|’%" JVtò_óûˆŠ-ĘɊQaÄSŹ Ț›i™H”z_ °“ŸǓ𓊆 …š˜ ćo Âk“%"”%‚‚§Šy¶ÂdśaȘ”đ€5ă‰Đà#7"*%JĆąž$@ ‚GH„AEćoă?űÛX1êI|R_ĐÀĂN€N©h(ÿuyą“Ä'Aá‰P"èˆ Qág|Q)%:i4|àáÿ>ìܓDpąìł”Đž$@ ‚WH„!ß<ÏÏÿ\ćïO4ű°sOÁAL<–!{Ÿ&‚šF!BЧŸąB!ÊîÇB4ž°SÁCJHz#8I€ź%‚ò. GŐłû !1ê_„âFléUÂÿH ÇòD©œsA„ $B‰°ąŒfzOû–·?Q1Ű©ˆà"G–·/AD8B"”KÄ"žž*cŠ€~ÿC"x”śÓoBDe…D(öˆUČBŃIqà!Đo@D€@"”š”PE|H„Aț„:xAAA‡D(AAtH„AAA‡D(AAth`RùàƒPXXêd„,űyőƒ>€Éd ająâl۰5BœzőBB6luˆą`h‚Ć RŁF ddd„:AQ©˜:u*ŠM›êd~„šă ‚ ‚ ˆ CÍń!äù矧æM"ŹùàƒPTT€ò+QčY·n¶nĘ èĘ»7șvíâȚÒłgÏP'đ3$BCÈ€I“PŁFP'ƒ $™;w.'B)ż•™’’N„öéÓ/œôRˆSD5ÇAAA‡D(AAtH„AAA‡D(AAtH„AAA‡D(AAtH„AAA‡D(AAtH„AAA‡D(AAtH„AAA‡D(AAtH„AAA‡D(AAtH„AAA‡D(AAtH„AAAGêĂ0ĄNBH`&jï]ĄP„: AA„ˆĐh^D)Â@†I>ŃPq‡»a’ «ČDëÿ7ҌYűM„zúƒ ƧÔsyç‰4œNgD‹P±Êš_°yȘ°…ûČű«’'Ă$h2Mán˜äBÆȘ|ąÁP±Dб""żˆĐòš˜è{-vl$é"([đ±ïùϞ©Űg-É0ùF$çŚp6Lr!cć™h2T,‘bŹˆÈ„Â"TȘàò$8EE(ăŹ9PۋÁ r ĂŠ5”HÒĆTæK` KBœ"ŁŁ‰ŁŽu+°ÄÄ'ûÌ>śÂ_ùûKˆ’aòHĄ@x&萱*ŸhĄ‘`ʈÈ' }B„D§›-čŐőĄÊúȘâóPŰr]B4ÂÙòN#\o.L.„49C©S› »)¶€[àHìFeŸÂ‡țšàÉ0yOd›Šđ6Lr!c%hĄ@ć6VDtP!*ć¶Ć*r§ÓéÊŒùiНęȘÜęč4î8mP–\…¶ä*ŽŚ7Qh`­Ú %u€S“èVĄ+•JYąŽ<śî d˜äŠ) “\ÈXɧŠĄÍëș UČźLáù§(D†±"ąăc #G€Č“a0æLhÏ̇:s ‰Kjô€JëKrˆpa{ ఉŹÔÁ\cÌ”‡@ĄÔž‰PŸő$Lˆ°ž“ć›aҒaŠ:*b˜*šOœNk9ÍîdŹą” +±<,–ŸĆȚ„·űM„J‰O§Ó eȚQèŽLwtܕ@l ĄW ĐÆ eĆv $ÈMw=Ì9nÛL͐ßä0š7*€R•> ż‚'ĂDˆІI~òÉXòšLƊˆ.|Ąž(żÀs:Pfü}ÚGcg/ $5j”t±~č ąžŽ(Îâ694ÉÈiò*œ1u9*|È©äïD(&02Lr!cEˆRɍ}TH„zrÜN§Šœƒ0z”T€Șu@Ł@luÿĘQčžv žžÇUX°k«ázÓ€6*•ÊM€Čï„ J ü á5!4Lr!cEx€+":ńZ„Š~Bêt:â+0쟅-ß”ł>hÒ Đ™üzD%$ïpf“« `16Çő†Ż@©Örâ“ |a*V(e;Ûó!ĂDűL “\ÈX^S ŒšŠM›6͗Ć B~á§?2Jsșkh֟(áB€œs”í:Œ%1ÍDwë ÏÿLȘ0ú+)ӄâ+0~ ‡ùżôĆ)ꀘ€ŠȚ)Q™1Vb’]‘$Æ „Łšâ“(ŠKƒČó(ʉy2LȚR^ŹÈ9ĂŃîÆȘI/ z Śk"zĐĆU›·ĆW„ IDATj-Pp tšĄÍ߇ąű.p*4e‘2ú %ü‰Wí/R•:ÿ”Óé„òúżPćví€PoŽFÿ€˜ˆ ê”Ûsoăłț„ł$6› v»v»‹Șł·Ńœ<Ê æ—WYëÒ>*Űkô@ÓȚd˜ń”†]č·șąăˆÉű v»‡ŁÌC,Żú’g„đÆXéńš>h>"ûŃN”źúX隝Qmœ†ÄsÂałpć.›Ùg±<&la"_ń©T“Œ«v@wî›Ò«7ŒU*˜L""©Ńš‹6*fÄe.ç B~ÈŻÜĆ E1È0~#ˆ†I.dŹŸ 3cED7ČEhyœÍ€ÊœP±Íđ* Pœ•_LD”Úq/ăó·Àn5s•{yT O#&Âgh˜äBƊđahʈèÄëHš°RàæÀŐYÛKwNj}œN%ń)/ˆ _›‹Đ( t…‡Ę B9»°`$ĂD„&萱"üB+‚đč9^́;NhČw”î˜PÇ/‰ôÄw˶ăőś~+ł}ρó˜8e Vź=Xæłÿ}ń7Țûß*ÙŚűőÏ}0Ô{/甿3á= u藩ąęn"TXzS’a"üJ “\ÈX!LŒœThbž2«%JëőÿÎŹvÍC`ź^ËĂôVâòŐ\·í‹~فY ÖăÓëʶ;NLyw9ŽžžđŽ2‰/5+ëyŰl6Ż*w!b‘"țk2L„ÏÈ0ɅŒáWBhʐ)Bù•8û,ŹĐN'`É.=Hk ÊäÇ=»žŠőÙžę„Ûö ÛÒĐ«kslÛu6›ƒÛŸÿp:ò Ìè™*>xójœùœöO*oŽŠ§‚ áh˜äBƊđ+!6VDtăsŸPŃæ Ą nšX“¶ŠqÛòòÍŰ8ŻLˆ‹ »œă>cĆ*+^à·Uûqï#sĐșûT 6 ‹Ę)z­‹ /Nÿ·Üö6zßû!Ÿ]șMVż\Ž·țÍR§àÆ~oaűÓ_àđńKnûlĘy Ž™¶·Ÿ>C>ÂÿŸűÛíO~.= <1ÇN^ÁÌÏVŁÏĐûȚńăŠĘùÌW°ÛeźûâôŸńŃÜ”Ü{†a0ûËż1pŰ,Žî>ś>2Ûvv;fÉò]xròśÈÈÌÇS/|Ž}§ăƒÏWËșOŸŃÄžVp aŠ`”ZÊ­ŰÙ‘œ/ț= ŸÉ0~#†I.dŹżƊˆ^*4E“°rWXy‘Fï—–‡Z­D—›š`öRșyÇIctè™Ú íZŚuš·„Ą~d4ŹçêŹ?mæ yt ‹,xlx7( ú Œ=ëÏ2Śöä\»ž±ÜŠ”ÆŐ1jüŚć:úyßmÄcÏ~‹VÍkᕠ1fdèu€ÊàöùjŃô<.ecäęQ5لIÓ~ÄăÏ}Ç퓝S„„żíÂcÏ~‹æźĆMb@ŻÖhÜ țžę}Èíșg/\ÇÌÏV#9±Ô Ü5b6^œț3âc xôĄźHż”îƒȚÇŒhƁ#éXüëNôòöŒ€îŸ MxnA…Pčš ` °ć—[ʍ~ČÏd˜È0ù?&萱"J+"úPûz hĆîŽóöȚê =S›aŐ߇q%#5«ÇcĂÖ4tč© T*%șߒ‚ ÛNàć át2ŰŒă$îêïêŒ}$í2f|òŠNș Sžœ0ń‰>x魟1ęÕxtXWTŻÇ]§ełZűzÖhÀˆû:C©T`Æ'`ÌÈîHˆMÛꎠS»˜ęÎ0nÛăĂ»qŻ3ł đÜÔeq_g|őÉ(nûŒï6âÉÉßcì#·ąę őžíV›öŸFĆm»ĄEm|łdîìŚ–ÛöíÒm0Æh1äΎ\‘‰•kâÏEp[ïրgÇôEŸ!aâkKq{ß6ܱùf œ»ś^v±Y-P(mÜòj”‡*•Êc!šP(ܞiĂ€cĂÔùÆÆÄ ÓŒOț@Żź-đŰđnX»ń(†?ęÎ^žŽW& t»Ö°' UóZûÈ­Ű¶ë4FÿWŻćăĆq$ÓÇÏsŁH…ŐæÀŽ=gv*­›Śà2Lc&/ÄMíbäę±{ÿ9Lšö#IÇ?  Ô0„_ÎÆ™óŚ1úÁ.HŒá Ó}wutË«ŹaúzÖ(nÛ]#făï-ÇqWÿ¶xôĄźXüËNtô>~ûv,—WYĂŽuç)ÄŽÁ5Lö’RĂ€Tč-ßÉ_rÖétB©TșćъàÉX)BlŹ|€Rc”fÙłè?ôì>pź4OK«ï–mGÚ©«šW' #îë̝‹kŹ6nKƒ1F‡‘śwÆĂCSËM㗋¶àûÿĆćŒ\ĚôhȚ€^—§—±šęćß8zâ Ș&ÇbЀvxæŃ[čßë\z^šț3ŠNŸ+ŚÄꎀa<ùpüŸæ ŸúdÔjwŃÿâôŸQœjž{Č/ŚoöÙWÿàÏő‡páb6š5©çŸê‡ÔNčc–,߅ [ÓđÆ waÚÌŰčï,|&=Ę_ÖïáʱbÎXńŚ’W©Tp8P*•„'ȚȘIțÈŚDôâŐ<Ąb7Ç"'ÄhlćŸa[ztNôHMÁ֝§`·;qèŰEääs.üÏu‡À0À]ęÛâê”<îŃŻg+”Xl8xôąÛuÚÙíęcuCAa öŸ‰ôËÙšŐf’äu’\fB| Z5«%yOÆnłJÔj5Ôj5ìv;Ôj”hŸ$ 4/òyyM—á`˜|6lKÐ;\â«Gj æ/ܻʉ#i—<&–~=[áœÿ­ÂÁŁŃ·GKn»˜aúüë Űsđ7Ïő>)Qșé+.րŠĘ‡©“îÄß[Žcéò]žï±č˜;s8ƌìȘÉźé1źęU“c%ÏñӖęÉȘU‰ĆmœnÀ7K·bÜcœđ͒mhTż*șĘR*X«$™Đ#5~ìÓ5‚‰ÍnƒBU6ê«'ĂD†)PTÔ0ɄȎD‘±"cEȚP!”.;àră/ÏűK~ʉÔNĘ Šî›âŸ­iŰ{đ<îèWê8oêĐ…%۰- ·vi^î5țÙzÛÖçȚŻÛtÜúIkÒcЀv4 Ò/gcŃ/;1fdÜŰźàśŐđȰźžOâŃvÁ=Ł?ÇöʧńÓï{đÂ3ęĘ „NíàŁčkčhE8ĂŻŰ5WóŐńï™ S)‘j˜ŽAlüm˜äBƊŒU –±"@FŸP±>wR ÄN„öHuő]Č|zF^vő›ázvĄ›ŰŒł_t‘Ï|…ćíCa‘…EìŰ{Š,)3Aòì/ÿÁš G`”Ù±iû L} h‡& «IŠkÚÌXżùróŠa.±aĘŠcŰ{đRțëçÓŠe<<4ÏM]†o–lCNn1ŚuÊ;ËqöÂuYśGß6š’dÂCO}bł#ïwï°ÿüSę«Ç]#gcÛźÓ°XíÈÎ-ÂڍGńêÛżÊșF°đŠ?’XżP±Ê>\*lÀe˜ÒN]őh˜6m?á6xƒo˜äđÏÖănï}1L‹æ>Žź77Áą_\#đù†©"Œ~° öŒÀЇ‡v.c˜vï?/ڇ:ܰÛì^OiSAêÉX…Șž\c”qû QcćŒ:LƂ2Ńvq»NEŒŐ„3±üÛ±šW; ś=6_ü°܌•XŠżt·ÛùÊ3V<+±k0 ĐŠeé4Iá`ŹÄúâSŸP"x5Y=ûZòá ]†Œ±mctp8œÜ $–î·€Àáp‰~ĆźP(đë7OŁw·òè\Ä5‡ŰFÏ ëïâÈńËP*ʝʜś‡ăń矃ŸîÓèqśLŽżĄŚGIŠSgŻá¶g!1eŒ Æąï}áÖźÍ1sê·ó>1ą;ÆLZˆ€fS,Úőzë7“Ę4źŃš0ìȚ›qöÂuôLm†u“Ę>3`ăòkÔŁËïÂPïi$7›ˆÁŁ>GއÁ*ĄÀápˆ€R;PV|’a"Ă a˜äBƊŒU ¶±"ąÙÍń NÍA€K„ž-úYÍêń`2ˆ~–”`Ä7ŸŽÆüGàôčL( @Z‰0K—»»śŽÜńçśŸ‡séY0Æhe5I~ÿùc˜ÿáH€_ÊF‰Ć†Ú5Q%É䶏AŻÁûŻÁÛŻÜƒłźĂjłŁNÍDÄÇž}:Ž©'y,łȚzłȚz@òóŠȘáï_žGa‘gÎgÂŁCZ‰nBśWïÁ;ŻȚSî}›Í(휕šw‘/4ùÏláïqN»00LEĆŻ ÓsŻ/ÐGçÂétʇZ­DÎÍ$ Súć0 ƒœZË2LoÏú6›ƒ\p{ß6e S”*±3i!FOűšûźoîĐOî)ëțYĂôé‚őž”KsIĂ4fÒBtčă].-ìŽ<á„Ăáăƒa’Ke4VÓ&ßćöYśÎ)˜śĘ&8NIcőż·DŸîźțŸGÒ.cŃ/;đȚkśBŻÓpûÏțòŽiY=»4Ăż»ÏÈ6VĘniŠŽmêC§Ó`ëÎSŰ{đ†Ęs3wc„T*1h@; œ8eżíÆŁućFò{Bޱúâ‡ÍžkälÌzëtl[EĆì9p¶ŠaÆ+ƒËœF°p•ż6ÉźPć+Ô4OÈÆŁő$<…ïù2WFŽ5Z4­)k_a„Y1-š5)ő”Z‰Š€ Ta2êܚ ‡SŒb—*…a"Ă,*b˜„ę—„*îÊÔEƊŒAxƒ‚ń{„b“Í|lË†ì- Ìf3 ÙQ?o‘ëàäÆ@ƒò'&ÀÁ[ `î‰ț`މ0n˜˜ èőzèőzh”Zh4šŐjnReț4MüüÊÏ«%%%0dm@ĘÜ\ŚŠŒJx/Ż.83Œ&±L>ćçUNç–WÙÉì•J„Û€ßb"T(4ùć/[[,X,èŻÿƒ:9ß»ŹdyÚjłK+!Ț+(6[=+»Ę)iŹü‰'c2xyú«swș$./óË^ƒÁN疧ù 4ÈÉÓÁǧÜ/V02 "ü€ĂáăaùCO‘P±ˆ’X~ Őt6Ddá°;À(„ŁEé;G-QâPKT`©hKAxƒOó„ ßS†$ü‰ĂéĄlÔÇS„žçA9” á/üm˜äBƊ4V!Döȝ€çŸI•ʉáĂkF/Żàó”çÈ0Æá,­€œ5LŸBƊ$ŸTźȚâ•e+P©b'ü…ĂáôȘđËwüGd˜ˆ@á/Ă$ûzdʈ cED/^‹P~Æăoc *W&ܱś,Iu2|ĄÈ–Û $&PÉ0À†In^€–("ÛXэl*UxșWòțKX0xö”„x{֟ĄN!@XđùÚ D†‰4ț4LȚ\“}&A@ű›`+‚đzĆ$á{· IđRŽ[ŹˆÿÌ?^꜄Ż|~† Sxâ/Ă$2VD  …±"ąŸú„R…`h`Y9…Čö-±Ű[äÓuźgÊúƒ›­eÖ9öDNźŒe3ŻgÂjł»mË/0—Ù&FAaIčŚ)ïțŹ6;źdäÁ\bęÜéd‘™ïŐœ‹ž‡)-쀊‘ ÂIèÉ0€ą†É›ëH]»ô”7"ÈX…'Á6VDtăłÄûȚùžWŁÿĐOܶuê?uÛżà&xžœü=îț?î}a‘>û-⛌G•æÏąZËç0mæ nuXőśaÔhęŒIoüˆŒ|3>ž>`±Ú‘‘™ĄÏCÏ.Í0ăćÁĐńÖ#f)±Ű0ò™Ż°q[Vț0Ú5Üöà,\ž˜W'Dß-±ríA|4g-J,v̝9`6[‘‘™{FÏAß-1ë­<ź‚‘•SˆĆżìD»Öu±î§ç Ńš0őę8ìSűg*Z5«ÀUáoÚ~ÛwŸÆłcúąGçT­‹5Ž`ĐÈÙ3Č~ęæiäć›1țŐĆžeà;8”c’]+‚L›ù;Țúx%^w†ȚĘ Z;śu››đއț‡3ç3ńʄèŚł%ț\wÎY‹âb+ŸűűaÀ3//ÂțĂéűkńŽn^yĆ۰ő·ŹȚü…›đé‚ő˜ÿáHôêÚ °ÿpșÛșÏȚ"VàùŁSűÚ[ÆœČ'Ng`ő҉ܶNęgàê”<œŰ>œëžŸœü=.^ÉÁÊïÇpŠ S–àÇ»QPX‚ȘɱxztOŒöÜP©\^pŐ߇1jüŚűí»g0iÚ2ìŰ{7whˆÍ+^œŸȚüżü± ?{©ŁšŰ‚IÓ~Ē滐›WŒX“<ŰïòÖà^üëN<ûÚRŹ^:=śöș€;ú¶ÁòoNJȚożû?FóŠ5P§f">ű| 2ł Đ n2æ}0ęz¶âöòèctèȚ9ÓfźÀĆË9X¶` î»ëFŹX}ÏO]†SgŻAŁQ!”Sc̛9Âmq†a0ï»MxśÓżpțbŚŠ_}2 z”à2L/ŒùęČčyĆ0uę`Œÿúîț._ÍĆŁÏ~‹Őÿá~ç”ÆŐńûÂqHi\‡ÏM]† 7q”jr,>yk(·žžWTÀ0Ud5™p3VÙčE\č㉋ Ćf+’Œ^_çzv!’ć~oĆf+l6‡ìrr‹‘˜#ëúq±zh5„e{~zœÆm›…%°ÛŻSȚęYmvde!!>†+gű8 2ł  Śi*ŽÚSE­’DxC…'«g·U€bïĘœ'6lKĂĘ·”ÇșMGŃš~UŽn^ ë7Cß-qűű%\œ–‡>Ę[6n;”bÉü'0äΎ\•ÍĆ+9˜5=^ž0ŐȘ”.ë6 WkN4 ÉÎ-Â]#f#3«Ûÿ|êWüŒr/6ÿ{?őîčœ m«ș°ÛxóĂß1mòšQ-ž;ÏwwŒWËșgs‰ Ë<ÉJ ?{[vœÄûłWáÛÿ=Â헙U€ Ë'ĄeJ-nÛœÌÁížĘÏoß>ƒÆ7œ‚çźĂ[/ߍ«ŚòđȚÿț„Çûž„©yÓҊù_û°a[–΃ûĘÈƟĂÉàőś~Û/B­ 8uöúől‰ț·șDGíš né9yæjŚLÀcuć ö;ô9M?ćć72Ld˜*«aòæșbŻœ…Œ+ÁcED'>/ÛéÍöòš_'TĆșMÇpśmí±~Ó1ôéȚ-›Ő·Öo>œNƒ.75ì=tpgż¶nç4 f~¶^ä+N@ Iż”ƒÎßAŐäXlÿóe7‡ŸmŚ)èu˜KlXČ|·]§UĂédv*ĂM„J]CŒ[:6rsĆ:­ęz¶ÂȚƒçĘö«[+ÉMđ9 IǔgowÛŻN­DthS»œàȘX-V;șWșÚ¶ë4tZ5Ź6»Ûęi5*0 ƒc'Ż VÜ{GGŒ3ëO( Üs{ôëÙÒ­ÒŸśŽűxȚZô»ÿc »çfÜȚ·›đa6ò$HùŸ‹m—»Ż\È0‘aâăĂäÍ”kXŻ Ôj%6ü:YÖ=xÓÁŠDá¶:”=ž3)Áƒ^ƒËWĘE6\č–ÇĘwęșźçôK9š[K\6ŹW*•ÿü2ÉcÚ5šŠ‡‡Š"ęr6Ÿ]șŻœ»-›Őƒƒoà­=RSPPX‚ßVíÇłŻ-…Z­Â—ÿčù@ 7ï‘a"ĂT “7ŚóçùÉX‘±âlcED7Ą,țȄœș5‡BĄÀ«ïüŠv­ërMœș6Ç»Ÿț…‚ÂôùŻYW~ÿÓżûÈ­Üö~ځžXÚ¶’_É>pw'ôÜÿŰ<”XlűßÛBĄP o–xï«°ô·]:šS…îOÈż{Îàҕ\Ôź™ÀŐÁęÏő‡0òțΏS(HíÔKۅi“ï‚Zíê{uôÄeì=xC_s„łĂ őƒ9ßl@j§ÆąçêÓŁf|òÿșSvߥș”’đêāűì«°văQN„ČĚô>äŹúû0Ön8*ëœȚâK~#ĂäŠđ4LĄ:+2V|‚mʈèĆ/"”„"Ù19фv­ëbߥ ˜<¶?·œwśXČ|âcĐá†zÜöö7ÔĂđ!·àù©ËW`F‡êaćڃűrŃŒóê=^4 V,|ƒG}‹ĆŽyŒ@ïn-0|È-5îkì=x=S›ÁîpààыXòë.Ú8Íçû­W; ·?ô)^™0 ïÏ^†^; ÜcߙrșÜń.<đ Æ=Ö 9čĆxęœßP·V"'Èâc0sê<ńüB8 †ȚĘ *„[wF›–uđÀʝĐ3”F=ŠG&|ƒę‡ÓŃ3”N'»„~ځ#›ßtè3CuBëæ”àp2ű}ő\œ–‡œoŒžđ5’Œè|cc$ÄÇ`śțsűéś=ő@ŸŸ±æ 腱ÜsW2Ld˜äÈ(+wÈXUncED'~ĄeÔĐTÄĆê1h@;n[Ÿî-Ń#57whčždùæÓŃHi\Ë~ۍæŹE“†UńőŹŃnç«$™Đ#5z]Ù[mC]TŻÇœïk+ŹZ2Sß_ŻoÁcuĂwłAj§ÆXűăżűjŃh4*4Ș_#;ź¶&7™IDATfőôHM)“>O€vj‚»ok‡ç­Ć‰ÓèĐŠ>țęëe·B°m«șąSqtjŚÛÿx/ÏűONțÆ-zukŽ™S‡žE&{šÔ­‚śgŻÂ˜I Á0 nhQś lÏíóŐ'ŁpKÇFűnÙv|łdT*%ŐŻâv}ș·ÀżïƇsČáp8ŃžAU,üìQź/Ű­]šăÛ„Û°dù.YPłz<&í)ÏĘ!ûû6d˜äC†Iš@&oÓPÈX‘±’ 5żț$ŹDèűÇ{cüăœĘ¶5š›,é„U*%^{îŒæAì°Mb|öîCe¶u~ÄœW(xjTO<5Ș§ä5nëĘ·őn-ùčśÜȚëp/ÆGoȚ/ùYǶő±fÙłć^ŁOśn}ł„( ŒÙcFöÜçꦇxŒÆÈû;—[xGd˜È0…dŹäCÆJšp0VDôV"” * d˜Ü!ĂTù!cEƊ ‚‚ń`mۏŰUìv;l6ŹV+, Ìf3Š‹‹aÊۂf–_\'7€J:ȘéŰw:Z5«ïf?RțÎŃÂÁ[ `ÆöáPÇĂd2Ád2!66–{m4ƒÁœ^NF•J”ÚUŃ) níc‡ĂAy”P^Ą‚yU­VC­VC©TB©TBĄPp>TțÊÓ")O„Š„†€Ë_àF>AAD#$BC€Éš uBd˜‚ ˆ@A"” IÈ0‘+‚H„AQ+‚ä'$‚ ‚ ?A"” ‚ ‚:$B ‚ ‚ ˆ C"” ‚ ‚:$B ‚ ‚ ˆ C"” ‚ ‚:$B ‚ ‚ ˆ ^ó„jâM 6*}šSCxăìE€œ°dŒ=Ô)"‚ "Œ ȘÔÆÆ€ŸzšSBTMŒëÙŰ(<棑 ŠÊ &‚ ˆ° ô"TĄÚ*CšSBű „ˆk œJź„:5ț… SdM†I.dŹ*/dʈJJèEš© ĐHĆÔ°ćsšSâÈ0E‘l˜äąÔžÊa]”P§„šdʈJHh&)ԀŸfH“@… 0Ôu*üŠÈĆÔ8:[ÖX‘XcEu+Q ­ŐąôòDPdž:ț Sdi†I.dŹ"—h5VD„"Ž"Tm é㉠ ‰J†)ò‰Ă$2V‘MŽ+ąRâæxšŠ4òQ„:ț Sä)†I.dŹ"Ÿh3VD„ƒT Aȁ S!†I.dŹ"Ÿh3VD„#ìkÖóç/aùòuXœz3ŠŠ\ŁŹÏœINJë}>çüùKa6—ű|üÖ­{±|ù:ìÚu Ăű|žÊš5[pìŰéP'ƒ BÆ* ˆ2cET:ŸZłf+~XŽǎFß~ٰyón\ș”-[śű|Î:uj@©ôęÖ§Œö1Nœ8‹ßWț›o‡Ăáóč*;vÀÙłCŒ°‡ Sè!ĂDQyę<Ą2è|K{Lœ8 ŐĆO?ŻÂ{àòćk>bȚ|cš6m€^|ïżśàŁŸÆ}ś €^ŻĂÔiŸ"'' ÔÁ;o?íÿîCśî R©0oȚlŰž©Ûă©§†ÁétbÊkŸÀb±âʕkxvâhtëvc™4y7jÔšŠ'ÎbśîĂűéçUžxń*jÔšŠ&?Žš5«â·ßÖáç_ÖÀj”âÉ1âæ›ÛâƗf"33 q˜óùž~=ŸțNœ<‡ę»aűđAŰČe¶nʃ={ &Fo=‡Ú”«cŚźCűèăŻkDBB^zq b±páoX»n+Rš6ÀĉŁ`4đìsoôzśÀ•+™ű|Î8~ü Ú¶iŽ)SžÆŽ0ÁRètZŒ{fZŽhŒôô+xkÆç(((‚^ŻCǎ­«Woƒ„ ))Æ?Œzőj!TÖŹÙŠ5k· KjŒńælŒśîdÀ–­{pŚ]œ}:§? ÓmșcïŸ#ûÌ4lß¶ *•Êçó…;;v€Ęî@‹C”ˆàüùKŰ·ï șvœFŁg΀ăđá>çéùó—bĈA0|›ëÖœÈÌÌFíÚŐq㍭ĄPDvŽo͚-š[·&ći""©"ôô™ X”jæÌ]Œ' ŰżÿțĘț#öî=‚čóăĂ^ÆÎčcNĂÀ=°|ù:tïÖ Á”Ś>Ɗë1`@w̛·§NźƒV«Áđ“đW·/Ê€iÛ¶}()±`ߟŁhÛ¶9Z·NŃhÀÖ­{1wȚbŒ1m<>űđKlÜđ”J%,+VŹX† êàÓYŻqiyûčroŒöÚXŒ~ä%téÒŚńç_±zŐWXčòüđĂ ŒđÂăx~Ò;űù§Ù°ÙìhšÒ'ŒÂŠMÇq<í ~7?ÿŒß|ó žzjæÌY„cGWĄI“úné~}ê'țĐ Ls"Š‹]Ńșç'œƒćżÎA^^žzz*ÖŹțŻO…§ž†–-› sêęrï\żžƒčócÙÒOqöìEŒ9ę3|±`F@~óÊ &2L‘«ĐCƊˆd*…=țŽ?ƒwߙ„¶m›cóæĘèÛ· LŠŽoßoÍű\òŰ;îž&Ÿ…ĆKVbÂű‡Ń«Ś-Üg­ÚˆĄśß„R‰{ïéyó—`À€îžùæ¶šYł* 77_ôŒ{öFJӆۮqôz^~ćC€§_BĄÀ… —Œ‚î=†á–[ÚáĆž@7aì3o`ÍÚ­xrÌ4šּʊâb3Ÿ[žEŰłç0 nĐzœíÚ”Ào+Ö#;;:U«&:uș°âśżqîÜE<őôT8èő:@»v-ÊPŰ»ś(Ìw ǘŽ;† ëąJ•DT©’ˆÂÂbX,V<˜†›njèĘ»3àÏ?7";;ăÆż žz•VäB†‰ S€AƊŒAŠJ!B{ĘÚ'ŽrÛŠŃ”MzŐȘIžv- ŐȘ%ăĐĄ€† ë`ĆosqćJ&Üööï[Áíߥ}+9r]ștÀ‘#§Đ¶M‹2ç–êG7QĂ%T/\žŒôô+ű~áŰŽi^~ćCÀèŃśbÔš{0țRÌúô[Œ5ęYüžìSdećąÿ€GĐ«WgŽnĘ“'=†ÆëqçțùçŐP«]iP(`IIń(*2ĂnwÀápààÁ4@Ç­PŻnM·ïÇfłK6uŐȘUûŽ qăzHOw-Wh·; P( ÓiQ»vudeć"99GžBżŸ]ѱc+üęÏv̝óŠèčę‰BĄ}„;d˜È0EdŹÈXD đ‹ćD‚?NVv†˜„ž8XœòÙg?`ÿŁP©TèŐ«ł›čûî>xò©Ś±ió.˜Í%űlöTŸź[§N \œš‰ŃŒäÖ,tśà§Qż~-œ={/ż4‹ꎔë¶Â`ĐŁM›fˆ5bÒóâ•W?BbbČłó0ćŐ§%Ż3yÒcžăÎ'`4ĐšQ] ÜăÆOÇèG^Ă0è’ÚŁFĘ#yŽ—^ƒ§ÇNC”jÉš^-S§ŽĂ=ƒûáŸûÇĂb±büž‘€‰FaűˆI0™bPRbŽjŐ5kVð‡žClŹÉÉ x{Æó>}gžđ$6Ă]Œ’a"ĂîyÔ[ÈX‘±"ˆ@QaèÂöńÇï/ł­[·č&šŰX#ÖŹț€KTĐ j”j”K 6oȚEP©”ˆ‰q-aöç„ÎzÉâO`6—žU„«W}ĆœțwûeźÿÏß ĘȚ+•JŹ[û-òó W:śȚŻż|†ëŚsž‚«sçöžûî>p8œˆ5:vl„K>ANNL5ÚŽiƝŁqăzű~á\…ŃàÁ}qéRž3ńńź9àŸüâm™Á0 LŠÀŠ‹DżÏ.]: K—ÈÎÎCRR<`üű‘xòÉĄR)9Ę«Ś-èȚœt:-wü;o?›ÍŽÂÂ"$&Ƌ^#űZѓa"ĂäO*ła’ +2V‘’—‰đĂgź™’uą|XÁ'…ŻŁ4…đ(àúŽXÊ a!rĘʕÿàŚćkQ”jȚ}gČÛgFŁwkł”E«Ő”ÙG­VqbžFŁž•›·ŒÉƒd˜È0…‚@—•dŹÈXù“h0VDű `«òà+°ZmnÆ uć+Ț+òŽC/Zț óŽV«…FŁ‘§ Bˆß&ù”Ùf]žW|ü„ 1©‚M*ÿy»]’(˜èƟ v'† »3ÔÉ8l6’ÛtéŻJ9\+xj‰’G4¶D„^‰Đr€·Ò^àĘțDćÇßXJxò·W€đ#ĂDˆbĂäÍőŒÙ. +Ż cXcED'Z¶“Ÿ1}źŰí…IîX|ÁéĄSŒ§<'©d˜ŻCĂäk:dAÆ*ò©$Ɗˆ^|Ąb…ŹSÁkŠqÚ杹à8À8}MÎXź–ëòöu:ž—6§șLż"11ÊfńäÖÉ0 ‘a’)2V„—TbcED>‰P±ÌšP(`Sƕîd“éÀìEÿ Q™ą•šXł€‚“òöuÚ‡ `qš`g4P(ąB(+@Ë+É0ćF†I.dʈr scEČDhyœęÜźŠ-ęĐV,?–L {'Prp”È?Ž/`Ëòy‡ć ža)Žș Đò*x9ę•È0ą„‘a’ +ą\*Ą±"ąŻGNjeBöaSƃ 8KĄ«rŚÈ5èŽ'ț»ˆPùgÄ$$‡ï}Ì Żq/sJtnTlʏòÄšBĄ€Ăá(łÿy… “-064‰”O++ŒĂe*Ìœ‹Đ0É% Æ*6ĆUî‘A•6ƊˆN*Tê3(ŁÔ"WىÎ3źr/U›y>‰Œš‰ą‰œ Ü˓艱âSžT”ž !J˜&@^^^”ŸŒ R+"zńzŠ&öYìĄT*‘„nŽDë"4ûŒo"”ˆV ÿ ś6-§*T*T*”J%śìMĆ.&Â/È0ɅŒ!J%3VÁâ—öŸcÊÒŽFcë*WAX˜\bkűă2D$rć°«pčЈ\› ƒRTˆJ5eû-“a"üN “\ÈX~!ÄÆŠˆnŒ懲U*•°«pQÙĄô€‹{Đ€È„Ö" ó8śvĘùzP©TP«Ő\ćΠž\9Ky…ŸĐ01ì_€5L!…ˆabĆgE “\ä+Žìó»_"ò 3cEDš'TÌ%)•JœSő€ÿ-CVœ\ÜăŻô‘‚ÓœȚȍÊ<—‹SùŐÜÄ'żBŠQa!(ćÆÉ0~!†I.dŹŸ ±±"ŻDšX$aÈ^„RÁĄŽĂI&”ôÀŒc@fšÿRMTn8»ĆeP8œ üqŠÔj5śŁüŒæI€ò!ĂDTˆ &萱"üF+"zđ(B„ú۱ÏR•»J„Â9e*.:RJOva'pynšTŰ-ÀÉu@n:·éŚ“p͒è&BĆ©§‚(?ż’a"Œ&ȆI.dʈ FƊˆndOV/|ïI€Čnê€ó6d;Ș•xćpêo $ÏŻ7ATò.Çÿtk"ܔ^ČjC­VCŁŃ@ŁŃpŻ„č˜U*KłČp&Â'‚d˜äBƊđ ajʈèÄë)šÄ"ĄBʊP«ZMæÁè€ț””ÿäy—€üË@•ŠźGL’ßoŠ#§«ă{Æ  Łt3€”gëaÓćúĐj5Đj”œeš7•; +<ÆŐ)Û0YoC r‘€úoș’+‡€âl NG@ŽŻ‹ò.é»\Sęk˜ŽÚŠ&©țËbÛűù˜aŻZąLö+šŁúoÚ„ ;]S6ŐjçïoŠšLŰ-À™MnÖXétÁ7VQźć„ümìłpN1Ą”©ŰbŸ-m[pƒń°ë džp=ŽF ź qÍi§Ôűÿ.‰àb/q=Jò]†ăżŐ8X,~LkŠŽÜjąT(DË­ HOŃÄÿŒ ᑠ&á{)„e0+Â'ÂÀX„Ÿæ •*ٌÊÆv»v»KRqșžn4íBCikp]æòbD„ÆÁ(°ëJuüs±JœzźàÓj”n±Ê]Șb2L„/Ú0ɅZąŻ©DƊ d‹P6ƒ š°S<[ű±»Ăá€Ăá€ÓéĂ0`ŚŹőp1«VTŚf ^]€U1Lêh•v^ĄË€ĄÙE* ˜íä[u(°ép”8ŚÌ&źàÒéÜ+I±Š]Źr—ㅐa"Œ%”†I.dŹ_cE||Ž„ČŻ…Óƒđ†Ăáà„(+BÙă lJ%źÙkăŠĆQFŹòś>á‹XӌN'ȚoßÿH«ŐBśÿöÎmGu$†ąn‚tțÿ{{ó2fÜÆu pșœZKBI —’șŰȚ;UĄÿü)ОÉńțÚûŸ˜ ÈL©‚Œ’!XÁșŒ}Nèív{Đ}ß/-êöűmÛțKêÿś·Ç)˜Ń9)Í ČC†țnM©ž—„đȝP]'0ć·Óȝ$Fą ‡ŒÁ Öæ ©Ń}ßćzœ>™Jœ7öüűÂĘ­‰Š„ ŸA?TÀ–%0g¶À4Òn‚”ÈŹD:MšRl"ś<2Ąț|Û¶ÉśśścűhßwDđ1ĄȚˆÚWI­Úë•ÚD`Ïli€Ę+đd V°6/Ę őFtÛ¶EÙg{œwżdEP‘"ˆűÍOoa„°őtfmN’œŠ‡À3Š‘¶ŹÀ“5XÁșžȘKÛÉïśû3zœ^ŸŽó&Ô `̈́ê6̉Oâșl Z1ŽËÒ|$_Ô{ÚE`Ï ©§3œdV°&/?%r-đ‘xEĂGŃP&4-ꇄTí$yoH#ô⌊·û˜@dȚÀ4Ò~‚xČ+eèwB#ŠŠûę~—mÛÂę" `$~ˆàüűâ úâî |íśé"ńóŚ”ï˜ bÆÀ4Úv‚XČ+X“—†ăíöćr‘g‘òE]ś h4!š(ÛÂ^3ąvÙ2 ‘ê6 Z̘FÚL°‚ˆÌÁ ÖeȄFwC}‡ŒÌh)•éü„ÛíöTĐŁ'3ÀԆ„ąĄĄÖ«•Àk"H`‚3ŠȚvŹ EÆ`kóÒÓń"ÿOŚśŽÀGű/€ŠŸŸË„ÍO4dXC+Š~ƊŸÂèšșN`‚3ŠŃ6Ûm‚(Y‚€È &T±îrč<țUą7Ł___r»Ę~ˆ &śÚoÓQŰsQȘxoFęgzLé=m"0AÄoŠ‘vŹ EÆ`ëòòÓńv]—jFU­«áÔ}ŹđùŸAóRB/†QĄ/P_pšQ̘FÛN°‚ˆ,Á àć;Ą"±Őąmśń_„hRmB8?%a*‰ĄE/‘èEâWk  Z̘FÛ.B°‚ÜÁ ÖäđÓńŸž—:Łò…żVĐÀŒxĄȘűšŰ· èQ!$02S`i3Á ZdV°/ÿÛN»^3ąú芝źßïśÇ甹mĂ|Ô ».KŻRŻОö˜ ÆŹi€ę+ÉŹ`mȚ2/xk4í«ôŸâwąÂ ąĘź%î’íDD̘FÚM°‚كŹĂK&ԊĄĘźuÊȀŠ<óHôÂù‰țö=‚è·ę{Ń菊 ,3Š‘6ŹÀ“5XÁș|Ęß ,%±Š–”čű‡Z.̚ń|GAï駑Ń$0“ ©F­?—úoíćÏQșÌOÆ`kò*R7Ž-3Z;òӓÎ{–„ó@`ό©‚XČ+X·™P‘șpŐLimÎATŰízëóÒöLPbŠÀÔ Á <™ƒŹĆ[MšÒ±#Ć!ÌCM zıtŽw  J̘z!XA‰ŒÁ Öá#&T€o8‡!Ÿ”è1–Ÿ6ŸÓÚdLœŹ DÆ`kđ1Ș”N?ú>ä§$`#Fà˜À3c`ê…`”6g Vp~>nB•Öeč”h Ú,w’ŽŒù™50őB°Oæ`ç毙P‘ƒłˆ ,3Š^V dVpNțș ő zë2»ÀŃ7ĄÄì}ŚC°Kæ`çâŚM(@űȘŹËYŠ2}Jœ„C.0Ą‹‚üŻ Šfà_ĄE‚ްTIENDźB`‚passenger-4.0.37/doc/images/passenger_architecture.svg000644 000765 000024 00000033006 12233035540 023502 0ustar00honglistaff000000 000000 image/svg+xml Apache/Nginxmaster process Phusion Passenger code Helper agent Web serverworker process Phusion Passenger code Web serverworker process Phusion Passenger code Web serverworker process Phusion Passenger code passenger-4.0.37/doc/images/passenger_nodejs_architecture.svg000644 000765 000024 00000064677 12233035540 025066 0ustar00honglistaff000000 000000 image/svg+xml Passenger+Nginx Management Inspection Node.js Node.js High-performanceUnix channel Filesystem Static file acceleration You only deal with onething. Much easier. Web Taken care for you:Process spawningProcess scalingLoad balancingMulti-core supportSupervision...and more! passenger-4.0.37/doc/images/phusion_banner.png000644 000765 000024 00000141456 12233035540 021761 0ustar00honglistaff000000 000000 ‰PNG  IHDR€lúÔósRGBźÎébKGDÿÿÿ œ§“ pHYs  šœtIMEŰ 6]'D IDATxÚìw|ŐȚÆżgf{Č»©@„^Bïœ#]”jCEĆrőz­·xíb»Ÿ{A±‚zÔ+ Òé-HHïeûîÌŒlBH,śê>ŸÏČ»sæÌ™É™ï<żs~GhšÆo©… Č}ûö .Ççpą* ńóUNÓ’ÔÔh M;ćvč6J’ŽG§7ÈČä«ÜWÀëE Tì[ÓP• űoÓw[6ßą!…RH!…Ò[șßșGŽáÀ\NżEWĘ&€ÏÿłŐMÖɔç”oțże]‘€S._pŚ©ÔÔSû·ÿx"àńîv‡:Mw8źs‡RĆçG6è‰hŠiű\.ÔÀ êÂĂ~7ź8З€hÀZqę+€p怯îç-Ôc„RH!…ÀŸCFŁńg)§ŚŽI$ôé‰ÏíțùÇ` àűIŚæÿ[vÀ`2öŒxŃՒ±E\«ÌœZe84âűȚę>xĐ]Žïpú©-?îńșĘ{ÌQ;.\" )łûԉȚȄhŠ‚€ÓŠĄ^ïŻË„ZAż#<é$`Đh Žb#à\˜ ~~N†șˆB )€Bű_,ŸÓ…·ŹżÛół•© űÊÇ|.7);wĘ"OçÖŽëՕ.™Lw{ÍjAq§Ì”cRŸ4m߁Àeïdć抟vÙƒÙŽ7Ÿ[—œ}ÌNUœŸÜˆű8-.)WqɅžXçĂhq(«5p 0è „7b›žÀ€ŠÿçëćÀڊf )€B )€ț7IhZŐëç+SEÖë0XÌG}.7Göïc⌠d——Qî(GH’$Ą¶Ś—c‡1FEç++oæÎÉoVp$eĐŸ»8và oőwf——„Xą"śőœ5uŐèÛoQ~ÆpuŁŽçqM·nźš4v#» JËÎx«)0žűx€`È?€B )€țç%ęn°!À9.T}~š¶oKżù—žŒ)Ç W’Đ YIQ x}••qóĘʐ·Š#śš&Ąif ̚Š5U”iy:œź0àńV%ÖB0nÒD^}í”ÊąŠśw^òz!3O&¶„ ]{Ÿ"@È:…bæC€Ń'‡„RH!…R3Ź ń3§€ȘȘű=ž”ê履8ÁĂ·ßAï3śæI:ˆtƒ2§$Uò „BUÓĐëőt¶Eòíł/±gÓn~ê1"[¶ˆIÿáÇëÿóńÊk6<ńìæïßXŸŒßĆÓÖöž>9ÓaÇfÁëp^à 'AG±ûUóÖ<‰ ÉA~ê Ÿ~òÙ@‚ź™`"æh‚ăêŹ€]–ć(ƒ^n3Ù##mzŁńTjjê­cnœq}TófžËÊqčÜ=QY|p/Űöx 5]Šk™q4"" °XWš6€0*€!…RH!…đ·Àj!à –ŠĄ3Đé űœ^tȎ.#‡„ìXùč °Tÿêž;ÙsĆBÆMÂŹĆŚŸŰŽČ\n7QáV$IąŰé$"<œ—ïčÒ’źzűŸÛÂÈ./!Č_2 ‡ ĐÍțó-Ă·}ŸzűWŸ}~bęÒW>K1ôęł/ȚÖeô<ćżÿ‚@°ç„±żűìUMœŃhìú|MűŃ oFˆ›ŃŽ8{t4ă§N!:*Šp» CX&›łĘ†9<SX&ł“ĆŒl2EìűbíȘ”_u·=&úƑW^FnF&'_y§rWC>RWE…#©2cUQÍ4„$È/Ò8•ámÌæíBĘGH!…RH!ü­Umì[]’u:tŸ„–iž•- ÒN‘“rœÖœzڱɓÆgïXùyaMŹÔڟÿ›-ë70óòË}ù|L ­ÈûaŸ€ŸœÈ9t„Gîù;Ęûöæêûîć”σŻÜ$%eej„˜#Źôżé:.żăö6ë>űèÖüé¶kźûöËÉśüć¶ä‰ăNE4mŠŚćȘ§îőËçpęą§@Öë1ÛŹûa;ÿꁉyÇOü\ùčÇá`ÌÌDőéA©Ë…Ș©űUżąàVÊEU xš­ŠŒ·ÍoŸôÙ»îéZ˜žqÏÀsÊ9íđæĘżˆŃ$ÈÍQ«ȚKM8F> œ2óŠ őáűŸ}X „° )€~·ęĐòœ!„ÓîŸTËő $ ł5œąÌ,v|öEDÏIJì͚đúj Ÿ†ŃFÁÉ4Ó+Ś,ŸŻ$;§{D«–âÚ·[•Đ%q7p”`ąaÌf3łŻœšÜìÖ~ôqȚ^ú"ëVŻfæe XùÎrČ32é3 ?§Nepím·Ò{Î,vgBtB€Ș:I"ÂdÆTîbćûŸ°fĆ =*ŹKròĆë?XÙó‡ś?z%y҄·Ϟ•eoÚWYüœż&Œ1YĂŃT Ł‘|#@’uL& Oe°zÉÓwŻùênWié‚˰Ó€ }­H/( ÌćD Ș MQí_‰`òœŹ‚BìIxàęwo|ś‘%I›ȚX~K n_śi՘êĆ6•iĘNO‹™«oČb±HŒęJ9oœdÉ'5òÊ h*X$Áżÿ]†Û„Ńą•ŽŒŽzAûHšû鿍íëD)€BȘÖaüÖ=jÔ(6lŰpÁćÜűökŽNî^1ÆM izŁYŻÇQTÄÖ?IűöÍćWxŽÙÍ:vX¶űőeϙŹáű=žàśŃ0……Qx*C~ùÚĆK 32M›?N;óĆǟx=úŚínŽ5ał_GÇAxśá%ŒńŻgʟȚhäČëź„ïž±[4'Çç% *HČLŒŐF4‚ŸVÉGŻŒ†‚™W]Aòä‰űM&Ì.7»żț†5+>H=žž¶ŹÏÌéËÆ\}E©ȚhÂërÒ8#ìì<0•m€3đ{Œ~6Ÿł"L”a—/đhȘZǶł! €ÒÜ\6Żű0ö»·–Ïîâcš6„ÿÁôèߏŻVŻá–{ïÁ–Ű‘“E…8<€*Șîü4šŠĐȘY3Z8}Ì4dOß^œÆțgĘș|!Är`~}Gl —xìć8ú 2`0glûŒ‹gg±g»›űVzž_ќž–zr2ü\3-ƒ—Epɕ6îœ>—›kuM}À8MÓŸûŸüŁÿïuÏ”btš9ß‚Á~ 9€ŠßŐ$ĄjÁY»:cXE™™ìZóUÛőoŒu­«ždŸ="ąćĆŚ-"=5ő©WnžÙ»hés/,&ż“%ŒÂôSș—ĘôtaFæą‰—^ÂM<ˆ,$Š,ŒÒžá“•ăŸùb /E»!ƒÈôyÈ(,$àkÔx1ü^/Ż?û<Ë_\ÆâżȚKÒ%3đ h"dźû–§—Ÿˆßëc敗ÓoÊE”ő/-E))F–e&ŽăžIÚę~ӒŚ{üâ·yxôÂ+țʶgÍăp6ź$Ź“‘dČNFÖë9uà §2šûÖò€ąŒÌń„čyö¶œzȚ3zᕿśô±éô:„$Ą3è‘dG¶ț —dçŽ\»tYŻÒüü ȘŚ7ŠyËmú DAéÒŻ/Z€)̂=6–Ż?ÿœŃ ŚSîvW8ŸZœś#EÓ·Xhn ăà§«yp鋟ÆvîűD˜Ę^\ń• oDŽŽ°h3ć#Șą±ùßeÄÆéé58œäÁVölw«ł™2ŻL±K0i^4“ŻˆÂ©#"V_WŃ«­!đűÙ`Cœ§›%țÀ@#êi«șÚ%Ôn!…Òï% dI"ÜfŁ8;‡uŻŒŃeÛ§Ÿ][š›7Çjł5»ìúëqé,:őL拗_Őoșëžg^»ùÖí·ŒùênƒÎ@ȚÉ4ꋋ?[’“{꾋grÇÓOòÎżțő«>eÖÂ+‰ïܙĆO-ĄT+)BUUbf4”ń}hçnIÌžêJz‹€Śs|ë6]ú™™,ŸőOôŸh"y€#œ*’È"èZ”“/$b† ä±ÏWöûțĘśWŸuÓ­ŻNŸûŽ[L›âq––}ÇÁ$IÂlłâ*+Ł,;—=ߏ7ȚČ”œĂOîÛ?"àrśnÒŹY+gAĄH:űą+ŸZ’Ż$À†‚üŽt OeèŚœńVąąȘRÜ9èÔŹYłž)3g2dìâ1ÆDQpÊYN €„š¶ûłóû_ó5í&O$»°°jՔšR5 I'Ó2"ïń“üßÏÉv:sëÍï¶èž€{óœÊŻ~ü•zòńe„ùžśêtțșŹ­;›YśEÍۘHC|'+&KÓŻC„YpÀoä’[ŹÈ:‰í?”łcS­`]$‚Ùü ‹K(–e^»PNĐÿșgîù«US”kúNœàö{”FIA­cï~ü‚ßčÂY]ą5hDûŃMít^ȘÿŹŻĘêk›?R»…RHżGBđĂÊO;ïúê?‹]%%sącbbç.\ÈÄys‰hGJnn0éÛĄ#·gDÀăéĘlÂÔ)rçȚœéÒł'‘ -QĂ-D ™;çÎł0'śëç.8úÊË·ž:|žÛÁÍ[Æ9‹Š'}{ôêeë?r=‡„s—.ŒđàƒŒ})銟òœt"˜šY§‰3n)P<^6ăçÎfùăOqëłÿâ”Ț€â€Šąi`1›iNêŠ-<üÀƒë#;?°ű”—ż‹iŚéÂSZVs†· ü ŽŻțAŚÁ‘L»±5ùnȚűÛQ óUz3-’"XőR&›Ö–ĐwB: Žâó(|őf>y‹M‡Ń$Q”SgXÿ^àĆ?ű‰F@Zc]@­û­jȘ—SœŒșȚÿ#ÁŸšŁÍšŃNu§ż)€ț`úÍ'Œ?žŻżțZźžĄŸOeë€ù‘ŃQ1SçÎćąó‰oŚŽŁ{öpä§Ę$ŠđúűçŐŚz4„æö'–Ăƍ“Ż_ò„^‚bZ·"ÏíÆćq#!°˜L„É:űq݇–‘|ęÊk4oт)—-Àćtòęê5|țî{ŽhƊ·ÜLˎ9Žs«^ÿüûßű<ȚFXë¶méѧ=‡ĄCśîèą"ńëužŠK8”sÖŠMhĘ«'{W}VŸn˖Ÿ {űȗ/żÊ'O>}°À Ó”k—ŰÙÜœo_ET›ÖXąŁqi*%N'NŸ—„ˆ(>zô±Č•ï,ÿäÙ 픔d:n,ęGÂÖČŠÉHčߏÿdW~ÊŹ;nçh~.úK̝ŸĂhšZ0uĄÁ`$©eŸ<ń$%eeÌ»ęϔžĘúŒÄÚlČrűű„—Žu_}}Ï%śÜőLśáĂŒ:ƒ@ć8D!(--%ćœXńÎ;Ő'2 ȚŁÚŹàÿìŹM\ÔZœ:\ÎCo'*ÎÄԛÛòĂç9ìX›‹Á$3bn<Öh§•ł}unC§ąžKÓŽŚ~/Lçą8«”FțŹhjƒ™ú^żw°©«€ZڍZÚMꃶ[HżS…&üàÒ„KÉÌÌ<ëęžcÆĐČs'Ÿóțd ĂçvăśûùvĆûчš\LpLŐ1à0œҚ·o_Ö{ü8*'$!đû||»âę.Ÿï:`^dLťù ˜8w6-:tàäáĂ<}ûìÛ±ƒëÿy‘æ0ŒőöÚà őÀ‘#čöá)łĆB“Ν),,Dh1aá eYœ8y·ËE«€$š5EH2Ż—GŻVźbڂùŒœ6•±ÏDÖé8và ßzÿùìs\γǓuì֍GŽàŻŁ=OŠŠr25•Ï>ü˜ŠMIêуžęûÙ<ŽŰV­đû}x<^"š6”: cŚœœüÈ'O>ę(pśäK.aú«ˆ‰ÇgĐSâńPèő’•Ÿ‡ąȘ "ŁùaĆŹ|gyxÏțęæ 9’7mŽï3 ?IÒŒ}{<=Ć.éț’láaű.ÒNœ@őùĐI2šŠĄj,Ë zŒz=f‹,cT5rObÇŸžŒ>VŸûûwîąkï^Ì»ù&ÖŻűś^~™üÜ\ÂŁ"Oö;Æ«ű<Țjw3 łŃHˁۜvČz3mŠÏS‘spíČÒŸîè%ÂQìÇQìç…śVŚôyŸ~#œ±—ìjàŸÀŽÿ”üyĐ9Š\&Ń'°ŠóTàDûőÀŒVfêÚçÁĄ­ uA`őö’Ș”[èÎRH!đì~ S§N­ÊŹÔŹ{ïađŒéžËÏ-źÎ G’$$Yæà–­|ùÆĘȎ§ÎQÎK€ęŠç A”’žšJqq±RXPP–›•Uš7Ó­ŃŃ)šȘfŠŠȘíJrr/±GFÆLš5‹ æŐČ%'äË?â˕+xàŐWé>`OĘz+_~úi­u>aw=ó/TœžâŒ RwęÄê•+éĐ©ăæÎ!íÈQÜe„Xlvš¶mKÀë%?-„ĄC0È2_Ÿű"ïŒűRUy]zô`êÜčd„§łrùreeg·‡^ύwßM§îĘčuÁ|ȚÆ»‚Mââxôí·ÀdŠ4=žž=)N9ŠęęÚkÇæćț6rüxnxìQŠT‡Ó‰Š'”h€^Ż'ÂlF--ćè¶mìÜž‰á“&‘Ìáƒ9yäٙ™”Ÿù0`±Đș}{ïĘ[ęíUŻčzæŽoÄU^~–s% 8œNî5șfÓDc~†ż ?° xàroțșŸ8V»}ÔÄSëÏőłßëÙÚ‹R=.S}Xü©užN”•+͞={Ÿ^ݟ,„°«Șș7%%ćŃíÛ·W+Km Üß#üŐtțȘ^}ûöèĐĄĂœ:n`Òę~ÿ{+VŹx€Z{©őž!…rÿè Íf«őËáFI‡:(„@HŠ0 Ù©'(Êɱź~íŐ1Çvę41dÒ$ÆMŸN|—.š&2i6Sž-żôÔS‘k>ț82Ìlnß»gÏQ>ŸUQ‚ńDMĂŚĄ#Ęúö„Kr2ÇSޱá‹Őlúæ óòhß±#WÜu] âÇ«ț„$1xôhnûûßÙ·ië>ûŒí›6SR\Œ%,Œű–-É9q’Űűx,ÉÉšF _j*’N‡ȘšHČ|V·ypÏîÙSg»DDFrÛęśÓoÚ4ŽoÙrNđË}Ï=‡ˆm‚Ńáà­ŚßàÊ;b°˜ÍšŚćú? kŻțęčæŸûÈózńyŒÈB !0ŒŰŒFŒyyĘŒ…ČâbZ¶oÏąÄ)Id‘Ÿ™…EIa’Š! Dp2Bf2cł`‘u\4ë^yæț6l%YÙlüô32NœàÄáĂddfR\XŰàńx\źšđ‡N§b4™ÚËB:vVRoMCőx±Ô~ę•·Ûšc”–Tì6ŸÛ«œoćûOò«gÍòéî»JžÊàś<œőÒô?où¶úgę”ÚOeđûb_Èś;ËMŻŁÌ_Q &6?WĐšțu8N”9vŐÇèՄ”łö7wîÜ{ôzęʕÉČ<€sçÎóUUí¶cǎêOj=ûÿ=:”žŁŸ}ûFtîÜyą[”ï$èőú»çϟŸđî»ï^_㜄&„R/I æÚ“êH}ą’$aŽXđș\”òÙ /ŽęöŁ.V9@݉‰\4s&œGŒÀڜB·›ôÒ2Â|~ąôzŸęòKȚzáN;ÆŰI“˜}Ă 4kß>Őv+§Ë‰ßïGÖéh—Ű…‹æÎC§ÓĄÊȘŃÄ—ŻżÎò„Kk­«ÁhDÁőłg““‘$Iô0€‘ăÇÓeÀʱ±”ûž•%~?ŠÛC„ŐŠŻŹ !ËhŠŠ€ž[c·ëۑ??ô‘:‘•ŸĐ6$łÙÌ_z{ûö••cÖ4~ÚŸnëŚ3bÊTIUŐź­Ú¶ć¶GĂ!Éű].d!0 „éd\99=rÛM‹è:ln!qȘŽ“Ț€73 ŁȚ<‡Š ى0ƒyiiìÜč‹·lfÿȚœææČû»ï‰oق„K–ü,äôčscŁÂmÓȏ*ȘISÔs[öî °è_í=oÔą[Ćuï2*^9ó ÎÊüÜGêt·9{ї[â^>#ńs”ȚȚݘòŰ#F<ó6[FE•Ÿ „ûCE”Ć6™ŃáÏY/ﻉj!ËÚ­;?ő'žđü—:LŐC‹r%Ž1ą•Őjm„išĐ4­ÊŹ|Żp5€ÒÒÒôM›6„svČ6Ś©jżÉÉÉŐᯚì:tžqǎÔ5Ëú=ÂMáű:Ü[țšÏó.œôҍ~űáò:ÚëśÜf!…ÒÏ€ÁžŸ¶^I 3è‘e>Ż—mkÖèÖŒńÆ Âܜ>·{ŠŃdj6lÔ(FMžBŚțęńM;äćä`1›iMÖÁ<ő lęț{Z·æÁ瞧ûđáä9ÍÊźZ6LÓ@–%dŸÒSé”äæ‚?@žŐŠÙn'<ÂNxD$){śòҒ%šuÀ•ŚífËúőtëуsç2`äHìÍăń„N%%AsFȘX"M$ăw{ŽÂï ŒÆFw™‡ ç†ûîC±ÙÈ-($ÊnźéÛH ûšÛnŁMÿdĄŚëŃTœ^OVv6JÀOB›6Üôûđ[­žËÊĐÉ2v“‰òŹLŽŠŠ"€:ȚŹ.E!ÏéȘș»‡ëtd€§Ń6č'.Żh«‹Wq1臱éÇÙùĂVŽ:„ŁÆqożž”ŚV­bÂôéu†ÙÏE#GĄÜáćđxŸ œăæ*g†kżŸæ’àZ0žÔ6c IDAT5›5âłôÇśŽÏžó‡m•ï·€ÉđtòèÔłKžș-Ì~qߓCŽ›“#±Î:A6m‡vî˜őòŸ@:@omQü4v€äÄ·À‚ù ÿ›Ü„š(Ҍ3Š„……=*„hÙŰBŁąąhÓŠ Šąlńù|k:ŽâÀ%u@`Ő>[·n=ŹźĐŽ$ICȘčŐ]ĚăÛêš ŃwŸy[êź 9Ggœ/Y–çŐÓëő“wkGíêÔŰ6âgÜÇùî7€BșŹ\k·ÒùB Óë‘d™ì“'9u,„éWï.Ÿž~äđ< óűxăèɓ6n±mÛáTČÊÊ ”9Đét$ÄÄâÉÍáçŸcćŠŒFźœőVÆ_2ŻŃDZ~! Ce_ùgźhHz#qmÚa”sè§]lÛŒ™ÔŁG(,,Dńûńzj7VL&“ș1`Ű0ú JtËTƒÂČrÒ ‹AӂÇUÙOi•?’ąàq»‰ ÇPZăzłYó0çæ[(RT<„ćè„@FhäŒàKŻŒŠ‘—Î%łšYHjĆč$<.:œ‘[ïKËN2vYÇэƒăì’șcŠŒąÜ넰܉@«:>œÁ€'7“Ù‚ÎfÇȘ(Ûž‘mÖsxÿ~ÒÓÒ8œ$ÜÙ:~äk?YÉŐ7ßÂwÿùn§óŒ/Æ0«•šűxŹ>ÿđ?ü U‹k„jçæČ'8ä(đ*đl…Űš›EomQüNńòYłŸ èíßöÚ/żüČO_:XÔłèÍŁ9m‰»è{örŠ<ŠÜ4ëș—_Ü·ÈB·‡6ČWöâ§Ś Ÿ6ńQžžÚ|1ĂÖ~ĂÎŰ&§ô‰@xcëđ+șKÔ@iòäÉĂ,ËrMÓÎk̍bŃh”œœ|gbbâČC‡œT‚” ĐëőĘÔșŻčÁ5°:üIuž‹Ú9‡ž`ç|ą‘eԛÿOUU{œ„€iö:öWߟêúœĄFÎhóčVű…V6 )€_…ȘĄ“d F#·‹ÌcÇXśń‡œ7Żțb.0hÛ«&M›A!CĐÛ#(v8É,*BQ‚kß6ŒÄàś±áœwy{ÙK”•–2rì8.żù"Z”&·žż«êxÜÓP·$aˆ‹gp›vŒŸ3gqÇRŰ»};Û·n%íűq\.'Č,ÓŸsgFŒCò !Ä·k_–)učÉ*+GU€*èŐș‘ÓF‚&@ű<.&łŸą n—«î§nƒĆwÜÉšKf“]RJÀï«Ê#(ÙU?žy7ĘLvqIUè]Ò@SU4MĂYVŽÉfĂ(ë‘ùˆæ-[nĆára2š8rđ i'N4ȘŽï,[Æű)S™>g+^;ÿL)mÚ¶EnĆ u‘âő='q+źsa ŽŠwŻĆçșÿi țÌt\ùçævŻ}qÆCú(7>~jšȚlæĘóżzőÍûúôTź±FaXè/ —Äö wôYÜîń!_Đ]”ćÏ mëÁ-M]"{zo'ś}#ûșyńc1Û­€±ú~Æh·J·GwòòX‚+ŽüVnàݰ°°~ŠÁÖ6ƒÁpG·nĘ&*Š2ăđáĂ%”€‡P„ĄôTr= ąÖqçȚ lŁ5Ü.ÔŐkèœł^ȘȘŠ !êÚQ 8UŰi4œû±!@­™—±1@wź‰Ć穅@0€~AÔëtŰlvȊŠŰűÙ§ÿ~ûŃeĆ%óĐÔ±QŃŃÖaŁÇ0|ÂDÚuëŽGŠËűrrƒaT!ˆ·i2ČwÓśŒőâRŽ:DëvížëÁ‡H4„b—Ìœ\dI ˜V{ŸRŐ(*~ĆC‘ÛMŠĄŚëi–Ôƒ6={sń5Ś’›–ÆáęûiOÇîĘQôF^Ć%ÁdÎBTŒlBŸŠUY›g€ îS€ß‡Șjèô„?Lš}‚hLl,úÛßé2t8™ùÁ0r”c’T­ÁnȘkśî,șë^ œn4ż©böŠNŒ.7n·;èJ2&żÏ^•QSŠoÉ:,áV<îà¶rĐ8Ł|łȚ€7?•Ëߥ€ž˜ËSR˜8o]‡ä‰nĘXőæŒÿæÔăÆ•qŠw_}…+Żżuk֐—}^cûN1YÂqyœXÆ ·o{ŸÏđšç ÈËÿÙÀ cGVŸy ű˅ü1žđæo3àłèăöÇ?ośô=UŚ=z»țbb:”ï>ń»ë>ÔKѝ »*âFö2őúYWXĘ6šOOl9)ćˆ6 z ï{ۘűl §fúó°êð˜-FÀ\ùœyڃwŽ&îŃRGÙ&`6đÊo Ő'~tkè8G%őèŃc§ą(}RRRJk€„€ȘȘh`R›JĘMqą'đ\`©!©/±vc¶=c&¶Śë]a0îȘ«ÁÊËËß«eûšIŽÏuE–suĘŰò ߌ6ËBK܅Ò/€))<Œèê™i'fćedÌș¶ïۉ‰Ó§3`ählM›Qîń’U\„ŠP§Ń`$ÆNæŃĂŒúÊ2Ÿ_żŁÉÄą[țĄKçĐÉ.*MC/€óűÓÁ”e ć„e” B`nڜAmÚáőùÉ)wąjŽÓ V }§’ !0MX-$M%żŽìÌp—`0èA’ȘżÂĆ;»ŻJLêÆ_îkËVäćŸœî­FćXÊÓćwêÒ—ËĆ©“AŚ-.>žÛxżÁDÀé –QQ_Qćz<Â5țțW$!ˆoŚ‘ŽŒ|ŒzIQ+śÌFŐ4pىc»wa01 ŒńҋŹÿú+nș篎HêÎìÿD—î=xö±GÈËÉ©ś |±j%§MgȚUWóÌ#ŚĆ˜ŰœnŻ—ÛCRrÏ~?:ÜFńúR„_©+/ŠüX±(ŸÛ¶ÙĘŚg=:è‡&Ç.Ú­{ÍaDć©Xúwÿʇ”Ÿns{o ;P”mĄż”ęmI€œ„"ÿéÉœ[ŰÏĐEFșLÊĆ{ęÁÉÀ|„‡…™SràêđŃrï·KpÌ8FÎČ̀û7îÎAUU[țû°uïȚ}UJJJÍŽ=BQĄ(JcÀÚê[[J˜ÚÆ6'pölÙșÆÌŐJąèŹ/Á6ő8^g%ă^črćă3fÌh„ÓéæÔÜŰívߌvíÚ͍&ă“Otï?(UWKș QràjûnĘkg„`)ąìH$V~đ >źÉ°É„ꎐæï'UHöúa3”tûÏgZü*ćń{Ù}2Êă?ĘŠą€E6GLJh5K±c3û;eúó ïʱc™…T›MÜPfè«fśï “{üűńsŸúê««ïł‘`]nXm3ësZG·6llê—Ú¶© șêrșj5V­Zuóĉ·Æ‰čO9ŽëÖ­ÛTßv”ÔIâÜò<Ș @`cW4ÂŹíœȘuÀ_C é°9ÁUfcš4ŃOš6ƒY—Î&ŸM[Œ”9œűblV45 EU š*zYđČńłOxïÍ7ÈÊ8E·äž\œű&ú FĄĂĂáÄf¶ Ì š*šŠąVÀȘUÿ]«r­ŽjĄZ­ô„Á-ëŽU…m+»Áű. œNÆl2b”˜ ž\d§àûí?đă[I9|ˆČÒRąŁŁčòÆ?Qê-GÒŽ`eIąžŹŒp« MUš† ž§'=ÌčüJf/șžrŸ‚·Ü\ëmŁÂÆST”€Â‚«Żeá7ŁÊ:»t ÙLë¶íp8A€ŹÖ‡UNÄQUY–ÉËÎ&/;›6mÛѱ[2%NW0n'DĐeT$IWQ‚ÌXQ\Y&ŹiÂí\ÿśèĂŽnƚIÓgn„ž°üŹ,"[”ĂéőS=‚ŹĄĄnżïôűĂácÆaŽ„(ÏC’$„&0›Í(>ČI_ ÊÎźOÀ…Çé ö—ąąÖ4šDFČqÍŹ^\]Ćf·3mÖ„\tń%„G7ưcÓś&âââXòś{űÏi¶X°ÚìäćÔ=6°c§NÈz#šĂƒŹËí%6&vÄö»b{śœïđùjœÛJŰ?wUOœ7SöŰìł“Ê[č7üä?·‹—ökćGlâtiÏçÒfă/ဩȘÊgÒfƒê;]¶ …Û3 €ą~ÚőĘzÓńîhìóŒè•·Ç>ń-ĐŰü+ő ąz]ëR ۶f͚ùŐa#>>ȚÖŠM›6›í*NŚżęŽèÓ§OҎ;*Ÿ.„ą(4ÂŹ‚‰îĘ»'Űíöx!„&„ĐGúΝ;Ój@BmcÏ Aƒ”ČX, .—+}˖-iő8ˆg͘îÖ­[D“&Mș)ŠRúí·ßîŁî1r”ÂP‡"š7ožTYŚ@ Pșyóæ}ÔîŹ5œšœœœ`”Z[–——§ïȚœ;œśŻ&K”ę>|űàê•ÿî»ï6ŚŃ¶j=à٘„ë΀Ù^œz%X­ÖÊá•ç5œÆŸjgh©»Bș@t»€0 ÁU()*â§ąąóÚŃáęûÈÊÈ`ʎ錟2üÜ\^_ú?ęžęt!:N‡ÁhÄh4a4™0›Í˜ÍfLf3V«ÈÈHŹ6á6zœ„¶íiÖŠ.ŻśÌÇÇJÖa1óŐ'ïóńûïQŸWkÛŽkÏ ·ȚNbŻț””TLD v):@ńz1™ĂPędÀïńۄż=ô}†&Ż 4í̐­Š!Ë:dYÂçó!* U/ëĐü~țÛ=ì۶•ĄĂG0cÎ:wéÂÎíÛ(Ìϧi›Žž4­ÂĆŹ,Oœž\±“É̐Ł(+s묝OŁÁˆŚćÆb Çßš”5§ĂđȘŠa·ZÉ=~„g}ŸÏÇĩәżđZąâZRXRJn~‘f#víä’ËźbęÚŐüžuË%†‡[čɓìÛ»‡7—-­Û•Kì š@T,[çvșIìȚłéömÛ&d<ńNTL,J €N§Çh2!„Àç󞌔ű“üjæ`_Òw{ő©#ÍáÆ™Łè5łkù#+ś‹ô]x}€ĄÒuț%ĘŻêe !p*nĆĐÔbšízôŃ&DÏú‰p’V‡mićßdÆU8;żŠt+@í @ÉÌÌ,ÍÌÌü űzì۱O †‹ëۉĘnO0‰w6ävêÔ)ŸU«V·ètșqBۙŚ\8“&M*Uem~~ț’]»v„QûűÀ*đHLLŒhĘșő‹’$]`4™8qâŠŽŽŽč,©ĆńŐatüűńśêtșȘäՓ&MJ/--_ àjÀöíÛGŽiÓæN7Q’€€šzŃEĄȘêfŸÏ·"==}uI3g”ŐŠM{§Nž•ey"WtŠ‹‹ÛräȑËSSS‹k@XÍc©šűÓłgÏV111sšÓ~EQ¶äççżôÓO?„ŐČș@UtîÜ9Čuë֏I’4©"Lœżššè–mÛ¶DëÖ­í;vü‹N§›P3çd-çő$gęŹž2‚!…tžżâ”ˆ©€ÀaÀX k6Zń-Z2ă’ÙL»űÜn7ïŸő:«?[…ŁÆZݚŠáśûńûęžĘ±=°ä)Zuì‚ÛíĄjțn5Ú*ž=>‹ÇíbŐÇRZRrFÓ.Ÿ„W_‡>ÜNaQqș*žeu’„(*ȧS·d\ț2‚Ò2'óźŸÙh!/·©Æ8FMŐ°˜Í„ByYs8@è%ŻÛ͎m[ƒ€|ű0ȀȚ}û±sû6 òò0Èc «Œ„Š5ö°[r2q-[QXæ ŽsŹ€FĄßăAŠZĂ1««ö»ŠiXLf„ËÁüƒÒÒ&M™Æś=Dqq >—“p“ŁÍÆöożŠi\<áaaŒóڙW- ùÛ} 1†ô“'ëŸu:ÚŽĂëńW›©p‘ôDX­Ł|.Ï;aŠà%—›ÉŠ? Śì'ŽMÔŒ=ü>ïČs~ џz”-Fnó “<š…ÇÌN™«œ[”ßâQÓ4Öűź^yçu»9Ævïaú»òíÊÏw'űuR܆ʯ*>«m\–ÄŸ}ûJNNŸž!°†ăX/t4h–Őję«ÂVShBÌiÒ€ÉœŃŁG?ŸnĘș%užS͛7żQÓŽ‹jìwHóæÍoß6Y–ûŚż-ȘŚ„!0,,lÉč„ć%Ișsäȑ6lž—3ǍU”$IŚŚ¶O!Ä À’Zàą j Ăâ:ê;žwïȚĘwîÜčż&°9ò!N·èf»Ńh|{èĐĄ7oÜžqEÍcečÖòdY^<^Ăę;cÛȚœ{wŒŒ|N‘tźśœ¶mÛŽŒŒŒ|çΝ{©c•—îĘ»·Ò4mRmćGEE}ÜűŐu^í6lž§đŐÿrC é°J͚ƻGŸŒû’yWíțqëÆçÜNgÌŸĘ;“Ÿùòók9 ]șvc΂Ë5v%EEŒòâó|ŸêœÎà2bœûô„gŸ€gćŃB/W‰I NèĐ*&wHŐš„òó»UŒĂ—«?gÎüË ł„ăó©x<|>?ÎŰźČR}òò hʟîüă'M!*:–èŠ-ÈÏ?3|[9|/:*‚MߏÆáp0qúl ŠŠÏß§U$„źȚĆšÄFE‘zx/ĘwN§“C†ŁUÌÈ·ƒÎ@5ڃ?ngêô‹±Úlžœ.dMEóyЛ‚“kDE;鄄ŚíÆăńKÿAĂ(/uT•­iÁq‚>Ż—ą‚|ÚuJ­UÄF4 łÉˆÙd" ššjĆKӂł’…ÀfⅧaËŠï«êŚ<ŻÇOR·dJŠ‹iȚŒ?íÜΰ‘Łq9œŒțÒéđnxx8wÿęz ŽÛíA’$bb› ÉrpęăšöOË"""É)(„ș‰êq{ˆo‘Đü±ûÿöƉ©Q@łêۍ3Ž[ïű+ÓÆŻóšM\Ę„·Üé©\Š6eSôĘNńò&€ęŠ·ÜI¶Ć"ŻÊqüWțqÆ"ÙöęöƒJ±Ïè­-GÔđŠD Ù„œó'ùŐ}ż$ü5Ïbșêć6ŸWč4ŸûA ±šoߟküńÇM5@.]șŽR„ź•4ìIII­śïßČțŻ78q1:&–>}û1nÂdČČòđ:]xșęhgÆ*54TŸÏ?ęUŐxôÁÒ·o?ú L›¶ˆiƒÇëÇé Š©ÉÓw:ŚćÂărŃŠ}~żŸâÂâŠđ­šL ˆ$$ąą"ŰòĘŚ<ńèƒ >’)3æ kąî»§Š!$‰&ёlĘžŽ‡țy/;ufɓÏqôèaŒNgU2h- `2'ŒTNB9~ôQ‘QtèŰŸŚ‹«Œ WY)ááÁ„í*föJhJ0EÍÀÁC±ÙąÈÍ+Ź A $Ì:‰WŒCÇÎ]Ș7PŠÛÁb2’—q’ìÌtąąc±„…a0'Üèő Ż<ÿ_|Ÿ «ÍN‡i™ĐŠššŠ‹JHìڃożYKÇN]iÓ.‘@@ĄŒŹ˜où3{vï$ćèæ]vœúĂïń’›vŒűÖí±Û#1›Í8kŹ%\ €šZávrú\©ț–è(’ș'w9q"őŒm.š2ënș@†ÁnĘk[”Ü‘Ž]śPO:0Z}ə#ŠŸÍĄè»BÊö[±­ęwȚ'ŹX8vì`~ßőłGöXՌèáE”…çPDÚáÿ”űj Èę%ëqŽxVˆQÓŽt«†~‰±—&“é`KM4™L­ê۟ŃhL ž–łZÓ9#˜¶ŠŸ<‰ T›”gŚëő^èńÙíöčÀ•u1™L ő•i2™&K?ً°Z­oŐÀç"›Ífû4>>ŸOfffIMXÖ4-á—8ŻFŁń.`S5‡¶¶”ŽC@RH€żÛÆu_¶[őń» O„Ÿ˜+„h3lű(ŠN›IÏȚę)))â™'cû[P”ęúÀb 'őx ś?ü8M›”ÄăőQZZÌę§Ő–ïSÔ0‚»šŠałÙŰż{śÇVO9Âń”#ŒÿȚ;$$ŽąGr/zśíO·îœˆŠŠÆăőQîp"j1;œćŐC«Á}ihȒLd„•/VœÏ Ï=M  3#WY)zY>cÖpőșK’»5ŒOVŒńÿìwxTeúś?çœé3É€ @ @€Đ€7±P,XXËȘkĂ^ÖĘ”Źźęg·èÚuw».D@éœĄ„BÊ€LŸ9íęcBHBŠûțö}s_Ś\I&Ïyê9Ïó=ß»ńÎ[ŻqÁ…—đ‡ûAÓT-ü’QŁÆbÀˆŠëœ>úôÉ`ÚŽłY”ryGđ4x5ò |~?e„ú IDATűœ^ŒąHXAЛbꚆ(ILž|&Ą@8b‰źEŰ?§3Š[6°aęZúöí‡Q”5AÔ1KFŒ ő<ę䣑ŚÿFŻjI2œœLżțDGÇđäÓ/0hĐ’’{P\”ÙhE †q8ąˆ‹ăÀŸ=ôê3ˆP(H|\^|%Óg^„Ïëф€ĂâE űaùȚ|śCTł›ÍȚ&1MQ#öŽÂ‰—wAĐdWMK†îÊ«źćæÛ~GƒÇŰ…œzŠcśO Žžlœ°/^Ó4»Őjœ0…ž ùŠțŚ>œ‡|EdÜtÆL ę±#pQ™âyoÚËGˆ˜gTțÒęèxk7†àÀ‡hšÖłŁúE)kț ę `ŁLÊÈÈ蓗—WÒ*Š"t2Ææž«ÍÁŁH'N2ȘȘ Í`=ÎŚ4-ú4źI“ŁNúqRè—Țœ{żzš}GśîĘûŐòòòč­æȘ+á}~òș4šÏĄC‡ ہtƒżn閟 ƒ~O>ò»óśfïzH™>}żșì* FXV dvlĘ̧Ï甌ÿAÖđ30›Í”—•đÏŒAÔ4ŽUș" ·“Ò L”ę·€Ù òĂČĆm&„/))Š€€˜ï}CbbcÆŽăŹłg2(s8á°ÚÁ 7±‹QÄ éŒśî«|öé‡ÄÆÆńПžDÀˆ&Zxćž8îDVożțgŸùz·Ür'7Üt>Ÿ‡żŒô4›7­gΜ_ăˆN  :A˜›oč›ì=»pč\”––PUYÁèŃăš­­„Ž€łÙ‚옎Ž ëšŠJ”#Š””šČÜè<ĄG.óé'ó# ŚëAÔ5ÄFïaŸÇĂĐŹ1<óìK,\ű%Ç*ŽÒ«WoƎOff=zö&&6ž°Ź †ńùTWU2(3‰°ŹĄ+©©œŰža 7 ImÈNJ„ßĐ«W2fćpąë:‹~Á›ŻżLBBAżłÉBtt4ŐU'ă•Ô”êńHœĂ1šŒT;ÊÁ9MeoșùnœíÊ+ȘĐdƒÙŰé}›kûÈkŹoâì·0Û{ŻŚKȚÿŠôˆ·žĆßYÖ Ÿ}ô“ï”Ș` °ê?ч.À֞—B||Œ366ö„Î}Y–Ëš?ä]€șź»eYțÊïśÿĐÈp 1›ÍsAèŐ Eu>‘4{ÍÛșrۊÁ'vê/\“:* _óûęÛŹVkŠÉdšȚžídMMÍ­XHáTú••58Ż+ LUŐ-’$MèÂ-sȚĐĄC'ïßżżyH€.@]ŚĘŠą|ćóùNi]ÇDœÛș»„[șćç@Oƒ›Ă‡œ €Üxă­Ürë=žĘ>j«ëŃ4˜ŰÌ&3}úôeà€!ÔÖž±Z,Áb¶ąÊZŁW«Đőś±F›6Qq8ąšwU±„Uš‘ăÒ·o?&MšÂĉSqčjxńƧ)).æégț‚IČ Ër‡O‚ƒDĐçfë–áÖŒ^ûsČ9ÿüț}^荛v»w]5»vnç‰'žć‚ .ŁŽŹˆ?żôÛ¶màŰŃ2†Ćś@„@ú$'öâÖ[ïæĆŸÆín 0ïĂGŒĂd”xÿę·1b šŹr<š ƒ9Äëőànš'91Pă–g·Y9”›MΟH>ÚÚÚZÔ°Üd·( àsû3f*'œI(ÄdŽ Ą°L0€ș҅ €$Jèzƒ(!!Șb·˜Yùăś È„A0çŒ#wÿ>țöŚèÓ§ăÇOÄb±đńÇêśûqŚŐÓ+­ńqńäs„ääTœÎ>€(JX-¶ŠŰŠIBÓ˜ fR[[‹$Iüö·ś3ûąKY±|1ŁGOÂ’›źéLČc>ű¶gíęËì1öóŒ^ïćĂêp8šÜU’[ùŚœG€ĆИŸî—•ÎÂÀD8pB3¶ƒÁm±XfH’4CŚőèÎꆆ†ćŽTë]ŁëșÛćr]SPP°żÙu›ăăăżLOOÿLĆ!\›Öбì*xj7mÙ©0€©ĂUUʶ{śîŚÿÜŒŚ«WŻIIIż—$iŠ Ńșź—ƒÁÇóóóK[ŻQXÌĐl6ßÚÙڄĂáWJKKßsč\ ńńńÎŽŽŽ›L&Ó:șÎb±ÜÚ8†.@]ŚĘ”””Wççç7O9ÔŐuíMŚÒêuK·tËO€FIFcÿ`0ÀĐÁC xƒűĘȚŠŹفìì] 0ƒhD—ę˜G")) ­•Wk{êßă™?"™Qv$I Š¶’śȚ·ûDFŹääƍÀôsg1|ű K„eœżÂKó^ĄwZ:F”pžœž'§êPBal–hțțò»Œőö+,ęț;dYæ7^&Łÿ@úőÍÄíö4yÔê:Ű,ÜuU,^ò5?ô?Œ=‘ì};yț…'ÈÏÏkjmoö.Î1Q?îe"ĐP[όs/dśî,_Ÿ”Ç0yâ9>ŒŸ ÖrхżB …uĄÉ+Ù ŠÔŚŐĄȘ*á` !’±DłŃHöžĘMmÖŚŚE .4ePđčœ‚H@ó"`łY1Ișą"4ČŽnŻ›ĆŠÍb!>&–œûvRqô(7Ïœƒûś0`ÀPæ\z%˖-„°0ŸÂÂüÖ>[nș ŻŚËÁYLž4•ûÿxO$»‹Š5ÖÖu›ĘĊ—3íÌsÉȚłƒÁÀŸz‚Ù^ÊȚƒ(ˆL›:Ÿ;€ u]łShźŒeŒ’yx›kûӛę""Š"Cć>á7ęm§‚Ăÿ©¶; ƒŁąą>nvț~§ëeyyy9­ÛëšMY–ż*((ÈĄ•=›ËćjHLL|Ćn·żÛA“C[„.0€„OëÊ”-ÆŠ·os:.33sÎÁƒż9țEYDîod”ŽZ3‘ŽAÓŽvqńńńN`VGځrss4Ÿg—ËUïrč^ÎÊÊr›Íæ':˜çYńńń1ǁcW ,Ë_6‚żŽ*.—«ŸłuŐu=‹ö3«t«»„[~. ƒfUU{FâbăQĂrŁÚ.’fM …(,È㜳g 4æÊ•(..âŹigG˜Źă^°-@_ó9rhX­VŹ6  —;ŚóăȘXłf%ȘȘψáŁ8śìŒ?™©=8’w˜-[624s8ŠŹ#ˆƒúg …Q„ŃG?©-A‰Šr ‡ÂHą€ c6™yđŸÇIHHäÏȚ#đŚż>Ï__z“dD”DTUĆl2qŽČ˜őW3óÜ 2xß/[Èß_û35­lŚvìŰÎ ŚÊ0Ś”•‚Ț wßńČłwł“È›oœŒÍj'>6șZw‹ÜWąź±vmDû' b$6`chŁ(PQQȚT¶€€˜cÇÊèÛ{^YQšŹrŒFŁ U“ ËAöçî$:ÊIÏÔtBÁ AD…())ąŸź–C‡°j͏Üyû=Ź_·Šùț‹ùÿüœę2™:ćLÖź[}Òz*ŠÂȘU?‘>Á†ńç^cĘÆ•äçÁnłăńzđy=DA‹x(—–äqèĐf_p1rśóäcÏ2ęÜóxô±۰a-śßûjH„ęidLĐïzȘń• ;țż„šD’€Ì_2Àó/!’$±§ö`ĂàWϝ569VČΔ`J±bî pŚ’-›Oț_€?K‚Áàß8ĄČșÂú|ŸćŽÔY8xđàò‘#GvuYćܐíRȘŒÖÿ“e9Ś`0Lì€9{q۰ażòzœŻnmĘÇS`"…űűűIŒyKnnîżi'€KNNÎ?‡>SĆvUÂńńń“\.ŚòźûF”o›Áș»°źĘÌ_·tË/ ?ûś‰ČNNLHăVšT“&فú:uuu è79 ê«ÈaêëêHNLE9źČ;)Ûe€ƒÁˆÍfĆh6P\ZÀȘoV°ì‡„=4ŁGaÆôó˜4~*é}Óip»Ùłw'{ùE6n^ÇŰŃă™8fő”PuâI(3Â49ì6dïÛJzŸ âc“p7žŃ49Ä–™û›Û1JFț5ÿŽäæíw_ćÉGžŁžŽ«ĆFQńaÎćÒ ź 11™·ß}…‚Â<žxä^ëï>rđU˜OIq!©‰œ Ż^ áŒqòû»ï睟ɫŻę•­Û6óŰĂÿƒ.ëMsŠë:v›ŒŒìŰÙ,ƒŠąÖJGwĂ †Žźź–ÇžxkźșŽŹ!#ˆŽr"J‘‹•U”” )(Ìgçîí<ùÈłȘŽš (!™”„Tü~%„E2~ì6E…$&$ČuëFΛ~1_8‡M›7DÔì­ä‹ŸRXTÀ·ȚĂÀțC™uÖlrí%3sÛwlĆćȘÁ$4»ĆÊΝÛpF9 ÂÜvÓ]Œ~>țGV­YÍjcôÈq„!$]h“Źip=g V;œŁAĘ<Țb("ÿŚ=šĄPSŽ)Qšè&0ő›wÔ|`ÛÈś+łŐÿ-PŚőęüŒŐa/ȘȘIśŰŽž\źœö ÈČŒ„=`Ò (Ž…]€í:œ xôûęËívû͝LÍ8‡ĂńqVVVY(ú{uuőČúúŠÈőmőAè 6ŸÇ桝Ű"gțڛg1,°X,:`­‡‰!Û„yng]ĄŃÙŠ ëÚ&8î–né–Óe9œ$$Ä'eu „”&pb6šÈ+.AŚ5Ò{§„0ŒÔșȘ‘•0‰±IXŒ&Ôp8ò°6{·4Č}n_=·­fùŠ„lÚČMÓœ9„K.œĂÙÓÎe@żhșNîÁțöêÖ­_M~3•ăŹéçĄËDTŹšOp :è'Œ|±Ń•çóśßbʆ”€őêÍMŚß” Ó7uUĆ[ïᆫn"ńѧóYșl1’d`˶MdôË`ÎE—qńŹ_ 3ïŻO!Ißÿ$VŁ§}–Çžțù5p `_N6 "ä4v1’úÂ[ßÀÔńÓÈٟÍûț“>}ú2uÂY<~D"}G›ŐÄą%ß4%F‚&°ź©'„H+.)⅗žÁáˆÂét"‰"`Mә}ȚE\1çj† ʄ±IŽKĆï V‹™Ă…‘ć0SǟĆì— I·‡É㩒Ÿ€Ăæ@ …1:vÆŰ¶} {ČwqŐŚđë9Ś2ž_/<ùŸüösJŠ‹p»k1$4UŠ  ‰ă§eŽfÈÀ!<öԃŹZń”>sê4ÒRÒšsEbJ‚p҉’óE8°äìłúžĘçÏô&ț_.ĄPšŃš‰-"¶ÜTŒaìüŻ5·ìÖę1€îșșși™O@ï ÌÔŚŚ7Ž'-€IGjÖ6Ű<Ą ì™ĐûڰƒVPP°)33sł(Š»0GœŒFăŸSSSOHHx9//ïí1]PŸD”wTȚívonÖïÖ©ŐD@w»Ę›ÆŸûæ`Mè Űw°źZŚ”ĘŒÂĘÒ-Ęò3 ‘˜Væž=zb·Űšś5DpœȘc”$ČłwÓ'­/‹OĐK|\č[ö`·Ú1àpá~RâS‘0 ‰l+‚ùĆGXčöG~XčœȘêJzśêÍoźŒŽłŠžĂđĄ#°ÛíääńÙż?fŐșÉȚ—,·dq’“’Éì?˜°?a%ő–”Ÿźș†Ăá@țœđ>úl>ő ‘ëÒČžzț Οy!Üę'‚ŸPÄ>MŐđŐûžőșÛ),ÌgĂæő|·d!I‰I\|țŠ?‡òȘ2^~ăÏ :œ«.œŸÇO\KČ3…矘ÇcÏ>̑ŒˆÉÖÖí›čxæ„1ș5K\â©őpăU7ł'{cG'Êì Æăj jm6[)-/b՚•Í@A0â|üŁé„ć0ęp֔łYđÍ44ÚLzœŒȚHúœ„űŸï1ŠM<›ŒÂ#ìĘ·›égÎ"ìdăĐGûŒn† †Q7âv5Dì M&äæPSSÍŹ3/ ôńŃgóÛdÿšKZŻȚŰ­vtEEVCŰì6nșöfȚűÇk|òĆ|n»î.Đ4***È/8‚2-ÄŁO=ĆÍ\cłÚžrÎՄ}áˆy$Ąjr›aPÊ/\íU>ŽË˜1l·+Zëß8ęż fłg„©lóۏ>ÖêĂyÀçÀ/‚ÔN7Ôu=ÇăńÜXQQQҚę#F„ÏîöìáÄF©·ÚúŸ ìY[€ąK°đÒ***nNNN^ ÂĐ.NYŽ$IO8đrŸÏw_yyyNë~œÂšțîÀ‘ÊÊÊČVL\k#mœČČČ,&&ŠŁu>©ÍNî„Óșź­æšÛ°[șćgÀŸ)I)˜E&шÁdÀ`0ĆáÇújISF•ăÛòq0€ŻȚËmŚßAß^}INH%­GÏțćéàlHæP»ÿ Ғză©wł3{+ûebĐ$dUF"`R“LFfɈŠ|Šc±šÙŽbcGŒĂfŽČzëlÛ±”Ę”˜1ˆ«/ż†)c§es"+2ź†j¶mȚÈæ­›šŹźä…'çò°:Ź8ŁŁùț‡%äìß˞}'2 Íčè2őD}m‚źcČš©«=Űî!vĂfŽÜ:>mxúö:»–țßšúmKL&Ń.Sùöɟ~ŹŐ‡ Où—jït9ÌèșȚ iÚ»/Ńv^Ę&Fź“6[§žk èˆij«ȚÎÚkŠ>m° |uaîšúÚĐĐĐ ëú śK’tó)LáP«Őș 55őŠŠŠŠœSĂI Ÿ#6źùnț»Đ•{ă'ŽyZŚ”üuK·œ^Ű -5 M“ (^\55•QT\HöŸ=\ÿëë‘ć<ó č‡Nd@òü€&„’_p„O|ÌȘő+ …Bœ1ü žôyFMZÏȚx}^öÜÇê «Yże=…Ć]ê۔qSЂ2R“—±ĐŽS9ąąđ+~ȚęűM>ÿú3‚Á`»ő(ŠÂÖí›8g!ŸżÉÛ7ìó“žÜ‡[Żż•ŹÌa 8Œćk—1ï”yà·pÖŰł©©v5„2‹žzœ$9˜śè<›ś(Ù9ÙlĘŸ™Ëg]ŽВé‡|>2ôG ‡‘YBŁŃD”ë߯XÚrSU$$MGôJVߥ„C!Șˏ1kò,êêjyćí—8wÚčüńαˆ6| nTAeÔàQ€Æő ä D+·_Ł(5fŃ#€0›-—惊3$}0u 5Œ;ÿm â©ê°;đü(ÁČÍf3Țû(CÓł…C”WłmÏ6Ș]UdfdrÛ”·òÁ‚ úüX±aDbèàĄlŰČW­«iœéÜôëčűëœM^ÔIÀÛà^ÚŃ}a<#ÆSă­»+&)ỚPAŚÿ»ÏAˆČ9ÔCśź^©y”’_üę\PŚőMșź—jš¶Ńív/iŽeÓÚ`•šÀUgN …NÙ­6ŸŚOŐ~ŽSP7““›șĘî·Ûęd=–›ÍæûA˜ĐĆ)¶Z­ ąąą&x<w3ĐÜU&R?Z;ząąąą=O=mgÔ!***ș“°.'”ù\Śné–n9Đ űnù"Ÿ_蔒ÒÜ7Š9ìS’RĐ;ƒąâć:©‚ŠȘ žxáq232čńŚ72eìÒÓÒŃuąò"ȚęèV­_E΁œŠ:»"ń±ńŒ<<ąŸäxž łÉŒ5ÊÊŠĘyóę·È+ÌëR}[wnćș9Ś5Æ,<&un?łÏžÍòőËÙœwï}úĄpˆœ9{™vƙ-R™5ß/^Nk4Ï?ô<Œű?Ź^Μ—"!žPëv»‡v‚Šc5˜ń}™h·YYžűkȘkȘpF;9{ÊÙ ëŸEŰˆ8ș4ÖôF€«xjžê‚_SU}ŒÚș:žüĂ„Œ!BA?ą"©Î”`ž)§±źëDEGł-wë¶Źcâ°ńÔùëŁQbă¶ L7B ő”̞9›ÔäTąlQ$Ć'±śÀ^žÿûó(ŠBlL,ÉqIű}~ŰŒ‚ČŠ2FÉŹ)31 F$ƒÉc&QS]MÿÔț k J„ M›șŐbeôˆŃ`ŻȘÀ+Œ^ł`l€ęjŻm4‡ †!FŁqˆI2 ±bÊpÇùšȘ©êò!qłí"œą€ęr!ËC[ÿW=ŽUźj©ß»g]ęOûőBś…U9W–ć\EQreYÎ-ˆ[°ó46§wÂòl-))čŠÔ©œŹÆkę{[‡{s»-]Ó4:QÓPèôú¶î]Ś»ÂŠŽăœpȘ `óț=zt3đëÄÄÄ,«Őz“(Š—uÆÄÄÜêńxțz|îș0†æ›’ź(JnGAÇDÇłŒ“3j4@‡Ă1±Ł6UUÍmȚŠŠizŰäÓ¶źĘÒ-Ęrú ŁqwćÈ1vhé`; ÿR’Ù°m}‹7=«ĆJVf“ÇNbêŰ) LˆÙdŠŒȘœĆ?~ÇêMkŰŒcs“­Ú©ÊˆŹÄ;â4űóűFEGSísńú;Żóő’ŻOiƒÈ=œKQiœbz AĐ#;ąà0ÛÜ?“;ÿtW“ZuÁąLŸr.)ęđûę”fï˂.ôù‰ŽćÛïçźGîæPțő)$ž€›]ûvrŐì«ùNŰ2 \î-[ÄÀț™uÖLΙt={àwûCájïH,Š­_­‡[Żž…œyûhš«Çˆń`ÔA ÉÍ#ŐbłZ©źŻä„Ś_Àwœ“(a2™ÈÍߏĆdf@ |n/©ŃÉÜ8û:DQDäL߀4*«ŽńÎGDŒ-šŠȘ ȘkȘžùòčˆȘHĐ  …%‘aęȆšČŒŹé€%śÂf”a2ššwŚóû[Ç țƒÈ9ŽŃFáóú1š%\ žŐŚĘę&¶ÏhœfłÙžóûę–`0ˆ,Ë?‰œšhÌą$xŒ_GO'GÈçûșVéÍC«ë:UUUT’$eÆ ƒÁp±Íb Őí+šŽv”șV Ź#ÓȚÁ«¶Û­śæàȘ+Pï8t(ŽèCgÀDĆĄD‚Ÿ†žđj«Ï@uuu.đ Íf{.&&fźÁ`ž§“u›ü­ŰÙ:”è»ȘȘ„ͱ$Ił€ć­śűæÀW’€YÀæ^:©§a]»Zg·tK·œ"ôôNM»&6:6JŐT‡q:ÄXLf{AYáŻjê.6`(‚Šłmw$DÉĐÌĄL7•Éc&1 śâbb©­ŻeûȚmüža·o€žŹäg @ŠŽŒQ“đ+6«ƒŐÀČÍËyśăRVQvÊuÖoÛÀM—Ü@8lv4 ű=>FŠgqś wòÊ?_0nĄ ï}ț/>đ<’.¶ÜŒô–»f~qŻ‡Ő›Ö0ì7C z#…ìv ë·o ż0Ÿ„šXÜ.w“:YĐtÔP˜ïx€ÌôA8­ŃŒÜŐő‚ p­”żÿ èŰE =âRYł}-çMš A­ÍČFƒ‰â©Wžá豆X±~—=_ÈÏΜ;™9u:Ÿ€OۃPšš?†ÇïĄäh)±Q1Œ<–č—^ÏÁŒƒ„B!,”u.ÒRzaPD|^f›MՐC2fIÂlŠBSTTE#)6ôȚ}čvÎo$‘‰Ypû=É?ŒÒ/ Ł ą *ŸzÏ[Í{(êÓżEʑQȚóŁțbH2ö ?‰˜[û,š+ÄĐțé ê(î0’ÙüżòÖu«ŐŠP)—žéÛo‚ëȘ눘ję©U¶>4»,Žƒż¶€`gàï$ÖGŚőŸÂ5·KÓ; '96šȘÚĐI{€ś8ٞL0 ;€ ­w‡ĂáŽÙlY>Ÿ/Śçóyš—śûężßÿZllìJ»Ęț!Đ^Țà!§Âb6Ÿ„BĄÍŰă]ž˜˜űeuuőfÚP'&&N.ïšÍP(ŽčĐț)ÌnWŚ”ìuK·ü‚PœóÊ[^|ölŒ~/ècôüÒî~îȚiûfàźm`ۀĄÌ˜tㆍ%.:ĐOAyŸ~ś«7Ża߁}h§p0 FąQÄ8cˆsÆRR^B•«‹ÙBß}0 ÄÆ:)Ș*á­·ßćÇő+ò€Ä8c8pűŸ€ƒ ąéj ‚ÄWïáȘó.gÇȚlŰI·~ë6ìÚÈÙ#Šâv»ÛŰè4–źü€5›Örę%żÁ,P49bDFßęđ„ÇJIŽÄŁš†‡ W\ IDATQSœ&IęF…qûëA IĘĘf@m"Aąm; /;íÄíó0°wEkŒßš·ŰÛEAÄl32ï­ż°kïźŠș>_űžy>y„Gۓłƒ$áóû0›Ì)8Âș­šTöfł™—ÿ “‡LàŚßĂŸ#9ša™șúZąlP4ąŁ,ßț#ńŃqœŃ$~De-62È—ÎŒ„qCFăŽ:ńžĘÄXŁ0JȘëȘé—Ò—5ÙëWővö\~Ò[ÊÛy_ùțèꄧFŒžxù€9őȚCgȚÉÇeš±NŃNŽ\€;VI@Ś"™JÚ:莗oĐ|ì— șTwGeÓ€$Ò ÉMenu\Âțqkm‡±1Ä8œJĆżöŻr=°{ ČV|Ԝ.|I'*àf `W mÀêßÎÚë S€ëzg¶b­3MäôèŃŁŁöfÆÆÆfŐŐŐíoŸX­V§(Šs;êŻ,ËÍÓՑœœükI’^p:DGG/‡Ăï»\źmÍëź««;`2™>”$é·]{ĐO…ÔÇ\Ž›cŚh4Ÿ›ËćÚҐĆÇÇO0ïvČNeqęšXÎ.ûŸŒźmÔĄwł€ĘÒ-§… űü”„š äć9*]•gÄ:cèŸÖŐâȘé—a”Y))i—“šœŹìŰčăÌé}ڂ `©ÊËî[ő Û=ǀUÀV:à‚űk†:e”6˜ÀÖÌ_[ì_kÖGo”źČDz[òTTÀìÒțŽÂČX,–O“““ż’ey€$Iƒ Ă\]Ś{uÔQżßát:{‰ąűJ«±Í2™LłRSSËE™ Wz<žòŰŰŰqą(^ßÁ<”5› Ął9k¶NM_©ȘúoQïë ûŃ&“é󔔔4M; Šâ A†tÄ4Mû7­œ}țCëÚì–n閟ôˆGhăc%ê:AJúFÙąˆČÚÁ(°íÀ~ÜŽšŐ[ŚqŹ*’…Ëj¶—@|l±©üńÖ{ù㋏ i9‡öóÍÊočvæ•4Ô6DHś%‹ĆĊM+[„~Y¶țfŒ= I0 ”U—±ï`gO˜† ‚Ć`BVä[ Đ|kÔE É EÊ4ßët‡ÍƏ{ÖòàŒGyéáç™0h4”źZ›ŒĐ,aŽ3š„›–óæGïŽ9?Ÿ-ú‚ó'Í lÁPÍ+ÒeœV;Ÿÿ9žygk·ź"Î>ï|ńOœćŰt3XE|~/ŃV;“‰”û7‘_\€É`Äòb%TMDQ ôX)™œĄ…e€F{Êp ȀÔt–—źä‹E >ûtÉ+>]òE‡găńÌ\YÓWH’4·œ8€“-Ăù ń >kűyÿąŰ_Áç(žOż‡a– æŐÎGCo€YŠț,LžÇRïF.:ò;Šęô6§ò§Ț7òAÒ\\|?›ôœŠČß$ÏcŁoSÙ)ÎQŒ1àaæÇ=Κ’ëŒ"ÏÄĘÎ$ó0.>|/ë*wĐӘȟzßÄu=fÓPQKuš2ČNJłóÛi œëŻÀipïœ&ÖOïà îè” °-Űú:ń'ŽŚYùźôWăäL_H’ôtG`HĆčfłyn—'SŚ—ûęțăÁ±X,żî x/ƒÁđ˜ĂáxÌáptZ·Ši›[ŹÎÆ}’ŽÇăyŚétȚBûjæÈäÂLI’fžÂ}äöx<ïÒFï_p]9…û§[ș„[Nj j‘ ȘEĂj2WÛÊ+Nđ„GP4•Ę9ٍYná–+odüđ1Ä۝Ű-6ąìąíŃEJXAU”ˆí—Șą):șŹ!kÂșÖr‡S)7ÎŒŠčÿ†?ŒđqqqÜpń5”U•S|Ž”y‡ÈÍ?Haia$ïmeΌ‹ž`ôčűƒoüžgߜGB\óülÜlđgsçȚ§Áf@H4±ŃË”Oń)șŹĄK'ìàžœùŚì~,Bą‰RC-wŐÿ•4k*Ï%ÜÁ™%w ˜EžœŐË5فIlȘ{_8Ÿ Ł&3>0ˆ5r6W;fđTáÛ|·ÿG°Š4nźßóŚő˜ Â*[1u ÚpÛó€ÁcސzĄ–ßÀ«~ÉÌlïÏ­mÜșz j|tڏ#ŚV[Úi §r=€àóù>ŽŽ~ 30t*ąȘê着àŸ,Šą|ъŃÓ:qǁzÓűęț:»Ęț{ƒÁđțé]ŚÙ”œEk–ÒжOêìH&§“€Ïąšì«Ž$ëL=‘U[Ś!k2 kǗBÀh4 ÄcŻ?KiȚÒą b4$ łÉŒßïgćÖ”\sÖTÒb"MٶÖĆšAĂ“> WeӆLàÛ-ËűbùW$Æ$`·YùvőâHhFY·c·]rŃUȚZ‚Ą ©Ń (Aù„­c#w`M 웑‡Râ”ȘIJ}(J3˜ŒÎœ zIIdŚD7El;[ Ջ.Òd8ÔÒ/RŸî șM8©|Q8đ{ ‰šZäțȚZ¶Û ^4ŐlâȚà<ŠȘK)j(‡x#śx‰ś‡?CĘƛÙă>Dœìamívî͝©Ódˆ€Àv©ŠHÊB ÍD¶w+ë§Ç??űiDìËrA˜Ü΁żŻÖŻœCž-نŠ65MÛ+IŽŚVŽÚăÎûAžș Ś·žĘ+++ç„€€€ ‚pŐÏA9ç†fó@MMÍú”””íÍeëȚïńxîiÍæ544Ùl¶ÀÙÆe őőőE­æč‰…­ŹŹ|4%%%ú4Œû‹cÇŽę¶ æśxŸâÿÄșv…Aî–né–S€ÇíÿD­ùƒ§!Š)}űÏ_“ŽhȚ€Țę OĘü Še„)—mK…Oăs­ëpÒÿ›íOm<Êą  …C$FĆąËjD-}ÜBŚúü^Ł$rրqœ=t"‡+ űvĘś,^·œš:W‹:Ę^7‚Š“—H^YGËÊčkÎ\^űűï”ŚT'EEÔ°Í:„ë`ł[yÿĂ70LÌ3ÊÚ*Tâ,Ńű}~ŹV GJóÙ¶·ęŰŒőž^ÿä]Ÿ_·‚Û.»™gLC”Aö†™šÉàÔ væ 0qŰŸ]”„țié”±lĂJjêk9gìTÎ9‘€è8‚țj@f\æ(Ÿùń;jj‰ìèșŽŃl"Ź)Ô‡ĘŒôȚkì;ȟŸ=ûĐ75žI©$ĆGì3c18Ź6 ’«Ń‚Ș©‰ Śč„sa2›Ű_z„8»Ł*Òtdo€‹ÇÏä„Ïß -±ùe,[ÿcËŚțŠ2öćçrá˜sXh+œb“1šBÄäîű- é8~Ű”F9p śÿŰ7żű$ŸńăNà!±·u‘ő–>ŚDŸ6ÖÖËÙ3 Ž­ÖA•Šëh’ȚÂŃăĝšŁj‚Š”[^UUdY& E^BB5>đ‰AD…ÒÀx‚l„űđ«%{ê’Ÿt&gEfDÜ`F&dòû>Śòä€;™»û1æ—/j[Á-!FŃ+BćúǕ»ĂVîŁ^ń§Êîwu]ÿ€=Đ"Ëò'ŽoïŚYü»Ö P„šššì””” ‚ L9 ëȘê›íŽuĐh~żÿ‡ĂńP`šÁïśÒ@Ńá۱cw§€€4‚pûOœżŻŚ{©Ïç«k pyœȚkÇ‚ \đSXEÇsœÏç«§mG–wDQ|đäû\{»0¶`Џ;vwRRÒFI’žmDv(šŠ=VYYùv Lpč\ÙíàŸ»ź@àăNŰĂné–nùY  ąQ#6 ą„sś[Ûœ»ă՘h§á©Û"Ù‹ÏÉdA»!šôf`°ù~D;çGäÿ’ ⠐e™(‹]U›…z#żù]S5üęŁ{òĐwq͌_ń՚ïűêÇĆÔÔG€`mCáP˜G4@€âòb&Ă-üŻŚMbl4šȘ7zÎFZȚÌV•°pŐbnŸäZú$ödȚgŻłbë{cúC’D֭܄/àït~óK yè•ÿańè‰Ü9g.g€%ä Ê*ûŽ@%TIçÆ‹Żæ‚)3Ù¶o'/}đ*ëwnbęÎM$Ç%2aÄXÎ3•чăŽ;Éê=xgù%œ9`,ŐŸ:öÊ& "Š"çŽ;“;/»‘ÔűŹ3"‚QÏő0F“ I‘“dDĐtÂĄ0șȘŁ**ȘȘ š*ą FрÛăALŠÜ'oi™;g_‡Ùjáœ%Ÿáń{[jŒłà}ró’àŒcÒÀŃ(Áđ l©ëŰ,VŽT±dőȧ6ìÛ֑çÇQ­$°ÀśÄÁo}Ofž4ùÛeiłLăÚJÿ·ÇÉV3Ì>€”ŸìÆ‚-ûv<Œ† i…ÊÈČőç‡Ú­à%O1šȘ3Č_ÿHœ•čÄ$Ä026“5ć»Z0x1Æ( ç,çȚœyŽČzÒ{_g1?T‹@щŁűfÚkŒ<ôAæù,­đ\Žvy·i ȘvłÉ} (vû€Ÿ’ôžőCŰ4•••§€€LášV‡ț]”””E]dę:k·9DQ”?ÆOȚÍÖăĆêêêu<O­ŐjœS’€·š…UUïòx<”°’b#z8!!a©Á`xH„I]G©ȘȘ/UUU}JûYOŻŚ[çőzŻMJJșF’€;€ŹŸPw›sìśûß°ÛíCAž°ÙځÀtœ…E„ȘȘȘObbb6Z,–j§öșź _ȘŻŻ/ŠcÇEyèXŚ;Ęnw]'íwƒÀné–ÓĆ"HˆŠáȚwÿ§ŚæÜÿ°˜ÌńOÌœŸ1=‡àv»[†+hùBڜù;ț|êzK^à$[ńÈOI ű"€*ÚbEk‘ ­=›óp0H8$ĆĂ}ßÊEgńĆʅ|łf „UGńș=ÄFĆP]ïBSÆŠĄêjHnł'TÔf«™ß-B%ź<ëbÊ«+Xžf)%eÜúìžmÎő\=óWüžeÍ)-Êú›Ù‘ł›+f\Âu3Ż ·3żÇGX b2™˜1j*űd~3ć2ÓúóÜü—É>ȟÊÚjŸ]œ”oW/%œgÎ5‘ &O'-±‡Jó™1t ž/^Ÿ—ł†MÄ"±š,„C!dŻBXśErì ԄűdŐ7ŹÛœ]ډrïŒ%1&”„$úśJ'-!•űšXÌąŁ$1(„/[ïAŐT$"©Ü4Y!ÎEmÈËwë–”9ȚœGöłśÈ~>~ú-Źșż&79« F|z€ÇÿńÂggśâŹ:Ç% ì4<“á5[ìł}á@›AjŐÖywqOï«xuÏç`8ĄžŠ‘ą8Ó>Š”ŐÛQdŐ's(˜Ïš„\—4›żí~Zeù}żëXS”ú ›ú`€= č€Ït^)üš©Ÿ.M>‡cEGK(Ò*èNŠÈR&LPŸ=țCœ•:ÜjäûæP!ĘÒ»ô/`§źî=%@vìŰ±Û“’’‹ą8Ź -©©©ÉŠm›?șxđ¶ :kjjöC‡ ‚à ƒûÜnw}'|XšȘȘZ|—””4 ȘȘj} g›@ĐkjjÖbbbú˜LŠ)‚ €”fźt]ÏJEÙèrčö¶~­c6O©ŠWUU}|?Ü`0Lz ‚Đ 6èșžŁ(ÊÒ6ên`y<žZÇsu\\\oƒÁĐ[UŐ—ËUÜ3+Žw}}}!p·ĂሱZ­SDQÌjcÜ5MË Œ^o=]Oś'4Ț3§{]őæŸ[ș„[N4Q‹š~ŁmQŹȚł!~՞ïĂ/˜4YăÎ" ăpŰĐ E‰xûȘš†püč„ížȚ ž€)Š”1 âőy1 ÄXŁĐĂÊ PÚźŠéD;J8„ “nK≫~Ç„“g1ùżiš«Ăi Œș"’XV@Ś"Ù6ô}4MäWóéòŻžâœ‹Èì‘Î[‹?ą€Ń–. òśÏßć›5K)9V‚Àô±SčäÌóPT•’Š2ČóöłçÈ~jêNêy äĂĆ_°|ó*nš} —Oč€(ìű}>Òl‰hșFuM=œ‰|űè«üćó·ùxù—MR ˋ),/æ“ïżÄ("ńè“DqU1ą. h ““ɈźêÈá0rX&^rpûŹ«=`ï/ùœČOêc”ÍABl7ÏŸ†œú# ©*^ż«ÁŒ©ŃÓÛl2Č|ĘjŽV·QЌψ^ƒ{=u QLÏ~𶭓úșóÍĆŽ—Śí$Pè8pæœf‹ćY·ŚkU:đêŰ?X™ń úÏățšżSź`„uÿJ{"2Æ ”<ŠHOíƒŐSßç›IŻqïÁ—(ò•ÓŚȚ“—‡=DŒ1Š{7>†ÈœrïȚyŹžú>ïyާ ȚŠÈW΄=Îáća±Šj;kʶҷgŸ™ń:Oz‹…ÇVE@bsž±ś„ÌÏ_Ș~Č `@łŰ“'ûŸÎm=’čbÿ3§yoh~kÍß6€TWUżAšÀă)ÒöŽŃ§ŽÚi Ö¶3&œûšyZ:­qr>ܶæ 3&ThՆàrčȁœŽŠŻłșÛ|jkk Âv=œŹ^=iÜ^Ż·Öëő~,>…qkìŠ9è`]őv^„.ŹkWçé?)B7 Ù-ÿÀˆˆ ƒŐhaóÜțúĂW‡äđ€ï7ŻäPQÉń‰ôëՇ>Éœè“Ű“Dg<É1ńD› jèȘ†źDŒ'UMAQ”–(łÍg&ąú5LŰ-VUÁn¶e¶"ˆMgZ?zz»„C8" 14ź/Ï_śÇHæ ł€âŠRU!@˜hłp ÔÈXFÔË&«‰ù_ŹÈ\1m6” u|”zńIsVrʌôœùĘć·pȚš31(ûlèç‹Քł)w˶źfKÎÉv‚•źj^űàï|ży%w\|g ÒƒŰ­V>ÙžˆÔž$æĘò0ŁdńÒço”ZNG4SGŒgęž-,ȚŸ’Ÿ›ï6ü@Um5.o=uîzÌFqѱ€'§18­?œbRЂ †°ÀÌA“8kèxŸȚŽŒŚŸúŐÍl'=~/Ăû fòđq<òÖóôïчԄd’œń˜&ÂĄ0gôÊÄò±píÒvï+QčâÌ٘ŸŠ5f0YÍükՂúôèä;^[òĄ»+śšŽmì {ŒămUU§ŐÖÖvZ~”{sĘÏËiś“—ްéûWD}T=ÈŒž?d^ÏÂŁ«˜łéwŹ©ÜÎÙ+oäęqÏQ8ëD"’"_9g/čž=UÀi ÖTngÎú{xy䟾qÀœŠČ ËV2wßÀ Đ7Șgäzw9ßLz”Eß^9ô!Omz-Âț”eĐ 6kxšĆĂæ èWsiÎĄŸöÚ ÍÒYčö~œ‹m¶UNkhSĐ”6:b7Ûbőæ­Y_Ú€t>h64íŐßQʍ]8…1·YboĘí­CWÀo»°ƒ—¶~vÔœƒ>ęß{]ę7(ì–ÿˆĐšÖQe…ô„žÌ»îĄțœqÉ2ƒdès޶ČÿțąC™û‹ő[”sC $‡ŐNÏÄú$śąjúöèMż”ȚÄ۝ÄڝÄD;Ń5MV#Ÿ=8”&ÁHüș Pá«CőiŹß»‡ÉŠ(Š˜ŁŹ FD„ˆ7€ąFGEEŐŽˆ-W 5tK'“P u;1ŽˆÙKÙ±Ł˜ŹfŸ^耞ń)Ì6 Ÿ/&Ćb¶pšą€…kŸçœ3&3șïPŸÜŽ”œ‚ƒ-Áˆ(qŐč—pDžŚÒÏŻȚGXo°9ÍÇu/æČńłŰ–—ÍG+Ÿf}öÿiïŒă›Șú?ț97ł3éÊhZölQq€äAŠ<>â`:Đ"›Čw+m2d• DE\Ű:X"eތ¶Đ2ș’źÌ{Ïï$% 7éęćûzĘW’›{Ï=ûŒïçŹc`­&$œÉú c–ÏBïîœ0:z8:‡¶§6 OÔSùŃ4Üč…IßATx,ùb=Ÿ9ö#†Áœ!ăńTŚÇĐûôݘžjn”»Ç/üy/ˆ‚à€ <ûГÔë%tmÖڊ*PŽĂĐŃèŃńŸ~„?.w3yŽ}RbâŁĘńû_§ ŠđțKƒQpçć2$łmGLÁÉËgńśUû\Ò9ą=țÓęY*Yˆ8Ž‚ q:çoúÊDùȘJ–Gć ń™Ç'IŒ$ 4ËČFćj’ IDAT5”uPżê( á°ïæwŰwúžńyà€3E Ô•!<€”Ueśj „¶ ĐŽŸDāȚè*i čĐ9ć7ŒË”0 ŒÍš)óî»ù#öćț€źR«kĆ à'À™Ò‹˜ôÇ"Ź8ț1äŸ2tőooLo“àĆȚûł€…Ä8ĄDÈ<™ ŸuLÀàó Ülž(Ƃ:Päj«8ÚMÂêˆ7­mhoB ±qŰđPCm)Yp—ŽÜvç3ȉ‚œ:Sÿ`§;ÇU°§.€ƒ+/ ő~|€ÀûÇ(€œqpçÉ}ͧUŠă2€ê”N֎Œś/,+i”rh»‚ŁŽUIIIçKčWÚÀžQ}ț!ò A“ Fm–[ uÓp4 n‚FțAđ—xC"Cˆißá'ŸÆÂÔŐĐêŽPëŽô“cHÒ8x{yÁ[ê ?9š4BóP4 n‚Py#È%>đJÀp€VفÁ`0)yś–9bàà+öBh`#ètZTTU ĐË ©«Đif(ŒA«ŐB(bË·;Ą3è1ôčÿ ŚaçûkžŐ24 ÓȚű}:=}„¶z" ±*û ađLÄ#xòƒ‡qêÚ9ŹȚ·­ÒÌĘÒȘÊr:ö~ÿëŒțÜ }úet m˜~C0}Sn—ÜÁìŚÆ`ęèD,iČBĄzz΀ÆĄăGŠ/G)î”aŚûqđŚï0€Ï+ĘgŒ9*”*t”‡á“IKńțêYÈč}«FÇăà/‡ńɡʀŸÏüŽ_ÿ:‰Śí Â0đöĂÜ­K Șčßę=–_xó·-ĆÓ]CڈŽđ—zăbÁUpzą»=ïł«ìÀKÎ;t$Š©@WŠI7üZüĄ€— ™WcIŻ&@,7 ДU“\ËZjüÔp5šçŁU§=$|DÈao"Š3ìeăÀWo %N@pƐmt ä»KqśBšÍk) Ô”aEÖvÀK„ž GŐ§Ă]?ÔÜęƹɻ„U%né Q -DźŠYêPH™§ á~©c(ămöș%]™ '*œ\ăšá§üMìšM¶@”8aGûŃ;`E„Í áíÎҔځ_>pJyŠ7êÀŸî@d}ß+* œ|ë1=ˆ„~†Ś”Ł7Ï/Pf †1/Œ,‰Büëx‹żźg”*Tw8wćBŒłÂZűËŃ:TE“fˆh†–MŒ€x)ś2”w{Kʕ(耀lÁ‡Ážčč€a4n‚šąSD;D…·GTx{4“7tœqâƒÁPŁ8ŽBÌńT§nx«ïk :ŽkŃEÊb,ü<ëbâáÏxăTȚE|sì'<ÔŠ3žíÔGÏÇÉ w‡ŽŒÚ«&Dż0żFšPV€‚BóȚ&Ő»šGšJ> uE%„Á zàÀoßAŁŐ gdwÈ}dèÖ S6&áfńmš*ʰń@*Žœ8Šśț3/?Ńßÿہüą[xë…WŃ”UG<”ȘȚŸ>èÙč»SŽŽJM6HĆÜl,1 Á"?–"żä&X΀5Ł?Dvț5ÌĘșŽÆ}ÒRńBç'ĐX$ĂË=zăő„1¶:çkXqY)v~ż;żß‡¶Í#Đ·Û3èÚČ#z(:ĂbšŽO8­X7pŰPp†3æƒŻX D„@& ĆÓòΘÖb0nëĐ8Ù*WpW”Ű Śb1 zou.°óŸ­ȘßȚ”rśœ-?T»A™ĆÒë;đ‹ê:*Y€R…Ç“ŠS›}í)hŽ ‹Ű6{Ș"qˆ ~æ~|ÀÉ ÙSŸ©=¶Ô0gjQmgŽò….[iÂNùŒ±€nű“șŸ†Pو“s|ò qR<æ±c?]Xënűțó"ś-=g>śé‹E©żUiŐĄŽ5Óö—KŽ:yél{Đ5–J€Ț39+\ „üütûGîȘèpąmšąlÇŻƒĐD$EžrźKȚ‚nyw ÚęúŚ©` jŒí»âčš'đx›źhì­Zœ^g\ʅ„đ{Ąž\‰ÂAËuö‘Ł‘<?țù+öŸüo=û?€lú:œÞ)#Fê_Ł‚e˜üÊHŒȚœ/8Șro/° Ç@§ÖBÏČ0îÌDïŠè%•⇿~Ç·'– ‹ńTˇPfšTńńž…˜±})Î^1Ša9·n`öÖdìęć[(+Œ*ÛwdÀGⅾWÇAš„0p”=ZFBîë_ ùXzæqLܔ€-Ł“P©­ÀìíË0ô™—ńdX$~Î>…6Í#uęjőő9·nà“żÄ̗ȚC§FxŹCWłŃĘlÏČn\Èçÿ‡§[= }„,txŽu—š„ƒ§5žòYr!J”æÈS[űă!ßCÈŚ  û7Ô©(70žŃs(Őż„ćèë±QăÛۂ?âú܅N>~„nȘKö@ÔQŚ%_śm5üÎÀ·ŸĄvTXëŽàŁșòRáni=æíș(7ÄEƏÏËŃżÙ< ûOÀújd†Ż›nPl:ț2ŸŸóò(Qł€FAÊ;7țűEĂ0]”ś‹êù]»Đđì);—jŽ^8ŁN˜o)0§`ö€śE,Ç)>ûęë·UĆ/Ü,ŸĘsïŻ‡ĂśțzĄađŰóűèóhĐș* ÀrđJPVUČȘrű±"JüÒw”ĆXsàSdççàÇ3żĄMł xä9dü}ߝțœ:wÇœŚÆ cp8ȘÊ+ÁRRĄ‘zì Ꙏg:śÀ€GžE3ß`hÔjSw4Lk R0` É{6àć}đ„"ć%JB VW S [G'!~O öÿț]uüÊ>W#>Ÿëò8B$ț(«(À Ó!"°)ș”é‚ïÿt}7ȘăÿÄŹKÁQŠèGŸĂ ź/ ŽšʛvÀΉˑôŐz|ùëĘ%^vü°Ń=ƒ.ÍÛ"DèòóòŠ àïćƒ*Àê hÔŹEÆécQ~t©aŃDŠH߃(c»AÇę{J­†bŠ9Æ4ۋÖ%àł;ʆ(§v`Œ8>ă ù€ßF¶.j'œ|Ô)W Š>»țši˧KŸ.ă¶!ژ†ÿGx–GyÌš?ˆ Fê)/zì_€ÄĘëöŻ7žm:2ì€MGśđr(ńÀF=Œ]З€Žï=€ù7™Ï_Ÿ7űÚÍŒçVîÛÊ|~4 Żőê‡wzœ‚æÒ űVJÁQ•U•đÊàE„hb“Âl:ô9à͞/ÁG(Ægé0ČÏk˜úÒÛđæ„šT6?/oÊ1/u5Ҏę°€ïŻŽóèÁëœ^»=æŸÁĐitĐé” àçïƒőżìÁ͒;Ű<*† 5@©qÿ^êȘ*ŠŒ°|đTŽnÜ+l»gČdć_Óőyăî(Œi===đBä8~á Ê5•.'âă?`Űł1ú™ŚPZTÂș* ÂCĐźYüœ}á-ńBŸ‡žÂ§?îĆÖżÄèțCčŒÌ‹!:JigBH+Ji žÛŃyí:šŽeŃïĄ§Ń„YkŽòjN‚ćÏ8Ê»ąy%Ä /íCčĄÇżCùł†@“–x.à8Eʰ&żŒÊ'qа:ćyêÉïŽșÚ\m”š‹~âQŽ҆șù?”đH3âÆ=‘:FĘtÓ]H"NÊ Ÿ°Ô„ HÜÌ« —î@žg\ä?I=ÿïČ­únG>€OçDż·óòíë=ÓÎțs[YôÒêŸJűó7L8Ę[GÂK(A±Č-BÀ@ˆˆÆÍkžÓH„~‘=qûÎ zìE< V­ƒ†Ó@H|}}q2ÿ"Š€.)Q©”Ól€žmț8#ûôȅ»ŚőÛńÓ~ß7zŸ„<‡YEnÙml8ô9&żüšKQQYa±e2ĄzƒÉ/ ƒ"(ówŻAičȘ†ÿČo怂«^Œ`”:t 뀄Ą±ăç4œÈÎt9țÎ^»€Œ’ ę 3èàç돔?}ŽSÙç°ÆZTVU!JŃ·J ±ś·ĂžUrçL󀯋”Uć,Œa°ŻF§ő?—荗HÜ*ëvžâzÉ­60ŽĘ   UV–cÓĄ]Űță>tè€Wïƒ2uĆórożDeU9çŽ2yÌ_„ŚCŸ@%ŚÓ8œÛ"+šńűG–Vb<,C,aÚą“ÏïÒž;vÜźȘŁrK,Xđ4„”˜vC©țŒçbBhnnnfłfÍ:NčdɒœzP!ŹÖêßńńńOK$’„( ”žŐétæÍ›śłEÒŐú…ÔÂÏ€–awWőä ܔïsââ➖H$Ń ĂDÇqg”ZmZ\\ÜÏ.†Ë2ęą ƒrÁ‚č”G}+ŠŽòŒÍ—€QŁFÉÆ ‚^ŠzMÉČlz^^Ț§ëŚŻWÖó Ò?ĄûŰÙ°6„:G)”źĐŃ­[7œ:uȘŸÔ>Ś“zÈä63Ј'ąŸüä·ŽI^ ùü œŸzôy/¶êFÀ őÏC˜òIrő=ïŸđ*_‹ÊŠ ˆEbèu:p”B$Bà%Æg§aáȚ4—…Œ9—ù€ő3 kßûÏŒ‹;4 ÁkOôĆО°îđNä`ëÈ`+u“'î|||pêæ%Ìüü#dæÜ]f„młìż2Ha^Y  D_ŹâëˆTŽCì'‹pèŒëE<ú‚QÁ XŻC9{Wòl"nA°ĂćaD Š-Äm]^ő9?/ü„Æu‹ò4DZ0ïUś|… †lăC.ßč>gę‘Ï[ k€X(„NŻG3Y#ˆBèY|$^xę±Ÿ`ŐZ€3.& >)Ê©óö,Çç_§ÎúÏ;3’Ÿęű–­çț™wń_z«Ž«ŸȚŽÏÒÓ Őë±mL$ƒJÊYÌF5 Ț}ąšŹšÀ#!m°=& łśŹÆÁ?Žî(‹P\ĄBż 0€` ,B}ƒ°śìOž^tÛF%aêŽ„ŰžqÀ„Hțuÿ‰ë„·?ÏŸ“w§;żŰ À>ßaJ‹ŸĐpȚÆ­Őđ;( ćÄx»É~†qK¶4;l4îÀ­E™Ż>L]ÄpRÎí•m[ŚÙUYÂĂĂÇBYYY}Źá–,Y’[TTô!DĄP(†;šƒÖőq{abÜx6áæ.y{țâăáÓ #‹‡q·ĘțȘï]žpaŠZ­~_ Œ1b„ÜŐ°Ì˜1cȘ „j/uÇ|›m]LLŒ\$-”€Yłf­aYv”I!„y“±Ófș’7ʍ3GyÜÙ9W▾ yŹ.ÀZÀŸÓî  K\ž·.2‚CY9ù»Oóș‡wšt"çï=»~û¶ ĄÀČW&ąčŹ}üĄȘ,ÇàÇț‘ÀÀQˆ€Ț^űêŻŁ˜üùČŹÈÆ­&]ž•ó=F ÿ~ ptŻA1›Ęw@Çê«¶nÔĄ^ zÖm¶œ°\—zœbV€č}ȚA3YŠî\ŽŹükèȚÍ VŻG§pD¶hƒ„}pœű&Ÿ:AM1iÇȚ“C*”j\œsr©Xœ %ïpË"Pä…Wí=űRț”Nç]ü–gÚóMkŸ‹ÀȚ]ž".üyÈšÙniŐR č€3…ÌÂ…3š›†Xv·Űër±#HæÏŸ-‰" ŒŒ}șeŒfÆĆưr/L*•Ê’’’ÎÆÄÄȆ †3óçÏO·ŁÒÉY–=gŻÜΟ??má…ĄĄĄájű?66V8€"ă8.śòćËiŸ|ò‰Ê"žŁȘȘȘT«V­Ș1Đ2 zœ>3>>Țrj̘1#JŁŃ(-Ò'***Ò.\˜i«ź7„{4!DÎq\îŐ«WlĘșUežáÇËZ·n-”R•R©<°téÒ'j ÎqœÊüUżì­iԚўùóç?_çoœő–ŒU«VŃ Ă(ŹòIőó&NœšJ„òE‹9sf€ŻŻïS9;°hŃąL6l˜Ź]»vĂ!2–eóČČČÒRSSÍC!ˆeȚ6čQWl”AbvłM›64Mú‚ Ò­ÊłÓ4‰Uűùù)LáŸ'fϞ­H$òyóæń( ŹÖü9zc!<ÆJčłőĘŃ9wëç0'rțŸ2é™7_púóßżĆÒï·Ł‘ œęńhËNèm•^B18Aґ­ˆÙșà›¶A-^țőZæNTÊçÖŠq±uHó±0źk‰PŒèźœ Š ő’ÂOê ©@ G@8 ÂQ0C Óź, %Æ}•+”èŐê!x‰„žpĂž6C†3^OY ?"Áó|’qĂ7ÎÂS­»b繅h*á•đbĄCzŒoNpP˜üÆ hÔj<Ć<ÙțĄ™Gt 1œlˆl|ZöÎY¶îÚœŸ«Ż?šK’ĄfM;ž@È"æÁWțDŒŃŻÄÙU,đŹ|4Úxumű«aǁălÎÁ!œqËEYRRÒ!‰D2Öô[.—Ë'$$lŽ,ûŻœöZ@RRÒ™L¶›R*ç8ŽˆĆâ„IIIߍ1"À‘:0oȚŒ§9Ž“_čr%ÍYfΜùȚŒ3úXÖKńńńÃ/B"9Ž#„šKqqqĂ-Ÿćïïż400pXRRÒ‘H4ÌîšÆŸ;wžža5ÚÍqĄ”Ê%ɒ„„„M–nx{{:))éžÉ B)•ûùùíNJJ:2xđ`sXÿáȚȚȚKm՝Ăęüü–`|}}‡yyyÍæ8BĄpš··śìf͚… ŻŒòJ@bbâač\ŸË݉$9))éÈ Aƒ,Ęóőő]:cƌźáááY Ă c&Ü^}n02†úæ›oÊíőđ̜9łŻ @Ș某°4$$ä!$Šă8Â0̀öíÛ_Š‹‹fî%ÁÁÁæßäÿûß=aJ„ÉIII‡ $7ç!ÿ%æô‹ĆăÌqëïï$11q“”•°488ž†_Ú¶m›eJśêkăââ†uèĐá’@ `ÎAAA'âăă‡;Sź! ƒÓ15˖-˝>}ș4>>>Ă|ÿôéÓ»¶kŚî’@ °Ì'G7[>'00p˜żżÿ’?üpŽŸŸß&s9“ÉdG,X0gêÔ©Q:t8@Áq …c;vìxűőŚ_°ÎÛ ›LnŽăˆH$šłpáÂKS§Níj'sçÎбcÇK š5nÓ*śööȚ˜˜˜žÛČ=ă“&ƒH„Ò#&L·ÁÄŚŚśK@đ4aÀcu„șĄț9›Oœ|wŽ’+ê 3EЕm‘Șżtt甘'ț;|Ăo{?ęèpêĂ횄ŁC“€gŸÆ­ČbŽ“5Œ똌w{òòčUœÛu_päâq,mbÏÏço]û!ÈG6ȘžR5LkĐu”-!ŽmșGtÆSm»ąK“V“7†ôXX–łXŁß8˗c-"űIœ‘[T «C;TÎ0°èÙČ+VˆÄĐèuűțïăűïêXlykŒ[··ÎÇč—zÜK$ÁC-ÚA&ńFčŸ,„ 6FÔŒ~êŐ¶ÿęëŰIÒÜĘÂîh?Ö»ż‡4ž m!pT|íuähòÁRœäÏ<°ËĈ ź<!@!U ‰8 ƒŁ~x)hVÜè@WŚJŸ=•ĂÔŰŰt€ă80 3T­VO[°`AȘ9-§M›vP&“};qâÄ”+VŹÈ€N:Íæ8Nvúôé'Ÿúê+%ŒțúëkștéČ«uëÖKŒgïÍ_ DČ,›čmÛ6%Ïș©ÚæÌ™3@(n,..î±téÒL e(%00đśÙłg—%&&Š™Ă#ÆZ…~ű!€Ri2Çq™łfÍzÜ|~ÔšQk[Žhq~ÖŹY“’’ȘʐJ„Éj”:ÉҍAƒ%EEEjߟęï›ź%Šzűž2Áq\u=wîÜ鐘˜XĄT*g,YČ$Ă|mTTÔlJ©ì۱cOîßż_€80ć‘GùŒK—.KŸűâ‹ śä~~~»+**^KLLt4‹.\HèĐĄCŻÎ;‹‹‹KU«Ő‹/v8ƒìĂ?L&„ôż~ęz”kŚV«{óçÏ+‹7Ž5ê—őëŚç™€ąș^ˆŒŒŽ^~ùć”ĘșuÛi–emŠÏŒ3úùùšŃŒiÌ!k0 ‰Èłțóöđž-ŁzÙPśjs8SțŒńûzŁv‘ű«ò+lŸčŁČR° w¶ßȚV^šiË”đ0P D‚­·æ".çmŒÊzŸȚڌ“ćG!¶@Oو†Pțx(€à8,Ëæ.X°`‡ćùäää –e3ęüüú #GŽT0 3ŠĆ*† IDATŠŽŽtÆW_}Ufź+víÚU–ŸŸ`Ű۱cĂíœhšT!—á‹Ćłu:]ą țȘë©e˖ej”Ú$‰D2Ë|ŽeY›á)//ßÁqœąžž8Éòüúőëó C†P(Œ4»Áqôzę/&7ȘŸśĆ_”©TȘ鄐Ą111áæçqgS]bY–˜vA"–Š«Ć9òöÛo+†]RR2cÿțęæí~ÈŸ}ûÊrrrFB†Œ9RavRYVVö~bbbșł—Ż;vš233_T«ŐI„^ŸŸŸ‡,XPÿíœ9sƘܭŸÿ•W^‘BÆ(•ʘ”kŚæY†%>>>…eÙÜàààh‹|äwȚ±@öï߯șvíÚ„!ïŸûźÂ"üčq XŽhQËș>>>Ń&EQN«R©bRRRjű%...…eÙÜ   h€I“&ł CŠuz%$$€éőúÔ   ÙŽâŠă8č^ŻwuQv2†eÙÌžžž«|ąR*•نóßÿțWn·éćiș„# ,Hć8Z­6Íț€h”Ú"­ò6™7oȚ(kQæÏ?ÿœÎqœ|ÖŹYC)SŠôâ8NżÖòÚ}ûö© CŠ@ š‘ß„‰©«™šŐêTBÈ0ë©T:ŒeÙëÖ­SyĐìÁ@âB—/ÿÉ'ŰèțłŚ%hŻ‹ĐÖœ"8™L°őÄÁ[/¶{lxiUÙÒ 7ŻÎ°ăÀ™ŸńæÆ™§ą·t»ądżŰtFĄœóŸ8X[zëk«Ÿńh‹öŃCîóż’rUÒOŸ»o]ùVŽÇ M31çĐ&|{ùJÙ*x{yĂWì #a9ű „đöCQč7K !fՓ@P€ŁzăÙvÔ—RĄÄĐ-s°śôŰ6|>FôxÉaF(SWbƗ«»o%Ê9 üÄ^5&š'ŹuŽ{B,‹‡ہ9±›đ'r’ŽBìșs /OƚüßpąìK_X‹V^‡ŃDü đ„„!6đ €Tüąz[nŸžœwĄÒ©ÇúÁRQ„ŠÆ‡ÚRZ9ŽƒN§;h Y–U™Á1((š'ËČy˖-˰źSÖ­[—ÇČlŠżż/{=Š‘K𣠔F*•ʃ¶ÀČŽŽô „4òĘwß 3ƒ‰V«=h‚ÍjŠ”Rg eÇA­VgŰè2ƒ%K2X–Uö4+;–śZ^oȚÄâ\ő55êÉČlȚòćË±ź—·lÙrĘ`0œ îi ë‹/ÎàŃ;B`śîĘȘ„„„íóçÏï;wî\ŸÒÒÒÿètș @0€E‹Ϟ={–ùčmÛ¶íÏČŹÊBŹaóæÍ딐bb†ê0üńÇyÖa°JK`źÎomÛ¶fYV•œœlÏ/,X°Öôł—Z­ȚaKäP«Ői”Ò^ŽÚE;/H|–F‹Öj”¶†4s>iŚź]sț7 ûöíSY»ÍqȘȘȘÎY»o­Čš^L2l•ƒœ{śȘôz}†ięB,]șô—čsçúYÇńˆ#”ÒHËyęąæäő‹§œV4YßÌ?žuAYQ?Ż_záÏë—YûÓnY«æxČU$žoßʛw@3Ÿ ˆ$bÈ€ÆËW‹ ĐłYgë(žnőVęđ9 ÜĘIœÓżZk…ùˆ{é}4ńąk~țÂP©U‹ìhÇńoq”đ’ŽĂCÁ-Q©Vƒg Ečș=Â:•üxń€šĘüöÒŃȚÁYteȘ°8ÏàÁÿKęÀ™œcˆq­=GAîS„CA!fˆq–25W” —ìH+Ț‡»{ț明ú>»ûżČ,kîŸgÏ_ ű±UùWĂ !DÁqœlΜ9ßÜSÇq {~3 čæEŸtc#&&F4,)))ŃÇÇGÁČ,Vź\™i«ü­^œ:sȚŒyđóóSÈłšÇQ'áŹń[­VçÙÈŚ0ș7‡Őž›fĆÆș\˜TËž łŻÆŁ4ŒfŸ—’țÛòʓȚ˗/ϐ iòäÉŃ>>>;§M›–—œœœJQ˜ÂæŽ>Ž ‡ƒ0À" '/ÖqŁ`Y6“OÌq\˜H$=gΜ!Öù€Ì”7­ï5Ś7„eÙ\@ ĘÙpŠéÓ§Óëőč˗/Ïà8NQUU•iÏ_ƒ!Ón«rFmä?jGŻqÁ`°»|^ŻÏ=qwRŒąiÓŠC„BaOBH˜)~aYVeí.Ï4!:.U DĂžJ‰íÉqLĂ'r+żÿßèæ}Ä ű1=ö Z†4Ăsm»á‡{#ĐËž6đćąë  ÆAÌÁ €AŻGdŁŽiÜnȚËë3ŸBÿŽObŃKŁIöŒŠoÿț}§ZŻ} @[țûęê9üoÓt$E€Ś:= œV 5vàvU)ț.žrȚg|ҕoZ:?ó'gu‡`Ń ăŽ ÄšĂæhČqžä8Țkú&X*ž/„Q@8l,ۄ>œ&éÖ€vńyiĆíœk0”1Ç4ĐæžY‹ÆÇRłƒ!ŻŹŹlĄEK !՟•••9öÊ­R©L ’M˜0!ÒÌŐ°€€€a„Ąt_S[ ŽEŁIm)€¶Ü°nhu™[ęO,ÇùÙRpŹÿłPcaŻ*•jĄŒT_SVV–k 5Č'NŒòöö^š””ôąœ„e˖„MŸ>=E ôj',6ăȚ:Îm…Á|-!*•*ŚÙIG§/=&k‡Z­>gòuŸŽŽK[yÓ`0€è `”ł€‹DąÇœ Å|b3/8Èof0­q3„Òòú˜˜˜Èààào8ŽË(//_{țüùŒïŸûNłfÍúÆÒŸiùùù)-ZŽ8ÿÖ[o)¶mۖ+‘H†éőú4xì@>]ż¶Öebœüv¶6•ł”ÜÙf‰: >0h«Â€”Pû\>wòÆĆë–xù••ȘËÇđșZ˜«…ùűüäx‹„€K7s Ők! K«_TÁôhâ#ÇómșÙÀ)Ï Ađă„ű»àêçjœv‹BȚx§–Ő?V\UÖOÏzđ¶ŒçNy)F}ŸYÏćaÊSoÀ bhôZˆDB•—Òł—ŻĂŰ]Ëțˆ“ž¶¶€Żș@đŒ<"Æ8űùš: ‡KOàRU!Úx•ÜÇwNÊY5–]Ęę‡âIÿ·&í„`QZz=‹«êú@{ûčRoű¶Tjï?Ëû4MŠÏè5kÖdŰJÏŰŰŰĄȚȚȚÔ€pȚăÖșuërf̘‘îćć5ÀkNTÀĄæFćÚ”kg;vìˆqăÆő\œző=]ŸcǎíĆČ,ź\č’ €Z©ÔF#Gm5œÖ  D"éiRÊl)Z=5MŠùyö҄ięLk5V­VgúúúŽNIII·Uv&Nœ8ÄÏϏÈá8Ž:€™áąFë5f̘Ȕ””L;y,ËȘÈÌiìíí=Ë^F›:uêbŽăò–-[–bùâ`[ńE'Nœ8ÄßߟÈu”-Ő&­V{ÖËËˑ_’9ŽË]¶lÙZƒÁÉČ,LyłF|ŒęöÛaÁÁÁC-Ôœ{ž«V«·K„Ò#ăÆ‹\œzuŠœ|9yòäa,Ë";;;ÍŹđ‰Ćbë|BmćùÏ^ù$Ž@BÈSöÚIBHOœ^ärùLœ^099y”jG€N@|òÉ'yÓ§OÏ0Ći"€è;wî<æAȆ5w—±·Š-Űł7Î֘<[cŒ\ùŻ!gcE<ĂćÊ7›çJŐć7ń ŹŃ]RĄSăNE©ń-KYˆ*œŒ©+–Đ»‡9œ;ö„XPłwśù¶Ę0łç›PVU`äîE'”Uć;s•·ő·ÊK~Ńł†Ù7m;Z"íoy݁c‘ü}*ȚĘłùUĆđ{AHÜ./UŠŁ‚ă |'ö8[ÒÇù"€=üŁĄ4Æș‚TŹÊÿ—Ș~°}sÀZNĀqÖ0E=LòÀQ] ·Y ސ4 Ć‰Č„űèÆóŰyg2r4Ą»ßKüïgea‚›cmt?Q[*OVVV:ËČČ>űà)ëFlĈ ĄPžQ§Ó)m4LŐnWUU-à8n@llì0{~2eÊFŽă䅅…kĐęûś« C†T*cíH„ÒŃƒ!ă믿VZ)l5•RJm4ÀÔVălš9ÄV#;a„!,ËȘČłł3LŚ*)„aÖáèŚŻŸŒRÚÓZÙ±R\é„K—2X–•5ê)ëŽúèg–eÓœŒŒ6 4Hf+_Ž5*R ,ŃëőköíÛ§N—FÚżÿ{î™4iÒ–eU—/_N·ńąUă°(Ÿ°Őá1)ù=ß|óÍ0ëô2dˆ‚RÚłąą"ÍtŻLŻŚçZ»ùæ›o†™ò„­çÀNšÔ8ŻŃhR†2a„Ą,ËænÙČ%ŚÎ‹œÇî#:§ćhò‡Ł5ûœMìà E”@á}„Hw›%:7Šžb/áźàvy©q¶05Q„„A™ŠéWÎÔHĐ6!ͱ*z<$>˜¶Ș˜3°+oW”rÖńuș ëȘ–Őohî2F!oŒÆMȘ—#IûëüwÛlü{ȚRoœÉÏșQą.Ż€íÙŚ€ÇÀń/ŽWŻiŠw!>gČȘ~ƒq·ŻÂG^ʁLTČJlžčŹÔêđ`©›nnB[TCż 2ùô6N”-ÇȘüȚűQ™jê‚oH«Ń˜ŰȘÄyțGÍ ĆĄC‡”:.ÉÇÇçówß}·‹ùęûśśȚĆČlúșuëÎÚi(șjŐȘtN7’a˜M“'OȚ=f̘êÁù111‘±±±» Ój”S¶nƚkŃ}<•RÚk„ 5ÀÄô»—R©œjćç{ÂC)„6čjĐ”è!§Š.ÍÜI“&­ïÓ§żùÚwß}·‹H$JÖét)ß|ó-,,Lă8N1nÜžĄfwûőë'kߟęb–e3­ęÂqÄb±9țè‘#G”Z­6ÉŚŚśówȚy§ú|ߟ}eĄĄĄ;Y–ÍŰŽiÓY;ieŻƒ@EEĆ JiÏɓ'7n\ô€dđÒK/ÉÆ7ŽC‡żq'żtéÒ‹Æ}Ș@ ˜=vìŰțfÇąŁŁemÛ¶MfY6wćʕۭâÌ2 ;-Ăđâ‹/ú›Ă°yóæł<ólű%ÚDę­ü‚óçÏ'RJ#'MšŽȚÒœńăÇ0ŽȘȘj”ƒűą““ó*ËČP(—&L˜0ìí·ßVÀÀeăǏêëë{„eÙÜììlóbŃ4;;{ ËČȘ¶mÛ&śïßߜOè|ĐS ÌÖh4SM/&ÔűÚxAŁVăV©y"IÓŠMwš @ߟ}eMš4Ùi02Ö­[—€š&úŒ±žŽŸńÆaĄĄĄëLc+Ăúöí+ăá7jőVź\™Êqœ\(ÎÒh4kÀoLȘÇîC0xv;[äٞJăl˘Úv;ëț”śéŹû—ș_|óí&p§ą4ÏȚƒ+tj\+ÎGśFmÀVUÀÀ±  đ‘xA„)ĆæăiĐČÆy>b)–öŽ!-±æŰîâÍk)čÊÛ7,òÈ=ÏŸQVXà;ßśiʭ˱ëž+ÓV> űâ\ țìC$ő}§Ż_Ì/ź*ăPsDwÇü«._{yÒ^zQœŻ,ƒq<șFE%aZ‚3É€ùș+ŰrókTČ·AQ ŠĐ>ȘdKà#äćû*źȚLÍk”œ—ŐűșžzÉÓĐHÔEAŹĘœ;șí€ ~śŒőČ1°†Ș`„˜UßkŃXsȊ+ƏOe2ÙĄI“&ćPBz±,›–——7Ò ˜“Čł}ôèŃč‰dźD"9kÙ”šźR©3O”mÚŽéì{ïœŚÇŚŚwś€I“Æȅi†R©ìłyóæLËn3«ÆÔì6” ‹U8-9p‡òòò$//Żț;w>ß±cÇLBˆŒąĐétkV­Z•hŸ?555wì۱ï‹Ćâ%“&Mšeö›N§KdFa”_íN—( “ccc“+++ûn۰!}ćʕ ăǏ§rčüÛI“&ćRJU ĂôdY6-;;û}ܝbĘ]O cĄkŚź=ÓÇÛÛ{ŽH$ÚĘșukXÆ7ËČ©EEE‰fH€U«Vm=zŽR"‘,™4iR2€\BH„ôlvvö‹qT Vź\™È# ”ă8j‘>ÖĂ,Ó«V­Ú>fÌ„)níúćÛożU6mÚôEÿäŰŰŰJéY Bˆ\­VJIIùÙA|tśîĘÊAƒőnÚŽéx@°$ @nW*œ^żzćʕ5v IKKS0 O«V­v·mÛöâ€I“ΐBfêš5k¶ÛÈśűÁŠ­Ï[—U–e38ŽË ęmâĉ™À0LOƒÁš••5Í|mVV֚víÚő ę{âĉ„YiiéȚȚȚ‘‰$čC‡ŠC‡œh‘–œ­4±Ő=ŹŚë· ‚aččč<àŚđF\žÆŃČ/|wőpŽ?o] +ۆń…@€ß8ÀûÍü‚}òˋ6heˁéOÆÀNO!@ì‹pż0ț.ÎĂŠSńé‡QĄSô~sžŽÓ—đâ¶©‹*UńPïùĘ1Dz»ąôńbuÙłÚ™Îm8_˜»Ś űă3㗳űä°6Ÿł6țł<Œn}‘ y§ËĂ…Ç`œt“†ÄˆĂ`HçjŸœ«üwtEx> ș†oKőÆ.ńQłç*ʋŠ_Žóî]}źÌp ó’|@ŒwB·ŁŚ ÜŃ]ÁG7&űŠÖggŃfômíHÜÈóŽöő€111œàΝ;gśîĘ«tPÖìúíŐW_•‡„„DQJĄŃhr·mۖëÌsïœś^”@ ł,«ÜŽiSŠ3̅âêó'NŹȘŹŹì»iÓŠô~ęúɚ7o 7nLwäŸ9N6lېîn=țțûïś€›7ožMKKSÚSuíÔoŽÆ|cÔšQO›ó–ɏí}ïœś"\­Vç~òÉ'輆Ą  àìÁƒU<_Ä Ÿtwâ 6Láíí­à8Niń"áJ|yÿꜣ†‘Àúő띊çˆ#œŒŒ6źw5oڝl7a„Ă,ËŠŻYł&Ń'= !ÈÏÏÏ4°¶!C†(|||ƒAőńÇŸćŃŠòȘ[ƍ·„"[”jŐ{șíȘÔöê8Ő :ȘlMìp¶M›-%ĐÙæÔΓúVá$ș”á]€;ȚŚ6ó ê’_^<À=cˆäR_è96œŒg#șbùo{pș Żuy™7Ż`íńęx­ËłŰößiĐłzŒč'éò„;y3ź””čèObő\‰ŻŰ+êFYás]›ŽúæÌ­+çÜL'>3~9Đçî%DÆś„?ăšR ăș{ż"öC@žh/cuț4“dblłTXŁűČ0Ræ^ ȐŁ@±4o)J ;03lü…ÆÉ'Ćú\,œŸÀúêk_ ŽE[ïÉX”7Æćù@ łûœ6Š.€·+őR}ȘĄî€.?~ŒZ­VżžiÓŠt뎆 ćŚu=ÏáűP7Üç{-Ÿ6à~äMwó%ƍw„ăžŒ”””'nQášU{8~üű[æ”7ț {;99pŚ€”3w–2q¶û_uÏ8.ÀùÖauî ß7PwU@§À•_^|1Șq«go_™  ƒćEJM`ÓÉŻńÙÙĐ„q6GÇ""°Žæü‰“ù—đÜ[đH0ćđző•ąkŻ”TX€…;•7”š RSq À©ÌÛŚű4üźT*ö`są :VO•ĆQeo?žVę\ŠR“jWˆÍ7śÈBŸ6 ,= 1Î\»­»‚Sćč>Á Ę az™TÁ(1Tž í*öŒ- ćÔŽ5BőUŃr<-? ó}Źm çšrçÛŰRó\bak]șû €ű›öłÓû”¶źÀ ­§žs,\wó;ßgĘïŒé¶Û”R›Ăx„ŐÙú|Œü4bĈp‰Dą0íœiśł|x°–jąŁ„^űuč qŁBqeÌ_CÿsèÎÙÛWîŽ lŸU’?@7ëź–`śkóđXh[š”ZT”«Đ) ;_™…VòŠŰw1?]ùółKĆ7.âȚÉA”z“ć(WÛtp|œĐVw°ćśš°žŻ(ÀćV’ ZŽOo5W`/ –~] €GJ~‚±Ë8:œäjČ\ ÆČë±Í{AĜƒŽj`ƒXÓ~VțàŻŹžpÖ`;SD(Èä랳¶>‘u|-ÚtŽăJacLÔ}VÿűÖeÖă@iĆêŰ=Z wIÂŠŁŒIê!ęĘ͗g)„9ș‘žŒĂăăăӓa˜ároĘș5ÒUŐÏcu m|ÿ·7ëWÛ[œ9šći­șČ =tTűVŒ”…żșPęœ^ìíï]TU6À3–ç#äMđË;!Xä gš±+Đ[$ƍÊb<șeì±RuyąŽ5pőü–ê윜ŠÀV·Ż#•uƒœĆĐöۓűđ8|_ȘD†Šđ1Œ;‹PÌ {~Âïq]{kóż°À-qá_B ÀžÂműŁ|+Œ]ÊFś&5„†YŰvk€}őÖ⻌\gàŚșŒ]…Wüɧ‹ÖQXkÓ5ڐXW/±ś; uÙȚŐ6ÎH=”Ą†Î—”y&­ErkŒœ§ ža@>Jps–!ˆŰsțˆ aŁȚzm)uQž«ț9|fQU™ÆOì”L*WV©Ș—`žYQ‚«%7ŃšI;ó.c ĐqzLę~cĄ\âłŃŽäK}5.ź€5u țq<@{hżûŚž­\Š ŐĂČܝšđUŃïÖžßđw5üG§Á@ŸÁ™Šjn»őэĐŐ·@ÓŒ~ ”̓ÔEuŽșéŻșTŠ\uŻŸüđ @Tmăú~‡ŁźaêfyĄś9ÜŽòˆ+y†âêĄș ïGĄ¶Őę`k‡{F]„@žxŻ»nŚÇ[b +Ś©őć:u Ê(04.]ÇSĄĄ„ /± íâțŒyyCVIț­:š(\…<[ÿ9êö”7ȚŻv“?î~‡MüȘ°FO[㿋UŽÜ0\ÓDű±Æœæ^Æűæo„m`ìźOg*Ξú©'h”ƒÚ6FőĄÚŐGE]l„é?$mÿ©rCŒĂ#ÿ°|é Äê]RúÆ„]Hpêà74èŒśˆƒOÀ±Rçä\iP\}›jpèł |   ÀHÂżïä C)ŒÄË?­ȚŸ]šÿKÂ_],łălekt6ÖÏü9îú­”Ͱ˜{Ʊ%śÜ·êÆ~á°= 4ÿ‚:€6Ë!čâmÀòăn9wÖèțÓÔ3Ú@uUCŠQ}<óAϛÎ@Ź>TJâBŃZ†ŐcnZ]Œäłü‹­ć`ܝÌg&p]͟˞­+€n\ŚÀŰpYcŻ/_™ƒ‡›ŽA‰ș lÿw…¶jV‘șL}Ÿ ÏÙ9{Ęż|&puî(öÒȘÁ*”:è±ș…[Oç±BŸŹëŒYoeĂ3đț œe^\YĐŃWđAAwÇę‘ZWȚœ^0.Ô7ĐçŁçßÇć҂ȘçNù»(ï’ȶ;Ș8>{đçlˆ3èă ÎȚŒĘY¶Æ­J”Ÿ*76xĘêi„<ö ¶ùô>?żV~ńàę@û[Ÿč ìOq}u„u…učűł+ ÁKy‰D­őzę}l†qÉwał¶ÊžłÿùB çC8;đèȘòWŚç=è1yÌcnšațl-cúàòç*ű賈4©ƒžŹ«.`ŸËŠž †|ĆőŻ6ĐÇmA uú8đ[wȘ.IÓ­bó Ç<æ1zŹ6“@,M‚»Ę-ż[_o>Ì0ÈÁ”ęk«ș»Ÿ°«]JŁ+{Ś]Î†@Àö@êòœ)~Œśštâ<”’Ç<æ1yì €ŽfۚaÆr/ć–Ś»îÂ^})ÎîkšĆȘĘYÀšÖŃ3]@Ÿ]À?ïwŸ+Îߏ”łPWÛkœ!àț,ßûBaűó˜Ç<æ1=èÈ]Ÿș?ŸđçȘû|ăêŸ € uęén—ó~űó˜Ç<æ1=Èè.ÚC nvùš-ò?âfŒÔüÙ“ÚŽtú\őßOŸçìęW›çyÀÏcó˜Ç<æÀ:‚@8ŒÚ‚Ÿ+đW—PéJŒŐ5üŐù­§çóő›;*gműŸŸú<æ1yÌcRJ]]–șóÉÌj…u=CŚ]tĘ]șźfțÂwhűÖ2Ź|ÀŻAàÏzó˜Ç<æ±ș]”Uúêëü\…=wśv~jCźî[›©kû»^ÁÏvó˜Ç<æ±ÿÏÈvj»,J]€–»ÀGjî†É«K(rŒhû­źàÎ~ó˜Ç<æ1Y €ș„ÀÚž»ăïj†îZ]ûÓpqÄ܅ĄÚŒŹOh«·}x=àç1yÌcû·›°–śS;@C­`ÇĘ]ÏFđűŻ. èŠ;UŚ] ”±Ú*sśm^üyÌcó˜Çț­F,97U@W‡Ôƒ›u a€žă€Ï””ŁÚté6֕?êœÒ<àç1yÌcû·Ûÿl[ŃôÀć!˜IENDźB`‚passenger-4.0.37/doc/images/phusion_banner_small.png000644 000765 000024 00000070356 12233035540 023151 0ustar00honglistaff000000 000000 ‰PNG  IHDR^;DbÒŃ CiCCPICC profilexڝSwX“ś>ßśeVBŰđ±—l"#ŹÈYą’a„@ƅˆ VœHUÄ‚Ő Hˆâ (žgAŠˆZ‹U\8îܧ”}zïííûŚûŒçœçüÎyÏ€&‘æąj9R…<:ۏOHÄÉœ€Hà æËÂgĆđyx~t°?üŻopŐ.$ÇáÿƒșP&W ‘à"ç RÈ.TÈȰSłd ”ly|B"Ș ìôI>Ű©“ÜŰą©™(G$@»`UR,À Ź@".Àź€Y¶2G€œvŽX@`€™B,Ì 8CÍ L 0Òżà©_p…žHÀ˕͗KÒ3ž•Đwòđàâ!âÂl±Ba)f ä"œ—›#HçLÎ ùŃÁț8?çæäáæfçlïôĆąțkđo">!ńßțŒŒNÏïÚ_ććÖpǰużk©[ÚVhßù]3Û  Z Đzù‹y8ü@žĄPÈ< í%bĄœ0ă‹>ÿ3áoà‹~öü@țÛzđqš@™­ÀكęqanvźRŽçËB1nśç#țDžęŽ)Ńâ4±\,ŠńX‰žP"MÇyčR‘D!ɕâé2ń–ę “w ʆOÀN¶”ËlÀ~î‹XÒv@~ó-Œ ‘g42yś“żù@+͗€ăŒè\š”LÆD *°A ÁŹÀœÁŒÀaD@ $À<Bä€ Ą–ATÀ:Ű”° šáŽÁ18 çà\ëp`žÂŒ† AÈa!:ˆbŽŰ"ΙŽ"aH4’€€ éˆQ"ĆÈr€©Bj‘]H#ò-r9\@úÛÈ 2ŠüŠŒG1”ČQÔu@čšŠÆ sŃt4]€–ąkŃŽ=€¶ą§ŃKèut}ŠŽc€Ń1fŒÙa\Œ‡E`‰X&ÇcćX5V5cX7vÀžaï$‹€ì^„Âl‚GXLXCš%ì#ŽșW ƒ„1Â'"“šOŽ%zùÄxb:±XFŹ&î!!ž%^'_“H$ɒäN !%2I IkHÛH-€S€>ÒiœL&ëmÉȚäČ€Ź —‘·O’ûÉĂä·:ƈâL ą$R€”J5e?ć„Ÿ2B™ ȘQÍ©žÔȘˆ:ŸZIm vP/S‡©4uš%͛CË€-ŁŐКigiśh/étș ʃE—Đ—Òkèéçéƒôw † ƒÇHb(k{§·/™LŠӗ™ÈT0Ś2™g˜˜oUX*ö*|‘Ê•:•V•~•çȘTUsU?ŐyȘ T«U«^V}ŠFUłPă© Ô«Ő©U»©6źÎRwRPÏQ_ŁŸ_ę‚úc Ȇ…F †HŁTc·Æ!Æ2eńXBÖrVë,k˜Mb[ČùìLvûv/{LSCsȘfŹf‘fæqÍƱàđ9ٜJÎ!Î Î{--?-±Öj­f­~­7ÚzÚŸÚbírííëÚïup@,ő:m:śu ș6șQș…șÛuÏê>Ócëyé őÊőéĘŃGőmôŁőêïÖïŃ7046l18cđ̐cèk˜ižŃđ„ášËhș‘ÄhŁŃIŁ'ž&î‡gă5x>fŹobŹ4ȚeÜkVyVőVŚŹIÖ\ë,ëmÖWlPW› ›:›Ë¶š­›­Äv›mßâ)Ò)őSnÚ1ìüì ìšìí9öaö%ömöÏÌÖ;t;|rtuÌvlpŒë€á4éĩĂéWggĄsó5ŠKË—v—Sm§Š§nŸz˕ćîșÒ”ÓőŁ›»›Ü­ÙmÔĘÌ=Ć}«ûM.›É]Ă=ïAôđśXâqÌ㝧›§Âóç/^v^Y^ûœOłœ&žÖ0mÈÛÄ[àœË{`:>=eúÎé>Æ>ŸzŸ‡ŸŠŸ"ß=Ÿ#~Ö~™~üžû;úËęűżáyòńN`Áćœłk™„5»/ >B Yr“oÀòùc3Üg,šŃʝZú0Ì&LÖކÏß~oŠùLé̶ˆàGlˆži™ù})*2Ș.êQŽStqtś,ÖŹäYûgœŽń©Œč;Ûj¶rvgŹjlRlc웞€žȘžx‡űEń—t$ í‰äÄŰÄ=‰ăsçlš3œäšT–tcźćÜąčæéÎ˞wç|țü/ś„óû€9%bKGDÿÿÿ œ§“ pHYs  šœtIMEÜz‘— IDATxÚì]wxEŚÿĘÛÒ{'!’J€((EéUȚD!(œ&HG€śąđRDz„A)Azo!=7·—=ßÙ/ń»ßû*ó<óìîììììì™ßœ9çÌbf țțțgłłł«àż10óS±l…ò‚™‘’’rÄńl±4LDnÊđ Ê-Krđ``à|&xˆ~`úÌɏ];_=:ßwEäH—iJ!GAź8Űäc—Ïw‡ù3ó!ÿ”A(ò+đńöæ/~<Ïaáao:î}ă mÚŽ‘ŐjĘŸcǎv‚ °BĄ-‹©V­ZŻ;vì{™Ž8lúʰvzÿÜŸU{țn_Ș€'Œ™ÌÛÿłŻÖvŻ=À±eâ€Tś`ÈèÌ7ÙĐ'………Ő(SŠÌ–žž8öđđ(ÇNQrœÿĄ‘îÒÒl֛ÀÌŒú»tțÚEäê”XĐç\Êž‰ž“’0ŽÛôöżÿÉĐcš“ƒZŹë…ö‰ÍńEȁ\âۇD€`f›R©tłÙl…BáołÙò5żŃh|$‚‰™ÍÌlûCŒ%_|ć4•aê!éÎ'[{șč7 łÊHv|y||ŒWrrò7)))[’““—˘ú”ă~PP’™1|űđîƒ z €3C„RiäŒ;ß}śĘřÁƒÇÛÂ2—-BŽq_@<|ïnšÔš© iFśd0ĆJž*Èdć“Ÿ…Íτ5č+eìuÆaÉ ‡mrŽóÿ'țZbŚűzwuț9{ŒŒű«Ç~ §ŁóÊ1éÏ`3ÿWâÏjŸöž>?=š[wî"»k4ŒűÔ)öôôdÜ€ukÀă.’Ö_ż.%ϘÁ‹Oœà”§Os\\Œ$7€äÔÈ à13Ă~ÏđL&M„R©ĂÂÂÂÜÜ܂žÇÆÆ†Ô­[·ì/1w”Ę»wgQŐÿM ìÌú\y鄗㇎ž ‹Ć O &2‚?üh,>=Ú`ńŠ(Söï†ŐjÁÇńzƒŠĐió°wŚVtéùB‚üùîĘ[”‘ž†Śźâ•Wf¶mQ'š ŐȚÖ?đ*ڃŒTű^”˜œpÆ«f͚ÚăǏ{ŚŹYSk6›§«ŐêA2 Ű(nÜž]șté-&“i•››Ûtd±X†šTȘ©'Nœ©QŁFšŒ}žpáBtbbâčl;vLù‡F?#û•âxĆ€EŒuÁW,cG—(ɇífAxÿ‚ŒbÒ"Ÿ°î$ŸXö5żê0]ȗK„Eđ”]§$æS_äC wńуGÄЕ5șßȘĂWôwűŠí!ûȚ|—ĘßÌ«ŸìbńÛ€èD‰ĄĄĄ,bppđА-ĄĄĄr0,,ŒCCC%ĄĄĄĄj Y)?$§e…††JJ„ČdXXĐÈś•ÿŻáą+Š;†-ŽG†òšv}9.2fŚĘ9û%íą“<łÇp^ÿŃLÖšÔ €Ÿ›Ì-^ȘÇ>À§§ndîűȜËă%,gWŃù}ńńńêèèh7yА brrr]§4DZ0Êu/LïÓ§OHTT”€źpőŒó·:„čÊWűŽ?Jy:çÀ]„IÆO»Óèì`=|ÿ9žú-†Ö~=ÄÓŻGš.{”ƒú˜h˜ńaÄ7V…@A"€•Q·}˜Yë<šR„ŠêìÙłöțęûśœ3gÎ""R$%%]š1cF|Ÿ>}^YČdÉ)f–úśï?dȚŒyÓ đ%€"*głÙ>Ÿ;wîçIIIßïȚœ»NŁFX­Öí*•Șÿùóç[8p wĐ A§g͚U766VŃ€I“ćD>cÆŒŚš6mê;V„„ÔÔÔn*Tè:wîܙ R©fłÙú»fsr{ÊQ-ÿI$iXf:Š„…›ü#ŹNŃ ÀÀòÿ9mꯟ.QCfȚ‡çáśM퟊m^żwÌčăüéžíż‰a'";ńŒiÄDôïąȚgóKm[ˆmȚčŻŒrQÀŸžž\ûőzŒèôIv ą(àîVçóïNHNâämrݐÆÌ+ÁGŸ$>Ćÿ/ûÔ ó+ŸùĘĐßÂ9èòć•«üȚÁüĆ7ßđìM›8ŸbEțpÔ(žž|9à—^y…°·7'ŸűbțąS§€”Wźđœßr•êŐűË Ú”k#—9@€„/Ț‹ë}~ÜșČïToRŒbA`f„„„DÈxïȚœ{w ú„ŸŃ€I“Ê]ștÙóg)!țމETL ÏZżoŚŻÍËö†ÙbÙd†ÍfAdXî^șupŒ5jdë űvÇfÔhц>xŁ /Ü”î Ź$`yÊHìßł°lßaêÙàŐ§€ŻŰú±^2‚ šž›±4xDp‰ĄȘuëÖÁoȚŒÙ«uëÖù›7oö”Đ3[ˆHÉÌV"R3łYb«eE ËyrÏtÎ'ü«śnß&JKGčòÉú “„t-z5|%Ő^”ś E‡Æ[Ÿnœúž"”Ÿ‘Mž «7~CQj/tźó2čgćĐ ’±|ŐF@:+JDFIPß2ˆËêșpŽ)‹VłÇÜ/UĐu—ŒŁüRœ!:==›7o.™‘‘AUȘTy?==5kÖŒ[łfM+ŻZ”j1Z”jq„J•:ŐȘU‹kÖŹ™›P„FŚćŒR͚5MT”jՒjÖŹišU«–$ëNțȚˆŸ:}ô('&TÄÒč“ćU0s”=ÎĂûœÚĂË( Ó›őQ»\ ô}§#őűą'Œ êŐz;żüOnÜÂśöąg·7qbśi̜8 «~Ip]{Śn6›Q4êÍ*}áAÎÊÈÈ@\\ÜĘôôtœ;wnYFFŽ?ž‘‘ ùšÌÈÈ@jjêÆŒŒ ÎÈÈPćääPFF222BNž<qíÚ”Wăââr322pæÌ™ÈŒŒ ’YĂż·q™čżÂ/_ˆžˆR3 €šwmˆÌŹL\»tî„éÉäçćâæĆT۟dC™kÀ膓*Èś’zŁu„4uÈŒ?űônóŽ*àÜtùùŽE3?DmKlôž€;y·p;`.\żšv_”Z-_ż~ĘÿÚ”k f6h”Z`Őj”`Śj” ÙȘŐjú@«Ő^Ńj”l2™(??ùùù~(Šâ‘TÔj”$ÉȘŐjń·‹&à[2,’ïŹ8Á§?ÛÁgfíäucò™Y;ùæČcÜĄÁœ:{àäȚƒ_^~ˆ'ż7ŠĘĘÜùÒÒ<óĂöśńăÔù{ŸšŸ”pŠ+ž«&­ÌŰÁĄ»_ășÇ{r¶!—±0œŻï26•gŽ tLNDy"ŁtšÚŠNŚ*ž^^^q*•Ê[//ŻXAŒAp—Ušj…BäÈïŹĆü—3ž‰,è3VŠ ç‡Óż–” eîwÖóՉÛߞ¶§PŽ›=ï8wŻŚšœ5ç"«ŠÆž8V'°3·PŠLśèèhM‘ù~Ńčżó59ęEDD(GŽYÉ)Ę„Œ€0~üűŠj”șXق+™Äï‘18€ÿ*§Ê@æMsś ˜'5šĘß«@tè6hçł’Ëx†Á‘Ü’àŰÇK8Ú=%RȚ(ë€Á”ąoű&Ä»WáiĘĄHÀ=Ó<ć^ąÌ-PJJÊI"Șd±XŠ„€€Œ$"eŐȘUUgΜ11ł=%%e— Ż€§§ŚŸ={ö™”””Ïm6ÛĆóçÏŻ«T©Rÿäääa0zôèqj”ú-»Ę~ž™o&''ÌÌïe·Û©[·nŁÆŽ;ÄÁIÀ°aĂZMžgIvˆJ%…GEÁrû.ÜBCбLü«ŽÉ U/KߙVčÄVöÁ€NgUMeæÊ՝‡vŸIŁŃˆFŁŃąŃhTfłùș‘ V«•&“É,ŠąF’$+3۟Ăì/° D$2łˆŽŽŸ3ŻVű‹ŐۓíxżySÌ=xÙéé`i/àłŃŁĐŠkjÜë]~ű$C őHjۆŒ&Ÿ7ŸŒKÇò¶ÏŠÓțœ{->vOΟăšoŽĄû·n±€TBŻŐ’ńńC~ĄÖ«hXșdÁŹ…À ÖŹCßNŸȘô–ïÏR«+;›đL`摎ë X]w$șì€dă—ëVĘčêŻ6^Ï}ęzlfè&_úc^ŰmȚMț…YŒ€Ô©S'›ó삈H§Ó ÚčsçÊV­Z Q«ŐƒívûÎőëŚw–gPv§üì€:g§)ČT„ÇuEûöí?E±aûöí:ÎTDùÉż0Ăă/üńȘÔê™V‹e€ŁQŸX»ŸM›«Ćƒ^“ɣѫՊyk¶‚‚FšCÓș1”_«‡†áòwG^[Ÿlq†A§`ĐëȚs|Ă<{ăMéa›Ö'ÀÎ?—‚L*+.Đò(fŸ_ ńj(6lš%"ìÛ·/š™Í5zÌÌl0Æ ‚à„Ńh>’$éŠ(ŠeeìƻڀČAƒÇAš°gÏ"":uêtÔh4KϜ9ž™™©k۰áE"ŠrzN@ŐšQ#Őj]zàÀŰ4hđœ  Ž|·nƊ»qăÆI’Ž7fI’ź ‚뾟››ÛàÔ©Sǘÿ©Düńúû6ßșqÿv«Ő °€=_oÂ+Őê‚P«Ô0YuhÛĄŠO„ȉŹŃh(/',1Ü=<àëç‹Wj—ÇÁ}gńèń]Ĕ*…”_ÀÚU›ĄTx C·&ˆ/ÏŠ.ÁŽ™É1d|Ô łf,‚Jáf #ëąˆ=û¶Ăl1ăËő«çN]ĂÆmkQ±|%äææ`ć–#őü|ŸtCfێƒȚÄŰ#Ì7źćȚțąËšö“4Ę,°șïĂä„.ˆWUčrćŒ"ZP§sç<˗/?F„R ‘$éÒ„K—šŰl6Kćʕ sç΅Vź\9M&¶˜ŒŒ<í /Œđ •FăGą(F©TȘćŒ‘Ìü@Ɛšššò~~~û™ùAjjj…Ê•+çÎ;çND‰‰‰‡A(-IÒń«WŻŸ•p].#€©rćÊÙpöìYrèvÿ‰Ä«pŸÈÍÍójœJyeJ•ńčq댯]o5鄟ŁȚÇѓG!Š"ȏ‡|ˆ=KvâRÚyțpô€B4›6j ï[±{¶źĂœćsiËŒüőŠ=t7í>— ŠYăfr\x,í>ž Cz bMź‰žÇ>6w˜ŒfČZŹÎ^hÜ«v.ĘNÁ>A<éƒqhÿA'Ü»x Í+ŐG†6 Ł?w/ì\ž '.}W1oÍNEßÔl”HDÄ*RĐgnrçœqÔűBb&łHŒ„L lc JóÊZíîæRĐ.~4gffĘż_ÉÌ6"RÈČDENNŽ]Efæ6›MÀ™™YžšA~–Aˆ$ą;ÙÙٞŰfłńăǏ?0B©TFGFFȚŠŠâđđđĘùùùŸÙívȘˆrQ!++ë2•bf»ĘN™™™ "šŐj6›Íf9ÿżWT¶xÔL~!Œ,K,ˆdÌ!°]ÂîŁU•úđńśĂÀčŁh瑜üÉŁ©JB"ÇxG //ÓnP‹j 8W›Kń]^aŽdÌ,źZČ"žuę' æăKw“›]Á,ƒ9}>Ą ëgńŃsß"¶D)„…Ò 7ú°„z`ڇ1xÆh\ùê233!J„ۗ|Č~śŠ1Gêï0”šYó͈QEđĆŒËâÊOòïâ~g.ÏĘGć>hf†Z©Âä^Ăæ|źûŽ€—,6+đŠoiM©€ÁŠFï Í$’ EÁQÇ9ÉËÈÀĂÌęÇò>cæô"kÄ‘‹*œ€Îì™TÁ…fGrbCŠÚBs‘‰—s>OŹK.ȚùÔő/I?‹YòÿïđÇĆ:5žÂIŻÂOËÜ5Žs•›;ozèÖžR-îđJcΘy€ófa”ćPŠŠ•B,ëW}fvâ @04B€0Ì(= b C\ÏEmIșFJfÆäɓ03&MšŽ±kŚźÁŽŒÍ›7śŒŽŽVP$%%•pÿBăŃ%JšńÓ2qʔ)7]Ń@pp°șÚP03UŻżțș§#œtéҚâêú·Èye$qôp•STž°)ŠÙ§QFM4*D•š0X춁‚ ŒöđŁÛCŸd€ÉmtÀì7„ Ú<‹m’=ì”Ű*ŰĐ1™ûlÿtäŠÔC]‰„đÓ =æ–č‰e7ącHk ÀŐ썁Ûž‹%Š.‹)Șđ Œ1âĶmÛê5oȚ|Íäɓ;|ű7'NŹóȚ{ïŐR«ŐĄ‹-Ú3hРʒ$]Ÿ}ú\»ĘnźU«–ï±cÇr oߟ/_črćŠBĄàŻżț:sèĐĄKŰŠN: ~ęúțŃŃё&“ÉXąD‰d»Ę~gÚŽiC† ¶iÆ ƚ4iòÒìÙłżù« zuïÂUʄç![ÍčÉŚE—ț8ëàQÄÀ‹ÌΩÈ9P€w°țŸ6ę;ʶ.eĘCő%ę[ʄHE”b‘ČY6–°È†'#Š|hÆÇ€cđÍL)„EŸ­4.è—!Ńc!>čś3ßțÊ žű©ˆ,—~ȚK~>€3łœwïȚu—.]z̕uŠ‹2$çaž™É[á Pđ ,MaęärÙĆ» ż·_ż~ÉóæÍ)Ëż‹Č7ˆŽŽ›5k6uîÜč–7%RńȘQ°(Đ]&\U1F%EÏVŸ Âe hńPȘ·è­æ6.ńŽNa/rns"^[d—\òùßfôŻ“6±~R™(”~ŠIÇ3΋NZŠ#ŽąÄ+sm/’öœ@ÿ­Ä[Œn.† žb~á~Ńáˆ] ?Ć\?GĐçáŚïo ő;ŽUgÜœ?ö©ïf1ó“çÍû<üÏ/ ^<—œœÊ>vPȚwç±yæÜ+š*ćj˜ż"ë/ûąƒ^s!€çżű9ńțêàîéÉ3o]ÄęśA‚;ćôŸ-[«ęE„ËO,ûđ }NÀωśś·lŚM''“`2#śțv+C7Śn♣Çz3łî·”éæí}¶M§Ž•«¶l Ïđ0˜rrńaœFDDăŒrKíŰë ĐąQĄèVăXúś<üł‚đ uYÇwû8T„k·œ?Ë]úŸÇ«o^Ąí7Ń{„ËŁOù*‹ˆ€ïfÌCdŐÊ4óòùüǍ18ʈ­öR!2 ő`ÇyćÖ-ʉhț»Ă†òççOWȘ9lÌÈ6[ ‰ˆ@…ȘUŁ@ žh«D'2*bË7ì>ᄊÈkț“:%]q(' r€?ń=j™Ï‘śé^ș|ßȚ^ȘáèZź"ŰłćέFÙ6‹`ÉʁUŻă/o,Ÿț)U|ùeLJ*đuáïç!3gpèËŐ æëšk՗ÈĂĘíTïaĂȘU«wŽ.œ€ÏǓ&v‰*#eű  D• ·7lBĆn]pqęWyłS>ńuFúI_żÂ›>»‰Ë'ršrę@Ęđ˜ćoŁ?JHxÚEžáb:ÁIb"àșȘ•ß'ÊÂ»Ź °=—Źüâ%ąÔOWŻyáĆ Đ8*}† ˆ*S†Í6ìٓĐÀ±c°yĆçŸx1Hă/o/î\„ ‹È€§Ł^pĄ«!^}îĘ8zÛVŻF§ÉS ÖæÁ˜—ÇnȚ>€śô@Éđp<8}ĄááèĘŽ)LKaÔj5L&č`UŽ(Đ^EûßĂ0_œ:íŽL̍#ĐùÍÆZaŠ\ü" )’ćg”Z"ÂÇ‘) @ÙŹYł<Xčr„ F;ö?@ŒêȚœ»M.S”ÿŃóe@.‚âg (ˆ”˖K82eĘWXvê ÏîÛžž(p(_Háœł'őpžƒv —ś.“őÖ7Cźs·ÍHż.ź<0hȚ\ÖûŰ:f IDATƍœ–œ.Š]ïTtêÔ)òžžsçÎÔčsgŹYłF••E6›Ía(b%"ŒžÎVcŽò€gk!`bíÜč3X+UȘ‘ššš&û"|–őYQ{ ÿkb„ç%ą”gÌä#7ž°b5_Űż'ŒGÊò5‹D‡{)5p“DXÌ6î8àcŒ_¶/?6ߟ‹mZfŰ``ŃbC‰ÈH,ęúŽƒ ìOœˆàš}‚à&Ξ:…š’e 2 2ÛXa¶ąÚ«ŻóÛ狗Š.\ȚîńT…{}8Hœ8gț 'qXžƒp;pr}°û 3™æ€țšč‡ –ƒgk§żéÍîHÈ˜ŻŒ·ućMï,„Ÿ˜ÙæY@@a2™Ô&“‰L&GŁŃˆ7Țx# €Æh4Âd2ÁaûËÌ6…BĄ ”W18O‹,INsXê9ˆÍ.‚ŠˆŒŚź]ësîÜčò—.]ÒÂálè'ŻúvÇò$čL3ÛEQtG¶Ń.çWüÓyfgۆȘąšXk·Ûbp՗ȘS‹6oòÆ”«Éb1łÙd&łÙŒŒŒ\^»ëćjó¶Ż^FÛ6}ƛžAFzžÜŸBá„ÊČMb‚€G7~DbőÚhVăšU*,\ż*” ]šÔÁŠ­_Cûű|ÂJ,QDDżŚ±%ú  •Ű·7o=ű-”Ș[`ĐŸęx*›ô:jÛ &čč{t3ô«œ?(Öԙʠf©@SLpaűB VûCőUÎw»ÛŻšîbűÀœQŁFZfæ»wïŸvőêŐۉ‰‰UCCC7íĘ»ŚœQŁFč +,`·Û7>|ž§ĆbÉmÜž13óć}ûöU`mÔš‘ öîĘëéSź\č;ŽśšLŠ!Ǐ_^Ż^œÇD€Ü»wŻ€GttŽ||üm§û`ߟ}ńÄúőëŻEń «ŐșY©T¶väÙ»wŻ›Ì/ÛțńÈËÌgbJÇ |­n}iÚgóàăíƒ:”Đđ1Ó0ö“Ù4qú"L›”ƒÚ5ʉ«ßŸ Dxł]Źür7ć>HŁQęȚąJ«Ai‘à#ȘđAçVtëêe2ećűŃ0R˜Lp“DJúh8Üì"† èK*ĐŁU}7 7¶źZF#GO sn•ŒŠĂŸƒ§iȚä”Â!Ś’­%•]`"âí{Ž-sÔżGȚ„êŐ­ï±Â&ÀbłÍf#›Í§èH#«ÍЇú'@Û ŠÍ1‚KW‰wwÁ6ôz=ôòâSP(Uôz=éőú§îëőz…ź °Ńhln”Zí1:zœ>vŽfN'ÉÏZJ–,yG§Óq~~~–N§ƒĘnŸjłÙôƒA©Óé$xN·FDDÜÖét’N§ƒ\^D͚5* wŁŃXW§ÓÁl6·ÎÏÏâÈóÒK/ő ț“Ńś)žW`ÛÎ~ï|„™s?AïžÀ˜„ƒÆ^đíÁÁÁ˜2c^HʌÓçÂddX-f’$†—›rrsPłFœ<ô5ȘœX‡ŽĘ•Fƒ% çĄŃ«-q`ß)h4*ŰíDv›” R ż6›-vśÆȚß";7oÜžó#tyyóőÇË5+"00 ç}ŽśȚ ł„»·.ĐÎm ŽX 6âÁ#ۇٍvŰì6WĂżËp-ÿź›žäɒ*g;0ÌU™ĐÈßßÿ°żż?äUĂ,IÒn">wîœ/Ïʕ+? –*UȘvZZÚUƒĄP*(‘Pčrá’}«ăY“ÉôŸË—/“ÙG:ebbâ—ƒ’$=žpáB fÎź\čČ€ŻÍf3ëőz&"h”ÚÎ7oȚG­ČŐč\p,ŽÙOŰ_íÆWźœç`îżĂÍë7C·/‡)ę‘uś!?K>] ÈqËê»pž]Wà©Úbć`ɗxÎb‹Ő«Ć »Ő‹ĆÂ6‹•íVÛ,6¶Yml”Xa5[8òÉccO¶Üí ­ć ßčs§üŐ«WéêŐ«tęúőpù¶Í1“ĆY…Ś‹…™™:yćït-Ę»woÓ”kŚŒóóógF° €ÖQÉ`0\6P(ĂDQÔX­Ö\ŁŃèžo4™LìÈ Àn±X$ŁŃÈ6ç_ƒŒÌ àG/»ŠŒŒŒńáž$úbĘ L<žv/Ț‚6~”ZMœżƒ*oT#y“< Ż—n§üülČæëqrÍAzčMMRۉŒŐjZżí+ò”téÊ$éŒ4áŃ€¶€”V ;oŁÿšm pŽïŚ‘ŒŐ˜ȘÇTąoż;†ÈšŃ4wÀTÔŻP‹Ÿ>O(éŰò}(ëńSS<àŠÇjb;Ăl6Ł›șŐÍ©@ڌw)Ç€Ćp[':°˜rLy4ÒȚ…vűN§Ï|ІV€œ—Mi7áNć-cźżŒ­‰‹ö‘ŹV+ŹV+ÜÜÜ<‰ÈCV˜ »ÂŽX,°Z WËłŐj%«Ő »Ęn7›Íl6, ‡†† {b”ZÉR ·v Í ÓÚíöhÇ{P°Ù„ăܖ™™ÙÖj”ÂfłŐ ú.,,L'_;ò’Őj-Žs¶ÙlŽ:8+Pțr^f~‘ˆnüűùŃÒyzL 0ŹDùi™X6jW 'A!đőÌ»hęq7À& FXp>é:”ÈjæNMÚBmeôŚ·€%Ű ©KâÀ'đŸĘ둞‰­Ÿ|Ž5[° "/7%'Žy‰JÇs‰À0žÛETôĄ}s7òš}_ÒÍ·yÙæUÆ„ęąHíźÁÁÔ#GőüƟP–AceìÔŰŁ·â!šf­ˆ”A)ÔááH^po æx%áïF ŒPŐ"^ÀŰŰŸš: P+ëSÄäRíco%Ő€1sNw»Ye‰AĐ8æCòÄÈ à €Z­ö,”Ęn*ŠâfŽ•}ÉâńăÇJY”%23 ‚ІˆÈj”öršŒće9Y‚ ۘy GÁ‚S=zDȌûœdłÙČ(M&Ó~fæ-ČŰìߣaS+Tkż[Č§ŁŸÂ“-&éŒzŰ% $ŹëĘő$ꕩˆ6›ъ5¶`T›~ÈÈËFê㫈 ‰@ƒ€ éÜ“VÎtjÔŸŽˆl6à„>Y©TRêâ}đśđCN^ìV+^Üv» Łß„pżԌź„Űwë.,ùj»ˆžw_#đíG48ȘȘ6Wû=ˆ°"z &dźÀŽàOQáPkÔń݊ŐŐ§ĄÄźzšPK^‡R^‘H8Đ^9*|OWŸŠ,ź—TDT–ćP ‹ąè&;Œł8ùl Ynë f&"Q’$“,‹u\Œœœăl6›Áh4>‘Aƒ(”J„»FŁńŃj”ŚAđË·Èêa•\¶B.#Țd2ćŰl6“,ۖähEQ-I’$‚(I’UE•Ęn·ü“”sĆȘ‡[ŸPŚmû…CMôźTŠ|ŁV/7@b©Œ™ò.ÜĘĘÆEÄDômÚ­*Ö㌜Lúææś(…ș„_Dùšńœ'±aäJ ˆYȂ%†w,Ï[ïŁĂSŚóìm+ÔŒŐÓ'đŁĆÇĐnÎ@ÿá4–'MĆ{sGÁb-žÿJ…Ș˜Űi^љˆHTœ$Ùb…ABœ€Ž6T…Y"°E€D€m AH @öÙ`1,*Vš‘°)c ŸÎȚÉi‡»§@fΔʙ;ŽWŸ RQun1Ò ÇP.žĐŽ9û[pv.čÙ1žȚĆ żuĄĆs^ŒÉż€es±RæßoƒłïQèvíêèăÇ»†/æÌÇÿ8kç-ú–O€Źaœ?nʋÓ>ÛÏŐÊŸÀW&măœÇ Ś§ĘŸ—Ś4łèȘ`Nûì ył77źR›K‡D¶vSiŸ!śnԁßkÜé 8‰¶ òÇȘČĆowQ|”đŸÆçeuEŸ/ĆÇÇ+cbb4%K–tóőőUĂ” €Â ·Æߌ™ĄP(\mmQܖ…ëAAAźò9żŁMŃí=ŁŁŁżPŸ«ś‘ŸŸŸBȚŒ>~òÓáȘȚÂoˆ…kÿ_öQÁÓZœŽ8;ŃP $šćgNńŠ‹ ßNȚ&őkۑ ¶='EŻ­ŒđĄáËűÖ'[„[ŸlăûvJ1Á’væΛu„ÏNűê)â òńçG“vóƒ »€J„@„PAŸî^îž>p8) b5Çčr,"ÉńçśÄJè>!FŁ*JŒÎmâéééî8 TË,ƒƒˆÄ)SŠüèjżÛ˜˜”«t§QO RœßŒysïR„Ji˜”jŐRPL™2ć”LÀ}óFGGk5uëÖ-tÒ±cG_GęzôèáïHoĘș”Wpp°€ąAƒîNŽR,”={ö p€”kŚÎ—™Ń¶m[ßŰŰX7fF‡|ǓzőêyÆÇÇ»13^{í5śrćÊiŒŒŒ”2oÿ—đł<ćšQàłÁ ?í‘ë  Hô—ïù8‘Çj•j ~òûàI€·ZĄLpr`ƒ.œ7í§§ìâ'“öHś'ìàGc 6šŰŠáŹÙÏÛu“đƒ±Û€Ô«YÄ2┐ ÇČâ”ÂÌ2'đČŚF,ˆcÌ*ă%9>6łŒ„WŒ†c`‰]tȚ@G;8Ź'3cèĐĄíZ¶lÎÌ7nÜ̈ˆ 3ŁE‹ŸT …BĂÌ2dÈ녻dÙ·Yłf!ò3«FŽٗ™1|űđŽœző*ÍÌ1bDgGț”””ŁÌŒÔ?~ü%‡GŸ?ü°brròÉ:D9òŸÿțû‰#FŒè5hĐ †ÌŒäää)))?Êćœ?~üùüZJJÊ ùœ(SRRvÉà€ HIIÙ"wŽ;ŽŒăǏÏcf4hĐ hÜžqK˜ŁFz?99yƒĂCÏ۱cgÊçnr–4jÔHőWŻPŒB%§ńúÈê+«ŸŃúÊśÛÿpÿșżÙb'_{đaÀÛlłæh7ë›5Á>ƒë…iŠIû>ÇúïśAŽÛ1”ŐûčiőŸGFäè”đVęŐŠđ‚]ČûÈĆżÈ»}xaà8™ÿ!Č­z„|X$ÀÂ.ąÄ°H„cyŸáÍ ‰üÙęrưSO‰™^|ńE5h”ÚŽÒ„K·ìÓ§O”ŒŒŒ”>Ž@ÙČe›€Őj5i4·)SŠì'"ő|ĐàÁƒ‡Čłł-`0ÒM&“')&NœžÎb±(Àh4îhšŐjŒûî»5222Črss§8ܔj4šVcǎ­»nĘș{ïœś^5˜7oȚułÙŹQ(­ß}śĘW=z4Æ`0Üőóóó0 yzœț*čĘżżS~~țĄ~ęúœ’›››€òóó70łÍÓÓ#FŒ8n4Ă<òóó7èőú‡qqq^zœ~?šT*͓'OÖűűűxÙl¶&“)|}}5™™™Û uëցÇßźÓéŸß»wï_îÜZpqípőä&ŻòșŠÎÄäÏà.Œ03‡/9pæÁuűâÔN­ŒëïqBHIŽiærßxÍ]©né>âuÓòïwČ@B€\9îeçda%bâĘRP’ßI&V‰ 6f˜%À$tö‡8ł•?șYœöI*jă R©lČэyƌ =<<Š*•ÊȚ~~~ą ŠË—/ïLJJ:“””4ŚÏϏ“’’6 8đۜ9sŸff«ăy“É€3›ÍÒÀżNJJÚČrćÊ«IIIûív{($%%0·ÜÜÜŻ^œúȘĆb1ˆHLOO_””tzĐ Aû-Zt.))édRRÒłÙl™2eJ_77·Á*•ê“É€EŃn2™Ž/^ì=`À€„çϟża0.«TȘaóçÏ? @š6mÚƒ ÚÓ»wïÓ&Lš>iÒ€Ęșu›Ÿ‘‘±Òl6›4Íd2iÀb±X ĆË=zôűbÒ€Io˜LŠÈ,yë­·>łZ­ŽŐ*öœœœùS§N]üwȗ‹zÌq ź»L(QĄx_eÎö„\ÄÖŽšÓ‘§ü8(qąMČż<€VGY«3șwžȚX3Š)ÿü» r]œgՎ=łÌ(pód•f‘. ŒÛJŒąEòʇ˜“̃o ‰bžzˆš3ÿűÌÆyڹƕ ."p>g#L}ûöí;țü9+ŽgͧńsŚMô ;a.R/çtÁEÇüM.ȘzöìYeÊ? ÿÌlïßżÿąU«VœŻŐjí5òșÚ'LíÄŻzàiwOźö +jzÈĆ[‡rSêtï:șVW&4Ź!Ł|џçÊ[ŽĂՓƒxNšŻ»Ö@…oă+;}YÁ;\4ț)æđíôsŠ8çCŃûE:9ęp~–ćWŃwüJ Ò3Ÿù5eSw—&Š.\Ÿț-"7WÈ«ÄO~ʜ‡eW›ßŃ3ˆ“~-œ„B°»6ʐw§Hș3±Ú‹ź3ò:ą„HŸ_%ï|țJ Y(Ż("S'ۄëĘ]!nQ?e€k_eE‡Êâœì9;ÛsȚnÓîLŹżuÛçáÛ¶ÁjŽsK1ì‚P̱8Ä„bű8©ˆf©(ĘȘ”ńl'{O!ìsÂęw/Š ËÏòțHÏ PzżËĆDs”ž‘ś©ŽçÄú/fž1čÀ3΍IĂóâœgæyÎ<ôßțï‰èŃʋgÂ<|ˆÛÇNâîć«čnÜ<|śÊŐ}z“ń8€ëÌlűÇüąíÔG1€‘9ÌH°À—ÌlxȚyŸ‡çá9đțU@ôY·Ț˜8* ÙČ(d”Ù ŹrSł›»‡T!4BêUVő$#ăj薓hž'ÇBh~’JN^y˜05ŸpžȘ°‹™›='ăçáyxŒjđ‹,Q!śÁĂp”W^ÁۓǓ„d8gffÊûTì’„ĐđpŸőĆ:ČÙížÿă•ó[Öź›ÆÌ«ÿîú*UȘ(›Őê…CÍABęŒœŁrŽÚO™ùąđÈp’ëžšêrVš?üÀMk-š'ƒ™ƒÿêMŁž‡çáyű݃Ûó+š{ïŸ'3ßï  A›‘! *Ő’Ò±±enüűăHkÜ5š’ƒŠNÆg#GCŸŸ‘5_݇ïAhD ,8z§łžÀȘÓĂ70ž/\F6»Ÿ8ŸgÏđË?\œü[ëWôbȘTŠÛgÏ9̐äïïrU«p›ęÉ]v‹,I`‰Á’ÄE śđāOgoX»tY;"Ú  œŹ_Œ|Žéì‰ęŒqùą};„cpČŒđĆÛ-Ó`0'=eŸń˜™ĂŸïßGłÏ[âyűŸ^ečoÛć+łÊ$$ŒĘ}Èǚʔł=„UńàźĘç˜č }ŃűÍ6Ęk6n$mœżHxgæt¶ùû!+3bŒęx\Ûtïömg“=ô9Ę?„Ő3ganòxŒR§†Î…\…ł( _§C~~>ûűùI^:œűĆš±3î?ä@čYYpÔĐ1<"ąyŁvo–°™-9+ç/đwêxô/›˜Ű déRêö‚2,Ğ„Íò”Z đő›ĐçćÂŻvMŰ FH`öòń!ezvÍ_žkû† [ĆQ €[űɀˆpòșòžr:ŸȘÖőƒ6چȘu}ńíŽ,ÄUöÀŒĄ·pæ@ŽăûŻ3sÜ áÒ]…Ÿ)—đ ÚŚÿsQOW;ˆ>7úzț^à%ą8ŁJÇÆŸéćí}ëńăÇ·Ÿ<~œ æsÈÓèț„ăâz$Mœ€àˆŒîʛ›uíFJ"ž2th?żÙ†F­ZÉßíȚCéśî!Č|9èîʇ]’ ôöFXBw}ĄĆ&$đè9łèÉĂÇś~?èu>éJĆÆ"<&ÇöísŐé©MǎhțȚ»Px{ăüÎ]œ>=șRÖ-?è;sr&dççC„Y™—‡/FC“·ș’Ù`Bٚ5À^žÈÈɅMČł6ő<ùúûłX*†Â˜,V2d€ăö…‹űáä·žvù ~G  R¶›Šę–ż œ §íłŠîÿèjĆżő”Ś^+Ú233sś7ß|s]©T*­V«EŒ ü?€ź@P©TąĆb±4hĐ \PPP_I’nŻ]»öÓÀÀ@śŹŹŹBCÆçàû<üiÀ_„ ]={– €dtDúœ»ƒ‚’šŒÙVlÔ©lȚ>ŹqÓ íüyJ~·_À Yłm”Čd—DPZ-žæ4§ĘčK /Ovśôą©C‡"D—*…šő I—.P#+/ł ’]‚R݃ÙhDHL ż[Ż.ét:vô}fÆ[ęȚGÓśûĂd”à?#Gàë;Œ+ĄA@î… 8Ÿo/ÇĔąș={ò“Ź,Rh”È{pŸ}ÂK*4F‹nJ2RS˜Q§ĂŐÓßăàö8}êda™K7l ={ČN«}ŠR/Ÿ|yŒœ8ép·–-^{F'wlȕÄÌ3éÇ ‘êoŹ8]cSŻ„ç»Ú?™ágóLš«IŠjÊŁ ešyfćĄÿëțU·IXS3M›Ÿu¶ORfNûƒ@ »aqöî ”hŃą±Ïög55őAnnźNÛèüÚu)żČżșŒçáŒČÄ$ƒ·lÒ¶WoűGEÛÓ23D…š@šŸ/Ż™=ëVŹÀ ±ăšN›ö|ÿŃ#ˆDO˜Éb”B©R± öG#2ŰŹÈÍÉŹqw‡»»;yȘ՜‘™ ›$ú{·É+Œ»k4Ô«q}˜L&š žża3Ā 2éő^‚ƒ1çătäÀ Afú =†*7jŁ^R(űáč3Ű”ń+ȘSż><||čtőÈž~>Ń„IČÙ 1ĂÇLJw,œ‹5ŸŻ zó°ÙóqbçvŒKà萅Ƨ‹—`ùŒy|é|Șó=çÎËc?‰2/U§Ç57l۞gt>±8§b„čŃy‚î¶&“V-ÚęmLæïì—QÍ—yÇ3Ă=Úă&™­œ#i)Ìêo ꏧƫȚő-U°ÀóăˆN+pX©5ÀS©"‹Ù kN>Z”íˆ;7oÒ„Ïæ [›–šÛž2łs "I+N{*$ąZęf°šl€Ž3ÔV†Í*0gćQęv]ńzÛź "șwí6ȘŐ| j• ć_ÀÇÉ)šd)Ù¶qqćpé|*€/^xń%:Čÿë§j”_ÇŁŽ4”*›žÛ•4*șĘ»s‹]n_é36±%őqFZÛò!±i[<tL°të&ČÈ"gTŚažŰČ 0„4EŽ[rÜԒ’(.PYs·‡;LGčá­ i‰ĂêZșaâu_‹G™čêM™yśo°BvȘ]xóäɓ/dffȚÀ /–*Uê+yO;»čč­­Z”jÓ3gÎŚëő‚ółV«Uđúÿ”śĘáQTmûś™ÙžĘlzH &$$HDüŽv IDATE E@Q_PP,tDH !" ąˆą"Eì}EàU„Á%”!}ëÌîÎÌóû#»q !Śïû]—~œë:W6;;sÊÌÜç9O»ûö}Q­V'y3cÛl¶­ű–çyŁą(”àÛ¶mÛà˜˜˜%ž’’’”_~ù„ÄjŒĆbq 80çùźą(nŰ·oßôŸĘٓ““Óëőƒc!Dä–eùX~~țÛĆĆĆć<ÏëdYfeeeBaaáàĐĐĐYŠą”ìȚœû œ^oÁă]—|YĘ»wïi4‡šTȘ6ȚĆ$O„œßÿężcoÛ f2™x›Íæêßżÿ»wïÎ`ïȚœ{“É4Œăž("%I:ŸgϞćŽă˜ą(cì–ŠăŸŹăeŒœàčœ’1kî|üzüd§§Àívăƒm_ ŹióšE˜|Č.óJAÁÁX4bn‹„A?ƞȘ-ævč R©H±PX*J`‚Kap N(„…cęȘĆxfj Ê+ÊÁW“ăš@ZŽ‰öj<3æLœ6 Ę{‚Á€ćÙs°gśż±|Őxç­”HËZ QqŒŠi5Zța6œ»žȚęè+v„ô ™LìÇœ»pgŻ~äp L­âdǫƁă8d̞‚Ÿÿ#QO<‹ƒûśBg0P»w°G‡ÜGj”ŠmĘŸcŽȚč3§ÖÎĘԙ/!yàĂœè |śŐçU+—/ 1šLxóĘ­ÂăĂ]EBô˜ŽàK^„úș/:íŰ+m^ÄÊö”ˆć€f*VTé/ĘQc.1IДęvÿö•›ŸúśȘŐxwŽZä·é3Ç^ńÊ+ń†Q…Ś©öVôîĘÛêߏ .Ü{öìÙó>êčÄÄÄ€f͚}ăß?A–“$iû±cÇFFFF¶ŽŽ~Z­V?CDǎ?~ €JQ”`ï8} [yÚ¶m;, àmż12EQVTT€ ĐĐĐ ?đGXXŰ ƒÁ0éĉ› C ÓéŒJĆ (ÊÙłgÏ­ŹŹ,‹‰‰IˆŠŠÚż šÄÄÄwțùçP“ĂJńȘŻoIœÿïüŸÉę2ÌYŒȘê*8]6|¶cž=GOD9Í"cá‘Ü`ŒC )à ßۋőïŸ»Ę†' #GŒFQńŒżéìüj;6źÿÌÆPŠ(J­Às*„…‡`Íúćh‡@ÉćD7m†5ë—áƒ-ï!{ÁËžx©];uƒJ­Æź†‡Àȱ5œÁ“'Lǃę‡Ă)8 R©Ptù,&żđfMŸƒä»ûCt‰ĐéŐžX€§fἎ=LêÉŹV+ô:=?0ᑾPTˆmÛăJi)úôêœÖIqĄèr!ìV+ÚŽj‡mŸm‹Sçc ăpűÈĄÚy3 ˜?' Ę:߃e«spOśžè}wŒŸa9F=òœ.5#‰IOÏôXíŐÖÁĂû…À}żMˆ+‹Ï *780ž]î†X¶ÿ' itP<2$NÆm™ïź^!"ń%^ÖŠMË ”ćGuuő=/^Ì $%%„šŐêÙŸÉČŒăÔ©Są&(`oĘșőYŻdȘàŹVë ąąączœȚÚż‘ .ÄÛl6đV”nĘúgÆXG_Û.—kfAAÁ»!!!ŃQQQ'êö1Çłùüùó).—ËÂÓ‘§YłfÍfó^ŸäID—òòòșPZ·nę›7 ŠâÔ3gÎlőÓÙR||üPœ^żÎÏHV——ŚF«ŐŽhŃâjr38}útsŽădQĘÜńńńèőú·üÎÍÿí·ßZ3ÆP“ HșŒÿ‰Àđî]ș#śűAù·Óż±?ÿˆûś‡_Łç{àŹ!ȘÃśĆés§…‰c' y\Tè”zŃÊŚ—ł•Ż/Ż}^&<5‘Ć™›Âf·AŁŃB«ŚĐò·—łÏv~êÿ‚cùȘĆűfë^TcôÀÇ1Žśžd.ż@?ü°M5™Â?É8Æaïæ}pÍûˆûîêÓ7’Âăńæ+ëŐ.‡HMBÌìî!ĘjȚ·‡ôXՅËŰœńpŒÇG»·ŃÒŐKŰÇë?FÔ}#q©â"‚;„ÀăvAÏÔÈż|cڀĂțÜo1í‰i4+u2»X\L­’Z±ü?òŃźu;ì۰ û~ڋ_~„=8?ÿvŒÓƒĐÀ`Ü?ŹĐÜi)lPÏ TYÔ[e°UFŸó”yšá¶%â„ѕÎê}üjZy8Dò!°(v8HûóЍȘê-œFé­ą/{Ć.éXùLȚáO6{næ|?ZZò.æÇQăöFšĄ<8*IҞ‹/îôȚc­·Ÿ’(ŠŠ—gŽŒ’ąâĘB{|żśoÏKžĂEńoÛ§#æŒ @ćt:ÉßÖëć©óTUUUTVVêőú&‘‘‘Ż2ÆùmçGEGG?΃Ćb軹ąâŹËćâüÛògAçßQËœï–O] r:ću Zœw TÇsÁăŐś{Păr•€T7i'ꓱóVù/”ś—~G‘™Ÿû+2ЧáĄ~Cq±ìȚÚú6 ÎüüSyŰûęȚkźS€ g Ï" Àˆ©#žG””‹Öfă‡Ăà3pÔiDÀŒȰlúËšȘźB0 @dT–YŒ_ûŠÆ3CÆąÚf“<5ńäŁc0rÂc8žő{X«,Űshn‹ŠÙš9ÀSmDZOĄȘČČÆ<ìĄ`/«„9À„ŸząÉŒ0h$W•ĄŒpž`ÔŁï“śCŒš¶ %ć%Ąà‹Ż?Eqqlúśè‡mŻ|€Ż~܍ĘûvąE“h[0˜y†tș–’ôîŰ헶Aûž68úÇ/äqÚÙ„ÒâmOÎ|jĐ»óQòèêäȘ—m.»T`WÜŠn‚Žș$ìŽ|Ÿ#7 Íč‘6Ă.;ŃÇĐ<㱌yzŠ›â@oCđà°Çyf΋âÀ=úöP`"=~ôœš‘Ź«=À#ƒȘőÒę%Łv|ˆ­ćkșDt)•êSUÔ±Ê+.—ëȘ9ŽI‹„À'ŐńLčŒÏžäv»‰ăž:śŸˆ1æ *čæú^č\ź"ï±ÚÇl6ÏEq­ÙlŸÛívßáïÉàrč PHHȍæ-"Ê-//O·ÛíOQIddd–J„šç›FŁY œ$Iđï‡śč•8AŰÈqÜ_;Œ±ÍáááłÊÊÊȚńzDŒà8n•ËćRüÔ ÛXhꎏˆ|, jˆWęí‰őí$nî?Hâ­-:CȚź}_Ęșc› @RBd,â›aΚ)H3 —»†ŠZ’ Ë2’AF š8’xśË-ÌcłĄàô)ފKÂč çq±äâ5ÒÙș«dÄščOa{Ç/0šS_žÉyușGÏÿŠosżCŻÖʘ‘ÓAí–Pa)EȚùßÙĐ.àPńjìú~.\.fS†Ž‡Ct‚< š„G`lÎd8Z뷋é™31ÂKyŚ`Ű'{Źóžä(e‹6,CȚ'3ÏŁsóvè3n,îlßï§źĆ•Ș2TV”ĄMdœćUèÖŒ›žbÖÂïÿ8ŒùœL‘ÍąžÀœAă'DAŹń;A‚ŒKq»ôă](jZ‚0fÆEÇxdOhGą©#3Îç0˜ő˜lÉbäpüĄ.FgO"&f"&8ŽűoÁŸŒ4èۖ@eÁ{Ę>Æ?îddźőząòPSf…¶P§7IpȚžűS#jƒZ`đăMò-Ô"cLđòú€Ś?bÍ§Ż”Eqú`ï_W㚀(ŠÛÿ7^iÚ À Šb­V»ˆVS&FEEMò1ò‘i)ŠČ­ąąâ&”Zœ‘ˆ‚41M&ąŁŁÁó<Eńő“łZ­#„(Šbó- ~sà +))™~V„R-őő‘çù„QQQŻűśÁ;|&ËrfiiiÇq&"üQŐ;>W/-{çÈĆqœ:Iÿ9șșÿDŻ_ÆŰÁ Ž»k֐g©ŽȘœń<ßۇ0žqűéüq(ŠB=:3I‘ˆŒȚœZ•šÌfVé¶!gókűxÏv<9dÁ‰V·%ąçdȒzN™d4  ź“±kwуsFłGNÆ]­:ąí˜{ëí@›ÄVxuR&Cc©ÂVÊ,% 5‡o.ŠÜÓ'YÛ­hÌęĂÙÈä‡0ić\Zúô<ö]ț!/_#ĂIíaÒ 3Bná)D…ÀŹ7$Á3Én;SQLŠ"łH}˜ŠƒƒsĄÏ€aćš]fû€6xțᱞ§y'ˆn™ìÍ=›w/ßôú€zæZ0­Ć ~RÌBQpà<$ărÂ.49q‚›Á„xđQäBw+d2™vSćĆÒÒÒÏŒ^ đ’+ۃƒƒïÔj”+$ †8^`,Weí•+W3ÆLˆă8&ËČ-$$ä.­V» @ÔPV5L<č‚ PFMàÆ-݆đ>Đč·êđéÜ=’§ƒE°w íl Œn›ˆÖ·%ąMlKć7C”9 jŠÉ2Ü<’‡$(ÌÁÜŽî«Ílì}Ăn‚AŁO É#Áíń@ôž˜L ÀAVÆVîÙHÛۍìńłŃÌ©YDx8”œŰû—ÂÆż2‹ŽțQcyŹÏP¶hô,’œn0èőzvĆYIïìùŻń^ùÈ»,~.•žîővć~‡…żł1}‡QßG‚ă8d>=3Ś,`ŠŹ €œą­ž”OhEӆ>n1íàa2|ü[żs3ĘÛńn<Űc[¶e-œûÒ ü|æ$†tíĂî™öٝN(^2űńCțEŻŽIƕòR䕟c{N˜úê¶·VńÇïÜäőÚ(+òh—숅ÀÀ ƒ`sâ!ŸëeèDkÎlA§ÈֈŃDbĆÙőLH/̃Ëăb«ò? Áèxg`3bƐàvbùÉ·Ą‹0łgą†Q…łƒZcíï[Xç,!@(h9Ž:p*«èĄS^À/\X„Rq IÒU” Ś?đfÏóœ,ËőeĆgȚŸ3ÆŒoőŃoq8žçy?sE–eĆ«/őÏšUЂß9@^0•ëÛÆsǑO„­ŸVŒÀûśƒˆčf%öçP©;Ì+•+őŽë?GŚ0üĂÚew«üȚ›)ƒ“șé‹ì•Iż^>Ę@]:ƒèòž7=ĐáȚƟĘs «òù„Ìíϖőđ€ä.-Ûc€Ç1žmOr9|žżŸ%FÆąyX3Ü>m–OÜw—`OöFšúf  ąśžÏâtƒÔûâÄ·x°C242G6Ń€± ƒ ©ÛWŁw›;1đö{ی­K°ißç@a!ŹÜZIÎzĘŐŽ5ŽZ-=¶v&ÛâđuÇ7¶ï#P«Őx6y8Ü7M|'“ćžË'”Z Ś–“è–:‚ț=·Țs猘@éŸeÇ.ÿŽ{RGŒ†źö”ą?ę1Ùçm+P-ƒóŸ›Ëț[ăyÏ``žLŁóŁyAkWŁŃ0Ÿ‘ë:mÇq> Œ.§M} v|ăSxń~;òúôšŚpRąqЈ†’ûP#ó Ô©X»(ń<ÏŒ@©ű-TT°zƒ"È;~òí˜zwq“ĄÔu3îyÁœÉČL”Ïc\đêú’ĘTiŹ QțS3ÂĘ4đ6B`ŠFțż ÔŒ YȘĘ*…‡W ¶ś{”êąÔ©ÍžwzŻx–ęxêŹŸŽGZßK’,3ƒF§l=±‡{~}Æ\"zÙŻoŸx(säT:túW¶rÔlȂ*ŽśŠ ‚ 8mœ„ț‹Ÿ…]p`ÆO"„ßXX68È —JÁž5)ű­ž ȚńkŐ\\č/”œZtBßÄź°ÊąŠôțŽˆ’kžéwŽŸ]3ČëÀđCçNŽŽ ŽćŽêŽîjbęŠÄR15|ąŸyqâÍ€5(v%ŁÂs <p‡i <ÿË»H“pÄö%4L‡M,.čŠhőĆû^"ąĆ‹żÏKôd"ú•1ârč^Öh4ƒ_zé„G[¶l©+))‘­Vk-`&%%qűć—_d_ėp˜$IRvvöpFłT–ć7cǍ­ššè±xńⳌ1•Á`@RRg±Xè\MŠ:„……ĄąąmÚŽá;wŽÂĂĂËćçç+‡fłN§M›6eAAAìäɓŠ$I€Ńh‚’’šTƒĄ&Ű““““9wîÜŽ€€Óé€ŰŰX€ŒŒ<ŒF#EĄšš(æv»QTTTK\»hŃą)*•ê)Çł‘çù֌±./œôRGIo“&M͝={V©ȘȘ’rrrŠQUJJÊFƘ:))‰“e™Îœ9Ł@xx8«šš víÚqv»Îœ9Sûò"!!»xń"•––Ö~ŸÀX~~Ÿìőń79++kV«]#IÒی1 Ïócl6Ûđìììcž   4oȚœ+//'ßŰÂÂÂPYY‰öíÛsTTTDM›6e,//Oqč\†ŐjE\\3,77śȘč]»vœ8qB€   Űl6$%%1žçÙɓ'łÙ d©‰h%”Zűűxœ:uJù»òèxÙuÒű5DŒÆn@ąÀu€¶gÚërż•żŸĐgDçÖŃńTp„ËMÂ[ {âęôßœè  \Í©ŽEȘŐ%Ë€ž{ÆwlûęÙăčŃAáűiî{U@‘držEæ‘$R@à`€SQÛÌ(ÎȚ‰JK5őF¶ńŚŻ1uÓÚ1ę5üx:—ćìzû))ÂJ'R·Àép0žă ô6ő‹ë6űr* ś2}_“+€c#R@ŚfîúłŽk‹æPÈKê©êŚšłF€Ż†țT\M€!cÀŒłÍšÔs±‘d2uuŒŸ`ONNÎáčsçȚÙȘU+SÓŠM”}úôÙ@DV"*ć8źKjjj"222žW«Ő8E9=oȚŒ:Năr興<‹-Zm”Zßțæ›o~?vì˜Ï«BNIIčăȑ#żïȚœÛșhŃą]DTÀq\G«Őš’““s +++1ŠcŒ3ÆZÚl¶FŁń)ƘDDȘÔÔÔ±Ï0ÆL<Ïß ÀÊ‹LII:cƌ€°°°'RSSç@ZZÚô*•ȘFŁ™.IÒ§óæÍ—žž>N«Ő#ą*"ș4oȚŒ9ééé#8ŽÓj4š™n·{VzzúƘÚ;'§WŹXŃĄŽŽÔéCÍ€I“âÖŹYsfÚŽi-"##ßVćcŹëʕ+>ÿüóĂdYvdgg–••”‚ăž`ÆX”(Šïdff~˜ęȘŚkBËq\»ĘŸ`ŃąEß4ÈÜŁGÏEù…ăžź%%%OŻ\čò <©ŃhPIDŐ©©©ÓÍfłÆj”y.\˜ćrčgffî`ŒiŒs-͙3§cnnîÙ/żüČ:''gżą(‡9Žë^^^țÜČeËNdgg/&"ÇqĄÇ”«ȘȘšn6›§p‘}ȚŒySłČČfÏó|;Ƙ>%%ć ÈÎÎ^áœO:Y–OΟ??;33s*c,œçùæ4Č,ŻŹŹü,$$d`ZZÚ«fłY3qâÄDŁŃxJJÊÒúÈŸÿÀ[g X—–ŐŸwűziÙMoœĂ#:ô·ćîí`€ŁDô:Ïq!J=žPçłÏRŐŸoĖ_śöđXš1h@Ÿ–]TŁ; {ă:0sP8q“;łÿLZvĄqä’],"0w­~G ó#:śŁ1wƒoÌôE-Őö;sÈs,őȚŃt„ș‚1 2Yê7oï\±oóTüéœ9šŸ’–ƒ *Ôʄś@ ž•żźjà۟wê„c­»ô ś~ÇBÍìäV*nDŐà‰HJOO?œ‘‘qgëÖ­M·Ęv›źkŚźkłČČeŒ&MšÔÉl6ńx<Š‡Ûí>ÂăU*UcŒËÎΞÎÓ‘;==}ڱcÇțU^^.zęúő…iiiddd$zł—ÉsæÌ™"ŠbźŃh|êüùóé|đAaŚź] ü,33ł7€ŠŠ.”Z­ÛFc7—ËU°bÊZ­V'Šą=--í@qqńŰŠM›Šfee€Ùłg?Îó|TNNÎČôôôüŒŒŒVłgÏ~NŁŃ$»\źcjžçŁ8ŽSK’t’ă8ÊÉÉÙÀóŒZQÒëőLÙûț /<`4ÓAx]ƂÀÀÀaȚqëœ2śœ9sŠ»ĘĄ$I%^O A«ŐČÛío˜LЧ?ÿüó§.]ș$UTTŰÓÒÒöćççiŐȘŐ[™™™ƒT*•Á«6fϞę/­V;Ìćrí•JźR©nÏÌÌé7Ś_\čreڛoŸYäőpbä1cÆDlÜž±4--íHFFFÇ&MšKJJì©©©+-˖ààà;vìxȚăńÈê=zŒ‘••5æÍ›·îäɓYmÛ¶M­źźȚŒf͚ƒaaaš.]ș»víú~fffÿ~ęúEuîÜù)ƘQ«ŐŽÌÌÌl“’’’m”Z?[œzőA"ò̟?ÿóśßÿ‰ŃŁGgˆąűŐČeËv§§§Ÿ‘‘Ń3((He±X”żłQ‘kt9? őżëèœÛd“`ÌȚâ ÿâWCëÔșÇCüŸ ʖ»7@!€_3Æ” ÿìśŚWĂDˆßòë^€CfVŰ«Û~ttOŰ€­KÖ„ô›Ű‰‘ąàŸv H„e*°TWăÓÇłj­i@ˆ’dŒdDô8jÈ'Û7 ŽcܱôëÀÏêÉÚœ:V¶‹v8'¶ûfłšWĆÖécß™œsè?Ł·ĐCÏż“›Çî*5^83 “O'B26Ù‰Őá<ÄŒŸ}ÿûS)°É.È”yܘZˆ©:ÈTÁzMóJ…ŚĘș‹EÒN§SN'q'‰ąX›s@’$ˆąš9tèĐvQŁ—,YČfńâĆŻ ‚`·ÙlŒ™đˆ1ŠÊÈÈx U«V'Ú¶mCD."§OŸ>)((èU""‡Ăqpʔ)CˆHđ&Ž™žbÊ=‚ 0źÆ!XŃëő$Bíê,Š"‰ąšŰív ÏóéD$‰ąhŸ:uê»Ę~ //Ż\Ć~[đ'Ą&JÈétj 77w§(ŠŃK—.]łdɒW‘XIDATAšČZ­?‰ąšEŃ VŸ-‚BDÊìÙłË JDÊČeËv”••„ŃĂŻœöÚ~·Ûꐷ-aüűńmg͚őĄÓéŽx<myyù—Ë„[ČdÉò„K—źEQ{äȑCą(jBBBj™FAP>úèŁ‹‚ Ä 0 L’$gBB?{öì“ûśïÿJƈ%K–ŹYČdÉAìv»}żoˆ&“I‘‘1400pÿłÏ>ÛÚ7ŚS§N腈‘ÛíVA€V«LDîČČ2{˖-ÇVUUœ?sæÌ51111‹/^žxńây‚ ‘S’$Ić{žDQT:wîl^žpá ÆŰ„Yłf}òÁ HNN6X,–żœÎ·^‰·ž$Ś*ü™Pí`”ßw>`æê‘x“úX+uC<Tw3tȚœ^„qyyŁ€È· ”ŽőiŃ o ™Źę›"Œqh;ŃÂïŰŽ+OœöÓ§ăêčÀȘÔ) {Ș[ż0ƒ9œÂiQSęÿd,țŐ'ĄKű3jKò«LoÖ%îÙŰZú€ÍÈin˜sÏŠbaó9P3~süŒ”‘šÛQæ©ÀÖ+“0čÙVŰ% /ÜADùìĆÛvcgĆÊwŹúKŽŸ Ș}ûö\nnꜘ˜š*((PŒ€ą$$$šÎ;EQ$ˆ‹‹Ó?ț*7”Ûn»M]TT€ÔùŽ+,,ŒJ!§-,,Tž‚‚—Á`Đ8N7cŒW9sÆĆczœžˆHnÓŠÆb±°ââbLš4ižÇă9¶nĘș/ÍfłÎb±ˆ±±±șêêjČX,źși9cccu………"k«ȘȘ\ț.–-[¶Ôęțûï"DEEń%%%”ś[­V3NÇŹVëUA(ÚòòrR©Tp»Ęî°°0myyč«U«Vúüü|ÁžüŐ>Ÿ¶Œúa çJKK=&“IÌ.\žàŽŠŠÒ^Ÿ|Ù­-))!oùúŻ9wîœìÿ%$$đW%ÍOJJҞ>}ZILLäțűă—_Ûêšš(véÒ%·7lŒVW©V…•••č`ʔ)kívû† 6öÍkXX˜Îj”*n·ÛĄ/--ê>WFŁQƝ?ȚĆS‘4yòäl—Ë”û­·ȚÚïmśoÏúq đ6 íúŚżȘ꘯xč,ÎhĒܘEș!pmÈĐW[t*DóEÙ3}śä+ìΈD j“Eœ:*Àu@·!Ë7]gu«l}Uò]·ßgß1Ÿ ’”ŒOâ›ȘŁèx…Džc=6•ö%ąS아œXség:'Œ챈qŰVv€ˆțű_yˆêX„ę_ˆz,ÖŹ> șŽ-ĄĄûÖPÎßëYÿa49›Í&€Édâívûœ{#Ț$7â}đ?Uèżlçτz<Ű ¶ßś>€ŠM›rĆĆƒŚPÉûIÄtƒăóĘ3fłÙd UUVV*ű IńÿźÀ«Șžš: Ë7 ńą‘Ïÿuÿë茀Q‰źctȘfÀcĄúÀÊŠˆŽęËČl~Đ»ęoH7K €ë5Ûńz€ÜșÀ[·úû“*őŽ żŐ_aŒq0p ‡Źü“]qțȘ”~k&țÿÌőÿ@ú/ÿ€{ŚđČ:àËŚQ/šêQ1pőHčőncÀÜ 7&ć6æ“I HÓČA„­vÉłL ڈôĘž6șT|ë‚°ìśœRàÖ+94Dos«Ü*·ÊßGNj:*o†șncz]v`ŒÔŚȚ X7&„ąp»žê€nC0ŐÄTß5nê­r«ü^ÿmY=ț»ŚskLr­ïïÍűț6fP»_áÿp“|óț| ho•[ćÿ(đ^€ÿ @ȚŒzàFÔ 7ąbhLolq@|ŁÀ}ͱ[`{«Ü*ÿwÊÿ!@vt€Ô IENDźB`‚passenger-4.0.37/doc/images/rack.png000644 000765 000024 00000141307 12233035540 017662 0ustar00honglistaff000000 000000 ‰PNG  IHDR.†\í ÁđiCCPICC Profile(‘UĘoÛT?‰o\€? ±Ž‹ŻUS[č­ÆI“„éBčÍŰ*€ÉunSŚ6¶ÓmUŸöo ű€ČxB ÄöČíŽISAŐ$€=tÚ@h“ö‚ȘpźŻS»]Æž‘Ż9çw>ïŃ5@ÇWšă˜I`Țò]5Ÿ‘Ÿ˜–;V! ÏA'ô@§Š{Nș\..ƅGÖĂ_!ÁȚ7ÚëÿsuV©§$žBlW=}ńi€”©;ź ȚFùđ)ßAÜń<â.&ˆXax–ă,Ă38Sê(b–‹€Ś”*â%Äę31ùl ó‚”#O-êșÌzQvíšaÒXșOPÿÏ5o6Zńzńéòæ&â»Ő^wÇÔźkčIÄ/#Ÿæű&ńœÆ\%x/@ò™š{€ÂùÉ7ëSï Ț‰žjű…©PŸh͔&žmryÎ>Ș†œkș7Š=ƒßȘÓB‘ç#@•fsŹ_ˆ{ë±Đż0î-LæZ~ëŁ%îGpßÓÆËˆ{èÚêÏYXŠf^ćț…+Ž_sÖ-łTä>‰Dœ Æ@îŚ§Æž-9àă!r[2]3ŽBț’cłˆč‘ónC­„œš›Ës?ä>”*ĄÏÔźȘ–eœD|Ž%4 `Ă î:X°2𐇠ŸpQSL”PÔR”‰§aeíyć€ĂqĘ ŹŚ™5FiÏáî„›t…ìÇç )’Cd˜Œ€LȚ$o‘Ă$‹ÒrpÓ¶‹ÏbĘÙôó>4Đ+ăƒÌčžF_ïŹ{ÒĐŻôśkû‘œi+ŸxÀĂޘńúŻ.ę°+ò±B.Œ{łëêL<©ż©Û©őÔ î«©”ˆ‘ú=”†żUHcnfŃ<>F‡Ë ^Ăe||ĐpÿyvŒ·%bÍ:ŚiX'脇%8ÛI•ß”?•ć ćŒrw[—ÛvIűTűVűQűNű^űdá’pYűIž"|#\ŒŐăçcóìƒz[Ő2M»^S0„ŒŽ[zIÊJ/HŻHĆȟÔ- IcÒÔìȚ<·xŒx-œÀœŐŐö±8Ż‚ZNxA‡-8łmțCkÒK†HaÛÔłYn1Ĝ˜Ó ‹{ĆqHgž•Ÿžu#žç¶Lț˜ hŒŻs ˜:6«Ìz!Đy@}zÚgíšíœqÙș/ïS”Ść4~Șš\°ôÁ~Y3M9PyČK=ê.Đê °ï żąšÁś-±óz$óß8ôȚY7"Ùtàk û”Hևwⳟ\8 7܅đÎO$~đjûśń]Œ›n5›đŸêű`ăăfóŸćfsăKôżpÉüYqxÄ(Â@ pHYsttȚfx IDATxœìy|EúÿßÉÌd’LąJ.QAt•Ż'Ń«ź źž J8Ź» |BŒŹĘ5"B`Żćë‚ČâE ,âP0!„ Đ\“;=Óęûcèff2!wf’Ô;ŻzeлЫș»fêéO=ő”—ą( @ owW@  ©ĂE A§A.@ : Âp@Đi†‹@ ‚NƒŸ­(&)u^ŒŒŒÜ]@ĐE}CśŁœú”V.jC”eÙćvA矑y{{»Ü.Âțś_ô ĘW}F[ö)^͍ăboŹšŻE©gĈÚype°xyyiÉ~›@ žBQ”ûšoÄș>Î}‡}ŸÒšț€YŠ‹}ĂT“ŐjŐ^;7ZAçAmP:ÎĄ)ŠÒ&M t=\ő öï­V«–OĐ}Pû ”ßđööÖ^·¶OiČáą6F”AZ­VdYÆb±PS[ĂÛëßfćʕ?~ŒÙ•x‘‘‘Ìž=›éÓ§c4Ńétx{{ŁÓéPE3jÀȚH‘eYëŹV+uuuŹ[·Ž7ß\I~Ÿèș+‘‘‘Ì™3‡éÓ§ăëë«ő'ȚȚȚÈČÜ"ă„ICEöF‹ŐjĆj”b±X°X,ŹYł†E‹iyccc›f!55U{””Ä̙3Ńétèőz#F/AśÆč_PdŐ~aá…ZȚn鯚 ÜÉîmßhŻ_|ńEf͚…N§Ó’œÓT5\\-’$!I•••ôïߟĐĐPyèĄ‡0™L-?CÛ1›ÍŒûî»$$$PTTDAA=zôÀ`0`0Đëő-jh kĄș X,íaV’$ȘȘȘˆˆˆ žg3Š1~êXüMțîźźÀMTš+ùâœ4V'ŸEiq§NÂÏσÁĐbăEśìłÏ>ÛX&U TfMM ”””Ź_żžŹŹ,^zé%æÎ‹Ńhlí9 ܌ŃhäÚkŻĆßߟ/Ÿű‚† VÏč œÄAśÁùÖb±PWWG]]댯'33“Ç“f2yÎ]Œ@©›&ƒŃÀĐkăëïËî­ßÂ𫆌ëKšcž4ȘžŰK€jĂŹźźŠŠŠ†iÓŠ±{śnJKK…ÒÒĆ0›ÍΎ;0Z2 bÈH èÆŰś ’$QWWGmm-”u”<ü§‡Ù”kiżmÆ?°‡»«*đ*Ë«{ŃDÂĂĂÙœ{·Ö—űűűhJŸN§kÒ±.èœëì%îlŒšÓÛÄT·.F@@·ß~;Û¶mŁșșÚæź;ïT%  {âȘ_PĘjkj”ŸÀ7ÀˆU±șč¶OÁ7ÀÈȱżă›Žïš­«Őœ^Őju˜mÔMšU€9ăZm ޶¶–ÚÚZaŹtjkkŃëő Źz«Ă,‚ŠZȁ ká씫Ș.jż`Ćâæ <ÛO]]z­O±X,ZۍŠrAĂĆy.ŸŐbŐdÁšš1?ż‹ŁȚŚÚÚZMÒ3 Ú۶}Œ@Đ}°W], ’EÒúŐp‘ń`+pD9gžX$ ’^Ò&}۰mÊĂpي‹s”—…ÁÒ=$I»śê–žśAśÄùV–edëù!#ő·Á*‹a"#jŻ!I>>>šjgeč)ĂM*r<'I’Er(HĐuQ UûvàÎ[ t/ÔÇj”b±ZŽpÚÓł*Ôăœâbql/ö*~ShĐpq^“HVdŹČőü˜Šd>.Ę‹ĆvŻ­òùF&ÚCŒŹÔ{rCEgìƎÖ<7:«H{-Û§œuä*Ÿ ëĄĘsk}YO8è ĘWk9Ż]§"†ŠΚ>.öíGVäf/Möq±-|șV«Uk\@œÿ {ăȘă±" 3çŐ8Y–ë©rMíSš”:ŽęĆrć]ƒUVê)- {cÿ@SŸđq8âȘ„(ró€›”:ô…Ț @ "|\ÎŽ•ĘĐ,Ć„ĄB…Óœś[ šŰŻcfđqÔÇÖwx{”n»f ș7Âh*jäÊx‘…‹À Ćn°š5‹ô¶Űp±o ą3=bšHĐööƒ—wó#Ż ĆE ­ÆËËËá)Ú*œsNžĆÇ„!„âÒ5śU 4őiZ  Ł„Ÿ.Í2\Äbzс3ź|\„sźÀŐÇĆËË«U}I›(."Ї@ toœ;"áă"š   {âàh)f .€âI†‹đ…=Č" #Ș­ĐZ—Ąž UxyŸŸQ€vJÂÇEp!ZcŒŽ.|Ę9\­ÚÖ)%%…‰'ČgϞv+câĉlߟEQŰŸ};'Nl·ČNž<Éĉ9yòd‡\ż–&@ h*ńœ»Lú|ùyăÁ ő¶ŻŸśȚxp’$5)ż«ôƃű|ùĘ~Ž“Žă(IŁŚqqt0U%ŐŹžș‰e7Ÿćöónëä¶8.ÎëQŰhûzûí·űăÿˆ,Ë̙3‡3f––FLLŒCȚŻżțš6CćȚ{ïeÿțę\sÍ5ZžƒÒ§O>úè#f̘Áž={Ž<Šą ËČŠ8ÈČÌȚœ{ÉÏÏgăÆÄÄÄ Y$–,^BJJ iiiQ\RŹíÈÍÍeÓŠMÈČÌŁ>ÊÖ­[ÉÏÏçŃG ''ÇĄŒÿȚÈäɓYœz5‰Ï%2~ÜxVź\©)?śĘwO?ę4ÁÁÁŒű⋔••ŰÆWț<ê’@ š4öÄÜŐŠCIêòĘT™«1Ÿ­€Œ€‚+~…©—?ùߝdĐèpïÈgđšpíüśm>L@ˆ?qÿŸ›€P?ŸĘpíËżćèWżpŐjÇÿßűàÖź]˞={xóÍ7òEFFjF ÀÍ·Ü  )jŐhžóź;HOOż`Ôęê1 z˖-Łššˆ˜˜źčæŠŠŠžù–›Ù»w/cǎu(·1öîĘKqI1qqqÚ6ƒȚÀí·ßNvv¶ŠÊLœ8±ȚëÓ§O7č,@ h/ìędŹ]* žćRòśž"śËBüč(ڄO Ž‹#zČoóJN›©(©dPL82VŽgÚȚ çà¶\ŸÙđ 2~&#‡3òQƒô…ëK`_­ŹA1ęűygÛÏ»-“=­yöètééé—°`Á‡}˜ÍfQ…țęû;ÔCŻÓÓ3€'999ÚvWyÀ6ÔdżĘùő·ß~Kϐžèuz—ç*I&L ;;›#Fpûí·ÍŠM›|gúŸŸŸ ‹ÊŐW_ ۆËìëăêíq„Ÿ‹@ h*]=äŸË{pbÿ öžaà-aÚ9Š ăÀr@Äu}™ą‚2~Ë+„ČžZ;VÏ•ĆŐÚçꂍŚË'ÀÖ7ęzŽŽK]G”OéÒèV­ZŰ:nƒÁ mOOOçŸûîcŐȘU<őÔSdff"I’–ŻŒŒœâ’bƍ§}îÀțÇW•Šxà‚őxàÈÌÌ€ŒŒ\’IOOgŐȘU,\žÒÒRČłłyńĆ”Ą {ÉçyÛm·đĂ?8šF7n€gHOÈΝ;›|ŒöBÌ&ÂyVQWÂKaĂúp8ę8'Ÿ?Í}ŻŐÎńŠ;Łűò­€œŒ‡‹"BèmDVŹ } Ś?z9WȚ„ë‡-yűùhŸ?ùĂŻŚëŚ\›Á3(Š_»Žmó0ì±łŠÊÌedff2cÆ ôzœĂŸ˜˜műÈ^xüńÇ)3—‘““ĂôéÓ˜0a‚–§ž€˜Yłfiyüqn{k=őÂțę­coà©§ž"''‡?üûÌÌLźŒòJÒÒÒŽŒuuu|űᇚ‘€Î\  Ì\VOÉ 22’… ’––F]]kŚź%#=ƒ{&ßăPŸžTXÚăűűűàççŚMD tQœgˆÔÖÖàö©·í‘ĆôăÄś¶Ț°ë.Ö¶śč"€ßŽ—0pL?m»O€Ž°a}H_Ÿ—[r©.ŻáłÄŻűà‰4ŠŽ—iFIEI%›ægQ]^ĂÙÜbŸXúÆ\âösnÓéĐmÇĆcuæĐ€{&čÜÏä{Xłf ßíę°ùŻił„z†ô$))ÉÁ§Ć9Odd$III˜MŹ‹)ĐÄÓO?ÍÚ5k5ߕž!=yzÁÓ .ZȚ5kXžp! .`òäÉlÚŽ‰ûïżŸ_ꕿüć/lÚŽ‰èšh‡I*oźz“—^|‰ûïż_Û6yòdâăă›|Íښșș:Ș««Ï(ș%Î茌Œűć—_(/Ș@î‚CÍQ7ś%ęUž(<„€^~Ú9zéŒè7Ź7ż|†Ł.u8śq ŚČăŐl|âü,Ő~Ăz󻩃”|…‡PU\ĂóĂȚŃȚߑx}ŚșŽv§Ò’ű-*^JŽ Šą`”Z‘$IëÀ***(//Çl6SZZJBBàìÙł-ź@CRQYÁÀ]î7›Íœ9{†Țœz3cÆ >űàrrs(8^À­·ȚêżWŻ^Œ3æ‚yrrsèĘ«7&“I;Ÿsù{śí„Ž€ŽȚg%I҆s†Jߟ}띃úŸwŻȚűùù‘<ŸÈˆH‡a0łÙÌöíÛčí¶Û0™L۝ë#I’ËcŽȘȘôùçŸD)ˆ€€üęę1Ft::źÍËž‡Ú/X,­oš©©ĄȘȘŠêêjjjj˜0aEEE,É}ŰĘŐmsŹ’Lé‰ |zè ìÓĂa_m…DĆÙj‚ĂĐêwÊ”č™'0æRŒçŻ‹òÌÚńŠò̔țRAô-—Žû螃 Ó2ÉùoÙÙÙôèŃ___üüü0 ôz=zœŸQ%Æc—Ÿ}û^pżÉdrèŰUŰ ±ÓXûm ÿš«Ż©· À`0Ô3fœÏÁùœ«:˜L&îčç—۝ëc0=W@ èHêêêêÍ"é x $Ê6eÙùü Ț„űc[„©țčŒčìΰzŸ”?^H”?!Qț]òځíʀ‡8çzŠŚsSêá)uíLšAüàBXŹjjj€źçœ+đóSé;@ÿ›ú~Sh·ą:”żhț”țüÉ}ÛušÚŠÁôèŐö1ÀÂ~uhWț-Mőy>.ndùòćŒ”î-m!IOĆËۋ'Ÿ|’'Ÿ|’çž{źY+_ ‚źMBBÏ<óŒ=@î YEg~,àÎU#:Ž\Oą©çüÉŹlŽí:}țsŠì–ë„¶‘–yìZEÍMuuu,_Ÿœ &pĆW°xńbmeh5ćää°xńbnžá233©««CQN:Ɣ)S8uêeeeL™2…yóæ±xńâzŸŸ2eŠvÜČČ2Țzë-nžá/^LYY™–wùòćdffą( oœő›7oźWç#Fđä_žäoûs-]­…4òFƎ;ÈÍÍm‹f#:9999deeÎM7Ęä°OQävO[fíă›7ްeÖ>*ÎTłçÍŁìyó(Š"óóg…üüYĄözËŹ}Źœ)‹ßÿ–GQdí3”ćul_ű[fíŁ8Ż‹dŃȚż;~ßÿ«ÀĄüÚò:öŒy”wÇïâżI‡©-ŻCQdŠóÊÙ2k§”8”±eÖ>-ąÈü7é°C=N(aûÂŽČìón™”ă»~CQdŸÿWíŒÔżsy*ÎTłeÖ>¶/üÁćőŠž%”Ńÿ{9#Šöï°{ärúńÇgôèŃ€§§c6›™:u*W_}5………TVV’••Ć /ŒÀ7ȚHII !!!Ź[·łÙŹăwȚ!++‹ˆˆrss:t(Ï<ó ÁÁÁŹ[·ŽĄC‡òŸÿü€œ{śòá‡òûßÿž—_~™àààzu=z4<ò<òęûśoÿ‹ÔJVź\ Àÿțïÿșč&ÀP țùÏN«CwÀ_ä-Ąő„„yK(ș^(ćđ–B6>°‡ËŽàä͞Uyl]°PžnN|ƒő|őÆÏœțŸ™Â„xÿ«ŻOGQ ŚȚ»kîúšă»Šđ 2PrąœŹjŸ9ę})«ŻOç«7~Æd ûœcŹŸ>ă_țJ`˜‘ü]gűù‹ÓZ]o)$Śòwț†ŒLMEÙïCAAFæ“ÙÙü{ÊŚœ>PFÄšPČ^8ÈêëÓ)Ϋ@F&ŚŽ|b;ŻoWæáäÍgDŃêóś|CM©Ä脃]^ŻËž„Ëž„ĄśÚ–P„Cî“úçQ«CËČìöôòË/Âÿ{æÿńÄOđá‡ÉÏ?ÿŒ,ËlȚŒ™6nÜÈw{żăoû_ę”&•eeeńĘȚïűä“O˜:u*éééZ›7ofúôéèt:ȚyǶÖ믿Î'Ÿ|BFFÇçïÿ;Č,Ł( ›7oæ±ÇăÀÜrË-ŹżȘržû::ŚÉžțęû3jÔ(233ÉÉÉi‹Š#:)999dff2zôhąąŁêù'(Š”ĘÓĐûû` śĂîÇĐûû`đśBQ äD9ƒïêÍ#;Ż§ß ÁÙrš°@&ŹŒ‚ĄśśaÔł¶„RÎ4Ÿ;T•VsÏ{ŚłlwŸiv*9QÎCé#‰Y6ˆáS">óężNpç›#˜ôŻ«žóÍ„„ràĘ_đÒ) țę%üüéĆJmy-%'ÊÈßù+Šbćô~ÛŚà‰œš-Ż%ŚYFΉæÏźć†§Ł˜čw4=‚ęűńßż œ‹B|űł_öĐ%Úy) ( ìúSŸÁÔϗ?Œ= /rákwÎ'FĄęï‘cČ” û!ƖĐ"Ă„”ë Ž©©©DGEóÄOpòäIȚ}ś] @vv6`S8¶mÛÆ†mlëÿddœ_±sÚŽiô6G„ÁÚ”kÈÎΊ€€„?üá€Í  ĄŹŹŒwȚy‡Ę»wĆńăÇ)/·5Јˆ-WAć2yòd7ŚD žő7àčçžÓ¶9(.ŠÒ!ISìȚśöeđ€^Ú¶û>ęś}ú;ÊÏÔđ㆓Œ=öKÀ6Trțpń•Ȋ„7ÓçŠú\‚—Ț YQžțé(‡Ïùì!a”Tń㆓”Ta śćű—g‘…żż˜ȘÒjÊÏÔPžż €[ æÄ—ĆȊÂϟž!$,ż‹}8ŸÓæç8hbo­Î^z/Ân !çł3š+D‡„5îb‡sęő ™OfÛúžDiőmüșuÜ=rŒWőiźMŃeœsûôéCjj*O=ő›7oÖԑgŸ}–‚‚òòò(.>ïépŒ;îžĂáęŒ3xæ™g(//çă?&""‚#l–űńăljˆˆ`ûöíŸ5j•••.ßˆŽŽf̘1dffČmÛ6Əïî* ‚fÛ¶m;vŒ˜˜ @uMuœúè#nŒńFȚyǶVƆ XŒx1ŁF"&&€'ÿò$ŁGÖ>śńÇìÆȚț\&NœÈ3Ï}šmÛ¶áïïïòxMÁĘŚČ!ŒœÎ^xáźżțzžxâ ažʐùóç¶ß°ę>xy{9).3[EęĆTËs~hFËÛŻÆÛàMÙ±êsydEvùWÛÔÏèęœé}y0A‘ŸŒz~€¶ïŚ*űí§Jt~^ZžŸ?9‹č †+ŠöĆi`ÿș“6ƒcâĆȊLÔžPŸÿżȘàâ+Ïù,ŰYBï˃Ńû{kurźcï˃ő|4y_‘Ÿèțy’«f^zákŠ^+-ŸJÇ ^SûvÒă„K8ç°víZŠM›†$I ‚‚lIÁńˆˆˆ`ùËËÉڑĆéÓ§yöÙg‰§ŹŽì‚Ç>|8ńńń”””pß}śiûîčç8ÀkŻœÆéÓ§ÉڑĆȑ#Y»vm—.;`Àf͚E^^ž6D'ș©©©;vŒÙłg3pàÀó)ČÜ!Iuôhè}mčDUi —úRUTGI^%ÙkNłćW,uTç‹ W]4R9·-ìæ ~țì4Ù«NPqș†_óŸ‡öS°Ł}/Yæò©œ)űò7JOTĐçÚY&ü†P~Űp‚à°ü.ÒŁÈ2]ȚƒÁŸ|•”ÏÙïÍԖKüô§9s°”°›ƒÎ/Xé\EÁ€C‘eúdž~C({Ț:m›UR8žQJÏÁ~Ÿ·ÿŒĄ‡N;ŽUR(?YKà„Ft†úwćY‰ÒÜjú\è°ßù8 Ő±òŹ„TemđűM©C{±ęń\Nì.槟~ÂèkÄŚè‹ŃhÄÇǃÁ€^ŻG§Ó5:|Ô&†Ë±cÇÚć$îćá‡fçΝ .”””\|ńƄ††RXX(T  #I}úôĄžž˜_ę???Ă„źźI’ˆ‹‹cśîĘ<òĘïÜ]e‡‘ŸÇ‰ĘĆ:|Ÿ.]ÂÇEĐŸŰ;æÚc2™XČd EEE€€€tp­AG’’’Bqq1K–,Ád29ìs9iăܐŠH"©©­h“éĐé•,đ,Ô᱄„âââ„ê"tA$I"!!ž={ČhŃ"‡} ÍQDż pBàńöò¶ÍDëšéЁ=ƒÄÄDæÍ›ÇČeËŽu ë°lÙ2ŠŠŠxęőŚ1 X­őcšæœ+ ĂEàŒ›gÙŁÈc&Œ }ˆ‹‹#!!„„æÏŸ_OFłÙLBBĄĄĄÄĆĆ5ùsm94 螊ăÒ„‹ ŐšȘ žž"):/êw:11±ŃĄ`ÇĄ"śŻp/’g%P\4IPŠKW€9ś5..ŽW–żBrr2K—.Ș‹@Đ0›Í$''}A”ĆŐąyÂśQP».„ĂYôÄĆKCmÀ`0°bć @š.AWAę.ŻXčąIŽśŽAĆ‘DrH Đz[ąm|\„â"ÆĆŽ#:*šäädfϙ͐ÁCÜ]%@ĐB9Ź©-ăbÇčÌcAĘÙ9W(.‚ŠĐmŚ*t Mi`Șê2ÿ‰ùí]@Ўšßaő;Ęb>)ŠH"ŐOźÚwóL‘+.ÎNXœW]RSS9|ä°P]‚NÈá#‡IMMœ ÚąâŒ*ފ˜U$pF”TŸšă"|]âÓÏ?ćČ!—1ÿ‰ùlĘșŐĘŐÍDU[>ęüÓ&ÆËÛ ì»ˆ0‚úŽM›‘s ÒR%mÈà!ÄÆÆ ŐE 脚jKlllłż»B‰t"rź QZą°œúÚ«\6ä2î˜pčGsÛĄV =žc€í;Ü·ÉŽGTcÖqöYó‘sMąčƋœêČ5ukŁăäÀęlMĘÊŃŒŁÍV[ŒœmkÏÈ^öƊè Ó—ĄžÚ Uu™7gžP]‚NÀŒ9󀊩-u>žŁyGIIIivíOJJŠŠ¶\h±Š|çnj@Á¶Șz±ÇD꟩`[Ó§OZf°híPi@ÏSY–‘$‰șș:jkk©ŹŹ€ąąs虊ò JJJžÿțû fîÜčÜy睎ž2śSQQÁ'Ÿ|ÂoŒAii)}ôÁÁÁ@@@ŸŸŸűúúb0Đëőț˜™Íf‚‚‚ „°°°Ikž‚ŽA’$úöíKQQeee.j”Z±Z­X,­$ I’°X,ÔÖÖrùć—ăä͐‡ ë‡Á_iïźH•2'ÒȘ9üv9ue2‡ÂÏŚœ^ƒôz=ȚȚȚètșFû”}\ÔȘOŰȘ_ƒ··7:oȚȚȚűűűđÈ#°~ęzžțyžțù¶=c[yì±Ç0ZƒRۂœêÒL&‰‰‰$$$’’ÂÜčs۱ց 9€€€PTTDbbb“Wu·:vB6 ,^Œ˜„K—ò}rß'—”W՝Œ%K–`ĐÛ\]”Šö+ *.pȚȖ$‰ššȘȘȘšŹȘ€ąŒ‚ÊÊJÊËË”ÿ8p@ûŹpÌê\ŰÿŒ1‚±cÇb2™ 00PS[üzűákôŐ,ćŠXÇpț©Ș‹@à!Žä{i”Z‘e‹Ć‚ĆbŃ—șș:,V ČUF–eêêêŰžq#™™™”ˆŒȚ”Qû~ûÿŁGæŸûîĂÇǝ^‡^§Ś”ƒÁ ©śöÈąŃYEjƒÓétèőz­@œ^ŃhD’$üęęčí¶Û=z4‹Y–Q}%žœŐ«Óé0 F|}}1š„§ÓéÔ¶æțű ™7o˖-cɒ%ítF ©,[¶Œąą"VŹXŃä‡ oooEŃÔWN‡ĆjA§Ó!Ë222^^^űűű0eÊŠNjûÍđ¶9ò¶fgŁöûČ"ŁÈŠærçûo/[›ńÖyŚS]šÚ·\PqQEłȘ%IąșКšê*++©ȘȘČ„ê*Ș«Ș©­­Őò Ă„ó`? šZÂFŁŁŃH=ŽäïŸŸæßą3:źÉe5w,] Ž-ő=SĆAuQę[4?—sȘ‹Ú8 )›țÚĐL$AçÇȚhqnȚ:oô:=zœŁââíí­ő)M1\šŹžxyy9È;Č,k–”jA©FŽjž€2òt —sȘšMuńóupÄ”jj,{ìU—Ć‹óÚkŻ”ÓY ‚ÆXŒx1‰‰‰Íș”ïTyß[ç^±u),Zçe"+xy{‰őíș0j$}ûĄAŐhŐyÛú^çà?ÛTƒE„QĆE5PÔ±Ìșș:Ș«m ‹úż¶¶Vó(W ûÏ <Őđ°7\쇋TăĆÏŚO>R ˜Šz;#I— 茣yG…ê"ž Um‰ŽŠæĐáCÍ6\TŐEęœŚ~ÿ­,’ESd\(BméÚ4tÏUUĆÛÛ[s7QUuvjSü *.j‡Š(Švp”Áj*Ì9ÉG’$͙W užœÎÉxȘqą*/öŽžöŠKKÆ© +Vź`üžńBu܄Ș¶ŹXÙtßgì;œȚ±+ńööÖzê „ŸKŚBœÇ:ŻóƇKUNwȚX±nŽ‚AĆE­Œœêb±XŽ™FÎóśeYv0\œOHàY8KyȘźÁ`@§ŚaĐæŰÛ/-qĐ”g@ôŽæćĐáCm^\ 4ĂGsِˈŽŠnŐböŸ.öꋶM¶ąÈŽȘ»êï èșŰßcÍéVw~b‡łŃҒ0MòqQ-!Uα/HoĐăcńŃ­łcŽÀł±o`ÚÌĄsƉł”§îo­ŃhȘËü'æłuëÖ¶8@Đæ?1°}[‹}ÿàćć…,˚ÚâmővpĐt?œg­jÊK+Œh‚âąbŻŒŰ[ÙÎ*‹œá"èhÆË9ç)ûÆć,ç”ÄŻ„!„ê"t,m„¶ššę‚œb”Zț‹‰ĘgĆĆŸïp~ʒá&.Pż‘Ș łĄ±LŃP=繅ΊZk"æ6†ú#+T 7n©©©mú° țÎ;0 ù·ˆ~ĄkăÜG8ś+-‰ÛR݌æ.àș‘ȘۅńÒčpn0Șäۖ Ź1Úă‡T Ô§œìg‘șŠž*f˜v?Tçíz>/vË-ĄÙ†‹=V« ž3źó{găȘ1Ù-Í 2Ś\ÚZșźéšĄY”_p5L$Œ—aÒÖÁ:ç:㏞š4di :ê4wûii^^^ÚœlĆeÈà!ÄÆÆ’ššÊÖÔ­Œ‹Śæeʝ­©[9šw”ŰŰŰv3ZìUwőœ+FĐőQWû‡_u¶‘êÀƚț€U>.ÎX"bnçĆYaqžß>.*BuڗöT[\ő ϐj>AśÁYa±ïKZ㘠ÍP\œpíŚȘš©­áíőołrćJŽ?ȚìJ<‡ÈÈHfϞÍôéÓ1S€Ő@„mmŒ <„űűx’““…ê"Ž1ȘÚßźF‹óLÓșș:Ö­[Ǜoź$?_ô ʕÈÈHæÌ™ĂôéÓńőőu˜ ĘRő„IŠ‹óTh5ېĆba͚5,ZŽHËÛü3x ©©©Ú뀀$fΜY/ŽK{/­ A.êӞKlž ‘aß/,\žPË{Ăí#ÛŹ\Açbś¶oŽŚ/Ÿű"łfÍÒb…”46Xł"çȘF‹-·ČȒțęûJbb"=ôX{Š“c6›yśĘwIHH ššˆ‚‚zôèĄ- ÆuiaŁ'žx‚äädVŹXÁÜčsÛôŰAwä7Ț`ȚŒyÄÇÇ·ùòȘ›€M]])șȘȘŠˆˆ‚{13a㧎Ćßäߊe :•æJŸx/Ő‰oQZ\Æ©S§đó󫉜9}ŠîÙgŸ}¶±LȘš6̚šjkkYż~=YYYŒôÒK̝;ŁŃŰÚsžŁŃÈ”Ś^‹żż?_|ń!!! 6ŹAïđ¶äÆo$))‰oŸù†?ÿùÏí:›I èêH’ÄwÜAuu5Û¶mkÓßgçZûExŚŻ_Off&'Ídòœ»0 €"R7MفĄŚÆŚß—Ę[ż!$$„áW ŻŚ—4ÇpiŽç±śiQ —șș:jjj۶m=ôP“ tÔ{șvíZíI]ÖĄœÂx›L&)**"%%„M-t7RRR(**"11±Í•đ†ú…ÚșZ­_ˆ2«lI$ŹČ…Ű)cŽvi‘,Ú°ąóìłŠpÁĄ"{'\Ui©©©ĄșșšÊÊJf͚Ʀ_ĆbićŚ@à‰L˜0mÛ¶ńÓO?ŃŁG|ę|ń5új‹.ȘkW”%’$Ń·o_ …Ż‹@ĐÚó{äÜ/ÔÖÖj©șșšÇ{ŒĘ»wł«æó6+SĐ5űËKű&í;ŽæĆŚè‹ŃhÄŚŚŚÁČ)}J“fiΞV‹CCÁ„ș”””ÚêĐVœŐaA[ç ™7o˖-cɒ%mz| ;°lÙ2ŠŠŠX±bE»ÿÎNčuuuę‚ń@+pÆŠ“ÔŐŐĄŚÙú‹Ć‚··włü .Îsń­«ĂP‘˜Ÿß”Qïkmm-ƒ ƒ6¶­6¶¶V]âââHHH !!ùóç ‡o ˜Íf %..ź]ʰ.¶X,HIëTĂEVă­Àćœáb‘,HzI›ôa۶)Í*.Î Tϔ$I,ĘI’Ž{ożx{aŻș,^ŒžÍgC]™Ć‹˜˜Ű.j‹ó­,ËÈVYëÔß«lmóȝ”ڐ$ M”s^ేá& 9ž“$ É"9$èșš†Șó*àíyßăââxeù+$''łtéRĄșMÀl6“œœLtTt»©-*j‡c”Z±X-Zž íéY  êqNq±8¶{ż)4hž8ŻI$+2VÙz~LSČ—n‚:›È*ŸodíÁ``ĆÊŒ7^š.AQՖ+ÛÏ·Ćí!FVê=9‹Ą"3Ϋ…·ô!ű‚Š‹ęÁÙÖ8í­#Wù]íž[ëËzíá «2.vŃQŃ$''3{Îìv]ŃV èì>rXS[ÚkÙ Wk9Ż]§"†ŠΚ>.öíGVäf/Möq±ĘȚ>ÏÂj”j šśż=QU—ùOÌgëÖ­í^ž@ĐY™ÿÄ|Àöéh\u°}bÈškâ`°ÊJ=„„#PU—ÔÔT9,TÀ‡&55”]ŐWŰ?ĐÔß'|\Žžj)ŠÜüàf­}ĄśA{ńéçŸrِ˄ê"4€Ș¶|úù§nźÉy„‹À™¶Čš„ž4Tš0bș}ż‡ BllŹP]šjKllŹ[Ÿöë˜Ù#|\ő±őȚ^­[çźÙCE‚ŒÔW_{•ˆ\Æî śhź[ê x"wLž°}G:”reŒÈÂÇEà„b7XԚEz[lžŰ7PĄžÚ{ŐekêÖÇ<•­©[9šwÔmj˅CE‚†°·ŒŒ›y](.‚NƒȘș̛3Oš.0oÎ<À=j‹3^^^OŃVáœ+pÂ->. !—ź‰§ĘŚ!ƒ‡OrrČP]ĘUm‰ś(”E}šCE‚Æh©ŻKł —¶^LOĐùpwXșt)ÉÉÉ̛3C‡uHtPÀӐ$IS[–.]êæÚžöqÎčgT//ŻVő%mąžˆ8.‚ŽÂd2iȘKJJ sçÎuw•‚'%%ES[dő”9”•Śh:ăŸÚ«x{{»ßÇ„=),,$;;›9sæ`2™1bÿœŃ!Ï·ß~KRR#GŽ $$„É“'$I€mHÍ3pà@‡<źÈËËs*1b“'OŠ€€€€€$FŰ~TF\5‚ôŽtbcc‰›GzZ:łfÍ`Üžq˜‚LÚë°°0ÊËËÉÈÈ ŒŒ€… 2räHm•Ś”Ő)DDD°iÓ&‡ú\wĘul۰ŰŰXVŻ^ÍĘwßĘ&Śčłb0X±r TAŚEmÛ+VźđH”ĆÛËÖyyŸ,&ËÖ.“Œt1ì~J?Šm;’•Ïecû3$&œ_QUV,[9”vŒÀ.Š B–­ügI&IŁŚńSú1jÌ”Źžș‰çź^CIaò9æC;Ž’4zGSURÍ꩛Xvă[n?ï¶Nn‹ă⌅­¶_ Ą·ß~€?țńÈČ̜9s˜1ciiiÄÄÄ8äęúëŻ8p `3Tîœś^öïßÏ5Ś\Łć9xđ }úôàŁ>bƌìÙłGËŁ( Č,kŠƒ,ËìĘ»—üü|6nÜHLL ’EbÉâ%€€€––FPPĆ%ĆÚ~€ÜÜ\6mڄ,Ë<úèŁlĘș•üü|}ôQrrrÊÛűïLž<™Ő«Wű\"ăǍgćʕšòpß}śńôÓŐ/ŸHYYm|ćÏŁț y*ăbÇiȘËì9ł=*üč@ĐZ9Ź©-žŽÌEcOÌ]m:ô±‘€.ßM•čóÙJÊK*žâśQ˜zùÿĘIçđŽ| ŚÎßæĂ„űśï» őăÛ ÙŸü[Ž~ő Węa vüÿśÍŁő±kÿÇ9ü+ț òś$|DŸŽ?Ùvą!çÜæȘ/-V\:ÊÏaMÊz†ôäƒ>`íÚ”ìÙł€7ß|Ó!_dd€fŽÜ|Ë͚bĄæQ€;ïș€ôôô ÖAĘŻÓ 7hȚę111\sÍ5qó-7łwï^ƎëPncìĘ»—â’b Ű 7pûí·“­©2'NŹśúôéÓM.««ąȘ.óŸ˜ïæšm‹ÚŠŐ6îÉŰû+ÈX»TpË„äï=Eî—„űsQŽ Ÿ@Gôdßæ#”œ6SQRÉ ˜pdŹÏ.ŽœÎÁmč|łádüLFgäŁé ֗À>ŸZYƒbúđóηŸw[&{Zó0ìŃèÒÓÓ).)`Á‚û2220›Íą( ęûśwš‡^§§gHOrrrŽíźò€mšÉ~»óëożę–ž!=Ńëô.ÏU’$&L˜@vv6#FŒàöÛo'::šM›69űÎ4ô???@;•«ŻŸ° —ÙŚÇŐ1Úăt?8Żș€ŠŠrűÈaĄșș‡&55ŐăÔWtőÿ}.ï À‰ęg(Ű{†·„iç8(&ŒÿÉePLŚőAVdŠ Êű-Ż”ÊâjíX=#LTWkŸś 6:\/Ÿ[ßôëŃÒ.uŐ>„”‡GûžŹZ” °uÜżęö›–>űà‡ę™™™š? @yy9Ć%ÌwțË~`ÿ‡ă«JĆ p©°ŽÇ=đńńÁÏÏŻ-šH‡0dđbcc5ŐE èÌšjKllŹG+ˆÎ3D4ç\è(Û: ŠéljïmŒaŚ]ŹmïsE0ż/aà˜óƆO€Ž°a}H_Ÿ—[r©.ŻáłÄŻűà‰4ŠŽ—i†KEI%›ægQ]^ĂÙÜbŸXúÆ\âösnË€tt—ŽF94éžI.śß3ùòóóùnïw€Í„ššˆèšhźżțzì?@RR’ƒO‹sžcǎ‘””„)đËL&ž~úi2Ò3žțúë™9s&=Cz’””„Á``᱅€mfĐ%—\Â̙3‰čŐæ€{ÿęśđ—żü€èšhțùÏÖ+ăÍUo2üȘáÜÿę\rÉ%,\ž˜[cˆoÎekSêêêšźźn<ŁńêkŻpDŽ;Ü\ ušmXmӞˆłÁâšž(].EĘl 2wQxœüŽí^:/ú ë À€Q—:|f\”ô dăű€œÜ Žpë­·:äïŐ«cƌč`žœÜzśêÉdҎï\țȚ}{)-)­śYI’Űčs'C‡„oߟőÎA}ß»WoüüüÈ?žOdD€ĂôFłÙÌöíÛčí¶Û"ÁșȘ$I.ŃVšȘÒçŸNPpAŠ đśśÇh4b4Ńétètș6/»5Œ7ŽÔÔTŸŰú…ÇûźŰšș•ńăÆËÖ­[Ę] ”_°X,ZßPSSCUUŐŐŐÔÔÔÏ7ß|Ò܇Ę]Ę6Ç*ɔžšÀ§‡žÀ>=öŐVHTœ­&8,Ą~§\[!‘›y’c.Ćpțśș(ÏŹŻ(ÏLé/DßrI»Ÿ‹;Ű0-“œÿšg9% IDATM=đőőĆÏÏŁŃˆÁ`@ŻŚŁŚëUb<6äߟ}/žßd2č ń>pÀÀÆòŰokèűŚ\}Mœm`‹'âlÌ8Ÿƒó{Wu0™LÜsÏ=.·;ŚÇ`04zźĘ‘W_{•ˆ\ÆŒ9óÈ=šëîêÍfȚœy€g«-á<‹€+àe€(۔eçó3xàm•ŠúçnđæČ;Ăê}Öțx!Qț„DùwÉk¶+Č:ާx=7„žRŚÎĆ xì±ÇÜ]&3dđâăăINNfkêVĄș:[S·r4ï(ńńńíÛâ gç\ =đXĆ„9ŒòÊ+æÙ”kP›źÇ»ïŸËȚœ{yęőŚ;Í5\șt)ÉÉÉ̛3C‡ydŽQÀI’4”eéÒ„nźMÓq˜TiÇÀ€‚ΏłƒnsT˜¶‰ă"»7ȚGïȚœ­GtttŁyꉉ‰!##ƒ[oœ•çž{ŽÙłg»»Jb2™4Ő%%%…čsçș»JAŁ€€€hjKg\íÜȚAWšÛgœăžtčYEÏáŻę+˗/'88˜%K–đÇ?țŃ!Š§ą>±&$$8Äűé(ÚkńK‘Ú?čI’HHH:ŸÚâ wGiÉó’ÛÖ*R±oŹîúą ڝN‡^ok"#ÿg$[·neÁ‚Züš·ß~›ńăÇ»č– c2™HLL$!!ĄĘUő;àŒn—űntNìßì‡@Ú3cJJ EEE$&&vZ”ĆțZ)Bq8aż:tkè>.™Ó§OóŐW_QVVưaĂŽ0ÿž€:íQ% €·ß~›ÿûżÿcá…Üyç<űàƒŹ_żȚc}H-ZDrr2 ÄĆĆ”i=íő”ę»jÄă„óàÊ`‘eYQ·””ŁȘ-ĄĄĄ,ZŽšMĘžș5Td•d~Üx‚Òă•DÜt1‘7_Ü!ćzߏŽ-Ö;rNÓf—Z%™ČUœűÚÙ}È]—b èH3À͊‹=â‡čeìÛ·;ïŽ-ôŰ3€'Ć%ĆDDD°cǏ0șŻ>ú('NäÁä_ÿú©©©ìúr—G΀0 $&&2oȚ<–-[ƒ%KÚ侊r~q5Y­Ví”ę>AçÂȚOC§Ó9-ŠąhŻÛÒxQm]±b…G|śÛÛĐ@ûsæ§2Òÿv€ț7ő!üŠĐ+Ś8”żhú”Ț2w/ÇvÆ?ۏÊÒjÒÿv€˜g†1ìÁ°öŹŠ†bgžžúț4ő;%7!Iÿéa"""ۚș?_?yäČČČŰ”kcƌqw5\­âÙ·o_vìŰÁK/œÄsÏ=ÇeC.#11‘E‹yÜo\\ $$$0țüVËđȘaą'Ș2%Ë25”5Źk=oŸù&ǏoŁ3žƒˆÈHæÌžÍôéÓ”`‹ȚȚȚèt:EьšÖb6›5”Ć~…űΆjàiÎč4«è̏„ÜčjD‡–ëI4ćœțü4ÇvfÌÿ»‚+ăÌśe|2'›ŻWäpĆę—v@-ÏŁ¶‘–uĆE’$VŹXAZZLœ8‘?ęéO 0@˓››Ë;ïŒCzz:Ï?ÿ<7Țx#ƒÂÂBžzê)țțśżăïïϜ9s !$$„çž{ÎáóÏ>û,Ï>û, Àl6óŃG±fÍnœőVțúŚżjâ+ŻŒÂˆ#=z4댯'88˜»ïŸ[;V~~>Ć%Ć<·ô9Xčr%C‡eíÚ”Œ=șc.\+0 ,YȄ|€›nŒ‰„„>ùä>țűc.čÄs"?Ú«.‹/æ”Ś^kń±ì«ŐȘ-‹…5kÖ8ÈüÿsËímQ}›űzç6,XÀ‚ HJJbæÌ™F Đ&ÆËâƋHLLô8Łż%œ={–Ț—…tˆË'łśsöG3[fí#&ń2}t €ßÍêOÎçg8Ą79ŸŸáđ'…œęь©ŸęG]Äïfőà»UÇ65ŒÏĄșT⊧b ó#sń!ȘK%ʎW1üĄpź| ŸV~]……ïß;Áá-…DŽșˆëæFá §äX%»^ÊáșÙęé=,H+Łđ@±żB[ęyŚ‹?ădĐêqæû2~Űđ §”1üĄpßÙGËûÉìę ŸNű=ùaĂ/ű4CœÖ•gkÉH8„_°±Ë.wžVÇwț Àe“ûą(2œź dű”0ŸzăgŠóÊ éïߖ·Æ%Š' yïżÿ>/żü2Ó§Ogì۱Ź[·ŽôôtŸüòKÀ¶ăæÍ›‰ˆˆÀl63uêTBBB۶m•••deeń /••Exx8QQQŹ[·ÎÁyçwÈÊÊ"""‚ÜÜ\Íž>|8ëÖ­cĘșuŹX±‚»ïŸ›œ{ś’——Çßÿțw xęőŚêĄKeߟ}Lž<čźXÛ1dđ ™6mïżÿ>—^z)+VŹđš)ÈqqqŒČü’““Yști‹TWFKmm-’EąșȘšE‹ÊŁóŸeÜĘSńod ,gSYnfëȚ㟯>Ë… yđÁéŃŁ‡ö æćć…,Ë­62›Í$''ĘčŐïóÓ[KKK)**AŠę —È[B);^…10È[BŃőđąđ@)eÇ«9¶ă7ÌżT36é2öŹÊăë7rˆŒ©ŚÍéOțÎßűꍟéwCœ†™(ùä8x[·nĆìÙł»víÎńțûïcțüùÉd۰aàĆ_ÄÖ­[±{śnŒ3Ï=śœ0„đțûïăá‡ÆáÇqË-·8”W&“!%%2™ ÇĄ±±Ï=ś`Ò€IAÿ=ƧîÀ0 6mڄŐ;””­V‹ŹŹ,˜ÍfT1ŸaećeșzžȚ Žg±X,èìì„„Ă‚uëÖ*X9yˆŠQƒă@-Œ-*F9yxš``ęúővG•eÁČŹ0<èËĐ©‹ećáÛâìŒńŒ­ßmô}A=" êQ}ßE`b$àyàìÉf€M»s?ę.Ÿ€ș-?!qxŠ”_‰Ńś]„ +ìÁŹż|c>, ­©Útn-ŸwŸdv:{ČsvĂ­Ć—cLNČĂ>_œupçKŚâź·źÁ/]‹Äáq8ŒńGHd<Òî†ïȘ~ÏÛ`i¶àìIûÇ>ę€ĘĄILLÄčsç°aĂìÛ·)))8~üž0ÇIrrȰ}o|űᇾțúëqâÄ ìȚœqqq~úUO–& Đh40HIIA”14‰ËÒd!5%ƒ”u”ïïÓÂZ»™Ûčs'àöéłÁń Avût{'æŐW_E‡„‚ÓâËÜ/”u”‚ÚźËR87@żęö›°ą|ÀV†ĘÄŻŁTH»ë᜙Uc1łj,šîÀŚ•§đæd»ÏóœèÀ«bÁń<.Ÿ€‹źLÄEW&B"—€ăyüáŻ)ûÔmkDâđ8œ;цŻ+Oá܉6šGšpüł_ÀńŒææf|űá‡HNNÆ”ŚÚ=ńăǏC­V;ï̙3˜0aZ[[ Ûń]±bĆ ,^Œ&LÀȚœ{br”Zêêj”••Ád2!;+łgÏÊ$pÎŐeIÁö7P$ŠĆÊZa±XĐȚȚ.ôșŁbŐèz”R‹‹ŠUăú›3qòäIX:ì*k”+.$“ÌH$u2œiinAqq1nżęvŽ””xŰbäJ‰_č"ŠëœŁ;~Ɔ ÿÆ?ïù?}eÆä§GŸ/#/:†c™•ń2(ăeNçČïci±ÿÔ$À#ùÆÁhę„Œ±ÇŒœ>ۄ“ŸAòƒ1tœmMhę„'?;ƒQSƒ‡ ?ÿÏîŰ(„çSPą­©C8Ÿz„ČÛwokêÀćw Et‚ »—ŐÁÊČ=țV­żŽcÓäęűő›fL~z4&ț}”Ăï˜kՅ·"ˆÇ1.źNìàܖ–ŒśȚ{žńƱað,‹ÊÊJaÂÄ žőÖ[ùżż`℉Â~~ű!ââŽ%ț.3fÌÀßțö7ìÚ” ïżÿ>æÍ›'|>aÂ455 CF€}N–ššÄÄÄž<ž3őőőxă7`0e&ŰżeOH%žûž‹-Œ30}útlȚŒŐŐŐAO›&Ș‹ŃhDm]­Çe±Ùlà8V›,Û„žÇĆš—â', är9†MnT2üë.”u”0a­¶H„R°V댯ÇČeËÇGss3ššššy\È-GÎçüö=ʘőŃï e€8śCûùmyp<çrWï‘}ä1R\xEâGȘ0á©źÎæŻÿkÁoß¶B%¶ùnë/0ŸèÀ•ł‡B=R űòSv‡cÆp<‡”Ź$|”ù$~;҂!Wu­wâÓłžđŠÈc€B™œËxá ˜đT*v˜°«đż~ Ś,p%ŽgĆQ(âäűcćU`be»FâòŽ~„7ÎKD(.±±±x플0oȚ<°, †aowHN?ŰŰX$''ă…ç_À'{>ÁO?ę„+V ??çšÎőzÜ1cÆ ??gϞĆ̙3…Ïțô§?áđáĂ(--ĆO?ę„Oö|‚qăÆá”Ś^s{!Bœ^yóæč5œź 6 ûöíƒ^݇ÉdBFzVź\Tő„j{ÏTń°€ÍfƒÍj‹Ć›í|oŒ§‰F qM,Ë ÚȚÌÙCê©‹áHEEF§ÆČeː˜˜ˆąą"TUU Ïq1r‘zzmifŃÖԁž‹Uh3uâlC+œz đę–_aíŽ č·ă’E#ùóï ż9ßmû ‡^>‰–Ÿ:pòł3ű`Η8±ç äŃđ‡+f_ˆŸę†Š“-žèșXđ‡ă“đżÊ“H‹šÁrđ‡ÁWD#:A…?} ż|e†„™Ć·ÿű ?ӄá7Çw-Xé\ž·«B‡K5‰1> ÿ}éœmhíö;mhƉÏ~Cö«éBùmđàé ŻłŠ§vöOa|Ą€€3fÌpjINNƜ9sÀó—ÜԕY?R †ßûLHœ#ÉáŰ·<•‚/ÊOáĂŸȚ»rÖƝsĂw뭌ŸIÁ»w¶`gÁś˜ńÏ+ •w©ûWÛC&Èo æîśźAüHU·śęűNq5?˜»Hűî:Òł$æöövŽŽŽ „„fłfłûÛßpűđa;vÌëű–eńőŚ_ăäɓ7nœ°jޘ––ìȚœ·Țz« Œ°,‹'N`ĈĘ"ûÉg^xĄK%…eY|öÙgˆâ_àçŸíóž*)ÙÆ™ŰŰŰś $>ű öìكŐ;Ÿ€žž8ÄÆÆ"&&J„R˜”ˉœeY!m@ĐÒŠkëj‘‘žÔ”T­?Úçöâô玎޶¶ą„„çΝƒÙlÆČeËđć—_ÂűíÀ™”s ń·Ülüwo víÚ”Z ”ZŰŰXDGGCĄP€aÈćr·dïQ©ŁPßP#”GÂÊq©­«ĆìœÙ8xđ `á…xüńÇĄP(ìś…„V֊ `ߟ}˜đú€”«ő»zsăò5ĄéXNȚŒĄŚÇ!îbûMó) ą3`Û8°m6$ˆoWÇi:ցèÁ ±]Ï<Ëăűî& J‹rŰ_Œ-Žccy4ŸČ îb%dLśúÒú ‹ŠŁížèș8‡ÏÓS[aÁ¶ÙșżéX‡‹_ÏNOeń7->Š“ûÎàÛoż…R„„J©‚R©tž‡Ü™)b& č\ŽkźčŚ\s ŚćЉ‰ŠÙ'ŸËćr€€€žÜ§·ÏÈç&Lèöù\Đă>€äžź…ߎ?Ê@ÒŠgϙÙ9łĄŐj±uëVŒóÎ;]XNŹșT«{3p^“ˆă9p<' ˆ4CàČQúrYŻč§©ĐŐÆjÔ7ԇ•ÚÒŰۈùóç ™›™™™xć•W0dÈX,X,öÀQ©Äq>›@ĆOD ‘9œÏù5AŹ€:9éü+^xä12DÁ1æĂŐqÈöâś$r`dfŒËsșÚG"'ï‘L›îß'jHl·Ï]ÛUŁ†ŰżKOû»ÆuYú _Ô ‚& ŁôȚæöI›ŸśȚ{…ŽéM›74P±€ŽéĐæiûT]Qäì&žŒŽŰP7J ±q6‡ŽxçE5ûR”yZöșê˜ÍfÁ`0°O5±”j+.żürA'žLÚ w„Ÿđ‹ăèÈdJd@ÒŠŚź] ­V‹ìŹläää`Ęșu™Œ+=-ùùù0 }Ș.șĆ.‰S$Đ—È„\bž;Ÿ…"rdĆÿśQ[òóóCZmaYĐjíNVjJ*ÊÊː„Ér©2ő”!ˆ)ÿ)áčO€i7…Î""«ˆȚ,ZާNÂ۱c±yóf :Ô« âŒaŐȘUì=aw3ÄœlçàÌ`gżPësžöœă€sî ±,+š-€Î…"•••:t(ŽZ-’’’PVV†#”GÜRBI#DțFÖ ”Đ68Íăâ-ț‰qĄĘLŠŽéââbètș€­6­V«Ő„ąąÂŁ@aW œ"›îŽȘ{ŒąąBP[Ëć.ŐÆjhóŽšo°gXúăȚŁCEgÈĘâëìûTqĄ„ $múHí$%%A§ÓaüűńhllìŚó’°N§ój~ÇȚ7”H4gÿē”ŒX–…N§sškĄBm]-ČČȐ•-8VçΝĂòćËœrZ‡ŠxjÔ,$Aäi73 Öu ôjÓj”zœ:ÎcŐƙ@FæSƒŠŠ ˜L&èőúQ[Ìfł%„%^ÇȚžZ4Æ>Rș!z<l‘ĆP\\‘XUœÚtaaĄ òű2«/ńÔúÁŒŹDmIJJBaaĄŚőÊ_˜Íf >>^XràHíTWWû%`Ű1͕§FÍÁxđ|oG"jJ䚎i†a ŚëĄŐjQ\\Œć˗{uÚÇ€ˆ)..†ÉdBYYY@2ćz‚d ét:˜L&‡L!_Ï îœKŠ; Ű”Š(!XŠ[ V›ÎÍÍTo•ާ‰æMŚÌl6 jKnnźWőɈ3…x”)ä)s>]&Ł’æȘȚH=sEŒv\hVä[šŃßiÓDu€ąą"ŻŽáîœK-ŒÌHÒëőAQ[ȘŐ•: śßżcsúôi,ZŽÈŻć‘H»Ç·~MjÔșì|9Đy\hŹ %XôśjÓčččHMI…Á`đJu ¶2@­Lxâș‰Ùl†Á`@jJjÀŐg č‹ó4îd†ijԈy|#ő9—Ò#Ąšșę»Ú4Ă0(+/CvV6ŠŠŠPZZêŃț.ŠvĄDžȚ Dm)+\l‹ż3…ŒÁY‰§PúăBé“PUŰHÚtNN8€‹/ŸkŚźőùžYš,Auńt(*ŰCԂ?TT[W+š-X{«ż3…<„kš Ž5'łßLŸ.ČèÇ%Űò”ț’őșUç„żÒŠËÊËK –xŽO-bÍ]H!ušż`YkŚźEJJŠà(íšȚŁőGî°H„źÖž öŁzօ/m ]šű;mšš.FŁ”””žìČËÜÚÏÉߣD n^ŚÚșZAőèO”„ČČ‹/†ÉdÖÊÍÍ hp_ *ątÇ?uÂcÇĆeô8­ ó5—H$§ŻŻ6]”œ éXČd ¶mÛæÖ>ÔqŰ”„j{Użż?Öê/h»@é ń‘'mJŸ[șJYr~Ż„„ĆíRƒ––ìĘ»C‡à{úZ ńWÚtzZ:4 jjjPWWçÖ>ÁŽĆ ÖOæÆ”Ż««ƒŃh„FŁńûPM°2…úB"‘8ÎĘ"ÂÚFVŠF‡”ĂOŸ·aĈuƛN°Û{H€‡|}‰D‚±cǶlق`Ï9BÍż¶eËÀŽiÓșœ©]iqž!3ńWÚtIi ûïàO- |ߌțÎ;ïtš3țÀl6#++ é‚St€öJKKƒČî‘;śü€I“'jÚŻAUUâăăĄV«ĄV«ĄP(pÓM7á‡~ÀÙłg‘àń±Ă)S°ß6› V«6› ,ËÂÒi•” m€űù/šŽR‰0ÜnÏ Š{ëÎńœ}>0žw~:qrĘćrčœę`ä`äŒĐ9–ÉdËćnՍ^©T Žăș†‰dRá$J„6› 6Î&Ša°,K—0B< (“Ë —ÉĄT*çE©TBĄP@ĄPCF2™ÌA… 7ŒI›V«ŐÈËËCyy96oȚŒ»ïŸÛćváTćW=p…Ëś/ž8ï^‚›ț˜ç—óüŚž ï”æĂđqű8uîČqăFüđĂXŽhâââ<Ú·¶źK –Sôçää ŒŒ<(A·Ț ndR8)'Žœ™‘˜ IDATÍȚX9ôŸ9€“Ú†zÊDą„?b§E쌒!ä@boKd2™°»ô9T$î‘ËevOIĄP€ă8Á“"°Z­Š @‡ŒBÇćŒÇ«P(ìŽK” *•ĘÄ^±xŸpfŃąE˜1cŠOŸŽÍ›7Łșș{?ÛÛŁÜż\·ćććXęÜjLŸ>Ęć6á6T42},îâMáő™ŸŽĄzœï”æăŠÿˆűÁŸ­ętĆę„Ûo#ÆUŃY–ĆłÏ< X±b…ÛÇ …5…|EÜ.ű7©L 9ooRʰ —žă!‘Jèúv ™u]<4H†eR{#“;v~=UîĘr\d2™ ùp…B!Œ&—aÇ€ƒLD =ˆă!v\ÄĂEÄy!ȘK8őI›...†N§CFzFRœ:NÂÂBăí·ßÒ_Ƅ›Ÿ7C†w á žUlJŽ7â{?ÀÓíȘ‹•ea:Ę€ÆŁ‡0hè„HÎŚíXV–ĆŃC»qQÊUH9<ä7ÿ6?ŸŠJšyˆ‰ˆqu]ÿńàÌÙ3X¶l™[*‰ÙlFQQ  5%›ßڌqășÿ–Ą y^đ\»ŸŸ_†[fh1}QIXțfV«kÖŹÁ ÄAűżÿûż^·uÎr'ź* N ÈćŽM Fê­-ˆ”çĆčÆ2‰LxÏ„*'“ țé0{Ș໕Uä<œ R©„8âž„Eìž8!Jhá,ć‘kÊ0 dr™8Eâ[ÄiŃá>L䊞Ҋóòșb=†ÁŁ=Še˖aęúőžśȚ{ŽnUœ­ù ~9Ù€ûï-/áÓśËŸ„KŻș<Œčâ.Àòœ€:iöm)Ç{/æăèĄĘH»NƒęÛ_‘‰3ÿŠíŻ>»Ț–ò„xèïۅaž¶”w9-ÓòJÂîś"Œțúë8{ö,ž~úé^ƒh«Ő˜3;Ź2…ÜAÜ©ÿO‚+9)gÏ9ȘîD„ĄD.âk,L«"ëšFƕÓâ)n ‘FŠTJń|rF…U!8.źs(Ą‹ž‚Dž(+ÄY!“ÏĂmOp•6œeËTVV"** €=ˆòčçžĂ+ŻŒ‚©S§:ìnêÁńÚxf^ś Ęč«¶ vĐ0p<đûÛÀƗę±ƒ†Ą­ŐŒăßț`:]ŽÖl@rÚXL]hŸĂäȚÇ7 mÜŽ7Ÿqű=>,_‚œ_†›gh1uax*-ĐÖֆòòr$&&bΜ9.·Ùż?rîÏ2…òóó±zőê°wXœ·‰Ç j‹Ô&ÚÚ LœłVĆ_q’‡§mŠÛŠ‹s[p\89lò.•EìžPÂÁy9<%ź\Ξq$Ć·ô†ójӗ]vȚxă Lœ8 Ă`ńâĆXčr%Ö­[‡œœażpkŒ“ÓÆâîÇș‚s?Żz ÿú  /æßˆ§¶”C&g0æÖÙ8Žk>Ú GíÄĆ'°ŚöV3ŽŚ€æĂwżjÂ}Â6äęœ_űőäwaś;‰gŻœö`éÒ„Ę‘pÏòÒgE܉•šš1đpV\Äm‡óßȚt„Ę^ÚÙłW̞Æ2iE }œg-tVÔÂyÆ\_!iÓeeeXŒx1țűÇ?âž{îÁêŐ«1sæLŹ[·ïœśf̘!ìnU>*n_Òœ;ć‘đö~P†S߁áéăPùÔ}š=PƒY…›0cÉk°Ž7ă…?_đ€LnWĄZÍ&‡ïni5Ă|æ4]”"€äÌr~Źû5ő8üÉ?pőyç&œhmmĆ»ïŸ‹áÇăŸûșÊOŠèë­·„gА7ˆÛÒôäžh»Ù8·ÎíŠ8>ÒÛ6ĆmDž@\II3ˆšóžȘ`üZÁ"E‹aÚŽižëź»đî»ïbŚÎ]Ű\č=öòóóńöÛo ۆc}w.óuSbïeűț` ⒆Łö@ ~wÛęžêû4?ű»ł"•Ëń»ÛîGĘçۑ9ÿYÈßšÁșą;0dX –Ÿ^'ÄžŒú}&F^= ‡vmÄÖò\öû)PĆx6śI°ÙŒy3Yg,Ëbùòćxùć—„oА/ˆŸâv8.@xȚßq„ŒŽ­Țà‘ă">I‘șښǔ™áȘ‰9űbŚ[xvÎpŒ™4 Ÿ}`šČđEp|— Ćń€TÎ G·% źÀÛO߇9+·ê«úDTü`À–-[pÉ%—`ÜžqŰžq#J֔àÌÙ34h6n܈)SŠč€ÁCŻŒò ’““ŰS^üțPX-Ș66—€ÿÁe™ÓÆfd ƒĘl„‡?źÄƗęźÚ†ö–ł8Œk»’òŚ'đÙ?ŸĆá+qí­śăêI9žôêIà$MEÚŰLáŻÂŻ'żĂàá—äûúBÛč߄ż§L™‚Ûn» MMM”8«WŻÆ#<•JĆâv N ĆÿmJŻkQ(”ź”YȚ]mmm8{ö,}ôQì۱Ăa[ę66H„€ô'›uwà»5P©Tèèè̝;O=őâââ T*Š/§P(ę‡OŠ …2Pa+WźÄ„ đÔSOĄčč@g2l:::™™ Ę † qéÍJ8@ Ə„[Œ Ć=š.MĄ„ÔqĄPŒ€d“8Ń.ČQ©Tš©©AMM0TDc[(”Àyó¶S(ęÌŃŁGqÓM7aǎBp.LžF-ȌDwtt 77 Xż~=źșò*TTT€eil…(šăBĄž ËČxæ™gpË-·àìÙłX°`Đ`)•J$_1>è ,”ț±(ő`Ąlߟ»víÂʕ+>ú(FŒ!̖KĄPúêžP(nĐŰۈ[oœĆĆĆ”8;ȘwàŠ+ź@cc#ŠNŠŽŽ4ÿf_PËh:UK[sPÏ©Ž™íéĐÓŠMÏ?țˆęûścΜ9űߌÿĂ#<‚3gÎàŽ;îÀšÔQŰżKKĄD6ÔqĄPú`íÚ”HNNÆÁƒqÏ=śàЗ‡0bű<śÜs€™3g ÛSšĐ^‰oölr{ûú/jPÿEÏçĘùúRÏ`PĄœ2èÊHŹKU\\ –eÁ0 ž}öYüú믞ÿțûQßPnžYYYš­« h=„P ÔqĄPzÀl6#++ ‹/Æ AƒđÁàŐW_Ă0xûí·qòäIÜuŚ]ˆŽŽö făzûŸ žäÊ[ĘȚț`U)V•ú|ȚÆșÿàș©Zz-żżC‹‰źœ9U‡=ț‚†C5Â6)ŚfbFĄ}Ęą–3ŰûÖűæÓJĄÜžW‡+o{2Yp&|_ÖèèhäććĄŒŒ7nD^^^·íǍ‡ŁőGQmŹÆìœÙ0 ŰŒy3ôz=rsséÄuŠPƅB9Om]-†ŠÍ›7cì۱8uê-Zä° ËČXęÜj$&&bîÜčʎÌá Àî8qçՏÆï á@țüÒqÌ]ó5àßoëÀńÀÒ·Y€\“‰”k2±ôm ĂÒ`65bçkù°ŽžĂʧ>Ăï§hŃpš>;M8æÏőńáłÓpmvŠ?±Kß¶;s·=dÀÒ·YáWÜ< ‹Ö›PđVRźÉÄÁmeèh3ƒăŸ†ŠŸŽâźeÛ0wÍŚ44 ‡jđ×öx›œ›íNËï§hqŚČmPÆÄcçkùűțßÿ Țoëä>ôĐCHLLÄłÏ<Û«’’„ÉÂéÓ§QVf_xR«ŐbèĐĄš6V{SE) úÁqáyžZ˜Ú@…eYŹ\čé0™LĐëőŰ·o† ÖmÛ^xgΞÁâƋ!—w,ù šž „[ŒŠ˜AÐ0, cČŽh~0ë™/pášëqóƒk0cÙ6œ9ĘK»=NŁŐl„y/âČïCÌ aʎĂDĆⶇ ˜đP˜(5~țáš~> h9{–v3ΜnÀ śè1bL&†„!çùŻqÛCđŹ6ßü«Łož…›\ƒc2ń@I†‹múoKËćXșt)Μ=ƒçŸȚĆ]0 ƒE‹ĄĄĄùùù0™LÈÎÊpHÁ~ŸQ‹œ6ƧĄ"R0Žă\ŸO /Ä+xú{òP„±±Ó§Oǁ””„œŸíEzZșËmÍÍf!zæÌ™hkkë¶M°«>Ï;–!&q˜đZ›$lăŒÔ~șđÚÂänÇęá‹íÂß#źÎty ž•_q+m3àűĄmh'çž6[‹çŹAâE)h:ę⇩ZÏ6âÂßA}Á„űÓÊûț#yAO—uΜ9xć•W°víZ<ùä“HHHpû˜$©ÚX mž›7ox Ă&€ŚU»Àqœđž;YÚ^„/=” ä}ÒnH„Ráo_Û·çÊhłÙÀqŹV+:,xsę›(//ÇńăÇ=.%t9r$.\ˆùóçC©TB&“A*•B&“çyÁ© WH–‡Éd‚FŁÁ;ïŒăVW§ÓVŻ^ †aBȚqżvț›üáeÀțwőűïûOâjM>F\31ê$Ź[”ŒĄ©c?ô2Ôî­ÄÈk2qAêő.é|ȚÁ#ŰUț.? ǿ܎ł?Ù3”vż4w­ü7Òoš…C;ÊpìĐvÄ_4 ÇŸŽę“<\~óìW_ŐàČńłđęŸJޚM˜^Ž'èżŻ3 ĂàùçŸÇ]wʅąą"!MȚČ4Y8Z•••XŒx1t: CXd ‰Žă„vÁfłÁb±`Ęșuxé„r;FۅÊȑ#‘——‡ùóçC„R 퉳că Ț WWìŽŰl6Űl6X­VX­VŒúê«(,,¶Őh4~-J(!^oć駟Ƃ “É —Ëœ˜ps^\„9;g őđ#G0zôh\zé„8tèÚÚÚĐÒ҂sçÎÁl6Ł©© zœ_}őn Ț\;V߁+3 0üêL|ńÁ“űùèż‘ęè6áó“_ŐàëšRáœÎv3v­žćĄW“8 œ•Ćÿę'țûOT1ƒ0âÚ;p„&Š(5ŸűàIÀïțű·Ï _|đ$ŸÛk—čpÔ8\?ói|țöèh1 çțćèçűfgN~UƒQăgȁ *`:úvśË8șŻĂŻÎÄšńł…ăƒ«ïÀ±/kPUU…űűxšŐjšŐjÄÄÄ@„RáškźACCŽÔń)V…eYTTT@§ÓÁd2!5%eće}*‚ÁÀč] YÒ.<ńĶă3DZ€”`ČŻŠ+ę™gžÁ#<™L&˜X‰q—>WN ËČ`Y­­­žôÒK‘””œ^9sæ„íű,ƎÙlÆÆ…ç‰' †aÀ0 ärčW-˜ÔÖŐâŠo‚ÉdÂ۱cńá‡șÌê Fƒšš|đÁ˜8qbŻŽË‚t’±H€ző8~žgÇeϞ=žóÎ;ĄŃhP]í{ȘłÙlFQQ  5%UÛ«B*€—„ X­VĄ3ËČ,ÚÚڐœœŒ„AńX ›‡ìٓŁŽ vq)AąŐ܊›vâę:49‡ÆÆFDEEaŻ·ÒĄĆń,,ËąŁŁíííxóÍ7+VŹ@^^ââ₞~EÍ7‹‹‹C^^VŹXXż~=,‹àŹZ­VÁ‘ u6=gÎOë=%Ä!Śô”Ś^Cgg':;;§Eìè„*?~ ȘŐę>‹«52Ò3ú} $ÒàŰl6XmÖn"*ątĂ^7H'˜ÔÒ¶ˆŚ3ꍷK7<σă9Űž./ÉÊZiŒËdÙžźJLü‘æÜÛ±‰ÚČjŐ*śö”~*òĐ#%uG›§u+šÛ#IèÄp|·žs°‡%š…ž‰ę _:Á}f söÊ)öŽ\mG‰<„knë.ë:@Ś“ŐœœĄąąBP[Œ™L‘çF&ž^V”Z-š.~Ÿt—țÌ@"śŸsŁ#:"ĐĄ"Š3$ÆE\gˆCă‰ѧ.ă<ö$źŽ”Ífsđ–ƒ5DžvíZ\|ńĆ8pàrrrpúôiż:-,Ë kyٶÁWšőy3HêN§ ˜ê"†d œőÖ[HJJ‚N§ĂĐĄC±víZż—ÇUĂcŁÿè?§äFâx»űÁń\·zä­->°űÁ: ô+ç(éòšû;Íč'***„Ą'o—ź°/G aÔj5ôz=t:]ÀU1łfÍÂĘwß-ʁ€Őj±æ…5~YIÜĄéțqĄ8âȘŠđ^ÈÔîE »'DJ đwšsO”%))ÉaŃPO ¶2@­ŸÌËúPXX(šÁP]$©ĄĄùùùšošGvV6F„Žê·%‚OA-ôÌ_~ƒGŠKO'„NÌÀ"Ś»żÒœ{ąžž&“ eee>ĆPí‘"†aèőzh”ZcùòćA-Od ‘ÔUçVăB鎜íJÜÖL\âńPe`§„żÒœ{Âl6 jKnnźOÇąN<ƙÜÜ\èt:èt:,YČÄëaHB2jëj±€`‰àÀäççcŐȘUn—‘4@źœÔqĄ8‹ŽKwSŸ]áőžâ ìÙ]©őšțLsą"€^ŻśyÊônC Ô"Â|š.âș* €Ő;š’ ƒÁ€űűxŹ\čÒ祭`KP =#ˆę‰ÔóuïšâB ú;Íč'Ìf3 RSR}V[ß9JhâëeÍÍÍÚÖÀ`0x€h ʁDÍ#Űhp.Ć uˆ}h:O°•já­șôwšsopYčo±-„ȚzíÔÂŚ|ő\†AYč}]ĄPS]ĈŚ@2™L^­DzÓlÔš9˜3ȚÆșx€žžłÜ4%ČńgTšsOÔÖŐ j‹żÎ _†diȄᘅy æœ{Jok m­ÚŠË.»ŹÛ>źb\hp.Ćț|@"‘űԖűešˆÎăBń”jc5fç̆Éd‚FŁÁ;ïŒpù|IÁzÂț€Îœ™űëȖ•—!;+K – ș:0+9{ É@züńÇ1ț|FŒ=·ß~;^~će Nì°œsC$Ži PìűçNą1.”€è4瞚­«…Ńhô«Úű݁ŁD&Du1š­« YŐḚaÄ €Ù9łńŃG!5%<ò}ôQ‡!VšUDé >”—`d P@§9śQ[Ș¶WùśÀŽ“™űńW”œ éaĄșˆIOKÇÿû_lߟ‹/ÆË/żŒ—_~«V­ÂŽiӄí14ćp|7aűű…~+3%ű4ܘ2e €2)$R‰pęg‹ő„ôŽtäççĂ`0„”ê"Ÿ/† ‚šš(»ăB‡Š(NOA*•?ƅB •4çž`YVP[V­Zćőq$‰°¶†D"L&ƒT*Ć€I“°aĂęh%xC7›*/aŽŐҌÓ_lBęG+“'O†Lo—JT IDAT*ƒL*ë6Lä­łjŐ* hóŽ8R{$èC©Ț"•Hî àhp.„AŠqquƒÒ è"ç’3Ą”æÜ‚Úâ©䏟H%RÁa‘J„ËćP*•ÈÉÉÁæÍ›ńÍ{ű朂țű” ńÀ@„R Ś\&“ æKÏQ­V ȘKEEEH9û}ŃÓśŽGÔE *ąt٧à\Oï!ŻóBaYO=őVźŽśHƒæÜ,Ë ©ŰŸš-â`\â°c·Ęvź»î:ìÙłß~û-Äë=ŃáÔĐÇ9~E*•âȘ«źÂ€I“†a#R·ŻS—]Ș‹N§s{AĂPE*‘bđàÁűüóÏét”^ńfUhqĄôHoŚőôéÓžÿțûqđàÁIsŠ ˜L&èőzŸămˆÒ"“Éœ…B•J›Í†I“&aüűń°Z­°ÙlèmŃJzïžž ␧TĄP@©T"** J„ … …ÂÁaő‡óąV«ĄŚëĄÓéÂNuC§ü§ô€ŽpHe{ęőŚńÄOîżÿ~Ź_ż>d{‰DmIJJBaaĄŚÇ‘J„à8Î!źE&“Ù7•RpRÄÛˆßŁêKhâ§Bź-q\ bbb R© R©ìŽ #TČœŻâˆP]Šü§CE”n„Đ<.ôA™( DEE Ż[ZZ°hŃ"ìÙłƒ ›oŸ‰ììlÈdČ –ČwŠ‹‹a2™PVVæsc Î"!* keĄČȘÀÙìÎ iü+kÇq‚Ńû$t!ŚU< H•J…šš(šT*ûk„Ê!ŸEŒŻ·0 œ^­V‹ââb,_ŸÜßźqțîäoêžPœá= eàŃÙىöövÀțÿìÇʕ+ŃÔԄI“&aÓŠMi È0Ă0P)íN P—J„P(èììt*r`§NLđq~hŠËB†‰‘!#†aüжrssĄÓé Óé°dɒ™F 7zš"8ZÇ)ΈȘ„7ó·šâBé“Ő«Wcśîʀ•+Wbá…P*•A.Uß° ûCm‘J„ày^p^†±«)Œ}xˆ83`Y6› 6Ξë9ƅč2)dR™ƒȘF”ïBœč\î șűŠXu)**Bii©ÏÇ &TqĄ8ăŻ' U\(}Č{śnŒ=/Ÿű"RSSƒ]·0›Í0 HMIő‹ÚB CAbGD"‘@&íRaX–…Ő*&â9ÁyĄ„&$ćŸÌGBč\9#‡J©” Kœ_Ś-“››‹5/ʁÁ`ÀȘU«ÂBué šUDq†Ź_Áč4z<ș3g~űa$%%»(nCԖČrßc[bŐEŚ#‘H •uőĐÉ‘«Œ":çQè!Ns'&Ò%ĂBb„E<Ÿ‹?§†`ećeÈÎÊKՅçRU\(}2kÖ,șđ©*”u”‚ÚâïiÔIŁFț jÚä60 ăIdłÙȚ4Ł(tq$ژ ÿ‰'œ#J‹?c[œÉÒd!5%ƒ ó†ì4b\)OT‰§8ă< Í*êÖ­[‡‘#GbÒ€IÂk˜7oàă?ƱcÇpśĘw#.ŽźK ÔÖŐÂh4ö‹Ú"FÜĂ$iĐdɕłB‡ˆB±bàŒˆą«Śę Q]ŒF#jëjCZuéé·ˆ1.g~hÁ‰ÿ†ŒiCËŻGüa0] K ‹#[N!ax FȚ<$ŰĆ AžÇE\Y#”'člÙ2Lš4 'N^ÀÜčsŻŸú*>țűcÜtÓMˆ R)û"‡Dm©Ú^ŐïçêvçDìÌ"őțˆD\„H‹Ô@.uR”œ éaŁș8ńPq9țÙŻŰùä! 7Š™đzòßźEâÈhŽü܎V~”›†!ùŠđ‰ôâŐĄ}!ŒZ„ó駟:8$Ÿ~ú©ĂçÏ?ÿAW\ÄDj’€ț’ïçüú /ą^èđ^$nßiꔩ€’Ò’ •ÁùÊł SBŸ’Òd€g`ꔩ8Z4ŰĆńˆ8TÄÄJ{âŻMôÚț{H !„ëő@CŒ:Ž+gŚĘU\(}âË*žąÚXú†ú€«-J"V]ȘŐę·ć+Î NR”‘ÒâŰœ*.”ˆ@›§\”…BéˆêąÍӆ•ê2c\(œĂ‡ÒP…LˆÚ’ŸŸOŐJ𞖎üü| †U]ˆ*ë0šăBq&„* F&á €±,+š-«V­ ri(”țaŐȘU0 Đæiq€öˆßfƒö'Îń <9—âiR|]ßË«Š`DŰS(źšššԖp^Ś…Bé ”Züü|Ô7ÔŁąą"ŰĆpn€œW‡ŠFMl=).žúț[ŒB 0,ËB§Ó j %ò!u\§ÓeÙ —ŠoxŰšQs0gÇ%`3çș:Q8 )P|C* =·ąą&“ zœžȘ-”ˆG­VCŻŚC§ÓĄąą‹- jyÄ!R‰©ÄIqĄ!Gˆ§Đ“Jç.48—–”%)) ………Á.… a0 Ó鐛›’±.șÈ"„~9Œv\§vЊ %°Ăd2ĄŹŹ,€ȚŠ?azœZ­ĆĆĆXŸ|y°‹ä€x'žfQœ{ ŸÌzú?…ÒfłYP[rssƒ] % äææ")) :fł9(epgâ0žçšQs°J‡ŠŠKdȘŚ”šš Śë©ÚBpˆU—ąą"”––ôü=Ć$H%RăBq _gc§Š „OB)0Śl6Ă`0 5%•Ș-”Knn.RSRa0‚Šșˆq™ŽŽ5óț™€Žz֔AԖČrÛBž0 ƒČò2dgeEuÓS†OÛŠDƗJ€Ę:O YE”°Ą¶źVP[BqÚs %diČŐeaȚ /wA!!8—fQșJ1.\hÆBP"‹%KŰŐ …AuYR°ŐŐŐÁ.Žț DźæqńȘžP‚ÚșZFȘ¶P("ˆêb4Q[W2Ș șÁę”`Š‹ Ò ‘„Òu%jKŐöȘ —„B -Ș¶W!#=#šȘ‹«Eóhì#„ą&ĆŐĆ#Dž.źH F j‹FŁ z’B 5ÒÓÒĄŃhBBuqLs Ž%4àÏŚ‰* „ž9%ò˜:e* €Ž$È%ĄPB“’Òd€g`ꔩ8Z4`çODçœKŠ;xăĄÎ”'jK”±ő őTmĄPzš.ő őš6/HŚaÎ'ž§F­»čȘ7nÌÄ,ÆkƅaQ6O €Ș-J_ŐE›§ šêâŒ*4fQœ!ž‰‰ è<.4օˆÚ’ŸŸOŐ „ÒÓґŸŸƒÁ€jcuÀłï$R `ëzM§É tÇ?u‚ΜKé‘`*i,Ë jËȘU«‚V %œX”j ŽyZ©=đÙ„©O 4ƅÒ'ÁPŰ***”E­VüüJ8ąV«‘ŸŸú†zTTT„ ]ÓdpÔš9™Ę™ ‰Eyާ&&Î ËČĐétšÚBĄx čgt:X– È9„RWkÏđÔš9YŸŽ)TqĄ„0™LĐëőTmĄPoÈ#êŒ7`·śH%ùú‰cǎlÙČ%è5ÿږ-[ÓŠMërZ€v„Ćy†La6›”%77ŚŻÇŠPčččHJJ‚N§ƒÙlöË1Ęčç'Mš8QÓž5jày{}€ùóçđÎa!ôș§ž’J%öà+©T ©L ™L†É“'Öź]‹ÊÊJȘŒD---šŹŹÄÚ”kR©ęz‹ƒïÈÿț2***Ș¶P(~€š.@ŚœŐ_ˆٙ3gŽŹ7Łáƒ°-¶à·šÔ‚fl‹ ŽàÈz»ó<óŸ™]íÇyćĆÓN°„ïe ÒfłÁfłÁb±Àb± ­­ ---hnnl˖-Xż~œ7uâ<üđØ1câââ‡ŰŰXÄÄÄ ** J„rčrčÜ/ʋÙlF||,ìKłÂ ±’r플bòäÉP«Őˆœ–ŰŰXDEGA„T N&“ùĆq)((€Á`ÀŽêŸń“B‰dȘŐÈÎÊF~~>JKK}>žŰq±Z­ŽŽ‹Í ÎÆă8tvvâĘwßĆÇìGg^lHÛ/țâĉ˜9s& drä2ŚŽ‹T*őăÂqœP)ÛÛÛŃÚڊÖÖVŽŽŽ LGG:::ÀČŹàq“X Jh#–xe2†R©„J„Btt4bbb,::J„ÒÁCöőAT[W‹Œô €Š€t e 0*uêêq€öˆÏËgđ<›Í«Ő*tl-XY«ĐˆŸÿ$ Q"•ĂÍÔy‰LÈuçxÎ>σăì3ë“ëNÔ9##gÇE&“č­àśš-•JÁqœPń€2©p„RiWd8›P(†aÀČ,u\ÂR™€R©à +•JÁyQ*•P(P(‚G,–óüńZR°PV^æó±(JwÊÊː•%KP]íŸŐŁĆíƒL*'ć„v‚łÙ+‡Ț7pRàŃc&%ü;-bçU"‘@*ëRT€{["“É„mÜ„WĆEìYՅÄșĄ#ą¶tttÒ!q\È1(Ą‹ƒărȚăU(vÇ%J…èšhDGGC„R!**ÊÁ‰ńG| U[(”Àà/ՅôąĆĂE,˂”ȰYíí…Őf/‚0Täătï”ĐF<ëșƒă"”;ž Ă8 y:Lž1BWV…B!Œ&Ă0Ž )4ù›zŒ ±ă"."Î Q]ü9ˆc\€2©ƒL”q źžąùCm1Đh4>»S(”ȚIOK‡FفŃhDm]­ÏśqZ@.wlJÈ0Roms‰,È5–IdÂ{bEŸ #ÊerÁŸ fOgcïušˆÆY$Y$š\”+v\œż%Ž{čä!DÔ3™\&N‘Ą!±ó⟀Śț €P(}ăÏĄY҉%Ï}ç6ÀÆÙÀsŽȘ;Qi(‘‹ű ó”È€Ie! Îń’žŽ)n OˆÄ4ˆO$gäPXB„u˜C ]ÄŒT"✐8ò7ùÜNK”±ő őTmĄPˆXu©6Vû<ő€ž}H$à8NP[€6©Đж``✔*(/>8-€Š AŹŒˆœlg•EìžPÂqĐńЉ9ËyțŠoĄj …ü­șˆ‡ƒˆ #țŸ&j <œqÛáü·7a·W‡vöŹyžâ_zË€5ôWçŠ$v`Œ­`ź jK~~>uZ(”“ž–Žüü| ŸUq»@ÚçöÁč íBdÓÓąÌâ)4ÄKÆxÓŠž­ž„ˆq'GĆÙóvȚžz8WòògsŠ?Š §P(žŃKlˆłH]͞J3LÎsŽ8Żqçm›â¶âB '’ÉdBv©Îž·/ŁW•I쎐Êç***”…:-JpP«Ő‚êRQQE‹ù|L2@ÚÚiŰ8g ùłìłâBȚłÙlŸÓJ>89+.ŸzÇ–e1tèP˜L&Ș¶P(A†š.III8}úŽÏȘ‹Xu'ŻßŁ ,œ;żŸÄ”ˆńHqé-ËU„„„Î ‹ž‚‘qk_+[EEL&ôz=uZ(” ŁV«ĄŚëĄÓé|R]\” âžGçᣞŽA OzjÄ É6#mˆŻmŠWYEâü}«ŐŠKȚ\ÿ&ÊËËqüűq A Fމ… bțüùP*•)ÒŸd”€_zw Ćw|œ/ĆN‹sŠ©ĆbÁșuëđÒKć8vŒ¶ •‘#G"//óçχJ„ê6éœ7΋[Ž‹s*4™lÈj”âŐW_EaaĄ°­FŁńü›QBŁŃ(üęôÓOcÁ‚ĘæqńÆyYčr%t:ÊÊÊü2žNĄPüĂÚ”kĄŐjĄŚë±|ùr·śs5E†ž]xâ‰'„mÇgŽëąS€}5û…żŸyæ<òÈ#Â\aȚÎ æŃÌčÄi!łć¶¶¶âÒK/ERRôz=æÌ™C‡ÂłÙŒ7B§ÓÁd2áĉˆŽŽöz1,rLŽ„S(ÿámì  ł©“ĆÛÚڐœœŒ„AńX ›‡ìٓŁŽéçoA UZͭ۱i'^ŃŻCәshllDTTT·™Ű=iSd+VŹXŃŚFD $łŁŁ‹댯Ç'Ÿ|‚gŸ}‹-‚R©ôő;R‚ŒR©ÄuŚ]‡˜˜ì۱‰‰‰žúê«»-tï‰żțőŻŰż?ž{î9ÜpĂ ęVv …â92™ 111ŰŸ};ÚÚڐĘç>ÎZ«ŐŠÎÎNtvvbęúőűűă±űéž;o%€§6@Q2}]T1*ì«ȚÄÄDŒčfL·¶ÄÇ„OĆE,’ŠÙȚȚŽŽŽ̛7ûöíCSSUZ" łÙŒ„„Œ1{öìV‹V*•`Æí!Łț˜/‚BĄűOçW· dĘ:‹Ć‚ŽŽ̝;{śîĆÎßȚGL\t€Ÿ%ÔimnĂäÁ30bÄìÛ· …B0ń íîĐkV‘s”žłóBąĆcccéäBFll,233QSSƒöövaőhOX,**”•—Q§…B Q†AYyČłČQTT„ÒÒÒ·uŐ.đÎÎNaj UŹ6ȚšŻ@ qT±JŒ›<ûw@GGGŚz‡rčĂÜ?îŽ-n„C Áž6{”X,°X,ÔY üÿöÎ<<Š*]űżȚÒY:!ÙFIBXÜpÁőf„7@tâò}80ŒąÎŒ‚#‚ ŁńΞqĆàź\ásÜÈ#FDÁ€@’­;déîȘûGS•êN'tBB¶śÇSOșO:çTŐĄßśŒï{Ω««Ów‡öZœ~łšÓśìĘĂÒ„K’4äŽ7sĄ}čnâu IÂÒ„KùĂ}8ćv“54«‹fÄśâ9ÍșŸŸáöž±y|q“G_v#TšU\Œsóœ^/^WŚȘkkk-:'t/ŽśZWW‡Íf#,, ›ÍŠû¶kŒăÁ|ÖA:?šŐćÁ䣏>j2_àZ^nOƒĆEĐ*Ș lԓŠK}]=6«MŸôa\Ű6wŃ)-.ÆȘMuÓ̂ą°ô Ün·țî;7Ǟœ{űűăĆÚ"]ÍêòńÇłgV—À­ą((Ț—‘nqQÄM$űŁI ÍR§Yíś=<•»($WQàÂsn··ÇíW‘Đ}ŃŐÀ]À›{ïš”ćęȚ?SÍĄ xÿƒś9ÿŒóOiuŃŽŚëĆăőèÂH=‹«Hh„Żohƒ`­ż­űĄĐ€âž'‘ą*x•-ÉăöHŒKÁăńœkŻÒĐɚCł¶Lœ8ń”~rA:ç{'NlÖêąĄb”ŃÈY\EB Fœ"ÔAp0N9«HÿŹű:§Q; –Oè~èïÜÛŰŹÌ'yă€xń„Ïx[A8}^|éEÎ?ï|nœt#û öééûÒZÜ#ˆ«HhŒăâ73MUZŹŒ„ăbü,»}ö,Œ^ŻȚč€F|ôńGˆ”Eș0F«ËGtÊ8”`‚Ç‹(.B Ö8EQYćBŐ+ZŽ;ޱ`câ2êžű)ʊÚÈÒŒ9śÍÄÚ"]Íê2çŸ9~V#ÆMăsă"űʧšJˍ !+.S,.B š”eîÜčbm„.ÎyçžÇÜčsYștiHV—@$ÆE€­ô†Y\šȘT”˜žE°śív»uk˓O>yŠ›$B;đä“OČtéRæÜ7‡öü€ŐÚXdś13"1.Bc|ČĂl möPSŽŰU$ôlšRRÓÓÓuk‹ì[%ʃ˜˜Ę꒞žÎ}śĘçw^@Á”Eb\„Tƒł(Ô©ÏÁh”âbì bqéÙžĘn-Zˆ”EșšŐeŃąE̜93d#ź"Ą)ŒúƒÉÚŸwFÄâ"œ6ééé?~œĆ‹‹”Eș111,^Œ˜E‹‘žžÎìÙłƒæÓ6ÍÓđJpź@‡Äž4…X\ș'ĄŒWÍÚÒ§O}ôŃ3Đ*AÎ4>úšnučśȚ{›]’];'ź"áTŽ6Ö„EŠK(ÛM ʛÀ>đÌ3Ïpüűqțń`łÙ:šU‚ Ž'6›Ć‹3gÎÒÒÒ R‚ĆžHpźˆăb2™NKŸh‹‹ŹăÒ3©ȘȘbɒ%ôéӇYłfutsAhGf͚Ć… YČd sæÌÁn·ûDă"4ŠmŒ3§7'IèŃ<ńÄ,^ŒXŹ-‚ĐÍŃŹ.Đđ-fÉ!‡ńPÛHq‘ĄU8N–-[FRR’X[Ą‡0kÖ,^xá^~ùețò—żÖd^EW‘àŠ+œnۉÌ*Z…6íù?ÿó?ĆÚ"=›ÍÆÒ„KčńÆyê©§XČd à›ÒȘÍ(҄’ÄžÍq:ÊK›žŠ‚íÚÖGzz:SŠLaǎíVǔ)SŰŒy3ȘȘČyófŠL™Ònu:tˆ)SŠpèĐĄ3òüZ{#_>˗/'))‰‰'¶EĄ‹0qâDÌòćËÉߗïwÎo}/”ns|đü§,ûíšF髿ŒÇČßźÁív‡”?۱ì·kűàùO;üÏÌщ\EíÛíæ™§ŸĄŹŒŒòòrČłłÛ„žŹŹ,źżțzöïßOVVV›•=uêTČČČšššÀćr‘••…Ëćjł:Î [ÀK/œÔÁ-Ą#xńĆčć–[XđŰV­ZYòżčŠ\ćŐìȚ’Oّ z ˆ ÖYǗï~ À]GH9PÏżőżvĐ'>6€g°{K> v«çŐ4țźąÖZ]B¶žtäTè­[·RV^Æm·ĘÆÎ;9|űp»Ś9sæL]Éh†NEEÇo·:ڃ‚‚ČłłÌÔ©S9|ű°^ÆȚœ{™7o—^ziŁò”șëëëIOOçÒK/eȚŒy~y΄›HóiŻ[·ź-șŽ ]”wȚy@ŸiˆÒțęâąłű!«PO۝YHÂ%żàܱ‰|ŸÙŸï‹ ùć9zZÉŸŸÙ°0‹żŽț/~ŰRˆÛíÖρÏQČïg^M]Ï«©ëùaKá)ÛÔÿiRĆl6w|ŒK{räÈvîÜÉ}śĘGLL #GŽdí;kęò|ùć—€„„qőŐWÇŽiÓ’4·Û űÜ@ZžaÆùć FaaĄŸ«häȑL›6òòrÒÒÒ3f à[Ïdä„#ÉÌÈdâĉÌúę,232ő„±Ż»î:bzĆèŸ „Óé$++ §Ó Àüùóčúê«ùű㏙8q"鯊“ +Z{źșê*ÖŹYĂĉyőŐW™s?”UuŒzç:–\¶‚ò#•('˜ŰZ@ÚŰŚé;$–ć5Œzç:žœČĂï»­¶ZÇ„Ć1.ûQű:hûĆ `AIDAT-4ôßÿęßüæ7żAQî»ï>fΜIFF)))~yżűâ ] feeqÛm·ńÍ7ßpùć—ëyvïȚ̀xśĘw™9s&;vìĐóšȘŠą(șĆAQrss)**bíÚ”€€€àöžYűűBÒÓÓÉÈÈ WŻ^”•—éçöíÛÇșuëP…{>úˆąą"îœś^òóóęê[ûÎZŠM›Æ«ŻŸ Àâ%‹čțșëyùć—uËÀôéÓyä‘GˆćÙgŸ„ČȒèèè6~ò h?HsæÌà駟n·șAè˜L&ž~úiźčæfÏžÍÆęÎw·éĐçOäăç?çDU UG«q–»qC1ęą(úêĂÇÆłgk玉Śïÿë {pÄE1ëÉ8úDđćšĘl~țK țę—ȚÒ0|lûœôà+뛍ùüsî‡}}ˆű‘ÎüͶMç¶ÔúÒj‹Ë™ŠyY‘Ÿ‚Țqœyûí·y플۱cŻŒòŠ_ŸÄÄD?+ÀŻźęàïÒHLLԕ€›nŸ €ÌÌÌfÛ ŚÊŽYmúRś)))\~ùć?~œ_]û+rss?~|‹\)čč蔕—ù­‡błÚ˜0a;wîÔ­2SŠLiô耀$äșZËö/¶sđàAƌĂĐĄCÛœ>A:?C‡e̘18p€Ï?ÿÜ/^ĄŁ;këcè”gP”{˜}ŸÀĆYCb‹¶Đ7Ą7_oŰKyIźòj†§ÄŁà„xçßś1ńìțdÛŚìBE!"ÆÎžŹ"|ÊMüƉźŚ5<ć~Üv Ăï»-#­ÙZŁS/@—™™IYyóæÍó;—••EUUŃŃŃšȘÊàÁƒęÚa”X錛üü|==Xđ蚌遟żüòKzÇőÆj±œW·ÛÍ€I“Űčs'#GŽd„ 2„uëÖùĆÎ4ő·šš@żË.» đčˌí VF{Œc™Ï?ÿ< .lózAèș,Zވ””ÒÒÒôžè~Kțž°7ż)ć@n)Ăź€ßăđ”A䜷á)ƒHžjŠȘpü@%?VP]VŁ—Ő;!†êČęúˆX»ßó sűdÓ±‚Šnő5™Ò­ [Ÿ|9àÜÆEÎ233™>}:˗/çᇠ;;·Û­çs:”•—qĘuŚéŚć}“çWŸf©žăŽ;šmÇwÜAvv6N§SwÉdffČ|ùræÏŸOEE;wîäÙgŸŐ]A·Ęv[Èśùë_ÿ€]»vùYÖź]KïžȚ 6ŒmÛ¶…\^[“››ËO?ęĝwȚɐ!Ác‚Aè™ :”»ïŸ›7ȚxƒíÛ·ëéĘÍUdČ ‹°'ł˜ƒß–0ę„ńú=Žž)‰ÏVæ‘ńÜÎJˆĂŃߎąz:ö\sï…\ts’^ÖźM…„ś ÓŻ?Žë˜ßó:¶Ï§đ O9§›=ÇNŽWQ{Ìh©ŹȘ$;;›™3gb”Zę΄€€èî#ŁUàțûï§ČȘ’üü|f̘À€I“ô}:ÙÙÙ\tŃEdddèyëëëYż~œź$i3—úôé@eUe#ëˆĂá 11‘ùóæ“‘‘A}}=ŻœöY™YÜ:íVżö :4š…„=ȚAXXș[N‹qAĐ0›Í<űàƒüęï§¶¶–è>ŽŸzÛÇđ”s8ű­oÀ;èȘŸzú€±ü\\ΰäsôô0‡…A óù\ò6íŁÆYËżÿ›·Èàxq„ź”žÊ«Yśàjœ”ĘWƇOț€ĄÉżèđ{nÓéĐmŽŽK§”žh3‡ŠȚ:5èù[§Ęʊ+ű*ś+Àżrüűq}–PïžȚ€„„ùĆŽæILL$--˜è˜fÛĂ#<Âk+^ÓcWzÇőæ‘y`łÙ˜ÿè|VŹXÁüùó™?>ÓŠMcĘșuÜ~ûí;vŒ?ęéOŹ[·Ž!ICüf$iŒČüțăÙÿàöÛoŚÓŠM›ÆÜčsC~fmM}}=555ÔÔÔđ›ßü‡ĂŃamĄóĄ ‡ĂAjj*oŸù&•••8.”v !èH’~5ÌáŹű8ę"ô{4YLœsq~ú¶”ĄcÎö»śë]ÉÖóXû@Ă,Ős.îÏwž«ç;+>Že”üőâ7ôï7.…-ÊÚœžŁáVZł~‹†Im"8BUUŒ^/n·[`.— §ÓIUU,ZވŒŒ<Ž=Úê4Ƒ#GpU»64űŽÛȘȘ*J–Òż_fΜ ÀÛożMțŸ|`Üžq~ùûőëGrrrłyòśćÓż_bbbôòëÏę:—ŠòŠFŚșĘnʝsÁ0pàÀFś }ï߯?‘˜èç«ȘȘbóæÍüúŚż&&&Æ/=°=n·;hm…fUŰŒy3Äáp…ĘnÇn·c±X°X,m^· M.x<]6ÔÖÖrâÄ Žę|ŒŃŁFc”Zńx<,ÜwOG7·Íńș*ș‹Ž= Òï\Ëëh ±ƒXl…rËÍŸìC M>»Łáśúxa•^ȚńÂ**~r1äÚ_Žûœtkț_6ùŸ`çΝDFFNDDv»›Í†ŐjĆj”žÒÓi-.lö|LLŒŸ`Ś6tX“ÊΩòӚ*ÿòË.o”ŸÍÇ•™À{üŹ 111Üzë­AÓÛcłÙNyŻmÁ]wĘEdTä©3 ‚ĐcqD9˜5kéééf‘tL6ˆKòMYŒ?›ĂLœ# ß.MïĘæ0sțMƒ]k,/.)Šž€šnùìÀśd “çv–šçPÚŃYÚڕ˜6mZG7A„.À=ÿśVź\é[¶[• ‰Nkqi /ŒđÂ)óäääHŒF+i7” ĘmaR›ŐFxxžo·äv\˜Tèúè¶Ä Ó6ëž(<ÔżÿS¶C›ÆÛŃmAèź˜L&±n  \Ç„ÛÍ*A:?M Ÿî§!œŽW‘†±ł¶ŚÊčBÇb±X°ZE·áÔhîąÄÄDNÔWيĆEÀž;ôé R©ƒHMM%..Ž^xĄQ ‰¶ŒțÿűǎhšŽ6íQĄ9ŒY›ÍFłöŒžŠ\Gk)È(ćÈ7ćüòÏçáèȚîuvȚ›”ƒKïJ$ńW}O™·èÓc|łșˆóo9›sođŸjí:ZKƂ]!—uzt°ĆƈX\Z޶>ÊàÁƒ)(_}ć[TŻŁŸkGŚ/BŚćLžŠöe”°ęùôŃË·:krOæ!ql_zŸ2oĆÁj sŽP˜s„„1őœê\ő-*ët0îÌĆj̋X\:˜çž{Ž›oŸčSïž|:»x ‚Đ30™Lú œYEû·„߈^ÜŽ|䫳3ĄȘJHśltÛ}űÇ<ęyACuše”Zi­ËšÓîUԒăđáĂ<țűăLš4‰QŁFńüóÏSYYé—';;›ÔÔTRSSùê«Ż„«ȘJ~~>óæÍ#55• 6ű]żaĂRSS©ŻŻś«sÔšQŹ\čROWU•ÔÔT>L}}=?țžŸCuà>H3fÌ ..Žčsç6:Śž« BkQU„ĘWi ›fÍțœJż«dÓìŻQU…MłżŠ8çg((攒ś?ĆŹčù öl:‚5ÊÌÿÿĂNțœìGÂ{Ùû— š,>ÁÆÙ;šuŐëŚlžÿïȚ šìüŸęŹŸțsȚșu;%y•„ÇZ)ùźŒwRżÀăń  °kÍA^·…œïû6\ÜòônV%çà|˜PRRBqq1țóŸQ…+V°~ęz†ÊÖ­[™;w.7ndäHŸ îčçž#++Kw5őŒnŸùfÖź]˂ ˜0a Đ;RG›=Ćê"BšÆ'šížrź-ÊÄ·`ËÓߓpm.ž}€^_QÎQ~»ńÿ;8Ż[Ą(ç(—€&0zžo-ݰ^f>™śĆێ1ôú~œššáśčc±ŰÌ|ölyo7(š;țu%^·ÂÆ{ܔ|WNćjbG’·ú ‘±ܶî2ąúÙÙśáQrž)à‡ő‡ž|v‘±m;ƐëûPòM…ȚîĂ_•1ôú~üűA ‘±ôœ(ŠƒŸ•qąą†›^É ŃqTì?Á?oùÂŻ_,ËŚïKÆšä€ęHȚ›Ć\’šÀšG’|©Ï^łtšxIùëpțyË|òçĘÜđÊԓqAjëÚM€]Š­ĄU—ÓĘg -‰ŽŽfőêŐäććéÊ˅^ÈêŐ«±YmŒőÖ[Œ7Ž5ÿ\Æ HJJ`ûöíz9ÆÙ””ęZíï€&át:őș>ÿüsȚx㠊‹‹‰'33S/cƌ!Ç­ŒüòËúf‘‚ ]@ägqQŐv?àdl†áû€qÄ$úvn6YMÌÎKæšG’(+Ź&óŃ=|2ï;j+Üú5 ŁûbȚPT•kńɇa7öÓËûÔpꞜ„””tÒśBû3æ»5‡š­pc¶RŒ­ EUvC?~æû| §Œ„Ń}IĘW?`[Ănđ•ÿăû„DƆsöšXę>b#ˆŒ gïŠRœ—€&èś„„íxy?yopőC‰M>'Í€•}Ő†PüÙQJò*ƒ>Çö{_ÁĂ-Ő)ș…«h̘1Ź^œšűűx^ęuRRRŰșu+ûśï 77—Í›7ëǘ1cšŹŹÔËqŃęstt4cƌaęúő€ÏČ2eÊlV„„„z>cy±±±$&&âöžtć(ąŁŁyê©§ÈËËcăÆ­‚ o»ŸzTżïĂnêë—'wyË/ÉæŁûwc”pqê żëĐżù—k”ÒNƁ P–ï ¶ÒMń¶ăúoÇȚËwMÒu}8QQKù~ĆێmńŚÆqđł2ȘÖP~ĐIÒu}PńRúmŃç„7ș·èsÂ9¶Û©·'&ȚȚš'*jőûÙČèÇfž•Ș·_ĆËĆś$vƒîßMÓĘè9¶ßûòW\ÎŰÊčÁ*êH—BII Ÿ|ò S§NeÓŠMž\.{ì1îșë.¶oßÎä)“Ù°a/żüČŸW‘Ûíf͚5Œ5ŠÏ>û «Ćêw3îÁ=wßCö–lŠ‹‹yé„—PU•!C†Çžqăxàôü;wîdŚź]X-ŸGJ€«1Ï]wĘĆÚ”kYžp!111$&&v*WÙÔ-t\AÚăŒłÉŒÉl °žœW·ŠêW—ń»ÛćeÇ+û‰}—@á‡ÇćSƒŽŚïŒáï€+}rdDê@’źïŁç/üđ8uUUᬋ"‰Œ g犃Tt1đȘhNčžzOăg„ĆMȘ i1 vź˜@ĆAWĐòÛć}”Ń`ŒŐÁčFm»#-QQQ<ôĐCŒđ ŒśȚ{zúäɓuwÍÒ„KyîčçüÎ?ôĐC$%%‘““4Ÿ«ŐÊäɓYčr%“'Oö;ÿèŁ0wî\=-!!?ęéOzŸ–Z\À·Yä’%KXžpaĐ6 ‚ tfÌfł>‚ÖÜ+íPWĂśłŻ‰!vƒŸgćU>KË Q}ˆˆ”“ÿA —ünÀɶkݱ܆™7* Ł&đْbČĘ«çŽä`űÔ>ú5CnèMț% Ր6lRò?(ćœ_öÒÓ"ûY=?‰ĘoeĘԝDÄÚč|vgˆ4Ž!đ>ÒÌVżt›îȚEÎûčö©ÁòÛŻqьìûŚń“ÊK°òÛŁD;őÁLjÒQUUŒ^/n·›úúzjjjpč\ž\.ȘȘȘšȘȘbÁ‚äććQTTÔêŽ.—K_qöŠ+źĐĘBF 8xđ ŁGÖ—Ùwč\”––ê»G–YZZJ|||Łeù”óYYY\}őŐúŐZ=ęûśچPòàp8üÊìîčç¶nĘʇ}HlŻXąŁŁq8DEEa·Û±ÛíX,,K‡¶S„3ƒ&EÁívSWW§”u”xÜ~ÿûßóùçŸ3#śȘvoOEQ-‘gÙsX‚~Ś8ö]5ÎCőô>7‚ŰÄpê]^Nüì&úl;ÎCuŰ"-Dőł5YźŚ­âFèçŹQ&bąÂ5è5i&«–Ö0ŁÀe"qBŻ u6\ÓpÎXŻäśŐŰÆæîł%i§Ș·áܙ‹K:ĘŐŰeÉá”H`ź ÍtÒÆs =¶Y€N¶/Aè‘45CDč  YńÍ&s# ]K‹‹ ‚pÚhBHÎía ĄĐ‰–üW‰…AW‘H°u\ZƒX\A„6ÁßU$Z!N`qŃM‚ÒA»%ò^A…`›æIìŁĐƒH9«K‹—ÎŽčąĐ1HĄ)ü§čÊÀGđGÛz SžŠdd.‚Đó0ź œ+!ZŁÄHŒ‹2bmĄ9üÖ|’­H}š‡B« ÂAw…֐YEB ÆYEÁâąB„UŠ‹ŒŒA#&ł Œ ße™ Ą1`V‘†ű2»'bIĄ%ˆ%^8HŒ‹pJÄÂ&Bš4,“!ZÁM™í›,ŠI°û#ʋ Ma6ûöžQLFeEä‚Đ4glAA€S q é — ŃăÒA»5ïÜd2”xúš = ‘ ©0șŒZ"SN©ž›Č˜ærčp8!W*t~\.999 88ęék‚ t?L&“ÿÚ-<'Ź‘ò{!űđœP)ùòńńń~}Š5ƒàŻ0™M~óőM&W\q›6mBUU9șѱiÓ&nŸùæ„ĆìłŽź)BÏ ”ÿóÉÉÉűäȘŠr ȘŸț0cÆ  u ‹FłW;©Ùä Ÿ2›Í˜-f, ăǏ`ÙČeŹYł—ËŐꆝ—ËÚ5kX¶l'NÄlöœoł©±Ò".#AŒÙéÓ§đĂȘ* ßsávy;^jÊŃa‡Ûć„đ=?ŹȘ`úíÓäÇIËKKÁ&”G€ŚëĆëőRWWG]]'NœÀćrát:őcÓŠMŹZ”Ș5}]èäüîwżcʔ)DGGĂá **Šˆˆìv;V««Ő*–AèAxœ^EÁăńàv»©ŻŻŚÿz<EaőêŐ<ùä“ĘTĄ“±páBîŸûnŹV+6›°°0l66› «Őê ŹúM’ââv»©­­ćĉTŸšÆćtQ]]ÓéÔÿfee‘——§_+Y] Ł%eäȑŒ?ž˜˜‡źŽ8""#·‡ëÎb±ˆâ"=ŁââńxüŻĆ« ( őőőŹ]»–ììlżű8ùœèȚhČßűwì۱LŸ>°°0,V VKpĆĆl6·âą(ŠȚ)kjjšźźŠșș—Ë„[`jkk©­­Ćívë·+!tnŒ&^‹Ć‚ÍfĂn·Ndd$QQQ~Gdd$v»ĘOC–"Aè9šȘŠŚëĆăńèÛșú:Ú{ŚŹ-V››ŐŠ+.‹%d ~łłŠÌf3ŠąèÏl1ë•ŰívŸEFńêČÙlžĘnQ\șZg2›Íș&l·ÛućĆn·FXX˜źÍyò$=Ł|°˜-(fE—ŠŚ'ŹüFß (fTšœ‰$t}ŒJ‹Qy5™L˜- łÉ'K,‹ž'TBžm2™üÌ;Šąèš”ÖÍtš). .ŁÎŽŸârRă ó).ᄇûŁVlŒF„ž‡Q.hæ}łĆŒUő‰]xQ“Ù$ûÛucŽ•ôźAmVȘĆì“1«ÿà·„–û‹Ćą›|E!,,Lÿźu\›Íæ§ž~f"ĄóĄ)FĆĆè.ҔÍê"î!AŽß UUuùl°Ș˜”  ŠX[ș7Šč᝛h˜=d6›u«œŐbő“%-jVq1vPm4źù7ęUn·[æWQŚÁoäd1ëV5ÍČfTZ4ĆFŁASZŹVQąč‘š“òûŃœĐȚ±ĆdŃӂZć,V]ŸĐÌ-”à‡Žä ;!<<\sĐÍÒbT\oHè\šòŽwjłÙ°X-zà”ßbŒú7‘ ô\ŒƒZă_-žR1+x/ȘâouŚŹ4BśĆűŽőőZ,f,f‹_H‚Qii)!čŠ4!„uJ=žÆlÆjłæ Ó—`9BçĆŰÁ4ĆEłŹhʊöY;Êt5Aș?Fù`2™PE·¶˜œf]ˆ,è™ÎZ5|“lČo›)óölŒ[}°őë¶”!bŻđ™Ÿ±ôđp…/Ûòœ‰Đ…zQ€íéPRQsL"ŐŠE"ŐVúŒ5(aÓùàî Ime‰›`ŒDèBœdæCqčń1‰TíhK"Uûٷ͔y{ueVcÍQæe•p:ąaLp:DЅz9•§Û0Z‰@ۚ™­>ŰfÊĄąÁöêHÔÒ ›‡°!rŠ@]0F]°HI…n™Z5©ZiÏąN{ÍÜbeö¶Ùk†HsßoY•ë6ĄAê!§žńŃčDȘ¶ÓŹCÜbÖȚ0,“W"‚.Ô ‚.X€ŽČFœ$R”&Qû`2ĂŒ™ÙêƒmŠĘŰ-­ŽŃ°à”ˆ  )«ŽČąwąźLGłölhˆŽÊFH Ș!ÒÀŒÊ«l0,8-"è‚EȘ45]îzì©æç—sO/ÚDŽ«óșæX }æÔq*ÊJˆî€J„BŁ©âÔń#xùűmûu`îžÍùhdώ K—dÎàŰÁ]æʁvđ ÖùĐpSæíɰŒUTYÚ~YžàA,ą`ŠąłC€úÎł·±~Ć<ü‚™łò$îŠUÛ­‚źG ^yűîÙ ÀŸ;Ëqus'çÜYnœŒ+ꇍăćÿČĘŸ•šEQXŸà;"Ł;ŰgšțÜ«^OÊÎ ,Ü^‚‡§ńÎ"M©ź_ùïwślæčś~ÇđEv†æĆČ?öŽT|ÿœúæöĄȘȘŹ`ÁqôÀ.fÎț—:Ș–±ŻŰŻ'8"è‚EȘ…ĂžæČ?fŁŃț-úùS†ŻôæîÊ4ŒD{țžœ}žăńwˆˆî`uŸY œnù<}O‚ńœLœțĂF_€ÚŐÍą?öŽTùê-EÁŐ͝îyž^/ĂĂӋí–óőʧšŹ(gߎu,_0‡‘ov˜HŐŃ'Š  †ˆ  ŃG«6\[We”ôś/pśđ€Md{NŠ$eÇZҏŠĐźc7]ƒôçNŸ@«hđđô& 8 ­VĂє픗—Ś„^>ÆoȘ(+)ą ïÁĄ‘žč{PwŽĂû¶ʑš˜N&ăφ«ïÙŐʓ—NÀĂÓÛlD\\”ÏńĂ{()* ,*–öqĘê,ŒÔœÍ<Žą(DwH ,Č=*uÍKźsČNSX˜§ÿ;7û,™'Ó ‰ÀĘĂ“îœ‡QQq~S•‹‰?ŠVËŃęÛÉ>{’ ĐHbâșáćíkâGA^6„%…„GĆêÊűL©‡vÓ6Š‘1ńF擑vł™éô4’kn{Zź}§$NŸLeÁÜÿ°gÛ.›x3(PRT@a~!ámquu#7û GS¶Ó6¶3ŃMŸ‡ê[:›™NfúÊJ‹‰j߉Èvqžșș”U&•ćš]\3˜QQ^FîčӀn(ÇÛ·æŐdčçNSQ^†J„",Șœ©nnäçdq8eĄáŃÄtìŠÚĆĆìĂ_QVʱC»).Ì#6>‘Đđ¶&iòsÏQVR€·—{î4i‡śÒ„ç@ęśÒŰߕș`ˆș`-¶Wæ.Û·í_N?À€K&Ò©{?Ÿzûÿú·?>ËäšźIŠ0?‡țO`ÔäۘőìÍäàæîÁmœËŰkîÖ§_őŚ\>zù.^țl9‹~ü«æë»‹;'öçń™?ÙȚŒßç=śÜnÓ€ŸCÇńü5cèEč|úúęüóŚ\Łkc;%qÏ3ŸĐ5y°î€ Òïáí'§‘vxQZwOnyd&㯻€WšÌ]ôç?xIwŻ~±’ę/1:ÿû–Ü=jÆĐW/țof=IÖyáP©TŒœú.nyä-<œ|ôÇżžőÿö9ß,MçőGŻáÀîúó]z ä‰7$,JW>ț5ăâ;6.ç·Ùo3|ìő‡EĄ(póCŻ3ńÆÿàé惗·ŸŸĄńŚÏŸòŐ;đöœő|ÿÉKl[»DŸWbŸa<ń֏·‰Ô‹T~nŻ?v»6­4*+WÆ_{7w>1 •ZÍìśŸaéŒŻP©TÌ]•I`H8K~ÿŠț«+ÏqWßÉ}Ï}è;wNL€ /›öń‰|2țô1_œû$ïÿŽ…>}… +ÿĐÛlۙ§gțDÇ.ÉúcŠąđûì·ùæœÿŁȘČæć]zä©·jÊ àÓ7țÊ…ßĄR«yőł„<™ą‚\ęșʊr>țï=,ęęK#ÛŐŒû7Čać<ÜÜkvß8Žw3OÏž˜òČ2ł=†¶őĆ`pŹąą‚Çnąs•Z­ï%H;Œ‡îË©ô#(@yY)Ïß5F/æÁaűűéöëŹ(/ă“WïcϖŐővŸŚŽÆ }œÿĘ,ȚzbȘ^Ì«Ł~EQXôóÇD«ÀÀó='Šą°uíœÍ—ëóßči„~Rç=›(ÈË`đe“ž+€—˜Ä†•ÖVßp2ío>9ĘšŹżzśIŸ˜ù˜^ÌęÏO<°k#ś_ӇüÜl“ûWŽZ^yxŠ~˜)źK2Áá ÿMaț#Ո  ©K˜ëû˜TH@QQ>ë—ÿ @`H=" $‚äAŁ]Ô»nÙ/&‚jòČϐĐso|»ŻWœaê=/ë»lç~ű,e„%&ŚäfŸæÆßàëć§yí›uÄwïÀÙÌă,üț}áź}ÏæŽÏûöm2Rś0`ű•|ôÇAŸ]•ĆäOPR\ÀïłgąUàÈțűűąV»pĘ]Ï3{ćæü›Ăô^Óç›vd/Zžxûwźžáaęń{žù„Ï„Ò9iÎĆԗœŹLŸ™„łëéćĂőwœÀìć™ŒđŃșô€Ëÿđæ~ôŒÙFSĆ' ńć’ăŒûĂV\ĘÜ۱țoŁrűÏ«shڱk}­–Ę›WòáKwră%‘í©ôĂd9‰VM«kzW_v•Éś^—ÍÌïÖ3{y_.IĆ/0Do/ûì)2Ò1ÿ[ƜŠöń‰|SšȘJ{ă{ž™5©wżPÿoÓO]B/Ո  1+Î6DŠ«ÿšKEčnőбSQ©\PžűòőöțțőS“F!śœđ5ń‰ńôöçȘ۞Ąï° äžËäŰÁ]&éžŠ‰7=Ž—O =sÿ _ëÏm_·ŰŹp6BôćúˆuÊß]—öĘÏ}Nxt<.n\}ÇsÜüŸ·yáă„\śK( $ôÌûżíăÇ E\}ûłç»òOăêVÓc™~EŃ5rȘŁwż 0B#cquś4‰(«}Ü”i„>Zœ<ă źœóyüƒÂH4šgȚÿoĘòßż}f6ą›rëÓDŽë„VŰ„^DDwtœ%ĆEz;țÁáŒûÓNn}lû}k”vm\Î7]ı;͖é%—Oçò©âáćKbŸáÜęëÏm]«äÀHȚț~+?m(âáÿΕ …yTi4úȚƒêž7OzÀŽ KŃh5NÙFńù9Ő “Ę›WĄ(°uÍ""câiß©‡Iiô”;èÜcZ‚ÚŽŐ7†rłłĐ*°aĆ|ȘȘt[łžâ&ą;tE„raĕ3ˆlÀÒù_™mŽ»ö†čž—L€ś±&]“O}żłêüEĐd ]°H”›„łWÌÿRÿÿ 6Ql_§OuuśD­vA«Őp`ç:ŽÙGL\wc'ż€ÂŁăltJÀ–Ő 8}âhM4«??ĐHäÛv쎇—ć„Ü>qÔl„cŰ1wo§ÎÏđjƒ_`ęqwo&Üđ}úꌭ–»6ČéŸùìX·X}5će„5ÛëÖaÓÄÇóúîÍ5cÍ=ŽÒÙ<ÿœxÓ±koönꇱ‚\Ν=Ep›(# ogŽWżŻ°‘_^5“ê\\Ęč|êƒ\>őArČN±kÓrvm\Æș„?SUYA~ÎYæ~ôOÏZ`â{§$ăï!ź[?Tj5ŠVËéGÒŠÜÍæț`ëš?9vp'жŠiU^VȘÏgÀ„“Xżü7Š rÙżk#û¶ę @Tû΄·íÀŽőłkÓJû]ʱ;]Oÿœ”CHXŽ‘ŸÆć (p2ę°țۚż6êȚ/+- 0/›ČČ2“=bâëÖ^Dčú‰ĐCDĐ‹(”"U㓖Ż5Ôûԃ;8v`»țïoß}ŽÎë–ęț3}Ï4?”Ú€sóđÖÿżșâ5LąR©EQ„›±^^ZLyyiÍ8§As]ÆúčZ ć„ĆúŒ ę17«żŹ€ˆ·ŸŒ†ëàâêF·>Óźcwțțć#“|ÌEá.S€üó»íxzùêÒ$ô0˜ WZTˆRk߃‰R+}”ę;Ś‘‘șŸüœł ;•°šXCŁžxü #“nz‚ÿ\—ŒV«aß¶Ńh4šŐ.Fćgò·‹źźîTV”éD]Ă站óŚïŸ/»ô&©ÿ„,œ; MU„Ń3ĐûąńžžșĄ©ȘdÛÚĆÜ­›0ŰŁÿ"ÛĆłcęßìÙČJƒNĐÍ5žüƒĂŒÊÚĘàčRΗEAî9ę±Ăû¶P9Y™„Gw0úŸ|‚í&ŸFłÜí“„à$ˆ  ±Ą[qm5+æ}QgșÚü»è;ŠȚśșŃ,n€‚Ü, ósŒąÈ3GőÿoŐÁDˆO?hÔ )-*  W·ÓYŰùô&~›é2­.•Ê…°¶8}âùčg)/+Őû© ż›Ipx41q‰Ž‹KdŃOèĆ|ì”śsíĘ/ăí@êÁ5‚n$v†]ÙښăfVÙi‰ˆŃK?–Bێ5=Šą‘zĐuA·‰Ž3)”«»IĂ„v9lXńÎՍŸ9™ÊĘÏ~n”ŒMT<œ}))Ê§Ź€ˆÒ’bŒ|üŸÿŒÔ5=*È9{’ÊóKđÂÚêÖűo_·D/朇Œćžçż$(4MU%|;SçŻAYyû’Űw8»6.căÊyúg!©ÿ"Ûwàì©4ÿŹ+çĐđvtìÖÏìóìZ» ‹ä|9„„Ś,{ìÍ_tٔ:ŚfÖ.goÿàzÖbôu‰ą Èș`‘†ŽĄŽïUÊËJY»D7#\­váčOWóúœ&ŸözP\Ëú濘Dš?ú•••h]$Ž~ÙO€nYStÇî&ăÄkÏćıœ/‹ŸŻ‰üc;'[CŻăx‡„ȚșČŃjY8ç4đîĘȊïȚ{ŒśžŸžÏ_żE;ŚêŻżlòxù (ppŚzęńʊr}Țźî5]”ee%FcȘæ|I2Nìś/_%+3EFßsßՋ\ś>ĂQ«]Mz0j߯č‚Féęóçl6­šOEčn…@^öYæ~ű”ćĐ9I7żĄv™źűă+NgE4Z……”Ÿ­);jÊjèžé„Dêzvo€zÉĄaY) ôź›ížq,…ÊŠrTj5Ęû^BL\!șò©ç»Û\:Ùèy6j°Ő~†Í”C§Äúc«ÏŐ7òŠ òxêŠÁÌ|ü~ûò5łÏ”§—ŻćIŁ6üźÌÙ.l$B,R]i5ôC6źűU_áwï{) ÉĂLźQ—LŒoȚș€żÊб7š€ûûçÿ±mÍșöÆÆćżèŁŒWʅÿy0ô·Ž€ÇźKąïĆ9{òÇít댯˜ńŽÙźnK:À”;_bó?óĐTUòÓÇÏđÏÂŻiß©'»6ț­O?úêûÎGĐíőÇŸ|ó>.›|GömbĆïŸê—ćëí{LŠûę‹WŰŒrăŠ>DŚ^ĂÌFÏ=Ž&>qGön"íĐN#œ†Œăű‘ĘœË<èșŃo}òăšF™|Ìah#yĐvnX‚ŠȘ’·„‡§7mą:p25Ăí`ŽŒFß#bŰ)Ì;Ç“0â*NĘKƱ<œ}čâÆÇPŹ)«_żx™ȘȘJČN„±ôښ t%EùFC}/žÈoܧś!¶s2Ț~Áç"#ùwŃwúkû_z•ÉwjűKœ! 0hÔ”|ÿáÿ‘•yœÍ«æóôŒ! șìj6.ÿUßĘaț™B…V±ÿ”"è‚!Ą iđ,w3ŸUÔt·sƒÙ4Zš†ÛùőĐîő€ĘkÔ]îFÿK§p.ó8k}§óźœ/æȘ;^Ș±opÍÀ‘ŚâăĖUż‰ù­O~JhDŹŐłÜ ŚăGÄ$pÇ3_âé­[{~&ă(›Węź[żü†Ç0â&L\/Ò)Ûțáęÿ»ŽEßżKBòP‚Ătoo;~d·>ï€țŁô{ĄgŠbË?ó8uüPQŁJíÊĂoüFBòEșăZ ÛÖ,ԋyhD œł6QkÊÛÜœZˆLTÜûÒ’ŒÔŸ+/+!ăŰ>œȘT*F]}/ŁŻčßl™{^>lXöł^Ì=Œ|žûčŻń Ò­ÉŸhìtÚvĐ-;™șŸŸż‰Ÿ?}ÿà0⻜t]è%EzĄQĝ?Ôo„țœĄżÁá$ôbòŹ|œFœ!æąw•Ú•ÿûpíâ]/Ë7o?́]ët¶û`Úęo˜Ț‘ččȚáÂF"tÁ" íÖ«ŽȘȂź}.„kïKè=|ČIśqő (/ż@f<ń Y™©æÙvsśàțWaʒ9ìĘŒ ­FCŚ>Ăvù ęŰȘQ€tí5œkï}ƒŐ Ÿ$ęđ."c»0dô4ÚĆśšÓ.čòvz«ûû|^ž^~LŸíy"Úu6ÊwȘé$$cęßßsâÈn*ÊK Žgđ˜©Ä&ôÖ7‚#ÚóƏûXòĂ,N„í'8,šÄț#éwÉd¶ț3ôĂ»(-.ÄÓۏˆö<óÉjV/üŠÂŒsŽïԓNIƒQ~Ć­$ïțV»Ôìćږg?^ÍєÍÜ”–Ă{6àëLûΜžhì xùű•yŻ‹&è–hȚŚEc§Ó9I·Ë»—țûô á©ÿ-%eÛ*ölZFVfEyÙxûÒ.>‰~Ă'Ő yTGšùö<–I·=Çê…_“qlíâ:v:Q±]ôéÜ=ŒyćëÍ,țé=Ž„lĆÛǟ.œ†2lüMMÙÂîMKʖžȚ5[ș^}çKÚ­Âpéęœö4–«nŚ}Ń»Zmô|&$_ÄęùD#{_t9ÁșÜ‚ fÀGŽëÄ+_odăŠ_I=ž3'ŽÜŠ-ÉCÆÒwەF“öú]2‰°¶șe€țAáv™‹…ùuNX.HTŠčŚ' ÂyV„9ő§kÌËTêăžŃ!äȚŽwç§Ś™ź:ûUó?ćë7tÛŠȚüűÇ\:é.Û [ Î·m5#vuÁ†Ìê»äÏ9ońĂÿt[żȚûÒ\žÚp# °Śđ„M胜ìŐc°\šĐ<Ÿ­‰ĐËXĄ[Š"êNdJ}Š%_ȘOFŁŐƜ¶Ú«+‘œšÁŽüÚÏú.1,#ĂI†v{ٚśÒìeȚˆDő=gŽ †ˆ  17Ûېf}/tŸ˜žPklԚF€ùŒŹqȘ• D [Č!b8™­ÁöùŽûÆ^fŚïێ]tÁtĄ^êšęktź‘XȘ0/»úA*ÊJđö 4kŻöĄvz1vÚúÿ›mް@€óGȘș `ü șï!2¶›uϊßqoeÖVŃÒœ!u]&z."cè‚E–î‡ăÙÖ„möńE»%jbìiŻ…Çî[zÜȚî>ŰË^ Û‡ûĂšnMg[p,$B,ӀYîÎԕiłVДcȘvł_­5R­ŚÛL™Úkeœ!–†Ă„ tÁ"őĄWc·îc+ié.sGnˆ\Hăözl±çϘș`€șP/6Ír·‰T‘™­>ŰfÊaÆímČŚ„ϘŐ>˜łoEY‡."‚.X€ȚYîÈÛ‘j«ˆ:¶Ž@€GȘÖÚsČa ĐCDЋԷS\KGȘ2ĂÜ:œ=R5±ćÀœ!fíŐŃ‘)͂!"è‚EêژE"ŐFdd«}ÛL™·çd‘Ș‰-gzÆ,d&‚."‚.X€źY$R”Ö.MâƒmŠLí9Ó3VGÂżÙP]0@]°ˆč]"Ő˜Őoc"§ŠTe㟆f!\`ˆ  Q0­4$R•HŐdXŠYy™ŹC A,b——›˜Ë·Ößٚƒ€UŹČ1·ZŽĐź]Îa°U™Z‡&ÔrÊz{ÏhțÆźș`€ș`‘șÆĐ Ï7s։Š üUt· č BËă© Ùk†Ń±æ–‘]0D]°HŁgč›ËÓÊc‚àHÔnű6ǰŒünCDЋԔĘȚ••ÌÖ…Æżïœ:Ÿ„—ߍ`€ș`Ê šn†čÔK‚ŁÓšśœÛ˜H~7‚!"è‚EjGèM5Ă\*&ÁŃiLŽlërJ‰ĐCDĐ‹ŽĄ7ćZh©˜Gǖ j]N)żÁtÁ"†łÜ›r-ŽTL‚ŁSï3Üëíćmk‚!"è‚E„¶ófąç‚ŁŁĐ›săùሠ ©=)ź1È,wÁ™QLțcăő čF~7‚"è‚EjŻCoȘ%9R1 ŽNcŸ¶țźdcÁtÁ"v™ćn7oĄőbŚYîV ż+Ą6"è‚EȘ»Ü›zł ‰4GÇŠYgÏá0Á9A,RĄ7śÛ¶ÁѰ%BoìŸąç‚!"è‚EŽulęj y/Ž,ż†DËöz”ŹÌ= AêĆnfXœŚp¶ćM d{ąV©9^”ÊŠÌż9WžŐ |ƶ@‰Š„Ő§W4‘§‚#Qß[ Í„7ÂÆ„n"è‚!"è‚Eêz9‹ž:*ą†V4M]1žòVßÿqmì &çÊ”ćü˜úOn{ˆ’ȘbŁsj•š[âï"Ż"—_ÿ ?>{è//J„ߟ]›ÖqÁa°¶áÛàÆźDÏCDĐ‹-[ł±"ČŠ{±)+ŠîIü:|QȚŃl9·‘Ż|ÊŸŒ=ôéÇ= qSÜmô À•+/#«ìŹțÚioæí~òȖ{›ĐCÁ0i”Ú©±kŽêŹ%B A,ąĐ<f4UĆ€BĆ{ę?#Ê;š·śœÊw?‡FŃèÏïÌÙÆśÇŸáóÁsžąĘUŒŚÿ3Šț;Q^­riǧĂdˆ»æšÎZfč †ˆ  iÌҘ†TVM%èÓ:ȚLżĐìÈÙÊ+»ŸE«˜Nż+Ӕqچ›é2€ńŃWrQűp֞ù‡Nț tđí@Œo,ęBr ?…ÂÊŁëc|bé:7”›Î­çXáłŸžš\H J&)š'•ÚJvælă@~ŠIșȚ!ęÈŻÈăDńq.‹ƒ5+2ÿŠTSj6_·șrŽđ0čć9t L€_è æ§°5{•ÚJ"œąž(|8ž.žŹ?»†Ł…‡ÍææNŻàŸÄűÆršàÛł·˜Üsžg1Ÿ±ìÍÛM„Š‚Ț!ęèۃmٛٛ·K_Îęâč(ìbʀòȘ IDAT4eŹ>œ‚3e§ÍÚìäŸ@Ï Țűčùł/o7»r¶Sź-7JÓŃ/ž ś`¶eo&9ž‰=X‘ù7>źŸył?E•…&yw 莏«/Ûs¶˜ęț킍“GœzD]0@]°Hœcè–źmąŽ áúŽ7đÒźÿłX™WńÙĄy!ù5ź‰ÆÚ3ÿđjïw5€»>ƃ]cŠü{f% è'“žç‰ÄçP«ÔúŒŸ>ò)mŸË(ÿXߎ|>xęCÿ#ęWÜ|'č9úcXĆČS‹)єp}‡X‘ù7“W1ë{ï~üqé2Țr7WĆ\ËEáĂőçŽfű’~\Śa:oö}Őy9šÔVòĐæ;™sìk}Z*îëúžëù*îjwęńsćY<°évțÊűClJìőŒÚûźÿśJ^é5“8żNús«N/cÊȘqŒŃś=nëtțxAe>ŚŻŸ’”gW독zŽafż˜sŃ=+<ÂĘofcÖ:ę±§“^dbÌŐÜČîzŸú+ ›ÿđöȚWyșNj<żó f„Œi”·«+FoäXá.ZÜËlùً&™ćnC3Č:D0D]áBŠz œ!ĆÆOSĐÉ?€œč»êM»?ô!ßùŒ^ÿ_íő6î.\ÿï•LX1‚e§禉Uc6ó=^âęę3čäïț<čí!\T.ŒÖç]Œ\ŒôŚ?Űí1^é5“9[”tkĂ+/Ł "Ÿï‡ÍgpŰP›_ ț}y»čbćeܰf2»r¶sIÄH6]Ÿ1Q—óâź§Ÿ€x·^íęŽŃő úšI1ŚđSÚ-JąëühÜ|'ažáü9b țƓ]T.|4đ+žű7öŸÄÇȚcöŃÏŃ(źNm&DOÂÇ՗ïSgŚ[~„!ÏzCS–~W‚PDè‚Eș§úšÖ€ż[áž”V•p¶ìLœéO–œt]ÎiEÇÈ8ìdI{rwš\sś†›™—ț3ûòöàźvç­ŸÿŁgPo~Lę€ÇŸ!Ò+ŠÿÛțšŽ—w=Cß8źjWÆLáô_őçÜčgă æûÆêû-єpęê+őKđ2JÒÙu˜xżÎLęwą>ÂȚžœ…‘Ł5–Ž~ńìËÛC„W$'>ˉâăL^5Fßuœúô Š­™Ä†q{xłÏû&QîáƒÜșn*Ú Eaî°yÄúvdà_‰.8ÀŽœ­LŒ™BbPO\UźT)ULŠč†ŃQăY‘ù7wŹŻăoŽ|FVÙŸ6Ÿ™ę>`Šúsj•šŐgVrÚ«ŒüXžč„ŃQăI J6úžźë0*„Š_ÒŸ·șmÚĘź;.ȘZÏoMhH„.X€IąsL?MŃuêـ܊\«ÒWwG»Ș­kçj-‹O.0:¶ìÔbâę;돍Š‚bÔœ]MőRžK#Fšœû3cŸU~Tł+g»Ńzúc…GÈ­ÈAAaù©%Fi§âĄ+Ł!aăăêËŒô_LÆĄSòö’’·—€ dBœR/æ[ł7ZxT/æŐ€„âąr!È#€Aa5rȘù+ăR‹Ž2$ìbŁîĘ9Ór™sTW¶†Ë#œąqKO.2ZčĐT4YdN‰Đ…ZH„.XЁ•†QÒl–ŃőRfÉI"Œ"ńtń€LSf1}ő8pfé)«òÏ(I7É3§"oo@ŚHèàÀ–Ëś›äQ=ön8 șqëüŠ<«üš&œ8ÍäXiU)Šą˜L0+­ÒM°S_ĘŃ/€[j Tăï ś3»ü\6«ËĂÜä·òZeŐÙż G ™œŸ#‡èàGß8ì7:^›%'’SžÍŐ±Sy~çh WÇNE­R7Kw;ÔĄ[Śł3\CÎ "è‚EŽXٕŰÈÍ2°ûžî„šR€“ńț őŽŁw L ćüőúšŻàźvÇÓƓ‚Š|ł‘e5™%ƍˆ‚Š|«|0șŠÖLôj+Ÿ?76ŸÛ ȚÍQą)1ú»öìwœM+f“{»úŠB_MuäïáâitŒ ÒŽl*Žürü{îì|?GŒ`eæRźë0œòlț>ùgœŸŰƒúÄŐÖÆź„ËDĐCDĐËԎЛhł „‰^Đò{úO<‘űw†Ś^]g:7”v} Àźă­ćÚrN•dâцG·ÜG•Re·ŒíIőR»ŐgV2+ćfł9 t0í|ڛèc|ÚpźÜșîò9GżæÎÎś3)æ2ŠÓéۃÏ}`4$ĐT(ÔĘđmʝád–»`ˆŒĄ ŃÖțŰkœöLĘ&Š4>=ű?ČÊÎreÌłÛŸ‚ź[üÿzŒDœ_'öäîdé©EúsUçŚp»4bƒ™]9;đtńd\ô•&çnŠ»]Wć‘îOۜż=šžH6)æjŁ%x ›„żvìțłÍd œ1ìÎĘÀŐ±SMÎuLą{`R‹ŽrêüЉ5ùíÍĘĆžè+˜Đn2ßkžîvš{ŹÛ–qskW2+N0D]°Œ âlëğР»üślœA趜ÏÇÿ|Arp<Ôűčù3šÍEüvÉbîö$…•ܶ~š~#€3„șȱOhÂ=#đP{4ۇWś<FŃđfßśŰfˆțű€ĐÁŒÖç]Úûv`C֚Æßl#ۖœ™E HîĂ}ȚĂó|7w {ośû€ dΕgŸ7–ŻJFq:·vș›kb§é·őnÇ'ƒfŁV©ù`żé„9KÌMę†P6<ĐőQöçïcGÎV»ù[Mč€ÓÒïJȘ‘.wÁ" ©4”$§ +Š„§1aù„|1d.7ÆĘʍq·R„TáąrŃÏlߙłëź3Ùćí@A %UĆ\{ŚÆȚÀíëoàçŽč Čż'w'l藦zżĂß#Ś’Vt 7”mœÛĄUŽ<”ía֟mYAxd뜄x†rGçû˜ÖńfR Ò%°;ź*WRòörûzó=¶RȘ)ć¶őÓűbđ\><‡“ß ·"›Îț]qS»ńÁwűâđG ÊóçÔčŒ”ü&îAŒłï5»ú[Ö<ö<æ–~W2†."‚.ԋ”•Fc*«Šź˜6[Oò‚xÆE_ÉĐđáÄűÄR„­âxq*eÌŻSP3ŠÓżâ&DO"Ä#”Œ’tȚÚû yf–Ă•kÊx}ϋ&ËŸ>ò)«N/crûkI 쁻ڃŸRç0çŰŚ&[°ÎÜśȘÙ-Lë"­èŻïyŃhW”j><đŽÙ႕§—R\UDZŃ1ę±S%ŒY6”É1ŚÒ/t ęâٖł…ugVóÛńÆÿ7ŸÛÀë{^dOžńDĂ2M©Ùûű1ő;6ŸÛ@±Áí6d­eÀąDŠuž™Áœđuőć›#Ÿłúô Ł™íœűŁ…‡9WVś«nϕg±5{ęBòSڜ:Ó5–Ÿv]nć9áÂC„(ÒÆêfÖ Űž^șÆÎiKwù†íź3™‹pĄâÊțIü}òOŠŻ™ÒlvĘ`’ŠaË ëÚßTçpxt”]Í ŒDè‚EŹĘŒÂŠèܠƒV„Đ\T.ž©Ęx!ùu<Ô|zèƒfśĄÎYî6æg’č5ê6æ-8'"è‚EȘgéօ­›e€qCAú‰„ưob:!Ąž«ĘùęűOŹ=óOłûPŚ3ÜŰÆź„Œäw#"‚.X€Ÿƚ(šM*&Ą1,<ń;œ‚ûČöì?ŒŸçĆńĄvĂŚ^Ę†Ű.lDĐ‹T/—©Ùì¶a† 4„ǶȚßÒ.˜ˆ°œ»MŽç’à„ˆ  ©kï {EÔúÊJ]ppȘŸÍÙە]0D]°H}cè`Ÿ%9ȅ„àèT?ËvoìZČ)‚. ‚.XĚYîvÙ,C*&Á©shȘ1yZiWȘA,RWEUœ–äHŚĄàè˜W{ï güçE]°ˆBgč[Lòœ›f蛡!ż)‰ĐCDĐ‹4yWąÊÌ1Ap@êćn ]ê&żÁtÁ"uĄÛ{ł ‰4GG?Ëœy4t©› U †ˆ  ©Ą[]Y™ÛŠÒRŚœTL‚ƒSę Û­±kEfò» A,R{ ĘȘÂlB˗Iœ$8:V‹k»mÚv™à€ˆ  1ŒĐ­Ę_ÚȘ|ÍŰGÆ€ûÛN]KÈïF0D]°ˆáNqöš<êȘŹ‚Ë'Ń«r`ă Ô¶Ś ŠÔÛͅVp/ÖИ=̛Ő;ąÆĆT§›!êA A,RŚNqö^’ŁRđĐ˜?gmæMX‹7·@ŽtCÄźæmÌŹÙËŒ‘‰»ÛĄƒŽŚ„VŒș`ś–Ù0Ăą­fèÊl`Ö¶ÛkäÛ¶ìâƒ9û¶Űj/ìiÎæööÁ–ûőv·Ń˜à”ˆ   ń”q–»šòœĐMfß6Sæí”ÀÛ¶šł!Òҍžđ"Á>6^(8%"è‚EÂęê™ćn©6"3[}°Í”y{64DZe#€Ž„-持íÏY˜_#Œ N‡ș`‘_áI€jŽ©ÚZ2,c}"E~±6œtÁ"ĄŸĐ= öœlű”N©:“@Ô‘Đ©"ŽűŒŐ•YN”˜àFœtĄ^źî»3êI$a?û¶™2oϙ"M8,Ó*ž±f6č— †§F]š—‹;ChŰy{û`Ο­öœœ!ÒÊf˜[mŻ »ńm`L·Æć!8*E‘­ „úIˆ;ç@Qyóٔ”ЍIԄöíiŻ,Ÿnéz™‡+Ìș"lł'8/"è‚ŐlK‡‡†JMĂźkÎ:Û©ą™5k™Û=aú`/{-ôœ©Uđò•0$źeì ­tĄAl8Ï-€ÂČŠ”#‘jóăh‘jciégŹĄÙ{čÁ“caxç&sGppDЅs*žž)™–Ó”t€Ú*ąA ›Đ{ٓ-j›„Ì;†ÂKWèf¶ B]ˆ  6ĄËśĂçktăë΄DȘ¶&jbìeˁzCąaÆ`Ę]ŚĘ.–A…V”S°țlMƒÌÈ.‚ȘÆŸ©BhÖÔőćčiäZąÿ;šûdÜ|ĂlËÌFìIK7D읔‹B| ÌúÄÀÀސÔV„\°tÁî(@Ičù·Ž -ǟ ç3őšIúżWŹȚ@żțöe­P7ujł |<šżQ$8Č]°;*t•“Đșđr3țÛÛü<[ÆAìș„AĄńˆ  ‚ ‚ ‚.‚ N€ș ‚ 8"è‚ ‚àˆ  ‚ ‚ ‚.‚ N€ș 8GŽaăÆÊcɒ%dg;Ù~Ÿ‚p ‚.ND\\7Țx#댯·éú?ÿü“çž{ސy ˆ 8"è‚àDšT*† ÂèŃŁY»vmƒź]°`W]u#FŒh"ïAhJDĐÁÉ7nEEEŒ3†uëÖYu͂ ˜2e Œ7ź‰=Ą)A'cäȑžžžP\\̘1cêí~ŻóÊÊJüęę4hP3y*‚=A'#00ÁƒPTTÄèŃŁÙ°aƒÙކb0jÔ(\]ćM‚àˆˆ  ‚2vìXęÿ‹‹‹=z4‡2JłfÍŠL™BUU•ÙëAp,ä}è‚à„ìÜč“^œzéÿV©TxzzRZZȘ?æêêŠFŁÁ° 8yò$QQQÍê« öA]œ”šš(NŸ>­l•Je$Ț†«T*zôèÁΝ;[ÄWAtč ‚“2vìX#ŻĘvŻ}NșÛÁ±A'„Ą-‚.ŽÓvč+ hòÎÁ:òóó k‚Fٱ˜N„RáççÇÙŹl™á.”P©@­ji/ŹĂ©~œ9ĆPXĆćPZ©u{ĐjŸËfp€ŐÜk#±Ë}8HaÔíf=ûaûŠ-^Ż( ę.Éț3-[š€Œ… Wđro7ö—VÚ·í‚^^ÇČ °ÌÌI©$ŹrÓAzœŠbź§Œ[ÍmZpdÈ%ăêt€ÁĂÇą±pżÍrŻÍô|7ú^ZÍoqÓ*ZșN)ŻÒ}ò€Ź"h~ž-ë“9ŸË=§Ÿm\śz«xđ%ún[Ǒ»™:¶gœéțÚx’6áM»\­„+㿀UÜj39Ń*îŐ4ô>Âü mP“žb3ĄWTÁĄł Ń¶Ž'őSïĂâ Í*§Ș” Ż =hĆ賙&łÜA7~—DHXTÓÏ9i†g\z8HŽYŻd€·y·Ž'58Ž <ŁuKޚçÄY"pé”+Í1Ô2đâq,üù óY+ /k—F±#VÊf±ąŒ[Ć­:KÛŰKÍ_ps±GæÇa=§ȋ[ڋœ„”,•r3Ó N žxl‚0`ŰXûDçZ)·V€Ni…Ô*sNæAlHËžS‡ôü]a¶šgĆYZËR)ەÖP)śx.źźhȘL»łŒ}üèÖkˆUșÓTÌÀPK+2áôœzæ&c·Ž+èeÍ·Î\f ·B$·Ú„—?Iœ/bçæLÎő2 •ÚŐșߒ4öìJkhìك œN),Ő]ÚŠÁqœŽÍ5Ιf‹J„lW„Rî;tŹyAȘ?wšJ$o^|ąQ €|ܛ&ÿ†à°‚^źÁâșYEÔƒ%VćŐj~àvÀ©*fG  Ë;€ž „Tk ŸC͏wLöš<;Xh&äùv7­Â™î„>jß«{7|»űÔ{]=›16+èZ­ćœą\ËęWïo>‡ÁÎŒÒƕČö›ùé…?„èÿ"šSOärŠ\»ÙgąÍŰPșŸĘčȚt­€#Îq_ÎąUtș„ 82ö~„#I0ú;šD;[çBQj‚GKŸÖ"7Ž+èőpk)aA°;?Ăœ™dôw2—ÛŚ€ 8 őŽ…VŁèÛćn…›ă‘7­ ŽŽœáŽôC Z4žăM;’ìlAœ ĆșÉŚ­Enœ"B—.wAšwŒ‰A·Ż»Nܶ=/ÍBí][ǧ”àž‚nX ut» ‚#ÓĂFń  îüż‚ ÔMí1ôș‚ÇÖ2Ä밂nŐž† FT y<[ŰAhę(8Vđè°}nődk*dA°…Šh“¶Ą‚mš wAp.Ș»Ü­IŚp\AŻ' —]Ì3’û[ÚAp ʜŚZĘq]"tÁÉiȘqč`Ú5MƂàdH„ȚLhek‚ BÓĄXĄ·VĐë‹Đ­y€ ‚ ԅčĘ\ÙZfč;ź ŚłțO"tÁёGXZk#ôÖò[uXAŚh-GᥠOk©%áƑ‚C‡ôæŠĐęę]P«ĄšHKUUółnn*||Ԕ•)”•éZ)ȚȚjÜĘUhZd|ÇĂC…——šâb-••ôŽ7’êïąŽTKyyÓßś…SȂĐ:Që‚ĂÖÒćî°Ëh”5Qșč­űìQÀQQnääô$77™'žˆh|†60yr ččÉ<ùdęÙłcÉÍMŠcG&·ïæŠâ껌Ś,ß{oččÉ\w]p“ÛoMLœšû.y$Œ„]±ŠžËè:1ŰäÓćŠ`ÚöőĆ+Ű>íùšȚ>tŒ‡ż .î*șN ŠęP»äoHh‚ęï‰`ÄË1txa=MEüš@: ji7ŹÆĆMś|Ć ńkr[&ËŽò­_#B7S öèrżńÆ\\TdgWqÇĄŒöZŠCÍxŽ+Vt&)ɋO>ÉjiW.8Û(œâă8‚ă=-Š)>[É/ÓqtyŸÍv>IŻ›Âű0y§wăáïÊÔy]8Ÿ¶€/†î”9ßÚď dúąźš]tӒv|s–ęósì–ÿ…Ê•ŸĆáàƒ6·Ž+VáîëÂÔy]H]•ÏW—îkR[æ"t•čYq­çô:Î7–[n ćđár~ę5—§žŠ`üű.ŽœâłS§Š2}zććMßșˆ‰q79öȚ{gùèŁ,**.°ÖƒČđȚc”æTóq%f°?IŚ…2}Q7ŸżŸŁËòlÊ?çh› ©,ŃŰĂĘ:öd[Ô.*–?“Îțy9”æUŐ‘ 4ƜΘіÖ€;l—»F[ÿ§1 êK§N,]ZÀ?èą€»ï¶n»LOO5;{ZʒkŚÎ  «}«ŹÔ§ŚÁùűšILôÂŚŚòŚë᥹[7OÚ·wGʀ'AŁŃÙŻ«·ÂÏυÄD/Œœ­ËT­†„Ï•AmŹœg//5Ę»{`­ž8||Ź»WW]»zbŸvČœ*‰ rŰóă9ŁÏŠOóËŽClțű4.n*zĘhûV°ÿŒœÁ§ś}žÌN›Ç?ڃÊ-kß<Éٔ OU4©=A°¶Ë]ÆĐISkÜrK(ț™Çž=„ìĘ[ÊèŃtè`:n=qb eeœčîș`Ÿę6–üüdìNFF>ù$ÆDŰ6lèž=Ę2ėăǓHOO"+«'ÿț›Àĉőúöęś(+ëM\œ±/3f„°n]ččÉìÙӍ‚‚^̝ہ6mŒæâ‹ęŰœ»ĆĆœŰ·Ż;iiI””ôæłÏÚăç§ș=Œ(+ëMûöîșPVÖ›Ő«xđÁ0ÊÊz3uȘńæ°aŸlȚ܅‚ęÂÂ^lÚԅ^œŒÒ]q…źŒ&Là”ŚÚ’““́ĘÉÉIfÛ¶ź$$Xî&6äæ›CX»ÖűžűĄaaÆśœ”äĆÒ„(*êĆȚœĘÈËK&%„;#GšŽózy©™5«iiI9’H^^2óæĆŐÙ uć—_:RTԋ””îœ;Ś“C‡=ÚțcÈöfË'§ˆ»ÌôčS©!<ɛīCô@$]Ż &8Îô» Žó€Ę@?ÜŹhÀEőń„ś-aôœ#œ˜!~žûÔß°òv§Ę@?<ü\š,ŐŐǗèșńÓ :Û*D&ûĐû–0üŁ{•|ÚžŃńÒúĘAïaŽꏫ§±ŻźjÚ ôĂż­îÚàxOúÜNÜÈ@Łûò v„ÛäúȚNdČO>{č72śFĐy\ȚĄnFç«ęöŹőLčzêühÓŐË$ÏĐÎ^Žè§rš&Ș/œnŁśŒ0"{ù 2ó5„'yžäJGĐăúP<-7<#“}h7Đż(Ó^:sšÔжŻ/ęï‰ ńê|ĂĘÌŠS»šˆìGßÛĂé9­ aĘœÍŠ«Æ3ЕīCHș6żHËŸT?œn ŁŚÍaDô°œw}Twč7eđhO¶Ëœ)—­ùùčpőŐAdfVČlY!łggóÖ[ŃÜqG(O=uÒ(œ‹‹ ïœŚ• xàéé\sMwȚنÀ@Wź»î˜>œ»»ŠŰX–.íÄ_ćsÏ=鄇»ń ‘üűcG† ;ÈæÍĆuúçæŠłgŰđŰcáŒùf4'OVòÔS'ÉÊȘâȘ«™:5˜ž8†=He„Âć—đÇńœ{Аz(ÜŹ@‡„žČkW7""ÜűòËsŹXQ@X˜śßÆâƝ˜1#Ùłł-ȚG](ŠùM,ì‰O˜źÒ­(2î.ŽśdÊ·h7Èx⑱… ïbńÒôdž?m4†n7/5ÓțèBÜHă†Cá© æßv”C‹sëô±ïmá\ò|Ív”wlHàYŐz.~ș-}n g:ż *h5 oFn„$»’!ÿ‰bÄ+1žz«ÜčC„ütőANï.t†;6$±ê„„tòąÇőĄúŽ%ç*ùžïn"“}žöç\ÜuߊąÀȘO°êĆFyśœÖ†Ë?ìh$ÖĆÿ'­Ÿ ~TW|ǒGÓXśö)}șÎcčțś.źäÈ-FùȚž€+ïtÜ@›.^\ùYœÉäĂôu…ü>ă°QÉ”9Q4 ûÿÈáÒte™s€Œw;m7[æCoËš7ړ±čˆÙŁSÌŠ1dĐ‘\úRŒÉ=/y$-ŸžŃk7Џ+>3Ú sű㎣źÔsóR3ù›xș]ąoÄh*ț~<ÍŹțŃîLù¶. 0:~hQ.ón=b”wC°&8l%șă zSŽĄ_{m>>j>ú( Íùm‚Ÿû.‡Ś^kË­·†òüó§šš05ìB)ì߯û!-^œOe„Âí·‡òśß!|ęuMĆîë«æçŸsčöÚĄ_ŸŒ€șóÛo‰Ę«·]‘‘nŒòJ[rs5ôîÂ!ßæ IDATÙłș±ĆożÍfÊÎ\z©ăÆđÇy<ńDj5L›–Êš5EüđC_|qŽĘ»»1iR śĘ—NVVłfćĄ‡ÂQ©\˜5ëlöœœŐ̞ĘEQžűâƒlÛŠ«$ù%—ß~Ëeóæ.|üq ‰‰)”–ÖŽŽââËÎoÏçÉŸÆ1üÙhv|s–Œășgžû”ŠÌéDÖțR~ș&•Sۋ ‰śdÜ{žòÓ8ȘJ”ìü.‹ s™đ1th$èńŁułÍ}#ÜëîÍÙ}șßRX7o‚:xČ~V& »©ó»Òً^É`Ç7gQHžȚ†áÏFsÛżIŒŚe;eù5Ï]pŒ'?ÍÖÏÏP–WE^șù!‹‹ӉyúșBŸ—Byćg7yzÆœŚŒŽr~vˆ“ÛŠˆêÏè·b™đQç•‘ș*Ÿ07Š-è‚g€+‹Neßo9žûȘéwï$h™'őڅöüòàńïw ńšP,ÌaùÓé”ièsk8cßí`⃫‡š[W%ëÁÊçO°ó»,EĄçÔ6Œx9†éuă“~»PèY»l­”(șC șaAŚŽd3œș»ę›oją¶3g*YŒž€ žêȘ ęžș!?ț˜«ój^}5“ÛoćČËüà…NꝞ^Áœ99Ü~{( €€X7&9aBîî*Ț~;K/æŐÜuŚqzőòfçN]ĆpçÇ sӋy5{ś–ræL„ŐcˆôêćMlŹ;?üŁój¶o/áÇs™6-˜‹.òeÙČęčE‹ ôbșϚ5E\r‰ŸÉ0AmƏ8ß+’„ójîŸ;ȚœœÙŸœ„ˆ7 òaóæb#1ÈÈšàęśÏòÜs‘\ye Ÿ|’Ɛ!ŸÌœyÆšAuî\|p–^ˆÒsuU1cFgÎTšŹÈÉ©â·ßòžęöPƎ àûï[n6ö șą1˜Àèâź& »ŸűĐâ\țy©&Êl?ÔÿvîìùéÿŸ^Óuî`)>an }ą-1ƒü$èí/òCS©°ä±ăTßOa˧gđq#<ɛ€vœ;XjöڱӕźDSĄ R©ÈÜiÚ ±čˆčW0:ÖcjŽU ón=BÖ~]Țæp|m ‚MzÔn*ŸŸx€Źșô™;ŠIș6” Žž,țOëßŐęfÓŚ=ÀśFŃӇŒăćžy©ûN,ć…fN!ÿ„îÙ.9WÉ·cRxât?FżËŸßČ)D&ûM6S7đ1Yęß ÚőŁË„`șLŠąHĂĄĆy쟟Íțy9V‰‡%j‹I5îŸ.ôœ=œˆžȚDôô!<ÉÛh<œöČŒ4Ób”o…™Æ]Ԇ €Nșg óŰ ž8Ęό/j}șŒÍEìÿ#‡/Ç?:ˆĂKòô|xqĘ'{qj.ŽäÇźïțŸœó ‹êèđ»,œT@AQì%ö%šXŁ)&1‰É—Ț4]ÓMQӋŃDÓ4‰šÄ–{oA, ‚ˆ ÒA:,{ż—œ°ìҖ]Zæ}ž}”œsçœč;3çÌ̙č)ŠqkŃفąœ@^»Ÿ~”ÏöX©Uz±ČvnÖÜôŸ? OÍÛ:«kô›ž”•ŐôXăùê–"Źí­pś·'ćl%FbcÒc ЖHŽ(@ùtwRŸŻˆÎ‘*W|߇»\Óu%șß§6Ôx„ȚH†èMÖ —HUÂMĄ[[«˜=ۓ’‰©Sc•ŁVË3gŽ·ĘæÉŽà‘GôƒaŒa{{+ŒŒŹÙ”+»ÚŽ~„fĆŃ`UÄĆɍÚŰ4””” ookб±Q±ysG|}myăküö[ùJđÙüù-k”}MÇ„KČ|__ăšŸŸUUSĐ͖TŒfčÌ­[ÛpőjQ­u;sŠ€Ÿ}hÓÆFo9ähöò\Ÿ,;e‡ć2fÌù:”Æ8–è# ČJűóQ© ßĂ>ÌZߙ݇žFSX~J^ĆCè8F60é1ÄîÈâÒȚëŰ蚻ĿÖrł.òyßH:ś ôO:ó ë4/șNó"éT«'ž%3ÎpÆŠŠf:‡Áă=˜±6+ŠrKžz8‡œï&żï:ă>  E°a_PĆzqu¶î€Œk'sča|F ûš\'“"óȌ+$hŹ;›—ÎÉžX@ÆĆbțÎ$p€mz9á䀕Z„7 aë€FSĆńĂ%Ej[*5ò»ŠKő/4âDƒlôą~O'ńD.Ă_jËÄOùqjtŐešZń·¶·BeE„:k5R X—ÆšŰ:ËÏRS`˜Ÿ€HÒ«Ż Ïçi«”~0ĄW™2B?Ț oo¶lčÎúőÆÙHL,æ¶Û<™3Nj瞻Jnn™:±|č~ú!CœQ©0X[vv¶",́ÈH}Ă=tšŒ†[1}UèŠéûöubőję }û힬Zćχ&łn]mÛÚČys êGêûúÚ(ëçj”JY?Öj„jśÓëäáÂâƉŚG’ŁpuëűæàÜ9čóïÓÇÉ Š|Æ VŻ`ùòd^{-I’gUŹ­UçńWÔíĉ<îșˋaĂ\ zŸ>ú۔.]*$?_Kż~NžșȘ•Ùsæx1`€kÖ€łwŻ~ÌBCłć©K wĂŻŸ >`ęœ1Ê”žhCÇ1îDÿ™Áow_ 7„l6©ïCòÄ*uígŠrK8ős*§~NEm«ąĂHw†<ïKûÁźô›ïĂÖ§ăê\.ÖvVLÿ±«'žćüæLœ‘ȘSKّłČVQbÂ2“1Ò.ÈíàZDˆ©&”Ìٍé űŸîțv săôZ9n'f{فÀ‘îŽîîHqž– ÛÊú€Ž Žé鄭“Ú`[e%œó345.[QN ?Ü*đÎ=é2Ƌ°™-ˆü1”ÊûÒKË\ÙvȰ-ÈI*æâÎ,òÒ4ž9š ÀÙÇ”­ŠœÒx]œ„{{Ăć*Okƒ] é1Ž udëÓq•:-ŠĐÔÖЛì>tĘ]ù˜aoà=śxr€teDDäsìXźźjƒ}ŰÓ§{2thY ››šĆ‹ć Ș „%Kü°/·vêT†uaïȚe*ž&üùg11…̝ۂnĘÊFvv*žxB>w|íÚ ĆH‡„8èm9ł··âÛoôîӑ’ąÁŐU]ć-‡çČwŻÌvŚ]^zŚæÌńbűpΟ/4«QÛŒ9‹óç čç/œű;;•rÖúÚ”€Šjűî»4:t°ă„—ôŚĘ†•őÍÈ(Qž?ÿÌâúő^zÉGà`{æÏŚ?|E«…e˒qsSłti[œ©őΝíùìłvÌ›Ś’”Óf&,9§)ÔČnöyމ^sœőÖ[Û ’œ}KôŒ9ÈێlìkȚuŰ8Xqÿ0æG„ٶ)Û~tns۞»@‹Zœ=P|z8aëŹæòląÿÈĐ3æ-:9(çŰW܏^’OćĄŐHOđ0Ű_o„VqŚ_]xűd8Ț]ËêkÔÙòŹ/önjbÿ‘ ŽćP©ĄÓMîőà¶LœQpâ č-u»œé:­j[q»Ż\« ­FR>żĘs­FbÂG•î%Ś‘[@av Ă\ Î!hÓ˙é?vbÔëíJuÎƱ…Ń”ęđ;ä¶„Ó9ń„lĐĂfx€Ő­——'ńD.*+è2Í0}یB/ÎŚRœ§„u7G†,đSŠSí\Őôy@ń_ŰfȚ#•Ż—–ĄĘ@œQž»żł7…(WéՅìÄ"}| W_[n]ŐčÙ8Z1rQ[:ŒrĂÊF„DźƒlÀ 25ôœ+;Ą:ƒ.i!vÇuÚvĆȚMÍÙ ú3o;_AS eôíôöĄ·éćÌMïûËç|h8[VÿÍeÏ;WqôČææÏÇé()’ŰőúœZÚpóg°)2wkgÇèRCźÛ{żęĆx$ nț,Pï0™Ž7ș3tĄĆùZŽ|*Ìe].äÄȘdüúč0rQ;e–°u7GFżah˜wŒv™’"‰1o·§ĂšČ}èmz:1áă@Üęíˆß[sG‡„‘ÁŁ‘d#±çM{ÊƜÛÖúősbߟvîÌ!Ż’ę°:Ÿÿ>©S=°Č‚öíËFq˗'“‘Ąáî»[0r€-[¶d±n]ŠŃŃ9@ߟgyûm?n»Í“űű"^y%ŻżNćêŐČQQrȆ]»Č•5c€Ó§ hÙ2[oOś¶mŚ ?ĂkŻ”ĄO'Œœ­9}ș€>JfÍč3(.–žéŠóŒń†/#GșđđĂ­8u*żôМ$&OvgȚŒtïî@|éŐÇżŒJ%GĘëFé—/±kW¶Țv±ˆˆ|BCOóÊ+> ìÂÀN;–ÇË/'°bEWź”êÊdГPÌź]Ù$ÔàXÏżÿ–ËŒhQzś–Ë|æŒ~™A^& ;Ă…­čńFWgΰdIß}—f°›àŻżź3zôyfÏödâD7RSć=ù?ę”ÁÇ·UÖćAȚ­Đ·oO<áÍĉnÜq‡ZvîÌaéÒ$¶l©}'ąŁ>:‰Ż\ŠË/<;Ű3rq;6?~‘œï^%lf úÌóŠËO’ÏäăÓĂ m±Ä–'ăóź?ž”QŻż/†yĂńJ[†.đ#5:Ÿ–!XY«8œ.ă+j}\Yń…û*‰^śzóDl/źÍÁȚ]M‹NDmL'ńß\șLńÂ#ĐÎh`™©l);șLń"xŒ©ŃùŽvÀÚȚŠëW‹XsóYœÁ†V#qns&ĘnkAÒ©OâÄ*9òüòÁl¶<Çè7ÛńđÉpRąò°q°Â#ÀžÂìÖȚvNo‡Á†ûcpooǰüèsż79ÉĆŽ uäôșTƒ·Ă„_(à·č˜űq węŐEƓdN’äß%úÏÊ/ȘŒŠ6漒€ÆŸW;žZùUüSRŹćó;Oԋ.SŠx°n] /Ÿ˜`t č"ǎ…Đł§#jő±&p!š_žń·Æ6źò«Łÿ#>8zYłïę„*ńëëL§qhK$öŸ›€Š@‹«Ż-ęńĄeˆY%$žÈćßo“ÉKÓ0àQì\Őì~ă*Ú‰Éžű„;qűÓkä$căhĆàg|ÉŒTÈńoʶÙ»é"ΝpđŽ&ùL>Wesæ—ŽÍš |Ì•Z„·U«óDOÚôrâÈIg»«Tò,CÇ1î8¶°!ùt1eów>áò+_cwd·ë:Ö xԇä3ùœúYĘžçĘ­pooÇź7źè­Iûöq&xŒQÓI8źÿ;OđÀš-;;—VÌćƒ9ü»*Ùhđ˜.ŸÄső‚ș\ęlé}ŻlÈbžŐ ÀŐŚ–îwŽ€uwÙáŠĘ‘Eìö,ƒms}hł·Á©vșçȘ¶łbÏÛúq5șg”ŸźQ¶ÏUEđGžáŐɁ̞BÎü–FìvC§ąE°]§{Ńș»ùi.îÌ"æï,ƒć4GžŃùfOì\Ô\Üuă+’üŒ/Ù‰ĆŠłPț™uŸŐï0GlŐ€Fçóï·)zł"”A3°…u2űŸâò# œálœÓd ú?WoĐżŒ[tAÓć™öÖŰ^2Ę  ‚șĄۂüG zE țÀ 7Ù)wKl[ą  ‹.(ź©Đd ș¶š]Ÿ?Bvv ŃŃ5ȚgWTăWr ț»ƒ.4,ș žjÓ5’ÆÚd zcĄoÛvÎOWŸ°”)Sj¶GU  ‡ĄŚŐęڄ~À(Äëț«Ôx„nqMjFÓ5èFFèȘ Ś‚ŠŒšÂAĂRăz#iŹMŚ Ą—łè"(N uĄȘșȘBșÆ@“Ì2zB\…ăù‚ŠŒ„m©ÁK7òrcŸò'Ç5šŹA7zŸÔ8Č@Đxű‹„ ­„@Đ$НWĘRDčŚ'hîXąžÆ9≠ƒEˆNč ÒŁO·+ŚŁ6ăÒQß 7—Nț;Î^Ł)f3ïSB}`Á8hïYJÔ•$5–śÄԝškpâ2œM”ÿœ Ą5jY;+I⟅­(ÊMĂx„ÂÉ;˜Á ÎZP ă4dšȘłg MDÍj©©Łg«†­ ł7„ű@ż°j€ĄYt@ Ï‘#GèÛ·o”ébcc h íkÀ,4ÙŁ_AőlȚ\őt{mÓ ‚Æ‹0èA3fÓŠMšj0·( ș@ĐôSîA3%55oooŽ58ŒÚŃёôôtììɥԁ Öˆș@ĐLÙ¶m[Œ9@^^»wï¶°FÀ’ƒ.4S6m2~Ükeˆiw i#ŠÜ‚fˆV«„U«V€§§SYW©TÊ5•JEpp0gϞ5šV 4~Ä] h†9r„ŽŽ4=cîîźÿŽG{{{%`N’$ąąąˆ‹‹«O5] h†Tœ>śööfńâĆzß-]ș'''œ(x1í.4]„Aš!ć ł··7;wîÄŚWÿàé°°0¶mۆ“““ŃûAÓBt ™‘’’ÂŃŁG2cȚčsgŁi À_ꅋ‹ Û·o§°°°ȚtæCt ™±uëVŽZm”Æ\GÿțęÙ¶m...äćć±gϞzÒT ˜aĐ‚fÆŠM›hĘșuŒčŽțęûóŚ_áææVëín q ș@Ќ())áäɓìŰ±ŁÆÆ\Gż~ęŰșu+ûöíłvÀ’ƒ.4#.]șÄșuëjmÌuô릏e˖‘––ff́„±nhù Źsęúő3ƒ& Ÿ#t@ 𠠁@Đ ] ‚f€0è@ 4„A  ș@ ÍaЁ@ hˆ}èÿqŽ;FJJJC«!šNœ8ĄśśÁƒÉÌÌl m–ÂÛۛ=z4Ž‚@%I’ÔĐJޱcÇČuëֆVC ˜‰I“&±~ęú†VCЈ)w@ 𠠁@Đ k腐>ù䓆VC Ԓ{˜˜˜†VCĐÀƒ.Ppuue۰a ­†@ š%ÎÎÎ ­‚  ŠÜ@ hƒ.A3@t@ 𠠁@Đ ] ‚f€0è@ 4„A  ș@ ÍaЁ@ hƒ.A3@t@ 𠠁@Đ ] ‚f€0è@ 4„A  ș@ Íëú3r: IDAT–_ ™ySĆ% Ń‚VȘùę*Ë©V{9RŠȚÊX*höü—7ęÜÜ=9•PO P«ÀZ 6jp”W°n¶@ 0z1èĆp1 r ëCš>f1&dÒTœĐđz—˜Y¶P՗  (*}æYù@x9Aw°jäć–$Ù9/ԀŠÔAo0šžƒ]WʷۂbžšÙpșüWQ©dgÜF 6`oÓ:H’T‹1ríI̒+WmFâÆhîÆĂlb›±óaqÙæc&A¶ÖĐÖœí̓Ÿ9)Ô@B&dæCI-Œžšă”IT;źÄQ\X€Ł“ ­Zûš_H)ÍÙÁ6'vÖàîȚ.őśÌ,fĐ Š!&Č+ŒÊ›{ĂČ`¶†r„óa1KęiáÜžFëÉÙŸ.ÎëQÇ-Gc©ă–€18vÖĐÎm-/Ë"œD WdOŸźˆ†U›Dk.Yąc6/'hïeŠÌL€H±©„Ë& êžć6`FÍœ4W¶* „ űžY¶žXÄ _H€ë™[H%4€GÖPëőf“m.9ąc6MnŚ:¶7‡zSEŒ"8• ;êąŽŚ$…äšKNSï#MÌš1ÔG[èämčßÀì=#N›)RZ4, Ên LêŐ0Ś9…䚀șúÖŒ$ÁÉ«Šފ:nYšS7*§ÖoWđs7G憘5Ê]Ł…è$Ă8SŒ^6Æ2©Æ1‹Ü`êšŐźTœ•Ń„çočĐüëOMd•À„4èĐҍL'>Č D·€\hțu\ԟ2źe»ƒe^ÍjĐ2Ą°ŰđûæȚ° 䈆eșl#4śúc «ęSrä9‡zÚ“]—ÓeĘD7Łl#4ś:.ê>±©Đ”ùƒ]ÍjĐSsôGçąaYPníE—óoXu’mKڟŒ\p°Đt]Eą“ DuŒNČ«AÔqËɅÆë|äÉ`?šëUÌfĐ5%•§_NѰÌ(»ą\S䈎ÙtÙŐP_ő'=O„[šÜ"ùĐš{ŻŚ„ QÇM—] M­„Æí|€ä4bƒž_,{ó:DĂȘƒìjhš†%:æZȱPęÉ/Ș™>u„âl›Žzs>ML$êx äÖ^„q9ą4]6r[Î/6ïšÙ zŠÂ茉4ŹJŁ(›JĂ2QŃ1§±wÌf8ÛĄ&dÿ šJoL•%h*uŒÉś‘•eÔœœÂFjЋ5æóèĄțÖq:È$ÙŠ‰ł9äV„ŃZ~ûZ~± ń0FhÌSžČMžÇ@V#55–ŐûHS22EvíE "Ż f3èæńèĄêóÈôȚ€&]àƒïĐÚ7@čv9.š§ïȘü}ÓŽû™óÈkzÊ<ïhâÎEđțš}űŽíP#čUQŸŒŚź\ä±Ûćžô~3œú…AúŠ0d »¶rțCsäŃ=<3śF$IbŃÇëé;xŹér …Ćúő­9NyÈź­œÿP7«Üđ_©?E”xVM0ŸA—,ŽÿŒŸț8ægț=@«6JĂ:¶oiIJÚC»ț`öĂeœš0ŸÈ#»ĐhŠqóhIkżuêŽÀ°ŒFŃ!';łfNŽhXŠË6B}vÌ9ٙ,[ô0E„/Æ())±ü+ëÁ()}”±%§<ăΝâôńœŽëJXï!zŚOÛĂ„ §KïW1nê}šŹÊŠ&2RݱûzZ¶nKߥăËź†ȘÊqx—/Fƒ †ŽŽ‹›§ríżRÇëxKŁ4ŻH╋DG!=ő>~‡őÁłEëjï«KYŚ—–UÄŹÛÖ*VpKĐžƒÙčéÎFdèžÛčÇț­—66:‚ëY8»ÊĄ„Ń§ŽĄŃÈs]z ¶È”ąȚ30æäˆ@ÓeWC};1QÿČdÁĘÄFŸÔË«6ù™mJŃÌèÊaɘ‚ÌŽd–żö ]{áʕ»ôźùȚ3DETțîÔ”/Bz(ŰùËJïżőÎ'è3dŒ ÚV]Ç·ź_Éߟ $| NźžSWŒ„nČ«A8Űæ—«).b髱uęJŽ%eCf[;{nżÿyf?ôRíäÔBsŒnÖ)wńČ€ńí9XùTÄEfI‰†È#;ćÛŹŹŽZ$­–ÈŁ»é?|RiúČÎĄkŻ!FGç%%Š °wtźRŚòȘiŠ‹P[Û R© ¶íUiđŸ—ƒC-dbc[ę‘CÆÄæckWùáć–"§ęssČptrEe€5»„žHȚeLśŠ9`mcƒ••șR]urŠ (..ÄÉ٭چ%Ičٙ88č V[•mŒÂ‚<>~ę¶­_‰€ŐhMœî†ì˜k‚¶ŠŽItìÔ­?ÖÖ6h4Ü?u”b”Úr}:yD/}Äáv.3èÛł)ŁêŒ‡Táÿ••M8Ű&ÊiÎÇČEłù—Ż•żíì),ÈŁš°€•Ë_ÆÉՃɳ1.§ŽÎ‡čÛłùBk€Č Ż5áŁ3~zÉđÓ6°‹2íAaA>’çN&/G~#Ìđńw(jEȚĄÈˆ:YÖ„öȘtZ’ęö ÿ›ÖƒÉœì˜Ú߅»F·ćgn#-9AO~RÂ%îăÏĘcüÙűęGŹùôUf òdÖđÖü¶úC*ŸZ'{Ûoßpwé}ĘÖ—Ž”kJžiɉŒőÔ nҊ©ę\˜=ą o>9ôri$ öțő wńçź1țœ<ș›ĆOá–>NÜ;Ÿ'nŻôÙ.}ù>îăÏü©áäçćČìŐyÜ1—[ú:sÿÍ!ìÚü“Țsżx>’»Æűsçțü”á[ŸxçIŠpgÖ_¶üò”’łŒőÌíLîíÄÔțîLéçÊŁ·őcï_żê=[ʧžž˜ŐŸŒÊęC˜ÜۉIœ˜3ș=«?yUùËŚŸ?~țœy“»2č3“û83ZOvlúŃ |™i|úæŁLܒ›{90„ż;zŰńÜÜQDĘc Ç?|Ï“Ă˜nÇÔžLèn˝7đĂoPRą­¶źŠ$%°őŚHZ-íC8ò–òÍÀhœ­ű1È#ŸJäŚREùÆô«BG„]Wń±”s€CHO@v’.FŸTžMÄĄh”ú ŒćÛČV‚łP©T„ö\ęsÇđSțć©mùjőûŚàcLÿúm¶2ščț˜ŁŒ™il^śÎ.î,ÿń_gá{?)żû_Ÿerę©Mę2fĄ[>RXEçđ8ČëwJ4Ü?}Œƒű·ÜtûÄYqâÀ62RŻyd‡’wt©AwtvĂżc7ćGzïùYìȚüœž”Ô€+ìȚò#ÇśoeÁëéÒK^ß+ŃhHNŒÀÖ_ż$îœ<ĘZŸ‹ł«§Áš_’àām|ôêꔔhptrćùśĆĘ«5Z źÆEóÜ]ƒÉÊHQîKOIdï¶”œ:¶›7żÙoûNȌŒ\’dٟœùˆ";!ț<-}ü+}†iI$'\ÂȚ!•ççŽàÜ©ĂÊ”+Łxû™™€„&2éŽÇ(,,Täüșê=ENzrnž­ä2í߯ëßJA~ź’W~^ç"óúăSžiÚ<æżű™r­žšgîÄùÓGőtKIŒgÍ'Ż}ò/ôV„k€K_žË¶ßV(éŠ Kˆ9{‚·Ÿčž §˜óÈb4šb^™?AqÖTVVX[ÛP\TÈż·sæÄ~Ț_s€€àîlYś%Ë_œ_ÉWç']cŐ҅\ÏHăŸ§ß3ț K‘$ppraüŒčꁗűù«7Ùżę7 f ”Î^}͓šŒźĂȘ«ĐênëÒkё‡y -°łlàO”kÏ­|ړœx‰ÓÇvSRR‚••šÜœ,.Ǟ ]‡.8čz–=w$'\âÀö_Ičv7–ŽêJxÿQ3RgNì%1ț*•Š‘7ßÉțżć™ctí=„n}†ë·)©ŹŸŠ8Ž”k—đhњ^7”BæslïbąN V[Đ©áFcïà€S€ęÿJ^îuÜœŒéÖgÛ7~Kfz2œnC§°Ÿ†ÏR‚œëܱ— ÚŽâÔ±ĘDى‹«'Ęû$ S7œû"ęCÊ”xllìzÓLvmț‘˱gèÖg8]{Qf§4ĆE۱‹Ńh4ĆŽ ĄKAŽiڱÒßïlÄΟ>JÒՋxx”ŠKÏA„öh4mlT§Ží!9á~țíqí:„M{dś&bŁ#ÈHœ†ƒŁ3­ÚŽgЍSőbt\»Ëá]’št…’ n-é1`șôźToçNĂÆÖŽąÂŒœLPŚŸ ‚Ác§ăśŃK\čMZrŚł3qv©úD'Sf>ÌmÔÍŸ†ź§Ÿ…ŠƒB{ æÈźßyÔĘ9|ÿ’;W–ŽïNXߑìȚކKç#ÉÊLŁš ŸŽä«„ô„€Č ¶ęú„b̝\}ë}„„ßÀæŸ?!âĐßä\Ïàƒæ°ü—SŰ;:ëęqçNÒ60”Acf±ŸŸĂ'“Y.(IžExëÉ©””h°”łgáȍvî©t _ŒęšbÌ§Ę»€!7Ęαœ›Xóń‹dŠ%ńĘČ<»dò|ËËîȚoĂ’|ő"Ț~ *GEĂQŸKÜùHÆßö0ƒFOcûƕüłń[ŽÚÖ|üCoș7ÏVzżQÜč“vîAÿ“‰>yđcÈÉÎbÉów(ÆŒ[ߌŸ9Ÿè“ÙČösòrŻłyíçtí=Œ!cg°nĆۊ1î֟isŸÇÖΞo>x†‹ŃĘ»™ƒ;6ÒÄd"mWŒyPŚ>ÌzèUŹmlYęыDE`ĘŚo3âæ;iÓ.ˆš“‡c>ûŻ3iÖŁšŐÖlßžŠ^›‡” wlÄż“lĐ7Źț€ÀÎጎüwZxûq%.š—KÊ”Ëü{h;U/ExŽlĂÊmńJŻŹÓ·Ô6·ú@ȘcR5íÜB{ æŚ•ïòÚMÓàāżhJߥùć›·ÉÍÉâÂÙt íMtäat/ŠìÒkˆȚ’ÙȘŸcĂê –C|ęƒy|ń*:…őSŸÛúËWüłqY™iŹXò$żŹ|—o·'êĘŻsÖțłž7Ÿœ‚€ŐâäâÎ[+v)żé„ §x癙ÄǜֻŚ/ 3Ï-YKûŽ]]W|ű,‰ń ÈÖ_żfÿßż°wÛZ–ÿrc$'^æƒîàö_!òèNe©ÀÊJ͝ŸÁ”»ŸQŸÛ°z)‡vnÄÙՃű˜3üű…ì ÿöʇ|ż+••5§ŽîâĘçf)}€kkfÎ{‘éś>Ż~€ìŹt>^ü {¶țl cŸÁăXđÁ/ŰÚÙòoòíȅüòÍ»”觕•š;æżÊôû(KuùčÙŒpÿzł©:>{ë1^^ŸF+ßęșê=V~űŒ„ă›ŸgäÍsxbŃ7z”é9đF6Ë'7;•ÊJțm$y ™– €“łŽNnŐ¶ÛÚ6K„Ă˜wۚ±/Mȧ::ś([GŽ8@~nŽ2úë3PŃœßhvoZƒ$Iœ:șK/Ű!ŽçĆùŰ»UžZQYY±xĆn„ăï;âŸxă!¶Źę””ÄKlûík&ÜțšȚ”ș••šgßû_ÿÎÊw™©e=-ù*‹O~n6j”5Oœę3Ą=‡*ćŐžhNìß @ÇĐȚÜ>ÿuü»pößęÚ±žÛćÚćXŒęőžM‹ÖmyaÙÊŽ±çŠ«€ćŻMżïŠȚ»€žC°spæÏ–“Ÿ›Ížmk7cŸ^míìyaéFŒŒę”ï"vÿ©8!cŠÎăĄä‘xÿ·2lül›Ń­¶„ŐœÈ 1ČAß°f) ;MŻ|șG'Wæ=ïÄÆŐÜ/o?$`ciZ€»{›°>Ăžç žčóJJ4Źÿö\ű 9Ś3•ŽGvꁻ§7œçÆ)śÓkđxŒZùeÆI—țڕ‹l^û}‡M$(Ž7ïÿp{g„ȘȘńÚÚ9bkçšäY>©n*Ńà‚ê)ŸÍ$tÆËÒë­ÁĘocO$‰è“‘$Hœv™„KçèȚoĘûæ—oȚ òÈN:„öVÚ;@—^emjĆ{Oóûš•k~ION /ś:WăąY0w8ź M» EżyÿiT*VVjÂûÆÙÍK?&F‚蓇XòÜíHZ-vöŽŒôŃŸŽ ê†V’GæŻÎOÊ”x‚Ăqvő òÈź\ŒâćÇòù”:Š#êäA$­k[4ĆE čé¶Jë_ùïúb1%%|ꃑŽZâÏŁŐ–đÍÏâN7ê17;“żXŹÄąô> [âΟâ„Ç*;5ìœhŐÆŸű˜Óh4ĆŹțű% òóžó±7ÙË^œęÿ Èł\áęGqæß}dgŠqdÏ&Ÿ|ç |áTÀoß~ÀșïÈy;:Ó놱DÚNÎő Ÿ]țž-Û0jČì€Ź\ș€š“Q©T ? ÿ 0._Œbç«)*ÌçggńͶKŰÚ9wî$_żś4’$Ń!€'œĘÀž­?“žíż„ǀ>~–ŹtëőÎČsź«G{¶ź#çz]û EBUéoR—6bnçȚąÛÖjKML`ç^ÊTéčȃDÛEI©‡Ö­ß(Ž„ő„€<Čk[ćïОČG_\THTÄ~üƒșŃ>š»Ț2~6[Ö~ @\t„Č>ŁĂł•/>í;땻üÿuyXÛÚPndòtwù뿏x«,ŸÒх$I$\ŽĄ„o Țœ!áƒPÛÚŐŰxèè9hœ^>œçÏ–Á ŒmÚuÂŁ•Ÿ^čNȚĄüۄ9zŚÚu # ž;1gsíJ ùy萓•@û 0œ\u;‡ß@çđÊÊ-•=•JĆéûˆ:yHyjkJ4Ć$Æ_@+Ap·8»y’“•NTÄą" R©èҋ>C&0jò=ŽhĘVÉżÏЉl]ś9y9YüôĆ"~úbî^Țô4ŽÁcfĐcà˜jŸau‘æ5m€Š4—úrÊŻ;چÚêçäêIÛ]ˆżpŠÄËÈÌHUfÛÂú"8|¶væsòÈnžó”Ț.€§—™šÈßËΠ›g+]ފǒ—{_WŒĆ/+Ț€š0ŸO^»ŸE_Êuž|ù<[¶áíU°±ł'śz†\ŻË%Hžç‹çQT˜Úچgßû…àn•ß{Ăêc>ęțčę!yËì?WČì„»IKŸÊŸ?}€ÙOP^ž€ŐÒó†±<ęÎÏdŠ'áäìVi_ZŸn•”hxtŃJ†O˜ƒ$iùăûe|œDÎ{őòïc…{%|ęƒyăë]H’DQa>Z ŸÿôƘOšęÓï{7"m烅sHOIàŚ•ï2xìL‚»yd‡bÌ;wÀ‹Ë~ÇĆʋÜìLîHÎő ŽíÛBaA…yüűù"ć7ùüó8:čRXÇC“CHIŒçûO_eÈžYXÛŰræÄ>ZúŽgȚóÉÁ­@hű \œtÿ nacëÀوʈê=Ï2èÆéÜ8ć>~úb1țAaŽ «”ƒqh;Ÿt ÏPÜőè[U¶éșŽsO֙uÊ]W -íŐ«Ô6…őçԑHOI`ûúČư>ِ$đhé‹_`(WbÏpêèK+†ƒ!œŃJ”GQa>n„kÚćqőôVțŸštY ÒĐáìæiđCWöĂæçòĘČçűßąï”ï’ă•ÿGę»šśœ7=5Ń`€âz}U”OçèâĄWNČlge€ÔšŒ—cÏ(ÿwśjm7àVúÜ$I"5ù*ĆEÊu{G—j?]§(IßüąŃ4驉H’l^țd+Ÿ.žGìÙăÊ}ÎćÂ™ŁŹ[ńżüCÆÉ^úܧ—ą-)açŸß)‘ö™iIlßđ Û7|CŻAăXđá†ČéĆDá–ÿ»ŠÁ.őy:˜)TŹ5ĆęBz &țÂ)ą#òïAyș]­¶ŠKŻaXÛŰÒs0¶qöÄ4 ç"eƒîÓ.7Očž<ŒCéà'ÍyšîÆą•ÀȚŃ•ÛæżÎĄž{†ÓÇv‘›“Ł“‹žăf<Œg+y&ÊĆ­…Cłüć»ÉËÉ`ê܅„—æŻû1OĘ©€|Ó,„ô5ÏߘOaAÇönfâOüțSç.ÄȚх֎ČN•=ûòłg!=6áNYG•š łç?"éJ,1gSŹŃ`­¶Ö+ÄÍłWÚ'€V+)SöȚ~Üőű»šŹŹJE#™zïŸxóaŽÚŽíÛBûNʕłÆÍ|'7/Ž’<Ê}ûÛžžyâêŃrŒB~n6}‡NÄÁŃI’gčĘ8ßV-!9ńń1gÇÛ7€Űš$'Ä1khKB{ ąÏ ô2‘“ç–é-AË6e‡Šœęô V-[@Ÿ!è;d,űXÄŐÆÁ>utŻ=rłâà̚ż߀ŁmÚmžQĐMńÖSLçđÁœ:òGvʇKxûuÀ«żRéĂúŽâJì.ǜV~ÜNaPYYŁ•ÀŐłìЀŽk— nÚ”+Êÿœę:Œ^Ëâ”RńïÛæżÁ™c;‰8ž=›Ś0fÚ|:…őÀÍŁ•’nàèéÜ8íAŁeőidĐÁ:‘]RăiŃșœòwzr‚òŻVm ÊhLŽ{ Ÿrù]Še›@ l䚚$ ©ŐÖŽôń§° OIŸ™vMߐ$ą#öăȘœàæéMê”xÔÖ6,\ú‡ȚìŠ;{EŻ!œYČæ1gqđ/"üÙă{(.* žš€ÏȚxÆÌÄÊJ”Ÿű%ł~ƒăû6yäNȚNZééƒÇönbś–ȘÛ)QŻ^/I a}Ž‘ș`ʌ›©Û”:‡fkéLXÔżû‰<Œ€Ž]ûbWêvë;ŠˆÛ䄥Í?(3>!=˶Ÿž>V¶=0€W…ßAE@§pźÄžA’$.Ǟ!šk?œ4-} Ê\țO1Ű»őGŠÌ]€ÚÚFI”^čțČîzùhŠć·ê€§$èEL+Č+̂UDylćÒű„Ô5ż€’źÄąŐ–œpI><«ÜuOo?=§à҅HČłÒ ČÒË3 4HQN{ I‚«„Ë!-[·ŚŸŃk,«YZÆ«—ÊžÉ?W±óÏŐÊßÚr1©É űw gÆŒ—9yűrł3)Ńyd‘Gv°âœ'iڱ+łyƒ>C'Öw}†NT⩟]Žáś5Kù}ÍRœ\;íAfÜÿb”[A~ŸgŽïᔇÇ+ęŐôû^àÖ»Ÿ­|ùŁÚ\È±pC6Û¶5‰šo)0u‹AùíćŚŃu^yXßQzù†ő- žĐ5šC”ëNnŽíЀ˱§9}|·žœ­ë>Uî,ŐëvK%ô>ćžI·ț72ùźçčăČŚ+Iß,y”­„hXáuœžĂ”ÏŐžhΟ:BA~vNźJču88‘]Ù§Ü}ÿl\©WÆĂ;7(ŚZ·3â88»äÜœlŠ|ËșOŃJ’ČËáôń=Êh«]Ç0ŹŹmqpvÇĘKvžâΟ$ńJl9ùYxÏ îæÉ'ŻĘ‡$ɝ@‰Š˜‚‚±RŠk—cjUwĐ-č §>šs;ŠæÛ”‚Ë”ćŹ"+]F*ߞĂú•”ćő+ßVțŻ‹I‘?eGwb_ùŠ€ìÍ6Ö6v”S鬗1ƒ«Łc9úüj\›~úX/ĘȟJ„"(ŹżȚ'€çB{ Ƨ]Ó e3n”ùęóór ËX\fckoP'#rʞ™ÆàZ‰FŁ—ŸVUčó òóóȘŹăćőiŐÆŸNaę•OçîéÒk(]z E„’gÚuìÆÒu§™vߋJ? #țÂ)Țxl'ì,ŐÚgȚû•'ßț‰îęGëČæçfóÛÊwűdŃŒŐĘSÇöđêü›”@ßiśœÀm-Ș[;Æđc,/sb‘)śÚ`Ê67I‚]úŁV[SRź‘vé3JO‡Î=‡)kź:‚{ Ń ö3íaŸzë?8’>Ăo„SŰțYÿ%W.ÊS˝{1xüJĂR(šȘš›G'7$ mP7†Mž‹WpáôavoúŽ!ăçжC!=†pöÄnź]ŸÀČf1fúĂ$ÄEńő[óŃjKpőhÉÒő1OŚjôèʄ۱q‰—Ï3âæčÜŸ–ă{ÿÀŁ…FÍ0p°Č2Ű[?`ô ~țüeČÒ“Ùżí'.‹`ä­śsáÔam_WȘŸŠ»žüPŃyâì§űî琎ZžŐ‹“ïĆĆ͋m朩ȚC'Ą•`ìŒGűś€,žòœ'ÈJOĄ]P7V/{†łÇwpśÓËhJü…S|ÿńBź^ŒbÖ#oáëߙèÈ€–NĘ{yûáæŐšÜë|·ìY òr°ČRăèìNn"-é çJ·NvéSóg[ ĂÎșâőÚP_'ĂUÄ źWA]·áy¶ôŁU›’.’‘R6cÔ”\{nÛ±ô»À4 IDAT;ź-螑ÂćŰČòÎáe#ôÖ~eÛ«ą#Đ”OYMI‰†˜ÓòA5VVj%ö„ŒšNźžë­ćË[ïYÈä{đŰ­HOŸÊÚ/^eđMwàâȚ€–>ț€%]A’$î|â‚ËÁ)ÈËQFŠŸ«ZmŁk„Ï[oÍ”\š‹Q'äm|jÙÀJZ­ÒgÙŰÚáÖąń2–ûą…?VVjŽÚbÎŁžžXžu(•UșŚä`]I’ăjt\Ž=C·rÎÖ/_żN|Ì)ÚvaääčŽđńWźuè҇Ç^/Û\—ƒƒVVr ujÙ;:3úÖû™ùàkd€&yx;[Ö~JtÄ~$IâÀ_ëèÒk˜òt‚{đâG[ĐhŠ9wò‡vüƖŸ?Ą€DÁíżòHéVÇʞmÒՋŒùű$Ć˜Ïšÿ:Sæ.šy;źȘ3šK4m‹,cVŻŸÉÆȚ ÿrÓA*++B{ĐËÛÎÁ™Ž]û+illíèĐ„ŸžÜá·ÌcűäûčŃüûgŸęàq„aűŽëÄCŻźÆÊÊÚĐłźÄ#+wY‘3uȚ"ìJśĄ~ÿŃsäćÊȚő=ÏFë¶rÄíŸ-ßóÒ=ùì”{ĐjKP[Ûpÿ _cïàb`hkólËßĐčQ'öđÉ«w)ÆÜÚÆ–»žZŽ­ƒ“Ń‘IĆ|]<űßë?âT:E~5.Šoß‚ęÛ~€€DƒÚچ;]ą8Oȑț]zËŃêčٙüțĘŸÿèyĆ莜|=M@’ Ç ăûă$'\äóŚïgá]ęc>`,Ło}I‚“ï'| ĘzáÌ^}p$śßäË{ÏL%/' ••ś/üR^ăsń`Ț _Êk„Ú>}ŒkÇ»rt·XOŸœŁÜvËڜŠźć]ZŽn‡WëöJ}†OQ¶?汿=țÙ°‚ÂÂ’âűây$'\ ßÈ©XœÚŰ9T:zè?j:¶vŽL@òÊÍÎäÇO_Täëê!Àæ—S\\ŒV‚=[~àÎĄźÌŸèÏș/ämmkWóșVNŸÔkńŹ|ÿ źg„“ŸŸÇOŸżą,…ô”#ł”Ž­~í]éÖ_6ÈiIWűäŐč$Æ_ žšˆ|«Ì†Ű;:ÓgèdŽté=BÉïï?$âĐßh%y*țŚoȚdßÖùmć[Ű;ž>XqdŽìÜÀ”+1H@QQ!OȚÎì!ź<7§?™é)d€%sßX?îìÆ“·ő ûz&n^> șéŠÌ}A‘iWș}űÓĆó˜Ù߁‡'w⟍+±¶±#ŽŚ0îzâÛ„/ÌV"Ú}ę;ÓÊ7=[~Ôûèf"ŒŐSìžNvUNƒ)XäèŚš`ŽózŽ™…­<ÍÒČMŽ.†ëœ7Ü4•Jö[Ú„ ¶±7xˆsŸû‚ŸĂ§rbïDGì!ùj,~]í5‚Iw/ÄÖÎAÉŚÚ΁CAŸ]ôGŻŰŰ9Òs(ŸĄÊ}n-Ú0ăĄ79ČCȚkzbß&úšN›ö!,Zy„ßV,⩃ğ?‰Łł»ôcÂìgèĐ„Ż’‡«‡·’·§wÛyôyì­uìĘôțț‰ÌÔDCû0mȚkzrì\9­Û•Òk8ïüpŠĘź":b/çOÀĆœțÁ=˜tçsűśĐ{ÎVj~Œmk?æĐ?ëˆ?””5>íƒuË/gWŻJ©ȚŚőxd§)èl,€c§đÁìȚô­òwçđ!šÔ6zżEŚ>ŁŰżő‡Č4=ôonćہq·?ÁŸkȚ#/'‹ÏÏeőÒ§ÈÏœźœ:çêъ»žțHÉ·üęÆ&œë„i†Œ»“Í?,ćÒù¶ÿö%ŁŠ[~ZNfÚ5vțț ·âß©§Žü$I€§$Đ­ÿŁőËŰwÆúȊukóË۱q6¶ödgŠÊśYY1ëï(iËßbʌw<ș„łÇwSXÇîMß±gËœœĘÉ螼€™őÈ;Ž(=ŒȘcŚț ;‹œ[֐’Çą‡FăæéMVzٖĘń·=†m©!ûăüòŐ" òxä–Ntï# qъƒŐÊ7gw987ŹÏHvęù-ٙ©<6%„îęo$';ƒ3„ń6¶vÜpŁŒ­ođŰYìŰ ŸWńƛČgËśŽôńçì‰=€”ț5tÂŁ[Ît6áR4QeÁÈWăąű`ÁmÏęÓ?/Ńąu;ł`KFč«$É<>BL ì»P™sHš·l ć4ĐŽ§čÄŸÿôÍß#@—nŒÇË»m5wÔăł5[" É6‡3 ș”ŰT}Ź}ùí_È-ŽŹ (û /EóôŒČóf=ú>7Ęöž^ÚŽ€Ë<:©òśœ ŸdŰÍśêe€Ő–đÇwïđûȘ·ÈÏœźwŚŸŁžï…JęWŸœv{ț”–ysőżŽ ÒfûìŐ;ÙSêhŒč&‚vćSŰNț›7‘G¶!=‡ń§;ÈHM`ÙóÓ8wrż^>În^Ü·àKú +;&űń)A$]耝ƒßìÊ©öYÄ_8És·Ë:Ê3ì.ŐäS0眞‚>ĂoUÊžä©IÛœ€ćeĂT‘ŰłGùòû‰‹>ĄŻ·«'w?ó1oœ©ś}A^k–=Íöß>§Œ Q«­yë<î~j™Ț.›~ű5KŸÖ["y¶äáŚŸĂÆVȚ›Ż).âóĆśČoËśGÿz¶òăé=ÃŻć›wŃs&tz ›x7sŸęXYB0Æș/_eíŻTz]ÇÇ>7s4ë V^}w\cÌfĐ/$ĂȚ ˜TJa<Ì(Lj śŸș™{eƒțᆚôZËmÀŒțkőç֞`kaƒțˉÚôș=êÄ.Ć8Ž êŽ“‹‡Ašs{ŃjeŁĐŸSe;jE$­–ű '9č;{'üƒ{àŚ!ÌàćA —ąÈJ»@`HeYÌŰőźŸÜŻÛ… ,Û&„Ւp)Šžèăd„'ŃȘM ĘúÁÖȚQŸ±T…˜Ó‡)*ÌĂÊJMp…%‡ŠèŽŽżp’çgÉ}đž9<đò*bÏć|äÜœZÒs(źćvÏ\‰9Ev–-}üéÚ§R=ÊWű ‘ä”FùWEPXŐÏ­&kAȚĐŁ1ôó:ƒ^ăQ›DđáÓeęƒőńxVaĐës2ą©Ï|4Tę™Ú« úqȱđœĄ€Š\Ç/_8ɂ;dƒ>hÜ朎ÊhșŠ^ÇÍ&§‘Đ:yCOĂ “iĐ(śú:\ŁÒFe‚+SkÙ”a\NÖ\[· ŠCy+ÚÚÖŹQە©V“Duu%ëóp–ŠöûșR›<łüő)l‘:^IsŚqcAčFćš"«‰Őqsö‘u–] őՎ-r°Lï1AŽ©ÛÜêJSv>ŠÍWï{S‚éj"§ÊLȘĐż^ ł‰ •óaîHc"jўÍRÇM,Sƒ4ćÛneÈÍąŽW%§©ĐT•|ol„ȚÔVu4Ôš”ÆČĐPłĆfȘ“ŐˆëO]d™ƒšŒĐE·œ\0^Æ><ńȚf@>ÙÎŰłlVuŒ™ŚŸFœm­6Ê5ő†Uk9ža‰ŽÙrrÁÂ3ą&#tQÇÍ(ÛÆDÛ:žĐ„_Ù»ŚË;]ÍȎ7óúÓx z ŚÜšKĂȘRŽX‹2]v5ˆúS?T6«CÔń:ÈźQÇ-'Ś­QO茀B‰†eFÙćš"GtÌŠËź††Ź?uEo„.êžI·ˆ:^y"á|”~ŚhGèÔ`ÍM4,ÓeWƒˆ4·œìŠXêŠîèe@ÔqïuŒČD’] MŃùš-æĄWăŃCÓiXÍ)ŠČòDæ‘m±)/Ń1›,ÛX4ÊœÖÚ‘ÓÔëžè#M—]{Æć4çŁqĐËÿQ"ŠČrrœ”©t̍œț@ĂuÌæÂlQîFuŒzE{oò}€)™"ÛÌùUGœŻĄƒˆą4YNslX8Æ@V#©?ő1j7)ÊœD·œ\h^uÜd9MŹț4Țz êć,wSŁ(ÍíœőA›h"Ϋ„~łllú ő%Ț(ÚhŚĐ1Čæ&ŒzÁÆîŃW†EąÜEÛ4aȘ‹+OMÛHŁrŻèŃCʰĄ š:æöèë sFč7'E š”ĄŚŽ4Ț:ˆro,œ›@`"frŻ'êć^ь́šŒĐkÛ>­AŻn}ÁŻ^t‚ŠNąÜ͐§©T֞Ćè\đ_Ƨ'6ê)wsyôșư̈ ©cÉÓ-‰A”»‰ùH•ü_ hj˜ćŹ 7v‹ŸW—c…A4uÌ}zbœQa4b–“œ‚ŠLmfĄkxFCŁžr7ˆr75ŻÒ "„‚&FŚÜÈ0êFèf=VŽQz.AÍštș»čí”;6báŐ țëÔjÍ­móÔ-y™ăô:eÆ­ÎZ  ‡Ńö@ĘFٍw„N™śb.Ż^l[4u*ĘËʈŒ·1Ž•t^őő6. ±a‘(wS•©‹œćn6ŻŸ{Gk'șșwĂÆÊ†Kčq\É­ęK$\l\È.ŸnnőMIÂboșČ$”9DŁ*Ä€› 9aî(wsÛ8łĐÍùš»úĄOi?“çĂ^ĄƒKV*+ćûłY§ù$ꟍùÚè}AźÁű9¶cÇ”ż”ïŽO<‡„D§_},ź· i …&s:\y*ÆÄÔŚk2‚ÆJU§'Bă8ŁÁŒkèÔ}äQ_›ł őûŠ[ÚM'W“ĂÚKßs:ă$ICwϞLn7ćęŸb€Ï8p'ù%ùÊœ7ŽÂúńfä+z] šHSrŻžçÖûÏëcV"Ä­ Ă}FæNGŚN$$q6ó«cż!.'¶ÒûŹÉŚä)śm1€[ÛÏ`}üZŠìłŒâ‚FOuöÍ€łVíĘœ%Gè/wƒ[ÚMç@Ê^æ˜Ă„œ‹zŚ_‹XÈOC62čĘ4R ’yêèĂÊ”Vö­±”Č”œr‚fƒÙOOŹ'jćn„úvRŹUÖ<Őu!Ow}k•5©)ôòêËżÉ<Ùe_ÿ„ǟ X[ŹwïxżIŒÙóșm TŸ qïʃÁráú9aĐ@ć#ôÆt֊UőIjŽÎ«ŚŒ¶©ÂÇRœBWîÌ zÌą fíŸĆÀ˜\ɍç–cÈ*ÊäȚNŃĂłw­ćŽŽoE{瀄mëԞvNț5JëjăF+{ïZëÓÁ%{”œÁś­ìœ téˆZ„źò~Gk'BÜșà vš‘<”JMk°Ń|Û9ùăëŰU5ÍĄ„}+‚]C°VUï{ȘUjü«MWŸTŹÓæh#ő©w]Û°^{¶ ë†oâù°WHÌ»ÊÌ]7ă·ÖŽżzÓú'GîÜ;žœXîïô0? Ù`Pç^è¶?§v–UPĐ,0G;֙6K˜8łtƚwușVœč”«ÀŁ!OŁV©y+òUÒ S+M—\Ä§ŃKQĄbVà]|6`_\ ÀÂnŻ‘<ł€q~7ëĘŚ·ĆŽNˆâ­IœŒ9–s·&rOĐù«Ujž {™ű©œšG䀋ÄMMă±ĐgôÖó"nŽaí°?č=đNb§€}K+ęT©îវHžYÀĘçńhÈӜżőÇ'ž#~Z&«ęŒ”Êš.îĘ80.’ó·^ăÄÄóœšÇ ïayuőèΎ1‡č:í:ǟâêôlț”“.Azén ˜CòÌycI45Łąž45WĂß`Źï„Źg&ÇłśŠčëćŁBƁwsfr<nMâđ„3$ÌÈáÛAk ™·{-%yfĄî]‰șć*7Çqs /wƒä™ÌëôˆŃçłÜIÎƚhń™S _um€>lș©:kĂș„ôžáĂ[ædÆ úo cóŐßÉ)ΠH[Äúű”ŒŰڏә‘Œns󂍦  **Öï” ?»9±ÈYî”UČÒ1š…z€ÎnĄìIȚYmڍ—ć谗Őf,ÿoïŒăŁȘČțIi„–@š!Dé‚ô"šŹa± ț(‚‹mQŚ]\uum°(‹tEiĄ„z ©„ÒI#}f~ 3f23ÉÌ˛É${żŸOűśî»çŸ—{ß9śÜsÏŰrm=†§ÂžfïíĘHÛÕÜKúòM\ęÙ5<Šƒéûű.~)ś5îÆŰ'űŽŚnĘâ—[?ëËźű·ű‡Òśł!ù{4hú$ïuę'~śń|ôT}Y7'w:ú„óiŻ„Äç_E­QU»&šT(qSș1+|țnlș¶–ì’,Š„MglÈ” %ƒ†róîu]Hdăûy"t2Ë\K·ííô1ęńăĐß(S•òϋïs%ï}™Óùu?r†!»{›wĐ(nJ7>ïœ W„+Ëă—à€pfJŰtæt~ŠîLhę'2Łù&î+†7{˜AÁĂűąś·<Čg Ÿís#Čèțp­0‰…§æY’Áf15ìú ąÿźźÜ.NÀE邛ҍ•ę6ąT(9œ~_W?V$,cnÄB&‡McYܗÏŠ»/"ü"YÿÊÔe5öÚ ÛËììŸŻ)Èu±ÏĂٓś»}„ ócféyUî”ć0ûÄ ìq”yođmÜŚxčx3ŁĘKž7E©P2·óBČK3aCœÚđDèd"ßORAÒör0}ŸI9ڍd@Đ`Œڑ\˜ÈțŽ=HÛcP&Â/’ÍG±éÚZș6éȐ'8•u‚­Ś7’Y’aČȚŃ­ÆÓÂł%KŻ~΀ !<Ôüšșr8ă?^ßLQĆ]B”f\Èșûśâvq*+âÿC\~ŹQ]șqŰĆï~Îß9ÆäïÉ-»cPnFû—((Ï燔 Œj9–!ÁĂQ à@ú^~Ÿ±”FM—ÆśóXËq„ûFXÏÒ«Ÿ“Q’n$3Ü7‚±!èèNvigsN±)y-„êR}w'w^î8‡SÙ'H+Nć掳É-»ĂŽ›?1 hyečŹLXfTw ÏVLl=…Ó91D„í5ùüä@C q%RúżÌăĂæ©_-șźê{Æ3t Úyw0éjŻJRaÁîÚÈő=·ĆÛƇ§ÂžæXæ–ÄțÛ Œ‹Ò…oăŸ6Xsż{–ĆĘ?cXł‘z…>6d·űÛoüÀŽCĐÜ{ ë“WłyđN&¶žÂêÄï8”Ÿ__OšWV&,cΉ—ôśR­œÂłw8‡3ąŰœČŽ3Ć3șŐx>œŽ˜śÎœ©/ÛÔ-AÁĂèèۙł9§pV8óIŻŻčgïœÓ—=’ĆźáQ|Ôă Fïn Óß-€AżöÔ?ßă™GX;đGŠ„Mçčè)lŸ¶€ÿ\ꂳŁèŰw'wJTڙö›‘ïq«èƒ~í©ÉlIYÏčœÓ|ÜóKśűŒé‡'ÈtUșč­ EwQ @ƒ†Céû4”> ^lO¶ù3ë’ÿ[ăó«-’Č':È6·je:H#|# öhÆ‰ŹŁϊź¶lLÖ1.ćž'Âï>ú"ćn2ó"âćìó"r5BÖl$‹șțƒFÎ^–0.d"ŻEŒÉŒ˜Wű.~©Ÿœ‡“Ÿ?đ “ZO„XUÌ”Â$F4”9ÿÂÚ€UÌ9ńąȚxìÖ€'ïv]Œ‡ł "ȚF©P2©őTÎæœ2«ĐŸ {š>Mûáçژ…‘‹ž[QH#g/ž {šGZŒæŁ‹ăÇĄ»ńw  €ągOfމ!żöæRîyƒûYÖw5MĘčq7€)aәț:ÏFO&:ăŸìœđŚI/Iă‘1>ôIœÌí_âă‹p:'†Uę7éßCźJWжAŻáÆÁ;śÀÜÎ Q  ± ž@ś žkÿ 3;ÍcƑ'čœ{ńȚ3ôäĘź‹Y“Ž’ACôKJ…ƒ‚‡Ò­IOö„ęfôȚ~ŠĘ ,èò6ŒȘöï_[*črîæ’ù\îVŹ!T·ž ł‚l”†îs# Ë ,Ú/^Ș*A„QááìiŃ:.ÀçW>6űęŚ[;èàÓIlz»çűđÂûze Öšù>q uaWeiìçúÿk,x@±č—ôÊ © AoA/ŻôB8ç,-<[Чi?Â}#Űyó'ep$ă q F3æç~OęĆ`ĐÍ< @~yž^™ƒÖz5ï 4óhÀÈæÂEéÂż.-6š1|ż””ÂdƆLÀĂÙÓàÜêÄï(Șžkđ\Ö$źțPà 5žžL|țUbȎ™yjòaKZÿSر”mŁœÖĐuË5I •?’qĐÎS “i”ÙŰŒËš4*Zmöcűo} Ê?Úr4k“VŃö‡@Ún dêĄńš5j>îù%nJ7}č]ȚfRë©lHțž¶?ÒggZmńăûÄL ›ÎŹđڌÚČ âmV'.çáß0ÿäŹ ’ÆźM˜Ÿ€Ńû†Órł/}vvárîEk5Ž}#ł)y-śooK«-~üûò?”șNóôŚčóßț›P*”<șg]¶”ŠË¶ÖŒü]kPŻêż /o™œúò@ÀƒôĘIóMȚ<Čg wÊr˜ßć-VôÛÀçȚŠÓ-ÙҘ7"Đ=ˆimŸŐ_?ȘćæGŒĆ•܋ܿœ-=wt"tK^‹™IŸNü·ÿfŁeݧÚpNgôœË9mTV„QqțÎY(Œd&\5*żęæV Êó™ŰzŠ~1ŒÙĂű»Űev–ŻÖüۃڶŃ^}:…^ĘòSeҋÓô°,šôXæȚ85—;e9”«ËùùÆVNeŸÀIáD˜w;šy4çŐđù$$đêńçž[Q@čșœ§^ćnE! "Ț2R–—s/07æeŽfæÛžŻ-jÏß/ü•šŽœš5jźä]bÇÍ8Ă§ç’R˜Lčșœ„W”†ß?& #áíâÛ§çé Ę=._B{0Żtœc$óÿNŒ ŸEGgâpz lH^ÍW>!»4‹âŠ"–Ç- ]„˜˜żwÿjšçą§èß 4,_šÄtđéÄÓś&7:” %Ïy’}·c}òj’ Ù’ČžRu)“Ú*ôÒš5“Ś Òš,z†R1§Ż)Æ6ŸO­EŸg+.‘D…Š‚äÂDÚz·§­w{Îß9Smùv>ZśŒ„Š4ż"ßą™s°Gs*4DűĘgò||țUÊ«Źïæ–ʱzÍ7«4Óäq”FZSœÉ|oæĘŰ” ‘»/S—ŸW_ƒăæÜ†* ą`íÒFNY¶ÉówÊrpkjp<ŁŰxĘźžąˆ­Ś7ńtÛçx0pG22čÍ4Ô5’żŻ±-rPč'ÔVĄÙs]Ș7ÀȚ[ń\ï͒-}™ëúj‰ȘÄąò'łçƒéûèЇ6Țmč’w‰ÈÆ]qUșr6ç”É]Ç3ŁÚl|:q:;Æ îšÆ`Ut^4ïčÓOe08ž^œ†JŁÂËù#ągÀ$Äx ”őj߃]›ô0’yĄŠÌËyxŹŐ8ƒ{ôŸ{3=œ=iíƙì“\É»DUÖ'ŻæévÏí Ê(I72ĐrËî°ëæ6ƅL€‡oNekïwÒ=ïÛz;èæ jk‡Ić1"·‘+{bĂÿHž¶ê1Œ!~Ÿ±•9ÿÂŽ¶ÏŹu›â™v/°íúYÛp«èÍ=[ÒwW€ŃŸXsXb(_$œÇÜ,ÒΚ—Ć}ɧ—KźÇtëzÍ<š›tŁ6śÔșæ«îN0ś(êY»IDATlÖ&źäé¶ÏńDèdÎæœæá–•Ÿ—Ôą›2·Ü4Š”b}ŰÛ-Ő`Ï6‚vúÙrMèâgÒîUÖÄőÂkFÇtÆ€Óœ%8ìÇC'ńxè$Łò:Úz·7P‚–.TŠȘśOgè ]4FÆB˜—¶{F­¶•)U—č©Ô*“2+Ԇ{{ïŽ(PèÇtUtȚĂȘ;sÏeMâJƅLäÉ6æTö ܝÜ2s9§ő[b0iEžqì° ]JTŹłŸŽ”‘čż2á^ìđ*3ÚżÄúäŐzkŻ*ƒ†2șŐx Êó ftê{‹–„™#.?–6^my0p QdfdăźŒÜq6G3éŚÓë‚ű|­{hđC&úąûÿ‡ł'_\ù˜Ôą[Fç%ÉŒç:4ÔÀ-Úì~=ü{SŹ*&± ȚąúŽgE“PÇšVc9˜Ÿ7„ë’ìăny,zš2Fì 5­ĄK ö«-ș>Ò­IO}0€9\”.t»7”4YŒ%3]™ Éßó[ê.łćȘÎh+Gx[Š„žSšQs·ąW?o¶L±ȘÈàś2•őmÔQzŻ­źNn&ÏëòYšȘefžËŸŽßH-șĆ㡓xăÔ\i1_Ö&­’ÜF«šbäÖffn+dʇ^›”{­čvœí­3óqR8±sŰ~Š·{Á`ß·“‰—;ÎfËíà\pòUÒKÒôçłKŽnìȘÁ`Öđuìg,îț™ÁȚj7„ËúźfJŰtÜ-Làb+bȎq"ë(‚†­sMn3yo0șŐăúuI9X›ŽŠÜČ;Ìê4ÏÀÍŻT(ù ÛÇ4vmÂ֔ú8KX“ž’ ś`Țžï] Ë űùȚșŁ=sœÍžAqÔą}ŐÀÊÍù;gˆÍ»L'ßÎÁXŠxĄĂ,š{¶ätvŒȚX•qYȘ.懔 F?‡Ó°śön«ă_ä&!?ŽFÎ^JßoÔÆí7~àDÖQ~»eȚ ±–k…Iš5jłȚĘńÔbË&Ú„ČŐž5„_Đ Æ„Œ§\]Ζ”őČ”č:*ŻĄËąçLÈ'5ÊŻ.€Ÿ‹_Êì/âŹtáóȚËž5!ŸßFŃ&P™XÀ‡=țZŁfæ±ŹO^mpíő»)hĐđlû—9ù§XƆL°Z~TÚ^–Ç/!Â/’ăŁ.±ŽÏ*–ôYÉćq7ˆđ‹äśÔ_X•đ\·+ æĆŒBfI_ôț†]ĂŁXÜę3öŒ8ÊÒŸ«(Q•đÂŃiČŁä”fóúÉÿĂŐɍßGDłąßzwÿŒ#cxŠĘ‹\Ê=ϧçZUçÆkßŁÒšèèÎÖë› rvÛ)ŠŻ.ąĆ«"ś8¶ełçŸœ… ïwûˆ!Á™,óPóGXč”FÍ[g #΋UE8)œ,ȚĆR•ł9§(,/àń‰čœ pkʑGÏqí‰l#w¶œŃćĘx©ăÿûK—żrqÌ5Ÿxà[Ùä•ȘK9žMGŸp†6at^€·ûÖN‹ëÔÍÆÇ‡>Éđfł;ug”ÉÁä€Vă?6Ïò)t9,;Xô•Y•đ ĘîÀW>!© pßÚùt 1?Ž/~@ŻáŹIZitĘő»Ś˜ylÇłąqR8éƒ@ŽgFs"Óô֓ĂQœÎ9ip씘™L>8†Ó91 Îc­Žih_‹™É”ƒă ÖÖOdFsÜLĘŠ(,/àpF”Ț…]™ÓÙ1©Ž•MǍ»)Έ"»R ʅ;géœł3ßÄ}…·‹7ÓÛ=OSś@6&ŻađŻ=9œ~@_6œ$ĂQÜ2±>}8#Š3Ù'ŽÇæ]æpFE•\}Ż­aà/ĘùőÖÏtkғ'Ûü™›E7ű˩٠ÛʇŒČ\}ل‚8gDU»1”è–~?ż=‚g*#çÌÜV;?LQÛ6šÚæf«}(}?ïœY€Ż«?Ę͒>+™Üf}›ögjŰ3,뻚-ƒwáíâĂ_ÏŸn°ŚĐ')šßć-F6·~/sNi6ÿŒű>Ț.>l¶‡ÁÁĂńqńeHđCŹêż‘ŠîlMÙhń2‘­űäâßÉ,É`vçŚyûŸżŃȘQ(­…2«Ó<æEŒA±Ș˜Żbÿ%«Ì7OÏCƒ†ęÖ3.d"Ÿź~„y·ăë>+ÚlgrNČí†ćńI qϊfjŰ3x»ű°Î^îv°Ü ńœtœmąÜ- Æő…í:h•ó;gđŽ•Ś­MZeŽv3őĐăfˏÚ3Űäń]7·łëæöćM;l .?ÖŹÌ—M7y|}òj#oh_X N֜.óśÔ_ű=őŁă4fÛòᅶűđÂ{FÇŻä]2JcŠ%±ÿ6JîS„BI[ïö\Íżbô2·5: \J_6—ŒÂăBŻ„«Álö:3ŚÙČĘ_^ùqy±,êș˜)aÓő©šu\ÊœÀ;g˜Ü«üÓő͌j9†7"ß„XULłŹ–ÿuìg8)œYčˆmCÿűŁ ?€là•cÏX]§Üä—ç1fßpŸîł‚]ȚfA—·őçR‹n2óűłČ—ÎŽá©ƒcùŹŚ RUkĐđ{ê/Œ|lșĆAÁ:Ö&źä€É*ÍŹ6fÁ‰Zîè’{†n“ÔŻ•Żü‹č—=Ț\‚ÏÄÖShŐ(”ŚbfÚ]¶Zc™ńjŠșìÿFăÙA2ĂUÇîԝìNĘIOÿèèN {0™%é\Ì=ÏٜSfŻÛ|mgČOÒ”I + P*”쟔ƒQ{‡˜gT~}òją3q„’òSiT|vùCÖ%­ą»/Úût$ł$ƒ˜Źc$Öń{ê/ŒÚ;„$+fìïŸ{“Żb?%«Ê–Đ范ŒÚ;ÄdÖË1û†|öŽ†Í°Ę}èÖ€'~‘4rń">ÿ*Qi{¶ÄÎ82„‹Qœë’ÿˑ̃śÚŁö1jăź›Û‰JÛGπˆđ‹ÔzÓŁŒąä Êó”wˆQB©Ș\ÈŐ&čژŒÆjc 6˜t2I3ÿ—…F#ϰ<ßX0ù±&'őmćOœp'œQ‚ÿiŸë·Ž`śfô ìύ»)ôÛŐUŸôĂ^Lšš2Œ$„șVœäóIài㯜Ÿ¶ČŹxT–ÜÖ>—źä)ÎŐ\P š†Oz~Ćs^ĄÇÏíșŒĄYDÍ»’Ż75F†u‚‰ÖÈÓ,Čș܍LƒZZő6Ô3šșÒ/hçsÎ0ăÈd»+sßą·”òž 2ÓÜł%îAôô€iížcOêŻvIĐ-+˙GBî]+Č&–1 ۱b-ÁŽæÒÔ/Fïއł§]ŁÚ«RÛkïÌk:ŹÙ"giĆpH„‡/Ö Ű hƒoçÄŽÚæT zł{Žá:[C‡šŒPè‚ÚR—ÊțPŠő!;œ\+ÆłĆmÔPwŠ ^s"ó(]üyečl»ńƒQÆ<{`Ò máufÏ9ê ƚ(w‹-zĄĐő©Qîu­ś,™ĄŚuÿ;€—€ńśó­Ó6hŹđZéšŃ -č5Š©“ïĄ[zBŸ ê;RÒșîû–ÌĐëșœ©•ÚTLYmc»çr·ÆȘ3tA}§>|±ÌՍg©yÛĆpÔgŹ™Ą›Ë!aѱZ`śș5í ]Pß©őš[iśêÖ ÛëÛÇAbvLÔb7—Ü™í6C—bՋw‚ ŸcUöDRŒæÖĐ©=ŃhÌ(àÚĚԦș«^Œ'őłcąVœ=ƅčí9”ńš › Ÿ#{”»ä–˜Æ.QîR­zńÔwÔæ¶j9xčEčÜíҁÀ1°f'—{çZ‘o†^͆{ɑŸBĄ ê9ę?ź«KD”»@`@}È”bŚ}èÖZôâ…!šïÈmŃvŐíC3sÁÿ"6É”"”1f°m.weŹÁ­ą-ÍKfKmR­pš—–C5Æzêyó%Ą»gč-z{QĘlDj’Gč7@6Ȟè°3t!Êœ ‘Ž.Źț[ŚFrêP{È"Z†ŻqÙ ©ûí&[92 Čf[Š#>fŁÜ%Ô„«ÆE€‹"HR{éÙÔ{ÄԄRă%چÏßnčÜm’úÒFßh¶WȚmč¶Ù+­šûíöl%ȘOęǖ˜Ï”éăù{jŐ&«äÖaEÂÀ–QŽƒMĐj\·Č‡uč»:ËgуPČÊź*WŠa|H—]ÖöWYęjŠ©:C}ÜvČE7_š>ŰRúĂșÜÉcуX”’]u5°ì9kmÈęÇÛ\œ$ Č„Âđo.úžLrM úžčB6’]öì?r{ äSèȚÆ3ôÛjŠ@}Xfÿb`Y[„t9ÿc/æ€F„HÀŚnć6€>.±ęÓÇëù;„ńQ~ŽÙz°ű7‚ŹÂ?ŽŐ8°Ä"łHVCtI©HŠlëEˑĐ~Gï?`} of]y©ű{Y¶sĆÙć)›libü;êńQïÈ&2èČźÆő ƒmçêÎ"ƒ†?°ÄZ”íä‚ăśŸÚXX°–„úƒ:Îđ˜èăæ}ŒjÉ”ú2A mR{™•‘UĄ? ÛÏKûddUÄÀČPŽ,ńb–Wns_èÚÒúș„Đ7 VE}\ąŃÇ„^Ò /k*QdU蝂aBXóÇ11°ÌS_V}X‹ČČZirê°ÿ(€ù#ÀÙq‚ ĐÒòÿ/ŃÇMȑìpô>nŠúÒÀú{ìŚV‚}ÌóęáH"€dkKąX"Æ\!É6ÁűîÙBą (€čĂáőŽż‹>nBŽèăÒeŚ@}ë?`Ę=6iSûHT FțO \J…ŚÈăz·„șJ> ›X Ùë–„,»È•K–ƒśŸ–aù4płĂțóȘ|޶Ÿ“Ą"ŃÇíQ„yYȚÇmQ‘#śŸż†m0C·‰B­ÛęË}Ö)u©Q””Ćnű:T Ó=JŹÄ‘–ĘäJ€±'|űžv9«.(.ƒ?Ż€Ô<Ëʋ>n[Ä;҆ČíTŃÈΰđač„Um+…pù6Œż’ł$\ìÀ™EČÄÀ’.»Ž*qŽț3ŹÌ>2ïU”–ł7`ÖzPUML/úžtÙuT‰Łőń:‘+— ‚‚|`Ć4hä&{ÀÆ  LËÂÚăösÁ[CCXu5k”a”ÆrۋÙÏæ?ƒ;ÈQč<ÄŠÁ{; É ă\ôqć4°>n7črɑĄ1C:ÂŒáÚ€M¶Âæ ]GlìŒăᶅî;!b`YZÈFČćcFRĄM3 Ź)d#ÙrȱĄ W­—mæ`m,Œ=š….ê?9w”[ToȚŃéùĆòl8(Âűšg„Vqû{ió8ô ”ϗ+#ș@  e]7@ Aí ] ‚€Pè@ 4„B  ș@  ĄĐ@ h….A@(t@ BĄ @Đ ] ‚€Pè@ 4ț«œžŸÚá·&IENDźB`‚passenger-4.0.37/doc/images/smart.svg000644 000765 000024 00000030025 12233035540 020075 0ustar00honglistaff000000 000000 image/svg+xml Application code Rails framework code Other memory Worker process 1 Other memory Worker process 2 Other memory ApplicationSpawner passenger-4.0.37/doc/images/spawn_server_architecture.png000644 000765 000024 00000242135 12233035540 024223 0ustar00honglistaff000000 000000 ‰PNG  IHDRPĄĂsBIT|dˆ pHYs ‰ ‰7ÉË­tEXtSoftwarewww.inkscape.org›î< IDATxœìuxW‡ßő‡(Á A‹”H±RJ©»»~uêî-UÚҏzż– „^(-î\‚k !ž”ÙùțXv2;;B‘dłś}žyvvväÎîÙ{sîčçdY–@ TcM@  ÜJ àJ àJ àJ àJ àJ àJ à1Śt‚șŠÈQ[ś0 5]@PKJ 8Ș+’„˜ _Ôą©ȘßQˆ+ Č0ˆ©\‚cCû— ő­șG(‘€Ę.Ĕ@Pś( „Mêíz‚IˆšșƒÁ`ú=ő„’v?!Š‚ș‰đ@ U 'ȘûȘwAxÊĂTĘWœs‚đFx B 'ízUïCO^„AƒAYŽïeYÚW»M „7B@ ôac4˜±“DŽ!™(cŒ!ƓŃhŹòUÏS%ŒQAű#”@pœ.9=Ąä_$IÂëőâò–ČÇłˆĘÒ|rŒËpQRĂw"8‘0QV44œICÙÔ36OțĆ`0`2™”ś~‘€TÊ9…ˆÂD.ˆxôșÜȘL’$!IeR«<_ČĂ; /žšŒÁ)$AnA{ï dĐ#@0ùŚM&SÀșVdù_A?Ű\ „B@ "žP]ujá€^ž2ÖyŸełü Κ.Ÿ †H’ÚÓȚ}3I†6Šhò/fł9h›VH-NJ Ôn„€D4ĄÄ“ÚÛäńxđxœEđŰ“?äĂęƒșîŽÌŐ) B -@P;J1h'źȘëÎétČĆü+c™rLÄ4ŒąQ萓ÀĄòB*ÜŸŒ`%çaËé$œÔAăz9ĄDvr |0} îÊó$IR@àžÓé Ś>W9.ȚCŹ5ȘK.ší4ˆOUÖekĆqk)++ŁŒŒœŠŠ N§—Ë„€Æđxđ˜*çŽK‹­Wƒ%„q¶hą,6Ć ćLÙBĆțÓŒMz™Ê%IÂh4âőz…J #„€DGK] ö@9Nòą–+ǚ&blŃ5UtA‘`Ué{(w”(ÂI/KčÇăQ„”ŚëURűE”SAíEtá "mòLmđžÚUlߏoA4a‚ê`­|cöàŒĘ§tß9ĆŸübĘ?EŽž:ćèÂj7Â%ˆ(ȘÊÿ€Žr›+LjLă‚êe±äuòX q:J&rfr«Ő0Çą_ÌûçÆž' ö#^~Öż>· vąÎ&UĘÂȘÔ~ń€Mc 7gžQAíD(AÄpŽ.Œ-“>ĘIF‹šŽ‹eă’Ă|ÿúȚ›Ę‡¶ĘŰœ©”WźYÎÎő%4jKy±‡ÿ=ż‰á·6áÁÿvVÎőË{ÛÉßï`țo9,úëZûö”ǘ˜đÎV~Űyv@™,Ă7ź€E§xE@íÚXÂ+ŚŹ`چ·„ŹÈĂWÏmâŒÛ›òÀ˜Nʱ?œ»ĂÌęe?‹'ûźUQâ9.敃ăìôâžôșî|ś#ŒPAmE(AÄ í ć…:‘šÁŚ6âûŚ·p]ë žŹ!=†„‘yfŃńúœéăöđèç]8ûúƀÏóԈ%üôî6nz±ÛÆòŐúA4hă»ŻÌŒïśńÖ­YüęŐn†ßÖ€źSűćƒíx\^ÌV#àrzIoMÖ?ùŠ€Z9+Ÿöœë<ËËąIűbÍ@·%Ÿƒ‡ÌgÜËÙU šą<?ÙÉU¶â–WN«ÜžïÂbőч7oÉąŒŰĂG‹úÓș[’Gfò»űđț”œ>$~—TzìvŹ+Šu·&ìȘx°ön)ă‡Q[˜őĂ>.迅ČïȘÙùÜSÁ]owPŸ›7oÉÂQx­ż>ßƘÖrúTú^Ty­íkŠiĘ5đZDžŒźPŚ.ĄlSˆ' ö"Ò"ŽȘŒQČ,ă=Ę'Ś?Ӗ»Țî@Lœ…?Æîà™ —pYƒ©<{ŃRöo/ ÚżÍ鉊xè6(•3F€3éł]Ê¶ä »"ž FCźmDĂV1Ź]P lï:8gčÄÆ%ŸœVYłòiÓ-3ÏŻOÖ,_ü•ÿóźS‚ÊrńœÍiÜ֗2„ĄÓ‡Š±c]1’'ôśc40[XlUKBŠUYłòÈ^QÈĆś”PșMf#noJr†éßî 8Öl1rŚ›MŁÖ1Ž?#‰i㶝>n )VzO`ĆÌ|¶Ź,ââûŻuțMIȘogÆ·{Że5r§æZÇC(O§žx]wAx!ŻÒÊYùtì—LÖ?ùt˜Bû3’˜ôÙNœkàqyƒ”Áh ç°ô€m­:'0Ù#StÈERș~ú…ž$ ŻhÀžWș5~ę.Îàìë+B `çz߃ë°}mqÀńf«‘œÙ„ÛRى­g șÖĐë1ú?kŰŸŠ˜â©(ő0ÿś†ĘÔD@;ŚûÎż~AÛV^Ëb5°Gs­ŽÆQÊw|"Ńï.eB@ áƒđ@ "–Pâéd5b [Ć0üÖ&ŒYۏ ïnNQž‹Ù?íŰÇfŽ“ČÇű¶9Ê}]‹?ȚÆè{VÓŒcæ‡jÔ:–G‡.âČ[b±űęż;(+vsóKí”}zOççŃÛxśźŐt”Âź„LùbW@`蟖ă‰KȰokçÜX).șLá»ŚČŹ§ž°û];ÿ?ȞW6€A‹hJ =,š˜KY‘›ŸGraŐKłq皌țÏFYÈÀ+’˜fćàî VLÏŁiû8îŐŸZŚë6(…ä ;Ÿ>Ÿ“ÙÈà«sk%„ÛžóöŒït2àòÊk-Ÿvæăčęőê]ëß S=ûÂI ?„€D<ÁŚ‰ëÎzhlg–N9ÀŠyLùr7f«úÍąčùƶœgł Ńj=ÏM§yfżŽCI€ùΌ>Áć7>ߏÛëˍ41—v=êńʟœ˜ûó~e) FçĘڔ KÓóÜÊ đöœëŃu /±„¶k«aË:ő Lh ÜÀN§țÉAI=ŽmCÛ‰L·‡Œœ˜­FšžÇózpæù•éΜ„ Í3ăűț-Œs E‡\€4°“Ù'‰WTÆ%5ïOrC»Ț„ßšż+iɂ?riÓ-‘„TkĐ>ĂokJóŽńü0*űZêO-:ÆSVì:țžš†.âI O Čűś ê8êQPț)5\.‡ƒŠŠ ÊËË)))Ąžž˜ąą"Šč” üD9Ÿer#âlŃ'čŒpŽ}"W=֚[^nwô”–Mwáđ880§>…óZKll,ńńń$$$@||<ńńńÄĆĆMtt46› ›Í†ÙlÆl6c41"”@P 1P‚ˆFŻa2žŁ@VM9âőœÊ" ”œxJȘ—A$ üJ±h-ƒÁà[0BEćh6·$” zÈȌÇ[ٍê*źìRTìKłh?၈DU5\ÊzYˆL䂈Á`0 ËrJ+žád”błÙpč\xÊâ8ôSâÏYNTÓĂHȗœ’|òË I©GbT,VSőæ>„^YŠÔYN~y!ƎȀÏ$‡‘ìq (ȚœˆŐl?țWÿz(ń$șđ‚đB(ADqŽàqż€ò '·ÛÛíÆăńà)‹„àžÄöYGÂéû”sș%û‹óŰ_œG”ĆFŹ5‹ÉŒĆdÆdNȚpD–eܒ„ÛëÆévQìÔÏFïÈ·°é‹ÆžòcńäKv»=àŐ/ Ô)żˆR (âI „€D Z”¶Ï/žÜn76›­R8yy<ŹV«"œÔâÉ/  Žüúä~_[‹ę$tßOt“ F UŚqZÈ_™Èčix,ȘÁ~ï“_8©­ˆòÇAisB‰( |Jq„Ё’$ ‹Ć‚ÍfC’$eń 'ùH°žÚsćÚʄܭő‘-ąZæÓąKąKŒKœƒIˆȘ°DOčW±w‘…ČœŃmLđă›Űl2aŽ/’:æI- ąŁŁD”șOë •LS ÔN„€Dê'{”Êëő* ĄŚë ò:©Ś”çv[qeGS±±‘rœŚë“€Ż>æ#śČ7głbć .»ô2,Öș%ˆ(ô’jšLŠĄŁ'|ԍ§żŃt:X­V_š·Û}Ì*Ć€ÍfSÖcbbȚ‡+ĄæĄS‹'œÔz]xÚ r”€ 5úNxŸ‚đB(AÄąíÆ %vŽžuąDmȘ­€ÒzȎE0Őfq„L±±±Űíö,Mő9aą' Șò@©Sš…”:•6}^ @%ˆHԍ•ńHź&“É€»Ÿ¶áT7˜~ńT.Œ#ąj+QQQÊz|||Àûș€^śĘŃșđŽ"J»źÍBź7òNxŸ‚đA(AÄĄNiàïQzûj»mޱOzùą$I è‚bȘ”Ç)>>žèèè*öOŽéübÇ/|ôŠÿŃfČŚNáRé[Ax ” "Ńæ…”î<í~ÚàquÎ(­x Ő}WŚ‚ÈŐ*..Ž˜˜˜,ÍńsŹAäj„ç‰ÒNŹí¶É3‚đG(AÄąőDŻ/Tì‹zô:ŃŠV@ž%șńô‹)šJU §șê}°X*§nńgÜźkèĆ'éuœi’ž`ÒëźâI o„€Tè„8P "=/UšêNæq-fseŐáÏwTŚĐ œȘDTuí9Ax#”@ AotžZH!ĆR]ö:©Q'őç;ȘËTćR݇êąŁí‚ș‡PțF.”òżúśŃ{ŐźŚ%ÔÊ?LżźJDUçU».Ÿș_ë ÇA(!ćÿLœœźvŚéĄț.üŁÍ"PĘzêőȘöu! ‚jPŐ-őh=?z‚«.ĄPĄŠÂ©‹èęźB4 ‘‡PÁ1RĄ€Ę§ź*OR]„:śWŚż@ˆPÁqȘŃT‹ŠșȚ°F‚€RIś*B#”@pšël€y @‹PaFII ,šéb"œM›6)ë3gÎ$&&ŠK#@FF;wźéb"ƒ\4ê0«V­ąkŚź5] @ šU\y敌?ŸŠ‹!ˆ "gèŒ@ Á Btá…1ŁFąÿț5] Aòă?2zôhŠOŸNlll —H©\uŐUìÚ”«Š‹!ˆ@„€ cÚŽiCïȚœkș‚dńâĆÊzśîĘILLŹÁÒ"»Ę^ÓED(ą O àJ àJ àJ àJ àJ àJ àJ à‰4‚H€L-©ŸOY–#æŸő0 5]@PÔ) •žhž©ÉÆ«șß}]ÿ"ÉőìMïȚ…šê>a+ "”ńÒȚO]»żȘš Wšï»Șߥ.țFBÈëă·=őśQb*RHčo!Đka% Dăˆhž9™ŚŃ„«Țï)żM$Ùá±ŰÖ©S‘òœ  ő» auj %ŻJ"ùÉż&/íś},ëzïë êûòzœxœȚ,Í©Ek[Ő±«sŒ‘ú°X"­>ôٶ%íę Aur©ŐJ4^Áš*Y–#Șá‚SŚxÍÆŽöȘ]Ś{ΚíÎëő"IR –æäŁg3țmêÏÔÛdY:îß ©ă}hŹK¶§E+æë"Ç"„ô•R'‡Z) DăšHkžàÔ6^UٞÚÎB­ëœjŚëj;”$)âì0”ĘiŚőìP}LšÏęT·N;[«k¶è§ź=PVŚłT• (ϧ@ŸZ% Ș+–"čńR7T‘"  êÆK+ŠțmăÊțŽëÚEû™öxœóëNvȘ¶;·ÛÛíźÁÒ?ÇâÉTŻë‰&íâ·łP¶šg§Çúj›Ț9ê*uM@© ő0è_W €Șê=!€N,”F@ÌÆ«:•GžT0'`=Ü.šŚŃ»vńzœ!?Ół_ő9”„‹í©Q7TuA@ù©ÊC őłűŚÚŸšêxÜ«[煣Uő=ŚŐÊêx?ęŻZ»Roóï#„Ô‰ĄV(ŃxU”€’$©Î4\Ps—ö©”:vç_ŚÛÊëŠ B șĘn\.W –æÄR.ăȘìËh4êŸúŚC]S݁«ê!R»Íÿ^ïŐO8ÚZu‘e9À.ëĄPțï»z]+ÊőȘe' IDAT&ŐÇùŐڜRÇF šPâIO…jŒČ‹œŹ/òrĐ!sĐ)sÈґȚdÿșÿązÆ^SRڄ„û?à;sGŠ­«{óA[lń’l•IłÊdÆIÔ·ù>;–ÆËßpé5^z–șÁ ewțg^Ż—"§Äü|™y‡ ì,‡|—‰B·đmŠŽÖ7“òțÍÜŽ­†Ër‰6Ê$[Œ€[%șĆč93ÁM›7HžëٝÉdÂd2áőz¶ùmQ+îę •ĘÊG«”ȘĐ%s ÂK‘ûHŠż~UĘT‹%=»Š*‡Î70”óXÌFb­&ĆöŹVk€-ȘíĐߐ©G…ȘëĆC‰[ČLìwT6dń6¶N {FŒđ2E0óüșče•ȚĐŁ—QMòh-yAŐu 6Ź!T—UŠ^xᅓ}‘Łć5Q š2—‡ÿŹđ°œŒòűÌÔ(îî–JŒÍtȋ*’ŁÌt­Mv“Ò#ÎymvÁi†CqLŐAm~ń4qżÌŰ]eŸ€(3ôHŁIŒő€Ü“ ü°™ôhĂÁ27čeŸÄą%XŰç¶Ò‰ ©ïÔùvüh=ŸjšĂíaä:#[Ê*=MŹÜŚ=őlBd$Šgđá’5XȘšeéä_Á`šUȘmr ˆ_íN€±)'`zu.( T(%„ShNYÿ„VH©œOŠûXOKź=•@JĂ&\xïAۋća4™ˆ‰Odߖ”—Óæô3Űżuy{wW/™Æí2±Ű*cgyeE‡IÊhÄÁĘ;(ÈĘG«ź=1[|q<čûÈʱ•–»c‹Ž șÛ8žgÍ[“Òš©Čœ wŃq Šž++.€ąž(`ŸCûś›˜€œWr»Ù»e„‡hÜ.“ű”4e_·ËIáR7ŁŽ°€kVĐČKOĘïšŹè0%Ć$7lRcžÌÔJć0Ú(­€șĘșÓ@ćˆ<ÿûg„ˆožh«5OțGă˧ïćŹËodăâ謙3Ă.bđuw0ùłŃŹ_ű%ù€4lÂÀ«o„ó€s”ățÿ%^Ią^ZÿüđČ,3èšÛèvö–Nț•żÿ€ŁŹ”óï~„ÌŸƒźùÏű/Y9}e…ŽìړKx†šžx$·›Ï»“‹xšôf-˜đÖs Ë\ńŰˀÏ~}ÿn}ężXíQHn7ÇŸĆú…ł1 döÄywŽÄdöUOY3'łcÍ ș9żżüœ­›yiâÂ ïĄ€ Ÿ o=GfŸAôqÙIú¶Në€JUdŽĂ­±A—ËĐMâoŽÖ”Wv‹gÄZj]ìÓőÏżĂ°[ïŻébȘ@+â7{êÚ„;”‹ÇăQ„“$IŠG^;”ząk!š*9ćÿNœš|g„€Š¶±™ĂăúìŃ;°ÇƱwózíßC«nœxì뉌zŐPvo\CrƒÆìĘŒžž€F~ù-:ÀâI?óÓ[ÏŃęœ ™ûó7x% «=ŠQ3V1țő§X9}ΊrRÓymÊ2â’R(<˜Ë˜{ŻcęÂÈhȚšęÛ6sö wqËëÿĆ`0đùăwŃ e[ź{îmŸxünț1žŃ Č©ßŒ5eE‡č·g3^úc­OïMîŽ-Œsë%ìßș‰„Ôúććrő“Ż3âîGŰč6‹gÏ?ƒ^x—ï^yŒ”FMčçꯃŸ‡ ‹æđȚm—rÙ#/pÎÍśžąo?m–ú"ÙJą»qwżÿ?șŸsáIűö«OœŐ„”yòб)#íüO\~o€ÛíV*ăuX% jcÖûß?xß?xMyÁ=qÍ3Ł_WÊłfìÿÀÇă•őîç\HQ^.3Æ}à…:œ»Ÿ7gŹÆËÙ7Ț͚9Әôń;|șö &ł™WȚÌ-íÙŒd>úbچŐÌúțsž?Žę†ĐmèùÜŐ%ƒeS~ŁŚˆËèŰëæÏdűíČqń\Žj‡ŐngĂąÙœ>ôÖϟEf?ŸG+{Ć"VNŸÄ“ßMQœV]{òú”çČ}őrZtîűûząò^͖‹yëæ qçĂJY“ÄÛăœJ vl§2êIkțn€ĂRe•Źb”­ˆ7™-M&æLűšm«–‘Úžg]~#ő›”ąŽ°€œm›éwéuXlvÖ̙Ƌ—œĆ+“+uĐșùłŰ›œű€Îșò&VϞʻ·]Êč·?Àæe 9óÂ+YòŚ/ŒsëÌÍÚŻ|gïĘq9;ŚŻbàU·Ÿ’ÆŽŻ>bóČ<;a&1ń‰Ź7“5s§ÓïÒë(ÈĘÇÔ/?Ä­x6—Nț•œÙ0yxzćŠ!äîÜʈ»FRVx˜ßxš=›Öqû›Ÿ°cÍ ț1‹ÍNÿËo cƒÆAßÍîkxășóèù tRęÇj‚xk„ –lžÜn,‹RZ,ĘxÚT~ÔčÌ•œ’(őșžˆ:äȘüQjŁ€òž]ćć*ïŐńO Z”SŽŸÆí29|`?9ÛČ)/)ąA«v,òČŚ‹AŐ}tᜏc‹ŽÁt8Œż?ÿ€óîx‹Ő†%ÉFÇ~CX3gę.»ž’‚|–ęę;3‰zé hÔŠ==̘Ó'*jÜ SRÏáû‘œ^Μí~ÖΛÁЛîaęüYŽï}F“‰Â9lZ2;ßꂮ&ÍręüüÎ ,ü}|€€:çæÿ(âIÍcȚàŻOßăÉïÿŠU·^'êëțŚ e1R~$3y™ÁŠ4XêW·ÛŃhÄăńœûí±\źŹtbkÉ 5ĂnœŸóîxHyŸ ŹwxnĐțëæÏdÖwŸ“żwΊrJ òIL«°O‡>ìče—DĆÆ+Ęg&ł™æ™]ÙŒlúbkÖRÌV›—ÎÒ ÉiìÙŒž^#.#łï`f~û)’ÇĂÚy3èŰf‹•5sŠÓmÈ6,œÍï~Àźő«±ŰìœvÆYÊčÚőê‡ÙbeÇڕŠ`ŠON„ùźš g3óÛOčő±ôčèêcű6OÚLáČQiŹüvh2™$)(ÓsĄ\™Ÿ ÎVûlp܋#śâHćę5όâ‚{ QÛ<űɄ€ęïę?eœçđKÈʱ•Yß}Š(€ČÂȚ™ł“ÙÌYWȚÄ-m™3ák%¶ȘŚy—qkû$vo\CÓöYżà–Nț•7Š­€YfW:öÌęgŽdę‚èĐg û fĘŒô»ô:Ö͛I»^ęÈÛ»‹m«–ÒŠû™"~ćŒId/_ÈkS–)öÖž]&ĘțçqҚ¶|œ,ȚźÔ—jÖΝÎûw]ĆŐOœÎàëî8ȚŻùž‰S”ŁFJ$Ö#"Êo‡z9 ôD”đB…攌ÂÓ $W‹(§·òDZÔÂę Z” šÔŽWUü~țśÌęÌüî3қ”$ŁE\ćHn7ć„ĆÄÄûòt$e4R„@rF#ŽjKT\ć0ú€ŒFlXűč;¶đîm—]ŻeW_\Răv™Ä%§Čnț,çî#łï :ö?›G=ƒW’X·`CŽüčóśíö•żw`ùÛöèÁ]Û¶Ö;űwoXĂ֕Kxàăk…xòŁž•^’ ˜€Z0éńx†”û^k°àŐ &!QWÈJ%ïgĂą9ŒzŐP.yđú]v=©›1óÛOY7?ĐKćïöc¶X‰«—°Íd”âńű&,-/*Äl±ÄôœsËœŽ:ŚźW?\NÛV-eĘŒ™\óô˜,Ÿzú>vŹËąŒŽ˜}ŸxÀèű„;ÀMTl„%•śŚ€čn%n2[<ʋ uż—Ú€äő╜A]&'(ăłK%âí”0qæe#ŸçŹ+nRȚ«S™t,âWLŸÈܟŸáĐț=ž ór1š’» źvłĆJł]<Ńń 4hٖìe iÚŸ3[V.&&>‘ćSÿ`ùÔ?”ębê±7{=ú $łï`~xę)Àś ѱßòöìd͜éŸsd-áŠÇ_|uY\R Í;vSΕÙgȦˎuYÊ«A˶șâiù”ßùꃌžïŁïé:xx”żË“‰Öv*$9 a°ÖC%Ò9 Șæ”çòż.”O4UmCČ5k)ù!/M\šxqæęò-«gOEĘBŒÁ•ŁÁșŒ­ç«šž?ÓzśŚĘÇ`0ÙgëæÏ€ g/ʇ]Dƒ–m±GÇČrÆ$ön^ŻÇ$úČwçîŰąû‚/À·i‡ÎśhÖ€}'z »ˆÏ»ƒähÓę̐eŻ)ŒČČąPMÖĆJbćŒIŽîÚ+`ÔȚŽ5+ŽûŒ-ÛPQZBçĂhÖĄ‹î>ö˜XZwíƂß~`ÿÖMœÖ»?Ł‘ŒĘ;˜;ákšgv%&ÁgiMšS”w€ĘŚÒ䮎ìÙŽ–’ÇÈhŃúšćiÛłW?ő:oȚx>.GçĘùđqßă‰F’ŒHr°úcńÔqx”ŰÄ€Đ"ŸI ˆ_öśïŒ{Û„\ęäk șæ6R6á1o(o~Ž‚Ęl”«Ęf±âqûr•b¶Ù‚êȚ țó˜â„Ìì7˜‚ûśČÛfÖ͛ÉЛțĂÁĘۙúćZŸȚłÙB›îŸúÙQVJBJZ@“XłĆŠC-â5)êòJn7„ĆșŸŚ$ŻŚg‡U'œDš@Jx€*9ć8zAä•Q+ᏳŹ‹ŐFă6•čQ–țőËqŸ7­I ’4fö_}Š6öŽę‡°zöT6.žKÇ#b©CßAü8êÓê+9[R7#>%3&)ÇÈaچŐŐCȚûW<úŻ_3Œ gÿû›;Iè„ÌĐQz•FžÓșk/ömÙè{òw:˜ùĘglÉZrÜçí2è\”íÀŻ=É֕ŸóÉ^/ëæÏäÀÎJÏef?_7^«nœ°EÇ`”GŃșûÌśIÀˆŸÎ‡‘Tż!?ŸńŽotéźíü8êYR5­vÉiœûóôűéü:ú~{ÿŐăŸÇzž;mʉ›ß+P—X1őOșÎÿyœÎÎĄaëÓ۶jÙqŸ7ŁeŠóÒçą«čđȚ'ÿCkœô4l}ÓŸúgy-:NfŸAl]””ćÿźtƒOÄïÍȚÀáû•kd/[ˆÇí"ŁćŃsęu<œ>ț‘OŸU·~ź x«x ŐmWŚêēÁ)PĄ‚Ò|ÛOU)N>íÏ@Bj:ïÜz “?}gÎëEĄ*~êßb2›čëœ/Y2égž:·żű:ÿûïĘ~ż~EÙ/łï`òśî">9UybÊì3ˆ=›ÖŃĄÏ e?łĆÊuÏŸĆôŻÇòòƒùá”'9 Í;vcÀ•7W»\ĂnœŸë_x—Q7ŒđyÙjĄ.­xòŻŚ%șŸs!™ęóPß¶ÜŃ)Ÿÿ\7DZb¶Xyü›Ix%‰gFôæÖӒžźčOœgE™Č_fßÁxÜ.%Đ<`[ÿÊm¶šhùêwömĘÄCęÚòPż¶älÏæ‘Ż~Çb­țέșöäٟg1ćóśÿÆÓÇ}Ÿ'Yö=4Ș1”Ö%ZuëĆźő«)Ê;€ŁŹ”ż>y—œíÙÇ}Ț3.ž’䍶Ò#ì\ż đ·gÍű+@eö̌qŸĐŸÏ@Œ&ń)i4lՎ~ű2@Äśq1ń‰|ûÒŁäìeߖüúÁ«49­#­»őșŸĘÎÁ#ÿûƒÿ=s?Óż{Üśxą‘€àúO-œB‰(ĐĆű8„‰4ŐïĂEávvćĆúٞόè*ąă¶ŒF^žŽˆEüȞMëpŐ-tz3ŸęD‰óh–Ù…á·?p\ënœ1kŒög U•Ă©cż!Œ5k-łüŠ=›Öa”ÙiÛł/œÏż\Ù'”q3źyúwz—AçrÙÈ烞èû_~éÍZČdÒÏäîă҇žćì›îQF&7hÄe#ŸÈ~ жgßû kn#!5kWrZïțń,5‰6ă}šŠ#ű`ńöŸ}ŸáPĐ6“ĆÂCŸęLyq’Ç­Ä:]ńèKÊ>ț@n5țÔjŽŁûR7ăéńÓp”•Rł—˜„zÊpq?ízőcüțÀÿö%>Ă%>tț»3zA6‡ìǀÄôŒ€Ï/žç1%PYÍăăț xߏC>]{0hżšFí Ő[ŐèŠÚöôŻésŃŐŹ˜>‘{{6Ăl±ĐąK†Ęz?;ŚeŚyí1±<őĂT>~űVž8»+qő’)/)"œY«€Ô™ę3ő«1"ŸCŸAìȚžV _·äÈŻ~çŁûźçțȚ-‘$Í:táĄÏ~Ö ”EÇ~Cxâ»)ŒșțŒZŚì•ƒŐu`š6č¶·Ï5A>Iߐö‰ËÿăùGAùg&w8<ŸmaNĄOEy(9œÂĄűP%ùÛ röČvȚŒ ę €Ńw^A«.=ÙŸf+ŠOÄb”1ôæÿpù#/*Łc~zûyf~û)…s±EÇĐ鏥ÜúÚGJŸš§†uçòG^€ëóxïöË8°sŻO[‰Á` g{6Ż]}/O\DbZ}ž<çtFÜę‹ÿœÀêÙS1™Í\úĐsŒžû„ÌĆùùê™ûY=ûoœćŽìԝ;ȚțLÉ$>ꛏY3{*]çś^Ł g/ßí@Îò2ŸyáaÖ̙FțȚ]ŰcăžđȚ'žèŸ'(+:Ì7/<̊©RQZLÓöčmÔÇÊ\T ~ûžY?|ÁàkogšgÉĘč•ûÇțÀŻŁ_áő©+’țòîKìÛȑûÇțÀÆĆsśâHvmX-*šȚ#.çÆ—Fc‹ö Í~óÆóé<à¶f-eĆŽ?é:h8śęśûśĂŚ"òśíæ•+†à(+Ą~óÖäîÜJ·ÁçqÇ۟!Ë2śőjÎĆ<Í_ŸŒKRę†äîÜʰ[ï穗ß|â鎎iDÇ'ŸÈîkhȚ±û‹űäTJâȚžÍœp ő›”ąŹè0śölFû3(yœŠ~5†ż~Ïš«8°kś?_ÍśŻ>Alb…sžæéQœÏŁJč§ó1ߟ8’šűÜD'$2òËߔi\Æ>t3 )él_ł‚ÂŒ\ÚöèĂÈ/~ șÿŹ™“ùűá[ˆŠ'>9•œÙëčńĆќućMÌÿő;Ÿxò,VČ,cČXxűó_”ÌÒÿ{öŒ’‡Cûöł=›ŠșĐČKVϞÊÓV*Ś‘e™§‡śdűírîmà(+ćłGï`Áï?Đ e[rvlĄÛ<đńxŹö(\Ž îë՜«ž|_ß{™Äô .Œś _{ûI±ƒš&oÏNÖ̝΁ÛHÊhÈégŸOjăfž]NțöĘÏœˆ‹æ°cíJŽlKïóŻP橓e™mYKÙžx.„…€4jJïó/WŠb)ÈÙˆEsè{É”Ÿęœ^æț<ŽÆm;(őÉț­›Ű›œžĂ/Ą8ÿ Y3'ÓśÒëX9}";Öź$Łe[ú^|MPț„Ź™“ÙŸz9ö˜Xș=‚Œ•ÂłfüEJŁŠM&Vÿó7ń)iJÔÈČÌź «Y7weƅ€7kIs/Væ'X;o[V,Æb”ŃeĐč4n—YùÙÜéÄÖK&*.žUłŠ`±ÙIȘߐž€Z™T]ŠÄô e~œČâB–OùÜ[Ikڂ3/žR©će,žű=Ï»”ìe ŰŒ|!g^p„Rڟ(Ž0.8vêŒjûšü1æ n~m ăvT0fé΀YÛ ä0á­çšWżïÍßÌe#ŸgÊgŁČÉÖo֊g~œÁŚ[Kyòûż):˜Ëgß„|žÖŽYł&Ÿ§ü•Ó'‘·g'»7ź`ĘŒ™M&Óê>ÏÀžŠCŸŒ={=çßę(ßœò{7Ż|ć+WžMyq!țïOȚł‘†mÚóÚ5Ăp–ûČ=W”±fîtÿ9»Țù‚wælĐœÿÆɖ‹yò»)|»ËĆkS–üÙßșńìÜÆŸüÈû ·ÒŠG^żf˜òd_QZ–拘țőXnzć>XŒÎ‡‘·g'+§MTÎă•$ŠûXIP·{ăZ^Ÿ|]Ë{s71òó_Ù¶jß<ÿPÀw?ț§IHM畿–pÍ3ŁŽőç Š|ț>ÛeòńȘ^űm.cWîăòG_ ŰgÁoßóÊ_Kœp #żü©_~ÈÊ韩v F#/ü6—oçi+ùtíAe„ÊÔ%IőÒ e[ÖΝÀúÿȚ€ÙË*^Cő ô~VNŸÄ‹·ńߕ{čü‘ùéíçq”•œb_>yśŒÿ5cWìeìȘędöÌGś]àęš3á\xߌ]čOW<üòȚKœŚ#Œ^ÍK.àÓ”•Žœ›Ś3öÁ›žá…w›”Ÿ±Yû8ó«űđžkŒ’‹țœÀYWȚÄŰUûyf Îșò&vźËbśÆ”Ê>ÍĄ wŸÒ€țôöól]””Ń ČywȚ&>\ȃ=›ŚńçG¶6ïçqŒôç>XŽ­ÎŠ§Ź™“yd`&›ÏĆl±°qŃeêGi cș™1ś^ÇžGrh߯>x3o\7\ù­‹ò0úÎ+ÈٞËQÁÔŻÆđpß¶Š·Ôëő2æȚë8žË—ôuÇș,Æ>x?Œö€R†ż>y—żù’öoÏVźùË{/łoë&>~űŸzæ>eÉăáë†óÁĘW‘»c +ŠęÉgweő?+ûüòȚK|ÿêă/9|ˆ±ĘÌÇßÂ'#oăpî~]ÏȘ öQç=P{6ź%>9•&§uÂl±’˜žAÏá—ìSŻ~źțÀ75ɶU˘úŐ†Țtę.»đ‰„&í:rîí0æH#b0Éì;˜ÉŸŸđöÎ;<Șrù㟳œ€'„ ôȚ{„ ì۰\ëφxïU‘‹Š »bCl`l(\œ Xè]z „ée“íûûcٓł›ĘM€Ÿïóìł»gOywwÎÌś™w†Ă[ŚÓČ]GÚöèËŸukHêȚ‡ęÖz”wEÜÉÿx€+|‚•ïżBòß[iŐ„‡»ńïŃükńbăÎÏŒÁ=œ[ČsőJ†_1pÏ\îze‘ßáœ<ž—–m;ĐČmG”*ńí;‹ł·ƒ›ÿâđ¶ ŒŒvmșőà–čŻČńû/ÙČò&Ìp“D«čœÏŒáŐ­|ÈÔ«ùë›% čôöüù+eE… »ì:~|g>ú+_Ç&”çŠçnæöȚûPĆ·ëÄÍÿy„ÿdă†B©$/+Žƒ{HêȚAˆl™à”ÏÀÉÓĆșƒ&OŁM·Țl\ń5ę'\Š Žê҃SǏ’“žŠ„ŒŒ¶=ú’òś6ńűžŁÇłĂZ&Ìž—}ëŚ0ôòëŰ”z%‡¶ŹŁçˆ‹9Œmƒ(sLŒíÿÄq żò–ż2—ÜŒ4ZuéÁ_}L—A#ÄÿXŁÓ3őžYüslΜ[Èœo~ʀ —Uú|淟łí—x{Ëqąâ[°êęWùdöę œ|…šŻmț‹[RÄ}ČSSűțÍç8±o—š7țđ±qb묏ż}òè'?ˆcytl~XđB%Ęśö¶TŃă'ŁáŁÉÿSƒ§\Ćÿ>y›»{ĆÒ{ÌDF_;ƒA“§ĄP*Ć}zJz⻇ÒП–át8P(•lûù{–żüČRŽ 7†ąP©pŰl”äçKÏQăűè±{É?•!’„€}ŰòÓrŠȚ3‹ƒ›țäŽßóșFߋ&‹Ż•*ńș`*pç«€ȚZŁćę™·yŁT©ÄÙž=cÁÈÀűśòÚWroßxúOž”q7Ę%6 Î8r„ZÍâ9ȚFŐét’VŃ6,șE%ă2öúÛy~úŠsÏË_Ë3dêŐèCĂÄs›Š ™wőXń›Ő‚Óá 7#M4hœÇL :țŠ‚Kî|˜ÜŒ“Ìž<è„Ö\|Ó]Œ»ùnŻNôʆŒò:ŠË‘€íwśúȚËyyÆe$ïÚBb§nĶiGNz*ŠąBqÿ^#DZèŸwč›ûź_˝óßÇZ^ÆŸőkĐŒŰmVș íuNgCdŃg‚Ç•zŒŁ;7sK[ïźśj–ŒS"ê>lL•ßÿæčŻòŐóqÿÀ6Žï3‰·țĂŻŒ”FKvj ™É‡*]G„R“:S$PĘü\gÌő·ńÍ«Oqă“/a5—łeŐ·bč8/‡ò’bŸ˜ś/Ÿ|Ö»ŒŻĄ­ÎwhìHêȚ‡M+Ÿ&ŠU']^‰Àƒ»‡ąÇ€'tèBëź=9°áw†_1AĄ 8/‡-+ż!/+«č•FCVÊńű^ŁÆ±ęZÆĘtûÖŻeÔŐ7S”“ÍámˆoߙìԔJ^ĐQWß,Ÿî6t4›ÂœÓD'ŽfښÿÒyàpNÜ+îÓ*‰œôT łO‰iœFOHžÀíÁmĘ”'+ß}»ĆBï1E]đśÚÿÒĄÏ NŸ8Æéî\ÀÈűDŠór8}â­:wÜ-Š<ä ÜäŻëQü”|‰H țZ¶˜ŃŚĘŠ ”qdûFŠ?ń‚WĂővœú“ŒcłŚ‡^z­Lžšüż„ ăĆ_wrtÇ&6­XÊ'łïç§w_âùŸ+fîŸÉËV‹…B‰ P—•΂ûnàșÏcìő·ˁđì”ă<ۀ6źmGbÛ°oęZöŻ_Ë5ÿ|š€nœùtö€üœÒÂ|zŽô&ij­·±AŒG ‚€Foà†Ùó+}Ÿè„Š›7$*șÒçŸhß{ ¶gښUlùi9ÏOŸÈĆ7ȚÉ­óȚDT*5Ś=ö\„~wžp#ž{EùVKî6l Ń ­ÙđĂWŒŸv;ę‰ÇŸšèM&û fêʕûAIŽ§^SFT\"/\Jqî¶ęò?ű&)»·{…ŒČSSŒŽ9“v\œuÿńőÇ€ìÙÎ{;Ó1†G°xÎCìțœąśWśác)-*`çê•äe„Óyđ,će,{izc(ûFg ńșF°*ŰÆˆ(z™Èă_üô»©uș Ÿt0”§Ÿÿ‹Ó'’Ùôă2>æQJ òžôȚG1†GÒĄï ž]č9è94ÚÊŚvùő,™;“=țJQn6:c}/șpßû „’;_^Xeƒlßû±)bڃOʂ_>|“OfßOÿń—2ęńçœò|ZŸő€zĐŠ[o ÏžÛÒd=Ȝ©Cè4`íző'ĄCČÓRŒö{ŽÇÇOü6‹™#Û6pïë“șïoö攚üŹ ąZ{ć/^ï aîȚąv«p§;8l6~|Ç[ö;ÉkAKûȚȘüțŒóż|Œ€gߏ„ÌÄš«oæúǟ'42šŒŹ òOgúœŽÓQ±ÆßuÆNżŻž{Œ[æŸJVÊNìÛĆĂ —îŒ0€ĘkæĐæżŒŽKèĐĆë}uŸƒŒ†…&O <èU…˜Ä68žűêAś«ŽŽ‰ŠoĆMs^æÆÙó9žéOȚ›y-Z·ćŠ'&± v›őœź3ôÒkùôÉÙęÇ/ÚȎźCF‰ȚÙè„Ö€; D~>Śï ŁaĄVț±†”ÙżæóXóù€ÜĂÉC{ùő“whŐ„‡ŚŹÇf1łàŸ8șs3_=ś;[Éćś»]ț]‡ŒBÆ7ŻÌ%őÀn–Î’]kVUșNÏQăŰęû/Žï3}ˆ» mÏóśšÿÖXiô7…^Ł'°èŸw±jákœ<ŽC[ÖńŐó“~xÎ”ôĆÙlYù Y)G8șcżÿЁ“§! cèeŚČdîL~|g>iśpxÛŸyő)’wn©òÜcź»•Žƒ{űaÁ ŒŸv†—AșöŸÏPn*áŐÛ§±ù§ćd9ÀŽ_Ź.l.xaúD>}òAÖ~±ˆȚzžï^ŸÇ%w>씏©š€ÿ\6Œ ^`æˆÎ„ĆÄ2éöyŐMœ<ŒśgȚƏïÌgæÈÎDĆ'VșNϑăH?Œ_4zúĐ0Úś@Ƒ^]髃‰·ĘO·acűç۞,|ä~[ü_>śoÙ„êƒ%°”™xdd–Î’?Ÿț˜Żž{ŒM+ŸżÿÈ«ofĐäi<9uïńóßęŠU _eÛÏßóó‡ob ‹ óÀáDžÍ-ˆŒK ƒÏ]ZŽnËű[î!3ùc} WLb^Zœ›„/ÎfÙKs°”™ˆNl͐)^vœˆ3ŽÚ@CȘź;íÁ'Ű»n57ÿEl›vÜśæbș á”ÏMs^&+ćÉ;7sŃ w0éŽE2ĐšWÖîe㊯ÉËJçÖgȚ *ŸG¶oô:ÇèknAŁÓ1ôÒkĆmWÍü)»·Ó©ÿPq[hT Ś<ú”WHOĄTqÍŁOu6LŹP*™łt5ëżû‚ä][8Œu=Qń‰üăĆwĆcF^u“(“ ŃéčæŃ§8öś6öŻ_K»^ę™·rIĘûnoæŁŸüÀ柖qhëzmYGdËxf<ęșžÔ{ÈÔ«QȘŐ~ÏßsÄĆ\őÈĐŒ^á(€V]zđÚ_YûĆ"2&/ó$ńș0ôlbŒJ„vg?dŽ©á©inę‘Ű©§3I;ž—Y}ç”Ob§n<0ž-m{őăÀ†ß{ęíôœŰ{ęíüwák<:Š;‘-8yh/CŠ\MNFȘŚ9zŽÇȘś_ »1,‚¶=û‘Č{{„T†Ș0æúÛH;ž‡č—'Ÿ}gZwëEvj „yŒł=­êœEQîց·“ۆô#(ÊÉóćNș‚«gÍețÍSˆi•DûȚÈIO%+ćŸ)ȘzœŚĘÆŒk.Bk0zĘ{wœČˆŚïŒš{úÄŃmŰŽz©ûțfűŽéâ⍂«ʊż~c‡‡ĂĘnÇj”b”Z±X,˜ÍfžNÖ°źÈƒĐ+VÏ]}«î:_<=mœÇNâȘ™sêìš2jOț™E‰Ő=Kî•șšù{Đj”âC§ÓĄÓéĐh4šŐjT*J„AxÆ:ÜrxU—Æ&…Öɘ].7$*xêûż*%yËh|È6Ùx~ăińę€CKha+ćN«ŐąV«EùSH&sóô—à8ž©gCŒl\„…ù$ïÜBț© â;tĄËÀá")-ÉÏ漞-xőę8v±”gÁ‰›œę†Ęf„Ë X-fJ òŒ™ž9MÖ±Ătì?Nžë?•äyMʊ‹HĘÿ7ʇ·ÙŹ’wlŠÓ€Ą^yiYÇsbÿߘKKˆIlCŚĄŁĆ”ŠûvĘąÊÉXnæIRvo§Ž0ŸŽęÓŠ[ïJaÜìÔŽïʁ©ššžDș+N2NڋÎêwáŽËćâЖuBĂüźæt9Ț¶SǏąRkhŐč;íz@„€ßù|Zdćő­ÙâûӖ«¶c00 FŒFŁűȚ`0 ŚëE=é«•J% …AćŒfà’!C†ŒúDCIi‰ˆąßž)Uî—Ôœèô…R­ëwy“ŰÆë}DlœŚ"Àon›!,܋<Ûăï»Ís| üžêxâ=ăô«/Ü%_:űęÌSêĆAș’SP(è6tŽß R ïÜĐ ÍlŽ9„țP'Yk čd|ÏQăh}+ŸÊhX&s Ą† ücțûğ-í ŁiĄȘŒrUh2'jĘH)x+“ÚE`H‹éÉhzđ%ïU±ú‚§h©ŒŠ‹†L”Œá‘ŒŸî±Iíë{(2 d“ÔYŻ!+ÍՔ3Y9ÈšxHŒ§\}êE…RYă2\Tîçk“ęœŽG֗nȅ'dȐ!C†Œf‚ê§@ûËđ†L dȐ!C† 2j™@ɐ!C† 2dÔrƒjÀćłĘSödą@«R càu»ÓE±ĆŽĆîÀlsbq8ëuŃECR! S)Đ©èŐJBŽ*d‰”!CF]B&P>pč  ÜÆ“…ü2+ć6'6‡ÙfyC­tŻHƒš–F-Q”LȘ.,v'§K-œ)”_fĂ)3Š*ĄU)haÔą!ÖšEĆ šm™í˜íŹv'§“æź]€J! U*ĐȘÔJą4J9šÓœ šł°:œÏ/#ŁÈŒÍáŹïá4xŰnbYb±sČ •B .TGÇhz”ČŸ‡Ś(á‘ÁŽ‚r™4Ő»“Œąr2ŠÊ1š•tŒ1’ȘCvKrLVČK,d›,XíČ>ŹˆÒ©‰ ђź“ÉT3@ł'P§‹eœ((ĂÖčÂît‘QTNV±™€H=ą šeR-ž€ùe€ä›Ê BƒJQ­@„YÙîÄdsböó{•Ùì=Ủü2z¶ %Bïż‡žŒÊÈ7Y9’gą°ÜVßCi|pA~čürÇòLŽ2Đ.€J)߯M͚@™lveQj±WúL§RĐ>\CŒAEˆZQŁ@',„6&›“œr)…Jm3T§ËƉü2N›éŸNžN6^Á`wžŰsȘ˜3&‹Śv…­B4tŠÔĐ)BK„F)‡„üÀát‘iȑ\`%čĐBĆ!~Vb±ł5œî±!ŽŽĐŚă(>lNûN“]jńûčF!źUȘQąV ”I<ć6'%gĆčś„òXꉓćôŒ „eˆ6ÀYd4f4[•SjeÏ©"l’Ìpè©ePœDŁYGB)rÊ“]9ćìÍ-íÍv'[NÒ#.”VaŠAfSCčÍÁŽŒ"J­ȚŸK€–±­BˆÒÉĄĐȘ TŽ ŐĐ&TĂž6!)°đGz©H€œ.ûłK(¶Úé5gß IDAT*Gôü ÔbgWf&›7 0šôˆÒŃ1ÂęûÊú00Š-’‹Ź-°Zl·[NțÎ,ą}Ž‘N1FYțšš%:cȰ+«Èk5Sbˆš‰mB‰36˟äœ!-*.1†2$ÎÀÚôRŽșg±N—{VëpžHŠ”=RŰ.vdz“§p­’+ڇ‘"{íÎ]"”tŠĐČù”‰őY&ń?YPŽFĄ SŒ±~ŰÀ[fćïÌ"쒉€V)0$ÎÀà–Ôrű©ZÓ*«g@ŹžŹRd”rČÄu)y&J-vú%„Ëžä&„f“*±ŰٓUìEžÄêččk€LžÎQ:%Śv gl«/%q(§„“5đÍ .ü}Ê;tœȘá¶î‘2yșP0"ÁÈu"ĐIÀ±<™ĆæzYĂB©ĆÎßYȚä©Mšš{{E3"Á(“§sDBˆš›șFryû0Ô·]v©…Ù%ő82͊@YNvdx+ŒKچ21)TvO_@ ‹7pu‡pń7uč`ś©"LVGđ› Žć™È•Êxٚk;‡cP5«Û±ÖŃ>\ĂM]#ŃHnîę§Küæ<67XNvfy-ZŰRÏ ]"1še9Œè­ăæź‘„i*~ÏôąrNä—Őăšd\H4«;ćhź łœÂˆH0Ò·…ZȘ tŠÔ2ŸMšűȚîpqđŒ<û*·98.Q a·ŚN-3űZAŹAĆÂDšÓćâpnięȘ`ÿéÊ$9OCâ Lh#O$/4âŒ*nèéć =œ[J±L⛚ *”ŰÉ(*ßw‰Ô2*Q·šM ˆŐÓ_BPsMÖfÊ;škk< ÀŽać­ąc„–Á- âûœR+ùÍXóËl^«í:GjčšUH=Žši#J§äêN+]p(G&ńMÍFsÉ­H(U)Æ· ‘WDÔ.jâEŽ4cĆQfspJ’ƒÓ3F'ç<ŐF$ŃKB€ÉyŠzMęÁ–܃Z„Àä€P9±č–Ń&TÍà–“É|“•3JFÈh§1XÌfJŠ ‰ŒŽA©Șú/-ÈË%ęÄqÂ##iŐ¶=JeőÈdiI1ł™è±5_Żżg”b9›°š]bi–6„a“¶aBjhž>Ç@§ÓÓŠ}Š^{QŃŐ>ÇҏòĂWKXöûfŸùZÚuîÂÌčÏŐh,à–‡]›7ČwÇ6rČOqëę3ißčkĐcvlZϚŸ~ őŰQ ƆŽÇŐ·Ü^„ܚËËùjŃ»ìÙŸ›ÍJŸCžç_łk4ȚžŃ:țH/Ćér«ƒìR mšYÍÓ%Đ”‚A-ëçû§9„FŁ„u»öüœușt#,"Č^ÆSĐ(†ÇY}ҝ šo¶a”;ŃȋG-šĆ?wZbžZ…hÎy”Ó­S.fd‡xFvˆg@\Ł:&°ű7jtŽ­ëțäço—ŠïżÿüSöîŰzNăùuĆ·\5ą?ęăBÙ!ž”#‡‚îołZ™>n8ĂÛÆrçŽÉLêәKöàđŸ=A{ëÙÿ0±w'Ƈ3„·S©è^Q‰śt3t][ìNŠ$í1:GÔŒ2ńżŹbߎmŽh‡ÍjćĂŚ_bbïNdŠ„VûĘúôcڍ3j|műńëÏyâžÛŰ”yË>ț€Ó™UóЍWS—Ëđ‹'É+Oț‹'ïż3è1ƅÜ8a$?·Œ>ƒ†0häŽŰWăńT Z‡hÄśȘn7Už\pŠŽ"ś«k”öœÚ]>€7—ôëÊ%ęșręECùÏwq"ùHÎńȚügYöÉâûŠ_ÉŸÛk<›ŐÊksçҁ=èÛÂÀ˜Î­xzæ}=ÎápđÂżg2¶KkFuLà陶ałϋ3—•ńŰ]3Ńź%ăzŽă­gÿƒ«†=+»Fj+RG\ÍO›šŒʅ;i҃ΑšÀ;Wwÿó f=ęÙY™|±đmæ?>‹Î=z1üąńŐ:țŸÇæàr^˜Đ1$”îú?"ąąyđÆ«ȘÜßćr1üąńŒőù7ŽLH$3-•Y·Mç‰{nă‡M<.ĄuÏ}–Gđùû ÎiŹ#”ÌwÏ~MVV‡łY5Û,”:ŒŰwˆ879ìÖ§Ì~€ç<ĂèN‰üđćbq@ÎéS€9„Ț`€K^è ŚŽĘș“Ű&)è5 óó8ž{Ń1tîȚ•Úż·đúÛïæŠ»ï§Üdą_Ëê…#ÿ·ûˆ——ĄmÇÎŒôÄŁ<ùÊ[„†…û=æŁ7^FŸ^ł”æüîßÒJ܆Ȁ™­„*2Û°J„w‰<·©ÇŽrۏ0rü$R“Čôă…܈ZŁáŻŸ§ïaŹ\ú„WÏś^{»·nŠcŚîæçŃ".žOW­ń»o b Ÿ!šÎĘ{ârčpŰ“™Ż?|Ÿ9ŻœÍfćè}Žn߁°đˆ_ TR“ÇêpșgXÍ$ZÚȘE©h} ÚwîÊàQc|EC4î+ŸÊ8‰©Ž„¶:‹ÛțȚș™Ÿƒ‡ńàœg0l$o?ÿŸț’űùĄœ»ÙòŚïțNGFê șù:víÎ#O=Ï€iڐ{&û‚ŚR%©C§ 2 ß|ł­x«3A…BQë2i–ÈĄA­8ïUOyč,~ç N„Ÿ‰4ÀőwÜĂúcY|čz=›RÏ0ńò«˜7ëțjsÛú?Ù·s;Íà‹ßÖ±jÇ^_ČŽêÏ.—‹ÏȚ{‹Q&ô\ä朡€žˆ=Û¶0€u4wN›Ìđ¶±,zmț9]SŸwčđòÈÔEFډj ŒmE&P”î €€J„6ő†Ż‚ =Ï';7źçžæÌéSüùË*Æ^r©—»ÿ‰čâëacÇĄÓëùòƒwčûŃÇ«<śșŐżĐŸSnŸśÁócu±oçv>zăe^_\{FÒ­R@„Ä*đGĘ(_ćkÌ|ś«-H›Vëç.ƒß}ö‰—'đ­/ŸaÈè‹Äś­Û”çäńcÜó7EùùBB8Č/»œÊYrHhƅüüíR&N»cH(‘Ń1ç<ÖȘ°àččìÙŸ•oŚÎ})ÈÍàÏ_ÿËO[śÒŠ}GŸûìæ>x7CF„ÏàĄ5șŠÖ§=‰Íćâü‚‚Ò"ÂÆóL\>~ô0ÛÖÿIZÊ1–șˆÎ=zŃwPĆńőš($rțÀ WòŃ/óê'_Vyîo>ęń—]ÉK~Văq9•ĆGŻżÄł ŒÏé,Ađ’m^ȚhäÌ©Ź€çˆŠöÒžăϜÊ"©C§j1DòÛۜ.NWEšzF]:7šêÄU—ł,_(}źgsÔ,éÏće&rČO“‘z‚Òâb.œö ƊüC{w3ó–ë˜Òż#;ÄóÎ Ïp:3œZçŸxÊćœÎÌ`ê€îŒęüSd€ÖlfSœH>œŚ\Ê?fț‹ —_YkŚńÀé‡$”Z— Ł!(­$\YvËç§^{RNńíș팿lŻ?5›rSEMŁ7çÍášŃƒYțé‡;|â„%ĆUž»{ßțÌyeŸțƒ[EńȌëÎÈÏŸ.x/Ț›ü•Ä€¶ś‹:»âsÒŽkhŚ© J„’knęѱ-Ùô‡ÿĐb0”Ûœïÿ†Fźm9•Š^*ÎóțûáË%Ì}đæÍșŸŽ”c,üf„WH· 7‡Țx™9śßÉŹ[§s*#Ž”äj»ŚÀÁüùË*^›û8ûwíšö˜JKŠčśÚËè5`3țïá€ûÙl6ż^g„B‰=@(Ùa·Wòhy&$Ž ßÄ}g ŃÏț'ț&”<Š2*ŁáhZ‚ïђóŹę2rÂdžyk!ŸüôOœùßs›žŽÜb6sç“‹ˆ`țą%üòśažY°›­zuâ[ńÇá“Ü5ë1ìȚƔĘx照ÏkŒț™–Ê헎çÒën<§ćëç‚2›Ó«ł¶š„Îuíe ­DËíNœçš3uz=1-ăèÙ /}űv»ś^zpŻúđ”ù<ûÎ">ùé7ž|ć-Ž]Łó_ÿ{űyŚ!~ÜŒ„JĆC7_Să•FUá«ßăĘçńяżÒœoÿ ûFFÇFHhExHĄP`4†`”Ö|“I:VBœ”Đ©”­Äû^~ž!ôGŸy‘ÿí>ÂöŒ É}Ś].æ±pŐÈlßđșśäònĄŚ€A”—UŻîŃÔkŠłà«ïHK9ÆÍ“ÇpՈțìÙ¶%è1æČ2îčj*aáŒőĆ·AKłÄÆ'àp8().·9ìvL„%ވ‹ś{L‹žxŠòóœ¶æç‰ŸŐ•d°žH|uôŁż}dBUZûçÊ­ő%P°Ąí7ÜÂđ‹Æóʓÿ ęD y9gxhÎț€Wç<Æßÿ—>ƒ†ű=æłśȚâÈțœ€[\uËíüöăw˜ËĘ­˜voĘÌÉ)^ù(ŐE„BëZ…ë R/šéć ê ^xÿNe€óőGï°}Ă:L%%ŒùÙrnœ&c'Oćłș~Ńx|ù-›NdÓŸK7Țzö?ś5——sï”—!ï/ÿ©Ê|Î]șĄR«ù{Ë&qÛŸÛÎĘ{ú=ŠKÏȚ”‰“e€};¶a „UR»}·RÉoïkŸ*‚-oˆhÿȚy@)èTłÏê‡ …‡æÌcĘoż°wÇ6ÚwéF|ë6,yśMŽ=Ìû/=ÇÆßWWû\ß.ù˜Ÿ–~ÁÉăÇH>žŸ”«~dèۋΊNgfđĂ‹ùíÇïX»êG~űb±ŚȘŒQűrŃ»”›L̘r …‚žęòËƇùìì°0?A üńóJńțȚÉ_,fŚ–X­ńièš*€•Tüî A@ŚÌȘ‡jU($JèhÁ…©ÿréu7ŸŰšȚxÁÀŐ3î`æ-Ś1ëÖé\Ô”ŚÊ§Ș°ì“EŒëюGo»Go»™3źç3ÿ°`ìŃûžž{[Š ìÀżțq3woËòO?śyï„gEYr8<=ó>\žÄ}=i]§{„][6Šïï{l*”š1[q딋čqÂHźŒù6ÆLšRŁß àˆäwĐŚM1چb|ô=huș(Ž\˜‰Ydt w<ô(Œú"ł™NĘ{P^f"ód*.—‹?~^ÉŠß«n]żúžœ=ZCHHÀ\<›ŐÊÿ]§33˜ûÆ»äçæ™–JfZȘ8(ÌÏățéÓ8đśNqŒ“źžšś^zSi æČ2<ÿŁ'^B|ë6€;‘ęțéÓ8•~€źœúĐgđPȚš7«ĆBQA>‹^›ÏŽg ÓŚŹ A¶€ŹNcšH69nHš•$rA.žÛÿ|Șád{özŽÀÂű6ĄçŽrčgÿŽnÛŸÒ¶›ï}kŁśÀÁÌÿ`1Ÿżż€{źžJŸACyéĂÏxïÊÒ­’Úb·WÜ@ĘúôŁeB"QŃ|ùÁ;Œńôl"Łc:v7ĘxUvfß±pŻ"ń䄮LH+üvéÙ[Źn6—ßÊ­ ~űr‰ŚčÆLžŠÎ`@©RŃ”w_BÂ+jòìß”ƒUgWÁôì7PŒæèISĐ«ŚYjžąj/2Ń TÄ5bÿ«#F$ÔŹ™őc/ŒŠFë]€S©TČèûŸÉ?›l=ûć7čáźûŰłm śük6I:qÙő7‰!°‹§^No‰ççÁ9Ï Óč À=ÿ|‚ă&rüÈ! !!üçőw‚ÖőiŐ¶ó?X\i{ëvÄŚŻ}ú5Q1-ıJ—œK!̓úì—?Œ’r#Łcűò·őìÚŒŹô“<:oț9UîÏ3;È-Żđü” ©y1ÓÆŒƒ…€>>R`aÈ9veđĆ-ÿś‹ßyƒeŸ|ÀŒÿ{˜›îy€éG«ÓŐ"–ÛšĆÿ~ű¶ZçZłjśOŸF‹žxÊJKéŰ”;óȚYäwßìŹL6€^>€·ŚgOdĘ"sy9kWęÈ”·Ę%~öÔ[ïsÿőÓ–ÔAèÚ»/Ż.ÿIüŒ0?”«~䑧ž·œùÙrîčz*ƒ[Ga·Ù9~ÿzîćjÿF§‹”Š‚Q†Æč„A&SnźZb:.— —Ë…ÓéÄétâp8p8ŰívŹV+V«‹Ć‚Ùlæéd ëŠÜnŚ^±zîê{aWțä•Yٖ^Q™öÆ.$…5NÁmŒ(Ž8Xž7O,$Ù+.”Vá”S<îÉ?łÄ0mïŽ5tÏۍV«E«ŐąÓéÄgFƒZ­F„RĄT*gŹ)À-‡Wu‰`lRÍ[őCF‘™}§+’čgt‹”› Ś!~M-aWŽ{"„ÆuŒ©•Ć Ù&Ïo<-ŸŸth -ląÜi”ZÔj”(ÒŐjóô—à8ž©gCjHȫ¶ôBòÊÜŒUˆš[șŐ^ësy9%E…5Îò›•AËűDŻB°…ùy8Ž”§Ê9} ­^N”ȎZű&č"śjxRáș ïÇH-Čòú֊°éiK‰UÛ1  ŒF#FŁQ|o0ĐëőąźôՏJ„RLŒo(é9 ÇxˆÔkŒVÛü‘QJĂń5}ü•iòjąÛÌfțŽ őn±6]–ĂșBźÙÎîÜrń}\š¶Á,ŻKÄIRé8„A ^NäÉslR‡N”JžÀíőŻioÏqńç\Èu{v… êTÊZ!O2ê͂@)hUq#ž2Ù9gr„Œ …ŹR‡$żu«p}ƒZ:^—P+ÚKä0łÔƞ3ćAސq!àrÁšŽR1t„:Æ\XÏNcA|žÎkćáéçŸ@@FÍpŽÀBjqEűźUxí/–Qûh6–Źm€œ€}ÆÚôRŠ/P„ ÿ0;\Ź:Q,zYT NŃÍÓpyĐ6Êà•8ú[z)'KjÏ Ăíq>!1\m"ô.@+Æ”B ƒäÌ,”±[&ń”Žr»“5ČȘU)Œ&S2'š R[T(Ž2›“ćÉEXÏ” Œ p8]|—\Hžč‚€¶6VȘËŐÜ șÇV,bp8]|ŹÈkyœŒ ‡Ę9ćl=]QH§V6[ï“I‘zôš ùëəČ"œ.űțX1E’{ŒSŒ±Y†›š•5KŐy%/ç”ÛYz€kôekF°8\|—Rä„”cŒÚGÊ3.pçBu”xÊíN>;XÀÉkŁdÔNüž^Ê/©%â6•B``bxœÏl(PœZ†Š-ŽÜŸˆÓeç_›L†7œ.ű9”ŰëȚŽ6hhV;‹hdÔ-Șe‡PϖĄ^KG3Km|r0_ž] ä”Ûùô@ŸŚRĘ­Š~ńá”ÚóđB@:ŸÚvLvŒ1V‘Qfwòő‘B6d™dŻèy"·ÜÎŚG ŒmŁz9F‚  t9qîy­Ł–‰tR„“ĆNZĄ{|6§;gńd‰•1‰!„hȚüș1À…»Æ–ož­F©``«ˆ:iĘâ+; ä(Km ^™‚LjEȘ*țÜą:ÈQ+ mɁÓ%dWÌŽX8ZhĄ}ž†ÎáZ:Fj ifłkłĂƱB É’‹Ź•nÚhƒ†~ auÖëÉlwb“ŒAg ŸÂÈ·Yž`= …æÚ—C… Đ+.”0ŠĂgJDŁ_fsò[Z kÓKiȘŠS„–(­ŁZAˆZqȚ`›Źv'%6'&›“,“ä+č~Úă4J$„Rž'€ä[pčĐÙÊ4ê*ÉŒÓéÄèČ`Üc­‹Ô‚n-CQ«€äV”ٛkæPŸ…ț±zz·Đ#/”ŻŹNNjŹl>eâŽÉ[C4*Ž ŻłĆ Ÿ-Ë N3‚  ({2Î őrgűți‘ê EQW+㔂{VźSs$·T4ț.€ZI)Ž"€•ȘQ`T+ Ń(ĐՑ„!ĂêpQbsRjsRjuű u Ž2Ò)ÚX§a»bƒŁ·Väżűz€Eá<… Ă©;æ•Ś]>HR„žšĂč„ä›*Æàpș8QdćD‘œUS(€H=ąužó$•­Í„çò< ‚@ pçÇՅ.€NŃFÂ4*öž.Æ~ö†¶9]l=]ÆÖÓe„k•ŽŚ©UȘQąVą’U!ev„6„6'%6N–Úüz [„hèWw^x€bK….Ô9ÊQž‚“q™Lêœ@ùëPv§‹Ó„6âêšBsR€žžP-)ù&N–#­ËîÂm”‹­Nš~Û·f ˆŐŃ)ƈASśËÄS œûËl% ÿ!;ßđBĄ QY†ÇÓ}ČŰJ‰ŐAh}pŠ!­"È-ł’œką°\ÎÉ;(„0· ÖWŸ±ƒ9^íˆò3AĂǀ— †ș*ŽÍ©Ă€î–ĄZFêą8šk"«Ä앋Zdqđ·\ê Æ0h”tŽ6Š«ó”§3’~{›)šçÓ2‰Ș>êŒ@Iÿ,ß?Żgˆ”àÂærżß—S^g Ü59șdžÒ.Â@F‰™3%Š-òŠ”êšQą%1LW'Iș -JQš…ÖaAPj‚*)Ąê©(`9nÛárÁ3CëvÉ{ŒACL &›ƒœR gJ­šęÏležĄU)ˆ1jˆ5j‰1hêtŠï‹R«“ED>ĄđXPâ.%R.—‹gû• $X(·;ŃŚÔ«•ô‰ŁC”ä<gJ­8POÓÆƒZI»(­Ăőő¶pfż„ÄǘψŻę'DJöFU "JŻ„Ț3;M{Č˙Đ.ŹÎÇŁŚ(éí=™íNòÊŹXìNńas:›ęâ „B@«T U)Đ©”DÔ@QB‹ĘĆaÉj—űüŁ~œN€Śvég‘J;­„œt†°-ËTçÊŁZ‰1Ò@Ûł„lN›«Ę)§ƒâN ŚȘÜrېSï8eòòb'«Dž<ßțbN§“îÎ~ŁàáÈ130ŸnË„hUôKÇát‘WfćL©•"łÍcèpÊí‡$P Z”œJI نŰ-ÆzđŸK‘^l%_FnSšêwòXŐ{Ï6Që*Ûő} © P'‹­Î3Ó5șțJĘëT ĂäRûż§{%'ó2VŸFKjŒ”J·Â~Ê<‘@+°p(ÏL·z”CÔ ”VÍł`Ł€Ćîâ·ÍąŁJ21|"g1 IDATÚË4šJ Y}Ÿ=źrZ8KÈQžK lÎ,­sćR!ąőê]érĆဖzĐ7€R©h5Ć6gV䛹œvZ•e hŐ~œ <ó2‰Șê%„çy/Ę>6Ü̗čv î!­L.ąKtĘǎe4>”Xü.)˜]”Fxy‚F”Dù)§ÓÉM.kí ”șÜ!䟎Òuh\œčâe4ŹM+ö*aĐ=kŁ_Òî+€( …‚ȚÎÓŹ=K ’󉜑úÊ-“Q5rÊìlΚ P­‹SPáôK˜|=đŸäI&NUŁÎï BĄ@Żž.ąPÜ/œŰʟi%AÎ$C†+ŽaqT̈{žüĘŻ—ÉŚàϰU0Y)ž+łÄƏɅț.+C†ˆä| «Wè«Ći$–Šy‘%Œ)•JT**•Ș’ü)•J†;Ó0ž*V^źłÍ/aśőŠʍ‚ÊčP2™òF­{ ‚%KĂ)žÙZoƒ…CN‰Ç”Ùœ,Ű~†§Êü^F3„ËćvU±?_\ń€pÚ|űBìŠJÄÉc”€Æ+Đ6ϱmŽvnÓ$#œ%ó—‹Żäóę‘ÂZï“'Łq`ߙrȚۖí”â©í™ĘtÉĘí%[j”Z|űʟt?©Ó(ÜhۅÎUQÏç»#^č~2dìÎ.ăă=čą^\NFžX‰[@U‘’ÉRő |ú駟źúń].—űp:8NŻŚN§“6B VHuž—;]î?&›“¶áZÔrEđf‹œ2;ŸíÏ«Rëwl%‰EÇœŒ•FŁ űđìăO™xЂ2tN3‡œ‘xșŠYٕ]FžVU§”Êd4œ.”ńőÁ~I)F’zG|A2ĂNț”JYIÖŽZ­űìOț|gț.— ÓB k.ûŐ­đÈßá<3yć:Eiä 0u»ÓĆ/)Ć|wžĐKû§ŻĄ}i….ôȜôÙóÊąż0s°Ÿ \”žŐYr:Űívìv;6› ›Í†ĆbÁb±`6›)//§ŒŒœČòrŸ+Žá[ąŚ9ő*ăچ24ŃH˜¶țëÉšœ*”±îd)›3Kœ<@ §~ÇVŃ¶àš<†ËŁ$t:ŚĂŁ84š0AÀćr‰Či·ÛEčÜ]nàsg7Ì>‹V[‡io wŹžhču“FčĘɁ3{ϔ±śLy%/d—S[è“”șB=ÆK*‡RRć‘WpO8‡š­V«(;œ-űŻ~€ŰdÀ V0©}ŁZ‡ ’‰Tł‚Ëćź7öߔb/ï'@Ïô?镻SÔRœg0Đëő^Ï:œ^_‰Pù†˜ećuF <$Êápˆò( łÙ,’(Ïóf“‘/흰áM– Mž†î1zZT„i„k•òŹŹ ÀêpQhqPlqYbc_N9č~ÚZèŹ% =ò-1ćÙb~‰Ôûä1XR%á@IœN‚o”Z±Ùl˜Íf, é%KĘÉBüŽč…AE”^EűÙ~aȒiü(ł9)Č8(4Û9UjóșU;Ì H[C»ą#^!9J*“ŸȚ'ÏäRȘ=Čg±X8f3đ}èpÊȚć ÂŽJzÇêé«§S”Yę5Mž€“EVöž)gwvY„6?*‡•ÁÇW’Tš*ʟ”žëőzńá!PzœȚ‹`ùzŁüyGećZ'PžgOšÎápTòBY­ÖJ$JêÊ4 ühkĂE\m UF#‚Âé CöșÚŒÎióœ€JjžŽZ­Ś,˟óx €äȚ#—CVf¶°ŐȚ‚5ʎ” Ł.ŒúÂć Ó™]ô:łËê•$îK ü…M<òê1HžIŠĂáćN*{fł™«‚Ÿ8©Kđ;&„ ąQŠUbT+äzMev'%V'ƇŰèÙŠlŸű/Ѷ/ù D €Ï„ÒŚûä‘gßÈ«ò€šŐžƒG1H_jià›ìëqg;âfns"Ùz‚ß„N€ȘbjsŰ2(.­òÓ+kĄ¶·üš4•r„ù'Rć ő:ù栀›èK•…ïÜÂćr1\ÈĄ·ć;œ±TƑŠnłî˩ɚ'D”çÒș8…Ž”—ąT)Q(Ž~ePJä„ČèÙGj <äI*wŸ©ŃN3ŚŻ#„$š aęÈŃzëA‡ËE‘ĆA‘Ćáoè2šŒæBzfźŁmá·ęŹ"śÓw1ƒœL~țšÓč@% €€Z­ö őIÍ;șÊimÙNŸYÁA!†ŁȘ8ČUQ”)őuù5êźČb\6 (U(B"ë{8uÁćDo+„Ei&­ŠSˆ/:»[v$í1€äÛßÌߗLùKšôT‚öTƒömydĐó~žő4­')-ƒd!š!„AG©BOčBƒ .Żźö.ï7N«§ÙÈŻ ą)–jW;­ì&ô6Ą¶ÊÒ ł•Tè.Î« A0ï‘KßYŸŽ‘°J„Ân·WòJydÏCŹ:Xòhó3ÇU-9ŠoÍIceȘúéÙ(ŁnĄ¶›‰/L!±è­ŠŽĄV(ÏêB h|'țV„Ëuò%O2™òFš`„ ”J%N§S4‚òä!RRĆá9>Faeš5‹ćiîP‹ĘA±KC‰ ÁîtárșpșÎ묘͉ÌOÔČĄúęcùbҏ ČeSîz€Ÿ‡sAá{O*œ v:‡ Ż„ Q ÚJmX€ÆKjš|ĂxÒđžÇĐIÛixdŃߊ(_ï”Hü­VúŰr°ÛO‰^S KćWúđœ3CŸ±mÛ¶±fÍf͚…NŚxCšŒB„‚‚ A§óȘnïëAŻjšg»gœù’w)òÀWvŽćT˜…=w#ÙȘHòUa˜zÊT,J.—„Ž‹O _¶ÎE‡w ‹‰Gă?ÄÙŰ j‡­ƒ­”k1e§Q îÿ_©Q{ŐóMaš‰òőBUU J†7ꀙ°ïïù“< B©Tú-màktyźTv;Z‡ƒH{)NÁ‰Gąi/=îz0j—V΂zͅƒ ~œ1‚Z”¶RVÆ+XűÄwùźżDI©Čđy_/”oĘ2_Ż©ÍfóZ ! œ4E„VW”pđäR4fű3ț*2ûŠ’A©JćŃ·æ˜tƒGvüÁăęô'ƒv»D{ q– Čç9ôœMo~ô&C‡eèĐĄő<šóƒŻĂÁóìžDȘŠżxtšŻÇĘ7Á_í;á;ßëËšŒ:m&,}-%Qćt:Q©T•nzé1ă)UZž\©ŠlŒ<^…B^ߎB–”eŒ€ŠDșÍ_ą€o"o%Ć%!mŸŚ¶Ûí^y{ÒUŐń@5T™ F#Ÿö$€65`HŒo§/‰ò—"­;æŃƒÒž”\ùƒ”@Iu`uTc”čê@„R5z2őŸżüa(G_T <(9|W}ÔKń_ađ„G<ä *ßàŸäIÊș„ €Šá“ÆąH€Ê`0ÔóhjÚxù&{ž}cÿPȘóœŽTiI—Żüù†ï‚‘xÏőüĄ1È€”@y–E7fœ/‰Dä„^ł~éuG%O€G‚MȘK ‚‘§Æ sŐAc%PUÉßč(ßžt"Èć{-DJFê,Jš€ëÙæ;ûòŒ–>KśőçČô„N€Ș©{ šȘMă曾ëoæ%Í9Dä2©Êxù#PÒĐ4P‰Dy¶5dűȚ»P™@ùÊ€żc Ș"ńțä!˜ú¶nńÍ9Š N§łRßóÀK'žgÏ5ăä±&P«Ő^?ú‹ÖT%{ՙ@ó@ùNeïSőPoć“„ ÂㅂÀž'ă:ń7û Š@ü]ŻĄBJ ŒÆŠ»âæB/)qò$Mú‹û{ Mś‘IŻi·ÛÎțę°ÆF9vì‹…=zˆÛ| ”T&WŹXÁW\Ńš•n #ű%3äPJš|KxäÎCȚ=zKjÄȘ [{< Í‰@Ùl6Ż<)üš`û7Dœ òÈW  d°–-Ÿò%{ŸȘ:́ò7+őő{ˆ‚ôs3/_ÏSS5^šTîżȘ©(šŸńò ă2^ț”†ïŹ *Œ&R/€BĄÀn·$läϟ zź!}ö‡†&›Ę»wçÖ[oeöìÙ"‰ äúàƒ0™LNFŠ@$>˜!ó'‹ž_cć9·/ò¶öՁț/œOűžĄÉ] ,_Ÿœ+źž­V[é3_”cÇBBBèÚ”k]±Fš‰Ÿ:È@D*˜^Jœ|Ç$“šÀšó:PŸ$Jê¶ö§êș,›ƒńò č…đ€Ûƒ”@$JȘP€Û€ûû#Pžë) 1'E*ƒžmJ„‡ĂáUzCš8ȚÔVAuëÖÙłgóúëŻÓ»wożš °bĆ žyæ™FG üĄ&ž€`DʟÜùN„!<çő7ôxàęćJu çüô_c’C€ĐĐPȚzë-žxâ‰JùNj”Z”œ-[¶°xńb-ZÔ(ÿüsqò>ž:ÔÇđÎ5ő~òFzíïž@„MFŐšś($ÊÙxU@:smì*êÂxù§@òçÙ. ­űŸöÈhuˆ{ Yk,28qâD-Zűsdd$}ûömÔÊ7ĐŰ«ëšÉCz.©üyŒíÁ&ŸűêzžȘ#kAǎ+’L›Í&nśŒ]­V3iÒ€?ÙŹê^©Jśùêč@Țxû’ĆÆ|ÿÖ5ê•@Ađœšó5^ŐqW7eȚJșȘ)Ą.WM•F0yȘe°Ș’”†.‹#FŒ@ŁŃ`6›+}ŠV«čä’K­lVÇh“Céë@ræOî|Ï竌| Ÿ”Dù#Mê>5•Н:ŽîĘ»łÿ~żŸ;NƏßà T0ÔTï"IH“LžÎőN  pűÄśóælŒ€Ș1,É­ êËxùS9Ê€ç”t{0#ŐT–Z­f̘1Ź^œZœę{àrčžä’KšœlJáO=Ży ‚}î‹@:Pê‰śőÂ{xÎ)}öwÍÆŠ©S§’œœŒĆb©ô™R©dÔšQŽĐW5‰Ź ‘ ŽMzŒżsËš>ï|ÙxU†TÈ›Č‘ „Ú2^Á<ŸŻ„ry.rŚäđČË.ăÏ?ÿŹdޜN'&LšT·©ÀŸq &OŐ!ëÒśțȓïÄŃ#?ž_M‰SS?)&MšÄK/œTi» Œ9’zՅGUòUŐĂß~Î+Łfh0 dă RoȘF*jÛx»Š?YôĘÏw)»ÜùbòäÉ<đÀ•¶4ˆÈÈÈzQĘ#˜Uçu śÒ‰ążÏÎw")ESËțęûAaaĄŚvFĂÔ©SĆî Átžôu°IăčN"eT RÂdăURÁonJŠÚ0^Őč^uBÌŸçvLcERRíÛ·çűńăÿÏȚy‡GU| űĘ’ìŠ Ą†Ț{G€…^D€Xè]€ ŠXEü~ŠT霉"*"Ò{•Ț{èI !}łíûcٛœ[’,Òæ}ž}vïœłwf93gæéœFŁĄC‡’™9§„(”ï8»æJn\ " łs[hKëÖ­ùć—_€ `Ù ÚŠM›,­@ÙăJ¶žőĘÙ=%Lt^ÉŰț–œÖQ9#œ;ŻŽæçj– -ßÉ.têԉéÓ§c0K‡Őź]»lUß\‘ÚoLčKËl”3e rŽâd„}ûöüúëŻ2ȘhŃąYÎ}AZx֙xgßÍ uőe©(+ąó’“S…ÿet^î”ÁV¶R›YÈNr۶m[ŠN*P”jŐ ,ŃË#­òôŒrçȘÍł:›w–ov’={Z¶l)SžT*:uʖƒÌŽŽoÏ2°<;YBČ":/č=;§ńČ:ŻŽâNg•țł† JmÁąPe§ßç./ò·»3xt5hÌÎÿM`` ŐȘUăĉ€e}Û¶mł„eOZŒÙùÿÏhȔeKN댄íÚ9™íYd¶òŒ4 eʔáüùó€ĆÁfNűĘÉł s :u’(„RIăÆsÄsy–yAú’e(gäÉ)żSy1bC† A©TòÆodtqröő?'Í89ŁmÛ¶Œ?€ČeËfiç™ÏCNûß3ÙžS €;mÛ¶Ćl6S·n]rçΝŃĆÉŃXÍú©œČ+5k֔\h 6,ƒK“țäôÿ73“­f ÁËĄhŃą”+WŽN:etQi$»vČ …‚víÚ±rćÊłT93Pà™x플hÓŠMFC  }ûö”-[–%JdtQ91%ž‰țęûS©R„Œ.†@@˖-9zôhFCĂ3Pà™ʓ łÀšQŁ2ș‚†P @ć)\žpFAĂ ”@ ›ˆ5PÀ)kŚźćÆ4nܘW_}Uș¶fÍnȚŒ @“&Mš_żŸtmŐȘU„††ĐŽiSêŐ«śò -/ 1%œČpáBƌØ1cŰŸ}»ìÚüùó„k;wî”]›7ožtmśîĘ/łÈ‚lÊșuëĐj”h”Z*Tš »¶jŐ*éZ•*UdŚ–/_.]«^œúË,Č  f @©1èt:éęyŻ ϋ˜@ p1%œČuëV—ŚìMz¶ł œ©R„ _~ù%€¶ĆJ”jŐ€kČkŐ«W—źć˗ï%”T“P˜í#Q 2%;väśß§Z”jœ§tݜˆ{GܑYûN&=;˜ô’u!ç)c_rJ=HmvÉŸm·•ő—„Hœ*-MTžŽ“S*»€6JI­=O„s%ă)É·» UNÆl6 č·Á^6­ÇöònÛÉžê`Üí\R“ÛŽÊŒłc#9UČ’’’d+żźdٝ>À]^š•ÖN%-ÏÙę\ËŽŰ>ŁŃ˜Á„É€4ê¶ÿl[ٜUŽgí\ܑńg•{{[œÉ·íg…B‘ąŒ;ë„ìï挮(Ni‘ÿ”î%pÄVa2™L9Șž’ï”ȚíżoŻdčJû,Œ0*-#û —REŽÿìì8;cû[sRJ źFăÖÏÎ*š«ÎƝÎ%5·ÿœÒ±łwgùäTL&ƒ!Ł‹‘Ą€UqČęìJŸí?CʆŽÈzjÇöŸ]ĘW Ƕœ7 9ą€UqJMȚ]ĘśYf^ńB(ûJ‘Z§ână,ŸìŽí3È ÈRêX\U0gç!čb„Öč€4OMÆS’{gïöäDč7™Lèőú .ÍËĂĘÙŐÔdʙì;»·łŽ%”pZe;­Š”łŒs2ö Tv«©Éș+Ć)”—m[îìŸéĄD„»•Ö‘žíËd2ÉϙÌRŸ‘ȧś/Ȝ˜ô–i\łŃŒ.Z(P •…gê#ûŽE©TșĘčŰWžŽv(örí çiT€ì?çDršeKj{y·—ńÔdȚú]{ùv%ëöČꎜ› fL:łÔn YO}BČ•kÌÖíżBĄ@áaFĄv_qr&ś©ćőŒJTș*PîŒPŹ•Ìg"æŹ™˜ł†'`ŒVbÎYëäR„čŸ/ćk7ÁOÈÍÏ5]œLÂӌ*·ć„ 6âUɈ¶˜ ź+›m%ł~NkĆS(˜L&‡Ž%%ùNéĘ€7cx†X,ònę>Ö{ÛdžC;óÓŸCm&îZm ò5ŁÌeBé‘r§b/ÓJ„“ÉäôŒC6vJZdĘVYČ.p¶~ÖGAÌiHž€@ÿX‰1Z1N9S”Ÿ™ȘŠ·űśíŚđXš‹ÛŠìMéeF•ÛdiÛKńȘdÀ#Ȕj;nûÙl6;ŽíVì ÏȘD)Ìé€î§u4n}č`"b«™ű+ ©‘ž„ Ż*z|Ctšs›V6û çŹsIiJŰö=5„Éö„ 7wFAü9I”˜â3G8‚Ì̙đĂèMzœ P4wéŒ.N†Łđ2ĄÎo@S. M=ꌎŠ3č¶č’wpœȚ/%„IRžLfžšœJtw”BY€ȘŒFŒkéđm GéIŠòíJ©r5ûjûîéą@č2”9«hńĄ&n4wAt‚‡ÂÌWę|& ÔâȒ„VùR3s€€0Y_1§DnU‘t7û/U=^bń,Żs)Ë*•ÊégWŠ”łyjŠ“Éd±$<úSEÒ}!ç‚‡ÒŚ„wHȚ”t(Ő©ËxJíúó*QÏ­@„Š<ÙV°jŹŐ IDATđ­&Â6)ÀÉLŒ6· Ÿ@Z%j•‡‚ç0M Č9ft& :3ș81aŒIŽąŹÌmÄçíÇx4:­h©Uhs‰žDđâń TŁńQóđéL”Yù††ą0yèú ±Ćv1­«ÍÖŃžÉd"üWń'“gžÔĆëùàWۃ°óX(”à“Wo š˜0ЧEŽCŒcá'–é».: ûŠ€ƒ‰:l„‰W“e=W~5ĆëzŁö‚.x±(”§ ÇÓeOȚ ÄȘĆT&łò©ÏD»vĘ^Ɲ­}z) ”=Ω„Fî-LȚÆȘöTPąŸXë$x©hs«P{*ˆ ł(Q Łs„'I%Ă: ë»ęN$ۊètæÉh$jż‚'ÿ&ûçòôVRȁ,^^Jòò æĄŁȚ"ŻÊpôšxŒyădrn‹«ÎÂŐ̓Á` 愂èmÉČîć§ąX]”*ałŒ<|Ő$ƙHŒy:őš Æš3a*íTyJéeMc›Țțœ3Üv€éjöÉ~*ìśd'x ­í-”'A†·ž'‰1&ßJ@ő 7‰ŚŒ0Ćh4âéééĐÁ8Sšœ­ś3$=1ő—”^©VPŹź·0e^*^JŠŐőæÚŸ8L‹Źz.JlĄ“se3§¶XŐj”tĘvđ S ’ŒDmI–u”FA±:ȚÂ<-È WóBg"!Êąl(Ïą«đS€Îć ”ęŒ 9ȚŽžwæÊĂÏÔ»‘[ß㼛ˆ=•|kÿbžxç5Lqš ‘íÒüW”Ä„Dt::Ž€€$鄌넠zœ^y ɄaûzČÍsRòœƒkzĄńʓàćŁńU\ÓK:VTšOäÜ*ëzœ^zYeÛ`0ÈÌtöf;ŁŃHôÆÇÉȝżŒ”FÌ< 2…ŠTśJȚ°`R J1̑R©”â=Z öéԔ)·í Îfžl•šžK`ČÙ9ž»`֍Ç$DsôÊ!DĘĄù ™ÛŸęöHÇïęԇ׌Đ<æn™ÉOOáùd6 È] Yčś~˜?Ež­yÕOwŃSș_ž‚Â!Ź s ńU’»`ČŹ{Ęr0kŰÊșUží?Û'Ű Œ•*č‚ČȚìӃšûœrˆŰ„˜–ÇĂšôȚ•{ïpśńúNïÊĂš/,O+Ÿ-û-ÿęùÂóÉlxx)eź‘<îäujÆł—iûű„)­tFš[{W7”_<{ÖÆç“V—_Ö[û4çï4ûą>Ł{Ąùü~x·ÂoJǛÿÁĘGwÒíț‡/ Ág5Οž~ŒÿźM·|Čč ŰžHÒąxäERR’CełŻpö/œ^.̌1\Ÿ•;«›ĂÔß§°éÈŻ/4Ÿî?tæÛő_JÇoęßëü߯߀ÛęÍf3Oâą0ÙčçțyëlZŒonùd%leĘ3.æ(‡‚39w„HéŻ&|ó©ČäÂń‘óÓì‹úÌûgÖ Ë#61† ŚÿÄrœßÇ6Ż‹K·<–lŸÏÀY=Îï8ę/W\I·|ȶƒcMD^ô‰§rn«<„eTJNŚûE'DsúæI‡óó†.MŚ|Č>j‹ÙáięPDkĐćz"›æ”™rXօè.Û,ÖU%Ś>m8ž–/W!­jŽCëĄ}!ù<Ž}$ő—.P†‚ț…ÒíțaORzpA|w’*ĆȘIçƒòä§\á é–OVÂ7HBa s  ËKŒï]—±òìŚAY?KNdČüûf=Y{ò­'7Ó Bc–ïZÌGÇŒ”|Ëź@ÄòÄtœgۓ‡\čwÉáü‘ïÏŠk>Y Ÿ@Æ&%Šh%zœËFFŁ%ü‹Uw±5ăÙÆŸ‰Đˆ[RÛníŸY7žgț•ćżvßJúÍèFçÉmùfĘxÙ@æQL# æȚă»|żq'·eđœ~\œùžpÆâĄ±‹§v:ËjżĂÔ~QjŠlyf7źü?c’o©Î‚•lĆîĆ4ŹĐ„âA%y§QOVìZ,»ț(:‚EÛæŃyr[.ß»H«íűçÄfšŒ­CT\$‰úDm›G·:±çÜNÚÖzŁW2ź7^s™śÒ žț 9hàžŁ0«'E‚éŚ|ć W`ïù]ÒőőûWS«t]ú4Hnï<Œ?3țü­/%ò— j±êT-VàÀbì<»MVÉ~=žŽvšr+ì­jŽăߓ[šÿI5YY–ïŻ ‡°pÛ<^-߈ۄ:|ӒKw/<ă“Î8<ŽÉ2ȘJÔÊ̶ŠŹqÒÁ˜b•6śÌzČ~ćȚ%_>À»-‡Ò±^Yš9Ș<›oâÿœAÁ~č©4Œ8ó·ț$KÓvB«ś.çĘÙœ(:0€2ƒ 1eÄĄ~3ș1ęÏï„cŁÉÈô?ż§Öš äíéIсŒZ”lBŸČaUF”"oOŠ đçÿœAèSówlB ­Ÿj@Śï;RsTyșLiÀȝ é<č­,ïuûWQgt%zjšöAfmțQVÖÁsú2ęÿńÍșń”Z„Bęó0xN?YGšU°•KUąÖ„ûہ‚ęËh4bˆ–ßW­Ézƒă»óvĂ*Iي!,ß-—śKw/0ëOt˜Ô €ze_eȚ?łè8č””ævD( ÿK‡o[ò(&‚ŠUZ°nÿ*š^‡3"cłhÛ<É€g2›xę›|żq”JŚ„wÓäöÎĂń«GžĆ±+‡i^”Ęő"QŸH›Ż›HmŸÜAùÀÛÓ[jÛóć `ęŐœčuJÊ{üȘÏ4»7 …‚WÊ5`Áżsh2ź.‰zˌXLB4‹¶ÍŁûÔÎčrˆŠU[röÖ)Z}و„€„txê/•; EŒ‡Kć)-k ÒâÎ Mó°źŸìT‰Š·Y•ĆÇ%ÆòÛĄ_űĄŸeæŠgKCzòÆT/QS–ö•r űq€„#éŚ|Ć0wËL>ë2^JS,_ Ö~ü;Z ŠÒûĆùqÓÿ1ăĘy©–ćsÌúëGŠœKßæï:MóçÛ„Ï]ő$_ž æü=í?ą !ZŐhÇÜ-3Đr°Ë|Ìf3ŸŻü˜.ŻŸĂąśW0€ÍȘŒ(Éä _3Űr)­ZćÁމȚîCJ ⌃ëóæ—NïYQÙÌ@)ô–QŠZünęllL{’ÜÇÙ*PYŻCYŸk1e •§VéșôĐĆńú7-žûű…ó‘Ò\čw‰aóÒ§Ù@&öűŽ„;đéÒʓŸ7êuàúƒ«|Œdï4èÁ¶ ûùíĐz~ÜôäńńcH›NóžE‘ÀąÒń+?a՞eLí?›WÊ5 ":\¶ĄÂÏǟùÖQ,š§ožàû“é;Ł;&Ä[ëĂÜÁ‹iőU#Ÿëę#e —Gٶì†|óˆaŚ„ûüyt#ƒfśŠoówY8|%żZτ5ă‹L܉žÍæăĐźV–°žËś.òÉÒ(_žtű$žțËÁV.=’Œ€‚Z­Æ`0 V«eŠ­éÎÚîFŒńòOY-üńkGčpçKFź {ă>Œ^ò>ßś·&Ù1htüŸëę#=CúĐŠf{­Í֓ÓȘzČ"Ț±Ț›|Òùsș6êE™!…Xłw9}š L”,kś­dïù]ìŸr‚ȘĆ«đ=€ëƒ+łüĂőÒqŻŠęéߖč[fÒšbUŠUŁv©ș<ŒŒŸbÛ~çŃmfę5•o{}/Évϐ~”Z„ĆÛ–ŐÍÚ„êòęÓ~ŻCNTQ’=çvÒșF»TOfAĄ°ÌșŸ:‘E§’dĘĂĂC6¶]ûdûn+ÿi1ă„»'rlu­ŹUÇűőà:ÀLÇzoPŸHEj•ȘÊ]‹šæU[IŸ”Zê—kè`~kV”„ôYĄPR„ÇŻISY\ۋ3íjwp™&4ü&Ëv.âÊęKDÇ?!2ö1wß!!)/O/—ßłć^ä]nG„òùÛ„s*„А*-Űw~·,íu;Ë~Ï+ćpûQhšòÉŹ˜Mf©SQ©TČÏÖJg”—CrE2˜lfČȘùÎh2Čfïr”¶Ìò4ȘB‘€`Ví^ÊǝÆÉÒÖ.]ŻșNà۞ßsæÖ)fÿ=MR Šć+Îę- s?ë2ž›aŚ™œyšKʖˆèpæl™ÁèŽcé\ÿm ć-,u.ƒÛŒ/}.è_ˆŒŸ4ûą>·#B ,JÉ„-ć*AÙBć]æőĂïSx„\Š ˜@ŐâŐčy—©§H €Æ‡9ƒĄP(š[¶>ÿœŰÌîs;Ȝe+—*œ§Ë Ö” V9·mçF#&c֒o{VìZL”â5š\€NŻŒÉG‹‡óÛĄ_èŃ€,mS›v»z‰šäÍÀń«Gd ”mÛžßŻƒ+sìڑ4)P{Ïïąh`1™|ÛóßőcŹß·Š[á7IHŠçfŰ <՞.Ó;ăäőăèzZVk#+”·0•ŠVáđ„Čș)«ËA%(è_ˆ;Y»m·.»p”ƒÚŐ"rwLöníÂs5”e«Ćee–ï^ŒŻ6Ł—ŒÏà9}<§/ I ŹÛżÊaz¶tÁČǏcÉΕ)TN~\°lжr[>y@`ź|ćÉïôúͰëŒòI5NĘŁcœ71Ű)3j„e‚1„…·Ć󕰔ŐnAćKû€kÙÛ]FNÏ:QžŹŻ,Ź?±bŚb” %­żlD„áĆ©4Œ8‹¶Íăúƒ«ž(—[_­ŻìŰGë‹Ț w8gÿłÙŒÁz#lœäòÊćôúĂšŒ1©5ü Č`ű Î̌ΞIÇÜjäMfŁȚĄŹÖ|mIŸZyYÔ*”Û Ű3f3.ŠÛÊčłèæ,ܶÿyt#q‰±4«"oۛWm%mČ—Ë©›'€ăx]<§nü'37N Û„qEé‚eŰwaË5S+w/ĄE”ÖÌ4ŸĄmGòzN<Љ„Q«Ô©*”ƂJ`49zćCY‹eÿ¶ĘUXą”Ü€{›FžÛ‘ŠęčŹÊŠ]KÈïW€čC–đ]ŸiČWój­۟ʷRqì;ż›3·NńzĘNČ4›Žü*íÎ;sëû.ìæő:ò4źhUœ-č™őŚTžÄEIç­#ĄÂÁÄéâ$„éÎŁÛüvhœì5KÖF„Tq.ôŒË|òűűŃžRS~=žVaŸčuŠœçwÉŠuł+ź(g imύÆäęáYŒÇ1Ű||#_ÿX&ç3ȚG”â5Xn'ë¶;?­Ç„žšÌ€sgÓćÉŻ „È«YćŻc›œ^?qęńș8&śú†›PÀŻ ‡.í—„ńŃű T(Sœ}U*””,Pš]g¶ËÎï<ł olíW¶ÄÖ% ™–LvvŒ1 +P+v-ŠyŐVíúœ!‹)àW»–ÈÒ/Țț3:œ%íąíó0šŒŽ«őș,Íò]‹‰KŒ,ź@F=HsÛțNÞ$èâ™óśt’ IÒyë&€"ÁDĆ'·ù§nž`ÏčČ{Ô.]«źžTÂ^)û*ùę °dÇ|ÉŐŻŚń ê>l–cdWLf“ƒ|;Û$áÊ1xZxÙaÊd6±zÏ2Țz”*'ȚáȚjĐí§·Ê\T)VJ#JĐ|ü«ŽB§WȚąÓ+oÉŸŚšbŐ?(C›Ż›ĐàłÔ.U—w[ MS™ü|ü™?|9[NüEÙĄ…éú}GšŒ­ĂÈ–EƒŻŚí„Ÿ·•ß/Á߶࿇ćd¶n°(Gï4ìAó/êSíƒ2Œ]ț‘ÓŒŠöŸMDL•ß/!•”VÉ:Œhï<}vÂY‡!›ezzĘZĄd.ƒËțŹŹÛż •RĆÇÇÒŸNGÙ«WÓțüvhœÌéߎ3ÿČjÏ2ő‰,ʱ€g¶ŃŻù Ù=O^?ÎŒf‘”ÀŻŚńÛĄő.7?ŰS$ ˜·tcȚ?łX·I†$ôFœŽSŽvéz(Jț8ș“ÙÄźłÛYđïÙ=|œrQŁd-6ț…Đđ›#v+ï¶ʞs;XŽm‰úD~;Žž_źc`ËÁnĆÀʊ˜ÁAÎí;gŚlć?«qçŃmvžÙÆ; N*JșÔ‡U{–Jł‹ü ò(&‚j#KSśăʌ]țăßùFfČS(ô/D„śKĐxlmúNïÊà6ïÓ Bă4•©FÉZLî=• k?§üĐ`zLíBőÊJźez5íÏùÛg©öAZ~ِŽ“ZóVƒnČ{ŒRźć •§èÀŒÔUȚéZołß[À_Ç6Qqxq­MŸéï0šŐ°,”8üY1›œËłœÒ”šò”d?Ębáećš$Có‡/§Bçvéu;SĐżlßǝÆŃ­qoN\;ÆW]'ŃšbˆĂśz†ôc@ËÁŸ|€ŃÇRč9jUò#ßđé_”*XF:Ț8öÙș©–ŐÚđßÔ‹ìż°‡»ïP"š$+5, ŚÏ̌Ξs;čûè6ÓÎ! W ŻŚíDnï<Ò=æ ]ʏ~âô͓űûæàÓÎ_Èț«r…+pè»Sì9ż“;n3æÍ/iT1„"Yż^ÿÉČČZï“Ő;{7¶;2œÛîÂËȘ‹ VìZÌk”ßp:;Ô長űtéüvh==šô`ì›_ńíșńŒ˜?œAÏ ÖĂË~Üi‹·ÿÌžŁI2$ńæ«]ĘqlšË4mÀF-ÆÀY=č`0ș€DB*7§Y•–æÎÇ'?çłeòáÂ!xš=™5h>œ~”X>ë2žyÿÌąöG ,Æń©Ž.6ú7Đđ[ŒZ4ŒO—~€Î Ł[Ł^Œ{ëë4—5ëâZźíęá8ë\Č"Z-~±șeê;œțQÇ1Ž«ĘAš R)U,±†ęśpőȚeê•{•ÊE«:|ïû~3yóŐźœż}–©ęgS»t=éZĄŒEŰ<~'Eó,»±7ßIA›uFCێ€]­Ś9|ù OâŁÒfőË7 B‘J\ŸśP ÉÒ°b’ IÜ·À{Ș=Ù=é(Ńá\Œsž,ëœ _I~ÿ‚RșÖ5^ăż-}ȓž(fŒûłlCTÿBlżÓa}ëÂá+dć͊ŰÊ·œ<§Ćś“u'^J(ÌišÎ2·]ŒhőĄŁÓéx4!yŃspM/òÊzń’Râô͓4űŹŚæ=pčÀûQLĆßÍǞIÇšQČÖK.Ą 5nŽ'6ÜbúŒŠ=Æč|ÛĐj”h”ZŒŒŒđòò’Ž”Z-žžžxxxHn ÀȖÄó·ò([ąÓç+„!…ìH8WWżÙB‹j­čțà*ùò‘Ë+·,MčĄEśÖŚôn:€Đˆ[űj|ɛ+à™ò‹ŚĆqęá5òû _î Ù5œQOhűMJä/%SD}"7^#8 hšÌŒY•‡t„_ł˜yą=Ă8\|5oooIÖœŒŒĐh4h4IÎm·s LažhŻ(Ę·Lˆ/ߏçș#%–îXÀä_ŸæâO·]ŠÙzòoȚüî5ąWgMkKvç–ɍÁĆü;yTđ*ȚȚȚ/Ûv^ŁŃàé鉧§§äÆF­VËÜŰŰșł±ć™Ü8ÓÚČêE p6”ëlšŚêêŹČŸÁɔŽ[śäŒąO”>+Ț§#~•„ ”qzÍ]ŽZ—3ÎÙłÙőæW–„Źn]ä\Ì8_ÛäÊrö, ÉÓ% QNRąJ(Íæń;%s˜3r{çaóűź™ûJæL‘‚äé`«e9Ÿęć]œH©±uEc5W[ż“UŚ·șC뚯I\Q§t=6±3Ć4‚L‚‹ƒ«ÂłđÌ ”»‹­Č >Z_§ëlńPy€šFI0;ŽČu,*•*ÇÈž-1kRÿœ—~șóJ"HÒ2 ·źęÈiò^ÀŻ ü ИÆß7/ +6yI%<iUœR:Nç2bçŽ &ÈțžۏÀ…Ü Čî›4€c!î‚,FZLxČôÏĐŠ§« O Ȋ€”‚9”!ÈÙۛź‚ìÊóźńK·m™m6*5ŻÁ©•őEꖮÜ7œÒ<ï3p7Ęł|/Łe&­etj3Ï<â.€ §łK€Ü~›Íf2‹Òń†ș IDATŚłŽô3©]QćÓ«OÉìmû‹î7ÒWfșô(_¶Ú‡ÆÈƒ©2ą~ĘՔzŻł7O“ź7ęü~9°†ŸÓ»Rd€?ć†aêïSdśűyëljȘ@@O úæąęÄæœż}Vșțćê1Œ^œŰôŸQsTy6\+ûvę—RšƒśQsTyÎÜ:Eł/ê“Ż·uFWrÔFÿ™Ę)1(ˆ}}ymb3źȚżl“ÏfBÆŐćàĆ}4[‡€žö_Űăô9ü~x&·Ą`ß\ôÔĐđłš2' çBÏĐ~bs őÏCđ€Œ ˜ÙCò‚ đăŠï6o Ëw.ąÖš űuWóûá 4SKæ9,ÙC>Ż'yDÁ»ł{QrP~òśńĄí„YÜŽgț„ág59rù !ăêŰKËźłrÏĐ/wŠy3‘±Ù{~gn’…ò‰Š‹$6!€+ś.q6ôŽÓĐOâą8vő0‡/pˆć—+‹f6›yő@ædS§Śöä!`iÔF=À`4dHâűŐ#Č0¶˜Ífn…ĘàĐ„ęùMFF=Àh2ąÓë8~őś#ïč|fł™łĄ§9xqŸÓtف wÎqüêYÙÁâÎÀ,&!šƒśń(&ÂiÜ;ëïł­fł™Đđ›șŽßÁy§íïH2$qüÚQY=Ì(ÒĂtńČ9}ó$ęgv§ä{ùńïáA•„űśÔî>ŸCÍQćÙsn'm'„ż5>,ǟG7Êîńɒ‘TVÿî{73{ÈâŸù]{m›'ÿžé;jŽ*ÏĆ;ç„s=Šv‘Ò,üw.=|“?ŽțFŃ•ÈŚÛŁŃ^æÏß>ËëߎÚÛț3»ËÚÛi›țĄó°bŚb©œwáQƟ?Đ|ü«ôԐż/'”–]ÿçÄ_4S‹|œœ(;€0_­+kÎêÉŹÍ?òĆȘO©0Ź(Ż|R•6NŠïôźy}čz ƒçô•Ž/Ț9Ïß¶ąp?Š đ§ïôźČș;óŻ© šĘ›U{–Qgt%üș«eQ4^:fçq{ӓl„@ęŽy:gCOłìƒuܚÁڏ—…œžöà Ł Ł€Av~sˆ^!ę™ČaK¶Ï—Òxyx1uÀlÎÎŒÁšŃŃzjyçoHféeŰpp­ôGlùï/î=ŸËf›0żZOńü%ˆÓĆqćȚ%F̏>Mđśű]ËW‚~3șIśL2$ŃêËFDÆ>fî%lż‹ÀÜùxmb3)\@LB4§ožäŁĆĂéҏ}Sțsș ;^ÇđŸß„E”6œűń2'§]aÄëŁ%륷höĆ+”,PšMc·ČhÄ*n„]§śŽ·„{„? ăś#X¶k_Œ3‘]ß!€rs.ß»èpá¶čT)V ”JÁh ÍŚMxő€Ÿ/䟯öRĐżŻMlFtübb8zšĄkŁ^ì|œ*ĆȘ=ă?žs‰Mˆ!äóz”ÌÇKFđú7-hùeCézÏ©oòÙòQ„Œ«KëŻóê§Ő©ÿI5YđĘù[ąôà‚ô™ö]Ÿ{Rƒ 0eĂéúúę«©5Ș‚$ë'n§ôà‚’7|€čÿÌäőo,Áy#ąĂ)=ž ‹·ÿLÉśòÓaR+ȘŒ(ưyr§›Ś\!d\]ȘŒ,Eś:Sòœü|żq’tęúƒ«”\%Ûç<ÀŸNSÚ:„)ČČrśRJœW€.SÚ1ìçT~żÿ"]ßuv;•Ț/NŁ1”è8č e†–uŹżZOŃ•˜țÇÿ(Òߟź?täàĆ}”RŰ!ȚÙÖ›)?,Xêün<ŒFł/êSyDIzLíBÉAù™üKČCÎÛ·€ç< /&·aęŐ.țQAJ|±ò{»Ÿ=‚ÆĂѧܙ[§˜°vŁßÕ9ś8đĘ YH–NlŠûi_§#{'çëîSXżoŚ}!+Ïw&róáuæ]‚á+,ĄŒ­ăVŰ )]ą>‘…ÛæRŻì«Ü{|—ÏëQ80˜ßÆüÍČÖqśńșOMÎ?":œżŽobá¶č|Öe<»'Ć[ë“Öż8K’.k 2 û/îáŐò$當Ța­”)TŽ)œàó·'pćț%fÿ=M ;Ń«i)mĄŒ…)™żUF”âäőăÔ-[Ÿ&Uš1/œs·ÏPčhUvĘÎđvČxûϖú“\ș{&O=†[Úv€äŽ̛_2ź.—ï]€rŃȘŹȚłŒ[a7űç«=’sΟȚ[H‰AAŹßżZ*›ȚšçăNăBÆŰr.ô 1 ŃŒùjWòû 8°»tęż}KAÿÂL8WÚŠìçíGł/êsæÖ)I™yĆÂśWÊüútšÛ™»–бȚ›€„9xqșYfńÖí_ĆŐû—ù}ìV)șśŹA (ù^~Öî[)…±1šŒ|ĐáȚn\.{,Ț1ƒAÏ텑’‡üËś.ÊÒ,Ûč)œäĘVCčrïïęԇeĂg›hPĄ1—~șCȚ\Œ~9°†wgśąuŚšQČM«Žàęùƒ8û,•ŠVaśÙí ,&‹%·ûÌvYÿyël6ŽÙB­RuYłoƒfś–"ÊMFzN}“ÒËČjôoò/Ì֓óÎÿ:P­DMY8ąŸ·Îæ·1[hPĄ±ÓÙ3ƒŃÀ7ëŸ`bï$ŻéOâąHĐ'– ÄĘ~èݶ0ąęGh<Žüôś4ÌêÉń©(ò4°śŁ˜öžßƑïÏRźpŒ&#M*7cĆî%’wh€U{–ŃąZ‚òäÇd6Ń{ÚÛ ,ÊùY·(œ·ÛOoć­ÿkOő5ik;müòéŸ4Ș’jX#فĂW2wÈb)RCł*-Ò”ŻĘ‘‘Ż XÚÏœçv1çïéÌș€:|"„}Ł^ œ~| ^‡ÆCCHćæŒśS_ôF=ń‰qœșy‚ŃÇČëÌ6†·û}vŁńĐR»Lrż“ÍÌA?KțÉn<ŒÆ˜ćŁ€ŒßoœDÿBÌ8/čœőńŁéçŻpúæIȘŻXävŃû+%ïćÎ8pq/…òĄUvš”*sç“ùE›žös:Ôí̧- S…"•xĆ+?aü;ßHƒh•Ë>X's YŠ`9VíYƘ7ż`ó±M$éut©ÿSŸb‰Í:hŸäÄ6ŻoÆÔâű”ŁÔ*U°(™?]šnțÚ2;ÙJêÛì]†ÏȞł;€ž^öÛR›VnápŒéÈŻMFTJîœcÒúŻűïÚQÂŁĂ0™M˜Ì&n…߀nÙú ,F‰ü„Űuv;țŸyčvś_Ü-38û,gn" W ƒ3À¶5ÛKŸ­źôDȚ§rŃȘüwęčœó0~Ő§ČïűjsqíáUéX„TŃŒj«ŸAíÒőšZŒ:Ő?,KۚíéüÊÛŽ«ĘAúŚŽĄV©2·Ÿì{J…’kźH Tčœ"öhҗN“Ûđ0êùę °zïrJ(Ă+ćđß”ŁäòÊ̈́”ăì~‡/Ś\‘ćŐąȘ|êYà‘±1šŒ„=y()e •—„)àWĄmG–€œęšbä‚ÁDD‡˜;ƒ+c6›čyû‘ś(U 4ü ČïÂnj”ŹE±  *Áîs;ž*P;öڇ|łn<tÁČìżž—-ËòíÙ€Ż4xy»AwF/~ŸS7țŁV©:ì:»łĄ§YúÁZ)xoëíh\©)Ź‘)P=šô•â‹9‹Qi0ˆNˆ&":œQ‡Êƒ<>~äÁ°x–ÖzhùžÓ8iD?ü”QLûăü}üIĄ7›ÍŒză3Êź ćŐŁI_>X8„ÿő·Æ›šžH6ßÄÂá+Kń“7țcȚĐ„ÒóoQ­5ÍȘŽä—kd TśÆœ%·&Î~‡ eÔ*5}› €ßŒn,©4Ÿöu:Ò­Q/|ŽŸČt!Uš;ŸčyR:Ț~z+Ó6ęïœ'*.RjÛï>șMÉ„iR©‰I »r˜G1”-Tžwö`ÖæŃőì>»ƒWË7ÄC•]ŁtÁČ2eĄFÉZèô:ąâ"ńśÍËŚŽąV:¶·*„ŠkźH TÙBćSTžÀąô}·a"ć‡KÏ nYKˆš$CgCOă­ő‘™Ę"c#IÔ'rśń©=oYœƒWíMú°hûÏ|Öe< …‚U{–ÒŸNG),ŰŚá©ödèÜțČï©Ujź=ž")P%ò—Ê1Êd3Ș{ăȚ„TnÎȝ Yż5“ùš‰=țaí>ÒűŰM)úh}-± žźSxăÛVÔ-[ŸÙƒRŠP9ÔJ5†EoÔKßiZ„»Îl'Żo”JŐ%*†°óì6΅žĄq„Šj.ÂڈZfÆëâđóńwđŐšbˆÔš[ïaçÎ …‚ĘßćßS[X»wïțԛ€\ì˜x <ù‰ÓĆQ<š„ÓŒȘŻ!;‹LßžRS úbÍŸŒxí#VíYFŸŠ€ëqș8òxû9œw™‚ÉNE”žÚgő!°ĐŻù \ÜKĆáĆšYČ6œBúÓ­qoŒ5ȚRš&•ć3CÖă[a7̝ŁW1xN?.ß»H‘€`ü}ó-‹čRč9»Îng`Ë!ŒŽÿë;]g·łóÌ6ąb#ŃéÿïJM„Ï*„ŠâA%$łŚùÛgQ*”tš$|)‹ŃĐŹȘă,ƒ-Z-șMaâș/ű~ădÚÔ|Á­ß§VéșR^q‰±ÔüPîĐ6>1Ž[6ŠLoCŹŽu;óáÂĄl:ò+]ődÁ”űh}%Ćès( Țúźœì{QńQŠőŠNfKî1„śô éÇò‹űßoßòćê1,ÿpœl&Ê^ĄòŐűJíö„»xûÿ^gh»śÖŚ”*X†3·NńÆ·­€4țŸy©ZŒ:»ÎnçQLM«Ž LĄräńÎĂŃ+‡Űuv;Ęő’ć‘Û.Ź‘ÒÚ¶?5{Çéâ(XÌi›h+ï…Û[{ űäÂìP6\ˆkhóu^)Ś€żŸŰNŸˆŃd€B‘JÔ-óŠì{žž·bś kŁ^|œfû/ìĄláòl;ő4S –őE‚ț«ò”ÖߑÈV XÌnŸuÏg]ÆóĘŻùqÓw i;BšÙuf;vHžéÙyvE‚ńT{rêæ îGȚăën“%-zËʔ'°t*Cç wB*7—Îm;”…ó·ÏòŃcÜ*sĆàÊŹßżšŠUZJŠŻçAĄPĐȘz[ZUoKŒ.žȘ#K±zÏ2FŸț1ƒ+sòÆtkÜÛíxbJ…’n{łjśRj—ȘËíđ[tkÜ[ö;Ví^JŁJMŸ;€‡ e‚‹ČćËƜ =ĂŻ‡Ö1uÓw,Țț3ûŠ$Żùx-_Ôl],íőTÉ8»ŐKÔdÏ€ŁRçSqx1ÙBËŠUZđțσ8xi~>ț”-TžÊÍÙyfŃńOš^ąŠƒRŻVșnVŒ<œĐxhŰđÙf™Č ńĐʎí;'g h9˜!}Ù|lżZO‹/0oèRȚnĐ­§„ ”aíÇż;|϶ÌȚoYok9;Ś›•»—Đ”QOVí]Æ[Żv“Ì„Z-žjOÖú'Ÿv·§Ęú•ÜȚ©ÿAêT.Z•ïúLcJïéöC'~Ú<]Š@í<łMfNȚyv›4p;pq/>Z_Ÿê:IÀÚŻqhòtÀđ8ö‘Ž4!€rsÖí_ĆùÛgiRččĂwRąbpeN\;öLí­34ș7îMśÆœč|ï"”?ȘÈŸ »iT1„àÀą<ЉÌÙîP(oašUmɊĘKšTŽ ùę ĐŽJČ”ŠRŃ*ìż°‡źz‰YTČŐ"òÿΑvUÄëâč~“ÊE«Êśđ•ƒ,Ú6D}"ëöŻâÏŁéŚbć WÄÏǟ?Žü†Áhàè•CüđûÁo\©)q‰±üvhœ€@5­Ò‚§ÿćvDšĂÈ?5ú4ˆŸ?Ł ăŰŐÀeJöŻcżËvâ„…cWłóÌ6i­ĆGĄÄ&ÆRćéTńšŸr'"”qËGsęĆ<“͒íóIÔ'ŠzÿûpțöYÆ­M“ÊÍ$ó@ïțæÎÇš…Ă8rù `Y·őśń?d;ńéG„ąUűâí‰,±šS7OÈvíżžG¶clç™mxkŒ)TƒŃÀˆP:żò¶€<Ÿy’ÛĄČû7©ÔŒŰÄ~üę;©sjZ„û.ìæßS[h\É=YŻUȘ. I »z˜ąùŠË^Ö5{îąőĐÒčțÛ,ÿp=íju`ă!Ë"òÚ„ër6ôŽeÀ./ż§ Sąg“Ÿì9·“g¶qäòAYÇT«t]tz‡/pžwjȚŹîÆêœË„”Qq‘<ˆŒç°ùdęțŐü}üâuqLÿăœ =#”íőË5$2ö1»ÏíÀh2òڱßYłw…C^M«Žàȕƒ\œYò8Ț€rs–íXˆŸ?ŐJÔpűNJ|űú'Üyt›±Ë?’–1XÛۄ€·îőśń?8}󀎛ìÊœKh=ŽÒș°Qo|Æ_Ç~gÒ`é~ä=–ï\”Šûśhҗ‡aéŽ ßÈŚ?æaÔ>[öĄÔ'Ć&İlçBiŁSN$[Í@­Üœ”Q‹†áçăNŸHÍRuűźś4YšO;ÎìÍÓűdéH’ Itoܛś_û°hś_vę–ï6LdòËnšéçq.ôŒìč©ZŹ:Wî_’lĐć W W *„ŠÒËșUîŒčŰ8ö>X0˜ŠŸż‚żo^žÄEQČ@iV}ô«[ś Æ{sú“M.ŻÜhÔú4 Ôj•źËÊQűdéHfmț‘ŒčˆŒ}LíÒőèÚžW*w·”}„\]Úςáò(ÇțÈùïŃ|ü«űùű“Mń ’,ÿĐù.*ÁłńùŠ)[ž*Waûé­ÒbÜ E*áíé͑ËśÖŚžC’”x»AwŸXő)—î]€cœ7IÒëŰ{~ƂJđNĂiŸŚùÛgùyël^ŻÓ‰Ây‹pńîyö]ŰÍŽsèĘt?ÿ3›î?tŠołŽšÖ†°'Ù||Ęś‘6›žâ•r (žż$gő€bpeYúÊE«ÒŁI_ŸZ3–kźÒ©Ț›èzö]ŰMĄŒEèn33+x>ô=ߏÏ{?ő! W :œŽFCùúhYș1]ÆóȚœŸÄëâ0™LLè>EjśÊ©Èà6ïÓcjL&#čŒróMÿńîly›Wż\C” %ŐJÔ$ŚÓАÊÍŃő4ŹŰÄíY€Z„ëČêŁ_ùxÉfož&koßiÔÓ­{ż}–Ÿ3șb6›Q«<(à_Iœ~öț-Ț#^τ”Ÿ3fù(|ŽŸÄ'ÆńvĂîČÍQźh_§## æÒĘ Źțè7Ù”jĆk°fôF>ZüŸÔNDÆ>Šf©:ÒBóìŽuc€- s*Žl­ÙF­7 Ò+)) N‡N§#êÛBÒwƒkz‘§‡«[żbbžE±|ĆlâEđ}ż™ŒĘ ;·ÂnÛ;Ó À&ł‰ëźR<š€ĂÔț‹&2ö1wĘ&_ž gɚÍfî>ŸC‚.^8ă~ä=ĆDP$ 8M#rwˆŠ‹ävDèsęŽĆÍĂńĆ[|Ł\ń<Â)ÿ-h”ZŽZ-^^^xyyIŸ5 ”ZZ­–*ŃhÄ{SeTQ–5uùJiÈ_Áqëń‹âç­łùćÀźĘżB@ź@ZTkMŸf„5sí'6§z‰šűûæe՞eèzș6êÉg]ÆKÀ”W˜ńçlùïOŠ•`T‡OÙqú_Ê*'-°˜œyÛÈÂá+%ó7ëÆsđÒ>Öò§€EĆEÒí‡NÌŽ€’6îC†ÿü.+5•v]MFæl™!•?”JŐáŁ7ÆP”xuî<șÍ»ł{±dĚg„îGȚcüȘOùïÚ1"b©SúZVoĂ VĂ€ÿ)&!šÉż|͎3ÿrçŃm‚òä§q„Ќéò%ùę °ęôVü;ǥðČdû|Öî_IÏ&ęèŃ€ìšŃdäç­łY»o%Śî_!·wj–ŹÍš7>ŁFÉZ<ˆșOżĘX0|…Ó5…/ƒ‡t„_ÓđÄă!û‹,GŁŃàíí-“u­V‹FŁÁÓÓ•J…Ri‘łÙŒÁ`Àæ‰ï_Écʄűąń}čŒˆèpž<€LĄrȅÜ7Ăź[vJO»L‰ü„žvÿ E‹âćéćp„€DȚŁDțR/łè@úŽ·zŁžÛá·đP{XÔi“ÙÄ­°$’,Š·&}] <ˆșODt8…óqÚf$¶Ä`4Xt–sÛÏooo§/«ü[ÛxOOO<<<€¶ȚZ …TČœ•¶ ” 璒„ŐjńööÎô TjŽŸŰœê%kńMÿËèą2ì€@čÂVÊI;ÀŽŒ(ÊöeKšj@VđÈ,@€%àp¶Z•Ą „žHăɃ…ȘĆ«SÂf=”@đŃu­R(A©•göțs3łŃŒQ&œ“kfˆ{d&>҈o ß| Ć3c6ZžgÜ#“˜eÊD“ ț±™űÇf<},JN™ż(Ìfˆy`"țqÊ„'š4 PŠçęBP€)ÉÒÆ›Ž9ú3o™ńôV§°2ÛÎÆf+*ț±™èû&‡Š„҂W^A Žù(=3Š|9ł ôŃf ńĄ™ÄłìZL˜ ]œÿ`1ő,$F›yrŚ”â€Ò€J«@„” Dwòb0Á˜ÆD3Æ‹lےgæŃ 3ÚܖEŽwŁ"CMèìxxćS ÍŻÀ+ÄBd‹ÒÊäqA΄Ìđ‡À—Ü#ŸâIČ@“^2ÍÊB<Ő3$ Äu’hq±…đŠ„żȘŽű ž!û ÇGŸ©yi ĆčÇæŽÄp—x É Mû˄'‹N€! Û čLT«ÒßËćP}~S/ț 5š±ŐZŰ|}Æb‡fęœŽ†Șx#+±ŒJ@rù~?Ńí$’Γ‘DYƒ ȅDr_Ù'˜‘{TÁăź»2U' Z@ćWJ§°J|LX#LTkì$/cO*ęƊČUᙛà,ò‹¶†Cłá‰7$ˆïâM-ĐPÜ^‘ (KIŠ#ŻÔȚ#šI$őlĐ]ÖiIxČWôjšŠw?íßŃ IDAT&ec ÁZŁ#OőƈíàÍ94<$šœïç„ʟŒăŸĂvMûÉX#ë°@‚J‘p¶ì1,)đź&0 žrO!ÛŒŽ–˜]Ś0‰j-ùŒ4ŸTq5|›o°Ê8ûÈb‡ž.Uû(©‡ö°ÿèŸȘKç‹ÙŸóőŻ_UÛùȘ›EkàQ<šȘÊŒ•sčï„đÆÔWëŹ<Ö(ˆíhÊ+ Ÿ–ŚéFqŽoT.Ÿ‹ˆ¶6d{ÊXÂK_çŁé”H ›€Ö5%…ȚE5â»ÈXÄ ĘMBwɐUd2ƒž:‘jAm7H„žœSß5b;V} Ą_»ĘvU±d„lÜù'íÚXmç«NvÜĆęŻÜƒE¶°nÛZîćőÂĐ>ĂëŽ\qddĂę”””lX‘ND;V’jŁz–R˜mÈ{Š‚˜őłă„†l…űź„ÍŻÛé ”żœK’„,Ë^›ö{hûk[hëŸ5bڇ~ę>y–â’âj+KŚ ÙčG”Ż:ÙžóO~Xđ=‡Ž€Ęš–[łe5ęnèU-Ś<œvˆŒìô żÏ§áÈWk|™M—gß±őJ (łÔV%óÏâlY”ëæćłaÛ:śJ‰łÄç›§E)ę•ęś+ŠÂțŁû((*xț#é‡q8e¶9ŠŰ}p9y9eöiÇr,ăšÏ>EQpșŒ™•9y9dædš^7íÄqĘïS~€Y‹g2vĐxÜ7ż,›ÍàȚCžäąqô8ëꘂą;đfهÓ‘[đ3WÉ‘Í aȚZœ­aVčü;YöVm{máqá}Šë$WÛ Ó7żxìŒìê9Đï†^ŹÙČșÚÎWìÜżƒŻæ|ÁÉü“ŽŸ8%h­ ąÛH>C°5î0HmłÍöŐ¶­ â“ûÙ*ô…1·ïĘÆśóż%ÂQmĆÉÈJÇ]Ołž?țțNæŸÄŁxHÏJ xœÓć ŰOT”g>x’g|X©śF”òͅò_Š„¶ń·3[fÿA›a3OĆl[mă2ŒÚ„*çÌ[9—‹z Æfçâ;3kÉL¶Šn!ź_Ÿüű™Ù4Ż‹›Żæ|AóĄI\rśHšMâŃwțísȚă™Ç8ÿš œę"šŠçË9Ső}ŻNy‰.—žÉ͏]O›)\óđžÜȚ…b§"ź_/|ò,Ę.ïDŚ 5i8y…y,Û°„n—wâźçn§ś”=i7Č{âFœ’oÙł™^ÏaÔ€á\ùĐΟì,ŸrÍ^ú3ă_Ê ?ËÇßÀO  śÄž|ûÛ78]Nî|ö6R†$2ű¶ŽӚe–êï]żm]'tdàÍ}i}q3źęśUVí0a\ÖÀéuMeœ“êÂۙH2>K?T…cGyoú;$Ä$TËù2s2uq_ßűüçÉdd§Łš Ùé”r·ö HŸÎŸ#ŻîïëÈŸkÓî]%ȘÏȱśÙKfìEăÉÎËfć_+ôí`ńڅúëŽÇÙ°}œțșž€˜ßVțÊç?OfÛȚ­eΫȘ*lZɗsŠràè~Ÿ}Ç2Ž2ăśïűì§OX”éŸ}ûŽìekêÒNç›čÓX°zŸC»5u ûŽìeÿŃ}|9g*lZYæÚ[ölæÓ?æÇ38qò„Ÿ]Q~]ń c/§osșœüŸjÓûÚçXò‹ò™»â>ùá#æźűEï{4öÜÍŚż~Uæû8tü G3Čśp*óÿű­ÂΒ-ŸI/ÎZŠșV”PíœR~l]›;Ő°žȘŸoö’Ÿ7èRśÊą5 XŒv!gwèVúzĘ".èȚ‡{ÛöneÒóççw~eûÌ=ìš”ŻęŠßVțȘŸśÇ3xÿńÙ={?_Œđ5wżp§MșvôőìŸ{„U_­çèÂL¶ìÙ\&gêà±lŸč‡ĘsöST\È«“_òÙŚČi+vÍȚǖwČòŻ|9Û+Đ^ÿünčôVțú~ë§oâ/ŚéïËÈNgߑ}ôíȚ§&=Ë-ncâšëŰòăNźs|ûKÖ/æŻï·±gÎțvémÜűè”9Šp{ÜÜôŰuŒčp,»gïg돻ŰčŻțJŐ„SŰüTÜ”_ÁêÚŸę1FŸìI’Ï0gU˜œl—\8–‚â–ź_Źo?–q”ßWÍÓ_gædČzó*ę”ÖHO™ùwțizîuÛÖòĆìÏÙsp·ÏöŒìt~\0ƒOüŰG˜ƒŚqŰžóO2s2ùnȚtæźűĆÇóßč»îâpÚ!Šęò„O™5vìÛÎg?}Âśóż-ă‘Ï^ú3cŚ_»Ü.Ż]ÈŚż~UæŰ}GöòÍÜiL™ù›woòÙ·mïVöNŐ˱ïÈ^Óï "R 3ò<őĂašküïŸi«Àęg/ń:‡n·‹Ń“†ëCy/|ò,Ł& ŚÛßÿM—iż| xÛÒ^ÏáÙŸbŐŠ• ču ïOŚçŒüś_<òöĂ|ûÛ7œ{u7–Ź[€ïꏋYŽfwlàÚ_Ćę/ß­ïûfî4î|ö6ß:EkpĂ#čț‘kôęo~ńw>{;Ł& gÉșEŒ™t1żûˆŸ_;ßȚĂ©üČ|6}ÿŸŸo͖ծIiCł€}ÛćŽçŁđÖŻÓkâ9óz'=śwŸ™;]vòŰ;ÿaàM}tuèűA&țëJÖlYÍÒő‹~û ț7ęÀ[/§bځÌZ2“. ù·Ń°~ÏúlïĄô rÍgĄS”DT­łsč],X=Ÿ·țí­0CzćȚ—ÿÀą” yòźgžçĆ»P…Ćk2žśP~^ü“>äőÇŠ•(ŠÂčÏcÁêß5` çwíEŸî}˜0ôr’â›°`ÍïÜ4îZ§ŽaśÁ],Z»Ăi‡HˆM`ăÎ?čyüßôČĘ2á6"ìDŰ#žjÄ5Lžù)Ïß[*ąîŒjÙBûV=đ~]>‡żMž”&͙ńûwŽmȚŽáęF[a˜œtŁŽŃ‡Łü™»òW.rg¶éÀ=ŚĘÏKŸ=φíëi߄œ‡Sčïș°‡ÙiÓŒ-Wž†ŸțÀS“ž­Òï ań‹Œ{\`«Ÿh|ƒÄŰÈT珻Y‹grßu K2ăîÍŸčGh߄·§œÉżz“ßm„k‡łùröçlMĘBßęÈÈNgô€‹‘$‰Țg_ÀŁÿęś^ÿȚț„~ȚW&żHfv­RZsϋw1í„o7Űë Lž,=Î:»ÍÎ˟œ@ÿžűⅯœćY2“)3?Łž€˜~=úóÛÊ_éqVOæŒśČ,óьŰŽs#G2ŽpŃyƒűiŃ\;úzȚ{Ô;œ0éčżłeÏfžwÙčYüčc/ĘsÿdIæŹ¶ô!˛»€Üü“<üƃÌÿx1gwèFfN&—=0ŽÁœ†PX\Ècïü›‡nțĘü/țû՛J;ÄÚ{­SÚĐŸU‡JęV?qàq©§ęM΍ö.YùȚ„Ç3q8ę0tëƒ$Ith}&+7.gxß,^·ˆŃ/aŃڅÜ0ö&Ż]Èżo}€ÇȚętëĂ”çŒ‚êź«ïfÈ­čaÜÍÄFƐ’”œś~àĆOŸăá7ÿÉșoțàŻï·éí?oz˜n—uâń;ž"9±)wüɁyGišŰŒœŒڎlÎâ” rÁ0vŰÉî9û  灹Ïuçqëe·ÇŻËæp|q‘áe+Ÿ6’ Ą( #ûâȚëàš‡ŻàĆOžă“§§”yï—/~Ł—YQ:oϜ„łžlŰŽNiÆo7ëÇÎ]ń ·?u wOŒÁœ‡Ò·{?Ú”<ƒÇïx*ŽÆcVOGFuÊq I@io ”SÛ(†/œȘ33–oXJŚg“›@żž8tü ûîcʶ”|ęÊwth}&vŹgńșE|öŹ7ʓ–yœÜ‚\>ęá#ę\IqIœŐ¶“țșó]|źŐ©]gČN…UŸüßc,X=ŸK.G·3»łsÿòO љœżS»ÎœÈ) É&Ä&Đ4±Yé±í:ły—·B?qçÓ|1k Ï}ü4w ÀÏȚÆSï?Ό7fÒ$Ÿ ›flŚ[ș~1—?8žȚô°^ö­©[Ű={żiÇVŹáxó{NęÄőÙ#Ż-*ÛŸÏ^:‹1/ŃŁÁœ‡Č`őïŽoՁ˜ÈźssWüžÁ—Čiś_\xț –ÿčŒá}/æ•É/ą( ŠȘ Ș*;ömŚàQÇèŚ5` Ï|đ$Ć%ĆDŰ#۰}=sWüŠË)*.Äb±z8UPçv9Oo«bèÓœ«7ŻÒÔàȚCóNÉìȚ±)ÉÍYżmWœHŚg3òÎĄ\=r"G]§ŸŒmù·ŻęàóhÎ;ÀÈŁy닦Mż«Ăi‡űyńO,Yż˜ŒŹtŠŠ ÙsÈ-–$‰…k~çśUóY·u §ƒ'O“—ăăŒW‹œÔàëb„Ą2êä,<ăÌ«șŠïŹ„„ĂwáaáôéȚŚŠŒÌÙșa`èÙòÓ§dd§sA·>ŽmŃ·ÛÍ'OOáÓg>Św\y—~.㰇Gń°aÛ:Z§ŽÁíqóɌ™úü4ûû“\;úzÒO”M\cxÿêÍ«hÛŒ­ț:'/‡Ęwùìosjtd4ÿ˜x/kżȚÈâÉ+űïŽ7Ù±o;…Ć…ŹȚüĂûŽű}Žj֚•—ëŻ;ÀŃô#œŃČ=mRڐ_”ÏŠĘéû—ÿčŒö-Ûÿ’+€ê)O€žk=Ÿ"ČșąóVÎePï!ŰĂŒ=”6t}âä Čsł™tőĘ,\ł§ËÉʍËr*òșlĂR"ìŒ2ùE^úôyŸțő+ą"ą|†čFö­?5p Đ‡È¶ìÙÌKŸ>ϘŒàŠ/Ćj±ê 7@‡Ögêb*2<’ ÏÄê-„ő`ÀčéMąhÒ†źíÏf͖Մ‡…3àÜ čäîŒ1őUŽgóùŒłÏôńÖÁÛÁèć0†5›œù’$±tęb}çß ÿû ś Š H;qÜđGUYßGÚwÿˆÌȚCYŽv‹NE{†ôÊâu‹X¶~ Ę;ö >&€‚ą|šÄ'Ó<č-›”ąuJȚ}ôÚĆžèž2ÏKœ%ää2öž‘ŽkyŻ?ôßœț#öœźÒ5bŁ}óLâbâ|&Ćùï.Ęż|êjîżáŸ,ÿs]'täĂSCx»ìÄíqÓ”ĂÙŸï)=W|tŒéä%đF_ÓłÒyű–ÿđę?qN§s)qzËŒ5u ·<~#}{ôăęÇ?æęÇ>đùLUÁă,MČ„ț9ŹĄ\U=r‹Í0†ZĆ«ç,UÆ3rÁPŠÎšÂ°SÓú‡\0Œ©łŠĐżç@lVoÊ͗ȚJAQ>ÿ|ę~¶ìÙÌńÌcüŒű'Ön]ٟçpÚ!^ÿü;ÀȚ~˜Èˆ(Æ\8«ĆJ«”ÖÌZ2“ŽÇycê«lß·­LÙȚùúm6îü“_–ÍæË9SčőòżëûìavžxïQvÜƗsŠòÛÊ_číÔțżŸĘwé3ű"Â#ižÜ‚ùüFżsműÿ~ƝüŒű'>ûé6ïȚÄŻȚËĘúpnçóhÛąĂûŽà?o?̟;60í—/™>ww\5©ò?€nżÙÇU]žą1`ü<ŐŽ6ÖŹ%3}‡! eáÚ,]ż˜!œ‡2đŒ‹Xłyü”‚”&ÍőšcAQMâ›űt6Ż=ôÚuÖÏ„uLPÚy8J8œÆÜ=‚€ű&Œxÿ+Ìxs&ń± zĂíÿ^íuyû§öÿòȚ<żă)țܱsźìÊkŸż œšzì}»ś+ó^žè8JNu6©‡öpíżźąWŚȚŒśè‡|úÌç>ćhÛŒ]°Ż7dToΏž‘6>9~ŠÛ7"ˆüą|Öm]ŁGu.-ą °Äo·dębš'· >&ž_–ÍŠ{ÇsžqìÍtïۃœGö–™ŒzÓúÄ EQXńç2Ÿ(ÿ’u„çÎÌÎ`ûȚmú~«Ćʕ_ÍwŻÿÈ'OOŃs f/)QXș~‰áùbŸëhI?̟;6đä]ÏĐ·G?âbâYeH^ÿnȚt.v†^N§v}ú4€„žD}BSeđÚxK5ćsÖfZšAVWcsćWț<íÚHLTL™ü…Ń/ańڅz8Žo~\xț &ŽșN?ŠI|VL]Ăÿ{”+š€,ɜө§>$бuGžżś%R§2òźaŽNiÍŻïÏŚĆËÛÿ~Ś?…É3?eDÿQŒțosÂošéÿĘü/xć2s2čęò;žuBéĐ[‹ä–\:ä2nxd".·‹Śz‹‹Î À‘ŽĂ\ÿŸk8qò}{ôăÓ§§_ÆC8Łe{ÏbôÀKx瑶yśë·œ9*ç àă'?ӍgÚËßòÈÛsíżŻ">:ž'ïz–kG__ùÁ·ßŹ ‹”ț űÚÆb“p—xżY\n VÍçżÿùŸŸ­Oś~dd„óÉqăۛ‰ €k‡łyyò‹zô  ÇY琕›ĆMăn xț„ësŐoąìČőKˆ‰ŒĄUJk~_5É-ô(íÖÔ-e–èűkçFr ruŻ|ÉúĆzîűv6EŽ"Ön]ĂŁśæ_ÉČÌűÁ?xKÖ-â–'näá[țÜełMóț–Ź[Źč/Yż˜.í»0ăśïžäąqú°Ą–l\xüŐ5A !ăß©ș UÂ₷óVÎćÂóù,_›@łÎaćÆćüđÖπŚ~gÚ[žń!— œđF۞»ç%ŸëH’ÄÿŠżCډă<~Ż抟ßęZ5kMëæműżŚ O~Lțéš&•Šƒ ë3œë™È9ÏćhúŸ %àìĘśòĘ$Ä$pf›Žz]·aÒvCPf4He‹ô5S'T<%•Ë…Z¶~‰énçóűęă%úë0[ż}° ÌqíZžÁ—/~czîLŒWțÖĂï”Ù? ç@Œ=0hù†^0œa}.žÿș17pʘÊlțȚ—|’ÍÁëùüčc/?đšÏv㐣ÆÄQŚùˆE#ń1ń|đÄ'AË]ŠÓ ù>V°„˜@ژ162źÊ;~:Ë6,Ą[ÇîzȚx#šęz`њLyö †öÎ3<É­/– śî}™‹ïÌ”ÿŸŠńƒ'P\RÌÜćżđÙłSő„Û•­àÿȚx6)mx㋦űÏma”XéwÎöÜÍ«S^".&ž/fM)“ŻÔ<č—Ę?–[&ÜÆ fpăۛőęQQŒżo W^|5Ÿęű1œÎîͰ>łëÀN^›ò2#ú"ÌÆç?OæòaȚNj֒™Ü~ùeŸ‡/fM!Ż —“ù'ùxÆz]rÁ0țû՛|òĂGœÈÉdȚs«ț„À™çç0ۄĂ` “dôE‹—?Û:PDæń;žâpÚ!}Űśæń#6*–ț=KÛȚ șőaÍŚ2yæ§ÌY6‹Š‰Í|ìć_·>â͛Îî»x瑶čbűUŽhڒß?YÂ7s§ƔçŸdȚsiŚâ ęęžwڌŒ–ŸțÀĘúđÀé#7Ž»™3Z¶gњ\6ì žń!À;œĘ„}W~_5»ÍÎ?źč‡‘F“ž•FêĄ= 8·ô3ÄÇ$đĝOsăۛùxƇ2ó_èÎÚ6oËęŚ?š?çĘßűê—/X»e5OÜù4ù…ùúđßEçfò3S™čèGZ6kć~ęđQрwžûÛŚ~`ßË*Œ–š»œ†őÎlUœVŚ4H+‘Ż„ ©PtL%挊ÿś Ș±#Ë2}_v˜°>Ą*PtŽŽr…—ăuž.„EIćxżgꊻšjłńf-öŸÓűż›ÿĆÈțŁôĄ‹«GLÄăń0Źo©ˆïÚál6|ë]—æ·ż’ŸÄ”ŁŻ'úTăzÿő2jÀf-™ÉæĘ›xáȚ—čaìM€W|/žŒ‚iż|Ivn6=ù«7Żò™,ŃłóčÜęƒ|7o:Ïè‡O|BTD”Ÿü ô?gsWüÂđŸ#xàÆ‡$‰–M[ŃëìȚ,^»I’žqÜ͌0†‚ąÖl^ĆôWgè爰GđűOqóűż1y槜8™É7Ż~Ż;+}șść«—§óÓÂh–”ÂôWœË.ğJ 7èRŸ\“ȘP|Ìà0„5|Œ:d°Ç”:ɅGUâ:o bŁcsáŰ2Û/1Ź‘ĐíÌît;ł{™ăÚ4oËӓž3=śżțæ]Và?·=fșÿ‚n}ôÜX€ŽmÏ*s̈țŁŃTÀò_;úú2‘ü„Űîčöț2Çțut?ÿí?X ą ± <öś'Ê8Ïàę|Úì< è,:I’Ê”WYo_r~Ś^œß”â+›ÛwIòțÎ ™) ,a^ćȘ­“·G!ș­„ÚVgźkš$$óę?Ì?ëÖ±ÿ{Źr+ÁÖgòśyىB@y±ÇHHh“` «ÄuȘüwnàÒ!—•Ù>ŹÏĆ>Ï3Ûtôi85Rš4ŰűjŽqŰÍHÏNçÒłÓčúkłÎìąóëĂŃfLz9†^îł-:2š»źŸ»Ì±[ölæŸëôÉû‹°GèŸ+P§éÿ]?Żÿ0xeQ=PdžAtxʰwˆžRćÊS)<Źú܀ٟw©Ÿ™ÀőŸ=úŃ·GżòŹg(.o_­-5űIB R@D%Jœ<„fʅ·§jJ}"ÂÁűÁîoß$èĐ^CÄSč;J+—Ő.Ù8~ÏȘ"[ŒMIŸÁahg©ôŻ”č1ÒœcșwìQŚĆ0%w§â“@!{Œ„ĆVșŹCÎV…ˆæ–7©äÿnț7ž S+ß{ôCŸHRcæävĆÇAŽJjűöȚÀ̱”ˆ‰ÂìÒ(Tî.…ˆfâő •ìżŸÙ6qŐt»’ÆBt“R„žŒQÒč$äzŠ»'ȚÇĘï žß,—°Ąâ.„ŒÔÒèSX”ÔàóAȘI‚Űæ29‡ŒN•Ç9›’ÎoX6Ż-ˆjY ŁàÈPÉßožŁBŒ„=șáÛ{ő[Ł”ôKȘé;-Çn<«z c•‚»šfŻ)š~r¶*rA"â$Â*pû†ŠbŽKUȘa#­&Âą$Ÿ!ž‚ȘO> á zàÄ:ĆÇc›Ś^gR©û™JŸ¶Vk*‡Çú¶‡TNîhőUPŠ3W%są/«‰ăšÀh—Ș€šȚ$Ÿ:©öO!E–†+]%5kì¶H‰š&†5ĄŸÂƒ+Ot, Uœ- y{ ‰Ž¶š«\nƒ]:€ÓJV^…“$ ŐVjëOÍÛ\lŠŒ±8'6(”d [oPš^ńT’Sú»E&JŰÂkF@íÒ-9u{ö·ï`7Š—$ 5Âw1&w ·íq-eŸ<™Ü*č;…Í7JČU2țđ]ˆi&c­ÙՊ[E1Ű»Ób~“ûêSŐÖS酊*íTÜU\ä2bSdŸÜw!_ąPpHTČúŒ»җ+>ĂČÛŐ|žƒË°e±\țBbD•QšÀâvÔ|‡b ƒŰ„UV‹ș‘őĆ™k|/kžDlJÍ9 F»tXB›r.I’Ÿf–~ŻpÈ1VR;6g ƒ„¶ČÏĄ“;o§\Ć»Pj–ŒT•ôćŠÏZgQIŸAêÄíô”I‡Ő\@©Ș˜Ș–źÊxqŁ€*)Ź%/„•ŒâQ()đ~ȘČ6(었ë,ŃŹá”6<%ŸȘżOőńJ$ÚÈX«xoĂòp—š>ś_*’óBŠ>œqíżîò9om™ Ąždò3ŒuKqAæj…Ű3%â»ÊH§G>jƒŁ$[ćÄz„Ì"‚‰~â ș1Ú„Ă’_nŽŐ?*„ę—$ %ąčĐ{Ï6g-”ía‘ń­eNRô!šât•Łó=Ätˆ=S Ö#ŠŽ«äîP}Ö{ojFMŽ.űÛ€ÓVˆ\Ń…ʈš* (łBÈ-Jđ€ză łÜ(nč†W“–$oC”ŸĄPYúŁyÇ*ań‘-$›‚=^ò6ûKY IDATȚŒSPkxJŒI„Ž •ÂŁȘÏœîŹvHhc©qń—fŒ[«ÊI«ï=Í*•,ËŸÂéT+źF–șÀ%ȚÆœ6î|ĘTBQ$ O”Úz^ȘJáaqdąÏ͒ gźÊÉíȘϱà&&¶”ÔèșOȘê”Kâ (łÎĝPHŰ)•—æŠéY”PaO#‘Ô^&ç°ąßÿTqy‡ôòśzˆj%ȚL"ˆżx2Ț D’$<ÍóàÔ}•=.•ą,7QMj§őŽM‘±Ešä-MFö”@öf…“; ą™DDŠ„=QÂŽˆLŐžï­GŠÓUŠÓŒm?öhoD„ŠgŻfčńžJݟm?Záè“ȘȘz=p”Ê"ìHŽ<Î"…°ÈÚS궉&,äUpò\äï/ć%‡yÛw«°ûCUA)ńȚ›ÓSx˜Ćń­ä€atŽÓ#öTÈIšCx’$aIrC‚rŒYb'žjG@Â#Ńô, EÙ*™J™»›«Š7ÿÆ]$òFê’đX‰èŠ5—ĂŐi‘©޶VFPUž”7óԍ”$ ©c>êÚ$ęƒf{ˆJŹ=W@’!Ș‰Ddą…â\•’<•’B”ƗUÇ.ańź0^›ÂI#cw‰žCĄąr8l«h2v$fύŃ(UU‘ew«lÂRœ7âò ;@‚êE–œÉËÈVÉ»ÎM51Î"…Źę„އí!'ü(árž.”ŒąÉ?ÚȘmڰX,șˆr5)€žE:ÇŒNCö'Q‰–ZMÓ„% "ÂŽ/]Žï§Ž<Ƕ–ź“P`Éá`ÌFÂä°rÛśPET0!U愍@á_©{ê–D€|Ż7ž”ÏIxŽ…„6u_ѧȘ ‡ÖûLqĘj[B‰”Û©ݱ#ńï\ü”,ËșxÒ:–’óökšȘâœ^û‘È–șmÄe«·3ś­qąciÌ(•Cë‹őt•­1 ±X,>QU3ćï0èç4D dY&żû^Âӛ yŒa”ٛР‹’‰ˆۂÚĂ]ąrp]±ÏČ4[b Y%ĘȚÙ}y"*ÔaŒ »ÉÁÆ }„”MÂyń>TkihíۖbÏH šI<.•ƒkŠ(Ì*MŠ="ïdł}‘^Ą=Œû=Ś^«‰g”.‡àÈópdcq­ÜîB ĐPU8ȱŰg8coű: ìYșœZ­VŹV«Ïkí ÇAÛŠ+ĆčÈ:w‹~ ĆVQé6+–@Pí8‹öŻ.ÄU\êïŠüƒôš=AÛuc»m61*6#ŻÒă fŠ­LšŹ‰“â Sőû(©*ßæàèæâ2łă‚ê€$_aïŠB łîr„ –ÚżF¶”őP=ŽNĂLpiĂ|V«•ą^ûp&æêŚÊKss`u§PQ‚šÇăT9°șÈgæ]†ő›cŚE“Q,E”ż@òÏÔöë@I«LČ;ì*œŸKćàÚ"á jœü 7{WR’_*žŽÛö°=nqçÀßÎÍF̄TšQšT°é~țÉYƊ§¶ÍŁ śTĂmrčŰœ8ŸœCNá„ Șw‰Ê±ÍR—ű ÛćJ™Ì·†bsùt(ąOƇOć “Éžwd±~ÍÂ,oE/ÎȚ‚ æ(Îő°wEĄO€”@ÎaUÜwÈ6©\;7 'łÇXŒïÉ댗œVûôkjrêČBT;Ž<Öqp­ŻcšnĘÏڄ±XœviłÙ‚¶éÁąP5: Jgâ…Ò Z|f&Yö|ÖtÇâôźćvšĘì 3ŐIls+±)6"Äș â(n•ü 7yinòÓ]eą›Gć],±OĂcubł–V.›ÍŠW6ăsí”YGąU.-GDUUEÁj”â‰*!{ÀFVžƒ­È;[ÁY€°wy!q-l4ëlŻłärAăĂY€Ÿł„ÜcŸëSäËY,ÿĆî"ÌVÆÎƒu,țIäȘȘêÏȚj”’uöVŠ"Či‘z’ê}ÖŃEÄYŒm{3öaś‚Šăvšä„čÈKsûŒ&hì±ŻeSÜ<Ź6 6kX…ìŒ:"Q’âŽcEREx<Ün7n·—Ë…ÓéÄétâp8())ÁápP\\Lqq1îl‰„ ʈ8™dz Ù"a —°Ú%,¶Ú]GBаPoŽÉ]ąà.QM#™ ¶Z—ČŃ>ßk[§*RX˜·ąÙívęNDDáááúĂn·ëÇÚl„kŠșím^łwgŸ‡ÄuʉÌjêSI‚ˆ ±ÍlD'[°EÊXjqÍ(AĂÆăVq)dzÈKwQœă)cśi¶TVĆ̀06›°°0ôЎ5v0àmś=ÇŽmŚ–ŽZíč€đ’XÓČ[ŹZÛ.Śér&‚úâńȚÛíTȚcÔ)óWä<FmÒÛg3[ŚÚtł¶]kߍ‚Ë,Ń<˜ˆȘÔ,Œ`‘'c(Űívûxôž8Çû­Âv$‘äÔł /ŽóûâTœ…*Îòoą,AeŸć/6ÚçQh9‰Őà9+›ńčö:˜śbPÆć ŒŽ…ÇăÁé!ŁÏąwŽ#ń`GdĆzêX(ÊöP”íȚ’ʰÚkïV6‚†‡ŚY({W#nÉĆÎđìŠ]ĆjÁv*ò€Ù¶ŃȚłŒ(ŁkŁ V«EQ°Ùl(Š‚Ûíö¶ëŽä“숞CüŃ3huŒ'6w„Où ąxp±+|;ŁVąÚ܄Y˶ălȚ,=ŁȘĂx^H(wÏêőx%ÖB lY(·łàŸà]žŁ =ü'LűÛčĆbÁăńŽjíș± ś·{ÿÍ]¶4rOćÊj}‚Y_à_g„­Ÿ>˜ÍìŚžËȌ]ȗ™Ì֍ö^™aŒ@eó§Rłđü?šÙžą(zHü˜œŻ"*P'cDTÂȘcœyf·ŚîPk ă ĆƒE ŒȚy °Ż–T«%kžčfSZÇ„vЉ*;7–Ćeqá¶çăpçTÈ΍Ś4~u*VIF–Ă}„Šq ‚`CxZç(ÊXoÌÄ{ymŻVNÿ”Ô4;Śl]æJÁÛó`#\lĘż]&žÌźjT”Ę /PÊßKńbi•Mk\.—ie+/%*[ÍaôF#""Ê9șv4^]^e«l…ó'śoèęíÚűÜ,?PłńȘ: ÂîÁœ;7[wÏżS1Î85łsŚțëRyöćośfćqč\>9°fš@"*Đ” ›ŠÚzyJłőPÉË[ Ș"T8‰ÜèU?€ŃÒÖ äEêT\.WHȚŠP”‹6#§Ÿš@Cxću,Z4É? ,™\{Ż&ô ”ĄTŒ@•Ț( ŒN‚ˆ@ 4E ümÜaŚ@ŃVÿ§ț6źÙčŃQĐźmŒ¶ ” kOZ.ŹYʰuT-efëF{7›qL<™ő/šRčńĂúG ‚U í}fC,ŐᙋŠWœÔ‡”™!›‰xłÊf́*Żs1«lÆóhűç@Ëa|í_é͆4Șcš:”ę‚úGy t Hk G!XÇâoïțŃ'cœŃźć/ŐCŁmŽqM<Ûsÿłaoa덏ŠŰz0g!T[śoÏÍFÌr B)«F•V"śÿàZĆÓ"Pfï5ë䌞Jut,ąrU/Úïj”Z‰ŒŒŹ“2TT@‡†ÍąPÆ §…ę·êX4ûÒfâ™UŸ@QÖòœᕠ4E  (ł(”qˆ#”)ĘÆxPŸœłuŁ€2kӃ šPź-hÿ„ZcçĄaÚđx<;—ŠŰžˆČ  ŹÓL@•ڱ˜Ùșq›äÉŹCфœ0ëàŒŚĆQđŸ…güoŒŸ qÌÖCBù )ÿçțêŠ>A"Pšˆòż˜*˜wî_ÙüjË«lÂS©ê2ˆòBŸćyç:ÿŠfæykh6š‰(cyŽëșĘnę<Ç§c1‹°–7+IŰùéC(žy0g!­óÄÍ"P€žăê_>c9<­û; fß‰è“ T[/OD{űç;ČùŠD€Ș<„ç2慘köehKë\Bș+/ò$*_őaŒ@ŐŚ$ríš.XćóïX ô;đBižčńúƈ”fßÁąN:íÆÿF„7>‚ÙčöŒ""ÊÌæęí;Đđv=ł\<ÿȘ”çfvÊąÈÂÖO*ÚŠ› [łwŁû; ìœąTy(M<ŁQD”YÈčŒÊV™Ž%ŰvAĆ1F êB@2đPŁPf‹ÇŹS1O‹Ć4ÏOVZ=0Úz ÎÄ,údüïÿ\Đž1óʔ灜…@¶ÈŸę‡ujF»4»ŸfçÚu‚ §PÛsa링"PÚÿòDTy6^žxȘLô j „=7Šš@›¶_[”Üż’‰DĂú& êJ@™J…óï*òĆK1:ڱڌ"Łkm$Xg"rŸț6jÇÈȚę·›Ő“ò:͆ͼolσ‰Š@©ÂÖO_‚Ùz0çž/Ż#)ŻCń·gł}fΔߖ‹š“ÀHelœŒŚfï t­ŠRí B«pD“Ùs Ń©Ô Æ”qaÔú‚™Ÿ‡ÒÉű?7;O ër‚ÙșÙÿ`Ïmè:ĐÿPœ‚`Ś ÔŠś‡jëą-”Gel=”šȘÙëÊRcœayÎÿ8ăńéPDĆ«=$É»*w}!]™u Ąțö°ˆ6Ő?ÚïQ^ykúó˜u&Ą^[ŰżÀŸŠÚCmÚOU"KÂÖțT&…ą¶©ó)UUé`”‹$…Ÿ"w}„źËÈQőX őÉ^•EŰș ȘÔ'[©sćO°/G„xĄPŸ*X(4Žò •EŰș 1QïT0Dć«{Äo 4ʌ`AƒăwȚaäȑtêԉ‹/Ÿ˜ęûśđ /đÍ7ßpÇwĐŁGźŸújÒÒÒôś}űᇠ8Î;3jÔ(–-[Šï›4i7nàĐĄCŒ5Šć˗••Ćűńăńx;wŠe˖ŹX±€aƱpáB.\ÈĂ?ìóz۰aú5œN'ïŸû.çŸ>wȚy'M›6eŐȘUzùąąąHHH U«VL˜0ĄVŸ@ 4|„€ÔăǏ籋.ą{śîôîʛɓ'ëŃ€țęûëÏ[”jĆgœÁxóÍ7éÚ”+śȚ{/SŠLÁáp••À!CX»v-,]ș”»îș‹œœ222ÊšłÎ:‹ŠM›êŻÛ”k§_ăĆ_dőêŐ$''sĘuڱnĘșü6@ИhPI䂆Exx8ożę6ŻŒò żÿț;śĘw\{í”ìȚœ[?¶  €#Gސ””D^^/œô댯§mÛ¶€Wűh$''Ó©S'>űàZŽhAbb"C‡eêÔ©=z”Ÿ}ûêÇKzïÙł' ,àűńăL:•‹/Ÿ˜ăǏQÍ߄@ "%š1öìكĂáÀn·3vìX:uêDvv¶ŸÿśßgçΝ(ŠÂûïżOÓŠM9śÜs)))Ąžž˜°°0TU櫯ŸâàÁƒ>ç6l/żüČm:t(/żü2$,,,€òmȚŒ€æÍ›sÓM7Ą( Őôé@И(A1kÖ,^zé%Ú”kG~~>;väöÛoŚś_qĆŒ5 EQÈÏÏgƌŰív’““čïŸûèŃŁ111té҅QŁFùœ{۰aŒőÖ[ș€6lÙÙÙ>Ăwćqë­·’žžNJJ ùùù<ÿüó$''WχAŁFRĆꔂrèÜč3»víâškźaúôézŻĂáàđáĂŽnƚđđp}ûUW]Ć Aƒžûî»9xđ -[¶Ôgèiàp8hÒ€I”|3ČČČÈÍÍ„}ûö5v @ 4>DJPŁ„‡‡Ó±cǀû%IòÉo2Mttt •ÌKRRIII5z @ 4>„€Ô —\r :tšëb@P)„€űàv»±ZC7‹ŠŻqË-·Tű=@ ÔÄ,<ïœś'Ož éŰÔÔTŸùæ›.‘@ ő! >$''3räHrssƒ—ššÊ!CèÙłg-•L ‚úƒPFŽÉșuë2dH@•ššÊ€p»ĘtïȚœ–K(AĘ#”À‡&MšĐœ{w6nÜh*ą4ń”‘‘Á۱c빔@ Ô-B@ ÊpÙe—ałÙ۶mC† AQÀ».ӀÈÎÎF–e.čä’:.©@ uƒXHSP†5kÖĐŻ_?TU%,, Y–ő[Č(Š‚ËćÂb±““CLLL]W ‚ZGD eèĘ»·.ŒœN'%%%ž\.\.}úôâI §-B@ Ê Ë2ŁGÆb± )”ĄŒđđp&L˜Pg恠źJ`Ê۱cućĂá`ôèŃ”\"@ ê"ȘiH_uff&)))ŠenÚŽ)iiiuPȘ†‰$Iu]@ T3"UTU­ĐŁ!‘œœL·nĘÊl·ÙlŒ7źJÔp©š44[‚Óq/Œ „Skl߄ Űłg‡CߊȘ*cƌitŸ”źńRùż"Š%ő 1„„@_ME·7TÖŹYĂÀ}>—Ćbáĉb^5L™íbJ ê2Á_•ś:жÊSŸ8ÿü󉎎&??_ßÖ»woąąąôy‚ò)Ođhváœ$I>6Łí7Û&‚ÚE(Á„’öÜl[ ŚĄ\ŁŸ3räHf̘xŁOăÆ⩂„"rŒbÉ(”œŚ_L !%”‹PBĄțvŽ†ÎšQŁűá‡PUÇÈ#„€Ș&ŒąÇìč&ȘBâ+ï8@ T/§}T°(“qF”ÿsÿmÎê”ë+'Nœ }ûö€w͌ŒŒ:.QĂ Ôš“ÿsłÿž›ęőځ@ š§m*ádö:Đö@ç vʆ@||<]ștaǎ\qĆžĘîș.RƒąŒ!8ăsĄd&žŒÛŒï7F D4J jžÓR@OUyÏav@ŚoŒ=š;v0lŰ0ę^x‚Đ(O@‹4Č,›ntn!ą f9í†đüŽ™€RĆô”q»ÿ1YDm۰+ŻŒ’-[¶]ŚĆi„’·L0™‰'و $š‚ í  ú8­"PfâÉìaLÚCUUÜJ1™,!WڌCNĂAN) E;iéùC/Tő}ÀBíœFE±=yb]„țT°HŰÔ8”ŠŰ•fDz:èL AE“ÿsY–QUŐg»oJ#P"%5Ăi*O<™‰&EQđ(nŽ1“còϜ°ž8íÄ IDAT,ÆCQ~Šș#}/4ëPŚ„h|HXˆuö"©d$)%Wa!ȌhČX,>âÉìá/ŒÀ<é\ ŐĂi' ‰§2ÂÉă!ùì°Ž¶śĆ.ĆPŰv*Ž’‚2"Ê…òP"P „”@ T…F+ ÌîOçŸÿ”§î"ËșđΞ‹”“êČÈAdŹŽ=…R#2)Œ_ŠĂáЅ“1 e&ą‰'@ TF' ü;‰`Iäé–čúqmì}k€żțzœÌvTùŒógîæțëfùlË8VÀÂ9©U>w vlÊ`ÓÚăU>O~n czNæDza5”Ș~ !“d=”éfJ\…șˆò>•—eæ` â4Úu üs=üÈK”ò­›HČuŹ‘2(ŠÊS·2lܙ|7y3»żW\GcIê]ŐržœŹböïÎöÙ6`x; oW-ç7ăžÇûWËyÜn…›2p»”j9_}!Év&iźÍ`+Æ» 9ïÜ ·wńxyc-éÇ žëòéŚêœŚäżÜ0|:»·f°ęŻtțûÌJöl?Á˜ž“Ós2SsX·ü0·›ĄŸ»šÀÉSśÌg`»ŰîŸ4Â|§ŸÿŠ‘ßòۏ»žcÂôkő?Ÿ4CûN,û”ÿźçí§Wàq+Œé9™eóösĂđéôoó>/ęk1Y„7àęęç=ÜzÉśœ›ô6Û} żśÎË~ÔŻ?ŠçdŠâü=ÿυ íô1=âßbTÏ˜óíę\iGóÓs2«—âȘ_1šĂ‡ŒóìJŸÏ“wÒÁSśÌgpǏ8'ámźűéÇ p–xxő‘% íô1œSȚćŸkö)ku-7՟»íÇÊ ß™ áó Ć+(ꣳ@ šV@•7ŒWLépQ˜]#eűnòfÆ^Ӆ„€F]щï'oöÙżss&Ïÿs!ŚÜ~_/ŒGćŽË~Đśۓ͋ÿ·ˆsû¶à‡?n€sdn1‚ŒÓëíۜ‰ŁÈ›k”nùan?ƒĂÚ1wÓm|»ô::vm€âQžìÆnüșéVf­ż…öč늟đxTÎ:;™[èE»Ž‰LęíŠțv ­ÚƑŸçdïŽRqöű?æłvù^›2†ŚŠŒaĂGyäŽÒœČ=ÛNđÒËčäê.L[x-iGóyśč•ż«ôc;äÍßRUïȚk.ćÖz1yΕŹ[~˜in žÈĆ#wÌćú»Îe楻ù~ùőôŰ €—? À›_ŽeêoŚ0țșłèÔ=™/ç_Ăò꓾ăÿúđàłIʑ€ËéaÇŠ țûÌ țù܅Œ=mЛÖgÄóÌ»#p9=ÌûiwčŚÿ䍔ô܆žHJ«ZŸÏàŃíhȚ:–‘—ElœÜ_ڑC{s8z0«M&&ΎÍ&“œErJ«Ż™șűyÚ6î{ą?ꆮ„ߐ¶<űÌ@æ|»ƒœŹbęžQWtâÒëșÒŸS"7ßs>Ëæí§"\sû9 {&{4ćÊ[z°ô·}€7Ï)?·„ž„p"Łl4o«/&4‰ ISoÙ#Łl\ő·ŽlGΉbÎ8+‘Ž]›đÇÂ>Ś»ęŸĐoH[Îíۂ1WuÖŻ·őÏ4V->Èo cȘDÇÚ4Șęÿ·wçńQŐśțÇ_łe& ! I$! û–°CŐZ©­ŰȘ”.­•*­”­K”·öÖȚVíŻV­kőj-z]PDTّ}ß·$„,Bö=™őüțf2393 $0ù<ó˜ćÌ9sfȃóžÏś{Ÿ_â©(mäĂ≿ÎaÒÌ€€EńÄÿ›Í¶uù”œ­ŁłhĐč;’+ŠȘv…'”Nä.2œBtLPśò<1űöČj[Nnú.˜,xĆ»ÇèŐ;Eę;Š1…p8ŸZžÍüÛZF:Ÿ<3Ù}đ°XącC9[PĂĐŃńÖh9Nƒ–±S9“_ÓæûäVqëOF«źkjŽòó[Wpt_ IDF›Đh5”•40`PT›û>sș‡Ca’DZM“@Q^5Ń}œ!&szËg0(ŠÒső46XĘĄŠ-źȘ’kûüÜ*âûőâĄÿžÆ}7}Ddމwä?KŸű0żûzțś›ù䝣˜BőôKŽ ČŹ‘ČïŽæ§{żß†•§(Èu~ŠŃ™­›zós«Pžÿæ[­+Ê«&!1ąŐó—Ê 1aUQtÍ^ĄÉ38”ś <é%„ŽÊE­ùÎùžk;űïCèőZčçsśsŠP=Kß<è <ĂP]™ÚȘf""Șë]çȚ˜ȚæûśŽ6‘ŸS„șnùÛGišł°ăìÏ(+i`Rÿ—Û]‰èmrKLœ3ŽźAQ òÂ:¶c'i­Îÿö‹ž˜ÂœżšÈ¶őŒóÊ>ÖŻ<Ćòw©ŸöL~ oŸž›Mčś»CÖüńo”úŒZ?ÇmąŠȘ™ÊČÆV!-*ƄV«aĆź»é? śĆ|ŒKŠ(ŽVÊsWj«ùÎu_”B\Œ iÂS;1ű;žBTW9yžŒĂ{JXșù‡Ź;±ĐœŒłöv¶­+pśőXûY.v›3Ì­û,S˜acúșŚo^sšÆzggæì#eäVyUJü™qí@ÖŹÈńÖÀáp~æìŁe€€”TšVŒ{ÏŻcđ°XŠŒ'Ő·)éŃ^}„>}ï‰)‘$„F¶ylŐXoÁáP0šôÌŸ!ŸÌ"śxV‹š˜P✎ÿԉ ""D]šŒćŻhŐĄ?‘ˆˆ4òń’Ă^Ï; ©ƒcHĆ[/ïőúëjÔû©uEQT+OŸ}Ÿ5ßIłBtLĐV ÔN^'GŚ@–Ÿyˆ YI­šĂ† eèèx–ęç0>é]:,ÜÀ܌ŚHËèĂŠUyüqńu^šŒQńÌò§'±ú“îúÙ8FŒKhó>:‰]›‹˜ÔÿeæÎwÓ`4êxáù|ïGŁžuæÿQ]ÙLEiœzéŐ»ć=ÇLêO|ż^ÌÍx€ÔHžțŚő^ûÖhàÏŻ^Çę7/gëÚ|4 §s*yuÙÍ­úKu…í ùïŚ0uN :œ–-kNóÓG'aŃpË=#y`Ár†Œˆć{?Ć·Ÿ?ŁIÏÍS–˜ɑœ%LÈj;„șDF›űË7đë»>çƒ7œÿ¶‡öœăù%7’1*žç—ÜÈ –łréqŠÍK„ŒŽ‘ęÛÏČŻüĄ.ùüŠąš†&”E­O BˆŽÓ(Aò?ȘëcűțúvęJ·Z­X,ś„EÆ7(îóYżDŻ1ÚęE9Œ·„Èh“jąüœ*š›ŹdŒŠ'#ô9ȚÛđôz-'—2r|ŁZ.WżyÊÜ=’Źč©ìĘv†äQdÎhéWTtș‹ÙNZ†s š=[Î0tt<á!ŸŰł„ˆS'*ˆêJÖÜTw8«Ż5ł~ć)â™8-™»ŠÉ瀊 k)Ì«fÔÄ~XÌvòs*3©„Péčzvn*œę‡<ûûìÛ~–AŚô!*Æùœ67Ù8°ł˜ÌÉȘMe…yŐŰŹ]ƒąÀÎM…ŒÎìGh˜łżTMU3čÇ+?5‡CáÄĄRN.C§Ś2ev q Ț4ÔY8~°”~É$ŠDb·+l]›Os“•Ìš(m Äš#y`æfûw3qz2ș ͆e% ”œ­cäű–°zŸžžœ[ÏPWkfűŰŸ^A¶ŸÖÌźÍg(9SGBR§%yáΰ»ț5•ÔFőšÛ óZÂĂĂ #44”ĐĐPL&FŁŁŃˆÁ`@ŻŚŁŚëŃj”èt:ŽZ-Æœ!„hż Pź_ç6›M5@‹ęĐùȘœ\jìdőqš\êŽûÇ^æ#ʑ+@ŐJŐW·©†'Śą  ƒŚ`›Æ+D !„hż éćÉ_óWGÚn#"è4y…G„ž›„„pS™–(ĐwžMx-»žòÿBq5ë} |ŸW…îpúŰ]ò`ÀőoŻŸí2‰žš(Đf` ž„Bt\PV \ü]yÔ]*PB\„ćïÙłÉșœáI”Bt\P(h}摜<ÄŐO= ëÉsœBˆŽ ú„Š»4ᔇŐbçĆ?lÁnś>âȒŻ1ž:Ăâ§·sìÀù¶_xU–5RUîœ.Š©ŃʗËNò燦{Ms)ìv…ÿ°›”kXílț淓BŃ”zL€șZO Kß<ÄéìJśćő.?ęî2î*îÔśúè­C~G/ï.șăS¶o(à‘{VòᛇćșáRétNš`™Ï`™Ę‘‚ÿj“ż0%„ąső˜W߉ÄfuđÊ3ÛčśWœž/+i śx…{ț螱źÆÌŸíĆÌŒ~v»ÂŠUyüŚßæpçąqíšĂŻ-śțj"ÿ|vG«j_w'MsBqùőšu”YęI6ĄaFMìçőüÚOs˜qĘ@ !:îÿ»7;łŽZì|{â[Œú—îŚ>öă/űjy6à dj ó†ŸÎ„Ÿ/qÿÍSr¶ÎkßeÜwÓ2&ô}‰ÛfœKαrśșő+OqKÖیíó"Y)Żđ乯hl°șŚ?ț“/yÿőüòŽOÉìś2ߝŒ„;[ȘdŻęu'Ïÿ~3Ïțf#ÓRÿÉ”Ăÿ—Ï?8î^_]Ù̓‹Ÿbö1.öï,˜ú6ç<ŠdÙđĆ)2§'QQÖÈ·ÆŸIC…,ç†1ob·9hjŽòÔCk™>đŸd„ŒÂ WQ_Û2„JUEțh%S’3+ęUžylłĘœ~Ì€țh”6­Ê»ž(!„=ŽšnìہóîQÆ=­Y‘Ă7n@tŸPÖ}~ pŽț]”WÍgï;C‰čÙÆ§ï#}šsO?șž”ŸæòÔËßà“wÓ;ÊÄą[–{]űÒ·2ç[i,Ûz'ę’"žûú„X-ΐa4éxò…yl-XÄËïßÄțĆüăO[ĘÛæçVńôŁ>.eÛîdÔÄ~ÜyíÔT9ûj•œ­ăőçvÒÜdćœ ·óœäWw~Æá=ÎyéțęśĘ”Ÿoäœő?`óéxô附[FÚp}îÄœy}ĆžûFțłêVtz-xp ÛÖćóìëß䅷çsxÏ9ûńîíqû NgWòêÇ7óä óűêă“üćń^ßmZFŽìmÿ pVŚ6­ÊcȚ·ÓŃé”ÄöuNĘÒ'.Œž„p,f;˖aŃo§’5/•ÌÉ<ü§|čì$e% œÉŻa˚|~óì,Fgöcîütî{dÿśê~ś$Ë©éќ8Ô±é]Ǝ ĆŠk5K ŃÄ%` !Dç ځ4Ûb°Çčï[ő„èÂŒúÊš«1Ó˧sôŠUyŒÜŸȚQΩgŠÌIá‘{VRUȚĶuù<öÌ,N)gû†Ž8ÏÔč©ćUc·9űő]ŸyP‡Ba^”»Òć9Ś^ï(Łâ9“_ÀîÍEüéáő”•4’Ecƒ•Č’zŻă›4łe{NĂÄiIîí&LKòê?yæŽîw^ùśÓG'ń»E_1ĄïËÌŒ~wțlœ»ŸŚŽ… ș&†ű~œTż«ł5Űm&ÏĐČïYĐj5œȘÂÜd#ÄšcìäDśúióR17Û(9SGÿœçèï”ŐæVûżò,çwm«Wÿ€VĄJ!DŚúŐȘòtá±Țë~Îą4\‰CkSúĐ>œòŸ*nőŠźœi°ûqBb‡Ä°zE69Ç*7%‘Źč)l]—ϱ„üđçÜüCNgWČêălîûöGŒő涙8=™ŐŸdsíw†ű=îÈhӅś«ŠogÀ8[P‹ĂĄmąÙdĂb¶SzźȚ– NU{më|źŠ!#bén,J# Î!lőœŒ*Pjû†(™ïN!:WP7áùž0<ì}ĘśćtGƒ‡ĆRxá$`·9ŰűĆ)Ÿá ŠÎIáćÿÙÆž)ęŃŽL“Âú•§8Œçœ»‚“AÆšxȚziW“UCĆ«ÔŠUy˜›ME»Ÿ.€¶ș™±SœU›œc-MŠ6«ƒ•¶4Íčl[W@C€Óٕä+gâô–•}€Ì=TB}­™­ëòĘë]Ÿ‰áÇ'3|\Ç–ą(°öÓÜVŸÛSL\i}űâĂîÏłâĘŁ$$FšÍàa±Äą±r©ł˜ĂĄđùÇ9>Ák„‚Ü*ź§öWT“Ł%HÛj{û Pț•‹)!„èA_rńę%bGoIÀRBč5‡€Ì+|„­ÍŸÎsżûšêÊfąbLìüșˆ€Ô(ú%śözĘÔč)ŒęÊ>îù…ł24dD6«ƒäAȚŻ}î­o±đ;˘šŒ˜Ś ąȘą‰ Ù_țzƒ3KĆŹô1vrV’ÍąßN%%Í9DÀśćá»?gÖ7ÓŰș6ŸńY‰­Æ1ź/ł‡ü‹ÌÉŹY‘Ă­?Íž)-ÍfȒűÁÜś7„?[Öä3xX,ßÿń(dœCRJo’Eq:»’ąŒjnčg$Gö–` Ő3xXàÊП_œŽ…ßù˜ Ńޜ:^Áâż‹!D‡űŸĆŚòë»>gő'9TU4QYȚÈ[_|ßœ}UEy'+™}CÚEțKuœ [.ŠCCă™d í N˜„ąkh” @Æő1<çłÛíŰívl6‹«ŐŠÙlŠč虿æf ŁžĄ&ö#4h˜ń šĐ+ü)Z{üŸ/II‹æÇ'óÔCk‰îÊ/~ŸćőšŠF+w#cT:‰qS?5±ŐkBĂ ^A`ۘŸ­^n`Ö7©źéo*&.Œ!ĂŐ«=©ƒŁIÜre guÉ%%-Ê]”RÛ7œù· mő|L\sç§·z~űžŸ ïőœV«iő™]ûŸńÖÖûvIL‰$1%ČŐóv»ÂgïăÏnń»í•Rk/ŠŃQéŒ2 ­Vëwq…"ß`€Ö±\B“B\ș Pțš7\'—đŠq蛓±™Š(4oٟa:ńJ¶—äQ|yđÇȘĄŁ; ïeđȘù2…ê/iźčëoŸŠ#‡Ő.:†U‡îíòśčyÍpX ÔŽ>@€ò Ní QB!.MĐ(Fƒą(Șę@|C”VŁ'șx!eƒžÄȘ4Q`ȚÎ ÓŹ+wđWč7>ÿ^Àő=3ëòH)·eScwŽ4_șm Js:“Ϋ)N§Ó RÒD'„/hźÂów ·ï}ߓLŻÚj‡PdÙA…-çòŒ*šUœlrŽ€nk0QŸ=łUpò€|+PíčBO!DûM€ D”ú€ŐșO:ŃùĄ±;;RoúŒ†n:ʁè9슙#aSœÓà­œ…Ɔ^ŻśZÚ RmUą$H !Ä„ Úšÿ“çąÓé0YӉ8ù ÁźX8ÜűőöóWú#ˆÊȘ4ršq)ç;%›ÆSbž;4 †VAÊ3Lčțź„/”Bt  P.ț“ï/ö°ši˜ònÀìšă@ă;”[O^áŁ=Mƒœ”} ÿĄÖ~€êă9żqș;8č“ïm{*P Wă !Dg ȘNä^sŒ]èHš „ÓéŒ~ՇŸč»U‡uÈ;۱rŽi9q¶ gȘđÎBtŒUiąĐŒbË^śäÖć{‡QüĆQm5ß©&„âÒ]€òíûäêLźŐjQĆž‡ûDc0Œ*VžE9wűČh±–OÀR<ŠŠ ,»Ę†C_‡ą±a·ÛĘû@ńnJPP/ôY°ÇóL4hP Žæ0PŒ/h0h4èBu^W‡z^u§V…ò QŸÉŐæÇ t|B!.NĐ(ÏđäąEA§ÓĄ( zœȚ«ż”jxòšXét:l6ƒ›Í†ĘntVźG«ê•gsąçíƐ€Őœ\jqWL-ŐßÉ}ÿÎÔ”+DyȚz6ŚùV ÔƁêègB€Êł ćzìł9í*bIDATșu…(W€ò]|śă ôzœ»#ș«_•gӟo€òܧż0$!)xű­@©4Ÿù PŸĂkš…(ß«đÚȘ@yŸ·'!„èž  P.jżžę…(”mŐÆ‹rÔü(ßJV{C”Næh 4À«ïߛgˆò Ê·՞i\$D !DÇm€òí ćșuőńlÊSăï€æ OžÊłúÔÙMxâêç\U |›ń|GW Mہ\!DÇm€ri+HùÛÆóäæ9èŠoxj«ùźŁŐ' ]ĘK‡û@©\š ćۜço><ŚëÚ3č„(!„èž PžÈ=”ž|›ïI8 ^j!Ć_žZ€Òj”^U%”)[|o=·•ŃDžąku€òć۔”ĐôzœWŐÉ_ӝôjüU Ô*QžaÈwQ›88PłTŸ„ąk}€RΜU(‡ĂáąüUÔ*N*OÒÿIš ąü5ćy)ßPć[q’Š;!„ž|‚>@AûB”ZxČÛíZĆ©­Š;©> —ö\ç 4M«päùŰß`™ț“BˆÎŐ#Qź€vr…$ÏŚ]jćIBTÏ€6œ†ë֜” ć[ajop’a „ąëô˜țCŽ)Ï+ö\*ß°äšç|xÛt'*x ,mő‡j+L©…&Ï©Z$< !DŚÓ(=đ,źr|ï«U–ü S •'Ń^šò<ï«©öT›$< !ÄćŃŁ*P.j(_Ÿn*ŠâU„j+8ɰÂĆßߙżJ”çę¶”íÚz_!„Ś#+P.jUą@U©@ëíSOúDčnÛ Ujëüí_!DçëŃ Z‡œ¶*JjU§@śÛóž"x”fü5é]Êm{ȚO!DçèńÊ„­ ŐÖsjûhë=DÏўNćŸ…«@ś…Bt= P>ü©¶Ö©=ąœü…š¶Ö©=BŃő$@ùŃȚNàíùúä+.í ;jŻ‘Đ$„ʋšv±œÄćt1Í}B!ź PIŸ.q9I`Bˆî©GŽŐNhźÄ„’ $„W PHN‚B!DÏ œÒ „Bq”‘%„Bq‘ț?àŠoç^ńIENDźB`‚passenger-4.0.37/doc/images/spawn_server_architecture.svg000644 000765 000024 00000071625 12233035540 024242 0ustar00honglistaff000000 000000 image/svg+xml Spawn server Frameworkspawner server Rails 1.2.1 Frameworkspawner server Rails 1.2.6 Frameworkspawner server Rails 2.0.0 Applicationspawner server /webapps/foo Applicationspawner server /webapps/bar Applicationspawner server /webapps/blaat ... ... Application instance(/webapps/foo) spawns passenger-4.0.37/doc/images/typical_isolated_web_application.png000644 000765 000024 00000057774 12233035540 025531 0ustar00honglistaff000000 000000 ‰PNG  IHDRêëŠFŐ+sBIT|dˆ pHYs Ś ŚB(›xtEXtSoftwarewww.inkscape.org›î< IDATxœìw|Teú·Ż35œzo‚RE+*ˆșșźkY{o+Œ6t•tûâțVĆ”Źk…ȂD€Ë*Òk „ȚÛŽçęc2'sf&  áŸ>Ÿ0ç<ő>g†ó}î§M)„A!,1””‚ ‚ 4Ž” ‚ „1"Ԃ ‚ƈP ‚ B#B-‚ aŒ” ‚ „1"Ԃ ‚ƈP ‚ BcikAއƒéÓ§łdÉòóó9ùä“yúé§4hP«ÊyüńÇùÏțĂàÁƒ™?Ÿ!næÌ™Ìœ9“Ž;òÓO?ńúëŻóüóÏ7YžŠiüęïgòäÉÍÖœfÍV­ZĆ< ‡™L&bcc‰‹‹cäȑüío#::șUŚ$„7"Ԃ Œ?žôôtÀ+n™™™,X°€ęûś“œœÜârŠŠŠÈÊÊ"111(źŽŽ”ŹŹ,êêê çMĄiUUUÍŠpč\MŠ]±bß~û-ëÖ­#!!ĄW# HŚ· 힔kŚ’žžŽŐjeőêŐäääĐŻ_?jjjxçwŽXœśÜs{śîŐÿbcc˜2eŠ!üČË.3œśï߀nžÁȚ©S'Cù{öìaŚź]üüóÏș—œ{śn-ZtÄźI8úˆG-B»§[·n|ôŃG8F À€Ű”k»wï>bőÆÇÇݟkš@RR={ö4€őïź¶ÙlÄÆÆ„ó§G˜L^kĈ|őŐWddd°páBźŸúê ô<üđĂ<üđĂL™2‹ĆÂc=ÆĐĄC9xđ /Œđżüò iii\pÁÜ|óÍșĘ˗/ç7Ț 33›ÍÆ AƒžïŸû8á„oĂă?ŽŠiŒôÒKŒôÒKüűătë֍ûïżŸ#FlÚż?sçÎeÙČe8NFŽÉ€I“ œ/œô»wïæÎ;ï$;;›>úˆŒŒ<Î9çyäę~č\.æÌ™Ă… ÉËË#))‰3Î8ƒ?ÿùÏÄĆĆéćUUUńâ‹/ČjŐ*"##;v,śßż^NŰĄAŽ#öìÙŁŠOŸź,‹ČÙlêÇlUț;ïŒSȘ_ż~jőêՆż[oœU*---dȚžž8šçŸŸÉ:† ąuïœśĆœÿțû P€r»ĘzxYY™JHHP€șÿțûC–{đàA=ï Aƒôă͛7«;vš””(“É€Ç]~ùćzțíÛ·ëq:tP‘‘‘ P;wVEEEJ)„öîĘ«ç=íŽÓôc@ÙívőęśßëćíȚœ[uéÒƐP)))j͚5zș3Î8CêŹłÎR€2›ÍzÚ믿^OśüóÏ+@išŠ:wîŹ4MS€șúê« śiÀ€z~_šaÆ©ȘȘȘ&ż—¶B„Z„㊇zHHżśȚ{­ÎïêŠțŽ–PÿőŻUùË_Ô-·Üązśî­‡ęőŚ!ËőênĘș©?țXœüòËJ)„&L˜ uîčçȘŹŹ,”fÍ•œœŹ5ț|„”R·ß~»ÔôéӕRJ9őÇ?țQ]vÙeșû uÿțęŐâƋ՚5kÔđáĂ Ź”RÊăńš>}ú(@1B-X°@}ûí·jèĐĄ P P”””J©ĄŽŒŒTéééȘźźNoÙl6ʖN:)@mÜžQ)„TFF†:ć”SÔM7Ę€òóó•RJ=űàƒzù›6mR;vìĐïś /ŒĐäśÒVˆP ‚p\ńöÛo«ûî»OĆÇÇ«ÈÈHőÚkŻ”*żOš###ŐĐĄC ©©©GUšÿ4MS<òHŁćú ő?țń=Œ¶¶Vś”?úè#USSŁjjjtaŸńÆ•RJĘtÓM P‹EuÖYêć—_V4Ôá/Ô3gÎÔĂ?űà=<''GmÚŽI?śśČ/^ʇ§§§+„„úșëźÓÓ}ęőŚzșČČ2ćńxTbbąT||ŒșêȘ«Ô'Ÿ|ąêêê öőëŚOoäűźóć—_V€5jT“ßK[!B-ÂqÉżÿęošÄÄDćp8ZœÏ'ÔÆ Š{òÉ'ȘPO™2E=öŰcêùçŸWożę¶ÚŸ}{“ćú őŒyóôđmÛ¶5ÙCpȚyç)„”ÊÌÌ4tÊj”Ș+ŻŒReff*„ŒBęóÏ?ëuìßż__Ÿ|čzûí·őÓéÔÓ9N„őúëŻ+„„ÚżČzőjœŒÂÂB„”Rü±~ę»Ń§L™ą<r»ĘÊb±4z:ujòț”2™L„vÏŸ}ûŰșu+v»sÎ9€áÇPRR† 9rd[šxH<ûìłúdČÖâżŒÌąŐÔ©Ső‰ai{ôèÁöíÛÙŽióæÍăË/żdęúő̝;—ÄÄDfϞmÈśëŻżê“Ç222ôđ”””RÔÔԐ••EŸ>}ÈÌÌ€șș€ź]»Êó·Ób –Ż«źșŠË/żœôôtæÍ›ÇŒyó8xđ Ï?ÿüđCÀûp8p +WźdŃąEdff¶•©G ßR1€N:‘––€Óéäê«Żæê«ŻfĘșuŹ]»–ÈÈH\.=ô'Nd˖-L:•_~ù…§žz €Ć‹Ő1wî\}MùŒyóôz{śîÍȑ#u±={6n··ÛÍŹYłˆŠŠâÔSOmńőlĘș•ÛożńăÇsâ‰'òú믳ÿ~Fe°ÏŚp(((ĐŻ377—e˖…­P‹G-B»çÚkŻćčçž#??Ÿ=zĐ­[76oȚ À#ú·Û͕W^yš·óÈÒÖ}ï‚ GƒŸțY5JŒˆˆPÓŠM3Œžp ĐgB‡"œÆšę—g”ÿ1êőëŚĆϞ=[„„„鯯ޫŸęö[=Ÿ¶¶VĘ{ïœ*""Âpÿüç?ë3ŽęÇšç̙ŁșvíȘ—7yòdĂęVJ©7ȚxCp ú2©ÔÔTőî»ïÒűÆšÿö·żéaëÖ­ ŁȚŸ}»:śÜs ăÎ]»vUïżÿŸĄŒE‹éłä5MSÇWłgÏnŐœ<šhJŐ‚ SRRB=BŽs ››KttŽaL۟ÚÚZrrr°X,tíÚŐĐeœ™™IŻ^œŰŸ};ęûś'++‹ŽŽ4"""­łžž˜ÚÚZ:wîü›í/--ćàÁƒ$''7镗””àrčZćč·"Ԃ Âa#Pš ĐÆûÈd2AAc€ßGA8l€ŠŠČpáB xy•phHŚ· ‚ „1Òő-‚ aŒ” B0gÎxD_» ńò}űïDv플2nÜ8\.ŚQ©»œ!B-‚ĐÆTUUńűăc±XèÛ·ï©#33“+źž‚[oœőˆ”ïcęúőŒ3†_|Q=z4ßÿ=ŻŸúê­»œ"B-‚ĐÆŒòÊ+äççsĂ 7±:țńđĆ_±ò}üć/aćʕ†°kźč‹ĆŒ3š­­=â6Ž7ÌÓŠM›ÖÖF‚ ŻTUUqĆWàt:yçw ›ŒžĘnÖŻ_ÏÇ̊+pč\ôìÙӐá…üüóÏDDD””À˜?>[·neđàÁüüóÏ|öÙgìÚ”‹šš(’““INNF)Ɨ_~ÉöíÛ9á„űțûïùàƒÈÊÊąoߟŰl6œžO>ù„Í›7Ó±cGąŁŁï:é%K–Mߟ}IOOçłÏ>#//„„l6œző"!!uëÖ±aĂzśî­żEh!mž+š ÂqÏ7ß|ŁuÊ)§Â+++ő­3ęÿ.ŒđB•——§§;šžœ{ś*„”š3gŽÔĉû=lïHŚ· Bòęśßyʗ^z)+Wź$11‘Ç{ŒÉ“'Ăÿû_îŒóÎVŐqÙe—1fÌzőêÌ3 ;†UWW3wî\ŠM›ÆÓO?Mbb"Û¶m㡇jU=wÜqęûśàÔSOeƌú+2}Ś·|ùrÜnw«Ê=Ț‘ OAÚßÛąșu멇íȚœ›„K—đî»ïré„—pÒI'qË-·0oȚ<¶lÙÂàÁƒ[TÇ\ÀąE‹X±bĘșuăŃG`˖-zšG}”)SŠȚw=?öŰc|öÙgÔÖÖ6čG·?Ś\s ïżÿ>;wîd۰az=țŚW^^N~~>:ujQ™‚L&AhS ă.^˖- 22’óÏ?_ÿĘï~§żcÆ †r”ßȚUN§łŐvL˜0A?Ÿđ đxvìXUTT€ç_Œx±ČÛíz|jjȘš6mšay–RJ}űá‡{ÓÓӕRJęë_ÿR€șțúëĐlżÈÛłAڏÇCŻ^œÈÎΊ   hü6//•+Wâp8>|žaY•ââb~üńGÜn7cǎ%66–”kŚb2™8óÌ3őt[·neőêŐtéÒ…ŃŁG“““Ð!CŰż?eeeüôÓOôèу3Ï<Ó0n““ĂòćˉçŒ3ÎÀétČiÓ&bbb9r€žn͚5lȚŒ™Ÿ}ûrê©§ɟțô'>üđCŸùæ.ŸűâĂy Û="Ԃ mÌôéә6mÿùÏžöÚkZœ[¶l1ő‘zt]]:u"""‚}ûö5„Š‘Éd‚ mÌęśßOrr2Żżțz[›rDűôÓO)))á駟‘>DšAژÄÄDțțśżc±XÈÍÍ=jővèЁ)SŠ0eÊbccX=6làê«Żææ›o>buŽg€ë[AÂńšA!ŒĄA„0F„ZAÂjAAcDšA!ŒĄA„0F„ZAÂjAAcDšAŽS”Rú«3…đE„Zá8ć—_~Ńß=-„/"Ԃ Ç) .$==ššš¶6EhjA„ă”E‹Q[[ËÒ„KÛÚĄ DšAŽCJJJXłf ,hck„ŠĄA8YŒx1n·đv á‹” Âqˆż8ïĘ»—íÛ··Ą5BSˆP ‚ g(„XŽh‘!LŒêđE„Zá8cęúőŸ|òÉai>ú(?ÿüó)[hjA„vBjjêŻăä“O>âuFdŒZAÂjAAcDšA!ŒĄA„0F„ZAÂjAAcDšA!ŒĄA„0F„ZAÂjAAcDšA!ŒĄA„0F„ZAÂjAAcDšA!ŒĄA„0F„ZAÂK[ ÂŃljƒO•ȘŒ Uź:Tm[›†BŐúTCœÿ±1•1NăJ ˆ3|(cJżì* …!Î`“ȚÊTˆtA©•ÿq`IÁqĄŻŃÏΐŚŰvGńn9àŰÏ^Ÿ”țš€kșs*0ȘáÎgSÍ È\_•Y3oI$Éځd[ IÖ:Ű:’bK ș†öŠ” '”©v»·°Ëœ•ęîœxp·”I€ÿĂżáÁĘ 8Ê?•!źAÜü—ÎOZF±P~g~q†zCŠk>ƒü4g°ïpŰî/ÒMÙźüź!È>ïQ±”œ.cR ߃}Ź)_|ßA¶ĄmjäțȚÏČÆâ:ŰR•p§$Œć€ž“±hVÚ+š næ ‚ĐNpš:~v­d›ûW <Ûڜz<4B C”cœÙA"HÂà/n!âBŠoMFûüJ Č=”6iûohT„NgžŠÆmj|„¶ÏŰšhÂöŠb·{k‹ÒGj‘Dk1Ű”"4;v-»fGCkuĘț»~MĆ6Ä5iźĐ…« TˆŁàč€òÒ&SA đŽOC ÿëfżò:›ƒÏêó5]^㍔P54ĘĐ q%*ŰźÖˆ{@Ó$d~§ÛI”łšjgŐÎjȘ•UáQîfD‘æhđ,§%Í±Œ” ŽÊT1ŸŐœCĄ'ŻÉtńŠxR͝H3„gŠ?JÖ[4)ș獄ßqÓąÔhȘŠD·I Cˆp  ŐÿÛHó!€}†OœŒʕ€€Ž*8oš;âp;É)ÛÏŸ’,rÊČqžFáśoˆ(·őșŸ«»ĘʱŠ” ăìśìáËșSŁȘMÓÙ܅ÖADkŃGŃȶGD7üE7Ž]Ś Bçp+7™…{٘ó+ՎȘúșï7\z ő «ÉƱ†” Ăìroa^ʍ.”ê`êÀ ë`âM GÙČψnûĘVß7?»\7»òvČęÀœ.§ß}hšahüH^:›Éα„” Łä{đAík8qƙ13Ô6œÎæ.m`YóˆèŠè6%ș-żÊ`«.ÿÛœ–ŒÒŒËșÎKÈ“ƒ_áXB„ZŽAȘU%ïŐțƒrU„E1Òv*qŠžŁb‹ˆźˆî‘]ęS‡6u„â»ïŸăœśȚŒCçž{.+WźÔËüüóÏ2dżüò 111\qĆäææ2{ölf͚„ ő‚ X°`6›Mê{YłfȚÆÇ?üÀżțő/,X 7źîžă>ęôS, :t`íÚ”|őŐWTTTđàƒòÓO?±nĘ:ę>̞=›±cNJP‡;œ›QÊSÿœó>r슔æÁ§A<ôh]ĘăGt› m,&*)†’ì↫WŠe‹ŠœÙ IDATăV.ÌZűͱn•EŸ±ăÒÒàę……_ę•ÓN;í°”u(8ŠM›†Ăá 77—„K—R[[ ÀžqăšÌëńxđx<|òÉ'·ĘvcǎćĘwßŐEzæÌ™\}őŐŒúê«Ì˜1㐟aćʕșHϝ;—qăÆńÈ#đÖ[ońĐC±jŐ*öìÙĂgŸ}FBB999DEE±hŃ"ŠOŸNNN‡;‚‚Ț|óMúôéĂ|@ż~ęÉ&áđ’é܉Gù "Âl7t{‹èŠèŻąÛXȘŠÒF&D‚YCčÜúś\æ(a{éf'kQ-G“V ”o‚Śá"::šŸ}ûÂ8@AAÁa­§1œN'Ó§O7„™L&ŠM›ÆÙgŸĘlțÇ\śjKJJtŸëź»HJJ"))‰‹/Ÿ˜?ț˜čsç2vìX–.] À€˜4iO=őÿüç?©ššhő5|óÍ7 :”‹/ŸđŽëϙ3‡Ő«W“R ÇCii)ęûśgâĉüńdŐȘUș§Ț­[7șuëxÇîGĘj[„#C‰»ÈëQû0›,!șœEtEt[’¶}‰nÈ\~żĂhAeQ%ț/ëÈ©Țwì őáfĈüű㏆°|W^9:Ż łZ­<đÀ˜ÍfèĐĄgžy&}úôiQț=zèÇ»wï֏}‚éÏțęû Ÿț ‹ĆšQŁtÄívc2™t?°Ț 6„œ„žÍèŃŁ™:u*Ï?ÿ<999Œù曌ùæ›ôíۗGy„Ûożœ%—ÛîX°`YYYŒ?ž^œz””9Rî.ńzÔ~;*y4Ođlï qó~úÎDtEt[Ê1%ș-¶Ćc¶Y `äŐŽĘĐkS„_güQÄfłńÜsÏr~ÿqlÿÙäÏ>ûlЃżcǎ€wœ0,SJ±eKđ¶>***HJJŒăÇțűê2dHÈuäŸÆÄSO=ĆĂ?̂ ˜7oóçÏgśîĘÜ{ïœLœ8‘Ν;7ÁíŒ &pïœśrÏ=ś0`À&L˜À„ 8óÌ3ĂfœK9©ôx{Zü=j.ę &ą+ąÛǃèŠ-&› Çï[UŠƒŐ9­,ćèpۅzÙČeÔÔÔ0dÈșv ÿ·’üüg™śêՋ„„JKKQJqőŐWȚ‰^\y敜tÒI̝;—ć˗SZZJBBK—.%//ÏPv§Nô㏏,’’’ÈÏÏgïȚœ†tÇçwȚ!##ƒ‰'ËÚ”kyőŐW:t(ÉÉÉ|śĘwüûßÿŠąą‚Ï>ûŒ«źșŠŠŠ :uêDUU?üđŚ^{­.N‡ăˆÜŻpCÓ4}3Ś_;v0sæLąąą8çœstáîĘ»w›ÙXîńțž f œÊˆnóvêa"ș͖z,‹źjEŸĘșGí+AAnMv+k>:vĄŸțúëÙż?oŸùf»ïRőï‚Ś;èĄ‡xâ‰'˜:u*ëÖ­Ăáp°`Á’““yàžûî»yńĆ)//§Gœzê©,YČ$šìž={MUUżÿęï7nK–,ÁćrÒĘ|óÍ<śÜs8p€rÉ%—đÍ7ßpàÀRRR°Ùl€„„1wî\êêê7ngu?ęôUUUÄĆĆqæ™g ^ÿź]»8돳žëź»žæškŽÔí Ć șșšùóç3ț|úśïτ žèą‹Žș·]á)óźŸö“fÂAp|ˆnev hŠè.‘íVtćnœ„.ì)̑&=Œ&ځr+ąșÚĂFtëòžj=DułƒÛ6ąÛÒęcÌ6sĂ$ÍúÂò«„ë»ĘóűăÌ3˜7o6›sÎ9‡'žx‚.]șȚőß_}ő7Üpûśï'==»ïŸ›­[·òĂ?èeY,>ÿüsź»î:233ùđĂčûî»q»Ę̜9SOĂO?ęč7Țȏ?țÈìÙłéÒ„ wÜq/ŒđàőâçÏŸÏ€I“X¶l˖-`۰aüăÿĐ{>.șè"úśïÏΝ;YŸ|9żûĘïŽÒk[B‰”?;wîdçΝŒúê«GĘÛv+·ÁŁöŠ‹ÂĄǧ}g‡WtKvW°ăÓLâ{Ć0àšȚ8?q«Ê­fË»{r{":ۂ,Úțï,*ł«émwbzDâZ"ș_ŒMÇd7qć¶ł Ńm.4TLÆ[Űö·}œòî:ÿ.YOőăűM8K]\”Őòe’GÚÓ]wăNŠŚV0!{æ(Sp6CúŁ#șMYĐXzÍŹ–=*Àá ÏȚDy{Ö"''‡„„ąŁŁM“••Eǎ‰ŒŒäüóÏgɒ%<űàƒúF'>233éÒ„ V«”É:htƒ€üü|Š‹‹éÔ©ńńńAń‡ÌÌLRRR ]ûÇJ)îœśȚbĘGÚÛÎpl獱çœöù5&…­ĂZ ș‡âéVæÔđïA ˆL±sCÆEA©¶ż—Éò?ÿ À9sFĐûÊ.†Z=nÿéńÎJŚì‡=Éڌd‹îç}–așžlÛDŽè6•Ș±Ž;_ÎaÛßö1êĘț~B ‹‡ț‚łÔƄÌQ­š„e1„]{ćŠV”sȚŻĂ°§ZęÒ{sʚ°•’”•ŒÏÙšPmŃ=”\ŐƕdźËđÆÔÿȚFw<“čăBOêmKÄŁ>Bű<èŠđŸ5ȚM Ż?6›­ÙŽ;vÔ»žCa2™ÚtL¶-iÎłĆŃđ¶ő=Ÿœ'(“oęĂÓœWïéÚ:›‰ëEùȚjò·“0 Ɛ+gy>æšI#gE>]ŻL1”Vž± g…‹„Á1h‰ÔŻęm_SVƒj˜ćæąÛhź&<ʆăń©ŸÄă ôK[.șÚÒDÓƒ§ÎƒGy7Ó ŒĘC_덫ҍfŚB~m!șŠo4™ÂSßSŐđ{oĘoëh"B-~ŠXû8"cÛJ5ìń]ÿ4ń(w}ŚwëDżT­Óíxf"ć{«ÉY‘OT›!îàŠ"’GÆŁY4rWŚżnłĄ„Ü…€ŒŚÇŐ „+…«Ú%ÊÜű-šÿôű=DĘ”Ì&šz`7śÈUn…»Æ%ÆÜ:±đ€ÇáÁdoș~ÜN…Ёf ÔUAŸż2ŁûGԇ6u W…ś:‚ÇŒ8ËʘŁÍhG8 ì†6ĄážûˆìeH,ŸÊ­P.Uł;űÈ]ă1ŒŃÒ7!ș͇„Î8ÿŁ5]őGê0aƌ<űàƒaœžśx᷈”?‡ĂÛö¶òęĘJáVżYß­]œLŸ ŃlZE‡3âŰę^č+ éqKG|žnćȚZȘÔŃă†T4“FȚłĆ”Ź$"”ac€Œć%$‰mx—6śC)Û_ŰOù–*œćnąșÛétQƒŸìQ/ÀÁśÁUçfóc™ä}_BőŸ:ą{GĐóúTúMîâ—Șé‡tĆöjöŸuüÊšȚW‡r)lŹ$ŸËà§zŐĂnH_Ÿčš_îÙM—Ë“I›˜ÄÖ©YŻ­À]ă!îÄhN˜Öä1Ÿ„™ȚšÎ/aÇóÙôÜ{Š•/ćPșź4HÐ{ÓÏžçȚÁŰużîȘž*ܜ¶`PĐ”Żź`Ś‹(ß\…ŁĐ…ÉŠwb=ïLŁóIzș=ÿ‹óŸ)fïÿćQč„SĘ/‚ŽËéęÿÒĐÌ ­„`ęu8 œșp /ààW%TíŹĆ–lĄÓ•Iô›Ú“ĘÔJ»5œ-*l=è@DšĂ„ÖŸÓ[8Č.±öń[ŒmăöĄőuàŹïŠnèPߊÁÓő‘46€‚ežUĂȘƒüő"|zœîĄŹ,§ëï;xKò@Ńê24“7Żìí/fłmÆ>ì)Vș\Ț{+%ë+Éx#—‚eeœ”ô$ÌŸ1űz«\đÓuÛ©Ü]ëĂUpàë"¶LÏąj_-C_é]owՄ"oI)û?-€ăčńtš˜„fŚšŰRMî·Ćä_Ê9k†ÙŐźçwV»(ß\=Ćʞ7Ó?’^wwą&»ŽœÏŠX}Ć6FŸÛÔ ‰zu%Ț<čß“ÿ]))çĆÓgr'*¶Őûu1+/ŰÂèŻwb”ß}o8𿆊58K]A‚ČëĆìz>łĘDÇń Dś źĐIɚJræÒéŠ$œÔÓś7,šNW$aO”â(t‘śm ïÛKćîúOőN&ŐŹ #Łq:qWyˆ;)Jƒ¶w¶êß_՞Z*6WŁ< ÿźń]Ïä°śï±uđ ­9ÖDŃśćìžq€ąećŒüąűő(TíȘĄ6Ûɖə~_N‡óă‰IȚ·„dœ‘ŁÔĆàöù=†ąŐĂLjHƒ”đxúé§uáiÏ€ŠŠ­sÿ­ű{Ûv»qăÆ…ô¶œ3Ÿ/äp+O+f}·î*„=ÍJLŸ*3j©ŰU­{ƒ…+Ê0Ù4Gƀ&›FáŠ2șüȚ;Șt“Ś[Ž?1kąŠÒ_*ÙțÜ>’FÆrÚ烰Ä6tygŒ–Ëæ'2ÙőjŠt5tuÖ8©9ààÌ„C°&x[}ÿ_gV]ȕÌwòè~}Gâ‡56qłĄ ŽKé~S æhcW{î7Ćü|ă.¶?»Ÿał‚w&,H/ŁÇm© yĄA8ș]ŸÂêK¶±ć/Y€Œ‹GłÖ7.ê ÏęȘ˜ÁÏś Çm©ș ?M`ĂĘ{Űöä>Nù|€ŸuœAWĐV¶±šĘ/äÙŐÆÈčę‰îgläŐf; ż‹Ó– &öcšțOvaí„ídŸžG·[RˆèbĂ­1è„îTeÔRwĐIżżvÁžæ›Lì}z”B««ÜRC櫉ìncä·ˆèìÍçyÜĂŻŚïĄhi9ûȚ+ Û­)Æ2ê=zôàwȚaÊ̙3‡„„ĂRж$;;›””ìv;?țű#wÜq3fÌàòËĂó”j-!##ƒ”kڶ”Çožú·=»恓^é…9ÆdxűśŸ;=oæ’ő~ę žŒ9à±źXÌzùÖD3țҕuŚídÏì\†œȚüÖż‘ĘíőÍăŐŠ]’HtߊVVâ|v[bÍ xÜŚxđ&ŒŠŠË’Éț𐃠KH»$Ń Ńę"è~kGCyÿ˜LÖÛyțPNƎjąDúć €mŸx_hÆ+č(ô›Ú…š~ö ôöźVƒ§3("@ÈŠ(î·wdËä,J~Ș$őČDiÌcłĐ{œùzÊ='§bïlŃĂ5»FżżuĄèŒrČț/ŸźșP7”ÛwZgÌń&=%ĆBÂiŃț·œÊm5Ű:†’©æ‡9BalƊPUȚ}ś]ÒÓÓőŚBîȚœ›śȚ{ŽŽŽ6êșș:^xáž{î9öíۇĘngôèŃ0iÒ$.žà‚&—p Ç>o{æÌ™DFG’::‘Ą·ö§óhïxąÇo7„ÆhÙ#šć»căÈ|7Â•ćtż)•êŹ:jČëèvU]l“OcŚßsšÍw`O±RžÂ+ÔIg4t{—oźÂeąźŰEÁe yê•È–lĄt}Î*–Ż·Ă9ńA¶&ć]BXŸ­șÙŻOʜenČ?* jW-uxőĘÜĆ.œ„.Ü”LvÍàĘÆˆÆg Ș#ùŹXČ?*€b[5/I0ÜÏäłâPZ°MÉgÆQúż*Ê·Ő5Àçé„ÚÏjÀ8©«bK5h2!ĄĆłź‹—UPű}9u8ËÜ ŒŚ P”·źQ/Ÿ©ùæ EőnïPLÒ豯^QęìDt”Q»ß«Ò9Úo‚±Ă#ëg_7ȘWšk8ę^UˆŁÆhŒčqlpÌ umm-ÓŠMĂn·ëoČ:ù䓙1c111mlŹ[·Žżțő݆0›ÍÆŐW_ÍŹYłxë­·˜oŽB Pt]某śÜYáőJ- æ†ëšÿtUž Śà;rUyŚÀ[Í!EÈߓoś”LÀcÂUV_¶x”Æ\YŻçS”^AŚ[;Đïé.˜lŸqtÈÿȘ”ČŸȘ5țìMŁBŠźżMzwuŒGžW„sŒYOáĂUîœfsBpŻ„'D uQ·vțWSœ,Òő}ùê«ŻžìČËô°e˖qóÍ7“––ŠoƒùŚżț•Ő«WsïœśòÁPVVЧé„—xđÁőăŻŸúŠëź»Ž èo«zâ‰'xńĆő=»?ęôSž~úiÎ=ś\ƒP_wĘu8NŸțúk"##™6mšwûí·sÛm·1jÔ(FMjj*lÜž‘ĄC‡™t™:u*wĘuW[›qDÙČe “'OŠČČò°—ĆšQŁžôÒKčòÊ+őśńŸKÜ{äę7è%ŽNt[?źWß”=&–Ê]5ź,§heńCŁ ^ź9ÖDÜà( W”ŐÇ»Ì)iLlƒ­Dś bK5Ö$3¶$K“¶Ù©šÎȘ5ŹášÎȘőî…Ę;xŹ6P"«vŚâ(pÒùIčˆ2 €SQ諊țDyU»jCŠnőïR&ÿú}q•;kCŠnU}žÈȚ6`\Gíß!î#Č·ò_Ș©Êš%ȘŻœIń*]íęĘö| ÍjìBŻÜZŁŚa°ŃäsKyșțű udw+Ő;k©ÜYKÜš(C:CQ“éÀaòzÜś©ÉćçÁ·â—Û’_œőQÂáp°|ùr ć»wœöÚk<ù䓌;–żțőŻŹZ”ŠgŸ}Vj|đăÆăúëŻçwȚá‡~`ʔ)\tŃE 8°‘ҍôíۗ;ïŒS;Ÿ:u*§Ÿ~șßłgOòòòHOO?&…șOŸ>-~wś±ÈÚ”kyđÁ«H‡òš›BAÀÎdȚ‡màĂź„Žêa4iLYïä“ęQ5ûêè|yRx%žCæyäÎó6p“Έ5Ԙ:1Š-Őìz!‡AÏuo•í™oć3đYăùČæära|łž—»~,:”èîûW>îȘ†e‚DwG-E+*HÓ0œŠ\Šìw Ń,ÉçùÍz? ț[Fuv]֕;‹]ä}Q‚5ÙÔX€úuÔțÆ4R&ÆSțK5{^>È łšŸ‡gC#ĆÒŃg»wƒ”œśŠôs;l)^žrW-¶źĄ~ŸÁ]ă çÆRŽ€‚ìÙ iŽ)ś?Ež«búôé-Ș«gϞ\wĘușPOš4‰ää†}|»uëÆÚ”kÙœ{w‹ÊŽkŚźć /4ôŒ ±±±úÒ«ńăÇ·űwêOĂF!JĂ ć©5ĆáŰ{9ń d­·á’xzC··/œOšK~ȘD3k†4œ'w"ś‹bČæäăȘtÓꎎDś‰À]íŠ:ËAțüRjsœôFĂÆ? 0E˜Èț k’™.Śz'°ć|PH֛ùŰ;YézCr“ĘŽàÔdë`Ąl}5/ć’ö‡DLvy_–1#[ČG‘Ë @Ÿ+ł&[Űxë^ÍìNâ1Ôîw°kZŐ{ëèü§$"z{ǖX3ëŻŰÍÀ™Ę‰AŐöZv<žw”‡^§aŠj˜őȚœpù‡u»;…ÜOJț[‚r+șߗBd_;ÎBe««šÉrĐóáTâOŠ8œ‚Œ§séńp*q#ŁšȚQÇźGrôÍLK1C#ÉûŹ”}ŻäS»ßœ‹KŒ™žSą ß”ÏÛU(:Ę˜È9…|U†-őoOÆcąh~9{žÈEłjôœšÖH7wăažFâSûìi ÇĐ2êc[š ïțԝ;wnQžŸ}ûêÇț{^ŚÖÖ„zÜžqX,ȚÛc·Û9돳Xžp!;wî4”gh™+…Û튄űȚZUTTÔLJáhò[Eș”^sS4Œ*|îˆGyBlíŰ:Ńm*Ucém)bDRčŁÍŹ‘0:&šk4aŽwM5 bOŒÄ0&iƒ‘_őgûŁûÉùšˆœŒż}ÍŹŃőŠAąkM43dVOÖ_“ÁîôđȞv†ŰìZH0”mƒțŻ›nÛKÆsčd<ç}„ĄÉŠ1䭞dÿ«âe”śłăï°ÄšÙxęC™)'Đo†qٖϊt€lMż\Čː§ûœ)tœ'ĆĐÈńïânJž€†~ٛ“ö“ÿE)ù_”ÒvŒžŰ|ő'%%5“R8ZŠHŻč1"L uœxižæ» ƒš§%č†ț«Ž"—w¶nŽ)è!jMČpÊ·ęńžöŽVĂ &|ŰR-œôN/*·ŠQ譆ê=uXbÍŰ;ÛH<#kČÙ șĂțĘ4ˆ͘_N tmŐuÄ Ž$ńôŻM\?ÉçÇ2zÍ Š—ă(t30‚ž“ٰuŽŃӆłÄ9ÖŹÛíoGï'ÒHęCćÿ«ÆUé&îä(âGFƒfR_ÍŹqœîTnȘ„üUhfžSى9!o—n©W&wJŃ# ò5è­n(—o¶żß}N13äÞTŹŻĄj{-uÙNŹ)fbOŠ$vD”îéj68i^/Š—TP””K‚™Űá‘DŽÀ]áá€/{aïj5\§fŚô~wœ….êrœž+=˜Ł\œgtÂUîÆĄ~‡önVNüș'ëjšÚV‹§ÚCÔ ;±#ŁŒKÛ~+ę^낧.ô|‹Äń± îo#ąOèÙöé[ăâv;Uі¶_)ŠcZšSRŒ‹çĘn7%%%-<Ÿž7ÇêŐ«)//'..Žșș:VŻ^  Oûf˜û&›śu”ű{S.—ËW^^@ż~ęZd“pdiHNŻč),IA5n­Żz&3FDˆ J )țԆ‡]S^nô Dì˜ć/t>ș\֎R.ix=kc˙Œ ¶4 źO HĄ ¶(mń~QíD ŽB!Đfż0łF̰b†EòšlëbÁÖĆRM ‘±#ŒŚêć1Ă#ˆnŒ‡Aś\S$žCâùF2'˜ˆ;#ȘQïÒÒÁ‚„CĂ25ŸĘQCì Ś˜Í ±Ł#‰Œ‘K ŃÃ_8â;ČŠ™±Šùw”·Ž)Ö8cÿźÚàMƒR#[Ö3{Ž9Š…șsç΀€€PPP@^^ȚaőLN'Æ ăÆoäóÏ?§¶¶–šš(nŒńF A\322xűá‡4hŻŒòJP9>Axê©§5j7Ęt{öx»ŃúśïŰìæDúHzÍMgIŹïšô{œșœÈP›i@ËE7tH㎶«°ëOßąâ{l·Ô–ÖtŁĂ ŐŰy#˞Za}kż±–wü˜î!ŐÒȘß*ș*àÄP^}WéÇ^B uZTóŻ'n ŽiĄÖ4sÎ9‡O?ꔟ~ú‰Aƒ°ȚaIDAT‚ß0sšœwȚyìßż_Ÿxɜ9sô±đ .ž€óÏ?ŸĆ‹óÒK/pß}śȚ%=>úőëGߟ}Ùœ{7łfÍbÜžqșPo۰đzgBÛјH-Żč)L˜ˆł$Pâ(ԅBš<æP~\Ë8žE·©Ű`ŃUzҖŠźÿűv(ońĐ­k<Őń.șĄŚû%òÿšÿ'”PwĄ>2\uŐU|úé§|ÿęśș·;~üxÒÓÓ±Ûșš^{í5ÊÊÊ /<4héé逦cò§_ż~̛7„K—RYYɘ1cèȚœaفĘngțüùŹ]»–ŒŒ FŽÉàÁƒùßÿțGee%'žx"àíj_»v-‹-Âl63jÔ(¶nĘJnn.ŁG6”+]üEș­ŒææH0'S€ŒËŒÏ…æ2ĄÌ~ï©nÇ«è6_~p{W =ŸH%fhd‹E7fx=ŸH%vTĂò+Ę#+ș‡è%‡ìíđșkÄŁ>j\rÉ%€ŠŠČxńb\.‹…ŽŽ4ÒÒÒ éüwóËÙgŸĘhÙ111\z鄍Æ[­VƌcŰÙ,Ôë*“’’žöÚk aóæÍàæ›onŽ|áÈČvíZ&MšÄ­·ȚÊĉ;vl›xÍ͑fíÄ.”ÿ脯ŒĂîŃmŽ„ĂÓœlídĄëę e6WrÔ DàuȚ–0]ÂăRȚ mnߟ§áÜ/·ÂăVP† 4“f ÍŹĄ™Ń1՟›êÏÍZ}ZĐ,Z«EŚbc`Ł@č<8+낼čwlxÎ:æ…Új”2uêTî»ï>ŸüòKźŒòʶ6©Y<oœőęûśĄnCúöí˚5kÚڌf{ ?–,Œ KO|Kœ"ș­KßxȘöêézj=ž«ĘžkÜxjÜxȘĘžk\Ță:Oë+û­˜5L&ŽšĘ„)ÂőçŠȚÙCy⁁bĘđKrW]WÏŰŸôŒ5.A ŽyĄžëź»HOOgęúőżYšŻžâ ÈèŃŁ“uÁlÜž‘=zđ—żü%,=žăÿ„záÌđžSŃ0áVźú‡Bs‚ÉaÂmk~ĘŸˆnpȘö*șu/{< w© WčScO­Oći­G·ÂSć†ȘĐżmÍȘĘ+âDh^A1ŁÙMAžwxڇ9Jj‚Êœ°kăœ§mŠZóVyAڄ'wMbKćzĂNV”qj‚»ï|ˆè6Wö±)șÁždp­žZź2î2źR'î ŚŃśŒ6V ąœąMŽ "M …ž_Eíöü†—Śóùù?pZêYGŐä–Ò.s˜àöx(«,„žČ^È+JÈ.Ì!§ ç7yâ}âûsiï?pIŻ?Đ#źwóŽ2"Ԃp ńțțY|’óNę™ï!ŻšMrQ—ŰüƒJD· E7°œúÁćàíÎ.rá)q«őh“ÉD§€4șwìæęKíNldxŸpâpàöxÈ-Îe_Ț~öć{ÿ*kí=ò'uÁ„œŻäâ^ż'%2ő0[zhˆP Â1D”»Š[~č”2Wę« őœą:͉+Šq—KD·mD·„K†T© uÀ 5­s#lvș„tŁ{ȘW˜»vè‚Őr|/ę,ź(ńŠvȚ>öćï§ Ž Użk«ÉÆUęoàž“"5*­ù GjA8ÆXVű_fì|hxè+@iŠênN<öheù"șŃ ș_~A՗»Ńr]­èűè8Nì5„{ &-) MÓZœśx€ÆQËźìĘlÜł‰Œÿżœ;Čșś8ț™™,“ÉdßYٗÂ*û""Č]JĆœ”*¶ VËœnŐë•Úê”Ű^ u[K•"ˆ ‚X¶ ;BÈJHȞÉ$3“çț10d˜IÈÎö{ż^˜™óœ9ÏÉÄŚ|çyžóœƒ„™K»kŽ<ÜûqžŠ[@€6šƒ{霔7Ąç–Č:ś“A`]‚PQ+ԆY0ë/•Jèv~èÚżđȘ1öíšȘêQšQšś1Źsś _t_âc㈠‰Dąču ”5Ë:NJf*مÙÍú2«sŃńó>żâÉțÏâëîŚá}lH‚Zˆ›B=ÿsì9ö–ì°>· H…Ú€zêü,șę»Òh{‡ncęSìXU+žYšĐnźnôŽèE|lș‡wC­V_ó5ąùÊ«ËI={Œ”ÌTΗ^łŸȚՋÇûÍçńŸóđróî„JP qÓ2XȘyæÈCdNÛÖ@6éë1XšŚ\.–ĐíˆĐUźÚčĂ'Șbë *3žžŻG]}íĘ۰†ôD݈ž·ęőæÎRTVÄŃÌTž8DM±ÉșŸî~Œ6ìmfu»żĂû%A-ÄMŹĐ˜Ï ©O’]i+k8Íšą‚Zo ”Ț5șęo}è6őeG±ÿȘĐ*šź18?*$’‰ ㉠nșąè0ÆșZöÛËȚăû©55>M/ÀĂœŸà”aÿ‹«Ú­Ăú#A-ÄMźÚ\ÉÂcÿɁ’D[6ŰÆ‚_cBȚ‚I§`Ń(Hè^źȚșĐ”k«a욻òÄ”Ž%Ș«ß.;]ƒș01a<ĘĂ»5^ItȘšÚ~LÛĂțôԙŚŻŸl`ĐȚÿ7Â<;f=k j!nőJ=œYÄçVŰČ á f ÜâȘP§­§N[oŃL%ĄëŽ?„źłvźîÏćU•%jÜ û óebÂxzEôlŽŽžŸȘŐìJĘ́‡072±Šż6„ăV02l\»ï_‚Zˆ[Èæ‚ő,>čJs%p%0@±»•«a€+*…zőćW‚É>t‡ĐUìBËîUvƒÖGž;nkš—ÛSì_tUÛùžÒžcßÚ¶{Țđ˃âОSWÙžză%j‹m­uœóÁ_^zŠĘq}ąúÈèí›D„Ą’-Iÿæè™T§Û5* ^ć©űšÚńŻ*A-Ä-ŠÜTÊÊÌżČ6ç˜êM8„ôUád7bÜîș”ómöőź±ÍnżÍûâ`ÿ„àêzöȚhßLăl[Ăț”d“æR+.žYt~XG…Drÿű{ŃßÂł…ĘÊeæ»ę›0[œŻ™=5zKÆ~ŒFĘ>ó€KP q‹ÊŻÉáƒSï°„à„Țy‚}š5àMyڅtSÛ†ŽĘ~›đ«úgÌ ë]œß†őìżTtT8_ŠRÔž[ô†ôÈ~w0yđ$čÍê&—WœÏêk(«*wșꁞòæÈ„íČ/ j!nq™Ul)ű†ÄÂ-œŹ<îä4uƒgNO; <‡SÇÍ8ą¶«ŚÄ”ĂŃpăęs~Ô܊ÓÙíD… włŽ!ìæêÆŹQ3éĘ·Sú":žĄ¶†/wźătț§Û_ü:OĆ-hó~$š…žœŻÉcGá~ŒđoÎVąÈxžșzëÊ[s:Ûyű: fûę:«Śč§ł›ĂĘąG­8źkèÀƒî#ÈśúLA):Žą(lOȚÉÎŁ‰ÿŚ©P±âź1źË]mڇ”·1…òșR \š) êÒ Ž«ë4–{hwܱvÇJcÛ>S·Ù—(W\7{òù2ăŸćA><9íqŽnÚëĐ+ŃYžLâۜʻê#ùț'ĐjZÿś— Bˆ6*5^äÎuƒ)Ż+ł+śÔzò«éOà«śœN=éûƒ?°ûŰ^‡ògŒÈ‚„WZĘźŒfBˆ6Z’üż!­˜0GBú62yÈ$ztéîPŸ,m)Őy­n·}Ǝ !ÄmȘÆ\Ăș3Ÿ;”'ôH *$ČEmU•Űžh;G7Ÿ ČžšĐÜ54ĂîoQ;ÿ|ț[|yÔö\ăȘÁĂ[‹‡·;Ăç `ÒŒQ-jïfŁ( bȚàéÏąŚ˜ŰNÙŻJ„bƈ©üő«ś15˜„ÎRËÚÓ«xfÀ‹­jW‚Z!Úà‡ì LŐveZ7-“ßÙąvL”fMYFæÁ[Yi^9é;Îđđÿęś,Ûì¶*‹«)>Wêt[úŽ3€ïÌ䌫ÖąțĘTlżżÉxÉŐۙŻȚ—ŃqŁŰžŒÓźü«3«[Ôrê[!Úà›Ì/ÊâcûŁÓêZÔΑo“y0•JĆË[~ĆEo0âÁŸzc‹Ó%JŻ„ûQ,>û*ïœx‰Śç7čÖ„ŒĐqàà­B„V±pïł,Üû,±ĂZvVŁ= í5”Êț>úʊ3€iU{rD-„m\|ÈĄl`ś-nGQŠśĆ+HOÿ»Źó~O˜{{??‚ĄŹ†šŠZt>-9ìȘu!(Ú€°^Á<±lż‰țŠąČùcʎś“y(‡ĄłăÈ:’GÚ šÙ»Ÿ@vJIëS9čë,>ZzŽaÒŒQžžÙ߆–u$íËö‘{ì<^îôŰ;Ÿ‰»ç•U„rR ŰòŚÉO/$€{ ĂïȀ{zÛœÖeßêdJó+Đzč3ž+Sž‹Oš—­Ț™Ùüđ-A­QÚ3ˆIóF5°‹­ÄO0ćč1è|ŽœÜ•ÉîU‡‰Nü”Țl^’Èč#y„öbúK íhkßTkfĂ·q"1ï`=ă†ÉhæÈ†ăôÍèŸiò}Ś{è‰ ćtžęęŐGŠ˜ĐìżßeÔBŃJ5æJíÊÔj5]Â[ÜÖđ9>Ç>à3vŸ ÒŻĆ!íLŃÙÛcŻ©?d°ÿ_ɜHÌ$?œ€nÛzŠ?MÿŰîôńÁ”)l_ŸW¶>m Ïÿ~ˆćOŹÆbź·ŐKț.€Żńʶ§ŃžšIÙ|‚Ć?Y‰ÉhF„VqòÇł$~zÙŻOfö»/”Ê_ïÿ ß0o*‹ȘHû!ƒ‰™Œ–8”FMIn9oŒ~‹É‚Ț_‡©ÖLúÎ3\›ÂÛi/àæ lûÈ:úzŰOă ïBȚńB¶}Ž—đ>!Ź}ę{Ș.š·Ôs"1“kSXœù*ž~(ŠÂÛw}ÄÉ]Ö„cUjûÿu”źęCÉ>ščÎrÍ ˆ ŽpêÜȘs-űk]!§Ÿ…ą• ȘsÊŒu^šTm_áägùöÛžûÙŃ­jŁ8«”u żçóŸćƒGVńç™+pÓčŃcdŽ]ĘüôBfŒ4‘_~r?ŸIi^9žù &Ł™A3úń»}Ï1śăûđ ó&ïx!ŸÎ_ @ui ÿXđ5s=ŁÌâÌWy~ă\Ô5'we’Ž> s…•óÖb2š?w8œÁskJ„âë·¶ÚŸ@l|g; Ö?Æ»ùŻó^áïè=6–À(? O°yI"“…©ÿ5ž/țžeeo2öCé9*†ŹĂŚYŸ^ȘG‡òqƛŒüĂŻ0”Րșć${??b éÇ>ű)]ü=sțpÙGó[ôȚûéęÊr*[ÔrD-„­TerŒÎÛ›œÚ›Ć;S—S[]GѶÓĐ-U”UÂșßm±+sÓč1ŐĂxÙ/Ú#ûߞf{žűéAê uš5j~ùéèęutIeQ5«»‘C_„QSaäÔȚ,ȘJ Ì~}2A1țĆűóZâ|üșűćÇÙ€\[OùÍXÜun œÚ‡ŰaœÙŸÍĄőiÜł`,“u‘‹śüę'ődđŹț<żq.Zœ»­_ł”ΊĆ;9”7‹A3û1çśàŚĆ§Yï‰ZŁæŸ·ŠąqQÓROt>Z ćF*‹­ÓwX‚Ăû„pçS#˜ńòDŸÿË.Ê *š”ÖĂĄŹÒÔüŚ7$A-„­äâPVihÛ ­ÜŽóŒ3őcŒ•”Ä ‰à…MOąquœ–Ž9"ęù`W žț:Œƒ<pOoôžuę#ìïśÎ< @̐źèęŻ Œ8­«»EQ(8YDQŠőԿΌƒîWźó6ÜőW˜ÇX݉śË{ ÉۓEÒú4źKĄèl [?ÜCD\(“æÂ'ԋ·Ž>O~z!‡Ö§qè«T2æôunźÌÿü‘&Ooûśłah7|Ȏ۟FżüĆ„čJ*JÊșêŁZÔÆerZ!ZIŁÒîÙŐĄ<#śT‹Û2VŐòÇ»—QšWN@„/O,›Cu©ąŹŠČJš·XjHÌ$eó .æ”]ŁĆ–ńđr·{ȚcD4`„eßêd[WZGS‡śÆ7ÌÛ6Ò éë4Àzïò[?àčÈßóÍ[[‰Œłœ»§#H`èìx’7'ûh>Țî”Tđ錔Œ=ù#Üuź<ô§üߙWl“œ€țą(üë•ïűóŒdìÉbæoï䍿ágKfYë\șÎÜĘﰆiNJ)›O`1ŚłőĂ=-~żOæd8”EyĆŽȘOrD-„m0*|<_düÍźìđ©dú”p9˃kSlŁź/æ”ńrœę)â„ÙŻáËČÇŸàBæE~ńȚìöaìȘp1Cș2òĄAìùçaȚxßÙAńčȘKkP©U<öáœt隇±{Őa>yêK¶/ßGi~EUè|=őÈ üșű0æŃ!ìüäËû‚#ŽS”U©=Y„öä?^„»ÎS{Ïq.9%ł?ćŽûRuŃ@ÊśÖđM˜Ț•JEM…‘#Ž“Ÿó ™sĐêĘmł° œȚö%DÇ=>ŒÍK):[Âą{–ŁőrÇXY‹w°žŠ UÍj#Ż8Ÿąòb»2”JÍȰq­ê“Q !DÌêö€CÙéŒÓä”lnçœ_$·W—Ú…ZŁæéÏbÚ ˆôă\rŐ„5„śæŐíóè3ź›­îËæŰî­>›”KYA‘ńaŒđĘ\"ęluŠż8W­ {țy˜sÉù œÚ‡gŚ<ŠVïŽJ­âĆÍO2tvsÊ۰h;;VìÇĆUÃïÌ`üĂxdÉ,ŠțŚx”z…míć»?ï 4ż‚‰żŒƒ_Œ7»Íż·Ö˝ŚwÿšĄłăĐxćÇ/?čŸű)ÖûœȚȚ˜)»ʆ‡Ž&Ôłć·íŹž%„mą 0țËäVÙ_Ă őć©O:ÌPuł*Í+ÇM熧ŸăhæË,æzŠłJĐùzàè8`íČâs„ű„záêîü€ź±Č–Čë„'>ĄÎow3՚)Ë·ŰòđužÖÜZYGò(:[B`”qa¶‰]ț4íc’żKçț·§1ㄉŸ>#śÿű·ăÜï‹FżÏO»?ÔȘ>É©o!„h*žìÿ,Żï{Țźü|Éyv§íaLÜ­±FsnÒžšíF~7&0Êńㆮ^î„z5=zÛŐʅ ÿkî«„ OÙ&]ûŰ0†ÌêOvJŸíúwÌ Ç1 —Œ6ìÛäPîٕi1­?ڗ#j!„h#‹baÖ·ă9^’jWźR©x`ÂúDönä•âFc1YXąMû Bˆvą đÌöGÙ|î§Ût‹cæˆé­š EÜxÎägČ&qŁÁa›VŁeՔ șöŚ"A-„íÈh1òĐŠi-Nrș=Ä/˜'܇żwû„Cîb[ò§ë„«Pń—ń+™=«]ö'A-„폏¶„§·=Â=N·kĘܙ=zœ#{urÏD[ŐÔY·kœÓ™ÇÜ5ZȚ脟8čżŸ”$š…ąXêÍ,JZÈÇÇȚuș]Äw‹c€qrt}šWŽž>ʶ䝔W—;­ĄâꉟѦ?Ÿ]ś-A-„hSÖŚŒŽ{>Ő&çÓOȘŐjvÀűcńŐ7o©FŃyE!őlۓwrŃÉB—ër‹Ç-ÇÇÍ·Ń:­%A-„ìLyó¶ęŒÓć/ĄQkÜ3±ńcđÖyubï„3 p<ë8ےwRTVÔh=”JÍŻŒÈŻŸ„ŠŽ™…N‚Z!:ÁTÍË»ŸacÖWMÖsŃž0ŽŚ`ÆÄFïŃű4œąăœÈ9ɶ#;8_RŰd=_w?]ÎŰ.“:Ž?ÔBщVgü„ÉoQh8ßd=W œ#{۟]șŁQk:©‡·§ÒȘ2R3Ó8š™Úä4XGuß5ƒW†ŸÙæ{€›C‚Z!:Y­ĆÈȘŸđaêb.›7-}Łû۟è(§‹Tˆ–«6V“vö8)™©N§țtfbÄ$ŒÒîƚ"A-„ډÁlàłôe,Kû e”TjÈKçE\L?âcăëàȚzjMu€gŸ %3•ÌüLꛁŁĂ'° áŐv™À€„$š…â:«6U±òűûŹ8öuÎoęq&À;€ž˜~D‡FŃ5š+n2ă™S%%d_Èádî)2r20YÌÍ~í°‘,ôß ف=lš”BÜ *êÊYqì=V\A©ńb‹^«V« ó%28ÂöÏë6=n©Ż'ÿb>ÙrÈ.Ì!ûBŐÆê·34dÏ x‘Ńá: —-#A-„7sœ‰]ùÛű&óKțœƒÙq.éæđŐûATH$‘ÁûĘrŚ·kêŒä\ȱs^q^‹Ž˜ê馇1ś2#ö^"ôQíÜÓ֓ BˆXč†­9ßńMævæmĆ\oju[Z7w}ńóòĂOȚ?/_üŒüđŃyŁV«Û±çíÇXg€ŽČ”ÒȘ2J+Ë(­*„ŽČŒ’ÊJ*JhKˆuŐG2=æ§ÌŒC/żŸíÖçö$A-„7‰ČÚR6Ÿûšo2Śpàü‡”ŻÛB­VăŁó¶†žŚ„Śûâí鍛«n.źžșžáæb}ÜÖP7™MԙM˜Ìuԙêš3›š©«± bk0—bŹ3¶Óoi  bjô,fÆȚKB𰛚€œHP !ÄMè|u>[s6‘ta?Iö‘[•Ę©ûŚš5vîîꆫ‹+n.֟őőőÔ5a“čÎúÜlÂd69]uȘŁh5Zâ1(x8#ÂÆ2"l,ŐÍs_ș”BÜ.Ԝ'©p?‡‹ö“TžŸc%)m:M~3 öePđ0ßÁàáôóÇE}󎈗 Bˆ[Ńb$„ű0I…û8\t€ĂöSV[zœ»ŐîÔ*5=}û08ägPđđj X{ BˆÛ€‚BNe9•çÈ©șôł2‹œȘsäTkńí`ÉEíJ}ú("Œąí~ÆűtGïzk߆&A-„‚jS•5ŽŻ óŠșr æ* f5&s55fĆÒŠęčkŽxžèĐčèĐčêŃčèđpŃȘ §«W‘úh"ŒŹȘ G­ș1G€w j!„-Vg©Ć`źÆ`ŸȚ&Ă„ÇUԘkpU»Ú‚ŰĂĆóR {ąsńÄĂEw[oKIP !„70ùJ#„BÜÀ$š…Bˆ˜”Bq“ B!n`ÔB!Ä L‚Z!„žIP !„70 j!„â&A-„BÜÀțȘ=)ĄŸÍIENDźB`‚passenger-4.0.37/doc/images/typical_isolated_web_application.svg000644 000765 000024 00000021246 12233035540 025525 0ustar00honglistaff000000 000000 image/svg+xml Web application 1. HTTP request(input) 3. HTTP response(output) 2. Processing passenger-4.0.37/doc/images/icons/callouts/000755 000765 000024 00000000000 12233035540 021167 5ustar00honglistaff000000 000000 passenger-4.0.37/doc/images/icons/caution.png000644 000765 000024 00000004772 12233035540 021523 0ustar00honglistaff000000 000000 ‰PNG  IHDR00Ű`nĐsRGBźÎégAMA± üa cHRMz&€„ú€èu0ê`:˜pœșQ< xIDATXGí˜iPUG†EÁI9AKQ3ÆÌÄ0STY#E4–[é !AŒ+ˆqAÜ0ˆF0ê˜e"‹ G-ƅXn%a2,AdńČxe“EAÜp?ʇqȚsû¶—ËêÌùuĄú|ęôûœßŚĘÇèć˗}ȚȘ@oŐÓç­ąQÒő .xS…źŒzđûÍő~# ČČČĘ»wő,]șôÔ©SoÈÔ{ äääțęû·ïțțțoÂÔK ÄÄD“ŽúW@@@Ż™z”`ddÄi,>zïÇ`/G›1"_PPPï˜z tìŰ1ccc>·Ó,«çő)rĘqč9{ëê"SHHH/˜z߯_?>ë\ۏ„[)Ž2‚VìŁeĄrÍ!śż‰L{śîí)S€>,ÒÌÿ|œÔđ+­ˆ ćûäČPz-˜jèőžŻWL™ÂÂÂzÄÔ] űŠoߟ|Š…ă h*#ćr­6ZùêZș‹VĆl^6QdÚ·o_ś™ș'Òž8N€6rE$2ŐڜÜÚtBź?ÔÚxŒ^ĘMKvҒíŽ"ÊÛí΄ ï&SŚ@kŠe 4ĐFźŽ„OłŒ<lóq‹śȚ°Üș%ڇùőŚŽì/W+‘)22Č;L]EGGżNó 2%WF)..„51čȘˆÙ‰šCŐ[è•MŽđ+ą Ú°XŚ gÿțę]2u!ÒŹ\8UĄaڔ‡ÉeÁŽ*Jő[Ž”ż„ȘœIĄ)XOòڐRżő G‹:a…3u„Őˆ3yžLŁ·Sie”\kk*V†ć]< ÌŚça¶§–Æ“æŻ%y«È敀仔ó,DȘ˜N˜ Ąˆ4k—XƒŠMД…(4?zÍOsć ițÁ ‚L‰4č_’Kn€hۚ/ț,2Á—1ÊÌÌiÖčMWh  *Œ<ŹM¶ÂKŸmŸ™À;XÄi(ŽQh–’œš}<œF‰Lùùù™ôpŠÁ)‚ż©Đ4ț»FŃF›©6šŽxGëĂ€ț&m;‰ïòqÈÍóP2•»LцŃ\œGȜ„BïUŽä‘wíÚeđü€”ššÊߙ:ț/2h”~źu±6Sè~Wm”~SŽ””ùùšśŰ+qßM'ŃdΑ2ì„|ϱŠ<>víEê š@•€Ő&™Rzń”@YłG.ę^é~Ć *\Ÿao7ŽÍń[ʃ Íb’œ@«Q9H™ŸKé¶RșÍߗéŚc ß5ł”š*UŽčmüšBó-2Eж„ßl&šíßïXȀÊO-`™’r\$mŠ$•3Q)ڐt;ĐHi36ÎÙ3…WœHÙ;6đÜÏ ‘ĄÍU?­6 ŃjSŽ…Ș7Sm…üș…żŸ¶„äș‘KÌ7_HY 6öRh>%iÓSÂÆ˜ l3œZXXŰuÊ0"00/bÔÈÁ—7(.†oJáhó -òĄjô⍠!JżńXdknń§$w)w1h$h“iO2ìˆąÍôŽËqïòÈĄĄĄÿŐ>zLÊ" 6ŒżùțpÓÿZ!+.ȚA‹żĄjĐl&W6҂ Ž`-U%Śì’ëZòÖŸVSȘ9DŃŸù™șűŁŐ”1:;:Ž©©‰é1nŒfäH]ȇp>ÖEëâ6m@CòŚ‘|Zæ[s5hçVûyNVI!SÛ*4*ENă4u_Ą©©iNN„T–ćÖÖV=&Ă@tęúő!CtQ™ț.9b.\ŹdȘpMȚj„ŠòWÿçJ6™éă§éŽÈŽ!ŻŽčkő„ĘpNƒ«:ËóçÏ%I€ô˜ 1dŒ»qăÆèŃș­qÀ;Æÿ úŒj”Qú;É]ß4„» |Wč­pűPë›Ù\›Ë?ő^đ>§ÁaÇ·>~üűÙłg`"„è1éqŒĂ êëë­Źtǚț&}í±Ąù«Iž;č ôbWTű„Ÿm~Ú>¶áœ2Ćj Ÿ©ęeą‹.ï88àۏ€ÍÍÍ<àLz:u„q/^Œxúô)tš0a‚°JŁÈ­“ëÎĄćhw†œEÛTŽZsšIțò·đcÓŠM„„„p˜àh0=zôčƒHą™^âò`ô„ȘśȚœ{ŐŐŐÓŠMăŃq'‹Ù6©îì\’œˆdϗ.Č Ÿ-e|&„Ï"i3ê~™ćm.ÁûžșșȘTȘ‚‚” ąĘșuëîĘ»țäÉ,›‰Äf7 ÄäȘXVƒ5áomm-źxŻŚÇ”§g3mxśc™:ČĂÂÄXw“Žłł;sæ Œœ••Ć˜jkkoߟ}ÿțęö"u11@ÈZUUUII‰œœœÈžțŻuÉł^čx–”64I~ŁŒŁ»ŸLž<ùäɓ§OŸ>ț|ZZZvvvQQą1‘0ò f­3 Š€nȚŒ‰X™Z­vvv~Í‹Ík­„ Đ S“R°i,--9râÄ | 8{öì… 222òòòÊËËîæ Nș8+x€Œyš„„ë@ïź©©Aˆ„ ÈĆĆEdòpü :a *<Ùô3ĘśssóŰŰX\œq§ă@ééé‚ÄêÌC ˆ3a(L‘°ŰfD ââbDÔccțûuN#†Ö}1bÎó@IIIđPJJ hrssYʰHDFłÉ·‘Î#R‹Ń`B9€ Yg:!"âzzzŠwQ333łàà`Đ@|F‚{)ž+ÆˆS" ÂČČ›u‡[‡˜;Ź/łÜĄ@***Xî|}}Ć-c4hÎ G 3 SŻàE±±f#ng^ƒó&x… 3©6?~üž»»»­­­Í̙3qÊ9xđ j BăÁI•••à€*xŻłēĆäᇐ.nź\'0aA,}ˆˆæW “Áè1u„m8 ÛaZÆŁÁÂ4l#ÓkĐ⑚뻜hs(Ì€B\fvÖ6±zÌ «B PâOüb°m „ŠW°,‰íóâžÚő­ę±R/}ˆˆžˆ8Ô-Û^˜lwîÜÁüÉ 8ƒÀÏAÈT·îeńšdd°!â2oĄ5°ŽDFÉ~đ‰ùÆ)3ôN‰=K-2‰GÌÇ6%ŻáöŻtÂŃ]Së fpŽÎÿÙćśœÿví1ŻüLIENDźB`‚passenger-4.0.37/doc/images/icons/example.png000644 000765 000024 00000004462 12233035540 021510 0ustar00honglistaff000000 000000 ‰PNG  IHDR00Ű`nĐsRGBźÎégAMA± üa cHRMz&€„ú€èu0ê`:˜pœșQ<°IDATXGí˜yL•ÙÆG–Č^dAĆ •‹ÈV—č,ČyY”ËGk@1EG‰qfüc™”ÄdąŃŽŰ±IÄFˆ€S·èž‹û‚[wÜm­»öwΔ°ĘÛi§±É<~Ț|čœó>ÏûŒïwÎùïßôAA>ú Ôˆrę,Ȉÿœ~ęzƌŸŸŸă~9>>țöíۃz5ˆC>Ôj”kÖŹùü'ÀgŸŠ †łgϚ*èúőëȘ­­-ęQ"`(zœŸšHü/š%°oß>S;wnxA7nÜ(”€ŽTĄ/.üĐë‹»à/œUX8«@A~~žDkk«©‚>Œ Ő«We$w‰ë‹ úŃËÜPXXP7ìĘü:.W—+‘“““S__oȘ ]»v!hćʕŠ ’ÒCùJòoߟ•‰Kï!ïCŸ—Ÿ· —ü‚\Đggeggfe dd€§s„ÓŁŠ ȘźźÎ™»xńbÈ+**Ž9rțüù˗/———ă}AA!‚ÈœaèÌëÎ]‡ȘƒȚëêú}mmVVV&—`ÏH ÒÓÓÒÓÒR©‚éÓ§“°©‚VŹX‹Uú͛7·~ęúíÛ·ËÔs=zÔȚ~Œpüuqe%äp755nÚŽ©Ąaóɓ'Ó ‡^+é§C?M`ȘÀ‰ää) ,0UPeećüùóËËÊ 7”š`WWdïȚœ#upáœȚ@1š››Ÿ?=ìŒĄeőęùŽŽvIŸ =HJJLäJLLHˆOàż.?ßTAóæÍ›3gŽ(|VÖwÍß]œzuɒ%˗/gŸàNKŁ|2sí… ùz­6čJöű‘{79Ü ,ƒq±Q11QQ1|mȘ úŁbQ…(zZÚłgϖ.] _êÇ©ÌÇû©ÓŠĘ»wpóɗ‚>1ńôéÓűŸÀ7_~ù›(‰˜èè˜(èA$ˆˆˆœ<9bČÄ€I“>PÓ +5:h#úŸ—/_òüO™:%##SᆝŻûö۔”äČČò/^(©755ŐÔÔ0æÍ›7Û¶móë w˜„&LȘ AHHgç5“ápUU•,{RőWŐÌ9sæÌÚ”k艋ĂüXVNîÿ.±uëV™{$„áKÀkŚźyyy9ÒÁÁÁĂĂY!AP«'Hmo7.ˆVĐh&-ûtYœRűŰŰÙłgóŒÄÄÄl۰A8ÙÒ҂Z™”€”0%{MĄÛÛÛ·lÙąV«==ĘíììŹ­­íííĘÜÜ|||0LìÔăÇŽèÏć?¶­­Íž ’æÙšüue€Rś OŐč0ŸÛ{„°>4TIžŹïÜžq‚Z4ÚgŽŁŁ#š88šœœF5fÌ?öz__.Ÿșș:ă‚XZèĐčŸÌUÈ5”]pk&RűЉ’=$XzóŠő„«eöțÀŚÏŚËÛÛĘʝÂI«llmm© «‹ ČŒŒ)©—§§'Ęi\í2sæL¶ Ùvp rÁ-0aÂx ˆ»ô55żmmi„çDö2uí=V7W7t ŰŰȘT*'''gg—ȘȘeÆíĘ»7;''/OĐÍ.È ŒđóóćÂro/O‘»—§‡'íìîîáâææììâäèhŻRŃRVVV|ÚŰÚŰÚÙŃ^t§qA«V­bs jąë śÿ$”šŒ’œ·€—ÔÂyOÁœ»»«»‹«« …qÀ §‘\âyĂüAĐ/€òaeĆ b\+2G/IȚ: !Ê»Lœ›Ęr éĄVžvÁŻRÙ«ìímíe”DœŹmŹŃaiii.aanŽóƱ„łłòxu'.ŰEö‚]òśäNò z•J Ę삞ʈ YrIXX ÀÂÌÜÜ Œ0S^•yY·XhúÊêżRنƒäxúô){'űGêêëeê’Ÿ§S%čèÈ-,,-ħđÀÌLЏÁ5$ è§©ż Ž.ș<č?yòäűńăœ|ûąŒŹçéL…^I]ČĂo>,őàš8êżző Mœ&őđJČ3ŠȚ1ÿ•ÜgûNČ$ÿÏ@)0iHAœ@5Ú}óúˆÂĆ'_ŠŸEŒQ[c[-ŐŠiÒKČÉ&{ÉÉÙĘsΌÛ«¶úÁÇ Ă7żï2óÍțCÊoÏ*0ƒ ‡1& 0!F/)ĘŹžòŸëȚoŻűè~à0“J•@w61É"0+t|ąl>üȚśęäÁć·gÇAŒƒ„^ÍfÒĆòršßeś@ O%\\Ë2_ŐŹźŹè”Fê8ü^™wśšO~ô}?ŸÉ±țńNțŰäCy[ÄŃGŠljÍ.^ÊâőgČŰ%˜ńD,\çêșž\clțPٛ«T*ú.đHßËæóÏżžż ȚxÚăáa‹”Čűî\‹g' <ŽÍăËÓ J[]ò6{FC[—Șf ÙŐÌXćДw„R©˜[àáÇß:Ž“;zű‰ąxaJá(I76üz1à©=y Ye ¶ś;|w¶I>mcŒa[Ÿ"—Vâś+I»kÔ6NŸœššŠŹ^ŽżìVêűŸńŒ{šŹș‘fn©Íc»Č –!plÁ`AQùkÇî9ïËJ‚źÍÂJ4ș’ìœâKVù­Œ“Ëćžzv2#¶dĄj­˜}fŰ1Â¶nŸ±/%)flÎ/†híHăX]æ–”ŽăȊßÚÀ 0™ÏdэiÛìÚî22”Â’ÿŸ‘R¶ő;<:žáóŸÌ,h†iZd„Š>Ń„’†Č4„]ÍF˜0:”bśÎô=ĄwÊέ)öŒśÆ.+A ì kË)I LeÒ*ąh¶&FÒw„?±€`ÿ.›#ćÛeBŠ<9ûŠQł­XnÌBÌF§IÎł8ž/‹ëôÔM=€ŰHvô«Àÿ.UË ‚^Ç-m0!șłčx‰Ë„:œș %&ÀuzƟÎH>úŠ7ÿàM˜Űż-ÀŻ—oFKœŽÛÂÄŁ—€ĆÆŠK„w+ÍlôŽ7ś/‰m6˜€*u°$•nVY:kZYç†*ËÜM»GÉ];!­\;Á±D·ŠmÚŠæòuyÊź+t|"é4*Yg0°5°%”ÉfGÓ 5ő@ăÊ6cĆcĆIÓ 5ĆT›álÏ^%ëèözà&Ë' Öêšp€,Ż\cï˜0ńTiĐ&ŸŠ‘Dœ_ì0ógÈWżmpu”CVEdˆùć•‹mšAϊ±EÄâő`ę‹=ⳏȘP©T̎ò±čNÄ#Z'#Ûû-á9­5‰Ö(iH)CÊîp{]qaĄ©kk™țäÜûEqíĐșő.«Z͔fĄ=Ń܌GsiE_ÎÆQÇÿReÁj#âÌ\ƒ„•æÌ`|úxIV~V}ßOn+•Š94•^«™ŃӍĐJŻ4ąŃÖfìžv,2ž-%R€1 ”ő€łó›úüBkŁ^o~џœ{ÿŽêû~tÏłžžž–@æ /Œeö%šR ç<Ëh…I['șjÓŸà&Ë'wË/–ú?È=ûvzzZN5-6E©„ć”äZ w€–Šæòő‚”șŽ€Đś}}'ăoËŽ%v\úIENDźB`‚passenger-4.0.37/doc/images/icons/important.png000644 000765 000024 00000005141 12233035540 022065 0ustar00honglistaff000000 000000 ‰PNG  IHDR00Ű`nĐsRGBźÎégAMA± üa cHRMz&€„ú€èu0ê`:˜pœșQ< ßIDATXG͙iPUGǛ,&ƶŹ$ ”~ˆÍąMHˆ ­ #Č ›(Dö Èą2*F7á!`ˆCčŒr«šàŸ îŠq‰ăšÉžëèèüŚëÛ|X™Șœze]oś=ęïsțg鯿áÇâO%úS‰x64<űo‡Ü»wï?*áżŒdôÙÔêĘŐŐ/%”KííșéÓ& !Yœ{—úûo)+»víڝ;wžY)PjăâÆńNNK’’.^Œxûöm`uŐZÖB/ÚŚZ€"‡„/DŽŁăæÚÚ«WŻb­.9Ń*@ÒG3 RŁù«kÇ>òšz4FˆżńcQŃć˗oĘșeœ©ž4Ož„"êőą„#D”ƒĂTÿ©©99s}|˜0áčç”iŃsŠöم nÜža%Ч2FƒG4B„ÛÙi4›7onmmmoo?Ę!­Û¶UÇÇçŒęvrśî–Ä]8tèčsç ;áűTJYdŒG„ ‘>|8PŽ=ú‹)9Œs'á–ćì,­%1ćúé™3gŹÁdI4fqAÁîĘ»± XŠ±csúôIzńE‰)LˆĆqqgϞœ~ęșeߙ„a1ŰFco_WYyüűqôZ#?WTd?b˜Æ QWPpțüyűtÿț}sŸ3HFž66VACwpXQ^~đàAŰ`œ4LžœúÚkRÏ·BÄŰÙ5ët2Eá“9Ùh€xăF ,fsĆÉÉđ—ęuUȘŁą&œü2Úâ:—æáqäȑ+WźÜœ{Ś€‘ œTŠrv63"bŚź]żš’ŹŹ,___ooïÔÔTăqțűŸ}ł–dÂï|Atô©S§È™&Éô éŹŐyyŠy"…HòôÜŽi,F»$''GEExxxtïȚ=22R™đO•ìŚéŸë­DԒHÙáæŠ&ĐߌyÓ8‰?ˆá_SĐ`dČíȘšš¶¶6őÊłŸŸ_pppŻ^œ”†Š!(b,?Š„„ÙÛKÍ Ćʝ$qcÇ=$#«:&FėùÁÁčÉ5x9f̘(hxű—čtéÒŹ>Jzá”cőp!V–”QÉLŽ{ .Ÿ?zTű)---DžÉUˆž°°0///5 ęûśł¶Ii]żžÌ„ăd”LpsÛ»w/»’ŐW‰žN@˜ë©ÍĂ&Jbc8`n"%$$€OŸ>j@xÁ‚”úúŠ;8HvqÚââ'N°»yH<Îææf‚ÜÜ 5ÄK ÒȘÓQ键”èê  :-éIöücêTĆ_ôĆŃŃđΜöß:dÚŽięúőS,4pà@ùȚ‚,9râK/±Ę )ÀŰHz@žÌpq‘€ôæqtÜČe 6Vę»J,X0bĉ)&&F=jòùĐÆJ=)ïż/ƒ&É<)dîÁ˜ŠyÆŃ0„„@Oÿ6’­[·Ž=ÚÙÙYÒétÆsŒß, RŒ“6lŰ@ž€èʧșȘš( ˆÜƒ%ŚÔŚS°]đ΀Ž€"IŁȚœ{››fđ~GMÍśoŸ)—ĂHs(JpCvKQ~3œć ÊrZÿț{öìQްȘÁkžžžĘșuËËËł>>ööö2+b!eH}bîy·V;ŐŐő±!ȘȘöíÛŻI‡b==áČ5™‡† "ŃđÌ’ˆ•‚ËŠôí+i\\***š!tz U§€Èx!B„hZ¶ŹKȘ%RH—döÇË(Ó°Üʗ/_Ț ˆú°©ŠFIŒdê !j33­Ś.oźŹ—SÍÍe_ùÆrQZì€Ï?Śj”ŰXï2ò#gżlOOvâGMnHLŒ|úŽ…•(=]’=Zm©Ož‡ÇwŻŒ"—#Äô파•+WÒíèI chRŚ54LČłS0©f}đÁ†ąąö–őÚÖß»ęvæÌț††ćăÆqđ˜æîÎżê« ~~óçÏ_·nŹúҁĄÈΔK—N|tÊ4@6áùç3œœŠșč- Ș‹‹ÛZZÚúÓO?wÎ/ćŻZŁ©?ž8â+ÈK€y•”‚8Ç0c;șŰ_ßÂÂÂêêêíÛ·wfjžB~äڀä#3?ùÄ€”—»u›üê«0 ĘŃŃÂivvú3kÇqLq Jű·NNCCóóóËÊÊHÓdEü„ŻeČ…ÚtI4\+Vʘ››æă3ĄgOËÈŹ•Æ PÀIÀAśíæ6ń›o8ò•——ÓÖÁ6í‡laIČӎ;ÈâÌ+..ΉŽNțđĂÄG­íS ,OS/A @DŰڂc‚Ÿ'œ™3g.\ž°źźŽ{ŠĂ‡Ó\@ćΎQ’L‰RBŁ^L,rŸÍš5‹æ+CŁùŽț|Đ ÈwȚ ïÛwŹ­-Û5űI_đÓžșò‹ts‹>|’ż?§V쑛›;cƌyóæ±[bŠÎ•8§ËKHタ‰“+ù €änâŽ;Š;wòÙȘU«àÖČeËJKKçΝ‹RđM™2%;;;##ƒĆŰŽ”ôôôÌÌLÖÆ,_PP€%æÌ™SRRČdɶą‰țP^b CšOű†— ŒA)`áANLŽ˜”­@yźhíÀW__ÄȘȘ*ö %—>)@ŻŹŹ$pđHccăêŐ«á,gúÊçɓ'q{Š{”śë—2Š/Źäß ű€„ïX•k .Q‡ćĐK!dÇYŹj!€1-{ •Đ “uÙ  -e —=K_™œc”ł•żfłĄža< Č67Ÿá%CLÀ l§đ! p,y–ïџ~O-¶êd)•í€čFEŽ*EW"0y_fœńÿŸ đh™IENDźB`‚passenger-4.0.37/doc/images/icons/next.png000644 000765 000024 00000002426 12233035540 021031 0ustar00honglistaff000000 000000 ‰PNG  IHDRÄŽl;bKGDÿÿÿ œ§“ pHYs ?@"ÈtIMEÓ )ż(đŁIDATxڕ•ُU‡ż{k™ȚȘ{vœÚbpƱ'“ˆ1.T_Ôű Ä .o@#Yh2™Ńap˜îY{­êźȘ{}˜ÈIÎKĘ:ßùĘÊŻÎÜ'2X Û@u u 4 ]Ž·T1ßÍȚzÿ=kĆ} ë·@ś H#Ź8ȘVE‡ŚĄ‚}ęŐ1 Œłžp5ˆíÖۉxŹńĄÖ€\Öamk‰šri:ÁŐŒbrbBM\Wî1K—?ëÖߜ‚…æЇAìÂNnêYćŐ>‡źšöFC6scŠpyŒ]Èzńك3/Ő]±bHœùéăzß Xąx^éźD2ùò+})č%cÓì!đêš#O­1‰Úse/äűp•oLëüÔì;œ~ż‹ęÇu›bœÛÙŽ1“bó“–)(č €b6tG82èҕ–˜†4}Fńƒf±û°ZS-… ÊÆœÚ3ë…Ѱó‰ŐÉÈŠŒ…”PśžŻšùж”AșÍÆ‰J–7›ü2X#f+ü@S4Í I„n2:áwN„+–1|ĆÈ|tÚ¶;Žóì‹=qє€šŻń|Mm>ƒPÓìÌĘ"Ú XȚbrâ|ÉÜó¶QçrNÙ/đ pÔڀžd2%#…Č$TKÍ2U ™,†lÌ€h°í)ƒ-}qöüVÄŻŚÊ5Rtc”HHĆìșąH§%ЁéVGàÖÿ̀«"weŸlńûpm±Y{ÊàĘRŒ–šč4aąÒf„сa§M †lˆÇ,ŸÙŠbcŻCÏȘțO4;’ŻÙ|ČÆf@Č!*Îą+ŠžEź I·›„LŒ‘F}íŠÙÍȚzVœ·/ʶZaީɱ—L&„Ąw”͇/EŸșPgśŻ) RÖÂüšŁŒ™J4ÌJ“ÓF6›eKFȚŁ{„ĐAoșÍ$Ù·âV@ÂXÓ!òśšÇwG ˜Â_|Ç>ŚoNQ«Ìì?ìò  UęŒT\ăùîU i[·ÜqcÂexÔàÀ©1[±0êê~ÀÈhY•‹…3-jűk$9À5ČÙ,›3ÖԔNŸ.žæșb5ètb͎‰mI„€‹c5.ŽŐlS`0YđŒ\`|ąxș-8»3-ł§€I 4TőööêvÎMOéÎłڈMüÎR5°#f âQSJ€­CŠf* ]­ȘsŁ„òìlń`KűŚ—óĐ<àśśśßœA¶mÛ&ű oldâu…”NJŃáD(@É =ȘŒ‰7 s‡ÖÊĂǁ0ûŸdÁ@č‹ęó~çÉąH§1ìŽ(ă”lÔAMȘÊxŁŸv3eLN%ÀÔí{ï_9ÆExçŸIENDźB`‚passenger-4.0.37/doc/images/icons/note.png000644 000765 000024 00000005252 12233035540 021020 0ustar00honglistaff000000 000000 ‰PNG  IHDR00Ű`nĐsRGBźÎégAMA± üa cHRMz&€„ú€èu0ê`:˜pœșQ< (IDATXGí˜ PSWÇ«”ș­Ž3V«.VĆő…Êš»łíL¶Ő.K»méźÖŽŽUk•í ș(TA^ò,°ÊCQPy%òH!á!„— IHB’{“{ožśĘíc»_`Dgw;””éÎô›ÿÜ9śžĂč?țç;çܓß}śĘ?© ŸT<ń“ąq ŚÏ@“805‡ž\źŻŻïłcžvƒ§Ÿ{ù‚ÁĂ»ŐŒŠüwû+žp §—釁đú‘ęŸȘw~+ÛŒxhÓłÊ-‹4/-…‡g™~( ìóÚ=o y?«üősê–h^ú„n›GïïÖAŐ?ÇbZ°~($ ü‘ P^\ą}ÙCżíydû Ł'~`T}óÍ7ăL?kr XÆg̘ńÌ3ÏèśŒ:òЇțőç‘+LŸžű;«-ïŻ”Eî…Ș[êĄę̙3Ÿz,æÎ ܋Ç óæÍû>;'‚ȚvùÛ^Ÿč}s%滊xw e—yđ%}äÁƋt” Ê:Ò(Œgkżïè|@včDő<Ô-Wîę;Óz@ś/\žđûŒœțO‡źì\Ü.È_ŁŻ§ćOëm»7țÙĐ?PÉGÂ|_ûܧ$UŸË[‚ÒSvùJE«ąiUì# ÇӚ/™‘,V— bt90ÊÿՀɁž~úi‡Ž«íŠ9àÿ*0Éßóví`’#Qżń \œpöì'…ÜC·Á†î0›,€He „ЧÔ)ą”™Œ.5\a‘BžźZ”ê«ŻŸrhțüù6O'MêćGy­őxáčù æÍœœfYöæ%M/.ĘșÉŁŠ`ŸŽáˆîÖ)ó ĐÄ‘ÊłÔp҄hM:žN€È‰–°h‘——ŚƒÜZČd‰ĂP€Ë%‰yiûgϞ†íËAP˜5kfpÀ¶’ì%UAjI8>CȘIU„NŁ5Ybôù,Đ9N#ډrŒœœGGGĘZ±b…ÔaòóÊźŽŽșÈŽ˜Ę[6-{jÖÌYO΄ɔęć5Á>ț|n`oăúžh‹,ŃźLĄ4ąGČ}‹–9MNS„ÓÄÛČeËœ{śÜZœz5ƒ5⊌ážÌ~üÍÒăŚ/ÈIÚęźÏŠużzÎÏŚ;&ôí«™{›čG€Í'â(€/Ń"Ou gDŽĂuÖXî4U;M5pĘșu«û@ëÖ­cqĄ*Đő_§”VŸźčXœęiVüźÓÁż òÉLű°4ś3>7x@©î:kèM2 ŠCÿ Äsb5NŹ˜6oȚ|śî]7Ú°aKŽZ5ĆˆìŠą3ł§9NÀ ­+ Ș*ű śR@IÎÁÒ܀êkA⚰~A”B?ҝ‚ËÏŠ 23h%cⳊZ«g±ZÈ!śÖŻ_Ïâ"«ŠWiûrd’”îŠ3’a-•!^H ï QőÉÎúˆî†3ŠöDeGČŸ7Ęt;ËąÈsŠÇ5( › VżqăFś–/_~Ç,¶kK-êbôöeMÏ9™8q°%¶ŐǏîÆö ăäâDő­Td 8o”eCÂÙ5…”Ÿ„BȘÇE#<b0!‹53ŠF˜öî-[¶ìŽEBêčuĄ*DČuÒtmwêpWŠŠ;U'ę›¶;]+ÍĐśgĄ·ł ĆEEgż2Š4Të–đÂM^ČUWG› ȚÊàk‚Œtșkë" <»ŸÂȘ.)œt\ۓQu5€žK ›Ő„eWîŹ. ĂùRaêĆsÇCì–Šò(ôfêÙÀŠkqüœ€˜Ă ΧˆheL‚”kŚșŽiăú{)mȘŁ5v-ś|Êç©1ûŠ.ž(čt’SȚ/ÎÎJ $Ԝô„#RŃćÖúŹÂ܈Šąœ ;ö‘©§ŒŚò"iBÈàb†h,XJŠÈŠáp Â>ûŰŚȘ)Ű—›țŚAIźYĂE†JÎFpè«zD—«J“Æ6'F9úINF82TGąÿ P[}bHĐźq  ©A_ę@֑@yqÌ©ę. Ö\Na4]ˋhŹLłékƍÙÚAȚôÁŽóű9ô”êȚ«Gÿüț8PĆŐH ˜đ}%ùá‘'>ém» @ę’K…č§èBÚqIS¶Ë*äŠBÊ’0„äG ™Ùl~û­ŚGÉA'ŃL›(ŽÆĄ+7 æÛuŒ‡ȘÄUÜÉ%LUî0ԐH-źźŒÁI†Œ±êŻ]ŒÎü24#阠.‡Æ Úł îçP__ß^żQJî$Z•0UÁśš][dÓ\·jźÛŽ%v}]WmŚß Ń:­'QhÓDùdRX+KhąƒÆ;ÈÓÓÓÍœ Ž8'CŽÒJ§Yâ$ÚŹ™Bo† ‡ŽcӖYÔ°Z–Y4‹†k©€ń" ., ˜ÈÔ2!“0€Btžźž>ĐÜJHHHK čÏ ;-ŹYÌ`|xŸCWiŚ•>\fR‚ PnŃV‚U˜=ÂG2”čPˆ[ŒčÛuĆ;`at( àPyqÚ(ŁvZ:YBLc‡ŸÚ6Â#†+ŒJ."ç rźQÉ#Ô56]­ĂĐ@ąM€ š…ÂÄą‰NÆÒĂZûXK/cî‚ÍŐ –––5kÖ8ˆÛٌ†5w0˜ˆ2ńI€Țaža©&ÔUšąÂ +Ą u€`=l‚ăiMˆÂ:K7k–ČÖ~§„Lrššš(üDÀ(=Ì]ŒčÂE* ‘F‡ĄÌ0kjLȘJdšž”éê8ħĐVđ†!€ ŒÖÜËà]°Ûßčsg ßC㇩'NŽ +Gi5CtA&RŠVm&‘ČëëÀ€ÀŐŐ (À­]_?Ôì/“˜":'ĂĚ{À'šžEaí0˜NçԀ€iéÒ„ś( qÍ U_ćPwYé•Ű̔c‡öżwpï;Ç}êÀőŒÓ’‚Áö@PÀ2eÁôžčæÖ.—Vp “,XÀČìԀŸęöە+WȚ%•ù91—ΟÙé·ăH`Àé“ÇââcŻ\ŸxáüčÄÄŰűł1íùŁß[/ïÙčăЧïƞ(+ˆSô”čÒèĄäĘćüșܜsá'C>őÿà­íŻż˜ŸŸ?ć!ƒ“%€àÌ»hŃ"??żœœœȘȘ*>Ÿ/D"Qss3ÚÚÚ ńššš 6444**ÊßßΜ9pŒÜ°Ák\Â>>>GÍÌÌ …2™LŁŃÜż AÓŻżțÎr4MĂšÁ`@ÆBŻŚŒŒèÆbü!†aĐÆn·Sía,†±X,އUĐÇńń–$I‚=Đż;@Đ»Őj%Æ ĐŚű[á•PęBÀ— ,*đÿă±€‡°1TAÈâ‰Æpކ”˜ĐŽüúäF'“ÿŰàF§?æO~šÌœŸúżsè_Qű˜…,#’IENDźB`‚passenger-4.0.37/doc/images/icons/prev.png000644 000765 000024 00000002504 12233035540 021024 0ustar00honglistaff000000 000000 ‰PNG  IHDRÄŽl;bKGDÿÿÿ œ§“ pHYs íÀ,tIMEÓ 4ïÙžŃIDATxڍ•Û‹\UÆ{ŸłOŐ©[WÒĘvȘ3©tš0“‹ĄJ‡ 3Ì CŒÆæ-ú,Bđ<"Œ/‚ DPŸ$Ńq’Š=éÄL ·NÇtWwUŚęr.{ùĐIO4‰ș`ż}ëÇ·Yk)~ąJGç È$Ű")@ˆ]6¶]ûwć©àaœê' A (ąL;ê#ńM`^ÙèÒŒ{ȘR©Ä? .ßêŽy9“Nć·MäôÔx’Ę|s„‘ázÍȶșj­ÁÀFƒSFșoí—ŸŹT*ŃÁ„Łó;AÀË:đšÏÓOdÙ·Cx$opô†T€őNÄŐ搓Ő!_œ_'ŽżMŰÆë{ćÓwáΏœŸ“Éćț|űà˜ző>s‡„qűűtƒ…ë}źś™™JâhĆDÎeßNĂÔĂ”šLއêńșÌV•ę„j”*›àÂŻÇËŸôÌoóêčČÁ3š >«6yîw[ùęț1抓|tȘζ-†Q$ˆÓ[ ٔQ—âńa fšsŸ–ËćĐÙp{ö rÇەK*ކ Ž|ężO•óÆ=ŽR$ŃîišĘˆÒ\†číțÆÀDžU8{čKÉÿ±°Ôˆ9żœ§=HŃ!Ł-Í=mU,ș@„‹YĆ ° ËȚÙćčÌ=ŽàäŚëÌû˜WÖîüÊuA9Żè)t"2!͞eÿlŠÇçČ?hvƑ§·=Ü K}űü(„@'|eÉșwíĄa„%€’ă*~ie’Š“ Ô «5È;êŻô|ź”rüë‡v_~1x„_\Ú+âáPI4r» ÜlőílŹ|Î.Âßÿ!ŒùlËo8pì}X\» „1 ĘÁ$źiÛ[ÖÆ¶kÀ<ن5Žà9ÂR]xûŸ–”Άs߃7Ă#cĐmŒQd±6FILҍńÜÔ­Ëđr^nÜvnUߏ§Kë ò—±Žëg,2†\ZŠxlÖĆś[Òđ§ßXŸŒŰeK2`,őBČ^HڄÝőŐźȚ8±ĘY˜wž-é„ïŰ?«$*']r‰ˆŽ…!‹”či?ĄIĆé…&i/$ămhÒ&ÂU!7oŚőÖ?Ù§>~š9ŐjU~Uzćê(äŚÖÆ;·;*•P$Œ0 bk#v|țM‡F' é #$\Ary±mëÖ™ńű‰ŒúîĐÙ\BϔLœ.Ć3­»§ĘfČ)ĂÖŹ»čŒÎ]PoGxźÂsƁ”VÈù«-–WÛg&ŁsNjșú`­R©Ä›àj”*‡Ê©F]fΔNj”Îtú‘—t#•ö]\­Ń Dbêë=źśí„ĆN·Ùl2_8qZ«T*á/ȑ#G4>Ï_ÿéÌółGkUÈúŽĐÄCۚËđr2^ùt·țì4°4zAî+À«Ć3ù¶*qŒą‚ŹÂj%ŃHÛȚr^nÜsÖ@T*{/ă{hŻRíhĂIENDźB`‚passenger-4.0.37/doc/images/icons/README000644 000765 000024 00000000342 12233035540 020220 0ustar00honglistaff000000 000000 Replaced the plain DocBook XSL admonition icons with Jimmac's DocBook icons (http://jimmac.musichall.cz/ikony.php3). I dropped transparency from the Jimmac icons to get round MS IE and FOP PNG incompatibilies. Stuart Rackham passenger-4.0.37/doc/images/icons/tip.png000644 000765 000024 00000005052 12233035540 020645 0ustar00honglistaff000000 000000 ‰PNG  IHDR00Ű`nĐsRGBźÎégAMA± üa cHRMz&€„ú€èu0ê`:˜pœșQ< šIDATXGíXmPSWîNű©3úËÎŽ2Ă(ąk»U"Ê7‰@ä; ùț !„BBÂ7A‘OĆ NŚYșłNÙY­”ÚŐ¶춊ÖČźłu‘Ù„ ": ]Ś}n\Â%@wÆ{ÇÉ\/çžóÜç}Țç}ÏùƋ/ȚzŁ.zŁź·Ț(4TžțÈ «dè?źëùóçÿv]?Ï]äżxNŹ‚țÂ2XrffæÙłgOž››Ëb±6lŰàççßÀ/îwíڕ••uêÔ©ûśïOMMa<Ț»ËdkY€+˜zhhH«Őź_żțĘ VŒ@+1È.k3Ôt֝08ź­8"79b%zÿí!ëÖ­S©Tęęęcccà ï.“-ï€đq Q0`"4Q‘im.šíÌ(iáćŐĆf”GHKö‹ś€›CE–EiBv”€°QiiŠJËÂx”Z=<<üàÁ̀yŒRćȚŸžžŸrćJPPĐ{‘É[KAS Ż [‚y…,Ÿi· ($Ę @{E–P±5Ll —”DHm‘2{ŒșJb:ÌætwwŽŽ‚*̶4Š„4]]]ĐG‚ÊlšqJ †ŠŠƒÓŒ,^ánŸ)„FR.”EÈì@%/V”Ć(ËśgŚÄÉ }}}›ššFFF ü„1œæm_‘Ÿh4•»ÒŒóÄŠŠœÂbDŠ3‹F^„(‹V– [UÁɹܗYĆUZéăŚŰۈđ-É3 šńF€ÀX_ŁŻ>ÆVŰ q…iĐŒ“éÂßÄâm‰†đ ibbTìŒJNfĐÄfUÇ©k8Rxßà ±ĂüÁ3 d4Ę$ȘÌĐ/Ga§Ăä.š-Qò€œé­'?țaì§éé™oŸę[NÙwb%V]§©ŚÔrł„„hüęęoȚŒ =a~ŹČŰ <B°„È)šhČ«fĂä &ĐóNpÚgêwŸtzf&»Źƒ„‰C ìÏ©KÈ­ËȘ ‰“J„·oßFȚa•Ćgđ1ű 2Vco„҄‘Msąn¶GËâ_yD“šu$é"E”wœ={bBà°#pL@„ž_X’^&¶xÈmèŚ•Û;“ŽOŸM30ęđ`‚ ÓBnšäŒƒ Ù”żŠHáńx·nʂg.&‰ q…ßËնfĄÁArašwśl’—v|tžè}$Lܜ:)MŠțPj~c8_żvíZ˜űœ{ś°CI ‘äBÚŽ…j%łQŠ·0·A ć4tn«*Ž•ÎŸ«7N=Á?çé^wŃÌBqqCĐ€säÖwwÖŐŐAIšwŒt[ńzúô)Ș&[šSÛÛ^fÁđÆ‰șqšmìŒÀhƖHùæٖpéÖh%e9sf“–ßÈ3æ4Ą¶|À„€€ ącEwi/DČ5\fŹÂäraXN?żŸœ«ûü•țkßĘœ7úÓÄ$ĄFh|rJdj^&(|cłÀۜŠ?šŹ DÔàIŒüg‚òŃE nsՕĂĂYpPŽò#ŁÛ `RXۙÜĐh [ÒM­éŠ–°ÔÈÆ{śî]Źè.Ł€„è°àÎê¶{„$LUƉșïî Ӏ†ÿùcӉo ęOzŻȚ ÙD)FašçƅFXÔ&2·‡„dûűű\ștéΝ;š$X—ž |ÂÜđ&Ș6čê6]èÚôûó_O^űrĐÔpê}nŽPWíꙞ«Ëîú„ÂTЄ0„»Ą™ÛÂRł±J__tœCEŽTJWĘŠŃž[pŒąlkŒê/7năżčÏDŃ(ŠVQQ›ŰÜ.)>",lOËC===4 Ú=0 ćW;ÁŠ{nS•ÒSANΗä „ùÍ_éܞ•°1ââ#@#”ćëąyh)—Ć4„Ÿ8Łž1.«’44„Șn“JéfÁ\Mí6v槟@ż=û„Ăa„‰J(ËQ©”CVr,IS%ÈÛŒyłw AíĐ<ștźÜ˜Ș«śŠx7 Ž’Ùw'éPP  ÖźÏæ‰)lĄĂDq3‡FnsÆÊÍ!û•\.Ś{–ž!`GšÂÒêQ4îŐ`ßdȘ9F'HĂÉO˜ÄžDƒ0ÉŹò’c ›Slnâk7Ûl6ï>Dœî‰g•¶Ï†iQAÛ +”àwg>§”}Ôă9Lsh”öÎdMGdXłfÍčsçź_żîĆ©I-C}Á†ž›Ź«‡bšö aòTè«Żoрș{&â4Œ0)ì@#+nèXqâűűű‹/zŻe˜šT{ ŸPZ[Ü+e‚ÖÁ°à±u`JxręùÛïéÜ&a‚„! MéqUىDuG\€™;;;—Uí1)é‡Đ©`?+HÉkđĐBÌŐmàëúă|ÈțőăÄ,1ną1ȘÒăe'űùŽ˜tę{áIžz{{—Û‘Ž膎û©UńK+„˂ѰÎÌ?ȚUڝ$·)blNŰÔÄNŚG Ž7nĂŚć:ƒYc 7+rźż_LFžQ7sűÀÔÔTdőŐț¶EX©œʑOo+)€„^€ #ÍéżvnÆQČï;!žoƒËwG|R—Ž{6ç«Ńd5Y?;ΉłViś!ŒËćžxzSV @72„‘ĄêGìŰ>~ŐȘUïG=Vź\ÙŰŰèńx`B4L‘đ—Ë”uë֞ž‘Ÿ„pCè°X,kÖŹ©ȘȘČÙlß~ûmDŠ@"ÍÆ­VësЀïáÇCCC `ÂC"2MŽă’’’DÉ+ß|óÍfÜ:€t‘üi vŃ0 $ù†u PÜn·V«œśtôőő 0Ăh4:FŸä?­^œZ©TNì§đ@ąo)Ö1###xuęɓŐDŃšûóÏYá.\»vm]]ĘLa€€H±4ĂĂðŸü‹/Șˆ$EÄêNI‘˜€’±dɒ ˜ä@"ÍæÍ›eŸ,Ę»WIÄȘ’(ąșRS%鱫­­ ë§1@ 1›Í‰‰‰ìŹF€0á•iiDÏ!pwŚźPŠśȚ{ŻĄĄ!”é đâmÛ¶±4ˆÒ¶êË/ˈBuˆèeąF;O,Q&Ń9ąòpRïÙĂ2‰u~ÙČeĄ~úJrrČÌ7 )OI)!bu”hțš^!úzÏ&§YïuóùGÒ~J4›è-ą Dg‰JÇȘcśn0ÉZΊ+d~ BŻŚoߟ=4R 9OtŃą”^żXYœ Ç(9ĂżàŽ7ڜ9’’ŹQß2ê5oùó"ąÂ±fÀ€;۷ˀL&“,vA țț~™o)FƒH)ˆŠÇ*†šOĘ<đÛ-ƒ™Ÿm©ŻTűÜ{żúș2»0ë€ÛÁùoÒ~0ïÉŁ7ÂVw>ęTƄڍy‡Ű‰œ%ôê«ŻÊ|ŁV«köíCBÈ>™tê€à2iÚsìj(Ïœ§S5Vœ*Îù0?ÔŻn:űÙÚę1}n”ÔŸs§È„Ś‹Ă`0̞=[„RĄĐčٶ߀IVÈs_§‹3ènUHÙÔPvJpX8MKł2ç|öAÁeçïUćeV_ÈuńÜŐšÒŸꃚhŹmíŸ|"ŃàÂïśÇÆÆ–”” ‚c€@ĘĘĘ]šz†h<Í"â jڐN{łâűȚuő%YŁ@7›•''2<+? ź=wÔn6ű~îÿh}j8ÛÚvD üü|€ò tIô©|ą‚ń%9ÍZMSù‘ÏâëÇȚÌő6Ę(;^t< @ȧke9Î!œÇi7j;ś$ŻĘ1šàŹDk‘IÊÍÍĆ€~„-ćM Ś‰,†»ÎĄ>MKć±”䶛Ì]7ź–-<’êæ9›Ą3;m òÚĆ ö¶Ő''Än'‚‘ŹDƒ% ŸÏ' "Đi"V˜ÜŹdÖ©‡ú:{ZȘKNŠŚgu·^U7UVä(:–îޚ8œúDÊ»IëŽzT”Ikçÿu E Ź "ę›hœ†YŠí0ő¶iï\očTŠșRq«^y»ńb}EQqVfgÓEsŻêTú6Ț€C✁b1ÿeFŠż4‘NI:Aô%Ń߈ö„et‚Óêś8^ś°_x>ÁëqÙ9ŁŠŁ„Ł©&+c‡Í€ćÍÚî[5‰ńo~D”ĂHČ6Z “D’țˆŰ§§äęëđôœńsg. ú‘^Ęä¶ ¶~żËűŸç~À{80 .—Ălè­È?6ĐĘÊé;șZȘ”ÄXÈZEn„â6ĐsŚïőű7" űjúWunб«ÉźżíáúȚèwY‡œźû߃‘À°ß‹Â͛ôÆ{-úöËwź]X·è·b”ź#a%%!L’~GÔ\[éq;aŒ_@M6v*Ï$.ÓŸȚ›6Ï­ßçä|.დ ‘€ĘĂc°êoßź/^·hR"c!k­äőzćłL\ډ@Lj$ęm5ÿ”ƒ3ú\vŽtÁítpƒÍUč‡wŸèăś5Ș‹¶{^ȚìsÙĐL@ó`dű~ÀôŹ»ĄŁíČ"!nÒąăŒ$kE l"!…eÆWDÓ±ÂjmDQAEöșl^·~Ò¶Őć€oە0ł*ï Șțäś8FŸûĂț€Ï#đ&·EĂiUU§Wϧ͌…Ź”7/ăĄÁCÿ$b…Çܑd3ôžž4NŻ“óșxgÒšjî\.èjȘèmmà4>7°bÒáÂc5  ȘŻ]>lő›Žé©…’©âEd DM§ÓaÈ ­q2öyYĂ=”XœV·}ÈÔĘbèžjÖŽòF RÇçq XS·ń^“úFم“©+_#„Lf€űkd Źèxž?żp! XĄ;țžèZ”‚7öxD&ȚŒ‹ÍÄÔ6C‡ĂÔ#ŰM(N‚mĐaê”hÛŽ­—•§ ŸÚ‘ô:}<ÖBŃÚII€Ä5/j9ÖùE  {XĄüż„%ßŐr›ŸĂÙnëŹzÓ œÆ=ԋŒcP°ö°hÛ  7«ò+sśçglȚűb°ąÊ,Ź_żѐvż‚ Œ™e˗/—í °†<ûÖ[X­Čú”hQCi¶MŚæ4vč‡z<–ȚQiŸ.Žh9ŃŸŃœ‘€òƋCipJ0cƌôôtlûA űtéÒ„ĄÛ0̝ +Y„Ąà}z™~8ö8đDż"Š'BEĆTÈ`T'ÒHŽÁŽ%°šNKKS(`I_Š€«« ;Źje»0äΙÇ<ŸDKJ- YF3mÚ4‘oŸđĘFQbzśĘwC·)A?͙ÿG)žUÉ;–ț„ žÀJgŒòIò“ŽÇj77&Q`őQDĄȘ…ÒÀłf͒ùF$sŰÀ2”””±;\cȚćÇÄ šDŻâŰ۰4đMFF)É/òă6v8’1!ÏÄÄì%ŠFgßx#”ŠŸŸ~úôéa}ÆCâGvžWź\‘˜Äő/FŰÓÖ°ÊČçĂS§N€FČĐ|ÂŒ“„"»`>eŚlțŠŚ Aœ/Ră†,” '&………ĄLăфąà€ËđŠ ÄÆgűçΝCŠ}ہź$űZyyù̙3#úfÜ’`YŠ·ß~áćû)SŠLž<9333ìœbߐĄ:†^SPP——‡¶üœîœx‚X‹C!ŰO"ÿŻCdB—Á-PČq@"ùœîœxž31 țú?ȘVR­àˆIENDźB`‚passenger-4.0.37/doc/images/icons/callouts/1.png000644 000765 000024 00000000511 12233035540 022032 0ustar00honglistaff000000 000000 ‰PNG  IHDR s;bKGDȘ#2cIDATxÚUޱ À0ż€ô.)œBfŁté6#dŹÁ”Hą(đ'€ÿ‡»ÍŃÚXæWšŹ 9c±A€M-!d>°0(Ï* ?đœ/Èc}ÜÖź5u„‰ÆŒ:Àx,ìÁTŽCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘ș!ž*tEXtSignature58a072e070da22f6135cbd3e414546f9hj!ítEXtPage12x12+0+0„m»}IENDźB`‚passenger-4.0.37/doc/images/icons/callouts/10.png000644 000765 000024 00000000551 12233035540 022116 0ustar00honglistaff000000 000000 ‰PNG  IHDR s;bKGDȘ#2ƒIDATxÚ%ŽĄ!C#‘H,‰œN^ [¶p‰\»%Œ€${‰ÌÍŸ‹û/yI@ò’à„l\â\òyˆSMł}ßi㎋ȘŠsąàŚuœÈŒèșËÿaˆXÌ  śeűÚ­ÀÜvù¶G¶j…É!=ŁdçR”;?ĘąCbË kCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘ș!ž*tEXtSignature386e83bb9bdfba3227f58bb897e2c8a5Ÿ+ tEXtPage12x12+0+0„m»}IENDźB`‚passenger-4.0.37/doc/images/icons/callouts/11.png000644 000765 000024 00000001065 12233035540 022120 0ustar00honglistaff000000 000000 ‰PNG  IHDR Ù˰ pHYsttȚfxtIMEÒ-'<Ùj€tEXtAuthor©źÌH tEXtDescription !# tEXtCopyrightŹÌ:tEXtCreation time5ś tEXtSoftware]pÿ: tEXtDisclaimer·ÀŽtEXtWarningÀæ‡tEXtSourceőÿƒëtEXtCommentö̖żtEXtTitlešîÒ'IDATxœu­Ș„pĆÏ_ š?‚}‹I6 ‚XEabƒŻad@ƒÙlÛŽÍlŒ êÜ ë•ûń‹3çÌœĂˆÖuíșNMÓp†ˆˆhšŠ$ITUʆ†aTUE@DëșȚn7]ŚmÛÀó|EÇ=ŸÏoQ–eŚëőę~EĄëzY–}ߥm["â€izżß§ią(ÛÓqó<ß3I’Ä{<EQ0Æ,ËÚ.ˆăxż$IÒŃń\v[àxž‡đ}·v]'Ëòo…ëșËČì툚išËćrV„a8 öeGˆyžëș~œ^ą(:Žcšæa`?’țÉ,Ź”çșąIENDźB`‚passenger-4.0.37/doc/images/icons/callouts/12.png000644 000765 000024 00000001151 12233035540 022115 0ustar00honglistaff000000 000000 ‰PNG  IHDR Ù˰ pHYsttȚfxtIMEÒ.UFĄ/tEXtAuthor©źÌH tEXtDescription !# tEXtCopyrightŹÌ:tEXtCreation time5ś tEXtSoftware]pÿ: tEXtDisclaimer·ÀŽtEXtWarningÀæ‡tEXtSourceőÿƒëtEXtCommentö̖żtEXtTitlešîÒ'IDATxœ…!«Â`…ÏÆa`R†,/É+V5¶ĄŹìŹ 3,ü+KV-¶™-łòeƒĆmç†ĘëćȚpïSÏyyB€óùœeYQĘnw<{žŚj”š$IFQ„ŸŒFŁÇăŃ€ čĘnÛíöápX,Ăáđv»=ŸÏù|îûțg©źkËČN§“”2‚8ŽŚë”ïûŚë@žç$!„àșîn· ‚@§Ó9išX.—$5)esŃLŃu}żßkšæy€Śë@ œ^ïœ7Š"Çq„I’4($W«U†Óéô~ż†a€ȘȘ.—KžçȘȘ‚dY–łÙì—'đ^E(IDAT‚~ż_Ć·’RÊÍf3™LLÓŽm; C!żPȚÆÿ@ę·àk«uˆO4șIENDźB`‚passenger-4.0.37/doc/images/icons/callouts/13.png000644 000765 000024 00000001157 12233035540 022124 0ustar00honglistaff000000 000000 ‰PNG  IHDR Ù˰ pHYsttȚfxtIMEÒ.1㠌tEXtAuthor©źÌH tEXtDescription !# tEXtCopyrightŹÌ:tEXtCreation time5ś tEXtSoftware]pÿ: tEXtDisclaimer·ÀŽtEXtWarningÀæ‡tEXtSourceőÿƒëtEXtCommentö̖żtEXtTitlešîÒ'IDATxœ…!‚p†_đ‚Ć9”ŻÌÍHâ”ą3±‰lŒïĂFâ#Ht&EÆțéïtś»ÀĘÜ]ž{òȚçˆeY–ŠiUUŠąÌf3Û¶A@ 5Mł^Żń“ŐjŐ4 ˆ(Š"Y–‡ƒă8“É„1Æ›N§a¶’À9‡ÇăQQ”Ćbaš&ç\UŐ^ŻçyȚét’$IÌóüv»čź[–%€ ƒÁn·«ëú~żïś{âăńçy;ƶí$I–Ë„ëșžÏ'€Ă0:Îëőj%ÇqÆă1cŹ( Qu]ÿȘÛn·æóùh4êv»žçùŸßïś7›Í»îhȘ§.IDAT|>kšöëMÓ8ço‰ˆźŚkǖe©ȘjYVǗ˅ŸÚÇÿFüŚđ ‘śŹÊäC3IENDźB`‚passenger-4.0.37/doc/images/icons/callouts/14.png000644 000765 000024 00000000633 12233035540 022123 0ustar00honglistaff000000 000000 ‰PNG  IHDR Ù˰bKGDÿÿÿ œ§“ pHYsssŒ"čtIMEÒ šxœ8(IDATxœ}=ȘÂ@…O2…ˆ€ĐŹ\ÁÂìÀقˆÛ°ÄX€Đ"ž†Y€;@Æ)l”T!H!„ûŠűąđà}ććÜË=ŸCD‘”ÖZ;9ç­V DDDqÏf3ÇqêĄïû§Ó‰~qXk„”ÓéTQ‡€”Çăńp8|.)„¶ÛmUUËćçüőz­Śë~żŸç9čEQh­ƒ 0Æh·ÛQEàù|j­žÇŁ,ËĆb‘Š)€ĘnŚétn·›ąÛíȚïwîx<ț.’çùù|öĄűƒŠ§’q~IENDźB`‚passenger-4.0.37/doc/images/icons/callouts/15.png000644 000765 000024 00000001200 12233035540 022113 0ustar00honglistaff000000 000000 ‰PNG  IHDR Ù˰ pHYsttȚfxtIMEÒ0 ÏJtEXtAuthor©źÌH tEXtDescription !# tEXtCopyrightŹÌ:tEXtCreation time5ś tEXtSoftware]pÿ: tEXtDisclaimer·ÀŽtEXtWarningÀæ‡tEXtSourceőÿƒëtEXtCommentö̖żtEXtTitlešîÒ'IDATxœu1˂`…ŻE`59¶‰-AŽôZ[… ŠÖœȘĆĄÆhr ąŸŃ/h1A€-§—‚"Éè6B||gŒçœËáˆ":Çă1›Í6›ÍBĄ€TDDDžç5ô˜ÉdæóùûęN\ˆ8çșźëș.Ëòv»”,KĆËćąȘȘeYßOƒÁ`8FQŽ\.k”ZNjĆb2™H’äș.1"Úl6Šąìś{†a0ÆFŁQč\~œ^»Ę{<Śëu6›Aà|>O§ÓV«ešf©T Ă“ečX,Š“Ûív§ÓÉćrq?ŸÏj” € ‚ĐïśxžçûŸă8·ÛmȔ‘L?IDAT”ZÇăûęȚëőŸĂ9皩álÛN|9N§n·+ŠbbW*•őzęĂ)­rÎ]ŚÍçóőz=-ű ę§Ç!źŹ’HšIENDźB`‚passenger-4.0.37/doc/images/icons/callouts/2.png000644 000765 000024 00000000541 12233035540 022036 0ustar00honglistaff000000 000000 ‰PNG  IHDR s;bKGDȘ#2{IDATxÚŽĄĂ0 D?44,5,ô ]ٰ°Đ+†f„ŹĐK UÉG€{șśužÛÖkí»čăSàȚ@ŠcB»æïSCážhS‰űž€{ë2y–4CmŹs^öč% Đû Dݧ+OŁŽJ)}‹:TÙ5`Ÿ/ŁCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘ș!ž*tEXtSignature80eae529c94a7f47deccfada28acb9dfćo± tEXtPage12x12+0+0„m»}IENDźB`‚passenger-4.0.37/doc/images/icons/callouts/3.png000644 000765 000024 00000000536 12233035540 022043 0ustar00honglistaff000000 000000 ‰PNG  IHDR s;bKGDȘ#2xIDATxÚ%N«Ă@ 4ô†^„Ž0°+ ì »F``ša Ą+§&–ȚÓUččȘČ qXÒ çqî K àą”‚Đ]pêÁ›qđ˟ű3Ś&”=èÛż-#—ùőž™S:șbÁmìRÎ&jçüQž5cüëLCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘ș!ž*tEXtSignature80bbda2726ddace8ab8a01f59de2ebdbęutEXtPage12x12+0+0„m»}IENDźB`‚passenger-4.0.37/doc/images/icons/callouts/4.png000644 000765 000024 00000000531 12233035540 022037 0ustar00honglistaff000000 000000 ‰PNG  IHDR s;bKGDȘ#2sIDATxڍ!…0C#‘•XdeeŻP‰Ä"‘\ŁòËo+{%lećʰ!bçœÙÌ$ûci 1 qá dCwC‚ôèmJVàÁ$‹Ë6ïhu•œTšj~<_­ÂČäč|ËÀù™ó㣎 KȘFŸê6Ž[êŒĂCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘ș!ž*tEXtSignature9f82fcac9e039cbdb72380a4591324f5€»űvtEXtPage12x12+0+0„m»}IENDźB`‚passenger-4.0.37/doc/images/icons/callouts/5.png000644 000765 000024 00000000534 12233035540 022043 0ustar00honglistaff000000 000000 ‰PNG  IHDR s;bKGDȘ#2vIDATxÚŽĄÄ0  †Ș—đő†~+_Bh  áęIlgvö’—ĆÏM‚áÖZmցĂmă†Àwb$|SÜq$Ìń^€%Ô)%€•°ȚÔèőYP3ö]2­QÙj”%—›ő|ç#[7/B_ûCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘ș!ž*tEXtSignaturefe690463379eb25e562fcc8cc9b3c7e0ßČ9žtEXtPage12x12+0+0„m»}IENDźB`‚passenger-4.0.37/doc/images/icons/callouts/6.png000644 000765 000024 00000000543 12233035540 022044 0ustar00honglistaff000000 000000 ‰PNG  IHDR s;bKGDȘ#2}IDATxڍ!Ă0  š ú ęFaŸPXXj˜'”ú Ą†‚‚ȘÌnçnöˆˆó©ș” „oPêHÈÜl\BuNŰ­«đ!‹«i`„À°ȚûdÂĘÛ'äìŚ żç,Ă˖eűÔžgĄNL©€Lï< ÿV‘őđˆ?łs8ê žYCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘ș!ž*tEXtSignatured25d7176d67a038afc1c56558e3dfb1aęő”tEXtPage12x12+0+0„m»}IENDźB`‚passenger-4.0.37/doc/images/icons/callouts/7.png000644 000765 000024 00000000530 12233035540 022041 0ustar00honglistaff000000 000000 ‰PNG  IHDR s;bKGDȘ#2rIDATxÚ%Ž­…0 „OV"Y!ČȉŹìL•OŸ•ŹÁ Hdä‘+‰HŸäò’Łší‡“ Śe _ÊĐpD—Čă„lœđC›0T+ÈÊ«+€ź ’VA†jʓ ƒ{ŒO•9űlsLGÉIÉzŒó>61żGVSCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘ș!ž*tEXtSignature298368142ac43cebd2586d8d1137c8df&9é™tEXtPage12x12+0+0„m»}IENDźB`‚passenger-4.0.37/doc/images/icons/callouts/8.png000644 000765 000024 00000000545 12233035540 022050 0ustar00honglistaff000000 000000 ‰PNG  IHDR s;bKGDȘ#2IDATxÚŽĄĂ0  –†v…ÂŹĐŒ‚a` Ś 544T„ é?Ę»/TőܗžW[Б!DŰș…őč[`TÈ3Đ(”fń•pőçïčgżˆc”ÁÙ3Á1–Űż.0””>Šžú_êł +U­9Æäïüٟ9șFbíCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘ș!ž*tEXtSignature57be19505c03f92f3847f535e9b114e9Ù4kCtEXtPage12x12+0+0„m»}IENDźB`‚passenger-4.0.37/doc/images/icons/callouts/9.png000644 000765 000024 00000000545 12233035540 022051 0ustar00honglistaff000000 000000 ‰PNG  IHDR s;bKGDȘ#2IDATxÚŽ!„0 GFVb‘ÈJ,ČčWX‰ä È^Yč’kTb++#ł©É{“?/ù˜Yٗy/j†é!ÀÚRj»”Ç+“~ “àöEœ#y@„§·öà·‘š!âîŠsČ.Ôg±ț…E±‡íÒëOÍr /ŻóŒP8bÙÒûCtEXtSoftware@(#)ImageMagick 4.2.8 99/08/01 cristy@mystic.es.dupont.com‘ș!ž*tEXtSignature34623e5e4d48310e409b280afe247602Ô14$tEXtPage12x12+0+0„m»}IENDźB`‚passenger-4.0.37/dev/copy_boost_headers.rb000755 000765 000024 00000011665 12233035540 021206 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ESSENTIALS = [ "boost/detail/{limits,endian}.hpp", "boost/config", "boost/mpl", "boost/preprocessor/stringize.hpp", "boost/smart_ptr/detail/sp_counted_*", "boost/smart_ptr/detail/atomic_count*", "boost/smart_ptr/detail/spinlock*", "boost/atomic", "boost/unordered*", "boost/thread", "libs/thread/src", "libs/system/src", "libs/regex/src", "boost/date_time/gregorian/formatters_limited.hpp", "boost/date_time/date_formatting_limited.hpp", "boost/type_traits/make_signed.hpp", "boost/type_traits/detail/*", "boost/non_type.hpp", "boost/detail/fenv.hpp", "boost/foreach.hpp", "boost/*regex*" ] EXCLUDE = [ "libs/thread/src/win32/*", "libs/regex/src/w32_regex_traits.cpp", "libs/regex/src/fileiter.cpp", "libs/regex/src/icu.cpp", "libs/regex/src/usinstances.cpp", "boost/atomic/detail/windows.hpp", "boost/regex/icu.hpp" ] PROGRAM_SOURCE = %q{ #include #include #include #include #include #include #include #include #include #include #include #include #include #include } require 'fileutils' BOOST_DIR = ARGV[0] Dir.chdir(File.dirname(__FILE__) + "/../ext") # Run the given command, and abort on error. def sh(*command) puts command.join(" ") if !system(*command) puts "*** ERROR" exit 1 end end def install(source_filename, target_filename) dir = File.dirname(target_filename) if !File.exist?(dir) sh "mkdir", "-p", dir end command = ["install", "-m", "u+rw,g+r,o+r", source_filename, target_filename] sh(*command) end def copy_boost_files(patterns, exclude = nil) patterns.each do |pattern| files = Dir["#{BOOST_DIR}/#{pattern}"] files -= exclude if exclude files.each do |source| if File.directory?(source) source.slice!(0 .. BOOST_DIR.size) copy_boost_files(["#{source}/*"], exclude) else target = source.slice(BOOST_DIR.size + 1 .. source.size - 1) if target =~ /^libs\// target = "boost/#{target}" end if !File.exist?(target) install(source, target) end end end end end def copy_essential_files exclude = [] EXCLUDE.each do |pattern| exclude.concat(Dir["#{BOOST_DIR}/#{pattern}"]) end copy_boost_files(ESSENTIALS, exclude) end def prepare File.open("test.cpp", "w") do |f| f.write(PROGRAM_SOURCE) end end def cleanup FileUtils.rm_rf("boost/thread/win32") FileUtils.rm_rf("boost/src/win32") FileUtils.rm_rf("boost/asio/win32") FileUtils.rm_rf("boost/smart_ptr/detail/spinlock_w32.hpp") FileUtils.rm_rf("boost/smart_ptr/detail/sp_counted_base_w32.hpp") FileUtils.rm_rf("boost/smart_ptr/detail/atomic_count_win32.hpp") FileUtils.rm_rf("boost/config/platform/win32.hpp") File.unlink("test.cpp") rescue nil end # Compile PROGRAM_SOURCE and copy whatever missing header files the compiler needs. def copy_dependencies done = false while !done missing_headers = `g++ -DBOOST_MPL_PREPROCESSING_MODE test.cpp -c -I. 2>&1`. split("\n"). grep(/error: .*: No such file/). map do |line| file = line.sub(/.*error: (.*): .*/, '\1') if file =~ /^boost\// file else line =~ /(.*?):/ source = $1 File.dirname(source) + "/" + file end end missing_headers.each do |header| install("#{BOOST_DIR}/#{header}", header) end done = missing_headers.empty? end end def start if BOOST_DIR.nil? || BOOST_DIR.empty? puts "Usage: copy_boost_headers.rb " exit 1 end begin prepare copy_essential_files copy_dependencies ensure cleanup end end start passenger-4.0.37/dev/find_owner_pipe_leaks.rb000755 000765 000024 00000007213 12233035540 021653 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ############################################################################## # A script for finding owner pipe leaks in Apache. An owner pipe is considered # to be leaked if it is owned by two or more Apache processes. # # This script only works on Linux. Only run it when Apache is idle. $LOAD_PATH << "#{File.dirname(__FILE__)}/../lib" require 'set' require 'passenger/platform_info' include PlatformInfo def list_pids Dir.chdir("/proc") do return Dir["*"].select do |x| x =~ /^\d+$/ end end end def list_pipes(pid) pipes = [] Dir["/proc/#{pid}/fd/*"].each do |file| if File.symlink?(file) && File.readlink(file) =~ /^pipe:\[(.*)\]$/ pipes << $1 end end return pipes end def is_rails_app(pid) return File.read("/proc/#{pid}/cmdline") =~ /^Rails: / end def is_apache(pid) begin return File.readlink("/proc/#{pid}/exe") == HTTPD rescue return false end end # Returns a pair of these items: # - The owner pipe map. Maps a Rails application's PID to to its owner pipe's ID. # - The reverse map. Maps an owner pipe ID to the Rail application's PID. def create_owner_pipe_map map = {} reverse_map = {} list_pids.select{ |x| is_rails_app(x) }.each do |pid| owner_pipe = list_pipes(pid).first map[pid] = owner_pipe reverse_map[owner_pipe] = pid end return [map, reverse_map] end def show_owner_pipe_listing(map, reverse_map) puts "------------ Owner pipe listing ------------" count = 0 list_pids.select{ |x| is_apache(x) }.sort.each do |pid| list_pipes(pid).select do |pipe| reverse_map.has_key?(pipe) end.each do |pipe| puts "Apache PID #{pid} holds the owner pipe (#{pipe}) " << "for Rails PID #{reverse_map[pipe]}" count += 1 end end if count == 0 puts "(none)" end puts "" end def show_owner_pipe_leaks(map, reverse_map) apache_owner_pipe_map = {} list_pids.select{ |x| is_apache(x) }.sort.each do |pid| list_pipes(pid).select do |pipe| reverse_map.has_key?(pipe) end.each do |pipe| apache_owner_pipe_map[pipe] ||= [] apache_owner_pipe_map[pipe] << pid end end puts "------------ Leaks ------------" count = 0 apache_owner_pipe_map.each_pair do |pipe, pids| if pids.size >= 2 puts "Rails PID #{reverse_map[pipe]} owned by Apache processes: #{pids.join(", ")}" count += 1 end end if count == 0 puts "(none)" end end def start map, reverse_map = create_owner_pipe_map show_owner_pipe_listing(map, reverse_map) show_owner_pipe_leaks(map, reverse_map) end start passenger-4.0.37/dev/install_scripts_bootstrap_code.rb000755 000765 000024 00000002421 12233035540 023625 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # encoding: utf-8 # This script changes the bootstrap code for all Phusion Passenger commands, # as well as the Nginx module config script, so that they work no # matter which Ruby interpreter is currently in $PATH, and no matter how # Phusion Passenger is packaged. # # The bootstrap code must not add ruby_libdir to $LOAD_PATH. The active Ruby # can be *any* Ruby interpreter, maybe not even MRI. ruby_libdir belongs to # a Ruby interpreter installed by the distribution, and the files in it may # may be incompatible with the active Ruby. type = ARGV.shift if type == "--ruby" ruby_libdir = ARGV.shift BOOTSTRAP_CODE = %Q{ ENV["PASSENGER_LOCATION_CONFIGURATION_FILE"] = "#{ruby_libdir}/phusion_passenger/locations.ini" begin require 'rubygems' rescue LoadError end require '#{ruby_libdir}/phusion_passenger' } elsif type == "--nginx-module-config" bindir = ARGV.shift BOOTSTRAP_CODE = %Q{ PASSENGER_CONFIG=#{bindir}/passenger-config } else abort "Invalid type" end BOOTSTRAP_CODE.gsub!(/^\t\t/, '').strip ARGV.each do |filename| File.open(filename, "r+") do |f| text = f.read text.sub!( /^## Magic comment: begin bootstrap ##.*## Magic comment: end bootstrap \#\#$/m, BOOTSTRAP_CODE) f.rewind f.truncate(0) f.write(text) end end passenger-4.0.37/dev/render_error_pages.rb000755 000765 000024 00000007144 12233035540 021177 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../ext") require 'phusion_passenger/html_template' require 'phusion_passenger/spawn_manager' require 'phusion_passenger/platform_info' include PhusionPassenger if !defined?(Mysql::Error) module Mysql class Error < StandardError end end end def create_dummy_exception begin raise StandardError, "A dummy exception." rescue => e return e end end def create_database_exception begin raise Mysql::Error, "Cannot connect to database localhost:12345: connection refused (1234)" rescue => e return e end end def create_dummy_backtrace dummy_backtrace = nil begin raise StandardError, "A dummy exception." rescue => e dummy_backtrace = e.backtrace end dummy_backtrace.unshift("/webapps/foo/app/models/Foo.rb:102:in `something`") dummy_backtrace.unshift("/webapps/foo/config/environment.rb:10") return dummy_backtrace end def render_error_page(exception, output, template) exception.set_backtrace(create_dummy_backtrace) File.open(output, 'w') do |f| template = HTMLTemplate.new(template, :error => exception, :app_root => "/foo/bar") f.write(template.result) puts "Written '#{output}'" end end def start bt = create_dummy_backtrace e = FrameworkInitError.new("Some error message", create_dummy_exception, :vendor => '/webapps/foo') render_error_page(e, 'framework_init_error_with_vendor.html', 'framework_init_error') e = FrameworkInitError.new("Some error message", create_dummy_exception, :version => '1.2.3') render_error_page(e, 'framework_init_error.html', 'framework_init_error') e = VersionNotFound.new("Some error message", '>= 1.0.2') render_error_page(e, 'version_not_found.html', 'version_not_found') e = AppInitError.new("Some error message", create_dummy_exception) render_error_page(e, 'app_init_error.html', 'app_init_error') e = AppInitError.new("Some error message", create_database_exception) render_error_page(e, 'database_error.html', 'database_error') e = ArgumentError.new("Some error message") render_error_page(e, 'invalid_app_root.html', 'invalid_app_root') e = StandardError.new("Some error message") render_error_page(e, 'general_error.html', 'general_error') e = AppInitError.new("Some error message", create_dummy_exception) render_error_page(e, 'app_exited.html', 'app_exited_during_initialization') end start passenger-4.0.37/dev/run_travis.sh000755 000765 000024 00000010174 12233035540 017530 0ustar00honglistaff000000 000000 #!/bin/bash set -e export VERBOSE=1 export TRACE=1 export DEVDEPS_DEFAULT=no export rvmsudo_secure_path=1 sudo sh -c 'cat >> /etc/hosts' </dev/null <<<"force-unsafe-io" cp test/config.json.travis test/config.json # Relax permissions on home directory so that the application root # permission checks pass. chmod g+x,o+x $HOME if [[ "$TEST_RUBY_VERSION" != "" ]]; then echo "$ rvm use $TEST_RUBY_VERSION" if [[ -f ~/.rvm/scripts/rvm ]]; then source ~/.rvm/scripts/rvm else source /usr/local/rvm/scripts/rvm fi rvm use $TEST_RUBY_VERSION if [[ "$TEST_RUBYGEMS_VERSION" = "" ]]; then run gem --version fi fi if [[ "$TEST_RUBYGEMS_VERSION" != "" ]]; then run rvm install rubygems $TEST_RUBYGEMS_VERSION run gem --version fi if [[ "$TEST_CXX" = 1 ]]; then run rake test:install_deps BASE_DEPS=yes run rake test:cxx run rake test:oxt fi if [[ "$TEST_RUBY" = 1 ]]; then run rake test:install_deps BASE_DEPS=yes RAILS_BUNDLES=yes run rake test:ruby fi if [[ "$TEST_NODE" = 1 ]]; then install_node_and_modules run rake test:node fi if [[ "$TEST_NGINX" = 1 ]]; then install_base_test_deps install_node_and_modules run ./bin/passenger-install-nginx-module --auto --prefix=/tmp/nginx --auto-download run rake test:integration:nginx fi if [[ "$TEST_APACHE2" = 1 ]]; then apt_get_update run sudo apt-get install -y --no-install-recommends \ apache2-mpm-worker apache2-threaded-dev install_base_test_deps install_node_and_modules run ./bin/passenger-install-apache2-module --auto #--no-update-config run rvmsudo ./bin/passenger-install-apache2-module --auto --no-compile run rake test:integration:apache2 fi if [[ "$TEST_STANDALONE" = 1 ]]; then install_base_test_deps run rake test:integration:standalone fi if [[ "$TEST_DEBIAN_PACKAGING" = 1 ]]; then apt_get_update run sudo apt-get install -y --no-install-recommends \ devscripts debhelper rake apache2-mpm-worker apache2-threaded-dev \ ruby1.8 ruby1.8-dev ruby1.9.1 ruby1.9.1-dev rubygems libev-dev gdebi-core \ source-highlight install_test_deps_with_doctools install_node_and_modules run rake debian:dev debian:dev:reinstall run rake test:integration:native_packaging SUDO=1 run env PASSENGER_LOCATION_CONFIGURATION_FILE=/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini \ rake test:integration:apache2 SUDO=1 fi if [[ "$TEST_SOURCE_PACKAGING" = 1 ]]; then apt_get_update run sudo apt-get install -y --no-install-recommends source-highlight install_test_deps_with_doctools run rspec -f s -c test/integration_tests/source_packaging_test.rb fi passenger-4.0.37/dev/runner000755 000765 000024 00000000673 12233035540 016237 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + "/../lib/phusion_passenger") PhusionPassenger.locate_directories while true if ARGV[0] =~ /^-r(.*)/ if $1.empty? lib = ARGV[1] ARGV.shift ARGV.shift else lib = $1 ARGV.shift end begin PhusionPassenger.require_passenger_lib(lib) rescue LoadError require(lib) end else break end end module PhusionPassenger p eval(ARGV.join(" ")) end passenger-4.0.37/dev/test_rpm_packaging.sh000755 000765 000024 00000001765 12233035540 021203 0ustar00honglistaff000000 000000 #!/bin/bash set -ex sudo sh -c 'cat >> /etc/hosts' < "doc/$F" fi done cp test/config.json.rpm-automation test/config.json rake test:install_deps DEVDEPS_DEFAULT=false BASE_DEPS=true RAILS_BUNDLES=true rake rpm:local rpm:local:reinstall rake test:integration:native_packaging SUDO=1 env PASSENGER_LOCATION_CONFIGURATION_FILE=/usr/lib/ruby/site_ruby/1.8/phusion_passenger/locations.ini \ rake test:integration:apache2 \ SUDO=1 passenger-4.0.37/debian.template/changelog000644 000765 000024 00000021330 12233035540 021121 0ustar00honglistaff000000 000000 ruby-passenger (1:4.0.5-1bbox1~precise1) precise; urgency=high * New upstream release, 4.0.5. Fixes CVE-2013-2119 -- John Leach Wed, 29 May 2013 16:02:35 +0100 ruby-passenger (1:4.0.4-1bbox1~precise1) precise; urgency=low * New upstream release, 4.0.4 -- John Leach Tue, 28 May 2013 12:02:36 +0100 ruby-passenger (1:4.0.3-bbox1~lucid1) lucid; urgency=low * New upstream release, 4.0.3 * Remove packaging fix patches now applied upstream * Set Breaks field to remove old passenger packages -- John Leach Sat, 25 May 2013 11:50:16 +0100 ruby-passenger (1:4.0.2-bbox2~lucid1) lucid; urgency=low * New upstream release, 4.0.2 -- John Leach Wed, 22 May 2013 14:04:01 +0000 passenger (1:3.0.14-1bbox1+ng) precise; urgency=low * New upstream release, 3.0.14 * Bumped epoch to 1 to always prefer over the non-ruby-ng packages -- John Leach Wed, 25 Jul 2012 18:21:17 +0100 passenger (3.0.13-1bbox2+ng) precise; urgency=low * Removed 01_disable_html5_documentation.patch -- John Leach Fri, 15 Jun 2012 16:10:50 +0100 passenger (3.0.13-1bbox1+ng) precise; urgency=low * New upstream release, 3.0.13 -- John Leach Fri, 15 Jun 2012 12:16:50 +0100 passenger (3.0.12-1bbox1+ng) lucid; urgency=low * New upstream release, 3.0.12 -- John Leach Fri, 13 Apr 2012 17:19:42 +0100 passenger (3.0.11-2bbox5) lucid; urgency=low * Fix dependencies to avoid conflicts when upgrading from old passenger-common packages -- John Leach Thu, 05 Apr 2012 12:51:50 +0100 passenger (3.0.11-2bbox4) lucid; urgency=low * Added libgoogle-perftools-dev build dependency, for building with Ruby Enterprise Edition -- John Leach Thu, 23 Feb 2012 20:19:41 +0000 passenger (3.0.11-2bbox3) lucid; urgency=low * Added ruby1.9.1-dev build dependency -- John Leach Wed, 22 Feb 2012 23:34:40 +0000 passenger (3.0.11-2bbox2) lucid; urgency=low * Support for ruby 1.9.x (adds passenger-common1.8 and passenger-common1.9.1) -- John Leach Wed, 22 Feb 2012 17:43:02 +0000 passenger (3.0.11-1bbox1) lucid; urgency=low * New upstream release, 3.0.11 -- John Leach Mon, 28 Nov 2011 12:32:08 +0000 passenger (3.0.9-1bbox1) lucid; urgency=low * New upstream release, 3.0.9 -- John Leach Mon, 05 Sep 2011 22:21:03 +0100 passenger (3.0.8-1bbox1) lucid; urgency=low * New upstream release, 3.0.8 * Added 01_disable_html5_documentation.patch to fix documentation build with older versions of asciidoc -- John Leach Thu, 04 Aug 2011 22:28:58 +0100 passenger (3.0.7-1bbox2) lucid; urgency=low * Made passenger-dev suitable for building nginx-passenger -- John Leach Fri, 15 Apr 2011 11:36:04 +0100 passenger (3.0.7-1bbox1) lucid; urgency=low * New upstream version, 3.0.7 -- John Leach Thu, 14 Apr 2011 21:54:24 +0100 passenger (3.0.4-1bbox1) lucid; urgency=low * New upstream version * Removed 01_add_missing_packaging_constants.patch as it's now upstream * Initial passenger-dev package -- John Leach Thu, 03 Mar 2011 11:56:57 +0000 passenger (3.0.1-1bbox2) hardy; urgency=low * Fixed packaging bug with vendored libev -- John Leach Sun, 12 Dec 2010 16:57:41 +0000 passenger (3.0.1-1bbox1) hardy; urgency=low * New Upstream Version, 3.0.1 * Added 01_add_missing_packaging_constants.patch to fix issue #592 -- John Leach Sun, 12 Dec 2010 14:20:31 +0000 passenger (3.0.0-1bbox3) hardy; urgency=low * Fixed clean of vendored libev -- John Leach Thu, 11 Nov 2010 17:30:20 +0000 passenger (3.0.0-1bbox2) hardy; urgency=low * Fixed packaging bug with vendored libev -- John Leach Wed, 19 Oct 2010 21:37:19 +0100 passenger (3.0.0-1bbox1) hardy; urgency=low * New Upstream Version, 3.0.0 -- John Leach Wed, 19 Oct 2010 12:57:07 +0100 passenger (3.0.0-1bbox1~pre3) hardy; urgency=low * New Upstream Version, 3.0.0~pre3 -- John Leach Wed, 20 Sep 2010 17:27:09 +0100 passenger (2.2.15-1bbox1) hardy; urgency=low * New Upstream Version, 2.2.15 -- Ben Arblaster Tue, 06 Jul 2010 14:37:38 +0100 passenger (2.2.14-1bbox2) hardy; urgency=low * New Upstream Version, 2.2.14 -- Ben Arblaster Wed, 23 Jun 2010 11:32:26 +0100 passenger (2.2.11-1bbox2) hardy; urgency=low * Fix dependency on passenger-common -- John Leach Fri, 18 Jun 2010 07:41:26 +0100 passenger (2.2.11-1bbox1) hardy; urgency=low * New Upstream Version, 2.2.11 -- John Leach Fri, 05 Mar 2010 15:03:50 +0000 passenger (2.2.10-1bbox2) hardy; urgency=low * Change depency from apache mpm to apache common package -- John Leach Thu, 04 Mar 2010 14:52:46 +0000 passenger (2.2.10-1bbox1) hardy; urgency=low * New Upstream Version, 2.2.10 -- John Leach Thu, 25 Feb 2010 15:31:42 +0000 passenger (2.2.9-1bbox1) hardy; urgency=low * New Upstream Version, 2.2.9 -- John Leach Fri, 08 Jan 2010 11:37:10 +0000 passenger (2.2.7-1bbox1) hardy; urgency=low * New Upstream Version, 2.2.7 -- John Leach Mon, 23 Nov 2009 20:04:04 +0000 passenger (2.2.5-1bbox1) hardy; urgency=low * New Upstream Version, 2.2.5 -- John Leach Thu, 03 Sep 2009 08:13:14 +0100 passenger (2.2.4-1bbox1) hardy; urgency=low * New Upstream Version, 2.2.4 -- John Leach Mon, 29 Jun 2009 11:05:34 +0100 passenger (2.2.2-1bbox2) hardy; urgency=low * Changed dependency from librack to librack1.8 -- John Leach Fri, 01 May 2009 13:05:22 +0100 passenger (2.2.2-1bbox1) hardy; urgency=low * New Upstream Version, 2.2.2 * Updated dependency to librack 1.0.0 -- John Leach Fri, 01 May 2009 12:21:43 +0100 passenger (2.2.1-1bbox2) hardy; urgency=low * Conflicts with older versions of libapache2-mod-passenger * libapache2-mod-passenger depends on exact version of passenger-common -- John Leach Wed, 22 Apr 2009 18:49:42 +0100 passenger (2.2.1-1bbox1) hardy; urgency=low * New Upstream Version, 2.2.1 * Split into separate packages, to allow nginx support -- John Leach Mon, 20 Apr 2009 17:18:09 +0100 passenger (2.2.0-1bbox1) hardy; urgency=low * New Upstream Version, 2.2 -- John Leach Fri, 17 Apr 2009 10:34:14 +0100 passenger (2.1.3-1bbox1) hardy; urgency=low * New upstream version, 2.1.3 -- John Leach Sun, 05 Apr 2009 15:14:34 +0100 passenger (2.1.2-1bbox1) hardy; urgency=low * New upstream version -- John Leach Sat, 14 Mar 2009 17:34:17 +0000 passenger (2.1.1.20090309-0bbox1) hardy; urgency=low * New upstream version -- John Leach Wed, 11 Mar 2009 00:05:15 +0000 passenger (2.0.6-0bbox2) hardy; urgency=low * Fixed depends to allow apache2-mpm-prefork instead of apache2-mpm-worker -- John Leach Sun, 11 Jan 2009 15:01:22 +0000 passenger (2.0.6-0bbox1) hardy; urgency=low * New Upstream Version, 2.0.6 -- John Leach Mon, 15 Dec 2008 19:29:13 +0000 passenger (2.0.5-0bbox1) hardy; urgency=low * New Upstream Version, 2.0.5 -- John Leach Fri, 05 Dec 2008 14:22:41 +0000 passenger (2.0.4-1bbox2) hardy; urgency=medium * Added 11_fix_passenger-config_version.patch to fix bug in passenger-config (Thanks to Rich Drummond) * Changed depends to allow apache2-mpm-prefork instead of apache2-mpm-worker -- John Leach Wed, 03 Dec 2008 18:14:46 +0000 passenger (2.0.4-1bbox1) hardy; urgency=low * New upstream version, 2.0.4 -- John Leach Mon, 01 Dec 2008 23:00:11 +0000 passenger (2.0.3-1bbox4) hardy; urgency=low * Tweaked build-depends for Ruby 1.8 -- John Leach Wed, 26 Nov 2008 17:41:07 +0000 passenger (2.0.3-0ubuntu1~bbox3) hardy; urgency=low * Change rubygems depends to suggests * Fix typo in control that led to mod_passenger.so being put in / -- John Leach Wed, 26 Nov 2008 14:02:29 +0000 passenger (2.0.3-0ubuntu1~bbox2) intrepid; urgency=low * Initial release: closes LP: #246719 -- Neil Wilson Sun, 17 Aug 2008 22:30:35 +0100 passenger-4.0.37/debian.template/compat000644 000765 000024 00000000002 12233035540 020446 0ustar00honglistaff000000 000000 7 passenger-4.0.37/debian.template/control.template000644 000765 000024 00000006563 12233035540 022477 0ustar00honglistaff000000 000000 Source: passenger Section: ruby Priority: optional Maintainer: John Leach Uploaders: Phusion , Hongli Lai Build-Depends: debhelper (>= 7.0.50~), rake, ruby1.8, ruby1.8-dev, rubygems1.8, ruby1.9.1, ruby1.9.1-dev, #if is_distribution?('<= lucid') rubygems1.9, #endif apache2-mpm-worker | apache2-mpm, apache2-threaded-dev, #if is_distribution?('>= precise') || is_distribution?('>= wheezy') libev-dev (>= 1:4.0.0), #endif libapr1-dev, libcurl4-openssl-dev Standards-Version: 3.9.3 Homepage: https://www.phusionpassenger.com/ Vcs-Git: git://github.com/phusion/passenger.git Vcs-Browser: https://github.com/phusion/passenger XS-Ruby-Versions: all Package: passenger Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ruby2.0 | ruby1.9.1 | ruby1.8 | ruby-interpreter, rubygems2.0 | rubygems1.9.1 | rubygems1.9 | rubygems (>= 1.2), #if is_distribution?('<= lucid') || is_distribution?('<= squeeze') librack-ruby, #else ruby-rack, #endif ruby-daemon-controller Recommends: passenger-doc (= ${binary:Version}), passenger-dev (= ${binary:Version}), crash-watch Suggests: python Breaks: libapache2-mod-passenger (<< <%= DEBIAN_EPOCH %>:<%= PACKAGE_VERSION %>), passenger-common, passenger-common1.8, passenger-common1.9.1, ruby-passenger Replaces: libapache2-mod-passenger (<< <%= DEBIAN_EPOCH %>:<%= PACKAGE_VERSION %>), passenger-common, passenger-common1.8, passenger-common1.9.1, ruby-passenger Provides: ruby-passenger Description: Rails and Rack support for Apache2 and Nginx Phusion Passenger — a.k.a. mod_rails or mod_rack — makes deployment of Ruby web applications, such as those built on the revolutionary Ruby on Rails web framework, a breeze. Package: passenger-dev Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ruby2.0 | ruby1.9.1 | ruby1.8 | ruby-interpreter, passenger (= ${binary:Version}) Suggests: python Replaces: ruby-passenger-dev Conflicts: ruby-passenger-dev Provides: ruby-passenger-dev Description: Rails and Rack support for Apache2 and Nginx Phusion Passenger — a.k.a. mod_rails or mod_rack — makes deployment of Ruby web applications, such as those built on the revolutionary Ruby on Rails web framework, a breeze. . This package provides the development dependencies, for building the NGINX module Package: libapache2-mod-passenger Architecture: any Section: web Depends: ${shlibs:Depends}, ${misc:Depends}, apache2-mpm-worker (>= 2.2.9-9) | apache2-mpm-prefork (>= 2.2.9-9) | apache2-mpm-itk (>= 2.2.9-9) | apache2-mpm-event (>= 2.2.9-9), passenger (= ${binary:Version}) Description: Rails and Rack support for Apache2 Phusion Passenger — a.k.a. mod_rails or mod_rack — makes deployment of Ruby web applications, such as those built on the revolutionary Ruby on Rails web framework, a breeze. . This package contains the Apache 2 module required by Phusion Passenger. Package: passenger-doc Section: doc Architecture: all Depends: ${misc:Depends} Suggests: www-browser Provides: ruby-passenger-doc Conflicts: ruby-passenger-doc Replaces: ruby-passenger-doc Description: Rails and Rack support for Apache2 - Documentation Phusion Passenger — a.k.a. mod_rails or mod_rack — makes deployment of Ruby web applications, such as those built on the revolutionary Ruby on Rails web framework, a breeze. . This package provides the documentation for Phusion Passenger. passenger-4.0.37/debian.template/copyright000644 000765 000024 00000044314 12233035540 021211 0ustar00honglistaff000000 000000 This package was debianized by Leandro Nunes dos Santos on Mon, 29 Sep 2008 19:36:41 -0300. It incorporates packaging work done by Neil Wilson Some further refined packaging work was done by David Moreno and Micah Anderson . It was downloaded from http://www.modrails.com/install.html Upstream Authors: Hongli Lai Ninh Bui Copyright: Copyright (C) 2008 Hongli Lai & Ninh Bui License: Phusion Passenger is licensed under the GNU General Public License (GPL) version 2, and *only* version 2 (i.e. not version 3 or any later versions). In addition to the GNU General Public License v2 licensing terms, we explicitly grand you the permission to run any application on top of Phusion Passenger, regardless of the application's own licensing terms. The application will not be bound to the terms of the GPL in any way. That is, the GPL only applies to Phusion Passenger itself, and not to applications that are run through Phusion Passenger. We also explicitly allow Apache to load the Phusion Passenger Apache module, without Apache or any other loaded modules needing to be released under the terms of the GPL. On Debian systems, the full text of the GNU General Public License can be found at /usr/share/common-licenses/GPL. This package also contains a modified version of Boost library: Copyright: The individual copyright and license statements generally appear in library headers, though a few appear in other files. For more detailed copyright information, see debian/copyright file from Debian boost package. License: Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The file lib/phusion_passenger/railz/cgi_fixed.rb license is as follows: # Copyright (c) 2004 Zed A. Shaw # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. All files under ext/oxt are licensed under the MIT license and are Copyright (c) 2008 Phusion: * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. Rack is also vendored with this version of Passenger under the following terms: Copyright (c) 2007, 2008, 2009 Christian Neukirchen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. All files located under ext/common hold the same Copyright and license as the main Passenger source (Copyright (C) 2008 Hongli Lai & Ninh Bui and GPLv2 only), except where noted below: ext/common/Base65.[cpp,h] is Copyright (C) 2004-2008 RenĂ© Nyffenegger: * Modified by Phusion for inclusion in Phusion Passenger. * * This source code is provided 'as-is', without any express or implied * warranty. In no event will the author be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this source code must not be misrepresented; you must not * claim that you wrote the original source code. If you use this source code * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original source code. * * 3. This notice may not be removed or altered from any source distribution. * * RenĂ© Nyffenegger rene.nyffenegger@adp-gmbh.ch * */ --------------------------------------------------------------------------- All files located under ext/apache2 hold the same Copyright and license as the main Passenger source (Copyright (C) 2008 Hongli Lai & Ninh Bui and GPLv2 only), except where noted below: A few functions in ext/apache2/Hooks.cpp are based on the source code of mod_scgi version 1.9. Its license is included in this file. Please note that these licensing terms *only* encompass those few functions, and not Passenger as a whole. The functions which are based on mod_scgi's code are as follows: - Hooks::prepareRequest(). Although our version looks nothing like the original, the idea of checking for the file's existance from the map_to_storage/fixups hook is inspired by mod_scgi's code. - Hooks::handleRequest(). Although our version looks nothing like the original, the idea of passing the backend process's socket file descriptor up to the bucket brigade chain is inspired by mod_scgi's code. - Hooks::http2env(), Hooks::lookupName(), Hooks::lookupHeader(), Hooks::lookupEnv(), Hooks::addHeader(): Copied from mod_scgi's functions that are named similarly. Slightly modified to make the coding style consistent with the rest of Phusion Passenger. - Hooks::sendHeaders(): Based for the most part on mod_scgi's send_headers() function. ------------------------------------------------------------------------ CNRI OPEN SOURCE LICENSE AGREEMENT IMPORTANT: PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY. BY COPYING, INSTALLING OR OTHERWISE USING SCGI-1.9 SOFTWARE, YOU ARE DEEMED TO HAVE AGREED TO THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. 1. This LICENSE AGREEMENT is between Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") copying, installing or otherwise using scgi-1.9 software in source or binary form and its associated documentation ("scgi-1.9"). 2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world- wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use scgi-1.9 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., "Copyright (c) 2004 Corporation for National Research Initiatives; All Rights Reserved" are retained in scgi-1.9 alone or in any derivative version prepared by Licensee. 3. In the event Licensee prepares a derivative work that is based on or incorporates scgi-1.9 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to scgi-1.9. 4. CNRI is making scgi-1.9 available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF SCGI-1.9 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF SCGI- 1.9 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING SCGI- 1.9, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 7. This License Agreement shall be governed by and interpreted in all respects by the law of the State of Virginia, excluding Virginia's conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 8. By copying, installing or otherwise using scgi-1.9, Licensee agrees to be bound by the terms and conditions of this License Agreement. --------------------------------------------------------------------------- All files located under ext/nginx hold the same Copyright and license as the main Passenger source (Copyright (C) 2008 Hongli Lai & Ninh Bui and GPLv2 only), except where noted below: ext/nginx/Configuration.[c,h], ContentHandler.[c,h], ngx_http_passenger_module.[c,h] and StaticContentHandler.h is: /* Copyright (C) Igor Sysoev * Copyright (C) 2007 Manlio Perillo (manlio.perillo@gmail.com) * Copyright (C) 2008, 2009 Phusion * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ ext/nginx/StaticContentHandler.c is: /* * Copyright (C) Igor Sysoev * Copyright (C) 2009 Phusion * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ ----------------------------------------------------------------------------- All files located under test hold the same Copyright and license as the main Passenger source (Copyright (C) 2008 Hongli Lai & Ninh Bui and GPLv2 only), except where noted below: test/stub/rails_apps/mycookbook/public/javascripts/controls.js is: // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // (c) 2005-2007 Ivan Krstic (http://blogs.law.harvard.edu/ivan) // (c) 2005-2007 Jon Tirsen (http://www.tirsen.com) // Contributors: // Richard Livsey // Rahul Bhargava // Rob Wills // // script.aculo.us is freely distributable under the terms of an MIT-style license. // For details, see the script.aculo.us web site: http://script.aculo.us/ test/stub/rails_apps/mycookbook/public/javascripts/dragdrop.js is: // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // (c) 2005-2007 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz) // // script.aculo.us is freely distributable under the terms of an MIT-style license. // For details, see the script.aculo.us web site: http://script.aculo.us/ test/stub/rails_apps/mycookbook/public/javascripts/effects.js is: // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // Contributors: // Justin Palmer (http://encytemedia.com/) // Mark Pilgrim (http://diveintomark.org/) // Martin Bialasinki // // script.aculo.us is freely distributable under the terms of an MIT-style license. // For details, see the script.aculo.us web site: http://script.aculo.us/ test/stub/rails_apps/mycookbook/public/javascripts/prototype.js is: /* Prototype JavaScript framework, version 1.6.0.1 * (c) 2005-2007 Sam Stephenson * * Prototype is freely distributable under the terms of an MIT-style license. * For details, see the Prototype web site: http://www.prototypejs.org/ */ test/support/tut.h and tut_reporter.h is Copyright 2002-2006 Vladimir Dyuzhev: * http://tut-framework.sourceforge.net/ * * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ passenger-4.0.37/debian.template/libapache2-mod-passenger.install000644 000765 000024 00000000163 12233035540 025374 0ustar00honglistaff000000 000000 usr/lib/apache2/modules/ ../passenger.conf etc/apache2/mods-available ../passenger.load etc/apache2/mods-available passenger-4.0.37/debian.template/libapache2-mod-passenger.postinst000644 000765 000024 00000001307 12233035540 025612 0ustar00honglistaff000000 000000 #!/bin/sh set -e #DEBHELPER# if [ "$1" != "configure" ]; then exit 0 fi reload_apache() { if apache2ctl configtest 2>/dev/null; then invoke-rc.d apache2 force-reload || true else echo "Your apache2 configuration is broken, so we're not restarting it for you." fi } if [ -n "$2" ]; then # we're upgrading. test if we're enabled, and if so, restart to reload the module. if [ -e /etc/apache2/mods-enabled/passenger.load ]; then reload_apache fi exit 0 fi if [ -e /etc/apache2/apache2.conf ]; then # Enable the module, but hide a2enmod's misleading message about apachectl # and force-reload the thing ourselves. a2enmod passenger >/dev/null || true reload_apache fi exit 0 passenger-4.0.37/debian.template/libapache2-mod-passenger.prerm000644 000765 000024 00000000266 12233035540 025057 0ustar00honglistaff000000 000000 #!/bin/sh set -e #DEBHELPER# if [ "$1" != "remove" -a "$1" != "purge" ]; then exit 0 fi; if [ -e /etc/apache2/apache2.conf ]; then a2dismod passenger || true fi exit 0 passenger-4.0.37/debian.template/locations.ini.template000644 000765 000024 00000001612 12233035540 023556 0ustar00honglistaff000000 000000 [locations] natively_packaged=true native_packaging_method=deb bin_dir=/usr/bin agents_dir=/usr/lib/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/agents lib_dir=/usr/lib/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %> helper_scripts_dir=/usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/helper-scripts resources_dir=/usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %> include_dir=/usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/include doc_dir=/usr/share/doc/passenger ruby_libdir=/usr/lib/ruby/vendor_ruby node_libdir=/usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/node apache2_module_path=/usr/lib/apache2/modules/mod_passenger.so ruby_extension_source_dir=/usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/ruby_extension_source nginx_module_source_dir=/usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/ngx_http_passenger_module passenger-4.0.37/debian.template/passenger-dev.install.template000644 000765 000024 00000000335 12233035540 025216 0ustar00honglistaff000000 000000 usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/ngx_http_passenger_module usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/include/ usr/lib/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/common/ passenger-4.0.37/debian.template/passenger-doc.install.template000644 000765 000024 00000000214 12233035540 025201 0ustar00honglistaff000000 000000 debian/tmp/usr/share/doc/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/* usr/share/doc/passenger/ CONTRIBUTORS usr/share/doc/passenger/ passenger-4.0.37/debian.template/passenger.conf000644 000765 000024 00000000442 12233035540 022106 0ustar00honglistaff000000 000000 ### Begin automatically installed Phusion Passenger config snippet ### PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini PassengerDefaultRuby /usr/bin/ruby ### End automatically installed Phusion Passenger config snippet ### passenger-4.0.37/debian.template/passenger.docs000644 000765 000024 00000000064 12233035540 022111 0ustar00honglistaff000000 000000 CONTRIBUTING.md README.md NEWS debian/README.Debian passenger-4.0.37/debian.template/passenger.install.template000644 000765 000024 00000001562 12233035540 024445 0ustar00honglistaff000000 000000 usr/lib/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/agents/ nginx-<%= PhusionPassenger::PREFERRED_NGINX_VERSION %>/objs/PassengerWebHelper usr/lib/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/ usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/helper-scripts/ usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/templates/ usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/standalone_default_root/ usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/ruby_extension_source/ usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/node/ usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/*.types usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/*.crt usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/*.txt usr/lib/ruby/ debian/locations.ini usr/lib/ruby/vendor_ruby/phusion_passenger/ usr/sbin/ usr/bin/passenger-4.0.37/debian.template/passenger.load000644 000765 000024 00000000316 12233035540 022100 0ustar00honglistaff000000 000000 ### Begin automatically installed Phusion Passenger load snippet ### LoadModule passenger_module /usr/lib/apache2/modules/mod_passenger.so ### End automatically installed Phusion Passenger load snippet ### passenger-4.0.37/debian.template/passenger.manpages000644 000765 000024 00000000147 12233035540 022756 0ustar00honglistaff000000 000000 man/passenger-memory-stats.8 man/passenger-status.8 man/passenger-config.1 man/passenger-stress-test.1 passenger-4.0.37/debian.template/patches/000755 000765 000024 00000000000 12233035540 020677 5ustar00honglistaff000000 000000 passenger-4.0.37/debian.template/README.Debian000644 000765 000024 00000001234 12233035540 021311 0ustar00honglistaff000000 000000 Phusion Passenger module for Apache2 AKA mod_rails or mod_rack This is the Phusion Passenger (mod_rails/mod_rack) Apache 2 module package offering support for Ruby web applications based on Rails or Rack. There is even experimental support for WSGI Python apps. This package version manages the dependencies for you and will install a fully working Apache2 setup with the module in place and activated. No need to run any installers or other programs. The package does all that for you. All you need do is add your virtual host to your setup, and reload Apache2. See the User Guide (passenger/Users guide.html or passenger/Users guide.txt.gz) for more information. passenger-4.0.37/debian.template/rules.template000755 000765 000024 00000004124 12233035540 022143 0ustar00honglistaff000000 000000 #!/usr/bin/make -f # export DH_VERBOSE=1 #if is_distribution?('>= precise') || is_distribution?('>= wheezy') export USE_VENDORED_LIBEV=false #endif #if ['1', 'true', 'on', 'yes'].include?(ENV['USE_CCACHE']) export USE_CCACHE=1 #endif # Speed up ccache (reduce I/O) by lightly compressing things. # Always set these variables because pbuilder uses ccache transparently. CCACHE_COMPRESS=1 export CCACHE_COMPRESS CCACHE_COMPRESS_LEVEL=3 export CCACHE_COMPRESS_LEVEL %: dh $@ override_dh_auto_configure: # Do nothing override_dh_auto_build: /usr/bin/ruby1.8 /usr/bin/rake fakeroot mv pkg/fakeroot pkg/fakeroot1.8 /usr/bin/ruby1.9.1 /usr/bin/rake fakeroot mv pkg/fakeroot pkg/fakeroot1.9.1 cd nginx-<%= PhusionPassenger::PREFERRED_NGINX_VERSION %> && \ ./configure --prefix=/tmp \ <%= PhusionPassenger::STANDALONE_NGINX_CONFIGURE_OPTIONS %> \ --add-module=`pwd`/../ext/nginx && \ make && \ mv objs/nginx objs/PassengerWebHelper override_dh_auto_install: mkdir debian/tmp/ # Merge Ruby 1.8 and 1.9 files into a single directory. cp -a pkg/fakeroot1.8/* debian/tmp/ cp -a pkg/fakeroot1.9.1/* debian/tmp/ ./dev/install_scripts_bootstrap_code.rb --ruby /usr/lib/ruby/vendor_ruby debian/tmp/usr/bin/* debian/tmp/usr/sbin/* ./dev/install_scripts_bootstrap_code.rb --nginx-module-config /usr/bin debian/tmp/usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/ngx_http_passenger_module/config touch debian/tmp/usr/share/<%= PhusionPassenger::GLOBAL_NAMESPACE_DIRNAME %>/release.txt override_dh_auto_clean: /usr/bin/rake clean CLEAN_DOCS=false rm -rf pkg/fakeroot1.8 rm -rf pkg/fakeroot1.9.1 cd nginx-<%= PhusionPassenger::PREFERRED_NGINX_VERSION %> && if test -f Makefile; then make clean; fi # Hack to prevent HTML files from being renegerated touch doc/*.html # Because we include Ruby extensions, the Debian package depends on libruby. # Since Phusion Passenger works fine without the Ruby extensions, we don't want # to depend on libruby. # https://github.com/phusion/passenger_apt_automation/issues/3 override_dh_shlibdeps: dh_shlibdeps sed -i -E 's/libruby.*?, //g' debian/*.substvars passenger-4.0.37/debian.template/source/000755 000765 000024 00000000000 12233035540 020550 5ustar00honglistaff000000 000000 passenger-4.0.37/debian.template/source/format000644 000765 000024 00000000014 12233035540 021756 0ustar00honglistaff000000 000000 3.0 (quilt) passenger-4.0.37/debian.template/patches/series000644 000765 000024 00000000000 12233035540 022102 0ustar00honglistaff000000 000000 passenger-4.0.37/build/agents.rb000644 000765 000024 00000016107 12233035540 017126 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. watchdog_libs = COMMON_LIBRARY.only(:base, 'AgentsBase.o', 'Utils/Base64.o') dependencies = [ 'ext/common/agents/Watchdog/Main.cpp', 'ext/common/agents/Watchdog/AgentWatcher.cpp', 'ext/common/agents/Watchdog/HelperAgentWatcher.cpp', 'ext/common/agents/Watchdog/LoggingAgentWatcher.cpp', 'ext/common/agents/Watchdog/ServerInstanceDirToucher.cpp', 'ext/common/Constants.h', 'ext/common/ServerInstanceDir.h', 'ext/common/ResourceLocator.h', 'ext/common/Utils/VariantMap.h', LIBBOOST_OXT, watchdog_libs.link_objects ].flatten file AGENT_OUTPUT_DIR + 'PassengerWatchdog' => dependencies do sh "mkdir -p #{AGENT_OUTPUT_DIR}" if !File.directory?(AGENT_OUTPUT_DIR) compile_cxx("ext/common/agents/Watchdog/Main.cpp", "-o #{AGENT_OUTPUT_DIR}PassengerWatchdog.o " << "#{EXTRA_PRE_CXXFLAGS} " << "-Iext -Iext/common " << "#{AGENT_CFLAGS} #{EXTRA_CXXFLAGS}") create_executable(AGENT_OUTPUT_DIR + 'PassengerWatchdog', "#{AGENT_OUTPUT_DIR}PassengerWatchdog.o " << "#{watchdog_libs.link_objects_as_string} " << "#{LIBBOOST_OXT} " << "#{EXTRA_PRE_CXX_LDFLAGS} " << "#{PlatformInfo.portability_cxx_ldflags} " << "#{AGENT_LDFLAGS} " << "#{EXTRA_CXX_LDFLAGS}") end helper_agent_libs = COMMON_LIBRARY. only(:base, :other). exclude('AgentsStarter.o') dependencies = [ 'ext/common/agents/HelperAgent/Main.cpp', 'ext/common/agents/HelperAgent/RequestHandler.h', 'ext/common/agents/HelperAgent/RequestHandler.cpp', 'ext/common/agents/HelperAgent/ScgiRequestParser.h', 'ext/common/Constants.h', 'ext/common/StaticString.h', 'ext/common/Account.h', 'ext/common/AccountsDatabase.h', 'ext/common/MessageServer.h', 'ext/common/FileDescriptor.h', 'ext/common/Logging.h', 'ext/common/ResourceLocator.h', 'ext/common/Utils/ProcessMetricsCollector.h', 'ext/common/Utils/VariantMap.h', 'ext/common/ApplicationPool2/Pool.h', 'ext/common/ApplicationPool2/Common.h', 'ext/common/ApplicationPool2/SuperGroup.h', 'ext/common/ApplicationPool2/Group.h', 'ext/common/ApplicationPool2/Process.h', 'ext/common/ApplicationPool2/Session.h', 'ext/common/ApplicationPool2/Options.h', 'ext/common/ApplicationPool2/PipeWatcher.h', 'ext/common/ApplicationPool2/Spawner.h', 'ext/common/ApplicationPool2/SpawnerFactory.h', 'ext/common/ApplicationPool2/SmartSpawner.h', 'ext/common/ApplicationPool2/DirectSpawner.h', LIBBOOST_OXT, helper_agent_libs.link_objects, LIBEV_TARGET, LIBEIO_TARGET ].flatten.compact file AGENT_OUTPUT_DIR + 'PassengerHelperAgent' => dependencies do sh "mkdir -p #{AGENT_OUTPUT_DIR}" if !File.directory?(AGENT_OUTPUT_DIR) compile_cxx("ext/common/agents/HelperAgent/Main.cpp", "-o #{AGENT_OUTPUT_DIR}PassengerHelperAgent.o " << "#{EXTRA_PRE_CXXFLAGS} " << "-Iext -Iext/common " << "#{AGENT_CFLAGS} #{LIBEV_CFLAGS} #{LIBEIO_CFLAGS} " << "#{EXTRA_CXXFLAGS}") create_executable("#{AGENT_OUTPUT_DIR}PassengerHelperAgent", "#{AGENT_OUTPUT_DIR}PassengerHelperAgent.o", "#{helper_agent_libs.link_objects_as_string} " << "#{LIBBOOST_OXT} " << "#{EXTRA_PRE_CXX_LDFLAGS} " << "#{LIBEV_LIBS} " << "#{LIBEIO_LIBS} " << "#{PlatformInfo.portability_cxx_ldflags} " << "#{AGENT_LDFLAGS} " << "#{EXTRA_CXX_LDFLAGS}") end logging_agent_libs = COMMON_LIBRARY.only(:base, :logging_agent, 'AgentsBase.o', 'Utils/Base64.o', 'Utils/MD5.o') dependencies = [ 'ext/common/agents/LoggingAgent/Main.cpp', 'ext/common/agents/LoggingAgent/AdminController.h', 'ext/common/agents/LoggingAgent/LoggingServer.h', 'ext/common/agents/LoggingAgent/RemoteSender.h', 'ext/common/agents/LoggingAgent/DataStoreId.h', 'ext/common/agents/LoggingAgent/FilterSupport.h', 'ext/common/Constants.h', 'ext/common/ServerInstanceDir.h', 'ext/common/Logging.h', 'ext/common/EventedServer.h', 'ext/common/EventedClient.h', 'ext/common/Utils/VariantMap.h', 'ext/common/Utils/BlockingQueue.h', logging_agent_libs.link_objects, LIBBOOST_OXT, LIBEV_TARGET ].flatten.compact file AGENT_OUTPUT_DIR + 'PassengerLoggingAgent' => dependencies do sh "mkdir -p #{AGENT_OUTPUT_DIR}" if !File.directory?(AGENT_OUTPUT_DIR) compile_cxx("ext/common/agents/LoggingAgent/Main.cpp", "-o #{AGENT_OUTPUT_DIR}PassengerLoggingAgent.o " << "#{EXTRA_PRE_CXXFLAGS} " << "-Iext -Iext/common " << "#{AGENT_CFLAGS} #{LIBEV_CFLAGS} " << "#{PlatformInfo.curl_flags} " << "#{PlatformInfo.zlib_flags} " << "#{EXTRA_CXXFLAGS}") create_executable("#{AGENT_OUTPUT_DIR}PassengerLoggingAgent", "#{AGENT_OUTPUT_DIR}PassengerLoggingAgent.o", "#{logging_agent_libs.link_objects_as_string} " << "#{LIBBOOST_OXT} " << "#{EXTRA_PRE_CXX_LDFLAGS} " << "#{LIBEV_LIBS} " << "#{PlatformInfo.curl_libs} " << "#{PlatformInfo.zlib_libs} " << "#{PlatformInfo.portability_cxx_ldflags} " << "#{AGENT_LDFLAGS} " << "#{EXTRA_CXX_LDFLAGS}") end spawn_preparer_libs = COMMON_LIBRARY.only('Utils/Base64.o') dependencies = [ 'ext/common/agents/SpawnPreparer.cpp', spawn_preparer_libs.link_objects, LIBBOOST_OXT ].flatten file AGENT_OUTPUT_DIR + 'SpawnPreparer' => dependencies do sh "mkdir -p #{AGENT_OUTPUT_DIR}" if !File.directory?(AGENT_OUTPUT_DIR) create_executable(AGENT_OUTPUT_DIR + 'SpawnPreparer', 'ext/common/agents/SpawnPreparer.cpp', "#{EXTRA_PRE_CXXFLAGS} #{EXTRA_PRE_CXX_LDFLAGS} " << "-Iext -Iext/common " << "#{AGENT_CFLAGS} #{EXTRA_CXXFLAGS} " << "#{spawn_preparer_libs.link_objects_as_string} " << "#{LIBBOOST_OXT} " << "#{PlatformInfo.portability_cxx_ldflags} " << "#{EXTRA_CXX_LDFLAGS}") end file AGENT_OUTPUT_DIR + 'EnvPrinter' => 'ext/common/agents/EnvPrinter.c' do sh "mkdir -p #{AGENT_OUTPUT_DIR}" if !File.directory?(AGENT_OUTPUT_DIR) create_c_executable(AGENT_OUTPUT_DIR + 'EnvPrinter', 'ext/common/agents/EnvPrinter.c') end file AGENT_OUTPUT_DIR + 'TempDirToucher' => 'ext/common/agents/TempDirToucher.c' do sh "mkdir -p #{AGENT_OUTPUT_DIR}" if !File.directory?(AGENT_OUTPUT_DIR) create_c_executable(AGENT_OUTPUT_DIR + 'TempDirToucher', 'ext/common/agents/TempDirToucher.c') end task 'common:clean' do sh "rm -rf #{AGENT_OUTPUT_DIR}" end passenger-4.0.37/build/apache2.rb000644 000765 000024 00000013400 12233035540 017141 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # apxs totally sucks. We couldn't get it working correctly # on MacOS X (it had various problems with building universal # binaries), so we decided to ditch it and build/install the # Apache module ourselves. # # Oh, and libtool sucks too. Do we even need it anymore in 2008? APACHE2_MODULE = APACHE2_OUTPUT_DIR + "mod_passenger.so" APACHE2_MODULE_INPUT_FILES = { APACHE2_OUTPUT_DIR + 'Configuration.o' => %w( ext/apache2/Configuration.cpp ext/apache2/Configuration.h ext/apache2/Configuration.hpp ext/common/agents/LoggingAgent/FilterSupport.h), APACHE2_OUTPUT_DIR + 'Bucket.o' => %w( ext/apache2/Bucket.cpp ext/apache2/Bucket.h), APACHE2_OUTPUT_DIR + 'Hooks.o' => %w( ext/apache2/Hooks.cpp ext/apache2/Hooks.h ext/apache2/Configuration.h ext/apache2/Configuration.hpp ext/apache2/Bucket.h ext/apache2/DirectoryMapper.h ext/common/AgentsStarter.h ext/common/Exceptions.h ext/common/Logging.h ext/common/RandomGenerator.h ext/common/ServerInstanceDir.h ext/common/Utils.h ext/common/Utils/Timer.h) } APACHE2_MODULE_OBJECTS = APACHE2_MODULE_INPUT_FILES.keys APACHE2_MOD_PASSENGER_O = APACHE2_OUTPUT_DIR + "mod_passenger.o" APACHE2_MODULE_CFLAGS = "#{EXTRA_PRE_CFLAGS} " << "-Iext -Iext/common #{PlatformInfo.apache2_module_cflags} " << "#{EXTRA_CFLAGS}" APACHE2_MODULE_CXXFLAGS = "#{EXTRA_PRE_CXXFLAGS} " << "-Iext -Iext/common #{PlatformInfo.apache2_module_cflags} " << "#{EXTRA_CXXFLAGS}" APACHE2_MODULE_BOOST_OXT_LIBRARY = define_libboost_oxt_task("apache2", APACHE2_OUTPUT_DIR + "module_libboost_oxt", PlatformInfo.apache2_module_cflags) APACHE2_MODULE_COMMON_LIBRARIES = COMMON_LIBRARY. only(:base, 'ApplicationPool2/AppTypes.o', 'Utils/Base64.o', 'Utils/MD5.o', 'Utils/LargeFiles.o'). set_namespace("apache2"). set_output_dir(APACHE2_OUTPUT_DIR + "module_libpassenger_common"). define_tasks(PlatformInfo.apache2_module_cflags). link_objects auto_generated_sources = [ 'ext/apache2/ConfigurationCommands.cpp', 'ext/apache2/ConfigurationFields.hpp', 'ext/apache2/CreateDirConfig.cpp', 'ext/apache2/MergeDirConfig.cpp', 'ext/apache2/ConfigurationSetters.cpp', 'ext/apache2/SetHeaders.cpp' ] desc "Build Apache 2 module" task :apache2 => [ APACHE2_MODULE, AGENT_OUTPUT_DIR + 'PassengerHelperAgent', AGENT_OUTPUT_DIR + 'PassengerWatchdog', AGENT_OUTPUT_DIR + 'PassengerLoggingAgent', AGENT_OUTPUT_DIR + 'SpawnPreparer', AGENT_OUTPUT_DIR + 'TempDirToucher', NATIVE_SUPPORT_TARGET ].compact # Define rules for the individual Apache 2 module source files. APACHE2_MODULE_INPUT_FILES.each_pair do |target, sources| extra_deps = ['ext/common/Constants.h'] + auto_generated_sources file(target => sources + extra_deps) do object_basename = File.basename(target) object_filename = APACHE2_OUTPUT_DIR + object_basename compile_cxx(sources[0], "#{EXTRA_PRE_CXXFLAGS} " << "#{APACHE2_MODULE_CXXFLAGS} " << "-o #{object_filename} " << "#{EXTRA_CXXFLAGS}") end end dependencies = [ auto_generated_sources, APACHE2_MODULE_COMMON_LIBRARIES, APACHE2_MODULE_BOOST_OXT_LIBRARY, APACHE2_MOD_PASSENGER_O, APACHE2_MODULE_OBJECTS ].flatten file APACHE2_MODULE => dependencies do PlatformInfo.apxs2.nil? and raise "Could not find 'apxs' or 'apxs2'." PlatformInfo.apache2ctl.nil? and raise "Could not find 'apachectl' or 'apache2ctl'." PlatformInfo.httpd.nil? and raise "Could not find the Apache web server binary." sources = (APACHE2_MODULE_OBJECTS + [APACHE2_MOD_PASSENGER_O]).join(' ') linkflags = "#{EXTRA_PRE_CXX_LDFLAGS} " << "#{APACHE2_MODULE_COMMON_LIBRARIES.join(' ')} " << "#{APACHE2_MODULE_BOOST_OXT_LIBRARY} " << "#{PlatformInfo.apache2_module_ldflags} " << "#{PlatformInfo.portability_cxx_ldflags} " << "#{EXTRA_CXX_LDFLAGS} " create_shared_library(APACHE2_MODULE, sources, linkflags) end file APACHE2_MOD_PASSENGER_O => ['ext/apache2/mod_passenger.c'] do compile_c('ext/apache2/mod_passenger.c', "#{EXTRA_PRE_CFLAGS} " << "#{APACHE2_MODULE_CFLAGS} " << "-o #{APACHE2_MOD_PASSENGER_O} " << "#{EXTRA_CFLAGS}") end task :clean => 'apache2:clean' desc "Clean all compiled Apache 2 files" task 'apache2:clean' => 'common:clean' do files = APACHE2_MODULE_OBJECTS.dup files << APACHE2_MOD_PASSENGER_O files << APACHE2_MODULE sh("rm", "-rf", *files) end def create_apache2_auto_generated_source_task(source) dependencies = [ "#{source}.erb", 'lib/phusion_passenger/apache2/config_options.rb' ] file(source => dependencies) do template = TemplateRenderer.new("#{source}.erb") template.render_to(source) end end auto_generated_sources.each do |source| create_apache2_auto_generated_source_task(source) end passenger-4.0.37/build/basics.rb000644 000765 000024 00000017306 12233035540 017113 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. begin require 'rubygems' rescue LoadError end require 'pathname' require 'fileutils' require 'phusion_passenger' PhusionPassenger.locate_directories PhusionPassenger.require_passenger_lib 'packaging' PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/operating_system' PhusionPassenger.require_passenger_lib 'platform_info/binary_compatibility' PhusionPassenger.require_passenger_lib 'platform_info/ruby' PhusionPassenger.require_passenger_lib 'platform_info/apache' PhusionPassenger.require_passenger_lib 'platform_info/curl' PhusionPassenger.require_passenger_lib 'platform_info/zlib' PhusionPassenger.require_passenger_lib 'platform_info/compiler' PhusionPassenger.require_passenger_lib 'platform_info/cxx_portability' include PhusionPassenger include PhusionPassenger::PlatformInfo require 'build/rake_extensions' require 'build/cplusplus_support' ################################################# class TemplateRenderer def initialize(filename) require 'erb' if !defined?(ERB) @erb = ERB.new(File.read(filename), nil, "-") @erb.filename = filename end def render return @erb.result(binding) end def render_to(filename) puts "Creating #{filename}" text = render # When packaging, some timestamps may be modified. The user may not # have write access to the source root (for example, when Passenger # Standalone is compiling its runtime), so we only write to the file # when necessary. if !File.exist?(filename) || File.writable?(filename) || File.read(filename) != text File.open(filename, 'w') do |f| f.write(text) end end end end def string_option(name, default_value = nil) value = ENV[name] if value.nil? || value.empty? return default_value else return value end end def compiler_flag_option(name) return string_option(name, '').gsub("\n", " ") end def boolean_option(name, default_value = false) value = ENV[name] if value.nil? || value.empty? return default_value else return value == "yes" || value == "on" || value == "true" || value == "1" end end def maybe_wrap_in_ccache(command) if boolean_option('USE_CCACHE', false) return "ccache #{command}" else return command end end ################################################# if string_option('OUTPUT_DIR') OUTPUT_DIR = string_option('OUTPUT_DIR') + "/" else OUTPUT_DIR = "buildout/" end verbose true if !boolean_option('REALLY_QUIET') if boolean_option('STDERR_TO_STDOUT') # Just redirecting the file descriptor isn't enough because # data written to STDERR might arrive in an unexpected order # compared to STDOUT. STDERR.reopen(STDOUT) Object.send(:remove_const, :STDERR) STDERR = STDOUT $stderr = $stdout end if boolean_option('CACHING', true) && !boolean_option('RELEASE') PlatformInfo.cache_dir = OUTPUT_DIR + "cache" FileUtils.mkdir_p(PlatformInfo.cache_dir) end ################################################# PACKAGE_NAME = PhusionPassenger::PACKAGE_NAME PACKAGE_VERSION = PhusionPassenger::VERSION_STRING MAINTAINER_NAME = "Phusion" MAINTAINER_EMAIL = "info@phusion.nl" OPTIMIZE = boolean_option("OPTIMIZE") CC = maybe_wrap_in_ccache(PhusionPassenger::PlatformInfo.cc) CXX = maybe_wrap_in_ccache(PhusionPassenger::PlatformInfo.cxx) LIBEXT = PlatformInfo.library_extension USE_DMALLOC = boolean_option('USE_DMALLOC') USE_EFENCE = boolean_option('USE_EFENCE') USE_ASAN = boolean_option('USE_ASAN') # Agent-specific compiler flags. AGENT_CFLAGS = "" AGENT_CFLAGS << " #{PlatformInfo.adress_sanitizer_flag}" if USE_ASAN AGENT_CFLAGS.strip! # Agent-specific linker flags. AGENT_LDFLAGS = "" AGENT_LDFLAGS << " #{PlatformInfo.dmalloc_ldflags}" if USE_DMALLOC AGENT_LDFLAGS << " #{PlatformInfo.electric_fence_ldflags}" if USE_EFENCE AGENT_LDFLAGS << " #{PlatformInfo.adress_sanitizer_flag}" if USE_ASAN # Extra linker flags for backtrace_symbols() to generate useful output (see AgentsBase.cpp). AGENT_LDFLAGS << " #{PlatformInfo.export_dynamic_flags}" # Enable dead symbol elimination on OS X. AGENT_LDFLAGS << " -Wl,-dead_strip" if PlatformInfo.os_name == "macosx" AGENT_LDFLAGS.strip! # Extra compiler flags that should always be passed to the C/C++ compiler. # These should be included first in the command string, before anything else. EXTRA_PRE_CFLAGS = compiler_flag_option('EXTRA_PRE_CFLAGS') EXTRA_PRE_CXXFLAGS = compiler_flag_option('EXTRA_PRE_CXXFLAGS') # These should be included last in the command string. EXTRA_CFLAGS = PlatformInfo.default_extra_cflags.dup EXTRA_CFLAGS << " " << compiler_flag_option('EXTRA_CFLAGS') if !compiler_flag_option('EXTRA_CFLAGS').empty? EXTRA_CXXFLAGS = PlatformInfo.default_extra_cxxflags.dup EXTRA_CXXFLAGS << " " << compiler_flag_option('EXTRA_CXXFLAGS') if !compiler_flag_option('EXTRA_CXXFLAGS').empty? [EXTRA_CFLAGS, EXTRA_CXXFLAGS].each do |flags| flags << " -fno-omit-frame-pointers" if USE_ASAN flags << " -DPASSENGER_DISABLE_THREAD_LOCAL_STORAGE" if !boolean_option('PASSENGER_THREAD_LOCAL_STORAGE', true) end # Extra linker flags that should always be passed to the linker. # These should be included first in the command string. EXTRA_PRE_C_LDFLAGS = compiler_flag_option('EXTRA_PRE_LDFLAGS') + " " + compiler_flag_option('EXTRA_PRE_C_LDFLAGS') EXTRA_PRE_CXX_LDFLAGS = compiler_flag_option('EXTRA_PRE_LDFLAGS') + " " + compiler_flag_option('EXTRA_PRE_CXX_LDFLAGS') # These should be included last in the command string, even after portability_*_ldflags. EXTRA_C_LDFLAGS = compiler_flag_option('EXTRA_LDFLAGS') + " " + compiler_flag_option('EXTRA_C_LDFLAGS') EXTRA_CXX_LDFLAGS = compiler_flag_option('EXTRA_LDFLAGS') + " " + compiler_flag_option('EXTRA_CXX_LDFLAGS') AGENT_OUTPUT_DIR = string_option('AGENT_OUTPUT_DIR', OUTPUT_DIR + "agents") + "/" COMMON_OUTPUT_DIR = string_option('COMMON_OUTPUT_DIR', OUTPUT_DIR + "common") + "/" APACHE2_OUTPUT_DIR = string_option('APACHE2_OUTPUT_DIR', OUTPUT_DIR + "apache2") + "/" LIBEV_OUTPUT_DIR = string_option('LIBEV_OUTPUT_DIR', OUTPUT_DIR + "libev") + "/" LIBEIO_OUTPUT_DIR = string_option('LIBEIO_OUTPUT_DIR', OUTPUT_DIR + "libeio") + "/" ruby_extension_archdir = PlatformInfo.ruby_extension_binary_compatibility_id RUBY_EXTENSION_OUTPUT_DIR = string_option('RUBY_EXTENSION_OUTPUT_DIR', OUTPUT_DIR + "ruby/" + ruby_extension_archdir) + "/" PKG_DIR = string_option('PKG_DIR', "pkg") # Whether to use the vendored libev or the system one. USE_VENDORED_LIBEV = boolean_option("USE_VENDORED_LIBEV", true) # Whether to use the vendored libeio or the system one. USE_VENDORED_LIBEIO = boolean_option("USE_VENDORED_LIBEIO", true) passenger-4.0.37/build/common_library.rb000644 000765 000024 00000020541 12233035540 020656 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'platform_info/compiler' PhusionPassenger.require_passenger_lib 'platform_info/cxx_portability' ########## Phusion Passenger common library ########## PhusionPassenger.require_passenger_lib 'common_library' ########## libboost_oxt ########## # Defines tasks for compiling a static library containing Boost and OXT. def define_libboost_oxt_task(namespace, output_dir, extra_compiler_flags = nil) output_file = "#{output_dir}.a" flags = "-Iext #{extra_compiler_flags} #{EXTRA_CXXFLAGS}" if false && boolean_option('RELEASE') # Disable RELEASE support. Passenger Standalone wants to link to the # common library but does not know whether it was compiled with RELEASE # or not. See http://code.google.com/p/phusion-passenger/issues/detail?id=808 sources = Dir['ext/boost/libs/**/*.cpp'] + Dir['ext/oxt/*.cpp'] sources.sort! aggregate_source = "#{output_dir}/aggregate.cpp" aggregate_object = "#{output_dir}/aggregate.o" object_files = [aggregate_object] file(aggregate_object => sources) do sh "mkdir -p #{output_dir}" if !File.directory?(output_dir) aggregate_content = %Q{ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif } sources.each do |source_file| name = source_file.sub(/^ext\//, '') aggregate_content << "#include \"#{name}\"\n" end File.open(aggregate_source, 'w') do |f| f.write(aggregate_content) end compile_cxx(aggregate_source, "#{flags} -o #{aggregate_object}") end else # Define compilation targets for .cpp files in ext/boost/src/pthread. boost_object_files = [] Dir['ext/boost/libs/**/*.cpp'].each do |source_file| object_name = File.basename(source_file.sub(/\.cpp$/, '.o')) boost_output_dir = "#{output_dir}/boost" object_file = "#{boost_output_dir}/#{object_name}" boost_object_files << object_file file object_file => source_file do sh "mkdir -p #{boost_output_dir}" if !File.directory?(boost_output_dir) compile_cxx(source_file, "#{flags} -o #{object_file}") end end # Define compilation targets for .cpp files in ext/oxt. oxt_object_files = [] oxt_dependency_files = Dir["ext/oxt/*.hpp"] + Dir["ext/oxt/detail/*.hpp"] Dir['ext/oxt/*.cpp'].each do |source_file| object_name = File.basename(source_file.sub(/\.cpp$/, '.o')) oxt_output_dir = "#{output_dir}/oxt" object_file = "#{oxt_output_dir}/#{object_name}" oxt_object_files << object_file file object_file => [source_file, *oxt_dependency_files] do sh "mkdir -p #{oxt_output_dir}" if !File.directory?(oxt_output_dir) compile_cxx(source_file, "#{flags} -o #{object_file}") end end object_files = boost_object_files + oxt_object_files end file(output_file => object_files) do sh "mkdir -p #{output_dir}" create_static_library(output_file, object_files.join(' ')) end task "#{namespace}:clean" do sh "rm -rf #{output_file} #{output_dir}" end return output_file end ########## libev ########## if USE_VENDORED_LIBEV LIBEV_SOURCE_DIR = File.expand_path("../ext/libev", File.dirname(__FILE__)) + "/" LIBEV_CFLAGS = "-Iext/libev" LIBEV_LIBS = LIBEV_OUTPUT_DIR + ".libs/libev.a" LIBEV_TARGET = LIBEV_LIBS task :libev => LIBEV_TARGET dependencies = [ "ext/libev/configure", "ext/libev/config.h.in", "ext/libev/Makefile.am" ] file LIBEV_OUTPUT_DIR + "Makefile" => dependencies do cc = PlatformInfo.cc cxx = PlatformInfo.cxx # Disable all warnings: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#COMPILER_WARNINGS cflags = "#{EXTRA_CFLAGS} -w" sh "mkdir -p #{LIBEV_OUTPUT_DIR}" if !File.directory?(LIBEV_OUTPUT_DIR) sh "cd #{LIBEV_OUTPUT_DIR} && sh #{LIBEV_SOURCE_DIR}configure " + "--disable-shared --enable-static " + # libev's configure script may select a different default compiler than we # do, so we force our compiler choice. "CC='#{cc}' CXX='#{cxx}' CFLAGS='#{cflags}' orig_CFLAGS=1" end libev_sources = Dir["ext/libev/{*.c,*.h}"] file LIBEV_OUTPUT_DIR + ".libs/libev.a" => [LIBEV_OUTPUT_DIR + "Makefile"] + libev_sources do sh "rm -f #{LIBEV_OUTPUT_DIR}/libev.la" sh "cd #{LIBEV_OUTPUT_DIR} && make libev.la" end task 'libev:clean' do if File.exist?(LIBEV_OUTPUT_DIR + "Makefile") sh "cd #{LIBEV_OUTPUT_DIR} && make maintainer-clean" end end task :clean => 'libev:clean' else LIBEV_CFLAGS = string_option('LIBEV_CFLAGS', '-I/usr/include/libev') LIBEV_LIBS = string_option('LIBEV_LIBS', '-lev') LIBEV_TARGET = nil task :libev # do nothing end # Apple Clang 4.2 complains about ambiguous member templates in ev++.h. LIBEV_CFLAGS << " -Wno-ambiguous-member-template" if PlatformInfo.compiler_supports_wno_ambiguous_member_template? ########## libeio ########## if USE_VENDORED_LIBEIO LIBEIO_SOURCE_DIR = File.expand_path("../ext/libeio", File.dirname(__FILE__)) + "/" LIBEIO_CFLAGS = "-Iext/libeio" LIBEIO_LIBS = LIBEIO_OUTPUT_DIR + ".libs/libeio.a" LIBEIO_TARGET = LIBEIO_LIBS task :libeio => LIBEIO_TARGET dependencies = [ "ext/libeio/configure", "ext/libeio/config.h.in", "ext/libeio/Makefile.am" ] file LIBEIO_OUTPUT_DIR + "Makefile" => dependencies do cc = PlatformInfo.cc cxx = PlatformInfo.cxx # Disable all warnings. The author has a clear standpoint on that: # http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#COMPILER_WARNINGS cflags = "#{EXTRA_CFLAGS} -w" sh "mkdir -p #{LIBEIO_OUTPUT_DIR}" if !File.directory?(LIBEIO_OUTPUT_DIR) sh "cd #{LIBEIO_OUTPUT_DIR} && sh #{LIBEIO_SOURCE_DIR}configure " + "--disable-shared --enable-static " + # libeio's configure script may select a different default compiler than we # do, so we force our compiler choice. "CC='#{cc}' CXX='#{cxx}' CFLAGS='#{cflags}'" end libeio_sources = Dir["ext/libeio/{*.c,*.h}"] file LIBEIO_OUTPUT_DIR + ".libs/libeio.a" => [LIBEIO_OUTPUT_DIR + "Makefile"] + libeio_sources do sh "rm -f #{LIBEIO_OUTPUT_DIR}/libeio.la" sh "cd #{LIBEIO_OUTPUT_DIR} && make libeio.la" end task :clean do if File.exist?(LIBEIO_OUTPUT_DIR + "Makefile") sh "cd #{LIBEIO_OUTPUT_DIR} && make maintainer-clean" end end else LIBEIO_CFLAGS = string_option('LIBEIO_CFLAGS', '-I/usr/include/libeio') LIBEIO_LIBS = string_option('LIBEIO_LIBS', '-leio') LIBEIO_TARGET = nil task :libeio # do nothing end ########## Shared definitions ########## # Shared definition files should be in source control so that they don't # have to be built by users. Users may not have write access to the source # root, for example as is the case with Passenger Standalone. # # If you add a new shared definition file, don't forget to update # lib/phusion_passenger/packaging.rb! dependencies = ['ext/common/Constants.h.erb', 'lib/phusion_passenger.rb', 'lib/phusion_passenger/constants.rb'] file 'ext/common/Constants.h' => dependencies do PhusionPassenger.require_passenger_lib 'constants' template = TemplateRenderer.new('ext/common/Constants.h.erb') template.render_to('ext/common/Constants.h') end ############################## libboost_oxt_cflags = "" libboost_oxt_cflags << " #{PlatformInfo.adress_sanitizer_flag}" if USE_ASAN libboost_oxt_cflags.strip! LIBBOOST_OXT = define_libboost_oxt_task("common", COMMON_OUTPUT_DIR + "libboost_oxt", libboost_oxt_cflags) COMMON_LIBRARY.define_tasks(libboost_oxt_cflags) passenger-4.0.37/build/cplusplus_support.rb000644 000765 000024 00000010211 12233035540 021461 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # Rake functions for compiling/linking C++ stuff. def run_compiler(*command) PhusionPassenger.require_passenger_lib 'utils/ansi_colors' if !defined?(PhusionPassenger::Utils::AnsiColors) show_command = command.join(' ') puts show_command if !system(*command) if $? && $?.exitstatus == 4 # This probably means the compiler ran out of memory. msg = "" + "-----------------------------------------------\n" + "Your compiler failed with the exit status 4. This " + "probably means that it ran out of memory. To solve " + "this problem, try increasing your swap space: " + "https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04" + "" fail(PhusionPassenger::Utils::AnsiColors.ansi_colorize(msg)) elsif $? && $?.termsig == 9 msg = "" + "-----------------------------------------------\n" + "Your compiler was killed by the operating system. This " + "probably means that it ran out of memory. To solve " + "this problem, try increasing your swap space: " + "https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04" + "" fail(PhusionPassenger::Utils::AnsiColors.ansi_colorize(msg)) else fail "Command failed with status (#{$? ? $?.exitstatus : 1}): [#{show_command}]" end end end def compile_c(source, flags = "#{EXTRA_PRE_CFLAGS} #{EXTRA_CFLAGS}") run_compiler "#{CC} #{flags} -c #{source}" end def compile_cxx(source, flags = "#{EXTRA_PRE_CXXFLAGS} #{EXTRA_CXXFLAGS}") run_compiler "#{CXX} #{flags} -c #{source}" end def create_static_library(target, sources) # On OS X, 'ar cru' will sometimes fail with an obscure error: # # ar: foo.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it) # ar: foo.a: Inappropriate file type or format # # So here we delete the ar file before creating it, which bypasses this problem. sh "rm -rf #{target}" sh "ar cru #{target} #{sources}" sh "ranlib #{target}" end def create_executable(target, sources, linkflags = "#{EXTRA_PRE_CXXFLAGS} #{EXTRA_PRE_C_LDFLAGS} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_cxx_ldflags} #{EXTRA_CXX_LDFLAGS}") run_compiler "#{CXX} #{sources} -o #{target} #{linkflags}" end def create_c_executable(target, sources, linkflags = "#{EXTRA_PRE_CFLAGS} #{EXTRA_PRE_CXX_LDFLAGS}#{EXTRA_CFLAGS} #{PlatformInfo.portability_c_ldflags} #{EXTRA_C_LDFLAGS}") run_compiler "#{CC} #{sources} -o #{target} #{linkflags}" end def create_shared_library(target, sources, flags = "#{EXTRA_PRE_CXXFLAGS} #{EXTRA_PRE_CXX_LDFLAGS} #{EXTRA_CXXFLAGS} #{PlatformInfo.portability_cxx_ldflags} #{EXTRA_CXX_LDFLAGS}") if PlatformInfo.os_name == "macosx" shlib_flag = "-flat_namespace -bundle -undefined dynamic_lookup" else shlib_flag = "-shared" end if PhusionPassenger::PlatformInfo.cc_is_sun_studio? fPIC = "-KPIC" else fPIC = "-fPIC" end run_compiler "#{CXX} #{shlib_flag} #{sources} #{fPIC} -o #{target} #{flags}" end passenger-4.0.37/build/cxx_tests.rb000644 000765 000024 00000024315 12233035540 017671 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ### C++ components tests ### TEST_CXX_CFLAGS = "-Iext -Iext/common " << "#{EXTRA_PRE_CXXFLAGS} " << "#{LIBEV_CFLAGS} #{LIBEIO_CFLAGS} #{PlatformInfo.curl_flags} -Itest/cxx -Itest/support " << "#{TEST_COMMON_CFLAGS}" TEST_CXX_CFLAGS << " #{PlatformInfo.adress_sanitizer_flag}" if USE_ASAN TEST_CXX_LDFLAGS = "#{EXTRA_PRE_CXX_LDFLAGS} " << "#{TEST_COMMON_LIBRARY.link_objects_as_string} " << "#{TEST_BOOST_OXT_LIBRARY} #{LIBEV_LIBS} #{LIBEIO_LIBS} " << "#{PlatformInfo.curl_libs} " << "#{PlatformInfo.zlib_libs} " << "#{PlatformInfo.portability_cxx_ldflags}" TEST_CXX_LDFLAGS << " #{PlatformInfo.dmalloc_ldflags}" if USE_DMALLOC TEST_CXX_LDFLAGS << " #{PlatformInfo.adress_sanitizer_flag}" if USE_ASAN TEST_CXX_LDFLAGS << " #{EXTRA_CXX_LDFLAGS}" TEST_CXX_LDFLAGS.strip! TEST_CXX_OBJECTS = { 'test/cxx/CxxTestMain.o' => %w( test/cxx/CxxTestMain.cpp), 'test/cxx/TestSupport.o' => %w( test/cxx/TestSupport.cpp test/cxx/TestSupport.h ext/common/SafeLibev.h ext/common/BackgroundEventLoop.cpp ext/common/Exceptions.h ext/common/Utils.h), 'test/cxx/ApplicationPool2/OptionsTest.o' => %w( test/cxx/ApplicationPool2/OptionsTest.cpp ext/common/ApplicationPool2/Options.h), 'test/cxx/ApplicationPool2/DirectSpawnerTest.o' => %w( test/cxx/ApplicationPool2/DirectSpawnerTest.cpp test/cxx/ApplicationPool2/SpawnerTestCases.cpp ext/common/ApplicationPool2/Options.h ext/common/ApplicationPool2/Process.h ext/common/ApplicationPool2/Socket.h ext/common/ApplicationPool2/Spawner.h ext/common/ApplicationPool2/DirectSpawner.h), 'test/cxx/ApplicationPool2/SmartSpawnerTest.o' => %w( test/cxx/ApplicationPool2/SmartSpawnerTest.cpp test/cxx/ApplicationPool2/SpawnerTestCases.cpp ext/common/ApplicationPool2/Options.h ext/common/ApplicationPool2/Process.h ext/common/ApplicationPool2/Socket.h ext/common/ApplicationPool2/Spawner.h ext/common/ApplicationPool2/SmartSpawner.h), 'test/cxx/ApplicationPool2/ProcessTest.o' => %w( test/cxx/ApplicationPool2/ProcessTest.cpp ext/common/ApplicationPool2/Process.h ext/common/ApplicationPool2/Socket.h ext/common/ApplicationPool2/Session.h), 'test/cxx/ApplicationPool2/PoolTest.o' => %w( test/cxx/ApplicationPool2/PoolTest.cpp ext/common/ApplicationPool2/SuperGroup.h ext/common/ApplicationPool2/Group.h ext/common/ApplicationPool2/Pool.h ext/common/ApplicationPool2/Process.h ext/common/ApplicationPool2/Socket.h ext/common/ApplicationPool2/Options.h ext/common/ApplicationPool2/Spawner.h ext/common/ApplicationPool2/SpawnerFactory.h ext/common/ApplicationPool2/SmartSpawner.h ext/common/ApplicationPool2/DirectSpawner.h ext/common/ApplicationPool2/DummySpawner.h), 'test/cxx/MessageReadersWritersTest.o' => %w( test/cxx/MessageReadersWritersTest.cpp ext/common/MessageReadersWriters.h ext/common/Exceptions.h ext/common/StaticString.h ext/common/Utils/MemZeroGuard.h), 'test/cxx/StaticStringTest.o' => %w( test/cxx/StaticStringTest.cpp ext/common/StaticString.h), 'test/cxx/Base64Test.o' => %w( test/cxx/Base64Test.cpp ext/common/Utils/Base64.h ext/common/Utils/Base64.cpp), 'test/cxx/ScgiRequestParserTest.o' => %w( test/cxx/ScgiRequestParserTest.cpp ext/common/agents/HelperAgent/ScgiRequestParser.h ext/common/StaticString.h), 'test/cxx/DechunkerTest.o' => %w( test/cxx/DechunkerTest.cpp ext/common/Utils/Dechunker.h), 'test/cxx/HttpHeaderBuffererTest.o' => %w( test/cxx/HttpHeaderBuffererTest.cpp ext/common/Utils/HttpHeaderBufferer.h ext/common/Utils/StreamBoyerMooreHorspool.h), 'test/cxx/UnionStationTest.o' => %w( test/cxx/UnionStationTest.cpp ext/common/agents/LoggingAgent/LoggingServer.h ext/common/agents/LoggingAgent/RemoteSender.h ext/common/agents/LoggingAgent/DataStoreId.h ext/common/agents/LoggingAgent/FilterSupport.h ext/common/UnionStation.h ext/common/Utils.h ext/common/EventedServer.h ext/common/EventedClient.h ext/common/EventedMessageServer.h ext/common/MessageReadersWriters.h ext/common/MessageClient.h), 'test/cxx/EventedClientTest.o' => %w( test/cxx/EventedClientTest.cpp ext/common/EventedClient.h), 'test/cxx/EventedBufferedInput.o' => %w( test/cxx/EventedBufferedInputTest.cpp ext/common/EventedBufferedInput.h), 'test/cxx/MessageServerTest.o' => %w( test/cxx/MessageServerTest.cpp ext/common/Logging.h ext/common/Account.h ext/common/AccountsDatabase.h ext/common/MessageServer.h), 'test/cxx/ServerInstanceDir.o' => %w( test/cxx/ServerInstanceDirTest.cpp ext/common/ServerInstanceDir.h ext/common/Utils.h), 'test/cxx/RequestHandlerTest.o' => %w( test/cxx/RequestHandlerTest.cpp ext/common/agents/HelperAgent/RequestHandler.h ext/common/agents/HelperAgent/FileBackedPipe.h ext/common/agents/HelperAgent/ScgiRequestParser.h ext/common/agents/HelperAgent/AgentOptions.h ext/common/UnionStation.h ext/common/ApplicationPool2/Pool.h ext/common/ApplicationPool2/SuperGroup.h ext/common/ApplicationPool2/Group.h ext/common/ApplicationPool2/Process.h ext/common/ApplicationPool2/Options.h ext/common/ApplicationPool2/Spawner.h ext/common/ApplicationPool2/SpawnerFactory.h ext/common/ApplicationPool2/SmartSpawner.h ext/common/ApplicationPool2/DirectSpawner.h ext/common/ApplicationPool2/DummySpawner.h), 'test/cxx/FileBackedPipeTest.o' => %w( test/cxx/FileBackedPipeTest.cpp ext/common/agents/HelperAgent/FileBackedPipe.h), 'test/cxx/FileChangeCheckerTest.o' => %w( test/cxx/FileChangeCheckerTest.cpp ext/common/Utils/FileChangeChecker.h ext/common/Utils/CachedFileStat.hpp), 'test/cxx/FileDescriptorTest.o' => %w( test/cxx/FileDescriptorTest.cpp ext/common/FileDescriptor.h), 'test/cxx/SystemTimeTest.o' => %w( test/cxx/SystemTimeTest.cpp ext/common/Utils/SystemTime.h ext/common/Utils/SystemTime.cpp), 'test/cxx/FilterSupportTest.o' => %w( test/cxx/FilterSupportTest.cpp ext/common/agents/LoggingAgent/FilterSupport.h), 'test/cxx/CachedFileStatTest.o' => %w( test/cxx/CachedFileStatTest.cpp ext/common/Utils/CachedFileStat.hpp ext/common/Utils/CachedFileStat.cpp), 'test/cxx/BufferedIOTest.o' => %w( test/cxx/BufferedIOTest.cpp ext/common/Utils/BufferedIO.h ext/common/Utils/Timer.h), 'test/cxx/MessageIOTest.o' => %w( test/cxx/MessageIOTest.cpp ext/common/Utils/MessageIO.h ext/common/Utils/IOUtils.h), 'test/cxx/MessagePassingTest.o' => %w( test/cxx/MessagePassingTest.cpp ext/common/Utils/MessagePassing.h), 'test/cxx/VariantMapTest.o' => %w( test/cxx/VariantMapTest.cpp ext/common/Utils/VariantMap.h), 'test/cxx/StringMapTest.o' => %w( test/cxx/StringMapTest.cpp ext/common/Utils/StringMap.h ext/common/Utils/HashMap.h), 'test/cxx/ProcessMetricsCollectorTest.o' => %w( test/cxx/ProcessMetricsCollectorTest.cpp ext/common/Utils/ProcessMetricsCollector.h), 'test/cxx/UtilsTest.o' => %w( test/cxx/UtilsTest.cpp ext/common/Utils.h), 'test/cxx/IOUtilsTest.o' => %w( test/cxx/IOUtilsTest.cpp ext/common/Utils/IOUtils.h), 'test/cxx/TemplateTest.o' => %w( test/cxx/TemplateTest.cpp ext/common/Utils/Template.h) } dependencies = [ 'test/cxx/CxxTestMain', 'test/support/allocate_memory', NATIVE_SUPPORT_TARGET, AGENT_OUTPUT_DIR + 'SpawnPreparer', AGENT_OUTPUT_DIR + 'TempDirToucher', AGENT_OUTPUT_DIR + 'EnvPrinter' ].compact desc "Run unit tests for the Apache 2 and Nginx C++ components" task 'test:cxx' => dependencies do args = ENV['GROUPS'].to_s.split(",").map{ |name| "-g #{name}" } command = "./cxx/CxxTestMain #{args.join(' ')}".strip if boolean_option('GDB') command = "gdb --args #{command}" elsif boolean_option('VALGRIND') command = "valgrind --dsymutil=yes --db-attach=yes --child-silent-after-fork=yes #{command}" end if boolean_option('SUDO') command = "#{PlatformInfo.ruby_sudo_command} #{command}" end if boolean_option('REPEAT') if boolean_option('GDB') abort "You cannot set both REPEAT=1 and GDB=1." end sh "cd test && while #{command}; do echo -------------------------------------------; done" else sh "cd test && exec #{command}" end end dependencies = [ TEST_CXX_OBJECTS.keys, LIBEV_TARGET, LIBEIO_TARGET, TEST_BOOST_OXT_LIBRARY, TEST_COMMON_LIBRARY.link_objects, 'ext/common/Constants.h', 'ext/common/MultiLibeio.cpp' ].flatten.compact file 'test/cxx/CxxTestMain' => dependencies.flatten do objects = TEST_CXX_OBJECTS.keys.join(' ') create_executable("test/cxx/CxxTestMain", objects, TEST_CXX_LDFLAGS) end deps = [ 'test/cxx/TestSupport.h', 'test/tut/tut.h', 'ext/oxt/thread.hpp', 'ext/oxt/tracable_exception.hpp', 'ext/common/Constants.h', 'ext/common/ServerInstanceDir.h', 'ext/common/Exceptions.h', 'ext/common/Utils.h', 'ext/common/Utils/SystemTime.h' ] file 'test/cxx/TestSupport.h.gch' => deps do compile_cxx 'test/cxx/TestSupport.h', "-x c++-header -o test/cxx/TestSupport.h.gch #{TEST_CXX_CFLAGS}" end TEST_CXX_OBJECTS.each_pair do |target, sources| extra_deps = ['test/cxx/TestSupport.h', 'test/cxx/TestSupport.h.gch', 'ext/common/Constants.h'] file(target => sources + extra_deps) do # To use precompiled headers in Clang, we must -include them on them command line. compile_cxx sources[0], "-o #{target} -include test/cxx/TestSupport.h #{TEST_CXX_CFLAGS}" end end passenger-4.0.37/build/debian.rb000644 000765 000024 00000020034 12233035540 017061 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. PhusionPassenger.require_passenger_lib 'constants' require 'build/preprocessor' # If you change the default distribution list, don't forget to update the configuration # file in passenger_apt_automation too: https://github.com/phusion/passenger_apt_automation ALL_DISTRIBUTIONS = string_option("DEBIAN_DISTROS", "raring precise lucid").split(/[ ,]/) DEBIAN_NAME = "passenger" DEBIAN_EPOCH = 1 DEBIAN_ARCHS = string_option("DEBIAN_ARCHS", "i386 amd64").split(/[ ,]/) DEBIAN_ORIG_TARBALL_FILES = lambda { PhusionPassenger::Packaging.debian_orig_tarball_files } def create_debian_package_dir(distribution, output_dir = PKG_DIR) require 'time' variables = { :distribution => distribution } root = "#{output_dir}/#{distribution}" orig_tarball = File.expand_path("#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz") sh "rm -rf #{root}" sh "mkdir -p #{root}" sh "cd #{root} && tar xzf #{orig_tarball}" sh "bash -c 'shopt -s dotglob && mv #{root}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}/* #{root}'" sh "rmdir #{root}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}" recursive_copy_files(Dir["debian.template/**/*"], root, true, variables) sh "mv #{root}/debian.template #{root}/debian" changelog = File.read("#{root}/debian/changelog") changelog = "#{DEBIAN_NAME} (#{DEBIAN_EPOCH}:#{PACKAGE_VERSION}-1~#{distribution}1) #{distribution}; urgency=low\n" + "\n" + " * Package built.\n" + "\n" + " -- #{MAINTAINER_NAME} <#{MAINTAINER_EMAIL}> #{Time.now.rfc2822}\n\n" + changelog File.open("#{root}/debian/changelog", "w") do |f| f.write(changelog) end end task 'debian:orig_tarball' => Packaging::PREGENERATED_FILES do if File.exist?("#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz") puts "WARNING: Debian orig tarball #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz already exists. " + "It will not be regenerated. If you are sure that the orig tarball is outdated, please delete it " + "and rerun this task." else sh "mkdir -p #{PKG_DIR}" nginx_version = PhusionPassenger::PREFERRED_NGINX_VERSION local_nginx_tarball = File.expand_path("#{PKG_DIR}/nginx-#{nginx_version}.tar.gz") if File.exist?(local_nginx_tarball) puts "#{local_nginx_tarball} already exists" else sh "curl -L -o #{local_nginx_tarball} http://nginx.org/download/nginx-#{nginx_version}.tar.gz" end sh "rm -rf #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}" sh "mkdir -p #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}" recursive_copy_files(DEBIAN_ORIG_TARBALL_FILES.call, "#{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}") sh "cd #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION} && tar xzf #{local_nginx_tarball}" sh "cd #{PKG_DIR} && find #{DEBIAN_NAME}_#{PACKAGE_VERSION} -print0 | xargs -0 touch -d '2013-10-27 00:00:00 UTC'" sh "cd #{PKG_DIR} && tar -c #{DEBIAN_NAME}_#{PACKAGE_VERSION} | gzip --no-name --best > #{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz" end end desc "Build Debian source and binary package(s) for local testing" task 'debian:dev' do sh "rm -f #{PKG_DIR}/#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz" Rake::Task["debian:clean"].invoke Rake::Task["debian:orig_tarball"].invoke if string_option('DISTRO').nil? distributions = [File.read("/etc/lsb-release").scan(/^DISTRIB_CODENAME=(.+)/).first.first] else distributions = ALL_DISTRIBUTIONS end distributions.each do |distribution| create_debian_package_dir(distribution) sh "cd #{PKG_DIR}/#{distribution} && dpkg-checkbuilddeps" end distributions.each do |distribution| sh "cd #{PKG_DIR}/#{distribution} && debuild -F -us -uc" end end desc "(Re)install the Debian binary packages built for local testing" task 'debian:dev:reinstall' do package_names = ["passenger", "passenger-dev", "passenger-doc", "libapache2-mod-passenger"] package_names.each do |name| if Dir["#{PKG_DIR}/#{name}_*.deb"].size > 1 abort "Please ensure that #{PKG_DIR} only has 1 version of the Phusion Passenger packages." end end package_names.each do |name| if !system "sudo apt-get remove -y #{name}" if !$? || $?.exitstatus != 100 abort end end end package_names.each do |name| filename = Dir["#{PKG_DIR}/#{name}_*.deb"].first sh "sudo gdebi -n #{filename}" end end desc "Build official Debian source packages" task 'debian:source_packages' => 'debian:orig_tarball' do if boolean_option('USE_CCACHE', false) # The resulting Debian rules file must not set USE_CCACHE. abort "USE_CCACHE must be returned off when running the debian:source_packages task." end pkg_dir = "#{PKG_DIR}/official" if File.exist?(pkg_dir) abort "#{pkg_dir} must not already exist when running the debian:source_packages task." end sh "mkdir #{pkg_dir}" sh "cd #{pkg_dir} && ln -s ../#{DEBIAN_NAME}_#{PACKAGE_VERSION}.orig.tar.gz ." ALL_DISTRIBUTIONS.each do |distribution| create_debian_package_dir(distribution, pkg_dir) end ALL_DISTRIBUTIONS.each do |distribution| sh "cd #{pkg_dir}/#{distribution} && debuild -S -us -uc" end end def pbuilder_base_name(distribution, arch) if arch == "amd64" return distribution else return "#{distribution}-#{arch}" end end def create_debian_binary_package_task(distribution, arch) task "debian:binary_package:#{distribution}_#{arch}" => 'debian:binary_packages:check' do require 'shellwords' base_name = "#{DEBIAN_NAME}_#{PACKAGE_VERSION}-1~#{distribution}1" logfile = "#{PKG_DIR}/official/passenger_#{distribution}_#{arch}.log" command = "cd #{PKG_DIR}/official && " + "pbuilder-dist #{distribution} #{arch} build #{base_name}.dsc " + "2>&1 | awk '{ print strftime(\"%Y-%m-%d %H:%M:%S -- \"), $0; fflush(); }'" + " | tee #{logfile}" sh "bash -c #{Shellwords.escape(command)}" sh "echo Done >> #{logfile}" end end DEBIAN_BINARY_PACKAGE_TASKS = [] ALL_DISTRIBUTIONS.each do |distribution| DEBIAN_ARCHS.each do |arch| task = create_debian_binary_package_task(distribution, arch) DEBIAN_BINARY_PACKAGE_TASKS << task end end task 'debian:binary_packages:check' do pkg_dir = "#{PKG_DIR}/official" if !File.exist?(pkg_dir) abort "Please run rake debian:source_packages first." end pbuilder_dir = File.expand_path("~/pbuilder") ALL_DISTRIBUTIONS.each do |distribution| DEBIAN_ARCHS.each do |arch| pbase_name = pbuilder_base_name(distribution, arch) + "-base.tgz" if !File.exist?("#{pbuilder_dir}/#{pbase_name}") abort "Missing pbuilder environment for #{distribution}-#{arch}. " + "Please run this first: pbuilder-dist #{distribution} #{arch} create" end end end end desc "Build official Debian binary packages" task 'debian:binary_packages' => DEBIAN_BINARY_PACKAGE_TASKS desc "Clean Debian packaging products, except for orig tarball" task 'debian:clean' do files = Dir["#{PKG_DIR}/*.{changes,build,deb,dsc,upload}"] sh "rm -f #{files.join(' ')}" sh "rm -rf #{PKG_DIR}/official" ALL_DISTRIBUTIONS.each do |distribution| sh "rm -rf #{PKG_DIR}/#{distribution}" end sh "rm -rf #{PKG_DIR}/*.debian.tar.gz" end passenger-4.0.37/build/documentation.rb000644 000765 000024 00000005637 12233035540 020524 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010, 2011, 2012 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. desc "Generate all documentation" task :doc => Packaging::ASCII_DOCS Packaging::ASCII_DOCS.each do |target| source = target.sub(/\.html$/, '.txt') file target => [source] + Dir["doc/users_guide_snippets/**/*"] do if target =~ /apache/i type = "apache" juvia_site_key = "5jpmkyjqlml8rktsfldfpbwth8ig7w9" elsif target =~ /nginx/i type = "nginx" juvia_site_key = "q0ptarhn8o9xanwomq8zkgewbtwffyz" elsif target =~ /standalone/i type = "standalone" juvia_site_key = "amggdy0k65hb4hbjg3dh7pnb9zd8dwy" else type = nil juvia_site_key = nil end command = "mizuho '#{source}'" command << " -a #{type}" if type if juvia_site_key command << " -c juvia --juvia-url http://juvia.phusion.nl --juvia-site-key #{juvia_site_key}" end sh(command) end task :clean do if boolean_option('CLEAN_DOCS', true) sh "rm -f '#{target}'" end end end def create_markdown_compilation_task(target) source = target.sub(/\.html$/, '.txt.md') dependencies = [ source, 'doc/templates/markdown.html.erb', 'doc/templates/bootstrap.min.css' ] file(target => dependencies) do sh "bluecloth -f #{source} > #{target}.tmp" begin puts "Creating #{target}" require 'erb' template = ERB.new(File.read('doc/templates/markdown.html.erb')) title = File.basename(target, '.html') content = File.read("#{target}.tmp") css = File.read('doc/templates/bootstrap.min.css') data = template.result(binding) File.open(target, 'w') do |f| f.write(data) end ensure sh "rm -f #{target}.tmp" end end task :doc => target task :clean do if boolean_option('CLEAN_DOCS', true) sh "rm -f #{target}" end end end create_markdown_compilation_task('doc/Packaging.html') passenger-4.0.37/build/integration_tests.rb000644 000765 000024 00000012343 12233035540 021410 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ### Integration tests ### desc "Run all integration tests" task 'test:integration' => ['test:integration:apache2', 'test:integration:nginx'] do end dependencies = [:apache2, NATIVE_SUPPORT_TARGET].compact desc "Run Apache 2 integration tests" task 'test:integration:apache2' => dependencies do if PlatformInfo.rspec.nil? abort "RSpec is not installed for Ruby interpreter '#{PlatformInfo.ruby_command}'. Please install it." else command = "#{PlatformInfo.rspec} -c -f s integration_tests/apache2_tests.rb" if boolean_option('SUDO') command = "#{PlatformInfo.ruby_sudo_command} -E #{command}" end if grep = string_option('E') require 'shellwords' command << " -e #{Shellwords.escape(grep)}" end sh "cd test && exec #{command}" end end dependencies = [:nginx, NATIVE_SUPPORT_TARGET].compact desc "Run Nginx integration tests" task 'test:integration:nginx' => dependencies do if PlatformInfo.rspec.nil? abort "RSpec is not installed for Ruby interpreter '#{PlatformInfo.ruby_command}'. Please install it." else command = "#{PlatformInfo.rspec} -c -f s integration_tests/nginx_tests.rb" if boolean_option('SUDO') command = "#{PlatformInfo.ruby_sudo_command} -E #{command}" end if grep = string_option('E') require 'shellwords' command << " -e #{Shellwords.escape(grep)}" end repeat = true while repeat sh "cd test && exec #{command}" repeat = boolean_option('REPEAT') end end end dependencies = [:nginx, NATIVE_SUPPORT_TARGET].compact desc "Run Passenger Standalone integration tests" task 'test:integration:standalone' => dependencies do if PlatformInfo.rspec.nil? abort "RSpec is not installed for Ruby interpreter '#{PlatformInfo.ruby_command}'. Please install it." else command = "#{PlatformInfo.rspec} -c -f s integration_tests/standalone_tests.rb" if grep = string_option('E') require 'shellwords' command << " -e #{Shellwords.escape(grep)}" end sh "cd test && exec #{command}" end end desc "Run native packaging tests" task 'test:integration:native_packaging' do if PlatformInfo.rspec.nil? abort "RSpec is not installed for Ruby interpreter '#{PlatformInfo.ruby_command}'. Please install it." end command = "rspec -c -f s integration_tests/native_packaging_spec.rb" if boolean_option('SUDO') command = "#{PlatformInfo.ruby_sudo_command} -E #{command}" end if grep = string_option('E') require 'shellwords' command << " -e #{Shellwords.escape(grep)}" end case PlatformInfo.os_name when "linux" if PlatformInfo.linux_distro_tags.include?(:debian) command = "env NATIVE_PACKAGING_METHOD=deb " + "LOCATIONS_INI=/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini " + command elsif PlatformInfo.linux_distro_tags.include?(:redhat) command = "env NATIVE_PACKAGING_METHOD=rpm " + "LOCATIONS_INI=/usr/lib/ruby/site_ruby/1.8/phusion_passenger/locations.ini " + command else abort "Unsupported Linux distribution" end when "macosx" # The tests put /usr/bin and /usr/sbin first in PATH, causing /usr/bin/ruby to be used. # We should run the tests in /usr/bin/ruby too, so that native_support is compiled for # the same Ruby. prefix = "env NATIVE_PACKAGING_METHOD=homebrew " + "LOCATIONS_INI=/usr/local/Cellar/passenger/#{VERSION_STRING}/libexec/lib/phusion_passenger/locations.ini" if PlatformInfo.in_rvm? prefix << " rvm-exec system /usr/bin/ruby -S" end command = "#{prefix} #{command}" else abort "Unsupported operating system" end sh "cd test && exec #{command}" end dependencies = [:apache2, NATIVE_SUPPORT_TARGET].compact desc "Run the 'apache2' integration test infinitely, and abort if/when it fails" task 'test:restart' => dependencies do require 'shellwords' color_code_start = "\e[33m\e[44m\e[1m" color_code_end = "\e[0m" i = 1 while true do puts "#{color_code_start}Test run #{i} (press Ctrl-C multiple times to abort)#{color_code_end}" command = "rspec -c -f s integration_tests/apache2_tests.rb" if grep = string_option('E') command << " -e #{Shellwords.escape(grep)}" end sh "cd test && exec #{command}" i += 1 end end passenger-4.0.37/build/misc.rb000644 000765 000024 00000013404 12233035540 016575 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. desc "Run 'sloccount' to see how much code Passenger has" task :sloccount do ENV['LC_ALL'] = 'C' begin # sloccount doesn't recognize the scripts in # bin/ as Ruby, so we make symlinks with proper # extensions. tmpdir = ".sloccount" system "rm -rf #{tmpdir}" mkdir tmpdir Dir['bin/*'].each do |file| safe_ln file, "#{tmpdir}/#{File.basename(file)}.rb" end sh "sloccount", *Dir[ "#{tmpdir}/*", "lib/phusion_passenger", "ext/apache2", "ext/nginx", "ext/common", "ext/oxt", "ext/phusion_passenger/*.c", "test/**/*.{cpp,rb,h}" ] ensure system "rm -rf #{tmpdir}" end end def extract_latest_news_contents_and_items # The text is in the following format: # # Release x.x.x # ------------- # # * Text. # * More text. # * A header. # With yet more text. # # Release y.y.y # ------------- # ..... contents = File.read("NEWS") # We're only interested in the latest release, so extract the text for that. contents =~ /\A(Release.*?)^(Release|Older releases)/m contents = $1 contents.sub!(/\A.*?\n-+\n+/m, '') contents.sub!(/\n+\Z/, '') # Now split the text into individual items. items = contents.split(/^ \* /) items.shift while items.first == "" return [contents, items] end desc "Convert the NEWS items for the latest release to HTML" task :news_as_html do require 'cgi' contents, items = extract_latest_news_contents_and_items puts "
    " items.each do |item| def format_paragraph(text) # Get rid of newlines: convert them into spaces. text.gsub!("\n", ' ') while text.index(' ') text.gsub!(' ', ' ') end # Auto-link to issue tracker. text.gsub!(/(bug|issue) #(\d+)/i) do url = "http://code.google.com/p/phusion-passenger/issues/detail?id=#{$2}" %Q(<{a href="#{url}"}>#{$1} ##{$2}<{/a}>) end text.strip! text = CGI.escapeHTML(text) text.gsub!(%r(<\{(.*?)\}>(.*?)<\{/(.*?)\}>)) do "<#{CGI.unescapeHTML $1}>#{$2}" end text end puts "
  • " + format_paragraph(item.strip) + "
  • " end puts "
" end desc "Convert the NEWS items for the latest release to Markdown" task :news_as_markdown do contents, items = extract_latest_news_contents_and_items # Auto-link to issue tracker. contents.gsub!(/(bug|issue) #(\d+)/i) do url = "http://code.google.com/p/phusion-passenger/issues/detail?id=#{$2}" %Q([#{$1} ##{$2}](#{url})) end puts contents end desc "Update CONTRIBUTORS file" task :contributors do entries = `git log --format='%aN' | sort -u`.split("\n") entries.delete "Hongli Lai" entries.delete "Hongli Lai (Phusion" entries.delete "Ninh Bui" entries.push "Ninh Bui (Phusion)" entries.delete "Phusion Dev" entries.delete "Tinco Andringa" entries.push "Tinco Andringa (Phusion)" entries.delete "Goffert van Gool" entries.push "Goffert van Gool (Phusion)" entries.delete "Gokulnath" entries.push "Gokulnath Manakkattil" File.open("CONTRIBUTORS", "w") do |f| f.puts(entries.sort{ |a, b| a.downcase <=> b.downcase }.join("\n")) end puts "Updated CONTRIBUTORS" end # Compile the WebHelper binary, used by Homebrew packaging. task :webhelper => :nginx do require 'tmpdir' require 'logger' PhusionPassenger.require_passenger_lib 'utils/download' Dir.mktmpdir do |path| Utils::Download.download("http://nginx.org/download/nginx-#{PREFERRED_NGINX_VERSION}.tar.gz", "#{path}/nginx.tar.gz") sh "cd '#{path}' && tar xzf nginx.tar.gz" sh "cd '#{path}/nginx-#{PREFERRED_NGINX_VERSION}' && " + "./configure --prefix=/tmp " + "#{STANDALONE_NGINX_CONFIGURE_OPTIONS} " + "--add-module='#{Dir.pwd}/ext/nginx' && " + "make" sh "cp '#{path}/nginx-#{PREFERRED_NGINX_VERSION}/objs/nginx' '#{OUTPUT_DIR}PassengerWebHelper'" end end dependencies = [ COMMON_LIBRARY.link_objects, LIBBOOST_OXT, LIBEV_TARGET, LIBEIO_TARGET ].flatten.compact task :compile_app => dependencies do source = ENV['SOURCE'] || ENV['FILE'] || ENV['F'] if !source STDERR.puts "Please specify the source filename with SOURCE=(...)" exit 1 end if source =~ /\.h/ File.open('_source.cpp', 'w') do |f| f.puts "#include \"#{source}\"" end source = '_source.cpp' end exe = source.sub(/\.cpp$/, '') begin create_executable(exe, source, "-DSTANDALONE " << "-Iext -Iext/common #{LIBEV_CFLAGS} #{LIBEIO_CFLAGS} " << "#{EXTRA_CXXFLAGS} " << "#{COMMON_LIBRARY.link_objects_as_string} " << "#{LIBBOOST_OXT} " << "#{LIBEV_LIBS} " << "#{LIBEIO_LIBS} " << "#{PlatformInfo.portability_cxx_ldflags} " << "#{EXTRA_CXX_LDFLAGS}") ensure File.unlink('_source.cpp') rescue nil end end passenger-4.0.37/build/nginx.rb000644 000765 000024 00000004540 12233035540 016766 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. auto_generated_sources = [ 'ext/nginx/ConfigurationCommands.c', 'ext/nginx/CreateLocationConfig.c', 'ext/nginx/MergeLocationConfig.c', 'ext/nginx/CacheLocationConfig.c', 'ext/nginx/ConfigurationFields.h' ] desc "Build Nginx support files" task :nginx => [ :nginx_without_native_support, NATIVE_SUPPORT_TARGET ].compact task :nginx_without_native_support => [ auto_generated_sources, AGENT_OUTPUT_DIR + 'PassengerHelperAgent', AGENT_OUTPUT_DIR + 'PassengerWatchdog', AGENT_OUTPUT_DIR + 'PassengerLoggingAgent', AGENT_OUTPUT_DIR + 'SpawnPreparer', AGENT_OUTPUT_DIR + 'TempDirToucher', COMMON_LIBRARY.only(*NGINX_LIBS_SELECTOR).link_objects ].flatten task :clean => 'nginx:clean' desc "Clean all compiled Nginx files" task 'nginx:clean' => 'common:clean' do # Nothing to clean at this time. end def create_nginx_auto_generated_source_task(source) dependencies = [ "#{source}.erb", 'lib/phusion_passenger/nginx/config_options.rb' ] file(source => dependencies) do template = TemplateRenderer.new("#{source}.erb") template.render_to(source) end end auto_generated_sources.each do |source| create_nginx_auto_generated_source_task(source) end passenger-4.0.37/build/node_tests.rb000644 000765 000024 00000002645 12233035540 020016 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ### Node.js components tests ### desc "Run unit tests for the Node.js libraries" task 'test:node' do sh "cd test && env NODE_PATH=#{PhusionPassenger.node_libdir} ../node_modules/.bin/mocha -R spec node/*_spec.js" end passenger-4.0.37/build/oxt_tests.rb000644 000765 000024 00000005161 12233035540 017677 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ### OXT library tests ### TEST_OXT_CFLAGS = "#{EXTRA_PRE_CXXFLAGS} -Iext -Itest/support #{TEST_COMMON_CFLAGS}" TEST_OXT_LDFLAGS = "#{TEST_BOOST_OXT_LIBRARY} #{PlatformInfo.portability_cxx_ldflags} #{EXTRA_CXX_LDFLAGS}" TEST_OXT_LDFLAGS << " #{PlatformInfo.adress_sanitizer_flag}" if USE_ASAN TEST_OXT_OBJECTS = { 'oxt_test_main.o' => %w(oxt_test_main.cpp), 'backtrace_test.o' => %w(backtrace_test.cpp counter.hpp), 'spin_lock_test.o' => %w(spin_lock_test.cpp), 'dynamic_thread_group_test.o' => %w(dynamic_thread_group_test.cpp counter.hpp), 'syscall_interruption_test.o' => %w(syscall_interruption_test.cpp) } desc "Run unit tests for the OXT library" task 'test:oxt' => 'test/oxt/oxt_test_main' do sh "cd test && ./oxt/oxt_test_main" end # Define task for test/oxt/oxt_test_main. oxt_test_main_dependencies = TEST_OXT_OBJECTS.keys.map do |object| "test/oxt/#{object}" end oxt_test_main_dependencies << TEST_BOOST_OXT_LIBRARY file 'test/oxt/oxt_test_main' => oxt_test_main_dependencies do objects = TEST_OXT_OBJECTS.keys.map{ |x| "test/oxt/#{x}" }.join(' ') create_executable("test/oxt/oxt_test_main", objects, TEST_OXT_LDFLAGS) end # Define tasks for each OXT test source file. TEST_OXT_OBJECTS.each_pair do |target, sources| file "test/oxt/#{target}" => sources.map{ |x| "test/oxt/#{x}" } do source = "test/oxt/#{sources[0]}" object = source.sub(/\.cpp$/, '.o') compile_cxx source, "#{TEST_OXT_CFLAGS} -o #{object}" end end passenger-4.0.37/build/packaging.rb000644 000765 000024 00000050054 12233035540 017570 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ORIG_TARBALL_FILES = lambda { PhusionPassenger::Packaging.files } def recursive_copy_files(files, destination_dir, preprocess = false, variables = {}) require 'fileutils' if !defined?(FileUtils) if !STDOUT.tty? puts "Copying files..." end files.each_with_index do |filename, i| dir = File.dirname(filename) if !File.exist?("#{destination_dir}/#{dir}") FileUtils.mkdir_p("#{destination_dir}/#{dir}") end if !File.directory?(filename) if preprocess && filename =~ /\.template$/ real_filename = filename.sub(/\.template$/, '') FileUtils.install(filename, "#{destination_dir}/#{real_filename}", :preserve => true) Preprocessor.new.start(filename, "#{destination_dir}/#{real_filename}", variables) else FileUtils.install(filename, "#{destination_dir}/#{filename}", :preserve => true) end end if STDOUT.tty? printf "\r[%5d/%5d] [%3.0f%%] Copying files...", i + 1, files.size, i * 100.0 / files.size STDOUT.flush end end if STDOUT.tty? printf "\r[%5d/%5d] [%3.0f%%] Copying files...\n", files.size, files.size, 100 end end def word_wrap(text, max = 72) while index = (lines = text.split("\n")).find_index{ |line| line.size > max } line = lines[index] pos = max while pos >= 0 && line[pos..pos] != " " pos -= 1 end if pos < 0 raise "Cannot wrap line: #{line}" else lines[index] = line[0 .. pos - 1] lines.insert(index + 1, line[pos + 1 .. -1]) text = lines.join("\n") end end return text end def is_open_source? return !is_enterprise? end def is_enterprise? return PACKAGE_NAME =~ /enterprise/ end def enterprise_git_url return "TODO" end def git_tag_prefix if is_open_source? return "release" else return "enterprise" end end def git_tag return "#{git_tag_prefix}-#{VERSION_STRING}" end def homebrew_dir return "/tmp/homebrew" end task :clobber => 'package:clean' task 'package:set_official' do ENV['OFFICIAL_RELEASE'] = '1' end desc "Build, sign & upload gem & tarball" task 'package:release' => ['package:set_official', 'package:gem', 'package:tarball', 'package:sign'] do PhusionPassenger.require_passenger_lib 'platform_info' require 'yaml' require 'uri' require 'net/http' require 'net/https' basename = "#{PhusionPassenger::PACKAGE_NAME}-#{PhusionPassenger::VERSION_STRING}" version = PhusionPassenger::VERSION_STRING is_beta = !!version.split('.')[3] if !`git status --porcelain | grep -Ev '^\\?\\? '`.empty? STDERR.puts "-------------------" abort "*** ERROR: There are uncommitted files. See 'git status'" end begin website_config = YAML.load_file(File.expand_path("~/.passenger_website.yml")) rescue Errno::ENOENT STDERR.puts "-------------------" abort "*** ERROR: Please put the Phusion Passenger website admin " + "password in ~/.passenger_website.yml:\n" + "admin_password: ..." end if !PhusionPassenger::PlatformInfo.find_command("hub") STDERR.puts "-------------------" abort "*** ERROR: Please 'brew install hub' first" end if is_open_source? if boolean_option('HOMEBREW_UPDATE', true) puts "Updating Homebrew formula..." Rake::Task['package:update_homebrew'].invoke else puts "HOMEBREW_UPDATE set to false, not updating Homebrew formula." end end sh "git tag -s #{git_tag} -u 0A212A8C -m 'Release #{version}'" puts "Proceed with pushing tag to remote Git repo and uploading the gem and signatures? [y/n]" if STDIN.readline == "y\n" sh "git push origin #{git_tag}" if is_open_source? sh "s3cmd -P put #{PKG_DIR}/passenger-#{version}.{gem,tar.gz,gem.asc,tar.gz.asc} s3://phusion-passenger/releases/" sh "gem push #{PKG_DIR}/passenger-#{version}.gem" puts "Updating version number on website..." if is_beta uri = URI.parse("https://www.phusionpassenger.com/latest_beta_version") else uri = URI.parse("https://www.phusionpassenger.com/latest_stable_version") end http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_PEER request = Net::HTTP::Post.new(uri.request_uri) request.basic_auth("admin", website_config["admin_password"]) request.set_form_data("version" => version) response = http.request(request) if response.code != 200 && response.body != "ok" abort "*** ERROR: Cannot update version number on www.phusionpassenger.com:\n" + "Status: #{response.code}\n\n" + response.body end puts "Initiating building of Debian packages" Rake::Task['package:initiate_debian_building'].invoke puts "Building OS X binaries..." Rake::Task['package:build_osx_binaries'].invoke if boolean_option('HOMEBREW_UPDATE', true) if boolean_option('HOMEBREW_DRY_RUN', false) puts "HOMEBREW_DRY_RUN set, not submitting pull request. Please find the repo in /tmp/homebrew." else puts "Submitting Homebrew pull request..." sh "cd #{homebrew_dir} && hub pull-request 'Update passenger to version #{version}' -b Homebrew:master" end end puts "--------------" puts "All done." else dir = "/u/apps/passenger_website/shared" subdir = string_option('NAME', version) sh "scp #{PKG_DIR}/#{basename}.{gem,tar.gz,gem.asc,tar.gz.asc} app@shell.phusion.nl:#{dir}/" sh "ssh app@shell.phusion.nl 'mkdir -p \"#{dir}/assets/#{subdir}\" && mv #{dir}/#{basename}.{gem,tar.gz,gem.asc,tar.gz.asc} \"#{dir}/assets/#{subdir}/\"'" command = "curl -F file=@#{PKG_DIR}/#{basename}.gem --user admin:#{website_config['admin_password']} " + "--output /dev/stderr --write-out '%{http_code}' --silent " + "https://www.phusionpassenger.com/enterprise_gems/upload" puts command result = `#{command}` if result != "200" abort "Gem upload failed. HTTP status code: #{result.inspect}" else # The response body does not contain a newline, # so fix terminal output. puts end puts "Initiating building of binaries" command = "cd /srv/passenger_autobuilder/app && " + "/tools/silence-unless-failed -f /tmp/passenger_autobuilder.log " + "chpst -l /var/cache/passenger_ci/lock " + "./autobuild-with-pbuilder #{enterprise_git_url} passenger-enterprise --tag=#{git_tag}" sh "ssh psg_autobuilder_run@juvia-helper.phusion.nl at now <<<'#{command}'" puts "Initiating building of Debian packages" Rake::Task['package:initiate_debian_building'].invoke puts "Building OS X binaries..." Rake::Task['package:build_osx_binaries'].invoke puts "--------------" puts "All done." end else puts "Did not upload anything." end end task 'package:gem' => Packaging::PREGENERATED_FILES do require 'phusion_passenger' if ENV['OFFICIAL_RELEASE'] release_file = "#{PhusionPassenger.resources_dir}/release.txt" File.unlink(release_file) rescue nil end begin if release_file File.open(release_file, "w").close end command = "gem build #{PhusionPassenger::PACKAGE_NAME}.gemspec" if !boolean_option('SKIP_SIGNING') command << " --sign --key 0x0A212A8C" end sh(command) ensure if release_file File.unlink(release_file) rescue nil end end sh "mkdir -p #{PKG_DIR}" sh "mv #{PhusionPassenger::PACKAGE_NAME}-#{PhusionPassenger::VERSION_STRING}.gem #{PKG_DIR}/" end task 'package:tarball' => Packaging::PREGENERATED_FILES do require 'phusion_passenger' require 'fileutils' basename = "#{PhusionPassenger::PACKAGE_NAME}-#{PhusionPassenger::VERSION_STRING}" sh "rm -rf #{PKG_DIR}/#{basename}" sh "mkdir -p #{PKG_DIR}/#{basename}" recursive_copy_files(ORIG_TARBALL_FILES.call, "#{PKG_DIR}/#{basename}") if ENV['OFFICIAL_RELEASE'] File.open("#{PKG_DIR}/#{basename}/resources/release.txt", "w").close end if PlatformInfo.os_name == "macosx" sh "cd #{PKG_DIR}/#{basename} && find . -print0 | xargs -0 touch -t '201310270000'" else sh "cd #{PKG_DIR}/#{basename} && find . -print0 | xargs -0 touch -d '2013-10-27 00:00:00 UTC'" end sh "cd #{PKG_DIR} && tar -c #{basename} | gzip --no-name --best > #{basename}.tar.gz" sh "rm -rf #{PKG_DIR}/#{basename}" end task 'package:sign' do if File.exist?(File.expand_path("~/.gnupg/gpg-agent.conf")) || ENV['GPG_AGENT_INFO'] puts "It looks like you're using gpg-agent, so skipping automatically password caching." else begin require 'highline' rescue LoadError abort "Please run `gem install highline` first." end h = HighLine.new password = h.ask("Password for software-signing@phusion.nl GPG key: ") { |q| q.echo = false } passphrase_opt = "--passphrase-file .gpg-password" end begin if password File.open(".gpg-password", "w", 0600) do |f| f.write(password) end end version = PhusionPassenger::VERSION_STRING ["passenger-#{version}.gem", "passenger-#{version}.tar.gz", "passenger-enterprise-server-#{version}.gem", "passenger-enterprise-server-#{version}.tar.gz"].each do |name| if File.exist?("pkg/#{name}") sh "gpg --sign --detach-sign #{passphrase_opt} --local-user software-signing@phusion.nl --armor pkg/#{name}" end end ensure File.unlink('.gpg-password') if File.exist?('.gpg-password') end end task 'package:update_homebrew' do require 'digest/sha1' version = VERSION_STRING sha1 = File.open("#{PKG_DIR}/passenger-#{version}.tar.gz", "rb") do |f| Digest::SHA1.hexdigest(f.read) end sh "rm -rf #{homebrew_dir}" sh "git clone git@github.com:phusion/homebrew.git #{homebrew_dir}" sh "cd #{homebrew_dir} && git remote add Homebrew https://github.com/Homebrew/homebrew.git" sh "cd #{homebrew_dir} && git fetch Homebrew" sh "cd #{homebrew_dir} && git reset --hard Homebrew/master" formula = File.read("/tmp/homebrew/Library/Formula/passenger.rb") formula.gsub!(/passenger-.+?\.tar\.gz/, "passenger-#{version}.tar.gz") || abort("Unable to substitute Homebrew formula tarball filename") formula.gsub!(/sha1 .*/, "sha1 '#{sha1}'") || abort("Unable to substitute Homebrew formula SHA-1") necessary_dirs = ORIG_TARBALL_FILES.call.map{ |filename| filename.split("/").first }.uniq necessary_dirs -= Packaging::HOMEBREW_EXCLUDE necessary_dirs += ["buildout"] necessary_dirs_str = word_wrap(necessary_dirs.inspect).split("\n").join("\n ") formula.sub!(/necessary_files = .*?\]/m, "necessary_files = Dir#{necessary_dirs_str}") || abort("Unable to substitute file whitelist") File.open("/tmp/homebrew/Library/Formula/passenger.rb", "w") do |f| f.write(formula) end sh "cd #{homebrew_dir} && git commit -a -m 'passenger #{version}'" sh "cd #{homebrew_dir} && git push -f" if boolean_option('HOMEBREW_TEST', true) sh "cp /tmp/homebrew/Library/Formula/passenger.rb /usr/local/Library/Formula/passenger.rb" if `brew info passenger` !~ /^Not installed$/ sh "brew uninstall passenger" end sh "cp #{PKG_DIR}/passenger-#{version}.tar.gz `brew --cache`/" sh "brew install passenger" Rake::Task['test:integration:native_packaging'].invoke end end task 'package:initiate_debian_building' do version = VERSION_STRING if is_open_source? command = "cd /srv/passenger_apt_automation && " + "chpst -l /tmp/passenger_apt_automation.lock " + "/tools/silence-unless-failed " + "./new_release https://github.com/phusion/passenger.git passenger.repo passenger.apt #{git_tag}" else command = "cd /srv/passenger_apt_automation && " + "chpst -l /tmp/passenger_apt_automation.lock " + "/tools/silence-unless-failed " + "./new_release #{enterprise_git_url} passenger-enterprise.repo passenger-enterprise.apt #{git_tag}" end sh "ssh psg_apt_automation@juvia-helper.phusion.nl at now <<<'#{command}'" end task 'package:build_osx_binaries' do if is_open_source? sh "cd ../passenger_autobuilder && " + "git pull && " + "./autobuild-osx https://github.com/phusion/passenger.git passenger " + "psg_autobuilder_chroot@juvia-helper.phusion.nl --tag=#{git_tag}" else sh "cd ../passenger_autobuilder && " + "git pull && " + "./autobuild-osx #{enterprise_git_url} passenger-enterprise " + "psg_autobuilder_chroot@juvia-helper.phusion.nl --tag=#{git_tag}" end end desc "Remove gem, tarball and signatures" task 'package:clean' do require 'phusion_passenger' basename = "#{PhusionPassenger::PACKAGE_NAME}-#{PhusionPassenger::VERSION_STRING}" sh "rm -f pkg/#{basename}.{gem,gem.asc,tar.gz,tar.gz.asc}" end def change_shebang(filename, value) contents = File.open(filename, "r") do |f| f.read end contents.gsub!(/\A#\!.+$/, "#!#{value}") File.open(filename, "w") do |f| f.write(contents) end end desc "Create a fakeroot, useful for building native packages" task :fakeroot => [:apache2, :nginx, :doc] do require 'rbconfig' require 'fileutils' include RbConfig fs_prefix = ENV['FS_PREFIX'] || "/usr" fs_bindir = ENV['FS_BINDIR'] || "#{fs_prefix}/bin" fs_sbindir = ENV['FS_SBINDIR'] || "#{fs_prefix}/sbin" fs_datadir = ENV['FS_DATADIR'] || "#{fs_prefix}/share" fs_docdir = ENV['FS_DOCDIR'] || "#{fs_datadir}/doc" fs_libdir = ENV['FS_LIBDIR'] || "#{fs_prefix}/lib" # We don't use CONFIG['archdir'] and the like because we want # the files to be installed to /usr, and the Ruby interpreter # on the packaging machine might be in /usr/local. psg_rubylibdir = ENV['RUBYLIBDIR'] || "#{fs_libdir}/ruby/vendor_ruby" psg_nodelibdir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/node" psg_libdir = "#{fs_libdir}/#{GLOBAL_NAMESPACE_DIRNAME}" psg_native_support_dir = ENV["RUBYARCHDIR"] || "#{fs_libdir}/ruby/#{CONFIG['ruby_version']}/#{CONFIG['arch']}" psg_agents_dir = "#{fs_libdir}/#{GLOBAL_NAMESPACE_DIRNAME}/agents" psg_helper_scripts_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/helper-scripts" psg_resources_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}" psg_include_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/include" psg_docdir = "#{fs_docdir}/#{GLOBAL_NAMESPACE_DIRNAME}" psg_bindir = "#{fs_bindir}" psg_sbindir = "#{fs_sbindir}" psg_apache2_module_path = ENV['APACHE2_MODULE_PATH'] || "#{fs_libdir}/apache2/modules/mod_passenger.so" psg_ruby_extension_source_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/ruby_extension_source" psg_nginx_module_source_dir = "#{fs_datadir}/#{GLOBAL_NAMESPACE_DIRNAME}/ngx_http_passenger_module" fakeroot = "pkg/fakeroot" fake_rubylibdir = "#{fakeroot}#{psg_rubylibdir}" fake_nodelibdir = "#{fakeroot}#{psg_nodelibdir}" fake_libdir = "#{fakeroot}#{psg_libdir}" fake_native_support_dir = "#{fakeroot}#{psg_native_support_dir}" fake_agents_dir = "#{fakeroot}#{psg_agents_dir}" fake_helper_scripts_dir = "#{fakeroot}#{psg_helper_scripts_dir}" fake_resources_dir = "#{fakeroot}#{psg_resources_dir}" fake_include_dir = "#{fakeroot}#{psg_include_dir}" fake_docdir = "#{fakeroot}#{psg_docdir}" fake_bindir = "#{fakeroot}#{psg_bindir}" fake_sbindir = "#{fakeroot}#{psg_sbindir}" fake_apache2_module_path = "#{fakeroot}#{psg_apache2_module_path}" fake_ruby_extension_source_dir = "#{fakeroot}#{psg_ruby_extension_source_dir}" fake_nginx_module_source_dir = "#{fakeroot}#{psg_nginx_module_source_dir}" native_packaging_method = ENV['NATIVE_PACKAGING_METHOD'] || "deb" sh "rm -rf #{fakeroot}" sh "mkdir -p #{fakeroot}" # Ruby sources sh "mkdir -p #{fake_rubylibdir}" sh "cp #{PhusionPassenger.ruby_libdir}/phusion_passenger.rb #{fake_rubylibdir}/" sh "cp -R #{PhusionPassenger.ruby_libdir}/phusion_passenger #{fake_rubylibdir}/" # Node.js sources sh "mkdir -p #{fake_nodelibdir}" sh "cp -R #{PhusionPassenger.node_libdir}/phusion_passenger #{fake_nodelibdir}/" # Phusion Passenger common libraries sh "mkdir -p #{fake_libdir}" sh "cp -R #{PhusionPassenger.lib_dir}/common #{fake_libdir}/" sh "rm -rf #{fake_libdir}/common/libboost_oxt" # Ruby extension binaries sh "mkdir -p #{fake_native_support_dir}" native_support_archdir = PlatformInfo.ruby_extension_binary_compatibility_id sh "mkdir -p #{fake_native_support_dir}" sh "cp -R buildout/ruby/#{native_support_archdir}/*.#{LIBEXT} #{fake_native_support_dir}/" # Agents sh "mkdir -p #{fake_agents_dir}" sh "cp -R #{PhusionPassenger.agents_dir}/* #{fake_agents_dir}/" sh "rm -rf #{fake_agents_dir}/*.dSYM" sh "rm -rf #{fake_agents_dir}/*/*.dSYM" sh "rm -rf #{fake_agents_dir}/*.o" # Helper scripts sh "mkdir -p #{fake_helper_scripts_dir}" sh "cp -R #{PhusionPassenger.helper_scripts_dir}/* #{fake_helper_scripts_dir}/" # Resources sh "mkdir -p #{fake_resources_dir}" sh "cp -R resources/* #{fake_resources_dir}/" # Headers necessary for building the Nginx module sh "mkdir -p #{fake_include_dir}" # Infer headers that the Nginx module needs headers = [ ["ext/common/Exceptions.h", "common/Exceptions.h"] ] Dir["ext/nginx/*.[ch]"].each do |filename| File.read(filename).split("\n").grep(%r{#include "common/(.+)"}) do |match| headers << ["ext/common/#{$1}", "common/#{$1}"] end end headers.each do |header| target = "#{fake_include_dir}/#{header[1]}" dir = File.dirname(target) if !File.directory?(dir) sh "mkdir -p #{dir}" end sh "cp #{header[0]} #{target}" end # Nginx module sources sh "mkdir -p #{fake_nginx_module_source_dir}" sh "cp ext/nginx/* #{fake_nginx_module_source_dir}/" # Documentation sh "mkdir -p #{fake_docdir}" sh "cp doc/*.html #{fake_docdir}/" sh "cp -R doc/images #{fake_docdir}/" # User binaries sh "mkdir -p #{fake_bindir}" Packaging::USER_EXECUTABLES.each do |exe| sh "cp bin/#{exe} #{fake_bindir}/" if !Packaging::EXECUTABLES_WITH_FREE_RUBY.include?(exe) change_shebang("#{fake_bindir}/#{exe}", "#{fs_bindir}/ruby") end end # Superuser binaries sh "mkdir -p #{fake_sbindir}" Packaging::SUPER_USER_EXECUTABLES.each do |exe| sh "cp bin/#{exe} #{fake_sbindir}/" if !Packaging::EXECUTABLES_WITH_FREE_RUBY.include?(exe) change_shebang("#{fake_sbindir}/#{exe}", "#{fs_bindir}/ruby") end end # Apache 2 module sh "mkdir -p #{File.dirname(fake_apache2_module_path)}" sh "cp #{APACHE2_MODULE} #{fake_apache2_module_path}" # Ruby extension sources sh "mkdir -p #{fake_ruby_extension_source_dir}" sh "cp -R #{PhusionPassenger.ruby_extension_source_dir}/* #{fake_ruby_extension_source_dir}" puts "Creating #{fake_rubylibdir}/phusion_passenger/locations.ini" File.open("#{fake_rubylibdir}/phusion_passenger/locations.ini", "w") do |f| f.puts "[locations]" f.puts "natively_packaged=true" f.puts "native_packaging_method=#{native_packaging_method}" f.puts "bin_dir=#{psg_bindir}" f.puts "agents_dir=#{psg_agents_dir}" f.puts "lib_dir=#{psg_libdir}" f.puts "helper_scripts_dir=#{psg_helper_scripts_dir}" f.puts "resources_dir=#{psg_resources_dir}" f.puts "include_dir=#{psg_include_dir}" f.puts "doc_dir=#{psg_docdir}" f.puts "ruby_libdir=#{psg_rubylibdir}" f.puts "node_libdir=#{psg_nodelibdir}" f.puts "apache2_module_path=#{psg_apache2_module_path}" f.puts "ruby_extension_source_dir=#{psg_ruby_extension_source_dir}" f.puts "nginx_module_source_dir=#{psg_nginx_module_source_dir}" end # Sanity check the locations.ini file options = PhusionPassenger.parse_ini_file("#{fake_rubylibdir}/phusion_passenger/locations.ini") PhusionPassenger::REQUIRED_LOCATIONS_INI_FIELDS.each do |field| if !options[field.to_s] raise "Bug in build/packaging.rb: the generated locations.ini is missing the '#{field}' field" end end sh "find #{fakeroot} -name .DS_Store -print0 | xargs -0 rm -f" end passenger-4.0.37/build/preprocessor.rb000644 000765 000024 00000021565 12233035540 020377 0ustar00honglistaff000000 000000 # encoding: utf-8 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. # Implements a simple preprocessor language which combines elements in the C # preprocessor with ERB: # # Today # #if @today == :fine # is a fine day. # #elif @today == :good # is a good day. # #else # is a sad day. # #endif # Let's go walking. # Today is <%= Time.now %>. # # When run with... # # Preprocessor.new.start('input.txt', 'output.txt', :today => :fine) # # ...will produce: # # Today # is a fine day. # Let's go walking. # Today is 2013-08-11 22:37:06 +0200. # # Highlights: # # * #if blocks can be nested. # * Expressions are Ruby expressions, evaluated within the binding of a # Preprocessor::Evaluator object. # * Text inside #if/#elif/#else are automatically unindented. # * ERB compatible. class Preprocessor def initialize require 'erb' if !defined?(ERB) @indentation_size = 4 @debug = boolean_option('DEBUG') end def start(filename, output_filename, variables = {}) if output_filename temp_output_filename = "#{output_filename}._new" output = File.open(temp_output_filename, 'w') else output = STDOUT end the_binding = create_binding(variables) context = [] @filename = filename @lineno = 1 @indentation = 0 each_line(filename, the_binding) do |line| debug("context=#{context.inspect}, line=#{line.inspect}") name, args_string, cmd_indentation = recognize_command(line) case name when "if" case context.last when nil, :if_true, :else_true check_indentation(cmd_indentation) result = the_binding.eval(args_string, filename, @lineno) context.push(result ? :if_true : :if_false) inc_indentation when :if_false, :else_false, :if_ignore check_indentation(cmd_indentation) inc_indentation context.push(:if_ignore) else terminate "#if is not allowed in this context" end when "elif" case context.last when :if_true dec_indentation check_indentation(cmd_indentation) inc_indentation context[-1] = :if_false when :if_false dec_indentation check_indentation(cmd_indentation) inc_indentation result = the_binding.eval(args_string, filename, @lineno) context[-1] = result ? :if_true : :if_false when :else_true, :else_false terminate "#elif is not allowed after #else" when :if_ignore dec_indentation check_indentation(cmd_indentation) inc_indentation else terminate "#elif is not allowed outside #if block" end when "else" case context.last when :if_true dec_indentation check_indentation(cmd_indentation) inc_indentation context[-1] = :else_false when :if_false dec_indentation check_indentation(cmd_indentation) inc_indentation context[-1] = :else_true when :else_true, :else_false terminate "it is not allowed to have multiple #else clauses in one #if block" when :if_ignore dec_indentation check_indentation(cmd_indentation) inc_indentation else terminate "#else is not allowed outside #if block" end when "endif" case context.last when :if_true, :if_false, :else_true, :else_false, :if_ignore dec_indentation check_indentation(cmd_indentation) context.pop else terminate "#endif is not allowed outside #if block" end when "DEBHELPER" output.puts(line) when "", nil # Either a comment or not a preprocessor command. case context.last when nil, :if_true, :else_true output.puts(unindent(line)) else # Check indentation but do not output. unindent(line) end else terminate "Unrecognized preprocessor command ##{name.inspect}" end @lineno += 1 end ensure if output_filename && output output.close stat = File.stat(filename) File.chmod(stat.mode, temp_output_filename) File.chown(stat.uid, stat.gid, temp_output_filename) rescue nil File.rename(temp_output_filename, output_filename) end end private UBUNTU_DISTRIBUTIONS = { "lucid" => "10.04", "maverick" => "10.10", "natty" => "11.04", "oneiric" => "11.10", "precise" => "12.04", "quantal" => "12.10", "raring" => "13.04", "saucy" => "13.10", "trusty" => "14.04" } DEBIAN_DISTRIBUTIONS = { "squeeze" => "20110206", "wheezy" => "20130504" } REDHAT_ENTERPRISE_DISTRIBUTIONS = { "el6" => "el6.0" } AMAZON_DISTRIBUTIONS = { "amazon" => "amazon" } # Provides the DSL that's accessible within. class Evaluator def _infer_distro_table(name) if UBUNTU_DISTRIBUTIONS.has_key?(name) return UBUNTU_DISTRIBUTIONS elsif DEBIAN_DISTRIBUTIONS.has_key?(name) return DEBIAN_DISTRIBUTIONS elsif REDHAT_ENTERPRISE_DISTRIBUTIONS.has_key?(name) return REDHAT_ENTERPRISE_DISTRIBUTIONS elsif AMAZON_DISTRIBUTIONS.has_key?(name) return AMAZON_DISTRIBUTIONS end end def is_distribution?(expr) if @distribution.nil? raise "The :distribution variable must be set" else if expr =~ /^(>=|>|<=|<|==|\!=)[\s]*(.+)/ comparator = $1 name = $2 else raise "Invalid expression #{expr.inspect}" end table1 = _infer_distro_table(@distribution) table2 = _infer_distro_table(name) raise "Distribution name #{@distribution.inspect} not recognized" if !table1 raise "Distribution name #{name.inspect} not recognized" if !table2 return false if table1 != table2 v1 = table1[@distribution] v2 = table2[name] case comparator when ">" return v1 > v2 when ">=" return v1 >= v2 when "<" return v1 < v2 when "<=" return v1 <= v2 when "==" return v1 == v2 when "!=" return v1 != v2 else raise "BUG" end end end end def each_line(filename, the_binding) data = File.open(filename, 'r') do |f| erb = ERB.new(f.read, nil, "-") erb.filename = filename erb.result(the_binding) end data.each_line do |line| yield line.chomp end end def recognize_command(line) if line =~ /^([\s\t]*)#(.+)/ indentation_str = $1 command = $2 # Declare tabs as equivalent to 4 spaces. This is necessary for # Makefiles in which the use of tabs is required. indentation_str.gsub!("\t", " ") name = command.scan(/^\w+/).first # Ignore shebangs and comments. return if name.nil? args_string = command.sub(/^#{Regexp.escape(name)}[\s\t]*/, '') return [name, args_string, indentation_str.to_s.size] else return nil end end def create_binding(variables) object = Evaluator.new variables.each_pair do |key, val| object.send(:instance_variable_set, "@#{key}", val) end return object.instance_eval do binding end end def inc_indentation @indentation += @indentation_size end def dec_indentation @indentation -= @indentation_size end def check_indentation(expected) if expected != @indentation terminate "wrong indentation: found #{expected} characters, should be #{@indentation}" end end def unindent(line) line =~ /^([\s\t]*)/ # Declare tabs as equivalent to 4 spaces. This is necessary for # Makefiles in which the use of tabs is required. found = $1.to_s.gsub("\t", " ").size if found >= @indentation # Tab-friendly way to remove indentation. remaining = @indentation line = line.dup while remaining > 0 if line[0..0] == " " remaining -= 1 else # This is a tab. remaining -= 4 end line.slice!(0, 1) end return line else terminate "wrong indentation: found #{found} characters, should be at least #{@indentation}" end end def debug(message) puts "DEBUG:#{@lineno}: #{message}" if @debug end def terminate(message) abort "*** ERROR: #{@filename} line #{@lineno}: #{message}" end end passenger-4.0.37/build/rake_extensions.rb000644 000765 000024 00000011164 12233035540 021044 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. require 'pathname' # Provides useful extensions for Rake. module RakeExtensions # Allows one to define Rake rules in the context of the given # subdirectory. For example, # # subdir 'foo' do # file 'libfoo.so' => ['foo.c'] do # sh 'gcc foo.c -shared -fPIC -o libfoo.so' # end # end # # subdir 'bar' do # file 'bar' => ['bar.c', '../foo/libfoo.so'] do # sh 'gcc bar.c -o bar -L../foo -lfoo' # end # end # # is equivalent to: # # file 'foo/libfoo.so' => ['foo/foo.c'] do # Dir.chdir('foo') do # sh 'gcc foo.c -shared -fPIC -o libfoo.so' # end # end # # file 'bar/bar' => ['bar/bar.c', 'foo/libfoo.so'] do # Dir.chdir('bar') do # sh 'gcc bar.c -o bar -L../foo -lfoo' # end # end # # === String dependencies are assumed to be filenames # # But be careful with string dependencies. They are assumed to be filenames, # and will be automatically converted. For example: # # subdir 'foo' do # task 'super_app' => ['super_app:compile', 'super_app:unit_test'] # # task 'super_app:compile' do # ... # end # # task 'super_app:unit_test' do # ... # end # end # # will be treated like: # # subdir 'foo' do # # !!!!!!! # task 'super_app' => ['foo/super_app:compile', 'foo/super_app:unit_test'] # # task 'super_app:compile' do # ... # end # # task 'super_app:unit_test' do # ... # end # end # # To solve this, declare your dependencies as symbols: # # task 'super_app' => [:'super_app:compile', :'super_app:unit_test'] # # (note the leading ':' character) # # === Supported Rake commands # # Only the file and target Rake commands are supported. def subdir(dir, &block) subdir = Subdir.new(dir) Dir.chdir(dir) do subdir.instance_eval(&block) end end class Subdir # :nodoc: # Rake 0.9 compatibility since methods like task and desc # aren't available in Object anymore. # See: https://github.com/jimweirich/rake/issues/33#issuecomment-1213705 include Rake::DSL if defined?(Rake::DSL) def initialize(dir) @dir = dir @toplevel_dir = Pathname.getwd end def file(args, &block) case args when String args = mangle_path(args) when Hash target = mangle_path(args.keys[0]) sources = mangle_path_or_path_array(args.values[0]) args = { target => sources } end Rake::FileTask.define_task(args) do puts "### In #{@dir}:" Dir.chdir(@dir) do Object.class_eval(&block) end puts "" end end def task(*args, &block) if !args.empty? && args[0].is_a?(Hash) target = args[0].keys[0] sources = mangle_path_or_path_array(args[0].values[0]) args[0] = { target => sources } end if block_given? Rake::Task.define_task(*args) do puts "### In #{@dir}:" Dir.chdir(@dir) do Object.class_eval(&block) end puts "" end else Rake::Task.define_task(*args) end end private def mangle_path(path) path = File.expand_path(path) return Pathname.new(path).relative_path_from(@toplevel_dir).to_s end def mangle_path_array(array) array = array.dup array.each_with_index do |item, i| if item.is_a?(String) array[i] = mangle_path(item) end end return array end def mangle_path_or_path_array(item) case item when String return mangle_path(item) when Array return mangle_path_array(item) else return item end end end end # module RakeExtensions Object.class_eval do include RakeExtensions end passenger-4.0.37/build/rpm.rb000644 000765 000024 00000011547 12233035540 016446 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (C) 2010-2013 Phusion # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. RPM_NAME = "passenger" MOCK_OFFLINE = boolean_option('MOCK_OFFLINE', false) ALL_RPM_DISTROS = { "el6" => { :mock_chroot_name => "epel-6", :distro_name => "Enterprise Linux 6" }, "amazon" => { :mock_chroot_name => "epel-6", :distro_name => "Amazon Linux" } } task 'rpm:sources' => ['package:set_official', 'package:tarball'] do basename = "#{PACKAGE_NAME}-#{VERSION_STRING}" nginx_version = PhusionPassenger::PREFERRED_NGINX_VERSION sh "cp #{PKG_DIR}/#{basename}.tar.gz rpm/* #{rpmbuild_root}/SOURCES/" if File.exist?("#{rpmbuild_root}/SOURCES/nginx-#{nginx_version}.tar.gz") puts "Local Nginx tarball already exists." else sh "curl -L -o #{rpmbuild_root}/SOURCES/nginx-#{nginx_version}.tar.gz http://nginx.org/download/nginx-#{nginx_version}.tar.gz" end end desc "Build RPM for local machine" task 'rpm:local' => 'rpm:sources' do distro_id = `./rpm/get_distro_id.py`.strip rpm_spec_dir = "#{rpmbuild_root}/SPECS" spec_target_dir = "#{rpm_spec_dir}/#{distro_id}" spec_target_file = "#{spec_target_dir}/#{RPM_NAME}.spec" sh "mkdir -p #{spec_target_dir}" puts "Generating #{spec_target_file}" Preprocessor.new.start("rpm/#{RPM_NAME}.spec.template", spec_target_file, :distribution => distro_id) sh "rpmbuild -ba #{spec_target_file}" end task 'rpm:local:uninstall' do sh "sudo yum remove -y passenger mod_passenger passenger-devel passenger-doc passenger-native-libs passenger-debuginfo" end task 'rpm:local:reinstall' => 'rpm:local:uninstall' do rpm_spec_dir = "#{rpmbuild_root}/RPMS" files = [] ["passenger", "mod_passenger", "passenger-devel", "passenger-doc", "passenger-native-libs", "passenger-debuginfo"].each do |package_name| files << Dir["#{rpm_spec_dir}/*/#{package_name}-#{PACKAGE_VERSION}-*.rpm"].first end files.compact! if files.empty? abort "No RPMs have been built yet. Please run 'rake rpm:local' first." end sh "sudo yum install -y #{files.join(' ')}" end def create_rpm_build_task(distro_id, mock_chroot_name, distro_name) desc "Build RPM for #{distro_name}" task "rpm:#{distro_id}" => 'rpm:gem' do rpm_spec_dir = "#{rpmbuild_root}/SPECS" spec_target_dir = "#{rpm_spec_dir}/#{distro_id}" spec_target_file = "#{spec_target_dir}/#{RPM_NAME}.spec" maybe_offline = MOCK_OFFLINE ? "--offline" : nil sh "mkdir -p #{spec_target_dir}" puts "Generating #{spec_target_file}" Preprocessor.new.start("rpm/#{RPM_NAME}.spec.template", spec_target_file, :distribution => distro_id) sh "rpmbuild -bs #{spec_target_file}" sh "mock --verbose #{maybe_offline} " + "-r #{mock_chroot_name}-x86_64 " + "--resultdir '#{PKG_DIR}/#{distro_id}' " + "rebuild #{rpmbuild_root}/SRPMS/#{RPM_NAME}-#{PACKAGE_VERSION}-1#{distro_id}.src.rpm" end end ALL_RPM_DISTROS.each_pair do |distro_id, info| create_rpm_build_task(distro_id, info[:mock_chroot_name], info[:distro_name]) end desc "Build RPMs for all distributions" task "rpm:all" => ALL_RPM_DISTROS.keys.map { |x| "rpm:#{x}" } desc "Publish RPMs for all distributions" task "rpm:publish" do server = "juvia-helper.phusion.nl" remote_dir = "/srv/oss_binaries_passenger/yumgems/phusion-misc" rsync = "rsync -z -r --delete --progress" ALL_RPM_DISTROS.each_key do |distro_id| if !File.exist?("#{PKG_DIR}/#{distro_id}") abort "No packages built for #{distro_id}. Please run 'rake rpm:all' first." end end ALL_RPM_DISTROS.each_key do |distro_id| sh "rpm --resign --define '%_signature gpg' --define '%_gpg_name #{PACKAGE_SIGNING_KEY}' #{PKG_DIR}/#{distro_id}/*.rpm" end sh "#{rsync} #{server}:#{remote_dir}/latest/ #{PKG_DIR}/yumgems/" ALL_RPM_DISTROS.each_key do |distro_id| distro_dir = "#{PKG_DIR}/#{distro_id}" repo_dir = "#{PKG_DIR}/yumgems/#{distro_id}" sh "mkdir -p #{repo_dir}" sh "cp #{distro_dir}/#{RPM_NAME}*.rpm #{repo_dir}/" sh "createrepo #{repo_dir}" end sh "ssh #{server} 'rm -rf #{remote_dir}/new && cp -dpR #{remote_dir}/latest #{remote_dir}/new'" sh "#{rsync} #{PKG_DIR}/yumgems/ #{server}:#{remote_dir}/new/" sh "ssh #{server} 'rm -rf #{remote_dir}/previous && mv #{remote_dir}/latest #{remote_dir}/previous && mv #{remote_dir}/new #{remote_dir}/latest'" end def rpmbuild_root @rpmbuild_root ||= File.expand_path("~/rpmbuild") end passenger-4.0.37/build/ruby_extension.rb000644 000765 000024 00000004345 12233035540 020723 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. if !PlatformInfo.passenger_needs_ruby_dev_header? NATIVE_SUPPORT_TARGET = nil task :native_support do # Do nothing. end task 'native_support:clean' do # Do nothing. end else output_dir = RUBY_EXTENSION_OUTPUT_DIR output_name = "passenger_native_support.#{LIBEXT}" source_dir = "ext/ruby" NATIVE_SUPPORT_TARGET = "#{output_dir}/#{output_name}" task :native_support => "#{output_dir}/#{output_name}" task :clean => 'native_support:clean' dependencies = [ "#{output_dir}/Makefile", "#{source_dir}/passenger_native_support.c" ] file("#{output_dir}/#{output_name}" => dependencies) do sh "mkdir -p '#{output_dir}'" if !File.exist?(output_dir) sh "cd '#{output_dir}' && make" end file "#{output_dir}/Makefile" => "#{source_dir}/extconf.rb" do sh "mkdir -p '#{output_dir}'" if !File.exist?(output_dir) extconf_rb = File.expand_path("#{source_dir}/extconf.rb") sh "cd '#{output_dir}' && #{PlatformInfo.ruby_command} '#{extconf_rb}'" end task 'native_support:clean' do sh "echo rm -rf #{output_dir}" end end passenger-4.0.37/build/ruby_tests.rb000644 000765 000024 00000004512 12233035540 020045 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ### Ruby components tests ### dependencies = [NATIVE_SUPPORT_TARGET, AGENT_OUTPUT_DIR + 'PassengerLoggingAgent'].compact desc "Run unit tests for the Ruby libraries" task 'test:ruby' => dependencies do if PlatformInfo.rspec.nil? abort "RSpec is not installed for Ruby interpreter '#{PlatformInfo.ruby_command}'. Please install it." else if maybe_grep = string_option('E') require 'shellwords' maybe_grep = "-e #{Shellwords.escape(maybe_grep)}" end command = "#{PlatformInfo.rspec} -c -f s -P 'dont-autoload-anything' #{maybe_grep} ruby/*_spec.rb ruby/*/*_spec.rb" sh "cd test && exec #{command}" end end dependencies = [NATIVE_SUPPORT_TARGET].compact desc "Run coverage tests for the Ruby libraries" task 'test:rcov' => dependencies do if PlatformInfo.rspec.nil? abort "RSpec is not installed for Ruby interpreter '#{PlatformInfo.ruby_command}'. Please install it." else Dir.chdir("test") do sh "rcov", "--exclude", "lib\/spec,\/spec$,_spec\.rb$,support\/,platform_info,integration_tests", PlatformInfo.rspec, "--", "-c", "-f", "s", *Dir["ruby/*.rb", "ruby/*/*.rb", "integration_tests.rb"] end end end passenger-4.0.37/build/test_basics.rb000644 000765 000024 00000006100 12233035540 020140 0ustar00honglistaff000000 000000 # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. TEST_BOOST_OXT_LIBRARY = LIBBOOST_OXT TEST_COMMON_LIBRARY = COMMON_LIBRARY TEST_COMMON_CFLAGS = "-DTESTING_APPLICATION_POOL #{EXTRA_CXXFLAGS}" desc "Run all unit tests and integration tests" task :test => ['test:oxt', 'test:cxx', 'test:ruby', 'test:node', 'test:integration'] desc "Clean all compiled test files" task 'test:clean' do sh("rm -rf test/oxt/oxt_test_main test/oxt/*.o test/cxx/*.dSYM test/cxx/CxxTestMain") sh("rm -f test/cxx/*.o test/cxx/*/*.o test/cxx/*.gch") sh("rm -f test/support/allocate_memory") end task :clean => 'test:clean' file 'test/support/allocate_memory' => 'test/support/allocate_memory.c' do create_c_executable('test/support/allocate_memory', 'test/support/allocate_memory.c') end desc "Install developer dependencies" task 'test:install_deps' do gem_install = PlatformInfo.gem_command + " install --no-rdoc --no-ri" gem_install = "#{PlatformInfo.ruby_sudo_command} #{gem_install}" if boolean_option('SUDO') default = boolean_option('DEVDEPS_DEFAULT', true) if boolean_option('BASE_DEPS', default) sh "#{gem_install} rails -v 2.3.15" sh "#{gem_install} mime-types -v 1.25" sh "#{gem_install} bundler rspec daemon_controller json rack" end if boolean_option('DOCTOOLS', default) begin require 'nokogiri' rescue LoadError if RUBY_VERSION < '1.9' sh "#{gem_install} nokogiri -v 1.5.9" else sh "#{gem_install} nokogiri" end end sh "#{gem_install} mizuho bluecloth" end if boolean_option('RAILS_BUNDLES', default) sh "cd test/stub/rails3.0 && bundle install" sh "cd test/stub/rails3.1 && bundle install" sh "cd test/stub/rails3.2 && bundle install" ruby_version_int = RUBY_VERSION.split('.')[0..2].join.to_i if ruby_version_int >= 190 sh "cd test/stub/rails4.0 && bundle install" end end if boolean_option('NODE_MODULES', default) sh "npm install mocha should sinon express" end end passenger-4.0.37/bin/passenger000755 000765 000024 00000003205 12233035540 016701 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ## Magic comment: begin bootstrap ## source_root = File.expand_path("..", File.dirname(__FILE__)) $LOAD_PATH.unshift("#{source_root}/lib") begin require 'rubygems' rescue LoadError end require 'phusion_passenger' ## Magic comment: end bootstrap ## PhusionPassenger.locate_directories PhusionPassenger.require_passenger_lib 'standalone/main' STDOUT.sync = STDERR.sync = true PhusionPassenger::Standalone::Main.run!(ARGV) passenger-4.0.37/bin/passenger-config000755 000765 000024 00000003132 12233035540 020143 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ## Magic comment: begin bootstrap ## source_root = File.expand_path("..", File.dirname(__FILE__)) $LOAD_PATH.unshift("#{source_root}/lib") begin require 'rubygems' rescue LoadError end require 'phusion_passenger' ## Magic comment: end bootstrap ## PhusionPassenger.locate_directories PhusionPassenger.require_passenger_lib 'config/main' PhusionPassenger::Config.run!(ARGV) passenger-4.0.37/bin/passenger-install-apache2-module000755 000765 000024 00000070444 12233035540 023142 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # encoding: binary # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2014 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ## Magic comment: begin bootstrap ## source_root = File.expand_path("..", File.dirname(__FILE__)) $LOAD_PATH.unshift("#{source_root}/lib") begin require 'rubygems' rescue LoadError end require 'phusion_passenger' ## Magic comment: end bootstrap ## PhusionPassenger.locate_directories # The Apache executable may be located in an 'sbin' folder. We add # the 'sbin' folders to $PATH just in case. On some systems # 'sbin' isn't in $PATH unless the user is logged in as root from # the start (i.e. not via 'su' or 'sudo'). ENV["PATH"] += ":/usr/sbin:/sbin:/usr/local/sbin" require 'optparse' require 'stringio' PhusionPassenger.require_passenger_lib 'constants' PhusionPassenger.require_passenger_lib 'platform_info/ruby' PhusionPassenger.require_passenger_lib 'platform_info/apache' PhusionPassenger.require_passenger_lib 'platform_info/apache_detector' PhusionPassenger.require_passenger_lib 'abstract_installer' PhusionPassenger.require_passenger_lib 'utils/terminal_choice_menu' class Installer < PhusionPassenger::AbstractInstaller include PhusionPassenger TerminalChoiceMenu = PhusionPassenger::Utils::TerminalChoiceMenu AUTOINSTALL_BEGIN_LOAD_BLOCK = "### Begin automatically installed #{PROGRAM_NAME} load snippet ###" AUTOINSTALL_END_LOAD_BLOCK = "### End automatically installed #{PROGRAM_NAME} load snippet ###" AUTOINSTALL_BEGIN_CONF_BLOCK = "### Begin automatically installed #{PROGRAM_NAME} config snippet ###" AUTOINSTALL_END_CONF_BLOCK = "### End automatically installed #{PROGRAM_NAME} config snippet ###" def dependencies specs = [ 'depcheck_specs/compiler_toolchain', 'depcheck_specs/ruby', 'depcheck_specs/gems', 'depcheck_specs/libs', 'depcheck_specs/apache2' ] ids = [ 'cc', 'c++', 'libcurl-dev', 'openssl-dev', 'zlib-dev', 'apache2', 'apache2-dev', 'rake', 'ruby-openssl', 'rubygems' ] if @languages.include?("ruby") if PlatformInfo.passenger_needs_ruby_dev_header? ids << 'ruby-dev' end ids << 'rack' end # Some broken servers don't have apr-config or apu-config installed. # Nevertheless, it is possible to compile Apache modules if Apache # was configured with --included-apr. So here we check whether # apr-config and apu-config are available. If they're not available, # then we only register them as required dependency if no Apache # module can be compiled without their presence. if (PlatformInfo.apr_config && PlatformInfo.apu_config) || PlatformInfo.apr_config_needed_for_building_apache_modules? ids << 'apr-dev' ids << 'apu-dev' end return [specs, ids] end def users_guide_path return PhusionPassenger.apache2_doc_path end def users_guide_url return APACHE2_DOC_URL end def run_steps if PhusionPassenger.natively_packaged? && PhusionPassenger.apache2_module_source_dir.nil? if apache_module_available? notify_apache_module_installed show_deployment_example else install_apache_module_from_native_package || exit(1) end exit end Dir.chdir(PhusionPassenger.apache2_module_source_dir) show_welcome_screen query_interested_languages check_gem_install_permission_problems || exit(1) check_directory_accessible_by_web_server check_dependencies || exit(1) check_whether_there_are_multiple_apache_installs || exit check_whether_apache_uses_compatible_mpm check_whether_os_is_broken check_whether_system_has_enough_ram check_write_permission_to_passenger_root || exit(1) check_write_permission_to_web_server_config_files || exit(1) if compile_apache2_module install_apache2_config_snippets || exit(1) show_deployment_example else show_possible_solutions_for_compilation_and_installation_problems exit(1) end end private def show_welcome_screen render_template 'apache2/welcome', :version => VERSION_STRING wait end def query_interested_languages menu = TerminalChoiceMenu.new(["Ruby", "Python", "Node.js", "Meteor"]) menu["Ruby"].checked = interesting_language?('ruby') menu["Python"].checked = interesting_language?('python') menu["Node.js"].checked = interesting_language?('nodejs', 'node') menu["Meteor"].checked = interesting_language?('meteor') new_screen puts "Which languages are you interested in?" puts if interactive? puts "Use to select." puts "If the menu doesn't display correctly, ensure that your terminal supports UTF-8." else puts "Override selection with --languages." end puts if interactive? begin menu.query rescue Interrupt raise Abort end else menu.display_choices puts end @languages = menu.selected_choices.map{ |x| x.downcase.gsub(/\./, '') } end def interesting_language?(name, command = nil) if @languages return @languages.include?(name) else return !!PlatformInfo.find_command(command || name) end end def check_whether_there_are_multiple_apache_installs new_screen puts 'Sanity checking Apache installation...' output = StringIO.new detector = PlatformInfo::ApacheDetector.new(output) begin detector.detect_all detector.report @apache2 = detector.result_for(PlatformInfo.apxs2) if @apache2.nil? render_template 'apache2/apache_install_broken', :apxs2 => PlatformInfo.apxs2, :sudo_s_e => PhusionPassenger::PlatformInfo.ruby_sudo_shell_command("-E"), :ruby => PhusionPassenger::PlatformInfo.ruby_command, :passenger_config => "#{PhusionPassenger.bin_dir}/passenger-config" return false end if detector.results.size > 1 other_installs = detector.results - [@apache2] render_template 'apache2/multiple_apache_installations_detected', :current => @apache2, :other_installs => other_installs puts if interactive? result = prompt_confirmation "Are you sure you want to install " + "against Apache #{@apache2.version} (#{@apache2.apxs2})?" if !result puts line render_template 'apache2/installing_against_a_different_apache', :other_installs => other_installs end return result else puts 'Continuing installation because --auto is given.' return true end else puts 'All good!' return true end ensure detector.finish end end def check_whether_apache_uses_compatible_mpm # 'httpd -V' output is in the form of: # # Server MPM: Prefork # <--- this line is not always available! # ... # Server compiled with.... # -D APACHE_MPM_DIR="server/mpm/prefork" output = PlatformInfo.httpd_V output =~ /^Server MPM: +(.*)$/ if $1 mpm = $1.downcase else output =~ /APACHE_MPM_DIR="server\/mpm\/(.*)"/ if $1 mpm = $1.downcase else mpm = nil end end if mpm != "prefork" && mpm != "worker" && mpm != "event" new_screen render_template 'apache2/apache_must_be_compiled_with_compatible_mpm', :current_mpm => mpm wait end end def check_write_permission_to_passenger_root File.new("__test__.txt", "w").close return true rescue SystemCallError puts line if Process.uid == 0 render_template 'installer_common/cannot_access_files_as_root', :type => "directory", :files => [PhusionPassenger.apache2_module_source_dir] else render_template 'installer_common/run_installer_as_root', :dir => PhusionPassenger.apache2_module_source_dir, :sudo => PhusionPassenger::PlatformInfo.ruby_sudo_command, :sudo_s_e => PhusionPassenger::PlatformInfo.ruby_sudo_shell_command("-E"), :ruby => PhusionPassenger::PlatformInfo.ruby_command, :installer => "#{PhusionPassenger.bin_dir}/passenger-install-apache2-module #{ORIG_ARGV.join(' ')}" end return false ensure File.unlink("__test__.txt") rescue nil end def check_write_permission_to_web_server_config_files return true if !@update_config config_file = PlatformInfo.httpd_default_config_file return if !config_file || !File.exist?(config_file) all_config_files = PlatformInfo.httpd_included_config_files(config_file) if all_config_files[:unreadable_files].any? puts line if Process.uid == 0 render_template 'installer_common/cannot_access_files_as_root', :access => "read from", :files => all_config_files[:unreadable_files] else render_template 'installer_common/run_installer_as_root', :access => "read from", :desc => "an Apache configuration file", :sudo => PhusionPassenger::PlatformInfo.ruby_sudo_command, :sudo_s_e => PhusionPassenger::PlatformInfo.ruby_sudo_shell_command("-E"), :ruby => PhusionPassenger::PlatformInfo.ruby_command, :installer => "#{PhusionPassenger.bin_dir}/passenger-install-apache2-module #{ORIG_ARGV.join(' ')}" end puts render_template 'apache2/present_choice_for_no_update_config' return false end unwriteable_files = [] all_config_files[:files].each do |filename| if !File.writable_real?(filename) unwriteable_files << filename end end if unwriteable_files.empty? return true else puts line if Process.uid == 0 render_template 'installer_common/cannot_access_files_as_root', :files => unwriteable_files else render_template 'installer_common/run_installer_as_root', :desc => "an Apache configuration file", :sudo => PhusionPassenger::PlatformInfo.ruby_sudo_command, :sudo_s_e => PhusionPassenger::PlatformInfo.ruby_sudo_shell_command("-E"), :ruby => PhusionPassenger::PlatformInfo.ruby_command, :installer => "#{PhusionPassenger.bin_dir}/passenger-install-apache2-module #{ORIG_ARGV.join(' ')}" end puts render_template 'apache2/present_choice_for_no_update_config' return false end end def compile_apache2_module puts line puts 'Compiling and installing Apache 2 module...' if @compile puts "cd #{PhusionPassenger.apache2_module_source_dir}" if ENV['TRACE'] rake = "#{PlatformInfo.rake_command} --trace RELEASE=yes" else rake = "#{PlatformInfo.rake_command} RELEASE=yes" end command = "#{rake} apache2:clean apache2" if PhusionPassenger.native_packaging_method == "homebrew" # Running apache2:clean deletes some object files needed # by passenger-install-nginx-module, so we ensure those # object files are compiled. command << " nginx" end return sh(command) else puts "Skipping compilation" return true end end def load_snippet return "LoadModule passenger_module #{PhusionPassenger.apache2_module_path}" end def config_snippet return "\n" + " PassengerRoot #{PhusionPassenger.source_root}\n" + " PassengerDefaultRuby #{PlatformInfo.ruby_command}\n" + "" end def apache2_config_snippets return "#{load_snippet}\n#{config_snippet}\n" end def backup_config_files(config_file, all_config_files) now = Time.now.strftime("%Y-%m-%d-%H:%M:%S") archive = "#{config_file}.#{GLOBAL_NAMESPACE_DIRNAME}-backup-#{now}.tar.gz" backup_files = all_config_files.dup # Some people create a regular file in /etc/apache2/mods-enabled, for convenience # reasons. This file is not actually managed by a2enmod. We will remove such files # because we're going to use mods-eanbled ourselves, so we need to back them up. if (dir = PlatformInfo.httpd_mods_enabled_directory) && PlatformInfo.a2enmod if File.file?("#{dir}/#{APACHE2_MODULE_CONF_NAME}.load") backup_files << "#{dir}/#{APACHE2_MODULE_CONF_NAME}.load" end if File.file?("#{dir}/#{APACHE2_MODULE_CONF_NAME}.conf") backup_files << "#{dir}/#{APACHE2_MODULE_CONF_NAME}.conf" end end puts "Backing up existing configuration files to #{archive}..." backup_files.uniq! backup_files.map! { |x| x.sub(/^\//, '') } Dir.chdir("/") do sh! "tar", "-czf", archive, *backup_files end end def uninstall_or_comment_out_existing_config_snippets(all_config_files) files_containing_autoinstall_load_blocks = [] files_containing_autoinstall_conf_blocks = [] # Some people create a regular file in /etc/apache2/mods-enabled, for convenience # reasons. This file is not actually managed by a2enmod. We remove such files # because we're going to use mods-enabled ourselves. They've already been backed up. if (dir = PlatformInfo.httpd_mods_enabled_directory) && PlatformInfo.a2enmod filename = "#{dir}/#{APACHE2_MODULE_CONF_NAME}.load" if File.file?(filename) && !File.symlink?(filename) puts "Removing #{filename}" File.unlink(filename) end filename = "#{dir}/#{APACHE2_MODULE_CONF_NAME}.conf" if File.file?(filename) && !File.symlink?(filename) puts "Removing #{filename}" File.unlink(filename) end end # Uncomment Phusion Passenger config snippets. all_config_files.each do |filename| next if !File.exist?(filename) contents = File.open(filename, "rb") do |f| f.read end if contents =~ /#{Regexp.escape AUTOINSTALL_BEGIN_LOAD_BLOCK}.*?#{Regexp.escape AUTOINSTALL_END_LOAD_BLOCK}/m files_containing_autoinstall_load_blocks << filename end if contents =~ /#{Regexp.escape AUTOINSTALL_BEGIN_CONF_BLOCK}.*?#{Regexp.escape AUTOINSTALL_END_CONF_BLOCK}/m files_containing_autoinstall_conf_blocks << filename end subst1 = contents.gsub!(/^([ \t]*LoadModule[ \t]+passenger_module[ \t]+.*)$/i, '# \1') subst2 = contents.gsub!(/^([ \t]*PassengerRoot[ \t]+.*)$/i, '# \1') subst3 = contents.gsub!(/^([ \t]*PassengerDefaultRuby[ \t]+.*)$/i, '# \1') if subst1 || subst2 || subst3 puts "Uninstalling previous #{PROGRAM_NAME} from #{filename}..." File.open(filename, "wb") do |f| f.write(contents) end end end # If there are multiple auto-install comment blocks, remove the duplicates. # First, we remove all comment blocks from all files besides the first one. if files_containing_autoinstall_load_blocks.size > 1 files_containing_autoinstall_load_blocks[1..-1].each do |filename| puts "Removing duplicate load snippets from #{filename}..." remove_comment_blocks(filename, AUTOINSTALL_BEGIN_LOAD_BLOCK, AUTOINSTALL_END_LOAD_BLOCK) end end if files_containing_autoinstall_conf_blocks.size > 1 files_containing_autoinstall_conf_blocks[1..-1].each do |filename| puts "Removing duplicate conf snippets from #{filename}..." remove_comment_blocks(filename, AUTOINSTALL_BEGIN_CONF_BLOCK, AUTOINSTALL_END_CONF_BLOCK) end end # Then we are left with exactly 0 or exactly 1 file with comment blocks # of each type. There may be duplicates inside that single file, so # remove duplicates there too. if files_containing_autoinstall_load_blocks.size > 0 filename = files_containing_autoinstall_load_blocks[0] puts "Removing duplicate load snippets inside #{filename}..." remove_duplicate_comment_blocks(filename, AUTOINSTALL_BEGIN_LOAD_BLOCK, AUTOINSTALL_END_LOAD_BLOCK) end if files_containing_autoinstall_conf_blocks.size > 0 filename = files_containing_autoinstall_conf_blocks[0] puts "Removing duplicate configuration snippets inside #{filename}..." remove_duplicate_comment_blocks(filename, AUTOINSTALL_BEGIN_CONF_BLOCK, AUTOINSTALL_END_CONF_BLOCK) end # One or more files may have been removed, so filter out the ones # that are left. all_config_files.reject! do |filename| !File.exist?(filename) end end def remove_comment_blocks(filename, begin_marker, end_marker) contents = File.open(filename, "rb") do |f| f.read end regexp = /#{Regexp.escape begin_marker}.*?#{Regexp.escape end_marker}\n?/m contents.gsub!(regexp, '') File.open(filename, "wb") do |f| f.write(contents) end end def remove_duplicate_comment_blocks(filename, begin_marker, end_marker) contents = File.open(filename, "rb") do |f| f.read end regexp = /#{Regexp.escape begin_marker}.*?#{Regexp.escape end_marker}\n?/m if m = regexp.match(contents) offset = m.end(0) rest = contents.slice!(m.end(0) .. -1) rest.gsub!(regexp, '') contents << rest File.open(filename, "wb") do |f| f.write(contents) end end end def add_new_config_snippets(all_config_files) # Look for the file containing the auto-install load and conf comment blocks. # The uninstall_or_comment_out_existing_config_snippets method has already # guaranteed that there is at most 1 file per comment block type, and that # inside each file there are no duplicate comment blocks. load_block_file = find_config_file_containing_comment_block(all_config_files, AUTOINSTALL_BEGIN_LOAD_BLOCK, AUTOINSTALL_END_LOAD_BLOCK) conf_block_file = find_config_file_containing_comment_block(all_config_files, AUTOINSTALL_BEGIN_CONF_BLOCK, AUTOINSTALL_END_CONF_BLOCK) if load_block_file && conf_block_file puts "Updating #{PROGRAM_NAME} module load snippet inside #{load_block_file}..." update_comment_block(load_block_file, AUTOINSTALL_BEGIN_LOAD_BLOCK, AUTOINSTALL_END_LOAD_BLOCK, load_snippet) puts "Updating #{PROGRAM_NAME} configuration snippet inside #{conf_block_file}..." update_comment_block(conf_block_file, AUTOINSTALL_BEGIN_CONF_BLOCK, AUTOINSTALL_END_CONF_BLOCK, config_snippet) elsif !load_block_file && !conf_block_file create_load_snippet_file(:maybe_in_mods_available) create_conf_snippet_file(:maybe_in_mods_available) if PlatformInfo.httpd_mods_available_directory && PlatformInfo.a2enmod sh! "#{PlatformInfo.a2enmod} #{APACHE2_MODULE_CONF_NAME}" end # It looks like either the load or conf file isn't available. # If the file that is available is inside mods-available, then it # means that the mods-available files are broken. elsif is_file_inside_mods_available?(load_block_file, "#{APACHE2_MODULE_CONF_NAME}.load") || is_file_inside_mods_available?(conf_block_file, "#{APACHE2_MODULE_CONF_NAME}.conf") # We fix it if a2enmod is available. Otherwise, we remove the block. if PlatformInfo.a2enmod if !load_block_file create_load_snippet_file(:must_be_in_mods_available) else create_conf_snippet_file(:must_be_in_mods_available) end else if load_block_file puts "Removing load snippets from #{filename}..." remove_comment_blocks(load_block_file, AUTOINSTALL_BEGIN_LOAD_BLOCK, AUTOINSTALL_END_LOAD_BLOCK) else puts "Removing configuration snippets from #{filename}..." remove_comment_blocks(conf_block_file, AUTOINSTALL_BEGIN_CONF_BLOCK, AUTOINSTALL_END_CONF_BLOCK) end create_load_snippet_file(:must_be_in_mods_available) create_conf_snippet_file(:must_be_in_mods_available) end sh! "#{PlatformInfo.a2enmod} passenger" else if !load_block_file create_load_snippet_file(:not_in_mods_available) puts "Updating #{PROGRAM_NAME} configuration snippet inside #{conf_block_file}..." update_comment_block(conf_block_file, AUTOINSTALL_BEGIN_CONF_BLOCK, AUTOINSTALL_END_CONF_BLOCK, config_snippet) else create_conf_snippet_file(:not_in_mods_available) puts "Updating #{PROGRAM_NAME} module load snippet inside #{load_block_file}..." update_comment_block(load_block_file, AUTOINSTALL_BEGIN_LOAD_BLOCK, AUTOINSTALL_END_LOAD_BLOCK, load_snippet) end end end def find_config_file_containing_comment_block(all_config_files, begin_marker, end_marker) regexp = /#{Regexp.escape begin_marker}.*?#{Regexp.escape end_marker}/m all_config_files.each do |filename| contents = File.open(filename, "rb") do |f| f.read end if contents =~ regexp return filename end end return nil end def update_comment_block(filename, begin_marker, end_marker, block_contents) regexp = /#{Regexp.escape begin_marker}.*?#{Regexp.escape end_marker}\n?/m contents = File.open(filename, "rb") do |f| f.read end if contents.sub!(regexp, "#{begin_marker}\n#{block_contents}\n#{end_marker}\n") File.open(filename, "wb") do |f| f.write(contents) end return true else return false end end def remove_comment_blocks(filename, begin_marker, end_marker) regexp = /#{Regexp.escape begin_marker}.*?#{Regexp.escape end_marker}\n?/m contents = File.open(filename, "rb") do |f| f.read end contents.gsub!(regexp, "") File.open(filename, "wb") do |f| f.write(contents) end end def is_file_inside_mods_available?(filename, basename) if dir = PlatformInfo.httpd_mods_available_directory return filename == "#{dir}/#{basename}" else return false end end def create_load_snippet_file(where) case where when :maybe_in_mods_available if PlatformInfo.httpd_mods_available_directory && PlatformInfo.a2enmod filename = "#{PlatformInfo.httpd_mods_available_directory}/#{APACHE2_MODULE_CONF_NAME}.load" else filename = PlatformInfo.httpd_default_config_file end when :must_be_in_mods_available if PlatformInfo.httpd_mods_available_directory && PlatformInfo.a2enmod filename = "#{PlatformInfo.httpd_mods_available_directory}/#{APACHE2_MODULE_CONF_NAME}.load" else raise "Apache does not support the mods-available directory" end when :not_in_mods_available filename = PlatformInfo.httpd_default_config_file else raise ArgumentError end if File.exist?(filename) # If this is a file inside mods-available, and the file didn't have a symlink # in mods-enabled, then the uninstall phase did not remove duplicates from this # file. So here we remove duplicates again. puts "Removing duplicate load snippets inside #{filename}..." remove_duplicate_comment_blocks(filename, AUTOINSTALL_BEGIN_LOAD_BLOCK, AUTOINSTALL_END_LOAD_BLOCK) puts "Installing #{PROGRAM_NAME} module load snippet to #{filename}..." should_add = !update_comment_block(filename, AUTOINSTALL_BEGIN_LOAD_BLOCK, AUTOINSTALL_END_LOAD_BLOCK, load_snippet) else puts "Installing #{PROGRAM_NAME} module load snippet to #{filename}..." should_add = true end if should_add File.open(filename, "ab") do |f| f.write("\n#{AUTOINSTALL_BEGIN_LOAD_BLOCK}\n" + "#{load_snippet}\n" + "#{AUTOINSTALL_END_LOAD_BLOCK}\n") end end end def create_conf_snippet_file(where) case where when :maybe_in_mods_available if PlatformInfo.httpd_mods_available_directory && PlatformInfo.a2enmod filename = "#{PlatformInfo.httpd_mods_available_directory}/#{APACHE2_MODULE_CONF_NAME}.conf" else filename = PlatformInfo.httpd_default_config_file end when :must_be_in_mods_available if PlatformInfo.httpd_mods_available_directory && PlatformInfo.a2enmod filename = "#{PlatformInfo.httpd_mods_available_directory}/#{APACHE2_MODULE_CONF_NAME}.conf" else raise "Apache does not support the mods-available directory" end when :not_in_mods_available filename = PlatformInfo.httpd_default_config_file else raise ArgumentError end if File.exist?(filename) # If this is a file inside mods-available, and the file didn't have a symlink # in mods-enabled, then the uninstall phase did not remove duplicates from this # file. So here we remove duplicates again. puts "Removing duplicate configuration snippets inside #{filename}..." remove_duplicate_comment_blocks(filename, AUTOINSTALL_BEGIN_CONF_BLOCK, AUTOINSTALL_END_CONF_BLOCK) puts "Installing #{PROGRAM_NAME} module configuration snippet to #{filename}..." should_add = !update_comment_block(filename, AUTOINSTALL_BEGIN_CONF_BLOCK, AUTOINSTALL_END_CONF_BLOCK, config_snippet) else puts "Installing #{PROGRAM_NAME} module configuration snippet to #{filename}..." should_add = true end if should_add File.open(filename, "ab") do |f| f.write("\n#{AUTOINSTALL_BEGIN_CONF_BLOCK}\n" + "#{config_snippet}\n" + "#{AUTOINSTALL_END_CONF_BLOCK}\n") end end end def install_apache2_config_snippets if !@update_config show_apache2_config_snippets return true end config_file = PlatformInfo.httpd_default_config_file if config_file && File.exist?(config_file) puts line puts "Updating Apache configuration files..." config_file = PlatformInfo.httpd_default_config_file all_config_files = PlatformInfo.httpd_included_config_files(config_file)[:files] backup_config_files(config_file, all_config_files) if @backup_config uninstall_or_comment_out_existing_config_snippets(all_config_files) add_new_config_snippets(all_config_files) return true else show_apache2_config_snippets return true end end def show_apache2_config_snippets puts line render_template 'apache2/config_snippets', :snippet => apache2_config_snippets wait end def show_deployment_example new_screen render_template 'apache2/deployment_example', :users_guide_path => users_guide_path, :users_guide_url => users_guide_url, :phusion_website => PHUSION_WEBSITE, :passenger_website => PASSENGER_WEBSITE, :languages => @languages end def show_possible_solutions_for_compilation_and_installation_problems new_screen render_template 'apache2/possible_solutions_for_compilation_and_installation_problems', :users_guide_path => users_guide_path, :users_guide_url => users_guide_url, :support_url => SUPPORT_URL end def apache_module_available? return File.exist?(PhusionPassenger.apache2_module_path) end def install_apache_module_from_native_package case PhusionPassenger.native_packaging_method when 'deb' sh! "sudo apt-get update" sh! "sudo apt-get install #{DEB_APACHE_MODULE_PACKAGE}" return true when 'rpm' sh! "sudo yum install #{RPM_APACHE_MODULE_PACKAGE}-#{VERSION_STRING}" return true else puts "The #{PROGRAM_NAME} Apache module package is not installed." puts "Please ask your operating system vendor how to install it." return false end end def notify_apache_module_installed render_template 'apache2/notify_apache_module_installed' wait end end ORIG_ARGV = ARGV.dup options = { :compile => true, :update_config => false, :backup_config => true } parser = OptionParser.new do |opts| opts.banner = "Usage: passenger-install-apache2-module [options]" opts.separator "" indent = ' ' * 37 opts.separator "Options:" opts.on("-a", "--auto", String, "Automatically build the Apache module,\n" << "#{indent}without interactively asking for user\n" << "#{indent}input.") do options[:auto] = true end opts.on("--apxs2-path PATH", String, "Path to 'apxs2' command.") do |value| ENV['APXS2'] = value end opts.on("--apr-config-path PATH", String, "Path to 'apr-config' command.") do |value| ENV['APR_CONFIG'] = value end opts.on("--languages NAMES", "Comma-separated list of interested\n" << "#{indent}languages (e.g.\n" << "#{indent}'ruby,python,nodejs,meteor')") do |value| options[:languages] = value.split(",") end opts.on("--no-compile", "Skip compilation.") do options[:compile] = false end #opts.on("--no-update-config", "Do not automatically update Apache config\n" << # "#{indent}files.") do # options[:update_config] = false #end #opts.on("--no-backup-config", "When updating Apache config files, do not\n" << # "#{indent}create backups of the existing files.") do # options[:backup_config] = false #end opts.on("--snippet", "Show just the Apache config snippet.") do options[:snippet] = true end end begin parser.parse! rescue OptionParser::ParseError => e puts e puts puts "Please see '--help' for valid options." exit 1 end installer = Installer.new(options) if options[:snippet] puts installer.send(:apache2_config_snippets) else installer.run end passenger-4.0.37/bin/passenger-install-nginx-module000755 000765 000024 00000043153 12233035540 022757 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ## Magic comment: begin bootstrap ## source_root = File.expand_path("..", File.dirname(__FILE__)) $LOAD_PATH.unshift("#{source_root}/lib") begin require 'rubygems' rescue LoadError end require 'phusion_passenger' ## Magic comment: end bootstrap ## PhusionPassenger.locate_directories require 'digest' require 'optparse' require 'fileutils' PhusionPassenger.require_passenger_lib 'platform_info/ruby' PhusionPassenger.require_passenger_lib 'abstract_installer' PhusionPassenger.require_passenger_lib 'utils/terminal_choice_menu' PhusionPassenger.require_passenger_lib 'utils/tmpio' class Installer < PhusionPassenger::AbstractInstaller include PhusionPassenger TerminalChoiceMenu = PhusionPassenger::Utils::TerminalChoiceMenu def dependencies specs = [ 'depcheck_specs/compiler_toolchain', 'depcheck_specs/ruby', 'depcheck_specs/gems', 'depcheck_specs/libs', 'depcheck_specs/utilities' ] ids = [ 'cc', 'c++', 'download-tool', 'libcurl-dev', 'openssl-dev', 'zlib-dev', 'rake', 'ruby-openssl', 'rubygems' ] if @languages.include?("ruby") if PlatformInfo.passenger_needs_ruby_dev_header? ids << 'ruby-dev' end ids << 'rack' end return [specs, ids] end def users_guide_path return PhusionPassenger.nginx_doc_path end def users_guide_url return NGINX_DOC_URL end def run_steps # Make sure the configure script finds the correct # passenger-config command. ENV['PATH'] = PhusionPassenger.bin_dir + ":" + ENV['PATH'] show_welcome_screen query_interested_languages check_gem_install_permission_problems || exit(1) check_directory_accessible_by_web_server check_nginx_module_sources_available || exit(1) check_dependencies || exit(1) if needs_compiling_support_files? check_whether_we_can_write_to(PhusionPassenger.build_system_dir) || exit(1) end check_whether_os_is_broken check_whether_system_has_enough_ram download_and_install = should_we_download_and_install_nginx_automatically? if pcre_is_installed? @pcre_source_dir = nil else @pcre_source_dir = download_and_extract_pcre end if download_and_install nginx_source_dir = download_and_extract_nginx if nginx_source_dir.nil? show_possible_solutions_for_download_and_extraction_problems exit(1) end nginx_prefix = ask_for_nginx_install_prefix check_whether_other_nginx_installations_exist(nginx_prefix) if @extra_configure_flags == "none" extra_nginx_configure_flags = nil else extra_nginx_configure_flags = @extra_configure_flags end else nginx_source_dir = ask_for_nginx_source_dir nginx_prefix = ask_for_nginx_install_prefix check_whether_other_nginx_installations_exist(nginx_prefix) extra_nginx_configure_flags = ask_for_extra_nginx_configure_flags(nginx_prefix) end check_whether_we_can_write_to(nginx_prefix) || exit(1) nginx_config_already_exists_before_installing = nginx_config_exists?(nginx_prefix) if needs_compiling_support_files? if !compile_passenger_support_files show_possible_solutions_for_compilation_and_installation_problems exit(1) end end if install_nginx(nginx_source_dir, nginx_prefix, extra_nginx_configure_flags) if nginx_config_already_exists_before_installing || !locate_nginx_config_file(nginx_prefix) show_passenger_config_snippets(nginx_prefix) else insert_passenger_config_snippets(nginx_prefix) end show_deployment_example else show_possible_solutions_for_compilation_and_installation_problems exit(1) end end def before_install super myself = `whoami`.strip @working_dir = PhusionPassenger::Utils.mktmpdir("passenger.", PlatformInfo.tmpexedir) end def after_install super FileUtils.remove_entry_secure(@working_dir) if @working_dir end private def show_welcome_screen render_template 'nginx/welcome', :version => VERSION_STRING wait end def query_interested_languages menu = TerminalChoiceMenu.new(["Ruby", "Python", "Node.js", "Meteor"]) menu["Ruby"].checked = interesting_language?('ruby') menu["Python"].checked = interesting_language?('python') menu["Node.js"].checked = interesting_language?('nodejs', 'node') menu["Meteor"].checked = interesting_language?('meteor') new_screen puts "Which languages are you interested in?" puts if interactive? puts "Use to select." puts "If the menu doesn't display correctly, ensure that your terminal supports UTF-8." else puts "Override selection with --languages." end puts if interactive? begin menu.query rescue Interrupt raise Abort end else menu.display_choices puts end @languages = menu.selected_choices.map{ |x| x.downcase.gsub(/\./, '') } end def interesting_language?(name, command = nil) if @languages return @languages.include?(name) else return !!PlatformInfo.find_command(command || name) end end def check_nginx_module_sources_available if PhusionPassenger.natively_packaged? && !File.exist?(PhusionPassenger.nginx_module_source_dir) new_screen render_template 'nginx/nginx_module_sources_not_available' return false else return true end end def needs_compiling_support_files? return PhusionPassenger.originally_packaged? end def compile_passenger_support_files new_screen puts "Compiling Passenger support files..." Dir.chdir(PhusionPassenger.build_system_dir) do return sh("#{PlatformInfo.rake_command} nginx:clean nginx RELEASE=yes") end end def should_we_download_and_install_nginx_automatically? new_screen render_template 'nginx/query_download_and_install', :nginx_version => PREFERRED_NGINX_VERSION puts if @auto_download puts "=> Proceeding with choice 1." return true elsif @nginx_source_dir puts "=> Proceeding with choice 2." return false else choice = prompt("Enter your choice (1 or 2) or press Ctrl-C to abort") do |input| if input == "1" || input == "2" true elsif input.empty? puts "No choice has been given." false else puts "'#{input}' is not a valid choice." false end end return choice == "1" end end def download_and_extract_pcre new_screen puts "PCRE (required by Nginx) not installed, downloading it..." url = "http://downloads.sourceforge.net/project/pcre/pcre/#{PREFERRED_PCRE_VERSION}/pcre-#{PREFERRED_PCRE_VERSION}.tar.gz" dirname = "pcre-#{PREFERRED_PCRE_VERSION}" tarball = "#{@working_dir}/pcre.tar.gz" if download(url, tarball) Dir.chdir(@working_dir) do puts "Verifying PCRE checksum..." if Digest::SHA256.file(tarball) != PCRE_SHA256_CHECKSUM new_screen render_template "nginx/pcre_checksum_could_not_be_verified" wait return nil end puts "Extracting PCRE source tarball..." if sh("tar", "xzvf", tarball) return "#{@working_dir}/#{dirname}" else new_screen render_template "nginx/pcre_could_not_be_extracted" wait return nil end end else new_screen render_template "nginx/pcre_could_not_be_downloaded" wait return nil end rescue Interrupt exit 2 end def download_and_extract_nginx new_screen puts "Downloading Nginx..." url = "http://www.nginx.org/download/nginx-#{PREFERRED_NGINX_VERSION}.tar.gz" dirname = "nginx-#{PREFERRED_NGINX_VERSION}" tarball = "#{@working_dir}/nginx.tar.gz" if download(url, tarball) Dir.chdir(@working_dir) do puts "Verifying Nginx checksum..." if Digest::SHA256.file(tarball) != NGINX_SHA256_CHECKSUM return nil end puts "Extracting Nginx source tarball..." if sh("tar", "xzvf", tarball) return "#{@working_dir}/#{dirname}" else return nil end end else return nil end rescue Interrupt exit 2 end def show_possible_solutions_for_download_and_extraction_problems new_screen render_template "nginx/possible_solutions_for_download_and_extraction_problems" puts end def ask_for_nginx_install_prefix new_screen puts "Where do you want to install Nginx to?" puts if @prefix puts "=> #{@prefix}" return @prefix else prefix = prompt("Please specify a prefix directory [/opt/nginx]") do |input| if input.empty? || input =~ %r(/) true else puts "Please specify an absolute path." false end end if prefix.empty? prefix = "/opt/nginx" end return prefix end end def check_whether_other_nginx_installations_exist(nginx_prefix) check_for = [ "/usr/bin/nginx", "/usr/sbin/nginx" ] existing_binary = nil check_for.each do |filename| if File.exist?(filename) existing_binary = filename break end end if existing_binary new_screen render_template 'nginx/other_nginx_installations_exist', :existing_binary => existing_binary, :prefix => nginx_prefix wait end end def ask_for_nginx_source_dir new_screen puts "Where is your Nginx source code located?" puts if @nginx_source_dir puts "=> #{@nginx_source_dir}" return @nginx_source_dir else return prompt("Please specify the directory") do |input| if input =~ %r(/) if File.exist?("#{input}/src/core/nginx.c") true else puts "'#{input}' does not look like an Nginx source directory." false end else puts "Please specify an absolute path." false end end end end def ask_for_extra_nginx_configure_flags(prefix) done = false while !done new_screen render_template 'nginx/ask_for_extra_configure_flags', :command => build_nginx_configure_command(prefix) puts if @extra_configure_flags if @extra_configure_flags == "none" extra_args = "" puts "=> No extra configure flags." else extra_args = @extra_configure_flags puts "=> #{extra_args}" end return extra_args else extra_args = prompt "Extra arguments to pass to configure script" new_screen render_template 'nginx/confirm_extra_configure_flags', :command => build_nginx_configure_command(prefix, extra_args) puts answer = prompt("Is this what you want? (yes/no) [default=yes]") do |input| if input.empty? || input == "yes" || input == "no" true else puts "Please enter 'yes' or 'no'." false end end done = answer.empty? || answer == "yes" end end return extra_args end def check_whether_we_can_write_to(dir) FileUtils.mkdir_p(dir) File.new("#{dir}/__test__.txt", "w").close return true rescue new_screen if Process.uid == 0 render_template 'nginx/cannot_write_to_dir', :dir => dir else render_template 'installer_common/run_installer_as_root', :dir => dir, :sudo => PhusionPassenger::PlatformInfo.ruby_sudo_command, :sudo_s_e => PhusionPassenger::PlatformInfo.ruby_sudo_shell_command("-E"), :ruby => PhusionPassenger::PlatformInfo.ruby_command, :installer => "#{PhusionPassenger.bin_dir}/passenger-install-nginx-module #{ORIG_ARGV.join(' ')}" end return false ensure File.unlink("#{dir}/__test__.txt") rescue nil end def nginx_config_exists?(prefix) return !!locate_nginx_config_file(prefix) end def install_nginx(source_dir, prefix, extra_configure_flags) Dir.chdir(source_dir) do new_screen puts "Compiling and installing Nginx..." if !sh(build_nginx_configure_command(prefix, extra_configure_flags)) || !sh("make") || !sh("make install") return false end end return true rescue Interrupt raise Aborted end def show_passenger_config_snippets(prefix) new_screen render_template 'nginx/config_snippets', :config_file => locate_nginx_config_file(prefix), :passenger_root => PhusionPassenger.source_root, :ruby => PlatformInfo.ruby_command wait end def show_deployment_example line puts render_template 'nginx/deployment_example', :users_guide_path => users_guide_path, :users_guide_url => users_guide_url, :phusion_website => PHUSION_WEBSITE, :passenger_website => PASSENGER_WEBSITE end def show_possible_solutions_for_compilation_and_installation_problems line puts render_template 'nginx/possible_solutions_for_compilation_and_installation_problems', :users_guide_path => users_guide_path, :users_guide_url => users_guide_url, :support_url => SUPPORT_URL end def locate_nginx_config_file(prefix) ["#{prefix}/conf/nginx.conf", "#{prefix}/etc/nginx.conf"].each do |filename| if File.exist?(filename) return filename end end return nil end def insert_passenger_config_snippets(prefix) config_file = locate_nginx_config_file(prefix) contents = File.read(config_file) contents.sub!(/^http \{/, "http {\n" << " passenger_root #{PhusionPassenger.source_root};\n" << " passenger_ruby #{PlatformInfo.ruby_command};\n") File.open(config_file, 'w') do |f| f.write(contents) end new_screen render_template 'nginx/config_snippets_inserted', :config_file => config_file, :passenger_root => PhusionPassenger.source_root, :ruby => PlatformInfo.ruby_command wait end def build_nginx_configure_command(prefix, extra_configure_flags = nil) command = "sh ./configure --prefix='#{prefix}' " command << "--with-http_ssl_module " command << "--with-http_gzip_static_module " command << "--with-http_stub_status_module " command << "--with-cc-opt='-Wno-error' " if @pcre_source_dir command << "--with-pcre='#{@pcre_source_dir}' " elsif !pcre_is_installed? command << "--without-http_rewrite_module " end command << "--add-module='#{PhusionPassenger.nginx_module_source_dir}' #{extra_configure_flags}" command.strip! return command end def pcre_is_installed? if @pcre_is_installed.nil? @pcre_is_installed = begin File.open('/tmp/passenger-check.c', 'w') do |f| f.puts("#include ") end Dir.chdir('/tmp') do # Nginx checks for PCRE in multiple places... system("(gcc -I/usr/local/include -I/usr/include/pcre " << "-I/usr/pkg/include -I/opt/local/include " << "-c passenger-check.c) >/dev/null 2>/dev/null") end ensure File.unlink('/tmp/passenger-check.c') rescue nil File.unlink('/tmp/passenger-check.o') rescue nil end end return @pcre_is_installed end end ORIG_ARGV = ARGV.dup options = {} parser = OptionParser.new do |opts| opts.banner = "Usage: passenger-install-nginx-module [options]" opts.separator "" indent = ' ' * 37 opts.separator "Options:" opts.on("--auto", "Automatically confirm 'Press ENTER to\n" << "#{indent}continue' prompts.") do options[:auto] = true end opts.on("--prefix=DIR", String, "Use the given Nginx install prefix instead\n" << "#{indent}of asking for it interactively.") do |dir| options[:prefix] = dir end opts.on("--auto-download", "Download and install Nginx automatically,\n" << "#{indent}instead of asking interactively whether to\n" << "#{indent}download+install or to use an existing\n" << "#{indent}Nginx source directory.") do options[:auto_download] = true end opts.on("--nginx-source-dir=DIR", String, "Compile and install Nginx using the given\n" << "#{indent}Nginx source directory, instead of\n" << "#{indent}interactively asking to download+install\n" << "#{indent}or to use an existing Nginx source\n" << "#{indent}directory. Conflicts with --auto-download.") do |dir| options[:nginx_source_dir] = dir end opts.on("--extra-configure-flags=STRING", String, "Pass these extra flags to Nginx's\n" << "#{indent}'configure' script, instead of asking for\n" << "#{indent}it interactively. Specify 'none' if you\n" << "#{indent}do not want to pass additional flags but do\n" << "#{indent}not want this installer to ask\n" << "#{indent}interactively either.") do |flags| options[:extra_configure_flags] = flags end opts.on("--languages NAMES", "Comma-separated list of interested\n" << "#{indent}languages (e.g.\n" << "#{indent}'ruby,python,nodejs,meteor')") do |value| options[:languages] = value.split(",") end end begin parser.parse! rescue OptionParser::ParseError => e puts e puts puts "Please see '--help' for valid options." exit 1 end if options[:auto_download] && options[:nginx_source_dir] STDERR.puts "You cannot specify both --auto-download and --nginx-source-dir." exit 1 end Installer.new(options).run passenger-4.0.37/bin/passenger-memory-stats000755 000765 000024 00000012562 12233035540 021351 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ## Magic comment: begin bootstrap ## source_root = File.expand_path("..", File.dirname(__FILE__)) $LOAD_PATH.unshift("#{source_root}/lib") begin require 'rubygems' rescue LoadError end require 'phusion_passenger' ## Magic comment: end bootstrap ## PhusionPassenger.locate_directories PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'platform_info/ruby' PhusionPassenger.require_passenger_lib 'admin_tools/memory_stats' include PhusionPassenger # ANSI color codes RESET = "\e[0m" BOLD = "\e[1m" WHITE = "\e[37m" YELLOW = "\e[33m" BLUE_BG = "\e[44m" # Container for tabular data. class Table def initialize(column_names) @column_names = column_names @rows = [] end def add_row(values) @rows << values.to_a end def add_rows(list_of_rows) list_of_rows.each do |row| add_row(row) end end def remove_column(name) i = @column_names.index(name) @column_names.delete_at(i) @rows.each do |row| row.delete_at(i) end end def to_s(title = nil) max_column_widths = [1] * @column_names.size (@rows + [@column_names]).each do |row| row.each_with_index do |value, i| max_column_widths[i] = [value.to_s.size, max_column_widths[i]].max end end format_string = max_column_widths.map{ |i| "%#{-i}s" }.join(" ") header = sprintf(format_string, *@column_names).rstrip << "\n" if title free_space = header.size - title.size - 2 if free_space <= 0 left_bar_size = 3 right_bar_size = 3 else left_bar_size = free_space / 2 right_bar_size = free_space - left_bar_size end result = "#{BLUE_BG}#{BOLD}#{YELLOW}\n" result << "#{"-" * left_bar_size} #{title} #{"-" * right_bar_size}\n" if !@rows.empty? result << WHITE result << header end else result = header.dup end if @rows.empty? result << RESET else result << ("-" * header.size) << "#{RESET}\n" @rows.each do |row| result << sprintf(format_string, *row).rstrip << "\n" end end result end end class App def initialize @stats = AdminTools::MemoryStats.new end def start puts "Version: #{PhusionPassenger::VERSION_STRING}" puts "Date : #{Time.now}" if @stats.apache_processes print_process_list("Apache processes", @stats.apache_processes) else puts "#{BLUE_BG}#{BOLD}#{YELLOW}------------- Apache processes -------------#{RESET}\n" STDERR.puts "*** WARNING: The Apache executable cannot be found." STDERR.puts "Please set the APXS2 environment variable to your 'apxs2' " << "executable's filename, or set the HTTPD environment variable " << "to your 'httpd' or 'apache2' executable's filename." end puts print_process_list("Nginx processes", @stats.nginx_processes) puts print_process_list("Passenger processes", @stats.passenger_processes, :show_ppid => false) if @stats.platform_provides_private_dirty_rss_information? && Process.euid != 0 && @stats.root_privileges_required_for_private_dirty_rss? puts "*** WARNING: Please run this tool with #{BOLD}#{PlatformInfo.ruby_sudo_command}#{RESET}. Otherwise the " << "private dirty RSS (a reliable metric for real memory usage) of processes cannot be determined." end end private def print_process_list(title, processes, options = {}) table = Table.new(%w{PID PPID VMSize Private Resident Name}) table.add_rows(processes) if options.has_key?(:show_ppid) && !options[:show_ppid] table.remove_column('PPID') end if @stats.platform_provides_private_dirty_rss_information? table.remove_column('Resident') else table.remove_column('Private') end puts table.to_s(title) if @stats.platform_provides_private_dirty_rss_information? total_private_dirty_rss = 0 some_private_dirty_rss_cannot_be_determined = false processes.each do |p| if p.private_dirty_rss.is_a?(Numeric) total_private_dirty_rss += p.private_dirty_rss else some_private_dirty_rss_cannot_be_determined = true end end puts "### Processes: #{processes.size}" printf "### Total private dirty RSS: %.2f MB", total_private_dirty_rss / 1024.0 if some_private_dirty_rss_cannot_be_determined puts " (?)" else puts end end end end App.new.start passenger-4.0.37/bin/passenger-status000755 000765 000024 00000017770 12233035540 020236 0ustar00honglistaff000000 000000 #!/usr/bin/env ruby # Phusion Passenger - https://www.phusionpassenger.com/ # Copyright (c) 2010-2013 Phusion # # "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. ## Magic comment: begin bootstrap ## source_root = File.expand_path("..", File.dirname(__FILE__)) $LOAD_PATH.unshift("#{source_root}/lib") begin require 'rubygems' rescue LoadError end require 'phusion_passenger' ## Magic comment: end bootstrap ## PhusionPassenger.locate_directories PhusionPassenger.require_passenger_lib 'platform_info' PhusionPassenger.require_passenger_lib 'admin_tools/server_instance' PhusionPassenger.require_passenger_lib 'utils/ansi_colors' require 'optparse' include PhusionPassenger::AdminTools include PhusionPassenger::Utils::AnsiColors DEFAULT_OPTIONS = { :show => 'pool' }.freeze ##### Show status command ##### def command_show_status(argv, options) if argv.empty? server_instance = find_sole_server_instance else server_instance = find_server_instance_on_pid(argv[0].to_i) end show_status(server_instance, options) end def find_sole_server_instance server_instances = ServerInstance.list if server_instances.empty? abort "ERROR: Phusion Passenger doesn't seem to be running." elsif server_instances.size == 1 return server_instances.first else puts "It appears that multiple Passenger instances are running. Please select a" puts "specific one by running:" puts puts " passenger-status " puts puts "The following Passenger instances are running:" server_instances.each do |instance| puts " PID: #{instance.pid}" end exit 1 end end def find_server_instance_on_pid(pid) if server_instance = ServerInstance.for_pid(pid) return server_instance else abort "ERROR: there doesn't seem to be a Phusion Passenger instance running on PID #{pid}." end end def show_status(server_instance, options) if options[:show] != 'xml' puts "Version : #{PhusionPassenger::VERSION_STRING}" puts "Date : #{Time.now}" puts "Instance: #{server_instance.pid}" end case options[:show] when 'pool' client = server_instance.connect(:role => :passenger_status) begin puts client.pool_status(:verbose => options[:verbose], :colorize => true) rescue SystemCallError => e STDERR.puts "*** ERROR: Cannot query status for Phusion Passenger instance #{server_instance.pid}:" STDERR.puts e.to_s exit 2 end when 'requests' client = server_instance.connect(:role => :passenger_status) begin puts client.helper_agent_requests rescue SystemCallError => e STDERR.puts "*** ERROR: Cannot query status for Phusion Passenger instance #{server_instance.pid}:" STDERR.puts e.to_s exit 2 end when 'backtraces' client = server_instance.connect(:role => :passenger_status) begin text = client.helper_agent_backtraces rescue SystemCallError => e STDERR.puts "*** ERROR: Cannot query status for Phusion Passenger instance #{control_process.pid}:" STDERR.puts e.to_s exit 2 end # Colorize output text.gsub!(/^(Thread .*:)$/, BLACK_BG + YELLOW + '\1' + RESET) text.gsub!(/^( +in '.*? )(.*?)\(/, '\1' + BOLD + '\2' + RESET + '(') puts text when 'xml' client = server_instance.connect(:role => :passenger_status) begin xml = client.pool_xml rescue SystemCallError => e STDERR.puts "*** ERROR: Cannot query status for Phusion Passenger instance #{control_process.pid}:" STDERR.puts e.to_s exit 2 end indented = format_with_xmllint(xml) if indented puts indented else puts xml STDERR.puts "*** Tip: if you install the 'xmllint' command then the XML output will be indented." end when 'union_station' client = server_instance.connect(:role => :passenger_status, :socket_name => 'logging_admin') begin response = client.logging_agent_status rescue SystemCallError => e STDERR.puts "*** ERROR: Cannot query status for Phusion Passenger instance #{control_process.pid}:" STDERR.puts e.to_s exit 2 end puts response end rescue ServerInstance::RoleDeniedError PhusionPassenger.require_passenger_lib 'platform_info/ruby' STDERR.puts "*** ERROR: You are not authorized to query the status for this Phusion " << "Passenger instance. Please try again with '#{PhusionPassenger::PlatformInfo.ruby_sudo_command}'." exit 2 rescue ServerInstance::CorruptedDirectoryError STDERR.puts "*** ERROR: The server instance directory #{server_instance.path} is corrupted. " << "This could have two causes:\n" << "\n" << " 1. The Phusion Passenger instance is no longer running, but failed to cleanup the directory. " << "Please delete this directory and ignore the problem.\n" << " 2. An external program corrupted the directory. Please restart Phusion Passenger.\n" exit 2 ensure client.close if client end def format_with_xmllint(xml) return nil if !PhusionPassenger::PlatformInfo.find_command('xmllint') require 'open3' require 'thread' ENV['XMLLINT_INDENT'] = ' ' Open3.popen3("xmllint", "--format", "-") do |stdin, stdout, stderr| stdout_text = nil stderr_text = nil thread1 = Thread.new do stdin.write(xml) stdin.close end thread2 = Thread.new do stdout_text = stdout.read stdout.close end thread3 = Thread.new do stderr_text = stderr.read stderr.close end thread1.join thread2.join thread3.join if stdout_text.nil? || stdout_text.empty? if stderr_text !~ /No such file or directory/ && stderr_text !~ /command not found/ STDERR.puts stderr_text end return nil else return stdout_text end end end ##### Main command dispatcher ##### def create_option_parser(options) return OptionParser.new do |opts| opts.banner = "Usage: passenger-status [options] [Phusion Passenger's PID]" opts.separator "" opts.separator "Tool for inspecting Phusion Passenger's internal status." opts.separator "" opts.separator "Options:" opts.on("--show=pool|requests|backtraces|xml|union_station", String, "Whether to show the pool's contents,\n" << "#{' ' * 37}the currently running requests,\n" << "#{' ' * 37}the backtraces of all threads or an XML\n" << "#{' ' * 37}description of the pool.") do |what| if what !~ /\A(pool|requests|backtraces|xml|union_station)\Z/ STDERR.puts "Invalid argument for --show." exit 1 else options[:show] = what end end opts.on("--verbose", "-v", "Show verbose information.") do options[:verbose] = true end end end def parse_argv options = DEFAULT_OPTIONS.dup parser = create_option_parser(options) begin parser.parse! rescue OptionParser::ParseError => e puts e puts puts "Please see '--help' for valid options." exit 1 end return options end def infer_command if !ARGV[0] || ARGV[0] =~ /\A[0-9]+\Z/ return [:show_status, ARGV.dup] else command_name, *argv = ARGV if respond_to?("command_#{command_name}") return [command_name, argv] else abort "ERROR: unrecognized command '#{command_name}'" end end end def start options = parse_argv command, argv = infer_command send("command_#{command}", argv, options) end start